summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfpc <fpc@3ad0048d-3df7-0310-abae-a5850022a9f2>2005-05-18 16:16:11 +0000
committerfpc <fpc@3ad0048d-3df7-0310-abae-a5850022a9f2>2005-05-18 16:16:11 +0000
commitb14acf4356b0377990d7769ebe5df3b84d3c26e0 (patch)
tree7b030c32d77a6620de454f714274574e01dddad7
parentdcd85d0ceddfb435546875f48f39bf09fba090f5 (diff)
downloadfpc-b14acf4356b0377990d7769ebe5df3b84d3c26e0.tar.gz
* property svn:eol-style: native set
git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@16 3ad0048d-3df7-0310-abae-a5850022a9f2
-rw-r--r--compiler/ncgld.pas1926
-rw-r--r--compiler/nld.pas2452
-rw-r--r--fcl/db/dbase/package.txt22
-rw-r--r--packages/extra/winunits/jediapilib.inc516
-rw-r--r--packages/extra/winunits/jwaObjsel.pas1350
-rw-r--r--packages/extra/winunits/jwaaccctrl.pas2458
-rw-r--r--packages/extra/winunits/jwaaclapi.pas2676
-rw-r--r--packages/extra/winunits/jwaaclui.pas748
-rw-r--r--packages/extra/winunits/jwaactiveds.pas2414
-rw-r--r--packages/extra/winunits/jwaadsdb.pas146
-rw-r--r--packages/extra/winunits/jwaadserr.pas646
-rw-r--r--packages/extra/winunits/jwaadshlp.pas970
-rw-r--r--packages/extra/winunits/jwaadsnms.pas292
-rw-r--r--packages/extra/winunits/jwaadsprop.pas778
-rw-r--r--packages/extra/winunits/jwaadssts.pas406
-rw-r--r--packages/extra/winunits/jwaadstlb.pas20604
-rw-r--r--packages/extra/winunits/jwaadtgen.pas916
-rw-r--r--packages/extra/winunits/jwaaf_irda.pas892
-rw-r--r--packages/extra/winunits/jwaatalkwsh.pas652
-rw-r--r--packages/extra/winunits/jwaauthif.pas1294
-rw-r--r--packages/extra/winunits/jwaauthz.pas1410
-rw-r--r--packages/extra/winunits/jwabatclass.pas646
-rw-r--r--packages/extra/winunits/jwabits.pas894
-rw-r--r--packages/extra/winunits/jwabits1_5.pas266
-rw-r--r--packages/extra/winunits/jwabitscfg.pas184
-rw-r--r--packages/extra/winunits/jwabitsmsg.pas1992
-rw-r--r--packages/extra/winunits/jwablberr.pas132
-rw-r--r--packages/extra/winunits/jwabluetoothapis.pas4028
-rw-r--r--packages/extra/winunits/jwabthdef.pas3054
-rw-r--r--packages/extra/winunits/jwabthsdpdef.pas384
-rw-r--r--packages/extra/winunits/jwabugcodes.pas5712
-rw-r--r--packages/extra/winunits/jwacderr.pas282
-rw-r--r--packages/extra/winunits/jwacmnquery.pas562
-rw-r--r--packages/extra/winunits/jwacolordlg.pas270
-rw-r--r--packages/extra/winunits/jwacpl.pas594
-rw-r--r--packages/extra/winunits/jwacplext.pas214
-rw-r--r--packages/extra/winunits/jwacryptuiapi.pas314
-rw-r--r--packages/extra/winunits/jwadbt.pas1346
-rw-r--r--packages/extra/winunits/jwadde.pas660
-rw-r--r--packages/extra/winunits/jwadhcpcsdk.pas898
-rw-r--r--packages/extra/winunits/jwadhcpsapi.pas1246
-rw-r--r--packages/extra/winunits/jwadhcpssdk.pas1042
-rw-r--r--packages/extra/winunits/jwadlgs.pas994
-rw-r--r--packages/extra/winunits/jwadsadmin.pas516
-rw-r--r--packages/extra/winunits/jwadsclient.pas1542
-rw-r--r--packages/extra/winunits/jwadsgetdc.pas2028
-rw-r--r--packages/extra/winunits/jwadskquota.pas850
-rw-r--r--packages/extra/winunits/jwadsquery.pas446
-rw-r--r--packages/extra/winunits/jwadsrole.pas432
-rw-r--r--packages/extra/winunits/jwadssec.pas350
-rw-r--r--packages/extra/winunits/jwaerrorrep.pas336
-rw-r--r--packages/extra/winunits/jwaexcpt.pas186
-rw-r--r--packages/extra/winunits/jwafaxdev.pas414
-rw-r--r--packages/extra/winunits/jwafaxext.pas252
-rw-r--r--packages/extra/winunits/jwafaxmmc.pas198
-rw-r--r--packages/extra/winunits/jwafaxroute.pas334
-rw-r--r--packages/extra/winunits/jwagpedit.pas1900
-rw-r--r--packages/extra/winunits/jwahherror.pas186
-rw-r--r--packages/extra/winunits/jwahtmlGuid.pas180
-rw-r--r--packages/extra/winunits/jwahtmlhelp.pas1662
-rw-r--r--packages/extra/winunits/jwaiaccess.pas232
-rw-r--r--packages/extra/winunits/jwaiadmext.pas260
-rw-r--r--packages/extra/winunits/jwaicmpapi.pas890
-rw-r--r--packages/extra/winunits/jwaiiscnfg.pas3546
-rw-r--r--packages/extra/winunits/jwaimagehlp.pas8804
-rw-r--r--packages/extra/winunits/jwaimapi.pas602
-rw-r--r--packages/extra/winunits/jwaimapierror.pas280
-rw-r--r--packages/extra/winunits/jwaime.pas906
-rw-r--r--packages/extra/winunits/jwaioevent.pas580
-rw-r--r--packages/extra/winunits/jwaipexport.pas882
-rw-r--r--packages/extra/winunits/jwaiphlpapi.pas2370
-rw-r--r--packages/extra/winunits/jwaipifcons.pas980
-rw-r--r--packages/extra/winunits/jwaipinfoid.pas266
-rw-r--r--packages/extra/winunits/jwaiprtrmib.pas2488
-rw-r--r--packages/extra/winunits/jwaiptypes.pas988
-rw-r--r--packages/extra/winunits/jwaisguids.pas164
-rw-r--r--packages/extra/winunits/jwaissper16.pas800
-rw-r--r--packages/extra/winunits/jwalmaccess.pas5640
-rw-r--r--packages/extra/winunits/jwalmalert.pas552
-rw-r--r--packages/extra/winunits/jwalmapibuf.pas320
-rw-r--r--packages/extra/winunits/jwalmat.pas450
-rw-r--r--packages/extra/winunits/jwalmaudit.pas1444
-rw-r--r--packages/extra/winunits/jwalmconfig.pas382
-rw-r--r--packages/extra/winunits/jwalmcons.pas726
-rw-r--r--packages/extra/winunits/jwalmdfs.pas1462
-rw-r--r--packages/extra/winunits/jwalmerr.pas1860
-rw-r--r--packages/extra/winunits/jwalmerrlog.pas4376
-rw-r--r--packages/extra/winunits/jwalmjoin.pas732
-rw-r--r--packages/extra/winunits/jwalmmsg.pas414
-rw-r--r--packages/extra/winunits/jwalmremutl.pas402
-rw-r--r--packages/extra/winunits/jwalmrepl.pas1128
-rw-r--r--packages/extra/winunits/jwalmserver.pas5208
-rw-r--r--packages/extra/winunits/jwalmshare.pas1596
-rw-r--r--packages/extra/winunits/jwalmsname.pas462
-rw-r--r--packages/extra/winunits/jwalmstats.pas496
-rw-r--r--packages/extra/winunits/jwalmsvc.pas1590
-rw-r--r--packages/extra/winunits/jwalmuse.pas572
-rw-r--r--packages/extra/winunits/jwalmuseflg.pas142
-rw-r--r--packages/extra/winunits/jwalmwksta.pas2150
-rw-r--r--packages/extra/winunits/jwaloadperf.pas764
-rw-r--r--packages/extra/winunits/jwalpmapi.pas3314
-rw-r--r--packages/extra/winunits/jwamciavi.pas300
-rw-r--r--packages/extra/winunits/jwamprerror.pas910
-rw-r--r--packages/extra/winunits/jwamsi.pas7294
-rw-r--r--packages/extra/winunits/jwamsidefs.pas2136
-rw-r--r--packages/extra/winunits/jwamsiquery.pas5912
-rw-r--r--packages/extra/winunits/jwamstask.pas816
-rw-r--r--packages/extra/winunits/jwamstcpip.pas218
-rw-r--r--packages/extra/winunits/jwamswsock.pas1292
-rw-r--r--packages/extra/winunits/jwanative.pas5986
-rw-r--r--packages/extra/winunits/jwanb30.pas1030
-rw-r--r--packages/extra/winunits/jwanetsh.pas1062
-rw-r--r--packages/extra/winunits/jwanspapi.pas2408
-rw-r--r--packages/extra/winunits/jwantddpar.pas436
-rw-r--r--packages/extra/winunits/jwantdsapi.pas10492
-rw-r--r--packages/extra/winunits/jwantdsbcli.pas2328
-rw-r--r--packages/extra/winunits/jwantdsbmsg.pas4026
-rw-r--r--packages/extra/winunits/jwantldap.pas790
-rw-r--r--packages/extra/winunits/jwantquery.pas1550
-rw-r--r--packages/extra/winunits/jwantsecapi.pas8214
-rw-r--r--packages/extra/winunits/jwantstatus.pas21182
-rw-r--r--packages/extra/winunits/jwapatchapi.pas1664
-rw-r--r--packages/extra/winunits/jwapatchwiz.pas868
-rw-r--r--packages/extra/winunits/jwapbt.pas196
-rw-r--r--packages/extra/winunits/jwapdh.pas6200
-rw-r--r--packages/extra/winunits/jwapdhmsg.pas2204
-rw-r--r--packages/extra/winunits/jwapowrprof.pas1184
-rw-r--r--packages/extra/winunits/jwaprofinfo.pas230
-rw-r--r--packages/extra/winunits/jwaprotocol.pas252
-rw-r--r--packages/extra/winunits/jwaprsht.pas2100
-rw-r--r--packages/extra/winunits/jwapsapi.pas1492
-rw-r--r--packages/extra/winunits/jwaqos.pas572
-rw-r--r--packages/extra/winunits/jwaqosname.pas214
-rw-r--r--packages/extra/winunits/jwaqospol.pas250
-rw-r--r--packages/extra/winunits/jwaqossp.pas2072
-rw-r--r--packages/extra/winunits/jwareason.pas472
-rw-r--r--packages/extra/winunits/jwaregstr.pas5098
-rw-r--r--packages/extra/winunits/jwarpc.pas130
-rw-r--r--packages/extra/winunits/jwarpcasync.pas1428
-rw-r--r--packages/extra/winunits/jwarpcdce.pas6848
-rw-r--r--packages/extra/winunits/jwarpcnsi.pas2934
-rw-r--r--packages/extra/winunits/jwarpcnterr.pas226
-rw-r--r--packages/extra/winunits/jwarpcssl.pas252
-rw-r--r--packages/extra/winunits/jwascesvc.pas672
-rw-r--r--packages/extra/winunits/jwaschedule.pas266
-rw-r--r--packages/extra/winunits/jwaschemadef.pas174
-rw-r--r--packages/extra/winunits/jwasddl.pas1074
-rw-r--r--packages/extra/winunits/jwasecext.pas650
-rw-r--r--packages/extra/winunits/jwasecurity.pas204
-rw-r--r--packages/extra/winunits/jwasens.pas190
-rw-r--r--packages/extra/winunits/jwasensapi.pas332
-rw-r--r--packages/extra/winunits/jwasensevts.pas336
-rw-r--r--packages/extra/winunits/jwasfc.pas336
-rw-r--r--packages/extra/winunits/jwashlguid.pas1842
-rw-r--r--packages/extra/winunits/jwasisbkup.pas506
-rw-r--r--packages/extra/winunits/jwasnmp.pas2362
-rw-r--r--packages/extra/winunits/jwasporder.pas228
-rw-r--r--packages/extra/winunits/jwasrrestoreptapi.pas600
-rw-r--r--packages/extra/winunits/jwasspi.pas6494
-rw-r--r--packages/extra/winunits/jwasubauth.pas1022
-rw-r--r--packages/extra/winunits/jwasvcguid.pas1472
-rw-r--r--packages/extra/winunits/jwatlhelp32.pas1180
-rw-r--r--packages/extra/winunits/jwatmschema.pas5062
-rw-r--r--packages/extra/winunits/jwatraffic.pas1794
-rw-r--r--packages/extra/winunits/jwauserenv.pas3732
-rw-r--r--packages/extra/winunits/jwauxtheme.pas3584
-rw-r--r--packages/extra/winunits/jwawbemcli.pas2610
-rw-r--r--packages/extra/winunits/jwawinable.pas1506
-rw-r--r--packages/extra/winunits/jwawinbase.pas39850
-rw-r--r--packages/extra/winunits/jwawinber.pas764
-rw-r--r--packages/extra/winunits/jwawincon.pas3984
-rw-r--r--packages/extra/winunits/jwawincpl.pas594
-rw-r--r--packages/extra/winunits/jwawincred.pas3140
-rw-r--r--packages/extra/winunits/jwawincrypt.pas39300
-rw-r--r--packages/extra/winunits/jwawindns.pas4960
-rw-r--r--packages/extra/winunits/jwawinefs.pas708
-rw-r--r--packages/extra/winunits/jwawinerror.pas60894
-rw-r--r--packages/extra/winunits/jwawinfax.pas3218
-rw-r--r--packages/extra/winunits/jwawingdi.pas27216
-rw-r--r--packages/extra/winunits/jwawinioctl.pas10012
-rw-r--r--packages/extra/winunits/jwawinldap.pas5528
-rw-r--r--packages/extra/winunits/jwawinnetwk.pas3758
-rw-r--r--packages/extra/winunits/jwawinnls.pas6444
-rw-r--r--packages/extra/winunits/jwawinnt.pas18612
-rw-r--r--packages/extra/winunits/jwawinperf.pas1766
-rw-r--r--packages/extra/winunits/jwawinreg.pas3476
-rw-r--r--packages/extra/winunits/jwawinresrc.pas148
-rw-r--r--packages/extra/winunits/jwawinsafer.pas1406
-rw-r--r--packages/extra/winunits/jwawinsock.pas4452
-rw-r--r--packages/extra/winunits/jwawinsock2.pas8982
-rw-r--r--packages/extra/winunits/jwawinsvc.pas3726
-rw-r--r--packages/extra/winunits/jwawintype.pas3628
-rw-r--r--packages/extra/winunits/jwawinuser.pas43790
-rw-r--r--packages/extra/winunits/jwawinver.pas1222
-rw-r--r--packages/extra/winunits/jwawinwlx.pas2796
-rw-r--r--packages/extra/winunits/jwawmistr.pas1208
-rw-r--r--packages/extra/winunits/jwawownt16.pas490
-rw-r--r--packages/extra/winunits/jwawownt32.pas1436
-rw-r--r--packages/extra/winunits/jwawpapi.pas1072
-rw-r--r--packages/extra/winunits/jwawpapimsg.pas788
-rw-r--r--packages/extra/winunits/jwawpcrsmsg.pas436
-rw-r--r--packages/extra/winunits/jwawpftpmsg.pas282
-rw-r--r--packages/extra/winunits/jwawppstmsg.pas304
-rw-r--r--packages/extra/winunits/jwawpspihlp.pas284
-rw-r--r--packages/extra/winunits/jwawptypes.pas318
-rw-r--r--packages/extra/winunits/jwawpwizmsg.pas458
-rw-r--r--packages/extra/winunits/jwaws2atm.pas1548
-rw-r--r--packages/extra/winunits/jwaws2bth.pas1210
-rw-r--r--packages/extra/winunits/jwaws2dnet.pas734
-rw-r--r--packages/extra/winunits/jwaws2spi.pas2190
-rw-r--r--packages/extra/winunits/jwaws2tcpip.pas1514
-rw-r--r--packages/extra/winunits/jwawshisotp.pas360
-rw-r--r--packages/extra/winunits/jwawsipx.pas238
-rw-r--r--packages/extra/winunits/jwawsnetbs.pas286
-rw-r--r--packages/extra/winunits/jwawsnwlink.pas690
-rw-r--r--packages/extra/winunits/jwawsrm.pas486
-rw-r--r--packages/extra/winunits/jwawsvns.pas202
-rw-r--r--packages/extra/winunits/jwawtsapi32.pas2610
-rw-r--r--packages/extra/winunits/jwazmouse.pas438
-rw-r--r--tests/test/units/system/testmac.txt43
-rw-r--r--tests/test/units/system/testpc.txt82
-rw-r--r--tests/webtbs/tw3973.pp294
222 files changed, 310113 insertions, 310072 deletions
diff --git a/compiler/ncgld.pas b/compiler/ncgld.pas
index ca64417218..3a36d2605a 100644
--- a/compiler/ncgld.pas
+++ b/compiler/ncgld.pas
@@ -1,963 +1,963 @@
-{
- $Id: ncgld.pas,v 1.140 2005/04/08 15:18:08 peter Exp $
- Copyright (c) 1998-2002 by Florian Klaempfl
-
- Generate assembler for nodes that handle loads and assignments which
- are the same for all (most) processors
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
- ****************************************************************************
-}
-unit ncgld;
-
-{$i fpcdefs.inc}
-
-interface
-
- uses
- node,nld;
-
- type
- tcgloadnode = class(tloadnode)
- procedure pass_2;override;
- procedure generate_picvaraccess;virtual;
- end;
-
- tcgassignmentnode = class(tassignmentnode)
- procedure pass_2;override;
- end;
-
- tcgarrayconstructornode = class(tarrayconstructornode)
- procedure pass_2;override;
- end;
-
- tcgrttinode = class(trttinode)
- procedure pass_2;override;
- end;
-
-
-implementation
-
- uses
- cutils,
- systems,
- verbose,globtype,globals,
- symconst,symtype,symdef,symsym,defutil,paramgr,
- ncnv,ncon,nmem,nbas,
- aasmbase,aasmtai,aasmcpu,
- cgbase,pass_2,
- procinfo,
- cpubase,parabase,
- tgobj,ncgutil,
- cgutils,cgobj,
- ncgbas;
-
-{*****************************************************************************
- SecondLoad
-*****************************************************************************}
-
- procedure tcgloadnode.generate_picvaraccess;
- begin
-{$ifndef sparc}
- location.reference.base:=current_procinfo.got;
- location.reference.symbol:=objectlibrary.newasmsymbol(tglobalvarsym(symtableentry).mangledname+'@GOT',AB_EXTERNAL,AT_DATA);
-{$endif sparc}
- end;
-
-
- procedure tcgloadnode.pass_2;
- var
- hregister : tregister;
- symtabletype : tsymtabletype;
- href : treference;
- newsize : tcgsize;
- endrelocatelab,
- norelocatelab : tasmlabel;
- paraloc1 : tcgpara;
- begin
- { we don't know the size of all arrays }
- newsize:=def_cgsize(resulttype.def);
- location_reset(location,LOC_REFERENCE,newsize);
- case symtableentry.typ of
- absolutevarsym :
- begin
- { this is only for toasm and toaddr }
- case tabsolutevarsym(symtableentry).abstyp of
- toaddr :
- begin
-{$ifdef i386}
- if tabsolutevarsym(symtableentry).absseg then
- location.reference.segment:=NR_FS;
-{$endif i386}
- location.reference.offset:=tabsolutevarsym(symtableentry).addroffset;
- end;
- toasm :
- location.reference.symbol:=objectlibrary.newasmsymbol(tabsolutevarsym(symtableentry).mangledname,AB_EXTERNAL,AT_DATA);
- else
- internalerror(200310283);
- end;
- end;
- constsym:
- begin
- if tconstsym(symtableentry).consttyp=constresourcestring then
- begin
- location_reset(location,LOC_CREFERENCE,OS_ADDR);
- location.reference.symbol:=objectlibrary.newasmsymbol(make_mangledname('RESOURCESTRINGLIST',tconstsym(symtableentry).owner,''),AB_EXTERNAL,AT_DATA);
- location.reference.offset:=tconstsym(symtableentry).resstrindex*(4+sizeof(aint)*3)+4+sizeof(aint);
- end
- else
- internalerror(22798);
- end;
- globalvarsym,
- localvarsym,
- paravarsym :
- begin
- symtabletype:=symtable.symtabletype;
- hregister:=NR_NO;
- { DLL variable }
- if (vo_is_dll_var in tabstractvarsym(symtableentry).varoptions) then
- begin
- if target_info.system=system_powerpc_darwin then
- begin
- generate_picvaraccess;
- if not(pi_needs_got in current_procinfo.flags) then
- internalerror(200403022);
- end
- else
- begin
- hregister:=cg.getaddressregister(exprasmlist);
- location.reference.symbol:=objectlibrary.newasmsymbol(tglobalvarsym(symtableentry).mangledname,AB_EXTERNAL,AT_DATA);
- cg.a_load_ref_reg(exprasmlist,OS_ADDR,OS_ADDR,location.reference,hregister);
- reference_reset_base(location.reference,hregister,0);
- end;
- end
- { Thread variable }
- else if (vo_is_thread_var in tabstractvarsym(symtableentry).varoptions) then
- begin
- {
- Thread var loading is optimized to first check if
- a relocate function is available. When the function
- is available it is called to retrieve the address.
- Otherwise the address is loaded with the symbol
-
- The code needs to be in the order to first handle the
- call and then the address load to be sure that the
- register that is used for returning is the same (PFV)
- }
- objectlibrary.getlabel(norelocatelab);
- objectlibrary.getlabel(endrelocatelab);
- { make sure hregister can't allocate the register necessary for the parameter }
- paraloc1.init;
- paramanager.getintparaloc(pocall_default,1,paraloc1);
- hregister:=cg.getaddressregister(exprasmlist);
- reference_reset_symbol(href,objectlibrary.newasmsymbol('FPC_THREADVAR_RELOCATE',AB_EXTERNAL,AT_DATA),0);
- cg.a_load_ref_reg(exprasmlist,OS_ADDR,OS_ADDR,href,hregister);
- cg.a_cmp_const_reg_label(exprasmlist,OS_ADDR,OC_EQ,0,hregister,norelocatelab);
- { don't save the allocated register else the result will be destroyed later }
- reference_reset_symbol(href,objectlibrary.newasmsymbol(tglobalvarsym(symtableentry).mangledname,AB_EXTERNAL,AT_DATA),0);
- paramanager.allocparaloc(exprasmlist,paraloc1);
- cg.a_param_ref(exprasmlist,OS_ADDR,href,paraloc1);
- paramanager.freeparaloc(exprasmlist,paraloc1);
- paraloc1.done;
- cg.alloccpuregisters(exprasmlist,R_INTREGISTER,paramanager.get_volatile_registers_int(pocall_default));
- cg.a_call_reg(exprasmlist,hregister);
- cg.dealloccpuregisters(exprasmlist,R_INTREGISTER,paramanager.get_volatile_registers_int(pocall_default));
- cg.getcpuregister(exprasmlist,NR_FUNCTION_RESULT_REG);
- cg.ungetcpuregister(exprasmlist,NR_FUNCTION_RESULT_REG);
- hregister:=cg.getaddressregister(exprasmlist);
- cg.a_load_reg_reg(exprasmlist,OS_INT,OS_ADDR,NR_FUNCTION_RESULT_REG,hregister);
- cg.a_jmp_always(exprasmlist,endrelocatelab);
- cg.a_label(exprasmlist,norelocatelab);
- { no relocation needed, load the address of the variable only, the
- layout of a threadvar is (4 bytes pointer):
- 0 - Threadvar index
- 4 - Threadvar value in single threading }
- reference_reset_symbol(href,objectlibrary.newasmsymbol(tglobalvarsym(symtableentry).mangledname,AB_EXTERNAL,AT_DATA),sizeof(aint));
- cg.a_loadaddr_ref_reg(exprasmlist,href,hregister);
- cg.a_label(exprasmlist,endrelocatelab);
- location.reference.base:=hregister;
- end
- { Nested variable }
- else if assigned(left) then
- begin
- if not(symtabletype in [localsymtable,parasymtable]) then
- internalerror(200309285);
- secondpass(left);
- if left.location.loc<>LOC_REGISTER then
- internalerror(200309286);
- if tabstractnormalvarsym(symtableentry).localloc.loc<>LOC_REFERENCE then
- internalerror(200409241);
- hregister:=left.location.register;
- reference_reset_base(location.reference,hregister,tabstractnormalvarsym(symtableentry).localloc.reference.offset);
- end
- { Normal (or external) variable }
- else
- begin
-{$ifdef OLDREGVARS}
- { in case it is a register variable: }
- if tvarsym(symtableentry).localloc.loc in [LOC_REGISTER,LOC_FPUREGISTER] then
- begin
- case getregtype(tvarsym(symtableentry).localloc.register) of
- R_FPUREGISTER :
- begin
- location_reset(location,LOC_CFPUREGISTER,def_cgsize(resulttype.def));
- location.register:=tvarsym(symtableentry).localloc.register;
- end;
- R_INTREGISTER :
- begin
- location_reset(location,LOC_CREGISTER,def_cgsize(resulttype.def));
- location.register:=tvarsym(symtableentry).localloc.register;
- hregister := location.register;
- end;
- else
- internalerror(200301172);
- end;
- end
- else
-{$endif OLDREGVARS}
- begin
- case symtabletype of
- stt_exceptsymtable,
- localsymtable,
- parasymtable :
- location:=tabstractnormalvarsym(symtableentry).localloc;
- globalsymtable,
- staticsymtable :
- begin
- if (target_info.system=system_powerpc_darwin) and
- (cs_create_pic in aktmoduleswitches) then
- begin
- generate_picvaraccess;
- if not(pi_needs_got in current_procinfo.flags) then
- internalerror(200403023);
- end
- else
- begin
- if tabstractnormalvarsym(symtableentry).localloc.loc=LOC_INVALID then
- reference_reset_symbol(location.reference,objectlibrary.newasmsymbol(tglobalvarsym(symtableentry).mangledname,AB_EXTERNAL,AT_DATA),0)
- else
- location:=tglobalvarsym(symtableentry).localloc;
- end;
- end;
- else
- internalerror(200305102);
- end;
- end;
- end;
-
- { handle call by reference variables when they are not
- alreayd copied to local copies. Also ignore the reference
- when we need to load the self pointer for objects }
- if is_addr_param_load then
- begin
- if (location.loc in [LOC_CREGISTER,LOC_REGISTER]) then
- hregister:=location.register
- else
- begin
- hregister:=cg.getaddressregister(exprasmlist);
- { we need to load only an address }
- location.size:=OS_ADDR;
- cg.a_load_loc_reg(exprasmlist,location.size,location,hregister);
- end;
- location_reset(location,LOC_REFERENCE,newsize);
- location.reference.base:=hregister;
- end;
-
- { make const a LOC_CREFERENCE }
- if (tabstractvarsym(symtableentry).varspez=vs_const) and
- (location.loc=LOC_REFERENCE) then
- location.loc:=LOC_CREFERENCE;
- end;
- procsym:
- begin
- if not assigned(procdef) then
- internalerror(200312011);
- if assigned(left) then
- begin
- {
- THIS IS A TERRIBLE HACK!!!!!! WHICH WILL NOT WORK
- ON 64-BIT SYSTEMS: SINCE PROCSYM FOR METHODS
- CONSISTS OF TWO OS_ADDR, so you cannot set it
- to OS_64 - how to solve?? Carl
- Solved. Florian
- }
- if (sizeof(aint) = 4) then
- location_reset(location,LOC_CREFERENCE,OS_64)
- else if (sizeof(aint) = 8) then
- location_reset(location,LOC_CREFERENCE,OS_128)
- else
- internalerror(20020520);
- tg.GetTemp(exprasmlist,2*sizeof(aint),tt_normal,location.reference);
- secondpass(left);
-
- { load class instance address }
- case left.location.loc of
- LOC_CREGISTER,
- LOC_REGISTER:
- begin
- { this is not possible for objects }
- if is_object(left.resulttype.def) then
- internalerror(200304234);
- hregister:=left.location.register;
- end;
- LOC_CREFERENCE,
- LOC_REFERENCE:
- begin
- hregister:=cg.getaddressregister(exprasmlist);
- if is_class_or_interface(left.resulttype.def) then
- cg.a_load_ref_reg(exprasmlist,OS_ADDR,OS_ADDR,left.location.reference,hregister)
- else
- cg.a_loadaddr_ref_reg(exprasmlist,left.location.reference,hregister);
- location_freetemp(exprasmlist,left.location);
- end;
- else
- internalerror(26019);
- end;
-
- { store the class instance address }
- href:=location.reference;
- inc(href.offset,sizeof(aint));
- cg.a_load_reg_ref(exprasmlist,OS_ADDR,OS_ADDR,hregister,href);
-
- { virtual method ? }
- if (po_virtualmethod in procdef.procoptions) then
- begin
- { load vmt pointer }
- reference_reset_base(href,hregister,0);
- hregister:=cg.getaddressregister(exprasmlist);
- cg.a_load_ref_reg(exprasmlist,OS_ADDR,OS_ADDR,href,hregister);
- { load method address }
- reference_reset_base(href,hregister,procdef._class.vmtmethodoffset(procdef.extnumber));
- hregister:=cg.getaddressregister(exprasmlist);
- cg.a_load_ref_reg(exprasmlist,OS_ADDR,OS_ADDR,href,hregister);
- { ... and store it }
- cg.a_load_reg_ref(exprasmlist,OS_ADDR,OS_ADDR,hregister,location.reference);
- end
- else
- begin
- { load address of the function }
- reference_reset_symbol(href,objectlibrary.newasmsymbol(procdef.mangledname,AB_EXTERNAL,AT_FUNCTION),0);
- hregister:=cg.getaddressregister(exprasmlist);
- cg.a_loadaddr_ref_reg(exprasmlist,href,hregister);
- cg.a_load_reg_ref(exprasmlist,OS_ADDR,OS_ADDR,hregister,location.reference);
- end;
- end
- else
- begin
- {!!!!! Be aware, work on virtual methods too }
- location.reference.symbol:=objectlibrary.newasmsymbol(procdef.mangledname,AB_EXTERNAL,AT_FUNCTION);
- end;
- end;
- typedconstsym :
- begin
- location.reference.symbol:=objectlibrary.newasmsymbol(ttypedconstsym(symtableentry).mangledname,AB_EXTERNAL,AT_DATA);
- end;
- labelsym :
- begin
- location.reference.symbol:=objectlibrary.newasmsymbol(tlabelsym(symtableentry).mangledname,AB_EXTERNAL,AT_FUNCTION);
- end;
- else internalerror(4);
- end;
- end;
-
-
-{*****************************************************************************
- SecondAssignment
-*****************************************************************************}
-
- procedure tcgassignmentnode.pass_2;
- var
- otlabel,hlabel,oflabel : tasmlabel;
- fputyp : tfloattype;
- href : treference;
- releaseright : boolean;
- len : aint;
- r:Tregister;
-
- begin
- location_reset(location,LOC_VOID,OS_NO);
-
- otlabel:=truelabel;
- oflabel:=falselabel;
- objectlibrary.getlabel(truelabel);
- objectlibrary.getlabel(falselabel);
-
- {
- in most cases we can process first the right node which contains
- the most complex code. Exceptions for this are:
- - result is in flags, loading left will then destroy the flags
- - result is a jump, loading left must be already done before the jump is made
- - result need reference count, when left points to a value used in
- right then decreasing the refcnt on left can possibly release
- the memory before right increased the refcnt, result is that an
- empty value is assigned
- - calln, call destroys most registers and is therefor 'complex'
-
- But not when the result is in the flags, then
- loading the left node afterwards can destroy the flags.
- }
- if not(right.expectloc in [LOC_FLAGS,LOC_JUMP]) and
- ((right.nodetype=calln) or
- (right.resulttype.def.needs_inittable) or
- (right.registersint>=left.registersint)) then
- begin
- secondpass(right);
- { increment source reference counter, this is
- useless for string constants}
- if (right.resulttype.def.needs_inittable) and
- (right.nodetype<>stringconstn) then
- begin
- location_force_mem(exprasmlist,right.location);
- location_get_data_ref(exprasmlist,right.location,href,false);
- cg.g_incrrefcount(exprasmlist,right.resulttype.def,href);
- end;
- if codegenerror then
- exit;
-
- if not(nf_concat_string in flags) then
- begin
- { left can't be never a 64 bit LOC_REGISTER, so the 3. arg }
- { can be false }
- secondpass(left);
- { decrement destination reference counter }
- if (left.resulttype.def.needs_inittable) then
- begin
- location_get_data_ref(exprasmlist,left.location,href,false);
- cg.g_decrrefcount(exprasmlist,left.resulttype.def,href);
- end;
- if codegenerror then
- exit;
- end;
- end
- else
- begin
- { calculate left sides }
- { don't do it yet if it's a crgister (JM) }
- if not(nf_concat_string in flags) then
- begin
- secondpass(left);
- { decrement destination reference counter }
- if (left.resulttype.def.needs_inittable) then
- begin
- location_get_data_ref(exprasmlist,left.location,href,false);
- cg.g_decrrefcount(exprasmlist,left.resulttype.def,href);
- end;
- if codegenerror then
- exit;
- end;
-
- { left can't be never a 64 bit LOC_REGISTER, so the 3. arg }
- { can be false }
- secondpass(right);
- { increment source reference counter, this is
- useless for string constants}
- if (right.resulttype.def.needs_inittable) and
- (right.nodetype<>stringconstn) then
- begin
- location_force_mem(exprasmlist,right.location);
- location_get_data_ref(exprasmlist,right.location,href,false);
- cg.g_incrrefcount(exprasmlist,right.resulttype.def,href);
- end;
-
- if codegenerror then
- exit;
- end;
-
- releaseright:=true;
-
- { optimize temp to temp copies }
-(* if (left.nodetype = temprefn) and
- { we may store certain temps in registers in the future, then this }
- { optimization will have to be adapted }
- (left.location.loc = LOC_REFERENCE) and
- (right.location.loc = LOC_REFERENCE) and
- tg.istemp(right.location.reference) and
- (tg.sizeoftemp(exprasmlist,right.location.reference) = tg.sizeoftemp(exprasmlist,left.location.reference)) then
- begin
- { in theory, we should also make sure the left temp type is }
- { already more or less of the same kind (ie. we must not }
- { assign an ansistring to a normaltemp). In practice, the }
- { assignment node will have already taken care of this for us }
- tcgtemprefnode(left).changelocation(right.location.reference);
- end
- { shortstring assignments are handled separately }
- else *)
- if is_shortstring(left.resulttype.def) then
- begin
- {
- we can get here only in the following situations
- for the right node:
- - empty constant string
- - char
- }
-
- { empty constant string }
- if (right.nodetype=stringconstn) and
- (tstringconstnode(right).len=0) then
- begin
- cg.a_load_const_ref(exprasmlist,OS_8,0,left.location.reference);
- end
- { char loading }
- else if is_char(right.resulttype.def) then
- begin
- if right.nodetype=ordconstn then
- begin
- if (target_info.endian = endian_little) then
- cg.a_load_const_ref(exprasmlist,OS_16,(tordconstnode(right).value shl 8) or 1,
- left.location.reference)
- else
- cg.a_load_const_ref(exprasmlist,OS_16,tordconstnode(right).value or (1 shl 8),
- left.location.reference);
- end
- else
- begin
- href:=left.location.reference;
- cg.a_load_const_ref(exprasmlist,OS_8,1,href);
- inc(href.offset,1);
- case right.location.loc of
- LOC_REGISTER,
- LOC_CREGISTER :
- begin
- r:=cg.makeregsize(exprasmlist,right.location.register,OS_8);
- cg.a_load_reg_ref(exprasmlist,OS_8,OS_8,r,href);
- end;
- LOC_REFERENCE,
- LOC_CREFERENCE :
- cg.a_load_ref_ref(exprasmlist,OS_8,OS_8,right.location.reference,href);
- else
- internalerror(200205111);
- end;
- end;
- end
- else
- internalerror(200204249);
- end
- else
- begin
- case right.location.loc of
- LOC_CONSTANT :
- begin
-{$ifndef cpu64bit}
- if right.location.size in [OS_64,OS_S64] then
- cg64.a_load64_const_loc(exprasmlist,right.location.value64,left.location)
- else
-{$endif cpu64bit}
- cg.a_load_const_loc(exprasmlist,right.location.value,left.location);
- end;
- LOC_REFERENCE,
- LOC_CREFERENCE :
- begin
- case left.location.loc of
- LOC_REGISTER,
- LOC_CREGISTER :
- begin
-{$ifndef cpu64bit}
- if left.location.size in [OS_64,OS_S64] then
- cg64.a_load64_ref_reg(exprasmlist,right.location.reference,left.location.register64)
- else
-{$endif cpu64bit}
- cg.a_load_ref_reg(exprasmlist,right.location.size,left.location.size,right.location.reference,left.location.register);
- end;
- LOC_FPUREGISTER,
- LOC_CFPUREGISTER :
- begin
- cg.a_loadfpu_ref_reg(exprasmlist,
- right.location.size,
- right.location.reference,
- left.location.register);
- end;
- LOC_REFERENCE,
- LOC_CREFERENCE :
- begin
-{$warning HACK: unaligned test, maybe remove all unaligned locations (array of char) from the compiler}
- { Use unaligned copy when the offset is not aligned }
- len:=left.resulttype.def.size;
- if (right.location.reference.offset mod sizeof(aint)<>0) or
- (left.location.reference.offset mod sizeof(aint)<>0) or
- (right.resulttype.def.alignment<sizeof(aint)) then
- cg.g_concatcopy_unaligned(exprasmlist,right.location.reference,left.location.reference,len)
- else
- cg.g_concatcopy(exprasmlist,right.location.reference,left.location.reference,len);
- end;
- else
- internalerror(200203284);
- end;
- end;
-{$ifdef SUPPORT_MMX}
- LOC_CMMXREGISTER,
- LOC_MMXREGISTER:
- begin
- if left.location.loc=LOC_CMMXREGISTER then
- cg.a_loadmm_reg_reg(exprasmlist,right.location.register,left.location.register)
- else
- cg.a_loadmm_reg_ref(exprasmlist,right.location.register,left.location.reference);
- end;
-{$endif SUPPORT_MMX}
- LOC_MMREGISTER,
- LOC_CMMREGISTER:
- begin
- if left.resulttype.def.deftype=arraydef then
- begin
- end
- else
- begin
- if left.location.loc=LOC_CMMREGISTER then
- cg.a_loadmm_reg_reg(exprasmlist,right.location.size,left.location.size,right.location.register,left.location.register,mms_movescalar)
- else
- cg.a_loadmm_reg_ref(exprasmlist,right.location.size,left.location.size,right.location.register,left.location.reference,mms_movescalar);
- end;
- end;
- LOC_REGISTER,
- LOC_CREGISTER :
- begin
-{$ifndef cpu64bit}
- if left.location.size in [OS_64,OS_S64] then
- cg64.a_load64_reg_loc(exprasmlist,
- right.location.register64,left.location)
- else
-{$endif cpu64bit}
- cg.a_load_reg_loc(exprasmlist,right.location.size,right.location.register,left.location);
- end;
- LOC_FPUREGISTER,
- LOC_CFPUREGISTER :
- begin
- if (left.resulttype.def.deftype=floatdef) then
- fputyp:=tfloatdef(left.resulttype.def).typ
- else
- if (right.resulttype.def.deftype=floatdef) then
- fputyp:=tfloatdef(right.resulttype.def).typ
- else
- if (right.nodetype=typeconvn) and
- (ttypeconvnode(right).left.resulttype.def.deftype=floatdef) then
- fputyp:=tfloatdef(ttypeconvnode(right).left.resulttype.def).typ
- else
- fputyp:=s32real;
- cg.a_loadfpu_reg_loc(exprasmlist,
- tfloat2tcgsize[fputyp],
- right.location.register,left.location);
- end;
- LOC_JUMP :
- begin
- objectlibrary.getlabel(hlabel);
- cg.a_label(exprasmlist,truelabel);
- cg.a_load_const_loc(exprasmlist,1,left.location);
- cg.a_jmp_always(exprasmlist,hlabel);
- cg.a_label(exprasmlist,falselabel);
- cg.a_load_const_loc(exprasmlist,0,left.location);
- cg.a_label(exprasmlist,hlabel);
- end;
-{$ifdef cpuflags}
- LOC_FLAGS :
- begin
- {This can be a wordbool or longbool too, no?}
- if left.location.loc in [LOC_REGISTER,LOC_CREGISTER] then
- cg.g_flags2reg(exprasmlist,def_cgsize(left.resulttype.def),right.location.resflags,left.location.register)
- else
- begin
- if not(left.location.loc = LOC_REFERENCE) then
- internalerror(200203273);
- cg.g_flags2ref(exprasmlist,def_cgsize(left.resulttype.def),right.location.resflags,left.location.reference);
- end;
- end;
-{$endif cpuflags}
- end;
- end;
-
- if releaseright then
- location_freetemp(exprasmlist,right.location);
-
- truelabel:=otlabel;
- falselabel:=oflabel;
- end;
-
-
-{*****************************************************************************
- SecondArrayConstruct
-*****************************************************************************}
-
- const
- vtInteger = 0;
- vtBoolean = 1;
- vtChar = 2;
- vtExtended = 3;
- vtString = 4;
- vtPointer = 5;
- vtPChar = 6;
- vtObject = 7;
- vtClass = 8;
- vtWideChar = 9;
- vtPWideChar = 10;
- vtAnsiString32 = 11;
- vtCurrency = 12;
- vtVariant = 13;
- vtInterface = 14;
- vtWideString = 15;
- vtInt64 = 16;
- vtQWord = 17;
- vtAnsiString16 = 18;
- vtAnsiString64 = 19;
-
- procedure tcgarrayconstructornode.pass_2;
- var
- hp : tarrayconstructornode;
- href : treference;
- lt : tdef;
- vaddr : boolean;
- vtype : longint;
- freetemp,
- dovariant : boolean;
- elesize : longint;
- tmpreg : tregister;
- paraloc : tcgparalocation;
- begin
- dovariant:=(nf_forcevaria in flags) or tarraydef(resulttype.def).isvariant;
- if dovariant then
- elesize:=sizeof(aint)+sizeof(aint)
- else
- elesize:=tarraydef(resulttype.def).elesize;
- location_reset(location,LOC_CREFERENCE,OS_NO);
- fillchar(paraloc,sizeof(paraloc),0);
- { Allocate always a temp, also if no elements are required, to
- be sure that location is valid (PFV) }
- if tarraydef(resulttype.def).highrange=-1 then
- tg.GetTemp(exprasmlist,elesize,tt_normal,location.reference)
- else
- tg.GetTemp(exprasmlist,(tarraydef(resulttype.def).highrange+1)*elesize,tt_normal,location.reference);
- href:=location.reference;
- { Process nodes in array constructor }
- hp:=self;
- while assigned(hp) do
- begin
- if assigned(hp.left) then
- begin
- freetemp:=true;
- secondpass(hp.left);
- if codegenerror then
- exit;
- { Move flags and jump in register }
- if hp.left.location.loc in [LOC_FLAGS,LOC_JUMP] then
- location_force_reg(exprasmlist,hp.left.location,def_cgsize(hp.left.resulttype.def),false);
- if dovariant then
- begin
- { find the correct vtype value }
- vtype:=$ff;
- vaddr:=false;
- lt:=hp.left.resulttype.def;
- case lt.deftype of
- enumdef,
- orddef :
- begin
- if is_64bit(lt) then
- begin
- case torddef(lt).typ of
- s64bit:
- vtype:=vtInt64;
- u64bit:
- vtype:=vtQWord;
- end;
- freetemp:=false;
- vaddr:=true;
- end
- else if (lt.deftype=enumdef) or
- is_integer(lt) then
- vtype:=vtInteger
- else
- if is_boolean(lt) then
- vtype:=vtBoolean
- else
- if (lt.deftype=orddef) then
- begin
- case torddef(lt).typ of
- uchar:
- vtype:=vtChar;
- uwidechar:
- vtype:=vtWideChar;
- end;
- end;
- end;
- floatdef :
- begin
- if is_currency(lt) then
- vtype:=vtCurrency
- else
- vtype:=vtExtended;
- freetemp:=false;
- vaddr:=true;
- end;
- procvardef,
- pointerdef :
- begin
- if is_pchar(lt) then
- vtype:=vtPChar
- else if is_pwidechar(lt) then
- vtype:=vtPWideChar
- else
- vtype:=vtPointer;
- end;
- variantdef :
- begin
- vtype:=vtVariant;
- vaddr:=true;
- freetemp:=false;
- end;
- classrefdef :
- vtype:=vtClass;
- objectdef :
- if is_interface(lt) then
- vtype:=vtInterface
- else if is_class(lt) then
- vtype:=vtClass
- else if is_object(lt) then
- vtype:=vtObject
- else
- internalerror(200505171);
- stringdef :
- begin
- if is_shortstring(lt) then
- begin
- vtype:=vtString;
- vaddr:=true;
- freetemp:=false;
- end
- else
- if is_ansistring(lt) then
- {$ifdef ansistring_bits}
- begin
- case Tstringdef(lt).string_typ of
- st_ansistring16:
- vtype:=vtAnsiString16;
- st_ansistring32:
- vtype:=vtAnsiString32;
- st_ansistring64:
- vtype:=vtAnsiString64;
- end;
- freetemp:=false;
- end
- {$else}
- begin
- vtype:=vtAnsiString;
- freetemp:=false;
- end
- {$endif}
- else
- if is_widestring(lt) then
- begin
- vtype:=vtWideString;
- freetemp:=false;
- end;
- end;
- end;
- if vtype=$ff then
- internalerror(14357);
- { write changing field update href to the next element }
- inc(href.offset,sizeof(aint));
- if vaddr then
- begin
- location_force_mem(exprasmlist,hp.left.location);
- tmpreg:=cg.getaddressregister(exprasmlist);
- cg.a_loadaddr_ref_reg(exprasmlist,hp.left.location.reference,tmpreg);
- cg.a_load_reg_ref(exprasmlist,OS_ADDR,OS_ADDR,tmpreg,href);
- end
- else
- cg.a_load_loc_ref(exprasmlist,OS_ADDR,hp.left.location,href);
- { update href to the vtype field and write it }
- dec(href.offset,sizeof(aint));
- cg.a_load_const_ref(exprasmlist, OS_INT,vtype,href);
- { goto next array element }
- inc(href.offset,sizeof(aint)*2);
- end
- else
- { normal array constructor of the same type }
- begin
- if (is_ansistring(left.resulttype.def) or
- is_widestring(left.resulttype.def) or
- (left.resulttype.def.deftype=variantdef)) then
- freetemp:=false;
- case hp.left.location.loc of
- LOC_FPUREGISTER,
- LOC_CFPUREGISTER :
- cg.a_loadfpu_reg_ref(exprasmlist,hp.left.location.size,hp.left.location.register,href);
- LOC_REFERENCE,
- LOC_CREFERENCE :
- begin
- if is_shortstring(hp.left.resulttype.def) then
- cg.g_copyshortstring(exprasmlist,hp.left.location.reference,href,
- Tstringdef(hp.left.resulttype.def).len)
- else
- cg.g_concatcopy(exprasmlist,hp.left.location.reference,href,elesize);
- end;
- else
- begin
-{$ifndef cpu64bit}
- if hp.left.location.size in [OS_64,OS_S64] then
- cg64.a_load64_loc_ref(exprasmlist,hp.left.location,href)
- else
-{$endif cpu64bit}
- cg.a_load_loc_ref(exprasmlist,hp.left.location.size,hp.left.location,href);
- end;
- end;
- inc(href.offset,elesize);
- end;
- if freetemp then
- location_freetemp(exprasmlist,hp.left.location);
- end;
- { load next entry }
- hp:=tarrayconstructornode(hp.right);
- end;
- end;
-
-
-{*****************************************************************************
- SecondRTTI
-*****************************************************************************}
-
- procedure tcgrttinode.pass_2;
- begin
- location_reset(location,LOC_CREFERENCE,OS_NO);
- location.reference.symbol:=rttidef.get_rtti_label(rttitype);
- end;
-
-
-
-begin
- cloadnode:=tcgloadnode;
- cassignmentnode:=tcgassignmentnode;
- carrayconstructornode:=tcgarrayconstructornode;
- crttinode:=tcgrttinode;
-end.
-{
- $Log: ncgld.pas,v $
- Revision 1.140 2005/04/08 15:18:08 peter
- remove multiple pass2 calls. It is not supported anymore by all nodes (ttempcreatenode)
-
- Revision 1.139 2005/02/14 17:13:06 peter
- * truncate log
-
- Revision 1.138 2005/02/13 19:57:15 florian
- * better alignment checking
-
- Revision 1.137 2005/02/10 21:54:36 peter
- * data with inittables need to have a memory location assigned
- for incrref
-
- Revision 1.136 2005/01/23 17:14:21 florian
- + optimized code generation on sparc
- + some stuff for pic code on sparc added
-
- Revision 1.135 2005/01/04 16:37:09 peter
- * don't release temps for array of ansistring
-
-}
+{
+ $Id: ncgld.pas,v 1.140 2005/04/08 15:18:08 peter Exp $
+ Copyright (c) 1998-2002 by Florian Klaempfl
+
+ Generate assembler for nodes that handle loads and assignments which
+ are the same for all (most) processors
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ ****************************************************************************
+}
+unit ncgld;
+
+{$i fpcdefs.inc}
+
+interface
+
+ uses
+ node,nld;
+
+ type
+ tcgloadnode = class(tloadnode)
+ procedure pass_2;override;
+ procedure generate_picvaraccess;virtual;
+ end;
+
+ tcgassignmentnode = class(tassignmentnode)
+ procedure pass_2;override;
+ end;
+
+ tcgarrayconstructornode = class(tarrayconstructornode)
+ procedure pass_2;override;
+ end;
+
+ tcgrttinode = class(trttinode)
+ procedure pass_2;override;
+ end;
+
+
+implementation
+
+ uses
+ cutils,
+ systems,
+ verbose,globtype,globals,
+ symconst,symtype,symdef,symsym,defutil,paramgr,
+ ncnv,ncon,nmem,nbas,
+ aasmbase,aasmtai,aasmcpu,
+ cgbase,pass_2,
+ procinfo,
+ cpubase,parabase,
+ tgobj,ncgutil,
+ cgutils,cgobj,
+ ncgbas;
+
+{*****************************************************************************
+ SecondLoad
+*****************************************************************************}
+
+ procedure tcgloadnode.generate_picvaraccess;
+ begin
+{$ifndef sparc}
+ location.reference.base:=current_procinfo.got;
+ location.reference.symbol:=objectlibrary.newasmsymbol(tglobalvarsym(symtableentry).mangledname+'@GOT',AB_EXTERNAL,AT_DATA);
+{$endif sparc}
+ end;
+
+
+ procedure tcgloadnode.pass_2;
+ var
+ hregister : tregister;
+ symtabletype : tsymtabletype;
+ href : treference;
+ newsize : tcgsize;
+ endrelocatelab,
+ norelocatelab : tasmlabel;
+ paraloc1 : tcgpara;
+ begin
+ { we don't know the size of all arrays }
+ newsize:=def_cgsize(resulttype.def);
+ location_reset(location,LOC_REFERENCE,newsize);
+ case symtableentry.typ of
+ absolutevarsym :
+ begin
+ { this is only for toasm and toaddr }
+ case tabsolutevarsym(symtableentry).abstyp of
+ toaddr :
+ begin
+{$ifdef i386}
+ if tabsolutevarsym(symtableentry).absseg then
+ location.reference.segment:=NR_FS;
+{$endif i386}
+ location.reference.offset:=tabsolutevarsym(symtableentry).addroffset;
+ end;
+ toasm :
+ location.reference.symbol:=objectlibrary.newasmsymbol(tabsolutevarsym(symtableentry).mangledname,AB_EXTERNAL,AT_DATA);
+ else
+ internalerror(200310283);
+ end;
+ end;
+ constsym:
+ begin
+ if tconstsym(symtableentry).consttyp=constresourcestring then
+ begin
+ location_reset(location,LOC_CREFERENCE,OS_ADDR);
+ location.reference.symbol:=objectlibrary.newasmsymbol(make_mangledname('RESOURCESTRINGLIST',tconstsym(symtableentry).owner,''),AB_EXTERNAL,AT_DATA);
+ location.reference.offset:=tconstsym(symtableentry).resstrindex*(4+sizeof(aint)*3)+4+sizeof(aint);
+ end
+ else
+ internalerror(22798);
+ end;
+ globalvarsym,
+ localvarsym,
+ paravarsym :
+ begin
+ symtabletype:=symtable.symtabletype;
+ hregister:=NR_NO;
+ { DLL variable }
+ if (vo_is_dll_var in tabstractvarsym(symtableentry).varoptions) then
+ begin
+ if target_info.system=system_powerpc_darwin then
+ begin
+ generate_picvaraccess;
+ if not(pi_needs_got in current_procinfo.flags) then
+ internalerror(200403022);
+ end
+ else
+ begin
+ hregister:=cg.getaddressregister(exprasmlist);
+ location.reference.symbol:=objectlibrary.newasmsymbol(tglobalvarsym(symtableentry).mangledname,AB_EXTERNAL,AT_DATA);
+ cg.a_load_ref_reg(exprasmlist,OS_ADDR,OS_ADDR,location.reference,hregister);
+ reference_reset_base(location.reference,hregister,0);
+ end;
+ end
+ { Thread variable }
+ else if (vo_is_thread_var in tabstractvarsym(symtableentry).varoptions) then
+ begin
+ {
+ Thread var loading is optimized to first check if
+ a relocate function is available. When the function
+ is available it is called to retrieve the address.
+ Otherwise the address is loaded with the symbol
+
+ The code needs to be in the order to first handle the
+ call and then the address load to be sure that the
+ register that is used for returning is the same (PFV)
+ }
+ objectlibrary.getlabel(norelocatelab);
+ objectlibrary.getlabel(endrelocatelab);
+ { make sure hregister can't allocate the register necessary for the parameter }
+ paraloc1.init;
+ paramanager.getintparaloc(pocall_default,1,paraloc1);
+ hregister:=cg.getaddressregister(exprasmlist);
+ reference_reset_symbol(href,objectlibrary.newasmsymbol('FPC_THREADVAR_RELOCATE',AB_EXTERNAL,AT_DATA),0);
+ cg.a_load_ref_reg(exprasmlist,OS_ADDR,OS_ADDR,href,hregister);
+ cg.a_cmp_const_reg_label(exprasmlist,OS_ADDR,OC_EQ,0,hregister,norelocatelab);
+ { don't save the allocated register else the result will be destroyed later }
+ reference_reset_symbol(href,objectlibrary.newasmsymbol(tglobalvarsym(symtableentry).mangledname,AB_EXTERNAL,AT_DATA),0);
+ paramanager.allocparaloc(exprasmlist,paraloc1);
+ cg.a_param_ref(exprasmlist,OS_ADDR,href,paraloc1);
+ paramanager.freeparaloc(exprasmlist,paraloc1);
+ paraloc1.done;
+ cg.alloccpuregisters(exprasmlist,R_INTREGISTER,paramanager.get_volatile_registers_int(pocall_default));
+ cg.a_call_reg(exprasmlist,hregister);
+ cg.dealloccpuregisters(exprasmlist,R_INTREGISTER,paramanager.get_volatile_registers_int(pocall_default));
+ cg.getcpuregister(exprasmlist,NR_FUNCTION_RESULT_REG);
+ cg.ungetcpuregister(exprasmlist,NR_FUNCTION_RESULT_REG);
+ hregister:=cg.getaddressregister(exprasmlist);
+ cg.a_load_reg_reg(exprasmlist,OS_INT,OS_ADDR,NR_FUNCTION_RESULT_REG,hregister);
+ cg.a_jmp_always(exprasmlist,endrelocatelab);
+ cg.a_label(exprasmlist,norelocatelab);
+ { no relocation needed, load the address of the variable only, the
+ layout of a threadvar is (4 bytes pointer):
+ 0 - Threadvar index
+ 4 - Threadvar value in single threading }
+ reference_reset_symbol(href,objectlibrary.newasmsymbol(tglobalvarsym(symtableentry).mangledname,AB_EXTERNAL,AT_DATA),sizeof(aint));
+ cg.a_loadaddr_ref_reg(exprasmlist,href,hregister);
+ cg.a_label(exprasmlist,endrelocatelab);
+ location.reference.base:=hregister;
+ end
+ { Nested variable }
+ else if assigned(left) then
+ begin
+ if not(symtabletype in [localsymtable,parasymtable]) then
+ internalerror(200309285);
+ secondpass(left);
+ if left.location.loc<>LOC_REGISTER then
+ internalerror(200309286);
+ if tabstractnormalvarsym(symtableentry).localloc.loc<>LOC_REFERENCE then
+ internalerror(200409241);
+ hregister:=left.location.register;
+ reference_reset_base(location.reference,hregister,tabstractnormalvarsym(symtableentry).localloc.reference.offset);
+ end
+ { Normal (or external) variable }
+ else
+ begin
+{$ifdef OLDREGVARS}
+ { in case it is a register variable: }
+ if tvarsym(symtableentry).localloc.loc in [LOC_REGISTER,LOC_FPUREGISTER] then
+ begin
+ case getregtype(tvarsym(symtableentry).localloc.register) of
+ R_FPUREGISTER :
+ begin
+ location_reset(location,LOC_CFPUREGISTER,def_cgsize(resulttype.def));
+ location.register:=tvarsym(symtableentry).localloc.register;
+ end;
+ R_INTREGISTER :
+ begin
+ location_reset(location,LOC_CREGISTER,def_cgsize(resulttype.def));
+ location.register:=tvarsym(symtableentry).localloc.register;
+ hregister := location.register;
+ end;
+ else
+ internalerror(200301172);
+ end;
+ end
+ else
+{$endif OLDREGVARS}
+ begin
+ case symtabletype of
+ stt_exceptsymtable,
+ localsymtable,
+ parasymtable :
+ location:=tabstractnormalvarsym(symtableentry).localloc;
+ globalsymtable,
+ staticsymtable :
+ begin
+ if (target_info.system=system_powerpc_darwin) and
+ (cs_create_pic in aktmoduleswitches) then
+ begin
+ generate_picvaraccess;
+ if not(pi_needs_got in current_procinfo.flags) then
+ internalerror(200403023);
+ end
+ else
+ begin
+ if tabstractnormalvarsym(symtableentry).localloc.loc=LOC_INVALID then
+ reference_reset_symbol(location.reference,objectlibrary.newasmsymbol(tglobalvarsym(symtableentry).mangledname,AB_EXTERNAL,AT_DATA),0)
+ else
+ location:=tglobalvarsym(symtableentry).localloc;
+ end;
+ end;
+ else
+ internalerror(200305102);
+ end;
+ end;
+ end;
+
+ { handle call by reference variables when they are not
+ alreayd copied to local copies. Also ignore the reference
+ when we need to load the self pointer for objects }
+ if is_addr_param_load then
+ begin
+ if (location.loc in [LOC_CREGISTER,LOC_REGISTER]) then
+ hregister:=location.register
+ else
+ begin
+ hregister:=cg.getaddressregister(exprasmlist);
+ { we need to load only an address }
+ location.size:=OS_ADDR;
+ cg.a_load_loc_reg(exprasmlist,location.size,location,hregister);
+ end;
+ location_reset(location,LOC_REFERENCE,newsize);
+ location.reference.base:=hregister;
+ end;
+
+ { make const a LOC_CREFERENCE }
+ if (tabstractvarsym(symtableentry).varspez=vs_const) and
+ (location.loc=LOC_REFERENCE) then
+ location.loc:=LOC_CREFERENCE;
+ end;
+ procsym:
+ begin
+ if not assigned(procdef) then
+ internalerror(200312011);
+ if assigned(left) then
+ begin
+ {
+ THIS IS A TERRIBLE HACK!!!!!! WHICH WILL NOT WORK
+ ON 64-BIT SYSTEMS: SINCE PROCSYM FOR METHODS
+ CONSISTS OF TWO OS_ADDR, so you cannot set it
+ to OS_64 - how to solve?? Carl
+ Solved. Florian
+ }
+ if (sizeof(aint) = 4) then
+ location_reset(location,LOC_CREFERENCE,OS_64)
+ else if (sizeof(aint) = 8) then
+ location_reset(location,LOC_CREFERENCE,OS_128)
+ else
+ internalerror(20020520);
+ tg.GetTemp(exprasmlist,2*sizeof(aint),tt_normal,location.reference);
+ secondpass(left);
+
+ { load class instance address }
+ case left.location.loc of
+ LOC_CREGISTER,
+ LOC_REGISTER:
+ begin
+ { this is not possible for objects }
+ if is_object(left.resulttype.def) then
+ internalerror(200304234);
+ hregister:=left.location.register;
+ end;
+ LOC_CREFERENCE,
+ LOC_REFERENCE:
+ begin
+ hregister:=cg.getaddressregister(exprasmlist);
+ if is_class_or_interface(left.resulttype.def) then
+ cg.a_load_ref_reg(exprasmlist,OS_ADDR,OS_ADDR,left.location.reference,hregister)
+ else
+ cg.a_loadaddr_ref_reg(exprasmlist,left.location.reference,hregister);
+ location_freetemp(exprasmlist,left.location);
+ end;
+ else
+ internalerror(26019);
+ end;
+
+ { store the class instance address }
+ href:=location.reference;
+ inc(href.offset,sizeof(aint));
+ cg.a_load_reg_ref(exprasmlist,OS_ADDR,OS_ADDR,hregister,href);
+
+ { virtual method ? }
+ if (po_virtualmethod in procdef.procoptions) then
+ begin
+ { load vmt pointer }
+ reference_reset_base(href,hregister,0);
+ hregister:=cg.getaddressregister(exprasmlist);
+ cg.a_load_ref_reg(exprasmlist,OS_ADDR,OS_ADDR,href,hregister);
+ { load method address }
+ reference_reset_base(href,hregister,procdef._class.vmtmethodoffset(procdef.extnumber));
+ hregister:=cg.getaddressregister(exprasmlist);
+ cg.a_load_ref_reg(exprasmlist,OS_ADDR,OS_ADDR,href,hregister);
+ { ... and store it }
+ cg.a_load_reg_ref(exprasmlist,OS_ADDR,OS_ADDR,hregister,location.reference);
+ end
+ else
+ begin
+ { load address of the function }
+ reference_reset_symbol(href,objectlibrary.newasmsymbol(procdef.mangledname,AB_EXTERNAL,AT_FUNCTION),0);
+ hregister:=cg.getaddressregister(exprasmlist);
+ cg.a_loadaddr_ref_reg(exprasmlist,href,hregister);
+ cg.a_load_reg_ref(exprasmlist,OS_ADDR,OS_ADDR,hregister,location.reference);
+ end;
+ end
+ else
+ begin
+ {!!!!! Be aware, work on virtual methods too }
+ location.reference.symbol:=objectlibrary.newasmsymbol(procdef.mangledname,AB_EXTERNAL,AT_FUNCTION);
+ end;
+ end;
+ typedconstsym :
+ begin
+ location.reference.symbol:=objectlibrary.newasmsymbol(ttypedconstsym(symtableentry).mangledname,AB_EXTERNAL,AT_DATA);
+ end;
+ labelsym :
+ begin
+ location.reference.symbol:=objectlibrary.newasmsymbol(tlabelsym(symtableentry).mangledname,AB_EXTERNAL,AT_FUNCTION);
+ end;
+ else internalerror(4);
+ end;
+ end;
+
+
+{*****************************************************************************
+ SecondAssignment
+*****************************************************************************}
+
+ procedure tcgassignmentnode.pass_2;
+ var
+ otlabel,hlabel,oflabel : tasmlabel;
+ fputyp : tfloattype;
+ href : treference;
+ releaseright : boolean;
+ len : aint;
+ r:Tregister;
+
+ begin
+ location_reset(location,LOC_VOID,OS_NO);
+
+ otlabel:=truelabel;
+ oflabel:=falselabel;
+ objectlibrary.getlabel(truelabel);
+ objectlibrary.getlabel(falselabel);
+
+ {
+ in most cases we can process first the right node which contains
+ the most complex code. Exceptions for this are:
+ - result is in flags, loading left will then destroy the flags
+ - result is a jump, loading left must be already done before the jump is made
+ - result need reference count, when left points to a value used in
+ right then decreasing the refcnt on left can possibly release
+ the memory before right increased the refcnt, result is that an
+ empty value is assigned
+ - calln, call destroys most registers and is therefor 'complex'
+
+ But not when the result is in the flags, then
+ loading the left node afterwards can destroy the flags.
+ }
+ if not(right.expectloc in [LOC_FLAGS,LOC_JUMP]) and
+ ((right.nodetype=calln) or
+ (right.resulttype.def.needs_inittable) or
+ (right.registersint>=left.registersint)) then
+ begin
+ secondpass(right);
+ { increment source reference counter, this is
+ useless for string constants}
+ if (right.resulttype.def.needs_inittable) and
+ (right.nodetype<>stringconstn) then
+ begin
+ location_force_mem(exprasmlist,right.location);
+ location_get_data_ref(exprasmlist,right.location,href,false);
+ cg.g_incrrefcount(exprasmlist,right.resulttype.def,href);
+ end;
+ if codegenerror then
+ exit;
+
+ if not(nf_concat_string in flags) then
+ begin
+ { left can't be never a 64 bit LOC_REGISTER, so the 3. arg }
+ { can be false }
+ secondpass(left);
+ { decrement destination reference counter }
+ if (left.resulttype.def.needs_inittable) then
+ begin
+ location_get_data_ref(exprasmlist,left.location,href,false);
+ cg.g_decrrefcount(exprasmlist,left.resulttype.def,href);
+ end;
+ if codegenerror then
+ exit;
+ end;
+ end
+ else
+ begin
+ { calculate left sides }
+ { don't do it yet if it's a crgister (JM) }
+ if not(nf_concat_string in flags) then
+ begin
+ secondpass(left);
+ { decrement destination reference counter }
+ if (left.resulttype.def.needs_inittable) then
+ begin
+ location_get_data_ref(exprasmlist,left.location,href,false);
+ cg.g_decrrefcount(exprasmlist,left.resulttype.def,href);
+ end;
+ if codegenerror then
+ exit;
+ end;
+
+ { left can't be never a 64 bit LOC_REGISTER, so the 3. arg }
+ { can be false }
+ secondpass(right);
+ { increment source reference counter, this is
+ useless for string constants}
+ if (right.resulttype.def.needs_inittable) and
+ (right.nodetype<>stringconstn) then
+ begin
+ location_force_mem(exprasmlist,right.location);
+ location_get_data_ref(exprasmlist,right.location,href,false);
+ cg.g_incrrefcount(exprasmlist,right.resulttype.def,href);
+ end;
+
+ if codegenerror then
+ exit;
+ end;
+
+ releaseright:=true;
+
+ { optimize temp to temp copies }
+(* if (left.nodetype = temprefn) and
+ { we may store certain temps in registers in the future, then this }
+ { optimization will have to be adapted }
+ (left.location.loc = LOC_REFERENCE) and
+ (right.location.loc = LOC_REFERENCE) and
+ tg.istemp(right.location.reference) and
+ (tg.sizeoftemp(exprasmlist,right.location.reference) = tg.sizeoftemp(exprasmlist,left.location.reference)) then
+ begin
+ { in theory, we should also make sure the left temp type is }
+ { already more or less of the same kind (ie. we must not }
+ { assign an ansistring to a normaltemp). In practice, the }
+ { assignment node will have already taken care of this for us }
+ tcgtemprefnode(left).changelocation(right.location.reference);
+ end
+ { shortstring assignments are handled separately }
+ else *)
+ if is_shortstring(left.resulttype.def) then
+ begin
+ {
+ we can get here only in the following situations
+ for the right node:
+ - empty constant string
+ - char
+ }
+
+ { empty constant string }
+ if (right.nodetype=stringconstn) and
+ (tstringconstnode(right).len=0) then
+ begin
+ cg.a_load_const_ref(exprasmlist,OS_8,0,left.location.reference);
+ end
+ { char loading }
+ else if is_char(right.resulttype.def) then
+ begin
+ if right.nodetype=ordconstn then
+ begin
+ if (target_info.endian = endian_little) then
+ cg.a_load_const_ref(exprasmlist,OS_16,(tordconstnode(right).value shl 8) or 1,
+ left.location.reference)
+ else
+ cg.a_load_const_ref(exprasmlist,OS_16,tordconstnode(right).value or (1 shl 8),
+ left.location.reference);
+ end
+ else
+ begin
+ href:=left.location.reference;
+ cg.a_load_const_ref(exprasmlist,OS_8,1,href);
+ inc(href.offset,1);
+ case right.location.loc of
+ LOC_REGISTER,
+ LOC_CREGISTER :
+ begin
+ r:=cg.makeregsize(exprasmlist,right.location.register,OS_8);
+ cg.a_load_reg_ref(exprasmlist,OS_8,OS_8,r,href);
+ end;
+ LOC_REFERENCE,
+ LOC_CREFERENCE :
+ cg.a_load_ref_ref(exprasmlist,OS_8,OS_8,right.location.reference,href);
+ else
+ internalerror(200205111);
+ end;
+ end;
+ end
+ else
+ internalerror(200204249);
+ end
+ else
+ begin
+ case right.location.loc of
+ LOC_CONSTANT :
+ begin
+{$ifndef cpu64bit}
+ if right.location.size in [OS_64,OS_S64] then
+ cg64.a_load64_const_loc(exprasmlist,right.location.value64,left.location)
+ else
+{$endif cpu64bit}
+ cg.a_load_const_loc(exprasmlist,right.location.value,left.location);
+ end;
+ LOC_REFERENCE,
+ LOC_CREFERENCE :
+ begin
+ case left.location.loc of
+ LOC_REGISTER,
+ LOC_CREGISTER :
+ begin
+{$ifndef cpu64bit}
+ if left.location.size in [OS_64,OS_S64] then
+ cg64.a_load64_ref_reg(exprasmlist,right.location.reference,left.location.register64)
+ else
+{$endif cpu64bit}
+ cg.a_load_ref_reg(exprasmlist,right.location.size,left.location.size,right.location.reference,left.location.register);
+ end;
+ LOC_FPUREGISTER,
+ LOC_CFPUREGISTER :
+ begin
+ cg.a_loadfpu_ref_reg(exprasmlist,
+ right.location.size,
+ right.location.reference,
+ left.location.register);
+ end;
+ LOC_REFERENCE,
+ LOC_CREFERENCE :
+ begin
+{$warning HACK: unaligned test, maybe remove all unaligned locations (array of char) from the compiler}
+ { Use unaligned copy when the offset is not aligned }
+ len:=left.resulttype.def.size;
+ if (right.location.reference.offset mod sizeof(aint)<>0) or
+ (left.location.reference.offset mod sizeof(aint)<>0) or
+ (right.resulttype.def.alignment<sizeof(aint)) then
+ cg.g_concatcopy_unaligned(exprasmlist,right.location.reference,left.location.reference,len)
+ else
+ cg.g_concatcopy(exprasmlist,right.location.reference,left.location.reference,len);
+ end;
+ else
+ internalerror(200203284);
+ end;
+ end;
+{$ifdef SUPPORT_MMX}
+ LOC_CMMXREGISTER,
+ LOC_MMXREGISTER:
+ begin
+ if left.location.loc=LOC_CMMXREGISTER then
+ cg.a_loadmm_reg_reg(exprasmlist,right.location.register,left.location.register)
+ else
+ cg.a_loadmm_reg_ref(exprasmlist,right.location.register,left.location.reference);
+ end;
+{$endif SUPPORT_MMX}
+ LOC_MMREGISTER,
+ LOC_CMMREGISTER:
+ begin
+ if left.resulttype.def.deftype=arraydef then
+ begin
+ end
+ else
+ begin
+ if left.location.loc=LOC_CMMREGISTER then
+ cg.a_loadmm_reg_reg(exprasmlist,right.location.size,left.location.size,right.location.register,left.location.register,mms_movescalar)
+ else
+ cg.a_loadmm_reg_ref(exprasmlist,right.location.size,left.location.size,right.location.register,left.location.reference,mms_movescalar);
+ end;
+ end;
+ LOC_REGISTER,
+ LOC_CREGISTER :
+ begin
+{$ifndef cpu64bit}
+ if left.location.size in [OS_64,OS_S64] then
+ cg64.a_load64_reg_loc(exprasmlist,
+ right.location.register64,left.location)
+ else
+{$endif cpu64bit}
+ cg.a_load_reg_loc(exprasmlist,right.location.size,right.location.register,left.location);
+ end;
+ LOC_FPUREGISTER,
+ LOC_CFPUREGISTER :
+ begin
+ if (left.resulttype.def.deftype=floatdef) then
+ fputyp:=tfloatdef(left.resulttype.def).typ
+ else
+ if (right.resulttype.def.deftype=floatdef) then
+ fputyp:=tfloatdef(right.resulttype.def).typ
+ else
+ if (right.nodetype=typeconvn) and
+ (ttypeconvnode(right).left.resulttype.def.deftype=floatdef) then
+ fputyp:=tfloatdef(ttypeconvnode(right).left.resulttype.def).typ
+ else
+ fputyp:=s32real;
+ cg.a_loadfpu_reg_loc(exprasmlist,
+ tfloat2tcgsize[fputyp],
+ right.location.register,left.location);
+ end;
+ LOC_JUMP :
+ begin
+ objectlibrary.getlabel(hlabel);
+ cg.a_label(exprasmlist,truelabel);
+ cg.a_load_const_loc(exprasmlist,1,left.location);
+ cg.a_jmp_always(exprasmlist,hlabel);
+ cg.a_label(exprasmlist,falselabel);
+ cg.a_load_const_loc(exprasmlist,0,left.location);
+ cg.a_label(exprasmlist,hlabel);
+ end;
+{$ifdef cpuflags}
+ LOC_FLAGS :
+ begin
+ {This can be a wordbool or longbool too, no?}
+ if left.location.loc in [LOC_REGISTER,LOC_CREGISTER] then
+ cg.g_flags2reg(exprasmlist,def_cgsize(left.resulttype.def),right.location.resflags,left.location.register)
+ else
+ begin
+ if not(left.location.loc = LOC_REFERENCE) then
+ internalerror(200203273);
+ cg.g_flags2ref(exprasmlist,def_cgsize(left.resulttype.def),right.location.resflags,left.location.reference);
+ end;
+ end;
+{$endif cpuflags}
+ end;
+ end;
+
+ if releaseright then
+ location_freetemp(exprasmlist,right.location);
+
+ truelabel:=otlabel;
+ falselabel:=oflabel;
+ end;
+
+
+{*****************************************************************************
+ SecondArrayConstruct
+*****************************************************************************}
+
+ const
+ vtInteger = 0;
+ vtBoolean = 1;
+ vtChar = 2;
+ vtExtended = 3;
+ vtString = 4;
+ vtPointer = 5;
+ vtPChar = 6;
+ vtObject = 7;
+ vtClass = 8;
+ vtWideChar = 9;
+ vtPWideChar = 10;
+ vtAnsiString32 = 11;
+ vtCurrency = 12;
+ vtVariant = 13;
+ vtInterface = 14;
+ vtWideString = 15;
+ vtInt64 = 16;
+ vtQWord = 17;
+ vtAnsiString16 = 18;
+ vtAnsiString64 = 19;
+
+ procedure tcgarrayconstructornode.pass_2;
+ var
+ hp : tarrayconstructornode;
+ href : treference;
+ lt : tdef;
+ vaddr : boolean;
+ vtype : longint;
+ freetemp,
+ dovariant : boolean;
+ elesize : longint;
+ tmpreg : tregister;
+ paraloc : tcgparalocation;
+ begin
+ dovariant:=(nf_forcevaria in flags) or tarraydef(resulttype.def).isvariant;
+ if dovariant then
+ elesize:=sizeof(aint)+sizeof(aint)
+ else
+ elesize:=tarraydef(resulttype.def).elesize;
+ location_reset(location,LOC_CREFERENCE,OS_NO);
+ fillchar(paraloc,sizeof(paraloc),0);
+ { Allocate always a temp, also if no elements are required, to
+ be sure that location is valid (PFV) }
+ if tarraydef(resulttype.def).highrange=-1 then
+ tg.GetTemp(exprasmlist,elesize,tt_normal,location.reference)
+ else
+ tg.GetTemp(exprasmlist,(tarraydef(resulttype.def).highrange+1)*elesize,tt_normal,location.reference);
+ href:=location.reference;
+ { Process nodes in array constructor }
+ hp:=self;
+ while assigned(hp) do
+ begin
+ if assigned(hp.left) then
+ begin
+ freetemp:=true;
+ secondpass(hp.left);
+ if codegenerror then
+ exit;
+ { Move flags and jump in register }
+ if hp.left.location.loc in [LOC_FLAGS,LOC_JUMP] then
+ location_force_reg(exprasmlist,hp.left.location,def_cgsize(hp.left.resulttype.def),false);
+ if dovariant then
+ begin
+ { find the correct vtype value }
+ vtype:=$ff;
+ vaddr:=false;
+ lt:=hp.left.resulttype.def;
+ case lt.deftype of
+ enumdef,
+ orddef :
+ begin
+ if is_64bit(lt) then
+ begin
+ case torddef(lt).typ of
+ s64bit:
+ vtype:=vtInt64;
+ u64bit:
+ vtype:=vtQWord;
+ end;
+ freetemp:=false;
+ vaddr:=true;
+ end
+ else if (lt.deftype=enumdef) or
+ is_integer(lt) then
+ vtype:=vtInteger
+ else
+ if is_boolean(lt) then
+ vtype:=vtBoolean
+ else
+ if (lt.deftype=orddef) then
+ begin
+ case torddef(lt).typ of
+ uchar:
+ vtype:=vtChar;
+ uwidechar:
+ vtype:=vtWideChar;
+ end;
+ end;
+ end;
+ floatdef :
+ begin
+ if is_currency(lt) then
+ vtype:=vtCurrency
+ else
+ vtype:=vtExtended;
+ freetemp:=false;
+ vaddr:=true;
+ end;
+ procvardef,
+ pointerdef :
+ begin
+ if is_pchar(lt) then
+ vtype:=vtPChar
+ else if is_pwidechar(lt) then
+ vtype:=vtPWideChar
+ else
+ vtype:=vtPointer;
+ end;
+ variantdef :
+ begin
+ vtype:=vtVariant;
+ vaddr:=true;
+ freetemp:=false;
+ end;
+ classrefdef :
+ vtype:=vtClass;
+ objectdef :
+ if is_interface(lt) then
+ vtype:=vtInterface
+ else if is_class(lt) then
+ vtype:=vtClass
+ else if is_object(lt) then
+ vtype:=vtObject
+ else
+ internalerror(200505171);
+ stringdef :
+ begin
+ if is_shortstring(lt) then
+ begin
+ vtype:=vtString;
+ vaddr:=true;
+ freetemp:=false;
+ end
+ else
+ if is_ansistring(lt) then
+ {$ifdef ansistring_bits}
+ begin
+ case Tstringdef(lt).string_typ of
+ st_ansistring16:
+ vtype:=vtAnsiString16;
+ st_ansistring32:
+ vtype:=vtAnsiString32;
+ st_ansistring64:
+ vtype:=vtAnsiString64;
+ end;
+ freetemp:=false;
+ end
+ {$else}
+ begin
+ vtype:=vtAnsiString;
+ freetemp:=false;
+ end
+ {$endif}
+ else
+ if is_widestring(lt) then
+ begin
+ vtype:=vtWideString;
+ freetemp:=false;
+ end;
+ end;
+ end;
+ if vtype=$ff then
+ internalerror(14357);
+ { write changing field update href to the next element }
+ inc(href.offset,sizeof(aint));
+ if vaddr then
+ begin
+ location_force_mem(exprasmlist,hp.left.location);
+ tmpreg:=cg.getaddressregister(exprasmlist);
+ cg.a_loadaddr_ref_reg(exprasmlist,hp.left.location.reference,tmpreg);
+ cg.a_load_reg_ref(exprasmlist,OS_ADDR,OS_ADDR,tmpreg,href);
+ end
+ else
+ cg.a_load_loc_ref(exprasmlist,OS_ADDR,hp.left.location,href);
+ { update href to the vtype field and write it }
+ dec(href.offset,sizeof(aint));
+ cg.a_load_const_ref(exprasmlist, OS_INT,vtype,href);
+ { goto next array element }
+ inc(href.offset,sizeof(aint)*2);
+ end
+ else
+ { normal array constructor of the same type }
+ begin
+ if (is_ansistring(left.resulttype.def) or
+ is_widestring(left.resulttype.def) or
+ (left.resulttype.def.deftype=variantdef)) then
+ freetemp:=false;
+ case hp.left.location.loc of
+ LOC_FPUREGISTER,
+ LOC_CFPUREGISTER :
+ cg.a_loadfpu_reg_ref(exprasmlist,hp.left.location.size,hp.left.location.register,href);
+ LOC_REFERENCE,
+ LOC_CREFERENCE :
+ begin
+ if is_shortstring(hp.left.resulttype.def) then
+ cg.g_copyshortstring(exprasmlist,hp.left.location.reference,href,
+ Tstringdef(hp.left.resulttype.def).len)
+ else
+ cg.g_concatcopy(exprasmlist,hp.left.location.reference,href,elesize);
+ end;
+ else
+ begin
+{$ifndef cpu64bit}
+ if hp.left.location.size in [OS_64,OS_S64] then
+ cg64.a_load64_loc_ref(exprasmlist,hp.left.location,href)
+ else
+{$endif cpu64bit}
+ cg.a_load_loc_ref(exprasmlist,hp.left.location.size,hp.left.location,href);
+ end;
+ end;
+ inc(href.offset,elesize);
+ end;
+ if freetemp then
+ location_freetemp(exprasmlist,hp.left.location);
+ end;
+ { load next entry }
+ hp:=tarrayconstructornode(hp.right);
+ end;
+ end;
+
+
+{*****************************************************************************
+ SecondRTTI
+*****************************************************************************}
+
+ procedure tcgrttinode.pass_2;
+ begin
+ location_reset(location,LOC_CREFERENCE,OS_NO);
+ location.reference.symbol:=rttidef.get_rtti_label(rttitype);
+ end;
+
+
+
+begin
+ cloadnode:=tcgloadnode;
+ cassignmentnode:=tcgassignmentnode;
+ carrayconstructornode:=tcgarrayconstructornode;
+ crttinode:=tcgrttinode;
+end.
+{
+ $Log: ncgld.pas,v $
+ Revision 1.140 2005/04/08 15:18:08 peter
+ remove multiple pass2 calls. It is not supported anymore by all nodes (ttempcreatenode)
+
+ Revision 1.139 2005/02/14 17:13:06 peter
+ * truncate log
+
+ Revision 1.138 2005/02/13 19:57:15 florian
+ * better alignment checking
+
+ Revision 1.137 2005/02/10 21:54:36 peter
+ * data with inittables need to have a memory location assigned
+ for incrref
+
+ Revision 1.136 2005/01/23 17:14:21 florian
+ + optimized code generation on sparc
+ + some stuff for pic code on sparc added
+
+ Revision 1.135 2005/01/04 16:37:09 peter
+ * don't release temps for array of ansistring
+
+}
diff --git a/compiler/nld.pas b/compiler/nld.pas
index f16d54f56d..2ea6725617 100644
--- a/compiler/nld.pas
+++ b/compiler/nld.pas
@@ -1,1226 +1,1226 @@
-{
- $Id: nld.pas,v 1.148 2005/03/28 13:36:15 florian Exp $
- Copyright (c) 2000-2002 by Florian Klaempfl
-
- Type checking and register allocation for load/assignment nodes
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
- ****************************************************************************
-}
-unit nld;
-
-{$i fpcdefs.inc}
-
-interface
-
- uses
- node,
- {$ifdef state_tracking}
- nstate,
- {$endif}
- symconst,symbase,symtype,symsym,symdef;
-
- type
- tloadnode = class(tunarynode)
- symtableentry : tsym;
- symtableentryderef : tderef;
- symtable : tsymtable;
- procdef : tprocdef;
- procdefderef : tderef;
- constructor create(v : tsym;st : tsymtable);virtual;
- constructor create_procvar(v : tsym;d:tprocdef;st : tsymtable);virtual;
- constructor ppuload(t:tnodetype;ppufile:tcompilerppufile);override;
- procedure ppuwrite(ppufile:tcompilerppufile);override;
- procedure buildderefimpl;override;
- procedure derefimpl;override;
- procedure set_mp(p:tnode);
- function is_addr_param_load:boolean;
- function getcopy : tnode;override;
- function pass_1 : tnode;override;
- function det_resulttype:tnode;override;
- procedure mark_write;override;
- function docompare(p: tnode): boolean; override;
- procedure printnodedata(var t:text);override;
- end;
- tloadnodeclass = class of tloadnode;
-
- { different assignment types }
- tassigntype = (at_normal,at_plus,at_minus,at_star,at_slash);
-
- tassignmentnode = class(tbinarynode)
- assigntype : tassigntype;
- constructor create(l,r : tnode);virtual;
- constructor ppuload(t:tnodetype;ppufile:tcompilerppufile);override;
- procedure ppuwrite(ppufile:tcompilerppufile);override;
- function getcopy : tnode;override;
- function pass_1 : tnode;override;
- function det_resulttype:tnode;override;
- {$ifdef state_tracking}
- function track_state_pass(exec_known:boolean):boolean;override;
- {$endif state_tracking}
- function docompare(p: tnode): boolean; override;
- end;
- tassignmentnodeclass = class of tassignmentnode;
-
- tarrayconstructorrangenode = class(tbinarynode)
- constructor create(l,r : tnode);virtual;
- function pass_1 : tnode;override;
- function det_resulttype:tnode;override;
- end;
- tarrayconstructorrangenodeclass = class of tarrayconstructorrangenode;
-
- tarrayconstructornode = class(tbinarynode)
- constructor create(l,r : tnode);virtual;
- function getcopy : tnode;override;
- function pass_1 : tnode;override;
- function det_resulttype:tnode;override;
- function docompare(p: tnode): boolean; override;
- procedure force_type(tt:ttype);
- procedure insert_typeconvs;
- end;
- tarrayconstructornodeclass = class of tarrayconstructornode;
-
- ttypenode = class(tnode)
- allowed : boolean;
- restype : ttype;
- constructor create(t : ttype);virtual;
- constructor ppuload(t:tnodetype;ppufile:tcompilerppufile);override;
- procedure ppuwrite(ppufile:tcompilerppufile);override;
- procedure buildderefimpl;override;
- procedure derefimpl;override;
- function pass_1 : tnode;override;
- function det_resulttype:tnode;override;
- function docompare(p: tnode): boolean; override;
- end;
- ttypenodeclass = class of ttypenode;
-
- trttinode = class(tnode)
- l1,l2 : longint;
- rttitype : trttitype;
- rttidef : tstoreddef;
- rttidefderef : tderef;
- constructor create(def:tstoreddef;rt:trttitype);virtual;
- constructor ppuload(t:tnodetype;ppufile:tcompilerppufile);override;
- procedure ppuwrite(ppufile:tcompilerppufile);override;
- procedure buildderefimpl;override;
- procedure derefimpl;override;
- function getcopy : tnode;override;
- function pass_1 : tnode;override;
- function det_resulttype:tnode;override;
- function docompare(p: tnode): boolean; override;
- end;
- trttinodeclass = class of trttinode;
-
- var
- cloadnode : tloadnodeclass;
- cassignmentnode : tassignmentnodeclass;
- carrayconstructorrangenode : tarrayconstructorrangenodeclass;
- carrayconstructornode : tarrayconstructornodeclass;
- ctypenode : ttypenodeclass;
- crttinode : trttinodeclass;
-
-
-
-implementation
-
- uses
- cutils,verbose,globtype,globals,systems,
- symnot,
- defutil,defcmp,
- htypechk,pass_1,procinfo,paramgr,
- ncon,ninl,ncnv,nmem,ncal,nutils,
- cgobj,cgbase
- ;
-
-{*****************************************************************************
- TLOADNODE
-*****************************************************************************}
-
- constructor tloadnode.create(v : tsym;st : tsymtable);
- begin
- inherited create(loadn,nil);
- if not assigned(v) then
- internalerror(200108121);
- symtableentry:=v;
- symtable:=st;
- procdef:=nil;
- end;
-
-
- constructor tloadnode.create_procvar(v : tsym;d:tprocdef;st : tsymtable);
- begin
- inherited create(loadn,nil);
- if not assigned(v) then
- internalerror(200108121);
- symtableentry:=v;
- symtable:=st;
- procdef:=d;
- end;
-
-
- constructor tloadnode.ppuload(t:tnodetype;ppufile:tcompilerppufile);
- begin
- inherited ppuload(t,ppufile);
- ppufile.getderef(symtableentryderef);
- symtable:=nil;
- ppufile.getderef(procdefderef);
- end;
-
-
- procedure tloadnode.ppuwrite(ppufile:tcompilerppufile);
- begin
- inherited ppuwrite(ppufile);
- ppufile.putderef(symtableentryderef);
- ppufile.putderef(procdefderef);
- end;
-
-
- procedure tloadnode.buildderefimpl;
- begin
- inherited buildderefimpl;
- symtableentryderef.build(symtableentry);
- procdefderef.build(procdef);
- end;
-
-
- procedure tloadnode.derefimpl;
- begin
- inherited derefimpl;
- symtableentry:=tsym(symtableentryderef.resolve);
- symtable:=symtableentry.owner;
- procdef:=tprocdef(procdefderef.resolve);
- end;
-
-
- procedure tloadnode.set_mp(p:tnode);
- begin
- { typen nodes should not be set }
- if p.nodetype=typen then
- internalerror(200301042);
- left:=p;
- end;
-
-
- function tloadnode.getcopy : tnode;
- var
- n : tloadnode;
-
- begin
- n:=tloadnode(inherited getcopy);
- n.symtable:=symtable;
- n.symtableentry:=symtableentry;
- n.procdef:=procdef;
- result:=n;
- end;
-
-
- function tloadnode.is_addr_param_load:boolean;
- begin
- result:=(symtable.symtabletype=parasymtable) and
- (symtableentry.typ=paravarsym) and
- not(vo_has_local_copy in tparavarsym(symtableentry).varoptions) and
- not(nf_load_self_pointer in flags) and
- paramanager.push_addr_param(tparavarsym(symtableentry).varspez,tparavarsym(symtableentry).vartype.def,tprocdef(symtable.defowner).proccalloption);
- end;
-
-
- function tloadnode.det_resulttype:tnode;
- begin
- result:=nil;
- case symtableentry.typ of
- absolutevarsym :
- resulttype:=tabsolutevarsym(symtableentry).vartype;
- constsym:
- begin
- if tconstsym(symtableentry).consttyp=constresourcestring then
- begin
- {$ifdef ansistring_bits}
- case aktansistring_bits of
- sb_16:
- resulttype:=cansistringtype16;
- sb_32:
- resulttype:=cansistringtype32;
- sb_64:
- resulttype:=cansistringtype64;
- end;
- {$else}
- resulttype:=cansistringtype
- {$endif}
- end
- else
- internalerror(22799);
- end;
- globalvarsym,
- paravarsym,
- localvarsym :
- begin
- inc(tabstractvarsym(symtableentry).refs);
- { Nested variable? The we need to load the framepointer of
- the parent procedure }
- if assigned(current_procinfo) then
- begin
- if (symtable.symtabletype in [localsymtable,parasymtable]) and
- (symtable.symtablelevel<>current_procinfo.procdef.parast.symtablelevel) then
- begin
- if assigned(left) then
- internalerror(200309289);
- left:=cloadparentfpnode.create(tprocdef(symtable.defowner));
- { reference in nested procedures, variable needs to be in memory }
- make_not_regable(self);
- end;
- { static variables referenced in procedures or from finalization,
- variable needs to be in memory.
- It is too hard and the benefit is too small to detect whether a
- variable is only used in the finalization to add support for it (PFV) }
- if (symtable.symtabletype=staticsymtable) and
- (
- (symtable.symtablelevel<>current_procinfo.procdef.localst.symtablelevel) or
- (current_procinfo.procdef.proctypeoption=potype_unitfinalize)
- ) then
- make_not_regable(self);
- end;
- { fix self type which is declared as voidpointer in the
- definition }
- if vo_is_self in tabstractvarsym(symtableentry).varoptions then
- begin
- resulttype.setdef(tprocdef(symtableentry.owner.defowner)._class);
- if (po_classmethod in tprocdef(symtableentry.owner.defowner).procoptions) or
- (po_staticmethod in tprocdef(symtableentry.owner.defowner).procoptions) then
- resulttype.setdef(tclassrefdef.create(resulttype))
- else if is_object(resulttype.def) and
- (nf_load_self_pointer in flags) then
- resulttype.setdef(tpointerdef.create(resulttype));
- end
- else if vo_is_vmt in tabstractvarsym(symtableentry).varoptions then
- begin
- resulttype.setdef(tprocdef(symtableentry.owner.defowner)._class);
- resulttype.setdef(tclassrefdef.create(resulttype));
- end
- else
- resulttype:=tabstractvarsym(symtableentry).vartype;
- end;
- typedconstsym :
- resulttype:=ttypedconstsym(symtableentry).typedconsttype;
- procsym :
- begin
- if not assigned(procdef) then
- begin
- if Tprocsym(symtableentry).procdef_count>1 then
- CGMessage(parser_e_no_overloaded_procvars);
- procdef:=tprocsym(symtableentry).first_procdef;
- end;
-
- { the result is a procdef, addrn and proc_to_procvar
- typeconvn need this as resulttype so they know
- that the address needs to be returned }
- resulttype.setdef(procdef);
-
- { process methodpointer }
- if assigned(left) then
- resulttypepass(left);
- end;
- labelsym:
- resulttype:=voidtype;
- else
- internalerror(200104141);
- end;
- end;
-
- procedure Tloadnode.mark_write;
-
- begin
- include(flags,nf_write);
- end;
-
- function tloadnode.pass_1 : tnode;
- begin
- result:=nil;
- expectloc:=LOC_REFERENCE;
- registersint:=0;
- registersfpu:=0;
-{$ifdef SUPPORT_MMX}
- registersmmx:=0;
-{$endif SUPPORT_MMX}
- if (cs_create_pic in aktmoduleswitches) and
- not(symtableentry.typ in [paravarsym,localvarsym]) then
- include(current_procinfo.flags,pi_needs_got);
-
- case symtableentry.typ of
- absolutevarsym :
- ;
- constsym:
- begin
- if tconstsym(symtableentry).consttyp=constresourcestring then
- expectloc:=LOC_CREFERENCE;
- end;
- globalvarsym,
- localvarsym,
- paravarsym :
- begin
- if assigned(left) then
- firstpass(left);
- if not is_addr_param_load and
- tabstractvarsym(symtableentry).is_regvar then
- begin
- case tabstractvarsym(symtableentry).varregable of
- vr_intreg :
- expectloc:=LOC_CREGISTER;
- vr_fpureg :
- expectloc:=LOC_CFPUREGISTER;
- vr_mmreg :
- expectloc:=LOC_CMMREGISTER;
- end
- end
- else
- if (tabstractvarsym(symtableentry).varspez=vs_const) then
- expectloc:=LOC_CREFERENCE;
- { we need a register for call by reference parameters }
- if paramanager.push_addr_param(tabstractvarsym(symtableentry).varspez,tabstractvarsym(symtableentry).vartype.def,pocall_default) then
- registersint:=1;
- if ([vo_is_thread_var,vo_is_dll_var]*tabstractvarsym(symtableentry).varoptions)<>[] then
- registersint:=1;
- if (target_info.system=system_powerpc_darwin) and (vo_is_dll_var in tabstractvarsym(symtableentry).varoptions) then
- include(current_procinfo.flags,pi_needs_got);
- { call to get address of threadvar }
- if (vo_is_thread_var in tabstractvarsym(symtableentry).varoptions) then
- include(current_procinfo.flags,pi_do_call);
- if nf_write in flags then
- Tabstractvarsym(symtableentry).trigger_notifications(vn_onwrite)
- else
- Tabstractvarsym(symtableentry).trigger_notifications(vn_onread);
- { count variable references }
- if cg.t_times>1 then
- inc(tabstractvarsym(symtableentry).refs,cg.t_times-1);
- end;
- typedconstsym :
- ;
- procsym :
- begin
- { method pointer ? }
- if assigned(left) then
- begin
- expectloc:=LOC_CREFERENCE;
- firstpass(left);
- registersint:=max(registersint,left.registersint);
- registersfpu:=max(registersfpu,left.registersfpu);
- {$ifdef SUPPORT_MMX}
- registersmmx:=max(registersmmx,left.registersmmx);
- {$endif SUPPORT_MMX}
- end;
- end;
- labelsym :
- ;
- else
- internalerror(200104143);
- end;
- end;
-
-
- function tloadnode.docompare(p: tnode): boolean;
- begin
- docompare :=
- inherited docompare(p) and
- (symtableentry = tloadnode(p).symtableentry) and
- (procdef = tloadnode(p).procdef) and
- (symtable = tloadnode(p).symtable);
- end;
-
-
- procedure Tloadnode.printnodedata(var t:text);
- begin
- inherited printnodedata(t);
- write(t,printnodeindention,'symbol = ',symtableentry.name);
- if symtableentry.typ=procsym then
- write(t,printnodeindention,'procdef = ',procdef.mangledname);
- writeln(t,'');
- end;
-
-
-{*****************************************************************************
- TASSIGNMENTNODE
-*****************************************************************************}
-
- constructor tassignmentnode.create(l,r : tnode);
-
- begin
- inherited create(assignn,l,r);
- l.mark_write;
- assigntype:=at_normal;
- end;
-
-
- constructor tassignmentnode.ppuload(t:tnodetype;ppufile:tcompilerppufile);
- begin
- inherited ppuload(t,ppufile);
- assigntype:=tassigntype(ppufile.getbyte);
- end;
-
-
- procedure tassignmentnode.ppuwrite(ppufile:tcompilerppufile);
- begin
- inherited ppuwrite(ppufile);
- ppufile.putbyte(byte(assigntype));
- end;
-
-
- function tassignmentnode.getcopy : tnode;
-
- var
- n : tassignmentnode;
-
- begin
- n:=tassignmentnode(inherited getcopy);
- n.assigntype:=assigntype;
- getcopy:=n;
- end;
-
-
- function tassignmentnode.det_resulttype:tnode;
- var
- hp : tnode;
- useshelper : boolean;
- original_size : longint;
- begin
- result:=nil;
- resulttype:=voidtype;
- original_size := 0;
-
- { must be made unique }
- set_unique(left);
-
- resulttypepass(left);
-
- if is_ansistring(left.resulttype.def) then
- begin
- { fold <ansistring>:=<ansistring>+<char|shortstring|ansistring> }
- if (right.nodetype=addn) and
- left.isequal(tbinarynode(right).left) and
- { don't fold multiple concatenations else we could get trouble
- with multiple uses of s
- }
- (tbinarynode(right).left.nodetype<>addn) and
- (tbinarynode(right).right.nodetype<>addn) then
- begin
- { don't do a resulttypepass(right), since then the addnode }
- { may insert typeconversions that make this optimization }
- { opportunity quite difficult to detect (JM) }
- resulttypepass(tbinarynode(right).left);
- resulttypepass(tbinarynode(right).right);
- if (is_char(tbinarynode(right).right.resulttype.def) or
- is_shortstring(tbinarynode(right).right.resulttype.def) or
- is_ansistring(tbinarynode(right).right.resulttype.def)) then
- begin
- { remove property flag so it'll not trigger an error }
- exclude(left.flags,nf_isproperty);
- { generate call to helper }
- hp:=ccallparanode.create(tbinarynode(right).right,
- ccallparanode.create(left,nil));
- if is_char(tbinarynode(right).right.resulttype.def) then
- result:=ccallnode.createintern('fpc_'+Tstringdef(left.resulttype.def).stringtypname+'_append_char',hp)
- else if is_shortstring(tbinarynode(right).right.resulttype.def) then
- result:=ccallnode.createintern('fpc_'+Tstringdef(left.resulttype.def).stringtypname+'_append_shortstring',hp)
- else
- result:=ccallnode.createintern('fpc_'+Tstringdef(left.resulttype.def).stringtypname+'_append_ansistring',hp);
- tbinarynode(right).right:=nil;
- left:=nil;
- exit;
- end;
- end;
- end
- else
- if is_shortstring(left.resulttype.def) then
- begin
- { fold <shortstring>:=<shortstring>+<shortstring>,
- <shortstring>+<char> is handled by an optimized node }
- if (right.nodetype=addn) and
- left.isequal(tbinarynode(right).left) and
- { don't fold multiple concatenations else we could get trouble
- with multiple uses of s }
- (tbinarynode(right).left.nodetype<>addn) and
- (tbinarynode(right).right.nodetype<>addn) then
- begin
- { don't do a resulttypepass(right), since then the addnode }
- { may insert typeconversions that make this optimization }
- { opportunity quite difficult to detect (JM) }
- resulttypepass(tbinarynode(right).left);
- resulttypepass(tbinarynode(right).right);
- if is_shortstring(tbinarynode(right).right.resulttype.def) then
- begin
- { remove property flag so it'll not trigger an error }
- exclude(left.flags,nf_isproperty);
- { generate call to helper }
- hp:=ccallparanode.create(tbinarynode(right).right,
- ccallparanode.create(left,nil));
- if is_shortstring(tbinarynode(right).right.resulttype.def) then
- result:=ccallnode.createintern('fpc_shortstr_append_shortstr',hp);
- tbinarynode(right).right:=nil;
- left:=nil;
- exit;
- end;
- end;
- end;
-
- resulttypepass(right);
- set_varstate(left,vs_assigned,[]);
- set_varstate(right,vs_used,[vsf_must_be_valid]);
- if codegenerror then
- exit;
-
- { tp procvar support, when we don't expect a procvar
- then we need to call the procvar }
- if (left.resulttype.def.deftype<>procvardef) then
- maybe_call_procvar(right,true);
-
- { assignments to formaldefs and open arrays aren't allowed }
- if (left.resulttype.def.deftype=formaldef) or
- is_open_array(left.resulttype.def) then
- CGMessage(type_e_operator_not_allowed);
-
- { test if node can be assigned, properties are allowed }
- valid_for_assignment(left);
-
- { assigning nil to a dynamic array clears the array }
- if is_dynamic_array(left.resulttype.def) and
- (right.nodetype=niln) then
- begin
- hp:=ccallparanode.create(caddrnode.create_internal
- (crttinode.create(tstoreddef(left.resulttype.def),initrtti)),
- ccallparanode.create(ctypeconvnode.create_internal(left,voidpointertype),nil));
- result := ccallnode.createintern('fpc_dynarray_clear',hp);
- left:=nil;
- exit;
- end;
-
- { shortstring helpers can do the conversion directly,
- so treat them separatly }
- if (is_shortstring(left.resulttype.def)) then
- begin
- { insert typeconv, except for chars that are handled in
- secondpass and except for ansi/wide string that can
- be converted immediatly }
- if not(is_char(right.resulttype.def) or
- (right.resulttype.def.deftype=stringdef)) then
- inserttypeconv(right,left.resulttype);
- if right.resulttype.def.deftype=stringdef then
- begin
- useshelper:=true;
- { convert constant strings to shortstrings. But
- skip empty constant strings, that will be handled
- in secondpass }
- if (right.nodetype=stringconstn) then
- begin
- { verify if range fits within shortstring }
- { just emit a warning, delphi gives an }
- { error, only if the type definition of }
- { of the string is less < 255 characters }
- if not is_open_string(left.resulttype.def) and
- (tstringconstnode(right).len > tstringdef(left.resulttype.def).len) then
- cgmessage(type_w_string_too_long);
- inserttypeconv(right,left.resulttype);
- if (tstringconstnode(right).len=0) then
- useshelper:=false;
- end;
- { rest is done in pass 1 (JM) }
- if useshelper then
- exit;
- end
- end
- else
- begin
- { get the size before the type conversion - check for all nodes }
- if assigned(right.resulttype.def) and
- (right.resulttype.def.deftype in [enumdef,orddef,floatdef]) and
- (right.nodetype in [loadn,vecn,calln]) then
- original_size := right.resulttype.def.size;
- inserttypeconv(right,left.resulttype);
- end;
-
- { check if the assignment may cause a range check error }
- { if its not explicit, and only if the values are }
- { ordinals, enumdef and floatdef }
- if (right.nodetype = typeconvn) and
- not (nf_explicit in ttypeconvnode(right).flags) then
- begin
- if assigned(left.resulttype.def) and
- (left.resulttype.def.deftype in [enumdef,orddef,floatdef]) and
- not is_boolean(left.resulttype.def) then
- begin
- if (original_size <> 0) and
- (left.resulttype.def.size < original_size) then
- begin
- if (cs_check_range in aktlocalswitches) then
- Message(type_w_smaller_possible_range_check)
- else
- Message(type_h_smaller_possible_range_check);
- end;
- end;
- end;
-
- { call helpers for interface }
- if is_interfacecom(left.resulttype.def) then
- begin
- hp:=ccallparanode.create(ctypeconvnode.create_internal
- (right,voidpointertype),
- ccallparanode.create(ctypeconvnode.create_internal
- (left,voidpointertype),nil));
- result:=ccallnode.createintern('fpc_intf_assign',hp);
- left:=nil;
- right:=nil;
- exit;
- end;
- { call helpers for variant, they can contain non ref. counted types like
- vararrays which must be really copied }
- if left.resulttype.def.deftype=variantdef then
- begin
- hp:=ccallparanode.create(ctypeconvnode.create_internal(
- caddrnode.create_internal(right),voidpointertype),
- ccallparanode.create(ctypeconvnode.create_internal(
- caddrnode.create_internal(left),voidpointertype),
- nil));
- result:=ccallnode.createintern('fpc_variant_copy',hp);
- left:=nil;
- right:=nil;
- exit;
- end;
-
- { check if local proc/func is assigned to procvar }
- if right.resulttype.def.deftype=procvardef then
- test_local_to_procvar(tprocvardef(right.resulttype.def),left.resulttype.def);
- end;
-
-
- function tassignmentnode.pass_1 : tnode;
- var
- hp: tnode;
- begin
- result:=nil;
- expectloc:=LOC_VOID;
-
- firstpass(left);
- firstpass(right);
- { assignment to refcounted variable -> inc/decref }
- if (not is_class(left.resulttype.def) and
- left.resulttype.def.needs_inittable) then
- include(current_procinfo.flags,pi_do_call);
-
- if codegenerror then
- exit;
-
-
- if (is_shortstring(left.resulttype.def)) then
- begin
- if right.resulttype.def.deftype=stringdef then
- begin
- if (right.nodetype<>stringconstn) or
- (tstringconstnode(right).len<>0) then
- begin
- if (cs_optimize in aktglobalswitches) and
- (right.nodetype in [calln,blockn]) and
- (left.nodetype = temprefn) and
- is_shortstring(right.resulttype.def) and
- not is_open_string(left.resulttype.def) and
- (tstringdef(left.resulttype.def).len = 255) then
- begin
- { the blocknode case is handled in pass_2 at the temp }
- { reference level (mainly for callparatemp) (JM) }
- if (right.nodetype = calln) then
- begin
- tcallnode(right).funcretnode := left;
- result := right;
- end
- else
- exit;
- end
- else
- begin
- hp:=ccallparanode.create
- (right,
- ccallparanode.create(cinlinenode.create
- (in_high_x,false,left.getcopy),nil));
- result:=ccallnode.createinternreturn('fpc_'+tstringdef(right.resulttype.def).stringtypname+'_to_shortstr',hp,left);
- firstpass(result);
- end;
- left:=nil;
- right:=nil;
- exit;
- end;
- end;
- end;
-
- if (cs_optimize in aktglobalswitches) and
- (right.nodetype = calln) and
- { left must be a temp, since otherwise as soon as you modify the }
- { result, the current left node is modified and that one may }
- { still be an argument to the function or even accessed in the }
- { function }
- (((left.nodetype = temprefn) and
- paramanager.ret_in_param(right.resulttype.def,
- tcallnode(right).procdefinition.proccalloption)) or
- { there's special support for ansi/widestrings in the callnode }
- is_ansistring(right.resulttype.def) or
- is_widestring(right.resulttype.def)) then
- begin
- tcallnode(right).funcretnode := left;
- result := right;
- left := nil;
- right := nil;
- exit;
- end;
-
-
- registersint:=left.registersint+right.registersint;
- registersfpu:=max(left.registersfpu,right.registersfpu);
-{$ifdef SUPPORT_MMX}
- registersmmx:=max(left.registersmmx,right.registersmmx);
-{$endif SUPPORT_MMX}
- end;
-
-
- function tassignmentnode.docompare(p: tnode): boolean;
- begin
- docompare :=
- inherited docompare(p) and
- (assigntype = tassignmentnode(p).assigntype);
- end;
-
-{$ifdef state_tracking}
- function Tassignmentnode.track_state_pass(exec_known:boolean):boolean;
-
- var se:Tstate_entry;
-
- begin
- track_state_pass:=false;
- if exec_known then
- begin
- track_state_pass:=right.track_state_pass(exec_known);
- {Force a new resulttype pass.}
- right.resulttype.def:=nil;
- do_resulttypepass(right);
- resulttypepass(right);
- aktstate.store_fact(left.getcopy,right.getcopy);
- end
- else
- aktstate.delete_fact(left);
- end;
-{$endif}
-
-
-{*****************************************************************************
- TARRAYCONSTRUCTORRANGENODE
-*****************************************************************************}
-
- constructor tarrayconstructorrangenode.create(l,r : tnode);
-
- begin
- inherited create(arrayconstructorrangen,l,r);
- end;
-
- function tarrayconstructorrangenode.det_resulttype:tnode;
- begin
- result:=nil;
- resulttypepass(left);
- resulttypepass(right);
- set_varstate(left,vs_used,[vsf_must_be_valid]);
- set_varstate(right,vs_used,[vsf_must_be_valid]);
- if codegenerror then
- exit;
- resulttype:=left.resulttype;
- end;
-
-
- function tarrayconstructorrangenode.pass_1 : tnode;
- begin
- firstpass(left);
- firstpass(right);
- expectloc:=LOC_CREFERENCE;
- calcregisters(self,0,0,0);
- result:=nil;
- end;
-
-
-{****************************************************************************
- TARRAYCONSTRUCTORNODE
-*****************************************************************************}
-
- constructor tarrayconstructornode.create(l,r : tnode);
- begin
- inherited create(arrayconstructorn,l,r);
- end;
-
-
- function tarrayconstructornode.getcopy : tnode;
- var
- n : tarrayconstructornode;
- begin
- n:=tarrayconstructornode(inherited getcopy);
- result:=n;
- end;
-
-
- function tarrayconstructornode.det_resulttype:tnode;
- var
- htype : ttype;
- hp : tarrayconstructornode;
- len : longint;
- varia : boolean;
- begin
- result:=nil;
-
- { are we allowing array constructor? Then convert it to a set }
- if not allow_array_constructor then
- begin
- hp:=tarrayconstructornode(getcopy);
- arrayconstructor_to_set(tnode(hp));
- result:=hp;
- exit;
- end;
-
- { only pass left tree, right tree contains next construct if any }
- htype.reset;
- len:=0;
- varia:=false;
- if assigned(left) then
- begin
- hp:=self;
- while assigned(hp) do
- begin
- resulttypepass(hp.left);
- set_varstate(hp.left,vs_used,[vsf_must_be_valid]);
- if (htype.def=nil) then
- htype:=hp.left.resulttype
- else
- begin
- if ((nf_novariaallowed in flags) or (not varia)) and
- (not equal_defs(htype.def,hp.left.resulttype.def)) then
- begin
- varia:=true;
- end;
- end;
- inc(len);
- hp:=tarrayconstructornode(hp.right);
- end;
- end;
- { Set the type of empty or varia arrays to void. Also
- do this if the type is array of const/open array
- because those can't be used with setelementtype }
- if not assigned(htype.def) or
- varia or
- is_array_of_const(htype.def) or
- is_open_array(htype.def) then
- htype:=voidtype;
- resulttype.setdef(tarraydef.create(0,len-1,s32inttype));
- tarraydef(resulttype.def).setelementtype(htype);
- tarraydef(resulttype.def).IsConstructor:=true;
- tarraydef(resulttype.def).IsVariant:=varia;
- end;
-
-
- procedure tarrayconstructornode.force_type(tt:ttype);
- var
- hp : tarrayconstructornode;
- begin
- tarraydef(resulttype.def).setelementtype(tt);
- tarraydef(resulttype.def).IsConstructor:=true;
- tarraydef(resulttype.def).IsVariant:=false;
- if assigned(left) then
- begin
- hp:=self;
- while assigned(hp) do
- begin
- inserttypeconv(hp.left,tt);
- hp:=tarrayconstructornode(hp.right);
- end;
- end;
- end;
-
-
- procedure tarrayconstructornode.insert_typeconvs;
- var
- hp : tarrayconstructornode;
- dovariant : boolean;
- begin
- dovariant:=(nf_forcevaria in flags) or tarraydef(resulttype.def).isvariant;
- { only pass left tree, right tree contains next construct if any }
- if assigned(left) then
- begin
- hp:=self;
- while assigned(hp) do
- begin
- resulttypepass(hp.left);
- { Insert typeconvs for array of const }
- if dovariant then
- begin
- case hp.left.resulttype.def.deftype of
- enumdef :
- hp.left:=ctypeconvnode.create_internal(hp.left,s32inttype);
- arraydef :
- begin
- if is_chararray(hp.left.resulttype.def) then
- hp.left:=ctypeconvnode.create_internal(hp.left,charpointertype)
- else
- if is_widechararray(hp.left.resulttype.def) then
- hp.left:=ctypeconvnode.create_internal(hp.left,widecharpointertype)
- else
- CGMessagePos1(hp.left.fileinfo,type_e_wrong_type_in_array_constructor,hp.left.resulttype.def.typename);
- end;
- orddef :
- begin
- if is_integer(hp.left.resulttype.def) and
- not(is_64bitint(hp.left.resulttype.def)) then
- hp.left:=ctypeconvnode.create(hp.left,s32inttype);
- end;
- floatdef :
- if not(is_currency(hp.left.resulttype.def)) then
- hp.left:=ctypeconvnode.create(hp.left,pbestrealtype^);
- procvardef :
- hp.left:=ctypeconvnode.create(hp.left,voidpointertype);
- stringdef,
- variantdef,
- pointerdef,
- classrefdef,
- objectdef : ;
- else
- CGMessagePos1(hp.left.fileinfo,type_e_wrong_type_in_array_constructor,hp.left.resulttype.def.typename);
- end;
- end;
- resulttypepass(hp.left);
- hp:=tarrayconstructornode(hp.right);
- end;
- end;
- end;
-
-
- function tarrayconstructornode.pass_1 : tnode;
- var
- hp : tarrayconstructornode;
- do_variant:boolean;
- begin
- do_variant:=(nf_forcevaria in flags) or tarraydef(resulttype.def).isvariant;
- result:=nil;
- { Insert required type convs, this must be
- done in pass 1, because the call must be
- resulttypepassed already }
- if assigned(left) then
- begin
- insert_typeconvs;
- { call firstpass for all nodes }
- hp:=self;
- while assigned(hp) do
- begin
- if hp.left<>nil then
- begin
- {This check is pessimistic; a call will happen depending
- on the location in which the elements will be found in
- pass 2.}
- if not do_variant then
- include(current_procinfo.flags,pi_do_call);
- firstpass(hp.left);
- end;
- hp:=tarrayconstructornode(hp.right);
- end;
- end;
- expectloc:=LOC_CREFERENCE;
- calcregisters(self,0,0,0);
- end;
-
-
- function tarrayconstructornode.docompare(p: tnode): boolean;
-
- begin
- docompare:=inherited docompare(p);
- end;
-
-
-{*****************************************************************************
- TTYPENODE
-*****************************************************************************}
-
- constructor ttypenode.create(t : ttype);
- begin
- inherited create(typen);
- restype:=t;
- allowed:=false;
- end;
-
-
- constructor ttypenode.ppuload(t:tnodetype;ppufile:tcompilerppufile);
- begin
- inherited ppuload(t,ppufile);
- ppufile.gettype(restype);
- allowed:=boolean(ppufile.getbyte);
- end;
-
-
- procedure ttypenode.ppuwrite(ppufile:tcompilerppufile);
- begin
- inherited ppuwrite(ppufile);
- ppufile.puttype(restype);
- ppufile.putbyte(byte(allowed));
- end;
-
-
- procedure ttypenode.buildderefimpl;
- begin
- inherited buildderefimpl;
- restype.buildderef;
- end;
-
-
- procedure ttypenode.derefimpl;
- begin
- inherited derefimpl;
- restype.resolve;
- end;
-
-
- function ttypenode.det_resulttype:tnode;
- begin
- result:=nil;
- resulttype:=restype;
- { check if it's valid }
- if restype.def.deftype = errordef then
- CGMessage(parser_e_illegal_expression);
- end;
-
-
- function ttypenode.pass_1 : tnode;
- begin
- result:=nil;
- expectloc:=LOC_VOID;
- { a typenode can't generate code, so we give here
- an error. Else it'll be an abstract error in pass_2.
- Only when the allowed flag is set we don't generate
- an error }
- if not allowed then
- Message(parser_e_no_type_not_allowed_here);
- end;
-
-
- function ttypenode.docompare(p: tnode): boolean;
- begin
- docompare :=
- inherited docompare(p);
- end;
-
-
-{*****************************************************************************
- TRTTINODE
-*****************************************************************************}
-
-
- constructor trttinode.create(def:tstoreddef;rt:trttitype);
- begin
- inherited create(rttin);
- rttidef:=def;
- rttitype:=rt;
- end;
-
-
- constructor trttinode.ppuload(t:tnodetype;ppufile:tcompilerppufile);
- begin
- inherited ppuload(t,ppufile);
- ppufile.getderef(rttidefderef);
- rttitype:=trttitype(ppufile.getbyte);
- end;
-
-
- procedure trttinode.ppuwrite(ppufile:tcompilerppufile);
- begin
- inherited ppuwrite(ppufile);
- ppufile.putderef(rttidefderef);
- ppufile.putbyte(byte(rttitype));
- end;
-
-
- procedure trttinode.buildderefimpl;
- begin
- inherited buildderefimpl;
- rttidefderef.build(rttidef);
- end;
-
-
- procedure trttinode.derefimpl;
- begin
- inherited derefimpl;
- rttidef:=tstoreddef(rttidefderef.resolve);
- end;
-
-
- function trttinode.getcopy : tnode;
- var
- n : trttinode;
- begin
- n:=trttinode(inherited getcopy);
- n.rttidef:=rttidef;
- n.rttitype:=rttitype;
- result:=n;
- end;
-
-
- function trttinode.det_resulttype:tnode;
- begin
- { rtti information will be returned as a void pointer }
- result:=nil;
- resulttype:=voidpointertype;
- end;
-
-
- function trttinode.pass_1 : tnode;
- begin
- result:=nil;
- expectloc:=LOC_CREFERENCE;
- end;
-
-
- function trttinode.docompare(p: tnode): boolean;
- begin
- docompare :=
- inherited docompare(p) and
- (rttidef = trttinode(p).rttidef) and
- (rttitype = trttinode(p).rttitype);
- end;
-
-
-begin
- cloadnode:=tloadnode;
- cassignmentnode:=tassignmentnode;
- carrayconstructorrangenode:=tarrayconstructorrangenode;
- carrayconstructornode:=tarrayconstructornode;
- ctypenode:=ttypenode;
- crttinode:=trttinode;
-end.
-{
- $Log: nld.pas,v $
- Revision 1.148 2005/03/28 13:36:15 florian
- + variants are now assigned using fpc_variant_copy
-
- Revision 1.147 2005/03/25 22:20:19 peter
- * add hint when passing an uninitialized variable to a var parameter
-
- Revision 1.146 2005/03/18 16:41:27 peter
- don't check size differences for booleans
-
- Revision 1.145 2005/02/14 17:13:06 peter
- * truncate log
-
- Revision 1.144 2005/02/11 16:25:26 peter
- * fix IE with array of const in array of conts
-
- Revision 1.143 2005/01/23 17:14:21 florian
- + optimized code generation on sparc
- + some stuff for pic code on sparc added
-
-}
+{
+ $Id: nld.pas,v 1.148 2005/03/28 13:36:15 florian Exp $
+ Copyright (c) 2000-2002 by Florian Klaempfl
+
+ Type checking and register allocation for load/assignment nodes
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ ****************************************************************************
+}
+unit nld;
+
+{$i fpcdefs.inc}
+
+interface
+
+ uses
+ node,
+ {$ifdef state_tracking}
+ nstate,
+ {$endif}
+ symconst,symbase,symtype,symsym,symdef;
+
+ type
+ tloadnode = class(tunarynode)
+ symtableentry : tsym;
+ symtableentryderef : tderef;
+ symtable : tsymtable;
+ procdef : tprocdef;
+ procdefderef : tderef;
+ constructor create(v : tsym;st : tsymtable);virtual;
+ constructor create_procvar(v : tsym;d:tprocdef;st : tsymtable);virtual;
+ constructor ppuload(t:tnodetype;ppufile:tcompilerppufile);override;
+ procedure ppuwrite(ppufile:tcompilerppufile);override;
+ procedure buildderefimpl;override;
+ procedure derefimpl;override;
+ procedure set_mp(p:tnode);
+ function is_addr_param_load:boolean;
+ function getcopy : tnode;override;
+ function pass_1 : tnode;override;
+ function det_resulttype:tnode;override;
+ procedure mark_write;override;
+ function docompare(p: tnode): boolean; override;
+ procedure printnodedata(var t:text);override;
+ end;
+ tloadnodeclass = class of tloadnode;
+
+ { different assignment types }
+ tassigntype = (at_normal,at_plus,at_minus,at_star,at_slash);
+
+ tassignmentnode = class(tbinarynode)
+ assigntype : tassigntype;
+ constructor create(l,r : tnode);virtual;
+ constructor ppuload(t:tnodetype;ppufile:tcompilerppufile);override;
+ procedure ppuwrite(ppufile:tcompilerppufile);override;
+ function getcopy : tnode;override;
+ function pass_1 : tnode;override;
+ function det_resulttype:tnode;override;
+ {$ifdef state_tracking}
+ function track_state_pass(exec_known:boolean):boolean;override;
+ {$endif state_tracking}
+ function docompare(p: tnode): boolean; override;
+ end;
+ tassignmentnodeclass = class of tassignmentnode;
+
+ tarrayconstructorrangenode = class(tbinarynode)
+ constructor create(l,r : tnode);virtual;
+ function pass_1 : tnode;override;
+ function det_resulttype:tnode;override;
+ end;
+ tarrayconstructorrangenodeclass = class of tarrayconstructorrangenode;
+
+ tarrayconstructornode = class(tbinarynode)
+ constructor create(l,r : tnode);virtual;
+ function getcopy : tnode;override;
+ function pass_1 : tnode;override;
+ function det_resulttype:tnode;override;
+ function docompare(p: tnode): boolean; override;
+ procedure force_type(tt:ttype);
+ procedure insert_typeconvs;
+ end;
+ tarrayconstructornodeclass = class of tarrayconstructornode;
+
+ ttypenode = class(tnode)
+ allowed : boolean;
+ restype : ttype;
+ constructor create(t : ttype);virtual;
+ constructor ppuload(t:tnodetype;ppufile:tcompilerppufile);override;
+ procedure ppuwrite(ppufile:tcompilerppufile);override;
+ procedure buildderefimpl;override;
+ procedure derefimpl;override;
+ function pass_1 : tnode;override;
+ function det_resulttype:tnode;override;
+ function docompare(p: tnode): boolean; override;
+ end;
+ ttypenodeclass = class of ttypenode;
+
+ trttinode = class(tnode)
+ l1,l2 : longint;
+ rttitype : trttitype;
+ rttidef : tstoreddef;
+ rttidefderef : tderef;
+ constructor create(def:tstoreddef;rt:trttitype);virtual;
+ constructor ppuload(t:tnodetype;ppufile:tcompilerppufile);override;
+ procedure ppuwrite(ppufile:tcompilerppufile);override;
+ procedure buildderefimpl;override;
+ procedure derefimpl;override;
+ function getcopy : tnode;override;
+ function pass_1 : tnode;override;
+ function det_resulttype:tnode;override;
+ function docompare(p: tnode): boolean; override;
+ end;
+ trttinodeclass = class of trttinode;
+
+ var
+ cloadnode : tloadnodeclass;
+ cassignmentnode : tassignmentnodeclass;
+ carrayconstructorrangenode : tarrayconstructorrangenodeclass;
+ carrayconstructornode : tarrayconstructornodeclass;
+ ctypenode : ttypenodeclass;
+ crttinode : trttinodeclass;
+
+
+
+implementation
+
+ uses
+ cutils,verbose,globtype,globals,systems,
+ symnot,
+ defutil,defcmp,
+ htypechk,pass_1,procinfo,paramgr,
+ ncon,ninl,ncnv,nmem,ncal,nutils,
+ cgobj,cgbase
+ ;
+
+{*****************************************************************************
+ TLOADNODE
+*****************************************************************************}
+
+ constructor tloadnode.create(v : tsym;st : tsymtable);
+ begin
+ inherited create(loadn,nil);
+ if not assigned(v) then
+ internalerror(200108121);
+ symtableentry:=v;
+ symtable:=st;
+ procdef:=nil;
+ end;
+
+
+ constructor tloadnode.create_procvar(v : tsym;d:tprocdef;st : tsymtable);
+ begin
+ inherited create(loadn,nil);
+ if not assigned(v) then
+ internalerror(200108121);
+ symtableentry:=v;
+ symtable:=st;
+ procdef:=d;
+ end;
+
+
+ constructor tloadnode.ppuload(t:tnodetype;ppufile:tcompilerppufile);
+ begin
+ inherited ppuload(t,ppufile);
+ ppufile.getderef(symtableentryderef);
+ symtable:=nil;
+ ppufile.getderef(procdefderef);
+ end;
+
+
+ procedure tloadnode.ppuwrite(ppufile:tcompilerppufile);
+ begin
+ inherited ppuwrite(ppufile);
+ ppufile.putderef(symtableentryderef);
+ ppufile.putderef(procdefderef);
+ end;
+
+
+ procedure tloadnode.buildderefimpl;
+ begin
+ inherited buildderefimpl;
+ symtableentryderef.build(symtableentry);
+ procdefderef.build(procdef);
+ end;
+
+
+ procedure tloadnode.derefimpl;
+ begin
+ inherited derefimpl;
+ symtableentry:=tsym(symtableentryderef.resolve);
+ symtable:=symtableentry.owner;
+ procdef:=tprocdef(procdefderef.resolve);
+ end;
+
+
+ procedure tloadnode.set_mp(p:tnode);
+ begin
+ { typen nodes should not be set }
+ if p.nodetype=typen then
+ internalerror(200301042);
+ left:=p;
+ end;
+
+
+ function tloadnode.getcopy : tnode;
+ var
+ n : tloadnode;
+
+ begin
+ n:=tloadnode(inherited getcopy);
+ n.symtable:=symtable;
+ n.symtableentry:=symtableentry;
+ n.procdef:=procdef;
+ result:=n;
+ end;
+
+
+ function tloadnode.is_addr_param_load:boolean;
+ begin
+ result:=(symtable.symtabletype=parasymtable) and
+ (symtableentry.typ=paravarsym) and
+ not(vo_has_local_copy in tparavarsym(symtableentry).varoptions) and
+ not(nf_load_self_pointer in flags) and
+ paramanager.push_addr_param(tparavarsym(symtableentry).varspez,tparavarsym(symtableentry).vartype.def,tprocdef(symtable.defowner).proccalloption);
+ end;
+
+
+ function tloadnode.det_resulttype:tnode;
+ begin
+ result:=nil;
+ case symtableentry.typ of
+ absolutevarsym :
+ resulttype:=tabsolutevarsym(symtableentry).vartype;
+ constsym:
+ begin
+ if tconstsym(symtableentry).consttyp=constresourcestring then
+ begin
+ {$ifdef ansistring_bits}
+ case aktansistring_bits of
+ sb_16:
+ resulttype:=cansistringtype16;
+ sb_32:
+ resulttype:=cansistringtype32;
+ sb_64:
+ resulttype:=cansistringtype64;
+ end;
+ {$else}
+ resulttype:=cansistringtype
+ {$endif}
+ end
+ else
+ internalerror(22799);
+ end;
+ globalvarsym,
+ paravarsym,
+ localvarsym :
+ begin
+ inc(tabstractvarsym(symtableentry).refs);
+ { Nested variable? The we need to load the framepointer of
+ the parent procedure }
+ if assigned(current_procinfo) then
+ begin
+ if (symtable.symtabletype in [localsymtable,parasymtable]) and
+ (symtable.symtablelevel<>current_procinfo.procdef.parast.symtablelevel) then
+ begin
+ if assigned(left) then
+ internalerror(200309289);
+ left:=cloadparentfpnode.create(tprocdef(symtable.defowner));
+ { reference in nested procedures, variable needs to be in memory }
+ make_not_regable(self);
+ end;
+ { static variables referenced in procedures or from finalization,
+ variable needs to be in memory.
+ It is too hard and the benefit is too small to detect whether a
+ variable is only used in the finalization to add support for it (PFV) }
+ if (symtable.symtabletype=staticsymtable) and
+ (
+ (symtable.symtablelevel<>current_procinfo.procdef.localst.symtablelevel) or
+ (current_procinfo.procdef.proctypeoption=potype_unitfinalize)
+ ) then
+ make_not_regable(self);
+ end;
+ { fix self type which is declared as voidpointer in the
+ definition }
+ if vo_is_self in tabstractvarsym(symtableentry).varoptions then
+ begin
+ resulttype.setdef(tprocdef(symtableentry.owner.defowner)._class);
+ if (po_classmethod in tprocdef(symtableentry.owner.defowner).procoptions) or
+ (po_staticmethod in tprocdef(symtableentry.owner.defowner).procoptions) then
+ resulttype.setdef(tclassrefdef.create(resulttype))
+ else if is_object(resulttype.def) and
+ (nf_load_self_pointer in flags) then
+ resulttype.setdef(tpointerdef.create(resulttype));
+ end
+ else if vo_is_vmt in tabstractvarsym(symtableentry).varoptions then
+ begin
+ resulttype.setdef(tprocdef(symtableentry.owner.defowner)._class);
+ resulttype.setdef(tclassrefdef.create(resulttype));
+ end
+ else
+ resulttype:=tabstractvarsym(symtableentry).vartype;
+ end;
+ typedconstsym :
+ resulttype:=ttypedconstsym(symtableentry).typedconsttype;
+ procsym :
+ begin
+ if not assigned(procdef) then
+ begin
+ if Tprocsym(symtableentry).procdef_count>1 then
+ CGMessage(parser_e_no_overloaded_procvars);
+ procdef:=tprocsym(symtableentry).first_procdef;
+ end;
+
+ { the result is a procdef, addrn and proc_to_procvar
+ typeconvn need this as resulttype so they know
+ that the address needs to be returned }
+ resulttype.setdef(procdef);
+
+ { process methodpointer }
+ if assigned(left) then
+ resulttypepass(left);
+ end;
+ labelsym:
+ resulttype:=voidtype;
+ else
+ internalerror(200104141);
+ end;
+ end;
+
+ procedure Tloadnode.mark_write;
+
+ begin
+ include(flags,nf_write);
+ end;
+
+ function tloadnode.pass_1 : tnode;
+ begin
+ result:=nil;
+ expectloc:=LOC_REFERENCE;
+ registersint:=0;
+ registersfpu:=0;
+{$ifdef SUPPORT_MMX}
+ registersmmx:=0;
+{$endif SUPPORT_MMX}
+ if (cs_create_pic in aktmoduleswitches) and
+ not(symtableentry.typ in [paravarsym,localvarsym]) then
+ include(current_procinfo.flags,pi_needs_got);
+
+ case symtableentry.typ of
+ absolutevarsym :
+ ;
+ constsym:
+ begin
+ if tconstsym(symtableentry).consttyp=constresourcestring then
+ expectloc:=LOC_CREFERENCE;
+ end;
+ globalvarsym,
+ localvarsym,
+ paravarsym :
+ begin
+ if assigned(left) then
+ firstpass(left);
+ if not is_addr_param_load and
+ tabstractvarsym(symtableentry).is_regvar then
+ begin
+ case tabstractvarsym(symtableentry).varregable of
+ vr_intreg :
+ expectloc:=LOC_CREGISTER;
+ vr_fpureg :
+ expectloc:=LOC_CFPUREGISTER;
+ vr_mmreg :
+ expectloc:=LOC_CMMREGISTER;
+ end
+ end
+ else
+ if (tabstractvarsym(symtableentry).varspez=vs_const) then
+ expectloc:=LOC_CREFERENCE;
+ { we need a register for call by reference parameters }
+ if paramanager.push_addr_param(tabstractvarsym(symtableentry).varspez,tabstractvarsym(symtableentry).vartype.def,pocall_default) then
+ registersint:=1;
+ if ([vo_is_thread_var,vo_is_dll_var]*tabstractvarsym(symtableentry).varoptions)<>[] then
+ registersint:=1;
+ if (target_info.system=system_powerpc_darwin) and (vo_is_dll_var in tabstractvarsym(symtableentry).varoptions) then
+ include(current_procinfo.flags,pi_needs_got);
+ { call to get address of threadvar }
+ if (vo_is_thread_var in tabstractvarsym(symtableentry).varoptions) then
+ include(current_procinfo.flags,pi_do_call);
+ if nf_write in flags then
+ Tabstractvarsym(symtableentry).trigger_notifications(vn_onwrite)
+ else
+ Tabstractvarsym(symtableentry).trigger_notifications(vn_onread);
+ { count variable references }
+ if cg.t_times>1 then
+ inc(tabstractvarsym(symtableentry).refs,cg.t_times-1);
+ end;
+ typedconstsym :
+ ;
+ procsym :
+ begin
+ { method pointer ? }
+ if assigned(left) then
+ begin
+ expectloc:=LOC_CREFERENCE;
+ firstpass(left);
+ registersint:=max(registersint,left.registersint);
+ registersfpu:=max(registersfpu,left.registersfpu);
+ {$ifdef SUPPORT_MMX}
+ registersmmx:=max(registersmmx,left.registersmmx);
+ {$endif SUPPORT_MMX}
+ end;
+ end;
+ labelsym :
+ ;
+ else
+ internalerror(200104143);
+ end;
+ end;
+
+
+ function tloadnode.docompare(p: tnode): boolean;
+ begin
+ docompare :=
+ inherited docompare(p) and
+ (symtableentry = tloadnode(p).symtableentry) and
+ (procdef = tloadnode(p).procdef) and
+ (symtable = tloadnode(p).symtable);
+ end;
+
+
+ procedure Tloadnode.printnodedata(var t:text);
+ begin
+ inherited printnodedata(t);
+ write(t,printnodeindention,'symbol = ',symtableentry.name);
+ if symtableentry.typ=procsym then
+ write(t,printnodeindention,'procdef = ',procdef.mangledname);
+ writeln(t,'');
+ end;
+
+
+{*****************************************************************************
+ TASSIGNMENTNODE
+*****************************************************************************}
+
+ constructor tassignmentnode.create(l,r : tnode);
+
+ begin
+ inherited create(assignn,l,r);
+ l.mark_write;
+ assigntype:=at_normal;
+ end;
+
+
+ constructor tassignmentnode.ppuload(t:tnodetype;ppufile:tcompilerppufile);
+ begin
+ inherited ppuload(t,ppufile);
+ assigntype:=tassigntype(ppufile.getbyte);
+ end;
+
+
+ procedure tassignmentnode.ppuwrite(ppufile:tcompilerppufile);
+ begin
+ inherited ppuwrite(ppufile);
+ ppufile.putbyte(byte(assigntype));
+ end;
+
+
+ function tassignmentnode.getcopy : tnode;
+
+ var
+ n : tassignmentnode;
+
+ begin
+ n:=tassignmentnode(inherited getcopy);
+ n.assigntype:=assigntype;
+ getcopy:=n;
+ end;
+
+
+ function tassignmentnode.det_resulttype:tnode;
+ var
+ hp : tnode;
+ useshelper : boolean;
+ original_size : longint;
+ begin
+ result:=nil;
+ resulttype:=voidtype;
+ original_size := 0;
+
+ { must be made unique }
+ set_unique(left);
+
+ resulttypepass(left);
+
+ if is_ansistring(left.resulttype.def) then
+ begin
+ { fold <ansistring>:=<ansistring>+<char|shortstring|ansistring> }
+ if (right.nodetype=addn) and
+ left.isequal(tbinarynode(right).left) and
+ { don't fold multiple concatenations else we could get trouble
+ with multiple uses of s
+ }
+ (tbinarynode(right).left.nodetype<>addn) and
+ (tbinarynode(right).right.nodetype<>addn) then
+ begin
+ { don't do a resulttypepass(right), since then the addnode }
+ { may insert typeconversions that make this optimization }
+ { opportunity quite difficult to detect (JM) }
+ resulttypepass(tbinarynode(right).left);
+ resulttypepass(tbinarynode(right).right);
+ if (is_char(tbinarynode(right).right.resulttype.def) or
+ is_shortstring(tbinarynode(right).right.resulttype.def) or
+ is_ansistring(tbinarynode(right).right.resulttype.def)) then
+ begin
+ { remove property flag so it'll not trigger an error }
+ exclude(left.flags,nf_isproperty);
+ { generate call to helper }
+ hp:=ccallparanode.create(tbinarynode(right).right,
+ ccallparanode.create(left,nil));
+ if is_char(tbinarynode(right).right.resulttype.def) then
+ result:=ccallnode.createintern('fpc_'+Tstringdef(left.resulttype.def).stringtypname+'_append_char',hp)
+ else if is_shortstring(tbinarynode(right).right.resulttype.def) then
+ result:=ccallnode.createintern('fpc_'+Tstringdef(left.resulttype.def).stringtypname+'_append_shortstring',hp)
+ else
+ result:=ccallnode.createintern('fpc_'+Tstringdef(left.resulttype.def).stringtypname+'_append_ansistring',hp);
+ tbinarynode(right).right:=nil;
+ left:=nil;
+ exit;
+ end;
+ end;
+ end
+ else
+ if is_shortstring(left.resulttype.def) then
+ begin
+ { fold <shortstring>:=<shortstring>+<shortstring>,
+ <shortstring>+<char> is handled by an optimized node }
+ if (right.nodetype=addn) and
+ left.isequal(tbinarynode(right).left) and
+ { don't fold multiple concatenations else we could get trouble
+ with multiple uses of s }
+ (tbinarynode(right).left.nodetype<>addn) and
+ (tbinarynode(right).right.nodetype<>addn) then
+ begin
+ { don't do a resulttypepass(right), since then the addnode }
+ { may insert typeconversions that make this optimization }
+ { opportunity quite difficult to detect (JM) }
+ resulttypepass(tbinarynode(right).left);
+ resulttypepass(tbinarynode(right).right);
+ if is_shortstring(tbinarynode(right).right.resulttype.def) then
+ begin
+ { remove property flag so it'll not trigger an error }
+ exclude(left.flags,nf_isproperty);
+ { generate call to helper }
+ hp:=ccallparanode.create(tbinarynode(right).right,
+ ccallparanode.create(left,nil));
+ if is_shortstring(tbinarynode(right).right.resulttype.def) then
+ result:=ccallnode.createintern('fpc_shortstr_append_shortstr',hp);
+ tbinarynode(right).right:=nil;
+ left:=nil;
+ exit;
+ end;
+ end;
+ end;
+
+ resulttypepass(right);
+ set_varstate(left,vs_assigned,[]);
+ set_varstate(right,vs_used,[vsf_must_be_valid]);
+ if codegenerror then
+ exit;
+
+ { tp procvar support, when we don't expect a procvar
+ then we need to call the procvar }
+ if (left.resulttype.def.deftype<>procvardef) then
+ maybe_call_procvar(right,true);
+
+ { assignments to formaldefs and open arrays aren't allowed }
+ if (left.resulttype.def.deftype=formaldef) or
+ is_open_array(left.resulttype.def) then
+ CGMessage(type_e_operator_not_allowed);
+
+ { test if node can be assigned, properties are allowed }
+ valid_for_assignment(left);
+
+ { assigning nil to a dynamic array clears the array }
+ if is_dynamic_array(left.resulttype.def) and
+ (right.nodetype=niln) then
+ begin
+ hp:=ccallparanode.create(caddrnode.create_internal
+ (crttinode.create(tstoreddef(left.resulttype.def),initrtti)),
+ ccallparanode.create(ctypeconvnode.create_internal(left,voidpointertype),nil));
+ result := ccallnode.createintern('fpc_dynarray_clear',hp);
+ left:=nil;
+ exit;
+ end;
+
+ { shortstring helpers can do the conversion directly,
+ so treat them separatly }
+ if (is_shortstring(left.resulttype.def)) then
+ begin
+ { insert typeconv, except for chars that are handled in
+ secondpass and except for ansi/wide string that can
+ be converted immediatly }
+ if not(is_char(right.resulttype.def) or
+ (right.resulttype.def.deftype=stringdef)) then
+ inserttypeconv(right,left.resulttype);
+ if right.resulttype.def.deftype=stringdef then
+ begin
+ useshelper:=true;
+ { convert constant strings to shortstrings. But
+ skip empty constant strings, that will be handled
+ in secondpass }
+ if (right.nodetype=stringconstn) then
+ begin
+ { verify if range fits within shortstring }
+ { just emit a warning, delphi gives an }
+ { error, only if the type definition of }
+ { of the string is less < 255 characters }
+ if not is_open_string(left.resulttype.def) and
+ (tstringconstnode(right).len > tstringdef(left.resulttype.def).len) then
+ cgmessage(type_w_string_too_long);
+ inserttypeconv(right,left.resulttype);
+ if (tstringconstnode(right).len=0) then
+ useshelper:=false;
+ end;
+ { rest is done in pass 1 (JM) }
+ if useshelper then
+ exit;
+ end
+ end
+ else
+ begin
+ { get the size before the type conversion - check for all nodes }
+ if assigned(right.resulttype.def) and
+ (right.resulttype.def.deftype in [enumdef,orddef,floatdef]) and
+ (right.nodetype in [loadn,vecn,calln]) then
+ original_size := right.resulttype.def.size;
+ inserttypeconv(right,left.resulttype);
+ end;
+
+ { check if the assignment may cause a range check error }
+ { if its not explicit, and only if the values are }
+ { ordinals, enumdef and floatdef }
+ if (right.nodetype = typeconvn) and
+ not (nf_explicit in ttypeconvnode(right).flags) then
+ begin
+ if assigned(left.resulttype.def) and
+ (left.resulttype.def.deftype in [enumdef,orddef,floatdef]) and
+ not is_boolean(left.resulttype.def) then
+ begin
+ if (original_size <> 0) and
+ (left.resulttype.def.size < original_size) then
+ begin
+ if (cs_check_range in aktlocalswitches) then
+ Message(type_w_smaller_possible_range_check)
+ else
+ Message(type_h_smaller_possible_range_check);
+ end;
+ end;
+ end;
+
+ { call helpers for interface }
+ if is_interfacecom(left.resulttype.def) then
+ begin
+ hp:=ccallparanode.create(ctypeconvnode.create_internal
+ (right,voidpointertype),
+ ccallparanode.create(ctypeconvnode.create_internal
+ (left,voidpointertype),nil));
+ result:=ccallnode.createintern('fpc_intf_assign',hp);
+ left:=nil;
+ right:=nil;
+ exit;
+ end;
+ { call helpers for variant, they can contain non ref. counted types like
+ vararrays which must be really copied }
+ if left.resulttype.def.deftype=variantdef then
+ begin
+ hp:=ccallparanode.create(ctypeconvnode.create_internal(
+ caddrnode.create_internal(right),voidpointertype),
+ ccallparanode.create(ctypeconvnode.create_internal(
+ caddrnode.create_internal(left),voidpointertype),
+ nil));
+ result:=ccallnode.createintern('fpc_variant_copy',hp);
+ left:=nil;
+ right:=nil;
+ exit;
+ end;
+
+ { check if local proc/func is assigned to procvar }
+ if right.resulttype.def.deftype=procvardef then
+ test_local_to_procvar(tprocvardef(right.resulttype.def),left.resulttype.def);
+ end;
+
+
+ function tassignmentnode.pass_1 : tnode;
+ var
+ hp: tnode;
+ begin
+ result:=nil;
+ expectloc:=LOC_VOID;
+
+ firstpass(left);
+ firstpass(right);
+ { assignment to refcounted variable -> inc/decref }
+ if (not is_class(left.resulttype.def) and
+ left.resulttype.def.needs_inittable) then
+ include(current_procinfo.flags,pi_do_call);
+
+ if codegenerror then
+ exit;
+
+
+ if (is_shortstring(left.resulttype.def)) then
+ begin
+ if right.resulttype.def.deftype=stringdef then
+ begin
+ if (right.nodetype<>stringconstn) or
+ (tstringconstnode(right).len<>0) then
+ begin
+ if (cs_optimize in aktglobalswitches) and
+ (right.nodetype in [calln,blockn]) and
+ (left.nodetype = temprefn) and
+ is_shortstring(right.resulttype.def) and
+ not is_open_string(left.resulttype.def) and
+ (tstringdef(left.resulttype.def).len = 255) then
+ begin
+ { the blocknode case is handled in pass_2 at the temp }
+ { reference level (mainly for callparatemp) (JM) }
+ if (right.nodetype = calln) then
+ begin
+ tcallnode(right).funcretnode := left;
+ result := right;
+ end
+ else
+ exit;
+ end
+ else
+ begin
+ hp:=ccallparanode.create
+ (right,
+ ccallparanode.create(cinlinenode.create
+ (in_high_x,false,left.getcopy),nil));
+ result:=ccallnode.createinternreturn('fpc_'+tstringdef(right.resulttype.def).stringtypname+'_to_shortstr',hp,left);
+ firstpass(result);
+ end;
+ left:=nil;
+ right:=nil;
+ exit;
+ end;
+ end;
+ end;
+
+ if (cs_optimize in aktglobalswitches) and
+ (right.nodetype = calln) and
+ { left must be a temp, since otherwise as soon as you modify the }
+ { result, the current left node is modified and that one may }
+ { still be an argument to the function or even accessed in the }
+ { function }
+ (((left.nodetype = temprefn) and
+ paramanager.ret_in_param(right.resulttype.def,
+ tcallnode(right).procdefinition.proccalloption)) or
+ { there's special support for ansi/widestrings in the callnode }
+ is_ansistring(right.resulttype.def) or
+ is_widestring(right.resulttype.def)) then
+ begin
+ tcallnode(right).funcretnode := left;
+ result := right;
+ left := nil;
+ right := nil;
+ exit;
+ end;
+
+
+ registersint:=left.registersint+right.registersint;
+ registersfpu:=max(left.registersfpu,right.registersfpu);
+{$ifdef SUPPORT_MMX}
+ registersmmx:=max(left.registersmmx,right.registersmmx);
+{$endif SUPPORT_MMX}
+ end;
+
+
+ function tassignmentnode.docompare(p: tnode): boolean;
+ begin
+ docompare :=
+ inherited docompare(p) and
+ (assigntype = tassignmentnode(p).assigntype);
+ end;
+
+{$ifdef state_tracking}
+ function Tassignmentnode.track_state_pass(exec_known:boolean):boolean;
+
+ var se:Tstate_entry;
+
+ begin
+ track_state_pass:=false;
+ if exec_known then
+ begin
+ track_state_pass:=right.track_state_pass(exec_known);
+ {Force a new resulttype pass.}
+ right.resulttype.def:=nil;
+ do_resulttypepass(right);
+ resulttypepass(right);
+ aktstate.store_fact(left.getcopy,right.getcopy);
+ end
+ else
+ aktstate.delete_fact(left);
+ end;
+{$endif}
+
+
+{*****************************************************************************
+ TARRAYCONSTRUCTORRANGENODE
+*****************************************************************************}
+
+ constructor tarrayconstructorrangenode.create(l,r : tnode);
+
+ begin
+ inherited create(arrayconstructorrangen,l,r);
+ end;
+
+ function tarrayconstructorrangenode.det_resulttype:tnode;
+ begin
+ result:=nil;
+ resulttypepass(left);
+ resulttypepass(right);
+ set_varstate(left,vs_used,[vsf_must_be_valid]);
+ set_varstate(right,vs_used,[vsf_must_be_valid]);
+ if codegenerror then
+ exit;
+ resulttype:=left.resulttype;
+ end;
+
+
+ function tarrayconstructorrangenode.pass_1 : tnode;
+ begin
+ firstpass(left);
+ firstpass(right);
+ expectloc:=LOC_CREFERENCE;
+ calcregisters(self,0,0,0);
+ result:=nil;
+ end;
+
+
+{****************************************************************************
+ TARRAYCONSTRUCTORNODE
+*****************************************************************************}
+
+ constructor tarrayconstructornode.create(l,r : tnode);
+ begin
+ inherited create(arrayconstructorn,l,r);
+ end;
+
+
+ function tarrayconstructornode.getcopy : tnode;
+ var
+ n : tarrayconstructornode;
+ begin
+ n:=tarrayconstructornode(inherited getcopy);
+ result:=n;
+ end;
+
+
+ function tarrayconstructornode.det_resulttype:tnode;
+ var
+ htype : ttype;
+ hp : tarrayconstructornode;
+ len : longint;
+ varia : boolean;
+ begin
+ result:=nil;
+
+ { are we allowing array constructor? Then convert it to a set }
+ if not allow_array_constructor then
+ begin
+ hp:=tarrayconstructornode(getcopy);
+ arrayconstructor_to_set(tnode(hp));
+ result:=hp;
+ exit;
+ end;
+
+ { only pass left tree, right tree contains next construct if any }
+ htype.reset;
+ len:=0;
+ varia:=false;
+ if assigned(left) then
+ begin
+ hp:=self;
+ while assigned(hp) do
+ begin
+ resulttypepass(hp.left);
+ set_varstate(hp.left,vs_used,[vsf_must_be_valid]);
+ if (htype.def=nil) then
+ htype:=hp.left.resulttype
+ else
+ begin
+ if ((nf_novariaallowed in flags) or (not varia)) and
+ (not equal_defs(htype.def,hp.left.resulttype.def)) then
+ begin
+ varia:=true;
+ end;
+ end;
+ inc(len);
+ hp:=tarrayconstructornode(hp.right);
+ end;
+ end;
+ { Set the type of empty or varia arrays to void. Also
+ do this if the type is array of const/open array
+ because those can't be used with setelementtype }
+ if not assigned(htype.def) or
+ varia or
+ is_array_of_const(htype.def) or
+ is_open_array(htype.def) then
+ htype:=voidtype;
+ resulttype.setdef(tarraydef.create(0,len-1,s32inttype));
+ tarraydef(resulttype.def).setelementtype(htype);
+ tarraydef(resulttype.def).IsConstructor:=true;
+ tarraydef(resulttype.def).IsVariant:=varia;
+ end;
+
+
+ procedure tarrayconstructornode.force_type(tt:ttype);
+ var
+ hp : tarrayconstructornode;
+ begin
+ tarraydef(resulttype.def).setelementtype(tt);
+ tarraydef(resulttype.def).IsConstructor:=true;
+ tarraydef(resulttype.def).IsVariant:=false;
+ if assigned(left) then
+ begin
+ hp:=self;
+ while assigned(hp) do
+ begin
+ inserttypeconv(hp.left,tt);
+ hp:=tarrayconstructornode(hp.right);
+ end;
+ end;
+ end;
+
+
+ procedure tarrayconstructornode.insert_typeconvs;
+ var
+ hp : tarrayconstructornode;
+ dovariant : boolean;
+ begin
+ dovariant:=(nf_forcevaria in flags) or tarraydef(resulttype.def).isvariant;
+ { only pass left tree, right tree contains next construct if any }
+ if assigned(left) then
+ begin
+ hp:=self;
+ while assigned(hp) do
+ begin
+ resulttypepass(hp.left);
+ { Insert typeconvs for array of const }
+ if dovariant then
+ begin
+ case hp.left.resulttype.def.deftype of
+ enumdef :
+ hp.left:=ctypeconvnode.create_internal(hp.left,s32inttype);
+ arraydef :
+ begin
+ if is_chararray(hp.left.resulttype.def) then
+ hp.left:=ctypeconvnode.create_internal(hp.left,charpointertype)
+ else
+ if is_widechararray(hp.left.resulttype.def) then
+ hp.left:=ctypeconvnode.create_internal(hp.left,widecharpointertype)
+ else
+ CGMessagePos1(hp.left.fileinfo,type_e_wrong_type_in_array_constructor,hp.left.resulttype.def.typename);
+ end;
+ orddef :
+ begin
+ if is_integer(hp.left.resulttype.def) and
+ not(is_64bitint(hp.left.resulttype.def)) then
+ hp.left:=ctypeconvnode.create(hp.left,s32inttype);
+ end;
+ floatdef :
+ if not(is_currency(hp.left.resulttype.def)) then
+ hp.left:=ctypeconvnode.create(hp.left,pbestrealtype^);
+ procvardef :
+ hp.left:=ctypeconvnode.create(hp.left,voidpointertype);
+ stringdef,
+ variantdef,
+ pointerdef,
+ classrefdef,
+ objectdef : ;
+ else
+ CGMessagePos1(hp.left.fileinfo,type_e_wrong_type_in_array_constructor,hp.left.resulttype.def.typename);
+ end;
+ end;
+ resulttypepass(hp.left);
+ hp:=tarrayconstructornode(hp.right);
+ end;
+ end;
+ end;
+
+
+ function tarrayconstructornode.pass_1 : tnode;
+ var
+ hp : tarrayconstructornode;
+ do_variant:boolean;
+ begin
+ do_variant:=(nf_forcevaria in flags) or tarraydef(resulttype.def).isvariant;
+ result:=nil;
+ { Insert required type convs, this must be
+ done in pass 1, because the call must be
+ resulttypepassed already }
+ if assigned(left) then
+ begin
+ insert_typeconvs;
+ { call firstpass for all nodes }
+ hp:=self;
+ while assigned(hp) do
+ begin
+ if hp.left<>nil then
+ begin
+ {This check is pessimistic; a call will happen depending
+ on the location in which the elements will be found in
+ pass 2.}
+ if not do_variant then
+ include(current_procinfo.flags,pi_do_call);
+ firstpass(hp.left);
+ end;
+ hp:=tarrayconstructornode(hp.right);
+ end;
+ end;
+ expectloc:=LOC_CREFERENCE;
+ calcregisters(self,0,0,0);
+ end;
+
+
+ function tarrayconstructornode.docompare(p: tnode): boolean;
+
+ begin
+ docompare:=inherited docompare(p);
+ end;
+
+
+{*****************************************************************************
+ TTYPENODE
+*****************************************************************************}
+
+ constructor ttypenode.create(t : ttype);
+ begin
+ inherited create(typen);
+ restype:=t;
+ allowed:=false;
+ end;
+
+
+ constructor ttypenode.ppuload(t:tnodetype;ppufile:tcompilerppufile);
+ begin
+ inherited ppuload(t,ppufile);
+ ppufile.gettype(restype);
+ allowed:=boolean(ppufile.getbyte);
+ end;
+
+
+ procedure ttypenode.ppuwrite(ppufile:tcompilerppufile);
+ begin
+ inherited ppuwrite(ppufile);
+ ppufile.puttype(restype);
+ ppufile.putbyte(byte(allowed));
+ end;
+
+
+ procedure ttypenode.buildderefimpl;
+ begin
+ inherited buildderefimpl;
+ restype.buildderef;
+ end;
+
+
+ procedure ttypenode.derefimpl;
+ begin
+ inherited derefimpl;
+ restype.resolve;
+ end;
+
+
+ function ttypenode.det_resulttype:tnode;
+ begin
+ result:=nil;
+ resulttype:=restype;
+ { check if it's valid }
+ if restype.def.deftype = errordef then
+ CGMessage(parser_e_illegal_expression);
+ end;
+
+
+ function ttypenode.pass_1 : tnode;
+ begin
+ result:=nil;
+ expectloc:=LOC_VOID;
+ { a typenode can't generate code, so we give here
+ an error. Else it'll be an abstract error in pass_2.
+ Only when the allowed flag is set we don't generate
+ an error }
+ if not allowed then
+ Message(parser_e_no_type_not_allowed_here);
+ end;
+
+
+ function ttypenode.docompare(p: tnode): boolean;
+ begin
+ docompare :=
+ inherited docompare(p);
+ end;
+
+
+{*****************************************************************************
+ TRTTINODE
+*****************************************************************************}
+
+
+ constructor trttinode.create(def:tstoreddef;rt:trttitype);
+ begin
+ inherited create(rttin);
+ rttidef:=def;
+ rttitype:=rt;
+ end;
+
+
+ constructor trttinode.ppuload(t:tnodetype;ppufile:tcompilerppufile);
+ begin
+ inherited ppuload(t,ppufile);
+ ppufile.getderef(rttidefderef);
+ rttitype:=trttitype(ppufile.getbyte);
+ end;
+
+
+ procedure trttinode.ppuwrite(ppufile:tcompilerppufile);
+ begin
+ inherited ppuwrite(ppufile);
+ ppufile.putderef(rttidefderef);
+ ppufile.putbyte(byte(rttitype));
+ end;
+
+
+ procedure trttinode.buildderefimpl;
+ begin
+ inherited buildderefimpl;
+ rttidefderef.build(rttidef);
+ end;
+
+
+ procedure trttinode.derefimpl;
+ begin
+ inherited derefimpl;
+ rttidef:=tstoreddef(rttidefderef.resolve);
+ end;
+
+
+ function trttinode.getcopy : tnode;
+ var
+ n : trttinode;
+ begin
+ n:=trttinode(inherited getcopy);
+ n.rttidef:=rttidef;
+ n.rttitype:=rttitype;
+ result:=n;
+ end;
+
+
+ function trttinode.det_resulttype:tnode;
+ begin
+ { rtti information will be returned as a void pointer }
+ result:=nil;
+ resulttype:=voidpointertype;
+ end;
+
+
+ function trttinode.pass_1 : tnode;
+ begin
+ result:=nil;
+ expectloc:=LOC_CREFERENCE;
+ end;
+
+
+ function trttinode.docompare(p: tnode): boolean;
+ begin
+ docompare :=
+ inherited docompare(p) and
+ (rttidef = trttinode(p).rttidef) and
+ (rttitype = trttinode(p).rttitype);
+ end;
+
+
+begin
+ cloadnode:=tloadnode;
+ cassignmentnode:=tassignmentnode;
+ carrayconstructorrangenode:=tarrayconstructorrangenode;
+ carrayconstructornode:=tarrayconstructornode;
+ ctypenode:=ttypenode;
+ crttinode:=trttinode;
+end.
+{
+ $Log: nld.pas,v $
+ Revision 1.148 2005/03/28 13:36:15 florian
+ + variants are now assigned using fpc_variant_copy
+
+ Revision 1.147 2005/03/25 22:20:19 peter
+ * add hint when passing an uninitialized variable to a var parameter
+
+ Revision 1.146 2005/03/18 16:41:27 peter
+ don't check size differences for booleans
+
+ Revision 1.145 2005/02/14 17:13:06 peter
+ * truncate log
+
+ Revision 1.144 2005/02/11 16:25:26 peter
+ * fix IE with array of const in array of conts
+
+ Revision 1.143 2005/01/23 17:14:21 florian
+ + optimized code generation on sparc
+ + some stuff for pic code on sparc added
+
+}
diff --git a/fcl/db/dbase/package.txt b/fcl/db/dbase/package.txt
index 6b91c1821e..5830db2d50 100644
--- a/fcl/db/dbase/package.txt
+++ b/fcl/db/dbase/package.txt
@@ -1,11 +1,11 @@
-Help on packages:
-
-TDbf_<< (D)elphi | (C)++Builder | (K)ylix | (L)azarus >> << Version >> << (D)esign | <R>untime >>
-
-eg:
-
-TDbf_c5d = C++ Builder 5 design time package
-TDbf_d6r = Delphi 6 runtime package
-TDbf_l = Lazarus design/runtime package
-
-NOTE: Version 4 and earlier don't have designtime/runtime separated packages
+Help on packages:
+
+TDbf_<< (D)elphi | (C)++Builder | (K)ylix | (L)azarus >> << Version >> << (D)esign | <R>untime >>
+
+eg:
+
+TDbf_c5d = C++ Builder 5 design time package
+TDbf_d6r = Delphi 6 runtime package
+TDbf_l = Lazarus design/runtime package
+
+NOTE: Version 4 and earlier don't have designtime/runtime separated packages
diff --git a/packages/extra/winunits/jediapilib.inc b/packages/extra/winunits/jediapilib.inc
index a6aa431938..079bc73623 100644
--- a/packages/extra/winunits/jediapilib.inc
+++ b/packages/extra/winunits/jediapilib.inc
@@ -1,258 +1,258 @@
-{$IFNDEF JEDIAPILIB_INC}
-{$DEFINE JEDIAPILIB_INC}
-
-{******************************************************************************}
-{ }
-{ Windows Version Unit for Object Pascal }
-{ }
-{ Portions created by Robert Marquardt are Copyright (C) 2004 }
-{ Robert Marquardt. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-{$A+,Z4}
-
-// This file is intended for C header conversions.
-// It defines several mutually exclusive IFDEFs which determine
-// the Windows version the API conversion is usable with.
-
-// Global switch to enable dynamic linking of some APIs
-{.DEFINE DYNAMIC_LINK}
-{$IFDEF DYNAMIC_LINK}
- {$STACKFRAMES ON}
- {$WARNINGS OFF}
-{$ENDIF DYNAMIC_LINK}
-
-// allow FPC compat without any extra params.
-{$ifdef FPC}
-{$MODE Delphi}
-{$DEFINE NOVCL}
-{$else}
-{$DEFINE SUPPORTS_DISPID}
-{$ENDIF}
-
-// Global switch to make UNICODE versions of API functions default
-{.DEFINE UNICODE}
-
-// Global switch to activate the use of the original basic types of
-// Delphi Windows.pas. Either indirectly in JwaWinType.pas or
-// directly through the use of Windows.pas instead of JwaWinType.pas.
-{$DEFINE USE_DELPHI_TYPES}
-
-// Global switch for the Windows version the files are compatible with
-// ONLY A SINGLE ONE IS ALLOWED TO BE ACTIVATED BY CHANGING THE DOT TO A DOLLAR SIGN!
-// Default is WINXP
-{.DEFINE WIN95}
-{.DEFINE WIN98}
-{.DEFINE WIN98SE}
-{.DEFINE WIN98ME}
-{.DEFINE WINNT4}
-{.DEFINE WIN2000}
-{$DEFINE WINXP}
-{.DEFINE WIN2003}
-
-// Global switch for the Windows Internet Explorer versions
-// ONLY A SINGLE ONE IS ALLOWED TO BE ACTIVATED BY CHANGING THE DOT TO A DOLLAR SIGN!
-// Default is IE600
-{.DEFINE IE300}
-{.DEFINE IE400}
-{.DEFINE IE401}
-{.DEFINE IE500}
-{.DEFINE IE501}
-{.DEFINE IE560}
-{$DEFINE IE600}
-
-// Global switch for the MSI (Microsoft Installer) versions
-// ONLY A SINGLE ONE IS ALLOWED TO BE ACTIVATED BY CHANGING THE DOT TO A DOLLAR SIGN!
-// if none is set a default is determined from the Windows version IFDEFs
-{.DEFINE MSI100}
-{.DEFINE MSI110}
-{.DEFINE MSI200}
-
-// Global switch for the HtmlHelp versions
-// ONLY A SINGLE ONE IS ALLOWED TO BE ACTIVATED BY CHANGING THE DOT TO A DOLLAR SIGN!
-// default is HTMLHELP12
-{.DEFINE HTMLHELP11}
-{$DEFINE HTMLHELP12}
-
-// secondary IFDEFs for "_UP" which means also any later OS version
-{$IFDEF WIN2003}
- {$DEFINE WIN95_UP}
- {$DEFINE WIN98_UP}
- {$DEFINE WIN98SE_UP}
- {$DEFINE WIN98ME_UP}
- {$DEFINE WINNT4_UP}
- {$DEFINE WIN2000_UP}
- {$DEFINE WINXP_UP}
- {$DEFINE WIN2003_UP}
-{$ENDIF WIN2003}
-
-{$IFDEF WINXP}
- {$DEFINE WIN95_UP}
- {$DEFINE WIN98_UP}
- {$DEFINE WIN98SE_UP}
- {$DEFINE WIN98ME_UP}
- {$DEFINE WINNT4_UP}
- {$DEFINE WIN2000_UP}
- {$DEFINE WINXP_UP}
-{$ENDIF WINXP}
-
-{$IFDEF WIN2000}
- {$DEFINE WIN95_UP}
- {$DEFINE WIN98_UP}
- {$DEFINE WIN98SE_UP}
- {$DEFINE WIN98ME_UP}
- {$DEFINE WINNT4_UP}
- {$DEFINE WIN2000_UP}
-{$ENDIF WIN2000}
-
-{$IFDEF WINNT4}
- {$DEFINE WIN95_UP}
- {$DEFINE WIN98_UP}
- {$DEFINE WIN98SE_UP}
- {$DEFINE WIN98ME_UP}
- {$DEFINE WINNT4_UP}
-{$ENDIF WINNT4}
-
-{$IFDEF WIN98ME}
- {$DEFINE WIN95_UP}
- {$DEFINE WIN98_UP}
- {$DEFINE WIN98SE_UP}
- {$DEFINE WIN98ME_UP}
-{$ENDIF WIN98ME}
-
-{$IFDEF WIN98SE}
- {$DEFINE WIN95_UP}
- {$DEFINE WIN98_UP}
- {$DEFINE WIN98SE_UP}
-{$ENDIF WIN98SE}
-
-{$IFDEF WIN98}
- {$DEFINE WIN95_UP}
- {$DEFINE WIN98_UP}
-{$ENDIF WIN98}
-
-{$IFDEF WIN95}
- {$DEFINE WIN95_UP}
-{$ENDIF WIN95}
-
-
-// secondary IFDEFs for "_UP" which means also any later IE version
-{$IFDEF IE600}
- {$DEFINE IE300_UP}
- {$DEFINE IE400_UP}
- {$DEFINE IE401_UP}
- {$DEFINE IE500_UP}
- {$DEFINE IE501_UP}
- {$DEFINE IE560_UP}
- {$DEFINE IE600_UP}
-{$ENDIF IE600}
-
-{$IFDEF IE560}
- {$DEFINE IE300_UP}
- {$DEFINE IE400_UP}
- {$DEFINE IE401_UP}
- {$DEFINE IE500_UP}
- {$DEFINE IE501_UP}
- {$DEFINE IE560_UP}
-{$ENDIF IE560}
-
-{$IFDEF IE501}
- {$DEFINE IE300_UP}
- {$DEFINE IE400_UP}
- {$DEFINE IE401_UP}
- {$DEFINE IE500_UP}
- {$DEFINE IE501_UP}
-{$ENDIF IE501}
-
-{$IFDEF IE500}
- {$DEFINE IE300_UP}
- {$DEFINE IE400_UP}
- {$DEFINE IE401_UP}
- {$DEFINE IE500_UP}
-{$ENDIF IE500}
-
-{$IFDEF IE401}
- {$DEFINE IE300_UP}
- {$DEFINE IE400_UP}
- {$DEFINE IE401_UP}
-{$ENDIF IE401}
-
-{$IFDEF IE400}
- {$DEFINE IE300_UP}
- {$DEFINE IE400_UP}
-{$ENDIF IE400}
-
-{$IFDEF IE300}
- {$DEFINE IE300_UP}
-{$ENDIF IE300}
-
-// IFDEF defaults for MSI (Microsoft Installer)
-{$IFNDEF MSI200}
-{$IFNDEF MSI110}
-{$IFNDEF MSI100}
- {$IFDEF WINXP_UP}
- {$DEFINE MSI200}
- {$ELSE}
- {$IFDEF WIN2000_UP}
- {$DEFINE MSI110}
- {$ELSE}
- {$DEFINE MSI100}
- {$ENDIF WIN2000_UP}
- {$ENDIF WINXP_UP}
-{$ENDIF !MSI100}
-{$ENDIF !MSI110}
-{$ENDIF !MSI200}
-
-// secondary IFDEFs for MSI (Microsoft Installer)
-{$IFDEF MSI200}
- {$DEFINE MSI200_UP}
- {$DEFINE MSI110_UP}
- {$DEFINE MSI100_UP}
-{$ENDIF MSI200}
-
-{$IFDEF MSI110}
- {$DEFINE MSI110_UP}
- {$DEFINE MSI100_UP}
-{$ENDIF MSI110}
-
-{$IFDEF MSI100}
- {$DEFINE MSI100_UP}
-{$ENDIF MSI100}
-
-// secondary IFDEFs for HtmlHelp
-{$IFDEF HTMLHELP12}
- {$DEFINE HTMLHELP12_UP}
- {$DEFINE HTMLHELP11_UP}
-{$ENDIF HTMLHELP12}
-
-{$IFDEF HTMLHELP11}
- {$DEFINE HTMLHELP11_UP}
-{$ENDIF HTMLHELP11}
-
-{$ENDIF ~JEDIAPILIB_INC}
+{$IFNDEF JEDIAPILIB_INC}
+{$DEFINE JEDIAPILIB_INC}
+
+{******************************************************************************}
+{ }
+{ Windows Version Unit for Object Pascal }
+{ }
+{ Portions created by Robert Marquardt are Copyright (C) 2004 }
+{ Robert Marquardt. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+{$A+,Z4}
+
+// This file is intended for C header conversions.
+// It defines several mutually exclusive IFDEFs which determine
+// the Windows version the API conversion is usable with.
+
+// Global switch to enable dynamic linking of some APIs
+{.DEFINE DYNAMIC_LINK}
+{$IFDEF DYNAMIC_LINK}
+ {$STACKFRAMES ON}
+ {$WARNINGS OFF}
+{$ENDIF DYNAMIC_LINK}
+
+// allow FPC compat without any extra params.
+{$ifdef FPC}
+{$MODE Delphi}
+{$DEFINE NOVCL}
+{$else}
+{$DEFINE SUPPORTS_DISPID}
+{$ENDIF}
+
+// Global switch to make UNICODE versions of API functions default
+{.DEFINE UNICODE}
+
+// Global switch to activate the use of the original basic types of
+// Delphi Windows.pas. Either indirectly in JwaWinType.pas or
+// directly through the use of Windows.pas instead of JwaWinType.pas.
+{$DEFINE USE_DELPHI_TYPES}
+
+// Global switch for the Windows version the files are compatible with
+// ONLY A SINGLE ONE IS ALLOWED TO BE ACTIVATED BY CHANGING THE DOT TO A DOLLAR SIGN!
+// Default is WINXP
+{.DEFINE WIN95}
+{.DEFINE WIN98}
+{.DEFINE WIN98SE}
+{.DEFINE WIN98ME}
+{.DEFINE WINNT4}
+{.DEFINE WIN2000}
+{$DEFINE WINXP}
+{.DEFINE WIN2003}
+
+// Global switch for the Windows Internet Explorer versions
+// ONLY A SINGLE ONE IS ALLOWED TO BE ACTIVATED BY CHANGING THE DOT TO A DOLLAR SIGN!
+// Default is IE600
+{.DEFINE IE300}
+{.DEFINE IE400}
+{.DEFINE IE401}
+{.DEFINE IE500}
+{.DEFINE IE501}
+{.DEFINE IE560}
+{$DEFINE IE600}
+
+// Global switch for the MSI (Microsoft Installer) versions
+// ONLY A SINGLE ONE IS ALLOWED TO BE ACTIVATED BY CHANGING THE DOT TO A DOLLAR SIGN!
+// if none is set a default is determined from the Windows version IFDEFs
+{.DEFINE MSI100}
+{.DEFINE MSI110}
+{.DEFINE MSI200}
+
+// Global switch for the HtmlHelp versions
+// ONLY A SINGLE ONE IS ALLOWED TO BE ACTIVATED BY CHANGING THE DOT TO A DOLLAR SIGN!
+// default is HTMLHELP12
+{.DEFINE HTMLHELP11}
+{$DEFINE HTMLHELP12}
+
+// secondary IFDEFs for "_UP" which means also any later OS version
+{$IFDEF WIN2003}
+ {$DEFINE WIN95_UP}
+ {$DEFINE WIN98_UP}
+ {$DEFINE WIN98SE_UP}
+ {$DEFINE WIN98ME_UP}
+ {$DEFINE WINNT4_UP}
+ {$DEFINE WIN2000_UP}
+ {$DEFINE WINXP_UP}
+ {$DEFINE WIN2003_UP}
+{$ENDIF WIN2003}
+
+{$IFDEF WINXP}
+ {$DEFINE WIN95_UP}
+ {$DEFINE WIN98_UP}
+ {$DEFINE WIN98SE_UP}
+ {$DEFINE WIN98ME_UP}
+ {$DEFINE WINNT4_UP}
+ {$DEFINE WIN2000_UP}
+ {$DEFINE WINXP_UP}
+{$ENDIF WINXP}
+
+{$IFDEF WIN2000}
+ {$DEFINE WIN95_UP}
+ {$DEFINE WIN98_UP}
+ {$DEFINE WIN98SE_UP}
+ {$DEFINE WIN98ME_UP}
+ {$DEFINE WINNT4_UP}
+ {$DEFINE WIN2000_UP}
+{$ENDIF WIN2000}
+
+{$IFDEF WINNT4}
+ {$DEFINE WIN95_UP}
+ {$DEFINE WIN98_UP}
+ {$DEFINE WIN98SE_UP}
+ {$DEFINE WIN98ME_UP}
+ {$DEFINE WINNT4_UP}
+{$ENDIF WINNT4}
+
+{$IFDEF WIN98ME}
+ {$DEFINE WIN95_UP}
+ {$DEFINE WIN98_UP}
+ {$DEFINE WIN98SE_UP}
+ {$DEFINE WIN98ME_UP}
+{$ENDIF WIN98ME}
+
+{$IFDEF WIN98SE}
+ {$DEFINE WIN95_UP}
+ {$DEFINE WIN98_UP}
+ {$DEFINE WIN98SE_UP}
+{$ENDIF WIN98SE}
+
+{$IFDEF WIN98}
+ {$DEFINE WIN95_UP}
+ {$DEFINE WIN98_UP}
+{$ENDIF WIN98}
+
+{$IFDEF WIN95}
+ {$DEFINE WIN95_UP}
+{$ENDIF WIN95}
+
+
+// secondary IFDEFs for "_UP" which means also any later IE version
+{$IFDEF IE600}
+ {$DEFINE IE300_UP}
+ {$DEFINE IE400_UP}
+ {$DEFINE IE401_UP}
+ {$DEFINE IE500_UP}
+ {$DEFINE IE501_UP}
+ {$DEFINE IE560_UP}
+ {$DEFINE IE600_UP}
+{$ENDIF IE600}
+
+{$IFDEF IE560}
+ {$DEFINE IE300_UP}
+ {$DEFINE IE400_UP}
+ {$DEFINE IE401_UP}
+ {$DEFINE IE500_UP}
+ {$DEFINE IE501_UP}
+ {$DEFINE IE560_UP}
+{$ENDIF IE560}
+
+{$IFDEF IE501}
+ {$DEFINE IE300_UP}
+ {$DEFINE IE400_UP}
+ {$DEFINE IE401_UP}
+ {$DEFINE IE500_UP}
+ {$DEFINE IE501_UP}
+{$ENDIF IE501}
+
+{$IFDEF IE500}
+ {$DEFINE IE300_UP}
+ {$DEFINE IE400_UP}
+ {$DEFINE IE401_UP}
+ {$DEFINE IE500_UP}
+{$ENDIF IE500}
+
+{$IFDEF IE401}
+ {$DEFINE IE300_UP}
+ {$DEFINE IE400_UP}
+ {$DEFINE IE401_UP}
+{$ENDIF IE401}
+
+{$IFDEF IE400}
+ {$DEFINE IE300_UP}
+ {$DEFINE IE400_UP}
+{$ENDIF IE400}
+
+{$IFDEF IE300}
+ {$DEFINE IE300_UP}
+{$ENDIF IE300}
+
+// IFDEF defaults for MSI (Microsoft Installer)
+{$IFNDEF MSI200}
+{$IFNDEF MSI110}
+{$IFNDEF MSI100}
+ {$IFDEF WINXP_UP}
+ {$DEFINE MSI200}
+ {$ELSE}
+ {$IFDEF WIN2000_UP}
+ {$DEFINE MSI110}
+ {$ELSE}
+ {$DEFINE MSI100}
+ {$ENDIF WIN2000_UP}
+ {$ENDIF WINXP_UP}
+{$ENDIF !MSI100}
+{$ENDIF !MSI110}
+{$ENDIF !MSI200}
+
+// secondary IFDEFs for MSI (Microsoft Installer)
+{$IFDEF MSI200}
+ {$DEFINE MSI200_UP}
+ {$DEFINE MSI110_UP}
+ {$DEFINE MSI100_UP}
+{$ENDIF MSI200}
+
+{$IFDEF MSI110}
+ {$DEFINE MSI110_UP}
+ {$DEFINE MSI100_UP}
+{$ENDIF MSI110}
+
+{$IFDEF MSI100}
+ {$DEFINE MSI100_UP}
+{$ENDIF MSI100}
+
+// secondary IFDEFs for HtmlHelp
+{$IFDEF HTMLHELP12}
+ {$DEFINE HTMLHELP12_UP}
+ {$DEFINE HTMLHELP11_UP}
+{$ENDIF HTMLHELP12}
+
+{$IFDEF HTMLHELP11}
+ {$DEFINE HTMLHELP11_UP}
+{$ENDIF HTMLHELP11}
+
+{$ENDIF ~JEDIAPILIB_INC}
diff --git a/packages/extra/winunits/jwaObjsel.pas b/packages/extra/winunits/jwaObjsel.pas
index 46069f8aa9..ce941c0e07 100644
--- a/packages/extra/winunits/jwaObjsel.pas
+++ b/packages/extra/winunits/jwaObjsel.pas
@@ -1,675 +1,675 @@
-{******************************************************************************}
-{ }
-{ Object Picker API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: objsel.h, released June 2000. The original Pascal }
-{ code is: ObjSel.pas, released December 2000. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwaObjsel.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaObjSel;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "ObjSel.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- ActiveX {TODO}, JwaWinType;
-
-// Contents: Object Picker Dialog public header
-
-const
- //'{17d6ccd8-3b7b-11d2-b9e0-00c04fd8dbf7}'
- CLSID_DsObjectPicker: TGUID = (
- D1:$17d6ccd8; D2:$3b7b; D3:$11d2; D4:($b9,$e0,$00,$c0,$4f,$d8,$db,$f7));
- {$EXTERNALSYM CLSID_DsObjectPicker}
-
- IID_IDsObjectPicker: TGUID = (
- D1:$0c87e64e; D2:$3b7a; D3:$11d2; D4:($b9,$e0,$00,$c0,$4f,$d8,$db,$f7));
- {$EXTERNALSYM IID_IDsObjectPicker}
-
-{
-CLIPBOARD FORMATS
-=================
-
-CFSTR_DSOP_DS_SELECTION_LIST
- Returns an HGLOBAL for global memory containing a DS_SELECTION_LIST
- variable length structure.
-}
-
-const
- CFSTR_DSOP_DS_SELECTION_LIST = 'CFSTR_DSOP_DS_SELECTION_LIST';
- {$EXTERNALSYM CFSTR_DSOP_DS_SELECTION_LIST}
-
-{
-SCOPE TYPES
-===========
-
-A scope is an entry in the "Look In" dropdown list of the Object Picker
-dialog.
-
-When initializing the DS Object Picker, DSOP_SCOPE_TYPEs are used with
-DSOP_SCOPE_INIT_INFO.flType member to specify which types of scopes the
-DS Object Picker should put in the "Look In" list.
-
-DSOP_SCOPE_TYPE_TARGET_COMPUTER
- Computer specified by DSOP_INIT_INFO.pwzTargetComputer, NULL is
- local computer.
-
-DSOP_SCOPE_TYPE_UPLEVEL_JOINED_DOMAIN
- Uplevel domain to which target computer is joined.
-
-DSOP_SCOPE_TYPE_DOWNLEVEL_JOINED_DOMAIN
- Downlevel domain to which target computer is joined.
-
-DSOP_SCOPE_TYPE_ENTERPRISE_DOMAIN
- All domains in the enterprise to which the target computer belongs
- other than the JOINED_DOMAIN or USER_SPECIFIED_*_SCOPEs.
-
-DSOP_SCOPE_TYPE_GLOBAL_CATALOG
- The Entire Directory scope.
-
-DSOP_SCOPE_TYPE_EXTERNAL_UPLEVEL_DOMAIN
- All uplevel domains external to the enterprise but trusted by the
- domain to which the target computer is joined.
-
-DSOP_SCOPE_TYPE_EXTERNAL_DOWNLEVEL_DOMAIN
- All downlevel domains external to the enterprise but trusted by the
- domain to which the target computer is joined.
-
-DSOP_SCOPE_TYPE_WORKGROUP
- The workgroup of which TARGET_COMPUTER is a member. Applies only if the
- TARGET_COMPUTER is not joined to a domain.
-
-DSOP_SCOPE_TYPE_USER_ENTERED_UPLEVEL_SCOPE
-DSOP_SCOPE_TYPE_USER_ENTERED_DOWNLEVEL_SCOPE
- Any uplevel or downlevel scope generated by processing user input. If
- neither of these types is specified, user entries that do not refer to
- one of the scopes in the "Look In" control will be rejected.
-
-}
-
-const
- DSOP_SCOPE_TYPE_TARGET_COMPUTER = $00000001;
- {$EXTERNALSYM DSOP_SCOPE_TYPE_TARGET_COMPUTER}
- DSOP_SCOPE_TYPE_UPLEVEL_JOINED_DOMAIN = $00000002;
- {$EXTERNALSYM DSOP_SCOPE_TYPE_UPLEVEL_JOINED_DOMAIN}
- DSOP_SCOPE_TYPE_DOWNLEVEL_JOINED_DOMAIN = $00000004;
- {$EXTERNALSYM DSOP_SCOPE_TYPE_DOWNLEVEL_JOINED_DOMAIN}
- DSOP_SCOPE_TYPE_ENTERPRISE_DOMAIN = $00000008;
- {$EXTERNALSYM DSOP_SCOPE_TYPE_ENTERPRISE_DOMAIN}
- DSOP_SCOPE_TYPE_GLOBAL_CATALOG = $00000010;
- {$EXTERNALSYM DSOP_SCOPE_TYPE_GLOBAL_CATALOG}
- DSOP_SCOPE_TYPE_EXTERNAL_UPLEVEL_DOMAIN = $00000020;
- {$EXTERNALSYM DSOP_SCOPE_TYPE_EXTERNAL_UPLEVEL_DOMAIN}
- DSOP_SCOPE_TYPE_EXTERNAL_DOWNLEVEL_DOMAIN = $00000040;
- {$EXTERNALSYM DSOP_SCOPE_TYPE_EXTERNAL_DOWNLEVEL_DOMAIN}
- DSOP_SCOPE_TYPE_WORKGROUP = $00000080;
- {$EXTERNALSYM DSOP_SCOPE_TYPE_WORKGROUP}
- DSOP_SCOPE_TYPE_USER_ENTERED_UPLEVEL_SCOPE = $00000100;
- {$EXTERNALSYM DSOP_SCOPE_TYPE_USER_ENTERED_UPLEVEL_SCOPE}
- DSOP_SCOPE_TYPE_USER_ENTERED_DOWNLEVEL_SCOPE = $00000200;
- {$EXTERNALSYM DSOP_SCOPE_TYPE_USER_ENTERED_DOWNLEVEL_SCOPE}
-
-{
-DSOP_SCOPE_INIT_INFO flags
-==========================
-
-The flScope member can contain zero or more of the following flags:
-
-DSOP_SCOPE_FLAG_STARTING_SCOPE
- The scope should be the first one selected in the Look In control after
- dialog initialization. If more than one scope specifies this flag,
- the one which is chosen to be the starting scope is implementation
- dependant.
-
-DSOP_SCOPE_FLAG_WANT_PROVIDER_WINNT
- ADs paths for objects selected from this scope should be converted to use
- the WinNT provider.
-
-DSOP_SCOPE_FLAG_WANT_PROVIDER_LDAP
- ADs paths for objects selected from this scope should be converted to use
- the LDAP provider.
-
-DSOP_SCOPE_FLAG_WANT_PROVIDER_GC
- ADs paths for objects selected from this scope should be converted to use
- the GC provider.
-
-DSOP_SCOPE_FLAG_WANT_SID_PATH
- ADs paths for objects selected from this scope having an objectSid
- attribute should be converted to the form LDAP://<SID=x>, where x
- represents the hexidecimal digits of the objectSid attribute value.
-
-DSOP_SCOPE_FLAG_WANT_DOWNLEVEL_BUILTIN_PATH
- ADs paths for downlevel well-known SID objects (for example,
- DSOP_DOWNLEVEL_FILTER_INTERACTIVE) are an empty string unless this flag is
- specified. If it is, the paths will be of the form
- WinNT://NT AUTHORITY/Interactive or WinNT://Creator owner.
-
-DSOP_SCOPE_FLAG_DEFAULT_FILTER_USERS
- If the scope filter contains the DSOP_FILTER_USERS or
- DSOP_DOWNLEVEL_FILTER_USERS flag, then check the Users checkbox by
- default in the Look For dialog.
-
-DSOP_SCOPE_FLAG_DEFAULT_FILTER_GROUPS
-
-DSOP_SCOPE_FLAG_DEFAULT_FILTER_COMPUTERS
-
-DSOP_SCOPE_FLAG_DEFAULT_FILTER_CONTACTS
-}
-
-const
- DSOP_SCOPE_FLAG_STARTING_SCOPE = $00000001;
- {$EXTERNALSYM DSOP_SCOPE_FLAG_STARTING_SCOPE}
- DSOP_SCOPE_FLAG_WANT_PROVIDER_WINNT = $00000002;
- {$EXTERNALSYM DSOP_SCOPE_FLAG_WANT_PROVIDER_WINNT}
- DSOP_SCOPE_FLAG_WANT_PROVIDER_LDAP = $00000004;
- {$EXTERNALSYM DSOP_SCOPE_FLAG_WANT_PROVIDER_LDAP}
- DSOP_SCOPE_FLAG_WANT_PROVIDER_GC = $00000008;
- {$EXTERNALSYM DSOP_SCOPE_FLAG_WANT_PROVIDER_GC}
- DSOP_SCOPE_FLAG_WANT_SID_PATH = $00000010;
- {$EXTERNALSYM DSOP_SCOPE_FLAG_WANT_SID_PATH}
- DSOP_SCOPE_FLAG_WANT_DOWNLEVEL_BUILTIN_PATH = $00000020;
- {$EXTERNALSYM DSOP_SCOPE_FLAG_WANT_DOWNLEVEL_BUILTIN_PATH}
- DSOP_SCOPE_FLAG_DEFAULT_FILTER_USERS = $00000040;
- {$EXTERNALSYM DSOP_SCOPE_FLAG_DEFAULT_FILTER_USERS}
- DSOP_SCOPE_FLAG_DEFAULT_FILTER_GROUPS = $00000080;
- {$EXTERNALSYM DSOP_SCOPE_FLAG_DEFAULT_FILTER_GROUPS}
- DSOP_SCOPE_FLAG_DEFAULT_FILTER_COMPUTERS = $00000100;
- {$EXTERNALSYM DSOP_SCOPE_FLAG_DEFAULT_FILTER_COMPUTERS}
- DSOP_SCOPE_FLAG_DEFAULT_FILTER_CONTACTS = $00000200;
- {$EXTERNALSYM DSOP_SCOPE_FLAG_DEFAULT_FILTER_CONTACTS}
-
-{
-The flMixedModeOnly/flNativeModeOnly member of an uplevel scope can
-contain one or more of the following flags (at least one must be specified):
-
-DSOP_FILTER_INCLUDE_ADVANCED_VIEW
- Include objects which have the attribute showInAdvancedViewOnly set to
- true.
-
-DSOP_FILTER_USERS
- Include user objects.
-
-DSOP_FILTER_BUILTIN_GROUPS
- Include group objects with a groupType value having the flag
- GROUP_TYPE_BUILTIN_LOCAL_GROUP.
-
-DSOP_FILTER_WELL_KNOWN_PRINCIPALS
- Include the contents of the WellKnown Security Principals container.
-
-DSOP_FILTER_UNIVERSAL_GROUPS_DL
- Include distribution list universal groups.
-
-DSOP_FILTER_UNIVERSAL_GROUPS_SE
- Include security enabled universal groups.
-
-DSOP_FILTER_GLOBAL_GROUPS_DL
- Include distribution list global groups.
-
-DSOP_FILTER_GLOBAL_GROUPS_SE
- Include security enabled global groups.
-
-DSOP_FILTER_DOMAIN_LOCAL_GROUPS_DL
- Include distribution list domain global groups.
-
-DSOP_FILTER_DOMAIN_LOCAL_GROUPS_SE
- Include security enabled domain local groups.
-
-DSOP_FILTER_CONTACTS
- Include contact objects.
-
-DSOP_FILTER_COMPUTERS
- Include computer objects.
-}
-
-const
- DSOP_FILTER_INCLUDE_ADVANCED_VIEW = $00000001;
- {$EXTERNALSYM DSOP_FILTER_INCLUDE_ADVANCED_VIEW}
- DSOP_FILTER_USERS = $00000002;
- {$EXTERNALSYM DSOP_FILTER_USERS}
- DSOP_FILTER_BUILTIN_GROUPS = $00000004;
- {$EXTERNALSYM DSOP_FILTER_BUILTIN_GROUPS}
- DSOP_FILTER_WELL_KNOWN_PRINCIPALS = $00000008;
- {$EXTERNALSYM DSOP_FILTER_WELL_KNOWN_PRINCIPALS}
- DSOP_FILTER_UNIVERSAL_GROUPS_DL = $00000010;
- {$EXTERNALSYM DSOP_FILTER_UNIVERSAL_GROUPS_DL}
- DSOP_FILTER_UNIVERSAL_GROUPS_SE = $00000020;
- {$EXTERNALSYM DSOP_FILTER_UNIVERSAL_GROUPS_SE}
- DSOP_FILTER_GLOBAL_GROUPS_DL = $00000040;
- {$EXTERNALSYM DSOP_FILTER_GLOBAL_GROUPS_DL}
- DSOP_FILTER_GLOBAL_GROUPS_SE = $00000080;
- {$EXTERNALSYM DSOP_FILTER_GLOBAL_GROUPS_SE}
- DSOP_FILTER_DOMAIN_LOCAL_GROUPS_DL = $00000100;
- {$EXTERNALSYM DSOP_FILTER_DOMAIN_LOCAL_GROUPS_DL}
- DSOP_FILTER_DOMAIN_LOCAL_GROUPS_SE = $00000200;
- {$EXTERNALSYM DSOP_FILTER_DOMAIN_LOCAL_GROUPS_SE}
- DSOP_FILTER_CONTACTS = $00000400;
- {$EXTERNALSYM DSOP_FILTER_CONTACTS}
- DSOP_FILTER_COMPUTERS = $00000800;
- {$EXTERNALSYM DSOP_FILTER_COMPUTERS}
-
-{
-The flFilter member of a downlevel scope can contain one or more of the
-following flags:
-
-DSOP_DOWNLEVEL_FILTER_USERS
- Include user objects.
-
-DSOP_DOWNLEVEL_FILTER_LOCAL_GROUPS
- Include all local groups.
-
-DSOP_DOWNLEVEL_FILTER_GLOBAL_GROUPS
- Include all global groups.
-
-DSOP_DOWNLEVEL_FILTER_COMPUTERS
- Include computer objects
-
-DSOP_DOWNLEVEL_FILTER_WORLD
- Include builtin security principal World (Everyone).
-
-DSOP_DOWNLEVEL_FILTER_AUTHENTICATED_USER
- Include builtin security principal Authenticated User.
-
-DSOP_DOWNLEVEL_FILTER_ANONYMOUS
- Include builtin security principal Anonymous.
-
-DSOP_DOWNLEVEL_FILTER_BATCH
- Include builtin security principal Batch.
-
-DSOP_DOWNLEVEL_FILTER_CREATOR_OWNER
- Include builtin security principal Creator Owner.
-
-DSOP_DOWNLEVEL_FILTER_CREATOR_GROUP
- Include builtin security principal Creator Group.
-
-DSOP_DOWNLEVEL_FILTER_DIALUP
- Include builtin security principal Dialup.
-
-DSOP_DOWNLEVEL_FILTER_INTERACTIVE
- Include builtin security principal Interactive.
-
-DSOP_DOWNLEVEL_FILTER_NETWORK
- Include builtin security principal Network.
-
-DSOP_DOWNLEVEL_FILTER_SERVICE
- Include builtin security principal Service.
-
-DSOP_DOWNLEVEL_FILTER_SYSTEM
- Include builtin security principal System.
-
-DSOP_DOWNLEVEL_FILTER_EXCLUDE_BUILTIN_GROUPS
- Exclude local builtin groups returned by groups enumeration.
-
-DSOP_DOWNLEVEL_FILTER_TERMINAL_SERVER
- Include builtin security principal Terminal Server.
-
-DSOP_DOWNLEVEL_FILTER_LOCAL_SERVICE
- Include builtin security principal Local Service
-
-DSOP_DOWNLEVEL_FILTER_NETWORK_SERVICE
- Include builtin security principal Network Service
-
-DSOP_DOWNLEVEL_FILTER_ALL_WELLKNOWN_SIDS
- Include all builtin security principals.
-}
-
-const
- DSOP_DOWNLEVEL_FILTER_USERS = DWORD($80000001);
- {$EXTERNALSYM DSOP_DOWNLEVEL_FILTER_USERS}
- DSOP_DOWNLEVEL_FILTER_LOCAL_GROUPS = DWORD($80000002);
- {$EXTERNALSYM DSOP_DOWNLEVEL_FILTER_LOCAL_GROUPS}
- DSOP_DOWNLEVEL_FILTER_GLOBAL_GROUPS = DWORD($80000004);
- {$EXTERNALSYM DSOP_DOWNLEVEL_FILTER_GLOBAL_GROUPS}
- DSOP_DOWNLEVEL_FILTER_COMPUTERS = DWORD($80000008);
- {$EXTERNALSYM DSOP_DOWNLEVEL_FILTER_COMPUTERS}
- DSOP_DOWNLEVEL_FILTER_WORLD = DWORD($80000010);
- {$EXTERNALSYM DSOP_DOWNLEVEL_FILTER_WORLD}
- DSOP_DOWNLEVEL_FILTER_AUTHENTICATED_USER = DWORD($80000020);
- {$EXTERNALSYM DSOP_DOWNLEVEL_FILTER_AUTHENTICATED_USER}
- DSOP_DOWNLEVEL_FILTER_ANONYMOUS = DWORD($80000040);
- {$EXTERNALSYM DSOP_DOWNLEVEL_FILTER_ANONYMOUS}
- DSOP_DOWNLEVEL_FILTER_BATCH = DWORD($80000080);
- {$EXTERNALSYM DSOP_DOWNLEVEL_FILTER_BATCH}
- DSOP_DOWNLEVEL_FILTER_CREATOR_OWNER = DWORD($80000100);
- {$EXTERNALSYM DSOP_DOWNLEVEL_FILTER_CREATOR_OWNER}
- DSOP_DOWNLEVEL_FILTER_CREATOR_GROUP = DWORD($80000200);
- {$EXTERNALSYM DSOP_DOWNLEVEL_FILTER_CREATOR_GROUP}
- DSOP_DOWNLEVEL_FILTER_DIALUP = DWORD($80000400);
- {$EXTERNALSYM DSOP_DOWNLEVEL_FILTER_DIALUP}
- DSOP_DOWNLEVEL_FILTER_INTERACTIVE = DWORD($80000800);
- {$EXTERNALSYM DSOP_DOWNLEVEL_FILTER_INTERACTIVE}
- DSOP_DOWNLEVEL_FILTER_NETWORK = DWORD($80001000);
- {$EXTERNALSYM DSOP_DOWNLEVEL_FILTER_NETWORK}
- DSOP_DOWNLEVEL_FILTER_SERVICE = DWORD($80002000);
- {$EXTERNALSYM DSOP_DOWNLEVEL_FILTER_SERVICE}
- DSOP_DOWNLEVEL_FILTER_SYSTEM = DWORD($80004000);
- {$EXTERNALSYM DSOP_DOWNLEVEL_FILTER_SYSTEM}
- DSOP_DOWNLEVEL_FILTER_EXCLUDE_BUILTIN_GROUPS = DWORD($80008000);
- {$EXTERNALSYM DSOP_DOWNLEVEL_FILTER_EXCLUDE_BUILTIN_GROUPS}
- DSOP_DOWNLEVEL_FILTER_TERMINAL_SERVER = DWORD($80010000);
- {$EXTERNALSYM DSOP_DOWNLEVEL_FILTER_TERMINAL_SERVER}
- DSOP_DOWNLEVEL_FILTER_ALL_WELLKNOWN_SIDS = DWORD($80020000);
- {$EXTERNALSYM DSOP_DOWNLEVEL_FILTER_ALL_WELLKNOWN_SIDS}
- DSOP_DOWNLEVEL_FILTER_LOCAL_SERVICE = DWORD($80040000);
- {$EXTERNALSYM DSOP_DOWNLEVEL_FILTER_LOCAL_SERVICE}
- DSOP_DOWNLEVEL_FILTER_NETWORK_SERVICE = DWORD($80080000);
- {$EXTERNALSYM DSOP_DOWNLEVEL_FILTER_NETWORK_SERVICE}
- DSOP_DOWNLEVEL_FILTER_REMOTE_LOGON = DWORD($80100000);
- {$EXTERNALSYM DSOP_DOWNLEVEL_FILTER_REMOTE_LOGON}
-
-{
-DSOP_UPLEVEL_FILTER_FLAGS
-=========================
-
-Contains the DSOP_FILTER_* flags for use with a DSOP_SCOPE_INIT_INFO
-structure when the scope is uplevel (DS-aware).
-
-flBothModes
- Flags to use for an uplevel scope, regardless of whether it is a
- mixed or native mode domain.
-
-flMixedModeOnly
- Flags to use when an uplevel domain is in mixed mode.
-
-flNativeModeOnly
- Flags to use when an uplevel domain is in native mode.
-
-DSOP_FILTER_FLAGS
-=================
-
-Uplevel
- Contains flags to use for an uplevel scope.
-
-flDownlevel
- Flags to use for a downlevel scope.
-}
-
-type
- _DSOP_UPLEVEL_FILTER_FLAGS = record
- flBothModes: ULONG;
- flMixedModeOnly: ULONG;
- flNativeModeOnly: ULONG;
- end;
- {$EXTERNALSYM _DSOP_UPLEVEL_FILTER_FLAGS}
- DSOP_UPLEVEL_FILTER_FLAGS = _DSOP_UPLEVEL_FILTER_FLAGS;
- {$EXTERNALSYM DSOP_UPLEVEL_FILTER_FLAGS}
- TDsOpUpLevelFilterFlags = DSOP_UPLEVEL_FILTER_FLAGS;
- PDsOpUpLevelFilterFlags = ^DSOP_UPLEVEL_FILTER_FLAGS;
-
- _DSOP_FILTER_FLAGS = record
- Uplevel: DSOP_UPLEVEL_FILTER_FLAGS;
- flDownlevel: ULONG;
- end;
- {$EXTERNALSYM _DSOP_FILTER_FLAGS}
- DSOP_FILTER_FLAGS = _DSOP_FILTER_FLAGS;
- {$EXTERNALSYM DSOP_FILTER_FLAGS}
- TDsOpFilterFlags = DSOP_FILTER_FLAGS;
- PDsOpFilterFlags = ^DSOP_FILTER_FLAGS;
-
-{
-DSOP_SCOPE_INIT_INFO
-====================
-
-Each DSOP_SCOPE_INIT_INFO structure in the array DSOP_INIT_INFO.aDsScopeInfos
-describes a single scope or a group of scopes with the same settings.
-
-cbSize
- Size, in bytes, of the entire structure.
-
-flType
- DSOP_SCOPE_TYPE_* flags. It is legal to combine multiple values via
- bitwise OR if all of the types of scopes combined in this way require
- the same settings.
-
-flScope
- DSOP_SCOPE_ * flags.
-
-FilterFlags
- DSOP_FILTER_* flags that indicate which types of objects should be
- presented to the user in this scope.
-
-pwzDcName
- Name of the DC of a domain. This member is used only if the flType
- member contains the flag DSOP_SCOPE_TYPE_JOINED_DOMAIN. If that flag is
- not set, this member must be NULL.
-
-pwzADsPath
- Currently not supported, must be NULL.
-
-hr
- Filled with S_OK if the scope represented by this structure could be
- created, or an error message indicating why it could not. If
- IDsObjectPicker::SetScopes returns a success code, this value will
- also be a success code.
-}
-
-type
- PDSOP_SCOPE_INIT_INFO = ^DSOP_SCOPE_INIT_INFO;
- {$EXTERNALSYM PDSOP_SCOPE_INIT_INFO}
- _DSOP_SCOPE_INIT_INFO = record
- cbSize: ULONG;
- flType: ULONG;
- flScope: ULONG;
- FilterFlags: DSOP_FILTER_FLAGS;
- pwzDcName: PWSTR; // OPTIONAL
- pwzADsPath: PWSTR; // OPTIONAL
- hr: HRESULT;
- end;
- {$EXTERNALSYM _DSOP_SCOPE_INIT_INFO}
- DSOP_SCOPE_INIT_INFO = _DSOP_SCOPE_INIT_INFO;
- {$EXTERNALSYM DSOP_SCOPE_INIT_INFO}
- PCDSOP_SCOPE_INIT_INFO = PDSOP_SCOPE_INIT_INFO;
- {$EXTERNALSYM PCDSOP_SCOPE_INIT_INFO}
- TDsOpScopeInitInfo = DSOP_SCOPE_INIT_INFO;
- PDsOpScopeInitInfo = PDSOP_SCOPE_INIT_INFO;
-
-{
-DSOP_INIT_INFO flags
-====================
-
-The following flags may be set in DSOP_INIT_INFO.flOptions:
-
-DSOP_FLAG_MULTISELECT
- Allow multiple selections. If this flag is not set, the dialog will
- return zero or one objects.
-
-DSOP_FLAG_SKIP_TARGET_COMPUTER_DC_CHECK
- If this flag is NOT set, then the DSOP_SCOPE_TYPE_TARGET_COMPUTER flag
- will be ignored if the target computer is a DC. This flag has no effect
- unless DSOP_SCOPE_TYPE_TARGET_COMPUTER is specified.
-
-}
-
-const
- DSOP_FLAG_MULTISELECT = $00000001;
- {$EXTERNALSYM DSOP_FLAG_MULTISELECT}
- DSOP_FLAG_SKIP_TARGET_COMPUTER_DC_CHECK = $00000002;
- {$EXTERNALSYM DSOP_FLAG_SKIP_TARGET_COMPUTER_DC_CHECK}
-
-{
-DSOP_INIT_INFO
-==============
-
-Used to configure the DS Object Picker dialog.
-
-cbSize
- Size, in bytes, of entire structure.
-
-pwzTargetComputer
- Sets the computer associated with DSOP_SCOPE_TARGET_COMPUTER, and
- which is used to determine the joined domain and enterprise.
- If this value is NULL, the target computer is the local machine.
-
-cDsScopeInfos
- Count of elements in aDsScopeInfos. Must be at least 1, since
- the object picker cannot operate without at least one scope.
-
-aDsScopeInfos
- Array of scope initialization structures. Must be present and
- contain at least one element.
-
-flOptions
- Various DS Object Picker flags (DSOP_FLAG_MULTISELECT).
-
-cAttributesToFetch
- Count of elements in apwzAttributeNames. Can be 0.
-
-apwzAttributeNames
- Array of names of attributes to fetch for each object. Ignored
- if cAttributesToFetch is 0.
-}
-
-type
- PDSOP_INIT_INFO = ^DSOP_INIT_INFO;
- {$EXTERNALSYM PDSOP_INIT_INFO}
- _DSOP_INIT_INFO = record
- cbSize: ULONG;
- pwzTargetComputer: PWSTR;
- cDsScopeInfos: ULONG;
- aDsScopeInfos: PDSOP_SCOPE_INIT_INFO;
- flOptions: ULONG;
- cAttributesToFetch: ULONG;
- apwzAttributeNames: LPLPWSTR;
- end;
- {$EXTERNALSYM _DSOP_INIT_INFO}
- DSOP_INIT_INFO = _DSOP_INIT_INFO;
- {$EXTERNALSYM DSOP_INIT_INFO}
- PCDSOP_INIT_INFO = PDSOP_INIT_INFO;
- {$EXTERNALSYM PCDSOP_INIT_INFO}
- TDsOpInitInfo = DSOP_INIT_INFO;
- PDsOpInitInfo = PDSOP_INIT_INFO;
-
-{
-DS_SELECTION
-============
-Describes an object selected by the user.
-
-pwzName
- The object's RDN.
-
-pwzADsPath
- The object's ADsPath.
-
-pwzClass
- The object's class attribute value.
-
-pwzUPN
- The object's userPrincipalName attribute value.
-
-pvarFetchedAttributes
- An array of VARIANTs, one for each attribute fetched.
-
-flScopeType
- A single DSOP_SCOPE_TYPE_* flag describing the type of the scope
- from which this object was selected.
-
-DS_SELECTION_LIST
-=================
-Available as a clipboard format from the data object returned by
-IDsObjectPicker::InvokeDialog. Contains a list of objects that the user
-selected.
-
-cItems
- Number of elements in the aDsSelection array.
-
-cFetchedAttributes
- Number of elements in each DSSELECTION.avarFetchedAttributes member.
-
-aDsSelection
- Array of cItems DSSELECTION structures.
-}
-
-type
- PDS_SELECTION = ^DS_SELECTION;
- {$EXTERNALSYM PDS_SELECTION}
- _DS_SELECTION = record
- pwzName: PWSTR;
- pwzADsPath: PWSTR;
- pwzClass: PWSTR;
- pwzUPN: PWSTR;
- pvarFetchedAttributes: POleVariant;
- flScopeType: ULONG;
- end;
- {$EXTERNALSYM _DS_SELECTION}
- DS_SELECTION = _DS_SELECTION;
- {$EXTERNALSYM DS_SELECTION}
- TDsSelection = DS_SELECTION;
- PDsSelection = PDS_SELECTION;
-
- PDS_SELECTION_LIST = ^DS_SELECTION_LIST;
- {$EXTERNALSYM PDS_SELECTION_LIST}
- _DS_SELECTION_LIST = record
- cItems: ULONG;
- cFetchedAttributes: ULONG;
- aDsSelection: array [0..ANYSIZE_ARRAY - 1] of DS_SELECTION;
- end;
- {$EXTERNALSYM _DS_SELECTION_LIST}
- DS_SELECTION_LIST = _DS_SELECTION_LIST;
- {$EXTERNALSYM DS_SELECTION_LIST}
- TDsSelectionList = DS_SELECTION_LIST;
- PDsSelectionList = PDS_SELECTION_LIST;
-
-//
-// Object Picker Interfaces
-//
-
-//
-// The main interface to the DS Object Picker, used to initialize it,
-// invoke the dialog, and return the user's selections.
-//
-
-type
- IDsObjectPicker = interface (IUnknown)
- ['{0c87e64e-3b7a-11d2-b9e0-00c04fd8dbf7}']
- // Sets scope, filter, etc. for use with next invocation of dialog
- function Initialize(const pInitInfo: DSOP_INIT_INFO): HRESULT; stdcall;
- // Creates the modal DS Object Picker dialog.
- function InvokeDialog(hwndParent: HWND; out ppdoSelections: IDataObject): HRESULT; stdcall;
- end;
- {$EXTERNALSYM IDsObjectPicker}
-
-implementation
-
-end.
+{******************************************************************************}
+{ }
+{ Object Picker API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: objsel.h, released June 2000. The original Pascal }
+{ code is: ObjSel.pas, released December 2000. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwaObjsel.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaObjSel;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "ObjSel.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ ActiveX {TODO}, JwaWinType;
+
+// Contents: Object Picker Dialog public header
+
+const
+ //'{17d6ccd8-3b7b-11d2-b9e0-00c04fd8dbf7}'
+ CLSID_DsObjectPicker: TGUID = (
+ D1:$17d6ccd8; D2:$3b7b; D3:$11d2; D4:($b9,$e0,$00,$c0,$4f,$d8,$db,$f7));
+ {$EXTERNALSYM CLSID_DsObjectPicker}
+
+ IID_IDsObjectPicker: TGUID = (
+ D1:$0c87e64e; D2:$3b7a; D3:$11d2; D4:($b9,$e0,$00,$c0,$4f,$d8,$db,$f7));
+ {$EXTERNALSYM IID_IDsObjectPicker}
+
+{
+CLIPBOARD FORMATS
+=================
+
+CFSTR_DSOP_DS_SELECTION_LIST
+ Returns an HGLOBAL for global memory containing a DS_SELECTION_LIST
+ variable length structure.
+}
+
+const
+ CFSTR_DSOP_DS_SELECTION_LIST = 'CFSTR_DSOP_DS_SELECTION_LIST';
+ {$EXTERNALSYM CFSTR_DSOP_DS_SELECTION_LIST}
+
+{
+SCOPE TYPES
+===========
+
+A scope is an entry in the "Look In" dropdown list of the Object Picker
+dialog.
+
+When initializing the DS Object Picker, DSOP_SCOPE_TYPEs are used with
+DSOP_SCOPE_INIT_INFO.flType member to specify which types of scopes the
+DS Object Picker should put in the "Look In" list.
+
+DSOP_SCOPE_TYPE_TARGET_COMPUTER
+ Computer specified by DSOP_INIT_INFO.pwzTargetComputer, NULL is
+ local computer.
+
+DSOP_SCOPE_TYPE_UPLEVEL_JOINED_DOMAIN
+ Uplevel domain to which target computer is joined.
+
+DSOP_SCOPE_TYPE_DOWNLEVEL_JOINED_DOMAIN
+ Downlevel domain to which target computer is joined.
+
+DSOP_SCOPE_TYPE_ENTERPRISE_DOMAIN
+ All domains in the enterprise to which the target computer belongs
+ other than the JOINED_DOMAIN or USER_SPECIFIED_*_SCOPEs.
+
+DSOP_SCOPE_TYPE_GLOBAL_CATALOG
+ The Entire Directory scope.
+
+DSOP_SCOPE_TYPE_EXTERNAL_UPLEVEL_DOMAIN
+ All uplevel domains external to the enterprise but trusted by the
+ domain to which the target computer is joined.
+
+DSOP_SCOPE_TYPE_EXTERNAL_DOWNLEVEL_DOMAIN
+ All downlevel domains external to the enterprise but trusted by the
+ domain to which the target computer is joined.
+
+DSOP_SCOPE_TYPE_WORKGROUP
+ The workgroup of which TARGET_COMPUTER is a member. Applies only if the
+ TARGET_COMPUTER is not joined to a domain.
+
+DSOP_SCOPE_TYPE_USER_ENTERED_UPLEVEL_SCOPE
+DSOP_SCOPE_TYPE_USER_ENTERED_DOWNLEVEL_SCOPE
+ Any uplevel or downlevel scope generated by processing user input. If
+ neither of these types is specified, user entries that do not refer to
+ one of the scopes in the "Look In" control will be rejected.
+
+}
+
+const
+ DSOP_SCOPE_TYPE_TARGET_COMPUTER = $00000001;
+ {$EXTERNALSYM DSOP_SCOPE_TYPE_TARGET_COMPUTER}
+ DSOP_SCOPE_TYPE_UPLEVEL_JOINED_DOMAIN = $00000002;
+ {$EXTERNALSYM DSOP_SCOPE_TYPE_UPLEVEL_JOINED_DOMAIN}
+ DSOP_SCOPE_TYPE_DOWNLEVEL_JOINED_DOMAIN = $00000004;
+ {$EXTERNALSYM DSOP_SCOPE_TYPE_DOWNLEVEL_JOINED_DOMAIN}
+ DSOP_SCOPE_TYPE_ENTERPRISE_DOMAIN = $00000008;
+ {$EXTERNALSYM DSOP_SCOPE_TYPE_ENTERPRISE_DOMAIN}
+ DSOP_SCOPE_TYPE_GLOBAL_CATALOG = $00000010;
+ {$EXTERNALSYM DSOP_SCOPE_TYPE_GLOBAL_CATALOG}
+ DSOP_SCOPE_TYPE_EXTERNAL_UPLEVEL_DOMAIN = $00000020;
+ {$EXTERNALSYM DSOP_SCOPE_TYPE_EXTERNAL_UPLEVEL_DOMAIN}
+ DSOP_SCOPE_TYPE_EXTERNAL_DOWNLEVEL_DOMAIN = $00000040;
+ {$EXTERNALSYM DSOP_SCOPE_TYPE_EXTERNAL_DOWNLEVEL_DOMAIN}
+ DSOP_SCOPE_TYPE_WORKGROUP = $00000080;
+ {$EXTERNALSYM DSOP_SCOPE_TYPE_WORKGROUP}
+ DSOP_SCOPE_TYPE_USER_ENTERED_UPLEVEL_SCOPE = $00000100;
+ {$EXTERNALSYM DSOP_SCOPE_TYPE_USER_ENTERED_UPLEVEL_SCOPE}
+ DSOP_SCOPE_TYPE_USER_ENTERED_DOWNLEVEL_SCOPE = $00000200;
+ {$EXTERNALSYM DSOP_SCOPE_TYPE_USER_ENTERED_DOWNLEVEL_SCOPE}
+
+{
+DSOP_SCOPE_INIT_INFO flags
+==========================
+
+The flScope member can contain zero or more of the following flags:
+
+DSOP_SCOPE_FLAG_STARTING_SCOPE
+ The scope should be the first one selected in the Look In control after
+ dialog initialization. If more than one scope specifies this flag,
+ the one which is chosen to be the starting scope is implementation
+ dependant.
+
+DSOP_SCOPE_FLAG_WANT_PROVIDER_WINNT
+ ADs paths for objects selected from this scope should be converted to use
+ the WinNT provider.
+
+DSOP_SCOPE_FLAG_WANT_PROVIDER_LDAP
+ ADs paths for objects selected from this scope should be converted to use
+ the LDAP provider.
+
+DSOP_SCOPE_FLAG_WANT_PROVIDER_GC
+ ADs paths for objects selected from this scope should be converted to use
+ the GC provider.
+
+DSOP_SCOPE_FLAG_WANT_SID_PATH
+ ADs paths for objects selected from this scope having an objectSid
+ attribute should be converted to the form LDAP://<SID=x>, where x
+ represents the hexidecimal digits of the objectSid attribute value.
+
+DSOP_SCOPE_FLAG_WANT_DOWNLEVEL_BUILTIN_PATH
+ ADs paths for downlevel well-known SID objects (for example,
+ DSOP_DOWNLEVEL_FILTER_INTERACTIVE) are an empty string unless this flag is
+ specified. If it is, the paths will be of the form
+ WinNT://NT AUTHORITY/Interactive or WinNT://Creator owner.
+
+DSOP_SCOPE_FLAG_DEFAULT_FILTER_USERS
+ If the scope filter contains the DSOP_FILTER_USERS or
+ DSOP_DOWNLEVEL_FILTER_USERS flag, then check the Users checkbox by
+ default in the Look For dialog.
+
+DSOP_SCOPE_FLAG_DEFAULT_FILTER_GROUPS
+
+DSOP_SCOPE_FLAG_DEFAULT_FILTER_COMPUTERS
+
+DSOP_SCOPE_FLAG_DEFAULT_FILTER_CONTACTS
+}
+
+const
+ DSOP_SCOPE_FLAG_STARTING_SCOPE = $00000001;
+ {$EXTERNALSYM DSOP_SCOPE_FLAG_STARTING_SCOPE}
+ DSOP_SCOPE_FLAG_WANT_PROVIDER_WINNT = $00000002;
+ {$EXTERNALSYM DSOP_SCOPE_FLAG_WANT_PROVIDER_WINNT}
+ DSOP_SCOPE_FLAG_WANT_PROVIDER_LDAP = $00000004;
+ {$EXTERNALSYM DSOP_SCOPE_FLAG_WANT_PROVIDER_LDAP}
+ DSOP_SCOPE_FLAG_WANT_PROVIDER_GC = $00000008;
+ {$EXTERNALSYM DSOP_SCOPE_FLAG_WANT_PROVIDER_GC}
+ DSOP_SCOPE_FLAG_WANT_SID_PATH = $00000010;
+ {$EXTERNALSYM DSOP_SCOPE_FLAG_WANT_SID_PATH}
+ DSOP_SCOPE_FLAG_WANT_DOWNLEVEL_BUILTIN_PATH = $00000020;
+ {$EXTERNALSYM DSOP_SCOPE_FLAG_WANT_DOWNLEVEL_BUILTIN_PATH}
+ DSOP_SCOPE_FLAG_DEFAULT_FILTER_USERS = $00000040;
+ {$EXTERNALSYM DSOP_SCOPE_FLAG_DEFAULT_FILTER_USERS}
+ DSOP_SCOPE_FLAG_DEFAULT_FILTER_GROUPS = $00000080;
+ {$EXTERNALSYM DSOP_SCOPE_FLAG_DEFAULT_FILTER_GROUPS}
+ DSOP_SCOPE_FLAG_DEFAULT_FILTER_COMPUTERS = $00000100;
+ {$EXTERNALSYM DSOP_SCOPE_FLAG_DEFAULT_FILTER_COMPUTERS}
+ DSOP_SCOPE_FLAG_DEFAULT_FILTER_CONTACTS = $00000200;
+ {$EXTERNALSYM DSOP_SCOPE_FLAG_DEFAULT_FILTER_CONTACTS}
+
+{
+The flMixedModeOnly/flNativeModeOnly member of an uplevel scope can
+contain one or more of the following flags (at least one must be specified):
+
+DSOP_FILTER_INCLUDE_ADVANCED_VIEW
+ Include objects which have the attribute showInAdvancedViewOnly set to
+ true.
+
+DSOP_FILTER_USERS
+ Include user objects.
+
+DSOP_FILTER_BUILTIN_GROUPS
+ Include group objects with a groupType value having the flag
+ GROUP_TYPE_BUILTIN_LOCAL_GROUP.
+
+DSOP_FILTER_WELL_KNOWN_PRINCIPALS
+ Include the contents of the WellKnown Security Principals container.
+
+DSOP_FILTER_UNIVERSAL_GROUPS_DL
+ Include distribution list universal groups.
+
+DSOP_FILTER_UNIVERSAL_GROUPS_SE
+ Include security enabled universal groups.
+
+DSOP_FILTER_GLOBAL_GROUPS_DL
+ Include distribution list global groups.
+
+DSOP_FILTER_GLOBAL_GROUPS_SE
+ Include security enabled global groups.
+
+DSOP_FILTER_DOMAIN_LOCAL_GROUPS_DL
+ Include distribution list domain global groups.
+
+DSOP_FILTER_DOMAIN_LOCAL_GROUPS_SE
+ Include security enabled domain local groups.
+
+DSOP_FILTER_CONTACTS
+ Include contact objects.
+
+DSOP_FILTER_COMPUTERS
+ Include computer objects.
+}
+
+const
+ DSOP_FILTER_INCLUDE_ADVANCED_VIEW = $00000001;
+ {$EXTERNALSYM DSOP_FILTER_INCLUDE_ADVANCED_VIEW}
+ DSOP_FILTER_USERS = $00000002;
+ {$EXTERNALSYM DSOP_FILTER_USERS}
+ DSOP_FILTER_BUILTIN_GROUPS = $00000004;
+ {$EXTERNALSYM DSOP_FILTER_BUILTIN_GROUPS}
+ DSOP_FILTER_WELL_KNOWN_PRINCIPALS = $00000008;
+ {$EXTERNALSYM DSOP_FILTER_WELL_KNOWN_PRINCIPALS}
+ DSOP_FILTER_UNIVERSAL_GROUPS_DL = $00000010;
+ {$EXTERNALSYM DSOP_FILTER_UNIVERSAL_GROUPS_DL}
+ DSOP_FILTER_UNIVERSAL_GROUPS_SE = $00000020;
+ {$EXTERNALSYM DSOP_FILTER_UNIVERSAL_GROUPS_SE}
+ DSOP_FILTER_GLOBAL_GROUPS_DL = $00000040;
+ {$EXTERNALSYM DSOP_FILTER_GLOBAL_GROUPS_DL}
+ DSOP_FILTER_GLOBAL_GROUPS_SE = $00000080;
+ {$EXTERNALSYM DSOP_FILTER_GLOBAL_GROUPS_SE}
+ DSOP_FILTER_DOMAIN_LOCAL_GROUPS_DL = $00000100;
+ {$EXTERNALSYM DSOP_FILTER_DOMAIN_LOCAL_GROUPS_DL}
+ DSOP_FILTER_DOMAIN_LOCAL_GROUPS_SE = $00000200;
+ {$EXTERNALSYM DSOP_FILTER_DOMAIN_LOCAL_GROUPS_SE}
+ DSOP_FILTER_CONTACTS = $00000400;
+ {$EXTERNALSYM DSOP_FILTER_CONTACTS}
+ DSOP_FILTER_COMPUTERS = $00000800;
+ {$EXTERNALSYM DSOP_FILTER_COMPUTERS}
+
+{
+The flFilter member of a downlevel scope can contain one or more of the
+following flags:
+
+DSOP_DOWNLEVEL_FILTER_USERS
+ Include user objects.
+
+DSOP_DOWNLEVEL_FILTER_LOCAL_GROUPS
+ Include all local groups.
+
+DSOP_DOWNLEVEL_FILTER_GLOBAL_GROUPS
+ Include all global groups.
+
+DSOP_DOWNLEVEL_FILTER_COMPUTERS
+ Include computer objects
+
+DSOP_DOWNLEVEL_FILTER_WORLD
+ Include builtin security principal World (Everyone).
+
+DSOP_DOWNLEVEL_FILTER_AUTHENTICATED_USER
+ Include builtin security principal Authenticated User.
+
+DSOP_DOWNLEVEL_FILTER_ANONYMOUS
+ Include builtin security principal Anonymous.
+
+DSOP_DOWNLEVEL_FILTER_BATCH
+ Include builtin security principal Batch.
+
+DSOP_DOWNLEVEL_FILTER_CREATOR_OWNER
+ Include builtin security principal Creator Owner.
+
+DSOP_DOWNLEVEL_FILTER_CREATOR_GROUP
+ Include builtin security principal Creator Group.
+
+DSOP_DOWNLEVEL_FILTER_DIALUP
+ Include builtin security principal Dialup.
+
+DSOP_DOWNLEVEL_FILTER_INTERACTIVE
+ Include builtin security principal Interactive.
+
+DSOP_DOWNLEVEL_FILTER_NETWORK
+ Include builtin security principal Network.
+
+DSOP_DOWNLEVEL_FILTER_SERVICE
+ Include builtin security principal Service.
+
+DSOP_DOWNLEVEL_FILTER_SYSTEM
+ Include builtin security principal System.
+
+DSOP_DOWNLEVEL_FILTER_EXCLUDE_BUILTIN_GROUPS
+ Exclude local builtin groups returned by groups enumeration.
+
+DSOP_DOWNLEVEL_FILTER_TERMINAL_SERVER
+ Include builtin security principal Terminal Server.
+
+DSOP_DOWNLEVEL_FILTER_LOCAL_SERVICE
+ Include builtin security principal Local Service
+
+DSOP_DOWNLEVEL_FILTER_NETWORK_SERVICE
+ Include builtin security principal Network Service
+
+DSOP_DOWNLEVEL_FILTER_ALL_WELLKNOWN_SIDS
+ Include all builtin security principals.
+}
+
+const
+ DSOP_DOWNLEVEL_FILTER_USERS = DWORD($80000001);
+ {$EXTERNALSYM DSOP_DOWNLEVEL_FILTER_USERS}
+ DSOP_DOWNLEVEL_FILTER_LOCAL_GROUPS = DWORD($80000002);
+ {$EXTERNALSYM DSOP_DOWNLEVEL_FILTER_LOCAL_GROUPS}
+ DSOP_DOWNLEVEL_FILTER_GLOBAL_GROUPS = DWORD($80000004);
+ {$EXTERNALSYM DSOP_DOWNLEVEL_FILTER_GLOBAL_GROUPS}
+ DSOP_DOWNLEVEL_FILTER_COMPUTERS = DWORD($80000008);
+ {$EXTERNALSYM DSOP_DOWNLEVEL_FILTER_COMPUTERS}
+ DSOP_DOWNLEVEL_FILTER_WORLD = DWORD($80000010);
+ {$EXTERNALSYM DSOP_DOWNLEVEL_FILTER_WORLD}
+ DSOP_DOWNLEVEL_FILTER_AUTHENTICATED_USER = DWORD($80000020);
+ {$EXTERNALSYM DSOP_DOWNLEVEL_FILTER_AUTHENTICATED_USER}
+ DSOP_DOWNLEVEL_FILTER_ANONYMOUS = DWORD($80000040);
+ {$EXTERNALSYM DSOP_DOWNLEVEL_FILTER_ANONYMOUS}
+ DSOP_DOWNLEVEL_FILTER_BATCH = DWORD($80000080);
+ {$EXTERNALSYM DSOP_DOWNLEVEL_FILTER_BATCH}
+ DSOP_DOWNLEVEL_FILTER_CREATOR_OWNER = DWORD($80000100);
+ {$EXTERNALSYM DSOP_DOWNLEVEL_FILTER_CREATOR_OWNER}
+ DSOP_DOWNLEVEL_FILTER_CREATOR_GROUP = DWORD($80000200);
+ {$EXTERNALSYM DSOP_DOWNLEVEL_FILTER_CREATOR_GROUP}
+ DSOP_DOWNLEVEL_FILTER_DIALUP = DWORD($80000400);
+ {$EXTERNALSYM DSOP_DOWNLEVEL_FILTER_DIALUP}
+ DSOP_DOWNLEVEL_FILTER_INTERACTIVE = DWORD($80000800);
+ {$EXTERNALSYM DSOP_DOWNLEVEL_FILTER_INTERACTIVE}
+ DSOP_DOWNLEVEL_FILTER_NETWORK = DWORD($80001000);
+ {$EXTERNALSYM DSOP_DOWNLEVEL_FILTER_NETWORK}
+ DSOP_DOWNLEVEL_FILTER_SERVICE = DWORD($80002000);
+ {$EXTERNALSYM DSOP_DOWNLEVEL_FILTER_SERVICE}
+ DSOP_DOWNLEVEL_FILTER_SYSTEM = DWORD($80004000);
+ {$EXTERNALSYM DSOP_DOWNLEVEL_FILTER_SYSTEM}
+ DSOP_DOWNLEVEL_FILTER_EXCLUDE_BUILTIN_GROUPS = DWORD($80008000);
+ {$EXTERNALSYM DSOP_DOWNLEVEL_FILTER_EXCLUDE_BUILTIN_GROUPS}
+ DSOP_DOWNLEVEL_FILTER_TERMINAL_SERVER = DWORD($80010000);
+ {$EXTERNALSYM DSOP_DOWNLEVEL_FILTER_TERMINAL_SERVER}
+ DSOP_DOWNLEVEL_FILTER_ALL_WELLKNOWN_SIDS = DWORD($80020000);
+ {$EXTERNALSYM DSOP_DOWNLEVEL_FILTER_ALL_WELLKNOWN_SIDS}
+ DSOP_DOWNLEVEL_FILTER_LOCAL_SERVICE = DWORD($80040000);
+ {$EXTERNALSYM DSOP_DOWNLEVEL_FILTER_LOCAL_SERVICE}
+ DSOP_DOWNLEVEL_FILTER_NETWORK_SERVICE = DWORD($80080000);
+ {$EXTERNALSYM DSOP_DOWNLEVEL_FILTER_NETWORK_SERVICE}
+ DSOP_DOWNLEVEL_FILTER_REMOTE_LOGON = DWORD($80100000);
+ {$EXTERNALSYM DSOP_DOWNLEVEL_FILTER_REMOTE_LOGON}
+
+{
+DSOP_UPLEVEL_FILTER_FLAGS
+=========================
+
+Contains the DSOP_FILTER_* flags for use with a DSOP_SCOPE_INIT_INFO
+structure when the scope is uplevel (DS-aware).
+
+flBothModes
+ Flags to use for an uplevel scope, regardless of whether it is a
+ mixed or native mode domain.
+
+flMixedModeOnly
+ Flags to use when an uplevel domain is in mixed mode.
+
+flNativeModeOnly
+ Flags to use when an uplevel domain is in native mode.
+
+DSOP_FILTER_FLAGS
+=================
+
+Uplevel
+ Contains flags to use for an uplevel scope.
+
+flDownlevel
+ Flags to use for a downlevel scope.
+}
+
+type
+ _DSOP_UPLEVEL_FILTER_FLAGS = record
+ flBothModes: ULONG;
+ flMixedModeOnly: ULONG;
+ flNativeModeOnly: ULONG;
+ end;
+ {$EXTERNALSYM _DSOP_UPLEVEL_FILTER_FLAGS}
+ DSOP_UPLEVEL_FILTER_FLAGS = _DSOP_UPLEVEL_FILTER_FLAGS;
+ {$EXTERNALSYM DSOP_UPLEVEL_FILTER_FLAGS}
+ TDsOpUpLevelFilterFlags = DSOP_UPLEVEL_FILTER_FLAGS;
+ PDsOpUpLevelFilterFlags = ^DSOP_UPLEVEL_FILTER_FLAGS;
+
+ _DSOP_FILTER_FLAGS = record
+ Uplevel: DSOP_UPLEVEL_FILTER_FLAGS;
+ flDownlevel: ULONG;
+ end;
+ {$EXTERNALSYM _DSOP_FILTER_FLAGS}
+ DSOP_FILTER_FLAGS = _DSOP_FILTER_FLAGS;
+ {$EXTERNALSYM DSOP_FILTER_FLAGS}
+ TDsOpFilterFlags = DSOP_FILTER_FLAGS;
+ PDsOpFilterFlags = ^DSOP_FILTER_FLAGS;
+
+{
+DSOP_SCOPE_INIT_INFO
+====================
+
+Each DSOP_SCOPE_INIT_INFO structure in the array DSOP_INIT_INFO.aDsScopeInfos
+describes a single scope or a group of scopes with the same settings.
+
+cbSize
+ Size, in bytes, of the entire structure.
+
+flType
+ DSOP_SCOPE_TYPE_* flags. It is legal to combine multiple values via
+ bitwise OR if all of the types of scopes combined in this way require
+ the same settings.
+
+flScope
+ DSOP_SCOPE_ * flags.
+
+FilterFlags
+ DSOP_FILTER_* flags that indicate which types of objects should be
+ presented to the user in this scope.
+
+pwzDcName
+ Name of the DC of a domain. This member is used only if the flType
+ member contains the flag DSOP_SCOPE_TYPE_JOINED_DOMAIN. If that flag is
+ not set, this member must be NULL.
+
+pwzADsPath
+ Currently not supported, must be NULL.
+
+hr
+ Filled with S_OK if the scope represented by this structure could be
+ created, or an error message indicating why it could not. If
+ IDsObjectPicker::SetScopes returns a success code, this value will
+ also be a success code.
+}
+
+type
+ PDSOP_SCOPE_INIT_INFO = ^DSOP_SCOPE_INIT_INFO;
+ {$EXTERNALSYM PDSOP_SCOPE_INIT_INFO}
+ _DSOP_SCOPE_INIT_INFO = record
+ cbSize: ULONG;
+ flType: ULONG;
+ flScope: ULONG;
+ FilterFlags: DSOP_FILTER_FLAGS;
+ pwzDcName: PWSTR; // OPTIONAL
+ pwzADsPath: PWSTR; // OPTIONAL
+ hr: HRESULT;
+ end;
+ {$EXTERNALSYM _DSOP_SCOPE_INIT_INFO}
+ DSOP_SCOPE_INIT_INFO = _DSOP_SCOPE_INIT_INFO;
+ {$EXTERNALSYM DSOP_SCOPE_INIT_INFO}
+ PCDSOP_SCOPE_INIT_INFO = PDSOP_SCOPE_INIT_INFO;
+ {$EXTERNALSYM PCDSOP_SCOPE_INIT_INFO}
+ TDsOpScopeInitInfo = DSOP_SCOPE_INIT_INFO;
+ PDsOpScopeInitInfo = PDSOP_SCOPE_INIT_INFO;
+
+{
+DSOP_INIT_INFO flags
+====================
+
+The following flags may be set in DSOP_INIT_INFO.flOptions:
+
+DSOP_FLAG_MULTISELECT
+ Allow multiple selections. If this flag is not set, the dialog will
+ return zero or one objects.
+
+DSOP_FLAG_SKIP_TARGET_COMPUTER_DC_CHECK
+ If this flag is NOT set, then the DSOP_SCOPE_TYPE_TARGET_COMPUTER flag
+ will be ignored if the target computer is a DC. This flag has no effect
+ unless DSOP_SCOPE_TYPE_TARGET_COMPUTER is specified.
+
+}
+
+const
+ DSOP_FLAG_MULTISELECT = $00000001;
+ {$EXTERNALSYM DSOP_FLAG_MULTISELECT}
+ DSOP_FLAG_SKIP_TARGET_COMPUTER_DC_CHECK = $00000002;
+ {$EXTERNALSYM DSOP_FLAG_SKIP_TARGET_COMPUTER_DC_CHECK}
+
+{
+DSOP_INIT_INFO
+==============
+
+Used to configure the DS Object Picker dialog.
+
+cbSize
+ Size, in bytes, of entire structure.
+
+pwzTargetComputer
+ Sets the computer associated with DSOP_SCOPE_TARGET_COMPUTER, and
+ which is used to determine the joined domain and enterprise.
+ If this value is NULL, the target computer is the local machine.
+
+cDsScopeInfos
+ Count of elements in aDsScopeInfos. Must be at least 1, since
+ the object picker cannot operate without at least one scope.
+
+aDsScopeInfos
+ Array of scope initialization structures. Must be present and
+ contain at least one element.
+
+flOptions
+ Various DS Object Picker flags (DSOP_FLAG_MULTISELECT).
+
+cAttributesToFetch
+ Count of elements in apwzAttributeNames. Can be 0.
+
+apwzAttributeNames
+ Array of names of attributes to fetch for each object. Ignored
+ if cAttributesToFetch is 0.
+}
+
+type
+ PDSOP_INIT_INFO = ^DSOP_INIT_INFO;
+ {$EXTERNALSYM PDSOP_INIT_INFO}
+ _DSOP_INIT_INFO = record
+ cbSize: ULONG;
+ pwzTargetComputer: PWSTR;
+ cDsScopeInfos: ULONG;
+ aDsScopeInfos: PDSOP_SCOPE_INIT_INFO;
+ flOptions: ULONG;
+ cAttributesToFetch: ULONG;
+ apwzAttributeNames: LPLPWSTR;
+ end;
+ {$EXTERNALSYM _DSOP_INIT_INFO}
+ DSOP_INIT_INFO = _DSOP_INIT_INFO;
+ {$EXTERNALSYM DSOP_INIT_INFO}
+ PCDSOP_INIT_INFO = PDSOP_INIT_INFO;
+ {$EXTERNALSYM PCDSOP_INIT_INFO}
+ TDsOpInitInfo = DSOP_INIT_INFO;
+ PDsOpInitInfo = PDSOP_INIT_INFO;
+
+{
+DS_SELECTION
+============
+Describes an object selected by the user.
+
+pwzName
+ The object's RDN.
+
+pwzADsPath
+ The object's ADsPath.
+
+pwzClass
+ The object's class attribute value.
+
+pwzUPN
+ The object's userPrincipalName attribute value.
+
+pvarFetchedAttributes
+ An array of VARIANTs, one for each attribute fetched.
+
+flScopeType
+ A single DSOP_SCOPE_TYPE_* flag describing the type of the scope
+ from which this object was selected.
+
+DS_SELECTION_LIST
+=================
+Available as a clipboard format from the data object returned by
+IDsObjectPicker::InvokeDialog. Contains a list of objects that the user
+selected.
+
+cItems
+ Number of elements in the aDsSelection array.
+
+cFetchedAttributes
+ Number of elements in each DSSELECTION.avarFetchedAttributes member.
+
+aDsSelection
+ Array of cItems DSSELECTION structures.
+}
+
+type
+ PDS_SELECTION = ^DS_SELECTION;
+ {$EXTERNALSYM PDS_SELECTION}
+ _DS_SELECTION = record
+ pwzName: PWSTR;
+ pwzADsPath: PWSTR;
+ pwzClass: PWSTR;
+ pwzUPN: PWSTR;
+ pvarFetchedAttributes: POleVariant;
+ flScopeType: ULONG;
+ end;
+ {$EXTERNALSYM _DS_SELECTION}
+ DS_SELECTION = _DS_SELECTION;
+ {$EXTERNALSYM DS_SELECTION}
+ TDsSelection = DS_SELECTION;
+ PDsSelection = PDS_SELECTION;
+
+ PDS_SELECTION_LIST = ^DS_SELECTION_LIST;
+ {$EXTERNALSYM PDS_SELECTION_LIST}
+ _DS_SELECTION_LIST = record
+ cItems: ULONG;
+ cFetchedAttributes: ULONG;
+ aDsSelection: array [0..ANYSIZE_ARRAY - 1] of DS_SELECTION;
+ end;
+ {$EXTERNALSYM _DS_SELECTION_LIST}
+ DS_SELECTION_LIST = _DS_SELECTION_LIST;
+ {$EXTERNALSYM DS_SELECTION_LIST}
+ TDsSelectionList = DS_SELECTION_LIST;
+ PDsSelectionList = PDS_SELECTION_LIST;
+
+//
+// Object Picker Interfaces
+//
+
+//
+// The main interface to the DS Object Picker, used to initialize it,
+// invoke the dialog, and return the user's selections.
+//
+
+type
+ IDsObjectPicker = interface (IUnknown)
+ ['{0c87e64e-3b7a-11d2-b9e0-00c04fd8dbf7}']
+ // Sets scope, filter, etc. for use with next invocation of dialog
+ function Initialize(const pInitInfo: DSOP_INIT_INFO): HRESULT; stdcall;
+ // Creates the modal DS Object Picker dialog.
+ function InvokeDialog(hwndParent: HWND; out ppdoSelections: IDataObject): HRESULT; stdcall;
+ end;
+ {$EXTERNALSYM IDsObjectPicker}
+
+implementation
+
+end.
diff --git a/packages/extra/winunits/jwaaccctrl.pas b/packages/extra/winunits/jwaaccctrl.pas
index ef98be0738..6754f88046 100644
--- a/packages/extra/winunits/jwaaccctrl.pas
+++ b/packages/extra/winunits/jwaaccctrl.pas
@@ -1,1229 +1,1229 @@
-{******************************************************************************}
-{ }
-{ Interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2003 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 2003 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwaaccctrl.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaAccCtrl;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "aclapi.h"'}
-{$HPPEMIT ''}
-{$HPPEMIT 'typedef PTRUSTEE_A *PPTRUSTEE_A'}
-{$HPPEMIT 'typedef PTRUSTEE_W *PPTRUSTEE_W'}
-{$HPPEMIT '#ifdef UNICODE'}
-{$HPPEMIT 'typedef PPTRUSTEE_W PPTRUSTEE'}
-{$HPPEMIT '#else'}
-{$HPPEMIT 'typedef PPTRUSTEE_A PPTRUSTEE'}
-{$HPPEMIT '#endif'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaWinNT, JwaWinType;
-
-(* Dependencies
-// winnt
-PSID
-//wintype
-HLOCAL
-DWORD
-GUID
-LPSTR
-LPWSTR
-ULONG
-PVOID
-HANDLE
-BOOL
-LONG
-*)
-
-// (rom) MACRO
-function AccFree(hMem: HLOCAL): HLOCAL;
-{$EXTERNALSYM AccFree}
-
-//
-// Definition:
-// This enumerated type defines the objects supported by the get/set API within
-// this document. See section 3.1, Object Types for a detailed definition of the
-// supported object types, and their name formats.
-//
-
-type
- _SE_OBJECT_TYPE = (
- SE_UNKNOWN_OBJECT_TYPE,
- SE_FILE_OBJECT,
- SE_SERVICE,
- SE_PRINTER,
- SE_REGISTRY_KEY,
- SE_LMSHARE,
- SE_KERNEL_OBJECT,
- SE_WINDOW_OBJECT,
- SE_DS_OBJECT,
- SE_DS_OBJECT_ALL,
- SE_PROVIDER_DEFINED_OBJECT,
- SE_WMIGUID_OBJECT,
- SE_REGISTRY_WOW64_32KEY);
- {$EXTERNALSYM _SE_OBJECT_TYPE}
- SE_OBJECT_TYPE = _SE_OBJECT_TYPE;
- {$EXTERNALSYM SE_OBJECT_TYPE}
- TSeObjectType = SE_OBJECT_TYPE;
-
-//
-// Definition: TRUSTEE_TYPE
-// This enumerated type specifies the type of trustee account for the trustee
-// returned by the API described in this document.
-// TRUSTEE_IS_UNKNOWN - The trustee is an unknown, but not necessarily invalid
-// type. This field is not validated on input to the APIs
-// that take Trustees.
-// TRUSTEE_IS_USER The trustee account is a user account.
-// TRUSTEE_IS_GROUP The trustee account is a group account.
-//
-
- _TRUSTEE_TYPE = (
- TRUSTEE_IS_UNKNOWN,
- TRUSTEE_IS_USER,
- TRUSTEE_IS_GROUP,
- TRUSTEE_IS_DOMAIN,
- TRUSTEE_IS_ALIAS,
- TRUSTEE_IS_WELL_KNOWN_GROUP,
- TRUSTEE_IS_DELETED,
- TRUSTEE_IS_INVALID,
- TRUSTEE_IS_COMPUTER);
- {$EXTERNALSYM _TRUSTEE_TYPE}
- TRUSTEE_TYPE = _TRUSTEE_TYPE;
- {$EXTERNALSYM TRUSTEE_TYPE}
- TTrusteeType = TRUSTEE_TYPE;
-
-//
-// Definition: TRUSTEE_FORM
-// This enumerated type specifies the form the trustee identifier is in for a
-// particular trustee.
-// TRUSTEE_IS_SID The trustee is identified with a SID rather than with a name.
-// TRUSTEE_IS_NAME The trustee is identified with a name.
-//
-
- _TRUSTEE_FORM = (
- TRUSTEE_IS_SID,
- TRUSTEE_IS_NAME,
- TRUSTEE_BAD_FORM,
- TRUSTEE_IS_OBJECTS_AND_SID,
- TRUSTEE_IS_OBJECTS_AND_NAME);
- {$EXTERNALSYM _TRUSTEE_FORM}
- TRUSTEE_FORM = _TRUSTEE_FORM;
- {$EXTERNALSYM TRUSTEE_FORM}
- TTrusteeForm = TRUSTEE_FORM;
-
-//
-// Definition: MULTIPLE_TRUSTEE_OPERATION
-// If the trustee is a multiple trustee, this enumerated type specifies the type.
-// TRUSTEE_IS_IMPERSONATE The trustee is an impersonate trustee and the multiple
-// trustee field in the trustee points to another trustee
-// that is a trustee for the server that will be doing the
-// impersonation.
-//
-
- _MULTIPLE_TRUSTEE_OPERATION = (NO_MULTIPLE_TRUSTEE, TRUSTEE_IS_IMPERSONATE);
- {$EXTERNALSYM _MULTIPLE_TRUSTEE_OPERATION}
- MULTIPLE_TRUSTEE_OPERATION = _MULTIPLE_TRUSTEE_OPERATION;
- {$EXTERNALSYM MULTIPLE_TRUSTEE_OPERATION}
- TMultipleTrusteeOperation = MULTIPLE_TRUSTEE_OPERATION;
-
- POBJECTS_AND_SID = ^OBJECTS_AND_SID;
- {$EXTERNALSYM POBJECTS_AND_SID}
- _OBJECTS_AND_SID = packed record
- ObjectsPresent: DWORD;
- ObjectTypeGuid: GUID;
- InheritedObjectTypeGuid: GUID;
- pSid: PSID;
- end;
- {$EXTERNALSYM _OBJECTS_AND_SID}
- OBJECTS_AND_SID = _OBJECTS_AND_SID;
- {$EXTERNALSYM OBJECTS_AND_SID}
- TObjectsAndSid = OBJECTS_AND_SID;
- PObjectsAndSid = POBJECTS_AND_SID;
-
- POBJECTS_AND_NAME_A = ^OBJECTS_AND_NAME_A;
- {$EXTERNALSYM POBJECTS_AND_NAME_A}
- _OBJECTS_AND_NAME_A = packed record
- ObjectsPresent: DWORD;
- ObjectType: SE_OBJECT_TYPE;
- ObjectTypeName: LPSTR;
- InheritedObjectTypeName: LPSTR;
- ptstrName: LPSTR;
- end;
- {$EXTERNALSYM _OBJECTS_AND_NAME_A}
- OBJECTS_AND_NAME_A = _OBJECTS_AND_NAME_A;
- {$EXTERNALSYM OBJECTS_AND_NAME_A}
- TObjectsAndNameA = OBJECTS_AND_NAME_A;
- PObjectsAndNameA = POBJECTS_AND_NAME_A;
-
- POBJECTS_AND_NAME_W = ^OBJECTS_AND_NAME_W;
- {$EXTERNALSYM POBJECTS_AND_NAME_W}
- _OBJECTS_AND_NAME_W = packed record
- ObjectsPresent: DWORD;
- ObjectType: SE_OBJECT_TYPE;
- ObjectTypeName: LPWSTR;
- InheritedObjectTypeName: LPWSTR;
- ptstrName: LPWSTR;
- end;
- {$EXTERNALSYM _OBJECTS_AND_NAME_W}
- OBJECTS_AND_NAME_W = _OBJECTS_AND_NAME_W;
- {$EXTERNALSYM OBJECTS_AND_NAME_W}
- TObjectsAndNameW = OBJECTS_AND_NAME_W;
- PObjectsAndNameW = POBJECTS_AND_NAME_W;
-
- {$IFDEF UNICODE}
- OBJECTS_AND_NAME = OBJECTS_AND_NAME_W;
- {$EXTERNALSYM OBJECTS_AND_NAME}
- POBJECTS_AND_NAME = POBJECTS_AND_NAME_W;
- {$EXTERNALSYM POBJECTS_AND_NAME}
- TObjectsAndName = TObjectsAndNameW;
- PObjectsAndName = PObjectsAndNameW;
- {$ELSE}
- OBJECTS_AND_NAME = OBJECTS_AND_NAME_A;
- {$EXTERNALSYM OBJECTS_AND_NAME}
- POBJECTS_AND_NAME = POBJECTS_AND_NAME_A;
- {$EXTERNALSYM POBJECTS_AND_NAME}
- TObjectsAndName = TObjectsAndNameA;
- PObjectsAndName = PObjectsAndNameA;
- {$ENDIF UNICODE}
-
-//
-// Definition: TRUSTEE
-// This structure is used to pass account information into and out of the system
-// using the API defined in this document.
-// PMultipleTrustee - if NON-NULL, points to another trustee structure, as
-// defined by the multiple trustee operation field.
-// MultipleTrusteeOperation - Defines the multiple trustee operation/type.
-// TrusteeForm - defines if the trustee is defined by name or SID.
-// TrusteeType - defines if the trustee type is unknown, a user or a group.
-// PwcsName - points to the trustee name or the trustee SID.
-//
-
- PTRUSTEE_A = ^TRUSTEE_A;
- {$EXTERNALSYM PTRUSTEE_A}
- _TRUSTEE_A = packed record
- pMultipleTrustee: PTRUSTEE_A;
- MultipleTrusteeOperation: MULTIPLE_TRUSTEE_OPERATION;
- TrusteeForm: TRUSTEE_FORM;
- TrusteeType: TRUSTEE_TYPE;
- ptstrName: LPSTR;
- end;
- {$EXTERNALSYM _TRUSTEE_A}
- TRUSTEE_A = _TRUSTEE_A;
- {$EXTERNALSYM TRUSTEE_A}
- TRUSTEEA = TRUSTEE_A;
- {$EXTERNALSYM PTRUSTEEA}
- PPTRUSTEE_A = ^PTRUSTEE_A;
- {$NODEFINE PPTRUSTEE_A}
- TTrusteeA = TRUSTEE_A;
- PTrusteeA = PTRUSTEE_A;
-
- PTRUSTEE_W = ^TRUSTEE_W;
- {$EXTERNALSYM PTRUSTEE_W}
- _TRUSTEE_W = packed record
- pMultipleTrustee: PTRUSTEE_W;
- MultipleTrusteeOperation: MULTIPLE_TRUSTEE_OPERATION;
- TrusteeForm: TRUSTEE_FORM;
- TrusteeType: TRUSTEE_TYPE;
- ptstrName: LPWSTR;
- end;
- {$EXTERNALSYM _TRUSTEE_W}
- TRUSTEE_W = _TRUSTEE_W;
- {$EXTERNALSYM TRUSTEE_W}
- TRUSTEEW = TRUSTEE_W;
- {$EXTERNALSYM TRUSTEEW}
- PPTRUSTEE_W = ^PTRUSTEE_W;
- {$NODEFINE PPTRUSTEE_W}
- TTrusteeW = TRUSTEE_W;
- PTrusteeW = PTRUSTEE_W;
-
- {$IFDEF UNICODE}
- TRUSTEE_ = TRUSTEE_W;
- {$EXTERNALSYM TRUSTEE_}
- PTRUSTEE_ = PTRUSTEE_W;
- {$EXTERNALSYM PTRUSTEE_}
- TRUSTEE = TRUSTEEW;
- {$EXTERNALSYM TRUSTEE}
- PPTRUSTEE = ^PPTRUSTEE_W;
- {$NODEFINE PPTRUSTEE}
- TTrustee = TTrusteeW;
- PTrustee = PTrusteeW;
- {$ELSE}
- TRUSTEE_ = TRUSTEE_A;
- {$EXTERNALSYM TRUSTEE_}
- PTRUSTEE_ = PTRUSTEE_A;
- {$EXTERNALSYM PTRUSTEE_}
- TRUSTEE = TRUSTEEA;
- {$EXTERNALSYM TRUSTEE}
- PPTRUSTEE = ^PPTRUSTEE_A;
- {$NODEFINE PPTRUSTEE}
- TTrustee = TTrusteeA;
- PTrustee = PTrusteeA;
- {$ENDIF UNICODE}
-
-//
-// Definition: ACCESS_MODE
-// This enumerated type specifies how permissions are (requested)/to be applied
-// for the trustee by the access control entry. On input this field can by any
-// of the values, although it is not meaningful to mix access control and audit
-// control entries. On output this field will be either SET_ACCESS, DENY_ACCESS,
-// SET_AUDIT_SUCCESS, SET_AUDIT_FAILURE.
-// The following descriptions define how this type effects an explicit access
-// request to apply access permissions to an object.
-// GRANT_ACCESS - The trustee will have at least the requested permissions upon
-// successful completion of the command. (If the trustee has
-// additional permissions they will not be removed).
-// SET_ACCESS - The trustee will have exactly the requested permissions upon
-// successful completion of the command.
-// DENY_ACCESS - The trustee will be denied the specified permissions.
-// REVOKE_ACCESS - Any explicit access rights the trustee has will be revoked.
-// SET_AUDIT_SUCCESS - The trustee will be audited for successful opens of the
-// object using the requested permissions.
-// SET_AUDIT_FAILURE - The trustee will be audited for failed opens of the object
-// using the requested permissions.
-//
-
- _ACCESS_MODE = (
- NOT_USED_ACCESS,
- GRANT_ACCESS,
- SET_ACCESS,
- DENY_ACCESS,
- REVOKE_ACCESS,
- SET_AUDIT_SUCCESS,
- SET_AUDIT_FAILURE);
- {$EXTERNALSYM _ACCESS_MODE}
- ACCESS_MODE = _ACCESS_MODE;
- {$EXTERNALSYM ACCESS_MODE}
- TAccessMode = _ACCESS_MODE;
-
-//
-// Definition: Inheritance flags
-// These bit masks are provided to allow simple application of inheritance in
-// explicit access requests on containers.
-// NO_INHERITANCE The specific access permissions will only be applied to
-// the container, and will not be inherited by objects created
-// within the container.
-// SUB_CONTAINERS_ONLY_INHERIT The specific access permissions will be inherited
-// and applied to sub containers created within the
-// container, and will be applied to the container
-// itself.
-// SUB_OBJECTS_ONLY_INHERIT The specific access permissions will only be inherited
-// by objects created within the specific container.
-// The access permissions will not be applied to the
-// container itself.
-// SUB_CONTAINERS_AND_OBJECTS_INHERIT The specific access permissions will be
-// inherited by containers created within the
-// specific container, will be applied to
-// objects created within the container, but
-// will not be applied to the container itself.
-//
-
-const
- NO_INHERITANCE = $0;
- {$EXTERNALSYM NO_INHERITANCE}
- SUB_OBJECTS_ONLY_INHERIT = $1;
- {$EXTERNALSYM SUB_OBJECTS_ONLY_INHERIT}
- SUB_CONTAINERS_ONLY_INHERIT = $2;
- {$EXTERNALSYM SUB_CONTAINERS_ONLY_INHERIT}
- SUB_CONTAINERS_AND_OBJECTS_INHERIT = $3;
- {$EXTERNALSYM SUB_CONTAINERS_AND_OBJECTS_INHERIT}
- INHERIT_NO_PROPAGATE = $4;
- {$EXTERNALSYM INHERIT_NO_PROPAGATE}
- INHERIT_ONLY = $8;
- {$EXTERNALSYM INHERIT_ONLY}
-
-//
-// Informational bit that is returned
-//
-
- INHERITED_ACCESS_ENTRY = $10;
- {$EXTERNALSYM INHERITED_ACCESS_ENTRY}
-
-//
-// Informational bit that tells where a node was inherited from. Valid only
-// for NT 5 APIs
-//
-
- INHERITED_PARENT = $10000000;
- {$EXTERNALSYM INHERITED_PARENT}
- INHERITED_GRANDPARENT = $20000000;
- {$EXTERNALSYM INHERITED_GRANDPARENT}
-
-//
-// Definition: EXPLICIT_ACCESS
-// This structure is used to pass access control entry information into and out
-// of the system using the API defined in this document.
-// grfAccessPermissions - This contains the access permissions to assign for the
-// trustee. It is in the form of an NT access mask.
-// grfAccessMode - This field defines how the permissions are to be applied for
-// the trustee.
-// grfInheritance - For containers, this field defines how the access control
-// entry is/(is requested) to be inherited on
-// objects/sub-containers created within the container.
-// Trustee - This field contains the definition of the trustee account the
-// explicit access applies to.
-//
-
-type
- PEXPLICIT_ACCESS_A = ^EXPLICIT_ACCESS_A;
- {$EXTERNALSYM PEXPLICIT_ACCESS_A}
- _EXPLICIT_ACCESS_A = packed record
- grfAccessPermissions: DWORD;
- grfAccessMode: ACCESS_MODE;
- grfInheritance: DWORD;
- Trustee: TRUSTEE_A;
- end;
- {$EXTERNALSYM _EXPLICIT_ACCESS_A}
- EXPLICIT_ACCESS_A = _EXPLICIT_ACCESS_A;
- {$EXTERNALSYM EXPLICIT_ACCESS_A}
- EXPLICIT_ACCESSA = EXPLICIT_ACCESS_A;
- {$EXTERNALSYM EXPLICIT_ACCESSA}
- PEXPLICIT_ACCESSA = PEXPLICIT_ACCESS_A;
- {$EXTERNALSYM PEXPLICIT_ACCESSA}
- TExplicitAccessA = EXPLICIT_ACCESS_A;
- PExplicitAccessA = PEXPLICIT_ACCESS_A;
-
- PEXPLICIT_ACCESS_W = ^EXPLICIT_ACCESS_W;
- {$EXTERNALSYM PEXPLICIT_ACCESS_W}
- _EXPLICIT_ACCESS_W = packed record
- grfAccessPermissions: DWORD;
- grfAccessMode: ACCESS_MODE;
- grfInheritance: DWORD;
- Trustee: TRUSTEE_W;
- end;
- {$EXTERNALSYM _EXPLICIT_ACCESS_W}
- EXPLICIT_ACCESS_W = _EXPLICIT_ACCESS_W;
- {$EXTERNALSYM EXPLICIT_ACCESS_W}
- EXPLICIT_ACCESSW = EXPLICIT_ACCESS_W;
- {$EXTERNALSYM EXPLICIT_ACCESSW}
- PEXPLICIT_ACCESSW = PEXPLICIT_ACCESS_W;
- {$EXTERNALSYM PEXPLICIT_ACCESSW}
- TExplicitAccessW = EXPLICIT_ACCESS_W;
- PExplicitAccessW = PEXPLICIT_ACCESS_W;
-
- {$IFDEF UNICODE}
- EXPLICIT_ACCESS_ = EXPLICIT_ACCESS_W;
- {$EXTERNALSYM EXPLICIT_ACCESS_}
- PEXPLICIT_ACCESS_ = PEXPLICIT_ACCESS_W;
- {$EXTERNALSYM PEXPLICIT_ACCESS_}
- EXPLICIT_ACCESS = EXPLICIT_ACCESSW;
- {$EXTERNALSYM EXPLICIT_ACCESS}
- PEXPLICIT_ACCESS = PEXPLICIT_ACCESSW;
- {$EXTERNALSYM PEXPLICIT_ACCESS}
- TExplicitAccess = TExplicitAccessW;
- PExplicitAccess = PExplicitAccessW;
- {$ELSE}
- EXPLICIT_ACCESS_ = EXPLICIT_ACCESS_A;
- {$EXTERNALSYM EXPLICIT_ACCESS_}
- PEXPLICIT_ACCESS_ = PEXPLICIT_ACCESS_A;
- {$EXTERNALSYM PEXPLICIT_ACCESS_}
- EXPLICIT_ACCESS = EXPLICIT_ACCESSA;
- {$EXTERNALSYM EXPLICIT_ACCESS}
- PEXPLICIT_ACCESS = PEXPLICIT_ACCESSA;
- {$EXTERNALSYM PEXPLICIT_ACCESS}
- TExplicitAccess = TExplicitAccessA;
- PExplicitAccess = PExplicitAccessA;
- {$ENDIF UNICODE}
-
-//------------------------------------------------------------------------------
-// NT5 APIs
-//------------------------------------------------------------------------------
-
-//
-// Default provider
-//
-
-const
- ACCCTRL_DEFAULT_PROVIDERA = 'Windows NT Access Provider';
- {$EXTERNALSYM ACCCTRL_DEFAULT_PROVIDERA}
- ACCCTRL_DEFAULT_PROVIDERW = 'Windows NT Access Provider';
- {$EXTERNALSYM ACCCTRL_DEFAULT_PROVIDERW}
-
- {$IFDEF UNICODE}
- ACCCTRL_DEFAULT_PROVIDER = ACCCTRL_DEFAULT_PROVIDERW;
- {$EXTERNALSYM ACCCTRL_DEFAULT_PROVIDER}
- {$ELSE}
- ACCCTRL_DEFAULT_PROVIDER = ACCCTRL_DEFAULT_PROVIDERA;
- {$EXTERNALSYM ACCCTRL_DEFAULT_PROVIDER}
- {$ENDIF UNICODE}
-
-//
-// Access rights
-//
-
-type
- ACCESS_RIGHTS = ULONG;
- {$EXTERNALSYM ACCESS_RIGHTS}
- PACCESS_RIGHTS = ^ACCESS_RIGHTS;
- {$EXTERNALSYM PACCESS_RIGHTS}
-
-//
-// Inheritance flags
-//
-
- INHERIT_FLAGS = ULONG;
- {$EXTERNALSYM INHERIT_FLAGS}
- PINHERIT_FLAGS = ^INHERIT_FLAGS;
- {$EXTERNALSYM PINHERIT_FLAGS}
-
-//
-// Access / Audit structures
-//
-
- PACTRL_ACCESS_ENTRYA = ^ACTRL_ACCESS_ENTRYA;
- {$EXTERNALSYM PACTRL_ACCESS_ENTRYA}
- _ACTRL_ACCESS_ENTRYA = packed record
- Trustee: TRUSTEE_A;
- fAccessFlags: ULONG;
- Access: ACCESS_RIGHTS;
- ProvSpecificAccess: ACCESS_RIGHTS;
- Inheritance: INHERIT_FLAGS;
- lpInheritProperty: LPSTR;
- end;
- {$EXTERNALSYM _ACTRL_ACCESS_ENTRYA}
- ACTRL_ACCESS_ENTRYA = _ACTRL_ACCESS_ENTRYA;
- {$EXTERNALSYM ACTRL_ACCESS_ENTRYA}
- TActrlAccessEntryA = ACTRL_ACCESS_ENTRYA;
- PActrlAccessEntryA = PACTRL_ACCESS_ENTRYA;
-
-//
-// Access / Audit structures
-//
-
- PACTRL_ACCESS_ENTRYW = ^ACTRL_ACCESS_ENTRYW;
- {$EXTERNALSYM PACTRL_ACCESS_ENTRYW}
- _ACTRL_ACCESS_ENTRYW = packed record
- Trustee: TRUSTEE_W;
- fAccessFlags: ULONG;
- Access: ACCESS_RIGHTS;
- ProvSpecificAccess: ACCESS_RIGHTS;
- Inheritance: INHERIT_FLAGS;
- lpInheritProperty: LPWSTR;
- end;
- {$EXTERNALSYM _ACTRL_ACCESS_ENTRYW}
- ACTRL_ACCESS_ENTRYW = _ACTRL_ACCESS_ENTRYW;
- {$EXTERNALSYM ACTRL_ACCESS_ENTRYW}
- TActrlAccessEntryW = ACTRL_ACCESS_ENTRYW;
- PActrlAccessEntryW = PACTRL_ACCESS_ENTRYW;
-
- {$IFDEF UNICODE}
- ACTRL_ACCESS_ENTRY = ACTRL_ACCESS_ENTRYW;
- {$EXTERNALSYM ACTRL_ACCESS_ENTRY}
- PACTRL_ACCESS_ENTRY = PACTRL_ACCESS_ENTRYW;
- {$EXTERNALSYM PACTRL_ACCESS_ENTRY}
- TActrlAccessEntry = TActrlAccessEntryW;
- PActrlAccessEntry = PActrlAccessEntryW;
- {$ELSE}
- ACTRL_ACCESS_ENTRY = ACTRL_ACCESS_ENTRYA;
- {$EXTERNALSYM ACTRL_ACCESS_ENTRY}
- PACTRL_ACCESS_ENTRY = PACTRL_ACCESS_ENTRYA;
- {$EXTERNALSYM PACTRL_ACCESS_ENTRY}
- TActrlAccessEntry = TActrlAccessEntryA;
- PActrlAccessEntry = PActrlAccessEntryA;
- {$ENDIF UNICODE}
-
- PACTRL_ACCESS_ENTRY_LISTA = ^ACTRL_ACCESS_ENTRY_LISTA;
- {$EXTERNALSYM PACTRL_ACCESS_ENTRY_LISTA}
- _ACTRL_ACCESS_ENTRY_LISTA = packed record
- cEntries: ULONG;
- pAccessList: PACTRL_ACCESS_ENTRYA;
- end;
- {$EXTERNALSYM _ACTRL_ACCESS_ENTRY_LISTA}
- ACTRL_ACCESS_ENTRY_LISTA = _ACTRL_ACCESS_ENTRY_LISTA;
- {$EXTERNALSYM ACTRL_ACCESS_ENTRY_LISTA}
- TActrlAccessEntryListA = ACTRL_ACCESS_ENTRY_LISTA;
- PActrlAccessEntryListA = PACTRL_ACCESS_ENTRY_LISTA;
-
- PACTRL_ACCESS_ENTRY_LISTW = ^ACTRL_ACCESS_ENTRY_LISTW;
- {$EXTERNALSYM PACTRL_ACCESS_ENTRY_LISTW}
- _ACTRL_ACCESS_ENTRY_LISTW = packed record
- cEntries: ULONG;
- pAccessList: PACTRL_ACCESS_ENTRYW;
- end;
- {$EXTERNALSYM _ACTRL_ACCESS_ENTRY_LISTW}
- ACTRL_ACCESS_ENTRY_LISTW = _ACTRL_ACCESS_ENTRY_LISTW;
- {$EXTERNALSYM ACTRL_ACCESS_ENTRY_LISTW}
- TActrlAccessEntryListW = ACTRL_ACCESS_ENTRY_LISTW;
- PActrlAccessEntryListW = PACTRL_ACCESS_ENTRY_LISTW;
-
- {$IFDEF UNICODE}
- ACTRL_ACCESS_ENTRY_LIST = ACTRL_ACCESS_ENTRY_LISTW;
- {$EXTERNALSYM ACTRL_ACCESS_ENTRY_LIST}
- PACTRL_ACCESS_ENTRY_LIST = PACTRL_ACCESS_ENTRY_LISTW;
- {$EXTERNALSYM PACTRL_ACCESS_ENTRY_LIST}
- TActrlAccessEntryList = TActrlAccessEntryListW;
- PActrlAccessEntryList = PActrlAccessEntryListW;
- {$ELSE}
- ACTRL_ACCESS_ENTRY_LIST = ACTRL_ACCESS_ENTRY_LISTA;
- {$EXTERNALSYM ACTRL_ACCESS_ENTRY_LIST}
- PACTRL_ACCESS_ENTRY_LIST = PACTRL_ACCESS_ENTRY_LISTA;
- {$EXTERNALSYM PACTRL_ACCESS_ENTRY_LIST}
- TActrlAccessEntryList = TActrlAccessEntryListA;
- PActrlAccessEntryList = PActrlAccessEntryListA;
- {$ENDIF UNICODE}
-
- PACTRL_PROPERTY_ENTRYA = ^ACTRL_PROPERTY_ENTRYA;
- {$EXTERNALSYM PACTRL_PROPERTY_ENTRYA}
- _ACTRL_PROPERTY_ENTRYA = packed record
- lpProperty: LPSTR;
- pAccessEntryList: PACTRL_ACCESS_ENTRY_LISTA;
- fListFlags: ULONG;
- end;
- {$EXTERNALSYM _ACTRL_PROPERTY_ENTRYA}
- ACTRL_PROPERTY_ENTRYA = _ACTRL_PROPERTY_ENTRYA;
- {$EXTERNALSYM ACTRL_PROPERTY_ENTRYA}
- TActrlPropertyEntryA = ACTRL_PROPERTY_ENTRYA;
- PActrlPropertyEntryA = PACTRL_PROPERTY_ENTRYA;
-
- PACTRL_PROPERTY_ENTRYW = ^ACTRL_PROPERTY_ENTRYW;
- {$EXTERNALSYM PACTRL_PROPERTY_ENTRYW}
- _ACTRL_PROPERTY_ENTRYW = packed record
- lpProperty: LPWSTR;
- pAccessEntryList: PACTRL_ACCESS_ENTRY_LISTW;
- fListFlags: ULONG;
- end;
- {$EXTERNALSYM _ACTRL_PROPERTY_ENTRYW}
- ACTRL_PROPERTY_ENTRYW = _ACTRL_PROPERTY_ENTRYW;
- {$EXTERNALSYM ACTRL_PROPERTY_ENTRYW}
- TActrlPropertyEntryW = ACTRL_PROPERTY_ENTRYW;
- PActrlPropertyEntryW = PACTRL_PROPERTY_ENTRYW;
-
- {$IFDEF UNICODE}
- ACTRL_PROPERTY_ENTRY = ACTRL_PROPERTY_ENTRYW;
- {$EXTERNALSYM ACTRL_PROPERTY_ENTRY}
- PACTRL_PROPERTY_ENTRY = PACTRL_PROPERTY_ENTRYW;
- {$EXTERNALSYM PACTRL_PROPERTY_ENTRY}
- TActrlPropertyEntry = TActrlPropertyEntryW;
- PActrlPropertyEntry = PActrlPropertyEntryW;
- {$ELSE}
- ACTRL_PROPERTY_ENTRY = ACTRL_PROPERTY_ENTRYA;
- {$EXTERNALSYM ACTRL_PROPERTY_ENTRY}
- PACTRL_PROPERTY_ENTRY = PACTRL_PROPERTY_ENTRYA;
- {$EXTERNALSYM PACTRL_PROPERTY_ENTRY}
- TActrlPropertyEntry = TActrlPropertyEntryA;
- PActrlPropertyEntry = PActrlPropertyEntryA;
- {$ENDIF UNICODE}
-
- PActrlAlistA = ^TActrlAlistA;
- _ACTRL_ALISTA = packed record
- cEntries: ULONG;
- pPropertyAccessList: PACTRL_PROPERTY_ENTRYA;
- end;
- {$EXTERNALSYM _ACTRL_ALISTA}
- ACTRL_ACCESSA = _ACTRL_ALISTA;
- {$EXTERNALSYM ACTRL_ACCESSA}
- PACTRL_ACCESSA = ^_ACTRL_ALISTA;
- {$EXTERNALSYM PACTRL_ACCESSA}
- ACTRL_AUDITA = ACTRL_ACCESSA;
- {$EXTERNALSYM ACTRL_AUDITA}
- PACTRL_AUDITA = ^ACTRL_AUDITA;
- {$EXTERNALSYM PACTRL_AUDITA}
- TActrlAlistA = _ACTRL_ALISTA;
-
- PActrlAlistW = ^TActrlAlistW;
- _ACTRL_ALISTW = packed record
- cEntries: ULONG;
- pPropertyAccessList: PACTRL_PROPERTY_ENTRYW;
- end;
- {$EXTERNALSYM _ACTRL_ALISTW}
- ACTRL_ACCESSW = _ACTRL_ALISTW;
- {$EXTERNALSYM ACTRL_ACCESSW}
- PACTRL_ACCESSW = ^_ACTRL_ALISTW;
- {$EXTERNALSYM PACTRL_ACCESSW}
- ACTRL_AUDITW = ACTRL_ACCESSW;
- {$EXTERNALSYM ACTRL_AUDITW}
- PACTRL_AUDITW = ^ACTRL_AUDITW;
- {$EXTERNALSYM PACTRL_AUDITW}
- TActrlAlistW = _ACTRL_ALISTW;
-
- {$IFDEF UNICODE}
- ACTRL_ACCESS = ACTRL_ACCESSW;
- {$EXTERNALSYM ACTRL_ACCESS}
- PACTRL_ACCESS = PACTRL_ACCESSW;
- {$EXTERNALSYM PACTRL_ACCESS}
- ACTRL_AUDIT = ACTRL_AUDITW;
- {$EXTERNALSYM ACTRL_AUDIT}
- PACTRL_AUDIT = PACTRL_AUDITW;
- {$EXTERNALSYM PACTRL_AUDIT}
- TActrlAlist = TActrlAlistW;
- PActrlAlist = PActrlAlistW;
- {$ELSE}
- ACTRL_ACCESS = ACTRL_ACCESSA;
- {$EXTERNALSYM ACTRL_ACCESS}
- PACTRL_ACCESS = PACTRL_ACCESSA;
- {$EXTERNALSYM PACTRL_ACCESS}
- ACTRL_AUDIT = ACTRL_AUDITA;
- {$EXTERNALSYM ACTRL_AUDIT}
- PACTRL_AUDIT = PACTRL_AUDITA;
- {$EXTERNALSYM PACTRL_AUDIT}
- TActrlAlist = TActrlAlistA;
- PActrlAlist = PActrlAlistA;
- {$ENDIF UNICODE}
-
-//
-// TRUSTEE_ACCESS flags
-//
-
-const
- TRUSTEE_ACCESS_ALLOWED = $00000001;
- {$EXTERNALSYM TRUSTEE_ACCESS_ALLOWED}
- TRUSTEE_ACCESS_READ = $00000002;
- {$EXTERNALSYM TRUSTEE_ACCESS_READ}
- TRUSTEE_ACCESS_WRITE = $00000004;
- {$EXTERNALSYM TRUSTEE_ACCESS_WRITE}
-
- TRUSTEE_ACCESS_EXPLICIT = $00000001;
- {$EXTERNALSYM TRUSTEE_ACCESS_EXPLICIT}
- TRUSTEE_ACCESS_READ_WRITE = TRUSTEE_ACCESS_READ or TRUSTEE_ACCESS_WRITE;
- {$EXTERNALSYM TRUSTEE_ACCESS_READ_WRITE}
-
- TRUSTEE_ACCESS_ALL = DWORD($FFFFFFFF);
- {$EXTERNALSYM TRUSTEE_ACCESS_ALL}
-
-type
- PTRUSTEE_ACCESSA = ^TRUSTEE_ACCESSA;
- {$EXTERNALSYM PTRUSTEE_ACCESSA}
- _TRUSTEE_ACCESSA = packed record
- lpProperty: LPSTR;
- Access: ACCESS_RIGHTS;
- fAccessFlags: ULONG;
- fReturnedAccess: ULONG;
- end;
- {$EXTERNALSYM _TRUSTEE_ACCESSA}
- TRUSTEE_ACCESSA = _TRUSTEE_ACCESSA;
- {$EXTERNALSYM TRUSTEE_ACCESSA}
- TTrusteeAccessA = TRUSTEE_ACCESSA;
- PTrusteeAccessA = PTRUSTEE_ACCESSA;
-
- PTRUSTEE_ACCESSW = ^TRUSTEE_ACCESSW;
- {$EXTERNALSYM PTRUSTEE_ACCESSW}
- _TRUSTEE_ACCESSW = packed record
- lpProperty: LPWSTR;
- Access: ACCESS_RIGHTS;
- fAccessFlags: ULONG;
- fReturnedAccess: ULONG;
- end;
- {$EXTERNALSYM _TRUSTEE_ACCESSW}
- TRUSTEE_ACCESSW = _TRUSTEE_ACCESSW;
- {$EXTERNALSYM TRUSTEE_ACCESSW}
- TTrusteeAccessW = TRUSTEE_ACCESSW;
- PTrusteeAccessW = PTRUSTEE_ACCESSW;
-
- {$IFDEF UNICODE}
- TRUSTEE_ACCESS = TRUSTEE_ACCESSW;
- {$EXTERNALSYM TRUSTEE_ACCESS}
- PTRUSTEE_ACCESS = PTRUSTEE_ACCESSW;
- {$EXTERNALSYM PTRUSTEE_ACCESS}
- TTrusteeAccess = TTrusteeAccessW;
- PTrusteeAccess = PTrusteeAccessW;
- {$ELSE}
- TRUSTEE_ACCESS = TRUSTEE_ACCESSA;
- {$EXTERNALSYM TRUSTEE_ACCESS}
- PTRUSTEE_ACCESS = PTRUSTEE_ACCESSA;
- {$EXTERNALSYM PTRUSTEE_ACCESS}
- TTrusteeAccess = TTrusteeAccessA;
- PTrusteeAccess = PTrusteeAccessA;
- {$ENDIF UNICODE}
-
-//
-// Generic permission values
-//
-
-const
- ACTRL_RESERVED = $00000000;
- {$EXTERNALSYM ACTRL_RESERVED}
- ACTRL_PERM_1 = $00000001;
- {$EXTERNALSYM ACTRL_PERM_1}
- ACTRL_PERM_2 = $00000002;
- {$EXTERNALSYM ACTRL_PERM_2}
- ACTRL_PERM_3 = $00000004;
- {$EXTERNALSYM ACTRL_PERM_3}
- ACTRL_PERM_4 = $00000008;
- {$EXTERNALSYM ACTRL_PERM_4}
- ACTRL_PERM_5 = $00000010;
- {$EXTERNALSYM ACTRL_PERM_5}
- ACTRL_PERM_6 = $00000020;
- {$EXTERNALSYM ACTRL_PERM_6}
- ACTRL_PERM_7 = $00000040;
- {$EXTERNALSYM ACTRL_PERM_7}
- ACTRL_PERM_8 = $00000080;
- {$EXTERNALSYM ACTRL_PERM_8}
- ACTRL_PERM_9 = $00000100;
- {$EXTERNALSYM ACTRL_PERM_9}
- ACTRL_PERM_10 = $00000200;
- {$EXTERNALSYM ACTRL_PERM_10}
- ACTRL_PERM_11 = $00000400;
- {$EXTERNALSYM ACTRL_PERM_11}
- ACTRL_PERM_12 = $00000800;
- {$EXTERNALSYM ACTRL_PERM_12}
- ACTRL_PERM_13 = $00001000;
- {$EXTERNALSYM ACTRL_PERM_13}
- ACTRL_PERM_14 = $00002000;
- {$EXTERNALSYM ACTRL_PERM_14}
- ACTRL_PERM_15 = $00004000;
- {$EXTERNALSYM ACTRL_PERM_15}
- ACTRL_PERM_16 = $00008000;
- {$EXTERNALSYM ACTRL_PERM_16}
- ACTRL_PERM_17 = $00010000;
- {$EXTERNALSYM ACTRL_PERM_17}
- ACTRL_PERM_18 = $00020000;
- {$EXTERNALSYM ACTRL_PERM_18}
- ACTRL_PERM_19 = $00040000;
- {$EXTERNALSYM ACTRL_PERM_19}
- ACTRL_PERM_20 = $00080000;
- {$EXTERNALSYM ACTRL_PERM_20}
-
-//
-// Access permissions
-//
-
- ACTRL_ACCESS_ALLOWED = $00000001;
- {$EXTERNALSYM ACTRL_ACCESS_ALLOWED}
- ACTRL_ACCESS_DENIED = $00000002;
- {$EXTERNALSYM ACTRL_ACCESS_DENIED}
- ACTRL_AUDIT_SUCCESS = $00000004;
- {$EXTERNALSYM ACTRL_AUDIT_SUCCESS}
- ACTRL_AUDIT_FAILURE = $00000008;
- {$EXTERNALSYM ACTRL_AUDIT_FAILURE}
-
-//
-// Property list flags
-//
-
- ACTRL_ACCESS_PROTECTED = $00000001;
- {$EXTERNALSYM ACTRL_ACCESS_PROTECTED}
-
-//
-// Standard and object rights
-//
-
- ACTRL_SYSTEM_ACCESS = $04000000;
- {$EXTERNALSYM ACTRL_SYSTEM_ACCESS}
- ACTRL_DELETE = $08000000;
- {$EXTERNALSYM ACTRL_DELETE}
- ACTRL_READ_CONTROL = $10000000;
- {$EXTERNALSYM ACTRL_READ_CONTROL}
- ACTRL_CHANGE_ACCESS = $20000000;
- {$EXTERNALSYM ACTRL_CHANGE_ACCESS}
- ACTRL_CHANGE_OWNER = $40000000;
- {$EXTERNALSYM ACTRL_CHANGE_OWNER}
- ACTRL_SYNCHRONIZE = DWORD($80000000);
- {$EXTERNALSYM ACTRL_SYNCHRONIZE}
- ACTRL_STD_RIGHTS_ALL = DWORD($f8000000);
- {$EXTERNALSYM ACTRL_STD_RIGHTS_ALL}
- ACTRL_STD_RIGHT_REQUIRED = DWORD(ACTRL_STD_RIGHTS_ALL and not ACTRL_SYNCHRONIZE);
- {$EXTERNALSYM ACTRL_STD_RIGHT_REQUIRED}
-
- ACTRL_DS_OPEN = ACTRL_RESERVED;
- {$EXTERNALSYM ACTRL_DS_OPEN}
- ACTRL_DS_CREATE_CHILD = ACTRL_PERM_1;
- {$EXTERNALSYM ACTRL_DS_CREATE_CHILD}
- ACTRL_DS_DELETE_CHILD = ACTRL_PERM_2;
- {$EXTERNALSYM ACTRL_DS_DELETE_CHILD}
- ACTRL_DS_LIST = ACTRL_PERM_3;
- {$EXTERNALSYM ACTRL_DS_LIST}
- ACTRL_DS_SELF = ACTRL_PERM_4;
- {$EXTERNALSYM ACTRL_DS_SELF}
- ACTRL_DS_READ_PROP = ACTRL_PERM_5;
- {$EXTERNALSYM ACTRL_DS_READ_PROP}
- ACTRL_DS_WRITE_PROP = ACTRL_PERM_6;
- {$EXTERNALSYM ACTRL_DS_WRITE_PROP}
- ACTRL_DS_DELETE_TREE = ACTRL_PERM_7;
- {$EXTERNALSYM ACTRL_DS_DELETE_TREE}
- ACTRL_DS_LIST_OBJECT = ACTRL_PERM_8;
- {$EXTERNALSYM ACTRL_DS_LIST_OBJECT}
- ACTRL_DS_CONTROL_ACCESS = ACTRL_PERM_9;
- {$EXTERNALSYM ACTRL_DS_CONTROL_ACCESS}
-
- ACTRL_FILE_READ = ACTRL_PERM_1;
- {$EXTERNALSYM ACTRL_FILE_READ}
- ACTRL_FILE_WRITE = ACTRL_PERM_2;
- {$EXTERNALSYM ACTRL_FILE_WRITE}
- ACTRL_FILE_APPEND = ACTRL_PERM_3;
- {$EXTERNALSYM ACTRL_FILE_APPEND}
- ACTRL_FILE_READ_PROP = ACTRL_PERM_4;
- {$EXTERNALSYM ACTRL_FILE_READ_PROP}
- ACTRL_FILE_WRITE_PROP = ACTRL_PERM_5;
- {$EXTERNALSYM ACTRL_FILE_WRITE_PROP}
- ACTRL_FILE_EXECUTE = ACTRL_PERM_6;
- {$EXTERNALSYM ACTRL_FILE_EXECUTE}
- ACTRL_FILE_READ_ATTRIB = ACTRL_PERM_8;
- {$EXTERNALSYM ACTRL_FILE_READ_ATTRIB}
- ACTRL_FILE_WRITE_ATTRIB = ACTRL_PERM_9;
- {$EXTERNALSYM ACTRL_FILE_WRITE_ATTRIB}
- ACTRL_FILE_CREATE_PIPE = ACTRL_PERM_10;
- {$EXTERNALSYM ACTRL_FILE_CREATE_PIPE}
- ACTRL_DIR_LIST = ACTRL_PERM_1;
- {$EXTERNALSYM ACTRL_DIR_LIST}
- ACTRL_DIR_CREATE_OBJECT = ACTRL_PERM_2;
- {$EXTERNALSYM ACTRL_DIR_CREATE_OBJECT}
- ACTRL_DIR_CREATE_CHILD = ACTRL_PERM_3;
- {$EXTERNALSYM ACTRL_DIR_CREATE_CHILD}
- ACTRL_DIR_DELETE_CHILD = ACTRL_PERM_7;
- {$EXTERNALSYM ACTRL_DIR_DELETE_CHILD}
- ACTRL_DIR_TRAVERSE = ACTRL_PERM_6;
- {$EXTERNALSYM ACTRL_DIR_TRAVERSE}
- ACTRL_KERNEL_TERMINATE = ACTRL_PERM_1;
- {$EXTERNALSYM ACTRL_KERNEL_TERMINATE}
- ACTRL_KERNEL_THREAD = ACTRL_PERM_2;
- {$EXTERNALSYM ACTRL_KERNEL_THREAD}
- ACTRL_KERNEL_VM = ACTRL_PERM_3;
- {$EXTERNALSYM ACTRL_KERNEL_VM}
- ACTRL_KERNEL_VM_READ = ACTRL_PERM_4;
- {$EXTERNALSYM ACTRL_KERNEL_VM_READ}
- ACTRL_KERNEL_VM_WRITE = ACTRL_PERM_5;
- {$EXTERNALSYM ACTRL_KERNEL_VM_WRITE}
- ACTRL_KERNEL_DUP_HANDLE = ACTRL_PERM_6;
- {$EXTERNALSYM ACTRL_KERNEL_DUP_HANDLE}
- ACTRL_KERNEL_PROCESS = ACTRL_PERM_7;
- {$EXTERNALSYM ACTRL_KERNEL_PROCESS}
- ACTRL_KERNEL_SET_INFO = ACTRL_PERM_8;
- {$EXTERNALSYM ACTRL_KERNEL_SET_INFO}
- ACTRL_KERNEL_GET_INFO = ACTRL_PERM_9;
- {$EXTERNALSYM ACTRL_KERNEL_GET_INFO}
- ACTRL_KERNEL_CONTROL = ACTRL_PERM_10;
- {$EXTERNALSYM ACTRL_KERNEL_CONTROL}
- ACTRL_KERNEL_ALERT = ACTRL_PERM_11;
- {$EXTERNALSYM ACTRL_KERNEL_ALERT}
- ACTRL_KERNEL_GET_CONTEXT = ACTRL_PERM_12;
- {$EXTERNALSYM ACTRL_KERNEL_GET_CONTEXT}
- ACTRL_KERNEL_SET_CONTEXT = ACTRL_PERM_13;
- {$EXTERNALSYM ACTRL_KERNEL_SET_CONTEXT}
- ACTRL_KERNEL_TOKEN = ACTRL_PERM_14;
- {$EXTERNALSYM ACTRL_KERNEL_TOKEN}
- ACTRL_KERNEL_IMPERSONATE = ACTRL_PERM_15;
- {$EXTERNALSYM ACTRL_KERNEL_IMPERSONATE}
- ACTRL_KERNEL_DIMPERSONATE = ACTRL_PERM_16;
- {$EXTERNALSYM ACTRL_KERNEL_DIMPERSONATE}
- ACTRL_PRINT_SADMIN = ACTRL_PERM_1;
- {$EXTERNALSYM ACTRL_PRINT_SADMIN}
- ACTRL_PRINT_SLIST = ACTRL_PERM_2;
- {$EXTERNALSYM ACTRL_PRINT_SLIST}
- ACTRL_PRINT_PADMIN = ACTRL_PERM_3;
- {$EXTERNALSYM ACTRL_PRINT_PADMIN}
- ACTRL_PRINT_PUSE = ACTRL_PERM_4;
- {$EXTERNALSYM ACTRL_PRINT_PUSE}
- ACTRL_PRINT_JADMIN = ACTRL_PERM_5;
- {$EXTERNALSYM ACTRL_PRINT_JADMIN}
- ACTRL_SVC_GET_INFO = ACTRL_PERM_1;
- {$EXTERNALSYM ACTRL_SVC_GET_INFO}
- ACTRL_SVC_SET_INFO = ACTRL_PERM_2;
- {$EXTERNALSYM ACTRL_SVC_SET_INFO}
- ACTRL_SVC_STATUS = ACTRL_PERM_3;
- {$EXTERNALSYM ACTRL_SVC_STATUS}
- ACTRL_SVC_LIST = ACTRL_PERM_4;
- {$EXTERNALSYM ACTRL_SVC_LIST}
- ACTRL_SVC_START = ACTRL_PERM_5;
- {$EXTERNALSYM ACTRL_SVC_START}
- ACTRL_SVC_STOP = ACTRL_PERM_6;
- {$EXTERNALSYM ACTRL_SVC_STOP}
- ACTRL_SVC_PAUSE = ACTRL_PERM_7;
- {$EXTERNALSYM ACTRL_SVC_PAUSE}
- ACTRL_SVC_INTERROGATE = ACTRL_PERM_8;
- {$EXTERNALSYM ACTRL_SVC_INTERROGATE}
- ACTRL_SVC_UCONTROL = ACTRL_PERM_9;
- {$EXTERNALSYM ACTRL_SVC_UCONTROL}
- ACTRL_REG_QUERY = ACTRL_PERM_1;
- {$EXTERNALSYM ACTRL_REG_QUERY}
- ACTRL_REG_SET = ACTRL_PERM_2;
- {$EXTERNALSYM ACTRL_REG_SET}
- ACTRL_REG_CREATE_CHILD = ACTRL_PERM_3;
- {$EXTERNALSYM ACTRL_REG_CREATE_CHILD}
- ACTRL_REG_LIST = ACTRL_PERM_4;
- {$EXTERNALSYM ACTRL_REG_LIST}
- ACTRL_REG_NOTIFY = ACTRL_PERM_5;
- {$EXTERNALSYM ACTRL_REG_NOTIFY}
- ACTRL_REG_LINK = ACTRL_PERM_6;
- {$EXTERNALSYM ACTRL_REG_LINK}
- ACTRL_WIN_CLIPBRD = ACTRL_PERM_1;
- {$EXTERNALSYM ACTRL_WIN_CLIPBRD}
- ACTRL_WIN_GLOBAL_ATOMS = ACTRL_PERM_2;
- {$EXTERNALSYM ACTRL_WIN_GLOBAL_ATOMS}
- ACTRL_WIN_CREATE = ACTRL_PERM_3;
- {$EXTERNALSYM ACTRL_WIN_CREATE}
- ACTRL_WIN_LIST_DESK = ACTRL_PERM_4;
- {$EXTERNALSYM ACTRL_WIN_LIST_DESK}
- ACTRL_WIN_LIST = ACTRL_PERM_5;
- {$EXTERNALSYM ACTRL_WIN_LIST}
- ACTRL_WIN_READ_ATTRIBS = ACTRL_PERM_6;
- {$EXTERNALSYM ACTRL_WIN_READ_ATTRIBS}
- ACTRL_WIN_WRITE_ATTRIBS = ACTRL_PERM_7;
- {$EXTERNALSYM ACTRL_WIN_WRITE_ATTRIBS}
- ACTRL_WIN_SCREEN = ACTRL_PERM_8;
- {$EXTERNALSYM ACTRL_WIN_SCREEN}
- ACTRL_WIN_EXIT = ACTRL_PERM_9;
- {$EXTERNALSYM ACTRL_WIN_EXIT}
-
-type
- PACTRL_OVERLAPPED = ^ACTRL_OVERLAPPED;
- {$EXTERNALSYM PACTRL_OVERLAPPED}
- _ACTRL_OVERLAPPED = packed record
- //union {
- Provider: PVOID;
- // ULONG Reserved1;
- //};
- Reserved2: ULONG;
- hEvent: HANDLE;
- end;
- {$EXTERNALSYM _ACTRL_OVERLAPPED}
- ACTRL_OVERLAPPED = _ACTRL_OVERLAPPED;
- {$EXTERNALSYM ACTRL_OVERLAPPED}
- TActrlOverlapped = ACTRL_OVERLAPPED;
- PActrlOverlapped = PACTRL_OVERLAPPED;
-
- PACTRL_ACCESS_INFOA = ^ACTRL_ACCESS_INFOA;
- {$EXTERNALSYM PACTRL_ACCESS_INFOA}
- _ACTRL_ACCESS_INFOA = packed record
- fAccessPermission: ULONG;
- lpAccessPermissionName: LPSTR;
- end;
- {$EXTERNALSYM _ACTRL_ACCESS_INFOA}
- ACTRL_ACCESS_INFOA = _ACTRL_ACCESS_INFOA;
- {$EXTERNALSYM ACTRL_ACCESS_INFOA}
- TActrlAccessInfoA = ACTRL_ACCESS_INFOA;
- PActrlAccessInfoA = PACTRL_ACCESS_INFOA;
-
- PACTRL_ACCESS_INFOW = ^ACTRL_ACCESS_INFOW;
- {$EXTERNALSYM PACTRL_ACCESS_INFOW}
- _ACTRL_ACCESS_INFOW = packed record
- fAccessPermission: ULONG;
- lpAccessPermissionName: LPWSTR;
- end;
- {$EXTERNALSYM _ACTRL_ACCESS_INFOW}
- ACTRL_ACCESS_INFOW = _ACTRL_ACCESS_INFOW;
- {$EXTERNALSYM ACTRL_ACCESS_INFOW}
- TActrlAccessInfoW = ACTRL_ACCESS_INFOW;
- PActrlAccessInfoW = PACTRL_ACCESS_INFOW;
-
- {$IFDEF UNICODE}
- ACTRL_ACCESS_INFO = ACTRL_ACCESS_INFOW;
- {$EXTERNALSYM ACTRL_ACCESS_INFO}
- PACTRL_ACCESS_INFO = PACTRL_ACCESS_INFOW;
- {$EXTERNALSYM PACTRL_ACCESS_INFO}
- TActrlAccessInfo = TActrlAccessInfoW;
- PActrlAccessInfo = PActrlAccessInfoW;
- {$ELSE}
- ACTRL_ACCESS_INFO = ACTRL_ACCESS_INFOA;
- {$EXTERNALSYM ACTRL_ACCESS_INFO}
- PACTRL_ACCESS_INFO = PACTRL_ACCESS_INFOA;
- {$EXTERNALSYM PACTRL_ACCESS_INFO}
- TActrlAccessInfo = TActrlAccessInfoA;
- PActrlAccessInfo = PActrlAccessInfoA;
- {$ENDIF UNICODE}
-
- PACTRL_CONTROL_INFOA = ^ACTRL_CONTROL_INFOA;
- {$EXTERNALSYM PACTRL_CONTROL_INFOA}
- _ACTRL_CONTROL_INFOA = packed record
- lpControlId: LPSTR;
- lpControlName: LPSTR;
- end;
- {$EXTERNALSYM _ACTRL_CONTROL_INFOA}
- ACTRL_CONTROL_INFOA = _ACTRL_CONTROL_INFOA;
- {$EXTERNALSYM ACTRL_CONTROL_INFOA}
- TActrlControlInfoA = ACTRL_CONTROL_INFOA;
- PActrlControlInfoA = PACTRL_CONTROL_INFOA;
-
- PACTRL_CONTROL_INFOW = ^ACTRL_CONTROL_INFOW;
- {$EXTERNALSYM PACTRL_CONTROL_INFOW}
- _ACTRL_CONTROL_INFOW = packed record
- lpControlId: LPWSTR;
- lpControlName: LPWSTR;
- end;
- {$EXTERNALSYM _ACTRL_CONTROL_INFOW}
- ACTRL_CONTROL_INFOW = _ACTRL_CONTROL_INFOW;
- {$EXTERNALSYM ACTRL_CONTROL_INFOW}
- TActrlControlInfoW = ACTRL_CONTROL_INFOW;
- PActrlControlInfoW = PACTRL_CONTROL_INFOW;
-
- {$IFDEF UNICODE}
- ACTRL_CONTROL_INFO = ACTRL_CONTROL_INFOW;
- {$EXTERNALSYM ACTRL_CONTROL_INFO}
- PACTRL_CONTROL_INFO = PACTRL_CONTROL_INFOW;
- {$EXTERNALSYM PACTRL_CONTROL_INFO}
- TActrlControlInfo = TActrlControlInfoW;
- PActrlControlInfo = PActrlControlInfoW;
- {$ELSE}
- ACTRL_CONTROL_INFO = ACTRL_CONTROL_INFOA;
- {$EXTERNALSYM ACTRL_CONTROL_INFO}
- PACTRL_CONTROL_INFO = PACTRL_CONTROL_INFOA;
- {$EXTERNALSYM PACTRL_CONTROL_INFO}
- TActrlControlInfo = TActrlControlInfoA;
- PActrlControlInfo = PActrlControlInfoA;
- {$ENDIF UNICODE}
-
-const
- ACTRL_ACCESS_NO_OPTIONS = $00000000;
- {$EXTERNALSYM ACTRL_ACCESS_NO_OPTIONS}
- ACTRL_ACCESS_SUPPORTS_OBJECT_ENTRIES = $00000001;
- {$EXTERNALSYM ACTRL_ACCESS_SUPPORTS_OBJECT_ENTRIES}
-
- ProgressInvokeNever = 1; // Never invoke the progress function
- {$EXTERNALSYM ProgressInvokeNever}
- ProgressInvokeEveryObject = 2; // Invoke for each object
- {$EXTERNALSYM ProgressInvokeEveryObject}
- ProgressInvokeOnError = 3; // Invoke only for each error case
- {$EXTERNALSYM ProgressInvokeOnError}
- ProgressCancelOperation = 4; // Stop propagation and return
- {$EXTERNALSYM ProgressCancelOperation}
- ProgressRetryOperation = 5; // Retry operation on subtree
- {$EXTERNALSYM ProgressRetryOperation}
-
-type
- PROG_INVOKE_SETTING = DWORD;
- {$EXTERNALSYM PROG_INVOKE_SETTING}
- PPROG_INVOKE_SETTING = ^PROG_INVOKE_SETTING;
- {$EXTERNALSYM PPROG_INVOKE_SETTING}
- TProgInvokeSetting = PROG_INVOKE_SETTING;
- PProgInvokeSetting = PPROG_INVOKE_SETTING;
-
-//
-// Progress Function:
-// Caller of tree operation implements this Progress function, then
-// passes its function pointer to tree operation.
-// Tree operation invokes Progress function to provide progress and error
-// information to the caller during the potentially long execution
-// of the tree operation. Tree operation provides the name of the object
-// last processed and the error status of the operation on that object.
-// Tree operation also passes the current InvokeSetting value.
-// Caller may change the InvokeSetting value, for example, from "Always"
-// to "Only On Error."
-//
-
-type
- FN_PROGRESS = procedure(pObjectName: LPWSTR; Status: DWORD;
- var pInvokeSetting: PROG_INVOKE_SETTING; Args: PVOID; SecuritySet: BOOL); stdcall;
- {$EXTERNALSYM FN_PROGRESS}
- TFnProgress = FN_PROGRESS;
-
-//
-// New Object Type function pointers. TBD.
-// To support additional object resource managers generically, the
-// resource manager must provide it's own functions for operations
-// like:
-// GetAncestorAcl(IN ObjName, IN GenerationGap, IN DaclOrSacl?, ...)
-// GetAncestorName(...)
-// FreeNameStructure(...)
-//
-
-type
- _FN_OBJECT_MGR_FUNCTIONS = record
- Placeholder: ULONG;
- end;
- {$EXTERNALSYM _FN_OBJECT_MGR_FUNCTIONS}
- FN_OBJECT_MGR_FUNCTS = _FN_OBJECT_MGR_FUNCTIONS;
- {$EXTERNALSYM FN_OBJECT_MGR_FUNCTS}
- PFN_OBJECT_MGR_FUNCTS = ^FN_OBJECT_MGR_FUNCTS;
- {$EXTERNALSYM PFN_OBJECT_MGR_FUNCTS}
- TFnObjectMgrFuncts = FN_OBJECT_MGR_FUNCTS;
- PFnObjectMgrFuncts = PFN_OBJECT_MGR_FUNCTS;
-
-//
-// Name of ancestor and number of generations between
-// ancestor and inheriting object.
-//
-// GenerationGap:
-// Name of ancestor from which ACE was inherited.
-// NULL for explicit ACE.
-//
-// AncestorName:
-// Number of levels (or generations) between the object and the ancestor.
-// Parent, gap=1.
-// Grandparent, gap=2.
-// Set to 0 for explicit ACE on object.
-//
-
-type
- _INHERITED_FROMA = record
- GenerationGap: LONG;
- AncestorName: LPSTR;
- end;
- {$EXTERNALSYM _INHERITED_FROMA}
- INHERITED_FROMA = _INHERITED_FROMA;
- {$EXTERNALSYM INHERITED_FROMA}
- PINHERITED_FROMA = ^INHERITED_FROMA;
- {$EXTERNALSYM PINHERITED_FROMA}
- TInheritedFromA = INHERITED_FROMA;
- PInheritedFromA = PINHERITED_FROMA;
-
- _INHERITED_FROMW = record
- GenerationGap: LONG;
- AncestorName: LPWSTR;
- end;
- {$EXTERNALSYM _INHERITED_FROMW}
- INHERITED_FROMW = _INHERITED_FROMW;
- {$EXTERNALSYM INHERITED_FROMW}
- PINHERITED_FROMW = ^INHERITED_FROMW;
- {$EXTERNALSYM PINHERITED_FROMW}
- TInheritedFromW = INHERITED_FROMW;
- PInheritedFromW = PINHERITED_FROMW;
-
- {$IFDEF UNICODE}
- INHERITED_FROM = INHERITED_FROMW;
- {$EXTERNALSYM INHERITED_FROM}
- PINHERITED_FROM = PINHERITED_FROMW;
- {$EXTERNALSYM PINHERITED_FROM}
- TInheritedFrom = TInheritedFromW;
- PInheritedFrom = PInheritedFromW;
- {$ELSE}
- INHERITED_FROM = INHERITED_FROMA;
- {$EXTERNALSYM INHERITED_FROM}
- PINHERITED_FROM = PINHERITED_FROMA;
- {$EXTERNALSYM PINHERITED_FROM}
- TInheritedFrom = TInheritedFromA;
- PInheritedFrom = PInheritedFromA;
- {$ENDIF UNICODE}
-
-implementation
-
-uses
- JwaWinBase;
-
-// (rom) MACRO implementation
-function AccFree(hMem: HLOCAL): HLOCAL;
-begin
- Result := LocalFree(hMem);
-end;
-
-end.
-
+{******************************************************************************}
+{ }
+{ Interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2003 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 2003 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwaaccctrl.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaAccCtrl;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "aclapi.h"'}
+{$HPPEMIT ''}
+{$HPPEMIT 'typedef PTRUSTEE_A *PPTRUSTEE_A'}
+{$HPPEMIT 'typedef PTRUSTEE_W *PPTRUSTEE_W'}
+{$HPPEMIT '#ifdef UNICODE'}
+{$HPPEMIT 'typedef PPTRUSTEE_W PPTRUSTEE'}
+{$HPPEMIT '#else'}
+{$HPPEMIT 'typedef PPTRUSTEE_A PPTRUSTEE'}
+{$HPPEMIT '#endif'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaWinNT, JwaWinType;
+
+(* Dependencies
+// winnt
+PSID
+//wintype
+HLOCAL
+DWORD
+GUID
+LPSTR
+LPWSTR
+ULONG
+PVOID
+HANDLE
+BOOL
+LONG
+*)
+
+// (rom) MACRO
+function AccFree(hMem: HLOCAL): HLOCAL;
+{$EXTERNALSYM AccFree}
+
+//
+// Definition:
+// This enumerated type defines the objects supported by the get/set API within
+// this document. See section 3.1, Object Types for a detailed definition of the
+// supported object types, and their name formats.
+//
+
+type
+ _SE_OBJECT_TYPE = (
+ SE_UNKNOWN_OBJECT_TYPE,
+ SE_FILE_OBJECT,
+ SE_SERVICE,
+ SE_PRINTER,
+ SE_REGISTRY_KEY,
+ SE_LMSHARE,
+ SE_KERNEL_OBJECT,
+ SE_WINDOW_OBJECT,
+ SE_DS_OBJECT,
+ SE_DS_OBJECT_ALL,
+ SE_PROVIDER_DEFINED_OBJECT,
+ SE_WMIGUID_OBJECT,
+ SE_REGISTRY_WOW64_32KEY);
+ {$EXTERNALSYM _SE_OBJECT_TYPE}
+ SE_OBJECT_TYPE = _SE_OBJECT_TYPE;
+ {$EXTERNALSYM SE_OBJECT_TYPE}
+ TSeObjectType = SE_OBJECT_TYPE;
+
+//
+// Definition: TRUSTEE_TYPE
+// This enumerated type specifies the type of trustee account for the trustee
+// returned by the API described in this document.
+// TRUSTEE_IS_UNKNOWN - The trustee is an unknown, but not necessarily invalid
+// type. This field is not validated on input to the APIs
+// that take Trustees.
+// TRUSTEE_IS_USER The trustee account is a user account.
+// TRUSTEE_IS_GROUP The trustee account is a group account.
+//
+
+ _TRUSTEE_TYPE = (
+ TRUSTEE_IS_UNKNOWN,
+ TRUSTEE_IS_USER,
+ TRUSTEE_IS_GROUP,
+ TRUSTEE_IS_DOMAIN,
+ TRUSTEE_IS_ALIAS,
+ TRUSTEE_IS_WELL_KNOWN_GROUP,
+ TRUSTEE_IS_DELETED,
+ TRUSTEE_IS_INVALID,
+ TRUSTEE_IS_COMPUTER);
+ {$EXTERNALSYM _TRUSTEE_TYPE}
+ TRUSTEE_TYPE = _TRUSTEE_TYPE;
+ {$EXTERNALSYM TRUSTEE_TYPE}
+ TTrusteeType = TRUSTEE_TYPE;
+
+//
+// Definition: TRUSTEE_FORM
+// This enumerated type specifies the form the trustee identifier is in for a
+// particular trustee.
+// TRUSTEE_IS_SID The trustee is identified with a SID rather than with a name.
+// TRUSTEE_IS_NAME The trustee is identified with a name.
+//
+
+ _TRUSTEE_FORM = (
+ TRUSTEE_IS_SID,
+ TRUSTEE_IS_NAME,
+ TRUSTEE_BAD_FORM,
+ TRUSTEE_IS_OBJECTS_AND_SID,
+ TRUSTEE_IS_OBJECTS_AND_NAME);
+ {$EXTERNALSYM _TRUSTEE_FORM}
+ TRUSTEE_FORM = _TRUSTEE_FORM;
+ {$EXTERNALSYM TRUSTEE_FORM}
+ TTrusteeForm = TRUSTEE_FORM;
+
+//
+// Definition: MULTIPLE_TRUSTEE_OPERATION
+// If the trustee is a multiple trustee, this enumerated type specifies the type.
+// TRUSTEE_IS_IMPERSONATE The trustee is an impersonate trustee and the multiple
+// trustee field in the trustee points to another trustee
+// that is a trustee for the server that will be doing the
+// impersonation.
+//
+
+ _MULTIPLE_TRUSTEE_OPERATION = (NO_MULTIPLE_TRUSTEE, TRUSTEE_IS_IMPERSONATE);
+ {$EXTERNALSYM _MULTIPLE_TRUSTEE_OPERATION}
+ MULTIPLE_TRUSTEE_OPERATION = _MULTIPLE_TRUSTEE_OPERATION;
+ {$EXTERNALSYM MULTIPLE_TRUSTEE_OPERATION}
+ TMultipleTrusteeOperation = MULTIPLE_TRUSTEE_OPERATION;
+
+ POBJECTS_AND_SID = ^OBJECTS_AND_SID;
+ {$EXTERNALSYM POBJECTS_AND_SID}
+ _OBJECTS_AND_SID = packed record
+ ObjectsPresent: DWORD;
+ ObjectTypeGuid: GUID;
+ InheritedObjectTypeGuid: GUID;
+ pSid: PSID;
+ end;
+ {$EXTERNALSYM _OBJECTS_AND_SID}
+ OBJECTS_AND_SID = _OBJECTS_AND_SID;
+ {$EXTERNALSYM OBJECTS_AND_SID}
+ TObjectsAndSid = OBJECTS_AND_SID;
+ PObjectsAndSid = POBJECTS_AND_SID;
+
+ POBJECTS_AND_NAME_A = ^OBJECTS_AND_NAME_A;
+ {$EXTERNALSYM POBJECTS_AND_NAME_A}
+ _OBJECTS_AND_NAME_A = packed record
+ ObjectsPresent: DWORD;
+ ObjectType: SE_OBJECT_TYPE;
+ ObjectTypeName: LPSTR;
+ InheritedObjectTypeName: LPSTR;
+ ptstrName: LPSTR;
+ end;
+ {$EXTERNALSYM _OBJECTS_AND_NAME_A}
+ OBJECTS_AND_NAME_A = _OBJECTS_AND_NAME_A;
+ {$EXTERNALSYM OBJECTS_AND_NAME_A}
+ TObjectsAndNameA = OBJECTS_AND_NAME_A;
+ PObjectsAndNameA = POBJECTS_AND_NAME_A;
+
+ POBJECTS_AND_NAME_W = ^OBJECTS_AND_NAME_W;
+ {$EXTERNALSYM POBJECTS_AND_NAME_W}
+ _OBJECTS_AND_NAME_W = packed record
+ ObjectsPresent: DWORD;
+ ObjectType: SE_OBJECT_TYPE;
+ ObjectTypeName: LPWSTR;
+ InheritedObjectTypeName: LPWSTR;
+ ptstrName: LPWSTR;
+ end;
+ {$EXTERNALSYM _OBJECTS_AND_NAME_W}
+ OBJECTS_AND_NAME_W = _OBJECTS_AND_NAME_W;
+ {$EXTERNALSYM OBJECTS_AND_NAME_W}
+ TObjectsAndNameW = OBJECTS_AND_NAME_W;
+ PObjectsAndNameW = POBJECTS_AND_NAME_W;
+
+ {$IFDEF UNICODE}
+ OBJECTS_AND_NAME = OBJECTS_AND_NAME_W;
+ {$EXTERNALSYM OBJECTS_AND_NAME}
+ POBJECTS_AND_NAME = POBJECTS_AND_NAME_W;
+ {$EXTERNALSYM POBJECTS_AND_NAME}
+ TObjectsAndName = TObjectsAndNameW;
+ PObjectsAndName = PObjectsAndNameW;
+ {$ELSE}
+ OBJECTS_AND_NAME = OBJECTS_AND_NAME_A;
+ {$EXTERNALSYM OBJECTS_AND_NAME}
+ POBJECTS_AND_NAME = POBJECTS_AND_NAME_A;
+ {$EXTERNALSYM POBJECTS_AND_NAME}
+ TObjectsAndName = TObjectsAndNameA;
+ PObjectsAndName = PObjectsAndNameA;
+ {$ENDIF UNICODE}
+
+//
+// Definition: TRUSTEE
+// This structure is used to pass account information into and out of the system
+// using the API defined in this document.
+// PMultipleTrustee - if NON-NULL, points to another trustee structure, as
+// defined by the multiple trustee operation field.
+// MultipleTrusteeOperation - Defines the multiple trustee operation/type.
+// TrusteeForm - defines if the trustee is defined by name or SID.
+// TrusteeType - defines if the trustee type is unknown, a user or a group.
+// PwcsName - points to the trustee name or the trustee SID.
+//
+
+ PTRUSTEE_A = ^TRUSTEE_A;
+ {$EXTERNALSYM PTRUSTEE_A}
+ _TRUSTEE_A = packed record
+ pMultipleTrustee: PTRUSTEE_A;
+ MultipleTrusteeOperation: MULTIPLE_TRUSTEE_OPERATION;
+ TrusteeForm: TRUSTEE_FORM;
+ TrusteeType: TRUSTEE_TYPE;
+ ptstrName: LPSTR;
+ end;
+ {$EXTERNALSYM _TRUSTEE_A}
+ TRUSTEE_A = _TRUSTEE_A;
+ {$EXTERNALSYM TRUSTEE_A}
+ TRUSTEEA = TRUSTEE_A;
+ {$EXTERNALSYM PTRUSTEEA}
+ PPTRUSTEE_A = ^PTRUSTEE_A;
+ {$NODEFINE PPTRUSTEE_A}
+ TTrusteeA = TRUSTEE_A;
+ PTrusteeA = PTRUSTEE_A;
+
+ PTRUSTEE_W = ^TRUSTEE_W;
+ {$EXTERNALSYM PTRUSTEE_W}
+ _TRUSTEE_W = packed record
+ pMultipleTrustee: PTRUSTEE_W;
+ MultipleTrusteeOperation: MULTIPLE_TRUSTEE_OPERATION;
+ TrusteeForm: TRUSTEE_FORM;
+ TrusteeType: TRUSTEE_TYPE;
+ ptstrName: LPWSTR;
+ end;
+ {$EXTERNALSYM _TRUSTEE_W}
+ TRUSTEE_W = _TRUSTEE_W;
+ {$EXTERNALSYM TRUSTEE_W}
+ TRUSTEEW = TRUSTEE_W;
+ {$EXTERNALSYM TRUSTEEW}
+ PPTRUSTEE_W = ^PTRUSTEE_W;
+ {$NODEFINE PPTRUSTEE_W}
+ TTrusteeW = TRUSTEE_W;
+ PTrusteeW = PTRUSTEE_W;
+
+ {$IFDEF UNICODE}
+ TRUSTEE_ = TRUSTEE_W;
+ {$EXTERNALSYM TRUSTEE_}
+ PTRUSTEE_ = PTRUSTEE_W;
+ {$EXTERNALSYM PTRUSTEE_}
+ TRUSTEE = TRUSTEEW;
+ {$EXTERNALSYM TRUSTEE}
+ PPTRUSTEE = ^PPTRUSTEE_W;
+ {$NODEFINE PPTRUSTEE}
+ TTrustee = TTrusteeW;
+ PTrustee = PTrusteeW;
+ {$ELSE}
+ TRUSTEE_ = TRUSTEE_A;
+ {$EXTERNALSYM TRUSTEE_}
+ PTRUSTEE_ = PTRUSTEE_A;
+ {$EXTERNALSYM PTRUSTEE_}
+ TRUSTEE = TRUSTEEA;
+ {$EXTERNALSYM TRUSTEE}
+ PPTRUSTEE = ^PPTRUSTEE_A;
+ {$NODEFINE PPTRUSTEE}
+ TTrustee = TTrusteeA;
+ PTrustee = PTrusteeA;
+ {$ENDIF UNICODE}
+
+//
+// Definition: ACCESS_MODE
+// This enumerated type specifies how permissions are (requested)/to be applied
+// for the trustee by the access control entry. On input this field can by any
+// of the values, although it is not meaningful to mix access control and audit
+// control entries. On output this field will be either SET_ACCESS, DENY_ACCESS,
+// SET_AUDIT_SUCCESS, SET_AUDIT_FAILURE.
+// The following descriptions define how this type effects an explicit access
+// request to apply access permissions to an object.
+// GRANT_ACCESS - The trustee will have at least the requested permissions upon
+// successful completion of the command. (If the trustee has
+// additional permissions they will not be removed).
+// SET_ACCESS - The trustee will have exactly the requested permissions upon
+// successful completion of the command.
+// DENY_ACCESS - The trustee will be denied the specified permissions.
+// REVOKE_ACCESS - Any explicit access rights the trustee has will be revoked.
+// SET_AUDIT_SUCCESS - The trustee will be audited for successful opens of the
+// object using the requested permissions.
+// SET_AUDIT_FAILURE - The trustee will be audited for failed opens of the object
+// using the requested permissions.
+//
+
+ _ACCESS_MODE = (
+ NOT_USED_ACCESS,
+ GRANT_ACCESS,
+ SET_ACCESS,
+ DENY_ACCESS,
+ REVOKE_ACCESS,
+ SET_AUDIT_SUCCESS,
+ SET_AUDIT_FAILURE);
+ {$EXTERNALSYM _ACCESS_MODE}
+ ACCESS_MODE = _ACCESS_MODE;
+ {$EXTERNALSYM ACCESS_MODE}
+ TAccessMode = _ACCESS_MODE;
+
+//
+// Definition: Inheritance flags
+// These bit masks are provided to allow simple application of inheritance in
+// explicit access requests on containers.
+// NO_INHERITANCE The specific access permissions will only be applied to
+// the container, and will not be inherited by objects created
+// within the container.
+// SUB_CONTAINERS_ONLY_INHERIT The specific access permissions will be inherited
+// and applied to sub containers created within the
+// container, and will be applied to the container
+// itself.
+// SUB_OBJECTS_ONLY_INHERIT The specific access permissions will only be inherited
+// by objects created within the specific container.
+// The access permissions will not be applied to the
+// container itself.
+// SUB_CONTAINERS_AND_OBJECTS_INHERIT The specific access permissions will be
+// inherited by containers created within the
+// specific container, will be applied to
+// objects created within the container, but
+// will not be applied to the container itself.
+//
+
+const
+ NO_INHERITANCE = $0;
+ {$EXTERNALSYM NO_INHERITANCE}
+ SUB_OBJECTS_ONLY_INHERIT = $1;
+ {$EXTERNALSYM SUB_OBJECTS_ONLY_INHERIT}
+ SUB_CONTAINERS_ONLY_INHERIT = $2;
+ {$EXTERNALSYM SUB_CONTAINERS_ONLY_INHERIT}
+ SUB_CONTAINERS_AND_OBJECTS_INHERIT = $3;
+ {$EXTERNALSYM SUB_CONTAINERS_AND_OBJECTS_INHERIT}
+ INHERIT_NO_PROPAGATE = $4;
+ {$EXTERNALSYM INHERIT_NO_PROPAGATE}
+ INHERIT_ONLY = $8;
+ {$EXTERNALSYM INHERIT_ONLY}
+
+//
+// Informational bit that is returned
+//
+
+ INHERITED_ACCESS_ENTRY = $10;
+ {$EXTERNALSYM INHERITED_ACCESS_ENTRY}
+
+//
+// Informational bit that tells where a node was inherited from. Valid only
+// for NT 5 APIs
+//
+
+ INHERITED_PARENT = $10000000;
+ {$EXTERNALSYM INHERITED_PARENT}
+ INHERITED_GRANDPARENT = $20000000;
+ {$EXTERNALSYM INHERITED_GRANDPARENT}
+
+//
+// Definition: EXPLICIT_ACCESS
+// This structure is used to pass access control entry information into and out
+// of the system using the API defined in this document.
+// grfAccessPermissions - This contains the access permissions to assign for the
+// trustee. It is in the form of an NT access mask.
+// grfAccessMode - This field defines how the permissions are to be applied for
+// the trustee.
+// grfInheritance - For containers, this field defines how the access control
+// entry is/(is requested) to be inherited on
+// objects/sub-containers created within the container.
+// Trustee - This field contains the definition of the trustee account the
+// explicit access applies to.
+//
+
+type
+ PEXPLICIT_ACCESS_A = ^EXPLICIT_ACCESS_A;
+ {$EXTERNALSYM PEXPLICIT_ACCESS_A}
+ _EXPLICIT_ACCESS_A = packed record
+ grfAccessPermissions: DWORD;
+ grfAccessMode: ACCESS_MODE;
+ grfInheritance: DWORD;
+ Trustee: TRUSTEE_A;
+ end;
+ {$EXTERNALSYM _EXPLICIT_ACCESS_A}
+ EXPLICIT_ACCESS_A = _EXPLICIT_ACCESS_A;
+ {$EXTERNALSYM EXPLICIT_ACCESS_A}
+ EXPLICIT_ACCESSA = EXPLICIT_ACCESS_A;
+ {$EXTERNALSYM EXPLICIT_ACCESSA}
+ PEXPLICIT_ACCESSA = PEXPLICIT_ACCESS_A;
+ {$EXTERNALSYM PEXPLICIT_ACCESSA}
+ TExplicitAccessA = EXPLICIT_ACCESS_A;
+ PExplicitAccessA = PEXPLICIT_ACCESS_A;
+
+ PEXPLICIT_ACCESS_W = ^EXPLICIT_ACCESS_W;
+ {$EXTERNALSYM PEXPLICIT_ACCESS_W}
+ _EXPLICIT_ACCESS_W = packed record
+ grfAccessPermissions: DWORD;
+ grfAccessMode: ACCESS_MODE;
+ grfInheritance: DWORD;
+ Trustee: TRUSTEE_W;
+ end;
+ {$EXTERNALSYM _EXPLICIT_ACCESS_W}
+ EXPLICIT_ACCESS_W = _EXPLICIT_ACCESS_W;
+ {$EXTERNALSYM EXPLICIT_ACCESS_W}
+ EXPLICIT_ACCESSW = EXPLICIT_ACCESS_W;
+ {$EXTERNALSYM EXPLICIT_ACCESSW}
+ PEXPLICIT_ACCESSW = PEXPLICIT_ACCESS_W;
+ {$EXTERNALSYM PEXPLICIT_ACCESSW}
+ TExplicitAccessW = EXPLICIT_ACCESS_W;
+ PExplicitAccessW = PEXPLICIT_ACCESS_W;
+
+ {$IFDEF UNICODE}
+ EXPLICIT_ACCESS_ = EXPLICIT_ACCESS_W;
+ {$EXTERNALSYM EXPLICIT_ACCESS_}
+ PEXPLICIT_ACCESS_ = PEXPLICIT_ACCESS_W;
+ {$EXTERNALSYM PEXPLICIT_ACCESS_}
+ EXPLICIT_ACCESS = EXPLICIT_ACCESSW;
+ {$EXTERNALSYM EXPLICIT_ACCESS}
+ PEXPLICIT_ACCESS = PEXPLICIT_ACCESSW;
+ {$EXTERNALSYM PEXPLICIT_ACCESS}
+ TExplicitAccess = TExplicitAccessW;
+ PExplicitAccess = PExplicitAccessW;
+ {$ELSE}
+ EXPLICIT_ACCESS_ = EXPLICIT_ACCESS_A;
+ {$EXTERNALSYM EXPLICIT_ACCESS_}
+ PEXPLICIT_ACCESS_ = PEXPLICIT_ACCESS_A;
+ {$EXTERNALSYM PEXPLICIT_ACCESS_}
+ EXPLICIT_ACCESS = EXPLICIT_ACCESSA;
+ {$EXTERNALSYM EXPLICIT_ACCESS}
+ PEXPLICIT_ACCESS = PEXPLICIT_ACCESSA;
+ {$EXTERNALSYM PEXPLICIT_ACCESS}
+ TExplicitAccess = TExplicitAccessA;
+ PExplicitAccess = PExplicitAccessA;
+ {$ENDIF UNICODE}
+
+//------------------------------------------------------------------------------
+// NT5 APIs
+//------------------------------------------------------------------------------
+
+//
+// Default provider
+//
+
+const
+ ACCCTRL_DEFAULT_PROVIDERA = 'Windows NT Access Provider';
+ {$EXTERNALSYM ACCCTRL_DEFAULT_PROVIDERA}
+ ACCCTRL_DEFAULT_PROVIDERW = 'Windows NT Access Provider';
+ {$EXTERNALSYM ACCCTRL_DEFAULT_PROVIDERW}
+
+ {$IFDEF UNICODE}
+ ACCCTRL_DEFAULT_PROVIDER = ACCCTRL_DEFAULT_PROVIDERW;
+ {$EXTERNALSYM ACCCTRL_DEFAULT_PROVIDER}
+ {$ELSE}
+ ACCCTRL_DEFAULT_PROVIDER = ACCCTRL_DEFAULT_PROVIDERA;
+ {$EXTERNALSYM ACCCTRL_DEFAULT_PROVIDER}
+ {$ENDIF UNICODE}
+
+//
+// Access rights
+//
+
+type
+ ACCESS_RIGHTS = ULONG;
+ {$EXTERNALSYM ACCESS_RIGHTS}
+ PACCESS_RIGHTS = ^ACCESS_RIGHTS;
+ {$EXTERNALSYM PACCESS_RIGHTS}
+
+//
+// Inheritance flags
+//
+
+ INHERIT_FLAGS = ULONG;
+ {$EXTERNALSYM INHERIT_FLAGS}
+ PINHERIT_FLAGS = ^INHERIT_FLAGS;
+ {$EXTERNALSYM PINHERIT_FLAGS}
+
+//
+// Access / Audit structures
+//
+
+ PACTRL_ACCESS_ENTRYA = ^ACTRL_ACCESS_ENTRYA;
+ {$EXTERNALSYM PACTRL_ACCESS_ENTRYA}
+ _ACTRL_ACCESS_ENTRYA = packed record
+ Trustee: TRUSTEE_A;
+ fAccessFlags: ULONG;
+ Access: ACCESS_RIGHTS;
+ ProvSpecificAccess: ACCESS_RIGHTS;
+ Inheritance: INHERIT_FLAGS;
+ lpInheritProperty: LPSTR;
+ end;
+ {$EXTERNALSYM _ACTRL_ACCESS_ENTRYA}
+ ACTRL_ACCESS_ENTRYA = _ACTRL_ACCESS_ENTRYA;
+ {$EXTERNALSYM ACTRL_ACCESS_ENTRYA}
+ TActrlAccessEntryA = ACTRL_ACCESS_ENTRYA;
+ PActrlAccessEntryA = PACTRL_ACCESS_ENTRYA;
+
+//
+// Access / Audit structures
+//
+
+ PACTRL_ACCESS_ENTRYW = ^ACTRL_ACCESS_ENTRYW;
+ {$EXTERNALSYM PACTRL_ACCESS_ENTRYW}
+ _ACTRL_ACCESS_ENTRYW = packed record
+ Trustee: TRUSTEE_W;
+ fAccessFlags: ULONG;
+ Access: ACCESS_RIGHTS;
+ ProvSpecificAccess: ACCESS_RIGHTS;
+ Inheritance: INHERIT_FLAGS;
+ lpInheritProperty: LPWSTR;
+ end;
+ {$EXTERNALSYM _ACTRL_ACCESS_ENTRYW}
+ ACTRL_ACCESS_ENTRYW = _ACTRL_ACCESS_ENTRYW;
+ {$EXTERNALSYM ACTRL_ACCESS_ENTRYW}
+ TActrlAccessEntryW = ACTRL_ACCESS_ENTRYW;
+ PActrlAccessEntryW = PACTRL_ACCESS_ENTRYW;
+
+ {$IFDEF UNICODE}
+ ACTRL_ACCESS_ENTRY = ACTRL_ACCESS_ENTRYW;
+ {$EXTERNALSYM ACTRL_ACCESS_ENTRY}
+ PACTRL_ACCESS_ENTRY = PACTRL_ACCESS_ENTRYW;
+ {$EXTERNALSYM PACTRL_ACCESS_ENTRY}
+ TActrlAccessEntry = TActrlAccessEntryW;
+ PActrlAccessEntry = PActrlAccessEntryW;
+ {$ELSE}
+ ACTRL_ACCESS_ENTRY = ACTRL_ACCESS_ENTRYA;
+ {$EXTERNALSYM ACTRL_ACCESS_ENTRY}
+ PACTRL_ACCESS_ENTRY = PACTRL_ACCESS_ENTRYA;
+ {$EXTERNALSYM PACTRL_ACCESS_ENTRY}
+ TActrlAccessEntry = TActrlAccessEntryA;
+ PActrlAccessEntry = PActrlAccessEntryA;
+ {$ENDIF UNICODE}
+
+ PACTRL_ACCESS_ENTRY_LISTA = ^ACTRL_ACCESS_ENTRY_LISTA;
+ {$EXTERNALSYM PACTRL_ACCESS_ENTRY_LISTA}
+ _ACTRL_ACCESS_ENTRY_LISTA = packed record
+ cEntries: ULONG;
+ pAccessList: PACTRL_ACCESS_ENTRYA;
+ end;
+ {$EXTERNALSYM _ACTRL_ACCESS_ENTRY_LISTA}
+ ACTRL_ACCESS_ENTRY_LISTA = _ACTRL_ACCESS_ENTRY_LISTA;
+ {$EXTERNALSYM ACTRL_ACCESS_ENTRY_LISTA}
+ TActrlAccessEntryListA = ACTRL_ACCESS_ENTRY_LISTA;
+ PActrlAccessEntryListA = PACTRL_ACCESS_ENTRY_LISTA;
+
+ PACTRL_ACCESS_ENTRY_LISTW = ^ACTRL_ACCESS_ENTRY_LISTW;
+ {$EXTERNALSYM PACTRL_ACCESS_ENTRY_LISTW}
+ _ACTRL_ACCESS_ENTRY_LISTW = packed record
+ cEntries: ULONG;
+ pAccessList: PACTRL_ACCESS_ENTRYW;
+ end;
+ {$EXTERNALSYM _ACTRL_ACCESS_ENTRY_LISTW}
+ ACTRL_ACCESS_ENTRY_LISTW = _ACTRL_ACCESS_ENTRY_LISTW;
+ {$EXTERNALSYM ACTRL_ACCESS_ENTRY_LISTW}
+ TActrlAccessEntryListW = ACTRL_ACCESS_ENTRY_LISTW;
+ PActrlAccessEntryListW = PACTRL_ACCESS_ENTRY_LISTW;
+
+ {$IFDEF UNICODE}
+ ACTRL_ACCESS_ENTRY_LIST = ACTRL_ACCESS_ENTRY_LISTW;
+ {$EXTERNALSYM ACTRL_ACCESS_ENTRY_LIST}
+ PACTRL_ACCESS_ENTRY_LIST = PACTRL_ACCESS_ENTRY_LISTW;
+ {$EXTERNALSYM PACTRL_ACCESS_ENTRY_LIST}
+ TActrlAccessEntryList = TActrlAccessEntryListW;
+ PActrlAccessEntryList = PActrlAccessEntryListW;
+ {$ELSE}
+ ACTRL_ACCESS_ENTRY_LIST = ACTRL_ACCESS_ENTRY_LISTA;
+ {$EXTERNALSYM ACTRL_ACCESS_ENTRY_LIST}
+ PACTRL_ACCESS_ENTRY_LIST = PACTRL_ACCESS_ENTRY_LISTA;
+ {$EXTERNALSYM PACTRL_ACCESS_ENTRY_LIST}
+ TActrlAccessEntryList = TActrlAccessEntryListA;
+ PActrlAccessEntryList = PActrlAccessEntryListA;
+ {$ENDIF UNICODE}
+
+ PACTRL_PROPERTY_ENTRYA = ^ACTRL_PROPERTY_ENTRYA;
+ {$EXTERNALSYM PACTRL_PROPERTY_ENTRYA}
+ _ACTRL_PROPERTY_ENTRYA = packed record
+ lpProperty: LPSTR;
+ pAccessEntryList: PACTRL_ACCESS_ENTRY_LISTA;
+ fListFlags: ULONG;
+ end;
+ {$EXTERNALSYM _ACTRL_PROPERTY_ENTRYA}
+ ACTRL_PROPERTY_ENTRYA = _ACTRL_PROPERTY_ENTRYA;
+ {$EXTERNALSYM ACTRL_PROPERTY_ENTRYA}
+ TActrlPropertyEntryA = ACTRL_PROPERTY_ENTRYA;
+ PActrlPropertyEntryA = PACTRL_PROPERTY_ENTRYA;
+
+ PACTRL_PROPERTY_ENTRYW = ^ACTRL_PROPERTY_ENTRYW;
+ {$EXTERNALSYM PACTRL_PROPERTY_ENTRYW}
+ _ACTRL_PROPERTY_ENTRYW = packed record
+ lpProperty: LPWSTR;
+ pAccessEntryList: PACTRL_ACCESS_ENTRY_LISTW;
+ fListFlags: ULONG;
+ end;
+ {$EXTERNALSYM _ACTRL_PROPERTY_ENTRYW}
+ ACTRL_PROPERTY_ENTRYW = _ACTRL_PROPERTY_ENTRYW;
+ {$EXTERNALSYM ACTRL_PROPERTY_ENTRYW}
+ TActrlPropertyEntryW = ACTRL_PROPERTY_ENTRYW;
+ PActrlPropertyEntryW = PACTRL_PROPERTY_ENTRYW;
+
+ {$IFDEF UNICODE}
+ ACTRL_PROPERTY_ENTRY = ACTRL_PROPERTY_ENTRYW;
+ {$EXTERNALSYM ACTRL_PROPERTY_ENTRY}
+ PACTRL_PROPERTY_ENTRY = PACTRL_PROPERTY_ENTRYW;
+ {$EXTERNALSYM PACTRL_PROPERTY_ENTRY}
+ TActrlPropertyEntry = TActrlPropertyEntryW;
+ PActrlPropertyEntry = PActrlPropertyEntryW;
+ {$ELSE}
+ ACTRL_PROPERTY_ENTRY = ACTRL_PROPERTY_ENTRYA;
+ {$EXTERNALSYM ACTRL_PROPERTY_ENTRY}
+ PACTRL_PROPERTY_ENTRY = PACTRL_PROPERTY_ENTRYA;
+ {$EXTERNALSYM PACTRL_PROPERTY_ENTRY}
+ TActrlPropertyEntry = TActrlPropertyEntryA;
+ PActrlPropertyEntry = PActrlPropertyEntryA;
+ {$ENDIF UNICODE}
+
+ PActrlAlistA = ^TActrlAlistA;
+ _ACTRL_ALISTA = packed record
+ cEntries: ULONG;
+ pPropertyAccessList: PACTRL_PROPERTY_ENTRYA;
+ end;
+ {$EXTERNALSYM _ACTRL_ALISTA}
+ ACTRL_ACCESSA = _ACTRL_ALISTA;
+ {$EXTERNALSYM ACTRL_ACCESSA}
+ PACTRL_ACCESSA = ^_ACTRL_ALISTA;
+ {$EXTERNALSYM PACTRL_ACCESSA}
+ ACTRL_AUDITA = ACTRL_ACCESSA;
+ {$EXTERNALSYM ACTRL_AUDITA}
+ PACTRL_AUDITA = ^ACTRL_AUDITA;
+ {$EXTERNALSYM PACTRL_AUDITA}
+ TActrlAlistA = _ACTRL_ALISTA;
+
+ PActrlAlistW = ^TActrlAlistW;
+ _ACTRL_ALISTW = packed record
+ cEntries: ULONG;
+ pPropertyAccessList: PACTRL_PROPERTY_ENTRYW;
+ end;
+ {$EXTERNALSYM _ACTRL_ALISTW}
+ ACTRL_ACCESSW = _ACTRL_ALISTW;
+ {$EXTERNALSYM ACTRL_ACCESSW}
+ PACTRL_ACCESSW = ^_ACTRL_ALISTW;
+ {$EXTERNALSYM PACTRL_ACCESSW}
+ ACTRL_AUDITW = ACTRL_ACCESSW;
+ {$EXTERNALSYM ACTRL_AUDITW}
+ PACTRL_AUDITW = ^ACTRL_AUDITW;
+ {$EXTERNALSYM PACTRL_AUDITW}
+ TActrlAlistW = _ACTRL_ALISTW;
+
+ {$IFDEF UNICODE}
+ ACTRL_ACCESS = ACTRL_ACCESSW;
+ {$EXTERNALSYM ACTRL_ACCESS}
+ PACTRL_ACCESS = PACTRL_ACCESSW;
+ {$EXTERNALSYM PACTRL_ACCESS}
+ ACTRL_AUDIT = ACTRL_AUDITW;
+ {$EXTERNALSYM ACTRL_AUDIT}
+ PACTRL_AUDIT = PACTRL_AUDITW;
+ {$EXTERNALSYM PACTRL_AUDIT}
+ TActrlAlist = TActrlAlistW;
+ PActrlAlist = PActrlAlistW;
+ {$ELSE}
+ ACTRL_ACCESS = ACTRL_ACCESSA;
+ {$EXTERNALSYM ACTRL_ACCESS}
+ PACTRL_ACCESS = PACTRL_ACCESSA;
+ {$EXTERNALSYM PACTRL_ACCESS}
+ ACTRL_AUDIT = ACTRL_AUDITA;
+ {$EXTERNALSYM ACTRL_AUDIT}
+ PACTRL_AUDIT = PACTRL_AUDITA;
+ {$EXTERNALSYM PACTRL_AUDIT}
+ TActrlAlist = TActrlAlistA;
+ PActrlAlist = PActrlAlistA;
+ {$ENDIF UNICODE}
+
+//
+// TRUSTEE_ACCESS flags
+//
+
+const
+ TRUSTEE_ACCESS_ALLOWED = $00000001;
+ {$EXTERNALSYM TRUSTEE_ACCESS_ALLOWED}
+ TRUSTEE_ACCESS_READ = $00000002;
+ {$EXTERNALSYM TRUSTEE_ACCESS_READ}
+ TRUSTEE_ACCESS_WRITE = $00000004;
+ {$EXTERNALSYM TRUSTEE_ACCESS_WRITE}
+
+ TRUSTEE_ACCESS_EXPLICIT = $00000001;
+ {$EXTERNALSYM TRUSTEE_ACCESS_EXPLICIT}
+ TRUSTEE_ACCESS_READ_WRITE = TRUSTEE_ACCESS_READ or TRUSTEE_ACCESS_WRITE;
+ {$EXTERNALSYM TRUSTEE_ACCESS_READ_WRITE}
+
+ TRUSTEE_ACCESS_ALL = DWORD($FFFFFFFF);
+ {$EXTERNALSYM TRUSTEE_ACCESS_ALL}
+
+type
+ PTRUSTEE_ACCESSA = ^TRUSTEE_ACCESSA;
+ {$EXTERNALSYM PTRUSTEE_ACCESSA}
+ _TRUSTEE_ACCESSA = packed record
+ lpProperty: LPSTR;
+ Access: ACCESS_RIGHTS;
+ fAccessFlags: ULONG;
+ fReturnedAccess: ULONG;
+ end;
+ {$EXTERNALSYM _TRUSTEE_ACCESSA}
+ TRUSTEE_ACCESSA = _TRUSTEE_ACCESSA;
+ {$EXTERNALSYM TRUSTEE_ACCESSA}
+ TTrusteeAccessA = TRUSTEE_ACCESSA;
+ PTrusteeAccessA = PTRUSTEE_ACCESSA;
+
+ PTRUSTEE_ACCESSW = ^TRUSTEE_ACCESSW;
+ {$EXTERNALSYM PTRUSTEE_ACCESSW}
+ _TRUSTEE_ACCESSW = packed record
+ lpProperty: LPWSTR;
+ Access: ACCESS_RIGHTS;
+ fAccessFlags: ULONG;
+ fReturnedAccess: ULONG;
+ end;
+ {$EXTERNALSYM _TRUSTEE_ACCESSW}
+ TRUSTEE_ACCESSW = _TRUSTEE_ACCESSW;
+ {$EXTERNALSYM TRUSTEE_ACCESSW}
+ TTrusteeAccessW = TRUSTEE_ACCESSW;
+ PTrusteeAccessW = PTRUSTEE_ACCESSW;
+
+ {$IFDEF UNICODE}
+ TRUSTEE_ACCESS = TRUSTEE_ACCESSW;
+ {$EXTERNALSYM TRUSTEE_ACCESS}
+ PTRUSTEE_ACCESS = PTRUSTEE_ACCESSW;
+ {$EXTERNALSYM PTRUSTEE_ACCESS}
+ TTrusteeAccess = TTrusteeAccessW;
+ PTrusteeAccess = PTrusteeAccessW;
+ {$ELSE}
+ TRUSTEE_ACCESS = TRUSTEE_ACCESSA;
+ {$EXTERNALSYM TRUSTEE_ACCESS}
+ PTRUSTEE_ACCESS = PTRUSTEE_ACCESSA;
+ {$EXTERNALSYM PTRUSTEE_ACCESS}
+ TTrusteeAccess = TTrusteeAccessA;
+ PTrusteeAccess = PTrusteeAccessA;
+ {$ENDIF UNICODE}
+
+//
+// Generic permission values
+//
+
+const
+ ACTRL_RESERVED = $00000000;
+ {$EXTERNALSYM ACTRL_RESERVED}
+ ACTRL_PERM_1 = $00000001;
+ {$EXTERNALSYM ACTRL_PERM_1}
+ ACTRL_PERM_2 = $00000002;
+ {$EXTERNALSYM ACTRL_PERM_2}
+ ACTRL_PERM_3 = $00000004;
+ {$EXTERNALSYM ACTRL_PERM_3}
+ ACTRL_PERM_4 = $00000008;
+ {$EXTERNALSYM ACTRL_PERM_4}
+ ACTRL_PERM_5 = $00000010;
+ {$EXTERNALSYM ACTRL_PERM_5}
+ ACTRL_PERM_6 = $00000020;
+ {$EXTERNALSYM ACTRL_PERM_6}
+ ACTRL_PERM_7 = $00000040;
+ {$EXTERNALSYM ACTRL_PERM_7}
+ ACTRL_PERM_8 = $00000080;
+ {$EXTERNALSYM ACTRL_PERM_8}
+ ACTRL_PERM_9 = $00000100;
+ {$EXTERNALSYM ACTRL_PERM_9}
+ ACTRL_PERM_10 = $00000200;
+ {$EXTERNALSYM ACTRL_PERM_10}
+ ACTRL_PERM_11 = $00000400;
+ {$EXTERNALSYM ACTRL_PERM_11}
+ ACTRL_PERM_12 = $00000800;
+ {$EXTERNALSYM ACTRL_PERM_12}
+ ACTRL_PERM_13 = $00001000;
+ {$EXTERNALSYM ACTRL_PERM_13}
+ ACTRL_PERM_14 = $00002000;
+ {$EXTERNALSYM ACTRL_PERM_14}
+ ACTRL_PERM_15 = $00004000;
+ {$EXTERNALSYM ACTRL_PERM_15}
+ ACTRL_PERM_16 = $00008000;
+ {$EXTERNALSYM ACTRL_PERM_16}
+ ACTRL_PERM_17 = $00010000;
+ {$EXTERNALSYM ACTRL_PERM_17}
+ ACTRL_PERM_18 = $00020000;
+ {$EXTERNALSYM ACTRL_PERM_18}
+ ACTRL_PERM_19 = $00040000;
+ {$EXTERNALSYM ACTRL_PERM_19}
+ ACTRL_PERM_20 = $00080000;
+ {$EXTERNALSYM ACTRL_PERM_20}
+
+//
+// Access permissions
+//
+
+ ACTRL_ACCESS_ALLOWED = $00000001;
+ {$EXTERNALSYM ACTRL_ACCESS_ALLOWED}
+ ACTRL_ACCESS_DENIED = $00000002;
+ {$EXTERNALSYM ACTRL_ACCESS_DENIED}
+ ACTRL_AUDIT_SUCCESS = $00000004;
+ {$EXTERNALSYM ACTRL_AUDIT_SUCCESS}
+ ACTRL_AUDIT_FAILURE = $00000008;
+ {$EXTERNALSYM ACTRL_AUDIT_FAILURE}
+
+//
+// Property list flags
+//
+
+ ACTRL_ACCESS_PROTECTED = $00000001;
+ {$EXTERNALSYM ACTRL_ACCESS_PROTECTED}
+
+//
+// Standard and object rights
+//
+
+ ACTRL_SYSTEM_ACCESS = $04000000;
+ {$EXTERNALSYM ACTRL_SYSTEM_ACCESS}
+ ACTRL_DELETE = $08000000;
+ {$EXTERNALSYM ACTRL_DELETE}
+ ACTRL_READ_CONTROL = $10000000;
+ {$EXTERNALSYM ACTRL_READ_CONTROL}
+ ACTRL_CHANGE_ACCESS = $20000000;
+ {$EXTERNALSYM ACTRL_CHANGE_ACCESS}
+ ACTRL_CHANGE_OWNER = $40000000;
+ {$EXTERNALSYM ACTRL_CHANGE_OWNER}
+ ACTRL_SYNCHRONIZE = DWORD($80000000);
+ {$EXTERNALSYM ACTRL_SYNCHRONIZE}
+ ACTRL_STD_RIGHTS_ALL = DWORD($f8000000);
+ {$EXTERNALSYM ACTRL_STD_RIGHTS_ALL}
+ ACTRL_STD_RIGHT_REQUIRED = DWORD(ACTRL_STD_RIGHTS_ALL and not ACTRL_SYNCHRONIZE);
+ {$EXTERNALSYM ACTRL_STD_RIGHT_REQUIRED}
+
+ ACTRL_DS_OPEN = ACTRL_RESERVED;
+ {$EXTERNALSYM ACTRL_DS_OPEN}
+ ACTRL_DS_CREATE_CHILD = ACTRL_PERM_1;
+ {$EXTERNALSYM ACTRL_DS_CREATE_CHILD}
+ ACTRL_DS_DELETE_CHILD = ACTRL_PERM_2;
+ {$EXTERNALSYM ACTRL_DS_DELETE_CHILD}
+ ACTRL_DS_LIST = ACTRL_PERM_3;
+ {$EXTERNALSYM ACTRL_DS_LIST}
+ ACTRL_DS_SELF = ACTRL_PERM_4;
+ {$EXTERNALSYM ACTRL_DS_SELF}
+ ACTRL_DS_READ_PROP = ACTRL_PERM_5;
+ {$EXTERNALSYM ACTRL_DS_READ_PROP}
+ ACTRL_DS_WRITE_PROP = ACTRL_PERM_6;
+ {$EXTERNALSYM ACTRL_DS_WRITE_PROP}
+ ACTRL_DS_DELETE_TREE = ACTRL_PERM_7;
+ {$EXTERNALSYM ACTRL_DS_DELETE_TREE}
+ ACTRL_DS_LIST_OBJECT = ACTRL_PERM_8;
+ {$EXTERNALSYM ACTRL_DS_LIST_OBJECT}
+ ACTRL_DS_CONTROL_ACCESS = ACTRL_PERM_9;
+ {$EXTERNALSYM ACTRL_DS_CONTROL_ACCESS}
+
+ ACTRL_FILE_READ = ACTRL_PERM_1;
+ {$EXTERNALSYM ACTRL_FILE_READ}
+ ACTRL_FILE_WRITE = ACTRL_PERM_2;
+ {$EXTERNALSYM ACTRL_FILE_WRITE}
+ ACTRL_FILE_APPEND = ACTRL_PERM_3;
+ {$EXTERNALSYM ACTRL_FILE_APPEND}
+ ACTRL_FILE_READ_PROP = ACTRL_PERM_4;
+ {$EXTERNALSYM ACTRL_FILE_READ_PROP}
+ ACTRL_FILE_WRITE_PROP = ACTRL_PERM_5;
+ {$EXTERNALSYM ACTRL_FILE_WRITE_PROP}
+ ACTRL_FILE_EXECUTE = ACTRL_PERM_6;
+ {$EXTERNALSYM ACTRL_FILE_EXECUTE}
+ ACTRL_FILE_READ_ATTRIB = ACTRL_PERM_8;
+ {$EXTERNALSYM ACTRL_FILE_READ_ATTRIB}
+ ACTRL_FILE_WRITE_ATTRIB = ACTRL_PERM_9;
+ {$EXTERNALSYM ACTRL_FILE_WRITE_ATTRIB}
+ ACTRL_FILE_CREATE_PIPE = ACTRL_PERM_10;
+ {$EXTERNALSYM ACTRL_FILE_CREATE_PIPE}
+ ACTRL_DIR_LIST = ACTRL_PERM_1;
+ {$EXTERNALSYM ACTRL_DIR_LIST}
+ ACTRL_DIR_CREATE_OBJECT = ACTRL_PERM_2;
+ {$EXTERNALSYM ACTRL_DIR_CREATE_OBJECT}
+ ACTRL_DIR_CREATE_CHILD = ACTRL_PERM_3;
+ {$EXTERNALSYM ACTRL_DIR_CREATE_CHILD}
+ ACTRL_DIR_DELETE_CHILD = ACTRL_PERM_7;
+ {$EXTERNALSYM ACTRL_DIR_DELETE_CHILD}
+ ACTRL_DIR_TRAVERSE = ACTRL_PERM_6;
+ {$EXTERNALSYM ACTRL_DIR_TRAVERSE}
+ ACTRL_KERNEL_TERMINATE = ACTRL_PERM_1;
+ {$EXTERNALSYM ACTRL_KERNEL_TERMINATE}
+ ACTRL_KERNEL_THREAD = ACTRL_PERM_2;
+ {$EXTERNALSYM ACTRL_KERNEL_THREAD}
+ ACTRL_KERNEL_VM = ACTRL_PERM_3;
+ {$EXTERNALSYM ACTRL_KERNEL_VM}
+ ACTRL_KERNEL_VM_READ = ACTRL_PERM_4;
+ {$EXTERNALSYM ACTRL_KERNEL_VM_READ}
+ ACTRL_KERNEL_VM_WRITE = ACTRL_PERM_5;
+ {$EXTERNALSYM ACTRL_KERNEL_VM_WRITE}
+ ACTRL_KERNEL_DUP_HANDLE = ACTRL_PERM_6;
+ {$EXTERNALSYM ACTRL_KERNEL_DUP_HANDLE}
+ ACTRL_KERNEL_PROCESS = ACTRL_PERM_7;
+ {$EXTERNALSYM ACTRL_KERNEL_PROCESS}
+ ACTRL_KERNEL_SET_INFO = ACTRL_PERM_8;
+ {$EXTERNALSYM ACTRL_KERNEL_SET_INFO}
+ ACTRL_KERNEL_GET_INFO = ACTRL_PERM_9;
+ {$EXTERNALSYM ACTRL_KERNEL_GET_INFO}
+ ACTRL_KERNEL_CONTROL = ACTRL_PERM_10;
+ {$EXTERNALSYM ACTRL_KERNEL_CONTROL}
+ ACTRL_KERNEL_ALERT = ACTRL_PERM_11;
+ {$EXTERNALSYM ACTRL_KERNEL_ALERT}
+ ACTRL_KERNEL_GET_CONTEXT = ACTRL_PERM_12;
+ {$EXTERNALSYM ACTRL_KERNEL_GET_CONTEXT}
+ ACTRL_KERNEL_SET_CONTEXT = ACTRL_PERM_13;
+ {$EXTERNALSYM ACTRL_KERNEL_SET_CONTEXT}
+ ACTRL_KERNEL_TOKEN = ACTRL_PERM_14;
+ {$EXTERNALSYM ACTRL_KERNEL_TOKEN}
+ ACTRL_KERNEL_IMPERSONATE = ACTRL_PERM_15;
+ {$EXTERNALSYM ACTRL_KERNEL_IMPERSONATE}
+ ACTRL_KERNEL_DIMPERSONATE = ACTRL_PERM_16;
+ {$EXTERNALSYM ACTRL_KERNEL_DIMPERSONATE}
+ ACTRL_PRINT_SADMIN = ACTRL_PERM_1;
+ {$EXTERNALSYM ACTRL_PRINT_SADMIN}
+ ACTRL_PRINT_SLIST = ACTRL_PERM_2;
+ {$EXTERNALSYM ACTRL_PRINT_SLIST}
+ ACTRL_PRINT_PADMIN = ACTRL_PERM_3;
+ {$EXTERNALSYM ACTRL_PRINT_PADMIN}
+ ACTRL_PRINT_PUSE = ACTRL_PERM_4;
+ {$EXTERNALSYM ACTRL_PRINT_PUSE}
+ ACTRL_PRINT_JADMIN = ACTRL_PERM_5;
+ {$EXTERNALSYM ACTRL_PRINT_JADMIN}
+ ACTRL_SVC_GET_INFO = ACTRL_PERM_1;
+ {$EXTERNALSYM ACTRL_SVC_GET_INFO}
+ ACTRL_SVC_SET_INFO = ACTRL_PERM_2;
+ {$EXTERNALSYM ACTRL_SVC_SET_INFO}
+ ACTRL_SVC_STATUS = ACTRL_PERM_3;
+ {$EXTERNALSYM ACTRL_SVC_STATUS}
+ ACTRL_SVC_LIST = ACTRL_PERM_4;
+ {$EXTERNALSYM ACTRL_SVC_LIST}
+ ACTRL_SVC_START = ACTRL_PERM_5;
+ {$EXTERNALSYM ACTRL_SVC_START}
+ ACTRL_SVC_STOP = ACTRL_PERM_6;
+ {$EXTERNALSYM ACTRL_SVC_STOP}
+ ACTRL_SVC_PAUSE = ACTRL_PERM_7;
+ {$EXTERNALSYM ACTRL_SVC_PAUSE}
+ ACTRL_SVC_INTERROGATE = ACTRL_PERM_8;
+ {$EXTERNALSYM ACTRL_SVC_INTERROGATE}
+ ACTRL_SVC_UCONTROL = ACTRL_PERM_9;
+ {$EXTERNALSYM ACTRL_SVC_UCONTROL}
+ ACTRL_REG_QUERY = ACTRL_PERM_1;
+ {$EXTERNALSYM ACTRL_REG_QUERY}
+ ACTRL_REG_SET = ACTRL_PERM_2;
+ {$EXTERNALSYM ACTRL_REG_SET}
+ ACTRL_REG_CREATE_CHILD = ACTRL_PERM_3;
+ {$EXTERNALSYM ACTRL_REG_CREATE_CHILD}
+ ACTRL_REG_LIST = ACTRL_PERM_4;
+ {$EXTERNALSYM ACTRL_REG_LIST}
+ ACTRL_REG_NOTIFY = ACTRL_PERM_5;
+ {$EXTERNALSYM ACTRL_REG_NOTIFY}
+ ACTRL_REG_LINK = ACTRL_PERM_6;
+ {$EXTERNALSYM ACTRL_REG_LINK}
+ ACTRL_WIN_CLIPBRD = ACTRL_PERM_1;
+ {$EXTERNALSYM ACTRL_WIN_CLIPBRD}
+ ACTRL_WIN_GLOBAL_ATOMS = ACTRL_PERM_2;
+ {$EXTERNALSYM ACTRL_WIN_GLOBAL_ATOMS}
+ ACTRL_WIN_CREATE = ACTRL_PERM_3;
+ {$EXTERNALSYM ACTRL_WIN_CREATE}
+ ACTRL_WIN_LIST_DESK = ACTRL_PERM_4;
+ {$EXTERNALSYM ACTRL_WIN_LIST_DESK}
+ ACTRL_WIN_LIST = ACTRL_PERM_5;
+ {$EXTERNALSYM ACTRL_WIN_LIST}
+ ACTRL_WIN_READ_ATTRIBS = ACTRL_PERM_6;
+ {$EXTERNALSYM ACTRL_WIN_READ_ATTRIBS}
+ ACTRL_WIN_WRITE_ATTRIBS = ACTRL_PERM_7;
+ {$EXTERNALSYM ACTRL_WIN_WRITE_ATTRIBS}
+ ACTRL_WIN_SCREEN = ACTRL_PERM_8;
+ {$EXTERNALSYM ACTRL_WIN_SCREEN}
+ ACTRL_WIN_EXIT = ACTRL_PERM_9;
+ {$EXTERNALSYM ACTRL_WIN_EXIT}
+
+type
+ PACTRL_OVERLAPPED = ^ACTRL_OVERLAPPED;
+ {$EXTERNALSYM PACTRL_OVERLAPPED}
+ _ACTRL_OVERLAPPED = packed record
+ //union {
+ Provider: PVOID;
+ // ULONG Reserved1;
+ //};
+ Reserved2: ULONG;
+ hEvent: HANDLE;
+ end;
+ {$EXTERNALSYM _ACTRL_OVERLAPPED}
+ ACTRL_OVERLAPPED = _ACTRL_OVERLAPPED;
+ {$EXTERNALSYM ACTRL_OVERLAPPED}
+ TActrlOverlapped = ACTRL_OVERLAPPED;
+ PActrlOverlapped = PACTRL_OVERLAPPED;
+
+ PACTRL_ACCESS_INFOA = ^ACTRL_ACCESS_INFOA;
+ {$EXTERNALSYM PACTRL_ACCESS_INFOA}
+ _ACTRL_ACCESS_INFOA = packed record
+ fAccessPermission: ULONG;
+ lpAccessPermissionName: LPSTR;
+ end;
+ {$EXTERNALSYM _ACTRL_ACCESS_INFOA}
+ ACTRL_ACCESS_INFOA = _ACTRL_ACCESS_INFOA;
+ {$EXTERNALSYM ACTRL_ACCESS_INFOA}
+ TActrlAccessInfoA = ACTRL_ACCESS_INFOA;
+ PActrlAccessInfoA = PACTRL_ACCESS_INFOA;
+
+ PACTRL_ACCESS_INFOW = ^ACTRL_ACCESS_INFOW;
+ {$EXTERNALSYM PACTRL_ACCESS_INFOW}
+ _ACTRL_ACCESS_INFOW = packed record
+ fAccessPermission: ULONG;
+ lpAccessPermissionName: LPWSTR;
+ end;
+ {$EXTERNALSYM _ACTRL_ACCESS_INFOW}
+ ACTRL_ACCESS_INFOW = _ACTRL_ACCESS_INFOW;
+ {$EXTERNALSYM ACTRL_ACCESS_INFOW}
+ TActrlAccessInfoW = ACTRL_ACCESS_INFOW;
+ PActrlAccessInfoW = PACTRL_ACCESS_INFOW;
+
+ {$IFDEF UNICODE}
+ ACTRL_ACCESS_INFO = ACTRL_ACCESS_INFOW;
+ {$EXTERNALSYM ACTRL_ACCESS_INFO}
+ PACTRL_ACCESS_INFO = PACTRL_ACCESS_INFOW;
+ {$EXTERNALSYM PACTRL_ACCESS_INFO}
+ TActrlAccessInfo = TActrlAccessInfoW;
+ PActrlAccessInfo = PActrlAccessInfoW;
+ {$ELSE}
+ ACTRL_ACCESS_INFO = ACTRL_ACCESS_INFOA;
+ {$EXTERNALSYM ACTRL_ACCESS_INFO}
+ PACTRL_ACCESS_INFO = PACTRL_ACCESS_INFOA;
+ {$EXTERNALSYM PACTRL_ACCESS_INFO}
+ TActrlAccessInfo = TActrlAccessInfoA;
+ PActrlAccessInfo = PActrlAccessInfoA;
+ {$ENDIF UNICODE}
+
+ PACTRL_CONTROL_INFOA = ^ACTRL_CONTROL_INFOA;
+ {$EXTERNALSYM PACTRL_CONTROL_INFOA}
+ _ACTRL_CONTROL_INFOA = packed record
+ lpControlId: LPSTR;
+ lpControlName: LPSTR;
+ end;
+ {$EXTERNALSYM _ACTRL_CONTROL_INFOA}
+ ACTRL_CONTROL_INFOA = _ACTRL_CONTROL_INFOA;
+ {$EXTERNALSYM ACTRL_CONTROL_INFOA}
+ TActrlControlInfoA = ACTRL_CONTROL_INFOA;
+ PActrlControlInfoA = PACTRL_CONTROL_INFOA;
+
+ PACTRL_CONTROL_INFOW = ^ACTRL_CONTROL_INFOW;
+ {$EXTERNALSYM PACTRL_CONTROL_INFOW}
+ _ACTRL_CONTROL_INFOW = packed record
+ lpControlId: LPWSTR;
+ lpControlName: LPWSTR;
+ end;
+ {$EXTERNALSYM _ACTRL_CONTROL_INFOW}
+ ACTRL_CONTROL_INFOW = _ACTRL_CONTROL_INFOW;
+ {$EXTERNALSYM ACTRL_CONTROL_INFOW}
+ TActrlControlInfoW = ACTRL_CONTROL_INFOW;
+ PActrlControlInfoW = PACTRL_CONTROL_INFOW;
+
+ {$IFDEF UNICODE}
+ ACTRL_CONTROL_INFO = ACTRL_CONTROL_INFOW;
+ {$EXTERNALSYM ACTRL_CONTROL_INFO}
+ PACTRL_CONTROL_INFO = PACTRL_CONTROL_INFOW;
+ {$EXTERNALSYM PACTRL_CONTROL_INFO}
+ TActrlControlInfo = TActrlControlInfoW;
+ PActrlControlInfo = PActrlControlInfoW;
+ {$ELSE}
+ ACTRL_CONTROL_INFO = ACTRL_CONTROL_INFOA;
+ {$EXTERNALSYM ACTRL_CONTROL_INFO}
+ PACTRL_CONTROL_INFO = PACTRL_CONTROL_INFOA;
+ {$EXTERNALSYM PACTRL_CONTROL_INFO}
+ TActrlControlInfo = TActrlControlInfoA;
+ PActrlControlInfo = PActrlControlInfoA;
+ {$ENDIF UNICODE}
+
+const
+ ACTRL_ACCESS_NO_OPTIONS = $00000000;
+ {$EXTERNALSYM ACTRL_ACCESS_NO_OPTIONS}
+ ACTRL_ACCESS_SUPPORTS_OBJECT_ENTRIES = $00000001;
+ {$EXTERNALSYM ACTRL_ACCESS_SUPPORTS_OBJECT_ENTRIES}
+
+ ProgressInvokeNever = 1; // Never invoke the progress function
+ {$EXTERNALSYM ProgressInvokeNever}
+ ProgressInvokeEveryObject = 2; // Invoke for each object
+ {$EXTERNALSYM ProgressInvokeEveryObject}
+ ProgressInvokeOnError = 3; // Invoke only for each error case
+ {$EXTERNALSYM ProgressInvokeOnError}
+ ProgressCancelOperation = 4; // Stop propagation and return
+ {$EXTERNALSYM ProgressCancelOperation}
+ ProgressRetryOperation = 5; // Retry operation on subtree
+ {$EXTERNALSYM ProgressRetryOperation}
+
+type
+ PROG_INVOKE_SETTING = DWORD;
+ {$EXTERNALSYM PROG_INVOKE_SETTING}
+ PPROG_INVOKE_SETTING = ^PROG_INVOKE_SETTING;
+ {$EXTERNALSYM PPROG_INVOKE_SETTING}
+ TProgInvokeSetting = PROG_INVOKE_SETTING;
+ PProgInvokeSetting = PPROG_INVOKE_SETTING;
+
+//
+// Progress Function:
+// Caller of tree operation implements this Progress function, then
+// passes its function pointer to tree operation.
+// Tree operation invokes Progress function to provide progress and error
+// information to the caller during the potentially long execution
+// of the tree operation. Tree operation provides the name of the object
+// last processed and the error status of the operation on that object.
+// Tree operation also passes the current InvokeSetting value.
+// Caller may change the InvokeSetting value, for example, from "Always"
+// to "Only On Error."
+//
+
+type
+ FN_PROGRESS = procedure(pObjectName: LPWSTR; Status: DWORD;
+ var pInvokeSetting: PROG_INVOKE_SETTING; Args: PVOID; SecuritySet: BOOL); stdcall;
+ {$EXTERNALSYM FN_PROGRESS}
+ TFnProgress = FN_PROGRESS;
+
+//
+// New Object Type function pointers. TBD.
+// To support additional object resource managers generically, the
+// resource manager must provide it's own functions for operations
+// like:
+// GetAncestorAcl(IN ObjName, IN GenerationGap, IN DaclOrSacl?, ...)
+// GetAncestorName(...)
+// FreeNameStructure(...)
+//
+
+type
+ _FN_OBJECT_MGR_FUNCTIONS = record
+ Placeholder: ULONG;
+ end;
+ {$EXTERNALSYM _FN_OBJECT_MGR_FUNCTIONS}
+ FN_OBJECT_MGR_FUNCTS = _FN_OBJECT_MGR_FUNCTIONS;
+ {$EXTERNALSYM FN_OBJECT_MGR_FUNCTS}
+ PFN_OBJECT_MGR_FUNCTS = ^FN_OBJECT_MGR_FUNCTS;
+ {$EXTERNALSYM PFN_OBJECT_MGR_FUNCTS}
+ TFnObjectMgrFuncts = FN_OBJECT_MGR_FUNCTS;
+ PFnObjectMgrFuncts = PFN_OBJECT_MGR_FUNCTS;
+
+//
+// Name of ancestor and number of generations between
+// ancestor and inheriting object.
+//
+// GenerationGap:
+// Name of ancestor from which ACE was inherited.
+// NULL for explicit ACE.
+//
+// AncestorName:
+// Number of levels (or generations) between the object and the ancestor.
+// Parent, gap=1.
+// Grandparent, gap=2.
+// Set to 0 for explicit ACE on object.
+//
+
+type
+ _INHERITED_FROMA = record
+ GenerationGap: LONG;
+ AncestorName: LPSTR;
+ end;
+ {$EXTERNALSYM _INHERITED_FROMA}
+ INHERITED_FROMA = _INHERITED_FROMA;
+ {$EXTERNALSYM INHERITED_FROMA}
+ PINHERITED_FROMA = ^INHERITED_FROMA;
+ {$EXTERNALSYM PINHERITED_FROMA}
+ TInheritedFromA = INHERITED_FROMA;
+ PInheritedFromA = PINHERITED_FROMA;
+
+ _INHERITED_FROMW = record
+ GenerationGap: LONG;
+ AncestorName: LPWSTR;
+ end;
+ {$EXTERNALSYM _INHERITED_FROMW}
+ INHERITED_FROMW = _INHERITED_FROMW;
+ {$EXTERNALSYM INHERITED_FROMW}
+ PINHERITED_FROMW = ^INHERITED_FROMW;
+ {$EXTERNALSYM PINHERITED_FROMW}
+ TInheritedFromW = INHERITED_FROMW;
+ PInheritedFromW = PINHERITED_FROMW;
+
+ {$IFDEF UNICODE}
+ INHERITED_FROM = INHERITED_FROMW;
+ {$EXTERNALSYM INHERITED_FROM}
+ PINHERITED_FROM = PINHERITED_FROMW;
+ {$EXTERNALSYM PINHERITED_FROM}
+ TInheritedFrom = TInheritedFromW;
+ PInheritedFrom = PInheritedFromW;
+ {$ELSE}
+ INHERITED_FROM = INHERITED_FROMA;
+ {$EXTERNALSYM INHERITED_FROM}
+ PINHERITED_FROM = PINHERITED_FROMA;
+ {$EXTERNALSYM PINHERITED_FROM}
+ TInheritedFrom = TInheritedFromA;
+ PInheritedFrom = PInheritedFromA;
+ {$ENDIF UNICODE}
+
+implementation
+
+uses
+ JwaWinBase;
+
+// (rom) MACRO implementation
+function AccFree(hMem: HLOCAL): HLOCAL;
+begin
+ Result := LocalFree(hMem);
+end;
+
+end.
+
diff --git a/packages/extra/winunits/jwaaclapi.pas b/packages/extra/winunits/jwaaclapi.pas
index ef60112794..2019247fae 100644
--- a/packages/extra/winunits/jwaaclapi.pas
+++ b/packages/extra/winunits/jwaaclapi.pas
@@ -1,1338 +1,1338 @@
-{******************************************************************************}
-{ }
-{ Access Control API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: aclapi.h, released June 2000. The original Pascal }
-{ code is: AclApi.pas, released December 2000. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwaaclapi.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaAclApi;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "aclapi.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaAccCtrl, JwaWinNT, JwaWinType;
-
-//
-// Progress Function:
-// Caller of tree operation implements this Progress function, then
-// passes its function pointer to tree operation.
-// Tree operation invokes Progress function to provide progress and error
-// information to the caller during the potentially long execution
-// of the tree operation. Tree operation provides the name of the object
-// last processed and the error status of the operation on that object.
-// Tree operation also passes the current InvokeSetting value.
-// Caller may change the InvokeSetting value, for example, from "Always"
-// to "Only On Error."
-//
-
-type
- FN_PROGRESS = procedure(
- pObjectName: LPWSTR; // name of object just processed
- Status: DWORD; // status of operation on object
- var pInvokeSetting: PPROG_INVOKE_SETTING; // Never, always,
- Args: PVOID; // Caller specific data
- SecuritySet: BOOL // Whether security was set
- ); stdcall;
- {$EXTERNALSYM FN_PROGRESS}
- TFnProgress = FN_PROGRESS;
-
-function SetEntriesInAclA(cCountOfExplicitEntries: ULONG;
- pListOfExplicitEntries: PEXPLICIT_ACCESS_A; OldAcl: PACL;
- var NewAcl: PACL): DWORD; stdcall;
-{$EXTERNALSYM SetEntriesInAclA}
-function SetEntriesInAclW(cCountOfExplicitEntries: ULONG;
- pListOfExplicitEntries: PEXPLICIT_ACCESS_W; OldAcl: PACL;
- var NewAcl: PACL): DWORD; stdcall;
-{$EXTERNALSYM SetEntriesInAclW}
-function SetEntriesInAcl(cCountOfExplicitEntries: ULONG;
- pListOfExplicitEntries: PEXPLICIT_ACCESS; OldAcl: PACL;
- var NewAcl: PACL): DWORD; stdcall;
-{$EXTERNALSYM SetEntriesInAcl}
-
-function GetExplicitEntriesFromAclA(pacl: PACL; var pcCountOfExplicitEntries: ULONG;
- var pListOfExplicitEntries: PEXPLICIT_ACCESS_A): DWORD; stdcall;
-{$EXTERNALSYM GetExplicitEntriesFromAclA}
-function GetExplicitEntriesFromAclW(pacl: PACL; var pcCountOfExplicitEntries: ULONG;
- var pListOfExplicitEntries: PEXPLICIT_ACCESS_W): DWORD; stdcall;
-{$EXTERNALSYM GetExplicitEntriesFromAclW}
-function GetExplicitEntriesFromAcl(pacl: PACL; var pcCountOfExplicitEntries: ULONG;
- var pListOfExplicitEntries: PEXPLICIT_ACCESS): DWORD; stdcall;
-{$EXTERNALSYM GetExplicitEntriesFromAcl}
-
-function GetEffectiveRightsFromAclA(pacl: PACL; pTrustee: PTRUSTEE_A;
- var pAccessRights: ACCESS_MASK): DWORD; stdcall;
-{$EXTERNALSYM GetEffectiveRightsFromAclA}
-function GetEffectiveRightsFromAclW(pacl: PACL; pTrustee: PTRUSTEE_W;
- var pAccessRights: ACCESS_MASK): DWORD; stdcall;
-{$EXTERNALSYM GetEffectiveRightsFromAclW}
-function GetEffectiveRightsFromAcl(pacl: PACL; pTrustee: PTRUSTEE;
- var pAccessRights: ACCESS_MASK): DWORD; stdcall;
-{$EXTERNALSYM GetEffectiveRightsFromAcl}
-
-function GetAuditedPermissionsFromAclA(pacl: PACL; pTrustee: PTRUSTEE_A;
- var pSuccessfulAuditedRights, pFailedAuditRights: ACCESS_MASK): DWORD; stdcall;
-{$EXTERNALSYM GetAuditedPermissionsFromAclA}
-function GetAuditedPermissionsFromAclW(pacl: PACL; pTrustee: PTRUSTEE_W;
- var pSuccessfulAuditedRights, pFailedAuditRights: ACCESS_MASK): DWORD; stdcall;
-{$EXTERNALSYM GetAuditedPermissionsFromAclW}
-function GetAuditedPermissionsFromAcl(pacl: PACL; pTrustee: PTRUSTEE;
- var pSuccessfulAuditedRights, pFailedAuditRights: ACCESS_MASK): DWORD; stdcall;
-{$EXTERNALSYM GetAuditedPermissionsFromAcl}
-
-function GetNamedSecurityInfoA(pObjectName: LPSTR; ObjectType: SE_OBJECT_TYPE;
- SecurityInfo: SECURITY_INFORMATION; ppsidOwner, ppsidGroup: PPSID; ppDacl,
- ppSacl: PPACL; var ppSecurityDescriptor: PSECURITY_DESCRIPTOR): DWORD; stdcall;
-{$EXTERNALSYM GetNamedSecurityInfoA}
-function GetNamedSecurityInfoW(pObjectName: LPWSTR; ObjectType: SE_OBJECT_TYPE;
- SecurityInfo: SECURITY_INFORMATION; ppsidOwner, ppsidGroup: PPSID; ppDacl,
- ppSacl: PPACL; var ppSecurityDescriptor: PSECURITY_DESCRIPTOR): DWORD; stdcall;
-{$EXTERNALSYM GetNamedSecurityInfoW}
-function GetNamedSecurityInfo(pObjectName: LPTSTR; ObjectType: SE_OBJECT_TYPE;
- SecurityInfo: SECURITY_INFORMATION; ppsidOwner, ppsidGroup: PPSID; ppDacl,
- ppSacl: PPACL; var ppSecurityDescriptor: PSECURITY_DESCRIPTOR): DWORD; stdcall;
-{$EXTERNALSYM GetNamedSecurityInfo}
-
-function GetSecurityInfo(handle: HANDLE; ObjectType: SE_OBJECT_TYPE;
- SecurityInfo: SECURITY_INFORMATION; ppsidOwner: PPSID; ppsidGroup: PPSID;
- ppDacl, ppSacl: PPACL; var ppSecurityDescriptor: PSECURITY_DESCRIPTOR): DWORD; stdcall;
-{$EXTERNALSYM GetSecurityInfo}
-
-function SetNamedSecurityInfoA(pObjectName: LPSTR; ObjectType: SE_OBJECT_TYPE;
- SecurityInfo: SECURITY_INFORMATION; psidOwner, psidGroup: PSID;
- pDacl, pSacl: PACL): DWORD; stdcall;
-{$EXTERNALSYM SetNamedSecurityInfoA}
-function SetNamedSecurityInfoW(pObjectName: LPWSTR; ObjectType: SE_OBJECT_TYPE;
- SecurityInfo: SECURITY_INFORMATION; psidOwner, psidGroup: PSID;
- pDacl, pSacl: PACL): DWORD; stdcall;
-{$EXTERNALSYM SetNamedSecurityInfoW}
-function SetNamedSecurityInfo(pObjectName: LPTSTR; ObjectType: SE_OBJECT_TYPE;
- SecurityInfo: SECURITY_INFORMATION; psidOwner, psidGroup: PSID;
- pDacl, pSacl: PACL): DWORD; stdcall;
-{$EXTERNALSYM SetNamedSecurityInfo}
-
-function SetSecurityInfo(handle: HANDLE; ObjectType: SE_OBJECT_TYPE;
- SecurityInfo: SECURITY_INFORMATION; psidOwner, psidGroup: PSID;
- pDacl, pSacl: PACL): DWORD; stdcall;
-{$EXTERNALSYM SetSecurityInfo}
-
-function GetInheritanceSourceA(pObjectName: LPSTR; ObjectType: SE_OBJECT_TYPE;
- SecurityInfo: SECURITY_INFORMATION; Container: BOOL; pObjectClassGuids: LPGUID;
- GuidCount: DWORD; pAcl: PACL; pfnArray: PFN_OBJECT_MGR_FUNCTS;
- pGenericMapping: PGENERIC_MAPPING; pInheritArray: PINHERITED_FROMA): DWORD; stdcall;
-{$EXTERNALSYM GetInheritanceSourceA}
-function GetInheritanceSourceW(pObjectName: LPWSTR; ObjectType: SE_OBJECT_TYPE;
- SecurityInfo: SECURITY_INFORMATION; Container: BOOL; pObjectClassGuids: LPGUID;
- GuidCount: DWORD; pAcl: PACL; pfnArray: PFN_OBJECT_MGR_FUNCTS;
- pGenericMapping: PGENERIC_MAPPING; pInheritArray: PINHERITED_FROMW): DWORD; stdcall;
-{$EXTERNALSYM GetInheritanceSourceW}
-function GetInheritanceSource(pObjectName: LPTSTR; ObjectType: SE_OBJECT_TYPE;
- SecurityInfo: SECURITY_INFORMATION; Container: BOOL; pObjectClassGuids: LPGUID;
- GuidCount: DWORD; pAcl: PACL; pfnArray: PFN_OBJECT_MGR_FUNCTS;
- pGenericMapping: PGENERIC_MAPPING; pInheritArray: PINHERITED_FROM): DWORD; stdcall;
-{$EXTERNALSYM GetInheritanceSource}
-
-function FreeInheritedFromArray(pInheritArray: PINHERITED_FROMW; AceCnt: USHORT;
- pfnArray: PFN_OBJECT_MGR_FUNCTS): DWORD; stdcall;
-{$EXTERNALSYM FreeInheritedFromArray}
-
-function TreeResetNamedSecurityInfoA(pObjectName: LPSTR; ObjectType: SE_OBJECT_TYPE;
- SecurityInfo: SECURITY_INFORMATION; pOwner, pGroup: PSID; pDacl, pSacl: PACL;
- KeepExplicit: BOOL; fnProgress: FN_PROGRESS; ProgressInvokeSetting: PROG_INVOKE_SETTING;
- Args: PVOID): DWORD; stdcall;
-{$EXTERNALSYM TreeResetNamedSecurityInfoA}
-function TreeResetNamedSecurityInfoW(pObjectName: LPWSTR; ObjectType: SE_OBJECT_TYPE;
- SecurityInfo: SECURITY_INFORMATION; pOwner, pGroup: PSID; pDacl, pSacl: PACL;
- KeepExplicit: BOOL; fnProgress: FN_PROGRESS; ProgressInvokeSetting: PROG_INVOKE_SETTING;
- Args: PVOID): DWORD; stdcall;
-{$EXTERNALSYM TreeResetNamedSecurityInfoW}
-function TreeResetNamedSecurityInfo(pObjectName: LPTSTR; ObjectType: SE_OBJECT_TYPE;
- SecurityInfo: SECURITY_INFORMATION; pOwner, pGroup: PSID; pDacl, pSacl: PACL;
- KeepExplicit: BOOL; fnProgress: FN_PROGRESS; ProgressInvokeSetting: PROG_INVOKE_SETTING;
- Args: PVOID): DWORD; stdcall;
-{$EXTERNALSYM TreeResetNamedSecurityInfo}
-
-//----------------------------------------------------------------------------
-// The following API are provided for trusted servers to use to
-// implement access control on their own objects.
-//----------------------------------------------------------------------------
-
-function BuildSecurityDescriptorA(pOwner: PTRUSTEE_A; pGroup: PTRUSTEE_A;
- cCountOfAccessEntries: ULONG; pListOfAccessEntries: PEXPLICIT_ACCESS_A;
- cCountOfAuditEntries: ULONG; pListOfAuditEntries: PEXPLICIT_ACCESS_A;
- pOldSD: PSECURITY_DESCRIPTOR; var pSizeNewSD: ULONG;
- var pNewSD: PSECURITY_DESCRIPTOR): DWORD; stdcall;
-{$EXTERNALSYM BuildSecurityDescriptorA}
-function BuildSecurityDescriptorW(pOwner: PTRUSTEE_W; pGroup: PTRUSTEE_W;
- cCountOfAccessEntries: ULONG; pListOfAccessEntries: PEXPLICIT_ACCESS_W;
- cCountOfAuditEntries: ULONG; pListOfAuditEntries: PEXPLICIT_ACCESS_W;
- pOldSD: PSECURITY_DESCRIPTOR; var pSizeNewSD: ULONG;
- var pNewSD: PSECURITY_DESCRIPTOR): DWORD; stdcall;
-{$EXTERNALSYM BuildSecurityDescriptorW}
-function BuildSecurityDescriptor(pOwner: PTRUSTEE; pGroup: PTRUSTEE;
- cCountOfAccessEntries: ULONG; pListOfAccessEntries: PEXPLICIT_ACCESS;
- cCountOfAuditEntries: ULONG; pListOfAuditEntries: PEXPLICIT_ACCESS;
- pOldSD: PSECURITY_DESCRIPTOR; var pSizeNewSD: ULONG;
- var pNewSD: PSECURITY_DESCRIPTOR): DWORD; stdcall;
-{$EXTERNALSYM BuildSecurityDescriptor}
-
-function LookupSecurityDescriptorPartsA(pOwner, pGroup: PPTRUSTEE_A;
- cCountOfAccessEntries: PULONG; pListOfAccessEntries: PEXPLICIT_ACCESS_A;
- cCountOfAuditEntries: PULONG; pListOfAuditEntries: PEXPLICIT_ACCESS_A;
- var pSD: SECURITY_DESCRIPTOR): DWORD; stdcall;
-{$EXTERNALSYM LookupSecurityDescriptorPartsA}
-function LookupSecurityDescriptorPartsW(pOwner, pGroup: PPTRUSTEE_W;
- cCountOfAccessEntries: PULONG; pListOfAccessEntries: PEXPLICIT_ACCESS_W;
- cCountOfAuditEntries: PULONG; pListOfAuditEntries: PEXPLICIT_ACCESS_W;
- var pSD: SECURITY_DESCRIPTOR): DWORD; stdcall;
-{$EXTERNALSYM LookupSecurityDescriptorPartsW}
-function LookupSecurityDescriptorParts(pOwner, pGroup: PPTRUSTEE;
- cCountOfAccessEntries: PULONG; pListOfAccessEntries: PEXPLICIT_ACCESS;
- cCountOfAuditEntries: PULONG; pListOfAuditEntries: PEXPLICIT_ACCESS;
- var pSD: SECURITY_DESCRIPTOR): DWORD; stdcall;
-{$EXTERNALSYM LookupSecurityDescriptorParts}
-
-//----------------------------------------------------------------------------
-// The following helper API are provided for building
-// access control structures.
-//----------------------------------------------------------------------------
-
-procedure BuildExplicitAccessWithNameA(pExplicitAccess: PEXPLICIT_ACCESS_A;
- pTrusteeName: LPSTR; AccessPermissions: DWORD; AccessMode: ACCESS_MODE;
- Inheritance: DWORD); stdcall;
-{$EXTERNALSYM BuildExplicitAccessWithNameA}
-procedure BuildExplicitAccessWithNameW(pExplicitAccess: PEXPLICIT_ACCESS_W;
- pTrusteeName: LPWSTR; AccessPermissions: DWORD; AccessMode: ACCESS_MODE;
- Inheritance: DWORD); stdcall;
-{$EXTERNALSYM BuildExplicitAccessWithNameW}
-procedure BuildExplicitAccessWithName(pExplicitAccess: PEXPLICIT_ACCESS;
- pTrusteeName: LPTSTR; AccessPermissions: DWORD; AccessMode: ACCESS_MODE;
- Inheritance: DWORD); stdcall;
-{$EXTERNALSYM BuildExplicitAccessWithName}
-
-procedure BuildImpersonateExplicitAccessWithNameA(pExplicitAccess: PEXPLICIT_ACCESS_A;
- pTrusteeName: LPSTR; pTrustee: PTRUSTEE_A; AccessPermissions: DWORD;
- AccessMode: ACCESS_MODE; Inheritance: DWORD); stdcall;
-{$EXTERNALSYM BuildImpersonateExplicitAccessWithNameA}
-procedure BuildImpersonateExplicitAccessWithNameW(pExplicitAccess: PEXPLICIT_ACCESS_W;
- pTrusteeName: LPWSTR; pTrustee: PTRUSTEE_W; AccessPermissions: DWORD;
- AccessMode: ACCESS_MODE; Inheritance: DWORD); stdcall;
-{$EXTERNALSYM BuildImpersonateExplicitAccessWithNameW}
-procedure BuildImpersonateExplicitAccessWithName(pExplicitAccess: PEXPLICIT_ACCESS;
- pTrusteeName: LPTSTR; pTrustee: PTRUSTEE; AccessPermissions: DWORD;
- AccessMode: ACCESS_MODE; Inheritance: DWORD); stdcall;
-{$EXTERNALSYM BuildImpersonateExplicitAccessWithName}
-
-procedure BuildTrusteeWithNameA(pTrustee: PTRUSTEE_A; pName: LPSTR); stdcall;
-{$EXTERNALSYM BuildTrusteeWithNameA}
-procedure BuildTrusteeWithNameW(pTrustee: PTRUSTEE_W; pName: LPWSTR); stdcall;
-{$EXTERNALSYM BuildTrusteeWithNameW}
-procedure BuildTrusteeWithName(pTrustee: PTRUSTEE; pName: LPTSTR); stdcall;
-{$EXTERNALSYM BuildTrusteeWithName}
-
-procedure BuildImpersonateTrusteeA(pTrustee: PTRUSTEE_A;
- pImpersonateTrustee: PTRUSTEE_A); stdcall;
-{$EXTERNALSYM BuildImpersonateTrusteeA}
-procedure BuildImpersonateTrusteeW(pTrustee: PTRUSTEE_W;
- pImpersonateTrustee: PTRUSTEE_W); stdcall;
-{$EXTERNALSYM BuildImpersonateTrusteeW}
-procedure BuildImpersonateTrustee(pTrustee: PTRUSTEE;
- pImpersonateTrustee: PTRUSTEE); stdcall;
-{$EXTERNALSYM BuildImpersonateTrustee}
-
-procedure BuildTrusteeWithSidA(pTrustee: PTRUSTEE_A; pSid: PSID); stdcall;
-{$EXTERNALSYM BuildTrusteeWithSidA}
-procedure BuildTrusteeWithSidW(pTrustee: PTRUSTEE_W; pSid: PSID); stdcall;
-{$EXTERNALSYM BuildTrusteeWithSidW}
-procedure BuildTrusteeWithSid(pTrustee: PTRUSTEE; pSid: PSID); stdcall;
-{$EXTERNALSYM BuildTrusteeWithSid}
-
-procedure BuildTrusteeWithObjectsAndSidA(pTrustee: PTRUSTEE_A;
- pObjSid: POBJECTS_AND_SID; pObjectGuid: PGUID; pInheritedObjectGuid: PGUID;
- pSid: PSID); stdcall;
-{$EXTERNALSYM BuildTrusteeWithObjectsAndSidA}
-procedure BuildTrusteeWithObjectsAndSidW(pTrustee: PTRUSTEE_W;
- pObjSid: POBJECTS_AND_SID; pObjectGuid: PGUID; pInheritedObjectGuid: PGUID;
- pSid: PSID); stdcall;
-{$EXTERNALSYM BuildTrusteeWithObjectsAndSidW}
-procedure BuildTrusteeWithObjectsAndSid(pTrustee: PTRUSTEE;
- pObjSid: POBJECTS_AND_SID; pObjectGuid: PGUID; pInheritedObjectGuid: PGUID;
- pSid: PSID); stdcall;
-{$EXTERNALSYM BuildTrusteeWithObjectsAndSid}
-
-procedure BuildTrusteeWithObjectsAndNameA(pTrustee: PTRUSTEE_A;
- pObjName: POBJECTS_AND_NAME_A; ObjectType: SE_OBJECT_TYPE;
- ObjectTypeName, InheritedObjectTypeName, Name: LPSTR); stdcall;
-{$EXTERNALSYM BuildTrusteeWithObjectsAndNameA}
-procedure BuildTrusteeWithObjectsAndNameW(pTrustee: PTRUSTEE_W;
- pObjName: POBJECTS_AND_NAME_W; ObjectType: SE_OBJECT_TYPE;
- ObjectTypeName, InheritedObjectTypeName, Name: LPWSTR); stdcall;
-{$EXTERNALSYM BuildTrusteeWithObjectsAndNameW}
-procedure BuildTrusteeWithObjectsAndName(pTrustee: PTRUSTEE;
- pObjName: POBJECTS_AND_NAME; ObjectType: SE_OBJECT_TYPE;
- ObjectTypeName, InheritedObjectTypeName, Name: LPTSTR); stdcall;
-{$EXTERNALSYM BuildTrusteeWithObjectsAndName}
-
-function GetTrusteeNameA(pTrustee: PTRUSTEE_A): LPSTR; stdcall;
-{$EXTERNALSYM GetTrusteeNameA}
-function GetTrusteeNameW(pTrustee: PTRUSTEE_W): LPWSTR; stdcall;
-{$EXTERNALSYM GetTrusteeNameW}
-function GetTrusteeName(pTrustee: PTRUSTEE): LPTSTR; stdcall;
-{$EXTERNALSYM GetTrusteeName}
-
-function GetTrusteeTypeA(pTrustee: PTRUSTEE_A): TRUSTEE_TYPE; stdcall;
-{$EXTERNALSYM GetTrusteeTypeA}
-function GetTrusteeTypeW(pTrustee: PTRUSTEE_W): TRUSTEE_TYPE; stdcall;
-{$EXTERNALSYM GetTrusteeTypeW}
-function GetTrusteeType(pTrustee: PTRUSTEE): TRUSTEE_TYPE; stdcall;
-{$EXTERNALSYM GetTrusteeType}
-
-function GetTrusteeFormA(pTrustee: PTRUSTEE_A): TRUSTEE_FORM; stdcall;
-{$EXTERNALSYM GetTrusteeFormA}
-function GetTrusteeFormW(pTrustee: PTRUSTEE_W): TRUSTEE_FORM; stdcall;
-{$EXTERNALSYM GetTrusteeFormW}
-function GetTrusteeForm(pTrustee: PTRUSTEE): TRUSTEE_FORM; stdcall;
-{$EXTERNALSYM GetTrusteeForm}
-
-function GetMultipleTrusteeOperationA(pTrustee: PTRUSTEE_A): MULTIPLE_TRUSTEE_OPERATION; stdcall;
-{$EXTERNALSYM GetMultipleTrusteeOperationA}
-function GetMultipleTrusteeOperationW(pTrustee: PTRUSTEE_W): MULTIPLE_TRUSTEE_OPERATION; stdcall;
-{$EXTERNALSYM GetMultipleTrusteeOperationW}
-function GetMultipleTrusteeOperation(pTrustee: PTRUSTEE): MULTIPLE_TRUSTEE_OPERATION; stdcall;
-{$EXTERNALSYM GetMultipleTrusteeOperation}
-
-function GetMultipleTrusteeA(pTrustee: PTRUSTEE_A): PTRUSTEE_A; stdcall;
-{$EXTERNALSYM GetMultipleTrusteeA}
-function GetMultipleTrusteeW(pTrustee: PTRUSTEE_W): PTRUSTEE_W; stdcall;
-{$EXTERNALSYM GetMultipleTrusteeW}
-function GetMultipleTrustee(pTrustee: PTRUSTEE): PTRUSTEE; stdcall;
-{$EXTERNALSYM GetMultipleTrustee}
-
-implementation
-
-const
- aclapilib = 'advapi32.dll';
- {$IFDEF UNICODE}
- AWSuffix = 'W';
- {$ELSE}
- AWSuffix = 'A';
- {$ENDIF UNICODE}
-
-{$IFDEF DYNAMIC_LINK}
-
-var
- _SetEntriesInAclA: Pointer;
-
-function SetEntriesInAclA;
-begin
- GetProcedureAddress(_SetEntriesInAclA, aclapilib, 'SetEntriesInAclA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetEntriesInAclA]
- end;
-end;
-
-var
- _SetEntriesInAclW: Pointer;
-
-function SetEntriesInAclW;
-begin
- GetProcedureAddress(_SetEntriesInAclW, aclapilib, 'SetEntriesInAclW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetEntriesInAclW]
- end;
-end;
-
-var
- _SetEntriesInAcl: Pointer;
-
-function SetEntriesInAcl;
-begin
- GetProcedureAddress(_SetEntriesInAcl, aclapilib, 'SetEntriesInAcl' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetEntriesInAcl]
- end;
-end;
-
-var
- _GetExplicitEntriesFromAclA: Pointer;
-
-function GetExplicitEntriesFromAclA;
-begin
- GetProcedureAddress(_GetExplicitEntriesFromAclA, aclapilib, 'GetExplicitEntriesFromAclA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetExplicitEntriesFromAclA]
- end;
-end;
-
-var
- _GetExplicitEntriesFromAclW: Pointer;
-
-function GetExplicitEntriesFromAclW;
-begin
- GetProcedureAddress(_GetExplicitEntriesFromAclW, aclapilib, 'GetExplicitEntriesFromAclW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetExplicitEntriesFromAclW]
- end;
-end;
-
-var
- _GetExplicitEntriesFromAcl: Pointer;
-
-function GetExplicitEntriesFromAcl;
-begin
- GetProcedureAddress(_GetExplicitEntriesFromAcl, aclapilib, 'GetExplicitEntriesFromAcl' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetExplicitEntriesFromAcl]
- end;
-end;
-
-var
- _GetEffectiveRightsFromAclA: Pointer;
-
-function GetEffectiveRightsFromAclA;
-begin
- GetProcedureAddress(_GetEffectiveRightsFromAclA, aclapilib, 'GetEffectiveRightsFromAclA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetEffectiveRightsFromAclA]
- end;
-end;
-
-var
- _GetEffectiveRightsFromAclW: Pointer;
-
-function GetEffectiveRightsFromAclW;
-begin
- GetProcedureAddress(_GetEffectiveRightsFromAclW, aclapilib, 'GetEffectiveRightsFromAclW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetEffectiveRightsFromAclW]
- end;
-end;
-
-var
- _GetEffectiveRightsFromAcl: Pointer;
-
-function GetEffectiveRightsFromAcl;
-begin
- GetProcedureAddress(_GetEffectiveRightsFromAcl, aclapilib, 'GetEffectiveRightsFromAcl' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetEffectiveRightsFromAcl]
- end;
-end;
-
-var
- _GetAuditedPermissionsFromAclA: Pointer;
-
-function GetAuditedPermissionsFromAclA;
-begin
- GetProcedureAddress(_GetAuditedPermissionsFromAclA, aclapilib, 'GetAuditedPermissionsFromAclA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetAuditedPermissionsFromAclA]
- end;
-end;
-
-var
- _GetAuditedPermissionsFromAclW: Pointer;
-
-function GetAuditedPermissionsFromAclW;
-begin
- GetProcedureAddress(_GetAuditedPermissionsFromAclW, aclapilib, 'GetAuditedPermissionsFromAclW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetAuditedPermissionsFromAclW]
- end;
-end;
-
-var
- _GetAuditedPermissionsFromAcl: Pointer;
-
-function GetAuditedPermissionsFromAcl;
-begin
- GetProcedureAddress(_GetAuditedPermissionsFromAcl, aclapilib, 'GetAuditedPermissionsFromAcl' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetAuditedPermissionsFromAcl]
- end;
-end;
-
-var
- _GetNamedSecurityInfoA: Pointer;
-
-function GetNamedSecurityInfoA;
-begin
- GetProcedureAddress(_GetNamedSecurityInfoA, aclapilib, 'GetNamedSecurityInfoA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetNamedSecurityInfoA]
- end;
-end;
-
-var
- _GetNamedSecurityInfoW: Pointer;
-
-function GetNamedSecurityInfoW;
-begin
- GetProcedureAddress(_GetNamedSecurityInfoW, aclapilib, 'GetNamedSecurityInfoW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetNamedSecurityInfoW]
- end;
-end;
-
-var
- _GetNamedSecurityInfo: Pointer;
-
-function GetNamedSecurityInfo;
-begin
- GetProcedureAddress(_GetNamedSecurityInfo, aclapilib, 'GetNamedSecurityInfo' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetNamedSecurityInfo]
- end;
-end;
-
-var
- _GetSecurityInfo: Pointer;
-
-function GetSecurityInfo;
-begin
- GetProcedureAddress(_GetSecurityInfo, aclapilib, 'GetSecurityInfo');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetSecurityInfo]
- end;
-end;
-
-var
- _SetNamedSecurityInfoA: Pointer;
-
-function SetNamedSecurityInfoA;
-begin
- GetProcedureAddress(_SetNamedSecurityInfoA, aclapilib, 'SetNamedSecurityInfoA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetNamedSecurityInfoA]
- end;
-end;
-
-var
- _SetNamedSecurityInfoW: Pointer;
-
-function SetNamedSecurityInfoW;
-begin
- GetProcedureAddress(_SetNamedSecurityInfoW, aclapilib, 'SetNamedSecurityInfoW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetNamedSecurityInfoW]
- end;
-end;
-
-var
- _SetNamedSecurityInfo: Pointer;
-
-function SetNamedSecurityInfo;
-begin
- GetProcedureAddress(_SetNamedSecurityInfo, aclapilib, 'SetNamedSecurityInfo' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetNamedSecurityInfo]
- end;
-end;
-
-var
- _SetSecurityInfo: Pointer;
-
-function SetSecurityInfo;
-begin
- GetProcedureAddress(_SetSecurityInfo, aclapilib, 'SetSecurityInfo');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetSecurityInfo]
- end;
-end;
-
-var
- _GetInheritanceSourceA: Pointer;
-
-function GetInheritanceSourceA;
-begin
- GetProcedureAddress(_GetInheritanceSourceA, aclapilib, 'GetInheritanceSourceA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetInheritanceSourceA]
- end;
-end;
-
-var
- _GetInheritanceSourceW: Pointer;
-
-function GetInheritanceSourceW;
-begin
- GetProcedureAddress(_GetInheritanceSourceW, aclapilib, 'GetInheritanceSourceW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetInheritanceSourceW]
- end;
-end;
-
-var
- _GetInheritanceSource: Pointer;
-
-function GetInheritanceSource;
-begin
- GetProcedureAddress(_GetInheritanceSource, aclapilib, 'GetInheritanceSource' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetInheritanceSource]
- end;
-end;
-
-var
- _FreeInheritedFromArray: Pointer;
-
-function FreeInheritedFromArray;
-begin
- GetProcedureAddress(_FreeInheritedFromArray, aclapilib, 'FreeInheritedFromArray');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_FreeInheritedFromArray]
- end;
-end;
-
-var
- _TreeResetNamedSecurityInfoA: Pointer;
-
-function TreeResetNamedSecurityInfoA;
-begin
- GetProcedureAddress(_TreeResetNamedSecurityInfoA, aclapilib, 'TreeResetNamedSecurityInfoA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_TreeResetNamedSecurityInfoA]
- end;
-end;
-
-var
- _TreeResetNamedSecurityInfoW: Pointer;
-
-function TreeResetNamedSecurityInfoW;
-begin
- GetProcedureAddress(_TreeResetNamedSecurityInfoW, aclapilib, 'TreeResetNamedSecurityInfoW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_TreeResetNamedSecurityInfoW]
- end;
-end;
-
-var
- _TreeResetNamedSecurityInfo: Pointer;
-
-function TreeResetNamedSecurityInfo;
-begin
- GetProcedureAddress(_TreeResetNamedSecurityInfo, aclapilib, 'TreeResetNamedSecurityInfo' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_TreeResetNamedSecurityInfo]
- end;
-end;
-
-var
- _BuildSecurityDescriptorA: Pointer;
-
-function BuildSecurityDescriptorA;
-begin
- GetProcedureAddress(_BuildSecurityDescriptorA, aclapilib, 'BuildSecurityDescriptorA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_BuildSecurityDescriptorA]
- end;
-end;
-
-var
- _BuildSecurityDescriptorW: Pointer;
-
-function BuildSecurityDescriptorW;
-begin
- GetProcedureAddress(_BuildSecurityDescriptorW, aclapilib, 'BuildSecurityDescriptorW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_BuildSecurityDescriptorW]
- end;
-end;
-
-var
- _BuildSecurityDescriptor: Pointer;
-
-function BuildSecurityDescriptor;
-begin
- GetProcedureAddress(_BuildSecurityDescriptor, aclapilib, 'BuildSecurityDescriptor' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_BuildSecurityDescriptor]
- end;
-end;
-
-var
- _LookupSecurityDescriptorPartsA: Pointer;
-
-function LookupSecurityDescriptorPartsA;
-begin
- GetProcedureAddress(_LookupSecurityDescriptorPartsA, aclapilib, 'LookupSecurityDescriptorPartsA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_LookupSecurityDescriptorPartsA]
- end;
-end;
-
-var
- _LookupSecurityDescriptorPartsW: Pointer;
-
-function LookupSecurityDescriptorPartsW;
-begin
- GetProcedureAddress(_LookupSecurityDescriptorPartsW, aclapilib, 'LookupSecurityDescriptorPartsW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_LookupSecurityDescriptorPartsW]
- end;
-end;
-
-var
- _LookupSecurityDescriptorParts: Pointer;
-
-function LookupSecurityDescriptorParts;
-begin
- GetProcedureAddress(_LookupSecurityDescriptorParts, aclapilib, 'LookupSecurityDescriptorParts' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_LookupSecurityDescriptorParts]
- end;
-end;
-
-var
- _BuildExplicitAccessWithNameA: Pointer;
-
-procedure BuildExplicitAccessWithNameA;
-begin
- GetProcedureAddress(_BuildExplicitAccessWithNameA, aclapilib, 'BuildExplicitAccessWithNameA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_BuildExplicitAccessWithNameA]
- end;
-end;
-
-var
- _BuildExplicitAccessWithNameW: Pointer;
-
-procedure BuildExplicitAccessWithNameW;
-begin
- GetProcedureAddress(_BuildExplicitAccessWithNameW, aclapilib, 'BuildExplicitAccessWithNameW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_BuildExplicitAccessWithNameW]
- end;
-end;
-
-var
- _BuildExplicitAccessWithName: Pointer;
-
-procedure BuildExplicitAccessWithName;
-begin
- GetProcedureAddress(_BuildExplicitAccessWithName, aclapilib, 'BuildExplicitAccessWithName' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_BuildExplicitAccessWithName]
- end;
-end;
-
-var
- _BuildImpersonateExplAccWNA: Pointer;
-
-procedure BuildImpersonateExplicitAccessWithNameA;
-begin
- GetProcedureAddress(_BuildImpersonateExplAccWNA, aclapilib, 'BuildImpersonateExplicitAccessWithNameA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_BuildImpersonateExplAccWNA]
- end;
-end;
-
-var
- _BuildImpersonateExplAccWNW: Pointer;
-
-procedure BuildImpersonateExplicitAccessWithNameW;
-begin
- GetProcedureAddress(_BuildImpersonateExplAccWNW, aclapilib, 'BuildImpersonateExplicitAccessWithNameW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_BuildImpersonateExplAccWNW]
- end;
-end;
-
-var
- _BuildImpersonateExplAccWN: Pointer;
-
-procedure BuildImpersonateExplicitAccessWithName;
-begin
- GetProcedureAddress(_BuildImpersonateExplAccWN, aclapilib, 'BuildImpersonateExplicitAccessWithName' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_BuildImpersonateExplAccWN]
- end;
-end;
-
-var
- _BuildTrusteeWithNameA: Pointer;
-
-procedure BuildTrusteeWithNameA;
-begin
- GetProcedureAddress(_BuildTrusteeWithNameA, aclapilib, 'BuildTrusteeWithNameA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_BuildTrusteeWithNameA]
- end;
-end;
-
-var
- _BuildTrusteeWithNameW: Pointer;
-
-procedure BuildTrusteeWithNameW;
-begin
- GetProcedureAddress(_BuildTrusteeWithNameW, aclapilib, 'BuildTrusteeWithNameW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_BuildTrusteeWithNameW]
- end;
-end;
-
-var
- _BuildTrusteeWithName: Pointer;
-
-procedure BuildTrusteeWithName;
-begin
- GetProcedureAddress(_BuildTrusteeWithName, aclapilib, 'BuildTrusteeWithName' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_BuildTrusteeWithName]
- end;
-end;
-
-var
- _BuildImpersonateTrusteeA: Pointer;
-
-procedure BuildImpersonateTrusteeA;
-begin
- GetProcedureAddress(_BuildImpersonateTrusteeA, aclapilib, 'BuildImpersonateTrusteeA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_BuildImpersonateTrusteeA]
- end;
-end;
-
-var
- _BuildImpersonateTrusteeW: Pointer;
-
-procedure BuildImpersonateTrusteeW;
-begin
- GetProcedureAddress(_BuildImpersonateTrusteeW, aclapilib, 'BuildImpersonateTrusteeW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_BuildImpersonateTrusteeW]
- end;
-end;
-
-var
- _BuildImpersonateTrustee: Pointer;
-
-procedure BuildImpersonateTrustee;
-begin
- GetProcedureAddress(_BuildImpersonateTrustee, aclapilib, 'BuildImpersonateTrustee' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_BuildImpersonateTrustee]
- end;
-end;
-
-var
- _BuildTrusteeWithSidA: Pointer;
-
-procedure BuildTrusteeWithSidA;
-begin
- GetProcedureAddress(_BuildTrusteeWithSidA, aclapilib, 'BuildTrusteeWithSidA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_BuildTrusteeWithSidA]
- end;
-end;
-
-var
- _BuildTrusteeWithSidW: Pointer;
-
-procedure BuildTrusteeWithSidW;
-begin
- GetProcedureAddress(_BuildTrusteeWithSidW, aclapilib, 'BuildTrusteeWithSidW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_BuildTrusteeWithSidW]
- end;
-end;
-
-var
- _BuildTrusteeWithSid: Pointer;
-
-procedure BuildTrusteeWithSid;
-begin
- GetProcedureAddress(_BuildTrusteeWithSid, aclapilib, 'BuildTrusteeWithSid' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_BuildTrusteeWithSid]
- end;
-end;
-
-var
- _BuildTrusteeWithObjectsAndSidA: Pointer;
-
-procedure BuildTrusteeWithObjectsAndSidA;
-begin
- GetProcedureAddress(_BuildTrusteeWithObjectsAndSidA, aclapilib, 'BuildTrusteeWithObjectsAndSidA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_BuildTrusteeWithObjectsAndSidA]
- end;
-end;
-
-var
- _BuildTrusteeWithObjectsAndSidW: Pointer;
-
-procedure BuildTrusteeWithObjectsAndSidW;
-begin
- GetProcedureAddress(_BuildTrusteeWithObjectsAndSidW, aclapilib, 'BuildTrusteeWithObjectsAndSidW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_BuildTrusteeWithObjectsAndSidW]
- end;
-end;
-
-var
- _BuildTrusteeWithObjectsAndSid: Pointer;
-
-procedure BuildTrusteeWithObjectsAndSid;
-begin
- GetProcedureAddress(_BuildTrusteeWithObjectsAndSid, aclapilib, 'BuildTrusteeWithObjectsAndSid' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_BuildTrusteeWithObjectsAndSid]
- end;
-end;
-
-var
- _BuildTrusteeWithObjectsAndNameA: Pointer;
-
-procedure BuildTrusteeWithObjectsAndNameA;
-begin
- GetProcedureAddress(_BuildTrusteeWithObjectsAndNameA, aclapilib, 'BuildTrusteeWithObjectsAndNameA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_BuildTrusteeWithObjectsAndNameA]
- end;
-end;
-
-var
- _BuildTrusteeWithObjectsAndNameW: Pointer;
-
-procedure BuildTrusteeWithObjectsAndNameW;
-begin
- GetProcedureAddress(_BuildTrusteeWithObjectsAndNameW, aclapilib, 'BuildTrusteeWithObjectsAndNameW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_BuildTrusteeWithObjectsAndNameW]
- end;
-end;
-
-var
- _BuildTrusteeWithObjectsAndName: Pointer;
-
-procedure BuildTrusteeWithObjectsAndName;
-begin
- GetProcedureAddress(_BuildTrusteeWithObjectsAndName, aclapilib, 'BuildTrusteeWithObjectsAndName' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_BuildTrusteeWithObjectsAndName]
- end;
-end;
-
-var
- _GetTrusteeNameA: Pointer;
-
-function GetTrusteeNameA;
-begin
- GetProcedureAddress(_GetTrusteeNameA, aclapilib, 'GetTrusteeNameA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetTrusteeNameA]
- end;
-end;
-
-var
- _GetTrusteeNameW: Pointer;
-
-function GetTrusteeNameW;
-begin
- GetProcedureAddress(_GetTrusteeNameW, aclapilib, 'GetTrusteeNameW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetTrusteeNameW]
- end;
-end;
-
-var
- _GetTrusteeName: Pointer;
-
-function GetTrusteeName;
-begin
- GetProcedureAddress(_GetTrusteeName, aclapilib, 'GetTrusteeName' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetTrusteeName]
- end;
-end;
-
-var
- _GetTrusteeTypeA: Pointer;
-
-function GetTrusteeTypeA;
-begin
- GetProcedureAddress(_GetTrusteeTypeA, aclapilib, 'GetTrusteeTypeA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetTrusteeTypeA]
- end;
-end;
-
-var
- _GetTrusteeTypeW: Pointer;
-
-function GetTrusteeTypeW;
-begin
- GetProcedureAddress(_GetTrusteeTypeW, aclapilib, 'GetTrusteeTypeW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetTrusteeTypeW]
- end;
-end;
-
-var
- _GetTrusteeType: Pointer;
-
-function GetTrusteeType;
-begin
- GetProcedureAddress(_GetTrusteeType, aclapilib, 'GetTrusteeType' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetTrusteeType]
- end;
-end;
-
-var
- _GetTrusteeFormA: Pointer;
-
-function GetTrusteeFormA;
-begin
- GetProcedureAddress(_GetTrusteeFormA, aclapilib, 'GetTrusteeFormA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetTrusteeFormA]
- end;
-end;
-
-var
- _GetTrusteeFormW: Pointer;
-
-function GetTrusteeFormW;
-begin
- GetProcedureAddress(_GetTrusteeFormW, aclapilib, 'GetTrusteeFormW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetTrusteeFormW]
- end;
-end;
-
-var
- _GetTrusteeForm: Pointer;
-
-function GetTrusteeForm;
-begin
- GetProcedureAddress(_GetTrusteeForm, aclapilib, 'GetTrusteeForm' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetTrusteeForm]
- end;
-end;
-
-var
- _GetMultipleTrusteeOperationA: Pointer;
-
-function GetMultipleTrusteeOperationA;
-begin
- GetProcedureAddress(_GetMultipleTrusteeOperationA, aclapilib, 'GetMultipleTrusteeOperationA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetMultipleTrusteeOperationA]
- end;
-end;
-
-var
- _GetMultipleTrusteeOperationW: Pointer;
-
-function GetMultipleTrusteeOperationW;
-begin
- GetProcedureAddress(_GetMultipleTrusteeOperationW, aclapilib, 'GetMultipleTrusteeOperationW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetMultipleTrusteeOperationW]
- end;
-end;
-
-var
- _GetMultipleTrusteeOperation: Pointer;
-
-function GetMultipleTrusteeOperation;
-begin
- GetProcedureAddress(_GetMultipleTrusteeOperation, aclapilib, 'GetMultipleTrusteeOperation' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetMultipleTrusteeOperation]
- end;
-end;
-
-var
- _GetMultipleTrusteeA: Pointer;
-
-function GetMultipleTrusteeA;
-begin
- GetProcedureAddress(_GetMultipleTrusteeA, aclapilib, 'GetMultipleTrusteeA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetMultipleTrusteeA]
- end;
-end;
-
-var
- _GetMultipleTrusteeW: Pointer;
-
-function GetMultipleTrusteeW;
-begin
- GetProcedureAddress(_GetMultipleTrusteeW, aclapilib, 'GetMultipleTrusteeW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetMultipleTrusteeW]
- end;
-end;
-
-var
- _GetMultipleTrustee: Pointer;
-
-function GetMultipleTrustee;
-begin
- GetProcedureAddress(_GetMultipleTrustee, aclapilib, 'GetMultipleTrustee' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetMultipleTrustee]
- end;
-end;
-
-{$ELSE}
-
-function SetEntriesInAclA; external aclapilib name 'SetEntriesInAclA';
-function SetEntriesInAclW; external aclapilib name 'SetEntriesInAclW';
-function SetEntriesInAcl; external aclapilib name 'SetEntriesInAcl' + AWSuffix;
-function GetExplicitEntriesFromAclA; external aclapilib name 'GetExplicitEntriesFromAclA';
-function GetExplicitEntriesFromAclW; external aclapilib name 'GetExplicitEntriesFromAclW';
-function GetExplicitEntriesFromAcl; external aclapilib name 'GetExplicitEntriesFromAcl' + AWSuffix;
-function GetEffectiveRightsFromAclA; external aclapilib name 'GetEffectiveRightsFromAclA';
-function GetEffectiveRightsFromAclW; external aclapilib name 'GetEffectiveRightsFromAclW';
-function GetEffectiveRightsFromAcl; external aclapilib name 'GetEffectiveRightsFromAcl' + AWSuffix;
-function GetAuditedPermissionsFromAclA; external aclapilib name 'GetAuditedPermissionsFromAclA';
-function GetAuditedPermissionsFromAclW; external aclapilib name 'GetAuditedPermissionsFromAclW';
-function GetAuditedPermissionsFromAcl; external aclapilib name 'GetAuditedPermissionsFromAcl' + AWSuffix;
-function GetNamedSecurityInfoA; external aclapilib name 'GetNamedSecurityInfoA';
-function GetNamedSecurityInfoW; external aclapilib name 'GetNamedSecurityInfoW';
-function GetNamedSecurityInfo; external aclapilib name 'GetNamedSecurityInfo' + AWSuffix;
-function GetSecurityInfo; external aclapilib name 'GetSecurityInfo';
-function SetNamedSecurityInfoA; external aclapilib name 'SetNamedSecurityInfoA';
-function SetNamedSecurityInfoW; external aclapilib name 'SetNamedSecurityInfoW';
-function SetNamedSecurityInfo; external aclapilib name 'SetNamedSecurityInfo' + AWSuffix;
-function SetSecurityInfo; external aclapilib name 'SetSecurityInfo';
-function GetInheritanceSourceA; external aclapilib name 'GetInheritanceSourceA';
-function GetInheritanceSourceW; external aclapilib name 'GetInheritanceSourceW';
-function GetInheritanceSource; external aclapilib name 'GetInheritanceSource' + AWSuffix;
-function FreeInheritedFromArray; external aclapilib name 'FreeInheritedFromArray';
-function TreeResetNamedSecurityInfoA; external aclapilib name 'TreeResetNamedSecurityInfoA';
-function TreeResetNamedSecurityInfoW; external aclapilib name 'TreeResetNamedSecurityInfoW';
-function TreeResetNamedSecurityInfo; external aclapilib name 'TreeResetNamedSecurityInfo' + AWSuffix;
-function BuildSecurityDescriptorA; external aclapilib name 'BuildSecurityDescriptorA';
-function BuildSecurityDescriptorW; external aclapilib name 'BuildSecurityDescriptorW';
-function BuildSecurityDescriptor; external aclapilib name 'BuildSecurityDescriptor' + AWSuffix;
-function LookupSecurityDescriptorPartsA; external aclapilib name 'LookupSecurityDescriptorPartsA';
-function LookupSecurityDescriptorPartsW; external aclapilib name 'LookupSecurityDescriptorPartsW';
-function LookupSecurityDescriptorParts; external aclapilib name 'LookupSecurityDescriptorParts' + AWSuffix;
-procedure BuildExplicitAccessWithNameA; external aclapilib name 'BuildExplicitAccessWithNameA';
-procedure BuildExplicitAccessWithNameW; external aclapilib name 'BuildExplicitAccessWithNameW';
-procedure BuildExplicitAccessWithName; external aclapilib name 'BuildExplicitAccessWithName' + AWSuffix;
-procedure BuildImpersonateExplicitAccessWithNameA; external aclapilib name 'BuildImpersonateExplicitAccessWithNameA';
-procedure BuildImpersonateExplicitAccessWithNameW; external aclapilib name 'BuildImpersonateExplicitAccessWithNameW';
-procedure BuildImpersonateExplicitAccessWithName; external aclapilib name 'BuildImpersonateExplicitAccessWithName' + AWSuffix;
-procedure BuildTrusteeWithNameA; external aclapilib name 'BuildTrusteeWithNameA';
-procedure BuildTrusteeWithNameW; external aclapilib name 'BuildTrusteeWithNameW';
-procedure BuildTrusteeWithName; external aclapilib name 'BuildTrusteeWithName' + AWSuffix;
-procedure BuildImpersonateTrusteeA; external aclapilib name 'BuildImpersonateTrusteeA';
-procedure BuildImpersonateTrusteeW; external aclapilib name 'BuildImpersonateTrusteeW';
-procedure BuildImpersonateTrustee; external aclapilib name 'BuildImpersonateTrustee' + AWSuffix;
-procedure BuildTrusteeWithSidA; external aclapilib name 'BuildTrusteeWithSidA';
-procedure BuildTrusteeWithSidW; external aclapilib name 'BuildTrusteeWithSidW';
-procedure BuildTrusteeWithSid; external aclapilib name 'BuildTrusteeWithSid' + AWSuffix;
-procedure BuildTrusteeWithObjectsAndSidA; external aclapilib name 'BuildTrusteeWithObjectsAndSidA';
-procedure BuildTrusteeWithObjectsAndSidW; external aclapilib name 'BuildTrusteeWithObjectsAndSidW';
-procedure BuildTrusteeWithObjectsAndSid; external aclapilib name 'BuildTrusteeWithObjectsAndSid' + AWSuffix;
-procedure BuildTrusteeWithObjectsAndNameA; external aclapilib name 'BuildTrusteeWithObjectsAndNameA';
-procedure BuildTrusteeWithObjectsAndNameW; external aclapilib name 'BuildTrusteeWithObjectsAndNameW';
-procedure BuildTrusteeWithObjectsAndName; external aclapilib name 'BuildTrusteeWithObjectsAndName' + AWSuffix;
-function GetTrusteeNameA; external aclapilib name 'GetTrusteeNameA';
-function GetTrusteeNameW; external aclapilib name 'GetTrusteeNameW';
-function GetTrusteeName; external aclapilib name 'GetTrusteeName' + AWSuffix;
-function GetTrusteeTypeA; external aclapilib name 'GetTrusteeTypeA';
-function GetTrusteeTypeW; external aclapilib name 'GetTrusteeTypeW';
-function GetTrusteeType; external aclapilib name 'GetTrusteeType' + AWSuffix;
-function GetTrusteeFormA; external aclapilib name 'GetTrusteeFormA';
-function GetTrusteeFormW; external aclapilib name 'GetTrusteeFormW';
-function GetTrusteeForm; external aclapilib name 'GetTrusteeForm' + AWSuffix;
-function GetMultipleTrusteeOperationA; external aclapilib name 'GetMultipleTrusteeOperationA';
-function GetMultipleTrusteeOperationW; external aclapilib name 'GetMultipleTrusteeOperationW';
-function GetMultipleTrusteeOperation; external aclapilib name 'GetMultipleTrusteeOperation' + AWSuffix;
-function GetMultipleTrusteeA; external aclapilib name 'GetMultipleTrusteeA';
-function GetMultipleTrusteeW; external aclapilib name 'GetMultipleTrusteeW';
-function GetMultipleTrustee; external aclapilib name 'GetMultipleTrustee' + AWSuffix;
-
-{$ENDIF DYNAMIC_LINK}
-
-end.
+{******************************************************************************}
+{ }
+{ Access Control API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: aclapi.h, released June 2000. The original Pascal }
+{ code is: AclApi.pas, released December 2000. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwaaclapi.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaAclApi;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "aclapi.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaAccCtrl, JwaWinNT, JwaWinType;
+
+//
+// Progress Function:
+// Caller of tree operation implements this Progress function, then
+// passes its function pointer to tree operation.
+// Tree operation invokes Progress function to provide progress and error
+// information to the caller during the potentially long execution
+// of the tree operation. Tree operation provides the name of the object
+// last processed and the error status of the operation on that object.
+// Tree operation also passes the current InvokeSetting value.
+// Caller may change the InvokeSetting value, for example, from "Always"
+// to "Only On Error."
+//
+
+type
+ FN_PROGRESS = procedure(
+ pObjectName: LPWSTR; // name of object just processed
+ Status: DWORD; // status of operation on object
+ var pInvokeSetting: PPROG_INVOKE_SETTING; // Never, always,
+ Args: PVOID; // Caller specific data
+ SecuritySet: BOOL // Whether security was set
+ ); stdcall;
+ {$EXTERNALSYM FN_PROGRESS}
+ TFnProgress = FN_PROGRESS;
+
+function SetEntriesInAclA(cCountOfExplicitEntries: ULONG;
+ pListOfExplicitEntries: PEXPLICIT_ACCESS_A; OldAcl: PACL;
+ var NewAcl: PACL): DWORD; stdcall;
+{$EXTERNALSYM SetEntriesInAclA}
+function SetEntriesInAclW(cCountOfExplicitEntries: ULONG;
+ pListOfExplicitEntries: PEXPLICIT_ACCESS_W; OldAcl: PACL;
+ var NewAcl: PACL): DWORD; stdcall;
+{$EXTERNALSYM SetEntriesInAclW}
+function SetEntriesInAcl(cCountOfExplicitEntries: ULONG;
+ pListOfExplicitEntries: PEXPLICIT_ACCESS; OldAcl: PACL;
+ var NewAcl: PACL): DWORD; stdcall;
+{$EXTERNALSYM SetEntriesInAcl}
+
+function GetExplicitEntriesFromAclA(pacl: PACL; var pcCountOfExplicitEntries: ULONG;
+ var pListOfExplicitEntries: PEXPLICIT_ACCESS_A): DWORD; stdcall;
+{$EXTERNALSYM GetExplicitEntriesFromAclA}
+function GetExplicitEntriesFromAclW(pacl: PACL; var pcCountOfExplicitEntries: ULONG;
+ var pListOfExplicitEntries: PEXPLICIT_ACCESS_W): DWORD; stdcall;
+{$EXTERNALSYM GetExplicitEntriesFromAclW}
+function GetExplicitEntriesFromAcl(pacl: PACL; var pcCountOfExplicitEntries: ULONG;
+ var pListOfExplicitEntries: PEXPLICIT_ACCESS): DWORD; stdcall;
+{$EXTERNALSYM GetExplicitEntriesFromAcl}
+
+function GetEffectiveRightsFromAclA(pacl: PACL; pTrustee: PTRUSTEE_A;
+ var pAccessRights: ACCESS_MASK): DWORD; stdcall;
+{$EXTERNALSYM GetEffectiveRightsFromAclA}
+function GetEffectiveRightsFromAclW(pacl: PACL; pTrustee: PTRUSTEE_W;
+ var pAccessRights: ACCESS_MASK): DWORD; stdcall;
+{$EXTERNALSYM GetEffectiveRightsFromAclW}
+function GetEffectiveRightsFromAcl(pacl: PACL; pTrustee: PTRUSTEE;
+ var pAccessRights: ACCESS_MASK): DWORD; stdcall;
+{$EXTERNALSYM GetEffectiveRightsFromAcl}
+
+function GetAuditedPermissionsFromAclA(pacl: PACL; pTrustee: PTRUSTEE_A;
+ var pSuccessfulAuditedRights, pFailedAuditRights: ACCESS_MASK): DWORD; stdcall;
+{$EXTERNALSYM GetAuditedPermissionsFromAclA}
+function GetAuditedPermissionsFromAclW(pacl: PACL; pTrustee: PTRUSTEE_W;
+ var pSuccessfulAuditedRights, pFailedAuditRights: ACCESS_MASK): DWORD; stdcall;
+{$EXTERNALSYM GetAuditedPermissionsFromAclW}
+function GetAuditedPermissionsFromAcl(pacl: PACL; pTrustee: PTRUSTEE;
+ var pSuccessfulAuditedRights, pFailedAuditRights: ACCESS_MASK): DWORD; stdcall;
+{$EXTERNALSYM GetAuditedPermissionsFromAcl}
+
+function GetNamedSecurityInfoA(pObjectName: LPSTR; ObjectType: SE_OBJECT_TYPE;
+ SecurityInfo: SECURITY_INFORMATION; ppsidOwner, ppsidGroup: PPSID; ppDacl,
+ ppSacl: PPACL; var ppSecurityDescriptor: PSECURITY_DESCRIPTOR): DWORD; stdcall;
+{$EXTERNALSYM GetNamedSecurityInfoA}
+function GetNamedSecurityInfoW(pObjectName: LPWSTR; ObjectType: SE_OBJECT_TYPE;
+ SecurityInfo: SECURITY_INFORMATION; ppsidOwner, ppsidGroup: PPSID; ppDacl,
+ ppSacl: PPACL; var ppSecurityDescriptor: PSECURITY_DESCRIPTOR): DWORD; stdcall;
+{$EXTERNALSYM GetNamedSecurityInfoW}
+function GetNamedSecurityInfo(pObjectName: LPTSTR; ObjectType: SE_OBJECT_TYPE;
+ SecurityInfo: SECURITY_INFORMATION; ppsidOwner, ppsidGroup: PPSID; ppDacl,
+ ppSacl: PPACL; var ppSecurityDescriptor: PSECURITY_DESCRIPTOR): DWORD; stdcall;
+{$EXTERNALSYM GetNamedSecurityInfo}
+
+function GetSecurityInfo(handle: HANDLE; ObjectType: SE_OBJECT_TYPE;
+ SecurityInfo: SECURITY_INFORMATION; ppsidOwner: PPSID; ppsidGroup: PPSID;
+ ppDacl, ppSacl: PPACL; var ppSecurityDescriptor: PSECURITY_DESCRIPTOR): DWORD; stdcall;
+{$EXTERNALSYM GetSecurityInfo}
+
+function SetNamedSecurityInfoA(pObjectName: LPSTR; ObjectType: SE_OBJECT_TYPE;
+ SecurityInfo: SECURITY_INFORMATION; psidOwner, psidGroup: PSID;
+ pDacl, pSacl: PACL): DWORD; stdcall;
+{$EXTERNALSYM SetNamedSecurityInfoA}
+function SetNamedSecurityInfoW(pObjectName: LPWSTR; ObjectType: SE_OBJECT_TYPE;
+ SecurityInfo: SECURITY_INFORMATION; psidOwner, psidGroup: PSID;
+ pDacl, pSacl: PACL): DWORD; stdcall;
+{$EXTERNALSYM SetNamedSecurityInfoW}
+function SetNamedSecurityInfo(pObjectName: LPTSTR; ObjectType: SE_OBJECT_TYPE;
+ SecurityInfo: SECURITY_INFORMATION; psidOwner, psidGroup: PSID;
+ pDacl, pSacl: PACL): DWORD; stdcall;
+{$EXTERNALSYM SetNamedSecurityInfo}
+
+function SetSecurityInfo(handle: HANDLE; ObjectType: SE_OBJECT_TYPE;
+ SecurityInfo: SECURITY_INFORMATION; psidOwner, psidGroup: PSID;
+ pDacl, pSacl: PACL): DWORD; stdcall;
+{$EXTERNALSYM SetSecurityInfo}
+
+function GetInheritanceSourceA(pObjectName: LPSTR; ObjectType: SE_OBJECT_TYPE;
+ SecurityInfo: SECURITY_INFORMATION; Container: BOOL; pObjectClassGuids: LPGUID;
+ GuidCount: DWORD; pAcl: PACL; pfnArray: PFN_OBJECT_MGR_FUNCTS;
+ pGenericMapping: PGENERIC_MAPPING; pInheritArray: PINHERITED_FROMA): DWORD; stdcall;
+{$EXTERNALSYM GetInheritanceSourceA}
+function GetInheritanceSourceW(pObjectName: LPWSTR; ObjectType: SE_OBJECT_TYPE;
+ SecurityInfo: SECURITY_INFORMATION; Container: BOOL; pObjectClassGuids: LPGUID;
+ GuidCount: DWORD; pAcl: PACL; pfnArray: PFN_OBJECT_MGR_FUNCTS;
+ pGenericMapping: PGENERIC_MAPPING; pInheritArray: PINHERITED_FROMW): DWORD; stdcall;
+{$EXTERNALSYM GetInheritanceSourceW}
+function GetInheritanceSource(pObjectName: LPTSTR; ObjectType: SE_OBJECT_TYPE;
+ SecurityInfo: SECURITY_INFORMATION; Container: BOOL; pObjectClassGuids: LPGUID;
+ GuidCount: DWORD; pAcl: PACL; pfnArray: PFN_OBJECT_MGR_FUNCTS;
+ pGenericMapping: PGENERIC_MAPPING; pInheritArray: PINHERITED_FROM): DWORD; stdcall;
+{$EXTERNALSYM GetInheritanceSource}
+
+function FreeInheritedFromArray(pInheritArray: PINHERITED_FROMW; AceCnt: USHORT;
+ pfnArray: PFN_OBJECT_MGR_FUNCTS): DWORD; stdcall;
+{$EXTERNALSYM FreeInheritedFromArray}
+
+function TreeResetNamedSecurityInfoA(pObjectName: LPSTR; ObjectType: SE_OBJECT_TYPE;
+ SecurityInfo: SECURITY_INFORMATION; pOwner, pGroup: PSID; pDacl, pSacl: PACL;
+ KeepExplicit: BOOL; fnProgress: FN_PROGRESS; ProgressInvokeSetting: PROG_INVOKE_SETTING;
+ Args: PVOID): DWORD; stdcall;
+{$EXTERNALSYM TreeResetNamedSecurityInfoA}
+function TreeResetNamedSecurityInfoW(pObjectName: LPWSTR; ObjectType: SE_OBJECT_TYPE;
+ SecurityInfo: SECURITY_INFORMATION; pOwner, pGroup: PSID; pDacl, pSacl: PACL;
+ KeepExplicit: BOOL; fnProgress: FN_PROGRESS; ProgressInvokeSetting: PROG_INVOKE_SETTING;
+ Args: PVOID): DWORD; stdcall;
+{$EXTERNALSYM TreeResetNamedSecurityInfoW}
+function TreeResetNamedSecurityInfo(pObjectName: LPTSTR; ObjectType: SE_OBJECT_TYPE;
+ SecurityInfo: SECURITY_INFORMATION; pOwner, pGroup: PSID; pDacl, pSacl: PACL;
+ KeepExplicit: BOOL; fnProgress: FN_PROGRESS; ProgressInvokeSetting: PROG_INVOKE_SETTING;
+ Args: PVOID): DWORD; stdcall;
+{$EXTERNALSYM TreeResetNamedSecurityInfo}
+
+//----------------------------------------------------------------------------
+// The following API are provided for trusted servers to use to
+// implement access control on their own objects.
+//----------------------------------------------------------------------------
+
+function BuildSecurityDescriptorA(pOwner: PTRUSTEE_A; pGroup: PTRUSTEE_A;
+ cCountOfAccessEntries: ULONG; pListOfAccessEntries: PEXPLICIT_ACCESS_A;
+ cCountOfAuditEntries: ULONG; pListOfAuditEntries: PEXPLICIT_ACCESS_A;
+ pOldSD: PSECURITY_DESCRIPTOR; var pSizeNewSD: ULONG;
+ var pNewSD: PSECURITY_DESCRIPTOR): DWORD; stdcall;
+{$EXTERNALSYM BuildSecurityDescriptorA}
+function BuildSecurityDescriptorW(pOwner: PTRUSTEE_W; pGroup: PTRUSTEE_W;
+ cCountOfAccessEntries: ULONG; pListOfAccessEntries: PEXPLICIT_ACCESS_W;
+ cCountOfAuditEntries: ULONG; pListOfAuditEntries: PEXPLICIT_ACCESS_W;
+ pOldSD: PSECURITY_DESCRIPTOR; var pSizeNewSD: ULONG;
+ var pNewSD: PSECURITY_DESCRIPTOR): DWORD; stdcall;
+{$EXTERNALSYM BuildSecurityDescriptorW}
+function BuildSecurityDescriptor(pOwner: PTRUSTEE; pGroup: PTRUSTEE;
+ cCountOfAccessEntries: ULONG; pListOfAccessEntries: PEXPLICIT_ACCESS;
+ cCountOfAuditEntries: ULONG; pListOfAuditEntries: PEXPLICIT_ACCESS;
+ pOldSD: PSECURITY_DESCRIPTOR; var pSizeNewSD: ULONG;
+ var pNewSD: PSECURITY_DESCRIPTOR): DWORD; stdcall;
+{$EXTERNALSYM BuildSecurityDescriptor}
+
+function LookupSecurityDescriptorPartsA(pOwner, pGroup: PPTRUSTEE_A;
+ cCountOfAccessEntries: PULONG; pListOfAccessEntries: PEXPLICIT_ACCESS_A;
+ cCountOfAuditEntries: PULONG; pListOfAuditEntries: PEXPLICIT_ACCESS_A;
+ var pSD: SECURITY_DESCRIPTOR): DWORD; stdcall;
+{$EXTERNALSYM LookupSecurityDescriptorPartsA}
+function LookupSecurityDescriptorPartsW(pOwner, pGroup: PPTRUSTEE_W;
+ cCountOfAccessEntries: PULONG; pListOfAccessEntries: PEXPLICIT_ACCESS_W;
+ cCountOfAuditEntries: PULONG; pListOfAuditEntries: PEXPLICIT_ACCESS_W;
+ var pSD: SECURITY_DESCRIPTOR): DWORD; stdcall;
+{$EXTERNALSYM LookupSecurityDescriptorPartsW}
+function LookupSecurityDescriptorParts(pOwner, pGroup: PPTRUSTEE;
+ cCountOfAccessEntries: PULONG; pListOfAccessEntries: PEXPLICIT_ACCESS;
+ cCountOfAuditEntries: PULONG; pListOfAuditEntries: PEXPLICIT_ACCESS;
+ var pSD: SECURITY_DESCRIPTOR): DWORD; stdcall;
+{$EXTERNALSYM LookupSecurityDescriptorParts}
+
+//----------------------------------------------------------------------------
+// The following helper API are provided for building
+// access control structures.
+//----------------------------------------------------------------------------
+
+procedure BuildExplicitAccessWithNameA(pExplicitAccess: PEXPLICIT_ACCESS_A;
+ pTrusteeName: LPSTR; AccessPermissions: DWORD; AccessMode: ACCESS_MODE;
+ Inheritance: DWORD); stdcall;
+{$EXTERNALSYM BuildExplicitAccessWithNameA}
+procedure BuildExplicitAccessWithNameW(pExplicitAccess: PEXPLICIT_ACCESS_W;
+ pTrusteeName: LPWSTR; AccessPermissions: DWORD; AccessMode: ACCESS_MODE;
+ Inheritance: DWORD); stdcall;
+{$EXTERNALSYM BuildExplicitAccessWithNameW}
+procedure BuildExplicitAccessWithName(pExplicitAccess: PEXPLICIT_ACCESS;
+ pTrusteeName: LPTSTR; AccessPermissions: DWORD; AccessMode: ACCESS_MODE;
+ Inheritance: DWORD); stdcall;
+{$EXTERNALSYM BuildExplicitAccessWithName}
+
+procedure BuildImpersonateExplicitAccessWithNameA(pExplicitAccess: PEXPLICIT_ACCESS_A;
+ pTrusteeName: LPSTR; pTrustee: PTRUSTEE_A; AccessPermissions: DWORD;
+ AccessMode: ACCESS_MODE; Inheritance: DWORD); stdcall;
+{$EXTERNALSYM BuildImpersonateExplicitAccessWithNameA}
+procedure BuildImpersonateExplicitAccessWithNameW(pExplicitAccess: PEXPLICIT_ACCESS_W;
+ pTrusteeName: LPWSTR; pTrustee: PTRUSTEE_W; AccessPermissions: DWORD;
+ AccessMode: ACCESS_MODE; Inheritance: DWORD); stdcall;
+{$EXTERNALSYM BuildImpersonateExplicitAccessWithNameW}
+procedure BuildImpersonateExplicitAccessWithName(pExplicitAccess: PEXPLICIT_ACCESS;
+ pTrusteeName: LPTSTR; pTrustee: PTRUSTEE; AccessPermissions: DWORD;
+ AccessMode: ACCESS_MODE; Inheritance: DWORD); stdcall;
+{$EXTERNALSYM BuildImpersonateExplicitAccessWithName}
+
+procedure BuildTrusteeWithNameA(pTrustee: PTRUSTEE_A; pName: LPSTR); stdcall;
+{$EXTERNALSYM BuildTrusteeWithNameA}
+procedure BuildTrusteeWithNameW(pTrustee: PTRUSTEE_W; pName: LPWSTR); stdcall;
+{$EXTERNALSYM BuildTrusteeWithNameW}
+procedure BuildTrusteeWithName(pTrustee: PTRUSTEE; pName: LPTSTR); stdcall;
+{$EXTERNALSYM BuildTrusteeWithName}
+
+procedure BuildImpersonateTrusteeA(pTrustee: PTRUSTEE_A;
+ pImpersonateTrustee: PTRUSTEE_A); stdcall;
+{$EXTERNALSYM BuildImpersonateTrusteeA}
+procedure BuildImpersonateTrusteeW(pTrustee: PTRUSTEE_W;
+ pImpersonateTrustee: PTRUSTEE_W); stdcall;
+{$EXTERNALSYM BuildImpersonateTrusteeW}
+procedure BuildImpersonateTrustee(pTrustee: PTRUSTEE;
+ pImpersonateTrustee: PTRUSTEE); stdcall;
+{$EXTERNALSYM BuildImpersonateTrustee}
+
+procedure BuildTrusteeWithSidA(pTrustee: PTRUSTEE_A; pSid: PSID); stdcall;
+{$EXTERNALSYM BuildTrusteeWithSidA}
+procedure BuildTrusteeWithSidW(pTrustee: PTRUSTEE_W; pSid: PSID); stdcall;
+{$EXTERNALSYM BuildTrusteeWithSidW}
+procedure BuildTrusteeWithSid(pTrustee: PTRUSTEE; pSid: PSID); stdcall;
+{$EXTERNALSYM BuildTrusteeWithSid}
+
+procedure BuildTrusteeWithObjectsAndSidA(pTrustee: PTRUSTEE_A;
+ pObjSid: POBJECTS_AND_SID; pObjectGuid: PGUID; pInheritedObjectGuid: PGUID;
+ pSid: PSID); stdcall;
+{$EXTERNALSYM BuildTrusteeWithObjectsAndSidA}
+procedure BuildTrusteeWithObjectsAndSidW(pTrustee: PTRUSTEE_W;
+ pObjSid: POBJECTS_AND_SID; pObjectGuid: PGUID; pInheritedObjectGuid: PGUID;
+ pSid: PSID); stdcall;
+{$EXTERNALSYM BuildTrusteeWithObjectsAndSidW}
+procedure BuildTrusteeWithObjectsAndSid(pTrustee: PTRUSTEE;
+ pObjSid: POBJECTS_AND_SID; pObjectGuid: PGUID; pInheritedObjectGuid: PGUID;
+ pSid: PSID); stdcall;
+{$EXTERNALSYM BuildTrusteeWithObjectsAndSid}
+
+procedure BuildTrusteeWithObjectsAndNameA(pTrustee: PTRUSTEE_A;
+ pObjName: POBJECTS_AND_NAME_A; ObjectType: SE_OBJECT_TYPE;
+ ObjectTypeName, InheritedObjectTypeName, Name: LPSTR); stdcall;
+{$EXTERNALSYM BuildTrusteeWithObjectsAndNameA}
+procedure BuildTrusteeWithObjectsAndNameW(pTrustee: PTRUSTEE_W;
+ pObjName: POBJECTS_AND_NAME_W; ObjectType: SE_OBJECT_TYPE;
+ ObjectTypeName, InheritedObjectTypeName, Name: LPWSTR); stdcall;
+{$EXTERNALSYM BuildTrusteeWithObjectsAndNameW}
+procedure BuildTrusteeWithObjectsAndName(pTrustee: PTRUSTEE;
+ pObjName: POBJECTS_AND_NAME; ObjectType: SE_OBJECT_TYPE;
+ ObjectTypeName, InheritedObjectTypeName, Name: LPTSTR); stdcall;
+{$EXTERNALSYM BuildTrusteeWithObjectsAndName}
+
+function GetTrusteeNameA(pTrustee: PTRUSTEE_A): LPSTR; stdcall;
+{$EXTERNALSYM GetTrusteeNameA}
+function GetTrusteeNameW(pTrustee: PTRUSTEE_W): LPWSTR; stdcall;
+{$EXTERNALSYM GetTrusteeNameW}
+function GetTrusteeName(pTrustee: PTRUSTEE): LPTSTR; stdcall;
+{$EXTERNALSYM GetTrusteeName}
+
+function GetTrusteeTypeA(pTrustee: PTRUSTEE_A): TRUSTEE_TYPE; stdcall;
+{$EXTERNALSYM GetTrusteeTypeA}
+function GetTrusteeTypeW(pTrustee: PTRUSTEE_W): TRUSTEE_TYPE; stdcall;
+{$EXTERNALSYM GetTrusteeTypeW}
+function GetTrusteeType(pTrustee: PTRUSTEE): TRUSTEE_TYPE; stdcall;
+{$EXTERNALSYM GetTrusteeType}
+
+function GetTrusteeFormA(pTrustee: PTRUSTEE_A): TRUSTEE_FORM; stdcall;
+{$EXTERNALSYM GetTrusteeFormA}
+function GetTrusteeFormW(pTrustee: PTRUSTEE_W): TRUSTEE_FORM; stdcall;
+{$EXTERNALSYM GetTrusteeFormW}
+function GetTrusteeForm(pTrustee: PTRUSTEE): TRUSTEE_FORM; stdcall;
+{$EXTERNALSYM GetTrusteeForm}
+
+function GetMultipleTrusteeOperationA(pTrustee: PTRUSTEE_A): MULTIPLE_TRUSTEE_OPERATION; stdcall;
+{$EXTERNALSYM GetMultipleTrusteeOperationA}
+function GetMultipleTrusteeOperationW(pTrustee: PTRUSTEE_W): MULTIPLE_TRUSTEE_OPERATION; stdcall;
+{$EXTERNALSYM GetMultipleTrusteeOperationW}
+function GetMultipleTrusteeOperation(pTrustee: PTRUSTEE): MULTIPLE_TRUSTEE_OPERATION; stdcall;
+{$EXTERNALSYM GetMultipleTrusteeOperation}
+
+function GetMultipleTrusteeA(pTrustee: PTRUSTEE_A): PTRUSTEE_A; stdcall;
+{$EXTERNALSYM GetMultipleTrusteeA}
+function GetMultipleTrusteeW(pTrustee: PTRUSTEE_W): PTRUSTEE_W; stdcall;
+{$EXTERNALSYM GetMultipleTrusteeW}
+function GetMultipleTrustee(pTrustee: PTRUSTEE): PTRUSTEE; stdcall;
+{$EXTERNALSYM GetMultipleTrustee}
+
+implementation
+
+const
+ aclapilib = 'advapi32.dll';
+ {$IFDEF UNICODE}
+ AWSuffix = 'W';
+ {$ELSE}
+ AWSuffix = 'A';
+ {$ENDIF UNICODE}
+
+{$IFDEF DYNAMIC_LINK}
+
+var
+ _SetEntriesInAclA: Pointer;
+
+function SetEntriesInAclA;
+begin
+ GetProcedureAddress(_SetEntriesInAclA, aclapilib, 'SetEntriesInAclA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetEntriesInAclA]
+ end;
+end;
+
+var
+ _SetEntriesInAclW: Pointer;
+
+function SetEntriesInAclW;
+begin
+ GetProcedureAddress(_SetEntriesInAclW, aclapilib, 'SetEntriesInAclW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetEntriesInAclW]
+ end;
+end;
+
+var
+ _SetEntriesInAcl: Pointer;
+
+function SetEntriesInAcl;
+begin
+ GetProcedureAddress(_SetEntriesInAcl, aclapilib, 'SetEntriesInAcl' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetEntriesInAcl]
+ end;
+end;
+
+var
+ _GetExplicitEntriesFromAclA: Pointer;
+
+function GetExplicitEntriesFromAclA;
+begin
+ GetProcedureAddress(_GetExplicitEntriesFromAclA, aclapilib, 'GetExplicitEntriesFromAclA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetExplicitEntriesFromAclA]
+ end;
+end;
+
+var
+ _GetExplicitEntriesFromAclW: Pointer;
+
+function GetExplicitEntriesFromAclW;
+begin
+ GetProcedureAddress(_GetExplicitEntriesFromAclW, aclapilib, 'GetExplicitEntriesFromAclW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetExplicitEntriesFromAclW]
+ end;
+end;
+
+var
+ _GetExplicitEntriesFromAcl: Pointer;
+
+function GetExplicitEntriesFromAcl;
+begin
+ GetProcedureAddress(_GetExplicitEntriesFromAcl, aclapilib, 'GetExplicitEntriesFromAcl' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetExplicitEntriesFromAcl]
+ end;
+end;
+
+var
+ _GetEffectiveRightsFromAclA: Pointer;
+
+function GetEffectiveRightsFromAclA;
+begin
+ GetProcedureAddress(_GetEffectiveRightsFromAclA, aclapilib, 'GetEffectiveRightsFromAclA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetEffectiveRightsFromAclA]
+ end;
+end;
+
+var
+ _GetEffectiveRightsFromAclW: Pointer;
+
+function GetEffectiveRightsFromAclW;
+begin
+ GetProcedureAddress(_GetEffectiveRightsFromAclW, aclapilib, 'GetEffectiveRightsFromAclW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetEffectiveRightsFromAclW]
+ end;
+end;
+
+var
+ _GetEffectiveRightsFromAcl: Pointer;
+
+function GetEffectiveRightsFromAcl;
+begin
+ GetProcedureAddress(_GetEffectiveRightsFromAcl, aclapilib, 'GetEffectiveRightsFromAcl' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetEffectiveRightsFromAcl]
+ end;
+end;
+
+var
+ _GetAuditedPermissionsFromAclA: Pointer;
+
+function GetAuditedPermissionsFromAclA;
+begin
+ GetProcedureAddress(_GetAuditedPermissionsFromAclA, aclapilib, 'GetAuditedPermissionsFromAclA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetAuditedPermissionsFromAclA]
+ end;
+end;
+
+var
+ _GetAuditedPermissionsFromAclW: Pointer;
+
+function GetAuditedPermissionsFromAclW;
+begin
+ GetProcedureAddress(_GetAuditedPermissionsFromAclW, aclapilib, 'GetAuditedPermissionsFromAclW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetAuditedPermissionsFromAclW]
+ end;
+end;
+
+var
+ _GetAuditedPermissionsFromAcl: Pointer;
+
+function GetAuditedPermissionsFromAcl;
+begin
+ GetProcedureAddress(_GetAuditedPermissionsFromAcl, aclapilib, 'GetAuditedPermissionsFromAcl' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetAuditedPermissionsFromAcl]
+ end;
+end;
+
+var
+ _GetNamedSecurityInfoA: Pointer;
+
+function GetNamedSecurityInfoA;
+begin
+ GetProcedureAddress(_GetNamedSecurityInfoA, aclapilib, 'GetNamedSecurityInfoA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetNamedSecurityInfoA]
+ end;
+end;
+
+var
+ _GetNamedSecurityInfoW: Pointer;
+
+function GetNamedSecurityInfoW;
+begin
+ GetProcedureAddress(_GetNamedSecurityInfoW, aclapilib, 'GetNamedSecurityInfoW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetNamedSecurityInfoW]
+ end;
+end;
+
+var
+ _GetNamedSecurityInfo: Pointer;
+
+function GetNamedSecurityInfo;
+begin
+ GetProcedureAddress(_GetNamedSecurityInfo, aclapilib, 'GetNamedSecurityInfo' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetNamedSecurityInfo]
+ end;
+end;
+
+var
+ _GetSecurityInfo: Pointer;
+
+function GetSecurityInfo;
+begin
+ GetProcedureAddress(_GetSecurityInfo, aclapilib, 'GetSecurityInfo');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetSecurityInfo]
+ end;
+end;
+
+var
+ _SetNamedSecurityInfoA: Pointer;
+
+function SetNamedSecurityInfoA;
+begin
+ GetProcedureAddress(_SetNamedSecurityInfoA, aclapilib, 'SetNamedSecurityInfoA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetNamedSecurityInfoA]
+ end;
+end;
+
+var
+ _SetNamedSecurityInfoW: Pointer;
+
+function SetNamedSecurityInfoW;
+begin
+ GetProcedureAddress(_SetNamedSecurityInfoW, aclapilib, 'SetNamedSecurityInfoW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetNamedSecurityInfoW]
+ end;
+end;
+
+var
+ _SetNamedSecurityInfo: Pointer;
+
+function SetNamedSecurityInfo;
+begin
+ GetProcedureAddress(_SetNamedSecurityInfo, aclapilib, 'SetNamedSecurityInfo' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetNamedSecurityInfo]
+ end;
+end;
+
+var
+ _SetSecurityInfo: Pointer;
+
+function SetSecurityInfo;
+begin
+ GetProcedureAddress(_SetSecurityInfo, aclapilib, 'SetSecurityInfo');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetSecurityInfo]
+ end;
+end;
+
+var
+ _GetInheritanceSourceA: Pointer;
+
+function GetInheritanceSourceA;
+begin
+ GetProcedureAddress(_GetInheritanceSourceA, aclapilib, 'GetInheritanceSourceA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetInheritanceSourceA]
+ end;
+end;
+
+var
+ _GetInheritanceSourceW: Pointer;
+
+function GetInheritanceSourceW;
+begin
+ GetProcedureAddress(_GetInheritanceSourceW, aclapilib, 'GetInheritanceSourceW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetInheritanceSourceW]
+ end;
+end;
+
+var
+ _GetInheritanceSource: Pointer;
+
+function GetInheritanceSource;
+begin
+ GetProcedureAddress(_GetInheritanceSource, aclapilib, 'GetInheritanceSource' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetInheritanceSource]
+ end;
+end;
+
+var
+ _FreeInheritedFromArray: Pointer;
+
+function FreeInheritedFromArray;
+begin
+ GetProcedureAddress(_FreeInheritedFromArray, aclapilib, 'FreeInheritedFromArray');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_FreeInheritedFromArray]
+ end;
+end;
+
+var
+ _TreeResetNamedSecurityInfoA: Pointer;
+
+function TreeResetNamedSecurityInfoA;
+begin
+ GetProcedureAddress(_TreeResetNamedSecurityInfoA, aclapilib, 'TreeResetNamedSecurityInfoA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_TreeResetNamedSecurityInfoA]
+ end;
+end;
+
+var
+ _TreeResetNamedSecurityInfoW: Pointer;
+
+function TreeResetNamedSecurityInfoW;
+begin
+ GetProcedureAddress(_TreeResetNamedSecurityInfoW, aclapilib, 'TreeResetNamedSecurityInfoW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_TreeResetNamedSecurityInfoW]
+ end;
+end;
+
+var
+ _TreeResetNamedSecurityInfo: Pointer;
+
+function TreeResetNamedSecurityInfo;
+begin
+ GetProcedureAddress(_TreeResetNamedSecurityInfo, aclapilib, 'TreeResetNamedSecurityInfo' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_TreeResetNamedSecurityInfo]
+ end;
+end;
+
+var
+ _BuildSecurityDescriptorA: Pointer;
+
+function BuildSecurityDescriptorA;
+begin
+ GetProcedureAddress(_BuildSecurityDescriptorA, aclapilib, 'BuildSecurityDescriptorA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_BuildSecurityDescriptorA]
+ end;
+end;
+
+var
+ _BuildSecurityDescriptorW: Pointer;
+
+function BuildSecurityDescriptorW;
+begin
+ GetProcedureAddress(_BuildSecurityDescriptorW, aclapilib, 'BuildSecurityDescriptorW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_BuildSecurityDescriptorW]
+ end;
+end;
+
+var
+ _BuildSecurityDescriptor: Pointer;
+
+function BuildSecurityDescriptor;
+begin
+ GetProcedureAddress(_BuildSecurityDescriptor, aclapilib, 'BuildSecurityDescriptor' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_BuildSecurityDescriptor]
+ end;
+end;
+
+var
+ _LookupSecurityDescriptorPartsA: Pointer;
+
+function LookupSecurityDescriptorPartsA;
+begin
+ GetProcedureAddress(_LookupSecurityDescriptorPartsA, aclapilib, 'LookupSecurityDescriptorPartsA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_LookupSecurityDescriptorPartsA]
+ end;
+end;
+
+var
+ _LookupSecurityDescriptorPartsW: Pointer;
+
+function LookupSecurityDescriptorPartsW;
+begin
+ GetProcedureAddress(_LookupSecurityDescriptorPartsW, aclapilib, 'LookupSecurityDescriptorPartsW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_LookupSecurityDescriptorPartsW]
+ end;
+end;
+
+var
+ _LookupSecurityDescriptorParts: Pointer;
+
+function LookupSecurityDescriptorParts;
+begin
+ GetProcedureAddress(_LookupSecurityDescriptorParts, aclapilib, 'LookupSecurityDescriptorParts' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_LookupSecurityDescriptorParts]
+ end;
+end;
+
+var
+ _BuildExplicitAccessWithNameA: Pointer;
+
+procedure BuildExplicitAccessWithNameA;
+begin
+ GetProcedureAddress(_BuildExplicitAccessWithNameA, aclapilib, 'BuildExplicitAccessWithNameA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_BuildExplicitAccessWithNameA]
+ end;
+end;
+
+var
+ _BuildExplicitAccessWithNameW: Pointer;
+
+procedure BuildExplicitAccessWithNameW;
+begin
+ GetProcedureAddress(_BuildExplicitAccessWithNameW, aclapilib, 'BuildExplicitAccessWithNameW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_BuildExplicitAccessWithNameW]
+ end;
+end;
+
+var
+ _BuildExplicitAccessWithName: Pointer;
+
+procedure BuildExplicitAccessWithName;
+begin
+ GetProcedureAddress(_BuildExplicitAccessWithName, aclapilib, 'BuildExplicitAccessWithName' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_BuildExplicitAccessWithName]
+ end;
+end;
+
+var
+ _BuildImpersonateExplAccWNA: Pointer;
+
+procedure BuildImpersonateExplicitAccessWithNameA;
+begin
+ GetProcedureAddress(_BuildImpersonateExplAccWNA, aclapilib, 'BuildImpersonateExplicitAccessWithNameA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_BuildImpersonateExplAccWNA]
+ end;
+end;
+
+var
+ _BuildImpersonateExplAccWNW: Pointer;
+
+procedure BuildImpersonateExplicitAccessWithNameW;
+begin
+ GetProcedureAddress(_BuildImpersonateExplAccWNW, aclapilib, 'BuildImpersonateExplicitAccessWithNameW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_BuildImpersonateExplAccWNW]
+ end;
+end;
+
+var
+ _BuildImpersonateExplAccWN: Pointer;
+
+procedure BuildImpersonateExplicitAccessWithName;
+begin
+ GetProcedureAddress(_BuildImpersonateExplAccWN, aclapilib, 'BuildImpersonateExplicitAccessWithName' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_BuildImpersonateExplAccWN]
+ end;
+end;
+
+var
+ _BuildTrusteeWithNameA: Pointer;
+
+procedure BuildTrusteeWithNameA;
+begin
+ GetProcedureAddress(_BuildTrusteeWithNameA, aclapilib, 'BuildTrusteeWithNameA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_BuildTrusteeWithNameA]
+ end;
+end;
+
+var
+ _BuildTrusteeWithNameW: Pointer;
+
+procedure BuildTrusteeWithNameW;
+begin
+ GetProcedureAddress(_BuildTrusteeWithNameW, aclapilib, 'BuildTrusteeWithNameW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_BuildTrusteeWithNameW]
+ end;
+end;
+
+var
+ _BuildTrusteeWithName: Pointer;
+
+procedure BuildTrusteeWithName;
+begin
+ GetProcedureAddress(_BuildTrusteeWithName, aclapilib, 'BuildTrusteeWithName' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_BuildTrusteeWithName]
+ end;
+end;
+
+var
+ _BuildImpersonateTrusteeA: Pointer;
+
+procedure BuildImpersonateTrusteeA;
+begin
+ GetProcedureAddress(_BuildImpersonateTrusteeA, aclapilib, 'BuildImpersonateTrusteeA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_BuildImpersonateTrusteeA]
+ end;
+end;
+
+var
+ _BuildImpersonateTrusteeW: Pointer;
+
+procedure BuildImpersonateTrusteeW;
+begin
+ GetProcedureAddress(_BuildImpersonateTrusteeW, aclapilib, 'BuildImpersonateTrusteeW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_BuildImpersonateTrusteeW]
+ end;
+end;
+
+var
+ _BuildImpersonateTrustee: Pointer;
+
+procedure BuildImpersonateTrustee;
+begin
+ GetProcedureAddress(_BuildImpersonateTrustee, aclapilib, 'BuildImpersonateTrustee' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_BuildImpersonateTrustee]
+ end;
+end;
+
+var
+ _BuildTrusteeWithSidA: Pointer;
+
+procedure BuildTrusteeWithSidA;
+begin
+ GetProcedureAddress(_BuildTrusteeWithSidA, aclapilib, 'BuildTrusteeWithSidA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_BuildTrusteeWithSidA]
+ end;
+end;
+
+var
+ _BuildTrusteeWithSidW: Pointer;
+
+procedure BuildTrusteeWithSidW;
+begin
+ GetProcedureAddress(_BuildTrusteeWithSidW, aclapilib, 'BuildTrusteeWithSidW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_BuildTrusteeWithSidW]
+ end;
+end;
+
+var
+ _BuildTrusteeWithSid: Pointer;
+
+procedure BuildTrusteeWithSid;
+begin
+ GetProcedureAddress(_BuildTrusteeWithSid, aclapilib, 'BuildTrusteeWithSid' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_BuildTrusteeWithSid]
+ end;
+end;
+
+var
+ _BuildTrusteeWithObjectsAndSidA: Pointer;
+
+procedure BuildTrusteeWithObjectsAndSidA;
+begin
+ GetProcedureAddress(_BuildTrusteeWithObjectsAndSidA, aclapilib, 'BuildTrusteeWithObjectsAndSidA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_BuildTrusteeWithObjectsAndSidA]
+ end;
+end;
+
+var
+ _BuildTrusteeWithObjectsAndSidW: Pointer;
+
+procedure BuildTrusteeWithObjectsAndSidW;
+begin
+ GetProcedureAddress(_BuildTrusteeWithObjectsAndSidW, aclapilib, 'BuildTrusteeWithObjectsAndSidW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_BuildTrusteeWithObjectsAndSidW]
+ end;
+end;
+
+var
+ _BuildTrusteeWithObjectsAndSid: Pointer;
+
+procedure BuildTrusteeWithObjectsAndSid;
+begin
+ GetProcedureAddress(_BuildTrusteeWithObjectsAndSid, aclapilib, 'BuildTrusteeWithObjectsAndSid' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_BuildTrusteeWithObjectsAndSid]
+ end;
+end;
+
+var
+ _BuildTrusteeWithObjectsAndNameA: Pointer;
+
+procedure BuildTrusteeWithObjectsAndNameA;
+begin
+ GetProcedureAddress(_BuildTrusteeWithObjectsAndNameA, aclapilib, 'BuildTrusteeWithObjectsAndNameA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_BuildTrusteeWithObjectsAndNameA]
+ end;
+end;
+
+var
+ _BuildTrusteeWithObjectsAndNameW: Pointer;
+
+procedure BuildTrusteeWithObjectsAndNameW;
+begin
+ GetProcedureAddress(_BuildTrusteeWithObjectsAndNameW, aclapilib, 'BuildTrusteeWithObjectsAndNameW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_BuildTrusteeWithObjectsAndNameW]
+ end;
+end;
+
+var
+ _BuildTrusteeWithObjectsAndName: Pointer;
+
+procedure BuildTrusteeWithObjectsAndName;
+begin
+ GetProcedureAddress(_BuildTrusteeWithObjectsAndName, aclapilib, 'BuildTrusteeWithObjectsAndName' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_BuildTrusteeWithObjectsAndName]
+ end;
+end;
+
+var
+ _GetTrusteeNameA: Pointer;
+
+function GetTrusteeNameA;
+begin
+ GetProcedureAddress(_GetTrusteeNameA, aclapilib, 'GetTrusteeNameA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetTrusteeNameA]
+ end;
+end;
+
+var
+ _GetTrusteeNameW: Pointer;
+
+function GetTrusteeNameW;
+begin
+ GetProcedureAddress(_GetTrusteeNameW, aclapilib, 'GetTrusteeNameW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetTrusteeNameW]
+ end;
+end;
+
+var
+ _GetTrusteeName: Pointer;
+
+function GetTrusteeName;
+begin
+ GetProcedureAddress(_GetTrusteeName, aclapilib, 'GetTrusteeName' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetTrusteeName]
+ end;
+end;
+
+var
+ _GetTrusteeTypeA: Pointer;
+
+function GetTrusteeTypeA;
+begin
+ GetProcedureAddress(_GetTrusteeTypeA, aclapilib, 'GetTrusteeTypeA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetTrusteeTypeA]
+ end;
+end;
+
+var
+ _GetTrusteeTypeW: Pointer;
+
+function GetTrusteeTypeW;
+begin
+ GetProcedureAddress(_GetTrusteeTypeW, aclapilib, 'GetTrusteeTypeW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetTrusteeTypeW]
+ end;
+end;
+
+var
+ _GetTrusteeType: Pointer;
+
+function GetTrusteeType;
+begin
+ GetProcedureAddress(_GetTrusteeType, aclapilib, 'GetTrusteeType' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetTrusteeType]
+ end;
+end;
+
+var
+ _GetTrusteeFormA: Pointer;
+
+function GetTrusteeFormA;
+begin
+ GetProcedureAddress(_GetTrusteeFormA, aclapilib, 'GetTrusteeFormA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetTrusteeFormA]
+ end;
+end;
+
+var
+ _GetTrusteeFormW: Pointer;
+
+function GetTrusteeFormW;
+begin
+ GetProcedureAddress(_GetTrusteeFormW, aclapilib, 'GetTrusteeFormW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetTrusteeFormW]
+ end;
+end;
+
+var
+ _GetTrusteeForm: Pointer;
+
+function GetTrusteeForm;
+begin
+ GetProcedureAddress(_GetTrusteeForm, aclapilib, 'GetTrusteeForm' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetTrusteeForm]
+ end;
+end;
+
+var
+ _GetMultipleTrusteeOperationA: Pointer;
+
+function GetMultipleTrusteeOperationA;
+begin
+ GetProcedureAddress(_GetMultipleTrusteeOperationA, aclapilib, 'GetMultipleTrusteeOperationA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetMultipleTrusteeOperationA]
+ end;
+end;
+
+var
+ _GetMultipleTrusteeOperationW: Pointer;
+
+function GetMultipleTrusteeOperationW;
+begin
+ GetProcedureAddress(_GetMultipleTrusteeOperationW, aclapilib, 'GetMultipleTrusteeOperationW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetMultipleTrusteeOperationW]
+ end;
+end;
+
+var
+ _GetMultipleTrusteeOperation: Pointer;
+
+function GetMultipleTrusteeOperation;
+begin
+ GetProcedureAddress(_GetMultipleTrusteeOperation, aclapilib, 'GetMultipleTrusteeOperation' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetMultipleTrusteeOperation]
+ end;
+end;
+
+var
+ _GetMultipleTrusteeA: Pointer;
+
+function GetMultipleTrusteeA;
+begin
+ GetProcedureAddress(_GetMultipleTrusteeA, aclapilib, 'GetMultipleTrusteeA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetMultipleTrusteeA]
+ end;
+end;
+
+var
+ _GetMultipleTrusteeW: Pointer;
+
+function GetMultipleTrusteeW;
+begin
+ GetProcedureAddress(_GetMultipleTrusteeW, aclapilib, 'GetMultipleTrusteeW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetMultipleTrusteeW]
+ end;
+end;
+
+var
+ _GetMultipleTrustee: Pointer;
+
+function GetMultipleTrustee;
+begin
+ GetProcedureAddress(_GetMultipleTrustee, aclapilib, 'GetMultipleTrustee' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetMultipleTrustee]
+ end;
+end;
+
+{$ELSE}
+
+function SetEntriesInAclA; external aclapilib name 'SetEntriesInAclA';
+function SetEntriesInAclW; external aclapilib name 'SetEntriesInAclW';
+function SetEntriesInAcl; external aclapilib name 'SetEntriesInAcl' + AWSuffix;
+function GetExplicitEntriesFromAclA; external aclapilib name 'GetExplicitEntriesFromAclA';
+function GetExplicitEntriesFromAclW; external aclapilib name 'GetExplicitEntriesFromAclW';
+function GetExplicitEntriesFromAcl; external aclapilib name 'GetExplicitEntriesFromAcl' + AWSuffix;
+function GetEffectiveRightsFromAclA; external aclapilib name 'GetEffectiveRightsFromAclA';
+function GetEffectiveRightsFromAclW; external aclapilib name 'GetEffectiveRightsFromAclW';
+function GetEffectiveRightsFromAcl; external aclapilib name 'GetEffectiveRightsFromAcl' + AWSuffix;
+function GetAuditedPermissionsFromAclA; external aclapilib name 'GetAuditedPermissionsFromAclA';
+function GetAuditedPermissionsFromAclW; external aclapilib name 'GetAuditedPermissionsFromAclW';
+function GetAuditedPermissionsFromAcl; external aclapilib name 'GetAuditedPermissionsFromAcl' + AWSuffix;
+function GetNamedSecurityInfoA; external aclapilib name 'GetNamedSecurityInfoA';
+function GetNamedSecurityInfoW; external aclapilib name 'GetNamedSecurityInfoW';
+function GetNamedSecurityInfo; external aclapilib name 'GetNamedSecurityInfo' + AWSuffix;
+function GetSecurityInfo; external aclapilib name 'GetSecurityInfo';
+function SetNamedSecurityInfoA; external aclapilib name 'SetNamedSecurityInfoA';
+function SetNamedSecurityInfoW; external aclapilib name 'SetNamedSecurityInfoW';
+function SetNamedSecurityInfo; external aclapilib name 'SetNamedSecurityInfo' + AWSuffix;
+function SetSecurityInfo; external aclapilib name 'SetSecurityInfo';
+function GetInheritanceSourceA; external aclapilib name 'GetInheritanceSourceA';
+function GetInheritanceSourceW; external aclapilib name 'GetInheritanceSourceW';
+function GetInheritanceSource; external aclapilib name 'GetInheritanceSource' + AWSuffix;
+function FreeInheritedFromArray; external aclapilib name 'FreeInheritedFromArray';
+function TreeResetNamedSecurityInfoA; external aclapilib name 'TreeResetNamedSecurityInfoA';
+function TreeResetNamedSecurityInfoW; external aclapilib name 'TreeResetNamedSecurityInfoW';
+function TreeResetNamedSecurityInfo; external aclapilib name 'TreeResetNamedSecurityInfo' + AWSuffix;
+function BuildSecurityDescriptorA; external aclapilib name 'BuildSecurityDescriptorA';
+function BuildSecurityDescriptorW; external aclapilib name 'BuildSecurityDescriptorW';
+function BuildSecurityDescriptor; external aclapilib name 'BuildSecurityDescriptor' + AWSuffix;
+function LookupSecurityDescriptorPartsA; external aclapilib name 'LookupSecurityDescriptorPartsA';
+function LookupSecurityDescriptorPartsW; external aclapilib name 'LookupSecurityDescriptorPartsW';
+function LookupSecurityDescriptorParts; external aclapilib name 'LookupSecurityDescriptorParts' + AWSuffix;
+procedure BuildExplicitAccessWithNameA; external aclapilib name 'BuildExplicitAccessWithNameA';
+procedure BuildExplicitAccessWithNameW; external aclapilib name 'BuildExplicitAccessWithNameW';
+procedure BuildExplicitAccessWithName; external aclapilib name 'BuildExplicitAccessWithName' + AWSuffix;
+procedure BuildImpersonateExplicitAccessWithNameA; external aclapilib name 'BuildImpersonateExplicitAccessWithNameA';
+procedure BuildImpersonateExplicitAccessWithNameW; external aclapilib name 'BuildImpersonateExplicitAccessWithNameW';
+procedure BuildImpersonateExplicitAccessWithName; external aclapilib name 'BuildImpersonateExplicitAccessWithName' + AWSuffix;
+procedure BuildTrusteeWithNameA; external aclapilib name 'BuildTrusteeWithNameA';
+procedure BuildTrusteeWithNameW; external aclapilib name 'BuildTrusteeWithNameW';
+procedure BuildTrusteeWithName; external aclapilib name 'BuildTrusteeWithName' + AWSuffix;
+procedure BuildImpersonateTrusteeA; external aclapilib name 'BuildImpersonateTrusteeA';
+procedure BuildImpersonateTrusteeW; external aclapilib name 'BuildImpersonateTrusteeW';
+procedure BuildImpersonateTrustee; external aclapilib name 'BuildImpersonateTrustee' + AWSuffix;
+procedure BuildTrusteeWithSidA; external aclapilib name 'BuildTrusteeWithSidA';
+procedure BuildTrusteeWithSidW; external aclapilib name 'BuildTrusteeWithSidW';
+procedure BuildTrusteeWithSid; external aclapilib name 'BuildTrusteeWithSid' + AWSuffix;
+procedure BuildTrusteeWithObjectsAndSidA; external aclapilib name 'BuildTrusteeWithObjectsAndSidA';
+procedure BuildTrusteeWithObjectsAndSidW; external aclapilib name 'BuildTrusteeWithObjectsAndSidW';
+procedure BuildTrusteeWithObjectsAndSid; external aclapilib name 'BuildTrusteeWithObjectsAndSid' + AWSuffix;
+procedure BuildTrusteeWithObjectsAndNameA; external aclapilib name 'BuildTrusteeWithObjectsAndNameA';
+procedure BuildTrusteeWithObjectsAndNameW; external aclapilib name 'BuildTrusteeWithObjectsAndNameW';
+procedure BuildTrusteeWithObjectsAndName; external aclapilib name 'BuildTrusteeWithObjectsAndName' + AWSuffix;
+function GetTrusteeNameA; external aclapilib name 'GetTrusteeNameA';
+function GetTrusteeNameW; external aclapilib name 'GetTrusteeNameW';
+function GetTrusteeName; external aclapilib name 'GetTrusteeName' + AWSuffix;
+function GetTrusteeTypeA; external aclapilib name 'GetTrusteeTypeA';
+function GetTrusteeTypeW; external aclapilib name 'GetTrusteeTypeW';
+function GetTrusteeType; external aclapilib name 'GetTrusteeType' + AWSuffix;
+function GetTrusteeFormA; external aclapilib name 'GetTrusteeFormA';
+function GetTrusteeFormW; external aclapilib name 'GetTrusteeFormW';
+function GetTrusteeForm; external aclapilib name 'GetTrusteeForm' + AWSuffix;
+function GetMultipleTrusteeOperationA; external aclapilib name 'GetMultipleTrusteeOperationA';
+function GetMultipleTrusteeOperationW; external aclapilib name 'GetMultipleTrusteeOperationW';
+function GetMultipleTrusteeOperation; external aclapilib name 'GetMultipleTrusteeOperation' + AWSuffix;
+function GetMultipleTrusteeA; external aclapilib name 'GetMultipleTrusteeA';
+function GetMultipleTrusteeW; external aclapilib name 'GetMultipleTrusteeW';
+function GetMultipleTrustee; external aclapilib name 'GetMultipleTrustee' + AWSuffix;
+
+{$ENDIF DYNAMIC_LINK}
+
+end.
diff --git a/packages/extra/winunits/jwaaclui.pas b/packages/extra/winunits/jwaaclui.pas
index b8b3caf8ee..9de59dbf80 100644
--- a/packages/extra/winunits/jwaaclui.pas
+++ b/packages/extra/winunits/jwaaclui.pas
@@ -1,374 +1,374 @@
-{******************************************************************************}
-{ }
-{ Access Control UI API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: aclui.h, released June 2000. The original Pascal }
-{ code is: AclUI.pas, released December 2000. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwaaclui.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaAclUI;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "aclui.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaAccCtrl, JwaWinNT, JwaWinUser, JwaWinType;
-
-//
-// ISecurityInformation interface
-//
-// Methods:
-//
-// GetObjectInformation - Allows UI to determine type of object being
-// edited. Also allows determining if object is a container.
-//
-// GetSecurity - Allows retrieving of ACLs from the original object
-// NOTE: ACLUI will LocalFree the security descriptor
-// returned by GetSecurity.
-// SetSecurity - Allows setting of the ACLs on the original object
-//
-// GetAccessRights - For retrieving the list of rights allowed
-// on this object.
-//
-// MapGeneric - For mapping generic rights to standard & specific rights
-//
-// GetInheritTypes - For retrieving the list of possible sub-object types
-// for a container.
-//
-// PropertySheetCallback - A method which is called back during the various
-// security UI property pages so that specialized work can be
-// done. Similar to PropSheetPageProc. If uMsg == PSPCB_CREATE,
-// then any error return value other than E_NOTIMPL will abort
-// the creation of that page. The type of page being created or
-// destroyed is indicated by the uPage parameter.
-//
-
-type
- PSI_OBJECT_INFO = ^SI_OBJECT_INFO;
- {$EXTERNALSYM PSI_OBJECT_INFO}
- _SI_OBJECT_INFO = record
- dwFlags: DWORD;
- hInstance: HINSTANCE; // resources (e.g. strings) reside here
- pszServerName: LPWSTR; // must be present
- pszObjectName: LPWSTR; // must be present
- pszPageTitle: LPWSTR; // only valid if SI_PAGE_TITLE is set
- guidObjectType: GUID; // only valid if SI_OBJECT_GUID is set
- end;
- {$EXTERNALSYM _SI_OBJECT_INFO}
- SI_OBJECT_INFO = _SI_OBJECT_INFO;
- {$EXTERNALSYM SI_OBJECT_INFO}
- TSiObjectInfo = SI_OBJECT_INFO;
- PSiObjectInfo = PSI_OBJECT_INFO;
-
-// SI_OBJECT_INFO flags
-
-const
- SI_EDIT_PERMS = $00000000; // always implied
- {$EXTERNALSYM SI_EDIT_PERMS}
- SI_EDIT_OWNER = $00000001;
- {$EXTERNALSYM SI_EDIT_OWNER}
- SI_EDIT_AUDITS = $00000002;
- {$EXTERNALSYM SI_EDIT_AUDITS}
- SI_CONTAINER = $00000004;
- {$EXTERNALSYM SI_CONTAINER}
- SI_READONLY = $00000008;
- {$EXTERNALSYM SI_READONLY}
- SI_ADVANCED = $00000010;
- {$EXTERNALSYM SI_ADVANCED}
- SI_RESET = $00000020; // equals to SI_RESET_DACL|SI_RESET_SACL|SI_RESET_OWNER
- {$EXTERNALSYM SI_RESET}
- SI_OWNER_READONLY = $00000040;
- {$EXTERNALSYM SI_OWNER_READONLY}
- SI_EDIT_PROPERTIES = $00000080;
- {$EXTERNALSYM SI_EDIT_PROPERTIES}
- SI_OWNER_RECURSE = $00000100;
- {$EXTERNALSYM SI_OWNER_RECURSE}
- SI_NO_ACL_PROTECT = $00000200;
- {$EXTERNALSYM SI_NO_ACL_PROTECT}
- SI_NO_TREE_APPLY = $00000400;
- {$EXTERNALSYM SI_NO_TREE_APPLY}
- SI_PAGE_TITLE = $00000800;
- {$EXTERNALSYM SI_PAGE_TITLE}
- SI_SERVER_IS_DC = $00001000;
- {$EXTERNALSYM SI_SERVER_IS_DC}
- SI_RESET_DACL_TREE = $00004000;
- {$EXTERNALSYM SI_RESET_DACL_TREE}
- SI_RESET_SACL_TREE = $00008000;
- {$EXTERNALSYM SI_RESET_SACL_TREE}
- SI_OBJECT_GUID = $00010000;
- {$EXTERNALSYM SI_OBJECT_GUID}
- SI_EDIT_EFFECTIVE = $00020000;
- {$EXTERNALSYM SI_EDIT_EFFECTIVE}
- SI_RESET_DACL = $00040000;
- {$EXTERNALSYM SI_RESET_DACL}
- SI_RESET_SACL = $00080000;
- {$EXTERNALSYM SI_RESET_SACL}
- SI_RESET_OWNER = $00100000;
- {$EXTERNALSYM SI_RESET_OWNER}
- SI_NO_ADDITIONAL_PERMISSION = $00200000;
- {$EXTERNALSYM SI_NO_ADDITIONAL_PERMISSION}
- SI_MAY_WRITE = $10000000; //not sure if user can write permission
- {$EXTERNALSYM SI_MAY_WRITE}
-
- SI_EDIT_ALL = SI_EDIT_PERMS or SI_EDIT_OWNER or SI_EDIT_AUDITS;
- {$EXTERNALSYM SI_EDIT_ALL}
-
-type
- PSI_ACCESS = ^SI_ACCESS;
- {$EXTERNALSYM PSI_ACCESS}
- _SI_ACCESS = record
- pguid: LPGUID;
- mask: ACCESS_MASK;
- pszName: LPCWSTR; // may be resource ID
- dwFlags: DWORD;
- end;
- {$EXTERNALSYM _SI_ACCESS}
- SI_ACCESS = _SI_ACCESS;
- {$EXTERNALSYM SI_ACCESS}
- TSiAccess = SI_ACCESS;
- PSiAccess = PSI_ACCESS;
-
-// SI_ACCESS flags
-
-const
- SI_ACCESS_SPECIFIC = $00010000;
- {$EXTERNALSYM SI_ACCESS_SPECIFIC}
- SI_ACCESS_GENERAL = $00020000;
- {$EXTERNALSYM SI_ACCESS_GENERAL}
- SI_ACCESS_CONTAINER = $00040000; // general access, container-only
- {$EXTERNALSYM SI_ACCESS_CONTAINER}
- SI_ACCESS_PROPERTY = $00080000;
- {$EXTERNALSYM SI_ACCESS_PROPERTY}
-
-// ACE inheritance flags (CONTAINER_INHERIT_ACE, etc.) may also be set.
-// They will be used as the inheritance when an access is turned on.
-
-type
- PSI_INHERIT_TYPE = ^SI_INHERIT_TYPE;
- {$EXTERNALSYM PSI_INHERIT_TYPE}
- _SI_INHERIT_TYPE = record
- pguid: LPGUID;
- dwFlags: ULONG;
- pszName: LPCWSTR; // may be resource ID
- end;
- {$EXTERNALSYM _SI_INHERIT_TYPE}
- SI_INHERIT_TYPE = _SI_INHERIT_TYPE;
- {$EXTERNALSYM SI_INHERIT_TYPE}
- TSiInheritType = SI_INHERIT_TYPE;
- PSiInheritType = PSI_INHERIT_TYPE;
-
-// SI_INHERIT_TYPE flags are a combination of INHERIT_ONLY_ACE,
-// CONTAINER_INHERIT_ACE, and OBJECT_INHERIT_ACE.
-
- _SI_PAGE_TYPE = (SI_PAGE_PERM, SI_PAGE_ADVPERM, SI_PAGE_AUDIT, SI_PAGE_OWNER, SI_PAGE_EFFECTIVE);
- {$EXTERNALSYM _SI_PAGE_TYPE}
- SI_PAGE_TYPE = _SI_PAGE_TYPE;
- {$EXTERNALSYM SI_PAGE_TYPE}
- TSiPageType = _SI_PAGE_TYPE;
-
-// Message to PropertySheetPageCallback (in addition to
-// PSPCB_CREATE and PSPCB_RELEASE)
-
-const
- PSPCB_SI_INITDIALOG = WM_USER + 1;
- {$EXTERNALSYM PSPCB_SI_INITDIALOG}
-
-const
- IID_ISecurityInformation: GUID = (
- D1:$965fc360; D2:$16ff; D3:$11d0; D4:($91, $cb, $0, $aa, $0, $bb, $b7, $23));
- {$EXTERNALSYM IID_ISecurityInformation}
- IID_ISecurityInformation2: GUID = (
- D1:$c3ccfdb4; D2:$6f88; D3:$11d2; D4:($a3, $ce, $0, $c0, $4f, $b1, $78, $2a));
- {$EXTERNALSYM IID_ISecurityInformation2}
-
- SID_ISecurityInformation = '{965FC360-16FF-11d0-91CB-00AA00BBB723}';
- SID_ISecurityInformation2 = '{c3ccfdb4-6f88-11d2-a3ce-00c04fb1782a}';
-
-type
- ISecurityInformation = interface(IUnknown)
- [SID_ISecurityInformation]
- function GetObjectInformation(out pObjectInfo: SI_OBJECT_INFO): HRESULT; stdcall;
- function GetSecurity(RequestedInformation: SECURITY_INFORMATION;
- out ppSecurityDescriptor: PSECURITY_DESCRIPTOR; fDefault: BOOL): HRESULT; stdcall;
- function SetSecurity(SecurityInformation: SECURITY_INFORMATION;
- pSecurityDescriptor: PSECURITY_DESCRIPTOR): HRESULT; stdcall;
- function GetAccessRights(pguidObjectType: LPGUID; dwFlags: DWORD;
- out ppAccess: PSI_ACCESS; out pcAccesses, piDefaultAccess: ULONG): HRESULT; stdcall;
- function MapGeneric(pguidObjectType: LPGUID; pAceFlags: PUCHAR;
- pMask: PACCESS_MASK): HRESULT; stdcall;
- function GetInheritTypes(out ppInheritTypes: PSI_INHERIT_TYPE;
- out pcInheritTypes: ULONG): HRESULT; stdcall;
- function PropertySheetPageCallback(hwnd: HWND; uMsg: UINT;
- uPage: SI_PAGE_TYPE): HRESULT; stdcall;
- end;
- {$EXTERNALSYM ISecurityInformation}
-
- LPSECURITYINFO = ISecurityInformation;
- {$EXTERNALSYM LPSECURITYINFO}
-
- ISecurityInformation2 = interface(IUnknown)
- [SID_ISecurityInformation]
- function IsDaclCanonical(pDacl: PACL): BOOL; stdcall;
- function LookupSids(cSids: ULONG; rgpSids: PPSID;
- out ppdo: Pointer{*LPDATAOBJECT}): HRESULT; stdcall;
- end;
- {$EXTERNALSYM ISecurityInformation2}
-
- LPSECURITYINFO2 = ISecurityInformation2;
- {$EXTERNALSYM LPSECURITYINFO2}
-
-// HGLOBAL containing SID_INFO_LIST returned by ISecurityInformation2::LookupSids
-
-const
- CFSTR_ACLUI_SID_INFO_LIST = 'CFSTR_ACLUI_SID_INFO_LIST';
- {$EXTERNALSYM CFSTR_ACLUI_SID_INFO_LIST}
-
-// Data structures corresponding to CFSTR_ACLUI_SID_INFO_LIST
-
-type
- PSID_INFO = ^SID_INFO;
- {$EXTERNALSYM PSID_INFO}
- _SID_INFO = record
- pSid: PSID;
- pwzCommonName: PWSTR;
- pwzClass: PWSTR; // Used for selecting icon, e.g. "User" or "Group"
- pwzUPN: PWSTR; // Optional, may be NULL
- end;
- {$EXTERNALSYM _SID_INFO}
- SID_INFO = _SID_INFO;
- {$EXTERNALSYM SID_INFO}
- TSidInfo = SID_INFO;
- PSidInfo = PSID_INFO;
-
- PSID_INFO_LIST = ^SID_INFO_LIST;
- {$EXTERNALSYM PSID_INFO_LIST}
- _SID_INFO_LIST = record
- cItems: ULONG;
- aSidInfo: array [0..ANYSIZE_ARRAY - 1] of SID_INFO;
- end;
- {$EXTERNALSYM _SID_INFO_LIST}
- SID_INFO_LIST = _SID_INFO_LIST;
- {$EXTERNALSYM SID_INFO_LIST}
- TSidInfoList = SID_INFO_LIST;
- PSidInfoList = PSID_INFO_LIST;
-
-const
- IID_IEffectivePermission: TGUID = '{3853DC76-9F35-407c-88A1-D19344365FBC}';
- {$EXTERNALSYM IID_IEffectivePermission}
- IID_ISecurityObjectTypeInfo: TGUID = '{fc3066eb-79ef-444b-9111-d18a75ebf2fa}';
- {$EXTERNALSYM IID_ISecurityObjectTypeInfo}
-
-type
- IEffectivePermission = interface(IUnknown)
- ['{3853DC76-9F35-407c-88A1-D19344365FBC}']
- function GetEffectivePermission(const pguidObjectType: TGUID; pUserSid: PSID;
- pszServerName: LPCWSTR; pSD: PSECURITY_DESCRIPTOR; var ppObjectTypeList: POBJECT_TYPE_LIST;
- var pcObjectTypeListLength: ULONG; var ppGrantedAccessList: PACCESS_MASK;
- var pcGrantedAccessListLength: ULONG): HRESULT; stdcall;
- end;
- {$EXTERNALSYM IEffectivePermission}
- LPEFFECTIVEPERMISSION = IEffectivePermission;
- {$EXTERNALSYM LPEFFECTIVEPERMISSION}
-
- ISecurityObjectTypeInfo = interface(IUnknown)
- ['{fc3066eb-79ef-444b-9111-d18a75ebf2fa}']
- function GetInheritSource(si: SECURITY_INFORMATION; pACL: PACL;
- var ppInheritArray: PINHERITED_FROM): HRESULT; stdcall;
- end;
- {$EXTERNALSYM ISecurityObjectTypeInfo}
- LPSecurityObjectTypeInfo = ISecurityObjectTypeInfo;
- {$EXTERNALSYM LPSecurityObjectTypeInfo}
-
-type
- HPROPSHEETPAGE = Pointer;
- {$EXTERNALSYM HPROPSHEETPAGE}
-
-function CreateSecurityPage(psi: LPSECURITYINFO): HPROPSHEETPAGE; stdcall;
-{$EXTERNALSYM CreateSecurityPage}
-function EditSecurity(hwndOwner: HWND; psi: LPSECURITYINFO): BOOL; stdcall;
-{$EXTERNALSYM EditSecurity}
-
-implementation
-
-const
- acluilib = 'aclui.dll';
-
-{$IFDEF DYNAMIC_LINK}
-
-var
- _CreateSecurityPage: Pointer;
-
-function CreateSecurityPage;
-begin
- GetProcedureAddress(_CreateSecurityPage, acluilib, 'CreateSecurityPage');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreateSecurityPage]
- end;
-end;
-
-var
- _EditSecurity: Pointer;
-
-function EditSecurity;
-begin
- GetProcedureAddress(_EditSecurity, acluilib, 'EditSecurity');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_EditSecurity]
- end;
-end;
-
-{$ELSE}
-
-function CreateSecurityPage; external acluilib name 'CreateSecurityPage';
-function EditSecurity; external acluilib name 'EditSecurity';
-
-{$ENDIF DYNAMIC_LINK}
-
-end.
+{******************************************************************************}
+{ }
+{ Access Control UI API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: aclui.h, released June 2000. The original Pascal }
+{ code is: AclUI.pas, released December 2000. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwaaclui.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaAclUI;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "aclui.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaAccCtrl, JwaWinNT, JwaWinUser, JwaWinType;
+
+//
+// ISecurityInformation interface
+//
+// Methods:
+//
+// GetObjectInformation - Allows UI to determine type of object being
+// edited. Also allows determining if object is a container.
+//
+// GetSecurity - Allows retrieving of ACLs from the original object
+// NOTE: ACLUI will LocalFree the security descriptor
+// returned by GetSecurity.
+// SetSecurity - Allows setting of the ACLs on the original object
+//
+// GetAccessRights - For retrieving the list of rights allowed
+// on this object.
+//
+// MapGeneric - For mapping generic rights to standard & specific rights
+//
+// GetInheritTypes - For retrieving the list of possible sub-object types
+// for a container.
+//
+// PropertySheetCallback - A method which is called back during the various
+// security UI property pages so that specialized work can be
+// done. Similar to PropSheetPageProc. If uMsg == PSPCB_CREATE,
+// then any error return value other than E_NOTIMPL will abort
+// the creation of that page. The type of page being created or
+// destroyed is indicated by the uPage parameter.
+//
+
+type
+ PSI_OBJECT_INFO = ^SI_OBJECT_INFO;
+ {$EXTERNALSYM PSI_OBJECT_INFO}
+ _SI_OBJECT_INFO = record
+ dwFlags: DWORD;
+ hInstance: HINSTANCE; // resources (e.g. strings) reside here
+ pszServerName: LPWSTR; // must be present
+ pszObjectName: LPWSTR; // must be present
+ pszPageTitle: LPWSTR; // only valid if SI_PAGE_TITLE is set
+ guidObjectType: GUID; // only valid if SI_OBJECT_GUID is set
+ end;
+ {$EXTERNALSYM _SI_OBJECT_INFO}
+ SI_OBJECT_INFO = _SI_OBJECT_INFO;
+ {$EXTERNALSYM SI_OBJECT_INFO}
+ TSiObjectInfo = SI_OBJECT_INFO;
+ PSiObjectInfo = PSI_OBJECT_INFO;
+
+// SI_OBJECT_INFO flags
+
+const
+ SI_EDIT_PERMS = $00000000; // always implied
+ {$EXTERNALSYM SI_EDIT_PERMS}
+ SI_EDIT_OWNER = $00000001;
+ {$EXTERNALSYM SI_EDIT_OWNER}
+ SI_EDIT_AUDITS = $00000002;
+ {$EXTERNALSYM SI_EDIT_AUDITS}
+ SI_CONTAINER = $00000004;
+ {$EXTERNALSYM SI_CONTAINER}
+ SI_READONLY = $00000008;
+ {$EXTERNALSYM SI_READONLY}
+ SI_ADVANCED = $00000010;
+ {$EXTERNALSYM SI_ADVANCED}
+ SI_RESET = $00000020; // equals to SI_RESET_DACL|SI_RESET_SACL|SI_RESET_OWNER
+ {$EXTERNALSYM SI_RESET}
+ SI_OWNER_READONLY = $00000040;
+ {$EXTERNALSYM SI_OWNER_READONLY}
+ SI_EDIT_PROPERTIES = $00000080;
+ {$EXTERNALSYM SI_EDIT_PROPERTIES}
+ SI_OWNER_RECURSE = $00000100;
+ {$EXTERNALSYM SI_OWNER_RECURSE}
+ SI_NO_ACL_PROTECT = $00000200;
+ {$EXTERNALSYM SI_NO_ACL_PROTECT}
+ SI_NO_TREE_APPLY = $00000400;
+ {$EXTERNALSYM SI_NO_TREE_APPLY}
+ SI_PAGE_TITLE = $00000800;
+ {$EXTERNALSYM SI_PAGE_TITLE}
+ SI_SERVER_IS_DC = $00001000;
+ {$EXTERNALSYM SI_SERVER_IS_DC}
+ SI_RESET_DACL_TREE = $00004000;
+ {$EXTERNALSYM SI_RESET_DACL_TREE}
+ SI_RESET_SACL_TREE = $00008000;
+ {$EXTERNALSYM SI_RESET_SACL_TREE}
+ SI_OBJECT_GUID = $00010000;
+ {$EXTERNALSYM SI_OBJECT_GUID}
+ SI_EDIT_EFFECTIVE = $00020000;
+ {$EXTERNALSYM SI_EDIT_EFFECTIVE}
+ SI_RESET_DACL = $00040000;
+ {$EXTERNALSYM SI_RESET_DACL}
+ SI_RESET_SACL = $00080000;
+ {$EXTERNALSYM SI_RESET_SACL}
+ SI_RESET_OWNER = $00100000;
+ {$EXTERNALSYM SI_RESET_OWNER}
+ SI_NO_ADDITIONAL_PERMISSION = $00200000;
+ {$EXTERNALSYM SI_NO_ADDITIONAL_PERMISSION}
+ SI_MAY_WRITE = $10000000; //not sure if user can write permission
+ {$EXTERNALSYM SI_MAY_WRITE}
+
+ SI_EDIT_ALL = SI_EDIT_PERMS or SI_EDIT_OWNER or SI_EDIT_AUDITS;
+ {$EXTERNALSYM SI_EDIT_ALL}
+
+type
+ PSI_ACCESS = ^SI_ACCESS;
+ {$EXTERNALSYM PSI_ACCESS}
+ _SI_ACCESS = record
+ pguid: LPGUID;
+ mask: ACCESS_MASK;
+ pszName: LPCWSTR; // may be resource ID
+ dwFlags: DWORD;
+ end;
+ {$EXTERNALSYM _SI_ACCESS}
+ SI_ACCESS = _SI_ACCESS;
+ {$EXTERNALSYM SI_ACCESS}
+ TSiAccess = SI_ACCESS;
+ PSiAccess = PSI_ACCESS;
+
+// SI_ACCESS flags
+
+const
+ SI_ACCESS_SPECIFIC = $00010000;
+ {$EXTERNALSYM SI_ACCESS_SPECIFIC}
+ SI_ACCESS_GENERAL = $00020000;
+ {$EXTERNALSYM SI_ACCESS_GENERAL}
+ SI_ACCESS_CONTAINER = $00040000; // general access, container-only
+ {$EXTERNALSYM SI_ACCESS_CONTAINER}
+ SI_ACCESS_PROPERTY = $00080000;
+ {$EXTERNALSYM SI_ACCESS_PROPERTY}
+
+// ACE inheritance flags (CONTAINER_INHERIT_ACE, etc.) may also be set.
+// They will be used as the inheritance when an access is turned on.
+
+type
+ PSI_INHERIT_TYPE = ^SI_INHERIT_TYPE;
+ {$EXTERNALSYM PSI_INHERIT_TYPE}
+ _SI_INHERIT_TYPE = record
+ pguid: LPGUID;
+ dwFlags: ULONG;
+ pszName: LPCWSTR; // may be resource ID
+ end;
+ {$EXTERNALSYM _SI_INHERIT_TYPE}
+ SI_INHERIT_TYPE = _SI_INHERIT_TYPE;
+ {$EXTERNALSYM SI_INHERIT_TYPE}
+ TSiInheritType = SI_INHERIT_TYPE;
+ PSiInheritType = PSI_INHERIT_TYPE;
+
+// SI_INHERIT_TYPE flags are a combination of INHERIT_ONLY_ACE,
+// CONTAINER_INHERIT_ACE, and OBJECT_INHERIT_ACE.
+
+ _SI_PAGE_TYPE = (SI_PAGE_PERM, SI_PAGE_ADVPERM, SI_PAGE_AUDIT, SI_PAGE_OWNER, SI_PAGE_EFFECTIVE);
+ {$EXTERNALSYM _SI_PAGE_TYPE}
+ SI_PAGE_TYPE = _SI_PAGE_TYPE;
+ {$EXTERNALSYM SI_PAGE_TYPE}
+ TSiPageType = _SI_PAGE_TYPE;
+
+// Message to PropertySheetPageCallback (in addition to
+// PSPCB_CREATE and PSPCB_RELEASE)
+
+const
+ PSPCB_SI_INITDIALOG = WM_USER + 1;
+ {$EXTERNALSYM PSPCB_SI_INITDIALOG}
+
+const
+ IID_ISecurityInformation: GUID = (
+ D1:$965fc360; D2:$16ff; D3:$11d0; D4:($91, $cb, $0, $aa, $0, $bb, $b7, $23));
+ {$EXTERNALSYM IID_ISecurityInformation}
+ IID_ISecurityInformation2: GUID = (
+ D1:$c3ccfdb4; D2:$6f88; D3:$11d2; D4:($a3, $ce, $0, $c0, $4f, $b1, $78, $2a));
+ {$EXTERNALSYM IID_ISecurityInformation2}
+
+ SID_ISecurityInformation = '{965FC360-16FF-11d0-91CB-00AA00BBB723}';
+ SID_ISecurityInformation2 = '{c3ccfdb4-6f88-11d2-a3ce-00c04fb1782a}';
+
+type
+ ISecurityInformation = interface(IUnknown)
+ [SID_ISecurityInformation]
+ function GetObjectInformation(out pObjectInfo: SI_OBJECT_INFO): HRESULT; stdcall;
+ function GetSecurity(RequestedInformation: SECURITY_INFORMATION;
+ out ppSecurityDescriptor: PSECURITY_DESCRIPTOR; fDefault: BOOL): HRESULT; stdcall;
+ function SetSecurity(SecurityInformation: SECURITY_INFORMATION;
+ pSecurityDescriptor: PSECURITY_DESCRIPTOR): HRESULT; stdcall;
+ function GetAccessRights(pguidObjectType: LPGUID; dwFlags: DWORD;
+ out ppAccess: PSI_ACCESS; out pcAccesses, piDefaultAccess: ULONG): HRESULT; stdcall;
+ function MapGeneric(pguidObjectType: LPGUID; pAceFlags: PUCHAR;
+ pMask: PACCESS_MASK): HRESULT; stdcall;
+ function GetInheritTypes(out ppInheritTypes: PSI_INHERIT_TYPE;
+ out pcInheritTypes: ULONG): HRESULT; stdcall;
+ function PropertySheetPageCallback(hwnd: HWND; uMsg: UINT;
+ uPage: SI_PAGE_TYPE): HRESULT; stdcall;
+ end;
+ {$EXTERNALSYM ISecurityInformation}
+
+ LPSECURITYINFO = ISecurityInformation;
+ {$EXTERNALSYM LPSECURITYINFO}
+
+ ISecurityInformation2 = interface(IUnknown)
+ [SID_ISecurityInformation]
+ function IsDaclCanonical(pDacl: PACL): BOOL; stdcall;
+ function LookupSids(cSids: ULONG; rgpSids: PPSID;
+ out ppdo: Pointer{*LPDATAOBJECT}): HRESULT; stdcall;
+ end;
+ {$EXTERNALSYM ISecurityInformation2}
+
+ LPSECURITYINFO2 = ISecurityInformation2;
+ {$EXTERNALSYM LPSECURITYINFO2}
+
+// HGLOBAL containing SID_INFO_LIST returned by ISecurityInformation2::LookupSids
+
+const
+ CFSTR_ACLUI_SID_INFO_LIST = 'CFSTR_ACLUI_SID_INFO_LIST';
+ {$EXTERNALSYM CFSTR_ACLUI_SID_INFO_LIST}
+
+// Data structures corresponding to CFSTR_ACLUI_SID_INFO_LIST
+
+type
+ PSID_INFO = ^SID_INFO;
+ {$EXTERNALSYM PSID_INFO}
+ _SID_INFO = record
+ pSid: PSID;
+ pwzCommonName: PWSTR;
+ pwzClass: PWSTR; // Used for selecting icon, e.g. "User" or "Group"
+ pwzUPN: PWSTR; // Optional, may be NULL
+ end;
+ {$EXTERNALSYM _SID_INFO}
+ SID_INFO = _SID_INFO;
+ {$EXTERNALSYM SID_INFO}
+ TSidInfo = SID_INFO;
+ PSidInfo = PSID_INFO;
+
+ PSID_INFO_LIST = ^SID_INFO_LIST;
+ {$EXTERNALSYM PSID_INFO_LIST}
+ _SID_INFO_LIST = record
+ cItems: ULONG;
+ aSidInfo: array [0..ANYSIZE_ARRAY - 1] of SID_INFO;
+ end;
+ {$EXTERNALSYM _SID_INFO_LIST}
+ SID_INFO_LIST = _SID_INFO_LIST;
+ {$EXTERNALSYM SID_INFO_LIST}
+ TSidInfoList = SID_INFO_LIST;
+ PSidInfoList = PSID_INFO_LIST;
+
+const
+ IID_IEffectivePermission: TGUID = '{3853DC76-9F35-407c-88A1-D19344365FBC}';
+ {$EXTERNALSYM IID_IEffectivePermission}
+ IID_ISecurityObjectTypeInfo: TGUID = '{fc3066eb-79ef-444b-9111-d18a75ebf2fa}';
+ {$EXTERNALSYM IID_ISecurityObjectTypeInfo}
+
+type
+ IEffectivePermission = interface(IUnknown)
+ ['{3853DC76-9F35-407c-88A1-D19344365FBC}']
+ function GetEffectivePermission(const pguidObjectType: TGUID; pUserSid: PSID;
+ pszServerName: LPCWSTR; pSD: PSECURITY_DESCRIPTOR; var ppObjectTypeList: POBJECT_TYPE_LIST;
+ var pcObjectTypeListLength: ULONG; var ppGrantedAccessList: PACCESS_MASK;
+ var pcGrantedAccessListLength: ULONG): HRESULT; stdcall;
+ end;
+ {$EXTERNALSYM IEffectivePermission}
+ LPEFFECTIVEPERMISSION = IEffectivePermission;
+ {$EXTERNALSYM LPEFFECTIVEPERMISSION}
+
+ ISecurityObjectTypeInfo = interface(IUnknown)
+ ['{fc3066eb-79ef-444b-9111-d18a75ebf2fa}']
+ function GetInheritSource(si: SECURITY_INFORMATION; pACL: PACL;
+ var ppInheritArray: PINHERITED_FROM): HRESULT; stdcall;
+ end;
+ {$EXTERNALSYM ISecurityObjectTypeInfo}
+ LPSecurityObjectTypeInfo = ISecurityObjectTypeInfo;
+ {$EXTERNALSYM LPSecurityObjectTypeInfo}
+
+type
+ HPROPSHEETPAGE = Pointer;
+ {$EXTERNALSYM HPROPSHEETPAGE}
+
+function CreateSecurityPage(psi: LPSECURITYINFO): HPROPSHEETPAGE; stdcall;
+{$EXTERNALSYM CreateSecurityPage}
+function EditSecurity(hwndOwner: HWND; psi: LPSECURITYINFO): BOOL; stdcall;
+{$EXTERNALSYM EditSecurity}
+
+implementation
+
+const
+ acluilib = 'aclui.dll';
+
+{$IFDEF DYNAMIC_LINK}
+
+var
+ _CreateSecurityPage: Pointer;
+
+function CreateSecurityPage;
+begin
+ GetProcedureAddress(_CreateSecurityPage, acluilib, 'CreateSecurityPage');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreateSecurityPage]
+ end;
+end;
+
+var
+ _EditSecurity: Pointer;
+
+function EditSecurity;
+begin
+ GetProcedureAddress(_EditSecurity, acluilib, 'EditSecurity');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_EditSecurity]
+ end;
+end;
+
+{$ELSE}
+
+function CreateSecurityPage; external acluilib name 'CreateSecurityPage';
+function EditSecurity; external acluilib name 'EditSecurity';
+
+{$ENDIF DYNAMIC_LINK}
+
+end.
diff --git a/packages/extra/winunits/jwaactiveds.pas b/packages/extra/winunits/jwaactiveds.pas
index 7e992765c2..5e123b9b87 100644
--- a/packages/extra/winunits/jwaactiveds.pas
+++ b/packages/extra/winunits/jwaactiveds.pas
@@ -1,1207 +1,1207 @@
-{******************************************************************************}
-{ }
-{ Active Directory Services API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: activeds.h, released June 2000. The original Pascal }
-{ code is: ActiveDS.pas, released December 2000. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwaactiveds.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaActiveDS;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "activeds.h"'}
-{$HPPEMIT ''}
-{$HPPEMIT 'typedef GUID REFIID'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- ActiveX {TODO}, JwaAdsTLB, JwaWinNT, JwaWinType, JwaWinUser;
-
-type
- REFIID = GUID;
- {$NODEFINE REFIID}
-
-type
- // imports of a type library sometimes are missing a few decls, these are just
- // a few of them to make this file compile at all. I really should do all of
- // them one day.
-
- PADSVALUE = ^_adsvalue;
- {$EXTERNALSYM PADSVALUE}
- PADS_ATTR_INFO = ^_ads_attr_info;
- {$EXTERNALSYM PADS_ATTR_INFO}
-
-// Contents: Master include file for Ole Ds
-//
-// Notes: All Ole Ds client applications must include this file. This
-// provides access to the primary Ole Ds interfaces, the error
-// codes, and function prototypes for the Ole Ds helper apis.
-
-//
-// Interface definitions and well known GUIDS for Ole Ds
-//
-
-//#include "iads.h" >> AdsTLB from activeds.dll
-
-//
-// Helper function prototypes for Ole Ds
-//
-
-//#include "adshlp.h"
-
-function ADsGetObject(lpszPathName: LPCWSTR; const riid: REFIID; out ppObject: Pointer): HRESULT; stdcall;
-{$EXTERNALSYM ADsGetObject}
-
-function ADsBuildEnumerator(pADsContainer: IADsContainer; out ppEnumVariant: IEnumVARIANT): HRESULT; stdcall;
-{$EXTERNALSYM ADsBuildEnumerator}
-
-function ADsFreeEnumerator(var pEnumVariant: IEnumVARIANT): HRESULT;
-{$EXTERNALSYM ADsFreeEnumerator}
-
-function ADsEnumerateNext(pEnumVariant: IEnumVARIANT; cElements: ULONG;
- var pvar: OleVariant; var pcElementsFetched: ULONG): HRESULT; stdcall;
-{$EXTERNALSYM ADsEnumerateNext}
-
-function ADsBuildVarArrayStr(lppPathNames: LPWSTR; dwPathNames: DWORD;
- var pVar: OleVariant): HRESULT; stdcall;
-{$EXTERNALSYM ADsBuildVarArrayStr}
-
-function ADsBuildVarArrayInt(lpdwObjectTypes: LPDWORD; dwObjectTypes: DWORD;
- var pVar: OleVariant): HRESULT; stdcall;
-{$EXTERNALSYM ADsBuildVarArrayInt}
-
-function ADsOpenObject(lpszPathName, lpszUserName, lpszPassword: LPCWSTR;
- dwReserved: DWORD; const riid: REFIID; out ppObject: Pointer): HRESULT; stdcall;
-{$EXTERNALSYM ADsOpenObject}
-
-//
-// Helper functions for extended error support
-//
-
-function ADsGetLastError(var lpError: DWORD; lpErrorBuf: LPWSTR;
- dwErrorBufLen: DWORD; lpNameBuf: LPWSTR; dwNameBufLen: DWORD): HRESULT; stdcall;
-{$EXTERNALSYM ADsGetLastError}
-
-procedure ADsSetLastError(dwErr: DWORD; pszError, pszProvider: LPCWSTR); stdcall;
-{$EXTERNALSYM ADsSetLastError}
-
-//procedure ADsFreeAllErrorRecords; stdcall;
-//{$EXTERNALSYM ADsFreeAllErrorRecords}
-
-function AllocADsMem(cb: DWORD): LPVOID; stdcall;
-{$EXTERNALSYM AllocADsMem}
-
-function FreeADsMem(pMem: LPVOID): BOOL; stdcall;
-{$EXTERNALSYM FreeADsMem}
-
-function ReallocADsMem(pOldMem: LPVOID; cbOld, cbNew: DWORD): LPVOID; stdcall;
-{$EXTERNALSYM ReallocADsMem}
-
-function AllocADsStr(pStr: LPCWSTR): LPWSTR; stdcall;
-{$EXTERNALSYM AllocADsStr}
-
-function FreeADsStr(pStr: LPWSTR): BOOL; stdcall;
-{$EXTERNALSYM FreeADsStr}
-
-function ReallocADsStr(var ppStr: LPWSTR; pStr: LPWSTR): BOOL; stdcall;
-{$EXTERNALSYM ReallocADsStr}
-
-function ADsEncodeBinaryData(pbSrcData: PBYTE; dwSrcLen: DWORD;
- var ppszDestData: LPWSTR): HRESULT; stdcall;
-{$EXTERNALSYM ADsEncodeBinaryData}
-
-function ADsDecodeBinaryData(szSrcData: LPCWSTR; var ppbDestData: PBYTE;
- var pdwDestLen: ULONG): HRESULT; stdcall;
-{$EXTERNALSYM ADsDecodeBinaryData}
-
-function PropVariantToAdsType(var pVariant: OleVariant; dwNumVariant: DWORD;
- var ppAdsValues: PADSVALUE; pdwNumValues: PDWORD): HRESULT; stdcall;
-{$EXTERNALSYM PropVariantToAdsType}
-
-function AdsTypeToPropVariant(pAdsValues: PADSVALUE; dwNumValues: DWORD;
- var pVariant: OleVariant): HRESULT; stdcall;
-{$EXTERNALSYM AdsTypeToPropVariant}
-
-procedure AdsFreeAdsValues(pAdsValues: PADSVALUE; dwNumValues: DWORD); stdcall;
-{$EXTERNALSYM AdsFreeAdsValues}
-
-//
-// Error codes for Ole Ds - generated from ..\..\errmsg
-//
-
-//#include "adserr.h"
-
-// ---------------------- HRESULT value definitions -----------------
-//
-// HRESULT definitions
-//
-
-//
-// Values are 32 bit values layed out as follows:
-//
-// 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1
-// 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
-// +---+-+-+-----------------------+-------------------------------+
-// |Sev|C|R| Facility | Code |
-// +---+-+-+-----------------------+-------------------------------+
-//
-// where
-//
-// Sev - is the severity code
-//
-// 00 - Success
-// 01 - Informational
-// 10 - Warning
-// 11 - Error
-//
-// C - is the Customer code flag
-//
-// R - is a reserved bit
-//
-// Facility - is the facility code
-//
-// Code - is the facility's status code
-//
-//
-// Define the facility codes
-//
-
-const
- FACILITY_WINDOWS = 8;
- {$EXTERNALSYM FACILITY_WINDOWS}
- FACILITY_STORAGE = 3;
- {$EXTERNALSYM FACILITY_STORAGE}
- FACILITY_RPC = 1;
- {$EXTERNALSYM FACILITY_RPC}
- FACILITY_SSPI = 9;
- {$EXTERNALSYM FACILITY_SSPI}
- FACILITY_WIN32 = 7;
- {$EXTERNALSYM FACILITY_WIN32}
- FACILITY_CONTROL = 10;
- {$EXTERNALSYM FACILITY_CONTROL}
- FACILITY_NULL = 0;
- {$EXTERNALSYM FACILITY_NULL}
- FACILITY_ITF = 4;
- {$EXTERNALSYM FACILITY_ITF}
- FACILITY_DISPATCH = 2;
- {$EXTERNALSYM FACILITY_DISPATCH}
-
-//
-// Define the severity codes
-//
-
-//
-// MessageId: E_ADS_BAD_PATHNAME
-//
-// MessageText:
-//
-// An invalid Active Directory pathname was passed
-//
-
- E_ADS_BAD_PATHNAME = HRESULT($80005000);
- {$EXTERNALSYM E_ADS_BAD_PATHNAME}
-
-//
-// MessageId: E_ADS_INVALID_DOMAIN_OBJECT
-//
-// MessageText:
-//
-// An unknown Active Directory domain object was requested
-//
-
- E_ADS_INVALID_DOMAIN_OBJECT = HRESULT($80005001);
- {$EXTERNALSYM E_ADS_INVALID_DOMAIN_OBJECT}
-
-//
-// MessageId: E_ADS_INVALID_USER_OBJECT
-//
-// MessageText:
-//
-// An unknown Active Directory user object was requested
-//
-
- E_ADS_INVALID_USER_OBJECT = HRESULT($80005002);
- {$EXTERNALSYM E_ADS_INVALID_USER_OBJECT}
-
-//
-// MessageId: E_ADS_INVALID_COMPUTER_OBJECT
-//
-// MessageText:
-//
-// An unknown Active Directory computer object was requested
-//
-
- E_ADS_INVALID_COMPUTER_OBJECT = HRESULT($80005003);
- {$EXTERNALSYM E_ADS_INVALID_COMPUTER_OBJECT}
-
-//
-// MessageId: E_ADS_UNKNOWN_OBJECT
-//
-// MessageText:
-//
-// An unknown Active Directory object was requested
-//
-
- E_ADS_UNKNOWN_OBJECT = HRESULT($80005004);
- {$EXTERNALSYM E_ADS_UNKNOWN_OBJECT}
-
-//
-// MessageId: E_ADS_PROPERTY_NOT_SET
-//
-// MessageText:
-//
-// The specified Active Directory property was not set
-//
-
- E_ADS_PROPERTY_NOT_SET = HRESULT($80005005);
- {$EXTERNALSYM E_ADS_PROPERTY_NOT_SET}
-
-//
-// MessageId: E_ADS_PROPERTY_NOT_SUPPORTED
-//
-// MessageText:
-//
-// The specified Active Directory property is not supported
-//
-
- E_ADS_PROPERTY_NOT_SUPPORTED = HRESULT($80005006);
- {$EXTERNALSYM E_ADS_PROPERTY_NOT_SUPPORTED}
-
-//
-// MessageId: E_ADS_PROPERTY_INVALID
-//
-// MessageText:
-//
-// The specified Active Directory property is invalid
-//
-
- E_ADS_PROPERTY_INVALID = HRESULT($80005007);
- {$EXTERNALSYM E_ADS_PROPERTY_INVALID}
-
-//
-// MessageId: E_ADS_BAD_PARAMETER
-//
-// MessageText:
-//
-// One or more input parameters are invalid
-//
-
- E_ADS_BAD_PARAMETER = HRESULT($80005008);
- {$EXTERNALSYM E_ADS_BAD_PARAMETER}
-
-//
-// MessageId: E_ADS_OBJECT_UNBOUND
-//
-// MessageText:
-//
-// The specified Active Directory object is not bound to a remote resource
-//
-
- E_ADS_OBJECT_UNBOUND = HRESULT($80005009);
- {$EXTERNALSYM E_ADS_OBJECT_UNBOUND}
-
-//
-// MessageId: E_ADS_PROPERTY_NOT_MODIFIED
-//
-// MessageText:
-//
-// The specified Active Directory object has not been modified
-//
-
- E_ADS_PROPERTY_NOT_MODIFIED = HRESULT($8000500A);
- {$EXTERNALSYM E_ADS_PROPERTY_NOT_MODIFIED}
-
-//
-// MessageId: E_ADS_PROPERTY_MODIFIED
-//
-// MessageText:
-//
-// The specified Active Directory object has not been modified
-//
-
- E_ADS_PROPERTY_MODIFIED = HRESULT($8000500B);
- {$EXTERNALSYM E_ADS_PROPERTY_MODIFIED}
-
-//
-// MessageId: E_ADS_CANT_CONVERT_DATATYPE
-//
-// MessageText:
-//
-// The Active Directory datatype cannot be converted to/from a native DS datatype
-//
-
- E_ADS_CANT_CONVERT_DATATYPE = HRESULT($8000500C);
- {$EXTERNALSYM E_ADS_CANT_CONVERT_DATATYPE}
-
-//
-// MessageId: E_ADS_PROPERTY_NOT_FOUND
-//
-// MessageText:
-//
-// The Active Directory property cannot be found in the cache.
-//
-
- E_ADS_PROPERTY_NOT_FOUND = HRESULT($8000500D);
- {$EXTERNALSYM E_ADS_PROPERTY_NOT_FOUND}
-
-//
-// MessageId: E_ADS_OBJECT_EXISTS
-//
-// MessageText:
-//
-// The Active Directory object exists.
-//
-
- E_ADS_OBJECT_EXISTS = HRESULT($8000500E);
- {$EXTERNALSYM E_ADS_OBJECT_EXISTS}
-
-//
-// MessageId: E_ADS_SCHEMA_VIOLATION
-//
-// MessageText:
-//
-// The attempted action violates the DS schema rules.
-//
-
- E_ADS_SCHEMA_VIOLATION = HRESULT($8000500F);
- {$EXTERNALSYM E_ADS_SCHEMA_VIOLATION}
-
-//
-// MessageId: E_ADS_COLUMN_NOT_SET
-//
-// MessageText:
-//
-// The specified column in the Active Directory was not set.
-//
-
- E_ADS_COLUMN_NOT_SET = HRESULT($80005010);
- {$EXTERNALSYM E_ADS_COLUMN_NOT_SET}
-
-//
-// MessageId: S_ADS_ERRORSOCCURRED
-//
-// MessageText:
-//
-// One or more errors occurred
-//
-
- S_ADS_ERRORSOCCURRED = HRESULT($00005011);
- {$EXTERNALSYM S_ADS_ERRORSOCCURRED}
-
-//
-// MessageId: S_ADS_NOMORE_ROWS
-//
-// MessageText:
-//
-// No more rows to be obatained by the search result.
-//
-
- S_ADS_NOMORE_ROWS = HRESULT($00005012);
- {$EXTERNALSYM S_ADS_NOMORE_ROWS}
-
-//
-// MessageId: S_ADS_NOMORE_COLUMNS
-//
-// MessageText:
-//
-// No more columns to be obatained for the current row.
-//
-
- S_ADS_NOMORE_COLUMNS = HRESULT($00005013);
- {$EXTERNALSYM S_ADS_NOMORE_COLUMNS}
-
-//
-// MessageId: E_ADS_INVALID_FILTER
-//
-// MessageText:
-//
-// The search filter specified is invalid
-//
-
- E_ADS_INVALID_FILTER = HRESULT($80005014);
- {$EXTERNALSYM E_ADS_INVALID_FILTER}
-
-//
-// Globally accessible GUIDS
-//
-
-//#include "adsiid.h" -> adstlb from activeds.dll
-
-//
-// Status codes for ads objects
-//
-
-//#include "adssts.h"
-
-const
- ADS_PRINTER_PAUSED = $00000001;
- {$EXTERNALSYM ADS_PRINTER_PAUSED}
- ADS_PRINTER_PENDING_DELETION = $00000002;
- {$EXTERNALSYM ADS_PRINTER_PENDING_DELETION}
- ADS_PRINTER_ERROR = $00000003;
- {$EXTERNALSYM ADS_PRINTER_ERROR}
- ADS_PRINTER_PAPER_JAM = $00000004;
- {$EXTERNALSYM ADS_PRINTER_PAPER_JAM}
- ADS_PRINTER_PAPER_OUT = $00000005;
- {$EXTERNALSYM ADS_PRINTER_PAPER_OUT}
- ADS_PRINTER_MANUAL_FEED = $00000006;
- {$EXTERNALSYM ADS_PRINTER_MANUAL_FEED}
- ADS_PRINTER_PAPER_PROBLEM = $00000007;
- {$EXTERNALSYM ADS_PRINTER_PAPER_PROBLEM}
- ADS_PRINTER_OFFLINE = $00000008;
- {$EXTERNALSYM ADS_PRINTER_OFFLINE}
- ADS_PRINTER_IO_ACTIVE = $00000100;
- {$EXTERNALSYM ADS_PRINTER_IO_ACTIVE}
- ADS_PRINTER_BUSY = $00000200;
- {$EXTERNALSYM ADS_PRINTER_BUSY}
- ADS_PRINTER_PRINTING = $00000400;
- {$EXTERNALSYM ADS_PRINTER_PRINTING}
- ADS_PRINTER_OUTPUT_BIN_FULL = $00000800;
- {$EXTERNALSYM ADS_PRINTER_OUTPUT_BIN_FULL}
- ADS_PRINTER_NOT_AVAILABLE = $00001000;
- {$EXTERNALSYM ADS_PRINTER_NOT_AVAILABLE}
- ADS_PRINTER_WAITING = $00002000;
- {$EXTERNALSYM ADS_PRINTER_WAITING}
- ADS_PRINTER_PROCESSING = $00004000;
- {$EXTERNALSYM ADS_PRINTER_PROCESSING}
- ADS_PRINTER_INITIALIZING = $00008000;
- {$EXTERNALSYM ADS_PRINTER_INITIALIZING}
- ADS_PRINTER_WARMING_UP = $00010000;
- {$EXTERNALSYM ADS_PRINTER_WARMING_UP}
- ADS_PRINTER_TONER_LOW = $00020000;
- {$EXTERNALSYM ADS_PRINTER_TONER_LOW}
- ADS_PRINTER_NO_TONER = $00040000;
- {$EXTERNALSYM ADS_PRINTER_NO_TONER}
- ADS_PRINTER_PAGE_PUNT = $00080000;
- {$EXTERNALSYM ADS_PRINTER_PAGE_PUNT}
- ADS_PRINTER_USER_INTERVENTION = $00100000;
- {$EXTERNALSYM ADS_PRINTER_USER_INTERVENTION}
- ADS_PRINTER_OUT_OF_MEMORY = $00200000;
- {$EXTERNALSYM ADS_PRINTER_OUT_OF_MEMORY}
- ADS_PRINTER_DOOR_OPEN = $00400000;
- {$EXTERNALSYM ADS_PRINTER_DOOR_OPEN}
- ADS_PRINTER_SERVER_UNKNOWN = $00800000;
- {$EXTERNALSYM ADS_PRINTER_SERVER_UNKNOWN}
- ADS_PRINTER_POWER_SAVE = $01000000;
- {$EXTERNALSYM ADS_PRINTER_POWER_SAVE}
-
-//
-// job status values
-//
-
- ADS_JOB_PAUSED = $00000001;
- {$EXTERNALSYM ADS_JOB_PAUSED}
- ADS_JOB_ERROR = $00000002;
- {$EXTERNALSYM ADS_JOB_ERROR}
- ADS_JOB_DELETING = $00000004;
- {$EXTERNALSYM ADS_JOB_DELETING}
- ADS_JOB_SPOOLING = $00000008;
- {$EXTERNALSYM ADS_JOB_SPOOLING}
- ADS_JOB_PRINTING = $00000010;
- {$EXTERNALSYM ADS_JOB_PRINTING}
- ADS_JOB_OFFLINE = $00000020;
- {$EXTERNALSYM ADS_JOB_OFFLINE}
- ADS_JOB_PAPEROUT = $00000040;
- {$EXTERNALSYM ADS_JOB_PAPEROUT}
- ADS_JOB_PRINTED = $00000080;
- {$EXTERNALSYM ADS_JOB_PRINTED}
- ADS_JOB_DELETED = $00000100;
- {$EXTERNALSYM ADS_JOB_DELETED}
-
-//
-// service status values
-//
-
- ADS_SERVICE_STOPPED = $00000001;
- {$EXTERNALSYM ADS_SERVICE_STOPPED}
- ADS_SERVICE_START_PENDING = $00000002;
- {$EXTERNALSYM ADS_SERVICE_START_PENDING}
- ADS_SERVICE_STOP_PENDING = $00000003;
- {$EXTERNALSYM ADS_SERVICE_STOP_PENDING}
- ADS_SERVICE_RUNNING = $00000004;
- {$EXTERNALSYM ADS_SERVICE_RUNNING}
- ADS_SERVICE_CONTINUE_PENDING = $00000005;
- {$EXTERNALSYM ADS_SERVICE_CONTINUE_PENDING}
- ADS_SERVICE_PAUSE_PENDING = $00000006;
- {$EXTERNALSYM ADS_SERVICE_PAUSE_PENDING}
- ADS_SERVICE_PAUSED = $00000007;
- {$EXTERNALSYM ADS_SERVICE_PAUSED}
- ADS_SERVICE_ERROR = $00000008;
- {$EXTERNALSYM ADS_SERVICE_ERROR}
-
-//---------------------------------------------------------------------
-
-//
-// Service Type Valid Values
-//
-
- ADS_SERVICE_OWN_PROCESS = $00000010;
- {$EXTERNALSYM ADS_SERVICE_OWN_PROCESS}
- ADS_SERVICE_SHARE_PROCESS = $00000020;
- {$EXTERNALSYM ADS_SERVICE_SHARE_PROCESS}
- ADS_SERVICE_KERNEL_DRIVER = $00000001;
- {$EXTERNALSYM ADS_SERVICE_KERNEL_DRIVER}
- ADS_SERVICE_FILE_SYSTEM_DRIVER = $00000002;
- {$EXTERNALSYM ADS_SERVICE_FILE_SYSTEM_DRIVER}
-
-//
-// Start Type Valid Values
-//
-
- ADS_SERVICE_BOOT_START = SERVICE_BOOT_START;
- {$EXTERNALSYM ADS_SERVICE_BOOT_START}
- ADS_SERVICE_SYSTEM_START = SERVICE_SYSTEM_START;
- {$EXTERNALSYM ADS_SERVICE_SYSTEM_START}
- ADS_SERVICE_AUTO_START = SERVICE_AUTO_START;
- {$EXTERNALSYM ADS_SERVICE_AUTO_START}
- ADS_SERVICE_DEMAND_START = SERVICE_DEMAND_START;
- {$EXTERNALSYM ADS_SERVICE_DEMAND_START}
- ADS_SERVICE_DISABLED = SERVICE_DISABLED;
- {$EXTERNALSYM ADS_SERVICE_DISABLED}
-
-//
-// Error Control Values
-//
-
- ADS_SERVICE_ERROR_IGNORE = 0;
- {$EXTERNALSYM ADS_SERVICE_ERROR_IGNORE}
- ADS_SERVICE_ERROR_NORMAL = 1;
- {$EXTERNALSYM ADS_SERVICE_ERROR_NORMAL}
- ADS_SERVICE_ERROR_SEVERE = 2;
- {$EXTERNALSYM ADS_SERVICE_ERROR_SEVERE}
- ADS_SERVICE_ERROR_CRITICAL = 3;
- {$EXTERNALSYM ADS_SERVICE_ERROR_CRITICAL}
-
-//
-// Schema class names and other schema related definitions
-//
-
-//#include "adsnms.h"
-
-const
- NAMESPACE_CLASS_NAME = 'Namespace';
- {$EXTERNALSYM NAMESPACE_CLASS_NAME}
- COUNTRY_CLASS_NAME = 'Country';
- {$EXTERNALSYM COUNTRY_CLASS_NAME}
- LOCALITY_CLASS_NAME = 'Locality';
- {$EXTERNALSYM LOCALITY_CLASS_NAME}
- ORGANIZATION_CLASS_NAME = 'Organization';
- {$EXTERNALSYM ORGANIZATION_CLASS_NAME}
- ORGANIZATIONUNIT_CLASS_NAME = 'Organizational Unit';
- {$EXTERNALSYM ORGANIZATIONUNIT_CLASS_NAME}
- DOMAIN_CLASS_NAME = 'Domain';
- {$EXTERNALSYM DOMAIN_CLASS_NAME}
- COMPUTER_CLASS_NAME = 'Computer';
- {$EXTERNALSYM COMPUTER_CLASS_NAME}
- USER_CLASS_NAME = 'User';
- {$EXTERNALSYM USER_CLASS_NAME}
- GROUP_CLASS_NAME = 'Group';
- {$EXTERNALSYM GROUP_CLASS_NAME}
- GLOBALGROUP_CLASS_NAME = 'GlobalGroup';
- {$EXTERNALSYM GLOBALGROUP_CLASS_NAME}
- LOCALGROUP_CLASS_NAME = 'LocalGroup';
- {$EXTERNALSYM LOCALGROUP_CLASS_NAME}
- SERVICE_CLASS_NAME = 'Service';
- {$EXTERNALSYM SERVICE_CLASS_NAME}
- FILESERVICE_CLASS_NAME = 'FileService';
- {$EXTERNALSYM FILESERVICE_CLASS_NAME}
- SESSION_CLASS_NAME = 'Session';
- {$EXTERNALSYM SESSION_CLASS_NAME}
- RESOURCE_CLASS_NAME = 'Resource';
- {$EXTERNALSYM RESOURCE_CLASS_NAME}
- FILESHARE_CLASS_NAME = 'FileShare';
- {$EXTERNALSYM FILESHARE_CLASS_NAME}
- PRINTER_CLASS_NAME = 'PrintQueue';
- {$EXTERNALSYM PRINTER_CLASS_NAME}
- PRINTJOB_CLASS_NAME = 'PrintJob';
- {$EXTERNALSYM PRINTJOB_CLASS_NAME}
- SCHEMA_CLASS_NAME = 'Schema';
- {$EXTERNALSYM SCHEMA_CLASS_NAME}
- CLASS_CLASS_NAME = 'Class';
- {$EXTERNALSYM CLASS_CLASS_NAME}
- PROPERTY_CLASS_NAME = 'Property';
- {$EXTERNALSYM PROPERTY_CLASS_NAME}
- SYNTAX_CLASS_NAME = 'Syntax';
- {$EXTERNALSYM SYNTAX_CLASS_NAME}
- ROOTDSE_CLASS_NAME = 'RootDSE';
- {$EXTERNALSYM ROOTDSE_CLASS_NAME}
-
- NO_SCHEMA = '';
- {$EXTERNALSYM NO_SCHEMA}
- DOMAIN_SCHEMA_NAME = 'Domain';
- {$EXTERNALSYM DOMAIN_SCHEMA_NAME}
- COMPUTER_SCHEMA_NAME = 'Computer';
- {$EXTERNALSYM COMPUTER_SCHEMA_NAME}
- USER_SCHEMA_NAME = 'User';
- {$EXTERNALSYM USER_SCHEMA_NAME}
- GROUP_SCHEMA_NAME = 'Group';
- {$EXTERNALSYM GROUP_SCHEMA_NAME}
- GLOBALGROUP_SCHEMA_NAME = 'GlobalGroup';
- {$EXTERNALSYM GLOBALGROUP_SCHEMA_NAME}
- LOCALGROUP_SCHEMA_NAME = 'LocalGroup';
- {$EXTERNALSYM LOCALGROUP_SCHEMA_NAME}
- SERVICE_SCHEMA_NAME = 'Service';
- {$EXTERNALSYM SERVICE_SCHEMA_NAME}
- PRINTER_SCHEMA_NAME = 'PrintQueue';
- {$EXTERNALSYM PRINTER_SCHEMA_NAME}
- PRINTJOB_SCHEMA_NAME = 'PrintJob';
- {$EXTERNALSYM PRINTJOB_SCHEMA_NAME}
- FILESERVICE_SCHEMA_NAME = 'FileService';
- {$EXTERNALSYM FILESERVICE_SCHEMA_NAME}
- SESSION_SCHEMA_NAME = 'Session';
- {$EXTERNALSYM SESSION_SCHEMA_NAME}
- RESOURCE_SCHEMA_NAME = 'Resource';
- {$EXTERNALSYM RESOURCE_SCHEMA_NAME}
- FILESHARE_SCHEMA_NAME = 'FileShare';
- {$EXTERNALSYM FILESHARE_SCHEMA_NAME}
- FPNW_FILESERVICE_SCHEMA_NAME = 'FPNWFileService';
- {$EXTERNALSYM FPNW_FILESERVICE_SCHEMA_NAME}
- FPNW_SESSION_SCHEMA_NAME = 'FPNWSession';
- {$EXTERNALSYM FPNW_SESSION_SCHEMA_NAME}
- FPNW_RESOURCE_SCHEMA_NAME = 'FPNWResource';
- {$EXTERNALSYM FPNW_RESOURCE_SCHEMA_NAME}
- FPNW_FILESHARE_SCHEMA_NAME = 'FPNWFileShare';
- {$EXTERNALSYM FPNW_FILESHARE_SCHEMA_NAME}
-
-//
-// Definitions in the OLE DB provider for ADSI
-//
-
-//#include "adsdb.h"
-
-//
-// printer status values
-//
-
-// Most of the constants have been moved into an enum in adstype.h and
-// are available publicly in iads.h. This file has been left here so that
-// old references to adsdb.h do not break compiles.
-
-const
- DBPROPFLAGS_ADSISEARCH = $0000C000;
- {$EXTERNALSYM DBPROPFLAGS_ADSISEARCH}
-
-//#include "adsprop.h"
-
-// Windows NT Active Directory Service Property Pages
-//
-// Contents: Functions and definitions used in the creation of AD property
-// sheets.
-
-const
- WM_ADSPROP_NOTIFY_PAGEINIT = WM_USER + 1101; // where LPARAM is the PADSPROPINITPARAMS pointer.
- {$EXTERNALSYM WM_ADSPROP_NOTIFY_PAGEINIT}
- WM_ADSPROP_NOTIFY_PAGEHWND = WM_USER + 1102; // where WPARAM => page's HWND
- {$EXTERNALSYM WM_ADSPROP_NOTIFY_PAGEHWND}
- WM_ADSPROP_NOTIFY_CHANGE = WM_USER + 1103; // used to send a change notification to a parent sheet
- {$EXTERNALSYM WM_ADSPROP_NOTIFY_CHANGE}
- WM_ADSPROP_NOTIFY_APPLY = WM_USER + 1104; // pages send this to the notification object.
- {$EXTERNALSYM WM_ADSPROP_NOTIFY_APPLY}
- WM_ADSPROP_NOTIFY_SETFOCUS = WM_USER + 1105; // used internally by the notification object.
- {$EXTERNALSYM WM_ADSPROP_NOTIFY_SETFOCUS}
- WM_ADSPROP_NOTIFY_FOREGROUND = WM_USER + 1106; // used internally by the notification object.
- {$EXTERNALSYM WM_ADSPROP_NOTIFY_FOREGROUND}
- WM_ADSPROP_NOTIFY_EXIT = WM_USER + 1107; // sent on page release
- {$EXTERNALSYM WM_ADSPROP_NOTIFY_EXIT}
-
-//+----------------------------------------------------------------------------
-//
-// Structure: ADSPROPINITPARAMS
-//
-// Usage: Used to pass page initialization information to new pages from
-// the notify object.
-//
-//-----------------------------------------------------------------------------
-
-type
- PADSPROPINITPARAMS = ^ADSPROPINITPARAMS;
- {$EXTERNALSYM PADSPROPINITPARAMS}
- _ADSPROPINITPARAMS = record
- dwSize: DWORD; // Set this to the size of the struct.
- dwFlags: DWORD; // Reserved for future use.
- hr: HRESULT; // If this is non-zero, then the others
- pDsObj: IDirectoryObject; // should be ignored.
- pwzCN: LPWSTR;
- pWritableAttrs: PADS_ATTR_INFO;
- end;
- {$EXTERNALSYM _ADSPROPINITPARAMS}
- ADSPROPINITPARAMS = _ADSPROPINITPARAMS;
- {$EXTERNALSYM ADSPROPINITPARAMS}
- TAdsPropInitParams = ADSPROPINITPARAMS;
-
-//+----------------------------------------------------------------------------
-//
-// Function: ADsPropCreateNotifyObj
-//
-// Synopsis: Checks to see if the notification window/object exists for this
-// sheet instance and if not creates it.
-//
-// Arguments: [pAppThdDataObj] - the unmarshalled data object pointer.
-// [pwzADsObjName] - object path name.
-// [phNotifyObj] - to return the notificion window handle.
-//
-// Returns: HRESULTs.
-//
-//-----------------------------------------------------------------------------
-
-function ADsPropCreateNotifyObj(pAppThdDataObj: Pointer; {LPDATAOBJECT}
- pwzADsObjName: PWSTR; var phNotifyObj: HWND): HRESULT; stdcall;
-{$EXTERNALSYM ADsPropCreateNotifyObj}
-
-//+----------------------------------------------------------------------------
-//
-// Function: ADsPropGetInitInfo
-//
-// Synopsis: Pages call this at their init time to retreive DS object info.
-//
-// Arguments: [hNotifyObj] - the notificion window handle.
-// [pInitParams] - struct filled in with DS object info. This
-// struct must be allocated by the caller before
-// the call.
-//
-// Returns: FALSE if the notify window has gone away for some reason or
-// if the parameters are invalid.
-//
-// Notes: This call results in the sending of the
-// WM_ADSPROP_NOTIFY_PAGEINIT message to the notify window.
-// pInitParams->pWritableAttrs can be NULL if there are no
-// writable attributes.
-//
-//-----------------------------------------------------------------------------
-
-function ADsPropGetInitInfo(hNotifyObj: HWND; pInitParams: PADSPROPINITPARAMS): BOOL; stdcall;
-{$EXTERNALSYM ADsPropGetInitInfo}
-
-//+----------------------------------------------------------------------------
-//
-// Function: ADsPropSetHwnd
-//
-// Synopsis: Pages call this at their dialog init time to send their hwnd.
-//
-// Arguments: [hNotifyObj] - the notificion window handle.
-// [hPage] - the page's window handle.
-//
-// Returns: FALSE if the notify window has gone away for some reason.
-//
-// Notes: Sends the WM_ADSPROP_NOTIFY_PAGEHWND message to the notify
-// window.
-//
-//-----------------------------------------------------------------------------
-
-function ADsPropSetHwnd(hNotifyObj: HWND; hPage: HWND): BOOL; stdcall;
-{$EXTERNALSYM ADsPropSetHwnd}
-
-//+----------------------------------------------------------------------------
-//
-// function: ADsPropCheckIfWritable
-//
-// Synopsis: See if the attribute is writable by checking if it is in
-// the allowedAttributesEffective array.
-//
-// Arguments: [pwzAttr] - the attribute name.
-// [pWritableAttrs] - the array of writable attributes.
-//
-// Returns: FALSE if the attribute name is not found in the writable-attrs
-// array or if the array pointer is NULL.
-//
-//-----------------------------------------------------------------------------
-
-function ADsPropCheckIfWritable(pwzAttr: PWSTR; pWritableAttrs: PADS_ATTR_INFO): BOOL; stdcall;
-{$EXTERNALSYM ADsPropCheckIfWritable}
-
-implementation
-
-const
- adslib = 'activeds.dll';
- dsprop = 'dsprop.dll';
-
-// adshlp.h
-
-function _ADsFreeEnumerator(pEnumVariant: IEnumVARIANT): HRESULT; stdcall; external adslib name 'ADsFreeEnumerator';
-
-function ADsFreeEnumerator(var pEnumVariant: IEnumVARIANT): HRESULT;
-begin
- Result := _ADsFreeEnumerator(pEnumVariant);
- // ADsFreeEnumerator doesn't set pEnumVariant to nil causing Delphi to call
- // Release() again when pEnumVariant leaves scope. Result would be an access
- // violation, explicitly setting the interface to nil prevents this.
- if Result = 0 {S_OK} then
- Pointer(pEnumVariant) := nil;
-end;
-
-//procedure ADsFreeAllErrorRecords
-
-// adsprop.h
-
-{$IFDEF DYNAMIC_LINK}
-
-var
- _ADsGetObject: Pointer;
-
-function ADsGetObject;
-begin
- GetProcedureAddress(_ADsGetObject, adslib, 'ADsGetObject');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ADsGetObject]
- end;
-end;
-
-var
- _ADsBuildEnumerator: Pointer;
-
-function ADsBuildEnumerator;
-begin
- GetProcedureAddress(_ADsBuildEnumerator, adslib, 'ADsBuildEnumerator');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ADsBuildEnumerator]
- end;
-end;
-
-var
- _ADsEnumerateNext: Pointer;
-
-function ADsEnumerateNext;
-begin
- GetProcedureAddress(_ADsEnumerateNext, adslib, 'ADsEnumerateNext');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ADsEnumerateNext]
- end;
-end;
-
-var
- _ADsBuildVarArrayStr: Pointer;
-
-function ADsBuildVarArrayStr;
-begin
- GetProcedureAddress(_ADsBuildVarArrayStr, adslib, 'ADsBuildVarArrayStr');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ADsBuildVarArrayStr]
- end;
-end;
-
-var
- _ADsBuildVarArrayInt: Pointer;
-
-function ADsBuildVarArrayInt;
-begin
- GetProcedureAddress(_ADsBuildVarArrayInt, adslib, 'ADsBuildVarArrayInt');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ADsBuildVarArrayInt]
- end;
-end;
-
-var
- _ADsOpenObject: Pointer;
-
-function ADsOpenObject;
-begin
- GetProcedureAddress(_ADsOpenObject, adslib, 'ADsOpenObject');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ADsOpenObject]
- end;
-end;
-
-var
- _ADsGetLastError: Pointer;
-
-function ADsGetLastError;
-begin
- GetProcedureAddress(_ADsGetLastError, adslib, 'ADsGetLastError');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ADsGetLastError]
- end;
-end;
-
-var
- _ADsSetLastError: Pointer;
-
-procedure ADsSetLastError;
-begin
- GetProcedureAddress(_ADsSetLastError, adslib, 'ADsSetLastError');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ADsSetLastError]
- end;
-end;
-
-var
- _AllocADsMem: Pointer;
-
-function AllocADsMem;
-begin
- GetProcedureAddress(_AllocADsMem, adslib, 'AllocADsMem');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_AllocADsMem]
- end;
-end;
-
-var
- _FreeADsMem: Pointer;
-
-function FreeADsMem;
-begin
- GetProcedureAddress(_FreeADsMem, adslib, 'FreeADsMem');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_FreeADsMem]
- end;
-end;
-
-var
- _ReallocADsMem: Pointer;
-
-function ReallocADsMem;
-begin
- GetProcedureAddress(_ReallocADsMem, adslib, 'ReallocADsMem');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ReallocADsMem]
- end;
-end;
-
-var
- _AllocADsStr: Pointer;
-
-function AllocADsStr;
-begin
- GetProcedureAddress(_AllocADsStr, adslib, 'AllocADsStr');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_AllocADsStr]
- end;
-end;
-
-var
- _FreeADsStr: Pointer;
-
-function FreeADsStr;
-begin
- GetProcedureAddress(_FreeADsStr, adslib, 'FreeADsStr');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_FreeADsStr]
- end;
-end;
-
-var
- _ReallocADsStr: Pointer;
-
-function ReallocADsStr;
-begin
- GetProcedureAddress(_ReallocADsStr, adslib, 'ReallocADsStr');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ReallocADsStr]
- end;
-end;
-
-var
- _ADsEncodeBinaryData: Pointer;
-
-function ADsEncodeBinaryData;
-begin
- GetProcedureAddress(_ADsEncodeBinaryData, adslib, 'ADsEncodeBinaryData');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ADsEncodeBinaryData]
- end;
-end;
-
-var
- _ADsDecodeBinaryData: Pointer;
-
-function ADsDecodeBinaryData;
-begin
- GetProcedureAddress(_ADsDecodeBinaryData, adslib, 'ADsDecodeBinaryData');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ADsDecodeBinaryData]
- end;
-end;
-
-var
- _PropVariantToAdsType: Pointer;
-
-function PropVariantToAdsType;
-begin
- GetProcedureAddress(_PropVariantToAdsType, adslib, 'PropVariantToAdsType');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PropVariantToAdsType]
- end;
-end;
-
-var
- _AdsTypeToPropVariant: Pointer;
-
-function AdsTypeToPropVariant;
-begin
- GetProcedureAddress(_AdsTypeToPropVariant, adslib, 'AdsTypeToPropVariant');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_AdsTypeToPropVariant]
- end;
-end;
-
-var
- _AdsFreeAdsValues: Pointer;
-
-procedure AdsFreeAdsValues;
-begin
- GetProcedureAddress(_AdsFreeAdsValues, adslib, 'AdsFreeAdsValues');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_AdsFreeAdsValues]
- end;
-end;
-
-var
- _ADsPropCreateNotifyObj: Pointer;
-
-function ADsPropCreateNotifyObj;
-begin
- GetProcedureAddress(_ADsPropCreateNotifyObj, dsprop, 'ADsPropCreateNotifyObj');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ADsPropCreateNotifyObj]
- end;
-end;
-
-var
- _ADsPropGetInitInfo: Pointer;
-
-function ADsPropGetInitInfo;
-begin
- GetProcedureAddress(_ADsPropGetInitInfo, dsprop, 'ADsPropGetInitInfo');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ADsPropGetInitInfo]
- end;
-end;
-
-var
- _ADsPropSetHwnd: Pointer;
-
-function ADsPropSetHwnd;
-begin
- GetProcedureAddress(_ADsPropSetHwnd, dsprop, 'ADsPropSetHwnd');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ADsPropSetHwnd]
- end;
-end;
-
-var
- _ADsPropCheckIfWritable: Pointer;
-
-function ADsPropCheckIfWritable;
-begin
- GetProcedureAddress(_ADsPropCheckIfWritable, dsprop, 'ADsPropCheckIfWritable');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ADsPropCheckIfWritable]
- end;
-end;
-
-{$ELSE}
-
-function ADsGetObject; external adslib name 'ADsGetObject';
-function ADsBuildEnumerator; external adslib name 'ADsBuildEnumerator';
-function ADsEnumerateNext; external adslib name 'ADsEnumerateNext';
-function ADsBuildVarArrayStr; external adslib name 'ADsBuildVarArrayStr';
-function ADsBuildVarArrayInt; external adslib name 'ADsBuildVarArrayInt';
-function ADsOpenObject; external adslib name 'ADsOpenObject';
-function ADsGetLastError; external adslib name 'ADsGetLastError';
-procedure ADsSetLastError; external adslib name 'ADsSetLastError';
-function AllocADsMem; external adslib name 'AllocADsMem';
-function FreeADsMem; external adslib name 'FreeADsMem';
-function ReallocADsMem; external adslib name 'ReallocADsMem';
-function AllocADsStr; external adslib name 'AllocADsStr';
-function FreeADsStr; external adslib name 'FreeADsStr';
-function ReallocADsStr; external adslib name 'ReallocADsStr';
-function ADsEncodeBinaryData; external adslib name 'ADsEncodeBinaryData';
-function ADsDecodeBinaryData; external adslib name 'ADsDecodeBinaryData';
-function PropVariantToAdsType; external adslib name 'PropVariantToAdsType';
-function AdsTypeToPropVariant; external adslib name 'AdsTypeToPropVariant';
-procedure AdsFreeAdsValues; external adslib name 'AdsFreeAdsValues';
-function ADsPropCreateNotifyObj; external dsprop name 'ADsPropCreateNotifyObj';
-function ADsPropGetInitInfo; external dsprop name 'ADsPropGetInitInfo';
-function ADsPropSetHwnd; external dsprop name 'ADsPropSetHwnd';
-function ADsPropCheckIfWritable; external dsprop name 'ADsPropCheckIfWritable';
-
-{$ENDIF DYNAMIC_LINK}
-
-end.
+{******************************************************************************}
+{ }
+{ Active Directory Services API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: activeds.h, released June 2000. The original Pascal }
+{ code is: ActiveDS.pas, released December 2000. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwaactiveds.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaActiveDS;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "activeds.h"'}
+{$HPPEMIT ''}
+{$HPPEMIT 'typedef GUID REFIID'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ ActiveX {TODO}, JwaAdsTLB, JwaWinNT, JwaWinType, JwaWinUser;
+
+type
+ REFIID = GUID;
+ {$NODEFINE REFIID}
+
+type
+ // imports of a type library sometimes are missing a few decls, these are just
+ // a few of them to make this file compile at all. I really should do all of
+ // them one day.
+
+ PADSVALUE = ^_adsvalue;
+ {$EXTERNALSYM PADSVALUE}
+ PADS_ATTR_INFO = ^_ads_attr_info;
+ {$EXTERNALSYM PADS_ATTR_INFO}
+
+// Contents: Master include file for Ole Ds
+//
+// Notes: All Ole Ds client applications must include this file. This
+// provides access to the primary Ole Ds interfaces, the error
+// codes, and function prototypes for the Ole Ds helper apis.
+
+//
+// Interface definitions and well known GUIDS for Ole Ds
+//
+
+//#include "iads.h" >> AdsTLB from activeds.dll
+
+//
+// Helper function prototypes for Ole Ds
+//
+
+//#include "adshlp.h"
+
+function ADsGetObject(lpszPathName: LPCWSTR; const riid: REFIID; out ppObject: Pointer): HRESULT; stdcall;
+{$EXTERNALSYM ADsGetObject}
+
+function ADsBuildEnumerator(pADsContainer: IADsContainer; out ppEnumVariant: IEnumVARIANT): HRESULT; stdcall;
+{$EXTERNALSYM ADsBuildEnumerator}
+
+function ADsFreeEnumerator(var pEnumVariant: IEnumVARIANT): HRESULT;
+{$EXTERNALSYM ADsFreeEnumerator}
+
+function ADsEnumerateNext(pEnumVariant: IEnumVARIANT; cElements: ULONG;
+ var pvar: OleVariant; var pcElementsFetched: ULONG): HRESULT; stdcall;
+{$EXTERNALSYM ADsEnumerateNext}
+
+function ADsBuildVarArrayStr(lppPathNames: LPWSTR; dwPathNames: DWORD;
+ var pVar: OleVariant): HRESULT; stdcall;
+{$EXTERNALSYM ADsBuildVarArrayStr}
+
+function ADsBuildVarArrayInt(lpdwObjectTypes: LPDWORD; dwObjectTypes: DWORD;
+ var pVar: OleVariant): HRESULT; stdcall;
+{$EXTERNALSYM ADsBuildVarArrayInt}
+
+function ADsOpenObject(lpszPathName, lpszUserName, lpszPassword: LPCWSTR;
+ dwReserved: DWORD; const riid: REFIID; out ppObject: Pointer): HRESULT; stdcall;
+{$EXTERNALSYM ADsOpenObject}
+
+//
+// Helper functions for extended error support
+//
+
+function ADsGetLastError(var lpError: DWORD; lpErrorBuf: LPWSTR;
+ dwErrorBufLen: DWORD; lpNameBuf: LPWSTR; dwNameBufLen: DWORD): HRESULT; stdcall;
+{$EXTERNALSYM ADsGetLastError}
+
+procedure ADsSetLastError(dwErr: DWORD; pszError, pszProvider: LPCWSTR); stdcall;
+{$EXTERNALSYM ADsSetLastError}
+
+//procedure ADsFreeAllErrorRecords; stdcall;
+//{$EXTERNALSYM ADsFreeAllErrorRecords}
+
+function AllocADsMem(cb: DWORD): LPVOID; stdcall;
+{$EXTERNALSYM AllocADsMem}
+
+function FreeADsMem(pMem: LPVOID): BOOL; stdcall;
+{$EXTERNALSYM FreeADsMem}
+
+function ReallocADsMem(pOldMem: LPVOID; cbOld, cbNew: DWORD): LPVOID; stdcall;
+{$EXTERNALSYM ReallocADsMem}
+
+function AllocADsStr(pStr: LPCWSTR): LPWSTR; stdcall;
+{$EXTERNALSYM AllocADsStr}
+
+function FreeADsStr(pStr: LPWSTR): BOOL; stdcall;
+{$EXTERNALSYM FreeADsStr}
+
+function ReallocADsStr(var ppStr: LPWSTR; pStr: LPWSTR): BOOL; stdcall;
+{$EXTERNALSYM ReallocADsStr}
+
+function ADsEncodeBinaryData(pbSrcData: PBYTE; dwSrcLen: DWORD;
+ var ppszDestData: LPWSTR): HRESULT; stdcall;
+{$EXTERNALSYM ADsEncodeBinaryData}
+
+function ADsDecodeBinaryData(szSrcData: LPCWSTR; var ppbDestData: PBYTE;
+ var pdwDestLen: ULONG): HRESULT; stdcall;
+{$EXTERNALSYM ADsDecodeBinaryData}
+
+function PropVariantToAdsType(var pVariant: OleVariant; dwNumVariant: DWORD;
+ var ppAdsValues: PADSVALUE; pdwNumValues: PDWORD): HRESULT; stdcall;
+{$EXTERNALSYM PropVariantToAdsType}
+
+function AdsTypeToPropVariant(pAdsValues: PADSVALUE; dwNumValues: DWORD;
+ var pVariant: OleVariant): HRESULT; stdcall;
+{$EXTERNALSYM AdsTypeToPropVariant}
+
+procedure AdsFreeAdsValues(pAdsValues: PADSVALUE; dwNumValues: DWORD); stdcall;
+{$EXTERNALSYM AdsFreeAdsValues}
+
+//
+// Error codes for Ole Ds - generated from ..\..\errmsg
+//
+
+//#include "adserr.h"
+
+// ---------------------- HRESULT value definitions -----------------
+//
+// HRESULT definitions
+//
+
+//
+// Values are 32 bit values layed out as follows:
+//
+// 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1
+// 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
+// +---+-+-+-----------------------+-------------------------------+
+// |Sev|C|R| Facility | Code |
+// +---+-+-+-----------------------+-------------------------------+
+//
+// where
+//
+// Sev - is the severity code
+//
+// 00 - Success
+// 01 - Informational
+// 10 - Warning
+// 11 - Error
+//
+// C - is the Customer code flag
+//
+// R - is a reserved bit
+//
+// Facility - is the facility code
+//
+// Code - is the facility's status code
+//
+//
+// Define the facility codes
+//
+
+const
+ FACILITY_WINDOWS = 8;
+ {$EXTERNALSYM FACILITY_WINDOWS}
+ FACILITY_STORAGE = 3;
+ {$EXTERNALSYM FACILITY_STORAGE}
+ FACILITY_RPC = 1;
+ {$EXTERNALSYM FACILITY_RPC}
+ FACILITY_SSPI = 9;
+ {$EXTERNALSYM FACILITY_SSPI}
+ FACILITY_WIN32 = 7;
+ {$EXTERNALSYM FACILITY_WIN32}
+ FACILITY_CONTROL = 10;
+ {$EXTERNALSYM FACILITY_CONTROL}
+ FACILITY_NULL = 0;
+ {$EXTERNALSYM FACILITY_NULL}
+ FACILITY_ITF = 4;
+ {$EXTERNALSYM FACILITY_ITF}
+ FACILITY_DISPATCH = 2;
+ {$EXTERNALSYM FACILITY_DISPATCH}
+
+//
+// Define the severity codes
+//
+
+//
+// MessageId: E_ADS_BAD_PATHNAME
+//
+// MessageText:
+//
+// An invalid Active Directory pathname was passed
+//
+
+ E_ADS_BAD_PATHNAME = HRESULT($80005000);
+ {$EXTERNALSYM E_ADS_BAD_PATHNAME}
+
+//
+// MessageId: E_ADS_INVALID_DOMAIN_OBJECT
+//
+// MessageText:
+//
+// An unknown Active Directory domain object was requested
+//
+
+ E_ADS_INVALID_DOMAIN_OBJECT = HRESULT($80005001);
+ {$EXTERNALSYM E_ADS_INVALID_DOMAIN_OBJECT}
+
+//
+// MessageId: E_ADS_INVALID_USER_OBJECT
+//
+// MessageText:
+//
+// An unknown Active Directory user object was requested
+//
+
+ E_ADS_INVALID_USER_OBJECT = HRESULT($80005002);
+ {$EXTERNALSYM E_ADS_INVALID_USER_OBJECT}
+
+//
+// MessageId: E_ADS_INVALID_COMPUTER_OBJECT
+//
+// MessageText:
+//
+// An unknown Active Directory computer object was requested
+//
+
+ E_ADS_INVALID_COMPUTER_OBJECT = HRESULT($80005003);
+ {$EXTERNALSYM E_ADS_INVALID_COMPUTER_OBJECT}
+
+//
+// MessageId: E_ADS_UNKNOWN_OBJECT
+//
+// MessageText:
+//
+// An unknown Active Directory object was requested
+//
+
+ E_ADS_UNKNOWN_OBJECT = HRESULT($80005004);
+ {$EXTERNALSYM E_ADS_UNKNOWN_OBJECT}
+
+//
+// MessageId: E_ADS_PROPERTY_NOT_SET
+//
+// MessageText:
+//
+// The specified Active Directory property was not set
+//
+
+ E_ADS_PROPERTY_NOT_SET = HRESULT($80005005);
+ {$EXTERNALSYM E_ADS_PROPERTY_NOT_SET}
+
+//
+// MessageId: E_ADS_PROPERTY_NOT_SUPPORTED
+//
+// MessageText:
+//
+// The specified Active Directory property is not supported
+//
+
+ E_ADS_PROPERTY_NOT_SUPPORTED = HRESULT($80005006);
+ {$EXTERNALSYM E_ADS_PROPERTY_NOT_SUPPORTED}
+
+//
+// MessageId: E_ADS_PROPERTY_INVALID
+//
+// MessageText:
+//
+// The specified Active Directory property is invalid
+//
+
+ E_ADS_PROPERTY_INVALID = HRESULT($80005007);
+ {$EXTERNALSYM E_ADS_PROPERTY_INVALID}
+
+//
+// MessageId: E_ADS_BAD_PARAMETER
+//
+// MessageText:
+//
+// One or more input parameters are invalid
+//
+
+ E_ADS_BAD_PARAMETER = HRESULT($80005008);
+ {$EXTERNALSYM E_ADS_BAD_PARAMETER}
+
+//
+// MessageId: E_ADS_OBJECT_UNBOUND
+//
+// MessageText:
+//
+// The specified Active Directory object is not bound to a remote resource
+//
+
+ E_ADS_OBJECT_UNBOUND = HRESULT($80005009);
+ {$EXTERNALSYM E_ADS_OBJECT_UNBOUND}
+
+//
+// MessageId: E_ADS_PROPERTY_NOT_MODIFIED
+//
+// MessageText:
+//
+// The specified Active Directory object has not been modified
+//
+
+ E_ADS_PROPERTY_NOT_MODIFIED = HRESULT($8000500A);
+ {$EXTERNALSYM E_ADS_PROPERTY_NOT_MODIFIED}
+
+//
+// MessageId: E_ADS_PROPERTY_MODIFIED
+//
+// MessageText:
+//
+// The specified Active Directory object has not been modified
+//
+
+ E_ADS_PROPERTY_MODIFIED = HRESULT($8000500B);
+ {$EXTERNALSYM E_ADS_PROPERTY_MODIFIED}
+
+//
+// MessageId: E_ADS_CANT_CONVERT_DATATYPE
+//
+// MessageText:
+//
+// The Active Directory datatype cannot be converted to/from a native DS datatype
+//
+
+ E_ADS_CANT_CONVERT_DATATYPE = HRESULT($8000500C);
+ {$EXTERNALSYM E_ADS_CANT_CONVERT_DATATYPE}
+
+//
+// MessageId: E_ADS_PROPERTY_NOT_FOUND
+//
+// MessageText:
+//
+// The Active Directory property cannot be found in the cache.
+//
+
+ E_ADS_PROPERTY_NOT_FOUND = HRESULT($8000500D);
+ {$EXTERNALSYM E_ADS_PROPERTY_NOT_FOUND}
+
+//
+// MessageId: E_ADS_OBJECT_EXISTS
+//
+// MessageText:
+//
+// The Active Directory object exists.
+//
+
+ E_ADS_OBJECT_EXISTS = HRESULT($8000500E);
+ {$EXTERNALSYM E_ADS_OBJECT_EXISTS}
+
+//
+// MessageId: E_ADS_SCHEMA_VIOLATION
+//
+// MessageText:
+//
+// The attempted action violates the DS schema rules.
+//
+
+ E_ADS_SCHEMA_VIOLATION = HRESULT($8000500F);
+ {$EXTERNALSYM E_ADS_SCHEMA_VIOLATION}
+
+//
+// MessageId: E_ADS_COLUMN_NOT_SET
+//
+// MessageText:
+//
+// The specified column in the Active Directory was not set.
+//
+
+ E_ADS_COLUMN_NOT_SET = HRESULT($80005010);
+ {$EXTERNALSYM E_ADS_COLUMN_NOT_SET}
+
+//
+// MessageId: S_ADS_ERRORSOCCURRED
+//
+// MessageText:
+//
+// One or more errors occurred
+//
+
+ S_ADS_ERRORSOCCURRED = HRESULT($00005011);
+ {$EXTERNALSYM S_ADS_ERRORSOCCURRED}
+
+//
+// MessageId: S_ADS_NOMORE_ROWS
+//
+// MessageText:
+//
+// No more rows to be obatained by the search result.
+//
+
+ S_ADS_NOMORE_ROWS = HRESULT($00005012);
+ {$EXTERNALSYM S_ADS_NOMORE_ROWS}
+
+//
+// MessageId: S_ADS_NOMORE_COLUMNS
+//
+// MessageText:
+//
+// No more columns to be obatained for the current row.
+//
+
+ S_ADS_NOMORE_COLUMNS = HRESULT($00005013);
+ {$EXTERNALSYM S_ADS_NOMORE_COLUMNS}
+
+//
+// MessageId: E_ADS_INVALID_FILTER
+//
+// MessageText:
+//
+// The search filter specified is invalid
+//
+
+ E_ADS_INVALID_FILTER = HRESULT($80005014);
+ {$EXTERNALSYM E_ADS_INVALID_FILTER}
+
+//
+// Globally accessible GUIDS
+//
+
+//#include "adsiid.h" -> adstlb from activeds.dll
+
+//
+// Status codes for ads objects
+//
+
+//#include "adssts.h"
+
+const
+ ADS_PRINTER_PAUSED = $00000001;
+ {$EXTERNALSYM ADS_PRINTER_PAUSED}
+ ADS_PRINTER_PENDING_DELETION = $00000002;
+ {$EXTERNALSYM ADS_PRINTER_PENDING_DELETION}
+ ADS_PRINTER_ERROR = $00000003;
+ {$EXTERNALSYM ADS_PRINTER_ERROR}
+ ADS_PRINTER_PAPER_JAM = $00000004;
+ {$EXTERNALSYM ADS_PRINTER_PAPER_JAM}
+ ADS_PRINTER_PAPER_OUT = $00000005;
+ {$EXTERNALSYM ADS_PRINTER_PAPER_OUT}
+ ADS_PRINTER_MANUAL_FEED = $00000006;
+ {$EXTERNALSYM ADS_PRINTER_MANUAL_FEED}
+ ADS_PRINTER_PAPER_PROBLEM = $00000007;
+ {$EXTERNALSYM ADS_PRINTER_PAPER_PROBLEM}
+ ADS_PRINTER_OFFLINE = $00000008;
+ {$EXTERNALSYM ADS_PRINTER_OFFLINE}
+ ADS_PRINTER_IO_ACTIVE = $00000100;
+ {$EXTERNALSYM ADS_PRINTER_IO_ACTIVE}
+ ADS_PRINTER_BUSY = $00000200;
+ {$EXTERNALSYM ADS_PRINTER_BUSY}
+ ADS_PRINTER_PRINTING = $00000400;
+ {$EXTERNALSYM ADS_PRINTER_PRINTING}
+ ADS_PRINTER_OUTPUT_BIN_FULL = $00000800;
+ {$EXTERNALSYM ADS_PRINTER_OUTPUT_BIN_FULL}
+ ADS_PRINTER_NOT_AVAILABLE = $00001000;
+ {$EXTERNALSYM ADS_PRINTER_NOT_AVAILABLE}
+ ADS_PRINTER_WAITING = $00002000;
+ {$EXTERNALSYM ADS_PRINTER_WAITING}
+ ADS_PRINTER_PROCESSING = $00004000;
+ {$EXTERNALSYM ADS_PRINTER_PROCESSING}
+ ADS_PRINTER_INITIALIZING = $00008000;
+ {$EXTERNALSYM ADS_PRINTER_INITIALIZING}
+ ADS_PRINTER_WARMING_UP = $00010000;
+ {$EXTERNALSYM ADS_PRINTER_WARMING_UP}
+ ADS_PRINTER_TONER_LOW = $00020000;
+ {$EXTERNALSYM ADS_PRINTER_TONER_LOW}
+ ADS_PRINTER_NO_TONER = $00040000;
+ {$EXTERNALSYM ADS_PRINTER_NO_TONER}
+ ADS_PRINTER_PAGE_PUNT = $00080000;
+ {$EXTERNALSYM ADS_PRINTER_PAGE_PUNT}
+ ADS_PRINTER_USER_INTERVENTION = $00100000;
+ {$EXTERNALSYM ADS_PRINTER_USER_INTERVENTION}
+ ADS_PRINTER_OUT_OF_MEMORY = $00200000;
+ {$EXTERNALSYM ADS_PRINTER_OUT_OF_MEMORY}
+ ADS_PRINTER_DOOR_OPEN = $00400000;
+ {$EXTERNALSYM ADS_PRINTER_DOOR_OPEN}
+ ADS_PRINTER_SERVER_UNKNOWN = $00800000;
+ {$EXTERNALSYM ADS_PRINTER_SERVER_UNKNOWN}
+ ADS_PRINTER_POWER_SAVE = $01000000;
+ {$EXTERNALSYM ADS_PRINTER_POWER_SAVE}
+
+//
+// job status values
+//
+
+ ADS_JOB_PAUSED = $00000001;
+ {$EXTERNALSYM ADS_JOB_PAUSED}
+ ADS_JOB_ERROR = $00000002;
+ {$EXTERNALSYM ADS_JOB_ERROR}
+ ADS_JOB_DELETING = $00000004;
+ {$EXTERNALSYM ADS_JOB_DELETING}
+ ADS_JOB_SPOOLING = $00000008;
+ {$EXTERNALSYM ADS_JOB_SPOOLING}
+ ADS_JOB_PRINTING = $00000010;
+ {$EXTERNALSYM ADS_JOB_PRINTING}
+ ADS_JOB_OFFLINE = $00000020;
+ {$EXTERNALSYM ADS_JOB_OFFLINE}
+ ADS_JOB_PAPEROUT = $00000040;
+ {$EXTERNALSYM ADS_JOB_PAPEROUT}
+ ADS_JOB_PRINTED = $00000080;
+ {$EXTERNALSYM ADS_JOB_PRINTED}
+ ADS_JOB_DELETED = $00000100;
+ {$EXTERNALSYM ADS_JOB_DELETED}
+
+//
+// service status values
+//
+
+ ADS_SERVICE_STOPPED = $00000001;
+ {$EXTERNALSYM ADS_SERVICE_STOPPED}
+ ADS_SERVICE_START_PENDING = $00000002;
+ {$EXTERNALSYM ADS_SERVICE_START_PENDING}
+ ADS_SERVICE_STOP_PENDING = $00000003;
+ {$EXTERNALSYM ADS_SERVICE_STOP_PENDING}
+ ADS_SERVICE_RUNNING = $00000004;
+ {$EXTERNALSYM ADS_SERVICE_RUNNING}
+ ADS_SERVICE_CONTINUE_PENDING = $00000005;
+ {$EXTERNALSYM ADS_SERVICE_CONTINUE_PENDING}
+ ADS_SERVICE_PAUSE_PENDING = $00000006;
+ {$EXTERNALSYM ADS_SERVICE_PAUSE_PENDING}
+ ADS_SERVICE_PAUSED = $00000007;
+ {$EXTERNALSYM ADS_SERVICE_PAUSED}
+ ADS_SERVICE_ERROR = $00000008;
+ {$EXTERNALSYM ADS_SERVICE_ERROR}
+
+//---------------------------------------------------------------------
+
+//
+// Service Type Valid Values
+//
+
+ ADS_SERVICE_OWN_PROCESS = $00000010;
+ {$EXTERNALSYM ADS_SERVICE_OWN_PROCESS}
+ ADS_SERVICE_SHARE_PROCESS = $00000020;
+ {$EXTERNALSYM ADS_SERVICE_SHARE_PROCESS}
+ ADS_SERVICE_KERNEL_DRIVER = $00000001;
+ {$EXTERNALSYM ADS_SERVICE_KERNEL_DRIVER}
+ ADS_SERVICE_FILE_SYSTEM_DRIVER = $00000002;
+ {$EXTERNALSYM ADS_SERVICE_FILE_SYSTEM_DRIVER}
+
+//
+// Start Type Valid Values
+//
+
+ ADS_SERVICE_BOOT_START = SERVICE_BOOT_START;
+ {$EXTERNALSYM ADS_SERVICE_BOOT_START}
+ ADS_SERVICE_SYSTEM_START = SERVICE_SYSTEM_START;
+ {$EXTERNALSYM ADS_SERVICE_SYSTEM_START}
+ ADS_SERVICE_AUTO_START = SERVICE_AUTO_START;
+ {$EXTERNALSYM ADS_SERVICE_AUTO_START}
+ ADS_SERVICE_DEMAND_START = SERVICE_DEMAND_START;
+ {$EXTERNALSYM ADS_SERVICE_DEMAND_START}
+ ADS_SERVICE_DISABLED = SERVICE_DISABLED;
+ {$EXTERNALSYM ADS_SERVICE_DISABLED}
+
+//
+// Error Control Values
+//
+
+ ADS_SERVICE_ERROR_IGNORE = 0;
+ {$EXTERNALSYM ADS_SERVICE_ERROR_IGNORE}
+ ADS_SERVICE_ERROR_NORMAL = 1;
+ {$EXTERNALSYM ADS_SERVICE_ERROR_NORMAL}
+ ADS_SERVICE_ERROR_SEVERE = 2;
+ {$EXTERNALSYM ADS_SERVICE_ERROR_SEVERE}
+ ADS_SERVICE_ERROR_CRITICAL = 3;
+ {$EXTERNALSYM ADS_SERVICE_ERROR_CRITICAL}
+
+//
+// Schema class names and other schema related definitions
+//
+
+//#include "adsnms.h"
+
+const
+ NAMESPACE_CLASS_NAME = 'Namespace';
+ {$EXTERNALSYM NAMESPACE_CLASS_NAME}
+ COUNTRY_CLASS_NAME = 'Country';
+ {$EXTERNALSYM COUNTRY_CLASS_NAME}
+ LOCALITY_CLASS_NAME = 'Locality';
+ {$EXTERNALSYM LOCALITY_CLASS_NAME}
+ ORGANIZATION_CLASS_NAME = 'Organization';
+ {$EXTERNALSYM ORGANIZATION_CLASS_NAME}
+ ORGANIZATIONUNIT_CLASS_NAME = 'Organizational Unit';
+ {$EXTERNALSYM ORGANIZATIONUNIT_CLASS_NAME}
+ DOMAIN_CLASS_NAME = 'Domain';
+ {$EXTERNALSYM DOMAIN_CLASS_NAME}
+ COMPUTER_CLASS_NAME = 'Computer';
+ {$EXTERNALSYM COMPUTER_CLASS_NAME}
+ USER_CLASS_NAME = 'User';
+ {$EXTERNALSYM USER_CLASS_NAME}
+ GROUP_CLASS_NAME = 'Group';
+ {$EXTERNALSYM GROUP_CLASS_NAME}
+ GLOBALGROUP_CLASS_NAME = 'GlobalGroup';
+ {$EXTERNALSYM GLOBALGROUP_CLASS_NAME}
+ LOCALGROUP_CLASS_NAME = 'LocalGroup';
+ {$EXTERNALSYM LOCALGROUP_CLASS_NAME}
+ SERVICE_CLASS_NAME = 'Service';
+ {$EXTERNALSYM SERVICE_CLASS_NAME}
+ FILESERVICE_CLASS_NAME = 'FileService';
+ {$EXTERNALSYM FILESERVICE_CLASS_NAME}
+ SESSION_CLASS_NAME = 'Session';
+ {$EXTERNALSYM SESSION_CLASS_NAME}
+ RESOURCE_CLASS_NAME = 'Resource';
+ {$EXTERNALSYM RESOURCE_CLASS_NAME}
+ FILESHARE_CLASS_NAME = 'FileShare';
+ {$EXTERNALSYM FILESHARE_CLASS_NAME}
+ PRINTER_CLASS_NAME = 'PrintQueue';
+ {$EXTERNALSYM PRINTER_CLASS_NAME}
+ PRINTJOB_CLASS_NAME = 'PrintJob';
+ {$EXTERNALSYM PRINTJOB_CLASS_NAME}
+ SCHEMA_CLASS_NAME = 'Schema';
+ {$EXTERNALSYM SCHEMA_CLASS_NAME}
+ CLASS_CLASS_NAME = 'Class';
+ {$EXTERNALSYM CLASS_CLASS_NAME}
+ PROPERTY_CLASS_NAME = 'Property';
+ {$EXTERNALSYM PROPERTY_CLASS_NAME}
+ SYNTAX_CLASS_NAME = 'Syntax';
+ {$EXTERNALSYM SYNTAX_CLASS_NAME}
+ ROOTDSE_CLASS_NAME = 'RootDSE';
+ {$EXTERNALSYM ROOTDSE_CLASS_NAME}
+
+ NO_SCHEMA = '';
+ {$EXTERNALSYM NO_SCHEMA}
+ DOMAIN_SCHEMA_NAME = 'Domain';
+ {$EXTERNALSYM DOMAIN_SCHEMA_NAME}
+ COMPUTER_SCHEMA_NAME = 'Computer';
+ {$EXTERNALSYM COMPUTER_SCHEMA_NAME}
+ USER_SCHEMA_NAME = 'User';
+ {$EXTERNALSYM USER_SCHEMA_NAME}
+ GROUP_SCHEMA_NAME = 'Group';
+ {$EXTERNALSYM GROUP_SCHEMA_NAME}
+ GLOBALGROUP_SCHEMA_NAME = 'GlobalGroup';
+ {$EXTERNALSYM GLOBALGROUP_SCHEMA_NAME}
+ LOCALGROUP_SCHEMA_NAME = 'LocalGroup';
+ {$EXTERNALSYM LOCALGROUP_SCHEMA_NAME}
+ SERVICE_SCHEMA_NAME = 'Service';
+ {$EXTERNALSYM SERVICE_SCHEMA_NAME}
+ PRINTER_SCHEMA_NAME = 'PrintQueue';
+ {$EXTERNALSYM PRINTER_SCHEMA_NAME}
+ PRINTJOB_SCHEMA_NAME = 'PrintJob';
+ {$EXTERNALSYM PRINTJOB_SCHEMA_NAME}
+ FILESERVICE_SCHEMA_NAME = 'FileService';
+ {$EXTERNALSYM FILESERVICE_SCHEMA_NAME}
+ SESSION_SCHEMA_NAME = 'Session';
+ {$EXTERNALSYM SESSION_SCHEMA_NAME}
+ RESOURCE_SCHEMA_NAME = 'Resource';
+ {$EXTERNALSYM RESOURCE_SCHEMA_NAME}
+ FILESHARE_SCHEMA_NAME = 'FileShare';
+ {$EXTERNALSYM FILESHARE_SCHEMA_NAME}
+ FPNW_FILESERVICE_SCHEMA_NAME = 'FPNWFileService';
+ {$EXTERNALSYM FPNW_FILESERVICE_SCHEMA_NAME}
+ FPNW_SESSION_SCHEMA_NAME = 'FPNWSession';
+ {$EXTERNALSYM FPNW_SESSION_SCHEMA_NAME}
+ FPNW_RESOURCE_SCHEMA_NAME = 'FPNWResource';
+ {$EXTERNALSYM FPNW_RESOURCE_SCHEMA_NAME}
+ FPNW_FILESHARE_SCHEMA_NAME = 'FPNWFileShare';
+ {$EXTERNALSYM FPNW_FILESHARE_SCHEMA_NAME}
+
+//
+// Definitions in the OLE DB provider for ADSI
+//
+
+//#include "adsdb.h"
+
+//
+// printer status values
+//
+
+// Most of the constants have been moved into an enum in adstype.h and
+// are available publicly in iads.h. This file has been left here so that
+// old references to adsdb.h do not break compiles.
+
+const
+ DBPROPFLAGS_ADSISEARCH = $0000C000;
+ {$EXTERNALSYM DBPROPFLAGS_ADSISEARCH}
+
+//#include "adsprop.h"
+
+// Windows NT Active Directory Service Property Pages
+//
+// Contents: Functions and definitions used in the creation of AD property
+// sheets.
+
+const
+ WM_ADSPROP_NOTIFY_PAGEINIT = WM_USER + 1101; // where LPARAM is the PADSPROPINITPARAMS pointer.
+ {$EXTERNALSYM WM_ADSPROP_NOTIFY_PAGEINIT}
+ WM_ADSPROP_NOTIFY_PAGEHWND = WM_USER + 1102; // where WPARAM => page's HWND
+ {$EXTERNALSYM WM_ADSPROP_NOTIFY_PAGEHWND}
+ WM_ADSPROP_NOTIFY_CHANGE = WM_USER + 1103; // used to send a change notification to a parent sheet
+ {$EXTERNALSYM WM_ADSPROP_NOTIFY_CHANGE}
+ WM_ADSPROP_NOTIFY_APPLY = WM_USER + 1104; // pages send this to the notification object.
+ {$EXTERNALSYM WM_ADSPROP_NOTIFY_APPLY}
+ WM_ADSPROP_NOTIFY_SETFOCUS = WM_USER + 1105; // used internally by the notification object.
+ {$EXTERNALSYM WM_ADSPROP_NOTIFY_SETFOCUS}
+ WM_ADSPROP_NOTIFY_FOREGROUND = WM_USER + 1106; // used internally by the notification object.
+ {$EXTERNALSYM WM_ADSPROP_NOTIFY_FOREGROUND}
+ WM_ADSPROP_NOTIFY_EXIT = WM_USER + 1107; // sent on page release
+ {$EXTERNALSYM WM_ADSPROP_NOTIFY_EXIT}
+
+//+----------------------------------------------------------------------------
+//
+// Structure: ADSPROPINITPARAMS
+//
+// Usage: Used to pass page initialization information to new pages from
+// the notify object.
+//
+//-----------------------------------------------------------------------------
+
+type
+ PADSPROPINITPARAMS = ^ADSPROPINITPARAMS;
+ {$EXTERNALSYM PADSPROPINITPARAMS}
+ _ADSPROPINITPARAMS = record
+ dwSize: DWORD; // Set this to the size of the struct.
+ dwFlags: DWORD; // Reserved for future use.
+ hr: HRESULT; // If this is non-zero, then the others
+ pDsObj: IDirectoryObject; // should be ignored.
+ pwzCN: LPWSTR;
+ pWritableAttrs: PADS_ATTR_INFO;
+ end;
+ {$EXTERNALSYM _ADSPROPINITPARAMS}
+ ADSPROPINITPARAMS = _ADSPROPINITPARAMS;
+ {$EXTERNALSYM ADSPROPINITPARAMS}
+ TAdsPropInitParams = ADSPROPINITPARAMS;
+
+//+----------------------------------------------------------------------------
+//
+// Function: ADsPropCreateNotifyObj
+//
+// Synopsis: Checks to see if the notification window/object exists for this
+// sheet instance and if not creates it.
+//
+// Arguments: [pAppThdDataObj] - the unmarshalled data object pointer.
+// [pwzADsObjName] - object path name.
+// [phNotifyObj] - to return the notificion window handle.
+//
+// Returns: HRESULTs.
+//
+//-----------------------------------------------------------------------------
+
+function ADsPropCreateNotifyObj(pAppThdDataObj: Pointer; {LPDATAOBJECT}
+ pwzADsObjName: PWSTR; var phNotifyObj: HWND): HRESULT; stdcall;
+{$EXTERNALSYM ADsPropCreateNotifyObj}
+
+//+----------------------------------------------------------------------------
+//
+// Function: ADsPropGetInitInfo
+//
+// Synopsis: Pages call this at their init time to retreive DS object info.
+//
+// Arguments: [hNotifyObj] - the notificion window handle.
+// [pInitParams] - struct filled in with DS object info. This
+// struct must be allocated by the caller before
+// the call.
+//
+// Returns: FALSE if the notify window has gone away for some reason or
+// if the parameters are invalid.
+//
+// Notes: This call results in the sending of the
+// WM_ADSPROP_NOTIFY_PAGEINIT message to the notify window.
+// pInitParams->pWritableAttrs can be NULL if there are no
+// writable attributes.
+//
+//-----------------------------------------------------------------------------
+
+function ADsPropGetInitInfo(hNotifyObj: HWND; pInitParams: PADSPROPINITPARAMS): BOOL; stdcall;
+{$EXTERNALSYM ADsPropGetInitInfo}
+
+//+----------------------------------------------------------------------------
+//
+// Function: ADsPropSetHwnd
+//
+// Synopsis: Pages call this at their dialog init time to send their hwnd.
+//
+// Arguments: [hNotifyObj] - the notificion window handle.
+// [hPage] - the page's window handle.
+//
+// Returns: FALSE if the notify window has gone away for some reason.
+//
+// Notes: Sends the WM_ADSPROP_NOTIFY_PAGEHWND message to the notify
+// window.
+//
+//-----------------------------------------------------------------------------
+
+function ADsPropSetHwnd(hNotifyObj: HWND; hPage: HWND): BOOL; stdcall;
+{$EXTERNALSYM ADsPropSetHwnd}
+
+//+----------------------------------------------------------------------------
+//
+// function: ADsPropCheckIfWritable
+//
+// Synopsis: See if the attribute is writable by checking if it is in
+// the allowedAttributesEffective array.
+//
+// Arguments: [pwzAttr] - the attribute name.
+// [pWritableAttrs] - the array of writable attributes.
+//
+// Returns: FALSE if the attribute name is not found in the writable-attrs
+// array or if the array pointer is NULL.
+//
+//-----------------------------------------------------------------------------
+
+function ADsPropCheckIfWritable(pwzAttr: PWSTR; pWritableAttrs: PADS_ATTR_INFO): BOOL; stdcall;
+{$EXTERNALSYM ADsPropCheckIfWritable}
+
+implementation
+
+const
+ adslib = 'activeds.dll';
+ dsprop = 'dsprop.dll';
+
+// adshlp.h
+
+function _ADsFreeEnumerator(pEnumVariant: IEnumVARIANT): HRESULT; stdcall; external adslib name 'ADsFreeEnumerator';
+
+function ADsFreeEnumerator(var pEnumVariant: IEnumVARIANT): HRESULT;
+begin
+ Result := _ADsFreeEnumerator(pEnumVariant);
+ // ADsFreeEnumerator doesn't set pEnumVariant to nil causing Delphi to call
+ // Release() again when pEnumVariant leaves scope. Result would be an access
+ // violation, explicitly setting the interface to nil prevents this.
+ if Result = 0 {S_OK} then
+ Pointer(pEnumVariant) := nil;
+end;
+
+//procedure ADsFreeAllErrorRecords
+
+// adsprop.h
+
+{$IFDEF DYNAMIC_LINK}
+
+var
+ _ADsGetObject: Pointer;
+
+function ADsGetObject;
+begin
+ GetProcedureAddress(_ADsGetObject, adslib, 'ADsGetObject');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ADsGetObject]
+ end;
+end;
+
+var
+ _ADsBuildEnumerator: Pointer;
+
+function ADsBuildEnumerator;
+begin
+ GetProcedureAddress(_ADsBuildEnumerator, adslib, 'ADsBuildEnumerator');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ADsBuildEnumerator]
+ end;
+end;
+
+var
+ _ADsEnumerateNext: Pointer;
+
+function ADsEnumerateNext;
+begin
+ GetProcedureAddress(_ADsEnumerateNext, adslib, 'ADsEnumerateNext');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ADsEnumerateNext]
+ end;
+end;
+
+var
+ _ADsBuildVarArrayStr: Pointer;
+
+function ADsBuildVarArrayStr;
+begin
+ GetProcedureAddress(_ADsBuildVarArrayStr, adslib, 'ADsBuildVarArrayStr');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ADsBuildVarArrayStr]
+ end;
+end;
+
+var
+ _ADsBuildVarArrayInt: Pointer;
+
+function ADsBuildVarArrayInt;
+begin
+ GetProcedureAddress(_ADsBuildVarArrayInt, adslib, 'ADsBuildVarArrayInt');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ADsBuildVarArrayInt]
+ end;
+end;
+
+var
+ _ADsOpenObject: Pointer;
+
+function ADsOpenObject;
+begin
+ GetProcedureAddress(_ADsOpenObject, adslib, 'ADsOpenObject');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ADsOpenObject]
+ end;
+end;
+
+var
+ _ADsGetLastError: Pointer;
+
+function ADsGetLastError;
+begin
+ GetProcedureAddress(_ADsGetLastError, adslib, 'ADsGetLastError');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ADsGetLastError]
+ end;
+end;
+
+var
+ _ADsSetLastError: Pointer;
+
+procedure ADsSetLastError;
+begin
+ GetProcedureAddress(_ADsSetLastError, adslib, 'ADsSetLastError');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ADsSetLastError]
+ end;
+end;
+
+var
+ _AllocADsMem: Pointer;
+
+function AllocADsMem;
+begin
+ GetProcedureAddress(_AllocADsMem, adslib, 'AllocADsMem');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_AllocADsMem]
+ end;
+end;
+
+var
+ _FreeADsMem: Pointer;
+
+function FreeADsMem;
+begin
+ GetProcedureAddress(_FreeADsMem, adslib, 'FreeADsMem');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_FreeADsMem]
+ end;
+end;
+
+var
+ _ReallocADsMem: Pointer;
+
+function ReallocADsMem;
+begin
+ GetProcedureAddress(_ReallocADsMem, adslib, 'ReallocADsMem');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ReallocADsMem]
+ end;
+end;
+
+var
+ _AllocADsStr: Pointer;
+
+function AllocADsStr;
+begin
+ GetProcedureAddress(_AllocADsStr, adslib, 'AllocADsStr');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_AllocADsStr]
+ end;
+end;
+
+var
+ _FreeADsStr: Pointer;
+
+function FreeADsStr;
+begin
+ GetProcedureAddress(_FreeADsStr, adslib, 'FreeADsStr');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_FreeADsStr]
+ end;
+end;
+
+var
+ _ReallocADsStr: Pointer;
+
+function ReallocADsStr;
+begin
+ GetProcedureAddress(_ReallocADsStr, adslib, 'ReallocADsStr');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ReallocADsStr]
+ end;
+end;
+
+var
+ _ADsEncodeBinaryData: Pointer;
+
+function ADsEncodeBinaryData;
+begin
+ GetProcedureAddress(_ADsEncodeBinaryData, adslib, 'ADsEncodeBinaryData');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ADsEncodeBinaryData]
+ end;
+end;
+
+var
+ _ADsDecodeBinaryData: Pointer;
+
+function ADsDecodeBinaryData;
+begin
+ GetProcedureAddress(_ADsDecodeBinaryData, adslib, 'ADsDecodeBinaryData');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ADsDecodeBinaryData]
+ end;
+end;
+
+var
+ _PropVariantToAdsType: Pointer;
+
+function PropVariantToAdsType;
+begin
+ GetProcedureAddress(_PropVariantToAdsType, adslib, 'PropVariantToAdsType');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PropVariantToAdsType]
+ end;
+end;
+
+var
+ _AdsTypeToPropVariant: Pointer;
+
+function AdsTypeToPropVariant;
+begin
+ GetProcedureAddress(_AdsTypeToPropVariant, adslib, 'AdsTypeToPropVariant');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_AdsTypeToPropVariant]
+ end;
+end;
+
+var
+ _AdsFreeAdsValues: Pointer;
+
+procedure AdsFreeAdsValues;
+begin
+ GetProcedureAddress(_AdsFreeAdsValues, adslib, 'AdsFreeAdsValues');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_AdsFreeAdsValues]
+ end;
+end;
+
+var
+ _ADsPropCreateNotifyObj: Pointer;
+
+function ADsPropCreateNotifyObj;
+begin
+ GetProcedureAddress(_ADsPropCreateNotifyObj, dsprop, 'ADsPropCreateNotifyObj');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ADsPropCreateNotifyObj]
+ end;
+end;
+
+var
+ _ADsPropGetInitInfo: Pointer;
+
+function ADsPropGetInitInfo;
+begin
+ GetProcedureAddress(_ADsPropGetInitInfo, dsprop, 'ADsPropGetInitInfo');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ADsPropGetInitInfo]
+ end;
+end;
+
+var
+ _ADsPropSetHwnd: Pointer;
+
+function ADsPropSetHwnd;
+begin
+ GetProcedureAddress(_ADsPropSetHwnd, dsprop, 'ADsPropSetHwnd');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ADsPropSetHwnd]
+ end;
+end;
+
+var
+ _ADsPropCheckIfWritable: Pointer;
+
+function ADsPropCheckIfWritable;
+begin
+ GetProcedureAddress(_ADsPropCheckIfWritable, dsprop, 'ADsPropCheckIfWritable');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ADsPropCheckIfWritable]
+ end;
+end;
+
+{$ELSE}
+
+function ADsGetObject; external adslib name 'ADsGetObject';
+function ADsBuildEnumerator; external adslib name 'ADsBuildEnumerator';
+function ADsEnumerateNext; external adslib name 'ADsEnumerateNext';
+function ADsBuildVarArrayStr; external adslib name 'ADsBuildVarArrayStr';
+function ADsBuildVarArrayInt; external adslib name 'ADsBuildVarArrayInt';
+function ADsOpenObject; external adslib name 'ADsOpenObject';
+function ADsGetLastError; external adslib name 'ADsGetLastError';
+procedure ADsSetLastError; external adslib name 'ADsSetLastError';
+function AllocADsMem; external adslib name 'AllocADsMem';
+function FreeADsMem; external adslib name 'FreeADsMem';
+function ReallocADsMem; external adslib name 'ReallocADsMem';
+function AllocADsStr; external adslib name 'AllocADsStr';
+function FreeADsStr; external adslib name 'FreeADsStr';
+function ReallocADsStr; external adslib name 'ReallocADsStr';
+function ADsEncodeBinaryData; external adslib name 'ADsEncodeBinaryData';
+function ADsDecodeBinaryData; external adslib name 'ADsDecodeBinaryData';
+function PropVariantToAdsType; external adslib name 'PropVariantToAdsType';
+function AdsTypeToPropVariant; external adslib name 'AdsTypeToPropVariant';
+procedure AdsFreeAdsValues; external adslib name 'AdsFreeAdsValues';
+function ADsPropCreateNotifyObj; external dsprop name 'ADsPropCreateNotifyObj';
+function ADsPropGetInitInfo; external dsprop name 'ADsPropGetInitInfo';
+function ADsPropSetHwnd; external dsprop name 'ADsPropSetHwnd';
+function ADsPropCheckIfWritable; external dsprop name 'ADsPropCheckIfWritable';
+
+{$ENDIF DYNAMIC_LINK}
+
+end.
diff --git a/packages/extra/winunits/jwaadsdb.pas b/packages/extra/winunits/jwaadsdb.pas
index f3af3e1edd..ded5974006 100644
--- a/packages/extra/winunits/jwaadsdb.pas
+++ b/packages/extra/winunits/jwaadsdb.pas
@@ -1,73 +1,73 @@
-{******************************************************************************}
-{ }
-{ Active Directory OLE DB Provider API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: adsdb.h, released June 2000. The original Pascal }
-{ code is: AdsDb.pas, released December 2000. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwaadsdb.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaAdsDb;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "adsdb.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-// Contents: Definitions for the OLE DB provider for ADSI
-
-//
-// printer status values
-//
-
-// Most of the constants have been moved into an enum in adstype.h and
-// are available publicly in iads.h. This file has been left here so that
-// old references to adsdb.h do not break compiles.
-
-const
- DBPROPFLAGS_ADSISEARCH = $0000C000;
- {$EXTERNALSYM DBPROPFLAGS_ADSISEARCH}
-
-implementation
-
-end.
+{******************************************************************************}
+{ }
+{ Active Directory OLE DB Provider API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: adsdb.h, released June 2000. The original Pascal }
+{ code is: AdsDb.pas, released December 2000. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwaadsdb.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaAdsDb;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "adsdb.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+// Contents: Definitions for the OLE DB provider for ADSI
+
+//
+// printer status values
+//
+
+// Most of the constants have been moved into an enum in adstype.h and
+// are available publicly in iads.h. This file has been left here so that
+// old references to adsdb.h do not break compiles.
+
+const
+ DBPROPFLAGS_ADSISEARCH = $0000C000;
+ {$EXTERNALSYM DBPROPFLAGS_ADSISEARCH}
+
+implementation
+
+end.
diff --git a/packages/extra/winunits/jwaadserr.pas b/packages/extra/winunits/jwaadserr.pas
index 0ddf69a0b8..54fc968e6d 100644
--- a/packages/extra/winunits/jwaadserr.pas
+++ b/packages/extra/winunits/jwaadserr.pas
@@ -1,323 +1,323 @@
-{******************************************************************************}
-{ }
-{ Active Directory Error Codes API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: adserr.h, released June 2000. The original Pascal }
-{ code is: AdsErr.pas, released December 2000. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwaadserr.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaAdsErr;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "adserr.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-//
-// Values are 32 bit values layed out as follows:
-//
-// 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1
-// 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
-// +---+-+-+-----------------------+-------------------------------+
-// |Sev|C|R| Facility | Code |
-// +---+-+-+-----------------------+-------------------------------+
-//
-// where
-//
-// Sev - is the severity code
-//
-// 00 - Success
-// 01 - Informational
-// 10 - Warning
-// 11 - Error
-//
-// C - is the Customer code flag
-//
-// R - is a reserved bit
-//
-// Facility - is the facility code
-//
-// Code - is the facility's status code
-//
-//
-// Define the facility codes
-//
-
-const
- FACILITY_WINDOWS = 8;
- {$EXTERNALSYM FACILITY_WINDOWS}
- FACILITY_STORAGE = 3;
- {$EXTERNALSYM FACILITY_STORAGE}
- FACILITY_RPC = 1;
- {$EXTERNALSYM FACILITY_RPC}
- FACILITY_SSPI = 9;
- {$EXTERNALSYM FACILITY_SSPI}
- FACILITY_WIN32 = 7;
- {$EXTERNALSYM FACILITY_WIN32}
- FACILITY_CONTROL = 10;
- {$EXTERNALSYM FACILITY_CONTROL}
- FACILITY_NULL = 0;
- {$EXTERNALSYM FACILITY_NULL}
- FACILITY_ITF = 4;
- {$EXTERNALSYM FACILITY_ITF}
- FACILITY_DISPATCH = 2;
- {$EXTERNALSYM FACILITY_DISPATCH}
-
-//
-// Define the severity codes
-//
-
-//
-// MessageId: E_ADS_BAD_PATHNAME
-//
-// MessageText:
-//
-// An invalid directory pathname was passed
-//
- E_ADS_BAD_PATHNAME = HRESULT($80005000);
- {$EXTERNALSYM E_ADS_BAD_PATHNAME}
-
-//
-// MessageId: E_ADS_INVALID_DOMAIN_OBJECT
-//
-// MessageText:
-//
-// An unknown directory domain object was requested
-//
- E_ADS_INVALID_DOMAIN_OBJECT = HRESULT($80005001);
- {$EXTERNALSYM E_ADS_INVALID_DOMAIN_OBJECT}
-
-//
-// MessageId: E_ADS_INVALID_USER_OBJECT
-//
-// MessageText:
-//
-// An unknown directory user object was requested
-//
- E_ADS_INVALID_USER_OBJECT = HRESULT($80005002);
- {$EXTERNALSYM E_ADS_INVALID_USER_OBJECT}
-
-//
-// MessageId: E_ADS_INVALID_COMPUTER_OBJECT
-//
-// MessageText:
-//
-// An unknown directory computer object was requested
-//
- E_ADS_INVALID_COMPUTER_OBJECT = HRESULT($80005003);
- {$EXTERNALSYM E_ADS_INVALID_COMPUTER_OBJECT}
-
-//
-// MessageId: E_ADS_UNKNOWN_OBJECT
-//
-// MessageText:
-//
-// An unknown directory object was requested
-//
- E_ADS_UNKNOWN_OBJECT = HRESULT($80005004);
- {$EXTERNALSYM E_ADS_UNKNOWN_OBJECT}
-
-//
-// MessageId: E_ADS_PROPERTY_NOT_SET
-//
-// MessageText:
-//
-// The specified directory property was not set
-//
- E_ADS_PROPERTY_NOT_SET = HRESULT($80005005);
- {$EXTERNALSYM E_ADS_PROPERTY_NOT_SET}
-
-//
-// MessageId: E_ADS_PROPERTY_NOT_SUPPORTED
-//
-// MessageText:
-//
-// The specified directory property is not supported
-//
- E_ADS_PROPERTY_NOT_SUPPORTED = HRESULT($80005006);
- {$EXTERNALSYM E_ADS_PROPERTY_NOT_SUPPORTED}
-
-//
-// MessageId: E_ADS_PROPERTY_INVALID
-//
-// MessageText:
-//
-// The specified directory property is invalid
-//
- E_ADS_PROPERTY_INVALID = HRESULT($80005007);
- {$EXTERNALSYM E_ADS_PROPERTY_INVALID}
-
-//
-// MessageId: E_ADS_BAD_PARAMETER
-//
-// MessageText:
-//
-// One or more input parameters are invalid
-//
- E_ADS_BAD_PARAMETER = HRESULT($80005008);
- {$EXTERNALSYM E_ADS_BAD_PARAMETER}
-
-//
-// MessageId: E_ADS_OBJECT_UNBOUND
-//
-// MessageText:
-//
-// The specified directory object is not bound to a remote resource
-//
- E_ADS_OBJECT_UNBOUND = HRESULT($80005009);
- {$EXTERNALSYM E_ADS_OBJECT_UNBOUND}
-
-//
-// MessageId: E_ADS_PROPERTY_NOT_MODIFIED
-//
-// MessageText:
-//
-// The specified directory object has not been modified
-//
- E_ADS_PROPERTY_NOT_MODIFIED = HRESULT($8000500A);
- {$EXTERNALSYM E_ADS_PROPERTY_NOT_MODIFIED}
-
-//
-// MessageId: E_ADS_PROPERTY_MODIFIED
-//
-// MessageText:
-//
-// The specified directory object has been modified
-//
- E_ADS_PROPERTY_MODIFIED = HRESULT($8000500B);
- {$EXTERNALSYM E_ADS_PROPERTY_MODIFIED}
-
-//
-// MessageId: E_ADS_CANT_CONVERT_DATATYPE
-//
-// MessageText:
-//
-// The directory datatype cannot be converted to/from a native DS datatype
-//
- E_ADS_CANT_CONVERT_DATATYPE = HRESULT($8000500C);
- {$EXTERNALSYM E_ADS_CANT_CONVERT_DATATYPE}
-
-//
-// MessageId: E_ADS_PROPERTY_NOT_FOUND
-//
-// MessageText:
-//
-// The directory property cannot be found in the cache.
-//
- E_ADS_PROPERTY_NOT_FOUND = HRESULT($8000500D);
- {$EXTERNALSYM E_ADS_PROPERTY_NOT_FOUND}
-
-//
-// MessageId: E_ADS_OBJECT_EXISTS
-//
-// MessageText:
-//
-// The directory object exists.
-//
- E_ADS_OBJECT_EXISTS = HRESULT($8000500E);
- {$EXTERNALSYM E_ADS_OBJECT_EXISTS}
-
-//
-// MessageId: E_ADS_SCHEMA_VIOLATION
-//
-// MessageText:
-//
-// The attempted action violates the DS schema rules.
-//
- E_ADS_SCHEMA_VIOLATION = HRESULT($8000500F);
- {$EXTERNALSYM E_ADS_SCHEMA_VIOLATION}
-
-//
-// MessageId: E_ADS_COLUMN_NOT_SET
-//
-// MessageText:
-//
-// The specified column in the directory was not set.
-//
- E_ADS_COLUMN_NOT_SET = HRESULT($80005010);
- {$EXTERNALSYM E_ADS_COLUMN_NOT_SET}
-
-//
-// MessageId: S_ADS_ERRORSOCCURRED
-//
-// MessageText:
-//
-// One or more errors occurred
-//
- S_ADS_ERRORSOCCURRED = HRESULT($00005011);
- {$EXTERNALSYM S_ADS_ERRORSOCCURRED}
-
-//
-// MessageId: S_ADS_NOMORE_ROWS
-//
-// MessageText:
-//
-// No more rows to be obatained by the search result.
-//
- S_ADS_NOMORE_ROWS = HRESULT($00005012);
- {$EXTERNALSYM S_ADS_NOMORE_ROWS}
-
-//
-// MessageId: S_ADS_NOMORE_COLUMNS
-//
-// MessageText:
-//
-// No more columns to be obatained for the current row.
-//
- S_ADS_NOMORE_COLUMNS = HRESULT($00005013);
- {$EXTERNALSYM S_ADS_NOMORE_COLUMNS}
-
-//
-// MessageId: E_ADS_INVALID_FILTER
-//
-// MessageText:
-//
-// The search filter specified is invalid
-//
- E_ADS_INVALID_FILTER = HRESULT($80005014);
- {$EXTERNALSYM E_ADS_INVALID_FILTER}
-
-implementation
-
-end.
+{******************************************************************************}
+{ }
+{ Active Directory Error Codes API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: adserr.h, released June 2000. The original Pascal }
+{ code is: AdsErr.pas, released December 2000. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwaadserr.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaAdsErr;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "adserr.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+//
+// Values are 32 bit values layed out as follows:
+//
+// 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1
+// 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
+// +---+-+-+-----------------------+-------------------------------+
+// |Sev|C|R| Facility | Code |
+// +---+-+-+-----------------------+-------------------------------+
+//
+// where
+//
+// Sev - is the severity code
+//
+// 00 - Success
+// 01 - Informational
+// 10 - Warning
+// 11 - Error
+//
+// C - is the Customer code flag
+//
+// R - is a reserved bit
+//
+// Facility - is the facility code
+//
+// Code - is the facility's status code
+//
+//
+// Define the facility codes
+//
+
+const
+ FACILITY_WINDOWS = 8;
+ {$EXTERNALSYM FACILITY_WINDOWS}
+ FACILITY_STORAGE = 3;
+ {$EXTERNALSYM FACILITY_STORAGE}
+ FACILITY_RPC = 1;
+ {$EXTERNALSYM FACILITY_RPC}
+ FACILITY_SSPI = 9;
+ {$EXTERNALSYM FACILITY_SSPI}
+ FACILITY_WIN32 = 7;
+ {$EXTERNALSYM FACILITY_WIN32}
+ FACILITY_CONTROL = 10;
+ {$EXTERNALSYM FACILITY_CONTROL}
+ FACILITY_NULL = 0;
+ {$EXTERNALSYM FACILITY_NULL}
+ FACILITY_ITF = 4;
+ {$EXTERNALSYM FACILITY_ITF}
+ FACILITY_DISPATCH = 2;
+ {$EXTERNALSYM FACILITY_DISPATCH}
+
+//
+// Define the severity codes
+//
+
+//
+// MessageId: E_ADS_BAD_PATHNAME
+//
+// MessageText:
+//
+// An invalid directory pathname was passed
+//
+ E_ADS_BAD_PATHNAME = HRESULT($80005000);
+ {$EXTERNALSYM E_ADS_BAD_PATHNAME}
+
+//
+// MessageId: E_ADS_INVALID_DOMAIN_OBJECT
+//
+// MessageText:
+//
+// An unknown directory domain object was requested
+//
+ E_ADS_INVALID_DOMAIN_OBJECT = HRESULT($80005001);
+ {$EXTERNALSYM E_ADS_INVALID_DOMAIN_OBJECT}
+
+//
+// MessageId: E_ADS_INVALID_USER_OBJECT
+//
+// MessageText:
+//
+// An unknown directory user object was requested
+//
+ E_ADS_INVALID_USER_OBJECT = HRESULT($80005002);
+ {$EXTERNALSYM E_ADS_INVALID_USER_OBJECT}
+
+//
+// MessageId: E_ADS_INVALID_COMPUTER_OBJECT
+//
+// MessageText:
+//
+// An unknown directory computer object was requested
+//
+ E_ADS_INVALID_COMPUTER_OBJECT = HRESULT($80005003);
+ {$EXTERNALSYM E_ADS_INVALID_COMPUTER_OBJECT}
+
+//
+// MessageId: E_ADS_UNKNOWN_OBJECT
+//
+// MessageText:
+//
+// An unknown directory object was requested
+//
+ E_ADS_UNKNOWN_OBJECT = HRESULT($80005004);
+ {$EXTERNALSYM E_ADS_UNKNOWN_OBJECT}
+
+//
+// MessageId: E_ADS_PROPERTY_NOT_SET
+//
+// MessageText:
+//
+// The specified directory property was not set
+//
+ E_ADS_PROPERTY_NOT_SET = HRESULT($80005005);
+ {$EXTERNALSYM E_ADS_PROPERTY_NOT_SET}
+
+//
+// MessageId: E_ADS_PROPERTY_NOT_SUPPORTED
+//
+// MessageText:
+//
+// The specified directory property is not supported
+//
+ E_ADS_PROPERTY_NOT_SUPPORTED = HRESULT($80005006);
+ {$EXTERNALSYM E_ADS_PROPERTY_NOT_SUPPORTED}
+
+//
+// MessageId: E_ADS_PROPERTY_INVALID
+//
+// MessageText:
+//
+// The specified directory property is invalid
+//
+ E_ADS_PROPERTY_INVALID = HRESULT($80005007);
+ {$EXTERNALSYM E_ADS_PROPERTY_INVALID}
+
+//
+// MessageId: E_ADS_BAD_PARAMETER
+//
+// MessageText:
+//
+// One or more input parameters are invalid
+//
+ E_ADS_BAD_PARAMETER = HRESULT($80005008);
+ {$EXTERNALSYM E_ADS_BAD_PARAMETER}
+
+//
+// MessageId: E_ADS_OBJECT_UNBOUND
+//
+// MessageText:
+//
+// The specified directory object is not bound to a remote resource
+//
+ E_ADS_OBJECT_UNBOUND = HRESULT($80005009);
+ {$EXTERNALSYM E_ADS_OBJECT_UNBOUND}
+
+//
+// MessageId: E_ADS_PROPERTY_NOT_MODIFIED
+//
+// MessageText:
+//
+// The specified directory object has not been modified
+//
+ E_ADS_PROPERTY_NOT_MODIFIED = HRESULT($8000500A);
+ {$EXTERNALSYM E_ADS_PROPERTY_NOT_MODIFIED}
+
+//
+// MessageId: E_ADS_PROPERTY_MODIFIED
+//
+// MessageText:
+//
+// The specified directory object has been modified
+//
+ E_ADS_PROPERTY_MODIFIED = HRESULT($8000500B);
+ {$EXTERNALSYM E_ADS_PROPERTY_MODIFIED}
+
+//
+// MessageId: E_ADS_CANT_CONVERT_DATATYPE
+//
+// MessageText:
+//
+// The directory datatype cannot be converted to/from a native DS datatype
+//
+ E_ADS_CANT_CONVERT_DATATYPE = HRESULT($8000500C);
+ {$EXTERNALSYM E_ADS_CANT_CONVERT_DATATYPE}
+
+//
+// MessageId: E_ADS_PROPERTY_NOT_FOUND
+//
+// MessageText:
+//
+// The directory property cannot be found in the cache.
+//
+ E_ADS_PROPERTY_NOT_FOUND = HRESULT($8000500D);
+ {$EXTERNALSYM E_ADS_PROPERTY_NOT_FOUND}
+
+//
+// MessageId: E_ADS_OBJECT_EXISTS
+//
+// MessageText:
+//
+// The directory object exists.
+//
+ E_ADS_OBJECT_EXISTS = HRESULT($8000500E);
+ {$EXTERNALSYM E_ADS_OBJECT_EXISTS}
+
+//
+// MessageId: E_ADS_SCHEMA_VIOLATION
+//
+// MessageText:
+//
+// The attempted action violates the DS schema rules.
+//
+ E_ADS_SCHEMA_VIOLATION = HRESULT($8000500F);
+ {$EXTERNALSYM E_ADS_SCHEMA_VIOLATION}
+
+//
+// MessageId: E_ADS_COLUMN_NOT_SET
+//
+// MessageText:
+//
+// The specified column in the directory was not set.
+//
+ E_ADS_COLUMN_NOT_SET = HRESULT($80005010);
+ {$EXTERNALSYM E_ADS_COLUMN_NOT_SET}
+
+//
+// MessageId: S_ADS_ERRORSOCCURRED
+//
+// MessageText:
+//
+// One or more errors occurred
+//
+ S_ADS_ERRORSOCCURRED = HRESULT($00005011);
+ {$EXTERNALSYM S_ADS_ERRORSOCCURRED}
+
+//
+// MessageId: S_ADS_NOMORE_ROWS
+//
+// MessageText:
+//
+// No more rows to be obatained by the search result.
+//
+ S_ADS_NOMORE_ROWS = HRESULT($00005012);
+ {$EXTERNALSYM S_ADS_NOMORE_ROWS}
+
+//
+// MessageId: S_ADS_NOMORE_COLUMNS
+//
+// MessageText:
+//
+// No more columns to be obatained for the current row.
+//
+ S_ADS_NOMORE_COLUMNS = HRESULT($00005013);
+ {$EXTERNALSYM S_ADS_NOMORE_COLUMNS}
+
+//
+// MessageId: E_ADS_INVALID_FILTER
+//
+// MessageText:
+//
+// The search filter specified is invalid
+//
+ E_ADS_INVALID_FILTER = HRESULT($80005014);
+ {$EXTERNALSYM E_ADS_INVALID_FILTER}
+
+implementation
+
+end.
diff --git a/packages/extra/winunits/jwaadshlp.pas b/packages/extra/winunits/jwaadshlp.pas
index f9856ae2f1..09e9a498f0 100644
--- a/packages/extra/winunits/jwaadshlp.pas
+++ b/packages/extra/winunits/jwaadshlp.pas
@@ -1,485 +1,485 @@
-{******************************************************************************}
-{ }
-{ Active Directory Helper Functions API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: adshlp.h, released June 2000. The original Pascal }
-{ code is: AdsHlp.pas, released December 2000. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwaadshlp.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaAdsHlp;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "adshlp.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- ActiveX {TODO}, JwaAdsTLB, JwaWinType, JwaWinNT;
-
-function ADsGetObject(lpszPathName: LPCWSTR; const riid: TGUID; out ppObject: Pointer): HRESULT; stdcall;
-{$EXTERNALSYM ADsGetObject}
-
-function ADsBuildEnumerator(pADsContainer: IADsContainer; out ppEnumVariant: IEnumVARIANT): HRESULT; stdcall;
-{$EXTERNALSYM ADsBuildEnumerator}
-
-function ADsFreeEnumerator(pEnumVariant: IEnumVARIANT): HRESULT; stdcall;
-{$EXTERNALSYM ADsFreeEnumerator}
-
-function ADsEnumerateNext(pEnumVariant: IEnumVARIANT; cElements: ULONG;
- var pvar: OleVariant; var pcElementsFetched: ULONG): HRESULT; stdcall;
-{$EXTERNALSYM ADsEnumerateNext}
-
-function ADsBuildVarArrayStr(lppPathNames: LPWSTR; dwPathNames: DWORD;
- var pVar: OleVariant): HRESULT; stdcall;
-{$EXTERNALSYM ADsBuildVarArrayStr}
-
-function ADsBuildVarArrayInt(lpdwObjectTypes: LPDWORD; dwObjectTypes: DWORD;
- var pVar: OleVariant): HRESULT; stdcall;
-{$EXTERNALSYM ADsBuildVarArrayInt}
-
-function ADsOpenObject(lpszPathName, lpszUserName, lpszPassword: LPCWSTR;
- dwReserved: DWORD; const riid: TGUID; out ppObject: Pointer): HRESULT; stdcall;
-{$EXTERNALSYM ADsOpenObject}
-
-//
-// Helper functions for extended error support
-//
-
-function ADsGetLastError(var lpError: DWORD; lpErrorBuf: LPWSTR;
- dwErrorBufLen: DWORD; lpNameBuf: LPWSTR; dwNameBufLen: DWORD): HRESULT; stdcall;
-{$EXTERNALSYM ADsGetLastError}
-
-procedure ADsSetLastError(dwErr: DWORD; pszError, pszProvider: LPCWSTR); stdcall;
-{$EXTERNALSYM ADsSetLastError}
-
-//procedure ADsFreeAllErrorRecords; stdcall;
-//{$EXTERNALSYM ADsFreeAllErrorRecords}
-
-function AllocADsMem(cb: DWORD): LPVOID; stdcall;
-{$EXTERNALSYM AllocADsMem}
-
-function FreeADsMem(pMem: LPVOID): BOOL; stdcall;
-{$EXTERNALSYM FreeADsMem}
-
-function ReallocADsMem(pOldMem: LPVOID; cbOld, cbNew: DWORD): LPVOID; stdcall;
-{$EXTERNALSYM ReallocADsMem}
-
-function AllocADsStr(pStr: LPCWSTR): LPWSTR; stdcall;
-{$EXTERNALSYM AllocADsStr}
-
-function FreeADsStr(pStr: LPWSTR): BOOL; stdcall;
-{$EXTERNALSYM FreeADsStr}
-
-function ReallocADsStr(var ppStr: LPWSTR; pStr: LPWSTR): BOOL; stdcall;
-{$EXTERNALSYM ReallocADsStr}
-
-function ADsEncodeBinaryData(pbSrcData: PBYTE; dwSrcLen: DWORD;
- var ppszDestData: LPWSTR): HRESULT; stdcall;
-{$EXTERNALSYM ADsEncodeBinaryData}
-
-function ADsDecodeBinaryData(szSrcData: LPCWSTR; var ppbDestData: PBYTE;
- var pdwDestLen: ULONG): HRESULT; stdcall;
-{$EXTERNALSYM ADsDecodeBinaryData}
-
-type
- // imports of a type library sometimes are missing a few decls, these are just
- // a few of them to make this file compile at all. I really should do all of
- // them one day.
-
- PADSVALUE = ^_adsvalue;
- {$EXTERNALSYM PADSVALUE}
- PADS_ATTR_INFO = ^_ads_attr_info;
- {$EXTERNALSYM PADS_ATTR_INFO}
-
-function PropVariantToAdsType(var pVariant: OleVariant; dwNumVariant: DWORD;
- var ppAdsValues: PADSVALUE; pdwNumValues: PDWORD): HRESULT; stdcall;
-{$EXTERNALSYM PropVariantToAdsType}
-
-function AdsTypeToPropVariant(pAdsValues: PADSVALUE; dwNumValues: DWORD;
- var pVariant: OleVariant): HRESULT; stdcall;
-{$EXTERNALSYM AdsTypeToPropVariant}
-
-procedure AdsFreeAdsValues(pAdsValues: PADSVALUE; dwNumValues: DWORD); stdcall;
-{$EXTERNALSYM AdsFreeAdsValues}
-
-//
-// Helper routines to convert IADsSecurityDescriptor to a binary
-// security descriptor and also to convert a binary SD to
-// IADsSecurityDescriptor.
-//
-
-// TODO VARIANT!
-
-function BinarySDToSecurityDescriptor(pSecurityDescriptor: PSECURITY_DESCRIPTOR;
- var pVarsec: VARIANT; pszServerName, userName, passWord: LPCWSTR; dwFlags: DWORD): HRESULT; stdcall;
-{$EXTERNALSYM BinarySDToSecurityDescriptor}
-
-function SecurityDescriptorToBinarySD(vVarSecDes: VARIANT;
- var ppSecurityDescriptor: PSECURITY_DESCRIPTOR; pdwSDLength: PDWORD;
- pszServerName, userName, passWord: LPCWSTR; dwFlags: DWORD): HRESULT; stdcall;
-{$EXTERNALSYM SecurityDescriptorToBinarySD}
-
-implementation
-
-const
- adslib = 'activeds.dll';
-
-//procedure ADsFreeAllErrorRecords
-
-{$IFDEF DYNAMIC_LINK}
-
-var
- _ADsGetObject: Pointer;
-
-function ADsGetObject;
-begin
- GetProcedureAddress(_ADsGetObject, adslib, 'ADsGetObject');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ADsGetObject]
- end;
-end;
-
-var
- _ADsBuildEnumerator: Pointer;
-
-function ADsBuildEnumerator;
-begin
- GetProcedureAddress(_ADsBuildEnumerator, adslib, 'ADsBuildEnumerator');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ADsBuildEnumerator]
- end;
-end;
-
-var
- _ADsFreeEnumerator: Pointer;
-
-function ADsFreeEnumerator;
-begin
- GetProcedureAddress(_ADsFreeEnumerator, adslib, 'ADsFreeEnumerator');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ADsFreeEnumerator]
- end;
-end;
-
-var
- _ADsEnumerateNext: Pointer;
-
-function ADsEnumerateNext;
-begin
- GetProcedureAddress(_ADsEnumerateNext, adslib, 'ADsEnumerateNext');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ADsEnumerateNext]
- end;
-end;
-
-var
- _ADsBuildVarArrayStr: Pointer;
-
-function ADsBuildVarArrayStr;
-begin
- GetProcedureAddress(_ADsBuildVarArrayStr, adslib, 'ADsBuildVarArrayStr');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ADsBuildVarArrayStr]
- end;
-end;
-
-var
- _ADsBuildVarArrayInt: Pointer;
-
-function ADsBuildVarArrayInt;
-begin
- GetProcedureAddress(_ADsBuildVarArrayInt, adslib, 'ADsBuildVarArrayInt');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ADsBuildVarArrayInt]
- end;
-end;
-
-var
- _ADsOpenObject: Pointer;
-
-function ADsOpenObject;
-begin
- GetProcedureAddress(_ADsOpenObject, adslib, 'ADsOpenObject');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ADsOpenObject]
- end;
-end;
-
-var
- _ADsGetLastError: Pointer;
-
-function ADsGetLastError;
-begin
- GetProcedureAddress(_ADsGetLastError, adslib, 'ADsGetLastError');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ADsGetLastError]
- end;
-end;
-
-var
- _ADsSetLastError: Pointer;
-
-procedure ADsSetLastError;
-begin
- GetProcedureAddress(_ADsSetLastError, adslib, 'ADsSetLastError');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ADsSetLastError]
- end;
-end;
-
-var
- _AllocADsMem: Pointer;
-
-function AllocADsMem;
-begin
- GetProcedureAddress(_AllocADsMem, adslib, 'AllocADsMem');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_AllocADsMem]
- end;
-end;
-
-var
- _FreeADsMem: Pointer;
-
-function FreeADsMem;
-begin
- GetProcedureAddress(_FreeADsMem, adslib, 'FreeADsMem');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_FreeADsMem]
- end;
-end;
-
-var
- _ReallocADsMem: Pointer;
-
-function ReallocADsMem;
-begin
- GetProcedureAddress(_ReallocADsMem, adslib, 'ReallocADsMem');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ReallocADsMem]
- end;
-end;
-
-var
- _AllocADsStr: Pointer;
-
-function AllocADsStr;
-begin
- GetProcedureAddress(_AllocADsStr, adslib, 'AllocADsStr');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_AllocADsStr]
- end;
-end;
-
-var
- _FreeADsStr: Pointer;
-
-function FreeADsStr;
-begin
- GetProcedureAddress(_FreeADsStr, adslib, 'FreeADsStr');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_FreeADsStr]
- end;
-end;
-
-var
- _ReallocADsStr: Pointer;
-
-function ReallocADsStr;
-begin
- GetProcedureAddress(_ReallocADsStr, adslib, 'ReallocADsStr');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ReallocADsStr]
- end;
-end;
-
-var
- _ADsEncodeBinaryData: Pointer;
-
-function ADsEncodeBinaryData;
-begin
- GetProcedureAddress(_ADsEncodeBinaryData, adslib, 'ADsEncodeBinaryData');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ADsEncodeBinaryData]
- end;
-end;
-
-var
- _ADsDecodeBinaryData: Pointer;
-
-function ADsDecodeBinaryData;
-begin
- GetProcedureAddress(_ADsDecodeBinaryData, adslib, 'ADsDecodeBinaryData');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ADsDecodeBinaryData]
- end;
-end;
-
-var
- _PropVariantToAdsType: Pointer;
-
-function PropVariantToAdsType;
-begin
- GetProcedureAddress(_PropVariantToAdsType, adslib, 'PropVariantToAdsType');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PropVariantToAdsType]
- end;
-end;
-
-var
- _AdsTypeToPropVariant: Pointer;
-
-function AdsTypeToPropVariant;
-begin
- GetProcedureAddress(_AdsTypeToPropVariant, adslib, 'AdsTypeToPropVariant');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_AdsTypeToPropVariant]
- end;
-end;
-
-var
- _AdsFreeAdsValues: Pointer;
-
-procedure AdsFreeAdsValues;
-begin
- GetProcedureAddress(_AdsFreeAdsValues, adslib, 'AdsFreeAdsValues');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_AdsFreeAdsValues]
- end;
-end;
-
-var
- _BinarySDToSecurityDescriptor: Pointer;
-
-function BinarySDToSecurityDescriptor;
-begin
- GetProcedureAddress(_BinarySDToSecurityDescriptor, adslib, 'BinarySDToSecurityDescriptor');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_BinarySDToSecurityDescriptor]
- end;
-end;
-
-var
- _SecurityDescriptorToBinarySD: Pointer;
-
-function SecurityDescriptorToBinarySD;
-begin
- GetProcedureAddress(_SecurityDescriptorToBinarySD, adslib, 'SecurityDescriptorToBinarySD');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SecurityDescriptorToBinarySD]
- end;
-end;
-
-{$ELSE}
-
-function ADsGetObject; external adslib name 'ADsGetObject';
-function ADsBuildEnumerator; external adslib name 'ADsBuildEnumerator';
-function ADsFreeEnumerator; external adslib name 'ADsFreeEnumerator';
-function ADsEnumerateNext; external adslib name 'ADsEnumerateNext';
-function ADsBuildVarArrayStr; external adslib name 'ADsBuildVarArrayStr';
-function ADsBuildVarArrayInt; external adslib name 'ADsBuildVarArrayInt';
-function ADsOpenObject; external adslib name 'ADsOpenObject';
-function ADsGetLastError; external adslib name 'ADsGetLastError';
-procedure ADsSetLastError; external adslib name 'ADsSetLastError';
-function AllocADsMem; external adslib name 'AllocADsMem';
-function FreeADsMem; external adslib name 'FreeADsMem';
-function ReallocADsMem; external adslib name 'ReallocADsMem';
-function AllocADsStr; external adslib name 'AllocADsStr';
-function FreeADsStr; external adslib name 'FreeADsStr';
-function ReallocADsStr; external adslib name 'ReallocADsStr';
-function ADsEncodeBinaryData; external adslib name 'ADsEncodeBinaryData';
-function ADsDecodeBinaryData; external adslib name 'ADsDecodeBinaryData';
-function PropVariantToAdsType; external adslib name 'PropVariantToAdsType';
-function AdsTypeToPropVariant; external adslib name 'AdsTypeToPropVariant';
-procedure AdsFreeAdsValues; external adslib name 'AdsFreeAdsValues';
-function BinarySDToSecurityDescriptor; external adslib name 'BinarySDToSecurityDescriptor';
-function SecurityDescriptorToBinarySD; external adslib name 'SecurityDescriptorToBinarySD';
-
-{$ENDIF DYNAMIC_LINK}
-
-end.
+{******************************************************************************}
+{ }
+{ Active Directory Helper Functions API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: adshlp.h, released June 2000. The original Pascal }
+{ code is: AdsHlp.pas, released December 2000. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwaadshlp.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaAdsHlp;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "adshlp.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ ActiveX {TODO}, JwaAdsTLB, JwaWinType, JwaWinNT;
+
+function ADsGetObject(lpszPathName: LPCWSTR; const riid: TGUID; out ppObject: Pointer): HRESULT; stdcall;
+{$EXTERNALSYM ADsGetObject}
+
+function ADsBuildEnumerator(pADsContainer: IADsContainer; out ppEnumVariant: IEnumVARIANT): HRESULT; stdcall;
+{$EXTERNALSYM ADsBuildEnumerator}
+
+function ADsFreeEnumerator(pEnumVariant: IEnumVARIANT): HRESULT; stdcall;
+{$EXTERNALSYM ADsFreeEnumerator}
+
+function ADsEnumerateNext(pEnumVariant: IEnumVARIANT; cElements: ULONG;
+ var pvar: OleVariant; var pcElementsFetched: ULONG): HRESULT; stdcall;
+{$EXTERNALSYM ADsEnumerateNext}
+
+function ADsBuildVarArrayStr(lppPathNames: LPWSTR; dwPathNames: DWORD;
+ var pVar: OleVariant): HRESULT; stdcall;
+{$EXTERNALSYM ADsBuildVarArrayStr}
+
+function ADsBuildVarArrayInt(lpdwObjectTypes: LPDWORD; dwObjectTypes: DWORD;
+ var pVar: OleVariant): HRESULT; stdcall;
+{$EXTERNALSYM ADsBuildVarArrayInt}
+
+function ADsOpenObject(lpszPathName, lpszUserName, lpszPassword: LPCWSTR;
+ dwReserved: DWORD; const riid: TGUID; out ppObject: Pointer): HRESULT; stdcall;
+{$EXTERNALSYM ADsOpenObject}
+
+//
+// Helper functions for extended error support
+//
+
+function ADsGetLastError(var lpError: DWORD; lpErrorBuf: LPWSTR;
+ dwErrorBufLen: DWORD; lpNameBuf: LPWSTR; dwNameBufLen: DWORD): HRESULT; stdcall;
+{$EXTERNALSYM ADsGetLastError}
+
+procedure ADsSetLastError(dwErr: DWORD; pszError, pszProvider: LPCWSTR); stdcall;
+{$EXTERNALSYM ADsSetLastError}
+
+//procedure ADsFreeAllErrorRecords; stdcall;
+//{$EXTERNALSYM ADsFreeAllErrorRecords}
+
+function AllocADsMem(cb: DWORD): LPVOID; stdcall;
+{$EXTERNALSYM AllocADsMem}
+
+function FreeADsMem(pMem: LPVOID): BOOL; stdcall;
+{$EXTERNALSYM FreeADsMem}
+
+function ReallocADsMem(pOldMem: LPVOID; cbOld, cbNew: DWORD): LPVOID; stdcall;
+{$EXTERNALSYM ReallocADsMem}
+
+function AllocADsStr(pStr: LPCWSTR): LPWSTR; stdcall;
+{$EXTERNALSYM AllocADsStr}
+
+function FreeADsStr(pStr: LPWSTR): BOOL; stdcall;
+{$EXTERNALSYM FreeADsStr}
+
+function ReallocADsStr(var ppStr: LPWSTR; pStr: LPWSTR): BOOL; stdcall;
+{$EXTERNALSYM ReallocADsStr}
+
+function ADsEncodeBinaryData(pbSrcData: PBYTE; dwSrcLen: DWORD;
+ var ppszDestData: LPWSTR): HRESULT; stdcall;
+{$EXTERNALSYM ADsEncodeBinaryData}
+
+function ADsDecodeBinaryData(szSrcData: LPCWSTR; var ppbDestData: PBYTE;
+ var pdwDestLen: ULONG): HRESULT; stdcall;
+{$EXTERNALSYM ADsDecodeBinaryData}
+
+type
+ // imports of a type library sometimes are missing a few decls, these are just
+ // a few of them to make this file compile at all. I really should do all of
+ // them one day.
+
+ PADSVALUE = ^_adsvalue;
+ {$EXTERNALSYM PADSVALUE}
+ PADS_ATTR_INFO = ^_ads_attr_info;
+ {$EXTERNALSYM PADS_ATTR_INFO}
+
+function PropVariantToAdsType(var pVariant: OleVariant; dwNumVariant: DWORD;
+ var ppAdsValues: PADSVALUE; pdwNumValues: PDWORD): HRESULT; stdcall;
+{$EXTERNALSYM PropVariantToAdsType}
+
+function AdsTypeToPropVariant(pAdsValues: PADSVALUE; dwNumValues: DWORD;
+ var pVariant: OleVariant): HRESULT; stdcall;
+{$EXTERNALSYM AdsTypeToPropVariant}
+
+procedure AdsFreeAdsValues(pAdsValues: PADSVALUE; dwNumValues: DWORD); stdcall;
+{$EXTERNALSYM AdsFreeAdsValues}
+
+//
+// Helper routines to convert IADsSecurityDescriptor to a binary
+// security descriptor and also to convert a binary SD to
+// IADsSecurityDescriptor.
+//
+
+// TODO VARIANT!
+
+function BinarySDToSecurityDescriptor(pSecurityDescriptor: PSECURITY_DESCRIPTOR;
+ var pVarsec: VARIANT; pszServerName, userName, passWord: LPCWSTR; dwFlags: DWORD): HRESULT; stdcall;
+{$EXTERNALSYM BinarySDToSecurityDescriptor}
+
+function SecurityDescriptorToBinarySD(vVarSecDes: VARIANT;
+ var ppSecurityDescriptor: PSECURITY_DESCRIPTOR; pdwSDLength: PDWORD;
+ pszServerName, userName, passWord: LPCWSTR; dwFlags: DWORD): HRESULT; stdcall;
+{$EXTERNALSYM SecurityDescriptorToBinarySD}
+
+implementation
+
+const
+ adslib = 'activeds.dll';
+
+//procedure ADsFreeAllErrorRecords
+
+{$IFDEF DYNAMIC_LINK}
+
+var
+ _ADsGetObject: Pointer;
+
+function ADsGetObject;
+begin
+ GetProcedureAddress(_ADsGetObject, adslib, 'ADsGetObject');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ADsGetObject]
+ end;
+end;
+
+var
+ _ADsBuildEnumerator: Pointer;
+
+function ADsBuildEnumerator;
+begin
+ GetProcedureAddress(_ADsBuildEnumerator, adslib, 'ADsBuildEnumerator');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ADsBuildEnumerator]
+ end;
+end;
+
+var
+ _ADsFreeEnumerator: Pointer;
+
+function ADsFreeEnumerator;
+begin
+ GetProcedureAddress(_ADsFreeEnumerator, adslib, 'ADsFreeEnumerator');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ADsFreeEnumerator]
+ end;
+end;
+
+var
+ _ADsEnumerateNext: Pointer;
+
+function ADsEnumerateNext;
+begin
+ GetProcedureAddress(_ADsEnumerateNext, adslib, 'ADsEnumerateNext');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ADsEnumerateNext]
+ end;
+end;
+
+var
+ _ADsBuildVarArrayStr: Pointer;
+
+function ADsBuildVarArrayStr;
+begin
+ GetProcedureAddress(_ADsBuildVarArrayStr, adslib, 'ADsBuildVarArrayStr');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ADsBuildVarArrayStr]
+ end;
+end;
+
+var
+ _ADsBuildVarArrayInt: Pointer;
+
+function ADsBuildVarArrayInt;
+begin
+ GetProcedureAddress(_ADsBuildVarArrayInt, adslib, 'ADsBuildVarArrayInt');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ADsBuildVarArrayInt]
+ end;
+end;
+
+var
+ _ADsOpenObject: Pointer;
+
+function ADsOpenObject;
+begin
+ GetProcedureAddress(_ADsOpenObject, adslib, 'ADsOpenObject');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ADsOpenObject]
+ end;
+end;
+
+var
+ _ADsGetLastError: Pointer;
+
+function ADsGetLastError;
+begin
+ GetProcedureAddress(_ADsGetLastError, adslib, 'ADsGetLastError');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ADsGetLastError]
+ end;
+end;
+
+var
+ _ADsSetLastError: Pointer;
+
+procedure ADsSetLastError;
+begin
+ GetProcedureAddress(_ADsSetLastError, adslib, 'ADsSetLastError');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ADsSetLastError]
+ end;
+end;
+
+var
+ _AllocADsMem: Pointer;
+
+function AllocADsMem;
+begin
+ GetProcedureAddress(_AllocADsMem, adslib, 'AllocADsMem');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_AllocADsMem]
+ end;
+end;
+
+var
+ _FreeADsMem: Pointer;
+
+function FreeADsMem;
+begin
+ GetProcedureAddress(_FreeADsMem, adslib, 'FreeADsMem');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_FreeADsMem]
+ end;
+end;
+
+var
+ _ReallocADsMem: Pointer;
+
+function ReallocADsMem;
+begin
+ GetProcedureAddress(_ReallocADsMem, adslib, 'ReallocADsMem');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ReallocADsMem]
+ end;
+end;
+
+var
+ _AllocADsStr: Pointer;
+
+function AllocADsStr;
+begin
+ GetProcedureAddress(_AllocADsStr, adslib, 'AllocADsStr');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_AllocADsStr]
+ end;
+end;
+
+var
+ _FreeADsStr: Pointer;
+
+function FreeADsStr;
+begin
+ GetProcedureAddress(_FreeADsStr, adslib, 'FreeADsStr');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_FreeADsStr]
+ end;
+end;
+
+var
+ _ReallocADsStr: Pointer;
+
+function ReallocADsStr;
+begin
+ GetProcedureAddress(_ReallocADsStr, adslib, 'ReallocADsStr');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ReallocADsStr]
+ end;
+end;
+
+var
+ _ADsEncodeBinaryData: Pointer;
+
+function ADsEncodeBinaryData;
+begin
+ GetProcedureAddress(_ADsEncodeBinaryData, adslib, 'ADsEncodeBinaryData');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ADsEncodeBinaryData]
+ end;
+end;
+
+var
+ _ADsDecodeBinaryData: Pointer;
+
+function ADsDecodeBinaryData;
+begin
+ GetProcedureAddress(_ADsDecodeBinaryData, adslib, 'ADsDecodeBinaryData');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ADsDecodeBinaryData]
+ end;
+end;
+
+var
+ _PropVariantToAdsType: Pointer;
+
+function PropVariantToAdsType;
+begin
+ GetProcedureAddress(_PropVariantToAdsType, adslib, 'PropVariantToAdsType');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PropVariantToAdsType]
+ end;
+end;
+
+var
+ _AdsTypeToPropVariant: Pointer;
+
+function AdsTypeToPropVariant;
+begin
+ GetProcedureAddress(_AdsTypeToPropVariant, adslib, 'AdsTypeToPropVariant');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_AdsTypeToPropVariant]
+ end;
+end;
+
+var
+ _AdsFreeAdsValues: Pointer;
+
+procedure AdsFreeAdsValues;
+begin
+ GetProcedureAddress(_AdsFreeAdsValues, adslib, 'AdsFreeAdsValues');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_AdsFreeAdsValues]
+ end;
+end;
+
+var
+ _BinarySDToSecurityDescriptor: Pointer;
+
+function BinarySDToSecurityDescriptor;
+begin
+ GetProcedureAddress(_BinarySDToSecurityDescriptor, adslib, 'BinarySDToSecurityDescriptor');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_BinarySDToSecurityDescriptor]
+ end;
+end;
+
+var
+ _SecurityDescriptorToBinarySD: Pointer;
+
+function SecurityDescriptorToBinarySD;
+begin
+ GetProcedureAddress(_SecurityDescriptorToBinarySD, adslib, 'SecurityDescriptorToBinarySD');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SecurityDescriptorToBinarySD]
+ end;
+end;
+
+{$ELSE}
+
+function ADsGetObject; external adslib name 'ADsGetObject';
+function ADsBuildEnumerator; external adslib name 'ADsBuildEnumerator';
+function ADsFreeEnumerator; external adslib name 'ADsFreeEnumerator';
+function ADsEnumerateNext; external adslib name 'ADsEnumerateNext';
+function ADsBuildVarArrayStr; external adslib name 'ADsBuildVarArrayStr';
+function ADsBuildVarArrayInt; external adslib name 'ADsBuildVarArrayInt';
+function ADsOpenObject; external adslib name 'ADsOpenObject';
+function ADsGetLastError; external adslib name 'ADsGetLastError';
+procedure ADsSetLastError; external adslib name 'ADsSetLastError';
+function AllocADsMem; external adslib name 'AllocADsMem';
+function FreeADsMem; external adslib name 'FreeADsMem';
+function ReallocADsMem; external adslib name 'ReallocADsMem';
+function AllocADsStr; external adslib name 'AllocADsStr';
+function FreeADsStr; external adslib name 'FreeADsStr';
+function ReallocADsStr; external adslib name 'ReallocADsStr';
+function ADsEncodeBinaryData; external adslib name 'ADsEncodeBinaryData';
+function ADsDecodeBinaryData; external adslib name 'ADsDecodeBinaryData';
+function PropVariantToAdsType; external adslib name 'PropVariantToAdsType';
+function AdsTypeToPropVariant; external adslib name 'AdsTypeToPropVariant';
+procedure AdsFreeAdsValues; external adslib name 'AdsFreeAdsValues';
+function BinarySDToSecurityDescriptor; external adslib name 'BinarySDToSecurityDescriptor';
+function SecurityDescriptorToBinarySD; external adslib name 'SecurityDescriptorToBinarySD';
+
+{$ENDIF DYNAMIC_LINK}
+
+end.
diff --git a/packages/extra/winunits/jwaadsnms.pas b/packages/extra/winunits/jwaadsnms.pas
index 4204faba37..f05eef5e10 100644
--- a/packages/extra/winunits/jwaadsnms.pas
+++ b/packages/extra/winunits/jwaadsnms.pas
@@ -1,146 +1,146 @@
-{******************************************************************************}
-{ }
-{ Active Directory Class Names API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: adsnms.h, released June 2000. The original Pascal }
-{ code is: AdsNms.pas, released December 2000. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwaadsnms.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaAdsnms;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "adsnms.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-// Contents: Class Names and schema definitions for ADS objects
-
-const
- NAMESPACE_CLASS_NAME = 'Namespace';
- {$EXTERNALSYM NAMESPACE_CLASS_NAME}
- COUNTRY_CLASS_NAME = 'Country';
- {$EXTERNALSYM COUNTRY_CLASS_NAME}
- LOCALITY_CLASS_NAME = 'Locality';
- {$EXTERNALSYM LOCALITY_CLASS_NAME}
- ORGANIZATION_CLASS_NAME = 'Organization';
- {$EXTERNALSYM ORGANIZATION_CLASS_NAME}
- ORGANIZATIONUNIT_CLASS_NAME = 'Organizational Unit';
- {$EXTERNALSYM ORGANIZATIONUNIT_CLASS_NAME}
- DOMAIN_CLASS_NAME = 'Domain';
- {$EXTERNALSYM DOMAIN_CLASS_NAME}
- COMPUTER_CLASS_NAME = 'Computer';
- {$EXTERNALSYM COMPUTER_CLASS_NAME}
- USER_CLASS_NAME = 'User';
- {$EXTERNALSYM USER_CLASS_NAME}
- GROUP_CLASS_NAME = 'Group';
- {$EXTERNALSYM GROUP_CLASS_NAME}
- GLOBALGROUP_CLASS_NAME = 'GlobalGroup';
- {$EXTERNALSYM GLOBALGROUP_CLASS_NAME}
- LOCALGROUP_CLASS_NAME = 'LocalGroup';
- {$EXTERNALSYM LOCALGROUP_CLASS_NAME}
- SERVICE_CLASS_NAME = 'Service';
- {$EXTERNALSYM SERVICE_CLASS_NAME}
- FILESERVICE_CLASS_NAME = 'FileService';
- {$EXTERNALSYM FILESERVICE_CLASS_NAME}
- SESSION_CLASS_NAME = 'Session';
- {$EXTERNALSYM SESSION_CLASS_NAME}
- RESOURCE_CLASS_NAME = 'Resource';
- {$EXTERNALSYM RESOURCE_CLASS_NAME}
- FILESHARE_CLASS_NAME = 'FileShare';
- {$EXTERNALSYM FILESHARE_CLASS_NAME}
- PRINTER_CLASS_NAME = 'PrintQueue';
- {$EXTERNALSYM PRINTER_CLASS_NAME}
- PRINTJOB_CLASS_NAME = 'PrintJob';
- {$EXTERNALSYM PRINTJOB_CLASS_NAME}
- SCHEMA_CLASS_NAME = 'Schema';
- {$EXTERNALSYM SCHEMA_CLASS_NAME}
- CLASS_CLASS_NAME = 'Class';
- {$EXTERNALSYM CLASS_CLASS_NAME}
- PROPERTY_CLASS_NAME = 'Property';
- {$EXTERNALSYM PROPERTY_CLASS_NAME}
- SYNTAX_CLASS_NAME = 'Syntax';
- {$EXTERNALSYM SYNTAX_CLASS_NAME}
- ROOTDSE_CLASS_NAME = 'RootDSE';
- {$EXTERNALSYM ROOTDSE_CLASS_NAME}
-
- NO_SCHEMA = '';
- {$EXTERNALSYM NO_SCHEMA}
- DOMAIN_SCHEMA_NAME = 'Domain';
- {$EXTERNALSYM DOMAIN_SCHEMA_NAME}
- COMPUTER_SCHEMA_NAME = 'Computer';
- {$EXTERNALSYM COMPUTER_SCHEMA_NAME}
- USER_SCHEMA_NAME = 'User';
- {$EXTERNALSYM USER_SCHEMA_NAME}
- GROUP_SCHEMA_NAME = 'Group';
- {$EXTERNALSYM GROUP_SCHEMA_NAME}
- GLOBALGROUP_SCHEMA_NAME = 'GlobalGroup';
- {$EXTERNALSYM GLOBALGROUP_SCHEMA_NAME}
- LOCALGROUP_SCHEMA_NAME = 'LocalGroup';
- {$EXTERNALSYM LOCALGROUP_SCHEMA_NAME}
- SERVICE_SCHEMA_NAME = 'Service';
- {$EXTERNALSYM SERVICE_SCHEMA_NAME}
- PRINTER_SCHEMA_NAME = 'PrintQueue';
- {$EXTERNALSYM PRINTER_SCHEMA_NAME}
- PRINTJOB_SCHEMA_NAME = 'PrintJob';
- {$EXTERNALSYM PRINTJOB_SCHEMA_NAME}
- FILESERVICE_SCHEMA_NAME = 'FileService';
- {$EXTERNALSYM FILESERVICE_SCHEMA_NAME}
- SESSION_SCHEMA_NAME = 'Session';
- {$EXTERNALSYM SESSION_SCHEMA_NAME}
- RESOURCE_SCHEMA_NAME = 'Resource';
- {$EXTERNALSYM RESOURCE_SCHEMA_NAME}
- FILESHARE_SCHEMA_NAME = 'FileShare';
- {$EXTERNALSYM FILESHARE_SCHEMA_NAME}
- FPNW_FILESERVICE_SCHEMA_NAME = 'FPNWFileService';
- {$EXTERNALSYM FPNW_FILESERVICE_SCHEMA_NAME}
- FPNW_SESSION_SCHEMA_NAME = 'FPNWSession';
- {$EXTERNALSYM FPNW_SESSION_SCHEMA_NAME}
- FPNW_RESOURCE_SCHEMA_NAME = 'FPNWResource';
- {$EXTERNALSYM FPNW_RESOURCE_SCHEMA_NAME}
- FPNW_FILESHARE_SCHEMA_NAME = 'FPNWFileShare';
- {$EXTERNALSYM FPNW_FILESHARE_SCHEMA_NAME}
-
-implementation
-
-end.
+{******************************************************************************}
+{ }
+{ Active Directory Class Names API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: adsnms.h, released June 2000. The original Pascal }
+{ code is: AdsNms.pas, released December 2000. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwaadsnms.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaAdsnms;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "adsnms.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+// Contents: Class Names and schema definitions for ADS objects
+
+const
+ NAMESPACE_CLASS_NAME = 'Namespace';
+ {$EXTERNALSYM NAMESPACE_CLASS_NAME}
+ COUNTRY_CLASS_NAME = 'Country';
+ {$EXTERNALSYM COUNTRY_CLASS_NAME}
+ LOCALITY_CLASS_NAME = 'Locality';
+ {$EXTERNALSYM LOCALITY_CLASS_NAME}
+ ORGANIZATION_CLASS_NAME = 'Organization';
+ {$EXTERNALSYM ORGANIZATION_CLASS_NAME}
+ ORGANIZATIONUNIT_CLASS_NAME = 'Organizational Unit';
+ {$EXTERNALSYM ORGANIZATIONUNIT_CLASS_NAME}
+ DOMAIN_CLASS_NAME = 'Domain';
+ {$EXTERNALSYM DOMAIN_CLASS_NAME}
+ COMPUTER_CLASS_NAME = 'Computer';
+ {$EXTERNALSYM COMPUTER_CLASS_NAME}
+ USER_CLASS_NAME = 'User';
+ {$EXTERNALSYM USER_CLASS_NAME}
+ GROUP_CLASS_NAME = 'Group';
+ {$EXTERNALSYM GROUP_CLASS_NAME}
+ GLOBALGROUP_CLASS_NAME = 'GlobalGroup';
+ {$EXTERNALSYM GLOBALGROUP_CLASS_NAME}
+ LOCALGROUP_CLASS_NAME = 'LocalGroup';
+ {$EXTERNALSYM LOCALGROUP_CLASS_NAME}
+ SERVICE_CLASS_NAME = 'Service';
+ {$EXTERNALSYM SERVICE_CLASS_NAME}
+ FILESERVICE_CLASS_NAME = 'FileService';
+ {$EXTERNALSYM FILESERVICE_CLASS_NAME}
+ SESSION_CLASS_NAME = 'Session';
+ {$EXTERNALSYM SESSION_CLASS_NAME}
+ RESOURCE_CLASS_NAME = 'Resource';
+ {$EXTERNALSYM RESOURCE_CLASS_NAME}
+ FILESHARE_CLASS_NAME = 'FileShare';
+ {$EXTERNALSYM FILESHARE_CLASS_NAME}
+ PRINTER_CLASS_NAME = 'PrintQueue';
+ {$EXTERNALSYM PRINTER_CLASS_NAME}
+ PRINTJOB_CLASS_NAME = 'PrintJob';
+ {$EXTERNALSYM PRINTJOB_CLASS_NAME}
+ SCHEMA_CLASS_NAME = 'Schema';
+ {$EXTERNALSYM SCHEMA_CLASS_NAME}
+ CLASS_CLASS_NAME = 'Class';
+ {$EXTERNALSYM CLASS_CLASS_NAME}
+ PROPERTY_CLASS_NAME = 'Property';
+ {$EXTERNALSYM PROPERTY_CLASS_NAME}
+ SYNTAX_CLASS_NAME = 'Syntax';
+ {$EXTERNALSYM SYNTAX_CLASS_NAME}
+ ROOTDSE_CLASS_NAME = 'RootDSE';
+ {$EXTERNALSYM ROOTDSE_CLASS_NAME}
+
+ NO_SCHEMA = '';
+ {$EXTERNALSYM NO_SCHEMA}
+ DOMAIN_SCHEMA_NAME = 'Domain';
+ {$EXTERNALSYM DOMAIN_SCHEMA_NAME}
+ COMPUTER_SCHEMA_NAME = 'Computer';
+ {$EXTERNALSYM COMPUTER_SCHEMA_NAME}
+ USER_SCHEMA_NAME = 'User';
+ {$EXTERNALSYM USER_SCHEMA_NAME}
+ GROUP_SCHEMA_NAME = 'Group';
+ {$EXTERNALSYM GROUP_SCHEMA_NAME}
+ GLOBALGROUP_SCHEMA_NAME = 'GlobalGroup';
+ {$EXTERNALSYM GLOBALGROUP_SCHEMA_NAME}
+ LOCALGROUP_SCHEMA_NAME = 'LocalGroup';
+ {$EXTERNALSYM LOCALGROUP_SCHEMA_NAME}
+ SERVICE_SCHEMA_NAME = 'Service';
+ {$EXTERNALSYM SERVICE_SCHEMA_NAME}
+ PRINTER_SCHEMA_NAME = 'PrintQueue';
+ {$EXTERNALSYM PRINTER_SCHEMA_NAME}
+ PRINTJOB_SCHEMA_NAME = 'PrintJob';
+ {$EXTERNALSYM PRINTJOB_SCHEMA_NAME}
+ FILESERVICE_SCHEMA_NAME = 'FileService';
+ {$EXTERNALSYM FILESERVICE_SCHEMA_NAME}
+ SESSION_SCHEMA_NAME = 'Session';
+ {$EXTERNALSYM SESSION_SCHEMA_NAME}
+ RESOURCE_SCHEMA_NAME = 'Resource';
+ {$EXTERNALSYM RESOURCE_SCHEMA_NAME}
+ FILESHARE_SCHEMA_NAME = 'FileShare';
+ {$EXTERNALSYM FILESHARE_SCHEMA_NAME}
+ FPNW_FILESERVICE_SCHEMA_NAME = 'FPNWFileService';
+ {$EXTERNALSYM FPNW_FILESERVICE_SCHEMA_NAME}
+ FPNW_SESSION_SCHEMA_NAME = 'FPNWSession';
+ {$EXTERNALSYM FPNW_SESSION_SCHEMA_NAME}
+ FPNW_RESOURCE_SCHEMA_NAME = 'FPNWResource';
+ {$EXTERNALSYM FPNW_RESOURCE_SCHEMA_NAME}
+ FPNW_FILESHARE_SCHEMA_NAME = 'FPNWFileShare';
+ {$EXTERNALSYM FPNW_FILESHARE_SCHEMA_NAME}
+
+implementation
+
+end.
diff --git a/packages/extra/winunits/jwaadsprop.pas b/packages/extra/winunits/jwaadsprop.pas
index 0883159867..f1826b1a59 100644
--- a/packages/extra/winunits/jwaadsprop.pas
+++ b/packages/extra/winunits/jwaadsprop.pas
@@ -1,389 +1,389 @@
-{******************************************************************************}
-{ }
-{ Active Directory Property Pages API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: adsprop.h, released June 2000. The original Pascal }
-{ code is: AdsProp.pas, released December 2000. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwaadsprop.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaAdsProp;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "adsprop.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- ActiveX {TODO}, JwaAdsTLB, JwaWinUser, JwaWinType;
-
-// Windows NT Active Directory Service Property Pages
-//
-// Contents: Functions and definitions used in the creation of AD property
-// sheets.
-
-const
- WM_ADSPROP_NOTIFY_PAGEINIT = WM_USER + 1101; // where LPARAM is the PADSPROPINITPARAMS pointer.
- {$EXTERNALSYM WM_ADSPROP_NOTIFY_PAGEINIT}
- WM_ADSPROP_NOTIFY_PAGEHWND = WM_USER + 1102; // where WPARAM => page's HWND and LPARAM => page's Title
- {$EXTERNALSYM WM_ADSPROP_NOTIFY_PAGEHWND}
- WM_ADSPROP_NOTIFY_CHANGE = WM_USER + 1103; // used to send a change notification to a parent sheet
- {$EXTERNALSYM WM_ADSPROP_NOTIFY_CHANGE}
- WM_ADSPROP_NOTIFY_APPLY = WM_USER + 1104; // pages send this to the notification object.
- {$EXTERNALSYM WM_ADSPROP_NOTIFY_APPLY}
- WM_ADSPROP_NOTIFY_SETFOCUS = WM_USER + 1105; // used internally by the notification object.
- {$EXTERNALSYM WM_ADSPROP_NOTIFY_SETFOCUS}
- WM_ADSPROP_NOTIFY_FOREGROUND = WM_USER + 1106; // used internally by the notification object.
- {$EXTERNALSYM WM_ADSPROP_NOTIFY_FOREGROUND}
- WM_ADSPROP_NOTIFY_EXIT = WM_USER + 1107; // sent on page release
- {$EXTERNALSYM WM_ADSPROP_NOTIFY_EXIT}
- WM_ADSPROP_NOTIFY_ERROR = WM_USER + 1110; // used to send the notification object an error message
- {$EXTERNALSYM WM_ADSPROP_NOTIFY_ERROR}
-
-//+----------------------------------------------------------------------------
-//
-// Structure: ADSPROPINITPARAMS
-//
-// Usage: Used to pass page initialization information to new pages from
-// the notify object.
-//
-//-----------------------------------------------------------------------------
-
-type
- // imports of a type library sometimes are missing a few decls, these are just
- // a few of them to make this file compile at all. I really should do all of
- // them one day. TODO
-
- PADSVALUE = ^_adsvalue;
- {$EXTERNALSYM PADSVALUE}
- PADS_ATTR_INFO = ^_ads_attr_info;
- {$EXTERNALSYM PADS_ATTR_INFO}
-
- PADSPROPINITPARAMS = ^ADSPROPINITPARAMS;
- {$EXTERNALSYM PADSPROPINITPARAMS}
- _ADSPROPINITPARAMS = record
- dwSize: DWORD; // Set this to the size of the struct.
- dwFlags: DWORD; // Reserved for future use.
- hr: HRESULT; // If this is non-zero, then the others
- pDsObj: IDirectoryObject; // should be ignored.
- pwzCN: LPWSTR;
- pWritableAttrs: PADS_ATTR_INFO;
- end;
- {$EXTERNALSYM _ADSPROPINITPARAMS}
- ADSPROPINITPARAMS = _ADSPROPINITPARAMS;
- {$EXTERNALSYM ADSPROPINITPARAMS}
- TAdsPropInitParams = ADSPROPINITPARAMS;
-
-//+----------------------------------------------------------------------------
-//
-// Structure: ADSPROPERROR
-//
-// Usage: Used to pass page error information to the notify object
-//
-//-----------------------------------------------------------------------------
-
- _ADSPROPERROR = record
- hwndPage: HWND; // The HWND of the page that had the error
- pszPageTitle: PWSTR; // The title of the page that had the error
- pszObjPath: PWSTR; // Path to the object that the error occurred on
- pszObjClass: PWSTR; // Class of the object that the error occurred on
- hr: HRESULT; // If this is non-zero, then the others
- // pszError will be ignored
- pszError: PWSTR; // An error message. Used only if hr is zero
- end;
- {$EXTERNALSYM _ADSPROPERROR}
- ADSPROPERROR = _ADSPROPERROR;
- {$EXTERNALSYM ADSPROPERROR}
- PADSPROPERROR = ^ADSPROPERROR;
- {$EXTERNALSYM PADSPROPERROR}
- TAdsPropError = ADSPROPERROR;
-
-//+----------------------------------------------------------------------------
-//
-// Function: ADsPropCreateNotifyObj
-//
-// Synopsis: Checks to see if the notification window/object exists for this
-// sheet instance and if not creates it.
-//
-// Arguments: [pAppThdDataObj] - the unmarshalled data object pointer.
-// [pwzADsObjName] - object path name.
-// [phNotifyObj] - to return the notificion window handle.
-//
-// Returns: HRESULTs.
-//
-//-----------------------------------------------------------------------------
-
-function ADsPropCreateNotifyObj(pAppThdDataObj: Pointer{LPDATAOBJECT};
- pwzADsObjName: PWSTR; var phNotifyObj: HWND): HRESULT; stdcall;
-{$EXTERNALSYM ADsPropCreateNotifyObj}
-
-//+----------------------------------------------------------------------------
-//
-// Function: ADsPropGetInitInfo
-//
-// Synopsis: Pages call this at their init time to retreive DS object info.
-//
-// Arguments: [hNotifyObj] - the notificion window handle.
-// [pInitParams] - struct filled in with DS object info. This
-// struct must be allocated by the caller before
-// the call.
-//
-// Returns: FALSE if the notify window has gone away for some reason or
-// if the parameters are invalid.
-//
-// Notes: This call results in the sending of the
-// WM_ADSPROP_NOTIFY_PAGEINIT message to the notify window.
-// pInitParams->pWritableAttrs can be NULL if there are no
-// writable attributes.
-//
-//-----------------------------------------------------------------------------
-
-function ADsPropGetInitInfo(hNotifyObj: HWND; pInitParams: PADSPROPINITPARAMS): BOOL; stdcall;
-{$EXTERNALSYM ADsPropGetInitInfo}
-
-//+----------------------------------------------------------------------------
-//
-// Function: ADsPropSetHwndWithTitle
-//
-// Synopsis: Pages call this at their dialog init time to send their hwnd
-// to the Notify object.
-//
-// Arguments: [hNotifyObj] - the notificion window handle.
-// [hPage] - the page's window handle.
-// [ptzTitle] - the page's title
-//
-// Returns: FALSE if the notify window has gone away for some reason.
-//
-// Notes: Sends the WM_ADSPROP_NOTIFY_PAGEHWND message to the notify
-// window. Use this function instead of ADsPropSetHwnd for
-// multi-select property pages
-//
-//-----------------------------------------------------------------------------
-
-function ADsPropSetHwndWithTitle(hNotifyObj, hPage: HWND; ptzTitle: PTSTR): BOOL; stdcall;
-{$EXTERNALSYM ADsPropSetHwndWithTitle}
-
-//+----------------------------------------------------------------------------
-//
-// Function: ADsPropSetHwnd
-//
-// Synopsis: Pages call this at their dialog init time to send their hwnd
-// to the Notify object.
-//
-// Arguments: [hNotifyObj] - the notificion window handle.
-// [hPage] - the page's window handle.
-// [ptzTitle] - the page's title
-//
-// Returns: FALSE if the notify window has gone away for some reason.
-//
-// Notes: Sends the WM_ADSPROP_NOTIFY_PAGEHWND message to the notify
-// window.
-//
-//-----------------------------------------------------------------------------
-
-function ADsPropSetHwnd(hNotifyObj: HWND; hPage: HWND): BOOL; stdcall;
-{$EXTERNALSYM ADsPropSetHwnd}
-
-//+----------------------------------------------------------------------------
-//
-// function: ADsPropCheckIfWritable
-//
-// Synopsis: See if the attribute is writable by checking if it is in
-// the allowedAttributesEffective array.
-//
-// Arguments: [pwzAttr] - the attribute name.
-// [pWritableAttrs] - the array of writable attributes.
-//
-// Returns: FALSE if the attribute name is not found in the writable-attrs
-// array or if the array pointer is NULL.
-//
-//-----------------------------------------------------------------------------
-
-function ADsPropCheckIfWritable(pwzAttr: PWSTR; pWritableAttrs: PADS_ATTR_INFO): BOOL; stdcall;
-{$EXTERNALSYM ADsPropCheckIfWritable}
-
-//+----------------------------------------------------------------------------
-//
-// function: ADsPropSendErrorMessage
-//
-// Synopsis: Adds an error message to a list which is presented when
-// ADsPropShowErrorDialog is called
-//
-// Arguments: [hNotifyObj] - the notificion window handle.
-// [pError] - the error structure
-//
-// Returns: FALSE if the notify window has gone away for some reason.
-//
-//-----------------------------------------------------------------------------
-
-function ADsPropSendErrorMessage(hNotifyObj: HWND; pError: PADSPROPERROR): BOOL; stdcall;
-{$EXTERNALSYM ADsPropSendErrorMessage}
-
-//+----------------------------------------------------------------------------
-//
-// function: ADsPropShowErrorDialog
-//
-// Synopsis: Presents an error dialog with the error messages accumulated
-// through calls to ADsPropSendErrorMessage
-//
-// Arguments: [hNotifyObj] - the notificion window handle.
-// [hPage] - the property page window handle.
-//
-// Returns: FALSE if the notify window has gone away for some reason.
-//
-//-----------------------------------------------------------------------------
-
-function ADsPropShowErrorDialog(hNotifyObj: HWND; hPage: HWND): BOOL; stdcall;
-{$EXTERNALSYM ADsPropShowErrorDialog}
-
-implementation
-
-const
- dsprop = 'dsprop.dll';
-
-{$IFDEF DYNAMIC_LINK}
-
-var
- _ADsPropCreateNotifyObj: Pointer;
-
-function ADsPropCreateNotifyObj;
-begin
- GetProcedureAddress(_ADsPropCreateNotifyObj, dsprop, 'ADsPropCreateNotifyObj');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ADsPropCreateNotifyObj]
- end;
-end;
-
-var
- _ADsPropGetInitInfo: Pointer;
-
-function ADsPropGetInitInfo;
-begin
- GetProcedureAddress(_ADsPropGetInitInfo, dsprop, 'ADsPropGetInitInfo');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ADsPropGetInitInfo]
- end;
-end;
-
-var
- _ADsPropSetHwndWithTitle: Pointer;
-
-function ADsPropSetHwndWithTitle;
-begin
- GetProcedureAddress(_ADsPropSetHwndWithTitle, dsprop, 'ADsPropSetHwndWithTitle');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ADsPropSetHwndWithTitle]
- end;
-end;
-
-var
- _ADsPropSetHwnd: Pointer;
-
-function ADsPropSetHwnd;
-begin
- GetProcedureAddress(_ADsPropSetHwnd, dsprop, 'ADsPropSetHwnd');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ADsPropSetHwnd]
- end;
-end;
-
-var
- _ADsPropCheckIfWritable: Pointer;
-
-function ADsPropCheckIfWritable;
-begin
- GetProcedureAddress(_ADsPropCheckIfWritable, dsprop, 'ADsPropCheckIfWritable');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ADsPropCheckIfWritable]
- end;
-end;
-
-var
- _ADsPropSendErrorMessage: Pointer;
-
-function ADsPropSendErrorMessage;
-begin
- GetProcedureAddress(_ADsPropSendErrorMessage, dsprop, 'ADsPropSendErrorMessage');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ADsPropSendErrorMessage]
- end;
-end;
-
-var
- _ADsPropShowErrorDialog: Pointer;
-
-function ADsPropShowErrorDialog;
-begin
- GetProcedureAddress(_ADsPropShowErrorDialog, dsprop, 'ADsPropShowErrorDialog');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ADsPropShowErrorDialog]
- end;
-end;
-
-{$ELSE}
-
-function ADsPropCreateNotifyObj; external dsprop name 'ADsPropCreateNotifyObj';
-function ADsPropGetInitInfo; external dsprop name 'ADsPropGetInitInfo';
-function ADsPropSetHwndWithTitle; external dsprop name 'ADsPropSetHwndWithTitle';
-function ADsPropSetHwnd; external dsprop name 'ADsPropSetHwnd';
-function ADsPropCheckIfWritable; external dsprop name 'ADsPropCheckIfWritable';
-function ADsPropSendErrorMessage; external dsprop name 'ADsPropSendErrorMessage';
-function ADsPropShowErrorDialog; external dsprop name 'ADsPropShowErrorDialog';
-
-{$ENDIF DYNAMIC_LINK}
-
-end.
+{******************************************************************************}
+{ }
+{ Active Directory Property Pages API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: adsprop.h, released June 2000. The original Pascal }
+{ code is: AdsProp.pas, released December 2000. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwaadsprop.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaAdsProp;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "adsprop.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ ActiveX {TODO}, JwaAdsTLB, JwaWinUser, JwaWinType;
+
+// Windows NT Active Directory Service Property Pages
+//
+// Contents: Functions and definitions used in the creation of AD property
+// sheets.
+
+const
+ WM_ADSPROP_NOTIFY_PAGEINIT = WM_USER + 1101; // where LPARAM is the PADSPROPINITPARAMS pointer.
+ {$EXTERNALSYM WM_ADSPROP_NOTIFY_PAGEINIT}
+ WM_ADSPROP_NOTIFY_PAGEHWND = WM_USER + 1102; // where WPARAM => page's HWND and LPARAM => page's Title
+ {$EXTERNALSYM WM_ADSPROP_NOTIFY_PAGEHWND}
+ WM_ADSPROP_NOTIFY_CHANGE = WM_USER + 1103; // used to send a change notification to a parent sheet
+ {$EXTERNALSYM WM_ADSPROP_NOTIFY_CHANGE}
+ WM_ADSPROP_NOTIFY_APPLY = WM_USER + 1104; // pages send this to the notification object.
+ {$EXTERNALSYM WM_ADSPROP_NOTIFY_APPLY}
+ WM_ADSPROP_NOTIFY_SETFOCUS = WM_USER + 1105; // used internally by the notification object.
+ {$EXTERNALSYM WM_ADSPROP_NOTIFY_SETFOCUS}
+ WM_ADSPROP_NOTIFY_FOREGROUND = WM_USER + 1106; // used internally by the notification object.
+ {$EXTERNALSYM WM_ADSPROP_NOTIFY_FOREGROUND}
+ WM_ADSPROP_NOTIFY_EXIT = WM_USER + 1107; // sent on page release
+ {$EXTERNALSYM WM_ADSPROP_NOTIFY_EXIT}
+ WM_ADSPROP_NOTIFY_ERROR = WM_USER + 1110; // used to send the notification object an error message
+ {$EXTERNALSYM WM_ADSPROP_NOTIFY_ERROR}
+
+//+----------------------------------------------------------------------------
+//
+// Structure: ADSPROPINITPARAMS
+//
+// Usage: Used to pass page initialization information to new pages from
+// the notify object.
+//
+//-----------------------------------------------------------------------------
+
+type
+ // imports of a type library sometimes are missing a few decls, these are just
+ // a few of them to make this file compile at all. I really should do all of
+ // them one day. TODO
+
+ PADSVALUE = ^_adsvalue;
+ {$EXTERNALSYM PADSVALUE}
+ PADS_ATTR_INFO = ^_ads_attr_info;
+ {$EXTERNALSYM PADS_ATTR_INFO}
+
+ PADSPROPINITPARAMS = ^ADSPROPINITPARAMS;
+ {$EXTERNALSYM PADSPROPINITPARAMS}
+ _ADSPROPINITPARAMS = record
+ dwSize: DWORD; // Set this to the size of the struct.
+ dwFlags: DWORD; // Reserved for future use.
+ hr: HRESULT; // If this is non-zero, then the others
+ pDsObj: IDirectoryObject; // should be ignored.
+ pwzCN: LPWSTR;
+ pWritableAttrs: PADS_ATTR_INFO;
+ end;
+ {$EXTERNALSYM _ADSPROPINITPARAMS}
+ ADSPROPINITPARAMS = _ADSPROPINITPARAMS;
+ {$EXTERNALSYM ADSPROPINITPARAMS}
+ TAdsPropInitParams = ADSPROPINITPARAMS;
+
+//+----------------------------------------------------------------------------
+//
+// Structure: ADSPROPERROR
+//
+// Usage: Used to pass page error information to the notify object
+//
+//-----------------------------------------------------------------------------
+
+ _ADSPROPERROR = record
+ hwndPage: HWND; // The HWND of the page that had the error
+ pszPageTitle: PWSTR; // The title of the page that had the error
+ pszObjPath: PWSTR; // Path to the object that the error occurred on
+ pszObjClass: PWSTR; // Class of the object that the error occurred on
+ hr: HRESULT; // If this is non-zero, then the others
+ // pszError will be ignored
+ pszError: PWSTR; // An error message. Used only if hr is zero
+ end;
+ {$EXTERNALSYM _ADSPROPERROR}
+ ADSPROPERROR = _ADSPROPERROR;
+ {$EXTERNALSYM ADSPROPERROR}
+ PADSPROPERROR = ^ADSPROPERROR;
+ {$EXTERNALSYM PADSPROPERROR}
+ TAdsPropError = ADSPROPERROR;
+
+//+----------------------------------------------------------------------------
+//
+// Function: ADsPropCreateNotifyObj
+//
+// Synopsis: Checks to see if the notification window/object exists for this
+// sheet instance and if not creates it.
+//
+// Arguments: [pAppThdDataObj] - the unmarshalled data object pointer.
+// [pwzADsObjName] - object path name.
+// [phNotifyObj] - to return the notificion window handle.
+//
+// Returns: HRESULTs.
+//
+//-----------------------------------------------------------------------------
+
+function ADsPropCreateNotifyObj(pAppThdDataObj: Pointer{LPDATAOBJECT};
+ pwzADsObjName: PWSTR; var phNotifyObj: HWND): HRESULT; stdcall;
+{$EXTERNALSYM ADsPropCreateNotifyObj}
+
+//+----------------------------------------------------------------------------
+//
+// Function: ADsPropGetInitInfo
+//
+// Synopsis: Pages call this at their init time to retreive DS object info.
+//
+// Arguments: [hNotifyObj] - the notificion window handle.
+// [pInitParams] - struct filled in with DS object info. This
+// struct must be allocated by the caller before
+// the call.
+//
+// Returns: FALSE if the notify window has gone away for some reason or
+// if the parameters are invalid.
+//
+// Notes: This call results in the sending of the
+// WM_ADSPROP_NOTIFY_PAGEINIT message to the notify window.
+// pInitParams->pWritableAttrs can be NULL if there are no
+// writable attributes.
+//
+//-----------------------------------------------------------------------------
+
+function ADsPropGetInitInfo(hNotifyObj: HWND; pInitParams: PADSPROPINITPARAMS): BOOL; stdcall;
+{$EXTERNALSYM ADsPropGetInitInfo}
+
+//+----------------------------------------------------------------------------
+//
+// Function: ADsPropSetHwndWithTitle
+//
+// Synopsis: Pages call this at their dialog init time to send their hwnd
+// to the Notify object.
+//
+// Arguments: [hNotifyObj] - the notificion window handle.
+// [hPage] - the page's window handle.
+// [ptzTitle] - the page's title
+//
+// Returns: FALSE if the notify window has gone away for some reason.
+//
+// Notes: Sends the WM_ADSPROP_NOTIFY_PAGEHWND message to the notify
+// window. Use this function instead of ADsPropSetHwnd for
+// multi-select property pages
+//
+//-----------------------------------------------------------------------------
+
+function ADsPropSetHwndWithTitle(hNotifyObj, hPage: HWND; ptzTitle: PTSTR): BOOL; stdcall;
+{$EXTERNALSYM ADsPropSetHwndWithTitle}
+
+//+----------------------------------------------------------------------------
+//
+// Function: ADsPropSetHwnd
+//
+// Synopsis: Pages call this at their dialog init time to send their hwnd
+// to the Notify object.
+//
+// Arguments: [hNotifyObj] - the notificion window handle.
+// [hPage] - the page's window handle.
+// [ptzTitle] - the page's title
+//
+// Returns: FALSE if the notify window has gone away for some reason.
+//
+// Notes: Sends the WM_ADSPROP_NOTIFY_PAGEHWND message to the notify
+// window.
+//
+//-----------------------------------------------------------------------------
+
+function ADsPropSetHwnd(hNotifyObj: HWND; hPage: HWND): BOOL; stdcall;
+{$EXTERNALSYM ADsPropSetHwnd}
+
+//+----------------------------------------------------------------------------
+//
+// function: ADsPropCheckIfWritable
+//
+// Synopsis: See if the attribute is writable by checking if it is in
+// the allowedAttributesEffective array.
+//
+// Arguments: [pwzAttr] - the attribute name.
+// [pWritableAttrs] - the array of writable attributes.
+//
+// Returns: FALSE if the attribute name is not found in the writable-attrs
+// array or if the array pointer is NULL.
+//
+//-----------------------------------------------------------------------------
+
+function ADsPropCheckIfWritable(pwzAttr: PWSTR; pWritableAttrs: PADS_ATTR_INFO): BOOL; stdcall;
+{$EXTERNALSYM ADsPropCheckIfWritable}
+
+//+----------------------------------------------------------------------------
+//
+// function: ADsPropSendErrorMessage
+//
+// Synopsis: Adds an error message to a list which is presented when
+// ADsPropShowErrorDialog is called
+//
+// Arguments: [hNotifyObj] - the notificion window handle.
+// [pError] - the error structure
+//
+// Returns: FALSE if the notify window has gone away for some reason.
+//
+//-----------------------------------------------------------------------------
+
+function ADsPropSendErrorMessage(hNotifyObj: HWND; pError: PADSPROPERROR): BOOL; stdcall;
+{$EXTERNALSYM ADsPropSendErrorMessage}
+
+//+----------------------------------------------------------------------------
+//
+// function: ADsPropShowErrorDialog
+//
+// Synopsis: Presents an error dialog with the error messages accumulated
+// through calls to ADsPropSendErrorMessage
+//
+// Arguments: [hNotifyObj] - the notificion window handle.
+// [hPage] - the property page window handle.
+//
+// Returns: FALSE if the notify window has gone away for some reason.
+//
+//-----------------------------------------------------------------------------
+
+function ADsPropShowErrorDialog(hNotifyObj: HWND; hPage: HWND): BOOL; stdcall;
+{$EXTERNALSYM ADsPropShowErrorDialog}
+
+implementation
+
+const
+ dsprop = 'dsprop.dll';
+
+{$IFDEF DYNAMIC_LINK}
+
+var
+ _ADsPropCreateNotifyObj: Pointer;
+
+function ADsPropCreateNotifyObj;
+begin
+ GetProcedureAddress(_ADsPropCreateNotifyObj, dsprop, 'ADsPropCreateNotifyObj');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ADsPropCreateNotifyObj]
+ end;
+end;
+
+var
+ _ADsPropGetInitInfo: Pointer;
+
+function ADsPropGetInitInfo;
+begin
+ GetProcedureAddress(_ADsPropGetInitInfo, dsprop, 'ADsPropGetInitInfo');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ADsPropGetInitInfo]
+ end;
+end;
+
+var
+ _ADsPropSetHwndWithTitle: Pointer;
+
+function ADsPropSetHwndWithTitle;
+begin
+ GetProcedureAddress(_ADsPropSetHwndWithTitle, dsprop, 'ADsPropSetHwndWithTitle');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ADsPropSetHwndWithTitle]
+ end;
+end;
+
+var
+ _ADsPropSetHwnd: Pointer;
+
+function ADsPropSetHwnd;
+begin
+ GetProcedureAddress(_ADsPropSetHwnd, dsprop, 'ADsPropSetHwnd');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ADsPropSetHwnd]
+ end;
+end;
+
+var
+ _ADsPropCheckIfWritable: Pointer;
+
+function ADsPropCheckIfWritable;
+begin
+ GetProcedureAddress(_ADsPropCheckIfWritable, dsprop, 'ADsPropCheckIfWritable');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ADsPropCheckIfWritable]
+ end;
+end;
+
+var
+ _ADsPropSendErrorMessage: Pointer;
+
+function ADsPropSendErrorMessage;
+begin
+ GetProcedureAddress(_ADsPropSendErrorMessage, dsprop, 'ADsPropSendErrorMessage');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ADsPropSendErrorMessage]
+ end;
+end;
+
+var
+ _ADsPropShowErrorDialog: Pointer;
+
+function ADsPropShowErrorDialog;
+begin
+ GetProcedureAddress(_ADsPropShowErrorDialog, dsprop, 'ADsPropShowErrorDialog');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ADsPropShowErrorDialog]
+ end;
+end;
+
+{$ELSE}
+
+function ADsPropCreateNotifyObj; external dsprop name 'ADsPropCreateNotifyObj';
+function ADsPropGetInitInfo; external dsprop name 'ADsPropGetInitInfo';
+function ADsPropSetHwndWithTitle; external dsprop name 'ADsPropSetHwndWithTitle';
+function ADsPropSetHwnd; external dsprop name 'ADsPropSetHwnd';
+function ADsPropCheckIfWritable; external dsprop name 'ADsPropCheckIfWritable';
+function ADsPropSendErrorMessage; external dsprop name 'ADsPropSendErrorMessage';
+function ADsPropShowErrorDialog; external dsprop name 'ADsPropShowErrorDialog';
+
+{$ENDIF DYNAMIC_LINK}
+
+end.
diff --git a/packages/extra/winunits/jwaadssts.pas b/packages/extra/winunits/jwaadssts.pas
index ccf9cad249..507dab9a0c 100644
--- a/packages/extra/winunits/jwaadssts.pas
+++ b/packages/extra/winunits/jwaadssts.pas
@@ -1,203 +1,203 @@
-{******************************************************************************}
-{ }
-{ Active Directory Status Codes API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: adssts.h, released June 2000. The original Pascal }
-{ code is: AdsSts.pas, released December 2000. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwaadssts.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaAdssts;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "adssts.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaWinNT;
-
-// Contents: Status Codes for ADS objects
-
-const
- ADS_PRINTER_PAUSED = $00000001;
- {$EXTERNALSYM ADS_PRINTER_PAUSED}
- ADS_PRINTER_PENDING_DELETION = $00000002;
- {$EXTERNALSYM ADS_PRINTER_PENDING_DELETION}
- ADS_PRINTER_ERROR = $00000003;
- {$EXTERNALSYM ADS_PRINTER_ERROR}
- ADS_PRINTER_PAPER_JAM = $00000004;
- {$EXTERNALSYM ADS_PRINTER_PAPER_JAM}
- ADS_PRINTER_PAPER_OUT = $00000005;
- {$EXTERNALSYM ADS_PRINTER_PAPER_OUT}
- ADS_PRINTER_MANUAL_FEED = $00000006;
- {$EXTERNALSYM ADS_PRINTER_MANUAL_FEED}
- ADS_PRINTER_PAPER_PROBLEM = $00000007;
- {$EXTERNALSYM ADS_PRINTER_PAPER_PROBLEM}
- ADS_PRINTER_OFFLINE = $00000008;
- {$EXTERNALSYM ADS_PRINTER_OFFLINE}
- ADS_PRINTER_IO_ACTIVE = $00000100;
- {$EXTERNALSYM ADS_PRINTER_IO_ACTIVE}
- ADS_PRINTER_BUSY = $00000200;
- {$EXTERNALSYM ADS_PRINTER_BUSY}
- ADS_PRINTER_PRINTING = $00000400;
- {$EXTERNALSYM ADS_PRINTER_PRINTING}
- ADS_PRINTER_OUTPUT_BIN_FULL = $00000800;
- {$EXTERNALSYM ADS_PRINTER_OUTPUT_BIN_FULL}
- ADS_PRINTER_NOT_AVAILABLE = $00001000;
- {$EXTERNALSYM ADS_PRINTER_NOT_AVAILABLE}
- ADS_PRINTER_WAITING = $00002000;
- {$EXTERNALSYM ADS_PRINTER_WAITING}
- ADS_PRINTER_PROCESSING = $00004000;
- {$EXTERNALSYM ADS_PRINTER_PROCESSING}
- ADS_PRINTER_INITIALIZING = $00008000;
- {$EXTERNALSYM ADS_PRINTER_INITIALIZING}
- ADS_PRINTER_WARMING_UP = $00010000;
- {$EXTERNALSYM ADS_PRINTER_WARMING_UP}
- ADS_PRINTER_TONER_LOW = $00020000;
- {$EXTERNALSYM ADS_PRINTER_TONER_LOW}
- ADS_PRINTER_NO_TONER = $00040000;
- {$EXTERNALSYM ADS_PRINTER_NO_TONER}
- ADS_PRINTER_PAGE_PUNT = $00080000;
- {$EXTERNALSYM ADS_PRINTER_PAGE_PUNT}
- ADS_PRINTER_USER_INTERVENTION = $00100000;
- {$EXTERNALSYM ADS_PRINTER_USER_INTERVENTION}
- ADS_PRINTER_OUT_OF_MEMORY = $00200000;
- {$EXTERNALSYM ADS_PRINTER_OUT_OF_MEMORY}
- ADS_PRINTER_DOOR_OPEN = $00400000;
- {$EXTERNALSYM ADS_PRINTER_DOOR_OPEN}
- ADS_PRINTER_SERVER_UNKNOWN = $00800000;
- {$EXTERNALSYM ADS_PRINTER_SERVER_UNKNOWN}
- ADS_PRINTER_POWER_SAVE = $01000000;
- {$EXTERNALSYM ADS_PRINTER_POWER_SAVE}
-
-//
-// job status values
-//
-
- ADS_JOB_PAUSED = $00000001;
- {$EXTERNALSYM ADS_JOB_PAUSED}
- ADS_JOB_ERROR = $00000002;
- {$EXTERNALSYM ADS_JOB_ERROR}
- ADS_JOB_DELETING = $00000004;
- {$EXTERNALSYM ADS_JOB_DELETING}
- ADS_JOB_SPOOLING = $00000008;
- {$EXTERNALSYM ADS_JOB_SPOOLING}
- ADS_JOB_PRINTING = $00000010;
- {$EXTERNALSYM ADS_JOB_PRINTING}
- ADS_JOB_OFFLINE = $00000020;
- {$EXTERNALSYM ADS_JOB_OFFLINE}
- ADS_JOB_PAPEROUT = $00000040;
- {$EXTERNALSYM ADS_JOB_PAPEROUT}
- ADS_JOB_PRINTED = $00000080;
- {$EXTERNALSYM ADS_JOB_PRINTED}
- ADS_JOB_DELETED = $00000100;
- {$EXTERNALSYM ADS_JOB_DELETED}
-
-//
-// service status values
-//
-
- ADS_SERVICE_STOPPED = $00000001;
- {$EXTERNALSYM ADS_SERVICE_STOPPED}
- ADS_SERVICE_START_PENDING = $00000002;
- {$EXTERNALSYM ADS_SERVICE_START_PENDING}
- ADS_SERVICE_STOP_PENDING = $00000003;
- {$EXTERNALSYM ADS_SERVICE_STOP_PENDING}
- ADS_SERVICE_RUNNING = $00000004;
- {$EXTERNALSYM ADS_SERVICE_RUNNING}
- ADS_SERVICE_CONTINUE_PENDING = $00000005;
- {$EXTERNALSYM ADS_SERVICE_CONTINUE_PENDING}
- ADS_SERVICE_PAUSE_PENDING = $00000006;
- {$EXTERNALSYM ADS_SERVICE_PAUSE_PENDING}
- ADS_SERVICE_PAUSED = $00000007;
- {$EXTERNALSYM ADS_SERVICE_PAUSED}
- ADS_SERVICE_ERROR = $00000008;
- {$EXTERNALSYM ADS_SERVICE_ERROR}
-
-//---------------------------------------------------------------------
-
-//
-// Service Type Valid Values
-//
-
- ADS_SERVICE_OWN_PROCESS = $00000010;
- {$EXTERNALSYM ADS_SERVICE_OWN_PROCESS}
- ADS_SERVICE_SHARE_PROCESS = $00000020;
- {$EXTERNALSYM ADS_SERVICE_SHARE_PROCESS}
- ADS_SERVICE_KERNEL_DRIVER = $00000001;
- {$EXTERNALSYM ADS_SERVICE_KERNEL_DRIVER}
- ADS_SERVICE_FILE_SYSTEM_DRIVER = $00000002;
- {$EXTERNALSYM ADS_SERVICE_FILE_SYSTEM_DRIVER}
-
-//
-// Start Type Valid Values
-//
-
- ADS_SERVICE_BOOT_START = SERVICE_BOOT_START;
- {$EXTERNALSYM ADS_SERVICE_BOOT_START}
- ADS_SERVICE_SYSTEM_START = SERVICE_SYSTEM_START;
- {$EXTERNALSYM ADS_SERVICE_SYSTEM_START}
- ADS_SERVICE_AUTO_START = SERVICE_AUTO_START;
- {$EXTERNALSYM ADS_SERVICE_AUTO_START}
- ADS_SERVICE_DEMAND_START = SERVICE_DEMAND_START;
- {$EXTERNALSYM ADS_SERVICE_DEMAND_START}
- ADS_SERVICE_DISABLED = SERVICE_DISABLED;
- {$EXTERNALSYM ADS_SERVICE_DISABLED}
-
-//
-// Error Control Values
-//
-
- ADS_SERVICE_ERROR_IGNORE = 0;
- {$EXTERNALSYM ADS_SERVICE_ERROR_IGNORE}
- ADS_SERVICE_ERROR_NORMAL = 1;
- {$EXTERNALSYM ADS_SERVICE_ERROR_NORMAL}
- ADS_SERVICE_ERROR_SEVERE = 2;
- {$EXTERNALSYM ADS_SERVICE_ERROR_SEVERE}
- ADS_SERVICE_ERROR_CRITICAL = 3;
- {$EXTERNALSYM ADS_SERVICE_ERROR_CRITICAL}
-
-implementation
-
-end.
+{******************************************************************************}
+{ }
+{ Active Directory Status Codes API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: adssts.h, released June 2000. The original Pascal }
+{ code is: AdsSts.pas, released December 2000. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwaadssts.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaAdssts;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "adssts.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaWinNT;
+
+// Contents: Status Codes for ADS objects
+
+const
+ ADS_PRINTER_PAUSED = $00000001;
+ {$EXTERNALSYM ADS_PRINTER_PAUSED}
+ ADS_PRINTER_PENDING_DELETION = $00000002;
+ {$EXTERNALSYM ADS_PRINTER_PENDING_DELETION}
+ ADS_PRINTER_ERROR = $00000003;
+ {$EXTERNALSYM ADS_PRINTER_ERROR}
+ ADS_PRINTER_PAPER_JAM = $00000004;
+ {$EXTERNALSYM ADS_PRINTER_PAPER_JAM}
+ ADS_PRINTER_PAPER_OUT = $00000005;
+ {$EXTERNALSYM ADS_PRINTER_PAPER_OUT}
+ ADS_PRINTER_MANUAL_FEED = $00000006;
+ {$EXTERNALSYM ADS_PRINTER_MANUAL_FEED}
+ ADS_PRINTER_PAPER_PROBLEM = $00000007;
+ {$EXTERNALSYM ADS_PRINTER_PAPER_PROBLEM}
+ ADS_PRINTER_OFFLINE = $00000008;
+ {$EXTERNALSYM ADS_PRINTER_OFFLINE}
+ ADS_PRINTER_IO_ACTIVE = $00000100;
+ {$EXTERNALSYM ADS_PRINTER_IO_ACTIVE}
+ ADS_PRINTER_BUSY = $00000200;
+ {$EXTERNALSYM ADS_PRINTER_BUSY}
+ ADS_PRINTER_PRINTING = $00000400;
+ {$EXTERNALSYM ADS_PRINTER_PRINTING}
+ ADS_PRINTER_OUTPUT_BIN_FULL = $00000800;
+ {$EXTERNALSYM ADS_PRINTER_OUTPUT_BIN_FULL}
+ ADS_PRINTER_NOT_AVAILABLE = $00001000;
+ {$EXTERNALSYM ADS_PRINTER_NOT_AVAILABLE}
+ ADS_PRINTER_WAITING = $00002000;
+ {$EXTERNALSYM ADS_PRINTER_WAITING}
+ ADS_PRINTER_PROCESSING = $00004000;
+ {$EXTERNALSYM ADS_PRINTER_PROCESSING}
+ ADS_PRINTER_INITIALIZING = $00008000;
+ {$EXTERNALSYM ADS_PRINTER_INITIALIZING}
+ ADS_PRINTER_WARMING_UP = $00010000;
+ {$EXTERNALSYM ADS_PRINTER_WARMING_UP}
+ ADS_PRINTER_TONER_LOW = $00020000;
+ {$EXTERNALSYM ADS_PRINTER_TONER_LOW}
+ ADS_PRINTER_NO_TONER = $00040000;
+ {$EXTERNALSYM ADS_PRINTER_NO_TONER}
+ ADS_PRINTER_PAGE_PUNT = $00080000;
+ {$EXTERNALSYM ADS_PRINTER_PAGE_PUNT}
+ ADS_PRINTER_USER_INTERVENTION = $00100000;
+ {$EXTERNALSYM ADS_PRINTER_USER_INTERVENTION}
+ ADS_PRINTER_OUT_OF_MEMORY = $00200000;
+ {$EXTERNALSYM ADS_PRINTER_OUT_OF_MEMORY}
+ ADS_PRINTER_DOOR_OPEN = $00400000;
+ {$EXTERNALSYM ADS_PRINTER_DOOR_OPEN}
+ ADS_PRINTER_SERVER_UNKNOWN = $00800000;
+ {$EXTERNALSYM ADS_PRINTER_SERVER_UNKNOWN}
+ ADS_PRINTER_POWER_SAVE = $01000000;
+ {$EXTERNALSYM ADS_PRINTER_POWER_SAVE}
+
+//
+// job status values
+//
+
+ ADS_JOB_PAUSED = $00000001;
+ {$EXTERNALSYM ADS_JOB_PAUSED}
+ ADS_JOB_ERROR = $00000002;
+ {$EXTERNALSYM ADS_JOB_ERROR}
+ ADS_JOB_DELETING = $00000004;
+ {$EXTERNALSYM ADS_JOB_DELETING}
+ ADS_JOB_SPOOLING = $00000008;
+ {$EXTERNALSYM ADS_JOB_SPOOLING}
+ ADS_JOB_PRINTING = $00000010;
+ {$EXTERNALSYM ADS_JOB_PRINTING}
+ ADS_JOB_OFFLINE = $00000020;
+ {$EXTERNALSYM ADS_JOB_OFFLINE}
+ ADS_JOB_PAPEROUT = $00000040;
+ {$EXTERNALSYM ADS_JOB_PAPEROUT}
+ ADS_JOB_PRINTED = $00000080;
+ {$EXTERNALSYM ADS_JOB_PRINTED}
+ ADS_JOB_DELETED = $00000100;
+ {$EXTERNALSYM ADS_JOB_DELETED}
+
+//
+// service status values
+//
+
+ ADS_SERVICE_STOPPED = $00000001;
+ {$EXTERNALSYM ADS_SERVICE_STOPPED}
+ ADS_SERVICE_START_PENDING = $00000002;
+ {$EXTERNALSYM ADS_SERVICE_START_PENDING}
+ ADS_SERVICE_STOP_PENDING = $00000003;
+ {$EXTERNALSYM ADS_SERVICE_STOP_PENDING}
+ ADS_SERVICE_RUNNING = $00000004;
+ {$EXTERNALSYM ADS_SERVICE_RUNNING}
+ ADS_SERVICE_CONTINUE_PENDING = $00000005;
+ {$EXTERNALSYM ADS_SERVICE_CONTINUE_PENDING}
+ ADS_SERVICE_PAUSE_PENDING = $00000006;
+ {$EXTERNALSYM ADS_SERVICE_PAUSE_PENDING}
+ ADS_SERVICE_PAUSED = $00000007;
+ {$EXTERNALSYM ADS_SERVICE_PAUSED}
+ ADS_SERVICE_ERROR = $00000008;
+ {$EXTERNALSYM ADS_SERVICE_ERROR}
+
+//---------------------------------------------------------------------
+
+//
+// Service Type Valid Values
+//
+
+ ADS_SERVICE_OWN_PROCESS = $00000010;
+ {$EXTERNALSYM ADS_SERVICE_OWN_PROCESS}
+ ADS_SERVICE_SHARE_PROCESS = $00000020;
+ {$EXTERNALSYM ADS_SERVICE_SHARE_PROCESS}
+ ADS_SERVICE_KERNEL_DRIVER = $00000001;
+ {$EXTERNALSYM ADS_SERVICE_KERNEL_DRIVER}
+ ADS_SERVICE_FILE_SYSTEM_DRIVER = $00000002;
+ {$EXTERNALSYM ADS_SERVICE_FILE_SYSTEM_DRIVER}
+
+//
+// Start Type Valid Values
+//
+
+ ADS_SERVICE_BOOT_START = SERVICE_BOOT_START;
+ {$EXTERNALSYM ADS_SERVICE_BOOT_START}
+ ADS_SERVICE_SYSTEM_START = SERVICE_SYSTEM_START;
+ {$EXTERNALSYM ADS_SERVICE_SYSTEM_START}
+ ADS_SERVICE_AUTO_START = SERVICE_AUTO_START;
+ {$EXTERNALSYM ADS_SERVICE_AUTO_START}
+ ADS_SERVICE_DEMAND_START = SERVICE_DEMAND_START;
+ {$EXTERNALSYM ADS_SERVICE_DEMAND_START}
+ ADS_SERVICE_DISABLED = SERVICE_DISABLED;
+ {$EXTERNALSYM ADS_SERVICE_DISABLED}
+
+//
+// Error Control Values
+//
+
+ ADS_SERVICE_ERROR_IGNORE = 0;
+ {$EXTERNALSYM ADS_SERVICE_ERROR_IGNORE}
+ ADS_SERVICE_ERROR_NORMAL = 1;
+ {$EXTERNALSYM ADS_SERVICE_ERROR_NORMAL}
+ ADS_SERVICE_ERROR_SEVERE = 2;
+ {$EXTERNALSYM ADS_SERVICE_ERROR_SEVERE}
+ ADS_SERVICE_ERROR_CRITICAL = 3;
+ {$EXTERNALSYM ADS_SERVICE_ERROR_CRITICAL}
+
+implementation
+
+end.
diff --git a/packages/extra/winunits/jwaadstlb.pas b/packages/extra/winunits/jwaadstlb.pas
index 03eeb48282..c009dfad91 100644
--- a/packages/extra/winunits/jwaadstlb.pas
+++ b/packages/extra/winunits/jwaadstlb.pas
@@ -1,10302 +1,10302 @@
-// $Id: jwaadstlb.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaAdsTLB;
-
-// ************************************************************************ //
-// WARNING
-// -------
-// The types declared in this file were generated from data read from a
-// Type Library. If this type library is explicitly or indirectly (via
-// another type library referring to this type library) re-imported, or the
-// 'Refresh' command of the Type Library Editor activated while editing the
-// Type Library, the contents of this file will be regenerated and all
-// manual modifications will be lost.
-// ************************************************************************ //
-
-// (rom) deactivated CVS string
-// PASTLWTR : Revision: 1.88.1.0.1.0
-// File generated on 9/25/2000 11:37:09 AM from Type Library described below.
-
-// *************************************************************************//
-// NOTE:
-// Items guarded by $IFDEF_LIVE_SERVER_AT_DESIGN_TIME are used by properties
-// which return objects that may need to be explicitly created via a function
-// call prior to any access via the property. These items have been disabled
-// in order to prevent accidental use from within the object inspector. You
-// may enable them by defining LIVE_SERVER_AT_DESIGN_TIME or by selectively
-// removing them from the $IFDEF blocks. However, such items must still be
-// programmatically created via a method of the appropriate CoClass before
-// they can be used.
-// ************************************************************************ //
-// Type Lib: C:\WINNT\system32\activeds.tlb (1)
-// IID\LCID: {97D25DB0-0363-11CF-ABC4-02608C9E7553}\0
-// Helpfile:
-// DepndLst:
-// (1) v2.0 stdole, (C:\WINNT\System32\stdole2.tlb)
-// (2) v4.0 StdVCL, (C:\WINNT\System32\STDVCL40.DLL)
-// Errors:
-// Hint: Member 'String' of '_ADS_CASEIGNORE_LIST' changed to 'String_'
-// Hint: Member 'Type' of '__MIDL___MIDL_itf_ads_0000_0005' changed to 'Type_'
-// Hint: Member 'Type' of '__MIDL___MIDL_itf_ads_0000_0014' changed to 'Type_'
-// Hint: Member 'Class' of 'IADs' changed to 'Class_'
-// Hint: Member 'Set' of 'IADsNameTranslate' changed to 'Set_'
-// Hint: Member 'Type' of 'IADsEmail' changed to 'Type_'
-// Hint: Member 'Type' of 'IADsPath' changed to 'Type_'
-// Hint: Member 'Set' of 'IADsPathname' changed to 'Set_'
-// Error creating palette bitmap of (TPropertyEntry) : Server activeds.dll contains no icons
-// Error creating palette bitmap of (TPropertyValue) : Server activeds.dll contains no icons
-// Error creating palette bitmap of (TAccessControlEntry) : Server activeds.dll contains no icons
-// Error creating palette bitmap of (TAccessControlList) : Server activeds.dll contains no icons
-// Error creating palette bitmap of (TSecurityDescriptor) : Server activeds.dll contains no icons
-// Error creating palette bitmap of (TLargeInteger) : Server activeds.dll contains no icons
-// Error creating palette bitmap of (TNameTranslate) : Server activeds.dll contains no icons
-// Error creating palette bitmap of (TCaseIgnoreList) : Server activeds.dll contains no icons
-// Error creating palette bitmap of (TFaxNumber) : Server activeds.dll contains no icons
-// Error creating palette bitmap of (TNetAddress) : Server activeds.dll contains no icons
-// Error creating palette bitmap of (TOctetList) : Server activeds.dll contains no icons
-// Error creating palette bitmap of (TEmail) : Server activeds.dll contains no icons
-// Error creating palette bitmap of (TPath) : Server activeds.dll contains no icons
-// Error creating palette bitmap of (TReplicaPointer) : Server activeds.dll contains no icons
-// Error creating palette bitmap of (TAcl) : Server activeds.dll contains no icons
-// Error creating palette bitmap of (TTimestamp) : Server activeds.dll contains no icons
-// Error creating palette bitmap of (TPostalAddress) : Server activeds.dll contains no icons
-// Error creating palette bitmap of (TBackLink) : Server activeds.dll contains no icons
-// Error creating palette bitmap of (TTypedName) : Server activeds.dll contains no icons
-// Error creating palette bitmap of (THold) : Server activeds.dll contains no icons
-// Error creating palette bitmap of (TPathname) : Server activeds.dll contains no icons
-// Error creating palette bitmap of (TADSystemInfo) : Server activeds.dll contains no icons
-// Error creating palette bitmap of (TWinNTSystemInfo) : Server activeds.dll contains no icons
-// Error creating palette bitmap of (TDNWithBinary) : Server activeds.dll contains no icons
-// Error creating palette bitmap of (TDNWithString) : Server activeds.dll contains no icons
-// ************************************************************************ //
-{$TYPEDADDRESS OFF} // Unit must be compiled without type-checked pointers.
-
-interface
-{$i jediapilib.inc}
-uses
- Windows, ActiveX, Classes {$IFNDEF NOVCL} ,Graphics, OleServer, OleCtrls, StdVCL {$ENDIF} ;
-
-{$IFDEF FPC}
-Type
-// Temporary dummies to get FPC working.
- TServerData= Record
- ClassID: TGUID;
- IntfIID: TGUID;
- EventIID: String; // probably TGUID too
- LicenseKey: pointer;
- Version: integer
- end;
-
-
-
- TOleServer = Class(TComponent) // for registercomponents to work
- private
- ServerData : ^TServerData;
- public
- function GetServer:IUnknown;
- procedure InitServerData; virtual;
- constructor Create(AOwner: TComponent); virtual;
- Procedure Connect; virtual;
- procedure Disconnect; virtual;
- end;
-
-
- SysUINT = Windows.UINT;
- SysINT = Windows.WINT;
-{$endif}
-
-// *********************************************************************//
-// GUIDS declared in the TypeLibrary. Following prefixes are used:
-// Type Libraries : LIBID_xxxx
-// CoClasses : CLASS_xxxx
-// DISPInterfaces : DIID_xxxx
-// Non-DISP interfaces: IID_xxxx
-// *********************************************************************//
-
-const
- // TypeLibrary Major and minor versions
- ActiveDsMajorVersion = 1;
- ActiveDsMinorVersion = 0;
-
- LIBID_ActiveDs: TGUID = '{97D25DB0-0363-11CF-ABC4-02608C9E7553}';
-
- IID_IADs: TGUID = '{FD8256D0-FD15-11CE-ABC4-02608C9E7553}';
- IID_IADsContainer: TGUID = '{001677D0-FD16-11CE-ABC4-02608C9E7553}';
- IID_IADsCollection: TGUID = '{72B945E0-253B-11CF-A988-00AA006BC149}';
- IID_IADsMembers: TGUID = '{451A0030-72EC-11CF-B03B-00AA006E0975}';
- IID_IADsPropertyList: TGUID = '{C6F602B6-8F69-11D0-8528-00C04FD8D503}';
- IID_IADsPropertyEntry: TGUID = '{05792C8E-941F-11D0-8529-00C04FD8D503}';
- CLASS_PropertyEntry: TGUID = '{72D3EDC2-A4C4-11D0-8533-00C04FD8D503}';
- IID_IADsPropertyValue: TGUID = '{79FA9AD0-A97C-11D0-8534-00C04FD8D503}';
- IID_IADsPropertyValue2: TGUID = '{306E831C-5BC7-11D1-A3B8-00C04FB950DC}';
- CLASS_PropertyValue: TGUID = '{7B9E38B0-A97C-11D0-8534-00C04FD8D503}';
- IID_IPrivateDispatch: TGUID = '{86AB4BBE-65F6-11D1-8C13-00C04FD8D503}';
- IID_ITypeInfo: TGUID = '{00020401-0000-0000-C000-000000000046}';
- IID_ITypeComp: TGUID = '{00020403-0000-0000-C000-000000000046}';
- IID_ITypeLib: TGUID = '{00020402-0000-0000-C000-000000000046}';
- IID_IPrivateUnknown: TGUID = '{89126BAB-6EAD-11D1-8C18-00C04FD8D503}';
- IID_IADsExtension: TGUID = '{3D35553C-D2B0-11D1-B17B-0000F87593A0}';
- IID_IADsDeleteOps: TGUID = '{B2BD0902-8878-11D1-8C21-00C04FD8D503}';
- IID_IADsNamespaces: TGUID = '{28B96BA0-B330-11CF-A9AD-00AA006BC149}';
- IID_IADsClass: TGUID = '{C8F93DD0-4AE0-11CF-9E73-00AA004A5691}';
- IID_IADsProperty: TGUID = '{C8F93DD3-4AE0-11CF-9E73-00AA004A5691}';
- IID_IADsSyntax: TGUID = '{C8F93DD2-4AE0-11CF-9E73-00AA004A5691}';
- IID_IADsLocality: TGUID = '{A05E03A2-EFFE-11CF-8ABC-00C04FD8D503}';
- IID_IADsO: TGUID = '{A1CD2DC6-EFFE-11CF-8ABC-00C04FD8D503}';
- IID_IADsOU: TGUID = '{A2F733B8-EFFE-11CF-8ABC-00C04FD8D503}';
- IID_IADsDomain: TGUID = '{00E4C220-FD16-11CE-ABC4-02608C9E7553}';
- IID_IADsComputer: TGUID = '{EFE3CC70-1D9F-11CF-B1F3-02608C9E7553}';
- IID_IADsComputerOperations: TGUID = '{EF497680-1D9F-11CF-B1F3-02608C9E7553}';
- IID_IADsGroup: TGUID = '{27636B00-410F-11CF-B1FF-02608C9E7553}';
- IID_IADsUser: TGUID = '{3E37E320-17E2-11CF-ABC4-02608C9E7553}';
- IID_IADsPrintQueue: TGUID = '{B15160D0-1226-11CF-A985-00AA006BC149}';
- IID_IADsPrintQueueOperations: TGUID = '{124BE5C0-156E-11CF-A986-00AA006BC149}';
- IID_IADsPrintJob: TGUID = '{32FB6780-1ED0-11CF-A988-00AA006BC149}';
- IID_IADsPrintJobOperations: TGUID = '{9A52DB30-1ECF-11CF-A988-00AA006BC149}';
- IID_IADsService: TGUID = '{68AF66E0-31CA-11CF-A98A-00AA006BC149}';
- IID_IADsServiceOperations: TGUID = '{5D7B33F0-31CA-11CF-A98A-00AA006BC149}';
- IID_IADsFileService: TGUID = '{A89D1900-31CA-11CF-A98A-00AA006BC149}';
- IID_IADsFileServiceOperations: TGUID = '{A02DED10-31CA-11CF-A98A-00AA006BC149}';
- IID_IADsFileShare: TGUID = '{EB6DCAF0-4B83-11CF-A995-00AA006BC149}';
- IID_IADsSession: TGUID = '{398B7DA0-4AAB-11CF-AE2C-00AA006EBFB9}';
- IID_IADsResource: TGUID = '{34A05B20-4AAB-11CF-AE2C-00AA006EBFB9}';
- IID_IADsOpenDSObject: TGUID = '{DDF2891E-0F9C-11D0-8AD4-00C04FD8D503}';
- IID_IDirectoryObject: TGUID = '{E798DE2C-22E4-11D0-84FE-00C04FD8D503}';
- IID_IDirectorySearch: TGUID = '{109BA8EC-92F0-11D0-A790-00C04FD8D5A8}';
- IID_IDirectorySchemaMgmt: TGUID = '{75DB3B9C-A4D8-11D0-A79C-00C04FD8D5A8}';
- IID_IADsAggregatee: TGUID = '{1346CE8C-9039-11D0-8528-00C04FD8D503}';
- IID_IADsAggregator: TGUID = '{52DB5FB0-941F-11D0-8529-00C04FD8D503}';
- IID_IADsAccessControlEntry: TGUID = '{B4F3A14C-9BDD-11D0-852C-00C04FD8D503}';
- CLASS_AccessControlEntry: TGUID = '{B75AC000-9BDD-11D0-852C-00C04FD8D503}';
- IID_IADsAccessControlList: TGUID = '{B7EE91CC-9BDD-11D0-852C-00C04FD8D503}';
- CLASS_AccessControlList: TGUID = '{B85EA052-9BDD-11D0-852C-00C04FD8D503}';
- IID_IADsSecurityDescriptor: TGUID = '{B8C787CA-9BDD-11D0-852C-00C04FD8D503}';
- CLASS_SecurityDescriptor: TGUID = '{B958F73C-9BDD-11D0-852C-00C04FD8D503}';
- IID_IADsLargeInteger: TGUID = '{9068270B-0939-11D1-8BE1-00C04FD8D503}';
- CLASS_LargeInteger: TGUID = '{927971F5-0939-11D1-8BE1-00C04FD8D503}';
- IID_IADsNameTranslate: TGUID = '{B1B272A3-3625-11D1-A3A4-00C04FB950DC}';
- CLASS_NameTranslate: TGUID = '{274FAE1F-3626-11D1-A3A4-00C04FB950DC}';
- IID_IADsCaseIgnoreList: TGUID = '{7B66B533-4680-11D1-A3B4-00C04FB950DC}';
- CLASS_CaseIgnoreList: TGUID = '{15F88A55-4680-11D1-A3B4-00C04FB950DC}';
- IID_IADsFaxNumber: TGUID = '{A910DEA9-4680-11D1-A3B4-00C04FB950DC}';
- CLASS_FaxNumber: TGUID = '{A5062215-4681-11D1-A3B4-00C04FB950DC}';
- IID_IADsNetAddress: TGUID = '{B21A50A9-4080-11D1-A3AC-00C04FB950DC}';
- CLASS_NetAddress: TGUID = '{B0B71247-4080-11D1-A3AC-00C04FB950DC}';
- IID_IADsOctetList: TGUID = '{7B28B80F-4680-11D1-A3B4-00C04FB950DC}';
- CLASS_OctetList: TGUID = '{1241400F-4680-11D1-A3B4-00C04FB950DC}';
- IID_IADsEmail: TGUID = '{97AF011A-478E-11D1-A3B4-00C04FB950DC}';
- CLASS_Email: TGUID = '{8F92A857-478E-11D1-A3B4-00C04FB950DC}';
- IID_IADsPath: TGUID = '{B287FCD5-4080-11D1-A3AC-00C04FB950DC}';
- CLASS_Path: TGUID = '{B2538919-4080-11D1-A3AC-00C04FB950DC}';
- IID_IADsReplicaPointer: TGUID = '{F60FB803-4080-11D1-A3AC-00C04FB950DC}';
- CLASS_ReplicaPointer: TGUID = '{F5D1BADF-4080-11D1-A3AC-00C04FB950DC}';
- IID_IADsAcl: TGUID = '{8452D3AB-0869-11D1-A377-00C04FB950DC}';
- CLASS_Acl: TGUID = '{7AF1EFB6-0869-11D1-A377-00C04FB950DC}';
- IID_IADsTimestamp: TGUID = '{B2F5A901-4080-11D1-A3AC-00C04FB950DC}';
- CLASS_Timestamp: TGUID = '{B2BED2EB-4080-11D1-A3AC-00C04FB950DC}';
- IID_IADsPostalAddress: TGUID = '{7ADECF29-4680-11D1-A3B4-00C04FB950DC}';
- CLASS_PostalAddress: TGUID = '{0A75AFCD-4680-11D1-A3B4-00C04FB950DC}';
- IID_IADsBackLink: TGUID = '{FD1302BD-4080-11D1-A3AC-00C04FB950DC}';
- CLASS_BackLink: TGUID = '{FCBF906F-4080-11D1-A3AC-00C04FB950DC}';
- IID_IADsTypedName: TGUID = '{B371A349-4080-11D1-A3AC-00C04FB950DC}';
- CLASS_TypedName: TGUID = '{B33143CB-4080-11D1-A3AC-00C04FB950DC}';
- IID_IADsHold: TGUID = '{B3EB3B37-4080-11D1-A3AC-00C04FB950DC}';
- CLASS_Hold: TGUID = '{B3AD3E13-4080-11D1-A3AC-00C04FB950DC}';
- IID_IADsObjectOptions: TGUID = '{46F14FDA-232B-11D1-A808-00C04FD8D5A8}';
- IID_IADsPathname: TGUID = '{D592AED4-F420-11D0-A36E-00C04FB950DC}';
- CLASS_Pathname: TGUID = '{080D0D78-F421-11D0-A36E-00C04FB950DC}';
- IID_IADsADSystemInfo: TGUID = '{5BB11929-AFD1-11D2-9CB9-0000F87A369E}';
- CLASS_ADSystemInfo: TGUID = '{50B6327F-AFD1-11D2-9CB9-0000F87A369E}';
- IID_IADsWinNTSystemInfo: TGUID = '{6C6D65DC-AFD1-11D2-9CB9-0000F87A369E}';
- CLASS_WinNTSystemInfo: TGUID = '{66182EC4-AFD1-11D2-9CB9-0000F87A369E}';
- IID_IADsDNWithBinary: TGUID = '{7E99C0A2-F935-11D2-BA96-00C04FB6D0D1}';
- CLASS_DNWithBinary: TGUID = '{7E99C0A3-F935-11D2-BA96-00C04FB6D0D1}';
- IID_IADsDNWithString: TGUID = '{370DF02E-F934-11D2-BA96-00C04FB6D0D1}';
- CLASS_DNWithString: TGUID = '{334857CC-F934-11D2-BA96-00C04FB6D0D1}';
-
-// *********************************************************************//
-// Declaration of Enumerations defined in Type Library
-// *********************************************************************//
-// Constants for enum __MIDL___MIDL_itf_ads_0000_0001
-type
- __MIDL___MIDL_itf_ads_0000_0001 = TOleEnum;
-const
- ADSTYPE_INVALID = $00000000;
- ADSTYPE_DN_STRING = $00000001;
- ADSTYPE_CASE_EXACT_STRING = $00000002;
- ADSTYPE_CASE_IGNORE_STRING = $00000003;
- ADSTYPE_PRINTABLE_STRING = $00000004;
- ADSTYPE_NUMERIC_STRING = $00000005;
- ADSTYPE_BOOLEAN = $00000006;
- ADSTYPE_INTEGER = $00000007;
- ADSTYPE_OCTET_STRING = $00000008;
- ADSTYPE_UTC_TIME = $00000009;
- ADSTYPE_LARGE_INTEGER = $0000000A;
- ADSTYPE_PROV_SPECIFIC = $0000000B;
- ADSTYPE_OBJECT_CLASS = $0000000C;
- ADSTYPE_CASEIGNORE_LIST = $0000000D;
- ADSTYPE_OCTET_LIST = $0000000E;
- ADSTYPE_PATH = $0000000F;
- ADSTYPE_POSTALADDRESS = $00000010;
- ADSTYPE_TIMESTAMP = $00000011;
- ADSTYPE_BACKLINK = $00000012;
- ADSTYPE_TYPEDNAME = $00000013;
- ADSTYPE_HOLD = $00000014;
- ADSTYPE_NETADDRESS = $00000015;
- ADSTYPE_REPLICAPOINTER = $00000016;
- ADSTYPE_FAXNUMBER = $00000017;
- ADSTYPE_EMAIL = $00000018;
- ADSTYPE_NT_SECURITY_DESCRIPTOR = $00000019;
- ADSTYPE_UNKNOWN = $0000001A;
- ADSTYPE_DN_WITH_BINARY = $0000001B;
- ADSTYPE_DN_WITH_STRING = $0000001C;
-
-// Constants for enum __MIDL___MIDL_itf_ads_0000_0018
-type
- __MIDL___MIDL_itf_ads_0000_0018 = TOleEnum;
-const
- ADS_SECURE_AUTHENTICATION = $00000001;
- ADS_USE_ENCRYPTION = $00000002;
- ADS_USE_SSL = $00000002;
- ADS_READONLY_SERVER = $00000004;
- ADS_PROMPT_CREDENTIALS = $00000008;
- ADS_NO_AUTHENTICATION = $00000010;
- ADS_FAST_BIND = $00000020;
- ADS_USE_SIGNING = $00000040;
- ADS_USE_SEALING = $00000080;
- ADS_USE_DELEGATION = $00000100;
- ADS_AUTH_RESERVED = $80000000;
-
-// Constants for enum __MIDL___MIDL_itf_ads_0000_0019
-type
- __MIDL___MIDL_itf_ads_0000_0019 = TOleEnum;
-const
- ADS_STATUS_S_OK = $00000000;
- ADS_STATUS_INVALID_SEARCHPREF = $00000001;
- ADS_STATUS_INVALID_SEARCHPREFVALUE = $00000002;
-
-// Constants for enum __MIDL___MIDL_itf_ads_0000_0020
-type
- __MIDL___MIDL_itf_ads_0000_0020 = TOleEnum;
-const
- ADS_DEREF_NEVER = $00000000;
- ADS_DEREF_SEARCHING = $00000001;
- ADS_DEREF_FINDING = $00000002;
- ADS_DEREF_ALWAYS = $00000003;
-
-// Constants for enum __MIDL___MIDL_itf_ads_0000_0021
-type
- __MIDL___MIDL_itf_ads_0000_0021 = TOleEnum;
-const
- ADS_SCOPE_BASE = $00000000;
- ADS_SCOPE_ONELEVEL = $00000001;
- ADS_SCOPE_SUBTREE = $00000002;
-
-// Constants for enum __MIDL___MIDL_itf_ads_0000_0022
-type
- __MIDL___MIDL_itf_ads_0000_0022 = TOleEnum;
-const
- ADSIPROP_ASYNCHRONOUS = $00000000;
- ADSIPROP_DEREF_ALIASES = $00000001;
- ADSIPROP_SIZE_LIMIT = $00000002;
- ADSIPROP_TIME_LIMIT = $00000003;
- ADSIPROP_ATTRIBTYPES_ONLY = $00000004;
- ADSIPROP_SEARCH_SCOPE = $00000005;
- ADSIPROP_TIMEOUT = $00000006;
- ADSIPROP_PAGESIZE = $00000007;
- ADSIPROP_PAGED_TIME_LIMIT = $00000008;
- ADSIPROP_CHASE_REFERRALS = $00000009;
- ADSIPROP_SORT_ON = $0000000A;
- ADSIPROP_CACHE_RESULTS = $0000000B;
- ADSIPROP_ADSIFLAG = $0000000C;
-
-// Constants for enum __MIDL___MIDL_itf_ads_0000_0023
-type
- __MIDL___MIDL_itf_ads_0000_0023 = TOleEnum;
-const
- ADSI_DIALECT_LDAP = $00000000;
- ADSI_DIALECT_SQL = $00000001;
-
-// Constants for enum __MIDL___MIDL_itf_ads_0000_0024
-type
- __MIDL___MIDL_itf_ads_0000_0024 = TOleEnum;
-const
- ADS_CHASE_REFERRALS_NEVER = $00000000;
- ADS_CHASE_REFERRALS_SUBORDINATE = $00000020;
- ADS_CHASE_REFERRALS_EXTERNAL = $00000040;
- ADS_CHASE_REFERRALS_ALWAYS = $00000060;
-
-// Constants for enum __MIDL___MIDL_itf_ads_0000_0025
-type
- __MIDL___MIDL_itf_ads_0000_0025 = TOleEnum;
-const
- ADS_SEARCHPREF_ASYNCHRONOUS = $00000000;
- ADS_SEARCHPREF_DEREF_ALIASES = $00000001;
- ADS_SEARCHPREF_SIZE_LIMIT = $00000002;
- ADS_SEARCHPREF_TIME_LIMIT = $00000003;
- ADS_SEARCHPREF_ATTRIBTYPES_ONLY = $00000004;
- ADS_SEARCHPREF_SEARCH_SCOPE = $00000005;
- ADS_SEARCHPREF_TIMEOUT = $00000006;
- ADS_SEARCHPREF_PAGESIZE = $00000007;
- ADS_SEARCHPREF_PAGED_TIME_LIMIT = $00000008;
- ADS_SEARCHPREF_CHASE_REFERRALS = $00000009;
- ADS_SEARCHPREF_SORT_ON = $0000000A;
- ADS_SEARCHPREF_CACHE_RESULTS = $0000000B;
- ADS_SEARCHPREF_DIRSYNC = $0000000C;
- ADS_SEARCHPREF_TOMBSTONE = $0000000D;
-
-// Constants for enum __MIDL___MIDL_itf_ads_0000_0026
-type
- __MIDL___MIDL_itf_ads_0000_0026 = TOleEnum;
-const
- ADS_PROPERTY_CLEAR = $00000001;
- ADS_PROPERTY_UPDATE = $00000002;
- ADS_PROPERTY_APPEND = $00000003;
- ADS_PROPERTY_DELETE = $00000004;
-
-// Constants for enum tagTYPEKIND
-type
- tagTYPEKIND = TOleEnum;
-const
- TKIND_ENUM = $00000000;
- TKIND_RECORD = $00000001;
- TKIND_MODULE = $00000002;
- TKIND_INTERFACE = $00000003;
- TKIND_DISPATCH = $00000004;
- TKIND_COCLASS = $00000005;
- TKIND_ALIAS = $00000006;
- TKIND_UNION = $00000007;
- TKIND_MAX = $00000008;
-
-// Constants for enum tagDESCKIND
-type
- tagDESCKIND = TOleEnum;
-const
- DESCKIND_NONE = $00000000;
- DESCKIND_FUNCDESC = $00000001;
- DESCKIND_VARDESC = $00000002;
- DESCKIND_TYPECOMP = $00000003;
- DESCKIND_IMPLICITAPPOBJ = $00000004;
- DESCKIND_MAX = $00000005;
-
-// Constants for enum tagFUNCKIND
-type
- tagFUNCKIND = TOleEnum;
-const
- FUNC_VIRTUAL = $00000000;
- FUNC_PUREVIRTUAL = $00000001;
- FUNC_NONVIRTUAL = $00000002;
- FUNC_STATIC = $00000003;
- FUNC_DISPATCH = $00000004;
-
-// Constants for enum tagINVOKEKIND
-type
- tagINVOKEKIND = TOleEnum;
-const
- INVOKE_FUNC = $00000001;
- INVOKE_PROPERTYGET = $00000002;
- INVOKE_PROPERTYPUT = $00000004;
- INVOKE_PROPERTYPUTREF = $00000008;
-
-// Constants for enum tagCALLCONV
-type
- tagCALLCONV = TOleEnum;
-const
- CC_FASTCALL = $00000000;
- CC_CDECL = $00000001;
- CC_MSCPASCAL = $00000002;
- CC_PASCAL = $00000002;
- CC_MACPASCAL = $00000003;
- CC_STDCALL = $00000004;
- CC_FPFASTCALL = $00000005;
- CC_SYSCALL = $00000006;
- CC_MPWCDECL = $00000007;
- CC_MPWPASCAL = $00000008;
- CC_MAX = $00000009;
-
-// Constants for enum tagVARKIND
-type
- tagVARKIND = TOleEnum;
-const
- VAR_PERINSTANCE = $00000000;
- VAR_STATIC = $00000001;
- VAR_CONST = $00000002;
- VAR_DISPATCH = $00000003;
-
-// Constants for enum tagSYSKIND
-type
- tagSYSKIND = TOleEnum;
-const
- SYS_WIN16 = $00000000;
- SYS_WIN32 = $00000001;
- SYS_MAC = $00000002;
- SYS_WIN64 = $00000001;
-
-// Constants for enum __MIDL___MIDL_itf_ads_0120_0001
-type
- __MIDL___MIDL_itf_ads_0120_0001 = TOleEnum;
-const
- ADS_SYSTEMFLAG_DISALLOW_DELETE = $80000000;
- ADS_SYSTEMFLAG_CONFIG_ALLOW_RENAME = $40000000;
- ADS_SYSTEMFLAG_CONFIG_ALLOW_MOVE = $20000000;
- ADS_SYSTEMFLAG_CONFIG_ALLOW_LIMITED_MOVE = $10000000;
- ADS_SYSTEMFLAG_DOMAIN_DISALLOW_RENAME = $08000000;
- ADS_SYSTEMFLAG_DOMAIN_DISALLOW_MOVE = $04000000;
- ADS_SYSTEMFLAG_CR_NTDS_NC = $00000001;
- ADS_SYSTEMFLAG_CR_NTDS_DOMAIN = $00000002;
- ADS_SYSTEMFLAG_ATTR_NOT_REPLICATED = $00000001;
- ADS_SYSTEMFLAG_ATTR_IS_CONSTRUCTED = $00000004;
-
-// Constants for enum __MIDL___MIDL_itf_ads_0126_0001
-type
- __MIDL___MIDL_itf_ads_0126_0001 = TOleEnum;
-const
- ADS_GROUP_TYPE_GLOBAL_GROUP = $00000002;
- ADS_GROUP_TYPE_DOMAIN_LOCAL_GROUP = $00000004;
- ADS_GROUP_TYPE_LOCAL_GROUP = $00000004;
- ADS_GROUP_TYPE_UNIVERSAL_GROUP = $00000008;
- ADS_GROUP_TYPE_SECURITY_ENABLED = $80000000;
-
-// Constants for enum ADS_USER_FLAG
-type
- ADS_USER_FLAG = TOleEnum;
-const
- ADS_UF_SCRIPT = $00000001;
- ADS_UF_ACCOUNTDISABLE = $00000002;
- ADS_UF_HOMEDIR_REQUIRED = $00000008;
- ADS_UF_LOCKOUT = $00000010;
- ADS_UF_PASSWD_NOTREQD = $00000020;
- ADS_UF_PASSWD_CANT_CHANGE = $00000040;
- ADS_UF_ENCRYPTED_TEXT_PASSWORD_ALLOWED = $00000080;
- ADS_UF_TEMP_DUPLICATE_ACCOUNT = $00000100;
- ADS_UF_NORMAL_ACCOUNT = $00000200;
- ADS_UF_INTERDOMAIN_TRUST_ACCOUNT = $00000800;
- ADS_UF_WORKSTATION_TRUST_ACCOUNT = $00001000;
- ADS_UF_SERVER_TRUST_ACCOUNT = $00002000;
- ADS_UF_DONT_EXPIRE_PASSWD = $00010000;
- ADS_UF_MNS_LOGON_ACCOUNT = $00020000;
- ADS_UF_SMARTCARD_REQUIRED = $00040000;
- ADS_UF_TRUSTED_FOR_DELEGATION = $00080000;
- ADS_UF_NOT_DELEGATED = $00100000;
-
-// Constants for enum __MIDL___MIDL_itf_ads_0148_0001
-type
- __MIDL___MIDL_itf_ads_0148_0001 = TOleEnum;
-const
- ADS_RIGHT_DELETE = $00010000;
- ADS_RIGHT_READ_CONTROL = $00020000;
- ADS_RIGHT_WRITE_DAC = $00040000;
- ADS_RIGHT_WRITE_OWNER = $00080000;
- ADS_RIGHT_SYNCHRONIZE = $00100000;
- ADS_RIGHT_ACCESS_SYSTEM_SECURITY = $01000000;
- ADS_RIGHT_GENERIC_READ = $80000000;
- ADS_RIGHT_GENERIC_WRITE = $40000000;
- ADS_RIGHT_GENERIC_EXECUTE = $20000000;
- ADS_RIGHT_GENERIC_ALL = $10000000;
- ADS_RIGHT_DS_CREATE_CHILD = $00000001;
- ADS_RIGHT_DS_DELETE_CHILD = $00000002;
- ADS_RIGHT_ACTRL_DS_LIST = $00000004;
- ADS_RIGHT_DS_SELF = $00000008;
- ADS_RIGHT_DS_READ_PROP = $00000010;
- ADS_RIGHT_DS_WRITE_PROP = $00000020;
- ADS_RIGHT_DS_DELETE_TREE = $00000040;
- ADS_RIGHT_DS_LIST_OBJECT = $00000080;
- ADS_RIGHT_DS_CONTROL_ACCESS = $00000100;
-
-// Constants for enum __MIDL___MIDL_itf_ads_0148_0002
-type
- __MIDL___MIDL_itf_ads_0148_0002 = TOleEnum;
-const
- ADS_ACETYPE_ACCESS_ALLOWED = $00000000;
- ADS_ACETYPE_ACCESS_DENIED = $00000001;
- ADS_ACETYPE_SYSTEM_AUDIT = $00000002;
- ADS_ACETYPE_ACCESS_ALLOWED_OBJECT = $00000005;
- ADS_ACETYPE_ACCESS_DENIED_OBJECT = $00000006;
- ADS_ACETYPE_SYSTEM_AUDIT_OBJECT = $00000007;
-
-// Constants for enum __MIDL___MIDL_itf_ads_0148_0003
-type
- __MIDL___MIDL_itf_ads_0148_0003 = TOleEnum;
-const
- ADS_ACEFLAG_INHERIT_ACE = $00000002;
- ADS_ACEFLAG_NO_PROPAGATE_INHERIT_ACE = $00000004;
- ADS_ACEFLAG_INHERIT_ONLY_ACE = $00000008;
- ADS_ACEFLAG_INHERITED_ACE = $00000010;
- ADS_ACEFLAG_VALID_INHERIT_FLAGS = $0000001F;
- ADS_ACEFLAG_SUCCESSFUL_ACCESS = $00000040;
- ADS_ACEFLAG_FAILED_ACCESS = $00000080;
-
-// Constants for enum __MIDL___MIDL_itf_ads_0148_0004
-type
- __MIDL___MIDL_itf_ads_0148_0004 = TOleEnum;
-const
- ADS_FLAG_OBJECT_TYPE_PRESENT = $00000001;
- ADS_FLAG_INHERITED_OBJECT_TYPE_PRESENT = $00000002;
-
-// Constants for enum __MIDL___MIDL_itf_ads_0148_0005
-type
- __MIDL___MIDL_itf_ads_0148_0005 = TOleEnum;
-const
- ADS_SD_CONTROL_SE_OWNER_DEFAULTED = $00000001;
- ADS_SD_CONTROL_SE_GROUP_DEFAULTED = $00000002;
- ADS_SD_CONTROL_SE_DACL_PRESENT = $00000004;
- ADS_SD_CONTROL_SE_DACL_DEFAULTED = $00000008;
- ADS_SD_CONTROL_SE_SACL_PRESENT = $00000010;
- ADS_SD_CONTROL_SE_SACL_DEFAULTED = $00000020;
- ADS_SD_CONTROL_SE_DACL_AUTO_INHERIT_REQ = $00000100;
- ADS_SD_CONTROL_SE_SACL_AUTO_INHERIT_REQ = $00000200;
- ADS_SD_CONTROL_SE_DACL_AUTO_INHERITED = $00000400;
- ADS_SD_CONTROL_SE_SACL_AUTO_INHERITED = $00000800;
- ADS_SD_CONTROL_SE_DACL_PROTECTED = $00001000;
- ADS_SD_CONTROL_SE_SACL_PROTECTED = $00002000;
- ADS_SD_CONTROL_SE_SELF_RELATIVE = $00008000;
-
-// Constants for enum __MIDL___MIDL_itf_ads_0148_0006
-type
- __MIDL___MIDL_itf_ads_0148_0006 = TOleEnum;
-const
- ADS_SD_REVISION_DS = $00000004;
-
-// Constants for enum __MIDL___MIDL_itf_ads_0149_0001
-type
- __MIDL___MIDL_itf_ads_0149_0001 = TOleEnum;
-const
- ADS_NAME_TYPE_1779 = $00000001;
- ADS_NAME_TYPE_CANONICAL = $00000002;
- ADS_NAME_TYPE_NT4 = $00000003;
- ADS_NAME_TYPE_DISPLAY = $00000004;
- ADS_NAME_TYPE_DOMAIN_SIMPLE = $00000005;
- ADS_NAME_TYPE_ENTERPRISE_SIMPLE = $00000006;
- ADS_NAME_TYPE_GUID = $00000007;
- ADS_NAME_TYPE_UNKNOWN = $00000008;
- ADS_NAME_TYPE_USER_PRINCIPAL_NAME = $00000009;
- ADS_NAME_TYPE_CANONICAL_EX = $0000000A;
- ADS_NAME_TYPE_SERVICE_PRINCIPAL_NAME = $0000000B;
- ADS_NAME_TYPE_SID_OR_SID_HISTORY_NAME = $0000000C;
-
-// Constants for enum __MIDL___MIDL_itf_ads_0149_0002
-type
- __MIDL___MIDL_itf_ads_0149_0002 = TOleEnum;
-const
- ADS_NAME_INITTYPE_DOMAIN = $00000001;
- ADS_NAME_INITTYPE_SERVER = $00000002;
- ADS_NAME_INITTYPE_GC = $00000003;
-
-// Constants for enum __MIDL___MIDL_itf_ads_0163_0001
-type
- __MIDL___MIDL_itf_ads_0163_0001 = TOleEnum;
-const
- ADS_OPTION_SERVERNAME = $00000000;
- ADS_OPTION_REFERRALS = $00000001;
- ADS_OPTION_PAGE_SIZE = $00000002;
- ADS_OPTION_SECURITY_MASK = $00000003;
- ADS_OPTION_MUTUAL_AUTH_STATUS = $00000004;
-
-// Constants for enum __MIDL___MIDL_itf_ads_0163_0002
-type
- __MIDL___MIDL_itf_ads_0163_0002 = TOleEnum;
-const
- ADS_SECURITY_INFO_OWNER = $00000001;
- ADS_SECURITY_INFO_GROUP = $00000002;
- ADS_SECURITY_INFO_DACL = $00000004;
- ADS_SECURITY_INFO_SACL = $00000008;
-
-// Constants for enum __MIDL___MIDL_itf_ads_0164_0001
-type
- __MIDL___MIDL_itf_ads_0164_0001 = TOleEnum;
-const
- ADS_SETTYPE_FULL = $00000001;
- ADS_SETTYPE_PROVIDER = $00000002;
- ADS_SETTYPE_SERVER = $00000003;
- ADS_SETTYPE_DN = $00000004;
-
-// Constants for enum __MIDL___MIDL_itf_ads_0164_0002
-type
- __MIDL___MIDL_itf_ads_0164_0002 = TOleEnum;
-const
- ADS_FORMAT_WINDOWS = $00000001;
- ADS_FORMAT_WINDOWS_NO_SERVER = $00000002;
- ADS_FORMAT_WINDOWS_DN = $00000003;
- ADS_FORMAT_WINDOWS_PARENT = $00000004;
- ADS_FORMAT_X500 = $00000005;
- ADS_FORMAT_X500_NO_SERVER = $00000006;
- ADS_FORMAT_X500_DN = $00000007;
- ADS_FORMAT_X500_PARENT = $00000008;
- ADS_FORMAT_SERVER = $00000009;
- ADS_FORMAT_PROVIDER = $0000000A;
- ADS_FORMAT_LEAF = $0000000B;
-
-// Constants for enum __MIDL___MIDL_itf_ads_0164_0003
-type
- __MIDL___MIDL_itf_ads_0164_0003 = TOleEnum;
-const
- ADS_DISPLAY_FULL = $00000001;
- ADS_DISPLAY_VALUE_ONLY = $00000002;
-
-// Constants for enum __MIDL___MIDL_itf_ads_0164_0004
-type
- __MIDL___MIDL_itf_ads_0164_0004 = TOleEnum;
-const
- ADS_ESCAPEDMODE_DEFAULT = $00000001;
- ADS_ESCAPEDMODE_ON = $00000002;
- ADS_ESCAPEDMODE_OFF = $00000003;
- ADS_ESCAPEDMODE_OFF_EX = $00000004;
-
-type
-
-// *********************************************************************//
-// Forward declaration of types defined in TypeLibrary
-// *********************************************************************//
- IADs = interface;
- {$ifdef SUPPORTS_DISPINTERFACE}
- IADsDisp = dispinterface;
- {$endif}
- IADsContainer = interface;
- {$ifdef SUPPORTS_DISPINTERFACE}
- IADsContainerDisp = dispinterface;
- {$endif}
- IADsCollection = interface;
- {$ifdef SUPPORTS_DISPINTERFACE}
- IADsCollectionDisp = dispinterface;
- {$endif}
- IADsMembers = interface;
- {$ifdef SUPPORTS_DISPINTERFACE}
- IADsMembersDisp = dispinterface;
- {$endif}
- IADsPropertyList = interface;
- {$ifdef SUPPORTS_DISPINTERFACE}
- IADsPropertyListDisp = dispinterface;
- {$endif}
- IADsPropertyEntry = interface;
- {$ifdef SUPPORTS_DISPINTERFACE}
- IADsPropertyEntryDisp = dispinterface;
- {$endif}
- IADsPropertyValue = interface;
- {$ifdef SUPPORTS_DISPINTERFACE}
- IADsPropertyValueDisp = dispinterface;
- {$endif}
- IADsPropertyValue2 = interface;
- {$ifdef SUPPORTS_DISPINTERFACE}
- IADsPropertyValue2Disp = dispinterface;
- {$endif}
- IPrivateDispatch = interface;
- ITypeInfo = interface;
- ITypeComp = interface;
- ITypeLib = interface;
- IPrivateUnknown = interface;
- IADsExtension = interface;
- IADsDeleteOps = interface;
- {$ifdef SUPPORTS_DISPINTERFACE}
- IADsDeleteOpsDisp = dispinterface;
- {$endif}
- IADsNamespaces = interface;
- {$ifdef SUPPORTS_DISPINTERFACE}
- IADsNamespacesDisp = dispinterface;
- {$endif}
- IADsClass = interface;
- {$ifdef SUPPORTS_DISPINTERFACE}
- IADsClassDisp = dispinterface;
- {$endif}
- IADsProperty = interface;
- {$ifdef SUPPORTS_DISPINTERFACE}
- IADsPropertyDisp = dispinterface;
- {$endif}
- IADsSyntax = interface;
- {$ifdef SUPPORTS_DISPINTERFACE}
- IADsSyntaxDisp = dispinterface;
- {$endif}
- IADsLocality = interface;
- {$ifdef SUPPORTS_DISPINTERFACE}
- IADsLocalityDisp = dispinterface;
- {$endif}
- IADsO = interface;
- {$ifdef SUPPORTS_DISPINTERFACE}
- IADsODisp = dispinterface;
- {$endif}
- IADsOU = interface;
- {$ifdef SUPPORTS_DISPINTERFACE}
- IADsOUDisp = dispinterface;
- {$endif}
- IADsDomain = interface;
- {$ifdef SUPPORTS_DISPINTERFACE}
- IADsDomainDisp = dispinterface;
- {$endif}
- IADsComputer = interface;
- {$ifdef SUPPORTS_DISPINTERFACE}
- IADsComputerDisp = dispinterface;
- {$endif}
- IADsComputerOperations = interface;
- {$ifdef SUPPORTS_DISPINTERFACE}
- IADsComputerOperationsDisp = dispinterface;
- {$endif}
- IADsGroup = interface;
- {$ifdef SUPPORTS_DISPINTERFACE}
- IADsGroupDisp = dispinterface;
- {$endif}
- IADsUser = interface;
- {$ifdef SUPPORTS_DISPINTERFACE}
- IADsUserDisp = dispinterface;
- {$endif}
- IADsPrintQueue = interface;
- {$ifdef SUPPORTS_DISPINTERFACE}
- IADsPrintQueueDisp = dispinterface;
- {$endif}
- IADsPrintQueueOperations = interface;
- {$ifdef SUPPORTS_DISPINTERFACE}
- IADsPrintQueueOperationsDisp = dispinterface;
- {$endif}
- IADsPrintJob = interface;
- {$ifdef SUPPORTS_DISPINTERFACE}
- IADsPrintJobDisp = dispinterface;
- {$endif}
- IADsPrintJobOperations = interface;
- {$ifdef SUPPORTS_DISPINTERFACE}
- IADsPrintJobOperationsDisp = dispinterface;
- {$endif}
- IADsService = interface;
- {$ifdef SUPPORTS_DISPINTERFACE}
- IADsServiceDisp = dispinterface;
- {$endif}
- IADsServiceOperations = interface;
- {$ifdef SUPPORTS_DISPINTERFACE}
- IADsServiceOperationsDisp = dispinterface;
- {$endif}
- IADsFileService = interface;
- {$ifdef SUPPORTS_DISPINTERFACE}
- IADsFileServiceDisp = dispinterface;
- {$endif}
- IADsFileServiceOperations = interface;
- {$ifdef SUPPORTS_DISPINTERFACE}
- IADsFileServiceOperationsDisp = dispinterface;
- {$endif}
- IADsFileShare = interface;
- {$ifdef SUPPORTS_DISPINTERFACE}
- IADsFileShareDisp = dispinterface;
- {$endif}
- IADsSession = interface;
- {$ifdef SUPPORTS_DISPINTERFACE}
- IADsSessionDisp = dispinterface;
- {$endif}
- IADsResource = interface;
- {$ifdef SUPPORTS_DISPINTERFACE}
- IADsResourceDisp = dispinterface;
- {$endif}
- IADsOpenDSObject = interface;
- {$ifdef SUPPORTS_DISPINTERFACE}
- IADsOpenDSObjectDisp = dispinterface;
- {$endif}
- IDirectoryObject = interface;
- IDirectorySearch = interface;
- IDirectorySchemaMgmt = interface;
- IADsAggregatee = interface;
- IADsAggregator = interface;
- IADsAccessControlEntry = interface;
- {$ifdef SUPPORTS_DISPINTERFACE}
- IADsAccessControlEntryDisp = dispinterface;
- {$endif}
- IADsAccessControlList = interface;
- {$ifdef SUPPORTS_DISPINTERFACE}
- IADsAccessControlListDisp = dispinterface;
- {$endif}
- IADsSecurityDescriptor = interface;
- {$ifdef SUPPORTS_DISPINTERFACE}
- IADsSecurityDescriptorDisp = dispinterface;
- {$endif}
- IADsLargeInteger = interface;
- {$ifdef SUPPORTS_DISPINTERFACE}
- IADsLargeIntegerDisp = dispinterface;
- {$endif}
- IADsNameTranslate = interface;
- {$ifdef SUPPORTS_DISPINTERFACE}
- IADsNameTranslateDisp = dispinterface;
- {$endif}
- IADsCaseIgnoreList = interface;
- {$ifdef SUPPORTS_DISPINTERFACE}
- IADsCaseIgnoreListDisp = dispinterface;
- {$endif}
- IADsFaxNumber = interface;
- {$ifdef SUPPORTS_DISPINTERFACE}
- IADsFaxNumberDisp = dispinterface;
- {$endif}
- IADsNetAddress = interface;
- {$ifdef SUPPORTS_DISPINTERFACE}
- IADsNetAddressDisp = dispinterface;
- {$endif}
- IADsOctetList = interface;
- {$ifdef SUPPORTS_DISPINTERFACE}
- IADsOctetListDisp = dispinterface;
- {$endif}
- IADsEmail = interface;
- {$ifdef SUPPORTS_DISPINTERFACE}
- IADsEmailDisp = dispinterface;
- {$endif}
- IADsPath = interface;
- {$ifdef SUPPORTS_DISPINTERFACE}
- IADsPathDisp = dispinterface;
- {$endif}
- IADsReplicaPointer = interface;
- {$ifdef SUPPORTS_DISPINTERFACE}
- IADsReplicaPointerDisp = dispinterface;
- {$endif}
- IADsAcl = interface;
- {$ifdef SUPPORTS_DISPINTERFACE}
- IADsAclDisp = dispinterface;
- {$endif}
- IADsTimestamp = interface;
- {$ifdef SUPPORTS_DISPINTERFACE}
- IADsTimestampDisp = dispinterface;
- {$endif}
- IADsPostalAddress = interface;
- {$ifdef SUPPORTS_DISPINTERFACE}
- IADsPostalAddressDisp = dispinterface;
- {$endif}
- IADsBackLink = interface;
- {$ifdef SUPPORTS_DISPINTERFACE}
- IADsBackLinkDisp = dispinterface;
- {$endif}
- IADsTypedName = interface;
- {$ifdef SUPPORTS_DISPINTERFACE}
- IADsTypedNameDisp = dispinterface;
- {$endif}
- IADsHold = interface;
- {$ifdef SUPPORTS_DISPINTERFACE}
- IADsHoldDisp = dispinterface;
- {$endif}
- IADsObjectOptions = interface;
- {$ifdef SUPPORTS_DISPINTERFACE}
- IADsObjectOptionsDisp = dispinterface;
- {$endif}
- IADsPathname = interface;
- {$ifdef SUPPORTS_DISPINTERFACE}
- IADsPathnameDisp = dispinterface;
- {$endif}
- IADsADSystemInfo = interface;
- {$ifdef SUPPORTS_DISPINTERFACE}
- IADsADSystemInfoDisp = dispinterface;
- {$endif}
- IADsWinNTSystemInfo = interface;
- {$ifdef SUPPORTS_DISPINTERFACE}
- IADsWinNTSystemInfoDisp = dispinterface;
- {$endif}
- IADsDNWithBinary = interface;
- {$ifdef SUPPORTS_DISPINTERFACE}
- IADsDNWithBinaryDisp = dispinterface;
- {$endif}
- IADsDNWithString = interface;
- {$ifdef SUPPORTS_DISPINTERFACE}
- IADsDNWithStringDisp = dispinterface;
- {$endif}
-
-// *********************************************************************//
-// Declaration of CoClasses defined in Type Library
-// (NOTE: Here we map each CoClass to its Default Interface)
-// *********************************************************************//
- PropertyEntry = IADsPropertyEntry;
- PropertyValue = IADsPropertyValue;
- AccessControlEntry = IADsAccessControlEntry;
- AccessControlList = IADsAccessControlList;
- SecurityDescriptor = IADsSecurityDescriptor;
- LargeInteger = IADsLargeInteger;
- NameTranslate = IADsNameTranslate;
- CaseIgnoreList = IADsCaseIgnoreList;
- FaxNumber = IADsFaxNumber;
- NetAddress = IADsNetAddress;
- OctetList = IADsOctetList;
- Email = IADsEmail;
- Path = IADsPath;
- ReplicaPointer = IADsReplicaPointer;
- Acl = IADsAcl;
- Timestamp = IADsTimestamp;
- PostalAddress = IADsPostalAddress;
- BackLink = IADsBackLink;
- TypedName = IADsTypedName;
- Hold = IADsHold;
- Pathname = IADsPathname;
- ADSystemInfo = IADsADSystemInfo;
- WinNTSystemInfo = IADsWinNTSystemInfo;
- DNWithBinary = IADsDNWithBinary;
- DNWithString = IADsDNWithString;
-
-// *********************************************************************//
-// Declaration of structures, unions and aliases.
-// *********************************************************************//
- PUserType1 = ^_ADS_CASEIGNORE_LIST; {*}
- PUserType2 = ^_ADS_OCTET_LIST; {*}
- PPWideChar1 = ^PWideChar; {*}
- PUserType8 = ^tagTYPEDESC; {*}
- PUserType9 = ^tagARRAYDESC; {*}
- PUserType3 = ^TGUID; {*}
- PWord1 = ^Word; {*}
- PPWord1 = ^PWord1; {*}
- PUserType4 = ^TGUID; {*}
- PUserType5 = ^tagTYPEATTR; {*}
- PUserType6 = ^tagFUNCDESC; {*}
- PUserType7 = ^tagVARDESC; {*}
- PUserType10 = ^tagTLIBATTR; {*}
- PUserType11 = ^_ads_object_info; {*}
- PUserType12 = ^_ads_attr_info; {*}
- PUserType13 = ^ads_searchpref_info; {*}
- PUserType14 = ^ads_search_column; {*}
- PUserType15 = ^_ads_attr_def; {*}
- PPUserType1 = ^PUserType15; {*}
- PUINT1 = ^LongWord; {*}
- PUserType16 = ^_ads_class_def; {*}
- PPUserType2 = ^PUserType16; {*}
-
- ADSTYPEENUM = __MIDL___MIDL_itf_ads_0000_0001;
-
- __MIDL___MIDL_itf_ads_0000_0002 = packed record
- dwLength: LongWord;
- lpValue: ^Byte;
- end;
-
- ADS_OCTET_STRING = __MIDL___MIDL_itf_ads_0000_0002;
-
- __MIDL___MIDL_itf_ads_0000_0003 = packed record
- dwLength: LongWord;
- lpValue: ^Byte;
- end;
-
- ADS_NT_SECURITY_DESCRIPTOR = __MIDL___MIDL_itf_ads_0000_0003;
-
- _SYSTEMTIME = packed record
- wYear: Word;
- wMonth: Word;
- wDayOfWeek: Word;
- wDay: Word;
- wHour: Word;
- wMinute: Word;
- wSecond: Word;
- wMilliseconds: Word;
- end;
-
- _LARGE_INTEGER = packed record
- QuadPart: Int64;
- end;
-
- __MIDL___MIDL_itf_ads_0000_0004 = packed record
- dwLength: LongWord;
- lpValue: ^Byte;
- end;
-
- ADS_PROV_SPECIFIC = __MIDL___MIDL_itf_ads_0000_0004;
-
- __MIDL___MIDL_itf_ads_0000_0005 = packed record
- Type_: LongWord;
- VolumeName: PWideChar;
- Path: PWideChar;
- end;
-
- ADS_PATH = __MIDL___MIDL_itf_ads_0000_0005;
-
- __MIDL___MIDL_itf_ads_0000_0006 = packed record
- PostalAddress: array[0..5] of PWideChar;
- end;
-
- ADS_POSTALADDRESS = __MIDL___MIDL_itf_ads_0000_0006;
-
- __MIDL___MIDL_itf_ads_0000_0007 = packed record
- WholeSeconds: LongWord;
- EventID: LongWord;
- end;
-
- ADS_TIMESTAMP = __MIDL___MIDL_itf_ads_0000_0007;
-
- __MIDL___MIDL_itf_ads_0000_0008 = packed record
- RemoteID: LongWord;
- ObjectName: PWideChar;
- end;
-
- ADS_BACKLINK = __MIDL___MIDL_itf_ads_0000_0008;
-
- __MIDL___MIDL_itf_ads_0000_0009 = packed record
- ObjectName: PWideChar;
- Level: LongWord;
- Interval: LongWord;
- end;
-
- ADS_TYPEDNAME = __MIDL___MIDL_itf_ads_0000_0009;
-
- __MIDL___MIDL_itf_ads_0000_0010 = packed record
- ObjectName: PWideChar;
- Amount: LongWord;
- end;
-
- ADS_HOLD = __MIDL___MIDL_itf_ads_0000_0010;
-
- __MIDL___MIDL_itf_ads_0000_0011 = packed record
- AddressType: LongWord;
- AddressLength: LongWord;
- Address: ^Byte;
- end;
-
- ADS_NETADDRESS = __MIDL___MIDL_itf_ads_0000_0011;
-
- __MIDL___MIDL_itf_ads_0000_0012 = packed record
- ServerName: PWideChar;
- ReplicaType: LongWord;
- ReplicaNumber: LongWord;
- Count: LongWord;
- ReplicaAddressHints: ^__MIDL___MIDL_itf_ads_0000_0011;
- end;
-
- ADS_REPLICAPOINTER = __MIDL___MIDL_itf_ads_0000_0012;
-
- __MIDL___MIDL_itf_ads_0000_0013 = packed record
- TelephoneNumber: PWideChar;
- NumberOfBits: LongWord;
- Parameters: ^Byte;
- end;
-
- ADS_FAXNUMBER = __MIDL___MIDL_itf_ads_0000_0013;
-
- __MIDL___MIDL_itf_ads_0000_0014 = packed record
- Address: PWideChar;
- Type_: LongWord;
- end;
-
- ADS_EMAIL = __MIDL___MIDL_itf_ads_0000_0014;
-
- __MIDL___MIDL_itf_ads_0000_0015 = packed record
- dwLength: LongWord;
- lpBinaryValue: ^Byte;
- pszDNString: PWideChar;
- end;
-
- ADS_DN_WITH_BINARY = __MIDL___MIDL_itf_ads_0000_0015;
-
- __MIDL___MIDL_itf_ads_0000_0016 = packed record
- pszStringValue: PWideChar;
- pszDNString: PWideChar;
- end;
-
- ADS_DN_WITH_STRING = __MIDL___MIDL_itf_ads_0000_0016;
-
- _ADS_CASEIGNORE_LIST = packed record
- Next: PUserType1;
- String_: PWideChar;
- end;
-
- _ADS_OCTET_LIST = packed record
- Next: PUserType2;
- Length: LongWord;
- Data: ^Byte;
- end;
-
- __MIDL___MIDL_itf_ads_0000_0017 = record
- case Integer of
- 0: (DNString: PWideChar);
- 1: (CaseExactString: PWideChar);
- 2: (CaseIgnoreString: PWideChar);
- 3: (PrintableString: PWideChar);
- 4: (NumericString: PWideChar);
- 5: (Boolean: LongWord);
- 6: (Integer: LongWord);
- 7: (OctetString: ADS_OCTET_STRING);
- 8: (UTCTime: _SYSTEMTIME);
- 9: (LargeInteger: _LARGE_INTEGER);
- 10: (ClassName: PWideChar);
- 11: (ProviderSpecific: ADS_PROV_SPECIFIC);
- 12: (pCaseIgnoreList: ^_ADS_CASEIGNORE_LIST);
- 13: (pOctetList: ^_ADS_OCTET_LIST);
- 14: (pPath: ^__MIDL___MIDL_itf_ads_0000_0005);
- 15: (pPostalAddress: ^__MIDL___MIDL_itf_ads_0000_0006);
- 16: (Timestamp: ADS_TIMESTAMP);
- 17: (BackLink: ADS_BACKLINK);
- 18: (pTypedName: ^__MIDL___MIDL_itf_ads_0000_0009);
- 19: (Hold: ADS_HOLD);
- 20: (pNetAddress: ^__MIDL___MIDL_itf_ads_0000_0011);
- 21: (pReplicaPointer: ^__MIDL___MIDL_itf_ads_0000_0012);
- 22: (pFaxNumber: ^__MIDL___MIDL_itf_ads_0000_0013);
- 23: (Email: ADS_EMAIL);
- 24: (SecurityDescriptor: ADS_NT_SECURITY_DESCRIPTOR);
- 25: (pDNWithBinary: ^__MIDL___MIDL_itf_ads_0000_0015);
- 26: (pDNWithString: ^__MIDL___MIDL_itf_ads_0000_0016);
- end;
-
- ADS_AUTHENTICATION_ENUM = __MIDL___MIDL_itf_ads_0000_0018;
-
- _ads_object_info = packed record
- pszRDN: PWideChar;
- pszObjectDN: PWideChar;
- pszParentDN: PWideChar;
- pszSchemaDN: PWideChar;
- pszClassName: PWideChar;
- end;
-
- ADS_STATUSENUM = __MIDL___MIDL_itf_ads_0000_0019;
- ADS_DEREFENUM = __MIDL___MIDL_itf_ads_0000_0020;
- ADS_SCOPEENUM = __MIDL___MIDL_itf_ads_0000_0021;
- ADS_PREFERENCES_ENUM = __MIDL___MIDL_itf_ads_0000_0022;
- ADSI_DIALECT_ENUM = __MIDL___MIDL_itf_ads_0000_0023;
- ADS_CHASE_REFERRALS_ENUM = __MIDL___MIDL_itf_ads_0000_0024;
- ADS_SEARCHPREF_ENUM = __MIDL___MIDL_itf_ads_0000_0025;
-
- _adsvalue = packed record
- dwType: ADSTYPEENUM;
- __MIDL_0010: __MIDL___MIDL_itf_ads_0000_0017;
- end;
-
- ads_search_column = packed record
- pszAttrName: PWideChar;
- dwADsType: ADSTYPEENUM;
- pADsValues: ^_adsvalue;
- dwNumValues: LongWord;
- hReserved: Pointer;
- end;
-
- _ads_attr_def = packed record
- pszAttrName: PWideChar;
- dwADsType: ADSTYPEENUM;
- dwMinRange: LongWord;
- dwMaxRange: LongWord;
- fMultiValued: Integer;
- end;
-
- _ads_sortkey = packed record
- pszAttrType: PWideChar;
- pszReserved: PWideChar;
- fReverseorder: Shortint;
- end;
-
- ADS_PROPERTY_OPERATION_ENUM = __MIDL___MIDL_itf_ads_0000_0026;
-
- __MIDL_IOleAutomationTypes_0005 = record
- case Integer of
- 0: (lptdesc: PUserType8);
- 1: (lpadesc: PUserType9);
- 2: (hreftype: LongWord);
- end;
-
- tagTYPEDESC = packed record
- __MIDL_0008: __MIDL_IOleAutomationTypes_0005;
- vt: Word;
- end;
-
- tagSAFEARRAYBOUND = packed record
- cElements: LongWord;
- lLbound: Integer;
- end;
-
- ULONG_PTR = LongWord;
-
- tagIDLDESC = packed record
- dwReserved: ULONG_PTR;
- wIDLFlags: Word;
- end;
-
- DWORD = LongWord;
-
- tagPARAMDESCEX = packed record
- cBytes: LongWord;
- varDefaultValue: OleVariant;
- end;
-
- tagPARAMDESC = packed record
- pparamdescex: ^tagPARAMDESCEX;
- wParamFlags: Word;
- end;
-
- tagELEMDESC = packed record
- tdesc: tagTYPEDESC;
- paramdesc: tagPARAMDESC;
- end;
-
- tagFUNCDESC = packed record
- memid: Integer;
- lprgscode: ^SCODE;
- lprgelemdescParam: ^tagELEMDESC;
- funckind: tagFUNCKIND;
- invkind: tagINVOKEKIND;
- callconv: tagCALLCONV;
- cParams: Smallint;
- cParamsOpt: Smallint;
- oVft: Smallint;
- cScodes: Smallint;
- elemdescFunc: tagELEMDESC;
- wFuncFlags: Word;
- end;
-
- __MIDL_IOleAutomationTypes_0006 = record
- case Integer of
- 0: (oInst: LongWord);
- 1: (lpvarValue: ^OleVariant);
- end;
-
- tagVARDESC = packed record
- memid: Integer;
- lpstrSchema: PWideChar;
- __MIDL_0009: __MIDL_IOleAutomationTypes_0006;
- elemdescVar: tagELEMDESC;
- wVarFlags: Word;
- varkind: tagVARKIND;
- end;
-
- tagTLIBATTR = packed record
- GUID: TGUID;
- lcid: LongWord;
- syskind: tagSYSKIND;
- wMajorVerNum: Word;
- wMinorVerNum: Word;
- wLibFlags: Word;
- end;
-
- ADS_SYSTEMFLAG_ENUM = __MIDL___MIDL_itf_ads_0120_0001;
- ADS_GROUP_TYPE_ENUM = __MIDL___MIDL_itf_ads_0126_0001;
- ADS_RIGHTS_ENUM = __MIDL___MIDL_itf_ads_0148_0001;
- ADS_ACETYPE_ENUM = __MIDL___MIDL_itf_ads_0148_0002;
- ADS_ACEFLAG_ENUM = __MIDL___MIDL_itf_ads_0148_0003;
- ADS_FLAGTYPE_ENUM = __MIDL___MIDL_itf_ads_0148_0004;
- ADS_SD_CONTROL_ENUM = __MIDL___MIDL_itf_ads_0148_0005;
- ADS_SD_REVISION_ENUM = __MIDL___MIDL_itf_ads_0148_0006;
- ADS_NAME_TYPE_ENUM = __MIDL___MIDL_itf_ads_0149_0001;
- ADS_NAME_INITTYPE_ENUM = __MIDL___MIDL_itf_ads_0149_0002;
- ADS_OPTION_ENUM = __MIDL___MIDL_itf_ads_0163_0001;
- ADS_SECURITY_INFO_ENUM = __MIDL___MIDL_itf_ads_0163_0002;
- ADS_SETTYPE_ENUM = __MIDL___MIDL_itf_ads_0164_0001;
- ADS_FORMAT_ENUM = __MIDL___MIDL_itf_ads_0164_0002;
- ADS_DISPLAY_ENUM = __MIDL___MIDL_itf_ads_0164_0003;
- ADS_ESCAPE_MODE_ENUM = __MIDL___MIDL_itf_ads_0164_0004;
-
- _ads_attr_info = packed record
- pszAttrName: PWideChar;
- dwControlCode: LongWord;
- dwADsType: ADSTYPEENUM;
- pADsValues: ^_adsvalue;
- dwNumValues: LongWord;
- end;
-
- ads_searchpref_info = packed record
- dwSearchPref: ADS_SEARCHPREF_ENUM;
- vValue: _adsvalue;
- dwStatus: ADS_STATUSENUM;
- end;
-
- _ads_class_def = packed record
- pszClassName: PWideChar;
- dwMandatoryAttrs: LongWord;
- ppszMandatoryAttrs: ^PWideChar;
- optionalAttrs: LongWord;
- ppszOptionalAttrs: ^PPWideChar1;
- dwNamingAttrs: LongWord;
- ppszNamingAttrs: ^PPWideChar1;
- dwSuperClasses: LongWord;
- ppszSuperClasses: ^PPWideChar1;
- fIsContainer: Integer;
- end;
-
- tagTYPEATTR = packed record
- GUID: TGUID;
- lcid: LongWord;
- dwReserved: LongWord;
- memidConstructor: Integer;
- memidDestructor: Integer;
- lpstrSchema: PWideChar;
- cbSizeInstance: LongWord;
- typekind: tagTYPEKIND;
- cFuncs: Word;
- cVars: Word;
- cImplTypes: Word;
- cbSizeVft: Word;
- cbAlignment: Word;
- wTypeFlags: Word;
- wMajorVerNum: Word;
- wMinorVerNum: Word;
- tdescAlias: tagTYPEDESC;
- idldescType: tagIDLDESC;
- end;
-
- tagARRAYDESC = packed record
- tdescElem: tagTYPEDESC;
- cDims: Word;
- rgbounds: ^tagSAFEARRAYBOUND;
- end;
-
-// *********************************************************************//
-// Interface: IADs
-// Flags: (4416) Dual OleAutomation Dispatchable
-// GUID: {FD8256D0-FD15-11CE-ABC4-02608C9E7553}
-// *********************************************************************//
- IADs = interface(IDispatch)
- ['{FD8256D0-FD15-11CE-ABC4-02608C9E7553}']
- function Get_Name: WideString; safecall;
- function Get_Class_: WideString; safecall;
- function Get_GUID: WideString; safecall;
- function Get_ADsPath: WideString; safecall;
- function Get_Parent: WideString; safecall;
- function Get_Schema: WideString; safecall;
- procedure GetInfo; safecall;
- procedure SetInfo; safecall;
- function Get(const bstrName: WideString): OleVariant; safecall;
- procedure Put(const bstrName: WideString; vProp: OleVariant); safecall;
- function GetEx(const bstrName: WideString): OleVariant; safecall;
- procedure PutEx(lnControlCode: Integer; const bstrName: WideString; vProp: OleVariant); safecall;
- procedure GetInfoEx(vProperties: OleVariant; lnReserved: Integer); safecall;
- property Name: WideString read Get_Name;
- property Class_: WideString read Get_Class_;
- property GUID: WideString read Get_GUID;
- property ADsPath: WideString read Get_ADsPath;
- property Parent: WideString read Get_Parent;
- property Schema: WideString read Get_Schema;
- end;
-
-// *********************************************************************//
-// DispIntf: IADsDisp
-// Flags: (4416) Dual OleAutomation Dispatchable
-// GUID: {FD8256D0-FD15-11CE-ABC4-02608C9E7553}
-// *********************************************************************//
- {$ifdef SUPPORTS_DISPINTERFACE}
- IADsDisp = dispinterface
- ['{FD8256D0-FD15-11CE-ABC4-02608C9E7553}']
- property Name: WideString readonly dispid 2;
- property Class_: WideString readonly dispid 3;
- property GUID: WideString readonly dispid 4;
- property ADsPath: WideString readonly dispid 5;
- property Parent: WideString readonly dispid 6;
- property Schema: WideString readonly dispid 7;
- procedure GetInfo; dispid 8;
- procedure SetInfo; dispid 9;
- function Get(const bstrName: WideString): OleVariant; dispid 10;
- procedure Put(const bstrName: WideString; vProp: OleVariant); dispid 11;
- function GetEx(const bstrName: WideString): OleVariant; dispid 12;
- procedure PutEx(lnControlCode: Integer; const bstrName: WideString; vProp: OleVariant); dispid 13;
- procedure GetInfoEx(vProperties: OleVariant; lnReserved: Integer); dispid 14;
- end;
- {$endif}
-// *********************************************************************//
-// Interface: IADsContainer
-// Flags: (4416) Dual OleAutomation Dispatchable
-// GUID: {001677D0-FD16-11CE-ABC4-02608C9E7553}
-// *********************************************************************//
- IADsContainer = interface(IDispatch)
- ['{001677D0-FD16-11CE-ABC4-02608C9E7553}']
- function Get_Count: Integer; safecall;
- function Get__NewEnum: IUnknown; safecall;
- function Get_Filter: OleVariant; safecall;
- procedure Set_Filter(pVar: OleVariant); safecall;
- function Get_Hints: OleVariant; safecall;
- procedure Set_Hints(pvFilter: OleVariant); safecall;
- function GetObject(const ClassName: WideString; const RelativeName: WideString): IDispatch; safecall;
- function Create(const ClassName: WideString; const RelativeName: WideString): IDispatch; safecall;
- procedure Delete(const bstrClassName: WideString; const bstrRelativeName: WideString); safecall;
- function CopyHere(const SourceName: WideString; const NewName: WideString): IDispatch; safecall;
- function MoveHere(const SourceName: WideString; const NewName: WideString): IDispatch; safecall;
- property Count: Integer read Get_Count;
- property _NewEnum: IUnknown read Get__NewEnum;
- property Filter: OleVariant read Get_Filter write Set_Filter;
- property Hints: OleVariant read Get_Hints write Set_Hints;
- end;
-
-// *********************************************************************//
-// DispIntf: IADsContainerDisp
-// Flags: (4416) Dual OleAutomation Dispatchable
-// GUID: {001677D0-FD16-11CE-ABC4-02608C9E7553}
-// *********************************************************************//
- {$ifdef SUPPORTS_DISPINTERFACE}
- IADsContainerDisp = dispinterface
- ['{001677D0-FD16-11CE-ABC4-02608C9E7553}']
- property Count: Integer readonly dispid 2;
- property _NewEnum: IUnknown readonly dispid -4;
- property Filter: OleVariant dispid 3;
- property Hints: OleVariant dispid 4;
- function GetObject(const ClassName: WideString; const RelativeName: WideString): IDispatch; dispid 5;
- function Create(const ClassName: WideString; const RelativeName: WideString): IDispatch; dispid 6;
- procedure Delete(const bstrClassName: WideString; const bstrRelativeName: WideString); dispid 7;
- function CopyHere(const SourceName: WideString; const NewName: WideString): IDispatch; dispid 8;
- function MoveHere(const SourceName: WideString; const NewName: WideString): IDispatch; dispid 9;
- end;
- {$endif}
-// *********************************************************************//
-// Interface: IADsCollection
-// Flags: (4416) Dual OleAutomation Dispatchable
-// GUID: {72B945E0-253B-11CF-A988-00AA006BC149}
-// *********************************************************************//
- IADsCollection = interface(IDispatch)
- ['{72B945E0-253B-11CF-A988-00AA006BC149}']
- function Get__NewEnum: IUnknown; safecall;
- procedure Add(const bstrName: WideString; vItem: OleVariant); safecall;
- procedure Remove(const bstrItemToBeRemoved: WideString); safecall;
- function GetObject(const bstrName: WideString): OleVariant; safecall;
- property _NewEnum: IUnknown read Get__NewEnum;
- end;
-
-// *********************************************************************//
-// DispIntf: IADsCollectionDisp
-// Flags: (4416) Dual OleAutomation Dispatchable
-// GUID: {72B945E0-253B-11CF-A988-00AA006BC149}
-// *********************************************************************//
- {$ifdef SUPPORTS_DISPINTERFACE}
- IADsCollectionDisp = dispinterface
- ['{72B945E0-253B-11CF-A988-00AA006BC149}']
- property _NewEnum: IUnknown readonly dispid -4;
- procedure Add(const bstrName: WideString; vItem: OleVariant); dispid 4;
- procedure Remove(const bstrItemToBeRemoved: WideString); dispid 5;
- function GetObject(const bstrName: WideString): OleVariant; dispid 6;
- end;
- {$endif}
-// *********************************************************************//
-// Interface: IADsMembers
-// Flags: (4416) Dual OleAutomation Dispatchable
-// GUID: {451A0030-72EC-11CF-B03B-00AA006E0975}
-// *********************************************************************//
- IADsMembers = interface(IDispatch)
- ['{451A0030-72EC-11CF-B03B-00AA006E0975}']
- function Get_Count: Integer; safecall;
- function Get__NewEnum: IUnknown; safecall;
- function Get_Filter: OleVariant; safecall;
- procedure Set_Filter(pvFilter: OleVariant); safecall;
- property Count: Integer read Get_Count;
- property _NewEnum: IUnknown read Get__NewEnum;
- property Filter: OleVariant read Get_Filter write Set_Filter;
- end;
-
-// *********************************************************************//
-// DispIntf: IADsMembersDisp
-// Flags: (4416) Dual OleAutomation Dispatchable
-// GUID: {451A0030-72EC-11CF-B03B-00AA006E0975}
-// *********************************************************************//
- {$ifdef SUPPORTS_DISPINTERFACE}
- IADsMembersDisp = dispinterface
- ['{451A0030-72EC-11CF-B03B-00AA006E0975}']
- property Count: Integer readonly dispid 2;
- property _NewEnum: IUnknown readonly dispid -4;
- property Filter: OleVariant dispid 3;
- end;
- {$endif}
-// *********************************************************************//
-// Interface: IADsPropertyList
-// Flags: (4416) Dual OleAutomation Dispatchable
-// GUID: {C6F602B6-8F69-11D0-8528-00C04FD8D503}
-// *********************************************************************//
- IADsPropertyList = interface(IDispatch)
- ['{C6F602B6-8F69-11D0-8528-00C04FD8D503}']
- function Get_PropertyCount: Integer; safecall;
- function Next: OleVariant; safecall;
- procedure Skip(cElements: Integer); safecall;
- procedure Reset; safecall;
- function Item(varIndex: OleVariant): OleVariant; safecall;
- function GetPropertyItem(const bstrName: WideString; lnADsType: Integer): OleVariant; safecall;
- procedure PutPropertyItem(varData: OleVariant); safecall;
- procedure ResetPropertyItem(varEntry: OleVariant); safecall;
- procedure PurgePropertyList; safecall;
- property PropertyCount: Integer read Get_PropertyCount;
- end;
-
-// *********************************************************************//
-// DispIntf: IADsPropertyListDisp
-// Flags: (4416) Dual OleAutomation Dispatchable
-// GUID: {C6F602B6-8F69-11D0-8528-00C04FD8D503}
-// *********************************************************************//
- {$ifdef SUPPORTS_DISPINTERFACE}
- IADsPropertyListDisp = dispinterface
- ['{C6F602B6-8F69-11D0-8528-00C04FD8D503}']
- property PropertyCount: Integer readonly dispid 2;
- function Next: OleVariant; dispid 3;
- procedure Skip(cElements: Integer); dispid 4;
- procedure Reset; dispid 5;
- function Item(varIndex: OleVariant): OleVariant; dispid 0;
- function GetPropertyItem(const bstrName: WideString; lnADsType: Integer): OleVariant; dispid 6;
- procedure PutPropertyItem(varData: OleVariant); dispid 7;
- procedure ResetPropertyItem(varEntry: OleVariant); dispid 8;
- procedure PurgePropertyList; dispid 9;
- end;
- {$endif}
-// *********************************************************************//
-// Interface: IADsPropertyEntry
-// Flags: (4416) Dual OleAutomation Dispatchable
-// GUID: {05792C8E-941F-11D0-8529-00C04FD8D503}
-// *********************************************************************//
- IADsPropertyEntry = interface(IDispatch)
- ['{05792C8E-941F-11D0-8529-00C04FD8D503}']
- procedure Clear; safecall;
- function Get_Name: WideString; safecall;
- procedure Set_Name(const retval: WideString); safecall;
- function Get_ADsType: Integer; safecall;
- procedure Set_ADsType(retval: Integer); safecall;
- function Get_ControlCode: Integer; safecall;
- procedure Set_ControlCode(retval: Integer); safecall;
- function Get_Values: OleVariant; safecall;
- procedure Set_Values(retval: OleVariant); safecall;
- property Name: WideString read Get_Name write Set_Name;
- property ADsType: Integer read Get_ADsType write Set_ADsType;
- property ControlCode: Integer read Get_ControlCode write Set_ControlCode;
- property Values: OleVariant read Get_Values write Set_Values;
- end;
-
-// *********************************************************************//
-// DispIntf: IADsPropertyEntryDisp
-// Flags: (4416) Dual OleAutomation Dispatchable
-// GUID: {05792C8E-941F-11D0-8529-00C04FD8D503}
-// *********************************************************************//
- {$ifdef SUPPORTS_DISPINTERFACE}
- IADsPropertyEntryDisp = dispinterface
- ['{05792C8E-941F-11D0-8529-00C04FD8D503}']
- procedure Clear; dispid 1;
- property Name: WideString dispid 2;
- property ADsType: Integer dispid 3;
- property ControlCode: Integer dispid 4;
- property Values: OleVariant dispid 5;
- end;
- {$endif}
-// *********************************************************************//
-// Interface: IADsPropertyValue
-// Flags: (4416) Dual OleAutomation Dispatchable
-// GUID: {79FA9AD0-A97C-11D0-8534-00C04FD8D503}
-// *********************************************************************//
- IADsPropertyValue = interface(IDispatch)
- ['{79FA9AD0-A97C-11D0-8534-00C04FD8D503}']
- procedure Clear; safecall;
- function Get_ADsType: Integer; safecall;
- procedure Set_ADsType(retval: Integer); safecall;
- function Get_DNString: WideString; safecall;
- procedure Set_DNString(const retval: WideString); safecall;
- function Get_CaseExactString: WideString; safecall;
- procedure Set_CaseExactString(const retval: WideString); safecall;
- function Get_CaseIgnoreString: WideString; safecall;
- procedure Set_CaseIgnoreString(const retval: WideString); safecall;
- function Get_PrintableString: WideString; safecall;
- procedure Set_PrintableString(const retval: WideString); safecall;
- function Get_NumericString: WideString; safecall;
- procedure Set_NumericString(const retval: WideString); safecall;
- function Get_Boolean: Integer; safecall;
- procedure Set_Boolean(retval: Integer); safecall;
- function Get_Integer: Integer; safecall;
- procedure Set_Integer(retval: Integer); safecall;
- function Get_OctetString: OleVariant; safecall;
- procedure Set_OctetString(retval: OleVariant); safecall;
- function Get_SecurityDescriptor: IDispatch; safecall;
- procedure Set_SecurityDescriptor(const retval: IDispatch); safecall;
- function Get_LargeInteger: IDispatch; safecall;
- procedure Set_LargeInteger(const retval: IDispatch); safecall;
- function Get_UTCTime: TDateTime; safecall;
- procedure Set_UTCTime(retval: TDateTime); safecall;
- property ADsType: Integer read Get_ADsType write Set_ADsType;
- property DNString: WideString read Get_DNString write Set_DNString;
- property CaseExactString: WideString read Get_CaseExactString write Set_CaseExactString;
- property CaseIgnoreString: WideString read Get_CaseIgnoreString write Set_CaseIgnoreString;
- property PrintableString: WideString read Get_PrintableString write Set_PrintableString;
- property NumericString: WideString read Get_NumericString write Set_NumericString;
- property Boolean: Integer read Get_Boolean write Set_Boolean;
- property Integer: Integer read Get_Integer write Set_Integer;
- property OctetString: OleVariant read Get_OctetString write Set_OctetString;
- property SecurityDescriptor: IDispatch read Get_SecurityDescriptor write Set_SecurityDescriptor;
- property LargeInteger: IDispatch read Get_LargeInteger write Set_LargeInteger;
- property UTCTime: TDateTime read Get_UTCTime write Set_UTCTime;
- end;
-
-// *********************************************************************//
-// DispIntf: IADsPropertyValueDisp
-// Flags: (4416) Dual OleAutomation Dispatchable
-// GUID: {79FA9AD0-A97C-11D0-8534-00C04FD8D503}
-// *********************************************************************//
- {$ifdef SUPPORTS_DISPINTERFACE}
- IADsPropertyValueDisp = dispinterface
- ['{79FA9AD0-A97C-11D0-8534-00C04FD8D503}']
- procedure Clear; dispid 1;
- property ADsType: Integer dispid 2;
- property DNString: WideString dispid 3;
- property CaseExactString: WideString dispid 4;
- property CaseIgnoreString: WideString dispid 5;
- property PrintableString: WideString dispid 6;
- property NumericString: WideString dispid 7;
- property Boolean: Integer dispid 8;
- property Integer: Integer dispid 9;
- property OctetString: OleVariant dispid 10;
- property SecurityDescriptor: IDispatch dispid 11;
- property LargeInteger: IDispatch dispid 12;
- property UTCTime: TDateTime dispid 13;
- end;
- {$endif}
-// *********************************************************************//
-// Interface: IADsPropertyValue2
-// Flags: (4416) Dual OleAutomation Dispatchable
-// GUID: {306E831C-5BC7-11D1-A3B8-00C04FB950DC}
-// *********************************************************************//
- IADsPropertyValue2 = interface(IDispatch)
- ['{306E831C-5BC7-11D1-A3B8-00C04FB950DC}']
- function GetObjectProperty(var lnADsType: Integer): OleVariant; safecall;
- procedure PutObjectProperty(lnADsType: Integer; vProp: OleVariant); safecall;
- end;
-
-// *********************************************************************//
-// DispIntf: IADsPropertyValue2Disp
-// Flags: (4416) Dual OleAutomation Dispatchable
-// GUID: {306E831C-5BC7-11D1-A3B8-00C04FB950DC}
-// *********************************************************************//
- {$ifdef SUPPORTS_DISPINTERFACE}
- IADsPropertyValue2Disp = dispinterface
- ['{306E831C-5BC7-11D1-A3B8-00C04FB950DC}']
- function GetObjectProperty(var lnADsType: Integer): OleVariant; dispid 1;
- procedure PutObjectProperty(lnADsType: Integer; vProp: OleVariant); dispid 2;
- end;
- {$endif}
-
-// *********************************************************************//
-// Interface: IPrivateDispatch
-// Flags: (0)
-// GUID: {86AB4BBE-65F6-11D1-8C13-00C04FD8D503}
-// *********************************************************************//
- IPrivateDispatch = interface(IUnknown)
- ['{86AB4BBE-65F6-11D1-8C13-00C04FD8D503}']
- function ADSIInitializeDispatchManager(dwExtensionId: Integer): HResult; stdcall;
- function ADSIGetTypeInfoCount(out pctinfo: SYSUINT): HResult; stdcall;
- function ADSIGetTypeInfo(itinfo: SYSUINT; lcid: LongWord; out ppTInfo: ITypeInfo): HResult; stdcall;
- function ADSIGetIDsOfNames(var riid: TGUID; rgszNames: PPWord1; cNames: SYSUINT;
- lcid: LongWord; out rgdispid: Integer): HResult; stdcall;
- function ADSIInvoke(dispidMember: Integer; var riid: TGUID; lcid: LongWord; wFlags: Word;
- var pdispparams: TGUID; out pvarResult: OleVariant; out pexcepinfo: TGUID;
- out puArgErr: SYSUINT): HResult; stdcall;
- end;
-
-// *********************************************************************//
-// Interface: ITypeInfo
-// Flags: (0)
-// GUID: {00020401-0000-0000-C000-000000000046}
-// *********************************************************************//
- ITypeInfo = interface(IUnknown)
- ['{00020401-0000-0000-C000-000000000046}']
- function RemoteGetTypeAttr(out ppTypeAttr: PUserType5; out pDummy: DWORD): HResult; stdcall;
- function GetTypeComp(out ppTComp: ITypeComp): HResult; stdcall;
- function RemoteGetFuncDesc(index: SYSUINT; out ppFuncDesc: PUserType6; out pDummy: DWORD): HResult; stdcall;
- function RemoteGetVarDesc(index: SYSUINT; out ppVarDesc: PUserType7; out pDummy: DWORD): HResult; stdcall;
- function RemoteGetNames(memid: Integer; out rgBstrNames: WideString; cMaxNames: SYSUINT;
- out pcNames: SYSUINT): HResult; stdcall;
- function GetRefTypeOfImplType(index: SYSUINT; out pRefType: LongWord): HResult; stdcall;
- function GetImplTypeFlags(index: SYSUINT; out pImplTypeFlags: SYSINT): HResult; stdcall;
- function LocalGetIDsOfNames: HResult; stdcall;
- function LocalInvoke: HResult; stdcall;
- function RemoteGetDocumentation(memid: Integer; refPtrFlags: LongWord;
- out pBstrName: WideString; out pBstrDocString: WideString;
- out pdwHelpContext: LongWord; out pBstrHelpFile: WideString): HResult; stdcall;
- function RemoteGetDllEntry(memid: Integer; invkind: tagINVOKEKIND; refPtrFlags: LongWord;
- out pBstrDllName: WideString; out pBstrName: WideString;
- out pwOrdinal: Word): HResult; stdcall;
- function GetRefTypeInfo(hreftype: LongWord; out ppTInfo: ITypeInfo): HResult; stdcall;
- function LocalAddressOfMember: HResult; stdcall;
- function RemoteCreateInstance(var riid: TGUID; out ppvObj: IUnknown): HResult; stdcall;
- function GetMops(memid: Integer; out pBstrMops: WideString): HResult; stdcall;
- function RemoteGetContainingTypeLib(out ppTLib: ITypeLib; out pIndex: SYSUINT): HResult; stdcall;
- function LocalReleaseTypeAttr: HResult; stdcall;
- function LocalReleaseFuncDesc: HResult; stdcall;
- function LocalReleaseVarDesc: HResult; stdcall;
- end;
-
-// *********************************************************************//
-// Interface: ITypeComp
-// Flags: (0)
-// GUID: {00020403-0000-0000-C000-000000000046}
-// *********************************************************************//
- ITypeComp = interface(IUnknown)
- ['{00020403-0000-0000-C000-000000000046}']
- function RemoteBind(szName: PWideChar; lHashVal: LongWord; wFlags: Word;
- out ppTInfo: ITypeInfo; out pDescKind: tagDESCKIND;
- out ppFuncDesc: PUserType6; out ppVarDesc: PUserType7;
- out ppTypeComp: ITypeComp; out pDummy: DWORD): HResult; stdcall;
- function RemoteBindType(szName: PWideChar; lHashVal: LongWord; out ppTInfo: ITypeInfo): HResult; stdcall;
- end;
-
-// *********************************************************************//
-// Interface: ITypeLib
-// Flags: (0)
-// GUID: {00020402-0000-0000-C000-000000000046}
-// *********************************************************************//
- ITypeLib = interface(IUnknown)
- ['{00020402-0000-0000-C000-000000000046}']
- function RemoteGetTypeInfoCount(out pctinfo: SYSUINT): HResult; stdcall;
- function GetTypeInfo(index: SYSUINT; out ppTInfo: ITypeInfo): HResult; stdcall;
- function GetTypeInfoType(index: SYSUINT; out pTKind: tagTYPEKIND): HResult; stdcall;
- function GetTypeInfoOfGuid(var GUID: TGUID; out ppTInfo: ITypeInfo): HResult; stdcall;
- function RemoteGetLibAttr(out ppTLibAttr: PUserType10; out pDummy: DWORD): HResult; stdcall;
- function GetTypeComp(out ppTComp: ITypeComp): HResult; stdcall;
- function RemoteGetDocumentation(index: SYSINT; refPtrFlags: LongWord;
- out pBstrName: WideString; out pBstrDocString: WideString;
- out pdwHelpContext: LongWord; out pBstrHelpFile: WideString): HResult; stdcall;
- function RemoteIsName(szNameBuf: PWideChar; lHashVal: LongWord; out pfName: Integer;
- out pBstrLibName: WideString): HResult; stdcall;
- function RemoteFindName(szNameBuf: PWideChar; lHashVal: LongWord; out ppTInfo: ITypeInfo;
- out rgMemId: Integer; var pcFound: Word; out pBstrLibName: WideString): HResult; stdcall;
- function LocalReleaseTLibAttr: HResult; stdcall;
- end;
-
-// *********************************************************************//
-// Interface: IPrivateUnknown
-// Flags: (0)
-// GUID: {89126BAB-6EAD-11D1-8C18-00C04FD8D503}
-// *********************************************************************//
- IPrivateUnknown = interface(IUnknown)
- ['{89126BAB-6EAD-11D1-8C18-00C04FD8D503}']
- function ADSIInitializeObject(const lpszUserName: WideString; const lpszPassword: WideString;
- lnReserved: Integer): HResult; stdcall;
- function ADSIReleaseObject: HResult; stdcall;
- end;
-
-// *********************************************************************//
-// Interface: IADsExtension
-// Flags: (0)
-// GUID: {3D35553C-D2B0-11D1-B17B-0000F87593A0}
-// *********************************************************************//
- IADsExtension = interface(IUnknown)
- ['{3D35553C-D2B0-11D1-B17B-0000F87593A0}']
- function Operate(dwCode: LongWord; varData1: OleVariant; varData2: OleVariant;
- varData3: OleVariant): HResult; stdcall;
- function PrivateGetIDsOfNames(var riid: TGUID; rgszNames: PPWord1; cNames: SYSUINT;
- lcid: LongWord; out rgdispid: Integer): HResult; stdcall;
- function PrivateInvoke(dispidMember: Integer; var riid: TGUID; lcid: LongWord; wFlags: Word;
- var pdispparams: TGUID; out pvarResult: OleVariant;
- out pexcepinfo: TGUID; out puArgErr: SYSUINT): HResult; stdcall;
- end;
-
-// *********************************************************************//
-// Interface: IADsDeleteOps
-// Flags: (4416) Dual OleAutomation Dispatchable
-// GUID: {B2BD0902-8878-11D1-8C21-00C04FD8D503}
-// *********************************************************************//
- IADsDeleteOps = interface(IDispatch)
- ['{B2BD0902-8878-11D1-8C21-00C04FD8D503}']
- procedure DeleteObject(lnFlags: Integer); safecall;
- end;
-
-// *********************************************************************//
-// DispIntf: IADsDeleteOpsDisp
-// Flags: (4416) Dual OleAutomation Dispatchable
-// GUID: {B2BD0902-8878-11D1-8C21-00C04FD8D503}
-// *********************************************************************//
- {$ifdef SUPPORTS_DISPINTERFACE}
- IADsDeleteOpsDisp = dispinterface
- ['{B2BD0902-8878-11D1-8C21-00C04FD8D503}']
- procedure DeleteObject(lnFlags: Integer); dispid 2;
- end;
- {$endif}
-// *********************************************************************//
-// Interface: IADsNamespaces
-// Flags: (4416) Dual OleAutomation Dispatchable
-// GUID: {28B96BA0-B330-11CF-A9AD-00AA006BC149}
-// *********************************************************************//
- IADsNamespaces = interface(IADs)
- ['{28B96BA0-B330-11CF-A9AD-00AA006BC149}']
- function Get_DefaultContainer: WideString; safecall;
- procedure Set_DefaultContainer(const retval: WideString); safecall;
- property DefaultContainer: WideString read Get_DefaultContainer write Set_DefaultContainer;
- end;
-
-// *********************************************************************//
-// DispIntf: IADsNamespacesDisp
-// Flags: (4416) Dual OleAutomation Dispatchable
-// GUID: {28B96BA0-B330-11CF-A9AD-00AA006BC149}
-// *********************************************************************//
- {$ifdef SUPPORTS_DISPINTERFACE}
- IADsNamespacesDisp = dispinterface
- ['{28B96BA0-B330-11CF-A9AD-00AA006BC149}']
- property DefaultContainer: WideString dispid 1;
- property Name: WideString readonly dispid 2;
- property Class_: WideString readonly dispid 3;
- property GUID: WideString readonly dispid 4;
- property ADsPath: WideString readonly dispid 5;
- property Parent: WideString readonly dispid 6;
- property Schema: WideString readonly dispid 7;
- procedure GetInfo; dispid 8;
- procedure SetInfo; dispid 9;
- function Get(const bstrName: WideString): OleVariant; dispid 10;
- procedure Put(const bstrName: WideString; vProp: OleVariant); dispid 11;
- function GetEx(const bstrName: WideString): OleVariant; dispid 12;
- procedure PutEx(lnControlCode: Integer; const bstrName: WideString; vProp: OleVariant); dispid 13;
- procedure GetInfoEx(vProperties: OleVariant; lnReserved: Integer); dispid 14;
- end;
- {$endif}
-
-// *********************************************************************//
-// Interface: IADsClass
-// Flags: (4416) Dual OleAutomation Dispatchable
-// GUID: {C8F93DD0-4AE0-11CF-9E73-00AA004A5691}
-// *********************************************************************//
- IADsClass = interface(IADs)
- ['{C8F93DD0-4AE0-11CF-9E73-00AA004A5691}']
- function Get_PrimaryInterface: WideString; safecall;
- function Get_CLSID: WideString; safecall;
- procedure Set_CLSID(const retval: WideString); safecall;
- function Get_OID: WideString; safecall;
- procedure Set_OID(const retval: WideString); safecall;
- function Get_Abstract: WordBool; safecall;
- procedure Set_Abstract(retval: WordBool); safecall;
- function Get_Auxiliary: WordBool; safecall;
- procedure Set_Auxiliary(retval: WordBool); safecall;
- function Get_MandatoryProperties: OleVariant; safecall;
- procedure Set_MandatoryProperties(retval: OleVariant); safecall;
- function Get_OptionalProperties: OleVariant; safecall;
- procedure Set_OptionalProperties(retval: OleVariant); safecall;
- function Get_NamingProperties: OleVariant; safecall;
- procedure Set_NamingProperties(retval: OleVariant); safecall;
- function Get_DerivedFrom: OleVariant; safecall;
- procedure Set_DerivedFrom(retval: OleVariant); safecall;
- function Get_AuxDerivedFrom: OleVariant; safecall;
- procedure Set_AuxDerivedFrom(retval: OleVariant); safecall;
- function Get_PossibleSuperiors: OleVariant; safecall;
- procedure Set_PossibleSuperiors(retval: OleVariant); safecall;
- function Get_Containment: OleVariant; safecall;
- procedure Set_Containment(retval: OleVariant); safecall;
- function Get_Container: WordBool; safecall;
- procedure Set_Container(retval: WordBool); safecall;
- function Get_HelpFileName: WideString; safecall;
- procedure Set_HelpFileName(const retval: WideString); safecall;
- function Get_HelpFileContext: Integer; safecall;
- procedure Set_HelpFileContext(retval: Integer); safecall;
- function Qualifiers: IADsCollection; safecall;
- property PrimaryInterface: WideString read Get_PrimaryInterface;
- property CLSID: WideString read Get_CLSID write Set_CLSID;
- property OID: WideString read Get_OID write Set_OID;
- property Abstract: WordBool read Get_Abstract write Set_Abstract;
- property Auxiliary: WordBool read Get_Auxiliary write Set_Auxiliary;
- property MandatoryProperties: OleVariant read Get_MandatoryProperties write Set_MandatoryProperties;
- property OptionalProperties: OleVariant read Get_OptionalProperties write Set_OptionalProperties;
- property NamingProperties: OleVariant read Get_NamingProperties write Set_NamingProperties;
- property DerivedFrom: OleVariant read Get_DerivedFrom write Set_DerivedFrom;
- property AuxDerivedFrom: OleVariant read Get_AuxDerivedFrom write Set_AuxDerivedFrom;
- property PossibleSuperiors: OleVariant read Get_PossibleSuperiors write Set_PossibleSuperiors;
- property Containment: OleVariant read Get_Containment write Set_Containment;
- property Container: WordBool read Get_Container write Set_Container;
- property HelpFileName: WideString read Get_HelpFileName write Set_HelpFileName;
- property HelpFileContext: Integer read Get_HelpFileContext write Set_HelpFileContext;
- end;
-
-// *********************************************************************//
-// DispIntf: IADsClassDisp
-// Flags: (4416) Dual OleAutomation Dispatchable
-// GUID: {C8F93DD0-4AE0-11CF-9E73-00AA004A5691}
-// *********************************************************************//
- {$ifdef SUPPORTS_DISPINTERFACE}
- IADsClassDisp = dispinterface
- ['{C8F93DD0-4AE0-11CF-9E73-00AA004A5691}']
- property PrimaryInterface: WideString readonly dispid 15;
- property CLSID: WideString dispid 16;
- property OID: WideString dispid 17;
- property Abstract: WordBool dispid 18;
- property Auxiliary: WordBool dispid 26;
- property MandatoryProperties: OleVariant dispid 19;
- property OptionalProperties: OleVariant dispid 29;
- property NamingProperties: OleVariant dispid 30;
- property DerivedFrom: OleVariant dispid 20;
- property AuxDerivedFrom: OleVariant dispid 27;
- property PossibleSuperiors: OleVariant dispid 28;
- property Containment: OleVariant dispid 21;
- property Container: WordBool dispid 22;
- property HelpFileName: WideString dispid 23;
- property HelpFileContext: Integer dispid 24;
- function Qualifiers: IADsCollection; dispid 25;
- property Name: WideString readonly dispid 2;
- property Class_: WideString readonly dispid 3;
- property GUID: WideString readonly dispid 4;
- property ADsPath: WideString readonly dispid 5;
- property Parent: WideString readonly dispid 6;
- property Schema: WideString readonly dispid 7;
- procedure GetInfo; dispid 8;
- procedure SetInfo; dispid 9;
- function Get(const bstrName: WideString): OleVariant; dispid 10;
- procedure Put(const bstrName: WideString; vProp: OleVariant); dispid 11;
- function GetEx(const bstrName: WideString): OleVariant; dispid 12;
- procedure PutEx(lnControlCode: Integer; const bstrName: WideString; vProp: OleVariant); dispid 13;
- procedure GetInfoEx(vProperties: OleVariant; lnReserved: Integer); dispid 14;
- end;
- {$endif}
-// *********************************************************************//
-// Interface: IADsProperty
-// Flags: (4416) Dual OleAutomation Dispatchable
-// GUID: {C8F93DD3-4AE0-11CF-9E73-00AA004A5691}
-// *********************************************************************//
- IADsProperty = interface(IADs)
- ['{C8F93DD3-4AE0-11CF-9E73-00AA004A5691}']
- function Get_OID: WideString; safecall;
- procedure Set_OID(const retval: WideString); safecall;
- function Get_Syntax: WideString; safecall;
- procedure Set_Syntax(const retval: WideString); safecall;
- function Get_MaxRange: Integer; safecall;
- procedure Set_MaxRange(retval: Integer); safecall;
- function Get_MinRange: Integer; safecall;
- procedure Set_MinRange(retval: Integer); safecall;
- function Get_MultiValued: WordBool; safecall;
- procedure Set_MultiValued(retval: WordBool); safecall;
- function Qualifiers: IADsCollection; safecall;
- property OID: WideString read Get_OID write Set_OID;
- property Syntax: WideString read Get_Syntax write Set_Syntax;
- property MaxRange: Integer read Get_MaxRange write Set_MaxRange;
- property MinRange: Integer read Get_MinRange write Set_MinRange;
- property MultiValued: WordBool read Get_MultiValued write Set_MultiValued;
- end;
-
-// *********************************************************************//
-// DispIntf: IADsPropertyDisp
-// Flags: (4416) Dual OleAutomation Dispatchable
-// GUID: {C8F93DD3-4AE0-11CF-9E73-00AA004A5691}
-// *********************************************************************//
- {$ifdef SUPPORTS_DISPINTERFACE}
- IADsPropertyDisp = dispinterface
- ['{C8F93DD3-4AE0-11CF-9E73-00AA004A5691}']
- property OID: WideString dispid 17;
- property Syntax: WideString dispid 18;
- property MaxRange: Integer dispid 19;
- property MinRange: Integer dispid 20;
- property MultiValued: WordBool dispid 21;
- function Qualifiers: IADsCollection; dispid 22;
- property Name: WideString readonly dispid 2;
- property Class_: WideString readonly dispid 3;
- property GUID: WideString readonly dispid 4;
- property ADsPath: WideString readonly dispid 5;
- property Parent: WideString readonly dispid 6;
- property Schema: WideString readonly dispid 7;
- procedure GetInfo; dispid 8;
- procedure SetInfo; dispid 9;
- function Get(const bstrName: WideString): OleVariant; dispid 10;
- procedure Put(const bstrName: WideString; vProp: OleVariant); dispid 11;
- function GetEx(const bstrName: WideString): OleVariant; dispid 12;
- procedure PutEx(lnControlCode: Integer; const bstrName: WideString; vProp: OleVariant); dispid 13;
- procedure GetInfoEx(vProperties: OleVariant; lnReserved: Integer); dispid 14;
- end;
- {$endif}
-
-// *********************************************************************//
-// Interface: IADsSyntax
-// Flags: (4416) Dual OleAutomation Dispatchable
-// GUID: {C8F93DD2-4AE0-11CF-9E73-00AA004A5691}
-// *********************************************************************//
- IADsSyntax = interface(IADs)
- ['{C8F93DD2-4AE0-11CF-9E73-00AA004A5691}']
- function Get_OleAutoDataType: Integer; safecall;
- procedure Set_OleAutoDataType(retval: Integer); safecall;
- property OleAutoDataType: Integer read Get_OleAutoDataType write Set_OleAutoDataType;
- end;
-
-// *********************************************************************//
-// DispIntf: IADsSyntaxDisp
-// Flags: (4416) Dual OleAutomation Dispatchable
-// GUID: {C8F93DD2-4AE0-11CF-9E73-00AA004A5691}
-// *********************************************************************//
- {$ifdef SUPPORTS_DISPINTERFACE}
- IADsSyntaxDisp = dispinterface
- ['{C8F93DD2-4AE0-11CF-9E73-00AA004A5691}']
- property OleAutoDataType: Integer dispid 15;
- property Name: WideString readonly dispid 2;
- property Class_: WideString readonly dispid 3;
- property GUID: WideString readonly dispid 4;
- property ADsPath: WideString readonly dispid 5;
- property Parent: WideString readonly dispid 6;
- property Schema: WideString readonly dispid 7;
- procedure GetInfo; dispid 8;
- procedure SetInfo; dispid 9;
- function Get(const bstrName: WideString): OleVariant; dispid 10;
- procedure Put(const bstrName: WideString; vProp: OleVariant); dispid 11;
- function GetEx(const bstrName: WideString): OleVariant; dispid 12;
- procedure PutEx(lnControlCode: Integer; const bstrName: WideString; vProp: OleVariant); dispid 13;
- procedure GetInfoEx(vProperties: OleVariant; lnReserved: Integer); dispid 14;
- end;
- {$endif}
-
-// *********************************************************************//
-// Interface: IADsLocality
-// Flags: (4416) Dual OleAutomation Dispatchable
-// GUID: {A05E03A2-EFFE-11CF-8ABC-00C04FD8D503}
-// *********************************************************************//
- IADsLocality = interface(IADs)
- ['{A05E03A2-EFFE-11CF-8ABC-00C04FD8D503}']
- function Get_Description: WideString; safecall;
- procedure Set_Description(const retval: WideString); safecall;
- function Get_LocalityName: WideString; safecall;
- procedure Set_LocalityName(const retval: WideString); safecall;
- function Get_PostalAddress: WideString; safecall;
- procedure Set_PostalAddress(const retval: WideString); safecall;
- function Get_SeeAlso: OleVariant; safecall;
- procedure Set_SeeAlso(retval: OleVariant); safecall;
- property Description: WideString read Get_Description write Set_Description;
- property LocalityName: WideString read Get_LocalityName write Set_LocalityName;
- property PostalAddress: WideString read Get_PostalAddress write Set_PostalAddress;
- property SeeAlso: OleVariant read Get_SeeAlso write Set_SeeAlso;
- end;
-
-// *********************************************************************//
-// DispIntf: IADsLocalityDisp
-// Flags: (4416) Dual OleAutomation Dispatchable
-// GUID: {A05E03A2-EFFE-11CF-8ABC-00C04FD8D503}
-// *********************************************************************//
- {$ifdef SUPPORTS_DISPINTERFACE}
- IADsLocalityDisp = dispinterface
- ['{A05E03A2-EFFE-11CF-8ABC-00C04FD8D503}']
- property Description: WideString dispid 15;
- property LocalityName: WideString dispid 16;
- property PostalAddress: WideString dispid 17;
- property SeeAlso: OleVariant dispid 18;
- property Name: WideString readonly dispid 2;
- property Class_: WideString readonly dispid 3;
- property GUID: WideString readonly dispid 4;
- property ADsPath: WideString readonly dispid 5;
- property Parent: WideString readonly dispid 6;
- property Schema: WideString readonly dispid 7;
- procedure GetInfo; dispid 8;
- procedure SetInfo; dispid 9;
- function Get(const bstrName: WideString): OleVariant; dispid 10;
- procedure Put(const bstrName: WideString; vProp: OleVariant); dispid 11;
- function GetEx(const bstrName: WideString): OleVariant; dispid 12;
- procedure PutEx(lnControlCode: Integer; const bstrName: WideString; vProp: OleVariant); dispid 13;
- procedure GetInfoEx(vProperties: OleVariant; lnReserved: Integer); dispid 14;
- end;
- {$endif}
-
-// *********************************************************************//
-// Interface: IADsO
-// Flags: (4416) Dual OleAutomation Dispatchable
-// GUID: {A1CD2DC6-EFFE-11CF-8ABC-00C04FD8D503}
-// *********************************************************************//
- IADsO = interface(IADs)
- ['{A1CD2DC6-EFFE-11CF-8ABC-00C04FD8D503}']
- function Get_Description: WideString; safecall;
- procedure Set_Description(const retval: WideString); safecall;
- function Get_LocalityName: WideString; safecall;
- procedure Set_LocalityName(const retval: WideString); safecall;
- function Get_PostalAddress: WideString; safecall;
- procedure Set_PostalAddress(const retval: WideString); safecall;
- function Get_TelephoneNumber: WideString; safecall;
- procedure Set_TelephoneNumber(const retval: WideString); safecall;
- function Get_FaxNumber: WideString; safecall;
- procedure Set_FaxNumber(const retval: WideString); safecall;
- function Get_SeeAlso: OleVariant; safecall;
- procedure Set_SeeAlso(retval: OleVariant); safecall;
- property Description: WideString read Get_Description write Set_Description;
- property LocalityName: WideString read Get_LocalityName write Set_LocalityName;
- property PostalAddress: WideString read Get_PostalAddress write Set_PostalAddress;
- property TelephoneNumber: WideString read Get_TelephoneNumber write Set_TelephoneNumber;
- property FaxNumber: WideString read Get_FaxNumber write Set_FaxNumber;
- property SeeAlso: OleVariant read Get_SeeAlso write Set_SeeAlso;
- end;
-
-// *********************************************************************//
-// DispIntf: IADsODisp
-// Flags: (4416) Dual OleAutomation Dispatchable
-// GUID: {A1CD2DC6-EFFE-11CF-8ABC-00C04FD8D503}
-// *********************************************************************//
- {$ifdef SUPPORTS_DISPINTERFACE}
- IADsODisp = dispinterface
- ['{A1CD2DC6-EFFE-11CF-8ABC-00C04FD8D503}']
- property Description: WideString dispid 15;
- property LocalityName: WideString dispid 16;
- property PostalAddress: WideString dispid 17;
- property TelephoneNumber: WideString dispid 18;
- property FaxNumber: WideString dispid 19;
- property SeeAlso: OleVariant dispid 20;
- property Name: WideString readonly dispid 2;
- property Class_: WideString readonly dispid 3;
- property GUID: WideString readonly dispid 4;
- property ADsPath: WideString readonly dispid 5;
- property Parent: WideString readonly dispid 6;
- property Schema: WideString readonly dispid 7;
- procedure GetInfo; dispid 8;
- procedure SetInfo; dispid 9;
- function Get(const bstrName: WideString): OleVariant; dispid 10;
- procedure Put(const bstrName: WideString; vProp: OleVariant); dispid 11;
- function GetEx(const bstrName: WideString): OleVariant; dispid 12;
- procedure PutEx(lnControlCode: Integer; const bstrName: WideString; vProp: OleVariant); dispid 13;
- procedure GetInfoEx(vProperties: OleVariant; lnReserved: Integer); dispid 14;
- end;
- {$endif}
-
-// *********************************************************************//
-// Interface: IADsOU
-// Flags: (4416) Dual OleAutomation Dispatchable
-// GUID: {A2F733B8-EFFE-11CF-8ABC-00C04FD8D503}
-// *********************************************************************//
- IADsOU = interface(IADs)
- ['{A2F733B8-EFFE-11CF-8ABC-00C04FD8D503}']
- function Get_Description: WideString; safecall;
- procedure Set_Description(const retval: WideString); safecall;
- function Get_LocalityName: WideString; safecall;
- procedure Set_LocalityName(const retval: WideString); safecall;
- function Get_PostalAddress: WideString; safecall;
- procedure Set_PostalAddress(const retval: WideString); safecall;
- function Get_TelephoneNumber: WideString; safecall;
- procedure Set_TelephoneNumber(const retval: WideString); safecall;
- function Get_FaxNumber: WideString; safecall;
- procedure Set_FaxNumber(const retval: WideString); safecall;
- function Get_SeeAlso: OleVariant; safecall;
- procedure Set_SeeAlso(retval: OleVariant); safecall;
- function Get_BusinessCategory: WideString; safecall;
- procedure Set_BusinessCategory(const retval: WideString); safecall;
- property Description: WideString read Get_Description write Set_Description;
- property LocalityName: WideString read Get_LocalityName write Set_LocalityName;
- property PostalAddress: WideString read Get_PostalAddress write Set_PostalAddress;
- property TelephoneNumber: WideString read Get_TelephoneNumber write Set_TelephoneNumber;
- property FaxNumber: WideString read Get_FaxNumber write Set_FaxNumber;
- property SeeAlso: OleVariant read Get_SeeAlso write Set_SeeAlso;
- property BusinessCategory: WideString read Get_BusinessCategory write Set_BusinessCategory;
- end;
-
-// *********************************************************************//
-// DispIntf: IADsOUDisp
-// Flags: (4416) Dual OleAutomation Dispatchable
-// GUID: {A2F733B8-EFFE-11CF-8ABC-00C04FD8D503}
-// *********************************************************************//
- {$ifdef SUPPORTS_DISPINTERFACE}
- IADsOUDisp = dispinterface
- ['{A2F733B8-EFFE-11CF-8ABC-00C04FD8D503}']
- property Description: WideString dispid 15;
- property LocalityName: WideString dispid 16;
- property PostalAddress: WideString dispid 17;
- property TelephoneNumber: WideString dispid 18;
- property FaxNumber: WideString dispid 19;
- property SeeAlso: OleVariant dispid 20;
- property BusinessCategory: WideString dispid 21;
- property Name: WideString readonly dispid 2;
- property Class_: WideString readonly dispid 3;
- property GUID: WideString readonly dispid 4;
- property ADsPath: WideString readonly dispid 5;
- property Parent: WideString readonly dispid 6;
- property Schema: WideString readonly dispid 7;
- procedure GetInfo; dispid 8;
- procedure SetInfo; dispid 9;
- function Get(const bstrName: WideString): OleVariant; dispid 10;
- procedure Put(const bstrName: WideString; vProp: OleVariant); dispid 11;
- function GetEx(const bstrName: WideString): OleVariant; dispid 12;
- procedure PutEx(lnControlCode: Integer; const bstrName: WideString; vProp: OleVariant); dispid 13;
- procedure GetInfoEx(vProperties: OleVariant; lnReserved: Integer); dispid 14;
- end;
- {$endif}
-
-// *********************************************************************//
-// Interface: IADsDomain
-// Flags: (4416) Dual OleAutomation Dispatchable
-// GUID: {00E4C220-FD16-11CE-ABC4-02608C9E7553}
-// *********************************************************************//
- IADsDomain = interface(IADs)
- ['{00E4C220-FD16-11CE-ABC4-02608C9E7553}']
- function Get_IsWorkgroup: WordBool; safecall;
- function Get_MinPasswordLength: Integer; safecall;
- procedure Set_MinPasswordLength(retval: Integer); safecall;
- function Get_MinPasswordAge: Integer; safecall;
- procedure Set_MinPasswordAge(retval: Integer); safecall;
- function Get_MaxPasswordAge: Integer; safecall;
- procedure Set_MaxPasswordAge(retval: Integer); safecall;
- function Get_MaxBadPasswordsAllowed: Integer; safecall;
- procedure Set_MaxBadPasswordsAllowed(retval: Integer); safecall;
- function Get_PasswordHistoryLength: Integer; safecall;
- procedure Set_PasswordHistoryLength(retval: Integer); safecall;
- function Get_PasswordAttributes: Integer; safecall;
- procedure Set_PasswordAttributes(retval: Integer); safecall;
- function Get_AutoUnlockInterval: Integer; safecall;
- procedure Set_AutoUnlockInterval(retval: Integer); safecall;
- function Get_LockoutObservationInterval: Integer; safecall;
- procedure Set_LockoutObservationInterval(retval: Integer); safecall;
- property IsWorkgroup: WordBool read Get_IsWorkgroup;
- property MinPasswordLength: Integer read Get_MinPasswordLength write Set_MinPasswordLength;
- property MinPasswordAge: Integer read Get_MinPasswordAge write Set_MinPasswordAge;
- property MaxPasswordAge: Integer read Get_MaxPasswordAge write Set_MaxPasswordAge;
- property MaxBadPasswordsAllowed: Integer read Get_MaxBadPasswordsAllowed write Set_MaxBadPasswordsAllowed;
- property PasswordHistoryLength: Integer read Get_PasswordHistoryLength write Set_PasswordHistoryLength;
- property PasswordAttributes: Integer read Get_PasswordAttributes write Set_PasswordAttributes;
- property AutoUnlockInterval: Integer read Get_AutoUnlockInterval write Set_AutoUnlockInterval;
- property LockoutObservationInterval: Integer read Get_LockoutObservationInterval write Set_LockoutObservationInterval;
- end;
-
-// *********************************************************************//
-// DispIntf: IADsDomainDisp
-// Flags: (4416) Dual OleAutomation Dispatchable
-// GUID: {00E4C220-FD16-11CE-ABC4-02608C9E7553}
-// *********************************************************************//
- {$ifdef SUPPORTS_DISPINTERFACE}
- IADsDomainDisp = dispinterface
- ['{00E4C220-FD16-11CE-ABC4-02608C9E7553}']
- property IsWorkgroup: WordBool readonly dispid 15;
- property MinPasswordLength: Integer dispid 16;
- property MinPasswordAge: Integer dispid 17;
- property MaxPasswordAge: Integer dispid 18;
- property MaxBadPasswordsAllowed: Integer dispid 19;
- property PasswordHistoryLength: Integer dispid 20;
- property PasswordAttributes: Integer dispid 21;
- property AutoUnlockInterval: Integer dispid 22;
- property LockoutObservationInterval: Integer dispid 23;
- property Name: WideString readonly dispid 2;
- property Class_: WideString readonly dispid 3;
- property GUID: WideString readonly dispid 4;
- property ADsPath: WideString readonly dispid 5;
- property Parent: WideString readonly dispid 6;
- property Schema: WideString readonly dispid 7;
- procedure GetInfo; dispid 8;
- procedure SetInfo; dispid 9;
- function Get(const bstrName: WideString): OleVariant; dispid 10;
- procedure Put(const bstrName: WideString; vProp: OleVariant); dispid 11;
- function GetEx(const bstrName: WideString): OleVariant; dispid 12;
- procedure PutEx(lnControlCode: Integer; const bstrName: WideString; vProp: OleVariant); dispid 13;
- procedure GetInfoEx(vProperties: OleVariant; lnReserved: Integer); dispid 14;
- end;
- {$endif}
-// *********************************************************************//
-// Interface: IADsComputer
-// Flags: (4416) Dual OleAutomation Dispatchable
-// GUID: {EFE3CC70-1D9F-11CF-B1F3-02608C9E7553}
-// *********************************************************************//
- IADsComputer = interface(IADs)
- ['{EFE3CC70-1D9F-11CF-B1F3-02608C9E7553}']
- function Get_ComputerID: WideString; safecall;
- function Get_Site: WideString; safecall;
- function Get_Description: WideString; safecall;
- procedure Set_Description(const retval: WideString); safecall;
- function Get_Location: WideString; safecall;
- procedure Set_Location(const retval: WideString); safecall;
- function Get_PrimaryUser: WideString; safecall;
- procedure Set_PrimaryUser(const retval: WideString); safecall;
- function Get_Owner: WideString; safecall;
- procedure Set_Owner(const retval: WideString); safecall;
- function Get_Division: WideString; safecall;
- procedure Set_Division(const retval: WideString); safecall;
- function Get_Department: WideString; safecall;
- procedure Set_Department(const retval: WideString); safecall;
- function Get_Role: WideString; safecall;
- procedure Set_Role(const retval: WideString); safecall;
- function Get_OperatingSystem: WideString; safecall;
- procedure Set_OperatingSystem(const retval: WideString); safecall;
- function Get_OperatingSystemVersion: WideString; safecall;
- procedure Set_OperatingSystemVersion(const retval: WideString); safecall;
- function Get_Model: WideString; safecall;
- procedure Set_Model(const retval: WideString); safecall;
- function Get_Processor: WideString; safecall;
- procedure Set_Processor(const retval: WideString); safecall;
- function Get_ProcessorCount: WideString; safecall;
- procedure Set_ProcessorCount(const retval: WideString); safecall;
- function Get_MemorySize: WideString; safecall;
- procedure Set_MemorySize(const retval: WideString); safecall;
- function Get_StorageCapacity: WideString; safecall;
- procedure Set_StorageCapacity(const retval: WideString); safecall;
- function Get_NetAddresses: OleVariant; safecall;
- procedure Set_NetAddresses(retval: OleVariant); safecall;
- property ComputerID: WideString read Get_ComputerID;
- property Site: WideString read Get_Site;
- property Description: WideString read Get_Description write Set_Description;
- property Location: WideString read Get_Location write Set_Location;
- property PrimaryUser: WideString read Get_PrimaryUser write Set_PrimaryUser;
- property Owner: WideString read Get_Owner write Set_Owner;
- property Division: WideString read Get_Division write Set_Division;
- property Department: WideString read Get_Department write Set_Department;
- property Role: WideString read Get_Role write Set_Role;
- property OperatingSystem: WideString read Get_OperatingSystem write Set_OperatingSystem;
- property OperatingSystemVersion: WideString read Get_OperatingSystemVersion write Set_OperatingSystemVersion;
- property Model: WideString read Get_Model write Set_Model;
- property Processor: WideString read Get_Processor write Set_Processor;
- property ProcessorCount: WideString read Get_ProcessorCount write Set_ProcessorCount;
- property MemorySize: WideString read Get_MemorySize write Set_MemorySize;
- property StorageCapacity: WideString read Get_StorageCapacity write Set_StorageCapacity;
- property NetAddresses: OleVariant read Get_NetAddresses write Set_NetAddresses;
- end;
-
-// *********************************************************************//
-// DispIntf: IADsComputerDisp
-// Flags: (4416) Dual OleAutomation Dispatchable
-// GUID: {EFE3CC70-1D9F-11CF-B1F3-02608C9E7553}
-// *********************************************************************//
- {$ifdef SUPPORTS_DISPINTERFACE}
- IADsComputerDisp = dispinterface
- ['{EFE3CC70-1D9F-11CF-B1F3-02608C9E7553}']
- property ComputerID: WideString readonly dispid 16;
- property Site: WideString readonly dispid 18;
- property Description: WideString dispid 19;
- property Location: WideString dispid 20;
- property PrimaryUser: WideString dispid 21;
- property Owner: WideString dispid 22;
- property Division: WideString dispid 23;
- property Department: WideString dispid 24;
- property Role: WideString dispid 25;
- property OperatingSystem: WideString dispid 26;
- property OperatingSystemVersion: WideString dispid 27;
- property Model: WideString dispid 28;
- property Processor: WideString dispid 29;
- property ProcessorCount: WideString dispid 30;
- property MemorySize: WideString dispid 31;
- property StorageCapacity: WideString dispid 32;
- property NetAddresses: OleVariant dispid 17;
- property Name: WideString readonly dispid 2;
- property Class_: WideString readonly dispid 3;
- property GUID: WideString readonly dispid 4;
- property ADsPath: WideString readonly dispid 5;
- property Parent: WideString readonly dispid 6;
- property Schema: WideString readonly dispid 7;
- procedure GetInfo; dispid 8;
- procedure SetInfo; dispid 9;
- function Get(const bstrName: WideString): OleVariant; dispid 10;
- procedure Put(const bstrName: WideString; vProp: OleVariant); dispid 11;
- function GetEx(const bstrName: WideString): OleVariant; dispid 12;
- procedure PutEx(lnControlCode: Integer; const bstrName: WideString; vProp: OleVariant); dispid 13;
- procedure GetInfoEx(vProperties: OleVariant; lnReserved: Integer); dispid 14;
- end;
- {$endif}
-// *********************************************************************//
-// Interface: IADsComputerOperations
-// Flags: (4416) Dual OleAutomation Dispatchable
-// GUID: {EF497680-1D9F-11CF-B1F3-02608C9E7553}
-// *********************************************************************//
- IADsComputerOperations = interface(IADs)
- ['{EF497680-1D9F-11CF-B1F3-02608C9E7553}']
- function Status: IDispatch; safecall;
- procedure Shutdown(bReboot: WordBool); safecall;
- end;
-
-// *********************************************************************//
-// DispIntf: IADsComputerOperationsDisp
-// Flags: (4416) Dual OleAutomation Dispatchable
-// GUID: {EF497680-1D9F-11CF-B1F3-02608C9E7553}
-// *********************************************************************//
- {$ifdef SUPPORTS_DISPINTERFACE}
- IADsComputerOperationsDisp = dispinterface
- ['{EF497680-1D9F-11CF-B1F3-02608C9E7553}']
- function Status: IDispatch; dispid 33;
- procedure Shutdown(bReboot: WordBool); dispid 34;
- property Name: WideString readonly dispid 2;
- property Class_: WideString readonly dispid 3;
- property GUID: WideString readonly dispid 4;
- property ADsPath: WideString readonly dispid 5;
- property Parent: WideString readonly dispid 6;
- property Schema: WideString readonly dispid 7;
- procedure GetInfo; dispid 8;
- procedure SetInfo; dispid 9;
- function Get(const bstrName: WideString): OleVariant; dispid 10;
- procedure Put(const bstrName: WideString; vProp: OleVariant); dispid 11;
- function GetEx(const bstrName: WideString): OleVariant; dispid 12;
- procedure PutEx(lnControlCode: Integer; const bstrName: WideString; vProp: OleVariant); dispid 13;
- procedure GetInfoEx(vProperties: OleVariant; lnReserved: Integer); dispid 14;
- end;
- {$endif}
-// *********************************************************************//
-// Interface: IADsGroup
-// Flags: (4416) Dual OleAutomation Dispatchable
-// GUID: {27636B00-410F-11CF-B1FF-02608C9E7553}
-// *********************************************************************//
- IADsGroup = interface(IADs)
- ['{27636B00-410F-11CF-B1FF-02608C9E7553}']
- function Get_Description: WideString; safecall;
- procedure Set_Description(const retval: WideString); safecall;
- function Members: IADsMembers; safecall;
- function IsMember(const bstrMember: WideString): WordBool; safecall;
- procedure Add(const bstrNewItem: WideString); safecall;
- procedure Remove(const bstrItemToBeRemoved: WideString); safecall;
- property Description: WideString read Get_Description write Set_Description;
- end;
-
-// *********************************************************************//
-// DispIntf: IADsGroupDisp
-// Flags: (4416) Dual OleAutomation Dispatchable
-// GUID: {27636B00-410F-11CF-B1FF-02608C9E7553}
-// *********************************************************************//
- {$ifdef SUPPORTS_DISPINTERFACE}
- IADsGroupDisp = dispinterface
- ['{27636B00-410F-11CF-B1FF-02608C9E7553}']
- property Description: WideString dispid 15;
- function Members: IADsMembers; dispid 16;
- function IsMember(const bstrMember: WideString): WordBool; dispid 17;
- procedure Add(const bstrNewItem: WideString); dispid 18;
- procedure Remove(const bstrItemToBeRemoved: WideString); dispid 19;
- property Name: WideString readonly dispid 2;
- property Class_: WideString readonly dispid 3;
- property GUID: WideString readonly dispid 4;
- property ADsPath: WideString readonly dispid 5;
- property Parent: WideString readonly dispid 6;
- property Schema: WideString readonly dispid 7;
- procedure GetInfo; dispid 8;
- procedure SetInfo; dispid 9;
- function Get(const bstrName: WideString): OleVariant; dispid 10;
- procedure Put(const bstrName: WideString; vProp: OleVariant); dispid 11;
- function GetEx(const bstrName: WideString): OleVariant; dispid 12;
- procedure PutEx(lnControlCode: Integer; const bstrName: WideString; vProp: OleVariant); dispid 13;
- procedure GetInfoEx(vProperties: OleVariant; lnReserved: Integer); dispid 14;
- end;
- {$endif}
-// *********************************************************************//
-// Interface: IADsUser
-// Flags: (4416) Dual OleAutomation Dispatchable
-// GUID: {3E37E320-17E2-11CF-ABC4-02608C9E7553}
-// *********************************************************************//
- IADsUser = interface(IADs)
- ['{3E37E320-17E2-11CF-ABC4-02608C9E7553}']
- function Get_BadLoginAddress: WideString; safecall;
- function Get_BadLoginCount: Integer; safecall;
- function Get_LastLogin: TDateTime; safecall;
- function Get_LastLogoff: TDateTime; safecall;
- function Get_LastFailedLogin: TDateTime; safecall;
- function Get_PasswordLastChanged: TDateTime; safecall;
- function Get_Description: WideString; safecall;
- procedure Set_Description(const retval: WideString); safecall;
- function Get_Division: WideString; safecall;
- procedure Set_Division(const retval: WideString); safecall;
- function Get_Department: WideString; safecall;
- procedure Set_Department(const retval: WideString); safecall;
- function Get_EmployeeID: WideString; safecall;
- procedure Set_EmployeeID(const retval: WideString); safecall;
- function Get_FullName: WideString; safecall;
- procedure Set_FullName(const retval: WideString); safecall;
- function Get_FirstName: WideString; safecall;
- procedure Set_FirstName(const retval: WideString); safecall;
- function Get_LastName: WideString; safecall;
- procedure Set_LastName(const retval: WideString); safecall;
- function Get_OtherName: WideString; safecall;
- procedure Set_OtherName(const retval: WideString); safecall;
- function Get_NamePrefix: WideString; safecall;
- procedure Set_NamePrefix(const retval: WideString); safecall;
- function Get_NameSuffix: WideString; safecall;
- procedure Set_NameSuffix(const retval: WideString); safecall;
- function Get_Title: WideString; safecall;
- procedure Set_Title(const retval: WideString); safecall;
- function Get_Manager: WideString; safecall;
- procedure Set_Manager(const retval: WideString); safecall;
- function Get_TelephoneHome: OleVariant; safecall;
- procedure Set_TelephoneHome(retval: OleVariant); safecall;
- function Get_TelephoneMobile: OleVariant; safecall;
- procedure Set_TelephoneMobile(retval: OleVariant); safecall;
- function Get_TelephoneNumber: OleVariant; safecall;
- procedure Set_TelephoneNumber(retval: OleVariant); safecall;
- function Get_TelephonePager: OleVariant; safecall;
- procedure Set_TelephonePager(retval: OleVariant); safecall;
- function Get_FaxNumber: OleVariant; safecall;
- procedure Set_FaxNumber(retval: OleVariant); safecall;
- function Get_OfficeLocations: OleVariant; safecall;
- procedure Set_OfficeLocations(retval: OleVariant); safecall;
- function Get_PostalAddresses: OleVariant; safecall;
- procedure Set_PostalAddresses(retval: OleVariant); safecall;
- function Get_PostalCodes: OleVariant; safecall;
- procedure Set_PostalCodes(retval: OleVariant); safecall;
- function Get_SeeAlso: OleVariant; safecall;
- procedure Set_SeeAlso(retval: OleVariant); safecall;
- function Get_AccountDisabled: WordBool; safecall;
- procedure Set_AccountDisabled(retval: WordBool); safecall;
- function Get_AccountExpirationDate: TDateTime; safecall;
- procedure Set_AccountExpirationDate(retval: TDateTime); safecall;
- function Get_GraceLoginsAllowed: Integer; safecall;
- procedure Set_GraceLoginsAllowed(retval: Integer); safecall;
- function Get_GraceLoginsRemaining: Integer; safecall;
- procedure Set_GraceLoginsRemaining(retval: Integer); safecall;
- function Get_IsAccountLocked: WordBool; safecall;
- procedure Set_IsAccountLocked(retval: WordBool); safecall;
- function Get_LoginHours: OleVariant; safecall;
- procedure Set_LoginHours(retval: OleVariant); safecall;
- function Get_LoginWorkstations: OleVariant; safecall;
- procedure Set_LoginWorkstations(retval: OleVariant); safecall;
- function Get_MaxLogins: Integer; safecall;
- procedure Set_MaxLogins(retval: Integer); safecall;
- function Get_MaxStorage: Integer; safecall;
- procedure Set_MaxStorage(retval: Integer); safecall;
- function Get_PasswordExpirationDate: TDateTime; safecall;
- procedure Set_PasswordExpirationDate(retval: TDateTime); safecall;
- function Get_PasswordMinimumLength: Integer; safecall;
- procedure Set_PasswordMinimumLength(retval: Integer); safecall;
- function Get_PasswordRequired: WordBool; safecall;
- procedure Set_PasswordRequired(retval: WordBool); safecall;
- function Get_RequireUniquePassword: WordBool; safecall;
- procedure Set_RequireUniquePassword(retval: WordBool); safecall;
- function Get_EmailAddress: WideString; safecall;
- procedure Set_EmailAddress(const retval: WideString); safecall;
- function Get_HomeDirectory: WideString; safecall;
- procedure Set_HomeDirectory(const retval: WideString); safecall;
- function Get_Languages: OleVariant; safecall;
- procedure Set_Languages(retval: OleVariant); safecall;
- function Get_Profile: WideString; safecall;
- procedure Set_Profile(const retval: WideString); safecall;
- function Get_LoginScript: WideString; safecall;
- procedure Set_LoginScript(const retval: WideString); safecall;
- function Get_Picture: OleVariant; safecall;
- procedure Set_Picture(retval: OleVariant); safecall;
- function Get_HomePage: WideString; safecall;
- procedure Set_HomePage(const retval: WideString); safecall;
- function Groups: IADsMembers; safecall;
- procedure SetPassword(const NewPassword: WideString); safecall;
- procedure ChangePassword(const bstrOldPassword: WideString; const bstrNewPassword: WideString); safecall;
- property BadLoginAddress: WideString read Get_BadLoginAddress;
- property BadLoginCount: Integer read Get_BadLoginCount;
- property LastLogin: TDateTime read Get_LastLogin;
- property LastLogoff: TDateTime read Get_LastLogoff;
- property LastFailedLogin: TDateTime read Get_LastFailedLogin;
- property PasswordLastChanged: TDateTime read Get_PasswordLastChanged;
- property Description: WideString read Get_Description write Set_Description;
- property Division: WideString read Get_Division write Set_Division;
- property Department: WideString read Get_Department write Set_Department;
- property EmployeeID: WideString read Get_EmployeeID write Set_EmployeeID;
- property FullName: WideString read Get_FullName write Set_FullName;
- property FirstName: WideString read Get_FirstName write Set_FirstName;
- property LastName: WideString read Get_LastName write Set_LastName;
- property OtherName: WideString read Get_OtherName write Set_OtherName;
- property NamePrefix: WideString read Get_NamePrefix write Set_NamePrefix;
- property NameSuffix: WideString read Get_NameSuffix write Set_NameSuffix;
- property Title: WideString read Get_Title write Set_Title;
- property Manager: WideString read Get_Manager write Set_Manager;
- property TelephoneHome: OleVariant read Get_TelephoneHome write Set_TelephoneHome;
- property TelephoneMobile: OleVariant read Get_TelephoneMobile write Set_TelephoneMobile;
- property TelephoneNumber: OleVariant read Get_TelephoneNumber write Set_TelephoneNumber;
- property TelephonePager: OleVariant read Get_TelephonePager write Set_TelephonePager;
- property FaxNumber: OleVariant read Get_FaxNumber write Set_FaxNumber;
- property OfficeLocations: OleVariant read Get_OfficeLocations write Set_OfficeLocations;
- property PostalAddresses: OleVariant read Get_PostalAddresses write Set_PostalAddresses;
- property PostalCodes: OleVariant read Get_PostalCodes write Set_PostalCodes;
- property SeeAlso: OleVariant read Get_SeeAlso write Set_SeeAlso;
- property AccountDisabled: WordBool read Get_AccountDisabled write Set_AccountDisabled;
- property AccountExpirationDate: TDateTime read Get_AccountExpirationDate write Set_AccountExpirationDate;
- property GraceLoginsAllowed: Integer read Get_GraceLoginsAllowed write Set_GraceLoginsAllowed;
- property GraceLoginsRemaining: Integer read Get_GraceLoginsRemaining write Set_GraceLoginsRemaining;
- property IsAccountLocked: WordBool read Get_IsAccountLocked write Set_IsAccountLocked;
- property LoginHours: OleVariant read Get_LoginHours write Set_LoginHours;
- property LoginWorkstations: OleVariant read Get_LoginWorkstations write Set_LoginWorkstations;
- property MaxLogins: Integer read Get_MaxLogins write Set_MaxLogins;
- property MaxStorage: Integer read Get_MaxStorage write Set_MaxStorage;
- property PasswordExpirationDate: TDateTime read Get_PasswordExpirationDate write Set_PasswordExpirationDate;
- property PasswordMinimumLength: Integer read Get_PasswordMinimumLength write Set_PasswordMinimumLength;
- property PasswordRequired: WordBool read Get_PasswordRequired write Set_PasswordRequired;
- property RequireUniquePassword: WordBool read Get_RequireUniquePassword write Set_RequireUniquePassword;
- property EmailAddress: WideString read Get_EmailAddress write Set_EmailAddress;
- property HomeDirectory: WideString read Get_HomeDirectory write Set_HomeDirectory;
- property Languages: OleVariant read Get_Languages write Set_Languages;
- property Profile: WideString read Get_Profile write Set_Profile;
- property LoginScript: WideString read Get_LoginScript write Set_LoginScript;
- property Picture: OleVariant read Get_Picture write Set_Picture;
- property HomePage: WideString read Get_HomePage write Set_HomePage;
- end;
-
-// *********************************************************************//
-// DispIntf: IADsUserDisp
-// Flags: (4416) Dual OleAutomation Dispatchable
-// GUID: {3E37E320-17E2-11CF-ABC4-02608C9E7553}
-// *********************************************************************//
- {$ifdef SUPPORTS_DISPINTERFACE}
- IADsUserDisp = dispinterface
- ['{3E37E320-17E2-11CF-ABC4-02608C9E7553}']
- property BadLoginAddress: WideString readonly dispid 53;
- property BadLoginCount: Integer readonly dispid 54;
- property LastLogin: TDateTime readonly dispid 56;
- property LastLogoff: TDateTime readonly dispid 57;
- property LastFailedLogin: TDateTime readonly dispid 58;
- property PasswordLastChanged: TDateTime readonly dispid 59;
- property Description: WideString dispid 15;
- property Division: WideString dispid 19;
- property Department: WideString dispid 122;
- property EmployeeID: WideString dispid 20;
- property FullName: WideString dispid 23;
- property FirstName: WideString dispid 22;
- property LastName: WideString dispid 25;
- property OtherName: WideString dispid 27;
- property NamePrefix: WideString dispid 114;
- property NameSuffix: WideString dispid 115;
- property Title: WideString dispid 36;
- property Manager: WideString dispid 26;
- property TelephoneHome: OleVariant dispid 32;
- property TelephoneMobile: OleVariant dispid 33;
- property TelephoneNumber: OleVariant dispid 34;
- property TelephonePager: OleVariant dispid 17;
- property FaxNumber: OleVariant dispid 16;
- property OfficeLocations: OleVariant dispid 28;
- property PostalAddresses: OleVariant dispid 30;
- property PostalCodes: OleVariant dispid 31;
- property SeeAlso: OleVariant dispid 117;
- property AccountDisabled: WordBool dispid 37;
- property AccountExpirationDate: TDateTime dispid 38;
- property GraceLoginsAllowed: Integer dispid 41;
- property GraceLoginsRemaining: Integer dispid 42;
- property IsAccountLocked: WordBool dispid 43;
- property LoginHours: OleVariant dispid 45;
- property LoginWorkstations: OleVariant dispid 46;
- property MaxLogins: Integer dispid 47;
- property MaxStorage: Integer dispid 48;
- property PasswordExpirationDate: TDateTime dispid 49;
- property PasswordMinimumLength: Integer dispid 50;
- property PasswordRequired: WordBool dispid 51;
- property RequireUniquePassword: WordBool dispid 52;
- property EmailAddress: WideString dispid 60;
- property HomeDirectory: WideString dispid 61;
- property Languages: OleVariant dispid 62;
- property Profile: WideString dispid 63;
- property LoginScript: WideString dispid 64;
- property Picture: OleVariant dispid 65;
- property HomePage: WideString dispid 120;
- function Groups: IADsMembers; dispid 66;
- procedure SetPassword(const NewPassword: WideString); dispid 67;
- procedure ChangePassword(const bstrOldPassword: WideString; const bstrNewPassword: WideString); dispid 68;
- property Name: WideString readonly dispid 2;
- property Class_: WideString readonly dispid 3;
- property GUID: WideString readonly dispid 4;
- property ADsPath: WideString readonly dispid 5;
- property Parent: WideString readonly dispid 6;
- property Schema: WideString readonly dispid 7;
- procedure GetInfo; dispid 8;
- procedure SetInfo; dispid 9;
- function Get(const bstrName: WideString): OleVariant; dispid 10;
- procedure Put(const bstrName: WideString; vProp: OleVariant); dispid 11;
- function GetEx(const bstrName: WideString): OleVariant; dispid 12;
- procedure PutEx(lnControlCode: Integer; const bstrName: WideString; vProp: OleVariant); dispid 13;
- procedure GetInfoEx(vProperties: OleVariant; lnReserved: Integer); dispid 14;
- end;
- {$endif}
-// *********************************************************************//
-// Interface: IADsPrintQueue
-// Flags: (4416) Dual OleAutomation Dispatchable
-// GUID: {B15160D0-1226-11CF-A985-00AA006BC149}
-// *********************************************************************//
- IADsPrintQueue = interface(IADs)
- ['{B15160D0-1226-11CF-A985-00AA006BC149}']
- function Get_PrinterPath: WideString; safecall;
- procedure Set_PrinterPath(const retval: WideString); safecall;
- function Get_Model: WideString; safecall;
- procedure Set_Model(const retval: WideString); safecall;
- function Get_Datatype: WideString; safecall;
- procedure Set_Datatype(const retval: WideString); safecall;
- function Get_PrintProcessor: WideString; safecall;
- procedure Set_PrintProcessor(const retval: WideString); safecall;
- function Get_Description: WideString; safecall;
- procedure Set_Description(const retval: WideString); safecall;
- function Get_Location: WideString; safecall;
- procedure Set_Location(const retval: WideString); safecall;
- function Get_StartTime: TDateTime; safecall;
- procedure Set_StartTime(retval: TDateTime); safecall;
- function Get_UntilTime: TDateTime; safecall;
- procedure Set_UntilTime(retval: TDateTime); safecall;
- function Get_DefaultJobPriority: Integer; safecall;
- procedure Set_DefaultJobPriority(retval: Integer); safecall;
- function Get_Priority: Integer; safecall;
- procedure Set_Priority(retval: Integer); safecall;
- function Get_BannerPage: WideString; safecall;
- procedure Set_BannerPage(const retval: WideString); safecall;
- function Get_PrintDevices: OleVariant; safecall;
- procedure Set_PrintDevices(retval: OleVariant); safecall;
- function Get_NetAddresses: OleVariant; safecall;
- procedure Set_NetAddresses(retval: OleVariant); safecall;
- property PrinterPath: WideString read Get_PrinterPath write Set_PrinterPath;
- property Model: WideString read Get_Model write Set_Model;
- property Datatype: WideString read Get_Datatype write Set_Datatype;
- property PrintProcessor: WideString read Get_PrintProcessor write Set_PrintProcessor;
- property Description: WideString read Get_Description write Set_Description;
- property Location: WideString read Get_Location write Set_Location;
- property StartTime: TDateTime read Get_StartTime write Set_StartTime;
- property UntilTime: TDateTime read Get_UntilTime write Set_UntilTime;
- property DefaultJobPriority: Integer read Get_DefaultJobPriority write Set_DefaultJobPriority;
- property Priority: Integer read Get_Priority write Set_Priority;
- property BannerPage: WideString read Get_BannerPage write Set_BannerPage;
- property PrintDevices: OleVariant read Get_PrintDevices write Set_PrintDevices;
- property NetAddresses: OleVariant read Get_NetAddresses write Set_NetAddresses;
- end;
-
-// *********************************************************************//
-// DispIntf: IADsPrintQueueDisp
-// Flags: (4416) Dual OleAutomation Dispatchable
-// GUID: {B15160D0-1226-11CF-A985-00AA006BC149}
-// *********************************************************************//
- {$ifdef SUPPORTS_DISPINTERFACE}
- IADsPrintQueueDisp = dispinterface
- ['{B15160D0-1226-11CF-A985-00AA006BC149}']
- property PrinterPath: WideString dispid 15;
- property Model: WideString dispid 16;
- property Datatype: WideString dispid 17;
- property PrintProcessor: WideString dispid 18;
- property Description: WideString dispid 19;
- property Location: WideString dispid 20;
- property StartTime: TDateTime dispid 21;
- property UntilTime: TDateTime dispid 22;
- property DefaultJobPriority: Integer dispid 23;
- property Priority: Integer dispid 24;
- property BannerPage: WideString dispid 25;
- property PrintDevices: OleVariant dispid 26;
- property NetAddresses: OleVariant dispid 27;
- property Name: WideString readonly dispid 2;
- property Class_: WideString readonly dispid 3;
- property GUID: WideString readonly dispid 4;
- property ADsPath: WideString readonly dispid 5;
- property Parent: WideString readonly dispid 6;
- property Schema: WideString readonly dispid 7;
- procedure GetInfo; dispid 8;
- procedure SetInfo; dispid 9;
- function Get(const bstrName: WideString): OleVariant; dispid 10;
- procedure Put(const bstrName: WideString; vProp: OleVariant); dispid 11;
- function GetEx(const bstrName: WideString): OleVariant; dispid 12;
- procedure PutEx(lnControlCode: Integer; const bstrName: WideString; vProp: OleVariant); dispid 13;
- procedure GetInfoEx(vProperties: OleVariant; lnReserved: Integer); dispid 14;
- end;
- {$endif}
-// *********************************************************************//
-// Interface: IADsPrintQueueOperations
-// Flags: (4416) Dual OleAutomation Dispatchable
-// GUID: {124BE5C0-156E-11CF-A986-00AA006BC149}
-// *********************************************************************//
- IADsPrintQueueOperations = interface(IADs)
- ['{124BE5C0-156E-11CF-A986-00AA006BC149}']
- function Get_Status: Integer; safecall;
- function PrintJobs: IADsCollection; safecall;
- procedure Pause; safecall;
- procedure Resume; safecall;
- procedure Purge; safecall;
- property Status: Integer read Get_Status;
- end;
-
-// *********************************************************************//
-// DispIntf: IADsPrintQueueOperationsDisp
-// Flags: (4416) Dual OleAutomation Dispatchable
-// GUID: {124BE5C0-156E-11CF-A986-00AA006BC149}
-// *********************************************************************//
- {$ifdef SUPPORTS_DISPINTERFACE}
- IADsPrintQueueOperationsDisp = dispinterface
- ['{124BE5C0-156E-11CF-A986-00AA006BC149}']
- property Status: Integer readonly dispid 27;
- function PrintJobs: IADsCollection; dispid 28;
- procedure Pause; dispid 29;
- procedure Resume; dispid 30;
- procedure Purge; dispid 31;
- property Name: WideString readonly dispid 2;
- property Class_: WideString readonly dispid 3;
- property GUID: WideString readonly dispid 4;
- property ADsPath: WideString readonly dispid 5;
- property Parent: WideString readonly dispid 6;
- property Schema: WideString readonly dispid 7;
- procedure GetInfo; dispid 8;
- procedure SetInfo; dispid 9;
- function Get(const bstrName: WideString): OleVariant; dispid 10;
- procedure Put(const bstrName: WideString; vProp: OleVariant); dispid 11;
- function GetEx(const bstrName: WideString): OleVariant; dispid 12;
- procedure PutEx(lnControlCode: Integer; const bstrName: WideString; vProp: OleVariant); dispid 13;
- procedure GetInfoEx(vProperties: OleVariant; lnReserved: Integer); dispid 14;
- end;
- {$endif}
-// *********************************************************************//
-// Interface: IADsPrintJob
-// Flags: (4416) Dual OleAutomation Dispatchable
-// GUID: {32FB6780-1ED0-11CF-A988-00AA006BC149}
-// *********************************************************************//
- IADsPrintJob = interface(IADs)
- ['{32FB6780-1ED0-11CF-A988-00AA006BC149}']
- function Get_HostPrintQueue: WideString; safecall;
- function Get_User: WideString; safecall;
- function Get_UserPath: WideString; safecall;
- function Get_TimeSubmitted: TDateTime; safecall;
- function Get_TotalPages: Integer; safecall;
- function Get_Size: Integer; safecall;
- function Get_Description: WideString; safecall;
- procedure Set_Description(const retval: WideString); safecall;
- function Get_Priority: Integer; safecall;
- procedure Set_Priority(retval: Integer); safecall;
- function Get_StartTime: TDateTime; safecall;
- procedure Set_StartTime(retval: TDateTime); safecall;
- function Get_UntilTime: TDateTime; safecall;
- procedure Set_UntilTime(retval: TDateTime); safecall;
- function Get_Notify: WideString; safecall;
- procedure Set_Notify(const retval: WideString); safecall;
- function Get_NotifyPath: WideString; safecall;
- procedure Set_NotifyPath(const retval: WideString); safecall;
- property HostPrintQueue: WideString read Get_HostPrintQueue;
- property User: WideString read Get_User;
- property UserPath: WideString read Get_UserPath;
- property TimeSubmitted: TDateTime read Get_TimeSubmitted;
- property TotalPages: Integer read Get_TotalPages;
- property Size: Integer read Get_Size;
- property Description: WideString read Get_Description write Set_Description;
- property Priority: Integer read Get_Priority write Set_Priority;
- property StartTime: TDateTime read Get_StartTime write Set_StartTime;
- property UntilTime: TDateTime read Get_UntilTime write Set_UntilTime;
- property Notify: WideString read Get_Notify write Set_Notify;
- property NotifyPath: WideString read Get_NotifyPath write Set_NotifyPath;
- end;
-
-// *********************************************************************//
-// DispIntf: IADsPrintJobDisp
-// Flags: (4416) Dual OleAutomation Dispatchable
-// GUID: {32FB6780-1ED0-11CF-A988-00AA006BC149}
-// *********************************************************************//
- {$ifdef SUPPORTS_DISPINTERFACE}
- IADsPrintJobDisp = dispinterface
- ['{32FB6780-1ED0-11CF-A988-00AA006BC149}']
- property HostPrintQueue: WideString readonly dispid 15;
- property User: WideString readonly dispid 16;
- property UserPath: WideString readonly dispid 17;
- property TimeSubmitted: TDateTime readonly dispid 18;
- property TotalPages: Integer readonly dispid 19;
- property Size: Integer readonly dispid 234;
- property Description: WideString dispid 20;
- property Priority: Integer dispid 21;
- property StartTime: TDateTime dispid 22;
- property UntilTime: TDateTime dispid 23;
- property Notify: WideString dispid 24;
- property NotifyPath: WideString dispid 25;
- property Name: WideString readonly dispid 2;
- property Class_: WideString readonly dispid 3;
- property GUID: WideString readonly dispid 4;
- property ADsPath: WideString readonly dispid 5;
- property Parent: WideString readonly dispid 6;
- property Schema: WideString readonly dispid 7;
- procedure GetInfo; dispid 8;
- procedure SetInfo; dispid 9;
- function Get(const bstrName: WideString): OleVariant; dispid 10;
- procedure Put(const bstrName: WideString; vProp: OleVariant); dispid 11;
- function GetEx(const bstrName: WideString): OleVariant; dispid 12;
- procedure PutEx(lnControlCode: Integer; const bstrName: WideString; vProp: OleVariant); dispid 13;
- procedure GetInfoEx(vProperties: OleVariant; lnReserved: Integer); dispid 14;
- end;
- {$endif}
-// *********************************************************************//
-// Interface: IADsPrintJobOperations
-// Flags: (4416) Dual OleAutomation Dispatchable
-// GUID: {9A52DB30-1ECF-11CF-A988-00AA006BC149}
-// *********************************************************************//
- IADsPrintJobOperations = interface(IADs)
- ['{9A52DB30-1ECF-11CF-A988-00AA006BC149}']
- function Get_Status: Integer; safecall;
- function Get_TimeElapsed: Integer; safecall;
- function Get_PagesPrinted: Integer; safecall;
- function Get_Position: Integer; safecall;
- procedure Set_Position(retval: Integer); safecall;
- procedure Pause; safecall;
- procedure Resume; safecall;
- property Status: Integer read Get_Status;
- property TimeElapsed: Integer read Get_TimeElapsed;
- property PagesPrinted: Integer read Get_PagesPrinted;
- property Position: Integer read Get_Position write Set_Position;
- end;
-
-// *********************************************************************//
-// DispIntf: IADsPrintJobOperationsDisp
-// Flags: (4416) Dual OleAutomation Dispatchable
-// GUID: {9A52DB30-1ECF-11CF-A988-00AA006BC149}
-// *********************************************************************//
- {$ifdef SUPPORTS_DISPINTERFACE}
- IADsPrintJobOperationsDisp = dispinterface
- ['{9A52DB30-1ECF-11CF-A988-00AA006BC149}']
- property Status: Integer readonly dispid 26;
- property TimeElapsed: Integer readonly dispid 27;
- property PagesPrinted: Integer readonly dispid 28;
- property Position: Integer dispid 29;
- procedure Pause; dispid 30;
- procedure Resume; dispid 31;
- property Name: WideString readonly dispid 2;
- property Class_: WideString readonly dispid 3;
- property GUID: WideString readonly dispid 4;
- property ADsPath: WideString readonly dispid 5;
- property Parent: WideString readonly dispid 6;
- property Schema: WideString readonly dispid 7;
- procedure GetInfo; dispid 8;
- procedure SetInfo; dispid 9;
- function Get(const bstrName: WideString): OleVariant; dispid 10;
- procedure Put(const bstrName: WideString; vProp: OleVariant); dispid 11;
- function GetEx(const bstrName: WideString): OleVariant; dispid 12;
- procedure PutEx(lnControlCode: Integer; const bstrName: WideString; vProp: OleVariant); dispid 13;
- procedure GetInfoEx(vProperties: OleVariant; lnReserved: Integer); dispid 14;
- end;
- {$endif}
-// *********************************************************************//
-// Interface: IADsService
-// Flags: (4416) Dual OleAutomation Dispatchable
-// GUID: {68AF66E0-31CA-11CF-A98A-00AA006BC149}
-// *********************************************************************//
- IADsService = interface(IADs)
- ['{68AF66E0-31CA-11CF-A98A-00AA006BC149}']
- function Get_HostComputer: WideString; safecall;
- procedure Set_HostComputer(const retval: WideString); safecall;
- function Get_DisplayName: WideString; safecall;
- procedure Set_DisplayName(const retval: WideString); safecall;
- function Get_Version: WideString; safecall;
- procedure Set_Version(const retval: WideString); safecall;
- function Get_ServiceType: Integer; safecall;
- procedure Set_ServiceType(retval: Integer); safecall;
- function Get_StartType: Integer; safecall;
- procedure Set_StartType(retval: Integer); safecall;
- function Get_Path: WideString; safecall;
- procedure Set_Path(const retval: WideString); safecall;
- function Get_StartupParameters: WideString; safecall;
- procedure Set_StartupParameters(const retval: WideString); safecall;
- function Get_ErrorControl: Integer; safecall;
- procedure Set_ErrorControl(retval: Integer); safecall;
- function Get_LoadOrderGroup: WideString; safecall;
- procedure Set_LoadOrderGroup(const retval: WideString); safecall;
- function Get_ServiceAccountName: WideString; safecall;
- procedure Set_ServiceAccountName(const retval: WideString); safecall;
- function Get_ServiceAccountPath: WideString; safecall;
- procedure Set_ServiceAccountPath(const retval: WideString); safecall;
- function Get_Dependencies: OleVariant; safecall;
- procedure Set_Dependencies(retval: OleVariant); safecall;
- property HostComputer: WideString read Get_HostComputer write Set_HostComputer;
- property DisplayName: WideString read Get_DisplayName write Set_DisplayName;
- property Version: WideString read Get_Version write Set_Version;
- property ServiceType: Integer read Get_ServiceType write Set_ServiceType;
- property StartType: Integer read Get_StartType write Set_StartType;
- property Path: WideString read Get_Path write Set_Path;
- property StartupParameters: WideString read Get_StartupParameters write Set_StartupParameters;
- property ErrorControl: Integer read Get_ErrorControl write Set_ErrorControl;
- property LoadOrderGroup: WideString read Get_LoadOrderGroup write Set_LoadOrderGroup;
- property ServiceAccountName: WideString read Get_ServiceAccountName write Set_ServiceAccountName;
- property ServiceAccountPath: WideString read Get_ServiceAccountPath write Set_ServiceAccountPath;
- property Dependencies: OleVariant read Get_Dependencies write Set_Dependencies;
- end;
-
-// *********************************************************************//
-// DispIntf: IADsServiceDisp
-// Flags: (4416) Dual OleAutomation Dispatchable
-// GUID: {68AF66E0-31CA-11CF-A98A-00AA006BC149}
-// *********************************************************************//
- {$ifdef SUPPORTS_DISPINTERFACE}
- IADsServiceDisp = dispinterface
- ['{68AF66E0-31CA-11CF-A98A-00AA006BC149}']
- property HostComputer: WideString dispid 15;
- property DisplayName: WideString dispid 16;
- property Version: WideString dispid 17;
- property ServiceType: Integer dispid 18;
- property StartType: Integer dispid 19;
- property Path: WideString dispid 20;
- property StartupParameters: WideString dispid 21;
- property ErrorControl: Integer dispid 22;
- property LoadOrderGroup: WideString dispid 23;
- property ServiceAccountName: WideString dispid 24;
- property ServiceAccountPath: WideString dispid 25;
- property Dependencies: OleVariant dispid 26;
- property Name: WideString readonly dispid 2;
- property Class_: WideString readonly dispid 3;
- property GUID: WideString readonly dispid 4;
- property ADsPath: WideString readonly dispid 5;
- property Parent: WideString readonly dispid 6;
- property Schema: WideString readonly dispid 7;
- procedure GetInfo; dispid 8;
- procedure SetInfo; dispid 9;
- function Get(const bstrName: WideString): OleVariant; dispid 10;
- procedure Put(const bstrName: WideString; vProp: OleVariant); dispid 11;
- function GetEx(const bstrName: WideString): OleVariant; dispid 12;
- procedure PutEx(lnControlCode: Integer; const bstrName: WideString; vProp: OleVariant); dispid 13;
- procedure GetInfoEx(vProperties: OleVariant; lnReserved: Integer); dispid 14;
- end;
- {$endif}
-// *********************************************************************//
-// Interface: IADsServiceOperations
-// Flags: (4416) Dual OleAutomation Dispatchable
-// GUID: {5D7B33F0-31CA-11CF-A98A-00AA006BC149}
-// *********************************************************************//
- IADsServiceOperations = interface(IADs)
- ['{5D7B33F0-31CA-11CF-A98A-00AA006BC149}']
- function Get_Status: Integer; safecall;
- procedure Start; safecall;
- procedure Stop; safecall;
- procedure Pause; safecall;
- procedure Continue; safecall;
- procedure SetPassword(const bstrNewPassword: WideString); safecall;
- property Status: Integer read Get_Status;
- end;
-
-// *********************************************************************//
-// DispIntf: IADsServiceOperationsDisp
-// Flags: (4416) Dual OleAutomation Dispatchable
-// GUID: {5D7B33F0-31CA-11CF-A98A-00AA006BC149}
-// *********************************************************************//
- {$ifdef SUPPORTS_DISPINTERFACE}
- IADsServiceOperationsDisp = dispinterface
- ['{5D7B33F0-31CA-11CF-A98A-00AA006BC149}']
- property Status: Integer readonly dispid 27;
- procedure Start; dispid 28;
- procedure Stop; dispid 29;
- procedure Pause; dispid 30;
- procedure Continue; dispid 31;
- procedure SetPassword(const bstrNewPassword: WideString); dispid 32;
- property Name: WideString readonly dispid 2;
- property Class_: WideString readonly dispid 3;
- property GUID: WideString readonly dispid 4;
- property ADsPath: WideString readonly dispid 5;
- property Parent: WideString readonly dispid 6;
- property Schema: WideString readonly dispid 7;
- procedure GetInfo; dispid 8;
- procedure SetInfo; dispid 9;
- function Get(const bstrName: WideString): OleVariant; dispid 10;
- procedure Put(const bstrName: WideString; vProp: OleVariant); dispid 11;
- function GetEx(const bstrName: WideString): OleVariant; dispid 12;
- procedure PutEx(lnControlCode: Integer; const bstrName: WideString; vProp: OleVariant); dispid 13;
- procedure GetInfoEx(vProperties: OleVariant; lnReserved: Integer); dispid 14;
- end;
- {$endif}
-
-// *********************************************************************//
-// Interface: IADsFileService
-// Flags: (4416) Dual OleAutomation Dispatchable
-// GUID: {A89D1900-31CA-11CF-A98A-00AA006BC149}
-// *********************************************************************//
- IADsFileService = interface(IADsService)
- ['{A89D1900-31CA-11CF-A98A-00AA006BC149}']
- function Get_Description: WideString; safecall;
- procedure Set_Description(const retval: WideString); safecall;
- function Get_MaxUserCount: Integer; safecall;
- procedure Set_MaxUserCount(retval: Integer); safecall;
- property Description: WideString read Get_Description write Set_Description;
- property MaxUserCount: Integer read Get_MaxUserCount write Set_MaxUserCount;
- end;
-
-// *********************************************************************//
-// DispIntf: IADsFileServiceDisp
-// Flags: (4416) Dual OleAutomation Dispatchable
-// GUID: {A89D1900-31CA-11CF-A98A-00AA006BC149}
-// *********************************************************************//
- {$ifdef SUPPORTS_DISPINTERFACE}
- IADsFileServiceDisp = dispinterface
- ['{A89D1900-31CA-11CF-A98A-00AA006BC149}']
- property Description: WideString dispid 33;
- property MaxUserCount: Integer dispid 34;
- property HostComputer: WideString dispid 15;
- property DisplayName: WideString dispid 16;
- property Version: WideString dispid 17;
- property ServiceType: Integer dispid 18;
- property StartType: Integer dispid 19;
- property Path: WideString dispid 20;
- property StartupParameters: WideString dispid 21;
- property ErrorControl: Integer dispid 22;
- property LoadOrderGroup: WideString dispid 23;
- property ServiceAccountName: WideString dispid 24;
- property ServiceAccountPath: WideString dispid 25;
- property Dependencies: OleVariant dispid 26;
- property Name: WideString readonly dispid 2;
- property Class_: WideString readonly dispid 3;
- property GUID: WideString readonly dispid 4;
- property ADsPath: WideString readonly dispid 5;
- property Parent: WideString readonly dispid 6;
- property Schema: WideString readonly dispid 7;
- procedure GetInfo; dispid 8;
- procedure SetInfo; dispid 9;
- function Get(const bstrName: WideString): OleVariant; dispid 10;
- procedure Put(const bstrName: WideString; vProp: OleVariant); dispid 11;
- function GetEx(const bstrName: WideString): OleVariant; dispid 12;
- procedure PutEx(lnControlCode: Integer; const bstrName: WideString; vProp: OleVariant); dispid 13;
- procedure GetInfoEx(vProperties: OleVariant; lnReserved: Integer); dispid 14;
- end;
- {$endif}
-// *********************************************************************//
-// Interface: IADsFileServiceOperations
-// Flags: (4416) Dual OleAutomation Dispatchable
-// GUID: {A02DED10-31CA-11CF-A98A-00AA006BC149}
-// *********************************************************************//
- IADsFileServiceOperations = interface(IADsServiceOperations)
- ['{A02DED10-31CA-11CF-A98A-00AA006BC149}']
- function Sessions: IADsCollection; safecall;
- function Resources: IADsCollection; safecall;
- end;
-
-// *********************************************************************//
-// DispIntf: IADsFileServiceOperationsDisp
-// Flags: (4416) Dual OleAutomation Dispatchable
-// GUID: {A02DED10-31CA-11CF-A98A-00AA006BC149}
-// *********************************************************************//
- {$ifdef SUPPORTS_DISPINTERFACE}
- IADsFileServiceOperationsDisp = dispinterface
- ['{A02DED10-31CA-11CF-A98A-00AA006BC149}']
- function Sessions: IADsCollection; dispid 35;
- function Resources: IADsCollection; dispid 36;
- property Status: Integer readonly dispid 27;
- procedure Start; dispid 28;
- procedure Stop; dispid 29;
- procedure Pause; dispid 30;
- procedure Continue; dispid 31;
- procedure SetPassword(const bstrNewPassword: WideString); dispid 32;
- property Name: WideString readonly dispid 2;
- property Class_: WideString readonly dispid 3;
- property GUID: WideString readonly dispid 4;
- property ADsPath: WideString readonly dispid 5;
- property Parent: WideString readonly dispid 6;
- property Schema: WideString readonly dispid 7;
- procedure GetInfo; dispid 8;
- procedure SetInfo; dispid 9;
- function Get(const bstrName: WideString): OleVariant; dispid 10;
- procedure Put(const bstrName: WideString; vProp: OleVariant); dispid 11;
- function GetEx(const bstrName: WideString): OleVariant; dispid 12;
- procedure PutEx(lnControlCode: Integer; const bstrName: WideString; vProp: OleVariant); dispid 13;
- procedure GetInfoEx(vProperties: OleVariant; lnReserved: Integer); dispid 14;
- end;
- {$endif}
-// *********************************************************************//
-// Interface: IADsFileShare
-// Flags: (4416) Dual OleAutomation Dispatchable
-// GUID: {EB6DCAF0-4B83-11CF-A995-00AA006BC149}
-// *********************************************************************//
- IADsFileShare = interface(IADs)
- ['{EB6DCAF0-4B83-11CF-A995-00AA006BC149}']
- function Get_CurrentUserCount: Integer; safecall;
- function Get_Description: WideString; safecall;
- procedure Set_Description(const retval: WideString); safecall;
- function Get_HostComputer: WideString; safecall;
- procedure Set_HostComputer(const retval: WideString); safecall;
- function Get_Path: WideString; safecall;
- procedure Set_Path(const retval: WideString); safecall;
- function Get_MaxUserCount: Integer; safecall;
- procedure Set_MaxUserCount(retval: Integer); safecall;
- property CurrentUserCount: Integer read Get_CurrentUserCount;
- property Description: WideString read Get_Description write Set_Description;
- property HostComputer: WideString read Get_HostComputer write Set_HostComputer;
- property Path: WideString read Get_Path write Set_Path;
- property MaxUserCount: Integer read Get_MaxUserCount write Set_MaxUserCount;
- end;
-
-// *********************************************************************//
-// DispIntf: IADsFileShareDisp
-// Flags: (4416) Dual OleAutomation Dispatchable
-// GUID: {EB6DCAF0-4B83-11CF-A995-00AA006BC149}
-// *********************************************************************//
- {$ifdef SUPPORTS_DISPINTERFACE}
- IADsFileShareDisp = dispinterface
- ['{EB6DCAF0-4B83-11CF-A995-00AA006BC149}']
- property CurrentUserCount: Integer readonly dispid 15;
- property Description: WideString dispid 16;
- property HostComputer: WideString dispid 17;
- property Path: WideString dispid 18;
- property MaxUserCount: Integer dispid 19;
- property Name: WideString readonly dispid 2;
- property Class_: WideString readonly dispid 3;
- property GUID: WideString readonly dispid 4;
- property ADsPath: WideString readonly dispid 5;
- property Parent: WideString readonly dispid 6;
- property Schema: WideString readonly dispid 7;
- procedure GetInfo; dispid 8;
- procedure SetInfo; dispid 9;
- function Get(const bstrName: WideString): OleVariant; dispid 10;
- procedure Put(const bstrName: WideString; vProp: OleVariant); dispid 11;
- function GetEx(const bstrName: WideString): OleVariant; dispid 12;
- procedure PutEx(lnControlCode: Integer; const bstrName: WideString; vProp: OleVariant); dispid 13;
- procedure GetInfoEx(vProperties: OleVariant; lnReserved: Integer); dispid 14;
- end;
- {$endif}
-
-// *********************************************************************//
-// Interface: IADsSession
-// Flags: (4416) Dual OleAutomation Dispatchable
-// GUID: {398B7DA0-4AAB-11CF-AE2C-00AA006EBFB9}
-// *********************************************************************//
- IADsSession = interface(IADs)
- ['{398B7DA0-4AAB-11CF-AE2C-00AA006EBFB9}']
- function Get_User: WideString; safecall;
- function Get_UserPath: WideString; safecall;
- function Get_Computer: WideString; safecall;
- function Get_ComputerPath: WideString; safecall;
- function Get_ConnectTime: Integer; safecall;
- function Get_IdleTime: Integer; safecall;
- property User: WideString read Get_User;
- property UserPath: WideString read Get_UserPath;
- property Computer: WideString read Get_Computer;
- property ComputerPath: WideString read Get_ComputerPath;
- property ConnectTime: Integer read Get_ConnectTime;
- property IdleTime: Integer read Get_IdleTime;
- end;
-
-// *********************************************************************//
-// DispIntf: IADsSessionDisp
-// Flags: (4416) Dual OleAutomation Dispatchable
-// GUID: {398B7DA0-4AAB-11CF-AE2C-00AA006EBFB9}
-// *********************************************************************//
- {$ifdef SUPPORTS_DISPINTERFACE}
- IADsSessionDisp = dispinterface
- ['{398B7DA0-4AAB-11CF-AE2C-00AA006EBFB9}']
- property User: WideString readonly dispid 15;
- property UserPath: WideString readonly dispid 16;
- property Computer: WideString readonly dispid 17;
- property ComputerPath: WideString readonly dispid 18;
- property ConnectTime: Integer readonly dispid 19;
- property IdleTime: Integer readonly dispid 20;
- property Name: WideString readonly dispid 2;
- property Class_: WideString readonly dispid 3;
- property GUID: WideString readonly dispid 4;
- property ADsPath: WideString readonly dispid 5;
- property Parent: WideString readonly dispid 6;
- property Schema: WideString readonly dispid 7;
- procedure GetInfo; dispid 8;
- procedure SetInfo; dispid 9;
- function Get(const bstrName: WideString): OleVariant; dispid 10;
- procedure Put(const bstrName: WideString; vProp: OleVariant); dispid 11;
- function GetEx(const bstrName: WideString): OleVariant; dispid 12;
- procedure PutEx(lnControlCode: Integer; const bstrName: WideString; vProp: OleVariant); dispid 13;
- procedure GetInfoEx(vProperties: OleVariant; lnReserved: Integer); dispid 14;
- end;
- {$endif}
-// *********************************************************************//
-// Interface: IADsResource
-// Flags: (4416) Dual OleAutomation Dispatchable
-// GUID: {34A05B20-4AAB-11CF-AE2C-00AA006EBFB9}
-// *********************************************************************//
- IADsResource = interface(IADs)
- ['{34A05B20-4AAB-11CF-AE2C-00AA006EBFB9}']
- function Get_User: WideString; safecall;
- function Get_UserPath: WideString; safecall;
- function Get_Path: WideString; safecall;
- function Get_LockCount: Integer; safecall;
- property User: WideString read Get_User;
- property UserPath: WideString read Get_UserPath;
- property Path: WideString read Get_Path;
- property LockCount: Integer read Get_LockCount;
- end;
-
-// *********************************************************************//
-// DispIntf: IADsResourceDisp
-// Flags: (4416) Dual OleAutomation Dispatchable
-// GUID: {34A05B20-4AAB-11CF-AE2C-00AA006EBFB9}
-// *********************************************************************//
- {$ifdef SUPPORTS_DISPINTERFACE}
- IADsResourceDisp = dispinterface
- ['{34A05B20-4AAB-11CF-AE2C-00AA006EBFB9}']
- property User: WideString readonly dispid 15;
- property UserPath: WideString readonly dispid 16;
- property Path: WideString readonly dispid 17;
- property LockCount: Integer readonly dispid 18;
- property Name: WideString readonly dispid 2;
- property Class_: WideString readonly dispid 3;
- property GUID: WideString readonly dispid 4;
- property ADsPath: WideString readonly dispid 5;
- property Parent: WideString readonly dispid 6;
- property Schema: WideString readonly dispid 7;
- procedure GetInfo; dispid 8;
- procedure SetInfo; dispid 9;
- function Get(const bstrName: WideString): OleVariant; dispid 10;
- procedure Put(const bstrName: WideString; vProp: OleVariant); dispid 11;
- function GetEx(const bstrName: WideString): OleVariant; dispid 12;
- procedure PutEx(lnControlCode: Integer; const bstrName: WideString; vProp: OleVariant); dispid 13;
- procedure GetInfoEx(vProperties: OleVariant; lnReserved: Integer); dispid 14;
- end;
- {$endif}
-// *********************************************************************//
-// Interface: IADsOpenDSObject
-// Flags: (4416) Dual OleAutomation Dispatchable
-// GUID: {DDF2891E-0F9C-11D0-8AD4-00C04FD8D503}
-// *********************************************************************//
- IADsOpenDSObject = interface(IDispatch)
- ['{DDF2891E-0F9C-11D0-8AD4-00C04FD8D503}']
- function OpenDSObject(const lpszDNName: WideString; const lpszUserName: WideString;
- const lpszPassword: WideString; lnReserved: Integer): IDispatch; safecall;
- end;
-
-// *********************************************************************//
-// DispIntf: IADsOpenDSObjectDisp
-// Flags: (4416) Dual OleAutomation Dispatchable
-// GUID: {DDF2891E-0F9C-11D0-8AD4-00C04FD8D503}
-// *********************************************************************//
- {$ifdef SUPPORTS_DISPINTERFACE}
- IADsOpenDSObjectDisp = dispinterface
- ['{DDF2891E-0F9C-11D0-8AD4-00C04FD8D503}']
- function OpenDSObject(const lpszDNName: WideString; const lpszUserName: WideString;
- const lpszPassword: WideString; lnReserved: Integer): IDispatch; dispid 1;
- end;
- {$endif}
-// *********************************************************************//
-// Interface: IDirectoryObject
-// Flags: (0)
-// GUID: {E798DE2C-22E4-11D0-84FE-00C04FD8D503}
-// *********************************************************************//
- IDirectoryObject = interface(IUnknown)
- ['{E798DE2C-22E4-11D0-84FE-00C04FD8D503}']
- function GetObjectInformation(out ppObjInfo: PUserType11): HResult; stdcall;
- function GetObjectAttributes(var pAttributeNames: PWideChar; dwNumberAttributes: LongWord;
- out ppAttributeEntries: PUserType12;
- out pdwNumAttributesReturned: LongWord): HResult; stdcall;
- function SetObjectAttributes(var pAttributeEntries: _ads_attr_info; dwNumAttributes: LongWord;
- out pdwNumAttributesModified: LongWord): HResult; stdcall;
- function CreateDSObject(pszRDNName: PWideChar; var pAttributeEntries: _ads_attr_info;
- dwNumAttributes: LongWord; out ppObject: IDispatch): HResult; stdcall;
- function DeleteDSObject(pszRDNName: PWideChar): HResult; stdcall;
- end;
-
-// *********************************************************************//
-// Interface: IDirectorySearch
-// Flags: (0)
-// GUID: {109BA8EC-92F0-11D0-A790-00C04FD8D5A8}
-// *********************************************************************//
- IDirectorySearch = interface(IUnknown)
- ['{109BA8EC-92F0-11D0-A790-00C04FD8D5A8}']
- function SetSearchPreference(var pSearchPrefs: ads_searchpref_info; dwNumPrefs: LongWord): HResult; stdcall;
- function ExecuteSearch(pszSearchFilter: PWideChar; var pAttributeNames: PWideChar;
- dwNumberAttributes: LongWord; out phSearchResult: Pointer): HResult; stdcall;
- function AbandonSearch(var phSearchResult: Pointer): HResult; stdcall;
- function GetFirstRow(var hSearchResult: Pointer): HResult; stdcall;
- function GetNextRow(var hSearchResult: Pointer): HResult; stdcall;
- function GetPreviousRow(var hSearchResult: Pointer): HResult; stdcall;
- function GetNextColumnName(var hSearchHandle: Pointer; out ppszColumnName: PWideChar): HResult; stdcall;
- function GetColumn(var hSearchResult: Pointer; szColumnName: PWideChar;
- out pSearchColumn: ads_search_column): HResult; stdcall;
- function FreeColumn(var pSearchColumn: ads_search_column): HResult; stdcall;
- function CloseSearchHandle(var hSearchResult: Pointer): HResult; stdcall;
- end;
-
-// *********************************************************************//
-// Interface: IDirectorySchemaMgmt
-// Flags: (0)
-// GUID: {75DB3B9C-A4D8-11D0-A79C-00C04FD8D5A8}
-// *********************************************************************//
- IDirectorySchemaMgmt = interface(IUnknown)
- ['{75DB3B9C-A4D8-11D0-A79C-00C04FD8D5A8}']
- function EnumAttributes(var ppszAttrNames: PWideChar; dwNumAttributes: LongWord;
- ppAttrDefinition: PPUserType1; var pdwNumAttributes: LongWord): HResult; stdcall;
- function CreateAttributeDefinition(pszAttributeName: PWideChar;
- var pAttributeDefinition: _ads_attr_def): HResult; stdcall;
- function WriteAttributeDefinition(pszAttributeName: PWideChar;
- var pAttributeDefinition: _ads_attr_def): HResult; stdcall;
- function DeleteAttributeDefinition(pszAttributeName: PWideChar): HResult; stdcall;
- function EnumClasses(var ppszClassNames: PWideChar; dwNumClasses: LongWord;
- ppClassDefinition: PPUserType2; var pdwNumClasses: LongWord): HResult; stdcall;
- function WriteClassDefinition(pszClassName: PWideChar; var pClassDefinition: _ads_class_def): HResult; stdcall;
- function CreateClassDefinition(pszClassName: PWideChar; var pClassDefinition: _ads_class_def): HResult; stdcall;
- function DeleteClassDefinition(pszClassName: PWideChar): HResult; stdcall;
- end;
-
-// *********************************************************************//
-// Interface: IADsAggregatee
-// Flags: (0)
-// GUID: {1346CE8C-9039-11D0-8528-00C04FD8D503}
-// *********************************************************************//
- IADsAggregatee = interface(IUnknown)
- ['{1346CE8C-9039-11D0-8528-00C04FD8D503}']
- function ConnectAsAggregatee(const pOuterUnknown: IUnknown): HResult; stdcall;
- function DisconnectAsAggregatee: HResult; stdcall;
- function RelinquishInterface(var riid: TGUID): HResult; stdcall;
- function RestoreInterface(var riid: TGUID): HResult; stdcall;
- end;
-
-// *********************************************************************//
-// Interface: IADsAggregator
-// Flags: (0)
-// GUID: {52DB5FB0-941F-11D0-8529-00C04FD8D503}
-// *********************************************************************//
- IADsAggregator = interface(IUnknown)
- ['{52DB5FB0-941F-11D0-8529-00C04FD8D503}']
- function ConnectAsAggregator(const pAggregatee: IUnknown): HResult; stdcall;
- function DisconnectAsAggregator: HResult; stdcall;
- end;
-
-// *********************************************************************//
-// Interface: IADsAccessControlEntry
-// Flags: (4416) Dual OleAutomation Dispatchable
-// GUID: {B4F3A14C-9BDD-11D0-852C-00C04FD8D503}
-// *********************************************************************//
- IADsAccessControlEntry = interface(IDispatch)
- ['{B4F3A14C-9BDD-11D0-852C-00C04FD8D503}']
- function Get_AccessMask: Integer; safecall;
- procedure Set_AccessMask(retval: Integer); safecall;
- function Get_AceType: Integer; safecall;
- procedure Set_AceType(retval: Integer); safecall;
- function Get_AceFlags: Integer; safecall;
- procedure Set_AceFlags(retval: Integer); safecall;
- function Get_Flags: Integer; safecall;
- procedure Set_Flags(retval: Integer); safecall;
- function Get_ObjectType: WideString; safecall;
- procedure Set_ObjectType(const retval: WideString); safecall;
- function Get_InheritedObjectType: WideString; safecall;
- procedure Set_InheritedObjectType(const retval: WideString); safecall;
- function Get_Trustee: WideString; safecall;
- procedure Set_Trustee(const retval: WideString); safecall;
- property AccessMask: Integer read Get_AccessMask write Set_AccessMask;
- property AceType: Integer read Get_AceType write Set_AceType;
- property AceFlags: Integer read Get_AceFlags write Set_AceFlags;
- property Flags: Integer read Get_Flags write Set_Flags;
- property ObjectType: WideString read Get_ObjectType write Set_ObjectType;
- property InheritedObjectType: WideString read Get_InheritedObjectType write Set_InheritedObjectType;
- property Trustee: WideString read Get_Trustee write Set_Trustee;
- end;
-
-// *********************************************************************//
-// DispIntf: IADsAccessControlEntryDisp
-// Flags: (4416) Dual OleAutomation Dispatchable
-// GUID: {B4F3A14C-9BDD-11D0-852C-00C04FD8D503}
-// *********************************************************************//
- {$ifdef SUPPORTS_DISPINTERFACE}
- IADsAccessControlEntryDisp = dispinterface
- ['{B4F3A14C-9BDD-11D0-852C-00C04FD8D503}']
- property AccessMask: Integer dispid 2;
- property AceType: Integer dispid 3;
- property AceFlags: Integer dispid 4;
- property Flags: Integer dispid 5;
- property ObjectType: WideString dispid 6;
- property InheritedObjectType: WideString dispid 7;
- property Trustee: WideString dispid 8;
- end;
- {$endif}
-// *********************************************************************//
-// Interface: IADsAccessControlList
-// Flags: (4416) Dual OleAutomation Dispatchable
-// GUID: {B7EE91CC-9BDD-11D0-852C-00C04FD8D503}
-// *********************************************************************//
- IADsAccessControlList = interface(IDispatch)
- ['{B7EE91CC-9BDD-11D0-852C-00C04FD8D503}']
- function Get_AclRevision: Integer; safecall;
- procedure Set_AclRevision(retval: Integer); safecall;
- function Get_AceCount: Integer; safecall;
- procedure Set_AceCount(retval: Integer); safecall;
- procedure AddAce(const pAccessControlEntry: IDispatch); safecall;
- procedure RemoveAce(const pAccessControlEntry: IDispatch); safecall;
- function CopyAccessList: IDispatch; safecall;
- function Get__NewEnum: IUnknown; safecall;
- property AclRevision: Integer read Get_AclRevision write Set_AclRevision;
- property AceCount: Integer read Get_AceCount write Set_AceCount;
- property _NewEnum: IUnknown read Get__NewEnum;
- end;
-
-// *********************************************************************//
-// DispIntf: IADsAccessControlListDisp
-// Flags: (4416) Dual OleAutomation Dispatchable
-// GUID: {B7EE91CC-9BDD-11D0-852C-00C04FD8D503}
-// *********************************************************************//
- {$ifdef SUPPORTS_DISPINTERFACE}
- IADsAccessControlListDisp = dispinterface
- ['{B7EE91CC-9BDD-11D0-852C-00C04FD8D503}']
- property AclRevision: Integer dispid 3;
- property AceCount: Integer dispid 4;
- procedure AddAce(const pAccessControlEntry: IDispatch); dispid 5;
- procedure RemoveAce(const pAccessControlEntry: IDispatch); dispid 6;
- function CopyAccessList: IDispatch; dispid 7;
- property _NewEnum: IUnknown readonly dispid -4;
- end;
- {$endif}
-// *********************************************************************//
-// Interface: IADsSecurityDescriptor
-// Flags: (4416) Dual OleAutomation Dispatchable
-// GUID: {B8C787CA-9BDD-11D0-852C-00C04FD8D503}
-// *********************************************************************//
- IADsSecurityDescriptor = interface(IDispatch)
- ['{B8C787CA-9BDD-11D0-852C-00C04FD8D503}']
- function Get_Revision: Integer; safecall;
- procedure Set_Revision(retval: Integer); safecall;
- function Get_Control: Integer; safecall;
- procedure Set_Control(retval: Integer); safecall;
- function Get_Owner: WideString; safecall;
- procedure Set_Owner(const retval: WideString); safecall;
- function Get_OwnerDefaulted: WordBool; safecall;
- procedure Set_OwnerDefaulted(retval: WordBool); safecall;
- function Get_Group: WideString; safecall;
- procedure Set_Group(const retval: WideString); safecall;
- function Get_GroupDefaulted: WordBool; safecall;
- procedure Set_GroupDefaulted(retval: WordBool); safecall;
- function Get_DiscretionaryAcl: IDispatch; safecall;
- procedure Set_DiscretionaryAcl(const retval: IDispatch); safecall;
- function Get_DaclDefaulted: WordBool; safecall;
- procedure Set_DaclDefaulted(retval: WordBool); safecall;
- function Get_SystemAcl: IDispatch; safecall;
- procedure Set_SystemAcl(const retval: IDispatch); safecall;
- function Get_SaclDefaulted: WordBool; safecall;
- procedure Set_SaclDefaulted(retval: WordBool); safecall;
- function CopySecurityDescriptor: IDispatch; safecall;
- property Revision: Integer read Get_Revision write Set_Revision;
- property Control: Integer read Get_Control write Set_Control;
- property Owner: WideString read Get_Owner write Set_Owner;
- property OwnerDefaulted: WordBool read Get_OwnerDefaulted write Set_OwnerDefaulted;
- property Group: WideString read Get_Group write Set_Group;
- property GroupDefaulted: WordBool read Get_GroupDefaulted write Set_GroupDefaulted;
- property DiscretionaryAcl: IDispatch read Get_DiscretionaryAcl write Set_DiscretionaryAcl;
- property DaclDefaulted: WordBool read Get_DaclDefaulted write Set_DaclDefaulted;
- property SystemAcl: IDispatch read Get_SystemAcl write Set_SystemAcl;
- property SaclDefaulted: WordBool read Get_SaclDefaulted write Set_SaclDefaulted;
- end;
-
-// *********************************************************************//
-// DispIntf: IADsSecurityDescriptorDisp
-// Flags: (4416) Dual OleAutomation Dispatchable
-// GUID: {B8C787CA-9BDD-11D0-852C-00C04FD8D503}
-// *********************************************************************//
- {$ifdef SUPPORTS_DISPINTERFACE}
- IADsSecurityDescriptorDisp = dispinterface
- ['{B8C787CA-9BDD-11D0-852C-00C04FD8D503}']
- property Revision: Integer dispid 2;
- property Control: Integer dispid 3;
- property Owner: WideString dispid 4;
- property OwnerDefaulted: WordBool dispid 5;
- property Group: WideString dispid 6;
- property GroupDefaulted: WordBool dispid 7;
- property DiscretionaryAcl: IDispatch dispid 8;
- property DaclDefaulted: WordBool dispid 9;
- property SystemAcl: IDispatch dispid 10;
- property SaclDefaulted: WordBool dispid 11;
- function CopySecurityDescriptor: IDispatch; dispid 12;
- end;
- {$endif}
-// *********************************************************************//
-// Interface: IADsLargeInteger
-// Flags: (4416) Dual OleAutomation Dispatchable
-// GUID: {9068270B-0939-11D1-8BE1-00C04FD8D503}
-// *********************************************************************//
- IADsLargeInteger = interface(IDispatch)
- ['{9068270B-0939-11D1-8BE1-00C04FD8D503}']
- function Get_HighPart: Integer; safecall;
- procedure Set_HighPart(retval: Integer); safecall;
- function Get_LowPart: Integer; safecall;
- procedure Set_LowPart(retval: Integer); safecall;
- property HighPart: Integer read Get_HighPart write Set_HighPart;
- property LowPart: Integer read Get_LowPart write Set_LowPart;
- end;
-
-// *********************************************************************//
-// DispIntf: IADsLargeIntegerDisp
-// Flags: (4416) Dual OleAutomation Dispatchable
-// GUID: {9068270B-0939-11D1-8BE1-00C04FD8D503}
-// *********************************************************************//
- {$ifdef SUPPORTS_DISPINTERFACE}
- IADsLargeIntegerDisp = dispinterface
- ['{9068270B-0939-11D1-8BE1-00C04FD8D503}']
- property HighPart: Integer dispid 2;
- property LowPart: Integer dispid 3;
- end;
- {$endif}
-// *********************************************************************//
-// Interface: IADsNameTranslate
-// Flags: (4416) Dual OleAutomation Dispatchable
-// GUID: {B1B272A3-3625-11D1-A3A4-00C04FB950DC}
-// *********************************************************************//
- IADsNameTranslate = interface(IDispatch)
- ['{B1B272A3-3625-11D1-A3A4-00C04FB950DC}']
- procedure Set_ChaseReferral(Param1: Integer); safecall;
- procedure Init(lnSetType: Integer; const bstrADsPath: WideString); safecall;
- procedure InitEx(lnSetType: Integer; const bstrADsPath: WideString;
- const bstrUserID: WideString; const bstrDomain: WideString;
- const bstrPassword: WideString); safecall;
- procedure Set_(lnSetType: Integer; const bstrADsPath: WideString); safecall;
- function Get(lnFormatType: Integer): WideString; safecall;
- procedure SetEx(lnFormatType: Integer; pVar: OleVariant); safecall;
- function GetEx(lnFormatType: Integer): OleVariant; safecall;
- property ChaseReferral: Integer write Set_ChaseReferral;
- end;
-
-// *********************************************************************//
-// DispIntf: IADsNameTranslateDisp
-// Flags: (4416) Dual OleAutomation Dispatchable
-// GUID: {B1B272A3-3625-11D1-A3A4-00C04FB950DC}
-// *********************************************************************//
- {$ifdef SUPPORTS_DISPINTERFACE}
- IADsNameTranslateDisp = dispinterface
- ['{B1B272A3-3625-11D1-A3A4-00C04FB950DC}']
- property ChaseReferral: Integer writeonly dispid 1;
- procedure Init(lnSetType: Integer; const bstrADsPath: WideString); dispid 2;
- procedure InitEx(lnSetType: Integer; const bstrADsPath: WideString;
- const bstrUserID: WideString; const bstrDomain: WideString;
- const bstrPassword: WideString); dispid 3;
- procedure Set_(lnSetType: Integer; const bstrADsPath: WideString); dispid 4;
- function Get(lnFormatType: Integer): WideString; dispid 5;
- procedure SetEx(lnFormatType: Integer; pVar: OleVariant); dispid 6;
- function GetEx(lnFormatType: Integer): OleVariant; dispid 7;
- end;
- {$endif}
-// *********************************************************************//
-// Interface: IADsCaseIgnoreList
-// Flags: (4416) Dual OleAutomation Dispatchable
-// GUID: {7B66B533-4680-11D1-A3B4-00C04FB950DC}
-// *********************************************************************//
- IADsCaseIgnoreList = interface(IDispatch)
- ['{7B66B533-4680-11D1-A3B4-00C04FB950DC}']
- function Get_CaseIgnoreList: OleVariant; safecall;
- procedure Set_CaseIgnoreList(retval: OleVariant); safecall;
- property CaseIgnoreList: OleVariant read Get_CaseIgnoreList write Set_CaseIgnoreList;
- end;
-
-// *********************************************************************//
-// DispIntf: IADsCaseIgnoreListDisp
-// Flags: (4416) Dual OleAutomation Dispatchable
-// GUID: {7B66B533-4680-11D1-A3B4-00C04FB950DC}
-// *********************************************************************//
- {$ifdef SUPPORTS_DISPINTERFACE}
- IADsCaseIgnoreListDisp = dispinterface
- ['{7B66B533-4680-11D1-A3B4-00C04FB950DC}']
- property CaseIgnoreList: OleVariant dispid 2;
- end;
- {$endif}
-// *********************************************************************//
-// Interface: IADsFaxNumber
-// Flags: (4416) Dual OleAutomation Dispatchable
-// GUID: {A910DEA9-4680-11D1-A3B4-00C04FB950DC}
-// *********************************************************************//
- IADsFaxNumber = interface(IDispatch)
- ['{A910DEA9-4680-11D1-A3B4-00C04FB950DC}']
- function Get_TelephoneNumber: WideString; safecall;
- procedure Set_TelephoneNumber(const retval: WideString); safecall;
- function Get_Parameters: OleVariant; safecall;
- procedure Set_Parameters(retval: OleVariant); safecall;
- property TelephoneNumber: WideString read Get_TelephoneNumber write Set_TelephoneNumber;
- property Parameters: OleVariant read Get_Parameters write Set_Parameters;
- end;
-
-// *********************************************************************//
-// DispIntf: IADsFaxNumberDisp
-// Flags: (4416) Dual OleAutomation Dispatchable
-// GUID: {A910DEA9-4680-11D1-A3B4-00C04FB950DC}
-// *********************************************************************//
- {$ifdef SUPPORTS_DISPINTERFACE}
- IADsFaxNumberDisp = dispinterface
- ['{A910DEA9-4680-11D1-A3B4-00C04FB950DC}']
- property TelephoneNumber: WideString dispid 2;
- property Parameters: OleVariant dispid 3;
- end;
- {$endif}
-// *********************************************************************//
-// Interface: IADsNetAddress
-// Flags: (4416) Dual OleAutomation Dispatchable
-// GUID: {B21A50A9-4080-11D1-A3AC-00C04FB950DC}
-// *********************************************************************//
- IADsNetAddress = interface(IDispatch)
- ['{B21A50A9-4080-11D1-A3AC-00C04FB950DC}']
- function Get_AddressType: Integer; safecall;
- procedure Set_AddressType(retval: Integer); safecall;
- function Get_Address: OleVariant; safecall;
- procedure Set_Address(retval: OleVariant); safecall;
- property AddressType: Integer read Get_AddressType write Set_AddressType;
- property Address: OleVariant read Get_Address write Set_Address;
- end;
-
-// *********************************************************************//
-// DispIntf: IADsNetAddressDisp
-// Flags: (4416) Dual OleAutomation Dispatchable
-// GUID: {B21A50A9-4080-11D1-A3AC-00C04FB950DC}
-// *********************************************************************//
- {$ifdef SUPPORTS_DISPINTERFACE}
- IADsNetAddressDisp = dispinterface
- ['{B21A50A9-4080-11D1-A3AC-00C04FB950DC}']
- property AddressType: Integer dispid 2;
- property Address: OleVariant dispid 3;
- end;
- {$endif}
-// *********************************************************************//
-// Interface: IADsOctetList
-// Flags: (4416) Dual OleAutomation Dispatchable
-// GUID: {7B28B80F-4680-11D1-A3B4-00C04FB950DC}
-// *********************************************************************//
- IADsOctetList = interface(IDispatch)
- ['{7B28B80F-4680-11D1-A3B4-00C04FB950DC}']
- function Get_OctetList: OleVariant; safecall;
- procedure Set_OctetList(retval: OleVariant); safecall;
- property OctetList: OleVariant read Get_OctetList write Set_OctetList;
- end;
-
-// *********************************************************************//
-// DispIntf: IADsOctetListDisp
-// Flags: (4416) Dual OleAutomation Dispatchable
-// GUID: {7B28B80F-4680-11D1-A3B4-00C04FB950DC}
-// *********************************************************************//
- {$ifdef SUPPORTS_DISPINTERFACE}
- IADsOctetListDisp = dispinterface
- ['{7B28B80F-4680-11D1-A3B4-00C04FB950DC}']
- property OctetList: OleVariant dispid 2;
- end;
- {$endif}
-// *********************************************************************//
-// Interface: IADsEmail
-// Flags: (4416) Dual OleAutomation Dispatchable
-// GUID: {97AF011A-478E-11D1-A3B4-00C04FB950DC}
-// *********************************************************************//
- IADsEmail = interface(IDispatch)
- ['{97AF011A-478E-11D1-A3B4-00C04FB950DC}']
- function Get_Type_: Integer; safecall;
- procedure Set_Type_(retval: Integer); safecall;
- function Get_Address: WideString; safecall;
- procedure Set_Address(const retval: WideString); safecall;
- property Type_: Integer read Get_Type_ write Set_Type_;
- property Address: WideString read Get_Address write Set_Address;
- end;
-
-// *********************************************************************//
-// DispIntf: IADsEmailDisp
-// Flags: (4416) Dual OleAutomation Dispatchable
-// GUID: {97AF011A-478E-11D1-A3B4-00C04FB950DC}
-// *********************************************************************//
- {$ifdef SUPPORTS_DISPINTERFACE}
- IADsEmailDisp = dispinterface
- ['{97AF011A-478E-11D1-A3B4-00C04FB950DC}']
- property Type_: Integer dispid 2;
- property Address: WideString dispid 3;
- end;
- {$endif}
-// *********************************************************************//
-// Interface: IADsPath
-// Flags: (4416) Dual OleAutomation Dispatchable
-// GUID: {B287FCD5-4080-11D1-A3AC-00C04FB950DC}
-// *********************************************************************//
- IADsPath = interface(IDispatch)
- ['{B287FCD5-4080-11D1-A3AC-00C04FB950DC}']
- function Get_Type_: Integer; safecall;
- procedure Set_Type_(retval: Integer); safecall;
- function Get_VolumeName: WideString; safecall;
- procedure Set_VolumeName(const retval: WideString); safecall;
- function Get_Path: WideString; safecall;
- procedure Set_Path(const retval: WideString); safecall;
- property Type_: Integer read Get_Type_ write Set_Type_;
- property VolumeName: WideString read Get_VolumeName write Set_VolumeName;
- property Path: WideString read Get_Path write Set_Path;
- end;
-
-// *********************************************************************//
-// DispIntf: IADsPathDisp
-// Flags: (4416) Dual OleAutomation Dispatchable
-// GUID: {B287FCD5-4080-11D1-A3AC-00C04FB950DC}
-// *********************************************************************//
- {$ifdef SUPPORTS_DISPINTERFACE}
- IADsPathDisp = dispinterface
- ['{B287FCD5-4080-11D1-A3AC-00C04FB950DC}']
- property Type_: Integer dispid 2;
- property VolumeName: WideString dispid 3;
- property Path: WideString dispid 4;
- end;
- {$endif}
-// *********************************************************************//
-// Interface: IADsReplicaPointer
-// Flags: (4416) Dual OleAutomation Dispatchable
-// GUID: {F60FB803-4080-11D1-A3AC-00C04FB950DC}
-// *********************************************************************//
- IADsReplicaPointer = interface(IDispatch)
- ['{F60FB803-4080-11D1-A3AC-00C04FB950DC}']
- function Get_ServerName: WideString; safecall;
- procedure Set_ServerName(const retval: WideString); safecall;
- function Get_ReplicaType: Integer; safecall;
- procedure Set_ReplicaType(retval: Integer); safecall;
- function Get_ReplicaNumber: Integer; safecall;
- procedure Set_ReplicaNumber(retval: Integer); safecall;
- function Get_Count: Integer; safecall;
- procedure Set_Count(retval: Integer); safecall;
- function Get_ReplicaAddressHints: OleVariant; safecall;
- procedure Set_ReplicaAddressHints(retval: OleVariant); safecall;
- property ServerName: WideString read Get_ServerName write Set_ServerName;
- property ReplicaType: Integer read Get_ReplicaType write Set_ReplicaType;
- property ReplicaNumber: Integer read Get_ReplicaNumber write Set_ReplicaNumber;
- property Count: Integer read Get_Count write Set_Count;
- property ReplicaAddressHints: OleVariant read Get_ReplicaAddressHints write Set_ReplicaAddressHints;
- end;
-
-// *********************************************************************//
-// DispIntf: IADsReplicaPointerDisp
-// Flags: (4416) Dual OleAutomation Dispatchable
-// GUID: {F60FB803-4080-11D1-A3AC-00C04FB950DC}
-// *********************************************************************//
- {$ifdef SUPPORTS_DISPINTERFACE}
- IADsReplicaPointerDisp = dispinterface
- ['{F60FB803-4080-11D1-A3AC-00C04FB950DC}']
- property ServerName: WideString dispid 2;
- property ReplicaType: Integer dispid 3;
- property ReplicaNumber: Integer dispid 4;
- property Count: Integer dispid 5;
- property ReplicaAddressHints: OleVariant dispid 6;
- end;
- {$endif}
-// *********************************************************************//
-// Interface: IADsAcl
-// Flags: (4416) Dual OleAutomation Dispatchable
-// GUID: {8452D3AB-0869-11D1-A377-00C04FB950DC}
-// *********************************************************************//
- IADsAcl = interface(IDispatch)
- ['{8452D3AB-0869-11D1-A377-00C04FB950DC}']
- function Get_ProtectedAttrName: WideString; safecall;
- procedure Set_ProtectedAttrName(const retval: WideString); safecall;
- function Get_SubjectName: WideString; safecall;
- procedure Set_SubjectName(const retval: WideString); safecall;
- function Get_Privileges: Integer; safecall;
- procedure Set_Privileges(retval: Integer); safecall;
- function CopyAcl: IDispatch; safecall;
- property ProtectedAttrName: WideString read Get_ProtectedAttrName write Set_ProtectedAttrName;
- property SubjectName: WideString read Get_SubjectName write Set_SubjectName;
- property Privileges: Integer read Get_Privileges write Set_Privileges;
- end;
-
-// *********************************************************************//
-// DispIntf: IADsAclDisp
-// Flags: (4416) Dual OleAutomation Dispatchable
-// GUID: {8452D3AB-0869-11D1-A377-00C04FB950DC}
-// *********************************************************************//
- {$ifdef SUPPORTS_DISPINTERFACE}
- IADsAclDisp = dispinterface
- ['{8452D3AB-0869-11D1-A377-00C04FB950DC}']
- property ProtectedAttrName: WideString dispid 2;
- property SubjectName: WideString dispid 3;
- property Privileges: Integer dispid 4;
- function CopyAcl: IDispatch; dispid 5;
- end;
- {$endif}
-// *********************************************************************//
-// Interface: IADsTimestamp
-// Flags: (4416) Dual OleAutomation Dispatchable
-// GUID: {B2F5A901-4080-11D1-A3AC-00C04FB950DC}
-// *********************************************************************//
- IADsTimestamp = interface(IDispatch)
- ['{B2F5A901-4080-11D1-A3AC-00C04FB950DC}']
- function Get_WholeSeconds: Integer; safecall;
- procedure Set_WholeSeconds(retval: Integer); safecall;
- function Get_EventID: Integer; safecall;
- procedure Set_EventID(retval: Integer); safecall;
- property WholeSeconds: Integer read Get_WholeSeconds write Set_WholeSeconds;
- property EventID: Integer read Get_EventID write Set_EventID;
- end;
-
-// *********************************************************************//
-// DispIntf: IADsTimestampDisp
-// Flags: (4416) Dual OleAutomation Dispatchable
-// GUID: {B2F5A901-4080-11D1-A3AC-00C04FB950DC}
-// *********************************************************************//
- {$ifdef SUPPORTS_DISPINTERFACE}
- IADsTimestampDisp = dispinterface
- ['{B2F5A901-4080-11D1-A3AC-00C04FB950DC}']
- property WholeSeconds: Integer dispid 2;
- property EventID: Integer dispid 3;
- end;
- {$endif}
-// *********************************************************************//
-// Interface: IADsPostalAddress
-// Flags: (4416) Dual OleAutomation Dispatchable
-// GUID: {7ADECF29-4680-11D1-A3B4-00C04FB950DC}
-// *********************************************************************//
- IADsPostalAddress = interface(IDispatch)
- ['{7ADECF29-4680-11D1-A3B4-00C04FB950DC}']
- function Get_PostalAddress: OleVariant; safecall;
- procedure Set_PostalAddress(retval: OleVariant); safecall;
- property PostalAddress: OleVariant read Get_PostalAddress write Set_PostalAddress;
- end;
-
-// *********************************************************************//
-// DispIntf: IADsPostalAddressDisp
-// Flags: (4416) Dual OleAutomation Dispatchable
-// GUID: {7ADECF29-4680-11D1-A3B4-00C04FB950DC}
-// *********************************************************************//
- {$ifdef SUPPORTS_DISPINTERFACE}
- IADsPostalAddressDisp = dispinterface
- ['{7ADECF29-4680-11D1-A3B4-00C04FB950DC}']
- property PostalAddress: OleVariant dispid 2;
- end;
- {$endif}
-// *********************************************************************//
-// Interface: IADsBackLink
-// Flags: (4416) Dual OleAutomation Dispatchable
-// GUID: {FD1302BD-4080-11D1-A3AC-00C04FB950DC}
-// *********************************************************************//
- IADsBackLink = interface(IDispatch)
- ['{FD1302BD-4080-11D1-A3AC-00C04FB950DC}']
- function Get_RemoteID: Integer; safecall;
- procedure Set_RemoteID(retval: Integer); safecall;
- function Get_ObjectName: WideString; safecall;
- procedure Set_ObjectName(const retval: WideString); safecall;
- property RemoteID: Integer read Get_RemoteID write Set_RemoteID;
- property ObjectName: WideString read Get_ObjectName write Set_ObjectName;
- end;
-
-// *********************************************************************//
-// DispIntf: IADsBackLinkDisp
-// Flags: (4416) Dual OleAutomation Dispatchable
-// GUID: {FD1302BD-4080-11D1-A3AC-00C04FB950DC}
-// *********************************************************************//
- {$ifdef SUPPORTS_DISPINTERFACE}
- IADsBackLinkDisp = dispinterface
- ['{FD1302BD-4080-11D1-A3AC-00C04FB950DC}']
- property RemoteID: Integer dispid 2;
- property ObjectName: WideString dispid 3;
- end;
- {$endif}
-// *********************************************************************//
-// Interface: IADsTypedName
-// Flags: (4416) Dual OleAutomation Dispatchable
-// GUID: {B371A349-4080-11D1-A3AC-00C04FB950DC}
-// *********************************************************************//
- IADsTypedName = interface(IDispatch)
- ['{B371A349-4080-11D1-A3AC-00C04FB950DC}']
- function Get_ObjectName: WideString; safecall;
- procedure Set_ObjectName(const retval: WideString); safecall;
- function Get_Level: Integer; safecall;
- procedure Set_Level(retval: Integer); safecall;
- function Get_Interval: Integer; safecall;
- procedure Set_Interval(retval: Integer); safecall;
- property ObjectName: WideString read Get_ObjectName write Set_ObjectName;
- property Level: Integer read Get_Level write Set_Level;
- property Interval: Integer read Get_Interval write Set_Interval;
- end;
-
-// *********************************************************************//
-// DispIntf: IADsTypedNameDisp
-// Flags: (4416) Dual OleAutomation Dispatchable
-// GUID: {B371A349-4080-11D1-A3AC-00C04FB950DC}
-// *********************************************************************//
- {$ifdef SUPPORTS_DISPINTERFACE}
- IADsTypedNameDisp = dispinterface
- ['{B371A349-4080-11D1-A3AC-00C04FB950DC}']
- property ObjectName: WideString dispid 2;
- property Level: Integer dispid 3;
- property Interval: Integer dispid 4;
- end;
- {$endif}
-// *********************************************************************//
-// Interface: IADsHold
-// Flags: (4416) Dual OleAutomation Dispatchable
-// GUID: {B3EB3B37-4080-11D1-A3AC-00C04FB950DC}
-// *********************************************************************//
- IADsHold = interface(IDispatch)
- ['{B3EB3B37-4080-11D1-A3AC-00C04FB950DC}']
- function Get_ObjectName: WideString; safecall;
- procedure Set_ObjectName(const retval: WideString); safecall;
- function Get_Amount: Integer; safecall;
- procedure Set_Amount(retval: Integer); safecall;
- property ObjectName: WideString read Get_ObjectName write Set_ObjectName;
- property Amount: Integer read Get_Amount write Set_Amount;
- end;
-
-// *********************************************************************//
-// DispIntf: IADsHoldDisp
-// Flags: (4416) Dual OleAutomation Dispatchable
-// GUID: {B3EB3B37-4080-11D1-A3AC-00C04FB950DC}
-// *********************************************************************//
- {$ifdef SUPPORTS_DISPINTERFACE}
- IADsHoldDisp = dispinterface
- ['{B3EB3B37-4080-11D1-A3AC-00C04FB950DC}']
- property ObjectName: WideString dispid 2;
- property Amount: Integer dispid 3;
- end;
- {$endif}
-// *********************************************************************//
-// Interface: IADsObjectOptions
-// Flags: (4416) Dual OleAutomation Dispatchable
-// GUID: {46F14FDA-232B-11D1-A808-00C04FD8D5A8}
-// *********************************************************************//
- IADsObjectOptions = interface(IDispatch)
- ['{46F14FDA-232B-11D1-A808-00C04FD8D5A8}']
- function GetOption(lnOption: Integer): OleVariant; safecall;
- procedure SetOption(lnOption: Integer; vValue: OleVariant); safecall;
- end;
-
-// *********************************************************************//
-// DispIntf: IADsObjectOptionsDisp
-// Flags: (4416) Dual OleAutomation Dispatchable
-// GUID: {46F14FDA-232B-11D1-A808-00C04FD8D5A8}
-// *********************************************************************//
- {$ifdef SUPPORTS_DISPINTERFACE}
- IADsObjectOptionsDisp = dispinterface
- ['{46F14FDA-232B-11D1-A808-00C04FD8D5A8}']
- function GetOption(lnOption: Integer): OleVariant; dispid 2;
- procedure SetOption(lnOption: Integer; vValue: OleVariant); dispid 3;
- end;
- {$endif}
-// *********************************************************************//
-// Interface: IADsPathname
-// Flags: (4416) Dual OleAutomation Dispatchable
-// GUID: {D592AED4-F420-11D0-A36E-00C04FB950DC}
-// *********************************************************************//
- IADsPathname = interface(IDispatch)
- ['{D592AED4-F420-11D0-A36E-00C04FB950DC}']
- procedure Set_(const bstrADsPath: WideString; lnSetType: Integer); safecall;
- procedure SetDisplayType(lnDisplayType: Integer); safecall;
- function Retrieve(lnFormatType: Integer): WideString; safecall;
- function GetNumElements: Integer; safecall;
- function GetElement(lnElementIndex: Integer): WideString; safecall;
- procedure AddLeafElement(const bstrLeafElement: WideString); safecall;
- procedure RemoveLeafElement; safecall;
- function CopyPath: IDispatch; safecall;
- function GetEscapedElement(lnReserved: Integer; const bstrInStr: WideString): WideString; safecall;
- function Get_EscapedMode: Integer; safecall;
- procedure Set_EscapedMode(retval: Integer); safecall;
- property EscapedMode: Integer read Get_EscapedMode write Set_EscapedMode;
- end;
-
-// *********************************************************************//
-// DispIntf: IADsPathnameDisp
-// Flags: (4416) Dual OleAutomation Dispatchable
-// GUID: {D592AED4-F420-11D0-A36E-00C04FB950DC}
-// *********************************************************************//
- {$ifdef SUPPORTS_DISPINTERFACE}
- IADsPathnameDisp = dispinterface
- ['{D592AED4-F420-11D0-A36E-00C04FB950DC}']
- procedure Set_(const bstrADsPath: WideString; lnSetType: Integer); dispid 2;
- procedure SetDisplayType(lnDisplayType: Integer); dispid 3;
- function Retrieve(lnFormatType: Integer): WideString; dispid 4;
- function GetNumElements: Integer; dispid 5;
- function GetElement(lnElementIndex: Integer): WideString; dispid 6;
- procedure AddLeafElement(const bstrLeafElement: WideString); dispid 7;
- procedure RemoveLeafElement; dispid 8;
- function CopyPath: IDispatch; dispid 9;
- function GetEscapedElement(lnReserved: Integer; const bstrInStr: WideString): WideString; dispid 10;
- property EscapedMode: Integer dispid 11;
- end;
- {$endif}
-// *********************************************************************//
-// Interface: IADsADSystemInfo
-// Flags: (4416) Dual OleAutomation Dispatchable
-// GUID: {5BB11929-AFD1-11D2-9CB9-0000F87A369E}
-// *********************************************************************//
- IADsADSystemInfo = interface(IDispatch)
- ['{5BB11929-AFD1-11D2-9CB9-0000F87A369E}']
- function Get_UserName: WideString; safecall;
- function Get_ComputerName: WideString; safecall;
- function Get_SiteName: WideString; safecall;
- function Get_DomainShortName: WideString; safecall;
- function Get_DomainDNSName: WideString; safecall;
- function Get_ForestDNSName: WideString; safecall;
- function Get_PDCRoleOwner: WideString; safecall;
- function Get_SchemaRoleOwner: WideString; safecall;
- function Get_IsNativeMode: WordBool; safecall;
- function GetAnyDCName: WideString; safecall;
- function GetDCSiteName(const szServer: WideString): WideString; safecall;
- procedure RefreshSchemaCache; safecall;
- function GetTrees: OleVariant; safecall;
- property UserName: WideString read Get_UserName;
- property ComputerName: WideString read Get_ComputerName;
- property SiteName: WideString read Get_SiteName;
- property DomainShortName: WideString read Get_DomainShortName;
- property DomainDNSName: WideString read Get_DomainDNSName;
- property ForestDNSName: WideString read Get_ForestDNSName;
- property PDCRoleOwner: WideString read Get_PDCRoleOwner;
- property SchemaRoleOwner: WideString read Get_SchemaRoleOwner;
- property IsNativeMode: WordBool read Get_IsNativeMode;
- end;
-
-// *********************************************************************//
-// DispIntf: IADsADSystemInfoDisp
-// Flags: (4416) Dual OleAutomation Dispatchable
-// GUID: {5BB11929-AFD1-11D2-9CB9-0000F87A369E}
-// *********************************************************************//
- {$ifdef SUPPORTS_DISPINTERFACE}
- IADsADSystemInfoDisp = dispinterface
- ['{5BB11929-AFD1-11D2-9CB9-0000F87A369E}']
- property UserName: WideString readonly dispid 2;
- property ComputerName: WideString readonly dispid 3;
- property SiteName: WideString readonly dispid 4;
- property DomainShortName: WideString readonly dispid 5;
- property DomainDNSName: WideString readonly dispid 6;
- property ForestDNSName: WideString readonly dispid 7;
- property PDCRoleOwner: WideString readonly dispid 8;
- property SchemaRoleOwner: WideString readonly dispid 9;
- property IsNativeMode: WordBool readonly dispid 10;
- function GetAnyDCName: WideString; dispid 11;
- function GetDCSiteName(const szServer: WideString): WideString; dispid 12;
- procedure RefreshSchemaCache; dispid 13;
- function GetTrees: OleVariant; dispid 14;
- end;
- {$endif}
-// *********************************************************************//
-// Interface: IADsWinNTSystemInfo
-// Flags: (4416) Dual OleAutomation Dispatchable
-// GUID: {6C6D65DC-AFD1-11D2-9CB9-0000F87A369E}
-// *********************************************************************//
- IADsWinNTSystemInfo = interface(IDispatch)
- ['{6C6D65DC-AFD1-11D2-9CB9-0000F87A369E}']
- function Get_UserName: WideString; safecall;
- function Get_ComputerName: WideString; safecall;
- function Get_DomainName: WideString; safecall;
- function Get_PDC: WideString; safecall;
- property UserName: WideString read Get_UserName;
- property ComputerName: WideString read Get_ComputerName;
- property DomainName: WideString read Get_DomainName;
- property PDC: WideString read Get_PDC;
- end;
-
-// *********************************************************************//
-// DispIntf: IADsWinNTSystemInfoDisp
-// Flags: (4416) Dual OleAutomation Dispatchable
-// GUID: {6C6D65DC-AFD1-11D2-9CB9-0000F87A369E}
-// *********************************************************************//
- {$ifdef SUPPORTS_DISPINTERFACE}
- IADsWinNTSystemInfoDisp = dispinterface
- ['{6C6D65DC-AFD1-11D2-9CB9-0000F87A369E}']
- property UserName: WideString readonly dispid 2;
- property ComputerName: WideString readonly dispid 3;
- property DomainName: WideString readonly dispid 4;
- property PDC: WideString readonly dispid 5;
- end;
- {$endif}
-// *********************************************************************//
-// Interface: IADsDNWithBinary
-// Flags: (4416) Dual OleAutomation Dispatchable
-// GUID: {7E99C0A2-F935-11D2-BA96-00C04FB6D0D1}
-// *********************************************************************//
- IADsDNWithBinary = interface(IDispatch)
- ['{7E99C0A2-F935-11D2-BA96-00C04FB6D0D1}']
- function Get_BinaryValue: OleVariant; safecall;
- procedure Set_BinaryValue(retval: OleVariant); safecall;
- function Get_DNString: WideString; safecall;
- procedure Set_DNString(const retval: WideString); safecall;
- property BinaryValue: OleVariant read Get_BinaryValue write Set_BinaryValue;
- property DNString: WideString read Get_DNString write Set_DNString;
- end;
-
-// *********************************************************************//
-// DispIntf: IADsDNWithBinaryDisp
-// Flags: (4416) Dual OleAutomation Dispatchable
-// GUID: {7E99C0A2-F935-11D2-BA96-00C04FB6D0D1}
-// *********************************************************************//
- {$ifdef SUPPORTS_DISPINTERFACE}
- IADsDNWithBinaryDisp = dispinterface
- ['{7E99C0A2-F935-11D2-BA96-00C04FB6D0D1}']
- property BinaryValue: OleVariant dispid 2;
- property DNString: WideString dispid 3;
- end;
- {$endif}
-
-// *********************************************************************//
-// Interface: IADsDNWithString
-// Flags: (4416) Dual OleAutomation Dispatchable
-// GUID: {370DF02E-F934-11D2-BA96-00C04FB6D0D1}
-// *********************************************************************//
- IADsDNWithString = interface(IDispatch)
- ['{370DF02E-F934-11D2-BA96-00C04FB6D0D1}']
- function Get_StringValue: WideString; safecall;
- procedure Set_StringValue(const retval: WideString); safecall;
- function Get_DNString: WideString; safecall;
- procedure Set_DNString(const retval: WideString); safecall;
- property StringValue: WideString read Get_StringValue write Set_StringValue;
- property DNString: WideString read Get_DNString write Set_DNString;
- end;
-
-// *********************************************************************//
-// DispIntf: IADsDNWithStringDisp
-// Flags: (4416) Dual OleAutomation Dispatchable
-// GUID: {370DF02E-F934-11D2-BA96-00C04FB6D0D1}
-// *********************************************************************//
- {$ifdef SUPPORTS_DISPINTERFACE}
- IADsDNWithStringDisp = dispinterface
- ['{370DF02E-F934-11D2-BA96-00C04FB6D0D1}']
- property StringValue: WideString dispid 2;
- property DNString: WideString dispid 3;
- end;
- {$endif}
-// *********************************************************************//
-// The Class CoPropertyEntry provides a Create and CreateRemote method to
-// create instances of the default interface IADsPropertyEntry exposed by
-// the CoClass PropertyEntry. The functions are intended to be used by
-// clients wishing to automate the CoClass objects exposed by the
-// server of this typelibrary.
-// *********************************************************************//
- CoPropertyEntry = class
- class function Create: IADsPropertyEntry;
- class function CreateRemote(const MachineName: string): IADsPropertyEntry;
- end;
-
-// *********************************************************************//
-// OLE Server Proxy class declaration
-// Server Object : TPropertyEntry
-// Help String :
-// Default Interface: IADsPropertyEntry
-// Def. Intf. DISP? : No
-// Event Interface:
-// TypeFlags : (2) CanCreate
-// *********************************************************************//
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
- TPropertyEntryProperties= class;
-{$ENDIF}
- TPropertyEntry = class(TOleServer)
- private
- FIntf: IADsPropertyEntry;
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
- FProps: TPropertyEntryProperties;
- function GetServerProperties: TPropertyEntryProperties;
-{$ENDIF}
- function GetDefaultInterface: IADsPropertyEntry;
- protected
- procedure InitServerData; override;
- function Get_Name: WideString;
- procedure Set_Name(const retval: WideString);
- function Get_ADsType: Integer;
- procedure Set_ADsType(retval: Integer);
- function Get_ControlCode: Integer;
- procedure Set_ControlCode(retval: Integer);
- function Get_Values: OleVariant;
- procedure Set_Values(retval: OleVariant);
- public
- constructor Create(AOwner: TComponent); override;
- destructor Destroy; override;
- procedure Connect; override;
- procedure ConnectTo(svrIntf: IADsPropertyEntry);
- procedure Disconnect; override;
- procedure Clear;
- property DefaultInterface: IADsPropertyEntry read GetDefaultInterface;
- property Values: OleVariant read Get_Values write Set_Values;
- property Name: WideString read Get_Name write Set_Name;
- property ADsType: Integer read Get_ADsType write Set_ADsType;
- property ControlCode: Integer read Get_ControlCode write Set_ControlCode;
- published
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
- property Server: TPropertyEntryProperties read GetServerProperties;
-{$ENDIF}
- end;
-
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
-// *********************************************************************//
-// OLE Server Properties Proxy Class
-// Server Object : TPropertyEntry
-// (This object is used by the IDE's Property Inspector to allow editing
-// of the properties of this server)
-// *********************************************************************//
- TPropertyEntryProperties = class(TPersistent)
- private
- FServer: TPropertyEntry;
- function GetDefaultInterface: IADsPropertyEntry;
- constructor Create(AServer: TPropertyEntry);
- protected
- function Get_Name: WideString;
- procedure Set_Name(const retval: WideString);
- function Get_ADsType: Integer;
- procedure Set_ADsType(retval: Integer);
- function Get_ControlCode: Integer;
- procedure Set_ControlCode(retval: Integer);
- function Get_Values: OleVariant;
- procedure Set_Values(retval: OleVariant);
- public
- property DefaultInterface: IADsPropertyEntry read GetDefaultInterface;
- published
- property Name: WideString read Get_Name write Set_Name;
- property ADsType: Integer read Get_ADsType write Set_ADsType;
- property ControlCode: Integer read Get_ControlCode write Set_ControlCode;
- end;
-{$ENDIF}
-
-// *********************************************************************//
-// The Class CoPropertyValue provides a Create and CreateRemote method to
-// create instances of the default interface IADsPropertyValue exposed by
-// the CoClass PropertyValue. The functions are intended to be used by
-// clients wishing to automate the CoClass objects exposed by the
-// server of this typelibrary.
-// *********************************************************************//
- CoPropertyValue = class
- class function Create: IADsPropertyValue;
- class function CreateRemote(const MachineName: string): IADsPropertyValue;
- end;
-
-// *********************************************************************//
-// OLE Server Proxy class declaration
-// Server Object : TPropertyValue
-// Help String :
-// Default Interface: IADsPropertyValue
-// Def. Intf. DISP? : No
-// Event Interface:
-// TypeFlags : (2) CanCreate
-// *********************************************************************//
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
- TPropertyValueProperties= class;
-{$ENDIF}
- TPropertyValue = class(TOleServer)
- private
- FIntf: IADsPropertyValue;
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
- FProps: TPropertyValueProperties;
- function GetServerProperties: TPropertyValueProperties;
-{$ENDIF}
- function GetDefaultInterface: IADsPropertyValue;
- protected
- procedure InitServerData; override;
- function Get_ADsType: Integer;
- procedure Set_ADsType(retval: Integer);
- function Get_DNString: WideString;
- procedure Set_DNString(const retval: WideString);
- function Get_CaseExactString: WideString;
- procedure Set_CaseExactString(const retval: WideString);
- function Get_CaseIgnoreString: WideString;
- procedure Set_CaseIgnoreString(const retval: WideString);
- function Get_PrintableString: WideString;
- procedure Set_PrintableString(const retval: WideString);
- function Get_NumericString: WideString;
- procedure Set_NumericString(const retval: WideString);
- function Get_Boolean: Integer;
- procedure Set_Boolean(retval: Integer);
- function Get_Integer: Integer;
- procedure Set_Integer(retval: Integer);
- function Get_OctetString: OleVariant;
- procedure Set_OctetString(retval: OleVariant);
- function Get_SecurityDescriptor: IDispatch;
- procedure Set_SecurityDescriptor(const retval: IDispatch);
- function Get_LargeInteger: IDispatch;
- procedure Set_LargeInteger(const retval: IDispatch);
- function Get_UTCTime: TDateTime;
- procedure Set_UTCTime(retval: TDateTime);
- public
- constructor Create(AOwner: TComponent); override;
- destructor Destroy; override;
- procedure Connect; override;
- procedure ConnectTo(svrIntf: IADsPropertyValue);
- procedure Disconnect; override;
- procedure Clear;
- property DefaultInterface: IADsPropertyValue read GetDefaultInterface;
- property OctetString: OleVariant read Get_OctetString write Set_OctetString;
- property SecurityDescriptor: IDispatch read Get_SecurityDescriptor write Set_SecurityDescriptor;
- property LargeInteger: IDispatch read Get_LargeInteger write Set_LargeInteger;
- property ADsType: Integer read Get_ADsType write Set_ADsType;
- property DNString: WideString read Get_DNString write Set_DNString;
- property CaseExactString: WideString read Get_CaseExactString write Set_CaseExactString;
- property CaseIgnoreString: WideString read Get_CaseIgnoreString write Set_CaseIgnoreString;
- property PrintableString: WideString read Get_PrintableString write Set_PrintableString;
- property NumericString: WideString read Get_NumericString write Set_NumericString;
- property Boolean: Integer read Get_Boolean write Set_Boolean;
- property Integer: Integer read Get_Integer write Set_Integer;
- property UTCTime: TDateTime read Get_UTCTime write Set_UTCTime;
- published
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
- property Server: TPropertyValueProperties read GetServerProperties;
-{$ENDIF}
- end;
-
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
-// *********************************************************************//
-// OLE Server Properties Proxy Class
-// Server Object : TPropertyValue
-// (This object is used by the IDE's Property Inspector to allow editing
-// of the properties of this server)
-// *********************************************************************//
- TPropertyValueProperties = class(TPersistent)
- private
- FServer: TPropertyValue;
- function GetDefaultInterface: IADsPropertyValue;
- constructor Create(AServer: TPropertyValue);
- protected
- function Get_ADsType: Integer;
- procedure Set_ADsType(retval: Integer);
- function Get_DNString: WideString;
- procedure Set_DNString(const retval: WideString);
- function Get_CaseExactString: WideString;
- procedure Set_CaseExactString(const retval: WideString);
- function Get_CaseIgnoreString: WideString;
- procedure Set_CaseIgnoreString(const retval: WideString);
- function Get_PrintableString: WideString;
- procedure Set_PrintableString(const retval: WideString);
- function Get_NumericString: WideString;
- procedure Set_NumericString(const retval: WideString);
- function Get_Boolean: Integer;
- procedure Set_Boolean(retval: Integer);
- function Get_Integer: Integer;
- procedure Set_Integer(retval: Integer);
- function Get_OctetString: OleVariant;
- procedure Set_OctetString(retval: OleVariant);
- function Get_SecurityDescriptor: IDispatch;
- procedure Set_SecurityDescriptor(const retval: IDispatch);
- function Get_LargeInteger: IDispatch;
- procedure Set_LargeInteger(const retval: IDispatch);
- function Get_UTCTime: TDateTime;
- procedure Set_UTCTime(retval: TDateTime);
- public
- property DefaultInterface: IADsPropertyValue read GetDefaultInterface;
- published
- property ADsType: Integer read Get_ADsType write Set_ADsType;
- property DNString: WideString read Get_DNString write Set_DNString;
- property CaseExactString: WideString read Get_CaseExactString write Set_CaseExactString;
- property CaseIgnoreString: WideString read Get_CaseIgnoreString write Set_CaseIgnoreString;
- property PrintableString: WideString read Get_PrintableString write Set_PrintableString;
- property NumericString: WideString read Get_NumericString write Set_NumericString;
- property Boolean: Integer read Get_Boolean write Set_Boolean;
- property Integer: Integer read Get_Integer write Set_Integer;
- property UTCTime: TDateTime read Get_UTCTime write Set_UTCTime;
- end;
-{$ENDIF}
-
-// *********************************************************************//
-// The Class CoAccessControlEntry provides a Create and CreateRemote method to
-// create instances of the default interface IADsAccessControlEntry exposed by
-// the CoClass AccessControlEntry. The functions are intended to be used by
-// clients wishing to automate the CoClass objects exposed by the
-// server of this typelibrary.
-// *********************************************************************//
- CoAccessControlEntry = class
- class function Create: IADsAccessControlEntry;
- class function CreateRemote(const MachineName: string): IADsAccessControlEntry;
- end;
-
-// *********************************************************************//
-// OLE Server Proxy class declaration
-// Server Object : TAccessControlEntry
-// Help String :
-// Default Interface: IADsAccessControlEntry
-// Def. Intf. DISP? : No
-// Event Interface:
-// TypeFlags : (2) CanCreate
-// *********************************************************************//
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
- TAccessControlEntryProperties= class;
-{$ENDIF}
- TAccessControlEntry = class(TOleServer)
- private
- FIntf: IADsAccessControlEntry;
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
- FProps: TAccessControlEntryProperties;
- function GetServerProperties: TAccessControlEntryProperties;
-{$ENDIF}
- function GetDefaultInterface: IADsAccessControlEntry;
- protected
- procedure InitServerData; override;
- function Get_AccessMask: Integer;
- procedure Set_AccessMask(retval: Integer);
- function Get_AceType: Integer;
- procedure Set_AceType(retval: Integer);
- function Get_AceFlags: Integer;
- procedure Set_AceFlags(retval: Integer);
- function Get_Flags: Integer;
- procedure Set_Flags(retval: Integer);
- function Get_ObjectType: WideString;
- procedure Set_ObjectType(const retval: WideString);
- function Get_InheritedObjectType: WideString;
- procedure Set_InheritedObjectType(const retval: WideString);
- function Get_Trustee: WideString;
- procedure Set_Trustee(const retval: WideString);
- public
- constructor Create(AOwner: TComponent); override;
- destructor Destroy; override;
- procedure Connect; override;
- procedure ConnectTo(svrIntf: IADsAccessControlEntry);
- procedure Disconnect; override;
- property DefaultInterface: IADsAccessControlEntry read GetDefaultInterface;
- property AccessMask: Integer read Get_AccessMask write Set_AccessMask;
- property AceType: Integer read Get_AceType write Set_AceType;
- property AceFlags: Integer read Get_AceFlags write Set_AceFlags;
- property Flags: Integer read Get_Flags write Set_Flags;
- property ObjectType: WideString read Get_ObjectType write Set_ObjectType;
- property InheritedObjectType: WideString read Get_InheritedObjectType write Set_InheritedObjectType;
- property Trustee: WideString read Get_Trustee write Set_Trustee;
- published
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
- property Server: TAccessControlEntryProperties read GetServerProperties;
-{$ENDIF}
- end;
-
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
-// *********************************************************************//
-// OLE Server Properties Proxy Class
-// Server Object : TAccessControlEntry
-// (This object is used by the IDE's Property Inspector to allow editing
-// of the properties of this server)
-// *********************************************************************//
- TAccessControlEntryProperties = class(TPersistent)
- private
- FServer: TAccessControlEntry;
- function GetDefaultInterface: IADsAccessControlEntry;
- constructor Create(AServer: TAccessControlEntry);
- protected
- function Get_AccessMask: Integer;
- procedure Set_AccessMask(retval: Integer);
- function Get_AceType: Integer;
- procedure Set_AceType(retval: Integer);
- function Get_AceFlags: Integer;
- procedure Set_AceFlags(retval: Integer);
- function Get_Flags: Integer;
- procedure Set_Flags(retval: Integer);
- function Get_ObjectType: WideString;
- procedure Set_ObjectType(const retval: WideString);
- function Get_InheritedObjectType: WideString;
- procedure Set_InheritedObjectType(const retval: WideString);
- function Get_Trustee: WideString;
- procedure Set_Trustee(const retval: WideString);
- public
- property DefaultInterface: IADsAccessControlEntry read GetDefaultInterface;
- published
- property AccessMask: Integer read Get_AccessMask write Set_AccessMask;
- property AceType: Integer read Get_AceType write Set_AceType;
- property AceFlags: Integer read Get_AceFlags write Set_AceFlags;
- property Flags: Integer read Get_Flags write Set_Flags;
- property ObjectType: WideString read Get_ObjectType write Set_ObjectType;
- property InheritedObjectType: WideString read Get_InheritedObjectType write Set_InheritedObjectType;
- property Trustee: WideString read Get_Trustee write Set_Trustee;
- end;
-{$ENDIF}
-
-// *********************************************************************//
-// The Class CoAccessControlList provides a Create and CreateRemote method to
-// create instances of the default interface IADsAccessControlList exposed by
-// the CoClass AccessControlList. The functions are intended to be used by
-// clients wishing to automate the CoClass objects exposed by the
-// server of this typelibrary.
-// *********************************************************************//
- CoAccessControlList = class
- class function Create: IADsAccessControlList;
- class function CreateRemote(const MachineName: string): IADsAccessControlList;
- end;
-
-// *********************************************************************//
-// OLE Server Proxy class declaration
-// Server Object : TAccessControlList
-// Help String :
-// Default Interface: IADsAccessControlList
-// Def. Intf. DISP? : No
-// Event Interface:
-// TypeFlags : (2) CanCreate
-// *********************************************************************//
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
- TAccessControlListProperties= class;
-{$ENDIF}
- TAccessControlList = class(TOleServer)
- private
- FIntf: IADsAccessControlList;
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
- FProps: TAccessControlListProperties;
- function GetServerProperties: TAccessControlListProperties;
-{$ENDIF}
- function GetDefaultInterface: IADsAccessControlList;
- protected
- procedure InitServerData; override;
- function Get_AclRevision: Integer;
- procedure Set_AclRevision(retval: Integer);
- function Get_AceCount: Integer;
- procedure Set_AceCount(retval: Integer);
- public
- constructor Create(AOwner: TComponent); override;
- destructor Destroy; override;
- procedure Connect; override;
- procedure ConnectTo(svrIntf: IADsAccessControlList);
- procedure Disconnect; override;
- procedure AddAce(const pAccessControlEntry: IDispatch);
- procedure RemoveAce(const pAccessControlEntry: IDispatch);
- function CopyAccessList: IDispatch;
- property DefaultInterface: IADsAccessControlList read GetDefaultInterface;
- property AclRevision: Integer read Get_AclRevision write Set_AclRevision;
- property AceCount: Integer read Get_AceCount write Set_AceCount;
- published
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
- property Server: TAccessControlListProperties read GetServerProperties;
-{$ENDIF}
- end;
-
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
-// *********************************************************************//
-// OLE Server Properties Proxy Class
-// Server Object : TAccessControlList
-// (This object is used by the IDE's Property Inspector to allow editing
-// of the properties of this server)
-// *********************************************************************//
- TAccessControlListProperties = class(TPersistent)
- private
- FServer: TAccessControlList;
- function GetDefaultInterface: IADsAccessControlList;
- constructor Create(AServer: TAccessControlList);
- protected
- function Get_AclRevision: Integer;
- procedure Set_AclRevision(retval: Integer);
- function Get_AceCount: Integer;
- procedure Set_AceCount(retval: Integer);
- public
- property DefaultInterface: IADsAccessControlList read GetDefaultInterface;
- published
- property AclRevision: Integer read Get_AclRevision write Set_AclRevision;
- property AceCount: Integer read Get_AceCount write Set_AceCount;
- end;
-{$ENDIF}
-
-// *********************************************************************//
-// The Class CoSecurityDescriptor provides a Create and CreateRemote method to
-// create instances of the default interface IADsSecurityDescriptor exposed by
-// the CoClass SecurityDescriptor. The functions are intended to be used by
-// clients wishing to automate the CoClass objects exposed by the
-// server of this typelibrary.
-// *********************************************************************//
- CoSecurityDescriptor = class
- class function Create: IADsSecurityDescriptor;
- class function CreateRemote(const MachineName: string): IADsSecurityDescriptor;
- end;
-
-// *********************************************************************//
-// OLE Server Proxy class declaration
-// Server Object : TSecurityDescriptor
-// Help String :
-// Default Interface: IADsSecurityDescriptor
-// Def. Intf. DISP? : No
-// Event Interface:
-// TypeFlags : (2) CanCreate
-// *********************************************************************//
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
- TSecurityDescriptorProperties= class;
-{$ENDIF}
- TSecurityDescriptor = class(TOleServer)
- private
- FIntf: IADsSecurityDescriptor;
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
- FProps: TSecurityDescriptorProperties;
- function GetServerProperties: TSecurityDescriptorProperties;
-{$ENDIF}
- function GetDefaultInterface: IADsSecurityDescriptor;
- protected
- procedure InitServerData; override;
- function Get_Revision: Integer;
- procedure Set_Revision(retval: Integer);
- function Get_Control: Integer;
- procedure Set_Control(retval: Integer);
- function Get_Owner: WideString;
- procedure Set_Owner(const retval: WideString);
- function Get_OwnerDefaulted: WordBool;
- procedure Set_OwnerDefaulted(retval: WordBool);
- function Get_Group: WideString;
- procedure Set_Group(const retval: WideString);
- function Get_GroupDefaulted: WordBool;
- procedure Set_GroupDefaulted(retval: WordBool);
- function Get_DiscretionaryAcl: IDispatch;
- procedure Set_DiscretionaryAcl(const retval: IDispatch);
- function Get_DaclDefaulted: WordBool;
- procedure Set_DaclDefaulted(retval: WordBool);
- function Get_SystemAcl: IDispatch;
- procedure Set_SystemAcl(const retval: IDispatch);
- function Get_SaclDefaulted: WordBool;
- procedure Set_SaclDefaulted(retval: WordBool);
- public
- constructor Create(AOwner: TComponent); override;
- destructor Destroy; override;
- procedure Connect; override;
- procedure ConnectTo(svrIntf: IADsSecurityDescriptor);
- procedure Disconnect; override;
- function CopySecurityDescriptor: IDispatch;
- property DefaultInterface: IADsSecurityDescriptor read GetDefaultInterface;
- property DiscretionaryAcl: IDispatch read Get_DiscretionaryAcl write Set_DiscretionaryAcl;
- property SystemAcl: IDispatch read Get_SystemAcl write Set_SystemAcl;
- property Revision: Integer read Get_Revision write Set_Revision;
- property Control: Integer read Get_Control write Set_Control;
- property Owner: WideString read Get_Owner write Set_Owner;
- property OwnerDefaulted: WordBool read Get_OwnerDefaulted write Set_OwnerDefaulted;
- property Group: WideString read Get_Group write Set_Group;
- property GroupDefaulted: WordBool read Get_GroupDefaulted write Set_GroupDefaulted;
- property DaclDefaulted: WordBool read Get_DaclDefaulted write Set_DaclDefaulted;
- property SaclDefaulted: WordBool read Get_SaclDefaulted write Set_SaclDefaulted;
- published
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
- property Server: TSecurityDescriptorProperties read GetServerProperties;
-{$ENDIF}
- end;
-
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
-// *********************************************************************//
-// OLE Server Properties Proxy Class
-// Server Object : TSecurityDescriptor
-// (This object is used by the IDE's Property Inspector to allow editing
-// of the properties of this server)
-// *********************************************************************//
- TSecurityDescriptorProperties = class(TPersistent)
- private
- FServer: TSecurityDescriptor;
- function GetDefaultInterface: IADsSecurityDescriptor;
- constructor Create(AServer: TSecurityDescriptor);
- protected
- function Get_Revision: Integer;
- procedure Set_Revision(retval: Integer);
- function Get_Control: Integer;
- procedure Set_Control(retval: Integer);
- function Get_Owner: WideString;
- procedure Set_Owner(const retval: WideString);
- function Get_OwnerDefaulted: WordBool;
- procedure Set_OwnerDefaulted(retval: WordBool);
- function Get_Group: WideString;
- procedure Set_Group(const retval: WideString);
- function Get_GroupDefaulted: WordBool;
- procedure Set_GroupDefaulted(retval: WordBool);
- function Get_DiscretionaryAcl: IDispatch;
- procedure Set_DiscretionaryAcl(const retval: IDispatch);
- function Get_DaclDefaulted: WordBool;
- procedure Set_DaclDefaulted(retval: WordBool);
- function Get_SystemAcl: IDispatch;
- procedure Set_SystemAcl(const retval: IDispatch);
- function Get_SaclDefaulted: WordBool;
- procedure Set_SaclDefaulted(retval: WordBool);
- public
- property DefaultInterface: IADsSecurityDescriptor read GetDefaultInterface;
- published
- property Revision: Integer read Get_Revision write Set_Revision;
- property Control: Integer read Get_Control write Set_Control;
- property Owner: WideString read Get_Owner write Set_Owner;
- property OwnerDefaulted: WordBool read Get_OwnerDefaulted write Set_OwnerDefaulted;
- property Group: WideString read Get_Group write Set_Group;
- property GroupDefaulted: WordBool read Get_GroupDefaulted write Set_GroupDefaulted;
- property DaclDefaulted: WordBool read Get_DaclDefaulted write Set_DaclDefaulted;
- property SaclDefaulted: WordBool read Get_SaclDefaulted write Set_SaclDefaulted;
- end;
-{$ENDIF}
-
-// *********************************************************************//
-// The Class CoLargeInteger provides a Create and CreateRemote method to
-// create instances of the default interface IADsLargeInteger exposed by
-// the CoClass LargeInteger. The functions are intended to be used by
-// clients wishing to automate the CoClass objects exposed by the
-// server of this typelibrary.
-// *********************************************************************//
- CoLargeInteger = class
- class function Create: IADsLargeInteger;
- class function CreateRemote(const MachineName: string): IADsLargeInteger;
- end;
-
-// *********************************************************************//
-// OLE Server Proxy class declaration
-// Server Object : TLargeInteger
-// Help String :
-// Default Interface: IADsLargeInteger
-// Def. Intf. DISP? : No
-// Event Interface:
-// TypeFlags : (2) CanCreate
-// *********************************************************************//
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
- TLargeIntegerProperties= class;
-{$ENDIF}
- TLargeInteger = class(TOleServer)
- private
- FIntf: IADsLargeInteger;
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
- FProps: TLargeIntegerProperties;
- function GetServerProperties: TLargeIntegerProperties;
-{$ENDIF}
- function GetDefaultInterface: IADsLargeInteger;
- protected
- procedure InitServerData; override;
- function Get_HighPart: Integer;
- procedure Set_HighPart(retval: Integer);
- function Get_LowPart: Integer;
- procedure Set_LowPart(retval: Integer);
- public
- constructor Create(AOwner: TComponent); override;
- destructor Destroy; override;
- procedure Connect; override;
- procedure ConnectTo(svrIntf: IADsLargeInteger);
- procedure Disconnect; override;
- property DefaultInterface: IADsLargeInteger read GetDefaultInterface;
- property HighPart: Integer read Get_HighPart write Set_HighPart;
- property LowPart: Integer read Get_LowPart write Set_LowPart;
- published
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
- property Server: TLargeIntegerProperties read GetServerProperties;
-{$ENDIF}
- end;
-
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
-// *********************************************************************//
-// OLE Server Properties Proxy Class
-// Server Object : TLargeInteger
-// (This object is used by the IDE's Property Inspector to allow editing
-// of the properties of this server)
-// *********************************************************************//
- TLargeIntegerProperties = class(TPersistent)
- private
- FServer: TLargeInteger;
- function GetDefaultInterface: IADsLargeInteger;
- constructor Create(AServer: TLargeInteger);
- protected
- function Get_HighPart: Integer;
- procedure Set_HighPart(retval: Integer);
- function Get_LowPart: Integer;
- procedure Set_LowPart(retval: Integer);
- public
- property DefaultInterface: IADsLargeInteger read GetDefaultInterface;
- published
- property HighPart: Integer read Get_HighPart write Set_HighPart;
- property LowPart: Integer read Get_LowPart write Set_LowPart;
- end;
-{$ENDIF}
-
-// *********************************************************************//
-// The Class CoNameTranslate provides a Create and CreateRemote method to
-// create instances of the default interface IADsNameTranslate exposed by
-// the CoClass NameTranslate. The functions are intended to be used by
-// clients wishing to automate the CoClass objects exposed by the
-// server of this typelibrary.
-// *********************************************************************//
- CoNameTranslate = class
- class function Create: IADsNameTranslate;
- class function CreateRemote(const MachineName: string): IADsNameTranslate;
- end;
-
-// *********************************************************************//
-// OLE Server Proxy class declaration
-// Server Object : TNameTranslate
-// Help String :
-// Default Interface: IADsNameTranslate
-// Def. Intf. DISP? : No
-// Event Interface:
-// TypeFlags : (2) CanCreate
-// *********************************************************************//
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
- TNameTranslateProperties= class;
-{$ENDIF}
- TNameTranslate = class(TOleServer)
- private
- FIntf: IADsNameTranslate;
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
- FProps: TNameTranslateProperties;
- function GetServerProperties: TNameTranslateProperties;
-{$ENDIF}
- function GetDefaultInterface: IADsNameTranslate;
- protected
- procedure InitServerData; override;
- procedure Set_ChaseReferral(Param1: Integer);
- public
- constructor Create(AOwner: TComponent); override;
- destructor Destroy; override;
- procedure Connect; override;
- procedure ConnectTo(svrIntf: IADsNameTranslate);
- procedure Disconnect; override;
- procedure Init(lnSetType: Integer; const bstrADsPath: WideString);
- procedure InitEx(lnSetType: Integer; const bstrADsPath: WideString;
- const bstrUserID: WideString; const bstrDomain: WideString;
- const bstrPassword: WideString);
- procedure Set_(lnSetType: Integer; const bstrADsPath: WideString);
- function Get(lnFormatType: Integer): WideString;
- procedure SetEx(lnFormatType: Integer; pVar: OleVariant);
- function GetEx(lnFormatType: Integer): OleVariant;
- property DefaultInterface: IADsNameTranslate read GetDefaultInterface;
- property ChaseReferral: Integer write Set_ChaseReferral;
- published
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
- property Server: TNameTranslateProperties read GetServerProperties;
-{$ENDIF}
- end;
-
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
-// *********************************************************************//
-// OLE Server Properties Proxy Class
-// Server Object : TNameTranslate
-// (This object is used by the IDE's Property Inspector to allow editing
-// of the properties of this server)
-// *********************************************************************//
- TNameTranslateProperties = class(TPersistent)
- private
- FServer: TNameTranslate;
- function GetDefaultInterface: IADsNameTranslate;
- constructor Create(AServer: TNameTranslate);
- protected
- procedure Set_ChaseReferral(Param1: Integer);
- public
- property DefaultInterface: IADsNameTranslate read GetDefaultInterface;
- published
- end;
-{$ENDIF}
-
-// *********************************************************************//
-// The Class CoCaseIgnoreList provides a Create and CreateRemote method to
-// create instances of the default interface IADsCaseIgnoreList exposed by
-// the CoClass CaseIgnoreList. The functions are intended to be used by
-// clients wishing to automate the CoClass objects exposed by the
-// server of this typelibrary.
-// *********************************************************************//
- CoCaseIgnoreList = class
- class function Create: IADsCaseIgnoreList;
- class function CreateRemote(const MachineName: string): IADsCaseIgnoreList;
- end;
-
-// *********************************************************************//
-// OLE Server Proxy class declaration
-// Server Object : TCaseIgnoreList
-// Help String :
-// Default Interface: IADsCaseIgnoreList
-// Def. Intf. DISP? : No
-// Event Interface:
-// TypeFlags : (2) CanCreate
-// *********************************************************************//
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
- TCaseIgnoreListProperties= class;
-{$ENDIF}
- TCaseIgnoreList = class(TOleServer)
- private
- FIntf: IADsCaseIgnoreList;
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
- FProps: TCaseIgnoreListProperties;
- function GetServerProperties: TCaseIgnoreListProperties;
-{$ENDIF}
- function GetDefaultInterface: IADsCaseIgnoreList;
- protected
- procedure InitServerData; override;
- function Get_CaseIgnoreList: OleVariant;
- procedure Set_CaseIgnoreList(retval: OleVariant);
- public
- constructor Create(AOwner: TComponent); override;
- destructor Destroy; override;
- procedure Connect; override;
- procedure ConnectTo(svrIntf: IADsCaseIgnoreList);
- procedure Disconnect; override;
- property DefaultInterface: IADsCaseIgnoreList read GetDefaultInterface;
- property CaseIgnoreList: OleVariant read Get_CaseIgnoreList write Set_CaseIgnoreList;
- published
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
- property Server: TCaseIgnoreListProperties read GetServerProperties;
-{$ENDIF}
- end;
-
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
-// *********************************************************************//
-// OLE Server Properties Proxy Class
-// Server Object : TCaseIgnoreList
-// (This object is used by the IDE's Property Inspector to allow editing
-// of the properties of this server)
-// *********************************************************************//
- TCaseIgnoreListProperties = class(TPersistent)
- private
- FServer: TCaseIgnoreList;
- function GetDefaultInterface: IADsCaseIgnoreList;
- constructor Create(AServer: TCaseIgnoreList);
- protected
- function Get_CaseIgnoreList: OleVariant;
- procedure Set_CaseIgnoreList(retval: OleVariant);
- public
- property DefaultInterface: IADsCaseIgnoreList read GetDefaultInterface;
- published
- end;
-{$ENDIF}
-
-// *********************************************************************//
-// The Class CoFaxNumber provides a Create and CreateRemote method to
-// create instances of the default interface IADsFaxNumber exposed by
-// the CoClass FaxNumber. The functions are intended to be used by
-// clients wishing to automate the CoClass objects exposed by the
-// server of this typelibrary.
-// *********************************************************************//
- CoFaxNumber = class
- class function Create: IADsFaxNumber;
- class function CreateRemote(const MachineName: string): IADsFaxNumber;
- end;
-
-// *********************************************************************//
-// OLE Server Proxy class declaration
-// Server Object : TFaxNumber
-// Help String :
-// Default Interface: IADsFaxNumber
-// Def. Intf. DISP? : No
-// Event Interface:
-// TypeFlags : (2) CanCreate
-// *********************************************************************//
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
- TFaxNumberProperties= class;
-{$ENDIF}
- TFaxNumber = class(TOleServer)
- private
- FIntf: IADsFaxNumber;
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
- FProps: TFaxNumberProperties;
- function GetServerProperties: TFaxNumberProperties;
-{$ENDIF}
- function GetDefaultInterface: IADsFaxNumber;
- protected
- procedure InitServerData; override;
- function Get_TelephoneNumber: WideString;
- procedure Set_TelephoneNumber(const retval: WideString);
- function Get_Parameters: OleVariant;
- procedure Set_Parameters(retval: OleVariant);
- public
- constructor Create(AOwner: TComponent); override;
- destructor Destroy; override;
- procedure Connect; override;
- procedure ConnectTo(svrIntf: IADsFaxNumber);
- procedure Disconnect; override;
- property DefaultInterface: IADsFaxNumber read GetDefaultInterface;
- property Parameters: OleVariant read Get_Parameters write Set_Parameters;
- property TelephoneNumber: WideString read Get_TelephoneNumber write Set_TelephoneNumber;
- published
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
- property Server: TFaxNumberProperties read GetServerProperties;
-{$ENDIF}
- end;
-
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
-// *********************************************************************//
-// OLE Server Properties Proxy Class
-// Server Object : TFaxNumber
-// (This object is used by the IDE's Property Inspector to allow editing
-// of the properties of this server)
-// *********************************************************************//
- TFaxNumberProperties = class(TPersistent)
- private
- FServer: TFaxNumber;
- function GetDefaultInterface: IADsFaxNumber;
- constructor Create(AServer: TFaxNumber);
- protected
- function Get_TelephoneNumber: WideString;
- procedure Set_TelephoneNumber(const retval: WideString);
- function Get_Parameters: OleVariant;
- procedure Set_Parameters(retval: OleVariant);
- public
- property DefaultInterface: IADsFaxNumber read GetDefaultInterface;
- published
- property TelephoneNumber: WideString read Get_TelephoneNumber write Set_TelephoneNumber;
- end;
-{$ENDIF}
-
-// *********************************************************************//
-// The Class CoNetAddress provides a Create and CreateRemote method to
-// create instances of the default interface IADsNetAddress exposed by
-// the CoClass NetAddress. The functions are intended to be used by
-// clients wishing to automate the CoClass objects exposed by the
-// server of this typelibrary.
-// *********************************************************************//
- CoNetAddress = class
- class function Create: IADsNetAddress;
- class function CreateRemote(const MachineName: string): IADsNetAddress;
- end;
-
-// *********************************************************************//
-// OLE Server Proxy class declaration
-// Server Object : TNetAddress
-// Help String :
-// Default Interface: IADsNetAddress
-// Def. Intf. DISP? : No
-// Event Interface:
-// TypeFlags : (2) CanCreate
-// *********************************************************************//
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
- TNetAddressProperties= class;
-{$ENDIF}
- TNetAddress = class(TOleServer)
- private
- FIntf: IADsNetAddress;
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
- FProps: TNetAddressProperties;
- function GetServerProperties: TNetAddressProperties;
-{$ENDIF}
- function GetDefaultInterface: IADsNetAddress;
- protected
- procedure InitServerData; override;
- function Get_AddressType: Integer;
- procedure Set_AddressType(retval: Integer);
- function Get_Address: OleVariant;
- procedure Set_Address(retval: OleVariant);
- public
- constructor Create(AOwner: TComponent); override;
- destructor Destroy; override;
- procedure Connect; override;
- procedure ConnectTo(svrIntf: IADsNetAddress);
- procedure Disconnect; override;
- property DefaultInterface: IADsNetAddress read GetDefaultInterface;
- property Address: OleVariant read Get_Address write Set_Address;
- property AddressType: Integer read Get_AddressType write Set_AddressType;
- published
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
- property Server: TNetAddressProperties read GetServerProperties;
-{$ENDIF}
- end;
-
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
-// *********************************************************************//
-// OLE Server Properties Proxy Class
-// Server Object : TNetAddress
-// (This object is used by the IDE's Property Inspector to allow editing
-// of the properties of this server)
-// *********************************************************************//
- TNetAddressProperties = class(TPersistent)
- private
- FServer: TNetAddress;
- function GetDefaultInterface: IADsNetAddress;
- constructor Create(AServer: TNetAddress);
- protected
- function Get_AddressType: Integer;
- procedure Set_AddressType(retval: Integer);
- function Get_Address: OleVariant;
- procedure Set_Address(retval: OleVariant);
- public
- property DefaultInterface: IADsNetAddress read GetDefaultInterface;
- published
- property AddressType: Integer read Get_AddressType write Set_AddressType;
- end;
-{$ENDIF}
-
-// *********************************************************************//
-// The Class CoOctetList provides a Create and CreateRemote method to
-// create instances of the default interface IADsOctetList exposed by
-// the CoClass OctetList. The functions are intended to be used by
-// clients wishing to automate the CoClass objects exposed by the
-// server of this typelibrary.
-// *********************************************************************//
- CoOctetList = class
- class function Create: IADsOctetList;
- class function CreateRemote(const MachineName: string): IADsOctetList;
- end;
-
-// *********************************************************************//
-// OLE Server Proxy class declaration
-// Server Object : TOctetList
-// Help String :
-// Default Interface: IADsOctetList
-// Def. Intf. DISP? : No
-// Event Interface:
-// TypeFlags : (2) CanCreate
-// *********************************************************************//
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
- TOctetListProperties= class;
-{$ENDIF}
- TOctetList = class(TOleServer)
- private
- FIntf: IADsOctetList;
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
- FProps: TOctetListProperties;
- function GetServerProperties: TOctetListProperties;
-{$ENDIF}
- function GetDefaultInterface: IADsOctetList;
- protected
- procedure InitServerData; override;
- function Get_OctetList: OleVariant;
- procedure Set_OctetList(retval: OleVariant);
- public
- constructor Create(AOwner: TComponent); override;
- destructor Destroy; override;
- procedure Connect; override;
- procedure ConnectTo(svrIntf: IADsOctetList);
- procedure Disconnect; override;
- property DefaultInterface: IADsOctetList read GetDefaultInterface;
- property OctetList: OleVariant read Get_OctetList write Set_OctetList;
- published
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
- property Server: TOctetListProperties read GetServerProperties;
-{$ENDIF}
- end;
-
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
-// *********************************************************************//
-// OLE Server Properties Proxy Class
-// Server Object : TOctetList
-// (This object is used by the IDE's Property Inspector to allow editing
-// of the properties of this server)
-// *********************************************************************//
- TOctetListProperties = class(TPersistent)
- private
- FServer: TOctetList;
- function GetDefaultInterface: IADsOctetList;
- constructor Create(AServer: TOctetList);
- protected
- function Get_OctetList: OleVariant;
- procedure Set_OctetList(retval: OleVariant);
- public
- property DefaultInterface: IADsOctetList read GetDefaultInterface;
- published
- end;
-{$ENDIF}
-
-// *********************************************************************//
-// The Class CoEmail provides a Create and CreateRemote method to
-// create instances of the default interface IADsEmail exposed by
-// the CoClass Email. The functions are intended to be used by
-// clients wishing to automate the CoClass objects exposed by the
-// server of this typelibrary.
-// *********************************************************************//
- CoEmail = class
- class function Create: IADsEmail;
- class function CreateRemote(const MachineName: string): IADsEmail;
- end;
-
-// *********************************************************************//
-// OLE Server Proxy class declaration
-// Server Object : TEmail
-// Help String :
-// Default Interface: IADsEmail
-// Def. Intf. DISP? : No
-// Event Interface:
-// TypeFlags : (2) CanCreate
-// *********************************************************************//
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
- TEmailProperties= class;
-{$ENDIF}
- TEmail = class(TOleServer)
- private
- FIntf: IADsEmail;
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
- FProps: TEmailProperties;
- function GetServerProperties: TEmailProperties;
-{$ENDIF}
- function GetDefaultInterface: IADsEmail;
- protected
- procedure InitServerData; override;
- function Get_Type_: Integer;
- procedure Set_Type_(retval: Integer);
- function Get_Address: WideString;
- procedure Set_Address(const retval: WideString);
- public
- constructor Create(AOwner: TComponent); override;
- destructor Destroy; override;
- procedure Connect; override;
- procedure ConnectTo(svrIntf: IADsEmail);
- procedure Disconnect; override;
- property DefaultInterface: IADsEmail read GetDefaultInterface;
- property Type_: Integer read Get_Type_ write Set_Type_;
- property Address: WideString read Get_Address write Set_Address;
- published
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
- property Server: TEmailProperties read GetServerProperties;
-{$ENDIF}
- end;
-
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
-// *********************************************************************//
-// OLE Server Properties Proxy Class
-// Server Object : TEmail
-// (This object is used by the IDE's Property Inspector to allow editing
-// of the properties of this server)
-// *********************************************************************//
- TEmailProperties = class(TPersistent)
- private
- FServer: TEmail;
- function GetDefaultInterface: IADsEmail;
- constructor Create(AServer: TEmail);
- protected
- function Get_Type_: Integer;
- procedure Set_Type_(retval: Integer);
- function Get_Address: WideString;
- procedure Set_Address(const retval: WideString);
- public
- property DefaultInterface: IADsEmail read GetDefaultInterface;
- published
- property Type_: Integer read Get_Type_ write Set_Type_;
- property Address: WideString read Get_Address write Set_Address;
- end;
-{$ENDIF}
-
-// *********************************************************************//
-// The Class CoPath provides a Create and CreateRemote method to
-// create instances of the default interface IADsPath exposed by
-// the CoClass Path. The functions are intended to be used by
-// clients wishing to automate the CoClass objects exposed by the
-// server of this typelibrary.
-// *********************************************************************//
- CoPath = class
- class function Create: IADsPath;
- class function CreateRemote(const MachineName: string): IADsPath;
- end;
-
-// *********************************************************************//
-// OLE Server Proxy class declaration
-// Server Object : TPath
-// Help String :
-// Default Interface: IADsPath
-// Def. Intf. DISP? : No
-// Event Interface:
-// TypeFlags : (2) CanCreate
-// *********************************************************************//
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
- TPathProperties= class;
-{$ENDIF}
- TPath = class(TOleServer)
- private
- FIntf: IADsPath;
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
- FProps: TPathProperties;
- function GetServerProperties: TPathProperties;
-{$ENDIF}
- function GetDefaultInterface: IADsPath;
- protected
- procedure InitServerData; override;
- function Get_Type_: Integer;
- procedure Set_Type_(retval: Integer);
- function Get_VolumeName: WideString;
- procedure Set_VolumeName(const retval: WideString);
- function Get_Path: WideString;
- procedure Set_Path(const retval: WideString);
- public
- constructor Create(AOwner: TComponent); override;
- destructor Destroy; override;
- procedure Connect; override;
- procedure ConnectTo(svrIntf: IADsPath);
- procedure Disconnect; override;
- property DefaultInterface: IADsPath read GetDefaultInterface;
- property Type_: Integer read Get_Type_ write Set_Type_;
- property VolumeName: WideString read Get_VolumeName write Set_VolumeName;
- property Path: WideString read Get_Path write Set_Path;
- published
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
- property Server: TPathProperties read GetServerProperties;
-{$ENDIF}
- end;
-
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
-// *********************************************************************//
-// OLE Server Properties Proxy Class
-// Server Object : TPath
-// (This object is used by the IDE's Property Inspector to allow editing
-// of the properties of this server)
-// *********************************************************************//
- TPathProperties = class(TPersistent)
- private
- FServer: TPath;
- function GetDefaultInterface: IADsPath;
- constructor Create(AServer: TPath);
- protected
- function Get_Type_: Integer;
- procedure Set_Type_(retval: Integer);
- function Get_VolumeName: WideString;
- procedure Set_VolumeName(const retval: WideString);
- function Get_Path: WideString;
- procedure Set_Path(const retval: WideString);
- public
- property DefaultInterface: IADsPath read GetDefaultInterface;
- published
- property Type_: Integer read Get_Type_ write Set_Type_;
- property VolumeName: WideString read Get_VolumeName write Set_VolumeName;
- property Path: WideString read Get_Path write Set_Path;
- end;
-{$ENDIF}
-
-// *********************************************************************//
-// The Class CoReplicaPointer provides a Create and CreateRemote method to
-// create instances of the default interface IADsReplicaPointer exposed by
-// the CoClass ReplicaPointer. The functions are intended to be used by
-// clients wishing to automate the CoClass objects exposed by the
-// server of this typelibrary.
-// *********************************************************************//
- CoReplicaPointer = class
- class function Create: IADsReplicaPointer;
- class function CreateRemote(const MachineName: string): IADsReplicaPointer;
- end;
-
-// *********************************************************************//
-// OLE Server Proxy class declaration
-// Server Object : TReplicaPointer
-// Help String :
-// Default Interface: IADsReplicaPointer
-// Def. Intf. DISP? : No
-// Event Interface:
-// TypeFlags : (2) CanCreate
-// *********************************************************************//
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
- TReplicaPointerProperties= class;
-{$ENDIF}
- TReplicaPointer = class(TOleServer)
- private
- FIntf: IADsReplicaPointer;
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
- FProps: TReplicaPointerProperties;
- function GetServerProperties: TReplicaPointerProperties;
-{$ENDIF}
- function GetDefaultInterface: IADsReplicaPointer;
- protected
- procedure InitServerData; override;
- function Get_ServerName: WideString;
- procedure Set_ServerName(const retval: WideString);
- function Get_ReplicaType: Integer;
- procedure Set_ReplicaType(retval: Integer);
- function Get_ReplicaNumber: Integer;
- procedure Set_ReplicaNumber(retval: Integer);
- function Get_Count: Integer;
- procedure Set_Count(retval: Integer);
- function Get_ReplicaAddressHints: OleVariant;
- procedure Set_ReplicaAddressHints(retval: OleVariant);
- public
- constructor Create(AOwner: TComponent); override;
- destructor Destroy; override;
- procedure Connect; override;
- procedure ConnectTo(svrIntf: IADsReplicaPointer);
- procedure Disconnect; override;
- property DefaultInterface: IADsReplicaPointer read GetDefaultInterface;
- property ReplicaAddressHints: OleVariant read Get_ReplicaAddressHints write Set_ReplicaAddressHints;
- property ServerName: WideString read Get_ServerName write Set_ServerName;
- property ReplicaType: Integer read Get_ReplicaType write Set_ReplicaType;
- property ReplicaNumber: Integer read Get_ReplicaNumber write Set_ReplicaNumber;
- property Count: Integer read Get_Count write Set_Count;
- published
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
- property Server: TReplicaPointerProperties read GetServerProperties;
-{$ENDIF}
- end;
-
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
-// *********************************************************************//
-// OLE Server Properties Proxy Class
-// Server Object : TReplicaPointer
-// (This object is used by the IDE's Property Inspector to allow editing
-// of the properties of this server)
-// *********************************************************************//
- TReplicaPointerProperties = class(TPersistent)
- private
- FServer: TReplicaPointer;
- function GetDefaultInterface: IADsReplicaPointer;
- constructor Create(AServer: TReplicaPointer);
- protected
- function Get_ServerName: WideString;
- procedure Set_ServerName(const retval: WideString);
- function Get_ReplicaType: Integer;
- procedure Set_ReplicaType(retval: Integer);
- function Get_ReplicaNumber: Integer;
- procedure Set_ReplicaNumber(retval: Integer);
- function Get_Count: Integer;
- procedure Set_Count(retval: Integer);
- function Get_ReplicaAddressHints: OleVariant;
- procedure Set_ReplicaAddressHints(retval: OleVariant);
- public
- property DefaultInterface: IADsReplicaPointer read GetDefaultInterface;
- published
- property ServerName: WideString read Get_ServerName write Set_ServerName;
- property ReplicaType: Integer read Get_ReplicaType write Set_ReplicaType;
- property ReplicaNumber: Integer read Get_ReplicaNumber write Set_ReplicaNumber;
- property Count: Integer read Get_Count write Set_Count;
- end;
-{$ENDIF}
-
-// *********************************************************************//
-// The Class CoAcl provides a Create and CreateRemote method to
-// create instances of the default interface IADsAcl exposed by
-// the CoClass Acl. The functions are intended to be used by
-// clients wishing to automate the CoClass objects exposed by the
-// server of this typelibrary.
-// *********************************************************************//
- CoAcl = class
- class function Create: IADsAcl;
- class function CreateRemote(const MachineName: string): IADsAcl;
- end;
-
-// *********************************************************************//
-// OLE Server Proxy class declaration
-// Server Object : TAcl
-// Help String :
-// Default Interface: IADsAcl
-// Def. Intf. DISP? : No
-// Event Interface:
-// TypeFlags : (2) CanCreate
-// *********************************************************************//
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
- TAclProperties= class;
-{$ENDIF}
- TAcl = class(TOleServer)
- private
- FIntf: IADsAcl;
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
- FProps: TAclProperties;
- function GetServerProperties: TAclProperties;
-{$ENDIF}
- function GetDefaultInterface: IADsAcl;
- protected
- procedure InitServerData; override;
- function Get_ProtectedAttrName: WideString;
- procedure Set_ProtectedAttrName(const retval: WideString);
- function Get_SubjectName: WideString;
- procedure Set_SubjectName(const retval: WideString);
- function Get_Privileges: Integer;
- procedure Set_Privileges(retval: Integer);
- public
- constructor Create(AOwner: TComponent); override;
- destructor Destroy; override;
- procedure Connect; override;
- procedure ConnectTo(svrIntf: IADsAcl);
- procedure Disconnect; override;
- function CopyAcl: IDispatch;
- property DefaultInterface: IADsAcl read GetDefaultInterface;
- property ProtectedAttrName: WideString read Get_ProtectedAttrName write Set_ProtectedAttrName;
- property SubjectName: WideString read Get_SubjectName write Set_SubjectName;
- property Privileges: Integer read Get_Privileges write Set_Privileges;
- published
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
- property Server: TAclProperties read GetServerProperties;
-{$ENDIF}
- end;
-
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
-// *********************************************************************//
-// OLE Server Properties Proxy Class
-// Server Object : TAcl
-// (This object is used by the IDE's Property Inspector to allow editing
-// of the properties of this server)
-// *********************************************************************//
- TAclProperties = class(TPersistent)
- private
- FServer: TAcl;
- function GetDefaultInterface: IADsAcl;
- constructor Create(AServer: TAcl);
- protected
- function Get_ProtectedAttrName: WideString;
- procedure Set_ProtectedAttrName(const retval: WideString);
- function Get_SubjectName: WideString;
- procedure Set_SubjectName(const retval: WideString);
- function Get_Privileges: Integer;
- procedure Set_Privileges(retval: Integer);
- public
- property DefaultInterface: IADsAcl read GetDefaultInterface;
- published
- property ProtectedAttrName: WideString read Get_ProtectedAttrName write Set_ProtectedAttrName;
- property SubjectName: WideString read Get_SubjectName write Set_SubjectName;
- property Privileges: Integer read Get_Privileges write Set_Privileges;
- end;
-{$ENDIF}
-
-// *********************************************************************//
-// The Class CoTimestamp provides a Create and CreateRemote method to
-// create instances of the default interface IADsTimestamp exposed by
-// the CoClass Timestamp. The functions are intended to be used by
-// clients wishing to automate the CoClass objects exposed by the
-// server of this typelibrary.
-// *********************************************************************//
- CoTimestamp = class
- class function Create: IADsTimestamp;
- class function CreateRemote(const MachineName: string): IADsTimestamp;
- end;
-
-// *********************************************************************//
-// OLE Server Proxy class declaration
-// Server Object : TTimestamp
-// Help String :
-// Default Interface: IADsTimestamp
-// Def. Intf. DISP? : No
-// Event Interface:
-// TypeFlags : (2) CanCreate
-// *********************************************************************//
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
- TTimestampProperties= class;
-{$ENDIF}
- TTimestamp = class(TOleServer)
- private
- FIntf: IADsTimestamp;
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
- FProps: TTimestampProperties;
- function GetServerProperties: TTimestampProperties;
-{$ENDIF}
- function GetDefaultInterface: IADsTimestamp;
- protected
- procedure InitServerData; override;
- function Get_WholeSeconds: Integer;
- procedure Set_WholeSeconds(retval: Integer);
- function Get_EventID: Integer;
- procedure Set_EventID(retval: Integer);
- public
- constructor Create(AOwner: TComponent); override;
- destructor Destroy; override;
- procedure Connect; override;
- procedure ConnectTo(svrIntf: IADsTimestamp);
- procedure Disconnect; override;
- property DefaultInterface: IADsTimestamp read GetDefaultInterface;
- property WholeSeconds: Integer read Get_WholeSeconds write Set_WholeSeconds;
- property EventID: Integer read Get_EventID write Set_EventID;
- published
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
- property Server: TTimestampProperties read GetServerProperties;
-{$ENDIF}
- end;
-
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
-// *********************************************************************//
-// OLE Server Properties Proxy Class
-// Server Object : TTimestamp
-// (This object is used by the IDE's Property Inspector to allow editing
-// of the properties of this server)
-// *********************************************************************//
- TTimestampProperties = class(TPersistent)
- private
- FServer: TTimestamp;
- function GetDefaultInterface: IADsTimestamp;
- constructor Create(AServer: TTimestamp);
- protected
- function Get_WholeSeconds: Integer;
- procedure Set_WholeSeconds(retval: Integer);
- function Get_EventID: Integer;
- procedure Set_EventID(retval: Integer);
- public
- property DefaultInterface: IADsTimestamp read GetDefaultInterface;
- published
- property WholeSeconds: Integer read Get_WholeSeconds write Set_WholeSeconds;
- property EventID: Integer read Get_EventID write Set_EventID;
- end;
-{$ENDIF}
-
-// *********************************************************************//
-// The Class CoPostalAddress provides a Create and CreateRemote method to
-// create instances of the default interface IADsPostalAddress exposed by
-// the CoClass PostalAddress. The functions are intended to be used by
-// clients wishing to automate the CoClass objects exposed by the
-// server of this typelibrary.
-// *********************************************************************//
- CoPostalAddress = class
- class function Create: IADsPostalAddress;
- class function CreateRemote(const MachineName: string): IADsPostalAddress;
- end;
-
-// *********************************************************************//
-// OLE Server Proxy class declaration
-// Server Object : TPostalAddress
-// Help String :
-// Default Interface: IADsPostalAddress
-// Def. Intf. DISP? : No
-// Event Interface:
-// TypeFlags : (2) CanCreate
-// *********************************************************************//
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
- TPostalAddressProperties= class;
-{$ENDIF}
- TPostalAddress = class(TOleServer)
- private
- FIntf: IADsPostalAddress;
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
- FProps: TPostalAddressProperties;
- function GetServerProperties: TPostalAddressProperties;
-{$ENDIF}
- function GetDefaultInterface: IADsPostalAddress;
- protected
- procedure InitServerData; override;
- function Get_PostalAddress: OleVariant;
- procedure Set_PostalAddress(retval: OleVariant);
- public
- constructor Create(AOwner: TComponent); override;
- destructor Destroy; override;
- procedure Connect; override;
- procedure ConnectTo(svrIntf: IADsPostalAddress);
- procedure Disconnect; override;
- property DefaultInterface: IADsPostalAddress read GetDefaultInterface;
- property PostalAddress: OleVariant read Get_PostalAddress write Set_PostalAddress;
- published
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
- property Server: TPostalAddressProperties read GetServerProperties;
-{$ENDIF}
- end;
-
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
-// *********************************************************************//
-// OLE Server Properties Proxy Class
-// Server Object : TPostalAddress
-// (This object is used by the IDE's Property Inspector to allow editing
-// of the properties of this server)
-// *********************************************************************//
- TPostalAddressProperties = class(TPersistent)
- private
- FServer: TPostalAddress;
- function GetDefaultInterface: IADsPostalAddress;
- constructor Create(AServer: TPostalAddress);
- protected
- function Get_PostalAddress: OleVariant;
- procedure Set_PostalAddress(retval: OleVariant);
- public
- property DefaultInterface: IADsPostalAddress read GetDefaultInterface;
- published
- end;
-{$ENDIF}
-
-// *********************************************************************//
-// The Class CoBackLink provides a Create and CreateRemote method to
-// create instances of the default interface IADsBackLink exposed by
-// the CoClass BackLink. The functions are intended to be used by
-// clients wishing to automate the CoClass objects exposed by the
-// server of this typelibrary.
-// *********************************************************************//
- CoBackLink = class
- class function Create: IADsBackLink;
- class function CreateRemote(const MachineName: string): IADsBackLink;
- end;
-
-// *********************************************************************//
-// OLE Server Proxy class declaration
-// Server Object : TBackLink
-// Help String :
-// Default Interface: IADsBackLink
-// Def. Intf. DISP? : No
-// Event Interface:
-// TypeFlags : (2) CanCreate
-// *********************************************************************//
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
- TBackLinkProperties= class;
-{$ENDIF}
- TBackLink = class(TOleServer)
- private
- FIntf: IADsBackLink;
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
- FProps: TBackLinkProperties;
- function GetServerProperties: TBackLinkProperties;
-{$ENDIF}
- function GetDefaultInterface: IADsBackLink;
- protected
- procedure InitServerData; override;
- function Get_RemoteID: Integer;
- procedure Set_RemoteID(retval: Integer);
- function Get_ObjectName: WideString;
- procedure Set_ObjectName(const retval: WideString);
- public
- constructor Create(AOwner: TComponent); override;
- destructor Destroy; override;
- procedure Connect; override;
- procedure ConnectTo(svrIntf: IADsBackLink);
- procedure Disconnect; override;
- property DefaultInterface: IADsBackLink read GetDefaultInterface;
- property RemoteID: Integer read Get_RemoteID write Set_RemoteID;
- property ObjectName: WideString read Get_ObjectName write Set_ObjectName;
- published
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
- property Server: TBackLinkProperties read GetServerProperties;
-{$ENDIF}
- end;
-
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
-// *********************************************************************//
-// OLE Server Properties Proxy Class
-// Server Object : TBackLink
-// (This object is used by the IDE's Property Inspector to allow editing
-// of the properties of this server)
-// *********************************************************************//
- TBackLinkProperties = class(TPersistent)
- private
- FServer: TBackLink;
- function GetDefaultInterface: IADsBackLink;
- constructor Create(AServer: TBackLink);
- protected
- function Get_RemoteID: Integer;
- procedure Set_RemoteID(retval: Integer);
- function Get_ObjectName: WideString;
- procedure Set_ObjectName(const retval: WideString);
- public
- property DefaultInterface: IADsBackLink read GetDefaultInterface;
- published
- property RemoteID: Integer read Get_RemoteID write Set_RemoteID;
- property ObjectName: WideString read Get_ObjectName write Set_ObjectName;
- end;
-{$ENDIF}
-
-// *********************************************************************//
-// The Class CoTypedName provides a Create and CreateRemote method to
-// create instances of the default interface IADsTypedName exposed by
-// the CoClass TypedName. The functions are intended to be used by
-// clients wishing to automate the CoClass objects exposed by the
-// server of this typelibrary.
-// *********************************************************************//
- CoTypedName = class
- class function Create: IADsTypedName;
- class function CreateRemote(const MachineName: string): IADsTypedName;
- end;
-
-// *********************************************************************//
-// OLE Server Proxy class declaration
-// Server Object : TTypedName
-// Help String :
-// Default Interface: IADsTypedName
-// Def. Intf. DISP? : No
-// Event Interface:
-// TypeFlags : (2) CanCreate
-// *********************************************************************//
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
- TTypedNameProperties= class;
-{$ENDIF}
- TTypedName = class(TOleServer)
- private
- FIntf: IADsTypedName;
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
- FProps: TTypedNameProperties;
- function GetServerProperties: TTypedNameProperties;
-{$ENDIF}
- function GetDefaultInterface: IADsTypedName;
- protected
- procedure InitServerData; override;
- function Get_ObjectName: WideString;
- procedure Set_ObjectName(const retval: WideString);
- function Get_Level: Integer;
- procedure Set_Level(retval: Integer);
- function Get_Interval: Integer;
- procedure Set_Interval(retval: Integer);
- public
- constructor Create(AOwner: TComponent); override;
- destructor Destroy; override;
- procedure Connect; override;
- procedure ConnectTo(svrIntf: IADsTypedName);
- procedure Disconnect; override;
- property DefaultInterface: IADsTypedName read GetDefaultInterface;
- property ObjectName: WideString read Get_ObjectName write Set_ObjectName;
- property Level: Integer read Get_Level write Set_Level;
- property Interval: Integer read Get_Interval write Set_Interval;
- published
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
- property Server: TTypedNameProperties read GetServerProperties;
-{$ENDIF}
- end;
-
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
-// *********************************************************************//
-// OLE Server Properties Proxy Class
-// Server Object : TTypedName
-// (This object is used by the IDE's Property Inspector to allow editing
-// of the properties of this server)
-// *********************************************************************//
- TTypedNameProperties = class(TPersistent)
- private
- FServer: TTypedName;
- function GetDefaultInterface: IADsTypedName;
- constructor Create(AServer: TTypedName);
- protected
- function Get_ObjectName: WideString;
- procedure Set_ObjectName(const retval: WideString);
- function Get_Level: Integer;
- procedure Set_Level(retval: Integer);
- function Get_Interval: Integer;
- procedure Set_Interval(retval: Integer);
- public
- property DefaultInterface: IADsTypedName read GetDefaultInterface;
- published
- property ObjectName: WideString read Get_ObjectName write Set_ObjectName;
- property Level: Integer read Get_Level write Set_Level;
- property Interval: Integer read Get_Interval write Set_Interval;
- end;
-{$ENDIF}
-
-// *********************************************************************//
-// The Class CoHold provides a Create and CreateRemote method to
-// create instances of the default interface IADsHold exposed by
-// the CoClass Hold. The functions are intended to be used by
-// clients wishing to automate the CoClass objects exposed by the
-// server of this typelibrary.
-// *********************************************************************//
- CoHold = class
- class function Create: IADsHold;
- class function CreateRemote(const MachineName: string): IADsHold;
- end;
-
-// *********************************************************************//
-// OLE Server Proxy class declaration
-// Server Object : THold
-// Help String :
-// Default Interface: IADsHold
-// Def. Intf. DISP? : No
-// Event Interface:
-// TypeFlags : (2) CanCreate
-// *********************************************************************//
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
- THoldProperties= class;
-{$ENDIF}
- THold = class(TOleServer)
- private
- FIntf: IADsHold;
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
- FProps: THoldProperties;
- function GetServerProperties: THoldProperties;
-{$ENDIF}
- function GetDefaultInterface: IADsHold;
- protected
- procedure InitServerData; override;
- function Get_ObjectName: WideString;
- procedure Set_ObjectName(const retval: WideString);
- function Get_Amount: Integer;
- procedure Set_Amount(retval: Integer);
- public
- constructor Create(AOwner: TComponent); override;
- destructor Destroy; override;
- procedure Connect; override;
- procedure ConnectTo(svrIntf: IADsHold);
- procedure Disconnect; override;
- property DefaultInterface: IADsHold read GetDefaultInterface;
- property ObjectName: WideString read Get_ObjectName write Set_ObjectName;
- property Amount: Integer read Get_Amount write Set_Amount;
- published
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
- property Server: THoldProperties read GetServerProperties;
-{$ENDIF}
- end;
-
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
-// *********************************************************************//
-// OLE Server Properties Proxy Class
-// Server Object : THold
-// (This object is used by the IDE's Property Inspector to allow editing
-// of the properties of this server)
-// *********************************************************************//
- THoldProperties = class(TPersistent)
- private
- FServer: THold;
- function GetDefaultInterface: IADsHold;
- constructor Create(AServer: THold);
- protected
- function Get_ObjectName: WideString;
- procedure Set_ObjectName(const retval: WideString);
- function Get_Amount: Integer;
- procedure Set_Amount(retval: Integer);
- public
- property DefaultInterface: IADsHold read GetDefaultInterface;
- published
- property ObjectName: WideString read Get_ObjectName write Set_ObjectName;
- property Amount: Integer read Get_Amount write Set_Amount;
- end;
-{$ENDIF}
-
-// *********************************************************************//
-// The Class CoPathname provides a Create and CreateRemote method to
-// create instances of the default interface IADsPathname exposed by
-// the CoClass Pathname. The functions are intended to be used by
-// clients wishing to automate the CoClass objects exposed by the
-// server of this typelibrary.
-// *********************************************************************//
- CoPathname = class
- class function Create: IADsPathname;
- class function CreateRemote(const MachineName: string): IADsPathname;
- end;
-
-// *********************************************************************//
-// OLE Server Proxy class declaration
-// Server Object : TPathname
-// Help String :
-// Default Interface: IADsPathname
-// Def. Intf. DISP? : No
-// Event Interface:
-// TypeFlags : (2) CanCreate
-// *********************************************************************//
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
- TPathnameProperties= class;
-{$ENDIF}
- TPathname = class(TOleServer)
- private
- FIntf: IADsPathname;
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
- FProps: TPathnameProperties;
- function GetServerProperties: TPathnameProperties;
-{$ENDIF}
- function GetDefaultInterface: IADsPathname;
- protected
- procedure InitServerData; override;
- function Get_EscapedMode: Integer;
- procedure Set_EscapedMode(retval: Integer);
- public
- constructor Create(AOwner: TComponent); override;
- destructor Destroy; override;
- procedure Connect; override;
- procedure ConnectTo(svrIntf: IADsPathname);
- procedure Disconnect; override;
- procedure Set_(const bstrADsPath: WideString; lnSetType: Integer);
- procedure SetDisplayType(lnDisplayType: Integer);
- function Retrieve(lnFormatType: Integer): WideString;
- function GetNumElements: Integer;
- function GetElement(lnElementIndex: Integer): WideString;
- procedure AddLeafElement(const bstrLeafElement: WideString);
- procedure RemoveLeafElement;
- function CopyPath: IDispatch;
- function GetEscapedElement(lnReserved: Integer; const bstrInStr: WideString): WideString;
- property DefaultInterface: IADsPathname read GetDefaultInterface;
- property EscapedMode: Integer read Get_EscapedMode write Set_EscapedMode;
- published
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
- property Server: TPathnameProperties read GetServerProperties;
-{$ENDIF}
- end;
-
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
-// *********************************************************************//
-// OLE Server Properties Proxy Class
-// Server Object : TPathname
-// (This object is used by the IDE's Property Inspector to allow editing
-// of the properties of this server)
-// *********************************************************************//
- TPathnameProperties = class(TPersistent)
- private
- FServer: TPathname;
- function GetDefaultInterface: IADsPathname;
- constructor Create(AServer: TPathname);
- protected
- function Get_EscapedMode: Integer;
- procedure Set_EscapedMode(retval: Integer);
- public
- property DefaultInterface: IADsPathname read GetDefaultInterface;
- published
- property EscapedMode: Integer read Get_EscapedMode write Set_EscapedMode;
- end;
-{$ENDIF}
-
-// *********************************************************************//
-// The Class CoADSystemInfo provides a Create and CreateRemote method to
-// create instances of the default interface IADsADSystemInfo exposed by
-// the CoClass ADSystemInfo. The functions are intended to be used by
-// clients wishing to automate the CoClass objects exposed by the
-// server of this typelibrary.
-// *********************************************************************//
- CoADSystemInfo = class
- class function Create: IADsADSystemInfo;
- class function CreateRemote(const MachineName: string): IADsADSystemInfo;
- end;
-
-// *********************************************************************//
-// OLE Server Proxy class declaration
-// Server Object : TADSystemInfo
-// Help String :
-// Default Interface: IADsADSystemInfo
-// Def. Intf. DISP? : No
-// Event Interface:
-// TypeFlags : (2) CanCreate
-// *********************************************************************//
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
- TADSystemInfoProperties= class;
-{$ENDIF}
- TADSystemInfo = class(TOleServer)
- private
- FIntf: IADsADSystemInfo;
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
- FProps: TADSystemInfoProperties;
- function GetServerProperties: TADSystemInfoProperties;
-{$ENDIF}
- function GetDefaultInterface: IADsADSystemInfo;
- protected
- procedure InitServerData; override;
- function Get_UserName: WideString;
- function Get_ComputerName: WideString;
- function Get_SiteName: WideString;
- function Get_DomainShortName: WideString;
- function Get_DomainDNSName: WideString;
- function Get_ForestDNSName: WideString;
- function Get_PDCRoleOwner: WideString;
- function Get_SchemaRoleOwner: WideString;
- function Get_IsNativeMode: WordBool;
- public
- constructor Create(AOwner: TComponent); override;
- destructor Destroy; override;
- procedure Connect; override;
- procedure ConnectTo(svrIntf: IADsADSystemInfo);
- procedure Disconnect; override;
- function GetAnyDCName: WideString;
- function GetDCSiteName(const szServer: WideString): WideString;
- procedure RefreshSchemaCache;
- function GetTrees: OleVariant;
- property DefaultInterface: IADsADSystemInfo read GetDefaultInterface;
- property UserName: WideString read Get_UserName;
- property ComputerName: WideString read Get_ComputerName;
- property SiteName: WideString read Get_SiteName;
- property DomainShortName: WideString read Get_DomainShortName;
- property DomainDNSName: WideString read Get_DomainDNSName;
- property ForestDNSName: WideString read Get_ForestDNSName;
- property PDCRoleOwner: WideString read Get_PDCRoleOwner;
- property SchemaRoleOwner: WideString read Get_SchemaRoleOwner;
- property IsNativeMode: WordBool read Get_IsNativeMode;
- published
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
- property Server: TADSystemInfoProperties read GetServerProperties;
-{$ENDIF}
- end;
-
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
-// *********************************************************************//
-// OLE Server Properties Proxy Class
-// Server Object : TADSystemInfo
-// (This object is used by the IDE's Property Inspector to allow editing
-// of the properties of this server)
-// *********************************************************************//
- TADSystemInfoProperties = class(TPersistent)
- private
- FServer: TADSystemInfo;
- function GetDefaultInterface: IADsADSystemInfo;
- constructor Create(AServer: TADSystemInfo);
- protected
- function Get_UserName: WideString;
- function Get_ComputerName: WideString;
- function Get_SiteName: WideString;
- function Get_DomainShortName: WideString;
- function Get_DomainDNSName: WideString;
- function Get_ForestDNSName: WideString;
- function Get_PDCRoleOwner: WideString;
- function Get_SchemaRoleOwner: WideString;
- function Get_IsNativeMode: WordBool;
- public
- property DefaultInterface: IADsADSystemInfo read GetDefaultInterface;
- published
- end;
-{$ENDIF}
-
-// *********************************************************************//
-// The Class CoWinNTSystemInfo provides a Create and CreateRemote method to
-// create instances of the default interface IADsWinNTSystemInfo exposed by
-// the CoClass WinNTSystemInfo. The functions are intended to be used by
-// clients wishing to automate the CoClass objects exposed by the
-// server of this typelibrary.
-// *********************************************************************//
- CoWinNTSystemInfo = class
- class function Create: IADsWinNTSystemInfo;
- class function CreateRemote(const MachineName: string): IADsWinNTSystemInfo;
- end;
-
-// *********************************************************************//
-// OLE Server Proxy class declaration
-// Server Object : TWinNTSystemInfo
-// Help String :
-// Default Interface: IADsWinNTSystemInfo
-// Def. Intf. DISP? : No
-// Event Interface:
-// TypeFlags : (2) CanCreate
-// *********************************************************************//
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
- TWinNTSystemInfoProperties= class;
-{$ENDIF}
- TWinNTSystemInfo = class(TOleServer)
- private
- FIntf: IADsWinNTSystemInfo;
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
- FProps: TWinNTSystemInfoProperties;
- function GetServerProperties: TWinNTSystemInfoProperties;
-{$ENDIF}
- function GetDefaultInterface: IADsWinNTSystemInfo;
- protected
- procedure InitServerData; override;
- function Get_UserName: WideString;
- function Get_ComputerName: WideString;
- function Get_DomainName: WideString;
- function Get_PDC: WideString;
- public
- constructor Create(AOwner: TComponent); override;
- destructor Destroy; override;
- procedure Connect; override;
- procedure ConnectTo(svrIntf: IADsWinNTSystemInfo);
- procedure Disconnect; override;
- property DefaultInterface: IADsWinNTSystemInfo read GetDefaultInterface;
- property UserName: WideString read Get_UserName;
- property ComputerName: WideString read Get_ComputerName;
- property DomainName: WideString read Get_DomainName;
- property PDC: WideString read Get_PDC;
- published
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
- property Server: TWinNTSystemInfoProperties read GetServerProperties;
-{$ENDIF}
- end;
-
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
-// *********************************************************************//
-// OLE Server Properties Proxy Class
-// Server Object : TWinNTSystemInfo
-// (This object is used by the IDE's Property Inspector to allow editing
-// of the properties of this server)
-// *********************************************************************//
- TWinNTSystemInfoProperties = class(TPersistent)
- private
- FServer: TWinNTSystemInfo;
- function GetDefaultInterface: IADsWinNTSystemInfo;
- constructor Create(AServer: TWinNTSystemInfo);
- protected
- function Get_UserName: WideString;
- function Get_ComputerName: WideString;
- function Get_DomainName: WideString;
- function Get_PDC: WideString;
- public
- property DefaultInterface: IADsWinNTSystemInfo read GetDefaultInterface;
- published
- end;
-{$ENDIF}
-
-// *********************************************************************//
-// The Class CoDNWithBinary provides a Create and CreateRemote method to
-// create instances of the default interface IADsDNWithBinary exposed by
-// the CoClass DNWithBinary. The functions are intended to be used by
-// clients wishing to automate the CoClass objects exposed by the
-// server of this typelibrary.
-// *********************************************************************//
- CoDNWithBinary = class
- class function Create: IADsDNWithBinary;
- class function CreateRemote(const MachineName: string): IADsDNWithBinary;
- end;
-
-// *********************************************************************//
-// OLE Server Proxy class declaration
-// Server Object : TDNWithBinary
-// Help String :
-// Default Interface: IADsDNWithBinary
-// Def. Intf. DISP? : No
-// Event Interface:
-// TypeFlags : (2) CanCreate
-// *********************************************************************//
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
- TDNWithBinaryProperties= class;
-{$ENDIF}
- TDNWithBinary = class(TOleServer)
- private
- FIntf: IADsDNWithBinary;
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
- FProps: TDNWithBinaryProperties;
- function GetServerProperties: TDNWithBinaryProperties;
-{$ENDIF}
- function GetDefaultInterface: IADsDNWithBinary;
- protected
- procedure InitServerData; override;
- function Get_BinaryValue: OleVariant;
- procedure Set_BinaryValue(retval: OleVariant);
- function Get_DNString: WideString;
- procedure Set_DNString(const retval: WideString);
- public
- constructor Create(AOwner: TComponent); override;
- destructor Destroy; override;
- procedure Connect; override;
- procedure ConnectTo(svrIntf: IADsDNWithBinary);
- procedure Disconnect; override;
- property DefaultInterface: IADsDNWithBinary read GetDefaultInterface;
- property BinaryValue: OleVariant read Get_BinaryValue write Set_BinaryValue;
- property DNString: WideString read Get_DNString write Set_DNString;
- published
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
- property Server: TDNWithBinaryProperties read GetServerProperties;
-{$ENDIF}
- end;
-
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
-// *********************************************************************//
-// OLE Server Properties Proxy Class
-// Server Object : TDNWithBinary
-// (This object is used by the IDE's Property Inspector to allow editing
-// of the properties of this server)
-// *********************************************************************//
- TDNWithBinaryProperties = class(TPersistent)
- private
- FServer: TDNWithBinary;
- function GetDefaultInterface: IADsDNWithBinary;
- constructor Create(AServer: TDNWithBinary);
- protected
- function Get_BinaryValue: OleVariant;
- procedure Set_BinaryValue(retval: OleVariant);
- function Get_DNString: WideString;
- procedure Set_DNString(const retval: WideString);
- public
- property DefaultInterface: IADsDNWithBinary read GetDefaultInterface;
- published
- property DNString: WideString read Get_DNString write Set_DNString;
- end;
-{$ENDIF}
-
-// *********************************************************************//
-// The Class CoDNWithString provides a Create and CreateRemote method to
-// create instances of the default interface IADsDNWithString exposed by
-// the CoClass DNWithString. The functions are intended to be used by
-// clients wishing to automate the CoClass objects exposed by the
-// server of this typelibrary.
-// *********************************************************************//
- CoDNWithString = class
- class function Create: IADsDNWithString;
- class function CreateRemote(const MachineName: string): IADsDNWithString;
- end;
-
-// *********************************************************************//
-// OLE Server Proxy class declaration
-// Server Object : TDNWithString
-// Help String :
-// Default Interface: IADsDNWithString
-// Def. Intf. DISP? : No
-// Event Interface:
-// TypeFlags : (2) CanCreate
-// *********************************************************************//
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
- TDNWithStringProperties= class;
-{$ENDIF}
- TDNWithString = class(TOleServer)
- private
- FIntf: IADsDNWithString;
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
- FProps: TDNWithStringProperties;
- function GetServerProperties: TDNWithStringProperties;
-{$ENDIF}
- function GetDefaultInterface: IADsDNWithString;
- protected
- procedure InitServerData; override;
- function Get_StringValue: WideString;
- procedure Set_StringValue(const retval: WideString);
- function Get_DNString: WideString;
- procedure Set_DNString(const retval: WideString);
- public
- constructor Create(AOwner: TComponent); override;
- destructor Destroy; override;
- procedure Connect; override;
- procedure ConnectTo(svrIntf: IADsDNWithString);
- procedure Disconnect; override;
- property DefaultInterface: IADsDNWithString read GetDefaultInterface;
- property StringValue: WideString read Get_StringValue write Set_StringValue;
- property DNString: WideString read Get_DNString write Set_DNString;
- published
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
- property Server: TDNWithStringProperties read GetServerProperties;
-{$ENDIF}
- end;
-
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
-// *********************************************************************//
-// OLE Server Properties Proxy Class
-// Server Object : TDNWithString
-// (This object is used by the IDE's Property Inspector to allow editing
-// of the properties of this server)
-// *********************************************************************//
- TDNWithStringProperties = class(TPersistent)
- private
- FServer: TDNWithString;
- function GetDefaultInterface: IADsDNWithString;
- constructor Create(AServer: TDNWithString);
- protected
- function Get_StringValue: WideString;
- procedure Set_StringValue(const retval: WideString);
- function Get_DNString: WideString;
- procedure Set_DNString(const retval: WideString);
- public
- property DefaultInterface: IADsDNWithString read GetDefaultInterface;
- published
- property StringValue: WideString read Get_StringValue write Set_StringValue;
- property DNString: WideString read Get_DNString write Set_DNString;
- end;
-{$ENDIF}
-
-procedure Register;
-
-implementation
-
-uses ComObj;
-
-class function CoPropertyEntry.Create: IADsPropertyEntry;
-begin
- Result := CreateComObject(CLASS_PropertyEntry) as IADsPropertyEntry;
-end;
-
-class function CoPropertyEntry.CreateRemote(const MachineName: string): IADsPropertyEntry;
-begin
- Result := CreateRemoteComObject(MachineName, CLASS_PropertyEntry) as IADsPropertyEntry;
-end;
-
-procedure TPropertyEntry.InitServerData;
-const
- CServerData: TServerData = (
- ClassID: '{72D3EDC2-A4C4-11D0-8533-00C04FD8D503}';
- IntfIID: '{05792C8E-941F-11D0-8529-00C04FD8D503}';
- EventIID: '';
- LicenseKey: nil;
- Version: 500);
-begin
- ServerData := @CServerData;
-end;
-
-procedure TPropertyEntry.Connect;
-var
- punk: IUnknown;
-begin
- if FIntf = nil then
- begin
- punk := GetServer;
- Fintf:= punk as IADsPropertyEntry;
- end;
-end;
-
-procedure TPropertyEntry.ConnectTo(svrIntf: IADsPropertyEntry);
-begin
- Disconnect;
- FIntf := svrIntf;
-end;
-
-procedure TPropertyEntry.DisConnect;
-begin
- if Fintf <> nil then
- begin
- FIntf := nil;
- end;
-end;
-
-function TPropertyEntry.GetDefaultInterface: IADsPropertyEntry;
-begin
- if FIntf = nil then
- Connect;
- Assert(FIntf <> nil, 'DefaultInterface is NULL. Component is not connected to Server. You must call ''Connect'' or ''ConnectTo'' before this operation');
- Result := FIntf;
-end;
-
-constructor TPropertyEntry.Create(AOwner: TComponent);
-begin
- inherited Create(AOwner);
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
- FProps := TPropertyEntryProperties.Create(Self);
-{$ENDIF}
-end;
-
-destructor TPropertyEntry.Destroy;
-begin
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
- FProps.Free;
-{$ENDIF}
- inherited Destroy;
-end;
-
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
-function TPropertyEntry.GetServerProperties: TPropertyEntryProperties;
-begin
- Result := FProps;
-end;
-{$ENDIF}
-
-function TPropertyEntry.Get_Name: WideString;
-begin
- Result := DefaultInterface.Get_Name;
-end;
-
-procedure TPropertyEntry.Set_Name(const retval: WideString);
-begin
- DefaultInterface.Set_Name(retval);
-end;
-
-function TPropertyEntry.Get_ADsType: Integer;
-begin
- Result := DefaultInterface.Get_ADsType;
-end;
-
-procedure TPropertyEntry.Set_ADsType(retval: Integer);
-begin
- DefaultInterface.Set_ADsType(retval);
-end;
-
-function TPropertyEntry.Get_ControlCode: Integer;
-begin
- Result := DefaultInterface.Get_ControlCode;
-end;
-
-procedure TPropertyEntry.Set_ControlCode(retval: Integer);
-begin
- DefaultInterface.Set_ControlCode(retval);
-end;
-
-function TPropertyEntry.Get_Values: OleVariant;
-begin
- Result := DefaultInterface.Get_Values;
-end;
-
-procedure TPropertyEntry.Set_Values(retval: OleVariant);
-begin
- DefaultInterface.Set_Values(retval);
-end;
-
-procedure TPropertyEntry.Clear;
-begin
- DefaultInterface.Clear;
-end;
-
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
-constructor TPropertyEntryProperties.Create(AServer: TPropertyEntry);
-begin
- inherited Create;
- FServer := AServer;
-end;
-
-function TPropertyEntryProperties.GetDefaultInterface: IADsPropertyEntry;
-begin
- Result := FServer.DefaultInterface;
-end;
-
-function TPropertyEntryProperties.Get_Name: WideString;
-begin
- Result := DefaultInterface.Get_Name;
-end;
-
-procedure TPropertyEntryProperties.Set_Name(const retval: WideString);
-begin
- DefaultInterface.Set_Name(retval);
-end;
-
-function TPropertyEntryProperties.Get_ADsType: Integer;
-begin
- Result := DefaultInterface.Get_ADsType;
-end;
-
-procedure TPropertyEntryProperties.Set_ADsType(retval: Integer);
-begin
- DefaultInterface.Set_ADsType(retval);
-end;
-
-function TPropertyEntryProperties.Get_ControlCode: Integer;
-begin
- Result := DefaultInterface.Get_ControlCode;
-end;
-
-procedure TPropertyEntryProperties.Set_ControlCode(retval: Integer);
-begin
- DefaultInterface.Set_ControlCode(retval);
-end;
-
-function TPropertyEntryProperties.Get_Values: OleVariant;
-begin
- Result := DefaultInterface.Get_Values;
-end;
-
-procedure TPropertyEntryProperties.Set_Values(retval: OleVariant);
-begin
- DefaultInterface.Set_Values(retval);
-end;
-
-{$ENDIF}
-
-class function CoPropertyValue.Create: IADsPropertyValue;
-begin
- Result := CreateComObject(CLASS_PropertyValue) as IADsPropertyValue;
-end;
-
-class function CoPropertyValue.CreateRemote(const MachineName: string): IADsPropertyValue;
-begin
- Result := CreateRemoteComObject(MachineName, CLASS_PropertyValue) as IADsPropertyValue;
-end;
-
-procedure TPropertyValue.InitServerData;
-const
- CServerData: TServerData = (
- ClassID: '{7B9E38B0-A97C-11D0-8534-00C04FD8D503}';
- IntfIID: '{79FA9AD0-A97C-11D0-8534-00C04FD8D503}';
- EventIID: '';
- LicenseKey: nil;
- Version: 500);
-begin
- ServerData := @CServerData;
-end;
-
-procedure TPropertyValue.Connect;
-var
- punk: IUnknown;
-begin
- if FIntf = nil then
- begin
- punk := GetServer;
- Fintf:= punk as IADsPropertyValue;
- end;
-end;
-
-procedure TPropertyValue.ConnectTo(svrIntf: IADsPropertyValue);
-begin
- Disconnect;
- FIntf := svrIntf;
-end;
-
-procedure TPropertyValue.DisConnect;
-begin
- if Fintf <> nil then
- begin
- FIntf := nil;
- end;
-end;
-
-function TPropertyValue.GetDefaultInterface: IADsPropertyValue;
-begin
- if FIntf = nil then
- Connect;
- Assert(FIntf <> nil, 'DefaultInterface is NULL. Component is not connected to Server. You must call ''Connect'' or ''ConnectTo'' before this operation');
- Result := FIntf;
-end;
-
-constructor TPropertyValue.Create(AOwner: TComponent);
-begin
- inherited Create(AOwner);
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
- FProps := TPropertyValueProperties.Create(Self);
-{$ENDIF}
-end;
-
-destructor TPropertyValue.Destroy;
-begin
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
- FProps.Free;
-{$ENDIF}
- inherited Destroy;
-end;
-
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
-function TPropertyValue.GetServerProperties: TPropertyValueProperties;
-begin
- Result := FProps;
-end;
-{$ENDIF}
-
-function TPropertyValue.Get_ADsType: Integer;
-begin
- Result := DefaultInterface.Get_ADsType;
-end;
-
-procedure TPropertyValue.Set_ADsType(retval: Integer);
-begin
- DefaultInterface.Set_ADsType(retval);
-end;
-
-function TPropertyValue.Get_DNString: WideString;
-begin
- Result := DefaultInterface.Get_DNString;
-end;
-
-procedure TPropertyValue.Set_DNString(const retval: WideString);
-begin
- DefaultInterface.Set_DNString(retval);
-end;
-
-function TPropertyValue.Get_CaseExactString: WideString;
-begin
- Result := DefaultInterface.Get_CaseExactString;
-end;
-
-procedure TPropertyValue.Set_CaseExactString(const retval: WideString);
-begin
- DefaultInterface.Set_CaseExactString(retval);
-end;
-
-function TPropertyValue.Get_CaseIgnoreString: WideString;
-begin
- Result := DefaultInterface.Get_CaseIgnoreString;
-end;
-
-procedure TPropertyValue.Set_CaseIgnoreString(const retval: WideString);
-begin
- DefaultInterface.Set_CaseIgnoreString(retval);
-end;
-
-function TPropertyValue.Get_PrintableString: WideString;
-begin
- Result := DefaultInterface.Get_PrintableString;
-end;
-
-procedure TPropertyValue.Set_PrintableString(const retval: WideString);
-begin
- DefaultInterface.Set_PrintableString(retval);
-end;
-
-function TPropertyValue.Get_NumericString: WideString;
-begin
- Result := DefaultInterface.Get_NumericString;
-end;
-
-procedure TPropertyValue.Set_NumericString(const retval: WideString);
-begin
- DefaultInterface.Set_NumericString(retval);
-end;
-
-function TPropertyValue.Get_Boolean: Integer;
-begin
- Result := DefaultInterface.Get_Boolean;
-end;
-
-procedure TPropertyValue.Set_Boolean(retval: Integer);
-begin
- DefaultInterface.Set_Boolean(retval);
-end;
-
-function TPropertyValue.Get_Integer: Integer;
-begin
- Result := DefaultInterface.Get_Integer;
-end;
-
-procedure TPropertyValue.Set_Integer(retval: Integer);
-begin
- DefaultInterface.Set_Integer(retval);
-end;
-
-function TPropertyValue.Get_OctetString: OleVariant;
-begin
- Result := DefaultInterface.Get_OctetString;
-end;
-
-procedure TPropertyValue.Set_OctetString(retval: OleVariant);
-begin
- DefaultInterface.Set_OctetString(retval);
-end;
-
-function TPropertyValue.Get_SecurityDescriptor: IDispatch;
-begin
- Result := DefaultInterface.Get_SecurityDescriptor;
-end;
-
-procedure TPropertyValue.Set_SecurityDescriptor(const retval: IDispatch);
-begin
- DefaultInterface.Set_SecurityDescriptor(retval);
-end;
-
-function TPropertyValue.Get_LargeInteger: IDispatch;
-begin
- Result := DefaultInterface.Get_LargeInteger;
-end;
-
-procedure TPropertyValue.Set_LargeInteger(const retval: IDispatch);
-begin
- DefaultInterface.Set_LargeInteger(retval);
-end;
-
-function TPropertyValue.Get_UTCTime: TDateTime;
-begin
- Result := DefaultInterface.Get_UTCTime;
-end;
-
-procedure TPropertyValue.Set_UTCTime(retval: TDateTime);
-begin
- DefaultInterface.Set_UTCTime(retval);
-end;
-
-procedure TPropertyValue.Clear;
-begin
- DefaultInterface.Clear;
-end;
-
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
-constructor TPropertyValueProperties.Create(AServer: TPropertyValue);
-begin
- inherited Create;
- FServer := AServer;
-end;
-
-function TPropertyValueProperties.GetDefaultInterface: IADsPropertyValue;
-begin
- Result := FServer.DefaultInterface;
-end;
-
-function TPropertyValueProperties.Get_ADsType: Integer;
-begin
- Result := DefaultInterface.Get_ADsType;
-end;
-
-procedure TPropertyValueProperties.Set_ADsType(retval: Integer);
-begin
- DefaultInterface.Set_ADsType(retval);
-end;
-
-function TPropertyValueProperties.Get_DNString: WideString;
-begin
- Result := DefaultInterface.Get_DNString;
-end;
-
-procedure TPropertyValueProperties.Set_DNString(const retval: WideString);
-begin
- DefaultInterface.Set_DNString(retval);
-end;
-
-function TPropertyValueProperties.Get_CaseExactString: WideString;
-begin
- Result := DefaultInterface.Get_CaseExactString;
-end;
-
-procedure TPropertyValueProperties.Set_CaseExactString(const retval: WideString);
-begin
- DefaultInterface.Set_CaseExactString(retval);
-end;
-
-function TPropertyValueProperties.Get_CaseIgnoreString: WideString;
-begin
- Result := DefaultInterface.Get_CaseIgnoreString;
-end;
-
-procedure TPropertyValueProperties.Set_CaseIgnoreString(const retval: WideString);
-begin
- DefaultInterface.Set_CaseIgnoreString(retval);
-end;
-
-function TPropertyValueProperties.Get_PrintableString: WideString;
-begin
- Result := DefaultInterface.Get_PrintableString;
-end;
-
-procedure TPropertyValueProperties.Set_PrintableString(const retval: WideString);
-begin
- DefaultInterface.Set_PrintableString(retval);
-end;
-
-function TPropertyValueProperties.Get_NumericString: WideString;
-begin
- Result := DefaultInterface.Get_NumericString;
-end;
-
-procedure TPropertyValueProperties.Set_NumericString(const retval: WideString);
-begin
- DefaultInterface.Set_NumericString(retval);
-end;
-
-function TPropertyValueProperties.Get_Boolean: Integer;
-begin
- Result := DefaultInterface.Get_Boolean;
-end;
-
-procedure TPropertyValueProperties.Set_Boolean(retval: Integer);
-begin
- DefaultInterface.Set_Boolean(retval);
-end;
-
-function TPropertyValueProperties.Get_Integer: Integer;
-begin
- Result := DefaultInterface.Get_Integer;
-end;
-
-procedure TPropertyValueProperties.Set_Integer(retval: Integer);
-begin
- DefaultInterface.Set_Integer(retval);
-end;
-
-function TPropertyValueProperties.Get_OctetString: OleVariant;
-begin
- Result := DefaultInterface.Get_OctetString;
-end;
-
-procedure TPropertyValueProperties.Set_OctetString(retval: OleVariant);
-begin
- DefaultInterface.Set_OctetString(retval);
-end;
-
-function TPropertyValueProperties.Get_SecurityDescriptor: IDispatch;
-begin
- Result := DefaultInterface.Get_SecurityDescriptor;
-end;
-
-procedure TPropertyValueProperties.Set_SecurityDescriptor(const retval: IDispatch);
-begin
- DefaultInterface.Set_SecurityDescriptor(retval);
-end;
-
-function TPropertyValueProperties.Get_LargeInteger: IDispatch;
-begin
- Result := DefaultInterface.Get_LargeInteger;
-end;
-
-procedure TPropertyValueProperties.Set_LargeInteger(const retval: IDispatch);
-begin
- DefaultInterface.Set_LargeInteger(retval);
-end;
-
-function TPropertyValueProperties.Get_UTCTime: TDateTime;
-begin
- Result := DefaultInterface.Get_UTCTime;
-end;
-
-procedure TPropertyValueProperties.Set_UTCTime(retval: TDateTime);
-begin
- DefaultInterface.Set_UTCTime(retval);
-end;
-
-{$ENDIF}
-
-class function CoAccessControlEntry.Create: IADsAccessControlEntry;
-begin
- Result := CreateComObject(CLASS_AccessControlEntry) as IADsAccessControlEntry;
-end;
-
-class function CoAccessControlEntry.CreateRemote(const MachineName: string): IADsAccessControlEntry;
-begin
- Result := CreateRemoteComObject(MachineName, CLASS_AccessControlEntry) as IADsAccessControlEntry;
-end;
-
-procedure TAccessControlEntry.InitServerData;
-const
- CServerData: TServerData = (
- ClassID: '{B75AC000-9BDD-11D0-852C-00C04FD8D503}';
- IntfIID: '{B4F3A14C-9BDD-11D0-852C-00C04FD8D503}';
- EventIID: '';
- LicenseKey: nil;
- Version: 500);
-begin
- ServerData := @CServerData;
-end;
-
-procedure TAccessControlEntry.Connect;
-var
- punk: IUnknown;
-begin
- if FIntf = nil then
- begin
- punk := GetServer;
- Fintf:= punk as IADsAccessControlEntry;
- end;
-end;
-
-procedure TAccessControlEntry.ConnectTo(svrIntf: IADsAccessControlEntry);
-begin
- Disconnect;
- FIntf := svrIntf;
-end;
-
-procedure TAccessControlEntry.DisConnect;
-begin
- if Fintf <> nil then
- begin
- FIntf := nil;
- end;
-end;
-
-function TAccessControlEntry.GetDefaultInterface: IADsAccessControlEntry;
-begin
- if FIntf = nil then
- Connect;
- Assert(FIntf <> nil, 'DefaultInterface is NULL. Component is not connected to Server. You must call ''Connect'' or ''ConnectTo'' before this operation');
- Result := FIntf;
-end;
-
-constructor TAccessControlEntry.Create(AOwner: TComponent);
-begin
- inherited Create(AOwner);
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
- FProps := TAccessControlEntryProperties.Create(Self);
-{$ENDIF}
-end;
-
-destructor TAccessControlEntry.Destroy;
-begin
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
- FProps.Free;
-{$ENDIF}
- inherited Destroy;
-end;
-
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
-function TAccessControlEntry.GetServerProperties: TAccessControlEntryProperties;
-begin
- Result := FProps;
-end;
-{$ENDIF}
-
-function TAccessControlEntry.Get_AccessMask: Integer;
-begin
- Result := DefaultInterface.Get_AccessMask;
-end;
-
-procedure TAccessControlEntry.Set_AccessMask(retval: Integer);
-begin
- DefaultInterface.Set_AccessMask(retval);
-end;
-
-function TAccessControlEntry.Get_AceType: Integer;
-begin
- Result := DefaultInterface.Get_AceType;
-end;
-
-procedure TAccessControlEntry.Set_AceType(retval: Integer);
-begin
- DefaultInterface.Set_AceType(retval);
-end;
-
-function TAccessControlEntry.Get_AceFlags: Integer;
-begin
- Result := DefaultInterface.Get_AceFlags;
-end;
-
-procedure TAccessControlEntry.Set_AceFlags(retval: Integer);
-begin
- DefaultInterface.Set_AceFlags(retval);
-end;
-
-function TAccessControlEntry.Get_Flags: Integer;
-begin
- Result := DefaultInterface.Get_Flags;
-end;
-
-procedure TAccessControlEntry.Set_Flags(retval: Integer);
-begin
- DefaultInterface.Set_Flags(retval);
-end;
-
-function TAccessControlEntry.Get_ObjectType: WideString;
-begin
- Result := DefaultInterface.Get_ObjectType;
-end;
-
-procedure TAccessControlEntry.Set_ObjectType(const retval: WideString);
-begin
- DefaultInterface.Set_ObjectType(retval);
-end;
-
-function TAccessControlEntry.Get_InheritedObjectType: WideString;
-begin
- Result := DefaultInterface.Get_InheritedObjectType;
-end;
-
-procedure TAccessControlEntry.Set_InheritedObjectType(const retval: WideString);
-begin
- DefaultInterface.Set_InheritedObjectType(retval);
-end;
-
-function TAccessControlEntry.Get_Trustee: WideString;
-begin
- Result := DefaultInterface.Get_Trustee;
-end;
-
-procedure TAccessControlEntry.Set_Trustee(const retval: WideString);
-begin
- DefaultInterface.Set_Trustee(retval);
-end;
-
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
-constructor TAccessControlEntryProperties.Create(AServer: TAccessControlEntry);
-begin
- inherited Create;
- FServer := AServer;
-end;
-
-function TAccessControlEntryProperties.GetDefaultInterface: IADsAccessControlEntry;
-begin
- Result := FServer.DefaultInterface;
-end;
-
-function TAccessControlEntryProperties.Get_AccessMask: Integer;
-begin
- Result := DefaultInterface.Get_AccessMask;
-end;
-
-procedure TAccessControlEntryProperties.Set_AccessMask(retval: Integer);
-begin
- DefaultInterface.Set_AccessMask(retval);
-end;
-
-function TAccessControlEntryProperties.Get_AceType: Integer;
-begin
- Result := DefaultInterface.Get_AceType;
-end;
-
-procedure TAccessControlEntryProperties.Set_AceType(retval: Integer);
-begin
- DefaultInterface.Set_AceType(retval);
-end;
-
-function TAccessControlEntryProperties.Get_AceFlags: Integer;
-begin
- Result := DefaultInterface.Get_AceFlags;
-end;
-
-procedure TAccessControlEntryProperties.Set_AceFlags(retval: Integer);
-begin
- DefaultInterface.Set_AceFlags(retval);
-end;
-
-function TAccessControlEntryProperties.Get_Flags: Integer;
-begin
- Result := DefaultInterface.Get_Flags;
-end;
-
-procedure TAccessControlEntryProperties.Set_Flags(retval: Integer);
-begin
- DefaultInterface.Set_Flags(retval);
-end;
-
-function TAccessControlEntryProperties.Get_ObjectType: WideString;
-begin
- Result := DefaultInterface.Get_ObjectType;
-end;
-
-procedure TAccessControlEntryProperties.Set_ObjectType(const retval: WideString);
-begin
- DefaultInterface.Set_ObjectType(retval);
-end;
-
-function TAccessControlEntryProperties.Get_InheritedObjectType: WideString;
-begin
- Result := DefaultInterface.Get_InheritedObjectType;
-end;
-
-procedure TAccessControlEntryProperties.Set_InheritedObjectType(const retval: WideString);
-begin
- DefaultInterface.Set_InheritedObjectType(retval);
-end;
-
-function TAccessControlEntryProperties.Get_Trustee: WideString;
-begin
- Result := DefaultInterface.Get_Trustee;
-end;
-
-procedure TAccessControlEntryProperties.Set_Trustee(const retval: WideString);
-begin
- DefaultInterface.Set_Trustee(retval);
-end;
-
-{$ENDIF}
-
-class function CoAccessControlList.Create: IADsAccessControlList;
-begin
- Result := CreateComObject(CLASS_AccessControlList) as IADsAccessControlList;
-end;
-
-class function CoAccessControlList.CreateRemote(const MachineName: string): IADsAccessControlList;
-begin
- Result := CreateRemoteComObject(MachineName, CLASS_AccessControlList) as IADsAccessControlList;
-end;
-
-procedure TAccessControlList.InitServerData;
-const
- CServerData: TServerData = (
- ClassID: '{B85EA052-9BDD-11D0-852C-00C04FD8D503}';
- IntfIID: '{B7EE91CC-9BDD-11D0-852C-00C04FD8D503}';
- EventIID: '';
- LicenseKey: nil;
- Version: 500);
-begin
- ServerData := @CServerData;
-end;
-
-procedure TAccessControlList.Connect;
-var
- punk: IUnknown;
-begin
- if FIntf = nil then
- begin
- punk := GetServer;
- Fintf:= punk as IADsAccessControlList;
- end;
-end;
-
-procedure TAccessControlList.ConnectTo(svrIntf: IADsAccessControlList);
-begin
- Disconnect;
- FIntf := svrIntf;
-end;
-
-procedure TAccessControlList.DisConnect;
-begin
- if Fintf <> nil then
- begin
- FIntf := nil;
- end;
-end;
-
-function TAccessControlList.GetDefaultInterface: IADsAccessControlList;
-begin
- if FIntf = nil then
- Connect;
- Assert(FIntf <> nil, 'DefaultInterface is NULL. Component is not connected to Server. You must call ''Connect'' or ''ConnectTo'' before this operation');
- Result := FIntf;
-end;
-
-constructor TAccessControlList.Create(AOwner: TComponent);
-begin
- inherited Create(AOwner);
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
- FProps := TAccessControlListProperties.Create(Self);
-{$ENDIF}
-end;
-
-destructor TAccessControlList.Destroy;
-begin
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
- FProps.Free;
-{$ENDIF}
- inherited Destroy;
-end;
-
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
-function TAccessControlList.GetServerProperties: TAccessControlListProperties;
-begin
- Result := FProps;
-end;
-{$ENDIF}
-
-function TAccessControlList.Get_AclRevision: Integer;
-begin
- Result := DefaultInterface.Get_AclRevision;
-end;
-
-procedure TAccessControlList.Set_AclRevision(retval: Integer);
-begin
- DefaultInterface.Set_AclRevision(retval);
-end;
-
-function TAccessControlList.Get_AceCount: Integer;
-begin
- Result := DefaultInterface.Get_AceCount;
-end;
-
-procedure TAccessControlList.Set_AceCount(retval: Integer);
-begin
- DefaultInterface.Set_AceCount(retval);
-end;
-
-procedure TAccessControlList.AddAce(const pAccessControlEntry: IDispatch);
-begin
- DefaultInterface.AddAce(pAccessControlEntry);
-end;
-
-procedure TAccessControlList.RemoveAce(const pAccessControlEntry: IDispatch);
-begin
- DefaultInterface.RemoveAce(pAccessControlEntry);
-end;
-
-function TAccessControlList.CopyAccessList: IDispatch;
-begin
- Result := DefaultInterface.CopyAccessList;
-end;
-
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
-constructor TAccessControlListProperties.Create(AServer: TAccessControlList);
-begin
- inherited Create;
- FServer := AServer;
-end;
-
-function TAccessControlListProperties.GetDefaultInterface: IADsAccessControlList;
-begin
- Result := FServer.DefaultInterface;
-end;
-
-function TAccessControlListProperties.Get_AclRevision: Integer;
-begin
- Result := DefaultInterface.Get_AclRevision;
-end;
-
-procedure TAccessControlListProperties.Set_AclRevision(retval: Integer);
-begin
- DefaultInterface.Set_AclRevision(retval);
-end;
-
-function TAccessControlListProperties.Get_AceCount: Integer;
-begin
- Result := DefaultInterface.Get_AceCount;
-end;
-
-procedure TAccessControlListProperties.Set_AceCount(retval: Integer);
-begin
- DefaultInterface.Set_AceCount(retval);
-end;
-
-{$ENDIF}
-
-class function CoSecurityDescriptor.Create: IADsSecurityDescriptor;
-begin
- Result := CreateComObject(CLASS_SecurityDescriptor) as IADsSecurityDescriptor;
-end;
-
-class function CoSecurityDescriptor.CreateRemote(const MachineName: string): IADsSecurityDescriptor;
-begin
- Result := CreateRemoteComObject(MachineName, CLASS_SecurityDescriptor) as IADsSecurityDescriptor;
-end;
-
-procedure TSecurityDescriptor.InitServerData;
-const
- CServerData: TServerData = (
- ClassID: '{B958F73C-9BDD-11D0-852C-00C04FD8D503}';
- IntfIID: '{B8C787CA-9BDD-11D0-852C-00C04FD8D503}';
- EventIID: '';
- LicenseKey: nil;
- Version: 500);
-begin
- ServerData := @CServerData;
-end;
-
-procedure TSecurityDescriptor.Connect;
-var
- punk: IUnknown;
-begin
- if FIntf = nil then
- begin
- punk := GetServer;
- Fintf:= punk as IADsSecurityDescriptor;
- end;
-end;
-
-procedure TSecurityDescriptor.ConnectTo(svrIntf: IADsSecurityDescriptor);
-begin
- Disconnect;
- FIntf := svrIntf;
-end;
-
-procedure TSecurityDescriptor.DisConnect;
-begin
- if Fintf <> nil then
- begin
- FIntf := nil;
- end;
-end;
-
-function TSecurityDescriptor.GetDefaultInterface: IADsSecurityDescriptor;
-begin
- if FIntf = nil then
- Connect;
- Assert(FIntf <> nil, 'DefaultInterface is NULL. Component is not connected to Server. You must call ''Connect'' or ''ConnectTo'' before this operation');
- Result := FIntf;
-end;
-
-constructor TSecurityDescriptor.Create(AOwner: TComponent);
-begin
- inherited Create(AOwner);
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
- FProps := TSecurityDescriptorProperties.Create(Self);
-{$ENDIF}
-end;
-
-destructor TSecurityDescriptor.Destroy;
-begin
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
- FProps.Free;
-{$ENDIF}
- inherited Destroy;
-end;
-
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
-function TSecurityDescriptor.GetServerProperties: TSecurityDescriptorProperties;
-begin
- Result := FProps;
-end;
-{$ENDIF}
-
-function TSecurityDescriptor.Get_Revision: Integer;
-begin
- Result := DefaultInterface.Get_Revision;
-end;
-
-procedure TSecurityDescriptor.Set_Revision(retval: Integer);
-begin
- DefaultInterface.Set_Revision(retval);
-end;
-
-function TSecurityDescriptor.Get_Control: Integer;
-begin
- Result := DefaultInterface.Get_Control;
-end;
-
-procedure TSecurityDescriptor.Set_Control(retval: Integer);
-begin
- DefaultInterface.Set_Control(retval);
-end;
-
-function TSecurityDescriptor.Get_Owner: WideString;
-begin
- Result := DefaultInterface.Get_Owner;
-end;
-
-procedure TSecurityDescriptor.Set_Owner(const retval: WideString);
-begin
- DefaultInterface.Set_Owner(retval);
-end;
-
-function TSecurityDescriptor.Get_OwnerDefaulted: WordBool;
-begin
- Result := DefaultInterface.Get_OwnerDefaulted;
-end;
-
-procedure TSecurityDescriptor.Set_OwnerDefaulted(retval: WordBool);
-begin
- DefaultInterface.Set_OwnerDefaulted(retval);
-end;
-
-function TSecurityDescriptor.Get_Group: WideString;
-begin
- Result := DefaultInterface.Get_Group;
-end;
-
-procedure TSecurityDescriptor.Set_Group(const retval: WideString);
-begin
- DefaultInterface.Set_Group(retval);
-end;
-
-function TSecurityDescriptor.Get_GroupDefaulted: WordBool;
-begin
- Result := DefaultInterface.Get_GroupDefaulted;
-end;
-
-procedure TSecurityDescriptor.Set_GroupDefaulted(retval: WordBool);
-begin
- DefaultInterface.Set_GroupDefaulted(retval);
-end;
-
-function TSecurityDescriptor.Get_DiscretionaryAcl: IDispatch;
-begin
- Result := DefaultInterface.Get_DiscretionaryAcl;
-end;
-
-procedure TSecurityDescriptor.Set_DiscretionaryAcl(const retval: IDispatch);
-begin
- DefaultInterface.Set_DiscretionaryAcl(retval);
-end;
-
-function TSecurityDescriptor.Get_DaclDefaulted: WordBool;
-begin
- Result := DefaultInterface.Get_DaclDefaulted;
-end;
-
-procedure TSecurityDescriptor.Set_DaclDefaulted(retval: WordBool);
-begin
- DefaultInterface.Set_DaclDefaulted(retval);
-end;
-
-function TSecurityDescriptor.Get_SystemAcl: IDispatch;
-begin
- Result := DefaultInterface.Get_SystemAcl;
-end;
-
-procedure TSecurityDescriptor.Set_SystemAcl(const retval: IDispatch);
-begin
- DefaultInterface.Set_SystemAcl(retval);
-end;
-
-function TSecurityDescriptor.Get_SaclDefaulted: WordBool;
-begin
- Result := DefaultInterface.Get_SaclDefaulted;
-end;
-
-procedure TSecurityDescriptor.Set_SaclDefaulted(retval: WordBool);
-begin
- DefaultInterface.Set_SaclDefaulted(retval);
-end;
-
-function TSecurityDescriptor.CopySecurityDescriptor: IDispatch;
-begin
- Result := DefaultInterface.CopySecurityDescriptor;
-end;
-
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
-constructor TSecurityDescriptorProperties.Create(AServer: TSecurityDescriptor);
-begin
- inherited Create;
- FServer := AServer;
-end;
-
-function TSecurityDescriptorProperties.GetDefaultInterface: IADsSecurityDescriptor;
-begin
- Result := FServer.DefaultInterface;
-end;
-
-function TSecurityDescriptorProperties.Get_Revision: Integer;
-begin
- Result := DefaultInterface.Get_Revision;
-end;
-
-procedure TSecurityDescriptorProperties.Set_Revision(retval: Integer);
-begin
- DefaultInterface.Set_Revision(retval);
-end;
-
-function TSecurityDescriptorProperties.Get_Control: Integer;
-begin
- Result := DefaultInterface.Get_Control;
-end;
-
-procedure TSecurityDescriptorProperties.Set_Control(retval: Integer);
-begin
- DefaultInterface.Set_Control(retval);
-end;
-
-function TSecurityDescriptorProperties.Get_Owner: WideString;
-begin
- Result := DefaultInterface.Get_Owner;
-end;
-
-procedure TSecurityDescriptorProperties.Set_Owner(const retval: WideString);
-begin
- DefaultInterface.Set_Owner(retval);
-end;
-
-function TSecurityDescriptorProperties.Get_OwnerDefaulted: WordBool;
-begin
- Result := DefaultInterface.Get_OwnerDefaulted;
-end;
-
-procedure TSecurityDescriptorProperties.Set_OwnerDefaulted(retval: WordBool);
-begin
- DefaultInterface.Set_OwnerDefaulted(retval);
-end;
-
-function TSecurityDescriptorProperties.Get_Group: WideString;
-begin
- Result := DefaultInterface.Get_Group;
-end;
-
-procedure TSecurityDescriptorProperties.Set_Group(const retval: WideString);
-begin
- DefaultInterface.Set_Group(retval);
-end;
-
-function TSecurityDescriptorProperties.Get_GroupDefaulted: WordBool;
-begin
- Result := DefaultInterface.Get_GroupDefaulted;
-end;
-
-procedure TSecurityDescriptorProperties.Set_GroupDefaulted(retval: WordBool);
-begin
- DefaultInterface.Set_GroupDefaulted(retval);
-end;
-
-function TSecurityDescriptorProperties.Get_DiscretionaryAcl: IDispatch;
-begin
- Result := DefaultInterface.Get_DiscretionaryAcl;
-end;
-
-procedure TSecurityDescriptorProperties.Set_DiscretionaryAcl(const retval: IDispatch);
-begin
- DefaultInterface.Set_DiscretionaryAcl(retval);
-end;
-
-function TSecurityDescriptorProperties.Get_DaclDefaulted: WordBool;
-begin
- Result := DefaultInterface.Get_DaclDefaulted;
-end;
-
-procedure TSecurityDescriptorProperties.Set_DaclDefaulted(retval: WordBool);
-begin
- DefaultInterface.Set_DaclDefaulted(retval);
-end;
-
-function TSecurityDescriptorProperties.Get_SystemAcl: IDispatch;
-begin
- Result := DefaultInterface.Get_SystemAcl;
-end;
-
-procedure TSecurityDescriptorProperties.Set_SystemAcl(const retval: IDispatch);
-begin
- DefaultInterface.Set_SystemAcl(retval);
-end;
-
-function TSecurityDescriptorProperties.Get_SaclDefaulted: WordBool;
-begin
- Result := DefaultInterface.Get_SaclDefaulted;
-end;
-
-procedure TSecurityDescriptorProperties.Set_SaclDefaulted(retval: WordBool);
-begin
- DefaultInterface.Set_SaclDefaulted(retval);
-end;
-
-{$ENDIF}
-
-class function CoLargeInteger.Create: IADsLargeInteger;
-begin
- Result := CreateComObject(CLASS_LargeInteger) as IADsLargeInteger;
-end;
-
-class function CoLargeInteger.CreateRemote(const MachineName: string): IADsLargeInteger;
-begin
- Result := CreateRemoteComObject(MachineName, CLASS_LargeInteger) as IADsLargeInteger;
-end;
-
-procedure TLargeInteger.InitServerData;
-const
- CServerData: TServerData = (
- ClassID: '{927971F5-0939-11D1-8BE1-00C04FD8D503}';
- IntfIID: '{9068270B-0939-11D1-8BE1-00C04FD8D503}';
- EventIID: '';
- LicenseKey: nil;
- Version: 500);
-begin
- ServerData := @CServerData;
-end;
-
-procedure TLargeInteger.Connect;
-var
- punk: IUnknown;
-begin
- if FIntf = nil then
- begin
- punk := GetServer;
- Fintf:= punk as IADsLargeInteger;
- end;
-end;
-
-procedure TLargeInteger.ConnectTo(svrIntf: IADsLargeInteger);
-begin
- Disconnect;
- FIntf := svrIntf;
-end;
-
-procedure TLargeInteger.DisConnect;
-begin
- if Fintf <> nil then
- begin
- FIntf := nil;
- end;
-end;
-
-function TLargeInteger.GetDefaultInterface: IADsLargeInteger;
-begin
- if FIntf = nil then
- Connect;
- Assert(FIntf <> nil, 'DefaultInterface is NULL. Component is not connected to Server. You must call ''Connect'' or ''ConnectTo'' before this operation');
- Result := FIntf;
-end;
-
-constructor TLargeInteger.Create(AOwner: TComponent);
-begin
- inherited Create(AOwner);
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
- FProps := TLargeIntegerProperties.Create(Self);
-{$ENDIF}
-end;
-
-destructor TLargeInteger.Destroy;
-begin
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
- FProps.Free;
-{$ENDIF}
- inherited Destroy;
-end;
-
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
-function TLargeInteger.GetServerProperties: TLargeIntegerProperties;
-begin
- Result := FProps;
-end;
-{$ENDIF}
-
-function TLargeInteger.Get_HighPart: Integer;
-begin
- Result := DefaultInterface.Get_HighPart;
-end;
-
-procedure TLargeInteger.Set_HighPart(retval: Integer);
-begin
- DefaultInterface.Set_HighPart(retval);
-end;
-
-function TLargeInteger.Get_LowPart: Integer;
-begin
- Result := DefaultInterface.Get_LowPart;
-end;
-
-procedure TLargeInteger.Set_LowPart(retval: Integer);
-begin
- DefaultInterface.Set_LowPart(retval);
-end;
-
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
-constructor TLargeIntegerProperties.Create(AServer: TLargeInteger);
-begin
- inherited Create;
- FServer := AServer;
-end;
-
-function TLargeIntegerProperties.GetDefaultInterface: IADsLargeInteger;
-begin
- Result := FServer.DefaultInterface;
-end;
-
-function TLargeIntegerProperties.Get_HighPart: Integer;
-begin
- Result := DefaultInterface.Get_HighPart;
-end;
-
-procedure TLargeIntegerProperties.Set_HighPart(retval: Integer);
-begin
- DefaultInterface.Set_HighPart(retval);
-end;
-
-function TLargeIntegerProperties.Get_LowPart: Integer;
-begin
- Result := DefaultInterface.Get_LowPart;
-end;
-
-procedure TLargeIntegerProperties.Set_LowPart(retval: Integer);
-begin
- DefaultInterface.Set_LowPart(retval);
-end;
-
-{$ENDIF}
-
-class function CoNameTranslate.Create: IADsNameTranslate;
-begin
- Result := CreateComObject(CLASS_NameTranslate) as IADsNameTranslate;
-end;
-
-class function CoNameTranslate.CreateRemote(const MachineName: string): IADsNameTranslate;
-begin
- Result := CreateRemoteComObject(MachineName, CLASS_NameTranslate) as IADsNameTranslate;
-end;
-
-procedure TNameTranslate.InitServerData;
-const
- CServerData: TServerData = (
- ClassID: '{274FAE1F-3626-11D1-A3A4-00C04FB950DC}';
- IntfIID: '{B1B272A3-3625-11D1-A3A4-00C04FB950DC}';
- EventIID: '';
- LicenseKey: nil;
- Version: 500);
-begin
- ServerData := @CServerData;
-end;
-
-procedure TNameTranslate.Connect;
-var
- punk: IUnknown;
-begin
- if FIntf = nil then
- begin
- punk := GetServer;
- Fintf:= punk as IADsNameTranslate;
- end;
-end;
-
-procedure TNameTranslate.ConnectTo(svrIntf: IADsNameTranslate);
-begin
- Disconnect;
- FIntf := svrIntf;
-end;
-
-procedure TNameTranslate.DisConnect;
-begin
- if Fintf <> nil then
- begin
- FIntf := nil;
- end;
-end;
-
-function TNameTranslate.GetDefaultInterface: IADsNameTranslate;
-begin
- if FIntf = nil then
- Connect;
- Assert(FIntf <> nil, 'DefaultInterface is NULL. Component is not connected to Server. You must call ''Connect'' or ''ConnectTo'' before this operation');
- Result := FIntf;
-end;
-
-constructor TNameTranslate.Create(AOwner: TComponent);
-begin
- inherited Create(AOwner);
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
- FProps := TNameTranslateProperties.Create(Self);
-{$ENDIF}
-end;
-
-destructor TNameTranslate.Destroy;
-begin
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
- FProps.Free;
-{$ENDIF}
- inherited Destroy;
-end;
-
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
-function TNameTranslate.GetServerProperties: TNameTranslateProperties;
-begin
- Result := FProps;
-end;
-{$ENDIF}
-
-procedure TNameTranslate.Set_ChaseReferral(Param1: Integer);
-begin
- DefaultInterface.Set_ChaseReferral(Param1);
-end;
-
-procedure TNameTranslate.Init(lnSetType: Integer; const bstrADsPath: WideString);
-begin
- DefaultInterface.Init(lnSetType, bstrADsPath);
-end;
-
-procedure TNameTranslate.InitEx(lnSetType: Integer; const bstrADsPath: WideString;
- const bstrUserID: WideString; const bstrDomain: WideString;
- const bstrPassword: WideString);
-begin
- DefaultInterface.InitEx(lnSetType, bstrADsPath, bstrUserID, bstrDomain, bstrPassword);
-end;
-
-procedure TNameTranslate.Set_(lnSetType: Integer; const bstrADsPath: WideString);
-begin
- DefaultInterface.Set_(lnSetType, bstrADsPath);
-end;
-
-function TNameTranslate.Get(lnFormatType: Integer): WideString;
-begin
- Result := DefaultInterface.Get(lnFormatType);
-end;
-
-procedure TNameTranslate.SetEx(lnFormatType: Integer; pVar: OleVariant);
-begin
- DefaultInterface.SetEx(lnFormatType, pVar);
-end;
-
-function TNameTranslate.GetEx(lnFormatType: Integer): OleVariant;
-begin
- Result := DefaultInterface.GetEx(lnFormatType);
-end;
-
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
-constructor TNameTranslateProperties.Create(AServer: TNameTranslate);
-begin
- inherited Create;
- FServer := AServer;
-end;
-
-function TNameTranslateProperties.GetDefaultInterface: IADsNameTranslate;
-begin
- Result := FServer.DefaultInterface;
-end;
-
-procedure TNameTranslateProperties.Set_ChaseReferral(Param1: Integer);
-begin
- DefaultInterface.Set_ChaseReferral(Param1);
-end;
-
-{$ENDIF}
-
-class function CoCaseIgnoreList.Create: IADsCaseIgnoreList;
-begin
- Result := CreateComObject(CLASS_CaseIgnoreList) as IADsCaseIgnoreList;
-end;
-
-class function CoCaseIgnoreList.CreateRemote(const MachineName: string): IADsCaseIgnoreList;
-begin
- Result := CreateRemoteComObject(MachineName, CLASS_CaseIgnoreList) as IADsCaseIgnoreList;
-end;
-
-procedure TCaseIgnoreList.InitServerData;
-const
- CServerData: TServerData = (
- ClassID: '{15F88A55-4680-11D1-A3B4-00C04FB950DC}';
- IntfIID: '{7B66B533-4680-11D1-A3B4-00C04FB950DC}';
- EventIID: '';
- LicenseKey: nil;
- Version: 500);
-begin
- ServerData := @CServerData;
-end;
-
-procedure TCaseIgnoreList.Connect;
-var
- punk: IUnknown;
-begin
- if FIntf = nil then
- begin
- punk := GetServer;
- Fintf:= punk as IADsCaseIgnoreList;
- end;
-end;
-
-procedure TCaseIgnoreList.ConnectTo(svrIntf: IADsCaseIgnoreList);
-begin
- Disconnect;
- FIntf := svrIntf;
-end;
-
-procedure TCaseIgnoreList.DisConnect;
-begin
- if Fintf <> nil then
- begin
- FIntf := nil;
- end;
-end;
-
-function TCaseIgnoreList.GetDefaultInterface: IADsCaseIgnoreList;
-begin
- if FIntf = nil then
- Connect;
- Assert(FIntf <> nil, 'DefaultInterface is NULL. Component is not connected to Server. You must call ''Connect'' or ''ConnectTo'' before this operation');
- Result := FIntf;
-end;
-
-constructor TCaseIgnoreList.Create(AOwner: TComponent);
-begin
- inherited Create(AOwner);
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
- FProps := TCaseIgnoreListProperties.Create(Self);
-{$ENDIF}
-end;
-
-destructor TCaseIgnoreList.Destroy;
-begin
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
- FProps.Free;
-{$ENDIF}
- inherited Destroy;
-end;
-
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
-function TCaseIgnoreList.GetServerProperties: TCaseIgnoreListProperties;
-begin
- Result := FProps;
-end;
-{$ENDIF}
-
-function TCaseIgnoreList.Get_CaseIgnoreList: OleVariant;
-begin
- Result := DefaultInterface.Get_CaseIgnoreList;
-end;
-
-procedure TCaseIgnoreList.Set_CaseIgnoreList(retval: OleVariant);
-begin
- DefaultInterface.Set_CaseIgnoreList(retval);
-end;
-
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
-constructor TCaseIgnoreListProperties.Create(AServer: TCaseIgnoreList);
-begin
- inherited Create;
- FServer := AServer;
-end;
-
-function TCaseIgnoreListProperties.GetDefaultInterface: IADsCaseIgnoreList;
-begin
- Result := FServer.DefaultInterface;
-end;
-
-function TCaseIgnoreListProperties.Get_CaseIgnoreList: OleVariant;
-begin
- Result := DefaultInterface.Get_CaseIgnoreList;
-end;
-
-procedure TCaseIgnoreListProperties.Set_CaseIgnoreList(retval: OleVariant);
-begin
- DefaultInterface.Set_CaseIgnoreList(retval);
-end;
-
-{$ENDIF}
-
-class function CoFaxNumber.Create: IADsFaxNumber;
-begin
- Result := CreateComObject(CLASS_FaxNumber) as IADsFaxNumber;
-end;
-
-class function CoFaxNumber.CreateRemote(const MachineName: string): IADsFaxNumber;
-begin
- Result := CreateRemoteComObject(MachineName, CLASS_FaxNumber) as IADsFaxNumber;
-end;
-
-procedure TFaxNumber.InitServerData;
-const
- CServerData: TServerData = (
- ClassID: '{A5062215-4681-11D1-A3B4-00C04FB950DC}';
- IntfIID: '{A910DEA9-4680-11D1-A3B4-00C04FB950DC}';
- EventIID: '';
- LicenseKey: nil;
- Version: 500);
-begin
- ServerData := @CServerData;
-end;
-
-procedure TFaxNumber.Connect;
-var
- punk: IUnknown;
-begin
- if FIntf = nil then
- begin
- punk := GetServer;
- Fintf:= punk as IADsFaxNumber;
- end;
-end;
-
-procedure TFaxNumber.ConnectTo(svrIntf: IADsFaxNumber);
-begin
- Disconnect;
- FIntf := svrIntf;
-end;
-
-procedure TFaxNumber.DisConnect;
-begin
- if Fintf <> nil then
- begin
- FIntf := nil;
- end;
-end;
-
-function TFaxNumber.GetDefaultInterface: IADsFaxNumber;
-begin
- if FIntf = nil then
- Connect;
- Assert(FIntf <> nil, 'DefaultInterface is NULL. Component is not connected to Server. You must call ''Connect'' or ''ConnectTo'' before this operation');
- Result := FIntf;
-end;
-
-constructor TFaxNumber.Create(AOwner: TComponent);
-begin
- inherited Create(AOwner);
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
- FProps := TFaxNumberProperties.Create(Self);
-{$ENDIF}
-end;
-
-destructor TFaxNumber.Destroy;
-begin
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
- FProps.Free;
-{$ENDIF}
- inherited Destroy;
-end;
-
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
-function TFaxNumber.GetServerProperties: TFaxNumberProperties;
-begin
- Result := FProps;
-end;
-{$ENDIF}
-
-function TFaxNumber.Get_TelephoneNumber: WideString;
-begin
- Result := DefaultInterface.Get_TelephoneNumber;
-end;
-
-procedure TFaxNumber.Set_TelephoneNumber(const retval: WideString);
-begin
- DefaultInterface.Set_TelephoneNumber(retval);
-end;
-
-function TFaxNumber.Get_Parameters: OleVariant;
-begin
- Result := DefaultInterface.Get_Parameters;
-end;
-
-procedure TFaxNumber.Set_Parameters(retval: OleVariant);
-begin
- DefaultInterface.Set_Parameters(retval);
-end;
-
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
-constructor TFaxNumberProperties.Create(AServer: TFaxNumber);
-begin
- inherited Create;
- FServer := AServer;
-end;
-
-function TFaxNumberProperties.GetDefaultInterface: IADsFaxNumber;
-begin
- Result := FServer.DefaultInterface;
-end;
-
-function TFaxNumberProperties.Get_TelephoneNumber: WideString;
-begin
- Result := DefaultInterface.Get_TelephoneNumber;
-end;
-
-procedure TFaxNumberProperties.Set_TelephoneNumber(const retval: WideString);
-begin
- DefaultInterface.Set_TelephoneNumber(retval);
-end;
-
-function TFaxNumberProperties.Get_Parameters: OleVariant;
-begin
- Result := DefaultInterface.Get_Parameters;
-end;
-
-procedure TFaxNumberProperties.Set_Parameters(retval: OleVariant);
-begin
- DefaultInterface.Set_Parameters(retval);
-end;
-
-{$ENDIF}
-
-class function CoNetAddress.Create: IADsNetAddress;
-begin
- Result := CreateComObject(CLASS_NetAddress) as IADsNetAddress;
-end;
-
-class function CoNetAddress.CreateRemote(const MachineName: string): IADsNetAddress;
-begin
- Result := CreateRemoteComObject(MachineName, CLASS_NetAddress) as IADsNetAddress;
-end;
-
-procedure TNetAddress.InitServerData;
-const
- CServerData: TServerData = (
- ClassID: '{B0B71247-4080-11D1-A3AC-00C04FB950DC}';
- IntfIID: '{B21A50A9-4080-11D1-A3AC-00C04FB950DC}';
- EventIID: '';
- LicenseKey: nil;
- Version: 500);
-begin
- ServerData := @CServerData;
-end;
-
-procedure TNetAddress.Connect;
-var
- punk: IUnknown;
-begin
- if FIntf = nil then
- begin
- punk := GetServer;
- Fintf:= punk as IADsNetAddress;
- end;
-end;
-
-procedure TNetAddress.ConnectTo(svrIntf: IADsNetAddress);
-begin
- Disconnect;
- FIntf := svrIntf;
-end;
-
-procedure TNetAddress.DisConnect;
-begin
- if Fintf <> nil then
- begin
- FIntf := nil;
- end;
-end;
-
-function TNetAddress.GetDefaultInterface: IADsNetAddress;
-begin
- if FIntf = nil then
- Connect;
- Assert(FIntf <> nil, 'DefaultInterface is NULL. Component is not connected to Server. You must call ''Connect'' or ''ConnectTo'' before this operation');
- Result := FIntf;
-end;
-
-constructor TNetAddress.Create(AOwner: TComponent);
-begin
- inherited Create(AOwner);
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
- FProps := TNetAddressProperties.Create(Self);
-{$ENDIF}
-end;
-
-destructor TNetAddress.Destroy;
-begin
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
- FProps.Free;
-{$ENDIF}
- inherited Destroy;
-end;
-
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
-function TNetAddress.GetServerProperties: TNetAddressProperties;
-begin
- Result := FProps;
-end;
-{$ENDIF}
-
-function TNetAddress.Get_AddressType: Integer;
-begin
- Result := DefaultInterface.Get_AddressType;
-end;
-
-procedure TNetAddress.Set_AddressType(retval: Integer);
-begin
- DefaultInterface.Set_AddressType(retval);
-end;
-
-function TNetAddress.Get_Address: OleVariant;
-begin
- Result := DefaultInterface.Get_Address;
-end;
-
-procedure TNetAddress.Set_Address(retval: OleVariant);
-begin
- DefaultInterface.Set_Address(retval);
-end;
-
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
-constructor TNetAddressProperties.Create(AServer: TNetAddress);
-begin
- inherited Create;
- FServer := AServer;
-end;
-
-function TNetAddressProperties.GetDefaultInterface: IADsNetAddress;
-begin
- Result := FServer.DefaultInterface;
-end;
-
-function TNetAddressProperties.Get_AddressType: Integer;
-begin
- Result := DefaultInterface.Get_AddressType;
-end;
-
-procedure TNetAddressProperties.Set_AddressType(retval: Integer);
-begin
- DefaultInterface.Set_AddressType(retval);
-end;
-
-function TNetAddressProperties.Get_Address: OleVariant;
-begin
- Result := DefaultInterface.Get_Address;
-end;
-
-procedure TNetAddressProperties.Set_Address(retval: OleVariant);
-begin
- DefaultInterface.Set_Address(retval);
-end;
-
-{$ENDIF}
-
-class function CoOctetList.Create: IADsOctetList;
-begin
- Result := CreateComObject(CLASS_OctetList) as IADsOctetList;
-end;
-
-class function CoOctetList.CreateRemote(const MachineName: string): IADsOctetList;
-begin
- Result := CreateRemoteComObject(MachineName, CLASS_OctetList) as IADsOctetList;
-end;
-
-procedure TOctetList.InitServerData;
-const
- CServerData: TServerData = (
- ClassID: '{1241400F-4680-11D1-A3B4-00C04FB950DC}';
- IntfIID: '{7B28B80F-4680-11D1-A3B4-00C04FB950DC}';
- EventIID: '';
- LicenseKey: nil;
- Version: 500);
-begin
- ServerData := @CServerData;
-end;
-
-procedure TOctetList.Connect;
-var
- punk: IUnknown;
-begin
- if FIntf = nil then
- begin
- punk := GetServer;
- Fintf:= punk as IADsOctetList;
- end;
-end;
-
-procedure TOctetList.ConnectTo(svrIntf: IADsOctetList);
-begin
- Disconnect;
- FIntf := svrIntf;
-end;
-
-procedure TOctetList.DisConnect;
-begin
- if Fintf <> nil then
- begin
- FIntf := nil;
- end;
-end;
-
-function TOctetList.GetDefaultInterface: IADsOctetList;
-begin
- if FIntf = nil then
- Connect;
- Assert(FIntf <> nil, 'DefaultInterface is NULL. Component is not connected to Server. You must call ''Connect'' or ''ConnectTo'' before this operation');
- Result := FIntf;
-end;
-
-constructor TOctetList.Create(AOwner: TComponent);
-begin
- inherited Create(AOwner);
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
- FProps := TOctetListProperties.Create(Self);
-{$ENDIF}
-end;
-
-destructor TOctetList.Destroy;
-begin
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
- FProps.Free;
-{$ENDIF}
- inherited Destroy;
-end;
-
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
-function TOctetList.GetServerProperties: TOctetListProperties;
-begin
- Result := FProps;
-end;
-{$ENDIF}
-
-function TOctetList.Get_OctetList: OleVariant;
-begin
- Result := DefaultInterface.Get_OctetList;
-end;
-
-procedure TOctetList.Set_OctetList(retval: OleVariant);
-begin
- DefaultInterface.Set_OctetList(retval);
-end;
-
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
-constructor TOctetListProperties.Create(AServer: TOctetList);
-begin
- inherited Create;
- FServer := AServer;
-end;
-
-function TOctetListProperties.GetDefaultInterface: IADsOctetList;
-begin
- Result := FServer.DefaultInterface;
-end;
-
-function TOctetListProperties.Get_OctetList: OleVariant;
-begin
- Result := DefaultInterface.Get_OctetList;
-end;
-
-procedure TOctetListProperties.Set_OctetList(retval: OleVariant);
-begin
- DefaultInterface.Set_OctetList(retval);
-end;
-
-{$ENDIF}
-
-class function CoEmail.Create: IADsEmail;
-begin
- Result := CreateComObject(CLASS_Email) as IADsEmail;
-end;
-
-class function CoEmail.CreateRemote(const MachineName: string): IADsEmail;
-begin
- Result := CreateRemoteComObject(MachineName, CLASS_Email) as IADsEmail;
-end;
-
-procedure TEmail.InitServerData;
-const
- CServerData: TServerData = (
- ClassID: '{8F92A857-478E-11D1-A3B4-00C04FB950DC}';
- IntfIID: '{97AF011A-478E-11D1-A3B4-00C04FB950DC}';
- EventIID: '';
- LicenseKey: nil;
- Version: 500);
-begin
- ServerData := @CServerData;
-end;
-
-procedure TEmail.Connect;
-var
- punk: IUnknown;
-begin
- if FIntf = nil then
- begin
- punk := GetServer;
- Fintf:= punk as IADsEmail;
- end;
-end;
-
-procedure TEmail.ConnectTo(svrIntf: IADsEmail);
-begin
- Disconnect;
- FIntf := svrIntf;
-end;
-
-procedure TEmail.DisConnect;
-begin
- if Fintf <> nil then
- begin
- FIntf := nil;
- end;
-end;
-
-function TEmail.GetDefaultInterface: IADsEmail;
-begin
- if FIntf = nil then
- Connect;
- Assert(FIntf <> nil, 'DefaultInterface is NULL. Component is not connected to Server. You must call ''Connect'' or ''ConnectTo'' before this operation');
- Result := FIntf;
-end;
-
-constructor TEmail.Create(AOwner: TComponent);
-begin
- inherited Create(AOwner);
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
- FProps := TEmailProperties.Create(Self);
-{$ENDIF}
-end;
-
-destructor TEmail.Destroy;
-begin
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
- FProps.Free;
-{$ENDIF}
- inherited Destroy;
-end;
-
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
-function TEmail.GetServerProperties: TEmailProperties;
-begin
- Result := FProps;
-end;
-{$ENDIF}
-
-function TEmail.Get_Type_: Integer;
-begin
- Result := DefaultInterface.Get_Type_;
-end;
-
-procedure TEmail.Set_Type_(retval: Integer);
-begin
- DefaultInterface.Set_Type_(retval);
-end;
-
-function TEmail.Get_Address: WideString;
-begin
- Result := DefaultInterface.Get_Address;
-end;
-
-procedure TEmail.Set_Address(const retval: WideString);
-begin
- DefaultInterface.Set_Address(retval);
-end;
-
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
-constructor TEmailProperties.Create(AServer: TEmail);
-begin
- inherited Create;
- FServer := AServer;
-end;
-
-function TEmailProperties.GetDefaultInterface: IADsEmail;
-begin
- Result := FServer.DefaultInterface;
-end;
-
-function TEmailProperties.Get_Type_: Integer;
-begin
- Result := DefaultInterface.Get_Type_;
-end;
-
-procedure TEmailProperties.Set_Type_(retval: Integer);
-begin
- DefaultInterface.Set_Type_(retval);
-end;
-
-function TEmailProperties.Get_Address: WideString;
-begin
- Result := DefaultInterface.Get_Address;
-end;
-
-procedure TEmailProperties.Set_Address(const retval: WideString);
-begin
- DefaultInterface.Set_Address(retval);
-end;
-
-{$ENDIF}
-
-class function CoPath.Create: IADsPath;
-begin
- Result := CreateComObject(CLASS_Path) as IADsPath;
-end;
-
-class function CoPath.CreateRemote(const MachineName: string): IADsPath;
-begin
- Result := CreateRemoteComObject(MachineName, CLASS_Path) as IADsPath;
-end;
-
-procedure TPath.InitServerData;
-const
- CServerData: TServerData = (
- ClassID: '{B2538919-4080-11D1-A3AC-00C04FB950DC}';
- IntfIID: '{B287FCD5-4080-11D1-A3AC-00C04FB950DC}';
- EventIID: '';
- LicenseKey: nil;
- Version: 500);
-begin
- ServerData := @CServerData;
-end;
-
-procedure TPath.Connect;
-var
- punk: IUnknown;
-begin
- if FIntf = nil then
- begin
- punk := GetServer;
- Fintf:= punk as IADsPath;
- end;
-end;
-
-procedure TPath.ConnectTo(svrIntf: IADsPath);
-begin
- Disconnect;
- FIntf := svrIntf;
-end;
-
-procedure TPath.DisConnect;
-begin
- if Fintf <> nil then
- begin
- FIntf := nil;
- end;
-end;
-
-function TPath.GetDefaultInterface: IADsPath;
-begin
- if FIntf = nil then
- Connect;
- Assert(FIntf <> nil, 'DefaultInterface is NULL. Component is not connected to Server. You must call ''Connect'' or ''ConnectTo'' before this operation');
- Result := FIntf;
-end;
-
-constructor TPath.Create(AOwner: TComponent);
-begin
- inherited Create(AOwner);
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
- FProps := TPathProperties.Create(Self);
-{$ENDIF}
-end;
-
-destructor TPath.Destroy;
-begin
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
- FProps.Free;
-{$ENDIF}
- inherited Destroy;
-end;
-
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
-function TPath.GetServerProperties: TPathProperties;
-begin
- Result := FProps;
-end;
-{$ENDIF}
-
-function TPath.Get_Type_: Integer;
-begin
- Result := DefaultInterface.Get_Type_;
-end;
-
-procedure TPath.Set_Type_(retval: Integer);
-begin
- DefaultInterface.Set_Type_(retval);
-end;
-
-function TPath.Get_VolumeName: WideString;
-begin
- Result := DefaultInterface.Get_VolumeName;
-end;
-
-procedure TPath.Set_VolumeName(const retval: WideString);
-begin
- DefaultInterface.Set_VolumeName(retval);
-end;
-
-function TPath.Get_Path: WideString;
-begin
- Result := DefaultInterface.Get_Path;
-end;
-
-procedure TPath.Set_Path(const retval: WideString);
-begin
- DefaultInterface.Set_Path(retval);
-end;
-
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
-constructor TPathProperties.Create(AServer: TPath);
-begin
- inherited Create;
- FServer := AServer;
-end;
-
-function TPathProperties.GetDefaultInterface: IADsPath;
-begin
- Result := FServer.DefaultInterface;
-end;
-
-function TPathProperties.Get_Type_: Integer;
-begin
- Result := DefaultInterface.Get_Type_;
-end;
-
-procedure TPathProperties.Set_Type_(retval: Integer);
-begin
- DefaultInterface.Set_Type_(retval);
-end;
-
-function TPathProperties.Get_VolumeName: WideString;
-begin
- Result := DefaultInterface.Get_VolumeName;
-end;
-
-procedure TPathProperties.Set_VolumeName(const retval: WideString);
-begin
- DefaultInterface.Set_VolumeName(retval);
-end;
-
-function TPathProperties.Get_Path: WideString;
-begin
- Result := DefaultInterface.Get_Path;
-end;
-
-procedure TPathProperties.Set_Path(const retval: WideString);
-begin
- DefaultInterface.Set_Path(retval);
-end;
-
-{$ENDIF}
-
-class function CoReplicaPointer.Create: IADsReplicaPointer;
-begin
- Result := CreateComObject(CLASS_ReplicaPointer) as IADsReplicaPointer;
-end;
-
-class function CoReplicaPointer.CreateRemote(const MachineName: string): IADsReplicaPointer;
-begin
- Result := CreateRemoteComObject(MachineName, CLASS_ReplicaPointer) as IADsReplicaPointer;
-end;
-
-procedure TReplicaPointer.InitServerData;
-const
- CServerData: TServerData = (
- ClassID: '{F5D1BADF-4080-11D1-A3AC-00C04FB950DC}';
- IntfIID: '{F60FB803-4080-11D1-A3AC-00C04FB950DC}';
- EventIID: '';
- LicenseKey: nil;
- Version: 500);
-begin
- ServerData := @CServerData;
-end;
-
-procedure TReplicaPointer.Connect;
-var
- punk: IUnknown;
-begin
- if FIntf = nil then
- begin
- punk := GetServer;
- Fintf:= punk as IADsReplicaPointer;
- end;
-end;
-
-procedure TReplicaPointer.ConnectTo(svrIntf: IADsReplicaPointer);
-begin
- Disconnect;
- FIntf := svrIntf;
-end;
-
-procedure TReplicaPointer.DisConnect;
-begin
- if Fintf <> nil then
- begin
- FIntf := nil;
- end;
-end;
-
-function TReplicaPointer.GetDefaultInterface: IADsReplicaPointer;
-begin
- if FIntf = nil then
- Connect;
- Assert(FIntf <> nil, 'DefaultInterface is NULL. Component is not connected to Server. You must call ''Connect'' or ''ConnectTo'' before this operation');
- Result := FIntf;
-end;
-
-constructor TReplicaPointer.Create(AOwner: TComponent);
-begin
- inherited Create(AOwner);
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
- FProps := TReplicaPointerProperties.Create(Self);
-{$ENDIF}
-end;
-
-destructor TReplicaPointer.Destroy;
-begin
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
- FProps.Free;
-{$ENDIF}
- inherited Destroy;
-end;
-
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
-function TReplicaPointer.GetServerProperties: TReplicaPointerProperties;
-begin
- Result := FProps;
-end;
-{$ENDIF}
-
-function TReplicaPointer.Get_ServerName: WideString;
-begin
- Result := DefaultInterface.Get_ServerName;
-end;
-
-procedure TReplicaPointer.Set_ServerName(const retval: WideString);
-begin
- DefaultInterface.Set_ServerName(retval);
-end;
-
-function TReplicaPointer.Get_ReplicaType: Integer;
-begin
- Result := DefaultInterface.Get_ReplicaType;
-end;
-
-procedure TReplicaPointer.Set_ReplicaType(retval: Integer);
-begin
- DefaultInterface.Set_ReplicaType(retval);
-end;
-
-function TReplicaPointer.Get_ReplicaNumber: Integer;
-begin
- Result := DefaultInterface.Get_ReplicaNumber;
-end;
-
-procedure TReplicaPointer.Set_ReplicaNumber(retval: Integer);
-begin
- DefaultInterface.Set_ReplicaNumber(retval);
-end;
-
-function TReplicaPointer.Get_Count: Integer;
-begin
- Result := DefaultInterface.Get_Count;
-end;
-
-procedure TReplicaPointer.Set_Count(retval: Integer);
-begin
- DefaultInterface.Set_Count(retval);
-end;
-
-function TReplicaPointer.Get_ReplicaAddressHints: OleVariant;
-begin
- Result := DefaultInterface.Get_ReplicaAddressHints;
-end;
-
-procedure TReplicaPointer.Set_ReplicaAddressHints(retval: OleVariant);
-begin
- DefaultInterface.Set_ReplicaAddressHints(retval);
-end;
-
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
-constructor TReplicaPointerProperties.Create(AServer: TReplicaPointer);
-begin
- inherited Create;
- FServer := AServer;
-end;
-
-function TReplicaPointerProperties.GetDefaultInterface: IADsReplicaPointer;
-begin
- Result := FServer.DefaultInterface;
-end;
-
-function TReplicaPointerProperties.Get_ServerName: WideString;
-begin
- Result := DefaultInterface.Get_ServerName;
-end;
-
-procedure TReplicaPointerProperties.Set_ServerName(const retval: WideString);
-begin
- DefaultInterface.Set_ServerName(retval);
-end;
-
-function TReplicaPointerProperties.Get_ReplicaType: Integer;
-begin
- Result := DefaultInterface.Get_ReplicaType;
-end;
-
-procedure TReplicaPointerProperties.Set_ReplicaType(retval: Integer);
-begin
- DefaultInterface.Set_ReplicaType(retval);
-end;
-
-function TReplicaPointerProperties.Get_ReplicaNumber: Integer;
-begin
- Result := DefaultInterface.Get_ReplicaNumber;
-end;
-
-procedure TReplicaPointerProperties.Set_ReplicaNumber(retval: Integer);
-begin
- DefaultInterface.Set_ReplicaNumber(retval);
-end;
-
-function TReplicaPointerProperties.Get_Count: Integer;
-begin
- Result := DefaultInterface.Get_Count;
-end;
-
-procedure TReplicaPointerProperties.Set_Count(retval: Integer);
-begin
- DefaultInterface.Set_Count(retval);
-end;
-
-function TReplicaPointerProperties.Get_ReplicaAddressHints: OleVariant;
-begin
- Result := DefaultInterface.Get_ReplicaAddressHints;
-end;
-
-procedure TReplicaPointerProperties.Set_ReplicaAddressHints(retval: OleVariant);
-begin
- DefaultInterface.Set_ReplicaAddressHints(retval);
-end;
-
-{$ENDIF}
-
-class function CoAcl.Create: IADsAcl;
-begin
- Result := CreateComObject(CLASS_Acl) as IADsAcl;
-end;
-
-class function CoAcl.CreateRemote(const MachineName: string): IADsAcl;
-begin
- Result := CreateRemoteComObject(MachineName, CLASS_Acl) as IADsAcl;
-end;
-
-procedure TAcl.InitServerData;
-const
- CServerData: TServerData = (
- ClassID: '{7AF1EFB6-0869-11D1-A377-00C04FB950DC}';
- IntfIID: '{8452D3AB-0869-11D1-A377-00C04FB950DC}';
- EventIID: '';
- LicenseKey: nil;
- Version: 500);
-begin
- ServerData := @CServerData;
-end;
-
-procedure TAcl.Connect;
-var
- punk: IUnknown;
-begin
- if FIntf = nil then
- begin
- punk := GetServer;
- Fintf:= punk as IADsAcl;
- end;
-end;
-
-procedure TAcl.ConnectTo(svrIntf: IADsAcl);
-begin
- Disconnect;
- FIntf := svrIntf;
-end;
-
-procedure TAcl.DisConnect;
-begin
- if Fintf <> nil then
- begin
- FIntf := nil;
- end;
-end;
-
-function TAcl.GetDefaultInterface: IADsAcl;
-begin
- if FIntf = nil then
- Connect;
- Assert(FIntf <> nil, 'DefaultInterface is NULL. Component is not connected to Server. You must call ''Connect'' or ''ConnectTo'' before this operation');
- Result := FIntf;
-end;
-
-constructor TAcl.Create(AOwner: TComponent);
-begin
- inherited Create(AOwner);
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
- FProps := TAclProperties.Create(Self);
-{$ENDIF}
-end;
-
-destructor TAcl.Destroy;
-begin
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
- FProps.Free;
-{$ENDIF}
- inherited Destroy;
-end;
-
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
-function TAcl.GetServerProperties: TAclProperties;
-begin
- Result := FProps;
-end;
-{$ENDIF}
-
-function TAcl.Get_ProtectedAttrName: WideString;
-begin
- Result := DefaultInterface.Get_ProtectedAttrName;
-end;
-
-procedure TAcl.Set_ProtectedAttrName(const retval: WideString);
-begin
- DefaultInterface.Set_ProtectedAttrName(retval);
-end;
-
-function TAcl.Get_SubjectName: WideString;
-begin
- Result := DefaultInterface.Get_SubjectName;
-end;
-
-procedure TAcl.Set_SubjectName(const retval: WideString);
-begin
- DefaultInterface.Set_SubjectName(retval);
-end;
-
-function TAcl.Get_Privileges: Integer;
-begin
- Result := DefaultInterface.Get_Privileges;
-end;
-
-procedure TAcl.Set_Privileges(retval: Integer);
-begin
- DefaultInterface.Set_Privileges(retval);
-end;
-
-function TAcl.CopyAcl: IDispatch;
-begin
- Result := DefaultInterface.CopyAcl;
-end;
-
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
-constructor TAclProperties.Create(AServer: TAcl);
-begin
- inherited Create;
- FServer := AServer;
-end;
-
-function TAclProperties.GetDefaultInterface: IADsAcl;
-begin
- Result := FServer.DefaultInterface;
-end;
-
-function TAclProperties.Get_ProtectedAttrName: WideString;
-begin
- Result := DefaultInterface.Get_ProtectedAttrName;
-end;
-
-procedure TAclProperties.Set_ProtectedAttrName(const retval: WideString);
-begin
- DefaultInterface.Set_ProtectedAttrName(retval);
-end;
-
-function TAclProperties.Get_SubjectName: WideString;
-begin
- Result := DefaultInterface.Get_SubjectName;
-end;
-
-procedure TAclProperties.Set_SubjectName(const retval: WideString);
-begin
- DefaultInterface.Set_SubjectName(retval);
-end;
-
-function TAclProperties.Get_Privileges: Integer;
-begin
- Result := DefaultInterface.Get_Privileges;
-end;
-
-procedure TAclProperties.Set_Privileges(retval: Integer);
-begin
- DefaultInterface.Set_Privileges(retval);
-end;
-
-{$ENDIF}
-
-class function CoTimestamp.Create: IADsTimestamp;
-begin
- Result := CreateComObject(CLASS_Timestamp) as IADsTimestamp;
-end;
-
-class function CoTimestamp.CreateRemote(const MachineName: string): IADsTimestamp;
-begin
- Result := CreateRemoteComObject(MachineName, CLASS_Timestamp) as IADsTimestamp;
-end;
-
-procedure TTimestamp.InitServerData;
-const
- CServerData: TServerData = (
- ClassID: '{B2BED2EB-4080-11D1-A3AC-00C04FB950DC}';
- IntfIID: '{B2F5A901-4080-11D1-A3AC-00C04FB950DC}';
- EventIID: '';
- LicenseKey: nil;
- Version: 500);
-begin
- ServerData := @CServerData;
-end;
-
-procedure TTimestamp.Connect;
-var
- punk: IUnknown;
-begin
- if FIntf = nil then
- begin
- punk := GetServer;
- Fintf:= punk as IADsTimestamp;
- end;
-end;
-
-procedure TTimestamp.ConnectTo(svrIntf: IADsTimestamp);
-begin
- Disconnect;
- FIntf := svrIntf;
-end;
-
-procedure TTimestamp.DisConnect;
-begin
- if Fintf <> nil then
- begin
- FIntf := nil;
- end;
-end;
-
-function TTimestamp.GetDefaultInterface: IADsTimestamp;
-begin
- if FIntf = nil then
- Connect;
- Assert(FIntf <> nil, 'DefaultInterface is NULL. Component is not connected to Server. You must call ''Connect'' or ''ConnectTo'' before this operation');
- Result := FIntf;
-end;
-
-constructor TTimestamp.Create(AOwner: TComponent);
-begin
- inherited Create(AOwner);
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
- FProps := TTimestampProperties.Create(Self);
-{$ENDIF}
-end;
-
-destructor TTimestamp.Destroy;
-begin
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
- FProps.Free;
-{$ENDIF}
- inherited Destroy;
-end;
-
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
-function TTimestamp.GetServerProperties: TTimestampProperties;
-begin
- Result := FProps;
-end;
-{$ENDIF}
-
-function TTimestamp.Get_WholeSeconds: Integer;
-begin
- Result := DefaultInterface.Get_WholeSeconds;
-end;
-
-procedure TTimestamp.Set_WholeSeconds(retval: Integer);
-begin
- DefaultInterface.Set_WholeSeconds(retval);
-end;
-
-function TTimestamp.Get_EventID: Integer;
-begin
- Result := DefaultInterface.Get_EventID;
-end;
-
-procedure TTimestamp.Set_EventID(retval: Integer);
-begin
- DefaultInterface.Set_EventID(retval);
-end;
-
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
-constructor TTimestampProperties.Create(AServer: TTimestamp);
-begin
- inherited Create;
- FServer := AServer;
-end;
-
-function TTimestampProperties.GetDefaultInterface: IADsTimestamp;
-begin
- Result := FServer.DefaultInterface;
-end;
-
-function TTimestampProperties.Get_WholeSeconds: Integer;
-begin
- Result := DefaultInterface.Get_WholeSeconds;
-end;
-
-procedure TTimestampProperties.Set_WholeSeconds(retval: Integer);
-begin
- DefaultInterface.Set_WholeSeconds(retval);
-end;
-
-function TTimestampProperties.Get_EventID: Integer;
-begin
- Result := DefaultInterface.Get_EventID;
-end;
-
-procedure TTimestampProperties.Set_EventID(retval: Integer);
-begin
- DefaultInterface.Set_EventID(retval);
-end;
-
-{$ENDIF}
-
-class function CoPostalAddress.Create: IADsPostalAddress;
-begin
- Result := CreateComObject(CLASS_PostalAddress) as IADsPostalAddress;
-end;
-
-class function CoPostalAddress.CreateRemote(const MachineName: string): IADsPostalAddress;
-begin
- Result := CreateRemoteComObject(MachineName, CLASS_PostalAddress) as IADsPostalAddress;
-end;
-
-procedure TPostalAddress.InitServerData;
-const
- CServerData: TServerData = (
- ClassID: '{0A75AFCD-4680-11D1-A3B4-00C04FB950DC}';
- IntfIID: '{7ADECF29-4680-11D1-A3B4-00C04FB950DC}';
- EventIID: '';
- LicenseKey: nil;
- Version: 500);
-begin
- ServerData := @CServerData;
-end;
-
-procedure TPostalAddress.Connect;
-var
- punk: IUnknown;
-begin
- if FIntf = nil then
- begin
- punk := GetServer;
- Fintf:= punk as IADsPostalAddress;
- end;
-end;
-
-procedure TPostalAddress.ConnectTo(svrIntf: IADsPostalAddress);
-begin
- Disconnect;
- FIntf := svrIntf;
-end;
-
-procedure TPostalAddress.DisConnect;
-begin
- if Fintf <> nil then
- begin
- FIntf := nil;
- end;
-end;
-
-function TPostalAddress.GetDefaultInterface: IADsPostalAddress;
-begin
- if FIntf = nil then
- Connect;
- Assert(FIntf <> nil, 'DefaultInterface is NULL. Component is not connected to Server. You must call ''Connect'' or ''ConnectTo'' before this operation');
- Result := FIntf;
-end;
-
-constructor TPostalAddress.Create(AOwner: TComponent);
-begin
- inherited Create(AOwner);
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
- FProps := TPostalAddressProperties.Create(Self);
-{$ENDIF}
-end;
-
-destructor TPostalAddress.Destroy;
-begin
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
- FProps.Free;
-{$ENDIF}
- inherited Destroy;
-end;
-
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
-function TPostalAddress.GetServerProperties: TPostalAddressProperties;
-begin
- Result := FProps;
-end;
-{$ENDIF}
-
-function TPostalAddress.Get_PostalAddress: OleVariant;
-begin
- Result := DefaultInterface.Get_PostalAddress;
-end;
-
-procedure TPostalAddress.Set_PostalAddress(retval: OleVariant);
-begin
- DefaultInterface.Set_PostalAddress(retval);
-end;
-
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
-constructor TPostalAddressProperties.Create(AServer: TPostalAddress);
-begin
- inherited Create;
- FServer := AServer;
-end;
-
-function TPostalAddressProperties.GetDefaultInterface: IADsPostalAddress;
-begin
- Result := FServer.DefaultInterface;
-end;
-
-function TPostalAddressProperties.Get_PostalAddress: OleVariant;
-begin
- Result := DefaultInterface.Get_PostalAddress;
-end;
-
-procedure TPostalAddressProperties.Set_PostalAddress(retval: OleVariant);
-begin
- DefaultInterface.Set_PostalAddress(retval);
-end;
-
-{$ENDIF}
-
-class function CoBackLink.Create: IADsBackLink;
-begin
- Result := CreateComObject(CLASS_BackLink) as IADsBackLink;
-end;
-
-class function CoBackLink.CreateRemote(const MachineName: string): IADsBackLink;
-begin
- Result := CreateRemoteComObject(MachineName, CLASS_BackLink) as IADsBackLink;
-end;
-
-procedure TBackLink.InitServerData;
-const
- CServerData: TServerData = (
- ClassID: '{FCBF906F-4080-11D1-A3AC-00C04FB950DC}';
- IntfIID: '{FD1302BD-4080-11D1-A3AC-00C04FB950DC}';
- EventIID: '';
- LicenseKey: nil;
- Version: 500);
-begin
- ServerData := @CServerData;
-end;
-
-procedure TBackLink.Connect;
-var
- punk: IUnknown;
-begin
- if FIntf = nil then
- begin
- punk := GetServer;
- Fintf:= punk as IADsBackLink;
- end;
-end;
-
-procedure TBackLink.ConnectTo(svrIntf: IADsBackLink);
-begin
- Disconnect;
- FIntf := svrIntf;
-end;
-
-procedure TBackLink.DisConnect;
-begin
- if Fintf <> nil then
- begin
- FIntf := nil;
- end;
-end;
-
-function TBackLink.GetDefaultInterface: IADsBackLink;
-begin
- if FIntf = nil then
- Connect;
- Assert(FIntf <> nil, 'DefaultInterface is NULL. Component is not connected to Server. You must call ''Connect'' or ''ConnectTo'' before this operation');
- Result := FIntf;
-end;
-
-constructor TBackLink.Create(AOwner: TComponent);
-begin
- inherited Create(AOwner);
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
- FProps := TBackLinkProperties.Create(Self);
-{$ENDIF}
-end;
-
-destructor TBackLink.Destroy;
-begin
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
- FProps.Free;
-{$ENDIF}
- inherited Destroy;
-end;
-
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
-function TBackLink.GetServerProperties: TBackLinkProperties;
-begin
- Result := FProps;
-end;
-{$ENDIF}
-
-function TBackLink.Get_RemoteID: Integer;
-begin
- Result := DefaultInterface.Get_RemoteID;
-end;
-
-procedure TBackLink.Set_RemoteID(retval: Integer);
-begin
- DefaultInterface.Set_RemoteID(retval);
-end;
-
-function TBackLink.Get_ObjectName: WideString;
-begin
- Result := DefaultInterface.Get_ObjectName;
-end;
-
-procedure TBackLink.Set_ObjectName(const retval: WideString);
-begin
- DefaultInterface.Set_ObjectName(retval);
-end;
-
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
-constructor TBackLinkProperties.Create(AServer: TBackLink);
-begin
- inherited Create;
- FServer := AServer;
-end;
-
-function TBackLinkProperties.GetDefaultInterface: IADsBackLink;
-begin
- Result := FServer.DefaultInterface;
-end;
-
-function TBackLinkProperties.Get_RemoteID: Integer;
-begin
- Result := DefaultInterface.Get_RemoteID;
-end;
-
-procedure TBackLinkProperties.Set_RemoteID(retval: Integer);
-begin
- DefaultInterface.Set_RemoteID(retval);
-end;
-
-function TBackLinkProperties.Get_ObjectName: WideString;
-begin
- Result := DefaultInterface.Get_ObjectName;
-end;
-
-procedure TBackLinkProperties.Set_ObjectName(const retval: WideString);
-begin
- DefaultInterface.Set_ObjectName(retval);
-end;
-
-{$ENDIF}
-
-class function CoTypedName.Create: IADsTypedName;
-begin
- Result := CreateComObject(CLASS_TypedName) as IADsTypedName;
-end;
-
-class function CoTypedName.CreateRemote(const MachineName: string): IADsTypedName;
-begin
- Result := CreateRemoteComObject(MachineName, CLASS_TypedName) as IADsTypedName;
-end;
-
-procedure TTypedName.InitServerData;
-const
- CServerData: TServerData = (
- ClassID: '{B33143CB-4080-11D1-A3AC-00C04FB950DC}';
- IntfIID: '{B371A349-4080-11D1-A3AC-00C04FB950DC}';
- EventIID: '';
- LicenseKey: nil;
- Version: 500);
-begin
- ServerData := @CServerData;
-end;
-
-procedure TTypedName.Connect;
-var
- punk: IUnknown;
-begin
- if FIntf = nil then
- begin
- punk := GetServer;
- Fintf:= punk as IADsTypedName;
- end;
-end;
-
-procedure TTypedName.ConnectTo(svrIntf: IADsTypedName);
-begin
- Disconnect;
- FIntf := svrIntf;
-end;
-
-procedure TTypedName.DisConnect;
-begin
- if Fintf <> nil then
- begin
- FIntf := nil;
- end;
-end;
-
-function TTypedName.GetDefaultInterface: IADsTypedName;
-begin
- if FIntf = nil then
- Connect;
- Assert(FIntf <> nil, 'DefaultInterface is NULL. Component is not connected to Server. You must call ''Connect'' or ''ConnectTo'' before this operation');
- Result := FIntf;
-end;
-
-constructor TTypedName.Create(AOwner: TComponent);
-begin
- inherited Create(AOwner);
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
- FProps := TTypedNameProperties.Create(Self);
-{$ENDIF}
-end;
-
-destructor TTypedName.Destroy;
-begin
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
- FProps.Free;
-{$ENDIF}
- inherited Destroy;
-end;
-
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
-function TTypedName.GetServerProperties: TTypedNameProperties;
-begin
- Result := FProps;
-end;
-{$ENDIF}
-
-function TTypedName.Get_ObjectName: WideString;
-begin
- Result := DefaultInterface.Get_ObjectName;
-end;
-
-procedure TTypedName.Set_ObjectName(const retval: WideString);
-begin
- DefaultInterface.Set_ObjectName(retval);
-end;
-
-function TTypedName.Get_Level: Integer;
-begin
- Result := DefaultInterface.Get_Level;
-end;
-
-procedure TTypedName.Set_Level(retval: Integer);
-begin
- DefaultInterface.Set_Level(retval);
-end;
-
-function TTypedName.Get_Interval: Integer;
-begin
- Result := DefaultInterface.Get_Interval;
-end;
-
-procedure TTypedName.Set_Interval(retval: Integer);
-begin
- DefaultInterface.Set_Interval(retval);
-end;
-
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
-constructor TTypedNameProperties.Create(AServer: TTypedName);
-begin
- inherited Create;
- FServer := AServer;
-end;
-
-function TTypedNameProperties.GetDefaultInterface: IADsTypedName;
-begin
- Result := FServer.DefaultInterface;
-end;
-
-function TTypedNameProperties.Get_ObjectName: WideString;
-begin
- Result := DefaultInterface.Get_ObjectName;
-end;
-
-procedure TTypedNameProperties.Set_ObjectName(const retval: WideString);
-begin
- DefaultInterface.Set_ObjectName(retval);
-end;
-
-function TTypedNameProperties.Get_Level: Integer;
-begin
- Result := DefaultInterface.Get_Level;
-end;
-
-procedure TTypedNameProperties.Set_Level(retval: Integer);
-begin
- DefaultInterface.Set_Level(retval);
-end;
-
-function TTypedNameProperties.Get_Interval: Integer;
-begin
- Result := DefaultInterface.Get_Interval;
-end;
-
-procedure TTypedNameProperties.Set_Interval(retval: Integer);
-begin
- DefaultInterface.Set_Interval(retval);
-end;
-
-{$ENDIF}
-
-class function CoHold.Create: IADsHold;
-begin
- Result := CreateComObject(CLASS_Hold) as IADsHold;
-end;
-
-class function CoHold.CreateRemote(const MachineName: string): IADsHold;
-begin
- Result := CreateRemoteComObject(MachineName, CLASS_Hold) as IADsHold;
-end;
-
-procedure THold.InitServerData;
-const
- CServerData: TServerData = (
- ClassID: '{B3AD3E13-4080-11D1-A3AC-00C04FB950DC}';
- IntfIID: '{B3EB3B37-4080-11D1-A3AC-00C04FB950DC}';
- EventIID: '';
- LicenseKey: nil;
- Version: 500);
-begin
- ServerData := @CServerData;
-end;
-
-procedure THold.Connect;
-var
- punk: IUnknown;
-begin
- if FIntf = nil then
- begin
- punk := GetServer;
- Fintf:= punk as IADsHold;
- end;
-end;
-
-procedure THold.ConnectTo(svrIntf: IADsHold);
-begin
- Disconnect;
- FIntf := svrIntf;
-end;
-
-procedure THold.DisConnect;
-begin
- if Fintf <> nil then
- begin
- FIntf := nil;
- end;
-end;
-
-function THold.GetDefaultInterface: IADsHold;
-begin
- if FIntf = nil then
- Connect;
- Assert(FIntf <> nil, 'DefaultInterface is NULL. Component is not connected to Server. You must call ''Connect'' or ''ConnectTo'' before this operation');
- Result := FIntf;
-end;
-
-constructor THold.Create(AOwner: TComponent);
-begin
- inherited Create(AOwner);
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
- FProps := THoldProperties.Create(Self);
-{$ENDIF}
-end;
-
-destructor THold.Destroy;
-begin
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
- FProps.Free;
-{$ENDIF}
- inherited Destroy;
-end;
-
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
-function THold.GetServerProperties: THoldProperties;
-begin
- Result := FProps;
-end;
-{$ENDIF}
-
-function THold.Get_ObjectName: WideString;
-begin
- Result := DefaultInterface.Get_ObjectName;
-end;
-
-procedure THold.Set_ObjectName(const retval: WideString);
-begin
- DefaultInterface.Set_ObjectName(retval);
-end;
-
-function THold.Get_Amount: Integer;
-begin
- Result := DefaultInterface.Get_Amount;
-end;
-
-procedure THold.Set_Amount(retval: Integer);
-begin
- DefaultInterface.Set_Amount(retval);
-end;
-
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
-constructor THoldProperties.Create(AServer: THold);
-begin
- inherited Create;
- FServer := AServer;
-end;
-
-function THoldProperties.GetDefaultInterface: IADsHold;
-begin
- Result := FServer.DefaultInterface;
-end;
-
-function THoldProperties.Get_ObjectName: WideString;
-begin
- Result := DefaultInterface.Get_ObjectName;
-end;
-
-procedure THoldProperties.Set_ObjectName(const retval: WideString);
-begin
- DefaultInterface.Set_ObjectName(retval);
-end;
-
-function THoldProperties.Get_Amount: Integer;
-begin
- Result := DefaultInterface.Get_Amount;
-end;
-
-procedure THoldProperties.Set_Amount(retval: Integer);
-begin
- DefaultInterface.Set_Amount(retval);
-end;
-
-{$ENDIF}
-
-class function CoPathname.Create: IADsPathname;
-begin
- Result := CreateComObject(CLASS_Pathname) as IADsPathname;
-end;
-
-class function CoPathname.CreateRemote(const MachineName: string): IADsPathname;
-begin
- Result := CreateRemoteComObject(MachineName, CLASS_Pathname) as IADsPathname;
-end;
-
-procedure TPathname.InitServerData;
-const
- CServerData: TServerData = (
- ClassID: '{080D0D78-F421-11D0-A36E-00C04FB950DC}';
- IntfIID: '{D592AED4-F420-11D0-A36E-00C04FB950DC}';
- EventIID: '';
- LicenseKey: nil;
- Version: 500);
-begin
- ServerData := @CServerData;
-end;
-
-procedure TPathname.Connect;
-var
- punk: IUnknown;
-begin
- if FIntf = nil then
- begin
- punk := GetServer;
- Fintf:= punk as IADsPathname;
- end;
-end;
-
-procedure TPathname.ConnectTo(svrIntf: IADsPathname);
-begin
- Disconnect;
- FIntf := svrIntf;
-end;
-
-procedure TPathname.DisConnect;
-begin
- if Fintf <> nil then
- begin
- FIntf := nil;
- end;
-end;
-
-function TPathname.GetDefaultInterface: IADsPathname;
-begin
- if FIntf = nil then
- Connect;
- Assert(FIntf <> nil, 'DefaultInterface is NULL. Component is not connected to Server. You must call ''Connect'' or ''ConnectTo'' before this operation');
- Result := FIntf;
-end;
-
-constructor TPathname.Create(AOwner: TComponent);
-begin
- inherited Create(AOwner);
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
- FProps := TPathnameProperties.Create(Self);
-{$ENDIF}
-end;
-
-destructor TPathname.Destroy;
-begin
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
- FProps.Free;
-{$ENDIF}
- inherited Destroy;
-end;
-
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
-function TPathname.GetServerProperties: TPathnameProperties;
-begin
- Result := FProps;
-end;
-{$ENDIF}
-
-function TPathname.Get_EscapedMode: Integer;
-begin
- Result := DefaultInterface.Get_EscapedMode;
-end;
-
-procedure TPathname.Set_EscapedMode(retval: Integer);
-begin
- DefaultInterface.Set_EscapedMode(retval);
-end;
-
-procedure TPathname.Set_(const bstrADsPath: WideString; lnSetType: Integer);
-begin
- DefaultInterface.Set_(bstrADsPath, lnSetType);
-end;
-
-procedure TPathname.SetDisplayType(lnDisplayType: Integer);
-begin
- DefaultInterface.SetDisplayType(lnDisplayType);
-end;
-
-function TPathname.Retrieve(lnFormatType: Integer): WideString;
-begin
- Result := DefaultInterface.Retrieve(lnFormatType);
-end;
-
-function TPathname.GetNumElements: Integer;
-begin
- Result := DefaultInterface.GetNumElements;
-end;
-
-function TPathname.GetElement(lnElementIndex: Integer): WideString;
-begin
- Result := DefaultInterface.GetElement(lnElementIndex);
-end;
-
-procedure TPathname.AddLeafElement(const bstrLeafElement: WideString);
-begin
- DefaultInterface.AddLeafElement(bstrLeafElement);
-end;
-
-procedure TPathname.RemoveLeafElement;
-begin
- DefaultInterface.RemoveLeafElement;
-end;
-
-function TPathname.CopyPath: IDispatch;
-begin
- Result := DefaultInterface.CopyPath;
-end;
-
-function TPathname.GetEscapedElement(lnReserved: Integer; const bstrInStr: WideString): WideString;
-begin
- Result := DefaultInterface.GetEscapedElement(lnReserved, bstrInStr);
-end;
-
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
-constructor TPathnameProperties.Create(AServer: TPathname);
-begin
- inherited Create;
- FServer := AServer;
-end;
-
-function TPathnameProperties.GetDefaultInterface: IADsPathname;
-begin
- Result := FServer.DefaultInterface;
-end;
-
-function TPathnameProperties.Get_EscapedMode: Integer;
-begin
- Result := DefaultInterface.Get_EscapedMode;
-end;
-
-procedure TPathnameProperties.Set_EscapedMode(retval: Integer);
-begin
- DefaultInterface.Set_EscapedMode(retval);
-end;
-
-{$ENDIF}
-
-class function CoADSystemInfo.Create: IADsADSystemInfo;
-begin
- Result := CreateComObject(CLASS_ADSystemInfo) as IADsADSystemInfo;
-end;
-
-class function CoADSystemInfo.CreateRemote(const MachineName: string): IADsADSystemInfo;
-begin
- Result := CreateRemoteComObject(MachineName, CLASS_ADSystemInfo) as IADsADSystemInfo;
-end;
-
-procedure TADSystemInfo.InitServerData;
-const
- CServerData: TServerData = (
- ClassID: '{50B6327F-AFD1-11D2-9CB9-0000F87A369E}';
- IntfIID: '{5BB11929-AFD1-11D2-9CB9-0000F87A369E}';
- EventIID: '';
- LicenseKey: nil;
- Version: 500);
-begin
- ServerData := @CServerData;
-end;
-
-procedure TADSystemInfo.Connect;
-var
- punk: IUnknown;
-begin
- if FIntf = nil then
- begin
- punk := GetServer;
- Fintf:= punk as IADsADSystemInfo;
- end;
-end;
-
-procedure TADSystemInfo.ConnectTo(svrIntf: IADsADSystemInfo);
-begin
- Disconnect;
- FIntf := svrIntf;
-end;
-
-procedure TADSystemInfo.DisConnect;
-begin
- if Fintf <> nil then
- begin
- FIntf := nil;
- end;
-end;
-
-function TADSystemInfo.GetDefaultInterface: IADsADSystemInfo;
-begin
- if FIntf = nil then
- Connect;
- Assert(FIntf <> nil, 'DefaultInterface is NULL. Component is not connected to Server. You must call ''Connect'' or ''ConnectTo'' before this operation');
- Result := FIntf;
-end;
-
-constructor TADSystemInfo.Create(AOwner: TComponent);
-begin
- inherited Create(AOwner);
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
- FProps := TADSystemInfoProperties.Create(Self);
-{$ENDIF}
-end;
-
-destructor TADSystemInfo.Destroy;
-begin
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
- FProps.Free;
-{$ENDIF}
- inherited Destroy;
-end;
-
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
-function TADSystemInfo.GetServerProperties: TADSystemInfoProperties;
-begin
- Result := FProps;
-end;
-{$ENDIF}
-
-function TADSystemInfo.Get_UserName: WideString;
-begin
- Result := DefaultInterface.Get_UserName;
-end;
-
-function TADSystemInfo.Get_ComputerName: WideString;
-begin
- Result := DefaultInterface.Get_ComputerName;
-end;
-
-function TADSystemInfo.Get_SiteName: WideString;
-begin
- Result := DefaultInterface.Get_SiteName;
-end;
-
-function TADSystemInfo.Get_DomainShortName: WideString;
-begin
- Result := DefaultInterface.Get_DomainShortName;
-end;
-
-function TADSystemInfo.Get_DomainDNSName: WideString;
-begin
- Result := DefaultInterface.Get_DomainDNSName;
-end;
-
-function TADSystemInfo.Get_ForestDNSName: WideString;
-begin
- Result := DefaultInterface.Get_ForestDNSName;
-end;
-
-function TADSystemInfo.Get_PDCRoleOwner: WideString;
-begin
- Result := DefaultInterface.Get_PDCRoleOwner;
-end;
-
-function TADSystemInfo.Get_SchemaRoleOwner: WideString;
-begin
- Result := DefaultInterface.Get_SchemaRoleOwner;
-end;
-
-function TADSystemInfo.Get_IsNativeMode: WordBool;
-begin
- Result := DefaultInterface.Get_IsNativeMode;
-end;
-
-function TADSystemInfo.GetAnyDCName: WideString;
-begin
- Result := DefaultInterface.GetAnyDCName;
-end;
-
-function TADSystemInfo.GetDCSiteName(const szServer: WideString): WideString;
-begin
- Result := DefaultInterface.GetDCSiteName(szServer);
-end;
-
-procedure TADSystemInfo.RefreshSchemaCache;
-begin
- DefaultInterface.RefreshSchemaCache;
-end;
-
-function TADSystemInfo.GetTrees: OleVariant;
-begin
- Result := DefaultInterface.GetTrees;
-end;
-
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
-constructor TADSystemInfoProperties.Create(AServer: TADSystemInfo);
-begin
- inherited Create;
- FServer := AServer;
-end;
-
-function TADSystemInfoProperties.GetDefaultInterface: IADsADSystemInfo;
-begin
- Result := FServer.DefaultInterface;
-end;
-
-function TADSystemInfoProperties.Get_UserName: WideString;
-begin
- Result := DefaultInterface.Get_UserName;
-end;
-
-function TADSystemInfoProperties.Get_ComputerName: WideString;
-begin
- Result := DefaultInterface.Get_ComputerName;
-end;
-
-function TADSystemInfoProperties.Get_SiteName: WideString;
-begin
- Result := DefaultInterface.Get_SiteName;
-end;
-
-function TADSystemInfoProperties.Get_DomainShortName: WideString;
-begin
- Result := DefaultInterface.Get_DomainShortName;
-end;
-
-function TADSystemInfoProperties.Get_DomainDNSName: WideString;
-begin
- Result := DefaultInterface.Get_DomainDNSName;
-end;
-
-function TADSystemInfoProperties.Get_ForestDNSName: WideString;
-begin
- Result := DefaultInterface.Get_ForestDNSName;
-end;
-
-function TADSystemInfoProperties.Get_PDCRoleOwner: WideString;
-begin
- Result := DefaultInterface.Get_PDCRoleOwner;
-end;
-
-function TADSystemInfoProperties.Get_SchemaRoleOwner: WideString;
-begin
- Result := DefaultInterface.Get_SchemaRoleOwner;
-end;
-
-function TADSystemInfoProperties.Get_IsNativeMode: WordBool;
-begin
- Result := DefaultInterface.Get_IsNativeMode;
-end;
-
-{$ENDIF}
-
-class function CoWinNTSystemInfo.Create: IADsWinNTSystemInfo;
-begin
- Result := CreateComObject(CLASS_WinNTSystemInfo) as IADsWinNTSystemInfo;
-end;
-
-class function CoWinNTSystemInfo.CreateRemote(const MachineName: string): IADsWinNTSystemInfo;
-begin
- Result := CreateRemoteComObject(MachineName, CLASS_WinNTSystemInfo) as IADsWinNTSystemInfo;
-end;
-
-procedure TWinNTSystemInfo.InitServerData;
-const
- CServerData: TServerData = (
- ClassID: '{66182EC4-AFD1-11D2-9CB9-0000F87A369E}';
- IntfIID: '{6C6D65DC-AFD1-11D2-9CB9-0000F87A369E}';
- EventIID: '';
- LicenseKey: nil;
- Version: 500);
-begin
- ServerData := @CServerData;
-end;
-
-procedure TWinNTSystemInfo.Connect;
-var
- punk: IUnknown;
-begin
- if FIntf = nil then
- begin
- punk := GetServer;
- Fintf:= punk as IADsWinNTSystemInfo;
- end;
-end;
-
-procedure TWinNTSystemInfo.ConnectTo(svrIntf: IADsWinNTSystemInfo);
-begin
- Disconnect;
- FIntf := svrIntf;
-end;
-
-procedure TWinNTSystemInfo.DisConnect;
-begin
- if Fintf <> nil then
- begin
- FIntf := nil;
- end;
-end;
-
-function TWinNTSystemInfo.GetDefaultInterface: IADsWinNTSystemInfo;
-begin
- if FIntf = nil then
- Connect;
- Assert(FIntf <> nil, 'DefaultInterface is NULL. Component is not connected to Server. You must call ''Connect'' or ''ConnectTo'' before this operation');
- Result := FIntf;
-end;
-
-constructor TWinNTSystemInfo.Create(AOwner: TComponent);
-begin
- inherited Create(AOwner);
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
- FProps := TWinNTSystemInfoProperties.Create(Self);
-{$ENDIF}
-end;
-
-destructor TWinNTSystemInfo.Destroy;
-begin
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
- FProps.Free;
-{$ENDIF}
- inherited Destroy;
-end;
-
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
-function TWinNTSystemInfo.GetServerProperties: TWinNTSystemInfoProperties;
-begin
- Result := FProps;
-end;
-{$ENDIF}
-
-function TWinNTSystemInfo.Get_UserName: WideString;
-begin
- Result := DefaultInterface.Get_UserName;
-end;
-
-function TWinNTSystemInfo.Get_ComputerName: WideString;
-begin
- Result := DefaultInterface.Get_ComputerName;
-end;
-
-function TWinNTSystemInfo.Get_DomainName: WideString;
-begin
- Result := DefaultInterface.Get_DomainName;
-end;
-
-function TWinNTSystemInfo.Get_PDC: WideString;
-begin
- Result := DefaultInterface.Get_PDC;
-end;
-
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
-constructor TWinNTSystemInfoProperties.Create(AServer: TWinNTSystemInfo);
-begin
- inherited Create;
- FServer := AServer;
-end;
-
-function TWinNTSystemInfoProperties.GetDefaultInterface: IADsWinNTSystemInfo;
-begin
- Result := FServer.DefaultInterface;
-end;
-
-function TWinNTSystemInfoProperties.Get_UserName: WideString;
-begin
- Result := DefaultInterface.Get_UserName;
-end;
-
-function TWinNTSystemInfoProperties.Get_ComputerName: WideString;
-begin
- Result := DefaultInterface.Get_ComputerName;
-end;
-
-function TWinNTSystemInfoProperties.Get_DomainName: WideString;
-begin
- Result := DefaultInterface.Get_DomainName;
-end;
-
-function TWinNTSystemInfoProperties.Get_PDC: WideString;
-begin
- Result := DefaultInterface.Get_PDC;
-end;
-
-{$ENDIF}
-
-class function CoDNWithBinary.Create: IADsDNWithBinary;
-begin
- Result := CreateComObject(CLASS_DNWithBinary) as IADsDNWithBinary;
-end;
-
-class function CoDNWithBinary.CreateRemote(const MachineName: string): IADsDNWithBinary;
-begin
- Result := CreateRemoteComObject(MachineName, CLASS_DNWithBinary) as IADsDNWithBinary;
-end;
-
-procedure TDNWithBinary.InitServerData;
-const
- CServerData: TServerData = (
- ClassID: '{7E99C0A3-F935-11D2-BA96-00C04FB6D0D1}';
- IntfIID: '{7E99C0A2-F935-11D2-BA96-00C04FB6D0D1}';
- EventIID: '';
- LicenseKey: nil;
- Version: 500);
-begin
- ServerData := @CServerData;
-end;
-
-procedure TDNWithBinary.Connect;
-var
- punk: IUnknown;
-begin
- if FIntf = nil then
- begin
- punk := GetServer;
- Fintf:= punk as IADsDNWithBinary;
- end;
-end;
-
-procedure TDNWithBinary.ConnectTo(svrIntf: IADsDNWithBinary);
-begin
- Disconnect;
- FIntf := svrIntf;
-end;
-
-procedure TDNWithBinary.DisConnect;
-begin
- if Fintf <> nil then
- begin
- FIntf := nil;
- end;
-end;
-
-function TDNWithBinary.GetDefaultInterface: IADsDNWithBinary;
-begin
- if FIntf = nil then
- Connect;
- Assert(FIntf <> nil, 'DefaultInterface is NULL. Component is not connected to Server. You must call ''Connect'' or ''ConnectTo'' before this operation');
- Result := FIntf;
-end;
-
-constructor TDNWithBinary.Create(AOwner: TComponent);
-begin
- inherited Create(AOwner);
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
- FProps := TDNWithBinaryProperties.Create(Self);
-{$ENDIF}
-end;
-
-destructor TDNWithBinary.Destroy;
-begin
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
- FProps.Free;
-{$ENDIF}
- inherited Destroy;
-end;
-
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
-function TDNWithBinary.GetServerProperties: TDNWithBinaryProperties;
-begin
- Result := FProps;
-end;
-{$ENDIF}
-
-function TDNWithBinary.Get_BinaryValue: OleVariant;
-begin
- Result := DefaultInterface.Get_BinaryValue;
-end;
-
-procedure TDNWithBinary.Set_BinaryValue(retval: OleVariant);
-begin
- DefaultInterface.Set_BinaryValue(retval);
-end;
-
-function TDNWithBinary.Get_DNString: WideString;
-begin
- Result := DefaultInterface.Get_DNString;
-end;
-
-procedure TDNWithBinary.Set_DNString(const retval: WideString);
-begin
- DefaultInterface.Set_DNString(retval);
-end;
-
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
-constructor TDNWithBinaryProperties.Create(AServer: TDNWithBinary);
-begin
- inherited Create;
- FServer := AServer;
-end;
-
-function TDNWithBinaryProperties.GetDefaultInterface: IADsDNWithBinary;
-begin
- Result := FServer.DefaultInterface;
-end;
-
-function TDNWithBinaryProperties.Get_BinaryValue: OleVariant;
-begin
- Result := DefaultInterface.Get_BinaryValue;
-end;
-
-procedure TDNWithBinaryProperties.Set_BinaryValue(retval: OleVariant);
-begin
- DefaultInterface.Set_BinaryValue(retval);
-end;
-
-function TDNWithBinaryProperties.Get_DNString: WideString;
-begin
- Result := DefaultInterface.Get_DNString;
-end;
-
-procedure TDNWithBinaryProperties.Set_DNString(const retval: WideString);
-begin
- DefaultInterface.Set_DNString(retval);
-end;
-
-{$ENDIF}
-
-class function CoDNWithString.Create: IADsDNWithString;
-begin
- Result := CreateComObject(CLASS_DNWithString) as IADsDNWithString;
-end;
-
-class function CoDNWithString.CreateRemote(const MachineName: string): IADsDNWithString;
-begin
- Result := CreateRemoteComObject(MachineName, CLASS_DNWithString) as IADsDNWithString;
-end;
-
-procedure TDNWithString.InitServerData;
-const
- CServerData: TServerData = (
- ClassID: '{334857CC-F934-11D2-BA96-00C04FB6D0D1}';
- IntfIID: '{370DF02E-F934-11D2-BA96-00C04FB6D0D1}';
- EventIID: '';
- LicenseKey: nil;
- Version: 500);
-begin
- ServerData := @CServerData;
-end;
-
-procedure TDNWithString.Connect;
-var
- punk: IUnknown;
-begin
- if FIntf = nil then
- begin
- punk := GetServer;
- Fintf:= punk as IADsDNWithString;
- end;
-end;
-
-procedure TDNWithString.ConnectTo(svrIntf: IADsDNWithString);
-begin
- Disconnect;
- FIntf := svrIntf;
-end;
-
-procedure TDNWithString.DisConnect;
-begin
- if Fintf <> nil then
- begin
- FIntf := nil;
- end;
-end;
-
-function TDNWithString.GetDefaultInterface: IADsDNWithString;
-begin
- if FIntf = nil then
- Connect;
- Assert(FIntf <> nil, 'DefaultInterface is NULL. Component is not connected to Server. You must call ''Connect'' or ''ConnectTo'' before this operation');
- Result := FIntf;
-end;
-
-constructor TDNWithString.Create(AOwner: TComponent);
-begin
- inherited Create(AOwner);
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
- FProps := TDNWithStringProperties.Create(Self);
-{$ENDIF}
-end;
-
-destructor TDNWithString.Destroy;
-begin
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
- FProps.Free;
-{$ENDIF}
- inherited Destroy;
-end;
-
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
-function TDNWithString.GetServerProperties: TDNWithStringProperties;
-begin
- Result := FProps;
-end;
-{$ENDIF}
-
-function TDNWithString.Get_StringValue: WideString;
-begin
- Result := DefaultInterface.Get_StringValue;
-end;
-
-procedure TDNWithString.Set_StringValue(const retval: WideString);
-begin
- DefaultInterface.Set_StringValue(retval);
-end;
-
-function TDNWithString.Get_DNString: WideString;
-begin
- Result := DefaultInterface.Get_DNString;
-end;
-
-procedure TDNWithString.Set_DNString(const retval: WideString);
-begin
- DefaultInterface.Set_DNString(retval);
-end;
-
-{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
-constructor TDNWithStringProperties.Create(AServer: TDNWithString);
-begin
- inherited Create;
- FServer := AServer;
-end;
-
-function TDNWithStringProperties.GetDefaultInterface: IADsDNWithString;
-begin
- Result := FServer.DefaultInterface;
-end;
-
-function TDNWithStringProperties.Get_StringValue: WideString;
-begin
- Result := DefaultInterface.Get_StringValue;
-end;
-
-procedure TDNWithStringProperties.Set_StringValue(const retval: WideString);
-begin
- DefaultInterface.Set_StringValue(retval);
-end;
-
-function TDNWithStringProperties.Get_DNString: WideString;
-begin
- Result := DefaultInterface.Get_DNString;
-end;
-
-procedure TDNWithStringProperties.Set_DNString(const retval: WideString);
-begin
- DefaultInterface.Set_DNString(retval);
-end;
-
-{$ENDIF}
-
-
-{$ifdef FPC} // dummy
-{
-function CreateComObject(ID: TGUID): IUnknown; //empty
-
-begin
-end;
-
-function CreateRemoteComObject(w:widestring; ID: TGUID): IUnknown; //empty
-
-begin
-end;
-}
-function tOleServer.GetServer:IUnknown;
-begin
-end;
-
-procedure tOleServer.InitServerData;
-begin
-end;
-constructor tOleServer.Create(AOwner: TComponent);
-begin
-end;
-Procedure tOleServer.Connect;
-begin
-end;
-procedure tOleServer.Disconnect;
-begin
-end;
-
-
-{$endif}
-
-
-procedure Register;
-begin
- RegisterComponents('ActiveX',[TPropertyEntry, TPropertyValue, TAccessControlEntry, TAccessControlList,
- TSecurityDescriptor, TLargeInteger, TNameTranslate, TCaseIgnoreList, TFaxNumber,
- TNetAddress, TOctetList, TEmail, TPath, TReplicaPointer,
- TAcl, TTimestamp, TPostalAddress, TBackLink, TTypedName,
- THold, TPathname, TADSystemInfo, TWinNTSystemInfo, TDNWithBinary,
- TDNWithString]);
-end;
-
-
-
-end.
+// $Id: jwaadstlb.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaAdsTLB;
+
+// ************************************************************************ //
+// WARNING
+// -------
+// The types declared in this file were generated from data read from a
+// Type Library. If this type library is explicitly or indirectly (via
+// another type library referring to this type library) re-imported, or the
+// 'Refresh' command of the Type Library Editor activated while editing the
+// Type Library, the contents of this file will be regenerated and all
+// manual modifications will be lost.
+// ************************************************************************ //
+
+// (rom) deactivated CVS string
+// PASTLWTR : Revision: 1.88.1.0.1.0
+// File generated on 9/25/2000 11:37:09 AM from Type Library described below.
+
+// *************************************************************************//
+// NOTE:
+// Items guarded by $IFDEF_LIVE_SERVER_AT_DESIGN_TIME are used by properties
+// which return objects that may need to be explicitly created via a function
+// call prior to any access via the property. These items have been disabled
+// in order to prevent accidental use from within the object inspector. You
+// may enable them by defining LIVE_SERVER_AT_DESIGN_TIME or by selectively
+// removing them from the $IFDEF blocks. However, such items must still be
+// programmatically created via a method of the appropriate CoClass before
+// they can be used.
+// ************************************************************************ //
+// Type Lib: C:\WINNT\system32\activeds.tlb (1)
+// IID\LCID: {97D25DB0-0363-11CF-ABC4-02608C9E7553}\0
+// Helpfile:
+// DepndLst:
+// (1) v2.0 stdole, (C:\WINNT\System32\stdole2.tlb)
+// (2) v4.0 StdVCL, (C:\WINNT\System32\STDVCL40.DLL)
+// Errors:
+// Hint: Member 'String' of '_ADS_CASEIGNORE_LIST' changed to 'String_'
+// Hint: Member 'Type' of '__MIDL___MIDL_itf_ads_0000_0005' changed to 'Type_'
+// Hint: Member 'Type' of '__MIDL___MIDL_itf_ads_0000_0014' changed to 'Type_'
+// Hint: Member 'Class' of 'IADs' changed to 'Class_'
+// Hint: Member 'Set' of 'IADsNameTranslate' changed to 'Set_'
+// Hint: Member 'Type' of 'IADsEmail' changed to 'Type_'
+// Hint: Member 'Type' of 'IADsPath' changed to 'Type_'
+// Hint: Member 'Set' of 'IADsPathname' changed to 'Set_'
+// Error creating palette bitmap of (TPropertyEntry) : Server activeds.dll contains no icons
+// Error creating palette bitmap of (TPropertyValue) : Server activeds.dll contains no icons
+// Error creating palette bitmap of (TAccessControlEntry) : Server activeds.dll contains no icons
+// Error creating palette bitmap of (TAccessControlList) : Server activeds.dll contains no icons
+// Error creating palette bitmap of (TSecurityDescriptor) : Server activeds.dll contains no icons
+// Error creating palette bitmap of (TLargeInteger) : Server activeds.dll contains no icons
+// Error creating palette bitmap of (TNameTranslate) : Server activeds.dll contains no icons
+// Error creating palette bitmap of (TCaseIgnoreList) : Server activeds.dll contains no icons
+// Error creating palette bitmap of (TFaxNumber) : Server activeds.dll contains no icons
+// Error creating palette bitmap of (TNetAddress) : Server activeds.dll contains no icons
+// Error creating palette bitmap of (TOctetList) : Server activeds.dll contains no icons
+// Error creating palette bitmap of (TEmail) : Server activeds.dll contains no icons
+// Error creating palette bitmap of (TPath) : Server activeds.dll contains no icons
+// Error creating palette bitmap of (TReplicaPointer) : Server activeds.dll contains no icons
+// Error creating palette bitmap of (TAcl) : Server activeds.dll contains no icons
+// Error creating palette bitmap of (TTimestamp) : Server activeds.dll contains no icons
+// Error creating palette bitmap of (TPostalAddress) : Server activeds.dll contains no icons
+// Error creating palette bitmap of (TBackLink) : Server activeds.dll contains no icons
+// Error creating palette bitmap of (TTypedName) : Server activeds.dll contains no icons
+// Error creating palette bitmap of (THold) : Server activeds.dll contains no icons
+// Error creating palette bitmap of (TPathname) : Server activeds.dll contains no icons
+// Error creating palette bitmap of (TADSystemInfo) : Server activeds.dll contains no icons
+// Error creating palette bitmap of (TWinNTSystemInfo) : Server activeds.dll contains no icons
+// Error creating palette bitmap of (TDNWithBinary) : Server activeds.dll contains no icons
+// Error creating palette bitmap of (TDNWithString) : Server activeds.dll contains no icons
+// ************************************************************************ //
+{$TYPEDADDRESS OFF} // Unit must be compiled without type-checked pointers.
+
+interface
+{$i jediapilib.inc}
+uses
+ Windows, ActiveX, Classes {$IFNDEF NOVCL} ,Graphics, OleServer, OleCtrls, StdVCL {$ENDIF} ;
+
+{$IFDEF FPC}
+Type
+// Temporary dummies to get FPC working.
+ TServerData= Record
+ ClassID: TGUID;
+ IntfIID: TGUID;
+ EventIID: String; // probably TGUID too
+ LicenseKey: pointer;
+ Version: integer
+ end;
+
+
+
+ TOleServer = Class(TComponent) // for registercomponents to work
+ private
+ ServerData : ^TServerData;
+ public
+ function GetServer:IUnknown;
+ procedure InitServerData; virtual;
+ constructor Create(AOwner: TComponent); virtual;
+ Procedure Connect; virtual;
+ procedure Disconnect; virtual;
+ end;
+
+
+ SysUINT = Windows.UINT;
+ SysINT = Windows.WINT;
+{$endif}
+
+// *********************************************************************//
+// GUIDS declared in the TypeLibrary. Following prefixes are used:
+// Type Libraries : LIBID_xxxx
+// CoClasses : CLASS_xxxx
+// DISPInterfaces : DIID_xxxx
+// Non-DISP interfaces: IID_xxxx
+// *********************************************************************//
+
+const
+ // TypeLibrary Major and minor versions
+ ActiveDsMajorVersion = 1;
+ ActiveDsMinorVersion = 0;
+
+ LIBID_ActiveDs: TGUID = '{97D25DB0-0363-11CF-ABC4-02608C9E7553}';
+
+ IID_IADs: TGUID = '{FD8256D0-FD15-11CE-ABC4-02608C9E7553}';
+ IID_IADsContainer: TGUID = '{001677D0-FD16-11CE-ABC4-02608C9E7553}';
+ IID_IADsCollection: TGUID = '{72B945E0-253B-11CF-A988-00AA006BC149}';
+ IID_IADsMembers: TGUID = '{451A0030-72EC-11CF-B03B-00AA006E0975}';
+ IID_IADsPropertyList: TGUID = '{C6F602B6-8F69-11D0-8528-00C04FD8D503}';
+ IID_IADsPropertyEntry: TGUID = '{05792C8E-941F-11D0-8529-00C04FD8D503}';
+ CLASS_PropertyEntry: TGUID = '{72D3EDC2-A4C4-11D0-8533-00C04FD8D503}';
+ IID_IADsPropertyValue: TGUID = '{79FA9AD0-A97C-11D0-8534-00C04FD8D503}';
+ IID_IADsPropertyValue2: TGUID = '{306E831C-5BC7-11D1-A3B8-00C04FB950DC}';
+ CLASS_PropertyValue: TGUID = '{7B9E38B0-A97C-11D0-8534-00C04FD8D503}';
+ IID_IPrivateDispatch: TGUID = '{86AB4BBE-65F6-11D1-8C13-00C04FD8D503}';
+ IID_ITypeInfo: TGUID = '{00020401-0000-0000-C000-000000000046}';
+ IID_ITypeComp: TGUID = '{00020403-0000-0000-C000-000000000046}';
+ IID_ITypeLib: TGUID = '{00020402-0000-0000-C000-000000000046}';
+ IID_IPrivateUnknown: TGUID = '{89126BAB-6EAD-11D1-8C18-00C04FD8D503}';
+ IID_IADsExtension: TGUID = '{3D35553C-D2B0-11D1-B17B-0000F87593A0}';
+ IID_IADsDeleteOps: TGUID = '{B2BD0902-8878-11D1-8C21-00C04FD8D503}';
+ IID_IADsNamespaces: TGUID = '{28B96BA0-B330-11CF-A9AD-00AA006BC149}';
+ IID_IADsClass: TGUID = '{C8F93DD0-4AE0-11CF-9E73-00AA004A5691}';
+ IID_IADsProperty: TGUID = '{C8F93DD3-4AE0-11CF-9E73-00AA004A5691}';
+ IID_IADsSyntax: TGUID = '{C8F93DD2-4AE0-11CF-9E73-00AA004A5691}';
+ IID_IADsLocality: TGUID = '{A05E03A2-EFFE-11CF-8ABC-00C04FD8D503}';
+ IID_IADsO: TGUID = '{A1CD2DC6-EFFE-11CF-8ABC-00C04FD8D503}';
+ IID_IADsOU: TGUID = '{A2F733B8-EFFE-11CF-8ABC-00C04FD8D503}';
+ IID_IADsDomain: TGUID = '{00E4C220-FD16-11CE-ABC4-02608C9E7553}';
+ IID_IADsComputer: TGUID = '{EFE3CC70-1D9F-11CF-B1F3-02608C9E7553}';
+ IID_IADsComputerOperations: TGUID = '{EF497680-1D9F-11CF-B1F3-02608C9E7553}';
+ IID_IADsGroup: TGUID = '{27636B00-410F-11CF-B1FF-02608C9E7553}';
+ IID_IADsUser: TGUID = '{3E37E320-17E2-11CF-ABC4-02608C9E7553}';
+ IID_IADsPrintQueue: TGUID = '{B15160D0-1226-11CF-A985-00AA006BC149}';
+ IID_IADsPrintQueueOperations: TGUID = '{124BE5C0-156E-11CF-A986-00AA006BC149}';
+ IID_IADsPrintJob: TGUID = '{32FB6780-1ED0-11CF-A988-00AA006BC149}';
+ IID_IADsPrintJobOperations: TGUID = '{9A52DB30-1ECF-11CF-A988-00AA006BC149}';
+ IID_IADsService: TGUID = '{68AF66E0-31CA-11CF-A98A-00AA006BC149}';
+ IID_IADsServiceOperations: TGUID = '{5D7B33F0-31CA-11CF-A98A-00AA006BC149}';
+ IID_IADsFileService: TGUID = '{A89D1900-31CA-11CF-A98A-00AA006BC149}';
+ IID_IADsFileServiceOperations: TGUID = '{A02DED10-31CA-11CF-A98A-00AA006BC149}';
+ IID_IADsFileShare: TGUID = '{EB6DCAF0-4B83-11CF-A995-00AA006BC149}';
+ IID_IADsSession: TGUID = '{398B7DA0-4AAB-11CF-AE2C-00AA006EBFB9}';
+ IID_IADsResource: TGUID = '{34A05B20-4AAB-11CF-AE2C-00AA006EBFB9}';
+ IID_IADsOpenDSObject: TGUID = '{DDF2891E-0F9C-11D0-8AD4-00C04FD8D503}';
+ IID_IDirectoryObject: TGUID = '{E798DE2C-22E4-11D0-84FE-00C04FD8D503}';
+ IID_IDirectorySearch: TGUID = '{109BA8EC-92F0-11D0-A790-00C04FD8D5A8}';
+ IID_IDirectorySchemaMgmt: TGUID = '{75DB3B9C-A4D8-11D0-A79C-00C04FD8D5A8}';
+ IID_IADsAggregatee: TGUID = '{1346CE8C-9039-11D0-8528-00C04FD8D503}';
+ IID_IADsAggregator: TGUID = '{52DB5FB0-941F-11D0-8529-00C04FD8D503}';
+ IID_IADsAccessControlEntry: TGUID = '{B4F3A14C-9BDD-11D0-852C-00C04FD8D503}';
+ CLASS_AccessControlEntry: TGUID = '{B75AC000-9BDD-11D0-852C-00C04FD8D503}';
+ IID_IADsAccessControlList: TGUID = '{B7EE91CC-9BDD-11D0-852C-00C04FD8D503}';
+ CLASS_AccessControlList: TGUID = '{B85EA052-9BDD-11D0-852C-00C04FD8D503}';
+ IID_IADsSecurityDescriptor: TGUID = '{B8C787CA-9BDD-11D0-852C-00C04FD8D503}';
+ CLASS_SecurityDescriptor: TGUID = '{B958F73C-9BDD-11D0-852C-00C04FD8D503}';
+ IID_IADsLargeInteger: TGUID = '{9068270B-0939-11D1-8BE1-00C04FD8D503}';
+ CLASS_LargeInteger: TGUID = '{927971F5-0939-11D1-8BE1-00C04FD8D503}';
+ IID_IADsNameTranslate: TGUID = '{B1B272A3-3625-11D1-A3A4-00C04FB950DC}';
+ CLASS_NameTranslate: TGUID = '{274FAE1F-3626-11D1-A3A4-00C04FB950DC}';
+ IID_IADsCaseIgnoreList: TGUID = '{7B66B533-4680-11D1-A3B4-00C04FB950DC}';
+ CLASS_CaseIgnoreList: TGUID = '{15F88A55-4680-11D1-A3B4-00C04FB950DC}';
+ IID_IADsFaxNumber: TGUID = '{A910DEA9-4680-11D1-A3B4-00C04FB950DC}';
+ CLASS_FaxNumber: TGUID = '{A5062215-4681-11D1-A3B4-00C04FB950DC}';
+ IID_IADsNetAddress: TGUID = '{B21A50A9-4080-11D1-A3AC-00C04FB950DC}';
+ CLASS_NetAddress: TGUID = '{B0B71247-4080-11D1-A3AC-00C04FB950DC}';
+ IID_IADsOctetList: TGUID = '{7B28B80F-4680-11D1-A3B4-00C04FB950DC}';
+ CLASS_OctetList: TGUID = '{1241400F-4680-11D1-A3B4-00C04FB950DC}';
+ IID_IADsEmail: TGUID = '{97AF011A-478E-11D1-A3B4-00C04FB950DC}';
+ CLASS_Email: TGUID = '{8F92A857-478E-11D1-A3B4-00C04FB950DC}';
+ IID_IADsPath: TGUID = '{B287FCD5-4080-11D1-A3AC-00C04FB950DC}';
+ CLASS_Path: TGUID = '{B2538919-4080-11D1-A3AC-00C04FB950DC}';
+ IID_IADsReplicaPointer: TGUID = '{F60FB803-4080-11D1-A3AC-00C04FB950DC}';
+ CLASS_ReplicaPointer: TGUID = '{F5D1BADF-4080-11D1-A3AC-00C04FB950DC}';
+ IID_IADsAcl: TGUID = '{8452D3AB-0869-11D1-A377-00C04FB950DC}';
+ CLASS_Acl: TGUID = '{7AF1EFB6-0869-11D1-A377-00C04FB950DC}';
+ IID_IADsTimestamp: TGUID = '{B2F5A901-4080-11D1-A3AC-00C04FB950DC}';
+ CLASS_Timestamp: TGUID = '{B2BED2EB-4080-11D1-A3AC-00C04FB950DC}';
+ IID_IADsPostalAddress: TGUID = '{7ADECF29-4680-11D1-A3B4-00C04FB950DC}';
+ CLASS_PostalAddress: TGUID = '{0A75AFCD-4680-11D1-A3B4-00C04FB950DC}';
+ IID_IADsBackLink: TGUID = '{FD1302BD-4080-11D1-A3AC-00C04FB950DC}';
+ CLASS_BackLink: TGUID = '{FCBF906F-4080-11D1-A3AC-00C04FB950DC}';
+ IID_IADsTypedName: TGUID = '{B371A349-4080-11D1-A3AC-00C04FB950DC}';
+ CLASS_TypedName: TGUID = '{B33143CB-4080-11D1-A3AC-00C04FB950DC}';
+ IID_IADsHold: TGUID = '{B3EB3B37-4080-11D1-A3AC-00C04FB950DC}';
+ CLASS_Hold: TGUID = '{B3AD3E13-4080-11D1-A3AC-00C04FB950DC}';
+ IID_IADsObjectOptions: TGUID = '{46F14FDA-232B-11D1-A808-00C04FD8D5A8}';
+ IID_IADsPathname: TGUID = '{D592AED4-F420-11D0-A36E-00C04FB950DC}';
+ CLASS_Pathname: TGUID = '{080D0D78-F421-11D0-A36E-00C04FB950DC}';
+ IID_IADsADSystemInfo: TGUID = '{5BB11929-AFD1-11D2-9CB9-0000F87A369E}';
+ CLASS_ADSystemInfo: TGUID = '{50B6327F-AFD1-11D2-9CB9-0000F87A369E}';
+ IID_IADsWinNTSystemInfo: TGUID = '{6C6D65DC-AFD1-11D2-9CB9-0000F87A369E}';
+ CLASS_WinNTSystemInfo: TGUID = '{66182EC4-AFD1-11D2-9CB9-0000F87A369E}';
+ IID_IADsDNWithBinary: TGUID = '{7E99C0A2-F935-11D2-BA96-00C04FB6D0D1}';
+ CLASS_DNWithBinary: TGUID = '{7E99C0A3-F935-11D2-BA96-00C04FB6D0D1}';
+ IID_IADsDNWithString: TGUID = '{370DF02E-F934-11D2-BA96-00C04FB6D0D1}';
+ CLASS_DNWithString: TGUID = '{334857CC-F934-11D2-BA96-00C04FB6D0D1}';
+
+// *********************************************************************//
+// Declaration of Enumerations defined in Type Library
+// *********************************************************************//
+// Constants for enum __MIDL___MIDL_itf_ads_0000_0001
+type
+ __MIDL___MIDL_itf_ads_0000_0001 = TOleEnum;
+const
+ ADSTYPE_INVALID = $00000000;
+ ADSTYPE_DN_STRING = $00000001;
+ ADSTYPE_CASE_EXACT_STRING = $00000002;
+ ADSTYPE_CASE_IGNORE_STRING = $00000003;
+ ADSTYPE_PRINTABLE_STRING = $00000004;
+ ADSTYPE_NUMERIC_STRING = $00000005;
+ ADSTYPE_BOOLEAN = $00000006;
+ ADSTYPE_INTEGER = $00000007;
+ ADSTYPE_OCTET_STRING = $00000008;
+ ADSTYPE_UTC_TIME = $00000009;
+ ADSTYPE_LARGE_INTEGER = $0000000A;
+ ADSTYPE_PROV_SPECIFIC = $0000000B;
+ ADSTYPE_OBJECT_CLASS = $0000000C;
+ ADSTYPE_CASEIGNORE_LIST = $0000000D;
+ ADSTYPE_OCTET_LIST = $0000000E;
+ ADSTYPE_PATH = $0000000F;
+ ADSTYPE_POSTALADDRESS = $00000010;
+ ADSTYPE_TIMESTAMP = $00000011;
+ ADSTYPE_BACKLINK = $00000012;
+ ADSTYPE_TYPEDNAME = $00000013;
+ ADSTYPE_HOLD = $00000014;
+ ADSTYPE_NETADDRESS = $00000015;
+ ADSTYPE_REPLICAPOINTER = $00000016;
+ ADSTYPE_FAXNUMBER = $00000017;
+ ADSTYPE_EMAIL = $00000018;
+ ADSTYPE_NT_SECURITY_DESCRIPTOR = $00000019;
+ ADSTYPE_UNKNOWN = $0000001A;
+ ADSTYPE_DN_WITH_BINARY = $0000001B;
+ ADSTYPE_DN_WITH_STRING = $0000001C;
+
+// Constants for enum __MIDL___MIDL_itf_ads_0000_0018
+type
+ __MIDL___MIDL_itf_ads_0000_0018 = TOleEnum;
+const
+ ADS_SECURE_AUTHENTICATION = $00000001;
+ ADS_USE_ENCRYPTION = $00000002;
+ ADS_USE_SSL = $00000002;
+ ADS_READONLY_SERVER = $00000004;
+ ADS_PROMPT_CREDENTIALS = $00000008;
+ ADS_NO_AUTHENTICATION = $00000010;
+ ADS_FAST_BIND = $00000020;
+ ADS_USE_SIGNING = $00000040;
+ ADS_USE_SEALING = $00000080;
+ ADS_USE_DELEGATION = $00000100;
+ ADS_AUTH_RESERVED = $80000000;
+
+// Constants for enum __MIDL___MIDL_itf_ads_0000_0019
+type
+ __MIDL___MIDL_itf_ads_0000_0019 = TOleEnum;
+const
+ ADS_STATUS_S_OK = $00000000;
+ ADS_STATUS_INVALID_SEARCHPREF = $00000001;
+ ADS_STATUS_INVALID_SEARCHPREFVALUE = $00000002;
+
+// Constants for enum __MIDL___MIDL_itf_ads_0000_0020
+type
+ __MIDL___MIDL_itf_ads_0000_0020 = TOleEnum;
+const
+ ADS_DEREF_NEVER = $00000000;
+ ADS_DEREF_SEARCHING = $00000001;
+ ADS_DEREF_FINDING = $00000002;
+ ADS_DEREF_ALWAYS = $00000003;
+
+// Constants for enum __MIDL___MIDL_itf_ads_0000_0021
+type
+ __MIDL___MIDL_itf_ads_0000_0021 = TOleEnum;
+const
+ ADS_SCOPE_BASE = $00000000;
+ ADS_SCOPE_ONELEVEL = $00000001;
+ ADS_SCOPE_SUBTREE = $00000002;
+
+// Constants for enum __MIDL___MIDL_itf_ads_0000_0022
+type
+ __MIDL___MIDL_itf_ads_0000_0022 = TOleEnum;
+const
+ ADSIPROP_ASYNCHRONOUS = $00000000;
+ ADSIPROP_DEREF_ALIASES = $00000001;
+ ADSIPROP_SIZE_LIMIT = $00000002;
+ ADSIPROP_TIME_LIMIT = $00000003;
+ ADSIPROP_ATTRIBTYPES_ONLY = $00000004;
+ ADSIPROP_SEARCH_SCOPE = $00000005;
+ ADSIPROP_TIMEOUT = $00000006;
+ ADSIPROP_PAGESIZE = $00000007;
+ ADSIPROP_PAGED_TIME_LIMIT = $00000008;
+ ADSIPROP_CHASE_REFERRALS = $00000009;
+ ADSIPROP_SORT_ON = $0000000A;
+ ADSIPROP_CACHE_RESULTS = $0000000B;
+ ADSIPROP_ADSIFLAG = $0000000C;
+
+// Constants for enum __MIDL___MIDL_itf_ads_0000_0023
+type
+ __MIDL___MIDL_itf_ads_0000_0023 = TOleEnum;
+const
+ ADSI_DIALECT_LDAP = $00000000;
+ ADSI_DIALECT_SQL = $00000001;
+
+// Constants for enum __MIDL___MIDL_itf_ads_0000_0024
+type
+ __MIDL___MIDL_itf_ads_0000_0024 = TOleEnum;
+const
+ ADS_CHASE_REFERRALS_NEVER = $00000000;
+ ADS_CHASE_REFERRALS_SUBORDINATE = $00000020;
+ ADS_CHASE_REFERRALS_EXTERNAL = $00000040;
+ ADS_CHASE_REFERRALS_ALWAYS = $00000060;
+
+// Constants for enum __MIDL___MIDL_itf_ads_0000_0025
+type
+ __MIDL___MIDL_itf_ads_0000_0025 = TOleEnum;
+const
+ ADS_SEARCHPREF_ASYNCHRONOUS = $00000000;
+ ADS_SEARCHPREF_DEREF_ALIASES = $00000001;
+ ADS_SEARCHPREF_SIZE_LIMIT = $00000002;
+ ADS_SEARCHPREF_TIME_LIMIT = $00000003;
+ ADS_SEARCHPREF_ATTRIBTYPES_ONLY = $00000004;
+ ADS_SEARCHPREF_SEARCH_SCOPE = $00000005;
+ ADS_SEARCHPREF_TIMEOUT = $00000006;
+ ADS_SEARCHPREF_PAGESIZE = $00000007;
+ ADS_SEARCHPREF_PAGED_TIME_LIMIT = $00000008;
+ ADS_SEARCHPREF_CHASE_REFERRALS = $00000009;
+ ADS_SEARCHPREF_SORT_ON = $0000000A;
+ ADS_SEARCHPREF_CACHE_RESULTS = $0000000B;
+ ADS_SEARCHPREF_DIRSYNC = $0000000C;
+ ADS_SEARCHPREF_TOMBSTONE = $0000000D;
+
+// Constants for enum __MIDL___MIDL_itf_ads_0000_0026
+type
+ __MIDL___MIDL_itf_ads_0000_0026 = TOleEnum;
+const
+ ADS_PROPERTY_CLEAR = $00000001;
+ ADS_PROPERTY_UPDATE = $00000002;
+ ADS_PROPERTY_APPEND = $00000003;
+ ADS_PROPERTY_DELETE = $00000004;
+
+// Constants for enum tagTYPEKIND
+type
+ tagTYPEKIND = TOleEnum;
+const
+ TKIND_ENUM = $00000000;
+ TKIND_RECORD = $00000001;
+ TKIND_MODULE = $00000002;
+ TKIND_INTERFACE = $00000003;
+ TKIND_DISPATCH = $00000004;
+ TKIND_COCLASS = $00000005;
+ TKIND_ALIAS = $00000006;
+ TKIND_UNION = $00000007;
+ TKIND_MAX = $00000008;
+
+// Constants for enum tagDESCKIND
+type
+ tagDESCKIND = TOleEnum;
+const
+ DESCKIND_NONE = $00000000;
+ DESCKIND_FUNCDESC = $00000001;
+ DESCKIND_VARDESC = $00000002;
+ DESCKIND_TYPECOMP = $00000003;
+ DESCKIND_IMPLICITAPPOBJ = $00000004;
+ DESCKIND_MAX = $00000005;
+
+// Constants for enum tagFUNCKIND
+type
+ tagFUNCKIND = TOleEnum;
+const
+ FUNC_VIRTUAL = $00000000;
+ FUNC_PUREVIRTUAL = $00000001;
+ FUNC_NONVIRTUAL = $00000002;
+ FUNC_STATIC = $00000003;
+ FUNC_DISPATCH = $00000004;
+
+// Constants for enum tagINVOKEKIND
+type
+ tagINVOKEKIND = TOleEnum;
+const
+ INVOKE_FUNC = $00000001;
+ INVOKE_PROPERTYGET = $00000002;
+ INVOKE_PROPERTYPUT = $00000004;
+ INVOKE_PROPERTYPUTREF = $00000008;
+
+// Constants for enum tagCALLCONV
+type
+ tagCALLCONV = TOleEnum;
+const
+ CC_FASTCALL = $00000000;
+ CC_CDECL = $00000001;
+ CC_MSCPASCAL = $00000002;
+ CC_PASCAL = $00000002;
+ CC_MACPASCAL = $00000003;
+ CC_STDCALL = $00000004;
+ CC_FPFASTCALL = $00000005;
+ CC_SYSCALL = $00000006;
+ CC_MPWCDECL = $00000007;
+ CC_MPWPASCAL = $00000008;
+ CC_MAX = $00000009;
+
+// Constants for enum tagVARKIND
+type
+ tagVARKIND = TOleEnum;
+const
+ VAR_PERINSTANCE = $00000000;
+ VAR_STATIC = $00000001;
+ VAR_CONST = $00000002;
+ VAR_DISPATCH = $00000003;
+
+// Constants for enum tagSYSKIND
+type
+ tagSYSKIND = TOleEnum;
+const
+ SYS_WIN16 = $00000000;
+ SYS_WIN32 = $00000001;
+ SYS_MAC = $00000002;
+ SYS_WIN64 = $00000001;
+
+// Constants for enum __MIDL___MIDL_itf_ads_0120_0001
+type
+ __MIDL___MIDL_itf_ads_0120_0001 = TOleEnum;
+const
+ ADS_SYSTEMFLAG_DISALLOW_DELETE = $80000000;
+ ADS_SYSTEMFLAG_CONFIG_ALLOW_RENAME = $40000000;
+ ADS_SYSTEMFLAG_CONFIG_ALLOW_MOVE = $20000000;
+ ADS_SYSTEMFLAG_CONFIG_ALLOW_LIMITED_MOVE = $10000000;
+ ADS_SYSTEMFLAG_DOMAIN_DISALLOW_RENAME = $08000000;
+ ADS_SYSTEMFLAG_DOMAIN_DISALLOW_MOVE = $04000000;
+ ADS_SYSTEMFLAG_CR_NTDS_NC = $00000001;
+ ADS_SYSTEMFLAG_CR_NTDS_DOMAIN = $00000002;
+ ADS_SYSTEMFLAG_ATTR_NOT_REPLICATED = $00000001;
+ ADS_SYSTEMFLAG_ATTR_IS_CONSTRUCTED = $00000004;
+
+// Constants for enum __MIDL___MIDL_itf_ads_0126_0001
+type
+ __MIDL___MIDL_itf_ads_0126_0001 = TOleEnum;
+const
+ ADS_GROUP_TYPE_GLOBAL_GROUP = $00000002;
+ ADS_GROUP_TYPE_DOMAIN_LOCAL_GROUP = $00000004;
+ ADS_GROUP_TYPE_LOCAL_GROUP = $00000004;
+ ADS_GROUP_TYPE_UNIVERSAL_GROUP = $00000008;
+ ADS_GROUP_TYPE_SECURITY_ENABLED = $80000000;
+
+// Constants for enum ADS_USER_FLAG
+type
+ ADS_USER_FLAG = TOleEnum;
+const
+ ADS_UF_SCRIPT = $00000001;
+ ADS_UF_ACCOUNTDISABLE = $00000002;
+ ADS_UF_HOMEDIR_REQUIRED = $00000008;
+ ADS_UF_LOCKOUT = $00000010;
+ ADS_UF_PASSWD_NOTREQD = $00000020;
+ ADS_UF_PASSWD_CANT_CHANGE = $00000040;
+ ADS_UF_ENCRYPTED_TEXT_PASSWORD_ALLOWED = $00000080;
+ ADS_UF_TEMP_DUPLICATE_ACCOUNT = $00000100;
+ ADS_UF_NORMAL_ACCOUNT = $00000200;
+ ADS_UF_INTERDOMAIN_TRUST_ACCOUNT = $00000800;
+ ADS_UF_WORKSTATION_TRUST_ACCOUNT = $00001000;
+ ADS_UF_SERVER_TRUST_ACCOUNT = $00002000;
+ ADS_UF_DONT_EXPIRE_PASSWD = $00010000;
+ ADS_UF_MNS_LOGON_ACCOUNT = $00020000;
+ ADS_UF_SMARTCARD_REQUIRED = $00040000;
+ ADS_UF_TRUSTED_FOR_DELEGATION = $00080000;
+ ADS_UF_NOT_DELEGATED = $00100000;
+
+// Constants for enum __MIDL___MIDL_itf_ads_0148_0001
+type
+ __MIDL___MIDL_itf_ads_0148_0001 = TOleEnum;
+const
+ ADS_RIGHT_DELETE = $00010000;
+ ADS_RIGHT_READ_CONTROL = $00020000;
+ ADS_RIGHT_WRITE_DAC = $00040000;
+ ADS_RIGHT_WRITE_OWNER = $00080000;
+ ADS_RIGHT_SYNCHRONIZE = $00100000;
+ ADS_RIGHT_ACCESS_SYSTEM_SECURITY = $01000000;
+ ADS_RIGHT_GENERIC_READ = $80000000;
+ ADS_RIGHT_GENERIC_WRITE = $40000000;
+ ADS_RIGHT_GENERIC_EXECUTE = $20000000;
+ ADS_RIGHT_GENERIC_ALL = $10000000;
+ ADS_RIGHT_DS_CREATE_CHILD = $00000001;
+ ADS_RIGHT_DS_DELETE_CHILD = $00000002;
+ ADS_RIGHT_ACTRL_DS_LIST = $00000004;
+ ADS_RIGHT_DS_SELF = $00000008;
+ ADS_RIGHT_DS_READ_PROP = $00000010;
+ ADS_RIGHT_DS_WRITE_PROP = $00000020;
+ ADS_RIGHT_DS_DELETE_TREE = $00000040;
+ ADS_RIGHT_DS_LIST_OBJECT = $00000080;
+ ADS_RIGHT_DS_CONTROL_ACCESS = $00000100;
+
+// Constants for enum __MIDL___MIDL_itf_ads_0148_0002
+type
+ __MIDL___MIDL_itf_ads_0148_0002 = TOleEnum;
+const
+ ADS_ACETYPE_ACCESS_ALLOWED = $00000000;
+ ADS_ACETYPE_ACCESS_DENIED = $00000001;
+ ADS_ACETYPE_SYSTEM_AUDIT = $00000002;
+ ADS_ACETYPE_ACCESS_ALLOWED_OBJECT = $00000005;
+ ADS_ACETYPE_ACCESS_DENIED_OBJECT = $00000006;
+ ADS_ACETYPE_SYSTEM_AUDIT_OBJECT = $00000007;
+
+// Constants for enum __MIDL___MIDL_itf_ads_0148_0003
+type
+ __MIDL___MIDL_itf_ads_0148_0003 = TOleEnum;
+const
+ ADS_ACEFLAG_INHERIT_ACE = $00000002;
+ ADS_ACEFLAG_NO_PROPAGATE_INHERIT_ACE = $00000004;
+ ADS_ACEFLAG_INHERIT_ONLY_ACE = $00000008;
+ ADS_ACEFLAG_INHERITED_ACE = $00000010;
+ ADS_ACEFLAG_VALID_INHERIT_FLAGS = $0000001F;
+ ADS_ACEFLAG_SUCCESSFUL_ACCESS = $00000040;
+ ADS_ACEFLAG_FAILED_ACCESS = $00000080;
+
+// Constants for enum __MIDL___MIDL_itf_ads_0148_0004
+type
+ __MIDL___MIDL_itf_ads_0148_0004 = TOleEnum;
+const
+ ADS_FLAG_OBJECT_TYPE_PRESENT = $00000001;
+ ADS_FLAG_INHERITED_OBJECT_TYPE_PRESENT = $00000002;
+
+// Constants for enum __MIDL___MIDL_itf_ads_0148_0005
+type
+ __MIDL___MIDL_itf_ads_0148_0005 = TOleEnum;
+const
+ ADS_SD_CONTROL_SE_OWNER_DEFAULTED = $00000001;
+ ADS_SD_CONTROL_SE_GROUP_DEFAULTED = $00000002;
+ ADS_SD_CONTROL_SE_DACL_PRESENT = $00000004;
+ ADS_SD_CONTROL_SE_DACL_DEFAULTED = $00000008;
+ ADS_SD_CONTROL_SE_SACL_PRESENT = $00000010;
+ ADS_SD_CONTROL_SE_SACL_DEFAULTED = $00000020;
+ ADS_SD_CONTROL_SE_DACL_AUTO_INHERIT_REQ = $00000100;
+ ADS_SD_CONTROL_SE_SACL_AUTO_INHERIT_REQ = $00000200;
+ ADS_SD_CONTROL_SE_DACL_AUTO_INHERITED = $00000400;
+ ADS_SD_CONTROL_SE_SACL_AUTO_INHERITED = $00000800;
+ ADS_SD_CONTROL_SE_DACL_PROTECTED = $00001000;
+ ADS_SD_CONTROL_SE_SACL_PROTECTED = $00002000;
+ ADS_SD_CONTROL_SE_SELF_RELATIVE = $00008000;
+
+// Constants for enum __MIDL___MIDL_itf_ads_0148_0006
+type
+ __MIDL___MIDL_itf_ads_0148_0006 = TOleEnum;
+const
+ ADS_SD_REVISION_DS = $00000004;
+
+// Constants for enum __MIDL___MIDL_itf_ads_0149_0001
+type
+ __MIDL___MIDL_itf_ads_0149_0001 = TOleEnum;
+const
+ ADS_NAME_TYPE_1779 = $00000001;
+ ADS_NAME_TYPE_CANONICAL = $00000002;
+ ADS_NAME_TYPE_NT4 = $00000003;
+ ADS_NAME_TYPE_DISPLAY = $00000004;
+ ADS_NAME_TYPE_DOMAIN_SIMPLE = $00000005;
+ ADS_NAME_TYPE_ENTERPRISE_SIMPLE = $00000006;
+ ADS_NAME_TYPE_GUID = $00000007;
+ ADS_NAME_TYPE_UNKNOWN = $00000008;
+ ADS_NAME_TYPE_USER_PRINCIPAL_NAME = $00000009;
+ ADS_NAME_TYPE_CANONICAL_EX = $0000000A;
+ ADS_NAME_TYPE_SERVICE_PRINCIPAL_NAME = $0000000B;
+ ADS_NAME_TYPE_SID_OR_SID_HISTORY_NAME = $0000000C;
+
+// Constants for enum __MIDL___MIDL_itf_ads_0149_0002
+type
+ __MIDL___MIDL_itf_ads_0149_0002 = TOleEnum;
+const
+ ADS_NAME_INITTYPE_DOMAIN = $00000001;
+ ADS_NAME_INITTYPE_SERVER = $00000002;
+ ADS_NAME_INITTYPE_GC = $00000003;
+
+// Constants for enum __MIDL___MIDL_itf_ads_0163_0001
+type
+ __MIDL___MIDL_itf_ads_0163_0001 = TOleEnum;
+const
+ ADS_OPTION_SERVERNAME = $00000000;
+ ADS_OPTION_REFERRALS = $00000001;
+ ADS_OPTION_PAGE_SIZE = $00000002;
+ ADS_OPTION_SECURITY_MASK = $00000003;
+ ADS_OPTION_MUTUAL_AUTH_STATUS = $00000004;
+
+// Constants for enum __MIDL___MIDL_itf_ads_0163_0002
+type
+ __MIDL___MIDL_itf_ads_0163_0002 = TOleEnum;
+const
+ ADS_SECURITY_INFO_OWNER = $00000001;
+ ADS_SECURITY_INFO_GROUP = $00000002;
+ ADS_SECURITY_INFO_DACL = $00000004;
+ ADS_SECURITY_INFO_SACL = $00000008;
+
+// Constants for enum __MIDL___MIDL_itf_ads_0164_0001
+type
+ __MIDL___MIDL_itf_ads_0164_0001 = TOleEnum;
+const
+ ADS_SETTYPE_FULL = $00000001;
+ ADS_SETTYPE_PROVIDER = $00000002;
+ ADS_SETTYPE_SERVER = $00000003;
+ ADS_SETTYPE_DN = $00000004;
+
+// Constants for enum __MIDL___MIDL_itf_ads_0164_0002
+type
+ __MIDL___MIDL_itf_ads_0164_0002 = TOleEnum;
+const
+ ADS_FORMAT_WINDOWS = $00000001;
+ ADS_FORMAT_WINDOWS_NO_SERVER = $00000002;
+ ADS_FORMAT_WINDOWS_DN = $00000003;
+ ADS_FORMAT_WINDOWS_PARENT = $00000004;
+ ADS_FORMAT_X500 = $00000005;
+ ADS_FORMAT_X500_NO_SERVER = $00000006;
+ ADS_FORMAT_X500_DN = $00000007;
+ ADS_FORMAT_X500_PARENT = $00000008;
+ ADS_FORMAT_SERVER = $00000009;
+ ADS_FORMAT_PROVIDER = $0000000A;
+ ADS_FORMAT_LEAF = $0000000B;
+
+// Constants for enum __MIDL___MIDL_itf_ads_0164_0003
+type
+ __MIDL___MIDL_itf_ads_0164_0003 = TOleEnum;
+const
+ ADS_DISPLAY_FULL = $00000001;
+ ADS_DISPLAY_VALUE_ONLY = $00000002;
+
+// Constants for enum __MIDL___MIDL_itf_ads_0164_0004
+type
+ __MIDL___MIDL_itf_ads_0164_0004 = TOleEnum;
+const
+ ADS_ESCAPEDMODE_DEFAULT = $00000001;
+ ADS_ESCAPEDMODE_ON = $00000002;
+ ADS_ESCAPEDMODE_OFF = $00000003;
+ ADS_ESCAPEDMODE_OFF_EX = $00000004;
+
+type
+
+// *********************************************************************//
+// Forward declaration of types defined in TypeLibrary
+// *********************************************************************//
+ IADs = interface;
+ {$ifdef SUPPORTS_DISPINTERFACE}
+ IADsDisp = dispinterface;
+ {$endif}
+ IADsContainer = interface;
+ {$ifdef SUPPORTS_DISPINTERFACE}
+ IADsContainerDisp = dispinterface;
+ {$endif}
+ IADsCollection = interface;
+ {$ifdef SUPPORTS_DISPINTERFACE}
+ IADsCollectionDisp = dispinterface;
+ {$endif}
+ IADsMembers = interface;
+ {$ifdef SUPPORTS_DISPINTERFACE}
+ IADsMembersDisp = dispinterface;
+ {$endif}
+ IADsPropertyList = interface;
+ {$ifdef SUPPORTS_DISPINTERFACE}
+ IADsPropertyListDisp = dispinterface;
+ {$endif}
+ IADsPropertyEntry = interface;
+ {$ifdef SUPPORTS_DISPINTERFACE}
+ IADsPropertyEntryDisp = dispinterface;
+ {$endif}
+ IADsPropertyValue = interface;
+ {$ifdef SUPPORTS_DISPINTERFACE}
+ IADsPropertyValueDisp = dispinterface;
+ {$endif}
+ IADsPropertyValue2 = interface;
+ {$ifdef SUPPORTS_DISPINTERFACE}
+ IADsPropertyValue2Disp = dispinterface;
+ {$endif}
+ IPrivateDispatch = interface;
+ ITypeInfo = interface;
+ ITypeComp = interface;
+ ITypeLib = interface;
+ IPrivateUnknown = interface;
+ IADsExtension = interface;
+ IADsDeleteOps = interface;
+ {$ifdef SUPPORTS_DISPINTERFACE}
+ IADsDeleteOpsDisp = dispinterface;
+ {$endif}
+ IADsNamespaces = interface;
+ {$ifdef SUPPORTS_DISPINTERFACE}
+ IADsNamespacesDisp = dispinterface;
+ {$endif}
+ IADsClass = interface;
+ {$ifdef SUPPORTS_DISPINTERFACE}
+ IADsClassDisp = dispinterface;
+ {$endif}
+ IADsProperty = interface;
+ {$ifdef SUPPORTS_DISPINTERFACE}
+ IADsPropertyDisp = dispinterface;
+ {$endif}
+ IADsSyntax = interface;
+ {$ifdef SUPPORTS_DISPINTERFACE}
+ IADsSyntaxDisp = dispinterface;
+ {$endif}
+ IADsLocality = interface;
+ {$ifdef SUPPORTS_DISPINTERFACE}
+ IADsLocalityDisp = dispinterface;
+ {$endif}
+ IADsO = interface;
+ {$ifdef SUPPORTS_DISPINTERFACE}
+ IADsODisp = dispinterface;
+ {$endif}
+ IADsOU = interface;
+ {$ifdef SUPPORTS_DISPINTERFACE}
+ IADsOUDisp = dispinterface;
+ {$endif}
+ IADsDomain = interface;
+ {$ifdef SUPPORTS_DISPINTERFACE}
+ IADsDomainDisp = dispinterface;
+ {$endif}
+ IADsComputer = interface;
+ {$ifdef SUPPORTS_DISPINTERFACE}
+ IADsComputerDisp = dispinterface;
+ {$endif}
+ IADsComputerOperations = interface;
+ {$ifdef SUPPORTS_DISPINTERFACE}
+ IADsComputerOperationsDisp = dispinterface;
+ {$endif}
+ IADsGroup = interface;
+ {$ifdef SUPPORTS_DISPINTERFACE}
+ IADsGroupDisp = dispinterface;
+ {$endif}
+ IADsUser = interface;
+ {$ifdef SUPPORTS_DISPINTERFACE}
+ IADsUserDisp = dispinterface;
+ {$endif}
+ IADsPrintQueue = interface;
+ {$ifdef SUPPORTS_DISPINTERFACE}
+ IADsPrintQueueDisp = dispinterface;
+ {$endif}
+ IADsPrintQueueOperations = interface;
+ {$ifdef SUPPORTS_DISPINTERFACE}
+ IADsPrintQueueOperationsDisp = dispinterface;
+ {$endif}
+ IADsPrintJob = interface;
+ {$ifdef SUPPORTS_DISPINTERFACE}
+ IADsPrintJobDisp = dispinterface;
+ {$endif}
+ IADsPrintJobOperations = interface;
+ {$ifdef SUPPORTS_DISPINTERFACE}
+ IADsPrintJobOperationsDisp = dispinterface;
+ {$endif}
+ IADsService = interface;
+ {$ifdef SUPPORTS_DISPINTERFACE}
+ IADsServiceDisp = dispinterface;
+ {$endif}
+ IADsServiceOperations = interface;
+ {$ifdef SUPPORTS_DISPINTERFACE}
+ IADsServiceOperationsDisp = dispinterface;
+ {$endif}
+ IADsFileService = interface;
+ {$ifdef SUPPORTS_DISPINTERFACE}
+ IADsFileServiceDisp = dispinterface;
+ {$endif}
+ IADsFileServiceOperations = interface;
+ {$ifdef SUPPORTS_DISPINTERFACE}
+ IADsFileServiceOperationsDisp = dispinterface;
+ {$endif}
+ IADsFileShare = interface;
+ {$ifdef SUPPORTS_DISPINTERFACE}
+ IADsFileShareDisp = dispinterface;
+ {$endif}
+ IADsSession = interface;
+ {$ifdef SUPPORTS_DISPINTERFACE}
+ IADsSessionDisp = dispinterface;
+ {$endif}
+ IADsResource = interface;
+ {$ifdef SUPPORTS_DISPINTERFACE}
+ IADsResourceDisp = dispinterface;
+ {$endif}
+ IADsOpenDSObject = interface;
+ {$ifdef SUPPORTS_DISPINTERFACE}
+ IADsOpenDSObjectDisp = dispinterface;
+ {$endif}
+ IDirectoryObject = interface;
+ IDirectorySearch = interface;
+ IDirectorySchemaMgmt = interface;
+ IADsAggregatee = interface;
+ IADsAggregator = interface;
+ IADsAccessControlEntry = interface;
+ {$ifdef SUPPORTS_DISPINTERFACE}
+ IADsAccessControlEntryDisp = dispinterface;
+ {$endif}
+ IADsAccessControlList = interface;
+ {$ifdef SUPPORTS_DISPINTERFACE}
+ IADsAccessControlListDisp = dispinterface;
+ {$endif}
+ IADsSecurityDescriptor = interface;
+ {$ifdef SUPPORTS_DISPINTERFACE}
+ IADsSecurityDescriptorDisp = dispinterface;
+ {$endif}
+ IADsLargeInteger = interface;
+ {$ifdef SUPPORTS_DISPINTERFACE}
+ IADsLargeIntegerDisp = dispinterface;
+ {$endif}
+ IADsNameTranslate = interface;
+ {$ifdef SUPPORTS_DISPINTERFACE}
+ IADsNameTranslateDisp = dispinterface;
+ {$endif}
+ IADsCaseIgnoreList = interface;
+ {$ifdef SUPPORTS_DISPINTERFACE}
+ IADsCaseIgnoreListDisp = dispinterface;
+ {$endif}
+ IADsFaxNumber = interface;
+ {$ifdef SUPPORTS_DISPINTERFACE}
+ IADsFaxNumberDisp = dispinterface;
+ {$endif}
+ IADsNetAddress = interface;
+ {$ifdef SUPPORTS_DISPINTERFACE}
+ IADsNetAddressDisp = dispinterface;
+ {$endif}
+ IADsOctetList = interface;
+ {$ifdef SUPPORTS_DISPINTERFACE}
+ IADsOctetListDisp = dispinterface;
+ {$endif}
+ IADsEmail = interface;
+ {$ifdef SUPPORTS_DISPINTERFACE}
+ IADsEmailDisp = dispinterface;
+ {$endif}
+ IADsPath = interface;
+ {$ifdef SUPPORTS_DISPINTERFACE}
+ IADsPathDisp = dispinterface;
+ {$endif}
+ IADsReplicaPointer = interface;
+ {$ifdef SUPPORTS_DISPINTERFACE}
+ IADsReplicaPointerDisp = dispinterface;
+ {$endif}
+ IADsAcl = interface;
+ {$ifdef SUPPORTS_DISPINTERFACE}
+ IADsAclDisp = dispinterface;
+ {$endif}
+ IADsTimestamp = interface;
+ {$ifdef SUPPORTS_DISPINTERFACE}
+ IADsTimestampDisp = dispinterface;
+ {$endif}
+ IADsPostalAddress = interface;
+ {$ifdef SUPPORTS_DISPINTERFACE}
+ IADsPostalAddressDisp = dispinterface;
+ {$endif}
+ IADsBackLink = interface;
+ {$ifdef SUPPORTS_DISPINTERFACE}
+ IADsBackLinkDisp = dispinterface;
+ {$endif}
+ IADsTypedName = interface;
+ {$ifdef SUPPORTS_DISPINTERFACE}
+ IADsTypedNameDisp = dispinterface;
+ {$endif}
+ IADsHold = interface;
+ {$ifdef SUPPORTS_DISPINTERFACE}
+ IADsHoldDisp = dispinterface;
+ {$endif}
+ IADsObjectOptions = interface;
+ {$ifdef SUPPORTS_DISPINTERFACE}
+ IADsObjectOptionsDisp = dispinterface;
+ {$endif}
+ IADsPathname = interface;
+ {$ifdef SUPPORTS_DISPINTERFACE}
+ IADsPathnameDisp = dispinterface;
+ {$endif}
+ IADsADSystemInfo = interface;
+ {$ifdef SUPPORTS_DISPINTERFACE}
+ IADsADSystemInfoDisp = dispinterface;
+ {$endif}
+ IADsWinNTSystemInfo = interface;
+ {$ifdef SUPPORTS_DISPINTERFACE}
+ IADsWinNTSystemInfoDisp = dispinterface;
+ {$endif}
+ IADsDNWithBinary = interface;
+ {$ifdef SUPPORTS_DISPINTERFACE}
+ IADsDNWithBinaryDisp = dispinterface;
+ {$endif}
+ IADsDNWithString = interface;
+ {$ifdef SUPPORTS_DISPINTERFACE}
+ IADsDNWithStringDisp = dispinterface;
+ {$endif}
+
+// *********************************************************************//
+// Declaration of CoClasses defined in Type Library
+// (NOTE: Here we map each CoClass to its Default Interface)
+// *********************************************************************//
+ PropertyEntry = IADsPropertyEntry;
+ PropertyValue = IADsPropertyValue;
+ AccessControlEntry = IADsAccessControlEntry;
+ AccessControlList = IADsAccessControlList;
+ SecurityDescriptor = IADsSecurityDescriptor;
+ LargeInteger = IADsLargeInteger;
+ NameTranslate = IADsNameTranslate;
+ CaseIgnoreList = IADsCaseIgnoreList;
+ FaxNumber = IADsFaxNumber;
+ NetAddress = IADsNetAddress;
+ OctetList = IADsOctetList;
+ Email = IADsEmail;
+ Path = IADsPath;
+ ReplicaPointer = IADsReplicaPointer;
+ Acl = IADsAcl;
+ Timestamp = IADsTimestamp;
+ PostalAddress = IADsPostalAddress;
+ BackLink = IADsBackLink;
+ TypedName = IADsTypedName;
+ Hold = IADsHold;
+ Pathname = IADsPathname;
+ ADSystemInfo = IADsADSystemInfo;
+ WinNTSystemInfo = IADsWinNTSystemInfo;
+ DNWithBinary = IADsDNWithBinary;
+ DNWithString = IADsDNWithString;
+
+// *********************************************************************//
+// Declaration of structures, unions and aliases.
+// *********************************************************************//
+ PUserType1 = ^_ADS_CASEIGNORE_LIST; {*}
+ PUserType2 = ^_ADS_OCTET_LIST; {*}
+ PPWideChar1 = ^PWideChar; {*}
+ PUserType8 = ^tagTYPEDESC; {*}
+ PUserType9 = ^tagARRAYDESC; {*}
+ PUserType3 = ^TGUID; {*}
+ PWord1 = ^Word; {*}
+ PPWord1 = ^PWord1; {*}
+ PUserType4 = ^TGUID; {*}
+ PUserType5 = ^tagTYPEATTR; {*}
+ PUserType6 = ^tagFUNCDESC; {*}
+ PUserType7 = ^tagVARDESC; {*}
+ PUserType10 = ^tagTLIBATTR; {*}
+ PUserType11 = ^_ads_object_info; {*}
+ PUserType12 = ^_ads_attr_info; {*}
+ PUserType13 = ^ads_searchpref_info; {*}
+ PUserType14 = ^ads_search_column; {*}
+ PUserType15 = ^_ads_attr_def; {*}
+ PPUserType1 = ^PUserType15; {*}
+ PUINT1 = ^LongWord; {*}
+ PUserType16 = ^_ads_class_def; {*}
+ PPUserType2 = ^PUserType16; {*}
+
+ ADSTYPEENUM = __MIDL___MIDL_itf_ads_0000_0001;
+
+ __MIDL___MIDL_itf_ads_0000_0002 = packed record
+ dwLength: LongWord;
+ lpValue: ^Byte;
+ end;
+
+ ADS_OCTET_STRING = __MIDL___MIDL_itf_ads_0000_0002;
+
+ __MIDL___MIDL_itf_ads_0000_0003 = packed record
+ dwLength: LongWord;
+ lpValue: ^Byte;
+ end;
+
+ ADS_NT_SECURITY_DESCRIPTOR = __MIDL___MIDL_itf_ads_0000_0003;
+
+ _SYSTEMTIME = packed record
+ wYear: Word;
+ wMonth: Word;
+ wDayOfWeek: Word;
+ wDay: Word;
+ wHour: Word;
+ wMinute: Word;
+ wSecond: Word;
+ wMilliseconds: Word;
+ end;
+
+ _LARGE_INTEGER = packed record
+ QuadPart: Int64;
+ end;
+
+ __MIDL___MIDL_itf_ads_0000_0004 = packed record
+ dwLength: LongWord;
+ lpValue: ^Byte;
+ end;
+
+ ADS_PROV_SPECIFIC = __MIDL___MIDL_itf_ads_0000_0004;
+
+ __MIDL___MIDL_itf_ads_0000_0005 = packed record
+ Type_: LongWord;
+ VolumeName: PWideChar;
+ Path: PWideChar;
+ end;
+
+ ADS_PATH = __MIDL___MIDL_itf_ads_0000_0005;
+
+ __MIDL___MIDL_itf_ads_0000_0006 = packed record
+ PostalAddress: array[0..5] of PWideChar;
+ end;
+
+ ADS_POSTALADDRESS = __MIDL___MIDL_itf_ads_0000_0006;
+
+ __MIDL___MIDL_itf_ads_0000_0007 = packed record
+ WholeSeconds: LongWord;
+ EventID: LongWord;
+ end;
+
+ ADS_TIMESTAMP = __MIDL___MIDL_itf_ads_0000_0007;
+
+ __MIDL___MIDL_itf_ads_0000_0008 = packed record
+ RemoteID: LongWord;
+ ObjectName: PWideChar;
+ end;
+
+ ADS_BACKLINK = __MIDL___MIDL_itf_ads_0000_0008;
+
+ __MIDL___MIDL_itf_ads_0000_0009 = packed record
+ ObjectName: PWideChar;
+ Level: LongWord;
+ Interval: LongWord;
+ end;
+
+ ADS_TYPEDNAME = __MIDL___MIDL_itf_ads_0000_0009;
+
+ __MIDL___MIDL_itf_ads_0000_0010 = packed record
+ ObjectName: PWideChar;
+ Amount: LongWord;
+ end;
+
+ ADS_HOLD = __MIDL___MIDL_itf_ads_0000_0010;
+
+ __MIDL___MIDL_itf_ads_0000_0011 = packed record
+ AddressType: LongWord;
+ AddressLength: LongWord;
+ Address: ^Byte;
+ end;
+
+ ADS_NETADDRESS = __MIDL___MIDL_itf_ads_0000_0011;
+
+ __MIDL___MIDL_itf_ads_0000_0012 = packed record
+ ServerName: PWideChar;
+ ReplicaType: LongWord;
+ ReplicaNumber: LongWord;
+ Count: LongWord;
+ ReplicaAddressHints: ^__MIDL___MIDL_itf_ads_0000_0011;
+ end;
+
+ ADS_REPLICAPOINTER = __MIDL___MIDL_itf_ads_0000_0012;
+
+ __MIDL___MIDL_itf_ads_0000_0013 = packed record
+ TelephoneNumber: PWideChar;
+ NumberOfBits: LongWord;
+ Parameters: ^Byte;
+ end;
+
+ ADS_FAXNUMBER = __MIDL___MIDL_itf_ads_0000_0013;
+
+ __MIDL___MIDL_itf_ads_0000_0014 = packed record
+ Address: PWideChar;
+ Type_: LongWord;
+ end;
+
+ ADS_EMAIL = __MIDL___MIDL_itf_ads_0000_0014;
+
+ __MIDL___MIDL_itf_ads_0000_0015 = packed record
+ dwLength: LongWord;
+ lpBinaryValue: ^Byte;
+ pszDNString: PWideChar;
+ end;
+
+ ADS_DN_WITH_BINARY = __MIDL___MIDL_itf_ads_0000_0015;
+
+ __MIDL___MIDL_itf_ads_0000_0016 = packed record
+ pszStringValue: PWideChar;
+ pszDNString: PWideChar;
+ end;
+
+ ADS_DN_WITH_STRING = __MIDL___MIDL_itf_ads_0000_0016;
+
+ _ADS_CASEIGNORE_LIST = packed record
+ Next: PUserType1;
+ String_: PWideChar;
+ end;
+
+ _ADS_OCTET_LIST = packed record
+ Next: PUserType2;
+ Length: LongWord;
+ Data: ^Byte;
+ end;
+
+ __MIDL___MIDL_itf_ads_0000_0017 = record
+ case Integer of
+ 0: (DNString: PWideChar);
+ 1: (CaseExactString: PWideChar);
+ 2: (CaseIgnoreString: PWideChar);
+ 3: (PrintableString: PWideChar);
+ 4: (NumericString: PWideChar);
+ 5: (Boolean: LongWord);
+ 6: (Integer: LongWord);
+ 7: (OctetString: ADS_OCTET_STRING);
+ 8: (UTCTime: _SYSTEMTIME);
+ 9: (LargeInteger: _LARGE_INTEGER);
+ 10: (ClassName: PWideChar);
+ 11: (ProviderSpecific: ADS_PROV_SPECIFIC);
+ 12: (pCaseIgnoreList: ^_ADS_CASEIGNORE_LIST);
+ 13: (pOctetList: ^_ADS_OCTET_LIST);
+ 14: (pPath: ^__MIDL___MIDL_itf_ads_0000_0005);
+ 15: (pPostalAddress: ^__MIDL___MIDL_itf_ads_0000_0006);
+ 16: (Timestamp: ADS_TIMESTAMP);
+ 17: (BackLink: ADS_BACKLINK);
+ 18: (pTypedName: ^__MIDL___MIDL_itf_ads_0000_0009);
+ 19: (Hold: ADS_HOLD);
+ 20: (pNetAddress: ^__MIDL___MIDL_itf_ads_0000_0011);
+ 21: (pReplicaPointer: ^__MIDL___MIDL_itf_ads_0000_0012);
+ 22: (pFaxNumber: ^__MIDL___MIDL_itf_ads_0000_0013);
+ 23: (Email: ADS_EMAIL);
+ 24: (SecurityDescriptor: ADS_NT_SECURITY_DESCRIPTOR);
+ 25: (pDNWithBinary: ^__MIDL___MIDL_itf_ads_0000_0015);
+ 26: (pDNWithString: ^__MIDL___MIDL_itf_ads_0000_0016);
+ end;
+
+ ADS_AUTHENTICATION_ENUM = __MIDL___MIDL_itf_ads_0000_0018;
+
+ _ads_object_info = packed record
+ pszRDN: PWideChar;
+ pszObjectDN: PWideChar;
+ pszParentDN: PWideChar;
+ pszSchemaDN: PWideChar;
+ pszClassName: PWideChar;
+ end;
+
+ ADS_STATUSENUM = __MIDL___MIDL_itf_ads_0000_0019;
+ ADS_DEREFENUM = __MIDL___MIDL_itf_ads_0000_0020;
+ ADS_SCOPEENUM = __MIDL___MIDL_itf_ads_0000_0021;
+ ADS_PREFERENCES_ENUM = __MIDL___MIDL_itf_ads_0000_0022;
+ ADSI_DIALECT_ENUM = __MIDL___MIDL_itf_ads_0000_0023;
+ ADS_CHASE_REFERRALS_ENUM = __MIDL___MIDL_itf_ads_0000_0024;
+ ADS_SEARCHPREF_ENUM = __MIDL___MIDL_itf_ads_0000_0025;
+
+ _adsvalue = packed record
+ dwType: ADSTYPEENUM;
+ __MIDL_0010: __MIDL___MIDL_itf_ads_0000_0017;
+ end;
+
+ ads_search_column = packed record
+ pszAttrName: PWideChar;
+ dwADsType: ADSTYPEENUM;
+ pADsValues: ^_adsvalue;
+ dwNumValues: LongWord;
+ hReserved: Pointer;
+ end;
+
+ _ads_attr_def = packed record
+ pszAttrName: PWideChar;
+ dwADsType: ADSTYPEENUM;
+ dwMinRange: LongWord;
+ dwMaxRange: LongWord;
+ fMultiValued: Integer;
+ end;
+
+ _ads_sortkey = packed record
+ pszAttrType: PWideChar;
+ pszReserved: PWideChar;
+ fReverseorder: Shortint;
+ end;
+
+ ADS_PROPERTY_OPERATION_ENUM = __MIDL___MIDL_itf_ads_0000_0026;
+
+ __MIDL_IOleAutomationTypes_0005 = record
+ case Integer of
+ 0: (lptdesc: PUserType8);
+ 1: (lpadesc: PUserType9);
+ 2: (hreftype: LongWord);
+ end;
+
+ tagTYPEDESC = packed record
+ __MIDL_0008: __MIDL_IOleAutomationTypes_0005;
+ vt: Word;
+ end;
+
+ tagSAFEARRAYBOUND = packed record
+ cElements: LongWord;
+ lLbound: Integer;
+ end;
+
+ ULONG_PTR = LongWord;
+
+ tagIDLDESC = packed record
+ dwReserved: ULONG_PTR;
+ wIDLFlags: Word;
+ end;
+
+ DWORD = LongWord;
+
+ tagPARAMDESCEX = packed record
+ cBytes: LongWord;
+ varDefaultValue: OleVariant;
+ end;
+
+ tagPARAMDESC = packed record
+ pparamdescex: ^tagPARAMDESCEX;
+ wParamFlags: Word;
+ end;
+
+ tagELEMDESC = packed record
+ tdesc: tagTYPEDESC;
+ paramdesc: tagPARAMDESC;
+ end;
+
+ tagFUNCDESC = packed record
+ memid: Integer;
+ lprgscode: ^SCODE;
+ lprgelemdescParam: ^tagELEMDESC;
+ funckind: tagFUNCKIND;
+ invkind: tagINVOKEKIND;
+ callconv: tagCALLCONV;
+ cParams: Smallint;
+ cParamsOpt: Smallint;
+ oVft: Smallint;
+ cScodes: Smallint;
+ elemdescFunc: tagELEMDESC;
+ wFuncFlags: Word;
+ end;
+
+ __MIDL_IOleAutomationTypes_0006 = record
+ case Integer of
+ 0: (oInst: LongWord);
+ 1: (lpvarValue: ^OleVariant);
+ end;
+
+ tagVARDESC = packed record
+ memid: Integer;
+ lpstrSchema: PWideChar;
+ __MIDL_0009: __MIDL_IOleAutomationTypes_0006;
+ elemdescVar: tagELEMDESC;
+ wVarFlags: Word;
+ varkind: tagVARKIND;
+ end;
+
+ tagTLIBATTR = packed record
+ GUID: TGUID;
+ lcid: LongWord;
+ syskind: tagSYSKIND;
+ wMajorVerNum: Word;
+ wMinorVerNum: Word;
+ wLibFlags: Word;
+ end;
+
+ ADS_SYSTEMFLAG_ENUM = __MIDL___MIDL_itf_ads_0120_0001;
+ ADS_GROUP_TYPE_ENUM = __MIDL___MIDL_itf_ads_0126_0001;
+ ADS_RIGHTS_ENUM = __MIDL___MIDL_itf_ads_0148_0001;
+ ADS_ACETYPE_ENUM = __MIDL___MIDL_itf_ads_0148_0002;
+ ADS_ACEFLAG_ENUM = __MIDL___MIDL_itf_ads_0148_0003;
+ ADS_FLAGTYPE_ENUM = __MIDL___MIDL_itf_ads_0148_0004;
+ ADS_SD_CONTROL_ENUM = __MIDL___MIDL_itf_ads_0148_0005;
+ ADS_SD_REVISION_ENUM = __MIDL___MIDL_itf_ads_0148_0006;
+ ADS_NAME_TYPE_ENUM = __MIDL___MIDL_itf_ads_0149_0001;
+ ADS_NAME_INITTYPE_ENUM = __MIDL___MIDL_itf_ads_0149_0002;
+ ADS_OPTION_ENUM = __MIDL___MIDL_itf_ads_0163_0001;
+ ADS_SECURITY_INFO_ENUM = __MIDL___MIDL_itf_ads_0163_0002;
+ ADS_SETTYPE_ENUM = __MIDL___MIDL_itf_ads_0164_0001;
+ ADS_FORMAT_ENUM = __MIDL___MIDL_itf_ads_0164_0002;
+ ADS_DISPLAY_ENUM = __MIDL___MIDL_itf_ads_0164_0003;
+ ADS_ESCAPE_MODE_ENUM = __MIDL___MIDL_itf_ads_0164_0004;
+
+ _ads_attr_info = packed record
+ pszAttrName: PWideChar;
+ dwControlCode: LongWord;
+ dwADsType: ADSTYPEENUM;
+ pADsValues: ^_adsvalue;
+ dwNumValues: LongWord;
+ end;
+
+ ads_searchpref_info = packed record
+ dwSearchPref: ADS_SEARCHPREF_ENUM;
+ vValue: _adsvalue;
+ dwStatus: ADS_STATUSENUM;
+ end;
+
+ _ads_class_def = packed record
+ pszClassName: PWideChar;
+ dwMandatoryAttrs: LongWord;
+ ppszMandatoryAttrs: ^PWideChar;
+ optionalAttrs: LongWord;
+ ppszOptionalAttrs: ^PPWideChar1;
+ dwNamingAttrs: LongWord;
+ ppszNamingAttrs: ^PPWideChar1;
+ dwSuperClasses: LongWord;
+ ppszSuperClasses: ^PPWideChar1;
+ fIsContainer: Integer;
+ end;
+
+ tagTYPEATTR = packed record
+ GUID: TGUID;
+ lcid: LongWord;
+ dwReserved: LongWord;
+ memidConstructor: Integer;
+ memidDestructor: Integer;
+ lpstrSchema: PWideChar;
+ cbSizeInstance: LongWord;
+ typekind: tagTYPEKIND;
+ cFuncs: Word;
+ cVars: Word;
+ cImplTypes: Word;
+ cbSizeVft: Word;
+ cbAlignment: Word;
+ wTypeFlags: Word;
+ wMajorVerNum: Word;
+ wMinorVerNum: Word;
+ tdescAlias: tagTYPEDESC;
+ idldescType: tagIDLDESC;
+ end;
+
+ tagARRAYDESC = packed record
+ tdescElem: tagTYPEDESC;
+ cDims: Word;
+ rgbounds: ^tagSAFEARRAYBOUND;
+ end;
+
+// *********************************************************************//
+// Interface: IADs
+// Flags: (4416) Dual OleAutomation Dispatchable
+// GUID: {FD8256D0-FD15-11CE-ABC4-02608C9E7553}
+// *********************************************************************//
+ IADs = interface(IDispatch)
+ ['{FD8256D0-FD15-11CE-ABC4-02608C9E7553}']
+ function Get_Name: WideString; safecall;
+ function Get_Class_: WideString; safecall;
+ function Get_GUID: WideString; safecall;
+ function Get_ADsPath: WideString; safecall;
+ function Get_Parent: WideString; safecall;
+ function Get_Schema: WideString; safecall;
+ procedure GetInfo; safecall;
+ procedure SetInfo; safecall;
+ function Get(const bstrName: WideString): OleVariant; safecall;
+ procedure Put(const bstrName: WideString; vProp: OleVariant); safecall;
+ function GetEx(const bstrName: WideString): OleVariant; safecall;
+ procedure PutEx(lnControlCode: Integer; const bstrName: WideString; vProp: OleVariant); safecall;
+ procedure GetInfoEx(vProperties: OleVariant; lnReserved: Integer); safecall;
+ property Name: WideString read Get_Name;
+ property Class_: WideString read Get_Class_;
+ property GUID: WideString read Get_GUID;
+ property ADsPath: WideString read Get_ADsPath;
+ property Parent: WideString read Get_Parent;
+ property Schema: WideString read Get_Schema;
+ end;
+
+// *********************************************************************//
+// DispIntf: IADsDisp
+// Flags: (4416) Dual OleAutomation Dispatchable
+// GUID: {FD8256D0-FD15-11CE-ABC4-02608C9E7553}
+// *********************************************************************//
+ {$ifdef SUPPORTS_DISPINTERFACE}
+ IADsDisp = dispinterface
+ ['{FD8256D0-FD15-11CE-ABC4-02608C9E7553}']
+ property Name: WideString readonly dispid 2;
+ property Class_: WideString readonly dispid 3;
+ property GUID: WideString readonly dispid 4;
+ property ADsPath: WideString readonly dispid 5;
+ property Parent: WideString readonly dispid 6;
+ property Schema: WideString readonly dispid 7;
+ procedure GetInfo; dispid 8;
+ procedure SetInfo; dispid 9;
+ function Get(const bstrName: WideString): OleVariant; dispid 10;
+ procedure Put(const bstrName: WideString; vProp: OleVariant); dispid 11;
+ function GetEx(const bstrName: WideString): OleVariant; dispid 12;
+ procedure PutEx(lnControlCode: Integer; const bstrName: WideString; vProp: OleVariant); dispid 13;
+ procedure GetInfoEx(vProperties: OleVariant; lnReserved: Integer); dispid 14;
+ end;
+ {$endif}
+// *********************************************************************//
+// Interface: IADsContainer
+// Flags: (4416) Dual OleAutomation Dispatchable
+// GUID: {001677D0-FD16-11CE-ABC4-02608C9E7553}
+// *********************************************************************//
+ IADsContainer = interface(IDispatch)
+ ['{001677D0-FD16-11CE-ABC4-02608C9E7553}']
+ function Get_Count: Integer; safecall;
+ function Get__NewEnum: IUnknown; safecall;
+ function Get_Filter: OleVariant; safecall;
+ procedure Set_Filter(pVar: OleVariant); safecall;
+ function Get_Hints: OleVariant; safecall;
+ procedure Set_Hints(pvFilter: OleVariant); safecall;
+ function GetObject(const ClassName: WideString; const RelativeName: WideString): IDispatch; safecall;
+ function Create(const ClassName: WideString; const RelativeName: WideString): IDispatch; safecall;
+ procedure Delete(const bstrClassName: WideString; const bstrRelativeName: WideString); safecall;
+ function CopyHere(const SourceName: WideString; const NewName: WideString): IDispatch; safecall;
+ function MoveHere(const SourceName: WideString; const NewName: WideString): IDispatch; safecall;
+ property Count: Integer read Get_Count;
+ property _NewEnum: IUnknown read Get__NewEnum;
+ property Filter: OleVariant read Get_Filter write Set_Filter;
+ property Hints: OleVariant read Get_Hints write Set_Hints;
+ end;
+
+// *********************************************************************//
+// DispIntf: IADsContainerDisp
+// Flags: (4416) Dual OleAutomation Dispatchable
+// GUID: {001677D0-FD16-11CE-ABC4-02608C9E7553}
+// *********************************************************************//
+ {$ifdef SUPPORTS_DISPINTERFACE}
+ IADsContainerDisp = dispinterface
+ ['{001677D0-FD16-11CE-ABC4-02608C9E7553}']
+ property Count: Integer readonly dispid 2;
+ property _NewEnum: IUnknown readonly dispid -4;
+ property Filter: OleVariant dispid 3;
+ property Hints: OleVariant dispid 4;
+ function GetObject(const ClassName: WideString; const RelativeName: WideString): IDispatch; dispid 5;
+ function Create(const ClassName: WideString; const RelativeName: WideString): IDispatch; dispid 6;
+ procedure Delete(const bstrClassName: WideString; const bstrRelativeName: WideString); dispid 7;
+ function CopyHere(const SourceName: WideString; const NewName: WideString): IDispatch; dispid 8;
+ function MoveHere(const SourceName: WideString; const NewName: WideString): IDispatch; dispid 9;
+ end;
+ {$endif}
+// *********************************************************************//
+// Interface: IADsCollection
+// Flags: (4416) Dual OleAutomation Dispatchable
+// GUID: {72B945E0-253B-11CF-A988-00AA006BC149}
+// *********************************************************************//
+ IADsCollection = interface(IDispatch)
+ ['{72B945E0-253B-11CF-A988-00AA006BC149}']
+ function Get__NewEnum: IUnknown; safecall;
+ procedure Add(const bstrName: WideString; vItem: OleVariant); safecall;
+ procedure Remove(const bstrItemToBeRemoved: WideString); safecall;
+ function GetObject(const bstrName: WideString): OleVariant; safecall;
+ property _NewEnum: IUnknown read Get__NewEnum;
+ end;
+
+// *********************************************************************//
+// DispIntf: IADsCollectionDisp
+// Flags: (4416) Dual OleAutomation Dispatchable
+// GUID: {72B945E0-253B-11CF-A988-00AA006BC149}
+// *********************************************************************//
+ {$ifdef SUPPORTS_DISPINTERFACE}
+ IADsCollectionDisp = dispinterface
+ ['{72B945E0-253B-11CF-A988-00AA006BC149}']
+ property _NewEnum: IUnknown readonly dispid -4;
+ procedure Add(const bstrName: WideString; vItem: OleVariant); dispid 4;
+ procedure Remove(const bstrItemToBeRemoved: WideString); dispid 5;
+ function GetObject(const bstrName: WideString): OleVariant; dispid 6;
+ end;
+ {$endif}
+// *********************************************************************//
+// Interface: IADsMembers
+// Flags: (4416) Dual OleAutomation Dispatchable
+// GUID: {451A0030-72EC-11CF-B03B-00AA006E0975}
+// *********************************************************************//
+ IADsMembers = interface(IDispatch)
+ ['{451A0030-72EC-11CF-B03B-00AA006E0975}']
+ function Get_Count: Integer; safecall;
+ function Get__NewEnum: IUnknown; safecall;
+ function Get_Filter: OleVariant; safecall;
+ procedure Set_Filter(pvFilter: OleVariant); safecall;
+ property Count: Integer read Get_Count;
+ property _NewEnum: IUnknown read Get__NewEnum;
+ property Filter: OleVariant read Get_Filter write Set_Filter;
+ end;
+
+// *********************************************************************//
+// DispIntf: IADsMembersDisp
+// Flags: (4416) Dual OleAutomation Dispatchable
+// GUID: {451A0030-72EC-11CF-B03B-00AA006E0975}
+// *********************************************************************//
+ {$ifdef SUPPORTS_DISPINTERFACE}
+ IADsMembersDisp = dispinterface
+ ['{451A0030-72EC-11CF-B03B-00AA006E0975}']
+ property Count: Integer readonly dispid 2;
+ property _NewEnum: IUnknown readonly dispid -4;
+ property Filter: OleVariant dispid 3;
+ end;
+ {$endif}
+// *********************************************************************//
+// Interface: IADsPropertyList
+// Flags: (4416) Dual OleAutomation Dispatchable
+// GUID: {C6F602B6-8F69-11D0-8528-00C04FD8D503}
+// *********************************************************************//
+ IADsPropertyList = interface(IDispatch)
+ ['{C6F602B6-8F69-11D0-8528-00C04FD8D503}']
+ function Get_PropertyCount: Integer; safecall;
+ function Next: OleVariant; safecall;
+ procedure Skip(cElements: Integer); safecall;
+ procedure Reset; safecall;
+ function Item(varIndex: OleVariant): OleVariant; safecall;
+ function GetPropertyItem(const bstrName: WideString; lnADsType: Integer): OleVariant; safecall;
+ procedure PutPropertyItem(varData: OleVariant); safecall;
+ procedure ResetPropertyItem(varEntry: OleVariant); safecall;
+ procedure PurgePropertyList; safecall;
+ property PropertyCount: Integer read Get_PropertyCount;
+ end;
+
+// *********************************************************************//
+// DispIntf: IADsPropertyListDisp
+// Flags: (4416) Dual OleAutomation Dispatchable
+// GUID: {C6F602B6-8F69-11D0-8528-00C04FD8D503}
+// *********************************************************************//
+ {$ifdef SUPPORTS_DISPINTERFACE}
+ IADsPropertyListDisp = dispinterface
+ ['{C6F602B6-8F69-11D0-8528-00C04FD8D503}']
+ property PropertyCount: Integer readonly dispid 2;
+ function Next: OleVariant; dispid 3;
+ procedure Skip(cElements: Integer); dispid 4;
+ procedure Reset; dispid 5;
+ function Item(varIndex: OleVariant): OleVariant; dispid 0;
+ function GetPropertyItem(const bstrName: WideString; lnADsType: Integer): OleVariant; dispid 6;
+ procedure PutPropertyItem(varData: OleVariant); dispid 7;
+ procedure ResetPropertyItem(varEntry: OleVariant); dispid 8;
+ procedure PurgePropertyList; dispid 9;
+ end;
+ {$endif}
+// *********************************************************************//
+// Interface: IADsPropertyEntry
+// Flags: (4416) Dual OleAutomation Dispatchable
+// GUID: {05792C8E-941F-11D0-8529-00C04FD8D503}
+// *********************************************************************//
+ IADsPropertyEntry = interface(IDispatch)
+ ['{05792C8E-941F-11D0-8529-00C04FD8D503}']
+ procedure Clear; safecall;
+ function Get_Name: WideString; safecall;
+ procedure Set_Name(const retval: WideString); safecall;
+ function Get_ADsType: Integer; safecall;
+ procedure Set_ADsType(retval: Integer); safecall;
+ function Get_ControlCode: Integer; safecall;
+ procedure Set_ControlCode(retval: Integer); safecall;
+ function Get_Values: OleVariant; safecall;
+ procedure Set_Values(retval: OleVariant); safecall;
+ property Name: WideString read Get_Name write Set_Name;
+ property ADsType: Integer read Get_ADsType write Set_ADsType;
+ property ControlCode: Integer read Get_ControlCode write Set_ControlCode;
+ property Values: OleVariant read Get_Values write Set_Values;
+ end;
+
+// *********************************************************************//
+// DispIntf: IADsPropertyEntryDisp
+// Flags: (4416) Dual OleAutomation Dispatchable
+// GUID: {05792C8E-941F-11D0-8529-00C04FD8D503}
+// *********************************************************************//
+ {$ifdef SUPPORTS_DISPINTERFACE}
+ IADsPropertyEntryDisp = dispinterface
+ ['{05792C8E-941F-11D0-8529-00C04FD8D503}']
+ procedure Clear; dispid 1;
+ property Name: WideString dispid 2;
+ property ADsType: Integer dispid 3;
+ property ControlCode: Integer dispid 4;
+ property Values: OleVariant dispid 5;
+ end;
+ {$endif}
+// *********************************************************************//
+// Interface: IADsPropertyValue
+// Flags: (4416) Dual OleAutomation Dispatchable
+// GUID: {79FA9AD0-A97C-11D0-8534-00C04FD8D503}
+// *********************************************************************//
+ IADsPropertyValue = interface(IDispatch)
+ ['{79FA9AD0-A97C-11D0-8534-00C04FD8D503}']
+ procedure Clear; safecall;
+ function Get_ADsType: Integer; safecall;
+ procedure Set_ADsType(retval: Integer); safecall;
+ function Get_DNString: WideString; safecall;
+ procedure Set_DNString(const retval: WideString); safecall;
+ function Get_CaseExactString: WideString; safecall;
+ procedure Set_CaseExactString(const retval: WideString); safecall;
+ function Get_CaseIgnoreString: WideString; safecall;
+ procedure Set_CaseIgnoreString(const retval: WideString); safecall;
+ function Get_PrintableString: WideString; safecall;
+ procedure Set_PrintableString(const retval: WideString); safecall;
+ function Get_NumericString: WideString; safecall;
+ procedure Set_NumericString(const retval: WideString); safecall;
+ function Get_Boolean: Integer; safecall;
+ procedure Set_Boolean(retval: Integer); safecall;
+ function Get_Integer: Integer; safecall;
+ procedure Set_Integer(retval: Integer); safecall;
+ function Get_OctetString: OleVariant; safecall;
+ procedure Set_OctetString(retval: OleVariant); safecall;
+ function Get_SecurityDescriptor: IDispatch; safecall;
+ procedure Set_SecurityDescriptor(const retval: IDispatch); safecall;
+ function Get_LargeInteger: IDispatch; safecall;
+ procedure Set_LargeInteger(const retval: IDispatch); safecall;
+ function Get_UTCTime: TDateTime; safecall;
+ procedure Set_UTCTime(retval: TDateTime); safecall;
+ property ADsType: Integer read Get_ADsType write Set_ADsType;
+ property DNString: WideString read Get_DNString write Set_DNString;
+ property CaseExactString: WideString read Get_CaseExactString write Set_CaseExactString;
+ property CaseIgnoreString: WideString read Get_CaseIgnoreString write Set_CaseIgnoreString;
+ property PrintableString: WideString read Get_PrintableString write Set_PrintableString;
+ property NumericString: WideString read Get_NumericString write Set_NumericString;
+ property Boolean: Integer read Get_Boolean write Set_Boolean;
+ property Integer: Integer read Get_Integer write Set_Integer;
+ property OctetString: OleVariant read Get_OctetString write Set_OctetString;
+ property SecurityDescriptor: IDispatch read Get_SecurityDescriptor write Set_SecurityDescriptor;
+ property LargeInteger: IDispatch read Get_LargeInteger write Set_LargeInteger;
+ property UTCTime: TDateTime read Get_UTCTime write Set_UTCTime;
+ end;
+
+// *********************************************************************//
+// DispIntf: IADsPropertyValueDisp
+// Flags: (4416) Dual OleAutomation Dispatchable
+// GUID: {79FA9AD0-A97C-11D0-8534-00C04FD8D503}
+// *********************************************************************//
+ {$ifdef SUPPORTS_DISPINTERFACE}
+ IADsPropertyValueDisp = dispinterface
+ ['{79FA9AD0-A97C-11D0-8534-00C04FD8D503}']
+ procedure Clear; dispid 1;
+ property ADsType: Integer dispid 2;
+ property DNString: WideString dispid 3;
+ property CaseExactString: WideString dispid 4;
+ property CaseIgnoreString: WideString dispid 5;
+ property PrintableString: WideString dispid 6;
+ property NumericString: WideString dispid 7;
+ property Boolean: Integer dispid 8;
+ property Integer: Integer dispid 9;
+ property OctetString: OleVariant dispid 10;
+ property SecurityDescriptor: IDispatch dispid 11;
+ property LargeInteger: IDispatch dispid 12;
+ property UTCTime: TDateTime dispid 13;
+ end;
+ {$endif}
+// *********************************************************************//
+// Interface: IADsPropertyValue2
+// Flags: (4416) Dual OleAutomation Dispatchable
+// GUID: {306E831C-5BC7-11D1-A3B8-00C04FB950DC}
+// *********************************************************************//
+ IADsPropertyValue2 = interface(IDispatch)
+ ['{306E831C-5BC7-11D1-A3B8-00C04FB950DC}']
+ function GetObjectProperty(var lnADsType: Integer): OleVariant; safecall;
+ procedure PutObjectProperty(lnADsType: Integer; vProp: OleVariant); safecall;
+ end;
+
+// *********************************************************************//
+// DispIntf: IADsPropertyValue2Disp
+// Flags: (4416) Dual OleAutomation Dispatchable
+// GUID: {306E831C-5BC7-11D1-A3B8-00C04FB950DC}
+// *********************************************************************//
+ {$ifdef SUPPORTS_DISPINTERFACE}
+ IADsPropertyValue2Disp = dispinterface
+ ['{306E831C-5BC7-11D1-A3B8-00C04FB950DC}']
+ function GetObjectProperty(var lnADsType: Integer): OleVariant; dispid 1;
+ procedure PutObjectProperty(lnADsType: Integer; vProp: OleVariant); dispid 2;
+ end;
+ {$endif}
+
+// *********************************************************************//
+// Interface: IPrivateDispatch
+// Flags: (0)
+// GUID: {86AB4BBE-65F6-11D1-8C13-00C04FD8D503}
+// *********************************************************************//
+ IPrivateDispatch = interface(IUnknown)
+ ['{86AB4BBE-65F6-11D1-8C13-00C04FD8D503}']
+ function ADSIInitializeDispatchManager(dwExtensionId: Integer): HResult; stdcall;
+ function ADSIGetTypeInfoCount(out pctinfo: SYSUINT): HResult; stdcall;
+ function ADSIGetTypeInfo(itinfo: SYSUINT; lcid: LongWord; out ppTInfo: ITypeInfo): HResult; stdcall;
+ function ADSIGetIDsOfNames(var riid: TGUID; rgszNames: PPWord1; cNames: SYSUINT;
+ lcid: LongWord; out rgdispid: Integer): HResult; stdcall;
+ function ADSIInvoke(dispidMember: Integer; var riid: TGUID; lcid: LongWord; wFlags: Word;
+ var pdispparams: TGUID; out pvarResult: OleVariant; out pexcepinfo: TGUID;
+ out puArgErr: SYSUINT): HResult; stdcall;
+ end;
+
+// *********************************************************************//
+// Interface: ITypeInfo
+// Flags: (0)
+// GUID: {00020401-0000-0000-C000-000000000046}
+// *********************************************************************//
+ ITypeInfo = interface(IUnknown)
+ ['{00020401-0000-0000-C000-000000000046}']
+ function RemoteGetTypeAttr(out ppTypeAttr: PUserType5; out pDummy: DWORD): HResult; stdcall;
+ function GetTypeComp(out ppTComp: ITypeComp): HResult; stdcall;
+ function RemoteGetFuncDesc(index: SYSUINT; out ppFuncDesc: PUserType6; out pDummy: DWORD): HResult; stdcall;
+ function RemoteGetVarDesc(index: SYSUINT; out ppVarDesc: PUserType7; out pDummy: DWORD): HResult; stdcall;
+ function RemoteGetNames(memid: Integer; out rgBstrNames: WideString; cMaxNames: SYSUINT;
+ out pcNames: SYSUINT): HResult; stdcall;
+ function GetRefTypeOfImplType(index: SYSUINT; out pRefType: LongWord): HResult; stdcall;
+ function GetImplTypeFlags(index: SYSUINT; out pImplTypeFlags: SYSINT): HResult; stdcall;
+ function LocalGetIDsOfNames: HResult; stdcall;
+ function LocalInvoke: HResult; stdcall;
+ function RemoteGetDocumentation(memid: Integer; refPtrFlags: LongWord;
+ out pBstrName: WideString; out pBstrDocString: WideString;
+ out pdwHelpContext: LongWord; out pBstrHelpFile: WideString): HResult; stdcall;
+ function RemoteGetDllEntry(memid: Integer; invkind: tagINVOKEKIND; refPtrFlags: LongWord;
+ out pBstrDllName: WideString; out pBstrName: WideString;
+ out pwOrdinal: Word): HResult; stdcall;
+ function GetRefTypeInfo(hreftype: LongWord; out ppTInfo: ITypeInfo): HResult; stdcall;
+ function LocalAddressOfMember: HResult; stdcall;
+ function RemoteCreateInstance(var riid: TGUID; out ppvObj: IUnknown): HResult; stdcall;
+ function GetMops(memid: Integer; out pBstrMops: WideString): HResult; stdcall;
+ function RemoteGetContainingTypeLib(out ppTLib: ITypeLib; out pIndex: SYSUINT): HResult; stdcall;
+ function LocalReleaseTypeAttr: HResult; stdcall;
+ function LocalReleaseFuncDesc: HResult; stdcall;
+ function LocalReleaseVarDesc: HResult; stdcall;
+ end;
+
+// *********************************************************************//
+// Interface: ITypeComp
+// Flags: (0)
+// GUID: {00020403-0000-0000-C000-000000000046}
+// *********************************************************************//
+ ITypeComp = interface(IUnknown)
+ ['{00020403-0000-0000-C000-000000000046}']
+ function RemoteBind(szName: PWideChar; lHashVal: LongWord; wFlags: Word;
+ out ppTInfo: ITypeInfo; out pDescKind: tagDESCKIND;
+ out ppFuncDesc: PUserType6; out ppVarDesc: PUserType7;
+ out ppTypeComp: ITypeComp; out pDummy: DWORD): HResult; stdcall;
+ function RemoteBindType(szName: PWideChar; lHashVal: LongWord; out ppTInfo: ITypeInfo): HResult; stdcall;
+ end;
+
+// *********************************************************************//
+// Interface: ITypeLib
+// Flags: (0)
+// GUID: {00020402-0000-0000-C000-000000000046}
+// *********************************************************************//
+ ITypeLib = interface(IUnknown)
+ ['{00020402-0000-0000-C000-000000000046}']
+ function RemoteGetTypeInfoCount(out pctinfo: SYSUINT): HResult; stdcall;
+ function GetTypeInfo(index: SYSUINT; out ppTInfo: ITypeInfo): HResult; stdcall;
+ function GetTypeInfoType(index: SYSUINT; out pTKind: tagTYPEKIND): HResult; stdcall;
+ function GetTypeInfoOfGuid(var GUID: TGUID; out ppTInfo: ITypeInfo): HResult; stdcall;
+ function RemoteGetLibAttr(out ppTLibAttr: PUserType10; out pDummy: DWORD): HResult; stdcall;
+ function GetTypeComp(out ppTComp: ITypeComp): HResult; stdcall;
+ function RemoteGetDocumentation(index: SYSINT; refPtrFlags: LongWord;
+ out pBstrName: WideString; out pBstrDocString: WideString;
+ out pdwHelpContext: LongWord; out pBstrHelpFile: WideString): HResult; stdcall;
+ function RemoteIsName(szNameBuf: PWideChar; lHashVal: LongWord; out pfName: Integer;
+ out pBstrLibName: WideString): HResult; stdcall;
+ function RemoteFindName(szNameBuf: PWideChar; lHashVal: LongWord; out ppTInfo: ITypeInfo;
+ out rgMemId: Integer; var pcFound: Word; out pBstrLibName: WideString): HResult; stdcall;
+ function LocalReleaseTLibAttr: HResult; stdcall;
+ end;
+
+// *********************************************************************//
+// Interface: IPrivateUnknown
+// Flags: (0)
+// GUID: {89126BAB-6EAD-11D1-8C18-00C04FD8D503}
+// *********************************************************************//
+ IPrivateUnknown = interface(IUnknown)
+ ['{89126BAB-6EAD-11D1-8C18-00C04FD8D503}']
+ function ADSIInitializeObject(const lpszUserName: WideString; const lpszPassword: WideString;
+ lnReserved: Integer): HResult; stdcall;
+ function ADSIReleaseObject: HResult; stdcall;
+ end;
+
+// *********************************************************************//
+// Interface: IADsExtension
+// Flags: (0)
+// GUID: {3D35553C-D2B0-11D1-B17B-0000F87593A0}
+// *********************************************************************//
+ IADsExtension = interface(IUnknown)
+ ['{3D35553C-D2B0-11D1-B17B-0000F87593A0}']
+ function Operate(dwCode: LongWord; varData1: OleVariant; varData2: OleVariant;
+ varData3: OleVariant): HResult; stdcall;
+ function PrivateGetIDsOfNames(var riid: TGUID; rgszNames: PPWord1; cNames: SYSUINT;
+ lcid: LongWord; out rgdispid: Integer): HResult; stdcall;
+ function PrivateInvoke(dispidMember: Integer; var riid: TGUID; lcid: LongWord; wFlags: Word;
+ var pdispparams: TGUID; out pvarResult: OleVariant;
+ out pexcepinfo: TGUID; out puArgErr: SYSUINT): HResult; stdcall;
+ end;
+
+// *********************************************************************//
+// Interface: IADsDeleteOps
+// Flags: (4416) Dual OleAutomation Dispatchable
+// GUID: {B2BD0902-8878-11D1-8C21-00C04FD8D503}
+// *********************************************************************//
+ IADsDeleteOps = interface(IDispatch)
+ ['{B2BD0902-8878-11D1-8C21-00C04FD8D503}']
+ procedure DeleteObject(lnFlags: Integer); safecall;
+ end;
+
+// *********************************************************************//
+// DispIntf: IADsDeleteOpsDisp
+// Flags: (4416) Dual OleAutomation Dispatchable
+// GUID: {B2BD0902-8878-11D1-8C21-00C04FD8D503}
+// *********************************************************************//
+ {$ifdef SUPPORTS_DISPINTERFACE}
+ IADsDeleteOpsDisp = dispinterface
+ ['{B2BD0902-8878-11D1-8C21-00C04FD8D503}']
+ procedure DeleteObject(lnFlags: Integer); dispid 2;
+ end;
+ {$endif}
+// *********************************************************************//
+// Interface: IADsNamespaces
+// Flags: (4416) Dual OleAutomation Dispatchable
+// GUID: {28B96BA0-B330-11CF-A9AD-00AA006BC149}
+// *********************************************************************//
+ IADsNamespaces = interface(IADs)
+ ['{28B96BA0-B330-11CF-A9AD-00AA006BC149}']
+ function Get_DefaultContainer: WideString; safecall;
+ procedure Set_DefaultContainer(const retval: WideString); safecall;
+ property DefaultContainer: WideString read Get_DefaultContainer write Set_DefaultContainer;
+ end;
+
+// *********************************************************************//
+// DispIntf: IADsNamespacesDisp
+// Flags: (4416) Dual OleAutomation Dispatchable
+// GUID: {28B96BA0-B330-11CF-A9AD-00AA006BC149}
+// *********************************************************************//
+ {$ifdef SUPPORTS_DISPINTERFACE}
+ IADsNamespacesDisp = dispinterface
+ ['{28B96BA0-B330-11CF-A9AD-00AA006BC149}']
+ property DefaultContainer: WideString dispid 1;
+ property Name: WideString readonly dispid 2;
+ property Class_: WideString readonly dispid 3;
+ property GUID: WideString readonly dispid 4;
+ property ADsPath: WideString readonly dispid 5;
+ property Parent: WideString readonly dispid 6;
+ property Schema: WideString readonly dispid 7;
+ procedure GetInfo; dispid 8;
+ procedure SetInfo; dispid 9;
+ function Get(const bstrName: WideString): OleVariant; dispid 10;
+ procedure Put(const bstrName: WideString; vProp: OleVariant); dispid 11;
+ function GetEx(const bstrName: WideString): OleVariant; dispid 12;
+ procedure PutEx(lnControlCode: Integer; const bstrName: WideString; vProp: OleVariant); dispid 13;
+ procedure GetInfoEx(vProperties: OleVariant; lnReserved: Integer); dispid 14;
+ end;
+ {$endif}
+
+// *********************************************************************//
+// Interface: IADsClass
+// Flags: (4416) Dual OleAutomation Dispatchable
+// GUID: {C8F93DD0-4AE0-11CF-9E73-00AA004A5691}
+// *********************************************************************//
+ IADsClass = interface(IADs)
+ ['{C8F93DD0-4AE0-11CF-9E73-00AA004A5691}']
+ function Get_PrimaryInterface: WideString; safecall;
+ function Get_CLSID: WideString; safecall;
+ procedure Set_CLSID(const retval: WideString); safecall;
+ function Get_OID: WideString; safecall;
+ procedure Set_OID(const retval: WideString); safecall;
+ function Get_Abstract: WordBool; safecall;
+ procedure Set_Abstract(retval: WordBool); safecall;
+ function Get_Auxiliary: WordBool; safecall;
+ procedure Set_Auxiliary(retval: WordBool); safecall;
+ function Get_MandatoryProperties: OleVariant; safecall;
+ procedure Set_MandatoryProperties(retval: OleVariant); safecall;
+ function Get_OptionalProperties: OleVariant; safecall;
+ procedure Set_OptionalProperties(retval: OleVariant); safecall;
+ function Get_NamingProperties: OleVariant; safecall;
+ procedure Set_NamingProperties(retval: OleVariant); safecall;
+ function Get_DerivedFrom: OleVariant; safecall;
+ procedure Set_DerivedFrom(retval: OleVariant); safecall;
+ function Get_AuxDerivedFrom: OleVariant; safecall;
+ procedure Set_AuxDerivedFrom(retval: OleVariant); safecall;
+ function Get_PossibleSuperiors: OleVariant; safecall;
+ procedure Set_PossibleSuperiors(retval: OleVariant); safecall;
+ function Get_Containment: OleVariant; safecall;
+ procedure Set_Containment(retval: OleVariant); safecall;
+ function Get_Container: WordBool; safecall;
+ procedure Set_Container(retval: WordBool); safecall;
+ function Get_HelpFileName: WideString; safecall;
+ procedure Set_HelpFileName(const retval: WideString); safecall;
+ function Get_HelpFileContext: Integer; safecall;
+ procedure Set_HelpFileContext(retval: Integer); safecall;
+ function Qualifiers: IADsCollection; safecall;
+ property PrimaryInterface: WideString read Get_PrimaryInterface;
+ property CLSID: WideString read Get_CLSID write Set_CLSID;
+ property OID: WideString read Get_OID write Set_OID;
+ property Abstract: WordBool read Get_Abstract write Set_Abstract;
+ property Auxiliary: WordBool read Get_Auxiliary write Set_Auxiliary;
+ property MandatoryProperties: OleVariant read Get_MandatoryProperties write Set_MandatoryProperties;
+ property OptionalProperties: OleVariant read Get_OptionalProperties write Set_OptionalProperties;
+ property NamingProperties: OleVariant read Get_NamingProperties write Set_NamingProperties;
+ property DerivedFrom: OleVariant read Get_DerivedFrom write Set_DerivedFrom;
+ property AuxDerivedFrom: OleVariant read Get_AuxDerivedFrom write Set_AuxDerivedFrom;
+ property PossibleSuperiors: OleVariant read Get_PossibleSuperiors write Set_PossibleSuperiors;
+ property Containment: OleVariant read Get_Containment write Set_Containment;
+ property Container: WordBool read Get_Container write Set_Container;
+ property HelpFileName: WideString read Get_HelpFileName write Set_HelpFileName;
+ property HelpFileContext: Integer read Get_HelpFileContext write Set_HelpFileContext;
+ end;
+
+// *********************************************************************//
+// DispIntf: IADsClassDisp
+// Flags: (4416) Dual OleAutomation Dispatchable
+// GUID: {C8F93DD0-4AE0-11CF-9E73-00AA004A5691}
+// *********************************************************************//
+ {$ifdef SUPPORTS_DISPINTERFACE}
+ IADsClassDisp = dispinterface
+ ['{C8F93DD0-4AE0-11CF-9E73-00AA004A5691}']
+ property PrimaryInterface: WideString readonly dispid 15;
+ property CLSID: WideString dispid 16;
+ property OID: WideString dispid 17;
+ property Abstract: WordBool dispid 18;
+ property Auxiliary: WordBool dispid 26;
+ property MandatoryProperties: OleVariant dispid 19;
+ property OptionalProperties: OleVariant dispid 29;
+ property NamingProperties: OleVariant dispid 30;
+ property DerivedFrom: OleVariant dispid 20;
+ property AuxDerivedFrom: OleVariant dispid 27;
+ property PossibleSuperiors: OleVariant dispid 28;
+ property Containment: OleVariant dispid 21;
+ property Container: WordBool dispid 22;
+ property HelpFileName: WideString dispid 23;
+ property HelpFileContext: Integer dispid 24;
+ function Qualifiers: IADsCollection; dispid 25;
+ property Name: WideString readonly dispid 2;
+ property Class_: WideString readonly dispid 3;
+ property GUID: WideString readonly dispid 4;
+ property ADsPath: WideString readonly dispid 5;
+ property Parent: WideString readonly dispid 6;
+ property Schema: WideString readonly dispid 7;
+ procedure GetInfo; dispid 8;
+ procedure SetInfo; dispid 9;
+ function Get(const bstrName: WideString): OleVariant; dispid 10;
+ procedure Put(const bstrName: WideString; vProp: OleVariant); dispid 11;
+ function GetEx(const bstrName: WideString): OleVariant; dispid 12;
+ procedure PutEx(lnControlCode: Integer; const bstrName: WideString; vProp: OleVariant); dispid 13;
+ procedure GetInfoEx(vProperties: OleVariant; lnReserved: Integer); dispid 14;
+ end;
+ {$endif}
+// *********************************************************************//
+// Interface: IADsProperty
+// Flags: (4416) Dual OleAutomation Dispatchable
+// GUID: {C8F93DD3-4AE0-11CF-9E73-00AA004A5691}
+// *********************************************************************//
+ IADsProperty = interface(IADs)
+ ['{C8F93DD3-4AE0-11CF-9E73-00AA004A5691}']
+ function Get_OID: WideString; safecall;
+ procedure Set_OID(const retval: WideString); safecall;
+ function Get_Syntax: WideString; safecall;
+ procedure Set_Syntax(const retval: WideString); safecall;
+ function Get_MaxRange: Integer; safecall;
+ procedure Set_MaxRange(retval: Integer); safecall;
+ function Get_MinRange: Integer; safecall;
+ procedure Set_MinRange(retval: Integer); safecall;
+ function Get_MultiValued: WordBool; safecall;
+ procedure Set_MultiValued(retval: WordBool); safecall;
+ function Qualifiers: IADsCollection; safecall;
+ property OID: WideString read Get_OID write Set_OID;
+ property Syntax: WideString read Get_Syntax write Set_Syntax;
+ property MaxRange: Integer read Get_MaxRange write Set_MaxRange;
+ property MinRange: Integer read Get_MinRange write Set_MinRange;
+ property MultiValued: WordBool read Get_MultiValued write Set_MultiValued;
+ end;
+
+// *********************************************************************//
+// DispIntf: IADsPropertyDisp
+// Flags: (4416) Dual OleAutomation Dispatchable
+// GUID: {C8F93DD3-4AE0-11CF-9E73-00AA004A5691}
+// *********************************************************************//
+ {$ifdef SUPPORTS_DISPINTERFACE}
+ IADsPropertyDisp = dispinterface
+ ['{C8F93DD3-4AE0-11CF-9E73-00AA004A5691}']
+ property OID: WideString dispid 17;
+ property Syntax: WideString dispid 18;
+ property MaxRange: Integer dispid 19;
+ property MinRange: Integer dispid 20;
+ property MultiValued: WordBool dispid 21;
+ function Qualifiers: IADsCollection; dispid 22;
+ property Name: WideString readonly dispid 2;
+ property Class_: WideString readonly dispid 3;
+ property GUID: WideString readonly dispid 4;
+ property ADsPath: WideString readonly dispid 5;
+ property Parent: WideString readonly dispid 6;
+ property Schema: WideString readonly dispid 7;
+ procedure GetInfo; dispid 8;
+ procedure SetInfo; dispid 9;
+ function Get(const bstrName: WideString): OleVariant; dispid 10;
+ procedure Put(const bstrName: WideString; vProp: OleVariant); dispid 11;
+ function GetEx(const bstrName: WideString): OleVariant; dispid 12;
+ procedure PutEx(lnControlCode: Integer; const bstrName: WideString; vProp: OleVariant); dispid 13;
+ procedure GetInfoEx(vProperties: OleVariant; lnReserved: Integer); dispid 14;
+ end;
+ {$endif}
+
+// *********************************************************************//
+// Interface: IADsSyntax
+// Flags: (4416) Dual OleAutomation Dispatchable
+// GUID: {C8F93DD2-4AE0-11CF-9E73-00AA004A5691}
+// *********************************************************************//
+ IADsSyntax = interface(IADs)
+ ['{C8F93DD2-4AE0-11CF-9E73-00AA004A5691}']
+ function Get_OleAutoDataType: Integer; safecall;
+ procedure Set_OleAutoDataType(retval: Integer); safecall;
+ property OleAutoDataType: Integer read Get_OleAutoDataType write Set_OleAutoDataType;
+ end;
+
+// *********************************************************************//
+// DispIntf: IADsSyntaxDisp
+// Flags: (4416) Dual OleAutomation Dispatchable
+// GUID: {C8F93DD2-4AE0-11CF-9E73-00AA004A5691}
+// *********************************************************************//
+ {$ifdef SUPPORTS_DISPINTERFACE}
+ IADsSyntaxDisp = dispinterface
+ ['{C8F93DD2-4AE0-11CF-9E73-00AA004A5691}']
+ property OleAutoDataType: Integer dispid 15;
+ property Name: WideString readonly dispid 2;
+ property Class_: WideString readonly dispid 3;
+ property GUID: WideString readonly dispid 4;
+ property ADsPath: WideString readonly dispid 5;
+ property Parent: WideString readonly dispid 6;
+ property Schema: WideString readonly dispid 7;
+ procedure GetInfo; dispid 8;
+ procedure SetInfo; dispid 9;
+ function Get(const bstrName: WideString): OleVariant; dispid 10;
+ procedure Put(const bstrName: WideString; vProp: OleVariant); dispid 11;
+ function GetEx(const bstrName: WideString): OleVariant; dispid 12;
+ procedure PutEx(lnControlCode: Integer; const bstrName: WideString; vProp: OleVariant); dispid 13;
+ procedure GetInfoEx(vProperties: OleVariant; lnReserved: Integer); dispid 14;
+ end;
+ {$endif}
+
+// *********************************************************************//
+// Interface: IADsLocality
+// Flags: (4416) Dual OleAutomation Dispatchable
+// GUID: {A05E03A2-EFFE-11CF-8ABC-00C04FD8D503}
+// *********************************************************************//
+ IADsLocality = interface(IADs)
+ ['{A05E03A2-EFFE-11CF-8ABC-00C04FD8D503}']
+ function Get_Description: WideString; safecall;
+ procedure Set_Description(const retval: WideString); safecall;
+ function Get_LocalityName: WideString; safecall;
+ procedure Set_LocalityName(const retval: WideString); safecall;
+ function Get_PostalAddress: WideString; safecall;
+ procedure Set_PostalAddress(const retval: WideString); safecall;
+ function Get_SeeAlso: OleVariant; safecall;
+ procedure Set_SeeAlso(retval: OleVariant); safecall;
+ property Description: WideString read Get_Description write Set_Description;
+ property LocalityName: WideString read Get_LocalityName write Set_LocalityName;
+ property PostalAddress: WideString read Get_PostalAddress write Set_PostalAddress;
+ property SeeAlso: OleVariant read Get_SeeAlso write Set_SeeAlso;
+ end;
+
+// *********************************************************************//
+// DispIntf: IADsLocalityDisp
+// Flags: (4416) Dual OleAutomation Dispatchable
+// GUID: {A05E03A2-EFFE-11CF-8ABC-00C04FD8D503}
+// *********************************************************************//
+ {$ifdef SUPPORTS_DISPINTERFACE}
+ IADsLocalityDisp = dispinterface
+ ['{A05E03A2-EFFE-11CF-8ABC-00C04FD8D503}']
+ property Description: WideString dispid 15;
+ property LocalityName: WideString dispid 16;
+ property PostalAddress: WideString dispid 17;
+ property SeeAlso: OleVariant dispid 18;
+ property Name: WideString readonly dispid 2;
+ property Class_: WideString readonly dispid 3;
+ property GUID: WideString readonly dispid 4;
+ property ADsPath: WideString readonly dispid 5;
+ property Parent: WideString readonly dispid 6;
+ property Schema: WideString readonly dispid 7;
+ procedure GetInfo; dispid 8;
+ procedure SetInfo; dispid 9;
+ function Get(const bstrName: WideString): OleVariant; dispid 10;
+ procedure Put(const bstrName: WideString; vProp: OleVariant); dispid 11;
+ function GetEx(const bstrName: WideString): OleVariant; dispid 12;
+ procedure PutEx(lnControlCode: Integer; const bstrName: WideString; vProp: OleVariant); dispid 13;
+ procedure GetInfoEx(vProperties: OleVariant; lnReserved: Integer); dispid 14;
+ end;
+ {$endif}
+
+// *********************************************************************//
+// Interface: IADsO
+// Flags: (4416) Dual OleAutomation Dispatchable
+// GUID: {A1CD2DC6-EFFE-11CF-8ABC-00C04FD8D503}
+// *********************************************************************//
+ IADsO = interface(IADs)
+ ['{A1CD2DC6-EFFE-11CF-8ABC-00C04FD8D503}']
+ function Get_Description: WideString; safecall;
+ procedure Set_Description(const retval: WideString); safecall;
+ function Get_LocalityName: WideString; safecall;
+ procedure Set_LocalityName(const retval: WideString); safecall;
+ function Get_PostalAddress: WideString; safecall;
+ procedure Set_PostalAddress(const retval: WideString); safecall;
+ function Get_TelephoneNumber: WideString; safecall;
+ procedure Set_TelephoneNumber(const retval: WideString); safecall;
+ function Get_FaxNumber: WideString; safecall;
+ procedure Set_FaxNumber(const retval: WideString); safecall;
+ function Get_SeeAlso: OleVariant; safecall;
+ procedure Set_SeeAlso(retval: OleVariant); safecall;
+ property Description: WideString read Get_Description write Set_Description;
+ property LocalityName: WideString read Get_LocalityName write Set_LocalityName;
+ property PostalAddress: WideString read Get_PostalAddress write Set_PostalAddress;
+ property TelephoneNumber: WideString read Get_TelephoneNumber write Set_TelephoneNumber;
+ property FaxNumber: WideString read Get_FaxNumber write Set_FaxNumber;
+ property SeeAlso: OleVariant read Get_SeeAlso write Set_SeeAlso;
+ end;
+
+// *********************************************************************//
+// DispIntf: IADsODisp
+// Flags: (4416) Dual OleAutomation Dispatchable
+// GUID: {A1CD2DC6-EFFE-11CF-8ABC-00C04FD8D503}
+// *********************************************************************//
+ {$ifdef SUPPORTS_DISPINTERFACE}
+ IADsODisp = dispinterface
+ ['{A1CD2DC6-EFFE-11CF-8ABC-00C04FD8D503}']
+ property Description: WideString dispid 15;
+ property LocalityName: WideString dispid 16;
+ property PostalAddress: WideString dispid 17;
+ property TelephoneNumber: WideString dispid 18;
+ property FaxNumber: WideString dispid 19;
+ property SeeAlso: OleVariant dispid 20;
+ property Name: WideString readonly dispid 2;
+ property Class_: WideString readonly dispid 3;
+ property GUID: WideString readonly dispid 4;
+ property ADsPath: WideString readonly dispid 5;
+ property Parent: WideString readonly dispid 6;
+ property Schema: WideString readonly dispid 7;
+ procedure GetInfo; dispid 8;
+ procedure SetInfo; dispid 9;
+ function Get(const bstrName: WideString): OleVariant; dispid 10;
+ procedure Put(const bstrName: WideString; vProp: OleVariant); dispid 11;
+ function GetEx(const bstrName: WideString): OleVariant; dispid 12;
+ procedure PutEx(lnControlCode: Integer; const bstrName: WideString; vProp: OleVariant); dispid 13;
+ procedure GetInfoEx(vProperties: OleVariant; lnReserved: Integer); dispid 14;
+ end;
+ {$endif}
+
+// *********************************************************************//
+// Interface: IADsOU
+// Flags: (4416) Dual OleAutomation Dispatchable
+// GUID: {A2F733B8-EFFE-11CF-8ABC-00C04FD8D503}
+// *********************************************************************//
+ IADsOU = interface(IADs)
+ ['{A2F733B8-EFFE-11CF-8ABC-00C04FD8D503}']
+ function Get_Description: WideString; safecall;
+ procedure Set_Description(const retval: WideString); safecall;
+ function Get_LocalityName: WideString; safecall;
+ procedure Set_LocalityName(const retval: WideString); safecall;
+ function Get_PostalAddress: WideString; safecall;
+ procedure Set_PostalAddress(const retval: WideString); safecall;
+ function Get_TelephoneNumber: WideString; safecall;
+ procedure Set_TelephoneNumber(const retval: WideString); safecall;
+ function Get_FaxNumber: WideString; safecall;
+ procedure Set_FaxNumber(const retval: WideString); safecall;
+ function Get_SeeAlso: OleVariant; safecall;
+ procedure Set_SeeAlso(retval: OleVariant); safecall;
+ function Get_BusinessCategory: WideString; safecall;
+ procedure Set_BusinessCategory(const retval: WideString); safecall;
+ property Description: WideString read Get_Description write Set_Description;
+ property LocalityName: WideString read Get_LocalityName write Set_LocalityName;
+ property PostalAddress: WideString read Get_PostalAddress write Set_PostalAddress;
+ property TelephoneNumber: WideString read Get_TelephoneNumber write Set_TelephoneNumber;
+ property FaxNumber: WideString read Get_FaxNumber write Set_FaxNumber;
+ property SeeAlso: OleVariant read Get_SeeAlso write Set_SeeAlso;
+ property BusinessCategory: WideString read Get_BusinessCategory write Set_BusinessCategory;
+ end;
+
+// *********************************************************************//
+// DispIntf: IADsOUDisp
+// Flags: (4416) Dual OleAutomation Dispatchable
+// GUID: {A2F733B8-EFFE-11CF-8ABC-00C04FD8D503}
+// *********************************************************************//
+ {$ifdef SUPPORTS_DISPINTERFACE}
+ IADsOUDisp = dispinterface
+ ['{A2F733B8-EFFE-11CF-8ABC-00C04FD8D503}']
+ property Description: WideString dispid 15;
+ property LocalityName: WideString dispid 16;
+ property PostalAddress: WideString dispid 17;
+ property TelephoneNumber: WideString dispid 18;
+ property FaxNumber: WideString dispid 19;
+ property SeeAlso: OleVariant dispid 20;
+ property BusinessCategory: WideString dispid 21;
+ property Name: WideString readonly dispid 2;
+ property Class_: WideString readonly dispid 3;
+ property GUID: WideString readonly dispid 4;
+ property ADsPath: WideString readonly dispid 5;
+ property Parent: WideString readonly dispid 6;
+ property Schema: WideString readonly dispid 7;
+ procedure GetInfo; dispid 8;
+ procedure SetInfo; dispid 9;
+ function Get(const bstrName: WideString): OleVariant; dispid 10;
+ procedure Put(const bstrName: WideString; vProp: OleVariant); dispid 11;
+ function GetEx(const bstrName: WideString): OleVariant; dispid 12;
+ procedure PutEx(lnControlCode: Integer; const bstrName: WideString; vProp: OleVariant); dispid 13;
+ procedure GetInfoEx(vProperties: OleVariant; lnReserved: Integer); dispid 14;
+ end;
+ {$endif}
+
+// *********************************************************************//
+// Interface: IADsDomain
+// Flags: (4416) Dual OleAutomation Dispatchable
+// GUID: {00E4C220-FD16-11CE-ABC4-02608C9E7553}
+// *********************************************************************//
+ IADsDomain = interface(IADs)
+ ['{00E4C220-FD16-11CE-ABC4-02608C9E7553}']
+ function Get_IsWorkgroup: WordBool; safecall;
+ function Get_MinPasswordLength: Integer; safecall;
+ procedure Set_MinPasswordLength(retval: Integer); safecall;
+ function Get_MinPasswordAge: Integer; safecall;
+ procedure Set_MinPasswordAge(retval: Integer); safecall;
+ function Get_MaxPasswordAge: Integer; safecall;
+ procedure Set_MaxPasswordAge(retval: Integer); safecall;
+ function Get_MaxBadPasswordsAllowed: Integer; safecall;
+ procedure Set_MaxBadPasswordsAllowed(retval: Integer); safecall;
+ function Get_PasswordHistoryLength: Integer; safecall;
+ procedure Set_PasswordHistoryLength(retval: Integer); safecall;
+ function Get_PasswordAttributes: Integer; safecall;
+ procedure Set_PasswordAttributes(retval: Integer); safecall;
+ function Get_AutoUnlockInterval: Integer; safecall;
+ procedure Set_AutoUnlockInterval(retval: Integer); safecall;
+ function Get_LockoutObservationInterval: Integer; safecall;
+ procedure Set_LockoutObservationInterval(retval: Integer); safecall;
+ property IsWorkgroup: WordBool read Get_IsWorkgroup;
+ property MinPasswordLength: Integer read Get_MinPasswordLength write Set_MinPasswordLength;
+ property MinPasswordAge: Integer read Get_MinPasswordAge write Set_MinPasswordAge;
+ property MaxPasswordAge: Integer read Get_MaxPasswordAge write Set_MaxPasswordAge;
+ property MaxBadPasswordsAllowed: Integer read Get_MaxBadPasswordsAllowed write Set_MaxBadPasswordsAllowed;
+ property PasswordHistoryLength: Integer read Get_PasswordHistoryLength write Set_PasswordHistoryLength;
+ property PasswordAttributes: Integer read Get_PasswordAttributes write Set_PasswordAttributes;
+ property AutoUnlockInterval: Integer read Get_AutoUnlockInterval write Set_AutoUnlockInterval;
+ property LockoutObservationInterval: Integer read Get_LockoutObservationInterval write Set_LockoutObservationInterval;
+ end;
+
+// *********************************************************************//
+// DispIntf: IADsDomainDisp
+// Flags: (4416) Dual OleAutomation Dispatchable
+// GUID: {00E4C220-FD16-11CE-ABC4-02608C9E7553}
+// *********************************************************************//
+ {$ifdef SUPPORTS_DISPINTERFACE}
+ IADsDomainDisp = dispinterface
+ ['{00E4C220-FD16-11CE-ABC4-02608C9E7553}']
+ property IsWorkgroup: WordBool readonly dispid 15;
+ property MinPasswordLength: Integer dispid 16;
+ property MinPasswordAge: Integer dispid 17;
+ property MaxPasswordAge: Integer dispid 18;
+ property MaxBadPasswordsAllowed: Integer dispid 19;
+ property PasswordHistoryLength: Integer dispid 20;
+ property PasswordAttributes: Integer dispid 21;
+ property AutoUnlockInterval: Integer dispid 22;
+ property LockoutObservationInterval: Integer dispid 23;
+ property Name: WideString readonly dispid 2;
+ property Class_: WideString readonly dispid 3;
+ property GUID: WideString readonly dispid 4;
+ property ADsPath: WideString readonly dispid 5;
+ property Parent: WideString readonly dispid 6;
+ property Schema: WideString readonly dispid 7;
+ procedure GetInfo; dispid 8;
+ procedure SetInfo; dispid 9;
+ function Get(const bstrName: WideString): OleVariant; dispid 10;
+ procedure Put(const bstrName: WideString; vProp: OleVariant); dispid 11;
+ function GetEx(const bstrName: WideString): OleVariant; dispid 12;
+ procedure PutEx(lnControlCode: Integer; const bstrName: WideString; vProp: OleVariant); dispid 13;
+ procedure GetInfoEx(vProperties: OleVariant; lnReserved: Integer); dispid 14;
+ end;
+ {$endif}
+// *********************************************************************//
+// Interface: IADsComputer
+// Flags: (4416) Dual OleAutomation Dispatchable
+// GUID: {EFE3CC70-1D9F-11CF-B1F3-02608C9E7553}
+// *********************************************************************//
+ IADsComputer = interface(IADs)
+ ['{EFE3CC70-1D9F-11CF-B1F3-02608C9E7553}']
+ function Get_ComputerID: WideString; safecall;
+ function Get_Site: WideString; safecall;
+ function Get_Description: WideString; safecall;
+ procedure Set_Description(const retval: WideString); safecall;
+ function Get_Location: WideString; safecall;
+ procedure Set_Location(const retval: WideString); safecall;
+ function Get_PrimaryUser: WideString; safecall;
+ procedure Set_PrimaryUser(const retval: WideString); safecall;
+ function Get_Owner: WideString; safecall;
+ procedure Set_Owner(const retval: WideString); safecall;
+ function Get_Division: WideString; safecall;
+ procedure Set_Division(const retval: WideString); safecall;
+ function Get_Department: WideString; safecall;
+ procedure Set_Department(const retval: WideString); safecall;
+ function Get_Role: WideString; safecall;
+ procedure Set_Role(const retval: WideString); safecall;
+ function Get_OperatingSystem: WideString; safecall;
+ procedure Set_OperatingSystem(const retval: WideString); safecall;
+ function Get_OperatingSystemVersion: WideString; safecall;
+ procedure Set_OperatingSystemVersion(const retval: WideString); safecall;
+ function Get_Model: WideString; safecall;
+ procedure Set_Model(const retval: WideString); safecall;
+ function Get_Processor: WideString; safecall;
+ procedure Set_Processor(const retval: WideString); safecall;
+ function Get_ProcessorCount: WideString; safecall;
+ procedure Set_ProcessorCount(const retval: WideString); safecall;
+ function Get_MemorySize: WideString; safecall;
+ procedure Set_MemorySize(const retval: WideString); safecall;
+ function Get_StorageCapacity: WideString; safecall;
+ procedure Set_StorageCapacity(const retval: WideString); safecall;
+ function Get_NetAddresses: OleVariant; safecall;
+ procedure Set_NetAddresses(retval: OleVariant); safecall;
+ property ComputerID: WideString read Get_ComputerID;
+ property Site: WideString read Get_Site;
+ property Description: WideString read Get_Description write Set_Description;
+ property Location: WideString read Get_Location write Set_Location;
+ property PrimaryUser: WideString read Get_PrimaryUser write Set_PrimaryUser;
+ property Owner: WideString read Get_Owner write Set_Owner;
+ property Division: WideString read Get_Division write Set_Division;
+ property Department: WideString read Get_Department write Set_Department;
+ property Role: WideString read Get_Role write Set_Role;
+ property OperatingSystem: WideString read Get_OperatingSystem write Set_OperatingSystem;
+ property OperatingSystemVersion: WideString read Get_OperatingSystemVersion write Set_OperatingSystemVersion;
+ property Model: WideString read Get_Model write Set_Model;
+ property Processor: WideString read Get_Processor write Set_Processor;
+ property ProcessorCount: WideString read Get_ProcessorCount write Set_ProcessorCount;
+ property MemorySize: WideString read Get_MemorySize write Set_MemorySize;
+ property StorageCapacity: WideString read Get_StorageCapacity write Set_StorageCapacity;
+ property NetAddresses: OleVariant read Get_NetAddresses write Set_NetAddresses;
+ end;
+
+// *********************************************************************//
+// DispIntf: IADsComputerDisp
+// Flags: (4416) Dual OleAutomation Dispatchable
+// GUID: {EFE3CC70-1D9F-11CF-B1F3-02608C9E7553}
+// *********************************************************************//
+ {$ifdef SUPPORTS_DISPINTERFACE}
+ IADsComputerDisp = dispinterface
+ ['{EFE3CC70-1D9F-11CF-B1F3-02608C9E7553}']
+ property ComputerID: WideString readonly dispid 16;
+ property Site: WideString readonly dispid 18;
+ property Description: WideString dispid 19;
+ property Location: WideString dispid 20;
+ property PrimaryUser: WideString dispid 21;
+ property Owner: WideString dispid 22;
+ property Division: WideString dispid 23;
+ property Department: WideString dispid 24;
+ property Role: WideString dispid 25;
+ property OperatingSystem: WideString dispid 26;
+ property OperatingSystemVersion: WideString dispid 27;
+ property Model: WideString dispid 28;
+ property Processor: WideString dispid 29;
+ property ProcessorCount: WideString dispid 30;
+ property MemorySize: WideString dispid 31;
+ property StorageCapacity: WideString dispid 32;
+ property NetAddresses: OleVariant dispid 17;
+ property Name: WideString readonly dispid 2;
+ property Class_: WideString readonly dispid 3;
+ property GUID: WideString readonly dispid 4;
+ property ADsPath: WideString readonly dispid 5;
+ property Parent: WideString readonly dispid 6;
+ property Schema: WideString readonly dispid 7;
+ procedure GetInfo; dispid 8;
+ procedure SetInfo; dispid 9;
+ function Get(const bstrName: WideString): OleVariant; dispid 10;
+ procedure Put(const bstrName: WideString; vProp: OleVariant); dispid 11;
+ function GetEx(const bstrName: WideString): OleVariant; dispid 12;
+ procedure PutEx(lnControlCode: Integer; const bstrName: WideString; vProp: OleVariant); dispid 13;
+ procedure GetInfoEx(vProperties: OleVariant; lnReserved: Integer); dispid 14;
+ end;
+ {$endif}
+// *********************************************************************//
+// Interface: IADsComputerOperations
+// Flags: (4416) Dual OleAutomation Dispatchable
+// GUID: {EF497680-1D9F-11CF-B1F3-02608C9E7553}
+// *********************************************************************//
+ IADsComputerOperations = interface(IADs)
+ ['{EF497680-1D9F-11CF-B1F3-02608C9E7553}']
+ function Status: IDispatch; safecall;
+ procedure Shutdown(bReboot: WordBool); safecall;
+ end;
+
+// *********************************************************************//
+// DispIntf: IADsComputerOperationsDisp
+// Flags: (4416) Dual OleAutomation Dispatchable
+// GUID: {EF497680-1D9F-11CF-B1F3-02608C9E7553}
+// *********************************************************************//
+ {$ifdef SUPPORTS_DISPINTERFACE}
+ IADsComputerOperationsDisp = dispinterface
+ ['{EF497680-1D9F-11CF-B1F3-02608C9E7553}']
+ function Status: IDispatch; dispid 33;
+ procedure Shutdown(bReboot: WordBool); dispid 34;
+ property Name: WideString readonly dispid 2;
+ property Class_: WideString readonly dispid 3;
+ property GUID: WideString readonly dispid 4;
+ property ADsPath: WideString readonly dispid 5;
+ property Parent: WideString readonly dispid 6;
+ property Schema: WideString readonly dispid 7;
+ procedure GetInfo; dispid 8;
+ procedure SetInfo; dispid 9;
+ function Get(const bstrName: WideString): OleVariant; dispid 10;
+ procedure Put(const bstrName: WideString; vProp: OleVariant); dispid 11;
+ function GetEx(const bstrName: WideString): OleVariant; dispid 12;
+ procedure PutEx(lnControlCode: Integer; const bstrName: WideString; vProp: OleVariant); dispid 13;
+ procedure GetInfoEx(vProperties: OleVariant; lnReserved: Integer); dispid 14;
+ end;
+ {$endif}
+// *********************************************************************//
+// Interface: IADsGroup
+// Flags: (4416) Dual OleAutomation Dispatchable
+// GUID: {27636B00-410F-11CF-B1FF-02608C9E7553}
+// *********************************************************************//
+ IADsGroup = interface(IADs)
+ ['{27636B00-410F-11CF-B1FF-02608C9E7553}']
+ function Get_Description: WideString; safecall;
+ procedure Set_Description(const retval: WideString); safecall;
+ function Members: IADsMembers; safecall;
+ function IsMember(const bstrMember: WideString): WordBool; safecall;
+ procedure Add(const bstrNewItem: WideString); safecall;
+ procedure Remove(const bstrItemToBeRemoved: WideString); safecall;
+ property Description: WideString read Get_Description write Set_Description;
+ end;
+
+// *********************************************************************//
+// DispIntf: IADsGroupDisp
+// Flags: (4416) Dual OleAutomation Dispatchable
+// GUID: {27636B00-410F-11CF-B1FF-02608C9E7553}
+// *********************************************************************//
+ {$ifdef SUPPORTS_DISPINTERFACE}
+ IADsGroupDisp = dispinterface
+ ['{27636B00-410F-11CF-B1FF-02608C9E7553}']
+ property Description: WideString dispid 15;
+ function Members: IADsMembers; dispid 16;
+ function IsMember(const bstrMember: WideString): WordBool; dispid 17;
+ procedure Add(const bstrNewItem: WideString); dispid 18;
+ procedure Remove(const bstrItemToBeRemoved: WideString); dispid 19;
+ property Name: WideString readonly dispid 2;
+ property Class_: WideString readonly dispid 3;
+ property GUID: WideString readonly dispid 4;
+ property ADsPath: WideString readonly dispid 5;
+ property Parent: WideString readonly dispid 6;
+ property Schema: WideString readonly dispid 7;
+ procedure GetInfo; dispid 8;
+ procedure SetInfo; dispid 9;
+ function Get(const bstrName: WideString): OleVariant; dispid 10;
+ procedure Put(const bstrName: WideString; vProp: OleVariant); dispid 11;
+ function GetEx(const bstrName: WideString): OleVariant; dispid 12;
+ procedure PutEx(lnControlCode: Integer; const bstrName: WideString; vProp: OleVariant); dispid 13;
+ procedure GetInfoEx(vProperties: OleVariant; lnReserved: Integer); dispid 14;
+ end;
+ {$endif}
+// *********************************************************************//
+// Interface: IADsUser
+// Flags: (4416) Dual OleAutomation Dispatchable
+// GUID: {3E37E320-17E2-11CF-ABC4-02608C9E7553}
+// *********************************************************************//
+ IADsUser = interface(IADs)
+ ['{3E37E320-17E2-11CF-ABC4-02608C9E7553}']
+ function Get_BadLoginAddress: WideString; safecall;
+ function Get_BadLoginCount: Integer; safecall;
+ function Get_LastLogin: TDateTime; safecall;
+ function Get_LastLogoff: TDateTime; safecall;
+ function Get_LastFailedLogin: TDateTime; safecall;
+ function Get_PasswordLastChanged: TDateTime; safecall;
+ function Get_Description: WideString; safecall;
+ procedure Set_Description(const retval: WideString); safecall;
+ function Get_Division: WideString; safecall;
+ procedure Set_Division(const retval: WideString); safecall;
+ function Get_Department: WideString; safecall;
+ procedure Set_Department(const retval: WideString); safecall;
+ function Get_EmployeeID: WideString; safecall;
+ procedure Set_EmployeeID(const retval: WideString); safecall;
+ function Get_FullName: WideString; safecall;
+ procedure Set_FullName(const retval: WideString); safecall;
+ function Get_FirstName: WideString; safecall;
+ procedure Set_FirstName(const retval: WideString); safecall;
+ function Get_LastName: WideString; safecall;
+ procedure Set_LastName(const retval: WideString); safecall;
+ function Get_OtherName: WideString; safecall;
+ procedure Set_OtherName(const retval: WideString); safecall;
+ function Get_NamePrefix: WideString; safecall;
+ procedure Set_NamePrefix(const retval: WideString); safecall;
+ function Get_NameSuffix: WideString; safecall;
+ procedure Set_NameSuffix(const retval: WideString); safecall;
+ function Get_Title: WideString; safecall;
+ procedure Set_Title(const retval: WideString); safecall;
+ function Get_Manager: WideString; safecall;
+ procedure Set_Manager(const retval: WideString); safecall;
+ function Get_TelephoneHome: OleVariant; safecall;
+ procedure Set_TelephoneHome(retval: OleVariant); safecall;
+ function Get_TelephoneMobile: OleVariant; safecall;
+ procedure Set_TelephoneMobile(retval: OleVariant); safecall;
+ function Get_TelephoneNumber: OleVariant; safecall;
+ procedure Set_TelephoneNumber(retval: OleVariant); safecall;
+ function Get_TelephonePager: OleVariant; safecall;
+ procedure Set_TelephonePager(retval: OleVariant); safecall;
+ function Get_FaxNumber: OleVariant; safecall;
+ procedure Set_FaxNumber(retval: OleVariant); safecall;
+ function Get_OfficeLocations: OleVariant; safecall;
+ procedure Set_OfficeLocations(retval: OleVariant); safecall;
+ function Get_PostalAddresses: OleVariant; safecall;
+ procedure Set_PostalAddresses(retval: OleVariant); safecall;
+ function Get_PostalCodes: OleVariant; safecall;
+ procedure Set_PostalCodes(retval: OleVariant); safecall;
+ function Get_SeeAlso: OleVariant; safecall;
+ procedure Set_SeeAlso(retval: OleVariant); safecall;
+ function Get_AccountDisabled: WordBool; safecall;
+ procedure Set_AccountDisabled(retval: WordBool); safecall;
+ function Get_AccountExpirationDate: TDateTime; safecall;
+ procedure Set_AccountExpirationDate(retval: TDateTime); safecall;
+ function Get_GraceLoginsAllowed: Integer; safecall;
+ procedure Set_GraceLoginsAllowed(retval: Integer); safecall;
+ function Get_GraceLoginsRemaining: Integer; safecall;
+ procedure Set_GraceLoginsRemaining(retval: Integer); safecall;
+ function Get_IsAccountLocked: WordBool; safecall;
+ procedure Set_IsAccountLocked(retval: WordBool); safecall;
+ function Get_LoginHours: OleVariant; safecall;
+ procedure Set_LoginHours(retval: OleVariant); safecall;
+ function Get_LoginWorkstations: OleVariant; safecall;
+ procedure Set_LoginWorkstations(retval: OleVariant); safecall;
+ function Get_MaxLogins: Integer; safecall;
+ procedure Set_MaxLogins(retval: Integer); safecall;
+ function Get_MaxStorage: Integer; safecall;
+ procedure Set_MaxStorage(retval: Integer); safecall;
+ function Get_PasswordExpirationDate: TDateTime; safecall;
+ procedure Set_PasswordExpirationDate(retval: TDateTime); safecall;
+ function Get_PasswordMinimumLength: Integer; safecall;
+ procedure Set_PasswordMinimumLength(retval: Integer); safecall;
+ function Get_PasswordRequired: WordBool; safecall;
+ procedure Set_PasswordRequired(retval: WordBool); safecall;
+ function Get_RequireUniquePassword: WordBool; safecall;
+ procedure Set_RequireUniquePassword(retval: WordBool); safecall;
+ function Get_EmailAddress: WideString; safecall;
+ procedure Set_EmailAddress(const retval: WideString); safecall;
+ function Get_HomeDirectory: WideString; safecall;
+ procedure Set_HomeDirectory(const retval: WideString); safecall;
+ function Get_Languages: OleVariant; safecall;
+ procedure Set_Languages(retval: OleVariant); safecall;
+ function Get_Profile: WideString; safecall;
+ procedure Set_Profile(const retval: WideString); safecall;
+ function Get_LoginScript: WideString; safecall;
+ procedure Set_LoginScript(const retval: WideString); safecall;
+ function Get_Picture: OleVariant; safecall;
+ procedure Set_Picture(retval: OleVariant); safecall;
+ function Get_HomePage: WideString; safecall;
+ procedure Set_HomePage(const retval: WideString); safecall;
+ function Groups: IADsMembers; safecall;
+ procedure SetPassword(const NewPassword: WideString); safecall;
+ procedure ChangePassword(const bstrOldPassword: WideString; const bstrNewPassword: WideString); safecall;
+ property BadLoginAddress: WideString read Get_BadLoginAddress;
+ property BadLoginCount: Integer read Get_BadLoginCount;
+ property LastLogin: TDateTime read Get_LastLogin;
+ property LastLogoff: TDateTime read Get_LastLogoff;
+ property LastFailedLogin: TDateTime read Get_LastFailedLogin;
+ property PasswordLastChanged: TDateTime read Get_PasswordLastChanged;
+ property Description: WideString read Get_Description write Set_Description;
+ property Division: WideString read Get_Division write Set_Division;
+ property Department: WideString read Get_Department write Set_Department;
+ property EmployeeID: WideString read Get_EmployeeID write Set_EmployeeID;
+ property FullName: WideString read Get_FullName write Set_FullName;
+ property FirstName: WideString read Get_FirstName write Set_FirstName;
+ property LastName: WideString read Get_LastName write Set_LastName;
+ property OtherName: WideString read Get_OtherName write Set_OtherName;
+ property NamePrefix: WideString read Get_NamePrefix write Set_NamePrefix;
+ property NameSuffix: WideString read Get_NameSuffix write Set_NameSuffix;
+ property Title: WideString read Get_Title write Set_Title;
+ property Manager: WideString read Get_Manager write Set_Manager;
+ property TelephoneHome: OleVariant read Get_TelephoneHome write Set_TelephoneHome;
+ property TelephoneMobile: OleVariant read Get_TelephoneMobile write Set_TelephoneMobile;
+ property TelephoneNumber: OleVariant read Get_TelephoneNumber write Set_TelephoneNumber;
+ property TelephonePager: OleVariant read Get_TelephonePager write Set_TelephonePager;
+ property FaxNumber: OleVariant read Get_FaxNumber write Set_FaxNumber;
+ property OfficeLocations: OleVariant read Get_OfficeLocations write Set_OfficeLocations;
+ property PostalAddresses: OleVariant read Get_PostalAddresses write Set_PostalAddresses;
+ property PostalCodes: OleVariant read Get_PostalCodes write Set_PostalCodes;
+ property SeeAlso: OleVariant read Get_SeeAlso write Set_SeeAlso;
+ property AccountDisabled: WordBool read Get_AccountDisabled write Set_AccountDisabled;
+ property AccountExpirationDate: TDateTime read Get_AccountExpirationDate write Set_AccountExpirationDate;
+ property GraceLoginsAllowed: Integer read Get_GraceLoginsAllowed write Set_GraceLoginsAllowed;
+ property GraceLoginsRemaining: Integer read Get_GraceLoginsRemaining write Set_GraceLoginsRemaining;
+ property IsAccountLocked: WordBool read Get_IsAccountLocked write Set_IsAccountLocked;
+ property LoginHours: OleVariant read Get_LoginHours write Set_LoginHours;
+ property LoginWorkstations: OleVariant read Get_LoginWorkstations write Set_LoginWorkstations;
+ property MaxLogins: Integer read Get_MaxLogins write Set_MaxLogins;
+ property MaxStorage: Integer read Get_MaxStorage write Set_MaxStorage;
+ property PasswordExpirationDate: TDateTime read Get_PasswordExpirationDate write Set_PasswordExpirationDate;
+ property PasswordMinimumLength: Integer read Get_PasswordMinimumLength write Set_PasswordMinimumLength;
+ property PasswordRequired: WordBool read Get_PasswordRequired write Set_PasswordRequired;
+ property RequireUniquePassword: WordBool read Get_RequireUniquePassword write Set_RequireUniquePassword;
+ property EmailAddress: WideString read Get_EmailAddress write Set_EmailAddress;
+ property HomeDirectory: WideString read Get_HomeDirectory write Set_HomeDirectory;
+ property Languages: OleVariant read Get_Languages write Set_Languages;
+ property Profile: WideString read Get_Profile write Set_Profile;
+ property LoginScript: WideString read Get_LoginScript write Set_LoginScript;
+ property Picture: OleVariant read Get_Picture write Set_Picture;
+ property HomePage: WideString read Get_HomePage write Set_HomePage;
+ end;
+
+// *********************************************************************//
+// DispIntf: IADsUserDisp
+// Flags: (4416) Dual OleAutomation Dispatchable
+// GUID: {3E37E320-17E2-11CF-ABC4-02608C9E7553}
+// *********************************************************************//
+ {$ifdef SUPPORTS_DISPINTERFACE}
+ IADsUserDisp = dispinterface
+ ['{3E37E320-17E2-11CF-ABC4-02608C9E7553}']
+ property BadLoginAddress: WideString readonly dispid 53;
+ property BadLoginCount: Integer readonly dispid 54;
+ property LastLogin: TDateTime readonly dispid 56;
+ property LastLogoff: TDateTime readonly dispid 57;
+ property LastFailedLogin: TDateTime readonly dispid 58;
+ property PasswordLastChanged: TDateTime readonly dispid 59;
+ property Description: WideString dispid 15;
+ property Division: WideString dispid 19;
+ property Department: WideString dispid 122;
+ property EmployeeID: WideString dispid 20;
+ property FullName: WideString dispid 23;
+ property FirstName: WideString dispid 22;
+ property LastName: WideString dispid 25;
+ property OtherName: WideString dispid 27;
+ property NamePrefix: WideString dispid 114;
+ property NameSuffix: WideString dispid 115;
+ property Title: WideString dispid 36;
+ property Manager: WideString dispid 26;
+ property TelephoneHome: OleVariant dispid 32;
+ property TelephoneMobile: OleVariant dispid 33;
+ property TelephoneNumber: OleVariant dispid 34;
+ property TelephonePager: OleVariant dispid 17;
+ property FaxNumber: OleVariant dispid 16;
+ property OfficeLocations: OleVariant dispid 28;
+ property PostalAddresses: OleVariant dispid 30;
+ property PostalCodes: OleVariant dispid 31;
+ property SeeAlso: OleVariant dispid 117;
+ property AccountDisabled: WordBool dispid 37;
+ property AccountExpirationDate: TDateTime dispid 38;
+ property GraceLoginsAllowed: Integer dispid 41;
+ property GraceLoginsRemaining: Integer dispid 42;
+ property IsAccountLocked: WordBool dispid 43;
+ property LoginHours: OleVariant dispid 45;
+ property LoginWorkstations: OleVariant dispid 46;
+ property MaxLogins: Integer dispid 47;
+ property MaxStorage: Integer dispid 48;
+ property PasswordExpirationDate: TDateTime dispid 49;
+ property PasswordMinimumLength: Integer dispid 50;
+ property PasswordRequired: WordBool dispid 51;
+ property RequireUniquePassword: WordBool dispid 52;
+ property EmailAddress: WideString dispid 60;
+ property HomeDirectory: WideString dispid 61;
+ property Languages: OleVariant dispid 62;
+ property Profile: WideString dispid 63;
+ property LoginScript: WideString dispid 64;
+ property Picture: OleVariant dispid 65;
+ property HomePage: WideString dispid 120;
+ function Groups: IADsMembers; dispid 66;
+ procedure SetPassword(const NewPassword: WideString); dispid 67;
+ procedure ChangePassword(const bstrOldPassword: WideString; const bstrNewPassword: WideString); dispid 68;
+ property Name: WideString readonly dispid 2;
+ property Class_: WideString readonly dispid 3;
+ property GUID: WideString readonly dispid 4;
+ property ADsPath: WideString readonly dispid 5;
+ property Parent: WideString readonly dispid 6;
+ property Schema: WideString readonly dispid 7;
+ procedure GetInfo; dispid 8;
+ procedure SetInfo; dispid 9;
+ function Get(const bstrName: WideString): OleVariant; dispid 10;
+ procedure Put(const bstrName: WideString; vProp: OleVariant); dispid 11;
+ function GetEx(const bstrName: WideString): OleVariant; dispid 12;
+ procedure PutEx(lnControlCode: Integer; const bstrName: WideString; vProp: OleVariant); dispid 13;
+ procedure GetInfoEx(vProperties: OleVariant; lnReserved: Integer); dispid 14;
+ end;
+ {$endif}
+// *********************************************************************//
+// Interface: IADsPrintQueue
+// Flags: (4416) Dual OleAutomation Dispatchable
+// GUID: {B15160D0-1226-11CF-A985-00AA006BC149}
+// *********************************************************************//
+ IADsPrintQueue = interface(IADs)
+ ['{B15160D0-1226-11CF-A985-00AA006BC149}']
+ function Get_PrinterPath: WideString; safecall;
+ procedure Set_PrinterPath(const retval: WideString); safecall;
+ function Get_Model: WideString; safecall;
+ procedure Set_Model(const retval: WideString); safecall;
+ function Get_Datatype: WideString; safecall;
+ procedure Set_Datatype(const retval: WideString); safecall;
+ function Get_PrintProcessor: WideString; safecall;
+ procedure Set_PrintProcessor(const retval: WideString); safecall;
+ function Get_Description: WideString; safecall;
+ procedure Set_Description(const retval: WideString); safecall;
+ function Get_Location: WideString; safecall;
+ procedure Set_Location(const retval: WideString); safecall;
+ function Get_StartTime: TDateTime; safecall;
+ procedure Set_StartTime(retval: TDateTime); safecall;
+ function Get_UntilTime: TDateTime; safecall;
+ procedure Set_UntilTime(retval: TDateTime); safecall;
+ function Get_DefaultJobPriority: Integer; safecall;
+ procedure Set_DefaultJobPriority(retval: Integer); safecall;
+ function Get_Priority: Integer; safecall;
+ procedure Set_Priority(retval: Integer); safecall;
+ function Get_BannerPage: WideString; safecall;
+ procedure Set_BannerPage(const retval: WideString); safecall;
+ function Get_PrintDevices: OleVariant; safecall;
+ procedure Set_PrintDevices(retval: OleVariant); safecall;
+ function Get_NetAddresses: OleVariant; safecall;
+ procedure Set_NetAddresses(retval: OleVariant); safecall;
+ property PrinterPath: WideString read Get_PrinterPath write Set_PrinterPath;
+ property Model: WideString read Get_Model write Set_Model;
+ property Datatype: WideString read Get_Datatype write Set_Datatype;
+ property PrintProcessor: WideString read Get_PrintProcessor write Set_PrintProcessor;
+ property Description: WideString read Get_Description write Set_Description;
+ property Location: WideString read Get_Location write Set_Location;
+ property StartTime: TDateTime read Get_StartTime write Set_StartTime;
+ property UntilTime: TDateTime read Get_UntilTime write Set_UntilTime;
+ property DefaultJobPriority: Integer read Get_DefaultJobPriority write Set_DefaultJobPriority;
+ property Priority: Integer read Get_Priority write Set_Priority;
+ property BannerPage: WideString read Get_BannerPage write Set_BannerPage;
+ property PrintDevices: OleVariant read Get_PrintDevices write Set_PrintDevices;
+ property NetAddresses: OleVariant read Get_NetAddresses write Set_NetAddresses;
+ end;
+
+// *********************************************************************//
+// DispIntf: IADsPrintQueueDisp
+// Flags: (4416) Dual OleAutomation Dispatchable
+// GUID: {B15160D0-1226-11CF-A985-00AA006BC149}
+// *********************************************************************//
+ {$ifdef SUPPORTS_DISPINTERFACE}
+ IADsPrintQueueDisp = dispinterface
+ ['{B15160D0-1226-11CF-A985-00AA006BC149}']
+ property PrinterPath: WideString dispid 15;
+ property Model: WideString dispid 16;
+ property Datatype: WideString dispid 17;
+ property PrintProcessor: WideString dispid 18;
+ property Description: WideString dispid 19;
+ property Location: WideString dispid 20;
+ property StartTime: TDateTime dispid 21;
+ property UntilTime: TDateTime dispid 22;
+ property DefaultJobPriority: Integer dispid 23;
+ property Priority: Integer dispid 24;
+ property BannerPage: WideString dispid 25;
+ property PrintDevices: OleVariant dispid 26;
+ property NetAddresses: OleVariant dispid 27;
+ property Name: WideString readonly dispid 2;
+ property Class_: WideString readonly dispid 3;
+ property GUID: WideString readonly dispid 4;
+ property ADsPath: WideString readonly dispid 5;
+ property Parent: WideString readonly dispid 6;
+ property Schema: WideString readonly dispid 7;
+ procedure GetInfo; dispid 8;
+ procedure SetInfo; dispid 9;
+ function Get(const bstrName: WideString): OleVariant; dispid 10;
+ procedure Put(const bstrName: WideString; vProp: OleVariant); dispid 11;
+ function GetEx(const bstrName: WideString): OleVariant; dispid 12;
+ procedure PutEx(lnControlCode: Integer; const bstrName: WideString; vProp: OleVariant); dispid 13;
+ procedure GetInfoEx(vProperties: OleVariant; lnReserved: Integer); dispid 14;
+ end;
+ {$endif}
+// *********************************************************************//
+// Interface: IADsPrintQueueOperations
+// Flags: (4416) Dual OleAutomation Dispatchable
+// GUID: {124BE5C0-156E-11CF-A986-00AA006BC149}
+// *********************************************************************//
+ IADsPrintQueueOperations = interface(IADs)
+ ['{124BE5C0-156E-11CF-A986-00AA006BC149}']
+ function Get_Status: Integer; safecall;
+ function PrintJobs: IADsCollection; safecall;
+ procedure Pause; safecall;
+ procedure Resume; safecall;
+ procedure Purge; safecall;
+ property Status: Integer read Get_Status;
+ end;
+
+// *********************************************************************//
+// DispIntf: IADsPrintQueueOperationsDisp
+// Flags: (4416) Dual OleAutomation Dispatchable
+// GUID: {124BE5C0-156E-11CF-A986-00AA006BC149}
+// *********************************************************************//
+ {$ifdef SUPPORTS_DISPINTERFACE}
+ IADsPrintQueueOperationsDisp = dispinterface
+ ['{124BE5C0-156E-11CF-A986-00AA006BC149}']
+ property Status: Integer readonly dispid 27;
+ function PrintJobs: IADsCollection; dispid 28;
+ procedure Pause; dispid 29;
+ procedure Resume; dispid 30;
+ procedure Purge; dispid 31;
+ property Name: WideString readonly dispid 2;
+ property Class_: WideString readonly dispid 3;
+ property GUID: WideString readonly dispid 4;
+ property ADsPath: WideString readonly dispid 5;
+ property Parent: WideString readonly dispid 6;
+ property Schema: WideString readonly dispid 7;
+ procedure GetInfo; dispid 8;
+ procedure SetInfo; dispid 9;
+ function Get(const bstrName: WideString): OleVariant; dispid 10;
+ procedure Put(const bstrName: WideString; vProp: OleVariant); dispid 11;
+ function GetEx(const bstrName: WideString): OleVariant; dispid 12;
+ procedure PutEx(lnControlCode: Integer; const bstrName: WideString; vProp: OleVariant); dispid 13;
+ procedure GetInfoEx(vProperties: OleVariant; lnReserved: Integer); dispid 14;
+ end;
+ {$endif}
+// *********************************************************************//
+// Interface: IADsPrintJob
+// Flags: (4416) Dual OleAutomation Dispatchable
+// GUID: {32FB6780-1ED0-11CF-A988-00AA006BC149}
+// *********************************************************************//
+ IADsPrintJob = interface(IADs)
+ ['{32FB6780-1ED0-11CF-A988-00AA006BC149}']
+ function Get_HostPrintQueue: WideString; safecall;
+ function Get_User: WideString; safecall;
+ function Get_UserPath: WideString; safecall;
+ function Get_TimeSubmitted: TDateTime; safecall;
+ function Get_TotalPages: Integer; safecall;
+ function Get_Size: Integer; safecall;
+ function Get_Description: WideString; safecall;
+ procedure Set_Description(const retval: WideString); safecall;
+ function Get_Priority: Integer; safecall;
+ procedure Set_Priority(retval: Integer); safecall;
+ function Get_StartTime: TDateTime; safecall;
+ procedure Set_StartTime(retval: TDateTime); safecall;
+ function Get_UntilTime: TDateTime; safecall;
+ procedure Set_UntilTime(retval: TDateTime); safecall;
+ function Get_Notify: WideString; safecall;
+ procedure Set_Notify(const retval: WideString); safecall;
+ function Get_NotifyPath: WideString; safecall;
+ procedure Set_NotifyPath(const retval: WideString); safecall;
+ property HostPrintQueue: WideString read Get_HostPrintQueue;
+ property User: WideString read Get_User;
+ property UserPath: WideString read Get_UserPath;
+ property TimeSubmitted: TDateTime read Get_TimeSubmitted;
+ property TotalPages: Integer read Get_TotalPages;
+ property Size: Integer read Get_Size;
+ property Description: WideString read Get_Description write Set_Description;
+ property Priority: Integer read Get_Priority write Set_Priority;
+ property StartTime: TDateTime read Get_StartTime write Set_StartTime;
+ property UntilTime: TDateTime read Get_UntilTime write Set_UntilTime;
+ property Notify: WideString read Get_Notify write Set_Notify;
+ property NotifyPath: WideString read Get_NotifyPath write Set_NotifyPath;
+ end;
+
+// *********************************************************************//
+// DispIntf: IADsPrintJobDisp
+// Flags: (4416) Dual OleAutomation Dispatchable
+// GUID: {32FB6780-1ED0-11CF-A988-00AA006BC149}
+// *********************************************************************//
+ {$ifdef SUPPORTS_DISPINTERFACE}
+ IADsPrintJobDisp = dispinterface
+ ['{32FB6780-1ED0-11CF-A988-00AA006BC149}']
+ property HostPrintQueue: WideString readonly dispid 15;
+ property User: WideString readonly dispid 16;
+ property UserPath: WideString readonly dispid 17;
+ property TimeSubmitted: TDateTime readonly dispid 18;
+ property TotalPages: Integer readonly dispid 19;
+ property Size: Integer readonly dispid 234;
+ property Description: WideString dispid 20;
+ property Priority: Integer dispid 21;
+ property StartTime: TDateTime dispid 22;
+ property UntilTime: TDateTime dispid 23;
+ property Notify: WideString dispid 24;
+ property NotifyPath: WideString dispid 25;
+ property Name: WideString readonly dispid 2;
+ property Class_: WideString readonly dispid 3;
+ property GUID: WideString readonly dispid 4;
+ property ADsPath: WideString readonly dispid 5;
+ property Parent: WideString readonly dispid 6;
+ property Schema: WideString readonly dispid 7;
+ procedure GetInfo; dispid 8;
+ procedure SetInfo; dispid 9;
+ function Get(const bstrName: WideString): OleVariant; dispid 10;
+ procedure Put(const bstrName: WideString; vProp: OleVariant); dispid 11;
+ function GetEx(const bstrName: WideString): OleVariant; dispid 12;
+ procedure PutEx(lnControlCode: Integer; const bstrName: WideString; vProp: OleVariant); dispid 13;
+ procedure GetInfoEx(vProperties: OleVariant; lnReserved: Integer); dispid 14;
+ end;
+ {$endif}
+// *********************************************************************//
+// Interface: IADsPrintJobOperations
+// Flags: (4416) Dual OleAutomation Dispatchable
+// GUID: {9A52DB30-1ECF-11CF-A988-00AA006BC149}
+// *********************************************************************//
+ IADsPrintJobOperations = interface(IADs)
+ ['{9A52DB30-1ECF-11CF-A988-00AA006BC149}']
+ function Get_Status: Integer; safecall;
+ function Get_TimeElapsed: Integer; safecall;
+ function Get_PagesPrinted: Integer; safecall;
+ function Get_Position: Integer; safecall;
+ procedure Set_Position(retval: Integer); safecall;
+ procedure Pause; safecall;
+ procedure Resume; safecall;
+ property Status: Integer read Get_Status;
+ property TimeElapsed: Integer read Get_TimeElapsed;
+ property PagesPrinted: Integer read Get_PagesPrinted;
+ property Position: Integer read Get_Position write Set_Position;
+ end;
+
+// *********************************************************************//
+// DispIntf: IADsPrintJobOperationsDisp
+// Flags: (4416) Dual OleAutomation Dispatchable
+// GUID: {9A52DB30-1ECF-11CF-A988-00AA006BC149}
+// *********************************************************************//
+ {$ifdef SUPPORTS_DISPINTERFACE}
+ IADsPrintJobOperationsDisp = dispinterface
+ ['{9A52DB30-1ECF-11CF-A988-00AA006BC149}']
+ property Status: Integer readonly dispid 26;
+ property TimeElapsed: Integer readonly dispid 27;
+ property PagesPrinted: Integer readonly dispid 28;
+ property Position: Integer dispid 29;
+ procedure Pause; dispid 30;
+ procedure Resume; dispid 31;
+ property Name: WideString readonly dispid 2;
+ property Class_: WideString readonly dispid 3;
+ property GUID: WideString readonly dispid 4;
+ property ADsPath: WideString readonly dispid 5;
+ property Parent: WideString readonly dispid 6;
+ property Schema: WideString readonly dispid 7;
+ procedure GetInfo; dispid 8;
+ procedure SetInfo; dispid 9;
+ function Get(const bstrName: WideString): OleVariant; dispid 10;
+ procedure Put(const bstrName: WideString; vProp: OleVariant); dispid 11;
+ function GetEx(const bstrName: WideString): OleVariant; dispid 12;
+ procedure PutEx(lnControlCode: Integer; const bstrName: WideString; vProp: OleVariant); dispid 13;
+ procedure GetInfoEx(vProperties: OleVariant; lnReserved: Integer); dispid 14;
+ end;
+ {$endif}
+// *********************************************************************//
+// Interface: IADsService
+// Flags: (4416) Dual OleAutomation Dispatchable
+// GUID: {68AF66E0-31CA-11CF-A98A-00AA006BC149}
+// *********************************************************************//
+ IADsService = interface(IADs)
+ ['{68AF66E0-31CA-11CF-A98A-00AA006BC149}']
+ function Get_HostComputer: WideString; safecall;
+ procedure Set_HostComputer(const retval: WideString); safecall;
+ function Get_DisplayName: WideString; safecall;
+ procedure Set_DisplayName(const retval: WideString); safecall;
+ function Get_Version: WideString; safecall;
+ procedure Set_Version(const retval: WideString); safecall;
+ function Get_ServiceType: Integer; safecall;
+ procedure Set_ServiceType(retval: Integer); safecall;
+ function Get_StartType: Integer; safecall;
+ procedure Set_StartType(retval: Integer); safecall;
+ function Get_Path: WideString; safecall;
+ procedure Set_Path(const retval: WideString); safecall;
+ function Get_StartupParameters: WideString; safecall;
+ procedure Set_StartupParameters(const retval: WideString); safecall;
+ function Get_ErrorControl: Integer; safecall;
+ procedure Set_ErrorControl(retval: Integer); safecall;
+ function Get_LoadOrderGroup: WideString; safecall;
+ procedure Set_LoadOrderGroup(const retval: WideString); safecall;
+ function Get_ServiceAccountName: WideString; safecall;
+ procedure Set_ServiceAccountName(const retval: WideString); safecall;
+ function Get_ServiceAccountPath: WideString; safecall;
+ procedure Set_ServiceAccountPath(const retval: WideString); safecall;
+ function Get_Dependencies: OleVariant; safecall;
+ procedure Set_Dependencies(retval: OleVariant); safecall;
+ property HostComputer: WideString read Get_HostComputer write Set_HostComputer;
+ property DisplayName: WideString read Get_DisplayName write Set_DisplayName;
+ property Version: WideString read Get_Version write Set_Version;
+ property ServiceType: Integer read Get_ServiceType write Set_ServiceType;
+ property StartType: Integer read Get_StartType write Set_StartType;
+ property Path: WideString read Get_Path write Set_Path;
+ property StartupParameters: WideString read Get_StartupParameters write Set_StartupParameters;
+ property ErrorControl: Integer read Get_ErrorControl write Set_ErrorControl;
+ property LoadOrderGroup: WideString read Get_LoadOrderGroup write Set_LoadOrderGroup;
+ property ServiceAccountName: WideString read Get_ServiceAccountName write Set_ServiceAccountName;
+ property ServiceAccountPath: WideString read Get_ServiceAccountPath write Set_ServiceAccountPath;
+ property Dependencies: OleVariant read Get_Dependencies write Set_Dependencies;
+ end;
+
+// *********************************************************************//
+// DispIntf: IADsServiceDisp
+// Flags: (4416) Dual OleAutomation Dispatchable
+// GUID: {68AF66E0-31CA-11CF-A98A-00AA006BC149}
+// *********************************************************************//
+ {$ifdef SUPPORTS_DISPINTERFACE}
+ IADsServiceDisp = dispinterface
+ ['{68AF66E0-31CA-11CF-A98A-00AA006BC149}']
+ property HostComputer: WideString dispid 15;
+ property DisplayName: WideString dispid 16;
+ property Version: WideString dispid 17;
+ property ServiceType: Integer dispid 18;
+ property StartType: Integer dispid 19;
+ property Path: WideString dispid 20;
+ property StartupParameters: WideString dispid 21;
+ property ErrorControl: Integer dispid 22;
+ property LoadOrderGroup: WideString dispid 23;
+ property ServiceAccountName: WideString dispid 24;
+ property ServiceAccountPath: WideString dispid 25;
+ property Dependencies: OleVariant dispid 26;
+ property Name: WideString readonly dispid 2;
+ property Class_: WideString readonly dispid 3;
+ property GUID: WideString readonly dispid 4;
+ property ADsPath: WideString readonly dispid 5;
+ property Parent: WideString readonly dispid 6;
+ property Schema: WideString readonly dispid 7;
+ procedure GetInfo; dispid 8;
+ procedure SetInfo; dispid 9;
+ function Get(const bstrName: WideString): OleVariant; dispid 10;
+ procedure Put(const bstrName: WideString; vProp: OleVariant); dispid 11;
+ function GetEx(const bstrName: WideString): OleVariant; dispid 12;
+ procedure PutEx(lnControlCode: Integer; const bstrName: WideString; vProp: OleVariant); dispid 13;
+ procedure GetInfoEx(vProperties: OleVariant; lnReserved: Integer); dispid 14;
+ end;
+ {$endif}
+// *********************************************************************//
+// Interface: IADsServiceOperations
+// Flags: (4416) Dual OleAutomation Dispatchable
+// GUID: {5D7B33F0-31CA-11CF-A98A-00AA006BC149}
+// *********************************************************************//
+ IADsServiceOperations = interface(IADs)
+ ['{5D7B33F0-31CA-11CF-A98A-00AA006BC149}']
+ function Get_Status: Integer; safecall;
+ procedure Start; safecall;
+ procedure Stop; safecall;
+ procedure Pause; safecall;
+ procedure Continue; safecall;
+ procedure SetPassword(const bstrNewPassword: WideString); safecall;
+ property Status: Integer read Get_Status;
+ end;
+
+// *********************************************************************//
+// DispIntf: IADsServiceOperationsDisp
+// Flags: (4416) Dual OleAutomation Dispatchable
+// GUID: {5D7B33F0-31CA-11CF-A98A-00AA006BC149}
+// *********************************************************************//
+ {$ifdef SUPPORTS_DISPINTERFACE}
+ IADsServiceOperationsDisp = dispinterface
+ ['{5D7B33F0-31CA-11CF-A98A-00AA006BC149}']
+ property Status: Integer readonly dispid 27;
+ procedure Start; dispid 28;
+ procedure Stop; dispid 29;
+ procedure Pause; dispid 30;
+ procedure Continue; dispid 31;
+ procedure SetPassword(const bstrNewPassword: WideString); dispid 32;
+ property Name: WideString readonly dispid 2;
+ property Class_: WideString readonly dispid 3;
+ property GUID: WideString readonly dispid 4;
+ property ADsPath: WideString readonly dispid 5;
+ property Parent: WideString readonly dispid 6;
+ property Schema: WideString readonly dispid 7;
+ procedure GetInfo; dispid 8;
+ procedure SetInfo; dispid 9;
+ function Get(const bstrName: WideString): OleVariant; dispid 10;
+ procedure Put(const bstrName: WideString; vProp: OleVariant); dispid 11;
+ function GetEx(const bstrName: WideString): OleVariant; dispid 12;
+ procedure PutEx(lnControlCode: Integer; const bstrName: WideString; vProp: OleVariant); dispid 13;
+ procedure GetInfoEx(vProperties: OleVariant; lnReserved: Integer); dispid 14;
+ end;
+ {$endif}
+
+// *********************************************************************//
+// Interface: IADsFileService
+// Flags: (4416) Dual OleAutomation Dispatchable
+// GUID: {A89D1900-31CA-11CF-A98A-00AA006BC149}
+// *********************************************************************//
+ IADsFileService = interface(IADsService)
+ ['{A89D1900-31CA-11CF-A98A-00AA006BC149}']
+ function Get_Description: WideString; safecall;
+ procedure Set_Description(const retval: WideString); safecall;
+ function Get_MaxUserCount: Integer; safecall;
+ procedure Set_MaxUserCount(retval: Integer); safecall;
+ property Description: WideString read Get_Description write Set_Description;
+ property MaxUserCount: Integer read Get_MaxUserCount write Set_MaxUserCount;
+ end;
+
+// *********************************************************************//
+// DispIntf: IADsFileServiceDisp
+// Flags: (4416) Dual OleAutomation Dispatchable
+// GUID: {A89D1900-31CA-11CF-A98A-00AA006BC149}
+// *********************************************************************//
+ {$ifdef SUPPORTS_DISPINTERFACE}
+ IADsFileServiceDisp = dispinterface
+ ['{A89D1900-31CA-11CF-A98A-00AA006BC149}']
+ property Description: WideString dispid 33;
+ property MaxUserCount: Integer dispid 34;
+ property HostComputer: WideString dispid 15;
+ property DisplayName: WideString dispid 16;
+ property Version: WideString dispid 17;
+ property ServiceType: Integer dispid 18;
+ property StartType: Integer dispid 19;
+ property Path: WideString dispid 20;
+ property StartupParameters: WideString dispid 21;
+ property ErrorControl: Integer dispid 22;
+ property LoadOrderGroup: WideString dispid 23;
+ property ServiceAccountName: WideString dispid 24;
+ property ServiceAccountPath: WideString dispid 25;
+ property Dependencies: OleVariant dispid 26;
+ property Name: WideString readonly dispid 2;
+ property Class_: WideString readonly dispid 3;
+ property GUID: WideString readonly dispid 4;
+ property ADsPath: WideString readonly dispid 5;
+ property Parent: WideString readonly dispid 6;
+ property Schema: WideString readonly dispid 7;
+ procedure GetInfo; dispid 8;
+ procedure SetInfo; dispid 9;
+ function Get(const bstrName: WideString): OleVariant; dispid 10;
+ procedure Put(const bstrName: WideString; vProp: OleVariant); dispid 11;
+ function GetEx(const bstrName: WideString): OleVariant; dispid 12;
+ procedure PutEx(lnControlCode: Integer; const bstrName: WideString; vProp: OleVariant); dispid 13;
+ procedure GetInfoEx(vProperties: OleVariant; lnReserved: Integer); dispid 14;
+ end;
+ {$endif}
+// *********************************************************************//
+// Interface: IADsFileServiceOperations
+// Flags: (4416) Dual OleAutomation Dispatchable
+// GUID: {A02DED10-31CA-11CF-A98A-00AA006BC149}
+// *********************************************************************//
+ IADsFileServiceOperations = interface(IADsServiceOperations)
+ ['{A02DED10-31CA-11CF-A98A-00AA006BC149}']
+ function Sessions: IADsCollection; safecall;
+ function Resources: IADsCollection; safecall;
+ end;
+
+// *********************************************************************//
+// DispIntf: IADsFileServiceOperationsDisp
+// Flags: (4416) Dual OleAutomation Dispatchable
+// GUID: {A02DED10-31CA-11CF-A98A-00AA006BC149}
+// *********************************************************************//
+ {$ifdef SUPPORTS_DISPINTERFACE}
+ IADsFileServiceOperationsDisp = dispinterface
+ ['{A02DED10-31CA-11CF-A98A-00AA006BC149}']
+ function Sessions: IADsCollection; dispid 35;
+ function Resources: IADsCollection; dispid 36;
+ property Status: Integer readonly dispid 27;
+ procedure Start; dispid 28;
+ procedure Stop; dispid 29;
+ procedure Pause; dispid 30;
+ procedure Continue; dispid 31;
+ procedure SetPassword(const bstrNewPassword: WideString); dispid 32;
+ property Name: WideString readonly dispid 2;
+ property Class_: WideString readonly dispid 3;
+ property GUID: WideString readonly dispid 4;
+ property ADsPath: WideString readonly dispid 5;
+ property Parent: WideString readonly dispid 6;
+ property Schema: WideString readonly dispid 7;
+ procedure GetInfo; dispid 8;
+ procedure SetInfo; dispid 9;
+ function Get(const bstrName: WideString): OleVariant; dispid 10;
+ procedure Put(const bstrName: WideString; vProp: OleVariant); dispid 11;
+ function GetEx(const bstrName: WideString): OleVariant; dispid 12;
+ procedure PutEx(lnControlCode: Integer; const bstrName: WideString; vProp: OleVariant); dispid 13;
+ procedure GetInfoEx(vProperties: OleVariant; lnReserved: Integer); dispid 14;
+ end;
+ {$endif}
+// *********************************************************************//
+// Interface: IADsFileShare
+// Flags: (4416) Dual OleAutomation Dispatchable
+// GUID: {EB6DCAF0-4B83-11CF-A995-00AA006BC149}
+// *********************************************************************//
+ IADsFileShare = interface(IADs)
+ ['{EB6DCAF0-4B83-11CF-A995-00AA006BC149}']
+ function Get_CurrentUserCount: Integer; safecall;
+ function Get_Description: WideString; safecall;
+ procedure Set_Description(const retval: WideString); safecall;
+ function Get_HostComputer: WideString; safecall;
+ procedure Set_HostComputer(const retval: WideString); safecall;
+ function Get_Path: WideString; safecall;
+ procedure Set_Path(const retval: WideString); safecall;
+ function Get_MaxUserCount: Integer; safecall;
+ procedure Set_MaxUserCount(retval: Integer); safecall;
+ property CurrentUserCount: Integer read Get_CurrentUserCount;
+ property Description: WideString read Get_Description write Set_Description;
+ property HostComputer: WideString read Get_HostComputer write Set_HostComputer;
+ property Path: WideString read Get_Path write Set_Path;
+ property MaxUserCount: Integer read Get_MaxUserCount write Set_MaxUserCount;
+ end;
+
+// *********************************************************************//
+// DispIntf: IADsFileShareDisp
+// Flags: (4416) Dual OleAutomation Dispatchable
+// GUID: {EB6DCAF0-4B83-11CF-A995-00AA006BC149}
+// *********************************************************************//
+ {$ifdef SUPPORTS_DISPINTERFACE}
+ IADsFileShareDisp = dispinterface
+ ['{EB6DCAF0-4B83-11CF-A995-00AA006BC149}']
+ property CurrentUserCount: Integer readonly dispid 15;
+ property Description: WideString dispid 16;
+ property HostComputer: WideString dispid 17;
+ property Path: WideString dispid 18;
+ property MaxUserCount: Integer dispid 19;
+ property Name: WideString readonly dispid 2;
+ property Class_: WideString readonly dispid 3;
+ property GUID: WideString readonly dispid 4;
+ property ADsPath: WideString readonly dispid 5;
+ property Parent: WideString readonly dispid 6;
+ property Schema: WideString readonly dispid 7;
+ procedure GetInfo; dispid 8;
+ procedure SetInfo; dispid 9;
+ function Get(const bstrName: WideString): OleVariant; dispid 10;
+ procedure Put(const bstrName: WideString; vProp: OleVariant); dispid 11;
+ function GetEx(const bstrName: WideString): OleVariant; dispid 12;
+ procedure PutEx(lnControlCode: Integer; const bstrName: WideString; vProp: OleVariant); dispid 13;
+ procedure GetInfoEx(vProperties: OleVariant; lnReserved: Integer); dispid 14;
+ end;
+ {$endif}
+
+// *********************************************************************//
+// Interface: IADsSession
+// Flags: (4416) Dual OleAutomation Dispatchable
+// GUID: {398B7DA0-4AAB-11CF-AE2C-00AA006EBFB9}
+// *********************************************************************//
+ IADsSession = interface(IADs)
+ ['{398B7DA0-4AAB-11CF-AE2C-00AA006EBFB9}']
+ function Get_User: WideString; safecall;
+ function Get_UserPath: WideString; safecall;
+ function Get_Computer: WideString; safecall;
+ function Get_ComputerPath: WideString; safecall;
+ function Get_ConnectTime: Integer; safecall;
+ function Get_IdleTime: Integer; safecall;
+ property User: WideString read Get_User;
+ property UserPath: WideString read Get_UserPath;
+ property Computer: WideString read Get_Computer;
+ property ComputerPath: WideString read Get_ComputerPath;
+ property ConnectTime: Integer read Get_ConnectTime;
+ property IdleTime: Integer read Get_IdleTime;
+ end;
+
+// *********************************************************************//
+// DispIntf: IADsSessionDisp
+// Flags: (4416) Dual OleAutomation Dispatchable
+// GUID: {398B7DA0-4AAB-11CF-AE2C-00AA006EBFB9}
+// *********************************************************************//
+ {$ifdef SUPPORTS_DISPINTERFACE}
+ IADsSessionDisp = dispinterface
+ ['{398B7DA0-4AAB-11CF-AE2C-00AA006EBFB9}']
+ property User: WideString readonly dispid 15;
+ property UserPath: WideString readonly dispid 16;
+ property Computer: WideString readonly dispid 17;
+ property ComputerPath: WideString readonly dispid 18;
+ property ConnectTime: Integer readonly dispid 19;
+ property IdleTime: Integer readonly dispid 20;
+ property Name: WideString readonly dispid 2;
+ property Class_: WideString readonly dispid 3;
+ property GUID: WideString readonly dispid 4;
+ property ADsPath: WideString readonly dispid 5;
+ property Parent: WideString readonly dispid 6;
+ property Schema: WideString readonly dispid 7;
+ procedure GetInfo; dispid 8;
+ procedure SetInfo; dispid 9;
+ function Get(const bstrName: WideString): OleVariant; dispid 10;
+ procedure Put(const bstrName: WideString; vProp: OleVariant); dispid 11;
+ function GetEx(const bstrName: WideString): OleVariant; dispid 12;
+ procedure PutEx(lnControlCode: Integer; const bstrName: WideString; vProp: OleVariant); dispid 13;
+ procedure GetInfoEx(vProperties: OleVariant; lnReserved: Integer); dispid 14;
+ end;
+ {$endif}
+// *********************************************************************//
+// Interface: IADsResource
+// Flags: (4416) Dual OleAutomation Dispatchable
+// GUID: {34A05B20-4AAB-11CF-AE2C-00AA006EBFB9}
+// *********************************************************************//
+ IADsResource = interface(IADs)
+ ['{34A05B20-4AAB-11CF-AE2C-00AA006EBFB9}']
+ function Get_User: WideString; safecall;
+ function Get_UserPath: WideString; safecall;
+ function Get_Path: WideString; safecall;
+ function Get_LockCount: Integer; safecall;
+ property User: WideString read Get_User;
+ property UserPath: WideString read Get_UserPath;
+ property Path: WideString read Get_Path;
+ property LockCount: Integer read Get_LockCount;
+ end;
+
+// *********************************************************************//
+// DispIntf: IADsResourceDisp
+// Flags: (4416) Dual OleAutomation Dispatchable
+// GUID: {34A05B20-4AAB-11CF-AE2C-00AA006EBFB9}
+// *********************************************************************//
+ {$ifdef SUPPORTS_DISPINTERFACE}
+ IADsResourceDisp = dispinterface
+ ['{34A05B20-4AAB-11CF-AE2C-00AA006EBFB9}']
+ property User: WideString readonly dispid 15;
+ property UserPath: WideString readonly dispid 16;
+ property Path: WideString readonly dispid 17;
+ property LockCount: Integer readonly dispid 18;
+ property Name: WideString readonly dispid 2;
+ property Class_: WideString readonly dispid 3;
+ property GUID: WideString readonly dispid 4;
+ property ADsPath: WideString readonly dispid 5;
+ property Parent: WideString readonly dispid 6;
+ property Schema: WideString readonly dispid 7;
+ procedure GetInfo; dispid 8;
+ procedure SetInfo; dispid 9;
+ function Get(const bstrName: WideString): OleVariant; dispid 10;
+ procedure Put(const bstrName: WideString; vProp: OleVariant); dispid 11;
+ function GetEx(const bstrName: WideString): OleVariant; dispid 12;
+ procedure PutEx(lnControlCode: Integer; const bstrName: WideString; vProp: OleVariant); dispid 13;
+ procedure GetInfoEx(vProperties: OleVariant; lnReserved: Integer); dispid 14;
+ end;
+ {$endif}
+// *********************************************************************//
+// Interface: IADsOpenDSObject
+// Flags: (4416) Dual OleAutomation Dispatchable
+// GUID: {DDF2891E-0F9C-11D0-8AD4-00C04FD8D503}
+// *********************************************************************//
+ IADsOpenDSObject = interface(IDispatch)
+ ['{DDF2891E-0F9C-11D0-8AD4-00C04FD8D503}']
+ function OpenDSObject(const lpszDNName: WideString; const lpszUserName: WideString;
+ const lpszPassword: WideString; lnReserved: Integer): IDispatch; safecall;
+ end;
+
+// *********************************************************************//
+// DispIntf: IADsOpenDSObjectDisp
+// Flags: (4416) Dual OleAutomation Dispatchable
+// GUID: {DDF2891E-0F9C-11D0-8AD4-00C04FD8D503}
+// *********************************************************************//
+ {$ifdef SUPPORTS_DISPINTERFACE}
+ IADsOpenDSObjectDisp = dispinterface
+ ['{DDF2891E-0F9C-11D0-8AD4-00C04FD8D503}']
+ function OpenDSObject(const lpszDNName: WideString; const lpszUserName: WideString;
+ const lpszPassword: WideString; lnReserved: Integer): IDispatch; dispid 1;
+ end;
+ {$endif}
+// *********************************************************************//
+// Interface: IDirectoryObject
+// Flags: (0)
+// GUID: {E798DE2C-22E4-11D0-84FE-00C04FD8D503}
+// *********************************************************************//
+ IDirectoryObject = interface(IUnknown)
+ ['{E798DE2C-22E4-11D0-84FE-00C04FD8D503}']
+ function GetObjectInformation(out ppObjInfo: PUserType11): HResult; stdcall;
+ function GetObjectAttributes(var pAttributeNames: PWideChar; dwNumberAttributes: LongWord;
+ out ppAttributeEntries: PUserType12;
+ out pdwNumAttributesReturned: LongWord): HResult; stdcall;
+ function SetObjectAttributes(var pAttributeEntries: _ads_attr_info; dwNumAttributes: LongWord;
+ out pdwNumAttributesModified: LongWord): HResult; stdcall;
+ function CreateDSObject(pszRDNName: PWideChar; var pAttributeEntries: _ads_attr_info;
+ dwNumAttributes: LongWord; out ppObject: IDispatch): HResult; stdcall;
+ function DeleteDSObject(pszRDNName: PWideChar): HResult; stdcall;
+ end;
+
+// *********************************************************************//
+// Interface: IDirectorySearch
+// Flags: (0)
+// GUID: {109BA8EC-92F0-11D0-A790-00C04FD8D5A8}
+// *********************************************************************//
+ IDirectorySearch = interface(IUnknown)
+ ['{109BA8EC-92F0-11D0-A790-00C04FD8D5A8}']
+ function SetSearchPreference(var pSearchPrefs: ads_searchpref_info; dwNumPrefs: LongWord): HResult; stdcall;
+ function ExecuteSearch(pszSearchFilter: PWideChar; var pAttributeNames: PWideChar;
+ dwNumberAttributes: LongWord; out phSearchResult: Pointer): HResult; stdcall;
+ function AbandonSearch(var phSearchResult: Pointer): HResult; stdcall;
+ function GetFirstRow(var hSearchResult: Pointer): HResult; stdcall;
+ function GetNextRow(var hSearchResult: Pointer): HResult; stdcall;
+ function GetPreviousRow(var hSearchResult: Pointer): HResult; stdcall;
+ function GetNextColumnName(var hSearchHandle: Pointer; out ppszColumnName: PWideChar): HResult; stdcall;
+ function GetColumn(var hSearchResult: Pointer; szColumnName: PWideChar;
+ out pSearchColumn: ads_search_column): HResult; stdcall;
+ function FreeColumn(var pSearchColumn: ads_search_column): HResult; stdcall;
+ function CloseSearchHandle(var hSearchResult: Pointer): HResult; stdcall;
+ end;
+
+// *********************************************************************//
+// Interface: IDirectorySchemaMgmt
+// Flags: (0)
+// GUID: {75DB3B9C-A4D8-11D0-A79C-00C04FD8D5A8}
+// *********************************************************************//
+ IDirectorySchemaMgmt = interface(IUnknown)
+ ['{75DB3B9C-A4D8-11D0-A79C-00C04FD8D5A8}']
+ function EnumAttributes(var ppszAttrNames: PWideChar; dwNumAttributes: LongWord;
+ ppAttrDefinition: PPUserType1; var pdwNumAttributes: LongWord): HResult; stdcall;
+ function CreateAttributeDefinition(pszAttributeName: PWideChar;
+ var pAttributeDefinition: _ads_attr_def): HResult; stdcall;
+ function WriteAttributeDefinition(pszAttributeName: PWideChar;
+ var pAttributeDefinition: _ads_attr_def): HResult; stdcall;
+ function DeleteAttributeDefinition(pszAttributeName: PWideChar): HResult; stdcall;
+ function EnumClasses(var ppszClassNames: PWideChar; dwNumClasses: LongWord;
+ ppClassDefinition: PPUserType2; var pdwNumClasses: LongWord): HResult; stdcall;
+ function WriteClassDefinition(pszClassName: PWideChar; var pClassDefinition: _ads_class_def): HResult; stdcall;
+ function CreateClassDefinition(pszClassName: PWideChar; var pClassDefinition: _ads_class_def): HResult; stdcall;
+ function DeleteClassDefinition(pszClassName: PWideChar): HResult; stdcall;
+ end;
+
+// *********************************************************************//
+// Interface: IADsAggregatee
+// Flags: (0)
+// GUID: {1346CE8C-9039-11D0-8528-00C04FD8D503}
+// *********************************************************************//
+ IADsAggregatee = interface(IUnknown)
+ ['{1346CE8C-9039-11D0-8528-00C04FD8D503}']
+ function ConnectAsAggregatee(const pOuterUnknown: IUnknown): HResult; stdcall;
+ function DisconnectAsAggregatee: HResult; stdcall;
+ function RelinquishInterface(var riid: TGUID): HResult; stdcall;
+ function RestoreInterface(var riid: TGUID): HResult; stdcall;
+ end;
+
+// *********************************************************************//
+// Interface: IADsAggregator
+// Flags: (0)
+// GUID: {52DB5FB0-941F-11D0-8529-00C04FD8D503}
+// *********************************************************************//
+ IADsAggregator = interface(IUnknown)
+ ['{52DB5FB0-941F-11D0-8529-00C04FD8D503}']
+ function ConnectAsAggregator(const pAggregatee: IUnknown): HResult; stdcall;
+ function DisconnectAsAggregator: HResult; stdcall;
+ end;
+
+// *********************************************************************//
+// Interface: IADsAccessControlEntry
+// Flags: (4416) Dual OleAutomation Dispatchable
+// GUID: {B4F3A14C-9BDD-11D0-852C-00C04FD8D503}
+// *********************************************************************//
+ IADsAccessControlEntry = interface(IDispatch)
+ ['{B4F3A14C-9BDD-11D0-852C-00C04FD8D503}']
+ function Get_AccessMask: Integer; safecall;
+ procedure Set_AccessMask(retval: Integer); safecall;
+ function Get_AceType: Integer; safecall;
+ procedure Set_AceType(retval: Integer); safecall;
+ function Get_AceFlags: Integer; safecall;
+ procedure Set_AceFlags(retval: Integer); safecall;
+ function Get_Flags: Integer; safecall;
+ procedure Set_Flags(retval: Integer); safecall;
+ function Get_ObjectType: WideString; safecall;
+ procedure Set_ObjectType(const retval: WideString); safecall;
+ function Get_InheritedObjectType: WideString; safecall;
+ procedure Set_InheritedObjectType(const retval: WideString); safecall;
+ function Get_Trustee: WideString; safecall;
+ procedure Set_Trustee(const retval: WideString); safecall;
+ property AccessMask: Integer read Get_AccessMask write Set_AccessMask;
+ property AceType: Integer read Get_AceType write Set_AceType;
+ property AceFlags: Integer read Get_AceFlags write Set_AceFlags;
+ property Flags: Integer read Get_Flags write Set_Flags;
+ property ObjectType: WideString read Get_ObjectType write Set_ObjectType;
+ property InheritedObjectType: WideString read Get_InheritedObjectType write Set_InheritedObjectType;
+ property Trustee: WideString read Get_Trustee write Set_Trustee;
+ end;
+
+// *********************************************************************//
+// DispIntf: IADsAccessControlEntryDisp
+// Flags: (4416) Dual OleAutomation Dispatchable
+// GUID: {B4F3A14C-9BDD-11D0-852C-00C04FD8D503}
+// *********************************************************************//
+ {$ifdef SUPPORTS_DISPINTERFACE}
+ IADsAccessControlEntryDisp = dispinterface
+ ['{B4F3A14C-9BDD-11D0-852C-00C04FD8D503}']
+ property AccessMask: Integer dispid 2;
+ property AceType: Integer dispid 3;
+ property AceFlags: Integer dispid 4;
+ property Flags: Integer dispid 5;
+ property ObjectType: WideString dispid 6;
+ property InheritedObjectType: WideString dispid 7;
+ property Trustee: WideString dispid 8;
+ end;
+ {$endif}
+// *********************************************************************//
+// Interface: IADsAccessControlList
+// Flags: (4416) Dual OleAutomation Dispatchable
+// GUID: {B7EE91CC-9BDD-11D0-852C-00C04FD8D503}
+// *********************************************************************//
+ IADsAccessControlList = interface(IDispatch)
+ ['{B7EE91CC-9BDD-11D0-852C-00C04FD8D503}']
+ function Get_AclRevision: Integer; safecall;
+ procedure Set_AclRevision(retval: Integer); safecall;
+ function Get_AceCount: Integer; safecall;
+ procedure Set_AceCount(retval: Integer); safecall;
+ procedure AddAce(const pAccessControlEntry: IDispatch); safecall;
+ procedure RemoveAce(const pAccessControlEntry: IDispatch); safecall;
+ function CopyAccessList: IDispatch; safecall;
+ function Get__NewEnum: IUnknown; safecall;
+ property AclRevision: Integer read Get_AclRevision write Set_AclRevision;
+ property AceCount: Integer read Get_AceCount write Set_AceCount;
+ property _NewEnum: IUnknown read Get__NewEnum;
+ end;
+
+// *********************************************************************//
+// DispIntf: IADsAccessControlListDisp
+// Flags: (4416) Dual OleAutomation Dispatchable
+// GUID: {B7EE91CC-9BDD-11D0-852C-00C04FD8D503}
+// *********************************************************************//
+ {$ifdef SUPPORTS_DISPINTERFACE}
+ IADsAccessControlListDisp = dispinterface
+ ['{B7EE91CC-9BDD-11D0-852C-00C04FD8D503}']
+ property AclRevision: Integer dispid 3;
+ property AceCount: Integer dispid 4;
+ procedure AddAce(const pAccessControlEntry: IDispatch); dispid 5;
+ procedure RemoveAce(const pAccessControlEntry: IDispatch); dispid 6;
+ function CopyAccessList: IDispatch; dispid 7;
+ property _NewEnum: IUnknown readonly dispid -4;
+ end;
+ {$endif}
+// *********************************************************************//
+// Interface: IADsSecurityDescriptor
+// Flags: (4416) Dual OleAutomation Dispatchable
+// GUID: {B8C787CA-9BDD-11D0-852C-00C04FD8D503}
+// *********************************************************************//
+ IADsSecurityDescriptor = interface(IDispatch)
+ ['{B8C787CA-9BDD-11D0-852C-00C04FD8D503}']
+ function Get_Revision: Integer; safecall;
+ procedure Set_Revision(retval: Integer); safecall;
+ function Get_Control: Integer; safecall;
+ procedure Set_Control(retval: Integer); safecall;
+ function Get_Owner: WideString; safecall;
+ procedure Set_Owner(const retval: WideString); safecall;
+ function Get_OwnerDefaulted: WordBool; safecall;
+ procedure Set_OwnerDefaulted(retval: WordBool); safecall;
+ function Get_Group: WideString; safecall;
+ procedure Set_Group(const retval: WideString); safecall;
+ function Get_GroupDefaulted: WordBool; safecall;
+ procedure Set_GroupDefaulted(retval: WordBool); safecall;
+ function Get_DiscretionaryAcl: IDispatch; safecall;
+ procedure Set_DiscretionaryAcl(const retval: IDispatch); safecall;
+ function Get_DaclDefaulted: WordBool; safecall;
+ procedure Set_DaclDefaulted(retval: WordBool); safecall;
+ function Get_SystemAcl: IDispatch; safecall;
+ procedure Set_SystemAcl(const retval: IDispatch); safecall;
+ function Get_SaclDefaulted: WordBool; safecall;
+ procedure Set_SaclDefaulted(retval: WordBool); safecall;
+ function CopySecurityDescriptor: IDispatch; safecall;
+ property Revision: Integer read Get_Revision write Set_Revision;
+ property Control: Integer read Get_Control write Set_Control;
+ property Owner: WideString read Get_Owner write Set_Owner;
+ property OwnerDefaulted: WordBool read Get_OwnerDefaulted write Set_OwnerDefaulted;
+ property Group: WideString read Get_Group write Set_Group;
+ property GroupDefaulted: WordBool read Get_GroupDefaulted write Set_GroupDefaulted;
+ property DiscretionaryAcl: IDispatch read Get_DiscretionaryAcl write Set_DiscretionaryAcl;
+ property DaclDefaulted: WordBool read Get_DaclDefaulted write Set_DaclDefaulted;
+ property SystemAcl: IDispatch read Get_SystemAcl write Set_SystemAcl;
+ property SaclDefaulted: WordBool read Get_SaclDefaulted write Set_SaclDefaulted;
+ end;
+
+// *********************************************************************//
+// DispIntf: IADsSecurityDescriptorDisp
+// Flags: (4416) Dual OleAutomation Dispatchable
+// GUID: {B8C787CA-9BDD-11D0-852C-00C04FD8D503}
+// *********************************************************************//
+ {$ifdef SUPPORTS_DISPINTERFACE}
+ IADsSecurityDescriptorDisp = dispinterface
+ ['{B8C787CA-9BDD-11D0-852C-00C04FD8D503}']
+ property Revision: Integer dispid 2;
+ property Control: Integer dispid 3;
+ property Owner: WideString dispid 4;
+ property OwnerDefaulted: WordBool dispid 5;
+ property Group: WideString dispid 6;
+ property GroupDefaulted: WordBool dispid 7;
+ property DiscretionaryAcl: IDispatch dispid 8;
+ property DaclDefaulted: WordBool dispid 9;
+ property SystemAcl: IDispatch dispid 10;
+ property SaclDefaulted: WordBool dispid 11;
+ function CopySecurityDescriptor: IDispatch; dispid 12;
+ end;
+ {$endif}
+// *********************************************************************//
+// Interface: IADsLargeInteger
+// Flags: (4416) Dual OleAutomation Dispatchable
+// GUID: {9068270B-0939-11D1-8BE1-00C04FD8D503}
+// *********************************************************************//
+ IADsLargeInteger = interface(IDispatch)
+ ['{9068270B-0939-11D1-8BE1-00C04FD8D503}']
+ function Get_HighPart: Integer; safecall;
+ procedure Set_HighPart(retval: Integer); safecall;
+ function Get_LowPart: Integer; safecall;
+ procedure Set_LowPart(retval: Integer); safecall;
+ property HighPart: Integer read Get_HighPart write Set_HighPart;
+ property LowPart: Integer read Get_LowPart write Set_LowPart;
+ end;
+
+// *********************************************************************//
+// DispIntf: IADsLargeIntegerDisp
+// Flags: (4416) Dual OleAutomation Dispatchable
+// GUID: {9068270B-0939-11D1-8BE1-00C04FD8D503}
+// *********************************************************************//
+ {$ifdef SUPPORTS_DISPINTERFACE}
+ IADsLargeIntegerDisp = dispinterface
+ ['{9068270B-0939-11D1-8BE1-00C04FD8D503}']
+ property HighPart: Integer dispid 2;
+ property LowPart: Integer dispid 3;
+ end;
+ {$endif}
+// *********************************************************************//
+// Interface: IADsNameTranslate
+// Flags: (4416) Dual OleAutomation Dispatchable
+// GUID: {B1B272A3-3625-11D1-A3A4-00C04FB950DC}
+// *********************************************************************//
+ IADsNameTranslate = interface(IDispatch)
+ ['{B1B272A3-3625-11D1-A3A4-00C04FB950DC}']
+ procedure Set_ChaseReferral(Param1: Integer); safecall;
+ procedure Init(lnSetType: Integer; const bstrADsPath: WideString); safecall;
+ procedure InitEx(lnSetType: Integer; const bstrADsPath: WideString;
+ const bstrUserID: WideString; const bstrDomain: WideString;
+ const bstrPassword: WideString); safecall;
+ procedure Set_(lnSetType: Integer; const bstrADsPath: WideString); safecall;
+ function Get(lnFormatType: Integer): WideString; safecall;
+ procedure SetEx(lnFormatType: Integer; pVar: OleVariant); safecall;
+ function GetEx(lnFormatType: Integer): OleVariant; safecall;
+ property ChaseReferral: Integer write Set_ChaseReferral;
+ end;
+
+// *********************************************************************//
+// DispIntf: IADsNameTranslateDisp
+// Flags: (4416) Dual OleAutomation Dispatchable
+// GUID: {B1B272A3-3625-11D1-A3A4-00C04FB950DC}
+// *********************************************************************//
+ {$ifdef SUPPORTS_DISPINTERFACE}
+ IADsNameTranslateDisp = dispinterface
+ ['{B1B272A3-3625-11D1-A3A4-00C04FB950DC}']
+ property ChaseReferral: Integer writeonly dispid 1;
+ procedure Init(lnSetType: Integer; const bstrADsPath: WideString); dispid 2;
+ procedure InitEx(lnSetType: Integer; const bstrADsPath: WideString;
+ const bstrUserID: WideString; const bstrDomain: WideString;
+ const bstrPassword: WideString); dispid 3;
+ procedure Set_(lnSetType: Integer; const bstrADsPath: WideString); dispid 4;
+ function Get(lnFormatType: Integer): WideString; dispid 5;
+ procedure SetEx(lnFormatType: Integer; pVar: OleVariant); dispid 6;
+ function GetEx(lnFormatType: Integer): OleVariant; dispid 7;
+ end;
+ {$endif}
+// *********************************************************************//
+// Interface: IADsCaseIgnoreList
+// Flags: (4416) Dual OleAutomation Dispatchable
+// GUID: {7B66B533-4680-11D1-A3B4-00C04FB950DC}
+// *********************************************************************//
+ IADsCaseIgnoreList = interface(IDispatch)
+ ['{7B66B533-4680-11D1-A3B4-00C04FB950DC}']
+ function Get_CaseIgnoreList: OleVariant; safecall;
+ procedure Set_CaseIgnoreList(retval: OleVariant); safecall;
+ property CaseIgnoreList: OleVariant read Get_CaseIgnoreList write Set_CaseIgnoreList;
+ end;
+
+// *********************************************************************//
+// DispIntf: IADsCaseIgnoreListDisp
+// Flags: (4416) Dual OleAutomation Dispatchable
+// GUID: {7B66B533-4680-11D1-A3B4-00C04FB950DC}
+// *********************************************************************//
+ {$ifdef SUPPORTS_DISPINTERFACE}
+ IADsCaseIgnoreListDisp = dispinterface
+ ['{7B66B533-4680-11D1-A3B4-00C04FB950DC}']
+ property CaseIgnoreList: OleVariant dispid 2;
+ end;
+ {$endif}
+// *********************************************************************//
+// Interface: IADsFaxNumber
+// Flags: (4416) Dual OleAutomation Dispatchable
+// GUID: {A910DEA9-4680-11D1-A3B4-00C04FB950DC}
+// *********************************************************************//
+ IADsFaxNumber = interface(IDispatch)
+ ['{A910DEA9-4680-11D1-A3B4-00C04FB950DC}']
+ function Get_TelephoneNumber: WideString; safecall;
+ procedure Set_TelephoneNumber(const retval: WideString); safecall;
+ function Get_Parameters: OleVariant; safecall;
+ procedure Set_Parameters(retval: OleVariant); safecall;
+ property TelephoneNumber: WideString read Get_TelephoneNumber write Set_TelephoneNumber;
+ property Parameters: OleVariant read Get_Parameters write Set_Parameters;
+ end;
+
+// *********************************************************************//
+// DispIntf: IADsFaxNumberDisp
+// Flags: (4416) Dual OleAutomation Dispatchable
+// GUID: {A910DEA9-4680-11D1-A3B4-00C04FB950DC}
+// *********************************************************************//
+ {$ifdef SUPPORTS_DISPINTERFACE}
+ IADsFaxNumberDisp = dispinterface
+ ['{A910DEA9-4680-11D1-A3B4-00C04FB950DC}']
+ property TelephoneNumber: WideString dispid 2;
+ property Parameters: OleVariant dispid 3;
+ end;
+ {$endif}
+// *********************************************************************//
+// Interface: IADsNetAddress
+// Flags: (4416) Dual OleAutomation Dispatchable
+// GUID: {B21A50A9-4080-11D1-A3AC-00C04FB950DC}
+// *********************************************************************//
+ IADsNetAddress = interface(IDispatch)
+ ['{B21A50A9-4080-11D1-A3AC-00C04FB950DC}']
+ function Get_AddressType: Integer; safecall;
+ procedure Set_AddressType(retval: Integer); safecall;
+ function Get_Address: OleVariant; safecall;
+ procedure Set_Address(retval: OleVariant); safecall;
+ property AddressType: Integer read Get_AddressType write Set_AddressType;
+ property Address: OleVariant read Get_Address write Set_Address;
+ end;
+
+// *********************************************************************//
+// DispIntf: IADsNetAddressDisp
+// Flags: (4416) Dual OleAutomation Dispatchable
+// GUID: {B21A50A9-4080-11D1-A3AC-00C04FB950DC}
+// *********************************************************************//
+ {$ifdef SUPPORTS_DISPINTERFACE}
+ IADsNetAddressDisp = dispinterface
+ ['{B21A50A9-4080-11D1-A3AC-00C04FB950DC}']
+ property AddressType: Integer dispid 2;
+ property Address: OleVariant dispid 3;
+ end;
+ {$endif}
+// *********************************************************************//
+// Interface: IADsOctetList
+// Flags: (4416) Dual OleAutomation Dispatchable
+// GUID: {7B28B80F-4680-11D1-A3B4-00C04FB950DC}
+// *********************************************************************//
+ IADsOctetList = interface(IDispatch)
+ ['{7B28B80F-4680-11D1-A3B4-00C04FB950DC}']
+ function Get_OctetList: OleVariant; safecall;
+ procedure Set_OctetList(retval: OleVariant); safecall;
+ property OctetList: OleVariant read Get_OctetList write Set_OctetList;
+ end;
+
+// *********************************************************************//
+// DispIntf: IADsOctetListDisp
+// Flags: (4416) Dual OleAutomation Dispatchable
+// GUID: {7B28B80F-4680-11D1-A3B4-00C04FB950DC}
+// *********************************************************************//
+ {$ifdef SUPPORTS_DISPINTERFACE}
+ IADsOctetListDisp = dispinterface
+ ['{7B28B80F-4680-11D1-A3B4-00C04FB950DC}']
+ property OctetList: OleVariant dispid 2;
+ end;
+ {$endif}
+// *********************************************************************//
+// Interface: IADsEmail
+// Flags: (4416) Dual OleAutomation Dispatchable
+// GUID: {97AF011A-478E-11D1-A3B4-00C04FB950DC}
+// *********************************************************************//
+ IADsEmail = interface(IDispatch)
+ ['{97AF011A-478E-11D1-A3B4-00C04FB950DC}']
+ function Get_Type_: Integer; safecall;
+ procedure Set_Type_(retval: Integer); safecall;
+ function Get_Address: WideString; safecall;
+ procedure Set_Address(const retval: WideString); safecall;
+ property Type_: Integer read Get_Type_ write Set_Type_;
+ property Address: WideString read Get_Address write Set_Address;
+ end;
+
+// *********************************************************************//
+// DispIntf: IADsEmailDisp
+// Flags: (4416) Dual OleAutomation Dispatchable
+// GUID: {97AF011A-478E-11D1-A3B4-00C04FB950DC}
+// *********************************************************************//
+ {$ifdef SUPPORTS_DISPINTERFACE}
+ IADsEmailDisp = dispinterface
+ ['{97AF011A-478E-11D1-A3B4-00C04FB950DC}']
+ property Type_: Integer dispid 2;
+ property Address: WideString dispid 3;
+ end;
+ {$endif}
+// *********************************************************************//
+// Interface: IADsPath
+// Flags: (4416) Dual OleAutomation Dispatchable
+// GUID: {B287FCD5-4080-11D1-A3AC-00C04FB950DC}
+// *********************************************************************//
+ IADsPath = interface(IDispatch)
+ ['{B287FCD5-4080-11D1-A3AC-00C04FB950DC}']
+ function Get_Type_: Integer; safecall;
+ procedure Set_Type_(retval: Integer); safecall;
+ function Get_VolumeName: WideString; safecall;
+ procedure Set_VolumeName(const retval: WideString); safecall;
+ function Get_Path: WideString; safecall;
+ procedure Set_Path(const retval: WideString); safecall;
+ property Type_: Integer read Get_Type_ write Set_Type_;
+ property VolumeName: WideString read Get_VolumeName write Set_VolumeName;
+ property Path: WideString read Get_Path write Set_Path;
+ end;
+
+// *********************************************************************//
+// DispIntf: IADsPathDisp
+// Flags: (4416) Dual OleAutomation Dispatchable
+// GUID: {B287FCD5-4080-11D1-A3AC-00C04FB950DC}
+// *********************************************************************//
+ {$ifdef SUPPORTS_DISPINTERFACE}
+ IADsPathDisp = dispinterface
+ ['{B287FCD5-4080-11D1-A3AC-00C04FB950DC}']
+ property Type_: Integer dispid 2;
+ property VolumeName: WideString dispid 3;
+ property Path: WideString dispid 4;
+ end;
+ {$endif}
+// *********************************************************************//
+// Interface: IADsReplicaPointer
+// Flags: (4416) Dual OleAutomation Dispatchable
+// GUID: {F60FB803-4080-11D1-A3AC-00C04FB950DC}
+// *********************************************************************//
+ IADsReplicaPointer = interface(IDispatch)
+ ['{F60FB803-4080-11D1-A3AC-00C04FB950DC}']
+ function Get_ServerName: WideString; safecall;
+ procedure Set_ServerName(const retval: WideString); safecall;
+ function Get_ReplicaType: Integer; safecall;
+ procedure Set_ReplicaType(retval: Integer); safecall;
+ function Get_ReplicaNumber: Integer; safecall;
+ procedure Set_ReplicaNumber(retval: Integer); safecall;
+ function Get_Count: Integer; safecall;
+ procedure Set_Count(retval: Integer); safecall;
+ function Get_ReplicaAddressHints: OleVariant; safecall;
+ procedure Set_ReplicaAddressHints(retval: OleVariant); safecall;
+ property ServerName: WideString read Get_ServerName write Set_ServerName;
+ property ReplicaType: Integer read Get_ReplicaType write Set_ReplicaType;
+ property ReplicaNumber: Integer read Get_ReplicaNumber write Set_ReplicaNumber;
+ property Count: Integer read Get_Count write Set_Count;
+ property ReplicaAddressHints: OleVariant read Get_ReplicaAddressHints write Set_ReplicaAddressHints;
+ end;
+
+// *********************************************************************//
+// DispIntf: IADsReplicaPointerDisp
+// Flags: (4416) Dual OleAutomation Dispatchable
+// GUID: {F60FB803-4080-11D1-A3AC-00C04FB950DC}
+// *********************************************************************//
+ {$ifdef SUPPORTS_DISPINTERFACE}
+ IADsReplicaPointerDisp = dispinterface
+ ['{F60FB803-4080-11D1-A3AC-00C04FB950DC}']
+ property ServerName: WideString dispid 2;
+ property ReplicaType: Integer dispid 3;
+ property ReplicaNumber: Integer dispid 4;
+ property Count: Integer dispid 5;
+ property ReplicaAddressHints: OleVariant dispid 6;
+ end;
+ {$endif}
+// *********************************************************************//
+// Interface: IADsAcl
+// Flags: (4416) Dual OleAutomation Dispatchable
+// GUID: {8452D3AB-0869-11D1-A377-00C04FB950DC}
+// *********************************************************************//
+ IADsAcl = interface(IDispatch)
+ ['{8452D3AB-0869-11D1-A377-00C04FB950DC}']
+ function Get_ProtectedAttrName: WideString; safecall;
+ procedure Set_ProtectedAttrName(const retval: WideString); safecall;
+ function Get_SubjectName: WideString; safecall;
+ procedure Set_SubjectName(const retval: WideString); safecall;
+ function Get_Privileges: Integer; safecall;
+ procedure Set_Privileges(retval: Integer); safecall;
+ function CopyAcl: IDispatch; safecall;
+ property ProtectedAttrName: WideString read Get_ProtectedAttrName write Set_ProtectedAttrName;
+ property SubjectName: WideString read Get_SubjectName write Set_SubjectName;
+ property Privileges: Integer read Get_Privileges write Set_Privileges;
+ end;
+
+// *********************************************************************//
+// DispIntf: IADsAclDisp
+// Flags: (4416) Dual OleAutomation Dispatchable
+// GUID: {8452D3AB-0869-11D1-A377-00C04FB950DC}
+// *********************************************************************//
+ {$ifdef SUPPORTS_DISPINTERFACE}
+ IADsAclDisp = dispinterface
+ ['{8452D3AB-0869-11D1-A377-00C04FB950DC}']
+ property ProtectedAttrName: WideString dispid 2;
+ property SubjectName: WideString dispid 3;
+ property Privileges: Integer dispid 4;
+ function CopyAcl: IDispatch; dispid 5;
+ end;
+ {$endif}
+// *********************************************************************//
+// Interface: IADsTimestamp
+// Flags: (4416) Dual OleAutomation Dispatchable
+// GUID: {B2F5A901-4080-11D1-A3AC-00C04FB950DC}
+// *********************************************************************//
+ IADsTimestamp = interface(IDispatch)
+ ['{B2F5A901-4080-11D1-A3AC-00C04FB950DC}']
+ function Get_WholeSeconds: Integer; safecall;
+ procedure Set_WholeSeconds(retval: Integer); safecall;
+ function Get_EventID: Integer; safecall;
+ procedure Set_EventID(retval: Integer); safecall;
+ property WholeSeconds: Integer read Get_WholeSeconds write Set_WholeSeconds;
+ property EventID: Integer read Get_EventID write Set_EventID;
+ end;
+
+// *********************************************************************//
+// DispIntf: IADsTimestampDisp
+// Flags: (4416) Dual OleAutomation Dispatchable
+// GUID: {B2F5A901-4080-11D1-A3AC-00C04FB950DC}
+// *********************************************************************//
+ {$ifdef SUPPORTS_DISPINTERFACE}
+ IADsTimestampDisp = dispinterface
+ ['{B2F5A901-4080-11D1-A3AC-00C04FB950DC}']
+ property WholeSeconds: Integer dispid 2;
+ property EventID: Integer dispid 3;
+ end;
+ {$endif}
+// *********************************************************************//
+// Interface: IADsPostalAddress
+// Flags: (4416) Dual OleAutomation Dispatchable
+// GUID: {7ADECF29-4680-11D1-A3B4-00C04FB950DC}
+// *********************************************************************//
+ IADsPostalAddress = interface(IDispatch)
+ ['{7ADECF29-4680-11D1-A3B4-00C04FB950DC}']
+ function Get_PostalAddress: OleVariant; safecall;
+ procedure Set_PostalAddress(retval: OleVariant); safecall;
+ property PostalAddress: OleVariant read Get_PostalAddress write Set_PostalAddress;
+ end;
+
+// *********************************************************************//
+// DispIntf: IADsPostalAddressDisp
+// Flags: (4416) Dual OleAutomation Dispatchable
+// GUID: {7ADECF29-4680-11D1-A3B4-00C04FB950DC}
+// *********************************************************************//
+ {$ifdef SUPPORTS_DISPINTERFACE}
+ IADsPostalAddressDisp = dispinterface
+ ['{7ADECF29-4680-11D1-A3B4-00C04FB950DC}']
+ property PostalAddress: OleVariant dispid 2;
+ end;
+ {$endif}
+// *********************************************************************//
+// Interface: IADsBackLink
+// Flags: (4416) Dual OleAutomation Dispatchable
+// GUID: {FD1302BD-4080-11D1-A3AC-00C04FB950DC}
+// *********************************************************************//
+ IADsBackLink = interface(IDispatch)
+ ['{FD1302BD-4080-11D1-A3AC-00C04FB950DC}']
+ function Get_RemoteID: Integer; safecall;
+ procedure Set_RemoteID(retval: Integer); safecall;
+ function Get_ObjectName: WideString; safecall;
+ procedure Set_ObjectName(const retval: WideString); safecall;
+ property RemoteID: Integer read Get_RemoteID write Set_RemoteID;
+ property ObjectName: WideString read Get_ObjectName write Set_ObjectName;
+ end;
+
+// *********************************************************************//
+// DispIntf: IADsBackLinkDisp
+// Flags: (4416) Dual OleAutomation Dispatchable
+// GUID: {FD1302BD-4080-11D1-A3AC-00C04FB950DC}
+// *********************************************************************//
+ {$ifdef SUPPORTS_DISPINTERFACE}
+ IADsBackLinkDisp = dispinterface
+ ['{FD1302BD-4080-11D1-A3AC-00C04FB950DC}']
+ property RemoteID: Integer dispid 2;
+ property ObjectName: WideString dispid 3;
+ end;
+ {$endif}
+// *********************************************************************//
+// Interface: IADsTypedName
+// Flags: (4416) Dual OleAutomation Dispatchable
+// GUID: {B371A349-4080-11D1-A3AC-00C04FB950DC}
+// *********************************************************************//
+ IADsTypedName = interface(IDispatch)
+ ['{B371A349-4080-11D1-A3AC-00C04FB950DC}']
+ function Get_ObjectName: WideString; safecall;
+ procedure Set_ObjectName(const retval: WideString); safecall;
+ function Get_Level: Integer; safecall;
+ procedure Set_Level(retval: Integer); safecall;
+ function Get_Interval: Integer; safecall;
+ procedure Set_Interval(retval: Integer); safecall;
+ property ObjectName: WideString read Get_ObjectName write Set_ObjectName;
+ property Level: Integer read Get_Level write Set_Level;
+ property Interval: Integer read Get_Interval write Set_Interval;
+ end;
+
+// *********************************************************************//
+// DispIntf: IADsTypedNameDisp
+// Flags: (4416) Dual OleAutomation Dispatchable
+// GUID: {B371A349-4080-11D1-A3AC-00C04FB950DC}
+// *********************************************************************//
+ {$ifdef SUPPORTS_DISPINTERFACE}
+ IADsTypedNameDisp = dispinterface
+ ['{B371A349-4080-11D1-A3AC-00C04FB950DC}']
+ property ObjectName: WideString dispid 2;
+ property Level: Integer dispid 3;
+ property Interval: Integer dispid 4;
+ end;
+ {$endif}
+// *********************************************************************//
+// Interface: IADsHold
+// Flags: (4416) Dual OleAutomation Dispatchable
+// GUID: {B3EB3B37-4080-11D1-A3AC-00C04FB950DC}
+// *********************************************************************//
+ IADsHold = interface(IDispatch)
+ ['{B3EB3B37-4080-11D1-A3AC-00C04FB950DC}']
+ function Get_ObjectName: WideString; safecall;
+ procedure Set_ObjectName(const retval: WideString); safecall;
+ function Get_Amount: Integer; safecall;
+ procedure Set_Amount(retval: Integer); safecall;
+ property ObjectName: WideString read Get_ObjectName write Set_ObjectName;
+ property Amount: Integer read Get_Amount write Set_Amount;
+ end;
+
+// *********************************************************************//
+// DispIntf: IADsHoldDisp
+// Flags: (4416) Dual OleAutomation Dispatchable
+// GUID: {B3EB3B37-4080-11D1-A3AC-00C04FB950DC}
+// *********************************************************************//
+ {$ifdef SUPPORTS_DISPINTERFACE}
+ IADsHoldDisp = dispinterface
+ ['{B3EB3B37-4080-11D1-A3AC-00C04FB950DC}']
+ property ObjectName: WideString dispid 2;
+ property Amount: Integer dispid 3;
+ end;
+ {$endif}
+// *********************************************************************//
+// Interface: IADsObjectOptions
+// Flags: (4416) Dual OleAutomation Dispatchable
+// GUID: {46F14FDA-232B-11D1-A808-00C04FD8D5A8}
+// *********************************************************************//
+ IADsObjectOptions = interface(IDispatch)
+ ['{46F14FDA-232B-11D1-A808-00C04FD8D5A8}']
+ function GetOption(lnOption: Integer): OleVariant; safecall;
+ procedure SetOption(lnOption: Integer; vValue: OleVariant); safecall;
+ end;
+
+// *********************************************************************//
+// DispIntf: IADsObjectOptionsDisp
+// Flags: (4416) Dual OleAutomation Dispatchable
+// GUID: {46F14FDA-232B-11D1-A808-00C04FD8D5A8}
+// *********************************************************************//
+ {$ifdef SUPPORTS_DISPINTERFACE}
+ IADsObjectOptionsDisp = dispinterface
+ ['{46F14FDA-232B-11D1-A808-00C04FD8D5A8}']
+ function GetOption(lnOption: Integer): OleVariant; dispid 2;
+ procedure SetOption(lnOption: Integer; vValue: OleVariant); dispid 3;
+ end;
+ {$endif}
+// *********************************************************************//
+// Interface: IADsPathname
+// Flags: (4416) Dual OleAutomation Dispatchable
+// GUID: {D592AED4-F420-11D0-A36E-00C04FB950DC}
+// *********************************************************************//
+ IADsPathname = interface(IDispatch)
+ ['{D592AED4-F420-11D0-A36E-00C04FB950DC}']
+ procedure Set_(const bstrADsPath: WideString; lnSetType: Integer); safecall;
+ procedure SetDisplayType(lnDisplayType: Integer); safecall;
+ function Retrieve(lnFormatType: Integer): WideString; safecall;
+ function GetNumElements: Integer; safecall;
+ function GetElement(lnElementIndex: Integer): WideString; safecall;
+ procedure AddLeafElement(const bstrLeafElement: WideString); safecall;
+ procedure RemoveLeafElement; safecall;
+ function CopyPath: IDispatch; safecall;
+ function GetEscapedElement(lnReserved: Integer; const bstrInStr: WideString): WideString; safecall;
+ function Get_EscapedMode: Integer; safecall;
+ procedure Set_EscapedMode(retval: Integer); safecall;
+ property EscapedMode: Integer read Get_EscapedMode write Set_EscapedMode;
+ end;
+
+// *********************************************************************//
+// DispIntf: IADsPathnameDisp
+// Flags: (4416) Dual OleAutomation Dispatchable
+// GUID: {D592AED4-F420-11D0-A36E-00C04FB950DC}
+// *********************************************************************//
+ {$ifdef SUPPORTS_DISPINTERFACE}
+ IADsPathnameDisp = dispinterface
+ ['{D592AED4-F420-11D0-A36E-00C04FB950DC}']
+ procedure Set_(const bstrADsPath: WideString; lnSetType: Integer); dispid 2;
+ procedure SetDisplayType(lnDisplayType: Integer); dispid 3;
+ function Retrieve(lnFormatType: Integer): WideString; dispid 4;
+ function GetNumElements: Integer; dispid 5;
+ function GetElement(lnElementIndex: Integer): WideString; dispid 6;
+ procedure AddLeafElement(const bstrLeafElement: WideString); dispid 7;
+ procedure RemoveLeafElement; dispid 8;
+ function CopyPath: IDispatch; dispid 9;
+ function GetEscapedElement(lnReserved: Integer; const bstrInStr: WideString): WideString; dispid 10;
+ property EscapedMode: Integer dispid 11;
+ end;
+ {$endif}
+// *********************************************************************//
+// Interface: IADsADSystemInfo
+// Flags: (4416) Dual OleAutomation Dispatchable
+// GUID: {5BB11929-AFD1-11D2-9CB9-0000F87A369E}
+// *********************************************************************//
+ IADsADSystemInfo = interface(IDispatch)
+ ['{5BB11929-AFD1-11D2-9CB9-0000F87A369E}']
+ function Get_UserName: WideString; safecall;
+ function Get_ComputerName: WideString; safecall;
+ function Get_SiteName: WideString; safecall;
+ function Get_DomainShortName: WideString; safecall;
+ function Get_DomainDNSName: WideString; safecall;
+ function Get_ForestDNSName: WideString; safecall;
+ function Get_PDCRoleOwner: WideString; safecall;
+ function Get_SchemaRoleOwner: WideString; safecall;
+ function Get_IsNativeMode: WordBool; safecall;
+ function GetAnyDCName: WideString; safecall;
+ function GetDCSiteName(const szServer: WideString): WideString; safecall;
+ procedure RefreshSchemaCache; safecall;
+ function GetTrees: OleVariant; safecall;
+ property UserName: WideString read Get_UserName;
+ property ComputerName: WideString read Get_ComputerName;
+ property SiteName: WideString read Get_SiteName;
+ property DomainShortName: WideString read Get_DomainShortName;
+ property DomainDNSName: WideString read Get_DomainDNSName;
+ property ForestDNSName: WideString read Get_ForestDNSName;
+ property PDCRoleOwner: WideString read Get_PDCRoleOwner;
+ property SchemaRoleOwner: WideString read Get_SchemaRoleOwner;
+ property IsNativeMode: WordBool read Get_IsNativeMode;
+ end;
+
+// *********************************************************************//
+// DispIntf: IADsADSystemInfoDisp
+// Flags: (4416) Dual OleAutomation Dispatchable
+// GUID: {5BB11929-AFD1-11D2-9CB9-0000F87A369E}
+// *********************************************************************//
+ {$ifdef SUPPORTS_DISPINTERFACE}
+ IADsADSystemInfoDisp = dispinterface
+ ['{5BB11929-AFD1-11D2-9CB9-0000F87A369E}']
+ property UserName: WideString readonly dispid 2;
+ property ComputerName: WideString readonly dispid 3;
+ property SiteName: WideString readonly dispid 4;
+ property DomainShortName: WideString readonly dispid 5;
+ property DomainDNSName: WideString readonly dispid 6;
+ property ForestDNSName: WideString readonly dispid 7;
+ property PDCRoleOwner: WideString readonly dispid 8;
+ property SchemaRoleOwner: WideString readonly dispid 9;
+ property IsNativeMode: WordBool readonly dispid 10;
+ function GetAnyDCName: WideString; dispid 11;
+ function GetDCSiteName(const szServer: WideString): WideString; dispid 12;
+ procedure RefreshSchemaCache; dispid 13;
+ function GetTrees: OleVariant; dispid 14;
+ end;
+ {$endif}
+// *********************************************************************//
+// Interface: IADsWinNTSystemInfo
+// Flags: (4416) Dual OleAutomation Dispatchable
+// GUID: {6C6D65DC-AFD1-11D2-9CB9-0000F87A369E}
+// *********************************************************************//
+ IADsWinNTSystemInfo = interface(IDispatch)
+ ['{6C6D65DC-AFD1-11D2-9CB9-0000F87A369E}']
+ function Get_UserName: WideString; safecall;
+ function Get_ComputerName: WideString; safecall;
+ function Get_DomainName: WideString; safecall;
+ function Get_PDC: WideString; safecall;
+ property UserName: WideString read Get_UserName;
+ property ComputerName: WideString read Get_ComputerName;
+ property DomainName: WideString read Get_DomainName;
+ property PDC: WideString read Get_PDC;
+ end;
+
+// *********************************************************************//
+// DispIntf: IADsWinNTSystemInfoDisp
+// Flags: (4416) Dual OleAutomation Dispatchable
+// GUID: {6C6D65DC-AFD1-11D2-9CB9-0000F87A369E}
+// *********************************************************************//
+ {$ifdef SUPPORTS_DISPINTERFACE}
+ IADsWinNTSystemInfoDisp = dispinterface
+ ['{6C6D65DC-AFD1-11D2-9CB9-0000F87A369E}']
+ property UserName: WideString readonly dispid 2;
+ property ComputerName: WideString readonly dispid 3;
+ property DomainName: WideString readonly dispid 4;
+ property PDC: WideString readonly dispid 5;
+ end;
+ {$endif}
+// *********************************************************************//
+// Interface: IADsDNWithBinary
+// Flags: (4416) Dual OleAutomation Dispatchable
+// GUID: {7E99C0A2-F935-11D2-BA96-00C04FB6D0D1}
+// *********************************************************************//
+ IADsDNWithBinary = interface(IDispatch)
+ ['{7E99C0A2-F935-11D2-BA96-00C04FB6D0D1}']
+ function Get_BinaryValue: OleVariant; safecall;
+ procedure Set_BinaryValue(retval: OleVariant); safecall;
+ function Get_DNString: WideString; safecall;
+ procedure Set_DNString(const retval: WideString); safecall;
+ property BinaryValue: OleVariant read Get_BinaryValue write Set_BinaryValue;
+ property DNString: WideString read Get_DNString write Set_DNString;
+ end;
+
+// *********************************************************************//
+// DispIntf: IADsDNWithBinaryDisp
+// Flags: (4416) Dual OleAutomation Dispatchable
+// GUID: {7E99C0A2-F935-11D2-BA96-00C04FB6D0D1}
+// *********************************************************************//
+ {$ifdef SUPPORTS_DISPINTERFACE}
+ IADsDNWithBinaryDisp = dispinterface
+ ['{7E99C0A2-F935-11D2-BA96-00C04FB6D0D1}']
+ property BinaryValue: OleVariant dispid 2;
+ property DNString: WideString dispid 3;
+ end;
+ {$endif}
+
+// *********************************************************************//
+// Interface: IADsDNWithString
+// Flags: (4416) Dual OleAutomation Dispatchable
+// GUID: {370DF02E-F934-11D2-BA96-00C04FB6D0D1}
+// *********************************************************************//
+ IADsDNWithString = interface(IDispatch)
+ ['{370DF02E-F934-11D2-BA96-00C04FB6D0D1}']
+ function Get_StringValue: WideString; safecall;
+ procedure Set_StringValue(const retval: WideString); safecall;
+ function Get_DNString: WideString; safecall;
+ procedure Set_DNString(const retval: WideString); safecall;
+ property StringValue: WideString read Get_StringValue write Set_StringValue;
+ property DNString: WideString read Get_DNString write Set_DNString;
+ end;
+
+// *********************************************************************//
+// DispIntf: IADsDNWithStringDisp
+// Flags: (4416) Dual OleAutomation Dispatchable
+// GUID: {370DF02E-F934-11D2-BA96-00C04FB6D0D1}
+// *********************************************************************//
+ {$ifdef SUPPORTS_DISPINTERFACE}
+ IADsDNWithStringDisp = dispinterface
+ ['{370DF02E-F934-11D2-BA96-00C04FB6D0D1}']
+ property StringValue: WideString dispid 2;
+ property DNString: WideString dispid 3;
+ end;
+ {$endif}
+// *********************************************************************//
+// The Class CoPropertyEntry provides a Create and CreateRemote method to
+// create instances of the default interface IADsPropertyEntry exposed by
+// the CoClass PropertyEntry. The functions are intended to be used by
+// clients wishing to automate the CoClass objects exposed by the
+// server of this typelibrary.
+// *********************************************************************//
+ CoPropertyEntry = class
+ class function Create: IADsPropertyEntry;
+ class function CreateRemote(const MachineName: string): IADsPropertyEntry;
+ end;
+
+// *********************************************************************//
+// OLE Server Proxy class declaration
+// Server Object : TPropertyEntry
+// Help String :
+// Default Interface: IADsPropertyEntry
+// Def. Intf. DISP? : No
+// Event Interface:
+// TypeFlags : (2) CanCreate
+// *********************************************************************//
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+ TPropertyEntryProperties= class;
+{$ENDIF}
+ TPropertyEntry = class(TOleServer)
+ private
+ FIntf: IADsPropertyEntry;
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+ FProps: TPropertyEntryProperties;
+ function GetServerProperties: TPropertyEntryProperties;
+{$ENDIF}
+ function GetDefaultInterface: IADsPropertyEntry;
+ protected
+ procedure InitServerData; override;
+ function Get_Name: WideString;
+ procedure Set_Name(const retval: WideString);
+ function Get_ADsType: Integer;
+ procedure Set_ADsType(retval: Integer);
+ function Get_ControlCode: Integer;
+ procedure Set_ControlCode(retval: Integer);
+ function Get_Values: OleVariant;
+ procedure Set_Values(retval: OleVariant);
+ public
+ constructor Create(AOwner: TComponent); override;
+ destructor Destroy; override;
+ procedure Connect; override;
+ procedure ConnectTo(svrIntf: IADsPropertyEntry);
+ procedure Disconnect; override;
+ procedure Clear;
+ property DefaultInterface: IADsPropertyEntry read GetDefaultInterface;
+ property Values: OleVariant read Get_Values write Set_Values;
+ property Name: WideString read Get_Name write Set_Name;
+ property ADsType: Integer read Get_ADsType write Set_ADsType;
+ property ControlCode: Integer read Get_ControlCode write Set_ControlCode;
+ published
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+ property Server: TPropertyEntryProperties read GetServerProperties;
+{$ENDIF}
+ end;
+
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+// *********************************************************************//
+// OLE Server Properties Proxy Class
+// Server Object : TPropertyEntry
+// (This object is used by the IDE's Property Inspector to allow editing
+// of the properties of this server)
+// *********************************************************************//
+ TPropertyEntryProperties = class(TPersistent)
+ private
+ FServer: TPropertyEntry;
+ function GetDefaultInterface: IADsPropertyEntry;
+ constructor Create(AServer: TPropertyEntry);
+ protected
+ function Get_Name: WideString;
+ procedure Set_Name(const retval: WideString);
+ function Get_ADsType: Integer;
+ procedure Set_ADsType(retval: Integer);
+ function Get_ControlCode: Integer;
+ procedure Set_ControlCode(retval: Integer);
+ function Get_Values: OleVariant;
+ procedure Set_Values(retval: OleVariant);
+ public
+ property DefaultInterface: IADsPropertyEntry read GetDefaultInterface;
+ published
+ property Name: WideString read Get_Name write Set_Name;
+ property ADsType: Integer read Get_ADsType write Set_ADsType;
+ property ControlCode: Integer read Get_ControlCode write Set_ControlCode;
+ end;
+{$ENDIF}
+
+// *********************************************************************//
+// The Class CoPropertyValue provides a Create and CreateRemote method to
+// create instances of the default interface IADsPropertyValue exposed by
+// the CoClass PropertyValue. The functions are intended to be used by
+// clients wishing to automate the CoClass objects exposed by the
+// server of this typelibrary.
+// *********************************************************************//
+ CoPropertyValue = class
+ class function Create: IADsPropertyValue;
+ class function CreateRemote(const MachineName: string): IADsPropertyValue;
+ end;
+
+// *********************************************************************//
+// OLE Server Proxy class declaration
+// Server Object : TPropertyValue
+// Help String :
+// Default Interface: IADsPropertyValue
+// Def. Intf. DISP? : No
+// Event Interface:
+// TypeFlags : (2) CanCreate
+// *********************************************************************//
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+ TPropertyValueProperties= class;
+{$ENDIF}
+ TPropertyValue = class(TOleServer)
+ private
+ FIntf: IADsPropertyValue;
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+ FProps: TPropertyValueProperties;
+ function GetServerProperties: TPropertyValueProperties;
+{$ENDIF}
+ function GetDefaultInterface: IADsPropertyValue;
+ protected
+ procedure InitServerData; override;
+ function Get_ADsType: Integer;
+ procedure Set_ADsType(retval: Integer);
+ function Get_DNString: WideString;
+ procedure Set_DNString(const retval: WideString);
+ function Get_CaseExactString: WideString;
+ procedure Set_CaseExactString(const retval: WideString);
+ function Get_CaseIgnoreString: WideString;
+ procedure Set_CaseIgnoreString(const retval: WideString);
+ function Get_PrintableString: WideString;
+ procedure Set_PrintableString(const retval: WideString);
+ function Get_NumericString: WideString;
+ procedure Set_NumericString(const retval: WideString);
+ function Get_Boolean: Integer;
+ procedure Set_Boolean(retval: Integer);
+ function Get_Integer: Integer;
+ procedure Set_Integer(retval: Integer);
+ function Get_OctetString: OleVariant;
+ procedure Set_OctetString(retval: OleVariant);
+ function Get_SecurityDescriptor: IDispatch;
+ procedure Set_SecurityDescriptor(const retval: IDispatch);
+ function Get_LargeInteger: IDispatch;
+ procedure Set_LargeInteger(const retval: IDispatch);
+ function Get_UTCTime: TDateTime;
+ procedure Set_UTCTime(retval: TDateTime);
+ public
+ constructor Create(AOwner: TComponent); override;
+ destructor Destroy; override;
+ procedure Connect; override;
+ procedure ConnectTo(svrIntf: IADsPropertyValue);
+ procedure Disconnect; override;
+ procedure Clear;
+ property DefaultInterface: IADsPropertyValue read GetDefaultInterface;
+ property OctetString: OleVariant read Get_OctetString write Set_OctetString;
+ property SecurityDescriptor: IDispatch read Get_SecurityDescriptor write Set_SecurityDescriptor;
+ property LargeInteger: IDispatch read Get_LargeInteger write Set_LargeInteger;
+ property ADsType: Integer read Get_ADsType write Set_ADsType;
+ property DNString: WideString read Get_DNString write Set_DNString;
+ property CaseExactString: WideString read Get_CaseExactString write Set_CaseExactString;
+ property CaseIgnoreString: WideString read Get_CaseIgnoreString write Set_CaseIgnoreString;
+ property PrintableString: WideString read Get_PrintableString write Set_PrintableString;
+ property NumericString: WideString read Get_NumericString write Set_NumericString;
+ property Boolean: Integer read Get_Boolean write Set_Boolean;
+ property Integer: Integer read Get_Integer write Set_Integer;
+ property UTCTime: TDateTime read Get_UTCTime write Set_UTCTime;
+ published
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+ property Server: TPropertyValueProperties read GetServerProperties;
+{$ENDIF}
+ end;
+
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+// *********************************************************************//
+// OLE Server Properties Proxy Class
+// Server Object : TPropertyValue
+// (This object is used by the IDE's Property Inspector to allow editing
+// of the properties of this server)
+// *********************************************************************//
+ TPropertyValueProperties = class(TPersistent)
+ private
+ FServer: TPropertyValue;
+ function GetDefaultInterface: IADsPropertyValue;
+ constructor Create(AServer: TPropertyValue);
+ protected
+ function Get_ADsType: Integer;
+ procedure Set_ADsType(retval: Integer);
+ function Get_DNString: WideString;
+ procedure Set_DNString(const retval: WideString);
+ function Get_CaseExactString: WideString;
+ procedure Set_CaseExactString(const retval: WideString);
+ function Get_CaseIgnoreString: WideString;
+ procedure Set_CaseIgnoreString(const retval: WideString);
+ function Get_PrintableString: WideString;
+ procedure Set_PrintableString(const retval: WideString);
+ function Get_NumericString: WideString;
+ procedure Set_NumericString(const retval: WideString);
+ function Get_Boolean: Integer;
+ procedure Set_Boolean(retval: Integer);
+ function Get_Integer: Integer;
+ procedure Set_Integer(retval: Integer);
+ function Get_OctetString: OleVariant;
+ procedure Set_OctetString(retval: OleVariant);
+ function Get_SecurityDescriptor: IDispatch;
+ procedure Set_SecurityDescriptor(const retval: IDispatch);
+ function Get_LargeInteger: IDispatch;
+ procedure Set_LargeInteger(const retval: IDispatch);
+ function Get_UTCTime: TDateTime;
+ procedure Set_UTCTime(retval: TDateTime);
+ public
+ property DefaultInterface: IADsPropertyValue read GetDefaultInterface;
+ published
+ property ADsType: Integer read Get_ADsType write Set_ADsType;
+ property DNString: WideString read Get_DNString write Set_DNString;
+ property CaseExactString: WideString read Get_CaseExactString write Set_CaseExactString;
+ property CaseIgnoreString: WideString read Get_CaseIgnoreString write Set_CaseIgnoreString;
+ property PrintableString: WideString read Get_PrintableString write Set_PrintableString;
+ property NumericString: WideString read Get_NumericString write Set_NumericString;
+ property Boolean: Integer read Get_Boolean write Set_Boolean;
+ property Integer: Integer read Get_Integer write Set_Integer;
+ property UTCTime: TDateTime read Get_UTCTime write Set_UTCTime;
+ end;
+{$ENDIF}
+
+// *********************************************************************//
+// The Class CoAccessControlEntry provides a Create and CreateRemote method to
+// create instances of the default interface IADsAccessControlEntry exposed by
+// the CoClass AccessControlEntry. The functions are intended to be used by
+// clients wishing to automate the CoClass objects exposed by the
+// server of this typelibrary.
+// *********************************************************************//
+ CoAccessControlEntry = class
+ class function Create: IADsAccessControlEntry;
+ class function CreateRemote(const MachineName: string): IADsAccessControlEntry;
+ end;
+
+// *********************************************************************//
+// OLE Server Proxy class declaration
+// Server Object : TAccessControlEntry
+// Help String :
+// Default Interface: IADsAccessControlEntry
+// Def. Intf. DISP? : No
+// Event Interface:
+// TypeFlags : (2) CanCreate
+// *********************************************************************//
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+ TAccessControlEntryProperties= class;
+{$ENDIF}
+ TAccessControlEntry = class(TOleServer)
+ private
+ FIntf: IADsAccessControlEntry;
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+ FProps: TAccessControlEntryProperties;
+ function GetServerProperties: TAccessControlEntryProperties;
+{$ENDIF}
+ function GetDefaultInterface: IADsAccessControlEntry;
+ protected
+ procedure InitServerData; override;
+ function Get_AccessMask: Integer;
+ procedure Set_AccessMask(retval: Integer);
+ function Get_AceType: Integer;
+ procedure Set_AceType(retval: Integer);
+ function Get_AceFlags: Integer;
+ procedure Set_AceFlags(retval: Integer);
+ function Get_Flags: Integer;
+ procedure Set_Flags(retval: Integer);
+ function Get_ObjectType: WideString;
+ procedure Set_ObjectType(const retval: WideString);
+ function Get_InheritedObjectType: WideString;
+ procedure Set_InheritedObjectType(const retval: WideString);
+ function Get_Trustee: WideString;
+ procedure Set_Trustee(const retval: WideString);
+ public
+ constructor Create(AOwner: TComponent); override;
+ destructor Destroy; override;
+ procedure Connect; override;
+ procedure ConnectTo(svrIntf: IADsAccessControlEntry);
+ procedure Disconnect; override;
+ property DefaultInterface: IADsAccessControlEntry read GetDefaultInterface;
+ property AccessMask: Integer read Get_AccessMask write Set_AccessMask;
+ property AceType: Integer read Get_AceType write Set_AceType;
+ property AceFlags: Integer read Get_AceFlags write Set_AceFlags;
+ property Flags: Integer read Get_Flags write Set_Flags;
+ property ObjectType: WideString read Get_ObjectType write Set_ObjectType;
+ property InheritedObjectType: WideString read Get_InheritedObjectType write Set_InheritedObjectType;
+ property Trustee: WideString read Get_Trustee write Set_Trustee;
+ published
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+ property Server: TAccessControlEntryProperties read GetServerProperties;
+{$ENDIF}
+ end;
+
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+// *********************************************************************//
+// OLE Server Properties Proxy Class
+// Server Object : TAccessControlEntry
+// (This object is used by the IDE's Property Inspector to allow editing
+// of the properties of this server)
+// *********************************************************************//
+ TAccessControlEntryProperties = class(TPersistent)
+ private
+ FServer: TAccessControlEntry;
+ function GetDefaultInterface: IADsAccessControlEntry;
+ constructor Create(AServer: TAccessControlEntry);
+ protected
+ function Get_AccessMask: Integer;
+ procedure Set_AccessMask(retval: Integer);
+ function Get_AceType: Integer;
+ procedure Set_AceType(retval: Integer);
+ function Get_AceFlags: Integer;
+ procedure Set_AceFlags(retval: Integer);
+ function Get_Flags: Integer;
+ procedure Set_Flags(retval: Integer);
+ function Get_ObjectType: WideString;
+ procedure Set_ObjectType(const retval: WideString);
+ function Get_InheritedObjectType: WideString;
+ procedure Set_InheritedObjectType(const retval: WideString);
+ function Get_Trustee: WideString;
+ procedure Set_Trustee(const retval: WideString);
+ public
+ property DefaultInterface: IADsAccessControlEntry read GetDefaultInterface;
+ published
+ property AccessMask: Integer read Get_AccessMask write Set_AccessMask;
+ property AceType: Integer read Get_AceType write Set_AceType;
+ property AceFlags: Integer read Get_AceFlags write Set_AceFlags;
+ property Flags: Integer read Get_Flags write Set_Flags;
+ property ObjectType: WideString read Get_ObjectType write Set_ObjectType;
+ property InheritedObjectType: WideString read Get_InheritedObjectType write Set_InheritedObjectType;
+ property Trustee: WideString read Get_Trustee write Set_Trustee;
+ end;
+{$ENDIF}
+
+// *********************************************************************//
+// The Class CoAccessControlList provides a Create and CreateRemote method to
+// create instances of the default interface IADsAccessControlList exposed by
+// the CoClass AccessControlList. The functions are intended to be used by
+// clients wishing to automate the CoClass objects exposed by the
+// server of this typelibrary.
+// *********************************************************************//
+ CoAccessControlList = class
+ class function Create: IADsAccessControlList;
+ class function CreateRemote(const MachineName: string): IADsAccessControlList;
+ end;
+
+// *********************************************************************//
+// OLE Server Proxy class declaration
+// Server Object : TAccessControlList
+// Help String :
+// Default Interface: IADsAccessControlList
+// Def. Intf. DISP? : No
+// Event Interface:
+// TypeFlags : (2) CanCreate
+// *********************************************************************//
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+ TAccessControlListProperties= class;
+{$ENDIF}
+ TAccessControlList = class(TOleServer)
+ private
+ FIntf: IADsAccessControlList;
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+ FProps: TAccessControlListProperties;
+ function GetServerProperties: TAccessControlListProperties;
+{$ENDIF}
+ function GetDefaultInterface: IADsAccessControlList;
+ protected
+ procedure InitServerData; override;
+ function Get_AclRevision: Integer;
+ procedure Set_AclRevision(retval: Integer);
+ function Get_AceCount: Integer;
+ procedure Set_AceCount(retval: Integer);
+ public
+ constructor Create(AOwner: TComponent); override;
+ destructor Destroy; override;
+ procedure Connect; override;
+ procedure ConnectTo(svrIntf: IADsAccessControlList);
+ procedure Disconnect; override;
+ procedure AddAce(const pAccessControlEntry: IDispatch);
+ procedure RemoveAce(const pAccessControlEntry: IDispatch);
+ function CopyAccessList: IDispatch;
+ property DefaultInterface: IADsAccessControlList read GetDefaultInterface;
+ property AclRevision: Integer read Get_AclRevision write Set_AclRevision;
+ property AceCount: Integer read Get_AceCount write Set_AceCount;
+ published
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+ property Server: TAccessControlListProperties read GetServerProperties;
+{$ENDIF}
+ end;
+
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+// *********************************************************************//
+// OLE Server Properties Proxy Class
+// Server Object : TAccessControlList
+// (This object is used by the IDE's Property Inspector to allow editing
+// of the properties of this server)
+// *********************************************************************//
+ TAccessControlListProperties = class(TPersistent)
+ private
+ FServer: TAccessControlList;
+ function GetDefaultInterface: IADsAccessControlList;
+ constructor Create(AServer: TAccessControlList);
+ protected
+ function Get_AclRevision: Integer;
+ procedure Set_AclRevision(retval: Integer);
+ function Get_AceCount: Integer;
+ procedure Set_AceCount(retval: Integer);
+ public
+ property DefaultInterface: IADsAccessControlList read GetDefaultInterface;
+ published
+ property AclRevision: Integer read Get_AclRevision write Set_AclRevision;
+ property AceCount: Integer read Get_AceCount write Set_AceCount;
+ end;
+{$ENDIF}
+
+// *********************************************************************//
+// The Class CoSecurityDescriptor provides a Create and CreateRemote method to
+// create instances of the default interface IADsSecurityDescriptor exposed by
+// the CoClass SecurityDescriptor. The functions are intended to be used by
+// clients wishing to automate the CoClass objects exposed by the
+// server of this typelibrary.
+// *********************************************************************//
+ CoSecurityDescriptor = class
+ class function Create: IADsSecurityDescriptor;
+ class function CreateRemote(const MachineName: string): IADsSecurityDescriptor;
+ end;
+
+// *********************************************************************//
+// OLE Server Proxy class declaration
+// Server Object : TSecurityDescriptor
+// Help String :
+// Default Interface: IADsSecurityDescriptor
+// Def. Intf. DISP? : No
+// Event Interface:
+// TypeFlags : (2) CanCreate
+// *********************************************************************//
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+ TSecurityDescriptorProperties= class;
+{$ENDIF}
+ TSecurityDescriptor = class(TOleServer)
+ private
+ FIntf: IADsSecurityDescriptor;
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+ FProps: TSecurityDescriptorProperties;
+ function GetServerProperties: TSecurityDescriptorProperties;
+{$ENDIF}
+ function GetDefaultInterface: IADsSecurityDescriptor;
+ protected
+ procedure InitServerData; override;
+ function Get_Revision: Integer;
+ procedure Set_Revision(retval: Integer);
+ function Get_Control: Integer;
+ procedure Set_Control(retval: Integer);
+ function Get_Owner: WideString;
+ procedure Set_Owner(const retval: WideString);
+ function Get_OwnerDefaulted: WordBool;
+ procedure Set_OwnerDefaulted(retval: WordBool);
+ function Get_Group: WideString;
+ procedure Set_Group(const retval: WideString);
+ function Get_GroupDefaulted: WordBool;
+ procedure Set_GroupDefaulted(retval: WordBool);
+ function Get_DiscretionaryAcl: IDispatch;
+ procedure Set_DiscretionaryAcl(const retval: IDispatch);
+ function Get_DaclDefaulted: WordBool;
+ procedure Set_DaclDefaulted(retval: WordBool);
+ function Get_SystemAcl: IDispatch;
+ procedure Set_SystemAcl(const retval: IDispatch);
+ function Get_SaclDefaulted: WordBool;
+ procedure Set_SaclDefaulted(retval: WordBool);
+ public
+ constructor Create(AOwner: TComponent); override;
+ destructor Destroy; override;
+ procedure Connect; override;
+ procedure ConnectTo(svrIntf: IADsSecurityDescriptor);
+ procedure Disconnect; override;
+ function CopySecurityDescriptor: IDispatch;
+ property DefaultInterface: IADsSecurityDescriptor read GetDefaultInterface;
+ property DiscretionaryAcl: IDispatch read Get_DiscretionaryAcl write Set_DiscretionaryAcl;
+ property SystemAcl: IDispatch read Get_SystemAcl write Set_SystemAcl;
+ property Revision: Integer read Get_Revision write Set_Revision;
+ property Control: Integer read Get_Control write Set_Control;
+ property Owner: WideString read Get_Owner write Set_Owner;
+ property OwnerDefaulted: WordBool read Get_OwnerDefaulted write Set_OwnerDefaulted;
+ property Group: WideString read Get_Group write Set_Group;
+ property GroupDefaulted: WordBool read Get_GroupDefaulted write Set_GroupDefaulted;
+ property DaclDefaulted: WordBool read Get_DaclDefaulted write Set_DaclDefaulted;
+ property SaclDefaulted: WordBool read Get_SaclDefaulted write Set_SaclDefaulted;
+ published
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+ property Server: TSecurityDescriptorProperties read GetServerProperties;
+{$ENDIF}
+ end;
+
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+// *********************************************************************//
+// OLE Server Properties Proxy Class
+// Server Object : TSecurityDescriptor
+// (This object is used by the IDE's Property Inspector to allow editing
+// of the properties of this server)
+// *********************************************************************//
+ TSecurityDescriptorProperties = class(TPersistent)
+ private
+ FServer: TSecurityDescriptor;
+ function GetDefaultInterface: IADsSecurityDescriptor;
+ constructor Create(AServer: TSecurityDescriptor);
+ protected
+ function Get_Revision: Integer;
+ procedure Set_Revision(retval: Integer);
+ function Get_Control: Integer;
+ procedure Set_Control(retval: Integer);
+ function Get_Owner: WideString;
+ procedure Set_Owner(const retval: WideString);
+ function Get_OwnerDefaulted: WordBool;
+ procedure Set_OwnerDefaulted(retval: WordBool);
+ function Get_Group: WideString;
+ procedure Set_Group(const retval: WideString);
+ function Get_GroupDefaulted: WordBool;
+ procedure Set_GroupDefaulted(retval: WordBool);
+ function Get_DiscretionaryAcl: IDispatch;
+ procedure Set_DiscretionaryAcl(const retval: IDispatch);
+ function Get_DaclDefaulted: WordBool;
+ procedure Set_DaclDefaulted(retval: WordBool);
+ function Get_SystemAcl: IDispatch;
+ procedure Set_SystemAcl(const retval: IDispatch);
+ function Get_SaclDefaulted: WordBool;
+ procedure Set_SaclDefaulted(retval: WordBool);
+ public
+ property DefaultInterface: IADsSecurityDescriptor read GetDefaultInterface;
+ published
+ property Revision: Integer read Get_Revision write Set_Revision;
+ property Control: Integer read Get_Control write Set_Control;
+ property Owner: WideString read Get_Owner write Set_Owner;
+ property OwnerDefaulted: WordBool read Get_OwnerDefaulted write Set_OwnerDefaulted;
+ property Group: WideString read Get_Group write Set_Group;
+ property GroupDefaulted: WordBool read Get_GroupDefaulted write Set_GroupDefaulted;
+ property DaclDefaulted: WordBool read Get_DaclDefaulted write Set_DaclDefaulted;
+ property SaclDefaulted: WordBool read Get_SaclDefaulted write Set_SaclDefaulted;
+ end;
+{$ENDIF}
+
+// *********************************************************************//
+// The Class CoLargeInteger provides a Create and CreateRemote method to
+// create instances of the default interface IADsLargeInteger exposed by
+// the CoClass LargeInteger. The functions are intended to be used by
+// clients wishing to automate the CoClass objects exposed by the
+// server of this typelibrary.
+// *********************************************************************//
+ CoLargeInteger = class
+ class function Create: IADsLargeInteger;
+ class function CreateRemote(const MachineName: string): IADsLargeInteger;
+ end;
+
+// *********************************************************************//
+// OLE Server Proxy class declaration
+// Server Object : TLargeInteger
+// Help String :
+// Default Interface: IADsLargeInteger
+// Def. Intf. DISP? : No
+// Event Interface:
+// TypeFlags : (2) CanCreate
+// *********************************************************************//
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+ TLargeIntegerProperties= class;
+{$ENDIF}
+ TLargeInteger = class(TOleServer)
+ private
+ FIntf: IADsLargeInteger;
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+ FProps: TLargeIntegerProperties;
+ function GetServerProperties: TLargeIntegerProperties;
+{$ENDIF}
+ function GetDefaultInterface: IADsLargeInteger;
+ protected
+ procedure InitServerData; override;
+ function Get_HighPart: Integer;
+ procedure Set_HighPart(retval: Integer);
+ function Get_LowPart: Integer;
+ procedure Set_LowPart(retval: Integer);
+ public
+ constructor Create(AOwner: TComponent); override;
+ destructor Destroy; override;
+ procedure Connect; override;
+ procedure ConnectTo(svrIntf: IADsLargeInteger);
+ procedure Disconnect; override;
+ property DefaultInterface: IADsLargeInteger read GetDefaultInterface;
+ property HighPart: Integer read Get_HighPart write Set_HighPart;
+ property LowPart: Integer read Get_LowPart write Set_LowPart;
+ published
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+ property Server: TLargeIntegerProperties read GetServerProperties;
+{$ENDIF}
+ end;
+
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+// *********************************************************************//
+// OLE Server Properties Proxy Class
+// Server Object : TLargeInteger
+// (This object is used by the IDE's Property Inspector to allow editing
+// of the properties of this server)
+// *********************************************************************//
+ TLargeIntegerProperties = class(TPersistent)
+ private
+ FServer: TLargeInteger;
+ function GetDefaultInterface: IADsLargeInteger;
+ constructor Create(AServer: TLargeInteger);
+ protected
+ function Get_HighPart: Integer;
+ procedure Set_HighPart(retval: Integer);
+ function Get_LowPart: Integer;
+ procedure Set_LowPart(retval: Integer);
+ public
+ property DefaultInterface: IADsLargeInteger read GetDefaultInterface;
+ published
+ property HighPart: Integer read Get_HighPart write Set_HighPart;
+ property LowPart: Integer read Get_LowPart write Set_LowPart;
+ end;
+{$ENDIF}
+
+// *********************************************************************//
+// The Class CoNameTranslate provides a Create and CreateRemote method to
+// create instances of the default interface IADsNameTranslate exposed by
+// the CoClass NameTranslate. The functions are intended to be used by
+// clients wishing to automate the CoClass objects exposed by the
+// server of this typelibrary.
+// *********************************************************************//
+ CoNameTranslate = class
+ class function Create: IADsNameTranslate;
+ class function CreateRemote(const MachineName: string): IADsNameTranslate;
+ end;
+
+// *********************************************************************//
+// OLE Server Proxy class declaration
+// Server Object : TNameTranslate
+// Help String :
+// Default Interface: IADsNameTranslate
+// Def. Intf. DISP? : No
+// Event Interface:
+// TypeFlags : (2) CanCreate
+// *********************************************************************//
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+ TNameTranslateProperties= class;
+{$ENDIF}
+ TNameTranslate = class(TOleServer)
+ private
+ FIntf: IADsNameTranslate;
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+ FProps: TNameTranslateProperties;
+ function GetServerProperties: TNameTranslateProperties;
+{$ENDIF}
+ function GetDefaultInterface: IADsNameTranslate;
+ protected
+ procedure InitServerData; override;
+ procedure Set_ChaseReferral(Param1: Integer);
+ public
+ constructor Create(AOwner: TComponent); override;
+ destructor Destroy; override;
+ procedure Connect; override;
+ procedure ConnectTo(svrIntf: IADsNameTranslate);
+ procedure Disconnect; override;
+ procedure Init(lnSetType: Integer; const bstrADsPath: WideString);
+ procedure InitEx(lnSetType: Integer; const bstrADsPath: WideString;
+ const bstrUserID: WideString; const bstrDomain: WideString;
+ const bstrPassword: WideString);
+ procedure Set_(lnSetType: Integer; const bstrADsPath: WideString);
+ function Get(lnFormatType: Integer): WideString;
+ procedure SetEx(lnFormatType: Integer; pVar: OleVariant);
+ function GetEx(lnFormatType: Integer): OleVariant;
+ property DefaultInterface: IADsNameTranslate read GetDefaultInterface;
+ property ChaseReferral: Integer write Set_ChaseReferral;
+ published
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+ property Server: TNameTranslateProperties read GetServerProperties;
+{$ENDIF}
+ end;
+
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+// *********************************************************************//
+// OLE Server Properties Proxy Class
+// Server Object : TNameTranslate
+// (This object is used by the IDE's Property Inspector to allow editing
+// of the properties of this server)
+// *********************************************************************//
+ TNameTranslateProperties = class(TPersistent)
+ private
+ FServer: TNameTranslate;
+ function GetDefaultInterface: IADsNameTranslate;
+ constructor Create(AServer: TNameTranslate);
+ protected
+ procedure Set_ChaseReferral(Param1: Integer);
+ public
+ property DefaultInterface: IADsNameTranslate read GetDefaultInterface;
+ published
+ end;
+{$ENDIF}
+
+// *********************************************************************//
+// The Class CoCaseIgnoreList provides a Create and CreateRemote method to
+// create instances of the default interface IADsCaseIgnoreList exposed by
+// the CoClass CaseIgnoreList. The functions are intended to be used by
+// clients wishing to automate the CoClass objects exposed by the
+// server of this typelibrary.
+// *********************************************************************//
+ CoCaseIgnoreList = class
+ class function Create: IADsCaseIgnoreList;
+ class function CreateRemote(const MachineName: string): IADsCaseIgnoreList;
+ end;
+
+// *********************************************************************//
+// OLE Server Proxy class declaration
+// Server Object : TCaseIgnoreList
+// Help String :
+// Default Interface: IADsCaseIgnoreList
+// Def. Intf. DISP? : No
+// Event Interface:
+// TypeFlags : (2) CanCreate
+// *********************************************************************//
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+ TCaseIgnoreListProperties= class;
+{$ENDIF}
+ TCaseIgnoreList = class(TOleServer)
+ private
+ FIntf: IADsCaseIgnoreList;
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+ FProps: TCaseIgnoreListProperties;
+ function GetServerProperties: TCaseIgnoreListProperties;
+{$ENDIF}
+ function GetDefaultInterface: IADsCaseIgnoreList;
+ protected
+ procedure InitServerData; override;
+ function Get_CaseIgnoreList: OleVariant;
+ procedure Set_CaseIgnoreList(retval: OleVariant);
+ public
+ constructor Create(AOwner: TComponent); override;
+ destructor Destroy; override;
+ procedure Connect; override;
+ procedure ConnectTo(svrIntf: IADsCaseIgnoreList);
+ procedure Disconnect; override;
+ property DefaultInterface: IADsCaseIgnoreList read GetDefaultInterface;
+ property CaseIgnoreList: OleVariant read Get_CaseIgnoreList write Set_CaseIgnoreList;
+ published
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+ property Server: TCaseIgnoreListProperties read GetServerProperties;
+{$ENDIF}
+ end;
+
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+// *********************************************************************//
+// OLE Server Properties Proxy Class
+// Server Object : TCaseIgnoreList
+// (This object is used by the IDE's Property Inspector to allow editing
+// of the properties of this server)
+// *********************************************************************//
+ TCaseIgnoreListProperties = class(TPersistent)
+ private
+ FServer: TCaseIgnoreList;
+ function GetDefaultInterface: IADsCaseIgnoreList;
+ constructor Create(AServer: TCaseIgnoreList);
+ protected
+ function Get_CaseIgnoreList: OleVariant;
+ procedure Set_CaseIgnoreList(retval: OleVariant);
+ public
+ property DefaultInterface: IADsCaseIgnoreList read GetDefaultInterface;
+ published
+ end;
+{$ENDIF}
+
+// *********************************************************************//
+// The Class CoFaxNumber provides a Create and CreateRemote method to
+// create instances of the default interface IADsFaxNumber exposed by
+// the CoClass FaxNumber. The functions are intended to be used by
+// clients wishing to automate the CoClass objects exposed by the
+// server of this typelibrary.
+// *********************************************************************//
+ CoFaxNumber = class
+ class function Create: IADsFaxNumber;
+ class function CreateRemote(const MachineName: string): IADsFaxNumber;
+ end;
+
+// *********************************************************************//
+// OLE Server Proxy class declaration
+// Server Object : TFaxNumber
+// Help String :
+// Default Interface: IADsFaxNumber
+// Def. Intf. DISP? : No
+// Event Interface:
+// TypeFlags : (2) CanCreate
+// *********************************************************************//
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+ TFaxNumberProperties= class;
+{$ENDIF}
+ TFaxNumber = class(TOleServer)
+ private
+ FIntf: IADsFaxNumber;
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+ FProps: TFaxNumberProperties;
+ function GetServerProperties: TFaxNumberProperties;
+{$ENDIF}
+ function GetDefaultInterface: IADsFaxNumber;
+ protected
+ procedure InitServerData; override;
+ function Get_TelephoneNumber: WideString;
+ procedure Set_TelephoneNumber(const retval: WideString);
+ function Get_Parameters: OleVariant;
+ procedure Set_Parameters(retval: OleVariant);
+ public
+ constructor Create(AOwner: TComponent); override;
+ destructor Destroy; override;
+ procedure Connect; override;
+ procedure ConnectTo(svrIntf: IADsFaxNumber);
+ procedure Disconnect; override;
+ property DefaultInterface: IADsFaxNumber read GetDefaultInterface;
+ property Parameters: OleVariant read Get_Parameters write Set_Parameters;
+ property TelephoneNumber: WideString read Get_TelephoneNumber write Set_TelephoneNumber;
+ published
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+ property Server: TFaxNumberProperties read GetServerProperties;
+{$ENDIF}
+ end;
+
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+// *********************************************************************//
+// OLE Server Properties Proxy Class
+// Server Object : TFaxNumber
+// (This object is used by the IDE's Property Inspector to allow editing
+// of the properties of this server)
+// *********************************************************************//
+ TFaxNumberProperties = class(TPersistent)
+ private
+ FServer: TFaxNumber;
+ function GetDefaultInterface: IADsFaxNumber;
+ constructor Create(AServer: TFaxNumber);
+ protected
+ function Get_TelephoneNumber: WideString;
+ procedure Set_TelephoneNumber(const retval: WideString);
+ function Get_Parameters: OleVariant;
+ procedure Set_Parameters(retval: OleVariant);
+ public
+ property DefaultInterface: IADsFaxNumber read GetDefaultInterface;
+ published
+ property TelephoneNumber: WideString read Get_TelephoneNumber write Set_TelephoneNumber;
+ end;
+{$ENDIF}
+
+// *********************************************************************//
+// The Class CoNetAddress provides a Create and CreateRemote method to
+// create instances of the default interface IADsNetAddress exposed by
+// the CoClass NetAddress. The functions are intended to be used by
+// clients wishing to automate the CoClass objects exposed by the
+// server of this typelibrary.
+// *********************************************************************//
+ CoNetAddress = class
+ class function Create: IADsNetAddress;
+ class function CreateRemote(const MachineName: string): IADsNetAddress;
+ end;
+
+// *********************************************************************//
+// OLE Server Proxy class declaration
+// Server Object : TNetAddress
+// Help String :
+// Default Interface: IADsNetAddress
+// Def. Intf. DISP? : No
+// Event Interface:
+// TypeFlags : (2) CanCreate
+// *********************************************************************//
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+ TNetAddressProperties= class;
+{$ENDIF}
+ TNetAddress = class(TOleServer)
+ private
+ FIntf: IADsNetAddress;
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+ FProps: TNetAddressProperties;
+ function GetServerProperties: TNetAddressProperties;
+{$ENDIF}
+ function GetDefaultInterface: IADsNetAddress;
+ protected
+ procedure InitServerData; override;
+ function Get_AddressType: Integer;
+ procedure Set_AddressType(retval: Integer);
+ function Get_Address: OleVariant;
+ procedure Set_Address(retval: OleVariant);
+ public
+ constructor Create(AOwner: TComponent); override;
+ destructor Destroy; override;
+ procedure Connect; override;
+ procedure ConnectTo(svrIntf: IADsNetAddress);
+ procedure Disconnect; override;
+ property DefaultInterface: IADsNetAddress read GetDefaultInterface;
+ property Address: OleVariant read Get_Address write Set_Address;
+ property AddressType: Integer read Get_AddressType write Set_AddressType;
+ published
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+ property Server: TNetAddressProperties read GetServerProperties;
+{$ENDIF}
+ end;
+
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+// *********************************************************************//
+// OLE Server Properties Proxy Class
+// Server Object : TNetAddress
+// (This object is used by the IDE's Property Inspector to allow editing
+// of the properties of this server)
+// *********************************************************************//
+ TNetAddressProperties = class(TPersistent)
+ private
+ FServer: TNetAddress;
+ function GetDefaultInterface: IADsNetAddress;
+ constructor Create(AServer: TNetAddress);
+ protected
+ function Get_AddressType: Integer;
+ procedure Set_AddressType(retval: Integer);
+ function Get_Address: OleVariant;
+ procedure Set_Address(retval: OleVariant);
+ public
+ property DefaultInterface: IADsNetAddress read GetDefaultInterface;
+ published
+ property AddressType: Integer read Get_AddressType write Set_AddressType;
+ end;
+{$ENDIF}
+
+// *********************************************************************//
+// The Class CoOctetList provides a Create and CreateRemote method to
+// create instances of the default interface IADsOctetList exposed by
+// the CoClass OctetList. The functions are intended to be used by
+// clients wishing to automate the CoClass objects exposed by the
+// server of this typelibrary.
+// *********************************************************************//
+ CoOctetList = class
+ class function Create: IADsOctetList;
+ class function CreateRemote(const MachineName: string): IADsOctetList;
+ end;
+
+// *********************************************************************//
+// OLE Server Proxy class declaration
+// Server Object : TOctetList
+// Help String :
+// Default Interface: IADsOctetList
+// Def. Intf. DISP? : No
+// Event Interface:
+// TypeFlags : (2) CanCreate
+// *********************************************************************//
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+ TOctetListProperties= class;
+{$ENDIF}
+ TOctetList = class(TOleServer)
+ private
+ FIntf: IADsOctetList;
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+ FProps: TOctetListProperties;
+ function GetServerProperties: TOctetListProperties;
+{$ENDIF}
+ function GetDefaultInterface: IADsOctetList;
+ protected
+ procedure InitServerData; override;
+ function Get_OctetList: OleVariant;
+ procedure Set_OctetList(retval: OleVariant);
+ public
+ constructor Create(AOwner: TComponent); override;
+ destructor Destroy; override;
+ procedure Connect; override;
+ procedure ConnectTo(svrIntf: IADsOctetList);
+ procedure Disconnect; override;
+ property DefaultInterface: IADsOctetList read GetDefaultInterface;
+ property OctetList: OleVariant read Get_OctetList write Set_OctetList;
+ published
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+ property Server: TOctetListProperties read GetServerProperties;
+{$ENDIF}
+ end;
+
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+// *********************************************************************//
+// OLE Server Properties Proxy Class
+// Server Object : TOctetList
+// (This object is used by the IDE's Property Inspector to allow editing
+// of the properties of this server)
+// *********************************************************************//
+ TOctetListProperties = class(TPersistent)
+ private
+ FServer: TOctetList;
+ function GetDefaultInterface: IADsOctetList;
+ constructor Create(AServer: TOctetList);
+ protected
+ function Get_OctetList: OleVariant;
+ procedure Set_OctetList(retval: OleVariant);
+ public
+ property DefaultInterface: IADsOctetList read GetDefaultInterface;
+ published
+ end;
+{$ENDIF}
+
+// *********************************************************************//
+// The Class CoEmail provides a Create and CreateRemote method to
+// create instances of the default interface IADsEmail exposed by
+// the CoClass Email. The functions are intended to be used by
+// clients wishing to automate the CoClass objects exposed by the
+// server of this typelibrary.
+// *********************************************************************//
+ CoEmail = class
+ class function Create: IADsEmail;
+ class function CreateRemote(const MachineName: string): IADsEmail;
+ end;
+
+// *********************************************************************//
+// OLE Server Proxy class declaration
+// Server Object : TEmail
+// Help String :
+// Default Interface: IADsEmail
+// Def. Intf. DISP? : No
+// Event Interface:
+// TypeFlags : (2) CanCreate
+// *********************************************************************//
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+ TEmailProperties= class;
+{$ENDIF}
+ TEmail = class(TOleServer)
+ private
+ FIntf: IADsEmail;
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+ FProps: TEmailProperties;
+ function GetServerProperties: TEmailProperties;
+{$ENDIF}
+ function GetDefaultInterface: IADsEmail;
+ protected
+ procedure InitServerData; override;
+ function Get_Type_: Integer;
+ procedure Set_Type_(retval: Integer);
+ function Get_Address: WideString;
+ procedure Set_Address(const retval: WideString);
+ public
+ constructor Create(AOwner: TComponent); override;
+ destructor Destroy; override;
+ procedure Connect; override;
+ procedure ConnectTo(svrIntf: IADsEmail);
+ procedure Disconnect; override;
+ property DefaultInterface: IADsEmail read GetDefaultInterface;
+ property Type_: Integer read Get_Type_ write Set_Type_;
+ property Address: WideString read Get_Address write Set_Address;
+ published
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+ property Server: TEmailProperties read GetServerProperties;
+{$ENDIF}
+ end;
+
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+// *********************************************************************//
+// OLE Server Properties Proxy Class
+// Server Object : TEmail
+// (This object is used by the IDE's Property Inspector to allow editing
+// of the properties of this server)
+// *********************************************************************//
+ TEmailProperties = class(TPersistent)
+ private
+ FServer: TEmail;
+ function GetDefaultInterface: IADsEmail;
+ constructor Create(AServer: TEmail);
+ protected
+ function Get_Type_: Integer;
+ procedure Set_Type_(retval: Integer);
+ function Get_Address: WideString;
+ procedure Set_Address(const retval: WideString);
+ public
+ property DefaultInterface: IADsEmail read GetDefaultInterface;
+ published
+ property Type_: Integer read Get_Type_ write Set_Type_;
+ property Address: WideString read Get_Address write Set_Address;
+ end;
+{$ENDIF}
+
+// *********************************************************************//
+// The Class CoPath provides a Create and CreateRemote method to
+// create instances of the default interface IADsPath exposed by
+// the CoClass Path. The functions are intended to be used by
+// clients wishing to automate the CoClass objects exposed by the
+// server of this typelibrary.
+// *********************************************************************//
+ CoPath = class
+ class function Create: IADsPath;
+ class function CreateRemote(const MachineName: string): IADsPath;
+ end;
+
+// *********************************************************************//
+// OLE Server Proxy class declaration
+// Server Object : TPath
+// Help String :
+// Default Interface: IADsPath
+// Def. Intf. DISP? : No
+// Event Interface:
+// TypeFlags : (2) CanCreate
+// *********************************************************************//
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+ TPathProperties= class;
+{$ENDIF}
+ TPath = class(TOleServer)
+ private
+ FIntf: IADsPath;
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+ FProps: TPathProperties;
+ function GetServerProperties: TPathProperties;
+{$ENDIF}
+ function GetDefaultInterface: IADsPath;
+ protected
+ procedure InitServerData; override;
+ function Get_Type_: Integer;
+ procedure Set_Type_(retval: Integer);
+ function Get_VolumeName: WideString;
+ procedure Set_VolumeName(const retval: WideString);
+ function Get_Path: WideString;
+ procedure Set_Path(const retval: WideString);
+ public
+ constructor Create(AOwner: TComponent); override;
+ destructor Destroy; override;
+ procedure Connect; override;
+ procedure ConnectTo(svrIntf: IADsPath);
+ procedure Disconnect; override;
+ property DefaultInterface: IADsPath read GetDefaultInterface;
+ property Type_: Integer read Get_Type_ write Set_Type_;
+ property VolumeName: WideString read Get_VolumeName write Set_VolumeName;
+ property Path: WideString read Get_Path write Set_Path;
+ published
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+ property Server: TPathProperties read GetServerProperties;
+{$ENDIF}
+ end;
+
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+// *********************************************************************//
+// OLE Server Properties Proxy Class
+// Server Object : TPath
+// (This object is used by the IDE's Property Inspector to allow editing
+// of the properties of this server)
+// *********************************************************************//
+ TPathProperties = class(TPersistent)
+ private
+ FServer: TPath;
+ function GetDefaultInterface: IADsPath;
+ constructor Create(AServer: TPath);
+ protected
+ function Get_Type_: Integer;
+ procedure Set_Type_(retval: Integer);
+ function Get_VolumeName: WideString;
+ procedure Set_VolumeName(const retval: WideString);
+ function Get_Path: WideString;
+ procedure Set_Path(const retval: WideString);
+ public
+ property DefaultInterface: IADsPath read GetDefaultInterface;
+ published
+ property Type_: Integer read Get_Type_ write Set_Type_;
+ property VolumeName: WideString read Get_VolumeName write Set_VolumeName;
+ property Path: WideString read Get_Path write Set_Path;
+ end;
+{$ENDIF}
+
+// *********************************************************************//
+// The Class CoReplicaPointer provides a Create and CreateRemote method to
+// create instances of the default interface IADsReplicaPointer exposed by
+// the CoClass ReplicaPointer. The functions are intended to be used by
+// clients wishing to automate the CoClass objects exposed by the
+// server of this typelibrary.
+// *********************************************************************//
+ CoReplicaPointer = class
+ class function Create: IADsReplicaPointer;
+ class function CreateRemote(const MachineName: string): IADsReplicaPointer;
+ end;
+
+// *********************************************************************//
+// OLE Server Proxy class declaration
+// Server Object : TReplicaPointer
+// Help String :
+// Default Interface: IADsReplicaPointer
+// Def. Intf. DISP? : No
+// Event Interface:
+// TypeFlags : (2) CanCreate
+// *********************************************************************//
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+ TReplicaPointerProperties= class;
+{$ENDIF}
+ TReplicaPointer = class(TOleServer)
+ private
+ FIntf: IADsReplicaPointer;
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+ FProps: TReplicaPointerProperties;
+ function GetServerProperties: TReplicaPointerProperties;
+{$ENDIF}
+ function GetDefaultInterface: IADsReplicaPointer;
+ protected
+ procedure InitServerData; override;
+ function Get_ServerName: WideString;
+ procedure Set_ServerName(const retval: WideString);
+ function Get_ReplicaType: Integer;
+ procedure Set_ReplicaType(retval: Integer);
+ function Get_ReplicaNumber: Integer;
+ procedure Set_ReplicaNumber(retval: Integer);
+ function Get_Count: Integer;
+ procedure Set_Count(retval: Integer);
+ function Get_ReplicaAddressHints: OleVariant;
+ procedure Set_ReplicaAddressHints(retval: OleVariant);
+ public
+ constructor Create(AOwner: TComponent); override;
+ destructor Destroy; override;
+ procedure Connect; override;
+ procedure ConnectTo(svrIntf: IADsReplicaPointer);
+ procedure Disconnect; override;
+ property DefaultInterface: IADsReplicaPointer read GetDefaultInterface;
+ property ReplicaAddressHints: OleVariant read Get_ReplicaAddressHints write Set_ReplicaAddressHints;
+ property ServerName: WideString read Get_ServerName write Set_ServerName;
+ property ReplicaType: Integer read Get_ReplicaType write Set_ReplicaType;
+ property ReplicaNumber: Integer read Get_ReplicaNumber write Set_ReplicaNumber;
+ property Count: Integer read Get_Count write Set_Count;
+ published
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+ property Server: TReplicaPointerProperties read GetServerProperties;
+{$ENDIF}
+ end;
+
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+// *********************************************************************//
+// OLE Server Properties Proxy Class
+// Server Object : TReplicaPointer
+// (This object is used by the IDE's Property Inspector to allow editing
+// of the properties of this server)
+// *********************************************************************//
+ TReplicaPointerProperties = class(TPersistent)
+ private
+ FServer: TReplicaPointer;
+ function GetDefaultInterface: IADsReplicaPointer;
+ constructor Create(AServer: TReplicaPointer);
+ protected
+ function Get_ServerName: WideString;
+ procedure Set_ServerName(const retval: WideString);
+ function Get_ReplicaType: Integer;
+ procedure Set_ReplicaType(retval: Integer);
+ function Get_ReplicaNumber: Integer;
+ procedure Set_ReplicaNumber(retval: Integer);
+ function Get_Count: Integer;
+ procedure Set_Count(retval: Integer);
+ function Get_ReplicaAddressHints: OleVariant;
+ procedure Set_ReplicaAddressHints(retval: OleVariant);
+ public
+ property DefaultInterface: IADsReplicaPointer read GetDefaultInterface;
+ published
+ property ServerName: WideString read Get_ServerName write Set_ServerName;
+ property ReplicaType: Integer read Get_ReplicaType write Set_ReplicaType;
+ property ReplicaNumber: Integer read Get_ReplicaNumber write Set_ReplicaNumber;
+ property Count: Integer read Get_Count write Set_Count;
+ end;
+{$ENDIF}
+
+// *********************************************************************//
+// The Class CoAcl provides a Create and CreateRemote method to
+// create instances of the default interface IADsAcl exposed by
+// the CoClass Acl. The functions are intended to be used by
+// clients wishing to automate the CoClass objects exposed by the
+// server of this typelibrary.
+// *********************************************************************//
+ CoAcl = class
+ class function Create: IADsAcl;
+ class function CreateRemote(const MachineName: string): IADsAcl;
+ end;
+
+// *********************************************************************//
+// OLE Server Proxy class declaration
+// Server Object : TAcl
+// Help String :
+// Default Interface: IADsAcl
+// Def. Intf. DISP? : No
+// Event Interface:
+// TypeFlags : (2) CanCreate
+// *********************************************************************//
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+ TAclProperties= class;
+{$ENDIF}
+ TAcl = class(TOleServer)
+ private
+ FIntf: IADsAcl;
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+ FProps: TAclProperties;
+ function GetServerProperties: TAclProperties;
+{$ENDIF}
+ function GetDefaultInterface: IADsAcl;
+ protected
+ procedure InitServerData; override;
+ function Get_ProtectedAttrName: WideString;
+ procedure Set_ProtectedAttrName(const retval: WideString);
+ function Get_SubjectName: WideString;
+ procedure Set_SubjectName(const retval: WideString);
+ function Get_Privileges: Integer;
+ procedure Set_Privileges(retval: Integer);
+ public
+ constructor Create(AOwner: TComponent); override;
+ destructor Destroy; override;
+ procedure Connect; override;
+ procedure ConnectTo(svrIntf: IADsAcl);
+ procedure Disconnect; override;
+ function CopyAcl: IDispatch;
+ property DefaultInterface: IADsAcl read GetDefaultInterface;
+ property ProtectedAttrName: WideString read Get_ProtectedAttrName write Set_ProtectedAttrName;
+ property SubjectName: WideString read Get_SubjectName write Set_SubjectName;
+ property Privileges: Integer read Get_Privileges write Set_Privileges;
+ published
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+ property Server: TAclProperties read GetServerProperties;
+{$ENDIF}
+ end;
+
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+// *********************************************************************//
+// OLE Server Properties Proxy Class
+// Server Object : TAcl
+// (This object is used by the IDE's Property Inspector to allow editing
+// of the properties of this server)
+// *********************************************************************//
+ TAclProperties = class(TPersistent)
+ private
+ FServer: TAcl;
+ function GetDefaultInterface: IADsAcl;
+ constructor Create(AServer: TAcl);
+ protected
+ function Get_ProtectedAttrName: WideString;
+ procedure Set_ProtectedAttrName(const retval: WideString);
+ function Get_SubjectName: WideString;
+ procedure Set_SubjectName(const retval: WideString);
+ function Get_Privileges: Integer;
+ procedure Set_Privileges(retval: Integer);
+ public
+ property DefaultInterface: IADsAcl read GetDefaultInterface;
+ published
+ property ProtectedAttrName: WideString read Get_ProtectedAttrName write Set_ProtectedAttrName;
+ property SubjectName: WideString read Get_SubjectName write Set_SubjectName;
+ property Privileges: Integer read Get_Privileges write Set_Privileges;
+ end;
+{$ENDIF}
+
+// *********************************************************************//
+// The Class CoTimestamp provides a Create and CreateRemote method to
+// create instances of the default interface IADsTimestamp exposed by
+// the CoClass Timestamp. The functions are intended to be used by
+// clients wishing to automate the CoClass objects exposed by the
+// server of this typelibrary.
+// *********************************************************************//
+ CoTimestamp = class
+ class function Create: IADsTimestamp;
+ class function CreateRemote(const MachineName: string): IADsTimestamp;
+ end;
+
+// *********************************************************************//
+// OLE Server Proxy class declaration
+// Server Object : TTimestamp
+// Help String :
+// Default Interface: IADsTimestamp
+// Def. Intf. DISP? : No
+// Event Interface:
+// TypeFlags : (2) CanCreate
+// *********************************************************************//
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+ TTimestampProperties= class;
+{$ENDIF}
+ TTimestamp = class(TOleServer)
+ private
+ FIntf: IADsTimestamp;
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+ FProps: TTimestampProperties;
+ function GetServerProperties: TTimestampProperties;
+{$ENDIF}
+ function GetDefaultInterface: IADsTimestamp;
+ protected
+ procedure InitServerData; override;
+ function Get_WholeSeconds: Integer;
+ procedure Set_WholeSeconds(retval: Integer);
+ function Get_EventID: Integer;
+ procedure Set_EventID(retval: Integer);
+ public
+ constructor Create(AOwner: TComponent); override;
+ destructor Destroy; override;
+ procedure Connect; override;
+ procedure ConnectTo(svrIntf: IADsTimestamp);
+ procedure Disconnect; override;
+ property DefaultInterface: IADsTimestamp read GetDefaultInterface;
+ property WholeSeconds: Integer read Get_WholeSeconds write Set_WholeSeconds;
+ property EventID: Integer read Get_EventID write Set_EventID;
+ published
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+ property Server: TTimestampProperties read GetServerProperties;
+{$ENDIF}
+ end;
+
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+// *********************************************************************//
+// OLE Server Properties Proxy Class
+// Server Object : TTimestamp
+// (This object is used by the IDE's Property Inspector to allow editing
+// of the properties of this server)
+// *********************************************************************//
+ TTimestampProperties = class(TPersistent)
+ private
+ FServer: TTimestamp;
+ function GetDefaultInterface: IADsTimestamp;
+ constructor Create(AServer: TTimestamp);
+ protected
+ function Get_WholeSeconds: Integer;
+ procedure Set_WholeSeconds(retval: Integer);
+ function Get_EventID: Integer;
+ procedure Set_EventID(retval: Integer);
+ public
+ property DefaultInterface: IADsTimestamp read GetDefaultInterface;
+ published
+ property WholeSeconds: Integer read Get_WholeSeconds write Set_WholeSeconds;
+ property EventID: Integer read Get_EventID write Set_EventID;
+ end;
+{$ENDIF}
+
+// *********************************************************************//
+// The Class CoPostalAddress provides a Create and CreateRemote method to
+// create instances of the default interface IADsPostalAddress exposed by
+// the CoClass PostalAddress. The functions are intended to be used by
+// clients wishing to automate the CoClass objects exposed by the
+// server of this typelibrary.
+// *********************************************************************//
+ CoPostalAddress = class
+ class function Create: IADsPostalAddress;
+ class function CreateRemote(const MachineName: string): IADsPostalAddress;
+ end;
+
+// *********************************************************************//
+// OLE Server Proxy class declaration
+// Server Object : TPostalAddress
+// Help String :
+// Default Interface: IADsPostalAddress
+// Def. Intf. DISP? : No
+// Event Interface:
+// TypeFlags : (2) CanCreate
+// *********************************************************************//
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+ TPostalAddressProperties= class;
+{$ENDIF}
+ TPostalAddress = class(TOleServer)
+ private
+ FIntf: IADsPostalAddress;
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+ FProps: TPostalAddressProperties;
+ function GetServerProperties: TPostalAddressProperties;
+{$ENDIF}
+ function GetDefaultInterface: IADsPostalAddress;
+ protected
+ procedure InitServerData; override;
+ function Get_PostalAddress: OleVariant;
+ procedure Set_PostalAddress(retval: OleVariant);
+ public
+ constructor Create(AOwner: TComponent); override;
+ destructor Destroy; override;
+ procedure Connect; override;
+ procedure ConnectTo(svrIntf: IADsPostalAddress);
+ procedure Disconnect; override;
+ property DefaultInterface: IADsPostalAddress read GetDefaultInterface;
+ property PostalAddress: OleVariant read Get_PostalAddress write Set_PostalAddress;
+ published
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+ property Server: TPostalAddressProperties read GetServerProperties;
+{$ENDIF}
+ end;
+
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+// *********************************************************************//
+// OLE Server Properties Proxy Class
+// Server Object : TPostalAddress
+// (This object is used by the IDE's Property Inspector to allow editing
+// of the properties of this server)
+// *********************************************************************//
+ TPostalAddressProperties = class(TPersistent)
+ private
+ FServer: TPostalAddress;
+ function GetDefaultInterface: IADsPostalAddress;
+ constructor Create(AServer: TPostalAddress);
+ protected
+ function Get_PostalAddress: OleVariant;
+ procedure Set_PostalAddress(retval: OleVariant);
+ public
+ property DefaultInterface: IADsPostalAddress read GetDefaultInterface;
+ published
+ end;
+{$ENDIF}
+
+// *********************************************************************//
+// The Class CoBackLink provides a Create and CreateRemote method to
+// create instances of the default interface IADsBackLink exposed by
+// the CoClass BackLink. The functions are intended to be used by
+// clients wishing to automate the CoClass objects exposed by the
+// server of this typelibrary.
+// *********************************************************************//
+ CoBackLink = class
+ class function Create: IADsBackLink;
+ class function CreateRemote(const MachineName: string): IADsBackLink;
+ end;
+
+// *********************************************************************//
+// OLE Server Proxy class declaration
+// Server Object : TBackLink
+// Help String :
+// Default Interface: IADsBackLink
+// Def. Intf. DISP? : No
+// Event Interface:
+// TypeFlags : (2) CanCreate
+// *********************************************************************//
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+ TBackLinkProperties= class;
+{$ENDIF}
+ TBackLink = class(TOleServer)
+ private
+ FIntf: IADsBackLink;
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+ FProps: TBackLinkProperties;
+ function GetServerProperties: TBackLinkProperties;
+{$ENDIF}
+ function GetDefaultInterface: IADsBackLink;
+ protected
+ procedure InitServerData; override;
+ function Get_RemoteID: Integer;
+ procedure Set_RemoteID(retval: Integer);
+ function Get_ObjectName: WideString;
+ procedure Set_ObjectName(const retval: WideString);
+ public
+ constructor Create(AOwner: TComponent); override;
+ destructor Destroy; override;
+ procedure Connect; override;
+ procedure ConnectTo(svrIntf: IADsBackLink);
+ procedure Disconnect; override;
+ property DefaultInterface: IADsBackLink read GetDefaultInterface;
+ property RemoteID: Integer read Get_RemoteID write Set_RemoteID;
+ property ObjectName: WideString read Get_ObjectName write Set_ObjectName;
+ published
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+ property Server: TBackLinkProperties read GetServerProperties;
+{$ENDIF}
+ end;
+
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+// *********************************************************************//
+// OLE Server Properties Proxy Class
+// Server Object : TBackLink
+// (This object is used by the IDE's Property Inspector to allow editing
+// of the properties of this server)
+// *********************************************************************//
+ TBackLinkProperties = class(TPersistent)
+ private
+ FServer: TBackLink;
+ function GetDefaultInterface: IADsBackLink;
+ constructor Create(AServer: TBackLink);
+ protected
+ function Get_RemoteID: Integer;
+ procedure Set_RemoteID(retval: Integer);
+ function Get_ObjectName: WideString;
+ procedure Set_ObjectName(const retval: WideString);
+ public
+ property DefaultInterface: IADsBackLink read GetDefaultInterface;
+ published
+ property RemoteID: Integer read Get_RemoteID write Set_RemoteID;
+ property ObjectName: WideString read Get_ObjectName write Set_ObjectName;
+ end;
+{$ENDIF}
+
+// *********************************************************************//
+// The Class CoTypedName provides a Create and CreateRemote method to
+// create instances of the default interface IADsTypedName exposed by
+// the CoClass TypedName. The functions are intended to be used by
+// clients wishing to automate the CoClass objects exposed by the
+// server of this typelibrary.
+// *********************************************************************//
+ CoTypedName = class
+ class function Create: IADsTypedName;
+ class function CreateRemote(const MachineName: string): IADsTypedName;
+ end;
+
+// *********************************************************************//
+// OLE Server Proxy class declaration
+// Server Object : TTypedName
+// Help String :
+// Default Interface: IADsTypedName
+// Def. Intf. DISP? : No
+// Event Interface:
+// TypeFlags : (2) CanCreate
+// *********************************************************************//
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+ TTypedNameProperties= class;
+{$ENDIF}
+ TTypedName = class(TOleServer)
+ private
+ FIntf: IADsTypedName;
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+ FProps: TTypedNameProperties;
+ function GetServerProperties: TTypedNameProperties;
+{$ENDIF}
+ function GetDefaultInterface: IADsTypedName;
+ protected
+ procedure InitServerData; override;
+ function Get_ObjectName: WideString;
+ procedure Set_ObjectName(const retval: WideString);
+ function Get_Level: Integer;
+ procedure Set_Level(retval: Integer);
+ function Get_Interval: Integer;
+ procedure Set_Interval(retval: Integer);
+ public
+ constructor Create(AOwner: TComponent); override;
+ destructor Destroy; override;
+ procedure Connect; override;
+ procedure ConnectTo(svrIntf: IADsTypedName);
+ procedure Disconnect; override;
+ property DefaultInterface: IADsTypedName read GetDefaultInterface;
+ property ObjectName: WideString read Get_ObjectName write Set_ObjectName;
+ property Level: Integer read Get_Level write Set_Level;
+ property Interval: Integer read Get_Interval write Set_Interval;
+ published
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+ property Server: TTypedNameProperties read GetServerProperties;
+{$ENDIF}
+ end;
+
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+// *********************************************************************//
+// OLE Server Properties Proxy Class
+// Server Object : TTypedName
+// (This object is used by the IDE's Property Inspector to allow editing
+// of the properties of this server)
+// *********************************************************************//
+ TTypedNameProperties = class(TPersistent)
+ private
+ FServer: TTypedName;
+ function GetDefaultInterface: IADsTypedName;
+ constructor Create(AServer: TTypedName);
+ protected
+ function Get_ObjectName: WideString;
+ procedure Set_ObjectName(const retval: WideString);
+ function Get_Level: Integer;
+ procedure Set_Level(retval: Integer);
+ function Get_Interval: Integer;
+ procedure Set_Interval(retval: Integer);
+ public
+ property DefaultInterface: IADsTypedName read GetDefaultInterface;
+ published
+ property ObjectName: WideString read Get_ObjectName write Set_ObjectName;
+ property Level: Integer read Get_Level write Set_Level;
+ property Interval: Integer read Get_Interval write Set_Interval;
+ end;
+{$ENDIF}
+
+// *********************************************************************//
+// The Class CoHold provides a Create and CreateRemote method to
+// create instances of the default interface IADsHold exposed by
+// the CoClass Hold. The functions are intended to be used by
+// clients wishing to automate the CoClass objects exposed by the
+// server of this typelibrary.
+// *********************************************************************//
+ CoHold = class
+ class function Create: IADsHold;
+ class function CreateRemote(const MachineName: string): IADsHold;
+ end;
+
+// *********************************************************************//
+// OLE Server Proxy class declaration
+// Server Object : THold
+// Help String :
+// Default Interface: IADsHold
+// Def. Intf. DISP? : No
+// Event Interface:
+// TypeFlags : (2) CanCreate
+// *********************************************************************//
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+ THoldProperties= class;
+{$ENDIF}
+ THold = class(TOleServer)
+ private
+ FIntf: IADsHold;
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+ FProps: THoldProperties;
+ function GetServerProperties: THoldProperties;
+{$ENDIF}
+ function GetDefaultInterface: IADsHold;
+ protected
+ procedure InitServerData; override;
+ function Get_ObjectName: WideString;
+ procedure Set_ObjectName(const retval: WideString);
+ function Get_Amount: Integer;
+ procedure Set_Amount(retval: Integer);
+ public
+ constructor Create(AOwner: TComponent); override;
+ destructor Destroy; override;
+ procedure Connect; override;
+ procedure ConnectTo(svrIntf: IADsHold);
+ procedure Disconnect; override;
+ property DefaultInterface: IADsHold read GetDefaultInterface;
+ property ObjectName: WideString read Get_ObjectName write Set_ObjectName;
+ property Amount: Integer read Get_Amount write Set_Amount;
+ published
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+ property Server: THoldProperties read GetServerProperties;
+{$ENDIF}
+ end;
+
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+// *********************************************************************//
+// OLE Server Properties Proxy Class
+// Server Object : THold
+// (This object is used by the IDE's Property Inspector to allow editing
+// of the properties of this server)
+// *********************************************************************//
+ THoldProperties = class(TPersistent)
+ private
+ FServer: THold;
+ function GetDefaultInterface: IADsHold;
+ constructor Create(AServer: THold);
+ protected
+ function Get_ObjectName: WideString;
+ procedure Set_ObjectName(const retval: WideString);
+ function Get_Amount: Integer;
+ procedure Set_Amount(retval: Integer);
+ public
+ property DefaultInterface: IADsHold read GetDefaultInterface;
+ published
+ property ObjectName: WideString read Get_ObjectName write Set_ObjectName;
+ property Amount: Integer read Get_Amount write Set_Amount;
+ end;
+{$ENDIF}
+
+// *********************************************************************//
+// The Class CoPathname provides a Create and CreateRemote method to
+// create instances of the default interface IADsPathname exposed by
+// the CoClass Pathname. The functions are intended to be used by
+// clients wishing to automate the CoClass objects exposed by the
+// server of this typelibrary.
+// *********************************************************************//
+ CoPathname = class
+ class function Create: IADsPathname;
+ class function CreateRemote(const MachineName: string): IADsPathname;
+ end;
+
+// *********************************************************************//
+// OLE Server Proxy class declaration
+// Server Object : TPathname
+// Help String :
+// Default Interface: IADsPathname
+// Def. Intf. DISP? : No
+// Event Interface:
+// TypeFlags : (2) CanCreate
+// *********************************************************************//
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+ TPathnameProperties= class;
+{$ENDIF}
+ TPathname = class(TOleServer)
+ private
+ FIntf: IADsPathname;
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+ FProps: TPathnameProperties;
+ function GetServerProperties: TPathnameProperties;
+{$ENDIF}
+ function GetDefaultInterface: IADsPathname;
+ protected
+ procedure InitServerData; override;
+ function Get_EscapedMode: Integer;
+ procedure Set_EscapedMode(retval: Integer);
+ public
+ constructor Create(AOwner: TComponent); override;
+ destructor Destroy; override;
+ procedure Connect; override;
+ procedure ConnectTo(svrIntf: IADsPathname);
+ procedure Disconnect; override;
+ procedure Set_(const bstrADsPath: WideString; lnSetType: Integer);
+ procedure SetDisplayType(lnDisplayType: Integer);
+ function Retrieve(lnFormatType: Integer): WideString;
+ function GetNumElements: Integer;
+ function GetElement(lnElementIndex: Integer): WideString;
+ procedure AddLeafElement(const bstrLeafElement: WideString);
+ procedure RemoveLeafElement;
+ function CopyPath: IDispatch;
+ function GetEscapedElement(lnReserved: Integer; const bstrInStr: WideString): WideString;
+ property DefaultInterface: IADsPathname read GetDefaultInterface;
+ property EscapedMode: Integer read Get_EscapedMode write Set_EscapedMode;
+ published
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+ property Server: TPathnameProperties read GetServerProperties;
+{$ENDIF}
+ end;
+
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+// *********************************************************************//
+// OLE Server Properties Proxy Class
+// Server Object : TPathname
+// (This object is used by the IDE's Property Inspector to allow editing
+// of the properties of this server)
+// *********************************************************************//
+ TPathnameProperties = class(TPersistent)
+ private
+ FServer: TPathname;
+ function GetDefaultInterface: IADsPathname;
+ constructor Create(AServer: TPathname);
+ protected
+ function Get_EscapedMode: Integer;
+ procedure Set_EscapedMode(retval: Integer);
+ public
+ property DefaultInterface: IADsPathname read GetDefaultInterface;
+ published
+ property EscapedMode: Integer read Get_EscapedMode write Set_EscapedMode;
+ end;
+{$ENDIF}
+
+// *********************************************************************//
+// The Class CoADSystemInfo provides a Create and CreateRemote method to
+// create instances of the default interface IADsADSystemInfo exposed by
+// the CoClass ADSystemInfo. The functions are intended to be used by
+// clients wishing to automate the CoClass objects exposed by the
+// server of this typelibrary.
+// *********************************************************************//
+ CoADSystemInfo = class
+ class function Create: IADsADSystemInfo;
+ class function CreateRemote(const MachineName: string): IADsADSystemInfo;
+ end;
+
+// *********************************************************************//
+// OLE Server Proxy class declaration
+// Server Object : TADSystemInfo
+// Help String :
+// Default Interface: IADsADSystemInfo
+// Def. Intf. DISP? : No
+// Event Interface:
+// TypeFlags : (2) CanCreate
+// *********************************************************************//
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+ TADSystemInfoProperties= class;
+{$ENDIF}
+ TADSystemInfo = class(TOleServer)
+ private
+ FIntf: IADsADSystemInfo;
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+ FProps: TADSystemInfoProperties;
+ function GetServerProperties: TADSystemInfoProperties;
+{$ENDIF}
+ function GetDefaultInterface: IADsADSystemInfo;
+ protected
+ procedure InitServerData; override;
+ function Get_UserName: WideString;
+ function Get_ComputerName: WideString;
+ function Get_SiteName: WideString;
+ function Get_DomainShortName: WideString;
+ function Get_DomainDNSName: WideString;
+ function Get_ForestDNSName: WideString;
+ function Get_PDCRoleOwner: WideString;
+ function Get_SchemaRoleOwner: WideString;
+ function Get_IsNativeMode: WordBool;
+ public
+ constructor Create(AOwner: TComponent); override;
+ destructor Destroy; override;
+ procedure Connect; override;
+ procedure ConnectTo(svrIntf: IADsADSystemInfo);
+ procedure Disconnect; override;
+ function GetAnyDCName: WideString;
+ function GetDCSiteName(const szServer: WideString): WideString;
+ procedure RefreshSchemaCache;
+ function GetTrees: OleVariant;
+ property DefaultInterface: IADsADSystemInfo read GetDefaultInterface;
+ property UserName: WideString read Get_UserName;
+ property ComputerName: WideString read Get_ComputerName;
+ property SiteName: WideString read Get_SiteName;
+ property DomainShortName: WideString read Get_DomainShortName;
+ property DomainDNSName: WideString read Get_DomainDNSName;
+ property ForestDNSName: WideString read Get_ForestDNSName;
+ property PDCRoleOwner: WideString read Get_PDCRoleOwner;
+ property SchemaRoleOwner: WideString read Get_SchemaRoleOwner;
+ property IsNativeMode: WordBool read Get_IsNativeMode;
+ published
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+ property Server: TADSystemInfoProperties read GetServerProperties;
+{$ENDIF}
+ end;
+
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+// *********************************************************************//
+// OLE Server Properties Proxy Class
+// Server Object : TADSystemInfo
+// (This object is used by the IDE's Property Inspector to allow editing
+// of the properties of this server)
+// *********************************************************************//
+ TADSystemInfoProperties = class(TPersistent)
+ private
+ FServer: TADSystemInfo;
+ function GetDefaultInterface: IADsADSystemInfo;
+ constructor Create(AServer: TADSystemInfo);
+ protected
+ function Get_UserName: WideString;
+ function Get_ComputerName: WideString;
+ function Get_SiteName: WideString;
+ function Get_DomainShortName: WideString;
+ function Get_DomainDNSName: WideString;
+ function Get_ForestDNSName: WideString;
+ function Get_PDCRoleOwner: WideString;
+ function Get_SchemaRoleOwner: WideString;
+ function Get_IsNativeMode: WordBool;
+ public
+ property DefaultInterface: IADsADSystemInfo read GetDefaultInterface;
+ published
+ end;
+{$ENDIF}
+
+// *********************************************************************//
+// The Class CoWinNTSystemInfo provides a Create and CreateRemote method to
+// create instances of the default interface IADsWinNTSystemInfo exposed by
+// the CoClass WinNTSystemInfo. The functions are intended to be used by
+// clients wishing to automate the CoClass objects exposed by the
+// server of this typelibrary.
+// *********************************************************************//
+ CoWinNTSystemInfo = class
+ class function Create: IADsWinNTSystemInfo;
+ class function CreateRemote(const MachineName: string): IADsWinNTSystemInfo;
+ end;
+
+// *********************************************************************//
+// OLE Server Proxy class declaration
+// Server Object : TWinNTSystemInfo
+// Help String :
+// Default Interface: IADsWinNTSystemInfo
+// Def. Intf. DISP? : No
+// Event Interface:
+// TypeFlags : (2) CanCreate
+// *********************************************************************//
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+ TWinNTSystemInfoProperties= class;
+{$ENDIF}
+ TWinNTSystemInfo = class(TOleServer)
+ private
+ FIntf: IADsWinNTSystemInfo;
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+ FProps: TWinNTSystemInfoProperties;
+ function GetServerProperties: TWinNTSystemInfoProperties;
+{$ENDIF}
+ function GetDefaultInterface: IADsWinNTSystemInfo;
+ protected
+ procedure InitServerData; override;
+ function Get_UserName: WideString;
+ function Get_ComputerName: WideString;
+ function Get_DomainName: WideString;
+ function Get_PDC: WideString;
+ public
+ constructor Create(AOwner: TComponent); override;
+ destructor Destroy; override;
+ procedure Connect; override;
+ procedure ConnectTo(svrIntf: IADsWinNTSystemInfo);
+ procedure Disconnect; override;
+ property DefaultInterface: IADsWinNTSystemInfo read GetDefaultInterface;
+ property UserName: WideString read Get_UserName;
+ property ComputerName: WideString read Get_ComputerName;
+ property DomainName: WideString read Get_DomainName;
+ property PDC: WideString read Get_PDC;
+ published
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+ property Server: TWinNTSystemInfoProperties read GetServerProperties;
+{$ENDIF}
+ end;
+
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+// *********************************************************************//
+// OLE Server Properties Proxy Class
+// Server Object : TWinNTSystemInfo
+// (This object is used by the IDE's Property Inspector to allow editing
+// of the properties of this server)
+// *********************************************************************//
+ TWinNTSystemInfoProperties = class(TPersistent)
+ private
+ FServer: TWinNTSystemInfo;
+ function GetDefaultInterface: IADsWinNTSystemInfo;
+ constructor Create(AServer: TWinNTSystemInfo);
+ protected
+ function Get_UserName: WideString;
+ function Get_ComputerName: WideString;
+ function Get_DomainName: WideString;
+ function Get_PDC: WideString;
+ public
+ property DefaultInterface: IADsWinNTSystemInfo read GetDefaultInterface;
+ published
+ end;
+{$ENDIF}
+
+// *********************************************************************//
+// The Class CoDNWithBinary provides a Create and CreateRemote method to
+// create instances of the default interface IADsDNWithBinary exposed by
+// the CoClass DNWithBinary. The functions are intended to be used by
+// clients wishing to automate the CoClass objects exposed by the
+// server of this typelibrary.
+// *********************************************************************//
+ CoDNWithBinary = class
+ class function Create: IADsDNWithBinary;
+ class function CreateRemote(const MachineName: string): IADsDNWithBinary;
+ end;
+
+// *********************************************************************//
+// OLE Server Proxy class declaration
+// Server Object : TDNWithBinary
+// Help String :
+// Default Interface: IADsDNWithBinary
+// Def. Intf. DISP? : No
+// Event Interface:
+// TypeFlags : (2) CanCreate
+// *********************************************************************//
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+ TDNWithBinaryProperties= class;
+{$ENDIF}
+ TDNWithBinary = class(TOleServer)
+ private
+ FIntf: IADsDNWithBinary;
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+ FProps: TDNWithBinaryProperties;
+ function GetServerProperties: TDNWithBinaryProperties;
+{$ENDIF}
+ function GetDefaultInterface: IADsDNWithBinary;
+ protected
+ procedure InitServerData; override;
+ function Get_BinaryValue: OleVariant;
+ procedure Set_BinaryValue(retval: OleVariant);
+ function Get_DNString: WideString;
+ procedure Set_DNString(const retval: WideString);
+ public
+ constructor Create(AOwner: TComponent); override;
+ destructor Destroy; override;
+ procedure Connect; override;
+ procedure ConnectTo(svrIntf: IADsDNWithBinary);
+ procedure Disconnect; override;
+ property DefaultInterface: IADsDNWithBinary read GetDefaultInterface;
+ property BinaryValue: OleVariant read Get_BinaryValue write Set_BinaryValue;
+ property DNString: WideString read Get_DNString write Set_DNString;
+ published
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+ property Server: TDNWithBinaryProperties read GetServerProperties;
+{$ENDIF}
+ end;
+
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+// *********************************************************************//
+// OLE Server Properties Proxy Class
+// Server Object : TDNWithBinary
+// (This object is used by the IDE's Property Inspector to allow editing
+// of the properties of this server)
+// *********************************************************************//
+ TDNWithBinaryProperties = class(TPersistent)
+ private
+ FServer: TDNWithBinary;
+ function GetDefaultInterface: IADsDNWithBinary;
+ constructor Create(AServer: TDNWithBinary);
+ protected
+ function Get_BinaryValue: OleVariant;
+ procedure Set_BinaryValue(retval: OleVariant);
+ function Get_DNString: WideString;
+ procedure Set_DNString(const retval: WideString);
+ public
+ property DefaultInterface: IADsDNWithBinary read GetDefaultInterface;
+ published
+ property DNString: WideString read Get_DNString write Set_DNString;
+ end;
+{$ENDIF}
+
+// *********************************************************************//
+// The Class CoDNWithString provides a Create and CreateRemote method to
+// create instances of the default interface IADsDNWithString exposed by
+// the CoClass DNWithString. The functions are intended to be used by
+// clients wishing to automate the CoClass objects exposed by the
+// server of this typelibrary.
+// *********************************************************************//
+ CoDNWithString = class
+ class function Create: IADsDNWithString;
+ class function CreateRemote(const MachineName: string): IADsDNWithString;
+ end;
+
+// *********************************************************************//
+// OLE Server Proxy class declaration
+// Server Object : TDNWithString
+// Help String :
+// Default Interface: IADsDNWithString
+// Def. Intf. DISP? : No
+// Event Interface:
+// TypeFlags : (2) CanCreate
+// *********************************************************************//
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+ TDNWithStringProperties= class;
+{$ENDIF}
+ TDNWithString = class(TOleServer)
+ private
+ FIntf: IADsDNWithString;
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+ FProps: TDNWithStringProperties;
+ function GetServerProperties: TDNWithStringProperties;
+{$ENDIF}
+ function GetDefaultInterface: IADsDNWithString;
+ protected
+ procedure InitServerData; override;
+ function Get_StringValue: WideString;
+ procedure Set_StringValue(const retval: WideString);
+ function Get_DNString: WideString;
+ procedure Set_DNString(const retval: WideString);
+ public
+ constructor Create(AOwner: TComponent); override;
+ destructor Destroy; override;
+ procedure Connect; override;
+ procedure ConnectTo(svrIntf: IADsDNWithString);
+ procedure Disconnect; override;
+ property DefaultInterface: IADsDNWithString read GetDefaultInterface;
+ property StringValue: WideString read Get_StringValue write Set_StringValue;
+ property DNString: WideString read Get_DNString write Set_DNString;
+ published
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+ property Server: TDNWithStringProperties read GetServerProperties;
+{$ENDIF}
+ end;
+
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+// *********************************************************************//
+// OLE Server Properties Proxy Class
+// Server Object : TDNWithString
+// (This object is used by the IDE's Property Inspector to allow editing
+// of the properties of this server)
+// *********************************************************************//
+ TDNWithStringProperties = class(TPersistent)
+ private
+ FServer: TDNWithString;
+ function GetDefaultInterface: IADsDNWithString;
+ constructor Create(AServer: TDNWithString);
+ protected
+ function Get_StringValue: WideString;
+ procedure Set_StringValue(const retval: WideString);
+ function Get_DNString: WideString;
+ procedure Set_DNString(const retval: WideString);
+ public
+ property DefaultInterface: IADsDNWithString read GetDefaultInterface;
+ published
+ property StringValue: WideString read Get_StringValue write Set_StringValue;
+ property DNString: WideString read Get_DNString write Set_DNString;
+ end;
+{$ENDIF}
+
+procedure Register;
+
+implementation
+
+uses ComObj;
+
+class function CoPropertyEntry.Create: IADsPropertyEntry;
+begin
+ Result := CreateComObject(CLASS_PropertyEntry) as IADsPropertyEntry;
+end;
+
+class function CoPropertyEntry.CreateRemote(const MachineName: string): IADsPropertyEntry;
+begin
+ Result := CreateRemoteComObject(MachineName, CLASS_PropertyEntry) as IADsPropertyEntry;
+end;
+
+procedure TPropertyEntry.InitServerData;
+const
+ CServerData: TServerData = (
+ ClassID: '{72D3EDC2-A4C4-11D0-8533-00C04FD8D503}';
+ IntfIID: '{05792C8E-941F-11D0-8529-00C04FD8D503}';
+ EventIID: '';
+ LicenseKey: nil;
+ Version: 500);
+begin
+ ServerData := @CServerData;
+end;
+
+procedure TPropertyEntry.Connect;
+var
+ punk: IUnknown;
+begin
+ if FIntf = nil then
+ begin
+ punk := GetServer;
+ Fintf:= punk as IADsPropertyEntry;
+ end;
+end;
+
+procedure TPropertyEntry.ConnectTo(svrIntf: IADsPropertyEntry);
+begin
+ Disconnect;
+ FIntf := svrIntf;
+end;
+
+procedure TPropertyEntry.DisConnect;
+begin
+ if Fintf <> nil then
+ begin
+ FIntf := nil;
+ end;
+end;
+
+function TPropertyEntry.GetDefaultInterface: IADsPropertyEntry;
+begin
+ if FIntf = nil then
+ Connect;
+ Assert(FIntf <> nil, 'DefaultInterface is NULL. Component is not connected to Server. You must call ''Connect'' or ''ConnectTo'' before this operation');
+ Result := FIntf;
+end;
+
+constructor TPropertyEntry.Create(AOwner: TComponent);
+begin
+ inherited Create(AOwner);
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+ FProps := TPropertyEntryProperties.Create(Self);
+{$ENDIF}
+end;
+
+destructor TPropertyEntry.Destroy;
+begin
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+ FProps.Free;
+{$ENDIF}
+ inherited Destroy;
+end;
+
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+function TPropertyEntry.GetServerProperties: TPropertyEntryProperties;
+begin
+ Result := FProps;
+end;
+{$ENDIF}
+
+function TPropertyEntry.Get_Name: WideString;
+begin
+ Result := DefaultInterface.Get_Name;
+end;
+
+procedure TPropertyEntry.Set_Name(const retval: WideString);
+begin
+ DefaultInterface.Set_Name(retval);
+end;
+
+function TPropertyEntry.Get_ADsType: Integer;
+begin
+ Result := DefaultInterface.Get_ADsType;
+end;
+
+procedure TPropertyEntry.Set_ADsType(retval: Integer);
+begin
+ DefaultInterface.Set_ADsType(retval);
+end;
+
+function TPropertyEntry.Get_ControlCode: Integer;
+begin
+ Result := DefaultInterface.Get_ControlCode;
+end;
+
+procedure TPropertyEntry.Set_ControlCode(retval: Integer);
+begin
+ DefaultInterface.Set_ControlCode(retval);
+end;
+
+function TPropertyEntry.Get_Values: OleVariant;
+begin
+ Result := DefaultInterface.Get_Values;
+end;
+
+procedure TPropertyEntry.Set_Values(retval: OleVariant);
+begin
+ DefaultInterface.Set_Values(retval);
+end;
+
+procedure TPropertyEntry.Clear;
+begin
+ DefaultInterface.Clear;
+end;
+
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+constructor TPropertyEntryProperties.Create(AServer: TPropertyEntry);
+begin
+ inherited Create;
+ FServer := AServer;
+end;
+
+function TPropertyEntryProperties.GetDefaultInterface: IADsPropertyEntry;
+begin
+ Result := FServer.DefaultInterface;
+end;
+
+function TPropertyEntryProperties.Get_Name: WideString;
+begin
+ Result := DefaultInterface.Get_Name;
+end;
+
+procedure TPropertyEntryProperties.Set_Name(const retval: WideString);
+begin
+ DefaultInterface.Set_Name(retval);
+end;
+
+function TPropertyEntryProperties.Get_ADsType: Integer;
+begin
+ Result := DefaultInterface.Get_ADsType;
+end;
+
+procedure TPropertyEntryProperties.Set_ADsType(retval: Integer);
+begin
+ DefaultInterface.Set_ADsType(retval);
+end;
+
+function TPropertyEntryProperties.Get_ControlCode: Integer;
+begin
+ Result := DefaultInterface.Get_ControlCode;
+end;
+
+procedure TPropertyEntryProperties.Set_ControlCode(retval: Integer);
+begin
+ DefaultInterface.Set_ControlCode(retval);
+end;
+
+function TPropertyEntryProperties.Get_Values: OleVariant;
+begin
+ Result := DefaultInterface.Get_Values;
+end;
+
+procedure TPropertyEntryProperties.Set_Values(retval: OleVariant);
+begin
+ DefaultInterface.Set_Values(retval);
+end;
+
+{$ENDIF}
+
+class function CoPropertyValue.Create: IADsPropertyValue;
+begin
+ Result := CreateComObject(CLASS_PropertyValue) as IADsPropertyValue;
+end;
+
+class function CoPropertyValue.CreateRemote(const MachineName: string): IADsPropertyValue;
+begin
+ Result := CreateRemoteComObject(MachineName, CLASS_PropertyValue) as IADsPropertyValue;
+end;
+
+procedure TPropertyValue.InitServerData;
+const
+ CServerData: TServerData = (
+ ClassID: '{7B9E38B0-A97C-11D0-8534-00C04FD8D503}';
+ IntfIID: '{79FA9AD0-A97C-11D0-8534-00C04FD8D503}';
+ EventIID: '';
+ LicenseKey: nil;
+ Version: 500);
+begin
+ ServerData := @CServerData;
+end;
+
+procedure TPropertyValue.Connect;
+var
+ punk: IUnknown;
+begin
+ if FIntf = nil then
+ begin
+ punk := GetServer;
+ Fintf:= punk as IADsPropertyValue;
+ end;
+end;
+
+procedure TPropertyValue.ConnectTo(svrIntf: IADsPropertyValue);
+begin
+ Disconnect;
+ FIntf := svrIntf;
+end;
+
+procedure TPropertyValue.DisConnect;
+begin
+ if Fintf <> nil then
+ begin
+ FIntf := nil;
+ end;
+end;
+
+function TPropertyValue.GetDefaultInterface: IADsPropertyValue;
+begin
+ if FIntf = nil then
+ Connect;
+ Assert(FIntf <> nil, 'DefaultInterface is NULL. Component is not connected to Server. You must call ''Connect'' or ''ConnectTo'' before this operation');
+ Result := FIntf;
+end;
+
+constructor TPropertyValue.Create(AOwner: TComponent);
+begin
+ inherited Create(AOwner);
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+ FProps := TPropertyValueProperties.Create(Self);
+{$ENDIF}
+end;
+
+destructor TPropertyValue.Destroy;
+begin
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+ FProps.Free;
+{$ENDIF}
+ inherited Destroy;
+end;
+
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+function TPropertyValue.GetServerProperties: TPropertyValueProperties;
+begin
+ Result := FProps;
+end;
+{$ENDIF}
+
+function TPropertyValue.Get_ADsType: Integer;
+begin
+ Result := DefaultInterface.Get_ADsType;
+end;
+
+procedure TPropertyValue.Set_ADsType(retval: Integer);
+begin
+ DefaultInterface.Set_ADsType(retval);
+end;
+
+function TPropertyValue.Get_DNString: WideString;
+begin
+ Result := DefaultInterface.Get_DNString;
+end;
+
+procedure TPropertyValue.Set_DNString(const retval: WideString);
+begin
+ DefaultInterface.Set_DNString(retval);
+end;
+
+function TPropertyValue.Get_CaseExactString: WideString;
+begin
+ Result := DefaultInterface.Get_CaseExactString;
+end;
+
+procedure TPropertyValue.Set_CaseExactString(const retval: WideString);
+begin
+ DefaultInterface.Set_CaseExactString(retval);
+end;
+
+function TPropertyValue.Get_CaseIgnoreString: WideString;
+begin
+ Result := DefaultInterface.Get_CaseIgnoreString;
+end;
+
+procedure TPropertyValue.Set_CaseIgnoreString(const retval: WideString);
+begin
+ DefaultInterface.Set_CaseIgnoreString(retval);
+end;
+
+function TPropertyValue.Get_PrintableString: WideString;
+begin
+ Result := DefaultInterface.Get_PrintableString;
+end;
+
+procedure TPropertyValue.Set_PrintableString(const retval: WideString);
+begin
+ DefaultInterface.Set_PrintableString(retval);
+end;
+
+function TPropertyValue.Get_NumericString: WideString;
+begin
+ Result := DefaultInterface.Get_NumericString;
+end;
+
+procedure TPropertyValue.Set_NumericString(const retval: WideString);
+begin
+ DefaultInterface.Set_NumericString(retval);
+end;
+
+function TPropertyValue.Get_Boolean: Integer;
+begin
+ Result := DefaultInterface.Get_Boolean;
+end;
+
+procedure TPropertyValue.Set_Boolean(retval: Integer);
+begin
+ DefaultInterface.Set_Boolean(retval);
+end;
+
+function TPropertyValue.Get_Integer: Integer;
+begin
+ Result := DefaultInterface.Get_Integer;
+end;
+
+procedure TPropertyValue.Set_Integer(retval: Integer);
+begin
+ DefaultInterface.Set_Integer(retval);
+end;
+
+function TPropertyValue.Get_OctetString: OleVariant;
+begin
+ Result := DefaultInterface.Get_OctetString;
+end;
+
+procedure TPropertyValue.Set_OctetString(retval: OleVariant);
+begin
+ DefaultInterface.Set_OctetString(retval);
+end;
+
+function TPropertyValue.Get_SecurityDescriptor: IDispatch;
+begin
+ Result := DefaultInterface.Get_SecurityDescriptor;
+end;
+
+procedure TPropertyValue.Set_SecurityDescriptor(const retval: IDispatch);
+begin
+ DefaultInterface.Set_SecurityDescriptor(retval);
+end;
+
+function TPropertyValue.Get_LargeInteger: IDispatch;
+begin
+ Result := DefaultInterface.Get_LargeInteger;
+end;
+
+procedure TPropertyValue.Set_LargeInteger(const retval: IDispatch);
+begin
+ DefaultInterface.Set_LargeInteger(retval);
+end;
+
+function TPropertyValue.Get_UTCTime: TDateTime;
+begin
+ Result := DefaultInterface.Get_UTCTime;
+end;
+
+procedure TPropertyValue.Set_UTCTime(retval: TDateTime);
+begin
+ DefaultInterface.Set_UTCTime(retval);
+end;
+
+procedure TPropertyValue.Clear;
+begin
+ DefaultInterface.Clear;
+end;
+
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+constructor TPropertyValueProperties.Create(AServer: TPropertyValue);
+begin
+ inherited Create;
+ FServer := AServer;
+end;
+
+function TPropertyValueProperties.GetDefaultInterface: IADsPropertyValue;
+begin
+ Result := FServer.DefaultInterface;
+end;
+
+function TPropertyValueProperties.Get_ADsType: Integer;
+begin
+ Result := DefaultInterface.Get_ADsType;
+end;
+
+procedure TPropertyValueProperties.Set_ADsType(retval: Integer);
+begin
+ DefaultInterface.Set_ADsType(retval);
+end;
+
+function TPropertyValueProperties.Get_DNString: WideString;
+begin
+ Result := DefaultInterface.Get_DNString;
+end;
+
+procedure TPropertyValueProperties.Set_DNString(const retval: WideString);
+begin
+ DefaultInterface.Set_DNString(retval);
+end;
+
+function TPropertyValueProperties.Get_CaseExactString: WideString;
+begin
+ Result := DefaultInterface.Get_CaseExactString;
+end;
+
+procedure TPropertyValueProperties.Set_CaseExactString(const retval: WideString);
+begin
+ DefaultInterface.Set_CaseExactString(retval);
+end;
+
+function TPropertyValueProperties.Get_CaseIgnoreString: WideString;
+begin
+ Result := DefaultInterface.Get_CaseIgnoreString;
+end;
+
+procedure TPropertyValueProperties.Set_CaseIgnoreString(const retval: WideString);
+begin
+ DefaultInterface.Set_CaseIgnoreString(retval);
+end;
+
+function TPropertyValueProperties.Get_PrintableString: WideString;
+begin
+ Result := DefaultInterface.Get_PrintableString;
+end;
+
+procedure TPropertyValueProperties.Set_PrintableString(const retval: WideString);
+begin
+ DefaultInterface.Set_PrintableString(retval);
+end;
+
+function TPropertyValueProperties.Get_NumericString: WideString;
+begin
+ Result := DefaultInterface.Get_NumericString;
+end;
+
+procedure TPropertyValueProperties.Set_NumericString(const retval: WideString);
+begin
+ DefaultInterface.Set_NumericString(retval);
+end;
+
+function TPropertyValueProperties.Get_Boolean: Integer;
+begin
+ Result := DefaultInterface.Get_Boolean;
+end;
+
+procedure TPropertyValueProperties.Set_Boolean(retval: Integer);
+begin
+ DefaultInterface.Set_Boolean(retval);
+end;
+
+function TPropertyValueProperties.Get_Integer: Integer;
+begin
+ Result := DefaultInterface.Get_Integer;
+end;
+
+procedure TPropertyValueProperties.Set_Integer(retval: Integer);
+begin
+ DefaultInterface.Set_Integer(retval);
+end;
+
+function TPropertyValueProperties.Get_OctetString: OleVariant;
+begin
+ Result := DefaultInterface.Get_OctetString;
+end;
+
+procedure TPropertyValueProperties.Set_OctetString(retval: OleVariant);
+begin
+ DefaultInterface.Set_OctetString(retval);
+end;
+
+function TPropertyValueProperties.Get_SecurityDescriptor: IDispatch;
+begin
+ Result := DefaultInterface.Get_SecurityDescriptor;
+end;
+
+procedure TPropertyValueProperties.Set_SecurityDescriptor(const retval: IDispatch);
+begin
+ DefaultInterface.Set_SecurityDescriptor(retval);
+end;
+
+function TPropertyValueProperties.Get_LargeInteger: IDispatch;
+begin
+ Result := DefaultInterface.Get_LargeInteger;
+end;
+
+procedure TPropertyValueProperties.Set_LargeInteger(const retval: IDispatch);
+begin
+ DefaultInterface.Set_LargeInteger(retval);
+end;
+
+function TPropertyValueProperties.Get_UTCTime: TDateTime;
+begin
+ Result := DefaultInterface.Get_UTCTime;
+end;
+
+procedure TPropertyValueProperties.Set_UTCTime(retval: TDateTime);
+begin
+ DefaultInterface.Set_UTCTime(retval);
+end;
+
+{$ENDIF}
+
+class function CoAccessControlEntry.Create: IADsAccessControlEntry;
+begin
+ Result := CreateComObject(CLASS_AccessControlEntry) as IADsAccessControlEntry;
+end;
+
+class function CoAccessControlEntry.CreateRemote(const MachineName: string): IADsAccessControlEntry;
+begin
+ Result := CreateRemoteComObject(MachineName, CLASS_AccessControlEntry) as IADsAccessControlEntry;
+end;
+
+procedure TAccessControlEntry.InitServerData;
+const
+ CServerData: TServerData = (
+ ClassID: '{B75AC000-9BDD-11D0-852C-00C04FD8D503}';
+ IntfIID: '{B4F3A14C-9BDD-11D0-852C-00C04FD8D503}';
+ EventIID: '';
+ LicenseKey: nil;
+ Version: 500);
+begin
+ ServerData := @CServerData;
+end;
+
+procedure TAccessControlEntry.Connect;
+var
+ punk: IUnknown;
+begin
+ if FIntf = nil then
+ begin
+ punk := GetServer;
+ Fintf:= punk as IADsAccessControlEntry;
+ end;
+end;
+
+procedure TAccessControlEntry.ConnectTo(svrIntf: IADsAccessControlEntry);
+begin
+ Disconnect;
+ FIntf := svrIntf;
+end;
+
+procedure TAccessControlEntry.DisConnect;
+begin
+ if Fintf <> nil then
+ begin
+ FIntf := nil;
+ end;
+end;
+
+function TAccessControlEntry.GetDefaultInterface: IADsAccessControlEntry;
+begin
+ if FIntf = nil then
+ Connect;
+ Assert(FIntf <> nil, 'DefaultInterface is NULL. Component is not connected to Server. You must call ''Connect'' or ''ConnectTo'' before this operation');
+ Result := FIntf;
+end;
+
+constructor TAccessControlEntry.Create(AOwner: TComponent);
+begin
+ inherited Create(AOwner);
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+ FProps := TAccessControlEntryProperties.Create(Self);
+{$ENDIF}
+end;
+
+destructor TAccessControlEntry.Destroy;
+begin
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+ FProps.Free;
+{$ENDIF}
+ inherited Destroy;
+end;
+
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+function TAccessControlEntry.GetServerProperties: TAccessControlEntryProperties;
+begin
+ Result := FProps;
+end;
+{$ENDIF}
+
+function TAccessControlEntry.Get_AccessMask: Integer;
+begin
+ Result := DefaultInterface.Get_AccessMask;
+end;
+
+procedure TAccessControlEntry.Set_AccessMask(retval: Integer);
+begin
+ DefaultInterface.Set_AccessMask(retval);
+end;
+
+function TAccessControlEntry.Get_AceType: Integer;
+begin
+ Result := DefaultInterface.Get_AceType;
+end;
+
+procedure TAccessControlEntry.Set_AceType(retval: Integer);
+begin
+ DefaultInterface.Set_AceType(retval);
+end;
+
+function TAccessControlEntry.Get_AceFlags: Integer;
+begin
+ Result := DefaultInterface.Get_AceFlags;
+end;
+
+procedure TAccessControlEntry.Set_AceFlags(retval: Integer);
+begin
+ DefaultInterface.Set_AceFlags(retval);
+end;
+
+function TAccessControlEntry.Get_Flags: Integer;
+begin
+ Result := DefaultInterface.Get_Flags;
+end;
+
+procedure TAccessControlEntry.Set_Flags(retval: Integer);
+begin
+ DefaultInterface.Set_Flags(retval);
+end;
+
+function TAccessControlEntry.Get_ObjectType: WideString;
+begin
+ Result := DefaultInterface.Get_ObjectType;
+end;
+
+procedure TAccessControlEntry.Set_ObjectType(const retval: WideString);
+begin
+ DefaultInterface.Set_ObjectType(retval);
+end;
+
+function TAccessControlEntry.Get_InheritedObjectType: WideString;
+begin
+ Result := DefaultInterface.Get_InheritedObjectType;
+end;
+
+procedure TAccessControlEntry.Set_InheritedObjectType(const retval: WideString);
+begin
+ DefaultInterface.Set_InheritedObjectType(retval);
+end;
+
+function TAccessControlEntry.Get_Trustee: WideString;
+begin
+ Result := DefaultInterface.Get_Trustee;
+end;
+
+procedure TAccessControlEntry.Set_Trustee(const retval: WideString);
+begin
+ DefaultInterface.Set_Trustee(retval);
+end;
+
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+constructor TAccessControlEntryProperties.Create(AServer: TAccessControlEntry);
+begin
+ inherited Create;
+ FServer := AServer;
+end;
+
+function TAccessControlEntryProperties.GetDefaultInterface: IADsAccessControlEntry;
+begin
+ Result := FServer.DefaultInterface;
+end;
+
+function TAccessControlEntryProperties.Get_AccessMask: Integer;
+begin
+ Result := DefaultInterface.Get_AccessMask;
+end;
+
+procedure TAccessControlEntryProperties.Set_AccessMask(retval: Integer);
+begin
+ DefaultInterface.Set_AccessMask(retval);
+end;
+
+function TAccessControlEntryProperties.Get_AceType: Integer;
+begin
+ Result := DefaultInterface.Get_AceType;
+end;
+
+procedure TAccessControlEntryProperties.Set_AceType(retval: Integer);
+begin
+ DefaultInterface.Set_AceType(retval);
+end;
+
+function TAccessControlEntryProperties.Get_AceFlags: Integer;
+begin
+ Result := DefaultInterface.Get_AceFlags;
+end;
+
+procedure TAccessControlEntryProperties.Set_AceFlags(retval: Integer);
+begin
+ DefaultInterface.Set_AceFlags(retval);
+end;
+
+function TAccessControlEntryProperties.Get_Flags: Integer;
+begin
+ Result := DefaultInterface.Get_Flags;
+end;
+
+procedure TAccessControlEntryProperties.Set_Flags(retval: Integer);
+begin
+ DefaultInterface.Set_Flags(retval);
+end;
+
+function TAccessControlEntryProperties.Get_ObjectType: WideString;
+begin
+ Result := DefaultInterface.Get_ObjectType;
+end;
+
+procedure TAccessControlEntryProperties.Set_ObjectType(const retval: WideString);
+begin
+ DefaultInterface.Set_ObjectType(retval);
+end;
+
+function TAccessControlEntryProperties.Get_InheritedObjectType: WideString;
+begin
+ Result := DefaultInterface.Get_InheritedObjectType;
+end;
+
+procedure TAccessControlEntryProperties.Set_InheritedObjectType(const retval: WideString);
+begin
+ DefaultInterface.Set_InheritedObjectType(retval);
+end;
+
+function TAccessControlEntryProperties.Get_Trustee: WideString;
+begin
+ Result := DefaultInterface.Get_Trustee;
+end;
+
+procedure TAccessControlEntryProperties.Set_Trustee(const retval: WideString);
+begin
+ DefaultInterface.Set_Trustee(retval);
+end;
+
+{$ENDIF}
+
+class function CoAccessControlList.Create: IADsAccessControlList;
+begin
+ Result := CreateComObject(CLASS_AccessControlList) as IADsAccessControlList;
+end;
+
+class function CoAccessControlList.CreateRemote(const MachineName: string): IADsAccessControlList;
+begin
+ Result := CreateRemoteComObject(MachineName, CLASS_AccessControlList) as IADsAccessControlList;
+end;
+
+procedure TAccessControlList.InitServerData;
+const
+ CServerData: TServerData = (
+ ClassID: '{B85EA052-9BDD-11D0-852C-00C04FD8D503}';
+ IntfIID: '{B7EE91CC-9BDD-11D0-852C-00C04FD8D503}';
+ EventIID: '';
+ LicenseKey: nil;
+ Version: 500);
+begin
+ ServerData := @CServerData;
+end;
+
+procedure TAccessControlList.Connect;
+var
+ punk: IUnknown;
+begin
+ if FIntf = nil then
+ begin
+ punk := GetServer;
+ Fintf:= punk as IADsAccessControlList;
+ end;
+end;
+
+procedure TAccessControlList.ConnectTo(svrIntf: IADsAccessControlList);
+begin
+ Disconnect;
+ FIntf := svrIntf;
+end;
+
+procedure TAccessControlList.DisConnect;
+begin
+ if Fintf <> nil then
+ begin
+ FIntf := nil;
+ end;
+end;
+
+function TAccessControlList.GetDefaultInterface: IADsAccessControlList;
+begin
+ if FIntf = nil then
+ Connect;
+ Assert(FIntf <> nil, 'DefaultInterface is NULL. Component is not connected to Server. You must call ''Connect'' or ''ConnectTo'' before this operation');
+ Result := FIntf;
+end;
+
+constructor TAccessControlList.Create(AOwner: TComponent);
+begin
+ inherited Create(AOwner);
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+ FProps := TAccessControlListProperties.Create(Self);
+{$ENDIF}
+end;
+
+destructor TAccessControlList.Destroy;
+begin
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+ FProps.Free;
+{$ENDIF}
+ inherited Destroy;
+end;
+
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+function TAccessControlList.GetServerProperties: TAccessControlListProperties;
+begin
+ Result := FProps;
+end;
+{$ENDIF}
+
+function TAccessControlList.Get_AclRevision: Integer;
+begin
+ Result := DefaultInterface.Get_AclRevision;
+end;
+
+procedure TAccessControlList.Set_AclRevision(retval: Integer);
+begin
+ DefaultInterface.Set_AclRevision(retval);
+end;
+
+function TAccessControlList.Get_AceCount: Integer;
+begin
+ Result := DefaultInterface.Get_AceCount;
+end;
+
+procedure TAccessControlList.Set_AceCount(retval: Integer);
+begin
+ DefaultInterface.Set_AceCount(retval);
+end;
+
+procedure TAccessControlList.AddAce(const pAccessControlEntry: IDispatch);
+begin
+ DefaultInterface.AddAce(pAccessControlEntry);
+end;
+
+procedure TAccessControlList.RemoveAce(const pAccessControlEntry: IDispatch);
+begin
+ DefaultInterface.RemoveAce(pAccessControlEntry);
+end;
+
+function TAccessControlList.CopyAccessList: IDispatch;
+begin
+ Result := DefaultInterface.CopyAccessList;
+end;
+
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+constructor TAccessControlListProperties.Create(AServer: TAccessControlList);
+begin
+ inherited Create;
+ FServer := AServer;
+end;
+
+function TAccessControlListProperties.GetDefaultInterface: IADsAccessControlList;
+begin
+ Result := FServer.DefaultInterface;
+end;
+
+function TAccessControlListProperties.Get_AclRevision: Integer;
+begin
+ Result := DefaultInterface.Get_AclRevision;
+end;
+
+procedure TAccessControlListProperties.Set_AclRevision(retval: Integer);
+begin
+ DefaultInterface.Set_AclRevision(retval);
+end;
+
+function TAccessControlListProperties.Get_AceCount: Integer;
+begin
+ Result := DefaultInterface.Get_AceCount;
+end;
+
+procedure TAccessControlListProperties.Set_AceCount(retval: Integer);
+begin
+ DefaultInterface.Set_AceCount(retval);
+end;
+
+{$ENDIF}
+
+class function CoSecurityDescriptor.Create: IADsSecurityDescriptor;
+begin
+ Result := CreateComObject(CLASS_SecurityDescriptor) as IADsSecurityDescriptor;
+end;
+
+class function CoSecurityDescriptor.CreateRemote(const MachineName: string): IADsSecurityDescriptor;
+begin
+ Result := CreateRemoteComObject(MachineName, CLASS_SecurityDescriptor) as IADsSecurityDescriptor;
+end;
+
+procedure TSecurityDescriptor.InitServerData;
+const
+ CServerData: TServerData = (
+ ClassID: '{B958F73C-9BDD-11D0-852C-00C04FD8D503}';
+ IntfIID: '{B8C787CA-9BDD-11D0-852C-00C04FD8D503}';
+ EventIID: '';
+ LicenseKey: nil;
+ Version: 500);
+begin
+ ServerData := @CServerData;
+end;
+
+procedure TSecurityDescriptor.Connect;
+var
+ punk: IUnknown;
+begin
+ if FIntf = nil then
+ begin
+ punk := GetServer;
+ Fintf:= punk as IADsSecurityDescriptor;
+ end;
+end;
+
+procedure TSecurityDescriptor.ConnectTo(svrIntf: IADsSecurityDescriptor);
+begin
+ Disconnect;
+ FIntf := svrIntf;
+end;
+
+procedure TSecurityDescriptor.DisConnect;
+begin
+ if Fintf <> nil then
+ begin
+ FIntf := nil;
+ end;
+end;
+
+function TSecurityDescriptor.GetDefaultInterface: IADsSecurityDescriptor;
+begin
+ if FIntf = nil then
+ Connect;
+ Assert(FIntf <> nil, 'DefaultInterface is NULL. Component is not connected to Server. You must call ''Connect'' or ''ConnectTo'' before this operation');
+ Result := FIntf;
+end;
+
+constructor TSecurityDescriptor.Create(AOwner: TComponent);
+begin
+ inherited Create(AOwner);
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+ FProps := TSecurityDescriptorProperties.Create(Self);
+{$ENDIF}
+end;
+
+destructor TSecurityDescriptor.Destroy;
+begin
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+ FProps.Free;
+{$ENDIF}
+ inherited Destroy;
+end;
+
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+function TSecurityDescriptor.GetServerProperties: TSecurityDescriptorProperties;
+begin
+ Result := FProps;
+end;
+{$ENDIF}
+
+function TSecurityDescriptor.Get_Revision: Integer;
+begin
+ Result := DefaultInterface.Get_Revision;
+end;
+
+procedure TSecurityDescriptor.Set_Revision(retval: Integer);
+begin
+ DefaultInterface.Set_Revision(retval);
+end;
+
+function TSecurityDescriptor.Get_Control: Integer;
+begin
+ Result := DefaultInterface.Get_Control;
+end;
+
+procedure TSecurityDescriptor.Set_Control(retval: Integer);
+begin
+ DefaultInterface.Set_Control(retval);
+end;
+
+function TSecurityDescriptor.Get_Owner: WideString;
+begin
+ Result := DefaultInterface.Get_Owner;
+end;
+
+procedure TSecurityDescriptor.Set_Owner(const retval: WideString);
+begin
+ DefaultInterface.Set_Owner(retval);
+end;
+
+function TSecurityDescriptor.Get_OwnerDefaulted: WordBool;
+begin
+ Result := DefaultInterface.Get_OwnerDefaulted;
+end;
+
+procedure TSecurityDescriptor.Set_OwnerDefaulted(retval: WordBool);
+begin
+ DefaultInterface.Set_OwnerDefaulted(retval);
+end;
+
+function TSecurityDescriptor.Get_Group: WideString;
+begin
+ Result := DefaultInterface.Get_Group;
+end;
+
+procedure TSecurityDescriptor.Set_Group(const retval: WideString);
+begin
+ DefaultInterface.Set_Group(retval);
+end;
+
+function TSecurityDescriptor.Get_GroupDefaulted: WordBool;
+begin
+ Result := DefaultInterface.Get_GroupDefaulted;
+end;
+
+procedure TSecurityDescriptor.Set_GroupDefaulted(retval: WordBool);
+begin
+ DefaultInterface.Set_GroupDefaulted(retval);
+end;
+
+function TSecurityDescriptor.Get_DiscretionaryAcl: IDispatch;
+begin
+ Result := DefaultInterface.Get_DiscretionaryAcl;
+end;
+
+procedure TSecurityDescriptor.Set_DiscretionaryAcl(const retval: IDispatch);
+begin
+ DefaultInterface.Set_DiscretionaryAcl(retval);
+end;
+
+function TSecurityDescriptor.Get_DaclDefaulted: WordBool;
+begin
+ Result := DefaultInterface.Get_DaclDefaulted;
+end;
+
+procedure TSecurityDescriptor.Set_DaclDefaulted(retval: WordBool);
+begin
+ DefaultInterface.Set_DaclDefaulted(retval);
+end;
+
+function TSecurityDescriptor.Get_SystemAcl: IDispatch;
+begin
+ Result := DefaultInterface.Get_SystemAcl;
+end;
+
+procedure TSecurityDescriptor.Set_SystemAcl(const retval: IDispatch);
+begin
+ DefaultInterface.Set_SystemAcl(retval);
+end;
+
+function TSecurityDescriptor.Get_SaclDefaulted: WordBool;
+begin
+ Result := DefaultInterface.Get_SaclDefaulted;
+end;
+
+procedure TSecurityDescriptor.Set_SaclDefaulted(retval: WordBool);
+begin
+ DefaultInterface.Set_SaclDefaulted(retval);
+end;
+
+function TSecurityDescriptor.CopySecurityDescriptor: IDispatch;
+begin
+ Result := DefaultInterface.CopySecurityDescriptor;
+end;
+
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+constructor TSecurityDescriptorProperties.Create(AServer: TSecurityDescriptor);
+begin
+ inherited Create;
+ FServer := AServer;
+end;
+
+function TSecurityDescriptorProperties.GetDefaultInterface: IADsSecurityDescriptor;
+begin
+ Result := FServer.DefaultInterface;
+end;
+
+function TSecurityDescriptorProperties.Get_Revision: Integer;
+begin
+ Result := DefaultInterface.Get_Revision;
+end;
+
+procedure TSecurityDescriptorProperties.Set_Revision(retval: Integer);
+begin
+ DefaultInterface.Set_Revision(retval);
+end;
+
+function TSecurityDescriptorProperties.Get_Control: Integer;
+begin
+ Result := DefaultInterface.Get_Control;
+end;
+
+procedure TSecurityDescriptorProperties.Set_Control(retval: Integer);
+begin
+ DefaultInterface.Set_Control(retval);
+end;
+
+function TSecurityDescriptorProperties.Get_Owner: WideString;
+begin
+ Result := DefaultInterface.Get_Owner;
+end;
+
+procedure TSecurityDescriptorProperties.Set_Owner(const retval: WideString);
+begin
+ DefaultInterface.Set_Owner(retval);
+end;
+
+function TSecurityDescriptorProperties.Get_OwnerDefaulted: WordBool;
+begin
+ Result := DefaultInterface.Get_OwnerDefaulted;
+end;
+
+procedure TSecurityDescriptorProperties.Set_OwnerDefaulted(retval: WordBool);
+begin
+ DefaultInterface.Set_OwnerDefaulted(retval);
+end;
+
+function TSecurityDescriptorProperties.Get_Group: WideString;
+begin
+ Result := DefaultInterface.Get_Group;
+end;
+
+procedure TSecurityDescriptorProperties.Set_Group(const retval: WideString);
+begin
+ DefaultInterface.Set_Group(retval);
+end;
+
+function TSecurityDescriptorProperties.Get_GroupDefaulted: WordBool;
+begin
+ Result := DefaultInterface.Get_GroupDefaulted;
+end;
+
+procedure TSecurityDescriptorProperties.Set_GroupDefaulted(retval: WordBool);
+begin
+ DefaultInterface.Set_GroupDefaulted(retval);
+end;
+
+function TSecurityDescriptorProperties.Get_DiscretionaryAcl: IDispatch;
+begin
+ Result := DefaultInterface.Get_DiscretionaryAcl;
+end;
+
+procedure TSecurityDescriptorProperties.Set_DiscretionaryAcl(const retval: IDispatch);
+begin
+ DefaultInterface.Set_DiscretionaryAcl(retval);
+end;
+
+function TSecurityDescriptorProperties.Get_DaclDefaulted: WordBool;
+begin
+ Result := DefaultInterface.Get_DaclDefaulted;
+end;
+
+procedure TSecurityDescriptorProperties.Set_DaclDefaulted(retval: WordBool);
+begin
+ DefaultInterface.Set_DaclDefaulted(retval);
+end;
+
+function TSecurityDescriptorProperties.Get_SystemAcl: IDispatch;
+begin
+ Result := DefaultInterface.Get_SystemAcl;
+end;
+
+procedure TSecurityDescriptorProperties.Set_SystemAcl(const retval: IDispatch);
+begin
+ DefaultInterface.Set_SystemAcl(retval);
+end;
+
+function TSecurityDescriptorProperties.Get_SaclDefaulted: WordBool;
+begin
+ Result := DefaultInterface.Get_SaclDefaulted;
+end;
+
+procedure TSecurityDescriptorProperties.Set_SaclDefaulted(retval: WordBool);
+begin
+ DefaultInterface.Set_SaclDefaulted(retval);
+end;
+
+{$ENDIF}
+
+class function CoLargeInteger.Create: IADsLargeInteger;
+begin
+ Result := CreateComObject(CLASS_LargeInteger) as IADsLargeInteger;
+end;
+
+class function CoLargeInteger.CreateRemote(const MachineName: string): IADsLargeInteger;
+begin
+ Result := CreateRemoteComObject(MachineName, CLASS_LargeInteger) as IADsLargeInteger;
+end;
+
+procedure TLargeInteger.InitServerData;
+const
+ CServerData: TServerData = (
+ ClassID: '{927971F5-0939-11D1-8BE1-00C04FD8D503}';
+ IntfIID: '{9068270B-0939-11D1-8BE1-00C04FD8D503}';
+ EventIID: '';
+ LicenseKey: nil;
+ Version: 500);
+begin
+ ServerData := @CServerData;
+end;
+
+procedure TLargeInteger.Connect;
+var
+ punk: IUnknown;
+begin
+ if FIntf = nil then
+ begin
+ punk := GetServer;
+ Fintf:= punk as IADsLargeInteger;
+ end;
+end;
+
+procedure TLargeInteger.ConnectTo(svrIntf: IADsLargeInteger);
+begin
+ Disconnect;
+ FIntf := svrIntf;
+end;
+
+procedure TLargeInteger.DisConnect;
+begin
+ if Fintf <> nil then
+ begin
+ FIntf := nil;
+ end;
+end;
+
+function TLargeInteger.GetDefaultInterface: IADsLargeInteger;
+begin
+ if FIntf = nil then
+ Connect;
+ Assert(FIntf <> nil, 'DefaultInterface is NULL. Component is not connected to Server. You must call ''Connect'' or ''ConnectTo'' before this operation');
+ Result := FIntf;
+end;
+
+constructor TLargeInteger.Create(AOwner: TComponent);
+begin
+ inherited Create(AOwner);
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+ FProps := TLargeIntegerProperties.Create(Self);
+{$ENDIF}
+end;
+
+destructor TLargeInteger.Destroy;
+begin
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+ FProps.Free;
+{$ENDIF}
+ inherited Destroy;
+end;
+
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+function TLargeInteger.GetServerProperties: TLargeIntegerProperties;
+begin
+ Result := FProps;
+end;
+{$ENDIF}
+
+function TLargeInteger.Get_HighPart: Integer;
+begin
+ Result := DefaultInterface.Get_HighPart;
+end;
+
+procedure TLargeInteger.Set_HighPart(retval: Integer);
+begin
+ DefaultInterface.Set_HighPart(retval);
+end;
+
+function TLargeInteger.Get_LowPart: Integer;
+begin
+ Result := DefaultInterface.Get_LowPart;
+end;
+
+procedure TLargeInteger.Set_LowPart(retval: Integer);
+begin
+ DefaultInterface.Set_LowPart(retval);
+end;
+
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+constructor TLargeIntegerProperties.Create(AServer: TLargeInteger);
+begin
+ inherited Create;
+ FServer := AServer;
+end;
+
+function TLargeIntegerProperties.GetDefaultInterface: IADsLargeInteger;
+begin
+ Result := FServer.DefaultInterface;
+end;
+
+function TLargeIntegerProperties.Get_HighPart: Integer;
+begin
+ Result := DefaultInterface.Get_HighPart;
+end;
+
+procedure TLargeIntegerProperties.Set_HighPart(retval: Integer);
+begin
+ DefaultInterface.Set_HighPart(retval);
+end;
+
+function TLargeIntegerProperties.Get_LowPart: Integer;
+begin
+ Result := DefaultInterface.Get_LowPart;
+end;
+
+procedure TLargeIntegerProperties.Set_LowPart(retval: Integer);
+begin
+ DefaultInterface.Set_LowPart(retval);
+end;
+
+{$ENDIF}
+
+class function CoNameTranslate.Create: IADsNameTranslate;
+begin
+ Result := CreateComObject(CLASS_NameTranslate) as IADsNameTranslate;
+end;
+
+class function CoNameTranslate.CreateRemote(const MachineName: string): IADsNameTranslate;
+begin
+ Result := CreateRemoteComObject(MachineName, CLASS_NameTranslate) as IADsNameTranslate;
+end;
+
+procedure TNameTranslate.InitServerData;
+const
+ CServerData: TServerData = (
+ ClassID: '{274FAE1F-3626-11D1-A3A4-00C04FB950DC}';
+ IntfIID: '{B1B272A3-3625-11D1-A3A4-00C04FB950DC}';
+ EventIID: '';
+ LicenseKey: nil;
+ Version: 500);
+begin
+ ServerData := @CServerData;
+end;
+
+procedure TNameTranslate.Connect;
+var
+ punk: IUnknown;
+begin
+ if FIntf = nil then
+ begin
+ punk := GetServer;
+ Fintf:= punk as IADsNameTranslate;
+ end;
+end;
+
+procedure TNameTranslate.ConnectTo(svrIntf: IADsNameTranslate);
+begin
+ Disconnect;
+ FIntf := svrIntf;
+end;
+
+procedure TNameTranslate.DisConnect;
+begin
+ if Fintf <> nil then
+ begin
+ FIntf := nil;
+ end;
+end;
+
+function TNameTranslate.GetDefaultInterface: IADsNameTranslate;
+begin
+ if FIntf = nil then
+ Connect;
+ Assert(FIntf <> nil, 'DefaultInterface is NULL. Component is not connected to Server. You must call ''Connect'' or ''ConnectTo'' before this operation');
+ Result := FIntf;
+end;
+
+constructor TNameTranslate.Create(AOwner: TComponent);
+begin
+ inherited Create(AOwner);
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+ FProps := TNameTranslateProperties.Create(Self);
+{$ENDIF}
+end;
+
+destructor TNameTranslate.Destroy;
+begin
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+ FProps.Free;
+{$ENDIF}
+ inherited Destroy;
+end;
+
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+function TNameTranslate.GetServerProperties: TNameTranslateProperties;
+begin
+ Result := FProps;
+end;
+{$ENDIF}
+
+procedure TNameTranslate.Set_ChaseReferral(Param1: Integer);
+begin
+ DefaultInterface.Set_ChaseReferral(Param1);
+end;
+
+procedure TNameTranslate.Init(lnSetType: Integer; const bstrADsPath: WideString);
+begin
+ DefaultInterface.Init(lnSetType, bstrADsPath);
+end;
+
+procedure TNameTranslate.InitEx(lnSetType: Integer; const bstrADsPath: WideString;
+ const bstrUserID: WideString; const bstrDomain: WideString;
+ const bstrPassword: WideString);
+begin
+ DefaultInterface.InitEx(lnSetType, bstrADsPath, bstrUserID, bstrDomain, bstrPassword);
+end;
+
+procedure TNameTranslate.Set_(lnSetType: Integer; const bstrADsPath: WideString);
+begin
+ DefaultInterface.Set_(lnSetType, bstrADsPath);
+end;
+
+function TNameTranslate.Get(lnFormatType: Integer): WideString;
+begin
+ Result := DefaultInterface.Get(lnFormatType);
+end;
+
+procedure TNameTranslate.SetEx(lnFormatType: Integer; pVar: OleVariant);
+begin
+ DefaultInterface.SetEx(lnFormatType, pVar);
+end;
+
+function TNameTranslate.GetEx(lnFormatType: Integer): OleVariant;
+begin
+ Result := DefaultInterface.GetEx(lnFormatType);
+end;
+
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+constructor TNameTranslateProperties.Create(AServer: TNameTranslate);
+begin
+ inherited Create;
+ FServer := AServer;
+end;
+
+function TNameTranslateProperties.GetDefaultInterface: IADsNameTranslate;
+begin
+ Result := FServer.DefaultInterface;
+end;
+
+procedure TNameTranslateProperties.Set_ChaseReferral(Param1: Integer);
+begin
+ DefaultInterface.Set_ChaseReferral(Param1);
+end;
+
+{$ENDIF}
+
+class function CoCaseIgnoreList.Create: IADsCaseIgnoreList;
+begin
+ Result := CreateComObject(CLASS_CaseIgnoreList) as IADsCaseIgnoreList;
+end;
+
+class function CoCaseIgnoreList.CreateRemote(const MachineName: string): IADsCaseIgnoreList;
+begin
+ Result := CreateRemoteComObject(MachineName, CLASS_CaseIgnoreList) as IADsCaseIgnoreList;
+end;
+
+procedure TCaseIgnoreList.InitServerData;
+const
+ CServerData: TServerData = (
+ ClassID: '{15F88A55-4680-11D1-A3B4-00C04FB950DC}';
+ IntfIID: '{7B66B533-4680-11D1-A3B4-00C04FB950DC}';
+ EventIID: '';
+ LicenseKey: nil;
+ Version: 500);
+begin
+ ServerData := @CServerData;
+end;
+
+procedure TCaseIgnoreList.Connect;
+var
+ punk: IUnknown;
+begin
+ if FIntf = nil then
+ begin
+ punk := GetServer;
+ Fintf:= punk as IADsCaseIgnoreList;
+ end;
+end;
+
+procedure TCaseIgnoreList.ConnectTo(svrIntf: IADsCaseIgnoreList);
+begin
+ Disconnect;
+ FIntf := svrIntf;
+end;
+
+procedure TCaseIgnoreList.DisConnect;
+begin
+ if Fintf <> nil then
+ begin
+ FIntf := nil;
+ end;
+end;
+
+function TCaseIgnoreList.GetDefaultInterface: IADsCaseIgnoreList;
+begin
+ if FIntf = nil then
+ Connect;
+ Assert(FIntf <> nil, 'DefaultInterface is NULL. Component is not connected to Server. You must call ''Connect'' or ''ConnectTo'' before this operation');
+ Result := FIntf;
+end;
+
+constructor TCaseIgnoreList.Create(AOwner: TComponent);
+begin
+ inherited Create(AOwner);
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+ FProps := TCaseIgnoreListProperties.Create(Self);
+{$ENDIF}
+end;
+
+destructor TCaseIgnoreList.Destroy;
+begin
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+ FProps.Free;
+{$ENDIF}
+ inherited Destroy;
+end;
+
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+function TCaseIgnoreList.GetServerProperties: TCaseIgnoreListProperties;
+begin
+ Result := FProps;
+end;
+{$ENDIF}
+
+function TCaseIgnoreList.Get_CaseIgnoreList: OleVariant;
+begin
+ Result := DefaultInterface.Get_CaseIgnoreList;
+end;
+
+procedure TCaseIgnoreList.Set_CaseIgnoreList(retval: OleVariant);
+begin
+ DefaultInterface.Set_CaseIgnoreList(retval);
+end;
+
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+constructor TCaseIgnoreListProperties.Create(AServer: TCaseIgnoreList);
+begin
+ inherited Create;
+ FServer := AServer;
+end;
+
+function TCaseIgnoreListProperties.GetDefaultInterface: IADsCaseIgnoreList;
+begin
+ Result := FServer.DefaultInterface;
+end;
+
+function TCaseIgnoreListProperties.Get_CaseIgnoreList: OleVariant;
+begin
+ Result := DefaultInterface.Get_CaseIgnoreList;
+end;
+
+procedure TCaseIgnoreListProperties.Set_CaseIgnoreList(retval: OleVariant);
+begin
+ DefaultInterface.Set_CaseIgnoreList(retval);
+end;
+
+{$ENDIF}
+
+class function CoFaxNumber.Create: IADsFaxNumber;
+begin
+ Result := CreateComObject(CLASS_FaxNumber) as IADsFaxNumber;
+end;
+
+class function CoFaxNumber.CreateRemote(const MachineName: string): IADsFaxNumber;
+begin
+ Result := CreateRemoteComObject(MachineName, CLASS_FaxNumber) as IADsFaxNumber;
+end;
+
+procedure TFaxNumber.InitServerData;
+const
+ CServerData: TServerData = (
+ ClassID: '{A5062215-4681-11D1-A3B4-00C04FB950DC}';
+ IntfIID: '{A910DEA9-4680-11D1-A3B4-00C04FB950DC}';
+ EventIID: '';
+ LicenseKey: nil;
+ Version: 500);
+begin
+ ServerData := @CServerData;
+end;
+
+procedure TFaxNumber.Connect;
+var
+ punk: IUnknown;
+begin
+ if FIntf = nil then
+ begin
+ punk := GetServer;
+ Fintf:= punk as IADsFaxNumber;
+ end;
+end;
+
+procedure TFaxNumber.ConnectTo(svrIntf: IADsFaxNumber);
+begin
+ Disconnect;
+ FIntf := svrIntf;
+end;
+
+procedure TFaxNumber.DisConnect;
+begin
+ if Fintf <> nil then
+ begin
+ FIntf := nil;
+ end;
+end;
+
+function TFaxNumber.GetDefaultInterface: IADsFaxNumber;
+begin
+ if FIntf = nil then
+ Connect;
+ Assert(FIntf <> nil, 'DefaultInterface is NULL. Component is not connected to Server. You must call ''Connect'' or ''ConnectTo'' before this operation');
+ Result := FIntf;
+end;
+
+constructor TFaxNumber.Create(AOwner: TComponent);
+begin
+ inherited Create(AOwner);
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+ FProps := TFaxNumberProperties.Create(Self);
+{$ENDIF}
+end;
+
+destructor TFaxNumber.Destroy;
+begin
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+ FProps.Free;
+{$ENDIF}
+ inherited Destroy;
+end;
+
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+function TFaxNumber.GetServerProperties: TFaxNumberProperties;
+begin
+ Result := FProps;
+end;
+{$ENDIF}
+
+function TFaxNumber.Get_TelephoneNumber: WideString;
+begin
+ Result := DefaultInterface.Get_TelephoneNumber;
+end;
+
+procedure TFaxNumber.Set_TelephoneNumber(const retval: WideString);
+begin
+ DefaultInterface.Set_TelephoneNumber(retval);
+end;
+
+function TFaxNumber.Get_Parameters: OleVariant;
+begin
+ Result := DefaultInterface.Get_Parameters;
+end;
+
+procedure TFaxNumber.Set_Parameters(retval: OleVariant);
+begin
+ DefaultInterface.Set_Parameters(retval);
+end;
+
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+constructor TFaxNumberProperties.Create(AServer: TFaxNumber);
+begin
+ inherited Create;
+ FServer := AServer;
+end;
+
+function TFaxNumberProperties.GetDefaultInterface: IADsFaxNumber;
+begin
+ Result := FServer.DefaultInterface;
+end;
+
+function TFaxNumberProperties.Get_TelephoneNumber: WideString;
+begin
+ Result := DefaultInterface.Get_TelephoneNumber;
+end;
+
+procedure TFaxNumberProperties.Set_TelephoneNumber(const retval: WideString);
+begin
+ DefaultInterface.Set_TelephoneNumber(retval);
+end;
+
+function TFaxNumberProperties.Get_Parameters: OleVariant;
+begin
+ Result := DefaultInterface.Get_Parameters;
+end;
+
+procedure TFaxNumberProperties.Set_Parameters(retval: OleVariant);
+begin
+ DefaultInterface.Set_Parameters(retval);
+end;
+
+{$ENDIF}
+
+class function CoNetAddress.Create: IADsNetAddress;
+begin
+ Result := CreateComObject(CLASS_NetAddress) as IADsNetAddress;
+end;
+
+class function CoNetAddress.CreateRemote(const MachineName: string): IADsNetAddress;
+begin
+ Result := CreateRemoteComObject(MachineName, CLASS_NetAddress) as IADsNetAddress;
+end;
+
+procedure TNetAddress.InitServerData;
+const
+ CServerData: TServerData = (
+ ClassID: '{B0B71247-4080-11D1-A3AC-00C04FB950DC}';
+ IntfIID: '{B21A50A9-4080-11D1-A3AC-00C04FB950DC}';
+ EventIID: '';
+ LicenseKey: nil;
+ Version: 500);
+begin
+ ServerData := @CServerData;
+end;
+
+procedure TNetAddress.Connect;
+var
+ punk: IUnknown;
+begin
+ if FIntf = nil then
+ begin
+ punk := GetServer;
+ Fintf:= punk as IADsNetAddress;
+ end;
+end;
+
+procedure TNetAddress.ConnectTo(svrIntf: IADsNetAddress);
+begin
+ Disconnect;
+ FIntf := svrIntf;
+end;
+
+procedure TNetAddress.DisConnect;
+begin
+ if Fintf <> nil then
+ begin
+ FIntf := nil;
+ end;
+end;
+
+function TNetAddress.GetDefaultInterface: IADsNetAddress;
+begin
+ if FIntf = nil then
+ Connect;
+ Assert(FIntf <> nil, 'DefaultInterface is NULL. Component is not connected to Server. You must call ''Connect'' or ''ConnectTo'' before this operation');
+ Result := FIntf;
+end;
+
+constructor TNetAddress.Create(AOwner: TComponent);
+begin
+ inherited Create(AOwner);
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+ FProps := TNetAddressProperties.Create(Self);
+{$ENDIF}
+end;
+
+destructor TNetAddress.Destroy;
+begin
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+ FProps.Free;
+{$ENDIF}
+ inherited Destroy;
+end;
+
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+function TNetAddress.GetServerProperties: TNetAddressProperties;
+begin
+ Result := FProps;
+end;
+{$ENDIF}
+
+function TNetAddress.Get_AddressType: Integer;
+begin
+ Result := DefaultInterface.Get_AddressType;
+end;
+
+procedure TNetAddress.Set_AddressType(retval: Integer);
+begin
+ DefaultInterface.Set_AddressType(retval);
+end;
+
+function TNetAddress.Get_Address: OleVariant;
+begin
+ Result := DefaultInterface.Get_Address;
+end;
+
+procedure TNetAddress.Set_Address(retval: OleVariant);
+begin
+ DefaultInterface.Set_Address(retval);
+end;
+
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+constructor TNetAddressProperties.Create(AServer: TNetAddress);
+begin
+ inherited Create;
+ FServer := AServer;
+end;
+
+function TNetAddressProperties.GetDefaultInterface: IADsNetAddress;
+begin
+ Result := FServer.DefaultInterface;
+end;
+
+function TNetAddressProperties.Get_AddressType: Integer;
+begin
+ Result := DefaultInterface.Get_AddressType;
+end;
+
+procedure TNetAddressProperties.Set_AddressType(retval: Integer);
+begin
+ DefaultInterface.Set_AddressType(retval);
+end;
+
+function TNetAddressProperties.Get_Address: OleVariant;
+begin
+ Result := DefaultInterface.Get_Address;
+end;
+
+procedure TNetAddressProperties.Set_Address(retval: OleVariant);
+begin
+ DefaultInterface.Set_Address(retval);
+end;
+
+{$ENDIF}
+
+class function CoOctetList.Create: IADsOctetList;
+begin
+ Result := CreateComObject(CLASS_OctetList) as IADsOctetList;
+end;
+
+class function CoOctetList.CreateRemote(const MachineName: string): IADsOctetList;
+begin
+ Result := CreateRemoteComObject(MachineName, CLASS_OctetList) as IADsOctetList;
+end;
+
+procedure TOctetList.InitServerData;
+const
+ CServerData: TServerData = (
+ ClassID: '{1241400F-4680-11D1-A3B4-00C04FB950DC}';
+ IntfIID: '{7B28B80F-4680-11D1-A3B4-00C04FB950DC}';
+ EventIID: '';
+ LicenseKey: nil;
+ Version: 500);
+begin
+ ServerData := @CServerData;
+end;
+
+procedure TOctetList.Connect;
+var
+ punk: IUnknown;
+begin
+ if FIntf = nil then
+ begin
+ punk := GetServer;
+ Fintf:= punk as IADsOctetList;
+ end;
+end;
+
+procedure TOctetList.ConnectTo(svrIntf: IADsOctetList);
+begin
+ Disconnect;
+ FIntf := svrIntf;
+end;
+
+procedure TOctetList.DisConnect;
+begin
+ if Fintf <> nil then
+ begin
+ FIntf := nil;
+ end;
+end;
+
+function TOctetList.GetDefaultInterface: IADsOctetList;
+begin
+ if FIntf = nil then
+ Connect;
+ Assert(FIntf <> nil, 'DefaultInterface is NULL. Component is not connected to Server. You must call ''Connect'' or ''ConnectTo'' before this operation');
+ Result := FIntf;
+end;
+
+constructor TOctetList.Create(AOwner: TComponent);
+begin
+ inherited Create(AOwner);
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+ FProps := TOctetListProperties.Create(Self);
+{$ENDIF}
+end;
+
+destructor TOctetList.Destroy;
+begin
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+ FProps.Free;
+{$ENDIF}
+ inherited Destroy;
+end;
+
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+function TOctetList.GetServerProperties: TOctetListProperties;
+begin
+ Result := FProps;
+end;
+{$ENDIF}
+
+function TOctetList.Get_OctetList: OleVariant;
+begin
+ Result := DefaultInterface.Get_OctetList;
+end;
+
+procedure TOctetList.Set_OctetList(retval: OleVariant);
+begin
+ DefaultInterface.Set_OctetList(retval);
+end;
+
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+constructor TOctetListProperties.Create(AServer: TOctetList);
+begin
+ inherited Create;
+ FServer := AServer;
+end;
+
+function TOctetListProperties.GetDefaultInterface: IADsOctetList;
+begin
+ Result := FServer.DefaultInterface;
+end;
+
+function TOctetListProperties.Get_OctetList: OleVariant;
+begin
+ Result := DefaultInterface.Get_OctetList;
+end;
+
+procedure TOctetListProperties.Set_OctetList(retval: OleVariant);
+begin
+ DefaultInterface.Set_OctetList(retval);
+end;
+
+{$ENDIF}
+
+class function CoEmail.Create: IADsEmail;
+begin
+ Result := CreateComObject(CLASS_Email) as IADsEmail;
+end;
+
+class function CoEmail.CreateRemote(const MachineName: string): IADsEmail;
+begin
+ Result := CreateRemoteComObject(MachineName, CLASS_Email) as IADsEmail;
+end;
+
+procedure TEmail.InitServerData;
+const
+ CServerData: TServerData = (
+ ClassID: '{8F92A857-478E-11D1-A3B4-00C04FB950DC}';
+ IntfIID: '{97AF011A-478E-11D1-A3B4-00C04FB950DC}';
+ EventIID: '';
+ LicenseKey: nil;
+ Version: 500);
+begin
+ ServerData := @CServerData;
+end;
+
+procedure TEmail.Connect;
+var
+ punk: IUnknown;
+begin
+ if FIntf = nil then
+ begin
+ punk := GetServer;
+ Fintf:= punk as IADsEmail;
+ end;
+end;
+
+procedure TEmail.ConnectTo(svrIntf: IADsEmail);
+begin
+ Disconnect;
+ FIntf := svrIntf;
+end;
+
+procedure TEmail.DisConnect;
+begin
+ if Fintf <> nil then
+ begin
+ FIntf := nil;
+ end;
+end;
+
+function TEmail.GetDefaultInterface: IADsEmail;
+begin
+ if FIntf = nil then
+ Connect;
+ Assert(FIntf <> nil, 'DefaultInterface is NULL. Component is not connected to Server. You must call ''Connect'' or ''ConnectTo'' before this operation');
+ Result := FIntf;
+end;
+
+constructor TEmail.Create(AOwner: TComponent);
+begin
+ inherited Create(AOwner);
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+ FProps := TEmailProperties.Create(Self);
+{$ENDIF}
+end;
+
+destructor TEmail.Destroy;
+begin
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+ FProps.Free;
+{$ENDIF}
+ inherited Destroy;
+end;
+
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+function TEmail.GetServerProperties: TEmailProperties;
+begin
+ Result := FProps;
+end;
+{$ENDIF}
+
+function TEmail.Get_Type_: Integer;
+begin
+ Result := DefaultInterface.Get_Type_;
+end;
+
+procedure TEmail.Set_Type_(retval: Integer);
+begin
+ DefaultInterface.Set_Type_(retval);
+end;
+
+function TEmail.Get_Address: WideString;
+begin
+ Result := DefaultInterface.Get_Address;
+end;
+
+procedure TEmail.Set_Address(const retval: WideString);
+begin
+ DefaultInterface.Set_Address(retval);
+end;
+
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+constructor TEmailProperties.Create(AServer: TEmail);
+begin
+ inherited Create;
+ FServer := AServer;
+end;
+
+function TEmailProperties.GetDefaultInterface: IADsEmail;
+begin
+ Result := FServer.DefaultInterface;
+end;
+
+function TEmailProperties.Get_Type_: Integer;
+begin
+ Result := DefaultInterface.Get_Type_;
+end;
+
+procedure TEmailProperties.Set_Type_(retval: Integer);
+begin
+ DefaultInterface.Set_Type_(retval);
+end;
+
+function TEmailProperties.Get_Address: WideString;
+begin
+ Result := DefaultInterface.Get_Address;
+end;
+
+procedure TEmailProperties.Set_Address(const retval: WideString);
+begin
+ DefaultInterface.Set_Address(retval);
+end;
+
+{$ENDIF}
+
+class function CoPath.Create: IADsPath;
+begin
+ Result := CreateComObject(CLASS_Path) as IADsPath;
+end;
+
+class function CoPath.CreateRemote(const MachineName: string): IADsPath;
+begin
+ Result := CreateRemoteComObject(MachineName, CLASS_Path) as IADsPath;
+end;
+
+procedure TPath.InitServerData;
+const
+ CServerData: TServerData = (
+ ClassID: '{B2538919-4080-11D1-A3AC-00C04FB950DC}';
+ IntfIID: '{B287FCD5-4080-11D1-A3AC-00C04FB950DC}';
+ EventIID: '';
+ LicenseKey: nil;
+ Version: 500);
+begin
+ ServerData := @CServerData;
+end;
+
+procedure TPath.Connect;
+var
+ punk: IUnknown;
+begin
+ if FIntf = nil then
+ begin
+ punk := GetServer;
+ Fintf:= punk as IADsPath;
+ end;
+end;
+
+procedure TPath.ConnectTo(svrIntf: IADsPath);
+begin
+ Disconnect;
+ FIntf := svrIntf;
+end;
+
+procedure TPath.DisConnect;
+begin
+ if Fintf <> nil then
+ begin
+ FIntf := nil;
+ end;
+end;
+
+function TPath.GetDefaultInterface: IADsPath;
+begin
+ if FIntf = nil then
+ Connect;
+ Assert(FIntf <> nil, 'DefaultInterface is NULL. Component is not connected to Server. You must call ''Connect'' or ''ConnectTo'' before this operation');
+ Result := FIntf;
+end;
+
+constructor TPath.Create(AOwner: TComponent);
+begin
+ inherited Create(AOwner);
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+ FProps := TPathProperties.Create(Self);
+{$ENDIF}
+end;
+
+destructor TPath.Destroy;
+begin
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+ FProps.Free;
+{$ENDIF}
+ inherited Destroy;
+end;
+
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+function TPath.GetServerProperties: TPathProperties;
+begin
+ Result := FProps;
+end;
+{$ENDIF}
+
+function TPath.Get_Type_: Integer;
+begin
+ Result := DefaultInterface.Get_Type_;
+end;
+
+procedure TPath.Set_Type_(retval: Integer);
+begin
+ DefaultInterface.Set_Type_(retval);
+end;
+
+function TPath.Get_VolumeName: WideString;
+begin
+ Result := DefaultInterface.Get_VolumeName;
+end;
+
+procedure TPath.Set_VolumeName(const retval: WideString);
+begin
+ DefaultInterface.Set_VolumeName(retval);
+end;
+
+function TPath.Get_Path: WideString;
+begin
+ Result := DefaultInterface.Get_Path;
+end;
+
+procedure TPath.Set_Path(const retval: WideString);
+begin
+ DefaultInterface.Set_Path(retval);
+end;
+
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+constructor TPathProperties.Create(AServer: TPath);
+begin
+ inherited Create;
+ FServer := AServer;
+end;
+
+function TPathProperties.GetDefaultInterface: IADsPath;
+begin
+ Result := FServer.DefaultInterface;
+end;
+
+function TPathProperties.Get_Type_: Integer;
+begin
+ Result := DefaultInterface.Get_Type_;
+end;
+
+procedure TPathProperties.Set_Type_(retval: Integer);
+begin
+ DefaultInterface.Set_Type_(retval);
+end;
+
+function TPathProperties.Get_VolumeName: WideString;
+begin
+ Result := DefaultInterface.Get_VolumeName;
+end;
+
+procedure TPathProperties.Set_VolumeName(const retval: WideString);
+begin
+ DefaultInterface.Set_VolumeName(retval);
+end;
+
+function TPathProperties.Get_Path: WideString;
+begin
+ Result := DefaultInterface.Get_Path;
+end;
+
+procedure TPathProperties.Set_Path(const retval: WideString);
+begin
+ DefaultInterface.Set_Path(retval);
+end;
+
+{$ENDIF}
+
+class function CoReplicaPointer.Create: IADsReplicaPointer;
+begin
+ Result := CreateComObject(CLASS_ReplicaPointer) as IADsReplicaPointer;
+end;
+
+class function CoReplicaPointer.CreateRemote(const MachineName: string): IADsReplicaPointer;
+begin
+ Result := CreateRemoteComObject(MachineName, CLASS_ReplicaPointer) as IADsReplicaPointer;
+end;
+
+procedure TReplicaPointer.InitServerData;
+const
+ CServerData: TServerData = (
+ ClassID: '{F5D1BADF-4080-11D1-A3AC-00C04FB950DC}';
+ IntfIID: '{F60FB803-4080-11D1-A3AC-00C04FB950DC}';
+ EventIID: '';
+ LicenseKey: nil;
+ Version: 500);
+begin
+ ServerData := @CServerData;
+end;
+
+procedure TReplicaPointer.Connect;
+var
+ punk: IUnknown;
+begin
+ if FIntf = nil then
+ begin
+ punk := GetServer;
+ Fintf:= punk as IADsReplicaPointer;
+ end;
+end;
+
+procedure TReplicaPointer.ConnectTo(svrIntf: IADsReplicaPointer);
+begin
+ Disconnect;
+ FIntf := svrIntf;
+end;
+
+procedure TReplicaPointer.DisConnect;
+begin
+ if Fintf <> nil then
+ begin
+ FIntf := nil;
+ end;
+end;
+
+function TReplicaPointer.GetDefaultInterface: IADsReplicaPointer;
+begin
+ if FIntf = nil then
+ Connect;
+ Assert(FIntf <> nil, 'DefaultInterface is NULL. Component is not connected to Server. You must call ''Connect'' or ''ConnectTo'' before this operation');
+ Result := FIntf;
+end;
+
+constructor TReplicaPointer.Create(AOwner: TComponent);
+begin
+ inherited Create(AOwner);
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+ FProps := TReplicaPointerProperties.Create(Self);
+{$ENDIF}
+end;
+
+destructor TReplicaPointer.Destroy;
+begin
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+ FProps.Free;
+{$ENDIF}
+ inherited Destroy;
+end;
+
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+function TReplicaPointer.GetServerProperties: TReplicaPointerProperties;
+begin
+ Result := FProps;
+end;
+{$ENDIF}
+
+function TReplicaPointer.Get_ServerName: WideString;
+begin
+ Result := DefaultInterface.Get_ServerName;
+end;
+
+procedure TReplicaPointer.Set_ServerName(const retval: WideString);
+begin
+ DefaultInterface.Set_ServerName(retval);
+end;
+
+function TReplicaPointer.Get_ReplicaType: Integer;
+begin
+ Result := DefaultInterface.Get_ReplicaType;
+end;
+
+procedure TReplicaPointer.Set_ReplicaType(retval: Integer);
+begin
+ DefaultInterface.Set_ReplicaType(retval);
+end;
+
+function TReplicaPointer.Get_ReplicaNumber: Integer;
+begin
+ Result := DefaultInterface.Get_ReplicaNumber;
+end;
+
+procedure TReplicaPointer.Set_ReplicaNumber(retval: Integer);
+begin
+ DefaultInterface.Set_ReplicaNumber(retval);
+end;
+
+function TReplicaPointer.Get_Count: Integer;
+begin
+ Result := DefaultInterface.Get_Count;
+end;
+
+procedure TReplicaPointer.Set_Count(retval: Integer);
+begin
+ DefaultInterface.Set_Count(retval);
+end;
+
+function TReplicaPointer.Get_ReplicaAddressHints: OleVariant;
+begin
+ Result := DefaultInterface.Get_ReplicaAddressHints;
+end;
+
+procedure TReplicaPointer.Set_ReplicaAddressHints(retval: OleVariant);
+begin
+ DefaultInterface.Set_ReplicaAddressHints(retval);
+end;
+
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+constructor TReplicaPointerProperties.Create(AServer: TReplicaPointer);
+begin
+ inherited Create;
+ FServer := AServer;
+end;
+
+function TReplicaPointerProperties.GetDefaultInterface: IADsReplicaPointer;
+begin
+ Result := FServer.DefaultInterface;
+end;
+
+function TReplicaPointerProperties.Get_ServerName: WideString;
+begin
+ Result := DefaultInterface.Get_ServerName;
+end;
+
+procedure TReplicaPointerProperties.Set_ServerName(const retval: WideString);
+begin
+ DefaultInterface.Set_ServerName(retval);
+end;
+
+function TReplicaPointerProperties.Get_ReplicaType: Integer;
+begin
+ Result := DefaultInterface.Get_ReplicaType;
+end;
+
+procedure TReplicaPointerProperties.Set_ReplicaType(retval: Integer);
+begin
+ DefaultInterface.Set_ReplicaType(retval);
+end;
+
+function TReplicaPointerProperties.Get_ReplicaNumber: Integer;
+begin
+ Result := DefaultInterface.Get_ReplicaNumber;
+end;
+
+procedure TReplicaPointerProperties.Set_ReplicaNumber(retval: Integer);
+begin
+ DefaultInterface.Set_ReplicaNumber(retval);
+end;
+
+function TReplicaPointerProperties.Get_Count: Integer;
+begin
+ Result := DefaultInterface.Get_Count;
+end;
+
+procedure TReplicaPointerProperties.Set_Count(retval: Integer);
+begin
+ DefaultInterface.Set_Count(retval);
+end;
+
+function TReplicaPointerProperties.Get_ReplicaAddressHints: OleVariant;
+begin
+ Result := DefaultInterface.Get_ReplicaAddressHints;
+end;
+
+procedure TReplicaPointerProperties.Set_ReplicaAddressHints(retval: OleVariant);
+begin
+ DefaultInterface.Set_ReplicaAddressHints(retval);
+end;
+
+{$ENDIF}
+
+class function CoAcl.Create: IADsAcl;
+begin
+ Result := CreateComObject(CLASS_Acl) as IADsAcl;
+end;
+
+class function CoAcl.CreateRemote(const MachineName: string): IADsAcl;
+begin
+ Result := CreateRemoteComObject(MachineName, CLASS_Acl) as IADsAcl;
+end;
+
+procedure TAcl.InitServerData;
+const
+ CServerData: TServerData = (
+ ClassID: '{7AF1EFB6-0869-11D1-A377-00C04FB950DC}';
+ IntfIID: '{8452D3AB-0869-11D1-A377-00C04FB950DC}';
+ EventIID: '';
+ LicenseKey: nil;
+ Version: 500);
+begin
+ ServerData := @CServerData;
+end;
+
+procedure TAcl.Connect;
+var
+ punk: IUnknown;
+begin
+ if FIntf = nil then
+ begin
+ punk := GetServer;
+ Fintf:= punk as IADsAcl;
+ end;
+end;
+
+procedure TAcl.ConnectTo(svrIntf: IADsAcl);
+begin
+ Disconnect;
+ FIntf := svrIntf;
+end;
+
+procedure TAcl.DisConnect;
+begin
+ if Fintf <> nil then
+ begin
+ FIntf := nil;
+ end;
+end;
+
+function TAcl.GetDefaultInterface: IADsAcl;
+begin
+ if FIntf = nil then
+ Connect;
+ Assert(FIntf <> nil, 'DefaultInterface is NULL. Component is not connected to Server. You must call ''Connect'' or ''ConnectTo'' before this operation');
+ Result := FIntf;
+end;
+
+constructor TAcl.Create(AOwner: TComponent);
+begin
+ inherited Create(AOwner);
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+ FProps := TAclProperties.Create(Self);
+{$ENDIF}
+end;
+
+destructor TAcl.Destroy;
+begin
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+ FProps.Free;
+{$ENDIF}
+ inherited Destroy;
+end;
+
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+function TAcl.GetServerProperties: TAclProperties;
+begin
+ Result := FProps;
+end;
+{$ENDIF}
+
+function TAcl.Get_ProtectedAttrName: WideString;
+begin
+ Result := DefaultInterface.Get_ProtectedAttrName;
+end;
+
+procedure TAcl.Set_ProtectedAttrName(const retval: WideString);
+begin
+ DefaultInterface.Set_ProtectedAttrName(retval);
+end;
+
+function TAcl.Get_SubjectName: WideString;
+begin
+ Result := DefaultInterface.Get_SubjectName;
+end;
+
+procedure TAcl.Set_SubjectName(const retval: WideString);
+begin
+ DefaultInterface.Set_SubjectName(retval);
+end;
+
+function TAcl.Get_Privileges: Integer;
+begin
+ Result := DefaultInterface.Get_Privileges;
+end;
+
+procedure TAcl.Set_Privileges(retval: Integer);
+begin
+ DefaultInterface.Set_Privileges(retval);
+end;
+
+function TAcl.CopyAcl: IDispatch;
+begin
+ Result := DefaultInterface.CopyAcl;
+end;
+
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+constructor TAclProperties.Create(AServer: TAcl);
+begin
+ inherited Create;
+ FServer := AServer;
+end;
+
+function TAclProperties.GetDefaultInterface: IADsAcl;
+begin
+ Result := FServer.DefaultInterface;
+end;
+
+function TAclProperties.Get_ProtectedAttrName: WideString;
+begin
+ Result := DefaultInterface.Get_ProtectedAttrName;
+end;
+
+procedure TAclProperties.Set_ProtectedAttrName(const retval: WideString);
+begin
+ DefaultInterface.Set_ProtectedAttrName(retval);
+end;
+
+function TAclProperties.Get_SubjectName: WideString;
+begin
+ Result := DefaultInterface.Get_SubjectName;
+end;
+
+procedure TAclProperties.Set_SubjectName(const retval: WideString);
+begin
+ DefaultInterface.Set_SubjectName(retval);
+end;
+
+function TAclProperties.Get_Privileges: Integer;
+begin
+ Result := DefaultInterface.Get_Privileges;
+end;
+
+procedure TAclProperties.Set_Privileges(retval: Integer);
+begin
+ DefaultInterface.Set_Privileges(retval);
+end;
+
+{$ENDIF}
+
+class function CoTimestamp.Create: IADsTimestamp;
+begin
+ Result := CreateComObject(CLASS_Timestamp) as IADsTimestamp;
+end;
+
+class function CoTimestamp.CreateRemote(const MachineName: string): IADsTimestamp;
+begin
+ Result := CreateRemoteComObject(MachineName, CLASS_Timestamp) as IADsTimestamp;
+end;
+
+procedure TTimestamp.InitServerData;
+const
+ CServerData: TServerData = (
+ ClassID: '{B2BED2EB-4080-11D1-A3AC-00C04FB950DC}';
+ IntfIID: '{B2F5A901-4080-11D1-A3AC-00C04FB950DC}';
+ EventIID: '';
+ LicenseKey: nil;
+ Version: 500);
+begin
+ ServerData := @CServerData;
+end;
+
+procedure TTimestamp.Connect;
+var
+ punk: IUnknown;
+begin
+ if FIntf = nil then
+ begin
+ punk := GetServer;
+ Fintf:= punk as IADsTimestamp;
+ end;
+end;
+
+procedure TTimestamp.ConnectTo(svrIntf: IADsTimestamp);
+begin
+ Disconnect;
+ FIntf := svrIntf;
+end;
+
+procedure TTimestamp.DisConnect;
+begin
+ if Fintf <> nil then
+ begin
+ FIntf := nil;
+ end;
+end;
+
+function TTimestamp.GetDefaultInterface: IADsTimestamp;
+begin
+ if FIntf = nil then
+ Connect;
+ Assert(FIntf <> nil, 'DefaultInterface is NULL. Component is not connected to Server. You must call ''Connect'' or ''ConnectTo'' before this operation');
+ Result := FIntf;
+end;
+
+constructor TTimestamp.Create(AOwner: TComponent);
+begin
+ inherited Create(AOwner);
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+ FProps := TTimestampProperties.Create(Self);
+{$ENDIF}
+end;
+
+destructor TTimestamp.Destroy;
+begin
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+ FProps.Free;
+{$ENDIF}
+ inherited Destroy;
+end;
+
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+function TTimestamp.GetServerProperties: TTimestampProperties;
+begin
+ Result := FProps;
+end;
+{$ENDIF}
+
+function TTimestamp.Get_WholeSeconds: Integer;
+begin
+ Result := DefaultInterface.Get_WholeSeconds;
+end;
+
+procedure TTimestamp.Set_WholeSeconds(retval: Integer);
+begin
+ DefaultInterface.Set_WholeSeconds(retval);
+end;
+
+function TTimestamp.Get_EventID: Integer;
+begin
+ Result := DefaultInterface.Get_EventID;
+end;
+
+procedure TTimestamp.Set_EventID(retval: Integer);
+begin
+ DefaultInterface.Set_EventID(retval);
+end;
+
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+constructor TTimestampProperties.Create(AServer: TTimestamp);
+begin
+ inherited Create;
+ FServer := AServer;
+end;
+
+function TTimestampProperties.GetDefaultInterface: IADsTimestamp;
+begin
+ Result := FServer.DefaultInterface;
+end;
+
+function TTimestampProperties.Get_WholeSeconds: Integer;
+begin
+ Result := DefaultInterface.Get_WholeSeconds;
+end;
+
+procedure TTimestampProperties.Set_WholeSeconds(retval: Integer);
+begin
+ DefaultInterface.Set_WholeSeconds(retval);
+end;
+
+function TTimestampProperties.Get_EventID: Integer;
+begin
+ Result := DefaultInterface.Get_EventID;
+end;
+
+procedure TTimestampProperties.Set_EventID(retval: Integer);
+begin
+ DefaultInterface.Set_EventID(retval);
+end;
+
+{$ENDIF}
+
+class function CoPostalAddress.Create: IADsPostalAddress;
+begin
+ Result := CreateComObject(CLASS_PostalAddress) as IADsPostalAddress;
+end;
+
+class function CoPostalAddress.CreateRemote(const MachineName: string): IADsPostalAddress;
+begin
+ Result := CreateRemoteComObject(MachineName, CLASS_PostalAddress) as IADsPostalAddress;
+end;
+
+procedure TPostalAddress.InitServerData;
+const
+ CServerData: TServerData = (
+ ClassID: '{0A75AFCD-4680-11D1-A3B4-00C04FB950DC}';
+ IntfIID: '{7ADECF29-4680-11D1-A3B4-00C04FB950DC}';
+ EventIID: '';
+ LicenseKey: nil;
+ Version: 500);
+begin
+ ServerData := @CServerData;
+end;
+
+procedure TPostalAddress.Connect;
+var
+ punk: IUnknown;
+begin
+ if FIntf = nil then
+ begin
+ punk := GetServer;
+ Fintf:= punk as IADsPostalAddress;
+ end;
+end;
+
+procedure TPostalAddress.ConnectTo(svrIntf: IADsPostalAddress);
+begin
+ Disconnect;
+ FIntf := svrIntf;
+end;
+
+procedure TPostalAddress.DisConnect;
+begin
+ if Fintf <> nil then
+ begin
+ FIntf := nil;
+ end;
+end;
+
+function TPostalAddress.GetDefaultInterface: IADsPostalAddress;
+begin
+ if FIntf = nil then
+ Connect;
+ Assert(FIntf <> nil, 'DefaultInterface is NULL. Component is not connected to Server. You must call ''Connect'' or ''ConnectTo'' before this operation');
+ Result := FIntf;
+end;
+
+constructor TPostalAddress.Create(AOwner: TComponent);
+begin
+ inherited Create(AOwner);
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+ FProps := TPostalAddressProperties.Create(Self);
+{$ENDIF}
+end;
+
+destructor TPostalAddress.Destroy;
+begin
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+ FProps.Free;
+{$ENDIF}
+ inherited Destroy;
+end;
+
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+function TPostalAddress.GetServerProperties: TPostalAddressProperties;
+begin
+ Result := FProps;
+end;
+{$ENDIF}
+
+function TPostalAddress.Get_PostalAddress: OleVariant;
+begin
+ Result := DefaultInterface.Get_PostalAddress;
+end;
+
+procedure TPostalAddress.Set_PostalAddress(retval: OleVariant);
+begin
+ DefaultInterface.Set_PostalAddress(retval);
+end;
+
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+constructor TPostalAddressProperties.Create(AServer: TPostalAddress);
+begin
+ inherited Create;
+ FServer := AServer;
+end;
+
+function TPostalAddressProperties.GetDefaultInterface: IADsPostalAddress;
+begin
+ Result := FServer.DefaultInterface;
+end;
+
+function TPostalAddressProperties.Get_PostalAddress: OleVariant;
+begin
+ Result := DefaultInterface.Get_PostalAddress;
+end;
+
+procedure TPostalAddressProperties.Set_PostalAddress(retval: OleVariant);
+begin
+ DefaultInterface.Set_PostalAddress(retval);
+end;
+
+{$ENDIF}
+
+class function CoBackLink.Create: IADsBackLink;
+begin
+ Result := CreateComObject(CLASS_BackLink) as IADsBackLink;
+end;
+
+class function CoBackLink.CreateRemote(const MachineName: string): IADsBackLink;
+begin
+ Result := CreateRemoteComObject(MachineName, CLASS_BackLink) as IADsBackLink;
+end;
+
+procedure TBackLink.InitServerData;
+const
+ CServerData: TServerData = (
+ ClassID: '{FCBF906F-4080-11D1-A3AC-00C04FB950DC}';
+ IntfIID: '{FD1302BD-4080-11D1-A3AC-00C04FB950DC}';
+ EventIID: '';
+ LicenseKey: nil;
+ Version: 500);
+begin
+ ServerData := @CServerData;
+end;
+
+procedure TBackLink.Connect;
+var
+ punk: IUnknown;
+begin
+ if FIntf = nil then
+ begin
+ punk := GetServer;
+ Fintf:= punk as IADsBackLink;
+ end;
+end;
+
+procedure TBackLink.ConnectTo(svrIntf: IADsBackLink);
+begin
+ Disconnect;
+ FIntf := svrIntf;
+end;
+
+procedure TBackLink.DisConnect;
+begin
+ if Fintf <> nil then
+ begin
+ FIntf := nil;
+ end;
+end;
+
+function TBackLink.GetDefaultInterface: IADsBackLink;
+begin
+ if FIntf = nil then
+ Connect;
+ Assert(FIntf <> nil, 'DefaultInterface is NULL. Component is not connected to Server. You must call ''Connect'' or ''ConnectTo'' before this operation');
+ Result := FIntf;
+end;
+
+constructor TBackLink.Create(AOwner: TComponent);
+begin
+ inherited Create(AOwner);
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+ FProps := TBackLinkProperties.Create(Self);
+{$ENDIF}
+end;
+
+destructor TBackLink.Destroy;
+begin
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+ FProps.Free;
+{$ENDIF}
+ inherited Destroy;
+end;
+
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+function TBackLink.GetServerProperties: TBackLinkProperties;
+begin
+ Result := FProps;
+end;
+{$ENDIF}
+
+function TBackLink.Get_RemoteID: Integer;
+begin
+ Result := DefaultInterface.Get_RemoteID;
+end;
+
+procedure TBackLink.Set_RemoteID(retval: Integer);
+begin
+ DefaultInterface.Set_RemoteID(retval);
+end;
+
+function TBackLink.Get_ObjectName: WideString;
+begin
+ Result := DefaultInterface.Get_ObjectName;
+end;
+
+procedure TBackLink.Set_ObjectName(const retval: WideString);
+begin
+ DefaultInterface.Set_ObjectName(retval);
+end;
+
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+constructor TBackLinkProperties.Create(AServer: TBackLink);
+begin
+ inherited Create;
+ FServer := AServer;
+end;
+
+function TBackLinkProperties.GetDefaultInterface: IADsBackLink;
+begin
+ Result := FServer.DefaultInterface;
+end;
+
+function TBackLinkProperties.Get_RemoteID: Integer;
+begin
+ Result := DefaultInterface.Get_RemoteID;
+end;
+
+procedure TBackLinkProperties.Set_RemoteID(retval: Integer);
+begin
+ DefaultInterface.Set_RemoteID(retval);
+end;
+
+function TBackLinkProperties.Get_ObjectName: WideString;
+begin
+ Result := DefaultInterface.Get_ObjectName;
+end;
+
+procedure TBackLinkProperties.Set_ObjectName(const retval: WideString);
+begin
+ DefaultInterface.Set_ObjectName(retval);
+end;
+
+{$ENDIF}
+
+class function CoTypedName.Create: IADsTypedName;
+begin
+ Result := CreateComObject(CLASS_TypedName) as IADsTypedName;
+end;
+
+class function CoTypedName.CreateRemote(const MachineName: string): IADsTypedName;
+begin
+ Result := CreateRemoteComObject(MachineName, CLASS_TypedName) as IADsTypedName;
+end;
+
+procedure TTypedName.InitServerData;
+const
+ CServerData: TServerData = (
+ ClassID: '{B33143CB-4080-11D1-A3AC-00C04FB950DC}';
+ IntfIID: '{B371A349-4080-11D1-A3AC-00C04FB950DC}';
+ EventIID: '';
+ LicenseKey: nil;
+ Version: 500);
+begin
+ ServerData := @CServerData;
+end;
+
+procedure TTypedName.Connect;
+var
+ punk: IUnknown;
+begin
+ if FIntf = nil then
+ begin
+ punk := GetServer;
+ Fintf:= punk as IADsTypedName;
+ end;
+end;
+
+procedure TTypedName.ConnectTo(svrIntf: IADsTypedName);
+begin
+ Disconnect;
+ FIntf := svrIntf;
+end;
+
+procedure TTypedName.DisConnect;
+begin
+ if Fintf <> nil then
+ begin
+ FIntf := nil;
+ end;
+end;
+
+function TTypedName.GetDefaultInterface: IADsTypedName;
+begin
+ if FIntf = nil then
+ Connect;
+ Assert(FIntf <> nil, 'DefaultInterface is NULL. Component is not connected to Server. You must call ''Connect'' or ''ConnectTo'' before this operation');
+ Result := FIntf;
+end;
+
+constructor TTypedName.Create(AOwner: TComponent);
+begin
+ inherited Create(AOwner);
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+ FProps := TTypedNameProperties.Create(Self);
+{$ENDIF}
+end;
+
+destructor TTypedName.Destroy;
+begin
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+ FProps.Free;
+{$ENDIF}
+ inherited Destroy;
+end;
+
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+function TTypedName.GetServerProperties: TTypedNameProperties;
+begin
+ Result := FProps;
+end;
+{$ENDIF}
+
+function TTypedName.Get_ObjectName: WideString;
+begin
+ Result := DefaultInterface.Get_ObjectName;
+end;
+
+procedure TTypedName.Set_ObjectName(const retval: WideString);
+begin
+ DefaultInterface.Set_ObjectName(retval);
+end;
+
+function TTypedName.Get_Level: Integer;
+begin
+ Result := DefaultInterface.Get_Level;
+end;
+
+procedure TTypedName.Set_Level(retval: Integer);
+begin
+ DefaultInterface.Set_Level(retval);
+end;
+
+function TTypedName.Get_Interval: Integer;
+begin
+ Result := DefaultInterface.Get_Interval;
+end;
+
+procedure TTypedName.Set_Interval(retval: Integer);
+begin
+ DefaultInterface.Set_Interval(retval);
+end;
+
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+constructor TTypedNameProperties.Create(AServer: TTypedName);
+begin
+ inherited Create;
+ FServer := AServer;
+end;
+
+function TTypedNameProperties.GetDefaultInterface: IADsTypedName;
+begin
+ Result := FServer.DefaultInterface;
+end;
+
+function TTypedNameProperties.Get_ObjectName: WideString;
+begin
+ Result := DefaultInterface.Get_ObjectName;
+end;
+
+procedure TTypedNameProperties.Set_ObjectName(const retval: WideString);
+begin
+ DefaultInterface.Set_ObjectName(retval);
+end;
+
+function TTypedNameProperties.Get_Level: Integer;
+begin
+ Result := DefaultInterface.Get_Level;
+end;
+
+procedure TTypedNameProperties.Set_Level(retval: Integer);
+begin
+ DefaultInterface.Set_Level(retval);
+end;
+
+function TTypedNameProperties.Get_Interval: Integer;
+begin
+ Result := DefaultInterface.Get_Interval;
+end;
+
+procedure TTypedNameProperties.Set_Interval(retval: Integer);
+begin
+ DefaultInterface.Set_Interval(retval);
+end;
+
+{$ENDIF}
+
+class function CoHold.Create: IADsHold;
+begin
+ Result := CreateComObject(CLASS_Hold) as IADsHold;
+end;
+
+class function CoHold.CreateRemote(const MachineName: string): IADsHold;
+begin
+ Result := CreateRemoteComObject(MachineName, CLASS_Hold) as IADsHold;
+end;
+
+procedure THold.InitServerData;
+const
+ CServerData: TServerData = (
+ ClassID: '{B3AD3E13-4080-11D1-A3AC-00C04FB950DC}';
+ IntfIID: '{B3EB3B37-4080-11D1-A3AC-00C04FB950DC}';
+ EventIID: '';
+ LicenseKey: nil;
+ Version: 500);
+begin
+ ServerData := @CServerData;
+end;
+
+procedure THold.Connect;
+var
+ punk: IUnknown;
+begin
+ if FIntf = nil then
+ begin
+ punk := GetServer;
+ Fintf:= punk as IADsHold;
+ end;
+end;
+
+procedure THold.ConnectTo(svrIntf: IADsHold);
+begin
+ Disconnect;
+ FIntf := svrIntf;
+end;
+
+procedure THold.DisConnect;
+begin
+ if Fintf <> nil then
+ begin
+ FIntf := nil;
+ end;
+end;
+
+function THold.GetDefaultInterface: IADsHold;
+begin
+ if FIntf = nil then
+ Connect;
+ Assert(FIntf <> nil, 'DefaultInterface is NULL. Component is not connected to Server. You must call ''Connect'' or ''ConnectTo'' before this operation');
+ Result := FIntf;
+end;
+
+constructor THold.Create(AOwner: TComponent);
+begin
+ inherited Create(AOwner);
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+ FProps := THoldProperties.Create(Self);
+{$ENDIF}
+end;
+
+destructor THold.Destroy;
+begin
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+ FProps.Free;
+{$ENDIF}
+ inherited Destroy;
+end;
+
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+function THold.GetServerProperties: THoldProperties;
+begin
+ Result := FProps;
+end;
+{$ENDIF}
+
+function THold.Get_ObjectName: WideString;
+begin
+ Result := DefaultInterface.Get_ObjectName;
+end;
+
+procedure THold.Set_ObjectName(const retval: WideString);
+begin
+ DefaultInterface.Set_ObjectName(retval);
+end;
+
+function THold.Get_Amount: Integer;
+begin
+ Result := DefaultInterface.Get_Amount;
+end;
+
+procedure THold.Set_Amount(retval: Integer);
+begin
+ DefaultInterface.Set_Amount(retval);
+end;
+
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+constructor THoldProperties.Create(AServer: THold);
+begin
+ inherited Create;
+ FServer := AServer;
+end;
+
+function THoldProperties.GetDefaultInterface: IADsHold;
+begin
+ Result := FServer.DefaultInterface;
+end;
+
+function THoldProperties.Get_ObjectName: WideString;
+begin
+ Result := DefaultInterface.Get_ObjectName;
+end;
+
+procedure THoldProperties.Set_ObjectName(const retval: WideString);
+begin
+ DefaultInterface.Set_ObjectName(retval);
+end;
+
+function THoldProperties.Get_Amount: Integer;
+begin
+ Result := DefaultInterface.Get_Amount;
+end;
+
+procedure THoldProperties.Set_Amount(retval: Integer);
+begin
+ DefaultInterface.Set_Amount(retval);
+end;
+
+{$ENDIF}
+
+class function CoPathname.Create: IADsPathname;
+begin
+ Result := CreateComObject(CLASS_Pathname) as IADsPathname;
+end;
+
+class function CoPathname.CreateRemote(const MachineName: string): IADsPathname;
+begin
+ Result := CreateRemoteComObject(MachineName, CLASS_Pathname) as IADsPathname;
+end;
+
+procedure TPathname.InitServerData;
+const
+ CServerData: TServerData = (
+ ClassID: '{080D0D78-F421-11D0-A36E-00C04FB950DC}';
+ IntfIID: '{D592AED4-F420-11D0-A36E-00C04FB950DC}';
+ EventIID: '';
+ LicenseKey: nil;
+ Version: 500);
+begin
+ ServerData := @CServerData;
+end;
+
+procedure TPathname.Connect;
+var
+ punk: IUnknown;
+begin
+ if FIntf = nil then
+ begin
+ punk := GetServer;
+ Fintf:= punk as IADsPathname;
+ end;
+end;
+
+procedure TPathname.ConnectTo(svrIntf: IADsPathname);
+begin
+ Disconnect;
+ FIntf := svrIntf;
+end;
+
+procedure TPathname.DisConnect;
+begin
+ if Fintf <> nil then
+ begin
+ FIntf := nil;
+ end;
+end;
+
+function TPathname.GetDefaultInterface: IADsPathname;
+begin
+ if FIntf = nil then
+ Connect;
+ Assert(FIntf <> nil, 'DefaultInterface is NULL. Component is not connected to Server. You must call ''Connect'' or ''ConnectTo'' before this operation');
+ Result := FIntf;
+end;
+
+constructor TPathname.Create(AOwner: TComponent);
+begin
+ inherited Create(AOwner);
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+ FProps := TPathnameProperties.Create(Self);
+{$ENDIF}
+end;
+
+destructor TPathname.Destroy;
+begin
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+ FProps.Free;
+{$ENDIF}
+ inherited Destroy;
+end;
+
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+function TPathname.GetServerProperties: TPathnameProperties;
+begin
+ Result := FProps;
+end;
+{$ENDIF}
+
+function TPathname.Get_EscapedMode: Integer;
+begin
+ Result := DefaultInterface.Get_EscapedMode;
+end;
+
+procedure TPathname.Set_EscapedMode(retval: Integer);
+begin
+ DefaultInterface.Set_EscapedMode(retval);
+end;
+
+procedure TPathname.Set_(const bstrADsPath: WideString; lnSetType: Integer);
+begin
+ DefaultInterface.Set_(bstrADsPath, lnSetType);
+end;
+
+procedure TPathname.SetDisplayType(lnDisplayType: Integer);
+begin
+ DefaultInterface.SetDisplayType(lnDisplayType);
+end;
+
+function TPathname.Retrieve(lnFormatType: Integer): WideString;
+begin
+ Result := DefaultInterface.Retrieve(lnFormatType);
+end;
+
+function TPathname.GetNumElements: Integer;
+begin
+ Result := DefaultInterface.GetNumElements;
+end;
+
+function TPathname.GetElement(lnElementIndex: Integer): WideString;
+begin
+ Result := DefaultInterface.GetElement(lnElementIndex);
+end;
+
+procedure TPathname.AddLeafElement(const bstrLeafElement: WideString);
+begin
+ DefaultInterface.AddLeafElement(bstrLeafElement);
+end;
+
+procedure TPathname.RemoveLeafElement;
+begin
+ DefaultInterface.RemoveLeafElement;
+end;
+
+function TPathname.CopyPath: IDispatch;
+begin
+ Result := DefaultInterface.CopyPath;
+end;
+
+function TPathname.GetEscapedElement(lnReserved: Integer; const bstrInStr: WideString): WideString;
+begin
+ Result := DefaultInterface.GetEscapedElement(lnReserved, bstrInStr);
+end;
+
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+constructor TPathnameProperties.Create(AServer: TPathname);
+begin
+ inherited Create;
+ FServer := AServer;
+end;
+
+function TPathnameProperties.GetDefaultInterface: IADsPathname;
+begin
+ Result := FServer.DefaultInterface;
+end;
+
+function TPathnameProperties.Get_EscapedMode: Integer;
+begin
+ Result := DefaultInterface.Get_EscapedMode;
+end;
+
+procedure TPathnameProperties.Set_EscapedMode(retval: Integer);
+begin
+ DefaultInterface.Set_EscapedMode(retval);
+end;
+
+{$ENDIF}
+
+class function CoADSystemInfo.Create: IADsADSystemInfo;
+begin
+ Result := CreateComObject(CLASS_ADSystemInfo) as IADsADSystemInfo;
+end;
+
+class function CoADSystemInfo.CreateRemote(const MachineName: string): IADsADSystemInfo;
+begin
+ Result := CreateRemoteComObject(MachineName, CLASS_ADSystemInfo) as IADsADSystemInfo;
+end;
+
+procedure TADSystemInfo.InitServerData;
+const
+ CServerData: TServerData = (
+ ClassID: '{50B6327F-AFD1-11D2-9CB9-0000F87A369E}';
+ IntfIID: '{5BB11929-AFD1-11D2-9CB9-0000F87A369E}';
+ EventIID: '';
+ LicenseKey: nil;
+ Version: 500);
+begin
+ ServerData := @CServerData;
+end;
+
+procedure TADSystemInfo.Connect;
+var
+ punk: IUnknown;
+begin
+ if FIntf = nil then
+ begin
+ punk := GetServer;
+ Fintf:= punk as IADsADSystemInfo;
+ end;
+end;
+
+procedure TADSystemInfo.ConnectTo(svrIntf: IADsADSystemInfo);
+begin
+ Disconnect;
+ FIntf := svrIntf;
+end;
+
+procedure TADSystemInfo.DisConnect;
+begin
+ if Fintf <> nil then
+ begin
+ FIntf := nil;
+ end;
+end;
+
+function TADSystemInfo.GetDefaultInterface: IADsADSystemInfo;
+begin
+ if FIntf = nil then
+ Connect;
+ Assert(FIntf <> nil, 'DefaultInterface is NULL. Component is not connected to Server. You must call ''Connect'' or ''ConnectTo'' before this operation');
+ Result := FIntf;
+end;
+
+constructor TADSystemInfo.Create(AOwner: TComponent);
+begin
+ inherited Create(AOwner);
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+ FProps := TADSystemInfoProperties.Create(Self);
+{$ENDIF}
+end;
+
+destructor TADSystemInfo.Destroy;
+begin
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+ FProps.Free;
+{$ENDIF}
+ inherited Destroy;
+end;
+
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+function TADSystemInfo.GetServerProperties: TADSystemInfoProperties;
+begin
+ Result := FProps;
+end;
+{$ENDIF}
+
+function TADSystemInfo.Get_UserName: WideString;
+begin
+ Result := DefaultInterface.Get_UserName;
+end;
+
+function TADSystemInfo.Get_ComputerName: WideString;
+begin
+ Result := DefaultInterface.Get_ComputerName;
+end;
+
+function TADSystemInfo.Get_SiteName: WideString;
+begin
+ Result := DefaultInterface.Get_SiteName;
+end;
+
+function TADSystemInfo.Get_DomainShortName: WideString;
+begin
+ Result := DefaultInterface.Get_DomainShortName;
+end;
+
+function TADSystemInfo.Get_DomainDNSName: WideString;
+begin
+ Result := DefaultInterface.Get_DomainDNSName;
+end;
+
+function TADSystemInfo.Get_ForestDNSName: WideString;
+begin
+ Result := DefaultInterface.Get_ForestDNSName;
+end;
+
+function TADSystemInfo.Get_PDCRoleOwner: WideString;
+begin
+ Result := DefaultInterface.Get_PDCRoleOwner;
+end;
+
+function TADSystemInfo.Get_SchemaRoleOwner: WideString;
+begin
+ Result := DefaultInterface.Get_SchemaRoleOwner;
+end;
+
+function TADSystemInfo.Get_IsNativeMode: WordBool;
+begin
+ Result := DefaultInterface.Get_IsNativeMode;
+end;
+
+function TADSystemInfo.GetAnyDCName: WideString;
+begin
+ Result := DefaultInterface.GetAnyDCName;
+end;
+
+function TADSystemInfo.GetDCSiteName(const szServer: WideString): WideString;
+begin
+ Result := DefaultInterface.GetDCSiteName(szServer);
+end;
+
+procedure TADSystemInfo.RefreshSchemaCache;
+begin
+ DefaultInterface.RefreshSchemaCache;
+end;
+
+function TADSystemInfo.GetTrees: OleVariant;
+begin
+ Result := DefaultInterface.GetTrees;
+end;
+
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+constructor TADSystemInfoProperties.Create(AServer: TADSystemInfo);
+begin
+ inherited Create;
+ FServer := AServer;
+end;
+
+function TADSystemInfoProperties.GetDefaultInterface: IADsADSystemInfo;
+begin
+ Result := FServer.DefaultInterface;
+end;
+
+function TADSystemInfoProperties.Get_UserName: WideString;
+begin
+ Result := DefaultInterface.Get_UserName;
+end;
+
+function TADSystemInfoProperties.Get_ComputerName: WideString;
+begin
+ Result := DefaultInterface.Get_ComputerName;
+end;
+
+function TADSystemInfoProperties.Get_SiteName: WideString;
+begin
+ Result := DefaultInterface.Get_SiteName;
+end;
+
+function TADSystemInfoProperties.Get_DomainShortName: WideString;
+begin
+ Result := DefaultInterface.Get_DomainShortName;
+end;
+
+function TADSystemInfoProperties.Get_DomainDNSName: WideString;
+begin
+ Result := DefaultInterface.Get_DomainDNSName;
+end;
+
+function TADSystemInfoProperties.Get_ForestDNSName: WideString;
+begin
+ Result := DefaultInterface.Get_ForestDNSName;
+end;
+
+function TADSystemInfoProperties.Get_PDCRoleOwner: WideString;
+begin
+ Result := DefaultInterface.Get_PDCRoleOwner;
+end;
+
+function TADSystemInfoProperties.Get_SchemaRoleOwner: WideString;
+begin
+ Result := DefaultInterface.Get_SchemaRoleOwner;
+end;
+
+function TADSystemInfoProperties.Get_IsNativeMode: WordBool;
+begin
+ Result := DefaultInterface.Get_IsNativeMode;
+end;
+
+{$ENDIF}
+
+class function CoWinNTSystemInfo.Create: IADsWinNTSystemInfo;
+begin
+ Result := CreateComObject(CLASS_WinNTSystemInfo) as IADsWinNTSystemInfo;
+end;
+
+class function CoWinNTSystemInfo.CreateRemote(const MachineName: string): IADsWinNTSystemInfo;
+begin
+ Result := CreateRemoteComObject(MachineName, CLASS_WinNTSystemInfo) as IADsWinNTSystemInfo;
+end;
+
+procedure TWinNTSystemInfo.InitServerData;
+const
+ CServerData: TServerData = (
+ ClassID: '{66182EC4-AFD1-11D2-9CB9-0000F87A369E}';
+ IntfIID: '{6C6D65DC-AFD1-11D2-9CB9-0000F87A369E}';
+ EventIID: '';
+ LicenseKey: nil;
+ Version: 500);
+begin
+ ServerData := @CServerData;
+end;
+
+procedure TWinNTSystemInfo.Connect;
+var
+ punk: IUnknown;
+begin
+ if FIntf = nil then
+ begin
+ punk := GetServer;
+ Fintf:= punk as IADsWinNTSystemInfo;
+ end;
+end;
+
+procedure TWinNTSystemInfo.ConnectTo(svrIntf: IADsWinNTSystemInfo);
+begin
+ Disconnect;
+ FIntf := svrIntf;
+end;
+
+procedure TWinNTSystemInfo.DisConnect;
+begin
+ if Fintf <> nil then
+ begin
+ FIntf := nil;
+ end;
+end;
+
+function TWinNTSystemInfo.GetDefaultInterface: IADsWinNTSystemInfo;
+begin
+ if FIntf = nil then
+ Connect;
+ Assert(FIntf <> nil, 'DefaultInterface is NULL. Component is not connected to Server. You must call ''Connect'' or ''ConnectTo'' before this operation');
+ Result := FIntf;
+end;
+
+constructor TWinNTSystemInfo.Create(AOwner: TComponent);
+begin
+ inherited Create(AOwner);
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+ FProps := TWinNTSystemInfoProperties.Create(Self);
+{$ENDIF}
+end;
+
+destructor TWinNTSystemInfo.Destroy;
+begin
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+ FProps.Free;
+{$ENDIF}
+ inherited Destroy;
+end;
+
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+function TWinNTSystemInfo.GetServerProperties: TWinNTSystemInfoProperties;
+begin
+ Result := FProps;
+end;
+{$ENDIF}
+
+function TWinNTSystemInfo.Get_UserName: WideString;
+begin
+ Result := DefaultInterface.Get_UserName;
+end;
+
+function TWinNTSystemInfo.Get_ComputerName: WideString;
+begin
+ Result := DefaultInterface.Get_ComputerName;
+end;
+
+function TWinNTSystemInfo.Get_DomainName: WideString;
+begin
+ Result := DefaultInterface.Get_DomainName;
+end;
+
+function TWinNTSystemInfo.Get_PDC: WideString;
+begin
+ Result := DefaultInterface.Get_PDC;
+end;
+
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+constructor TWinNTSystemInfoProperties.Create(AServer: TWinNTSystemInfo);
+begin
+ inherited Create;
+ FServer := AServer;
+end;
+
+function TWinNTSystemInfoProperties.GetDefaultInterface: IADsWinNTSystemInfo;
+begin
+ Result := FServer.DefaultInterface;
+end;
+
+function TWinNTSystemInfoProperties.Get_UserName: WideString;
+begin
+ Result := DefaultInterface.Get_UserName;
+end;
+
+function TWinNTSystemInfoProperties.Get_ComputerName: WideString;
+begin
+ Result := DefaultInterface.Get_ComputerName;
+end;
+
+function TWinNTSystemInfoProperties.Get_DomainName: WideString;
+begin
+ Result := DefaultInterface.Get_DomainName;
+end;
+
+function TWinNTSystemInfoProperties.Get_PDC: WideString;
+begin
+ Result := DefaultInterface.Get_PDC;
+end;
+
+{$ENDIF}
+
+class function CoDNWithBinary.Create: IADsDNWithBinary;
+begin
+ Result := CreateComObject(CLASS_DNWithBinary) as IADsDNWithBinary;
+end;
+
+class function CoDNWithBinary.CreateRemote(const MachineName: string): IADsDNWithBinary;
+begin
+ Result := CreateRemoteComObject(MachineName, CLASS_DNWithBinary) as IADsDNWithBinary;
+end;
+
+procedure TDNWithBinary.InitServerData;
+const
+ CServerData: TServerData = (
+ ClassID: '{7E99C0A3-F935-11D2-BA96-00C04FB6D0D1}';
+ IntfIID: '{7E99C0A2-F935-11D2-BA96-00C04FB6D0D1}';
+ EventIID: '';
+ LicenseKey: nil;
+ Version: 500);
+begin
+ ServerData := @CServerData;
+end;
+
+procedure TDNWithBinary.Connect;
+var
+ punk: IUnknown;
+begin
+ if FIntf = nil then
+ begin
+ punk := GetServer;
+ Fintf:= punk as IADsDNWithBinary;
+ end;
+end;
+
+procedure TDNWithBinary.ConnectTo(svrIntf: IADsDNWithBinary);
+begin
+ Disconnect;
+ FIntf := svrIntf;
+end;
+
+procedure TDNWithBinary.DisConnect;
+begin
+ if Fintf <> nil then
+ begin
+ FIntf := nil;
+ end;
+end;
+
+function TDNWithBinary.GetDefaultInterface: IADsDNWithBinary;
+begin
+ if FIntf = nil then
+ Connect;
+ Assert(FIntf <> nil, 'DefaultInterface is NULL. Component is not connected to Server. You must call ''Connect'' or ''ConnectTo'' before this operation');
+ Result := FIntf;
+end;
+
+constructor TDNWithBinary.Create(AOwner: TComponent);
+begin
+ inherited Create(AOwner);
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+ FProps := TDNWithBinaryProperties.Create(Self);
+{$ENDIF}
+end;
+
+destructor TDNWithBinary.Destroy;
+begin
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+ FProps.Free;
+{$ENDIF}
+ inherited Destroy;
+end;
+
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+function TDNWithBinary.GetServerProperties: TDNWithBinaryProperties;
+begin
+ Result := FProps;
+end;
+{$ENDIF}
+
+function TDNWithBinary.Get_BinaryValue: OleVariant;
+begin
+ Result := DefaultInterface.Get_BinaryValue;
+end;
+
+procedure TDNWithBinary.Set_BinaryValue(retval: OleVariant);
+begin
+ DefaultInterface.Set_BinaryValue(retval);
+end;
+
+function TDNWithBinary.Get_DNString: WideString;
+begin
+ Result := DefaultInterface.Get_DNString;
+end;
+
+procedure TDNWithBinary.Set_DNString(const retval: WideString);
+begin
+ DefaultInterface.Set_DNString(retval);
+end;
+
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+constructor TDNWithBinaryProperties.Create(AServer: TDNWithBinary);
+begin
+ inherited Create;
+ FServer := AServer;
+end;
+
+function TDNWithBinaryProperties.GetDefaultInterface: IADsDNWithBinary;
+begin
+ Result := FServer.DefaultInterface;
+end;
+
+function TDNWithBinaryProperties.Get_BinaryValue: OleVariant;
+begin
+ Result := DefaultInterface.Get_BinaryValue;
+end;
+
+procedure TDNWithBinaryProperties.Set_BinaryValue(retval: OleVariant);
+begin
+ DefaultInterface.Set_BinaryValue(retval);
+end;
+
+function TDNWithBinaryProperties.Get_DNString: WideString;
+begin
+ Result := DefaultInterface.Get_DNString;
+end;
+
+procedure TDNWithBinaryProperties.Set_DNString(const retval: WideString);
+begin
+ DefaultInterface.Set_DNString(retval);
+end;
+
+{$ENDIF}
+
+class function CoDNWithString.Create: IADsDNWithString;
+begin
+ Result := CreateComObject(CLASS_DNWithString) as IADsDNWithString;
+end;
+
+class function CoDNWithString.CreateRemote(const MachineName: string): IADsDNWithString;
+begin
+ Result := CreateRemoteComObject(MachineName, CLASS_DNWithString) as IADsDNWithString;
+end;
+
+procedure TDNWithString.InitServerData;
+const
+ CServerData: TServerData = (
+ ClassID: '{334857CC-F934-11D2-BA96-00C04FB6D0D1}';
+ IntfIID: '{370DF02E-F934-11D2-BA96-00C04FB6D0D1}';
+ EventIID: '';
+ LicenseKey: nil;
+ Version: 500);
+begin
+ ServerData := @CServerData;
+end;
+
+procedure TDNWithString.Connect;
+var
+ punk: IUnknown;
+begin
+ if FIntf = nil then
+ begin
+ punk := GetServer;
+ Fintf:= punk as IADsDNWithString;
+ end;
+end;
+
+procedure TDNWithString.ConnectTo(svrIntf: IADsDNWithString);
+begin
+ Disconnect;
+ FIntf := svrIntf;
+end;
+
+procedure TDNWithString.DisConnect;
+begin
+ if Fintf <> nil then
+ begin
+ FIntf := nil;
+ end;
+end;
+
+function TDNWithString.GetDefaultInterface: IADsDNWithString;
+begin
+ if FIntf = nil then
+ Connect;
+ Assert(FIntf <> nil, 'DefaultInterface is NULL. Component is not connected to Server. You must call ''Connect'' or ''ConnectTo'' before this operation');
+ Result := FIntf;
+end;
+
+constructor TDNWithString.Create(AOwner: TComponent);
+begin
+ inherited Create(AOwner);
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+ FProps := TDNWithStringProperties.Create(Self);
+{$ENDIF}
+end;
+
+destructor TDNWithString.Destroy;
+begin
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+ FProps.Free;
+{$ENDIF}
+ inherited Destroy;
+end;
+
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+function TDNWithString.GetServerProperties: TDNWithStringProperties;
+begin
+ Result := FProps;
+end;
+{$ENDIF}
+
+function TDNWithString.Get_StringValue: WideString;
+begin
+ Result := DefaultInterface.Get_StringValue;
+end;
+
+procedure TDNWithString.Set_StringValue(const retval: WideString);
+begin
+ DefaultInterface.Set_StringValue(retval);
+end;
+
+function TDNWithString.Get_DNString: WideString;
+begin
+ Result := DefaultInterface.Get_DNString;
+end;
+
+procedure TDNWithString.Set_DNString(const retval: WideString);
+begin
+ DefaultInterface.Set_DNString(retval);
+end;
+
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+constructor TDNWithStringProperties.Create(AServer: TDNWithString);
+begin
+ inherited Create;
+ FServer := AServer;
+end;
+
+function TDNWithStringProperties.GetDefaultInterface: IADsDNWithString;
+begin
+ Result := FServer.DefaultInterface;
+end;
+
+function TDNWithStringProperties.Get_StringValue: WideString;
+begin
+ Result := DefaultInterface.Get_StringValue;
+end;
+
+procedure TDNWithStringProperties.Set_StringValue(const retval: WideString);
+begin
+ DefaultInterface.Set_StringValue(retval);
+end;
+
+function TDNWithStringProperties.Get_DNString: WideString;
+begin
+ Result := DefaultInterface.Get_DNString;
+end;
+
+procedure TDNWithStringProperties.Set_DNString(const retval: WideString);
+begin
+ DefaultInterface.Set_DNString(retval);
+end;
+
+{$ENDIF}
+
+
+{$ifdef FPC} // dummy
+{
+function CreateComObject(ID: TGUID): IUnknown; //empty
+
+begin
+end;
+
+function CreateRemoteComObject(w:widestring; ID: TGUID): IUnknown; //empty
+
+begin
+end;
+}
+function tOleServer.GetServer:IUnknown;
+begin
+end;
+
+procedure tOleServer.InitServerData;
+begin
+end;
+constructor tOleServer.Create(AOwner: TComponent);
+begin
+end;
+Procedure tOleServer.Connect;
+begin
+end;
+procedure tOleServer.Disconnect;
+begin
+end;
+
+
+{$endif}
+
+
+procedure Register;
+begin
+ RegisterComponents('ActiveX',[TPropertyEntry, TPropertyValue, TAccessControlEntry, TAccessControlList,
+ TSecurityDescriptor, TLargeInteger, TNameTranslate, TCaseIgnoreList, TFaxNumber,
+ TNetAddress, TOctetList, TEmail, TPath, TReplicaPointer,
+ TAcl, TTimestamp, TPostalAddress, TBackLink, TTypedName,
+ THold, TPathname, TADSystemInfo, TWinNTSystemInfo, TDNWithBinary,
+ TDNWithString]);
+end;
+
+
+
+end.
diff --git a/packages/extra/winunits/jwaadtgen.pas b/packages/extra/winunits/jwaadtgen.pas
index f8f0fc52f0..fe80166799 100644
--- a/packages/extra/winunits/jwaadtgen.pas
+++ b/packages/extra/winunits/jwaadtgen.pas
@@ -1,458 +1,458 @@
-{******************************************************************************}
-{ }
-{ Authz Generic Audits API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: adtgen.h, released August 2001. The original Pascal }
-{ code is: AdtGen.pas, released October 2001. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwaadtgen.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaAdtGen;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "adtgen.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaWinNT, JwaWinType;
-
-//
-// type of audit
-//
-// AUDIT_TYPE_LEGACY
-// In this case the audit event schema is stored in a .mc file.
-//
-// AUDIT_TYPE_WMI
-// The schema is stored in WMI. (currently not supported)
-//
-
-const
- AUDIT_TYPE_LEGACY = 1;
- {$EXTERNALSYM AUDIT_TYPE_LEGACY}
- AUDIT_TYPE_WMI = 2;
- {$EXTERNALSYM AUDIT_TYPE_WMI}
-
-//
-// Type of parameters passed in the AUDIT_PARAMS.Parameters array
-//
-// Use the AdtInitParams function to initialize and prepare
-// an array of audit parameters.
-//
-
-type
- _AUDIT_PARAM_TYPE = (
-
- APT__0,
-
- //
- // do we need this?
- //
-
- APT_None,
-
- //
- // NULL terminated string
- //
-
- APT_String,
-
- //
- // unsigned long
- //
-
- APT_Ulong,
-
- //
- // a pointer. use for specifying handles/pointers
- // (32 bit on 32 bit systems and 64 bit on 64 bit systems)
- // Note that the memory to which the pointer points to
- // is not marshalled when using this type. Use this when you
- // are interested in the absolute value of the pointer.
- // A good example of this is when specifying HANDLE values.
- //
-
- APT_Pointer,
-
- //
- // SID
- //
-
- APT_Sid,
-
- //
- // Logon ID (LUID)
- //
-
- APT_LogonId,
-
- //
- // Object Type List
- //
-
- APT_ObjectTypeList,
-
- //
- // Luid (not translated to LogonId)
- //
-
- APT_Luid,
-
- //
- // Guid
- //
-
- APT_Guid,
-
- //
- // Time (FILETIME)
- //
-
- APT_Time,
-
- //
- // ULONGLONG
- //
-
- APT_Int64
- );
- {$EXTERNALSYM _AUDIT_PARAM_TYPE}
- AUDIT_PARAM_TYPE = _AUDIT_PARAM_TYPE;
- {$EXTERNALSYM AUDIT_PARAM_TYPE}
- TAuditParamType = AUDIT_PARAM_TYPE;
-
-//
-// There are two types of flags that can be used with a parameter.
-//
-// - formatting flag
-// This defines the appearance of a parameter when
-// written to the eventlog. Such flags may become obsolete
-// when we move to WMI auditing.
-//
-// - control flag
-// This causes a specified action to be taken that affects
-// a parameter value.
-//
-// For example:
-// If you use the AP_PrimaryLogonId/AP_ClientLogonId flag,
-// the system will capture the logon-id from the process/thread token.
-//
-
-const
- AP_ParamTypeBits = 8;
- {$EXTERNALSYM AP_ParamTypeBits}
- AP_ParamTypeMask = $000000ff;
- {$EXTERNALSYM AP_ParamTypeMask}
-
-//
-// the flags values below have overlapping values. this is ok since
-// the scope of each flag is limited to the type to which it applies.
-//
-
-//
-// APT_Ulong : format flag : causes a number to appear in hex
-//
-
- AP_FormatHex = $0001 shl AP_ParamTypeBits;
- {$EXTERNALSYM AP_FormatHex}
-
-//
-// APT_Ulong : format flag : causes a number to be treated as access-mask.
-// The meaning of each bit depends on the associated
-// object type.
-//
-
- AP_AccessMask = $0002 shl AP_ParamTypeBits;
- {$EXTERNALSYM AP_AccessMask}
-
-
-//
-// APT_String : format flag : causes a string to be treated as a file-path
-//
-
- AP_Filespec = $0001 shl AP_ParamTypeBits;
- {$EXTERNALSYM AP_Filespec}
-
-//
-// APT_LogonId : control flag : logon-id is captured from the process token
-//
-
- AP_PrimaryLogonId = $0001 shl AP_ParamTypeBits;
- {$EXTERNALSYM AP_PrimaryLogonId}
-
-//
-// APT_LogonId : control flag : logon-id is captured from the thread token
-//
-
- AP_ClientLogonId = $0002 shl AP_ParamTypeBits;
- {$EXTERNALSYM AP_ClientLogonId}
-
-//
-// internal helper macros
-//
-
-// (rom) MACRO
-function ApExtractType(TypeFlags: DWORD): AUDIT_PARAM_TYPE;
-{$EXTERNALSYM ApExtractType}
-
-// (rom) MACRO
-function ApExtractFlags(TypeFlags: DWORD): DWORD;
-{$EXTERNALSYM ApExtractFlags}
-
-//
-// Element of an object-type-list
-//
-// The AUDIT_OBJECT_TYPES structure identifies an object type element
-// in a hierarchy of object types. The AccessCheckByType functions use
-// an array of such structures to define a hierarchy of an object and
-// its subobjects, such as property sets and properties.
-//
-
-type
- PAUDIT_OBJECT_TYPE = ^AUDIT_OBJECT_TYPE;
- {$EXTERNALSYM PAUDIT_OBJECT_TYPE}
- _AUDIT_OBJECT_TYPE = record
- ObjectType: GUID; // guid of the (sub)object
- Flags: USHORT; // currently not defined
- Level: USHORT; // level within the hierarchy.
- // 0 is the root level
- AccessMask: ACCESS_MASK; // access-mask for this (sub)object
- end;
- {$EXTERNALSYM _AUDIT_OBJECT_TYPE}
- AUDIT_OBJECT_TYPE = _AUDIT_OBJECT_TYPE;
- {$EXTERNALSYM AUDIT_OBJECT_TYPE}
- TAuditObjectType = AUDIT_OBJECT_TYPE;
- PAuditObjectType = PAUDIT_OBJECT_TYPE;
-
- PAUDIT_OBJECT_TYPES = ^AUDIT_OBJECT_TYPES;
- {$EXTERNALSYM PAUDIT_OBJECT_TYPES}
- _AUDIT_OBJECT_TYPES = record
- Count: USHORT; // number of object-types in pObjectTypes
- Flags: USHORT; // currently not defined
- pObjectTypes: PAUDIT_OBJECT_TYPE; // array of object-types
- end;
- {$EXTERNALSYM _AUDIT_OBJECT_TYPES}
- AUDIT_OBJECT_TYPES = _AUDIT_OBJECT_TYPES;
- {$EXTERNALSYM AUDIT_OBJECT_TYPES}
- TAuditObjectTypes = AUDIT_OBJECT_TYPES;
- PAuditObjectTypes = PAUDIT_OBJECT_TYPES;
-
-//
-// Structure that defines a single audit parameter.
-//
-// LsaGenAuditEvent accepts an array of such elements to
-// represent the parameters of the audit to be generated.
-//
-// It is best to initialize this structure using AdtInitParams function.
-// This will ensure compatibility with any future changes to this
-// structure.
-//
-
-type
- _AUDIT_PARAM = record
- Type_: AUDIT_PARAM_TYPE; // type
- Length: ULONG; // currently unused
- Flags: DWORD; // currently unused
- U: record
- case Integer of
- 0: (Data0: ULONG_PTR);
- 1: (String_: PWSTR);
- 2: (u: ULONG_PTR);
- 3: (psid: PSID);
- 4: (pguid: LPGUID);
- 5: (LogonId_LowPart: ULONG);
- 6: (pObjectTypes: PAUDIT_OBJECT_TYPES);
- end;
- case Integer of
- 0: (Data1: ULONG_PTR);
- 1: (LogonId_HighPart: LONG);
- end;
- {$EXTERNALSYM _AUDIT_PARAM}
- AUDIT_PARAM = _AUDIT_PARAM;
- {$EXTERNALSYM AUDIT_PARAM}
- PAUDIT_PARAM = ^AUDIT_PARAM;
- {$EXTERNALSYM PAUDIT_PARAM}
- TAuditParam = AUDIT_PARAM;
- PAuditParam = PAUDIT_PARAM;
-
-//
-// Audit control flags. To be used with AUDIT_PARAMS.Flags
-//
-
-const
- APF_AuditFailure = $00000000; // generate a failure audit
- {$EXTERNALSYM APF_AuditFailure}
- APF_AuditSuccess = $00000001; // generate a success audit when set, a failure audit otherwise.
- {$EXTERNALSYM APF_AuditSuccess}
-
-//
-// set of valid audit control flags
-//
-
- APF_ValidFlags = APF_AuditSuccess;
- {$EXTERNALSYM APF_ValidFlags}
-
-//
-// Audit parameters passed to LsaGenAuditEvent
-//
-
-type
- PAUDIT_PARAMS = ^AUDIT_PARAMS;
- {$EXTERNALSYM PAUDIT_PARAMS}
- _AUDIT_PARAMS = record
- Length: ULONG; // size in bytes
- Flags: DWORD; // currently unused
- Count: USHORT; // number of parameters
- Parameters: PAUDIT_PARAM; // array of parameters
- end;
- {$EXTERNALSYM _AUDIT_PARAMS}
- AUDIT_PARAMS = _AUDIT_PARAMS;
- {$EXTERNALSYM AUDIT_PARAMS}
- TAuditParams = AUDIT_PARAMS;
- PAuditParams = PAUDIT_PARAMS;
-
-//
-// Defines the elements of a legacy audit event.
-//
-
- PAUTHZ_AUDIT_EVENT_TYPE_LEGACY = ^AUTHZ_AUDIT_EVENT_TYPE_LEGACY;
- {$EXTERNALSYM PAUTHZ_AUDIT_EVENT_TYPE_LEGACY}
- _AUTHZ_AUDIT_EVENT_TYPE_LEGACY = record
- //
- // Audit category ID
- //
- CategoryId: USHORT;
- //
- // Audit event ID
- //
- AuditId: USHORT;
- //
- // Parameter count
- //
- ParameterCount: USHORT;
- end;
- {$EXTERNALSYM _AUTHZ_AUDIT_EVENT_TYPE_LEGACY}
- AUTHZ_AUDIT_EVENT_TYPE_LEGACY = _AUTHZ_AUDIT_EVENT_TYPE_LEGACY;
- {$EXTERNALSYM AUTHZ_AUDIT_EVENT_TYPE_LEGACY}
- TAuthzAuditEventTypeLegacy = AUTHZ_AUDIT_EVENT_TYPE_LEGACY;
- PAuthzAuditEventTypeLegacy = PAUTHZ_AUDIT_EVENT_TYPE_LEGACY;
-
- _AUTHZ_AUDIT_EVENT_TYPE_UNION = record
- case Integer of
- 0: (Legacy: AUTHZ_AUDIT_EVENT_TYPE_LEGACY);
- end;
- {$EXTERNALSYM _AUTHZ_AUDIT_EVENT_TYPE_UNION}
- AUTHZ_AUDIT_EVENT_TYPE_UNION = _AUTHZ_AUDIT_EVENT_TYPE_UNION;
- {$EXTERNALSYM AUTHZ_AUDIT_EVENT_TYPE_UNION}
- PAUTHZ_AUDIT_EVENT_TYPE_UNION = ^AUTHZ_AUDIT_EVENT_TYPE_UNION;
- {$EXTERNALSYM PAUTHZ_AUDIT_EVENT_TYPE_UNION}
- TAuthzAuditEventTypeUnion = AUTHZ_AUDIT_EVENT_TYPE_UNION;
- PAuthzAuditEventTypeUnion = PAUTHZ_AUDIT_EVENT_TYPE_UNION;
-
-//
-// description of an audit event
-//
-
- _AUTHZ_AUDIT_EVENT_TYPE_OLD = record
- // version number
- Version: ULONG;
- dwFlags: DWORD;
- RefCount: LONG;
- hAudit: ULONG_PTR;
- LinkId: LUID;
- u: AUTHZ_AUDIT_EVENT_TYPE_UNION;
- end;
- {$EXTERNALSYM _AUTHZ_AUDIT_EVENT_TYPE_OLD}
- AUTHZ_AUDIT_EVENT_TYPE_OLD = _AUTHZ_AUDIT_EVENT_TYPE_OLD;
- {$EXTERNALSYM AUTHZ_AUDIT_EVENT_TYPE_OLD}
- TAuthzAuditEventTypeOld = AUTHZ_AUDIT_EVENT_TYPE_OLD;
- PAuthzAuditEventTypeOld = ^AUTHZ_AUDIT_EVENT_TYPE_OLD;
-
- PAUTHZ_AUDIT_EVENT_TYPE_OLD = ^AUTHZ_AUDIT_EVENT_TYPE_OLD;
- {$EXTERNALSYM PAUTHZ_AUDIT_EVENT_TYPE_OLD}
- AUDIT_HANDLE = PVOID;
- {$EXTERNALSYM AUDIT_HANDLE}
- PAUDIT_HANDLE = ^AUDIT_HANDLE;
- {$EXTERNALSYM PAUDIT_HANDLE}
-
-(* todo
-function AuthzpRegisterAuditEvent(pAuditEventType: PAUTHZ_AUDIT_EVENT_TYPE_OLD; var phAuditContext: AUDIT_HANDLE): BOOL; stdcall;
-{$EXTERNALSYM AuthzpRegisterAuditEvent}
-
-function AuthzpUnregisterAuditEvent(var phAuditContext: AUDIT_HANDLE): BOOL; stdcall;
-{$EXTERNALSYM AuthzpUnregisterAuditEvent}
-*)
-
-//
-// Begin support for extensible auditing.
-//
-
-const
- AUTHZ_ALLOW_MULTIPLE_SOURCE_INSTANCES = $1;
- {$EXTERNALSYM AUTHZ_ALLOW_MULTIPLE_SOURCE_INSTANCES}
-
- AUTHZ_AUDIT_INSTANCE_INFORMATION = $2;
- {$EXTERNALSYM AUTHZ_AUDIT_INSTANCE_INFORMATION}
-
-implementation
-
-const
- authzlib = 'authz.dll';
-
-// (rom) MACRO implementation
-function ApExtractType(TypeFlags: DWORD): AUDIT_PARAM_TYPE;
-begin
- Result := AUDIT_PARAM_TYPE(TypeFlags and AP_ParamTypeMask);
-end;
-
-// (rom) MACRO implementation
-function ApExtractFlags(TypeFlags: DWORD): DWORD;
-begin
- Result := TypeFlags and not AP_ParamTypeMask;
-end;
-
-{
-AuthzpRegisterAuditEvent
-AuthzpUnregisterAuditEvent
-}
-end.
+{******************************************************************************}
+{ }
+{ Authz Generic Audits API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: adtgen.h, released August 2001. The original Pascal }
+{ code is: AdtGen.pas, released October 2001. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwaadtgen.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaAdtGen;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "adtgen.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaWinNT, JwaWinType;
+
+//
+// type of audit
+//
+// AUDIT_TYPE_LEGACY
+// In this case the audit event schema is stored in a .mc file.
+//
+// AUDIT_TYPE_WMI
+// The schema is stored in WMI. (currently not supported)
+//
+
+const
+ AUDIT_TYPE_LEGACY = 1;
+ {$EXTERNALSYM AUDIT_TYPE_LEGACY}
+ AUDIT_TYPE_WMI = 2;
+ {$EXTERNALSYM AUDIT_TYPE_WMI}
+
+//
+// Type of parameters passed in the AUDIT_PARAMS.Parameters array
+//
+// Use the AdtInitParams function to initialize and prepare
+// an array of audit parameters.
+//
+
+type
+ _AUDIT_PARAM_TYPE = (
+
+ APT__0,
+
+ //
+ // do we need this?
+ //
+
+ APT_None,
+
+ //
+ // NULL terminated string
+ //
+
+ APT_String,
+
+ //
+ // unsigned long
+ //
+
+ APT_Ulong,
+
+ //
+ // a pointer. use for specifying handles/pointers
+ // (32 bit on 32 bit systems and 64 bit on 64 bit systems)
+ // Note that the memory to which the pointer points to
+ // is not marshalled when using this type. Use this when you
+ // are interested in the absolute value of the pointer.
+ // A good example of this is when specifying HANDLE values.
+ //
+
+ APT_Pointer,
+
+ //
+ // SID
+ //
+
+ APT_Sid,
+
+ //
+ // Logon ID (LUID)
+ //
+
+ APT_LogonId,
+
+ //
+ // Object Type List
+ //
+
+ APT_ObjectTypeList,
+
+ //
+ // Luid (not translated to LogonId)
+ //
+
+ APT_Luid,
+
+ //
+ // Guid
+ //
+
+ APT_Guid,
+
+ //
+ // Time (FILETIME)
+ //
+
+ APT_Time,
+
+ //
+ // ULONGLONG
+ //
+
+ APT_Int64
+ );
+ {$EXTERNALSYM _AUDIT_PARAM_TYPE}
+ AUDIT_PARAM_TYPE = _AUDIT_PARAM_TYPE;
+ {$EXTERNALSYM AUDIT_PARAM_TYPE}
+ TAuditParamType = AUDIT_PARAM_TYPE;
+
+//
+// There are two types of flags that can be used with a parameter.
+//
+// - formatting flag
+// This defines the appearance of a parameter when
+// written to the eventlog. Such flags may become obsolete
+// when we move to WMI auditing.
+//
+// - control flag
+// This causes a specified action to be taken that affects
+// a parameter value.
+//
+// For example:
+// If you use the AP_PrimaryLogonId/AP_ClientLogonId flag,
+// the system will capture the logon-id from the process/thread token.
+//
+
+const
+ AP_ParamTypeBits = 8;
+ {$EXTERNALSYM AP_ParamTypeBits}
+ AP_ParamTypeMask = $000000ff;
+ {$EXTERNALSYM AP_ParamTypeMask}
+
+//
+// the flags values below have overlapping values. this is ok since
+// the scope of each flag is limited to the type to which it applies.
+//
+
+//
+// APT_Ulong : format flag : causes a number to appear in hex
+//
+
+ AP_FormatHex = $0001 shl AP_ParamTypeBits;
+ {$EXTERNALSYM AP_FormatHex}
+
+//
+// APT_Ulong : format flag : causes a number to be treated as access-mask.
+// The meaning of each bit depends on the associated
+// object type.
+//
+
+ AP_AccessMask = $0002 shl AP_ParamTypeBits;
+ {$EXTERNALSYM AP_AccessMask}
+
+
+//
+// APT_String : format flag : causes a string to be treated as a file-path
+//
+
+ AP_Filespec = $0001 shl AP_ParamTypeBits;
+ {$EXTERNALSYM AP_Filespec}
+
+//
+// APT_LogonId : control flag : logon-id is captured from the process token
+//
+
+ AP_PrimaryLogonId = $0001 shl AP_ParamTypeBits;
+ {$EXTERNALSYM AP_PrimaryLogonId}
+
+//
+// APT_LogonId : control flag : logon-id is captured from the thread token
+//
+
+ AP_ClientLogonId = $0002 shl AP_ParamTypeBits;
+ {$EXTERNALSYM AP_ClientLogonId}
+
+//
+// internal helper macros
+//
+
+// (rom) MACRO
+function ApExtractType(TypeFlags: DWORD): AUDIT_PARAM_TYPE;
+{$EXTERNALSYM ApExtractType}
+
+// (rom) MACRO
+function ApExtractFlags(TypeFlags: DWORD): DWORD;
+{$EXTERNALSYM ApExtractFlags}
+
+//
+// Element of an object-type-list
+//
+// The AUDIT_OBJECT_TYPES structure identifies an object type element
+// in a hierarchy of object types. The AccessCheckByType functions use
+// an array of such structures to define a hierarchy of an object and
+// its subobjects, such as property sets and properties.
+//
+
+type
+ PAUDIT_OBJECT_TYPE = ^AUDIT_OBJECT_TYPE;
+ {$EXTERNALSYM PAUDIT_OBJECT_TYPE}
+ _AUDIT_OBJECT_TYPE = record
+ ObjectType: GUID; // guid of the (sub)object
+ Flags: USHORT; // currently not defined
+ Level: USHORT; // level within the hierarchy.
+ // 0 is the root level
+ AccessMask: ACCESS_MASK; // access-mask for this (sub)object
+ end;
+ {$EXTERNALSYM _AUDIT_OBJECT_TYPE}
+ AUDIT_OBJECT_TYPE = _AUDIT_OBJECT_TYPE;
+ {$EXTERNALSYM AUDIT_OBJECT_TYPE}
+ TAuditObjectType = AUDIT_OBJECT_TYPE;
+ PAuditObjectType = PAUDIT_OBJECT_TYPE;
+
+ PAUDIT_OBJECT_TYPES = ^AUDIT_OBJECT_TYPES;
+ {$EXTERNALSYM PAUDIT_OBJECT_TYPES}
+ _AUDIT_OBJECT_TYPES = record
+ Count: USHORT; // number of object-types in pObjectTypes
+ Flags: USHORT; // currently not defined
+ pObjectTypes: PAUDIT_OBJECT_TYPE; // array of object-types
+ end;
+ {$EXTERNALSYM _AUDIT_OBJECT_TYPES}
+ AUDIT_OBJECT_TYPES = _AUDIT_OBJECT_TYPES;
+ {$EXTERNALSYM AUDIT_OBJECT_TYPES}
+ TAuditObjectTypes = AUDIT_OBJECT_TYPES;
+ PAuditObjectTypes = PAUDIT_OBJECT_TYPES;
+
+//
+// Structure that defines a single audit parameter.
+//
+// LsaGenAuditEvent accepts an array of such elements to
+// represent the parameters of the audit to be generated.
+//
+// It is best to initialize this structure using AdtInitParams function.
+// This will ensure compatibility with any future changes to this
+// structure.
+//
+
+type
+ _AUDIT_PARAM = record
+ Type_: AUDIT_PARAM_TYPE; // type
+ Length: ULONG; // currently unused
+ Flags: DWORD; // currently unused
+ U: record
+ case Integer of
+ 0: (Data0: ULONG_PTR);
+ 1: (String_: PWSTR);
+ 2: (u: ULONG_PTR);
+ 3: (psid: PSID);
+ 4: (pguid: LPGUID);
+ 5: (LogonId_LowPart: ULONG);
+ 6: (pObjectTypes: PAUDIT_OBJECT_TYPES);
+ end;
+ case Integer of
+ 0: (Data1: ULONG_PTR);
+ 1: (LogonId_HighPart: LONG);
+ end;
+ {$EXTERNALSYM _AUDIT_PARAM}
+ AUDIT_PARAM = _AUDIT_PARAM;
+ {$EXTERNALSYM AUDIT_PARAM}
+ PAUDIT_PARAM = ^AUDIT_PARAM;
+ {$EXTERNALSYM PAUDIT_PARAM}
+ TAuditParam = AUDIT_PARAM;
+ PAuditParam = PAUDIT_PARAM;
+
+//
+// Audit control flags. To be used with AUDIT_PARAMS.Flags
+//
+
+const
+ APF_AuditFailure = $00000000; // generate a failure audit
+ {$EXTERNALSYM APF_AuditFailure}
+ APF_AuditSuccess = $00000001; // generate a success audit when set, a failure audit otherwise.
+ {$EXTERNALSYM APF_AuditSuccess}
+
+//
+// set of valid audit control flags
+//
+
+ APF_ValidFlags = APF_AuditSuccess;
+ {$EXTERNALSYM APF_ValidFlags}
+
+//
+// Audit parameters passed to LsaGenAuditEvent
+//
+
+type
+ PAUDIT_PARAMS = ^AUDIT_PARAMS;
+ {$EXTERNALSYM PAUDIT_PARAMS}
+ _AUDIT_PARAMS = record
+ Length: ULONG; // size in bytes
+ Flags: DWORD; // currently unused
+ Count: USHORT; // number of parameters
+ Parameters: PAUDIT_PARAM; // array of parameters
+ end;
+ {$EXTERNALSYM _AUDIT_PARAMS}
+ AUDIT_PARAMS = _AUDIT_PARAMS;
+ {$EXTERNALSYM AUDIT_PARAMS}
+ TAuditParams = AUDIT_PARAMS;
+ PAuditParams = PAUDIT_PARAMS;
+
+//
+// Defines the elements of a legacy audit event.
+//
+
+ PAUTHZ_AUDIT_EVENT_TYPE_LEGACY = ^AUTHZ_AUDIT_EVENT_TYPE_LEGACY;
+ {$EXTERNALSYM PAUTHZ_AUDIT_EVENT_TYPE_LEGACY}
+ _AUTHZ_AUDIT_EVENT_TYPE_LEGACY = record
+ //
+ // Audit category ID
+ //
+ CategoryId: USHORT;
+ //
+ // Audit event ID
+ //
+ AuditId: USHORT;
+ //
+ // Parameter count
+ //
+ ParameterCount: USHORT;
+ end;
+ {$EXTERNALSYM _AUTHZ_AUDIT_EVENT_TYPE_LEGACY}
+ AUTHZ_AUDIT_EVENT_TYPE_LEGACY = _AUTHZ_AUDIT_EVENT_TYPE_LEGACY;
+ {$EXTERNALSYM AUTHZ_AUDIT_EVENT_TYPE_LEGACY}
+ TAuthzAuditEventTypeLegacy = AUTHZ_AUDIT_EVENT_TYPE_LEGACY;
+ PAuthzAuditEventTypeLegacy = PAUTHZ_AUDIT_EVENT_TYPE_LEGACY;
+
+ _AUTHZ_AUDIT_EVENT_TYPE_UNION = record
+ case Integer of
+ 0: (Legacy: AUTHZ_AUDIT_EVENT_TYPE_LEGACY);
+ end;
+ {$EXTERNALSYM _AUTHZ_AUDIT_EVENT_TYPE_UNION}
+ AUTHZ_AUDIT_EVENT_TYPE_UNION = _AUTHZ_AUDIT_EVENT_TYPE_UNION;
+ {$EXTERNALSYM AUTHZ_AUDIT_EVENT_TYPE_UNION}
+ PAUTHZ_AUDIT_EVENT_TYPE_UNION = ^AUTHZ_AUDIT_EVENT_TYPE_UNION;
+ {$EXTERNALSYM PAUTHZ_AUDIT_EVENT_TYPE_UNION}
+ TAuthzAuditEventTypeUnion = AUTHZ_AUDIT_EVENT_TYPE_UNION;
+ PAuthzAuditEventTypeUnion = PAUTHZ_AUDIT_EVENT_TYPE_UNION;
+
+//
+// description of an audit event
+//
+
+ _AUTHZ_AUDIT_EVENT_TYPE_OLD = record
+ // version number
+ Version: ULONG;
+ dwFlags: DWORD;
+ RefCount: LONG;
+ hAudit: ULONG_PTR;
+ LinkId: LUID;
+ u: AUTHZ_AUDIT_EVENT_TYPE_UNION;
+ end;
+ {$EXTERNALSYM _AUTHZ_AUDIT_EVENT_TYPE_OLD}
+ AUTHZ_AUDIT_EVENT_TYPE_OLD = _AUTHZ_AUDIT_EVENT_TYPE_OLD;
+ {$EXTERNALSYM AUTHZ_AUDIT_EVENT_TYPE_OLD}
+ TAuthzAuditEventTypeOld = AUTHZ_AUDIT_EVENT_TYPE_OLD;
+ PAuthzAuditEventTypeOld = ^AUTHZ_AUDIT_EVENT_TYPE_OLD;
+
+ PAUTHZ_AUDIT_EVENT_TYPE_OLD = ^AUTHZ_AUDIT_EVENT_TYPE_OLD;
+ {$EXTERNALSYM PAUTHZ_AUDIT_EVENT_TYPE_OLD}
+ AUDIT_HANDLE = PVOID;
+ {$EXTERNALSYM AUDIT_HANDLE}
+ PAUDIT_HANDLE = ^AUDIT_HANDLE;
+ {$EXTERNALSYM PAUDIT_HANDLE}
+
+(* todo
+function AuthzpRegisterAuditEvent(pAuditEventType: PAUTHZ_AUDIT_EVENT_TYPE_OLD; var phAuditContext: AUDIT_HANDLE): BOOL; stdcall;
+{$EXTERNALSYM AuthzpRegisterAuditEvent}
+
+function AuthzpUnregisterAuditEvent(var phAuditContext: AUDIT_HANDLE): BOOL; stdcall;
+{$EXTERNALSYM AuthzpUnregisterAuditEvent}
+*)
+
+//
+// Begin support for extensible auditing.
+//
+
+const
+ AUTHZ_ALLOW_MULTIPLE_SOURCE_INSTANCES = $1;
+ {$EXTERNALSYM AUTHZ_ALLOW_MULTIPLE_SOURCE_INSTANCES}
+
+ AUTHZ_AUDIT_INSTANCE_INFORMATION = $2;
+ {$EXTERNALSYM AUTHZ_AUDIT_INSTANCE_INFORMATION}
+
+implementation
+
+const
+ authzlib = 'authz.dll';
+
+// (rom) MACRO implementation
+function ApExtractType(TypeFlags: DWORD): AUDIT_PARAM_TYPE;
+begin
+ Result := AUDIT_PARAM_TYPE(TypeFlags and AP_ParamTypeMask);
+end;
+
+// (rom) MACRO implementation
+function ApExtractFlags(TypeFlags: DWORD): DWORD;
+begin
+ Result := TypeFlags and not AP_ParamTypeMask;
+end;
+
+{
+AuthzpRegisterAuditEvent
+AuthzpUnregisterAuditEvent
+}
+end.
diff --git a/packages/extra/winunits/jwaaf_irda.pas b/packages/extra/winunits/jwaaf_irda.pas
index a0f4c6b666..27950c4a27 100644
--- a/packages/extra/winunits/jwaaf_irda.pas
+++ b/packages/extra/winunits/jwaaf_irda.pas
@@ -1,446 +1,446 @@
-{******************************************************************************}
-{ }
-{ Winsock2 IRDA API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: ad_irda.h, released June 2000. The original Pascal }
-{ code is: AD_Irda.pas, released December 2000. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwaaf_irda.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaAF_Irda;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "af_irda.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaWinSock2;
-
-//
-// Winsock1.1, IrDA1.1, WindowsNT5.0, Windows98 and WindowsCE1.0.
-// Define one of _WIN32_WINNT, _WIN32_WINDOWS, _WIN32_WCE.
-// Copyright (C) Microsoft Corporation, 1994-1999.
-//
-
-const
- WINDOWS_AF_IRDA = 26;
- {$EXTERNALSYM WINDOWS_AF_IRDA}
- WINDOWS_PF_IRDA = WINDOWS_AF_IRDA;
- {$EXTERNALSYM WINDOWS_PF_IRDA}
-
- WCE_AF_IRDA = 22;
- {$EXTERNALSYM WCE_AF_IRDA}
- WCE_PF_IRDA = WCE_AF_IRDA;
- {$EXTERNALSYM WCE_PF_IRDA}
-
- //AF_IRDA = WINDOWS_AF_IRDA;
- //{$EXTERNALSYM AF_IRDA}
-
- IRDA_PROTO_SOCK_STREAM = 1;
- {$EXTERNALSYM IRDA_PROTO_SOCK_STREAM}
-
- PF_IRDA = WINDOWS_AF_IRDA;
- {$EXTERNALSYM PF_IRDA}
-
- // WINNT, WIN98, WINCE
-
- SOL_IRLMP = $00FF;
- {$EXTERNALSYM SOL_IRLMP}
-
- IRLMP_ENUMDEVICES = $00000010;
- {$EXTERNALSYM IRLMP_ENUMDEVICES}
- IRLMP_IAS_SET = $00000011;
- {$EXTERNALSYM IRLMP_IAS_SET}
- IRLMP_IAS_QUERY = $00000012;
- {$EXTERNALSYM IRLMP_IAS_QUERY}
-
- // WINNT, WINCE
-
- IRLMP_SEND_PDU_LEN = $00000013;
- {$EXTERNALSYM IRLMP_SEND_PDU_LEN}
- IRLMP_EXCLUSIVE_MODE = $00000014;
- {$EXTERNALSYM IRLMP_EXCLUSIVE_MODE}
- IRLMP_IRLPT_MODE = $00000015;
- {$EXTERNALSYM IRLMP_IRLPT_MODE}
- IRLMP_9WIRE_MODE = $00000016;
- {$EXTERNALSYM IRLMP_9WIRE_MODE}
-
- // WIN98
-
- IRLMP_TINYTP_MODE = $00000017;
- {$EXTERNALSYM IRLMP_TINYTP_MODE}
- IRLMP_PARAMETERS = $00000018;
- {$EXTERNALSYM IRLMP_PARAMETERS}
- IRLMP_DISCOVERY_MODE = $00000019;
- {$EXTERNALSYM IRLMP_DISCOVERY_MODE}
-
- // WINCE
-
- IRLMP_SHARP_MODE = $00000020;
- {$EXTERNALSYM IRLMP_SHARP_MODE}
-
- SIO_LAZY_DISCOVERY = $4004747F; // _IOR('t', 127, u_long)
- {$EXTERNALSYM SIO_LAZY_DISCOVERY}
-
- IAS_ATTRIB_NO_CLASS = $00000010;
- {$EXTERNALSYM IAS_ATTRIB_NO_CLASS}
- IAS_ATTRIB_NO_ATTRIB = $00000000;
- {$EXTERNALSYM IAS_ATTRIB_NO_ATTRIB}
- IAS_ATTRIB_INT = $00000001;
- {$EXTERNALSYM IAS_ATTRIB_INT}
- IAS_ATTRIB_OCTETSEQ = $00000002;
- {$EXTERNALSYM IAS_ATTRIB_OCTETSEQ}
- IAS_ATTRIB_STR = $00000003;
- {$EXTERNALSYM IAS_ATTRIB_STR}
-
- IAS_MAX_USER_STRING = 256;
- {$EXTERNALSYM IAS_MAX_USER_STRING}
- IAS_MAX_OCTET_STRING = 1024;
- {$EXTERNALSYM IAS_MAX_OCTET_STRING}
- IAS_MAX_CLASSNAME = 64;
- {$EXTERNALSYM IAS_MAX_CLASSNAME}
- IAS_MAX_ATTRIBNAME = 256;
- {$EXTERNALSYM IAS_MAX_ATTRIBNAME}
-
-const
- LM_HB_Extension = 128; // Any hint byte
- {$EXTERNALSYM LM_HB_Extension}
-
- LM_HB1_PnP = 1; // First hint byte
- {$EXTERNALSYM LM_HB1_PnP}
- LM_HB1_PDA_Palmtop = 2;
- {$EXTERNALSYM LM_HB1_PDA_Palmtop}
- LM_HB1_Computer = 4;
- {$EXTERNALSYM LM_HB1_Computer}
- LM_HB1_Printer = 8;
- {$EXTERNALSYM LM_HB1_Printer}
- LM_HB1_Modem = 16;
- {$EXTERNALSYM LM_HB1_Modem}
- LM_HB1_Fax = 32;
- {$EXTERNALSYM LM_HB1_Fax}
- LM_HB1_LANAccess = 64;
- {$EXTERNALSYM LM_HB1_LANAccess}
-
- LM_HB2_Telephony = 1; // Second hint byte
- {$EXTERNALSYM LM_HB2_Telephony}
- LM_HB2_FileServer = 2;
- {$EXTERNALSYM LM_HB2_FileServer}
-
- LmCharSetASCII = 0;
- {$EXTERNALSYM LmCharSetASCII}
- LmCharSetISO_8859_1 = 1;
- {$EXTERNALSYM LmCharSetISO_8859_1}
- LmCharSetISO_8859_2 = 2;
- {$EXTERNALSYM LmCharSetISO_8859_2}
- LmCharSetISO_8859_3 = 3;
- {$EXTERNALSYM LmCharSetISO_8859_3}
- LmCharSetISO_8859_4 = 4;
- {$EXTERNALSYM LmCharSetISO_8859_4}
- LmCharSetISO_8859_5 = 5;
- {$EXTERNALSYM LmCharSetISO_8859_5}
- LmCharSetISO_8859_6 = 6;
- {$EXTERNALSYM LmCharSetISO_8859_6}
- LmCharSetISO_8859_7 = 7;
- {$EXTERNALSYM LmCharSetISO_8859_7}
- LmCharSetISO_8859_8 = 8;
- {$EXTERNALSYM LmCharSetISO_8859_8}
- LmCharSetISO_8859_9 = 9;
- {$EXTERNALSYM LmCharSetISO_8859_9}
- LmCharSetUNICODE = $ff;
- {$EXTERNALSYM LmCharSetUNICODE}
-
-type
- LM_BAUD_RATE = u_long;
- {$EXTERNALSYM LM_BAUD_RATE}
- TLMBaudRate = LM_BAUD_RATE;
- PLMBaudRate = ^LM_BAUD_RATE;
-
-const
- LM_BAUD_1200 = 1200;
- {$EXTERNALSYM LM_BAUD_1200}
- LM_BAUD_2400 = 2400;
- {$EXTERNALSYM LM_BAUD_2400}
- LM_BAUD_9600 = 9600;
- {$EXTERNALSYM LM_BAUD_9600}
- LM_BAUD_19200 = 19200;
- {$EXTERNALSYM LM_BAUD_19200}
- LM_BAUD_38400 = 38400;
- {$EXTERNALSYM LM_BAUD_38400}
- LM_BAUD_57600 = 57600;
- {$EXTERNALSYM LM_BAUD_57600}
- LM_BAUD_115200 = 115200;
- {$EXTERNALSYM LM_BAUD_115200}
- LM_BAUD_576K = 576000;
- {$EXTERNALSYM LM_BAUD_576K}
- LM_BAUD_1152K = 1152000;
- {$EXTERNALSYM LM_BAUD_1152K}
- LM_BAUD_4M = 4000000;
- {$EXTERNALSYM LM_BAUD_4M}
-
-type
- LM_IRPARMS = record
- nTXDataBytes: u_long; // Max tx data bytes per packet
- nRXDataBytes: u_long; // Max rx data bytes per packet
- nBaudRate: LM_BAUD_RATE; // Negotiated baud rate
- thresholdTime: u_long; // Threshold (ms)
- discTime: u_long; // Disconnect (ms)
- nMSLinkTurn: u_short; // Link turn around (ms)
- nTXPackets: u_char; // Number packets in transmit window
- nRXPackets: u_char; // Number packets in receive window
- end;
- {$EXTERNALSYM LM_IRPARMS}
- PLM_IRPARMS = ^LM_IRPARMS;
- TLmIrParms = LM_IRPARMS;
- PLmIrParms = PLM_IRPARMS;
-
- _SOCKADDR_IRDA = record
- irdaAddressFamily: u_short;
- irdaDeviceID: array [0..3] of u_char;
- irdaServiceName: array [0..24] of Char;
- end;
- {$EXTERNALSYM _SOCKADDR_IRDA}
- SOCKADDR_IRDA = _SOCKADDR_IRDA;
- {$EXTERNALSYM SOCKADDR_IRDA}
- PSOCKADDR_IRDA = ^SOCKADDR_IRDA;
- {$EXTERNALSYM PSOCKADDR_IRDA}
- LPSOCKADDR_IRDA = ^SOCKADDR_IRDA;
- {$EXTERNALSYM LPSOCKADDR_IRDA}
- TSockAddrIrda = SOCKADDR_IRDA;
- PSockAddrIrda = LPSOCKADDR_IRDA;
-
- _WINDOWS_IRDA_DEVICE_INFO = record
- irdaDeviceID: array [0..3] of u_char;
- irdaDeviceName: array [0..21] of Char;
- irdaDeviceHints1: u_char;
- irdaDeviceHints2: u_char;
- irdaCharSet: u_char;
- end;
- {$EXTERNALSYM _WINDOWS_IRDA_DEVICE_INFO}
- WINDOWS_IRDA_DEVICE_INFO = _WINDOWS_IRDA_DEVICE_INFO;
- {$EXTERNALSYM WINDOWS_IRDA_DEVICE_INFO}
- PWINDOWS_IRDA_DEVICE_INFO = ^WINDOWS_IRDA_DEVICE_INFO;
- {$EXTERNALSYM PWINDOWS_IRDA_DEVICE_INFO}
- LPWINDOWS_IRDA_DEVICE_INFO = ^WINDOWS_IRDA_DEVICE_INFO;
- {$EXTERNALSYM LPWINDOWS_IRDA_DEVICE_INFO}
- TWindowsIrdaDeviceInfo = WINDOWS_IRDA_DEVICE_INFO;
- PWindowsIrdaDeviceInfo = LPWINDOWS_IRDA_DEVICE_INFO;
-
- _WCE_IRDA_DEVICE_INFO = record
- irdaDeviceID: array [0..3] of u_char;
- irdaDeviceName: array [0..21] of Char;
- Reserved: array [0..1] of u_char;
- end;
- {$EXTERNALSYM _WCE_IRDA_DEVICE_INFO}
- WCE_IRDA_DEVICE_INFO = _WCE_IRDA_DEVICE_INFO;
- {$EXTERNALSYM WCE_IRDA_DEVICE_INFO}
- PWCE_IRDA_DEVICE_INFO = ^WCE_IRDA_DEVICE_INFO;
- {$EXTERNALSYM PWCE_IRDA_DEVICE_INFO}
- TWceIrdaDeviceInfo = WCE_IRDA_DEVICE_INFO;
- PWceIrdaDeviceInfo = PWCE_IRDA_DEVICE_INFO;
-
- IRDA_DEVICE_INFO = WINDOWS_IRDA_DEVICE_INFO;
- {$EXTERNALSYM IRDA_DEVICE_INFO}
- PIRDA_DEVICE_INFO = ^WINDOWS_IRDA_DEVICE_INFO;
- {$EXTERNALSYM PIRDA_DEVICE_INFO}
- LPIRDA_DEVICE_INFO = ^WINDOWS_IRDA_DEVICE_INFO;
- {$EXTERNALSYM LPIRDA_DEVICE_INFO}
- TIrdaDeviceInfo = IRDA_DEVICE_INFO;
- PIrdaDeviceInfo = LPIRDA_DEVICE_INFO;
-
- _WINDOWS_DEVICELIST = record
- numDevice: ULONG;
- Device: array [0..0] of WINDOWS_IRDA_DEVICE_INFO;
- end;
- {$EXTERNALSYM _WINDOWS_DEVICELIST}
- WINDOWS_DEVICELIST = _WINDOWS_DEVICELIST;
- {$EXTERNALSYM WINDOWS_DEVICELIST}
- PWINDOWS_DEVICELIST = ^WINDOWS_DEVICELIST;
- {$EXTERNALSYM PWINDOWS_DEVICELIST}
- LPWINDOWS_DEVICELIST = ^WINDOWS_DEVICELIST;
- {$EXTERNALSYM LPWINDOWS_DEVICELIST}
- TWindowsDeviceList = WINDOWS_DEVICELIST;
- PWindowsDeviceList = LPWINDOWS_DEVICELIST;
-
- _WCE_DEVICELIST = record
- numDevice: ULONG;
- Device: array [0..0] of WCE_IRDA_DEVICE_INFO;
- end;
- {$EXTERNALSYM _WCE_DEVICELIST}
- WCE_DEVICELIST = _WCE_DEVICELIST;
- {$EXTERNALSYM WCE_DEVICELIST}
- PWCE_DEVICELIST = ^WCE_DEVICELIST;
- {$EXTERNALSYM PWCE_DEVICELIST}
- TWceDeviceList = WCE_DEVICELIST;
- PWceDeviceList = PWCE_DEVICELIST;
-
- DEVICELIST = WINDOWS_DEVICELIST;
- {$EXTERNALSYM DEVICELIST}
- PDEVICELIST = ^WINDOWS_DEVICELIST;
- {$EXTERNALSYM PDEVICELIST}
- LPDEVICELIST = ^WINDOWS_DEVICELIST;
- {$EXTERNALSYM LPDEVICELIST}
- TDeviceList = DEVICELIST;
-
- _WINDOWS_IAS_SET = record
- irdaClassName: array [0..IAS_MAX_CLASSNAME - 1] of Char;
- irdaAttribName: array [0..IAS_MAX_ATTRIBNAME - 1] of Char;
- irdaAttribType: u_long;
- case Integer of
- 0: (
- irdaAttribInt: Longint);
- 1: (
- Len: u_short;
- OctetSeq: array [0..IAS_MAX_OCTET_STRING - 1] of u_char);
- 2: (
- Len_: u_char;
- CharSet: u_char;
- UsrStr: array [0..IAS_MAX_USER_STRING - 1] of u_char);
- end;
- {$EXTERNALSYM _WINDOWS_IAS_SET}
- WINDOWS_IAS_SET = _WINDOWS_IAS_SET;
- {$EXTERNALSYM WINDOWS_IAS_SET}
- PWINDOWS_IAS_SET = ^WINDOWS_IAS_SET;
- {$EXTERNALSYM PWINDOWS_IAS_SET}
- LPWINDOWS_IAS_SET = ^WINDOWS_IAS_SET;
- {$EXTERNALSYM LPWINDOWS_IAS_SET}
- TWindowsIasSet = WINDOWS_IAS_SET;
- PWindowsIasSet = LPWINDOWS_IAS_SET;
-
- _WINDOWS_IAS_QUERY = record
- irdaDeviceID: array [0..3] of u_char;
- irdaClassName: array [0..IAS_MAX_CLASSNAME - 1] of Char;
- irdaAttribName: array [0..IAS_MAX_ATTRIBNAME - 1] of Char;
- irdaAttribType: u_long;
- case Integer of
- 0: (
- irdaAttribInt: Longint);
- 1: (
- Len: u_long;
- OctetSeq: array [0..IAS_MAX_OCTET_STRING - 1] of u_char);
- 2: (
- Len_: u_long;
- CharSet: u_long;
- UsrStr: array [0..IAS_MAX_USER_STRING - 1] of u_char);
- end;
- {$EXTERNALSYM _WINDOWS_IAS_QUERY}
- WINDOWS_IAS_QUERY = _WINDOWS_IAS_QUERY;
- {$EXTERNALSYM WINDOWS_IAS_QUERY}
- PWINDOWS_IAS_QUERY = ^WINDOWS_IAS_QUERY;
- {$EXTERNALSYM PWINDOWS_IAS_QUERY}
- LPWINDOWS_IAS_QUERY = ^WINDOWS_IAS_QUERY;
- {$EXTERNALSYM LPWINDOWS_IAS_QUERY}
- TWindowsIasQuery = WINDOWS_IAS_QUERY;
- PWindowsIasQuery = LPWINDOWS_IAS_QUERY;
-
- _WCE_IAS_SET = record
- irdaClassName: array [0..60] of Char;
- irdaAttribName: array [0..60] of Char;
- irdaAttribType: u_short;
- case Integer of
- 0: (
- irdaAttribInt: Integer);
- 1: (
- Len: Integer;
- OctetSeq: array [0..0] of u_char;
- Reserved: array [0..2] of u_char);
- 2: (
- Len_: Integer;
- CharSet: u_char;
- UsrStr: array [0..0] of u_char;
- Reserved_: array [0..1] of u_char);
- end;
- {$EXTERNALSYM _WCE_IAS_SET}
- WCE_IAS_SET = _WCE_IAS_SET;
- {$EXTERNALSYM WCE_IAS_SET}
- PWCE_IAS_SET = ^WCE_IAS_SET;
- {$EXTERNALSYM PWCE_IAS_SET}
- TWceIasSet = WCE_IAS_SET;
- PWceIasSet = PWCE_IAS_SET;
-
- _WCE_IAS_QUERY = record
- irdaDeviceID: array [0..3] of u_char;
- irdaClassName: array [0..60] of Char;
- irdaAttribName: array [0..60] of Char;
- irdaAttribType: u_short;
- case Integer of
- 0: (irdaAttribInt: Integer);
- 1: (
- Len: Integer;
- OctetSeq: array [0..0] of u_char;
- Reserved: array [0..2] of u_char);
- 2: (
- Len_: Integer;
- CharSet: u_char;
- UsrStr: array [0..0] of u_char;
- Reserved_
- : array [0..1] of u_char);
- end;
- {$EXTERNALSYM _WCE_IAS_QUERY}
- WCE_IAS_QUERY = _WCE_IAS_QUERY;
- {$EXTERNALSYM WCE_IAS_QUERY}
- PWCE_IAS_QUERY = ^WCE_IAS_QUERY;
- {$EXTERNALSYM PWCE_IAS_QUERY}
- TWceIasQuery = WCE_IAS_QUERY;
- PWceIasQuery = PWCE_IAS_QUERY;
-
- IAS_SET = WINDOWS_IAS_SET;
- {$EXTERNALSYM IAS_SET}
- PIAS_SET = ^WINDOWS_IAS_SET;
- {$EXTERNALSYM PIAS_SET}
- LPIASSET = ^WINDOWS_IAS_SET;
- TIasSet = IAS_SET;
- PIasSet = PIAS_SET;
- {$EXTERNALSYM LPIASSET}
- IAS_QUERY = WINDOWS_IAS_QUERY;
- {$EXTERNALSYM IAS_QUERY}
- PIAS_QUERY = ^WINDOWS_IAS_QUERY;
- {$EXTERNALSYM PIAS_QUERY}
- LPIASQUERY = ^WINDOWS_IAS_QUERY;
- {$EXTERNALSYM LPIASQUERY}
- TIasQuery = IAS_QUERY;
- PIasQuery = PIAS_QUERY;
-
-implementation
-
-end.
+{******************************************************************************}
+{ }
+{ Winsock2 IRDA API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: ad_irda.h, released June 2000. The original Pascal }
+{ code is: AD_Irda.pas, released December 2000. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwaaf_irda.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaAF_Irda;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "af_irda.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaWinSock2;
+
+//
+// Winsock1.1, IrDA1.1, WindowsNT5.0, Windows98 and WindowsCE1.0.
+// Define one of _WIN32_WINNT, _WIN32_WINDOWS, _WIN32_WCE.
+// Copyright (C) Microsoft Corporation, 1994-1999.
+//
+
+const
+ WINDOWS_AF_IRDA = 26;
+ {$EXTERNALSYM WINDOWS_AF_IRDA}
+ WINDOWS_PF_IRDA = WINDOWS_AF_IRDA;
+ {$EXTERNALSYM WINDOWS_PF_IRDA}
+
+ WCE_AF_IRDA = 22;
+ {$EXTERNALSYM WCE_AF_IRDA}
+ WCE_PF_IRDA = WCE_AF_IRDA;
+ {$EXTERNALSYM WCE_PF_IRDA}
+
+ //AF_IRDA = WINDOWS_AF_IRDA;
+ //{$EXTERNALSYM AF_IRDA}
+
+ IRDA_PROTO_SOCK_STREAM = 1;
+ {$EXTERNALSYM IRDA_PROTO_SOCK_STREAM}
+
+ PF_IRDA = WINDOWS_AF_IRDA;
+ {$EXTERNALSYM PF_IRDA}
+
+ // WINNT, WIN98, WINCE
+
+ SOL_IRLMP = $00FF;
+ {$EXTERNALSYM SOL_IRLMP}
+
+ IRLMP_ENUMDEVICES = $00000010;
+ {$EXTERNALSYM IRLMP_ENUMDEVICES}
+ IRLMP_IAS_SET = $00000011;
+ {$EXTERNALSYM IRLMP_IAS_SET}
+ IRLMP_IAS_QUERY = $00000012;
+ {$EXTERNALSYM IRLMP_IAS_QUERY}
+
+ // WINNT, WINCE
+
+ IRLMP_SEND_PDU_LEN = $00000013;
+ {$EXTERNALSYM IRLMP_SEND_PDU_LEN}
+ IRLMP_EXCLUSIVE_MODE = $00000014;
+ {$EXTERNALSYM IRLMP_EXCLUSIVE_MODE}
+ IRLMP_IRLPT_MODE = $00000015;
+ {$EXTERNALSYM IRLMP_IRLPT_MODE}
+ IRLMP_9WIRE_MODE = $00000016;
+ {$EXTERNALSYM IRLMP_9WIRE_MODE}
+
+ // WIN98
+
+ IRLMP_TINYTP_MODE = $00000017;
+ {$EXTERNALSYM IRLMP_TINYTP_MODE}
+ IRLMP_PARAMETERS = $00000018;
+ {$EXTERNALSYM IRLMP_PARAMETERS}
+ IRLMP_DISCOVERY_MODE = $00000019;
+ {$EXTERNALSYM IRLMP_DISCOVERY_MODE}
+
+ // WINCE
+
+ IRLMP_SHARP_MODE = $00000020;
+ {$EXTERNALSYM IRLMP_SHARP_MODE}
+
+ SIO_LAZY_DISCOVERY = $4004747F; // _IOR('t', 127, u_long)
+ {$EXTERNALSYM SIO_LAZY_DISCOVERY}
+
+ IAS_ATTRIB_NO_CLASS = $00000010;
+ {$EXTERNALSYM IAS_ATTRIB_NO_CLASS}
+ IAS_ATTRIB_NO_ATTRIB = $00000000;
+ {$EXTERNALSYM IAS_ATTRIB_NO_ATTRIB}
+ IAS_ATTRIB_INT = $00000001;
+ {$EXTERNALSYM IAS_ATTRIB_INT}
+ IAS_ATTRIB_OCTETSEQ = $00000002;
+ {$EXTERNALSYM IAS_ATTRIB_OCTETSEQ}
+ IAS_ATTRIB_STR = $00000003;
+ {$EXTERNALSYM IAS_ATTRIB_STR}
+
+ IAS_MAX_USER_STRING = 256;
+ {$EXTERNALSYM IAS_MAX_USER_STRING}
+ IAS_MAX_OCTET_STRING = 1024;
+ {$EXTERNALSYM IAS_MAX_OCTET_STRING}
+ IAS_MAX_CLASSNAME = 64;
+ {$EXTERNALSYM IAS_MAX_CLASSNAME}
+ IAS_MAX_ATTRIBNAME = 256;
+ {$EXTERNALSYM IAS_MAX_ATTRIBNAME}
+
+const
+ LM_HB_Extension = 128; // Any hint byte
+ {$EXTERNALSYM LM_HB_Extension}
+
+ LM_HB1_PnP = 1; // First hint byte
+ {$EXTERNALSYM LM_HB1_PnP}
+ LM_HB1_PDA_Palmtop = 2;
+ {$EXTERNALSYM LM_HB1_PDA_Palmtop}
+ LM_HB1_Computer = 4;
+ {$EXTERNALSYM LM_HB1_Computer}
+ LM_HB1_Printer = 8;
+ {$EXTERNALSYM LM_HB1_Printer}
+ LM_HB1_Modem = 16;
+ {$EXTERNALSYM LM_HB1_Modem}
+ LM_HB1_Fax = 32;
+ {$EXTERNALSYM LM_HB1_Fax}
+ LM_HB1_LANAccess = 64;
+ {$EXTERNALSYM LM_HB1_LANAccess}
+
+ LM_HB2_Telephony = 1; // Second hint byte
+ {$EXTERNALSYM LM_HB2_Telephony}
+ LM_HB2_FileServer = 2;
+ {$EXTERNALSYM LM_HB2_FileServer}
+
+ LmCharSetASCII = 0;
+ {$EXTERNALSYM LmCharSetASCII}
+ LmCharSetISO_8859_1 = 1;
+ {$EXTERNALSYM LmCharSetISO_8859_1}
+ LmCharSetISO_8859_2 = 2;
+ {$EXTERNALSYM LmCharSetISO_8859_2}
+ LmCharSetISO_8859_3 = 3;
+ {$EXTERNALSYM LmCharSetISO_8859_3}
+ LmCharSetISO_8859_4 = 4;
+ {$EXTERNALSYM LmCharSetISO_8859_4}
+ LmCharSetISO_8859_5 = 5;
+ {$EXTERNALSYM LmCharSetISO_8859_5}
+ LmCharSetISO_8859_6 = 6;
+ {$EXTERNALSYM LmCharSetISO_8859_6}
+ LmCharSetISO_8859_7 = 7;
+ {$EXTERNALSYM LmCharSetISO_8859_7}
+ LmCharSetISO_8859_8 = 8;
+ {$EXTERNALSYM LmCharSetISO_8859_8}
+ LmCharSetISO_8859_9 = 9;
+ {$EXTERNALSYM LmCharSetISO_8859_9}
+ LmCharSetUNICODE = $ff;
+ {$EXTERNALSYM LmCharSetUNICODE}
+
+type
+ LM_BAUD_RATE = u_long;
+ {$EXTERNALSYM LM_BAUD_RATE}
+ TLMBaudRate = LM_BAUD_RATE;
+ PLMBaudRate = ^LM_BAUD_RATE;
+
+const
+ LM_BAUD_1200 = 1200;
+ {$EXTERNALSYM LM_BAUD_1200}
+ LM_BAUD_2400 = 2400;
+ {$EXTERNALSYM LM_BAUD_2400}
+ LM_BAUD_9600 = 9600;
+ {$EXTERNALSYM LM_BAUD_9600}
+ LM_BAUD_19200 = 19200;
+ {$EXTERNALSYM LM_BAUD_19200}
+ LM_BAUD_38400 = 38400;
+ {$EXTERNALSYM LM_BAUD_38400}
+ LM_BAUD_57600 = 57600;
+ {$EXTERNALSYM LM_BAUD_57600}
+ LM_BAUD_115200 = 115200;
+ {$EXTERNALSYM LM_BAUD_115200}
+ LM_BAUD_576K = 576000;
+ {$EXTERNALSYM LM_BAUD_576K}
+ LM_BAUD_1152K = 1152000;
+ {$EXTERNALSYM LM_BAUD_1152K}
+ LM_BAUD_4M = 4000000;
+ {$EXTERNALSYM LM_BAUD_4M}
+
+type
+ LM_IRPARMS = record
+ nTXDataBytes: u_long; // Max tx data bytes per packet
+ nRXDataBytes: u_long; // Max rx data bytes per packet
+ nBaudRate: LM_BAUD_RATE; // Negotiated baud rate
+ thresholdTime: u_long; // Threshold (ms)
+ discTime: u_long; // Disconnect (ms)
+ nMSLinkTurn: u_short; // Link turn around (ms)
+ nTXPackets: u_char; // Number packets in transmit window
+ nRXPackets: u_char; // Number packets in receive window
+ end;
+ {$EXTERNALSYM LM_IRPARMS}
+ PLM_IRPARMS = ^LM_IRPARMS;
+ TLmIrParms = LM_IRPARMS;
+ PLmIrParms = PLM_IRPARMS;
+
+ _SOCKADDR_IRDA = record
+ irdaAddressFamily: u_short;
+ irdaDeviceID: array [0..3] of u_char;
+ irdaServiceName: array [0..24] of Char;
+ end;
+ {$EXTERNALSYM _SOCKADDR_IRDA}
+ SOCKADDR_IRDA = _SOCKADDR_IRDA;
+ {$EXTERNALSYM SOCKADDR_IRDA}
+ PSOCKADDR_IRDA = ^SOCKADDR_IRDA;
+ {$EXTERNALSYM PSOCKADDR_IRDA}
+ LPSOCKADDR_IRDA = ^SOCKADDR_IRDA;
+ {$EXTERNALSYM LPSOCKADDR_IRDA}
+ TSockAddrIrda = SOCKADDR_IRDA;
+ PSockAddrIrda = LPSOCKADDR_IRDA;
+
+ _WINDOWS_IRDA_DEVICE_INFO = record
+ irdaDeviceID: array [0..3] of u_char;
+ irdaDeviceName: array [0..21] of Char;
+ irdaDeviceHints1: u_char;
+ irdaDeviceHints2: u_char;
+ irdaCharSet: u_char;
+ end;
+ {$EXTERNALSYM _WINDOWS_IRDA_DEVICE_INFO}
+ WINDOWS_IRDA_DEVICE_INFO = _WINDOWS_IRDA_DEVICE_INFO;
+ {$EXTERNALSYM WINDOWS_IRDA_DEVICE_INFO}
+ PWINDOWS_IRDA_DEVICE_INFO = ^WINDOWS_IRDA_DEVICE_INFO;
+ {$EXTERNALSYM PWINDOWS_IRDA_DEVICE_INFO}
+ LPWINDOWS_IRDA_DEVICE_INFO = ^WINDOWS_IRDA_DEVICE_INFO;
+ {$EXTERNALSYM LPWINDOWS_IRDA_DEVICE_INFO}
+ TWindowsIrdaDeviceInfo = WINDOWS_IRDA_DEVICE_INFO;
+ PWindowsIrdaDeviceInfo = LPWINDOWS_IRDA_DEVICE_INFO;
+
+ _WCE_IRDA_DEVICE_INFO = record
+ irdaDeviceID: array [0..3] of u_char;
+ irdaDeviceName: array [0..21] of Char;
+ Reserved: array [0..1] of u_char;
+ end;
+ {$EXTERNALSYM _WCE_IRDA_DEVICE_INFO}
+ WCE_IRDA_DEVICE_INFO = _WCE_IRDA_DEVICE_INFO;
+ {$EXTERNALSYM WCE_IRDA_DEVICE_INFO}
+ PWCE_IRDA_DEVICE_INFO = ^WCE_IRDA_DEVICE_INFO;
+ {$EXTERNALSYM PWCE_IRDA_DEVICE_INFO}
+ TWceIrdaDeviceInfo = WCE_IRDA_DEVICE_INFO;
+ PWceIrdaDeviceInfo = PWCE_IRDA_DEVICE_INFO;
+
+ IRDA_DEVICE_INFO = WINDOWS_IRDA_DEVICE_INFO;
+ {$EXTERNALSYM IRDA_DEVICE_INFO}
+ PIRDA_DEVICE_INFO = ^WINDOWS_IRDA_DEVICE_INFO;
+ {$EXTERNALSYM PIRDA_DEVICE_INFO}
+ LPIRDA_DEVICE_INFO = ^WINDOWS_IRDA_DEVICE_INFO;
+ {$EXTERNALSYM LPIRDA_DEVICE_INFO}
+ TIrdaDeviceInfo = IRDA_DEVICE_INFO;
+ PIrdaDeviceInfo = LPIRDA_DEVICE_INFO;
+
+ _WINDOWS_DEVICELIST = record
+ numDevice: ULONG;
+ Device: array [0..0] of WINDOWS_IRDA_DEVICE_INFO;
+ end;
+ {$EXTERNALSYM _WINDOWS_DEVICELIST}
+ WINDOWS_DEVICELIST = _WINDOWS_DEVICELIST;
+ {$EXTERNALSYM WINDOWS_DEVICELIST}
+ PWINDOWS_DEVICELIST = ^WINDOWS_DEVICELIST;
+ {$EXTERNALSYM PWINDOWS_DEVICELIST}
+ LPWINDOWS_DEVICELIST = ^WINDOWS_DEVICELIST;
+ {$EXTERNALSYM LPWINDOWS_DEVICELIST}
+ TWindowsDeviceList = WINDOWS_DEVICELIST;
+ PWindowsDeviceList = LPWINDOWS_DEVICELIST;
+
+ _WCE_DEVICELIST = record
+ numDevice: ULONG;
+ Device: array [0..0] of WCE_IRDA_DEVICE_INFO;
+ end;
+ {$EXTERNALSYM _WCE_DEVICELIST}
+ WCE_DEVICELIST = _WCE_DEVICELIST;
+ {$EXTERNALSYM WCE_DEVICELIST}
+ PWCE_DEVICELIST = ^WCE_DEVICELIST;
+ {$EXTERNALSYM PWCE_DEVICELIST}
+ TWceDeviceList = WCE_DEVICELIST;
+ PWceDeviceList = PWCE_DEVICELIST;
+
+ DEVICELIST = WINDOWS_DEVICELIST;
+ {$EXTERNALSYM DEVICELIST}
+ PDEVICELIST = ^WINDOWS_DEVICELIST;
+ {$EXTERNALSYM PDEVICELIST}
+ LPDEVICELIST = ^WINDOWS_DEVICELIST;
+ {$EXTERNALSYM LPDEVICELIST}
+ TDeviceList = DEVICELIST;
+
+ _WINDOWS_IAS_SET = record
+ irdaClassName: array [0..IAS_MAX_CLASSNAME - 1] of Char;
+ irdaAttribName: array [0..IAS_MAX_ATTRIBNAME - 1] of Char;
+ irdaAttribType: u_long;
+ case Integer of
+ 0: (
+ irdaAttribInt: Longint);
+ 1: (
+ Len: u_short;
+ OctetSeq: array [0..IAS_MAX_OCTET_STRING - 1] of u_char);
+ 2: (
+ Len_: u_char;
+ CharSet: u_char;
+ UsrStr: array [0..IAS_MAX_USER_STRING - 1] of u_char);
+ end;
+ {$EXTERNALSYM _WINDOWS_IAS_SET}
+ WINDOWS_IAS_SET = _WINDOWS_IAS_SET;
+ {$EXTERNALSYM WINDOWS_IAS_SET}
+ PWINDOWS_IAS_SET = ^WINDOWS_IAS_SET;
+ {$EXTERNALSYM PWINDOWS_IAS_SET}
+ LPWINDOWS_IAS_SET = ^WINDOWS_IAS_SET;
+ {$EXTERNALSYM LPWINDOWS_IAS_SET}
+ TWindowsIasSet = WINDOWS_IAS_SET;
+ PWindowsIasSet = LPWINDOWS_IAS_SET;
+
+ _WINDOWS_IAS_QUERY = record
+ irdaDeviceID: array [0..3] of u_char;
+ irdaClassName: array [0..IAS_MAX_CLASSNAME - 1] of Char;
+ irdaAttribName: array [0..IAS_MAX_ATTRIBNAME - 1] of Char;
+ irdaAttribType: u_long;
+ case Integer of
+ 0: (
+ irdaAttribInt: Longint);
+ 1: (
+ Len: u_long;
+ OctetSeq: array [0..IAS_MAX_OCTET_STRING - 1] of u_char);
+ 2: (
+ Len_: u_long;
+ CharSet: u_long;
+ UsrStr: array [0..IAS_MAX_USER_STRING - 1] of u_char);
+ end;
+ {$EXTERNALSYM _WINDOWS_IAS_QUERY}
+ WINDOWS_IAS_QUERY = _WINDOWS_IAS_QUERY;
+ {$EXTERNALSYM WINDOWS_IAS_QUERY}
+ PWINDOWS_IAS_QUERY = ^WINDOWS_IAS_QUERY;
+ {$EXTERNALSYM PWINDOWS_IAS_QUERY}
+ LPWINDOWS_IAS_QUERY = ^WINDOWS_IAS_QUERY;
+ {$EXTERNALSYM LPWINDOWS_IAS_QUERY}
+ TWindowsIasQuery = WINDOWS_IAS_QUERY;
+ PWindowsIasQuery = LPWINDOWS_IAS_QUERY;
+
+ _WCE_IAS_SET = record
+ irdaClassName: array [0..60] of Char;
+ irdaAttribName: array [0..60] of Char;
+ irdaAttribType: u_short;
+ case Integer of
+ 0: (
+ irdaAttribInt: Integer);
+ 1: (
+ Len: Integer;
+ OctetSeq: array [0..0] of u_char;
+ Reserved: array [0..2] of u_char);
+ 2: (
+ Len_: Integer;
+ CharSet: u_char;
+ UsrStr: array [0..0] of u_char;
+ Reserved_: array [0..1] of u_char);
+ end;
+ {$EXTERNALSYM _WCE_IAS_SET}
+ WCE_IAS_SET = _WCE_IAS_SET;
+ {$EXTERNALSYM WCE_IAS_SET}
+ PWCE_IAS_SET = ^WCE_IAS_SET;
+ {$EXTERNALSYM PWCE_IAS_SET}
+ TWceIasSet = WCE_IAS_SET;
+ PWceIasSet = PWCE_IAS_SET;
+
+ _WCE_IAS_QUERY = record
+ irdaDeviceID: array [0..3] of u_char;
+ irdaClassName: array [0..60] of Char;
+ irdaAttribName: array [0..60] of Char;
+ irdaAttribType: u_short;
+ case Integer of
+ 0: (irdaAttribInt: Integer);
+ 1: (
+ Len: Integer;
+ OctetSeq: array [0..0] of u_char;
+ Reserved: array [0..2] of u_char);
+ 2: (
+ Len_: Integer;
+ CharSet: u_char;
+ UsrStr: array [0..0] of u_char;
+ Reserved_
+ : array [0..1] of u_char);
+ end;
+ {$EXTERNALSYM _WCE_IAS_QUERY}
+ WCE_IAS_QUERY = _WCE_IAS_QUERY;
+ {$EXTERNALSYM WCE_IAS_QUERY}
+ PWCE_IAS_QUERY = ^WCE_IAS_QUERY;
+ {$EXTERNALSYM PWCE_IAS_QUERY}
+ TWceIasQuery = WCE_IAS_QUERY;
+ PWceIasQuery = PWCE_IAS_QUERY;
+
+ IAS_SET = WINDOWS_IAS_SET;
+ {$EXTERNALSYM IAS_SET}
+ PIAS_SET = ^WINDOWS_IAS_SET;
+ {$EXTERNALSYM PIAS_SET}
+ LPIASSET = ^WINDOWS_IAS_SET;
+ TIasSet = IAS_SET;
+ PIasSet = PIAS_SET;
+ {$EXTERNALSYM LPIASSET}
+ IAS_QUERY = WINDOWS_IAS_QUERY;
+ {$EXTERNALSYM IAS_QUERY}
+ PIAS_QUERY = ^WINDOWS_IAS_QUERY;
+ {$EXTERNALSYM PIAS_QUERY}
+ LPIASQUERY = ^WINDOWS_IAS_QUERY;
+ {$EXTERNALSYM LPIASQUERY}
+ TIasQuery = IAS_QUERY;
+ PIasQuery = PIAS_QUERY;
+
+implementation
+
+end.
diff --git a/packages/extra/winunits/jwaatalkwsh.pas b/packages/extra/winunits/jwaatalkwsh.pas
index b77eb4caae..45f152abe7 100644
--- a/packages/extra/winunits/jwaatalkwsh.pas
+++ b/packages/extra/winunits/jwaatalkwsh.pas
@@ -1,326 +1,326 @@
-{******************************************************************************}
-{ }
-{ Winsock2 AppleTalk API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: atalkwsh.h, released June 2000. The original Pascal }
-{ code is: ATalkWsh.pas, released December 2000. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwaatalkwsh.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaAtalkWsh;
-
-interface
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "atalkwsh.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-uses
- JwaWinSock2;
-
-//
-// All protocol types should be specified in the Decimal base
-//
-
-const
- DECIMAL_BASE = 10;
- {$EXTERNALSYM DECIMAL_BASE}
-
-//
-// Protocol number 0 is invalid in the Appletalk case
-//
-
- ATPROTO_BASE = 1000 * AF_APPLETALK;
- {$EXTERNALSYM ATPROTO_BASE}
- SOL_APPLETALK = ATPROTO_BASE;
- {$EXTERNALSYM SOL_APPLETALK}
-
- DDPPROTO_RTMP = ATPROTO_BASE + 1;
- {$EXTERNALSYM DDPPROTO_RTMP}
- DDPPROTO_NBP = ATPROTO_BASE + 2;
- {$EXTERNALSYM DDPPROTO_NBP}
- DDPPROTO_ATP = ATPROTO_BASE + 3;
- {$EXTERNALSYM DDPPROTO_ATP}
- DDPPROTO_AEP = ATPROTO_BASE + 4;
- {$EXTERNALSYM DDPPROTO_AEP}
- DDPPROTO_RTMPRQ = ATPROTO_BASE + 5;
- {$EXTERNALSYM DDPPROTO_RTMPRQ}
- DDPPROTO_ZIP = ATPROTO_BASE + 6;
- {$EXTERNALSYM DDPPROTO_ZIP}
- DDPPROTO_ADSP = ATPROTO_BASE + 7;
- {$EXTERNALSYM DDPPROTO_ADSP}
-
- DDPPROTO_MAX = ATPROTO_BASE + 255;
- {$EXTERNALSYM DDPPROTO_MAX}
-
-//
-// Define the higher layer appletalk protocol types
-//
-
- ATPROTO_ADSP = DDPPROTO_MAX + 1;
- {$EXTERNALSYM ATPROTO_ADSP}
- ATPROTO_ATP = DDPPROTO_MAX + 2;
- {$EXTERNALSYM ATPROTO_ATP}
- ATPROTO_ASP = DDPPROTO_MAX + 3;
- {$EXTERNALSYM ATPROTO_ASP}
- ATPROTO_PAP = DDPPROTO_MAX + 4;
- {$EXTERNALSYM ATPROTO_PAP}
-
- SO_REGISTER_NAME = $A000;
- {$EXTERNALSYM SO_REGISTER_NAME}
- SO_DEREGISTER_NAME = $A001;
- {$EXTERNALSYM SO_DEREGISTER_NAME}
- SO_REMOVE_NAME = SO_DEREGISTER_NAME;
- {$EXTERNALSYM SO_REMOVE_NAME}
- SO_LOOKUP_NAME = $A002;
- {$EXTERNALSYM SO_LOOKUP_NAME}
- SO_CONFIRM_NAME = $A003;
- {$EXTERNALSYM SO_CONFIRM_NAME}
- SO_LOOKUP_MYZONE = $A004;
- {$EXTERNALSYM SO_LOOKUP_MYZONE}
- SO_GETMYZONE = SO_LOOKUP_MYZONE;
- {$EXTERNALSYM SO_GETMYZONE}
- SO_LOOKUP_ZONES = $A005;
- {$EXTERNALSYM SO_LOOKUP_ZONES}
- SO_GETZONELIST = SO_LOOKUP_ZONES;
- {$EXTERNALSYM SO_GETZONELIST}
- SO_LOOKUP_ZONES_ON_ADAPTER = $A006;
- {$EXTERNALSYM SO_LOOKUP_ZONES_ON_ADAPTER}
- SO_GETLOCALZONES = SO_LOOKUP_ZONES_ON_ADAPTER;
- {$EXTERNALSYM SO_GETLOCALZONES}
- SO_LOOKUP_NETDEF_ON_ADAPTER = $A007;
- {$EXTERNALSYM SO_LOOKUP_NETDEF_ON_ADAPTER}
- SO_GETNETINFO = SO_LOOKUP_NETDEF_ON_ADAPTER;
- {$EXTERNALSYM SO_GETNETINFO}
-
-//
-// PAP-specific options
-//
-
- SO_PAP_SET_SERVER_STATUS = $A007;
- {$EXTERNALSYM SO_PAP_SET_SERVER_STATUS}
- SO_PAP_GET_SERVER_STATUS = $A008;
- {$EXTERNALSYM SO_PAP_GET_SERVER_STATUS}
- SO_PAP_PRIME_READ = $A009;
- {$EXTERNALSYM SO_PAP_PRIME_READ}
-
- ATADDR_ANY = 0; // Dynamic socket (=0)
- {$EXTERNALSYM ATADDR_ANY}
- ATADDR_BROADCAST = $FF; // Broadcast node id (=ff)
- {$EXTERNALSYM ATADDR_BROADCAST}
-
-//
-// Define flags/error codes peculiar to Appletalk
-//
-
- WSAEMSGPARTIAL = WSABASEERR + 100;
- {$EXTERNALSYM WSAEMSGPARTIAL}
-
-// Maximum pap status size
-
- MAX_PAP_STATUS_SIZE = 255;
- {$EXTERNALSYM MAX_PAP_STATUS_SIZE}
- MIN_PAP_READ_BUF_SIZE = 4096;
- {$EXTERNALSYM MIN_PAP_READ_BUF_SIZE}
-
-// These are the unused 4 bytes returned in the PAP status packet. If ever
-// they are to be interpreted, they will be available.
-
- PAP_UNUSED_STATUS_BYTES = 4;
- {$EXTERNALSYM PAP_UNUSED_STATUS_BYTES}
-
-//
-// SOCKADDR_AT structure
-//
-
-type
- SOCKADDR_AT = record
- sat_family: USHORT;
- sat_net: USHORT;
- sat_node: UCHAR;
- sat_socket: UCHAR;
- end;
- {$EXTERNALSYM SOCKADDR_AT}
- PSOCKADDR_AT = ^SOCKADDR_AT;
- {$EXTERNALSYM PSOCKADDR_AT}
- TSockAddrAT = SOCKADDR_AT;
- PSockAddrAT = PSOCKADDR_AT;
-
-//
-// ***WARNING***
-// This is defined to be the same as the ATALK ADDRESS defined in atalktdi.h
-// Change this if the other changes.
-//
-
-type
- WSH_ATALK_ADDRESS = record
- case Integer of
- 0: (
- Network: USHORT;
- Node: UCHAR;
- Socket: UCHAR);
- 1: (
- Address: ULONG);
- end;
- {$EXTERNALSYM WSH_ATALK_ADDRESS}
- PWSH_ATALK_ADDRESS = ^WSH_ATALK_ADDRESS;
- {$EXTERNALSYM PWSH_ATALK_ADDRESS}
- TWSHATalkAddress = WSH_ATALK_ADDRESS;
- PWSHATalkAddress = PWSH_ATALK_ADDRESS;
-
-//
-// Typedefs for the various options
-//
-
-//
-// ***WARNING***:
-// This should be exactly the same as NBP_NAME defined in atalktdi.h
-//
-
-const
- MAX_ENTITY = 32;
- {$EXTERNALSYM MAX_ENTITY}
-
-type
- WSH_NBP_NAME = record
- ObjectNameLen: CHAR;
- ObjectName: array [0..MAX_ENTITY - 1] of CHAR;
- TypeNameLen: CHAR;
- TypeName: array [0..MAX_ENTITY - 1] of CHAR;
- ZoneNameLen: CHAR;
- ZoneName: array [0..MAX_ENTITY - 1] of CHAR;
- end;
- {$EXTERNALSYM WSH_NBP_NAME}
- PWSH_NBP_NAME = ^WSH_NBP_NAME;
- {$EXTERNALSYM PWSH_NBP_NAME}
- TWSHNBPName = WSH_NBP_NAME;
- PWSHNBPName = PWSH_NBP_NAME;
-
- WSH_NBP_TUPLE = record
- Address: WSH_ATALK_ADDRESS;
- Enumerator: USHORT;
- NbpName: WSH_NBP_NAME;
- end;
- {$EXTERNALSYM WSH_NBP_TUPLE}
- PWSH_NBP_TUPLE = ^WSH_NBP_TUPLE;
- {$EXTERNALSYM PWSH_NBP_TUPLE}
- TWSHNBPTuple = WSH_NBP_TUPLE;
- PWSHNBPTuple = PWSH_NBP_TUPLE;
-
- WSH_REGISTER_NAME = WSH_NBP_NAME;
- {$EXTERNALSYM WSH_REGISTER_NAME}
- TWSHRegisterName = WSH_REGISTER_NAME;
- PWSH_REGISTER_NAME = ^WSH_NBP_NAME;
- {$EXTERNALSYM PWSH_REGISTER_NAME}
- PWSHRegisterName = PWSH_REGISTER_NAME;
- WSH_DEREGISTER_NAME = WSH_NBP_NAME;
- {$EXTERNALSYM WSH_DEREGISTER_NAME}
- TWSHDeregisterName = WSH_DEREGISTER_NAME;
- PWSH_DEREGISTER_NAME = ^WSH_NBP_NAME;
- {$EXTERNALSYM PWSH_DEREGISTER_NAME}
- PWSHDeregisterName = PWSH_DEREGISTER_NAME;
- WSH_REMOVE_NAME = WSH_NBP_NAME;
- {$EXTERNALSYM WSH_REMOVE_NAME}
- TWSHRemoveName = WSH_REMOVE_NAME;
- PWSH_REMOVE_NAME = ^WSH_NBP_NAME;
- {$EXTERNALSYM PWSH_REMOVE_NAME}
- PWSHRemoveName = PWSH_REMOVE_NAME;
-
- _WSH_LOOKUP_ZONES = record
- NoZones: ULONG;
- //
- // CHAR Zones[] - null separated zones
- //
- end;
- {$EXTERNALSYM _WSH_LOOKUP_ZONES}
- WSH_LOOKUP_ZONES = _WSH_LOOKUP_ZONES;
- {$EXTERNALSYM WSH_LOOKUP_ZONES}
- PWSH_LOOKUP_ZONES = ^WSH_LOOKUP_ZONES;
- {$EXTERNALSYM PWSH_LOOKUP_ZONES}
- TWSHLookupZones = WSH_LOOKUP_ZONES;
- PWSHLookupZones = PWSH_LOOKUP_ZONES;
-
- _WSH_LOOKUP_NETDEF_ON_ADAPTER = record
- NetworkRangeLowerEnd: USHORT;
- NetworkRangeUpperEnd: USHORT;
- // This will be followed by a null terminated ansi default zone.
- // PUCHAR DefaultZone[]
- end;
- {$EXTERNALSYM _WSH_LOOKUP_NETDEF_ON_ADAPTER}
- WSH_LOOKUP_NETDEF_ON_ADAPTER = _WSH_LOOKUP_NETDEF_ON_ADAPTER;
- {$EXTERNALSYM WSH_LOOKUP_NETDEF_ON_ADAPTER}
- PWSH_LOOKUP_NETDEF_ON_ADAPTER = ^WSH_LOOKUP_NETDEF_ON_ADAPTER;
- {$EXTERNALSYM PWSH_LOOKUP_NETDEF_ON_ADAPTER}
- TWSHLookupNetDefOnAdapter = WSH_LOOKUP_NETDEF_ON_ADAPTER;
- PWSHLookupNetDefOnAdapter = PWSH_LOOKUP_NETDEF_ON_ADAPTER;
-
- _WSH_LOOKUP_NAME = record
- LookupTuple: WSH_NBP_TUPLE;
- NoTuples: ULONG;
- //
- // Array of NoTuple WSH_NBP_TUPLEs
- //
- end;
- {$EXTERNALSYM _WSH_LOOKUP_NAME}
- WSH_LOOKUP_NAME = _WSH_LOOKUP_NAME;
- {$EXTERNALSYM WSH_LOOKUP_NAME}
- PWSH_LOOKUP_NAME = ^WSH_LOOKUP_NAME;
- {$EXTERNALSYM PWSH_LOOKUP_NAME}
- TWSHLookupName = WSH_LOOKUP_NAME;
- PWSHLookupName = PWSH_LOOKUP_NAME;
-
- _WSH_PAP_GET_SERVER_STATUS = record
- ServerAddr: SOCKADDR_AT;
- Reserved: array [0..PAP_UNUSED_STATUS_BYTES - 1] of UCHAR;
- ServerStatus: array [0..MAX_PAP_STATUS_SIZE] of UCHAR;
- end;
- {$EXTERNALSYM _WSH_PAP_GET_SERVER_STATUS}
- WSH_PAP_GET_SERVER_STATUS = _WSH_PAP_GET_SERVER_STATUS;
- {$EXTERNALSYM WSH_PAP_GET_SERVER_STATUS}
- PWSH_PAP_GET_SERVER_STATUS = ^WSH_PAP_GET_SERVER_STATUS;
- {$EXTERNALSYM PWSH_PAP_GET_SERVER_STATUS}
- TWSHPapGetServerStatus = WSH_PAP_GET_SERVER_STATUS;
- PWSHPapGetServerStatus = PWSH_PAP_GET_SERVER_STATUS;
-
-implementation
-
-end.
+{******************************************************************************}
+{ }
+{ Winsock2 AppleTalk API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: atalkwsh.h, released June 2000. The original Pascal }
+{ code is: ATalkWsh.pas, released December 2000. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwaatalkwsh.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaAtalkWsh;
+
+interface
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "atalkwsh.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+uses
+ JwaWinSock2;
+
+//
+// All protocol types should be specified in the Decimal base
+//
+
+const
+ DECIMAL_BASE = 10;
+ {$EXTERNALSYM DECIMAL_BASE}
+
+//
+// Protocol number 0 is invalid in the Appletalk case
+//
+
+ ATPROTO_BASE = 1000 * AF_APPLETALK;
+ {$EXTERNALSYM ATPROTO_BASE}
+ SOL_APPLETALK = ATPROTO_BASE;
+ {$EXTERNALSYM SOL_APPLETALK}
+
+ DDPPROTO_RTMP = ATPROTO_BASE + 1;
+ {$EXTERNALSYM DDPPROTO_RTMP}
+ DDPPROTO_NBP = ATPROTO_BASE + 2;
+ {$EXTERNALSYM DDPPROTO_NBP}
+ DDPPROTO_ATP = ATPROTO_BASE + 3;
+ {$EXTERNALSYM DDPPROTO_ATP}
+ DDPPROTO_AEP = ATPROTO_BASE + 4;
+ {$EXTERNALSYM DDPPROTO_AEP}
+ DDPPROTO_RTMPRQ = ATPROTO_BASE + 5;
+ {$EXTERNALSYM DDPPROTO_RTMPRQ}
+ DDPPROTO_ZIP = ATPROTO_BASE + 6;
+ {$EXTERNALSYM DDPPROTO_ZIP}
+ DDPPROTO_ADSP = ATPROTO_BASE + 7;
+ {$EXTERNALSYM DDPPROTO_ADSP}
+
+ DDPPROTO_MAX = ATPROTO_BASE + 255;
+ {$EXTERNALSYM DDPPROTO_MAX}
+
+//
+// Define the higher layer appletalk protocol types
+//
+
+ ATPROTO_ADSP = DDPPROTO_MAX + 1;
+ {$EXTERNALSYM ATPROTO_ADSP}
+ ATPROTO_ATP = DDPPROTO_MAX + 2;
+ {$EXTERNALSYM ATPROTO_ATP}
+ ATPROTO_ASP = DDPPROTO_MAX + 3;
+ {$EXTERNALSYM ATPROTO_ASP}
+ ATPROTO_PAP = DDPPROTO_MAX + 4;
+ {$EXTERNALSYM ATPROTO_PAP}
+
+ SO_REGISTER_NAME = $A000;
+ {$EXTERNALSYM SO_REGISTER_NAME}
+ SO_DEREGISTER_NAME = $A001;
+ {$EXTERNALSYM SO_DEREGISTER_NAME}
+ SO_REMOVE_NAME = SO_DEREGISTER_NAME;
+ {$EXTERNALSYM SO_REMOVE_NAME}
+ SO_LOOKUP_NAME = $A002;
+ {$EXTERNALSYM SO_LOOKUP_NAME}
+ SO_CONFIRM_NAME = $A003;
+ {$EXTERNALSYM SO_CONFIRM_NAME}
+ SO_LOOKUP_MYZONE = $A004;
+ {$EXTERNALSYM SO_LOOKUP_MYZONE}
+ SO_GETMYZONE = SO_LOOKUP_MYZONE;
+ {$EXTERNALSYM SO_GETMYZONE}
+ SO_LOOKUP_ZONES = $A005;
+ {$EXTERNALSYM SO_LOOKUP_ZONES}
+ SO_GETZONELIST = SO_LOOKUP_ZONES;
+ {$EXTERNALSYM SO_GETZONELIST}
+ SO_LOOKUP_ZONES_ON_ADAPTER = $A006;
+ {$EXTERNALSYM SO_LOOKUP_ZONES_ON_ADAPTER}
+ SO_GETLOCALZONES = SO_LOOKUP_ZONES_ON_ADAPTER;
+ {$EXTERNALSYM SO_GETLOCALZONES}
+ SO_LOOKUP_NETDEF_ON_ADAPTER = $A007;
+ {$EXTERNALSYM SO_LOOKUP_NETDEF_ON_ADAPTER}
+ SO_GETNETINFO = SO_LOOKUP_NETDEF_ON_ADAPTER;
+ {$EXTERNALSYM SO_GETNETINFO}
+
+//
+// PAP-specific options
+//
+
+ SO_PAP_SET_SERVER_STATUS = $A007;
+ {$EXTERNALSYM SO_PAP_SET_SERVER_STATUS}
+ SO_PAP_GET_SERVER_STATUS = $A008;
+ {$EXTERNALSYM SO_PAP_GET_SERVER_STATUS}
+ SO_PAP_PRIME_READ = $A009;
+ {$EXTERNALSYM SO_PAP_PRIME_READ}
+
+ ATADDR_ANY = 0; // Dynamic socket (=0)
+ {$EXTERNALSYM ATADDR_ANY}
+ ATADDR_BROADCAST = $FF; // Broadcast node id (=ff)
+ {$EXTERNALSYM ATADDR_BROADCAST}
+
+//
+// Define flags/error codes peculiar to Appletalk
+//
+
+ WSAEMSGPARTIAL = WSABASEERR + 100;
+ {$EXTERNALSYM WSAEMSGPARTIAL}
+
+// Maximum pap status size
+
+ MAX_PAP_STATUS_SIZE = 255;
+ {$EXTERNALSYM MAX_PAP_STATUS_SIZE}
+ MIN_PAP_READ_BUF_SIZE = 4096;
+ {$EXTERNALSYM MIN_PAP_READ_BUF_SIZE}
+
+// These are the unused 4 bytes returned in the PAP status packet. If ever
+// they are to be interpreted, they will be available.
+
+ PAP_UNUSED_STATUS_BYTES = 4;
+ {$EXTERNALSYM PAP_UNUSED_STATUS_BYTES}
+
+//
+// SOCKADDR_AT structure
+//
+
+type
+ SOCKADDR_AT = record
+ sat_family: USHORT;
+ sat_net: USHORT;
+ sat_node: UCHAR;
+ sat_socket: UCHAR;
+ end;
+ {$EXTERNALSYM SOCKADDR_AT}
+ PSOCKADDR_AT = ^SOCKADDR_AT;
+ {$EXTERNALSYM PSOCKADDR_AT}
+ TSockAddrAT = SOCKADDR_AT;
+ PSockAddrAT = PSOCKADDR_AT;
+
+//
+// ***WARNING***
+// This is defined to be the same as the ATALK ADDRESS defined in atalktdi.h
+// Change this if the other changes.
+//
+
+type
+ WSH_ATALK_ADDRESS = record
+ case Integer of
+ 0: (
+ Network: USHORT;
+ Node: UCHAR;
+ Socket: UCHAR);
+ 1: (
+ Address: ULONG);
+ end;
+ {$EXTERNALSYM WSH_ATALK_ADDRESS}
+ PWSH_ATALK_ADDRESS = ^WSH_ATALK_ADDRESS;
+ {$EXTERNALSYM PWSH_ATALK_ADDRESS}
+ TWSHATalkAddress = WSH_ATALK_ADDRESS;
+ PWSHATalkAddress = PWSH_ATALK_ADDRESS;
+
+//
+// Typedefs for the various options
+//
+
+//
+// ***WARNING***:
+// This should be exactly the same as NBP_NAME defined in atalktdi.h
+//
+
+const
+ MAX_ENTITY = 32;
+ {$EXTERNALSYM MAX_ENTITY}
+
+type
+ WSH_NBP_NAME = record
+ ObjectNameLen: CHAR;
+ ObjectName: array [0..MAX_ENTITY - 1] of CHAR;
+ TypeNameLen: CHAR;
+ TypeName: array [0..MAX_ENTITY - 1] of CHAR;
+ ZoneNameLen: CHAR;
+ ZoneName: array [0..MAX_ENTITY - 1] of CHAR;
+ end;
+ {$EXTERNALSYM WSH_NBP_NAME}
+ PWSH_NBP_NAME = ^WSH_NBP_NAME;
+ {$EXTERNALSYM PWSH_NBP_NAME}
+ TWSHNBPName = WSH_NBP_NAME;
+ PWSHNBPName = PWSH_NBP_NAME;
+
+ WSH_NBP_TUPLE = record
+ Address: WSH_ATALK_ADDRESS;
+ Enumerator: USHORT;
+ NbpName: WSH_NBP_NAME;
+ end;
+ {$EXTERNALSYM WSH_NBP_TUPLE}
+ PWSH_NBP_TUPLE = ^WSH_NBP_TUPLE;
+ {$EXTERNALSYM PWSH_NBP_TUPLE}
+ TWSHNBPTuple = WSH_NBP_TUPLE;
+ PWSHNBPTuple = PWSH_NBP_TUPLE;
+
+ WSH_REGISTER_NAME = WSH_NBP_NAME;
+ {$EXTERNALSYM WSH_REGISTER_NAME}
+ TWSHRegisterName = WSH_REGISTER_NAME;
+ PWSH_REGISTER_NAME = ^WSH_NBP_NAME;
+ {$EXTERNALSYM PWSH_REGISTER_NAME}
+ PWSHRegisterName = PWSH_REGISTER_NAME;
+ WSH_DEREGISTER_NAME = WSH_NBP_NAME;
+ {$EXTERNALSYM WSH_DEREGISTER_NAME}
+ TWSHDeregisterName = WSH_DEREGISTER_NAME;
+ PWSH_DEREGISTER_NAME = ^WSH_NBP_NAME;
+ {$EXTERNALSYM PWSH_DEREGISTER_NAME}
+ PWSHDeregisterName = PWSH_DEREGISTER_NAME;
+ WSH_REMOVE_NAME = WSH_NBP_NAME;
+ {$EXTERNALSYM WSH_REMOVE_NAME}
+ TWSHRemoveName = WSH_REMOVE_NAME;
+ PWSH_REMOVE_NAME = ^WSH_NBP_NAME;
+ {$EXTERNALSYM PWSH_REMOVE_NAME}
+ PWSHRemoveName = PWSH_REMOVE_NAME;
+
+ _WSH_LOOKUP_ZONES = record
+ NoZones: ULONG;
+ //
+ // CHAR Zones[] - null separated zones
+ //
+ end;
+ {$EXTERNALSYM _WSH_LOOKUP_ZONES}
+ WSH_LOOKUP_ZONES = _WSH_LOOKUP_ZONES;
+ {$EXTERNALSYM WSH_LOOKUP_ZONES}
+ PWSH_LOOKUP_ZONES = ^WSH_LOOKUP_ZONES;
+ {$EXTERNALSYM PWSH_LOOKUP_ZONES}
+ TWSHLookupZones = WSH_LOOKUP_ZONES;
+ PWSHLookupZones = PWSH_LOOKUP_ZONES;
+
+ _WSH_LOOKUP_NETDEF_ON_ADAPTER = record
+ NetworkRangeLowerEnd: USHORT;
+ NetworkRangeUpperEnd: USHORT;
+ // This will be followed by a null terminated ansi default zone.
+ // PUCHAR DefaultZone[]
+ end;
+ {$EXTERNALSYM _WSH_LOOKUP_NETDEF_ON_ADAPTER}
+ WSH_LOOKUP_NETDEF_ON_ADAPTER = _WSH_LOOKUP_NETDEF_ON_ADAPTER;
+ {$EXTERNALSYM WSH_LOOKUP_NETDEF_ON_ADAPTER}
+ PWSH_LOOKUP_NETDEF_ON_ADAPTER = ^WSH_LOOKUP_NETDEF_ON_ADAPTER;
+ {$EXTERNALSYM PWSH_LOOKUP_NETDEF_ON_ADAPTER}
+ TWSHLookupNetDefOnAdapter = WSH_LOOKUP_NETDEF_ON_ADAPTER;
+ PWSHLookupNetDefOnAdapter = PWSH_LOOKUP_NETDEF_ON_ADAPTER;
+
+ _WSH_LOOKUP_NAME = record
+ LookupTuple: WSH_NBP_TUPLE;
+ NoTuples: ULONG;
+ //
+ // Array of NoTuple WSH_NBP_TUPLEs
+ //
+ end;
+ {$EXTERNALSYM _WSH_LOOKUP_NAME}
+ WSH_LOOKUP_NAME = _WSH_LOOKUP_NAME;
+ {$EXTERNALSYM WSH_LOOKUP_NAME}
+ PWSH_LOOKUP_NAME = ^WSH_LOOKUP_NAME;
+ {$EXTERNALSYM PWSH_LOOKUP_NAME}
+ TWSHLookupName = WSH_LOOKUP_NAME;
+ PWSHLookupName = PWSH_LOOKUP_NAME;
+
+ _WSH_PAP_GET_SERVER_STATUS = record
+ ServerAddr: SOCKADDR_AT;
+ Reserved: array [0..PAP_UNUSED_STATUS_BYTES - 1] of UCHAR;
+ ServerStatus: array [0..MAX_PAP_STATUS_SIZE] of UCHAR;
+ end;
+ {$EXTERNALSYM _WSH_PAP_GET_SERVER_STATUS}
+ WSH_PAP_GET_SERVER_STATUS = _WSH_PAP_GET_SERVER_STATUS;
+ {$EXTERNALSYM WSH_PAP_GET_SERVER_STATUS}
+ PWSH_PAP_GET_SERVER_STATUS = ^WSH_PAP_GET_SERVER_STATUS;
+ {$EXTERNALSYM PWSH_PAP_GET_SERVER_STATUS}
+ TWSHPapGetServerStatus = WSH_PAP_GET_SERVER_STATUS;
+ PWSHPapGetServerStatus = PWSH_PAP_GET_SERVER_STATUS;
+
+implementation
+
+end.
diff --git a/packages/extra/winunits/jwaauthif.pas b/packages/extra/winunits/jwaauthif.pas
index 91ff58ce35..6e0481b5c3 100644
--- a/packages/extra/winunits/jwaauthif.pas
+++ b/packages/extra/winunits/jwaauthif.pas
@@ -1,647 +1,647 @@
-{******************************************************************************}
-{ }
-{ Internet Authentication Extensions API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: authif.h, released June 2000. The original Pascal }
-{ code is: Authif.pas, released December 2000. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwaauthif.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaAuthif;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "authif.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaWinType;
-
-//
-// Enumerates the attribute types that are passed to the extension DLL. The
-// RADIUS standard attributes are included for convenience and should not be
-// considered exhaustive.
-//
-
-type
- _RADIUS_ATTRIBUTE_TYPE = DWORD;
- {$EXTERNALSYM _RADIUS_ATTRIBUTE_TYPE}
- RADIUS_ATTRIBUTE_TYPE = _RADIUS_ATTRIBUTE_TYPE;
- {$EXTERNALSYM RADIUS_ATTRIBUTE_TYPE}
- TRadiusAttributeType = RADIUS_ATTRIBUTE_TYPE;
-
-const
- // Used to terminate attribute arrays.
-
- ratMinimum = 0;
- {$EXTERNALSYM ratMinimum}
-
- // RADIUS standard attributes.
-
- ratUserName = 1;
- {$EXTERNALSYM ratUserName}
- ratUserPassword = 2;
- {$EXTERNALSYM ratUserPassword}
- ratCHAPPassword = 3;
- {$EXTERNALSYM ratCHAPPassword}
- ratNASIPAddress = 4;
- {$EXTERNALSYM ratNASIPAddress}
- ratNASPort = 5;
- {$EXTERNALSYM ratNASPort}
- ratServiceType = 6;
- {$EXTERNALSYM ratServiceType}
- ratFramedProtocol = 7;
- {$EXTERNALSYM ratFramedProtocol}
- ratFramedIPAddress = 8;
- {$EXTERNALSYM ratFramedIPAddress}
- ratFramedIPNetmask = 9;
- {$EXTERNALSYM ratFramedIPNetmask}
- ratFramedRouting = 10;
- {$EXTERNALSYM ratFramedRouting}
- ratFilterId = 11;
- {$EXTERNALSYM ratFilterId}
- ratFramedMTU = 12;
- {$EXTERNALSYM ratFramedMTU}
- ratFramedCompression = 13;
- {$EXTERNALSYM ratFramedCompression}
- ratLoginIPHost = 14;
- {$EXTERNALSYM ratLoginIPHost}
- ratLoginService = 15;
- {$EXTERNALSYM ratLoginService}
- ratLoginPort = 16;
- {$EXTERNALSYM ratLoginPort}
- ratReplyMessage = 18;
- {$EXTERNALSYM ratReplyMessage}
- ratCallbackNumber = 19;
- {$EXTERNALSYM ratCallbackNumber}
- ratCallbackId = 20;
- {$EXTERNALSYM ratCallbackId}
- ratFramedRoute = 22;
- {$EXTERNALSYM ratFramedRoute}
- ratFramedIPXNetwork = 23;
- {$EXTERNALSYM ratFramedIPXNetwork}
- ratState = 24;
- {$EXTERNALSYM ratState}
- ratClass = 25;
- {$EXTERNALSYM ratClass}
- ratVendorSpecific = 26;
- {$EXTERNALSYM ratVendorSpecific}
- ratSessionTimeout = 27;
- {$EXTERNALSYM ratSessionTimeout}
- ratIdleTimeout = 28;
- {$EXTERNALSYM ratIdleTimeout}
- ratTerminationAction = 29;
- {$EXTERNALSYM ratTerminationAction}
- ratCalledStationId = 30;
- {$EXTERNALSYM ratCalledStationId}
- ratCallingStationId = 31;
- {$EXTERNALSYM ratCallingStationId}
- ratNASIdentifier = 32;
- {$EXTERNALSYM ratNASIdentifier}
- ratProxyState = 33;
- {$EXTERNALSYM ratProxyState}
- ratLoginLATService = 34;
- {$EXTERNALSYM ratLoginLATService}
- ratLoginLATNode = 35;
- {$EXTERNALSYM ratLoginLATNode}
- ratLoginLATGroup = 36;
- {$EXTERNALSYM ratLoginLATGroup}
- ratFramedAppleTalkLink = 37;
- {$EXTERNALSYM ratFramedAppleTalkLink}
- ratFramedAppleTalkNetwork = 38;
- {$EXTERNALSYM ratFramedAppleTalkNetwork}
- ratFramedAppleTalkZone = 39;
- {$EXTERNALSYM ratFramedAppleTalkZone}
- ratAcctStatusType = 40;
- {$EXTERNALSYM ratAcctStatusType}
- ratAcctDelayTime = 41;
- {$EXTERNALSYM ratAcctDelayTime}
- ratAcctInputOctets = 42;
- {$EXTERNALSYM ratAcctInputOctets}
- ratAcctOutputOctets = 43;
- {$EXTERNALSYM ratAcctOutputOctets}
- ratAcctSessionId = 44;
- {$EXTERNALSYM ratAcctSessionId}
- ratAcctAuthentic = 45;
- {$EXTERNALSYM ratAcctAuthentic}
- ratAcctSessionTime = 46;
- {$EXTERNALSYM ratAcctSessionTime}
- ratAcctInputPackets = 47;
- {$EXTERNALSYM ratAcctInputPackets}
- ratAcctOutputPackets = 48;
- {$EXTERNALSYM ratAcctOutputPackets}
- ratAcctTerminationCause = 49;
- {$EXTERNALSYM ratAcctTerminationCause}
- ratCHAPChallenge = 60;
- {$EXTERNALSYM ratCHAPChallenge}
- ratNASPortType = 61;
- {$EXTERNALSYM ratNASPortType}
- ratPortLimit = 62;
- {$EXTERNALSYM ratPortLimit}
-
- // Extended attribute types used to pass additional information.
-
- ratCode = 262; // Request type code.
- {$EXTERNALSYM ratCode}
- ratIdentifier = 263; // Request identifier.
- {$EXTERNALSYM ratIdentifier}
- ratAuthenticator = 264; // Request authenticator.
- {$EXTERNALSYM ratAuthenticator}
- ratSrcIPAddress = 265; // Source IP address.
- {$EXTERNALSYM ratSrcIPAddress}
- ratSrcPort = 266; // Source IP port.
- {$EXTERNALSYM ratSrcPort}
- ratProvider = 267; // Authentication provider.
- {$EXTERNALSYM ratProvider}
- ratStrippedUserName = 268; // User-Name with realm stripped.
- {$EXTERNALSYM ratStrippedUserName}
- ratFQUserName = 269; // Fully-Qualified-User-Name.
- {$EXTERNALSYM ratFQUserName}
- ratPolicyName = 270; // Remote Access Policy name.
- {$EXTERNALSYM ratPolicyName}
- ratUniqueId = 271; // Unique ID identifying the request.
- {$EXTERNALSYM ratUniqueId}
- ratExtensionState = 272; // Used to pass state between extensions.
- {$EXTERNALSYM ratExtensionState}
-
-//
-// Enumerates the different RADIUS packet codes. Used for the ratCode extended
-// attribute.
-//
-
-type
- _RADIUS_CODE = DWORD;
- {$EXTERNALSYM _RADIUS_CODE}
- RADIUS_CODE = _RADIUS_CODE;
- {$EXTERNALSYM RADIUS_CODE}
- TRadiusCode = RADIUS_CODE;
-
-const
- rcUnknown = 0;
- {$EXTERNALSYM rcUnknown}
- rcAccessRequest = 1;
- {$EXTERNALSYM rcAccessRequest}
- rcAccessAccept = 2;
- {$EXTERNALSYM rcAccessAccept}
- rcAccessReject = 3;
- {$EXTERNALSYM rcAccessReject}
- rcAccountingRequest = 4;
- {$EXTERNALSYM rcAccountingRequest}
- rcAccountingResponse = 5;
- {$EXTERNALSYM rcAccountingResponse}
- rcAccessChallenge = 11;
- {$EXTERNALSYM rcAccessChallenge}
- rcDiscard = 256;
- {$EXTERNALSYM rcDiscard}
-
-//
-// Enumerates the different authentication providers used for processing a
-// request. Used for the ratProvider extended attribute.
-//
-
-type
- _RADIUS_AUTHENTICATION_PROVIDER = (
- rapUnknown,
- rapUsersFile,
- rapProxy,
- rapWindowsNT,
- rapMCIS,
- rapODBC,
- rapNone);
- {$EXTERNALSYM _RADIUS_AUTHENTICATION_PROVIDER}
- RADIUS_AUTHENTICATION_PROVIDER = _RADIUS_AUTHENTICATION_PROVIDER;
- {$EXTERNALSYM RADIUS_AUTHENTICATION_PROVIDER}
- TRadiusAuthenticationProvider = RADIUS_AUTHENTICATION_PROVIDER;
-
-//
-// Enumerates the different RADIUS data types. A type of 'rdtUnknown' means
-// the attribute was not recognized by the dictionary.
-//
-
- _RADIUS_DATA_TYPE = (
- rdtUnknown,
- rdtString,
- rdtAddress,
- rdtInteger,
- rdtTime);
- {$EXTERNALSYM _RADIUS_DATA_TYPE}
- RADIUS_DATA_TYPE = _RADIUS_DATA_TYPE;
- {$EXTERNALSYM RADIUS_DATA_TYPE}
- TRadiusDataType = RADIUS_DATA_TYPE;
-
-//
-// Struct representing a RADIUS or extended attribute.
-//
-
- _RADIUS_ATTRIBUTE = record
- dwAttrType: DWORD; // Attribute type
- fDataType: RADIUS_DATA_TYPE; // RADIUS_DATA_TYPE of the value
- cbDataLength: DWORD; // Length of the value (in bytes)
- case Integer of
- 0: (dwValue: DWORD); // For rdtAddress, rdtInteger, and rdtTime
- 1: (lpValue: PCSTR); // For rdtUnknown, and rdtString
- end;
- {$EXTERNALSYM _RADIUS_ATTRIBUTE}
- RADIUS_ATTRIBUTE = _RADIUS_ATTRIBUTE;
- {$EXTERNALSYM RADIUS_ATTRIBUTE}
- PRADIUS_ATTRIBUTE = ^RADIUS_ATTRIBUTE;
- {$EXTERNALSYM PRADIUS_ATTRIBUTE}
- TRadiusAttribute = RADIUS_ATTRIBUTE;
- PRadiusAttribute = PRADIUS_ATTRIBUTE;
-
-//
-// Struct representing the layout of a RADIUS Vendor-Specific attribute. This
-// is useful when interpreting the RADIUS_ATTRIBUTE lpValue field when
-// dwAttrType is ratVendorSpecific.
-//
-
- _RADIUS_VSA_FORMAT = record
- VendorId: array [0..3] of BYTE;
- VendorType: BYTE;
- VendorLength: BYTE;
- AttributeSpecific: array [0..0] of BYTE;
- end;
- {$EXTERNALSYM _RADIUS_VSA_FORMAT}
- RADIUS_VSA_FORMAT = _RADIUS_VSA_FORMAT;
- {$EXTERNALSYM RADIUS_VSA_FORMAT}
- TRadiusVsaFormat = RADIUS_VSA_FORMAT;
-
-//
-// Enumerates the different actions an extension DLL can generate in
-// response to an Access-Request.
-//
-
- _RADIUS_ACTION = (
- raContinue,
- raReject,
- raAccept);
- {$EXTERNALSYM _RADIUS_ACTION}
- RADIUS_ACTION = _RADIUS_ACTION;
- {$EXTERNALSYM RADIUS_ACTION}
- PRADIUS_ACTION = ^RADIUS_ACTION;
- {$EXTERNALSYM PRADIUS_ACTION}
- TRadiusAction = RADIUS_ACTION;
- PRadiusAction = PRADIUS_ACTION;
-
-//
-// Routines exported by a RADIUS extension DLL.
-//
-
-//
-// RadiusExtensionInit is optional. If it exists, it will be invoked prior to
-// the service coming on-line. A return value other than NO_ERROR prevents the
-// service from initializing.
-//
-
-const
- RADIUS_EXTENSION_INIT = 'RadiusExtensionInit';
- {$EXTERNALSYM RADIUS_EXTENSION_INIT}
-
-type
- PRADIUS_EXTENSION_INIT = function: DWORD; stdcall;
- {$EXTERNALSYM PRADIUS_EXTENSION_INIT}
- PRadiusExtensionInit = PRADIUS_EXTENSION_INIT;
-
-//
-// RadiusExtensionTerm is optional. If it exists, it will be invoked prior to
-// unloading the DLL to give the extension a chance to clean-up.
-//
-
-const
- RADIUS_EXTENSION_TERM = 'RadiusExtensionTerm';
- {$EXTERNALSYM RADIUS_EXTENSION_TERM}
-
-type
- PRADIUS_EXTENSION_TERM = procedure; stdcall;
- {$EXTERNALSYM PRADIUS_EXTENSION_TERM}
- PRadiusExtensionTerm = PRADIUS_EXTENSION_TERM;
-
-//
-// RadiusExtensionProcess is mandatory for NT4. For Windows 2000, an
-// extension may export RadiusExtensionProcessEx (q.v.) instead.
-//
-// Parameters:
-// pAttrs Array of attributes from the request. It is terminated by an
-// attribute with dwAttrType set to ratMinimum. These attributes
-// should be treated as read-only and must not be referenced
-// after the function returns.
-// pfAction For Access-Requests, this parameter will be non-NULL with
-// *pfAction == raContinue. The extension DLL can set *pfAction
-// to abort further processing and force an Access-Accept or
-// Access-Reject. For all other request types, this parameter
-// will be NULL.
-//
-// Return Value:
-// A return value other than NO_ERROR causes the request to be discarded.
-//
-
-const
- RADIUS_EXTENSION_PROCESS = 'RadiusExtensionProcess';
- {$EXTERNALSYM RADIUS_EXTENSION_PROCESS}
-
-type
- PRADIUS_EXTENSION_PROCESS = function(pAttrs: PRADIUS_ATTRIBUTE; pfAction: PRADIUS_ACTION): DWORD; stdcall;
- {$EXTERNALSYM PRADIUS_EXTENSION_PROCESS}
- PRadiusExtensionProcess = PRADIUS_EXTENSION_PROCESS;
-
-//
-// RadiusExtensionProcessEx is only supported on Windows 2000. If it exits,
-// RadiusExtensionProcess is ignored.
-//
-// Parameters:
-// pInAttrs Array of attributes from the request. It is terminated by an
-// attribute with dwAttrType set to ratMinimum. These attributes
-// should be treated as read-only and must not be referenced
-// after the function returns.
-// pOutAttrs Array of attributes to add to the response. It is terminated
-// by an attribute with dwAttrType set to ratMinimum.
-// *pOutAttrs may be set to NULL if no attributes are returned.
-// pfAction For Access-Requests, this parameter will be non-NULL with
-// *pfAction == raContinue. The extension DLL can set *pfAction
-// to abort further processing and force an Access-Accept or
-// Access-Reject. For all other request types, this parameter
-// will be NULL.
-//
-// Return Value:
-// A return value other than NO_ERROR causes the request to be discarded.
-//
-
-const
- RADIUS_EXTENSION_PROCESS_EX = 'RadiusExtensionProcessEx';
- {$EXTERNALSYM RADIUS_EXTENSION_PROCESS_EX}
-
-type
- PRADIUS_EXTENSION_PROCESS_EX = function(pInAttrs: PRADIUS_ATTRIBUTE;
- pOutAttrs: PRADIUS_ATTRIBUTE; pfAction: PRADIUS_ACTION): DWORD; stdcall;
- {$EXTERNALSYM PRADIUS_EXTENSION_PROCESS_EX}
- PRadiusExtensionProcessEx = PRADIUS_EXTENSION_PROCESS_EX;
-
-//
-// RadiusExtensionFreeAttributes must be defined if RadiusExtensionProcessEx
-// is defined. It is used to free the attributes returned by
-// RadiusExtensionProcessEx
-//
-// Parameters:
-// pAttrs Array of attributes to be freed.
-//
-
-const
- RADIUS_EXTENSION_FREE_ATTRIBUTES = 'RadiusExtensionFreeAttributes';
- {$EXTERNALSYM RADIUS_EXTENSION_FREE_ATTRIBUTES}
-
-type
- PRADIUS_EXTENSION_FREE_ATTRIBUTES = procedure(pAttrs: PRADIUS_ATTRIBUTE); stdcall;
- {$EXTERNALSYM PRADIUS_EXTENSION_FREE_ATTRIBUTES}
- PRadiusExtensionFreeAttributes = PRADIUS_EXTENSION_FREE_ATTRIBUTES;
-
-//
-// Defines used for installation of an extension DLL.
-// The following registry values are used for loading extensions:
-//
-// HKLM\System\CurrentControlSet\Services\AuthSrv\Parameters
-// ExtensionDLLs (REG_MULTI_SZ) <list of DLL paths>
-// AuthorizationDLLs (REG_MULTI_SZ) <list of DLL paths>
-//
-// ExtensionDLLs are invoked before any of the built-in authentication
-// providers. They receive all the attributes from the request plus all
-// the extended attribute types.
-//
-// AuthorizationDLLs are invoked after the built-in authentication and
-// authorization providers. They receive all the attributes from the
-// response plus all the extended attributes types. AuthorizationDLLs may
-// not return an action of raAccept.
-//
-
-const
- AUTHSRV_PARAMETERS_KEY_W = WideString('System\CurrentControlSet\Services\AuthSrv\Parameters');
- {$EXTERNALSYM AUTHSRV_PARAMETERS_KEY_W}
-
- AUTHSRV_EXTENSIONS_VALUE_W = WideString('ExtensionDLLs');
- {$EXTERNALSYM AUTHSRV_EXTENSIONS_VALUE_W}
-
- AUTHSRV_AUTHORIZATION_VALUE_W = WideString('AuthorizationDLLs');
- {$EXTERNALSYM AUTHSRV_AUTHORIZATION_VALUE_W}
-
-// #if _WIN32_WINNT >= 0x0501
-
-// Version of this spec.
-
-const
- RADIUS_EXTENSION_VERSION = 1;
- {$EXTERNALSYM RADIUS_EXTENSION_VERSION}
-
-//
-// Enumerates the different points during request processing where an
-// extension can be invoked.
-//
-
-type
- _RADIUS_EXTENSION_POINT = (
- repAuthentication, // ExtensionDLLs
- repAuthorization); // AuthorizationDLLs
- {$EXTERNALSYM _RADIUS_EXTENSION_POINT}
- RADIUS_EXTENSION_POINT = _RADIUS_EXTENSION_POINT;
- {$EXTERNALSYM RADIUS_EXTENSION_POINT}
- TRadiusExtensionPoint = RADIUS_EXTENSION_POINT;
-
-//
-// Struct representing an array of RADIUS_ATTRIBUTE structs. All the functions
-// for adding attributes to a request copy the supplied memory, so there is no
-// need for the extension to export RadiusExtensionFreeAttributes. The
-// extension must not modify this struct. All changes must be made by using the
-// supplied callback functions.
-//
-
- PRADIUS_ATTRIBUTE_ARRAY = ^RADIUS_ATTRIBUTE_ARRAY;
- {$EXTERNALSYM PRADIUS_ATTRIBUTE_ARRAY}
- PPRADIUS_ATTRIBUTE_ARRAY = ^PRADIUS_ATTRIBUTE_ARRAY;
- _RADIUS_ATTRIBUTE_ARRAY = record
-
- // Size of this structure in bytes.
-
- cbSize: DWORD;
-
- // Adds a new attribute to the end of the array.
-
- Add: function(This: PRADIUS_ATTRIBUTE_ARRAY; pAttr: PRADIUS_ATTRIBUTE): DWORD; stdcall;
-
- //
- // Returns a const pointer to the specified attribute within the array or
- // NULL if the index is out of range.
- //
-
- AttributeAt: function(This: PPRADIUS_ATTRIBUTE_ARRAY; dwIndex: DWORD): PRADIUS_ATTRIBUTE; stdcall;
-
- //
- // Returns the size of the array. Since indexes are zero-based, the size is
- // 1 greater than the largest index.
- //
-
- GetSize: function(This: PRADIUS_ATTRIBUTE_ARRAY): DWORD; stdcall;
-
- //
- // Inserts a new attribute at a specified index in the array. In the
- // process, it shifts up (by incrementing the index) the existing attribute
- // at this index, and it shifts up all the attributes above it. Returns
- // ERROR_INVALID_PARAMETER if the index is out of range.
- //
-
- InsertAt: function(This: PRADIUS_ATTRIBUTE_ARRAY; dwIndex: DWORD; pAttr: PRADIUS_ATTRIBUTE): DWORD; stdcall;
-
- //
- // Removes the attribute at the specified index in the array. In the
- // process, it shifts down all the attributes above the removed attribute.
- // Returns ERROR_ACCESS_DENIED if the specified attribute is read-only.
- // Returns ERROR_INVALID_PARAMETER if the index is out of range.
- //
-
- RemoveAt: function(This: PRADIUS_ATTRIBUTE_ARRAY; dwIndex: DWORD): DWORD; stdcall;
-
- //
- // Sets the array element at the specified index, replacing the existing
- // attribute. Returns ERROR_INVALID_PARAMETER if the index is out of range.
- //
-
- SetAt: function(This: PPRADIUS_ATTRIBUTE_ARRAY; dwIndex: DWORD; pAttr: PRADIUS_ATTRIBUTE): DWORD; stdcall;
-
- end;
- {$EXTERNALSYM _RADIUS_ATTRIBUTE_ARRAY}
- RADIUS_ATTRIBUTE_ARRAY = _RADIUS_ATTRIBUTE_ARRAY;
- {$EXTERNALSYM RADIUS_ATTRIBUTE_ARRAY}
- TRadiusAttributeArray = RADIUS_ATTRIBUTE_ARRAY;
- PRadiusAttributeArray = PRADIUS_ATTRIBUTE_ARRAY;
-
-//
-// Struct used to exchange information with the extension during request
-// processing. The extension must not modify this struct. All changes must be
-// made by using the supplied callback functions.
-//
-
- PRADIUS_EXTENSION_CONTROL_BLOCK = ^RADIUS_EXTENSION_CONTROL_BLOCK;
- {$EXTERNALSYM PRADIUS_EXTENSION_CONTROL_BLOCK}
- _RADIUS_EXTENSION_CONTROL_BLOCK = record
-
- // Size of this structure.
-
- cbSize: DWORD;
-
- // Version info of this specification.
-
- dwVersion: DWORD;
-
- // Point during request processing where the extension is being invoked.
-
- repPoint: RADIUS_EXTENSION_POINT;
-
- // Type of RADIUS request being processed.
-
- rcRequestType: RADIUS_CODE;
-
- //
- // Final disposition of the request. This field must not be modified
- // directly; use the SetResponseType callback function instead. At the
- // repAuthentication point, this may be set to rcUnknown to indicate that no
- // decision has been made yet.
- //
-
- rcResponseType: RADIUS_CODE;
-
- //
- // Returns the attributes received in the RADIUS request and any internal
- // attributes describing the request state. The extenstion can modify the
- // request attributes. For example, when IAS is acting as a RADIUS proxy, an
- // extension could filter which attributes are forwarded to a remote RADIUS
- // server.
- //
-
- GetRequest: function(This: PRADIUS_EXTENSION_CONTROL_BLOCK): PRADIUS_ATTRIBUTE_ARRAY; stdcall;
-
- //
- // Returns the attributes that will be sent in the response if the final
- // outcome of request processing matches the specified response type.
- // Returns NULL if rcResponseType is invalid. Note that an extension may
- // retrieve and modify the attributes for any valid response type regardless
- // of the request's current disposition. For example, an extension can set
- // the response type to rcAccessAccept, but still add attributes to the
- // Access-Reject in case the response type is overridden during further
- // processing.
- //
-
- GetResponse: function(This: PRADIUS_EXTENSION_CONTROL_BLOCK; rcResponseType: RADIUS_CODE): PRADIUS_ATTRIBUTE_ARRAY; stdcall;
-
- //
- // Sets the final disposition of the request.
- // Returns ERROR_INVALID_PARAMETER if the specified response type is invalid
- // for the request type.
- //
-
- SetResponseType: function(This: PRADIUS_EXTENSION_CONTROL_BLOCK; rcResponseType: RADIUS_CODE): DWORD; stdcall;
- end;
- {$EXTERNALSYM _RADIUS_EXTENSION_CONTROL_BLOCK}
- RADIUS_EXTENSION_CONTROL_BLOCK = _RADIUS_EXTENSION_CONTROL_BLOCK;
- {$EXTERNALSYM RADIUS_EXTENSION_CONTROL_BLOCK}
- TRadiusExtensionControlBlock = RADIUS_EXTENSION_CONTROL_BLOCK;
- PRadiusExtensionControlBlock = PRADIUS_EXTENSION_CONTROL_BLOCK;
-
-//
-// If RadiusExtensionProcess2 exists, RadiusExtensionProcess and
-// RadiusExtensionProcessEx are ignored.
-//
-// Parameters:
-// pECB Info exchanged with the extension.
-//
-// Return Value:
-// A return value other than NO_ERROR causes the request to be discarded.
-///
-
-const
- RADIUS_EXTENSION_PROCESS2 = 'RadiusExtensionProcess2';
- {$EXTERNALSYM RADIUS_EXTENSION_PROCESS2}
-
-type
- PRADIUS_EXTENSION_PROCESS_2 = function(pECB: PRADIUS_EXTENSION_CONTROL_BLOCK): DWORD; stdcall;
- {$EXTERNALSYM PRADIUS_EXTENSION_PROCESS_2}
-
-implementation
-
-end.
+{******************************************************************************}
+{ }
+{ Internet Authentication Extensions API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: authif.h, released June 2000. The original Pascal }
+{ code is: Authif.pas, released December 2000. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwaauthif.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaAuthif;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "authif.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaWinType;
+
+//
+// Enumerates the attribute types that are passed to the extension DLL. The
+// RADIUS standard attributes are included for convenience and should not be
+// considered exhaustive.
+//
+
+type
+ _RADIUS_ATTRIBUTE_TYPE = DWORD;
+ {$EXTERNALSYM _RADIUS_ATTRIBUTE_TYPE}
+ RADIUS_ATTRIBUTE_TYPE = _RADIUS_ATTRIBUTE_TYPE;
+ {$EXTERNALSYM RADIUS_ATTRIBUTE_TYPE}
+ TRadiusAttributeType = RADIUS_ATTRIBUTE_TYPE;
+
+const
+ // Used to terminate attribute arrays.
+
+ ratMinimum = 0;
+ {$EXTERNALSYM ratMinimum}
+
+ // RADIUS standard attributes.
+
+ ratUserName = 1;
+ {$EXTERNALSYM ratUserName}
+ ratUserPassword = 2;
+ {$EXTERNALSYM ratUserPassword}
+ ratCHAPPassword = 3;
+ {$EXTERNALSYM ratCHAPPassword}
+ ratNASIPAddress = 4;
+ {$EXTERNALSYM ratNASIPAddress}
+ ratNASPort = 5;
+ {$EXTERNALSYM ratNASPort}
+ ratServiceType = 6;
+ {$EXTERNALSYM ratServiceType}
+ ratFramedProtocol = 7;
+ {$EXTERNALSYM ratFramedProtocol}
+ ratFramedIPAddress = 8;
+ {$EXTERNALSYM ratFramedIPAddress}
+ ratFramedIPNetmask = 9;
+ {$EXTERNALSYM ratFramedIPNetmask}
+ ratFramedRouting = 10;
+ {$EXTERNALSYM ratFramedRouting}
+ ratFilterId = 11;
+ {$EXTERNALSYM ratFilterId}
+ ratFramedMTU = 12;
+ {$EXTERNALSYM ratFramedMTU}
+ ratFramedCompression = 13;
+ {$EXTERNALSYM ratFramedCompression}
+ ratLoginIPHost = 14;
+ {$EXTERNALSYM ratLoginIPHost}
+ ratLoginService = 15;
+ {$EXTERNALSYM ratLoginService}
+ ratLoginPort = 16;
+ {$EXTERNALSYM ratLoginPort}
+ ratReplyMessage = 18;
+ {$EXTERNALSYM ratReplyMessage}
+ ratCallbackNumber = 19;
+ {$EXTERNALSYM ratCallbackNumber}
+ ratCallbackId = 20;
+ {$EXTERNALSYM ratCallbackId}
+ ratFramedRoute = 22;
+ {$EXTERNALSYM ratFramedRoute}
+ ratFramedIPXNetwork = 23;
+ {$EXTERNALSYM ratFramedIPXNetwork}
+ ratState = 24;
+ {$EXTERNALSYM ratState}
+ ratClass = 25;
+ {$EXTERNALSYM ratClass}
+ ratVendorSpecific = 26;
+ {$EXTERNALSYM ratVendorSpecific}
+ ratSessionTimeout = 27;
+ {$EXTERNALSYM ratSessionTimeout}
+ ratIdleTimeout = 28;
+ {$EXTERNALSYM ratIdleTimeout}
+ ratTerminationAction = 29;
+ {$EXTERNALSYM ratTerminationAction}
+ ratCalledStationId = 30;
+ {$EXTERNALSYM ratCalledStationId}
+ ratCallingStationId = 31;
+ {$EXTERNALSYM ratCallingStationId}
+ ratNASIdentifier = 32;
+ {$EXTERNALSYM ratNASIdentifier}
+ ratProxyState = 33;
+ {$EXTERNALSYM ratProxyState}
+ ratLoginLATService = 34;
+ {$EXTERNALSYM ratLoginLATService}
+ ratLoginLATNode = 35;
+ {$EXTERNALSYM ratLoginLATNode}
+ ratLoginLATGroup = 36;
+ {$EXTERNALSYM ratLoginLATGroup}
+ ratFramedAppleTalkLink = 37;
+ {$EXTERNALSYM ratFramedAppleTalkLink}
+ ratFramedAppleTalkNetwork = 38;
+ {$EXTERNALSYM ratFramedAppleTalkNetwork}
+ ratFramedAppleTalkZone = 39;
+ {$EXTERNALSYM ratFramedAppleTalkZone}
+ ratAcctStatusType = 40;
+ {$EXTERNALSYM ratAcctStatusType}
+ ratAcctDelayTime = 41;
+ {$EXTERNALSYM ratAcctDelayTime}
+ ratAcctInputOctets = 42;
+ {$EXTERNALSYM ratAcctInputOctets}
+ ratAcctOutputOctets = 43;
+ {$EXTERNALSYM ratAcctOutputOctets}
+ ratAcctSessionId = 44;
+ {$EXTERNALSYM ratAcctSessionId}
+ ratAcctAuthentic = 45;
+ {$EXTERNALSYM ratAcctAuthentic}
+ ratAcctSessionTime = 46;
+ {$EXTERNALSYM ratAcctSessionTime}
+ ratAcctInputPackets = 47;
+ {$EXTERNALSYM ratAcctInputPackets}
+ ratAcctOutputPackets = 48;
+ {$EXTERNALSYM ratAcctOutputPackets}
+ ratAcctTerminationCause = 49;
+ {$EXTERNALSYM ratAcctTerminationCause}
+ ratCHAPChallenge = 60;
+ {$EXTERNALSYM ratCHAPChallenge}
+ ratNASPortType = 61;
+ {$EXTERNALSYM ratNASPortType}
+ ratPortLimit = 62;
+ {$EXTERNALSYM ratPortLimit}
+
+ // Extended attribute types used to pass additional information.
+
+ ratCode = 262; // Request type code.
+ {$EXTERNALSYM ratCode}
+ ratIdentifier = 263; // Request identifier.
+ {$EXTERNALSYM ratIdentifier}
+ ratAuthenticator = 264; // Request authenticator.
+ {$EXTERNALSYM ratAuthenticator}
+ ratSrcIPAddress = 265; // Source IP address.
+ {$EXTERNALSYM ratSrcIPAddress}
+ ratSrcPort = 266; // Source IP port.
+ {$EXTERNALSYM ratSrcPort}
+ ratProvider = 267; // Authentication provider.
+ {$EXTERNALSYM ratProvider}
+ ratStrippedUserName = 268; // User-Name with realm stripped.
+ {$EXTERNALSYM ratStrippedUserName}
+ ratFQUserName = 269; // Fully-Qualified-User-Name.
+ {$EXTERNALSYM ratFQUserName}
+ ratPolicyName = 270; // Remote Access Policy name.
+ {$EXTERNALSYM ratPolicyName}
+ ratUniqueId = 271; // Unique ID identifying the request.
+ {$EXTERNALSYM ratUniqueId}
+ ratExtensionState = 272; // Used to pass state between extensions.
+ {$EXTERNALSYM ratExtensionState}
+
+//
+// Enumerates the different RADIUS packet codes. Used for the ratCode extended
+// attribute.
+//
+
+type
+ _RADIUS_CODE = DWORD;
+ {$EXTERNALSYM _RADIUS_CODE}
+ RADIUS_CODE = _RADIUS_CODE;
+ {$EXTERNALSYM RADIUS_CODE}
+ TRadiusCode = RADIUS_CODE;
+
+const
+ rcUnknown = 0;
+ {$EXTERNALSYM rcUnknown}
+ rcAccessRequest = 1;
+ {$EXTERNALSYM rcAccessRequest}
+ rcAccessAccept = 2;
+ {$EXTERNALSYM rcAccessAccept}
+ rcAccessReject = 3;
+ {$EXTERNALSYM rcAccessReject}
+ rcAccountingRequest = 4;
+ {$EXTERNALSYM rcAccountingRequest}
+ rcAccountingResponse = 5;
+ {$EXTERNALSYM rcAccountingResponse}
+ rcAccessChallenge = 11;
+ {$EXTERNALSYM rcAccessChallenge}
+ rcDiscard = 256;
+ {$EXTERNALSYM rcDiscard}
+
+//
+// Enumerates the different authentication providers used for processing a
+// request. Used for the ratProvider extended attribute.
+//
+
+type
+ _RADIUS_AUTHENTICATION_PROVIDER = (
+ rapUnknown,
+ rapUsersFile,
+ rapProxy,
+ rapWindowsNT,
+ rapMCIS,
+ rapODBC,
+ rapNone);
+ {$EXTERNALSYM _RADIUS_AUTHENTICATION_PROVIDER}
+ RADIUS_AUTHENTICATION_PROVIDER = _RADIUS_AUTHENTICATION_PROVIDER;
+ {$EXTERNALSYM RADIUS_AUTHENTICATION_PROVIDER}
+ TRadiusAuthenticationProvider = RADIUS_AUTHENTICATION_PROVIDER;
+
+//
+// Enumerates the different RADIUS data types. A type of 'rdtUnknown' means
+// the attribute was not recognized by the dictionary.
+//
+
+ _RADIUS_DATA_TYPE = (
+ rdtUnknown,
+ rdtString,
+ rdtAddress,
+ rdtInteger,
+ rdtTime);
+ {$EXTERNALSYM _RADIUS_DATA_TYPE}
+ RADIUS_DATA_TYPE = _RADIUS_DATA_TYPE;
+ {$EXTERNALSYM RADIUS_DATA_TYPE}
+ TRadiusDataType = RADIUS_DATA_TYPE;
+
+//
+// Struct representing a RADIUS or extended attribute.
+//
+
+ _RADIUS_ATTRIBUTE = record
+ dwAttrType: DWORD; // Attribute type
+ fDataType: RADIUS_DATA_TYPE; // RADIUS_DATA_TYPE of the value
+ cbDataLength: DWORD; // Length of the value (in bytes)
+ case Integer of
+ 0: (dwValue: DWORD); // For rdtAddress, rdtInteger, and rdtTime
+ 1: (lpValue: PCSTR); // For rdtUnknown, and rdtString
+ end;
+ {$EXTERNALSYM _RADIUS_ATTRIBUTE}
+ RADIUS_ATTRIBUTE = _RADIUS_ATTRIBUTE;
+ {$EXTERNALSYM RADIUS_ATTRIBUTE}
+ PRADIUS_ATTRIBUTE = ^RADIUS_ATTRIBUTE;
+ {$EXTERNALSYM PRADIUS_ATTRIBUTE}
+ TRadiusAttribute = RADIUS_ATTRIBUTE;
+ PRadiusAttribute = PRADIUS_ATTRIBUTE;
+
+//
+// Struct representing the layout of a RADIUS Vendor-Specific attribute. This
+// is useful when interpreting the RADIUS_ATTRIBUTE lpValue field when
+// dwAttrType is ratVendorSpecific.
+//
+
+ _RADIUS_VSA_FORMAT = record
+ VendorId: array [0..3] of BYTE;
+ VendorType: BYTE;
+ VendorLength: BYTE;
+ AttributeSpecific: array [0..0] of BYTE;
+ end;
+ {$EXTERNALSYM _RADIUS_VSA_FORMAT}
+ RADIUS_VSA_FORMAT = _RADIUS_VSA_FORMAT;
+ {$EXTERNALSYM RADIUS_VSA_FORMAT}
+ TRadiusVsaFormat = RADIUS_VSA_FORMAT;
+
+//
+// Enumerates the different actions an extension DLL can generate in
+// response to an Access-Request.
+//
+
+ _RADIUS_ACTION = (
+ raContinue,
+ raReject,
+ raAccept);
+ {$EXTERNALSYM _RADIUS_ACTION}
+ RADIUS_ACTION = _RADIUS_ACTION;
+ {$EXTERNALSYM RADIUS_ACTION}
+ PRADIUS_ACTION = ^RADIUS_ACTION;
+ {$EXTERNALSYM PRADIUS_ACTION}
+ TRadiusAction = RADIUS_ACTION;
+ PRadiusAction = PRADIUS_ACTION;
+
+//
+// Routines exported by a RADIUS extension DLL.
+//
+
+//
+// RadiusExtensionInit is optional. If it exists, it will be invoked prior to
+// the service coming on-line. A return value other than NO_ERROR prevents the
+// service from initializing.
+//
+
+const
+ RADIUS_EXTENSION_INIT = 'RadiusExtensionInit';
+ {$EXTERNALSYM RADIUS_EXTENSION_INIT}
+
+type
+ PRADIUS_EXTENSION_INIT = function: DWORD; stdcall;
+ {$EXTERNALSYM PRADIUS_EXTENSION_INIT}
+ PRadiusExtensionInit = PRADIUS_EXTENSION_INIT;
+
+//
+// RadiusExtensionTerm is optional. If it exists, it will be invoked prior to
+// unloading the DLL to give the extension a chance to clean-up.
+//
+
+const
+ RADIUS_EXTENSION_TERM = 'RadiusExtensionTerm';
+ {$EXTERNALSYM RADIUS_EXTENSION_TERM}
+
+type
+ PRADIUS_EXTENSION_TERM = procedure; stdcall;
+ {$EXTERNALSYM PRADIUS_EXTENSION_TERM}
+ PRadiusExtensionTerm = PRADIUS_EXTENSION_TERM;
+
+//
+// RadiusExtensionProcess is mandatory for NT4. For Windows 2000, an
+// extension may export RadiusExtensionProcessEx (q.v.) instead.
+//
+// Parameters:
+// pAttrs Array of attributes from the request. It is terminated by an
+// attribute with dwAttrType set to ratMinimum. These attributes
+// should be treated as read-only and must not be referenced
+// after the function returns.
+// pfAction For Access-Requests, this parameter will be non-NULL with
+// *pfAction == raContinue. The extension DLL can set *pfAction
+// to abort further processing and force an Access-Accept or
+// Access-Reject. For all other request types, this parameter
+// will be NULL.
+//
+// Return Value:
+// A return value other than NO_ERROR causes the request to be discarded.
+//
+
+const
+ RADIUS_EXTENSION_PROCESS = 'RadiusExtensionProcess';
+ {$EXTERNALSYM RADIUS_EXTENSION_PROCESS}
+
+type
+ PRADIUS_EXTENSION_PROCESS = function(pAttrs: PRADIUS_ATTRIBUTE; pfAction: PRADIUS_ACTION): DWORD; stdcall;
+ {$EXTERNALSYM PRADIUS_EXTENSION_PROCESS}
+ PRadiusExtensionProcess = PRADIUS_EXTENSION_PROCESS;
+
+//
+// RadiusExtensionProcessEx is only supported on Windows 2000. If it exits,
+// RadiusExtensionProcess is ignored.
+//
+// Parameters:
+// pInAttrs Array of attributes from the request. It is terminated by an
+// attribute with dwAttrType set to ratMinimum. These attributes
+// should be treated as read-only and must not be referenced
+// after the function returns.
+// pOutAttrs Array of attributes to add to the response. It is terminated
+// by an attribute with dwAttrType set to ratMinimum.
+// *pOutAttrs may be set to NULL if no attributes are returned.
+// pfAction For Access-Requests, this parameter will be non-NULL with
+// *pfAction == raContinue. The extension DLL can set *pfAction
+// to abort further processing and force an Access-Accept or
+// Access-Reject. For all other request types, this parameter
+// will be NULL.
+//
+// Return Value:
+// A return value other than NO_ERROR causes the request to be discarded.
+//
+
+const
+ RADIUS_EXTENSION_PROCESS_EX = 'RadiusExtensionProcessEx';
+ {$EXTERNALSYM RADIUS_EXTENSION_PROCESS_EX}
+
+type
+ PRADIUS_EXTENSION_PROCESS_EX = function(pInAttrs: PRADIUS_ATTRIBUTE;
+ pOutAttrs: PRADIUS_ATTRIBUTE; pfAction: PRADIUS_ACTION): DWORD; stdcall;
+ {$EXTERNALSYM PRADIUS_EXTENSION_PROCESS_EX}
+ PRadiusExtensionProcessEx = PRADIUS_EXTENSION_PROCESS_EX;
+
+//
+// RadiusExtensionFreeAttributes must be defined if RadiusExtensionProcessEx
+// is defined. It is used to free the attributes returned by
+// RadiusExtensionProcessEx
+//
+// Parameters:
+// pAttrs Array of attributes to be freed.
+//
+
+const
+ RADIUS_EXTENSION_FREE_ATTRIBUTES = 'RadiusExtensionFreeAttributes';
+ {$EXTERNALSYM RADIUS_EXTENSION_FREE_ATTRIBUTES}
+
+type
+ PRADIUS_EXTENSION_FREE_ATTRIBUTES = procedure(pAttrs: PRADIUS_ATTRIBUTE); stdcall;
+ {$EXTERNALSYM PRADIUS_EXTENSION_FREE_ATTRIBUTES}
+ PRadiusExtensionFreeAttributes = PRADIUS_EXTENSION_FREE_ATTRIBUTES;
+
+//
+// Defines used for installation of an extension DLL.
+// The following registry values are used for loading extensions:
+//
+// HKLM\System\CurrentControlSet\Services\AuthSrv\Parameters
+// ExtensionDLLs (REG_MULTI_SZ) <list of DLL paths>
+// AuthorizationDLLs (REG_MULTI_SZ) <list of DLL paths>
+//
+// ExtensionDLLs are invoked before any of the built-in authentication
+// providers. They receive all the attributes from the request plus all
+// the extended attribute types.
+//
+// AuthorizationDLLs are invoked after the built-in authentication and
+// authorization providers. They receive all the attributes from the
+// response plus all the extended attributes types. AuthorizationDLLs may
+// not return an action of raAccept.
+//
+
+const
+ AUTHSRV_PARAMETERS_KEY_W = WideString('System\CurrentControlSet\Services\AuthSrv\Parameters');
+ {$EXTERNALSYM AUTHSRV_PARAMETERS_KEY_W}
+
+ AUTHSRV_EXTENSIONS_VALUE_W = WideString('ExtensionDLLs');
+ {$EXTERNALSYM AUTHSRV_EXTENSIONS_VALUE_W}
+
+ AUTHSRV_AUTHORIZATION_VALUE_W = WideString('AuthorizationDLLs');
+ {$EXTERNALSYM AUTHSRV_AUTHORIZATION_VALUE_W}
+
+// #if _WIN32_WINNT >= 0x0501
+
+// Version of this spec.
+
+const
+ RADIUS_EXTENSION_VERSION = 1;
+ {$EXTERNALSYM RADIUS_EXTENSION_VERSION}
+
+//
+// Enumerates the different points during request processing where an
+// extension can be invoked.
+//
+
+type
+ _RADIUS_EXTENSION_POINT = (
+ repAuthentication, // ExtensionDLLs
+ repAuthorization); // AuthorizationDLLs
+ {$EXTERNALSYM _RADIUS_EXTENSION_POINT}
+ RADIUS_EXTENSION_POINT = _RADIUS_EXTENSION_POINT;
+ {$EXTERNALSYM RADIUS_EXTENSION_POINT}
+ TRadiusExtensionPoint = RADIUS_EXTENSION_POINT;
+
+//
+// Struct representing an array of RADIUS_ATTRIBUTE structs. All the functions
+// for adding attributes to a request copy the supplied memory, so there is no
+// need for the extension to export RadiusExtensionFreeAttributes. The
+// extension must not modify this struct. All changes must be made by using the
+// supplied callback functions.
+//
+
+ PRADIUS_ATTRIBUTE_ARRAY = ^RADIUS_ATTRIBUTE_ARRAY;
+ {$EXTERNALSYM PRADIUS_ATTRIBUTE_ARRAY}
+ PPRADIUS_ATTRIBUTE_ARRAY = ^PRADIUS_ATTRIBUTE_ARRAY;
+ _RADIUS_ATTRIBUTE_ARRAY = record
+
+ // Size of this structure in bytes.
+
+ cbSize: DWORD;
+
+ // Adds a new attribute to the end of the array.
+
+ Add: function(This: PRADIUS_ATTRIBUTE_ARRAY; pAttr: PRADIUS_ATTRIBUTE): DWORD; stdcall;
+
+ //
+ // Returns a const pointer to the specified attribute within the array or
+ // NULL if the index is out of range.
+ //
+
+ AttributeAt: function(This: PPRADIUS_ATTRIBUTE_ARRAY; dwIndex: DWORD): PRADIUS_ATTRIBUTE; stdcall;
+
+ //
+ // Returns the size of the array. Since indexes are zero-based, the size is
+ // 1 greater than the largest index.
+ //
+
+ GetSize: function(This: PRADIUS_ATTRIBUTE_ARRAY): DWORD; stdcall;
+
+ //
+ // Inserts a new attribute at a specified index in the array. In the
+ // process, it shifts up (by incrementing the index) the existing attribute
+ // at this index, and it shifts up all the attributes above it. Returns
+ // ERROR_INVALID_PARAMETER if the index is out of range.
+ //
+
+ InsertAt: function(This: PRADIUS_ATTRIBUTE_ARRAY; dwIndex: DWORD; pAttr: PRADIUS_ATTRIBUTE): DWORD; stdcall;
+
+ //
+ // Removes the attribute at the specified index in the array. In the
+ // process, it shifts down all the attributes above the removed attribute.
+ // Returns ERROR_ACCESS_DENIED if the specified attribute is read-only.
+ // Returns ERROR_INVALID_PARAMETER if the index is out of range.
+ //
+
+ RemoveAt: function(This: PRADIUS_ATTRIBUTE_ARRAY; dwIndex: DWORD): DWORD; stdcall;
+
+ //
+ // Sets the array element at the specified index, replacing the existing
+ // attribute. Returns ERROR_INVALID_PARAMETER if the index is out of range.
+ //
+
+ SetAt: function(This: PPRADIUS_ATTRIBUTE_ARRAY; dwIndex: DWORD; pAttr: PRADIUS_ATTRIBUTE): DWORD; stdcall;
+
+ end;
+ {$EXTERNALSYM _RADIUS_ATTRIBUTE_ARRAY}
+ RADIUS_ATTRIBUTE_ARRAY = _RADIUS_ATTRIBUTE_ARRAY;
+ {$EXTERNALSYM RADIUS_ATTRIBUTE_ARRAY}
+ TRadiusAttributeArray = RADIUS_ATTRIBUTE_ARRAY;
+ PRadiusAttributeArray = PRADIUS_ATTRIBUTE_ARRAY;
+
+//
+// Struct used to exchange information with the extension during request
+// processing. The extension must not modify this struct. All changes must be
+// made by using the supplied callback functions.
+//
+
+ PRADIUS_EXTENSION_CONTROL_BLOCK = ^RADIUS_EXTENSION_CONTROL_BLOCK;
+ {$EXTERNALSYM PRADIUS_EXTENSION_CONTROL_BLOCK}
+ _RADIUS_EXTENSION_CONTROL_BLOCK = record
+
+ // Size of this structure.
+
+ cbSize: DWORD;
+
+ // Version info of this specification.
+
+ dwVersion: DWORD;
+
+ // Point during request processing where the extension is being invoked.
+
+ repPoint: RADIUS_EXTENSION_POINT;
+
+ // Type of RADIUS request being processed.
+
+ rcRequestType: RADIUS_CODE;
+
+ //
+ // Final disposition of the request. This field must not be modified
+ // directly; use the SetResponseType callback function instead. At the
+ // repAuthentication point, this may be set to rcUnknown to indicate that no
+ // decision has been made yet.
+ //
+
+ rcResponseType: RADIUS_CODE;
+
+ //
+ // Returns the attributes received in the RADIUS request and any internal
+ // attributes describing the request state. The extenstion can modify the
+ // request attributes. For example, when IAS is acting as a RADIUS proxy, an
+ // extension could filter which attributes are forwarded to a remote RADIUS
+ // server.
+ //
+
+ GetRequest: function(This: PRADIUS_EXTENSION_CONTROL_BLOCK): PRADIUS_ATTRIBUTE_ARRAY; stdcall;
+
+ //
+ // Returns the attributes that will be sent in the response if the final
+ // outcome of request processing matches the specified response type.
+ // Returns NULL if rcResponseType is invalid. Note that an extension may
+ // retrieve and modify the attributes for any valid response type regardless
+ // of the request's current disposition. For example, an extension can set
+ // the response type to rcAccessAccept, but still add attributes to the
+ // Access-Reject in case the response type is overridden during further
+ // processing.
+ //
+
+ GetResponse: function(This: PRADIUS_EXTENSION_CONTROL_BLOCK; rcResponseType: RADIUS_CODE): PRADIUS_ATTRIBUTE_ARRAY; stdcall;
+
+ //
+ // Sets the final disposition of the request.
+ // Returns ERROR_INVALID_PARAMETER if the specified response type is invalid
+ // for the request type.
+ //
+
+ SetResponseType: function(This: PRADIUS_EXTENSION_CONTROL_BLOCK; rcResponseType: RADIUS_CODE): DWORD; stdcall;
+ end;
+ {$EXTERNALSYM _RADIUS_EXTENSION_CONTROL_BLOCK}
+ RADIUS_EXTENSION_CONTROL_BLOCK = _RADIUS_EXTENSION_CONTROL_BLOCK;
+ {$EXTERNALSYM RADIUS_EXTENSION_CONTROL_BLOCK}
+ TRadiusExtensionControlBlock = RADIUS_EXTENSION_CONTROL_BLOCK;
+ PRadiusExtensionControlBlock = PRADIUS_EXTENSION_CONTROL_BLOCK;
+
+//
+// If RadiusExtensionProcess2 exists, RadiusExtensionProcess and
+// RadiusExtensionProcessEx are ignored.
+//
+// Parameters:
+// pECB Info exchanged with the extension.
+//
+// Return Value:
+// A return value other than NO_ERROR causes the request to be discarded.
+///
+
+const
+ RADIUS_EXTENSION_PROCESS2 = 'RadiusExtensionProcess2';
+ {$EXTERNALSYM RADIUS_EXTENSION_PROCESS2}
+
+type
+ PRADIUS_EXTENSION_PROCESS_2 = function(pECB: PRADIUS_EXTENSION_CONTROL_BLOCK): DWORD; stdcall;
+ {$EXTERNALSYM PRADIUS_EXTENSION_PROCESS_2}
+
+implementation
+
+end.
diff --git a/packages/extra/winunits/jwaauthz.pas b/packages/extra/winunits/jwaauthz.pas
index 3462eb4c8c..b2e74d55a7 100644
--- a/packages/extra/winunits/jwaauthz.pas
+++ b/packages/extra/winunits/jwaauthz.pas
@@ -1,705 +1,705 @@
-{******************************************************************************}
-{ }
-{ Authorization Framework API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: authz.h, released August 2001. The original Pascal }
-{ code is: Authz.pas, released October 2001. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwaauthz.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaAuthz;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "authz.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaWinNT, JwaWinType;
-
-//
-// Flags which may be used at the time of client context creation using a sid.
-//
-
-const
- AUTHZ_SKIP_TOKEN_GROUPS = $2;
- {$EXTERNALSYM AUTHZ_SKIP_TOKEN_GROUPS}
- AUTHZ_REQUIRE_S4U_LOGON = $4;
- {$EXTERNALSYM AUTHZ_REQUIRE_S4U_LOGON}
-
-type
- AUTHZ_ACCESS_CHECK_RESULTS_HANDLE = HANDLE;
- {$EXTERNALSYM AUTHZ_ACCESS_CHECK_RESULTS_HANDLE}
- AUTHZ_CLIENT_CONTEXT_HANDLE = HANDLE;
- {$EXTERNALSYM AUTHZ_CLIENT_CONTEXT_HANDLE}
- AUTHZ_RESOURCE_MANAGER_HANDLE = HANDLE;
- {$EXTERNALSYM AUTHZ_RESOURCE_MANAGER_HANDLE}
- AUTHZ_AUDIT_EVENT_HANDLE = HANDLE;
- {$EXTERNALSYM AUTHZ_AUDIT_EVENT_HANDLE}
- AUTHZ_AUDIT_EVENT_TYPE_HANDLE = HANDLE;
- {$EXTERNALSYM AUTHZ_AUDIT_EVENT_TYPE_HANDLE}
- AUTHZ_SECURITY_EVENT_PROVIDER_HANDLE = HANDLE;
- {$EXTERNALSYM AUTHZ_SECURITY_EVENT_PROVIDER_HANDLE}
-
- PAUTHZ_ACCESS_CHECK_RESULTS_HANDLE = ^AUTHZ_ACCESS_CHECK_RESULTS_HANDLE;
- {$EXTERNALSYM PAUTHZ_ACCESS_CHECK_RESULTS_HANDLE}
- PAUTHZ_CLIENT_CONTEXT_HANDLE = ^AUTHZ_CLIENT_CONTEXT_HANDLE;
- {$EXTERNALSYM PAUTHZ_CLIENT_CONTEXT_HANDLE}
- PAUTHZ_RESOURCE_MANAGER_HANDLE = ^AUTHZ_RESOURCE_MANAGER_HANDLE;
- {$EXTERNALSYM PAUTHZ_RESOURCE_MANAGER_HANDLE}
- PAUTHZ_AUDIT_EVENT_HANDLE = ^AUTHZ_AUDIT_EVENT_HANDLE;
- {$EXTERNALSYM PAUTHZ_AUDIT_EVENT_HANDLE}
- PAUTHZ_AUDIT_EVENT_TYPE_HANDLE = ^AUTHZ_AUDIT_EVENT_TYPE_HANDLE;
- {$EXTERNALSYM PAUTHZ_AUDIT_EVENT_TYPE_HANDLE}
- PAUTHZ_SECURITY_EVENT_PROVIDER_HANDLE = ^AUTHZ_SECURITY_EVENT_PROVIDER_HANDLE;
- {$EXTERNALSYM PAUTHZ_SECURITY_EVENT_PROVIDER_HANDLE}
-
-//
-// Structure defining the access check request.
-//
-
- PAUTHZ_ACCESS_REQUEST = ^AUTHZ_ACCESS_REQUEST;
- {$EXTERNALSYM PAUTHZ_ACCESS_REQUEST}
- _AUTHZ_ACCESS_REQUEST = record
- DesiredAccess: ACCESS_MASK;
- //
- // To replace the principal self sid in the acl.
- //
- PrincipalSelfSid: PSID;
- //
- // Object type list represented by an array of (level, guid) pair and the
- // number of elements in the array. This is a post-fix representation of the
- // object tree.
- // These fields should be set to NULL and 0 respectively except when per
- // property access is desired.
- //
- ObjectTypeList: POBJECT_TYPE_LIST;
- ObjectTypeListLength: DWORD;
- //
- // To support completely business rules based access. This will be passed as
- // input to the callback access check function. Access check algorithm does
- // not interpret these.
- //
- OptionalArguments: PVOID;
- end;
- {$EXTERNALSYM _AUTHZ_ACCESS_REQUEST}
- AUTHZ_ACCESS_REQUEST = _AUTHZ_ACCESS_REQUEST;
- {$EXTERNALSYM AUTHZ_ACCESS_REQUEST}
- TAuthzAccessRequest = AUTHZ_ACCESS_REQUEST;
- PAuthzAccessRequest = PAUTHZ_ACCESS_REQUEST;
-
-//
-// Structure to return the results of the access check call.
-//
-
-const
- AUTHZ_GENERATE_SUCCESS_AUDIT = $1;
- {$EXTERNALSYM AUTHZ_GENERATE_SUCCESS_AUDIT}
- AUTHZ_GENERATE_FAILURE_AUDIT = $2;
- {$EXTERNALSYM AUTHZ_GENERATE_FAILURE_AUDIT}
-
-type
- PAUTHZ_ACCESS_REPLY = ^AUTHZ_ACCESS_REPLY;
- {$EXTERNALSYM PAUTHZ_ACCESS_REPLY}
- _AUTHZ_ACCESS_REPLY = record
- //
- // The length of the array representing the object type list structure. If
- // no object type is used to represent the object, then the length must be
- // set to 1.
- //
- // Note: This parameter must be filled!
- //
- ResultListLength: DWORD;
- //
- // Array of granted access masks. This memory is allocated by the RM. Access
- // check routines just fill in the values.
- //
- GrantedAccessMask: PACCESS_MASK;
- //
- // Array of SACL evaluation results. This memory is allocated by the RM, if SACL
- // evaluation results are desired. Access check routines just fill in the values.
- // Sacl evaluation will only be performed if auditing is requested.
- //
- SaclEvaluationResults: PDWORD;
- //
- // Array of results for each element of the array. This memory is allocated
- // by the RM. Access check routines just fill in the values.
- //
- Error: PDWORD;
- end;
- {$EXTERNALSYM _AUTHZ_ACCESS_REPLY}
- AUTHZ_ACCESS_REPLY = _AUTHZ_ACCESS_REPLY;
- {$EXTERNALSYM AUTHZ_ACCESS_REPLY}
- TAuthzAccessReply = AUTHZ_ACCESS_REPLY;
- PAuthzAccessReply = PAUTHZ_ACCESS_REPLY;
-
-//
-// Typedefs for callback functions to be provided by the resource manager.
-//
-
-//
-// Callback access check function takes in
-// AuthzClientContext - a client context
-// pAce - pointer to a callback ace
-// pArgs - Optional arguments that were passed to AuthzAccessCheck thru
-// AuthzAccessRequest->OptionalArguments are passed back here.
-// pbAceApplicable - The resource manager must supply whether the ace should
-// be used in the computation of access evaluation
-//
-// Returns
-// TRUE if the API succeeded.
-// FALSE on any intermediate errors (like failed memory allocation)
-// In case of failure, the caller must use SetLastError(ErrorValue).
-//
-
-type
- PFN_AUTHZ_DYNAMIC_ACCESS_CHECK = function(hAuthzClientContext: AUTHZ_CLIENT_CONTEXT_HANDLE;
- pAce: PACE_HEADER; pArgs: PVOID; var pbAceApplicable: BOOL): BOOL; stdcall;
- {$EXTERNALSYM PFN_AUTHZ_DYNAMIC_ACCESS_CHECK}
- PFnAuthzDynamicAccessCheck = PFN_AUTHZ_DYNAMIC_ACCESS_CHECK;
-
-//
-// Callback compute dynamic groups function takes in
-// AuthzClientContext - a client context
-// pArgs - Optional arguments that supplied to AuthzInitializeClientContext*
-// thru DynamicGroupArgs are passed back here..
-// pSidAttrArray - To allocate and return an array of (sids, attribute)
-// pairs to be added to the normal part of the client context.
-// pSidCount - Number of elements in pSidAttrArray
-// pRestrictedSidAttrArray - To allocate and return an array of (sids, attribute)
-// pairs to be added to the restricted part of the client context.
-// pRestrictedSidCount - Number of elements in pRestrictedSidAttrArray
-//
-// Note:
-// Memory returned thru both these array will be freed by the callback
-// free function defined by the resource manager.
-//
-// Returns
-// TRUE if the API succeeded.
-// FALSE on any intermediate errors (like failed memory allocation)
-// In case of failure, the caller must use SetLastError(ErrorValue).
-//
-
-type
- PFN_AUTHZ_COMPUTE_DYNAMIC_GROUPS = function(hAuthzClientContext: AUTHZ_CLIENT_CONTEXT_HANDLE;
- Args: PVOID; var pSidAttrArray: PSID_AND_ATTRIBUTES; var pSidCount: DWORD;
- var pRestrictedSidAttrArray: PSID_AND_ATTRIBUTES; var pRestrictedSidCount: DWORD): BOOL; stdcall;
- {$EXTERNALSYM PFN_AUTHZ_COMPUTE_DYNAMIC_GROUPS}
- PFnAuthzComputeDynamicGroups = PFN_AUTHZ_COMPUTE_DYNAMIC_GROUPS;
-
-//
-// Callback free function takes in
-// pSidAttrArray - To be freed. This has been allocated by the compute
-// dynamic groups function.
-//
-
- PFN_AUTHZ_FREE_DYNAMIC_GROUPS = procedure(pSidAttrArray: PSID_AND_ATTRIBUTES); stdcall;
- {$EXTERNALSYM PFN_AUTHZ_FREE_DYNAMIC_GROUPS}
- PFnAuthzFreeDynamicGroups = PFN_AUTHZ_FREE_DYNAMIC_GROUPS;
-
-//
-// Valid flags for AuthzAccessCheck
-//
-
-const
- AUTHZ_ACCESS_CHECK_NO_DEEP_COPY_SD = $00000001;
- {$EXTERNALSYM AUTHZ_ACCESS_CHECK_NO_DEEP_COPY_SD}
-
-function AuthzAccessCheck(Flags: DWORD; hAuthzClientContext: AUTHZ_CLIENT_CONTEXT_HANDLE; pRequest: PAUTHZ_ACCESS_REQUEST;
- hAuditEvent: AUTHZ_AUDIT_EVENT_HANDLE; pSecurityDescriptor: PSECURITY_DESCRIPTOR; OptionalSecurityDescriptorArray: PPSECURITY_DESCRIPTOR;
- OptionalSecurityDescriptorCount: DWORD; pReply: PAUTHZ_ACCESS_REPLY; phAccessCheckResultsOPTIONAL: PAUTHZ_ACCESS_CHECK_RESULTS_HANDLE): BOOL; stdcall;
-{$EXTERNALSYM AuthzAccessCheck}
-
-function AuthzCachedAccessCheck(Flags: DWORD; hAccessCheckResults: AUTHZ_ACCESS_CHECK_RESULTS_HANDLE; pRequest: PAUTHZ_ACCESS_REQUEST; hAuditEvent: AUTHZ_AUDIT_EVENT_HANDLE; pReply: PAUTHZ_ACCESS_REPLY): BOOL; stdcall;
-{$EXTERNALSYM AuthzCachedAccessCheck}
-
-function AuthzOpenObjectAudit(Flags: DWORD; hAuthzClientContext: AUTHZ_CLIENT_CONTEXT_HANDLE; pRequest: PAUTHZ_ACCESS_REQUEST; hAuditEvent: AUTHZ_AUDIT_EVENT_HANDLE; pSecurityDescriptor: PSECURITY_DESCRIPTOR; OptionalSecurityDescriptorArray: PPSECURITY_DESCRIPTOR; OptionalSecurityDescriptorCount: DWORD; pReply: PAUTHZ_ACCESS_REPLY): BOOL; stdcall;
-{$EXTERNALSYM AuthzOpenObjectAudit}
-
-function AuthzFreeHandle(hAccessCheckResults: AUTHZ_ACCESS_CHECK_RESULTS_HANDLE): BOOL; stdcall;
-{$EXTERNALSYM AuthzFreeHandle}
-
-//
-// Flags for AuthzInitializeResourceManager
-//
-
-const
- AUTHZ_RM_FLAG_NO_AUDIT = $1;
- {$EXTERNALSYM AUTHZ_RM_FLAG_NO_AUDIT}
-
- AUTHZ_RM_FLAG_INITIALIZE_UNDER_IMPERSONATION = $2;
- {$EXTERNALSYM AUTHZ_RM_FLAG_INITIALIZE_UNDER_IMPERSONATION}
-
- AUTHZ_VALID_RM_INIT_FLAGS = AUTHZ_RM_FLAG_NO_AUDIT or AUTHZ_RM_FLAG_INITIALIZE_UNDER_IMPERSONATION;
- {$EXTERNALSYM AUTHZ_VALID_RM_INIT_FLAGS}
-
-function AuthzInitializeResourceManager(Flags: DWORD; pfnDynamicAccessCheck: PFN_AUTHZ_DYNAMIC_ACCESS_CHECK; pfnComputeDynamicGroups: PFN_AUTHZ_COMPUTE_DYNAMIC_GROUPS; pfnFreeDynamicGroups: PFN_AUTHZ_FREE_DYNAMIC_GROUPS; szResourceManagerName: LPCWSTR; phAuthzResourceManager: PAUTHZ_RESOURCE_MANAGER_HANDLE): BOOL; stdcall;
-{$EXTERNALSYM AuthzInitializeResourceManager}
-
-function AuthzFreeResourceManager(hAuthzResourceManager: AUTHZ_RESOURCE_MANAGER_HANDLE): BOOL; stdcall;
-{$EXTERNALSYM AuthzFreeResourceManager}
-
-function AuthzInitializeContextFromToken(Flags: DWORD; TokenHandle: HANDLE; hAuthzResourceManager: AUTHZ_RESOURCE_MANAGER_HANDLE; pExpirationTime: PLARGE_INTEGER; Identifier: LUID; DynamicGroupArgs: PVOID; phAuthzClientContext: PAUTHZ_CLIENT_CONTEXT_HANDLE): BOOL; stdcall;
-{$EXTERNALSYM AuthzInitializeContextFromToken}
-
-function AuthzInitializeContextFromSid(Flags: DWORD; UserSid: PSID; hAuthzResourceManager: AUTHZ_RESOURCE_MANAGER_HANDLE; pExpirationTime: PLARGE_INTEGER; Identifier: LUID; DynamicGroupArgs: PVOID; phAuthzClientContext: PAUTHZ_CLIENT_CONTEXT_HANDLE): BOOL; stdcall;
-{$EXTERNALSYM AuthzInitializeContextFromSid}
-
-function AuthzInitializeContextFromAuthzContext(Flags: DWORD; hAuthzClientContext: AUTHZ_CLIENT_CONTEXT_HANDLE; pExpirationTime: PLARGE_INTEGER; Identifier: LUID; DynamicGroupArgs: PVOID; phNewAuthzClientContext: PAUTHZ_CLIENT_CONTEXT_HANDLE): BOOL; stdcall;
-{$EXTERNALSYM AuthzInitializeContextFromAuthzContext}
-
-function AuthzAddSidsToContext(hAuthzClientContext: AUTHZ_CLIENT_CONTEXT_HANDLE; Sids: PSID_AND_ATTRIBUTES; SidCount: DWORD; RestrictedSids: PSID_AND_ATTRIBUTES; RestrictedSidCount: DWORD; phNewAuthzClientContext: PAUTHZ_CLIENT_CONTEXT_HANDLE): BOOL; stdcall;
-{$EXTERNALSYM AuthzAddSidsToContext}
-
-//
-// Enumeration type to be used to specify the type of information to be
-// retrieved from an existing AuthzClientContext.
-//
-
-type
- _AUTHZ_CONTEXT_INFORMATION_CLASS = (
- AuthzContextInfo__0,
- AuthzContextInfoUserSid,
- AuthzContextInfoGroupsSids,
- AuthzContextInfoRestrictedSids,
- AuthzContextInfoPrivileges,
- AuthzContextInfoExpirationTime,
- AuthzContextInfoServerContext,
- AuthzContextInfoIdentifier,
- AuthzContextInfoSource,
- AuthzContextInfoAll,
- AuthzContextInfoAuthenticationId);
- {$EXTERNALSYM _AUTHZ_CONTEXT_INFORMATION_CLASS}
- AUTHZ_CONTEXT_INFORMATION_CLASS = _AUTHZ_CONTEXT_INFORMATION_CLASS;
- {$EXTERNALSYM AUTHZ_CONTEXT_INFORMATION_CLASS}
- TAuthzContextInformationClass = AUTHZ_CONTEXT_INFORMATION_CLASS;
-
-function AuthzGetInformationFromContext(hAuthzClientContext: AUTHZ_CLIENT_CONTEXT_HANDLE;
- InfoClass: AUTHZ_CONTEXT_INFORMATION_CLASS; BufferSize: DWORD; pSizeRequired: PDWORD;
- Buffer: PVOID): BOOL; stdcall;
-{$EXTERNALSYM AuthzGetInformationFromContext}
-
-function AuthzFreeContext(hAuthzClientContext: AUTHZ_CLIENT_CONTEXT_HANDLE): BOOL; stdcall;
-{$EXTERNALSYM AuthzFreeContext}
-
-//
-// Valid flags that may be used in AuthzInitializeObjectAccessAuditEvent().
-//
-
-const
- AUTHZ_NO_SUCCESS_AUDIT = $00000001;
- {$EXTERNALSYM AUTHZ_NO_SUCCESS_AUDIT}
- AUTHZ_NO_FAILURE_AUDIT = $00000002;
- {$EXTERNALSYM AUTHZ_NO_FAILURE_AUDIT}
- AUTHZ_NO_ALLOC_STRINGS = $00000004;
- {$EXTERNALSYM AUTHZ_NO_ALLOC_STRINGS}
-
- AUTHZ_VALID_OBJECT_ACCESS_AUDIT_FLAGS = AUTHZ_NO_SUCCESS_AUDIT or AUTHZ_NO_FAILURE_AUDIT or AUTHZ_NO_ALLOC_STRINGS;
- {$EXTERNALSYM AUTHZ_VALID_OBJECT_ACCESS_AUDIT_FLAGS}
-
-function AuthzInitializeObjectAccessAuditEvent(Flags: DWORD; hAuditEventType: AUTHZ_AUDIT_EVENT_TYPE_HANDLE;
- szOperationType: PWSTR; szObjectType: PWSTR; szObjectName: PWSTR; szAdditionalInfo: PWSTR;
- phAuditEvent: PAUTHZ_AUDIT_EVENT_HANDLE; dwAdditionalParameterCount: DWORD {, ...}): BOOL; stdcall;
-{$EXTERNALSYM AuthzInitializeObjectAccessAuditEvent}
-
-function AuthzInitializeObjectAccessAuditEvent2(Flags: DWORD; hAuditEventType: AUTHZ_AUDIT_EVENT_TYPE_HANDLE;
- szOperationType: PWSTR; szObjectType: PWSTR; szObjectName: PWSTR; szAdditionalInfo, szAdditionalInfo2: PWSTR;
- phAuditEvent: PAUTHZ_AUDIT_EVENT_HANDLE; dwAdditionalParameterCount: DWORD {, ...}): BOOL; stdcall;
-{$EXTERNALSYM AuthzInitializeObjectAccessAuditEvent2}
-
-//
-// Enumeration type to be used to specify the type of information to be
-// retrieved from an existing AUTHZ_AUDIT_EVENT_HANDLE.
-//
-
-type
- _AUTHZ_AUDIT_EVENT_INFORMATION_CLASS = (
- AuthzAuditEvent__0,
- AuthzAuditEventInfoFlags,
- AuthzAuditEventInfoOperationType,
- AuthzAuditEventInfoObjectType,
- AuthzAuditEventInfoObjectName,
- AuthzAuditEventInfoAdditionalInfo);
- {$EXTERNALSYM _AUTHZ_AUDIT_EVENT_INFORMATION_CLASS}
- AUTHZ_AUDIT_EVENT_INFORMATION_CLASS = _AUTHZ_AUDIT_EVENT_INFORMATION_CLASS;
- {$EXTERNALSYM AUTHZ_AUDIT_EVENT_INFORMATION_CLASS}
- AuthzAuditEventInformationClass = AUTHZ_AUDIT_EVENT_INFORMATION_CLASS;
-
-// todo this one seems not to be exported from authz.dll
-
-function AuthzGetInformationFromAuditEvent(hAuditEvent: AUTHZ_AUDIT_EVENT_HANDLE; InfoClass: AUTHZ_AUDIT_EVENT_INFORMATION_CLASS; BufferSize: DWORD; pSizeRequired: PDWORD; Buffer: PVOID): BOOL; stdcall;
-{$EXTERNALSYM AuthzGetInformationFromAuditEvent}
-
-function AuthzFreeAuditEvent(hAuditEvent: AUTHZ_AUDIT_EVENT_HANDLE): BOOL; stdcall;
-{$EXTERNALSYM AuthzFreeAuditEvent}
-
-(* TODO
-//
-// Support for generic auditing.
-//
-
-typedef struct _AUTHZ_REGISTRATION_OBJECT_TYPE_NAME_OFFSET
-{
- PWSTR szObjectTypeName;
- DWORD dwOffset;
-} AUTHZ_REGISTRATION_OBJECT_TYPE_NAME_OFFSET, *PAUTHZ_REGISTRATION_OBJECT_TYPE_NAME_OFFSET;
-
-typedef struct _AUTHZ_SOURCE_SCHEMA_REGISTRATION
-{
- DWORD dwFlags;
- PWSTR szEventSourceName;
- PWSTR szEventMessageFile;
- PWSTR szEventSourceXmlSchemaFile;
- PWSTR szEventAccessStringsFile;
- PWSTR szExecutableImagePath;
- PVOID pReserved;
- DWORD dwObjectTypeNameCount;
- AUTHZ_REGISTRATION_OBJECT_TYPE_NAME_OFFSET ObjectTypeNames[ANYSIZE_ARRAY];
-} AUTHZ_SOURCE_SCHEMA_REGISTRATION, *PAUTHZ_SOURCE_SCHEMA_REGISTRATION;
-
-#define AUTHZ_FLAG_ALLOW_MULTIPLE_SOURCE_INSTANCES 0x1
-
-AUTHZAPI
-BOOL
-WINAPI
-AuthzInstallSecurityEventSource(
- IN DWORD dwFlags,
- IN PAUTHZ_SOURCE_SCHEMA_REGISTRATION pRegistration
- );
-
-AUTHZAPI
-BOOL
-WINAPI
-AuthzUninstallSecurityEventSource(
- IN DWORD dwFlags,
- IN PCWSTR szEventSourceName
- );
-
-AUTHZAPI
-BOOL
-WINAPI
-AuthzEnumerateSecurityEventSources(
- IN DWORD dwFlags,
- OUT PAUTHZ_SOURCE_SCHEMA_REGISTRATION Buffer,
- OUT PDWORD pdwCount,
- IN OUT PDWORD pdwLength
- );
-
-AUTHZAPI
-BOOL
-WINAPI
-AuthzRegisterSecurityEventSource(
- IN DWORD dwFlags,
- IN PCWSTR szEventSourceName,
- OUT PAUTHZ_SECURITY_EVENT_PROVIDER_HANDLE phEventProvider
- );
-
-AUTHZAPI
-BOOL
-WINAPI
-AuthzUnregisterSecurityEventSource(
- IN DWORD dwFlags,
- IN OUT PAUTHZ_SECURITY_EVENT_PROVIDER_HANDLE phEventProvider
- );
-
-AUTHZAPI
-BOOL
-WINAPI
-AuthzReportSecurityEvent(
- IN DWORD dwFlags,
- IN OUT AUTHZ_SECURITY_EVENT_PROVIDER_HANDLE hEventProvider,
- IN DWORD dwAuditId,
- IN PSID pUserSid OPTIONAL,
- IN DWORD dwCount,
- ...
- );
-
-AUTHZAPI
-BOOL
-WINAPI
-AuthzReportSecurityEventFromParams(
- IN DWORD dwFlags,
- IN OUT AUTHZ_SECURITY_EVENT_PROVIDER_HANDLE hEventProvider,
- IN DWORD dwAuditId,
- IN PSID pUserSid OPTIONAL,
- IN PAUDIT_PARAMS pParams
- );
-*)
-
-implementation
-
-const
- authzlib = 'authz.dll';
-
-{$IFDEF DYNAMIC_LINK}
-
-var
- _AuthzAccessCheck: Pointer;
-
-function AuthzAccessCheck;
-begin
- GetProcedureAddress(_AuthzAccessCheck, authzlib, 'AuthzAccessCheck');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_AuthzAccessCheck]
- end;
-end;
-
-var
- _AuthzCachedAccessCheck: Pointer;
-
-function AuthzCachedAccessCheck;
-begin
- GetProcedureAddress(_AuthzCachedAccessCheck, authzlib, 'AuthzCachedAccessCheck');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_AuthzCachedAccessCheck]
- end;
-end;
-
-var
- _AuthzOpenObjectAudit: Pointer;
-
-function AuthzOpenObjectAudit;
-begin
- GetProcedureAddress(_AuthzOpenObjectAudit, authzlib, 'AuthzOpenObjectAudit');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_AuthzOpenObjectAudit]
- end;
-end;
-
-var
- _AuthzFreeHandle: Pointer;
-
-function AuthzFreeHandle;
-begin
- GetProcedureAddress(_AuthzFreeHandle, authzlib, 'AuthzFreeHandle');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_AuthzFreeHandle]
- end;
-end;
-
-var
- _AuthzInitializeResourceManager: Pointer;
-
-function AuthzInitializeResourceManager;
-begin
- GetProcedureAddress(_AuthzInitializeResourceManager, authzlib, 'AuthzInitializeResourceManager');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_AuthzInitializeResourceManager]
- end;
-end;
-
-var
- _AuthzFreeResourceManager: Pointer;
-
-function AuthzFreeResourceManager;
-begin
- GetProcedureAddress(_AuthzFreeResourceManager, authzlib, 'AuthzFreeResourceManager');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_AuthzFreeResourceManager]
- end;
-end;
-
-var
- _AuthzInitializeContextFromToken: Pointer;
-
-function AuthzInitializeContextFromToken;
-begin
- GetProcedureAddress(_AuthzInitializeContextFromToken, authzlib, 'AuthzInitializeContextFromToken');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_AuthzInitializeContextFromToken]
- end;
-end;
-
-var
- _AuthzInitializeContextFromSid: Pointer;
-
-function AuthzInitializeContextFromSid;
-begin
- GetProcedureAddress(_AuthzInitializeContextFromSid, authzlib, 'AuthzInitializeContextFromSid');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_AuthzInitializeContextFromSid]
- end;
-end;
-
-var
- _AuthzInitCxtFromAuthzCxt: Pointer;
-
-function AuthzInitializeContextFromAuthzContext;
-begin
- GetProcedureAddress(_AuthzInitCxtFromAuthzCxt, authzlib, 'AuthzInitializeContextFromAuthzContext');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_AuthzInitCxtFromAuthzCxt]
- end;
-end;
-
-var
- _AuthzAddSidsToContext: Pointer;
-
-function AuthzAddSidsToContext;
-begin
- GetProcedureAddress(_AuthzAddSidsToContext, authzlib, 'AuthzAddSidsToContext');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_AuthzAddSidsToContext]
- end;
-end;
-
-var
- _AuthzGetInformationFromContext: Pointer;
-
-function AuthzGetInformationFromContext;
-begin
- GetProcedureAddress(_AuthzGetInformationFromContext, authzlib, 'AuthzGetInformationFromContext');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_AuthzGetInformationFromContext]
- end;
-end;
-
-var
- _AuthzFreeContext: Pointer;
-
-function AuthzFreeContext;
-begin
- GetProcedureAddress(_AuthzFreeContext, authzlib, 'AuthzFreeContext');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_AuthzFreeContext]
- end;
-end;
-
-var
- _AuthzInitObjAccAuditEvent: Pointer;
-
-function AuthzInitializeObjectAccessAuditEvent;
-begin
- GetProcedureAddress(_AuthzInitObjAccAuditEvent, authzlib, 'AuthzInitializeObjectAccessAuditEvent');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_AuthzInitObjAccAuditEvent]
- end;
-end;
-
-var
- _AuthzInitObjAccAuditEvent2: Pointer;
-
-function AuthzInitializeObjectAccessAuditEvent2;
-begin
- GetProcedureAddress(_AuthzInitObjAccAuditEvent2, authzlib, 'AuthzInitializeObjectAccessAuditEvent2');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_AuthzInitObjAccAuditEvent2]
- end;
-end;
-
-var
- _AuthzGetInfoFromAuditEvent: Pointer;
-
-function AuthzGetInformationFromAuditEvent;
-begin
- GetProcedureAddress(_AuthzGetInfoFromAuditEvent, authzlib, 'AuthzGetInformationFromAuditEvent');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_AuthzGetInfoFromAuditEvent]
- end;
-end;
-
-var
- _AuthzFreeAuditEvent: Pointer;
-
-function AuthzFreeAuditEvent;
-begin
- GetProcedureAddress(_AuthzFreeAuditEvent, authzlib, 'AuthzFreeAuditEvent');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_AuthzFreeAuditEvent]
- end;
-end;
-
-{$ELSE}
-
-function AuthzAccessCheck; external authzlib name 'AuthzAccessCheck';
-function AuthzCachedAccessCheck; external authzlib name 'AuthzCachedAccessCheck';
-function AuthzOpenObjectAudit; external authzlib name 'AuthzOpenObjectAudit';
-function AuthzFreeHandle; external authzlib name 'AuthzFreeHandle';
-function AuthzInitializeResourceManager; external authzlib name 'AuthzInitializeResourceManager';
-function AuthzFreeResourceManager; external authzlib name 'AuthzFreeResourceManager';
-function AuthzInitializeContextFromToken; external authzlib name 'AuthzInitializeContextFromToken';
-function AuthzInitializeContextFromSid; external authzlib name 'AuthzInitializeContextFromSid';
-function AuthzInitializeContextFromAuthzContext; external authzlib name 'AuthzInitializeContextFromAuthzContext';
-function AuthzAddSidsToContext; external authzlib name 'AuthzAddSidsToContext';
-function AuthzGetInformationFromContext; external authzlib name 'AuthzGetInformationFromContext';
-function AuthzFreeContext; external authzlib name 'AuthzFreeContext';
-function AuthzInitializeObjectAccessAuditEvent; external authzlib name 'AuthzInitializeObjectAccessAuditEvent';
-function AuthzInitializeObjectAccessAuditEvent2; external authzlib name 'AuthzInitializeObjectAccessAuditEvent2';
-function AuthzGetInformationFromAuditEvent; external authzlib name 'AuthzGetInformationFromAuditEvent';
-function AuthzFreeAuditEvent; external authzlib name 'AuthzFreeAuditEvent';
-
-{$ENDIF DYNAMIC_LINK}
-
-end.
+{******************************************************************************}
+{ }
+{ Authorization Framework API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: authz.h, released August 2001. The original Pascal }
+{ code is: Authz.pas, released October 2001. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwaauthz.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaAuthz;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "authz.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaWinNT, JwaWinType;
+
+//
+// Flags which may be used at the time of client context creation using a sid.
+//
+
+const
+ AUTHZ_SKIP_TOKEN_GROUPS = $2;
+ {$EXTERNALSYM AUTHZ_SKIP_TOKEN_GROUPS}
+ AUTHZ_REQUIRE_S4U_LOGON = $4;
+ {$EXTERNALSYM AUTHZ_REQUIRE_S4U_LOGON}
+
+type
+ AUTHZ_ACCESS_CHECK_RESULTS_HANDLE = HANDLE;
+ {$EXTERNALSYM AUTHZ_ACCESS_CHECK_RESULTS_HANDLE}
+ AUTHZ_CLIENT_CONTEXT_HANDLE = HANDLE;
+ {$EXTERNALSYM AUTHZ_CLIENT_CONTEXT_HANDLE}
+ AUTHZ_RESOURCE_MANAGER_HANDLE = HANDLE;
+ {$EXTERNALSYM AUTHZ_RESOURCE_MANAGER_HANDLE}
+ AUTHZ_AUDIT_EVENT_HANDLE = HANDLE;
+ {$EXTERNALSYM AUTHZ_AUDIT_EVENT_HANDLE}
+ AUTHZ_AUDIT_EVENT_TYPE_HANDLE = HANDLE;
+ {$EXTERNALSYM AUTHZ_AUDIT_EVENT_TYPE_HANDLE}
+ AUTHZ_SECURITY_EVENT_PROVIDER_HANDLE = HANDLE;
+ {$EXTERNALSYM AUTHZ_SECURITY_EVENT_PROVIDER_HANDLE}
+
+ PAUTHZ_ACCESS_CHECK_RESULTS_HANDLE = ^AUTHZ_ACCESS_CHECK_RESULTS_HANDLE;
+ {$EXTERNALSYM PAUTHZ_ACCESS_CHECK_RESULTS_HANDLE}
+ PAUTHZ_CLIENT_CONTEXT_HANDLE = ^AUTHZ_CLIENT_CONTEXT_HANDLE;
+ {$EXTERNALSYM PAUTHZ_CLIENT_CONTEXT_HANDLE}
+ PAUTHZ_RESOURCE_MANAGER_HANDLE = ^AUTHZ_RESOURCE_MANAGER_HANDLE;
+ {$EXTERNALSYM PAUTHZ_RESOURCE_MANAGER_HANDLE}
+ PAUTHZ_AUDIT_EVENT_HANDLE = ^AUTHZ_AUDIT_EVENT_HANDLE;
+ {$EXTERNALSYM PAUTHZ_AUDIT_EVENT_HANDLE}
+ PAUTHZ_AUDIT_EVENT_TYPE_HANDLE = ^AUTHZ_AUDIT_EVENT_TYPE_HANDLE;
+ {$EXTERNALSYM PAUTHZ_AUDIT_EVENT_TYPE_HANDLE}
+ PAUTHZ_SECURITY_EVENT_PROVIDER_HANDLE = ^AUTHZ_SECURITY_EVENT_PROVIDER_HANDLE;
+ {$EXTERNALSYM PAUTHZ_SECURITY_EVENT_PROVIDER_HANDLE}
+
+//
+// Structure defining the access check request.
+//
+
+ PAUTHZ_ACCESS_REQUEST = ^AUTHZ_ACCESS_REQUEST;
+ {$EXTERNALSYM PAUTHZ_ACCESS_REQUEST}
+ _AUTHZ_ACCESS_REQUEST = record
+ DesiredAccess: ACCESS_MASK;
+ //
+ // To replace the principal self sid in the acl.
+ //
+ PrincipalSelfSid: PSID;
+ //
+ // Object type list represented by an array of (level, guid) pair and the
+ // number of elements in the array. This is a post-fix representation of the
+ // object tree.
+ // These fields should be set to NULL and 0 respectively except when per
+ // property access is desired.
+ //
+ ObjectTypeList: POBJECT_TYPE_LIST;
+ ObjectTypeListLength: DWORD;
+ //
+ // To support completely business rules based access. This will be passed as
+ // input to the callback access check function. Access check algorithm does
+ // not interpret these.
+ //
+ OptionalArguments: PVOID;
+ end;
+ {$EXTERNALSYM _AUTHZ_ACCESS_REQUEST}
+ AUTHZ_ACCESS_REQUEST = _AUTHZ_ACCESS_REQUEST;
+ {$EXTERNALSYM AUTHZ_ACCESS_REQUEST}
+ TAuthzAccessRequest = AUTHZ_ACCESS_REQUEST;
+ PAuthzAccessRequest = PAUTHZ_ACCESS_REQUEST;
+
+//
+// Structure to return the results of the access check call.
+//
+
+const
+ AUTHZ_GENERATE_SUCCESS_AUDIT = $1;
+ {$EXTERNALSYM AUTHZ_GENERATE_SUCCESS_AUDIT}
+ AUTHZ_GENERATE_FAILURE_AUDIT = $2;
+ {$EXTERNALSYM AUTHZ_GENERATE_FAILURE_AUDIT}
+
+type
+ PAUTHZ_ACCESS_REPLY = ^AUTHZ_ACCESS_REPLY;
+ {$EXTERNALSYM PAUTHZ_ACCESS_REPLY}
+ _AUTHZ_ACCESS_REPLY = record
+ //
+ // The length of the array representing the object type list structure. If
+ // no object type is used to represent the object, then the length must be
+ // set to 1.
+ //
+ // Note: This parameter must be filled!
+ //
+ ResultListLength: DWORD;
+ //
+ // Array of granted access masks. This memory is allocated by the RM. Access
+ // check routines just fill in the values.
+ //
+ GrantedAccessMask: PACCESS_MASK;
+ //
+ // Array of SACL evaluation results. This memory is allocated by the RM, if SACL
+ // evaluation results are desired. Access check routines just fill in the values.
+ // Sacl evaluation will only be performed if auditing is requested.
+ //
+ SaclEvaluationResults: PDWORD;
+ //
+ // Array of results for each element of the array. This memory is allocated
+ // by the RM. Access check routines just fill in the values.
+ //
+ Error: PDWORD;
+ end;
+ {$EXTERNALSYM _AUTHZ_ACCESS_REPLY}
+ AUTHZ_ACCESS_REPLY = _AUTHZ_ACCESS_REPLY;
+ {$EXTERNALSYM AUTHZ_ACCESS_REPLY}
+ TAuthzAccessReply = AUTHZ_ACCESS_REPLY;
+ PAuthzAccessReply = PAUTHZ_ACCESS_REPLY;
+
+//
+// Typedefs for callback functions to be provided by the resource manager.
+//
+
+//
+// Callback access check function takes in
+// AuthzClientContext - a client context
+// pAce - pointer to a callback ace
+// pArgs - Optional arguments that were passed to AuthzAccessCheck thru
+// AuthzAccessRequest->OptionalArguments are passed back here.
+// pbAceApplicable - The resource manager must supply whether the ace should
+// be used in the computation of access evaluation
+//
+// Returns
+// TRUE if the API succeeded.
+// FALSE on any intermediate errors (like failed memory allocation)
+// In case of failure, the caller must use SetLastError(ErrorValue).
+//
+
+type
+ PFN_AUTHZ_DYNAMIC_ACCESS_CHECK = function(hAuthzClientContext: AUTHZ_CLIENT_CONTEXT_HANDLE;
+ pAce: PACE_HEADER; pArgs: PVOID; var pbAceApplicable: BOOL): BOOL; stdcall;
+ {$EXTERNALSYM PFN_AUTHZ_DYNAMIC_ACCESS_CHECK}
+ PFnAuthzDynamicAccessCheck = PFN_AUTHZ_DYNAMIC_ACCESS_CHECK;
+
+//
+// Callback compute dynamic groups function takes in
+// AuthzClientContext - a client context
+// pArgs - Optional arguments that supplied to AuthzInitializeClientContext*
+// thru DynamicGroupArgs are passed back here..
+// pSidAttrArray - To allocate and return an array of (sids, attribute)
+// pairs to be added to the normal part of the client context.
+// pSidCount - Number of elements in pSidAttrArray
+// pRestrictedSidAttrArray - To allocate and return an array of (sids, attribute)
+// pairs to be added to the restricted part of the client context.
+// pRestrictedSidCount - Number of elements in pRestrictedSidAttrArray
+//
+// Note:
+// Memory returned thru both these array will be freed by the callback
+// free function defined by the resource manager.
+//
+// Returns
+// TRUE if the API succeeded.
+// FALSE on any intermediate errors (like failed memory allocation)
+// In case of failure, the caller must use SetLastError(ErrorValue).
+//
+
+type
+ PFN_AUTHZ_COMPUTE_DYNAMIC_GROUPS = function(hAuthzClientContext: AUTHZ_CLIENT_CONTEXT_HANDLE;
+ Args: PVOID; var pSidAttrArray: PSID_AND_ATTRIBUTES; var pSidCount: DWORD;
+ var pRestrictedSidAttrArray: PSID_AND_ATTRIBUTES; var pRestrictedSidCount: DWORD): BOOL; stdcall;
+ {$EXTERNALSYM PFN_AUTHZ_COMPUTE_DYNAMIC_GROUPS}
+ PFnAuthzComputeDynamicGroups = PFN_AUTHZ_COMPUTE_DYNAMIC_GROUPS;
+
+//
+// Callback free function takes in
+// pSidAttrArray - To be freed. This has been allocated by the compute
+// dynamic groups function.
+//
+
+ PFN_AUTHZ_FREE_DYNAMIC_GROUPS = procedure(pSidAttrArray: PSID_AND_ATTRIBUTES); stdcall;
+ {$EXTERNALSYM PFN_AUTHZ_FREE_DYNAMIC_GROUPS}
+ PFnAuthzFreeDynamicGroups = PFN_AUTHZ_FREE_DYNAMIC_GROUPS;
+
+//
+// Valid flags for AuthzAccessCheck
+//
+
+const
+ AUTHZ_ACCESS_CHECK_NO_DEEP_COPY_SD = $00000001;
+ {$EXTERNALSYM AUTHZ_ACCESS_CHECK_NO_DEEP_COPY_SD}
+
+function AuthzAccessCheck(Flags: DWORD; hAuthzClientContext: AUTHZ_CLIENT_CONTEXT_HANDLE; pRequest: PAUTHZ_ACCESS_REQUEST;
+ hAuditEvent: AUTHZ_AUDIT_EVENT_HANDLE; pSecurityDescriptor: PSECURITY_DESCRIPTOR; OptionalSecurityDescriptorArray: PPSECURITY_DESCRIPTOR;
+ OptionalSecurityDescriptorCount: DWORD; pReply: PAUTHZ_ACCESS_REPLY; phAccessCheckResultsOPTIONAL: PAUTHZ_ACCESS_CHECK_RESULTS_HANDLE): BOOL; stdcall;
+{$EXTERNALSYM AuthzAccessCheck}
+
+function AuthzCachedAccessCheck(Flags: DWORD; hAccessCheckResults: AUTHZ_ACCESS_CHECK_RESULTS_HANDLE; pRequest: PAUTHZ_ACCESS_REQUEST; hAuditEvent: AUTHZ_AUDIT_EVENT_HANDLE; pReply: PAUTHZ_ACCESS_REPLY): BOOL; stdcall;
+{$EXTERNALSYM AuthzCachedAccessCheck}
+
+function AuthzOpenObjectAudit(Flags: DWORD; hAuthzClientContext: AUTHZ_CLIENT_CONTEXT_HANDLE; pRequest: PAUTHZ_ACCESS_REQUEST; hAuditEvent: AUTHZ_AUDIT_EVENT_HANDLE; pSecurityDescriptor: PSECURITY_DESCRIPTOR; OptionalSecurityDescriptorArray: PPSECURITY_DESCRIPTOR; OptionalSecurityDescriptorCount: DWORD; pReply: PAUTHZ_ACCESS_REPLY): BOOL; stdcall;
+{$EXTERNALSYM AuthzOpenObjectAudit}
+
+function AuthzFreeHandle(hAccessCheckResults: AUTHZ_ACCESS_CHECK_RESULTS_HANDLE): BOOL; stdcall;
+{$EXTERNALSYM AuthzFreeHandle}
+
+//
+// Flags for AuthzInitializeResourceManager
+//
+
+const
+ AUTHZ_RM_FLAG_NO_AUDIT = $1;
+ {$EXTERNALSYM AUTHZ_RM_FLAG_NO_AUDIT}
+
+ AUTHZ_RM_FLAG_INITIALIZE_UNDER_IMPERSONATION = $2;
+ {$EXTERNALSYM AUTHZ_RM_FLAG_INITIALIZE_UNDER_IMPERSONATION}
+
+ AUTHZ_VALID_RM_INIT_FLAGS = AUTHZ_RM_FLAG_NO_AUDIT or AUTHZ_RM_FLAG_INITIALIZE_UNDER_IMPERSONATION;
+ {$EXTERNALSYM AUTHZ_VALID_RM_INIT_FLAGS}
+
+function AuthzInitializeResourceManager(Flags: DWORD; pfnDynamicAccessCheck: PFN_AUTHZ_DYNAMIC_ACCESS_CHECK; pfnComputeDynamicGroups: PFN_AUTHZ_COMPUTE_DYNAMIC_GROUPS; pfnFreeDynamicGroups: PFN_AUTHZ_FREE_DYNAMIC_GROUPS; szResourceManagerName: LPCWSTR; phAuthzResourceManager: PAUTHZ_RESOURCE_MANAGER_HANDLE): BOOL; stdcall;
+{$EXTERNALSYM AuthzInitializeResourceManager}
+
+function AuthzFreeResourceManager(hAuthzResourceManager: AUTHZ_RESOURCE_MANAGER_HANDLE): BOOL; stdcall;
+{$EXTERNALSYM AuthzFreeResourceManager}
+
+function AuthzInitializeContextFromToken(Flags: DWORD; TokenHandle: HANDLE; hAuthzResourceManager: AUTHZ_RESOURCE_MANAGER_HANDLE; pExpirationTime: PLARGE_INTEGER; Identifier: LUID; DynamicGroupArgs: PVOID; phAuthzClientContext: PAUTHZ_CLIENT_CONTEXT_HANDLE): BOOL; stdcall;
+{$EXTERNALSYM AuthzInitializeContextFromToken}
+
+function AuthzInitializeContextFromSid(Flags: DWORD; UserSid: PSID; hAuthzResourceManager: AUTHZ_RESOURCE_MANAGER_HANDLE; pExpirationTime: PLARGE_INTEGER; Identifier: LUID; DynamicGroupArgs: PVOID; phAuthzClientContext: PAUTHZ_CLIENT_CONTEXT_HANDLE): BOOL; stdcall;
+{$EXTERNALSYM AuthzInitializeContextFromSid}
+
+function AuthzInitializeContextFromAuthzContext(Flags: DWORD; hAuthzClientContext: AUTHZ_CLIENT_CONTEXT_HANDLE; pExpirationTime: PLARGE_INTEGER; Identifier: LUID; DynamicGroupArgs: PVOID; phNewAuthzClientContext: PAUTHZ_CLIENT_CONTEXT_HANDLE): BOOL; stdcall;
+{$EXTERNALSYM AuthzInitializeContextFromAuthzContext}
+
+function AuthzAddSidsToContext(hAuthzClientContext: AUTHZ_CLIENT_CONTEXT_HANDLE; Sids: PSID_AND_ATTRIBUTES; SidCount: DWORD; RestrictedSids: PSID_AND_ATTRIBUTES; RestrictedSidCount: DWORD; phNewAuthzClientContext: PAUTHZ_CLIENT_CONTEXT_HANDLE): BOOL; stdcall;
+{$EXTERNALSYM AuthzAddSidsToContext}
+
+//
+// Enumeration type to be used to specify the type of information to be
+// retrieved from an existing AuthzClientContext.
+//
+
+type
+ _AUTHZ_CONTEXT_INFORMATION_CLASS = (
+ AuthzContextInfo__0,
+ AuthzContextInfoUserSid,
+ AuthzContextInfoGroupsSids,
+ AuthzContextInfoRestrictedSids,
+ AuthzContextInfoPrivileges,
+ AuthzContextInfoExpirationTime,
+ AuthzContextInfoServerContext,
+ AuthzContextInfoIdentifier,
+ AuthzContextInfoSource,
+ AuthzContextInfoAll,
+ AuthzContextInfoAuthenticationId);
+ {$EXTERNALSYM _AUTHZ_CONTEXT_INFORMATION_CLASS}
+ AUTHZ_CONTEXT_INFORMATION_CLASS = _AUTHZ_CONTEXT_INFORMATION_CLASS;
+ {$EXTERNALSYM AUTHZ_CONTEXT_INFORMATION_CLASS}
+ TAuthzContextInformationClass = AUTHZ_CONTEXT_INFORMATION_CLASS;
+
+function AuthzGetInformationFromContext(hAuthzClientContext: AUTHZ_CLIENT_CONTEXT_HANDLE;
+ InfoClass: AUTHZ_CONTEXT_INFORMATION_CLASS; BufferSize: DWORD; pSizeRequired: PDWORD;
+ Buffer: PVOID): BOOL; stdcall;
+{$EXTERNALSYM AuthzGetInformationFromContext}
+
+function AuthzFreeContext(hAuthzClientContext: AUTHZ_CLIENT_CONTEXT_HANDLE): BOOL; stdcall;
+{$EXTERNALSYM AuthzFreeContext}
+
+//
+// Valid flags that may be used in AuthzInitializeObjectAccessAuditEvent().
+//
+
+const
+ AUTHZ_NO_SUCCESS_AUDIT = $00000001;
+ {$EXTERNALSYM AUTHZ_NO_SUCCESS_AUDIT}
+ AUTHZ_NO_FAILURE_AUDIT = $00000002;
+ {$EXTERNALSYM AUTHZ_NO_FAILURE_AUDIT}
+ AUTHZ_NO_ALLOC_STRINGS = $00000004;
+ {$EXTERNALSYM AUTHZ_NO_ALLOC_STRINGS}
+
+ AUTHZ_VALID_OBJECT_ACCESS_AUDIT_FLAGS = AUTHZ_NO_SUCCESS_AUDIT or AUTHZ_NO_FAILURE_AUDIT or AUTHZ_NO_ALLOC_STRINGS;
+ {$EXTERNALSYM AUTHZ_VALID_OBJECT_ACCESS_AUDIT_FLAGS}
+
+function AuthzInitializeObjectAccessAuditEvent(Flags: DWORD; hAuditEventType: AUTHZ_AUDIT_EVENT_TYPE_HANDLE;
+ szOperationType: PWSTR; szObjectType: PWSTR; szObjectName: PWSTR; szAdditionalInfo: PWSTR;
+ phAuditEvent: PAUTHZ_AUDIT_EVENT_HANDLE; dwAdditionalParameterCount: DWORD {, ...}): BOOL; stdcall;
+{$EXTERNALSYM AuthzInitializeObjectAccessAuditEvent}
+
+function AuthzInitializeObjectAccessAuditEvent2(Flags: DWORD; hAuditEventType: AUTHZ_AUDIT_EVENT_TYPE_HANDLE;
+ szOperationType: PWSTR; szObjectType: PWSTR; szObjectName: PWSTR; szAdditionalInfo, szAdditionalInfo2: PWSTR;
+ phAuditEvent: PAUTHZ_AUDIT_EVENT_HANDLE; dwAdditionalParameterCount: DWORD {, ...}): BOOL; stdcall;
+{$EXTERNALSYM AuthzInitializeObjectAccessAuditEvent2}
+
+//
+// Enumeration type to be used to specify the type of information to be
+// retrieved from an existing AUTHZ_AUDIT_EVENT_HANDLE.
+//
+
+type
+ _AUTHZ_AUDIT_EVENT_INFORMATION_CLASS = (
+ AuthzAuditEvent__0,
+ AuthzAuditEventInfoFlags,
+ AuthzAuditEventInfoOperationType,
+ AuthzAuditEventInfoObjectType,
+ AuthzAuditEventInfoObjectName,
+ AuthzAuditEventInfoAdditionalInfo);
+ {$EXTERNALSYM _AUTHZ_AUDIT_EVENT_INFORMATION_CLASS}
+ AUTHZ_AUDIT_EVENT_INFORMATION_CLASS = _AUTHZ_AUDIT_EVENT_INFORMATION_CLASS;
+ {$EXTERNALSYM AUTHZ_AUDIT_EVENT_INFORMATION_CLASS}
+ AuthzAuditEventInformationClass = AUTHZ_AUDIT_EVENT_INFORMATION_CLASS;
+
+// todo this one seems not to be exported from authz.dll
+
+function AuthzGetInformationFromAuditEvent(hAuditEvent: AUTHZ_AUDIT_EVENT_HANDLE; InfoClass: AUTHZ_AUDIT_EVENT_INFORMATION_CLASS; BufferSize: DWORD; pSizeRequired: PDWORD; Buffer: PVOID): BOOL; stdcall;
+{$EXTERNALSYM AuthzGetInformationFromAuditEvent}
+
+function AuthzFreeAuditEvent(hAuditEvent: AUTHZ_AUDIT_EVENT_HANDLE): BOOL; stdcall;
+{$EXTERNALSYM AuthzFreeAuditEvent}
+
+(* TODO
+//
+// Support for generic auditing.
+//
+
+typedef struct _AUTHZ_REGISTRATION_OBJECT_TYPE_NAME_OFFSET
+{
+ PWSTR szObjectTypeName;
+ DWORD dwOffset;
+} AUTHZ_REGISTRATION_OBJECT_TYPE_NAME_OFFSET, *PAUTHZ_REGISTRATION_OBJECT_TYPE_NAME_OFFSET;
+
+typedef struct _AUTHZ_SOURCE_SCHEMA_REGISTRATION
+{
+ DWORD dwFlags;
+ PWSTR szEventSourceName;
+ PWSTR szEventMessageFile;
+ PWSTR szEventSourceXmlSchemaFile;
+ PWSTR szEventAccessStringsFile;
+ PWSTR szExecutableImagePath;
+ PVOID pReserved;
+ DWORD dwObjectTypeNameCount;
+ AUTHZ_REGISTRATION_OBJECT_TYPE_NAME_OFFSET ObjectTypeNames[ANYSIZE_ARRAY];
+} AUTHZ_SOURCE_SCHEMA_REGISTRATION, *PAUTHZ_SOURCE_SCHEMA_REGISTRATION;
+
+#define AUTHZ_FLAG_ALLOW_MULTIPLE_SOURCE_INSTANCES 0x1
+
+AUTHZAPI
+BOOL
+WINAPI
+AuthzInstallSecurityEventSource(
+ IN DWORD dwFlags,
+ IN PAUTHZ_SOURCE_SCHEMA_REGISTRATION pRegistration
+ );
+
+AUTHZAPI
+BOOL
+WINAPI
+AuthzUninstallSecurityEventSource(
+ IN DWORD dwFlags,
+ IN PCWSTR szEventSourceName
+ );
+
+AUTHZAPI
+BOOL
+WINAPI
+AuthzEnumerateSecurityEventSources(
+ IN DWORD dwFlags,
+ OUT PAUTHZ_SOURCE_SCHEMA_REGISTRATION Buffer,
+ OUT PDWORD pdwCount,
+ IN OUT PDWORD pdwLength
+ );
+
+AUTHZAPI
+BOOL
+WINAPI
+AuthzRegisterSecurityEventSource(
+ IN DWORD dwFlags,
+ IN PCWSTR szEventSourceName,
+ OUT PAUTHZ_SECURITY_EVENT_PROVIDER_HANDLE phEventProvider
+ );
+
+AUTHZAPI
+BOOL
+WINAPI
+AuthzUnregisterSecurityEventSource(
+ IN DWORD dwFlags,
+ IN OUT PAUTHZ_SECURITY_EVENT_PROVIDER_HANDLE phEventProvider
+ );
+
+AUTHZAPI
+BOOL
+WINAPI
+AuthzReportSecurityEvent(
+ IN DWORD dwFlags,
+ IN OUT AUTHZ_SECURITY_EVENT_PROVIDER_HANDLE hEventProvider,
+ IN DWORD dwAuditId,
+ IN PSID pUserSid OPTIONAL,
+ IN DWORD dwCount,
+ ...
+ );
+
+AUTHZAPI
+BOOL
+WINAPI
+AuthzReportSecurityEventFromParams(
+ IN DWORD dwFlags,
+ IN OUT AUTHZ_SECURITY_EVENT_PROVIDER_HANDLE hEventProvider,
+ IN DWORD dwAuditId,
+ IN PSID pUserSid OPTIONAL,
+ IN PAUDIT_PARAMS pParams
+ );
+*)
+
+implementation
+
+const
+ authzlib = 'authz.dll';
+
+{$IFDEF DYNAMIC_LINK}
+
+var
+ _AuthzAccessCheck: Pointer;
+
+function AuthzAccessCheck;
+begin
+ GetProcedureAddress(_AuthzAccessCheck, authzlib, 'AuthzAccessCheck');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_AuthzAccessCheck]
+ end;
+end;
+
+var
+ _AuthzCachedAccessCheck: Pointer;
+
+function AuthzCachedAccessCheck;
+begin
+ GetProcedureAddress(_AuthzCachedAccessCheck, authzlib, 'AuthzCachedAccessCheck');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_AuthzCachedAccessCheck]
+ end;
+end;
+
+var
+ _AuthzOpenObjectAudit: Pointer;
+
+function AuthzOpenObjectAudit;
+begin
+ GetProcedureAddress(_AuthzOpenObjectAudit, authzlib, 'AuthzOpenObjectAudit');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_AuthzOpenObjectAudit]
+ end;
+end;
+
+var
+ _AuthzFreeHandle: Pointer;
+
+function AuthzFreeHandle;
+begin
+ GetProcedureAddress(_AuthzFreeHandle, authzlib, 'AuthzFreeHandle');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_AuthzFreeHandle]
+ end;
+end;
+
+var
+ _AuthzInitializeResourceManager: Pointer;
+
+function AuthzInitializeResourceManager;
+begin
+ GetProcedureAddress(_AuthzInitializeResourceManager, authzlib, 'AuthzInitializeResourceManager');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_AuthzInitializeResourceManager]
+ end;
+end;
+
+var
+ _AuthzFreeResourceManager: Pointer;
+
+function AuthzFreeResourceManager;
+begin
+ GetProcedureAddress(_AuthzFreeResourceManager, authzlib, 'AuthzFreeResourceManager');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_AuthzFreeResourceManager]
+ end;
+end;
+
+var
+ _AuthzInitializeContextFromToken: Pointer;
+
+function AuthzInitializeContextFromToken;
+begin
+ GetProcedureAddress(_AuthzInitializeContextFromToken, authzlib, 'AuthzInitializeContextFromToken');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_AuthzInitializeContextFromToken]
+ end;
+end;
+
+var
+ _AuthzInitializeContextFromSid: Pointer;
+
+function AuthzInitializeContextFromSid;
+begin
+ GetProcedureAddress(_AuthzInitializeContextFromSid, authzlib, 'AuthzInitializeContextFromSid');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_AuthzInitializeContextFromSid]
+ end;
+end;
+
+var
+ _AuthzInitCxtFromAuthzCxt: Pointer;
+
+function AuthzInitializeContextFromAuthzContext;
+begin
+ GetProcedureAddress(_AuthzInitCxtFromAuthzCxt, authzlib, 'AuthzInitializeContextFromAuthzContext');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_AuthzInitCxtFromAuthzCxt]
+ end;
+end;
+
+var
+ _AuthzAddSidsToContext: Pointer;
+
+function AuthzAddSidsToContext;
+begin
+ GetProcedureAddress(_AuthzAddSidsToContext, authzlib, 'AuthzAddSidsToContext');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_AuthzAddSidsToContext]
+ end;
+end;
+
+var
+ _AuthzGetInformationFromContext: Pointer;
+
+function AuthzGetInformationFromContext;
+begin
+ GetProcedureAddress(_AuthzGetInformationFromContext, authzlib, 'AuthzGetInformationFromContext');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_AuthzGetInformationFromContext]
+ end;
+end;
+
+var
+ _AuthzFreeContext: Pointer;
+
+function AuthzFreeContext;
+begin
+ GetProcedureAddress(_AuthzFreeContext, authzlib, 'AuthzFreeContext');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_AuthzFreeContext]
+ end;
+end;
+
+var
+ _AuthzInitObjAccAuditEvent: Pointer;
+
+function AuthzInitializeObjectAccessAuditEvent;
+begin
+ GetProcedureAddress(_AuthzInitObjAccAuditEvent, authzlib, 'AuthzInitializeObjectAccessAuditEvent');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_AuthzInitObjAccAuditEvent]
+ end;
+end;
+
+var
+ _AuthzInitObjAccAuditEvent2: Pointer;
+
+function AuthzInitializeObjectAccessAuditEvent2;
+begin
+ GetProcedureAddress(_AuthzInitObjAccAuditEvent2, authzlib, 'AuthzInitializeObjectAccessAuditEvent2');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_AuthzInitObjAccAuditEvent2]
+ end;
+end;
+
+var
+ _AuthzGetInfoFromAuditEvent: Pointer;
+
+function AuthzGetInformationFromAuditEvent;
+begin
+ GetProcedureAddress(_AuthzGetInfoFromAuditEvent, authzlib, 'AuthzGetInformationFromAuditEvent');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_AuthzGetInfoFromAuditEvent]
+ end;
+end;
+
+var
+ _AuthzFreeAuditEvent: Pointer;
+
+function AuthzFreeAuditEvent;
+begin
+ GetProcedureAddress(_AuthzFreeAuditEvent, authzlib, 'AuthzFreeAuditEvent');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_AuthzFreeAuditEvent]
+ end;
+end;
+
+{$ELSE}
+
+function AuthzAccessCheck; external authzlib name 'AuthzAccessCheck';
+function AuthzCachedAccessCheck; external authzlib name 'AuthzCachedAccessCheck';
+function AuthzOpenObjectAudit; external authzlib name 'AuthzOpenObjectAudit';
+function AuthzFreeHandle; external authzlib name 'AuthzFreeHandle';
+function AuthzInitializeResourceManager; external authzlib name 'AuthzInitializeResourceManager';
+function AuthzFreeResourceManager; external authzlib name 'AuthzFreeResourceManager';
+function AuthzInitializeContextFromToken; external authzlib name 'AuthzInitializeContextFromToken';
+function AuthzInitializeContextFromSid; external authzlib name 'AuthzInitializeContextFromSid';
+function AuthzInitializeContextFromAuthzContext; external authzlib name 'AuthzInitializeContextFromAuthzContext';
+function AuthzAddSidsToContext; external authzlib name 'AuthzAddSidsToContext';
+function AuthzGetInformationFromContext; external authzlib name 'AuthzGetInformationFromContext';
+function AuthzFreeContext; external authzlib name 'AuthzFreeContext';
+function AuthzInitializeObjectAccessAuditEvent; external authzlib name 'AuthzInitializeObjectAccessAuditEvent';
+function AuthzInitializeObjectAccessAuditEvent2; external authzlib name 'AuthzInitializeObjectAccessAuditEvent2';
+function AuthzGetInformationFromAuditEvent; external authzlib name 'AuthzGetInformationFromAuditEvent';
+function AuthzFreeAuditEvent; external authzlib name 'AuthzFreeAuditEvent';
+
+{$ENDIF DYNAMIC_LINK}
+
+end.
diff --git a/packages/extra/winunits/jwabatclass.pas b/packages/extra/winunits/jwabatclass.pas
index 829f081720..7f845f7490 100644
--- a/packages/extra/winunits/jwabatclass.pas
+++ b/packages/extra/winunits/jwabatclass.pas
@@ -1,323 +1,323 @@
-{******************************************************************************}
-{ }
-{ Battery class driver API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: batclass.h, released June 2000. The original Pascal }
-{ code is: BatClass.pas, released December 2000. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwabatclass.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaBatClass;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "BatClass.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaWinIoctl, JwaWinType;
-
-//
-// Battery device GUID
-//
-
-const
- GUID_DEVICE_BATTERY: TGUID = (D1:$72631e54; D2:$78A4; D3:$11d0; D4:($bc, $f7, $00, $aa, $00, $b7, $b3, $2a));
- {$EXTERNALSYM GUID_DEVICE_BATTERY}
- BATTERY_STATUS_WMI_GUID: TGUID = (D1:$fc4670d1; D2:$ebbf; D3:$416e; D4:($87, $ce, $37, $4a, $4e, $bc, $11, $1a));
- {$EXTERNALSYM BATTERY_STATUS_WMI_GUID}
- BATTERY_RUNTIME_WMI_GUID: TGUID = (D1:$535a3767; D2:$1ac2; D3:$49bc; D4:($a0, $77, $3f, $7a, $02, $e4, $0a, $ec));
- {$EXTERNALSYM BATTERY_RUNTIME_WMI_GUID}
- BATTERY_TEMPERATURE_WMI_GUID: TGUID = (D1:$1a52a14d; D2:$adce; D3:$4a44; D4:($9a, $3e, $c8, $d8, $f1, $5f, $f2, $c2));
- {$EXTERNALSYM BATTERY_TEMPERATURE_WMI_GUID}
- BATTERY_FULL_CHARGED_CAPACITY_WMI_GUID: TGUID = (D1:$40b40565; D2:$96f7; D3:$4435; D4:($86, $94, $97, $e0, $e4, $39, $59, $05));
- {$EXTERNALSYM BATTERY_FULL_CHARGED_CAPACITY_WMI_GUID}
- BATTERY_CYCLE_COUNT_WMI_GUID: TGUID = (D1:$ef98db24; D2:$0014; D3:$4c25; D4:($a5, $0b, $c7, $24, $ae, $5c, $d3, $71));
- {$EXTERNALSYM BATTERY_CYCLE_COUNT_WMI_GUID}
- BATTERY_STATIC_DATA_WMI_GUID: TGUID = (D1:$05e1e463; D2:$e4e2; D3:$4ea9; D4:($80, $cb, $9b, $d4, $b3, $ca, $06, $55));
- {$EXTERNALSYM BATTERY_STATIC_DATA_WMI_GUID}
- BATTERY_STATUS_CHANGE_WMI_GUID: TGUID = (D1:$cddfa0c3; D2:$7c5b; D3:$4e43; D4:($a0, $34, $05, $9f, $a5, $b8, $43, $64));
- {$EXTERNALSYM BATTERY_STATUS_CHANGE_WMI_GUID}
- BATTERY_TAG_CHANGE_WMI_GUID: TGUID = (D1:$5e1f6e19; D2:$8786; D3:$4d23; D4:($94, $fc, $9e, $74, $6b, $d5, $d8, $88));
- {$EXTERNALSYM BATTERY_TAG_CHANGE_WMI_GUID}
-
-//
-// Battery driver interface
-//
-// IOCTL_BATTERY_QUERY_TAG
-// IOCTL_BATTERY_QUERY_INFORMATION
-// IOCTL_BATTERY_SET_INFORMATION
-// IOCTL_BATTERY_QUERY_STATUS
-//
-
-//
-// IOCTL_BATTERY_QUERY_TAG
-//
-
- IOCTL_BATTERY_QUERY_TAG = (FILE_DEVICE_BATTERY shl 16) or (FILE_READ_ACCESS shl 14) or ($10 shl 2) or METHOD_BUFFERED;
- {$EXTERNALSYM IOCTL_BATTERY_QUERY_TAG}
-
- BATTERY_TAG_INVALID = 0;
- {$EXTERNALSYM BATTERY_TAG_INVALID}
-
-//
-// IOCTL_BATTERY_QUERY_INFORMATION
-//
-
- IOCTL_BATTERY_QUERY_INFORMATION = (FILE_DEVICE_BATTERY shl 16) or (FILE_READ_ACCESS shl 14) or ($11 shl 2) or METHOD_BUFFERED;
- {$EXTERNALSYM IOCTL_BATTERY_QUERY_INFORMATION}
-
-type
- BATTERY_QUERY_INFORMATION_LEVEL = (
- BatteryInformation,
- BatteryGranularityInformation,
- BatteryTemperature,
- BatteryEstimatedTime,
- BatteryDeviceName,
- BatteryManufactureDate,
- BatteryManufactureName,
- BatteryUniqueID,
- BatterySerialNumber);
- {$EXTERNALSYM BATTERY_QUERY_INFORMATION_LEVEL}
- TBatteryQueryInformationLevel = BATTERY_QUERY_INFORMATION_LEVEL;
-
- _BATTERY_QUERY_INFORMATION = record
- BatteryTag: ULONG;
- InformationLevel: BATTERY_QUERY_INFORMATION_LEVEL;
- AtRate: LONG;
- end;
- {$EXTERNALSYM _BATTERY_QUERY_INFORMATION}
- BATTERY_QUERY_INFORMATION = _BATTERY_QUERY_INFORMATION;
- {$EXTERNALSYM BATTERY_QUERY_INFORMATION}
- PBATTERY_QUERY_INFORMATION = ^BATTERY_QUERY_INFORMATION;
- {$EXTERNALSYM PBATTERY_QUERY_INFORMATION}
- TBatteryQueryInformation = BATTERY_QUERY_INFORMATION;
- PBatteryQueryInformation = PBATTERY_QUERY_INFORMATION;
-
-//
-// Format of data returned when
-// BATTERY_INFORMATION_LEVEL = BatteryInformation
-//
-
- _BATTERY_INFORMATION = record
- Capabilities: ULONG;
- Technology: UCHAR;
- Reserved: array [0..2] of UCHAR;
- Chemistry: array [0..3] of UCHAR;
- DesignedCapacity: ULONG;
- FullChargedCapacity: ULONG;
- DefaultAlert1: ULONG;
- DefaultAlert2: ULONG;
- CriticalBias: ULONG;
- CycleCount: ULONG;
- end;
- {$EXTERNALSYM _BATTERY_INFORMATION}
- BATTERY_INFORMATION = _BATTERY_INFORMATION;
- {$EXTERNALSYM BATTERY_INFORMATION}
- PBATTERY_INFORMATION = ^BATTERY_INFORMATION;
- {$EXTERNALSYM PBATTERY_INFORMATION}
- TBatteryInformation = BATTERY_INFORMATION;
- PBatteryInformation = PBATTERY_INFORMATION;
-
-//
-// BATTERY_INFORMATION.Capabilities flags
-//
-
-const
- BATTERY_SYSTEM_BATTERY = DWORD($80000000);
- {$EXTERNALSYM BATTERY_SYSTEM_BATTERY}
- BATTERY_CAPACITY_RELATIVE = $40000000;
- {$EXTERNALSYM BATTERY_CAPACITY_RELATIVE}
- BATTERY_IS_SHORT_TERM = $20000000;
- {$EXTERNALSYM BATTERY_IS_SHORT_TERM}
- BATTERY_SET_CHARGE_SUPPORTED = $00000001;
- {$EXTERNALSYM BATTERY_SET_CHARGE_SUPPORTED}
- BATTERY_SET_DISCHARGE_SUPPORTED = $00000002;
- {$EXTERNALSYM BATTERY_SET_DISCHARGE_SUPPORTED}
- BATTERY_SET_RESUME_SUPPORTED = $00000004;
- {$EXTERNALSYM BATTERY_SET_RESUME_SUPPORTED}
-
-//
-// BATTERY_INFORMATION.XXXCapacity constants
-//
-
- BATTERY_UNKNOWN_CAPACITY = DWORD($FFFFFFFF);
- {$EXTERNALSYM BATTERY_UNKNOWN_CAPACITY}
-
-//
-// BatteryEstimatedTime constant
-//
-
- BATTERY_UNKNOWN_TIME = DWORD($FFFFFFFF);
- {$EXTERNALSYM BATTERY_UNKNOWN_TIME}
-
-//
-// Max battery driver BATTERY_QUERY_INFORMATION_LEVEL string storage
-// size in bytes.
-//
-
- MAX_BATTERY_STRING_SIZE = 128;
- {$EXTERNALSYM MAX_BATTERY_STRING_SIZE}
-
-//
-// Struct for accessing the packed date format in BatteryManufactureDate.
-//
-
-type
- _BATTERY_MANUFACTURE_DATE = record
- Day: UCHAR;
- Month: UCHAR;
- Year: USHORT;
- end;
- {$EXTERNALSYM _BATTERY_MANUFACTURE_DATE}
- BATTERY_MANUFACTURE_DATE = _BATTERY_MANUFACTURE_DATE;
- {$EXTERNALSYM BATTERY_MANUFACTURE_DATE}
- PBATTERY_MANUFACTURE_DATE = ^BATTERY_MANUFACTURE_DATE;
- {$EXTERNALSYM PBATTERY_MANUFACTURE_DATE}
- TBatteryManufactureDate = BATTERY_MANUFACTURE_DATE;
- PBatteryManufactureDate = PBATTERY_MANUFACTURE_DATE;
-
-//
-// IOCTL_BATTERY_SET_INFORMATION
-//
-
-const
- IOCTL_BATTERY_SET_INFORMATION = (FILE_DEVICE_BATTERY shl 16) or (FILE_WRITE_ACCESS shl 14) or ($12 shl 2) or METHOD_BUFFERED;
- {$EXTERNALSYM IOCTL_BATTERY_SET_INFORMATION}
-
-type
- BATTERY_SET_INFORMATION_LEVEL = (
- BatteryCriticalBias,
- BatteryCharge,
- BatteryDischarge);
- {$EXTERNALSYM BATTERY_SET_INFORMATION_LEVEL}
- TBatterySetInformationLevel = BATTERY_SET_INFORMATION_LEVEL;
-
- _BATTERY_SET_INFORMATION = record
- BatteryTag: ULONG;
- InformationLevel: BATTERY_SET_INFORMATION_LEVEL;
- Buffer: array [0..0] of UCHAR;
- end;
- {$EXTERNALSYM _BATTERY_SET_INFORMATION}
- BATTERY_SET_INFORMATION = _BATTERY_SET_INFORMATION;
- {$EXTERNALSYM BATTERY_SET_INFORMATION}
- PBATTERY_SET_INFORMATION = ^BATTERY_SET_INFORMATION;
- {$EXTERNALSYM PBATTERY_SET_INFORMATION}
- TBatterySetInformation = BATTERY_SET_INFORMATION;
- PBatterySetInformation = PBATTERY_SET_INFORMATION;
-
-//
-// IOCTL_BATTERY_QUERY_STATUS
-//
-
-const
- IOCTL_BATTERY_QUERY_STATUS = (FILE_DEVICE_BATTERY shl 16) or (FILE_READ_ACCESS shl 14) or ($13 shl 2) or METHOD_BUFFERED;
- {$EXTERNALSYM IOCTL_BATTERY_QUERY_STATUS}
-
-//
-// Structure of input buffer to IOCTL_BATTERY_QUERY_STATUS
-//
-
-type
- _BATTERY_WAIT_STATUS = record
- BatteryTag: ULONG;
- Timeout: ULONG;
- PowerState: ULONG;
- LowCapacity: ULONG;
- HighCapacity: ULONG;
- end;
- {$EXTERNALSYM _BATTERY_WAIT_STATUS}
- BATTERY_WAIT_STATUS = _BATTERY_WAIT_STATUS;
- {$EXTERNALSYM BATTERY_WAIT_STATUS}
- PBATTERY_WAIT_STATUS = ^BATTERY_WAIT_STATUS;
- {$EXTERNALSYM PBATTERY_WAIT_STATUS}
- TBatteryWaitStatus = BATTERY_WAIT_STATUS;
- PBatteryWaitStatus = PBATTERY_WAIT_STATUS;
-
-//
-// Structure of output buffer from IOCTL_BATTERY_QUERY_STATUS
-//
-
- _BATTERY_STATUS = record
- PowerState: ULONG;
- Capacity: ULONG;
- Voltage: ULONG;
- Rate: LONG;
- end;
- {$EXTERNALSYM _BATTERY_STATUS}
- BATTERY_STATUS = _BATTERY_STATUS;
- {$EXTERNALSYM BATTERY_STATUS}
- PBATTERY_STATUS = ^BATTERY_STATUS;
- {$EXTERNALSYM PBATTERY_STATUS}
- TBatteryStatus = BATTERY_STATUS;
- PBatteryStatus = PBATTERY_STATUS;
-
-//
-// BATTERY_STATUS.PowerState flags
-//
-
-const
- BATTERY_POWER_ON_LINE = $00000001;
- {$EXTERNALSYM BATTERY_POWER_ON_LINE}
- BATTERY_DISCHARGING = $00000002;
- {$EXTERNALSYM BATTERY_DISCHARGING}
- BATTERY_CHARGING = $00000004;
- {$EXTERNALSYM BATTERY_CHARGING}
- BATTERY_CRITICAL = $00000008;
- {$EXTERNALSYM BATTERY_CRITICAL}
-
-//
-// BATTERY_STATUS Constant
-// BATTERY_UNKNOWN_CAPACITY defined above for IOCTL_BATTERY_QUERY_INFORMATION
-//
-
- BATTERY_UNKNOWN_VOLTAGE = DWORD($FFFFFFFF);
- {$EXTERNALSYM BATTERY_UNKNOWN_VOLTAGE}
- BATTERY_UNKNOWN_RATE = DWORD($80000000);
- {$EXTERNALSYM BATTERY_UNKNOWN_RATE}
-
-// mvb remainder of header file is kernel mode only
-
-implementation
-
-end.
+{******************************************************************************}
+{ }
+{ Battery class driver API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: batclass.h, released June 2000. The original Pascal }
+{ code is: BatClass.pas, released December 2000. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwabatclass.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaBatClass;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "BatClass.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaWinIoctl, JwaWinType;
+
+//
+// Battery device GUID
+//
+
+const
+ GUID_DEVICE_BATTERY: TGUID = (D1:$72631e54; D2:$78A4; D3:$11d0; D4:($bc, $f7, $00, $aa, $00, $b7, $b3, $2a));
+ {$EXTERNALSYM GUID_DEVICE_BATTERY}
+ BATTERY_STATUS_WMI_GUID: TGUID = (D1:$fc4670d1; D2:$ebbf; D3:$416e; D4:($87, $ce, $37, $4a, $4e, $bc, $11, $1a));
+ {$EXTERNALSYM BATTERY_STATUS_WMI_GUID}
+ BATTERY_RUNTIME_WMI_GUID: TGUID = (D1:$535a3767; D2:$1ac2; D3:$49bc; D4:($a0, $77, $3f, $7a, $02, $e4, $0a, $ec));
+ {$EXTERNALSYM BATTERY_RUNTIME_WMI_GUID}
+ BATTERY_TEMPERATURE_WMI_GUID: TGUID = (D1:$1a52a14d; D2:$adce; D3:$4a44; D4:($9a, $3e, $c8, $d8, $f1, $5f, $f2, $c2));
+ {$EXTERNALSYM BATTERY_TEMPERATURE_WMI_GUID}
+ BATTERY_FULL_CHARGED_CAPACITY_WMI_GUID: TGUID = (D1:$40b40565; D2:$96f7; D3:$4435; D4:($86, $94, $97, $e0, $e4, $39, $59, $05));
+ {$EXTERNALSYM BATTERY_FULL_CHARGED_CAPACITY_WMI_GUID}
+ BATTERY_CYCLE_COUNT_WMI_GUID: TGUID = (D1:$ef98db24; D2:$0014; D3:$4c25; D4:($a5, $0b, $c7, $24, $ae, $5c, $d3, $71));
+ {$EXTERNALSYM BATTERY_CYCLE_COUNT_WMI_GUID}
+ BATTERY_STATIC_DATA_WMI_GUID: TGUID = (D1:$05e1e463; D2:$e4e2; D3:$4ea9; D4:($80, $cb, $9b, $d4, $b3, $ca, $06, $55));
+ {$EXTERNALSYM BATTERY_STATIC_DATA_WMI_GUID}
+ BATTERY_STATUS_CHANGE_WMI_GUID: TGUID = (D1:$cddfa0c3; D2:$7c5b; D3:$4e43; D4:($a0, $34, $05, $9f, $a5, $b8, $43, $64));
+ {$EXTERNALSYM BATTERY_STATUS_CHANGE_WMI_GUID}
+ BATTERY_TAG_CHANGE_WMI_GUID: TGUID = (D1:$5e1f6e19; D2:$8786; D3:$4d23; D4:($94, $fc, $9e, $74, $6b, $d5, $d8, $88));
+ {$EXTERNALSYM BATTERY_TAG_CHANGE_WMI_GUID}
+
+//
+// Battery driver interface
+//
+// IOCTL_BATTERY_QUERY_TAG
+// IOCTL_BATTERY_QUERY_INFORMATION
+// IOCTL_BATTERY_SET_INFORMATION
+// IOCTL_BATTERY_QUERY_STATUS
+//
+
+//
+// IOCTL_BATTERY_QUERY_TAG
+//
+
+ IOCTL_BATTERY_QUERY_TAG = (FILE_DEVICE_BATTERY shl 16) or (FILE_READ_ACCESS shl 14) or ($10 shl 2) or METHOD_BUFFERED;
+ {$EXTERNALSYM IOCTL_BATTERY_QUERY_TAG}
+
+ BATTERY_TAG_INVALID = 0;
+ {$EXTERNALSYM BATTERY_TAG_INVALID}
+
+//
+// IOCTL_BATTERY_QUERY_INFORMATION
+//
+
+ IOCTL_BATTERY_QUERY_INFORMATION = (FILE_DEVICE_BATTERY shl 16) or (FILE_READ_ACCESS shl 14) or ($11 shl 2) or METHOD_BUFFERED;
+ {$EXTERNALSYM IOCTL_BATTERY_QUERY_INFORMATION}
+
+type
+ BATTERY_QUERY_INFORMATION_LEVEL = (
+ BatteryInformation,
+ BatteryGranularityInformation,
+ BatteryTemperature,
+ BatteryEstimatedTime,
+ BatteryDeviceName,
+ BatteryManufactureDate,
+ BatteryManufactureName,
+ BatteryUniqueID,
+ BatterySerialNumber);
+ {$EXTERNALSYM BATTERY_QUERY_INFORMATION_LEVEL}
+ TBatteryQueryInformationLevel = BATTERY_QUERY_INFORMATION_LEVEL;
+
+ _BATTERY_QUERY_INFORMATION = record
+ BatteryTag: ULONG;
+ InformationLevel: BATTERY_QUERY_INFORMATION_LEVEL;
+ AtRate: LONG;
+ end;
+ {$EXTERNALSYM _BATTERY_QUERY_INFORMATION}
+ BATTERY_QUERY_INFORMATION = _BATTERY_QUERY_INFORMATION;
+ {$EXTERNALSYM BATTERY_QUERY_INFORMATION}
+ PBATTERY_QUERY_INFORMATION = ^BATTERY_QUERY_INFORMATION;
+ {$EXTERNALSYM PBATTERY_QUERY_INFORMATION}
+ TBatteryQueryInformation = BATTERY_QUERY_INFORMATION;
+ PBatteryQueryInformation = PBATTERY_QUERY_INFORMATION;
+
+//
+// Format of data returned when
+// BATTERY_INFORMATION_LEVEL = BatteryInformation
+//
+
+ _BATTERY_INFORMATION = record
+ Capabilities: ULONG;
+ Technology: UCHAR;
+ Reserved: array [0..2] of UCHAR;
+ Chemistry: array [0..3] of UCHAR;
+ DesignedCapacity: ULONG;
+ FullChargedCapacity: ULONG;
+ DefaultAlert1: ULONG;
+ DefaultAlert2: ULONG;
+ CriticalBias: ULONG;
+ CycleCount: ULONG;
+ end;
+ {$EXTERNALSYM _BATTERY_INFORMATION}
+ BATTERY_INFORMATION = _BATTERY_INFORMATION;
+ {$EXTERNALSYM BATTERY_INFORMATION}
+ PBATTERY_INFORMATION = ^BATTERY_INFORMATION;
+ {$EXTERNALSYM PBATTERY_INFORMATION}
+ TBatteryInformation = BATTERY_INFORMATION;
+ PBatteryInformation = PBATTERY_INFORMATION;
+
+//
+// BATTERY_INFORMATION.Capabilities flags
+//
+
+const
+ BATTERY_SYSTEM_BATTERY = DWORD($80000000);
+ {$EXTERNALSYM BATTERY_SYSTEM_BATTERY}
+ BATTERY_CAPACITY_RELATIVE = $40000000;
+ {$EXTERNALSYM BATTERY_CAPACITY_RELATIVE}
+ BATTERY_IS_SHORT_TERM = $20000000;
+ {$EXTERNALSYM BATTERY_IS_SHORT_TERM}
+ BATTERY_SET_CHARGE_SUPPORTED = $00000001;
+ {$EXTERNALSYM BATTERY_SET_CHARGE_SUPPORTED}
+ BATTERY_SET_DISCHARGE_SUPPORTED = $00000002;
+ {$EXTERNALSYM BATTERY_SET_DISCHARGE_SUPPORTED}
+ BATTERY_SET_RESUME_SUPPORTED = $00000004;
+ {$EXTERNALSYM BATTERY_SET_RESUME_SUPPORTED}
+
+//
+// BATTERY_INFORMATION.XXXCapacity constants
+//
+
+ BATTERY_UNKNOWN_CAPACITY = DWORD($FFFFFFFF);
+ {$EXTERNALSYM BATTERY_UNKNOWN_CAPACITY}
+
+//
+// BatteryEstimatedTime constant
+//
+
+ BATTERY_UNKNOWN_TIME = DWORD($FFFFFFFF);
+ {$EXTERNALSYM BATTERY_UNKNOWN_TIME}
+
+//
+// Max battery driver BATTERY_QUERY_INFORMATION_LEVEL string storage
+// size in bytes.
+//
+
+ MAX_BATTERY_STRING_SIZE = 128;
+ {$EXTERNALSYM MAX_BATTERY_STRING_SIZE}
+
+//
+// Struct for accessing the packed date format in BatteryManufactureDate.
+//
+
+type
+ _BATTERY_MANUFACTURE_DATE = record
+ Day: UCHAR;
+ Month: UCHAR;
+ Year: USHORT;
+ end;
+ {$EXTERNALSYM _BATTERY_MANUFACTURE_DATE}
+ BATTERY_MANUFACTURE_DATE = _BATTERY_MANUFACTURE_DATE;
+ {$EXTERNALSYM BATTERY_MANUFACTURE_DATE}
+ PBATTERY_MANUFACTURE_DATE = ^BATTERY_MANUFACTURE_DATE;
+ {$EXTERNALSYM PBATTERY_MANUFACTURE_DATE}
+ TBatteryManufactureDate = BATTERY_MANUFACTURE_DATE;
+ PBatteryManufactureDate = PBATTERY_MANUFACTURE_DATE;
+
+//
+// IOCTL_BATTERY_SET_INFORMATION
+//
+
+const
+ IOCTL_BATTERY_SET_INFORMATION = (FILE_DEVICE_BATTERY shl 16) or (FILE_WRITE_ACCESS shl 14) or ($12 shl 2) or METHOD_BUFFERED;
+ {$EXTERNALSYM IOCTL_BATTERY_SET_INFORMATION}
+
+type
+ BATTERY_SET_INFORMATION_LEVEL = (
+ BatteryCriticalBias,
+ BatteryCharge,
+ BatteryDischarge);
+ {$EXTERNALSYM BATTERY_SET_INFORMATION_LEVEL}
+ TBatterySetInformationLevel = BATTERY_SET_INFORMATION_LEVEL;
+
+ _BATTERY_SET_INFORMATION = record
+ BatteryTag: ULONG;
+ InformationLevel: BATTERY_SET_INFORMATION_LEVEL;
+ Buffer: array [0..0] of UCHAR;
+ end;
+ {$EXTERNALSYM _BATTERY_SET_INFORMATION}
+ BATTERY_SET_INFORMATION = _BATTERY_SET_INFORMATION;
+ {$EXTERNALSYM BATTERY_SET_INFORMATION}
+ PBATTERY_SET_INFORMATION = ^BATTERY_SET_INFORMATION;
+ {$EXTERNALSYM PBATTERY_SET_INFORMATION}
+ TBatterySetInformation = BATTERY_SET_INFORMATION;
+ PBatterySetInformation = PBATTERY_SET_INFORMATION;
+
+//
+// IOCTL_BATTERY_QUERY_STATUS
+//
+
+const
+ IOCTL_BATTERY_QUERY_STATUS = (FILE_DEVICE_BATTERY shl 16) or (FILE_READ_ACCESS shl 14) or ($13 shl 2) or METHOD_BUFFERED;
+ {$EXTERNALSYM IOCTL_BATTERY_QUERY_STATUS}
+
+//
+// Structure of input buffer to IOCTL_BATTERY_QUERY_STATUS
+//
+
+type
+ _BATTERY_WAIT_STATUS = record
+ BatteryTag: ULONG;
+ Timeout: ULONG;
+ PowerState: ULONG;
+ LowCapacity: ULONG;
+ HighCapacity: ULONG;
+ end;
+ {$EXTERNALSYM _BATTERY_WAIT_STATUS}
+ BATTERY_WAIT_STATUS = _BATTERY_WAIT_STATUS;
+ {$EXTERNALSYM BATTERY_WAIT_STATUS}
+ PBATTERY_WAIT_STATUS = ^BATTERY_WAIT_STATUS;
+ {$EXTERNALSYM PBATTERY_WAIT_STATUS}
+ TBatteryWaitStatus = BATTERY_WAIT_STATUS;
+ PBatteryWaitStatus = PBATTERY_WAIT_STATUS;
+
+//
+// Structure of output buffer from IOCTL_BATTERY_QUERY_STATUS
+//
+
+ _BATTERY_STATUS = record
+ PowerState: ULONG;
+ Capacity: ULONG;
+ Voltage: ULONG;
+ Rate: LONG;
+ end;
+ {$EXTERNALSYM _BATTERY_STATUS}
+ BATTERY_STATUS = _BATTERY_STATUS;
+ {$EXTERNALSYM BATTERY_STATUS}
+ PBATTERY_STATUS = ^BATTERY_STATUS;
+ {$EXTERNALSYM PBATTERY_STATUS}
+ TBatteryStatus = BATTERY_STATUS;
+ PBatteryStatus = PBATTERY_STATUS;
+
+//
+// BATTERY_STATUS.PowerState flags
+//
+
+const
+ BATTERY_POWER_ON_LINE = $00000001;
+ {$EXTERNALSYM BATTERY_POWER_ON_LINE}
+ BATTERY_DISCHARGING = $00000002;
+ {$EXTERNALSYM BATTERY_DISCHARGING}
+ BATTERY_CHARGING = $00000004;
+ {$EXTERNALSYM BATTERY_CHARGING}
+ BATTERY_CRITICAL = $00000008;
+ {$EXTERNALSYM BATTERY_CRITICAL}
+
+//
+// BATTERY_STATUS Constant
+// BATTERY_UNKNOWN_CAPACITY defined above for IOCTL_BATTERY_QUERY_INFORMATION
+//
+
+ BATTERY_UNKNOWN_VOLTAGE = DWORD($FFFFFFFF);
+ {$EXTERNALSYM BATTERY_UNKNOWN_VOLTAGE}
+ BATTERY_UNKNOWN_RATE = DWORD($80000000);
+ {$EXTERNALSYM BATTERY_UNKNOWN_RATE}
+
+// mvb remainder of header file is kernel mode only
+
+implementation
+
+end.
diff --git a/packages/extra/winunits/jwabits.pas b/packages/extra/winunits/jwabits.pas
index eaa1de770e..1cb9f71cd2 100644
--- a/packages/extra/winunits/jwabits.pas
+++ b/packages/extra/winunits/jwabits.pas
@@ -1,447 +1,447 @@
-{******************************************************************************}
-{ }
-{ Background Intelligent Transfer Service API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: bits.h, released August 2001. The original Pascal }
-{ code is: Bits.pas, released October 2001. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwabits.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaBits;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "bits.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaWinBase, JwaWinType, JwaBitsMsg;
-
-const
- BG_SIZE_UNKNOWN = Int64(-1);
- {$EXTERNALSYM BG_SIZE_UNKNOWN}
-
-//
-// =============================
-// Marshalled interfaces
-// =============================
-
-type
- _BG_FILE_PROGRESS = record
- BytesTotal: UINT64;
- BytesTransferred: UINT64;
- Completed: BOOL;
- end;
- {$EXTERNALSYM _BG_FILE_PROGRESS}
- BG_FILE_PROGRESS = _BG_FILE_PROGRESS;
- {$EXTERNALSYM BG_FILE_PROGRESS}
- TBgFileProgress = BG_FILE_PROGRESS;
- PBgFileProgress = ^BG_FILE_PROGRESS;
-
-const
- IID_IBackgroundCopyFile: TGUID = '{01B7BD23-FB88-4A77-8490-5891D3E4653A}';
- {$EXTERNALSYM IID_IBackgroundCopyFile}
-
-type
- IBackgroundCopyFile = interface(IUnknown)
- ['{01b7bd23-fb88-4a77-8490-5891d3e4653a}']
- function GetRemoteName(out pVal: LPWSTR): HRESULT; stdcall;
- function GetLocalName(out pVal: LPWSTR): HRESULT; stdcall;
- function GetProgress(out pVal: BG_FILE_PROGRESS): HRESULT; stdcall;
- end;
- {$EXTERNALSYM IBackgroundCopyFile}
-
-//--------------------------------------------------------------------
-//
-
-const
- IID_IEnumBackgroundCopyFiles: TGUID = '{CA51E165-C365-424C-8D41-24AAA4FF3C40}';
- {$EXTERNALSYM IID_IEnumBackgroundCopyFiles}
-
-type
- IEnumBackgroundCopyFiles = interface(IUnknown)
- ['{ca51e165-c365-424c-8d41-24aaa4ff3c40}']
- function Next(celt: ULONG; out rgelt: IBackgroundCopyFile; pceltFetched: PULONG): HRESULT; stdcall;
- function Skip(celt: ULONG): HRESULT; stdcall;
- function Reset: HRESULT; stdcall;
- function Clone(out ppenum: IEnumBackgroundCopyFiles): HRESULT; stdcall;
- function GetCount(out puCount: ULONG): HRESULT; stdcall;
- end;
- {$EXTERNALSYM IEnumBackgroundCopyFiles}
-
-//--------------------------------------------------------------------
-//
-
-type
- BG_ERROR_CONTEXT = (
- BG_ERROR_CONTEXT_NONE,
- BG_ERROR_CONTEXT_UNKNOWN,
- BG_ERROR_CONTEXT_GENERAL_QUEUE_MANAGER,
- BG_ERROR_CONTEXT_QUEUE_MANAGER_NOTIFICATION,
- BG_ERROR_CONTEXT_LOCAL_FILE,
- BG_ERROR_CONTEXT_REMOTE_FILE,
- BG_ERROR_CONTEXT_GENERAL_TRANSPORT,
- BG_ERROR_CONTEXT_REMOTE_APPLICATION);
- {$EXTERNALSYM BG_ERROR_CONTEXT}
- TBgErrorContext = BG_ERROR_CONTEXT;
-
-const
- IID_IBackgroundCopyError: TGUID = '{19C613A0-FCB8-4F28-81AE-897C3D078F81}';
- {$EXTERNALSYM IID_IBackgroundCopyError}
-
-type
- IBackgroundCopyError = interface(IUnknown)
- ['{19c613a0-fcb8-4f28-81ae-897c3d078f81}']
- function GetError(out pContext: BG_ERROR_CONTEXT; out pCode: HRESULT): HRESULT; stdcall;
- // Returns BG_E_FILE_NOT_AVAILABLE if no file is available
- function GetFile(out ppVal: IBackgroundCopyFile): HRESULT; stdcall;
- // Return a human readable description of the error.
- // Use CoTaskMemFree to free the description.
- function GetErrorDescription(LanguageId: DWORD; out pErrorDescription: LPWSTR): HRESULT; stdcall;
- // Return a human readable description of the error context.
- // Use CoTaskMemFree to free the description.
- function GetErrorContextDescription(LanguageId: DWORD; out pContextDescription: LPWSTR): HRESULT; stdcall;
- // Returns BG_E_PROTOCOL_NOT_AVAILABLE if no protocol is available
- function GetProtocol(out pProtocol: LPWSTR): HRESULT; stdcall;
- end;
- {$EXTERNALSYM IBackgroundCopyError}
-
-// ==============================================
-// Job Interface
-
-type
- _BG_FILE_INFO = record
- RemoteName: LPWSTR;
- LocalName: LPWSTR;
- end;
- {$EXTERNALSYM _BG_FILE_INFO}
- BG_FILE_INFO = _BG_FILE_INFO;
- {$EXTERNALSYM BG_FILE_INFO}
- TBgFileInfo = BG_FILE_INFO;
- PBgFileInfo = ^BG_FILE_INFO;
-
- _BG_JOB_PROGRESS = record
- BytesTotal: UINT64;
- BytesTransferred: UINT64;
- FilesTotal: ULONG;
- FilesTransferred: ULONG;
- end;
- {$EXTERNALSYM _BG_JOB_PROGRESS}
- BG_JOB_PROGRESS = _BG_JOB_PROGRESS;
- {$EXTERNALSYM BG_JOB_PROGRESS}
- TBgJobProgress = BG_JOB_PROGRESS;
- PBgJobProgress = ^BG_JOB_PROGRESS;
-
- _BG_JOB_TIMES = record
- CreationTime: FILETIME;
- ModificationTime: FILETIME;
- TransferCompletionTime: FILETIME;
- end;
- {$EXTERNALSYM _BG_JOB_TIMES}
- BG_JOB_TIMES = _BG_JOB_TIMES;
- {$EXTERNALSYM BG_JOB_TIMES}
- TBgJobTimes = BG_JOB_TIMES;
- PBgJobTimes = ^BG_JOB_TIMES;
-
- BG_JOB_PRIORITY = (
- BG_JOB_PRIORITY_FOREGROUND,
- BG_JOB_PRIORITY_HIGH,
- BG_JOB_PRIORITY_NORMAL,
- BG_JOB_PRIORITY_LOW);
- {$EXTERNALSYM BG_JOB_PRIORITY}
- TBgJobPriority = BG_JOB_PRIORITY;
- PBgJobPriority = ^BG_JOB_PRIORITY;
-
- BG_JOB_STATE = (
- BG_JOB_STATE_QUEUED,
- BG_JOB_STATE_CONNECTING,
- BG_JOB_STATE_TRANSFERRING,
- BG_JOB_STATE_SUSPENDED,
- BG_JOB_STATE_ERROR,
- BG_JOB_STATE_TRANSIENT_ERROR,
- BG_JOB_STATE_TRANSFERRED,
- BG_JOB_STATE_ACKNOWLEDGED,
- BG_JOB_STATE_CANCELLED);
- {$EXTERNALSYM BG_JOB_STATE}
- TBgJobState = BG_JOB_STATE;
- PBgJobState = ^BG_JOB_STATE;
-
- BG_JOB_TYPE = (
- BG_JOB_TYPE_DOWNLOAD,
- BG_JOB_TYPE_UPLOAD,
- BG_JOB_TYPE_UPLOAD_REPLY);
- {$EXTERNALSYM BG_JOB_TYPE}
- TBgJobType = BG_JOB_TYPE;
-
- BG_JOB_PROXY_USAGE = (
- BG_JOB_PROXY_USAGE_PRECONFIG,
- BG_JOB_PROXY_USAGE_NO_PROXY,
- BG_JOB_PROXY_USAGE_OVERRIDE);
- {$EXTERNALSYM BG_JOB_PROXY_USAGE}
- TBgJobProxyUsage = BG_JOB_PROXY_USAGE;
- PBgJobProxyUsage = ^BG_JOB_PROXY_USAGE;
-
-const
- IID_IBackgroundCopyJob: TGUID = '{37668D37-507E-4160-9316-26306D150B12}';
- {$EXTERNALSYM IID_IBackgroundCopyJob}
-
-type
- IBackgroundCopyJob = interface(IUnknown)
- ['{37668d37-507e-4160-9316-26306d150b12}']
-
- //--------------------------------------------------------------------
-
- //
- // Returns E_INVALIDARG if one of the filesets has
- // - local name is blank
- // - local name contains invalid characters
- // - remote name is blank
- // - remote name has invalid format
- //
- // Returns CO_E_NOT_SUPPORTED if
- // - remote URL contains unsupported protocol
- //
- function AddFileSet(cFileCount: ULONG; pFileSet: PBgFileInfo): HRESULT; stdcall;
-
- function AddFile(RemoteUrl, LocalName: LPCWSTR): HRESULT; stdcall;
-
- //
- // Gets an enumerator object for all files in the job.
- //
- function EnumFiles(out pEnum: IEnumBackgroundCopyFiles): HRESULT; stdcall;
-
- //
- // Pause all activity on the job. The service will take no action until one of
- // Resume(), Cancel(), Complete() is called.
- //
- // if already suspended, just returns S_OK.
- //
- function Suspend: HRESULT; stdcall;
-
- //
- // Enable downloading for this job. Job properties cannot be modified
- // after Resume() until the app calls Suspend().
- //
- // if already running, just returns S_OK.
- //
- function Resume: HRESULT; stdcall;
-
- //
- // Permanently stop the job. The service will delete the job metadata and downloaded files.
- //
- // If already cancelled or resumed, returns ???
- //
- function Cancel: HRESULT; stdcall;
-
- //
- // Acknowledges receipt of the job-complete notification. The service will delete
- // the job metadata and leave the downloaded files.
- //
- function Complete: HRESULT; stdcall;
-
- //--------------------------------------------------------------------
-
- function GetId(out pVal: GUID): HRESULT; stdcall;
-
- function GetType(out pVal: BG_JOB_TYPE): HRESULT; stdcall;
-
- function GetProgress(out pVal: BG_JOB_PROGRESS): HRESULT; stdcall;
-
- function GetTimes(out pVal: BG_JOB_TIMES): HRESULT; stdcall;
-
- function GetState(out pVal: BG_JOB_STATE): HRESULT; stdcall;
-
- function GetError(out ppError: IBackgroundCopyError): HRESULT; stdcall;
-
- //
- // The owner of the job, represented as a string.
- // Only the owner and admins are allowed to see or change the job.
- //
- function GetOwner(out pVal: LPWSTR): HRESULT; stdcall;
-
- //
- // name of the job, suitable for display in UI
- //
- function SetDisplayName(Val: LPCWSTR): HRESULT; stdcall;
- function GetDisplayName(out pVal: LPWSTR): HRESULT; stdcall;
-
- //
- // a field for use by the app
- //
- function SetDescription(Val: LPCWSTR): HRESULT; stdcall;
- function GetDescription(out pVal: LPWSTR): HRESULT; stdcall;
-
- //
- // the priority of the job in the queue.
- // default = PRIORITY_NORMAL
- // values not in BG_JOB_PRIORITY return E_NOTIMPL.
- //
- function SetPriority(Val: BG_JOB_PRIORITY): HRESULT; stdcall;
- function GetPriority(out pVal: BG_JOB_PRIORITY): HRESULT; stdcall;
-
- //
- // ignores extra flags?
- //
- function SetNotifyFlags(Val: ULONG): HRESULT; stdcall;
- function GetNotifyFlags(out pVal: ULONG): HRESULT; stdcall;
-
- // interface pointer that implements the IBackgroundCallback interface for notifications.
- // If the pointer becomes invalid, the service will try to create a new notification object
- // with the notify CLSID.
- function SetNotifyInterface(Val: IUnknown): HRESULT; stdcall;
- function GetNotifyInterface(out pVal: IUnknown): HRESULT; stdcall;
-
- function SetMinimumRetryDelay(Seconds: ULONG): HRESULT; stdcall;
- function GetMinimumRetryDelay(out Seconds: ULONG): HRESULT; stdcall;
-
- function SetNoProgressTimeout(Seconds: ULONG): HRESULT; stdcall;
- function GetNoProgressTimeout(out Seconds: ULONG): HRESULT; stdcall;
-
- function GetErrorCount(out Errors: ULONG): HRESULT; stdcall;
-
- function SetProxySettings(ProxyUsage: BG_JOB_PROXY_USAGE; ProxyList, ProxyBypassList: PWCHAR): HRESULT; stdcall;
-
- function GetProxySettings(pProxyUsage: BG_JOB_PROXY_USAGE; pProxyList, pProxyBypassList: LPWSTR): HRESULT; stdcall;
-
- function TakeOwnership(): HRESULT; stdcall;
- end;
- {$EXTERNALSYM IBackgroundCopyJob}
-
-// ==============================================
-// IEnumJobs Interface
-// This interface allows enumerating the jobs under a Job
-
-const
- IID_IEnumBackgroundCopyJobs: TGUID = '{1AF4F612-3B71-466F-8F58-7B6F73AC57AD}';
- {$EXTERNALSYM IID_IEnumBackgroundCopyJobs}
-
-type
- IEnumBackgroundCopyJobs = interface(IUnknown)
- ['{1af4f612-3b71-466f-8f58-7b6f73ac57ad}']
- function Next(celt: ULONG; out rgelt: IBackgroundCopyJob; pceltFetched: PULONG): HRESULT; stdcall;
- function Skip(celt: ULONG): HRESULT; stdcall;
- function Reset: HRESULT; stdcall;
- function Clone(out ppenum: IEnumBackgroundCopyJobs): HRESULT; stdcall;
- function GetCount(out puCount: ULONG): HRESULT; stdcall;
- end;
- {$EXTERNALSYM IEnumBackgroundCopyJobs}
-
-const
- BG_NOTIFY_JOB_TRANSFERRED = $0001;
- {$EXTERNALSYM BG_NOTIFY_JOB_TRANSFERRED}
- BG_NOTIFY_JOB_ERROR = $0002;
- {$EXTERNALSYM BG_NOTIFY_JOB_ERROR}
- BG_NOTIFY_DISABLE = $0004;
- {$EXTERNALSYM BG_NOTIFY_DISABLE}
- BG_NOTIFY_JOB_MODIFICATION = $0008;
- {$EXTERNALSYM BG_NOTIFY_JOB_MODIFICATION}
-
-// ==============================================
-// IBackgroundCallback Interface
-// This interface is implemented by the client and is used by the queue manager
-// to supply progress information to the client.
-
-const
- IID_IBackgroundCopyCallback: TGUID = '{97EA99C7-0186-4AD4-8DF9-C5B4E0ED6B22}';
- {$EXTERNALSYM IID_IBackgroundCopyCallback}
-
-type
- IBackgroundCopyCallback = interface(IUnknown)
- ['{97ea99c7-0186-4ad4-8df9-c5b4e0ed6b22}']
- //
- // A job has transferred successfully.
- //
- function JobTransferred(pJob: IBackgroundCopyJob): HRESULT; stdcall;
-
- //
- // An error occurred, and the service has suspended the job.
- // Fix the error and resume the job.
- // Get error details by calling (*pFailingJob)->GetStatus().
- //
- function JobError(pJob: IBackgroundCopyJob; pError: IBackgroundCopyError): HRESULT; stdcall;
-
- //
- // The job has been modified. Intendended for user interfaces.
- //
- function JobModification(pJob: IBackgroundCopyJob; dwReserved: DWORD): HRESULT; stdcall;
-
- end;
- {$EXTERNALSYM IBackgroundCopyCallback}
-
-//
-// IBackgroundCopyManager is the "root" interface to the background file copy component.
-//
-
-const
- BG_JOB_ENUM_ALL_USERS = $0001;
- {$EXTERNALSYM BG_JOB_ENUM_ALL_USERS}
-
- IID_IBackgroundCopyManager: TGUID = '{5CE34C0D-0DC9-4C1F-897C-DAA1B78CEE7C}';
- {$EXTERNALSYM IID_IBackgroundCopyManager}
-
-type
- IBackgroundCopyManager = interface(IUnknown)
- ['{5ce34c0d-0dc9-4c1f-897c-daa1b78cee7c}']
- function CreateJob(DisplayName: LPCWSTR; Type_: BG_JOB_TYPE; out pJobId: GUID; out ppJob: IBackgroundCopyJob): HRESULT; stdcall;
- function GetJob(const jobID: GUID; out ppJob: IBackgroundCopyJob): HRESULT; stdcall;
-
- //
- // Without this flag, jobs not owned by the caller are excluded from the enumeration.
- // With this flag, those jobs are included. Only works if the caller is an administrator.
- //
- function EnumJobs(dwFlags: DWORD; out ppEnum: IEnumBackgroundCopyJobs): HRESULT; stdcall;
- function GetErrorDescription(hResult: HRESULT; LanguageId: DWORD; out pErrorDescription: LPWSTR): HRESULT; stdcall;
- end;
- {$EXTERNALSYM IBackgroundCopyManager}
-
-//---------------------------------------------------------------------------
-
-const
- LIBID_BackgroundCopyManager: GUID = '{4991d34b-80a1-4291-83b6-3328366b9097}';
- {$EXTERNALSYM LIBID_BackgroundCopyManager}
- CLSID_BackgroundCopyManager: GUID = '{4991d34b-80a1-4291-83b6-3328366b9097}';
- {$EXTERNALSYM CLSID_BackgroundCopyManager}
-
-implementation
-
-end.
+{******************************************************************************}
+{ }
+{ Background Intelligent Transfer Service API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: bits.h, released August 2001. The original Pascal }
+{ code is: Bits.pas, released October 2001. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwabits.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaBits;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "bits.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaWinBase, JwaWinType, JwaBitsMsg;
+
+const
+ BG_SIZE_UNKNOWN = Int64(-1);
+ {$EXTERNALSYM BG_SIZE_UNKNOWN}
+
+//
+// =============================
+// Marshalled interfaces
+// =============================
+
+type
+ _BG_FILE_PROGRESS = record
+ BytesTotal: UINT64;
+ BytesTransferred: UINT64;
+ Completed: BOOL;
+ end;
+ {$EXTERNALSYM _BG_FILE_PROGRESS}
+ BG_FILE_PROGRESS = _BG_FILE_PROGRESS;
+ {$EXTERNALSYM BG_FILE_PROGRESS}
+ TBgFileProgress = BG_FILE_PROGRESS;
+ PBgFileProgress = ^BG_FILE_PROGRESS;
+
+const
+ IID_IBackgroundCopyFile: TGUID = '{01B7BD23-FB88-4A77-8490-5891D3E4653A}';
+ {$EXTERNALSYM IID_IBackgroundCopyFile}
+
+type
+ IBackgroundCopyFile = interface(IUnknown)
+ ['{01b7bd23-fb88-4a77-8490-5891d3e4653a}']
+ function GetRemoteName(out pVal: LPWSTR): HRESULT; stdcall;
+ function GetLocalName(out pVal: LPWSTR): HRESULT; stdcall;
+ function GetProgress(out pVal: BG_FILE_PROGRESS): HRESULT; stdcall;
+ end;
+ {$EXTERNALSYM IBackgroundCopyFile}
+
+//--------------------------------------------------------------------
+//
+
+const
+ IID_IEnumBackgroundCopyFiles: TGUID = '{CA51E165-C365-424C-8D41-24AAA4FF3C40}';
+ {$EXTERNALSYM IID_IEnumBackgroundCopyFiles}
+
+type
+ IEnumBackgroundCopyFiles = interface(IUnknown)
+ ['{ca51e165-c365-424c-8d41-24aaa4ff3c40}']
+ function Next(celt: ULONG; out rgelt: IBackgroundCopyFile; pceltFetched: PULONG): HRESULT; stdcall;
+ function Skip(celt: ULONG): HRESULT; stdcall;
+ function Reset: HRESULT; stdcall;
+ function Clone(out ppenum: IEnumBackgroundCopyFiles): HRESULT; stdcall;
+ function GetCount(out puCount: ULONG): HRESULT; stdcall;
+ end;
+ {$EXTERNALSYM IEnumBackgroundCopyFiles}
+
+//--------------------------------------------------------------------
+//
+
+type
+ BG_ERROR_CONTEXT = (
+ BG_ERROR_CONTEXT_NONE,
+ BG_ERROR_CONTEXT_UNKNOWN,
+ BG_ERROR_CONTEXT_GENERAL_QUEUE_MANAGER,
+ BG_ERROR_CONTEXT_QUEUE_MANAGER_NOTIFICATION,
+ BG_ERROR_CONTEXT_LOCAL_FILE,
+ BG_ERROR_CONTEXT_REMOTE_FILE,
+ BG_ERROR_CONTEXT_GENERAL_TRANSPORT,
+ BG_ERROR_CONTEXT_REMOTE_APPLICATION);
+ {$EXTERNALSYM BG_ERROR_CONTEXT}
+ TBgErrorContext = BG_ERROR_CONTEXT;
+
+const
+ IID_IBackgroundCopyError: TGUID = '{19C613A0-FCB8-4F28-81AE-897C3D078F81}';
+ {$EXTERNALSYM IID_IBackgroundCopyError}
+
+type
+ IBackgroundCopyError = interface(IUnknown)
+ ['{19c613a0-fcb8-4f28-81ae-897c3d078f81}']
+ function GetError(out pContext: BG_ERROR_CONTEXT; out pCode: HRESULT): HRESULT; stdcall;
+ // Returns BG_E_FILE_NOT_AVAILABLE if no file is available
+ function GetFile(out ppVal: IBackgroundCopyFile): HRESULT; stdcall;
+ // Return a human readable description of the error.
+ // Use CoTaskMemFree to free the description.
+ function GetErrorDescription(LanguageId: DWORD; out pErrorDescription: LPWSTR): HRESULT; stdcall;
+ // Return a human readable description of the error context.
+ // Use CoTaskMemFree to free the description.
+ function GetErrorContextDescription(LanguageId: DWORD; out pContextDescription: LPWSTR): HRESULT; stdcall;
+ // Returns BG_E_PROTOCOL_NOT_AVAILABLE if no protocol is available
+ function GetProtocol(out pProtocol: LPWSTR): HRESULT; stdcall;
+ end;
+ {$EXTERNALSYM IBackgroundCopyError}
+
+// ==============================================
+// Job Interface
+
+type
+ _BG_FILE_INFO = record
+ RemoteName: LPWSTR;
+ LocalName: LPWSTR;
+ end;
+ {$EXTERNALSYM _BG_FILE_INFO}
+ BG_FILE_INFO = _BG_FILE_INFO;
+ {$EXTERNALSYM BG_FILE_INFO}
+ TBgFileInfo = BG_FILE_INFO;
+ PBgFileInfo = ^BG_FILE_INFO;
+
+ _BG_JOB_PROGRESS = record
+ BytesTotal: UINT64;
+ BytesTransferred: UINT64;
+ FilesTotal: ULONG;
+ FilesTransferred: ULONG;
+ end;
+ {$EXTERNALSYM _BG_JOB_PROGRESS}
+ BG_JOB_PROGRESS = _BG_JOB_PROGRESS;
+ {$EXTERNALSYM BG_JOB_PROGRESS}
+ TBgJobProgress = BG_JOB_PROGRESS;
+ PBgJobProgress = ^BG_JOB_PROGRESS;
+
+ _BG_JOB_TIMES = record
+ CreationTime: FILETIME;
+ ModificationTime: FILETIME;
+ TransferCompletionTime: FILETIME;
+ end;
+ {$EXTERNALSYM _BG_JOB_TIMES}
+ BG_JOB_TIMES = _BG_JOB_TIMES;
+ {$EXTERNALSYM BG_JOB_TIMES}
+ TBgJobTimes = BG_JOB_TIMES;
+ PBgJobTimes = ^BG_JOB_TIMES;
+
+ BG_JOB_PRIORITY = (
+ BG_JOB_PRIORITY_FOREGROUND,
+ BG_JOB_PRIORITY_HIGH,
+ BG_JOB_PRIORITY_NORMAL,
+ BG_JOB_PRIORITY_LOW);
+ {$EXTERNALSYM BG_JOB_PRIORITY}
+ TBgJobPriority = BG_JOB_PRIORITY;
+ PBgJobPriority = ^BG_JOB_PRIORITY;
+
+ BG_JOB_STATE = (
+ BG_JOB_STATE_QUEUED,
+ BG_JOB_STATE_CONNECTING,
+ BG_JOB_STATE_TRANSFERRING,
+ BG_JOB_STATE_SUSPENDED,
+ BG_JOB_STATE_ERROR,
+ BG_JOB_STATE_TRANSIENT_ERROR,
+ BG_JOB_STATE_TRANSFERRED,
+ BG_JOB_STATE_ACKNOWLEDGED,
+ BG_JOB_STATE_CANCELLED);
+ {$EXTERNALSYM BG_JOB_STATE}
+ TBgJobState = BG_JOB_STATE;
+ PBgJobState = ^BG_JOB_STATE;
+
+ BG_JOB_TYPE = (
+ BG_JOB_TYPE_DOWNLOAD,
+ BG_JOB_TYPE_UPLOAD,
+ BG_JOB_TYPE_UPLOAD_REPLY);
+ {$EXTERNALSYM BG_JOB_TYPE}
+ TBgJobType = BG_JOB_TYPE;
+
+ BG_JOB_PROXY_USAGE = (
+ BG_JOB_PROXY_USAGE_PRECONFIG,
+ BG_JOB_PROXY_USAGE_NO_PROXY,
+ BG_JOB_PROXY_USAGE_OVERRIDE);
+ {$EXTERNALSYM BG_JOB_PROXY_USAGE}
+ TBgJobProxyUsage = BG_JOB_PROXY_USAGE;
+ PBgJobProxyUsage = ^BG_JOB_PROXY_USAGE;
+
+const
+ IID_IBackgroundCopyJob: TGUID = '{37668D37-507E-4160-9316-26306D150B12}';
+ {$EXTERNALSYM IID_IBackgroundCopyJob}
+
+type
+ IBackgroundCopyJob = interface(IUnknown)
+ ['{37668d37-507e-4160-9316-26306d150b12}']
+
+ //--------------------------------------------------------------------
+
+ //
+ // Returns E_INVALIDARG if one of the filesets has
+ // - local name is blank
+ // - local name contains invalid characters
+ // - remote name is blank
+ // - remote name has invalid format
+ //
+ // Returns CO_E_NOT_SUPPORTED if
+ // - remote URL contains unsupported protocol
+ //
+ function AddFileSet(cFileCount: ULONG; pFileSet: PBgFileInfo): HRESULT; stdcall;
+
+ function AddFile(RemoteUrl, LocalName: LPCWSTR): HRESULT; stdcall;
+
+ //
+ // Gets an enumerator object for all files in the job.
+ //
+ function EnumFiles(out pEnum: IEnumBackgroundCopyFiles): HRESULT; stdcall;
+
+ //
+ // Pause all activity on the job. The service will take no action until one of
+ // Resume(), Cancel(), Complete() is called.
+ //
+ // if already suspended, just returns S_OK.
+ //
+ function Suspend: HRESULT; stdcall;
+
+ //
+ // Enable downloading for this job. Job properties cannot be modified
+ // after Resume() until the app calls Suspend().
+ //
+ // if already running, just returns S_OK.
+ //
+ function Resume: HRESULT; stdcall;
+
+ //
+ // Permanently stop the job. The service will delete the job metadata and downloaded files.
+ //
+ // If already cancelled or resumed, returns ???
+ //
+ function Cancel: HRESULT; stdcall;
+
+ //
+ // Acknowledges receipt of the job-complete notification. The service will delete
+ // the job metadata and leave the downloaded files.
+ //
+ function Complete: HRESULT; stdcall;
+
+ //--------------------------------------------------------------------
+
+ function GetId(out pVal: GUID): HRESULT; stdcall;
+
+ function GetType(out pVal: BG_JOB_TYPE): HRESULT; stdcall;
+
+ function GetProgress(out pVal: BG_JOB_PROGRESS): HRESULT; stdcall;
+
+ function GetTimes(out pVal: BG_JOB_TIMES): HRESULT; stdcall;
+
+ function GetState(out pVal: BG_JOB_STATE): HRESULT; stdcall;
+
+ function GetError(out ppError: IBackgroundCopyError): HRESULT; stdcall;
+
+ //
+ // The owner of the job, represented as a string.
+ // Only the owner and admins are allowed to see or change the job.
+ //
+ function GetOwner(out pVal: LPWSTR): HRESULT; stdcall;
+
+ //
+ // name of the job, suitable for display in UI
+ //
+ function SetDisplayName(Val: LPCWSTR): HRESULT; stdcall;
+ function GetDisplayName(out pVal: LPWSTR): HRESULT; stdcall;
+
+ //
+ // a field for use by the app
+ //
+ function SetDescription(Val: LPCWSTR): HRESULT; stdcall;
+ function GetDescription(out pVal: LPWSTR): HRESULT; stdcall;
+
+ //
+ // the priority of the job in the queue.
+ // default = PRIORITY_NORMAL
+ // values not in BG_JOB_PRIORITY return E_NOTIMPL.
+ //
+ function SetPriority(Val: BG_JOB_PRIORITY): HRESULT; stdcall;
+ function GetPriority(out pVal: BG_JOB_PRIORITY): HRESULT; stdcall;
+
+ //
+ // ignores extra flags?
+ //
+ function SetNotifyFlags(Val: ULONG): HRESULT; stdcall;
+ function GetNotifyFlags(out pVal: ULONG): HRESULT; stdcall;
+
+ // interface pointer that implements the IBackgroundCallback interface for notifications.
+ // If the pointer becomes invalid, the service will try to create a new notification object
+ // with the notify CLSID.
+ function SetNotifyInterface(Val: IUnknown): HRESULT; stdcall;
+ function GetNotifyInterface(out pVal: IUnknown): HRESULT; stdcall;
+
+ function SetMinimumRetryDelay(Seconds: ULONG): HRESULT; stdcall;
+ function GetMinimumRetryDelay(out Seconds: ULONG): HRESULT; stdcall;
+
+ function SetNoProgressTimeout(Seconds: ULONG): HRESULT; stdcall;
+ function GetNoProgressTimeout(out Seconds: ULONG): HRESULT; stdcall;
+
+ function GetErrorCount(out Errors: ULONG): HRESULT; stdcall;
+
+ function SetProxySettings(ProxyUsage: BG_JOB_PROXY_USAGE; ProxyList, ProxyBypassList: PWCHAR): HRESULT; stdcall;
+
+ function GetProxySettings(pProxyUsage: BG_JOB_PROXY_USAGE; pProxyList, pProxyBypassList: LPWSTR): HRESULT; stdcall;
+
+ function TakeOwnership(): HRESULT; stdcall;
+ end;
+ {$EXTERNALSYM IBackgroundCopyJob}
+
+// ==============================================
+// IEnumJobs Interface
+// This interface allows enumerating the jobs under a Job
+
+const
+ IID_IEnumBackgroundCopyJobs: TGUID = '{1AF4F612-3B71-466F-8F58-7B6F73AC57AD}';
+ {$EXTERNALSYM IID_IEnumBackgroundCopyJobs}
+
+type
+ IEnumBackgroundCopyJobs = interface(IUnknown)
+ ['{1af4f612-3b71-466f-8f58-7b6f73ac57ad}']
+ function Next(celt: ULONG; out rgelt: IBackgroundCopyJob; pceltFetched: PULONG): HRESULT; stdcall;
+ function Skip(celt: ULONG): HRESULT; stdcall;
+ function Reset: HRESULT; stdcall;
+ function Clone(out ppenum: IEnumBackgroundCopyJobs): HRESULT; stdcall;
+ function GetCount(out puCount: ULONG): HRESULT; stdcall;
+ end;
+ {$EXTERNALSYM IEnumBackgroundCopyJobs}
+
+const
+ BG_NOTIFY_JOB_TRANSFERRED = $0001;
+ {$EXTERNALSYM BG_NOTIFY_JOB_TRANSFERRED}
+ BG_NOTIFY_JOB_ERROR = $0002;
+ {$EXTERNALSYM BG_NOTIFY_JOB_ERROR}
+ BG_NOTIFY_DISABLE = $0004;
+ {$EXTERNALSYM BG_NOTIFY_DISABLE}
+ BG_NOTIFY_JOB_MODIFICATION = $0008;
+ {$EXTERNALSYM BG_NOTIFY_JOB_MODIFICATION}
+
+// ==============================================
+// IBackgroundCallback Interface
+// This interface is implemented by the client and is used by the queue manager
+// to supply progress information to the client.
+
+const
+ IID_IBackgroundCopyCallback: TGUID = '{97EA99C7-0186-4AD4-8DF9-C5B4E0ED6B22}';
+ {$EXTERNALSYM IID_IBackgroundCopyCallback}
+
+type
+ IBackgroundCopyCallback = interface(IUnknown)
+ ['{97ea99c7-0186-4ad4-8df9-c5b4e0ed6b22}']
+ //
+ // A job has transferred successfully.
+ //
+ function JobTransferred(pJob: IBackgroundCopyJob): HRESULT; stdcall;
+
+ //
+ // An error occurred, and the service has suspended the job.
+ // Fix the error and resume the job.
+ // Get error details by calling (*pFailingJob)->GetStatus().
+ //
+ function JobError(pJob: IBackgroundCopyJob; pError: IBackgroundCopyError): HRESULT; stdcall;
+
+ //
+ // The job has been modified. Intendended for user interfaces.
+ //
+ function JobModification(pJob: IBackgroundCopyJob; dwReserved: DWORD): HRESULT; stdcall;
+
+ end;
+ {$EXTERNALSYM IBackgroundCopyCallback}
+
+//
+// IBackgroundCopyManager is the "root" interface to the background file copy component.
+//
+
+const
+ BG_JOB_ENUM_ALL_USERS = $0001;
+ {$EXTERNALSYM BG_JOB_ENUM_ALL_USERS}
+
+ IID_IBackgroundCopyManager: TGUID = '{5CE34C0D-0DC9-4C1F-897C-DAA1B78CEE7C}';
+ {$EXTERNALSYM IID_IBackgroundCopyManager}
+
+type
+ IBackgroundCopyManager = interface(IUnknown)
+ ['{5ce34c0d-0dc9-4c1f-897c-daa1b78cee7c}']
+ function CreateJob(DisplayName: LPCWSTR; Type_: BG_JOB_TYPE; out pJobId: GUID; out ppJob: IBackgroundCopyJob): HRESULT; stdcall;
+ function GetJob(const jobID: GUID; out ppJob: IBackgroundCopyJob): HRESULT; stdcall;
+
+ //
+ // Without this flag, jobs not owned by the caller are excluded from the enumeration.
+ // With this flag, those jobs are included. Only works if the caller is an administrator.
+ //
+ function EnumJobs(dwFlags: DWORD; out ppEnum: IEnumBackgroundCopyJobs): HRESULT; stdcall;
+ function GetErrorDescription(hResult: HRESULT; LanguageId: DWORD; out pErrorDescription: LPWSTR): HRESULT; stdcall;
+ end;
+ {$EXTERNALSYM IBackgroundCopyManager}
+
+//---------------------------------------------------------------------------
+
+const
+ LIBID_BackgroundCopyManager: GUID = '{4991d34b-80a1-4291-83b6-3328366b9097}';
+ {$EXTERNALSYM LIBID_BackgroundCopyManager}
+ CLSID_BackgroundCopyManager: GUID = '{4991d34b-80a1-4291-83b6-3328366b9097}';
+ {$EXTERNALSYM CLSID_BackgroundCopyManager}
+
+implementation
+
+end.
diff --git a/packages/extra/winunits/jwabits1_5.pas b/packages/extra/winunits/jwabits1_5.pas
index cceb762c0f..5fec4a0135 100644
--- a/packages/extra/winunits/jwabits1_5.pas
+++ b/packages/extra/winunits/jwabits1_5.pas
@@ -1,133 +1,133 @@
-{******************************************************************************}
-{ }
-{ Background Intelligent Transfer API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: bitscfg.h, released August 2001. The original Pascal }
-{ code is: Bits.pas, released October 2001. The initial developer of the }
-{ Pascal code is Wayne Sherman (body1233 att yahoo dott com). }
-{ }
-{ Portions created by Wayne Sherman are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwabits1_5.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaBits1_5;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "bits1_5.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaWinBase, JwaWinType, JwaBits;
-
-type
- _BG_JOB_REPLY_PROGRESS = record
- BytesTotal: UINT64;
- BytesTransferred: UINT64;
- end;
- {$EXTERNALSYM _BG_JOB_REPLY_PROGRESS}
- BG_JOB_REPLY_PROGRESS = _BG_JOB_REPLY_PROGRESS;
- {$EXTERNALSYM BG_JOB_REPLY_PROGRESS}
- TBgJobReplyProgress = BG_JOB_REPLY_PROGRESS;
- PBgJobReplyProgress = ^BG_JOB_REPLY_PROGRESS;
-
- BG_AUTH_TARGET = (
- VOID1_BG_AUTH,
- BG_AUTH_TARGET_SERVER,
- BG_AUTH_TARGET_PROXY);
- {$EXTERNALSYM BG_AUTH_TARGET}
- TBgAuthTarget = BG_AUTH_TARGET;
-
- BG_AUTH_SCHEME = (
- VOID2_BG_AUTH,
- BG_AUTH_SCHEME_BASIC,
- BG_AUTH_SCHEME_DIGEST,
- BG_AUTH_SCHEME_NTLM,
- BG_AUTH_SCHEME_NEGOTIATE,
- BG_AUTH_SCHEME_PASSPORT);
- {$EXTERNALSYM BG_AUTH_SCHEME}
- TBgAuthScheme = BG_AUTH_SCHEME;
-
- BG_BASIC_CREDENTIALS = record
- UserName: LPWSTR;
- Password: LPWSTR;
- end;
- {$EXTERNALSYM BG_BASIC_CREDENTIALS}
- TBgBasicCredentials = BG_BASIC_CREDENTIALS;
- PBgBasicCredentials = ^BG_BASIC_CREDENTIALS;
-
- BG_AUTH_CREDENTIALS = record
- Target: BG_AUTH_TARGET;
- Scheme: BG_AUTH_SCHEME;
- Credentials: BG_BASIC_CREDENTIALS;
- end;
- {$EXTERNALSYM BG_AUTH_CREDENTIALS}
- TBgAuthCredentials = BG_AUTH_CREDENTIALS;
- PBgAuthCredentials = ^BG_AUTH_CREDENTIALS;
-
-const
- IID_IBackgroundCopyJob2: TGUID = '{54b50739-686f-45eb-9dff-d6a9a0faa9af}';
- {$EXTERNALSYM IID_IBackgroundCopyJob2}
-
-type
- IBackgroundCopyJob2 = interface(IBackgroundCopyJob)
- ['{54b50739-686f-45eb-9dff-d6a9a0faa9af}']
- function SetNotifyCmdLine(_Program: LPCWSTR; Parameters: LPCWSTR): HRESULT; stdcall;
- function GetNotifyCmdLine(out _Program: LPCWSTR; out Parameters: LPCWSTR): HRESULT; stdcall;
- function GetReplyProgress(out pProgress: BG_JOB_REPLY_PROGRESS): HRESULT; stdcall;
- function GetReplyData(out ppBuffer: PByte; out pLength: UINT64): HRESULT; stdcall;
- function SetReplyFileName(ReplyFileName: LPCWSTR): HRESULT; stdcall;
- function GetReplyFileName(out pReplyFileName: LPCWSTR): HRESULT; stdcall;
- function SetCredentials(var credentials: BG_AUTH_CREDENTIALS): HRESULT; stdcall;
- function RemoveCredentials(Target: BG_AUTH_TARGET; Scheme: BG_AUTH_SCHEME): HRESULT; stdcall;
- end;
- {$EXTERNALSYM IBackgroundCopyJob2}
-
-//---------------------------------------------------------------------------
-
-const
- LIBID_BackgroundCopyManager1_5: GUID = '{f087771f-d74f-4c1a-bb8a-e16aca9124ea}';
- {$EXTERNALSYM LIBID_BackgroundCopyManager1_5}
- CLSID_BackgroundCopyManager1_5: GUID = '{f087771f-d74f-4c1a-bb8a-e16aca9124ea}';
- {$EXTERNALSYM CLSID_BackgroundCopyManager1_5}
-
-implementation
-
-end.
+{******************************************************************************}
+{ }
+{ Background Intelligent Transfer API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: bitscfg.h, released August 2001. The original Pascal }
+{ code is: Bits.pas, released October 2001. The initial developer of the }
+{ Pascal code is Wayne Sherman (body1233 att yahoo dott com). }
+{ }
+{ Portions created by Wayne Sherman are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwabits1_5.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaBits1_5;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "bits1_5.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaWinBase, JwaWinType, JwaBits;
+
+type
+ _BG_JOB_REPLY_PROGRESS = record
+ BytesTotal: UINT64;
+ BytesTransferred: UINT64;
+ end;
+ {$EXTERNALSYM _BG_JOB_REPLY_PROGRESS}
+ BG_JOB_REPLY_PROGRESS = _BG_JOB_REPLY_PROGRESS;
+ {$EXTERNALSYM BG_JOB_REPLY_PROGRESS}
+ TBgJobReplyProgress = BG_JOB_REPLY_PROGRESS;
+ PBgJobReplyProgress = ^BG_JOB_REPLY_PROGRESS;
+
+ BG_AUTH_TARGET = (
+ VOID1_BG_AUTH,
+ BG_AUTH_TARGET_SERVER,
+ BG_AUTH_TARGET_PROXY);
+ {$EXTERNALSYM BG_AUTH_TARGET}
+ TBgAuthTarget = BG_AUTH_TARGET;
+
+ BG_AUTH_SCHEME = (
+ VOID2_BG_AUTH,
+ BG_AUTH_SCHEME_BASIC,
+ BG_AUTH_SCHEME_DIGEST,
+ BG_AUTH_SCHEME_NTLM,
+ BG_AUTH_SCHEME_NEGOTIATE,
+ BG_AUTH_SCHEME_PASSPORT);
+ {$EXTERNALSYM BG_AUTH_SCHEME}
+ TBgAuthScheme = BG_AUTH_SCHEME;
+
+ BG_BASIC_CREDENTIALS = record
+ UserName: LPWSTR;
+ Password: LPWSTR;
+ end;
+ {$EXTERNALSYM BG_BASIC_CREDENTIALS}
+ TBgBasicCredentials = BG_BASIC_CREDENTIALS;
+ PBgBasicCredentials = ^BG_BASIC_CREDENTIALS;
+
+ BG_AUTH_CREDENTIALS = record
+ Target: BG_AUTH_TARGET;
+ Scheme: BG_AUTH_SCHEME;
+ Credentials: BG_BASIC_CREDENTIALS;
+ end;
+ {$EXTERNALSYM BG_AUTH_CREDENTIALS}
+ TBgAuthCredentials = BG_AUTH_CREDENTIALS;
+ PBgAuthCredentials = ^BG_AUTH_CREDENTIALS;
+
+const
+ IID_IBackgroundCopyJob2: TGUID = '{54b50739-686f-45eb-9dff-d6a9a0faa9af}';
+ {$EXTERNALSYM IID_IBackgroundCopyJob2}
+
+type
+ IBackgroundCopyJob2 = interface(IBackgroundCopyJob)
+ ['{54b50739-686f-45eb-9dff-d6a9a0faa9af}']
+ function SetNotifyCmdLine(_Program: LPCWSTR; Parameters: LPCWSTR): HRESULT; stdcall;
+ function GetNotifyCmdLine(out _Program: LPCWSTR; out Parameters: LPCWSTR): HRESULT; stdcall;
+ function GetReplyProgress(out pProgress: BG_JOB_REPLY_PROGRESS): HRESULT; stdcall;
+ function GetReplyData(out ppBuffer: PByte; out pLength: UINT64): HRESULT; stdcall;
+ function SetReplyFileName(ReplyFileName: LPCWSTR): HRESULT; stdcall;
+ function GetReplyFileName(out pReplyFileName: LPCWSTR): HRESULT; stdcall;
+ function SetCredentials(var credentials: BG_AUTH_CREDENTIALS): HRESULT; stdcall;
+ function RemoveCredentials(Target: BG_AUTH_TARGET; Scheme: BG_AUTH_SCHEME): HRESULT; stdcall;
+ end;
+ {$EXTERNALSYM IBackgroundCopyJob2}
+
+//---------------------------------------------------------------------------
+
+const
+ LIBID_BackgroundCopyManager1_5: GUID = '{f087771f-d74f-4c1a-bb8a-e16aca9124ea}';
+ {$EXTERNALSYM LIBID_BackgroundCopyManager1_5}
+ CLSID_BackgroundCopyManager1_5: GUID = '{f087771f-d74f-4c1a-bb8a-e16aca9124ea}';
+ {$EXTERNALSYM CLSID_BackgroundCopyManager1_5}
+
+implementation
+
+end.
diff --git a/packages/extra/winunits/jwabitscfg.pas b/packages/extra/winunits/jwabitscfg.pas
index 18f725b49d..24159b4358 100644
--- a/packages/extra/winunits/jwabitscfg.pas
+++ b/packages/extra/winunits/jwabitscfg.pas
@@ -1,92 +1,92 @@
-{******************************************************************************}
-{ }
-{ Background Intelligent Transfer API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: bitscfg.h, released August 2001. The original Pascal }
-{ code is: Bits.pas, released October 2001. The initial developer of the }
-{ Pascal code is Wayne Sherman (body1233 att yahoo dott com). }
-{ }
-{ Portions created by Wayne Sherman are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwabitscfg.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaBitscfg;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "bitscfg.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaWinBase, JwaWinType;
-
-const
- IID_IBITSExtensionSetup: TGUID = '{29cfbbf7-09e4-4b97-b0bc-f2287e3d8eb3}';
- {$EXTERNALSYM IID_IBITSExtensionSetup}
-
-type
- REFIID = TGUID; // also in ActiveDS and another unit
-
- IBITSExtensionSetup = interface(IDispatch)
- ['{29cfbbf7-09e4-4b97-b0bc-f2287e3d8eb3}']
- function EnableBITSUploads: HRESULT; stdcall;
- function DisableBITSUploads: HRESULT; stdcall;
- function GetCleanupTaskName(out pTaskName: WideString): HRESULT; stdcall;
- function GetCleanupTask(riid: REFIID; out ppUnk: IUnknown): HRESULT; stdcall;
- end;
- {$EXTERNALSYM IBITSExtensionSetup}
-
- IBITSExtensionSetupFactory = interface (IDispatch)
- ['{d5d2d542-5503-4e64-8b48-72ef91a32ee1}']
- function GetObject(Path: WideString; out ppExtensionSetup: IBITSExtensionSetup): HRESULT; stdcall;
- end;
- {$EXTERNALSYM IBITSExtensionSetupFactory}
-
-//---------------------------------------------------------------------------
-
-const
- LIBID_BITSExtensionSetup: GUID = '{efbbab68-7286-4783-94bf-9461d8b7e7e9}';
- {$EXTERNALSYM LIBID_BITSExtensionSetup}
- CLSID_BITSExtensionSetupFactory: GUID = '{efbbab68-7286-4783-94bf-9461d8b7e7e9}';
- {$EXTERNALSYM CLSID_BITSExtensionSetupFactory}
-
-implementation
-
-end.
+{******************************************************************************}
+{ }
+{ Background Intelligent Transfer API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: bitscfg.h, released August 2001. The original Pascal }
+{ code is: Bits.pas, released October 2001. The initial developer of the }
+{ Pascal code is Wayne Sherman (body1233 att yahoo dott com). }
+{ }
+{ Portions created by Wayne Sherman are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwabitscfg.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaBitscfg;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "bitscfg.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaWinBase, JwaWinType;
+
+const
+ IID_IBITSExtensionSetup: TGUID = '{29cfbbf7-09e4-4b97-b0bc-f2287e3d8eb3}';
+ {$EXTERNALSYM IID_IBITSExtensionSetup}
+
+type
+ REFIID = TGUID; // also in ActiveDS and another unit
+
+ IBITSExtensionSetup = interface(IDispatch)
+ ['{29cfbbf7-09e4-4b97-b0bc-f2287e3d8eb3}']
+ function EnableBITSUploads: HRESULT; stdcall;
+ function DisableBITSUploads: HRESULT; stdcall;
+ function GetCleanupTaskName(out pTaskName: WideString): HRESULT; stdcall;
+ function GetCleanupTask(riid: REFIID; out ppUnk: IUnknown): HRESULT; stdcall;
+ end;
+ {$EXTERNALSYM IBITSExtensionSetup}
+
+ IBITSExtensionSetupFactory = interface (IDispatch)
+ ['{d5d2d542-5503-4e64-8b48-72ef91a32ee1}']
+ function GetObject(Path: WideString; out ppExtensionSetup: IBITSExtensionSetup): HRESULT; stdcall;
+ end;
+ {$EXTERNALSYM IBITSExtensionSetupFactory}
+
+//---------------------------------------------------------------------------
+
+const
+ LIBID_BITSExtensionSetup: GUID = '{efbbab68-7286-4783-94bf-9461d8b7e7e9}';
+ {$EXTERNALSYM LIBID_BITSExtensionSetup}
+ CLSID_BITSExtensionSetupFactory: GUID = '{efbbab68-7286-4783-94bf-9461d8b7e7e9}';
+ {$EXTERNALSYM CLSID_BITSExtensionSetupFactory}
+
+implementation
+
+end.
diff --git a/packages/extra/winunits/jwabitsmsg.pas b/packages/extra/winunits/jwabitsmsg.pas
index c3a3a460eb..2f3a68a0c4 100644
--- a/packages/extra/winunits/jwabitsmsg.pas
+++ b/packages/extra/winunits/jwabitsmsg.pas
@@ -1,996 +1,996 @@
-{******************************************************************************}
-{ }
-{ Background file copier error codes API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: bitsmsg.h, released June 2000. The original Pascal }
-{ code is: BitsMsg.pas, released December 2000. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwabitsmsg.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaBitsMsg;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "BitsMsg.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaWinType;
-
-//
-// Values are 32 bit values layed out as follows:
-//
-// 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1
-// 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
-// +---+-+-+-----------------------+-------------------------------+
-// |Sev|C|R| Facility | Code |
-// +---+-+-+-----------------------+-------------------------------+
-//
-// where
-//
-// Sev - is the severity code
-//
-// 00 - Success
-// 01 - Informational
-// 10 - Warning
-// 11 - Error
-//
-// C - is the Customer code flag
-//
-// R - is a reserved bit
-//
-// Facility - is the facility code
-//
-// Code - is the facility's status code
-//
-//
-// Define the facility codes
-//
-
-//
-// Define the severity codes
-//
-
-const
-
-//
-// MessageId: BG_E_NOT_FOUND
-//
-// MessageText:
-//
-// The requested job was not found.
-//
- BG_E_NOT_FOUND = DWORD($80200001);
- {$EXTERNALSYM BG_E_NOT_FOUND}
-
-//
-// MessageId: BG_E_INVALID_STATE
-//
-// MessageText:
-//
-// The requested action is not allowed in the current job state. The job might have been canceled or completed transferring. It is in a read-only state now.
-//
- BG_E_INVALID_STATE = DWORD($80200002);
- {$EXTERNALSYM BG_E_INVALID_STATE}
-
-//
-// MessageId: BG_E_EMPTY
-//
-// MessageText:
-//
-// There are no files attached to this job. Attach files to the job, and then try again.
-//
- BG_E_EMPTY = DWORD($80200003);
- {$EXTERNALSYM BG_E_EMPTY}
-
-//
-// MessageId: BG_E_FILE_NOT_AVAILABLE
-//
-// MessageText:
-//
-// No file is available because no URL generated an error.
-//
- BG_E_FILE_NOT_AVAILABLE = DWORD($80200004);
- {$EXTERNALSYM BG_E_FILE_NOT_AVAILABLE}
-
-//
-// MessageId: BG_E_PROTOCOL_NOT_AVAILABLE
-//
-// MessageText:
-//
-// No protocol is available because no URL generated an error.
-//
- BG_E_PROTOCOL_NOT_AVAILABLE = DWORD($80200005);
- {$EXTERNALSYM BG_E_PROTOCOL_NOT_AVAILABLE}
-
-//
-// MessageId: BG_S_ERROR_CONTEXT_NONE
-//
-// MessageText:
-//
-// No errors have occurred.
-//
- BG_S_ERROR_CONTEXT_NONE = DWORD($00200006);
- {$EXTERNALSYM BG_S_ERROR_CONTEXT_NONE}
-
-//
-// MessageId: BG_E_ERROR_CONTEXT_UNKNOWN
-//
-// MessageText:
-//
-// The error occurred in an unknown location.
-//
- BG_E_ERROR_CONTEXT_UNKNOWN = DWORD($80200007);
- {$EXTERNALSYM BG_E_ERROR_CONTEXT_UNKNOWN}
-
-//
-// MessageId: BG_E_ERROR_CONTEXT_GENERAL_QUEUE_MANAGER
-//
-// MessageText:
-//
-// The error occurred in the Background Intelligent Transfer Service (BITS) queue manager.
-//
- BG_E_ERROR_CONTEXT_GENERAL_QUEUE_MANAGER = DWORD($80200008);
- {$EXTERNALSYM BG_E_ERROR_CONTEXT_GENERAL_QUEUE_MANAGER}
-
-//
-// MessageId: BG_E_ERROR_CONTEXT_LOCAL_FILE
-//
-// MessageText:
-//
-// The error occurred while the local file was being processed. Verify that the file is not in use, and then try again.
-//
- BG_E_ERROR_CONTEXT_LOCAL_FILE = DWORD($80200009);
- {$EXTERNALSYM BG_E_ERROR_CONTEXT_LOCAL_FILE}
-
-//
-// MessageId: BG_E_ERROR_CONTEXT_REMOTE_FILE
-//
-// MessageText:
-//
-// The error occurred while the remote file was being processed.
-//
- BG_E_ERROR_CONTEXT_REMOTE_FILE = DWORD($8020000A);
- {$EXTERNALSYM BG_E_ERROR_CONTEXT_REMOTE_FILE}
-
-//
-// MessageId: BG_E_ERROR_CONTEXT_GENERAL_TRANSPORT
-//
-// MessageText:
-//
-// The error occurred in the transport layer. The client could not connect to the server.
-//
- BG_E_ERROR_CONTEXT_GENERAL_TRANSPORT = DWORD($8020000B);
- {$EXTERNALSYM BG_E_ERROR_CONTEXT_GENERAL_TRANSPORT}
-
-//
-// MessageId: BG_E_ERROR_CONTEXT_QUEUE_MANAGER_NOTIFICATION
-//
-// MessageText:
-//
-// The error occurred while the notification callback was being processed. Background Intelligent Transfer Service (BITS) will try again later.
-//
- BG_E_ERROR_CONTEXT_QUEUE_MANAGER_NOTIFICATION = DWORD($8020000C);
- {$EXTERNALSYM BG_E_ERROR_CONTEXT_QUEUE_MANAGER_NOTIFICATION}
-
-//
-// MessageId: BG_E_DESTINATION_LOCKED
-//
-// MessageText:
-//
-// The destination file system volume is not available. Verify that another program, such as CheckDisk, is not running, which would lock the volume. When the volume is available, Background Intelligent Transfer Service (BITS) will try again.
-//
- BG_E_DESTINATION_LOCKED = DWORD($8020000D);
- {$EXTERNALSYM BG_E_DESTINATION_LOCKED}
-
-//
-// MessageId: BG_E_VOLUME_CHANGED
-//
-// MessageText:
-//
-// The destination volume has changed. If the disk is removable, it might have been replaced with a different disk. Reinsert the original disk and resume the job.
-//
- BG_E_VOLUME_CHANGED = DWORD($8020000E);
- {$EXTERNALSYM BG_E_VOLUME_CHANGED}
-
-//
-// MessageId: BG_E_ERROR_INFORMATION_UNAVAILABLE
-//
-// MessageText:
-//
-// No errors have occurred.
-//
- BG_E_ERROR_INFORMATION_UNAVAILABLE = DWORD($8020000F);
- {$EXTERNALSYM BG_E_ERROR_INFORMATION_UNAVAILABLE}
-
-//
-// MessageId: BG_E_NETWORK_DISCONNECTED
-//
-// MessageText:
-//
-// There are currently no active network connections. Background Intelligent Transfer Service (BITS) will try again when an adapter is connected.
-//
- BG_E_NETWORK_DISCONNECTED = DWORD($80200010);
- {$EXTERNALSYM BG_E_NETWORK_DISCONNECTED}
-
-//
-// MessageId: BG_E_MISSING_FILE_SIZE
-//
-// MessageText:
-//
-// The server did not return the file size. The URL might point to dynamic content. The Content-Length header is not available in the server's HTTP reply.
-//
- BG_E_MISSING_FILE_SIZE = DWORD($80200011);
- {$EXTERNALSYM BG_E_MISSING_FILE_SIZE}
-
-//
-// MessageId: BG_E_INSUFFICIENT_HTTP_SUPPORT
-//
-// MessageText:
-//
-// The server does not support HTTP 1.1.
-//
- BG_E_INSUFFICIENT_HTTP_SUPPORT = DWORD($80200012);
- {$EXTERNALSYM BG_E_INSUFFICIENT_HTTP_SUPPORT}
-
-//
-// MessageId: BG_E_INSUFFICIENT_RANGE_SUPPORT
-//
-// MessageText:
-//
-// The server does not support the necessary HTTP protocol. Background Intelligent Transfer Service (BITS) requires that the server support the Range protocol header.
-//
- BG_E_INSUFFICIENT_RANGE_SUPPORT = DWORD($80200013);
- {$EXTERNALSYM BG_E_INSUFFICIENT_RANGE_SUPPORT}
-
-//
-// MessageId: BG_E_REMOTE_NOT_SUPPORTED
-//
-// MessageText:
-//
-// Background Intelligent Transfer Service (BITS) cannot be used remotely.
-//
- BG_E_REMOTE_NOT_SUPPORTED = DWORD($80200014);
- {$EXTERNALSYM BG_E_REMOTE_NOT_SUPPORTED}
-
-//
-// MessageId: BG_E_NEW_OWNER_DIFF_MAPPING
-//
-// MessageText:
-//
-// The drive mapping for the job is different for the current owner than for the previous owner. Use a UNC path instead.
-//
- BG_E_NEW_OWNER_DIFF_MAPPING = DWORD($80200015);
- {$EXTERNALSYM BG_E_NEW_OWNER_DIFF_MAPPING}
-
-//
-// MessageId: BG_E_NEW_OWNER_NO_FILE_ACCESS
-//
-// MessageText:
-//
-// The new owner has insufficient access to the local files for the job. The new owner might not have permissions to access the job files. Verify that the new owner has sufficient permissions, and then try again.
-//
- BG_E_NEW_OWNER_NO_FILE_ACCESS = DWORD($80200016);
- {$EXTERNALSYM BG_E_NEW_OWNER_NO_FILE_ACCESS}
-
-//
-// MessageId: BG_S_PARTIAL_COMPLETE
-//
-// MessageText:
-//
-// Some of the transferred files were deleted because they were incomplete.
-//
- BG_S_PARTIAL_COMPLETE = DWORD($00200017);
- {$EXTERNALSYM BG_S_PARTIAL_COMPLETE}
-
-//
-// MessageId: BG_E_PROXY_LIST_TOO_LARGE
-//
-// MessageText:
-//
-// The HTTP proxy list cannot be longer than 32,000 characters. Try again with a shorter proxy list.
-//
- BG_E_PROXY_LIST_TOO_LARGE = DWORD($80200018);
- {$EXTERNALSYM BG_E_PROXY_LIST_TOO_LARGE}
-
-//
-// MessageId: BG_E_PROXY_BYPASS_LIST_TOO_LARGE
-//
-// MessageText:
-//
-// The HTTP proxy bypass list cannot be longer than 32,000 characters. Try again with a shorter bypass proxy list.
-//
- BG_E_PROXY_BYPASS_LIST_TOO_LARGE = DWORD($80200019);
- {$EXTERNALSYM BG_E_PROXY_BYPASS_LIST_TOO_LARGE}
-
-//
-// MessageId: BG_S_UNABLE_TO_DELETE_FILES
-//
-// MessageText:
-//
-// Some of the temporary files could not be deleted. Check the system event log for the complete list of files that could not be deleted.
-//
- BG_S_UNABLE_TO_DELETE_FILES = DWORD($0020001A);
- {$EXTERNALSYM BG_S_UNABLE_TO_DELETE_FILES}
-
-//
-// MessageId: BG_E_INVALID_SERVER_RESPONSE
-//
-// MessageText:
-//
-// The server's response was not valid. The server was not following the defined protocol. Resume the job, and then Background Intelligent Transfer Service (BITS) will try again.
-//
- BG_E_INVALID_SERVER_RESPONSE = DWORD($8020001B);
- {$EXTERNALSYM BG_E_INVALID_SERVER_RESPONSE}
-
-//
-// MessageId: BG_E_TOO_MANY_FILES
-//
-// MessageText:
-//
-// No more files can be added to this job.
-//
- BG_E_TOO_MANY_FILES = DWORD($8020001C);
- {$EXTERNALSYM BG_E_TOO_MANY_FILES}
-
-//
-// MessageId: BG_E_LOCAL_FILE_CHANGED
-//
-// MessageText:
-//
-// The local file was changed during the transfer. Recreate the job, and then try to transfer it again.
-//
- BG_E_LOCAL_FILE_CHANGED = DWORD($8020001D);
- {$EXTERNALSYM BG_E_LOCAL_FILE_CHANGED}
-
-//
-// MessageId: BG_E_ERROR_CONTEXT_REMOTE_APPLICATION
-//
-// MessageText:
-//
-// The program on the remote server reported the error.
-//
- BG_E_ERROR_CONTEXT_REMOTE_APPLICATION = DWORD($8020001E);
- {$EXTERNALSYM BG_E_ERROR_CONTEXT_REMOTE_APPLICATION}
-
-//
-// MessageId: BG_E_SESSION_NOT_FOUND
-//
-// MessageText:
-//
-// The specified session could not be found on the server. Background Intelligent Transfer Service (BITS) will try again.
-//
- BG_E_SESSION_NOT_FOUND = DWORD($8020001F);
- {$EXTERNALSYM BG_E_SESSION_NOT_FOUND}
-
-//
-// MessageId: BG_E_TOO_LARGE
-//
-// MessageText:
-//
-// The job is too large for the server to accept. This job might exceed a job size limit set by the server administrator. Reduce the size of the job, and then try again.
-//
- BG_E_TOO_LARGE = DWORD($80200020);
- {$EXTERNALSYM BG_E_TOO_LARGE}
-
-//
-// MessageId: BG_E_STRING_TOO_LONG
-//
-// MessageText:
-//
-// The specified string is too long.
-//
- BG_E_STRING_TOO_LONG = DWORD($80200021);
- {$EXTERNALSYM BG_E_STRING_TOO_LONG}
-
-//
-// MessageId: BG_E_CLIENT_SERVER_PROTOCOL_MISMATCH
-//
-// MessageText:
-//
-// The client and server versions of Background Intelligent Transfer Service (BITS) are incompatible.
-//
- BG_E_CLIENT_SERVER_PROTOCOL_MISMATCH = DWORD($80200022);
- {$EXTERNALSYM BG_E_CLIENT_SERVER_PROTOCOL_MISMATCH}
-
-//
-// MessageId: BG_E_SERVER_EXECUTE_ENABLE
-//
-// MessageText:
-//
-// Scripting OR execute permissions are enabled on the IIS virtual directory associated with the job. To upload files to the virtual directory, disable the scripting and execute permissions on the virtual directory.
-//
- BG_E_SERVER_EXECUTE_ENABLE = DWORD($80200023);
- {$EXTERNALSYM BG_E_SERVER_EXECUTE_ENABLE}
-
-//
-// MessageId: BG_E_NO_PROGRESS
-//
-// MessageText:
-//
-// The job is not making headway. The server may be misconfigured. Background Intelligent Transfer Service (BITS) will try again later.
-//
- BG_E_NO_PROGRESS = DWORD($80200024);
- {$EXTERNALSYM BG_E_NO_PROGRESS}
-
-//
-// MessageId: BG_E_USERNAME_TOO_LARGE
-//
-// MessageText:
-//
-// The user name cannot be longer than 300 characters. Try again with a shorter name.
-//
- BG_E_USERNAME_TOO_LARGE = DWORD($80200025);
- {$EXTERNALSYM BG_E_USERNAME_TOO_LARGE}
-
-//
-// MessageId: BG_E_PASSWORD_TOO_LARGE
-//
-// MessageText:
-//
-// The password cannot be longer than 300 characters. Try again with a shorter password.
-//
- BG_E_PASSWORD_TOO_LARGE = DWORD($80200026);
- {$EXTERNALSYM BG_E_PASSWORD_TOO_LARGE}
-
-//
-// MessageId: BG_E_INVALID_AUTH_TARGET
-//
-// MessageText:
-//
-// The authentication target specified in the credentials is not defined.
-//
- BG_E_INVALID_AUTH_TARGET = DWORD($80200027);
- {$EXTERNALSYM BG_E_INVALID_AUTH_TARGET}
-
-//
-// MessageId: BG_E_INVALID_AUTH_SCHEME
-//
-// MessageText:
-//
-// The authentication scheme specified in the credentials is not defined.
-//
- BG_E_INVALID_AUTH_SCHEME = DWORD($80200028);
- {$EXTERNALSYM BG_E_INVALID_AUTH_SCHEME}
-
-//
-// MessageId: BG_E_HTTP_ERROR_100
-//
-// MessageText:
-//
-// The request can be continued.
-//
- BG_E_HTTP_ERROR_100 = DWORD($80190064);
- {$EXTERNALSYM BG_E_HTTP_ERROR_100}
-
-//
-// MessageId: BG_E_HTTP_ERROR_101
-//
-// MessageText:
-//
-// The server switched protocols in an upgrade header.
-//
- BG_E_HTTP_ERROR_101 = DWORD($80190065);
- {$EXTERNALSYM BG_E_HTTP_ERROR_101}
-
-//
-// MessageId: BG_E_HTTP_ERROR_200
-//
-// MessageText:
-//
-// The server's response was not valid. The server was not following the defined protocol. Resume the job, and then Background Intelligent Transfer Service (BITS) will try again.
-//
- BG_E_HTTP_ERROR_200 = DWORD($801900C8);
- {$EXTERNALSYM BG_E_HTTP_ERROR_200}
-
-//
-// MessageId: BG_E_HTTP_ERROR_201
-//
-// MessageText:
-//
-// The request was fulfilled and resulted in the creation of a new resource.
-//
- BG_E_HTTP_ERROR_201 = DWORD($801900C9);
- {$EXTERNALSYM BG_E_HTTP_ERROR_201}
-
-//
-// MessageId: BG_E_HTTP_ERROR_202
-//
-// MessageText:
-//
-// The request was accepted for processing, but the processing has not been completed yet.
-//
- BG_E_HTTP_ERROR_202 = DWORD($801900CA);
- {$EXTERNALSYM BG_E_HTTP_ERROR_202}
-
-//
-// MessageId: BG_E_HTTP_ERROR_203
-//
-// MessageText:
-//
-// The returned metadata in the entity-header is not the definitive set available from the server of origin.
-//
- BG_E_HTTP_ERROR_203 = DWORD($801900CB);
- {$EXTERNALSYM BG_E_HTTP_ERROR_203}
-
-//
-// MessageId: BG_E_HTTP_ERROR_204
-//
-// MessageText:
-//
-// The server has fulfilled the request, but there is no new information to send back.
-//
- BG_E_HTTP_ERROR_204 = DWORD($801900CC);
- {$EXTERNALSYM BG_E_HTTP_ERROR_204}
-
-//
-// MessageId: BG_E_HTTP_ERROR_205
-//
-// MessageText:
-//
-// The server's response was not valid. The server was not following the defined protocol. Resume the job, and then Background Intelligent Transfer Service (BITS) will try again.
-//
- BG_E_HTTP_ERROR_205 = DWORD($801900CD);
- {$EXTERNALSYM BG_E_HTTP_ERROR_205}
-
-//
-// MessageId: BG_E_HTTP_ERROR_206
-//
-// MessageText:
-//
-// The server fulfilled the partial GET request for the resource.
-//
- BG_E_HTTP_ERROR_206 = DWORD($801900CE);
- {$EXTERNALSYM BG_E_HTTP_ERROR_206}
-
-//
-// MessageId: BG_E_HTTP_ERROR_300
-//
-// MessageText:
-//
-// The server could not return the requested data.
-//
- BG_E_HTTP_ERROR_300 = DWORD($8019012C);
- {$EXTERNALSYM BG_E_HTTP_ERROR_300}
-
-//
-// MessageId: BG_E_HTTP_ERROR_301
-//
-// MessageText:
-//
-// The requested resource was assigned to a new permanent Uniform Resource Identifier (URI), and any future references to this resource should use one of the returned URIs.
-//
- BG_E_HTTP_ERROR_301 = DWORD($8019012D);
- {$EXTERNALSYM BG_E_HTTP_ERROR_301}
-
-//
-// MessageId: BG_E_HTTP_ERROR_302
-//
-// MessageText:
-//
-// The requested resource was assigned a different Uniform Resource Identifier (URI). This change is temporary.
-//
- BG_E_HTTP_ERROR_302 = DWORD($8019012E);
- {$EXTERNALSYM BG_E_HTTP_ERROR_302}
-
-//
-// MessageId: BG_E_HTTP_ERROR_303
-//
-// MessageText:
-//
-// The response to the request is under a different Uniform Resource Identifier (URI) and must be retrieved using a GET method on that resource.
-//
- BG_E_HTTP_ERROR_303 = DWORD($8019012F);
- {$EXTERNALSYM BG_E_HTTP_ERROR_303}
-
-//
-// MessageId: BG_E_HTTP_ERROR_304
-//
-// MessageText:
-//
-// The server's response was not valid. The server was not following the defined protocol. Resume the job, and then Background Intelligent Transfer Service (BITS) will try again.
-//
- BG_E_HTTP_ERROR_304 = DWORD($80190130);
- {$EXTERNALSYM BG_E_HTTP_ERROR_304}
-
-//
-// MessageId: BG_E_HTTP_ERROR_305
-//
-// MessageText:
-//
-// The requested resource must be accessed through the proxy given by the location field.
-//
- BG_E_HTTP_ERROR_305 = DWORD($80190131);
- {$EXTERNALSYM BG_E_HTTP_ERROR_305}
-
-//
-// MessageId: BG_E_HTTP_ERROR_307
-//
-// MessageText:
-//
-// The URL has been temporarily relocated. Try again later.
-//
- BG_E_HTTP_ERROR_307 = DWORD($80190133);
- {$EXTERNALSYM BG_E_HTTP_ERROR_307}
-
-//
-// MessageId: BG_E_HTTP_ERROR_400
-//
-// MessageText:
-//
-// The server cannot process the request because the syntax is not valid.
-//
- BG_E_HTTP_ERROR_400 = DWORD($80190190);
- {$EXTERNALSYM BG_E_HTTP_ERROR_400}
-
-//
-// MessageId: BG_E_HTTP_ERROR_401
-//
-// MessageText:
-//
-// The requested resource requires user authentication.
-//
- BG_E_HTTP_ERROR_401 = DWORD($80190191);
- {$EXTERNALSYM BG_E_HTTP_ERROR_401}
-
-//
-// MessageId: BG_E_HTTP_ERROR_402
-//
-// MessageText:
-//
-// The server's response was not valid. The server was not following the defined protocol. Resume the job, and then Background Intelligent Transfer Service (BITS) will try again.
-//
- BG_E_HTTP_ERROR_402 = DWORD($80190192);
- {$EXTERNALSYM BG_E_HTTP_ERROR_402}
-
-//
-// MessageId: BG_E_HTTP_ERROR_403
-//
-// MessageText:
-//
-// The client does not have sufficient access rights to the requested server object.
-//
- BG_E_HTTP_ERROR_403 = DWORD($80190193);
- {$EXTERNALSYM BG_E_HTTP_ERROR_403}
-
-//
-// MessageId: BG_E_HTTP_ERROR_404
-//
-// MessageText:
-//
-// The requested URL does not exist on the server.
-//
- BG_E_HTTP_ERROR_404 = DWORD($80190194);
- {$EXTERNALSYM BG_E_HTTP_ERROR_404}
-
-//
-// MessageId: BG_E_HTTP_ERROR_405
-//
-// MessageText:
-//
-// The method used is not allowed.
-//
- BG_E_HTTP_ERROR_405 = DWORD($80190195);
- {$EXTERNALSYM BG_E_HTTP_ERROR_405}
-
-//
-// MessageId: BG_E_HTTP_ERROR_406
-//
-// MessageText:
-//
-// No responses acceptable to the client were found.
-//
- BG_E_HTTP_ERROR_406 = DWORD($80190196);
- {$EXTERNALSYM BG_E_HTTP_ERROR_406}
-
-//
-// MessageId: BG_E_HTTP_ERROR_407
-//
-// MessageText:
-//
-// Proxy authentication is required.
-//
- BG_E_HTTP_ERROR_407 = DWORD($80190197);
- {$EXTERNALSYM BG_E_HTTP_ERROR_407}
-
-//
-// MessageId: BG_E_HTTP_ERROR_408
-//
-// MessageText:
-//
-// The server timed out waiting for the request.
-//
- BG_E_HTTP_ERROR_408 = DWORD($80190198);
- {$EXTERNALSYM BG_E_HTTP_ERROR_408}
-
-//
-// MessageId: BG_E_HTTP_ERROR_409
-//
-// MessageText:
-//
-// The request could not be completed because of a conflict with the current state of the resource. The user should resubmit the request with more information.
-//
- BG_E_HTTP_ERROR_409 = DWORD($80190199);
- {$EXTERNALSYM BG_E_HTTP_ERROR_409}
-
-//
-// MessageId: BG_E_HTTP_ERROR_410
-//
-// MessageText:
-//
-// The requested resource is not currently available at the server, and no forwarding address is known.
-//
- BG_E_HTTP_ERROR_410 = DWORD($8019019A);
- {$EXTERNALSYM BG_E_HTTP_ERROR_410}
-
-//
-// MessageId: BG_E_HTTP_ERROR_411
-//
-// MessageText:
-//
-// The server cannot accept the request without a defined content length.
-//
- BG_E_HTTP_ERROR_411 = DWORD($8019019B);
- {$EXTERNALSYM BG_E_HTTP_ERROR_411}
-
-//
-// MessageId: BG_E_HTTP_ERROR_412
-//
-// MessageText:
-//
-// The precondition given in one or more of the request header fields evaluated to false when it was tested on the server.
-//
- BG_E_HTTP_ERROR_412 = DWORD($8019019C);
- {$EXTERNALSYM BG_E_HTTP_ERROR_412}
-
-//
-// MessageId: BG_E_HTTP_ERROR_413
-//
-// MessageText:
-//
-// The server cannot process the request because the request entity is too large.
-//
- BG_E_HTTP_ERROR_413 = DWORD($8019019D);
- {$EXTERNALSYM BG_E_HTTP_ERROR_413}
-
-//
-// MessageId: BG_E_HTTP_ERROR_414
-//
-// MessageText:
-//
-// The server cannot process the request because the request Uniform Resource Identifier (URI) is longer than the server can interpret.
-//
- BG_E_HTTP_ERROR_414 = DWORD($8019019E);
- {$EXTERNALSYM BG_E_HTTP_ERROR_414}
-
-//
-// MessageId: BG_E_HTTP_ERROR_415
-//
-// MessageText:
-//
-// The server's response was not valid. The server was not following the defined protocol. Resume the job, and then Background Intelligent Transfer Service (BITS) will try again.
-//
- BG_E_HTTP_ERROR_415 = DWORD($8019019F);
- {$EXTERNALSYM BG_E_HTTP_ERROR_415}
-
-//
-// MessageId: BG_E_HTTP_ERROR_416
-//
-// MessageText:
-//
-// The server could not satisfy the range request.
-//
- BG_E_HTTP_ERROR_416 = DWORD($801901A0);
- {$EXTERNALSYM BG_E_HTTP_ERROR_416}
-
-//
-// MessageId: BG_E_HTTP_ERROR_417
-//
-// MessageText:
-//
-// The server could not meet the expectation given in an Expect request-header field.
-//
- BG_E_HTTP_ERROR_417 = DWORD($801901A1);
- {$EXTERNALSYM BG_E_HTTP_ERROR_417}
-
-//
-// MessageId: BG_E_HTTP_ERROR_449
-//
-// MessageText:
-//
-// The server's response was not valid. The server was not following the defined protocol. Resume the job, and then Background Intelligent Transfer Service (BITS) will try again.
-//
- BG_E_HTTP_ERROR_449 = DWORD($801901C1);
- {$EXTERNALSYM BG_E_HTTP_ERROR_449}
-
-//
-// MessageId: BG_E_HTTP_ERROR_500
-//
-// MessageText:
-//
-// An unexpected condition prevented the server from fulfilling the request.
-//
- BG_E_HTTP_ERROR_500 = DWORD($801901F4);
- {$EXTERNALSYM BG_E_HTTP_ERROR_500}
-
-//
-// MessageId: BG_E_HTTP_ERROR_501
-//
-// MessageText:
-//
-// The server does not support the functionality required to fulfill the request.
-//
- BG_E_HTTP_ERROR_501 = DWORD($801901F5);
- {$EXTERNALSYM BG_E_HTTP_ERROR_501}
-
-//
-// MessageId: BG_E_HTTP_ERROR_502
-//
-// MessageText:
-//
-// The server, while acting as a gateway or proxy to fulfill the request, received an invalid response from the upstream server it accessed.
-//
- BG_E_HTTP_ERROR_502 = DWORD($801901F6);
- {$EXTERNALSYM BG_E_HTTP_ERROR_502}
-
-//
-// MessageId: BG_E_HTTP_ERROR_503
-//
-// MessageText:
-//
-// The service is temporarily overloaded.
-//
- BG_E_HTTP_ERROR_503 = DWORD($801901F7);
- {$EXTERNALSYM BG_E_HTTP_ERROR_503}
-
-//
-// MessageId: BG_E_HTTP_ERROR_504
-//
-// MessageText:
-//
-// The request was timed out waiting for a gateway.
-//
- BG_E_HTTP_ERROR_504 = DWORD($801901F8);
- {$EXTERNALSYM BG_E_HTTP_ERROR_504}
-
-//
-// MessageId: BG_E_HTTP_ERROR_505
-//
-// MessageText:
-//
-// The server does not support the HTTP protocol version that was used in the request message.
-//
- BG_E_HTTP_ERROR_505 = DWORD($801901F9);
- {$EXTERNALSYM BG_E_HTTP_ERROR_505}
-
-//
-// MessageId: MC_JOB_CANCELLED
-//
-// MessageText:
-//
-// The administrator %4 canceled job "%2" on behalf of %3. The job ID was %1.
-//
- MC_JOB_CANCELLED = DWORD($80194000);
- {$EXTERNALSYM MC_JOB_CANCELLED}
-
-//
-// MessageId: MC_FILE_DELETION_FAILED
-//
-// MessageText:
-//
-// While canceling job "%2", BITS was not able to remove the temporary files listed below.
-// If you can delete them, then you will regain some disk space. The job ID was %1.%\
-//
-// %3
-//
- MC_FILE_DELETION_FAILED = DWORD($80194001);
- {$EXTERNALSYM MC_FILE_DELETION_FAILED}
-
-//
-// MessageId: MC_FILE_DELETION_FAILED_MORE
-//
-// MessageText:
-//
-// While canceling job "%2", BITS was not able to remove the temporary files listed below.
-// If you can delete them, then you will regain some disk space. The job ID was %1. %\
-//
-// %3
-// %\
-// Due to space limitations, not all files are listed here. Check for additional files of the form BITxxx.TMP in the same directory.
-//
- MC_FILE_DELETION_FAILED_MORE = DWORD($80194002);
- {$EXTERNALSYM MC_FILE_DELETION_FAILED_MORE}
-
-//
-// MessageId: MC_JOB_PROPERTY_CHANGE
-//
-// MessageText:
-//
-// The administrator %3 modified the %4 property of job "%2". The job ID was %1.
-//
- MC_JOB_PROPERTY_CHANGE = DWORD($80194003);
- {$EXTERNALSYM MC_JOB_PROPERTY_CHANGE}
-
-//
-// MessageId: MC_JOB_TAKE_OWNERSHIP
-//
-// MessageText:
-//
-// The administrator %4 took ownership of job "%2" from %3. The job ID was %1.
-//
- MC_JOB_TAKE_OWNERSHIP = DWORD($80194004);
- {$EXTERNALSYM MC_JOB_TAKE_OWNERSHIP}
-
-//
-// MessageId: MC_JOB_SCAVENGED
-//
-// MessageText:
-//
-// Job "%2" owned by %3 was canceled after being inactive for more than %4 days. The job ID was %1.
-//
- MC_JOB_SCAVENGED = DWORD($80194005);
- {$EXTERNALSYM MC_JOB_SCAVENGED}
-
-//
-// MessageId: MC_JOB_NOTIFICATION_FAILURE
-//
-// MessageText:
-//
-// Job "%2" owned by %3 failed to notify its associated application. BITS will retry in %4 minutes. The job ID was %1.
-//
- MC_JOB_NOTIFICATION_FAILURE = DWORD($80194006);
- {$EXTERNALSYM MC_JOB_NOTIFICATION_FAILURE}
-
-//
-// MessageId: MC_STATE_FILE_CORRUPT
-//
-// MessageText:
-//
-// The BITS job list is not in a recognized format. It may have been created by a different version of BITS. The job list has been cleared.
-//
- MC_STATE_FILE_CORRUPT = DWORD($80194007);
- {$EXTERNALSYM MC_STATE_FILE_CORRUPT}
-
-implementation
-
-end.
+{******************************************************************************}
+{ }
+{ Background file copier error codes API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: bitsmsg.h, released June 2000. The original Pascal }
+{ code is: BitsMsg.pas, released December 2000. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwabitsmsg.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaBitsMsg;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "BitsMsg.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaWinType;
+
+//
+// Values are 32 bit values layed out as follows:
+//
+// 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1
+// 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
+// +---+-+-+-----------------------+-------------------------------+
+// |Sev|C|R| Facility | Code |
+// +---+-+-+-----------------------+-------------------------------+
+//
+// where
+//
+// Sev - is the severity code
+//
+// 00 - Success
+// 01 - Informational
+// 10 - Warning
+// 11 - Error
+//
+// C - is the Customer code flag
+//
+// R - is a reserved bit
+//
+// Facility - is the facility code
+//
+// Code - is the facility's status code
+//
+//
+// Define the facility codes
+//
+
+//
+// Define the severity codes
+//
+
+const
+
+//
+// MessageId: BG_E_NOT_FOUND
+//
+// MessageText:
+//
+// The requested job was not found.
+//
+ BG_E_NOT_FOUND = DWORD($80200001);
+ {$EXTERNALSYM BG_E_NOT_FOUND}
+
+//
+// MessageId: BG_E_INVALID_STATE
+//
+// MessageText:
+//
+// The requested action is not allowed in the current job state. The job might have been canceled or completed transferring. It is in a read-only state now.
+//
+ BG_E_INVALID_STATE = DWORD($80200002);
+ {$EXTERNALSYM BG_E_INVALID_STATE}
+
+//
+// MessageId: BG_E_EMPTY
+//
+// MessageText:
+//
+// There are no files attached to this job. Attach files to the job, and then try again.
+//
+ BG_E_EMPTY = DWORD($80200003);
+ {$EXTERNALSYM BG_E_EMPTY}
+
+//
+// MessageId: BG_E_FILE_NOT_AVAILABLE
+//
+// MessageText:
+//
+// No file is available because no URL generated an error.
+//
+ BG_E_FILE_NOT_AVAILABLE = DWORD($80200004);
+ {$EXTERNALSYM BG_E_FILE_NOT_AVAILABLE}
+
+//
+// MessageId: BG_E_PROTOCOL_NOT_AVAILABLE
+//
+// MessageText:
+//
+// No protocol is available because no URL generated an error.
+//
+ BG_E_PROTOCOL_NOT_AVAILABLE = DWORD($80200005);
+ {$EXTERNALSYM BG_E_PROTOCOL_NOT_AVAILABLE}
+
+//
+// MessageId: BG_S_ERROR_CONTEXT_NONE
+//
+// MessageText:
+//
+// No errors have occurred.
+//
+ BG_S_ERROR_CONTEXT_NONE = DWORD($00200006);
+ {$EXTERNALSYM BG_S_ERROR_CONTEXT_NONE}
+
+//
+// MessageId: BG_E_ERROR_CONTEXT_UNKNOWN
+//
+// MessageText:
+//
+// The error occurred in an unknown location.
+//
+ BG_E_ERROR_CONTEXT_UNKNOWN = DWORD($80200007);
+ {$EXTERNALSYM BG_E_ERROR_CONTEXT_UNKNOWN}
+
+//
+// MessageId: BG_E_ERROR_CONTEXT_GENERAL_QUEUE_MANAGER
+//
+// MessageText:
+//
+// The error occurred in the Background Intelligent Transfer Service (BITS) queue manager.
+//
+ BG_E_ERROR_CONTEXT_GENERAL_QUEUE_MANAGER = DWORD($80200008);
+ {$EXTERNALSYM BG_E_ERROR_CONTEXT_GENERAL_QUEUE_MANAGER}
+
+//
+// MessageId: BG_E_ERROR_CONTEXT_LOCAL_FILE
+//
+// MessageText:
+//
+// The error occurred while the local file was being processed. Verify that the file is not in use, and then try again.
+//
+ BG_E_ERROR_CONTEXT_LOCAL_FILE = DWORD($80200009);
+ {$EXTERNALSYM BG_E_ERROR_CONTEXT_LOCAL_FILE}
+
+//
+// MessageId: BG_E_ERROR_CONTEXT_REMOTE_FILE
+//
+// MessageText:
+//
+// The error occurred while the remote file was being processed.
+//
+ BG_E_ERROR_CONTEXT_REMOTE_FILE = DWORD($8020000A);
+ {$EXTERNALSYM BG_E_ERROR_CONTEXT_REMOTE_FILE}
+
+//
+// MessageId: BG_E_ERROR_CONTEXT_GENERAL_TRANSPORT
+//
+// MessageText:
+//
+// The error occurred in the transport layer. The client could not connect to the server.
+//
+ BG_E_ERROR_CONTEXT_GENERAL_TRANSPORT = DWORD($8020000B);
+ {$EXTERNALSYM BG_E_ERROR_CONTEXT_GENERAL_TRANSPORT}
+
+//
+// MessageId: BG_E_ERROR_CONTEXT_QUEUE_MANAGER_NOTIFICATION
+//
+// MessageText:
+//
+// The error occurred while the notification callback was being processed. Background Intelligent Transfer Service (BITS) will try again later.
+//
+ BG_E_ERROR_CONTEXT_QUEUE_MANAGER_NOTIFICATION = DWORD($8020000C);
+ {$EXTERNALSYM BG_E_ERROR_CONTEXT_QUEUE_MANAGER_NOTIFICATION}
+
+//
+// MessageId: BG_E_DESTINATION_LOCKED
+//
+// MessageText:
+//
+// The destination file system volume is not available. Verify that another program, such as CheckDisk, is not running, which would lock the volume. When the volume is available, Background Intelligent Transfer Service (BITS) will try again.
+//
+ BG_E_DESTINATION_LOCKED = DWORD($8020000D);
+ {$EXTERNALSYM BG_E_DESTINATION_LOCKED}
+
+//
+// MessageId: BG_E_VOLUME_CHANGED
+//
+// MessageText:
+//
+// The destination volume has changed. If the disk is removable, it might have been replaced with a different disk. Reinsert the original disk and resume the job.
+//
+ BG_E_VOLUME_CHANGED = DWORD($8020000E);
+ {$EXTERNALSYM BG_E_VOLUME_CHANGED}
+
+//
+// MessageId: BG_E_ERROR_INFORMATION_UNAVAILABLE
+//
+// MessageText:
+//
+// No errors have occurred.
+//
+ BG_E_ERROR_INFORMATION_UNAVAILABLE = DWORD($8020000F);
+ {$EXTERNALSYM BG_E_ERROR_INFORMATION_UNAVAILABLE}
+
+//
+// MessageId: BG_E_NETWORK_DISCONNECTED
+//
+// MessageText:
+//
+// There are currently no active network connections. Background Intelligent Transfer Service (BITS) will try again when an adapter is connected.
+//
+ BG_E_NETWORK_DISCONNECTED = DWORD($80200010);
+ {$EXTERNALSYM BG_E_NETWORK_DISCONNECTED}
+
+//
+// MessageId: BG_E_MISSING_FILE_SIZE
+//
+// MessageText:
+//
+// The server did not return the file size. The URL might point to dynamic content. The Content-Length header is not available in the server's HTTP reply.
+//
+ BG_E_MISSING_FILE_SIZE = DWORD($80200011);
+ {$EXTERNALSYM BG_E_MISSING_FILE_SIZE}
+
+//
+// MessageId: BG_E_INSUFFICIENT_HTTP_SUPPORT
+//
+// MessageText:
+//
+// The server does not support HTTP 1.1.
+//
+ BG_E_INSUFFICIENT_HTTP_SUPPORT = DWORD($80200012);
+ {$EXTERNALSYM BG_E_INSUFFICIENT_HTTP_SUPPORT}
+
+//
+// MessageId: BG_E_INSUFFICIENT_RANGE_SUPPORT
+//
+// MessageText:
+//
+// The server does not support the necessary HTTP protocol. Background Intelligent Transfer Service (BITS) requires that the server support the Range protocol header.
+//
+ BG_E_INSUFFICIENT_RANGE_SUPPORT = DWORD($80200013);
+ {$EXTERNALSYM BG_E_INSUFFICIENT_RANGE_SUPPORT}
+
+//
+// MessageId: BG_E_REMOTE_NOT_SUPPORTED
+//
+// MessageText:
+//
+// Background Intelligent Transfer Service (BITS) cannot be used remotely.
+//
+ BG_E_REMOTE_NOT_SUPPORTED = DWORD($80200014);
+ {$EXTERNALSYM BG_E_REMOTE_NOT_SUPPORTED}
+
+//
+// MessageId: BG_E_NEW_OWNER_DIFF_MAPPING
+//
+// MessageText:
+//
+// The drive mapping for the job is different for the current owner than for the previous owner. Use a UNC path instead.
+//
+ BG_E_NEW_OWNER_DIFF_MAPPING = DWORD($80200015);
+ {$EXTERNALSYM BG_E_NEW_OWNER_DIFF_MAPPING}
+
+//
+// MessageId: BG_E_NEW_OWNER_NO_FILE_ACCESS
+//
+// MessageText:
+//
+// The new owner has insufficient access to the local files for the job. The new owner might not have permissions to access the job files. Verify that the new owner has sufficient permissions, and then try again.
+//
+ BG_E_NEW_OWNER_NO_FILE_ACCESS = DWORD($80200016);
+ {$EXTERNALSYM BG_E_NEW_OWNER_NO_FILE_ACCESS}
+
+//
+// MessageId: BG_S_PARTIAL_COMPLETE
+//
+// MessageText:
+//
+// Some of the transferred files were deleted because they were incomplete.
+//
+ BG_S_PARTIAL_COMPLETE = DWORD($00200017);
+ {$EXTERNALSYM BG_S_PARTIAL_COMPLETE}
+
+//
+// MessageId: BG_E_PROXY_LIST_TOO_LARGE
+//
+// MessageText:
+//
+// The HTTP proxy list cannot be longer than 32,000 characters. Try again with a shorter proxy list.
+//
+ BG_E_PROXY_LIST_TOO_LARGE = DWORD($80200018);
+ {$EXTERNALSYM BG_E_PROXY_LIST_TOO_LARGE}
+
+//
+// MessageId: BG_E_PROXY_BYPASS_LIST_TOO_LARGE
+//
+// MessageText:
+//
+// The HTTP proxy bypass list cannot be longer than 32,000 characters. Try again with a shorter bypass proxy list.
+//
+ BG_E_PROXY_BYPASS_LIST_TOO_LARGE = DWORD($80200019);
+ {$EXTERNALSYM BG_E_PROXY_BYPASS_LIST_TOO_LARGE}
+
+//
+// MessageId: BG_S_UNABLE_TO_DELETE_FILES
+//
+// MessageText:
+//
+// Some of the temporary files could not be deleted. Check the system event log for the complete list of files that could not be deleted.
+//
+ BG_S_UNABLE_TO_DELETE_FILES = DWORD($0020001A);
+ {$EXTERNALSYM BG_S_UNABLE_TO_DELETE_FILES}
+
+//
+// MessageId: BG_E_INVALID_SERVER_RESPONSE
+//
+// MessageText:
+//
+// The server's response was not valid. The server was not following the defined protocol. Resume the job, and then Background Intelligent Transfer Service (BITS) will try again.
+//
+ BG_E_INVALID_SERVER_RESPONSE = DWORD($8020001B);
+ {$EXTERNALSYM BG_E_INVALID_SERVER_RESPONSE}
+
+//
+// MessageId: BG_E_TOO_MANY_FILES
+//
+// MessageText:
+//
+// No more files can be added to this job.
+//
+ BG_E_TOO_MANY_FILES = DWORD($8020001C);
+ {$EXTERNALSYM BG_E_TOO_MANY_FILES}
+
+//
+// MessageId: BG_E_LOCAL_FILE_CHANGED
+//
+// MessageText:
+//
+// The local file was changed during the transfer. Recreate the job, and then try to transfer it again.
+//
+ BG_E_LOCAL_FILE_CHANGED = DWORD($8020001D);
+ {$EXTERNALSYM BG_E_LOCAL_FILE_CHANGED}
+
+//
+// MessageId: BG_E_ERROR_CONTEXT_REMOTE_APPLICATION
+//
+// MessageText:
+//
+// The program on the remote server reported the error.
+//
+ BG_E_ERROR_CONTEXT_REMOTE_APPLICATION = DWORD($8020001E);
+ {$EXTERNALSYM BG_E_ERROR_CONTEXT_REMOTE_APPLICATION}
+
+//
+// MessageId: BG_E_SESSION_NOT_FOUND
+//
+// MessageText:
+//
+// The specified session could not be found on the server. Background Intelligent Transfer Service (BITS) will try again.
+//
+ BG_E_SESSION_NOT_FOUND = DWORD($8020001F);
+ {$EXTERNALSYM BG_E_SESSION_NOT_FOUND}
+
+//
+// MessageId: BG_E_TOO_LARGE
+//
+// MessageText:
+//
+// The job is too large for the server to accept. This job might exceed a job size limit set by the server administrator. Reduce the size of the job, and then try again.
+//
+ BG_E_TOO_LARGE = DWORD($80200020);
+ {$EXTERNALSYM BG_E_TOO_LARGE}
+
+//
+// MessageId: BG_E_STRING_TOO_LONG
+//
+// MessageText:
+//
+// The specified string is too long.
+//
+ BG_E_STRING_TOO_LONG = DWORD($80200021);
+ {$EXTERNALSYM BG_E_STRING_TOO_LONG}
+
+//
+// MessageId: BG_E_CLIENT_SERVER_PROTOCOL_MISMATCH
+//
+// MessageText:
+//
+// The client and server versions of Background Intelligent Transfer Service (BITS) are incompatible.
+//
+ BG_E_CLIENT_SERVER_PROTOCOL_MISMATCH = DWORD($80200022);
+ {$EXTERNALSYM BG_E_CLIENT_SERVER_PROTOCOL_MISMATCH}
+
+//
+// MessageId: BG_E_SERVER_EXECUTE_ENABLE
+//
+// MessageText:
+//
+// Scripting OR execute permissions are enabled on the IIS virtual directory associated with the job. To upload files to the virtual directory, disable the scripting and execute permissions on the virtual directory.
+//
+ BG_E_SERVER_EXECUTE_ENABLE = DWORD($80200023);
+ {$EXTERNALSYM BG_E_SERVER_EXECUTE_ENABLE}
+
+//
+// MessageId: BG_E_NO_PROGRESS
+//
+// MessageText:
+//
+// The job is not making headway. The server may be misconfigured. Background Intelligent Transfer Service (BITS) will try again later.
+//
+ BG_E_NO_PROGRESS = DWORD($80200024);
+ {$EXTERNALSYM BG_E_NO_PROGRESS}
+
+//
+// MessageId: BG_E_USERNAME_TOO_LARGE
+//
+// MessageText:
+//
+// The user name cannot be longer than 300 characters. Try again with a shorter name.
+//
+ BG_E_USERNAME_TOO_LARGE = DWORD($80200025);
+ {$EXTERNALSYM BG_E_USERNAME_TOO_LARGE}
+
+//
+// MessageId: BG_E_PASSWORD_TOO_LARGE
+//
+// MessageText:
+//
+// The password cannot be longer than 300 characters. Try again with a shorter password.
+//
+ BG_E_PASSWORD_TOO_LARGE = DWORD($80200026);
+ {$EXTERNALSYM BG_E_PASSWORD_TOO_LARGE}
+
+//
+// MessageId: BG_E_INVALID_AUTH_TARGET
+//
+// MessageText:
+//
+// The authentication target specified in the credentials is not defined.
+//
+ BG_E_INVALID_AUTH_TARGET = DWORD($80200027);
+ {$EXTERNALSYM BG_E_INVALID_AUTH_TARGET}
+
+//
+// MessageId: BG_E_INVALID_AUTH_SCHEME
+//
+// MessageText:
+//
+// The authentication scheme specified in the credentials is not defined.
+//
+ BG_E_INVALID_AUTH_SCHEME = DWORD($80200028);
+ {$EXTERNALSYM BG_E_INVALID_AUTH_SCHEME}
+
+//
+// MessageId: BG_E_HTTP_ERROR_100
+//
+// MessageText:
+//
+// The request can be continued.
+//
+ BG_E_HTTP_ERROR_100 = DWORD($80190064);
+ {$EXTERNALSYM BG_E_HTTP_ERROR_100}
+
+//
+// MessageId: BG_E_HTTP_ERROR_101
+//
+// MessageText:
+//
+// The server switched protocols in an upgrade header.
+//
+ BG_E_HTTP_ERROR_101 = DWORD($80190065);
+ {$EXTERNALSYM BG_E_HTTP_ERROR_101}
+
+//
+// MessageId: BG_E_HTTP_ERROR_200
+//
+// MessageText:
+//
+// The server's response was not valid. The server was not following the defined protocol. Resume the job, and then Background Intelligent Transfer Service (BITS) will try again.
+//
+ BG_E_HTTP_ERROR_200 = DWORD($801900C8);
+ {$EXTERNALSYM BG_E_HTTP_ERROR_200}
+
+//
+// MessageId: BG_E_HTTP_ERROR_201
+//
+// MessageText:
+//
+// The request was fulfilled and resulted in the creation of a new resource.
+//
+ BG_E_HTTP_ERROR_201 = DWORD($801900C9);
+ {$EXTERNALSYM BG_E_HTTP_ERROR_201}
+
+//
+// MessageId: BG_E_HTTP_ERROR_202
+//
+// MessageText:
+//
+// The request was accepted for processing, but the processing has not been completed yet.
+//
+ BG_E_HTTP_ERROR_202 = DWORD($801900CA);
+ {$EXTERNALSYM BG_E_HTTP_ERROR_202}
+
+//
+// MessageId: BG_E_HTTP_ERROR_203
+//
+// MessageText:
+//
+// The returned metadata in the entity-header is not the definitive set available from the server of origin.
+//
+ BG_E_HTTP_ERROR_203 = DWORD($801900CB);
+ {$EXTERNALSYM BG_E_HTTP_ERROR_203}
+
+//
+// MessageId: BG_E_HTTP_ERROR_204
+//
+// MessageText:
+//
+// The server has fulfilled the request, but there is no new information to send back.
+//
+ BG_E_HTTP_ERROR_204 = DWORD($801900CC);
+ {$EXTERNALSYM BG_E_HTTP_ERROR_204}
+
+//
+// MessageId: BG_E_HTTP_ERROR_205
+//
+// MessageText:
+//
+// The server's response was not valid. The server was not following the defined protocol. Resume the job, and then Background Intelligent Transfer Service (BITS) will try again.
+//
+ BG_E_HTTP_ERROR_205 = DWORD($801900CD);
+ {$EXTERNALSYM BG_E_HTTP_ERROR_205}
+
+//
+// MessageId: BG_E_HTTP_ERROR_206
+//
+// MessageText:
+//
+// The server fulfilled the partial GET request for the resource.
+//
+ BG_E_HTTP_ERROR_206 = DWORD($801900CE);
+ {$EXTERNALSYM BG_E_HTTP_ERROR_206}
+
+//
+// MessageId: BG_E_HTTP_ERROR_300
+//
+// MessageText:
+//
+// The server could not return the requested data.
+//
+ BG_E_HTTP_ERROR_300 = DWORD($8019012C);
+ {$EXTERNALSYM BG_E_HTTP_ERROR_300}
+
+//
+// MessageId: BG_E_HTTP_ERROR_301
+//
+// MessageText:
+//
+// The requested resource was assigned to a new permanent Uniform Resource Identifier (URI), and any future references to this resource should use one of the returned URIs.
+//
+ BG_E_HTTP_ERROR_301 = DWORD($8019012D);
+ {$EXTERNALSYM BG_E_HTTP_ERROR_301}
+
+//
+// MessageId: BG_E_HTTP_ERROR_302
+//
+// MessageText:
+//
+// The requested resource was assigned a different Uniform Resource Identifier (URI). This change is temporary.
+//
+ BG_E_HTTP_ERROR_302 = DWORD($8019012E);
+ {$EXTERNALSYM BG_E_HTTP_ERROR_302}
+
+//
+// MessageId: BG_E_HTTP_ERROR_303
+//
+// MessageText:
+//
+// The response to the request is under a different Uniform Resource Identifier (URI) and must be retrieved using a GET method on that resource.
+//
+ BG_E_HTTP_ERROR_303 = DWORD($8019012F);
+ {$EXTERNALSYM BG_E_HTTP_ERROR_303}
+
+//
+// MessageId: BG_E_HTTP_ERROR_304
+//
+// MessageText:
+//
+// The server's response was not valid. The server was not following the defined protocol. Resume the job, and then Background Intelligent Transfer Service (BITS) will try again.
+//
+ BG_E_HTTP_ERROR_304 = DWORD($80190130);
+ {$EXTERNALSYM BG_E_HTTP_ERROR_304}
+
+//
+// MessageId: BG_E_HTTP_ERROR_305
+//
+// MessageText:
+//
+// The requested resource must be accessed through the proxy given by the location field.
+//
+ BG_E_HTTP_ERROR_305 = DWORD($80190131);
+ {$EXTERNALSYM BG_E_HTTP_ERROR_305}
+
+//
+// MessageId: BG_E_HTTP_ERROR_307
+//
+// MessageText:
+//
+// The URL has been temporarily relocated. Try again later.
+//
+ BG_E_HTTP_ERROR_307 = DWORD($80190133);
+ {$EXTERNALSYM BG_E_HTTP_ERROR_307}
+
+//
+// MessageId: BG_E_HTTP_ERROR_400
+//
+// MessageText:
+//
+// The server cannot process the request because the syntax is not valid.
+//
+ BG_E_HTTP_ERROR_400 = DWORD($80190190);
+ {$EXTERNALSYM BG_E_HTTP_ERROR_400}
+
+//
+// MessageId: BG_E_HTTP_ERROR_401
+//
+// MessageText:
+//
+// The requested resource requires user authentication.
+//
+ BG_E_HTTP_ERROR_401 = DWORD($80190191);
+ {$EXTERNALSYM BG_E_HTTP_ERROR_401}
+
+//
+// MessageId: BG_E_HTTP_ERROR_402
+//
+// MessageText:
+//
+// The server's response was not valid. The server was not following the defined protocol. Resume the job, and then Background Intelligent Transfer Service (BITS) will try again.
+//
+ BG_E_HTTP_ERROR_402 = DWORD($80190192);
+ {$EXTERNALSYM BG_E_HTTP_ERROR_402}
+
+//
+// MessageId: BG_E_HTTP_ERROR_403
+//
+// MessageText:
+//
+// The client does not have sufficient access rights to the requested server object.
+//
+ BG_E_HTTP_ERROR_403 = DWORD($80190193);
+ {$EXTERNALSYM BG_E_HTTP_ERROR_403}
+
+//
+// MessageId: BG_E_HTTP_ERROR_404
+//
+// MessageText:
+//
+// The requested URL does not exist on the server.
+//
+ BG_E_HTTP_ERROR_404 = DWORD($80190194);
+ {$EXTERNALSYM BG_E_HTTP_ERROR_404}
+
+//
+// MessageId: BG_E_HTTP_ERROR_405
+//
+// MessageText:
+//
+// The method used is not allowed.
+//
+ BG_E_HTTP_ERROR_405 = DWORD($80190195);
+ {$EXTERNALSYM BG_E_HTTP_ERROR_405}
+
+//
+// MessageId: BG_E_HTTP_ERROR_406
+//
+// MessageText:
+//
+// No responses acceptable to the client were found.
+//
+ BG_E_HTTP_ERROR_406 = DWORD($80190196);
+ {$EXTERNALSYM BG_E_HTTP_ERROR_406}
+
+//
+// MessageId: BG_E_HTTP_ERROR_407
+//
+// MessageText:
+//
+// Proxy authentication is required.
+//
+ BG_E_HTTP_ERROR_407 = DWORD($80190197);
+ {$EXTERNALSYM BG_E_HTTP_ERROR_407}
+
+//
+// MessageId: BG_E_HTTP_ERROR_408
+//
+// MessageText:
+//
+// The server timed out waiting for the request.
+//
+ BG_E_HTTP_ERROR_408 = DWORD($80190198);
+ {$EXTERNALSYM BG_E_HTTP_ERROR_408}
+
+//
+// MessageId: BG_E_HTTP_ERROR_409
+//
+// MessageText:
+//
+// The request could not be completed because of a conflict with the current state of the resource. The user should resubmit the request with more information.
+//
+ BG_E_HTTP_ERROR_409 = DWORD($80190199);
+ {$EXTERNALSYM BG_E_HTTP_ERROR_409}
+
+//
+// MessageId: BG_E_HTTP_ERROR_410
+//
+// MessageText:
+//
+// The requested resource is not currently available at the server, and no forwarding address is known.
+//
+ BG_E_HTTP_ERROR_410 = DWORD($8019019A);
+ {$EXTERNALSYM BG_E_HTTP_ERROR_410}
+
+//
+// MessageId: BG_E_HTTP_ERROR_411
+//
+// MessageText:
+//
+// The server cannot accept the request without a defined content length.
+//
+ BG_E_HTTP_ERROR_411 = DWORD($8019019B);
+ {$EXTERNALSYM BG_E_HTTP_ERROR_411}
+
+//
+// MessageId: BG_E_HTTP_ERROR_412
+//
+// MessageText:
+//
+// The precondition given in one or more of the request header fields evaluated to false when it was tested on the server.
+//
+ BG_E_HTTP_ERROR_412 = DWORD($8019019C);
+ {$EXTERNALSYM BG_E_HTTP_ERROR_412}
+
+//
+// MessageId: BG_E_HTTP_ERROR_413
+//
+// MessageText:
+//
+// The server cannot process the request because the request entity is too large.
+//
+ BG_E_HTTP_ERROR_413 = DWORD($8019019D);
+ {$EXTERNALSYM BG_E_HTTP_ERROR_413}
+
+//
+// MessageId: BG_E_HTTP_ERROR_414
+//
+// MessageText:
+//
+// The server cannot process the request because the request Uniform Resource Identifier (URI) is longer than the server can interpret.
+//
+ BG_E_HTTP_ERROR_414 = DWORD($8019019E);
+ {$EXTERNALSYM BG_E_HTTP_ERROR_414}
+
+//
+// MessageId: BG_E_HTTP_ERROR_415
+//
+// MessageText:
+//
+// The server's response was not valid. The server was not following the defined protocol. Resume the job, and then Background Intelligent Transfer Service (BITS) will try again.
+//
+ BG_E_HTTP_ERROR_415 = DWORD($8019019F);
+ {$EXTERNALSYM BG_E_HTTP_ERROR_415}
+
+//
+// MessageId: BG_E_HTTP_ERROR_416
+//
+// MessageText:
+//
+// The server could not satisfy the range request.
+//
+ BG_E_HTTP_ERROR_416 = DWORD($801901A0);
+ {$EXTERNALSYM BG_E_HTTP_ERROR_416}
+
+//
+// MessageId: BG_E_HTTP_ERROR_417
+//
+// MessageText:
+//
+// The server could not meet the expectation given in an Expect request-header field.
+//
+ BG_E_HTTP_ERROR_417 = DWORD($801901A1);
+ {$EXTERNALSYM BG_E_HTTP_ERROR_417}
+
+//
+// MessageId: BG_E_HTTP_ERROR_449
+//
+// MessageText:
+//
+// The server's response was not valid. The server was not following the defined protocol. Resume the job, and then Background Intelligent Transfer Service (BITS) will try again.
+//
+ BG_E_HTTP_ERROR_449 = DWORD($801901C1);
+ {$EXTERNALSYM BG_E_HTTP_ERROR_449}
+
+//
+// MessageId: BG_E_HTTP_ERROR_500
+//
+// MessageText:
+//
+// An unexpected condition prevented the server from fulfilling the request.
+//
+ BG_E_HTTP_ERROR_500 = DWORD($801901F4);
+ {$EXTERNALSYM BG_E_HTTP_ERROR_500}
+
+//
+// MessageId: BG_E_HTTP_ERROR_501
+//
+// MessageText:
+//
+// The server does not support the functionality required to fulfill the request.
+//
+ BG_E_HTTP_ERROR_501 = DWORD($801901F5);
+ {$EXTERNALSYM BG_E_HTTP_ERROR_501}
+
+//
+// MessageId: BG_E_HTTP_ERROR_502
+//
+// MessageText:
+//
+// The server, while acting as a gateway or proxy to fulfill the request, received an invalid response from the upstream server it accessed.
+//
+ BG_E_HTTP_ERROR_502 = DWORD($801901F6);
+ {$EXTERNALSYM BG_E_HTTP_ERROR_502}
+
+//
+// MessageId: BG_E_HTTP_ERROR_503
+//
+// MessageText:
+//
+// The service is temporarily overloaded.
+//
+ BG_E_HTTP_ERROR_503 = DWORD($801901F7);
+ {$EXTERNALSYM BG_E_HTTP_ERROR_503}
+
+//
+// MessageId: BG_E_HTTP_ERROR_504
+//
+// MessageText:
+//
+// The request was timed out waiting for a gateway.
+//
+ BG_E_HTTP_ERROR_504 = DWORD($801901F8);
+ {$EXTERNALSYM BG_E_HTTP_ERROR_504}
+
+//
+// MessageId: BG_E_HTTP_ERROR_505
+//
+// MessageText:
+//
+// The server does not support the HTTP protocol version that was used in the request message.
+//
+ BG_E_HTTP_ERROR_505 = DWORD($801901F9);
+ {$EXTERNALSYM BG_E_HTTP_ERROR_505}
+
+//
+// MessageId: MC_JOB_CANCELLED
+//
+// MessageText:
+//
+// The administrator %4 canceled job "%2" on behalf of %3. The job ID was %1.
+//
+ MC_JOB_CANCELLED = DWORD($80194000);
+ {$EXTERNALSYM MC_JOB_CANCELLED}
+
+//
+// MessageId: MC_FILE_DELETION_FAILED
+//
+// MessageText:
+//
+// While canceling job "%2", BITS was not able to remove the temporary files listed below.
+// If you can delete them, then you will regain some disk space. The job ID was %1.%\
+//
+// %3
+//
+ MC_FILE_DELETION_FAILED = DWORD($80194001);
+ {$EXTERNALSYM MC_FILE_DELETION_FAILED}
+
+//
+// MessageId: MC_FILE_DELETION_FAILED_MORE
+//
+// MessageText:
+//
+// While canceling job "%2", BITS was not able to remove the temporary files listed below.
+// If you can delete them, then you will regain some disk space. The job ID was %1. %\
+//
+// %3
+// %\
+// Due to space limitations, not all files are listed here. Check for additional files of the form BITxxx.TMP in the same directory.
+//
+ MC_FILE_DELETION_FAILED_MORE = DWORD($80194002);
+ {$EXTERNALSYM MC_FILE_DELETION_FAILED_MORE}
+
+//
+// MessageId: MC_JOB_PROPERTY_CHANGE
+//
+// MessageText:
+//
+// The administrator %3 modified the %4 property of job "%2". The job ID was %1.
+//
+ MC_JOB_PROPERTY_CHANGE = DWORD($80194003);
+ {$EXTERNALSYM MC_JOB_PROPERTY_CHANGE}
+
+//
+// MessageId: MC_JOB_TAKE_OWNERSHIP
+//
+// MessageText:
+//
+// The administrator %4 took ownership of job "%2" from %3. The job ID was %1.
+//
+ MC_JOB_TAKE_OWNERSHIP = DWORD($80194004);
+ {$EXTERNALSYM MC_JOB_TAKE_OWNERSHIP}
+
+//
+// MessageId: MC_JOB_SCAVENGED
+//
+// MessageText:
+//
+// Job "%2" owned by %3 was canceled after being inactive for more than %4 days. The job ID was %1.
+//
+ MC_JOB_SCAVENGED = DWORD($80194005);
+ {$EXTERNALSYM MC_JOB_SCAVENGED}
+
+//
+// MessageId: MC_JOB_NOTIFICATION_FAILURE
+//
+// MessageText:
+//
+// Job "%2" owned by %3 failed to notify its associated application. BITS will retry in %4 minutes. The job ID was %1.
+//
+ MC_JOB_NOTIFICATION_FAILURE = DWORD($80194006);
+ {$EXTERNALSYM MC_JOB_NOTIFICATION_FAILURE}
+
+//
+// MessageId: MC_STATE_FILE_CORRUPT
+//
+// MessageText:
+//
+// The BITS job list is not in a recognized format. It may have been created by a different version of BITS. The job list has been cleared.
+//
+ MC_STATE_FILE_CORRUPT = DWORD($80194007);
+ {$EXTERNALSYM MC_STATE_FILE_CORRUPT}
+
+implementation
+
+end.
diff --git a/packages/extra/winunits/jwablberr.pas b/packages/extra/winunits/jwablberr.pas
index 31b44a370b..60233b8dee 100644
--- a/packages/extra/winunits/jwablberr.pas
+++ b/packages/extra/winunits/jwablberr.pas
@@ -1,66 +1,66 @@
-{******************************************************************************}
-{ }
-{ BLB Error Codes API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: BLBErr.h, released June 2000. The original Pascal }
-{ code is: BLBErr.pas, released December 2000. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwablberr.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaBLBErr;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "BLBErr.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-const
-
- // First four bits - SEVERITY(11), CUSTOMER FLAG(1), RESERVED(0)
-
- SDPBLB_CONF_BLOB_DESTROYED = $e0000300;
- {$EXTERNALSYM SDPBLB_CONF_BLOB_DESTROYED}
-
-implementation
-
-end.
+{******************************************************************************}
+{ }
+{ BLB Error Codes API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: BLBErr.h, released June 2000. The original Pascal }
+{ code is: BLBErr.pas, released December 2000. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwablberr.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaBLBErr;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "BLBErr.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+const
+
+ // First four bits - SEVERITY(11), CUSTOMER FLAG(1), RESERVED(0)
+
+ SDPBLB_CONF_BLOB_DESTROYED = $e0000300;
+ {$EXTERNALSYM SDPBLB_CONF_BLOB_DESTROYED}
+
+implementation
+
+end.
diff --git a/packages/extra/winunits/jwabluetoothapis.pas b/packages/extra/winunits/jwabluetoothapis.pas
index 363bfe498c..55bcb86775 100644
--- a/packages/extra/winunits/jwabluetoothapis.pas
+++ b/packages/extra/winunits/jwabluetoothapis.pas
@@ -1,2014 +1,2014 @@
-{******************************************************************************}
-{ }
-{ BlueTooth API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Contributors: John Penman }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwabluetoothapis.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaBluetoothAPIs;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "bluetoothapis.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaWinType, JwaWinBase, JwaBthSdpDef;
-
-const
- BLUETOOTH_MAX_NAME_SIZE = 248;
- {$EXTERNALSYM BLUETOOTH_MAX_NAME_SIZE}
- BLUETOOTH_MAX_PASSKEY_SIZE = 16;
- {$EXTERNALSYM BLUETOOTH_MAX_PASSKEY_SIZE}
- BLUETOOTH_MAX_PASSKEY_BUFFER_SIZE = BLUETOOTH_MAX_PASSKEY_SIZE + 1;
- {$EXTERNALSYM BLUETOOTH_MAX_PASSKEY_BUFFER_SIZE}
-
-// ***************************************************************************
-//
-// Bluetooth Address
-//
-// ***************************************************************************
-
-type
- BTH_ADDR = Int64;
- {$EXTERNALSYM BTH_ADDR}
-
- _BLUETOOTH_ADDRESS = record
- case Integer of
- 0: (ullLong: BTH_ADDR); // easier to compare again BLUETOOTH_NULL_ADDRESS
- 1: (rgBytes: array [0..5] of Byte); // easier to format when broken out
- end;
- {$EXTERNALSYM _BLUETOOTH_ADDRESS}
- BLUETOOTH_ADDRESS = _BLUETOOTH_ADDRESS;
- {$EXTERNALSYM BLUETOOTH_ADDRESS}
- TBlueToothAddress = BLUETOOTH_ADDRESS;
- PBlueToothAddress = ^BLUETOOTH_ADDRESS;
-
-const
- BLUETOOTH_NULL_ADDRESS: TBlueToothAddress = (ullLong: 0;);
- {$EXTERNALSYM BLUETOOTH_NULL_ADDRESS}
-
-// ***************************************************************************
-//
-// Radio Enumeration
-//
-// Description:
-// This group of APIs enumerates the installed Bluetooth radios.
-//
-// Sample Usage:
-// HANDLE hRadio;
-// BLUETOOTH_FIND_RADIO_PARAMS btfrp = { sizeof(btfrp) };
-//
-// HBLUETOOTH_RADIO_FIND hFind = BluetoothFindFirstRadio( &btfrp, &hRadio );
-// if ( NULL != hFind )
-// {
-// do
-// {
-// //
-// // TODO: Do something with the radio handle.
-// //
-//
-// CloseHandle( hRadio );
-//
-// } while( BluetoothFindNextRadio( hFind, &hRadio ) );
-//
-// BluetoothFindRadioClose( hFind );
-// }
-//
-// ***************************************************************************
-
-type
- _BLUETOOTH_FIND_RADIO_PARAMS = record
- dwSize: DWORD; // IN sizeof this structure
- end;
- {$EXTERNALSYM _BLUETOOTH_FIND_RADIO_PARAMS}
- BLUETOOTH_FIND_RADIO_PARAMS = _BLUETOOTH_FIND_RADIO_PARAMS;
- {$EXTERNALSYM BLUETOOTH_FIND_RADIO_PARAMS}
- TBlueToothFindRadioParams = BLUETOOTH_FIND_RADIO_PARAMS;
- PBlueToothFindRadioParams = ^BLUETOOTH_FIND_RADIO_PARAMS;
-
- HBLUETOOTH_RADIO_FIND = THandle;
- {$EXTERNALSYM HBLUETOOTH_RADIO_FIND}
-
-//
-// Description:
-// Begins the enumeration of local Bluetooth radios.
-//
-// Parameters:
-// pbtfrp
-// A pointer to a BLUETOOTH_FIND_RADIO_PARAMS structure. The dwSize
-// member of this structure must match the sizeof the of the structure.
-//
-// phRadio
-// A pointer where the first radio HANDLE enumerated will be returned.
-//
-// Return Values:
-// NULL
-// Error opening radios or no devices found. Use GetLastError() for
-// more info.
-//
-// ERROR_INVALID_PARAMETER
-// pbtfrp parameter is NULL.
-//
-// ERROR_REVISION_MISMATCH
-// The pbtfrp structure is not the right length.
-//
-// ERROR_OUTOFMEMORY
-// Out of memory.
-//
-// other Win32 errors.
-//
-// any other
-// Success. The return handle is valid and phRadio points to a valid handle.
-//
-
-function BluetoothFindFirstRadio(const pbtfrp: PBlueToothFindRadioParams; var phRadio: THandle): HBLUETOOTH_RADIO_FIND; stdcall;
-{$EXTERNALSYM BluetoothFindFirstRadio}
-
-//
-// Description:
-// Finds the next installed Bluetooth radio.
-//
-// Parameters:
-// hFind
-// The handle returned by BluetoothFindFirstRadio().
-//
-// phRadio
-// A pointer where the next radio HANDLE enumerated will be returned.
-//
-// Return Values:
-// TRUE
-// Next device succesfully found. pHandleOut points to valid handle.
-//
-// FALSE
-// No device found. pHandleOut points to an invalid handle. Call
-// GetLastError() for more details.
-//
-// ERROR_INVALID_HANDLE
-// The handle is NULL.
-//
-// ERROR_NO_MORE_ITEMS
-// No more radios found.
-//
-// ERROR_OUTOFMEMORY
-// Out of memory.
-//
-// other Win32 errors
-//
-
-function BluetoothFindNextRadio(hFind: HBLUETOOTH_RADIO_FIND; var phRadio: THandle): BOOL; stdcall;
-{$EXTERNALSYM BluetoothFindNextRadio}
-
-//
-// Description:
-// Closes the enumeration handle.
-//
-// Parameters
-// hFind
-// The handle returned by BluetoothFindFirstRadio().
-//
-// Return Values:
-// TRUE
-// Handle succesfully closed.
-//
-// FALSE
-// Failure. Check GetLastError() for details.
-//
-// ERROR_INVALID_HANDLE
-// The handle is NULL.
-//
-
-function BluetoothFindRadioClose(hFind: HBLUETOOTH_RADIO_FIND): BOOL; stdcall;
-{$EXTERNALSYM BluetoothFindRadioClose}
-
-// ***************************************************************************
-//
-// Radio Information
-//
-// ***************************************************************************
-
-type
- _BLUETOOTH_RADIO_INFO = record
- dwSize: DWORD; // Size, in bytes, of this entire data structure
- address: BLUETOOTH_ADDRESS; // Address of the local radio
- szName: array [0..BLUETOOTH_MAX_NAME_SIZE - 1] of WideChar; // Name of the local radio
- ulClassofDevice: ULONG; // Class of device for the local radio
- lmpSubversion: Word; // lmpSubversion, manufacturer specifc.
- manufacturer: Word; // Manufacturer of the radio, BTH_MFG_Xxx value. For the most up to date
- // list, goto the Bluetooth specification website and get the Bluetooth
- // assigned numbers document.
- end;
- {$EXTERNALSYM _BLUETOOTH_RADIO_INFO}
- BLUETOOTH_RADIO_INFO = _BLUETOOTH_RADIO_INFO;
- {$EXTERNALSYM BLUETOOTH_RADIO_INFO}
- PBLUETOOTH_RADIO_INFO = ^BLUETOOTH_RADIO_INFO;
- {$EXTERNALSYM PBLUETOOTH_RADIO_INFO}
- TBlueToothRadioFind = BLUETOOTH_RADIO_INFO;
- PBlueToothRadioFind = PBLUETOOTH_RADIO_INFO;
-
-//
-// Description:
-// Retrieves the information about the radio represented by the handle.
-//
-// Parameters:
-// hRadio
-// Handle to a local radio retrieved through BluetoothFindFirstRadio()
-// et al or SetupDiEnumerateDeviceInterfaces()
-//
-// pRadioInfo
-// Radio information to be filled in. The dwSize member must match the
-// size of the structure.
-//
-// Return Values:
-// ERROR_SUCCESS
-// The information was retrieved successfully.
-//
-// ERROR_INVALID_PARAMETER
-// pRadioInfo or hRadio is NULL.
-//
-// ERROR_REVISION_MISMATCH
-// pRadioInfo->dwSize is invalid.
-//
-// other Win32 error codes.
-//
-
-function BluetoothGetRadioInfo(hRadio: THandle; var pRadioInfo: BLUETOOTH_RADIO_INFO): DWORD; stdcall;
-{$EXTERNALSYM BluetoothGetRadioInfo}
-
-// ***************************************************************************
-//
-// Device Information Stuctures
-//
-// ***************************************************************************
-
-type
- _BLUETOOTH_DEVICE_INFO = record
- dwSize: DWORD; // size, in bytes, of this structure - must be the sizeof(BLUETOOTH_DEVICE_INFO)
- Address: BLUETOOTH_ADDRESS; // Bluetooth address
- ulClassofDevice: ULONG; // Bluetooth "Class of Device"
- fConnected: BOOL; // Device connected/in use
- fRemembered: BOOL; // Device remembered
- fAuthenticated: BOOL; // Device authenticated/paired/bonded
- stLastSeen: SYSTEMTIME; // Last time the device was seen
- stLastUsed: SYSTEMTIME; // Last time the device was used for other than RNR, inquiry, or SDP
- szName: array [0..BLUETOOTH_MAX_NAME_SIZE - 1] of WideChar; // Name of the device
- end;
- {$EXTERNALSYM _BLUETOOTH_DEVICE_INFO}
- BLUETOOTH_DEVICE_INFO = _BLUETOOTH_DEVICE_INFO;
- {$EXTERNALSYM BLUETOOTH_DEVICE_INFO}
- PBLUETOOTH_DEVICE_INFO = BLUETOOTH_DEVICE_INFO;
- {$EXTERNALSYM PBLUETOOTH_DEVICE_INFO}
- TBlueToothDeviceInfo = BLUETOOTH_DEVICE_INFO;
- PBlueToothDeviceInfo = PBLUETOOTH_DEVICE_INFO;
-
-// ***************************************************************************
-//
-// Device Enumeration
-//
-// Description:
-// Enumerates the Bluetooth devices. The types of returned device depends
-// on the flags set in the BLUETOOTH_DEVICE_SEARCH_PARAMS (see structure
-// definition for details).
-//
-// Sample Usage:
-// HBLUETOOTH_DEVICE_FIND hFind;
-// BLUETOOTH_DEVICE_SEARCH_PARAMS btsp = { sizeof(btsp) };
-// BLUETOOTH_DEVICE_INFO btdi = { sizeof(btdi) };
-//
-// btsp.fReturnAuthenticated = TRUE;
-// btsp.fReturnRemembered = TRUE;
-//
-// hFind = BluetoothFindFirstDevice( &btsp, &btdi );
-// if ( NULL != hFind )
-// {
-// do
-// {
-// //
-// // TODO: Do something useful with the device info.
-// //
-//
-// } while( BluetoothFindNextDevice( hFind, &btdi ) );
-//
-// BluetoothFindDeviceClose( hFind );
-// }
-//
-// ***************************************************************************
-
-type
- _BLUETOOTH_DEVICE_SEARCH_PARAMS = record
- dwSize: DWORD; // IN sizeof this structure
-
- fReturnAuthenticated: BOOL; // IN return authenticated devices
- fReturnRemembered: BOOL; // IN return remembered devices
- fReturnUnknown: BOOL; // IN return unknown devices
- fReturnConnected: BOOL; // IN return connected devices
-
- fIssueInquiry: BOOL; // IN issue a new inquiry
- cTimeoutMultiplier: UCHAR; // IN timeout for the inquiry
-
- hRadio: THandle; // IN handle to radio to enumerate - NULL == all radios will be searched
- end;
- {$EXTERNALSYM _BLUETOOTH_DEVICE_SEARCH_PARAMS}
- BLUETOOTH_DEVICE_SEARCH_PARAMS = _BLUETOOTH_DEVICE_SEARCH_PARAMS;
- {$EXTERNALSYM BLUETOOTH_DEVICE_SEARCH_PARAMS}
- TBlueToothDeviceSearchParams = BLUETOOTH_DEVICE_SEARCH_PARAMS;
-
- HBLUETOOTH_DEVICE_FIND = THandle;
- {$EXTERNALSYM HBLUETOOTH_DEVICE_FIND}
-
-//
-// Description:
-// Begins the enumeration of Bluetooth devices.
-//
-// Parameters:
-// pbtsp
-// A pointer to a BLUETOOTH_DEVICE_SEARCH_PARAMS structure. This
-// structure contains the flags and inputs used to conduct the search.
-// See BLUETOOTH_DEVICE_SEARCH_PARAMS for details.
-//
-// pbtdi
-// A pointer to a BLUETOOTH_DEVICE_INFO structure to return information
-// about the first Bluetooth device found. Note that the dwSize member
-// of the structure must be the sizeof(BLUETOOTH_DEVICE_INFO) before
-// calling because the APIs hast to know the size of the buffer being
-// past in. The dwSize member must also match the exact
-// sizeof(BLUETOOTH_DEVICE_INFO) or the call will fail.
-//
-// Return Values:
-// NULL
-// Error opening radios or not devices found. Use GetLastError for more info.
-//
-// ERROR_INVALID_PARAMETER
-// pbtsp parameter or pbtdi parameter is NULL.
-//
-// ERROR_REVISION_MISMATCH
-// The pbtfrp structure is not the right length.
-//
-// other Win32 errors
-//
-// any other value
-// Success. The return handle is valid and pbtdi points to valid data.
-//
-
-function BluetoothFindFirstDevice(const pbtsp: BLUETOOTH_DEVICE_SEARCH_PARAMS; var pbtdi: BLUETOOTH_DEVICE_INFO): HBLUETOOTH_DEVICE_FIND; stdcall;
-{$EXTERNALSYM BluetoothFindFirstDevice}
-
-//
-// Description:
-// Finds the next Bluetooth device in the enumeration.
-//
-// Parameters:
-// hFind
-// The handle returned from BluetoothFindFirstDevice().
-//
-// pbtdi
-// A pointer to a BLUETOOTH_DEVICE_INFO structure to return information
-// about the first Bluetooth device found. Note that the dwSize member
-// of the structure must be the sizeof(BLUETOOTH_DEVICE_INFO) before
-// calling because the APIs hast to know the size of the buffer being
-// past in. The dwSize member must also match the exact
-// sizeof(BLUETOOTH_DEVICE_INFO) or the call will fail.
-//
-// Return Values:
-// TRUE
-// Next device succesfully found. pHandleOut points to valid handle.
-//
-// FALSE
-// No device found. pHandleOut points to an invalid handle. Call
-// GetLastError() for more details.
-//
-// ERROR_INVALID_HANDLE
-// The handle is NULL.
-//
-// ERROR_NO_MORE_ITEMS
-// No more radios found.
-//
-// ERROR_OUTOFMEMORY
-// Out of memory.
-//
-// other Win32 errors
-//
-
-function BluetoothFindNextDevice(hFind: HBLUETOOTH_DEVICE_FIND; var pbtdi: BLUETOOTH_DEVICE_INFO): BOOL; stdcall;
-{$EXTERNALSYM BluetoothFindNextDevice}
-
-//
-// Description:
-// Closes the enumeration handle.
-//
-// Parameters:
-// hFind
-// The handle returned from BluetoothFindFirstDevice().
-//
-// Return Values:
-// TRUE
-// Handle succesfully closed.
-//
-// FALSE
-// Failure. Check GetLastError() for details.
-//
-// ERROR_INVALID_HANDLE
-// The handle is NULL.
-//
-
-function BluetoothFindDeviceClose(hFind: HBLUETOOTH_DEVICE_FIND): BOOL; stdcall;
-{$EXTERNALSYM BluetoothFindDeviceClose}
-
-//
-// Description:
-// Retrieves information about a remote device.
-//
-// Fill in the dwSize and the Address members of the pbtdi structure
-// being passed in. On success, the rest of the members will be filled
-// out with the information that the system knows.
-//
-// Parameters:
-// hRadio
-// Handle to a local radio retrieved through BluetoothFindFirstRadio()
-// et al or SetupDiEnumerateDeviceInterfaces()
-//
-// pbtdi
-// A pointer to a BLUETOOTH_DEVICE_INFO structure to return information
-// about the first Bluetooth device found. The dwSize member of the
-// structure must be the sizeof the structure in bytes. The Address
-// member must be filled out with the Bluetooth address of the remote
-// device.
-//
-// Return Values:
-// ERROR_SUCCESS
-// Success. Information returned.
-//
-// ERROR_REVISION_MISMATCH
-// The size of the BLUETOOTH_DEVICE_INFO isn't compatible. Check
-// the dwSize member of the BLUETOOTH_DEVICE_INFO structure you
-// passed in.
-//
-// ERROR_NOT_FOUND
-// The radio is not known by the system or the Address field of
-// the BLUETOOTH_DEVICE_INFO structure is all zeros.
-//
-// ERROR_INVALID_PARAMETER
-// pbtdi is NULL.
-//
-// other error codes
-//
-
-function BluetoothGetDeviceInfo(hRadio: THandle; var pbtdi: BLUETOOTH_DEVICE_INFO): DWORD; stdcall;
-{$EXTERNALSYM BluetoothGetDeviceInfo}
-
-//
-// Description:
-// Updates the computer local cache about the device.
-//
-// Parameters:
-// pbtdi
-// A pointer to the BLUETOOTH_DEVICE_INFO structure to be updated.
-// The following members must be valid:
-// dwSize
-// Must match the size of the structure.
-// Address
-// Must be a previously found radio address.
-// szName
-// New name to be stored.
-//
-// Return Values:
-// ERROR_SUCCESS
-// The device information was updated successfully.
-//
-// ERROR_INVALID_PARAMETER
-// pbtdi is NULL.
-//
-// ERROR_REVISION_MISMATCH
-// pbtdi->dwSize is invalid.
-//
-// other Win32 error codes.
-//
-
-function BluetoothUpdateDeviceRecord(var pbtdi: BLUETOOTH_DEVICE_INFO): DWORD; stdcall;
-{$EXTERNALSYM BluetoothUpdateDeviceRecord}
-
-//
-// Description:
-// Delete the authentication (aka "bond") between the computer and the
-// device. Also purges any cached information about the device.
-//
-// Return Values:
-// ERROR_SUCCESS
-// The device was removed successfully.
-//
-// ERROR_NOT_FOUND
-// The device was not found. If no Bluetooth radio is installed,
-// the devices could not be enumerated or removed.
-//
-
-function BluetoothRemoveDevice(var pAddress: BLUETOOTH_ADDRESS): DWORD; stdcall;
-{$EXTERNALSYM BluetoothRemoveDevice}
-
-// ***************************************************************************
-//
-// Device Picker Dialog
-//
-// Description:
-// Invokes a common dialog for selecting Bluetooth devices. The list
-// of devices displayed to the user is determined by the flags and
-// settings the caller specifies in the BLUETOOTH_SELECT_DEVICE_PARAMS
-// (see structure definition for more details).
-//
-// If BluetoothSelectDevices() returns TRUE, the caller must call
-// BluetoothSelectDevicesFree() or memory will be leaked within the
-// process.
-//
-// Sample Usage:
-//
-// BLUETOOTH_SELECT_DEVICE_PARAMS btsdp = { sizeof(btsdp) };
-//
-// btsdp.hwndParent = hDlg;
-// btsdp.fShowUnknown = TRUE;
-// btsdp.fAddNewDeviceWizard = TRUE;
-//
-// BOOL b = BluetoothSelectDevices( &btsdp );
-// if ( b )
-// {
-// BLUETOOTH_DEVICE_INFO * pbtdi = btsdp.pDevices;
-// for ( ULONG cDevice = 0; cDevice < btsdp.cNumDevices; cDevice ++ )
-// {
-// if ( pbtdi->fAuthenticated || pbtdi->fRemembered )
-// {
-// //
-// // TODO: Do something usefull with the device info
-// //
-// }
-//
-// pbtdi = (BLUETOOTH_DEVICE_INFO *) ((LPBYTE)pbtdi + pbtdi->dwSize);
-// }
-//
-// BluetoothSelectDevicesFree( &btsdp );
-// }
-//
-// ***************************************************************************
-
-type
- _BLUETOOTH_COD_PAIRS = record
- ulCODMask: ULONG; // ClassOfDevice mask to compare
- pcszDescription: LPWSTR; // Descriptive string of mask
- end;
- {$EXTERNALSYM _BLUETOOTH_COD_PAIRS}
- BLUETOOTH_COD_PAIRS = _BLUETOOTH_COD_PAIRS;
- {$EXTERNALSYM BLUETOOTH_COD_PAIRS}
- TBlueToothCodPairs = BLUETOOTH_COD_PAIRS;
- PBlueToothCodPairs = ^BLUETOOTH_COD_PAIRS;
-
- PFN_DEVICE_CALLBACK = function(pvParam: Pointer; pDevice: PBLUETOOTH_DEVICE_INFO): BOOL; stdcall;
- {$EXTERNALSYM PFN_DEVICE_CALLBACK}
-
- _BLUETOOTH_SELECT_DEVICE_PARAMS = record
- dwSize: DWORD; // IN sizeof this structure
-
- cNumOfClasses: ULONG; // IN Number in prgClassOfDevice - if ZERO search for all devices
- prgClassOfDevices: PBlueToothCodPairs; // IN Array of CODs to find.
-
- pszInfo: LPWSTR; // IN If not NULL, sets the "information" text
-
- hwndParent: HWND; // IN parent window - NULL == no parent
-
- fForceAuthentication: BOOL; // IN If TRUE, authenication will be forced before returning
- fShowAuthenticated: BOOL; // IN If TRUE, authenticated devices will be shown in the picker
- fShowRemembered: BOOL; // IN If TRUE, remembered devices will be shown in the picker
- fShowUnknown: BOOL; // IN If TRUE, unknown devices that are not authenticated or "remember" will be shown.
-
- fAddNewDeviceWizard: BOOL; // IN If TRUE, invokes the add new device wizard.
- fSkipServicesPage: BOOL; // IN If TRUE, skips the "Services" page in the wizard.
-
- pfnDeviceCallback: PFN_DEVICE_CALLBACK; // IN If non-NULL, a callback that will be called for each device. If the
- // the callback returns TRUE, the item will be added. If the callback is
- // is FALSE, the item will not be shown.
- pvParam: Pointer; // IN Parameter to be passed to pfnDeviceCallback as the pvParam.
-
- cNumDevices: DWORD; // IN number calles wants - ZERO == no limit.
- // OUT the number of devices returned.
-
- pDevices: PBLUETOOTH_DEVICE_INFO; // OUT pointer to an array for BLUETOOTH_DEVICE_INFOs.
- // call BluetoothSelectDevicesFree() to free
- end;
- {$EXTERNALSYM _BLUETOOTH_SELECT_DEVICE_PARAMS}
- BLUETOOTH_SELECT_DEVICE_PARAMS = _BLUETOOTH_SELECT_DEVICE_PARAMS;
- {$EXTERNALSYM BLUETOOTH_SELECT_DEVICE_PARAMS}
- TBlueToothSelectDeviceParams = BLUETOOTH_SELECT_DEVICE_PARAMS;
- PBlueToothSelectDeviceParams = ^BLUETOOTH_SELECT_DEVICE_PARAMS;
-
-//
-// Description:
-// (See header above)
-//
-// Return Values:
-// TRUE
-// User selected a device. pbtsdp->pDevices points to valid data.
-// Caller should check the fAuthenticated && fRemembered flags to
-// determine which devices we successfuly authenticated or valid
-// selections by the user.
-//
-// Use BluetoothSelectDevicesFree() to free the nessecary data
-// such as pDevices only if this function returns TRUE.
-//
-// FALSE
-// No valid data returned. Call GetLastError() for possible details
-// of the failure. If GLE() is:
-//
-// ERROR_CANCELLED
-// The user cancelled the request.
-//
-// ERROR_INVALID_PARAMETER
-// The pbtsdp is NULL.
-//
-// ERROR_REVISION_MISMATCH
-// The structure passed in as pbtsdp is of an unknown size.
-//
-// other WIN32 errors
-//
-
-function BluetoothSelectDevices(pbtsdp: PBlueToothSelectDeviceParams): BOOL; stdcall;
-{$EXTERNALSYM BluetoothSelectDevices}
-
-//
-// Description:
-// This function should only be called if BluetoothSelectDevices() returns
-// TRUE. This function will free any memory and resource returned by the
-// BluetoothSelectDevices() in the BLUETOOTH_SELECT_DEVICE_PARAMS
-// structure.
-//
-// Return Values:
-// TRUE
-// Success.
-//
-// FALSE
-// Nothing to free.
-//
-
-function BluetoothSelectDevicesFree(pbtsdp: PBlueToothSelectDeviceParams): BOOL; stdcall;
-{$EXTERNALSYM BluetoothSelectDevicesFree}
-
-// ***************************************************************************
-//
-// Device Property Sheet
-//
-// ***************************************************************************
-
-//
-// Description:
-// Invokes the CPLs device info property sheet.
-//
-// Parameters:
-// hwndParent
-// HWND to parent the property sheet.
-//
-// pbtdi
-// A pointer to a BLUETOOTH_DEVICE_INFO structure of the device
-// to be displayed.
-//
-// Return Values:
-// TRUE
-// The property page was successfully displayed.
-//
-// FALSE
-// Failure. The property page was not displayed. Check GetLastError
-// for more details.
-//
-
-function BluetoothDisplayDeviceProperties(hwndParent: HWND; pbtdi: PBLUETOOTH_DEVICE_INFO): BOOL; stdcall;
-{$EXTERNALSYM BluetoothDisplayDeviceProperties}
-
-// ***************************************************************************
-//
-// Radio Authentication
-//
-// ***************************************************************************
-
-//
-// Description:
-// Sends an authentication request to a remote device.
-//
-// There are two modes of operation. "Wizard mode" and "Blind mode."
-//
-// "Wizard mode" is invoked when the pszPasskey is NULL. This will cause
-// the "Bluetooth Connection Wizard" to be invoked. The user will be
-// prompted to enter a passkey during the wizard after which the
-// authentication request will be sent. The user will see the success
-// or failure of the authentication attempt. The user will also be
-// given the oppurtunity to try to fix a failed authentication.
-//
-// "Blind mode" is invoked when the pszPasskey is non-NULL. This will
-// cause the computer to send a authentication request to the remote
-// device. No UI is ever displayed. The Bluetooth status code will be
-// mapped to a Win32 Error code.
-//
-// Parameters:
-//
-// hwndParent
-// The window to parent the authentication wizard. If NULL, the
-// wizard will be parented off the desktop.
-//
-// hRadio
-// A valid local radio handle or NULL. If NULL, then all radios will
-// be tired. If any of the radios succeed, then the call will
-// succeed.
-//
-// pbtdi
-// BLUETOOTH_DEVICE_INFO record of the device to be authenticated.
-//
-// pszPasskey
-// PIN to be used to authenticate the device. If NULL, then UI is
-// displayed and the user steps through the authentication process.
-// If not NULL, no UI is shown. The passkey is NOT NULL terminated.
-//
-// ulPasskeyLength
-// Length of szPassKey in bytes. The length must be less than or
-// equal to BLUETOOTH_MAX_PASSKEY_SIZE * sizeof(WCHAR).
-//
-// Return Values:
-//
-// ERROR_SUCCESS
-// Success.
-//
-// ERROR_CANCELLED
-// User aborted the operation.
-//
-// ERROR_INVALID_PARAMETER
-// The device structure in pbtdi is invalid.
-//
-// ERROR_NO_MORE_ITEMS
-// The device in pbtdi is already been marked as authenticated.
-//
-// other WIN32 error
-// Failure. Return value is the error code.
-//
-// For "Blind mode," here is the current mapping of Bluetooth status
-// code to Win32 error codes:
-//
-// { BTH_ERROR_SUCCESS, ERROR_SUCCESS },
-// { BTH_ERROR_NO_CONNECTION, ERROR_DEVICE_NOT_CONNECTED },
-// { BTH_ERROR_PAGE_TIMEOUT, WAIT_TIMEOUT },
-// { BTH_ERROR_HARDWARE_FAILURE, ERROR_GEN_FAILURE },
-// { BTH_ERROR_AUTHENTICATION_FAILURE, ERROR_NOT_AUTHENTICATED },
-// { BTH_ERROR_MEMORY_FULL, ERROR_NOT_ENOUGH_MEMORY },
-// { BTH_ERROR_CONNECTION_TIMEOUT, WAIT_TIMEOUT },
-// { BTH_ERROR_LMP_RESPONSE_TIMEOUT, WAIT_TIMEOUT },
-// { BTH_ERROR_MAX_NUMBER_OF_CONNECTIONS, ERROR_REQ_NOT_ACCEP },
-// { BTH_ERROR_PAIRING_NOT_ALLOWED, ERROR_ACCESS_DENIED },
-// { BTH_ERROR_UNSPECIFIED_ERROR, ERROR_NOT_READY },
-// { BTH_ERROR_LOCAL_HOST_TERMINATED_CONNECTION, ERROR_VC_DISCONNECTED },
-//
-
-function BluetoothAuthenticateDevice(
- hwndParent: HWND;
- hRadio: THandle;
- pbtbi: PBLUETOOTH_DEVICE_INFO;
- pszPasskey: PWideChar;
- ulPasskeyLength: ULONG): DWORD; stdcall;
-{$EXTERNALSYM BluetoothAuthenticateDevice}
-
-//
-// Description:
-// Allows the caller to prompt for multiple devices to be authenticated
-// within a single instance of the "Bluetooth Connection Wizard."
-//
-// Parameters:
-//
-// hwndParent
-// The window to parent the authentication wizard. If NULL, the
-// wizard will be parented off the desktop.
-//
-// hRadio
-// A valid local radio handle or NULL. If NULL, then all radios will
-// be tired. If any of the radios succeed, then the call will
-// succeed.
-//
-// cDevices
-// Number of devices in the rgbtdi array.
-//
-// rgbtdi
-// An array BLUETOOTH_DEVICE_INFO records of the devices to be
-// authenticated.
-//
-// Return Values:
-//
-// ERROR_SUCCESS
-// Success. Check the fAuthenticate flag on each of the devices.
-//
-// ERROR_CANCELLED
-// User aborted the operation. Check the fAuthenticate flags on
-// each device to determine if any of the devices were authenticated
-// before the user cancelled the operation.
-//
-// ERROR_INVALID_PARAMETER
-// One of the items in the array of devices is invalid.
-//
-// ERROR_NO_MORE_ITEMS
-// All the devices in the array of devices are already been marked as
-// being authenticated.
-//
-// other WIN32 error
-// Failure. Return value is the error code.
-//
-
-function BluetoothAuthenticateMultipleDevices(
- hwndParent: HWND;
- hRadio: THandle;
- cDevices: DWORD;
- pbtdi: PBLUETOOTH_DEVICE_INFO): DWORD; stdcall;
-{$EXTERNALSYM BluetoothAuthenticateMultipleDevices}
-
-// ***************************************************************************
-//
-// Bluetooth Services
-//
-// ***************************************************************************
-
-const
- BLUETOOTH_SERVICE_DISABLE = $00;
- {$EXTERNALSYM BLUETOOTH_SERVICE_DISABLE}
- BLUETOOTH_SERVICE_ENABLE = $01;
- {$EXTERNALSYM BLUETOOTH_SERVICE_ENABLE}
- BLUETOOTH_SERVICE_MASK = BLUETOOTH_SERVICE_ENABLE or BLUETOOTH_SERVICE_DISABLE;
- {$EXTERNALSYM BLUETOOTH_SERVICE_MASK}
-
-//
-// Description:
-// Enables/disables the services for a particular device.
-//
-// The system maintains a mapping of service guids to supported drivers for
-// Bluetooth-enabled devices. Enabling a service installs the corresponding
-// device driver. Disabling a service removes the corresponding device driver.
-//
-// If a non-supported service is enabled, a driver will not be installed.
-//
-// Parameters
-// hRadio
-// Handle of the local Bluetooth radio device.
-//
-// pbtdi
-// Pointer to a BLUETOOTH_DEVICE_INFO record.
-//
-// pGuidService
-// The service GUID on the remote device.
-//
-// dwServiceFlags
-// Flags to adjust the service.
-// BLUETOOTH_SERVICE_DISABLE - disable the service
-// BLUETOOTH_SERVICE_ENABLE - enables the service
-//
-// Return Values:
-// ERROR_SUCCESS
-// The call was successful.
-//
-// ERROR_INVALID_PARAMETER
-// dwServiceFlags are invalid.
-//
-// ERROR_SERVICE_DOES_NOT_EXIST
-// The GUID in pGuidService is not supported.
-//
-// other WIN32 error
-// The call failed.
-//
-
-function BluetoothSetServiceState(
- hRadio: THandle;
- pbtdi: PBLUETOOTH_DEVICE_INFO;
- const pGuidService: TGUID;
- dwServiceFlags: DWORD): DWORD; stdcall;
-{$EXTERNALSYM BluetoothSetServiceState}
-
-//
-// Description:
-// Enumerates the services guids enabled on a particular device. If hRadio
-// is NULL, all device will be searched for the device and all the services
-// enabled will be returned.
-//
-// Parameters:
-// hRadio
-// Handle of the local Bluetooth radio device. If NULL, it will search
-// all the radios for the address in the pbtdi.
-//
-// pbtdi
-// Pointer to a BLUETOOTH_DEVICE_INFO record.
-//
-// pcService
-// On input, the number of records pointed to by pGuidServices.
-// On output, the number of valid records return in pGuidServices.
-//
-// pGuidServices
-// Pointer to memory that is at least *pcService in length.
-//
-// Return Values:
-// ERROR_SUCCESS
-// The call succeeded. pGuidServices is valid.
-//
-// ERROR_MORE_DATA
-// The call succeeded. pGuidService contains an incomplete list of
-// enabled service GUIDs.
-//
-// other WIN32 errors
-// The call failed.
-//
-
-function BluetoothEnumerateInstalledServices(
- hRadio: THandle;
- pbtdi: PBLUETOOTH_DEVICE_INFO;
- var pcServices: DWORD;
- pGuidServices: PGUID): DWORD; stdcall;
-{$EXTERNALSYM BluetoothEnumerateInstalledServices}
-
-//
-// Description:
-// Change the discovery state of the local radio(s).
-// If hRadio is NULL, all the radios will be set.
-//
-// Use BluetoothIsDiscoverable() to determine the radios current state.
-//
-// The system ensures that a discoverable system is connectable, thus
-// the radio must allow incoming connections (see
-// BluetoothEnableIncomingConnections) prior to making a radio
-// discoverable. Failure to do so will result in this call failing
-// (returns FALSE).
-//
-// Parameters:
-// hRadio
-// If not NULL, changes the state of a specific radio.
-// If NULL, the API will interate through all the radios.
-//
-// fEnabled
-// If FALSE, discovery will be disabled.
-//
-// Return Values
-// TRUE
-// State was successfully changed. If the caller specified NULL for
-// hRadio, at least of the radios accepted the state change.
-//
-// FALSE
-// State was not changed. If the caller specified NULL for hRadio, all
-// of the radios did not accept the state change.
-//
-
-function BluetoothEnableDiscovery(hRadio: THandle; fEnabled: BOOL): BOOL; stdcall;
-{$EXTERNALSYM BluetoothEnableDiscovery}
-
-//
-// Description:
-// Determines if the Bluetooth radios are discoverable. If there are
-// multiple radios, the first one to say it is discoverable will cause
-// this function to return TRUE.
-//
-// Parameters:
-// hRadio
-// Handle of the radio to check. If NULL, it will check all local
-// radios.
-//
-// Return Values:
-// TRUE
-// A least one radio is discoverable.
-//
-// FALSE
-// No radios are discoverable.
-//
-
-function BluetoothIsDiscoverable(hRadio: THandle): BOOL; stdcall;
-{$EXTERNALSYM BluetoothIsDiscoverable}
-
-//
-// Description:
-// Enables/disables the state of a radio to accept incoming connections.
-// If hRadio is NULL, all the radios will be set.
-//
-// Use BluetoothIsConnectable() to determine the radios current state.
-//
-// The system enforces that a radio that is not connectable is not
-// discoverable too. The radio must be made non-discoverable (see
-// BluetoothEnableDiscovery) prior to making a radio non-connectionable.
-// Failure to do so will result in this call failing (returns FALSE).
-//
-// Parameters:
-// hRadio
-// If not NULL, changes the state of a specific radio.
-// If NULL, the API will interate through all the radios.
-//
-// fEnabled
-// If FALSE, incoming connection will be disabled.
-//
-// Return Values
-// TRUE
-// State was successfully changed. If the caller specified NULL for
-// hRadio, at least of the radios accepted the state change.
-//
-// FALSE
-// State was not changed. If the caller specified NULL for hRadio, all
-// of the radios did not accept the state change.
-//
-
-function BluetoothEnableIncomingConnections(hRadio: THandle; fEnabled: BOOL): BOOL; stdcall;
-{$EXTERNALSYM BluetoothEnableIncomingConnections}
-
-//
-// Description:
-// Determines if the Bluetooth radios are connectable. If there are
-// multiple radios, the first one to say it is connectable will cause
-// this function to return TRUE.
-//
-// Parameters:
-// hRadio
-// Handle of the radio to check. If NULL, it will check all local
-// radios.
-//
-// Return Values:
-// TRUE
-// A least one radio is allowing incoming connections.
-//
-// FALSE
-// No radios are allowing incoming connections.
-//
-
-function BluetoothIsConnectable(hRadio: THandle): BOOL; stdcall;
-{$EXTERNALSYM BluetoothIsConnectable}
-
-// ***************************************************************************
-//
-// Authentication Registration
-//
-// ***************************************************************************
-
-type
- HBLUETOOTH_AUTHENTICATION_REGISTRATION = THandle;
- {$EXTERNALSYM HBLUETOOTH_AUTHENTICATION_REGISTRATION}
-
- PFN_AUTHENTICATION_CALLBACK = function(pvParam: Pointer; pDevice: PBLUETOOTH_DEVICE_INFO): BOOL; stdcall;
- {$EXTERNALSYM PFN_AUTHENTICATION_CALLBACK}
-
-//
-// Description:
-// Registers a callback function to be called when a particular device
-// requests authentication. The request is sent to the last application
-// that requested authentication for a particular device.
-//
-// Parameters:
-// pbtdi
-// A pointer to a BLUETOOTH_DEVICE_INFO structure. The Bluetooth
-// address will be used for comparision.
-//
-// phRegHandle
-// A pointer to where the registration HANDLE value will be
-// stored. Call BluetoothUnregisterAuthentication() to close
-// the handle.
-//
-// pfnCallback
-// The function that will be called when the authentication event
-// occurs. This function should match PFN_AUTHENTICATION_CALLBACK's
-// prototype.
-//
-// pvParam
-// Optional parameter to be past through to the callback function.
-// This can be anything the application was to define.
-//
-// Return Values:
-// ERROR_SUCCESS
-// Success. A valid registration handle was returned.
-//
-// ERROR_OUTOFMEMORY
-// Out of memory.
-//
-// other Win32 error.
-// Failure. The registration handle is invalid.
-//
-
-function BluetoothRegisterForAuthentication(
- pbtdi: PBLUETOOTH_DEVICE_INFO;
- var phRegHandle: HBLUETOOTH_AUTHENTICATION_REGISTRATION;
- pfnCallback: PFN_AUTHENTICATION_CALLBACK;
- pvParam: Pointer): DWORD; stdcall;
-{$EXTERNALSYM BluetoothRegisterForAuthentication}
-
-//
-// Description:
-// Unregisters an authentication callback and closes the handle. See
-// BluetoothRegisterForAuthentication() for more information about
-// authentication registration.
-//
-// Parameters:
-// hRegHandle
-// Handle returned by BluetoothRegisterForAuthentication().
-//
-// Return Value:
-// TRUE
-// The handle was successfully closed.
-//
-// FALSE
-// The handle was not successfully closed. Check GetLastError for
-// more details.
-//
-// ERROR_INVALID_HANDLE
-// The handle is NULL.
-//
-// other Win32 errors.
-//
-
-function BluetoothUnregisterAuthentication(hRegHandle: HBLUETOOTH_AUTHENTICATION_REGISTRATION): BOOL; stdcall;
-{$EXTERNALSYM BluetoothUnregisterAuthentication}
-
-//
-// Description:
-// This function should be called after receiving an authentication request
-// to send the passkey response.
-//
-// Parameters:
-//
-// hRadio
-// Optional handle to the local radio. If NULL, the function will try
-// each radio until one succeeds.
-//
-// pbtdi
-// A pointer to a BLUETOOTH_DEVICE_INFO structure describing the device
-// being authenticated. This can be the same structure passed to the
-// callback function.
-//
-// pszPasskey
-// A pointer to UNICODE zero-terminated string of the passkey response
-// that should be sent back to the authenticating device.
-//
-// Return Values:
-// ERROR_SUCESS
-// The device accepted the passkey response. The device is authenticated.
-//
-// ERROR_CANCELED
-// The device denied the passkey reponse. This also will returned if there
-// is a communications problem with the local radio.
-//
-// E_FAIL
-// The device returned a failure code during authentication.
-//
-// other Win32 error codes
-//
-
-function BluetoothSendAuthenticationResponse(
- hRadio: THandle;
- pbtdi: PBLUETOOTH_DEVICE_INFO;
- pszPasskey: LPWSTR): DWORD; stdcall;
-{$EXTERNALSYM BluetoothSendAuthenticationResponse}
-
-// ***************************************************************************
-//
-// SDP Parsing Functions
-//
-// ***************************************************************************
-
-type
- TSpdElementDataString = record
- // raw string buffer, may not be encoded as ANSI, use
- // BluetoothSdpGetString to convert the value if it is described
- // by the base language attribute ID list
- value: PBYTE;
- // raw length of the string, may not be NULL terminuated
- length: ULONG;
- end;
-
- TSpdElementDataUrl = record
- value: PBYTE;
- length: ULONG;
- end;
-
- // type == SDP_TYPE_SEQUENCE
- TSpdElementDataSequence = record
- // raw sequence, starts at sequence element header
- value: PBYTE;
- // raw sequence length
- length: ULONG;
- end;
-
- // type == SDP_TYPE_ALTERNATIVE
- TSpdElementDataAlternative = record
- // raw alternative, starts at alternative element header
- value: PBYTE;
- // raw alternative length
- length: ULONG;
- end;
-
- _SDP_ELEMENT_DATA = record
- //
- // Enumeration of SDP element types. Generic element types will have a
- // specificType value other then SDP_ST_NONE. The generic types are:
- // o SDP_TYPE_UINT
- // o SDP_TYPE_INT
- // o SDP_TYPE_UUID
- //
- type_: SDP_TYPE;
-
- //
- // Specific types for the generic SDP element types.
- //
- specificType: SDP_SPECIFICTYPE;
-
- //
- // Union of all possible data types. type and specificType will indicate
- // which field is valid. For types which do not have a valid specificType,
- // specific type will be SDP_ST_NONE.
- //
- case Integer of
- // type == SDP_TYPE_INT
- 0: (int128: SDP_LARGE_INTEGER_16); // specificType == SDP_ST_INT128
- 1: (int64: LONGLONG); // specificType == SDP_ST_INT64
- 2: (int32: Integer); // specificType == SDP_ST_INT32
- 3: (int16: SHORT); // specificType == SDP_ST_INT16
- 4: (int8: CHAR); // specificType == SDP_ST_INT8
-
- // type == SDP_TYPE_UINT
- 5: (uint128: SDP_ULARGE_INTEGER_16); // specificType == SDP_ST_UINT128
- 6: (uint64: Int64); // specificType == SDP_ST_UINT64
- 7: (uint32: ULONG); // specificType == SDP_ST_UINT32
- 8: (uint16: Word); // specificType == SDP_ST_UINT16
- 9: (uint8: UCHAR); // specificType == SDP_ST_UINT8
-
- // type == SDP_TYPE_BOOLEAN
- 10: (booleanVal: UCHAR);
-
- // type == SDP_TYPE_UUID
- 11: (uuid128: TGUID); // specificType == SDP_ST_UUID128
- 12: (uuid32: ULONG); // specificType == SDP_ST_UUID32
- 13: (uuid16: Word); // specificType == SDP_ST_UUID32
-
- // type == SDP_TYPE_STRING
- 14: (string_: TSpdElementDataString);
- // type == SDP_TYPE_URL
- 15: (url: TSpdElementDataUrl);
-
- // type == SDP_TYPE_SEQUENCE
- 16: (sequence: TSpdElementDataSequence);
-
- // type == SDP_TYPE_ALTERNATIVE
- 17: (alternative: TSpdElementDataAlternative);
- end;
- {$EXTERNALSYM _SDP_ELEMENT_DATA}
- SDP_ELEMENT_DATA = _SDP_ELEMENT_DATA;
- {$EXTERNALSYM SDP_ELEMENT_DATA}
- PSDP_ELEMENT_DATA = ^SDP_ELEMENT_DATA;
- {$EXTERNALSYM PSDP_ELEMENT_DATA}
- TSdpElementData = SDP_ELEMENT_DATA;
- PSdpElementData = PSDP_ELEMENT_DATA;
-
-//
-// Description:
-// Retrieves and parses the element found at pSdpStream
-//
-// Parameters:
-// IN pSdpStream
-// pointer to valid SDP stream
-//
-// IN cbSdpStreamLength
-// length of pSdpStream in bytes
-//
-// OUT pData
-// pointer to be filled in with the data of the SDP element at the
-// beginning of pSdpStream
-//
-// Return Values:
-// ERROR_INVALID_PARAMETER
-// one of required parameters is NULL or the pSdpStream is invalid
-//
-// ERROR_SUCCESS
-// the sdp element was parsed correctly
-//
-
-function BluetoothSdpGetElementData(
- pSdpStream: PBYTE;
- cbSdpStreamLength: ULONG;
- pData: PSDP_ELEMENT_DATA): DWORD; stdcall;
-{$EXTERNALSYM BluetoothSdpGetElementData}
-
-type
- HBLUETOOTH_CONTAINER_ELEMENT = THandle;
- {$EXTERNALSYM HBLUETOOTH_CONTAINER_ELEMENT}
-
-//
-// Description:
-// Iterates over a container stream, returning each elemetn contained with
-// in the container element at the beginning of pContainerStream
-//
-// Parameters:
-// IN pContainerStream
-// pointer to valid SDP stream whose first element is either a sequence
-// or alternative
-//
-// IN cbContainerlength
-// length in bytes of pContainerStream
-//
-// IN OUT pElement
-// Value used to keep track of location within the stream. The first
-// time this function is called for a particular container, *pElement
-// should equal NULL. Upon subsequent calls, the value should be
-// unmodified.
-//
-// OUT pData
-// pointer to be filled in with the data of the SDP element at the
-// current element of pContainerStream
-//
-// Return Values:
-// ERROR_SUCCESS
-// The call succeeded, pData contains the data
-//
-// ERROR_NO_MORE_ITEMS
-// There are no more items in the list, the caller should cease calling
-// BluetoothSdpGetContainerElementData for this container.
-//
-// ERROR_INVALID_PARAMETER
-// A required pointer is NULL or the container is not a valid SDP
-// stream
-//
-// Usage example:
-//
-// HBLUETOOTH_CONTAINER_ELEMENT element;
-// SDP_ELEMENT_DATA data;
-// ULONG result;
-//
-// element = NULL;
-//
-// while (TRUE) {
-// result = BluetoothSdpGetContainerElementData(
-// pContainer, ulContainerLength, &element, &data);
-//
-// if (result == ERROR_NO_MORE_ITEMS) {
-// // We are done
-// break;
-// }
-// else if (result != ERROR_SUCCESS) {
-// // error
-// }
-//
-// // do something with data ...
-// }
-//
-//
-
-function BluetoothSdpGetContainerElementData(
- pContainerStream: PBYTE;
- cbContainerLength: ULONG;
- var pElement: HBLUETOOTH_CONTAINER_ELEMENT;
- pData: PSDP_ELEMENT_DATA): DWORD; stdcall;
-{$EXTERNALSYM BluetoothSdpGetContainerElementData}
-
-//
-// Description:
-// Retrieves the attribute value for the given attribute ID. pRecordStream
-// must be an SDP stream that is formatted as an SDP record, a SEQUENCE
-// containing UINT16 + element pairs.
-//
-// Parameters:
-// IN pRecordStream
-// pointer to a valid SDP stream which is formatted as a singl SDP
-// record
-//
-// IN cbRecordlnegh
-// length of pRecordStream in bytes
-//
-// IN usAttributeId
-// the attribute ID to search for. see bthdef.h for SDP_ATTRIB_Xxx
-// values.
-//
-// OUT pAttributeData
-// pointer that will contain the attribute ID's value
-//
-// Return Values:
-// ERRROR_SUCCESS
-// Call succeeded, pAttributeData contains the attribute value
-//
-// ERROR_INVALID_PARAMETER
-// One of the required pointers was NULL, pRecordStream was not a valid
-// SDP stream, or pRecordStream was not a properly formatted SDP record
-//
-// ERROR_FILE_NOT_FOUND
-// usAttributeId was not found in the record
-//
-// Usage:
-//
-// ULONG result;
-// SDP_DATA_ELEMENT data;
-//
-// result = BluetoothSdpGetAttributeValue(
-// pRecordStream, cbRecordLength, SDP_ATTRIB_RECORD_HANDLE, &data);
-// if (result == ERROR_SUCCESS) {
-// printf("record handle is 0x%x\n", data.data.uint32);
-// }
-//
-
-function BluetoothSdpGetAttributeValue(
- pRecordStream: PBYTE;
- cbRecordLength: ULONG;
- usAttributeId: Word;
- pAttributeData: PSDP_ELEMENT_DATA): DWORD; stdcall;
-{$EXTERNALSYM BluetoothSdpGetAttributeValue}
-
-//
-// These three fields correspond one to one with the triplets defined in the
-// SDP specification for the language base attribute ID list.
-//
-
-type
- _SDP_STRING_TYPE_DATA = record
- //
- // How the string is encoded according to ISO 639:1988 (E/F): "Code
- // for the representation of names of languages".
- //
- encoding: Word;
-
- //
- // MIBE number from IANA database
- //
- mibeNum: Word;
-
- //
- // The base attribute where the string is to be found in the record
- //
- attributeId: Word;
- end;
- {$EXTERNALSYM _SDP_STRING_TYPE_DATA}
- SDP_STRING_TYPE_DATA = _SDP_STRING_TYPE_DATA;
- {$EXTERNALSYM SDP_STRING_TYPE_DATA}
- PSDP_STRING_TYPE_DATA = ^SDP_STRING_TYPE_DATA;
- {$EXTERNALSYM PSDP_STRING_TYPE_DATA}
- TSdpStringTypeData = SDP_STRING_TYPE_DATA;
- PSdpStringTypeData = PSDP_STRING_TYPE_DATA;
-
-//
-// Description:
-// Converts a raw string embedded in the SDP record into a UNICODE string
-//
-// Parameters:
-// IN pRecordStream
-// a valid SDP stream which is formatted as an SDP record
-//
-// IN cbRecordLength
-// length of pRecordStream in bytes
-//
-// IN pStringData
-// if NULL, then the calling thread's locale will be used to search
-// for a matching string in the SDP record. If not NUL, the mibeNum
-// and attributeId will be used to find the string to convert.
-//
-// IN usStringOffset
-// the SDP string type offset to convert. usStringOffset is added to
-// the base attribute id of the string. SDP specification defined
-// offsets are: STRING_NAME_OFFSET, STRING_DESCRIPTION_OFFSET, and
-// STRING_PROVIDER_NAME_OFFSET (found in bthdef.h).
-//
-// OUT pszString
-// if NULL, pcchStringLength will be filled in with the required number
-// of characters (not bytes) to retrieve the converted string.
-//
-// IN OUT pcchStringLength
-// Upon input, if pszString is not NULL, will contain the length of
-// pszString in characters. Upon output, it will contain either the
-// number of required characters including NULL if an error is returned
-// or the number of characters written to pszString (including NULL).
-//
-// Return Values:
-// ERROR_SUCCES
-// Call was successful and pszString contains the converted string
-//
-// ERROR_MORE_DATA
-// pszString was NULL or too small to contain the converted string,
-// pccxhStringLength contains the required length in characters
-//
-// ERROR_INVALID_DATA
-// Could not perform the conversion
-//
-// ERROR_NO_SYSTEM_RESOURCES
-// Could not allocate memory internally to perform the conversion
-//
-// ERROR_INVALID_PARAMETER
-// One of the rquired pointers was NULL, pRecordStream was not a valid
-// SDP stream, pRecordStream was not a properly formatted record, or
-// the desired attribute + offset was not a string.
-//
-// Other HRESULTs returned by COM
-//
-
-function BluetoothSdpGetString(
- pRecordStream: PBYTE;
- cbRecordLength: ULONG;
- pStringData: PSDP_STRING_TYPE_DATA;
- usStringOffset: Word;
- pszString: PWideChar;
- pcchStringLength: PULONG): DWORD; stdcall;
-{$EXTERNALSYM BluetoothSdpGetString}
-
-// ***************************************************************************
-//
-// Raw Attribute Enumeration
-//
-// ***************************************************************************
-
-type
- PFN_BLUETOOTH_ENUM_ATTRIBUTES_CALLBACK = function(
- uAttribId: ULONG;
- pValueStream: PBYTE;
- cbStreamSize: ULONG;
- pvParam: Pointer): BOOL; stdcall;
- {$EXTERNALSYM PFN_BLUETOOTH_ENUM_ATTRIBUTES_CALLBACK}
-
-//
-// Description:
-// Enumerates through the SDP record stream calling the Callback function
-// for each attribute in the record. If the Callback function returns
-// FALSE, the enumeration is stopped.
-//
-// Return Values:
-// TRUE
-// Success! Something was enumerated.
-//
-// FALSE
-// Failure. GetLastError() could be one of the following:
-//
-// ERROR_INVALID_PARAMETER
-// pSDPStream or pfnCallback is NULL.
-//
-// ERROR_INVALID_DATA
-// The SDP stream is corrupt.
-//
-// other Win32 errors.
-//
-
-function BluetoothSdpEnumAttributes(
- pSDPStream: PBYTE;
- cbStreamSize: ULONG;
- pfnCallback: PFN_BLUETOOTH_ENUM_ATTRIBUTES_CALLBACK;
- pvParam: Pointer): BOOL; stdcall;
-{$EXTERNALSYM BluetoothSdpEnumAttributes}
-
-// (rom) MACRO
-function BluetoothEnumAttributes(
- pSDPStream: PBYTE;
- cbStreamSize: ULONG;
- pfnCallback: PFN_BLUETOOTH_ENUM_ATTRIBUTES_CALLBACK;
- pvParam: Pointer): BOOL;
-{$EXTERNALSYM BluetoothEnumAttributes}
-
-implementation
-
-const
- btapi = 'irprops.cpl';
-
-// (rom) MACRO implementation
-function BluetoothEnumAttributes(pSDPStream: PBYTE; cbStreamSize: ULONG;
- pfnCallback: PFN_BLUETOOTH_ENUM_ATTRIBUTES_CALLBACK; pvParam: Pointer): BOOL;
-begin
- Result := BluetoothSdpEnumAttributes(pSDPStream, cbStreamSize, pfnCallback, pvParam);
-end;
-
-{$IFDEF DYNAMIC_LINK}
-
-var
- _BluetoothFindFirstRadio: Pointer;
-
-function BluetoothFindFirstRadio;
-begin
- GetProcedureAddress(_BluetoothFindFirstRadio, btapi, 'BluetoothFindFirstRadio');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_BluetoothFindFirstRadio]
- end;
-end;
-
-var
- _BluetoothFindNextRadio: Pointer;
-
-function BluetoothFindNextRadio;
-begin
- GetProcedureAddress(_BluetoothFindNextRadio, btapi, 'BluetoothFindNextRadio');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_BluetoothFindNextRadio]
- end;
-end;
-
-var
- _BluetoothFindRadioClose: Pointer;
-
-function BluetoothFindRadioClose;
-begin
- GetProcedureAddress(_BluetoothFindRadioClose, btapi, 'BluetoothFindRadioClose');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_BluetoothFindRadioClose]
- end;
-end;
-
-var
- _BluetoothGetRadioInfo: Pointer;
-
-function BluetoothGetRadioInfo;
-begin
- GetProcedureAddress(_BluetoothGetRadioInfo, btapi, 'BluetoothGetRadioInfo');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_BluetoothGetRadioInfo]
- end;
-end;
-
-var
- _BluetoothFindFirstDevice: Pointer;
-
-function BluetoothFindFirstDevice;
-begin
- GetProcedureAddress(_BluetoothFindFirstDevice, btapi, 'BluetoothFindFirstDevice');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_BluetoothFindFirstDevice]
- end;
-end;
-
-var
- _BluetoothFindNextDevice: Pointer;
-
-function BluetoothFindNextDevice;
-begin
- GetProcedureAddress(_BluetoothFindNextDevice, btapi, 'BluetoothFindNextDevice');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_BluetoothFindNextDevice]
- end;
-end;
-
-var
- _BluetoothFindDeviceClose: Pointer;
-
-function BluetoothFindDeviceClose;
-begin
- GetProcedureAddress(_BluetoothFindDeviceClose, btapi, 'BluetoothFindDeviceClose');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_BluetoothFindDeviceClose]
- end;
-end;
-
-var
- _BluetoothGetDeviceInfo: Pointer;
-
-function BluetoothGetDeviceInfo;
-begin
- GetProcedureAddress(_BluetoothGetDeviceInfo, btapi, 'BluetoothGetDeviceInfo');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_BluetoothGetDeviceInfo]
- end;
-end;
-
-var
- _BluetoothUpdateDeviceRecord: Pointer;
-
-function BluetoothUpdateDeviceRecord;
-begin
- GetProcedureAddress(_BluetoothUpdateDeviceRecord, btapi, 'BluetoothUpdateDeviceRecord');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_BluetoothUpdateDeviceRecord]
- end;
-end;
-
-var
- _BluetoothRemoveDevice: Pointer;
-
-function BluetoothRemoveDevice;
-begin
- GetProcedureAddress(_BluetoothRemoveDevice, btapi, 'BluetoothRemoveDevice');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_BluetoothRemoveDevice]
- end;
-end;
-
-var
- _BluetoothSelectDevices: Pointer;
-
-function BluetoothSelectDevices;
-begin
- GetProcedureAddress(_BluetoothSelectDevices, btapi, 'BluetoothSelectDevices');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_BluetoothSelectDevices]
- end;
-end;
-
-var
- _BluetoothSelectDevicesFree: Pointer;
-
-function BluetoothSelectDevicesFree;
-begin
- GetProcedureAddress(_BluetoothSelectDevicesFree, btapi, 'BluetoothSelectDevicesFree');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_BluetoothSelectDevicesFree]
- end;
-end;
-
-var
- _BluetoothDisplayDeviceProperties: Pointer;
-
-function BluetoothDisplayDeviceProperties;
-begin
- GetProcedureAddress(_BluetoothDisplayDeviceProperties, btapi, 'BluetoothDisplayDeviceProperties');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_BluetoothDisplayDeviceProperties]
- end;
-end;
-
-var
- _BluetoothAuthenticateDevice: Pointer;
-
-function BluetoothAuthenticateDevice;
-begin
- GetProcedureAddress(_BluetoothAuthenticateDevice, btapi, 'BluetoothAuthenticateDevice');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_BluetoothAuthenticateDevice]
- end;
-end;
-
-var
- _BluetoothAuthenticateMultipleDevices: Pointer;
-
-function BluetoothAuthenticateMultipleDevices;
-begin
- GetProcedureAddress(_BluetoothAuthenticateMultipleDevices, btapi, 'BluetoothAuthenticateMultipleDevices');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_BluetoothAuthenticateMultipleDevices]
- end;
-end;
-
-var
- _BluetoothSetServiceState: Pointer;
-
-function BluetoothSetServiceState;
-begin
- GetProcedureAddress(_BluetoothSetServiceState, btapi, 'BluetoothSetServiceState');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_BluetoothSetServiceState]
- end;
-end;
-
-var
- _BluetoothEnumerateInstalledServices: Pointer;
-
-function BluetoothEnumerateInstalledServices;
-begin
- GetProcedureAddress(_BluetoothEnumerateInstalledServices, btapi, 'BluetoothEnumerateInstalledServices');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_BluetoothEnumerateInstalledServices]
- end;
-end;
-
-var
- _BluetoothEnableDiscovery: Pointer;
-
-function BluetoothEnableDiscovery;
-begin
- GetProcedureAddress(_BluetoothEnableDiscovery, btapi, 'BluetoothEnableDiscovery');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_BluetoothEnableDiscovery]
- end;
-end;
-
-var
- _BluetoothIsDiscoverable: Pointer;
-
-function BluetoothIsDiscoverable;
-begin
- GetProcedureAddress(_BluetoothIsDiscoverable, btapi, 'BluetoothIsDiscoverable');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_BluetoothIsDiscoverable]
- end;
-end;
-
-var
- _BluetoothEnableIncomingConnections: Pointer;
-
-function BluetoothEnableIncomingConnections;
-begin
- GetProcedureAddress(_BluetoothEnableIncomingConnections, btapi, 'BluetoothEnableIncomingConnections');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_BluetoothEnableIncomingConnections]
- end;
-end;
-
-var
- _BluetoothIsConnectable: Pointer;
-
-function BluetoothIsConnectable;
-begin
- GetProcedureAddress(_BluetoothIsConnectable, btapi, 'BluetoothIsConnectable');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_BluetoothIsConnectable]
- end;
-end;
-
-var
- _BluetoothRegisterForAuthentication: Pointer;
-
-function BluetoothRegisterForAuthentication;
-begin
- GetProcedureAddress(_BluetoothRegisterForAuthentication, btapi, 'BluetoothRegisterForAuthentication');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_BluetoothRegisterForAuthentication]
- end;
-end;
-
-var
- _BluetoothUnregisterAuthentication: Pointer;
-
-function BluetoothUnregisterAuthentication;
-begin
- GetProcedureAddress(_BluetoothUnregisterAuthentication, btapi, 'BluetoothUnregisterAuthentication');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_BluetoothUnregisterAuthentication]
- end;
-end;
-
-var
- _BluetoothSendAuthenticationResponse: Pointer;
-
-function BluetoothSendAuthenticationResponse;
-begin
- GetProcedureAddress(_BluetoothSendAuthenticationResponse, btapi, 'BluetoothSendAuthenticationResponse');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_BluetoothSendAuthenticationResponse]
- end;
-end;
-
-var
- _BluetoothSdpGetElementData: Pointer;
-
-function BluetoothSdpGetElementData;
-begin
- GetProcedureAddress(_BluetoothSdpGetElementData, btapi, 'BluetoothSdpGetElementData');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_BluetoothSdpGetElementData]
- end;
-end;
-
-var
- _BluetoothSdpGetContainerElementData: Pointer;
-
-function BluetoothSdpGetContainerElementData;
-begin
- GetProcedureAddress(_BluetoothSdpGetContainerElementData, btapi, 'BluetoothSdpGetContainerElementData');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_BluetoothSdpGetContainerElementData]
- end;
-end;
-
-var
- _BluetoothSdpGetAttributeValue: Pointer;
-
-function BluetoothSdpGetAttributeValue;
-begin
- GetProcedureAddress(_BluetoothSdpGetAttributeValue, btapi, 'BluetoothSdpGetAttributeValue');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_BluetoothSdpGetAttributeValue]
- end;
-end;
-
-var
- _BluetoothSdpGetString: Pointer;
-
-function BluetoothSdpGetString;
-begin
- GetProcedureAddress(_BluetoothSdpGetString, btapi, 'BluetoothSdpGetString');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_BluetoothSdpGetString]
- end;
-end;
-
-var
- _BluetoothSdpEnumAttributes: Pointer;
-
-function BluetoothSdpEnumAttributes;
-begin
- GetProcedureAddress(_BluetoothSdpEnumAttributes, btapi, 'BluetoothSdpEnumAttributes');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_BluetoothSdpEnumAttributes]
- end;
-end;
-
-{$ELSE}
-
-function BluetoothFindFirstRadio; external btapi name 'BluetoothFindFirstRadio';
-function BluetoothFindNextRadio; external btapi name 'BluetoothFindNextRadio';
-function BluetoothFindRadioClose; external btapi name 'BluetoothFindRadioClose';
-function BluetoothGetRadioInfo; external btapi name 'BluetoothGetRadioInfo';
-function BluetoothFindFirstDevice; external btapi name 'BluetoothFindFirstDevice';
-function BluetoothFindNextDevice; external btapi name 'BluetoothFindNextDevice';
-function BluetoothFindDeviceClose; external btapi name 'BluetoothFindDeviceClose';
-function BluetoothGetDeviceInfo; external btapi name 'BluetoothGetDeviceInfo';
-function BluetoothUpdateDeviceRecord; external btapi name 'BluetoothUpdateDeviceRecord';
-function BluetoothRemoveDevice; external btapi name 'BluetoothRemoveDevice';
-function BluetoothSelectDevices; external btapi name 'BluetoothSelectDevices';
-function BluetoothSelectDevicesFree; external btapi name 'BluetoothSelectDevicesFree';
-function BluetoothDisplayDeviceProperties; external btapi name 'BluetoothDisplayDeviceProperties';
-function BluetoothAuthenticateDevice; external btapi name 'BluetoothAuthenticateDevice';
-function BluetoothAuthenticateMultipleDevices; external btapi name 'BluetoothAuthenticateMultipleDevices';
-function BluetoothSetServiceState; external btapi name 'BluetoothSetServiceState';
-function BluetoothEnumerateInstalledServices; external btapi name 'BluetoothEnumerateInstalledServices';
-function BluetoothEnableDiscovery; external btapi name 'BluetoothEnableDiscovery';
-function BluetoothIsDiscoverable; external btapi name 'BluetoothIsDiscoverable';
-function BluetoothEnableIncomingConnections; external btapi name 'BluetoothEnableIncomingConnections';
-function BluetoothIsConnectable; external btapi name 'BluetoothIsConnectable';
-function BluetoothRegisterForAuthentication; external btapi name 'BluetoothRegisterForAuthentication';
-function BluetoothUnregisterAuthentication; external btapi name 'BluetoothUnregisterAuthentication';
-function BluetoothSendAuthenticationResponse; external btapi name 'BluetoothSendAuthenticationResponse';
-function BluetoothSdpGetElementData; external btapi name 'BluetoothSdpGetElementData';
-function BluetoothSdpGetContainerElementData; external btapi name 'BluetoothSdpGetContainerElementData';
-function BluetoothSdpGetAttributeValue; external btapi name 'BluetoothSdpGetAttributeValue';
-function BluetoothSdpGetString; external btapi name 'BluetoothSdpGetString';
-function BluetoothSdpEnumAttributes; external btapi name 'BluetoothSdpEnumAttributes';
-
-{$ENDIF DYNAMIC_LINK}
-
-end.
+{******************************************************************************}
+{ }
+{ BlueTooth API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Contributors: John Penman }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwabluetoothapis.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaBluetoothAPIs;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "bluetoothapis.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaWinType, JwaWinBase, JwaBthSdpDef;
+
+const
+ BLUETOOTH_MAX_NAME_SIZE = 248;
+ {$EXTERNALSYM BLUETOOTH_MAX_NAME_SIZE}
+ BLUETOOTH_MAX_PASSKEY_SIZE = 16;
+ {$EXTERNALSYM BLUETOOTH_MAX_PASSKEY_SIZE}
+ BLUETOOTH_MAX_PASSKEY_BUFFER_SIZE = BLUETOOTH_MAX_PASSKEY_SIZE + 1;
+ {$EXTERNALSYM BLUETOOTH_MAX_PASSKEY_BUFFER_SIZE}
+
+// ***************************************************************************
+//
+// Bluetooth Address
+//
+// ***************************************************************************
+
+type
+ BTH_ADDR = Int64;
+ {$EXTERNALSYM BTH_ADDR}
+
+ _BLUETOOTH_ADDRESS = record
+ case Integer of
+ 0: (ullLong: BTH_ADDR); // easier to compare again BLUETOOTH_NULL_ADDRESS
+ 1: (rgBytes: array [0..5] of Byte); // easier to format when broken out
+ end;
+ {$EXTERNALSYM _BLUETOOTH_ADDRESS}
+ BLUETOOTH_ADDRESS = _BLUETOOTH_ADDRESS;
+ {$EXTERNALSYM BLUETOOTH_ADDRESS}
+ TBlueToothAddress = BLUETOOTH_ADDRESS;
+ PBlueToothAddress = ^BLUETOOTH_ADDRESS;
+
+const
+ BLUETOOTH_NULL_ADDRESS: TBlueToothAddress = (ullLong: 0;);
+ {$EXTERNALSYM BLUETOOTH_NULL_ADDRESS}
+
+// ***************************************************************************
+//
+// Radio Enumeration
+//
+// Description:
+// This group of APIs enumerates the installed Bluetooth radios.
+//
+// Sample Usage:
+// HANDLE hRadio;
+// BLUETOOTH_FIND_RADIO_PARAMS btfrp = { sizeof(btfrp) };
+//
+// HBLUETOOTH_RADIO_FIND hFind = BluetoothFindFirstRadio( &btfrp, &hRadio );
+// if ( NULL != hFind )
+// {
+// do
+// {
+// //
+// // TODO: Do something with the radio handle.
+// //
+//
+// CloseHandle( hRadio );
+//
+// } while( BluetoothFindNextRadio( hFind, &hRadio ) );
+//
+// BluetoothFindRadioClose( hFind );
+// }
+//
+// ***************************************************************************
+
+type
+ _BLUETOOTH_FIND_RADIO_PARAMS = record
+ dwSize: DWORD; // IN sizeof this structure
+ end;
+ {$EXTERNALSYM _BLUETOOTH_FIND_RADIO_PARAMS}
+ BLUETOOTH_FIND_RADIO_PARAMS = _BLUETOOTH_FIND_RADIO_PARAMS;
+ {$EXTERNALSYM BLUETOOTH_FIND_RADIO_PARAMS}
+ TBlueToothFindRadioParams = BLUETOOTH_FIND_RADIO_PARAMS;
+ PBlueToothFindRadioParams = ^BLUETOOTH_FIND_RADIO_PARAMS;
+
+ HBLUETOOTH_RADIO_FIND = THandle;
+ {$EXTERNALSYM HBLUETOOTH_RADIO_FIND}
+
+//
+// Description:
+// Begins the enumeration of local Bluetooth radios.
+//
+// Parameters:
+// pbtfrp
+// A pointer to a BLUETOOTH_FIND_RADIO_PARAMS structure. The dwSize
+// member of this structure must match the sizeof the of the structure.
+//
+// phRadio
+// A pointer where the first radio HANDLE enumerated will be returned.
+//
+// Return Values:
+// NULL
+// Error opening radios or no devices found. Use GetLastError() for
+// more info.
+//
+// ERROR_INVALID_PARAMETER
+// pbtfrp parameter is NULL.
+//
+// ERROR_REVISION_MISMATCH
+// The pbtfrp structure is not the right length.
+//
+// ERROR_OUTOFMEMORY
+// Out of memory.
+//
+// other Win32 errors.
+//
+// any other
+// Success. The return handle is valid and phRadio points to a valid handle.
+//
+
+function BluetoothFindFirstRadio(const pbtfrp: PBlueToothFindRadioParams; var phRadio: THandle): HBLUETOOTH_RADIO_FIND; stdcall;
+{$EXTERNALSYM BluetoothFindFirstRadio}
+
+//
+// Description:
+// Finds the next installed Bluetooth radio.
+//
+// Parameters:
+// hFind
+// The handle returned by BluetoothFindFirstRadio().
+//
+// phRadio
+// A pointer where the next radio HANDLE enumerated will be returned.
+//
+// Return Values:
+// TRUE
+// Next device succesfully found. pHandleOut points to valid handle.
+//
+// FALSE
+// No device found. pHandleOut points to an invalid handle. Call
+// GetLastError() for more details.
+//
+// ERROR_INVALID_HANDLE
+// The handle is NULL.
+//
+// ERROR_NO_MORE_ITEMS
+// No more radios found.
+//
+// ERROR_OUTOFMEMORY
+// Out of memory.
+//
+// other Win32 errors
+//
+
+function BluetoothFindNextRadio(hFind: HBLUETOOTH_RADIO_FIND; var phRadio: THandle): BOOL; stdcall;
+{$EXTERNALSYM BluetoothFindNextRadio}
+
+//
+// Description:
+// Closes the enumeration handle.
+//
+// Parameters
+// hFind
+// The handle returned by BluetoothFindFirstRadio().
+//
+// Return Values:
+// TRUE
+// Handle succesfully closed.
+//
+// FALSE
+// Failure. Check GetLastError() for details.
+//
+// ERROR_INVALID_HANDLE
+// The handle is NULL.
+//
+
+function BluetoothFindRadioClose(hFind: HBLUETOOTH_RADIO_FIND): BOOL; stdcall;
+{$EXTERNALSYM BluetoothFindRadioClose}
+
+// ***************************************************************************
+//
+// Radio Information
+//
+// ***************************************************************************
+
+type
+ _BLUETOOTH_RADIO_INFO = record
+ dwSize: DWORD; // Size, in bytes, of this entire data structure
+ address: BLUETOOTH_ADDRESS; // Address of the local radio
+ szName: array [0..BLUETOOTH_MAX_NAME_SIZE - 1] of WideChar; // Name of the local radio
+ ulClassofDevice: ULONG; // Class of device for the local radio
+ lmpSubversion: Word; // lmpSubversion, manufacturer specifc.
+ manufacturer: Word; // Manufacturer of the radio, BTH_MFG_Xxx value. For the most up to date
+ // list, goto the Bluetooth specification website and get the Bluetooth
+ // assigned numbers document.
+ end;
+ {$EXTERNALSYM _BLUETOOTH_RADIO_INFO}
+ BLUETOOTH_RADIO_INFO = _BLUETOOTH_RADIO_INFO;
+ {$EXTERNALSYM BLUETOOTH_RADIO_INFO}
+ PBLUETOOTH_RADIO_INFO = ^BLUETOOTH_RADIO_INFO;
+ {$EXTERNALSYM PBLUETOOTH_RADIO_INFO}
+ TBlueToothRadioFind = BLUETOOTH_RADIO_INFO;
+ PBlueToothRadioFind = PBLUETOOTH_RADIO_INFO;
+
+//
+// Description:
+// Retrieves the information about the radio represented by the handle.
+//
+// Parameters:
+// hRadio
+// Handle to a local radio retrieved through BluetoothFindFirstRadio()
+// et al or SetupDiEnumerateDeviceInterfaces()
+//
+// pRadioInfo
+// Radio information to be filled in. The dwSize member must match the
+// size of the structure.
+//
+// Return Values:
+// ERROR_SUCCESS
+// The information was retrieved successfully.
+//
+// ERROR_INVALID_PARAMETER
+// pRadioInfo or hRadio is NULL.
+//
+// ERROR_REVISION_MISMATCH
+// pRadioInfo->dwSize is invalid.
+//
+// other Win32 error codes.
+//
+
+function BluetoothGetRadioInfo(hRadio: THandle; var pRadioInfo: BLUETOOTH_RADIO_INFO): DWORD; stdcall;
+{$EXTERNALSYM BluetoothGetRadioInfo}
+
+// ***************************************************************************
+//
+// Device Information Stuctures
+//
+// ***************************************************************************
+
+type
+ _BLUETOOTH_DEVICE_INFO = record
+ dwSize: DWORD; // size, in bytes, of this structure - must be the sizeof(BLUETOOTH_DEVICE_INFO)
+ Address: BLUETOOTH_ADDRESS; // Bluetooth address
+ ulClassofDevice: ULONG; // Bluetooth "Class of Device"
+ fConnected: BOOL; // Device connected/in use
+ fRemembered: BOOL; // Device remembered
+ fAuthenticated: BOOL; // Device authenticated/paired/bonded
+ stLastSeen: SYSTEMTIME; // Last time the device was seen
+ stLastUsed: SYSTEMTIME; // Last time the device was used for other than RNR, inquiry, or SDP
+ szName: array [0..BLUETOOTH_MAX_NAME_SIZE - 1] of WideChar; // Name of the device
+ end;
+ {$EXTERNALSYM _BLUETOOTH_DEVICE_INFO}
+ BLUETOOTH_DEVICE_INFO = _BLUETOOTH_DEVICE_INFO;
+ {$EXTERNALSYM BLUETOOTH_DEVICE_INFO}
+ PBLUETOOTH_DEVICE_INFO = BLUETOOTH_DEVICE_INFO;
+ {$EXTERNALSYM PBLUETOOTH_DEVICE_INFO}
+ TBlueToothDeviceInfo = BLUETOOTH_DEVICE_INFO;
+ PBlueToothDeviceInfo = PBLUETOOTH_DEVICE_INFO;
+
+// ***************************************************************************
+//
+// Device Enumeration
+//
+// Description:
+// Enumerates the Bluetooth devices. The types of returned device depends
+// on the flags set in the BLUETOOTH_DEVICE_SEARCH_PARAMS (see structure
+// definition for details).
+//
+// Sample Usage:
+// HBLUETOOTH_DEVICE_FIND hFind;
+// BLUETOOTH_DEVICE_SEARCH_PARAMS btsp = { sizeof(btsp) };
+// BLUETOOTH_DEVICE_INFO btdi = { sizeof(btdi) };
+//
+// btsp.fReturnAuthenticated = TRUE;
+// btsp.fReturnRemembered = TRUE;
+//
+// hFind = BluetoothFindFirstDevice( &btsp, &btdi );
+// if ( NULL != hFind )
+// {
+// do
+// {
+// //
+// // TODO: Do something useful with the device info.
+// //
+//
+// } while( BluetoothFindNextDevice( hFind, &btdi ) );
+//
+// BluetoothFindDeviceClose( hFind );
+// }
+//
+// ***************************************************************************
+
+type
+ _BLUETOOTH_DEVICE_SEARCH_PARAMS = record
+ dwSize: DWORD; // IN sizeof this structure
+
+ fReturnAuthenticated: BOOL; // IN return authenticated devices
+ fReturnRemembered: BOOL; // IN return remembered devices
+ fReturnUnknown: BOOL; // IN return unknown devices
+ fReturnConnected: BOOL; // IN return connected devices
+
+ fIssueInquiry: BOOL; // IN issue a new inquiry
+ cTimeoutMultiplier: UCHAR; // IN timeout for the inquiry
+
+ hRadio: THandle; // IN handle to radio to enumerate - NULL == all radios will be searched
+ end;
+ {$EXTERNALSYM _BLUETOOTH_DEVICE_SEARCH_PARAMS}
+ BLUETOOTH_DEVICE_SEARCH_PARAMS = _BLUETOOTH_DEVICE_SEARCH_PARAMS;
+ {$EXTERNALSYM BLUETOOTH_DEVICE_SEARCH_PARAMS}
+ TBlueToothDeviceSearchParams = BLUETOOTH_DEVICE_SEARCH_PARAMS;
+
+ HBLUETOOTH_DEVICE_FIND = THandle;
+ {$EXTERNALSYM HBLUETOOTH_DEVICE_FIND}
+
+//
+// Description:
+// Begins the enumeration of Bluetooth devices.
+//
+// Parameters:
+// pbtsp
+// A pointer to a BLUETOOTH_DEVICE_SEARCH_PARAMS structure. This
+// structure contains the flags and inputs used to conduct the search.
+// See BLUETOOTH_DEVICE_SEARCH_PARAMS for details.
+//
+// pbtdi
+// A pointer to a BLUETOOTH_DEVICE_INFO structure to return information
+// about the first Bluetooth device found. Note that the dwSize member
+// of the structure must be the sizeof(BLUETOOTH_DEVICE_INFO) before
+// calling because the APIs hast to know the size of the buffer being
+// past in. The dwSize member must also match the exact
+// sizeof(BLUETOOTH_DEVICE_INFO) or the call will fail.
+//
+// Return Values:
+// NULL
+// Error opening radios or not devices found. Use GetLastError for more info.
+//
+// ERROR_INVALID_PARAMETER
+// pbtsp parameter or pbtdi parameter is NULL.
+//
+// ERROR_REVISION_MISMATCH
+// The pbtfrp structure is not the right length.
+//
+// other Win32 errors
+//
+// any other value
+// Success. The return handle is valid and pbtdi points to valid data.
+//
+
+function BluetoothFindFirstDevice(const pbtsp: BLUETOOTH_DEVICE_SEARCH_PARAMS; var pbtdi: BLUETOOTH_DEVICE_INFO): HBLUETOOTH_DEVICE_FIND; stdcall;
+{$EXTERNALSYM BluetoothFindFirstDevice}
+
+//
+// Description:
+// Finds the next Bluetooth device in the enumeration.
+//
+// Parameters:
+// hFind
+// The handle returned from BluetoothFindFirstDevice().
+//
+// pbtdi
+// A pointer to a BLUETOOTH_DEVICE_INFO structure to return information
+// about the first Bluetooth device found. Note that the dwSize member
+// of the structure must be the sizeof(BLUETOOTH_DEVICE_INFO) before
+// calling because the APIs hast to know the size of the buffer being
+// past in. The dwSize member must also match the exact
+// sizeof(BLUETOOTH_DEVICE_INFO) or the call will fail.
+//
+// Return Values:
+// TRUE
+// Next device succesfully found. pHandleOut points to valid handle.
+//
+// FALSE
+// No device found. pHandleOut points to an invalid handle. Call
+// GetLastError() for more details.
+//
+// ERROR_INVALID_HANDLE
+// The handle is NULL.
+//
+// ERROR_NO_MORE_ITEMS
+// No more radios found.
+//
+// ERROR_OUTOFMEMORY
+// Out of memory.
+//
+// other Win32 errors
+//
+
+function BluetoothFindNextDevice(hFind: HBLUETOOTH_DEVICE_FIND; var pbtdi: BLUETOOTH_DEVICE_INFO): BOOL; stdcall;
+{$EXTERNALSYM BluetoothFindNextDevice}
+
+//
+// Description:
+// Closes the enumeration handle.
+//
+// Parameters:
+// hFind
+// The handle returned from BluetoothFindFirstDevice().
+//
+// Return Values:
+// TRUE
+// Handle succesfully closed.
+//
+// FALSE
+// Failure. Check GetLastError() for details.
+//
+// ERROR_INVALID_HANDLE
+// The handle is NULL.
+//
+
+function BluetoothFindDeviceClose(hFind: HBLUETOOTH_DEVICE_FIND): BOOL; stdcall;
+{$EXTERNALSYM BluetoothFindDeviceClose}
+
+//
+// Description:
+// Retrieves information about a remote device.
+//
+// Fill in the dwSize and the Address members of the pbtdi structure
+// being passed in. On success, the rest of the members will be filled
+// out with the information that the system knows.
+//
+// Parameters:
+// hRadio
+// Handle to a local radio retrieved through BluetoothFindFirstRadio()
+// et al or SetupDiEnumerateDeviceInterfaces()
+//
+// pbtdi
+// A pointer to a BLUETOOTH_DEVICE_INFO structure to return information
+// about the first Bluetooth device found. The dwSize member of the
+// structure must be the sizeof the structure in bytes. The Address
+// member must be filled out with the Bluetooth address of the remote
+// device.
+//
+// Return Values:
+// ERROR_SUCCESS
+// Success. Information returned.
+//
+// ERROR_REVISION_MISMATCH
+// The size of the BLUETOOTH_DEVICE_INFO isn't compatible. Check
+// the dwSize member of the BLUETOOTH_DEVICE_INFO structure you
+// passed in.
+//
+// ERROR_NOT_FOUND
+// The radio is not known by the system or the Address field of
+// the BLUETOOTH_DEVICE_INFO structure is all zeros.
+//
+// ERROR_INVALID_PARAMETER
+// pbtdi is NULL.
+//
+// other error codes
+//
+
+function BluetoothGetDeviceInfo(hRadio: THandle; var pbtdi: BLUETOOTH_DEVICE_INFO): DWORD; stdcall;
+{$EXTERNALSYM BluetoothGetDeviceInfo}
+
+//
+// Description:
+// Updates the computer local cache about the device.
+//
+// Parameters:
+// pbtdi
+// A pointer to the BLUETOOTH_DEVICE_INFO structure to be updated.
+// The following members must be valid:
+// dwSize
+// Must match the size of the structure.
+// Address
+// Must be a previously found radio address.
+// szName
+// New name to be stored.
+//
+// Return Values:
+// ERROR_SUCCESS
+// The device information was updated successfully.
+//
+// ERROR_INVALID_PARAMETER
+// pbtdi is NULL.
+//
+// ERROR_REVISION_MISMATCH
+// pbtdi->dwSize is invalid.
+//
+// other Win32 error codes.
+//
+
+function BluetoothUpdateDeviceRecord(var pbtdi: BLUETOOTH_DEVICE_INFO): DWORD; stdcall;
+{$EXTERNALSYM BluetoothUpdateDeviceRecord}
+
+//
+// Description:
+// Delete the authentication (aka "bond") between the computer and the
+// device. Also purges any cached information about the device.
+//
+// Return Values:
+// ERROR_SUCCESS
+// The device was removed successfully.
+//
+// ERROR_NOT_FOUND
+// The device was not found. If no Bluetooth radio is installed,
+// the devices could not be enumerated or removed.
+//
+
+function BluetoothRemoveDevice(var pAddress: BLUETOOTH_ADDRESS): DWORD; stdcall;
+{$EXTERNALSYM BluetoothRemoveDevice}
+
+// ***************************************************************************
+//
+// Device Picker Dialog
+//
+// Description:
+// Invokes a common dialog for selecting Bluetooth devices. The list
+// of devices displayed to the user is determined by the flags and
+// settings the caller specifies in the BLUETOOTH_SELECT_DEVICE_PARAMS
+// (see structure definition for more details).
+//
+// If BluetoothSelectDevices() returns TRUE, the caller must call
+// BluetoothSelectDevicesFree() or memory will be leaked within the
+// process.
+//
+// Sample Usage:
+//
+// BLUETOOTH_SELECT_DEVICE_PARAMS btsdp = { sizeof(btsdp) };
+//
+// btsdp.hwndParent = hDlg;
+// btsdp.fShowUnknown = TRUE;
+// btsdp.fAddNewDeviceWizard = TRUE;
+//
+// BOOL b = BluetoothSelectDevices( &btsdp );
+// if ( b )
+// {
+// BLUETOOTH_DEVICE_INFO * pbtdi = btsdp.pDevices;
+// for ( ULONG cDevice = 0; cDevice < btsdp.cNumDevices; cDevice ++ )
+// {
+// if ( pbtdi->fAuthenticated || pbtdi->fRemembered )
+// {
+// //
+// // TODO: Do something usefull with the device info
+// //
+// }
+//
+// pbtdi = (BLUETOOTH_DEVICE_INFO *) ((LPBYTE)pbtdi + pbtdi->dwSize);
+// }
+//
+// BluetoothSelectDevicesFree( &btsdp );
+// }
+//
+// ***************************************************************************
+
+type
+ _BLUETOOTH_COD_PAIRS = record
+ ulCODMask: ULONG; // ClassOfDevice mask to compare
+ pcszDescription: LPWSTR; // Descriptive string of mask
+ end;
+ {$EXTERNALSYM _BLUETOOTH_COD_PAIRS}
+ BLUETOOTH_COD_PAIRS = _BLUETOOTH_COD_PAIRS;
+ {$EXTERNALSYM BLUETOOTH_COD_PAIRS}
+ TBlueToothCodPairs = BLUETOOTH_COD_PAIRS;
+ PBlueToothCodPairs = ^BLUETOOTH_COD_PAIRS;
+
+ PFN_DEVICE_CALLBACK = function(pvParam: Pointer; pDevice: PBLUETOOTH_DEVICE_INFO): BOOL; stdcall;
+ {$EXTERNALSYM PFN_DEVICE_CALLBACK}
+
+ _BLUETOOTH_SELECT_DEVICE_PARAMS = record
+ dwSize: DWORD; // IN sizeof this structure
+
+ cNumOfClasses: ULONG; // IN Number in prgClassOfDevice - if ZERO search for all devices
+ prgClassOfDevices: PBlueToothCodPairs; // IN Array of CODs to find.
+
+ pszInfo: LPWSTR; // IN If not NULL, sets the "information" text
+
+ hwndParent: HWND; // IN parent window - NULL == no parent
+
+ fForceAuthentication: BOOL; // IN If TRUE, authenication will be forced before returning
+ fShowAuthenticated: BOOL; // IN If TRUE, authenticated devices will be shown in the picker
+ fShowRemembered: BOOL; // IN If TRUE, remembered devices will be shown in the picker
+ fShowUnknown: BOOL; // IN If TRUE, unknown devices that are not authenticated or "remember" will be shown.
+
+ fAddNewDeviceWizard: BOOL; // IN If TRUE, invokes the add new device wizard.
+ fSkipServicesPage: BOOL; // IN If TRUE, skips the "Services" page in the wizard.
+
+ pfnDeviceCallback: PFN_DEVICE_CALLBACK; // IN If non-NULL, a callback that will be called for each device. If the
+ // the callback returns TRUE, the item will be added. If the callback is
+ // is FALSE, the item will not be shown.
+ pvParam: Pointer; // IN Parameter to be passed to pfnDeviceCallback as the pvParam.
+
+ cNumDevices: DWORD; // IN number calles wants - ZERO == no limit.
+ // OUT the number of devices returned.
+
+ pDevices: PBLUETOOTH_DEVICE_INFO; // OUT pointer to an array for BLUETOOTH_DEVICE_INFOs.
+ // call BluetoothSelectDevicesFree() to free
+ end;
+ {$EXTERNALSYM _BLUETOOTH_SELECT_DEVICE_PARAMS}
+ BLUETOOTH_SELECT_DEVICE_PARAMS = _BLUETOOTH_SELECT_DEVICE_PARAMS;
+ {$EXTERNALSYM BLUETOOTH_SELECT_DEVICE_PARAMS}
+ TBlueToothSelectDeviceParams = BLUETOOTH_SELECT_DEVICE_PARAMS;
+ PBlueToothSelectDeviceParams = ^BLUETOOTH_SELECT_DEVICE_PARAMS;
+
+//
+// Description:
+// (See header above)
+//
+// Return Values:
+// TRUE
+// User selected a device. pbtsdp->pDevices points to valid data.
+// Caller should check the fAuthenticated && fRemembered flags to
+// determine which devices we successfuly authenticated or valid
+// selections by the user.
+//
+// Use BluetoothSelectDevicesFree() to free the nessecary data
+// such as pDevices only if this function returns TRUE.
+//
+// FALSE
+// No valid data returned. Call GetLastError() for possible details
+// of the failure. If GLE() is:
+//
+// ERROR_CANCELLED
+// The user cancelled the request.
+//
+// ERROR_INVALID_PARAMETER
+// The pbtsdp is NULL.
+//
+// ERROR_REVISION_MISMATCH
+// The structure passed in as pbtsdp is of an unknown size.
+//
+// other WIN32 errors
+//
+
+function BluetoothSelectDevices(pbtsdp: PBlueToothSelectDeviceParams): BOOL; stdcall;
+{$EXTERNALSYM BluetoothSelectDevices}
+
+//
+// Description:
+// This function should only be called if BluetoothSelectDevices() returns
+// TRUE. This function will free any memory and resource returned by the
+// BluetoothSelectDevices() in the BLUETOOTH_SELECT_DEVICE_PARAMS
+// structure.
+//
+// Return Values:
+// TRUE
+// Success.
+//
+// FALSE
+// Nothing to free.
+//
+
+function BluetoothSelectDevicesFree(pbtsdp: PBlueToothSelectDeviceParams): BOOL; stdcall;
+{$EXTERNALSYM BluetoothSelectDevicesFree}
+
+// ***************************************************************************
+//
+// Device Property Sheet
+//
+// ***************************************************************************
+
+//
+// Description:
+// Invokes the CPLs device info property sheet.
+//
+// Parameters:
+// hwndParent
+// HWND to parent the property sheet.
+//
+// pbtdi
+// A pointer to a BLUETOOTH_DEVICE_INFO structure of the device
+// to be displayed.
+//
+// Return Values:
+// TRUE
+// The property page was successfully displayed.
+//
+// FALSE
+// Failure. The property page was not displayed. Check GetLastError
+// for more details.
+//
+
+function BluetoothDisplayDeviceProperties(hwndParent: HWND; pbtdi: PBLUETOOTH_DEVICE_INFO): BOOL; stdcall;
+{$EXTERNALSYM BluetoothDisplayDeviceProperties}
+
+// ***************************************************************************
+//
+// Radio Authentication
+//
+// ***************************************************************************
+
+//
+// Description:
+// Sends an authentication request to a remote device.
+//
+// There are two modes of operation. "Wizard mode" and "Blind mode."
+//
+// "Wizard mode" is invoked when the pszPasskey is NULL. This will cause
+// the "Bluetooth Connection Wizard" to be invoked. The user will be
+// prompted to enter a passkey during the wizard after which the
+// authentication request will be sent. The user will see the success
+// or failure of the authentication attempt. The user will also be
+// given the oppurtunity to try to fix a failed authentication.
+//
+// "Blind mode" is invoked when the pszPasskey is non-NULL. This will
+// cause the computer to send a authentication request to the remote
+// device. No UI is ever displayed. The Bluetooth status code will be
+// mapped to a Win32 Error code.
+//
+// Parameters:
+//
+// hwndParent
+// The window to parent the authentication wizard. If NULL, the
+// wizard will be parented off the desktop.
+//
+// hRadio
+// A valid local radio handle or NULL. If NULL, then all radios will
+// be tired. If any of the radios succeed, then the call will
+// succeed.
+//
+// pbtdi
+// BLUETOOTH_DEVICE_INFO record of the device to be authenticated.
+//
+// pszPasskey
+// PIN to be used to authenticate the device. If NULL, then UI is
+// displayed and the user steps through the authentication process.
+// If not NULL, no UI is shown. The passkey is NOT NULL terminated.
+//
+// ulPasskeyLength
+// Length of szPassKey in bytes. The length must be less than or
+// equal to BLUETOOTH_MAX_PASSKEY_SIZE * sizeof(WCHAR).
+//
+// Return Values:
+//
+// ERROR_SUCCESS
+// Success.
+//
+// ERROR_CANCELLED
+// User aborted the operation.
+//
+// ERROR_INVALID_PARAMETER
+// The device structure in pbtdi is invalid.
+//
+// ERROR_NO_MORE_ITEMS
+// The device in pbtdi is already been marked as authenticated.
+//
+// other WIN32 error
+// Failure. Return value is the error code.
+//
+// For "Blind mode," here is the current mapping of Bluetooth status
+// code to Win32 error codes:
+//
+// { BTH_ERROR_SUCCESS, ERROR_SUCCESS },
+// { BTH_ERROR_NO_CONNECTION, ERROR_DEVICE_NOT_CONNECTED },
+// { BTH_ERROR_PAGE_TIMEOUT, WAIT_TIMEOUT },
+// { BTH_ERROR_HARDWARE_FAILURE, ERROR_GEN_FAILURE },
+// { BTH_ERROR_AUTHENTICATION_FAILURE, ERROR_NOT_AUTHENTICATED },
+// { BTH_ERROR_MEMORY_FULL, ERROR_NOT_ENOUGH_MEMORY },
+// { BTH_ERROR_CONNECTION_TIMEOUT, WAIT_TIMEOUT },
+// { BTH_ERROR_LMP_RESPONSE_TIMEOUT, WAIT_TIMEOUT },
+// { BTH_ERROR_MAX_NUMBER_OF_CONNECTIONS, ERROR_REQ_NOT_ACCEP },
+// { BTH_ERROR_PAIRING_NOT_ALLOWED, ERROR_ACCESS_DENIED },
+// { BTH_ERROR_UNSPECIFIED_ERROR, ERROR_NOT_READY },
+// { BTH_ERROR_LOCAL_HOST_TERMINATED_CONNECTION, ERROR_VC_DISCONNECTED },
+//
+
+function BluetoothAuthenticateDevice(
+ hwndParent: HWND;
+ hRadio: THandle;
+ pbtbi: PBLUETOOTH_DEVICE_INFO;
+ pszPasskey: PWideChar;
+ ulPasskeyLength: ULONG): DWORD; stdcall;
+{$EXTERNALSYM BluetoothAuthenticateDevice}
+
+//
+// Description:
+// Allows the caller to prompt for multiple devices to be authenticated
+// within a single instance of the "Bluetooth Connection Wizard."
+//
+// Parameters:
+//
+// hwndParent
+// The window to parent the authentication wizard. If NULL, the
+// wizard will be parented off the desktop.
+//
+// hRadio
+// A valid local radio handle or NULL. If NULL, then all radios will
+// be tired. If any of the radios succeed, then the call will
+// succeed.
+//
+// cDevices
+// Number of devices in the rgbtdi array.
+//
+// rgbtdi
+// An array BLUETOOTH_DEVICE_INFO records of the devices to be
+// authenticated.
+//
+// Return Values:
+//
+// ERROR_SUCCESS
+// Success. Check the fAuthenticate flag on each of the devices.
+//
+// ERROR_CANCELLED
+// User aborted the operation. Check the fAuthenticate flags on
+// each device to determine if any of the devices were authenticated
+// before the user cancelled the operation.
+//
+// ERROR_INVALID_PARAMETER
+// One of the items in the array of devices is invalid.
+//
+// ERROR_NO_MORE_ITEMS
+// All the devices in the array of devices are already been marked as
+// being authenticated.
+//
+// other WIN32 error
+// Failure. Return value is the error code.
+//
+
+function BluetoothAuthenticateMultipleDevices(
+ hwndParent: HWND;
+ hRadio: THandle;
+ cDevices: DWORD;
+ pbtdi: PBLUETOOTH_DEVICE_INFO): DWORD; stdcall;
+{$EXTERNALSYM BluetoothAuthenticateMultipleDevices}
+
+// ***************************************************************************
+//
+// Bluetooth Services
+//
+// ***************************************************************************
+
+const
+ BLUETOOTH_SERVICE_DISABLE = $00;
+ {$EXTERNALSYM BLUETOOTH_SERVICE_DISABLE}
+ BLUETOOTH_SERVICE_ENABLE = $01;
+ {$EXTERNALSYM BLUETOOTH_SERVICE_ENABLE}
+ BLUETOOTH_SERVICE_MASK = BLUETOOTH_SERVICE_ENABLE or BLUETOOTH_SERVICE_DISABLE;
+ {$EXTERNALSYM BLUETOOTH_SERVICE_MASK}
+
+//
+// Description:
+// Enables/disables the services for a particular device.
+//
+// The system maintains a mapping of service guids to supported drivers for
+// Bluetooth-enabled devices. Enabling a service installs the corresponding
+// device driver. Disabling a service removes the corresponding device driver.
+//
+// If a non-supported service is enabled, a driver will not be installed.
+//
+// Parameters
+// hRadio
+// Handle of the local Bluetooth radio device.
+//
+// pbtdi
+// Pointer to a BLUETOOTH_DEVICE_INFO record.
+//
+// pGuidService
+// The service GUID on the remote device.
+//
+// dwServiceFlags
+// Flags to adjust the service.
+// BLUETOOTH_SERVICE_DISABLE - disable the service
+// BLUETOOTH_SERVICE_ENABLE - enables the service
+//
+// Return Values:
+// ERROR_SUCCESS
+// The call was successful.
+//
+// ERROR_INVALID_PARAMETER
+// dwServiceFlags are invalid.
+//
+// ERROR_SERVICE_DOES_NOT_EXIST
+// The GUID in pGuidService is not supported.
+//
+// other WIN32 error
+// The call failed.
+//
+
+function BluetoothSetServiceState(
+ hRadio: THandle;
+ pbtdi: PBLUETOOTH_DEVICE_INFO;
+ const pGuidService: TGUID;
+ dwServiceFlags: DWORD): DWORD; stdcall;
+{$EXTERNALSYM BluetoothSetServiceState}
+
+//
+// Description:
+// Enumerates the services guids enabled on a particular device. If hRadio
+// is NULL, all device will be searched for the device and all the services
+// enabled will be returned.
+//
+// Parameters:
+// hRadio
+// Handle of the local Bluetooth radio device. If NULL, it will search
+// all the radios for the address in the pbtdi.
+//
+// pbtdi
+// Pointer to a BLUETOOTH_DEVICE_INFO record.
+//
+// pcService
+// On input, the number of records pointed to by pGuidServices.
+// On output, the number of valid records return in pGuidServices.
+//
+// pGuidServices
+// Pointer to memory that is at least *pcService in length.
+//
+// Return Values:
+// ERROR_SUCCESS
+// The call succeeded. pGuidServices is valid.
+//
+// ERROR_MORE_DATA
+// The call succeeded. pGuidService contains an incomplete list of
+// enabled service GUIDs.
+//
+// other WIN32 errors
+// The call failed.
+//
+
+function BluetoothEnumerateInstalledServices(
+ hRadio: THandle;
+ pbtdi: PBLUETOOTH_DEVICE_INFO;
+ var pcServices: DWORD;
+ pGuidServices: PGUID): DWORD; stdcall;
+{$EXTERNALSYM BluetoothEnumerateInstalledServices}
+
+//
+// Description:
+// Change the discovery state of the local radio(s).
+// If hRadio is NULL, all the radios will be set.
+//
+// Use BluetoothIsDiscoverable() to determine the radios current state.
+//
+// The system ensures that a discoverable system is connectable, thus
+// the radio must allow incoming connections (see
+// BluetoothEnableIncomingConnections) prior to making a radio
+// discoverable. Failure to do so will result in this call failing
+// (returns FALSE).
+//
+// Parameters:
+// hRadio
+// If not NULL, changes the state of a specific radio.
+// If NULL, the API will interate through all the radios.
+//
+// fEnabled
+// If FALSE, discovery will be disabled.
+//
+// Return Values
+// TRUE
+// State was successfully changed. If the caller specified NULL for
+// hRadio, at least of the radios accepted the state change.
+//
+// FALSE
+// State was not changed. If the caller specified NULL for hRadio, all
+// of the radios did not accept the state change.
+//
+
+function BluetoothEnableDiscovery(hRadio: THandle; fEnabled: BOOL): BOOL; stdcall;
+{$EXTERNALSYM BluetoothEnableDiscovery}
+
+//
+// Description:
+// Determines if the Bluetooth radios are discoverable. If there are
+// multiple radios, the first one to say it is discoverable will cause
+// this function to return TRUE.
+//
+// Parameters:
+// hRadio
+// Handle of the radio to check. If NULL, it will check all local
+// radios.
+//
+// Return Values:
+// TRUE
+// A least one radio is discoverable.
+//
+// FALSE
+// No radios are discoverable.
+//
+
+function BluetoothIsDiscoverable(hRadio: THandle): BOOL; stdcall;
+{$EXTERNALSYM BluetoothIsDiscoverable}
+
+//
+// Description:
+// Enables/disables the state of a radio to accept incoming connections.
+// If hRadio is NULL, all the radios will be set.
+//
+// Use BluetoothIsConnectable() to determine the radios current state.
+//
+// The system enforces that a radio that is not connectable is not
+// discoverable too. The radio must be made non-discoverable (see
+// BluetoothEnableDiscovery) prior to making a radio non-connectionable.
+// Failure to do so will result in this call failing (returns FALSE).
+//
+// Parameters:
+// hRadio
+// If not NULL, changes the state of a specific radio.
+// If NULL, the API will interate through all the radios.
+//
+// fEnabled
+// If FALSE, incoming connection will be disabled.
+//
+// Return Values
+// TRUE
+// State was successfully changed. If the caller specified NULL for
+// hRadio, at least of the radios accepted the state change.
+//
+// FALSE
+// State was not changed. If the caller specified NULL for hRadio, all
+// of the radios did not accept the state change.
+//
+
+function BluetoothEnableIncomingConnections(hRadio: THandle; fEnabled: BOOL): BOOL; stdcall;
+{$EXTERNALSYM BluetoothEnableIncomingConnections}
+
+//
+// Description:
+// Determines if the Bluetooth radios are connectable. If there are
+// multiple radios, the first one to say it is connectable will cause
+// this function to return TRUE.
+//
+// Parameters:
+// hRadio
+// Handle of the radio to check. If NULL, it will check all local
+// radios.
+//
+// Return Values:
+// TRUE
+// A least one radio is allowing incoming connections.
+//
+// FALSE
+// No radios are allowing incoming connections.
+//
+
+function BluetoothIsConnectable(hRadio: THandle): BOOL; stdcall;
+{$EXTERNALSYM BluetoothIsConnectable}
+
+// ***************************************************************************
+//
+// Authentication Registration
+//
+// ***************************************************************************
+
+type
+ HBLUETOOTH_AUTHENTICATION_REGISTRATION = THandle;
+ {$EXTERNALSYM HBLUETOOTH_AUTHENTICATION_REGISTRATION}
+
+ PFN_AUTHENTICATION_CALLBACK = function(pvParam: Pointer; pDevice: PBLUETOOTH_DEVICE_INFO): BOOL; stdcall;
+ {$EXTERNALSYM PFN_AUTHENTICATION_CALLBACK}
+
+//
+// Description:
+// Registers a callback function to be called when a particular device
+// requests authentication. The request is sent to the last application
+// that requested authentication for a particular device.
+//
+// Parameters:
+// pbtdi
+// A pointer to a BLUETOOTH_DEVICE_INFO structure. The Bluetooth
+// address will be used for comparision.
+//
+// phRegHandle
+// A pointer to where the registration HANDLE value will be
+// stored. Call BluetoothUnregisterAuthentication() to close
+// the handle.
+//
+// pfnCallback
+// The function that will be called when the authentication event
+// occurs. This function should match PFN_AUTHENTICATION_CALLBACK's
+// prototype.
+//
+// pvParam
+// Optional parameter to be past through to the callback function.
+// This can be anything the application was to define.
+//
+// Return Values:
+// ERROR_SUCCESS
+// Success. A valid registration handle was returned.
+//
+// ERROR_OUTOFMEMORY
+// Out of memory.
+//
+// other Win32 error.
+// Failure. The registration handle is invalid.
+//
+
+function BluetoothRegisterForAuthentication(
+ pbtdi: PBLUETOOTH_DEVICE_INFO;
+ var phRegHandle: HBLUETOOTH_AUTHENTICATION_REGISTRATION;
+ pfnCallback: PFN_AUTHENTICATION_CALLBACK;
+ pvParam: Pointer): DWORD; stdcall;
+{$EXTERNALSYM BluetoothRegisterForAuthentication}
+
+//
+// Description:
+// Unregisters an authentication callback and closes the handle. See
+// BluetoothRegisterForAuthentication() for more information about
+// authentication registration.
+//
+// Parameters:
+// hRegHandle
+// Handle returned by BluetoothRegisterForAuthentication().
+//
+// Return Value:
+// TRUE
+// The handle was successfully closed.
+//
+// FALSE
+// The handle was not successfully closed. Check GetLastError for
+// more details.
+//
+// ERROR_INVALID_HANDLE
+// The handle is NULL.
+//
+// other Win32 errors.
+//
+
+function BluetoothUnregisterAuthentication(hRegHandle: HBLUETOOTH_AUTHENTICATION_REGISTRATION): BOOL; stdcall;
+{$EXTERNALSYM BluetoothUnregisterAuthentication}
+
+//
+// Description:
+// This function should be called after receiving an authentication request
+// to send the passkey response.
+//
+// Parameters:
+//
+// hRadio
+// Optional handle to the local radio. If NULL, the function will try
+// each radio until one succeeds.
+//
+// pbtdi
+// A pointer to a BLUETOOTH_DEVICE_INFO structure describing the device
+// being authenticated. This can be the same structure passed to the
+// callback function.
+//
+// pszPasskey
+// A pointer to UNICODE zero-terminated string of the passkey response
+// that should be sent back to the authenticating device.
+//
+// Return Values:
+// ERROR_SUCESS
+// The device accepted the passkey response. The device is authenticated.
+//
+// ERROR_CANCELED
+// The device denied the passkey reponse. This also will returned if there
+// is a communications problem with the local radio.
+//
+// E_FAIL
+// The device returned a failure code during authentication.
+//
+// other Win32 error codes
+//
+
+function BluetoothSendAuthenticationResponse(
+ hRadio: THandle;
+ pbtdi: PBLUETOOTH_DEVICE_INFO;
+ pszPasskey: LPWSTR): DWORD; stdcall;
+{$EXTERNALSYM BluetoothSendAuthenticationResponse}
+
+// ***************************************************************************
+//
+// SDP Parsing Functions
+//
+// ***************************************************************************
+
+type
+ TSpdElementDataString = record
+ // raw string buffer, may not be encoded as ANSI, use
+ // BluetoothSdpGetString to convert the value if it is described
+ // by the base language attribute ID list
+ value: PBYTE;
+ // raw length of the string, may not be NULL terminuated
+ length: ULONG;
+ end;
+
+ TSpdElementDataUrl = record
+ value: PBYTE;
+ length: ULONG;
+ end;
+
+ // type == SDP_TYPE_SEQUENCE
+ TSpdElementDataSequence = record
+ // raw sequence, starts at sequence element header
+ value: PBYTE;
+ // raw sequence length
+ length: ULONG;
+ end;
+
+ // type == SDP_TYPE_ALTERNATIVE
+ TSpdElementDataAlternative = record
+ // raw alternative, starts at alternative element header
+ value: PBYTE;
+ // raw alternative length
+ length: ULONG;
+ end;
+
+ _SDP_ELEMENT_DATA = record
+ //
+ // Enumeration of SDP element types. Generic element types will have a
+ // specificType value other then SDP_ST_NONE. The generic types are:
+ // o SDP_TYPE_UINT
+ // o SDP_TYPE_INT
+ // o SDP_TYPE_UUID
+ //
+ type_: SDP_TYPE;
+
+ //
+ // Specific types for the generic SDP element types.
+ //
+ specificType: SDP_SPECIFICTYPE;
+
+ //
+ // Union of all possible data types. type and specificType will indicate
+ // which field is valid. For types which do not have a valid specificType,
+ // specific type will be SDP_ST_NONE.
+ //
+ case Integer of
+ // type == SDP_TYPE_INT
+ 0: (int128: SDP_LARGE_INTEGER_16); // specificType == SDP_ST_INT128
+ 1: (int64: LONGLONG); // specificType == SDP_ST_INT64
+ 2: (int32: Integer); // specificType == SDP_ST_INT32
+ 3: (int16: SHORT); // specificType == SDP_ST_INT16
+ 4: (int8: CHAR); // specificType == SDP_ST_INT8
+
+ // type == SDP_TYPE_UINT
+ 5: (uint128: SDP_ULARGE_INTEGER_16); // specificType == SDP_ST_UINT128
+ 6: (uint64: Int64); // specificType == SDP_ST_UINT64
+ 7: (uint32: ULONG); // specificType == SDP_ST_UINT32
+ 8: (uint16: Word); // specificType == SDP_ST_UINT16
+ 9: (uint8: UCHAR); // specificType == SDP_ST_UINT8
+
+ // type == SDP_TYPE_BOOLEAN
+ 10: (booleanVal: UCHAR);
+
+ // type == SDP_TYPE_UUID
+ 11: (uuid128: TGUID); // specificType == SDP_ST_UUID128
+ 12: (uuid32: ULONG); // specificType == SDP_ST_UUID32
+ 13: (uuid16: Word); // specificType == SDP_ST_UUID32
+
+ // type == SDP_TYPE_STRING
+ 14: (string_: TSpdElementDataString);
+ // type == SDP_TYPE_URL
+ 15: (url: TSpdElementDataUrl);
+
+ // type == SDP_TYPE_SEQUENCE
+ 16: (sequence: TSpdElementDataSequence);
+
+ // type == SDP_TYPE_ALTERNATIVE
+ 17: (alternative: TSpdElementDataAlternative);
+ end;
+ {$EXTERNALSYM _SDP_ELEMENT_DATA}
+ SDP_ELEMENT_DATA = _SDP_ELEMENT_DATA;
+ {$EXTERNALSYM SDP_ELEMENT_DATA}
+ PSDP_ELEMENT_DATA = ^SDP_ELEMENT_DATA;
+ {$EXTERNALSYM PSDP_ELEMENT_DATA}
+ TSdpElementData = SDP_ELEMENT_DATA;
+ PSdpElementData = PSDP_ELEMENT_DATA;
+
+//
+// Description:
+// Retrieves and parses the element found at pSdpStream
+//
+// Parameters:
+// IN pSdpStream
+// pointer to valid SDP stream
+//
+// IN cbSdpStreamLength
+// length of pSdpStream in bytes
+//
+// OUT pData
+// pointer to be filled in with the data of the SDP element at the
+// beginning of pSdpStream
+//
+// Return Values:
+// ERROR_INVALID_PARAMETER
+// one of required parameters is NULL or the pSdpStream is invalid
+//
+// ERROR_SUCCESS
+// the sdp element was parsed correctly
+//
+
+function BluetoothSdpGetElementData(
+ pSdpStream: PBYTE;
+ cbSdpStreamLength: ULONG;
+ pData: PSDP_ELEMENT_DATA): DWORD; stdcall;
+{$EXTERNALSYM BluetoothSdpGetElementData}
+
+type
+ HBLUETOOTH_CONTAINER_ELEMENT = THandle;
+ {$EXTERNALSYM HBLUETOOTH_CONTAINER_ELEMENT}
+
+//
+// Description:
+// Iterates over a container stream, returning each elemetn contained with
+// in the container element at the beginning of pContainerStream
+//
+// Parameters:
+// IN pContainerStream
+// pointer to valid SDP stream whose first element is either a sequence
+// or alternative
+//
+// IN cbContainerlength
+// length in bytes of pContainerStream
+//
+// IN OUT pElement
+// Value used to keep track of location within the stream. The first
+// time this function is called for a particular container, *pElement
+// should equal NULL. Upon subsequent calls, the value should be
+// unmodified.
+//
+// OUT pData
+// pointer to be filled in with the data of the SDP element at the
+// current element of pContainerStream
+//
+// Return Values:
+// ERROR_SUCCESS
+// The call succeeded, pData contains the data
+//
+// ERROR_NO_MORE_ITEMS
+// There are no more items in the list, the caller should cease calling
+// BluetoothSdpGetContainerElementData for this container.
+//
+// ERROR_INVALID_PARAMETER
+// A required pointer is NULL or the container is not a valid SDP
+// stream
+//
+// Usage example:
+//
+// HBLUETOOTH_CONTAINER_ELEMENT element;
+// SDP_ELEMENT_DATA data;
+// ULONG result;
+//
+// element = NULL;
+//
+// while (TRUE) {
+// result = BluetoothSdpGetContainerElementData(
+// pContainer, ulContainerLength, &element, &data);
+//
+// if (result == ERROR_NO_MORE_ITEMS) {
+// // We are done
+// break;
+// }
+// else if (result != ERROR_SUCCESS) {
+// // error
+// }
+//
+// // do something with data ...
+// }
+//
+//
+
+function BluetoothSdpGetContainerElementData(
+ pContainerStream: PBYTE;
+ cbContainerLength: ULONG;
+ var pElement: HBLUETOOTH_CONTAINER_ELEMENT;
+ pData: PSDP_ELEMENT_DATA): DWORD; stdcall;
+{$EXTERNALSYM BluetoothSdpGetContainerElementData}
+
+//
+// Description:
+// Retrieves the attribute value for the given attribute ID. pRecordStream
+// must be an SDP stream that is formatted as an SDP record, a SEQUENCE
+// containing UINT16 + element pairs.
+//
+// Parameters:
+// IN pRecordStream
+// pointer to a valid SDP stream which is formatted as a singl SDP
+// record
+//
+// IN cbRecordlnegh
+// length of pRecordStream in bytes
+//
+// IN usAttributeId
+// the attribute ID to search for. see bthdef.h for SDP_ATTRIB_Xxx
+// values.
+//
+// OUT pAttributeData
+// pointer that will contain the attribute ID's value
+//
+// Return Values:
+// ERRROR_SUCCESS
+// Call succeeded, pAttributeData contains the attribute value
+//
+// ERROR_INVALID_PARAMETER
+// One of the required pointers was NULL, pRecordStream was not a valid
+// SDP stream, or pRecordStream was not a properly formatted SDP record
+//
+// ERROR_FILE_NOT_FOUND
+// usAttributeId was not found in the record
+//
+// Usage:
+//
+// ULONG result;
+// SDP_DATA_ELEMENT data;
+//
+// result = BluetoothSdpGetAttributeValue(
+// pRecordStream, cbRecordLength, SDP_ATTRIB_RECORD_HANDLE, &data);
+// if (result == ERROR_SUCCESS) {
+// printf("record handle is 0x%x\n", data.data.uint32);
+// }
+//
+
+function BluetoothSdpGetAttributeValue(
+ pRecordStream: PBYTE;
+ cbRecordLength: ULONG;
+ usAttributeId: Word;
+ pAttributeData: PSDP_ELEMENT_DATA): DWORD; stdcall;
+{$EXTERNALSYM BluetoothSdpGetAttributeValue}
+
+//
+// These three fields correspond one to one with the triplets defined in the
+// SDP specification for the language base attribute ID list.
+//
+
+type
+ _SDP_STRING_TYPE_DATA = record
+ //
+ // How the string is encoded according to ISO 639:1988 (E/F): "Code
+ // for the representation of names of languages".
+ //
+ encoding: Word;
+
+ //
+ // MIBE number from IANA database
+ //
+ mibeNum: Word;
+
+ //
+ // The base attribute where the string is to be found in the record
+ //
+ attributeId: Word;
+ end;
+ {$EXTERNALSYM _SDP_STRING_TYPE_DATA}
+ SDP_STRING_TYPE_DATA = _SDP_STRING_TYPE_DATA;
+ {$EXTERNALSYM SDP_STRING_TYPE_DATA}
+ PSDP_STRING_TYPE_DATA = ^SDP_STRING_TYPE_DATA;
+ {$EXTERNALSYM PSDP_STRING_TYPE_DATA}
+ TSdpStringTypeData = SDP_STRING_TYPE_DATA;
+ PSdpStringTypeData = PSDP_STRING_TYPE_DATA;
+
+//
+// Description:
+// Converts a raw string embedded in the SDP record into a UNICODE string
+//
+// Parameters:
+// IN pRecordStream
+// a valid SDP stream which is formatted as an SDP record
+//
+// IN cbRecordLength
+// length of pRecordStream in bytes
+//
+// IN pStringData
+// if NULL, then the calling thread's locale will be used to search
+// for a matching string in the SDP record. If not NUL, the mibeNum
+// and attributeId will be used to find the string to convert.
+//
+// IN usStringOffset
+// the SDP string type offset to convert. usStringOffset is added to
+// the base attribute id of the string. SDP specification defined
+// offsets are: STRING_NAME_OFFSET, STRING_DESCRIPTION_OFFSET, and
+// STRING_PROVIDER_NAME_OFFSET (found in bthdef.h).
+//
+// OUT pszString
+// if NULL, pcchStringLength will be filled in with the required number
+// of characters (not bytes) to retrieve the converted string.
+//
+// IN OUT pcchStringLength
+// Upon input, if pszString is not NULL, will contain the length of
+// pszString in characters. Upon output, it will contain either the
+// number of required characters including NULL if an error is returned
+// or the number of characters written to pszString (including NULL).
+//
+// Return Values:
+// ERROR_SUCCES
+// Call was successful and pszString contains the converted string
+//
+// ERROR_MORE_DATA
+// pszString was NULL or too small to contain the converted string,
+// pccxhStringLength contains the required length in characters
+//
+// ERROR_INVALID_DATA
+// Could not perform the conversion
+//
+// ERROR_NO_SYSTEM_RESOURCES
+// Could not allocate memory internally to perform the conversion
+//
+// ERROR_INVALID_PARAMETER
+// One of the rquired pointers was NULL, pRecordStream was not a valid
+// SDP stream, pRecordStream was not a properly formatted record, or
+// the desired attribute + offset was not a string.
+//
+// Other HRESULTs returned by COM
+//
+
+function BluetoothSdpGetString(
+ pRecordStream: PBYTE;
+ cbRecordLength: ULONG;
+ pStringData: PSDP_STRING_TYPE_DATA;
+ usStringOffset: Word;
+ pszString: PWideChar;
+ pcchStringLength: PULONG): DWORD; stdcall;
+{$EXTERNALSYM BluetoothSdpGetString}
+
+// ***************************************************************************
+//
+// Raw Attribute Enumeration
+//
+// ***************************************************************************
+
+type
+ PFN_BLUETOOTH_ENUM_ATTRIBUTES_CALLBACK = function(
+ uAttribId: ULONG;
+ pValueStream: PBYTE;
+ cbStreamSize: ULONG;
+ pvParam: Pointer): BOOL; stdcall;
+ {$EXTERNALSYM PFN_BLUETOOTH_ENUM_ATTRIBUTES_CALLBACK}
+
+//
+// Description:
+// Enumerates through the SDP record stream calling the Callback function
+// for each attribute in the record. If the Callback function returns
+// FALSE, the enumeration is stopped.
+//
+// Return Values:
+// TRUE
+// Success! Something was enumerated.
+//
+// FALSE
+// Failure. GetLastError() could be one of the following:
+//
+// ERROR_INVALID_PARAMETER
+// pSDPStream or pfnCallback is NULL.
+//
+// ERROR_INVALID_DATA
+// The SDP stream is corrupt.
+//
+// other Win32 errors.
+//
+
+function BluetoothSdpEnumAttributes(
+ pSDPStream: PBYTE;
+ cbStreamSize: ULONG;
+ pfnCallback: PFN_BLUETOOTH_ENUM_ATTRIBUTES_CALLBACK;
+ pvParam: Pointer): BOOL; stdcall;
+{$EXTERNALSYM BluetoothSdpEnumAttributes}
+
+// (rom) MACRO
+function BluetoothEnumAttributes(
+ pSDPStream: PBYTE;
+ cbStreamSize: ULONG;
+ pfnCallback: PFN_BLUETOOTH_ENUM_ATTRIBUTES_CALLBACK;
+ pvParam: Pointer): BOOL;
+{$EXTERNALSYM BluetoothEnumAttributes}
+
+implementation
+
+const
+ btapi = 'irprops.cpl';
+
+// (rom) MACRO implementation
+function BluetoothEnumAttributes(pSDPStream: PBYTE; cbStreamSize: ULONG;
+ pfnCallback: PFN_BLUETOOTH_ENUM_ATTRIBUTES_CALLBACK; pvParam: Pointer): BOOL;
+begin
+ Result := BluetoothSdpEnumAttributes(pSDPStream, cbStreamSize, pfnCallback, pvParam);
+end;
+
+{$IFDEF DYNAMIC_LINK}
+
+var
+ _BluetoothFindFirstRadio: Pointer;
+
+function BluetoothFindFirstRadio;
+begin
+ GetProcedureAddress(_BluetoothFindFirstRadio, btapi, 'BluetoothFindFirstRadio');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_BluetoothFindFirstRadio]
+ end;
+end;
+
+var
+ _BluetoothFindNextRadio: Pointer;
+
+function BluetoothFindNextRadio;
+begin
+ GetProcedureAddress(_BluetoothFindNextRadio, btapi, 'BluetoothFindNextRadio');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_BluetoothFindNextRadio]
+ end;
+end;
+
+var
+ _BluetoothFindRadioClose: Pointer;
+
+function BluetoothFindRadioClose;
+begin
+ GetProcedureAddress(_BluetoothFindRadioClose, btapi, 'BluetoothFindRadioClose');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_BluetoothFindRadioClose]
+ end;
+end;
+
+var
+ _BluetoothGetRadioInfo: Pointer;
+
+function BluetoothGetRadioInfo;
+begin
+ GetProcedureAddress(_BluetoothGetRadioInfo, btapi, 'BluetoothGetRadioInfo');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_BluetoothGetRadioInfo]
+ end;
+end;
+
+var
+ _BluetoothFindFirstDevice: Pointer;
+
+function BluetoothFindFirstDevice;
+begin
+ GetProcedureAddress(_BluetoothFindFirstDevice, btapi, 'BluetoothFindFirstDevice');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_BluetoothFindFirstDevice]
+ end;
+end;
+
+var
+ _BluetoothFindNextDevice: Pointer;
+
+function BluetoothFindNextDevice;
+begin
+ GetProcedureAddress(_BluetoothFindNextDevice, btapi, 'BluetoothFindNextDevice');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_BluetoothFindNextDevice]
+ end;
+end;
+
+var
+ _BluetoothFindDeviceClose: Pointer;
+
+function BluetoothFindDeviceClose;
+begin
+ GetProcedureAddress(_BluetoothFindDeviceClose, btapi, 'BluetoothFindDeviceClose');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_BluetoothFindDeviceClose]
+ end;
+end;
+
+var
+ _BluetoothGetDeviceInfo: Pointer;
+
+function BluetoothGetDeviceInfo;
+begin
+ GetProcedureAddress(_BluetoothGetDeviceInfo, btapi, 'BluetoothGetDeviceInfo');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_BluetoothGetDeviceInfo]
+ end;
+end;
+
+var
+ _BluetoothUpdateDeviceRecord: Pointer;
+
+function BluetoothUpdateDeviceRecord;
+begin
+ GetProcedureAddress(_BluetoothUpdateDeviceRecord, btapi, 'BluetoothUpdateDeviceRecord');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_BluetoothUpdateDeviceRecord]
+ end;
+end;
+
+var
+ _BluetoothRemoveDevice: Pointer;
+
+function BluetoothRemoveDevice;
+begin
+ GetProcedureAddress(_BluetoothRemoveDevice, btapi, 'BluetoothRemoveDevice');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_BluetoothRemoveDevice]
+ end;
+end;
+
+var
+ _BluetoothSelectDevices: Pointer;
+
+function BluetoothSelectDevices;
+begin
+ GetProcedureAddress(_BluetoothSelectDevices, btapi, 'BluetoothSelectDevices');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_BluetoothSelectDevices]
+ end;
+end;
+
+var
+ _BluetoothSelectDevicesFree: Pointer;
+
+function BluetoothSelectDevicesFree;
+begin
+ GetProcedureAddress(_BluetoothSelectDevicesFree, btapi, 'BluetoothSelectDevicesFree');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_BluetoothSelectDevicesFree]
+ end;
+end;
+
+var
+ _BluetoothDisplayDeviceProperties: Pointer;
+
+function BluetoothDisplayDeviceProperties;
+begin
+ GetProcedureAddress(_BluetoothDisplayDeviceProperties, btapi, 'BluetoothDisplayDeviceProperties');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_BluetoothDisplayDeviceProperties]
+ end;
+end;
+
+var
+ _BluetoothAuthenticateDevice: Pointer;
+
+function BluetoothAuthenticateDevice;
+begin
+ GetProcedureAddress(_BluetoothAuthenticateDevice, btapi, 'BluetoothAuthenticateDevice');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_BluetoothAuthenticateDevice]
+ end;
+end;
+
+var
+ _BluetoothAuthenticateMultipleDevices: Pointer;
+
+function BluetoothAuthenticateMultipleDevices;
+begin
+ GetProcedureAddress(_BluetoothAuthenticateMultipleDevices, btapi, 'BluetoothAuthenticateMultipleDevices');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_BluetoothAuthenticateMultipleDevices]
+ end;
+end;
+
+var
+ _BluetoothSetServiceState: Pointer;
+
+function BluetoothSetServiceState;
+begin
+ GetProcedureAddress(_BluetoothSetServiceState, btapi, 'BluetoothSetServiceState');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_BluetoothSetServiceState]
+ end;
+end;
+
+var
+ _BluetoothEnumerateInstalledServices: Pointer;
+
+function BluetoothEnumerateInstalledServices;
+begin
+ GetProcedureAddress(_BluetoothEnumerateInstalledServices, btapi, 'BluetoothEnumerateInstalledServices');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_BluetoothEnumerateInstalledServices]
+ end;
+end;
+
+var
+ _BluetoothEnableDiscovery: Pointer;
+
+function BluetoothEnableDiscovery;
+begin
+ GetProcedureAddress(_BluetoothEnableDiscovery, btapi, 'BluetoothEnableDiscovery');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_BluetoothEnableDiscovery]
+ end;
+end;
+
+var
+ _BluetoothIsDiscoverable: Pointer;
+
+function BluetoothIsDiscoverable;
+begin
+ GetProcedureAddress(_BluetoothIsDiscoverable, btapi, 'BluetoothIsDiscoverable');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_BluetoothIsDiscoverable]
+ end;
+end;
+
+var
+ _BluetoothEnableIncomingConnections: Pointer;
+
+function BluetoothEnableIncomingConnections;
+begin
+ GetProcedureAddress(_BluetoothEnableIncomingConnections, btapi, 'BluetoothEnableIncomingConnections');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_BluetoothEnableIncomingConnections]
+ end;
+end;
+
+var
+ _BluetoothIsConnectable: Pointer;
+
+function BluetoothIsConnectable;
+begin
+ GetProcedureAddress(_BluetoothIsConnectable, btapi, 'BluetoothIsConnectable');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_BluetoothIsConnectable]
+ end;
+end;
+
+var
+ _BluetoothRegisterForAuthentication: Pointer;
+
+function BluetoothRegisterForAuthentication;
+begin
+ GetProcedureAddress(_BluetoothRegisterForAuthentication, btapi, 'BluetoothRegisterForAuthentication');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_BluetoothRegisterForAuthentication]
+ end;
+end;
+
+var
+ _BluetoothUnregisterAuthentication: Pointer;
+
+function BluetoothUnregisterAuthentication;
+begin
+ GetProcedureAddress(_BluetoothUnregisterAuthentication, btapi, 'BluetoothUnregisterAuthentication');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_BluetoothUnregisterAuthentication]
+ end;
+end;
+
+var
+ _BluetoothSendAuthenticationResponse: Pointer;
+
+function BluetoothSendAuthenticationResponse;
+begin
+ GetProcedureAddress(_BluetoothSendAuthenticationResponse, btapi, 'BluetoothSendAuthenticationResponse');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_BluetoothSendAuthenticationResponse]
+ end;
+end;
+
+var
+ _BluetoothSdpGetElementData: Pointer;
+
+function BluetoothSdpGetElementData;
+begin
+ GetProcedureAddress(_BluetoothSdpGetElementData, btapi, 'BluetoothSdpGetElementData');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_BluetoothSdpGetElementData]
+ end;
+end;
+
+var
+ _BluetoothSdpGetContainerElementData: Pointer;
+
+function BluetoothSdpGetContainerElementData;
+begin
+ GetProcedureAddress(_BluetoothSdpGetContainerElementData, btapi, 'BluetoothSdpGetContainerElementData');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_BluetoothSdpGetContainerElementData]
+ end;
+end;
+
+var
+ _BluetoothSdpGetAttributeValue: Pointer;
+
+function BluetoothSdpGetAttributeValue;
+begin
+ GetProcedureAddress(_BluetoothSdpGetAttributeValue, btapi, 'BluetoothSdpGetAttributeValue');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_BluetoothSdpGetAttributeValue]
+ end;
+end;
+
+var
+ _BluetoothSdpGetString: Pointer;
+
+function BluetoothSdpGetString;
+begin
+ GetProcedureAddress(_BluetoothSdpGetString, btapi, 'BluetoothSdpGetString');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_BluetoothSdpGetString]
+ end;
+end;
+
+var
+ _BluetoothSdpEnumAttributes: Pointer;
+
+function BluetoothSdpEnumAttributes;
+begin
+ GetProcedureAddress(_BluetoothSdpEnumAttributes, btapi, 'BluetoothSdpEnumAttributes');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_BluetoothSdpEnumAttributes]
+ end;
+end;
+
+{$ELSE}
+
+function BluetoothFindFirstRadio; external btapi name 'BluetoothFindFirstRadio';
+function BluetoothFindNextRadio; external btapi name 'BluetoothFindNextRadio';
+function BluetoothFindRadioClose; external btapi name 'BluetoothFindRadioClose';
+function BluetoothGetRadioInfo; external btapi name 'BluetoothGetRadioInfo';
+function BluetoothFindFirstDevice; external btapi name 'BluetoothFindFirstDevice';
+function BluetoothFindNextDevice; external btapi name 'BluetoothFindNextDevice';
+function BluetoothFindDeviceClose; external btapi name 'BluetoothFindDeviceClose';
+function BluetoothGetDeviceInfo; external btapi name 'BluetoothGetDeviceInfo';
+function BluetoothUpdateDeviceRecord; external btapi name 'BluetoothUpdateDeviceRecord';
+function BluetoothRemoveDevice; external btapi name 'BluetoothRemoveDevice';
+function BluetoothSelectDevices; external btapi name 'BluetoothSelectDevices';
+function BluetoothSelectDevicesFree; external btapi name 'BluetoothSelectDevicesFree';
+function BluetoothDisplayDeviceProperties; external btapi name 'BluetoothDisplayDeviceProperties';
+function BluetoothAuthenticateDevice; external btapi name 'BluetoothAuthenticateDevice';
+function BluetoothAuthenticateMultipleDevices; external btapi name 'BluetoothAuthenticateMultipleDevices';
+function BluetoothSetServiceState; external btapi name 'BluetoothSetServiceState';
+function BluetoothEnumerateInstalledServices; external btapi name 'BluetoothEnumerateInstalledServices';
+function BluetoothEnableDiscovery; external btapi name 'BluetoothEnableDiscovery';
+function BluetoothIsDiscoverable; external btapi name 'BluetoothIsDiscoverable';
+function BluetoothEnableIncomingConnections; external btapi name 'BluetoothEnableIncomingConnections';
+function BluetoothIsConnectable; external btapi name 'BluetoothIsConnectable';
+function BluetoothRegisterForAuthentication; external btapi name 'BluetoothRegisterForAuthentication';
+function BluetoothUnregisterAuthentication; external btapi name 'BluetoothUnregisterAuthentication';
+function BluetoothSendAuthenticationResponse; external btapi name 'BluetoothSendAuthenticationResponse';
+function BluetoothSdpGetElementData; external btapi name 'BluetoothSdpGetElementData';
+function BluetoothSdpGetContainerElementData; external btapi name 'BluetoothSdpGetContainerElementData';
+function BluetoothSdpGetAttributeValue; external btapi name 'BluetoothSdpGetAttributeValue';
+function BluetoothSdpGetString; external btapi name 'BluetoothSdpGetString';
+function BluetoothSdpEnumAttributes; external btapi name 'BluetoothSdpEnumAttributes';
+
+{$ENDIF DYNAMIC_LINK}
+
+end.
diff --git a/packages/extra/winunits/jwabthdef.pas b/packages/extra/winunits/jwabthdef.pas
index acdee4e5b3..1d3def2bcc 100644
--- a/packages/extra/winunits/jwabthdef.pas
+++ b/packages/extra/winunits/jwabthdef.pas
@@ -1,1527 +1,1527 @@
-{******************************************************************************}
-{ }
-{ BlueTooth API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Contributors: John Penman }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwabthdef.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaBtHDef;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "bthdef.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaWinType, JwaBthSdpDef;
-
-const
- GUID_BTHPORT_DEVICE_INTERFACE: TGUID = '{0850302A-B344-4FDA-9BE9-90576B8D46F0}';
- {$EXTERNALSYM GUID_BTHPORT_DEVICE_INTERFACE}
- GUID_BLUETOOTH_RADIO_IN_RANGE: TGUID = '{EA3B5B82-26EE-450E-B0D8-D26FE30A3869}';
- {$EXTERNALSYM GUID_BLUETOOTH_RADIO_IN_RANGE}
- GUID_BLUETOOTH_RADIO_OUT_OF_RANGE: TGUID = '{E28867C9-C2AA-4CED-B969-4570866037C4}';
- {$EXTERNALSYM GUID_BLUETOOTH_RADIO_OUT_OF_RANGE}
- GUID_BLUETOOTH_PIN_REQUEST: TGUID = '{BD198B7C-24AB-4B9A-8C0D-A8EA8349AA16}';
- {$EXTERNALSYM GUID_BLUETOOTH_PIN_REQUEST}
- GUID_BLUETOOTH_L2CAP_EVENT: TGUID = '{7EAE4030-B709-4AA8-AC55-E953829C9DAA}';
- {$EXTERNALSYM GUID_BLUETOOTH_L2CAP_EVENT}
- GUID_BLUETOOTH_HCI_EVENT: TGUID = '{FC240062-1541-49BE-B463-84C4DCD7BF7F}';
- {$EXTERNALSYM GUID_BLUETOOTH_HCI_EVENT}
-
-//
-// Bluetooth base UUID for service discovery
-//
-
- BLUETOOTH_BASE_UUID = '{00000000-0000-1000-8000-00805F9B34FB}';
- {$EXTERNALSYM BLUETOOTH_BASE_UUID}
-
-//
-// UUID for the root of the browse group list
-//
-
- SDP_PROTOCOL_UUID: TGUID = '{00000001-0000-1000-8000-00805F9B34FB}';
- {$EXTERNALSYM SDP_PROTOCOL_UUID}
- UDP_PROTOCOL_UUID: TGUID = '{00000002-0000-1000-8000-00805F9B34FB}';
- {$EXTERNALSYM UDP_PROTOCOL_UUID}
- RFCOMM_PROTOCOL_UUID: TGUID = '{00000003-0000-1000-8000-00805F9B34FB}';
- {$EXTERNALSYM RFCOMM_PROTOCOL_UUID}
- TCP_PROTOCOL_UUID: TGUID = '{00000004-0000-1000-8000-00805F9B34FB}';
- {$EXTERNALSYM TCP_PROTOCOL_UUID}
- TCSBIN_PROTOCOL_UUID: TGUID = '{00000005-0000-1000-8000-00805F9B34FB}';
- {$EXTERNALSYM TCSBIN_PROTOCOL_UUID}
- TCSAT_PROTOCOL_UUID: TGUID = '{00000006-0000-1000-8000-00805F9B34FB}';
- {$EXTERNALSYM TCSAT_PROTOCOL_UUID}
- OBEX_PROTOCOL_UUID: TGUID = '{00000008-0000-1000-8000-00805F9B34FB}';
- {$EXTERNALSYM OBEX_PROTOCOL_UUID}
- IP_PROTOCOL_UUID: TGUID = '{00000009-0000-1000-8000-00805F9B34FB}';
- {$EXTERNALSYM IP_PROTOCOL_UUID}
- FTP_PROTOCOL_UUID: TGUID = '{0000000A-0000-1000-8000-00805F9B34FB}';
- {$EXTERNALSYM FTP_PROTOCOL_UUID}
- HTTP_PROTOCOL_UUID: TGUID = '{0000000C-0000-1000-8000-00805F9B34FB}';
- {$EXTERNALSYM HTTP_PROTOCOL_UUID}
- WSP_PROTOCOL_UUID: TGUID = '{0000000E-0000-1000-8000-00805F9B34FB}';
- {$EXTERNALSYM WSP_PROTOCOL_UUID}
- BNEP_PROTOCOL_UUID: TGUID = '{0000000F-0000-1000-8000-00805F9B34FB}';
- {$EXTERNALSYM BNEP_PROTOCOL_UUID}
- UPNP_PROTOCOL_UUID: TGUID = '{00000010-0000-1000-8000-00805F9B34FB}';
- {$EXTERNALSYM UPNP_PROTOCOL_UUID}
- HID_PROTOCOL_UUID: TGUID = '{00000011-0000-1000-8000-00805F9B34FB}';
- {$EXTERNALSYM HID_PROTOCOL_UUID}
- HCCC_PROTOCOL_UUID: TGUID = '{00000012-0000-1000-8000-00805F9B34FB}';
- {$EXTERNALSYM HCCC_PROTOCOL_UUID}
- HCDC_PROTOCOL_UUID: TGUID = '{00000014-0000-1000-8000-00805F9B34FB}';
- {$EXTERNALSYM HCDC_PROTOCOL_UUID}
- HN_PROTOCOL_UUID: TGUID = '{00000016-0000-1000-8000-00805F9B34FB}';
- {$EXTERNALSYM HN_PROTOCOL_UUID}
- AVCTP_PROTOCOL_UUID: TGUID = '{00000017-0000-1000-8000-00805F9B34FB}';
- {$EXTERNALSYM AVCTP_PROTOCOL_UUID}
- AVDTP_PROTOCOL_UUID: TGUID = '{00000019-0000-1000-8000-00805F9B34FB}';
- {$EXTERNALSYM AVDTP_PROTOCOL_UUID}
- CMPT_PROTOCOL_UUID: TGUID = '{0000001B-0000-1000-8000-00805F9B34FB}';
- {$EXTERNALSYM CMPT_PROTOCOL_UUID}
- UDI_C_PLANE_PROTOCOL_UUID: TGUID= '{0000001D-0000-1000-8000-00805F9B34FB}';
- {$EXTERNALSYM UDI_C_PLANE_PROTOCOL_UUID}
- L2CAP_PROTOCOL_UUID: TGUID = '{00000100-0000-1000-8000-00805F9B34FB}';
- {$EXTERNALSYM L2CAP_PROTOCOL_UUID}
-
- SDP_PROTOCOL_UUID16 = $0001;
- {$EXTERNALSYM SDP_PROTOCOL_UUID16}
- UDP_PROTOCOL_UUID16 = $0002;
- {$EXTERNALSYM UDP_PROTOCOL_UUID16}
- RFCOMM_PROTOCOL_UUID16 = $0003;
- {$EXTERNALSYM RFCOMM_PROTOCOL_UUID16}
- TCP_PROTOCOL_UUID16 = $0004;
- {$EXTERNALSYM TCP_PROTOCOL_UUID16}
- TCSBIN_PROTOCOL_UUID16 = $0005;
- {$EXTERNALSYM TCSBIN_PROTOCOL_UUID16}
- TCSAT_PROTOCOL_UUID16 = $0006;
- {$EXTERNALSYM TCSAT_PROTOCOL_UUID16}
- OBEX_PROTOCOL_UUID16 = $0008;
- {$EXTERNALSYM OBEX_PROTOCOL_UUID16}
- IP_PROTOCOL_UUID16 = $0009;
- {$EXTERNALSYM IP_PROTOCOL_UUID16}
- FTP_PROTOCOL_UUID16 = $000A;
- {$EXTERNALSYM FTP_PROTOCOL_UUID16}
- HTTP_PROTOCOL_UUID16 = $000C;
- {$EXTERNALSYM HTTP_PROTOCOL_UUID16}
- WSP_PROTOCOL_UUID16 = $000E;
- {$EXTERNALSYM WSP_PROTOCOL_UUID16}
- BNEP_PROTOCOL_UUID16 = $000;
- {$EXTERNALSYM BNEP_PROTOCOL_UUID16}
- UPNP_PROTOCOL_UUID16 = $0010;
- {$EXTERNALSYM UPNP_PROTOCOL_UUID16}
- HID_PROTOCOL_UUID16 = $0011;
- {$EXTERNALSYM HID_PROTOCOL_UUID16}
- HCCC_PROTOCOL_UUID16 = $0012;
- {$EXTERNALSYM HCCC_PROTOCOL_UUID16}
- HCDC_PROTOCOL_UUID16 = $0014;
- {$EXTERNALSYM HCDC_PROTOCOL_UUID16}
- HCN_PROTOCOL_UUID16 = $0016;
- {$EXTERNALSYM HCN_PROTOCOL_UUID16}
- AVCTP_PROTOCOL_UUID16 = $0017;
- {$EXTERNALSYM AVCTP_PROTOCOL_UUID16}
- AVDTP_PROTOCOL_UUID16 = $0019;
- {$EXTERNALSYM AVDTP_PROTOCOL_UUID16}
- CMPT_PROTOCOL_UUID16 = $001B;
- {$EXTERNALSYM CMPT_PROTOCOL_UUID16}
- UDI_C_PLANE_PROTOCOL_UUID16 = $001D;
- {$EXTERNALSYM UDI_C_PLANE_PROTOCOL_UUID16}
- L2CAP_PROTOCOL_UUID16 = $0100;
- {$EXTERNALSYM L2CAP_PROTOCOL_UUID16}
-
- ServiceDiscoveryServerServiceClassID_UUID: TGUID = '{00001000-0000-1000-8000-00805F9B34FB}';
- BrowseGroupDescriptorServiceClassID_UUID: TGUID = '{00001001-0000-1000-8000-00805F9B34FB}';
- PublicBrowseGroupServiceClass_UUID: TGUID = '{00001002-0000-1000-8000-00805F9B34FB}';
- SerialPortServiceClass_UUID: TGUID = '{00001101-0000-1000-8000-00805F9B34FB}';
- LANAccessUsingPPPServiceClass_UUID: TGUID = '{00001102-0000-1000-8000-00805F9B34FB}';
- DialupNetworkingServiceClass_UUID: TGUID = '{00001103-0000-1000-8000-00805F9B34FB}';
- IrMCSyncServiceClass_UUID: TGUID = '{00001104-0000-1000-8000-00805F9B34FB}';
- OBEXObjectPushServiceClass_UUID: TGUID = '{00001105-0000-1000-8000-00805F9B34FB}';
- OBEXFileTransferServiceClass_UUID: TGUID = '{00001106-0000-1000-8000-00805F9B34FB}';
- IrMCSyncCommandServiceClass_UUID: TGUID = '{00001107-0000-1000-8000-00805F9B34FB}';
- HeadsetServiceClass_UUID: TGUID = '{00001108-0000-1000-8000-00805F9B34FB}';
- CordlessTelephonyServiceClass_UUID: TGUID = '{00001109-0000-1000-8000-00805F9B34FB}';
- AudioSourceServiceClass_UUID: TGUID = '{0000110A-0000-1000-8000-00805F9B34FB}';
- AudioSinkServiceClass_UUID: TGUID = '{0000110B-0000-1000-8000-00805F9B34FB}';
- AVRemoteControlTargetServiceClass_UUID: TGUID = '{0000110C-0000-1000-8000-00805F9B34FB}';
- AdvancedAudioDistributionServiceClass_UUID: TGUID = '{0000110D-0000-1000-8000-00805F9B34FB}';
- AVRemoteControlServiceClass_UUID: TGUID = '{0000110E-0000-1000-8000-00805F9B34FB}';
- VideoConferencingServiceClass_UUID: TGUID = '{0000110F-0000-1000-8000-00805F9B34FB}';
- IntercomServiceClass_UUID: TGUID = '{00001110-0000-1000-8000-00805F9B34FB}';
- FaxServiceClass_UUID: TGUID = '{00001111-0000-1000-8000-00805F9B34FB}';
- HeadsetAudioGatewayServiceClass_UUID: TGUID = '{00001112-0000-1000-8000-00805F9B34FB}';
- WAPServiceClass_UUID: TGUID = '{00001113-0000-1000-8000-00805F9B34FB}';
- WAPClientServiceClass_UUID: TGUID = '{00001114-0000-1000-8000-00805F9B34FB}';
- PANUServiceClass_UUID: TGUID = '{00001115-0000-1000-8000-00805F9B34FB}';
- NAPServiceClass_UUID: TGUID = '{00001116-0000-1000-8000-00805F9B34FB}';
- GNServiceClass_UUID: TGUID = '{00001117-0000-1000-8000-00805F9B34FB}';
- DirectPrintingServiceClass_UUID: TGUID = '{00001118-0000-1000-8000-00805F9B34FB}';
- ReferencePrintingServiceClass_UUID: TGUID = '{00001119-0000-1000-8000-00805F9B34FB}';
- ImagingServiceClass_UUID: TGUID = '{0000111A-0000-1000-8000-00805F9B34FB}';
- ImagingResponderServiceClass_UUID: TGUID = '{0000111B-0000-1000-8000-00805F9B34FB}';
- ImagingAutomaticArchiveServiceClass_UUID: TGUID = '{0000111C-0000-1000-8000-00805F9B34FB}';
- ImagingReferenceObjectsServiceClass_UUID: TGUID = '{0000111D-0000-1000-8000-00805F9B34FB}';
- HandsfreeServiceClass_UUID: TGUID = '{0000111E-0000-1000-8000-00805F9B34FB}';
- HandsfreeAudioGatewayServiceClass_UUID: TGUID = '{0000111F-0000-1000-8000-00805F9B34FB}';
- DirectPrintingReferenceObjectsServiceClass_UUID: TGUID = '{00001120-0000-1000-8000-00805F9B34FB}';
- ReflectedUIServiceClass_UUID: TGUID = '{00001121-0000-1000-8000-00805F9B34FB}';
- BasicPringingServiceClass_UUID: TGUID = '{00001122-0000-1000-8000-00805F9B34FB}';
- PrintingStatusServiceClass_UUID: TGUID = '{00001123-0000-1000-8000-00805F9B34FB}';
- HumanInterfaceDeviceServiceClass_UUID: TGUID = '{00001124-0000-1000-8000-00805F9B34FB}';
- HardcopyCableReplacementServiceClass_UUID: TGUID = '{00001125-0000-1000-8000-00805F9B34FB}';
- HCRPrintServiceClass_UUID: TGUID = '{00001126-0000-1000-8000-00805F9B34FB}';
- HCRScanServiceClass_UUID: TGUID = '{00001127-0000-1000-8000-00805F9B34FB}';
- CommonISDNAccessServiceClass_UUID: TGUID = '{00001128-0000-1000-8000-00805F9B34FB}';
- VideoConferencingGWServiceClass_UUID: TGUID = '{00001129-0000-1000-8000-00805F9B34FB}';
- UDIMTServiceClass_UUID: TGUID = '{0000112A-0000-1000-8000-00805F9B34FB}';
- UDITAServiceClass_UUID: TGUID = '{0000112B-0000-1000-8000-00805F9B34FB}';
- AudioVideoServiceClass_UUID: TGUID = '{0000112C-0000-1000-8000-00805F9B34FB}';
- PnPInformationServiceClass_UUID: TGUID = '{00001200-0000-1000-8000-00805F9B34FB}';
- GenericNetworkingServiceClass_UUID: TGUID = '{00001201-0000-1000-8000-00805F9B34FB}';
- GenericFileTransferServiceClass_UUID: TGUID = '{00001202-0000-1000-8000-00805F9B34FB}';
- GenericAudioServiceClass_UUID: TGUID = '{00001203-0000-1000-8000-00805F9B34FB}';
- GenericTelephonyServiceClass_UUID: TGUID = '{00001204-0000-1000-8000-00805F9B34FB}';
-
- ServiceDiscoveryServerServiceClassID_UUID16 = $1000;
- BrowseGroupDescriptorServiceClassID_UUID16 = $1001;
- PublicBrowseGroupServiceClassID_UUID16 = $1002;
- SerialPortServiceClassID_UUID16 = $1101;
- LANAccessUsingPPPServiceClassID_UUID16 = $1102;
- DialupNetworkingServiceClassID_UUID16 = $1103;
- IrMCSyncServiceClassID_UUID16 = $1104;
- OBEXObjectPushServiceClassID_UUID16 = $1105;
- OBEXFileTransferServiceClassID_UUID16 = $1106;
- IrMcSyncCommandServiceClassID_UUID16 = $1107;
- HeadsetServiceClassID_UUID16 = $1108;
- CordlessServiceClassID_UUID16 = $1109;
- AudioSourceServiceClassID_UUID16 = $110A;
- AudioSinkSourceServiceClassID_UUID16 = $110B;
- AVRemoteControlTargetServiceClassID_UUID16 = $110C;
- AdvancedAudioDistributionServiceClassID_UUID16 = $110D;
- AVRemoteControlServiceClassID_UUID16 = $110E;
- VideoConferencingServiceClassID_UUID16 = $110;
- IntercomServiceClassID_UUID16 = $1110;
- FaxServiceClassID_UUID16 = $1111;
- HeadsetAudioGatewayServiceClassID_UUID16 = $1112;
- WAPServiceClassID_UUID16 = $1113;
- WAPClientServiceClassID_UUID16 = $1114;
- PANUServiceClassID_UUID16 = $1115;
- NAPServiceClassID_UUID16 = $1116;
- GNServiceClassID_UUID16 = $1117;
- DirectPrintingServiceClassID_UUID16 = $1118;
- ReferencePrintingServiceClassID_UUID16 = $1119;
- ImagingServiceClassID_UUID16 = $111A;
- ImagingResponderServiceClassID_UUID16 = $111B;
- ImagingAutomaticArchiveServiceClassID_UUID16 = $111C;
- ImagingReferenceObjectsServiceClassID_UUID16 = $111D;
- HandsfreeServiceClassID_UUID16 = $111E;
- HandsfreeAudioGatewayServiceClassID_UUID16 = $111F;
- DirectPrintingReferenceObjectsServiceClassID_UUID16 = $1120;
- ReflectsUIServiceClassID_UUID16 = $1121;
- BasicPrintingServiceClassID_UUID16 = $1122;
- PrintingStatusServiceClassID_UUID16 = $1123;
- HumanInterfaceDeviceServiceClassID_UUID16 = $1124;
- HardcopyCableReplacementServiceClassID_UUID16 = $1125;
- HCRPrintServiceClassID_UUID16 = $1126;
- HCRScanServiceClassID_UUID16 = $1127;
- CommonISDNAccessServiceClass_UUID16 = $1128;
- VideoConferencingGWServiceClass_UUID16 = $1129;
- UDIMTServiceClass_UUID16 = $112A;
- UDITAServiceClass_UUID16 = $112B;
- AudioVideoServiceClass_UUID16 = $112C;
-
- PnPInformationServiceClassID_UUID16 = $1200;
- {$EXTERNALSYM PnPInformationServiceClassID_UUID16}
- GenericNetworkingServiceClassID_UUID16 = $1201;
- {$EXTERNALSYM GenericNetworkingServiceClassID_UUID16}
- GenericFileTransferServiceClassID_UUID16 = $1202;
- {$EXTERNALSYM GenericFileTransferServiceClassID_UUID16}
- GenericAudioServiceClassID_UUID16 = $1203;
- {$EXTERNALSYM GenericAudioServiceClassID_UUID16}
- GenericTelephonyServiceClassID_UUID16 = $1204;
- {$EXTERNALSYM GenericTelephonyServiceClassID_UUID16}
-
-//
-// max length of device friendly name.
-//
-
- BTH_MAX_NAME_SIZE = 248;
- {$EXTERNALSYM BTH_MAX_NAME_SIZE}
-
- BTH_MAX_PIN_SIZE = 16;
- {$EXTERNALSYM BTH_MAX_PIN_SIZE}
- BTH_LINK_KEY_LENGTH = 16;
- {$EXTERNALSYM BTH_LINK_KEY_LENGTH}
-
- BTH_MFG_ERICSSON = 0;
- {$EXTERNALSYM BTH_MFG_ERICSSON}
- BTH_MFG_NOKIA = 1;
- {$EXTERNALSYM BTH_MFG_NOKIA}
- BTH_MFG_INTEL = 2;
- {$EXTERNALSYM BTH_MFG_INTEL}
- BTH_MFG_IBM = 3;
- {$EXTERNALSYM BTH_MFG_IBM}
- BTH_MFG_TOSHIBA = 4;
- {$EXTERNALSYM BTH_MFG_TOSHIBA}
- BTH_MFG_3COM = 5;
- {$EXTERNALSYM BTH_MFG_3COM}
- BTH_MFG_MICROSOFT = 6;
- {$EXTERNALSYM BTH_MFG_MICROSOFT}
- BTH_MFG_LUCENT = 7;
- {$EXTERNALSYM BTH_MFG_LUCENT}
- BTH_MFG_MOTOROLA = 8;
- {$EXTERNALSYM BTH_MFG_MOTOROLA}
- BTH_MFG_INFINEON = 9;
- {$EXTERNALSYM BTH_MFG_INFINEON}
- BTH_MFG_CSR = 10;
- {$EXTERNALSYM BTH_MFG_CSR}
- BTH_MFG_SILICONWAVE = 11;
- {$EXTERNALSYM BTH_MFG_SILICONWAVE}
- BTH_MFG_DIGIANSWER = 12;
- {$EXTERNALSYM BTH_MFG_DIGIANSWER}
- BTH_MFG_TI = 13;
- {$EXTERNALSYM BTH_MFG_TI}
- BTH_MFG_PARTHUS = 14;
- {$EXTERNALSYM BTH_MFG_PARTHUS}
- BTH_MFG_BROADCOM = 15;
- {$EXTERNALSYM BTH_MFG_BROADCOM}
- BTH_MFG_MITEL = 16;
- {$EXTERNALSYM BTH_MFG_MITEL}
- BTH_MFG_WIDCOMM = 17;
- {$EXTERNALSYM BTH_MFG_WIDCOMM}
- BTH_MFG_ZEEVO = 18;
- {$EXTERNALSYM BTH_MFG_ZEEVO}
- BTH_MFG_ATMEL = 19;
- {$EXTERNALSYM BTH_MFG_ATMEL}
- BTH_MFG_MITSIBUSHI = 20;
- {$EXTERNALSYM BTH_MFG_MITSIBUSHI}
- BTH_MFG_RTX_TELECOM = 21;
- {$EXTERNALSYM BTH_MFG_RTX_TELECOM}
- BTH_MFG_KC_TECHNOLOGY = 22;
- {$EXTERNALSYM BTH_MFG_KC_TECHNOLOGY}
- BTH_MFG_NEWLOGIC = 23;
- {$EXTERNALSYM BTH_MFG_NEWLOGIC}
- BTH_MFG_TRANSILICA = 24;
- {$EXTERNALSYM BTH_MFG_TRANSILICA}
- BTH_MFG_ROHDE_SCHWARZ = 25;
- {$EXTERNALSYM BTH_MFG_ROHDE_SCHWARZ}
- BTH_MFG_TTPCOM = 26;
- {$EXTERNALSYM BTH_MFG_TTPCOM}
- BTH_MFG_SIGNIA = 27;
- {$EXTERNALSYM BTH_MFG_SIGNIA}
- BTH_MFG_CONEXANT = 28;
- {$EXTERNALSYM BTH_MFG_CONEXANT}
- BTH_MFG_QUALCOMM = 29;
- {$EXTERNALSYM BTH_MFG_QUALCOMM}
- BTH_MFG_INVENTEL = 30;
- {$EXTERNALSYM BTH_MFG_INVENTEL}
- BTH_MFG_AVM_BERLIN = 31;
- {$EXTERNALSYM BTH_MFG_AVM_BERLIN}
- BTH_MFG_BANDSPEED = 32;
- {$EXTERNALSYM BTH_MFG_BANDSPEED}
- BTH_MFG_MANSELLA = 33;
- {$EXTERNALSYM BTH_MFG_MANSELLA}
- BTH_MFG_NEC = 34;
- {$EXTERNALSYM BTH_MFG_NEC}
- BTH_MFG_WAVEPLUS_TECHNOLOGY_CO = 35;
- {$EXTERNALSYM BTH_MFG_WAVEPLUS_TECHNOLOGY_CO}
- BTH_MFG_ALCATEL = 36;
- {$EXTERNALSYM BTH_MFG_ALCATEL}
- BTH_MFG_PHILIPS_SEMICONDUCTOR = 37;
- {$EXTERNALSYM BTH_MFG_PHILIPS_SEMICONDUCTOR}
- BTH_MFG_C_TECHNOLOGIES = 38;
- {$EXTERNALSYM BTH_MFG_C_TECHNOLOGIES}
- BTH_MFG_OPEN_INTERFACE = 39;
- {$EXTERNALSYM BTH_MFG_OPEN_INTERFACE}
- BTH_MFG_RF_MICRO_DEVICES = 40;
- {$EXTERNALSYM BTH_MFG_RF_MICRO_DEVICES}
- BTH_MFG_HITACHI = 41;
- {$EXTERNALSYM BTH_MFG_HITACHI}
- BTH_MFG_SYMBOL_TECHNOLOGIES = 42;
- {$EXTERNALSYM BTH_MFG_SYMBOL_TECHNOLOGIES}
- BTH_MFG_TENOVIS = 43;
- {$EXTERNALSYM BTH_MFG_TENOVIS}
- BTH_MFG_MACRONIX_INTERNATIONAL = 44;
- {$EXTERNALSYM BTH_MFG_MACRONIX_INTERNATIONAL}
- BTH_MFG_INTERNAL_USE = 65535;
- {$EXTERNALSYM BTH_MFG_INTERNAL_USE}
-
-type
- BTH_ADDR = Int64;
- {$EXTERNALSYM BTH_ADDR}
- PBTH_ADDR = ^BTH_ADDR;
- {$EXTERNALSYM PBTH_ADDR}
- BTH_COD = ULONG;
- {$EXTERNALSYM BTH_COD}
- PBTH_COD = ^BTH_COD;
- {$EXTERNALSYM PBTH_COD}
- BTH_LAP = ULONG;
- {$EXTERNALSYM BTH_LAP}
- PBTH_LAP = ^BTH_LAP;
- {$EXTERNALSYM PBTH_LAP}
-
-const
- BTH_ADDR_NULL = Int64($0000000000000000);
- {$EXTERNALSYM BTH_ADDR_NULL}
-
- NAP_MASK = Int64($FFFF00000000);
- {$EXTERNALSYM NAP_MASK}
- SAP_MASK = Int64($0000FFFFFFFF);
- {$EXTERNALSYM SAP_MASK}
-
- NAP_BIT_OFFSET = 8 * 4;
- {$EXTERNALSYM NAP_BIT_OFFSET}
- SAP_BIT_OFFSET = 0;
- {$EXTERNALSYM SAP_BIT_OFFSET}
-
-function GET_NAP(_bth_addr: BTH_ADDR): Word;
-function GET_SAP(_bth_addr: BTH_ADDR): ULONG;
-function SET_NAP(_nap: Word): Int64; //todo impl
-function SET_SAP(_sap: ULONG): Int64; // todo impl
-function SET_NAP_SAP(_nap, _sap: Word): Int64; // todo impl
-
-const
- COD_FORMAT_BIT_OFFSET = 0;
- {$EXTERNALSYM COD_FORMAT_BIT_OFFSET}
- COD_MINOR_BIT_OFFSET = 2;
- {$EXTERNALSYM COD_MINOR_BIT_OFFSET}
- COD_MAJOR_BIT_OFFSET = 8 * 1;
- {$EXTERNALSYM COD_MAJOR_BIT_OFFSET}
- COD_SERVICE_BIT_OFFSET = 8 * 1 + 5;
- {$EXTERNALSYM COD_SERVICE_BIT_OFFSET}
-
- COD_FORMAT_MASK = $000003;
- {$EXTERNALSYM COD_FORMAT_MASK}
- COD_MINOR_MASK = $0000FC;
- {$EXTERNALSYM COD_MINOR_MASK}
- COD_MAJOR_MASK = $001F00;
- {$EXTERNALSYM COD_MAJOR_MASK}
- COD_SERVICE_MASK = $FFE000;
- {$EXTERNALSYM COD_SERVICE_MASK}
-
-function GET_COD_FORMAT(_cod: BTH_COD): BTH_COD;
-function GET_COD_MINOR(_cod: BTH_COD): BTH_COD;
-function GET_COD_MAJOR(_cod: BTH_COD): BTH_COD;
-function GET_COD_SERVICE(_cod: BTH_COD): BTH_COD;
-
-procedure SET_COD_MINOR(var _cod: BTH_COD; _minor: BTH_COD);
-procedure SET_COD_MAJOR(var _cod: BTH_COD; _major: BTH_COD);
-procedure SET_COD_SERVICE(var _cod: BTH_COD; _service: BTH_COD);
-
-const
- COD_VERSION = $0;
- {$EXTERNALSYM COD_VERSION}
-
- COD_SERVICE_LIMITED = $0001;
- {$EXTERNALSYM COD_SERVICE_LIMITED}
- COD_SERVICE_POSITIONING = $0008;
- {$EXTERNALSYM COD_SERVICE_POSITIONING}
- COD_SERVICE_NETWORKING = $0010;
- {$EXTERNALSYM COD_SERVICE_NETWORKING}
- COD_SERVICE_RENDERING = $0020;
- {$EXTERNALSYM COD_SERVICE_RENDERING}
- COD_SERVICE_CAPTURING = $0040;
- {$EXTERNALSYM COD_SERVICE_CAPTURING}
- COD_SERVICE_OBJECT_XFER = $0080;
- {$EXTERNALSYM COD_SERVICE_OBJECT_XFER}
- COD_SERVICE_AUDIO = $0100;
- {$EXTERNALSYM COD_SERVICE_AUDIO}
- COD_SERVICE_TELEPHONY = $0200;
- {$EXTERNALSYM COD_SERVICE_TELEPHONY}
- COD_SERVICE_INFORMATION = $0400;
- {$EXTERNALSYM COD_SERVICE_INFORMATION}
-
- COD_SERVICE_VALID_MASK = COD_SERVICE_LIMITED or COD_SERVICE_POSITIONING or
- COD_SERVICE_NETWORKING or COD_SERVICE_RENDERING or
- COD_SERVICE_CAPTURING or COD_SERVICE_OBJECT_XFER or
- COD_SERVICE_AUDIO or COD_SERVICE_TELEPHONY or
- COD_SERVICE_INFORMATION;
- {$EXTERNALSYM COD_SERVICE_VALID_MASK}
-
- COD_SERVICE_MAX_COUNT = 9;
- {$EXTERNALSYM COD_SERVICE_MAX_COUNT}
-
-//
-// Major class codes
-//
-
-const
- COD_MAJOR_MISCELLANEOUS = $00;
- {$EXTERNALSYM COD_MAJOR_MISCELLANEOUS}
- COD_MAJOR_COMPUTER = $01;
- {$EXTERNALSYM COD_MAJOR_COMPUTER}
- COD_MAJOR_PHONE = $02;
- {$EXTERNALSYM COD_MAJOR_PHONE}
- COD_MAJOR_LAN_ACCESS = $03;
- {$EXTERNALSYM COD_MAJOR_LAN_ACCESS}
- COD_MAJOR_AUDIO = $04;
- {$EXTERNALSYM COD_MAJOR_AUDIO}
- COD_MAJOR_PERIPHERAL = $05;
- {$EXTERNALSYM COD_MAJOR_PERIPHERAL}
- COD_MAJOR_IMAGING = $06;
- {$EXTERNALSYM COD_MAJOR_IMAGING}
- COD_MAJOR_UNCLASSIFIED = $1;
- {$EXTERNALSYM COD_MAJOR_UNCLASSIFIED}
-
-//
-// Minor class codes specific to each major class
-//
-
-const
- COD_COMPUTER_MINOR_UNCLASSIFIED = $00;
- {$EXTERNALSYM COD_COMPUTER_MINOR_UNCLASSIFIED}
- COD_COMPUTER_MINOR_DESKTOP = $01;
- {$EXTERNALSYM COD_COMPUTER_MINOR_DESKTOP}
- COD_COMPUTER_MINOR_SERVER = $02;
- {$EXTERNALSYM COD_COMPUTER_MINOR_SERVER}
- COD_COMPUTER_MINOR_LAPTOP = $03;
- {$EXTERNALSYM COD_COMPUTER_MINOR_LAPTOP}
- COD_COMPUTER_MINOR_HANDHELD = $04;
- {$EXTERNALSYM COD_COMPUTER_MINOR_HANDHELD}
- COD_COMPUTER_MINOR_PALM = $05;
- {$EXTERNALSYM COD_COMPUTER_MINOR_PALM}
- COD_COMPUTER_MINOR_WEARABLE = $06;
- {$EXTERNALSYM COD_COMPUTER_MINOR_WEARABLE}
-
- COD_PHONE_MINOR_UNCLASSIFIED = $00;
- {$EXTERNALSYM COD_PHONE_MINOR_UNCLASSIFIED}
- COD_PHONE_MINOR_CELLULAR = $01;
- {$EXTERNALSYM COD_PHONE_MINOR_CELLULAR}
- COD_PHONE_MINOR_CORDLESS = $02;
- {$EXTERNALSYM COD_PHONE_MINOR_CORDLESS}
- COD_PHONE_MINOR_SMART = $03;
- {$EXTERNALSYM COD_PHONE_MINOR_SMART}
- COD_PHONE_MINOR_WIRED_MODEM = $04;
- {$EXTERNALSYM COD_PHONE_MINOR_WIRED_MODEM}
-
- COD_AUDIO_MINOR_UNCLASSIFIED = $00;
- {$EXTERNALSYM COD_AUDIO_MINOR_UNCLASSIFIED}
- COD_AUDIO_MINOR_HEADSET = $01;
- {$EXTERNALSYM COD_AUDIO_MINOR_HEADSET}
- COD_AUDIO_MINOR_HANDS_FREE = $02;
- {$EXTERNALSYM COD_AUDIO_MINOR_HANDS_FREE}
- COD_AUDIO_MINOR_HEADSET_HANDS_FREE = $03;
- {$EXTERNALSYM COD_AUDIO_MINOR_HEADSET_HANDS_FREE}
- COD_AUDIO_MINOR_MICROPHONE = $0;
- {$EXTERNALSYM COD_AUDIO_MINOR_MICROPHONE}
- COD_AUDIO_MINOR_LOUDSPEAKER = $05;
- {$EXTERNALSYM COD_AUDIO_MINOR_LOUDSPEAKER}
- COD_AUDIO_MINOR_HEADPHONES = $06;
- {$EXTERNALSYM COD_AUDIO_MINOR_HEADPHONES}
- COD_AUDIO_MINOR_PORTABLE_AUDIO = $07;
- {$EXTERNALSYM COD_AUDIO_MINOR_PORTABLE_AUDIO}
- COD_AUDIO_MINOR_CAR_AUDIO = $08;
- {$EXTERNALSYM COD_AUDIO_MINOR_CAR_AUDIO}
- COD_AUDIO_MINOR_SET_TOP_BOX = $09;
- {$EXTERNALSYM COD_AUDIO_MINOR_SET_TOP_BOX}
- COD_AUDIO_MINOR_HIFI_AUDIO = $0A;
- {$EXTERNALSYM COD_AUDIO_MINOR_HIFI_AUDIO}
- COD_AUDIO_MINOR_VCR = $0B;
- {$EXTERNALSYM COD_AUDIO_MINOR_VCR}
- COD_AUDIO_MINOR_VIDEO_CAMERA = $0C;
- {$EXTERNALSYM COD_AUDIO_MINOR_VIDEO_CAMERA}
- COD_AUDIO_MINOR_CAMCORDER = $0D;
- {$EXTERNALSYM COD_AUDIO_MINOR_CAMCORDER}
- COD_AUDIO_MINOR_VIDEO_MONITOR = $0E;
- {$EXTERNALSYM COD_AUDIO_MINOR_VIDEO_MONITOR}
- COD_AUDIO_MINOR_VIDEO_DISPLAY_LOUDSPEAKER = $0F;
- {$EXTERNALSYM COD_AUDIO_MINOR_VIDEO_DISPLAY_LOUDSPEAKER}
- COD_AUDIO_MINOR_VIDEO_DISPLAY_CONFERENCING = $10;
- {$EXTERNALSYM COD_AUDIO_MINOR_VIDEO_DISPLAY_CONFERENCING}
- //COD_AUDIO_MINOR_RESERVED = $11:
- COD_AUDIO_MINOR_GAMING_TOY = $12;
- {$EXTERNALSYM COD_AUDIO_MINOR_GAMING_TOY}
-
- COD_PERIPHERAL_MINOR_KEYBOARD_MASK = $10;
- {$EXTERNALSYM COD_PERIPHERAL_MINOR_KEYBOARD_MASK}
- COD_PERIPHERAL_MINOR_POINTER_MASK = $20;
- {$EXTERNALSYM COD_PERIPHERAL_MINOR_POINTER_MASK}
-
- COD_PERIPHERAL_MINOR_NO_CATEGORY = $00;
- {$EXTERNALSYM COD_PERIPHERAL_MINOR_NO_CATEGORY}
- COD_PERIPHERAL_MINOR_JOYSTICK = $01;
- {$EXTERNALSYM COD_PERIPHERAL_MINOR_JOYSTICK}
- COD_PERIPHERAL_MINOR_GAMEPAD = $02;
- {$EXTERNALSYM COD_PERIPHERAL_MINOR_GAMEPAD}
- COD_PERIPHERAL_MINOR_REMOTE_CONTROL = $03;
- {$EXTERNALSYM COD_PERIPHERAL_MINOR_REMOTE_CONTROL}
- COD_PERIPHERAL_MINOR_SENSING = $04;
- {$EXTERNALSYM COD_PERIPHERAL_MINOR_SENSING}
-
- COD_IMAGING_MINOR_DISPLAY_MASK = $04;
- {$EXTERNALSYM COD_IMAGING_MINOR_DISPLAY_MASK}
- COD_IMAGING_MINOR_CAMERA_MASK = $08;
- {$EXTERNALSYM COD_IMAGING_MINOR_CAMERA_MASK}
- COD_IMAGING_MINOR_SCANNER_MASK = $10;
- {$EXTERNALSYM COD_IMAGING_MINOR_SCANNER_MASK}
- COD_IMAGING_MINOR_PRINTER_MASK = $20;
- {$EXTERNALSYM COD_IMAGING_MINOR_PRINTER_MASK}
-
-//
-// Cannot use GET_COD_MINOR for this b/c it is embedded in a different manner
-// than the rest of the major classes
-//
-
-const
- COD_LAN_ACCESS_BIT_OFFSET = 5;
- {$EXTERNALSYM COD_LAN_ACCESS_BIT_OFFSET}
-
- COD_LAN_MINOR_MASK = $00001C;
- {$EXTERNALSYM COD_LAN_MINOR_MASK}
- COD_LAN_ACCESS_MASK = $0000E0;
- {$EXTERNALSYM COD_LAN_ACCESS_MASK}
-
-function GET_COD_LAN_MINOR(_cod: DWORD): DWORD;
-{$EXTERNALSYM GET_COD_LAN_MINOR}
-function GET_COD_LAN_ACCESS(_cod: DWORD): DWORD;
-{$EXTERNALSYM GET_COD_LAN_ACCESS}
-
-//
-// LAN access percent usage subcodes
-//
-
-const
- COD_LAN_MINOR_UNCLASSIFIED = $00;
- {$EXTERNALSYM COD_LAN_MINOR_UNCLASSIFIED}
-
- COD_LAN_ACCESS_0_USED = $00;
- {$EXTERNALSYM COD_LAN_ACCESS_0_USED}
- COD_LAN_ACCESS_17_USED = $01;
- {$EXTERNALSYM COD_LAN_ACCESS_17_USED}
- COD_LAN_ACCESS_33_USED = $02;
- {$EXTERNALSYM COD_LAN_ACCESS_33_USED}
- COD_LAN_ACCESS_50_USED = $03;
- {$EXTERNALSYM COD_LAN_ACCESS_50_USED}
- COD_LAN_ACCESS_67_USED = $04;
- {$EXTERNALSYM COD_LAN_ACCESS_67_USED}
- COD_LAN_ACCESS_83_USED = $05;
- {$EXTERNALSYM COD_LAN_ACCESS_83_USED}
- COD_LAN_ACCESS_99_USED = $06;
- {$EXTERNALSYM COD_LAN_ACCESS_99_USED}
- COD_LAN_ACCESS_FULL = $07;
- {$EXTERNALSYM COD_LAN_ACCESS_FULL}
-
-//
-// Used as an initializer of LAP_DATA
-//
-
-(* (rom) not implementable in Delphi
-#define LAP_GIAC_INIT { 0x33, 0x8B, 0x9E }
-#define LAP_LIAC_INIT { 0x00, 0x8B, 0x9E }
-*)
-
-//
-// General Inquiry Access Code.
-//
-
-const
- LAP_GIAC_VALUE = $009E8B33;
- {$EXTERNALSYM LAP_GIAC_VALUE}
-
-//
-// Limited Inquiry Access Code.
-//
-
-const
- LAP_LIAC_VALUE = $009E8B00;
- {$EXTERNALSYM LAP_LIAC_VALUE}
-
- BTH_ADDR_IAC_FIRST = $9E8B00;
- {$EXTERNALSYM BTH_ADDR_IAC_FIRST}
- BTH_ADDR_IAC_LAST = $9E8B3;
- {$EXTERNALSYM BTH_ADDR_IAC_LAST}
- BTH_ADDR_LIAC = $9E8B00;
- {$EXTERNALSYM BTH_ADDR_LIAC}
- BTH_ADDR_GIAC = $9E8B33;
- {$EXTERNALSYM BTH_ADDR_GIAC}
-
-type
- BTHSTATUS = UCHAR;
- {$EXTERNALSYM BTHSTATUS}
- PBTHSTATUS = ^BTHSTATUS;
- {$EXTERNALSYM PBTHSTATUS}
-
-function BTH_ERROR(_btStatus: BTHSTATUS): BOOL;
-{$EXTERNALSYM BTH_ERROR}
-function BTH_SUCCESS(_btStatus: BTHSTATUS): BOOL;
-{$EXTERNALSYM BTH_SUCCESS}
-
-const
- BTH_ERROR_SUCCESS = $00;
- {$EXTERNALSYM BTH_ERROR_SUCCESS}
- BTH_ERROR_UNKNOWN_HCI_COMMAND = $01;
- {$EXTERNALSYM BTH_ERROR_UNKNOWN_HCI_COMMAND}
- BTH_ERROR_NO_CONNECTION = $02;
- {$EXTERNALSYM BTH_ERROR_NO_CONNECTION}
- BTH_ERROR_HARDWARE_FAILURE = $03;
- {$EXTERNALSYM BTH_ERROR_HARDWARE_FAILURE}
- BTH_ERROR_PAGE_TIMEOUT = $04;
- {$EXTERNALSYM BTH_ERROR_PAGE_TIMEOUT}
- BTH_ERROR_AUTHENTICATION_FAILURE = $05;
- {$EXTERNALSYM BTH_ERROR_AUTHENTICATION_FAILURE}
- BTH_ERROR_KEY_MISSING = $06;
- {$EXTERNALSYM BTH_ERROR_KEY_MISSING}
- BTH_ERROR_MEMORY_FULL = $07;
- {$EXTERNALSYM BTH_ERROR_MEMORY_FULL}
- BTH_ERROR_CONNECTION_TIMEOUT = $08;
- {$EXTERNALSYM BTH_ERROR_CONNECTION_TIMEOUT}
- BTH_ERROR_MAX_NUMBER_OF_CONNECTIONS = $09;
- {$EXTERNALSYM BTH_ERROR_MAX_NUMBER_OF_CONNECTIONS}
- BTH_ERROR_MAX_NUMBER_OF_SCO_CONNECTIONS = $0a;
- {$EXTERNALSYM BTH_ERROR_MAX_NUMBER_OF_SCO_CONNECTIONS}
- BTH_ERROR_ACL_CONNECTION_ALREADY_EXISTS = $0b;
- {$EXTERNALSYM BTH_ERROR_ACL_CONNECTION_ALREADY_EXISTS}
- BTH_ERROR_COMMAND_DISALLOWED = $0c;
- {$EXTERNALSYM BTH_ERROR_COMMAND_DISALLOWED}
- BTH_ERROR_HOST_REJECTED_LIMITED_RESOURCES = $0d;
- {$EXTERNALSYM BTH_ERROR_HOST_REJECTED_LIMITED_RESOURCES}
- BTH_ERROR_HOST_REJECTED_SECURITY_REASONS = $0e;
- {$EXTERNALSYM BTH_ERROR_HOST_REJECTED_SECURITY_REASONS}
- BTH_ERROR_HOST_REJECTED_PERSONAL_DEVICE = $0;
- {$EXTERNALSYM BTH_ERROR_HOST_REJECTED_PERSONAL_DEVICE}
- BTH_ERROR_HOST_TIMEOUT = $10;
- {$EXTERNALSYM BTH_ERROR_HOST_TIMEOUT}
- BTH_ERROR_UNSUPPORTED_FEATURE_OR_PARAMETER = $11;
- {$EXTERNALSYM BTH_ERROR_UNSUPPORTED_FEATURE_OR_PARAMETER}
- BTH_ERROR_INVALID_HCI_PARAMETER = $12;
- {$EXTERNALSYM BTH_ERROR_INVALID_HCI_PARAMETER}
- BTH_ERROR_REMOTE_USER_ENDED_CONNECTION = $13;
- {$EXTERNALSYM BTH_ERROR_REMOTE_USER_ENDED_CONNECTION}
- BTH_ERROR_REMOTE_LOW_RESOURCES = $14;
- {$EXTERNALSYM BTH_ERROR_REMOTE_LOW_RESOURCES}
- BTH_ERROR_REMOTE_POWERING_OFF = $15;
- {$EXTERNALSYM BTH_ERROR_REMOTE_POWERING_OFF}
- BTH_ERROR_LOCAL_HOST_TERMINATED_CONNECTION = $16;
- {$EXTERNALSYM BTH_ERROR_LOCAL_HOST_TERMINATED_CONNECTION}
- BTH_ERROR_REPEATED_ATTEMPTS = $17;
- {$EXTERNALSYM BTH_ERROR_REPEATED_ATTEMPTS}
- BTH_ERROR_PAIRING_NOT_ALLOWED = $18;
- {$EXTERNALSYM BTH_ERROR_PAIRING_NOT_ALLOWED}
- BTH_ERROR_UKNOWN_LMP_PDU = $19;
- {$EXTERNALSYM BTH_ERROR_UKNOWN_LMP_PDU}
- BTH_ERROR_UNSUPPORTED_REMOTE_FEATURE = $1a;
- {$EXTERNALSYM BTH_ERROR_UNSUPPORTED_REMOTE_FEATURE}
- BTH_ERROR_SCO_OFFSET_REJECTED = $1b;
- {$EXTERNALSYM BTH_ERROR_SCO_OFFSET_REJECTED}
- BTH_ERROR_SCO_INTERVAL_REJECTED = $1c;
- {$EXTERNALSYM BTH_ERROR_SCO_INTERVAL_REJECTED}
- BTH_ERROR_SCO_AIRMODE_REJECTED = $1d;
- {$EXTERNALSYM BTH_ERROR_SCO_AIRMODE_REJECTED}
- BTH_ERROR_INVALID_LMP_PARAMETERS = $1e;
- {$EXTERNALSYM BTH_ERROR_INVALID_LMP_PARAMETERS}
- BTH_ERROR_UNSPECIFIED_ERROR = $1;
- {$EXTERNALSYM BTH_ERROR_UNSPECIFIED_ERROR}
- BTH_ERROR_UNSUPPORTED_LMP_PARM_VALUE = $20;
- {$EXTERNALSYM BTH_ERROR_UNSUPPORTED_LMP_PARM_VALUE}
- BTH_ERROR_ROLE_CHANGE_NOT_ALLOWED = $21;
- {$EXTERNALSYM BTH_ERROR_ROLE_CHANGE_NOT_ALLOWED}
- BTH_ERROR_LMP_RESPONSE_TIMEOUT = $22;
- {$EXTERNALSYM BTH_ERROR_LMP_RESPONSE_TIMEOUT}
- BTH_ERROR_LMP_TRANSACTION_COLLISION = $23;
- {$EXTERNALSYM BTH_ERROR_LMP_TRANSACTION_COLLISION}
- BTH_ERROR_LMP_PDU_NOT_ALLOWED = $24;
- {$EXTERNALSYM BTH_ERROR_LMP_PDU_NOT_ALLOWED}
- BTH_ERROR_ENCRYPTION_MODE_NOT_ACCEPTABLE = $25;
- {$EXTERNALSYM BTH_ERROR_ENCRYPTION_MODE_NOT_ACCEPTABLE}
- BTH_ERROR_UNIT_KEY_NOT_USED = $26;
- {$EXTERNALSYM BTH_ERROR_UNIT_KEY_NOT_USED}
- BTH_ERROR_QOS_IS_NOT_SUPPORTED = $27;
- {$EXTERNALSYM BTH_ERROR_QOS_IS_NOT_SUPPORTED}
- BTH_ERROR_INSTANT_PASSED = $28;
- {$EXTERNALSYM BTH_ERROR_INSTANT_PASSED}
- BTH_ERROR_PAIRING_WITH_UNIT_KEY_NOT_SUPPORTED = $29;
- {$EXTERNALSYM BTH_ERROR_PAIRING_WITH_UNIT_KEY_NOT_SUPPORTED}
-
- BTH_ERROR_UNSPECIFIED = $FF;
- {$EXTERNALSYM BTH_ERROR_UNSPECIFIED}
-
-//
-// Min, max, and default L2cap MTU.
-//
-
-const
- L2CAP_MIN_MTU = 48;
- {$EXTERNALSYM L2CAP_MIN_MTU}
- L2CAP_MAX_MTU = $FFFF;
- {$EXTERNALSYM L2CAP_MAX_MTU}
- L2CAP_DEFAULT_MTU = 672;
- {$EXTERNALSYM L2CAP_DEFAULT_MTU}
-
-//
-// Max l2cap signal size (48) - size of signal header (4)
-//
-
-const
- MAX_L2CAP_PING_DATA_LENGTH = 44;
- {$EXTERNALSYM MAX_L2CAP_PING_DATA_LENGTH}
- MAX_L2CAP_INFO_DATA_LENGTH = 44;
- {$EXTERNALSYM MAX_L2CAP_INFO_DATA_LENGTH}
-
-//
-// the following two structures provides information about
-// disocvered remote radios.
-//
-
-const
- BDIF_ADDRESS = $00000001;
- {$EXTERNALSYM BDIF_ADDRESS}
- BDIF_COD = $00000002;
- {$EXTERNALSYM BDIF_COD}
- BDIF_NAME = $00000004;
- {$EXTERNALSYM BDIF_NAME}
- BDIF_PAIRED = $00000008;
- {$EXTERNALSYM BDIF_PAIRED}
- BDIF_PERSONAL = $00000010;
- {$EXTERNALSYM BDIF_PERSONAL}
- BDIF_CONNECTED = $00000020;
- {$EXTERNALSYM BDIF_CONNECTED}
-
-const
- BDIF_VALID_FLAGS = BDIF_CONNECTED or BDIF_ADDRESS or BDIF_COD or BDIF_NAME or BDIF_PAIRED or BDIF_PERSONAL;
- {$EXTERNALSYM BDIF_VALID_FLAGS}
-
-type
- _BTH_DEVICE_INFO = record
-
- //
- // Combination BDIF_Xxx flags
- //
- flags: ULONG;
-
- //
- // Address of remote device.
- //
- address: BTH_ADDR;
-
- //
- // Class Of Device.
- //
- classOfDevice: BTH_COD;
-
- //
- // name of the device
- //
- name: array [0..BTH_MAX_NAME_SIZE - 1] of CHAR;
- end;
- {$EXTERNALSYM _BTH_DEVICE_INFO}
- BTH_DEVICE_INFO = _BTH_DEVICE_INFO;
- {$EXTERNALSYM BTH_DEVICE_INFO}
- PBTH_DEVICE_INFO = ^BTH_DEVICE_INFO;
- {$EXTERNALSYM PBTH_DEVICE_INFO}
- TBthDeviceInfo = BTH_DEVICE_INFO;
- PBthDeviceInfo = PBTH_DEVICE_INFO;
-
-//
-// Buffer associated with GUID_BLUETOOTH_RADIO_IN_RANGE
-//
-
-type
- _BTH_RADIO_IN_RANGE = record
- //
- // Information about the remote radio
- //
- deviceInfo: BTH_DEVICE_INFO;
- //
- // The previous flags value for the BTH_DEVICE_INFO. The receiver of this
- // notification can compare the deviceInfo.flags and previousDeviceFlags
- // to determine what has changed about this remote radio.
- //
- // For instance, if BDIF_NAME is set in deviceInfo.flags and not in
- // previousDeviceFlags, the remote radio's has just been retrieved.
- //
- previousDeviceFlags: ULONG;
- end;
- {$EXTERNALSYM _BTH_RADIO_IN_RANGE}
- BTH_RADIO_IN_RANGE = _BTH_RADIO_IN_RANGE;
- {$EXTERNALSYM BTH_RADIO_IN_RANGE}
- PBTH_RADIO_IN_RANGE = ^BTH_RADIO_IN_RANGE;
- {$EXTERNALSYM PBTH_RADIO_IN_RANGE}
- TBthRadioInRange = BTH_RADIO_IN_RANGE;
- PBthRadioInRange = PBTH_RADIO_IN_RANGE;
-
-//
-// Buffer associated with GUID_BLUETOOTH_L2CAP_EVENT
-//
-
- _BTH_L2CAP_EVENT_INFO = record
- //
- // Remote radio address which the L2CAP event is associated with
- //
- bthAddress: BTH_ADDR;
-
- //
- // The PSM that is either being connected to or disconnected from
- //
- psm: Word;
-
- //
- // If != 0, then the channel has just been established. If == 0, then the
- // channel has been destroyed. Notifications for a destroyed channel will
- // only be sent for channels successfully established.
- //
- connected: UCHAR;
-
- //
- // If != 0, then the local host iniated the l2cap connection. If == 0, then
- // the remote host initated the connection. This field is only valid if
- // connect is != 0.
- //
- initiated: UCHAR;
- end;
- {$EXTERNALSYM _BTH_L2CAP_EVENT_INFO}
- BTH_L2CAP_EVENT_INFO = _BTH_L2CAP_EVENT_INFO;
- {$EXTERNALSYM BTH_L2CAP_EVENT_INFO}
- PBTH_L2CAP_EVENT_INFO = ^BTH_L2CAP_EVENT_INFO;
- {$EXTERNALSYM PBTH_L2CAP_EVENT_INFO}
- TBthL2CapEventInfo = BTH_L2CAP_EVENT_INFO;
- PBthL2CapEventInfo = PBTH_L2CAP_EVENT_INFO;
-
-const
- HCI_CONNNECTION_TYPE_ACL = 1;
- {$EXTERNALSYM HCI_CONNNECTION_TYPE_ACL}
- HCI_CONNNECTION_TYPE_SCO = 2;
- {$EXTERNALSYM HCI_CONNNECTION_TYPE_SCO}
-
-//
-// Buffer associated with GUID_BLUETOOTH_HCI_EVENT
-//
-
-type
- _BTH_HCI_EVENT_INFO = record
- //
- // Remote radio address which the HCI event is associated with
- //
- bthAddress: BTH_ADDR;
-
- //
- // HCI_CONNNECTION_TYPE_XXX value
- //
- connectionType: UCHAR;
-
- //
- // If != 0, then the underlying connection to the remote radio has just
- // been estrablished. If == 0, then the underlying conneciton has just been
- // destroyed.
- //
- connected: UCHAR;
- end;
- {$EXTERNALSYM _BTH_HCI_EVENT_INFO}
- BTH_HCI_EVENT_INFO = _BTH_HCI_EVENT_INFO;
- {$EXTERNALSYM BTH_HCI_EVENT_INFO}
- PBTH_HCI_EVENT_INFO = ^BTH_HCI_EVENT_INFO;
- {$EXTERNALSYM PBTH_HCI_EVENT_INFO}
- TBthHciEventInfo = BTH_HCI_EVENT_INFO;
- PBthHciEventInfo = PBTH_HCI_EVENT_INFO;
-
-const
- MAX_UUIDS_IN_QUERY = 12;
- {$EXTERNALSYM MAX_UUIDS_IN_QUERY}
-
- BTH_VID_DEFAULT_VALUE = $FFFF;
- {$EXTERNALSYM BTH_VID_DEFAULT_VALUE}
-
- SDP_ERROR_INVALID_SDP_VERSION = $0001;
- {$EXTERNALSYM SDP_ERROR_INVALID_SDP_VERSION}
- SDP_ERROR_INVALID_RECORD_HANDLE = $0002;
- {$EXTERNALSYM SDP_ERROR_INVALID_RECORD_HANDLE}
- SDP_ERROR_INVALID_REQUEST_SYNTAX = $0003;
- {$EXTERNALSYM SDP_ERROR_INVALID_REQUEST_SYNTAX}
- SDP_ERROR_INVALID_PDU_SIZE = $0004;
- {$EXTERNALSYM SDP_ERROR_INVALID_PDU_SIZE}
- SDP_ERROR_INVALID_CONTINUATION_STATE = $0005;
- {$EXTERNALSYM SDP_ERROR_INVALID_CONTINUATION_STATE}
- SDP_ERROR_INSUFFICIENT_RESOURCES = $0006;
- {$EXTERNALSYM SDP_ERROR_INSUFFICIENT_RESOURCES}
-
-//
-// Defined by windows to handle server errors that are not described by the
-// above errors. Start at 0x0100 so we don't go anywhere near the spec
-// defined values.
-//
-
-//
-// Success, nothing went wrong
-//
-
-const
- SDP_ERROR_SUCCESS = SDP_ERROR($0000);
- {$EXTERNALSYM SDP_ERROR_SUCCESS}
-
-//
-// The SDP PDU or parameters other than the SDP stream response was not correct
-//
-
- SDP_ERROR_SERVER_INVALID_RESPONSE = SDP_ERROR($0100);
- {$EXTERNALSYM SDP_ERROR_SERVER_INVALID_RESPONSE}
-
-///
-/// The SDP response stream did not parse correctly.
-///
-
- SDP_ERROR_SERVER_RESPONSE_DID_NOT_PARSE = SDP_ERROR($0200);
- {$EXTERNALSYM SDP_ERROR_SERVER_RESPONSE_DID_NOT_PARSE}
-
-///
-/// The SDP response stream was successfully parsed, but did not match the
-/// required format for the query.
-///
-
- SDP_ERROR_SERVER_BAD_FORMAT = SDP_ERROR($0300);
- {$EXTERNALSYM SDP_ERROR_SERVER_BAD_FORMAT}
-
-///
-/// SDP was unable to send a continued query back to the server
-///
-
- SDP_ERROR_COULD_NOT_SEND_CONTINUE = SDP_ERROR($0400);
- {$EXTERNALSYM SDP_ERROR_COULD_NOT_SEND_CONTINUE}
-
-///
-/// Server sent a response that was too large to fit in the caller's buffer.
-///
-
- SDP_ERROR_RESPONSE_TOO_LARGE = SDP_ERROR($0500);
- {$EXTERNALSYM SDP_ERROR_RESPONSE_TOO_LARGE}
-
- SDP_ATTRIB_RECORD_HANDLE = $0000;
- {$EXTERNALSYM SDP_ATTRIB_RECORD_HANDLE}
- SDP_ATTRIB_CLASS_ID_LIST = $0001;
- {$EXTERNALSYM SDP_ATTRIB_CLASS_ID_LIST}
- SDP_ATTRIB_RECORD_STATE = $0002;
- {$EXTERNALSYM SDP_ATTRIB_RECORD_STATE}
- SDP_ATTRIB_SERVICE_ID = $0003;
- {$EXTERNALSYM SDP_ATTRIB_SERVICE_ID}
- SDP_ATTRIB_PROTOCOL_DESCRIPTOR_LIST = $0004;
- {$EXTERNALSYM SDP_ATTRIB_PROTOCOL_DESCRIPTOR_LIST}
- SDP_ATTRIB_BROWSE_GROUP_LIST = $0005;
- {$EXTERNALSYM SDP_ATTRIB_BROWSE_GROUP_LIST}
- SDP_ATTRIB_LANG_BASE_ATTRIB_ID_LIST = $0006;
- {$EXTERNALSYM SDP_ATTRIB_LANG_BASE_ATTRIB_ID_LIST}
- SDP_ATTRIB_INFO_TIME_TO_LIVE = $0007;
- {$EXTERNALSYM SDP_ATTRIB_INFO_TIME_TO_LIVE}
- SDP_ATTRIB_AVAILABILITY = $0008;
- {$EXTERNALSYM SDP_ATTRIB_AVAILABILITY}
- SDP_ATTRIB_PROFILE_DESCRIPTOR_LIST = $0009;
- {$EXTERNALSYM SDP_ATTRIB_PROFILE_DESCRIPTOR_LIST}
- SDP_ATTRIB_DOCUMENTATION_URL = $000A;
- {$EXTERNALSYM SDP_ATTRIB_DOCUMENTATION_URL}
- SDP_ATTRIB_CLIENT_EXECUTABLE_URL = $000B;
- {$EXTERNALSYM SDP_ATTRIB_CLIENT_EXECUTABLE_URL}
- SDP_ATTRIB_ICON_URL = $000C;
- {$EXTERNALSYM SDP_ATTRIB_ICON_URL}
- SDP_ATTRIB_ADDITIONAL_PROTOCOL_DESCRIPTOR_LIST = $000D;
- {$EXTERNALSYM SDP_ATTRIB_ADDITIONAL_PROTOCOL_DESCRIPTOR_LIST}
-
-//
-// Attribute IDs in the range of 0x000D - 0x01FF are reserved for future use
-//
-
-const
- SDP_ATTRIB_PROFILE_SPECIFIC = $0200;
- {$EXTERNALSYM SDP_ATTRIB_PROFILE_SPECIFIC}
-
- LANG_BASE_LANGUAGE_INDEX = $0000;
- {$EXTERNALSYM LANG_BASE_LANGUAGE_INDEX}
- LANG_BASE_ENCODING_INDEX = $0001;
- {$EXTERNALSYM LANG_BASE_ENCODING_INDEX}
- LANG_BASE_OFFSET_INDEX = $0002;
- {$EXTERNALSYM LANG_BASE_OFFSET_INDEX}
- LANG_DEFAULT_ID = $0100;
- {$EXTERNALSYM LANG_DEFAULT_ID}
-
- STRING_NAME_OFFSET = $0000;
- {$EXTERNALSYM STRING_NAME_OFFSET}
- STRING_DESCRIPTION_OFFSET = $0001;
- {$EXTERNALSYM STRING_DESCRIPTION_OFFSET}
- STRING_PROVIDER_NAME_OFFSET = $0002;
- {$EXTERNALSYM STRING_PROVIDER_NAME_OFFSET}
-
- SDP_ATTRIB_SDP_VERSION_NUMBER_LIST = $0200;
- {$EXTERNALSYM SDP_ATTRIB_SDP_VERSION_NUMBER_LIST}
- SDP_ATTRIB_SDP_DATABASE_STATE = $0201;
- {$EXTERNALSYM SDP_ATTRIB_SDP_DATABASE_STATE}
-
- SDP_ATTRIB_BROWSE_GROUP_ID = $0200;
- {$EXTERNALSYM SDP_ATTRIB_BROWSE_GROUP_ID}
-
- SDP_ATTRIB_CORDLESS_EXTERNAL_NETWORK = $0301;
- {$EXTERNALSYM SDP_ATTRIB_CORDLESS_EXTERNAL_NETWORK}
-
- SDP_ATTRIB_FAX_CLASS_1_SUPPORT = $0302;
- {$EXTERNALSYM SDP_ATTRIB_FAX_CLASS_1_SUPPORT}
- SDP_ATTRIB_FAX_CLASS_2_0_SUPPORT = $0303;
- {$EXTERNALSYM SDP_ATTRIB_FAX_CLASS_2_0_SUPPORT}
- SDP_ATTRIB_FAX_CLASS_2_SUPPORT = $0304;
- {$EXTERNALSYM SDP_ATTRIB_FAX_CLASS_2_SUPPORT}
- SDP_ATTRIB_FAX_AUDIO_FEEDBACK_SUPPORT = $0305;
- {$EXTERNALSYM SDP_ATTRIB_FAX_AUDIO_FEEDBACK_SUPPORT}
-
- SDP_ATTRIB_HEADSET_REMOTE_AUDIO_VOLUME_CONTROL = $0302;
- {$EXTERNALSYM SDP_ATTRIB_HEADSET_REMOTE_AUDIO_VOLUME_CONTROL}
-
- SDP_ATTRIB_LAN_LPSUBNET = $0200;
- {$EXTERNALSYM SDP_ATTRIB_LAN_LPSUBNET}
-
- SDP_ATTRIB_OBJECT_PUSH_SUPPORTED_FORMATS_LIST = $0303;
- {$EXTERNALSYM SDP_ATTRIB_OBJECT_PUSH_SUPPORTED_FORMATS_LIST}
-
- SDP_ATTRIB_SYNCH_SUPPORTED_DATA_STORES_LIST = $0301;
- {$EXTERNALSYM SDP_ATTRIB_SYNCH_SUPPORTED_DATA_STORES_LIST}
-
-// this is in the assigned numbers doc, but it does not show up in any profile
-
-const
- SDP_ATTRIB_SERVICE_VERSION = $0300;
- {$EXTERNALSYM SDP_ATTRIB_SERVICE_VERSION}
-
- SDP_ATTRIB_PAN_NETWORK_ADDRESS = $0306;
- {$EXTERNALSYM SDP_ATTRIB_PAN_NETWORK_ADDRESS}
- SDP_ATTRIB_PAN_WAP_GATEWAY = $0307;
- {$EXTERNALSYM SDP_ATTRIB_PAN_WAP_GATEWAY}
- SDP_ATTRIB_PAN_HOME_PAGE_URL = $0308;
- {$EXTERNALSYM SDP_ATTRIB_PAN_HOME_PAGE_URL}
- SDP_ATTRIB_PAN_WAP_STACK_TYPE = $0309;
- {$EXTERNALSYM SDP_ATTRIB_PAN_WAP_STACK_TYPE}
- SDP_ATTRIB_PAN_SECURITY_DESCRIPTION = $030A;
- {$EXTERNALSYM SDP_ATTRIB_PAN_SECURITY_DESCRIPTION}
- SDP_ATTRIB_PAN_NET_ACCESS_TYPE = $030B;
- {$EXTERNALSYM SDP_ATTRIB_PAN_NET_ACCESS_TYPE}
- SDP_ATTRIB_PAN_MAX_NET_ACCESS_RATE = $030C;
- {$EXTERNALSYM SDP_ATTRIB_PAN_MAX_NET_ACCESS_RATE}
-
- SDP_ATTRIB_IMAGING_SUPPORTED_CAPABILITIES = $0310;
- {$EXTERNALSYM SDP_ATTRIB_IMAGING_SUPPORTED_CAPABILITIES}
- SDP_ATTRIB_IMAGING_SUPPORTED_FEATURES = $0311;
- {$EXTERNALSYM SDP_ATTRIB_IMAGING_SUPPORTED_FEATURES}
- SDP_ATTRIB_IMAGING_SUPPORTED_FUNCTIONS = $0312;
- {$EXTERNALSYM SDP_ATTRIB_IMAGING_SUPPORTED_FUNCTIONS}
- SDP_ATTRIB_IMAGING_TOTAL_DATA_CAPACITY = $0313;
- {$EXTERNALSYM SDP_ATTRIB_IMAGING_TOTAL_DATA_CAPACITY}
-
- SDP_ATTRIB_DI_SPECIFICATION_ID = $0200;
- {$EXTERNALSYM SDP_ATTRIB_DI_SPECIFICATION_ID}
- SDP_ATTRIB_DI_VENDOR_ID = $0201;
- {$EXTERNALSYM SDP_ATTRIB_DI_VENDOR_ID}
- SDP_ATTRIB_DI_PRODUCT_ID = $0202;
- {$EXTERNALSYM SDP_ATTRIB_DI_PRODUCT_ID}
- SDP_ATTRIB_DI_VERSION = $0203;
- {$EXTERNALSYM SDP_ATTRIB_DI_VERSION}
- SDP_ATTRIB_DI_PRIMARY_RECORD = $0204;
- {$EXTERNALSYM SDP_ATTRIB_DI_PRIMARY_RECORD}
- SDP_ATTRIB_DI_VENDOR_ID_SOURCE = $0205;
- {$EXTERNALSYM SDP_ATTRIB_DI_VENDOR_ID_SOURCE}
-
- SDP_ATTRIB_HID_DEVICE_RELEASE_NUMBER = $0200;
- {$EXTERNALSYM SDP_ATTRIB_HID_DEVICE_RELEASE_NUMBER}
- SDP_ATTRIB_HID_PARSER_VERSION = $0201;
- {$EXTERNALSYM SDP_ATTRIB_HID_PARSER_VERSION}
- SDP_ATTRIB_HID_DEVICE_SUBCLASS = $0202;
- {$EXTERNALSYM SDP_ATTRIB_HID_DEVICE_SUBCLASS}
- SDP_ATTRIB_HID_COUNTRY_CODE = $0203;
- {$EXTERNALSYM SDP_ATTRIB_HID_COUNTRY_CODE}
- SDP_ATTRIB_HID_VIRTUAL_CABLE = $0204;
- {$EXTERNALSYM SDP_ATTRIB_HID_VIRTUAL_CABLE}
- SDP_ATTRIB_HID_RECONNECT_INITIATE = $0205;
- {$EXTERNALSYM SDP_ATTRIB_HID_RECONNECT_INITIATE}
- SDP_ATTRIB_HID_DESCRIPTOR_LIST = $0206;
- {$EXTERNALSYM SDP_ATTRIB_HID_DESCRIPTOR_LIST}
- SDP_ATTRIB_HID_LANG_ID_BASE_LIST = $0207;
- {$EXTERNALSYM SDP_ATTRIB_HID_LANG_ID_BASE_LIST}
- SDP_ATTRIB_HID_SDP_DISABLE = $0208;
- {$EXTERNALSYM SDP_ATTRIB_HID_SDP_DISABLE}
- SDP_ATTRIB_HID_BATTERY_POWER = $0209;
- {$EXTERNALSYM SDP_ATTRIB_HID_BATTERY_POWER}
- SDP_ATTRIB_HID_REMOTE_WAKE = $020A;
- {$EXTERNALSYM SDP_ATTRIB_HID_REMOTE_WAKE}
- SDP_ATTRIB_HID_REPORT_LIST = $020B;
- {$EXTERNALSYM SDP_ATTRIB_HID_REPORT_LIST}
- SDP_ATTRIB_HID_SUPERVISION_TIMEOUT = $020C;
- {$EXTERNALSYM SDP_ATTRIB_HID_SUPERVISION_TIMEOUT}
- SDP_ATTRIB_HID_NORMALLY_CONNECTABLE = $020D;
- {$EXTERNALSYM SDP_ATTRIB_HID_NORMALLY_CONNECTABLE}
- SDP_ATTRIB_HID_BOOT_DEVICE = $020E;
- {$EXTERNALSYM SDP_ATTRIB_HID_BOOT_DEVICE}
-
-//
-// Profile specific values
-//
-
- CORDLESS_EXTERNAL_NETWORK_PSTN = $01;
- {$EXTERNALSYM CORDLESS_EXTERNAL_NETWORK_PSTN}
- CORDLESS_EXTERNAL_NETWORK_ISDN = $02;
- {$EXTERNALSYM CORDLESS_EXTERNAL_NETWORK_ISDN}
- CORDLESS_EXTERNAL_NETWORK_GSM = $03;
- {$EXTERNALSYM CORDLESS_EXTERNAL_NETWORK_GSM}
- CORDLESS_EXTERNAL_NETWORK_CDMA = $04;
- {$EXTERNALSYM CORDLESS_EXTERNAL_NETWORK_CDMA}
- CORDLESS_EXTERNAL_NETWORK_ANALOG_CELLULAR = $05;
- {$EXTERNALSYM CORDLESS_EXTERNAL_NETWORK_ANALOG_CELLULAR}
- CORDLESS_EXTERNAL_NETWORK_PACKET_SWITCHED = $06;
- {$EXTERNALSYM CORDLESS_EXTERNAL_NETWORK_PACKET_SWITCHED}
- CORDLESS_EXTERNAL_NETWORK_OTHER = $07;
- {$EXTERNALSYM CORDLESS_EXTERNAL_NETWORK_OTHER}
-
- OBJECT_PUSH_FORMAT_VCARD_2_1 = $01;
- {$EXTERNALSYM OBJECT_PUSH_FORMAT_VCARD_2_1}
- OBJECT_PUSH_FORMAT_VCARD_3_0 = $02;
- {$EXTERNALSYM OBJECT_PUSH_FORMAT_VCARD_3_0}
- OBJECT_PUSH_FORMAT_VCAL_1_0 = $03;
- {$EXTERNALSYM OBJECT_PUSH_FORMAT_VCAL_1_0}
- OBJECT_PUSH_FORMAT_ICAL_2_0 = $04;
- {$EXTERNALSYM OBJECT_PUSH_FORMAT_ICAL_2_0}
- OBJECT_PUSH_FORMAT_VNOTE = $05;
- {$EXTERNALSYM OBJECT_PUSH_FORMAT_VNOTE}
- OBJECT_PUSH_FORMAT_VMESSAGE = $06;
- {$EXTERNALSYM OBJECT_PUSH_FORMAT_VMESSAGE}
- OBJECT_PUSH_FORMAT_ANY = $FF;
- {$EXTERNALSYM OBJECT_PUSH_FORMAT_ANY}
-
- SYNCH_DATA_STORE_PHONEBOOK = $01;
- {$EXTERNALSYM SYNCH_DATA_STORE_PHONEBOOK}
- SYNCH_DATA_STORE_CALENDAR = $03;
- {$EXTERNALSYM SYNCH_DATA_STORE_CALENDAR}
- SYNCH_DATA_STORE_NOTES = $05;
- {$EXTERNALSYM SYNCH_DATA_STORE_NOTES}
- SYNCH_DATA_STORE_MESSAGES = $06;
- {$EXTERNALSYM SYNCH_DATA_STORE_MESSAGES}
-
- DI_VENDOR_ID_SOURCE_BLUETOOTH_SIG = $0001;
- {$EXTERNALSYM DI_VENDOR_ID_SOURCE_BLUETOOTH_SIG}
- DI_VENDOR_ID_SOURCE_USB_IF = $0002;
- {$EXTERNALSYM DI_VENDOR_ID_SOURCE_USB_IF}
-
- PSM_SDP = $0001;
- {$EXTERNALSYM PSM_SDP}
- PSM_RFCOMM = $0003;
- {$EXTERNALSYM PSM_RFCOMM}
- PSM_TCS_BIN = $0005;
- {$EXTERNALSYM PSM_TCS_BIN}
- PSM_TCS_BIN_CORDLESS = $0007;
- {$EXTERNALSYM PSM_TCS_BIN_CORDLESS}
- PSM_BNEP = $000;
- {$EXTERNALSYM PSM_BNEP}
- PSM_HID_CONTROL = $0011;
- {$EXTERNALSYM PSM_HID_CONTROL}
- PSM_HID_INTERRUPT = $0013;
- {$EXTERNALSYM PSM_HID_INTERRUPT}
- PSM_AVCTP = $0017;
- {$EXTERNALSYM PSM_AVCTP}
- PSM_AVDTP = $0019;
- {$EXTERNALSYM PSM_AVDTP}
- PSM_UDI_C_PLANE = $001D;
- {$EXTERNALSYM PSM_UDI_C_PLANE}
-
-//
-// Strings
-//
-
-const
- STR_ADDR_FMTA = '(%02x:%02x:%02x:%02x:%02x:%02x)';
- {$EXTERNALSYM STR_ADDR_FMTA}
- STR_ADDR_FMTW = '(%02x:%02x:%02x:%02x:%02x:%02x)';
- {$EXTERNALSYM STR_ADDR_FMTW}
-
- STR_ADDR_SHORT_FMTA = '%04x%08x';
- {$EXTERNALSYM STR_ADDR_SHORT_FMTA}
- STR_ADDR_SHORT_FMTW = '%04x%08x';
- {$EXTERNALSYM STR_ADDR_SHORT_FMTW}
-
-{$IFDEF UNICODE}
- STR_ADDR_FMT = STR_ADDR_FMTW;
- {$EXTERNALSYM STR_ADDR_FMT}
- STR_ADDR_SHORT_FMT = STR_ADDR_SHORT_FMTW;
- {$EXTERNALSYM STR_ADDR_SHORT_FMT}
-{$ELSE}
- STR_ADDR_FMT = STR_ADDR_FMTA;
- {$EXTERNALSYM STR_ADDR_FMT}
- STR_ADDR_SHORT_FMT = STR_ADDR_SHORT_FMTA;
- {$EXTERNALSYM STR_ADDR_SHORT_FMT}
-{$ENDIF UNICODE}
-
-function GET_BITS(Field, Offset, Mask: Integer): Integer;
-{$EXTERNALSYM GET_BITS}
-function GET_BIT(Field, Offset: Integer): Integer;
-{$EXTERNALSYM GET_BIT}
-
-function LMP_3_SLOT_PACKETS(X: Integer): Integer;
-{$EXTERNALSYM LMP_3_SLOT_PACKETS}
-function LMP_5_SLOT_PACKETS(X: Integer): Integer;
-{$EXTERNALSYM LMP_5_SLOT_PACKETS}
-function LMP_ENCRYPTION(X: Integer): Integer;
-{$EXTERNALSYM LMP_ENCRYPTION}
-function LMP_SLOT_OFFSET(X: Integer): Integer;
-{$EXTERNALSYM LMP_SLOT_OFFSET}
-function LMP_TIMING_ACCURACY(X: Integer): Integer;
-{$EXTERNALSYM LMP_TIMING_ACCURACY}
-function LMP_SWITCH(X: Integer): Integer;
-{$EXTERNALSYM LMP_SWITCH}
-function LMP_HOLD_MODE(X: Integer): Integer;
-{$EXTERNALSYM LMP_HOLD_MODE}
-function LMP_SNIFF_MODE(X: Integer): Integer;
-{$EXTERNALSYM LMP_SNIFF_MODE}
-function LMP_PARK_MODE(X: Integer): Integer;
-{$EXTERNALSYM LMP_PARK_MODE}
-function LMP_RSSI(X: Integer): Integer;
-{$EXTERNALSYM LMP_RSSI}
-function LMP_CHANNEL_QUALITY_DRIVEN_MODE(X: Integer): Integer;
-{$EXTERNALSYM LMP_CHANNEL_QUALITY_DRIVEN_MODE}
-function LMP_SCO_LINK(X: Integer): Integer;
-{$EXTERNALSYM LMP_SCO_LINK}
-function LMP_HV2_PACKETS(X: Integer): Integer;
-{$EXTERNALSYM LMP_HV2_PACKETS}
-function LMP_HV3_PACKETS(X: Integer): Integer;
-{$EXTERNALSYM LMP_HV3_PACKETS}
-function LMP_MU_LAW_LOG(X: Integer): Integer;
-{$EXTERNALSYM LMP_MU_LAW_LOG}
-function LMP_A_LAW_LOG(X: Integer): Integer;
-{$EXTERNALSYM LMP_A_LAW_LOG}
-function LMP_CVSD(X: Integer): Integer;
-{$EXTERNALSYM LMP_CVSD}
-function LMP_PAGING_SCHEME(X: Integer): Integer;
-{$EXTERNALSYM LMP_PAGING_SCHEME}
-function LMP_POWER_CONTROL(X: Integer): Integer;
-{$EXTERNALSYM LMP_POWER_CONTROL}
-function LMP_TRANSPARENT_SCO_DATA(X: Integer): Integer;
-{$EXTERNALSYM LMP_TRANSPARENT_SCO_DATA}
-function LMP_FLOW_CONTROL_LAG(X: Integer): Integer;
-{$EXTERNALSYM LMP_FLOW_CONTROL_LAG}
-
-implementation
-
-function GET_NAP(_bth_addr: BTH_ADDR): Word;
-begin
- Result := ((_bth_addr and NAP_MASK) shr NAP_BIT_OFFSET);
-end;
-
-function GET_SAP(_bth_addr: BTH_ADDR): ULONG;
-begin
- Result := ((_bth_addr and SAP_MASK) shr SAP_BIT_OFFSET);
-end;
-
-function SET_NAP(_nap: Word): Int64;
-begin
- Result := (_nap shl NAP_BIT_OFFSET);
-end;
-
-function SET_SAP(_sap: ULONG): Int64;
-begin
- Result := (_sap shl SAP_BIT_OFFSET);
-end;
-
-function SET_NAP_SAP(_nap, _sap: Word): Int64;
-begin
- Result := (SET_NAP(_nap) or SET_SAP(_sap));
-end;
-
-function GET_COD_LAN_MINOR(_cod: DWORD): DWORD;
-begin
- Result := ((_cod and COD_LAN_MINOR_MASK) shr COD_MINOR_BIT_OFFSET);
-end;
-
-function GET_COD_LAN_ACCESS(_cod: DWORD): DWORD;
-begin
- Result := ((_cod and COD_LAN_ACCESS_MASK) shr COD_LAN_ACCESS_BIT_OFFSET);
-end;
-
-function BTH_ERROR(_btStatus: BTHSTATUS): BOOL;
-begin
- Result := _btStatus <> BTH_ERROR_SUCCESS;
-end;
-
-function BTH_SUCCESS(_btStatus: BTHSTATUS): BOOL;
-begin
- Result := _btStatus = BTH_ERROR_SUCCESS;
-end;
-
-function GET_BITS(Field, Offset, Mask: Integer): Integer;
-begin
- Result := (Field shr Offset) and Mask;
-end;
-
-function GET_BIT(field,offset: Integer): Integer;
-begin
- Result := GET_BITS(Field, Offset, $1);
-end;
-
-function LMP_3_SLOT_PACKETS(X: Integer): Integer;
-begin
- Result := GET_BIT(x, 0);
-end;
-
-function LMP_5_SLOT_PACKETS(X: Integer): Integer;
-begin
- Result := GET_BIT(x, 1);
-end;
-
-function LMP_ENCRYPTION(X: Integer): Integer;
-begin
- Result := GET_BIT(x, 2);
-end;
-
-function LMP_SLOT_OFFSET(X: Integer): Integer;
-begin
- Result := GET_BIT(x, 3);
-end;
-
-function LMP_TIMING_ACCURACY(X: Integer): Integer;
-begin
- Result := GET_BIT(x, 4);
-end;
-
-function LMP_SWITCH(X: Integer): Integer;
-begin
- Result := GET_BIT(x, 5);
-end;
-
-function LMP_HOLD_MODE(X: Integer): Integer;
-begin
- Result := GET_BIT(x, 6);
-end;
-
-function LMP_SNIFF_MODE(X: Integer): Integer;
-begin
- Result := GET_BIT(x, 7);
-end;
-
-function LMP_PARK_MODE(X: Integer): Integer;
-begin
- Result := GET_BIT(x, 8);
-end;
-
-function LMP_RSSI(X: Integer): Integer;
-begin
- Result := GET_BIT(x, 9);
-end;
-
-function LMP_CHANNEL_QUALITY_DRIVEN_MODE(X: Integer): Integer;
-begin
- Result := GET_BIT(x, 10);
-end;
-
-function LMP_SCO_LINK(X: Integer): Integer;
-begin
- Result := GET_BIT(x, 11);
-end;
-
-function LMP_HV2_PACKETS(X: Integer): Integer;
-begin
- Result := GET_BIT(x, 12);
-end;
-
-function LMP_HV3_PACKETS(X: Integer): Integer;
-begin
- Result := GET_BIT(x, 13);
-end;
-
-function LMP_MU_LAW_LOG(X: Integer): Integer;
-begin
- Result := GET_BIT(x, 14);
-end;
-
-function LMP_A_LAW_LOG(X: Integer): Integer;
-begin
- Result := GET_BIT(x, 15);
-end;
-
-function LMP_CVSD(X: Integer): Integer;
-begin
- Result := GET_BIT(x, 16);
-end;
-
-function LMP_PAGING_SCHEME(X: Integer): Integer;
-begin
- Result := GET_BIT(x, 17);
-end;
-
-function LMP_POWER_CONTROL(X: Integer): Integer;
-begin
- Result := GET_BIT(x, 18);
-end;
-
-function LMP_TRANSPARENT_SCO_DATA(X: Integer): Integer;
-begin
- Result := GET_BIT(x, 19);
-end;
-
-function LMP_FLOW_CONTROL_LAG(X: Integer): Integer;
-begin
- Result := GET_BITS(x, 20, $3);
-end;
-
-function GET_COD_FORMAT(_cod: BTH_COD): BTH_COD;
-begin
- Result := (_cod and COD_FORMAT_MASK) shr COD_FORMAT_BIT_OFFSET;
-end;
-
-function GET_COD_MINOR(_cod: BTH_COD): BTH_COD;
-begin
- Result := (_cod and COD_MINOR_MASK) shr COD_MINOR_BIT_OFFSET;
-end;
-
-function GET_COD_MAJOR(_cod: BTH_COD): BTH_COD;
-begin
- Result := (_cod and COD_MAJOR_MASK) shr COD_MAJOR_BIT_OFFSET;
-end;
-
-function GET_COD_SERVICE(_cod: BTH_COD): BTH_COD;
-begin
- Result := (_cod and COD_SERVICE_MASK) shr COD_SERVICE_BIT_OFFSET;
-end;
-
-procedure SET_COD_MINOR(var _cod: BTH_COD; _minor: BTH_COD);
-begin
- _cod := (_cod and not COD_MINOR_MASK) or (_minor shl COD_MINOR_BIT_OFFSET);
-end;
-
-procedure SET_COD_MAJOR(var _cod: BTH_COD; _major: BTH_COD);
-begin
- _cod := (_cod and not COD_MAJOR_MASK) or (_major shl COD_MAJOR_BIT_OFFSET);
-end;
-
-procedure SET_COD_SERVICE(var _cod: BTH_COD; _service: BTH_COD);
-begin
- _cod := (_cod and not COD_SERVICE_MASK) or (_service shl COD_SERVICE_BIT_OFFSET);
-end;
-
-end.
+{******************************************************************************}
+{ }
+{ BlueTooth API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Contributors: John Penman }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwabthdef.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaBtHDef;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "bthdef.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaWinType, JwaBthSdpDef;
+
+const
+ GUID_BTHPORT_DEVICE_INTERFACE: TGUID = '{0850302A-B344-4FDA-9BE9-90576B8D46F0}';
+ {$EXTERNALSYM GUID_BTHPORT_DEVICE_INTERFACE}
+ GUID_BLUETOOTH_RADIO_IN_RANGE: TGUID = '{EA3B5B82-26EE-450E-B0D8-D26FE30A3869}';
+ {$EXTERNALSYM GUID_BLUETOOTH_RADIO_IN_RANGE}
+ GUID_BLUETOOTH_RADIO_OUT_OF_RANGE: TGUID = '{E28867C9-C2AA-4CED-B969-4570866037C4}';
+ {$EXTERNALSYM GUID_BLUETOOTH_RADIO_OUT_OF_RANGE}
+ GUID_BLUETOOTH_PIN_REQUEST: TGUID = '{BD198B7C-24AB-4B9A-8C0D-A8EA8349AA16}';
+ {$EXTERNALSYM GUID_BLUETOOTH_PIN_REQUEST}
+ GUID_BLUETOOTH_L2CAP_EVENT: TGUID = '{7EAE4030-B709-4AA8-AC55-E953829C9DAA}';
+ {$EXTERNALSYM GUID_BLUETOOTH_L2CAP_EVENT}
+ GUID_BLUETOOTH_HCI_EVENT: TGUID = '{FC240062-1541-49BE-B463-84C4DCD7BF7F}';
+ {$EXTERNALSYM GUID_BLUETOOTH_HCI_EVENT}
+
+//
+// Bluetooth base UUID for service discovery
+//
+
+ BLUETOOTH_BASE_UUID = '{00000000-0000-1000-8000-00805F9B34FB}';
+ {$EXTERNALSYM BLUETOOTH_BASE_UUID}
+
+//
+// UUID for the root of the browse group list
+//
+
+ SDP_PROTOCOL_UUID: TGUID = '{00000001-0000-1000-8000-00805F9B34FB}';
+ {$EXTERNALSYM SDP_PROTOCOL_UUID}
+ UDP_PROTOCOL_UUID: TGUID = '{00000002-0000-1000-8000-00805F9B34FB}';
+ {$EXTERNALSYM UDP_PROTOCOL_UUID}
+ RFCOMM_PROTOCOL_UUID: TGUID = '{00000003-0000-1000-8000-00805F9B34FB}';
+ {$EXTERNALSYM RFCOMM_PROTOCOL_UUID}
+ TCP_PROTOCOL_UUID: TGUID = '{00000004-0000-1000-8000-00805F9B34FB}';
+ {$EXTERNALSYM TCP_PROTOCOL_UUID}
+ TCSBIN_PROTOCOL_UUID: TGUID = '{00000005-0000-1000-8000-00805F9B34FB}';
+ {$EXTERNALSYM TCSBIN_PROTOCOL_UUID}
+ TCSAT_PROTOCOL_UUID: TGUID = '{00000006-0000-1000-8000-00805F9B34FB}';
+ {$EXTERNALSYM TCSAT_PROTOCOL_UUID}
+ OBEX_PROTOCOL_UUID: TGUID = '{00000008-0000-1000-8000-00805F9B34FB}';
+ {$EXTERNALSYM OBEX_PROTOCOL_UUID}
+ IP_PROTOCOL_UUID: TGUID = '{00000009-0000-1000-8000-00805F9B34FB}';
+ {$EXTERNALSYM IP_PROTOCOL_UUID}
+ FTP_PROTOCOL_UUID: TGUID = '{0000000A-0000-1000-8000-00805F9B34FB}';
+ {$EXTERNALSYM FTP_PROTOCOL_UUID}
+ HTTP_PROTOCOL_UUID: TGUID = '{0000000C-0000-1000-8000-00805F9B34FB}';
+ {$EXTERNALSYM HTTP_PROTOCOL_UUID}
+ WSP_PROTOCOL_UUID: TGUID = '{0000000E-0000-1000-8000-00805F9B34FB}';
+ {$EXTERNALSYM WSP_PROTOCOL_UUID}
+ BNEP_PROTOCOL_UUID: TGUID = '{0000000F-0000-1000-8000-00805F9B34FB}';
+ {$EXTERNALSYM BNEP_PROTOCOL_UUID}
+ UPNP_PROTOCOL_UUID: TGUID = '{00000010-0000-1000-8000-00805F9B34FB}';
+ {$EXTERNALSYM UPNP_PROTOCOL_UUID}
+ HID_PROTOCOL_UUID: TGUID = '{00000011-0000-1000-8000-00805F9B34FB}';
+ {$EXTERNALSYM HID_PROTOCOL_UUID}
+ HCCC_PROTOCOL_UUID: TGUID = '{00000012-0000-1000-8000-00805F9B34FB}';
+ {$EXTERNALSYM HCCC_PROTOCOL_UUID}
+ HCDC_PROTOCOL_UUID: TGUID = '{00000014-0000-1000-8000-00805F9B34FB}';
+ {$EXTERNALSYM HCDC_PROTOCOL_UUID}
+ HN_PROTOCOL_UUID: TGUID = '{00000016-0000-1000-8000-00805F9B34FB}';
+ {$EXTERNALSYM HN_PROTOCOL_UUID}
+ AVCTP_PROTOCOL_UUID: TGUID = '{00000017-0000-1000-8000-00805F9B34FB}';
+ {$EXTERNALSYM AVCTP_PROTOCOL_UUID}
+ AVDTP_PROTOCOL_UUID: TGUID = '{00000019-0000-1000-8000-00805F9B34FB}';
+ {$EXTERNALSYM AVDTP_PROTOCOL_UUID}
+ CMPT_PROTOCOL_UUID: TGUID = '{0000001B-0000-1000-8000-00805F9B34FB}';
+ {$EXTERNALSYM CMPT_PROTOCOL_UUID}
+ UDI_C_PLANE_PROTOCOL_UUID: TGUID= '{0000001D-0000-1000-8000-00805F9B34FB}';
+ {$EXTERNALSYM UDI_C_PLANE_PROTOCOL_UUID}
+ L2CAP_PROTOCOL_UUID: TGUID = '{00000100-0000-1000-8000-00805F9B34FB}';
+ {$EXTERNALSYM L2CAP_PROTOCOL_UUID}
+
+ SDP_PROTOCOL_UUID16 = $0001;
+ {$EXTERNALSYM SDP_PROTOCOL_UUID16}
+ UDP_PROTOCOL_UUID16 = $0002;
+ {$EXTERNALSYM UDP_PROTOCOL_UUID16}
+ RFCOMM_PROTOCOL_UUID16 = $0003;
+ {$EXTERNALSYM RFCOMM_PROTOCOL_UUID16}
+ TCP_PROTOCOL_UUID16 = $0004;
+ {$EXTERNALSYM TCP_PROTOCOL_UUID16}
+ TCSBIN_PROTOCOL_UUID16 = $0005;
+ {$EXTERNALSYM TCSBIN_PROTOCOL_UUID16}
+ TCSAT_PROTOCOL_UUID16 = $0006;
+ {$EXTERNALSYM TCSAT_PROTOCOL_UUID16}
+ OBEX_PROTOCOL_UUID16 = $0008;
+ {$EXTERNALSYM OBEX_PROTOCOL_UUID16}
+ IP_PROTOCOL_UUID16 = $0009;
+ {$EXTERNALSYM IP_PROTOCOL_UUID16}
+ FTP_PROTOCOL_UUID16 = $000A;
+ {$EXTERNALSYM FTP_PROTOCOL_UUID16}
+ HTTP_PROTOCOL_UUID16 = $000C;
+ {$EXTERNALSYM HTTP_PROTOCOL_UUID16}
+ WSP_PROTOCOL_UUID16 = $000E;
+ {$EXTERNALSYM WSP_PROTOCOL_UUID16}
+ BNEP_PROTOCOL_UUID16 = $000;
+ {$EXTERNALSYM BNEP_PROTOCOL_UUID16}
+ UPNP_PROTOCOL_UUID16 = $0010;
+ {$EXTERNALSYM UPNP_PROTOCOL_UUID16}
+ HID_PROTOCOL_UUID16 = $0011;
+ {$EXTERNALSYM HID_PROTOCOL_UUID16}
+ HCCC_PROTOCOL_UUID16 = $0012;
+ {$EXTERNALSYM HCCC_PROTOCOL_UUID16}
+ HCDC_PROTOCOL_UUID16 = $0014;
+ {$EXTERNALSYM HCDC_PROTOCOL_UUID16}
+ HCN_PROTOCOL_UUID16 = $0016;
+ {$EXTERNALSYM HCN_PROTOCOL_UUID16}
+ AVCTP_PROTOCOL_UUID16 = $0017;
+ {$EXTERNALSYM AVCTP_PROTOCOL_UUID16}
+ AVDTP_PROTOCOL_UUID16 = $0019;
+ {$EXTERNALSYM AVDTP_PROTOCOL_UUID16}
+ CMPT_PROTOCOL_UUID16 = $001B;
+ {$EXTERNALSYM CMPT_PROTOCOL_UUID16}
+ UDI_C_PLANE_PROTOCOL_UUID16 = $001D;
+ {$EXTERNALSYM UDI_C_PLANE_PROTOCOL_UUID16}
+ L2CAP_PROTOCOL_UUID16 = $0100;
+ {$EXTERNALSYM L2CAP_PROTOCOL_UUID16}
+
+ ServiceDiscoveryServerServiceClassID_UUID: TGUID = '{00001000-0000-1000-8000-00805F9B34FB}';
+ BrowseGroupDescriptorServiceClassID_UUID: TGUID = '{00001001-0000-1000-8000-00805F9B34FB}';
+ PublicBrowseGroupServiceClass_UUID: TGUID = '{00001002-0000-1000-8000-00805F9B34FB}';
+ SerialPortServiceClass_UUID: TGUID = '{00001101-0000-1000-8000-00805F9B34FB}';
+ LANAccessUsingPPPServiceClass_UUID: TGUID = '{00001102-0000-1000-8000-00805F9B34FB}';
+ DialupNetworkingServiceClass_UUID: TGUID = '{00001103-0000-1000-8000-00805F9B34FB}';
+ IrMCSyncServiceClass_UUID: TGUID = '{00001104-0000-1000-8000-00805F9B34FB}';
+ OBEXObjectPushServiceClass_UUID: TGUID = '{00001105-0000-1000-8000-00805F9B34FB}';
+ OBEXFileTransferServiceClass_UUID: TGUID = '{00001106-0000-1000-8000-00805F9B34FB}';
+ IrMCSyncCommandServiceClass_UUID: TGUID = '{00001107-0000-1000-8000-00805F9B34FB}';
+ HeadsetServiceClass_UUID: TGUID = '{00001108-0000-1000-8000-00805F9B34FB}';
+ CordlessTelephonyServiceClass_UUID: TGUID = '{00001109-0000-1000-8000-00805F9B34FB}';
+ AudioSourceServiceClass_UUID: TGUID = '{0000110A-0000-1000-8000-00805F9B34FB}';
+ AudioSinkServiceClass_UUID: TGUID = '{0000110B-0000-1000-8000-00805F9B34FB}';
+ AVRemoteControlTargetServiceClass_UUID: TGUID = '{0000110C-0000-1000-8000-00805F9B34FB}';
+ AdvancedAudioDistributionServiceClass_UUID: TGUID = '{0000110D-0000-1000-8000-00805F9B34FB}';
+ AVRemoteControlServiceClass_UUID: TGUID = '{0000110E-0000-1000-8000-00805F9B34FB}';
+ VideoConferencingServiceClass_UUID: TGUID = '{0000110F-0000-1000-8000-00805F9B34FB}';
+ IntercomServiceClass_UUID: TGUID = '{00001110-0000-1000-8000-00805F9B34FB}';
+ FaxServiceClass_UUID: TGUID = '{00001111-0000-1000-8000-00805F9B34FB}';
+ HeadsetAudioGatewayServiceClass_UUID: TGUID = '{00001112-0000-1000-8000-00805F9B34FB}';
+ WAPServiceClass_UUID: TGUID = '{00001113-0000-1000-8000-00805F9B34FB}';
+ WAPClientServiceClass_UUID: TGUID = '{00001114-0000-1000-8000-00805F9B34FB}';
+ PANUServiceClass_UUID: TGUID = '{00001115-0000-1000-8000-00805F9B34FB}';
+ NAPServiceClass_UUID: TGUID = '{00001116-0000-1000-8000-00805F9B34FB}';
+ GNServiceClass_UUID: TGUID = '{00001117-0000-1000-8000-00805F9B34FB}';
+ DirectPrintingServiceClass_UUID: TGUID = '{00001118-0000-1000-8000-00805F9B34FB}';
+ ReferencePrintingServiceClass_UUID: TGUID = '{00001119-0000-1000-8000-00805F9B34FB}';
+ ImagingServiceClass_UUID: TGUID = '{0000111A-0000-1000-8000-00805F9B34FB}';
+ ImagingResponderServiceClass_UUID: TGUID = '{0000111B-0000-1000-8000-00805F9B34FB}';
+ ImagingAutomaticArchiveServiceClass_UUID: TGUID = '{0000111C-0000-1000-8000-00805F9B34FB}';
+ ImagingReferenceObjectsServiceClass_UUID: TGUID = '{0000111D-0000-1000-8000-00805F9B34FB}';
+ HandsfreeServiceClass_UUID: TGUID = '{0000111E-0000-1000-8000-00805F9B34FB}';
+ HandsfreeAudioGatewayServiceClass_UUID: TGUID = '{0000111F-0000-1000-8000-00805F9B34FB}';
+ DirectPrintingReferenceObjectsServiceClass_UUID: TGUID = '{00001120-0000-1000-8000-00805F9B34FB}';
+ ReflectedUIServiceClass_UUID: TGUID = '{00001121-0000-1000-8000-00805F9B34FB}';
+ BasicPringingServiceClass_UUID: TGUID = '{00001122-0000-1000-8000-00805F9B34FB}';
+ PrintingStatusServiceClass_UUID: TGUID = '{00001123-0000-1000-8000-00805F9B34FB}';
+ HumanInterfaceDeviceServiceClass_UUID: TGUID = '{00001124-0000-1000-8000-00805F9B34FB}';
+ HardcopyCableReplacementServiceClass_UUID: TGUID = '{00001125-0000-1000-8000-00805F9B34FB}';
+ HCRPrintServiceClass_UUID: TGUID = '{00001126-0000-1000-8000-00805F9B34FB}';
+ HCRScanServiceClass_UUID: TGUID = '{00001127-0000-1000-8000-00805F9B34FB}';
+ CommonISDNAccessServiceClass_UUID: TGUID = '{00001128-0000-1000-8000-00805F9B34FB}';
+ VideoConferencingGWServiceClass_UUID: TGUID = '{00001129-0000-1000-8000-00805F9B34FB}';
+ UDIMTServiceClass_UUID: TGUID = '{0000112A-0000-1000-8000-00805F9B34FB}';
+ UDITAServiceClass_UUID: TGUID = '{0000112B-0000-1000-8000-00805F9B34FB}';
+ AudioVideoServiceClass_UUID: TGUID = '{0000112C-0000-1000-8000-00805F9B34FB}';
+ PnPInformationServiceClass_UUID: TGUID = '{00001200-0000-1000-8000-00805F9B34FB}';
+ GenericNetworkingServiceClass_UUID: TGUID = '{00001201-0000-1000-8000-00805F9B34FB}';
+ GenericFileTransferServiceClass_UUID: TGUID = '{00001202-0000-1000-8000-00805F9B34FB}';
+ GenericAudioServiceClass_UUID: TGUID = '{00001203-0000-1000-8000-00805F9B34FB}';
+ GenericTelephonyServiceClass_UUID: TGUID = '{00001204-0000-1000-8000-00805F9B34FB}';
+
+ ServiceDiscoveryServerServiceClassID_UUID16 = $1000;
+ BrowseGroupDescriptorServiceClassID_UUID16 = $1001;
+ PublicBrowseGroupServiceClassID_UUID16 = $1002;
+ SerialPortServiceClassID_UUID16 = $1101;
+ LANAccessUsingPPPServiceClassID_UUID16 = $1102;
+ DialupNetworkingServiceClassID_UUID16 = $1103;
+ IrMCSyncServiceClassID_UUID16 = $1104;
+ OBEXObjectPushServiceClassID_UUID16 = $1105;
+ OBEXFileTransferServiceClassID_UUID16 = $1106;
+ IrMcSyncCommandServiceClassID_UUID16 = $1107;
+ HeadsetServiceClassID_UUID16 = $1108;
+ CordlessServiceClassID_UUID16 = $1109;
+ AudioSourceServiceClassID_UUID16 = $110A;
+ AudioSinkSourceServiceClassID_UUID16 = $110B;
+ AVRemoteControlTargetServiceClassID_UUID16 = $110C;
+ AdvancedAudioDistributionServiceClassID_UUID16 = $110D;
+ AVRemoteControlServiceClassID_UUID16 = $110E;
+ VideoConferencingServiceClassID_UUID16 = $110;
+ IntercomServiceClassID_UUID16 = $1110;
+ FaxServiceClassID_UUID16 = $1111;
+ HeadsetAudioGatewayServiceClassID_UUID16 = $1112;
+ WAPServiceClassID_UUID16 = $1113;
+ WAPClientServiceClassID_UUID16 = $1114;
+ PANUServiceClassID_UUID16 = $1115;
+ NAPServiceClassID_UUID16 = $1116;
+ GNServiceClassID_UUID16 = $1117;
+ DirectPrintingServiceClassID_UUID16 = $1118;
+ ReferencePrintingServiceClassID_UUID16 = $1119;
+ ImagingServiceClassID_UUID16 = $111A;
+ ImagingResponderServiceClassID_UUID16 = $111B;
+ ImagingAutomaticArchiveServiceClassID_UUID16 = $111C;
+ ImagingReferenceObjectsServiceClassID_UUID16 = $111D;
+ HandsfreeServiceClassID_UUID16 = $111E;
+ HandsfreeAudioGatewayServiceClassID_UUID16 = $111F;
+ DirectPrintingReferenceObjectsServiceClassID_UUID16 = $1120;
+ ReflectsUIServiceClassID_UUID16 = $1121;
+ BasicPrintingServiceClassID_UUID16 = $1122;
+ PrintingStatusServiceClassID_UUID16 = $1123;
+ HumanInterfaceDeviceServiceClassID_UUID16 = $1124;
+ HardcopyCableReplacementServiceClassID_UUID16 = $1125;
+ HCRPrintServiceClassID_UUID16 = $1126;
+ HCRScanServiceClassID_UUID16 = $1127;
+ CommonISDNAccessServiceClass_UUID16 = $1128;
+ VideoConferencingGWServiceClass_UUID16 = $1129;
+ UDIMTServiceClass_UUID16 = $112A;
+ UDITAServiceClass_UUID16 = $112B;
+ AudioVideoServiceClass_UUID16 = $112C;
+
+ PnPInformationServiceClassID_UUID16 = $1200;
+ {$EXTERNALSYM PnPInformationServiceClassID_UUID16}
+ GenericNetworkingServiceClassID_UUID16 = $1201;
+ {$EXTERNALSYM GenericNetworkingServiceClassID_UUID16}
+ GenericFileTransferServiceClassID_UUID16 = $1202;
+ {$EXTERNALSYM GenericFileTransferServiceClassID_UUID16}
+ GenericAudioServiceClassID_UUID16 = $1203;
+ {$EXTERNALSYM GenericAudioServiceClassID_UUID16}
+ GenericTelephonyServiceClassID_UUID16 = $1204;
+ {$EXTERNALSYM GenericTelephonyServiceClassID_UUID16}
+
+//
+// max length of device friendly name.
+//
+
+ BTH_MAX_NAME_SIZE = 248;
+ {$EXTERNALSYM BTH_MAX_NAME_SIZE}
+
+ BTH_MAX_PIN_SIZE = 16;
+ {$EXTERNALSYM BTH_MAX_PIN_SIZE}
+ BTH_LINK_KEY_LENGTH = 16;
+ {$EXTERNALSYM BTH_LINK_KEY_LENGTH}
+
+ BTH_MFG_ERICSSON = 0;
+ {$EXTERNALSYM BTH_MFG_ERICSSON}
+ BTH_MFG_NOKIA = 1;
+ {$EXTERNALSYM BTH_MFG_NOKIA}
+ BTH_MFG_INTEL = 2;
+ {$EXTERNALSYM BTH_MFG_INTEL}
+ BTH_MFG_IBM = 3;
+ {$EXTERNALSYM BTH_MFG_IBM}
+ BTH_MFG_TOSHIBA = 4;
+ {$EXTERNALSYM BTH_MFG_TOSHIBA}
+ BTH_MFG_3COM = 5;
+ {$EXTERNALSYM BTH_MFG_3COM}
+ BTH_MFG_MICROSOFT = 6;
+ {$EXTERNALSYM BTH_MFG_MICROSOFT}
+ BTH_MFG_LUCENT = 7;
+ {$EXTERNALSYM BTH_MFG_LUCENT}
+ BTH_MFG_MOTOROLA = 8;
+ {$EXTERNALSYM BTH_MFG_MOTOROLA}
+ BTH_MFG_INFINEON = 9;
+ {$EXTERNALSYM BTH_MFG_INFINEON}
+ BTH_MFG_CSR = 10;
+ {$EXTERNALSYM BTH_MFG_CSR}
+ BTH_MFG_SILICONWAVE = 11;
+ {$EXTERNALSYM BTH_MFG_SILICONWAVE}
+ BTH_MFG_DIGIANSWER = 12;
+ {$EXTERNALSYM BTH_MFG_DIGIANSWER}
+ BTH_MFG_TI = 13;
+ {$EXTERNALSYM BTH_MFG_TI}
+ BTH_MFG_PARTHUS = 14;
+ {$EXTERNALSYM BTH_MFG_PARTHUS}
+ BTH_MFG_BROADCOM = 15;
+ {$EXTERNALSYM BTH_MFG_BROADCOM}
+ BTH_MFG_MITEL = 16;
+ {$EXTERNALSYM BTH_MFG_MITEL}
+ BTH_MFG_WIDCOMM = 17;
+ {$EXTERNALSYM BTH_MFG_WIDCOMM}
+ BTH_MFG_ZEEVO = 18;
+ {$EXTERNALSYM BTH_MFG_ZEEVO}
+ BTH_MFG_ATMEL = 19;
+ {$EXTERNALSYM BTH_MFG_ATMEL}
+ BTH_MFG_MITSIBUSHI = 20;
+ {$EXTERNALSYM BTH_MFG_MITSIBUSHI}
+ BTH_MFG_RTX_TELECOM = 21;
+ {$EXTERNALSYM BTH_MFG_RTX_TELECOM}
+ BTH_MFG_KC_TECHNOLOGY = 22;
+ {$EXTERNALSYM BTH_MFG_KC_TECHNOLOGY}
+ BTH_MFG_NEWLOGIC = 23;
+ {$EXTERNALSYM BTH_MFG_NEWLOGIC}
+ BTH_MFG_TRANSILICA = 24;
+ {$EXTERNALSYM BTH_MFG_TRANSILICA}
+ BTH_MFG_ROHDE_SCHWARZ = 25;
+ {$EXTERNALSYM BTH_MFG_ROHDE_SCHWARZ}
+ BTH_MFG_TTPCOM = 26;
+ {$EXTERNALSYM BTH_MFG_TTPCOM}
+ BTH_MFG_SIGNIA = 27;
+ {$EXTERNALSYM BTH_MFG_SIGNIA}
+ BTH_MFG_CONEXANT = 28;
+ {$EXTERNALSYM BTH_MFG_CONEXANT}
+ BTH_MFG_QUALCOMM = 29;
+ {$EXTERNALSYM BTH_MFG_QUALCOMM}
+ BTH_MFG_INVENTEL = 30;
+ {$EXTERNALSYM BTH_MFG_INVENTEL}
+ BTH_MFG_AVM_BERLIN = 31;
+ {$EXTERNALSYM BTH_MFG_AVM_BERLIN}
+ BTH_MFG_BANDSPEED = 32;
+ {$EXTERNALSYM BTH_MFG_BANDSPEED}
+ BTH_MFG_MANSELLA = 33;
+ {$EXTERNALSYM BTH_MFG_MANSELLA}
+ BTH_MFG_NEC = 34;
+ {$EXTERNALSYM BTH_MFG_NEC}
+ BTH_MFG_WAVEPLUS_TECHNOLOGY_CO = 35;
+ {$EXTERNALSYM BTH_MFG_WAVEPLUS_TECHNOLOGY_CO}
+ BTH_MFG_ALCATEL = 36;
+ {$EXTERNALSYM BTH_MFG_ALCATEL}
+ BTH_MFG_PHILIPS_SEMICONDUCTOR = 37;
+ {$EXTERNALSYM BTH_MFG_PHILIPS_SEMICONDUCTOR}
+ BTH_MFG_C_TECHNOLOGIES = 38;
+ {$EXTERNALSYM BTH_MFG_C_TECHNOLOGIES}
+ BTH_MFG_OPEN_INTERFACE = 39;
+ {$EXTERNALSYM BTH_MFG_OPEN_INTERFACE}
+ BTH_MFG_RF_MICRO_DEVICES = 40;
+ {$EXTERNALSYM BTH_MFG_RF_MICRO_DEVICES}
+ BTH_MFG_HITACHI = 41;
+ {$EXTERNALSYM BTH_MFG_HITACHI}
+ BTH_MFG_SYMBOL_TECHNOLOGIES = 42;
+ {$EXTERNALSYM BTH_MFG_SYMBOL_TECHNOLOGIES}
+ BTH_MFG_TENOVIS = 43;
+ {$EXTERNALSYM BTH_MFG_TENOVIS}
+ BTH_MFG_MACRONIX_INTERNATIONAL = 44;
+ {$EXTERNALSYM BTH_MFG_MACRONIX_INTERNATIONAL}
+ BTH_MFG_INTERNAL_USE = 65535;
+ {$EXTERNALSYM BTH_MFG_INTERNAL_USE}
+
+type
+ BTH_ADDR = Int64;
+ {$EXTERNALSYM BTH_ADDR}
+ PBTH_ADDR = ^BTH_ADDR;
+ {$EXTERNALSYM PBTH_ADDR}
+ BTH_COD = ULONG;
+ {$EXTERNALSYM BTH_COD}
+ PBTH_COD = ^BTH_COD;
+ {$EXTERNALSYM PBTH_COD}
+ BTH_LAP = ULONG;
+ {$EXTERNALSYM BTH_LAP}
+ PBTH_LAP = ^BTH_LAP;
+ {$EXTERNALSYM PBTH_LAP}
+
+const
+ BTH_ADDR_NULL = Int64($0000000000000000);
+ {$EXTERNALSYM BTH_ADDR_NULL}
+
+ NAP_MASK = Int64($FFFF00000000);
+ {$EXTERNALSYM NAP_MASK}
+ SAP_MASK = Int64($0000FFFFFFFF);
+ {$EXTERNALSYM SAP_MASK}
+
+ NAP_BIT_OFFSET = 8 * 4;
+ {$EXTERNALSYM NAP_BIT_OFFSET}
+ SAP_BIT_OFFSET = 0;
+ {$EXTERNALSYM SAP_BIT_OFFSET}
+
+function GET_NAP(_bth_addr: BTH_ADDR): Word;
+function GET_SAP(_bth_addr: BTH_ADDR): ULONG;
+function SET_NAP(_nap: Word): Int64; //todo impl
+function SET_SAP(_sap: ULONG): Int64; // todo impl
+function SET_NAP_SAP(_nap, _sap: Word): Int64; // todo impl
+
+const
+ COD_FORMAT_BIT_OFFSET = 0;
+ {$EXTERNALSYM COD_FORMAT_BIT_OFFSET}
+ COD_MINOR_BIT_OFFSET = 2;
+ {$EXTERNALSYM COD_MINOR_BIT_OFFSET}
+ COD_MAJOR_BIT_OFFSET = 8 * 1;
+ {$EXTERNALSYM COD_MAJOR_BIT_OFFSET}
+ COD_SERVICE_BIT_OFFSET = 8 * 1 + 5;
+ {$EXTERNALSYM COD_SERVICE_BIT_OFFSET}
+
+ COD_FORMAT_MASK = $000003;
+ {$EXTERNALSYM COD_FORMAT_MASK}
+ COD_MINOR_MASK = $0000FC;
+ {$EXTERNALSYM COD_MINOR_MASK}
+ COD_MAJOR_MASK = $001F00;
+ {$EXTERNALSYM COD_MAJOR_MASK}
+ COD_SERVICE_MASK = $FFE000;
+ {$EXTERNALSYM COD_SERVICE_MASK}
+
+function GET_COD_FORMAT(_cod: BTH_COD): BTH_COD;
+function GET_COD_MINOR(_cod: BTH_COD): BTH_COD;
+function GET_COD_MAJOR(_cod: BTH_COD): BTH_COD;
+function GET_COD_SERVICE(_cod: BTH_COD): BTH_COD;
+
+procedure SET_COD_MINOR(var _cod: BTH_COD; _minor: BTH_COD);
+procedure SET_COD_MAJOR(var _cod: BTH_COD; _major: BTH_COD);
+procedure SET_COD_SERVICE(var _cod: BTH_COD; _service: BTH_COD);
+
+const
+ COD_VERSION = $0;
+ {$EXTERNALSYM COD_VERSION}
+
+ COD_SERVICE_LIMITED = $0001;
+ {$EXTERNALSYM COD_SERVICE_LIMITED}
+ COD_SERVICE_POSITIONING = $0008;
+ {$EXTERNALSYM COD_SERVICE_POSITIONING}
+ COD_SERVICE_NETWORKING = $0010;
+ {$EXTERNALSYM COD_SERVICE_NETWORKING}
+ COD_SERVICE_RENDERING = $0020;
+ {$EXTERNALSYM COD_SERVICE_RENDERING}
+ COD_SERVICE_CAPTURING = $0040;
+ {$EXTERNALSYM COD_SERVICE_CAPTURING}
+ COD_SERVICE_OBJECT_XFER = $0080;
+ {$EXTERNALSYM COD_SERVICE_OBJECT_XFER}
+ COD_SERVICE_AUDIO = $0100;
+ {$EXTERNALSYM COD_SERVICE_AUDIO}
+ COD_SERVICE_TELEPHONY = $0200;
+ {$EXTERNALSYM COD_SERVICE_TELEPHONY}
+ COD_SERVICE_INFORMATION = $0400;
+ {$EXTERNALSYM COD_SERVICE_INFORMATION}
+
+ COD_SERVICE_VALID_MASK = COD_SERVICE_LIMITED or COD_SERVICE_POSITIONING or
+ COD_SERVICE_NETWORKING or COD_SERVICE_RENDERING or
+ COD_SERVICE_CAPTURING or COD_SERVICE_OBJECT_XFER or
+ COD_SERVICE_AUDIO or COD_SERVICE_TELEPHONY or
+ COD_SERVICE_INFORMATION;
+ {$EXTERNALSYM COD_SERVICE_VALID_MASK}
+
+ COD_SERVICE_MAX_COUNT = 9;
+ {$EXTERNALSYM COD_SERVICE_MAX_COUNT}
+
+//
+// Major class codes
+//
+
+const
+ COD_MAJOR_MISCELLANEOUS = $00;
+ {$EXTERNALSYM COD_MAJOR_MISCELLANEOUS}
+ COD_MAJOR_COMPUTER = $01;
+ {$EXTERNALSYM COD_MAJOR_COMPUTER}
+ COD_MAJOR_PHONE = $02;
+ {$EXTERNALSYM COD_MAJOR_PHONE}
+ COD_MAJOR_LAN_ACCESS = $03;
+ {$EXTERNALSYM COD_MAJOR_LAN_ACCESS}
+ COD_MAJOR_AUDIO = $04;
+ {$EXTERNALSYM COD_MAJOR_AUDIO}
+ COD_MAJOR_PERIPHERAL = $05;
+ {$EXTERNALSYM COD_MAJOR_PERIPHERAL}
+ COD_MAJOR_IMAGING = $06;
+ {$EXTERNALSYM COD_MAJOR_IMAGING}
+ COD_MAJOR_UNCLASSIFIED = $1;
+ {$EXTERNALSYM COD_MAJOR_UNCLASSIFIED}
+
+//
+// Minor class codes specific to each major class
+//
+
+const
+ COD_COMPUTER_MINOR_UNCLASSIFIED = $00;
+ {$EXTERNALSYM COD_COMPUTER_MINOR_UNCLASSIFIED}
+ COD_COMPUTER_MINOR_DESKTOP = $01;
+ {$EXTERNALSYM COD_COMPUTER_MINOR_DESKTOP}
+ COD_COMPUTER_MINOR_SERVER = $02;
+ {$EXTERNALSYM COD_COMPUTER_MINOR_SERVER}
+ COD_COMPUTER_MINOR_LAPTOP = $03;
+ {$EXTERNALSYM COD_COMPUTER_MINOR_LAPTOP}
+ COD_COMPUTER_MINOR_HANDHELD = $04;
+ {$EXTERNALSYM COD_COMPUTER_MINOR_HANDHELD}
+ COD_COMPUTER_MINOR_PALM = $05;
+ {$EXTERNALSYM COD_COMPUTER_MINOR_PALM}
+ COD_COMPUTER_MINOR_WEARABLE = $06;
+ {$EXTERNALSYM COD_COMPUTER_MINOR_WEARABLE}
+
+ COD_PHONE_MINOR_UNCLASSIFIED = $00;
+ {$EXTERNALSYM COD_PHONE_MINOR_UNCLASSIFIED}
+ COD_PHONE_MINOR_CELLULAR = $01;
+ {$EXTERNALSYM COD_PHONE_MINOR_CELLULAR}
+ COD_PHONE_MINOR_CORDLESS = $02;
+ {$EXTERNALSYM COD_PHONE_MINOR_CORDLESS}
+ COD_PHONE_MINOR_SMART = $03;
+ {$EXTERNALSYM COD_PHONE_MINOR_SMART}
+ COD_PHONE_MINOR_WIRED_MODEM = $04;
+ {$EXTERNALSYM COD_PHONE_MINOR_WIRED_MODEM}
+
+ COD_AUDIO_MINOR_UNCLASSIFIED = $00;
+ {$EXTERNALSYM COD_AUDIO_MINOR_UNCLASSIFIED}
+ COD_AUDIO_MINOR_HEADSET = $01;
+ {$EXTERNALSYM COD_AUDIO_MINOR_HEADSET}
+ COD_AUDIO_MINOR_HANDS_FREE = $02;
+ {$EXTERNALSYM COD_AUDIO_MINOR_HANDS_FREE}
+ COD_AUDIO_MINOR_HEADSET_HANDS_FREE = $03;
+ {$EXTERNALSYM COD_AUDIO_MINOR_HEADSET_HANDS_FREE}
+ COD_AUDIO_MINOR_MICROPHONE = $0;
+ {$EXTERNALSYM COD_AUDIO_MINOR_MICROPHONE}
+ COD_AUDIO_MINOR_LOUDSPEAKER = $05;
+ {$EXTERNALSYM COD_AUDIO_MINOR_LOUDSPEAKER}
+ COD_AUDIO_MINOR_HEADPHONES = $06;
+ {$EXTERNALSYM COD_AUDIO_MINOR_HEADPHONES}
+ COD_AUDIO_MINOR_PORTABLE_AUDIO = $07;
+ {$EXTERNALSYM COD_AUDIO_MINOR_PORTABLE_AUDIO}
+ COD_AUDIO_MINOR_CAR_AUDIO = $08;
+ {$EXTERNALSYM COD_AUDIO_MINOR_CAR_AUDIO}
+ COD_AUDIO_MINOR_SET_TOP_BOX = $09;
+ {$EXTERNALSYM COD_AUDIO_MINOR_SET_TOP_BOX}
+ COD_AUDIO_MINOR_HIFI_AUDIO = $0A;
+ {$EXTERNALSYM COD_AUDIO_MINOR_HIFI_AUDIO}
+ COD_AUDIO_MINOR_VCR = $0B;
+ {$EXTERNALSYM COD_AUDIO_MINOR_VCR}
+ COD_AUDIO_MINOR_VIDEO_CAMERA = $0C;
+ {$EXTERNALSYM COD_AUDIO_MINOR_VIDEO_CAMERA}
+ COD_AUDIO_MINOR_CAMCORDER = $0D;
+ {$EXTERNALSYM COD_AUDIO_MINOR_CAMCORDER}
+ COD_AUDIO_MINOR_VIDEO_MONITOR = $0E;
+ {$EXTERNALSYM COD_AUDIO_MINOR_VIDEO_MONITOR}
+ COD_AUDIO_MINOR_VIDEO_DISPLAY_LOUDSPEAKER = $0F;
+ {$EXTERNALSYM COD_AUDIO_MINOR_VIDEO_DISPLAY_LOUDSPEAKER}
+ COD_AUDIO_MINOR_VIDEO_DISPLAY_CONFERENCING = $10;
+ {$EXTERNALSYM COD_AUDIO_MINOR_VIDEO_DISPLAY_CONFERENCING}
+ //COD_AUDIO_MINOR_RESERVED = $11:
+ COD_AUDIO_MINOR_GAMING_TOY = $12;
+ {$EXTERNALSYM COD_AUDIO_MINOR_GAMING_TOY}
+
+ COD_PERIPHERAL_MINOR_KEYBOARD_MASK = $10;
+ {$EXTERNALSYM COD_PERIPHERAL_MINOR_KEYBOARD_MASK}
+ COD_PERIPHERAL_MINOR_POINTER_MASK = $20;
+ {$EXTERNALSYM COD_PERIPHERAL_MINOR_POINTER_MASK}
+
+ COD_PERIPHERAL_MINOR_NO_CATEGORY = $00;
+ {$EXTERNALSYM COD_PERIPHERAL_MINOR_NO_CATEGORY}
+ COD_PERIPHERAL_MINOR_JOYSTICK = $01;
+ {$EXTERNALSYM COD_PERIPHERAL_MINOR_JOYSTICK}
+ COD_PERIPHERAL_MINOR_GAMEPAD = $02;
+ {$EXTERNALSYM COD_PERIPHERAL_MINOR_GAMEPAD}
+ COD_PERIPHERAL_MINOR_REMOTE_CONTROL = $03;
+ {$EXTERNALSYM COD_PERIPHERAL_MINOR_REMOTE_CONTROL}
+ COD_PERIPHERAL_MINOR_SENSING = $04;
+ {$EXTERNALSYM COD_PERIPHERAL_MINOR_SENSING}
+
+ COD_IMAGING_MINOR_DISPLAY_MASK = $04;
+ {$EXTERNALSYM COD_IMAGING_MINOR_DISPLAY_MASK}
+ COD_IMAGING_MINOR_CAMERA_MASK = $08;
+ {$EXTERNALSYM COD_IMAGING_MINOR_CAMERA_MASK}
+ COD_IMAGING_MINOR_SCANNER_MASK = $10;
+ {$EXTERNALSYM COD_IMAGING_MINOR_SCANNER_MASK}
+ COD_IMAGING_MINOR_PRINTER_MASK = $20;
+ {$EXTERNALSYM COD_IMAGING_MINOR_PRINTER_MASK}
+
+//
+// Cannot use GET_COD_MINOR for this b/c it is embedded in a different manner
+// than the rest of the major classes
+//
+
+const
+ COD_LAN_ACCESS_BIT_OFFSET = 5;
+ {$EXTERNALSYM COD_LAN_ACCESS_BIT_OFFSET}
+
+ COD_LAN_MINOR_MASK = $00001C;
+ {$EXTERNALSYM COD_LAN_MINOR_MASK}
+ COD_LAN_ACCESS_MASK = $0000E0;
+ {$EXTERNALSYM COD_LAN_ACCESS_MASK}
+
+function GET_COD_LAN_MINOR(_cod: DWORD): DWORD;
+{$EXTERNALSYM GET_COD_LAN_MINOR}
+function GET_COD_LAN_ACCESS(_cod: DWORD): DWORD;
+{$EXTERNALSYM GET_COD_LAN_ACCESS}
+
+//
+// LAN access percent usage subcodes
+//
+
+const
+ COD_LAN_MINOR_UNCLASSIFIED = $00;
+ {$EXTERNALSYM COD_LAN_MINOR_UNCLASSIFIED}
+
+ COD_LAN_ACCESS_0_USED = $00;
+ {$EXTERNALSYM COD_LAN_ACCESS_0_USED}
+ COD_LAN_ACCESS_17_USED = $01;
+ {$EXTERNALSYM COD_LAN_ACCESS_17_USED}
+ COD_LAN_ACCESS_33_USED = $02;
+ {$EXTERNALSYM COD_LAN_ACCESS_33_USED}
+ COD_LAN_ACCESS_50_USED = $03;
+ {$EXTERNALSYM COD_LAN_ACCESS_50_USED}
+ COD_LAN_ACCESS_67_USED = $04;
+ {$EXTERNALSYM COD_LAN_ACCESS_67_USED}
+ COD_LAN_ACCESS_83_USED = $05;
+ {$EXTERNALSYM COD_LAN_ACCESS_83_USED}
+ COD_LAN_ACCESS_99_USED = $06;
+ {$EXTERNALSYM COD_LAN_ACCESS_99_USED}
+ COD_LAN_ACCESS_FULL = $07;
+ {$EXTERNALSYM COD_LAN_ACCESS_FULL}
+
+//
+// Used as an initializer of LAP_DATA
+//
+
+(* (rom) not implementable in Delphi
+#define LAP_GIAC_INIT { 0x33, 0x8B, 0x9E }
+#define LAP_LIAC_INIT { 0x00, 0x8B, 0x9E }
+*)
+
+//
+// General Inquiry Access Code.
+//
+
+const
+ LAP_GIAC_VALUE = $009E8B33;
+ {$EXTERNALSYM LAP_GIAC_VALUE}
+
+//
+// Limited Inquiry Access Code.
+//
+
+const
+ LAP_LIAC_VALUE = $009E8B00;
+ {$EXTERNALSYM LAP_LIAC_VALUE}
+
+ BTH_ADDR_IAC_FIRST = $9E8B00;
+ {$EXTERNALSYM BTH_ADDR_IAC_FIRST}
+ BTH_ADDR_IAC_LAST = $9E8B3;
+ {$EXTERNALSYM BTH_ADDR_IAC_LAST}
+ BTH_ADDR_LIAC = $9E8B00;
+ {$EXTERNALSYM BTH_ADDR_LIAC}
+ BTH_ADDR_GIAC = $9E8B33;
+ {$EXTERNALSYM BTH_ADDR_GIAC}
+
+type
+ BTHSTATUS = UCHAR;
+ {$EXTERNALSYM BTHSTATUS}
+ PBTHSTATUS = ^BTHSTATUS;
+ {$EXTERNALSYM PBTHSTATUS}
+
+function BTH_ERROR(_btStatus: BTHSTATUS): BOOL;
+{$EXTERNALSYM BTH_ERROR}
+function BTH_SUCCESS(_btStatus: BTHSTATUS): BOOL;
+{$EXTERNALSYM BTH_SUCCESS}
+
+const
+ BTH_ERROR_SUCCESS = $00;
+ {$EXTERNALSYM BTH_ERROR_SUCCESS}
+ BTH_ERROR_UNKNOWN_HCI_COMMAND = $01;
+ {$EXTERNALSYM BTH_ERROR_UNKNOWN_HCI_COMMAND}
+ BTH_ERROR_NO_CONNECTION = $02;
+ {$EXTERNALSYM BTH_ERROR_NO_CONNECTION}
+ BTH_ERROR_HARDWARE_FAILURE = $03;
+ {$EXTERNALSYM BTH_ERROR_HARDWARE_FAILURE}
+ BTH_ERROR_PAGE_TIMEOUT = $04;
+ {$EXTERNALSYM BTH_ERROR_PAGE_TIMEOUT}
+ BTH_ERROR_AUTHENTICATION_FAILURE = $05;
+ {$EXTERNALSYM BTH_ERROR_AUTHENTICATION_FAILURE}
+ BTH_ERROR_KEY_MISSING = $06;
+ {$EXTERNALSYM BTH_ERROR_KEY_MISSING}
+ BTH_ERROR_MEMORY_FULL = $07;
+ {$EXTERNALSYM BTH_ERROR_MEMORY_FULL}
+ BTH_ERROR_CONNECTION_TIMEOUT = $08;
+ {$EXTERNALSYM BTH_ERROR_CONNECTION_TIMEOUT}
+ BTH_ERROR_MAX_NUMBER_OF_CONNECTIONS = $09;
+ {$EXTERNALSYM BTH_ERROR_MAX_NUMBER_OF_CONNECTIONS}
+ BTH_ERROR_MAX_NUMBER_OF_SCO_CONNECTIONS = $0a;
+ {$EXTERNALSYM BTH_ERROR_MAX_NUMBER_OF_SCO_CONNECTIONS}
+ BTH_ERROR_ACL_CONNECTION_ALREADY_EXISTS = $0b;
+ {$EXTERNALSYM BTH_ERROR_ACL_CONNECTION_ALREADY_EXISTS}
+ BTH_ERROR_COMMAND_DISALLOWED = $0c;
+ {$EXTERNALSYM BTH_ERROR_COMMAND_DISALLOWED}
+ BTH_ERROR_HOST_REJECTED_LIMITED_RESOURCES = $0d;
+ {$EXTERNALSYM BTH_ERROR_HOST_REJECTED_LIMITED_RESOURCES}
+ BTH_ERROR_HOST_REJECTED_SECURITY_REASONS = $0e;
+ {$EXTERNALSYM BTH_ERROR_HOST_REJECTED_SECURITY_REASONS}
+ BTH_ERROR_HOST_REJECTED_PERSONAL_DEVICE = $0;
+ {$EXTERNALSYM BTH_ERROR_HOST_REJECTED_PERSONAL_DEVICE}
+ BTH_ERROR_HOST_TIMEOUT = $10;
+ {$EXTERNALSYM BTH_ERROR_HOST_TIMEOUT}
+ BTH_ERROR_UNSUPPORTED_FEATURE_OR_PARAMETER = $11;
+ {$EXTERNALSYM BTH_ERROR_UNSUPPORTED_FEATURE_OR_PARAMETER}
+ BTH_ERROR_INVALID_HCI_PARAMETER = $12;
+ {$EXTERNALSYM BTH_ERROR_INVALID_HCI_PARAMETER}
+ BTH_ERROR_REMOTE_USER_ENDED_CONNECTION = $13;
+ {$EXTERNALSYM BTH_ERROR_REMOTE_USER_ENDED_CONNECTION}
+ BTH_ERROR_REMOTE_LOW_RESOURCES = $14;
+ {$EXTERNALSYM BTH_ERROR_REMOTE_LOW_RESOURCES}
+ BTH_ERROR_REMOTE_POWERING_OFF = $15;
+ {$EXTERNALSYM BTH_ERROR_REMOTE_POWERING_OFF}
+ BTH_ERROR_LOCAL_HOST_TERMINATED_CONNECTION = $16;
+ {$EXTERNALSYM BTH_ERROR_LOCAL_HOST_TERMINATED_CONNECTION}
+ BTH_ERROR_REPEATED_ATTEMPTS = $17;
+ {$EXTERNALSYM BTH_ERROR_REPEATED_ATTEMPTS}
+ BTH_ERROR_PAIRING_NOT_ALLOWED = $18;
+ {$EXTERNALSYM BTH_ERROR_PAIRING_NOT_ALLOWED}
+ BTH_ERROR_UKNOWN_LMP_PDU = $19;
+ {$EXTERNALSYM BTH_ERROR_UKNOWN_LMP_PDU}
+ BTH_ERROR_UNSUPPORTED_REMOTE_FEATURE = $1a;
+ {$EXTERNALSYM BTH_ERROR_UNSUPPORTED_REMOTE_FEATURE}
+ BTH_ERROR_SCO_OFFSET_REJECTED = $1b;
+ {$EXTERNALSYM BTH_ERROR_SCO_OFFSET_REJECTED}
+ BTH_ERROR_SCO_INTERVAL_REJECTED = $1c;
+ {$EXTERNALSYM BTH_ERROR_SCO_INTERVAL_REJECTED}
+ BTH_ERROR_SCO_AIRMODE_REJECTED = $1d;
+ {$EXTERNALSYM BTH_ERROR_SCO_AIRMODE_REJECTED}
+ BTH_ERROR_INVALID_LMP_PARAMETERS = $1e;
+ {$EXTERNALSYM BTH_ERROR_INVALID_LMP_PARAMETERS}
+ BTH_ERROR_UNSPECIFIED_ERROR = $1;
+ {$EXTERNALSYM BTH_ERROR_UNSPECIFIED_ERROR}
+ BTH_ERROR_UNSUPPORTED_LMP_PARM_VALUE = $20;
+ {$EXTERNALSYM BTH_ERROR_UNSUPPORTED_LMP_PARM_VALUE}
+ BTH_ERROR_ROLE_CHANGE_NOT_ALLOWED = $21;
+ {$EXTERNALSYM BTH_ERROR_ROLE_CHANGE_NOT_ALLOWED}
+ BTH_ERROR_LMP_RESPONSE_TIMEOUT = $22;
+ {$EXTERNALSYM BTH_ERROR_LMP_RESPONSE_TIMEOUT}
+ BTH_ERROR_LMP_TRANSACTION_COLLISION = $23;
+ {$EXTERNALSYM BTH_ERROR_LMP_TRANSACTION_COLLISION}
+ BTH_ERROR_LMP_PDU_NOT_ALLOWED = $24;
+ {$EXTERNALSYM BTH_ERROR_LMP_PDU_NOT_ALLOWED}
+ BTH_ERROR_ENCRYPTION_MODE_NOT_ACCEPTABLE = $25;
+ {$EXTERNALSYM BTH_ERROR_ENCRYPTION_MODE_NOT_ACCEPTABLE}
+ BTH_ERROR_UNIT_KEY_NOT_USED = $26;
+ {$EXTERNALSYM BTH_ERROR_UNIT_KEY_NOT_USED}
+ BTH_ERROR_QOS_IS_NOT_SUPPORTED = $27;
+ {$EXTERNALSYM BTH_ERROR_QOS_IS_NOT_SUPPORTED}
+ BTH_ERROR_INSTANT_PASSED = $28;
+ {$EXTERNALSYM BTH_ERROR_INSTANT_PASSED}
+ BTH_ERROR_PAIRING_WITH_UNIT_KEY_NOT_SUPPORTED = $29;
+ {$EXTERNALSYM BTH_ERROR_PAIRING_WITH_UNIT_KEY_NOT_SUPPORTED}
+
+ BTH_ERROR_UNSPECIFIED = $FF;
+ {$EXTERNALSYM BTH_ERROR_UNSPECIFIED}
+
+//
+// Min, max, and default L2cap MTU.
+//
+
+const
+ L2CAP_MIN_MTU = 48;
+ {$EXTERNALSYM L2CAP_MIN_MTU}
+ L2CAP_MAX_MTU = $FFFF;
+ {$EXTERNALSYM L2CAP_MAX_MTU}
+ L2CAP_DEFAULT_MTU = 672;
+ {$EXTERNALSYM L2CAP_DEFAULT_MTU}
+
+//
+// Max l2cap signal size (48) - size of signal header (4)
+//
+
+const
+ MAX_L2CAP_PING_DATA_LENGTH = 44;
+ {$EXTERNALSYM MAX_L2CAP_PING_DATA_LENGTH}
+ MAX_L2CAP_INFO_DATA_LENGTH = 44;
+ {$EXTERNALSYM MAX_L2CAP_INFO_DATA_LENGTH}
+
+//
+// the following two structures provides information about
+// disocvered remote radios.
+//
+
+const
+ BDIF_ADDRESS = $00000001;
+ {$EXTERNALSYM BDIF_ADDRESS}
+ BDIF_COD = $00000002;
+ {$EXTERNALSYM BDIF_COD}
+ BDIF_NAME = $00000004;
+ {$EXTERNALSYM BDIF_NAME}
+ BDIF_PAIRED = $00000008;
+ {$EXTERNALSYM BDIF_PAIRED}
+ BDIF_PERSONAL = $00000010;
+ {$EXTERNALSYM BDIF_PERSONAL}
+ BDIF_CONNECTED = $00000020;
+ {$EXTERNALSYM BDIF_CONNECTED}
+
+const
+ BDIF_VALID_FLAGS = BDIF_CONNECTED or BDIF_ADDRESS or BDIF_COD or BDIF_NAME or BDIF_PAIRED or BDIF_PERSONAL;
+ {$EXTERNALSYM BDIF_VALID_FLAGS}
+
+type
+ _BTH_DEVICE_INFO = record
+
+ //
+ // Combination BDIF_Xxx flags
+ //
+ flags: ULONG;
+
+ //
+ // Address of remote device.
+ //
+ address: BTH_ADDR;
+
+ //
+ // Class Of Device.
+ //
+ classOfDevice: BTH_COD;
+
+ //
+ // name of the device
+ //
+ name: array [0..BTH_MAX_NAME_SIZE - 1] of CHAR;
+ end;
+ {$EXTERNALSYM _BTH_DEVICE_INFO}
+ BTH_DEVICE_INFO = _BTH_DEVICE_INFO;
+ {$EXTERNALSYM BTH_DEVICE_INFO}
+ PBTH_DEVICE_INFO = ^BTH_DEVICE_INFO;
+ {$EXTERNALSYM PBTH_DEVICE_INFO}
+ TBthDeviceInfo = BTH_DEVICE_INFO;
+ PBthDeviceInfo = PBTH_DEVICE_INFO;
+
+//
+// Buffer associated with GUID_BLUETOOTH_RADIO_IN_RANGE
+//
+
+type
+ _BTH_RADIO_IN_RANGE = record
+ //
+ // Information about the remote radio
+ //
+ deviceInfo: BTH_DEVICE_INFO;
+ //
+ // The previous flags value for the BTH_DEVICE_INFO. The receiver of this
+ // notification can compare the deviceInfo.flags and previousDeviceFlags
+ // to determine what has changed about this remote radio.
+ //
+ // For instance, if BDIF_NAME is set in deviceInfo.flags and not in
+ // previousDeviceFlags, the remote radio's has just been retrieved.
+ //
+ previousDeviceFlags: ULONG;
+ end;
+ {$EXTERNALSYM _BTH_RADIO_IN_RANGE}
+ BTH_RADIO_IN_RANGE = _BTH_RADIO_IN_RANGE;
+ {$EXTERNALSYM BTH_RADIO_IN_RANGE}
+ PBTH_RADIO_IN_RANGE = ^BTH_RADIO_IN_RANGE;
+ {$EXTERNALSYM PBTH_RADIO_IN_RANGE}
+ TBthRadioInRange = BTH_RADIO_IN_RANGE;
+ PBthRadioInRange = PBTH_RADIO_IN_RANGE;
+
+//
+// Buffer associated with GUID_BLUETOOTH_L2CAP_EVENT
+//
+
+ _BTH_L2CAP_EVENT_INFO = record
+ //
+ // Remote radio address which the L2CAP event is associated with
+ //
+ bthAddress: BTH_ADDR;
+
+ //
+ // The PSM that is either being connected to or disconnected from
+ //
+ psm: Word;
+
+ //
+ // If != 0, then the channel has just been established. If == 0, then the
+ // channel has been destroyed. Notifications for a destroyed channel will
+ // only be sent for channels successfully established.
+ //
+ connected: UCHAR;
+
+ //
+ // If != 0, then the local host iniated the l2cap connection. If == 0, then
+ // the remote host initated the connection. This field is only valid if
+ // connect is != 0.
+ //
+ initiated: UCHAR;
+ end;
+ {$EXTERNALSYM _BTH_L2CAP_EVENT_INFO}
+ BTH_L2CAP_EVENT_INFO = _BTH_L2CAP_EVENT_INFO;
+ {$EXTERNALSYM BTH_L2CAP_EVENT_INFO}
+ PBTH_L2CAP_EVENT_INFO = ^BTH_L2CAP_EVENT_INFO;
+ {$EXTERNALSYM PBTH_L2CAP_EVENT_INFO}
+ TBthL2CapEventInfo = BTH_L2CAP_EVENT_INFO;
+ PBthL2CapEventInfo = PBTH_L2CAP_EVENT_INFO;
+
+const
+ HCI_CONNNECTION_TYPE_ACL = 1;
+ {$EXTERNALSYM HCI_CONNNECTION_TYPE_ACL}
+ HCI_CONNNECTION_TYPE_SCO = 2;
+ {$EXTERNALSYM HCI_CONNNECTION_TYPE_SCO}
+
+//
+// Buffer associated with GUID_BLUETOOTH_HCI_EVENT
+//
+
+type
+ _BTH_HCI_EVENT_INFO = record
+ //
+ // Remote radio address which the HCI event is associated with
+ //
+ bthAddress: BTH_ADDR;
+
+ //
+ // HCI_CONNNECTION_TYPE_XXX value
+ //
+ connectionType: UCHAR;
+
+ //
+ // If != 0, then the underlying connection to the remote radio has just
+ // been estrablished. If == 0, then the underlying conneciton has just been
+ // destroyed.
+ //
+ connected: UCHAR;
+ end;
+ {$EXTERNALSYM _BTH_HCI_EVENT_INFO}
+ BTH_HCI_EVENT_INFO = _BTH_HCI_EVENT_INFO;
+ {$EXTERNALSYM BTH_HCI_EVENT_INFO}
+ PBTH_HCI_EVENT_INFO = ^BTH_HCI_EVENT_INFO;
+ {$EXTERNALSYM PBTH_HCI_EVENT_INFO}
+ TBthHciEventInfo = BTH_HCI_EVENT_INFO;
+ PBthHciEventInfo = PBTH_HCI_EVENT_INFO;
+
+const
+ MAX_UUIDS_IN_QUERY = 12;
+ {$EXTERNALSYM MAX_UUIDS_IN_QUERY}
+
+ BTH_VID_DEFAULT_VALUE = $FFFF;
+ {$EXTERNALSYM BTH_VID_DEFAULT_VALUE}
+
+ SDP_ERROR_INVALID_SDP_VERSION = $0001;
+ {$EXTERNALSYM SDP_ERROR_INVALID_SDP_VERSION}
+ SDP_ERROR_INVALID_RECORD_HANDLE = $0002;
+ {$EXTERNALSYM SDP_ERROR_INVALID_RECORD_HANDLE}
+ SDP_ERROR_INVALID_REQUEST_SYNTAX = $0003;
+ {$EXTERNALSYM SDP_ERROR_INVALID_REQUEST_SYNTAX}
+ SDP_ERROR_INVALID_PDU_SIZE = $0004;
+ {$EXTERNALSYM SDP_ERROR_INVALID_PDU_SIZE}
+ SDP_ERROR_INVALID_CONTINUATION_STATE = $0005;
+ {$EXTERNALSYM SDP_ERROR_INVALID_CONTINUATION_STATE}
+ SDP_ERROR_INSUFFICIENT_RESOURCES = $0006;
+ {$EXTERNALSYM SDP_ERROR_INSUFFICIENT_RESOURCES}
+
+//
+// Defined by windows to handle server errors that are not described by the
+// above errors. Start at 0x0100 so we don't go anywhere near the spec
+// defined values.
+//
+
+//
+// Success, nothing went wrong
+//
+
+const
+ SDP_ERROR_SUCCESS = SDP_ERROR($0000);
+ {$EXTERNALSYM SDP_ERROR_SUCCESS}
+
+//
+// The SDP PDU or parameters other than the SDP stream response was not correct
+//
+
+ SDP_ERROR_SERVER_INVALID_RESPONSE = SDP_ERROR($0100);
+ {$EXTERNALSYM SDP_ERROR_SERVER_INVALID_RESPONSE}
+
+///
+/// The SDP response stream did not parse correctly.
+///
+
+ SDP_ERROR_SERVER_RESPONSE_DID_NOT_PARSE = SDP_ERROR($0200);
+ {$EXTERNALSYM SDP_ERROR_SERVER_RESPONSE_DID_NOT_PARSE}
+
+///
+/// The SDP response stream was successfully parsed, but did not match the
+/// required format for the query.
+///
+
+ SDP_ERROR_SERVER_BAD_FORMAT = SDP_ERROR($0300);
+ {$EXTERNALSYM SDP_ERROR_SERVER_BAD_FORMAT}
+
+///
+/// SDP was unable to send a continued query back to the server
+///
+
+ SDP_ERROR_COULD_NOT_SEND_CONTINUE = SDP_ERROR($0400);
+ {$EXTERNALSYM SDP_ERROR_COULD_NOT_SEND_CONTINUE}
+
+///
+/// Server sent a response that was too large to fit in the caller's buffer.
+///
+
+ SDP_ERROR_RESPONSE_TOO_LARGE = SDP_ERROR($0500);
+ {$EXTERNALSYM SDP_ERROR_RESPONSE_TOO_LARGE}
+
+ SDP_ATTRIB_RECORD_HANDLE = $0000;
+ {$EXTERNALSYM SDP_ATTRIB_RECORD_HANDLE}
+ SDP_ATTRIB_CLASS_ID_LIST = $0001;
+ {$EXTERNALSYM SDP_ATTRIB_CLASS_ID_LIST}
+ SDP_ATTRIB_RECORD_STATE = $0002;
+ {$EXTERNALSYM SDP_ATTRIB_RECORD_STATE}
+ SDP_ATTRIB_SERVICE_ID = $0003;
+ {$EXTERNALSYM SDP_ATTRIB_SERVICE_ID}
+ SDP_ATTRIB_PROTOCOL_DESCRIPTOR_LIST = $0004;
+ {$EXTERNALSYM SDP_ATTRIB_PROTOCOL_DESCRIPTOR_LIST}
+ SDP_ATTRIB_BROWSE_GROUP_LIST = $0005;
+ {$EXTERNALSYM SDP_ATTRIB_BROWSE_GROUP_LIST}
+ SDP_ATTRIB_LANG_BASE_ATTRIB_ID_LIST = $0006;
+ {$EXTERNALSYM SDP_ATTRIB_LANG_BASE_ATTRIB_ID_LIST}
+ SDP_ATTRIB_INFO_TIME_TO_LIVE = $0007;
+ {$EXTERNALSYM SDP_ATTRIB_INFO_TIME_TO_LIVE}
+ SDP_ATTRIB_AVAILABILITY = $0008;
+ {$EXTERNALSYM SDP_ATTRIB_AVAILABILITY}
+ SDP_ATTRIB_PROFILE_DESCRIPTOR_LIST = $0009;
+ {$EXTERNALSYM SDP_ATTRIB_PROFILE_DESCRIPTOR_LIST}
+ SDP_ATTRIB_DOCUMENTATION_URL = $000A;
+ {$EXTERNALSYM SDP_ATTRIB_DOCUMENTATION_URL}
+ SDP_ATTRIB_CLIENT_EXECUTABLE_URL = $000B;
+ {$EXTERNALSYM SDP_ATTRIB_CLIENT_EXECUTABLE_URL}
+ SDP_ATTRIB_ICON_URL = $000C;
+ {$EXTERNALSYM SDP_ATTRIB_ICON_URL}
+ SDP_ATTRIB_ADDITIONAL_PROTOCOL_DESCRIPTOR_LIST = $000D;
+ {$EXTERNALSYM SDP_ATTRIB_ADDITIONAL_PROTOCOL_DESCRIPTOR_LIST}
+
+//
+// Attribute IDs in the range of 0x000D - 0x01FF are reserved for future use
+//
+
+const
+ SDP_ATTRIB_PROFILE_SPECIFIC = $0200;
+ {$EXTERNALSYM SDP_ATTRIB_PROFILE_SPECIFIC}
+
+ LANG_BASE_LANGUAGE_INDEX = $0000;
+ {$EXTERNALSYM LANG_BASE_LANGUAGE_INDEX}
+ LANG_BASE_ENCODING_INDEX = $0001;
+ {$EXTERNALSYM LANG_BASE_ENCODING_INDEX}
+ LANG_BASE_OFFSET_INDEX = $0002;
+ {$EXTERNALSYM LANG_BASE_OFFSET_INDEX}
+ LANG_DEFAULT_ID = $0100;
+ {$EXTERNALSYM LANG_DEFAULT_ID}
+
+ STRING_NAME_OFFSET = $0000;
+ {$EXTERNALSYM STRING_NAME_OFFSET}
+ STRING_DESCRIPTION_OFFSET = $0001;
+ {$EXTERNALSYM STRING_DESCRIPTION_OFFSET}
+ STRING_PROVIDER_NAME_OFFSET = $0002;
+ {$EXTERNALSYM STRING_PROVIDER_NAME_OFFSET}
+
+ SDP_ATTRIB_SDP_VERSION_NUMBER_LIST = $0200;
+ {$EXTERNALSYM SDP_ATTRIB_SDP_VERSION_NUMBER_LIST}
+ SDP_ATTRIB_SDP_DATABASE_STATE = $0201;
+ {$EXTERNALSYM SDP_ATTRIB_SDP_DATABASE_STATE}
+
+ SDP_ATTRIB_BROWSE_GROUP_ID = $0200;
+ {$EXTERNALSYM SDP_ATTRIB_BROWSE_GROUP_ID}
+
+ SDP_ATTRIB_CORDLESS_EXTERNAL_NETWORK = $0301;
+ {$EXTERNALSYM SDP_ATTRIB_CORDLESS_EXTERNAL_NETWORK}
+
+ SDP_ATTRIB_FAX_CLASS_1_SUPPORT = $0302;
+ {$EXTERNALSYM SDP_ATTRIB_FAX_CLASS_1_SUPPORT}
+ SDP_ATTRIB_FAX_CLASS_2_0_SUPPORT = $0303;
+ {$EXTERNALSYM SDP_ATTRIB_FAX_CLASS_2_0_SUPPORT}
+ SDP_ATTRIB_FAX_CLASS_2_SUPPORT = $0304;
+ {$EXTERNALSYM SDP_ATTRIB_FAX_CLASS_2_SUPPORT}
+ SDP_ATTRIB_FAX_AUDIO_FEEDBACK_SUPPORT = $0305;
+ {$EXTERNALSYM SDP_ATTRIB_FAX_AUDIO_FEEDBACK_SUPPORT}
+
+ SDP_ATTRIB_HEADSET_REMOTE_AUDIO_VOLUME_CONTROL = $0302;
+ {$EXTERNALSYM SDP_ATTRIB_HEADSET_REMOTE_AUDIO_VOLUME_CONTROL}
+
+ SDP_ATTRIB_LAN_LPSUBNET = $0200;
+ {$EXTERNALSYM SDP_ATTRIB_LAN_LPSUBNET}
+
+ SDP_ATTRIB_OBJECT_PUSH_SUPPORTED_FORMATS_LIST = $0303;
+ {$EXTERNALSYM SDP_ATTRIB_OBJECT_PUSH_SUPPORTED_FORMATS_LIST}
+
+ SDP_ATTRIB_SYNCH_SUPPORTED_DATA_STORES_LIST = $0301;
+ {$EXTERNALSYM SDP_ATTRIB_SYNCH_SUPPORTED_DATA_STORES_LIST}
+
+// this is in the assigned numbers doc, but it does not show up in any profile
+
+const
+ SDP_ATTRIB_SERVICE_VERSION = $0300;
+ {$EXTERNALSYM SDP_ATTRIB_SERVICE_VERSION}
+
+ SDP_ATTRIB_PAN_NETWORK_ADDRESS = $0306;
+ {$EXTERNALSYM SDP_ATTRIB_PAN_NETWORK_ADDRESS}
+ SDP_ATTRIB_PAN_WAP_GATEWAY = $0307;
+ {$EXTERNALSYM SDP_ATTRIB_PAN_WAP_GATEWAY}
+ SDP_ATTRIB_PAN_HOME_PAGE_URL = $0308;
+ {$EXTERNALSYM SDP_ATTRIB_PAN_HOME_PAGE_URL}
+ SDP_ATTRIB_PAN_WAP_STACK_TYPE = $0309;
+ {$EXTERNALSYM SDP_ATTRIB_PAN_WAP_STACK_TYPE}
+ SDP_ATTRIB_PAN_SECURITY_DESCRIPTION = $030A;
+ {$EXTERNALSYM SDP_ATTRIB_PAN_SECURITY_DESCRIPTION}
+ SDP_ATTRIB_PAN_NET_ACCESS_TYPE = $030B;
+ {$EXTERNALSYM SDP_ATTRIB_PAN_NET_ACCESS_TYPE}
+ SDP_ATTRIB_PAN_MAX_NET_ACCESS_RATE = $030C;
+ {$EXTERNALSYM SDP_ATTRIB_PAN_MAX_NET_ACCESS_RATE}
+
+ SDP_ATTRIB_IMAGING_SUPPORTED_CAPABILITIES = $0310;
+ {$EXTERNALSYM SDP_ATTRIB_IMAGING_SUPPORTED_CAPABILITIES}
+ SDP_ATTRIB_IMAGING_SUPPORTED_FEATURES = $0311;
+ {$EXTERNALSYM SDP_ATTRIB_IMAGING_SUPPORTED_FEATURES}
+ SDP_ATTRIB_IMAGING_SUPPORTED_FUNCTIONS = $0312;
+ {$EXTERNALSYM SDP_ATTRIB_IMAGING_SUPPORTED_FUNCTIONS}
+ SDP_ATTRIB_IMAGING_TOTAL_DATA_CAPACITY = $0313;
+ {$EXTERNALSYM SDP_ATTRIB_IMAGING_TOTAL_DATA_CAPACITY}
+
+ SDP_ATTRIB_DI_SPECIFICATION_ID = $0200;
+ {$EXTERNALSYM SDP_ATTRIB_DI_SPECIFICATION_ID}
+ SDP_ATTRIB_DI_VENDOR_ID = $0201;
+ {$EXTERNALSYM SDP_ATTRIB_DI_VENDOR_ID}
+ SDP_ATTRIB_DI_PRODUCT_ID = $0202;
+ {$EXTERNALSYM SDP_ATTRIB_DI_PRODUCT_ID}
+ SDP_ATTRIB_DI_VERSION = $0203;
+ {$EXTERNALSYM SDP_ATTRIB_DI_VERSION}
+ SDP_ATTRIB_DI_PRIMARY_RECORD = $0204;
+ {$EXTERNALSYM SDP_ATTRIB_DI_PRIMARY_RECORD}
+ SDP_ATTRIB_DI_VENDOR_ID_SOURCE = $0205;
+ {$EXTERNALSYM SDP_ATTRIB_DI_VENDOR_ID_SOURCE}
+
+ SDP_ATTRIB_HID_DEVICE_RELEASE_NUMBER = $0200;
+ {$EXTERNALSYM SDP_ATTRIB_HID_DEVICE_RELEASE_NUMBER}
+ SDP_ATTRIB_HID_PARSER_VERSION = $0201;
+ {$EXTERNALSYM SDP_ATTRIB_HID_PARSER_VERSION}
+ SDP_ATTRIB_HID_DEVICE_SUBCLASS = $0202;
+ {$EXTERNALSYM SDP_ATTRIB_HID_DEVICE_SUBCLASS}
+ SDP_ATTRIB_HID_COUNTRY_CODE = $0203;
+ {$EXTERNALSYM SDP_ATTRIB_HID_COUNTRY_CODE}
+ SDP_ATTRIB_HID_VIRTUAL_CABLE = $0204;
+ {$EXTERNALSYM SDP_ATTRIB_HID_VIRTUAL_CABLE}
+ SDP_ATTRIB_HID_RECONNECT_INITIATE = $0205;
+ {$EXTERNALSYM SDP_ATTRIB_HID_RECONNECT_INITIATE}
+ SDP_ATTRIB_HID_DESCRIPTOR_LIST = $0206;
+ {$EXTERNALSYM SDP_ATTRIB_HID_DESCRIPTOR_LIST}
+ SDP_ATTRIB_HID_LANG_ID_BASE_LIST = $0207;
+ {$EXTERNALSYM SDP_ATTRIB_HID_LANG_ID_BASE_LIST}
+ SDP_ATTRIB_HID_SDP_DISABLE = $0208;
+ {$EXTERNALSYM SDP_ATTRIB_HID_SDP_DISABLE}
+ SDP_ATTRIB_HID_BATTERY_POWER = $0209;
+ {$EXTERNALSYM SDP_ATTRIB_HID_BATTERY_POWER}
+ SDP_ATTRIB_HID_REMOTE_WAKE = $020A;
+ {$EXTERNALSYM SDP_ATTRIB_HID_REMOTE_WAKE}
+ SDP_ATTRIB_HID_REPORT_LIST = $020B;
+ {$EXTERNALSYM SDP_ATTRIB_HID_REPORT_LIST}
+ SDP_ATTRIB_HID_SUPERVISION_TIMEOUT = $020C;
+ {$EXTERNALSYM SDP_ATTRIB_HID_SUPERVISION_TIMEOUT}
+ SDP_ATTRIB_HID_NORMALLY_CONNECTABLE = $020D;
+ {$EXTERNALSYM SDP_ATTRIB_HID_NORMALLY_CONNECTABLE}
+ SDP_ATTRIB_HID_BOOT_DEVICE = $020E;
+ {$EXTERNALSYM SDP_ATTRIB_HID_BOOT_DEVICE}
+
+//
+// Profile specific values
+//
+
+ CORDLESS_EXTERNAL_NETWORK_PSTN = $01;
+ {$EXTERNALSYM CORDLESS_EXTERNAL_NETWORK_PSTN}
+ CORDLESS_EXTERNAL_NETWORK_ISDN = $02;
+ {$EXTERNALSYM CORDLESS_EXTERNAL_NETWORK_ISDN}
+ CORDLESS_EXTERNAL_NETWORK_GSM = $03;
+ {$EXTERNALSYM CORDLESS_EXTERNAL_NETWORK_GSM}
+ CORDLESS_EXTERNAL_NETWORK_CDMA = $04;
+ {$EXTERNALSYM CORDLESS_EXTERNAL_NETWORK_CDMA}
+ CORDLESS_EXTERNAL_NETWORK_ANALOG_CELLULAR = $05;
+ {$EXTERNALSYM CORDLESS_EXTERNAL_NETWORK_ANALOG_CELLULAR}
+ CORDLESS_EXTERNAL_NETWORK_PACKET_SWITCHED = $06;
+ {$EXTERNALSYM CORDLESS_EXTERNAL_NETWORK_PACKET_SWITCHED}
+ CORDLESS_EXTERNAL_NETWORK_OTHER = $07;
+ {$EXTERNALSYM CORDLESS_EXTERNAL_NETWORK_OTHER}
+
+ OBJECT_PUSH_FORMAT_VCARD_2_1 = $01;
+ {$EXTERNALSYM OBJECT_PUSH_FORMAT_VCARD_2_1}
+ OBJECT_PUSH_FORMAT_VCARD_3_0 = $02;
+ {$EXTERNALSYM OBJECT_PUSH_FORMAT_VCARD_3_0}
+ OBJECT_PUSH_FORMAT_VCAL_1_0 = $03;
+ {$EXTERNALSYM OBJECT_PUSH_FORMAT_VCAL_1_0}
+ OBJECT_PUSH_FORMAT_ICAL_2_0 = $04;
+ {$EXTERNALSYM OBJECT_PUSH_FORMAT_ICAL_2_0}
+ OBJECT_PUSH_FORMAT_VNOTE = $05;
+ {$EXTERNALSYM OBJECT_PUSH_FORMAT_VNOTE}
+ OBJECT_PUSH_FORMAT_VMESSAGE = $06;
+ {$EXTERNALSYM OBJECT_PUSH_FORMAT_VMESSAGE}
+ OBJECT_PUSH_FORMAT_ANY = $FF;
+ {$EXTERNALSYM OBJECT_PUSH_FORMAT_ANY}
+
+ SYNCH_DATA_STORE_PHONEBOOK = $01;
+ {$EXTERNALSYM SYNCH_DATA_STORE_PHONEBOOK}
+ SYNCH_DATA_STORE_CALENDAR = $03;
+ {$EXTERNALSYM SYNCH_DATA_STORE_CALENDAR}
+ SYNCH_DATA_STORE_NOTES = $05;
+ {$EXTERNALSYM SYNCH_DATA_STORE_NOTES}
+ SYNCH_DATA_STORE_MESSAGES = $06;
+ {$EXTERNALSYM SYNCH_DATA_STORE_MESSAGES}
+
+ DI_VENDOR_ID_SOURCE_BLUETOOTH_SIG = $0001;
+ {$EXTERNALSYM DI_VENDOR_ID_SOURCE_BLUETOOTH_SIG}
+ DI_VENDOR_ID_SOURCE_USB_IF = $0002;
+ {$EXTERNALSYM DI_VENDOR_ID_SOURCE_USB_IF}
+
+ PSM_SDP = $0001;
+ {$EXTERNALSYM PSM_SDP}
+ PSM_RFCOMM = $0003;
+ {$EXTERNALSYM PSM_RFCOMM}
+ PSM_TCS_BIN = $0005;
+ {$EXTERNALSYM PSM_TCS_BIN}
+ PSM_TCS_BIN_CORDLESS = $0007;
+ {$EXTERNALSYM PSM_TCS_BIN_CORDLESS}
+ PSM_BNEP = $000;
+ {$EXTERNALSYM PSM_BNEP}
+ PSM_HID_CONTROL = $0011;
+ {$EXTERNALSYM PSM_HID_CONTROL}
+ PSM_HID_INTERRUPT = $0013;
+ {$EXTERNALSYM PSM_HID_INTERRUPT}
+ PSM_AVCTP = $0017;
+ {$EXTERNALSYM PSM_AVCTP}
+ PSM_AVDTP = $0019;
+ {$EXTERNALSYM PSM_AVDTP}
+ PSM_UDI_C_PLANE = $001D;
+ {$EXTERNALSYM PSM_UDI_C_PLANE}
+
+//
+// Strings
+//
+
+const
+ STR_ADDR_FMTA = '(%02x:%02x:%02x:%02x:%02x:%02x)';
+ {$EXTERNALSYM STR_ADDR_FMTA}
+ STR_ADDR_FMTW = '(%02x:%02x:%02x:%02x:%02x:%02x)';
+ {$EXTERNALSYM STR_ADDR_FMTW}
+
+ STR_ADDR_SHORT_FMTA = '%04x%08x';
+ {$EXTERNALSYM STR_ADDR_SHORT_FMTA}
+ STR_ADDR_SHORT_FMTW = '%04x%08x';
+ {$EXTERNALSYM STR_ADDR_SHORT_FMTW}
+
+{$IFDEF UNICODE}
+ STR_ADDR_FMT = STR_ADDR_FMTW;
+ {$EXTERNALSYM STR_ADDR_FMT}
+ STR_ADDR_SHORT_FMT = STR_ADDR_SHORT_FMTW;
+ {$EXTERNALSYM STR_ADDR_SHORT_FMT}
+{$ELSE}
+ STR_ADDR_FMT = STR_ADDR_FMTA;
+ {$EXTERNALSYM STR_ADDR_FMT}
+ STR_ADDR_SHORT_FMT = STR_ADDR_SHORT_FMTA;
+ {$EXTERNALSYM STR_ADDR_SHORT_FMT}
+{$ENDIF UNICODE}
+
+function GET_BITS(Field, Offset, Mask: Integer): Integer;
+{$EXTERNALSYM GET_BITS}
+function GET_BIT(Field, Offset: Integer): Integer;
+{$EXTERNALSYM GET_BIT}
+
+function LMP_3_SLOT_PACKETS(X: Integer): Integer;
+{$EXTERNALSYM LMP_3_SLOT_PACKETS}
+function LMP_5_SLOT_PACKETS(X: Integer): Integer;
+{$EXTERNALSYM LMP_5_SLOT_PACKETS}
+function LMP_ENCRYPTION(X: Integer): Integer;
+{$EXTERNALSYM LMP_ENCRYPTION}
+function LMP_SLOT_OFFSET(X: Integer): Integer;
+{$EXTERNALSYM LMP_SLOT_OFFSET}
+function LMP_TIMING_ACCURACY(X: Integer): Integer;
+{$EXTERNALSYM LMP_TIMING_ACCURACY}
+function LMP_SWITCH(X: Integer): Integer;
+{$EXTERNALSYM LMP_SWITCH}
+function LMP_HOLD_MODE(X: Integer): Integer;
+{$EXTERNALSYM LMP_HOLD_MODE}
+function LMP_SNIFF_MODE(X: Integer): Integer;
+{$EXTERNALSYM LMP_SNIFF_MODE}
+function LMP_PARK_MODE(X: Integer): Integer;
+{$EXTERNALSYM LMP_PARK_MODE}
+function LMP_RSSI(X: Integer): Integer;
+{$EXTERNALSYM LMP_RSSI}
+function LMP_CHANNEL_QUALITY_DRIVEN_MODE(X: Integer): Integer;
+{$EXTERNALSYM LMP_CHANNEL_QUALITY_DRIVEN_MODE}
+function LMP_SCO_LINK(X: Integer): Integer;
+{$EXTERNALSYM LMP_SCO_LINK}
+function LMP_HV2_PACKETS(X: Integer): Integer;
+{$EXTERNALSYM LMP_HV2_PACKETS}
+function LMP_HV3_PACKETS(X: Integer): Integer;
+{$EXTERNALSYM LMP_HV3_PACKETS}
+function LMP_MU_LAW_LOG(X: Integer): Integer;
+{$EXTERNALSYM LMP_MU_LAW_LOG}
+function LMP_A_LAW_LOG(X: Integer): Integer;
+{$EXTERNALSYM LMP_A_LAW_LOG}
+function LMP_CVSD(X: Integer): Integer;
+{$EXTERNALSYM LMP_CVSD}
+function LMP_PAGING_SCHEME(X: Integer): Integer;
+{$EXTERNALSYM LMP_PAGING_SCHEME}
+function LMP_POWER_CONTROL(X: Integer): Integer;
+{$EXTERNALSYM LMP_POWER_CONTROL}
+function LMP_TRANSPARENT_SCO_DATA(X: Integer): Integer;
+{$EXTERNALSYM LMP_TRANSPARENT_SCO_DATA}
+function LMP_FLOW_CONTROL_LAG(X: Integer): Integer;
+{$EXTERNALSYM LMP_FLOW_CONTROL_LAG}
+
+implementation
+
+function GET_NAP(_bth_addr: BTH_ADDR): Word;
+begin
+ Result := ((_bth_addr and NAP_MASK) shr NAP_BIT_OFFSET);
+end;
+
+function GET_SAP(_bth_addr: BTH_ADDR): ULONG;
+begin
+ Result := ((_bth_addr and SAP_MASK) shr SAP_BIT_OFFSET);
+end;
+
+function SET_NAP(_nap: Word): Int64;
+begin
+ Result := (_nap shl NAP_BIT_OFFSET);
+end;
+
+function SET_SAP(_sap: ULONG): Int64;
+begin
+ Result := (_sap shl SAP_BIT_OFFSET);
+end;
+
+function SET_NAP_SAP(_nap, _sap: Word): Int64;
+begin
+ Result := (SET_NAP(_nap) or SET_SAP(_sap));
+end;
+
+function GET_COD_LAN_MINOR(_cod: DWORD): DWORD;
+begin
+ Result := ((_cod and COD_LAN_MINOR_MASK) shr COD_MINOR_BIT_OFFSET);
+end;
+
+function GET_COD_LAN_ACCESS(_cod: DWORD): DWORD;
+begin
+ Result := ((_cod and COD_LAN_ACCESS_MASK) shr COD_LAN_ACCESS_BIT_OFFSET);
+end;
+
+function BTH_ERROR(_btStatus: BTHSTATUS): BOOL;
+begin
+ Result := _btStatus <> BTH_ERROR_SUCCESS;
+end;
+
+function BTH_SUCCESS(_btStatus: BTHSTATUS): BOOL;
+begin
+ Result := _btStatus = BTH_ERROR_SUCCESS;
+end;
+
+function GET_BITS(Field, Offset, Mask: Integer): Integer;
+begin
+ Result := (Field shr Offset) and Mask;
+end;
+
+function GET_BIT(field,offset: Integer): Integer;
+begin
+ Result := GET_BITS(Field, Offset, $1);
+end;
+
+function LMP_3_SLOT_PACKETS(X: Integer): Integer;
+begin
+ Result := GET_BIT(x, 0);
+end;
+
+function LMP_5_SLOT_PACKETS(X: Integer): Integer;
+begin
+ Result := GET_BIT(x, 1);
+end;
+
+function LMP_ENCRYPTION(X: Integer): Integer;
+begin
+ Result := GET_BIT(x, 2);
+end;
+
+function LMP_SLOT_OFFSET(X: Integer): Integer;
+begin
+ Result := GET_BIT(x, 3);
+end;
+
+function LMP_TIMING_ACCURACY(X: Integer): Integer;
+begin
+ Result := GET_BIT(x, 4);
+end;
+
+function LMP_SWITCH(X: Integer): Integer;
+begin
+ Result := GET_BIT(x, 5);
+end;
+
+function LMP_HOLD_MODE(X: Integer): Integer;
+begin
+ Result := GET_BIT(x, 6);
+end;
+
+function LMP_SNIFF_MODE(X: Integer): Integer;
+begin
+ Result := GET_BIT(x, 7);
+end;
+
+function LMP_PARK_MODE(X: Integer): Integer;
+begin
+ Result := GET_BIT(x, 8);
+end;
+
+function LMP_RSSI(X: Integer): Integer;
+begin
+ Result := GET_BIT(x, 9);
+end;
+
+function LMP_CHANNEL_QUALITY_DRIVEN_MODE(X: Integer): Integer;
+begin
+ Result := GET_BIT(x, 10);
+end;
+
+function LMP_SCO_LINK(X: Integer): Integer;
+begin
+ Result := GET_BIT(x, 11);
+end;
+
+function LMP_HV2_PACKETS(X: Integer): Integer;
+begin
+ Result := GET_BIT(x, 12);
+end;
+
+function LMP_HV3_PACKETS(X: Integer): Integer;
+begin
+ Result := GET_BIT(x, 13);
+end;
+
+function LMP_MU_LAW_LOG(X: Integer): Integer;
+begin
+ Result := GET_BIT(x, 14);
+end;
+
+function LMP_A_LAW_LOG(X: Integer): Integer;
+begin
+ Result := GET_BIT(x, 15);
+end;
+
+function LMP_CVSD(X: Integer): Integer;
+begin
+ Result := GET_BIT(x, 16);
+end;
+
+function LMP_PAGING_SCHEME(X: Integer): Integer;
+begin
+ Result := GET_BIT(x, 17);
+end;
+
+function LMP_POWER_CONTROL(X: Integer): Integer;
+begin
+ Result := GET_BIT(x, 18);
+end;
+
+function LMP_TRANSPARENT_SCO_DATA(X: Integer): Integer;
+begin
+ Result := GET_BIT(x, 19);
+end;
+
+function LMP_FLOW_CONTROL_LAG(X: Integer): Integer;
+begin
+ Result := GET_BITS(x, 20, $3);
+end;
+
+function GET_COD_FORMAT(_cod: BTH_COD): BTH_COD;
+begin
+ Result := (_cod and COD_FORMAT_MASK) shr COD_FORMAT_BIT_OFFSET;
+end;
+
+function GET_COD_MINOR(_cod: BTH_COD): BTH_COD;
+begin
+ Result := (_cod and COD_MINOR_MASK) shr COD_MINOR_BIT_OFFSET;
+end;
+
+function GET_COD_MAJOR(_cod: BTH_COD): BTH_COD;
+begin
+ Result := (_cod and COD_MAJOR_MASK) shr COD_MAJOR_BIT_OFFSET;
+end;
+
+function GET_COD_SERVICE(_cod: BTH_COD): BTH_COD;
+begin
+ Result := (_cod and COD_SERVICE_MASK) shr COD_SERVICE_BIT_OFFSET;
+end;
+
+procedure SET_COD_MINOR(var _cod: BTH_COD; _minor: BTH_COD);
+begin
+ _cod := (_cod and not COD_MINOR_MASK) or (_minor shl COD_MINOR_BIT_OFFSET);
+end;
+
+procedure SET_COD_MAJOR(var _cod: BTH_COD; _major: BTH_COD);
+begin
+ _cod := (_cod and not COD_MAJOR_MASK) or (_major shl COD_MAJOR_BIT_OFFSET);
+end;
+
+procedure SET_COD_SERVICE(var _cod: BTH_COD; _service: BTH_COD);
+begin
+ _cod := (_cod and not COD_SERVICE_MASK) or (_service shl COD_SERVICE_BIT_OFFSET);
+end;
+
+end.
diff --git a/packages/extra/winunits/jwabthsdpdef.pas b/packages/extra/winunits/jwabthsdpdef.pas
index 28e60e88fe..687b764d9e 100644
--- a/packages/extra/winunits/jwabthsdpdef.pas
+++ b/packages/extra/winunits/jwabthsdpdef.pas
@@ -1,192 +1,192 @@
-{******************************************************************************}
-{ }
-{ BlueTooth API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Contributors: John Penman }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwabthsdpdef.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JWaBthSdpDef;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "bthsdpdef.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaWinType;
-
-type
- SDP_LARGE_INTEGER_16 = record
- LowPart: Int64;
- HighPart: Int64;
- end;
- {$EXTERNALSYM SDP_LARGE_INTEGER_16}
- PSDP_LARGE_INTEGER_16 = ^SDP_LARGE_INTEGER_16;
- {$EXTERNALSYM PSDP_LARGE_INTEGER_16}
- LPSDP_LARGE_INTEGER_16 = PSDP_LARGE_INTEGER_16;
- {$EXTERNALSYM LPSDP_LARGE_INTEGER_16}
- TSdpLargeInteger = SDP_LARGE_INTEGER_16;
- PSdpLargeInteger = PSDP_LARGE_INTEGER_16;
-
- SDP_ULARGE_INTEGER_16 = record
- LowPart: Int64;
- HighPart: Int64;
- end;
- {$EXTERNALSYM SDP_ULARGE_INTEGER_16}
- PSDP_ULARGE_INTEGER_16 = ^SDP_ULARGE_INTEGER_16;
- {$EXTERNALSYM PSDP_ULARGE_INTEGER_16}
- LPSDP_ULARGE_INTEGER_16 = PSDP_ULARGE_INTEGER_16;
- {$EXTERNALSYM LPSDP_ULARGE_INTEGER_16}
- TSdpULargeInteger16 = SDP_ULARGE_INTEGER_16;
- PSdpULargeInteger16 = PSDP_ULARGE_INTEGER_16;
-
- NodeContainerType = (NodeContainerTypeSequence, NodeContainerTypeAlternative);
- TNodeContainerType = NodeContainerType;
-
- SDP_ERROR = Word;
- {$EXTERNALSYM SDP_ERROR}
- PSDP_ERROR = ^SDP_ERROR;
- {$EXTERNALSYM PSDP_ERROR}
- TSdpError = SDP_ERROR;
- PSdpError = PSDP_ERROR;
-
-type
- SDP_TYPE = DWORD;
- {$EXTERNALSYM SDP_TYPE}
- TSdpType = SDP_TYPE;
-
-const
- SDP_TYPE_NIL = $00;
- {$EXTERNALSYM SDP_TYPE_NIL}
- SDP_TYPE_UINT = $01;
- {$EXTERNALSYM SDP_TYPE_UINT}
- SDP_TYPE_INT = $02;
- {$EXTERNALSYM SDP_TYPE_INT}
- SDP_TYPE_UUID = $03;
- {$EXTERNALSYM SDP_TYPE_UUID}
- SDP_TYPE_STRING = $04;
- {$EXTERNALSYM SDP_TYPE_STRING}
- SDP_TYPE_BOOLEAN = $05;
- {$EXTERNALSYM SDP_TYPE_BOOLEAN}
- SDP_TYPE_SEQUENCE = $06;
- {$EXTERNALSYM SDP_TYPE_SEQUENCE}
- SDP_TYPE_ALTERNATIVE = $07;
- {$EXTERNALSYM SDP_TYPE_ALTERNATIVE}
- SDP_TYPE_URL = $08;
- {$EXTERNALSYM SDP_TYPE_URL}
- // 9 - 31 are reserved
- SDP_TYPE_CONTAINER = $20;
- {$EXTERNALSYM SDP_TYPE_CONTAINER}
-
-// allow for a little easier type checking / sizing for integers and UUIDs
-// ((SDP_ST_XXX & 0xF0) >> 4) == SDP_TYPE_XXX
-// size of the data (in bytes) is encoded as ((SDP_ST_XXX & 0xF0) >> 8)
-
-type
- SDP_SPECIFICTYPE = DWORD;
- {$EXTERNALSYM SDP_SPECIFICTYPE}
- TSdpSpecificType = SDP_SPECIFICTYPE;
-
-const
- SDP_ST_NONE = $0000;
- {$EXTERNALSYM SDP_ST_NONE}
-
- SDP_ST_UINT8 = $0010;
- {$EXTERNALSYM SDP_ST_UINT8}
- SDP_ST_UINT16 = $0110;
- {$EXTERNALSYM SDP_ST_UINT16}
- SDP_ST_UINT32 = $0210;
- {$EXTERNALSYM SDP_ST_UINT32}
- SDP_ST_UINT64 = $0310;
- {$EXTERNALSYM SDP_ST_UINT64}
- SDP_ST_UINT128 = $0410;
- {$EXTERNALSYM SDP_ST_UINT128}
-
- SDP_ST_INT8 = $0020;
- {$EXTERNALSYM SDP_ST_INT8}
- SDP_ST_INT16 = $0120;
- {$EXTERNALSYM SDP_ST_INT16}
- SDP_ST_INT32 = $0220;
- {$EXTERNALSYM SDP_ST_INT32}
- SDP_ST_INT64 = $0320;
- {$EXTERNALSYM SDP_ST_INT64}
- SDP_ST_INT128 = $0420;
- {$EXTERNALSYM SDP_ST_INT128}
-
- SDP_ST_UUID16 = $0130;
- {$EXTERNALSYM SDP_ST_UUID16}
- SDP_ST_UUID32 = $0220;
- {$EXTERNALSYM SDP_ST_UUID32}
- SDP_ST_UUID128 = $0430;
- {$EXTERNALSYM SDP_ST_UUID128}
-
-type
- _SdpAttributeRange = record
- minAttribute: Word;
- maxAttribute: Word;
- end;
- {$EXTERNALSYM _SdpAttributeRange}
- SdpAttributeRange = _SdpAttributeRange;
- {$EXTERNALSYM SdpAttributeRange}
- TSdpAttributeRange = SdpAttributeRange;
-
- SdpQueryUuidUnion = record
- case Integer of
- 0: (uuid128: TGUID);
- 1: (uuid32: ULONG);
- 2: (uuid16: Word);
- end;
- TSdpQueryUuidUnion = SdpQueryUuidUnion;
-
- _SdpQueryUuid = record
- u: SdpQueryUuidUnion;
- uuidType: Word;
- end;
- {$EXTERNALSYM _SdpQueryUuid}
- SdpQueryUuid = _SdpQueryUuid;
- {$EXTERNALSYM SdpQueryUuid}
- TSdpQueryUuid = SdpQueryUuid;
-
-implementation
-
-end.
+{******************************************************************************}
+{ }
+{ BlueTooth API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Contributors: John Penman }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwabthsdpdef.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JWaBthSdpDef;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "bthsdpdef.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaWinType;
+
+type
+ SDP_LARGE_INTEGER_16 = record
+ LowPart: Int64;
+ HighPart: Int64;
+ end;
+ {$EXTERNALSYM SDP_LARGE_INTEGER_16}
+ PSDP_LARGE_INTEGER_16 = ^SDP_LARGE_INTEGER_16;
+ {$EXTERNALSYM PSDP_LARGE_INTEGER_16}
+ LPSDP_LARGE_INTEGER_16 = PSDP_LARGE_INTEGER_16;
+ {$EXTERNALSYM LPSDP_LARGE_INTEGER_16}
+ TSdpLargeInteger = SDP_LARGE_INTEGER_16;
+ PSdpLargeInteger = PSDP_LARGE_INTEGER_16;
+
+ SDP_ULARGE_INTEGER_16 = record
+ LowPart: Int64;
+ HighPart: Int64;
+ end;
+ {$EXTERNALSYM SDP_ULARGE_INTEGER_16}
+ PSDP_ULARGE_INTEGER_16 = ^SDP_ULARGE_INTEGER_16;
+ {$EXTERNALSYM PSDP_ULARGE_INTEGER_16}
+ LPSDP_ULARGE_INTEGER_16 = PSDP_ULARGE_INTEGER_16;
+ {$EXTERNALSYM LPSDP_ULARGE_INTEGER_16}
+ TSdpULargeInteger16 = SDP_ULARGE_INTEGER_16;
+ PSdpULargeInteger16 = PSDP_ULARGE_INTEGER_16;
+
+ NodeContainerType = (NodeContainerTypeSequence, NodeContainerTypeAlternative);
+ TNodeContainerType = NodeContainerType;
+
+ SDP_ERROR = Word;
+ {$EXTERNALSYM SDP_ERROR}
+ PSDP_ERROR = ^SDP_ERROR;
+ {$EXTERNALSYM PSDP_ERROR}
+ TSdpError = SDP_ERROR;
+ PSdpError = PSDP_ERROR;
+
+type
+ SDP_TYPE = DWORD;
+ {$EXTERNALSYM SDP_TYPE}
+ TSdpType = SDP_TYPE;
+
+const
+ SDP_TYPE_NIL = $00;
+ {$EXTERNALSYM SDP_TYPE_NIL}
+ SDP_TYPE_UINT = $01;
+ {$EXTERNALSYM SDP_TYPE_UINT}
+ SDP_TYPE_INT = $02;
+ {$EXTERNALSYM SDP_TYPE_INT}
+ SDP_TYPE_UUID = $03;
+ {$EXTERNALSYM SDP_TYPE_UUID}
+ SDP_TYPE_STRING = $04;
+ {$EXTERNALSYM SDP_TYPE_STRING}
+ SDP_TYPE_BOOLEAN = $05;
+ {$EXTERNALSYM SDP_TYPE_BOOLEAN}
+ SDP_TYPE_SEQUENCE = $06;
+ {$EXTERNALSYM SDP_TYPE_SEQUENCE}
+ SDP_TYPE_ALTERNATIVE = $07;
+ {$EXTERNALSYM SDP_TYPE_ALTERNATIVE}
+ SDP_TYPE_URL = $08;
+ {$EXTERNALSYM SDP_TYPE_URL}
+ // 9 - 31 are reserved
+ SDP_TYPE_CONTAINER = $20;
+ {$EXTERNALSYM SDP_TYPE_CONTAINER}
+
+// allow for a little easier type checking / sizing for integers and UUIDs
+// ((SDP_ST_XXX & 0xF0) >> 4) == SDP_TYPE_XXX
+// size of the data (in bytes) is encoded as ((SDP_ST_XXX & 0xF0) >> 8)
+
+type
+ SDP_SPECIFICTYPE = DWORD;
+ {$EXTERNALSYM SDP_SPECIFICTYPE}
+ TSdpSpecificType = SDP_SPECIFICTYPE;
+
+const
+ SDP_ST_NONE = $0000;
+ {$EXTERNALSYM SDP_ST_NONE}
+
+ SDP_ST_UINT8 = $0010;
+ {$EXTERNALSYM SDP_ST_UINT8}
+ SDP_ST_UINT16 = $0110;
+ {$EXTERNALSYM SDP_ST_UINT16}
+ SDP_ST_UINT32 = $0210;
+ {$EXTERNALSYM SDP_ST_UINT32}
+ SDP_ST_UINT64 = $0310;
+ {$EXTERNALSYM SDP_ST_UINT64}
+ SDP_ST_UINT128 = $0410;
+ {$EXTERNALSYM SDP_ST_UINT128}
+
+ SDP_ST_INT8 = $0020;
+ {$EXTERNALSYM SDP_ST_INT8}
+ SDP_ST_INT16 = $0120;
+ {$EXTERNALSYM SDP_ST_INT16}
+ SDP_ST_INT32 = $0220;
+ {$EXTERNALSYM SDP_ST_INT32}
+ SDP_ST_INT64 = $0320;
+ {$EXTERNALSYM SDP_ST_INT64}
+ SDP_ST_INT128 = $0420;
+ {$EXTERNALSYM SDP_ST_INT128}
+
+ SDP_ST_UUID16 = $0130;
+ {$EXTERNALSYM SDP_ST_UUID16}
+ SDP_ST_UUID32 = $0220;
+ {$EXTERNALSYM SDP_ST_UUID32}
+ SDP_ST_UUID128 = $0430;
+ {$EXTERNALSYM SDP_ST_UUID128}
+
+type
+ _SdpAttributeRange = record
+ minAttribute: Word;
+ maxAttribute: Word;
+ end;
+ {$EXTERNALSYM _SdpAttributeRange}
+ SdpAttributeRange = _SdpAttributeRange;
+ {$EXTERNALSYM SdpAttributeRange}
+ TSdpAttributeRange = SdpAttributeRange;
+
+ SdpQueryUuidUnion = record
+ case Integer of
+ 0: (uuid128: TGUID);
+ 1: (uuid32: ULONG);
+ 2: (uuid16: Word);
+ end;
+ TSdpQueryUuidUnion = SdpQueryUuidUnion;
+
+ _SdpQueryUuid = record
+ u: SdpQueryUuidUnion;
+ uuidType: Word;
+ end;
+ {$EXTERNALSYM _SdpQueryUuid}
+ SdpQueryUuid = _SdpQueryUuid;
+ {$EXTERNALSYM SdpQueryUuid}
+ TSdpQueryUuid = SdpQueryUuid;
+
+implementation
+
+end.
diff --git a/packages/extra/winunits/jwabugcodes.pas b/packages/extra/winunits/jwabugcodes.pas
index 22526cf026..30c703057a 100644
--- a/packages/extra/winunits/jwabugcodes.pas
+++ b/packages/extra/winunits/jwabugcodes.pas
@@ -1,2856 +1,2856 @@
-{******************************************************************************}
-{ }
-{ NT Bug Codes API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: bugcodes.h, released June 2000. The original Pascal }
-{ code is: BugCodes.pas, released December 2000. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwabugcodes.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaBugCodes;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "bugcodes.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaWinType;
-
-{$I jediapilib.inc}
-
-//
-// Values are 32 bit values layed out as follows:
-//
-// 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1
-// 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
-// +---+-+-+-----------------------+-------------------------------+
-// |Sev|C|R| Facility | Code |
-// +---+-+-+-----------------------+-------------------------------+
-//
-// where
-//
-// Sev - is the severity code
-//
-// 00 - Success
-// 01 - Informational
-// 10 - Warning
-// 11 - Error
-//
-// C - is the Customer code flag
-//
-// R - is a reserved bit
-//
-// Facility - is the facility code
-//
-// Code - is the facility's status code
-//
-//
-// Define the facility codes
-//
-
-//
-// Define the severity codes
-//
-
-const
-
-//
-// MessageId: APC_INDEX_MISMATCH
-//
-// MessageText:
-//
-// APC_INDEX_MISMATCH
-//
-
- APC_INDEX_MISMATCH = ULONG($00000001);
- {$EXTERNALSYM APC_INDEX_MISMATCH}
-
-//
-// MessageId: DEVICE_QUEUE_NOT_BUSY
-//
-// MessageText:
-//
-// DEVICE_QUEUE_NOT_BUSY
-//
-
- DEVICE_QUEUE_NOT_BUSY = ULONG($00000002);
- {$EXTERNALSYM DEVICE_QUEUE_NOT_BUSY}
-
-//
-// MessageId: INVALID_AFFINITY_SET
-//
-// MessageText:
-//
-// INVALID_AFFINITY_SET
-//
-
- INVALID_AFFINITY_SET = ULONG($00000003);
- {$EXTERNALSYM INVALID_AFFINITY_SET}
-
-//
-// MessageId: INVALID_DATA_ACCESS_TRAP
-//
-// MessageText:
-//
-// INVALID_DATA_ACCESS_TRAP
-//
-
- INVALID_DATA_ACCESS_TRAP = ULONG($00000004);
- {$EXTERNALSYM INVALID_DATA_ACCESS_TRAP}
-
-//
-// MessageId: INVALID_PROCESS_ATTACH_ATTEMPT
-//
-// MessageText:
-//
-// INVALID_PROCESS_ATTACH_ATTEMPT
-//
-
- INVALID_PROCESS_ATTACH_ATTEMPT = ULONG($00000005);
- {$EXTERNALSYM INVALID_PROCESS_ATTACH_ATTEMPT}
-
-//
-// MessageId: INVALID_PROCESS_DETACH_ATTEMPT
-//
-// MessageText:
-//
-// INVALID_PROCESS_DETACH_ATTEMPT
-//
-
- INVALID_PROCESS_DETACH_ATTEMPT = ULONG($00000006);
- {$EXTERNALSYM INVALID_PROCESS_DETACH_ATTEMPT}
-
-//
-// MessageId: INVALID_SOFTWARE_INTERRUPT
-//
-// MessageText:
-//
-// INVALID_SOFTWARE_INTERRUPT
-//
-
- INVALID_SOFTWARE_INTERRUPT = ULONG($00000007);
- {$EXTERNALSYM INVALID_SOFTWARE_INTERRUPT}
-
-//
-// MessageId: IRQL_NOT_DISPATCH_LEVEL
-//
-// MessageText:
-//
-// IRQL_NOT_DISPATCH_LEVEL
-//
-
- IRQL_NOT_DISPATCH_LEVEL = ULONG($00000008);
- {$EXTERNALSYM IRQL_NOT_DISPATCH_LEVEL}
-
-//
-// MessageId: IRQL_NOT_GREATER_OR_EQUAL
-//
-// MessageText:
-//
-// IRQL_NOT_GREATER_OR_EQUAL
-//
-
- IRQL_NOT_GREATER_OR_EQUAL = ULONG($00000009);
- {$EXTERNALSYM IRQL_NOT_GREATER_OR_EQUAL}
-
-//
-// MessageId: IRQL_NOT_LESS_OR_EQUAL
-//
-// MessageText:
-//
-// IRQL_NOT_LESS_OR_EQUAL
-//
-
- IRQL_NOT_LESS_OR_EQUAL = ULONG($0000000A);
- {$EXTERNALSYM IRQL_NOT_LESS_OR_EQUAL}
-
-//
-// MessageId: NO_EXCEPTION_HANDLING_SUPPORT
-//
-// MessageText:
-//
-// NO_EXCEPTION_HANDLING_SUPPORT
-//
-
- NO_EXCEPTION_HANDLING_SUPPORT = ULONG($0000000B);
- {$EXTERNALSYM NO_EXCEPTION_HANDLING_SUPPORT}
-
-//
-// MessageId: MAXIMUM_WAIT_OBJECTS_EXCEEDED
-//
-// MessageText:
-//
-// MAXIMUM_WAIT_OBJECTS_EXCEEDED
-//
-
- MAXIMUM_WAIT_OBJECTS_EXCEEDED = ULONG($0000000C);
- {$EXTERNALSYM MAXIMUM_WAIT_OBJECTS_EXCEEDED}
-
-//
-// MessageId: MUTEX_LEVEL_NUMBER_VIOLATION
-//
-// MessageText:
-//
-// MUTEX_LEVEL_NUMBER_VIOLATION
-//
-
- MUTEX_LEVEL_NUMBER_VIOLATION = ULONG($0000000D);
- {$EXTERNALSYM MUTEX_LEVEL_NUMBER_VIOLATION}
-
-//
-// MessageId: NO_USER_MODE_CONTEXT
-//
-// MessageText:
-//
-// NO_USER_MODE_CONTEXT
-//
-
- NO_USER_MODE_CONTEXT = ULONG($0000000E);
- {$EXTERNALSYM NO_USER_MODE_CONTEXT}
-
-//
-// MessageId: SPIN_LOCK_ALREADY_OWNED
-//
-// MessageText:
-//
-// SPIN_LOCK_ALREADY_OWNED
-//
-
- SPIN_LOCK_ALREADY_OWNED = ULONG($0000000F);
- {$EXTERNALSYM SPIN_LOCK_ALREADY_OWNED}
-
-//
-// MessageId: SPIN_LOCK_NOT_OWNED
-//
-// MessageText:
-//
-// SPIN_LOCK_NOT_OWNED
-//
-
- SPIN_LOCK_NOT_OWNED = ULONG($00000010);
- {$EXTERNALSYM SPIN_LOCK_NOT_OWNED}
-
-//
-// MessageId: THREAD_NOT_MUTEX_OWNER
-//
-// MessageText:
-//
-// THREAD_NOT_MUTEX_OWNER
-//
-
- THREAD_NOT_MUTEX_OWNER = ULONG($00000011);
- {$EXTERNALSYM THREAD_NOT_MUTEX_OWNER}
-
-//
-// MessageId: TRAP_CAUSE_UNKNOWN
-//
-// MessageText:
-//
-// TRAP_CAUSE_UNKNOWN
-//
-
- TRAP_CAUSE_UNKNOWN = ULONG($00000012);
- {$EXTERNALSYM TRAP_CAUSE_UNKNOWN}
-
-//
-// MessageId: EMPTY_THREAD_REAPER_LIST
-//
-// MessageText:
-//
-// EMPTY_THREAD_REAPER_LIST
-//
-
- EMPTY_THREAD_REAPER_LIST = ULONG($00000013);
- {$EXTERNALSYM EMPTY_THREAD_REAPER_LIST}
-
-//
-// MessageId: CREATE_DELETE_LOCK_NOT_LOCKED
-//
-// MessageText:
-//
-// CREATE_DELETE_LOCK_NOT_LOCKED
-//
-
- CREATE_DELETE_LOCK_NOT_LOCKED = ULONG($00000014);
- {$EXTERNALSYM CREATE_DELETE_LOCK_NOT_LOCKED}
-
-//
-// MessageId: LAST_CHANCE_CALLED_FROM_KMODE
-//
-// MessageText:
-//
-// LAST_CHANCE_CALLED_FROM_KMODE
-//
-
- LAST_CHANCE_CALLED_FROM_KMODE = ULONG($00000015);
- {$EXTERNALSYM LAST_CHANCE_CALLED_FROM_KMODE}
-
-//
-// MessageId: CID_HANDLE_CREATION
-//
-// MessageText:
-//
-// CID_HANDLE_CREATION
-//
-
- CID_HANDLE_CREATION = ULONG($00000016);
- {$EXTERNALSYM CID_HANDLE_CREATION}
-
-//
-// MessageId: CID_HANDLE_DELETION
-//
-// MessageText:
-//
-// CID_HANDLE_DELETION
-//
-
- CID_HANDLE_DELETION = ULONG($00000017);
- {$EXTERNALSYM CID_HANDLE_DELETION}
-
-//
-// MessageId: REFERENCE_BY_POINTER
-//
-// MessageText:
-//
-// REFERENCE_BY_POINTER
-//
-
- REFERENCE_BY_POINTER = ULONG($00000018);
- {$EXTERNALSYM REFERENCE_BY_POINTER}
-
-//
-// MessageId: BAD_POOL_HEADER
-//
-// MessageText:
-//
-// BAD_POOL_HEADER
-//
-
- BAD_POOL_HEADER = ULONG($00000019);
- {$EXTERNALSYM BAD_POOL_HEADER}
-
-//
-// MessageId: MEMORY_MANAGEMENT
-//
-// MessageText:
-//
-// MEMORY_MANAGEMENT
-//
-
- MEMORY_MANAGEMENT = ULONG($0000001A);
- {$EXTERNALSYM MEMORY_MANAGEMENT}
-
-//
-// MessageId: PFN_SHARE_COUNT
-//
-// MessageText:
-//
-// PFN_SHARE_COUNT
-//
-
- PFN_SHARE_COUNT = ULONG($0000001B);
- {$EXTERNALSYM PFN_SHARE_COUNT}
-
-//
-// MessageId: PFN_REFERENCE_COUNT
-//
-// MessageText:
-//
-// PFN_REFERENCE_COUNT
-//
-
- PFN_REFERENCE_COUNT = ULONG($0000001C);
- {$EXTERNALSYM PFN_REFERENCE_COUNT}
-
-//
-// MessageId: NO_SPIN_LOCK_AVAILABLE
-//
-// MessageText:
-//
-// NO_SPIN_LOCK_AVAILABLE
-//
-
- NO_SPIN_LOCK_AVAILABLE = ULONG($0000001D);
- {$EXTERNALSYM NO_SPIN_LOCK_AVAILABLE}
-
-//
-// MessageId: KMODE_EXCEPTION_NOT_HANDLED
-//
-// MessageText:
-//
-// KMODE_EXCEPTION_NOT_HANDLED
-//
-
- KMODE_EXCEPTION_NOT_HANDLED = ULONG($0000001E);
- {$EXTERNALSYM KMODE_EXCEPTION_NOT_HANDLED}
-
-//
-// MessageId: SHARED_RESOURCE_CONV_ERROR
-//
-// MessageText:
-//
-// SHARED_RESOURCE_CONV_ERROR
-//
-
- SHARED_RESOURCE_CONV_ERROR = ULONG($0000001F);
- {$EXTERNALSYM SHARED_RESOURCE_CONV_ERROR}
-
-//
-// MessageId: KERNEL_APC_PENDING_DURING_EXIT
-//
-// MessageText:
-//
-// KERNEL_APC_PENDING_DURING_EXIT
-//
-
- KERNEL_APC_PENDING_DURING_EXIT = ULONG($00000020);
- {$EXTERNALSYM KERNEL_APC_PENDING_DURING_EXIT}
-
-//
-// MessageId: QUOTA_UNDERFLOW
-//
-// MessageText:
-//
-// QUOTA_UNDERFLOW
-//
-
- QUOTA_UNDERFLOW = ULONG($00000021);
- {$EXTERNALSYM QUOTA_UNDERFLOW}
-
-//
-// MessageId: FILE_SYSTEM
-//
-// MessageText:
-//
-// FILE_SYSTEM
-//
-
- FILE_SYSTEM = ULONG($00000022);
- {$EXTERNALSYM FILE_SYSTEM}
-
-//
-// MessageId: FAT_FILE_SYSTEM
-//
-// MessageText:
-//
-// FAT_FILE_SYSTEM
-//
-
- FAT_FILE_SYSTEM = ULONG($00000023);
- {$EXTERNALSYM FAT_FILE_SYSTEM}
-
-//
-// MessageId: NTFS_FILE_SYSTEM
-//
-// MessageText:
-//
-// NTFS_FILE_SYSTEM
-//
-
- NTFS_FILE_SYSTEM = ULONG($00000024);
- {$EXTERNALSYM NTFS_FILE_SYSTEM}
-
-//
-// MessageId: NPFS_FILE_SYSTEM
-//
-// MessageText:
-//
-// NPFS_FILE_SYSTEM
-//
-
- NPFS_FILE_SYSTEM = ULONG($00000025);
- {$EXTERNALSYM NPFS_FILE_SYSTEM}
-
-//
-// MessageId: CDFS_FILE_SYSTEM
-//
-// MessageText:
-//
-// CDFS_FILE_SYSTEM
-//
-
- CDFS_FILE_SYSTEM = ULONG($00000026);
- {$EXTERNALSYM CDFS_FILE_SYSTEM}
-
-//
-// MessageId: RDR_FILE_SYSTEM
-//
-// MessageText:
-//
-// RDR_FILE_SYSTEM
-//
-
- RDR_FILE_SYSTEM = ULONG($00000027);
- {$EXTERNALSYM RDR_FILE_SYSTEM}
-
-//
-// MessageId: CORRUPT_ACCESS_TOKEN
-//
-// MessageText:
-//
-// CORRUPT_ACCESS_TOKEN
-//
-
- CORRUPT_ACCESS_TOKEN = ULONG($00000028);
- {$EXTERNALSYM CORRUPT_ACCESS_TOKEN}
-
-//
-// MessageId: SECURITY_SYSTEM
-//
-// MessageText:
-//
-// SECURITY_SYSTEM
-//
-
- SECURITY_SYSTEM = ULONG($00000029);
- {$EXTERNALSYM SECURITY_SYSTEM}
-
-//
-// MessageId: INCONSISTENT_IRP
-//
-// MessageText:
-//
-// INCONSISTENT_IRP
-//
-
- INCONSISTENT_IRP = ULONG($0000002A);
- {$EXTERNALSYM INCONSISTENT_IRP}
-
-//
-// MessageId: PANIC_STACK_SWITCH
-//
-// MessageText:
-//
-// PANIC_STACK_SWITCH
-//
-
- PANIC_STACK_SWITCH = ULONG($0000002B);
- {$EXTERNALSYM PANIC_STACK_SWITCH}
-
-//
-// MessageId: PORT_DRIVER_INTERNAL
-//
-// MessageText:
-//
-// PORT_DRIVER_INTERNAL
-//
-
- PORT_DRIVER_INTERNAL = ULONG($0000002C);
- {$EXTERNALSYM PORT_DRIVER_INTERNAL}
-
-//
-// MessageId: SCSI_DISK_DRIVER_INTERNAL
-//
-// MessageText:
-//
-// SCSI_DISK_DRIVER_INTERNAL
-//
-
- SCSI_DISK_DRIVER_INTERNAL = ULONG($0000002D);
- {$EXTERNALSYM SCSI_DISK_DRIVER_INTERNAL}
-
-//
-// MessageId: DATA_BUS_ERROR
-//
-// MessageText:
-//
-// DATA_BUS_ERROR
-//
-
- DATA_BUS_ERROR = ULONG($0000002E);
- {$EXTERNALSYM DATA_BUS_ERROR}
-
-//
-// MessageId: INSTRUCTION_BUS_ERROR
-//
-// MessageText:
-//
-// INSTRUCTION_BUS_ERROR
-//
-
- INSTRUCTION_BUS_ERROR = ULONG($0000002F);
- {$EXTERNALSYM INSTRUCTION_BUS_ERROR}
-
-//
-// MessageId: SET_OF_INVALID_CONTEXT
-//
-// MessageText:
-//
-// SET_OF_INVALID_CONTEXT
-//
-
- SET_OF_INVALID_CONTEXT = ULONG($00000030);
- {$EXTERNALSYM SET_OF_INVALID_CONTEXT}
-
-//
-// MessageId: PHASE0_INITIALIZATION_FAILED
-//
-// MessageText:
-//
-// PHASE0_INITIALIZATION_FAILED
-//
-
- PHASE0_INITIALIZATION_FAILED = ULONG($00000031);
- {$EXTERNALSYM PHASE0_INITIALIZATION_FAILED}
-
-//
-// MessageId: PHASE1_INITIALIZATION_FAILED
-//
-// MessageText:
-//
-// PHASE1_INITIALIZATION_FAILED
-//
-
- PHASE1_INITIALIZATION_FAILED = ULONG($00000032);
- {$EXTERNALSYM PHASE1_INITIALIZATION_FAILED}
-
-//
-// MessageId: UNEXPECTED_INITIALIZATION_CALL
-//
-// MessageText:
-//
-// UNEXPECTED_INITIALIZATION_CALL
-//
-
- UNEXPECTED_INITIALIZATION_CALL = ULONG($00000033);
- {$EXTERNALSYM UNEXPECTED_INITIALIZATION_CALL}
-
-//
-// MessageId: CACHE_MANAGER
-//
-// MessageText:
-//
-// CACHE_MANAGER
-//
-
- CACHE_MANAGER = ULONG($00000034);
- {$EXTERNALSYM CACHE_MANAGER}
-
-//
-// MessageId: NO_MORE_IRP_STACK_LOCATIONS
-//
-// MessageText:
-//
-// NO_MORE_IRP_STACK_LOCATIONS
-//
-
- NO_MORE_IRP_STACK_LOCATIONS = ULONG($00000035);
- {$EXTERNALSYM NO_MORE_IRP_STACK_LOCATIONS}
-
-//
-// MessageId: DEVICE_REFERENCE_COUNT_NOT_ZERO
-//
-// MessageText:
-//
-// DEVICE_REFERENCE_COUNT_NOT_ZERO
-//
-
- DEVICE_REFERENCE_COUNT_NOT_ZERO = ULONG($00000036);
- {$EXTERNALSYM DEVICE_REFERENCE_COUNT_NOT_ZERO}
-
-//
-// MessageId: FLOPPY_INTERNAL_ERROR
-//
-// MessageText:
-//
-// FLOPPY_INTERNAL_ERROR
-//
-
- FLOPPY_INTERNAL_ERROR = ULONG($00000037);
- {$EXTERNALSYM FLOPPY_INTERNAL_ERROR}
-
-//
-// MessageId: SERIAL_DRIVER_INTERNAL
-//
-// MessageText:
-//
-// SERIAL_DRIVER_INTERNAL
-//
-
- SERIAL_DRIVER_INTERNAL = ULONG($00000038);
- {$EXTERNALSYM SERIAL_DRIVER_INTERNAL}
-
-//
-// MessageId: SYSTEM_EXIT_OWNED_MUTEX
-//
-// MessageText:
-//
-// SYSTEM_EXIT_OWNED_MUTEX
-//
-
- SYSTEM_EXIT_OWNED_MUTEX = ULONG($00000039);
- {$EXTERNALSYM SYSTEM_EXIT_OWNED_MUTEX}
-
-//
-// MessageId: SYSTEM_UNWIND_PREVIOUS_USER
-//
-// MessageText:
-//
-// SYSTEM_UNWIND_PREVIOUS_USER
-//
-
- SYSTEM_UNWIND_PREVIOUS_USER = ULONG($0000003A);
- {$EXTERNALSYM SYSTEM_UNWIND_PREVIOUS_USER}
-
-//
-// MessageId: SYSTEM_SERVICE_EXCEPTION
-//
-// MessageText:
-//
-// SYSTEM_SERVICE_EXCEPTION
-//
-
- SYSTEM_SERVICE_EXCEPTION = ULONG($0000003B);
- {$EXTERNALSYM SYSTEM_SERVICE_EXCEPTION}
-
-//
-// MessageId: INTERRUPT_UNWIND_ATTEMPTED
-//
-// MessageText:
-//
-// INTERRUPT_UNWIND_ATTEMPTED
-//
-
- INTERRUPT_UNWIND_ATTEMPTED = ULONG($0000003C);
- {$EXTERNALSYM INTERRUPT_UNWIND_ATTEMPTED}
-
-//
-// MessageId: INTERRUPT_EXCEPTION_NOT_HANDLED
-//
-// MessageText:
-//
-// INTERRUPT_EXCEPTION_NOT_HANDLED
-//
-
- INTERRUPT_EXCEPTION_NOT_HANDLED = ULONG($0000003D);
- {$EXTERNALSYM INTERRUPT_EXCEPTION_NOT_HANDLED}
-
-//
-// MessageId: MULTIPROCESSOR_CONFIGURATION_NOT_SUPPORTED
-//
-// MessageText:
-//
-// MULTIPROCESSOR_CONFIGURATION_NOT_SUPPORTED
-//
-
- MULTIPROCESSOR_CONFIGURATION_NOT_SUPPORTED = ULONG($0000003E);
- {$EXTERNALSYM MULTIPROCESSOR_CONFIGURATION_NOT_SUPPORTED}
-
-//
-// MessageId: NO_MORE_SYSTEM_PTES
-//
-// MessageText:
-//
-// NO_MORE_SYSTEM_PTES
-//
-
- NO_MORE_SYSTEM_PTES = ULONG($0000003F);
- {$EXTERNALSYM NO_MORE_SYSTEM_PTES}
-
-//
-// MessageId: TARGET_MDL_TOO_SMALL
-//
-// MessageText:
-//
-// TARGET_MDL_TOO_SMALL
-//
-
- TARGET_MDL_TOO_SMALL = ULONG($00000040);
- {$EXTERNALSYM TARGET_MDL_TOO_SMALL}
-
-//
-// MessageId: MUST_SUCCEED_POOL_EMPTY
-//
-// MessageText:
-//
-// MUST_SUCCEED_POOL_EMPTY
-//
-
- MUST_SUCCEED_POOL_EMPTY = ULONG($00000041);
- {$EXTERNALSYM MUST_SUCCEED_POOL_EMPTY}
-
-//
-// MessageId: ATDISK_DRIVER_INTERNAL
-//
-// MessageText:
-//
-// ATDISK_DRIVER_INTERNAL
-//
-
- ATDISK_DRIVER_INTERNAL = ULONG($00000042);
- {$EXTERNALSYM ATDISK_DRIVER_INTERNAL}
-
-//
-// MessageId: NO_SUCH_PARTITION
-//
-// MessageText:
-//
-// NO_SUCH_PARTITION
-//
-
- NO_SUCH_PARTITION = ULONG($00000043);
- {$EXTERNALSYM NO_SUCH_PARTITION}
-
-//
-// MessageId: MULTIPLE_IRP_COMPLETE_REQUESTS
-//
-// MessageText:
-//
-// MULTIPLE_IRP_COMPLETE_REQUESTS
-//
-
- MULTIPLE_IRP_COMPLETE_REQUESTS = ULONG($00000044);
- {$EXTERNALSYM MULTIPLE_IRP_COMPLETE_REQUESTS}
-
-//
-// MessageId: INSUFFICIENT_SYSTEM_MAP_REGS
-//
-// MessageText:
-//
-// INSUFFICIENT_SYSTEM_MAP_REGS
-//
-
- INSUFFICIENT_SYSTEM_MAP_REGS = ULONG($00000045);
- {$EXTERNALSYM INSUFFICIENT_SYSTEM_MAP_REGS}
-
-//
-// MessageId: DEREF_UNKNOWN_LOGON_SESSION
-//
-// MessageText:
-//
-// DEREF_UNKNOWN_LOGON_SESSION
-//
-
- DEREF_UNKNOWN_LOGON_SESSION = ULONG($00000046);
- {$EXTERNALSYM DEREF_UNKNOWN_LOGON_SESSION}
-
-//
-// MessageId: REF_UNKNOWN_LOGON_SESSION
-//
-// MessageText:
-//
-// REF_UNKNOWN_LOGON_SESSION
-//
-
- REF_UNKNOWN_LOGON_SESSION = ULONG($00000047);
- {$EXTERNALSYM REF_UNKNOWN_LOGON_SESSION}
-
-//
-// MessageId: CANCEL_STATE_IN_COMPLETED_IRP
-//
-// MessageText:
-//
-// CANCEL_STATE_IN_COMPLETED_IRP
-//
-
- CANCEL_STATE_IN_COMPLETED_IRP = ULONG($00000048);
- {$EXTERNALSYM CANCEL_STATE_IN_COMPLETED_IRP}
-
-//
-// MessageId: PAGE_FAULT_WITH_INTERRUPTS_OFF
-//
-// MessageText:
-//
-// PAGE_FAULT_WITH_INTERRUPTS_OFF
-//
-
- PAGE_FAULT_WITH_INTERRUPTS_OFF = ULONG($00000049);
- {$EXTERNALSYM PAGE_FAULT_WITH_INTERRUPTS_OFF}
-
-//
-// MessageId: IRQL_GT_ZERO_AT_SYSTEM_SERVICE
-//
-// MessageText:
-//
-// IRQL_GT_ZERO_AT_SYSTEM_SERVICE
-//
-
- IRQL_GT_ZERO_AT_SYSTEM_SERVICE = ULONG($0000004A);
- {$EXTERNALSYM IRQL_GT_ZERO_AT_SYSTEM_SERVICE}
-
-//
-// MessageId: STREAMS_INTERNAL_ERROR
-//
-// MessageText:
-//
-// STREAMS_INTERNAL_ERROR
-//
-
- STREAMS_INTERNAL_ERROR = ULONG($0000004B);
- {$EXTERNALSYM STREAMS_INTERNAL_ERROR}
-
-//
-// MessageId: FATAL_UNHANDLED_HARD_ERROR
-//
-// MessageText:
-//
-// FATAL_UNHANDLED_HARD_ERROR
-//
-
- FATAL_UNHANDLED_HARD_ERROR = ULONG($0000004C);
- {$EXTERNALSYM FATAL_UNHANDLED_HARD_ERROR}
-
-//
-// MessageId: NO_PAGES_AVAILABLE
-//
-// MessageText:
-//
-// NO_PAGES_AVAILABLE
-//
-
- NO_PAGES_AVAILABLE = ULONG($0000004D);
- {$EXTERNALSYM NO_PAGES_AVAILABLE}
-
-//
-// MessageId: PFN_LIST_CORRUPT
-//
-// MessageText:
-//
-// PFN_LIST_CORRUPT
-//
-
- PFN_LIST_CORRUPT = ULONG($0000004E);
- {$EXTERNALSYM PFN_LIST_CORRUPT}
-
-//
-// MessageId: NDIS_INTERNAL_ERROR
-//
-// MessageText:
-//
-// NDIS_INTERNAL_ERROR
-//
-
- NDIS_INTERNAL_ERROR = ULONG($0000004F);
- {$EXTERNALSYM NDIS_INTERNAL_ERROR}
-
-//
-// MessageId: PAGE_FAULT_IN_NONPAGED_AREA
-//
-// MessageText:
-//
-// PAGE_FAULT_IN_NONPAGED_AREA
-//
-
- PAGE_FAULT_IN_NONPAGED_AREA = ULONG($00000050);
- {$EXTERNALSYM PAGE_FAULT_IN_NONPAGED_AREA}
-
-//
-// MessageId: REGISTRY_ERROR
-//
-// MessageText:
-//
-// REGISTRY_ERROR
-//
-
- REGISTRY_ERROR = ULONG($00000051);
- {$EXTERNALSYM REGISTRY_ERROR}
-
-//
-// MessageId: MAILSLOT_FILE_SYSTEM
-//
-// MessageText:
-//
-// MAILSLOT_FILE_SYSTEM
-//
-
- MAILSLOT_FILE_SYSTEM = ULONG($00000052);
- {$EXTERNALSYM MAILSLOT_FILE_SYSTEM}
-
-//
-// MessageId: NO_BOOT_DEVICE
-//
-// MessageText:
-//
-// NO_BOOT_DEVICE
-//
-
- NO_BOOT_DEVICE = ULONG($00000053);
- {$EXTERNALSYM NO_BOOT_DEVICE}
-
-//
-// MessageId: LM_SERVER_INTERNAL_ERROR
-//
-// MessageText:
-//
-// LM_SERVER_INTERNAL_ERROR
-//
-
- LM_SERVER_INTERNAL_ERROR = ULONG($00000054);
- {$EXTERNALSYM LM_SERVER_INTERNAL_ERROR}
-
-//
-// MessageId: DATA_COHERENCY_EXCEPTION
-//
-// MessageText:
-//
-// DATA_COHERENCY_EXCEPTION
-//
-
- DATA_COHERENCY_EXCEPTION = ULONG($00000055);
- {$EXTERNALSYM DATA_COHERENCY_EXCEPTION}
-
-//
-// MessageId: INSTRUCTION_COHERENCY_EXCEPTION
-//
-// MessageText:
-//
-// INSTRUCTION_COHERENCY_EXCEPTION
-//
-
- INSTRUCTION_COHERENCY_EXCEPTION = ULONG($00000056);
- {$EXTERNALSYM INSTRUCTION_COHERENCY_EXCEPTION}
-
-//
-// MessageId: XNS_INTERNAL_ERROR
-//
-// MessageText:
-//
-// XNS_INTERNAL_ERROR
-//
-
- XNS_INTERNAL_ERROR = ULONG($00000057);
- {$EXTERNALSYM XNS_INTERNAL_ERROR}
-
-//
-// MessageId: FTDISK_INTERNAL_ERROR
-//
-// MessageText:
-//
-// FTDISK_INTERNAL_ERROR
-//
-
- FTDISK_INTERNAL_ERROR = ULONG($00000058);
- {$EXTERNALSYM FTDISK_INTERNAL_ERROR}
-
-//
-// MessageId: PINBALL_FILE_SYSTEM
-//
-// MessageText:
-//
-// PINBALL_FILE_SYSTEM
-//
-
- PINBALL_FILE_SYSTEM = ULONG($00000059);
- {$EXTERNALSYM PINBALL_FILE_SYSTEM}
-
-//
-// MessageId: CRITICAL_SERVICE_FAILED
-//
-// MessageText:
-//
-// CRITICAL_SERVICE_FAILED
-//
-
- CRITICAL_SERVICE_FAILED = ULONG($0000005A);
- {$EXTERNALSYM CRITICAL_SERVICE_FAILED}
-
-//
-// MessageId: SET_ENV_VAR_FAILED
-//
-// MessageText:
-//
-// SET_ENV_VAR_FAILED
-//
-
- SET_ENV_VAR_FAILED = ULONG($0000005B);
- {$EXTERNALSYM SET_ENV_VAR_FAILED}
-
-//
-// MessageId: HAL_INITIALIZATION_FAILED
-//
-// MessageText:
-//
-// HAL_INITIALIZATION_FAILED
-//
-
- HAL_INITIALIZATION_FAILED = ULONG($0000005C);
- {$EXTERNALSYM HAL_INITIALIZATION_FAILED}
-
-//
-// MessageId: UNSUPPORTED_PROCESSOR
-//
-// MessageText:
-//
-// UNSUPPORTED_PROCESSOR
-//
-
- UNSUPPORTED_PROCESSOR = ULONG($0000005D);
- {$EXTERNALSYM UNSUPPORTED_PROCESSOR}
-
-//
-// MessageId: OBJECT_INITIALIZATION_FAILED
-//
-// MessageText:
-//
-// OBJECT_INITIALIZATION_FAILED
-//
-
- OBJECT_INITIALIZATION_FAILED = ULONG($0000005E);
- {$EXTERNALSYM OBJECT_INITIALIZATION_FAILED}
-
-//
-// MessageId: SECURITY_INITIALIZATION_FAILED
-//
-// MessageText:
-//
-// SECURITY_INITIALIZATION_FAILED
-//
-
- SECURITY_INITIALIZATION_FAILED = ULONG($0000005F);
- {$EXTERNALSYM SECURITY_INITIALIZATION_FAILED}
-
-//
-// MessageId: PROCESS_INITIALIZATION_FAILED
-//
-// MessageText:
-//
-// PROCESS_INITIALIZATION_FAILED
-//
-
- PROCESS_INITIALIZATION_FAILED = ULONG($00000060);
- {$EXTERNALSYM PROCESS_INITIALIZATION_FAILED}
-
-//
-// MessageId: HAL1_INITIALIZATION_FAILED
-//
-// MessageText:
-//
-// HAL1_INITIALIZATION_FAILED
-//
-
- HAL1_INITIALIZATION_FAILED = ULONG($00000061);
- {$EXTERNALSYM HAL1_INITIALIZATION_FAILED}
-
-//
-// MessageId: OBJECT1_INITIALIZATION_FAILED
-//
-// MessageText:
-//
-// OBJECT1_INITIALIZATION_FAILED
-//
-
- OBJECT1_INITIALIZATION_FAILED = ULONG($00000062);
- {$EXTERNALSYM OBJECT1_INITIALIZATION_FAILED}
-
-//
-// MessageId: SECURITY1_INITIALIZATION_FAILED
-//
-// MessageText:
-//
-// SECURITY1_INITIALIZATION_FAILED
-//
-
- SECURITY1_INITIALIZATION_FAILED = ULONG($00000063);
- {$EXTERNALSYM SECURITY1_INITIALIZATION_FAILED}
-
-//
-// MessageId: SYMBOLIC_INITIALIZATION_FAILED
-//
-// MessageText:
-//
-// SYMBOLIC_INITIALIZATION_FAILED
-//
-
- SYMBOLIC_INITIALIZATION_FAILED = ULONG($00000064);
- {$EXTERNALSYM SYMBOLIC_INITIALIZATION_FAILED}
-
-//
-// MessageId: MEMORY1_INITIALIZATION_FAILED
-//
-// MessageText:
-//
-// MEMORY1_INITIALIZATION_FAILED
-//
-
- MEMORY1_INITIALIZATION_FAILED = ULONG($00000065);
- {$EXTERNALSYM MEMORY1_INITIALIZATION_FAILED}
-
-//
-// MessageId: CACHE_INITIALIZATION_FAILED
-//
-// MessageText:
-//
-// CACHE_INITIALIZATION_FAILED
-//
-
- CACHE_INITIALIZATION_FAILED = ULONG($00000066);
- {$EXTERNALSYM CACHE_INITIALIZATION_FAILED}
-
-//
-// MessageId: CONFIG_INITIALIZATION_FAILED
-//
-// MessageText:
-//
-// CONFIG_INITIALIZATION_FAILED
-//
-
- CONFIG_INITIALIZATION_FAILED = ULONG($00000067);
- {$EXTERNALSYM CONFIG_INITIALIZATION_FAILED}
-
-//
-// MessageId: FILE_INITIALIZATION_FAILED
-//
-// MessageText:
-//
-// FILE_INITIALIZATION_FAILED
-//
-
- FILE_INITIALIZATION_FAILED = ULONG($00000068);
- {$EXTERNALSYM FILE_INITIALIZATION_FAILED}
-
-//
-// MessageId: IO1_INITIALIZATION_FAILED
-//
-// MessageText:
-//
-// IO1_INITIALIZATION_FAILED
-//
-
- IO1_INITIALIZATION_FAILED = ULONG($00000069);
- {$EXTERNALSYM IO1_INITIALIZATION_FAILED}
-
-//
-// MessageId: LPC_INITIALIZATION_FAILED
-//
-// MessageText:
-//
-// LPC_INITIALIZATION_FAILED
-//
-
- LPC_INITIALIZATION_FAILED = ULONG($0000006A);
- {$EXTERNALSYM LPC_INITIALIZATION_FAILED}
-
-//
-// MessageId: PROCESS1_INITIALIZATION_FAILED
-//
-// MessageText:
-//
-// PROCESS1_INITIALIZATION_FAILED
-//
-
- PROCESS1_INITIALIZATION_FAILED = ULONG($0000006B);
- {$EXTERNALSYM PROCESS1_INITIALIZATION_FAILED}
-
-//
-// MessageId: REFMON_INITIALIZATION_FAILED
-//
-// MessageText:
-//
-// REFMON_INITIALIZATION_FAILED
-//
-
- REFMON_INITIALIZATION_FAILED = ULONG($0000006C);
- {$EXTERNALSYM REFMON_INITIALIZATION_FAILED}
-
-//
-// MessageId: SESSION1_INITIALIZATION_FAILED
-//
-// MessageText:
-//
-// SESSION1_INITIALIZATION_FAILED
-//
-
- SESSION1_INITIALIZATION_FAILED = ULONG($0000006D);
- {$EXTERNALSYM SESSION1_INITIALIZATION_FAILED}
-
-//
-// MessageId: SESSION2_INITIALIZATION_FAILED
-//
-// MessageText:
-//
-// SESSION2_INITIALIZATION_FAILED
-//
-
- SESSION2_INITIALIZATION_FAILED = ULONG($0000006E);
- {$EXTERNALSYM SESSION2_INITIALIZATION_FAILED}
-
-//
-// MessageId: SESSION3_INITIALIZATION_FAILED
-//
-// MessageText:
-//
-// SESSION3_INITIALIZATION_FAILED
-//
-
- SESSION3_INITIALIZATION_FAILED = ULONG($0000006F);
- {$EXTERNALSYM SESSION3_INITIALIZATION_FAILED}
-
-//
-// MessageId: SESSION4_INITIALIZATION_FAILED
-//
-// MessageText:
-//
-// SESSION4_INITIALIZATION_FAILED
-//
-
- SESSION4_INITIALIZATION_FAILED = ULONG($00000070);
- {$EXTERNALSYM SESSION4_INITIALIZATION_FAILED}
-
-//
-// MessageId: SESSION5_INITIALIZATION_FAILED
-//
-// MessageText:
-//
-// SESSION5_INITIALIZATION_FAILED
-//
-
- SESSION5_INITIALIZATION_FAILED = ULONG($00000071);
- {$EXTERNALSYM SESSION5_INITIALIZATION_FAILED}
-
-//
-// MessageId: ASSIGN_DRIVE_LETTERS_FAILED
-//
-// MessageText:
-//
-// ASSIGN_DRIVE_LETTERS_FAILED
-//
-
- ASSIGN_DRIVE_LETTERS_FAILED = ULONG($00000072);
- {$EXTERNALSYM ASSIGN_DRIVE_LETTERS_FAILED}
-
-//
-// MessageId: CONFIG_LIST_FAILED
-//
-// MessageText:
-//
-// CONFIG_LIST_FAILED
-//
-
- CONFIG_LIST_FAILED = ULONG($00000073);
- {$EXTERNALSYM CONFIG_LIST_FAILED}
-
-//
-// MessageId: BAD_SYSTEM_CONFIG_INFO
-//
-// MessageText:
-//
-// BAD_SYSTEM_CONFIG_INFO
-//
-
- BAD_SYSTEM_CONFIG_INFO = ULONG($00000074);
- {$EXTERNALSYM BAD_SYSTEM_CONFIG_INFO}
-
-//
-// MessageId: CANNOT_WRITE_CONFIGURATION
-//
-// MessageText:
-//
-// CANNOT_WRITE_CONFIGURATION
-//
-
- CANNOT_WRITE_CONFIGURATION = ULONG($00000075);
- {$EXTERNALSYM CANNOT_WRITE_CONFIGURATION}
-
-//
-// MessageId: PROCESS_HAS_LOCKED_PAGES
-//
-// MessageText:
-//
-// PROCESS_HAS_LOCKED_PAGES
-//
-
- PROCESS_HAS_LOCKED_PAGES = ULONG($00000076);
- {$EXTERNALSYM PROCESS_HAS_LOCKED_PAGES}
-
-//
-// MessageId: KERNEL_STACK_INPAGE_ERROR
-//
-// MessageText:
-//
-// KERNEL_STACK_INPAGE_ERROR
-//
-
- KERNEL_STACK_INPAGE_ERROR = ULONG($00000077);
- {$EXTERNALSYM KERNEL_STACK_INPAGE_ERROR}
-
-//
-// MessageId: PHASE0_EXCEPTION
-//
-// MessageText:
-//
-// PHASE0_EXCEPTION
-//
-
- PHASE0_EXCEPTION = ULONG($00000078);
- {$EXTERNALSYM PHASE0_EXCEPTION}
-
-//
-// MessageId: MISMATCHED_HAL
-//
-// MessageText:
-//
-// Mismatched kernel and hal image.
-//
-
- MISMATCHED_HAL = ULONG($00000079);
- {$EXTERNALSYM MISMATCHED_HAL}
-
-//
-// MessageId: KERNEL_DATA_INPAGE_ERROR
-//
-// MessageText:
-//
-// KERNEL_DATA_INPAGE_ERROR
-//
-
- KERNEL_DATA_INPAGE_ERROR = ULONG($0000007A);
- {$EXTERNALSYM KERNEL_DATA_INPAGE_ERROR}
-
-//
-// MessageId: INACCESSIBLE_BOOT_DEVICE
-//
-// MessageText:
-//
-// INACCESSIBLE_BOOT_DEVICE
-//
-
- INACCESSIBLE_BOOT_DEVICE = ULONG($0000007B);
- {$EXTERNALSYM INACCESSIBLE_BOOT_DEVICE}
-
-//
-// MessageId: BUGCODE_PSS_MESSAGE
-//
-// MessageText:
-//
-// If this is the first time you've seen this Stop error screen,
-// restart your computer. If this screen appears again, follow
-// these steps:
-//
-// Check to make sure any new hardware or software is properly installed.
-// If this is a new installation, ask your hardware or software manufacturer
-// for any Windows 2000 updates you might need.
-//
-// If problems continue, disable or remove any newly installed hardware
-// or software. Disable BIOS memory options such as caching or shadowing.
-// If you need to use Safe Mode to remove or disable components, restart
-// your computer, press F8 to select Advanced Startup Options, and then
-// select Safe Mode.
-//
-// Refer to your Getting Started manual for more information on
-// troubleshooting Stop errors.
-//
-
- BUGCODE_PSS_MESSAGE = ULONG($0000007C);
- {$EXTERNALSYM BUGCODE_PSS_MESSAGE}
-
-//
-// MessageId: INSTALL_MORE_MEMORY
-//
-// MessageText:
-//
-// INSTALL_MORE_MEMORY
-//
-
- INSTALL_MORE_MEMORY = ULONG($0000007D);
- {$EXTERNALSYM INSTALL_MORE_MEMORY}
-
-//
-// MessageId: WINDOWS_NT_BANNER
-//
-// MessageText:
-//
-// Microsoft (R) Windows 2000 (R) Version %hs (Build %u%hs)
-//
-
- WINDOWS_NT_BANNER = ULONG($4000007E);
- {$EXTERNALSYM WINDOWS_NT_BANNER}
-
-//
-// MessageId: UNEXPECTED_KERNEL_MODE_TRAP
-//
-// MessageText:
-//
-// UNEXPECTED_KERNEL_MODE_TRAP
-//
-
- UNEXPECTED_KERNEL_MODE_TRAP = ULONG($0000007F);
- {$EXTERNALSYM UNEXPECTED_KERNEL_MODE_TRAP}
-
-//
-// MessageId: NMI_HARDWARE_FAILURE
-//
-// MessageText:
-//
-// Hardware malfunction.
-//
-
- NMI_HARDWARE_FAILURE = ULONG($00000080);
- {$EXTERNALSYM NMI_HARDWARE_FAILURE}
-
-//
-// MessageId: SPIN_LOCK_INIT_FAILURE
-//
-// MessageText:
-//
-// SPIN_LOCK_INIT_FAILURE
-//
-
- SPIN_LOCK_INIT_FAILURE = ULONG($00000081);
- {$EXTERNALSYM SPIN_LOCK_INIT_FAILURE}
-
-//
-// MessageId: DFS_FILE_SYSTEM
-//
-// MessageText:
-//
-// DFS_FILE_SYSTEM
-//
-
- DFS_FILE_SYSTEM = ULONG($00000082);
- {$EXTERNALSYM DFS_FILE_SYSTEM}
-
-//
-// MessageId: OFS_FILE_SYSTEM
-//
-// MessageText:
-//
-// OFS_FILE_SYSTEM
-//
-
- OFS_FILE_SYSTEM = ULONG($00000083);
- {$EXTERNALSYM OFS_FILE_SYSTEM}
-
-//
-// MessageId: RECOM_DRIVER
-//
-// MessageText:
-//
-// RECOM_DRIVER
-//
-
- RECOM_DRIVER = ULONG($00000084);
- {$EXTERNALSYM RECOM_DRIVER}
-
-//
-// MessageId: SETUP_FAILURE
-//
-// MessageText:
-//
-// SETUP_FAILURE
-//
-
- SETUP_FAILURE = ULONG($00000085);
- {$EXTERNALSYM SETUP_FAILURE}
-
-//
-// MessageId: AUDIT_FAILURE
-//
-// MessageText:
-//
-// Audit attempt has failed.
-//
-
- AUDIT_FAILURE = ULONG($00000086);
- {$EXTERNALSYM AUDIT_FAILURE}
-
-//
-// MessageId: WINDOWS_NT_CSD_STRING
-//
-// MessageText:
-//
-// Service Pack
-//
-
- WINDOWS_NT_CSD_STRING = ULONG($40000087);
- {$EXTERNALSYM WINDOWS_NT_CSD_STRING}
-
-//
-// MessageId: WINDOWS_NT_INFO_STRING
-//
-// MessageText:
-//
-// %u System Processor [%u MB Memory] %Z
-//
-
- WINDOWS_NT_INFO_STRING = ULONG($40000088);
- {$EXTERNALSYM WINDOWS_NT_INFO_STRING}
-
-//
-// MessageId: WINDOWS_NT_MP_STRING
-//
-// MessageText:
-//
-// MultiProcessor Kernel
-//
-
- WINDOWS_NT_MP_STRING = ULONG($40000089);
- {$EXTERNALSYM WINDOWS_NT_MP_STRING}
-
-//
-// MessageId: THREAD_TERMINATE_HELD_MUTEX
-//
-// MessageText:
-//
-// A kernel thread terminated while holding a mutex
-//
-
- THREAD_TERMINATE_HELD_MUTEX = ULONG($4000008A);
- {$EXTERNALSYM THREAD_TERMINATE_HELD_MUTEX}
-
-//
-// MessageId: MBR_CHECKSUM_MISMATCH
-//
-// MessageText:
-//
-// This system may be infected with a virus.
-//
-
- MBR_CHECKSUM_MISMATCH = ULONG($0000008B);
- {$EXTERNALSYM MBR_CHECKSUM_MISMATCH}
-
-//
-// MessageId: BUGCODE_PSS_CRASH_INIT
-//
-// MessageText:
-//
-// Beginning dump of physical memory
-//
-
- BUGCODE_PSS_CRASH_INIT = ULONG($0000008C);
- {$EXTERNALSYM BUGCODE_PSS_CRASH_INIT}
-
-//
-// MessageId: BUGCODE_PSS_CRASH_PROGRESS
-//
-// MessageText:
-//
-// Dumping physical memory to disk
-//
-
- BUGCODE_PSS_CRASH_PROGRESS = ULONG($0000008D);
- {$EXTERNALSYM BUGCODE_PSS_CRASH_PROGRESS}
-
-//
-// MessageId: BUGCODE_PSS_CRASH_DONE
-//
-// MessageText:
-//
-// Physical memory dump complete. Contact your system administrator or
-// technical support group.
-//
-
- BUGCODE_PSS_CRASH_DONE = ULONG($0000008E);
- {$EXTERNALSYM BUGCODE_PSS_CRASH_DONE}
-
-//
-// MessageId: PP0_INITIALIZATION_FAILED
-//
-// MessageText:
-//
-// PP0_INITIALIZATION_FAILED
-//
-
- PP0_INITIALIZATION_FAILED = ULONG($0000008F);
- {$EXTERNALSYM PP0_INITIALIZATION_FAILED}
-
-//
-// MessageId: PP1_INITIALIZATION_FAILED
-//
-// MessageText:
-//
-// PP1_INITIALIZATION_FAILED
-//
-
- PP1_INITIALIZATION_FAILED = ULONG($00000090);
- {$EXTERNALSYM PP1_INITIALIZATION_FAILED}
-
-//
-// MessageId: WIN32K_INIT_OR_RIT_FAILURE
-//
-// MessageText:
-//
-// WIN32K_INIT_OR_RIT_FAILURE
-//
-
- WIN32K_INIT_OR_RIT_FAILURE = ULONG($00000091);
- {$EXTERNALSYM WIN32K_INIT_OR_RIT_FAILURE}
-
-//
-// MessageId: UP_DRIVER_ON_MP_SYSTEM
-//
-// MessageText:
-//
-// UP_DRIVER_ON_MP_SYSTEM
-//
-
- UP_DRIVER_ON_MP_SYSTEM = ULONG($00000092);
- {$EXTERNALSYM UP_DRIVER_ON_MP_SYSTEM}
-
-//
-// MessageId: INVALID_KERNEL_HANDLE
-//
-// MessageText:
-//
-// INVALID_KERNEL_HANDLE
-//
-
- INVALID_KERNEL_HANDLE = ULONG($00000093);
- {$EXTERNALSYM INVALID_KERNEL_HANDLE}
-
-//
-// MessageId: KERNEL_STACK_LOCKED_AT_EXIT
-//
-// MessageText:
-//
-// KERNEL_STACK_LOCKED_AT_EXIT
-//
-
- KERNEL_STACK_LOCKED_AT_EXIT = ULONG($00000094);
- {$EXTERNALSYM KERNEL_STACK_LOCKED_AT_EXIT}
-
-//
-// MessageId: PNP_INTERNAL_ERROR
-//
-// MessageText:
-//
-// PNP_INTERNAL_ERROR
-//
-
- PNP_INTERNAL_ERROR = ULONG($00000095);
- {$EXTERNALSYM PNP_INTERNAL_ERROR}
-
-//
-// MessageId: INVALID_WORK_QUEUE_ITEM
-//
-// MessageText:
-//
-// INVALID_WORK_QUEUE_ITEM
-//
-
- INVALID_WORK_QUEUE_ITEM = ULONG($00000096);
- {$EXTERNALSYM INVALID_WORK_QUEUE_ITEM}
-
-//
-// MessageId: BOUND_IMAGE_UNSUPPORTED
-//
-// MessageText:
-//
-// BOUND_IMAGE_UNSUPPORTED
-//
-
- BOUND_IMAGE_UNSUPPORTED = ULONG($00000097);
- {$EXTERNALSYM BOUND_IMAGE_UNSUPPORTED}
-
-//
-// MessageId: END_OF_NT_EVALUATION_PERIOD
-//
-// MessageText:
-//
-// END_OF_NT_EVALUATION_PERIOD
-//
-
- END_OF_NT_EVALUATION_PERIOD = ULONG($00000098);
- {$EXTERNALSYM END_OF_NT_EVALUATION_PERIOD}
-
-//
-// MessageId: INVALID_REGION_OR_SEGMENT
-//
-// MessageText:
-//
-// INVALID_REGION_OR_SEGMENT
-//
-
- INVALID_REGION_OR_SEGMENT = ULONG($00000099);
- {$EXTERNALSYM INVALID_REGION_OR_SEGMENT}
-
-//
-// MessageId: SYSTEM_LICENSE_VIOLATION
-//
-// MessageText:
-//
-// SYSTEM_LICENSE_VIOLATION
-//
-
- SYSTEM_LICENSE_VIOLATION = ULONG($0000009A);
- {$EXTERNALSYM SYSTEM_LICENSE_VIOLATION}
-
-//
-// MessageId: UDFS_FILE_SYSTEM
-//
-// MessageText:
-//
-// UDFS_FILE_SYSTEM
-//
-
- UDFS_FILE_SYSTEM = ULONG($0000009B);
- {$EXTERNALSYM UDFS_FILE_SYSTEM}
-
-//
-// MessageId: MACHINE_CHECK_EXCEPTION
-//
-// MessageText:
-//
-// MACHINE_CHECK_EXCEPTION
-//
-
- MACHINE_CHECK_EXCEPTION = ULONG($0000009C);
- {$EXTERNALSYM MACHINE_CHECK_EXCEPTION}
-
-//
-// MessageId: WINDOWS_NT_INFO_STRING_PLURAL
-//
-// MessageText:
-//
-// %u System Processors [%u MB Memory] %Z
-//
-
- WINDOWS_NT_INFO_STRING_PLURAL = ULONG($4000009D);
- {$EXTERNALSYM WINDOWS_NT_INFO_STRING_PLURAL}
-
-//
-// MessageId: WINDOWS_NT_RC_STRING
-//
-// MessageText:
-//
-// RC
-//
-
- WINDOWS_NT_RC_STRING = ULONG($4000009E);
- {$EXTERNALSYM WINDOWS_NT_RC_STRING}
-
-//
-// MessageId: DRIVER_POWER_STATE_FAILURE
-//
-// MessageText:
-//
-// DRIVER_POWER_STATE_FAILURE
-//
-
- DRIVER_POWER_STATE_FAILURE = ULONG($0000009F);
- {$EXTERNALSYM DRIVER_POWER_STATE_FAILURE}
-
-//
-// MessageId: INTERNAL_POWER_ERROR
-//
-// MessageText:
-//
-// INTERNAL_POWER_ERROR
-//
-
- INTERNAL_POWER_ERROR = ULONG($000000A0);
- {$EXTERNALSYM INTERNAL_POWER_ERROR}
-
-//
-// MessageId: PCI_BUS_DRIVER_INTERNAL
-//
-// MessageText:
-//
-// Inconsistency detected in the PCI Bus driver's internal structures.
-//
-
- PCI_BUS_DRIVER_INTERNAL = ULONG($000000A1);
- {$EXTERNALSYM PCI_BUS_DRIVER_INTERNAL}
-
-//
-// MessageId: MEMORY_IMAGE_CORRUPT
-//
-// MessageText:
-//
-// A CRC check on the memory range has failed
-//
-
- MEMORY_IMAGE_CORRUPT = ULONG($000000A2);
- {$EXTERNALSYM MEMORY_IMAGE_CORRUPT}
-
-//
-// MessageId: ACPI_DRIVER_INTERNAL
-//
-// MessageText:
-//
-// ACPI_DRIVER_INTERNAL
-//
-
- ACPI_DRIVER_INTERNAL = ULONG($000000A3);
- {$EXTERNALSYM ACPI_DRIVER_INTERNAL}
-
-//
-// MessageId: CNSS_FILE_SYSTEM_FILTER
-//
-// MessageText:
-//
-// Internal inconsistency while representing
-// Ntfs Structured Storage as a DOCFILE.
-//
-
- CNSS_FILE_SYSTEM_FILTER = ULONG($000000A4);
- {$EXTERNALSYM CNSS_FILE_SYSTEM_FILTER}
-
-//
-// MessageId: ACPI_BIOS_ERROR
-//
-// MessageText:
-//
-// The ACPI BIOS in this system is not fully compliant with the ACPI
-// specification. Please read the README.TXT for possible workarounds. You
-// can also contact your system's manufacturer for an updated BIOS, or visit
-// http://www.hardware-update.com to see if a new BIOS is available.
-//
-
- ACPI_BIOS_ERROR = ULONG($000000A5);
- {$EXTERNALSYM ACPI_BIOS_ERROR}
-
-//
-// MessageId: FP_EMULATION_ERROR
-//
-// MessageText:
-//
-// FP_EMULATION_ERROR
-//
-
- FP_EMULATION_ERROR = ULONG($000000A6);
- {$EXTERNALSYM FP_EMULATION_ERROR}
-
-//
-// MessageId: BAD_EXHANDLE
-//
-// MessageText:
-//
-// BAD_EXHANDLE
-//
-
- BAD_EXHANDLE = ULONG($000000A7);
- {$EXTERNALSYM BAD_EXHANDLE}
-
-//
-// MessageId: BOOTING_IN_SAFEMODE_MINIMAL
-//
-// MessageText:
-//
-// The system is booting in safemode - Minimal Services
-//
-
- BOOTING_IN_SAFEMODE_MINIMAL = ULONG($000000A8);
- {$EXTERNALSYM BOOTING_IN_SAFEMODE_MINIMAL}
-
-//
-// MessageId: BOOTING_IN_SAFEMODE_NETWORK
-//
-// MessageText:
-//
-// The system is booting in safemode - Minimal Services with Network
-//
-
- BOOTING_IN_SAFEMODE_NETWORK = ULONG($000000A9);
- {$EXTERNALSYM BOOTING_IN_SAFEMODE_NETWORK}
-
-//
-// MessageId: BOOTING_IN_SAFEMODE_DSREPAIR
-//
-// MessageText:
-//
-// The system is booting in safemode - Directory Services Repair
-//
-
- BOOTING_IN_SAFEMODE_DSREPAIR = ULONG($000000AA);
- {$EXTERNALSYM BOOTING_IN_SAFEMODE_DSREPAIR}
-
-//
-// MessageId: SESSION_HAS_VALID_POOL_ON_EXIT
-//
-// MessageText:
-//
-// SESSION_HAS_VALID_POOL_ON_EXIT
-//
-
- SESSION_HAS_VALID_POOL_ON_EXIT = ULONG($000000AB);
- {$EXTERNALSYM SESSION_HAS_VALID_POOL_ON_EXIT}
-
-//
-// MessageId: HAL_MEMORY_ALLOCATION
-//
-// MessageText:
-//
-// Allocate from NonPaged Pool failed for a HAL critical allocation.
-//
-
- HAL_MEMORY_ALLOCATION = ULONG($000000AC);
- {$EXTERNALSYM HAL_MEMORY_ALLOCATION}
-
-//
-// MessageId: BUGCODE_PSS_MESSAGE_A
-//
-// MessageText:
-//
-// If this is the first time you've seen this Stop error screen,
-// restart your computer. If this screen appears again, follow
-// these steps:
-//
-// Check to make sure any new hardware or software is properly installed.
-// If this is a new installation, ask your hardware or software manufacturer
-// for any Windows 2000 updates you might need.
-//
-// If problems continue, disable or remove any newly installed hardware
-// or software. Disable BIOS memory options such as caching or shadowing.
-// Check your hard drive to make sure it is properly configured and
-// terminated. If you need to use Safe Mode to remove or disable components,
-// restart your computer, press F8 to select Advanced Startup Options,
-// and then select Safe Mode.
-//
-// Refer to your Getting Started manual for more information on
-// troubleshooting Stop errors.
-//
-
- BUGCODE_PSS_MESSAGE_A = ULONG($000000AD);
- {$EXTERNALSYM BUGCODE_PSS_MESSAGE_A}
-
-//
-// MessageId: BUGCODE_PSS_MESSAGE_1E
-//
-// MessageText:
-//
-// If this is the first time you've seen this Stop error screen,
-// restart your computer. If this screen appears again, follow
-// these steps:
-//
-// Check to be sure you have adequate disk space. If a driver is
-// identified in the Stop message, disable the driver or check
-// with the manufacturer for driver updates. Try changing video
-// adapters.
-//
-// Check with your hardware vendor for any BIOS updates. Disable
-// BIOS memory options such as caching or shadowing. If you need
-// to use Safe Mode to remove or disable components, restart your
-// computer, press F8 to select Advanced Startup Options, and then
-// select Safe Mode.
-//
-// Refer to your Getting Started manual for more information on
-// troubleshooting Stop errors.
-//
-
- BUGCODE_PSS_MESSAGE_1E = ULONG($000000AE);
- {$EXTERNALSYM BUGCODE_PSS_MESSAGE_1E}
-
-//
-// MessageId: BUGCODE_PSS_MESSAGE_23
-//
-// MessageText:
-//
-// If this is the first time you've seen this Stop error screen,
-// restart your computer. If this screen appears again, follow
-// these steps:
-//
-// Disable or uninstall any anti-virus, disk defragmentation
-// or backup utilities. Check your hard drive configuration,
-// and check for any updated drivers. Run CHKDSK /F to check
-// for hard drive corruption, and then restart your computer.
-//
-// Refer to your Getting Started manual for more information on
-// troubleshooting Stop errors.
-//
-
- BUGCODE_PSS_MESSAGE_23 = ULONG($000000AF);
- {$EXTERNALSYM BUGCODE_PSS_MESSAGE_23}
-
-//
-// MessageId: BUGCODE_PSS_MESSAGE_2E
-//
-// MessageText:
-//
-// If this is the first time you've seen this Stop error screen,
-// restart your computer. If this screen appears again, follow
-// these steps:
-//
-// Run system diagnostics supplied by your hardware manufacturer.
-// In particular, run a memory check, and check for faulty or
-// mismatched memory. Try changing video adapters.
-//
-// Check with your hardware vendor for any BIOS updates. Disable
-// BIOS memory options such as caching or shadowing. If you need
-// to use Safe Mode to remove or disable components, restart your
-// computer, press F8 to select Advanced Startup Options, and then
-// select Safe Mode.
-//
-// Refer to your Getting Started manual for more information on
-// troubleshooting Stop errors.
-//
-
- BUGCODE_PSS_MESSAGE_2E = ULONG($000000B0);
- {$EXTERNALSYM BUGCODE_PSS_MESSAGE_2E}
-
-//
-// MessageId: BUGCODE_PSS_MESSAGE_3F
-//
-// MessageText:
-//
-// If this is the first time you've seen this Stop error screen,
-// restart your computer. If this screen appears again, follow
-// these steps:
-//
-// Remove any recently installed software including backup
-// utilities or disk-intensive applications.
-//
-// If you need to use Safe Mode to remove or disable components,
-// restart your computer, press F8 to select Advanced Startup
-// Options, and then select Safe Mode.
-//
-// Refer to your Getting Started manual for more information on
-// troubleshooting Stop errors.
-//
-
- BUGCODE_PSS_MESSAGE_3F = ULONG($000000B1);
- {$EXTERNALSYM BUGCODE_PSS_MESSAGE_3F}
-
-//
-// MessageId: BUGCODE_PSS_MESSAGE_7B
-//
-// MessageText:
-//
-// If this is the first time you've seen this Stop error screen,
-// restart your computer. If this screen appears again, follow
-// these steps:
-//
-// Check for viruses on your computer. Remove any newly installed
-// hard drives or hard drive controllers. Check your hard drive
-// to make sure it is properly configured and terminated.
-// Run CHKDSK /F to check for hard drive corruption, and then
-// restart your computer.
-//
-// Refer to your Getting Started manual for more information on
-// troubleshooting Stop errors.
-//
-
- BUGCODE_PSS_MESSAGE_7B = ULONG($000000B2);
- {$EXTERNALSYM BUGCODE_PSS_MESSAGE_7B}
-
-//
-// MessageId: BUGCODE_PSS_MESSAGE_7F
-//
-// MessageText:
-//
-// If this is the first time you've seen this Stop error screen,
-// restart your computer. If this screen appears again, follow
-// these steps:
-//
-// Run a system diagnostic utility supplied by your hardware manufacturer.
-// In particular, run a memory check, and check for faulty or mismatched
-// memory. Try changing video adapters.
-//
-// Disable or remove any newly installed hardware and drivers. Disable or
-// remove any newly installed software. If you need to use Safe Mode to
-// remove or disable components, restart your computer, press F8 to select
-// Advanced Startup Options, and then select Safe Mode.
-//
-// Refer to your Getting Started manual for more information on
-// troubleshooting Stop errors.
-//
-
- BUGCODE_PSS_MESSAGE_7F = ULONG($000000B3);
- {$EXTERNALSYM BUGCODE_PSS_MESSAGE_7F}
-
-//
-// MessageId: VIDEO_DRIVER_INIT_FAILURE
-//
-// MessageText:
-//
-// The video driver failed to initialize
-//
-
- VIDEO_DRIVER_INIT_FAILURE = ULONG($000000B4);
- {$EXTERNALSYM VIDEO_DRIVER_INIT_FAILURE}
-
-//
-// MessageId: BOOTLOG_LOADED
-//
-// MessageText:
-//
-// Loaded driver
-//
-
- BOOTLOG_LOADED = ULONG($000000B5);
- {$EXTERNALSYM BOOTLOG_LOADED}
-
-//
-// MessageId: BOOTLOG_NOT_LOADED
-//
-// MessageText:
-//
-// Did not load driver
-//
-
- BOOTLOG_NOT_LOADED = ULONG($000000B6);
- {$EXTERNALSYM BOOTLOG_NOT_LOADED}
-
-//
-// MessageId: BOOTLOG_ENABLED
-//
-// MessageText:
-//
-// Boot Logging Enabled
-//
-
- BOOTLOG_ENABLED = ULONG($000000B7);
- {$EXTERNALSYM BOOTLOG_ENABLED}
-
-//
-// MessageId: ATTEMPTED_SWITCH_FROM_DPC
-//
-// MessageText:
-//
-// A wait operation, attach process, or yield was attempted from a DPC routine.
-//
-
- ATTEMPTED_SWITCH_FROM_DPC = ULONG($000000B8);
- {$EXTERNALSYM ATTEMPTED_SWITCH_FROM_DPC}
-
-//
-// MessageId: CHIPSET_DETECTED_ERROR
-//
-// MessageText:
-//
-// A parity error in the system memory or I/O system was detected.
-//
-
- CHIPSET_DETECTED_ERROR = ULONG($000000B9);
- {$EXTERNALSYM CHIPSET_DETECTED_ERROR}
-
-//
-// MessageId: SESSION_HAS_VALID_VIEWS_ON_EXIT
-//
-// MessageText:
-//
-// SESSION_HAS_VALID_VIEWS_ON_EXIT
-//
-
- SESSION_HAS_VALID_VIEWS_ON_EXIT = ULONG($000000BA);
- {$EXTERNALSYM SESSION_HAS_VALID_VIEWS_ON_EXIT}
-
-//
-// MessageId: NETWORK_BOOT_INITIALIZATION_FAILED
-//
-// MessageText:
-//
-// An initialization failure occurred while attempting to boot from the network.
-//
-
- NETWORK_BOOT_INITIALIZATION_FAILED = ULONG($000000BB);
- {$EXTERNALSYM NETWORK_BOOT_INITIALIZATION_FAILED}
-
-//
-// MessageId: NETWORK_BOOT_DUPLICATE_ADDRESS
-//
-// MessageText:
-//
-// A duplicate IP address was assigned to this machine while attempting to
-// boot from the network.
-//
-
- NETWORK_BOOT_DUPLICATE_ADDRESS = ULONG($000000BC);
- {$EXTERNALSYM NETWORK_BOOT_DUPLICATE_ADDRESS}
-
-//
-// MessageId: INVALID_HIBERNATED_STATE
-//
-// MessageText:
-//
-// The hibernated memory image does not match the current hardware configuration.
-//
-
- INVALID_HIBERNATED_STATE = ULONG($000000BD);
- {$EXTERNALSYM INVALID_HIBERNATED_STATE}
-
-//
-// MessageId: ATTEMPTED_WRITE_TO_READONLY_MEMORY
-//
-// MessageText:
-//
-// An attempt was made to write to read-only memory.
-//
-
- ATTEMPTED_WRITE_TO_READONLY_MEMORY = ULONG($000000BE);
- {$EXTERNALSYM ATTEMPTED_WRITE_TO_READONLY_MEMORY}
-
-//
-// MessageId: MUTEX_ALREADY_OWNED
-//
-// MessageText:
-//
-// MUTEX_ALREADY_OWNED
-//
-
- MUTEX_ALREADY_OWNED = ULONG($000000BF);
- {$EXTERNALSYM MUTEX_ALREADY_OWNED}
-
-//
-// MessageId: PCI_CONFIG_SPACE_ACCESS_FAILURE
-//
-// MessageText:
-//
-// An attempt to access PCI configuration space failed.
-//
-
- PCI_CONFIG_SPACE_ACCESS_FAILURE = ULONG($000000C0);
- {$EXTERNALSYM PCI_CONFIG_SPACE_ACCESS_FAILURE}
-
-//
-// MessageId: SPECIAL_POOL_DETECTED_MEMORY_CORRUPTION
-//
-// MessageText:
-//
-// SPECIAL_POOL_DETECTED_MEMORY_CORRUPTION
-//
-
- SPECIAL_POOL_DETECTED_MEMORY_CORRUPTION = ULONG($000000C1);
- {$EXTERNALSYM SPECIAL_POOL_DETECTED_MEMORY_CORRUPTION}
-
-//
-// MessageId: BAD_POOL_CALLER
-//
-// MessageText:
-//
-// BAD_POOL_CALLER
-//
-
- BAD_POOL_CALLER = ULONG($000000C2);
- {$EXTERNALSYM BAD_POOL_CALLER}
-
-//
-// MessageId: BUGCODE_PSS_MESSAGE_SIGNATURE
-//
-// MessageText:
-//
-//
-// A system file that is owned by Windows 2000 was replaced by an application
-// running on your system. The operating system detected this and tried to
-// verify the validity of the file's signature. The operating system found that
-// the file signature is not valid and put the original, correct file back
-// so that your operating system will continue to function properly.
-//
-
- BUGCODE_PSS_MESSAGE_SIGNATURE = ULONG($000000C3);
- {$EXTERNALSYM BUGCODE_PSS_MESSAGE_SIGNATURE}
-
-//
-// MessageId: DRIVER_VERIFIER_DETECTED_VIOLATION
-//
-// MessageText:
-//
-//
-// A device driver attempting to corrupt the system has been caught.
-// The faulty driver currently on the kernel stack must be replaced
-// with a working version.
-//
-
- DRIVER_VERIFIER_DETECTED_VIOLATION = ULONG($000000C4);
- {$EXTERNALSYM DRIVER_VERIFIER_DETECTED_VIOLATION}
-
-//
-// MessageId: DRIVER_CORRUPTED_EXPOOL
-//
-// MessageText:
-//
-//
-// A device driver has corrupted the executive memory pool.
-//
-// If this is the first time you've seen this Stop error screen,
-// restart your computer. If this screen appears again, follow
-// these steps:
-//
-// Check to make sure any new hardware or software is properly installed.
-// If this is a new installation, ask your hardware or software manufacturer
-// for any Windows 2000 updates you might need.
-//
-// Run the driver verifier against any new (or suspect) drivers.
-// If that doesn't reveal the corrupting driver, try enabling special pool.
-// Both of these features are intended to catch the corruption at an earlier
-// point where the offending driver can be identified.
-//
-// If you need to use Safe Mode to remove or disable components,
-// restart your computer, press F8 to select Advanced Startup Options,
-// and then select Safe Mode.
-//
-// Refer to your Getting Started manual for more information on
-// troubleshooting Stop errors.
-//
-
- DRIVER_CORRUPTED_EXPOOL = ULONG($000000C5);
- {$EXTERNALSYM DRIVER_CORRUPTED_EXPOOL}
-
-//
-// MessageId: DRIVER_CAUGHT_MODIFYING_FREED_POOL
-//
-// MessageText:
-//
-//
-// A device driver attempting to corrupt the system has been caught.
-// The faulty driver currently on the kernel stack must be replaced
-// with a working version.
-//
-
- DRIVER_CAUGHT_MODIFYING_FREED_POOL = ULONG($000000C6);
- {$EXTERNALSYM DRIVER_CAUGHT_MODIFYING_FREED_POOL}
-
-//
-// MessageId: TIMER_OR_DPC_INVALID
-//
-// MessageText:
-//
-//
-// A kernel timer or DPC was found in memory which must not contain such
-// items. Usually this is memory being freed. This is usually caused by
-// a device driver that has not cleaned up properly before freeing memory.
-//
-
- TIMER_OR_DPC_INVALID = ULONG($000000C7);
- {$EXTERNALSYM TIMER_OR_DPC_INVALID}
-
-//
-// MessageId: IRQL_UNEXPECTED_VALUE
-//
-// MessageText:
-//
-//
-// The processor's IRQL is not valid for the currently executing context.
-// This is a software error condition and is usually caused by a device
-// driver changing IRQL and not restoring it to its previous value when
-// it has finished its task.
-//
-
- IRQL_UNEXPECTED_VALUE = ULONG($000000C8);
- {$EXTERNALSYM IRQL_UNEXPECTED_VALUE}
-
-//
-// MessageId: DRIVER_VERIFIER_IOMANAGER_VIOLATION
-//
-// MessageText:
-//
-//
-// The IO manager has detected a violation by a driver that is being verified.
-// The faulty driver that is being verified must be debugged and
-// replaced with a working version.
-//
-
- DRIVER_VERIFIER_IOMANAGER_VIOLATION = ULONG($000000C9);
- {$EXTERNALSYM DRIVER_VERIFIER_IOMANAGER_VIOLATION}
-
-//
-// MessageId: PNP_DETECTED_FATAL_ERROR
-//
-// MessageText:
-//
-//
-// Plug and Play detected an error most likely caused by a faulty driver.
-//
-
- PNP_DETECTED_FATAL_ERROR = ULONG($000000CA);
- {$EXTERNALSYM PNP_DETECTED_FATAL_ERROR}
-
-//
-// MessageId: DRIVER_LEFT_LOCKED_PAGES_IN_PROCESS
-//
-// MessageText:
-//
-// DRIVER_LEFT_LOCKED_PAGES_IN_PROCESS
-//
-
- DRIVER_LEFT_LOCKED_PAGES_IN_PROCESS = ULONG($000000CB);
- {$EXTERNALSYM DRIVER_LEFT_LOCKED_PAGES_IN_PROCESS}
-
-//
-// MessageId: PAGE_FAULT_IN_FREED_SPECIAL_POOL
-//
-// MessageText:
-//
-//
-// The system is attempting to access memory after it has been freed.
-// This usually indicates a system-driver synchronization issue.
-//
-
- PAGE_FAULT_IN_FREED_SPECIAL_POOL = ULONG($000000CC);
- {$EXTERNALSYM PAGE_FAULT_IN_FREED_SPECIAL_POOL}
-
-//
-// MessageId: PAGE_FAULT_BEYOND_END_OF_ALLOCATION
-//
-// MessageText:
-//
-//
-// The system is attempting to access memory beyond the end of the allocation.
-// This usually indicates a system-driver synchronization issue.
-//
-
- PAGE_FAULT_BEYOND_END_OF_ALLOCATION = ULONG($000000CD);
- {$EXTERNALSYM PAGE_FAULT_BEYOND_END_OF_ALLOCATION}
-
-//
-// MessageId: DRIVER_UNLOADED_WITHOUT_CANCELLING_PENDING_OPERATIONS
-//
-// MessageText:
-//
-// DRIVER_UNLOADED_WITHOUT_CANCELLING_PENDING_OPERATIONS
-//
-
- DRIVER_UNLOADED_WITHOUT_CANCELLING_PENDING_OPERATIONS = ULONG($000000CE);
- {$EXTERNALSYM DRIVER_UNLOADED_WITHOUT_CANCELLING_PENDING_OPERATIONS}
-
-//
-// MessageId: TERMINAL_SERVER_DRIVER_MADE_INCORRECT_MEMORY_REFERENCE
-//
-// MessageText:
-//
-// TERMINAL_SERVER_DRIVER_MADE_INCORRECT_MEMORY_REFERENCE
-//
-
- TERMINAL_SERVER_DRIVER_MADE_INCORRECT_MEMORY_REFERENCE = ULONG($000000CF);
- {$EXTERNALSYM TERMINAL_SERVER_DRIVER_MADE_INCORRECT_MEMORY_REFERENCE}
-
-//
-// MessageId: DRIVER_CORRUPTED_MMPOOL
-//
-// MessageText:
-//
-//
-// A device driver has corrupted the system memory management pool.
-//
-// If this is the first time you've seen this Stop error screen,
-// restart your computer. If this screen appears again, follow
-// these steps:
-//
-// Check to make sure any new hardware or software is properly installed.
-// If this is a new installation, ask your hardware or software manufacturer
-// for any Windows 2000 updates you might need.
-//
-// Run the driver verifier against any new (or suspect) drivers.
-// If that doesn't reveal the corrupting driver, try enabling special pool.
-// Both of these features are intended to catch the corruption at an earlier
-// point where the offending driver can be identified.
-//
-// If you need to use Safe Mode to remove or disable components,
-// restart your computer, press F8 to select Advanced Startup Options,
-// and then select Safe Mode.
-//
-// Refer to your Getting Started manual for more information on
-// troubleshooting Stop errors.
-//
-
- DRIVER_CORRUPTED_MMPOOL = ULONG($000000D0);
- {$EXTERNALSYM DRIVER_CORRUPTED_MMPOOL}
-
-//
-// MessageId: DRIVER_IRQL_NOT_LESS_OR_EQUAL
-//
-// MessageText:
-//
-// DRIVER_IRQL_NOT_LESS_OR_EQUAL
-//
-
- DRIVER_IRQL_NOT_LESS_OR_EQUAL = ULONG($000000D1);
- {$EXTERNALSYM DRIVER_IRQL_NOT_LESS_OR_EQUAL}
-
-//
-// MessageId: BUGCODE_ID_DRIVER
-//
-// MessageText:
-//
-// This driver may be at fault :
-//
-
- BUGCODE_ID_DRIVER = ULONG($000000D2);
- {$EXTERNALSYM BUGCODE_ID_DRIVER}
-
-//
-// MessageId: DRIVER_PORTION_MUST_BE_NONPAGED
-//
-// MessageText:
-//
-// The driver mistakenly marked a part of it's image pagable instead of nonpagable.
-//
-
- DRIVER_PORTION_MUST_BE_NONPAGED = ULONG($000000D3);
- {$EXTERNALSYM DRIVER_PORTION_MUST_BE_NONPAGED}
-
-//
-// MessageId: SYSTEM_SCAN_AT_RAISED_IRQL_CAUGHT_IMPROPER_DRIVER_UNLOAD
-//
-// MessageText:
-//
-// The driver unloaded without cancelling pending operations.
-//
-
- SYSTEM_SCAN_AT_RAISED_IRQL_CAUGHT_IMPROPER_DRIVER_UNLOAD = ULONG($000000D4);
- {$EXTERNALSYM SYSTEM_SCAN_AT_RAISED_IRQL_CAUGHT_IMPROPER_DRIVER_UNLOAD}
-
-//
-// MessageId: DRIVER_PAGE_FAULT_IN_FREED_SPECIAL_POOL
-//
-// MessageText:
-//
-//
-// The driver is attempting to access memory after it has been freed.
-//
-
- DRIVER_PAGE_FAULT_IN_FREED_SPECIAL_POOL = ULONG($000000D5);
- {$EXTERNALSYM DRIVER_PAGE_FAULT_IN_FREED_SPECIAL_POOL}
-
-//
-// MessageId: DRIVER_PAGE_FAULT_BEYOND_END_OF_ALLOCATION
-//
-// MessageText:
-//
-//
-// The driver is attempting to access memory beyond the end of the allocation.
-//
-
- DRIVER_PAGE_FAULT_BEYOND_END_OF_ALLOCATION = ULONG($000000D6);
- {$EXTERNALSYM DRIVER_PAGE_FAULT_BEYOND_END_OF_ALLOCATION}
-
-//
-// MessageId: DRIVER_UNMAPPING_INVALID_VIEW
-//
-// MessageText:
-//
-//
-// The driver is attempting to unmap an invalid memory address.
-//
-
- DRIVER_UNMAPPING_INVALID_VIEW = ULONG($000000D7);
- {$EXTERNALSYM DRIVER_UNMAPPING_INVALID_VIEW}
-
-//
-// MessageId: DRIVER_USED_EXCESSIVE_PTES
-//
-// MessageText:
-//
-//
-// The driver has used an excessive number of system PTEs.
-//
-
- DRIVER_USED_EXCESSIVE_PTES = ULONG($000000D8);
- {$EXTERNALSYM DRIVER_USED_EXCESSIVE_PTES}
-
-//
-// MessageId: LOCKED_PAGES_TRACKER_CORRUPTION
-//
-// MessageText:
-//
-//
-// The driver is corrupting the locked pages tracking structures.
-//
-
- LOCKED_PAGES_TRACKER_CORRUPTION = ULONG($000000D9);
- {$EXTERNALSYM LOCKED_PAGES_TRACKER_CORRUPTION}
-
-//
-// MessageId: SYSTEM_PTE_MISUSE
-//
-// MessageText:
-//
-//
-// The driver is mismanaging system PTEs.
-//
-
- SYSTEM_PTE_MISUSE = ULONG($000000DA);
- {$EXTERNALSYM SYSTEM_PTE_MISUSE}
-
-//
-// MessageId: DRIVER_CORRUPTED_SYSPTES
-//
-// MessageText:
-//
-//
-// A driver has corrupted the memory management system PTEs.
-//
-
- DRIVER_CORRUPTED_SYSPTES = ULONG($000000DB);
- {$EXTERNALSYM DRIVER_CORRUPTED_SYSPTES}
-
-//
-// MessageId: DRIVER_INVALID_STACK_ACCESS
-//
-// MessageText:
-//
-//
-// A driver accessed a stack address that lies below the current stack pointer
-// of the stack's thread.
-//
-
- DRIVER_INVALID_STACK_ACCESS = ULONG($000000DC);
- {$EXTERNALSYM DRIVER_INVALID_STACK_ACCESS}
-
-//
-// MessageId: BUGCODE_PSS_MESSAGE_A5
-//
-// MessageText:
-//
-//
-// The BIOS in this system is not fully ACPI compliant. Please contact your
-// system vendor or visit http://www.hardware-update.com for an updated BIOS.
-// If you are unable to obtain an updated BIOS or the latest BIOS supplied by
-// your vendor is not ACPI compliant, you can turn off ACPI mode during text
-// mode setup. To do this, simply press the F7 key when you are prompted to
-// install storage drivers. The system will not notify you that the F7 key
-// was pressed - it will silently disable ACPI and allow you to continue
-// your installation.
-//
-
- BUGCODE_PSS_MESSAGE_A5 = ULONG($000000DD);
- {$EXTERNALSYM BUGCODE_PSS_MESSAGE_A5}
-
-//
-// MessageId: POOL_CORRUPTION_IN_FILE_AREA
-//
-// MessageText:
-//
-//
-// A driver corrupted pool memory used for holding pages destined for disk.
-//
-
- POOL_CORRUPTION_IN_FILE_AREA = ULONG($000000DE);
- {$EXTERNALSYM POOL_CORRUPTION_IN_FILE_AREA}
-
-//
-// MessageId: HARDWARE_PROFILE_UNDOCKED_STRING
-//
-// MessageText:
-//
-// Undocked Profile
-//
-
- HARDWARE_PROFILE_UNDOCKED_STRING = ULONG($40010001);
- {$EXTERNALSYM HARDWARE_PROFILE_UNDOCKED_STRING}
-
-//
-// MessageId: HARDWARE_PROFILE_DOCKED_STRING
-//
-// MessageText:
-//
-// Docked Profile
-//
-
- HARDWARE_PROFILE_DOCKED_STRING = ULONG($40010002);
- {$EXTERNALSYM HARDWARE_PROFILE_DOCKED_STRING}
-
-//
-// MessageId: HARDWARE_PROFILE_UNKNOWN_STRING
-//
-// MessageText:
-//
-// Profile
-//
-
- HARDWARE_PROFILE_UNKNOWN_STRING = ULONG($40010003);
- {$EXTERNALSYM HARDWARE_PROFILE_UNKNOWN_STRING}
-
-//
-// MessageId: IMPERSONATING_WORKER_THREAD
-//
-// MessageText:
-//
-//
-// A worker thread is impersonating another process. The work item forgot to
-// disable impersonation before it returned.
-//
-
- IMPERSONATING_WORKER_THREAD = ULONG($000000DF);
- {$EXTERNALSYM IMPERSONATING_WORKER_THREAD}
-
-//
-// MessageId: ACPI_BIOS_FATAL_ERROR
-//
-// MessageText:
-//
-//
-// Your computer (BIOS) has reported that a component in your system is faulty and
-// has prevented Windows from operating. You can determine which component is
-// faulty by running the diagnostic disk or tool that came with your computer.
-//
-// If you do not have this tool, you must contact your system vendor and report
-// this error message to them. They will be able to assist you in correcting this
-// hardware problem thereby allowing Windows to operate.
-//
-
- ACPI_BIOS_FATAL_ERROR = ULONG($000000E0);
- {$EXTERNALSYM ACPI_BIOS_FATAL_ERROR}
-
-//
-// MessageId: WORKER_THREAD_RETURNED_AT_BAD_IRQL
-//
-// MessageText:
-//
-// WORKER_THREAD_RETURNED_AT_BAD_IRQL
-//
-
- WORKER_THREAD_RETURNED_AT_BAD_IRQL = ULONG($000000E1);
- {$EXTERNALSYM WORKER_THREAD_RETURNED_AT_BAD_IRQL}
-
-//
-// MessageId: MANUALLY_INITIATED_CRASH
-//
-// MessageText:
-//
-//
-// The end-user manually generated the crashdump.
-//
-
- MANUALLY_INITIATED_CRASH = ULONG($000000E2);
- {$EXTERNALSYM MANUALLY_INITIATED_CRASH}
-
-//
-// MessageId: RESOURCE_NOT_OWNED
-//
-// MessageText:
-//
-//
-// A thread tried to release a resource it did not own.
-//
-
- RESOURCE_NOT_OWNED = ULONG($000000E3);
- {$EXTERNALSYM RESOURCE_NOT_OWNED}
-
-//
-// MessageId: WORKER_INVALID
-//
-// MessageText:
-//
-//
-// A executive worker item was found in memory which must not contain such
-// items. Usually this is memory being freed. This is usually caused by
-// a device driver that has not cleaned up properly before freeing memory.
-//
-
- WORKER_INVALID = ULONG($000000E4);
- {$EXTERNALSYM WORKER_INVALID}
-
-implementation
-
-end.
+{******************************************************************************}
+{ }
+{ NT Bug Codes API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: bugcodes.h, released June 2000. The original Pascal }
+{ code is: BugCodes.pas, released December 2000. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwabugcodes.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaBugCodes;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "bugcodes.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaWinType;
+
+{$I jediapilib.inc}
+
+//
+// Values are 32 bit values layed out as follows:
+//
+// 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1
+// 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
+// +---+-+-+-----------------------+-------------------------------+
+// |Sev|C|R| Facility | Code |
+// +---+-+-+-----------------------+-------------------------------+
+//
+// where
+//
+// Sev - is the severity code
+//
+// 00 - Success
+// 01 - Informational
+// 10 - Warning
+// 11 - Error
+//
+// C - is the Customer code flag
+//
+// R - is a reserved bit
+//
+// Facility - is the facility code
+//
+// Code - is the facility's status code
+//
+//
+// Define the facility codes
+//
+
+//
+// Define the severity codes
+//
+
+const
+
+//
+// MessageId: APC_INDEX_MISMATCH
+//
+// MessageText:
+//
+// APC_INDEX_MISMATCH
+//
+
+ APC_INDEX_MISMATCH = ULONG($00000001);
+ {$EXTERNALSYM APC_INDEX_MISMATCH}
+
+//
+// MessageId: DEVICE_QUEUE_NOT_BUSY
+//
+// MessageText:
+//
+// DEVICE_QUEUE_NOT_BUSY
+//
+
+ DEVICE_QUEUE_NOT_BUSY = ULONG($00000002);
+ {$EXTERNALSYM DEVICE_QUEUE_NOT_BUSY}
+
+//
+// MessageId: INVALID_AFFINITY_SET
+//
+// MessageText:
+//
+// INVALID_AFFINITY_SET
+//
+
+ INVALID_AFFINITY_SET = ULONG($00000003);
+ {$EXTERNALSYM INVALID_AFFINITY_SET}
+
+//
+// MessageId: INVALID_DATA_ACCESS_TRAP
+//
+// MessageText:
+//
+// INVALID_DATA_ACCESS_TRAP
+//
+
+ INVALID_DATA_ACCESS_TRAP = ULONG($00000004);
+ {$EXTERNALSYM INVALID_DATA_ACCESS_TRAP}
+
+//
+// MessageId: INVALID_PROCESS_ATTACH_ATTEMPT
+//
+// MessageText:
+//
+// INVALID_PROCESS_ATTACH_ATTEMPT
+//
+
+ INVALID_PROCESS_ATTACH_ATTEMPT = ULONG($00000005);
+ {$EXTERNALSYM INVALID_PROCESS_ATTACH_ATTEMPT}
+
+//
+// MessageId: INVALID_PROCESS_DETACH_ATTEMPT
+//
+// MessageText:
+//
+// INVALID_PROCESS_DETACH_ATTEMPT
+//
+
+ INVALID_PROCESS_DETACH_ATTEMPT = ULONG($00000006);
+ {$EXTERNALSYM INVALID_PROCESS_DETACH_ATTEMPT}
+
+//
+// MessageId: INVALID_SOFTWARE_INTERRUPT
+//
+// MessageText:
+//
+// INVALID_SOFTWARE_INTERRUPT
+//
+
+ INVALID_SOFTWARE_INTERRUPT = ULONG($00000007);
+ {$EXTERNALSYM INVALID_SOFTWARE_INTERRUPT}
+
+//
+// MessageId: IRQL_NOT_DISPATCH_LEVEL
+//
+// MessageText:
+//
+// IRQL_NOT_DISPATCH_LEVEL
+//
+
+ IRQL_NOT_DISPATCH_LEVEL = ULONG($00000008);
+ {$EXTERNALSYM IRQL_NOT_DISPATCH_LEVEL}
+
+//
+// MessageId: IRQL_NOT_GREATER_OR_EQUAL
+//
+// MessageText:
+//
+// IRQL_NOT_GREATER_OR_EQUAL
+//
+
+ IRQL_NOT_GREATER_OR_EQUAL = ULONG($00000009);
+ {$EXTERNALSYM IRQL_NOT_GREATER_OR_EQUAL}
+
+//
+// MessageId: IRQL_NOT_LESS_OR_EQUAL
+//
+// MessageText:
+//
+// IRQL_NOT_LESS_OR_EQUAL
+//
+
+ IRQL_NOT_LESS_OR_EQUAL = ULONG($0000000A);
+ {$EXTERNALSYM IRQL_NOT_LESS_OR_EQUAL}
+
+//
+// MessageId: NO_EXCEPTION_HANDLING_SUPPORT
+//
+// MessageText:
+//
+// NO_EXCEPTION_HANDLING_SUPPORT
+//
+
+ NO_EXCEPTION_HANDLING_SUPPORT = ULONG($0000000B);
+ {$EXTERNALSYM NO_EXCEPTION_HANDLING_SUPPORT}
+
+//
+// MessageId: MAXIMUM_WAIT_OBJECTS_EXCEEDED
+//
+// MessageText:
+//
+// MAXIMUM_WAIT_OBJECTS_EXCEEDED
+//
+
+ MAXIMUM_WAIT_OBJECTS_EXCEEDED = ULONG($0000000C);
+ {$EXTERNALSYM MAXIMUM_WAIT_OBJECTS_EXCEEDED}
+
+//
+// MessageId: MUTEX_LEVEL_NUMBER_VIOLATION
+//
+// MessageText:
+//
+// MUTEX_LEVEL_NUMBER_VIOLATION
+//
+
+ MUTEX_LEVEL_NUMBER_VIOLATION = ULONG($0000000D);
+ {$EXTERNALSYM MUTEX_LEVEL_NUMBER_VIOLATION}
+
+//
+// MessageId: NO_USER_MODE_CONTEXT
+//
+// MessageText:
+//
+// NO_USER_MODE_CONTEXT
+//
+
+ NO_USER_MODE_CONTEXT = ULONG($0000000E);
+ {$EXTERNALSYM NO_USER_MODE_CONTEXT}
+
+//
+// MessageId: SPIN_LOCK_ALREADY_OWNED
+//
+// MessageText:
+//
+// SPIN_LOCK_ALREADY_OWNED
+//
+
+ SPIN_LOCK_ALREADY_OWNED = ULONG($0000000F);
+ {$EXTERNALSYM SPIN_LOCK_ALREADY_OWNED}
+
+//
+// MessageId: SPIN_LOCK_NOT_OWNED
+//
+// MessageText:
+//
+// SPIN_LOCK_NOT_OWNED
+//
+
+ SPIN_LOCK_NOT_OWNED = ULONG($00000010);
+ {$EXTERNALSYM SPIN_LOCK_NOT_OWNED}
+
+//
+// MessageId: THREAD_NOT_MUTEX_OWNER
+//
+// MessageText:
+//
+// THREAD_NOT_MUTEX_OWNER
+//
+
+ THREAD_NOT_MUTEX_OWNER = ULONG($00000011);
+ {$EXTERNALSYM THREAD_NOT_MUTEX_OWNER}
+
+//
+// MessageId: TRAP_CAUSE_UNKNOWN
+//
+// MessageText:
+//
+// TRAP_CAUSE_UNKNOWN
+//
+
+ TRAP_CAUSE_UNKNOWN = ULONG($00000012);
+ {$EXTERNALSYM TRAP_CAUSE_UNKNOWN}
+
+//
+// MessageId: EMPTY_THREAD_REAPER_LIST
+//
+// MessageText:
+//
+// EMPTY_THREAD_REAPER_LIST
+//
+
+ EMPTY_THREAD_REAPER_LIST = ULONG($00000013);
+ {$EXTERNALSYM EMPTY_THREAD_REAPER_LIST}
+
+//
+// MessageId: CREATE_DELETE_LOCK_NOT_LOCKED
+//
+// MessageText:
+//
+// CREATE_DELETE_LOCK_NOT_LOCKED
+//
+
+ CREATE_DELETE_LOCK_NOT_LOCKED = ULONG($00000014);
+ {$EXTERNALSYM CREATE_DELETE_LOCK_NOT_LOCKED}
+
+//
+// MessageId: LAST_CHANCE_CALLED_FROM_KMODE
+//
+// MessageText:
+//
+// LAST_CHANCE_CALLED_FROM_KMODE
+//
+
+ LAST_CHANCE_CALLED_FROM_KMODE = ULONG($00000015);
+ {$EXTERNALSYM LAST_CHANCE_CALLED_FROM_KMODE}
+
+//
+// MessageId: CID_HANDLE_CREATION
+//
+// MessageText:
+//
+// CID_HANDLE_CREATION
+//
+
+ CID_HANDLE_CREATION = ULONG($00000016);
+ {$EXTERNALSYM CID_HANDLE_CREATION}
+
+//
+// MessageId: CID_HANDLE_DELETION
+//
+// MessageText:
+//
+// CID_HANDLE_DELETION
+//
+
+ CID_HANDLE_DELETION = ULONG($00000017);
+ {$EXTERNALSYM CID_HANDLE_DELETION}
+
+//
+// MessageId: REFERENCE_BY_POINTER
+//
+// MessageText:
+//
+// REFERENCE_BY_POINTER
+//
+
+ REFERENCE_BY_POINTER = ULONG($00000018);
+ {$EXTERNALSYM REFERENCE_BY_POINTER}
+
+//
+// MessageId: BAD_POOL_HEADER
+//
+// MessageText:
+//
+// BAD_POOL_HEADER
+//
+
+ BAD_POOL_HEADER = ULONG($00000019);
+ {$EXTERNALSYM BAD_POOL_HEADER}
+
+//
+// MessageId: MEMORY_MANAGEMENT
+//
+// MessageText:
+//
+// MEMORY_MANAGEMENT
+//
+
+ MEMORY_MANAGEMENT = ULONG($0000001A);
+ {$EXTERNALSYM MEMORY_MANAGEMENT}
+
+//
+// MessageId: PFN_SHARE_COUNT
+//
+// MessageText:
+//
+// PFN_SHARE_COUNT
+//
+
+ PFN_SHARE_COUNT = ULONG($0000001B);
+ {$EXTERNALSYM PFN_SHARE_COUNT}
+
+//
+// MessageId: PFN_REFERENCE_COUNT
+//
+// MessageText:
+//
+// PFN_REFERENCE_COUNT
+//
+
+ PFN_REFERENCE_COUNT = ULONG($0000001C);
+ {$EXTERNALSYM PFN_REFERENCE_COUNT}
+
+//
+// MessageId: NO_SPIN_LOCK_AVAILABLE
+//
+// MessageText:
+//
+// NO_SPIN_LOCK_AVAILABLE
+//
+
+ NO_SPIN_LOCK_AVAILABLE = ULONG($0000001D);
+ {$EXTERNALSYM NO_SPIN_LOCK_AVAILABLE}
+
+//
+// MessageId: KMODE_EXCEPTION_NOT_HANDLED
+//
+// MessageText:
+//
+// KMODE_EXCEPTION_NOT_HANDLED
+//
+
+ KMODE_EXCEPTION_NOT_HANDLED = ULONG($0000001E);
+ {$EXTERNALSYM KMODE_EXCEPTION_NOT_HANDLED}
+
+//
+// MessageId: SHARED_RESOURCE_CONV_ERROR
+//
+// MessageText:
+//
+// SHARED_RESOURCE_CONV_ERROR
+//
+
+ SHARED_RESOURCE_CONV_ERROR = ULONG($0000001F);
+ {$EXTERNALSYM SHARED_RESOURCE_CONV_ERROR}
+
+//
+// MessageId: KERNEL_APC_PENDING_DURING_EXIT
+//
+// MessageText:
+//
+// KERNEL_APC_PENDING_DURING_EXIT
+//
+
+ KERNEL_APC_PENDING_DURING_EXIT = ULONG($00000020);
+ {$EXTERNALSYM KERNEL_APC_PENDING_DURING_EXIT}
+
+//
+// MessageId: QUOTA_UNDERFLOW
+//
+// MessageText:
+//
+// QUOTA_UNDERFLOW
+//
+
+ QUOTA_UNDERFLOW = ULONG($00000021);
+ {$EXTERNALSYM QUOTA_UNDERFLOW}
+
+//
+// MessageId: FILE_SYSTEM
+//
+// MessageText:
+//
+// FILE_SYSTEM
+//
+
+ FILE_SYSTEM = ULONG($00000022);
+ {$EXTERNALSYM FILE_SYSTEM}
+
+//
+// MessageId: FAT_FILE_SYSTEM
+//
+// MessageText:
+//
+// FAT_FILE_SYSTEM
+//
+
+ FAT_FILE_SYSTEM = ULONG($00000023);
+ {$EXTERNALSYM FAT_FILE_SYSTEM}
+
+//
+// MessageId: NTFS_FILE_SYSTEM
+//
+// MessageText:
+//
+// NTFS_FILE_SYSTEM
+//
+
+ NTFS_FILE_SYSTEM = ULONG($00000024);
+ {$EXTERNALSYM NTFS_FILE_SYSTEM}
+
+//
+// MessageId: NPFS_FILE_SYSTEM
+//
+// MessageText:
+//
+// NPFS_FILE_SYSTEM
+//
+
+ NPFS_FILE_SYSTEM = ULONG($00000025);
+ {$EXTERNALSYM NPFS_FILE_SYSTEM}
+
+//
+// MessageId: CDFS_FILE_SYSTEM
+//
+// MessageText:
+//
+// CDFS_FILE_SYSTEM
+//
+
+ CDFS_FILE_SYSTEM = ULONG($00000026);
+ {$EXTERNALSYM CDFS_FILE_SYSTEM}
+
+//
+// MessageId: RDR_FILE_SYSTEM
+//
+// MessageText:
+//
+// RDR_FILE_SYSTEM
+//
+
+ RDR_FILE_SYSTEM = ULONG($00000027);
+ {$EXTERNALSYM RDR_FILE_SYSTEM}
+
+//
+// MessageId: CORRUPT_ACCESS_TOKEN
+//
+// MessageText:
+//
+// CORRUPT_ACCESS_TOKEN
+//
+
+ CORRUPT_ACCESS_TOKEN = ULONG($00000028);
+ {$EXTERNALSYM CORRUPT_ACCESS_TOKEN}
+
+//
+// MessageId: SECURITY_SYSTEM
+//
+// MessageText:
+//
+// SECURITY_SYSTEM
+//
+
+ SECURITY_SYSTEM = ULONG($00000029);
+ {$EXTERNALSYM SECURITY_SYSTEM}
+
+//
+// MessageId: INCONSISTENT_IRP
+//
+// MessageText:
+//
+// INCONSISTENT_IRP
+//
+
+ INCONSISTENT_IRP = ULONG($0000002A);
+ {$EXTERNALSYM INCONSISTENT_IRP}
+
+//
+// MessageId: PANIC_STACK_SWITCH
+//
+// MessageText:
+//
+// PANIC_STACK_SWITCH
+//
+
+ PANIC_STACK_SWITCH = ULONG($0000002B);
+ {$EXTERNALSYM PANIC_STACK_SWITCH}
+
+//
+// MessageId: PORT_DRIVER_INTERNAL
+//
+// MessageText:
+//
+// PORT_DRIVER_INTERNAL
+//
+
+ PORT_DRIVER_INTERNAL = ULONG($0000002C);
+ {$EXTERNALSYM PORT_DRIVER_INTERNAL}
+
+//
+// MessageId: SCSI_DISK_DRIVER_INTERNAL
+//
+// MessageText:
+//
+// SCSI_DISK_DRIVER_INTERNAL
+//
+
+ SCSI_DISK_DRIVER_INTERNAL = ULONG($0000002D);
+ {$EXTERNALSYM SCSI_DISK_DRIVER_INTERNAL}
+
+//
+// MessageId: DATA_BUS_ERROR
+//
+// MessageText:
+//
+// DATA_BUS_ERROR
+//
+
+ DATA_BUS_ERROR = ULONG($0000002E);
+ {$EXTERNALSYM DATA_BUS_ERROR}
+
+//
+// MessageId: INSTRUCTION_BUS_ERROR
+//
+// MessageText:
+//
+// INSTRUCTION_BUS_ERROR
+//
+
+ INSTRUCTION_BUS_ERROR = ULONG($0000002F);
+ {$EXTERNALSYM INSTRUCTION_BUS_ERROR}
+
+//
+// MessageId: SET_OF_INVALID_CONTEXT
+//
+// MessageText:
+//
+// SET_OF_INVALID_CONTEXT
+//
+
+ SET_OF_INVALID_CONTEXT = ULONG($00000030);
+ {$EXTERNALSYM SET_OF_INVALID_CONTEXT}
+
+//
+// MessageId: PHASE0_INITIALIZATION_FAILED
+//
+// MessageText:
+//
+// PHASE0_INITIALIZATION_FAILED
+//
+
+ PHASE0_INITIALIZATION_FAILED = ULONG($00000031);
+ {$EXTERNALSYM PHASE0_INITIALIZATION_FAILED}
+
+//
+// MessageId: PHASE1_INITIALIZATION_FAILED
+//
+// MessageText:
+//
+// PHASE1_INITIALIZATION_FAILED
+//
+
+ PHASE1_INITIALIZATION_FAILED = ULONG($00000032);
+ {$EXTERNALSYM PHASE1_INITIALIZATION_FAILED}
+
+//
+// MessageId: UNEXPECTED_INITIALIZATION_CALL
+//
+// MessageText:
+//
+// UNEXPECTED_INITIALIZATION_CALL
+//
+
+ UNEXPECTED_INITIALIZATION_CALL = ULONG($00000033);
+ {$EXTERNALSYM UNEXPECTED_INITIALIZATION_CALL}
+
+//
+// MessageId: CACHE_MANAGER
+//
+// MessageText:
+//
+// CACHE_MANAGER
+//
+
+ CACHE_MANAGER = ULONG($00000034);
+ {$EXTERNALSYM CACHE_MANAGER}
+
+//
+// MessageId: NO_MORE_IRP_STACK_LOCATIONS
+//
+// MessageText:
+//
+// NO_MORE_IRP_STACK_LOCATIONS
+//
+
+ NO_MORE_IRP_STACK_LOCATIONS = ULONG($00000035);
+ {$EXTERNALSYM NO_MORE_IRP_STACK_LOCATIONS}
+
+//
+// MessageId: DEVICE_REFERENCE_COUNT_NOT_ZERO
+//
+// MessageText:
+//
+// DEVICE_REFERENCE_COUNT_NOT_ZERO
+//
+
+ DEVICE_REFERENCE_COUNT_NOT_ZERO = ULONG($00000036);
+ {$EXTERNALSYM DEVICE_REFERENCE_COUNT_NOT_ZERO}
+
+//
+// MessageId: FLOPPY_INTERNAL_ERROR
+//
+// MessageText:
+//
+// FLOPPY_INTERNAL_ERROR
+//
+
+ FLOPPY_INTERNAL_ERROR = ULONG($00000037);
+ {$EXTERNALSYM FLOPPY_INTERNAL_ERROR}
+
+//
+// MessageId: SERIAL_DRIVER_INTERNAL
+//
+// MessageText:
+//
+// SERIAL_DRIVER_INTERNAL
+//
+
+ SERIAL_DRIVER_INTERNAL = ULONG($00000038);
+ {$EXTERNALSYM SERIAL_DRIVER_INTERNAL}
+
+//
+// MessageId: SYSTEM_EXIT_OWNED_MUTEX
+//
+// MessageText:
+//
+// SYSTEM_EXIT_OWNED_MUTEX
+//
+
+ SYSTEM_EXIT_OWNED_MUTEX = ULONG($00000039);
+ {$EXTERNALSYM SYSTEM_EXIT_OWNED_MUTEX}
+
+//
+// MessageId: SYSTEM_UNWIND_PREVIOUS_USER
+//
+// MessageText:
+//
+// SYSTEM_UNWIND_PREVIOUS_USER
+//
+
+ SYSTEM_UNWIND_PREVIOUS_USER = ULONG($0000003A);
+ {$EXTERNALSYM SYSTEM_UNWIND_PREVIOUS_USER}
+
+//
+// MessageId: SYSTEM_SERVICE_EXCEPTION
+//
+// MessageText:
+//
+// SYSTEM_SERVICE_EXCEPTION
+//
+
+ SYSTEM_SERVICE_EXCEPTION = ULONG($0000003B);
+ {$EXTERNALSYM SYSTEM_SERVICE_EXCEPTION}
+
+//
+// MessageId: INTERRUPT_UNWIND_ATTEMPTED
+//
+// MessageText:
+//
+// INTERRUPT_UNWIND_ATTEMPTED
+//
+
+ INTERRUPT_UNWIND_ATTEMPTED = ULONG($0000003C);
+ {$EXTERNALSYM INTERRUPT_UNWIND_ATTEMPTED}
+
+//
+// MessageId: INTERRUPT_EXCEPTION_NOT_HANDLED
+//
+// MessageText:
+//
+// INTERRUPT_EXCEPTION_NOT_HANDLED
+//
+
+ INTERRUPT_EXCEPTION_NOT_HANDLED = ULONG($0000003D);
+ {$EXTERNALSYM INTERRUPT_EXCEPTION_NOT_HANDLED}
+
+//
+// MessageId: MULTIPROCESSOR_CONFIGURATION_NOT_SUPPORTED
+//
+// MessageText:
+//
+// MULTIPROCESSOR_CONFIGURATION_NOT_SUPPORTED
+//
+
+ MULTIPROCESSOR_CONFIGURATION_NOT_SUPPORTED = ULONG($0000003E);
+ {$EXTERNALSYM MULTIPROCESSOR_CONFIGURATION_NOT_SUPPORTED}
+
+//
+// MessageId: NO_MORE_SYSTEM_PTES
+//
+// MessageText:
+//
+// NO_MORE_SYSTEM_PTES
+//
+
+ NO_MORE_SYSTEM_PTES = ULONG($0000003F);
+ {$EXTERNALSYM NO_MORE_SYSTEM_PTES}
+
+//
+// MessageId: TARGET_MDL_TOO_SMALL
+//
+// MessageText:
+//
+// TARGET_MDL_TOO_SMALL
+//
+
+ TARGET_MDL_TOO_SMALL = ULONG($00000040);
+ {$EXTERNALSYM TARGET_MDL_TOO_SMALL}
+
+//
+// MessageId: MUST_SUCCEED_POOL_EMPTY
+//
+// MessageText:
+//
+// MUST_SUCCEED_POOL_EMPTY
+//
+
+ MUST_SUCCEED_POOL_EMPTY = ULONG($00000041);
+ {$EXTERNALSYM MUST_SUCCEED_POOL_EMPTY}
+
+//
+// MessageId: ATDISK_DRIVER_INTERNAL
+//
+// MessageText:
+//
+// ATDISK_DRIVER_INTERNAL
+//
+
+ ATDISK_DRIVER_INTERNAL = ULONG($00000042);
+ {$EXTERNALSYM ATDISK_DRIVER_INTERNAL}
+
+//
+// MessageId: NO_SUCH_PARTITION
+//
+// MessageText:
+//
+// NO_SUCH_PARTITION
+//
+
+ NO_SUCH_PARTITION = ULONG($00000043);
+ {$EXTERNALSYM NO_SUCH_PARTITION}
+
+//
+// MessageId: MULTIPLE_IRP_COMPLETE_REQUESTS
+//
+// MessageText:
+//
+// MULTIPLE_IRP_COMPLETE_REQUESTS
+//
+
+ MULTIPLE_IRP_COMPLETE_REQUESTS = ULONG($00000044);
+ {$EXTERNALSYM MULTIPLE_IRP_COMPLETE_REQUESTS}
+
+//
+// MessageId: INSUFFICIENT_SYSTEM_MAP_REGS
+//
+// MessageText:
+//
+// INSUFFICIENT_SYSTEM_MAP_REGS
+//
+
+ INSUFFICIENT_SYSTEM_MAP_REGS = ULONG($00000045);
+ {$EXTERNALSYM INSUFFICIENT_SYSTEM_MAP_REGS}
+
+//
+// MessageId: DEREF_UNKNOWN_LOGON_SESSION
+//
+// MessageText:
+//
+// DEREF_UNKNOWN_LOGON_SESSION
+//
+
+ DEREF_UNKNOWN_LOGON_SESSION = ULONG($00000046);
+ {$EXTERNALSYM DEREF_UNKNOWN_LOGON_SESSION}
+
+//
+// MessageId: REF_UNKNOWN_LOGON_SESSION
+//
+// MessageText:
+//
+// REF_UNKNOWN_LOGON_SESSION
+//
+
+ REF_UNKNOWN_LOGON_SESSION = ULONG($00000047);
+ {$EXTERNALSYM REF_UNKNOWN_LOGON_SESSION}
+
+//
+// MessageId: CANCEL_STATE_IN_COMPLETED_IRP
+//
+// MessageText:
+//
+// CANCEL_STATE_IN_COMPLETED_IRP
+//
+
+ CANCEL_STATE_IN_COMPLETED_IRP = ULONG($00000048);
+ {$EXTERNALSYM CANCEL_STATE_IN_COMPLETED_IRP}
+
+//
+// MessageId: PAGE_FAULT_WITH_INTERRUPTS_OFF
+//
+// MessageText:
+//
+// PAGE_FAULT_WITH_INTERRUPTS_OFF
+//
+
+ PAGE_FAULT_WITH_INTERRUPTS_OFF = ULONG($00000049);
+ {$EXTERNALSYM PAGE_FAULT_WITH_INTERRUPTS_OFF}
+
+//
+// MessageId: IRQL_GT_ZERO_AT_SYSTEM_SERVICE
+//
+// MessageText:
+//
+// IRQL_GT_ZERO_AT_SYSTEM_SERVICE
+//
+
+ IRQL_GT_ZERO_AT_SYSTEM_SERVICE = ULONG($0000004A);
+ {$EXTERNALSYM IRQL_GT_ZERO_AT_SYSTEM_SERVICE}
+
+//
+// MessageId: STREAMS_INTERNAL_ERROR
+//
+// MessageText:
+//
+// STREAMS_INTERNAL_ERROR
+//
+
+ STREAMS_INTERNAL_ERROR = ULONG($0000004B);
+ {$EXTERNALSYM STREAMS_INTERNAL_ERROR}
+
+//
+// MessageId: FATAL_UNHANDLED_HARD_ERROR
+//
+// MessageText:
+//
+// FATAL_UNHANDLED_HARD_ERROR
+//
+
+ FATAL_UNHANDLED_HARD_ERROR = ULONG($0000004C);
+ {$EXTERNALSYM FATAL_UNHANDLED_HARD_ERROR}
+
+//
+// MessageId: NO_PAGES_AVAILABLE
+//
+// MessageText:
+//
+// NO_PAGES_AVAILABLE
+//
+
+ NO_PAGES_AVAILABLE = ULONG($0000004D);
+ {$EXTERNALSYM NO_PAGES_AVAILABLE}
+
+//
+// MessageId: PFN_LIST_CORRUPT
+//
+// MessageText:
+//
+// PFN_LIST_CORRUPT
+//
+
+ PFN_LIST_CORRUPT = ULONG($0000004E);
+ {$EXTERNALSYM PFN_LIST_CORRUPT}
+
+//
+// MessageId: NDIS_INTERNAL_ERROR
+//
+// MessageText:
+//
+// NDIS_INTERNAL_ERROR
+//
+
+ NDIS_INTERNAL_ERROR = ULONG($0000004F);
+ {$EXTERNALSYM NDIS_INTERNAL_ERROR}
+
+//
+// MessageId: PAGE_FAULT_IN_NONPAGED_AREA
+//
+// MessageText:
+//
+// PAGE_FAULT_IN_NONPAGED_AREA
+//
+
+ PAGE_FAULT_IN_NONPAGED_AREA = ULONG($00000050);
+ {$EXTERNALSYM PAGE_FAULT_IN_NONPAGED_AREA}
+
+//
+// MessageId: REGISTRY_ERROR
+//
+// MessageText:
+//
+// REGISTRY_ERROR
+//
+
+ REGISTRY_ERROR = ULONG($00000051);
+ {$EXTERNALSYM REGISTRY_ERROR}
+
+//
+// MessageId: MAILSLOT_FILE_SYSTEM
+//
+// MessageText:
+//
+// MAILSLOT_FILE_SYSTEM
+//
+
+ MAILSLOT_FILE_SYSTEM = ULONG($00000052);
+ {$EXTERNALSYM MAILSLOT_FILE_SYSTEM}
+
+//
+// MessageId: NO_BOOT_DEVICE
+//
+// MessageText:
+//
+// NO_BOOT_DEVICE
+//
+
+ NO_BOOT_DEVICE = ULONG($00000053);
+ {$EXTERNALSYM NO_BOOT_DEVICE}
+
+//
+// MessageId: LM_SERVER_INTERNAL_ERROR
+//
+// MessageText:
+//
+// LM_SERVER_INTERNAL_ERROR
+//
+
+ LM_SERVER_INTERNAL_ERROR = ULONG($00000054);
+ {$EXTERNALSYM LM_SERVER_INTERNAL_ERROR}
+
+//
+// MessageId: DATA_COHERENCY_EXCEPTION
+//
+// MessageText:
+//
+// DATA_COHERENCY_EXCEPTION
+//
+
+ DATA_COHERENCY_EXCEPTION = ULONG($00000055);
+ {$EXTERNALSYM DATA_COHERENCY_EXCEPTION}
+
+//
+// MessageId: INSTRUCTION_COHERENCY_EXCEPTION
+//
+// MessageText:
+//
+// INSTRUCTION_COHERENCY_EXCEPTION
+//
+
+ INSTRUCTION_COHERENCY_EXCEPTION = ULONG($00000056);
+ {$EXTERNALSYM INSTRUCTION_COHERENCY_EXCEPTION}
+
+//
+// MessageId: XNS_INTERNAL_ERROR
+//
+// MessageText:
+//
+// XNS_INTERNAL_ERROR
+//
+
+ XNS_INTERNAL_ERROR = ULONG($00000057);
+ {$EXTERNALSYM XNS_INTERNAL_ERROR}
+
+//
+// MessageId: FTDISK_INTERNAL_ERROR
+//
+// MessageText:
+//
+// FTDISK_INTERNAL_ERROR
+//
+
+ FTDISK_INTERNAL_ERROR = ULONG($00000058);
+ {$EXTERNALSYM FTDISK_INTERNAL_ERROR}
+
+//
+// MessageId: PINBALL_FILE_SYSTEM
+//
+// MessageText:
+//
+// PINBALL_FILE_SYSTEM
+//
+
+ PINBALL_FILE_SYSTEM = ULONG($00000059);
+ {$EXTERNALSYM PINBALL_FILE_SYSTEM}
+
+//
+// MessageId: CRITICAL_SERVICE_FAILED
+//
+// MessageText:
+//
+// CRITICAL_SERVICE_FAILED
+//
+
+ CRITICAL_SERVICE_FAILED = ULONG($0000005A);
+ {$EXTERNALSYM CRITICAL_SERVICE_FAILED}
+
+//
+// MessageId: SET_ENV_VAR_FAILED
+//
+// MessageText:
+//
+// SET_ENV_VAR_FAILED
+//
+
+ SET_ENV_VAR_FAILED = ULONG($0000005B);
+ {$EXTERNALSYM SET_ENV_VAR_FAILED}
+
+//
+// MessageId: HAL_INITIALIZATION_FAILED
+//
+// MessageText:
+//
+// HAL_INITIALIZATION_FAILED
+//
+
+ HAL_INITIALIZATION_FAILED = ULONG($0000005C);
+ {$EXTERNALSYM HAL_INITIALIZATION_FAILED}
+
+//
+// MessageId: UNSUPPORTED_PROCESSOR
+//
+// MessageText:
+//
+// UNSUPPORTED_PROCESSOR
+//
+
+ UNSUPPORTED_PROCESSOR = ULONG($0000005D);
+ {$EXTERNALSYM UNSUPPORTED_PROCESSOR}
+
+//
+// MessageId: OBJECT_INITIALIZATION_FAILED
+//
+// MessageText:
+//
+// OBJECT_INITIALIZATION_FAILED
+//
+
+ OBJECT_INITIALIZATION_FAILED = ULONG($0000005E);
+ {$EXTERNALSYM OBJECT_INITIALIZATION_FAILED}
+
+//
+// MessageId: SECURITY_INITIALIZATION_FAILED
+//
+// MessageText:
+//
+// SECURITY_INITIALIZATION_FAILED
+//
+
+ SECURITY_INITIALIZATION_FAILED = ULONG($0000005F);
+ {$EXTERNALSYM SECURITY_INITIALIZATION_FAILED}
+
+//
+// MessageId: PROCESS_INITIALIZATION_FAILED
+//
+// MessageText:
+//
+// PROCESS_INITIALIZATION_FAILED
+//
+
+ PROCESS_INITIALIZATION_FAILED = ULONG($00000060);
+ {$EXTERNALSYM PROCESS_INITIALIZATION_FAILED}
+
+//
+// MessageId: HAL1_INITIALIZATION_FAILED
+//
+// MessageText:
+//
+// HAL1_INITIALIZATION_FAILED
+//
+
+ HAL1_INITIALIZATION_FAILED = ULONG($00000061);
+ {$EXTERNALSYM HAL1_INITIALIZATION_FAILED}
+
+//
+// MessageId: OBJECT1_INITIALIZATION_FAILED
+//
+// MessageText:
+//
+// OBJECT1_INITIALIZATION_FAILED
+//
+
+ OBJECT1_INITIALIZATION_FAILED = ULONG($00000062);
+ {$EXTERNALSYM OBJECT1_INITIALIZATION_FAILED}
+
+//
+// MessageId: SECURITY1_INITIALIZATION_FAILED
+//
+// MessageText:
+//
+// SECURITY1_INITIALIZATION_FAILED
+//
+
+ SECURITY1_INITIALIZATION_FAILED = ULONG($00000063);
+ {$EXTERNALSYM SECURITY1_INITIALIZATION_FAILED}
+
+//
+// MessageId: SYMBOLIC_INITIALIZATION_FAILED
+//
+// MessageText:
+//
+// SYMBOLIC_INITIALIZATION_FAILED
+//
+
+ SYMBOLIC_INITIALIZATION_FAILED = ULONG($00000064);
+ {$EXTERNALSYM SYMBOLIC_INITIALIZATION_FAILED}
+
+//
+// MessageId: MEMORY1_INITIALIZATION_FAILED
+//
+// MessageText:
+//
+// MEMORY1_INITIALIZATION_FAILED
+//
+
+ MEMORY1_INITIALIZATION_FAILED = ULONG($00000065);
+ {$EXTERNALSYM MEMORY1_INITIALIZATION_FAILED}
+
+//
+// MessageId: CACHE_INITIALIZATION_FAILED
+//
+// MessageText:
+//
+// CACHE_INITIALIZATION_FAILED
+//
+
+ CACHE_INITIALIZATION_FAILED = ULONG($00000066);
+ {$EXTERNALSYM CACHE_INITIALIZATION_FAILED}
+
+//
+// MessageId: CONFIG_INITIALIZATION_FAILED
+//
+// MessageText:
+//
+// CONFIG_INITIALIZATION_FAILED
+//
+
+ CONFIG_INITIALIZATION_FAILED = ULONG($00000067);
+ {$EXTERNALSYM CONFIG_INITIALIZATION_FAILED}
+
+//
+// MessageId: FILE_INITIALIZATION_FAILED
+//
+// MessageText:
+//
+// FILE_INITIALIZATION_FAILED
+//
+
+ FILE_INITIALIZATION_FAILED = ULONG($00000068);
+ {$EXTERNALSYM FILE_INITIALIZATION_FAILED}
+
+//
+// MessageId: IO1_INITIALIZATION_FAILED
+//
+// MessageText:
+//
+// IO1_INITIALIZATION_FAILED
+//
+
+ IO1_INITIALIZATION_FAILED = ULONG($00000069);
+ {$EXTERNALSYM IO1_INITIALIZATION_FAILED}
+
+//
+// MessageId: LPC_INITIALIZATION_FAILED
+//
+// MessageText:
+//
+// LPC_INITIALIZATION_FAILED
+//
+
+ LPC_INITIALIZATION_FAILED = ULONG($0000006A);
+ {$EXTERNALSYM LPC_INITIALIZATION_FAILED}
+
+//
+// MessageId: PROCESS1_INITIALIZATION_FAILED
+//
+// MessageText:
+//
+// PROCESS1_INITIALIZATION_FAILED
+//
+
+ PROCESS1_INITIALIZATION_FAILED = ULONG($0000006B);
+ {$EXTERNALSYM PROCESS1_INITIALIZATION_FAILED}
+
+//
+// MessageId: REFMON_INITIALIZATION_FAILED
+//
+// MessageText:
+//
+// REFMON_INITIALIZATION_FAILED
+//
+
+ REFMON_INITIALIZATION_FAILED = ULONG($0000006C);
+ {$EXTERNALSYM REFMON_INITIALIZATION_FAILED}
+
+//
+// MessageId: SESSION1_INITIALIZATION_FAILED
+//
+// MessageText:
+//
+// SESSION1_INITIALIZATION_FAILED
+//
+
+ SESSION1_INITIALIZATION_FAILED = ULONG($0000006D);
+ {$EXTERNALSYM SESSION1_INITIALIZATION_FAILED}
+
+//
+// MessageId: SESSION2_INITIALIZATION_FAILED
+//
+// MessageText:
+//
+// SESSION2_INITIALIZATION_FAILED
+//
+
+ SESSION2_INITIALIZATION_FAILED = ULONG($0000006E);
+ {$EXTERNALSYM SESSION2_INITIALIZATION_FAILED}
+
+//
+// MessageId: SESSION3_INITIALIZATION_FAILED
+//
+// MessageText:
+//
+// SESSION3_INITIALIZATION_FAILED
+//
+
+ SESSION3_INITIALIZATION_FAILED = ULONG($0000006F);
+ {$EXTERNALSYM SESSION3_INITIALIZATION_FAILED}
+
+//
+// MessageId: SESSION4_INITIALIZATION_FAILED
+//
+// MessageText:
+//
+// SESSION4_INITIALIZATION_FAILED
+//
+
+ SESSION4_INITIALIZATION_FAILED = ULONG($00000070);
+ {$EXTERNALSYM SESSION4_INITIALIZATION_FAILED}
+
+//
+// MessageId: SESSION5_INITIALIZATION_FAILED
+//
+// MessageText:
+//
+// SESSION5_INITIALIZATION_FAILED
+//
+
+ SESSION5_INITIALIZATION_FAILED = ULONG($00000071);
+ {$EXTERNALSYM SESSION5_INITIALIZATION_FAILED}
+
+//
+// MessageId: ASSIGN_DRIVE_LETTERS_FAILED
+//
+// MessageText:
+//
+// ASSIGN_DRIVE_LETTERS_FAILED
+//
+
+ ASSIGN_DRIVE_LETTERS_FAILED = ULONG($00000072);
+ {$EXTERNALSYM ASSIGN_DRIVE_LETTERS_FAILED}
+
+//
+// MessageId: CONFIG_LIST_FAILED
+//
+// MessageText:
+//
+// CONFIG_LIST_FAILED
+//
+
+ CONFIG_LIST_FAILED = ULONG($00000073);
+ {$EXTERNALSYM CONFIG_LIST_FAILED}
+
+//
+// MessageId: BAD_SYSTEM_CONFIG_INFO
+//
+// MessageText:
+//
+// BAD_SYSTEM_CONFIG_INFO
+//
+
+ BAD_SYSTEM_CONFIG_INFO = ULONG($00000074);
+ {$EXTERNALSYM BAD_SYSTEM_CONFIG_INFO}
+
+//
+// MessageId: CANNOT_WRITE_CONFIGURATION
+//
+// MessageText:
+//
+// CANNOT_WRITE_CONFIGURATION
+//
+
+ CANNOT_WRITE_CONFIGURATION = ULONG($00000075);
+ {$EXTERNALSYM CANNOT_WRITE_CONFIGURATION}
+
+//
+// MessageId: PROCESS_HAS_LOCKED_PAGES
+//
+// MessageText:
+//
+// PROCESS_HAS_LOCKED_PAGES
+//
+
+ PROCESS_HAS_LOCKED_PAGES = ULONG($00000076);
+ {$EXTERNALSYM PROCESS_HAS_LOCKED_PAGES}
+
+//
+// MessageId: KERNEL_STACK_INPAGE_ERROR
+//
+// MessageText:
+//
+// KERNEL_STACK_INPAGE_ERROR
+//
+
+ KERNEL_STACK_INPAGE_ERROR = ULONG($00000077);
+ {$EXTERNALSYM KERNEL_STACK_INPAGE_ERROR}
+
+//
+// MessageId: PHASE0_EXCEPTION
+//
+// MessageText:
+//
+// PHASE0_EXCEPTION
+//
+
+ PHASE0_EXCEPTION = ULONG($00000078);
+ {$EXTERNALSYM PHASE0_EXCEPTION}
+
+//
+// MessageId: MISMATCHED_HAL
+//
+// MessageText:
+//
+// Mismatched kernel and hal image.
+//
+
+ MISMATCHED_HAL = ULONG($00000079);
+ {$EXTERNALSYM MISMATCHED_HAL}
+
+//
+// MessageId: KERNEL_DATA_INPAGE_ERROR
+//
+// MessageText:
+//
+// KERNEL_DATA_INPAGE_ERROR
+//
+
+ KERNEL_DATA_INPAGE_ERROR = ULONG($0000007A);
+ {$EXTERNALSYM KERNEL_DATA_INPAGE_ERROR}
+
+//
+// MessageId: INACCESSIBLE_BOOT_DEVICE
+//
+// MessageText:
+//
+// INACCESSIBLE_BOOT_DEVICE
+//
+
+ INACCESSIBLE_BOOT_DEVICE = ULONG($0000007B);
+ {$EXTERNALSYM INACCESSIBLE_BOOT_DEVICE}
+
+//
+// MessageId: BUGCODE_PSS_MESSAGE
+//
+// MessageText:
+//
+// If this is the first time you've seen this Stop error screen,
+// restart your computer. If this screen appears again, follow
+// these steps:
+//
+// Check to make sure any new hardware or software is properly installed.
+// If this is a new installation, ask your hardware or software manufacturer
+// for any Windows 2000 updates you might need.
+//
+// If problems continue, disable or remove any newly installed hardware
+// or software. Disable BIOS memory options such as caching or shadowing.
+// If you need to use Safe Mode to remove or disable components, restart
+// your computer, press F8 to select Advanced Startup Options, and then
+// select Safe Mode.
+//
+// Refer to your Getting Started manual for more information on
+// troubleshooting Stop errors.
+//
+
+ BUGCODE_PSS_MESSAGE = ULONG($0000007C);
+ {$EXTERNALSYM BUGCODE_PSS_MESSAGE}
+
+//
+// MessageId: INSTALL_MORE_MEMORY
+//
+// MessageText:
+//
+// INSTALL_MORE_MEMORY
+//
+
+ INSTALL_MORE_MEMORY = ULONG($0000007D);
+ {$EXTERNALSYM INSTALL_MORE_MEMORY}
+
+//
+// MessageId: WINDOWS_NT_BANNER
+//
+// MessageText:
+//
+// Microsoft (R) Windows 2000 (R) Version %hs (Build %u%hs)
+//
+
+ WINDOWS_NT_BANNER = ULONG($4000007E);
+ {$EXTERNALSYM WINDOWS_NT_BANNER}
+
+//
+// MessageId: UNEXPECTED_KERNEL_MODE_TRAP
+//
+// MessageText:
+//
+// UNEXPECTED_KERNEL_MODE_TRAP
+//
+
+ UNEXPECTED_KERNEL_MODE_TRAP = ULONG($0000007F);
+ {$EXTERNALSYM UNEXPECTED_KERNEL_MODE_TRAP}
+
+//
+// MessageId: NMI_HARDWARE_FAILURE
+//
+// MessageText:
+//
+// Hardware malfunction.
+//
+
+ NMI_HARDWARE_FAILURE = ULONG($00000080);
+ {$EXTERNALSYM NMI_HARDWARE_FAILURE}
+
+//
+// MessageId: SPIN_LOCK_INIT_FAILURE
+//
+// MessageText:
+//
+// SPIN_LOCK_INIT_FAILURE
+//
+
+ SPIN_LOCK_INIT_FAILURE = ULONG($00000081);
+ {$EXTERNALSYM SPIN_LOCK_INIT_FAILURE}
+
+//
+// MessageId: DFS_FILE_SYSTEM
+//
+// MessageText:
+//
+// DFS_FILE_SYSTEM
+//
+
+ DFS_FILE_SYSTEM = ULONG($00000082);
+ {$EXTERNALSYM DFS_FILE_SYSTEM}
+
+//
+// MessageId: OFS_FILE_SYSTEM
+//
+// MessageText:
+//
+// OFS_FILE_SYSTEM
+//
+
+ OFS_FILE_SYSTEM = ULONG($00000083);
+ {$EXTERNALSYM OFS_FILE_SYSTEM}
+
+//
+// MessageId: RECOM_DRIVER
+//
+// MessageText:
+//
+// RECOM_DRIVER
+//
+
+ RECOM_DRIVER = ULONG($00000084);
+ {$EXTERNALSYM RECOM_DRIVER}
+
+//
+// MessageId: SETUP_FAILURE
+//
+// MessageText:
+//
+// SETUP_FAILURE
+//
+
+ SETUP_FAILURE = ULONG($00000085);
+ {$EXTERNALSYM SETUP_FAILURE}
+
+//
+// MessageId: AUDIT_FAILURE
+//
+// MessageText:
+//
+// Audit attempt has failed.
+//
+
+ AUDIT_FAILURE = ULONG($00000086);
+ {$EXTERNALSYM AUDIT_FAILURE}
+
+//
+// MessageId: WINDOWS_NT_CSD_STRING
+//
+// MessageText:
+//
+// Service Pack
+//
+
+ WINDOWS_NT_CSD_STRING = ULONG($40000087);
+ {$EXTERNALSYM WINDOWS_NT_CSD_STRING}
+
+//
+// MessageId: WINDOWS_NT_INFO_STRING
+//
+// MessageText:
+//
+// %u System Processor [%u MB Memory] %Z
+//
+
+ WINDOWS_NT_INFO_STRING = ULONG($40000088);
+ {$EXTERNALSYM WINDOWS_NT_INFO_STRING}
+
+//
+// MessageId: WINDOWS_NT_MP_STRING
+//
+// MessageText:
+//
+// MultiProcessor Kernel
+//
+
+ WINDOWS_NT_MP_STRING = ULONG($40000089);
+ {$EXTERNALSYM WINDOWS_NT_MP_STRING}
+
+//
+// MessageId: THREAD_TERMINATE_HELD_MUTEX
+//
+// MessageText:
+//
+// A kernel thread terminated while holding a mutex
+//
+
+ THREAD_TERMINATE_HELD_MUTEX = ULONG($4000008A);
+ {$EXTERNALSYM THREAD_TERMINATE_HELD_MUTEX}
+
+//
+// MessageId: MBR_CHECKSUM_MISMATCH
+//
+// MessageText:
+//
+// This system may be infected with a virus.
+//
+
+ MBR_CHECKSUM_MISMATCH = ULONG($0000008B);
+ {$EXTERNALSYM MBR_CHECKSUM_MISMATCH}
+
+//
+// MessageId: BUGCODE_PSS_CRASH_INIT
+//
+// MessageText:
+//
+// Beginning dump of physical memory
+//
+
+ BUGCODE_PSS_CRASH_INIT = ULONG($0000008C);
+ {$EXTERNALSYM BUGCODE_PSS_CRASH_INIT}
+
+//
+// MessageId: BUGCODE_PSS_CRASH_PROGRESS
+//
+// MessageText:
+//
+// Dumping physical memory to disk
+//
+
+ BUGCODE_PSS_CRASH_PROGRESS = ULONG($0000008D);
+ {$EXTERNALSYM BUGCODE_PSS_CRASH_PROGRESS}
+
+//
+// MessageId: BUGCODE_PSS_CRASH_DONE
+//
+// MessageText:
+//
+// Physical memory dump complete. Contact your system administrator or
+// technical support group.
+//
+
+ BUGCODE_PSS_CRASH_DONE = ULONG($0000008E);
+ {$EXTERNALSYM BUGCODE_PSS_CRASH_DONE}
+
+//
+// MessageId: PP0_INITIALIZATION_FAILED
+//
+// MessageText:
+//
+// PP0_INITIALIZATION_FAILED
+//
+
+ PP0_INITIALIZATION_FAILED = ULONG($0000008F);
+ {$EXTERNALSYM PP0_INITIALIZATION_FAILED}
+
+//
+// MessageId: PP1_INITIALIZATION_FAILED
+//
+// MessageText:
+//
+// PP1_INITIALIZATION_FAILED
+//
+
+ PP1_INITIALIZATION_FAILED = ULONG($00000090);
+ {$EXTERNALSYM PP1_INITIALIZATION_FAILED}
+
+//
+// MessageId: WIN32K_INIT_OR_RIT_FAILURE
+//
+// MessageText:
+//
+// WIN32K_INIT_OR_RIT_FAILURE
+//
+
+ WIN32K_INIT_OR_RIT_FAILURE = ULONG($00000091);
+ {$EXTERNALSYM WIN32K_INIT_OR_RIT_FAILURE}
+
+//
+// MessageId: UP_DRIVER_ON_MP_SYSTEM
+//
+// MessageText:
+//
+// UP_DRIVER_ON_MP_SYSTEM
+//
+
+ UP_DRIVER_ON_MP_SYSTEM = ULONG($00000092);
+ {$EXTERNALSYM UP_DRIVER_ON_MP_SYSTEM}
+
+//
+// MessageId: INVALID_KERNEL_HANDLE
+//
+// MessageText:
+//
+// INVALID_KERNEL_HANDLE
+//
+
+ INVALID_KERNEL_HANDLE = ULONG($00000093);
+ {$EXTERNALSYM INVALID_KERNEL_HANDLE}
+
+//
+// MessageId: KERNEL_STACK_LOCKED_AT_EXIT
+//
+// MessageText:
+//
+// KERNEL_STACK_LOCKED_AT_EXIT
+//
+
+ KERNEL_STACK_LOCKED_AT_EXIT = ULONG($00000094);
+ {$EXTERNALSYM KERNEL_STACK_LOCKED_AT_EXIT}
+
+//
+// MessageId: PNP_INTERNAL_ERROR
+//
+// MessageText:
+//
+// PNP_INTERNAL_ERROR
+//
+
+ PNP_INTERNAL_ERROR = ULONG($00000095);
+ {$EXTERNALSYM PNP_INTERNAL_ERROR}
+
+//
+// MessageId: INVALID_WORK_QUEUE_ITEM
+//
+// MessageText:
+//
+// INVALID_WORK_QUEUE_ITEM
+//
+
+ INVALID_WORK_QUEUE_ITEM = ULONG($00000096);
+ {$EXTERNALSYM INVALID_WORK_QUEUE_ITEM}
+
+//
+// MessageId: BOUND_IMAGE_UNSUPPORTED
+//
+// MessageText:
+//
+// BOUND_IMAGE_UNSUPPORTED
+//
+
+ BOUND_IMAGE_UNSUPPORTED = ULONG($00000097);
+ {$EXTERNALSYM BOUND_IMAGE_UNSUPPORTED}
+
+//
+// MessageId: END_OF_NT_EVALUATION_PERIOD
+//
+// MessageText:
+//
+// END_OF_NT_EVALUATION_PERIOD
+//
+
+ END_OF_NT_EVALUATION_PERIOD = ULONG($00000098);
+ {$EXTERNALSYM END_OF_NT_EVALUATION_PERIOD}
+
+//
+// MessageId: INVALID_REGION_OR_SEGMENT
+//
+// MessageText:
+//
+// INVALID_REGION_OR_SEGMENT
+//
+
+ INVALID_REGION_OR_SEGMENT = ULONG($00000099);
+ {$EXTERNALSYM INVALID_REGION_OR_SEGMENT}
+
+//
+// MessageId: SYSTEM_LICENSE_VIOLATION
+//
+// MessageText:
+//
+// SYSTEM_LICENSE_VIOLATION
+//
+
+ SYSTEM_LICENSE_VIOLATION = ULONG($0000009A);
+ {$EXTERNALSYM SYSTEM_LICENSE_VIOLATION}
+
+//
+// MessageId: UDFS_FILE_SYSTEM
+//
+// MessageText:
+//
+// UDFS_FILE_SYSTEM
+//
+
+ UDFS_FILE_SYSTEM = ULONG($0000009B);
+ {$EXTERNALSYM UDFS_FILE_SYSTEM}
+
+//
+// MessageId: MACHINE_CHECK_EXCEPTION
+//
+// MessageText:
+//
+// MACHINE_CHECK_EXCEPTION
+//
+
+ MACHINE_CHECK_EXCEPTION = ULONG($0000009C);
+ {$EXTERNALSYM MACHINE_CHECK_EXCEPTION}
+
+//
+// MessageId: WINDOWS_NT_INFO_STRING_PLURAL
+//
+// MessageText:
+//
+// %u System Processors [%u MB Memory] %Z
+//
+
+ WINDOWS_NT_INFO_STRING_PLURAL = ULONG($4000009D);
+ {$EXTERNALSYM WINDOWS_NT_INFO_STRING_PLURAL}
+
+//
+// MessageId: WINDOWS_NT_RC_STRING
+//
+// MessageText:
+//
+// RC
+//
+
+ WINDOWS_NT_RC_STRING = ULONG($4000009E);
+ {$EXTERNALSYM WINDOWS_NT_RC_STRING}
+
+//
+// MessageId: DRIVER_POWER_STATE_FAILURE
+//
+// MessageText:
+//
+// DRIVER_POWER_STATE_FAILURE
+//
+
+ DRIVER_POWER_STATE_FAILURE = ULONG($0000009F);
+ {$EXTERNALSYM DRIVER_POWER_STATE_FAILURE}
+
+//
+// MessageId: INTERNAL_POWER_ERROR
+//
+// MessageText:
+//
+// INTERNAL_POWER_ERROR
+//
+
+ INTERNAL_POWER_ERROR = ULONG($000000A0);
+ {$EXTERNALSYM INTERNAL_POWER_ERROR}
+
+//
+// MessageId: PCI_BUS_DRIVER_INTERNAL
+//
+// MessageText:
+//
+// Inconsistency detected in the PCI Bus driver's internal structures.
+//
+
+ PCI_BUS_DRIVER_INTERNAL = ULONG($000000A1);
+ {$EXTERNALSYM PCI_BUS_DRIVER_INTERNAL}
+
+//
+// MessageId: MEMORY_IMAGE_CORRUPT
+//
+// MessageText:
+//
+// A CRC check on the memory range has failed
+//
+
+ MEMORY_IMAGE_CORRUPT = ULONG($000000A2);
+ {$EXTERNALSYM MEMORY_IMAGE_CORRUPT}
+
+//
+// MessageId: ACPI_DRIVER_INTERNAL
+//
+// MessageText:
+//
+// ACPI_DRIVER_INTERNAL
+//
+
+ ACPI_DRIVER_INTERNAL = ULONG($000000A3);
+ {$EXTERNALSYM ACPI_DRIVER_INTERNAL}
+
+//
+// MessageId: CNSS_FILE_SYSTEM_FILTER
+//
+// MessageText:
+//
+// Internal inconsistency while representing
+// Ntfs Structured Storage as a DOCFILE.
+//
+
+ CNSS_FILE_SYSTEM_FILTER = ULONG($000000A4);
+ {$EXTERNALSYM CNSS_FILE_SYSTEM_FILTER}
+
+//
+// MessageId: ACPI_BIOS_ERROR
+//
+// MessageText:
+//
+// The ACPI BIOS in this system is not fully compliant with the ACPI
+// specification. Please read the README.TXT for possible workarounds. You
+// can also contact your system's manufacturer for an updated BIOS, or visit
+// http://www.hardware-update.com to see if a new BIOS is available.
+//
+
+ ACPI_BIOS_ERROR = ULONG($000000A5);
+ {$EXTERNALSYM ACPI_BIOS_ERROR}
+
+//
+// MessageId: FP_EMULATION_ERROR
+//
+// MessageText:
+//
+// FP_EMULATION_ERROR
+//
+
+ FP_EMULATION_ERROR = ULONG($000000A6);
+ {$EXTERNALSYM FP_EMULATION_ERROR}
+
+//
+// MessageId: BAD_EXHANDLE
+//
+// MessageText:
+//
+// BAD_EXHANDLE
+//
+
+ BAD_EXHANDLE = ULONG($000000A7);
+ {$EXTERNALSYM BAD_EXHANDLE}
+
+//
+// MessageId: BOOTING_IN_SAFEMODE_MINIMAL
+//
+// MessageText:
+//
+// The system is booting in safemode - Minimal Services
+//
+
+ BOOTING_IN_SAFEMODE_MINIMAL = ULONG($000000A8);
+ {$EXTERNALSYM BOOTING_IN_SAFEMODE_MINIMAL}
+
+//
+// MessageId: BOOTING_IN_SAFEMODE_NETWORK
+//
+// MessageText:
+//
+// The system is booting in safemode - Minimal Services with Network
+//
+
+ BOOTING_IN_SAFEMODE_NETWORK = ULONG($000000A9);
+ {$EXTERNALSYM BOOTING_IN_SAFEMODE_NETWORK}
+
+//
+// MessageId: BOOTING_IN_SAFEMODE_DSREPAIR
+//
+// MessageText:
+//
+// The system is booting in safemode - Directory Services Repair
+//
+
+ BOOTING_IN_SAFEMODE_DSREPAIR = ULONG($000000AA);
+ {$EXTERNALSYM BOOTING_IN_SAFEMODE_DSREPAIR}
+
+//
+// MessageId: SESSION_HAS_VALID_POOL_ON_EXIT
+//
+// MessageText:
+//
+// SESSION_HAS_VALID_POOL_ON_EXIT
+//
+
+ SESSION_HAS_VALID_POOL_ON_EXIT = ULONG($000000AB);
+ {$EXTERNALSYM SESSION_HAS_VALID_POOL_ON_EXIT}
+
+//
+// MessageId: HAL_MEMORY_ALLOCATION
+//
+// MessageText:
+//
+// Allocate from NonPaged Pool failed for a HAL critical allocation.
+//
+
+ HAL_MEMORY_ALLOCATION = ULONG($000000AC);
+ {$EXTERNALSYM HAL_MEMORY_ALLOCATION}
+
+//
+// MessageId: BUGCODE_PSS_MESSAGE_A
+//
+// MessageText:
+//
+// If this is the first time you've seen this Stop error screen,
+// restart your computer. If this screen appears again, follow
+// these steps:
+//
+// Check to make sure any new hardware or software is properly installed.
+// If this is a new installation, ask your hardware or software manufacturer
+// for any Windows 2000 updates you might need.
+//
+// If problems continue, disable or remove any newly installed hardware
+// or software. Disable BIOS memory options such as caching or shadowing.
+// Check your hard drive to make sure it is properly configured and
+// terminated. If you need to use Safe Mode to remove or disable components,
+// restart your computer, press F8 to select Advanced Startup Options,
+// and then select Safe Mode.
+//
+// Refer to your Getting Started manual for more information on
+// troubleshooting Stop errors.
+//
+
+ BUGCODE_PSS_MESSAGE_A = ULONG($000000AD);
+ {$EXTERNALSYM BUGCODE_PSS_MESSAGE_A}
+
+//
+// MessageId: BUGCODE_PSS_MESSAGE_1E
+//
+// MessageText:
+//
+// If this is the first time you've seen this Stop error screen,
+// restart your computer. If this screen appears again, follow
+// these steps:
+//
+// Check to be sure you have adequate disk space. If a driver is
+// identified in the Stop message, disable the driver or check
+// with the manufacturer for driver updates. Try changing video
+// adapters.
+//
+// Check with your hardware vendor for any BIOS updates. Disable
+// BIOS memory options such as caching or shadowing. If you need
+// to use Safe Mode to remove or disable components, restart your
+// computer, press F8 to select Advanced Startup Options, and then
+// select Safe Mode.
+//
+// Refer to your Getting Started manual for more information on
+// troubleshooting Stop errors.
+//
+
+ BUGCODE_PSS_MESSAGE_1E = ULONG($000000AE);
+ {$EXTERNALSYM BUGCODE_PSS_MESSAGE_1E}
+
+//
+// MessageId: BUGCODE_PSS_MESSAGE_23
+//
+// MessageText:
+//
+// If this is the first time you've seen this Stop error screen,
+// restart your computer. If this screen appears again, follow
+// these steps:
+//
+// Disable or uninstall any anti-virus, disk defragmentation
+// or backup utilities. Check your hard drive configuration,
+// and check for any updated drivers. Run CHKDSK /F to check
+// for hard drive corruption, and then restart your computer.
+//
+// Refer to your Getting Started manual for more information on
+// troubleshooting Stop errors.
+//
+
+ BUGCODE_PSS_MESSAGE_23 = ULONG($000000AF);
+ {$EXTERNALSYM BUGCODE_PSS_MESSAGE_23}
+
+//
+// MessageId: BUGCODE_PSS_MESSAGE_2E
+//
+// MessageText:
+//
+// If this is the first time you've seen this Stop error screen,
+// restart your computer. If this screen appears again, follow
+// these steps:
+//
+// Run system diagnostics supplied by your hardware manufacturer.
+// In particular, run a memory check, and check for faulty or
+// mismatched memory. Try changing video adapters.
+//
+// Check with your hardware vendor for any BIOS updates. Disable
+// BIOS memory options such as caching or shadowing. If you need
+// to use Safe Mode to remove or disable components, restart your
+// computer, press F8 to select Advanced Startup Options, and then
+// select Safe Mode.
+//
+// Refer to your Getting Started manual for more information on
+// troubleshooting Stop errors.
+//
+
+ BUGCODE_PSS_MESSAGE_2E = ULONG($000000B0);
+ {$EXTERNALSYM BUGCODE_PSS_MESSAGE_2E}
+
+//
+// MessageId: BUGCODE_PSS_MESSAGE_3F
+//
+// MessageText:
+//
+// If this is the first time you've seen this Stop error screen,
+// restart your computer. If this screen appears again, follow
+// these steps:
+//
+// Remove any recently installed software including backup
+// utilities or disk-intensive applications.
+//
+// If you need to use Safe Mode to remove or disable components,
+// restart your computer, press F8 to select Advanced Startup
+// Options, and then select Safe Mode.
+//
+// Refer to your Getting Started manual for more information on
+// troubleshooting Stop errors.
+//
+
+ BUGCODE_PSS_MESSAGE_3F = ULONG($000000B1);
+ {$EXTERNALSYM BUGCODE_PSS_MESSAGE_3F}
+
+//
+// MessageId: BUGCODE_PSS_MESSAGE_7B
+//
+// MessageText:
+//
+// If this is the first time you've seen this Stop error screen,
+// restart your computer. If this screen appears again, follow
+// these steps:
+//
+// Check for viruses on your computer. Remove any newly installed
+// hard drives or hard drive controllers. Check your hard drive
+// to make sure it is properly configured and terminated.
+// Run CHKDSK /F to check for hard drive corruption, and then
+// restart your computer.
+//
+// Refer to your Getting Started manual for more information on
+// troubleshooting Stop errors.
+//
+
+ BUGCODE_PSS_MESSAGE_7B = ULONG($000000B2);
+ {$EXTERNALSYM BUGCODE_PSS_MESSAGE_7B}
+
+//
+// MessageId: BUGCODE_PSS_MESSAGE_7F
+//
+// MessageText:
+//
+// If this is the first time you've seen this Stop error screen,
+// restart your computer. If this screen appears again, follow
+// these steps:
+//
+// Run a system diagnostic utility supplied by your hardware manufacturer.
+// In particular, run a memory check, and check for faulty or mismatched
+// memory. Try changing video adapters.
+//
+// Disable or remove any newly installed hardware and drivers. Disable or
+// remove any newly installed software. If you need to use Safe Mode to
+// remove or disable components, restart your computer, press F8 to select
+// Advanced Startup Options, and then select Safe Mode.
+//
+// Refer to your Getting Started manual for more information on
+// troubleshooting Stop errors.
+//
+
+ BUGCODE_PSS_MESSAGE_7F = ULONG($000000B3);
+ {$EXTERNALSYM BUGCODE_PSS_MESSAGE_7F}
+
+//
+// MessageId: VIDEO_DRIVER_INIT_FAILURE
+//
+// MessageText:
+//
+// The video driver failed to initialize
+//
+
+ VIDEO_DRIVER_INIT_FAILURE = ULONG($000000B4);
+ {$EXTERNALSYM VIDEO_DRIVER_INIT_FAILURE}
+
+//
+// MessageId: BOOTLOG_LOADED
+//
+// MessageText:
+//
+// Loaded driver
+//
+
+ BOOTLOG_LOADED = ULONG($000000B5);
+ {$EXTERNALSYM BOOTLOG_LOADED}
+
+//
+// MessageId: BOOTLOG_NOT_LOADED
+//
+// MessageText:
+//
+// Did not load driver
+//
+
+ BOOTLOG_NOT_LOADED = ULONG($000000B6);
+ {$EXTERNALSYM BOOTLOG_NOT_LOADED}
+
+//
+// MessageId: BOOTLOG_ENABLED
+//
+// MessageText:
+//
+// Boot Logging Enabled
+//
+
+ BOOTLOG_ENABLED = ULONG($000000B7);
+ {$EXTERNALSYM BOOTLOG_ENABLED}
+
+//
+// MessageId: ATTEMPTED_SWITCH_FROM_DPC
+//
+// MessageText:
+//
+// A wait operation, attach process, or yield was attempted from a DPC routine.
+//
+
+ ATTEMPTED_SWITCH_FROM_DPC = ULONG($000000B8);
+ {$EXTERNALSYM ATTEMPTED_SWITCH_FROM_DPC}
+
+//
+// MessageId: CHIPSET_DETECTED_ERROR
+//
+// MessageText:
+//
+// A parity error in the system memory or I/O system was detected.
+//
+
+ CHIPSET_DETECTED_ERROR = ULONG($000000B9);
+ {$EXTERNALSYM CHIPSET_DETECTED_ERROR}
+
+//
+// MessageId: SESSION_HAS_VALID_VIEWS_ON_EXIT
+//
+// MessageText:
+//
+// SESSION_HAS_VALID_VIEWS_ON_EXIT
+//
+
+ SESSION_HAS_VALID_VIEWS_ON_EXIT = ULONG($000000BA);
+ {$EXTERNALSYM SESSION_HAS_VALID_VIEWS_ON_EXIT}
+
+//
+// MessageId: NETWORK_BOOT_INITIALIZATION_FAILED
+//
+// MessageText:
+//
+// An initialization failure occurred while attempting to boot from the network.
+//
+
+ NETWORK_BOOT_INITIALIZATION_FAILED = ULONG($000000BB);
+ {$EXTERNALSYM NETWORK_BOOT_INITIALIZATION_FAILED}
+
+//
+// MessageId: NETWORK_BOOT_DUPLICATE_ADDRESS
+//
+// MessageText:
+//
+// A duplicate IP address was assigned to this machine while attempting to
+// boot from the network.
+//
+
+ NETWORK_BOOT_DUPLICATE_ADDRESS = ULONG($000000BC);
+ {$EXTERNALSYM NETWORK_BOOT_DUPLICATE_ADDRESS}
+
+//
+// MessageId: INVALID_HIBERNATED_STATE
+//
+// MessageText:
+//
+// The hibernated memory image does not match the current hardware configuration.
+//
+
+ INVALID_HIBERNATED_STATE = ULONG($000000BD);
+ {$EXTERNALSYM INVALID_HIBERNATED_STATE}
+
+//
+// MessageId: ATTEMPTED_WRITE_TO_READONLY_MEMORY
+//
+// MessageText:
+//
+// An attempt was made to write to read-only memory.
+//
+
+ ATTEMPTED_WRITE_TO_READONLY_MEMORY = ULONG($000000BE);
+ {$EXTERNALSYM ATTEMPTED_WRITE_TO_READONLY_MEMORY}
+
+//
+// MessageId: MUTEX_ALREADY_OWNED
+//
+// MessageText:
+//
+// MUTEX_ALREADY_OWNED
+//
+
+ MUTEX_ALREADY_OWNED = ULONG($000000BF);
+ {$EXTERNALSYM MUTEX_ALREADY_OWNED}
+
+//
+// MessageId: PCI_CONFIG_SPACE_ACCESS_FAILURE
+//
+// MessageText:
+//
+// An attempt to access PCI configuration space failed.
+//
+
+ PCI_CONFIG_SPACE_ACCESS_FAILURE = ULONG($000000C0);
+ {$EXTERNALSYM PCI_CONFIG_SPACE_ACCESS_FAILURE}
+
+//
+// MessageId: SPECIAL_POOL_DETECTED_MEMORY_CORRUPTION
+//
+// MessageText:
+//
+// SPECIAL_POOL_DETECTED_MEMORY_CORRUPTION
+//
+
+ SPECIAL_POOL_DETECTED_MEMORY_CORRUPTION = ULONG($000000C1);
+ {$EXTERNALSYM SPECIAL_POOL_DETECTED_MEMORY_CORRUPTION}
+
+//
+// MessageId: BAD_POOL_CALLER
+//
+// MessageText:
+//
+// BAD_POOL_CALLER
+//
+
+ BAD_POOL_CALLER = ULONG($000000C2);
+ {$EXTERNALSYM BAD_POOL_CALLER}
+
+//
+// MessageId: BUGCODE_PSS_MESSAGE_SIGNATURE
+//
+// MessageText:
+//
+//
+// A system file that is owned by Windows 2000 was replaced by an application
+// running on your system. The operating system detected this and tried to
+// verify the validity of the file's signature. The operating system found that
+// the file signature is not valid and put the original, correct file back
+// so that your operating system will continue to function properly.
+//
+
+ BUGCODE_PSS_MESSAGE_SIGNATURE = ULONG($000000C3);
+ {$EXTERNALSYM BUGCODE_PSS_MESSAGE_SIGNATURE}
+
+//
+// MessageId: DRIVER_VERIFIER_DETECTED_VIOLATION
+//
+// MessageText:
+//
+//
+// A device driver attempting to corrupt the system has been caught.
+// The faulty driver currently on the kernel stack must be replaced
+// with a working version.
+//
+
+ DRIVER_VERIFIER_DETECTED_VIOLATION = ULONG($000000C4);
+ {$EXTERNALSYM DRIVER_VERIFIER_DETECTED_VIOLATION}
+
+//
+// MessageId: DRIVER_CORRUPTED_EXPOOL
+//
+// MessageText:
+//
+//
+// A device driver has corrupted the executive memory pool.
+//
+// If this is the first time you've seen this Stop error screen,
+// restart your computer. If this screen appears again, follow
+// these steps:
+//
+// Check to make sure any new hardware or software is properly installed.
+// If this is a new installation, ask your hardware or software manufacturer
+// for any Windows 2000 updates you might need.
+//
+// Run the driver verifier against any new (or suspect) drivers.
+// If that doesn't reveal the corrupting driver, try enabling special pool.
+// Both of these features are intended to catch the corruption at an earlier
+// point where the offending driver can be identified.
+//
+// If you need to use Safe Mode to remove or disable components,
+// restart your computer, press F8 to select Advanced Startup Options,
+// and then select Safe Mode.
+//
+// Refer to your Getting Started manual for more information on
+// troubleshooting Stop errors.
+//
+
+ DRIVER_CORRUPTED_EXPOOL = ULONG($000000C5);
+ {$EXTERNALSYM DRIVER_CORRUPTED_EXPOOL}
+
+//
+// MessageId: DRIVER_CAUGHT_MODIFYING_FREED_POOL
+//
+// MessageText:
+//
+//
+// A device driver attempting to corrupt the system has been caught.
+// The faulty driver currently on the kernel stack must be replaced
+// with a working version.
+//
+
+ DRIVER_CAUGHT_MODIFYING_FREED_POOL = ULONG($000000C6);
+ {$EXTERNALSYM DRIVER_CAUGHT_MODIFYING_FREED_POOL}
+
+//
+// MessageId: TIMER_OR_DPC_INVALID
+//
+// MessageText:
+//
+//
+// A kernel timer or DPC was found in memory which must not contain such
+// items. Usually this is memory being freed. This is usually caused by
+// a device driver that has not cleaned up properly before freeing memory.
+//
+
+ TIMER_OR_DPC_INVALID = ULONG($000000C7);
+ {$EXTERNALSYM TIMER_OR_DPC_INVALID}
+
+//
+// MessageId: IRQL_UNEXPECTED_VALUE
+//
+// MessageText:
+//
+//
+// The processor's IRQL is not valid for the currently executing context.
+// This is a software error condition and is usually caused by a device
+// driver changing IRQL and not restoring it to its previous value when
+// it has finished its task.
+//
+
+ IRQL_UNEXPECTED_VALUE = ULONG($000000C8);
+ {$EXTERNALSYM IRQL_UNEXPECTED_VALUE}
+
+//
+// MessageId: DRIVER_VERIFIER_IOMANAGER_VIOLATION
+//
+// MessageText:
+//
+//
+// The IO manager has detected a violation by a driver that is being verified.
+// The faulty driver that is being verified must be debugged and
+// replaced with a working version.
+//
+
+ DRIVER_VERIFIER_IOMANAGER_VIOLATION = ULONG($000000C9);
+ {$EXTERNALSYM DRIVER_VERIFIER_IOMANAGER_VIOLATION}
+
+//
+// MessageId: PNP_DETECTED_FATAL_ERROR
+//
+// MessageText:
+//
+//
+// Plug and Play detected an error most likely caused by a faulty driver.
+//
+
+ PNP_DETECTED_FATAL_ERROR = ULONG($000000CA);
+ {$EXTERNALSYM PNP_DETECTED_FATAL_ERROR}
+
+//
+// MessageId: DRIVER_LEFT_LOCKED_PAGES_IN_PROCESS
+//
+// MessageText:
+//
+// DRIVER_LEFT_LOCKED_PAGES_IN_PROCESS
+//
+
+ DRIVER_LEFT_LOCKED_PAGES_IN_PROCESS = ULONG($000000CB);
+ {$EXTERNALSYM DRIVER_LEFT_LOCKED_PAGES_IN_PROCESS}
+
+//
+// MessageId: PAGE_FAULT_IN_FREED_SPECIAL_POOL
+//
+// MessageText:
+//
+//
+// The system is attempting to access memory after it has been freed.
+// This usually indicates a system-driver synchronization issue.
+//
+
+ PAGE_FAULT_IN_FREED_SPECIAL_POOL = ULONG($000000CC);
+ {$EXTERNALSYM PAGE_FAULT_IN_FREED_SPECIAL_POOL}
+
+//
+// MessageId: PAGE_FAULT_BEYOND_END_OF_ALLOCATION
+//
+// MessageText:
+//
+//
+// The system is attempting to access memory beyond the end of the allocation.
+// This usually indicates a system-driver synchronization issue.
+//
+
+ PAGE_FAULT_BEYOND_END_OF_ALLOCATION = ULONG($000000CD);
+ {$EXTERNALSYM PAGE_FAULT_BEYOND_END_OF_ALLOCATION}
+
+//
+// MessageId: DRIVER_UNLOADED_WITHOUT_CANCELLING_PENDING_OPERATIONS
+//
+// MessageText:
+//
+// DRIVER_UNLOADED_WITHOUT_CANCELLING_PENDING_OPERATIONS
+//
+
+ DRIVER_UNLOADED_WITHOUT_CANCELLING_PENDING_OPERATIONS = ULONG($000000CE);
+ {$EXTERNALSYM DRIVER_UNLOADED_WITHOUT_CANCELLING_PENDING_OPERATIONS}
+
+//
+// MessageId: TERMINAL_SERVER_DRIVER_MADE_INCORRECT_MEMORY_REFERENCE
+//
+// MessageText:
+//
+// TERMINAL_SERVER_DRIVER_MADE_INCORRECT_MEMORY_REFERENCE
+//
+
+ TERMINAL_SERVER_DRIVER_MADE_INCORRECT_MEMORY_REFERENCE = ULONG($000000CF);
+ {$EXTERNALSYM TERMINAL_SERVER_DRIVER_MADE_INCORRECT_MEMORY_REFERENCE}
+
+//
+// MessageId: DRIVER_CORRUPTED_MMPOOL
+//
+// MessageText:
+//
+//
+// A device driver has corrupted the system memory management pool.
+//
+// If this is the first time you've seen this Stop error screen,
+// restart your computer. If this screen appears again, follow
+// these steps:
+//
+// Check to make sure any new hardware or software is properly installed.
+// If this is a new installation, ask your hardware or software manufacturer
+// for any Windows 2000 updates you might need.
+//
+// Run the driver verifier against any new (or suspect) drivers.
+// If that doesn't reveal the corrupting driver, try enabling special pool.
+// Both of these features are intended to catch the corruption at an earlier
+// point where the offending driver can be identified.
+//
+// If you need to use Safe Mode to remove or disable components,
+// restart your computer, press F8 to select Advanced Startup Options,
+// and then select Safe Mode.
+//
+// Refer to your Getting Started manual for more information on
+// troubleshooting Stop errors.
+//
+
+ DRIVER_CORRUPTED_MMPOOL = ULONG($000000D0);
+ {$EXTERNALSYM DRIVER_CORRUPTED_MMPOOL}
+
+//
+// MessageId: DRIVER_IRQL_NOT_LESS_OR_EQUAL
+//
+// MessageText:
+//
+// DRIVER_IRQL_NOT_LESS_OR_EQUAL
+//
+
+ DRIVER_IRQL_NOT_LESS_OR_EQUAL = ULONG($000000D1);
+ {$EXTERNALSYM DRIVER_IRQL_NOT_LESS_OR_EQUAL}
+
+//
+// MessageId: BUGCODE_ID_DRIVER
+//
+// MessageText:
+//
+// This driver may be at fault :
+//
+
+ BUGCODE_ID_DRIVER = ULONG($000000D2);
+ {$EXTERNALSYM BUGCODE_ID_DRIVER}
+
+//
+// MessageId: DRIVER_PORTION_MUST_BE_NONPAGED
+//
+// MessageText:
+//
+// The driver mistakenly marked a part of it's image pagable instead of nonpagable.
+//
+
+ DRIVER_PORTION_MUST_BE_NONPAGED = ULONG($000000D3);
+ {$EXTERNALSYM DRIVER_PORTION_MUST_BE_NONPAGED}
+
+//
+// MessageId: SYSTEM_SCAN_AT_RAISED_IRQL_CAUGHT_IMPROPER_DRIVER_UNLOAD
+//
+// MessageText:
+//
+// The driver unloaded without cancelling pending operations.
+//
+
+ SYSTEM_SCAN_AT_RAISED_IRQL_CAUGHT_IMPROPER_DRIVER_UNLOAD = ULONG($000000D4);
+ {$EXTERNALSYM SYSTEM_SCAN_AT_RAISED_IRQL_CAUGHT_IMPROPER_DRIVER_UNLOAD}
+
+//
+// MessageId: DRIVER_PAGE_FAULT_IN_FREED_SPECIAL_POOL
+//
+// MessageText:
+//
+//
+// The driver is attempting to access memory after it has been freed.
+//
+
+ DRIVER_PAGE_FAULT_IN_FREED_SPECIAL_POOL = ULONG($000000D5);
+ {$EXTERNALSYM DRIVER_PAGE_FAULT_IN_FREED_SPECIAL_POOL}
+
+//
+// MessageId: DRIVER_PAGE_FAULT_BEYOND_END_OF_ALLOCATION
+//
+// MessageText:
+//
+//
+// The driver is attempting to access memory beyond the end of the allocation.
+//
+
+ DRIVER_PAGE_FAULT_BEYOND_END_OF_ALLOCATION = ULONG($000000D6);
+ {$EXTERNALSYM DRIVER_PAGE_FAULT_BEYOND_END_OF_ALLOCATION}
+
+//
+// MessageId: DRIVER_UNMAPPING_INVALID_VIEW
+//
+// MessageText:
+//
+//
+// The driver is attempting to unmap an invalid memory address.
+//
+
+ DRIVER_UNMAPPING_INVALID_VIEW = ULONG($000000D7);
+ {$EXTERNALSYM DRIVER_UNMAPPING_INVALID_VIEW}
+
+//
+// MessageId: DRIVER_USED_EXCESSIVE_PTES
+//
+// MessageText:
+//
+//
+// The driver has used an excessive number of system PTEs.
+//
+
+ DRIVER_USED_EXCESSIVE_PTES = ULONG($000000D8);
+ {$EXTERNALSYM DRIVER_USED_EXCESSIVE_PTES}
+
+//
+// MessageId: LOCKED_PAGES_TRACKER_CORRUPTION
+//
+// MessageText:
+//
+//
+// The driver is corrupting the locked pages tracking structures.
+//
+
+ LOCKED_PAGES_TRACKER_CORRUPTION = ULONG($000000D9);
+ {$EXTERNALSYM LOCKED_PAGES_TRACKER_CORRUPTION}
+
+//
+// MessageId: SYSTEM_PTE_MISUSE
+//
+// MessageText:
+//
+//
+// The driver is mismanaging system PTEs.
+//
+
+ SYSTEM_PTE_MISUSE = ULONG($000000DA);
+ {$EXTERNALSYM SYSTEM_PTE_MISUSE}
+
+//
+// MessageId: DRIVER_CORRUPTED_SYSPTES
+//
+// MessageText:
+//
+//
+// A driver has corrupted the memory management system PTEs.
+//
+
+ DRIVER_CORRUPTED_SYSPTES = ULONG($000000DB);
+ {$EXTERNALSYM DRIVER_CORRUPTED_SYSPTES}
+
+//
+// MessageId: DRIVER_INVALID_STACK_ACCESS
+//
+// MessageText:
+//
+//
+// A driver accessed a stack address that lies below the current stack pointer
+// of the stack's thread.
+//
+
+ DRIVER_INVALID_STACK_ACCESS = ULONG($000000DC);
+ {$EXTERNALSYM DRIVER_INVALID_STACK_ACCESS}
+
+//
+// MessageId: BUGCODE_PSS_MESSAGE_A5
+//
+// MessageText:
+//
+//
+// The BIOS in this system is not fully ACPI compliant. Please contact your
+// system vendor or visit http://www.hardware-update.com for an updated BIOS.
+// If you are unable to obtain an updated BIOS or the latest BIOS supplied by
+// your vendor is not ACPI compliant, you can turn off ACPI mode during text
+// mode setup. To do this, simply press the F7 key when you are prompted to
+// install storage drivers. The system will not notify you that the F7 key
+// was pressed - it will silently disable ACPI and allow you to continue
+// your installation.
+//
+
+ BUGCODE_PSS_MESSAGE_A5 = ULONG($000000DD);
+ {$EXTERNALSYM BUGCODE_PSS_MESSAGE_A5}
+
+//
+// MessageId: POOL_CORRUPTION_IN_FILE_AREA
+//
+// MessageText:
+//
+//
+// A driver corrupted pool memory used for holding pages destined for disk.
+//
+
+ POOL_CORRUPTION_IN_FILE_AREA = ULONG($000000DE);
+ {$EXTERNALSYM POOL_CORRUPTION_IN_FILE_AREA}
+
+//
+// MessageId: HARDWARE_PROFILE_UNDOCKED_STRING
+//
+// MessageText:
+//
+// Undocked Profile
+//
+
+ HARDWARE_PROFILE_UNDOCKED_STRING = ULONG($40010001);
+ {$EXTERNALSYM HARDWARE_PROFILE_UNDOCKED_STRING}
+
+//
+// MessageId: HARDWARE_PROFILE_DOCKED_STRING
+//
+// MessageText:
+//
+// Docked Profile
+//
+
+ HARDWARE_PROFILE_DOCKED_STRING = ULONG($40010002);
+ {$EXTERNALSYM HARDWARE_PROFILE_DOCKED_STRING}
+
+//
+// MessageId: HARDWARE_PROFILE_UNKNOWN_STRING
+//
+// MessageText:
+//
+// Profile
+//
+
+ HARDWARE_PROFILE_UNKNOWN_STRING = ULONG($40010003);
+ {$EXTERNALSYM HARDWARE_PROFILE_UNKNOWN_STRING}
+
+//
+// MessageId: IMPERSONATING_WORKER_THREAD
+//
+// MessageText:
+//
+//
+// A worker thread is impersonating another process. The work item forgot to
+// disable impersonation before it returned.
+//
+
+ IMPERSONATING_WORKER_THREAD = ULONG($000000DF);
+ {$EXTERNALSYM IMPERSONATING_WORKER_THREAD}
+
+//
+// MessageId: ACPI_BIOS_FATAL_ERROR
+//
+// MessageText:
+//
+//
+// Your computer (BIOS) has reported that a component in your system is faulty and
+// has prevented Windows from operating. You can determine which component is
+// faulty by running the diagnostic disk or tool that came with your computer.
+//
+// If you do not have this tool, you must contact your system vendor and report
+// this error message to them. They will be able to assist you in correcting this
+// hardware problem thereby allowing Windows to operate.
+//
+
+ ACPI_BIOS_FATAL_ERROR = ULONG($000000E0);
+ {$EXTERNALSYM ACPI_BIOS_FATAL_ERROR}
+
+//
+// MessageId: WORKER_THREAD_RETURNED_AT_BAD_IRQL
+//
+// MessageText:
+//
+// WORKER_THREAD_RETURNED_AT_BAD_IRQL
+//
+
+ WORKER_THREAD_RETURNED_AT_BAD_IRQL = ULONG($000000E1);
+ {$EXTERNALSYM WORKER_THREAD_RETURNED_AT_BAD_IRQL}
+
+//
+// MessageId: MANUALLY_INITIATED_CRASH
+//
+// MessageText:
+//
+//
+// The end-user manually generated the crashdump.
+//
+
+ MANUALLY_INITIATED_CRASH = ULONG($000000E2);
+ {$EXTERNALSYM MANUALLY_INITIATED_CRASH}
+
+//
+// MessageId: RESOURCE_NOT_OWNED
+//
+// MessageText:
+//
+//
+// A thread tried to release a resource it did not own.
+//
+
+ RESOURCE_NOT_OWNED = ULONG($000000E3);
+ {$EXTERNALSYM RESOURCE_NOT_OWNED}
+
+//
+// MessageId: WORKER_INVALID
+//
+// MessageText:
+//
+//
+// A executive worker item was found in memory which must not contain such
+// items. Usually this is memory being freed. This is usually caused by
+// a device driver that has not cleaned up properly before freeing memory.
+//
+
+ WORKER_INVALID = ULONG($000000E4);
+ {$EXTERNALSYM WORKER_INVALID}
+
+implementation
+
+end.
diff --git a/packages/extra/winunits/jwacderr.pas b/packages/extra/winunits/jwacderr.pas
index 09b9dd368c..8fc038aeaa 100644
--- a/packages/extra/winunits/jwacderr.pas
+++ b/packages/extra/winunits/jwacderr.pas
@@ -1,141 +1,141 @@
-{******************************************************************************}
-{ }
-{ Common dialog error return codes API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: cderr.h, released June 2000. The original Pascal }
-{ code is: CdErr.pas, released December 2000. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwacderr.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaCdErr;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "cderr.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-const
- CDERR_DIALOGFAILURE = $FFFF;
- {$EXTERNALSYM CDERR_DIALOGFAILURE}
-
- CDERR_GENERALCODES = $0000;
- {$EXTERNALSYM CDERR_GENERALCODES}
- CDERR_STRUCTSIZE = $0001;
- {$EXTERNALSYM CDERR_STRUCTSIZE}
- CDERR_INITIALIZATION = $0002;
- {$EXTERNALSYM CDERR_INITIALIZATION}
- CDERR_NOTEMPLATE = $0003;
- {$EXTERNALSYM CDERR_NOTEMPLATE}
- CDERR_NOHINSTANCE = $0004;
- {$EXTERNALSYM CDERR_NOHINSTANCE}
- CDERR_LOADSTRFAILURE = $0005;
- {$EXTERNALSYM CDERR_LOADSTRFAILURE}
- CDERR_FINDRESFAILURE = $0006;
- {$EXTERNALSYM CDERR_FINDRESFAILURE}
- CDERR_LOADRESFAILURE = $0007;
- {$EXTERNALSYM CDERR_LOADRESFAILURE}
- CDERR_LOCKRESFAILURE = $0008;
- {$EXTERNALSYM CDERR_LOCKRESFAILURE}
- CDERR_MEMALLOCFAILURE = $0009;
- {$EXTERNALSYM CDERR_MEMALLOCFAILURE}
- CDERR_MEMLOCKFAILURE = $000A;
- {$EXTERNALSYM CDERR_MEMLOCKFAILURE}
- CDERR_NOHOOK = $000B;
- {$EXTERNALSYM CDERR_NOHOOK}
- CDERR_REGISTERMSGFAIL = $000C;
- {$EXTERNALSYM CDERR_REGISTERMSGFAIL}
-
- PDERR_PRINTERCODES = $1000;
- {$EXTERNALSYM PDERR_PRINTERCODES}
- PDERR_SETUPFAILURE = $1001;
- {$EXTERNALSYM PDERR_SETUPFAILURE}
- PDERR_PARSEFAILURE = $1002;
- {$EXTERNALSYM PDERR_PARSEFAILURE}
- PDERR_RETDEFFAILURE = $1003;
- {$EXTERNALSYM PDERR_RETDEFFAILURE}
- PDERR_LOADDRVFAILURE = $1004;
- {$EXTERNALSYM PDERR_LOADDRVFAILURE}
- PDERR_GETDEVMODEFAIL = $1005;
- {$EXTERNALSYM PDERR_GETDEVMODEFAIL}
- PDERR_INITFAILURE = $1006;
- {$EXTERNALSYM PDERR_INITFAILURE}
- PDERR_NODEVICES = $1007;
- {$EXTERNALSYM PDERR_NODEVICES}
- PDERR_NODEFAULTPRN = $1008;
- {$EXTERNALSYM PDERR_NODEFAULTPRN}
- PDERR_DNDMMISMATCH = $1009;
- {$EXTERNALSYM PDERR_DNDMMISMATCH}
- PDERR_CREATEICFAILURE = $100A;
- {$EXTERNALSYM PDERR_CREATEICFAILURE}
- PDERR_PRINTERNOTFOUND = $100B;
- {$EXTERNALSYM PDERR_PRINTERNOTFOUND}
- PDERR_DEFAULTDIFFERENT = $100C;
- {$EXTERNALSYM PDERR_DEFAULTDIFFERENT}
-
- CFERR_CHOOSEFONTCODES = $2000;
- {$EXTERNALSYM CFERR_CHOOSEFONTCODES}
- CFERR_NOFONTS = $2001;
- {$EXTERNALSYM CFERR_NOFONTS}
- CFERR_MAXLESSTHANMIN = $2002;
- {$EXTERNALSYM CFERR_MAXLESSTHANMIN}
-
- FNERR_FILENAMECODES = $3000;
- {$EXTERNALSYM FNERR_FILENAMECODES}
- FNERR_SUBCLASSFAILURE = $3001;
- {$EXTERNALSYM FNERR_SUBCLASSFAILURE}
- FNERR_INVALIDFILENAME = $3002;
- {$EXTERNALSYM FNERR_INVALIDFILENAME}
- FNERR_BUFFERTOOSMALL = $3003;
- {$EXTERNALSYM FNERR_BUFFERTOOSMALL}
-
- FRERR_FINDREPLACECODES = $4000;
- {$EXTERNALSYM FRERR_FINDREPLACECODES}
- FRERR_BUFFERLENGTHZERO = $4001;
- {$EXTERNALSYM FRERR_BUFFERLENGTHZERO}
-
- CCERR_CHOOSECOLORCODES = $5000;
- {$EXTERNALSYM CCERR_CHOOSECOLORCODES}
-
-implementation
-
-end.
+{******************************************************************************}
+{ }
+{ Common dialog error return codes API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: cderr.h, released June 2000. The original Pascal }
+{ code is: CdErr.pas, released December 2000. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwacderr.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaCdErr;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "cderr.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+const
+ CDERR_DIALOGFAILURE = $FFFF;
+ {$EXTERNALSYM CDERR_DIALOGFAILURE}
+
+ CDERR_GENERALCODES = $0000;
+ {$EXTERNALSYM CDERR_GENERALCODES}
+ CDERR_STRUCTSIZE = $0001;
+ {$EXTERNALSYM CDERR_STRUCTSIZE}
+ CDERR_INITIALIZATION = $0002;
+ {$EXTERNALSYM CDERR_INITIALIZATION}
+ CDERR_NOTEMPLATE = $0003;
+ {$EXTERNALSYM CDERR_NOTEMPLATE}
+ CDERR_NOHINSTANCE = $0004;
+ {$EXTERNALSYM CDERR_NOHINSTANCE}
+ CDERR_LOADSTRFAILURE = $0005;
+ {$EXTERNALSYM CDERR_LOADSTRFAILURE}
+ CDERR_FINDRESFAILURE = $0006;
+ {$EXTERNALSYM CDERR_FINDRESFAILURE}
+ CDERR_LOADRESFAILURE = $0007;
+ {$EXTERNALSYM CDERR_LOADRESFAILURE}
+ CDERR_LOCKRESFAILURE = $0008;
+ {$EXTERNALSYM CDERR_LOCKRESFAILURE}
+ CDERR_MEMALLOCFAILURE = $0009;
+ {$EXTERNALSYM CDERR_MEMALLOCFAILURE}
+ CDERR_MEMLOCKFAILURE = $000A;
+ {$EXTERNALSYM CDERR_MEMLOCKFAILURE}
+ CDERR_NOHOOK = $000B;
+ {$EXTERNALSYM CDERR_NOHOOK}
+ CDERR_REGISTERMSGFAIL = $000C;
+ {$EXTERNALSYM CDERR_REGISTERMSGFAIL}
+
+ PDERR_PRINTERCODES = $1000;
+ {$EXTERNALSYM PDERR_PRINTERCODES}
+ PDERR_SETUPFAILURE = $1001;
+ {$EXTERNALSYM PDERR_SETUPFAILURE}
+ PDERR_PARSEFAILURE = $1002;
+ {$EXTERNALSYM PDERR_PARSEFAILURE}
+ PDERR_RETDEFFAILURE = $1003;
+ {$EXTERNALSYM PDERR_RETDEFFAILURE}
+ PDERR_LOADDRVFAILURE = $1004;
+ {$EXTERNALSYM PDERR_LOADDRVFAILURE}
+ PDERR_GETDEVMODEFAIL = $1005;
+ {$EXTERNALSYM PDERR_GETDEVMODEFAIL}
+ PDERR_INITFAILURE = $1006;
+ {$EXTERNALSYM PDERR_INITFAILURE}
+ PDERR_NODEVICES = $1007;
+ {$EXTERNALSYM PDERR_NODEVICES}
+ PDERR_NODEFAULTPRN = $1008;
+ {$EXTERNALSYM PDERR_NODEFAULTPRN}
+ PDERR_DNDMMISMATCH = $1009;
+ {$EXTERNALSYM PDERR_DNDMMISMATCH}
+ PDERR_CREATEICFAILURE = $100A;
+ {$EXTERNALSYM PDERR_CREATEICFAILURE}
+ PDERR_PRINTERNOTFOUND = $100B;
+ {$EXTERNALSYM PDERR_PRINTERNOTFOUND}
+ PDERR_DEFAULTDIFFERENT = $100C;
+ {$EXTERNALSYM PDERR_DEFAULTDIFFERENT}
+
+ CFERR_CHOOSEFONTCODES = $2000;
+ {$EXTERNALSYM CFERR_CHOOSEFONTCODES}
+ CFERR_NOFONTS = $2001;
+ {$EXTERNALSYM CFERR_NOFONTS}
+ CFERR_MAXLESSTHANMIN = $2002;
+ {$EXTERNALSYM CFERR_MAXLESSTHANMIN}
+
+ FNERR_FILENAMECODES = $3000;
+ {$EXTERNALSYM FNERR_FILENAMECODES}
+ FNERR_SUBCLASSFAILURE = $3001;
+ {$EXTERNALSYM FNERR_SUBCLASSFAILURE}
+ FNERR_INVALIDFILENAME = $3002;
+ {$EXTERNALSYM FNERR_INVALIDFILENAME}
+ FNERR_BUFFERTOOSMALL = $3003;
+ {$EXTERNALSYM FNERR_BUFFERTOOSMALL}
+
+ FRERR_FINDREPLACECODES = $4000;
+ {$EXTERNALSYM FRERR_FINDREPLACECODES}
+ FRERR_BUFFERLENGTHZERO = $4001;
+ {$EXTERNALSYM FRERR_BUFFERLENGTHZERO}
+
+ CCERR_CHOOSECOLORCODES = $5000;
+ {$EXTERNALSYM CCERR_CHOOSECOLORCODES}
+
+implementation
+
+end.
diff --git a/packages/extra/winunits/jwacmnquery.pas b/packages/extra/winunits/jwacmnquery.pas
index 113005acd6..d0483fde61 100644
--- a/packages/extra/winunits/jwacmnquery.pas
+++ b/packages/extra/winunits/jwacmnquery.pas
@@ -1,281 +1,281 @@
-{******************************************************************************}
-{ }
-{ ICommonQuery API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: cmnquery.h, released November 2001. The original Pascal}
-{ code is: CmnQuery.pas, released March 2002. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwacmnquery.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaCmnQuery;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "cmnquery.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- ActiveX, // IPersist todo objidl, ocidl
- JwaWinUser, JwaWinType;
-
-const
- IID_IQueryForm: TGUID = (D1:$8cfcee30; D2:$39bd; D3:$11d0; D4:($b8, $d1, $0, $a0, $24, $ab, $2d, $bb));
- {$EXTERNALSYM IID_IQueryForm}
- IID_IPersistQuery: TGUID = (D1:$1a3114b8; D2:$a62e; D3:$11d0; D4:($a6, $c5, $0, $a0, $c9, $06, $af, $45));
- {$EXTERNALSYM IID_IPersistQuery}
-
- CLSID_CommonQuery: TGUID = (D1:$83bc5ec0; D2:$6f2a; D3:$11d0; D4:($a1, $c4, $0, $aa, $00, $c1, $6e, $65));
- {$EXTERNALSYM CLSID_CommonQuery}
- IID_ICommonQuery: TGUID = (D1:$ab50dec0; D2:$6f1d; D3:$11d0; D4:($a1, $c4, $0, $aa, $00, $c1, $6e, $65));
- {$EXTERNALSYM IID_ICommonQuery}
-
-//-----------------------------------------------------------------------------
-// IQueryForm
-//-----------------------------------------------------------------------------
-
-//
-// A query form object is registered under the query handlers CLSID,
-// a list is stored in the registry:
-//
-// HKCR\CLSID\{CLSID query handler}\Forms
-//
-// For each form object there are server values which can be defined:
-//
-// Flags = flags for the form object:
-// QUERYFORM_CHANGESFORMLIST
-// QUERYFORM_CHANGESOPTFORMLIST
-//
-// CLSID = string containing the CLSID of the InProc server to invoke
-// to get the IQueryFormObject.
-//
-// Forms = a sub key containing the CLSIDs for the forms registered
-// by IQueryForm::AddForms (or modified by ::AddPages), if
-// the flags are 0, then we scan this list looking for a match
-// for the default form specified.
-//
-
- QUERYFORM_CHANGESFORMLIST = $000000001;
- {$EXTERNALSYM QUERYFORM_CHANGESFORMLIST}
- QUERYFORM_CHANGESOPTFORMLIST = $000000002;
- {$EXTERNALSYM QUERYFORM_CHANGESOPTFORMLIST}
-
-//
-// Query Forms
-// ===========
-// Query forms are registered and have query pages added to them, a form without
-// pages is not displayed. Each form has a unique CLSID to allow it to be
-// selected by invoking the query dialog.
-//
-
- CQFF_NOGLOBALPAGES = $0000001; // = 1 => doesn't have global pages added
- {$EXTERNALSYM CQFF_NOGLOBALPAGES}
- CQFF_ISOPTIONAL = $0000002; // = 1 => form is hidden, unless optional forms requested
- {$EXTERNALSYM CQFF_ISOPTIONAL}
-
-type
- CQFORM = record
- cbStruct: DWORD;
- dwFlags: DWORD;
- clsid: CLSID;
- hIcon: HICON;
- pszTitle: LPCWSTR;
- end;
- {$EXTERNALSYM CQFORM}
- LPCQFORM = ^CQFORM;
- {$EXTERNALSYM LPCQFORM}
- TCQForm = CQFORM;
- PCQForm = LPCQFORM;
-
- LPCQADDFORMSPROC = function(lParam: LPARAM; pForm: LPCQFORM): HRESULT; stdcall;
- {$EXTERNALSYM LPCQADDFORMSPROC}
-
-//
-// Query Form Pages
-// ================
-// When a query form has been registered the caller can then add pages to it,
-// any form can have pages appended.
-//
-
- _cqpage = record
- cbStruct: DWORD;
- dwFlags: DWORD;
- pPageProc: Pointer{LPCQPAGEPROC};
- hInstance: HINSTANCE;
- idPageName: Integer;
- idPageTemplate: Integer;
- pDlgProc: DLGPROC;
- lParam: LPARAM;
- end;
- {$EXTERNALSYM _cqpage}
- CQPAGE = _cqpage;
- {$EXTERNALSYM CQPAGE}
- LPCQPAGE = ^CQPAGE;
- {$EXTERNALSYM LPCQPAGE}
- TCQPage = CQPAGE;
- PCQPage = LPCQPAGE;
-
- LPCQADDPAGESPROC = function(lParam: LPARAM; const clsidForm: CLSID; pPage: LPCQPAGE): HRESULT; stdcall;
- {$EXTERNALSYM LPCQADDPAGESPROC}
- LPCQPAGEPROC = function(pPage: LPCQPAGE; hwnd: HWND; uMsg: UINT; wParam: WPARAM; lParam: LPARAM): HRESULT; stdcall;
- {$EXTERNALSYM LPCQPAGEPROC}
-
-//
-// IQueryForm interfaces
-//
-
- IQueryForm = interface(IUnknown)
- ['{8cfcee30-39bd-11d0-b8d1-00a024ab2dbb}']
- function Initialize(hkForm: HKEY): HRESULT; stdcall;
- function AddForms(pAddFormsProc: LPCQADDPAGESPROC; lParam: LPARAM): HRESULT; stdcall;
- function AddPages(pAddPagesProc: LPCQADDPAGESPROC; lParam: LPARAM): HRESULT; stdcall;
- end;
- {$EXTERNALSYM IQueryForm}
-
-//
-// Messages for pages
-//
-
-const
- CQPM_INITIALIZE = $00000001;
- {$EXTERNALSYM CQPM_INITIALIZE}
- CQPM_RELEASE = $00000002;
- {$EXTERNALSYM CQPM_RELEASE}
- CQPM_ENABLE = $00000003; // wParam = TRUE/FALSE (enable, disable), lParam = 0
- {$EXTERNALSYM CQPM_ENABLE}
- CQPM_GETPARAMETERS = $00000005; // wParam = 0, lParam = -> receives the LocalAlloc
- {$EXTERNALSYM CQPM_GETPARAMETERS}
- CQPM_CLEARFORM = $00000006; // wParam, lParam = 0
- {$EXTERNALSYM CQPM_CLEARFORM}
- CQPM_PERSIST = $00000007; // wParam = fRead, lParam -> IPersistQuery
- {$EXTERNALSYM CQPM_PERSIST}
- CQPM_HELP = $00000008; // wParam = 0, lParam -> LPHELPINFO
- {$EXTERNALSYM CQPM_HELP}
- CQPM_SETDEFAULTPARAMETERS = $00000009; // wParam = 0, lParam -> OPENQUERYWINDOW
- {$EXTERNALSYM CQPM_SETDEFAULTPARAMETERS}
-
- CQPM_HANDLERSPECIFIC = $10000000;
- {$EXTERNALSYM CQPM_HANDLERSPECIFIC}
-
-//-----------------------------------------------------------------------------
-// IPersistQuery
-//-----------------------------------------------------------------------------
-
-// IPersistQuery interface
-
-type
- IPersistQuery = interface(IPersist)
- ['{1a3114b8-a62e-11d0-a6c5-00a0c906af45}']
- function WriteString(pSection, pValueName, pValue: LPCWSTR): HRESULT; stdcall;
- function ReadString(pSection, pValueName, pBuffer: LPWSTR; cchBuffer: Integer): HRESULT; stdcall;
- function WriteInt(pSection, pValueName: LPCWSTR; value: Integer): HRESULT; stdcall;
- function ReadInt(pSection, pValueName: LPCWSTR; pValue: LPINT): HRESULT; stdcall;
- function WriteStruct(pSection, pValueName: LPCWSTR; pStruct: LPVOID; cbStruct: DWORD): HRESULT; stdcall;
- function ReadStruct(pSection, pValueName: LPCWSTR; pStruct: LPVOID; cbStruct: DWORD): HRESULT; stdcall;
- function Clear: HRESULT; stdcall;
- end;
- {$EXTERNALSYM IPersistQuery}
-
-//-----------------------------------------------------------------------------
-// ICommonQuery
-//-----------------------------------------------------------------------------
-
-const
- OQWF_OKCANCEL = $00000001; // = 1 => Provide OK/Cancel buttons
- {$EXTERNALSYM OQWF_OKCANCEL}
- OQWF_DEFAULTFORM = $00000002; // = 1 => clsidDefaultQueryForm is valid
- {$EXTERNALSYM OQWF_DEFAULTFORM}
- OQWF_SINGLESELECT = $00000004; // = 1 => view to have single selection (depends on viewer)
- {$EXTERNALSYM OQWF_SINGLESELECT}
- OQWF_LOADQUERY = $00000008; // = 1 => use the IPersistQuery to load the given query
- {$EXTERNALSYM OQWF_LOADQUERY}
- OQWF_REMOVESCOPES = $00000010; // = 1 => remove scope picker from dialog
- {$EXTERNALSYM OQWF_REMOVESCOPES}
- OQWF_REMOVEFORMS = $00000020; // = 1 => remove form picker from dialog
- {$EXTERNALSYM OQWF_REMOVEFORMS}
- OQWF_ISSUEONOPEN = $00000040; // = 1 => issue query on opening the dialog
- {$EXTERNALSYM OQWF_ISSUEONOPEN}
- OQWF_SHOWOPTIONAL = $00000080; // = 1 => list optional forms by default
- {$EXTERNALSYM OQWF_SHOWOPTIONAL}
- OQWF_SAVEQUERYONOK = $00000200; // = 1 => use the IPersistQuery to write the query on close
- {$EXTERNALSYM OQWF_SAVEQUERYONOK}
- OQWF_HIDEMENUS = $00000400; // = 1 => no menu bar displayed
- {$EXTERNALSYM OQWF_HIDEMENUS}
- OQWF_HIDESEARCHUI = $00000800; // = 1 => dialog is filter, therefore start, stop, new search etc
- {$EXTERNALSYM OQWF_HIDESEARCHUI}
-
- OQWF_PARAMISPROPERTYBAG = DWORD($80000000); // = 1 => the form parameters ptr is an IPropertyBag (ppbFormParameters)
- {$EXTERNALSYM OQWF_PARAMISPROPERTYBAG}
-
-type
- OPENQUERYWINDOW = record
- cbStruct: DWORD; // structure size
- dwFlags: DWORD; // flags (OQFW_*)
- clsidHandler: CLSID; // clsid of handler we are using
- pHandlerParameters: LPVOID; // handler specific structure for initialization
- clsidDefaultForm: CLSID; // default form to be selected (if OQF_DEFAULTFORM == 1 )
- pPersistQuery: IPersistQuery; // IPersistQuery used for loading queries
- //mvb IPropertyBag is an interface which needs finalization and therefor can't be present in a variant record
- //case Integer of
- // 0: (pFormParameters: Pointer);
- // 1: (ppbFormParameters: IPropertyBag);
- case Integer of
- 0: (pFormParameters: Pointer);
- 1: (ppbFormParameters: Pointer);
- end;
- {$EXTERNALSYM OPENQUERYWINDOW}
- LPOPENQUERYWINDOW = ^OPENQUERYWINDOW;
- {$EXTERNALSYM LPOPENQUERYWINDOW}
- TOpenQueryWindow = OPENQUERYWINDOW;
- POpenQueryWindow = LPOPENQUERYWINDOW;
-
-// ICommonQuery
-
- ICommonQuery = interface(IUnknown)
- ['{ab50dec0-6f1d-11d0-a1c4-00aa00c16e65}']
- function OpenQueryWindow(hwndParent: HWND; pQueryWnd: LPOPENQUERYWINDOW; out ppDataObject: IDataObject): HRESULT; stdcall;
- end;
- {$EXTERNALSYM ICommonQuery}
-
-implementation
-
-end.
+{******************************************************************************}
+{ }
+{ ICommonQuery API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: cmnquery.h, released November 2001. The original Pascal}
+{ code is: CmnQuery.pas, released March 2002. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwacmnquery.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaCmnQuery;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "cmnquery.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ ActiveX, // IPersist todo objidl, ocidl
+ JwaWinUser, JwaWinType;
+
+const
+ IID_IQueryForm: TGUID = (D1:$8cfcee30; D2:$39bd; D3:$11d0; D4:($b8, $d1, $0, $a0, $24, $ab, $2d, $bb));
+ {$EXTERNALSYM IID_IQueryForm}
+ IID_IPersistQuery: TGUID = (D1:$1a3114b8; D2:$a62e; D3:$11d0; D4:($a6, $c5, $0, $a0, $c9, $06, $af, $45));
+ {$EXTERNALSYM IID_IPersistQuery}
+
+ CLSID_CommonQuery: TGUID = (D1:$83bc5ec0; D2:$6f2a; D3:$11d0; D4:($a1, $c4, $0, $aa, $00, $c1, $6e, $65));
+ {$EXTERNALSYM CLSID_CommonQuery}
+ IID_ICommonQuery: TGUID = (D1:$ab50dec0; D2:$6f1d; D3:$11d0; D4:($a1, $c4, $0, $aa, $00, $c1, $6e, $65));
+ {$EXTERNALSYM IID_ICommonQuery}
+
+//-----------------------------------------------------------------------------
+// IQueryForm
+//-----------------------------------------------------------------------------
+
+//
+// A query form object is registered under the query handlers CLSID,
+// a list is stored in the registry:
+//
+// HKCR\CLSID\{CLSID query handler}\Forms
+//
+// For each form object there are server values which can be defined:
+//
+// Flags = flags for the form object:
+// QUERYFORM_CHANGESFORMLIST
+// QUERYFORM_CHANGESOPTFORMLIST
+//
+// CLSID = string containing the CLSID of the InProc server to invoke
+// to get the IQueryFormObject.
+//
+// Forms = a sub key containing the CLSIDs for the forms registered
+// by IQueryForm::AddForms (or modified by ::AddPages), if
+// the flags are 0, then we scan this list looking for a match
+// for the default form specified.
+//
+
+ QUERYFORM_CHANGESFORMLIST = $000000001;
+ {$EXTERNALSYM QUERYFORM_CHANGESFORMLIST}
+ QUERYFORM_CHANGESOPTFORMLIST = $000000002;
+ {$EXTERNALSYM QUERYFORM_CHANGESOPTFORMLIST}
+
+//
+// Query Forms
+// ===========
+// Query forms are registered and have query pages added to them, a form without
+// pages is not displayed. Each form has a unique CLSID to allow it to be
+// selected by invoking the query dialog.
+//
+
+ CQFF_NOGLOBALPAGES = $0000001; // = 1 => doesn't have global pages added
+ {$EXTERNALSYM CQFF_NOGLOBALPAGES}
+ CQFF_ISOPTIONAL = $0000002; // = 1 => form is hidden, unless optional forms requested
+ {$EXTERNALSYM CQFF_ISOPTIONAL}
+
+type
+ CQFORM = record
+ cbStruct: DWORD;
+ dwFlags: DWORD;
+ clsid: CLSID;
+ hIcon: HICON;
+ pszTitle: LPCWSTR;
+ end;
+ {$EXTERNALSYM CQFORM}
+ LPCQFORM = ^CQFORM;
+ {$EXTERNALSYM LPCQFORM}
+ TCQForm = CQFORM;
+ PCQForm = LPCQFORM;
+
+ LPCQADDFORMSPROC = function(lParam: LPARAM; pForm: LPCQFORM): HRESULT; stdcall;
+ {$EXTERNALSYM LPCQADDFORMSPROC}
+
+//
+// Query Form Pages
+// ================
+// When a query form has been registered the caller can then add pages to it,
+// any form can have pages appended.
+//
+
+ _cqpage = record
+ cbStruct: DWORD;
+ dwFlags: DWORD;
+ pPageProc: Pointer{LPCQPAGEPROC};
+ hInstance: HINSTANCE;
+ idPageName: Integer;
+ idPageTemplate: Integer;
+ pDlgProc: DLGPROC;
+ lParam: LPARAM;
+ end;
+ {$EXTERNALSYM _cqpage}
+ CQPAGE = _cqpage;
+ {$EXTERNALSYM CQPAGE}
+ LPCQPAGE = ^CQPAGE;
+ {$EXTERNALSYM LPCQPAGE}
+ TCQPage = CQPAGE;
+ PCQPage = LPCQPAGE;
+
+ LPCQADDPAGESPROC = function(lParam: LPARAM; const clsidForm: CLSID; pPage: LPCQPAGE): HRESULT; stdcall;
+ {$EXTERNALSYM LPCQADDPAGESPROC}
+ LPCQPAGEPROC = function(pPage: LPCQPAGE; hwnd: HWND; uMsg: UINT; wParam: WPARAM; lParam: LPARAM): HRESULT; stdcall;
+ {$EXTERNALSYM LPCQPAGEPROC}
+
+//
+// IQueryForm interfaces
+//
+
+ IQueryForm = interface(IUnknown)
+ ['{8cfcee30-39bd-11d0-b8d1-00a024ab2dbb}']
+ function Initialize(hkForm: HKEY): HRESULT; stdcall;
+ function AddForms(pAddFormsProc: LPCQADDPAGESPROC; lParam: LPARAM): HRESULT; stdcall;
+ function AddPages(pAddPagesProc: LPCQADDPAGESPROC; lParam: LPARAM): HRESULT; stdcall;
+ end;
+ {$EXTERNALSYM IQueryForm}
+
+//
+// Messages for pages
+//
+
+const
+ CQPM_INITIALIZE = $00000001;
+ {$EXTERNALSYM CQPM_INITIALIZE}
+ CQPM_RELEASE = $00000002;
+ {$EXTERNALSYM CQPM_RELEASE}
+ CQPM_ENABLE = $00000003; // wParam = TRUE/FALSE (enable, disable), lParam = 0
+ {$EXTERNALSYM CQPM_ENABLE}
+ CQPM_GETPARAMETERS = $00000005; // wParam = 0, lParam = -> receives the LocalAlloc
+ {$EXTERNALSYM CQPM_GETPARAMETERS}
+ CQPM_CLEARFORM = $00000006; // wParam, lParam = 0
+ {$EXTERNALSYM CQPM_CLEARFORM}
+ CQPM_PERSIST = $00000007; // wParam = fRead, lParam -> IPersistQuery
+ {$EXTERNALSYM CQPM_PERSIST}
+ CQPM_HELP = $00000008; // wParam = 0, lParam -> LPHELPINFO
+ {$EXTERNALSYM CQPM_HELP}
+ CQPM_SETDEFAULTPARAMETERS = $00000009; // wParam = 0, lParam -> OPENQUERYWINDOW
+ {$EXTERNALSYM CQPM_SETDEFAULTPARAMETERS}
+
+ CQPM_HANDLERSPECIFIC = $10000000;
+ {$EXTERNALSYM CQPM_HANDLERSPECIFIC}
+
+//-----------------------------------------------------------------------------
+// IPersistQuery
+//-----------------------------------------------------------------------------
+
+// IPersistQuery interface
+
+type
+ IPersistQuery = interface(IPersist)
+ ['{1a3114b8-a62e-11d0-a6c5-00a0c906af45}']
+ function WriteString(pSection, pValueName, pValue: LPCWSTR): HRESULT; stdcall;
+ function ReadString(pSection, pValueName, pBuffer: LPWSTR; cchBuffer: Integer): HRESULT; stdcall;
+ function WriteInt(pSection, pValueName: LPCWSTR; value: Integer): HRESULT; stdcall;
+ function ReadInt(pSection, pValueName: LPCWSTR; pValue: LPINT): HRESULT; stdcall;
+ function WriteStruct(pSection, pValueName: LPCWSTR; pStruct: LPVOID; cbStruct: DWORD): HRESULT; stdcall;
+ function ReadStruct(pSection, pValueName: LPCWSTR; pStruct: LPVOID; cbStruct: DWORD): HRESULT; stdcall;
+ function Clear: HRESULT; stdcall;
+ end;
+ {$EXTERNALSYM IPersistQuery}
+
+//-----------------------------------------------------------------------------
+// ICommonQuery
+//-----------------------------------------------------------------------------
+
+const
+ OQWF_OKCANCEL = $00000001; // = 1 => Provide OK/Cancel buttons
+ {$EXTERNALSYM OQWF_OKCANCEL}
+ OQWF_DEFAULTFORM = $00000002; // = 1 => clsidDefaultQueryForm is valid
+ {$EXTERNALSYM OQWF_DEFAULTFORM}
+ OQWF_SINGLESELECT = $00000004; // = 1 => view to have single selection (depends on viewer)
+ {$EXTERNALSYM OQWF_SINGLESELECT}
+ OQWF_LOADQUERY = $00000008; // = 1 => use the IPersistQuery to load the given query
+ {$EXTERNALSYM OQWF_LOADQUERY}
+ OQWF_REMOVESCOPES = $00000010; // = 1 => remove scope picker from dialog
+ {$EXTERNALSYM OQWF_REMOVESCOPES}
+ OQWF_REMOVEFORMS = $00000020; // = 1 => remove form picker from dialog
+ {$EXTERNALSYM OQWF_REMOVEFORMS}
+ OQWF_ISSUEONOPEN = $00000040; // = 1 => issue query on opening the dialog
+ {$EXTERNALSYM OQWF_ISSUEONOPEN}
+ OQWF_SHOWOPTIONAL = $00000080; // = 1 => list optional forms by default
+ {$EXTERNALSYM OQWF_SHOWOPTIONAL}
+ OQWF_SAVEQUERYONOK = $00000200; // = 1 => use the IPersistQuery to write the query on close
+ {$EXTERNALSYM OQWF_SAVEQUERYONOK}
+ OQWF_HIDEMENUS = $00000400; // = 1 => no menu bar displayed
+ {$EXTERNALSYM OQWF_HIDEMENUS}
+ OQWF_HIDESEARCHUI = $00000800; // = 1 => dialog is filter, therefore start, stop, new search etc
+ {$EXTERNALSYM OQWF_HIDESEARCHUI}
+
+ OQWF_PARAMISPROPERTYBAG = DWORD($80000000); // = 1 => the form parameters ptr is an IPropertyBag (ppbFormParameters)
+ {$EXTERNALSYM OQWF_PARAMISPROPERTYBAG}
+
+type
+ OPENQUERYWINDOW = record
+ cbStruct: DWORD; // structure size
+ dwFlags: DWORD; // flags (OQFW_*)
+ clsidHandler: CLSID; // clsid of handler we are using
+ pHandlerParameters: LPVOID; // handler specific structure for initialization
+ clsidDefaultForm: CLSID; // default form to be selected (if OQF_DEFAULTFORM == 1 )
+ pPersistQuery: IPersistQuery; // IPersistQuery used for loading queries
+ //mvb IPropertyBag is an interface which needs finalization and therefor can't be present in a variant record
+ //case Integer of
+ // 0: (pFormParameters: Pointer);
+ // 1: (ppbFormParameters: IPropertyBag);
+ case Integer of
+ 0: (pFormParameters: Pointer);
+ 1: (ppbFormParameters: Pointer);
+ end;
+ {$EXTERNALSYM OPENQUERYWINDOW}
+ LPOPENQUERYWINDOW = ^OPENQUERYWINDOW;
+ {$EXTERNALSYM LPOPENQUERYWINDOW}
+ TOpenQueryWindow = OPENQUERYWINDOW;
+ POpenQueryWindow = LPOPENQUERYWINDOW;
+
+// ICommonQuery
+
+ ICommonQuery = interface(IUnknown)
+ ['{ab50dec0-6f1d-11d0-a1c4-00aa00c16e65}']
+ function OpenQueryWindow(hwndParent: HWND; pQueryWnd: LPOPENQUERYWINDOW; out ppDataObject: IDataObject): HRESULT; stdcall;
+ end;
+ {$EXTERNALSYM ICommonQuery}
+
+implementation
+
+end.
diff --git a/packages/extra/winunits/jwacolordlg.pas b/packages/extra/winunits/jwacolordlg.pas
index 147a6e2050..7716fcb573 100644
--- a/packages/extra/winunits/jwacolordlg.pas
+++ b/packages/extra/winunits/jwacolordlg.pas
@@ -1,135 +1,135 @@
-{******************************************************************************}
-{ }
-{ Win32 color dialog API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: colordlg.h, released June 2000. The original Pascal }
-{ code is: ColorDlg.pas, released December 2000. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwacolordlg.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaColorDlg;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "colordlg.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-//
-// Constant Declarations.
-//
-
-const
- DLG_COLOR = 10;
- {$EXTERNALSYM DLG_COLOR}
-
- COLOR_HUESCROLL = 700; // color dialog
- {$EXTERNALSYM COLOR_HUESCROLL}
- COLOR_SATSCROLL = 701;
- {$EXTERNALSYM COLOR_SATSCROLL}
- COLOR_LUMSCROLL = 702;
- {$EXTERNALSYM COLOR_LUMSCROLL}
- COLOR_HUE = 703;
- {$EXTERNALSYM COLOR_HUE}
- COLOR_SAT = 704;
- {$EXTERNALSYM COLOR_SAT}
- COLOR_LUM = 705;
- {$EXTERNALSYM COLOR_LUM}
- COLOR_RED = 706;
- {$EXTERNALSYM COLOR_RED}
- COLOR_GREEN = 707;
- {$EXTERNALSYM COLOR_GREEN}
- COLOR_BLUE = 708;
- {$EXTERNALSYM COLOR_BLUE}
- COLOR_CURRENT = 709;
- {$EXTERNALSYM COLOR_CURRENT}
- COLOR_RAINBOW = 710;
- {$EXTERNALSYM COLOR_RAINBOW}
- COLOR_SAVE = 711;
- {$EXTERNALSYM COLOR_SAVE}
- COLOR_ADD = 712;
- {$EXTERNALSYM COLOR_ADD}
- COLOR_SOLID = 713;
- {$EXTERNALSYM COLOR_SOLID}
- COLOR_TUNE = 714;
- {$EXTERNALSYM COLOR_TUNE}
- COLOR_SCHEMES = 715;
- {$EXTERNALSYM COLOR_SCHEMES}
- COLOR_ELEMENT = 716;
- {$EXTERNALSYM COLOR_ELEMENT}
- COLOR_SAMPLES = 717;
- {$EXTERNALSYM COLOR_SAMPLES}
- COLOR_PALETTE = 718;
- {$EXTERNALSYM COLOR_PALETTE}
- COLOR_MIX = 719;
- {$EXTERNALSYM COLOR_MIX}
- COLOR_BOX1 = 720;
- {$EXTERNALSYM COLOR_BOX1}
- COLOR_CUSTOM1 = 721;
- {$EXTERNALSYM COLOR_CUSTOM1}
-
- COLOR_HUEACCEL = 723;
- {$EXTERNALSYM COLOR_HUEACCEL}
- COLOR_SATACCEL = 724;
- {$EXTERNALSYM COLOR_SATACCEL}
- COLOR_LUMACCEL = 725;
- {$EXTERNALSYM COLOR_LUMACCEL}
- COLOR_REDACCEL = 726;
- {$EXTERNALSYM COLOR_REDACCEL}
- COLOR_GREENACCEL = 727;
- {$EXTERNALSYM COLOR_GREENACCEL}
- COLOR_BLUEACCEL = 728;
- {$EXTERNALSYM COLOR_BLUEACCEL}
-
- COLOR_SOLID_LEFT = 730;
- {$EXTERNALSYM COLOR_SOLID_LEFT}
- COLOR_SOLID_RIGHT = 731;
- {$EXTERNALSYM COLOR_SOLID_RIGHT}
-
- NUM_BASIC_COLORS = 48;
- {$EXTERNALSYM NUM_BASIC_COLORS}
- NUM_CUSTOM_COLORS = 16;
- {$EXTERNALSYM NUM_CUSTOM_COLORS}
-
-implementation
-
-end.
+{******************************************************************************}
+{ }
+{ Win32 color dialog API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: colordlg.h, released June 2000. The original Pascal }
+{ code is: ColorDlg.pas, released December 2000. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwacolordlg.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaColorDlg;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "colordlg.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+//
+// Constant Declarations.
+//
+
+const
+ DLG_COLOR = 10;
+ {$EXTERNALSYM DLG_COLOR}
+
+ COLOR_HUESCROLL = 700; // color dialog
+ {$EXTERNALSYM COLOR_HUESCROLL}
+ COLOR_SATSCROLL = 701;
+ {$EXTERNALSYM COLOR_SATSCROLL}
+ COLOR_LUMSCROLL = 702;
+ {$EXTERNALSYM COLOR_LUMSCROLL}
+ COLOR_HUE = 703;
+ {$EXTERNALSYM COLOR_HUE}
+ COLOR_SAT = 704;
+ {$EXTERNALSYM COLOR_SAT}
+ COLOR_LUM = 705;
+ {$EXTERNALSYM COLOR_LUM}
+ COLOR_RED = 706;
+ {$EXTERNALSYM COLOR_RED}
+ COLOR_GREEN = 707;
+ {$EXTERNALSYM COLOR_GREEN}
+ COLOR_BLUE = 708;
+ {$EXTERNALSYM COLOR_BLUE}
+ COLOR_CURRENT = 709;
+ {$EXTERNALSYM COLOR_CURRENT}
+ COLOR_RAINBOW = 710;
+ {$EXTERNALSYM COLOR_RAINBOW}
+ COLOR_SAVE = 711;
+ {$EXTERNALSYM COLOR_SAVE}
+ COLOR_ADD = 712;
+ {$EXTERNALSYM COLOR_ADD}
+ COLOR_SOLID = 713;
+ {$EXTERNALSYM COLOR_SOLID}
+ COLOR_TUNE = 714;
+ {$EXTERNALSYM COLOR_TUNE}
+ COLOR_SCHEMES = 715;
+ {$EXTERNALSYM COLOR_SCHEMES}
+ COLOR_ELEMENT = 716;
+ {$EXTERNALSYM COLOR_ELEMENT}
+ COLOR_SAMPLES = 717;
+ {$EXTERNALSYM COLOR_SAMPLES}
+ COLOR_PALETTE = 718;
+ {$EXTERNALSYM COLOR_PALETTE}
+ COLOR_MIX = 719;
+ {$EXTERNALSYM COLOR_MIX}
+ COLOR_BOX1 = 720;
+ {$EXTERNALSYM COLOR_BOX1}
+ COLOR_CUSTOM1 = 721;
+ {$EXTERNALSYM COLOR_CUSTOM1}
+
+ COLOR_HUEACCEL = 723;
+ {$EXTERNALSYM COLOR_HUEACCEL}
+ COLOR_SATACCEL = 724;
+ {$EXTERNALSYM COLOR_SATACCEL}
+ COLOR_LUMACCEL = 725;
+ {$EXTERNALSYM COLOR_LUMACCEL}
+ COLOR_REDACCEL = 726;
+ {$EXTERNALSYM COLOR_REDACCEL}
+ COLOR_GREENACCEL = 727;
+ {$EXTERNALSYM COLOR_GREENACCEL}
+ COLOR_BLUEACCEL = 728;
+ {$EXTERNALSYM COLOR_BLUEACCEL}
+
+ COLOR_SOLID_LEFT = 730;
+ {$EXTERNALSYM COLOR_SOLID_LEFT}
+ COLOR_SOLID_RIGHT = 731;
+ {$EXTERNALSYM COLOR_SOLID_RIGHT}
+
+ NUM_BASIC_COLORS = 48;
+ {$EXTERNALSYM NUM_BASIC_COLORS}
+ NUM_CUSTOM_COLORS = 16;
+ {$EXTERNALSYM NUM_CUSTOM_COLORS}
+
+implementation
+
+end.
diff --git a/packages/extra/winunits/jwacpl.pas b/packages/extra/winunits/jwacpl.pas
index c4d7bdedfd..18ec8cf177 100644
--- a/packages/extra/winunits/jwacpl.pas
+++ b/packages/extra/winunits/jwacpl.pas
@@ -1,297 +1,297 @@
-{******************************************************************************}
-{ }
-{ Control Panel Applets Interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: cpl.h, released June 2000. The original Pascal }
-{ code is: Cpl.pas, released December 2000. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwacpl.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaCpl;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "cpl.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaWinUser, JwaWinType;
-
-//
-// General rules for being installed in the Control Panel:
-//
-// 1) The DLL must export a function named CPlApplet which will handle
-// the messages discussed below.
-// 2) If the applet needs to save information in CONTROL.INI minimize
-// clutter by using the application name [MMCPL.appletname].
-// 2) If the applet is refrenced in CONTROL.INI under [MMCPL] use
-// the following form:
-// ...
-// [MMCPL]
-// uniqueName=c:\mydir\myapplet.dll
-// ...
-//
-//
-// The order applet DLL's are loaded by CONTROL.EXE is not guaranteed.
-// Control panels may be sorted for display, etc.
-//
-//
-
-// #include <pshpack1.h> // Assume byte packing throughout
-
-//
-// CONTROL.EXE will answer this message and launch an applet
-//
-// WM_CPL_LAUNCH
-//
-// wParam - window handle of calling app
-// lParam - LPTSTR of name of applet to launch
-//
-// WM_CPL_LAUNCHED
-//
-// wParam - TRUE/FALSE if applet was launched
-// lParam - NULL
-//
-// CONTROL.EXE will post this message to the caller when the applet returns
-// (ie., when wParam is a valid window handle)
-//
-//
-
-const
- WM_CPL_LAUNCH = WM_USER + 1000;
- {$EXTERNALSYM WM_CPL_LAUNCH}
- WM_CPL_LAUNCHED = WM_USER + 1001;
- {$EXTERNALSYM WM_CPL_LAUNCHED}
-
-// A function prototype for CPlApplet()
-
-type
- APPLET_PROC = function(hwndCpl: HWND; msg: UINT;
- lParam1, lParam2: LPARAM): LONG; stdcall;
- {$EXTERNALSYM APPLET_PROC}
- TCPLApplet = APPLET_PROC;
-
-// The data structure CPlApplet() must fill in.
-
- LPCPLINFO = ^CPLINFO;
- {$EXTERNALSYM LPCPLINFO}
- tagCPLINFO = packed record
- idIcon: Integer; // icon resource id, provided by CPlApplet()
- idName: Integer; // name string res. id, provided by CPlApplet()
- idInfo: Integer; // info string res. id, provided by CPlApplet()
- lData: LONG_PTR; // user defined data
- end;
- {$EXTERNALSYM tagCPLINFO}
- CPLINFO = tagCPLINFO;
- {$EXTERNALSYM CPLINFO}
- TCplInfo = CPLINFO;
- PCplInfo = LPCPLINFO;
-
- LPNEWCPLINFOA = ^NEWCPLINFOA;
- {$EXTERNALSYM LPNEWCPLINFOA}
- tagNEWCPLINFOA = packed record
- dwSize: DWORD; // similar to the commdlg
- dwFlags: DWORD;
- dwHelpContext: DWORD; // help context to use
- lData: LONG_PTR; // user defined data
- hIcon: HICON; // icon to use, this is owned by CONTROL.EXE (may be deleted)
- szName: array [0..31] of CHAR; // short name
- szInfo: array [0..63] of CHAR; // long name (status line)
- szHelpFile: array [0..127] of CHAR; // path to help file to use
- end;
- {$EXTERNALSYM tagNEWCPLINFOA}
- NEWCPLINFOA = tagNEWCPLINFOA;
- {$EXTERNALSYM NEWCPLINFOA}
- TNewCplInfoA = NEWCPLINFOA;
- PNewCplInfoA = LPNEWCPLINFOA;
-
- LPNEWCPLINFOW = ^NEWCPLINFOW;
- {$EXTERNALSYM LPNEWCPLINFOW}
- tagNEWCPLINFOW = packed record
- dwSize: DWORD; // similar to the commdlg
- dwFlags: DWORD;
- dwHelpContext: DWORD; // help context to use
- lData: LONG_PTR; // user defined data
- hIcon: HICON; // icon to use, this is owned by CONTROL.EXE (may be deleted)
- szName: array [0..31] of WCHAR; // short name
- szInfo: array [0..63] of WCHAR; // long name (status line)
- szHelpFile: array [0..127] of WCHAR; // path to help file to use
- end;
- {$EXTERNALSYM tagNEWCPLINFOW}
- NEWCPLINFOW = tagNEWCPLINFOW;
- {$EXTERNALSYM NEWCPLINFOW}
- TNewCplInfoW = NEWCPLINFOW;
- PNewCplInfoW = LPNEWCPLINFOW;
-
- {$IFDEF UNICODE}
- NEWCPLINFO = NEWCPLINFOW;
- {$EXTERNALSYM NEWCPLINFO}
- LPNEWCPLINFO = LPNEWCPLINFOW;
- {$EXTERNALSYM LPNEWCPLINFO}
- TNewCplInfo = TNewCplInfoW;
- PNewCplInfo = PNewCplInfoW;
- {$ELSE}
- NEWCPLINFO = NEWCPLINFOA;
- {$EXTERNALSYM NEWCPLINFO}
- LPNEWCPLINFO = LPNEWCPLINFOA;
- {$EXTERNALSYM LPNEWCPLINFO}
- TNewCplInfo = TNewCplInfoA;
- PNewCplInfo = PNewCplInfoA;
- {$ENDIF UNICODE}
-
-const
- CPL_DYNAMIC_RES = 0;
- {$EXTERNALSYM CPL_DYNAMIC_RES}
-
-// This constant may be used in place of real resource IDs for the idIcon,
-// idName or idInfo members of the CPLINFO structure. Normally, the system
-// uses these values to extract copies of the resources and store them in a
-// cache. Once the resource information is in the cache, the system does not
-// need to load a CPL unless the user actually tries to use it.
-// CPL_DYNAMIC_RES tells the system not to cache the resource, but instead to
-// load the CPL every time it needs to display information about an item. This
-// allows a CPL to dynamically decide what information will be displayed, but
-// is SIGNIFICANTLY SLOWER than displaying information from a cache.
-// Typically, CPL_DYNAMIC_RES is used when a control panel must inspect the
-// runtime status of some device in order to provide text or icons to display.
-
-// The messages CPlApplet() must handle:
-
- CPL_INIT = 1;
- {$EXTERNALSYM CPL_INIT}
-
-// This message is sent to indicate CPlApplet() was found.
-// lParam1 and lParam2 are not defined.
-// Return TRUE or FALSE indicating whether the control panel should proceed.
-
- CPL_GETCOUNT = 2;
- {$EXTERNALSYM CPL_GETCOUNT}
-
-// This message is sent to determine the number of applets to be displayed.
-// lParam1 and lParam2 are not defined.
-// Return the number of applets you wish to display in the control
-// panel window.
-
- CPL_INQUIRE = 3;
- {$EXTERNALSYM CPL_INQUIRE}
-
-// This message is sent for information about each applet.
-
-// A CPL SHOULD HANDLE BOTH THE CPL_INQUIRE AND CPL_NEWINQUIRE MESSAGES.
-// The developer must not make any assumptions about the order or dependance
-// of CPL inquiries.
-
-// lParam1 is the applet number to register, a value from 0 to
-// (CPL_GETCOUNT - 1). lParam2 is a far ptr to a CPLINFO structure.
-// Fill in CPLINFO's idIcon, idName, idInfo and lData fields with
-// the resource id for an icon to display, name and description string ids,
-// and a long data item associated with applet #lParam1. This information
-// may be cached by the caller at runtime and/or across sessions.
-// To prevent caching, see CPL_DYNAMIC_RES, above.
-
- CPL_SELECT = 4;
- {$EXTERNALSYM CPL_SELECT}
-
-// The CPL_SELECT message has been deleted.
-
- CPL_DBLCLK = 5;
- {$EXTERNALSYM CPL_DBLCLK}
-
-// This message is sent when the applet's icon has been double-clicked
-// upon. lParam1 is the applet number which was selected. lParam2 is the
-// applet's lData value.
-// This message should initiate the applet's dialog box.
-
- CPL_STOP = 6;
- {$EXTERNALSYM CPL_STOP}
-
-// This message is sent for each applet when the control panel is exiting.
-// lParam1 is the applet number. lParam2 is the applet's lData value.
-// Do applet specific cleaning up here.
-
- CPL_EXIT = 7;
- {$EXTERNALSYM CPL_EXIT}
-
-// This message is sent just before the control panel calls FreeLibrary.
-// lParam1 and lParam2 are not defined.
-// Do non-applet specific cleaning up here.
-
- CPL_NEWINQUIRE = 8;
- {$EXTERNALSYM CPL_NEWINQUIRE}
-
-// Same as CPL_INQUIRE execpt lParam2 is a pointer to a NEWCPLINFO struct.
-
-// A CPL SHOULD HANDLE BOTH THE CPL_INQUIRE AND CPL_NEWINQUIRE MESSAGES.
-// The developer must not make any assumptions about the order or dependance
-// of CPL inquiries.
-
- CPL_STARTWPARMSA = 9;
- {$EXTERNALSYM CPL_STARTWPARMSA}
- CPL_STARTWPARMSW = 10;
- {$EXTERNALSYM CPL_STARTWPARMSW}
-
- {$IFDEF UNICODE}
- CPL_STARTWPARMS = CPL_STARTWPARMSW;
- {$EXTERNALSYM CPL_STARTWPARMS}
- {$ELSE}
- CPL_STARTWPARMS = CPL_STARTWPARMSA;
- {$EXTERNALSYM CPL_STARTWPARMS}
- {$ENDIF UNICODE}
-
-// this message parallels CPL_DBLCLK in that the applet should initiate
-// its dialog box. where it differs is that this invocation is coming
-// out of RUNDLL, and there may be some extra directions for execution.
-// lParam1: the applet number.
-// lParam2: an LPSTR to any extra directions that might exist.
-// returns: TRUE if the message was handled; FALSE if not.
-
-// This message is internal to the Control Panel and MAIN applets.
-// It is only sent when an applet is invoked from the Command line
-// during system installation.
-
- CPL_SETUP = 200;
- {$EXTERNALSYM CPL_SETUP}
-
-implementation
-
-end.
+{******************************************************************************}
+{ }
+{ Control Panel Applets Interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: cpl.h, released June 2000. The original Pascal }
+{ code is: Cpl.pas, released December 2000. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwacpl.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaCpl;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "cpl.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaWinUser, JwaWinType;
+
+//
+// General rules for being installed in the Control Panel:
+//
+// 1) The DLL must export a function named CPlApplet which will handle
+// the messages discussed below.
+// 2) If the applet needs to save information in CONTROL.INI minimize
+// clutter by using the application name [MMCPL.appletname].
+// 2) If the applet is refrenced in CONTROL.INI under [MMCPL] use
+// the following form:
+// ...
+// [MMCPL]
+// uniqueName=c:\mydir\myapplet.dll
+// ...
+//
+//
+// The order applet DLL's are loaded by CONTROL.EXE is not guaranteed.
+// Control panels may be sorted for display, etc.
+//
+//
+
+// #include <pshpack1.h> // Assume byte packing throughout
+
+//
+// CONTROL.EXE will answer this message and launch an applet
+//
+// WM_CPL_LAUNCH
+//
+// wParam - window handle of calling app
+// lParam - LPTSTR of name of applet to launch
+//
+// WM_CPL_LAUNCHED
+//
+// wParam - TRUE/FALSE if applet was launched
+// lParam - NULL
+//
+// CONTROL.EXE will post this message to the caller when the applet returns
+// (ie., when wParam is a valid window handle)
+//
+//
+
+const
+ WM_CPL_LAUNCH = WM_USER + 1000;
+ {$EXTERNALSYM WM_CPL_LAUNCH}
+ WM_CPL_LAUNCHED = WM_USER + 1001;
+ {$EXTERNALSYM WM_CPL_LAUNCHED}
+
+// A function prototype for CPlApplet()
+
+type
+ APPLET_PROC = function(hwndCpl: HWND; msg: UINT;
+ lParam1, lParam2: LPARAM): LONG; stdcall;
+ {$EXTERNALSYM APPLET_PROC}
+ TCPLApplet = APPLET_PROC;
+
+// The data structure CPlApplet() must fill in.
+
+ LPCPLINFO = ^CPLINFO;
+ {$EXTERNALSYM LPCPLINFO}
+ tagCPLINFO = packed record
+ idIcon: Integer; // icon resource id, provided by CPlApplet()
+ idName: Integer; // name string res. id, provided by CPlApplet()
+ idInfo: Integer; // info string res. id, provided by CPlApplet()
+ lData: LONG_PTR; // user defined data
+ end;
+ {$EXTERNALSYM tagCPLINFO}
+ CPLINFO = tagCPLINFO;
+ {$EXTERNALSYM CPLINFO}
+ TCplInfo = CPLINFO;
+ PCplInfo = LPCPLINFO;
+
+ LPNEWCPLINFOA = ^NEWCPLINFOA;
+ {$EXTERNALSYM LPNEWCPLINFOA}
+ tagNEWCPLINFOA = packed record
+ dwSize: DWORD; // similar to the commdlg
+ dwFlags: DWORD;
+ dwHelpContext: DWORD; // help context to use
+ lData: LONG_PTR; // user defined data
+ hIcon: HICON; // icon to use, this is owned by CONTROL.EXE (may be deleted)
+ szName: array [0..31] of CHAR; // short name
+ szInfo: array [0..63] of CHAR; // long name (status line)
+ szHelpFile: array [0..127] of CHAR; // path to help file to use
+ end;
+ {$EXTERNALSYM tagNEWCPLINFOA}
+ NEWCPLINFOA = tagNEWCPLINFOA;
+ {$EXTERNALSYM NEWCPLINFOA}
+ TNewCplInfoA = NEWCPLINFOA;
+ PNewCplInfoA = LPNEWCPLINFOA;
+
+ LPNEWCPLINFOW = ^NEWCPLINFOW;
+ {$EXTERNALSYM LPNEWCPLINFOW}
+ tagNEWCPLINFOW = packed record
+ dwSize: DWORD; // similar to the commdlg
+ dwFlags: DWORD;
+ dwHelpContext: DWORD; // help context to use
+ lData: LONG_PTR; // user defined data
+ hIcon: HICON; // icon to use, this is owned by CONTROL.EXE (may be deleted)
+ szName: array [0..31] of WCHAR; // short name
+ szInfo: array [0..63] of WCHAR; // long name (status line)
+ szHelpFile: array [0..127] of WCHAR; // path to help file to use
+ end;
+ {$EXTERNALSYM tagNEWCPLINFOW}
+ NEWCPLINFOW = tagNEWCPLINFOW;
+ {$EXTERNALSYM NEWCPLINFOW}
+ TNewCplInfoW = NEWCPLINFOW;
+ PNewCplInfoW = LPNEWCPLINFOW;
+
+ {$IFDEF UNICODE}
+ NEWCPLINFO = NEWCPLINFOW;
+ {$EXTERNALSYM NEWCPLINFO}
+ LPNEWCPLINFO = LPNEWCPLINFOW;
+ {$EXTERNALSYM LPNEWCPLINFO}
+ TNewCplInfo = TNewCplInfoW;
+ PNewCplInfo = PNewCplInfoW;
+ {$ELSE}
+ NEWCPLINFO = NEWCPLINFOA;
+ {$EXTERNALSYM NEWCPLINFO}
+ LPNEWCPLINFO = LPNEWCPLINFOA;
+ {$EXTERNALSYM LPNEWCPLINFO}
+ TNewCplInfo = TNewCplInfoA;
+ PNewCplInfo = PNewCplInfoA;
+ {$ENDIF UNICODE}
+
+const
+ CPL_DYNAMIC_RES = 0;
+ {$EXTERNALSYM CPL_DYNAMIC_RES}
+
+// This constant may be used in place of real resource IDs for the idIcon,
+// idName or idInfo members of the CPLINFO structure. Normally, the system
+// uses these values to extract copies of the resources and store them in a
+// cache. Once the resource information is in the cache, the system does not
+// need to load a CPL unless the user actually tries to use it.
+// CPL_DYNAMIC_RES tells the system not to cache the resource, but instead to
+// load the CPL every time it needs to display information about an item. This
+// allows a CPL to dynamically decide what information will be displayed, but
+// is SIGNIFICANTLY SLOWER than displaying information from a cache.
+// Typically, CPL_DYNAMIC_RES is used when a control panel must inspect the
+// runtime status of some device in order to provide text or icons to display.
+
+// The messages CPlApplet() must handle:
+
+ CPL_INIT = 1;
+ {$EXTERNALSYM CPL_INIT}
+
+// This message is sent to indicate CPlApplet() was found.
+// lParam1 and lParam2 are not defined.
+// Return TRUE or FALSE indicating whether the control panel should proceed.
+
+ CPL_GETCOUNT = 2;
+ {$EXTERNALSYM CPL_GETCOUNT}
+
+// This message is sent to determine the number of applets to be displayed.
+// lParam1 and lParam2 are not defined.
+// Return the number of applets you wish to display in the control
+// panel window.
+
+ CPL_INQUIRE = 3;
+ {$EXTERNALSYM CPL_INQUIRE}
+
+// This message is sent for information about each applet.
+
+// A CPL SHOULD HANDLE BOTH THE CPL_INQUIRE AND CPL_NEWINQUIRE MESSAGES.
+// The developer must not make any assumptions about the order or dependance
+// of CPL inquiries.
+
+// lParam1 is the applet number to register, a value from 0 to
+// (CPL_GETCOUNT - 1). lParam2 is a far ptr to a CPLINFO structure.
+// Fill in CPLINFO's idIcon, idName, idInfo and lData fields with
+// the resource id for an icon to display, name and description string ids,
+// and a long data item associated with applet #lParam1. This information
+// may be cached by the caller at runtime and/or across sessions.
+// To prevent caching, see CPL_DYNAMIC_RES, above.
+
+ CPL_SELECT = 4;
+ {$EXTERNALSYM CPL_SELECT}
+
+// The CPL_SELECT message has been deleted.
+
+ CPL_DBLCLK = 5;
+ {$EXTERNALSYM CPL_DBLCLK}
+
+// This message is sent when the applet's icon has been double-clicked
+// upon. lParam1 is the applet number which was selected. lParam2 is the
+// applet's lData value.
+// This message should initiate the applet's dialog box.
+
+ CPL_STOP = 6;
+ {$EXTERNALSYM CPL_STOP}
+
+// This message is sent for each applet when the control panel is exiting.
+// lParam1 is the applet number. lParam2 is the applet's lData value.
+// Do applet specific cleaning up here.
+
+ CPL_EXIT = 7;
+ {$EXTERNALSYM CPL_EXIT}
+
+// This message is sent just before the control panel calls FreeLibrary.
+// lParam1 and lParam2 are not defined.
+// Do non-applet specific cleaning up here.
+
+ CPL_NEWINQUIRE = 8;
+ {$EXTERNALSYM CPL_NEWINQUIRE}
+
+// Same as CPL_INQUIRE execpt lParam2 is a pointer to a NEWCPLINFO struct.
+
+// A CPL SHOULD HANDLE BOTH THE CPL_INQUIRE AND CPL_NEWINQUIRE MESSAGES.
+// The developer must not make any assumptions about the order or dependance
+// of CPL inquiries.
+
+ CPL_STARTWPARMSA = 9;
+ {$EXTERNALSYM CPL_STARTWPARMSA}
+ CPL_STARTWPARMSW = 10;
+ {$EXTERNALSYM CPL_STARTWPARMSW}
+
+ {$IFDEF UNICODE}
+ CPL_STARTWPARMS = CPL_STARTWPARMSW;
+ {$EXTERNALSYM CPL_STARTWPARMS}
+ {$ELSE}
+ CPL_STARTWPARMS = CPL_STARTWPARMSA;
+ {$EXTERNALSYM CPL_STARTWPARMS}
+ {$ENDIF UNICODE}
+
+// this message parallels CPL_DBLCLK in that the applet should initiate
+// its dialog box. where it differs is that this invocation is coming
+// out of RUNDLL, and there may be some extra directions for execution.
+// lParam1: the applet number.
+// lParam2: an LPSTR to any extra directions that might exist.
+// returns: TRUE if the message was handled; FALSE if not.
+
+// This message is internal to the Control Panel and MAIN applets.
+// It is only sent when an applet is invoked from the Command line
+// during system installation.
+
+ CPL_SETUP = 200;
+ {$EXTERNALSYM CPL_SETUP}
+
+implementation
+
+end.
diff --git a/packages/extra/winunits/jwacplext.pas b/packages/extra/winunits/jwacplext.pas
index 9b2ec8d2f4..109bdf3e82 100644
--- a/packages/extra/winunits/jwacplext.pas
+++ b/packages/extra/winunits/jwacplext.pas
@@ -1,107 +1,107 @@
-{******************************************************************************}
-{ }
-{ Control Panel Applet Extensions interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: cplext.h, released June 2000. The original Pascal }
-{ code is: CplExt.pas, released December 2000. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwacplext.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaCplext;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "Cplext.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-///////////////////////////////////////////////////////////////////////////////
-// Below are constants for pages which can be replaced in the standard control
-// panel applets. To extend an applet, you must define an object which
-// supports the IShellPropSheetExt interface and register it's in-process
-// server in a subkey under the applet's registry key. Registry paths for the
-// applets are defined in the header file REGSTR.H
-// Generally, when an IShellPropSheetExt is loaded, it's AddPages method
-// will be called once, while it's ReplacePage method may be called zero or
-// more times. ReplacePage is only called in context.
-///////////////////////////////////////////////////////////////////////////////
-
-//-----------------------------------------------------------------------------
-// Mouse Control Panel Extensions
-// The following constants MAY be passed in IShellPropSheetExt::ReplacePage's
-// uPageID parameter for servers registered under
-// ( REGSTR_PATH_CONTROLSFOLDER "\\Mouse" )
-//-----------------------------------------------------------------------------
-
-const
- CPLPAGE_MOUSE_BUTTONS = 1;
- {$EXTERNALSYM CPLPAGE_MOUSE_BUTTONS}
- CPLPAGE_MOUSE_PTRMOTION = 2;
- {$EXTERNALSYM CPLPAGE_MOUSE_PTRMOTION}
- CPLPAGE_MOUSE_WHEEL = 3;
- {$EXTERNALSYM CPLPAGE_MOUSE_WHEEL}
-
-//-----------------------------------------------------------------------------
-// Keyboard Control Panel Extensions
-// The following constants MAY be passed in IShellPropSheetExt::ReplacePage's
-// uPageID parameter for servers registered under
-// ( REGSTR_PATH_CONTROLSFOLDER "\\Keyboard" )
-//-----------------------------------------------------------------------------
-
- CPLPAGE_KEYBOARD_SPEED = 1;
- {$EXTERNALSYM CPLPAGE_KEYBOARD_SPEED}
-
-//-----------------------------------------------------------------------------
-// Display Control Panel Extensions
-// The following constants MAY be passed in IShellPropSheetExt::ReplacePage's
-// uPageID parameter for servers registered under
-// ( REGSTR_PATH_CONTROLSFOLDER "\\Display" )
-//-----------------------------------------------------------------------------
-
- CPLPAGE_DISPLAY_BACKGROUND = 1;
- {$EXTERNALSYM CPLPAGE_DISPLAY_BACKGROUND}
-
-///////////////////////////////////////////////////////////////////////////////
-
-implementation
-
-end.
+{******************************************************************************}
+{ }
+{ Control Panel Applet Extensions interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: cplext.h, released June 2000. The original Pascal }
+{ code is: CplExt.pas, released December 2000. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwacplext.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaCplext;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "Cplext.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+///////////////////////////////////////////////////////////////////////////////
+// Below are constants for pages which can be replaced in the standard control
+// panel applets. To extend an applet, you must define an object which
+// supports the IShellPropSheetExt interface and register it's in-process
+// server in a subkey under the applet's registry key. Registry paths for the
+// applets are defined in the header file REGSTR.H
+// Generally, when an IShellPropSheetExt is loaded, it's AddPages method
+// will be called once, while it's ReplacePage method may be called zero or
+// more times. ReplacePage is only called in context.
+///////////////////////////////////////////////////////////////////////////////
+
+//-----------------------------------------------------------------------------
+// Mouse Control Panel Extensions
+// The following constants MAY be passed in IShellPropSheetExt::ReplacePage's
+// uPageID parameter for servers registered under
+// ( REGSTR_PATH_CONTROLSFOLDER "\\Mouse" )
+//-----------------------------------------------------------------------------
+
+const
+ CPLPAGE_MOUSE_BUTTONS = 1;
+ {$EXTERNALSYM CPLPAGE_MOUSE_BUTTONS}
+ CPLPAGE_MOUSE_PTRMOTION = 2;
+ {$EXTERNALSYM CPLPAGE_MOUSE_PTRMOTION}
+ CPLPAGE_MOUSE_WHEEL = 3;
+ {$EXTERNALSYM CPLPAGE_MOUSE_WHEEL}
+
+//-----------------------------------------------------------------------------
+// Keyboard Control Panel Extensions
+// The following constants MAY be passed in IShellPropSheetExt::ReplacePage's
+// uPageID parameter for servers registered under
+// ( REGSTR_PATH_CONTROLSFOLDER "\\Keyboard" )
+//-----------------------------------------------------------------------------
+
+ CPLPAGE_KEYBOARD_SPEED = 1;
+ {$EXTERNALSYM CPLPAGE_KEYBOARD_SPEED}
+
+//-----------------------------------------------------------------------------
+// Display Control Panel Extensions
+// The following constants MAY be passed in IShellPropSheetExt::ReplacePage's
+// uPageID parameter for servers registered under
+// ( REGSTR_PATH_CONTROLSFOLDER "\\Display" )
+//-----------------------------------------------------------------------------
+
+ CPLPAGE_DISPLAY_BACKGROUND = 1;
+ {$EXTERNALSYM CPLPAGE_DISPLAY_BACKGROUND}
+
+///////////////////////////////////////////////////////////////////////////////
+
+implementation
+
+end.
diff --git a/packages/extra/winunits/jwacryptuiapi.pas b/packages/extra/winunits/jwacryptuiapi.pas
index 92d680e965..e8b376d54a 100644
--- a/packages/extra/winunits/jwacryptuiapi.pas
+++ b/packages/extra/winunits/jwacryptuiapi.pas
@@ -1,157 +1,157 @@
-{******************************************************************************}
-{ }
-{ Cryptographic UI API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: cryptuiapi.h, released August 2001. The original Pascal}
-{ code is: CryptUIApi.pas, released December 2001. The initial developer of the}
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwacryptuiapi.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaCryptUIApi;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "cryptuiapi.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaWinCrypt, JwaWinType;
-
-// #include <pshpack8.h>
-
-//+-------------------------------------------------------------------------
-// Dialog viewer of a certificate, CTL or CRL context.
-//
-// dwContextType and associated pvContext's
-// CERT_STORE_CERTIFICATE_CONTEXT PCCERT_CONTEXT
-// CERT_STORE_CRL_CONTEXT PCCRL_CONTEXT
-// CERT_STORE_CTL_CONTEXT PCCTL_CONTEXT
-//
-// dwFlags currently isn't used and should be set to 0.
-//--------------------------------------------------------------------------
-
-function CryptUIDlgViewContext(dwContextType: DWORD; pvContext: LPVOID; hwnd: HWND; pwszTitle: LPCWSTR;
- dwFlags: DWORD; pvReserved: LPVOID): BOOL; stdcall;
-{$EXTERNALSYM CryptUIDlgViewContext}
-
-//+-------------------------------------------------------------------------
-// Dialog to select a certificate from the specified store.
-//
-// Returns the selected certificate context. If no certificate was
-// selected, NULL is returned.
-//
-// pwszTitle is either NULL or the title to be used for the dialog.
-// If NULL, the default title is used. The default title is
-// "Select Certificate".
-//
-// pwszDisplayString is either NULL or the text statement in the selection
-// dialog. If NULL, the default phrase
-// "Select a certificate you wish to use" is used in the dialog.
-//
-// dwDontUseColumn can be set to exclude columns from the selection
-// dialog. See the CRYPTDLG_SELECTCERT_*_COLUMN definitions below.
-//
-// dwFlags currently isn't used and should be set to 0.
-//--------------------------------------------------------------------------
-
-function CryptUIDlgSelectCertificateFromStore(hCertStore: HCERTSTORE; hwnd: HWND; pwszTitle, pwszDisplayString: LPCWSTR;
- dwDontUseColumn, dwFlags: DWORD; pvReserved: LPVOID): PCCERT_CONTEXT; stdcall;
-{$EXTERNALSYM CryptUIDlgSelectCertificateFromStore}
-
-// flags for dwDontUseColumn
-
-const
- CRYPTUI_SELECT_ISSUEDTO_COLUMN = $000000001;
- {$EXTERNALSYM CRYPTUI_SELECT_ISSUEDTO_COLUMN}
- CRYPTUI_SELECT_ISSUEDBY_COLUMN = $000000002;
- {$EXTERNALSYM CRYPTUI_SELECT_ISSUEDBY_COLUMN}
- CRYPTUI_SELECT_INTENDEDUSE_COLUMN = $000000004;
- {$EXTERNALSYM CRYPTUI_SELECT_INTENDEDUSE_COLUMN}
- CRYPTUI_SELECT_FRIENDLYNAME_COLUMN = $000000008;
- {$EXTERNALSYM CRYPTUI_SELECT_FRIENDLYNAME_COLUMN}
- CRYPTUI_SELECT_LOCATION_COLUMN = $000000010;
- {$EXTERNALSYM CRYPTUI_SELECT_LOCATION_COLUMN}
- CRYPTUI_SELECT_EXPIRATION_COLUMN = $000000020;
- {$EXTERNALSYM CRYPTUI_SELECT_EXPIRATION_COLUMN}
-
-implementation
-
-const
- cryptuiapi = 'cryptui.dll';
-
-{$IFDEF DYNAMIC_LINK}
-
-var
- _CryptUIDlgViewContext: Pointer;
-
-function CryptUIDlgViewContext;
-begin
- GetProcedureAddress(_CryptUIDlgViewContext, cryptuiapi, 'CryptUIDlgViewContext');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CryptUIDlgViewContext]
- end;
-end;
-
-var
- _CryptUIDlgSelCertFromStore: Pointer;
-
-function CryptUIDlgSelectCertificateFromStore;
-begin
- GetProcedureAddress(_CryptUIDlgSelCertFromStore, cryptuiapi, 'CryptUIDlgSelectCertificateFromStore');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CryptUIDlgSelCertFromStore]
- end;
-end;
-
-{$ELSE}
-
-function CryptUIDlgViewContext; external cryptuiapi name 'CryptUIDlgViewContext';
-function CryptUIDlgSelectCertificateFromStore; external cryptuiapi name 'CryptUIDlgSelectCertificateFromStore';
-
-{$ENDIF DYNAMIC_LINK}
-
-end.
+{******************************************************************************}
+{ }
+{ Cryptographic UI API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: cryptuiapi.h, released August 2001. The original Pascal}
+{ code is: CryptUIApi.pas, released December 2001. The initial developer of the}
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwacryptuiapi.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaCryptUIApi;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "cryptuiapi.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaWinCrypt, JwaWinType;
+
+// #include <pshpack8.h>
+
+//+-------------------------------------------------------------------------
+// Dialog viewer of a certificate, CTL or CRL context.
+//
+// dwContextType and associated pvContext's
+// CERT_STORE_CERTIFICATE_CONTEXT PCCERT_CONTEXT
+// CERT_STORE_CRL_CONTEXT PCCRL_CONTEXT
+// CERT_STORE_CTL_CONTEXT PCCTL_CONTEXT
+//
+// dwFlags currently isn't used and should be set to 0.
+//--------------------------------------------------------------------------
+
+function CryptUIDlgViewContext(dwContextType: DWORD; pvContext: LPVOID; hwnd: HWND; pwszTitle: LPCWSTR;
+ dwFlags: DWORD; pvReserved: LPVOID): BOOL; stdcall;
+{$EXTERNALSYM CryptUIDlgViewContext}
+
+//+-------------------------------------------------------------------------
+// Dialog to select a certificate from the specified store.
+//
+// Returns the selected certificate context. If no certificate was
+// selected, NULL is returned.
+//
+// pwszTitle is either NULL or the title to be used for the dialog.
+// If NULL, the default title is used. The default title is
+// "Select Certificate".
+//
+// pwszDisplayString is either NULL or the text statement in the selection
+// dialog. If NULL, the default phrase
+// "Select a certificate you wish to use" is used in the dialog.
+//
+// dwDontUseColumn can be set to exclude columns from the selection
+// dialog. See the CRYPTDLG_SELECTCERT_*_COLUMN definitions below.
+//
+// dwFlags currently isn't used and should be set to 0.
+//--------------------------------------------------------------------------
+
+function CryptUIDlgSelectCertificateFromStore(hCertStore: HCERTSTORE; hwnd: HWND; pwszTitle, pwszDisplayString: LPCWSTR;
+ dwDontUseColumn, dwFlags: DWORD; pvReserved: LPVOID): PCCERT_CONTEXT; stdcall;
+{$EXTERNALSYM CryptUIDlgSelectCertificateFromStore}
+
+// flags for dwDontUseColumn
+
+const
+ CRYPTUI_SELECT_ISSUEDTO_COLUMN = $000000001;
+ {$EXTERNALSYM CRYPTUI_SELECT_ISSUEDTO_COLUMN}
+ CRYPTUI_SELECT_ISSUEDBY_COLUMN = $000000002;
+ {$EXTERNALSYM CRYPTUI_SELECT_ISSUEDBY_COLUMN}
+ CRYPTUI_SELECT_INTENDEDUSE_COLUMN = $000000004;
+ {$EXTERNALSYM CRYPTUI_SELECT_INTENDEDUSE_COLUMN}
+ CRYPTUI_SELECT_FRIENDLYNAME_COLUMN = $000000008;
+ {$EXTERNALSYM CRYPTUI_SELECT_FRIENDLYNAME_COLUMN}
+ CRYPTUI_SELECT_LOCATION_COLUMN = $000000010;
+ {$EXTERNALSYM CRYPTUI_SELECT_LOCATION_COLUMN}
+ CRYPTUI_SELECT_EXPIRATION_COLUMN = $000000020;
+ {$EXTERNALSYM CRYPTUI_SELECT_EXPIRATION_COLUMN}
+
+implementation
+
+const
+ cryptuiapi = 'cryptui.dll';
+
+{$IFDEF DYNAMIC_LINK}
+
+var
+ _CryptUIDlgViewContext: Pointer;
+
+function CryptUIDlgViewContext;
+begin
+ GetProcedureAddress(_CryptUIDlgViewContext, cryptuiapi, 'CryptUIDlgViewContext');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CryptUIDlgViewContext]
+ end;
+end;
+
+var
+ _CryptUIDlgSelCertFromStore: Pointer;
+
+function CryptUIDlgSelectCertificateFromStore;
+begin
+ GetProcedureAddress(_CryptUIDlgSelCertFromStore, cryptuiapi, 'CryptUIDlgSelectCertificateFromStore');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CryptUIDlgSelCertFromStore]
+ end;
+end;
+
+{$ELSE}
+
+function CryptUIDlgViewContext; external cryptuiapi name 'CryptUIDlgViewContext';
+function CryptUIDlgSelectCertificateFromStore; external cryptuiapi name 'CryptUIDlgSelectCertificateFromStore';
+
+{$ENDIF DYNAMIC_LINK}
+
+end.
diff --git a/packages/extra/winunits/jwadbt.pas b/packages/extra/winunits/jwadbt.pas
index c3e9af74ff..bce44636f1 100644
--- a/packages/extra/winunits/jwadbt.pas
+++ b/packages/extra/winunits/jwadbt.pas
@@ -1,673 +1,673 @@
-{******************************************************************************}
-{ }
-{ Equates for WM_DEVICECHANGE and BroadcastSystemMessage for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: dbt.h, released June 2000. The original Pascal }
-{ code is: Dbt.pas, released December 2000. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwadbt.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaDbt;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "dbt.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaWinType, JwaWinUser;
-
-//
-// BroadcastSpecialMessage constants.
-//
-
-const
- WM_DEVICECHANGE = $0219;
- {$EXTERNALSYM WM_DEVICECHANGE}
-
-(*
- * Broadcast message and receipient flags.
- *
- * Note that there is a third "flag". If the wParam has:
- *
- * bit 15 on: lparam is a pointer and bit 14 is meaningfull.
- * bit 15 off: lparam is just a UNLONG data type.
- *
- * bit 14 on: lparam is a pointer to an ASCIIZ string.
- * bit 14 off: lparam is a pointer to a binary struture starting with
- * a dword describing the length of the structure.
- *)
-
- BSF_QUERY = $00000001;
- {$EXTERNALSYM BSF_QUERY}
- BSF_IGNORECURRENTTASK = $00000002; // Meaningless for VxDs
- {$EXTERNALSYM BSF_IGNORECURRENTTASK}
- BSF_FLUSHDISK = $00000004; // Shouldn't be used by VxDs
- {$EXTERNALSYM BSF_FLUSHDISK}
- BSF_NOHANG = $00000008;
- {$EXTERNALSYM BSF_NOHANG}
- BSF_POSTMESSAGE = $00000010;
- {$EXTERNALSYM BSF_POSTMESSAGE}
- BSF_FORCEIFHUNG = $00000020;
- {$EXTERNALSYM BSF_FORCEIFHUNG}
- BSF_NOTIMEOUTIFNOTHUNG = $00000040;
- {$EXTERNALSYM BSF_NOTIMEOUTIFNOTHUNG}
- BSF_MSGSRV32ISOK = $80000000; // Called synchronously from PM API
- {$EXTERNALSYM BSF_MSGSRV32ISOK}
- BSF_MSGSRV32ISOK_BIT = 31; // Called synchronously from PM API
- {$EXTERNALSYM BSF_MSGSRV32ISOK_BIT}
-
- BSM_ALLCOMPONENTS = $00000000;
- {$EXTERNALSYM BSM_ALLCOMPONENTS}
- BSM_VXDS = $00000001;
- {$EXTERNALSYM BSM_VXDS}
- BSM_NETDRIVER = $00000002;
- {$EXTERNALSYM BSM_NETDRIVER}
- BSM_INSTALLABLEDRIVERS = $00000004;
- {$EXTERNALSYM BSM_INSTALLABLEDRIVERS}
- BSM_APPLICATIONS = $00000008;
- {$EXTERNALSYM BSM_APPLICATIONS}
-
-(*
- * Message = WM_DEVICECHANGE
- * wParam = DBT_APPYBEGIN
- * lParam = (not used)
- *
- * 'Appy-time is now available. This message is itself sent
- * at 'Appy-time.
- *
- * Message = WM_DEVICECHANGE
- * wParam = DBT_APPYEND
- * lParam = (not used)
- *
- * 'Appy-time is no longer available. This message is *NOT* sent
- * at 'Appy-time. (It cannot be, because 'Appy-time is gone.)
- *
- * NOTE! It is possible for DBT_APPYBEGIN and DBT_APPYEND to be sent
- * multiple times during a single Windows session. Each appearance of
- * 'Appy-time is bracketed by these two messages, but 'Appy-time may
- * momentarily become unavailable during otherwise normal Windows
- * processing. The current status of 'Appy-time availability can always
- * be obtained from a call to _SHELL_QueryAppyTimeAvailable.
- *)
-
- DBT_APPYBEGIN = $0000;
- {$EXTERNALSYM DBT_APPYBEGIN}
- DBT_APPYEND = $0001;
- {$EXTERNALSYM DBT_APPYEND}
-
-(*
- * Message = WM_DEVICECHANGE
- * wParam = DBT_DEVNODES_CHANGED
- * lParam = 0
- *
- * send when configmg finished a process tree batch. Some devnodes
- * may have been added or removed. This is used by ring3 people which
- * need to be refreshed whenever any devnode changed occur (like
- * device manager). People specific to certain devices should use
- * DBT_DEVICE* instead.
- *)
-
- DBT_DEVNODES_CHANGED = $0007;
- {$EXTERNALSYM DBT_DEVNODES_CHANGED}
-
-(*
- * Message = WM_DEVICECHANGE
- * wParam = DBT_QUERYCHANGECONFIG
- * lParam = 0
- *
- * sent to ask if a config change is allowed
- *)
-
- DBT_QUERYCHANGECONFIG = $0017;
- {$EXTERNALSYM DBT_QUERYCHANGECONFIG}
-
-(*
- * Message = WM_DEVICECHANGE
- * wParam = DBT_CONFIGCHANGED
- * lParam = 0
- *
- * sent when a config has changed
- *)
-
- DBT_CONFIGCHANGED = $0018;
- {$EXTERNALSYM DBT_CONFIGCHANGED}
-
-(*
- * Message = WM_DEVICECHANGE
- * wParam = DBT_CONFIGCHANGECANCELED
- * lParam = 0
- *
- * someone cancelled the config change
- *)
-
- DBT_CONFIGCHANGECANCELED = $0019;
- {$EXTERNALSYM DBT_CONFIGCHANGECANCELED}
-
-(*
- * Message = WM_DEVICECHANGE
- * wParam = DBT_MONITORCHANGE
- * lParam = new resolution to use (LOWORD=x, HIWORD=y)
- * if 0, use the default res for current config
- *
- * this message is sent when the display monitor has changed
- * and the system should change the display mode to match it.
- *)
-
- DBT_MONITORCHANGE = $001B;
- {$EXTERNALSYM DBT_MONITORCHANGE}
-
-(*
- * Message = WM_DEVICECHANGE
- * wParam = DBT_SHELLLOGGEDON
- * lParam = 0
- *
- * The shell has finished login on: VxD can now do Shell_EXEC.
- *)
-
- DBT_SHELLLOGGEDON = $0020;
- {$EXTERNALSYM DBT_SHELLLOGGEDON}
-
-(*
- * Message = WM_DEVICECHANGE
- * wParam = DBT_CONFIGMGAPI
- * lParam = CONFIGMG API Packet
- *
- * CONFIGMG ring 3 call.
- *)
-
- DBT_CONFIGMGAPI32 = $0022;
- {$EXTERNALSYM DBT_CONFIGMGAPI32}
-
-(*
- * Message = WM_DEVICECHANGE
- * wParam = DBT_VXDINITCOMPLETE
- * lParam = 0
- *
- * CONFIGMG ring 3 call.
- *)
-
- DBT_VXDINITCOMPLETE = $0023;
- {$EXTERNALSYM DBT_VXDINITCOMPLETE}
-
-(*
- * Message = WM_DEVICECHANGE
- * wParam = DBT_VOLLOCK*
- * lParam = pointer to VolLockBroadcast structure described below
- *
- * Messages issued by IFSMGR for volume locking purposes on WM_DEVICECHANGE.
- * All these messages pass a pointer to a struct which has no pointers.
- *)
-
- DBT_VOLLOCKQUERYLOCK = $8041;
- {$EXTERNALSYM DBT_VOLLOCKQUERYLOCK}
- DBT_VOLLOCKLOCKTAKEN = $8042;
- {$EXTERNALSYM DBT_VOLLOCKLOCKTAKEN}
- DBT_VOLLOCKLOCKFAILED = $8043;
- {$EXTERNALSYM DBT_VOLLOCKLOCKFAILED}
- DBT_VOLLOCKQUERYUNLOCK = $8044;
- {$EXTERNALSYM DBT_VOLLOCKQUERYUNLOCK}
- DBT_VOLLOCKLOCKRELEASED = $8045;
- {$EXTERNALSYM DBT_VOLLOCKLOCKRELEASED}
- DBT_VOLLOCKUNLOCKFAILED = $8046;
- {$EXTERNALSYM DBT_VOLLOCKUNLOCKFAILED}
-
-(*
- * Device broadcast header
- *)
-
-type
- _DEV_BROADCAST_HDR = record
- dbch_size: DWORD;
- dbch_devicetype: DWORD;
- dbch_reserved: DWORD;
- end;
- {$EXTERNALSYM _DEV_BROADCAST_HDR}
- DEV_BROADCAST_HDR = _DEV_BROADCAST_HDR;
- {$EXTERNALSYM DEV_BROADCAST_HDR}
- PDEV_BROADCAST_HDR = ^DEV_BROADCAST_HDR;
- {$EXTERNALSYM PDEV_BROADCAST_HDR}
- TDevBroadcastHdr = DEV_BROADCAST_HDR;
- PDevBroadcastHdr = PDEV_BROADCAST_HDR;
-
-(*
- * Structure for volume lock broadcast
- *)
-
- VolLockBroadcast = record
- vlb_dbh: DEV_BROADCAST_HDR;
- vlb_owner: DWORD; // thread on which lock request is being issued
- vlb_perms: BYTE; // lock permission flags defined below
- vlb_lockType: BYTE; // type of lock
- vlb_drive: BYTE; // drive on which lock is issued
- vlb_flags: BYTE; // miscellaneous flags
- end;
- {$EXTERNALSYM VolLockBroadcast}
- TVollockbroadcast = VolLockBroadcast;
- PVollockbroadcast = ^VolLockBroadcast;
-
-(*
- * Values for vlb_perms
- *)
-
-const
- LOCKP_ALLOW_WRITES = $01; // Bit 0 set - allow writes
- {$EXTERNALSYM LOCKP_ALLOW_WRITES}
- LOCKP_FAIL_WRITES = $00; // Bit 0 clear - fail writes
- {$EXTERNALSYM LOCKP_FAIL_WRITES}
- LOCKP_FAIL_MEM_MAPPING = $02; // Bit 1 set - fail memory mappings
- {$EXTERNALSYM LOCKP_FAIL_MEM_MAPPING}
- LOCKP_ALLOW_MEM_MAPPING = $00; // Bit 1 clear - allow memory mappings
- {$EXTERNALSYM LOCKP_ALLOW_MEM_MAPPING}
- LOCKP_USER_MASK = $03; // Mask for user lock flags
- {$EXTERNALSYM LOCKP_USER_MASK}
- LOCKP_LOCK_FOR_FORMAT = $04; // Level 0 lock for format
- {$EXTERNALSYM LOCKP_LOCK_FOR_FORMAT}
-
-(*
- * Values for vlb_flags
- *)
-
- LOCKF_LOGICAL_LOCK = $00; // Bit 0 clear - logical lock
- {$EXTERNALSYM LOCKF_LOGICAL_LOCK}
- LOCKF_PHYSICAL_LOCK = $01; // Bit 0 set - physical lock
- {$EXTERNALSYM LOCKF_PHYSICAL_LOCK}
-
-(*
- * Message = WM_DEVICECHANGE
- * wParam = DBT_NODISKSPACE
- * lParam = drive number of drive that is out of disk space (1-based)
- *
- * Message issued by IFS manager when it detects that a drive is run out of
- * free space.
- *)
-
- DBT_NO_DISK_SPACE = $0047;
- {$EXTERNALSYM DBT_NO_DISK_SPACE}
-
-(*
- * Message = WM_DEVICECHANGE
- * wParam = DBT_LOW_DISK_SPACE
- * lParam = drive number of drive that is low on disk space (1-based)
- *
- * Message issued by VFAT when it detects that a drive it has mounted
- * has the remaning free space below a threshold specified by the
- * registry or by a disk space management application.
- * The broadcast is issued by VFAT ONLY when space is either allocated
- * or freed by VFAT.
- *)
-
- DBT_LOW_DISK_SPACE = $0048;
- {$EXTERNALSYM DBT_LOW_DISK_SPACE}
-
- DBT_CONFIGMGPRIVATE = $7FFF;
- {$EXTERNALSYM DBT_CONFIGMGPRIVATE}
-
-(*
- * The following messages are for WM_DEVICECHANGE. The immediate list
- * is for the wParam. ALL THESE MESSAGES PASS A POINTER TO A STRUCT
- * STARTING WITH A DWORD SIZE AND HAVING NO POINTER IN THE STRUCT.
- *
- *)
-
- DBT_DEVICEARRIVAL = $8000; // system detected a new device
- {$EXTERNALSYM DBT_DEVICEARRIVAL}
- DBT_DEVICEQUERYREMOVE = $8001; // wants to remove, may fail
- {$EXTERNALSYM DBT_DEVICEQUERYREMOVE}
- DBT_DEVICEQUERYREMOVEFAILED = $8002; // removal aborted
- {$EXTERNALSYM DBT_DEVICEQUERYREMOVEFAILED}
- DBT_DEVICEREMOVEPENDING = $8003; // about to remove, still avail.
- {$EXTERNALSYM DBT_DEVICEREMOVEPENDING}
- DBT_DEVICEREMOVECOMPLETE = $8004; // device is gone
- {$EXTERNALSYM DBT_DEVICEREMOVECOMPLETE}
- DBT_DEVICETYPESPECIFIC = $8005; // type specific event
- {$EXTERNALSYM DBT_DEVICETYPESPECIFIC}
- DBT_CUSTOMEVENT = $8006; // user-defined event
- {$EXTERNALSYM DBT_CUSTOMEVENT}
-
- DBT_DEVTYP_OEM = $00000000; // oem-defined device type
- {$EXTERNALSYM DBT_DEVTYP_OEM}
- DBT_DEVTYP_DEVNODE = $00000001; // devnode number
- {$EXTERNALSYM DBT_DEVTYP_DEVNODE}
- DBT_DEVTYP_VOLUME = $00000002; // logical volume
- {$EXTERNALSYM DBT_DEVTYP_VOLUME}
- DBT_DEVTYP_PORT = $00000003; // serial, parallel
- {$EXTERNALSYM DBT_DEVTYP_PORT}
- DBT_DEVTYP_NET = $00000004; // network resource
- {$EXTERNALSYM DBT_DEVTYP_NET}
-
- DBT_DEVTYP_DEVICEINTERFACE = $00000005; // device interface class
- {$EXTERNALSYM DBT_DEVTYP_DEVICEINTERFACE}
- DBT_DEVTYP_HANDLE = $00000006; // file system handle
- {$EXTERNALSYM DBT_DEVTYP_HANDLE}
-
-type
- _DEV_BROADCAST_HEADER = record
- dbcd_size: DWORD;
- dbcd_devicetype: DWORD;
- dbcd_reserved: DWORD;
- end;
- {$EXTERNALSYM _DEV_BROADCAST_HEADER}
- TDevBroadcastHeader = _DEV_BROADCAST_HEADER;
- PDevBroadcastHeader = ^_DEV_BROADCAST_HEADER;
-
- PDEV_BROADCAST_OEM = ^DEV_BROADCAST_OEM;
- {$EXTERNALSYM PDEV_BROADCAST_OEM}
- _DEV_BROADCAST_OEM = record
- dbco_size: DWORD;
- dbco_devicetype: DWORD;
- dbco_reserved: DWORD;
- dbco_identifier: DWORD;
- dbco_suppfunc: DWORD;
- end;
- {$EXTERNALSYM _DEV_BROADCAST_OEM}
- DEV_BROADCAST_OEM = _DEV_BROADCAST_OEM;
- {$EXTERNALSYM DEV_BROADCAST_OEM}
- TDevBroadcastOem = DEV_BROADCAST_OEM;
- PDevBroadcastOem = PDEV_BROADCAST_OEM;
-
- PDEV_BROADCAST_DEVNODE = ^DEV_BROADCAST_DEVNODE;
- {$EXTERNALSYM PDEV_BROADCAST_DEVNODE}
- _DEV_BROADCAST_DEVNODE = record
- dbcd_size: DWORD;
- dbcd_devicetype: DWORD;
- dbcd_reserved: DWORD;
- dbcd_devnode: DWORD;
- end;
- {$EXTERNALSYM _DEV_BROADCAST_DEVNODE}
- DEV_BROADCAST_DEVNODE = _DEV_BROADCAST_DEVNODE;
- {$EXTERNALSYM DEV_BROADCAST_DEVNODE}
- TDevBroadcastDevNode = DEV_BROADCAST_DEVNODE;
- PDevBroadcastDevNode = PDEV_BROADCAST_DEVNODE;
-
- PDEV_BROADCAST_VOLUME = ^DEV_BROADCAST_VOLUME;
- {$EXTERNALSYM PDEV_BROADCAST_VOLUME}
- _DEV_BROADCAST_VOLUME = record
- dbcv_size: DWORD;
- dbcv_devicetype: DWORD;
- dbcv_reserved: DWORD;
- dbcv_unitmask: DWORD;
- dbcv_flags: WORD;
- end;
- {$EXTERNALSYM _DEV_BROADCAST_VOLUME}
- DEV_BROADCAST_VOLUME = _DEV_BROADCAST_VOLUME;
- {$EXTERNALSYM DEV_BROADCAST_VOLUME}
- TDevBroadcastVolume = DEV_BROADCAST_VOLUME;
- PDevBroadcastVolume = PDEV_BROADCAST_VOLUME;
-
-const
- DBTF_MEDIA = $0001; // media comings and goings
- {$EXTERNALSYM DBTF_MEDIA}
- DBTF_NET = $0002; // network volume
- {$EXTERNALSYM DBTF_NET}
-
-type
- PDEV_BROADCAST_PORT_A = ^DEV_BROADCAST_PORT_A;
- {$EXTERNALSYM PDEV_BROADCAST_PORT_A}
- _DEV_BROADCAST_PORT_A = record
- dbcp_size: DWORD;
- dbcp_devicetype: DWORD;
- dbcp_reserved: DWORD;
- dbcp_name: array [0..0] of Char;
- end;
- {$EXTERNALSYM _DEV_BROADCAST_PORT_A}
- DEV_BROADCAST_PORT_A = _DEV_BROADCAST_PORT_A;
- {$EXTERNALSYM DEV_BROADCAST_PORT_A}
- TDevBroadcastPortA = DEV_BROADCAST_PORT_A;
- PDevBroadcastPortA = PDEV_BROADCAST_PORT_A;
-
- PDEV_BROADCAST_PORT_W = ^DEV_BROADCAST_PORT_W;
- {$EXTERNALSYM PDEV_BROADCAST_PORT_W}
- _DEV_BROADCAST_PORT_W = record
- dbcp_size: DWORD;
- dbcp_devicetype: DWORD;
- dbcp_reserved: DWORD;
- dbcp_name: array [0..0] of WideChar;
- end;
- {$EXTERNALSYM _DEV_BROADCAST_PORT_W}
- DEV_BROADCAST_PORT_W = _DEV_BROADCAST_PORT_W;
- {$EXTERNALSYM DEV_BROADCAST_PORT_W}
- TDevBroadcastPortW = DEV_BROADCAST_PORT_W;
- PDevBroadcastPortW = PDEV_BROADCAST_PORT_W;
-
- {$IFDEF UNICODE}
- DEV_BROADCAST_PORT = DEV_BROADCAST_PORT_W;
- {$EXTERNALSYM DEV_BROADCAST_PORT}
- PDEV_BROADCAST_PORT = PDEV_BROADCAST_PORT_W;
- {$EXTERNALSYM PDEV_BROADCAST_PORT}
- TDevBroadcastPort = TDevBroadcastPortW;
- PDevBroadcastPort = PDevBroadcastPortW;
- {$ELSE}
- DEV_BROADCAST_PORT = DEV_BROADCAST_PORT_A;
- {$EXTERNALSYM DEV_BROADCAST_PORT}
- PDEV_BROADCAST_PORT = PDEV_BROADCAST_PORT_A;
- {$EXTERNALSYM PDEV_BROADCAST_PORT}
- TDevBroadcastPort = TDevBroadcastPortA;
- PDevBroadcastPort = PDevBroadcastPortA;
- {$ENDIF UNICODE}
-
- PDEV_BROADCAST_NET = ^DEV_BROADCAST_NET;
- {$EXTERNALSYM PDEV_BROADCAST_NET}
- _DEV_BROADCAST_NET = record
- dbcn_size: DWORD;
- dbcn_devicetype: DWORD;
- dbcn_reserved: DWORD;
- dbcn_resource: DWORD;
- dbcn_flags: DWORD;
- end;
- {$EXTERNALSYM _DEV_BROADCAST_NET}
- DEV_BROADCAST_NET = _DEV_BROADCAST_NET;
- {$EXTERNALSYM DEV_BROADCAST_NET}
- TDevBroadcastNet = DEV_BROADCAST_NET;
- PDevBroadcastNet = PDEV_BROADCAST_NET;
-
- PDEV_BROADCAST_DEVICEINTERFACE_A = ^DEV_BROADCAST_DEVICEINTERFACE_A;
- {$EXTERNALSYM PDEV_BROADCAST_DEVICEINTERFACE_A}
- _DEV_BROADCAST_DEVICEINTERFACE_A = record
- dbcc_size: DWORD;
- dbcc_devicetype: DWORD;
- dbcc_reserved: DWORD;
- dbcc_classguid: GUID;
- dbcc_name: array [0..0] of char;
- end;
- {$EXTERNALSYM _DEV_BROADCAST_DEVICEINTERFACE_A}
- DEV_BROADCAST_DEVICEINTERFACE_A = _DEV_BROADCAST_DEVICEINTERFACE_A;
- {$EXTERNALSYM DEV_BROADCAST_DEVICEINTERFACE_A}
- TDevBroadcastDeviceInterfaceA = DEV_BROADCAST_DEVICEINTERFACE_A;
- PDevBroadcastDeviceInterfaceA = PDEV_BROADCAST_DEVICEINTERFACE_A;
-
- PDEV_BROADCAST_DEVICEINTERFACE_W = ^DEV_BROADCAST_DEVICEINTERFACE_W;
- {$EXTERNALSYM PDEV_BROADCAST_DEVICEINTERFACE_W}
- _DEV_BROADCAST_DEVICEINTERFACE_W = record
- dbcc_size: DWORD;
- dbcc_devicetype: DWORD;
- dbcc_reserved: DWORD;
- dbcc_classguid: GUID;
- dbcc_name: array [0..0] of wchar_t;
- end;
- {$EXTERNALSYM _DEV_BROADCAST_DEVICEINTERFACE_W}
- DEV_BROADCAST_DEVICEINTERFACE_W = _DEV_BROADCAST_DEVICEINTERFACE_W;
- {$EXTERNALSYM DEV_BROADCAST_DEVICEINTERFACE_W}
- TDevBroadcastDeviceInterfaceW = DEV_BROADCAST_DEVICEINTERFACE_W;
- PDevBroadcastDeviceInterfaceW = PDEV_BROADCAST_DEVICEINTERFACE_W;
-
- {$IFDEF UNICODE}
- DEV_BROADCAST_DEVICEINTERFACE = DEV_BROADCAST_DEVICEINTERFACE_W;
- {$EXTERNALSYM DEV_BROADCAST_DEVICEINTERFACE}
- PDEV_BROADCAST_DEVICEINTERFACE = PDEV_BROADCAST_DEVICEINTERFACE_W;
- {$EXTERNALSYM PDEV_BROADCAST_DEVICEINTERFACE}
- TDevBroadcastDeviceInterface = TDevBroadcastDeviceInterfaceW;
- PDevBroadcastDeviceInterface = PDevBroadcastDeviceInterfaceW;
- {$ELSE}
- DEV_BROADCAST_DEVICEINTERFACE = DEV_BROADCAST_DEVICEINTERFACE_A;
- {$EXTERNALSYM DEV_BROADCAST_DEVICEINTERFACE}
- PDEV_BROADCAST_DEVICEINTERFACE = PDEV_BROADCAST_DEVICEINTERFACE_A;
- {$EXTERNALSYM PDEV_BROADCAST_DEVICEINTERFACE}
- TDevBroadcastDeviceInterface = TDevBroadcastDeviceInterfaceA;
- PDevBroadcastDeviceInterface = PDevBroadcastDeviceInterfaceA;
- {$ENDIF UNICODE}
-
- PDEV_BROADCAST_HANDLE = ^DEV_BROADCAST_HANDLE;
- {$EXTERNALSYM PDEV_BROADCAST_HANDLE}
- _DEV_BROADCAST_HANDLE = record
- dbch_size: DWORD;
- dbch_devicetype: DWORD;
- dbch_reserved: DWORD;
- dbch_handle: HANDLE; // file handle used in call to RegisterDeviceNotification
- dbch_hdevnotify: HDEVNOTIFY; // returned from RegisterDeviceNotification
- //
- // The following 3 fields are only valid if wParam is DBT_CUSTOMEVENT.
- //
- dbch_eventguid: GUID;
- dbch_nameoffset: LONG; // offset (bytes) of variable-length string buffer (-1 if none)
- dbch_data: array [0..0] of BYTE; // variable-sized buffer, potentially containing binary and/or text data
- end;
- {$EXTERNALSYM _DEV_BROADCAST_HANDLE}
- DEV_BROADCAST_HANDLE = _DEV_BROADCAST_HANDLE;
- {$EXTERNALSYM DEV_BROADCAST_HANDLE}
- TDevBroadcastHandle = DEV_BROADCAST_HANDLE;
- PDevBroadcastHandle = PDEV_BROADCAST_HANDLE;
-
-//
-// Define 32-bit and 64-bit versions of the DEV_BROADCAST_HANDLE structure
-// for WOW64. These must be kept in sync with the above structure.
-//
-
- PDEV_BROADCAST_HANDLE32 = ^DEV_BROADCAST_HANDLE32;
- {$EXTERNALSYM PDEV_BROADCAST_HANDLE32}
- _DEV_BROADCAST_HANDLE32 = record
- dbch_size: DWORD;
- dbch_devicetype: DWORD;
- dbch_reserved: DWORD;
- dbch_handle: ULONG32;
- dbch_hdevnotify: ULONG32;
- dbch_eventguid: GUID;
- dbch_nameoffset: LONG;
- dbch_data: array [0..0] of BYTE;
- end;
- {$EXTERNALSYM _DEV_BROADCAST_HANDLE32}
- DEV_BROADCAST_HANDLE32 = _DEV_BROADCAST_HANDLE32;
- {$EXTERNALSYM DEV_BROADCAST_HANDLE32}
- TDevBroadcastHandle32 = DEV_BROADCAST_HANDLE32;
- PDevBroadcastHandle32 = PDEV_BROADCAST_HANDLE32;
-
- PDEV_BROADCAST_HANDLE64 = ^DEV_BROADCAST_HANDLE64;
- {$EXTERNALSYM PDEV_BROADCAST_HANDLE64}
- _DEV_BROADCAST_HANDLE64 = record
- dbch_size: DWORD;
- dbch_devicetype: DWORD;
- dbch_reserved: DWORD;
- dbch_handle: ULONG64;
- dbch_hdevnotify: ULONG64;
- dbch_eventguid: GUID;
- dbch_nameoffset: LONG;
- dbch_data: array [0..0] of BYTE;
- end;
- {$EXTERNALSYM _DEV_BROADCAST_HANDLE64}
- DEV_BROADCAST_HANDLE64 = _DEV_BROADCAST_HANDLE64;
- {$EXTERNALSYM DEV_BROADCAST_HANDLE64}
- TDevBroadcastHandle64 = DEV_BROADCAST_HANDLE64;
- PDevBroadcastHandle64 = PDEV_BROADCAST_HANDLE64;
-
-const
- DBTF_RESOURCE = $00000001; // network resource
- {$EXTERNALSYM DBTF_RESOURCE}
- DBTF_XPORT = $00000002; // new transport coming or going
- {$EXTERNALSYM DBTF_XPORT}
- DBTF_SLOWNET = $00000004; // new incoming transport is slow
- {$EXTERNALSYM DBTF_SLOWNET}
- // (dbcn_resource undefined for now)
-
- DBT_VPOWERDAPI = $8100; // VPOWERD API for Win95
- {$EXTERNALSYM DBT_VPOWERDAPI}
-
-(*
- * User-defined message types all use wParam = 0xFFFF with the
- * lParam a pointer to the structure below.
- *
- * dbud_dbh - DEV_BROADCAST_HEADER must be filled in as usual.
- *
- * dbud_szName contains a case-sensitive ASCIIZ name which names the
- * message. The message name consists of the vendor name, a backslash,
- * then arbitrary user-defined ASCIIZ text. For example:
- *
- * "WidgetWare\QueryScannerShutdown"
- * "WidgetWare\Video Q39S\AdapterReady"
- *
- * After the ASCIIZ name, arbitrary information may be provided.
- * Make sure that dbud_dbh.dbch_size is big enough to encompass
- * all the data. And remember that nothing in the structure may
- * contain pointers.
- *)
-
- DBT_USERDEFINED = $FFFF;
- {$EXTERNALSYM DBT_USERDEFINED}
-
-type
- PDEV_BROADCAST_USERDEFINED = ^DEV_BROADCAST_USERDEFINED;
- {$EXTERNALSYM PDEV_BROADCAST_USERDEFINED}
- _DEV_BROADCAST_USERDEFINED = record
- dbud_dbh: DEV_BROADCAST_HDR;
- dbud_szName: array [0..0] of Char;
- // BYTE dbud_rgbUserDefined[];*/ /* User-defined contents */
- end;
- {$EXTERNALSYM _DEV_BROADCAST_USERDEFINED}
- DEV_BROADCAST_USERDEFINED = _DEV_BROADCAST_USERDEFINED;
- {$EXTERNALSYM DEV_BROADCAST_USERDEFINED}
- TDevBroadcastUserDefined = DEV_BROADCAST_USERDEFINED;
- PDevBroadcastUserDefined = PDEV_BROADCAST_USERDEFINED;
-
-// (rom) added own message type for WM_DEVICECHANGE
-// see Messages.pas TWMNoParams ff.
-
-type
- TWMDeviceChange = record
- Msg: Cardinal;
- Event: UINT;
- dwData: Pointer;
- Result: Longint;
- end;
-
-implementation
-
-end.
+{******************************************************************************}
+{ }
+{ Equates for WM_DEVICECHANGE and BroadcastSystemMessage for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: dbt.h, released June 2000. The original Pascal }
+{ code is: Dbt.pas, released December 2000. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwadbt.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaDbt;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "dbt.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaWinType, JwaWinUser;
+
+//
+// BroadcastSpecialMessage constants.
+//
+
+const
+ WM_DEVICECHANGE = $0219;
+ {$EXTERNALSYM WM_DEVICECHANGE}
+
+(*
+ * Broadcast message and receipient flags.
+ *
+ * Note that there is a third "flag". If the wParam has:
+ *
+ * bit 15 on: lparam is a pointer and bit 14 is meaningfull.
+ * bit 15 off: lparam is just a UNLONG data type.
+ *
+ * bit 14 on: lparam is a pointer to an ASCIIZ string.
+ * bit 14 off: lparam is a pointer to a binary struture starting with
+ * a dword describing the length of the structure.
+ *)
+
+ BSF_QUERY = $00000001;
+ {$EXTERNALSYM BSF_QUERY}
+ BSF_IGNORECURRENTTASK = $00000002; // Meaningless for VxDs
+ {$EXTERNALSYM BSF_IGNORECURRENTTASK}
+ BSF_FLUSHDISK = $00000004; // Shouldn't be used by VxDs
+ {$EXTERNALSYM BSF_FLUSHDISK}
+ BSF_NOHANG = $00000008;
+ {$EXTERNALSYM BSF_NOHANG}
+ BSF_POSTMESSAGE = $00000010;
+ {$EXTERNALSYM BSF_POSTMESSAGE}
+ BSF_FORCEIFHUNG = $00000020;
+ {$EXTERNALSYM BSF_FORCEIFHUNG}
+ BSF_NOTIMEOUTIFNOTHUNG = $00000040;
+ {$EXTERNALSYM BSF_NOTIMEOUTIFNOTHUNG}
+ BSF_MSGSRV32ISOK = $80000000; // Called synchronously from PM API
+ {$EXTERNALSYM BSF_MSGSRV32ISOK}
+ BSF_MSGSRV32ISOK_BIT = 31; // Called synchronously from PM API
+ {$EXTERNALSYM BSF_MSGSRV32ISOK_BIT}
+
+ BSM_ALLCOMPONENTS = $00000000;
+ {$EXTERNALSYM BSM_ALLCOMPONENTS}
+ BSM_VXDS = $00000001;
+ {$EXTERNALSYM BSM_VXDS}
+ BSM_NETDRIVER = $00000002;
+ {$EXTERNALSYM BSM_NETDRIVER}
+ BSM_INSTALLABLEDRIVERS = $00000004;
+ {$EXTERNALSYM BSM_INSTALLABLEDRIVERS}
+ BSM_APPLICATIONS = $00000008;
+ {$EXTERNALSYM BSM_APPLICATIONS}
+
+(*
+ * Message = WM_DEVICECHANGE
+ * wParam = DBT_APPYBEGIN
+ * lParam = (not used)
+ *
+ * 'Appy-time is now available. This message is itself sent
+ * at 'Appy-time.
+ *
+ * Message = WM_DEVICECHANGE
+ * wParam = DBT_APPYEND
+ * lParam = (not used)
+ *
+ * 'Appy-time is no longer available. This message is *NOT* sent
+ * at 'Appy-time. (It cannot be, because 'Appy-time is gone.)
+ *
+ * NOTE! It is possible for DBT_APPYBEGIN and DBT_APPYEND to be sent
+ * multiple times during a single Windows session. Each appearance of
+ * 'Appy-time is bracketed by these two messages, but 'Appy-time may
+ * momentarily become unavailable during otherwise normal Windows
+ * processing. The current status of 'Appy-time availability can always
+ * be obtained from a call to _SHELL_QueryAppyTimeAvailable.
+ *)
+
+ DBT_APPYBEGIN = $0000;
+ {$EXTERNALSYM DBT_APPYBEGIN}
+ DBT_APPYEND = $0001;
+ {$EXTERNALSYM DBT_APPYEND}
+
+(*
+ * Message = WM_DEVICECHANGE
+ * wParam = DBT_DEVNODES_CHANGED
+ * lParam = 0
+ *
+ * send when configmg finished a process tree batch. Some devnodes
+ * may have been added or removed. This is used by ring3 people which
+ * need to be refreshed whenever any devnode changed occur (like
+ * device manager). People specific to certain devices should use
+ * DBT_DEVICE* instead.
+ *)
+
+ DBT_DEVNODES_CHANGED = $0007;
+ {$EXTERNALSYM DBT_DEVNODES_CHANGED}
+
+(*
+ * Message = WM_DEVICECHANGE
+ * wParam = DBT_QUERYCHANGECONFIG
+ * lParam = 0
+ *
+ * sent to ask if a config change is allowed
+ *)
+
+ DBT_QUERYCHANGECONFIG = $0017;
+ {$EXTERNALSYM DBT_QUERYCHANGECONFIG}
+
+(*
+ * Message = WM_DEVICECHANGE
+ * wParam = DBT_CONFIGCHANGED
+ * lParam = 0
+ *
+ * sent when a config has changed
+ *)
+
+ DBT_CONFIGCHANGED = $0018;
+ {$EXTERNALSYM DBT_CONFIGCHANGED}
+
+(*
+ * Message = WM_DEVICECHANGE
+ * wParam = DBT_CONFIGCHANGECANCELED
+ * lParam = 0
+ *
+ * someone cancelled the config change
+ *)
+
+ DBT_CONFIGCHANGECANCELED = $0019;
+ {$EXTERNALSYM DBT_CONFIGCHANGECANCELED}
+
+(*
+ * Message = WM_DEVICECHANGE
+ * wParam = DBT_MONITORCHANGE
+ * lParam = new resolution to use (LOWORD=x, HIWORD=y)
+ * if 0, use the default res for current config
+ *
+ * this message is sent when the display monitor has changed
+ * and the system should change the display mode to match it.
+ *)
+
+ DBT_MONITORCHANGE = $001B;
+ {$EXTERNALSYM DBT_MONITORCHANGE}
+
+(*
+ * Message = WM_DEVICECHANGE
+ * wParam = DBT_SHELLLOGGEDON
+ * lParam = 0
+ *
+ * The shell has finished login on: VxD can now do Shell_EXEC.
+ *)
+
+ DBT_SHELLLOGGEDON = $0020;
+ {$EXTERNALSYM DBT_SHELLLOGGEDON}
+
+(*
+ * Message = WM_DEVICECHANGE
+ * wParam = DBT_CONFIGMGAPI
+ * lParam = CONFIGMG API Packet
+ *
+ * CONFIGMG ring 3 call.
+ *)
+
+ DBT_CONFIGMGAPI32 = $0022;
+ {$EXTERNALSYM DBT_CONFIGMGAPI32}
+
+(*
+ * Message = WM_DEVICECHANGE
+ * wParam = DBT_VXDINITCOMPLETE
+ * lParam = 0
+ *
+ * CONFIGMG ring 3 call.
+ *)
+
+ DBT_VXDINITCOMPLETE = $0023;
+ {$EXTERNALSYM DBT_VXDINITCOMPLETE}
+
+(*
+ * Message = WM_DEVICECHANGE
+ * wParam = DBT_VOLLOCK*
+ * lParam = pointer to VolLockBroadcast structure described below
+ *
+ * Messages issued by IFSMGR for volume locking purposes on WM_DEVICECHANGE.
+ * All these messages pass a pointer to a struct which has no pointers.
+ *)
+
+ DBT_VOLLOCKQUERYLOCK = $8041;
+ {$EXTERNALSYM DBT_VOLLOCKQUERYLOCK}
+ DBT_VOLLOCKLOCKTAKEN = $8042;
+ {$EXTERNALSYM DBT_VOLLOCKLOCKTAKEN}
+ DBT_VOLLOCKLOCKFAILED = $8043;
+ {$EXTERNALSYM DBT_VOLLOCKLOCKFAILED}
+ DBT_VOLLOCKQUERYUNLOCK = $8044;
+ {$EXTERNALSYM DBT_VOLLOCKQUERYUNLOCK}
+ DBT_VOLLOCKLOCKRELEASED = $8045;
+ {$EXTERNALSYM DBT_VOLLOCKLOCKRELEASED}
+ DBT_VOLLOCKUNLOCKFAILED = $8046;
+ {$EXTERNALSYM DBT_VOLLOCKUNLOCKFAILED}
+
+(*
+ * Device broadcast header
+ *)
+
+type
+ _DEV_BROADCAST_HDR = record
+ dbch_size: DWORD;
+ dbch_devicetype: DWORD;
+ dbch_reserved: DWORD;
+ end;
+ {$EXTERNALSYM _DEV_BROADCAST_HDR}
+ DEV_BROADCAST_HDR = _DEV_BROADCAST_HDR;
+ {$EXTERNALSYM DEV_BROADCAST_HDR}
+ PDEV_BROADCAST_HDR = ^DEV_BROADCAST_HDR;
+ {$EXTERNALSYM PDEV_BROADCAST_HDR}
+ TDevBroadcastHdr = DEV_BROADCAST_HDR;
+ PDevBroadcastHdr = PDEV_BROADCAST_HDR;
+
+(*
+ * Structure for volume lock broadcast
+ *)
+
+ VolLockBroadcast = record
+ vlb_dbh: DEV_BROADCAST_HDR;
+ vlb_owner: DWORD; // thread on which lock request is being issued
+ vlb_perms: BYTE; // lock permission flags defined below
+ vlb_lockType: BYTE; // type of lock
+ vlb_drive: BYTE; // drive on which lock is issued
+ vlb_flags: BYTE; // miscellaneous flags
+ end;
+ {$EXTERNALSYM VolLockBroadcast}
+ TVollockbroadcast = VolLockBroadcast;
+ PVollockbroadcast = ^VolLockBroadcast;
+
+(*
+ * Values for vlb_perms
+ *)
+
+const
+ LOCKP_ALLOW_WRITES = $01; // Bit 0 set - allow writes
+ {$EXTERNALSYM LOCKP_ALLOW_WRITES}
+ LOCKP_FAIL_WRITES = $00; // Bit 0 clear - fail writes
+ {$EXTERNALSYM LOCKP_FAIL_WRITES}
+ LOCKP_FAIL_MEM_MAPPING = $02; // Bit 1 set - fail memory mappings
+ {$EXTERNALSYM LOCKP_FAIL_MEM_MAPPING}
+ LOCKP_ALLOW_MEM_MAPPING = $00; // Bit 1 clear - allow memory mappings
+ {$EXTERNALSYM LOCKP_ALLOW_MEM_MAPPING}
+ LOCKP_USER_MASK = $03; // Mask for user lock flags
+ {$EXTERNALSYM LOCKP_USER_MASK}
+ LOCKP_LOCK_FOR_FORMAT = $04; // Level 0 lock for format
+ {$EXTERNALSYM LOCKP_LOCK_FOR_FORMAT}
+
+(*
+ * Values for vlb_flags
+ *)
+
+ LOCKF_LOGICAL_LOCK = $00; // Bit 0 clear - logical lock
+ {$EXTERNALSYM LOCKF_LOGICAL_LOCK}
+ LOCKF_PHYSICAL_LOCK = $01; // Bit 0 set - physical lock
+ {$EXTERNALSYM LOCKF_PHYSICAL_LOCK}
+
+(*
+ * Message = WM_DEVICECHANGE
+ * wParam = DBT_NODISKSPACE
+ * lParam = drive number of drive that is out of disk space (1-based)
+ *
+ * Message issued by IFS manager when it detects that a drive is run out of
+ * free space.
+ *)
+
+ DBT_NO_DISK_SPACE = $0047;
+ {$EXTERNALSYM DBT_NO_DISK_SPACE}
+
+(*
+ * Message = WM_DEVICECHANGE
+ * wParam = DBT_LOW_DISK_SPACE
+ * lParam = drive number of drive that is low on disk space (1-based)
+ *
+ * Message issued by VFAT when it detects that a drive it has mounted
+ * has the remaning free space below a threshold specified by the
+ * registry or by a disk space management application.
+ * The broadcast is issued by VFAT ONLY when space is either allocated
+ * or freed by VFAT.
+ *)
+
+ DBT_LOW_DISK_SPACE = $0048;
+ {$EXTERNALSYM DBT_LOW_DISK_SPACE}
+
+ DBT_CONFIGMGPRIVATE = $7FFF;
+ {$EXTERNALSYM DBT_CONFIGMGPRIVATE}
+
+(*
+ * The following messages are for WM_DEVICECHANGE. The immediate list
+ * is for the wParam. ALL THESE MESSAGES PASS A POINTER TO A STRUCT
+ * STARTING WITH A DWORD SIZE AND HAVING NO POINTER IN THE STRUCT.
+ *
+ *)
+
+ DBT_DEVICEARRIVAL = $8000; // system detected a new device
+ {$EXTERNALSYM DBT_DEVICEARRIVAL}
+ DBT_DEVICEQUERYREMOVE = $8001; // wants to remove, may fail
+ {$EXTERNALSYM DBT_DEVICEQUERYREMOVE}
+ DBT_DEVICEQUERYREMOVEFAILED = $8002; // removal aborted
+ {$EXTERNALSYM DBT_DEVICEQUERYREMOVEFAILED}
+ DBT_DEVICEREMOVEPENDING = $8003; // about to remove, still avail.
+ {$EXTERNALSYM DBT_DEVICEREMOVEPENDING}
+ DBT_DEVICEREMOVECOMPLETE = $8004; // device is gone
+ {$EXTERNALSYM DBT_DEVICEREMOVECOMPLETE}
+ DBT_DEVICETYPESPECIFIC = $8005; // type specific event
+ {$EXTERNALSYM DBT_DEVICETYPESPECIFIC}
+ DBT_CUSTOMEVENT = $8006; // user-defined event
+ {$EXTERNALSYM DBT_CUSTOMEVENT}
+
+ DBT_DEVTYP_OEM = $00000000; // oem-defined device type
+ {$EXTERNALSYM DBT_DEVTYP_OEM}
+ DBT_DEVTYP_DEVNODE = $00000001; // devnode number
+ {$EXTERNALSYM DBT_DEVTYP_DEVNODE}
+ DBT_DEVTYP_VOLUME = $00000002; // logical volume
+ {$EXTERNALSYM DBT_DEVTYP_VOLUME}
+ DBT_DEVTYP_PORT = $00000003; // serial, parallel
+ {$EXTERNALSYM DBT_DEVTYP_PORT}
+ DBT_DEVTYP_NET = $00000004; // network resource
+ {$EXTERNALSYM DBT_DEVTYP_NET}
+
+ DBT_DEVTYP_DEVICEINTERFACE = $00000005; // device interface class
+ {$EXTERNALSYM DBT_DEVTYP_DEVICEINTERFACE}
+ DBT_DEVTYP_HANDLE = $00000006; // file system handle
+ {$EXTERNALSYM DBT_DEVTYP_HANDLE}
+
+type
+ _DEV_BROADCAST_HEADER = record
+ dbcd_size: DWORD;
+ dbcd_devicetype: DWORD;
+ dbcd_reserved: DWORD;
+ end;
+ {$EXTERNALSYM _DEV_BROADCAST_HEADER}
+ TDevBroadcastHeader = _DEV_BROADCAST_HEADER;
+ PDevBroadcastHeader = ^_DEV_BROADCAST_HEADER;
+
+ PDEV_BROADCAST_OEM = ^DEV_BROADCAST_OEM;
+ {$EXTERNALSYM PDEV_BROADCAST_OEM}
+ _DEV_BROADCAST_OEM = record
+ dbco_size: DWORD;
+ dbco_devicetype: DWORD;
+ dbco_reserved: DWORD;
+ dbco_identifier: DWORD;
+ dbco_suppfunc: DWORD;
+ end;
+ {$EXTERNALSYM _DEV_BROADCAST_OEM}
+ DEV_BROADCAST_OEM = _DEV_BROADCAST_OEM;
+ {$EXTERNALSYM DEV_BROADCAST_OEM}
+ TDevBroadcastOem = DEV_BROADCAST_OEM;
+ PDevBroadcastOem = PDEV_BROADCAST_OEM;
+
+ PDEV_BROADCAST_DEVNODE = ^DEV_BROADCAST_DEVNODE;
+ {$EXTERNALSYM PDEV_BROADCAST_DEVNODE}
+ _DEV_BROADCAST_DEVNODE = record
+ dbcd_size: DWORD;
+ dbcd_devicetype: DWORD;
+ dbcd_reserved: DWORD;
+ dbcd_devnode: DWORD;
+ end;
+ {$EXTERNALSYM _DEV_BROADCAST_DEVNODE}
+ DEV_BROADCAST_DEVNODE = _DEV_BROADCAST_DEVNODE;
+ {$EXTERNALSYM DEV_BROADCAST_DEVNODE}
+ TDevBroadcastDevNode = DEV_BROADCAST_DEVNODE;
+ PDevBroadcastDevNode = PDEV_BROADCAST_DEVNODE;
+
+ PDEV_BROADCAST_VOLUME = ^DEV_BROADCAST_VOLUME;
+ {$EXTERNALSYM PDEV_BROADCAST_VOLUME}
+ _DEV_BROADCAST_VOLUME = record
+ dbcv_size: DWORD;
+ dbcv_devicetype: DWORD;
+ dbcv_reserved: DWORD;
+ dbcv_unitmask: DWORD;
+ dbcv_flags: WORD;
+ end;
+ {$EXTERNALSYM _DEV_BROADCAST_VOLUME}
+ DEV_BROADCAST_VOLUME = _DEV_BROADCAST_VOLUME;
+ {$EXTERNALSYM DEV_BROADCAST_VOLUME}
+ TDevBroadcastVolume = DEV_BROADCAST_VOLUME;
+ PDevBroadcastVolume = PDEV_BROADCAST_VOLUME;
+
+const
+ DBTF_MEDIA = $0001; // media comings and goings
+ {$EXTERNALSYM DBTF_MEDIA}
+ DBTF_NET = $0002; // network volume
+ {$EXTERNALSYM DBTF_NET}
+
+type
+ PDEV_BROADCAST_PORT_A = ^DEV_BROADCAST_PORT_A;
+ {$EXTERNALSYM PDEV_BROADCAST_PORT_A}
+ _DEV_BROADCAST_PORT_A = record
+ dbcp_size: DWORD;
+ dbcp_devicetype: DWORD;
+ dbcp_reserved: DWORD;
+ dbcp_name: array [0..0] of Char;
+ end;
+ {$EXTERNALSYM _DEV_BROADCAST_PORT_A}
+ DEV_BROADCAST_PORT_A = _DEV_BROADCAST_PORT_A;
+ {$EXTERNALSYM DEV_BROADCAST_PORT_A}
+ TDevBroadcastPortA = DEV_BROADCAST_PORT_A;
+ PDevBroadcastPortA = PDEV_BROADCAST_PORT_A;
+
+ PDEV_BROADCAST_PORT_W = ^DEV_BROADCAST_PORT_W;
+ {$EXTERNALSYM PDEV_BROADCAST_PORT_W}
+ _DEV_BROADCAST_PORT_W = record
+ dbcp_size: DWORD;
+ dbcp_devicetype: DWORD;
+ dbcp_reserved: DWORD;
+ dbcp_name: array [0..0] of WideChar;
+ end;
+ {$EXTERNALSYM _DEV_BROADCAST_PORT_W}
+ DEV_BROADCAST_PORT_W = _DEV_BROADCAST_PORT_W;
+ {$EXTERNALSYM DEV_BROADCAST_PORT_W}
+ TDevBroadcastPortW = DEV_BROADCAST_PORT_W;
+ PDevBroadcastPortW = PDEV_BROADCAST_PORT_W;
+
+ {$IFDEF UNICODE}
+ DEV_BROADCAST_PORT = DEV_BROADCAST_PORT_W;
+ {$EXTERNALSYM DEV_BROADCAST_PORT}
+ PDEV_BROADCAST_PORT = PDEV_BROADCAST_PORT_W;
+ {$EXTERNALSYM PDEV_BROADCAST_PORT}
+ TDevBroadcastPort = TDevBroadcastPortW;
+ PDevBroadcastPort = PDevBroadcastPortW;
+ {$ELSE}
+ DEV_BROADCAST_PORT = DEV_BROADCAST_PORT_A;
+ {$EXTERNALSYM DEV_BROADCAST_PORT}
+ PDEV_BROADCAST_PORT = PDEV_BROADCAST_PORT_A;
+ {$EXTERNALSYM PDEV_BROADCAST_PORT}
+ TDevBroadcastPort = TDevBroadcastPortA;
+ PDevBroadcastPort = PDevBroadcastPortA;
+ {$ENDIF UNICODE}
+
+ PDEV_BROADCAST_NET = ^DEV_BROADCAST_NET;
+ {$EXTERNALSYM PDEV_BROADCAST_NET}
+ _DEV_BROADCAST_NET = record
+ dbcn_size: DWORD;
+ dbcn_devicetype: DWORD;
+ dbcn_reserved: DWORD;
+ dbcn_resource: DWORD;
+ dbcn_flags: DWORD;
+ end;
+ {$EXTERNALSYM _DEV_BROADCAST_NET}
+ DEV_BROADCAST_NET = _DEV_BROADCAST_NET;
+ {$EXTERNALSYM DEV_BROADCAST_NET}
+ TDevBroadcastNet = DEV_BROADCAST_NET;
+ PDevBroadcastNet = PDEV_BROADCAST_NET;
+
+ PDEV_BROADCAST_DEVICEINTERFACE_A = ^DEV_BROADCAST_DEVICEINTERFACE_A;
+ {$EXTERNALSYM PDEV_BROADCAST_DEVICEINTERFACE_A}
+ _DEV_BROADCAST_DEVICEINTERFACE_A = record
+ dbcc_size: DWORD;
+ dbcc_devicetype: DWORD;
+ dbcc_reserved: DWORD;
+ dbcc_classguid: GUID;
+ dbcc_name: array [0..0] of char;
+ end;
+ {$EXTERNALSYM _DEV_BROADCAST_DEVICEINTERFACE_A}
+ DEV_BROADCAST_DEVICEINTERFACE_A = _DEV_BROADCAST_DEVICEINTERFACE_A;
+ {$EXTERNALSYM DEV_BROADCAST_DEVICEINTERFACE_A}
+ TDevBroadcastDeviceInterfaceA = DEV_BROADCAST_DEVICEINTERFACE_A;
+ PDevBroadcastDeviceInterfaceA = PDEV_BROADCAST_DEVICEINTERFACE_A;
+
+ PDEV_BROADCAST_DEVICEINTERFACE_W = ^DEV_BROADCAST_DEVICEINTERFACE_W;
+ {$EXTERNALSYM PDEV_BROADCAST_DEVICEINTERFACE_W}
+ _DEV_BROADCAST_DEVICEINTERFACE_W = record
+ dbcc_size: DWORD;
+ dbcc_devicetype: DWORD;
+ dbcc_reserved: DWORD;
+ dbcc_classguid: GUID;
+ dbcc_name: array [0..0] of wchar_t;
+ end;
+ {$EXTERNALSYM _DEV_BROADCAST_DEVICEINTERFACE_W}
+ DEV_BROADCAST_DEVICEINTERFACE_W = _DEV_BROADCAST_DEVICEINTERFACE_W;
+ {$EXTERNALSYM DEV_BROADCAST_DEVICEINTERFACE_W}
+ TDevBroadcastDeviceInterfaceW = DEV_BROADCAST_DEVICEINTERFACE_W;
+ PDevBroadcastDeviceInterfaceW = PDEV_BROADCAST_DEVICEINTERFACE_W;
+
+ {$IFDEF UNICODE}
+ DEV_BROADCAST_DEVICEINTERFACE = DEV_BROADCAST_DEVICEINTERFACE_W;
+ {$EXTERNALSYM DEV_BROADCAST_DEVICEINTERFACE}
+ PDEV_BROADCAST_DEVICEINTERFACE = PDEV_BROADCAST_DEVICEINTERFACE_W;
+ {$EXTERNALSYM PDEV_BROADCAST_DEVICEINTERFACE}
+ TDevBroadcastDeviceInterface = TDevBroadcastDeviceInterfaceW;
+ PDevBroadcastDeviceInterface = PDevBroadcastDeviceInterfaceW;
+ {$ELSE}
+ DEV_BROADCAST_DEVICEINTERFACE = DEV_BROADCAST_DEVICEINTERFACE_A;
+ {$EXTERNALSYM DEV_BROADCAST_DEVICEINTERFACE}
+ PDEV_BROADCAST_DEVICEINTERFACE = PDEV_BROADCAST_DEVICEINTERFACE_A;
+ {$EXTERNALSYM PDEV_BROADCAST_DEVICEINTERFACE}
+ TDevBroadcastDeviceInterface = TDevBroadcastDeviceInterfaceA;
+ PDevBroadcastDeviceInterface = PDevBroadcastDeviceInterfaceA;
+ {$ENDIF UNICODE}
+
+ PDEV_BROADCAST_HANDLE = ^DEV_BROADCAST_HANDLE;
+ {$EXTERNALSYM PDEV_BROADCAST_HANDLE}
+ _DEV_BROADCAST_HANDLE = record
+ dbch_size: DWORD;
+ dbch_devicetype: DWORD;
+ dbch_reserved: DWORD;
+ dbch_handle: HANDLE; // file handle used in call to RegisterDeviceNotification
+ dbch_hdevnotify: HDEVNOTIFY; // returned from RegisterDeviceNotification
+ //
+ // The following 3 fields are only valid if wParam is DBT_CUSTOMEVENT.
+ //
+ dbch_eventguid: GUID;
+ dbch_nameoffset: LONG; // offset (bytes) of variable-length string buffer (-1 if none)
+ dbch_data: array [0..0] of BYTE; // variable-sized buffer, potentially containing binary and/or text data
+ end;
+ {$EXTERNALSYM _DEV_BROADCAST_HANDLE}
+ DEV_BROADCAST_HANDLE = _DEV_BROADCAST_HANDLE;
+ {$EXTERNALSYM DEV_BROADCAST_HANDLE}
+ TDevBroadcastHandle = DEV_BROADCAST_HANDLE;
+ PDevBroadcastHandle = PDEV_BROADCAST_HANDLE;
+
+//
+// Define 32-bit and 64-bit versions of the DEV_BROADCAST_HANDLE structure
+// for WOW64. These must be kept in sync with the above structure.
+//
+
+ PDEV_BROADCAST_HANDLE32 = ^DEV_BROADCAST_HANDLE32;
+ {$EXTERNALSYM PDEV_BROADCAST_HANDLE32}
+ _DEV_BROADCAST_HANDLE32 = record
+ dbch_size: DWORD;
+ dbch_devicetype: DWORD;
+ dbch_reserved: DWORD;
+ dbch_handle: ULONG32;
+ dbch_hdevnotify: ULONG32;
+ dbch_eventguid: GUID;
+ dbch_nameoffset: LONG;
+ dbch_data: array [0..0] of BYTE;
+ end;
+ {$EXTERNALSYM _DEV_BROADCAST_HANDLE32}
+ DEV_BROADCAST_HANDLE32 = _DEV_BROADCAST_HANDLE32;
+ {$EXTERNALSYM DEV_BROADCAST_HANDLE32}
+ TDevBroadcastHandle32 = DEV_BROADCAST_HANDLE32;
+ PDevBroadcastHandle32 = PDEV_BROADCAST_HANDLE32;
+
+ PDEV_BROADCAST_HANDLE64 = ^DEV_BROADCAST_HANDLE64;
+ {$EXTERNALSYM PDEV_BROADCAST_HANDLE64}
+ _DEV_BROADCAST_HANDLE64 = record
+ dbch_size: DWORD;
+ dbch_devicetype: DWORD;
+ dbch_reserved: DWORD;
+ dbch_handle: ULONG64;
+ dbch_hdevnotify: ULONG64;
+ dbch_eventguid: GUID;
+ dbch_nameoffset: LONG;
+ dbch_data: array [0..0] of BYTE;
+ end;
+ {$EXTERNALSYM _DEV_BROADCAST_HANDLE64}
+ DEV_BROADCAST_HANDLE64 = _DEV_BROADCAST_HANDLE64;
+ {$EXTERNALSYM DEV_BROADCAST_HANDLE64}
+ TDevBroadcastHandle64 = DEV_BROADCAST_HANDLE64;
+ PDevBroadcastHandle64 = PDEV_BROADCAST_HANDLE64;
+
+const
+ DBTF_RESOURCE = $00000001; // network resource
+ {$EXTERNALSYM DBTF_RESOURCE}
+ DBTF_XPORT = $00000002; // new transport coming or going
+ {$EXTERNALSYM DBTF_XPORT}
+ DBTF_SLOWNET = $00000004; // new incoming transport is slow
+ {$EXTERNALSYM DBTF_SLOWNET}
+ // (dbcn_resource undefined for now)
+
+ DBT_VPOWERDAPI = $8100; // VPOWERD API for Win95
+ {$EXTERNALSYM DBT_VPOWERDAPI}
+
+(*
+ * User-defined message types all use wParam = 0xFFFF with the
+ * lParam a pointer to the structure below.
+ *
+ * dbud_dbh - DEV_BROADCAST_HEADER must be filled in as usual.
+ *
+ * dbud_szName contains a case-sensitive ASCIIZ name which names the
+ * message. The message name consists of the vendor name, a backslash,
+ * then arbitrary user-defined ASCIIZ text. For example:
+ *
+ * "WidgetWare\QueryScannerShutdown"
+ * "WidgetWare\Video Q39S\AdapterReady"
+ *
+ * After the ASCIIZ name, arbitrary information may be provided.
+ * Make sure that dbud_dbh.dbch_size is big enough to encompass
+ * all the data. And remember that nothing in the structure may
+ * contain pointers.
+ *)
+
+ DBT_USERDEFINED = $FFFF;
+ {$EXTERNALSYM DBT_USERDEFINED}
+
+type
+ PDEV_BROADCAST_USERDEFINED = ^DEV_BROADCAST_USERDEFINED;
+ {$EXTERNALSYM PDEV_BROADCAST_USERDEFINED}
+ _DEV_BROADCAST_USERDEFINED = record
+ dbud_dbh: DEV_BROADCAST_HDR;
+ dbud_szName: array [0..0] of Char;
+ // BYTE dbud_rgbUserDefined[];*/ /* User-defined contents */
+ end;
+ {$EXTERNALSYM _DEV_BROADCAST_USERDEFINED}
+ DEV_BROADCAST_USERDEFINED = _DEV_BROADCAST_USERDEFINED;
+ {$EXTERNALSYM DEV_BROADCAST_USERDEFINED}
+ TDevBroadcastUserDefined = DEV_BROADCAST_USERDEFINED;
+ PDevBroadcastUserDefined = PDEV_BROADCAST_USERDEFINED;
+
+// (rom) added own message type for WM_DEVICECHANGE
+// see Messages.pas TWMNoParams ff.
+
+type
+ TWMDeviceChange = record
+ Msg: Cardinal;
+ Event: UINT;
+ dwData: Pointer;
+ Result: Longint;
+ end;
+
+implementation
+
+end.
diff --git a/packages/extra/winunits/jwadde.pas b/packages/extra/winunits/jwadde.pas
index d1aaa2db5b..488f656849 100644
--- a/packages/extra/winunits/jwadde.pas
+++ b/packages/extra/winunits/jwadde.pas
@@ -1,330 +1,330 @@
-{******************************************************************************}
-{ }
-{ Dynamic Data Exchange API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: dde.h, released June 2000. The original Pascal }
-{ code is: Dde.pas, released December 2000. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwadde.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaDde;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "Dde.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaWinNT, JwaWinType;
-
-// DDE window messages
-
-const
- WM_DDE_FIRST = $03E0;
- {$EXTERNALSYM WM_DDE_FIRST}
- WM_DDE_INITIATE = WM_DDE_FIRST;
- {$EXTERNALSYM WM_DDE_INITIATE}
- WM_DDE_TERMINATE = WM_DDE_FIRST + 1;
- {$EXTERNALSYM WM_DDE_TERMINATE}
- WM_DDE_ADVISE = WM_DDE_FIRST + 2;
- {$EXTERNALSYM WM_DDE_ADVISE}
- WM_DDE_UNADVISE = WM_DDE_FIRST + 3;
- {$EXTERNALSYM WM_DDE_UNADVISE}
- WM_DDE_ACK = WM_DDE_FIRST + 4;
- {$EXTERNALSYM WM_DDE_ACK}
- WM_DDE_DATA = WM_DDE_FIRST + 5;
- {$EXTERNALSYM WM_DDE_DATA}
- WM_DDE_REQUEST = WM_DDE_FIRST + 6;
- {$EXTERNALSYM WM_DDE_REQUEST}
- WM_DDE_POKE = WM_DDE_FIRST + 7;
- {$EXTERNALSYM WM_DDE_POKE}
- WM_DDE_EXECUTE = WM_DDE_FIRST + 8;
- {$EXTERNALSYM WM_DDE_EXECUTE}
- WM_DDE_LAST = WM_DDE_FIRST + 8;
- {$EXTERNALSYM WM_DDE_LAST}
-
-{*----------------------------------------------------------------------------
-| DDEACK structure
-|
-| Structure of wStatus (LOWORD(lParam)) in WM_DDE_ACK message
-| sent in response to a WM_DDE_DATA, WM_DDE_REQUEST, WM_DDE_POKE,
-| WM_DDE_ADVISE, or WM_DDE_UNADVISE message.
-|
-----------------------------------------------------------------------------*}
-
-type
- DDEACK = record
- Flags: Word;
- // bAppReturnCode:8,
- // reserved:6,
- // fBusy:1,
- // fAck:1;
- end;
- {$EXTERNALSYM DDEACK}
- TDdeAck = DDEACK;
- PDdeAck = ^DDEACK;
-
-{*----------------------------------------------------------------------------
-| DDEADVISE structure
-|
-| WM_DDE_ADVISE parameter structure for hOptions (LOWORD(lParam))
-|
-----------------------------------------------------------------------------*}
-
-type
- DDEADVICE = record
- Flags: Word;
- // reserved:14,
- // fDeferUpd:1,
- // fAckReq:1;
- cfFormat: Smallint;
- end;
- {$EXTERNALSYM DDEADVICE}
- TDdeAdvice = DDEADVICE;
- PDdeAdvice = ^DDEADVICE;
-
-{*----------------------------------------------------------------------------
-| DDEDATA structure
-|
-| WM_DDE_DATA parameter structure for hData (LOWORD(lParam)).
-| The actual size of this structure depends on the size of
-| the Value array.
-|
-----------------------------------------------------------------------------*}
-
-type
- DDEDATA = record
- usFlags: Word;
- // unused:12,
- // fResponse:1,
- // fRelease:1,
- // reserved:1,
- // fAckReq:1;
- cfFormat: Smallint;
- Value: array [0..0] of Byte;
- end;
- {$EXTERNALSYM DDEDATA}
- TDdeData = DDEDATA;
- PDdeData = ^DDEDATA;
-
-{*----------------------------------------------------------------------------
-| DDEPOKE structure
-|
-| WM_DDE_POKE parameter structure for hData (LOWORD(lParam)).
-| The actual size of this structure depends on the size of
-| the Value array.
-|
-----------------------------------------------------------------------------*}
-
-type
- DDEPOKE = record
- usFlags: Word;
- //unused:13, // Earlier versions of DDE.H incorrectly 12 unused bits.
- //fRelease:1,
- //fReserved:2;
- cfFormat: Smallint;
- Value: array [0..0] of Byte; // This member was named rgb[1] in previous
- // versions of DDE.H
- end;
- {$EXTERNALSYM DDEPOKE}
- TDdePoke = DDEPOKE;
- PDdePoke = ^DDEPOKE;
-
-{*----------------------------------------------------------------------------
-The following typedef's were used in previous versions of the Windows SDK.
-They are still valid. The above typedef's define exactly the same structures
-as those below. The above typedef names are recommended, however, as they
-are more meaningful.
-
-Note that the DDEPOKE structure typedef'ed in earlier versions of DDE.H did
-not correctly define the bit positions.
-----------------------------------------------------------------------------*}
-
-type
- DDELN = record
- usFlags: Word;
- // unused:13,
- // fRelease:1,
- // fDeferUpd:1,
- // fAckReq:1;
- cfFormat: Smallint;
- end;
- {$EXTERNALSYM DDELN}
- TDdeLn = DDELN;
- PDdeLn = ^DDELN;
-
- DDEUP = record
- usFlags: Word;
- // unused:12,
- // fAck:1,
- // fRelease:1,
- // fReserved:1,
- // fAckReq:1;
- cfFormat: Smallint;
- rgb: array [0..0] of Byte;
- end;
- {$EXTERNALSYM DDEUP}
- TDdeUp = DDEUP;
- PDdeUp = ^DDEUP;
-
-//
-// DDE SECURITY
-//
-
-function DdeSetQualityOfService(hwndClient: HWND; const pqosNew: SECURITY_QUALITY_OF_SERVICE;
- pqosPrev: PSECURITY_QUALITY_OF_SERVICE): BOOL; stdcall;
-{$EXTERNALSYM DdeSetQualityOfService}
-
-function ImpersonateDdeClientWindow(hWndClient, hWndServer: HWND): BOOL; stdcall;
-{$EXTERNALSYM ImpersonateDdeClientWindow}
-
-//
-// DDE message packing APIs
-//
-
-function PackDDElParam(msg: UINT; uiLo, uiHi: UINT_PTR): LPARAM; stdcall;
-{$EXTERNALSYM PackDDElParam}
-function UnpackDDElParam(msg: UINT; lParam: LPARAM; puiLo, puiHi: PUINT_PTR): BOOL; stdcall;
-{$EXTERNALSYM UnpackDDElParam}
-function FreeDDElParam(msg: UINT; lParam: LPARAM): BOOL; stdcall;
-{$EXTERNALSYM FreeDDElParam}
-function ReuseDDElParam(lParam: LPARAM; msgIn, msgOut: UINT; uiLo, uiHi: UINT_PTR): LPARAM; stdcall;
-{$EXTERNALSYM ReuseDDElParam}
-
-implementation
-
-const
- user32 = 'user32.dll';
-
-{$IFDEF DYNAMIC_LINK}
-
-var
- _DdeSetQualityOfService: Pointer;
-
-function DdeSetQualityOfService;
-begin
- GetProcedureAddress(_DdeSetQualityOfService, user32, 'DdeSetQualityOfService');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DdeSetQualityOfService]
- end;
-end;
-
-var
- _ImpersonateDdeClientWindow: Pointer;
-
-function ImpersonateDdeClientWindow;
-begin
- GetProcedureAddress(_ImpersonateDdeClientWindow, user32, 'ImpersonateDdeClientWindow');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ImpersonateDdeClientWindow]
- end;
-end;
-
-var
- _PackDDElParam: Pointer;
-
-function PackDDElParam;
-begin
- GetProcedureAddress(_PackDDElParam, user32, 'PackDDElParam');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PackDDElParam]
- end;
-end;
-
-var
- _UnpackDDElParam: Pointer;
-
-function UnpackDDElParam;
-begin
- GetProcedureAddress(_UnpackDDElParam, user32, 'UnpackDDElParam');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_UnpackDDElParam]
- end;
-end;
-
-var
- _FreeDDElParam: Pointer;
-
-function FreeDDElParam;
-begin
- GetProcedureAddress(_FreeDDElParam, user32, 'FreeDDElParam');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_FreeDDElParam]
- end;
-end;
-
-var
- _ReuseDDElParam: Pointer;
-
-function ReuseDDElParam;
-begin
- GetProcedureAddress(_ReuseDDElParam, user32, 'ReuseDDElParam');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ReuseDDElParam]
- end;
-end;
-
-{$ELSE}
-
-function DdeSetQualityOfService; external user32 name 'DdeSetQualityOfService';
-function ImpersonateDdeClientWindow; external user32 name 'ImpersonateDdeClientWindow';
-function PackDDElParam; external user32 name 'PackDDElParam';
-function UnpackDDElParam; external user32 name 'UnpackDDElParam';
-function FreeDDElParam; external user32 name 'FreeDDElParam';
-function ReuseDDElParam; external user32 name 'ReuseDDElParam';
-
-{$ENDIF DYNAMIC_LINK}
-
-end.
+{******************************************************************************}
+{ }
+{ Dynamic Data Exchange API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: dde.h, released June 2000. The original Pascal }
+{ code is: Dde.pas, released December 2000. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwadde.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaDde;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "Dde.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaWinNT, JwaWinType;
+
+// DDE window messages
+
+const
+ WM_DDE_FIRST = $03E0;
+ {$EXTERNALSYM WM_DDE_FIRST}
+ WM_DDE_INITIATE = WM_DDE_FIRST;
+ {$EXTERNALSYM WM_DDE_INITIATE}
+ WM_DDE_TERMINATE = WM_DDE_FIRST + 1;
+ {$EXTERNALSYM WM_DDE_TERMINATE}
+ WM_DDE_ADVISE = WM_DDE_FIRST + 2;
+ {$EXTERNALSYM WM_DDE_ADVISE}
+ WM_DDE_UNADVISE = WM_DDE_FIRST + 3;
+ {$EXTERNALSYM WM_DDE_UNADVISE}
+ WM_DDE_ACK = WM_DDE_FIRST + 4;
+ {$EXTERNALSYM WM_DDE_ACK}
+ WM_DDE_DATA = WM_DDE_FIRST + 5;
+ {$EXTERNALSYM WM_DDE_DATA}
+ WM_DDE_REQUEST = WM_DDE_FIRST + 6;
+ {$EXTERNALSYM WM_DDE_REQUEST}
+ WM_DDE_POKE = WM_DDE_FIRST + 7;
+ {$EXTERNALSYM WM_DDE_POKE}
+ WM_DDE_EXECUTE = WM_DDE_FIRST + 8;
+ {$EXTERNALSYM WM_DDE_EXECUTE}
+ WM_DDE_LAST = WM_DDE_FIRST + 8;
+ {$EXTERNALSYM WM_DDE_LAST}
+
+{*----------------------------------------------------------------------------
+| DDEACK structure
+|
+| Structure of wStatus (LOWORD(lParam)) in WM_DDE_ACK message
+| sent in response to a WM_DDE_DATA, WM_DDE_REQUEST, WM_DDE_POKE,
+| WM_DDE_ADVISE, or WM_DDE_UNADVISE message.
+|
+----------------------------------------------------------------------------*}
+
+type
+ DDEACK = record
+ Flags: Word;
+ // bAppReturnCode:8,
+ // reserved:6,
+ // fBusy:1,
+ // fAck:1;
+ end;
+ {$EXTERNALSYM DDEACK}
+ TDdeAck = DDEACK;
+ PDdeAck = ^DDEACK;
+
+{*----------------------------------------------------------------------------
+| DDEADVISE structure
+|
+| WM_DDE_ADVISE parameter structure for hOptions (LOWORD(lParam))
+|
+----------------------------------------------------------------------------*}
+
+type
+ DDEADVICE = record
+ Flags: Word;
+ // reserved:14,
+ // fDeferUpd:1,
+ // fAckReq:1;
+ cfFormat: Smallint;
+ end;
+ {$EXTERNALSYM DDEADVICE}
+ TDdeAdvice = DDEADVICE;
+ PDdeAdvice = ^DDEADVICE;
+
+{*----------------------------------------------------------------------------
+| DDEDATA structure
+|
+| WM_DDE_DATA parameter structure for hData (LOWORD(lParam)).
+| The actual size of this structure depends on the size of
+| the Value array.
+|
+----------------------------------------------------------------------------*}
+
+type
+ DDEDATA = record
+ usFlags: Word;
+ // unused:12,
+ // fResponse:1,
+ // fRelease:1,
+ // reserved:1,
+ // fAckReq:1;
+ cfFormat: Smallint;
+ Value: array [0..0] of Byte;
+ end;
+ {$EXTERNALSYM DDEDATA}
+ TDdeData = DDEDATA;
+ PDdeData = ^DDEDATA;
+
+{*----------------------------------------------------------------------------
+| DDEPOKE structure
+|
+| WM_DDE_POKE parameter structure for hData (LOWORD(lParam)).
+| The actual size of this structure depends on the size of
+| the Value array.
+|
+----------------------------------------------------------------------------*}
+
+type
+ DDEPOKE = record
+ usFlags: Word;
+ //unused:13, // Earlier versions of DDE.H incorrectly 12 unused bits.
+ //fRelease:1,
+ //fReserved:2;
+ cfFormat: Smallint;
+ Value: array [0..0] of Byte; // This member was named rgb[1] in previous
+ // versions of DDE.H
+ end;
+ {$EXTERNALSYM DDEPOKE}
+ TDdePoke = DDEPOKE;
+ PDdePoke = ^DDEPOKE;
+
+{*----------------------------------------------------------------------------
+The following typedef's were used in previous versions of the Windows SDK.
+They are still valid. The above typedef's define exactly the same structures
+as those below. The above typedef names are recommended, however, as they
+are more meaningful.
+
+Note that the DDEPOKE structure typedef'ed in earlier versions of DDE.H did
+not correctly define the bit positions.
+----------------------------------------------------------------------------*}
+
+type
+ DDELN = record
+ usFlags: Word;
+ // unused:13,
+ // fRelease:1,
+ // fDeferUpd:1,
+ // fAckReq:1;
+ cfFormat: Smallint;
+ end;
+ {$EXTERNALSYM DDELN}
+ TDdeLn = DDELN;
+ PDdeLn = ^DDELN;
+
+ DDEUP = record
+ usFlags: Word;
+ // unused:12,
+ // fAck:1,
+ // fRelease:1,
+ // fReserved:1,
+ // fAckReq:1;
+ cfFormat: Smallint;
+ rgb: array [0..0] of Byte;
+ end;
+ {$EXTERNALSYM DDEUP}
+ TDdeUp = DDEUP;
+ PDdeUp = ^DDEUP;
+
+//
+// DDE SECURITY
+//
+
+function DdeSetQualityOfService(hwndClient: HWND; const pqosNew: SECURITY_QUALITY_OF_SERVICE;
+ pqosPrev: PSECURITY_QUALITY_OF_SERVICE): BOOL; stdcall;
+{$EXTERNALSYM DdeSetQualityOfService}
+
+function ImpersonateDdeClientWindow(hWndClient, hWndServer: HWND): BOOL; stdcall;
+{$EXTERNALSYM ImpersonateDdeClientWindow}
+
+//
+// DDE message packing APIs
+//
+
+function PackDDElParam(msg: UINT; uiLo, uiHi: UINT_PTR): LPARAM; stdcall;
+{$EXTERNALSYM PackDDElParam}
+function UnpackDDElParam(msg: UINT; lParam: LPARAM; puiLo, puiHi: PUINT_PTR): BOOL; stdcall;
+{$EXTERNALSYM UnpackDDElParam}
+function FreeDDElParam(msg: UINT; lParam: LPARAM): BOOL; stdcall;
+{$EXTERNALSYM FreeDDElParam}
+function ReuseDDElParam(lParam: LPARAM; msgIn, msgOut: UINT; uiLo, uiHi: UINT_PTR): LPARAM; stdcall;
+{$EXTERNALSYM ReuseDDElParam}
+
+implementation
+
+const
+ user32 = 'user32.dll';
+
+{$IFDEF DYNAMIC_LINK}
+
+var
+ _DdeSetQualityOfService: Pointer;
+
+function DdeSetQualityOfService;
+begin
+ GetProcedureAddress(_DdeSetQualityOfService, user32, 'DdeSetQualityOfService');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DdeSetQualityOfService]
+ end;
+end;
+
+var
+ _ImpersonateDdeClientWindow: Pointer;
+
+function ImpersonateDdeClientWindow;
+begin
+ GetProcedureAddress(_ImpersonateDdeClientWindow, user32, 'ImpersonateDdeClientWindow');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ImpersonateDdeClientWindow]
+ end;
+end;
+
+var
+ _PackDDElParam: Pointer;
+
+function PackDDElParam;
+begin
+ GetProcedureAddress(_PackDDElParam, user32, 'PackDDElParam');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PackDDElParam]
+ end;
+end;
+
+var
+ _UnpackDDElParam: Pointer;
+
+function UnpackDDElParam;
+begin
+ GetProcedureAddress(_UnpackDDElParam, user32, 'UnpackDDElParam');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_UnpackDDElParam]
+ end;
+end;
+
+var
+ _FreeDDElParam: Pointer;
+
+function FreeDDElParam;
+begin
+ GetProcedureAddress(_FreeDDElParam, user32, 'FreeDDElParam');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_FreeDDElParam]
+ end;
+end;
+
+var
+ _ReuseDDElParam: Pointer;
+
+function ReuseDDElParam;
+begin
+ GetProcedureAddress(_ReuseDDElParam, user32, 'ReuseDDElParam');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ReuseDDElParam]
+ end;
+end;
+
+{$ELSE}
+
+function DdeSetQualityOfService; external user32 name 'DdeSetQualityOfService';
+function ImpersonateDdeClientWindow; external user32 name 'ImpersonateDdeClientWindow';
+function PackDDElParam; external user32 name 'PackDDElParam';
+function UnpackDDElParam; external user32 name 'UnpackDDElParam';
+function FreeDDElParam; external user32 name 'FreeDDElParam';
+function ReuseDDElParam; external user32 name 'ReuseDDElParam';
+
+{$ENDIF DYNAMIC_LINK}
+
+end.
diff --git a/packages/extra/winunits/jwadhcpcsdk.pas b/packages/extra/winunits/jwadhcpcsdk.pas
index 896b038c7a..76f039cc7d 100644
--- a/packages/extra/winunits/jwadhcpcsdk.pas
+++ b/packages/extra/winunits/jwadhcpcsdk.pas
@@ -1,449 +1,449 @@
-{******************************************************************************}
-{ }
-{ DHCP Client API interface unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: dhcpcsdk.h, released June 2000. The original Pascal }
-{ code is: DhcpCSdk.pas, released December 2000. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwadhcpcsdk.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaDhcpCSdk;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "dhcpcsdk.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaWinType;
-
-//
-// DHCP Standard Options.
-//
-
-const
- OPTION_PAD = 0;
- {$EXTERNALSYM OPTION_PAD}
- OPTION_SUBNET_MASK = 1;
- {$EXTERNALSYM OPTION_SUBNET_MASK}
- OPTION_TIME_OFFSET = 2;
- {$EXTERNALSYM OPTION_TIME_OFFSET}
- OPTION_ROUTER_ADDRESS = 3;
- {$EXTERNALSYM OPTION_ROUTER_ADDRESS}
- OPTION_TIME_SERVERS = 4;
- {$EXTERNALSYM OPTION_TIME_SERVERS}
- OPTION_IEN116_NAME_SERVERS = 5;
- {$EXTERNALSYM OPTION_IEN116_NAME_SERVERS}
- OPTION_DOMAIN_NAME_SERVERS = 6;
- {$EXTERNALSYM OPTION_DOMAIN_NAME_SERVERS}
- OPTION_LOG_SERVERS = 7;
- {$EXTERNALSYM OPTION_LOG_SERVERS}
- OPTION_COOKIE_SERVERS = 8;
- {$EXTERNALSYM OPTION_COOKIE_SERVERS}
- OPTION_LPR_SERVERS = 9;
- {$EXTERNALSYM OPTION_LPR_SERVERS}
- OPTION_IMPRESS_SERVERS = 10;
- {$EXTERNALSYM OPTION_IMPRESS_SERVERS}
- OPTION_RLP_SERVERS = 11;
- {$EXTERNALSYM OPTION_RLP_SERVERS}
- OPTION_HOST_NAME = 12;
- {$EXTERNALSYM OPTION_HOST_NAME}
- OPTION_BOOT_FILE_SIZE = 13;
- {$EXTERNALSYM OPTION_BOOT_FILE_SIZE}
- OPTION_MERIT_DUMP_FILE = 14;
- {$EXTERNALSYM OPTION_MERIT_DUMP_FILE}
- OPTION_DOMAIN_NAME = 15;
- {$EXTERNALSYM OPTION_DOMAIN_NAME}
- OPTION_SWAP_SERVER = 16;
- {$EXTERNALSYM OPTION_SWAP_SERVER}
- OPTION_ROOT_DISK = 17;
- {$EXTERNALSYM OPTION_ROOT_DISK}
- OPTION_EXTENSIONS_PATH = 18;
- {$EXTERNALSYM OPTION_EXTENSIONS_PATH}
-
-//
-// IP layer parameters - per host
-//
-
- OPTION_BE_A_ROUTER = 19;
- {$EXTERNALSYM OPTION_BE_A_ROUTER}
- OPTION_NON_LOCAL_SOURCE_ROUTING = 20;
- {$EXTERNALSYM OPTION_NON_LOCAL_SOURCE_ROUTING}
- OPTION_POLICY_FILTER_FOR_NLSR = 21;
- {$EXTERNALSYM OPTION_POLICY_FILTER_FOR_NLSR}
- OPTION_MAX_REASSEMBLY_SIZE = 22;
- {$EXTERNALSYM OPTION_MAX_REASSEMBLY_SIZE}
- OPTION_DEFAULT_TTL = 23;
- {$EXTERNALSYM OPTION_DEFAULT_TTL}
- OPTION_PMTU_AGING_TIMEOUT = 24;
- {$EXTERNALSYM OPTION_PMTU_AGING_TIMEOUT}
- OPTION_PMTU_PLATEAU_TABLE = 25;
- {$EXTERNALSYM OPTION_PMTU_PLATEAU_TABLE}
-
-//
-// Link layer parameters - per interface.
-//
-
- OPTION_MTU = 26;
- {$EXTERNALSYM OPTION_MTU}
- OPTION_ALL_SUBNETS_MTU = 27;
- {$EXTERNALSYM OPTION_ALL_SUBNETS_MTU}
- OPTION_BROADCAST_ADDRESS = 28;
- {$EXTERNALSYM OPTION_BROADCAST_ADDRESS}
- OPTION_PERFORM_MASK_DISCOVERY = 29;
- {$EXTERNALSYM OPTION_PERFORM_MASK_DISCOVERY}
- OPTION_BE_A_MASK_SUPPLIER = 30;
- {$EXTERNALSYM OPTION_BE_A_MASK_SUPPLIER}
- OPTION_PERFORM_ROUTER_DISCOVERY = 31;
- {$EXTERNALSYM OPTION_PERFORM_ROUTER_DISCOVERY}
- OPTION_ROUTER_SOLICITATION_ADDR = 32;
- {$EXTERNALSYM OPTION_ROUTER_SOLICITATION_ADDR}
- OPTION_STATIC_ROUTES = 33;
- {$EXTERNALSYM OPTION_STATIC_ROUTES}
- OPTION_TRAILERS = 34;
- {$EXTERNALSYM OPTION_TRAILERS}
- OPTION_ARP_CACHE_TIMEOUT = 35;
- {$EXTERNALSYM OPTION_ARP_CACHE_TIMEOUT}
- OPTION_ETHERNET_ENCAPSULATION = 36;
- {$EXTERNALSYM OPTION_ETHERNET_ENCAPSULATION}
-
-//
-// TCP Paramters - per host
-//
-
- OPTION_TTL = 37;
- {$EXTERNALSYM OPTION_TTL}
- OPTION_KEEP_ALIVE_INTERVAL = 38;
- {$EXTERNALSYM OPTION_KEEP_ALIVE_INTERVAL}
- OPTION_KEEP_ALIVE_DATA_SIZE = 39;
- {$EXTERNALSYM OPTION_KEEP_ALIVE_DATA_SIZE}
-
-//
-// Application Layer Parameters
-//
-
- OPTION_NETWORK_INFO_SERVICE_DOM = 40;
- {$EXTERNALSYM OPTION_NETWORK_INFO_SERVICE_DOM}
- OPTION_NETWORK_INFO_SERVERS = 41;
- {$EXTERNALSYM OPTION_NETWORK_INFO_SERVERS}
- OPTION_NETWORK_TIME_SERVERS = 42;
- {$EXTERNALSYM OPTION_NETWORK_TIME_SERVERS}
-
-//
-// Vender specific information option
-//
-
- OPTION_VENDOR_SPEC_INFO = 43;
- {$EXTERNALSYM OPTION_VENDOR_SPEC_INFO}
-
-//
-// NetBIOS over TCP/IP Name server option
-//
-
- OPTION_NETBIOS_NAME_SERVER = 44;
- {$EXTERNALSYM OPTION_NETBIOS_NAME_SERVER}
- OPTION_NETBIOS_DATAGRAM_SERVER = 45;
- {$EXTERNALSYM OPTION_NETBIOS_DATAGRAM_SERVER}
- OPTION_NETBIOS_NODE_TYPE = 46;
- {$EXTERNALSYM OPTION_NETBIOS_NODE_TYPE}
- OPTION_NETBIOS_SCOPE_OPTION = 47;
- {$EXTERNALSYM OPTION_NETBIOS_SCOPE_OPTION}
-
-//
-// X Window System Options.
-//
-
- OPTION_XWINDOW_FONT_SERVER = 48;
- {$EXTERNALSYM OPTION_XWINDOW_FONT_SERVER}
- OPTION_XWINDOW_DISPLAY_MANAGER = 49;
- {$EXTERNALSYM OPTION_XWINDOW_DISPLAY_MANAGER}
-
-//
-// Other extensions
-//
-
- OPTION_REQUESTED_ADDRESS = 50;
- {$EXTERNALSYM OPTION_REQUESTED_ADDRESS}
- OPTION_LEASE_TIME = 51;
- {$EXTERNALSYM OPTION_LEASE_TIME}
- OPTION_OK_TO_OVERLAY = 52;
- {$EXTERNALSYM OPTION_OK_TO_OVERLAY}
- OPTION_MESSAGE_TYPE = 53;
- {$EXTERNALSYM OPTION_MESSAGE_TYPE}
- OPTION_SERVER_IDENTIFIER = 54;
- {$EXTERNALSYM OPTION_SERVER_IDENTIFIER}
- OPTION_PARAMETER_REQUEST_LIST = 55;
- {$EXTERNALSYM OPTION_PARAMETER_REQUEST_LIST}
- OPTION_MESSAGE = 56;
- {$EXTERNALSYM OPTION_MESSAGE}
- OPTION_MESSAGE_LENGTH = 57;
- {$EXTERNALSYM OPTION_MESSAGE_LENGTH}
- OPTION_RENEWAL_TIME = 58; // T1
- {$EXTERNALSYM OPTION_RENEWAL_TIME}
- OPTION_REBIND_TIME = 59; // T2
- {$EXTERNALSYM OPTION_REBIND_TIME}
- OPTION_CLIENT_CLASS_INFO = 60;
- {$EXTERNALSYM OPTION_CLIENT_CLASS_INFO}
- OPTION_CLIENT_ID = 61;
- {$EXTERNALSYM OPTION_CLIENT_ID}
-
- OPTION_TFTP_SERVER_NAME = 66;
- {$EXTERNALSYM OPTION_TFTP_SERVER_NAME}
- OPTION_BOOTFILE_NAME = 67;
- {$EXTERNALSYM OPTION_BOOTFILE_NAME}
-
- OPTION_END = 255;
- {$EXTERNALSYM OPTION_END}
-
-type
- _DHCPAPI_PARAMS = record
- Flags: ULONG; // for future use
- OptionId: ULONG; // what option is this?
- IsVendor: BOOL; // is this vendor specific?
- Data: LPBYTE; // the actual data
- nBytesData: DWORD; // how many bytes of data are there in Data?
- end;
- {$EXTERNALSYM _DHCPAPI_PARAMS}
- DHCPAPI_PARAMS = _DHCPAPI_PARAMS;
- {$EXTERNALSYM DHCPAPI_PARAMS}
- LPDHCPAPI_PARAMS = ^DHCPAPI_PARAMS;
- {$EXTERNALSYM LPDHCPAPI_PARAMS}
- PDHCPAPI_PARAMS = ^DHCPAPI_PARAMS;
- {$EXTERNALSYM PDHCPAPI_PARAMS}
- TDhcpApiParams = DHCPAPI_PARAMS;
- PDhcpApiParams = PDHCPAPI_PARAMS;
-
- DHCPCAPI_PARAMS = DHCPAPI_PARAMS;
- {$EXTERNALSYM DHCPCAPI_PARAMS}
- PDHCPCAPI_PARAMS = ^DHCPCAPI_PARAMS;
- {$EXTERNALSYM PDHCPCAPI_PARAMS}
- LPDHCPCAPI_PARAMS = ^DHCPCAPI_PARAMS;
- {$EXTERNALSYM LPDHCPCAPI_PARAMS}
- TDhcpCApiParams = DHCPCAPI_PARAMS;
- PDhcpCApiParams = PDHCPCAPI_PARAMS;
-
- _DHCPCAPI_PARAMS_ARRAY = record
- nParams: ULONG; // size of array
- Params: PDHCPCAPI_PARAMS; // actual array
- end;
- {$EXTERNALSYM _DHCPCAPI_PARAMS_ARRAY}
- DHCPCAPI_PARAMS_ARRAY = _DHCPCAPI_PARAMS_ARRAY;
- {$EXTERNALSYM DHCPCAPI_PARAMS_ARRAY}
- LPDHCPCAPI_PARAMS_ARRAY = ^DHCPCAPI_PARAMS_ARRAY;
- {$EXTERNALSYM LPDHCPCAPI_PARAMS_ARRAY}
- PDHCPCAPI_PARAMS_ARRAY = ^DHCPCAPI_PARAMS_ARRAY;
- {$EXTERNALSYM PDHCPCAPI_PARAMS_ARRAY}
- TDhcpcApiParamsArray = DHCPCAPI_PARAMS_ARRAY;
- PDhcpcApiParamsArray = PDHCPCAPI_PARAMS_ARRAY;
-
- _DHCPCAPI_CLASSID = record
- Flags: ULONG; // must be zero currently.
- Data: LPBYTE; // classid binary data.
- nBytesData: ULONG; // how many bytes of data are there?
- end;
- {$EXTERNALSYM _DHCPCAPI_CLASSID}
- DHCPCAPI_CLASSID = _DHCPCAPI_CLASSID;
- {$EXTERNALSYM DHCPCAPI_CLASSID}
- LPDHCPCAPI_CLASSID = ^DHCPCAPI_CLASSID;
- {$EXTERNALSYM LPDHCPCAPI_CLASSID}
- PDHCPCAPI_CLASSID = ^DHCPCAPI_CLASSID;
- {$EXTERNALSYM PDHCPCAPI_CLASSID}
- TDhcpcApiClassId = DHCPCAPI_CLASSID;
- PDhcpcApiClassId = PDHCPCAPI_CLASSID;
-
-const
- DHCPCAPI_REQUEST_PERSISTENT = $01; // request this options "permanently"
- {$EXTERNALSYM DHCPCAPI_REQUEST_PERSISTENT}
- DHCPCAPI_REQUEST_SYNCHRONOUS = $02; // request and block on it
- {$EXTERNALSYM DHCPCAPI_REQUEST_SYNCHRONOUS}
- DHCPCAPI_REQUEST_ASYNCHRONOUS = $04; // request and return, set event on completion
- {$EXTERNALSYM DHCPCAPI_REQUEST_ASYNCHRONOUS}
- DHCPCAPI_REQUEST_CANCEL = $08; // cancel request
- {$EXTERNALSYM DHCPCAPI_REQUEST_CANCEL}
- DHCPCAPI_REQUEST_MASK = $0F; // allowed flags..
- {$EXTERNALSYM DHCPCAPI_REQUEST_MASK}
-
-function DhcpCApiInitialize(var Version: DWORD): DWORD; stdcall;
-{$EXTERNALSYM DhcpCApiInitialize}
-
-procedure DhcpCApiCleanup; stdcall;
-{$EXTERNALSYM DhcpCApiCleanup}
-
-function DhcpRequestParams(Flags: DWORD; Reserved: LPVOID; AdapterName: LPWSTR;
- ClassId: PDHCPCAPI_CLASSID; SendParams, RecdParams: DHCPCAPI_PARAMS_ARRAY;
- Buffer: LPBYTE; pSize: LPDWORD; RequestIdStr: LPWSTR): DWORD; stdcall;
-{$EXTERNALSYM DhcpRequestParams}
-
-function DhcpUndoRequestParams(Flags: DWORD; Reserved: LPVOID; AdapterName: LPWSTR;
- RequestIdStr: LPWSTR): DWORD; stdcall;
-{$EXTERNALSYM DhcpUndoRequestParams}
-
-const
- DHCPCAPI_REGISTER_HANDLE_EVENT = $01; // handle returned is to an event
- {$EXTERNALSYM DHCPCAPI_REGISTER_HANDLE_EVENT}
-
-function DhcpRegisterParamChange(Flags: DWORD; Reserved: LPVOID; AdapterName: LPWSTR;
- ClassId: PDHCPCAPI_CLASSID; Params: DHCPCAPI_PARAMS_ARRAY; Handle: LPVOID): DWORD; stdcall;
-{$EXTERNALSYM DhcpRegisterParamChange}
-
-const
- DHCPCAPI_DEREGISTER_HANDLE_EVENT = $01; // de-register handle that is an event
- {$EXTERNALSYM DHCPCAPI_DEREGISTER_HANDLE_EVENT}
-
-function DhcpDeRegisterParamChange(Flags: DWORD; Reserved, Event: LPVOID): DWORD; stdcall;
-{$EXTERNALSYM DhcpDeRegisterParamChange}
-
-function DhcpRemoveDNSRegistrations: DWORD; stdcall;
-{$EXTERNALSYM DhcpRemoveDNSRegistrations}
-
-implementation
-
-const
- dhcpapi = 'dhcpcsvc.dll';
-
-{$IFDEF DYNAMIC_LINK}
-
-var
- _DhcpCApiInitialize: Pointer;
-
-function DhcpCApiInitialize;
-begin
- GetProcedureAddress(_DhcpCApiInitialize, dhcpapi, 'DhcpCApiInitialize');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DhcpCApiInitialize]
- end;
-end;
-
-var
- _DhcpCApiCleanup: Pointer;
-
-procedure DhcpCApiCleanup;
-begin
- GetProcedureAddress(_DhcpCApiCleanup, dhcpapi, 'DhcpCApiCleanup');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DhcpCApiCleanup]
- end;
-end;
-
-var
- _DhcpRequestParams: Pointer;
-
-function DhcpRequestParams;
-begin
- GetProcedureAddress(_DhcpRequestParams, dhcpapi, 'DhcpRequestParams');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DhcpRequestParams]
- end;
-end;
-
-var
- _DhcpUndoRequestParams: Pointer;
-
-function DhcpUndoRequestParams;
-begin
- GetProcedureAddress(_DhcpUndoRequestParams, dhcpapi, 'DhcpUndoRequestParams');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DhcpUndoRequestParams]
- end;
-end;
-
-var
- _DhcpRegisterParamChange: Pointer;
-
-function DhcpRegisterParamChange;
-begin
- GetProcedureAddress(_DhcpRegisterParamChange, dhcpapi, 'DhcpRegisterParamChange');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DhcpRegisterParamChange]
- end;
-end;
-
-var
- _DhcpDeRegisterParamChange: Pointer;
-
-function DhcpDeRegisterParamChange;
-begin
- GetProcedureAddress(_DhcpDeRegisterParamChange, dhcpapi, 'DhcpDeRegisterParamChange');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DhcpDeRegisterParamChange]
- end;
-end;
-
-var
- _DhcpRemoveDNSRegistrations: Pointer;
-
-function DhcpRemoveDNSRegistrations;
-begin
- GetProcedureAddress(_DhcpRemoveDNSRegistrations, dhcpapi, 'DhcpRemoveDNSRegistrations');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DhcpRemoveDNSRegistrations]
- end;
-end;
-
-{$ELSE}
-
-function DhcpCApiInitialize; external dhcpapi name 'DhcpCApiInitialize';
-procedure DhcpCApiCleanup; external dhcpapi name 'DhcpCApiCleanup';
-function DhcpRequestParams; external dhcpapi name 'DhcpRequestParams';
-function DhcpUndoRequestParams; external dhcpapi name 'DhcpUndoRequestParams';
-function DhcpRegisterParamChange; external dhcpapi name 'DhcpRegisterParamChange';
-function DhcpDeRegisterParamChange; external dhcpapi name 'DhcpDeRegisterParamChange';
-function DhcpRemoveDNSRegistrations; external dhcpapi name 'DhcpRemoveDNSRegistrations';
-
-{$ENDIF DYNAMIC_LINK}
-
-end.
+{******************************************************************************}
+{ }
+{ DHCP Client API interface unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: dhcpcsdk.h, released June 2000. The original Pascal }
+{ code is: DhcpCSdk.pas, released December 2000. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwadhcpcsdk.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaDhcpCSdk;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "dhcpcsdk.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaWinType;
+
+//
+// DHCP Standard Options.
+//
+
+const
+ OPTION_PAD = 0;
+ {$EXTERNALSYM OPTION_PAD}
+ OPTION_SUBNET_MASK = 1;
+ {$EXTERNALSYM OPTION_SUBNET_MASK}
+ OPTION_TIME_OFFSET = 2;
+ {$EXTERNALSYM OPTION_TIME_OFFSET}
+ OPTION_ROUTER_ADDRESS = 3;
+ {$EXTERNALSYM OPTION_ROUTER_ADDRESS}
+ OPTION_TIME_SERVERS = 4;
+ {$EXTERNALSYM OPTION_TIME_SERVERS}
+ OPTION_IEN116_NAME_SERVERS = 5;
+ {$EXTERNALSYM OPTION_IEN116_NAME_SERVERS}
+ OPTION_DOMAIN_NAME_SERVERS = 6;
+ {$EXTERNALSYM OPTION_DOMAIN_NAME_SERVERS}
+ OPTION_LOG_SERVERS = 7;
+ {$EXTERNALSYM OPTION_LOG_SERVERS}
+ OPTION_COOKIE_SERVERS = 8;
+ {$EXTERNALSYM OPTION_COOKIE_SERVERS}
+ OPTION_LPR_SERVERS = 9;
+ {$EXTERNALSYM OPTION_LPR_SERVERS}
+ OPTION_IMPRESS_SERVERS = 10;
+ {$EXTERNALSYM OPTION_IMPRESS_SERVERS}
+ OPTION_RLP_SERVERS = 11;
+ {$EXTERNALSYM OPTION_RLP_SERVERS}
+ OPTION_HOST_NAME = 12;
+ {$EXTERNALSYM OPTION_HOST_NAME}
+ OPTION_BOOT_FILE_SIZE = 13;
+ {$EXTERNALSYM OPTION_BOOT_FILE_SIZE}
+ OPTION_MERIT_DUMP_FILE = 14;
+ {$EXTERNALSYM OPTION_MERIT_DUMP_FILE}
+ OPTION_DOMAIN_NAME = 15;
+ {$EXTERNALSYM OPTION_DOMAIN_NAME}
+ OPTION_SWAP_SERVER = 16;
+ {$EXTERNALSYM OPTION_SWAP_SERVER}
+ OPTION_ROOT_DISK = 17;
+ {$EXTERNALSYM OPTION_ROOT_DISK}
+ OPTION_EXTENSIONS_PATH = 18;
+ {$EXTERNALSYM OPTION_EXTENSIONS_PATH}
+
+//
+// IP layer parameters - per host
+//
+
+ OPTION_BE_A_ROUTER = 19;
+ {$EXTERNALSYM OPTION_BE_A_ROUTER}
+ OPTION_NON_LOCAL_SOURCE_ROUTING = 20;
+ {$EXTERNALSYM OPTION_NON_LOCAL_SOURCE_ROUTING}
+ OPTION_POLICY_FILTER_FOR_NLSR = 21;
+ {$EXTERNALSYM OPTION_POLICY_FILTER_FOR_NLSR}
+ OPTION_MAX_REASSEMBLY_SIZE = 22;
+ {$EXTERNALSYM OPTION_MAX_REASSEMBLY_SIZE}
+ OPTION_DEFAULT_TTL = 23;
+ {$EXTERNALSYM OPTION_DEFAULT_TTL}
+ OPTION_PMTU_AGING_TIMEOUT = 24;
+ {$EXTERNALSYM OPTION_PMTU_AGING_TIMEOUT}
+ OPTION_PMTU_PLATEAU_TABLE = 25;
+ {$EXTERNALSYM OPTION_PMTU_PLATEAU_TABLE}
+
+//
+// Link layer parameters - per interface.
+//
+
+ OPTION_MTU = 26;
+ {$EXTERNALSYM OPTION_MTU}
+ OPTION_ALL_SUBNETS_MTU = 27;
+ {$EXTERNALSYM OPTION_ALL_SUBNETS_MTU}
+ OPTION_BROADCAST_ADDRESS = 28;
+ {$EXTERNALSYM OPTION_BROADCAST_ADDRESS}
+ OPTION_PERFORM_MASK_DISCOVERY = 29;
+ {$EXTERNALSYM OPTION_PERFORM_MASK_DISCOVERY}
+ OPTION_BE_A_MASK_SUPPLIER = 30;
+ {$EXTERNALSYM OPTION_BE_A_MASK_SUPPLIER}
+ OPTION_PERFORM_ROUTER_DISCOVERY = 31;
+ {$EXTERNALSYM OPTION_PERFORM_ROUTER_DISCOVERY}
+ OPTION_ROUTER_SOLICITATION_ADDR = 32;
+ {$EXTERNALSYM OPTION_ROUTER_SOLICITATION_ADDR}
+ OPTION_STATIC_ROUTES = 33;
+ {$EXTERNALSYM OPTION_STATIC_ROUTES}
+ OPTION_TRAILERS = 34;
+ {$EXTERNALSYM OPTION_TRAILERS}
+ OPTION_ARP_CACHE_TIMEOUT = 35;
+ {$EXTERNALSYM OPTION_ARP_CACHE_TIMEOUT}
+ OPTION_ETHERNET_ENCAPSULATION = 36;
+ {$EXTERNALSYM OPTION_ETHERNET_ENCAPSULATION}
+
+//
+// TCP Paramters - per host
+//
+
+ OPTION_TTL = 37;
+ {$EXTERNALSYM OPTION_TTL}
+ OPTION_KEEP_ALIVE_INTERVAL = 38;
+ {$EXTERNALSYM OPTION_KEEP_ALIVE_INTERVAL}
+ OPTION_KEEP_ALIVE_DATA_SIZE = 39;
+ {$EXTERNALSYM OPTION_KEEP_ALIVE_DATA_SIZE}
+
+//
+// Application Layer Parameters
+//
+
+ OPTION_NETWORK_INFO_SERVICE_DOM = 40;
+ {$EXTERNALSYM OPTION_NETWORK_INFO_SERVICE_DOM}
+ OPTION_NETWORK_INFO_SERVERS = 41;
+ {$EXTERNALSYM OPTION_NETWORK_INFO_SERVERS}
+ OPTION_NETWORK_TIME_SERVERS = 42;
+ {$EXTERNALSYM OPTION_NETWORK_TIME_SERVERS}
+
+//
+// Vender specific information option
+//
+
+ OPTION_VENDOR_SPEC_INFO = 43;
+ {$EXTERNALSYM OPTION_VENDOR_SPEC_INFO}
+
+//
+// NetBIOS over TCP/IP Name server option
+//
+
+ OPTION_NETBIOS_NAME_SERVER = 44;
+ {$EXTERNALSYM OPTION_NETBIOS_NAME_SERVER}
+ OPTION_NETBIOS_DATAGRAM_SERVER = 45;
+ {$EXTERNALSYM OPTION_NETBIOS_DATAGRAM_SERVER}
+ OPTION_NETBIOS_NODE_TYPE = 46;
+ {$EXTERNALSYM OPTION_NETBIOS_NODE_TYPE}
+ OPTION_NETBIOS_SCOPE_OPTION = 47;
+ {$EXTERNALSYM OPTION_NETBIOS_SCOPE_OPTION}
+
+//
+// X Window System Options.
+//
+
+ OPTION_XWINDOW_FONT_SERVER = 48;
+ {$EXTERNALSYM OPTION_XWINDOW_FONT_SERVER}
+ OPTION_XWINDOW_DISPLAY_MANAGER = 49;
+ {$EXTERNALSYM OPTION_XWINDOW_DISPLAY_MANAGER}
+
+//
+// Other extensions
+//
+
+ OPTION_REQUESTED_ADDRESS = 50;
+ {$EXTERNALSYM OPTION_REQUESTED_ADDRESS}
+ OPTION_LEASE_TIME = 51;
+ {$EXTERNALSYM OPTION_LEASE_TIME}
+ OPTION_OK_TO_OVERLAY = 52;
+ {$EXTERNALSYM OPTION_OK_TO_OVERLAY}
+ OPTION_MESSAGE_TYPE = 53;
+ {$EXTERNALSYM OPTION_MESSAGE_TYPE}
+ OPTION_SERVER_IDENTIFIER = 54;
+ {$EXTERNALSYM OPTION_SERVER_IDENTIFIER}
+ OPTION_PARAMETER_REQUEST_LIST = 55;
+ {$EXTERNALSYM OPTION_PARAMETER_REQUEST_LIST}
+ OPTION_MESSAGE = 56;
+ {$EXTERNALSYM OPTION_MESSAGE}
+ OPTION_MESSAGE_LENGTH = 57;
+ {$EXTERNALSYM OPTION_MESSAGE_LENGTH}
+ OPTION_RENEWAL_TIME = 58; // T1
+ {$EXTERNALSYM OPTION_RENEWAL_TIME}
+ OPTION_REBIND_TIME = 59; // T2
+ {$EXTERNALSYM OPTION_REBIND_TIME}
+ OPTION_CLIENT_CLASS_INFO = 60;
+ {$EXTERNALSYM OPTION_CLIENT_CLASS_INFO}
+ OPTION_CLIENT_ID = 61;
+ {$EXTERNALSYM OPTION_CLIENT_ID}
+
+ OPTION_TFTP_SERVER_NAME = 66;
+ {$EXTERNALSYM OPTION_TFTP_SERVER_NAME}
+ OPTION_BOOTFILE_NAME = 67;
+ {$EXTERNALSYM OPTION_BOOTFILE_NAME}
+
+ OPTION_END = 255;
+ {$EXTERNALSYM OPTION_END}
+
+type
+ _DHCPAPI_PARAMS = record
+ Flags: ULONG; // for future use
+ OptionId: ULONG; // what option is this?
+ IsVendor: BOOL; // is this vendor specific?
+ Data: LPBYTE; // the actual data
+ nBytesData: DWORD; // how many bytes of data are there in Data?
+ end;
+ {$EXTERNALSYM _DHCPAPI_PARAMS}
+ DHCPAPI_PARAMS = _DHCPAPI_PARAMS;
+ {$EXTERNALSYM DHCPAPI_PARAMS}
+ LPDHCPAPI_PARAMS = ^DHCPAPI_PARAMS;
+ {$EXTERNALSYM LPDHCPAPI_PARAMS}
+ PDHCPAPI_PARAMS = ^DHCPAPI_PARAMS;
+ {$EXTERNALSYM PDHCPAPI_PARAMS}
+ TDhcpApiParams = DHCPAPI_PARAMS;
+ PDhcpApiParams = PDHCPAPI_PARAMS;
+
+ DHCPCAPI_PARAMS = DHCPAPI_PARAMS;
+ {$EXTERNALSYM DHCPCAPI_PARAMS}
+ PDHCPCAPI_PARAMS = ^DHCPCAPI_PARAMS;
+ {$EXTERNALSYM PDHCPCAPI_PARAMS}
+ LPDHCPCAPI_PARAMS = ^DHCPCAPI_PARAMS;
+ {$EXTERNALSYM LPDHCPCAPI_PARAMS}
+ TDhcpCApiParams = DHCPCAPI_PARAMS;
+ PDhcpCApiParams = PDHCPCAPI_PARAMS;
+
+ _DHCPCAPI_PARAMS_ARRAY = record
+ nParams: ULONG; // size of array
+ Params: PDHCPCAPI_PARAMS; // actual array
+ end;
+ {$EXTERNALSYM _DHCPCAPI_PARAMS_ARRAY}
+ DHCPCAPI_PARAMS_ARRAY = _DHCPCAPI_PARAMS_ARRAY;
+ {$EXTERNALSYM DHCPCAPI_PARAMS_ARRAY}
+ LPDHCPCAPI_PARAMS_ARRAY = ^DHCPCAPI_PARAMS_ARRAY;
+ {$EXTERNALSYM LPDHCPCAPI_PARAMS_ARRAY}
+ PDHCPCAPI_PARAMS_ARRAY = ^DHCPCAPI_PARAMS_ARRAY;
+ {$EXTERNALSYM PDHCPCAPI_PARAMS_ARRAY}
+ TDhcpcApiParamsArray = DHCPCAPI_PARAMS_ARRAY;
+ PDhcpcApiParamsArray = PDHCPCAPI_PARAMS_ARRAY;
+
+ _DHCPCAPI_CLASSID = record
+ Flags: ULONG; // must be zero currently.
+ Data: LPBYTE; // classid binary data.
+ nBytesData: ULONG; // how many bytes of data are there?
+ end;
+ {$EXTERNALSYM _DHCPCAPI_CLASSID}
+ DHCPCAPI_CLASSID = _DHCPCAPI_CLASSID;
+ {$EXTERNALSYM DHCPCAPI_CLASSID}
+ LPDHCPCAPI_CLASSID = ^DHCPCAPI_CLASSID;
+ {$EXTERNALSYM LPDHCPCAPI_CLASSID}
+ PDHCPCAPI_CLASSID = ^DHCPCAPI_CLASSID;
+ {$EXTERNALSYM PDHCPCAPI_CLASSID}
+ TDhcpcApiClassId = DHCPCAPI_CLASSID;
+ PDhcpcApiClassId = PDHCPCAPI_CLASSID;
+
+const
+ DHCPCAPI_REQUEST_PERSISTENT = $01; // request this options "permanently"
+ {$EXTERNALSYM DHCPCAPI_REQUEST_PERSISTENT}
+ DHCPCAPI_REQUEST_SYNCHRONOUS = $02; // request and block on it
+ {$EXTERNALSYM DHCPCAPI_REQUEST_SYNCHRONOUS}
+ DHCPCAPI_REQUEST_ASYNCHRONOUS = $04; // request and return, set event on completion
+ {$EXTERNALSYM DHCPCAPI_REQUEST_ASYNCHRONOUS}
+ DHCPCAPI_REQUEST_CANCEL = $08; // cancel request
+ {$EXTERNALSYM DHCPCAPI_REQUEST_CANCEL}
+ DHCPCAPI_REQUEST_MASK = $0F; // allowed flags..
+ {$EXTERNALSYM DHCPCAPI_REQUEST_MASK}
+
+function DhcpCApiInitialize(var Version: DWORD): DWORD; stdcall;
+{$EXTERNALSYM DhcpCApiInitialize}
+
+procedure DhcpCApiCleanup; stdcall;
+{$EXTERNALSYM DhcpCApiCleanup}
+
+function DhcpRequestParams(Flags: DWORD; Reserved: LPVOID; AdapterName: LPWSTR;
+ ClassId: PDHCPCAPI_CLASSID; SendParams, RecdParams: DHCPCAPI_PARAMS_ARRAY;
+ Buffer: LPBYTE; pSize: LPDWORD; RequestIdStr: LPWSTR): DWORD; stdcall;
+{$EXTERNALSYM DhcpRequestParams}
+
+function DhcpUndoRequestParams(Flags: DWORD; Reserved: LPVOID; AdapterName: LPWSTR;
+ RequestIdStr: LPWSTR): DWORD; stdcall;
+{$EXTERNALSYM DhcpUndoRequestParams}
+
+const
+ DHCPCAPI_REGISTER_HANDLE_EVENT = $01; // handle returned is to an event
+ {$EXTERNALSYM DHCPCAPI_REGISTER_HANDLE_EVENT}
+
+function DhcpRegisterParamChange(Flags: DWORD; Reserved: LPVOID; AdapterName: LPWSTR;
+ ClassId: PDHCPCAPI_CLASSID; Params: DHCPCAPI_PARAMS_ARRAY; Handle: LPVOID): DWORD; stdcall;
+{$EXTERNALSYM DhcpRegisterParamChange}
+
+const
+ DHCPCAPI_DEREGISTER_HANDLE_EVENT = $01; // de-register handle that is an event
+ {$EXTERNALSYM DHCPCAPI_DEREGISTER_HANDLE_EVENT}
+
+function DhcpDeRegisterParamChange(Flags: DWORD; Reserved, Event: LPVOID): DWORD; stdcall;
+{$EXTERNALSYM DhcpDeRegisterParamChange}
+
+function DhcpRemoveDNSRegistrations: DWORD; stdcall;
+{$EXTERNALSYM DhcpRemoveDNSRegistrations}
+
+implementation
+
+const
+ dhcpapi = 'dhcpcsvc.dll';
+
+{$IFDEF DYNAMIC_LINK}
+
+var
+ _DhcpCApiInitialize: Pointer;
+
+function DhcpCApiInitialize;
+begin
+ GetProcedureAddress(_DhcpCApiInitialize, dhcpapi, 'DhcpCApiInitialize');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DhcpCApiInitialize]
+ end;
+end;
+
+var
+ _DhcpCApiCleanup: Pointer;
+
+procedure DhcpCApiCleanup;
+begin
+ GetProcedureAddress(_DhcpCApiCleanup, dhcpapi, 'DhcpCApiCleanup');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DhcpCApiCleanup]
+ end;
+end;
+
+var
+ _DhcpRequestParams: Pointer;
+
+function DhcpRequestParams;
+begin
+ GetProcedureAddress(_DhcpRequestParams, dhcpapi, 'DhcpRequestParams');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DhcpRequestParams]
+ end;
+end;
+
+var
+ _DhcpUndoRequestParams: Pointer;
+
+function DhcpUndoRequestParams;
+begin
+ GetProcedureAddress(_DhcpUndoRequestParams, dhcpapi, 'DhcpUndoRequestParams');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DhcpUndoRequestParams]
+ end;
+end;
+
+var
+ _DhcpRegisterParamChange: Pointer;
+
+function DhcpRegisterParamChange;
+begin
+ GetProcedureAddress(_DhcpRegisterParamChange, dhcpapi, 'DhcpRegisterParamChange');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DhcpRegisterParamChange]
+ end;
+end;
+
+var
+ _DhcpDeRegisterParamChange: Pointer;
+
+function DhcpDeRegisterParamChange;
+begin
+ GetProcedureAddress(_DhcpDeRegisterParamChange, dhcpapi, 'DhcpDeRegisterParamChange');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DhcpDeRegisterParamChange]
+ end;
+end;
+
+var
+ _DhcpRemoveDNSRegistrations: Pointer;
+
+function DhcpRemoveDNSRegistrations;
+begin
+ GetProcedureAddress(_DhcpRemoveDNSRegistrations, dhcpapi, 'DhcpRemoveDNSRegistrations');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DhcpRemoveDNSRegistrations]
+ end;
+end;
+
+{$ELSE}
+
+function DhcpCApiInitialize; external dhcpapi name 'DhcpCApiInitialize';
+procedure DhcpCApiCleanup; external dhcpapi name 'DhcpCApiCleanup';
+function DhcpRequestParams; external dhcpapi name 'DhcpRequestParams';
+function DhcpUndoRequestParams; external dhcpapi name 'DhcpUndoRequestParams';
+function DhcpRegisterParamChange; external dhcpapi name 'DhcpRegisterParamChange';
+function DhcpDeRegisterParamChange; external dhcpapi name 'DhcpDeRegisterParamChange';
+function DhcpRemoveDNSRegistrations; external dhcpapi name 'DhcpRemoveDNSRegistrations';
+
+{$ENDIF DYNAMIC_LINK}
+
+end.
diff --git a/packages/extra/winunits/jwadhcpsapi.pas b/packages/extra/winunits/jwadhcpsapi.pas
index b1635b1da2..47f59e91b0 100644
--- a/packages/extra/winunits/jwadhcpsapi.pas
+++ b/packages/extra/winunits/jwadhcpsapi.pas
@@ -1,623 +1,623 @@
-{******************************************************************************}
-{ }
-{ DHCP Server Management API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: dhcpsapi.h, released Feb 2003. The original Pascal }
-{ code is: DhcpsApi.pas, released December 2003. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwadhcpsapi.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaDhcpsApi;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "dhcpsapi.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaWinType;
-
-type
- DHCP_IP_ADDRESS = DWORD;
- {$EXTERNALSYM DHCP_IP_ADDRESS}
- PDHCP_IP_ADDRESS = ^DHCP_IP_ADDRESS;
- {$EXTERNALSYM PDHCP_IP_ADDRESS}
- LPDHCP_IP_ADDRESS = ^DHCP_IP_ADDRESS;
- {$EXTERNALSYM LPDHCP_IP_ADDRESS}
- TDhcpIpAddress = DHCP_IP_ADDRESS;
- PDhcpIpAddress = ^DHCP_IP_ADDRESS;
-
- DHCP_IP_MASK = DWORD;
- {$EXTERNALSYM DHCP_IP_MASK}
- TDhcpIpMask = DHCP_IP_MASK;
- DHCP_RESUME_HANDLE = DWORD;
- {$EXTERNALSYM DHCP_RESUME_HANDLE}
- TDhcpResumeHandle = DHCP_RESUME_HANDLE;
-
- DHCP_OPTION_ID = DWORD;
- {$EXTERNALSYM DHCP_OPTION_ID}
- TDhcpOptionID = DHCP_OPTION_ID;
-
- _DATE_TIME = record
- dwLowDateTime: DWORD;
- dwHighDateTime: DWORD;
- end;
- {$EXTERNALSYM _DATE_TIME}
- DATE_TIME = _DATE_TIME;
- {$EXTERNALSYM DATE_TIME}
- LPDATE_TIME = ^DATE_TIME;
- {$EXTERNALSYM LPDATE_TIME}
- TDateTime = DATE_TIME;
- PDateTime = ^DATE_TIME;
-
- _DWORD_DWORD = record
- DWord1: DWORD;
- DWord2: DWORD;
- end;
- {$EXTERNALSYM _DWORD_DWORD}
- DWORD_DWORD = _DWORD_DWORD;
- {$EXTERNALSYM DWORD_DWORD}
- LPDWORD_DWORD = ^DWORD_DWORD;
- {$EXTERNALSYM LPDWORD_DWORD}
- TDwordDword = DWORD_DWORD;
- PDwordDword = ^DWORD_DWORD;
-
- _DHCP_BINARY_DATA = record
- DataLength: DWORD;
- Data: LPBYTE;
- end;
- {$EXTERNALSYM _DHCP_BINARY_DATA}
- DHCP_BINARY_DATA = _DHCP_BINARY_DATA;
- {$EXTERNALSYM DHCP_BINARY_DATA}
- LPDHCP_BINARY_DATA = ^DHCP_BINARY_DATA;
- {$EXTERNALSYM LPDHCP_BINARY_DATA}
- TDhcpBinaryData = DHCP_BINARY_DATA;
- PDhcpBinaryData = ^DHCP_BINARY_DATA;
-
- DHCP_CLIENT_UID = DHCP_BINARY_DATA;
- {$EXTERNALSYM DHCP_CLIENT_UID}
- TDhcpClientUid = DHCP_CLIENT_UID;
-
-const
- DHCP_ENDPOINT_FLAG_CANT_MODIFY = $01;
- {$EXTERNALSYM DHCP_ENDPOINT_FLAG_CANT_MODIFY}
-
-type
- _DHCP_BIND_ELEMENT = record
- Flags: ULONG;
- fBoundToDHCPServer: BOOL;
- AdapterPrimaryAddress: DHCP_IP_ADDRESS;
- AdapterSubnetAddress: DHCP_IP_ADDRESS;
- IfDescription: LPWSTR;
- IfIdSize: ULONG;
- IfId: LPBYTE;
- end;
- {$EXTERNALSYM _DHCP_BIND_ELEMENT}
- DHCP_BIND_ELEMENT = _DHCP_BIND_ELEMENT;
- {$EXTERNALSYM DHCP_BIND_ELEMENT}
- LPDHCP_BIND_ELEMENT = ^DHCP_BIND_ELEMENT;
- {$EXTERNALSYM LPDHCP_BIND_ELEMENT}
- TDhcpBindElement = DHCP_BIND_ELEMENT;
- PDhcpBindElement = ^DHCP_BIND_ELEMENT;
-
- _DHCP_BIND_ELEMENT_ARRAY = record
- NumElements: DWORD;
- Elements: LPDHCP_BIND_ELEMENT; //array
- end;
- {$EXTERNALSYM _DHCP_BIND_ELEMENT_ARRAY}
- DHCP_BIND_ELEMENT_ARRAY = _DHCP_BIND_ELEMENT_ARRAY;
- {$EXTERNALSYM DHCP_BIND_ELEMENT_ARRAY}
- LPDHCP_BIND_ELEMENT_ARRAY = ^DHCP_BIND_ELEMENT_ARRAY;
- {$EXTERNALSYM LPDHCP_BIND_ELEMENT_ARRAY}
- TDhcpBindElementArray = DHCP_BIND_ELEMENT_ARRAY;
- PDhcpBindElementArray = ^DHCP_BIND_ELEMENT_ARRAY;
-
- _DHCP_CLIENT_SEARCH_TYPE = (
- DhcpClientIpAddress,
- DhcpClientHardwareAddress,
- DhcpClientName);
- {$EXTERNALSYM _DHCP_CLIENT_SEARCH_TYPE}
- DHCP_SEARCH_INFO_TYPE = _DHCP_CLIENT_SEARCH_TYPE;
- {$EXTERNALSYM DHCP_SEARCH_INFO_TYPE}
- LPDHCP_SEARCH_INFO_TYPE = ^DHCP_SEARCH_INFO_TYPE;
- {$EXTERNALSYM LPDHCP_SEARCH_INFO_TYPE}
- TDhcpSearchInfoType = DHCP_SEARCH_INFO_TYPE;
- PDhcpSearchInfoType = ^DHCP_SEARCH_INFO_TYPE;
-
- _DHCP_CLIENT_SEARCH_UNION = record
- case Integer of
- 0: (ClientIpAddress: DHCP_IP_ADDRESS);
- 1: (ClientHardwareAddress: DHCP_CLIENT_UID);
- 2: (ClientName: LPWSTR);
- end;
- {$EXTERNALSYM _DHCP_CLIENT_SEARCH_UNION}
-
- _DHCP_CLIENT_SEARCH_INFO = record
- SearchType: DHCP_SEARCH_INFO_TYPE;
- SearchInfo: _DHCP_CLIENT_SEARCH_UNION;
- end;
- {$EXTERNALSYM _DHCP_CLIENT_SEARCH_INFO}
- DHCP_SEARCH_INFO = _DHCP_CLIENT_SEARCH_INFO;
- {$EXTERNALSYM DHCP_SEARCH_INFO}
- LPDHCP_SEARCH_INFO = ^DHCP_SEARCH_INFO;
- {$EXTERNALSYM LPDHCP_SEARCH_INFO}
- TDhcpSearchInfo = DHCP_SEARCH_INFO;
- PDhcpSearchInfo = ^DHCP_SEARCH_INFO;
-
- _DHCP_OPTION_SCOPE_TYPE = (
- DhcpDefaultOptions,
- DhcpGlobalOptions,
- DhcpSubnetOptions,
- DhcpReservedOptions,
- DhcpMScopeOptions);
- {$EXTERNALSYM _DHCP_OPTION_SCOPE_TYPE}
- DHCP_OPTION_SCOPE_TYPE = _DHCP_OPTION_SCOPE_TYPE;
- {$EXTERNALSYM DHCP_OPTION_SCOPE_TYPE}
- LPDHCP_OPTION_SCOPE_TYPE = ^DHCP_OPTION_SCOPE_TYPE;
- {$EXTERNALSYM LPDHCP_OPTION_SCOPE_TYPE}
- TDhcpOptionScopeType = DHCP_OPTION_SCOPE_TYPE;
- PDhcpOptionScopeType = ^DHCP_OPTION_SCOPE_TYPE;
-
- _DHCP_RESERVED_SCOPE = record
- ReservedIpAddress: DHCP_IP_ADDRESS;
- ReservedIpSubnetAddress: DHCP_IP_ADDRESS;
- end;
- {$EXTERNALSYM _DHCP_RESERVED_SCOPE}
- DHCP_RESERVED_SCOPE = _DHCP_RESERVED_SCOPE;
- {$EXTERNALSYM DHCP_RESERVED_SCOPE}
- LPDHCP_RESERVED_SCOPE = ^DHCP_RESERVED_SCOPE;
- {$EXTERNALSYM LPDHCP_RESERVED_SCOPE}
- TDhcpReservedScope = DHCP_RESERVED_SCOPE;
- PDhcpReservedScope = ^DHCP_RESERVED_SCOPE;
-
- _DHCP_OPTION_SCOPE_UNION = record
- case Integer of
- 0: (DefaultScopeInfo: PVOID); // must be NULL
- 1: (GlobalScopeInfo: PVOID); // must be NULL
- 2: (SubnetScopeInfo: DHCP_IP_ADDRESS);
- 3: (ReservedScopeInfo: DHCP_RESERVED_SCOPE);
- 4: (MScopeInfo: LPWSTR);
- end;
- {$EXTERNALSYM _DHCP_OPTION_SCOPE_UNION}
-
- _DHCP_OPTION_SCOPE_INFO = record
- ScopeType: DHCP_OPTION_SCOPE_TYPE;
- ScopeInfo: _DHCP_OPTION_SCOPE_UNION;
- end;
- {$EXTERNALSYM _DHCP_OPTION_SCOPE_INFO}
- DHCP_OPTION_SCOPE_INFO = _DHCP_OPTION_SCOPE_INFO;
- {$EXTERNALSYM DHCP_OPTION_SCOPE_INFO}
- LPDHCP_OPTION_SCOPE_INFO = ^DHCP_OPTION_SCOPE_INFO;
- {$EXTERNALSYM LPDHCP_OPTION_SCOPE_INFO}
- TDhcpOptionScopeInfo = DHCP_OPTION_SCOPE_INFO;
- PDhcpOptionScopeInfo = ^DHCP_OPTION_SCOPE_INFO;
-
- _DHCP_HOST_INFO = record
- IpAddress: DHCP_IP_ADDRESS; // minimum information always available
- NetBiosName: LPWSTR; // optional information
- HostName: LPWSTR; // optional information
- end;
- {$EXTERNALSYM _DHCP_HOST_INFO}
- DHCP_HOST_INFO = _DHCP_HOST_INFO;
- {$EXTERNALSYM DHCP_HOST_INFO}
- LPDHCP_HOST_INFO = ^DHCP_HOST_INFO;
- {$EXTERNALSYM LPDHCP_HOST_INFO}
- TDhcpHostInfo = DHCP_HOST_INFO;
- PDhcpHostInfo = ^DHCP_HOST_INFO;
-
- _DHCP_CLIENT_INFO = record
- ClientIpAddress: DHCP_IP_ADDRESS; // currently assigned IP address.
- SubnetMask: DHCP_IP_MASK;
- ClientHardwareAddress: DHCP_CLIENT_UID;
- ClientName: LPWSTR; // optional.
- ClientComment: LPWSTR;
- ClientLeaseExpires: DATE_TIME; // UTC time in FILE_TIME format.
- OwnerHost: DHCP_HOST_INFO; // host that distributed this IP address.
- end;
- {$EXTERNALSYM _DHCP_CLIENT_INFO}
- DHCP_CLIENT_INFO = _DHCP_CLIENT_INFO;
- {$EXTERNALSYM DHCP_CLIENT_INFO}
- LPDHCP_CLIENT_INFO = ^DHCP_CLIENT_INFO;
- {$EXTERNALSYM LPDHCP_CLIENT_INFO}
- TDhcpClientInfo = DHCP_CLIENT_INFO;
- PDhcpClientInfo = ^DHCP_CLIENT_INFO;
-
- _DHCP_CLIENT_INFO_ARRAY = record
- NumElements: DWORD;
- Clients: ^LPDHCP_CLIENT_INFO; // array of pointers\
- end;
- {$EXTERNALSYM _DHCP_CLIENT_INFO_ARRAY}
- DHCP_CLIENT_INFO_ARRAY = _DHCP_CLIENT_INFO_ARRAY;
- {$EXTERNALSYM DHCP_CLIENT_INFO_ARRAY}
- LPDHCP_CLIENT_INFO_ARRAY = ^DHCP_CLIENT_INFO_ARRAY;
- {$EXTERNALSYM LPDHCP_CLIENT_INFO_ARRAY}
- TDhcpClientInfoArray = DHCP_CLIENT_INFO_ARRAY;
- PDhcpClientInfoArray = ^DHCP_CLIENT_INFO_ARRAY;
-
- _DHCP_IP_ARRAY = record
- NumElements: DWORD;
- Elements: LPDHCP_IP_ADDRESS; //array
- end;
- {$EXTERNALSYM _DHCP_IP_ARRAY}
- DHCP_IP_ARRAY = _DHCP_IP_ARRAY;
- {$EXTERNALSYM DHCP_IP_ARRAY}
- LPDHCP_IP_ARRAY = ^DHCP_IP_ARRAY;
- {$EXTERNALSYM LPDHCP_IP_ARRAY}
- TDhcpIpArray = DHCP_IP_ARRAY;
- PDhcpIpArray = ^DHCP_IP_ARRAY;
-
-//
-// Subnet State.
-//
-// Currently a Subnet scope can be Enabled or Disabled.
-//
-// If the state is Enabled State,
-// The server distributes address to the client, extends leases and
-// accepts releases.
-//
-// If the state is Disabled State,
-// The server does not distribute address to any new client, and does
-// extent (and sends NACK) old leases, but the servers accepts lease
-// releases.
-//
-// The idea behind this subnet state is, when the admin wants to stop
-// serving a subnet, he moves the state from Enbaled to Disabled so
-// that the clients from the subnets smoothly move to another servers
-// serving that subnet. When all or most of the clients move to
-// another server, the admin can delete the subnet without any force
-// if no client left in that subnet, otherwise the admin should use
-// full force to delete the subnet.
-//
-
-type
- _DHCP_SUBNET_STATE = (
- DhcpSubnetEnabled = 0,
- DhcpSubnetDisabled,
- DhcpSubnetEnabledSwitched,
- DhcpSubnetDisabledSwitched,
- DhcpSubnetInvalidState);
- {$EXTERNALSYM _DHCP_SUBNET_STATE}
- DHCP_SUBNET_STATE = _DHCP_SUBNET_STATE;
- {$EXTERNALSYM DHCP_SUBNET_STATE}
- LPDHCP_SUBNET_STATE = ^DHCP_SUBNET_STATE;
- {$EXTERNALSYM LPDHCP_SUBNET_STATE}
- TDhcpSubnetState = DHCP_SUBNET_STATE;
- PDhcpSubnetState = ^DHCP_SUBNET_STATE;
-
-//
-// Subnet related data structures.
-//
-
- _DHCP_SUBNET_INFO = record
- SubnetAddress: DHCP_IP_ADDRESS;
- SubnetMask: DHCP_IP_MASK;
- SubnetName: LPWSTR;
- SubnetComment: LPWSTR;
- PrimaryHost: DHCP_HOST_INFO;
- SubnetState: DHCP_SUBNET_STATE;
- end;
- {$EXTERNALSYM _DHCP_SUBNET_INFO}
- DHCP_SUBNET_INFO = _DHCP_SUBNET_INFO;
- {$EXTERNALSYM DHCP_SUBNET_INFO}
- LPDHCP_SUBNET_INFO = ^DHCP_SUBNET_INFO;
- {$EXTERNALSYM LPDHCP_SUBNET_INFO}
- TDhcpSubnetInfo = DHCP_SUBNET_INFO;
- PDhcpSubnetInfo = ^DHCP_SUBNET_INFO;
-
-//
-// DHCP Options related data structures.
-//
-
- _DHCP_OPTION_DATA_TYPE = (
- DhcpByteOption,
- DhcpWordOption,
- DhcpDWordOption,
- DhcpDWordDWordOption,
- DhcpIpAddressOption,
- DhcpStringDataOption,
- DhcpBinaryDataOption,
- DhcpEncapsulatedDataOption);
- {$EXTERNALSYM _DHCP_OPTION_DATA_TYPE}
- DHCP_OPTION_DATA_TYPE = _DHCP_OPTION_DATA_TYPE;
- {$EXTERNALSYM DHCP_OPTION_DATA_TYPE}
- LPDHCP_OPTION_DATA_TYPE = ^DHCP_OPTION_DATA_TYPE;
- {$EXTERNALSYM LPDHCP_OPTION_DATA_TYPE}
- TDhcpOptionDataType = DHCP_OPTION_DATA_TYPE;
- PDhcpOptionDataType = ^DHCP_OPTION_DATA_TYPE;
-
- _DHCP_OPTION_ELEMENT_UNION = record
- case Integer of
- 0: (ByteOption: BYTE);
- 1: (WordOption: WORD);
- 2: (DWordOption: DWORD);
- 3: (DWordDWordOption: DWORD_DWORD);
- 4: (IpAddressOption: DHCP_IP_ADDRESS);
- 5: (StringDataOption: LPWSTR);
- 6: (BinaryDataOption: DHCP_BINARY_DATA);
- 7: (EncapsulatedDataOption: DHCP_BINARY_DATA);
- // for vendor specific information option.
- end;
- {$EXTERNALSYM _DHCP_OPTION_ELEMENT_UNION}
-
- _DHCP_OPTION_DATA_ELEMENT = record
- OptionType: DHCP_OPTION_DATA_TYPE;
- Element: _DHCP_OPTION_ELEMENT_UNION;
- end;
- {$EXTERNALSYM _DHCP_OPTION_DATA_ELEMENT}
- DHCP_OPTION_DATA_ELEMENT = _DHCP_OPTION_DATA_ELEMENT;
- {$EXTERNALSYM DHCP_OPTION_DATA_ELEMENT}
- LPDHCP_OPTION_DATA_ELEMENT = ^DHCP_OPTION_DATA_ELEMENT;
- {$EXTERNALSYM LPDHCP_OPTION_DATA_ELEMENT}
- TDhcpOptionDataElement = DHCP_OPTION_DATA_ELEMENT;
- PDhcpOptionDataElement = ^DHCP_OPTION_DATA_ELEMENT;
-
- _DHCP_OPTION_DATA = record
- NumElements: DWORD; // number of option elements in the pointed array
- Elements: LPDHCP_OPTION_DATA_ELEMENT; //array
- end;
- {$EXTERNALSYM _DHCP_OPTION_DATA}
- DHCP_OPTION_DATA = _DHCP_OPTION_DATA;
- {$EXTERNALSYM DHCP_OPTION_DATA}
- LPDHCP_OPTION_DATA = ^DHCP_OPTION_DATA;
- {$EXTERNALSYM LPDHCP_OPTION_DATA}
- TDhcpOptionData = DHCP_OPTION_DATA;
- PDhcpOptionData = ^DHCP_OPTION_DATA;
-
- _DHCP_OPTION_VALUE = record
- OptionID: DHCP_OPTION_ID;
- Value: DHCP_OPTION_DATA;
- end;
- {$EXTERNALSYM _DHCP_OPTION_VALUE}
- DHCP_OPTION_VALUE = _DHCP_OPTION_VALUE;
- {$EXTERNALSYM DHCP_OPTION_VALUE}
- LPDHCP_OPTION_VALUE = ^DHCP_OPTION_VALUE;
- {$EXTERNALSYM LPDHCP_OPTION_VALUE}
- TDhcpOptionValue = DHCP_OPTION_VALUE;
- PDhcpOptionValue = ^DHCP_OPTION_VALUE;
-
-function DhcpGetVersion(ServerIpAddress: LPWSTR; MajorVersion, MinorVersion: LPDWORD): DWORD; stdcall;
-{$EXTERNALSYM DhcpGetVersion}
-function DhcpSetServerBindingInfo(ServerIpAddress: PWideChar; Flags: ULONG; BindElementInfo: LPDHCP_BIND_ELEMENT_ARRAY): DWORD; stdcall;
-{$EXTERNALSYM DhcpSetServerBindingInfo}
-function DhcpGetServerBindingInfo(ServerIpAddress: PWideChar; Flags: ULONG; out BindElementsInfo: LPDHCP_BIND_ELEMENT_ARRAY): DWORD; stdcall;
-{$EXTERNALSYM DhcpGetServerBindingInfo}
-function DhcpCreateClientInfo(ServerIpAddress: PWideChar; ClientInfo: LPDHCP_CLIENT_INFO): DWORD; stdcall;
-{$EXTERNALSYM DhcpCreateClientInfo}
-function DhcpSetClientInfo(ServerIpAddress: PWideChar; ClientInfo: LPDHCP_CLIENT_INFO): DWORD; stdcall;
-{$EXTERNALSYM DhcpSetClientInfo}
-function DhcpGetClientInfo(ServerIpAddress: PWideChar; SearchInfo: LPDHCP_SEARCH_INFO; ClientInfo: LPDHCP_CLIENT_INFO): DWORD; stdcall;
-{$EXTERNALSYM DhcpGetClientInfo}
-function DhcpDeleteClientInfo(ServerIpAddress: PWideChar; ClientInfo: LPDHCP_SEARCH_INFO): DWORD; stdcall;
-{$EXTERNALSYM DhcpDeleteClientInfo}
-function DhcpEnumSubnetClients(ServerIpAddress: PWideChar; SubnetAddress: DHCP_IP_ADDRESS; var ResumeHandle: DHCP_RESUME_HANDLE; PreferredMaximum: DWORD; out ClientInfo: LPDHCP_CLIENT_INFO_ARRAY; out ClientsRead, ClientsTotal: DWORD): DWORD; stdcall;
-{$EXTERNALSYM DhcpEnumSubnetClients}
-function DhcpEnumSubnets(ServerIpAddress: PWideChar; var ResumeHandle: DHCP_RESUME_HANDLE; PreferredMaximum: DWORD; EnumInfo: LPDHCP_IP_ARRAY; out ElementsRead, ElementsTotal: DWORD): DWORD; stdcall;
-{$EXTERNALSYM DhcpEnumSubnets}
-function DhcpGetSubnetInfo(ServerIpAddress: PWideChar; SubnetAddress: DHCP_IP_ADDRESS; out SubnetInfo: LPDHCP_SUBNET_INFO): DWORD; stdcall;
-{$EXTERNALSYM DhcpGetSubnetInfo}
-function DhcpGetOptionValue(ServerIpAddress: PWideChar; OptionID: DHCP_OPTION_ID; const ScopeInfo: DHCP_OPTION_SCOPE_INFO; out OptionValue: LPDHCP_OPTION_VALUE): DWORD; stdcall;
-{$EXTERNALSYM DhcpGetOptionValue}
-procedure DhcpRpcFreeMemory(BufferPointer: PVOID); stdcall;
-{$EXTERNALSYM DhcpRpcFreeMemory}
-
-implementation
-
-const
- dhcplib = 'dhcpsapi.dll';
-
-{$IFDEF DYNAMIC_LINK}
-
-var
- _DhcpGetVersion: Pointer;
-
-function DhcpGetVersion;
-begin
- GetProcedureAddress(_DhcpGetVersion, dhcplib, 'DhcpGetVersion');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DhcpGetVersion]
- end;
-end;
-
-var
- _DhcpSetServerBindingInfo: Pointer;
-
-function DhcpSetServerBindingInfo;
-begin
- GetProcedureAddress(_DhcpSetServerBindingInfo, dhcplib, 'DhcpSetServerBindingInfo');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DhcpSetServerBindingInfo]
- end;
-end;
-
-var
- _DhcpGetServerBindingInfo: Pointer;
-
-function DhcpGetServerBindingInfo;
-begin
- GetProcedureAddress(_DhcpGetServerBindingInfo, dhcplib, 'DhcpGetServerBindingInfo');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DhcpGetServerBindingInfo]
- end;
-end;
-
-var
- _DhcpCreateClientInfo: Pointer;
-
-function DhcpCreateClientInfo;
-begin
- GetProcedureAddress(_DhcpCreateClientInfo, dhcplib, 'DhcpCreateClientInfo');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DhcpCreateClientInfo]
- end;
-end;
-
-var
- _DhcpSetClientInfo: Pointer;
-
-function DhcpSetClientInfo;
-begin
- GetProcedureAddress(_DhcpSetClientInfo, dhcplib, 'DhcpSetClientInfo');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DhcpSetClientInfo]
- end;
-end;
-
-var
- _DhcpGetClientInfo: Pointer;
-
-function DhcpGetClientInfo;
-begin
- GetProcedureAddress(_DhcpGetClientInfo, dhcplib, 'DhcpGetClientInfo');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DhcpGetClientInfo]
- end;
-end;
-
-var
- _DhcpDeleteClientInfo: Pointer;
-
-function DhcpDeleteClientInfo;
-begin
- GetProcedureAddress(_DhcpDeleteClientInfo, dhcplib, 'DhcpDeleteClientInfo');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DhcpDeleteClientInfo]
- end;
-end;
-
-var
- _DhcpEnumSubnetClients: Pointer;
-
-function DhcpEnumSubnetClients;
-begin
- GetProcedureAddress(_DhcpEnumSubnetClients, dhcplib, 'DhcpEnumSubnetClients');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DhcpEnumSubnetClients]
- end;
-end;
-
-var
- _DhcpEnumSubnets: Pointer;
-
-function DhcpEnumSubnets;
-begin
- GetProcedureAddress(_DhcpEnumSubnets, dhcplib, 'DhcpEnumSubnets');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DhcpEnumSubnets]
- end;
-end;
-
-var
- _DhcpGetSubnetInfo: Pointer;
-
-function DhcpGetSubnetInfo;
-begin
- GetProcedureAddress(_DhcpGetSubnetInfo, dhcplib, 'DhcpGetSubnetInfo');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DhcpGetSubnetInfo]
- end;
-end;
-
-var
- _DhcpGetOptionValue: Pointer;
-
-function DhcpGetOptionValue;
-begin
- GetProcedureAddress(_DhcpGetOptionValue, dhcplib, 'DhcpGetOptionValue');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DhcpGetOptionValue]
- end;
-end;
-
-var
- _DhcpRpcFreeMemory: Pointer;
-
-procedure DhcpRpcFreeMemory;
-begin
- GetProcedureAddress(_DhcpRpcFreeMemory, dhcplib, 'DhcpRpcFreeMemory');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DhcpRpcFreeMemory]
- end;
-end;
-
-{$ELSE}
-
-function DhcpGetVersion; external dhcplib name 'DhcpGetVersion';
-function DhcpSetServerBindingInfo; external dhcplib name 'DhcpSetServerBindingInfo';
-function DhcpGetServerBindingInfo; external dhcplib name 'DhcpGetServerBindingInfo';
-function DhcpCreateClientInfo; external dhcplib name 'DhcpCreateClientInfo';
-function DhcpSetClientInfo; external dhcplib name 'DhcpSetClientInfo';
-function DhcpGetClientInfo; external dhcplib name 'DhcpGetClientInfo';
-function DhcpDeleteClientInfo; external dhcplib name 'DhcpDeleteClientInfo';
-function DhcpEnumSubnetClients; external dhcplib name 'DhcpEnumSubnetClients';
-function DhcpEnumSubnets; external dhcplib name 'DhcpEnumSubnets';
-function DhcpGetSubnetInfo; external dhcplib name 'DhcpGetSubnetInfo';
-function DhcpGetOptionValue; external dhcplib name 'DhcpGetOptionValue';
-procedure DhcpRpcFreeMemory; external dhcplib name 'DhcpRpcFreeMemory';
-
-{$ENDIF DYNAMIC_LINK}
-
-end.
+{******************************************************************************}
+{ }
+{ DHCP Server Management API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: dhcpsapi.h, released Feb 2003. The original Pascal }
+{ code is: DhcpsApi.pas, released December 2003. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwadhcpsapi.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaDhcpsApi;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "dhcpsapi.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaWinType;
+
+type
+ DHCP_IP_ADDRESS = DWORD;
+ {$EXTERNALSYM DHCP_IP_ADDRESS}
+ PDHCP_IP_ADDRESS = ^DHCP_IP_ADDRESS;
+ {$EXTERNALSYM PDHCP_IP_ADDRESS}
+ LPDHCP_IP_ADDRESS = ^DHCP_IP_ADDRESS;
+ {$EXTERNALSYM LPDHCP_IP_ADDRESS}
+ TDhcpIpAddress = DHCP_IP_ADDRESS;
+ PDhcpIpAddress = ^DHCP_IP_ADDRESS;
+
+ DHCP_IP_MASK = DWORD;
+ {$EXTERNALSYM DHCP_IP_MASK}
+ TDhcpIpMask = DHCP_IP_MASK;
+ DHCP_RESUME_HANDLE = DWORD;
+ {$EXTERNALSYM DHCP_RESUME_HANDLE}
+ TDhcpResumeHandle = DHCP_RESUME_HANDLE;
+
+ DHCP_OPTION_ID = DWORD;
+ {$EXTERNALSYM DHCP_OPTION_ID}
+ TDhcpOptionID = DHCP_OPTION_ID;
+
+ _DATE_TIME = record
+ dwLowDateTime: DWORD;
+ dwHighDateTime: DWORD;
+ end;
+ {$EXTERNALSYM _DATE_TIME}
+ DATE_TIME = _DATE_TIME;
+ {$EXTERNALSYM DATE_TIME}
+ LPDATE_TIME = ^DATE_TIME;
+ {$EXTERNALSYM LPDATE_TIME}
+ TDateTime = DATE_TIME;
+ PDateTime = ^DATE_TIME;
+
+ _DWORD_DWORD = record
+ DWord1: DWORD;
+ DWord2: DWORD;
+ end;
+ {$EXTERNALSYM _DWORD_DWORD}
+ DWORD_DWORD = _DWORD_DWORD;
+ {$EXTERNALSYM DWORD_DWORD}
+ LPDWORD_DWORD = ^DWORD_DWORD;
+ {$EXTERNALSYM LPDWORD_DWORD}
+ TDwordDword = DWORD_DWORD;
+ PDwordDword = ^DWORD_DWORD;
+
+ _DHCP_BINARY_DATA = record
+ DataLength: DWORD;
+ Data: LPBYTE;
+ end;
+ {$EXTERNALSYM _DHCP_BINARY_DATA}
+ DHCP_BINARY_DATA = _DHCP_BINARY_DATA;
+ {$EXTERNALSYM DHCP_BINARY_DATA}
+ LPDHCP_BINARY_DATA = ^DHCP_BINARY_DATA;
+ {$EXTERNALSYM LPDHCP_BINARY_DATA}
+ TDhcpBinaryData = DHCP_BINARY_DATA;
+ PDhcpBinaryData = ^DHCP_BINARY_DATA;
+
+ DHCP_CLIENT_UID = DHCP_BINARY_DATA;
+ {$EXTERNALSYM DHCP_CLIENT_UID}
+ TDhcpClientUid = DHCP_CLIENT_UID;
+
+const
+ DHCP_ENDPOINT_FLAG_CANT_MODIFY = $01;
+ {$EXTERNALSYM DHCP_ENDPOINT_FLAG_CANT_MODIFY}
+
+type
+ _DHCP_BIND_ELEMENT = record
+ Flags: ULONG;
+ fBoundToDHCPServer: BOOL;
+ AdapterPrimaryAddress: DHCP_IP_ADDRESS;
+ AdapterSubnetAddress: DHCP_IP_ADDRESS;
+ IfDescription: LPWSTR;
+ IfIdSize: ULONG;
+ IfId: LPBYTE;
+ end;
+ {$EXTERNALSYM _DHCP_BIND_ELEMENT}
+ DHCP_BIND_ELEMENT = _DHCP_BIND_ELEMENT;
+ {$EXTERNALSYM DHCP_BIND_ELEMENT}
+ LPDHCP_BIND_ELEMENT = ^DHCP_BIND_ELEMENT;
+ {$EXTERNALSYM LPDHCP_BIND_ELEMENT}
+ TDhcpBindElement = DHCP_BIND_ELEMENT;
+ PDhcpBindElement = ^DHCP_BIND_ELEMENT;
+
+ _DHCP_BIND_ELEMENT_ARRAY = record
+ NumElements: DWORD;
+ Elements: LPDHCP_BIND_ELEMENT; //array
+ end;
+ {$EXTERNALSYM _DHCP_BIND_ELEMENT_ARRAY}
+ DHCP_BIND_ELEMENT_ARRAY = _DHCP_BIND_ELEMENT_ARRAY;
+ {$EXTERNALSYM DHCP_BIND_ELEMENT_ARRAY}
+ LPDHCP_BIND_ELEMENT_ARRAY = ^DHCP_BIND_ELEMENT_ARRAY;
+ {$EXTERNALSYM LPDHCP_BIND_ELEMENT_ARRAY}
+ TDhcpBindElementArray = DHCP_BIND_ELEMENT_ARRAY;
+ PDhcpBindElementArray = ^DHCP_BIND_ELEMENT_ARRAY;
+
+ _DHCP_CLIENT_SEARCH_TYPE = (
+ DhcpClientIpAddress,
+ DhcpClientHardwareAddress,
+ DhcpClientName);
+ {$EXTERNALSYM _DHCP_CLIENT_SEARCH_TYPE}
+ DHCP_SEARCH_INFO_TYPE = _DHCP_CLIENT_SEARCH_TYPE;
+ {$EXTERNALSYM DHCP_SEARCH_INFO_TYPE}
+ LPDHCP_SEARCH_INFO_TYPE = ^DHCP_SEARCH_INFO_TYPE;
+ {$EXTERNALSYM LPDHCP_SEARCH_INFO_TYPE}
+ TDhcpSearchInfoType = DHCP_SEARCH_INFO_TYPE;
+ PDhcpSearchInfoType = ^DHCP_SEARCH_INFO_TYPE;
+
+ _DHCP_CLIENT_SEARCH_UNION = record
+ case Integer of
+ 0: (ClientIpAddress: DHCP_IP_ADDRESS);
+ 1: (ClientHardwareAddress: DHCP_CLIENT_UID);
+ 2: (ClientName: LPWSTR);
+ end;
+ {$EXTERNALSYM _DHCP_CLIENT_SEARCH_UNION}
+
+ _DHCP_CLIENT_SEARCH_INFO = record
+ SearchType: DHCP_SEARCH_INFO_TYPE;
+ SearchInfo: _DHCP_CLIENT_SEARCH_UNION;
+ end;
+ {$EXTERNALSYM _DHCP_CLIENT_SEARCH_INFO}
+ DHCP_SEARCH_INFO = _DHCP_CLIENT_SEARCH_INFO;
+ {$EXTERNALSYM DHCP_SEARCH_INFO}
+ LPDHCP_SEARCH_INFO = ^DHCP_SEARCH_INFO;
+ {$EXTERNALSYM LPDHCP_SEARCH_INFO}
+ TDhcpSearchInfo = DHCP_SEARCH_INFO;
+ PDhcpSearchInfo = ^DHCP_SEARCH_INFO;
+
+ _DHCP_OPTION_SCOPE_TYPE = (
+ DhcpDefaultOptions,
+ DhcpGlobalOptions,
+ DhcpSubnetOptions,
+ DhcpReservedOptions,
+ DhcpMScopeOptions);
+ {$EXTERNALSYM _DHCP_OPTION_SCOPE_TYPE}
+ DHCP_OPTION_SCOPE_TYPE = _DHCP_OPTION_SCOPE_TYPE;
+ {$EXTERNALSYM DHCP_OPTION_SCOPE_TYPE}
+ LPDHCP_OPTION_SCOPE_TYPE = ^DHCP_OPTION_SCOPE_TYPE;
+ {$EXTERNALSYM LPDHCP_OPTION_SCOPE_TYPE}
+ TDhcpOptionScopeType = DHCP_OPTION_SCOPE_TYPE;
+ PDhcpOptionScopeType = ^DHCP_OPTION_SCOPE_TYPE;
+
+ _DHCP_RESERVED_SCOPE = record
+ ReservedIpAddress: DHCP_IP_ADDRESS;
+ ReservedIpSubnetAddress: DHCP_IP_ADDRESS;
+ end;
+ {$EXTERNALSYM _DHCP_RESERVED_SCOPE}
+ DHCP_RESERVED_SCOPE = _DHCP_RESERVED_SCOPE;
+ {$EXTERNALSYM DHCP_RESERVED_SCOPE}
+ LPDHCP_RESERVED_SCOPE = ^DHCP_RESERVED_SCOPE;
+ {$EXTERNALSYM LPDHCP_RESERVED_SCOPE}
+ TDhcpReservedScope = DHCP_RESERVED_SCOPE;
+ PDhcpReservedScope = ^DHCP_RESERVED_SCOPE;
+
+ _DHCP_OPTION_SCOPE_UNION = record
+ case Integer of
+ 0: (DefaultScopeInfo: PVOID); // must be NULL
+ 1: (GlobalScopeInfo: PVOID); // must be NULL
+ 2: (SubnetScopeInfo: DHCP_IP_ADDRESS);
+ 3: (ReservedScopeInfo: DHCP_RESERVED_SCOPE);
+ 4: (MScopeInfo: LPWSTR);
+ end;
+ {$EXTERNALSYM _DHCP_OPTION_SCOPE_UNION}
+
+ _DHCP_OPTION_SCOPE_INFO = record
+ ScopeType: DHCP_OPTION_SCOPE_TYPE;
+ ScopeInfo: _DHCP_OPTION_SCOPE_UNION;
+ end;
+ {$EXTERNALSYM _DHCP_OPTION_SCOPE_INFO}
+ DHCP_OPTION_SCOPE_INFO = _DHCP_OPTION_SCOPE_INFO;
+ {$EXTERNALSYM DHCP_OPTION_SCOPE_INFO}
+ LPDHCP_OPTION_SCOPE_INFO = ^DHCP_OPTION_SCOPE_INFO;
+ {$EXTERNALSYM LPDHCP_OPTION_SCOPE_INFO}
+ TDhcpOptionScopeInfo = DHCP_OPTION_SCOPE_INFO;
+ PDhcpOptionScopeInfo = ^DHCP_OPTION_SCOPE_INFO;
+
+ _DHCP_HOST_INFO = record
+ IpAddress: DHCP_IP_ADDRESS; // minimum information always available
+ NetBiosName: LPWSTR; // optional information
+ HostName: LPWSTR; // optional information
+ end;
+ {$EXTERNALSYM _DHCP_HOST_INFO}
+ DHCP_HOST_INFO = _DHCP_HOST_INFO;
+ {$EXTERNALSYM DHCP_HOST_INFO}
+ LPDHCP_HOST_INFO = ^DHCP_HOST_INFO;
+ {$EXTERNALSYM LPDHCP_HOST_INFO}
+ TDhcpHostInfo = DHCP_HOST_INFO;
+ PDhcpHostInfo = ^DHCP_HOST_INFO;
+
+ _DHCP_CLIENT_INFO = record
+ ClientIpAddress: DHCP_IP_ADDRESS; // currently assigned IP address.
+ SubnetMask: DHCP_IP_MASK;
+ ClientHardwareAddress: DHCP_CLIENT_UID;
+ ClientName: LPWSTR; // optional.
+ ClientComment: LPWSTR;
+ ClientLeaseExpires: DATE_TIME; // UTC time in FILE_TIME format.
+ OwnerHost: DHCP_HOST_INFO; // host that distributed this IP address.
+ end;
+ {$EXTERNALSYM _DHCP_CLIENT_INFO}
+ DHCP_CLIENT_INFO = _DHCP_CLIENT_INFO;
+ {$EXTERNALSYM DHCP_CLIENT_INFO}
+ LPDHCP_CLIENT_INFO = ^DHCP_CLIENT_INFO;
+ {$EXTERNALSYM LPDHCP_CLIENT_INFO}
+ TDhcpClientInfo = DHCP_CLIENT_INFO;
+ PDhcpClientInfo = ^DHCP_CLIENT_INFO;
+
+ _DHCP_CLIENT_INFO_ARRAY = record
+ NumElements: DWORD;
+ Clients: ^LPDHCP_CLIENT_INFO; // array of pointers\
+ end;
+ {$EXTERNALSYM _DHCP_CLIENT_INFO_ARRAY}
+ DHCP_CLIENT_INFO_ARRAY = _DHCP_CLIENT_INFO_ARRAY;
+ {$EXTERNALSYM DHCP_CLIENT_INFO_ARRAY}
+ LPDHCP_CLIENT_INFO_ARRAY = ^DHCP_CLIENT_INFO_ARRAY;
+ {$EXTERNALSYM LPDHCP_CLIENT_INFO_ARRAY}
+ TDhcpClientInfoArray = DHCP_CLIENT_INFO_ARRAY;
+ PDhcpClientInfoArray = ^DHCP_CLIENT_INFO_ARRAY;
+
+ _DHCP_IP_ARRAY = record
+ NumElements: DWORD;
+ Elements: LPDHCP_IP_ADDRESS; //array
+ end;
+ {$EXTERNALSYM _DHCP_IP_ARRAY}
+ DHCP_IP_ARRAY = _DHCP_IP_ARRAY;
+ {$EXTERNALSYM DHCP_IP_ARRAY}
+ LPDHCP_IP_ARRAY = ^DHCP_IP_ARRAY;
+ {$EXTERNALSYM LPDHCP_IP_ARRAY}
+ TDhcpIpArray = DHCP_IP_ARRAY;
+ PDhcpIpArray = ^DHCP_IP_ARRAY;
+
+//
+// Subnet State.
+//
+// Currently a Subnet scope can be Enabled or Disabled.
+//
+// If the state is Enabled State,
+// The server distributes address to the client, extends leases and
+// accepts releases.
+//
+// If the state is Disabled State,
+// The server does not distribute address to any new client, and does
+// extent (and sends NACK) old leases, but the servers accepts lease
+// releases.
+//
+// The idea behind this subnet state is, when the admin wants to stop
+// serving a subnet, he moves the state from Enbaled to Disabled so
+// that the clients from the subnets smoothly move to another servers
+// serving that subnet. When all or most of the clients move to
+// another server, the admin can delete the subnet without any force
+// if no client left in that subnet, otherwise the admin should use
+// full force to delete the subnet.
+//
+
+type
+ _DHCP_SUBNET_STATE = (
+ DhcpSubnetEnabled = 0,
+ DhcpSubnetDisabled,
+ DhcpSubnetEnabledSwitched,
+ DhcpSubnetDisabledSwitched,
+ DhcpSubnetInvalidState);
+ {$EXTERNALSYM _DHCP_SUBNET_STATE}
+ DHCP_SUBNET_STATE = _DHCP_SUBNET_STATE;
+ {$EXTERNALSYM DHCP_SUBNET_STATE}
+ LPDHCP_SUBNET_STATE = ^DHCP_SUBNET_STATE;
+ {$EXTERNALSYM LPDHCP_SUBNET_STATE}
+ TDhcpSubnetState = DHCP_SUBNET_STATE;
+ PDhcpSubnetState = ^DHCP_SUBNET_STATE;
+
+//
+// Subnet related data structures.
+//
+
+ _DHCP_SUBNET_INFO = record
+ SubnetAddress: DHCP_IP_ADDRESS;
+ SubnetMask: DHCP_IP_MASK;
+ SubnetName: LPWSTR;
+ SubnetComment: LPWSTR;
+ PrimaryHost: DHCP_HOST_INFO;
+ SubnetState: DHCP_SUBNET_STATE;
+ end;
+ {$EXTERNALSYM _DHCP_SUBNET_INFO}
+ DHCP_SUBNET_INFO = _DHCP_SUBNET_INFO;
+ {$EXTERNALSYM DHCP_SUBNET_INFO}
+ LPDHCP_SUBNET_INFO = ^DHCP_SUBNET_INFO;
+ {$EXTERNALSYM LPDHCP_SUBNET_INFO}
+ TDhcpSubnetInfo = DHCP_SUBNET_INFO;
+ PDhcpSubnetInfo = ^DHCP_SUBNET_INFO;
+
+//
+// DHCP Options related data structures.
+//
+
+ _DHCP_OPTION_DATA_TYPE = (
+ DhcpByteOption,
+ DhcpWordOption,
+ DhcpDWordOption,
+ DhcpDWordDWordOption,
+ DhcpIpAddressOption,
+ DhcpStringDataOption,
+ DhcpBinaryDataOption,
+ DhcpEncapsulatedDataOption);
+ {$EXTERNALSYM _DHCP_OPTION_DATA_TYPE}
+ DHCP_OPTION_DATA_TYPE = _DHCP_OPTION_DATA_TYPE;
+ {$EXTERNALSYM DHCP_OPTION_DATA_TYPE}
+ LPDHCP_OPTION_DATA_TYPE = ^DHCP_OPTION_DATA_TYPE;
+ {$EXTERNALSYM LPDHCP_OPTION_DATA_TYPE}
+ TDhcpOptionDataType = DHCP_OPTION_DATA_TYPE;
+ PDhcpOptionDataType = ^DHCP_OPTION_DATA_TYPE;
+
+ _DHCP_OPTION_ELEMENT_UNION = record
+ case Integer of
+ 0: (ByteOption: BYTE);
+ 1: (WordOption: WORD);
+ 2: (DWordOption: DWORD);
+ 3: (DWordDWordOption: DWORD_DWORD);
+ 4: (IpAddressOption: DHCP_IP_ADDRESS);
+ 5: (StringDataOption: LPWSTR);
+ 6: (BinaryDataOption: DHCP_BINARY_DATA);
+ 7: (EncapsulatedDataOption: DHCP_BINARY_DATA);
+ // for vendor specific information option.
+ end;
+ {$EXTERNALSYM _DHCP_OPTION_ELEMENT_UNION}
+
+ _DHCP_OPTION_DATA_ELEMENT = record
+ OptionType: DHCP_OPTION_DATA_TYPE;
+ Element: _DHCP_OPTION_ELEMENT_UNION;
+ end;
+ {$EXTERNALSYM _DHCP_OPTION_DATA_ELEMENT}
+ DHCP_OPTION_DATA_ELEMENT = _DHCP_OPTION_DATA_ELEMENT;
+ {$EXTERNALSYM DHCP_OPTION_DATA_ELEMENT}
+ LPDHCP_OPTION_DATA_ELEMENT = ^DHCP_OPTION_DATA_ELEMENT;
+ {$EXTERNALSYM LPDHCP_OPTION_DATA_ELEMENT}
+ TDhcpOptionDataElement = DHCP_OPTION_DATA_ELEMENT;
+ PDhcpOptionDataElement = ^DHCP_OPTION_DATA_ELEMENT;
+
+ _DHCP_OPTION_DATA = record
+ NumElements: DWORD; // number of option elements in the pointed array
+ Elements: LPDHCP_OPTION_DATA_ELEMENT; //array
+ end;
+ {$EXTERNALSYM _DHCP_OPTION_DATA}
+ DHCP_OPTION_DATA = _DHCP_OPTION_DATA;
+ {$EXTERNALSYM DHCP_OPTION_DATA}
+ LPDHCP_OPTION_DATA = ^DHCP_OPTION_DATA;
+ {$EXTERNALSYM LPDHCP_OPTION_DATA}
+ TDhcpOptionData = DHCP_OPTION_DATA;
+ PDhcpOptionData = ^DHCP_OPTION_DATA;
+
+ _DHCP_OPTION_VALUE = record
+ OptionID: DHCP_OPTION_ID;
+ Value: DHCP_OPTION_DATA;
+ end;
+ {$EXTERNALSYM _DHCP_OPTION_VALUE}
+ DHCP_OPTION_VALUE = _DHCP_OPTION_VALUE;
+ {$EXTERNALSYM DHCP_OPTION_VALUE}
+ LPDHCP_OPTION_VALUE = ^DHCP_OPTION_VALUE;
+ {$EXTERNALSYM LPDHCP_OPTION_VALUE}
+ TDhcpOptionValue = DHCP_OPTION_VALUE;
+ PDhcpOptionValue = ^DHCP_OPTION_VALUE;
+
+function DhcpGetVersion(ServerIpAddress: LPWSTR; MajorVersion, MinorVersion: LPDWORD): DWORD; stdcall;
+{$EXTERNALSYM DhcpGetVersion}
+function DhcpSetServerBindingInfo(ServerIpAddress: PWideChar; Flags: ULONG; BindElementInfo: LPDHCP_BIND_ELEMENT_ARRAY): DWORD; stdcall;
+{$EXTERNALSYM DhcpSetServerBindingInfo}
+function DhcpGetServerBindingInfo(ServerIpAddress: PWideChar; Flags: ULONG; out BindElementsInfo: LPDHCP_BIND_ELEMENT_ARRAY): DWORD; stdcall;
+{$EXTERNALSYM DhcpGetServerBindingInfo}
+function DhcpCreateClientInfo(ServerIpAddress: PWideChar; ClientInfo: LPDHCP_CLIENT_INFO): DWORD; stdcall;
+{$EXTERNALSYM DhcpCreateClientInfo}
+function DhcpSetClientInfo(ServerIpAddress: PWideChar; ClientInfo: LPDHCP_CLIENT_INFO): DWORD; stdcall;
+{$EXTERNALSYM DhcpSetClientInfo}
+function DhcpGetClientInfo(ServerIpAddress: PWideChar; SearchInfo: LPDHCP_SEARCH_INFO; ClientInfo: LPDHCP_CLIENT_INFO): DWORD; stdcall;
+{$EXTERNALSYM DhcpGetClientInfo}
+function DhcpDeleteClientInfo(ServerIpAddress: PWideChar; ClientInfo: LPDHCP_SEARCH_INFO): DWORD; stdcall;
+{$EXTERNALSYM DhcpDeleteClientInfo}
+function DhcpEnumSubnetClients(ServerIpAddress: PWideChar; SubnetAddress: DHCP_IP_ADDRESS; var ResumeHandle: DHCP_RESUME_HANDLE; PreferredMaximum: DWORD; out ClientInfo: LPDHCP_CLIENT_INFO_ARRAY; out ClientsRead, ClientsTotal: DWORD): DWORD; stdcall;
+{$EXTERNALSYM DhcpEnumSubnetClients}
+function DhcpEnumSubnets(ServerIpAddress: PWideChar; var ResumeHandle: DHCP_RESUME_HANDLE; PreferredMaximum: DWORD; EnumInfo: LPDHCP_IP_ARRAY; out ElementsRead, ElementsTotal: DWORD): DWORD; stdcall;
+{$EXTERNALSYM DhcpEnumSubnets}
+function DhcpGetSubnetInfo(ServerIpAddress: PWideChar; SubnetAddress: DHCP_IP_ADDRESS; out SubnetInfo: LPDHCP_SUBNET_INFO): DWORD; stdcall;
+{$EXTERNALSYM DhcpGetSubnetInfo}
+function DhcpGetOptionValue(ServerIpAddress: PWideChar; OptionID: DHCP_OPTION_ID; const ScopeInfo: DHCP_OPTION_SCOPE_INFO; out OptionValue: LPDHCP_OPTION_VALUE): DWORD; stdcall;
+{$EXTERNALSYM DhcpGetOptionValue}
+procedure DhcpRpcFreeMemory(BufferPointer: PVOID); stdcall;
+{$EXTERNALSYM DhcpRpcFreeMemory}
+
+implementation
+
+const
+ dhcplib = 'dhcpsapi.dll';
+
+{$IFDEF DYNAMIC_LINK}
+
+var
+ _DhcpGetVersion: Pointer;
+
+function DhcpGetVersion;
+begin
+ GetProcedureAddress(_DhcpGetVersion, dhcplib, 'DhcpGetVersion');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DhcpGetVersion]
+ end;
+end;
+
+var
+ _DhcpSetServerBindingInfo: Pointer;
+
+function DhcpSetServerBindingInfo;
+begin
+ GetProcedureAddress(_DhcpSetServerBindingInfo, dhcplib, 'DhcpSetServerBindingInfo');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DhcpSetServerBindingInfo]
+ end;
+end;
+
+var
+ _DhcpGetServerBindingInfo: Pointer;
+
+function DhcpGetServerBindingInfo;
+begin
+ GetProcedureAddress(_DhcpGetServerBindingInfo, dhcplib, 'DhcpGetServerBindingInfo');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DhcpGetServerBindingInfo]
+ end;
+end;
+
+var
+ _DhcpCreateClientInfo: Pointer;
+
+function DhcpCreateClientInfo;
+begin
+ GetProcedureAddress(_DhcpCreateClientInfo, dhcplib, 'DhcpCreateClientInfo');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DhcpCreateClientInfo]
+ end;
+end;
+
+var
+ _DhcpSetClientInfo: Pointer;
+
+function DhcpSetClientInfo;
+begin
+ GetProcedureAddress(_DhcpSetClientInfo, dhcplib, 'DhcpSetClientInfo');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DhcpSetClientInfo]
+ end;
+end;
+
+var
+ _DhcpGetClientInfo: Pointer;
+
+function DhcpGetClientInfo;
+begin
+ GetProcedureAddress(_DhcpGetClientInfo, dhcplib, 'DhcpGetClientInfo');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DhcpGetClientInfo]
+ end;
+end;
+
+var
+ _DhcpDeleteClientInfo: Pointer;
+
+function DhcpDeleteClientInfo;
+begin
+ GetProcedureAddress(_DhcpDeleteClientInfo, dhcplib, 'DhcpDeleteClientInfo');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DhcpDeleteClientInfo]
+ end;
+end;
+
+var
+ _DhcpEnumSubnetClients: Pointer;
+
+function DhcpEnumSubnetClients;
+begin
+ GetProcedureAddress(_DhcpEnumSubnetClients, dhcplib, 'DhcpEnumSubnetClients');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DhcpEnumSubnetClients]
+ end;
+end;
+
+var
+ _DhcpEnumSubnets: Pointer;
+
+function DhcpEnumSubnets;
+begin
+ GetProcedureAddress(_DhcpEnumSubnets, dhcplib, 'DhcpEnumSubnets');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DhcpEnumSubnets]
+ end;
+end;
+
+var
+ _DhcpGetSubnetInfo: Pointer;
+
+function DhcpGetSubnetInfo;
+begin
+ GetProcedureAddress(_DhcpGetSubnetInfo, dhcplib, 'DhcpGetSubnetInfo');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DhcpGetSubnetInfo]
+ end;
+end;
+
+var
+ _DhcpGetOptionValue: Pointer;
+
+function DhcpGetOptionValue;
+begin
+ GetProcedureAddress(_DhcpGetOptionValue, dhcplib, 'DhcpGetOptionValue');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DhcpGetOptionValue]
+ end;
+end;
+
+var
+ _DhcpRpcFreeMemory: Pointer;
+
+procedure DhcpRpcFreeMemory;
+begin
+ GetProcedureAddress(_DhcpRpcFreeMemory, dhcplib, 'DhcpRpcFreeMemory');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DhcpRpcFreeMemory]
+ end;
+end;
+
+{$ELSE}
+
+function DhcpGetVersion; external dhcplib name 'DhcpGetVersion';
+function DhcpSetServerBindingInfo; external dhcplib name 'DhcpSetServerBindingInfo';
+function DhcpGetServerBindingInfo; external dhcplib name 'DhcpGetServerBindingInfo';
+function DhcpCreateClientInfo; external dhcplib name 'DhcpCreateClientInfo';
+function DhcpSetClientInfo; external dhcplib name 'DhcpSetClientInfo';
+function DhcpGetClientInfo; external dhcplib name 'DhcpGetClientInfo';
+function DhcpDeleteClientInfo; external dhcplib name 'DhcpDeleteClientInfo';
+function DhcpEnumSubnetClients; external dhcplib name 'DhcpEnumSubnetClients';
+function DhcpEnumSubnets; external dhcplib name 'DhcpEnumSubnets';
+function DhcpGetSubnetInfo; external dhcplib name 'DhcpGetSubnetInfo';
+function DhcpGetOptionValue; external dhcplib name 'DhcpGetOptionValue';
+procedure DhcpRpcFreeMemory; external dhcplib name 'DhcpRpcFreeMemory';
+
+{$ENDIF DYNAMIC_LINK}
+
+end.
diff --git a/packages/extra/winunits/jwadhcpssdk.pas b/packages/extra/winunits/jwadhcpssdk.pas
index 91d18969d8..4767377857 100644
--- a/packages/extra/winunits/jwadhcpssdk.pas
+++ b/packages/extra/winunits/jwadhcpssdk.pas
@@ -1,521 +1,521 @@
-{******************************************************************************}
-{ }
-{ DHCP Callout DLL API interface unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: dhcpssdk.h, released June 2000. The original Pascal }
-{ code is: DhcpSSdk.pas, released December 2000. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwadhcpssdk.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaDhcpSSdk;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "dhcpssdk.h"'}
-{$HPPEMIT ''}
-{$HPPEMIT 'typedef DHCP_IP_ADDRESS *LPDHCP_IP_ADDRESS;'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaWinNT, JwaWinType;
-
-// This structure could change any day. This will be accurate only for version 0 -- which
-// has to be checked for by any CalloutDLL that is hooking onto the DhcpHandleOptionsHook.
-
-type
- DHCP_IP_ADDRESS = DWORD;
- {$EXTERNALSYM DHCP_IP_ADDRESS}
- LPDHCP_IP_ADDRESS = ^DHCP_IP_ADDRESS;
- {$NODEFINE LPDHCP_IP_ADDRESS}
- TDhcpIpAddress = DHCP_IP_ADDRESS;
-
- _DHCP_SERVER_OPTIONS = record
- MessageType: LPBYTE;
- SubnetMask: LPDHCP_IP_ADDRESS;
- RequestedAddress: LPDHCP_IP_ADDRESS;
- RequestLeaseTime: LPDWORD;
- OverlayFields: LPBYTE;
- RouterAddress: LPDHCP_IP_ADDRESS;
- Server: LPDHCP_IP_ADDRESS;
- ParameterRequestList: LPBYTE;
- ParameterRequestListLength: DWORD;
- MachineName: PCHAR;
- MachineNameLength: DWORD;
- ClientHardwareAddressType: BYTE;
- ClientHardwareAddressLength: BYTE;
- ClientHardwareAddress: LPBYTE;
- ClassIdentifier: PCHAR;
- ClassIdentifierLength: DWORD;
- VendorClass: LPBYTE;
- VendorClassLength: DWORD;
- DNSFlags: DWORD;
- DNSNameLength: DWORD;
- DNSName: LPBYTE;
- DSDomainNameRequested: LongBool;
- DSDomainName: PCHAR;
- DSDomainNameLen: DWORD;
- ScopeId: LPDWORD;
- end;
- {$EXTERNALSYM _DHCP_SERVER_OPTIONS}
- DHCP_SERVER_OPTIONS = _DHCP_SERVER_OPTIONS;
- {$EXTERNALSYM DHCP_SERVER_OPTIONS}
- LPDHCP_SERVER_OPTIONS = ^DHCP_SERVER_OPTIONS;
- {$EXTERNALSYM LPDHCP_SERVER_OPTIONS}
- TDhcpServerOptions = DHCP_SERVER_OPTIONS;
- PDhcpServerOptions = LPDHCP_SERVER_OPTIONS;
-
-//
-// The location in registry where the REG_MULTI_SZ list of callout DLLs
-// that the DHCP Server will try to load.
-//
-
-const
- DHCP_CALLOUT_LIST_KEY = WideString('System\CurrentControlSet\Services\DHCPServer\Parameters');
- {$EXTERNALSYM DHCP_CALLOUT_LIST_KEY}
- DHCP_CALLOUT_LIST_VALUE = WideString('CalloutDlls');
- {$EXTERNALSYM DHCP_CALLOUT_LIST_VALUE}
- DHCP_CALLOUT_LIST_TYPE = REG_MULTI_SZ;
- {$EXTERNALSYM DHCP_CALLOUT_LIST_TYPE}
- DHCP_CALLOUT_ENTRY_POINT = 'DhcpServerCalloutEntry';
- {$EXTERNALSYM DHCP_CALLOUT_ENTRY_POINT}
-
-//
-// Control CODES used by DHCP Server to notify server state change.
-//
-
- DHCP_CONTROL_START = $00000001;
- {$EXTERNALSYM DHCP_CONTROL_START}
- DHCP_CONTROL_STOP = $00000002;
- {$EXTERNALSYM DHCP_CONTROL_STOP}
- DHCP_CONTROL_PAUSE = $00000003;
- {$EXTERNALSYM DHCP_CONTROL_PAUSE}
- DHCP_CONTROL_CONTINUE = $00000004;
- {$EXTERNALSYM DHCP_CONTROL_CONTINUE}
-
-//
-// Other ControlCodes used by various Callout HOOKS.
-//
-
- DHCP_DROP_DUPLICATE = $00000001; // duplicate of pkt being processed
- {$EXTERNALSYM DHCP_DROP_DUPLICATE}
- DHCP_DROP_NOMEM = $00000002; // not enough server mem in queues
- {$EXTERNALSYM DHCP_DROP_NOMEM}
- DHCP_DROP_INTERNAL_ERROR = $00000003; // ooops?
- {$EXTERNALSYM DHCP_DROP_INTERNAL_ERROR}
- DHCP_DROP_TIMEOUT = $00000004; // too late, pkt is too old
- {$EXTERNALSYM DHCP_DROP_TIMEOUT}
- DHCP_DROP_UNAUTH = $00000005; // server is not authorized to run
- {$EXTERNALSYM DHCP_DROP_UNAUTH}
- DHCP_DROP_PAUSED = $00000006; // service is paused
- {$EXTERNALSYM DHCP_DROP_PAUSED}
- DHCP_DROP_NO_SUBNETS = $00000007; // no subnets configured on server
- {$EXTERNALSYM DHCP_DROP_NO_SUBNETS}
- DHCP_DROP_INVALID = $00000008; // invalid packet or client
- {$EXTERNALSYM DHCP_DROP_INVALID}
- DHCP_DROP_WRONG_SERVER = $00000009; // client in different DS enterprise
- {$EXTERNALSYM DHCP_DROP_WRONG_SERVER}
- DHCP_DROP_NOADDRESS = $0000000A; // no address available to offer
- {$EXTERNALSYM DHCP_DROP_NOADDRESS}
- DHCP_DROP_PROCESSED = $0000000B; // packet has been processed
- {$EXTERNALSYM DHCP_DROP_PROCESSED}
- DHCP_DROP_GEN_FAILURE = $00000100; // catch-all error
- {$EXTERNALSYM DHCP_DROP_GEN_FAILURE}
- DHCP_SEND_PACKET = $10000000; // send the packet on wire
- {$EXTERNALSYM DHCP_SEND_PACKET}
- DHCP_PROB_CONFLICT = $20000001; // address conflicted..
- {$EXTERNALSYM DHCP_PROB_CONFLICT}
- DHCP_PROB_DECLINE = $20000002; // an addr got declined
- {$EXTERNALSYM DHCP_PROB_DECLINE}
- DHCP_PROB_RELEASE = $20000003; // an addr got released
- {$EXTERNALSYM DHCP_PROB_RELEASE}
- DHCP_PROB_NACKED = $20000004; // a client is being nacked.
- {$EXTERNALSYM DHCP_PROB_NACKED}
- DHCP_GIVE_ADDRESS_NEW = $30000001; // give client a "new" address
- {$EXTERNALSYM DHCP_GIVE_ADDRESS_NEW}
- DHCP_GIVE_ADDRESS_OLD = $30000002; // renew client's "old" address
- {$EXTERNALSYM DHCP_GIVE_ADDRESS_OLD}
- DHCP_CLIENT_BOOTP = $30000003; // client is a BOOTP client
- {$EXTERNALSYM DHCP_CLIENT_BOOTP}
- DHCP_CLIENT_DHCP = $30000004; // client is a DHCP client
- {$EXTERNALSYM DHCP_CLIENT_DHCP}
-
-type
- LPDHCP_CONTROL = function(dwControlCode: DWORD; lpReserved: LPVOID): DWORD; stdcall;
- {$EXTERNALSYM LPDHCP_CONTROL}
- PDhcpControl = LPDHCP_CONTROL;
-
-{
-Routine Description:
-
- This routine is called whenever the DHCP Server service is
- started, stopped, paused or continued as defined by the values of
- the dwControlCode parameter. The lpReserved parameter is reserved
- for future use and it should not be interpreted in any way. This
- routine should not block.
-
-Arguments:
-
- dwControlCode - one of the DHCP_CONTROL_* values
- lpReserved - reserved for future use.
-
-}
-
-type
- LPDHCP_NEWPKT = function(var Packet: LPBYTE; var PacketSize: DWORD; IpAddress: DWORD;
- Reserved: LPVOID; var PktContext: LPVOID; ProcessIt: LPBOOL): DWORD; stdcall;
- {$EXTERNALSYM LPDHCP_NEWPKT}
- PDhcpNewPkt = LPDHCP_NEWPKT;
-
-{
-Routine Description:
-
- This routine is called soon after the DHCP Server receives a
- packet that it attempts to process. This routine is in the
- critical path of server execution and should return very fast, as
- otherwise server performance will be impacted. The Callout DLL
- can modify the buffer or return a new buffer via the Packet,
- PacketSize arguments. Also, if the callout DLL has internal
- structures to keep track of the packet and its progress, it can
- then return a context to this packet in the PktContext parameter.
- This context will be passed to almost all other hooks to indicate
- the packet being referred to. Also, if the Callout DLL is
- planning on processing the packet or for some other reason the
- DHCP server is not expected to process this packet, then it can
- set the ProcessIt flag to FALSE to indicate that the packet is to
- be dropped.
-
-Arguments:
-
- Packet - This parameter points to a character buffer that holds
- the actual packet received by the DHCP Server.
-
- PacketSize - This parameter points to a variable that holds the
- size of the above buffer.
-
- IpAddress - This parameter points to an IPV4 host order IP address
- of the socket that this packet was received on.
-
- Reserved -Reserved for future use.
-
- PktContect - This is an opaque pointer used by the DHCP Server for
- future references to this packet. It is expected that the callout
- DLL will provide this pointer if it is interested in keeping track
- of the packet. (See the descriptions for the hooks below for
- other usage of this Context).
-
- ProcessIt - This is a BOOL flag that the CalloutDll can set to
- TRUE or reset to indicate if the DHCP Server should continue
- processing this packet or not, respectively.
-}
-
-type
- LPDHCP_DROP_SEND = function(var Packet: LPBYTE; var PacketSize: DWORD;
- ControlCode, IpAddress: DWORD; Reserved, PktContext: LPVOID): DWORD; stdcall;
- {$EXTERNALSYM LPDHCP_DROP_SEND}
- PDhcpDropSend = LPDHCP_DROP_SEND;
-
-{
-Routine Description:
-
- This hook is called if a packet is (DropPktHook) dropped for some
- reason or if the packet is completely processed. (If a packet is
- dropped, the hook is called twice as it is called once again to
- note that the packet has been completely processed). The callout
- DLL should be prepared to handle this hook multiple times for a
- packet. This routine should not block. The ControlCode parameter
- defines the reasons for the packet being dropped:
-
- * DHCP_DROP_DUPLICATE - This packet is a duplicate of another
- received by the server.
- * DHCP_DROP_NOMEM - Not enough memory to process the packet.
- * DHCP_DROP_INTERNAL_ERROR - Unexpected nternal error occurred.
- * DHCP_DROP_TIMEOUT - The packet is too old to process.
- * DHCP_DROP_UNAUTH - The server is not authorized.
- * DHCP_DROP_PAUSED - The server is paused.
- * DHCP_DROP_NO_SUBNETS - There are no subnets configured.
- * DHCP_DROP_INVALID - The packet is invalid or it came on an
- invalid socket ..
- * DHCP_DROP_WRONG_SERVER - The packet was sent to the wrong DHCP Server.
- * DHCP_DROP_NOADDRESS - There is no address to offer.
- * DHCP_DROP_PROCESSED - The packet has been processed.
- * DHCP_DROP_GEN_FAILURE - An unknown error occurred.
-
- This routine is also called right before a response is sent down
- the wire (SendPktHook) and in this case the ControlCode has a
- value of DHCP_SEND_PACKET.
-
-Arguments:
-
- Packet - This parameter points to a character buffer that holds
- the packet being processed by the DHCP Server.
-
- PacketSize - This parameter points to a variable that holds the
- size of the above buffer.
-
- ControlCode - See description for various control codes.
-
- IpAddress - This parameter points to an IPV4 host order IP address
- of the socket that this packet was received on.
-
- Reserved - Reserved for future use.
-
- PktContext - This parameter is the packet context that the Callout
- DLL NewPkt Hook returned for this packet. This can be used to
- track a packet.
-}
-
-type
- LPDHCP_PROB = function(Packet: LPBYTE; PacketSize, ControlCode, IpAddress,
- AltAddress: DWORD; Reserved, PktContext: LPVOID): DWORD; stdcall;
- {$EXTERNALSYM LPDHCP_PROB}
- PDhcpProb = LPDHCP_PROB;
-
-{
-Routine Description:
-
- This routine is called whenever special events occur that cause
- the packet to be dropped etc. The possible ControlCodes and their
- meanings are as follows:
-
- * DHCP_PROB_CONFLICT - The address attempted to be offered
- (AltAddress) is in use in the network already.
- * DHCP_PROB_DECLINE - The packet was a DECLINE message for the
- address specified in AltAddress.
- * DHCP_PROB_RELEASE - The packet was a RELEASE message for the
- address specified in AltAddress.
- * DHCP_PROB_NACKED - The packet was a REQUEST message for address
- specified in AltAddress and it was NACKed by the server.
-
- This routine should not block.
-
-Arguments:
-
- Packet - This parameter is the buffer of the packet being
- processed.
-
- PacketSize - This is the size of the above buffer.
-
- ControlCode - Specifies the event. See description below for
- control codes and meanings.
-
- IpAddress - IpV4 address of socket this packet was received on.
-
- AltAddress - Request IpV4 Address or Ip address that is in
- conflict.
-
- Reserved - Reserve for future use.
-
- PktContext - This is the context returned by the NewPkt hook for
- this packet.
-}
-
-type
- LPDHCP_GIVE_ADDRESS = function(Packet: LPBYTE; PacketSize, ControlCode, IpAddress,
- AltAddress, AddrType, LeaseTime: DWORD; Reserved, PktContext: LPVOID): DWORD; stdcall;
- {$EXTERNALSYM LPDHCP_GIVE_ADDRESS}
- PDhcpGiveAddress = LPDHCP_GIVE_ADDRESS;
-
-{
-Routine Description:
-
- This routine is called when the server is about to send an ACK to
- a REQUEST message. The ControlCode specifies if the address is a
- totally new address or if it an renewal of an old address (with
- values DHCP_GIVE_ADDRESS_NEW and DHCP_GIVE_ADDRESS_OLD
- respectively). The address being offered is passed as the
- AltAddress parameter and the AddrType parameter can be one of
- DHCP_CLIENT_BOOTP or DHCP_CLIENT_DHCP indicating whether the
- client is using BOOTP or DHCP respectively. This call should not
- block.
-
-Arguments:
-
- Packet - This parameter is the buffer of the packet being
- processed.
-
- PacketSize - This is the size of the above buffer.
-
- ControlCode - See description above for control codes and
- meanings.
-
- IpAddress - IpV4 address of socket this packet was received on.
-
- AltAddress - IpV4 address being ACKed to the client.
-
- AddrType - Is this a DHCP or BOOTP address?
-
- LeaseTime - Lease duration being passed.
-
- Reserved - Reserve for future use.
-
- PktContext - This is the context returned by the NewPkt hook for
- this packet.
-}
-
-type
- LPDHCP_HANDLE_OPTIONS = function(Packet: LPBYTE; PacketSize: DWORD;
- Reserved, PktContext: LPVOID; ServerOptions: DHCP_SERVER_OPTIONS): DWORD; stdcall;
- {$EXTERNALSYM LPDHCP_HANDLE_OPTIONS}
- TDhcpHandleOptions = LPDHCP_HANDLE_OPTIONS;
-
-{
-Routine Description:
-
- This routine can be utilized by the CalloutDLL to avoid parsing
- the whole packet. The packet is parsed by the server and some
- commonly used options are returned in the parsed pointers
- structure (see header for definition of DHCP_SERVER_OPTIONS). The
- hook is expected to make a copy of the structure pointed to by
- ServerOptions if it needs it beyond this function call. This
- routine may be called several times for a single packet. This
- routine should not block.
-
-Arguments:
-
- Packet - This parameter is the buffer of the packet being
- processed.
-
- PacketSize - This is the size of the above buffer.
-
- Reserved - Reserve for future use.
-
- PktContext - This is the context returned by the NewPkt hook for
- this packet.
-
- ServerOptions - This parameter is the structure that contains a
- bunch of pointers that represent corresponding options.
-}
-
-type
- LPDHCP_DELETE_CLIENT = function(IpAddress: DWORD; HwAddress: LPBYTE;
- HwAddressLength: ULONG; Reserved, ClientType: DWORD): DWORD; stdcall;
- {$EXTERNALSYM LPDHCP_DELETE_CLIENT}
- PDhcpDeleteClient = LPDHCP_DELETE_CLIENT;
-
-{
-Routine Description:
-
- This routine is called before a client lease is deleted off the
- active leases database. The ClientType field is currently not
- provided and this should not be used. This routine should not
- block.
-
-Arguments:
-
- IpAddress - IpV4 address of the client lease being deleted.
-
- HwAddress - Buffer holding the Hardware address of the client (MAC).
-
- HwAddressLength - This specifies the length of the above buffer.
-
- Reserved - Reserved for future use.
-
- ClientType - Reserved for future use.
-}
-
-type
- _DHCP_CALLOUT_TABLE = record
- DhcpControlHook: LPDHCP_CONTROL;
- DhcpNewPktHook: LPDHCP_NEWPKT;
- DhcpPktDropHook: LPDHCP_DROP_SEND;
- DhcpPktSendHook: LPDHCP_DROP_SEND;
- DhcpAddressDelHook: LPDHCP_PROB;
- DhcpAddressOfferHook: LPDHCP_GIVE_ADDRESS;
- DhcpHandleOptionsHook: LPDHCP_HANDLE_OPTIONS;
- DhcpDeleteClientHook: LPDHCP_DELETE_CLIENT;
- DhcpExtensionHook: LPVOID;
- DhcpReservedHook: LPVOID;
- end;
- {$EXTERNALSYM _DHCP_CALLOUT_TABLE}
- DHCP_CALLOUT_TABLE = _DHCP_CALLOUT_TABLE;
- {$EXTERNALSYM DHCP_CALLOUT_TABLE}
- LPDHCP_CALLOUT_TABLE = ^DHCP_CALLOUT_TABLE;
- {$EXTERNALSYM LPDHCP_CALLOUT_TABLE}
- TDhcpCalloutTable = DHCP_CALLOUT_TABLE;
- PDhcpCalloutTable = LPDHCP_CALLOUT_TABLE;
-
-type
- LPDHCP_ENTRY_POINT_FUNC = function(ChainDlls: LPWSTR; CalloutVersion: DWORD;
- var CalloutTbl: DHCP_CALLOUT_TABLE): DWORD; stdcall;
- {$EXTERNALSYM LPDHCP_ENTRY_POINT_FUNC}
- PDhcpEntryPointFunc = LPDHCP_ENTRY_POINT_FUNC;
-
-{
-Routine Description:
-
- This is the routine that is called by the DHCP Server when it
- successfully loads a DLL. If the routine succeeds, then the
- DHCP Server does not attempt to load any of the DLLs specified in
- the ChainDlls list of DLLs. If this function fails for some
- reason, then the DHCP Server proceeds to the next DLL in the
- ChainDlls structure.
-
- Note that for version negotiation, the server may call this
- routine several times until a compatible version is found.
-
- It is expected that the entrypoint routine would walk through the
- names of the dlls and attempt to load each of them and when it
- succeeds in retrieving the entry point, it attempts to get the
- cumulative set of hooks by repeating the above procedure(as done
- by the DHCP Server).
-
-Arguments:
-
- ChainDlls - This is a set of DLL names in REG_MULTI_SZ format (as
- returned by Registry function calls). This does not contain the
- name of the current DLL itself, but only the names of all DLLs
- that follow the current DLL.
-
- CalloutVersion - This is the version that the Callout DLL is
- expected to support. The current version number is 0.
-
- CalloutTbl - This is the cumulative set of Hooks that is needed by
- the current DLLs as well as all the DLLs in ChainDlls. It is the
- responsibility of the current DLL to retrive the cumulative set of
- Hooks and merge that with its own set of hooks and return that in
- this table structure. The table structure is defined above.
-}
-
-implementation
-
-end.
+{******************************************************************************}
+{ }
+{ DHCP Callout DLL API interface unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: dhcpssdk.h, released June 2000. The original Pascal }
+{ code is: DhcpSSdk.pas, released December 2000. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwadhcpssdk.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaDhcpSSdk;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "dhcpssdk.h"'}
+{$HPPEMIT ''}
+{$HPPEMIT 'typedef DHCP_IP_ADDRESS *LPDHCP_IP_ADDRESS;'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaWinNT, JwaWinType;
+
+// This structure could change any day. This will be accurate only for version 0 -- which
+// has to be checked for by any CalloutDLL that is hooking onto the DhcpHandleOptionsHook.
+
+type
+ DHCP_IP_ADDRESS = DWORD;
+ {$EXTERNALSYM DHCP_IP_ADDRESS}
+ LPDHCP_IP_ADDRESS = ^DHCP_IP_ADDRESS;
+ {$NODEFINE LPDHCP_IP_ADDRESS}
+ TDhcpIpAddress = DHCP_IP_ADDRESS;
+
+ _DHCP_SERVER_OPTIONS = record
+ MessageType: LPBYTE;
+ SubnetMask: LPDHCP_IP_ADDRESS;
+ RequestedAddress: LPDHCP_IP_ADDRESS;
+ RequestLeaseTime: LPDWORD;
+ OverlayFields: LPBYTE;
+ RouterAddress: LPDHCP_IP_ADDRESS;
+ Server: LPDHCP_IP_ADDRESS;
+ ParameterRequestList: LPBYTE;
+ ParameterRequestListLength: DWORD;
+ MachineName: PCHAR;
+ MachineNameLength: DWORD;
+ ClientHardwareAddressType: BYTE;
+ ClientHardwareAddressLength: BYTE;
+ ClientHardwareAddress: LPBYTE;
+ ClassIdentifier: PCHAR;
+ ClassIdentifierLength: DWORD;
+ VendorClass: LPBYTE;
+ VendorClassLength: DWORD;
+ DNSFlags: DWORD;
+ DNSNameLength: DWORD;
+ DNSName: LPBYTE;
+ DSDomainNameRequested: LongBool;
+ DSDomainName: PCHAR;
+ DSDomainNameLen: DWORD;
+ ScopeId: LPDWORD;
+ end;
+ {$EXTERNALSYM _DHCP_SERVER_OPTIONS}
+ DHCP_SERVER_OPTIONS = _DHCP_SERVER_OPTIONS;
+ {$EXTERNALSYM DHCP_SERVER_OPTIONS}
+ LPDHCP_SERVER_OPTIONS = ^DHCP_SERVER_OPTIONS;
+ {$EXTERNALSYM LPDHCP_SERVER_OPTIONS}
+ TDhcpServerOptions = DHCP_SERVER_OPTIONS;
+ PDhcpServerOptions = LPDHCP_SERVER_OPTIONS;
+
+//
+// The location in registry where the REG_MULTI_SZ list of callout DLLs
+// that the DHCP Server will try to load.
+//
+
+const
+ DHCP_CALLOUT_LIST_KEY = WideString('System\CurrentControlSet\Services\DHCPServer\Parameters');
+ {$EXTERNALSYM DHCP_CALLOUT_LIST_KEY}
+ DHCP_CALLOUT_LIST_VALUE = WideString('CalloutDlls');
+ {$EXTERNALSYM DHCP_CALLOUT_LIST_VALUE}
+ DHCP_CALLOUT_LIST_TYPE = REG_MULTI_SZ;
+ {$EXTERNALSYM DHCP_CALLOUT_LIST_TYPE}
+ DHCP_CALLOUT_ENTRY_POINT = 'DhcpServerCalloutEntry';
+ {$EXTERNALSYM DHCP_CALLOUT_ENTRY_POINT}
+
+//
+// Control CODES used by DHCP Server to notify server state change.
+//
+
+ DHCP_CONTROL_START = $00000001;
+ {$EXTERNALSYM DHCP_CONTROL_START}
+ DHCP_CONTROL_STOP = $00000002;
+ {$EXTERNALSYM DHCP_CONTROL_STOP}
+ DHCP_CONTROL_PAUSE = $00000003;
+ {$EXTERNALSYM DHCP_CONTROL_PAUSE}
+ DHCP_CONTROL_CONTINUE = $00000004;
+ {$EXTERNALSYM DHCP_CONTROL_CONTINUE}
+
+//
+// Other ControlCodes used by various Callout HOOKS.
+//
+
+ DHCP_DROP_DUPLICATE = $00000001; // duplicate of pkt being processed
+ {$EXTERNALSYM DHCP_DROP_DUPLICATE}
+ DHCP_DROP_NOMEM = $00000002; // not enough server mem in queues
+ {$EXTERNALSYM DHCP_DROP_NOMEM}
+ DHCP_DROP_INTERNAL_ERROR = $00000003; // ooops?
+ {$EXTERNALSYM DHCP_DROP_INTERNAL_ERROR}
+ DHCP_DROP_TIMEOUT = $00000004; // too late, pkt is too old
+ {$EXTERNALSYM DHCP_DROP_TIMEOUT}
+ DHCP_DROP_UNAUTH = $00000005; // server is not authorized to run
+ {$EXTERNALSYM DHCP_DROP_UNAUTH}
+ DHCP_DROP_PAUSED = $00000006; // service is paused
+ {$EXTERNALSYM DHCP_DROP_PAUSED}
+ DHCP_DROP_NO_SUBNETS = $00000007; // no subnets configured on server
+ {$EXTERNALSYM DHCP_DROP_NO_SUBNETS}
+ DHCP_DROP_INVALID = $00000008; // invalid packet or client
+ {$EXTERNALSYM DHCP_DROP_INVALID}
+ DHCP_DROP_WRONG_SERVER = $00000009; // client in different DS enterprise
+ {$EXTERNALSYM DHCP_DROP_WRONG_SERVER}
+ DHCP_DROP_NOADDRESS = $0000000A; // no address available to offer
+ {$EXTERNALSYM DHCP_DROP_NOADDRESS}
+ DHCP_DROP_PROCESSED = $0000000B; // packet has been processed
+ {$EXTERNALSYM DHCP_DROP_PROCESSED}
+ DHCP_DROP_GEN_FAILURE = $00000100; // catch-all error
+ {$EXTERNALSYM DHCP_DROP_GEN_FAILURE}
+ DHCP_SEND_PACKET = $10000000; // send the packet on wire
+ {$EXTERNALSYM DHCP_SEND_PACKET}
+ DHCP_PROB_CONFLICT = $20000001; // address conflicted..
+ {$EXTERNALSYM DHCP_PROB_CONFLICT}
+ DHCP_PROB_DECLINE = $20000002; // an addr got declined
+ {$EXTERNALSYM DHCP_PROB_DECLINE}
+ DHCP_PROB_RELEASE = $20000003; // an addr got released
+ {$EXTERNALSYM DHCP_PROB_RELEASE}
+ DHCP_PROB_NACKED = $20000004; // a client is being nacked.
+ {$EXTERNALSYM DHCP_PROB_NACKED}
+ DHCP_GIVE_ADDRESS_NEW = $30000001; // give client a "new" address
+ {$EXTERNALSYM DHCP_GIVE_ADDRESS_NEW}
+ DHCP_GIVE_ADDRESS_OLD = $30000002; // renew client's "old" address
+ {$EXTERNALSYM DHCP_GIVE_ADDRESS_OLD}
+ DHCP_CLIENT_BOOTP = $30000003; // client is a BOOTP client
+ {$EXTERNALSYM DHCP_CLIENT_BOOTP}
+ DHCP_CLIENT_DHCP = $30000004; // client is a DHCP client
+ {$EXTERNALSYM DHCP_CLIENT_DHCP}
+
+type
+ LPDHCP_CONTROL = function(dwControlCode: DWORD; lpReserved: LPVOID): DWORD; stdcall;
+ {$EXTERNALSYM LPDHCP_CONTROL}
+ PDhcpControl = LPDHCP_CONTROL;
+
+{
+Routine Description:
+
+ This routine is called whenever the DHCP Server service is
+ started, stopped, paused or continued as defined by the values of
+ the dwControlCode parameter. The lpReserved parameter is reserved
+ for future use and it should not be interpreted in any way. This
+ routine should not block.
+
+Arguments:
+
+ dwControlCode - one of the DHCP_CONTROL_* values
+ lpReserved - reserved for future use.
+
+}
+
+type
+ LPDHCP_NEWPKT = function(var Packet: LPBYTE; var PacketSize: DWORD; IpAddress: DWORD;
+ Reserved: LPVOID; var PktContext: LPVOID; ProcessIt: LPBOOL): DWORD; stdcall;
+ {$EXTERNALSYM LPDHCP_NEWPKT}
+ PDhcpNewPkt = LPDHCP_NEWPKT;
+
+{
+Routine Description:
+
+ This routine is called soon after the DHCP Server receives a
+ packet that it attempts to process. This routine is in the
+ critical path of server execution and should return very fast, as
+ otherwise server performance will be impacted. The Callout DLL
+ can modify the buffer or return a new buffer via the Packet,
+ PacketSize arguments. Also, if the callout DLL has internal
+ structures to keep track of the packet and its progress, it can
+ then return a context to this packet in the PktContext parameter.
+ This context will be passed to almost all other hooks to indicate
+ the packet being referred to. Also, if the Callout DLL is
+ planning on processing the packet or for some other reason the
+ DHCP server is not expected to process this packet, then it can
+ set the ProcessIt flag to FALSE to indicate that the packet is to
+ be dropped.
+
+Arguments:
+
+ Packet - This parameter points to a character buffer that holds
+ the actual packet received by the DHCP Server.
+
+ PacketSize - This parameter points to a variable that holds the
+ size of the above buffer.
+
+ IpAddress - This parameter points to an IPV4 host order IP address
+ of the socket that this packet was received on.
+
+ Reserved -Reserved for future use.
+
+ PktContect - This is an opaque pointer used by the DHCP Server for
+ future references to this packet. It is expected that the callout
+ DLL will provide this pointer if it is interested in keeping track
+ of the packet. (See the descriptions for the hooks below for
+ other usage of this Context).
+
+ ProcessIt - This is a BOOL flag that the CalloutDll can set to
+ TRUE or reset to indicate if the DHCP Server should continue
+ processing this packet or not, respectively.
+}
+
+type
+ LPDHCP_DROP_SEND = function(var Packet: LPBYTE; var PacketSize: DWORD;
+ ControlCode, IpAddress: DWORD; Reserved, PktContext: LPVOID): DWORD; stdcall;
+ {$EXTERNALSYM LPDHCP_DROP_SEND}
+ PDhcpDropSend = LPDHCP_DROP_SEND;
+
+{
+Routine Description:
+
+ This hook is called if a packet is (DropPktHook) dropped for some
+ reason or if the packet is completely processed. (If a packet is
+ dropped, the hook is called twice as it is called once again to
+ note that the packet has been completely processed). The callout
+ DLL should be prepared to handle this hook multiple times for a
+ packet. This routine should not block. The ControlCode parameter
+ defines the reasons for the packet being dropped:
+
+ * DHCP_DROP_DUPLICATE - This packet is a duplicate of another
+ received by the server.
+ * DHCP_DROP_NOMEM - Not enough memory to process the packet.
+ * DHCP_DROP_INTERNAL_ERROR - Unexpected nternal error occurred.
+ * DHCP_DROP_TIMEOUT - The packet is too old to process.
+ * DHCP_DROP_UNAUTH - The server is not authorized.
+ * DHCP_DROP_PAUSED - The server is paused.
+ * DHCP_DROP_NO_SUBNETS - There are no subnets configured.
+ * DHCP_DROP_INVALID - The packet is invalid or it came on an
+ invalid socket ..
+ * DHCP_DROP_WRONG_SERVER - The packet was sent to the wrong DHCP Server.
+ * DHCP_DROP_NOADDRESS - There is no address to offer.
+ * DHCP_DROP_PROCESSED - The packet has been processed.
+ * DHCP_DROP_GEN_FAILURE - An unknown error occurred.
+
+ This routine is also called right before a response is sent down
+ the wire (SendPktHook) and in this case the ControlCode has a
+ value of DHCP_SEND_PACKET.
+
+Arguments:
+
+ Packet - This parameter points to a character buffer that holds
+ the packet being processed by the DHCP Server.
+
+ PacketSize - This parameter points to a variable that holds the
+ size of the above buffer.
+
+ ControlCode - See description for various control codes.
+
+ IpAddress - This parameter points to an IPV4 host order IP address
+ of the socket that this packet was received on.
+
+ Reserved - Reserved for future use.
+
+ PktContext - This parameter is the packet context that the Callout
+ DLL NewPkt Hook returned for this packet. This can be used to
+ track a packet.
+}
+
+type
+ LPDHCP_PROB = function(Packet: LPBYTE; PacketSize, ControlCode, IpAddress,
+ AltAddress: DWORD; Reserved, PktContext: LPVOID): DWORD; stdcall;
+ {$EXTERNALSYM LPDHCP_PROB}
+ PDhcpProb = LPDHCP_PROB;
+
+{
+Routine Description:
+
+ This routine is called whenever special events occur that cause
+ the packet to be dropped etc. The possible ControlCodes and their
+ meanings are as follows:
+
+ * DHCP_PROB_CONFLICT - The address attempted to be offered
+ (AltAddress) is in use in the network already.
+ * DHCP_PROB_DECLINE - The packet was a DECLINE message for the
+ address specified in AltAddress.
+ * DHCP_PROB_RELEASE - The packet was a RELEASE message for the
+ address specified in AltAddress.
+ * DHCP_PROB_NACKED - The packet was a REQUEST message for address
+ specified in AltAddress and it was NACKed by the server.
+
+ This routine should not block.
+
+Arguments:
+
+ Packet - This parameter is the buffer of the packet being
+ processed.
+
+ PacketSize - This is the size of the above buffer.
+
+ ControlCode - Specifies the event. See description below for
+ control codes and meanings.
+
+ IpAddress - IpV4 address of socket this packet was received on.
+
+ AltAddress - Request IpV4 Address or Ip address that is in
+ conflict.
+
+ Reserved - Reserve for future use.
+
+ PktContext - This is the context returned by the NewPkt hook for
+ this packet.
+}
+
+type
+ LPDHCP_GIVE_ADDRESS = function(Packet: LPBYTE; PacketSize, ControlCode, IpAddress,
+ AltAddress, AddrType, LeaseTime: DWORD; Reserved, PktContext: LPVOID): DWORD; stdcall;
+ {$EXTERNALSYM LPDHCP_GIVE_ADDRESS}
+ PDhcpGiveAddress = LPDHCP_GIVE_ADDRESS;
+
+{
+Routine Description:
+
+ This routine is called when the server is about to send an ACK to
+ a REQUEST message. The ControlCode specifies if the address is a
+ totally new address or if it an renewal of an old address (with
+ values DHCP_GIVE_ADDRESS_NEW and DHCP_GIVE_ADDRESS_OLD
+ respectively). The address being offered is passed as the
+ AltAddress parameter and the AddrType parameter can be one of
+ DHCP_CLIENT_BOOTP or DHCP_CLIENT_DHCP indicating whether the
+ client is using BOOTP or DHCP respectively. This call should not
+ block.
+
+Arguments:
+
+ Packet - This parameter is the buffer of the packet being
+ processed.
+
+ PacketSize - This is the size of the above buffer.
+
+ ControlCode - See description above for control codes and
+ meanings.
+
+ IpAddress - IpV4 address of socket this packet was received on.
+
+ AltAddress - IpV4 address being ACKed to the client.
+
+ AddrType - Is this a DHCP or BOOTP address?
+
+ LeaseTime - Lease duration being passed.
+
+ Reserved - Reserve for future use.
+
+ PktContext - This is the context returned by the NewPkt hook for
+ this packet.
+}
+
+type
+ LPDHCP_HANDLE_OPTIONS = function(Packet: LPBYTE; PacketSize: DWORD;
+ Reserved, PktContext: LPVOID; ServerOptions: DHCP_SERVER_OPTIONS): DWORD; stdcall;
+ {$EXTERNALSYM LPDHCP_HANDLE_OPTIONS}
+ TDhcpHandleOptions = LPDHCP_HANDLE_OPTIONS;
+
+{
+Routine Description:
+
+ This routine can be utilized by the CalloutDLL to avoid parsing
+ the whole packet. The packet is parsed by the server and some
+ commonly used options are returned in the parsed pointers
+ structure (see header for definition of DHCP_SERVER_OPTIONS). The
+ hook is expected to make a copy of the structure pointed to by
+ ServerOptions if it needs it beyond this function call. This
+ routine may be called several times for a single packet. This
+ routine should not block.
+
+Arguments:
+
+ Packet - This parameter is the buffer of the packet being
+ processed.
+
+ PacketSize - This is the size of the above buffer.
+
+ Reserved - Reserve for future use.
+
+ PktContext - This is the context returned by the NewPkt hook for
+ this packet.
+
+ ServerOptions - This parameter is the structure that contains a
+ bunch of pointers that represent corresponding options.
+}
+
+type
+ LPDHCP_DELETE_CLIENT = function(IpAddress: DWORD; HwAddress: LPBYTE;
+ HwAddressLength: ULONG; Reserved, ClientType: DWORD): DWORD; stdcall;
+ {$EXTERNALSYM LPDHCP_DELETE_CLIENT}
+ PDhcpDeleteClient = LPDHCP_DELETE_CLIENT;
+
+{
+Routine Description:
+
+ This routine is called before a client lease is deleted off the
+ active leases database. The ClientType field is currently not
+ provided and this should not be used. This routine should not
+ block.
+
+Arguments:
+
+ IpAddress - IpV4 address of the client lease being deleted.
+
+ HwAddress - Buffer holding the Hardware address of the client (MAC).
+
+ HwAddressLength - This specifies the length of the above buffer.
+
+ Reserved - Reserved for future use.
+
+ ClientType - Reserved for future use.
+}
+
+type
+ _DHCP_CALLOUT_TABLE = record
+ DhcpControlHook: LPDHCP_CONTROL;
+ DhcpNewPktHook: LPDHCP_NEWPKT;
+ DhcpPktDropHook: LPDHCP_DROP_SEND;
+ DhcpPktSendHook: LPDHCP_DROP_SEND;
+ DhcpAddressDelHook: LPDHCP_PROB;
+ DhcpAddressOfferHook: LPDHCP_GIVE_ADDRESS;
+ DhcpHandleOptionsHook: LPDHCP_HANDLE_OPTIONS;
+ DhcpDeleteClientHook: LPDHCP_DELETE_CLIENT;
+ DhcpExtensionHook: LPVOID;
+ DhcpReservedHook: LPVOID;
+ end;
+ {$EXTERNALSYM _DHCP_CALLOUT_TABLE}
+ DHCP_CALLOUT_TABLE = _DHCP_CALLOUT_TABLE;
+ {$EXTERNALSYM DHCP_CALLOUT_TABLE}
+ LPDHCP_CALLOUT_TABLE = ^DHCP_CALLOUT_TABLE;
+ {$EXTERNALSYM LPDHCP_CALLOUT_TABLE}
+ TDhcpCalloutTable = DHCP_CALLOUT_TABLE;
+ PDhcpCalloutTable = LPDHCP_CALLOUT_TABLE;
+
+type
+ LPDHCP_ENTRY_POINT_FUNC = function(ChainDlls: LPWSTR; CalloutVersion: DWORD;
+ var CalloutTbl: DHCP_CALLOUT_TABLE): DWORD; stdcall;
+ {$EXTERNALSYM LPDHCP_ENTRY_POINT_FUNC}
+ PDhcpEntryPointFunc = LPDHCP_ENTRY_POINT_FUNC;
+
+{
+Routine Description:
+
+ This is the routine that is called by the DHCP Server when it
+ successfully loads a DLL. If the routine succeeds, then the
+ DHCP Server does not attempt to load any of the DLLs specified in
+ the ChainDlls list of DLLs. If this function fails for some
+ reason, then the DHCP Server proceeds to the next DLL in the
+ ChainDlls structure.
+
+ Note that for version negotiation, the server may call this
+ routine several times until a compatible version is found.
+
+ It is expected that the entrypoint routine would walk through the
+ names of the dlls and attempt to load each of them and when it
+ succeeds in retrieving the entry point, it attempts to get the
+ cumulative set of hooks by repeating the above procedure(as done
+ by the DHCP Server).
+
+Arguments:
+
+ ChainDlls - This is a set of DLL names in REG_MULTI_SZ format (as
+ returned by Registry function calls). This does not contain the
+ name of the current DLL itself, but only the names of all DLLs
+ that follow the current DLL.
+
+ CalloutVersion - This is the version that the Callout DLL is
+ expected to support. The current version number is 0.
+
+ CalloutTbl - This is the cumulative set of Hooks that is needed by
+ the current DLLs as well as all the DLLs in ChainDlls. It is the
+ responsibility of the current DLL to retrive the cumulative set of
+ Hooks and merge that with its own set of hooks and return that in
+ this table structure. The table structure is defined above.
+}
+
+implementation
+
+end.
diff --git a/packages/extra/winunits/jwadlgs.pas b/packages/extra/winunits/jwadlgs.pas
index eaa701edb9..25f35d2d54 100644
--- a/packages/extra/winunits/jwadlgs.pas
+++ b/packages/extra/winunits/jwadlgs.pas
@@ -1,497 +1,497 @@
-{******************************************************************************}
-{ }
-{ UI dialog header information API interface unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: dlgs.h, released June 2000. The original Pascal }
-{ code is: Dlgs.pas, released December 2000. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwadlgs.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaDlgs;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "dlgs.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-//
-// Constant Declarations.
-//
-
-const
- ctlFirst = $0400;
- {$EXTERNALSYM ctlFirst}
- ctlLast = $04ff;
- {$EXTERNALSYM ctlLast}
-
-//
-// Push buttons.
-//
-
- psh1 = $0400;
- {$EXTERNALSYM psh1}
- psh2 = $0401;
- {$EXTERNALSYM psh2}
- psh3 = $0402;
- {$EXTERNALSYM psh3}
- psh4 = $0403;
- {$EXTERNALSYM psh4}
- psh5 = $0404;
- {$EXTERNALSYM psh5}
- psh6 = $0405;
- {$EXTERNALSYM psh6}
- psh7 = $0406;
- {$EXTERNALSYM psh7}
- psh8 = $0407;
- {$EXTERNALSYM psh8}
- psh9 = $0408;
- {$EXTERNALSYM psh9}
- psh10 = $0409;
- {$EXTERNALSYM psh10}
- psh11 = $040a;
- {$EXTERNALSYM psh11}
- psh12 = $040b;
- {$EXTERNALSYM psh12}
- psh13 = $040c;
- {$EXTERNALSYM psh13}
- psh14 = $040d;
- {$EXTERNALSYM psh14}
- psh15 = $040e;
- {$EXTERNALSYM psh15}
- pshHelp = psh15;
- {$EXTERNALSYM pshHelp}
- psh16 = $040f;
- {$EXTERNALSYM psh16}
-
-//
-// Checkboxes.
-//
-
- chx1 = $0410;
- {$EXTERNALSYM chx1}
- chx2 = $0411;
- {$EXTERNALSYM chx2}
- chx3 = $0412;
- {$EXTERNALSYM chx3}
- chx4 = $0413;
- {$EXTERNALSYM chx4}
- chx5 = $0414;
- {$EXTERNALSYM chx5}
- chx6 = $0415;
- {$EXTERNALSYM chx6}
- chx7 = $0416;
- {$EXTERNALSYM chx7}
- chx8 = $0417;
- {$EXTERNALSYM chx8}
- chx9 = $0418;
- {$EXTERNALSYM chx9}
- chx10 = $0419;
- {$EXTERNALSYM chx10}
- chx11 = $041a;
- {$EXTERNALSYM chx11}
- chx12 = $041b;
- {$EXTERNALSYM chx12}
- chx13 = $041c;
- {$EXTERNALSYM chx13}
- chx14 = $041d;
- {$EXTERNALSYM chx14}
- chx15 = $041e;
- {$EXTERNALSYM chx15}
- chx16 = $041f;
- {$EXTERNALSYM chx16}
-
-//
-// Radio buttons.
-//
-
- rad1 = $0420;
- {$EXTERNALSYM rad1}
- rad2 = $0421;
- {$EXTERNALSYM rad2}
- rad3 = $0422;
- {$EXTERNALSYM rad3}
- rad4 = $0423;
- {$EXTERNALSYM rad4}
- rad5 = $0424;
- {$EXTERNALSYM rad5}
- rad6 = $0425;
- {$EXTERNALSYM rad6}
- rad7 = $0426;
- {$EXTERNALSYM rad7}
- rad8 = $0427;
- {$EXTERNALSYM rad8}
- rad9 = $0428;
- {$EXTERNALSYM rad9}
- rad10 = $0429;
- {$EXTERNALSYM rad10}
- rad11 = $042a;
- {$EXTERNALSYM rad11}
- rad12 = $042b;
- {$EXTERNALSYM rad12}
- rad13 = $042c;
- {$EXTERNALSYM rad13}
- rad14 = $042d;
- {$EXTERNALSYM rad14}
- rad15 = $042e;
- {$EXTERNALSYM rad15}
- rad16 = $042f;
- {$EXTERNALSYM rad16}
-
-//
-// Groups, frames, rectangles, and icons.
-//
-
- grp1 = $0430;
- {$EXTERNALSYM grp1}
- grp2 = $0431;
- {$EXTERNALSYM grp2}
- grp3 = $0432;
- {$EXTERNALSYM grp3}
- grp4 = $0433;
- {$EXTERNALSYM grp4}
- frm1 = $0434;
- {$EXTERNALSYM frm1}
- frm2 = $0435;
- {$EXTERNALSYM frm2}
- frm3 = $0436;
- {$EXTERNALSYM frm3}
- frm4 = $0437;
- {$EXTERNALSYM frm4}
- rct1 = $0438;
- {$EXTERNALSYM rct1}
- rct2 = $0439;
- {$EXTERNALSYM rct2}
- rct3 = $043a;
- {$EXTERNALSYM rct3}
- rct4 = $043b;
- {$EXTERNALSYM rct4}
- ico1 = $043c;
- {$EXTERNALSYM ico1}
- ico2 = $043d;
- {$EXTERNALSYM ico2}
- ico3 = $043e;
- {$EXTERNALSYM ico3}
- ico4 = $043f;
- {$EXTERNALSYM ico4}
-
-//
-// Static text.
-//
-
- stc1 = $0440;
- {$EXTERNALSYM stc1}
- stc2 = $0441;
- {$EXTERNALSYM stc2}
- stc3 = $0442;
- {$EXTERNALSYM stc3}
- stc4 = $0443;
- {$EXTERNALSYM stc4}
- stc5 = $0444;
- {$EXTERNALSYM stc5}
- stc6 = $0445;
- {$EXTERNALSYM stc6}
- stc7 = $0446;
- {$EXTERNALSYM stc7}
- stc8 = $0447;
- {$EXTERNALSYM stc8}
- stc9 = $0448;
- {$EXTERNALSYM stc9}
- stc10 = $0449;
- {$EXTERNALSYM stc10}
- stc11 = $044a;
- {$EXTERNALSYM stc11}
- stc12 = $044b;
- {$EXTERNALSYM stc12}
- stc13 = $044c;
- {$EXTERNALSYM stc13}
- stc14 = $044d;
- {$EXTERNALSYM stc14}
- stc15 = $044e;
- {$EXTERNALSYM stc15}
- stc16 = $044f;
- {$EXTERNALSYM stc16}
- stc17 = $0450;
- {$EXTERNALSYM stc17}
- stc18 = $0451;
- {$EXTERNALSYM stc18}
- stc19 = $0452;
- {$EXTERNALSYM stc19}
- stc20 = $0453;
- {$EXTERNALSYM stc20}
- stc21 = $0454;
- {$EXTERNALSYM stc21}
- stc22 = $0455;
- {$EXTERNALSYM stc22}
- stc23 = $0456;
- {$EXTERNALSYM stc23}
- stc24 = $0457;
- {$EXTERNALSYM stc24}
- stc25 = $0458;
- {$EXTERNALSYM stc25}
- stc26 = $0459;
- {$EXTERNALSYM stc26}
- stc27 = $045a;
- {$EXTERNALSYM stc27}
- stc28 = $045b;
- {$EXTERNALSYM stc28}
- stc29 = $045c;
- {$EXTERNALSYM stc29}
- stc30 = $045d;
- {$EXTERNALSYM stc30}
- stc31 = $045e;
- {$EXTERNALSYM stc31}
- stc32 = $045f;
- {$EXTERNALSYM stc32}
-
-//
-// Listboxes.
-//
-
- lst1 = $0460;
- {$EXTERNALSYM lst1}
- lst2 = $0461;
- {$EXTERNALSYM lst2}
- lst3 = $0462;
- {$EXTERNALSYM lst3}
- lst4 = $0463;
- {$EXTERNALSYM lst4}
- lst5 = $0464;
- {$EXTERNALSYM lst5}
- lst6 = $0465;
- {$EXTERNALSYM lst6}
- lst7 = $0466;
- {$EXTERNALSYM lst7}
- lst8 = $0467;
- {$EXTERNALSYM lst8}
- lst9 = $0468;
- {$EXTERNALSYM lst9}
- lst10 = $0469;
- {$EXTERNALSYM lst10}
- lst11 = $046a;
- {$EXTERNALSYM lst11}
- lst12 = $046b;
- {$EXTERNALSYM lst12}
- lst13 = $046c;
- {$EXTERNALSYM lst13}
- lst14 = $046d;
- {$EXTERNALSYM lst14}
- lst15 = $046e;
- {$EXTERNALSYM lst15}
- lst16 = $046f;
- {$EXTERNALSYM lst16}
-
-//
-// Combo boxes.
-//
-
- cmb1 = $0470;
- {$EXTERNALSYM cmb1}
- cmb2 = $0471;
- {$EXTERNALSYM cmb2}
- cmb3 = $0472;
- {$EXTERNALSYM cmb3}
- cmb4 = $0473;
- {$EXTERNALSYM cmb4}
- cmb5 = $0474;
- {$EXTERNALSYM cmb5}
- cmb6 = $0475;
- {$EXTERNALSYM cmb6}
- cmb7 = $0476;
- {$EXTERNALSYM cmb7}
- cmb8 = $0477;
- {$EXTERNALSYM cmb8}
- cmb9 = $0478;
- {$EXTERNALSYM cmb9}
- cmb10 = $0479;
- {$EXTERNALSYM cmb10}
- cmb11 = $047a;
- {$EXTERNALSYM cmb11}
- cmb12 = $047b;
- {$EXTERNALSYM cmb12}
- cmb13 = $047c;
- {$EXTERNALSYM cmb13}
- cmb14 = $047d;
- {$EXTERNALSYM cmb14}
- cmb15 = $047e;
- {$EXTERNALSYM cmb15}
- cmb16 = $047f;
- {$EXTERNALSYM cmb16}
-
-//
-// Edit controls.
-//
-
- edt1 = $0480;
- {$EXTERNALSYM edt1}
- edt2 = $0481;
- {$EXTERNALSYM edt2}
- edt3 = $0482;
- {$EXTERNALSYM edt3}
- edt4 = $0483;
- {$EXTERNALSYM edt4}
- edt5 = $0484;
- {$EXTERNALSYM edt5}
- edt6 = $0485;
- {$EXTERNALSYM edt6}
- edt7 = $0486;
- {$EXTERNALSYM edt7}
- edt8 = $0487;
- {$EXTERNALSYM edt8}
- edt9 = $0488;
- {$EXTERNALSYM edt9}
- edt10 = $0489;
- {$EXTERNALSYM edt10}
- edt11 = $048a;
- {$EXTERNALSYM edt11}
- edt12 = $048b;
- {$EXTERNALSYM edt12}
- edt13 = $048c;
- {$EXTERNALSYM edt13}
- edt14 = $048d;
- {$EXTERNALSYM edt14}
- edt15 = $048e;
- {$EXTERNALSYM edt15}
- edt16 = $048f;
- {$EXTERNALSYM edt16}
-
-//
-// Scroll bars.
-//
-
- scr1 = $0490;
- {$EXTERNALSYM scr1}
- scr2 = $0491;
- {$EXTERNALSYM scr2}
- scr3 = $0492;
- {$EXTERNALSYM scr3}
- scr4 = $0493;
- {$EXTERNALSYM scr4}
- scr5 = $0494;
- {$EXTERNALSYM scr5}
- scr6 = $0495;
- {$EXTERNALSYM scr6}
- scr7 = $0496;
- {$EXTERNALSYM scr7}
- scr8 = $0497;
- {$EXTERNALSYM scr8}
-
-//
-// Controls
-//
-
- ctl1 = $04A0;
- {$EXTERNALSYM ctl1}
-
-//
-// These dialog resource ordinals really start at 0x0600, but the
-// RC Compiler can't handle hex for resource IDs, hence the decimal.
-//
-
- {$IFDEF UNIX}
-
- MW_BIG_FILEOPENORD = 10000;
- {$EXTERNALSYM MW_BIG_FILEOPENORD}
- MW_BIG_MULTIFILEOPENORD = 10001;
- {$EXTERNALSYM MW_BIG_MULTIFILEOPENORD}
-
- FILEOPENORDMOTIF = 10003;
- {$EXTERNALSYM FILEOPENORDMOTIF}
- PRINTDLGORDMOTIF = 10004;
- {$EXTERNALSYM PRINTDLGORDMOTIF}
- FINDDLGORDMOTIF = 10005;
- {$EXTERNALSYM FINDDLGORDMOTIF}
-
- {$ENDIF UNIX}
-
- FILEOPENORD = 1536;
- {$EXTERNALSYM FILEOPENORD}
- MULTIFILEOPENORD = 1537;
- {$EXTERNALSYM MULTIFILEOPENORD}
- PRINTDLGORD = 1538;
- {$EXTERNALSYM PRINTDLGORD}
- PRNSETUPDLGORD = 1539;
- {$EXTERNALSYM PRNSETUPDLGORD}
- FINDDLGORD = 1540;
- {$EXTERNALSYM FINDDLGORD}
- REPLACEDLGORD = 1541;
- {$EXTERNALSYM REPLACEDLGORD}
- FONTDLGORD = 1542;
- {$EXTERNALSYM FONTDLGORD}
- FORMATDLGORD31 = 1543;
- {$EXTERNALSYM FORMATDLGORD31}
- FORMATDLGORD30 = 1544;
- {$EXTERNALSYM FORMATDLGORD30}
- RUNDLGORD = 1545;
- {$EXTERNALSYM RUNDLGORD}
-
- PAGESETUPDLGORD = 1546;
- {$EXTERNALSYM PAGESETUPDLGORD}
- NEWFILEOPENORD = 1547;
- {$EXTERNALSYM NEWFILEOPENORD}
- PRINTDLGEXORD = 1549;
- {$EXTERNALSYM PRINTDLGEXORD}
- PAGESETUPDLGORDMOTIF = 1550;
- {$EXTERNALSYM PAGESETUPDLGORDMOTIF}
- COLORMGMTDLGORD = 1551;
- {$EXTERNALSYM COLORMGMTDLGORD}
- NEWFILEOPENV2ORD = 1552;
- {$EXTERNALSYM NEWFILEOPENV2ORD}
-
-//
-// Typedef Declarations.
-//
-
-type
- tagCRGB = record
- bRed: BYTE;
- bGreen: BYTE;
- bBlue: BYTE;
- bExtra: BYTE;
- end;
- {$EXTERNALSYM tagCRGB}
- CRGB = tagCRGB;
- {$EXTERNALSYM CRGB}
-
-implementation
-
-end.
+{******************************************************************************}
+{ }
+{ UI dialog header information API interface unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: dlgs.h, released June 2000. The original Pascal }
+{ code is: Dlgs.pas, released December 2000. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwadlgs.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaDlgs;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "dlgs.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+//
+// Constant Declarations.
+//
+
+const
+ ctlFirst = $0400;
+ {$EXTERNALSYM ctlFirst}
+ ctlLast = $04ff;
+ {$EXTERNALSYM ctlLast}
+
+//
+// Push buttons.
+//
+
+ psh1 = $0400;
+ {$EXTERNALSYM psh1}
+ psh2 = $0401;
+ {$EXTERNALSYM psh2}
+ psh3 = $0402;
+ {$EXTERNALSYM psh3}
+ psh4 = $0403;
+ {$EXTERNALSYM psh4}
+ psh5 = $0404;
+ {$EXTERNALSYM psh5}
+ psh6 = $0405;
+ {$EXTERNALSYM psh6}
+ psh7 = $0406;
+ {$EXTERNALSYM psh7}
+ psh8 = $0407;
+ {$EXTERNALSYM psh8}
+ psh9 = $0408;
+ {$EXTERNALSYM psh9}
+ psh10 = $0409;
+ {$EXTERNALSYM psh10}
+ psh11 = $040a;
+ {$EXTERNALSYM psh11}
+ psh12 = $040b;
+ {$EXTERNALSYM psh12}
+ psh13 = $040c;
+ {$EXTERNALSYM psh13}
+ psh14 = $040d;
+ {$EXTERNALSYM psh14}
+ psh15 = $040e;
+ {$EXTERNALSYM psh15}
+ pshHelp = psh15;
+ {$EXTERNALSYM pshHelp}
+ psh16 = $040f;
+ {$EXTERNALSYM psh16}
+
+//
+// Checkboxes.
+//
+
+ chx1 = $0410;
+ {$EXTERNALSYM chx1}
+ chx2 = $0411;
+ {$EXTERNALSYM chx2}
+ chx3 = $0412;
+ {$EXTERNALSYM chx3}
+ chx4 = $0413;
+ {$EXTERNALSYM chx4}
+ chx5 = $0414;
+ {$EXTERNALSYM chx5}
+ chx6 = $0415;
+ {$EXTERNALSYM chx6}
+ chx7 = $0416;
+ {$EXTERNALSYM chx7}
+ chx8 = $0417;
+ {$EXTERNALSYM chx8}
+ chx9 = $0418;
+ {$EXTERNALSYM chx9}
+ chx10 = $0419;
+ {$EXTERNALSYM chx10}
+ chx11 = $041a;
+ {$EXTERNALSYM chx11}
+ chx12 = $041b;
+ {$EXTERNALSYM chx12}
+ chx13 = $041c;
+ {$EXTERNALSYM chx13}
+ chx14 = $041d;
+ {$EXTERNALSYM chx14}
+ chx15 = $041e;
+ {$EXTERNALSYM chx15}
+ chx16 = $041f;
+ {$EXTERNALSYM chx16}
+
+//
+// Radio buttons.
+//
+
+ rad1 = $0420;
+ {$EXTERNALSYM rad1}
+ rad2 = $0421;
+ {$EXTERNALSYM rad2}
+ rad3 = $0422;
+ {$EXTERNALSYM rad3}
+ rad4 = $0423;
+ {$EXTERNALSYM rad4}
+ rad5 = $0424;
+ {$EXTERNALSYM rad5}
+ rad6 = $0425;
+ {$EXTERNALSYM rad6}
+ rad7 = $0426;
+ {$EXTERNALSYM rad7}
+ rad8 = $0427;
+ {$EXTERNALSYM rad8}
+ rad9 = $0428;
+ {$EXTERNALSYM rad9}
+ rad10 = $0429;
+ {$EXTERNALSYM rad10}
+ rad11 = $042a;
+ {$EXTERNALSYM rad11}
+ rad12 = $042b;
+ {$EXTERNALSYM rad12}
+ rad13 = $042c;
+ {$EXTERNALSYM rad13}
+ rad14 = $042d;
+ {$EXTERNALSYM rad14}
+ rad15 = $042e;
+ {$EXTERNALSYM rad15}
+ rad16 = $042f;
+ {$EXTERNALSYM rad16}
+
+//
+// Groups, frames, rectangles, and icons.
+//
+
+ grp1 = $0430;
+ {$EXTERNALSYM grp1}
+ grp2 = $0431;
+ {$EXTERNALSYM grp2}
+ grp3 = $0432;
+ {$EXTERNALSYM grp3}
+ grp4 = $0433;
+ {$EXTERNALSYM grp4}
+ frm1 = $0434;
+ {$EXTERNALSYM frm1}
+ frm2 = $0435;
+ {$EXTERNALSYM frm2}
+ frm3 = $0436;
+ {$EXTERNALSYM frm3}
+ frm4 = $0437;
+ {$EXTERNALSYM frm4}
+ rct1 = $0438;
+ {$EXTERNALSYM rct1}
+ rct2 = $0439;
+ {$EXTERNALSYM rct2}
+ rct3 = $043a;
+ {$EXTERNALSYM rct3}
+ rct4 = $043b;
+ {$EXTERNALSYM rct4}
+ ico1 = $043c;
+ {$EXTERNALSYM ico1}
+ ico2 = $043d;
+ {$EXTERNALSYM ico2}
+ ico3 = $043e;
+ {$EXTERNALSYM ico3}
+ ico4 = $043f;
+ {$EXTERNALSYM ico4}
+
+//
+// Static text.
+//
+
+ stc1 = $0440;
+ {$EXTERNALSYM stc1}
+ stc2 = $0441;
+ {$EXTERNALSYM stc2}
+ stc3 = $0442;
+ {$EXTERNALSYM stc3}
+ stc4 = $0443;
+ {$EXTERNALSYM stc4}
+ stc5 = $0444;
+ {$EXTERNALSYM stc5}
+ stc6 = $0445;
+ {$EXTERNALSYM stc6}
+ stc7 = $0446;
+ {$EXTERNALSYM stc7}
+ stc8 = $0447;
+ {$EXTERNALSYM stc8}
+ stc9 = $0448;
+ {$EXTERNALSYM stc9}
+ stc10 = $0449;
+ {$EXTERNALSYM stc10}
+ stc11 = $044a;
+ {$EXTERNALSYM stc11}
+ stc12 = $044b;
+ {$EXTERNALSYM stc12}
+ stc13 = $044c;
+ {$EXTERNALSYM stc13}
+ stc14 = $044d;
+ {$EXTERNALSYM stc14}
+ stc15 = $044e;
+ {$EXTERNALSYM stc15}
+ stc16 = $044f;
+ {$EXTERNALSYM stc16}
+ stc17 = $0450;
+ {$EXTERNALSYM stc17}
+ stc18 = $0451;
+ {$EXTERNALSYM stc18}
+ stc19 = $0452;
+ {$EXTERNALSYM stc19}
+ stc20 = $0453;
+ {$EXTERNALSYM stc20}
+ stc21 = $0454;
+ {$EXTERNALSYM stc21}
+ stc22 = $0455;
+ {$EXTERNALSYM stc22}
+ stc23 = $0456;
+ {$EXTERNALSYM stc23}
+ stc24 = $0457;
+ {$EXTERNALSYM stc24}
+ stc25 = $0458;
+ {$EXTERNALSYM stc25}
+ stc26 = $0459;
+ {$EXTERNALSYM stc26}
+ stc27 = $045a;
+ {$EXTERNALSYM stc27}
+ stc28 = $045b;
+ {$EXTERNALSYM stc28}
+ stc29 = $045c;
+ {$EXTERNALSYM stc29}
+ stc30 = $045d;
+ {$EXTERNALSYM stc30}
+ stc31 = $045e;
+ {$EXTERNALSYM stc31}
+ stc32 = $045f;
+ {$EXTERNALSYM stc32}
+
+//
+// Listboxes.
+//
+
+ lst1 = $0460;
+ {$EXTERNALSYM lst1}
+ lst2 = $0461;
+ {$EXTERNALSYM lst2}
+ lst3 = $0462;
+ {$EXTERNALSYM lst3}
+ lst4 = $0463;
+ {$EXTERNALSYM lst4}
+ lst5 = $0464;
+ {$EXTERNALSYM lst5}
+ lst6 = $0465;
+ {$EXTERNALSYM lst6}
+ lst7 = $0466;
+ {$EXTERNALSYM lst7}
+ lst8 = $0467;
+ {$EXTERNALSYM lst8}
+ lst9 = $0468;
+ {$EXTERNALSYM lst9}
+ lst10 = $0469;
+ {$EXTERNALSYM lst10}
+ lst11 = $046a;
+ {$EXTERNALSYM lst11}
+ lst12 = $046b;
+ {$EXTERNALSYM lst12}
+ lst13 = $046c;
+ {$EXTERNALSYM lst13}
+ lst14 = $046d;
+ {$EXTERNALSYM lst14}
+ lst15 = $046e;
+ {$EXTERNALSYM lst15}
+ lst16 = $046f;
+ {$EXTERNALSYM lst16}
+
+//
+// Combo boxes.
+//
+
+ cmb1 = $0470;
+ {$EXTERNALSYM cmb1}
+ cmb2 = $0471;
+ {$EXTERNALSYM cmb2}
+ cmb3 = $0472;
+ {$EXTERNALSYM cmb3}
+ cmb4 = $0473;
+ {$EXTERNALSYM cmb4}
+ cmb5 = $0474;
+ {$EXTERNALSYM cmb5}
+ cmb6 = $0475;
+ {$EXTERNALSYM cmb6}
+ cmb7 = $0476;
+ {$EXTERNALSYM cmb7}
+ cmb8 = $0477;
+ {$EXTERNALSYM cmb8}
+ cmb9 = $0478;
+ {$EXTERNALSYM cmb9}
+ cmb10 = $0479;
+ {$EXTERNALSYM cmb10}
+ cmb11 = $047a;
+ {$EXTERNALSYM cmb11}
+ cmb12 = $047b;
+ {$EXTERNALSYM cmb12}
+ cmb13 = $047c;
+ {$EXTERNALSYM cmb13}
+ cmb14 = $047d;
+ {$EXTERNALSYM cmb14}
+ cmb15 = $047e;
+ {$EXTERNALSYM cmb15}
+ cmb16 = $047f;
+ {$EXTERNALSYM cmb16}
+
+//
+// Edit controls.
+//
+
+ edt1 = $0480;
+ {$EXTERNALSYM edt1}
+ edt2 = $0481;
+ {$EXTERNALSYM edt2}
+ edt3 = $0482;
+ {$EXTERNALSYM edt3}
+ edt4 = $0483;
+ {$EXTERNALSYM edt4}
+ edt5 = $0484;
+ {$EXTERNALSYM edt5}
+ edt6 = $0485;
+ {$EXTERNALSYM edt6}
+ edt7 = $0486;
+ {$EXTERNALSYM edt7}
+ edt8 = $0487;
+ {$EXTERNALSYM edt8}
+ edt9 = $0488;
+ {$EXTERNALSYM edt9}
+ edt10 = $0489;
+ {$EXTERNALSYM edt10}
+ edt11 = $048a;
+ {$EXTERNALSYM edt11}
+ edt12 = $048b;
+ {$EXTERNALSYM edt12}
+ edt13 = $048c;
+ {$EXTERNALSYM edt13}
+ edt14 = $048d;
+ {$EXTERNALSYM edt14}
+ edt15 = $048e;
+ {$EXTERNALSYM edt15}
+ edt16 = $048f;
+ {$EXTERNALSYM edt16}
+
+//
+// Scroll bars.
+//
+
+ scr1 = $0490;
+ {$EXTERNALSYM scr1}
+ scr2 = $0491;
+ {$EXTERNALSYM scr2}
+ scr3 = $0492;
+ {$EXTERNALSYM scr3}
+ scr4 = $0493;
+ {$EXTERNALSYM scr4}
+ scr5 = $0494;
+ {$EXTERNALSYM scr5}
+ scr6 = $0495;
+ {$EXTERNALSYM scr6}
+ scr7 = $0496;
+ {$EXTERNALSYM scr7}
+ scr8 = $0497;
+ {$EXTERNALSYM scr8}
+
+//
+// Controls
+//
+
+ ctl1 = $04A0;
+ {$EXTERNALSYM ctl1}
+
+//
+// These dialog resource ordinals really start at 0x0600, but the
+// RC Compiler can't handle hex for resource IDs, hence the decimal.
+//
+
+ {$IFDEF UNIX}
+
+ MW_BIG_FILEOPENORD = 10000;
+ {$EXTERNALSYM MW_BIG_FILEOPENORD}
+ MW_BIG_MULTIFILEOPENORD = 10001;
+ {$EXTERNALSYM MW_BIG_MULTIFILEOPENORD}
+
+ FILEOPENORDMOTIF = 10003;
+ {$EXTERNALSYM FILEOPENORDMOTIF}
+ PRINTDLGORDMOTIF = 10004;
+ {$EXTERNALSYM PRINTDLGORDMOTIF}
+ FINDDLGORDMOTIF = 10005;
+ {$EXTERNALSYM FINDDLGORDMOTIF}
+
+ {$ENDIF UNIX}
+
+ FILEOPENORD = 1536;
+ {$EXTERNALSYM FILEOPENORD}
+ MULTIFILEOPENORD = 1537;
+ {$EXTERNALSYM MULTIFILEOPENORD}
+ PRINTDLGORD = 1538;
+ {$EXTERNALSYM PRINTDLGORD}
+ PRNSETUPDLGORD = 1539;
+ {$EXTERNALSYM PRNSETUPDLGORD}
+ FINDDLGORD = 1540;
+ {$EXTERNALSYM FINDDLGORD}
+ REPLACEDLGORD = 1541;
+ {$EXTERNALSYM REPLACEDLGORD}
+ FONTDLGORD = 1542;
+ {$EXTERNALSYM FONTDLGORD}
+ FORMATDLGORD31 = 1543;
+ {$EXTERNALSYM FORMATDLGORD31}
+ FORMATDLGORD30 = 1544;
+ {$EXTERNALSYM FORMATDLGORD30}
+ RUNDLGORD = 1545;
+ {$EXTERNALSYM RUNDLGORD}
+
+ PAGESETUPDLGORD = 1546;
+ {$EXTERNALSYM PAGESETUPDLGORD}
+ NEWFILEOPENORD = 1547;
+ {$EXTERNALSYM NEWFILEOPENORD}
+ PRINTDLGEXORD = 1549;
+ {$EXTERNALSYM PRINTDLGEXORD}
+ PAGESETUPDLGORDMOTIF = 1550;
+ {$EXTERNALSYM PAGESETUPDLGORDMOTIF}
+ COLORMGMTDLGORD = 1551;
+ {$EXTERNALSYM COLORMGMTDLGORD}
+ NEWFILEOPENV2ORD = 1552;
+ {$EXTERNALSYM NEWFILEOPENV2ORD}
+
+//
+// Typedef Declarations.
+//
+
+type
+ tagCRGB = record
+ bRed: BYTE;
+ bGreen: BYTE;
+ bBlue: BYTE;
+ bExtra: BYTE;
+ end;
+ {$EXTERNALSYM tagCRGB}
+ CRGB = tagCRGB;
+ {$EXTERNALSYM CRGB}
+
+implementation
+
+end.
diff --git a/packages/extra/winunits/jwadsadmin.pas b/packages/extra/winunits/jwadsadmin.pas
index 169cd76f72..c7f2ea6029 100644
--- a/packages/extra/winunits/jwadsadmin.pas
+++ b/packages/extra/winunits/jwadsadmin.pas
@@ -1,258 +1,258 @@
-{******************************************************************************}
-{ }
-{ Directory Services Admin API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: dsadmin.h, released June 2000. The original Pascal }
-{ code is: dsadmin.pas, released December 2000. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwadsadmin.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaDSAdmin;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "dsadmin.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- ActiveX {TODO}, JwaAdsTLB, JwaPrSht, JwaWinType;
-
-//
-// CoClass for the Object creation dialog object
-//
-// {E301A009-F901-11d2-82B9-00C04F68928B}
-
-const
- CLSID_DsAdminCreateObj: TGUID = (
- D1:$e301a009; D2:$f901; D3:$11d2; D4:($82, $b9, $0, $c0, $4f, $68, $92, $8b));
- {$EXTERNALSYM CLSID_DsAdminCreateObj}
-
-//
-// Interface GUIDs
-//
-
-// {53554A38-F902-11d2-82B9-00C04F68928B}
-
- IID_IDsAdminCreateObj: TGUID = (
- D1:$53554a38; D2:$f902; D3:$11d2; D4:($82, $b9, $0, $c0, $4f, $68, $92, $8b));
- {$EXTERNALSYM IID_IDsAdminCreateObj}
-
-// {F2573587-E6FC-11d2-82AF-00C04F68928B}
-
- IID_IDsAdminNewObj: TGUID = (
- D1:$f2573587; D2:$e6fc; D3:$11d2; D4:($82, $af, $0, $c0, $4f, $68, $92, $8b));
- {$EXTERNALSYM IID_IDsAdminNewObj}
-
-// {BE2B487E-F904-11d2-82B9-00C04F68928B}
-
- IID_IDsAdminNewObjPrimarySite: TGUID = (
- D1:$be2b487e; D2:$f904; D3:$11d2; D4:($82, $b9, $0, $c0, $4f, $68, $92, $8b));
- {$EXTERNALSYM IID_IDsAdminNewObjPrimarySite}
-
-// {6088EAE2-E7BF-11d2-82AF-00C04F68928B}
-
- IID_IDsAdminNewObjExt: TGUID = (
- D1:$6088eae2; D2:$e7bf; D3:$11d2; D4:($82, $af, $0, $c0, $4f, $68, $92, $8b));
- {$EXTERNALSYM IID_IDsAdminNewObjExt}
-
-// {E4A2B8B3-5A18-11d2-97C1-00A0C9A06D2D}
-
- IID_IDsAdminNotifyHandler: TGUID = (
- D1:$e4a2b8b3; D2:$5a18; D3:$11d2; D4:($97, $c1, $0, $a0, $c9, $a0, $6d, $2d));
- {$EXTERNALSYM IID_IDsAdminNotifyHandler}
-
-// ----------------------------------------------------------------------------
-//
-// Interface: IDsAdminCreateObj
-//
-// Implemented by the object (implemented by the system) CLSID_DsAdminCreateObj
-//
-// Used by: any client needing to invoke the creation UI
-//
-
-type
- IDsAdminCreateObj = interface (IUnknown)
- ['{53554A38-F902-11d2-82B9-00C04F68928B}']
- function Initialize(pADsContainerObj: IADsContainer; pADsCopySource: IADS;
- lpszClassName: LPCWSTR): HRESULT; stdcall;
- function CreateModal(hwndParent: HWND; out ppADsObj: IADS): HRESULT; stdcall;
- end;
- {$EXTERNALSYM IDsAdminCreateObj}
-
-//---------------------------------------------------------------------------
-//
-// Interface: IDsAdminNewObj
-//
-// Implemented by: DS Admin
-//
-// Used by: creation extension in proc server (both primary and regular)
-//
-
- IDsAdminNewObj = interface (IUnknown)
- ['{F2573587-E6FC-11d2-82AF-00C04F68928B}']
- function SetButtons(nCurrIndex: ULONG; bValid: BOOL): HRESULT; stdcall;
- function GetPageCounts(var pnTotal, pnStartIndex: LONG): HRESULT; stdcall;
- end;
- {$EXTERNALSYM IDsAdminNewObj}
-
-//---------------------------------------------------------------------------
-//
-// Interface: IDsAdminNewObjPrimarySite
-//
-// Implemented by: DS Admin
-//
-// Used by: creation extension in proc server (primary only)
-//
-
- IDsAdminNewObjPrimarySite = interface (IUnknown)
- ['{BE2B487E-F904-11d2-82B9-00C04F68928B}']
- function CreateNew(pszName: LPCWSTR): HRESULT; stdcall;
- function Commit: HRESULT; stdcall;
- end;
- {$EXTERNALSYM IDsAdminNewObjPrimarySite}
-
-//
-// struct passed to IDsAdminNewObjExt::Initialize()
-//
-// it contains information regarding UI look
-//
-
- LPDSA_NEWOBJ_DISPINFO = ^DSA_NEWOBJ_DISPINFO;
- {$EXTERNALSYM LPDSA_NEWOBJ_DISPINFO}
- DSA_NEWOBJ_DISPINFO = record
- dwSize: DWORD; // size of struct, for versioning
- hObjClassIcon: HICON; // class icon for the object to be created
- lpszWizTitle: LPWSTR; // title of the wizard
- lpszContDisplayName: LPWSTR; // container display name (canonical name)
- end;
- {$EXTERNALSYM DSA_NEWOBJ_DISPINFO}
- TDsaNewObjDispInfo = DSA_NEWOBJ_DISPINFO;
- PDsaNewObjDispInfo = LPDSA_NEWOBJ_DISPINFO;
-
-//
-// context flags passed to IDsAdminNewObjExt::OnError() and to IDsAdminNewObjExt::WriteData()
-//
-
-const
- DSA_NEWOBJ_CTX_PRECOMMIT = $00000001; // before SetInfo()
- {$EXTERNALSYM DSA_NEWOBJ_CTX_PRECOMMIT}
- DSA_NEWOBJ_CTX_COMMIT = $00000002; // SetInfo(), commit phase
- {$EXTERNALSYM DSA_NEWOBJ_CTX_COMMIT}
- DSA_NEWOBJ_CTX_POSTCOMMIT = $00000003; // after SetInfo()
- {$EXTERNALSYM DSA_NEWOBJ_CTX_POSTCOMMIT}
- DSA_NEWOBJ_CTX_CLEANUP = $00000004; // on post commit fail
- {$EXTERNALSYM DSA_NEWOBJ_CTX_CLEANUP}
-
-//---------------------------------------------------------------------------
-//
-// Interface: IDsAdminNewObjExt
-//
-// Implemented by: creation extension in proc server (both primary and regular)
-//
-// Used by: DS Admin
-//
-
-type
- IDsAdminNewObjExt = interface (IUnknown)
- ['{6088EAE2-E7BF-11d2-82AF-00C04F68928B}']
- function Initialize(pADsContainerObj: IADsContainer; pADsCopySource: IADs;
- lpszClassName: LPCWSTR; pDsAdminNewObj: IDsAdminNewObj;
- const pDispInfo: DSA_NEWOBJ_DISPINFO): HRESULT; stdcall;
- function AddPages(lpfnAddPage: LPFNADDPROPSHEETPAGE; lParam: LPARAM): HRESULT; stdcall;
- function SetObject(pADsObj: IADs): HRESULT; stdcall;
- function WriteData(hWnd: HWND; uContext: ULONG): HRESULT; stdcall;
- function OnError(hWnd: HWND; hr: HRESULT; uContext: ULONG): HRESULT; stdcall;
- function GetSummaryInfo(out pBstrText: WideString): HRESULT; stdcall;
- end;
- {$EXTERNALSYM IDsAdminNewObjExt}
-
-//
-// Notification opcodes for IDsAdminNotifyHandler
-//
-
-const
- DSA_NOTIFY_DEL = $00000001; // delete
- {$EXTERNALSYM DSA_NOTIFY_DEL}
- DSA_NOTIFY_REN = $00000002; // rename
- {$EXTERNALSYM DSA_NOTIFY_REN}
- DSA_NOTIFY_MOV = $00000004; // move
- {$EXTERNALSYM DSA_NOTIFY_MOV}
- DSA_NOTIFY_PROP = $00000008; // property change
- {$EXTERNALSYM DSA_NOTIFY_PROP}
-
- DSA_NOTIFY_ALL = (DSA_NOTIFY_DEL or DSA_NOTIFY_REN or DSA_NOTIFY_MOV or
- DSA_NOTIFY_PROP);
- {$EXTERNALSYM DSA_NOTIFY_ALL}
-
-//
-// flags to handle additional data
-//
-
- DSA_NOTIFY_FLAG_ADDITIONAL_DATA = $00000002; // process additional extension data?
- {$EXTERNALSYM DSA_NOTIFY_FLAG_ADDITIONAL_DATA}
- DSA_NOTIFY_FLAG_FORCE_ADDITIONAL_DATA = $00000001; // operation forced
- {$EXTERNALSYM DSA_NOTIFY_FLAG_FORCE_ADDITIONAL_DATA}
-
-//---------------------------------------------------------------------------
-//
-// Interface: IDsAdminNotifyHandler
-//
-// Implemented by: notification handler in proc server
-//
-// Used by: DS Admin
-//
-
-type
- IDsAdminNotifyHandler = interface (IUnknown)
- ['{E4A2B8B3-5A18-11d2-97C1-00A0C9A06D2D}']
- function Initialize(pExtraInfo: IDataObject; puEventFlags: PULONG): HRESULT; stdcall;
- function Begin_(uEvent: ULONG; pArg1, pArg2: IDataObject; puFlags: ULONG;
- out pBstr: WideString): HRESULT; stdcall;
- function Notify(nItem: ULONG; uFlags: ULONG): HRESULT; stdcall;
- function End_: HRESULT; stdcall;
- end;
- {$EXTERNALSYM IDsAdminNotifyHandler}
-
-implementation
-
-end.
+{******************************************************************************}
+{ }
+{ Directory Services Admin API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: dsadmin.h, released June 2000. The original Pascal }
+{ code is: dsadmin.pas, released December 2000. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwadsadmin.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaDSAdmin;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "dsadmin.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ ActiveX {TODO}, JwaAdsTLB, JwaPrSht, JwaWinType;
+
+//
+// CoClass for the Object creation dialog object
+//
+// {E301A009-F901-11d2-82B9-00C04F68928B}
+
+const
+ CLSID_DsAdminCreateObj: TGUID = (
+ D1:$e301a009; D2:$f901; D3:$11d2; D4:($82, $b9, $0, $c0, $4f, $68, $92, $8b));
+ {$EXTERNALSYM CLSID_DsAdminCreateObj}
+
+//
+// Interface GUIDs
+//
+
+// {53554A38-F902-11d2-82B9-00C04F68928B}
+
+ IID_IDsAdminCreateObj: TGUID = (
+ D1:$53554a38; D2:$f902; D3:$11d2; D4:($82, $b9, $0, $c0, $4f, $68, $92, $8b));
+ {$EXTERNALSYM IID_IDsAdminCreateObj}
+
+// {F2573587-E6FC-11d2-82AF-00C04F68928B}
+
+ IID_IDsAdminNewObj: TGUID = (
+ D1:$f2573587; D2:$e6fc; D3:$11d2; D4:($82, $af, $0, $c0, $4f, $68, $92, $8b));
+ {$EXTERNALSYM IID_IDsAdminNewObj}
+
+// {BE2B487E-F904-11d2-82B9-00C04F68928B}
+
+ IID_IDsAdminNewObjPrimarySite: TGUID = (
+ D1:$be2b487e; D2:$f904; D3:$11d2; D4:($82, $b9, $0, $c0, $4f, $68, $92, $8b));
+ {$EXTERNALSYM IID_IDsAdminNewObjPrimarySite}
+
+// {6088EAE2-E7BF-11d2-82AF-00C04F68928B}
+
+ IID_IDsAdminNewObjExt: TGUID = (
+ D1:$6088eae2; D2:$e7bf; D3:$11d2; D4:($82, $af, $0, $c0, $4f, $68, $92, $8b));
+ {$EXTERNALSYM IID_IDsAdminNewObjExt}
+
+// {E4A2B8B3-5A18-11d2-97C1-00A0C9A06D2D}
+
+ IID_IDsAdminNotifyHandler: TGUID = (
+ D1:$e4a2b8b3; D2:$5a18; D3:$11d2; D4:($97, $c1, $0, $a0, $c9, $a0, $6d, $2d));
+ {$EXTERNALSYM IID_IDsAdminNotifyHandler}
+
+// ----------------------------------------------------------------------------
+//
+// Interface: IDsAdminCreateObj
+//
+// Implemented by the object (implemented by the system) CLSID_DsAdminCreateObj
+//
+// Used by: any client needing to invoke the creation UI
+//
+
+type
+ IDsAdminCreateObj = interface (IUnknown)
+ ['{53554A38-F902-11d2-82B9-00C04F68928B}']
+ function Initialize(pADsContainerObj: IADsContainer; pADsCopySource: IADS;
+ lpszClassName: LPCWSTR): HRESULT; stdcall;
+ function CreateModal(hwndParent: HWND; out ppADsObj: IADS): HRESULT; stdcall;
+ end;
+ {$EXTERNALSYM IDsAdminCreateObj}
+
+//---------------------------------------------------------------------------
+//
+// Interface: IDsAdminNewObj
+//
+// Implemented by: DS Admin
+//
+// Used by: creation extension in proc server (both primary and regular)
+//
+
+ IDsAdminNewObj = interface (IUnknown)
+ ['{F2573587-E6FC-11d2-82AF-00C04F68928B}']
+ function SetButtons(nCurrIndex: ULONG; bValid: BOOL): HRESULT; stdcall;
+ function GetPageCounts(var pnTotal, pnStartIndex: LONG): HRESULT; stdcall;
+ end;
+ {$EXTERNALSYM IDsAdminNewObj}
+
+//---------------------------------------------------------------------------
+//
+// Interface: IDsAdminNewObjPrimarySite
+//
+// Implemented by: DS Admin
+//
+// Used by: creation extension in proc server (primary only)
+//
+
+ IDsAdminNewObjPrimarySite = interface (IUnknown)
+ ['{BE2B487E-F904-11d2-82B9-00C04F68928B}']
+ function CreateNew(pszName: LPCWSTR): HRESULT; stdcall;
+ function Commit: HRESULT; stdcall;
+ end;
+ {$EXTERNALSYM IDsAdminNewObjPrimarySite}
+
+//
+// struct passed to IDsAdminNewObjExt::Initialize()
+//
+// it contains information regarding UI look
+//
+
+ LPDSA_NEWOBJ_DISPINFO = ^DSA_NEWOBJ_DISPINFO;
+ {$EXTERNALSYM LPDSA_NEWOBJ_DISPINFO}
+ DSA_NEWOBJ_DISPINFO = record
+ dwSize: DWORD; // size of struct, for versioning
+ hObjClassIcon: HICON; // class icon for the object to be created
+ lpszWizTitle: LPWSTR; // title of the wizard
+ lpszContDisplayName: LPWSTR; // container display name (canonical name)
+ end;
+ {$EXTERNALSYM DSA_NEWOBJ_DISPINFO}
+ TDsaNewObjDispInfo = DSA_NEWOBJ_DISPINFO;
+ PDsaNewObjDispInfo = LPDSA_NEWOBJ_DISPINFO;
+
+//
+// context flags passed to IDsAdminNewObjExt::OnError() and to IDsAdminNewObjExt::WriteData()
+//
+
+const
+ DSA_NEWOBJ_CTX_PRECOMMIT = $00000001; // before SetInfo()
+ {$EXTERNALSYM DSA_NEWOBJ_CTX_PRECOMMIT}
+ DSA_NEWOBJ_CTX_COMMIT = $00000002; // SetInfo(), commit phase
+ {$EXTERNALSYM DSA_NEWOBJ_CTX_COMMIT}
+ DSA_NEWOBJ_CTX_POSTCOMMIT = $00000003; // after SetInfo()
+ {$EXTERNALSYM DSA_NEWOBJ_CTX_POSTCOMMIT}
+ DSA_NEWOBJ_CTX_CLEANUP = $00000004; // on post commit fail
+ {$EXTERNALSYM DSA_NEWOBJ_CTX_CLEANUP}
+
+//---------------------------------------------------------------------------
+//
+// Interface: IDsAdminNewObjExt
+//
+// Implemented by: creation extension in proc server (both primary and regular)
+//
+// Used by: DS Admin
+//
+
+type
+ IDsAdminNewObjExt = interface (IUnknown)
+ ['{6088EAE2-E7BF-11d2-82AF-00C04F68928B}']
+ function Initialize(pADsContainerObj: IADsContainer; pADsCopySource: IADs;
+ lpszClassName: LPCWSTR; pDsAdminNewObj: IDsAdminNewObj;
+ const pDispInfo: DSA_NEWOBJ_DISPINFO): HRESULT; stdcall;
+ function AddPages(lpfnAddPage: LPFNADDPROPSHEETPAGE; lParam: LPARAM): HRESULT; stdcall;
+ function SetObject(pADsObj: IADs): HRESULT; stdcall;
+ function WriteData(hWnd: HWND; uContext: ULONG): HRESULT; stdcall;
+ function OnError(hWnd: HWND; hr: HRESULT; uContext: ULONG): HRESULT; stdcall;
+ function GetSummaryInfo(out pBstrText: WideString): HRESULT; stdcall;
+ end;
+ {$EXTERNALSYM IDsAdminNewObjExt}
+
+//
+// Notification opcodes for IDsAdminNotifyHandler
+//
+
+const
+ DSA_NOTIFY_DEL = $00000001; // delete
+ {$EXTERNALSYM DSA_NOTIFY_DEL}
+ DSA_NOTIFY_REN = $00000002; // rename
+ {$EXTERNALSYM DSA_NOTIFY_REN}
+ DSA_NOTIFY_MOV = $00000004; // move
+ {$EXTERNALSYM DSA_NOTIFY_MOV}
+ DSA_NOTIFY_PROP = $00000008; // property change
+ {$EXTERNALSYM DSA_NOTIFY_PROP}
+
+ DSA_NOTIFY_ALL = (DSA_NOTIFY_DEL or DSA_NOTIFY_REN or DSA_NOTIFY_MOV or
+ DSA_NOTIFY_PROP);
+ {$EXTERNALSYM DSA_NOTIFY_ALL}
+
+//
+// flags to handle additional data
+//
+
+ DSA_NOTIFY_FLAG_ADDITIONAL_DATA = $00000002; // process additional extension data?
+ {$EXTERNALSYM DSA_NOTIFY_FLAG_ADDITIONAL_DATA}
+ DSA_NOTIFY_FLAG_FORCE_ADDITIONAL_DATA = $00000001; // operation forced
+ {$EXTERNALSYM DSA_NOTIFY_FLAG_FORCE_ADDITIONAL_DATA}
+
+//---------------------------------------------------------------------------
+//
+// Interface: IDsAdminNotifyHandler
+//
+// Implemented by: notification handler in proc server
+//
+// Used by: DS Admin
+//
+
+type
+ IDsAdminNotifyHandler = interface (IUnknown)
+ ['{E4A2B8B3-5A18-11d2-97C1-00A0C9A06D2D}']
+ function Initialize(pExtraInfo: IDataObject; puEventFlags: PULONG): HRESULT; stdcall;
+ function Begin_(uEvent: ULONG; pArg1, pArg2: IDataObject; puFlags: ULONG;
+ out pBstr: WideString): HRESULT; stdcall;
+ function Notify(nItem: ULONG; uFlags: ULONG): HRESULT; stdcall;
+ function End_: HRESULT; stdcall;
+ end;
+ {$EXTERNALSYM IDsAdminNotifyHandler}
+
+implementation
+
+end.
diff --git a/packages/extra/winunits/jwadsclient.pas b/packages/extra/winunits/jwadsclient.pas
index 51c1fa99cd..25a9ca9895 100644
--- a/packages/extra/winunits/jwadsclient.pas
+++ b/packages/extra/winunits/jwadsclient.pas
@@ -1,771 +1,771 @@
-{******************************************************************************}
-{ }
-{ Active Directory Display API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: dsclient.h, released June 2000. The original Pascal }
-{ code is: DsClient.pas, released December 2000. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwadsclient.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaDSClient;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "dsclient.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaAdsTLB, JwaWinType;
-
-//---------------------------------------------------------------------------//
-// CLSIDs exposed for the dsclient.
-//---------------------------------------------------------------------------//
-
-// this CLSID is used to signal that the DSOBJECTNAMEs structure originated
-// for the Microsoft DS.
-
-const
- CLSID_MicrosoftDS: TGUID = (
- D1:$fe1290f0; D2:$cfbd; D3:$11cf; D4:($a3, $30, $0, $aa, $0, $c1, $6e, $65));
- {$EXTERNALSYM CLSID_MicrosoftDS}
-
- //CLSID_DsFolder: = CLSID_MicrosoftDS;
- CLSID_DsFolder: TGUID = (
- D1:$fe1290f0; D2:$cfbd; D3:$11cf; D4:($a3, $30, $0, $aa, $0, $c1, $6e, $65));
- {$EXTERNALSYM CLSID_DsFolder}
-
-// this is the CLSID used by clients to get the IShellExtInit, IPropSheetExt
-// and IContextMenus exposed from dsuiext.dll.
-
- CLSID_DsPropertyPages: TGUID = (
- D1:$d45d530; D2:$764b; D3:$11d0; D4:($a1, $ca, $0, $aa, $0, $c1, $6e, $65));
- {$EXTERNALSYM CLSID_DsPropertyPages}
-
- CLSID_DsDomainTreeBrowser: TGUID = (
- D1:$1698790a; D2:$e2b4; D3:$11d0; D4:($b0, $b1, $00, $c0, $4f, $d8, $dc, $a6));
- {$EXTERNALSYM CLSID_DsDomainTreeBrowser}
- IID_IDsBrowseDomainTree: TGUID = (
- D1:$7cabcf1e; D2:$78f5; D3:$11d2; D4:($96, $c, $0, $c0, $4f, $a3, $1a, $86));
- {$EXTERNALSYM IID_IDsBrowseDomainTree}
-
- CLSID_DsDisplaySpecifier: TGUID = (
- D1:$1ab4a8c0; D2:$6a0b; D3:$11d2; D4:($ad, $49, $0, $c0, $4f, $a3, $1a, $86));
- {$EXTERNALSYM CLSID_DsDisplaySpecifier}
- //IID_IDsDisplaySpecifier = CLSID_DsDisplaySpecifier;
- IID_IDsDisplaySpecifier: TGUID = (
- D1:$1ab4a8c0; D2:$6a0b; D3:$11d2; D4:($ad, $49, $0, $c0, $4f, $a3, $1a, $86));
- {$EXTERNALSYM IID_IDsDisplaySpecifier}
-
- CLSID_DsFolderProperties: TGUID = (
- D1:$9e51e0d0; D2:$6e0f; D3:$11d2; D4:($96, $1, $0, $c0, $4f, $a3, $1a, $86));
- {$EXTERNALSYM CLSID_DsFolderProperties}
- //IID_IDsFolderProperties = CLSID_DsFolderProperties;
- IID_IDsFolderProperties: TGUID = (
- D1:$9e51e0d0; D2:$6e0f; D3:$11d2; D4:($96, $1, $0, $c0, $4f, $a3, $1a, $86));
- {$EXTERNALSYM IID_IDsFolderProperties}
-
-// #include "activeds.h"
-
-//---------------------------------------------------------------------------//
-// Clipboard formats used within DSUI
-//---------------------------------------------------------------------------//
-
-//
-// CF_DSOBJECTS
-// ------------
-// This clipboard format defines the seleciton for an DS IShellFolder to the
-// shell extensions. All strings are stored as BSTR's, and an offset == 0
-// is used to indicate that the string is not present.
-//
-
-const
- DSOBJECT_ISCONTAINER = $00000001; // = 1 => object is a container
- {$EXTERNALSYM DSOBJECT_ISCONTAINER}
- DSOBJECT_READONLYPAGES = DWORD($80000000); // = 1 => read only pages
- {$EXTERNALSYM DSOBJECT_READONLYPAGES}
-
- DSPROVIDER_UNUSED_0 = $00000001;
- {$EXTERNALSYM DSPROVIDER_UNUSED_0}
- DSPROVIDER_UNUSED_1 = $00000002;
- {$EXTERNALSYM DSPROVIDER_UNUSED_1}
- DSPROVIDER_UNUSED_2 = $00000004;
- {$EXTERNALSYM DSPROVIDER_UNUSED_2}
- DSPROVIDER_UNUSED_3 = $00000008;
- {$EXTERNALSYM DSPROVIDER_UNUSED_3}
- DSPROVIDER_ADVANCED = $00000010; // = 1 => advanced mode
- {$EXTERNALSYM DSPROVIDER_ADVANCED}
-
- CFSTR_DSOBJECTNAMES = 'DsObjectNames';
- {$EXTERNALSYM CFSTR_DSOBJECTNAMES}
-
-type
- LPDSOBJECT = ^DSOBJECT;
- {$EXTERNALSYM LPDSOBJECT}
- DSOBJECT = record
- dwFlags: DWORD; // item flags
- dwProviderFlags: DWORD; // flags for item provider
- offsetName: DWORD; // offset to ADS path of the object
- offsetClass: DWORD; // offset to object class name / == 0 not known
- end;
- {$EXTERNALSYM DSOBJECT}
- TDsObject = DSOBJECT;
- PDsObject = LPDSOBJECT;
-
- LPDSOBJECTNAMES = ^DSOBJECTNAMES;
- {$EXTERNALSYM LPDSOBJECTNAMES}
- DSOBJECTNAMES = record
- clsidNamespace: CLSID; // namespace identifier (indicates which namespace selection from)
- cItems: UINT; // number of objects
- aObjects: array [0..0] of DSOBJECT; // array of objects
- end;
- {$EXTERNALSYM DSOBJECTNAMES}
- TDsObjectNames = DSOBJECTNAMES;
- PDsObjectNames = LPDSOBJECTNAMES;
-
-//
-// CF_DSDISPLAYSPECOPTIONS
-// -----------------------
-// When invoking an object referenced by a display specifier (context menu, property
-// page, etc) we call the IShellExtInit interface passing a IDataObject. This data
-// object supports the CF_DSDISPLAYSPECOPTIONS format to give out configuration
-// informaiton about admin/shell invocation.
-//
-// When interacting with dsuiext.dll the interfaces uses this clipboard format
-// to determine which display specifier attributes to address (admin/shell)
-// and pick up the values accordingly. If no format is suppoted then
-// dsuiext.dll defaults to shell.
-//
-
-const
- CFSTR_DS_DISPLAY_SPEC_OPTIONS = 'DsDisplaySpecOptions';
- {$EXTERNALSYM CFSTR_DS_DISPLAY_SPEC_OPTIONS}
- CFSTR_DSDISPLAYSPECOPTIONS = CFSTR_DS_DISPLAY_SPEC_OPTIONS;
- {$EXTERNALSYM CFSTR_DSDISPLAYSPECOPTIONS}
-
-type
- LPDSDISPLAYSPECOPTIONS = ^DSDISPLAYSPECOPTIONS;
- {$EXTERNALSYM LPDSDISPLAYSPECOPTIONS}
- _DSDISPLAYSPECOPTIONS = record
- dwSize: DWORD; // size of struct, for versioning
- dwFlags: DWORD; // invocation flags
- offsetAttribPrefix: DWORD; // offset to attribute prefix string.
- offsetUserName: DWORD; // offset to UNICODE user name
- offsetPassword: DWORD; // offset to UNICODE password
- offsetServer: DWORD;
- offsetServerConfigPath: DWORD;
- end;
- {$EXTERNALSYM _DSDISPLAYSPECOPTIONS}
- DSDISPLAYSPECOPTIONS = _DSDISPLAYSPECOPTIONS;
- {$EXTERNALSYM DSDISPLAYSPECOPTIONS}
- TDsDisplaySpecOptions = DSDISPLAYSPECOPTIONS;
- PDsDisplaySpecOptions = LPDSDISPLAYSPECOPTIONS;
-
-const
- DS_PROP_SHELL_PREFIX = 'shell';
- {$EXTERNALSYM DS_PROP_SHELL_PREFIX}
- DS_PROP_ADMIN_PREFIX = 'admin';
- {$EXTERNALSYM DS_PROP_ADMIN_PREFIX}
-
- DSDSOF_HASUSERANDSERVERINFO = $00000001; // = 1 => user name/password are valid
- {$EXTERNALSYM DSDSOF_HASUSERANDSERVERINFO}
- DSDSOF_SIMPLEAUTHENTICATE = $00000002; // = 1 => don't use secure authentication to DS
- {$EXTERNALSYM DSDSOF_SIMPLEAUTHENTICATE}
- DSDSOF_DONTSIGNSEAL = $00000004; // = 1 => don't sign+seal when opening DS objects
- {$EXTERNALSYM DSDSOF_DONTSIGNSEAL}
- DSDSOF_DSAVAILABLE = $40000000; // = 1 => ignore DS available checks
- {$EXTERNALSYM DSDSOF_DSAVAILABLE}
-
-//
-// CF_DSPROPERTYPAGEINFO
-// ---------------------
-// When the property pages for an object are being displayed the parsed
-// display specifier string is passed to the page object via the IDataObject
-// in the following clipboard format.
-//
-// Within the display specifier for a property page, the format for a
-// Win32 extension is "n,{clsid}[,bla...]" we take the "bla" section and
-// pass it down.
-//
-
- CFSTR_DSPROPERTYPAGEINFO = 'DsPropPageInfo';
- {$EXTERNALSYM CFSTR_DSPROPERTYPAGEINFO}
-
-type
- LPDSPROPERTYPAGEINFO = ^DSPROPERTYPAGEINFO;
- {$EXTERNALSYM LPDSPROPERTYPAGEINFO}
- DSPROPERTYPAGEINFO = record
- offsetString: DWORD; // offset to UNICODE string
- end;
- {$EXTERNALSYM DSPROPERTYPAGEINFO}
- TDsPropertyPageInfo = DSPROPERTYPAGEINFO;
- PDsPropertyPageInfo = LPDSPROPERTYPAGEINFO;
-
-//
-// To sync property pages and the admin tools this message is broadcast
-//
-
-const
- DSPROP_ATTRCHANGED_MSG = 'DsPropAttrChanged';
- {$EXTERNALSYM DSPROP_ATTRCHANGED_MSG}
-
-//---------------------------------------------------------------------------//
-
-//---------------------------------------------------------------------------//
-//
-// IDsBrowseDomainTree
-// ===================
-// This interface returns a list of the domains from a given computer name
-// (or the current computer name if none is specified).
-//
-// NOTES:
-// 1) The structure returned by ::GetDomains should be free'd using
-// FreeDomains.
-//
-// 2) ::BrowseTo allocates a string on exit, this is allocated using
-// CoTaskMemAlloc, and therefore should be free'd using CoTaskMemFree.
-//
-//---------------------------------------------------------------------------//
-
- DBDTF_RETURNFQDN = $00000001; // if not set, pszNCName will be blank
- {$EXTERNALSYM DBDTF_RETURNFQDN}
- DBDTF_RETURNMIXEDDOMAINS = $00000002; // set it if you want downlevel trust domains too
- {$EXTERNALSYM DBDTF_RETURNMIXEDDOMAINS}
- DBDTF_RETURNEXTERNAL = $00000004; // set it if you want external trust domains too
- {$EXTERNALSYM DBDTF_RETURNEXTERNAL}
- DBDTF_RETURNINBOUND = $00000008; // set it if you want trusting domains
- {$EXTERNALSYM DBDTF_RETURNINBOUND}
- DBDTF_RETURNINOUTBOUND = $00000010; // set it if you want both trusted and trusting domains
- {$EXTERNALSYM DBDTF_RETURNINOUTBOUND}
-
-type
- PDOMAINDESC = ^DOMAINDESC;
- {$EXTERNALSYM PDOMAINDESC}
- _DOMAINDESC = record
- pszName: LPWSTR; // domain name (if no dns, use netbios)
- pszPath: LPWSTR; // set to blank
- pszNCName: LPWSTR; // FQDN, e.g.,DC=mydomain,DC=microsoft,DC=com
- pszTrustParent: LPWSTR; // parent domain name (if no dns, use netbios)
- pszObjectClass: LPWSTR; // Object class of the domain object referenced
- ulFlags: ULONG; // Flags, from DS_TRUSTED_DOMAINS.Flags
- fDownLevel: BOOL; // == 1 if downlevel domain
- pdChildList: PDOMAINDESC; // Children of this node
- pdNextSibling: PDOMAINDESC; // Siblings of this node
- end;
- {$EXTERNALSYM _DOMAINDESC}
- DOMAINDESC = _DOMAINDESC;
- {$EXTERNALSYM DOMAINDESC}
- TDomainDesc = DOMAINDESC;
-
- PDOMAIN_TREE = ^DOMAIN_TREE;
- {$EXTERNALSYM PDOMAIN_TREE}
- DOMAIN_TREE = record
- dsSize: DWORD;
- dwCount: DWORD;
- aDomains: array [0..1 - 1] of DOMAINDESC;
- end;
- {$EXTERNALSYM DOMAIN_TREE}
- DOMAINTREE = DOMAIN_TREE;
- {$EXTERNALSYM DOMAINTREE}
- TDomainTree = DOMAIN_TREE;
- PDomainTree = PDOMAIN_TREE;
-
- IDsBrowseDomainTree = interface (IUnknown)
- ['{7cabcf1e-78f5-11d2-960c-00c04fa31a86}']
- function BrowseTo(hwndParent: HWND; var ppszTargetPath: LPWSTR;
- dwFlags: DWORD): HRESULT; stdcall;
- function GetDomains(var ppDomainTree: PDOMAIN_TREE;
- dwFlags: DWORD): HRESULT; stdcall;
- function FreeDomains(var ppDomainTree: PDOMAIN_TREE): HRESULT; stdcall;
- function FlushCachedDomains: HRESULT; stdcall;
- function SetComputer(pszComputerName, pszUserName,
- pszPassword: LPCWSTR): HRESULT; stdcall;
- end;
- {$EXTERNALSYM IDsBrowseDomainTree}
-
-//---------------------------------------------------------------------------//
-
-//---------------------------------------------------------------------------//
-//
-// IDsDisplaySpecifier
-// ===================
-// This interface gives client UI access to the display specifiers for
-// specific attributes.
-//
-//---------------------------------------------------------------------------//
-
-//
-// IDsDisplaySpecifier::SetServer flags
-//
-
-const
- DSSSF_SIMPLEAUTHENTICATE = $00000001; // = 1 => don't use secure authentication to DS
- {$EXTERNALSYM DSSSF_SIMPLEAUTHENTICATE}
- DSSSF_DONTSIGNSEAL = $00000002; // = 1 => don't use sign+seal when opening objects in the DS
- {$EXTERNALSYM DSSSF_DONTSIGNSEAL}
- DSSSF_DSAVAILABLE = DWORD($80000000); // = 1 => ignore DS available checks
- {$EXTERNALSYM DSSSF_DSAVAILABLE}
-
-//
-// Flags for IDsDisplaySpecifier::GetIcon / GetIconLocation
-//
-
- DSGIF_ISNORMAL = $0000000; // = icon is in normal state (default)
- {$EXTERNALSYM DSGIF_ISNORMAL}
- DSGIF_ISOPEN = $0000001; // = icon is in open state
- {$EXTERNALSYM DSGIF_ISOPEN}
- DSGIF_ISDISABLED = $0000002; // = icon is in a disabled state
- {$EXTERNALSYM DSGIF_ISDISABLED}
- DSGIF_ISMASK = $000000f;
- {$EXTERNALSYM DSGIF_ISMASK}
- DSGIF_GETDEFAULTICON = $0000010; // = 1 => if no icon then get default (from shell32.dll)
- {$EXTERNALSYM DSGIF_GETDEFAULTICON}
- DSGIF_DEFAULTISCONTAINER = $0000020; // = 1 => if returning default icon, return it as a container
- {$EXTERNALSYM DSGIF_DEFAULTISCONTAINER}
-
-//
-// Flags for IDsDisplaySpecifier::IsClassContainer
-//
-
- DSICCF_IGNORETREATASLEAF = $00000001; // = 1 => igore the "treatAsLeaf" and use only schema information
- {$EXTERNALSYM DSICCF_IGNORETREATASLEAF}
-
-//
-// Callback function used for IDsDisplaySpecifier::EnumClassAttributes
-//
-
- DSECAF_NOTLISTED = $00000001; // = 1 => hide from the field drop down in the query UI
- {$EXTERNALSYM DSECAF_NOTLISTED}
-
-type
- LPDSENUMATTRIBUTES = function(lParam: LPARAM; pszAttributeName: LPCWSTR;
- pszDisplayName: LPCWSTR; dwFlags: DWORD): HRESULT; stdcall;
- {$EXTERNALSYM LPDSENUMATTRIBUTES}
- TDsEnumAttributes = LPDSENUMATTRIBUTES;
-
-//
-// IDsDisplaySpecifier::GetClassCreationInfo information
-//
-
-const
- DSCCIF_HASWIZARDDIALOG = $00000001; // = 1 => return the wizard dialog CLSID
- {$EXTERNALSYM DSCCIF_HASWIZARDDIALOG}
- DSCCIF_HASWIZARDPRIMARYPAGE = $00000002; // = 1 => returning a primary wizard dlg CLSID
- {$EXTERNALSYM DSCCIF_HASWIZARDPRIMARYPAGE}
-
-type
- LPDSCLASSCREATIONINFO = ^DSCLASSCREATIONINFO;
- {$EXTERNALSYM LPDSCLASSCREATIONINFO}
- DSCLASSCREATIONINFO = record
- dwFlags: DWORD;
- clsidWizardDialog: CLSID;
- clsidWizardPrimaryPage: CLSID;
- cWizardExtensions: DWORD; // how many extension CLSIDs?
- aWizardExtensions: array [0..0] of CLSID;
- end;
- {$EXTERNALSYM DSCLASSCREATIONINFO}
- TDsClassCreationInfo = DSCLASSCREATIONINFO;
- PDsClassCreationInfo = LPDSCLASSCREATIONINFO;
-
-//
-// IDsDisplaySpecifier - a COM object for interacting with display specifiers
-//
-
- IDsDisplaySpecifier = interface (IUnknown)
- ['{1ab4a8c0-6a0b-11d2-ad49-00c04fa31a86}']
- function SetServer(pszServer, pszUserName, pszPassword: LPCWSTR;
- dwFlags: DWORD): HRESULT; stdcall;
- function SetLanguageID(langid: LANGID): HRESULT; stdcall;
- function GetDisplaySpecifier(pszObjectClass: LPCWSTR; riid: LPGUID;
- var ppv: Pointer): HRESULT; stdcall;
- function GetIconLocation(pszObjectClass: LPCWSTR; dwFlags: DWORD;
- pszBuffer: LPWSTR; cchBuffer: Integer; var presid: Integer): HRESULT; stdcall;
- function GetIcon(pszObjectClass: LPCWSTR; dwFlags: DWORD;
- cxIcon, cyIcon: Integer): HICON; stdcall;
- function GetFriendlyClassName(pszObjectClass: LPCWSTR; pszBuffer: LPWSTR;
- cchBuffer: Integer): HRESULT; stdcall;
- function GetFriendlyAttributeName(pszObjectClass, pszAttributeName,
- pszBuffer: LPCWSTR; cchBuffer: UINT): HRESULT; stdcall;
- function IsClassContainer(pszObjectClass, pszADsPath: LPCWSTR;
- dwFlags: DWORD): BOOL; stdcall;
- function GetClassCreationInfo(pszObjectClass: LPCWSTR;
- var ppdscci: LPDSCLASSCREATIONINFO): HRESULT; stdcall;
- function EnumClassAttributes(pszObjectClass: LPCWSTR;
- pcbEnum: LPDSENUMATTRIBUTES; lParam: LPARAM): HRESULT; stdcall;
- function GetAttributeADsType(pszAttributeName: LPCWSTR): ADSTYPEENUM; stdcall;
- end;
- {$EXTERNALSYM IDsDisplaySpecifier}
-
-//---------------------------------------------------------------------------//
-//
-// DsBrowseForContainer
-// --------------------
-// Provides a container browser similar to the SHBrowseForFolder, except
-// targetting the DS.
-//
-// In:
-// pInfo -> DSBROWSEINFO structure
-//
-// Out:
-// == IDOK/IDCANCEL depending on buttons, -1 if error
-//
-//---------------------------------------------------------------------------//
-
-type
- BFFCALLBACK = function(hwnd: HWND; msg: UINT;
- lpData, lParam: LPARAM): Integer; stdcall;
- {$NODEFINE BFFCALLBACK}
- TBffCallback = BFFCALLBACK;
-
- PDSBROWSEINFOW = ^DSBROWSEINFOW;
- DSBROWSEINFOW = record
- cbStruct: DWORD; // size of structure in bytes
- hwndOwner: HWND; // dialog owner
- pszCaption: LPCWSTR; // dialog caption text (can be NULL)
- pszTitle: LPCWSTR; // displayed above the tree view control (can be NULL)
- pszRoot: LPCWSTR; // ADS path to root (NULL == root of DS namespace)
- pszPath: LPWSTR; // [in/out] initial selection & returned path (required)
- cchPath: ULONG; // size of pszPath buffer in characters
- dwFlags: DWORD;
- pfnCallback: BFFCALLBACK; // callback function(see SHBrowseForFolder)
- lParam: LPARAM; // passed to pfnCallback as lpUserData
- dwReturnFormat: DWORD; // ADS_FORMAT_* (default is ADS_FORMAT_X500_NO_SERVER)
- pUserName: LPCWSTR; // Username and Password to authenticate against DS with
- pPassword: LPCWSTR;
- pszObjectClass: LPWSTR; // UNICODE string for the object class
- cchObjectClass: ULONG;
- end;
- {$EXTERNALSYM DSBROWSEINFOW}
- TDsBrowseInfoW = DSBROWSEINFOW;
-
- PDSBROWSEINFOA = ^DSBROWSEINFOA;
- DSBROWSEINFOA = record
- cbStruct: DWORD;
- hwndOwner: HWND;
- pszCaption: LPCSTR;
- pszTitle: LPCSTR;
- pszRoot: LPCWSTR; // ADS paths are always UNICODE
- pszPath: LPWSTR; // ditto
- cchPath: ULONG;
- dwFlags: DWORD;
- pfnCallback: BFFCALLBACK;
- lParam: LPARAM;
- dwReturnFormat: DWORD;
- pUserName: LPCWSTR; // Username and Password to authenticate against DS with
- pPassword: LPCWSTR;
- pszObjectClass: LPWSTR; // object class of the selected object
- cchObjectClass: ULONG;
- end;
- {$EXTERNALSYM DSBROWSEINFOA}
- TDsBrowseInfoA = DSBROWSEINFOA;
-
- {$IFDEF UNICODE}
- DSBROWSEINFO = DSBROWSEINFOW;
- {$EXTERNALSYM DSBROWSEINFO}
- PDSBROWSEINFO = PDSBROWSEINFOW;
- {$EXTERNALSYM PDSBROWSEINFO}
- TDsBrowseInfo = TDsBrowseInfoW;
- {$ELSE}
- DSBROWSEINFO = DSBROWSEINFOA;
- {$EXTERNALSYM DSBROWSEINFO}
- PDSBROWSEINFO = PDSBROWSEINFOA;
- {$EXTERNALSYM PDSBROWSEINFO}
- TDsBrowseInfo = TDsBrowseInfoA;
- {$ENDIF UNICODE}
-
-// DSBROWSEINFO flags
-
-const
- DSBI_NOBUTTONS = $00000001; // NOT TVS_HASBUTTONS
- {$EXTERNALSYM DSBI_NOBUTTONS}
- DSBI_NOLINES = $00000002; // NOT TVS_HASLINES
- {$EXTERNALSYM DSBI_NOLINES}
- DSBI_NOLINESATROOT = $00000004; // NOT TVS_LINESATROOT
- {$EXTERNALSYM DSBI_NOLINESATROOT}
- DSBI_CHECKBOXES = $00000100; // TVS_CHECKBOXES
- {$EXTERNALSYM DSBI_CHECKBOXES}
- DSBI_NOROOT = $00010000; // don't include pszRoot in tree (its children become top level nodes)
- {$EXTERNALSYM DSBI_NOROOT}
- DSBI_INCLUDEHIDDEN = $00020000; // display hidden objects
- {$EXTERNALSYM DSBI_INCLUDEHIDDEN}
- DSBI_EXPANDONOPEN = $00040000; // expand to the path specified in pszPath when opening the dialog
- {$EXTERNALSYM DSBI_EXPANDONOPEN}
- DSBI_ENTIREDIRECTORY = $00090000; // browse the entire directory (defaults to having DSBI_NOROOT set)
- {$EXTERNALSYM DSBI_ENTIREDIRECTORY}
- DSBI_RETURN_FORMAT = $00100000; // dwReturnFormat field is valid
- {$EXTERNALSYM DSBI_RETURN_FORMAT}
- DSBI_HASCREDENTIALS = $00200000; // pUserName & pPassword are valid
- {$EXTERNALSYM DSBI_HASCREDENTIALS}
- DSBI_IGNORETREATASLEAF = $00400000; // ignore the treat as leaf flag when calling IsClassContainer
- {$EXTERNALSYM DSBI_IGNORETREATASLEAF}
- DSBI_SIMPLEAUTHENTICATE = $00800000; // don't use secure authentication to DS
- {$EXTERNALSYM DSBI_SIMPLEAUTHENTICATE}
- DSBI_RETURNOBJECTCLASS = $01000000; // return object class of selected object
- {$EXTERNALSYM DSBI_RETURNOBJECTCLASS}
- DSBI_DONTSIGNSEAL = $02000000; // don't sign+seal communication with DS
- {$EXTERNALSYM DSBI_DONTSIGNSEAL}
-
- DSB_MAX_DISPLAYNAME_CHARS = 64;
- {$EXTERNALSYM DSB_MAX_DISPLAYNAME_CHARS}
-
-type
- PDSBITEMW = ^DSBITEMW;
- DSBITEMW = record
- cbStruct: DWORD;
- pszADsPath: LPCWSTR; // ADS paths are always Unicode
- pszClass: LPCWSTR; // ADS properties are always Unicode
- dwMask: DWORD;
- dwState: DWORD;
- dwStateMask: DWORD;
- szDisplayName: array [0..DSB_MAX_DISPLAYNAME_CHARS - 1] of WCHAR;
- szIconLocation: array [0..MAX_PATH - 1] of WCHAR;
- iIconResID: Integer;
- end;
- {$EXTERNALSYM DSBITEMW}
- TDsBItemW = DSBITEMW;
-
- PDSBITEMA = ^DSBITEMA;
- DSBITEMA = record
- cbStruct: DWORD;
- pszADsPath: LPCWSTR; // ADS paths are always Unicode
- pszClass: LPCWSTR; // ADS properties are always Unicode
- dwMask: DWORD;
- dwState: DWORD;
- dwStateMask: DWORD;
- szDisplayName: array [0..DSB_MAX_DISPLAYNAME_CHARS - 1] of CHAR;
- szIconLocation: array [0..MAX_PATH - 1] of CHAR;
- iIconResID: Integer;
- end;
- {$EXTERNALSYM DSBITEMA}
- TDsBItemA = DSBITEMA;
-
- {$IFDEF UNICODE}
- DSBITEM = DSBITEMW;
- {$EXTERNALSYM DSBITEM}
- PDSBITEM = PDSBITEMW;
- {$EXTERNALSYM PDSBITEM}
- TDsBItem = TDsBItemW;
- {$ELSE}
- DSBITEM = DSBITEMA;
- {$EXTERNALSYM DSBITEM}
- PDSBITEM = PDSBITEMA;
- {$EXTERNALSYM PDSBITEM}
- TDsBItem = TDsBItemA;
- {$ENDIF UNICODE}
-
-// DSBITEM mask flags
-
-const
- DSBF_STATE = $00000001;
- {$EXTERNALSYM DSBF_STATE}
- DSBF_ICONLOCATION = $00000002;
- {$EXTERNALSYM DSBF_ICONLOCATION}
- DSBF_DISPLAYNAME = $00000004;
- {$EXTERNALSYM DSBF_DISPLAYNAME}
-
-// DSBITEM state flags
-
- DSBS_CHECKED = $00000001;
- {$EXTERNALSYM DSBS_CHECKED}
- DSBS_HIDDEN = $00000002;
- {$EXTERNALSYM DSBS_HIDDEN}
- DSBS_ROOT = $00000004;
- {$EXTERNALSYM DSBS_ROOT}
-
-//
-// this message is sent to the callback to see if it wants to insert or modify
-// the item that is about to be inserted into the view.
-//
-
- DSBM_QUERYINSERTW = 100; // lParam = PDSBITEMW (state, icon & name may be modified). Return TRUE if handled.
- {$EXTERNALSYM DSBM_QUERYINSERTW}
- DSBM_QUERYINSERTA = 101; // lParam = PDSBITEMA (state, icon & name may be modified). Return TRUE if handled.
- {$EXTERNALSYM DSBM_QUERYINSERTA}
-
- {$IFDEF UNICODE}
- DSBM_QUERYINSERT = DSBM_QUERYINSERTW;
- {$EXTERNALSYM DSBM_QUERYINSERT}
- {$ELSE}
- DSBM_QUERYINSERT = DSBM_QUERYINSERTA;
- {$EXTERNALSYM DSBM_QUERYINSERT}
- {$ENDIF UNICODE}
-
-//
-// Called before we change the state of the icon (on tree collapse/expand)
-//
-
- DSBM_CHANGEIMAGESTATE = 102; // lParam = adspath. Return TRUE/FALSE top allow/disallow
- {$EXTERNALSYM DSBM_CHANGEIMAGESTATE}
-
-//
-// The dialog receives a WM_HELP
-//
-
- DSBM_HELP = 103; // lParam == LPHELPINFO structure
- {$EXTERNALSYM DSBM_HELP}
-
-//
-// The dialog receives a WM_CONTEXTMENU, DSBID_xxx are the control ID's for this
-// dialog so that you can display suitable help.
-//
-
- DSBM_CONTEXTMENU = 104; // lParam == window handle to retrieve help for
- {$EXTERNALSYM DSBM_CONTEXTMENU}
-
-//
-// These are the control IDs for the controls in the dialog. The callback can use
-// these to modify the contents of the dialog as required.
-//
-
- DSBID_BANNER = 256;
- {$EXTERNALSYM DSBID_BANNER}
- DSBID_CONTAINERLIST = 257;
- {$EXTERNALSYM DSBID_CONTAINERLIST}
-
-//
-// API exported for browsing for containers.
-//
-
-function DsBrowseForContainerW(const pInfo: DSBROWSEINFOW): Integer; stdcall;
-{$EXTERNALSYM DsBrowseForContainerW}
-function DsBrowseForContainerA(const pInfo: DSBROWSEINFOA): Integer; stdcall;
-{$EXTERNALSYM DsBrowseForContainerA}
-function DsBrowseForContainer(const pInfo: DSBROWSEINFO): Integer; stdcall;
-{$EXTERNALSYM DsBrowseForContainer}
-
-//BUGBUG: these are here to keep old clients building - remove soon
-
-function DsGetIcon(dwFlags: DWORD; pszObjectClass: LPWSTR;
- cxImage, cyImage: Integer): HICON; stdcall;
-{$EXTERNALSYM DsGetIcon}
-procedure DsGetFriendlyClassName(pszObjectClass, pszBuffer: LPWSTR;
- cchBuffer: UINT); stdcall;
-{$EXTERNALSYM DsGetFriendlyClassName}
-
-implementation
-
-const
- dsuiext = 'dsuiext.dll';
- {$IFDEF UNICODE}
- AWSuffix = 'W';
- {$ELSE}
- AWSuffix = 'A';
- {$ENDIF UNICODE}
-
-{$IFDEF DYNAMIC_LINK}
-
-var
- _DsBrowseForContainerW: Pointer;
-
-function DsBrowseForContainerW;
-begin
- GetProcedureAddress(_DsBrowseForContainerW, dsuiext, 'DsBrowseForContainerW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsBrowseForContainerW]
- end;
-end;
-
-var
- _DsBrowseForContainerA: Pointer;
-
-function DsBrowseForContainerA;
-begin
- GetProcedureAddress(_DsBrowseForContainerA, dsuiext, 'DsBrowseForContainerA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsBrowseForContainerA]
- end;
-end;
-
-var
- _DsBrowseForContainer: Pointer;
-
-function DsBrowseForContainer;
-begin
- GetProcedureAddress(_DsBrowseForContainer, dsuiext, 'DsBrowseForContainer' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsBrowseForContainer]
- end;
-end;
-
-var
- _DsGetIcon: Pointer;
-
-function DsGetIcon;
-begin
- GetProcedureAddress(_DsGetIcon, dsuiext, 'DsGetIcon');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsGetIcon]
- end;
-end;
-
-var
- _DsGetFriendlyClassName: Pointer;
-
-procedure DsGetFriendlyClassName;
-begin
- GetProcedureAddress(_DsGetFriendlyClassName, dsuiext, 'DsGetFriendlyClassName');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsGetFriendlyClassName]
- end;
-end;
-
-{$ELSE}
-
-function DsBrowseForContainerW; external dsuiext name 'DsBrowseForContainerW';
-function DsBrowseForContainerA; external dsuiext name 'DsBrowseForContainerA';
-function DsBrowseForContainer; external dsuiext name 'DsBrowseForContainer' + AWSuffix;
-function DsGetIcon; external dsuiext name 'DsGetIcon';
-procedure DsGetFriendlyClassName; external dsuiext name 'DsGetFriendlyClassName';
-
-{$ENDIF DYNAMIC_LINK}
-
-end.
+{******************************************************************************}
+{ }
+{ Active Directory Display API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: dsclient.h, released June 2000. The original Pascal }
+{ code is: DsClient.pas, released December 2000. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwadsclient.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaDSClient;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "dsclient.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaAdsTLB, JwaWinType;
+
+//---------------------------------------------------------------------------//
+// CLSIDs exposed for the dsclient.
+//---------------------------------------------------------------------------//
+
+// this CLSID is used to signal that the DSOBJECTNAMEs structure originated
+// for the Microsoft DS.
+
+const
+ CLSID_MicrosoftDS: TGUID = (
+ D1:$fe1290f0; D2:$cfbd; D3:$11cf; D4:($a3, $30, $0, $aa, $0, $c1, $6e, $65));
+ {$EXTERNALSYM CLSID_MicrosoftDS}
+
+ //CLSID_DsFolder: = CLSID_MicrosoftDS;
+ CLSID_DsFolder: TGUID = (
+ D1:$fe1290f0; D2:$cfbd; D3:$11cf; D4:($a3, $30, $0, $aa, $0, $c1, $6e, $65));
+ {$EXTERNALSYM CLSID_DsFolder}
+
+// this is the CLSID used by clients to get the IShellExtInit, IPropSheetExt
+// and IContextMenus exposed from dsuiext.dll.
+
+ CLSID_DsPropertyPages: TGUID = (
+ D1:$d45d530; D2:$764b; D3:$11d0; D4:($a1, $ca, $0, $aa, $0, $c1, $6e, $65));
+ {$EXTERNALSYM CLSID_DsPropertyPages}
+
+ CLSID_DsDomainTreeBrowser: TGUID = (
+ D1:$1698790a; D2:$e2b4; D3:$11d0; D4:($b0, $b1, $00, $c0, $4f, $d8, $dc, $a6));
+ {$EXTERNALSYM CLSID_DsDomainTreeBrowser}
+ IID_IDsBrowseDomainTree: TGUID = (
+ D1:$7cabcf1e; D2:$78f5; D3:$11d2; D4:($96, $c, $0, $c0, $4f, $a3, $1a, $86));
+ {$EXTERNALSYM IID_IDsBrowseDomainTree}
+
+ CLSID_DsDisplaySpecifier: TGUID = (
+ D1:$1ab4a8c0; D2:$6a0b; D3:$11d2; D4:($ad, $49, $0, $c0, $4f, $a3, $1a, $86));
+ {$EXTERNALSYM CLSID_DsDisplaySpecifier}
+ //IID_IDsDisplaySpecifier = CLSID_DsDisplaySpecifier;
+ IID_IDsDisplaySpecifier: TGUID = (
+ D1:$1ab4a8c0; D2:$6a0b; D3:$11d2; D4:($ad, $49, $0, $c0, $4f, $a3, $1a, $86));
+ {$EXTERNALSYM IID_IDsDisplaySpecifier}
+
+ CLSID_DsFolderProperties: TGUID = (
+ D1:$9e51e0d0; D2:$6e0f; D3:$11d2; D4:($96, $1, $0, $c0, $4f, $a3, $1a, $86));
+ {$EXTERNALSYM CLSID_DsFolderProperties}
+ //IID_IDsFolderProperties = CLSID_DsFolderProperties;
+ IID_IDsFolderProperties: TGUID = (
+ D1:$9e51e0d0; D2:$6e0f; D3:$11d2; D4:($96, $1, $0, $c0, $4f, $a3, $1a, $86));
+ {$EXTERNALSYM IID_IDsFolderProperties}
+
+// #include "activeds.h"
+
+//---------------------------------------------------------------------------//
+// Clipboard formats used within DSUI
+//---------------------------------------------------------------------------//
+
+//
+// CF_DSOBJECTS
+// ------------
+// This clipboard format defines the seleciton for an DS IShellFolder to the
+// shell extensions. All strings are stored as BSTR's, and an offset == 0
+// is used to indicate that the string is not present.
+//
+
+const
+ DSOBJECT_ISCONTAINER = $00000001; // = 1 => object is a container
+ {$EXTERNALSYM DSOBJECT_ISCONTAINER}
+ DSOBJECT_READONLYPAGES = DWORD($80000000); // = 1 => read only pages
+ {$EXTERNALSYM DSOBJECT_READONLYPAGES}
+
+ DSPROVIDER_UNUSED_0 = $00000001;
+ {$EXTERNALSYM DSPROVIDER_UNUSED_0}
+ DSPROVIDER_UNUSED_1 = $00000002;
+ {$EXTERNALSYM DSPROVIDER_UNUSED_1}
+ DSPROVIDER_UNUSED_2 = $00000004;
+ {$EXTERNALSYM DSPROVIDER_UNUSED_2}
+ DSPROVIDER_UNUSED_3 = $00000008;
+ {$EXTERNALSYM DSPROVIDER_UNUSED_3}
+ DSPROVIDER_ADVANCED = $00000010; // = 1 => advanced mode
+ {$EXTERNALSYM DSPROVIDER_ADVANCED}
+
+ CFSTR_DSOBJECTNAMES = 'DsObjectNames';
+ {$EXTERNALSYM CFSTR_DSOBJECTNAMES}
+
+type
+ LPDSOBJECT = ^DSOBJECT;
+ {$EXTERNALSYM LPDSOBJECT}
+ DSOBJECT = record
+ dwFlags: DWORD; // item flags
+ dwProviderFlags: DWORD; // flags for item provider
+ offsetName: DWORD; // offset to ADS path of the object
+ offsetClass: DWORD; // offset to object class name / == 0 not known
+ end;
+ {$EXTERNALSYM DSOBJECT}
+ TDsObject = DSOBJECT;
+ PDsObject = LPDSOBJECT;
+
+ LPDSOBJECTNAMES = ^DSOBJECTNAMES;
+ {$EXTERNALSYM LPDSOBJECTNAMES}
+ DSOBJECTNAMES = record
+ clsidNamespace: CLSID; // namespace identifier (indicates which namespace selection from)
+ cItems: UINT; // number of objects
+ aObjects: array [0..0] of DSOBJECT; // array of objects
+ end;
+ {$EXTERNALSYM DSOBJECTNAMES}
+ TDsObjectNames = DSOBJECTNAMES;
+ PDsObjectNames = LPDSOBJECTNAMES;
+
+//
+// CF_DSDISPLAYSPECOPTIONS
+// -----------------------
+// When invoking an object referenced by a display specifier (context menu, property
+// page, etc) we call the IShellExtInit interface passing a IDataObject. This data
+// object supports the CF_DSDISPLAYSPECOPTIONS format to give out configuration
+// informaiton about admin/shell invocation.
+//
+// When interacting with dsuiext.dll the interfaces uses this clipboard format
+// to determine which display specifier attributes to address (admin/shell)
+// and pick up the values accordingly. If no format is suppoted then
+// dsuiext.dll defaults to shell.
+//
+
+const
+ CFSTR_DS_DISPLAY_SPEC_OPTIONS = 'DsDisplaySpecOptions';
+ {$EXTERNALSYM CFSTR_DS_DISPLAY_SPEC_OPTIONS}
+ CFSTR_DSDISPLAYSPECOPTIONS = CFSTR_DS_DISPLAY_SPEC_OPTIONS;
+ {$EXTERNALSYM CFSTR_DSDISPLAYSPECOPTIONS}
+
+type
+ LPDSDISPLAYSPECOPTIONS = ^DSDISPLAYSPECOPTIONS;
+ {$EXTERNALSYM LPDSDISPLAYSPECOPTIONS}
+ _DSDISPLAYSPECOPTIONS = record
+ dwSize: DWORD; // size of struct, for versioning
+ dwFlags: DWORD; // invocation flags
+ offsetAttribPrefix: DWORD; // offset to attribute prefix string.
+ offsetUserName: DWORD; // offset to UNICODE user name
+ offsetPassword: DWORD; // offset to UNICODE password
+ offsetServer: DWORD;
+ offsetServerConfigPath: DWORD;
+ end;
+ {$EXTERNALSYM _DSDISPLAYSPECOPTIONS}
+ DSDISPLAYSPECOPTIONS = _DSDISPLAYSPECOPTIONS;
+ {$EXTERNALSYM DSDISPLAYSPECOPTIONS}
+ TDsDisplaySpecOptions = DSDISPLAYSPECOPTIONS;
+ PDsDisplaySpecOptions = LPDSDISPLAYSPECOPTIONS;
+
+const
+ DS_PROP_SHELL_PREFIX = 'shell';
+ {$EXTERNALSYM DS_PROP_SHELL_PREFIX}
+ DS_PROP_ADMIN_PREFIX = 'admin';
+ {$EXTERNALSYM DS_PROP_ADMIN_PREFIX}
+
+ DSDSOF_HASUSERANDSERVERINFO = $00000001; // = 1 => user name/password are valid
+ {$EXTERNALSYM DSDSOF_HASUSERANDSERVERINFO}
+ DSDSOF_SIMPLEAUTHENTICATE = $00000002; // = 1 => don't use secure authentication to DS
+ {$EXTERNALSYM DSDSOF_SIMPLEAUTHENTICATE}
+ DSDSOF_DONTSIGNSEAL = $00000004; // = 1 => don't sign+seal when opening DS objects
+ {$EXTERNALSYM DSDSOF_DONTSIGNSEAL}
+ DSDSOF_DSAVAILABLE = $40000000; // = 1 => ignore DS available checks
+ {$EXTERNALSYM DSDSOF_DSAVAILABLE}
+
+//
+// CF_DSPROPERTYPAGEINFO
+// ---------------------
+// When the property pages for an object are being displayed the parsed
+// display specifier string is passed to the page object via the IDataObject
+// in the following clipboard format.
+//
+// Within the display specifier for a property page, the format for a
+// Win32 extension is "n,{clsid}[,bla...]" we take the "bla" section and
+// pass it down.
+//
+
+ CFSTR_DSPROPERTYPAGEINFO = 'DsPropPageInfo';
+ {$EXTERNALSYM CFSTR_DSPROPERTYPAGEINFO}
+
+type
+ LPDSPROPERTYPAGEINFO = ^DSPROPERTYPAGEINFO;
+ {$EXTERNALSYM LPDSPROPERTYPAGEINFO}
+ DSPROPERTYPAGEINFO = record
+ offsetString: DWORD; // offset to UNICODE string
+ end;
+ {$EXTERNALSYM DSPROPERTYPAGEINFO}
+ TDsPropertyPageInfo = DSPROPERTYPAGEINFO;
+ PDsPropertyPageInfo = LPDSPROPERTYPAGEINFO;
+
+//
+// To sync property pages and the admin tools this message is broadcast
+//
+
+const
+ DSPROP_ATTRCHANGED_MSG = 'DsPropAttrChanged';
+ {$EXTERNALSYM DSPROP_ATTRCHANGED_MSG}
+
+//---------------------------------------------------------------------------//
+
+//---------------------------------------------------------------------------//
+//
+// IDsBrowseDomainTree
+// ===================
+// This interface returns a list of the domains from a given computer name
+// (or the current computer name if none is specified).
+//
+// NOTES:
+// 1) The structure returned by ::GetDomains should be free'd using
+// FreeDomains.
+//
+// 2) ::BrowseTo allocates a string on exit, this is allocated using
+// CoTaskMemAlloc, and therefore should be free'd using CoTaskMemFree.
+//
+//---------------------------------------------------------------------------//
+
+ DBDTF_RETURNFQDN = $00000001; // if not set, pszNCName will be blank
+ {$EXTERNALSYM DBDTF_RETURNFQDN}
+ DBDTF_RETURNMIXEDDOMAINS = $00000002; // set it if you want downlevel trust domains too
+ {$EXTERNALSYM DBDTF_RETURNMIXEDDOMAINS}
+ DBDTF_RETURNEXTERNAL = $00000004; // set it if you want external trust domains too
+ {$EXTERNALSYM DBDTF_RETURNEXTERNAL}
+ DBDTF_RETURNINBOUND = $00000008; // set it if you want trusting domains
+ {$EXTERNALSYM DBDTF_RETURNINBOUND}
+ DBDTF_RETURNINOUTBOUND = $00000010; // set it if you want both trusted and trusting domains
+ {$EXTERNALSYM DBDTF_RETURNINOUTBOUND}
+
+type
+ PDOMAINDESC = ^DOMAINDESC;
+ {$EXTERNALSYM PDOMAINDESC}
+ _DOMAINDESC = record
+ pszName: LPWSTR; // domain name (if no dns, use netbios)
+ pszPath: LPWSTR; // set to blank
+ pszNCName: LPWSTR; // FQDN, e.g.,DC=mydomain,DC=microsoft,DC=com
+ pszTrustParent: LPWSTR; // parent domain name (if no dns, use netbios)
+ pszObjectClass: LPWSTR; // Object class of the domain object referenced
+ ulFlags: ULONG; // Flags, from DS_TRUSTED_DOMAINS.Flags
+ fDownLevel: BOOL; // == 1 if downlevel domain
+ pdChildList: PDOMAINDESC; // Children of this node
+ pdNextSibling: PDOMAINDESC; // Siblings of this node
+ end;
+ {$EXTERNALSYM _DOMAINDESC}
+ DOMAINDESC = _DOMAINDESC;
+ {$EXTERNALSYM DOMAINDESC}
+ TDomainDesc = DOMAINDESC;
+
+ PDOMAIN_TREE = ^DOMAIN_TREE;
+ {$EXTERNALSYM PDOMAIN_TREE}
+ DOMAIN_TREE = record
+ dsSize: DWORD;
+ dwCount: DWORD;
+ aDomains: array [0..1 - 1] of DOMAINDESC;
+ end;
+ {$EXTERNALSYM DOMAIN_TREE}
+ DOMAINTREE = DOMAIN_TREE;
+ {$EXTERNALSYM DOMAINTREE}
+ TDomainTree = DOMAIN_TREE;
+ PDomainTree = PDOMAIN_TREE;
+
+ IDsBrowseDomainTree = interface (IUnknown)
+ ['{7cabcf1e-78f5-11d2-960c-00c04fa31a86}']
+ function BrowseTo(hwndParent: HWND; var ppszTargetPath: LPWSTR;
+ dwFlags: DWORD): HRESULT; stdcall;
+ function GetDomains(var ppDomainTree: PDOMAIN_TREE;
+ dwFlags: DWORD): HRESULT; stdcall;
+ function FreeDomains(var ppDomainTree: PDOMAIN_TREE): HRESULT; stdcall;
+ function FlushCachedDomains: HRESULT; stdcall;
+ function SetComputer(pszComputerName, pszUserName,
+ pszPassword: LPCWSTR): HRESULT; stdcall;
+ end;
+ {$EXTERNALSYM IDsBrowseDomainTree}
+
+//---------------------------------------------------------------------------//
+
+//---------------------------------------------------------------------------//
+//
+// IDsDisplaySpecifier
+// ===================
+// This interface gives client UI access to the display specifiers for
+// specific attributes.
+//
+//---------------------------------------------------------------------------//
+
+//
+// IDsDisplaySpecifier::SetServer flags
+//
+
+const
+ DSSSF_SIMPLEAUTHENTICATE = $00000001; // = 1 => don't use secure authentication to DS
+ {$EXTERNALSYM DSSSF_SIMPLEAUTHENTICATE}
+ DSSSF_DONTSIGNSEAL = $00000002; // = 1 => don't use sign+seal when opening objects in the DS
+ {$EXTERNALSYM DSSSF_DONTSIGNSEAL}
+ DSSSF_DSAVAILABLE = DWORD($80000000); // = 1 => ignore DS available checks
+ {$EXTERNALSYM DSSSF_DSAVAILABLE}
+
+//
+// Flags for IDsDisplaySpecifier::GetIcon / GetIconLocation
+//
+
+ DSGIF_ISNORMAL = $0000000; // = icon is in normal state (default)
+ {$EXTERNALSYM DSGIF_ISNORMAL}
+ DSGIF_ISOPEN = $0000001; // = icon is in open state
+ {$EXTERNALSYM DSGIF_ISOPEN}
+ DSGIF_ISDISABLED = $0000002; // = icon is in a disabled state
+ {$EXTERNALSYM DSGIF_ISDISABLED}
+ DSGIF_ISMASK = $000000f;
+ {$EXTERNALSYM DSGIF_ISMASK}
+ DSGIF_GETDEFAULTICON = $0000010; // = 1 => if no icon then get default (from shell32.dll)
+ {$EXTERNALSYM DSGIF_GETDEFAULTICON}
+ DSGIF_DEFAULTISCONTAINER = $0000020; // = 1 => if returning default icon, return it as a container
+ {$EXTERNALSYM DSGIF_DEFAULTISCONTAINER}
+
+//
+// Flags for IDsDisplaySpecifier::IsClassContainer
+//
+
+ DSICCF_IGNORETREATASLEAF = $00000001; // = 1 => igore the "treatAsLeaf" and use only schema information
+ {$EXTERNALSYM DSICCF_IGNORETREATASLEAF}
+
+//
+// Callback function used for IDsDisplaySpecifier::EnumClassAttributes
+//
+
+ DSECAF_NOTLISTED = $00000001; // = 1 => hide from the field drop down in the query UI
+ {$EXTERNALSYM DSECAF_NOTLISTED}
+
+type
+ LPDSENUMATTRIBUTES = function(lParam: LPARAM; pszAttributeName: LPCWSTR;
+ pszDisplayName: LPCWSTR; dwFlags: DWORD): HRESULT; stdcall;
+ {$EXTERNALSYM LPDSENUMATTRIBUTES}
+ TDsEnumAttributes = LPDSENUMATTRIBUTES;
+
+//
+// IDsDisplaySpecifier::GetClassCreationInfo information
+//
+
+const
+ DSCCIF_HASWIZARDDIALOG = $00000001; // = 1 => return the wizard dialog CLSID
+ {$EXTERNALSYM DSCCIF_HASWIZARDDIALOG}
+ DSCCIF_HASWIZARDPRIMARYPAGE = $00000002; // = 1 => returning a primary wizard dlg CLSID
+ {$EXTERNALSYM DSCCIF_HASWIZARDPRIMARYPAGE}
+
+type
+ LPDSCLASSCREATIONINFO = ^DSCLASSCREATIONINFO;
+ {$EXTERNALSYM LPDSCLASSCREATIONINFO}
+ DSCLASSCREATIONINFO = record
+ dwFlags: DWORD;
+ clsidWizardDialog: CLSID;
+ clsidWizardPrimaryPage: CLSID;
+ cWizardExtensions: DWORD; // how many extension CLSIDs?
+ aWizardExtensions: array [0..0] of CLSID;
+ end;
+ {$EXTERNALSYM DSCLASSCREATIONINFO}
+ TDsClassCreationInfo = DSCLASSCREATIONINFO;
+ PDsClassCreationInfo = LPDSCLASSCREATIONINFO;
+
+//
+// IDsDisplaySpecifier - a COM object for interacting with display specifiers
+//
+
+ IDsDisplaySpecifier = interface (IUnknown)
+ ['{1ab4a8c0-6a0b-11d2-ad49-00c04fa31a86}']
+ function SetServer(pszServer, pszUserName, pszPassword: LPCWSTR;
+ dwFlags: DWORD): HRESULT; stdcall;
+ function SetLanguageID(langid: LANGID): HRESULT; stdcall;
+ function GetDisplaySpecifier(pszObjectClass: LPCWSTR; riid: LPGUID;
+ var ppv: Pointer): HRESULT; stdcall;
+ function GetIconLocation(pszObjectClass: LPCWSTR; dwFlags: DWORD;
+ pszBuffer: LPWSTR; cchBuffer: Integer; var presid: Integer): HRESULT; stdcall;
+ function GetIcon(pszObjectClass: LPCWSTR; dwFlags: DWORD;
+ cxIcon, cyIcon: Integer): HICON; stdcall;
+ function GetFriendlyClassName(pszObjectClass: LPCWSTR; pszBuffer: LPWSTR;
+ cchBuffer: Integer): HRESULT; stdcall;
+ function GetFriendlyAttributeName(pszObjectClass, pszAttributeName,
+ pszBuffer: LPCWSTR; cchBuffer: UINT): HRESULT; stdcall;
+ function IsClassContainer(pszObjectClass, pszADsPath: LPCWSTR;
+ dwFlags: DWORD): BOOL; stdcall;
+ function GetClassCreationInfo(pszObjectClass: LPCWSTR;
+ var ppdscci: LPDSCLASSCREATIONINFO): HRESULT; stdcall;
+ function EnumClassAttributes(pszObjectClass: LPCWSTR;
+ pcbEnum: LPDSENUMATTRIBUTES; lParam: LPARAM): HRESULT; stdcall;
+ function GetAttributeADsType(pszAttributeName: LPCWSTR): ADSTYPEENUM; stdcall;
+ end;
+ {$EXTERNALSYM IDsDisplaySpecifier}
+
+//---------------------------------------------------------------------------//
+//
+// DsBrowseForContainer
+// --------------------
+// Provides a container browser similar to the SHBrowseForFolder, except
+// targetting the DS.
+//
+// In:
+// pInfo -> DSBROWSEINFO structure
+//
+// Out:
+// == IDOK/IDCANCEL depending on buttons, -1 if error
+//
+//---------------------------------------------------------------------------//
+
+type
+ BFFCALLBACK = function(hwnd: HWND; msg: UINT;
+ lpData, lParam: LPARAM): Integer; stdcall;
+ {$NODEFINE BFFCALLBACK}
+ TBffCallback = BFFCALLBACK;
+
+ PDSBROWSEINFOW = ^DSBROWSEINFOW;
+ DSBROWSEINFOW = record
+ cbStruct: DWORD; // size of structure in bytes
+ hwndOwner: HWND; // dialog owner
+ pszCaption: LPCWSTR; // dialog caption text (can be NULL)
+ pszTitle: LPCWSTR; // displayed above the tree view control (can be NULL)
+ pszRoot: LPCWSTR; // ADS path to root (NULL == root of DS namespace)
+ pszPath: LPWSTR; // [in/out] initial selection & returned path (required)
+ cchPath: ULONG; // size of pszPath buffer in characters
+ dwFlags: DWORD;
+ pfnCallback: BFFCALLBACK; // callback function(see SHBrowseForFolder)
+ lParam: LPARAM; // passed to pfnCallback as lpUserData
+ dwReturnFormat: DWORD; // ADS_FORMAT_* (default is ADS_FORMAT_X500_NO_SERVER)
+ pUserName: LPCWSTR; // Username and Password to authenticate against DS with
+ pPassword: LPCWSTR;
+ pszObjectClass: LPWSTR; // UNICODE string for the object class
+ cchObjectClass: ULONG;
+ end;
+ {$EXTERNALSYM DSBROWSEINFOW}
+ TDsBrowseInfoW = DSBROWSEINFOW;
+
+ PDSBROWSEINFOA = ^DSBROWSEINFOA;
+ DSBROWSEINFOA = record
+ cbStruct: DWORD;
+ hwndOwner: HWND;
+ pszCaption: LPCSTR;
+ pszTitle: LPCSTR;
+ pszRoot: LPCWSTR; // ADS paths are always UNICODE
+ pszPath: LPWSTR; // ditto
+ cchPath: ULONG;
+ dwFlags: DWORD;
+ pfnCallback: BFFCALLBACK;
+ lParam: LPARAM;
+ dwReturnFormat: DWORD;
+ pUserName: LPCWSTR; // Username and Password to authenticate against DS with
+ pPassword: LPCWSTR;
+ pszObjectClass: LPWSTR; // object class of the selected object
+ cchObjectClass: ULONG;
+ end;
+ {$EXTERNALSYM DSBROWSEINFOA}
+ TDsBrowseInfoA = DSBROWSEINFOA;
+
+ {$IFDEF UNICODE}
+ DSBROWSEINFO = DSBROWSEINFOW;
+ {$EXTERNALSYM DSBROWSEINFO}
+ PDSBROWSEINFO = PDSBROWSEINFOW;
+ {$EXTERNALSYM PDSBROWSEINFO}
+ TDsBrowseInfo = TDsBrowseInfoW;
+ {$ELSE}
+ DSBROWSEINFO = DSBROWSEINFOA;
+ {$EXTERNALSYM DSBROWSEINFO}
+ PDSBROWSEINFO = PDSBROWSEINFOA;
+ {$EXTERNALSYM PDSBROWSEINFO}
+ TDsBrowseInfo = TDsBrowseInfoA;
+ {$ENDIF UNICODE}
+
+// DSBROWSEINFO flags
+
+const
+ DSBI_NOBUTTONS = $00000001; // NOT TVS_HASBUTTONS
+ {$EXTERNALSYM DSBI_NOBUTTONS}
+ DSBI_NOLINES = $00000002; // NOT TVS_HASLINES
+ {$EXTERNALSYM DSBI_NOLINES}
+ DSBI_NOLINESATROOT = $00000004; // NOT TVS_LINESATROOT
+ {$EXTERNALSYM DSBI_NOLINESATROOT}
+ DSBI_CHECKBOXES = $00000100; // TVS_CHECKBOXES
+ {$EXTERNALSYM DSBI_CHECKBOXES}
+ DSBI_NOROOT = $00010000; // don't include pszRoot in tree (its children become top level nodes)
+ {$EXTERNALSYM DSBI_NOROOT}
+ DSBI_INCLUDEHIDDEN = $00020000; // display hidden objects
+ {$EXTERNALSYM DSBI_INCLUDEHIDDEN}
+ DSBI_EXPANDONOPEN = $00040000; // expand to the path specified in pszPath when opening the dialog
+ {$EXTERNALSYM DSBI_EXPANDONOPEN}
+ DSBI_ENTIREDIRECTORY = $00090000; // browse the entire directory (defaults to having DSBI_NOROOT set)
+ {$EXTERNALSYM DSBI_ENTIREDIRECTORY}
+ DSBI_RETURN_FORMAT = $00100000; // dwReturnFormat field is valid
+ {$EXTERNALSYM DSBI_RETURN_FORMAT}
+ DSBI_HASCREDENTIALS = $00200000; // pUserName & pPassword are valid
+ {$EXTERNALSYM DSBI_HASCREDENTIALS}
+ DSBI_IGNORETREATASLEAF = $00400000; // ignore the treat as leaf flag when calling IsClassContainer
+ {$EXTERNALSYM DSBI_IGNORETREATASLEAF}
+ DSBI_SIMPLEAUTHENTICATE = $00800000; // don't use secure authentication to DS
+ {$EXTERNALSYM DSBI_SIMPLEAUTHENTICATE}
+ DSBI_RETURNOBJECTCLASS = $01000000; // return object class of selected object
+ {$EXTERNALSYM DSBI_RETURNOBJECTCLASS}
+ DSBI_DONTSIGNSEAL = $02000000; // don't sign+seal communication with DS
+ {$EXTERNALSYM DSBI_DONTSIGNSEAL}
+
+ DSB_MAX_DISPLAYNAME_CHARS = 64;
+ {$EXTERNALSYM DSB_MAX_DISPLAYNAME_CHARS}
+
+type
+ PDSBITEMW = ^DSBITEMW;
+ DSBITEMW = record
+ cbStruct: DWORD;
+ pszADsPath: LPCWSTR; // ADS paths are always Unicode
+ pszClass: LPCWSTR; // ADS properties are always Unicode
+ dwMask: DWORD;
+ dwState: DWORD;
+ dwStateMask: DWORD;
+ szDisplayName: array [0..DSB_MAX_DISPLAYNAME_CHARS - 1] of WCHAR;
+ szIconLocation: array [0..MAX_PATH - 1] of WCHAR;
+ iIconResID: Integer;
+ end;
+ {$EXTERNALSYM DSBITEMW}
+ TDsBItemW = DSBITEMW;
+
+ PDSBITEMA = ^DSBITEMA;
+ DSBITEMA = record
+ cbStruct: DWORD;
+ pszADsPath: LPCWSTR; // ADS paths are always Unicode
+ pszClass: LPCWSTR; // ADS properties are always Unicode
+ dwMask: DWORD;
+ dwState: DWORD;
+ dwStateMask: DWORD;
+ szDisplayName: array [0..DSB_MAX_DISPLAYNAME_CHARS - 1] of CHAR;
+ szIconLocation: array [0..MAX_PATH - 1] of CHAR;
+ iIconResID: Integer;
+ end;
+ {$EXTERNALSYM DSBITEMA}
+ TDsBItemA = DSBITEMA;
+
+ {$IFDEF UNICODE}
+ DSBITEM = DSBITEMW;
+ {$EXTERNALSYM DSBITEM}
+ PDSBITEM = PDSBITEMW;
+ {$EXTERNALSYM PDSBITEM}
+ TDsBItem = TDsBItemW;
+ {$ELSE}
+ DSBITEM = DSBITEMA;
+ {$EXTERNALSYM DSBITEM}
+ PDSBITEM = PDSBITEMA;
+ {$EXTERNALSYM PDSBITEM}
+ TDsBItem = TDsBItemA;
+ {$ENDIF UNICODE}
+
+// DSBITEM mask flags
+
+const
+ DSBF_STATE = $00000001;
+ {$EXTERNALSYM DSBF_STATE}
+ DSBF_ICONLOCATION = $00000002;
+ {$EXTERNALSYM DSBF_ICONLOCATION}
+ DSBF_DISPLAYNAME = $00000004;
+ {$EXTERNALSYM DSBF_DISPLAYNAME}
+
+// DSBITEM state flags
+
+ DSBS_CHECKED = $00000001;
+ {$EXTERNALSYM DSBS_CHECKED}
+ DSBS_HIDDEN = $00000002;
+ {$EXTERNALSYM DSBS_HIDDEN}
+ DSBS_ROOT = $00000004;
+ {$EXTERNALSYM DSBS_ROOT}
+
+//
+// this message is sent to the callback to see if it wants to insert or modify
+// the item that is about to be inserted into the view.
+//
+
+ DSBM_QUERYINSERTW = 100; // lParam = PDSBITEMW (state, icon & name may be modified). Return TRUE if handled.
+ {$EXTERNALSYM DSBM_QUERYINSERTW}
+ DSBM_QUERYINSERTA = 101; // lParam = PDSBITEMA (state, icon & name may be modified). Return TRUE if handled.
+ {$EXTERNALSYM DSBM_QUERYINSERTA}
+
+ {$IFDEF UNICODE}
+ DSBM_QUERYINSERT = DSBM_QUERYINSERTW;
+ {$EXTERNALSYM DSBM_QUERYINSERT}
+ {$ELSE}
+ DSBM_QUERYINSERT = DSBM_QUERYINSERTA;
+ {$EXTERNALSYM DSBM_QUERYINSERT}
+ {$ENDIF UNICODE}
+
+//
+// Called before we change the state of the icon (on tree collapse/expand)
+//
+
+ DSBM_CHANGEIMAGESTATE = 102; // lParam = adspath. Return TRUE/FALSE top allow/disallow
+ {$EXTERNALSYM DSBM_CHANGEIMAGESTATE}
+
+//
+// The dialog receives a WM_HELP
+//
+
+ DSBM_HELP = 103; // lParam == LPHELPINFO structure
+ {$EXTERNALSYM DSBM_HELP}
+
+//
+// The dialog receives a WM_CONTEXTMENU, DSBID_xxx are the control ID's for this
+// dialog so that you can display suitable help.
+//
+
+ DSBM_CONTEXTMENU = 104; // lParam == window handle to retrieve help for
+ {$EXTERNALSYM DSBM_CONTEXTMENU}
+
+//
+// These are the control IDs for the controls in the dialog. The callback can use
+// these to modify the contents of the dialog as required.
+//
+
+ DSBID_BANNER = 256;
+ {$EXTERNALSYM DSBID_BANNER}
+ DSBID_CONTAINERLIST = 257;
+ {$EXTERNALSYM DSBID_CONTAINERLIST}
+
+//
+// API exported for browsing for containers.
+//
+
+function DsBrowseForContainerW(const pInfo: DSBROWSEINFOW): Integer; stdcall;
+{$EXTERNALSYM DsBrowseForContainerW}
+function DsBrowseForContainerA(const pInfo: DSBROWSEINFOA): Integer; stdcall;
+{$EXTERNALSYM DsBrowseForContainerA}
+function DsBrowseForContainer(const pInfo: DSBROWSEINFO): Integer; stdcall;
+{$EXTERNALSYM DsBrowseForContainer}
+
+//BUGBUG: these are here to keep old clients building - remove soon
+
+function DsGetIcon(dwFlags: DWORD; pszObjectClass: LPWSTR;
+ cxImage, cyImage: Integer): HICON; stdcall;
+{$EXTERNALSYM DsGetIcon}
+procedure DsGetFriendlyClassName(pszObjectClass, pszBuffer: LPWSTR;
+ cchBuffer: UINT); stdcall;
+{$EXTERNALSYM DsGetFriendlyClassName}
+
+implementation
+
+const
+ dsuiext = 'dsuiext.dll';
+ {$IFDEF UNICODE}
+ AWSuffix = 'W';
+ {$ELSE}
+ AWSuffix = 'A';
+ {$ENDIF UNICODE}
+
+{$IFDEF DYNAMIC_LINK}
+
+var
+ _DsBrowseForContainerW: Pointer;
+
+function DsBrowseForContainerW;
+begin
+ GetProcedureAddress(_DsBrowseForContainerW, dsuiext, 'DsBrowseForContainerW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsBrowseForContainerW]
+ end;
+end;
+
+var
+ _DsBrowseForContainerA: Pointer;
+
+function DsBrowseForContainerA;
+begin
+ GetProcedureAddress(_DsBrowseForContainerA, dsuiext, 'DsBrowseForContainerA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsBrowseForContainerA]
+ end;
+end;
+
+var
+ _DsBrowseForContainer: Pointer;
+
+function DsBrowseForContainer;
+begin
+ GetProcedureAddress(_DsBrowseForContainer, dsuiext, 'DsBrowseForContainer' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsBrowseForContainer]
+ end;
+end;
+
+var
+ _DsGetIcon: Pointer;
+
+function DsGetIcon;
+begin
+ GetProcedureAddress(_DsGetIcon, dsuiext, 'DsGetIcon');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsGetIcon]
+ end;
+end;
+
+var
+ _DsGetFriendlyClassName: Pointer;
+
+procedure DsGetFriendlyClassName;
+begin
+ GetProcedureAddress(_DsGetFriendlyClassName, dsuiext, 'DsGetFriendlyClassName');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsGetFriendlyClassName]
+ end;
+end;
+
+{$ELSE}
+
+function DsBrowseForContainerW; external dsuiext name 'DsBrowseForContainerW';
+function DsBrowseForContainerA; external dsuiext name 'DsBrowseForContainerA';
+function DsBrowseForContainer; external dsuiext name 'DsBrowseForContainer' + AWSuffix;
+function DsGetIcon; external dsuiext name 'DsGetIcon';
+procedure DsGetFriendlyClassName; external dsuiext name 'DsGetFriendlyClassName';
+
+{$ENDIF DYNAMIC_LINK}
+
+end.
diff --git a/packages/extra/winunits/jwadsgetdc.pas b/packages/extra/winunits/jwadsgetdc.pas
index 58d52b7fe9..d31390de37 100644
--- a/packages/extra/winunits/jwadsgetdc.pas
+++ b/packages/extra/winunits/jwadsgetdc.pas
@@ -1,1014 +1,1014 @@
-{******************************************************************************}
-{ }
-{ Directory Services API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: dsgetdc.h, released June 2000. The original Pascal }
-{ code is: DsGetDc.pas, released December 2000. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwadsgetdc.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaDSGetDc;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "DsGetDC.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaNtSecApi, JwaWinNT, JwaWinType;
-
-//
-// Structure definitions
-//
-
-//
-// Flags to passed to DsGetDcName
-//
-
-const
- DS_FORCE_REDISCOVERY = $00000001;
- {$EXTERNALSYM DS_FORCE_REDISCOVERY}
-
- DS_DIRECTORY_SERVICE_REQUIRED = $00000010;
- {$EXTERNALSYM DS_DIRECTORY_SERVICE_REQUIRED}
- DS_DIRECTORY_SERVICE_PREFERRED = $00000020;
- {$EXTERNALSYM DS_DIRECTORY_SERVICE_PREFERRED}
- DS_GC_SERVER_REQUIRED = $00000040;
- {$EXTERNALSYM DS_GC_SERVER_REQUIRED}
- DS_PDC_REQUIRED = $00000080;
- {$EXTERNALSYM DS_PDC_REQUIRED}
- DS_BACKGROUND_ONLY = $00000100;
- {$EXTERNALSYM DS_BACKGROUND_ONLY}
- DS_IP_REQUIRED = $00000200;
- {$EXTERNALSYM DS_IP_REQUIRED}
- DS_KDC_REQUIRED = $00000400;
- {$EXTERNALSYM DS_KDC_REQUIRED}
- DS_TIMESERV_REQUIRED = $00000800;
- {$EXTERNALSYM DS_TIMESERV_REQUIRED}
- DS_WRITABLE_REQUIRED = $00001000;
- {$EXTERNALSYM DS_WRITABLE_REQUIRED}
- DS_GOOD_TIMESERV_PREFERRED = $00002000;
- {$EXTERNALSYM DS_GOOD_TIMESERV_PREFERRED}
- DS_AVOID_SELF = $00004000;
- {$EXTERNALSYM DS_AVOID_SELF}
- DS_ONLY_LDAP_NEEDED = $00008000;
- {$EXTERNALSYM DS_ONLY_LDAP_NEEDED}
-
- DS_IS_FLAT_NAME = $00010000;
- {$EXTERNALSYM DS_IS_FLAT_NAME}
- DS_IS_DNS_NAME = $00020000;
- {$EXTERNALSYM DS_IS_DNS_NAME}
-
- DS_RETURN_DNS_NAME = $40000000;
- {$EXTERNALSYM DS_RETURN_DNS_NAME}
- DS_RETURN_FLAT_NAME = DWORD($80000000);
- {$EXTERNALSYM DS_RETURN_FLAT_NAME}
-
- DSGETDC_VALID_FLAGS =
- DS_FORCE_REDISCOVERY or
- DS_DIRECTORY_SERVICE_REQUIRED or
- DS_DIRECTORY_SERVICE_PREFERRED or
- DS_GC_SERVER_REQUIRED or
- DS_PDC_REQUIRED or
- DS_BACKGROUND_ONLY or
- DS_IP_REQUIRED or
- DS_KDC_REQUIRED or
- DS_TIMESERV_REQUIRED or
- DS_WRITABLE_REQUIRED or
- DS_GOOD_TIMESERV_PREFERRED or
- DS_AVOID_SELF or
- DS_ONLY_LDAP_NEEDED or
- DS_IS_FLAT_NAME or
- DS_IS_DNS_NAME or
- DS_RETURN_FLAT_NAME or
- DS_RETURN_DNS_NAME;
- {$EXTERNALSYM DSGETDC_VALID_FLAGS}
-
-//
-// Structure returned from DsGetDcName
-//
-
-type
- PDOMAIN_CONTROLLER_INFOA = ^DOMAIN_CONTROLLER_INFOA;
- {$EXTERNALSYM PDOMAIN_CONTROLLER_INFOA}
- _DOMAIN_CONTROLLER_INFOA = record
- DomainControllerName: LPSTR;
- DomainControllerAddress: LPSTR;
- DomainControllerAddressType: ULONG;
- DomainGuid: GUID;
- DomainName: LPSTR;
- DnsForestName: LPSTR;
- Flags: ULONG;
- DcSiteName: LPSTR;
- ClientSiteName: LPSTR;
- end;
- {$EXTERNALSYM _DOMAIN_CONTROLLER_INFOA}
- DOMAIN_CONTROLLER_INFOA = _DOMAIN_CONTROLLER_INFOA;
- {$EXTERNALSYM DOMAIN_CONTROLLER_INFOA}
- TDomainControllerInfoA = DOMAIN_CONTROLLER_INFOA;
- PDomainControllerInfoA = PDOMAIN_CONTROLLER_INFOA;
-
- PDOMAIN_CONTROLLER_INFOW = ^DOMAIN_CONTROLLER_INFOW;
- {$EXTERNALSYM PDOMAIN_CONTROLLER_INFOW}
- _DOMAIN_CONTROLLER_INFOW = record
- DomainControllerName: LPWSTR;
- DomainControllerAddress: LPWSTR;
- DomainControllerAddressType: ULONG;
- DomainGuid: GUID;
- DomainName: LPWSTR;
- DnsForestName: LPWSTR;
- Flags: ULONG;
- DcSiteName: LPWSTR;
- ClientSiteName: LPWSTR;
- end;
- {$EXTERNALSYM _DOMAIN_CONTROLLER_INFOW}
- DOMAIN_CONTROLLER_INFOW = _DOMAIN_CONTROLLER_INFOW;
- {$EXTERNALSYM DOMAIN_CONTROLLER_INFOW}
- TDomainControllerInfoW = DOMAIN_CONTROLLER_INFOW;
- PDomainControllerInfoW = PDOMAIN_CONTROLLER_INFOW;
-
- {$IFDEF UNICODE}
- DOMAIN_CONTROLLER_INFO = DOMAIN_CONTROLLER_INFOW;
- {$EXTERNALSYM DOMAIN_CONTROLLER_INFO}
- PDOMAIN_CONTROLLER_INFO = PDOMAIN_CONTROLLER_INFOW;
- {$EXTERNALSYM PDOMAIN_CONTROLLER_INFO}
- TDomainControllerInfo = TDomainControllerInfoW;
- PDomainControllerInfo = PDomainControllerInfoW;
- {$ELSE}
- DOMAIN_CONTROLLER_INFO = DOMAIN_CONTROLLER_INFOA;
- {$EXTERNALSYM DOMAIN_CONTROLLER_INFO}
- PDOMAIN_CONTROLLER_INFO = PDOMAIN_CONTROLLER_INFOA;
- {$EXTERNALSYM PDOMAIN_CONTROLLER_INFO}
- TDomainControllerInfo = TDomainControllerInfoA;
- PDomainControllerInfo = PDomainControllerInfoA;
- {$ENDIF UNICODE}
-
-//
-// Values for DomainControllerAddressType
-//
-
-const
- DS_INET_ADDRESS = 1;
- {$EXTERNALSYM DS_INET_ADDRESS}
- DS_NETBIOS_ADDRESS = 2;
- {$EXTERNALSYM DS_NETBIOS_ADDRESS}
-
-//
-// Values for returned Flags
-//
-
- DS_PDC_FLAG = $00000001; // DC is PDC of Domain
- {$EXTERNALSYM DS_PDC_FLAG}
- DS_GC_FLAG = $00000004; // DC is a GC of forest
- {$EXTERNALSYM DS_GC_FLAG}
- DS_LDAP_FLAG = $00000008; // Server supports an LDAP server
- {$EXTERNALSYM DS_LDAP_FLAG}
- DS_DS_FLAG = $00000010; // DC supports a DS and is a Domain Controller
- {$EXTERNALSYM DS_DS_FLAG}
- DS_KDC_FLAG = $00000020; // DC is running KDC service
- {$EXTERNALSYM DS_KDC_FLAG}
- DS_TIMESERV_FLAG = $00000040; // DC is running time service
- {$EXTERNALSYM DS_TIMESERV_FLAG}
- DS_CLOSEST_FLAG = $00000080; // DC is in closest site to client
- {$EXTERNALSYM DS_CLOSEST_FLAG}
- DS_WRITABLE_FLAG = $00000100; // DC has a writable DS
- {$EXTERNALSYM DS_WRITABLE_FLAG}
- DS_GOOD_TIMESERV_FLAG = $00000200; // DC is running time service (and has clock hardware)
- {$EXTERNALSYM DS_GOOD_TIMESERV_FLAG}
- DS_NDNC_FLAG = $00000400; // DomainName is non-domain NC serviced by the LDAP server
- {$EXTERNALSYM DS_NDNC_FLAG}
- DS_PING_FLAGS = $0000FFFF; // Flags returned on ping
- {$EXTERNALSYM DS_PING_FLAGS}
-
- DS_DNS_CONTROLLER_FLAG = $20000000; // DomainControllerName is a DNS name
- {$EXTERNALSYM DS_DNS_CONTROLLER_FLAG}
- DS_DNS_DOMAIN_FLAG = $40000000; // DomainName is a DNS name
- {$EXTERNALSYM DS_DNS_DOMAIN_FLAG}
- DS_DNS_FOREST_FLAG = DWORD($80000000); // DnsForestName is a DNS name
- {$EXTERNALSYM DS_DNS_FOREST_FLAG}
-
-//
-// Function Prototypes
-//
-
-function DsGetDcNameA(ComputerName, DomainName: LPCSTR; DomainGuid: LPGUID;
- SiteName: LPCSTR; Flags: ULONG; var DomainControllerInfo: PDOMAIN_CONTROLLER_INFOA): DWORD; stdcall;
-{$EXTERNALSYM DsGetDcNameA}
-function DsGetDcNameW(ComputerName, DomainName: LPCWSTR; DomainGuid: LPGUID;
- SiteName: LPCWSTR; Flags: ULONG; var DomainControllerInfo: PDOMAIN_CONTROLLER_INFOW): DWORD; stdcall;
-{$EXTERNALSYM DsGetDcNameW}
-function DsGetDcName(ComputerName, DomainName: LPCTSTR; DomainGuid: LPGUID;
- SiteName: LPCTSTR; Flags: ULONG; var DomainControllerInfo: PDOMAIN_CONTROLLER_INFO): DWORD; stdcall;
-{$EXTERNALSYM DsGetDcName}
-
-function DsGetSiteNameA(ComputerName: LPCSTR; var SiteName: LPSTR): DWORD; stdcall;
-{$EXTERNALSYM DsGetSiteNameA}
-function DsGetSiteNameW(ComputerName: LPCWSTR; var SiteName: LPWSTR): DWORD; stdcall;
-{$EXTERNALSYM DsGetSiteNameW}
-function DsGetSiteName(ComputerName: LPCTSTR; var SiteName: LPTSTR): DWORD; stdcall;
-{$EXTERNALSYM DsGetSiteName}
-
-function DsValidateSubnetNameA(SubnetName: LPCSTR): DWORD; stdcall;
-{$EXTERNALSYM DsValidateSubnetNameA}
-function DsValidateSubnetNameW(SubnetName: LPCWSTR): DWORD; stdcall;
-{$EXTERNALSYM DsValidateSubnetNameW}
-function DsValidateSubnetName(SubnetName: LPCTSTR): DWORD; stdcall;
-{$EXTERNALSYM DsValidateSubnetName}
-
-//
-// Only include if winsock2.h has been included
-//
-
-// Types from Winsock2.h
-
-type
- sockaddr = record
- sa_family: Word; // address family
- sa_data: array [0..13]of Char; // up to 14 bytes of direct address
- end;
- {$EXTERNALSYM sockaddr}
-
- PSOCKADDR = ^SOCKADDR;
- {$EXTERNALSYM PSOCKADDR}
- LPSOCKADDR = PSOCKADDR;
- {$EXTERNALSYM LPSOCKADDR}
-
- _SOCKET_ADDRESS = record
- lpSockaddr: LPSOCKADDR;
- iSockaddrLength: Integer;
- end;
- {$EXTERNALSYM _SOCKET_ADDRESS}
- SOCKET_ADDRESS = _SOCKET_ADDRESS;
- {$EXTERNALSYM SOCKET_ADDRESS}
- PSOCKET_ADDRESS = ^SOCKET_ADDRESS;
- {$EXTERNALSYM PSOCKET_ADDRESS}
- LPSOCKET_ADDRESS = PSOCKET_ADDRESS;
- {$EXTERNALSYM LPSOCKET_ADDRESS}
- TSocketAddress = SOCKET_ADDRESS;
- PSocketAddress = LPSOCKET_ADDRESS;
-
-function DsAddressToSiteNamesA(ComputerName: LPCSTR; EntryCount: DWORD;
- SocketAddresses: PSOCKET_ADDRESS; var SiteNames: PPChar): DWORD; stdcall;
-{$EXTERNALSYM DsAddressToSiteNamesA}
-function DsAddressToSiteNamesW(ComputerName: LPCWSTR; EntryCount: DWORD;
- SocketAddresses: PSOCKET_ADDRESS; var SiteNames: PPWideChar): DWORD; stdcall;
-{$EXTERNALSYM DsAddressToSiteNamesW}
-function DsAddressToSiteNames(ComputerName: LPCTSTR; EntryCount: DWORD;
- SocketAddresses: PSOCKET_ADDRESS; var SiteNames: PPTCHAR): DWORD; stdcall;
-{$EXTERNALSYM DsAddressToSiteNames}
-
-function DsAddressToSiteNamesExA(ComputerName: LPCSTR; EntryCount: DWORD;
- SocketAddresses: PSOCKET_ADDRESS; var SiteNames, SubnetNames: PPChar): DWORD; stdcall;
-{$EXTERNALSYM DsAddressToSiteNamesExA}
-function DsAddressToSiteNamesExW(ComputerName: LPCWSTR; EntryCount: DWORD;
- SocketAddresses: PSOCKET_ADDRESS; var SiteNames, SubnetNames: PPWideChar): DWORD; stdcall;
-{$EXTERNALSYM DsAddressToSiteNamesExW}
-function DsAddressToSiteNamesEx(ComputerName: LPCTSTR; EntryCount: DWORD;
- SocketAddresses: PSOCKET_ADDRESS; var SiteNames, SubnetNames: PPTCHAR): DWORD; stdcall;
-{$EXTERNALSYM DsAddressToSiteNamesEx}
-
-//
-// API to enumerate trusted domains
-//
-
-const
- DS_DOMAIN_IN_FOREST = $0001; // Domain is a member of the forest
- {$EXTERNALSYM DS_DOMAIN_IN_FOREST}
- DS_DOMAIN_DIRECT_OUTBOUND = $0002; // Domain is directly trusted
- {$EXTERNALSYM DS_DOMAIN_DIRECT_OUTBOUND}
- DS_DOMAIN_TREE_ROOT = $0004; // Domain is root of a tree in the forest
- {$EXTERNALSYM DS_DOMAIN_TREE_ROOT}
- DS_DOMAIN_PRIMARY = $0008; // Domain is the primary domain of queried server
- {$EXTERNALSYM DS_DOMAIN_PRIMARY}
- DS_DOMAIN_NATIVE_MODE = $0010; // Primary domain is running in native mode
- {$EXTERNALSYM DS_DOMAIN_NATIVE_MODE}
- DS_DOMAIN_DIRECT_INBOUND = $0020; // Domain is directly trusting
- {$EXTERNALSYM DS_DOMAIN_DIRECT_INBOUND}
- DS_DOMAIN_VALID_FLAGS = DS_DOMAIN_IN_FOREST or DS_DOMAIN_DIRECT_OUTBOUND or
- DS_DOMAIN_TREE_ROOT or DS_DOMAIN_PRIMARY or DS_DOMAIN_NATIVE_MODE or
- DS_DOMAIN_DIRECT_INBOUND;
- {$EXTERNALSYM DS_DOMAIN_VALID_FLAGS}
-
-type
- PDS_DOMAIN_TRUSTSW = ^DS_DOMAIN_TRUSTSW;
- {$EXTERNALSYM PDS_DOMAIN_TRUSTSW}
- _DS_DOMAIN_TRUSTSW = record
- //
- // Name of the trusted domain.
- //
- NetbiosDomainName: LPWSTR;
- DnsDomainName: LPWSTR;
- //
- // Flags defining attributes of the trust.
- //
- Flags: ULONG;
- //
- // Index to the domain that is the parent of this domain.
- // Only defined if NETLOGON_DOMAIN_IN_FOREST is set and
- // NETLOGON_DOMAIN_TREE_ROOT is not set.
- //
- ParentIndex: ULONG;
- //
- // The trust type and attributes of this trust.
- //
- // If NETLOGON_DOMAIN_DIRECTLY_TRUSTED is not set,
- // these value are infered.
- //
- TrustType: ULONG;
- TrustAttributes: ULONG;
- //
- // The SID of the trusted domain.
- //
- // If NETLOGON_DOMAIN_DIRECTLY_TRUSTED is not set,
- // this value will be NULL.
- //
- DomainSid: PSID;
- //
- // The GUID of the trusted domain.
- //
- DomainGuid: GUID;
- end;
- {$EXTERNALSYM _DS_DOMAIN_TRUSTSW}
- DS_DOMAIN_TRUSTSW = _DS_DOMAIN_TRUSTSW;
- {$EXTERNALSYM DS_DOMAIN_TRUSTSW}
- TDsDomainTrustsW = DS_DOMAIN_TRUSTSW;
- PDsDomainTrustsW = PDS_DOMAIN_TRUSTSW;
-
-//
-// ANSI version of the above struct
-//
-
- PDS_DOMAIN_TRUSTSA = ^DS_DOMAIN_TRUSTSA;
- {$EXTERNALSYM PDS_DOMAIN_TRUSTSA}
- _DS_DOMAIN_TRUSTSA = record
- NetbiosDomainName: LPSTR;
- DnsDomainName: LPSTR;
- Flags: ULONG;
- ParentIndex: ULONG;
- TrustType: ULONG;
- TrustAttributes: ULONG;
- DomainSid: PSID;
- DomainGuid: GUID;
- end;
- {$EXTERNALSYM _DS_DOMAIN_TRUSTSA}
- DS_DOMAIN_TRUSTSA = _DS_DOMAIN_TRUSTSA;
- {$EXTERNALSYM DS_DOMAIN_TRUSTSA}
- TDsDomainTrustsA = DS_DOMAIN_TRUSTSA;
- PDsDomainTrustsA = PDS_DOMAIN_TRUSTSA;
-
- {$IFDEF UNICODE}
- DS_DOMAIN_TRUSTS = DS_DOMAIN_TRUSTSW;
- {$EXTERNALSYM DS_DOMAIN_TRUSTS}
- PDS_DOMAIN_TRUSTS = PDS_DOMAIN_TRUSTSW;
- {$EXTERNALSYM PDS_DOMAIN_TRUSTS}
- TDsDomainTrusts = TDsDomainTrustsW;
- PDsDomainTrusts = PDsDomainTrustsW;
- {$ELSE}
- DS_DOMAIN_TRUSTS = DS_DOMAIN_TRUSTSA;
- {$EXTERNALSYM DS_DOMAIN_TRUSTS}
- PDS_DOMAIN_TRUSTS = PDS_DOMAIN_TRUSTSA;
- {$EXTERNALSYM PDS_DOMAIN_TRUSTS}
- TDsDomainTrusts = TDsDomainTrustsA;
- PDsDomainTrusts = PDsDomainTrustsA;
- {$ENDIF UNICODE}
-
-function DsEnumerateDomainTrustsA(ServerName: LPSTR; Flags: ULONG;
- var Domains: PDS_DOMAIN_TRUSTSA; var DomainCount: ULONG): DWORD; stdcall;
-{$EXTERNALSYM DsEnumerateDomainTrustsA}
-function DsEnumerateDomainTrustsW(ServerName: LPWSTR; Flags: ULONG;
- var Domains: PDS_DOMAIN_TRUSTSW; var DomainCount: ULONG): DWORD; stdcall;
-{$EXTERNALSYM DsEnumerateDomainTrustsW}
-function DsEnumerateDomainTrusts(ServerName: LPTSTR; Flags: ULONG;
- var Domains: PDS_DOMAIN_TRUSTS; var DomainCount: ULONG): DWORD; stdcall;
-{$EXTERNALSYM DsEnumerateDomainTrusts}
-
-//
-// Only define this API if the caller has #included the pre-requisite
-// ntlsa.h or ntsecapi.h
-//
-
-function DsGetForestTrustInformationW(ServerName, TrustedDomainName: LPCWSTR;
- Flags: DWORD; var ForestTrustInfo: PLSA_FOREST_TRUST_INFORMATION): DWORD; stdcall;
-{$EXTERNALSYM DsGetForestTrustInformationW}
-
-const
- DS_GFTI_UPDATE_TDO = $1; // Update TDO with information returned
- {$EXTERNALSYM DS_GFTI_UPDATE_TDO}
- DS_GFTI_VALID_FLAGS = $1; // All valid flags to DsGetForestTrustInformation
- {$EXTERNALSYM DS_GFTI_VALID_FLAGS}
-
-function DsMergeForestTrustInformationW(DomainName: LPCWSTR; NewForestTrustInfo,
- OldForestTrustInfo: PLSA_FOREST_TRUST_INFORMATION;
- var MergedForestTrustInfo: PLSA_FOREST_TRUST_INFORMATION): DWORD; stdcall;
-{$EXTERNALSYM DsMergeForestTrustInformationW}
-
-function DsGetDcSiteCoverageA(ServerName: LPCSTR; var EntryCount: ULONG;
- var SiteNames: PPChar): DWORD; stdcall;
-{$EXTERNALSYM DsGetDcSiteCoverageA}
-function DsGetDcSiteCoverageW(ServerName: LPCWSTR; var EntryCount: ULONG;
- var SiteNames: PPWideChar): DWORD; stdcall;
-{$EXTERNALSYM DsGetDcSiteCoverageW}
-function DsGetDcSiteCoverage(ServerName: LPCTSTR; var EntryCount: ULONG;
- var SiteNames: PPTCHAR): DWORD; stdcall;
-{$EXTERNALSYM DsGetDcSiteCoverage}
-
-function DsDeregisterDnsHostRecordsA(ServerName, DnsDomainName: LPSTR;
- DomainGuid, DsaGuid: LPGUID; DnsHostName: LPSTR): DWORD; stdcall;
-{$EXTERNALSYM DsDeregisterDnsHostRecordsA}
-function DsDeregisterDnsHostRecordsW(ServerName, DnsDomainName: LPWSTR;
- DomainGuid, DsaGuid: LPGUID; DnsHostName: LPWSTR): DWORD; stdcall;
-{$EXTERNALSYM DsDeregisterDnsHostRecordsW}
-function DsDeregisterDnsHostRecords(ServerName, DnsDomainName: LPTSTR;
- DomainGuid, DsaGuid: LPGUID; DnsHostName: LPTSTR): DWORD; stdcall;
-{$EXTERNALSYM DsDeregisterDnsHostRecords}
-
-//
-// Option flags passed to DsGetDcOpen
-//
-
-const
- DS_ONLY_DO_SITE_NAME = $01; // Non-site specific names should be avoided.
- {$EXTERNALSYM DS_ONLY_DO_SITE_NAME}
- DS_NOTIFY_AFTER_SITE_RECORDS = $02; // Return ERROR_FILEMARK_DETECTED after all
- {$EXTERNALSYM DS_NOTIFY_AFTER_SITE_RECORDS}
- // site specific records have been processed.
-
- DS_OPEN_VALID_OPTION_FLAGS = DS_ONLY_DO_SITE_NAME or DS_NOTIFY_AFTER_SITE_RECORDS;
- {$EXTERNALSYM DS_OPEN_VALID_OPTION_FLAGS}
-
-//
-// Valid DcFlags for DsGetDcOpen
-//
-
- DS_OPEN_VALID_FLAGS =
- DS_FORCE_REDISCOVERY or
- DS_ONLY_LDAP_NEEDED or
- DS_KDC_REQUIRED or
- DS_PDC_REQUIRED or
- DS_GC_SERVER_REQUIRED or
- DS_WRITABLE_REQUIRED;
- {$EXTERNALSYM DS_OPEN_VALID_FLAGS}
-
-function DsGetDcOpenW(DnsName: LPCWSTR; OptionFlags: ULONG; SiteName: LPCWSTR;
- DomainGuid: PGUID; DnsForestName: LPCWSTR; DcFlags: ULONG;
- var RetGetDcContext: HANDLE): DWORD; stdcall;
-{$EXTERNALSYM DsGetDcOpenW}
-
-function DsGetDcOpenA(DnsName: LPCSTR; OptionFlags: ULONG; SiteName: LPCSTR;
- DomainGuid: PGUID; DnsForestName: LPCSTR; DcFlags: ULONG;
- var RetGetDcContext: HANDLE): DWORD; stdcall;
-{$EXTERNALSYM DsGetDcOpenA}
-function DsGetDcOpen(DnsName: LPCTSTR; OptionFlags: ULONG; SiteName: LPCTSTR;
- DomainGuid: PGUID; DnsForestName: LPCTSTR; DcFlags: ULONG;
- var RetGetDcContext: HANDLE): DWORD; stdcall;
-{$EXTERNALSYM DsGetDcOpen}
-
-function DsGetDcNextA(GetDcContextHandle: HANDLE; SockAddressCount: PULONG;
- SockAddresses: LPSOCKET_ADDRESS; DnsHostName: LPSTR): DWORD; stdcall;
-{$EXTERNALSYM DsGetDcNextA}
-function DsGetDcNextW(GetDcContextHandle: HANDLE; SockAddressCount: PULONG;
- SockAddresses: LPSOCKET_ADDRESS; DnsHostName: LPWSTR): DWORD; stdcall;
-{$EXTERNALSYM DsGetDcNextW}
-function DsGetDcNext(GetDcContextHandle: HANDLE; SockAddressCount: PULONG;
- SockAddresses: LPSOCKET_ADDRESS; DnsHostName: LPTSTR): DWORD; stdcall;
-{$EXTERNALSYM DsGetDcNext}
-
-procedure DsGetDcCloseW(GetDcContextHandle: HANDLE); stdcall;
-{$EXTERNALSYM DsGetDcCloseW}
-procedure DsGetDcClose(GetDcContextHandle: HANDLE); stdcall;
-{$EXTERNALSYM DsGetDcClose}
-
-implementation
-
-const
- netapi32 = 'netapi32.dll';
- {$IFDEF UNICODE}
- AWSuffix = 'W';
- {$ELSE}
- AWSuffix = 'A';
- {$ENDIF UNICODE}
-
-{$IFDEF DYNAMIC_LINK}
-
-var
- _DsGetDcNameA: Pointer;
-
-function DsGetDcNameA;
-begin
- GetProcedureAddress(_DsGetDcNameA, netapi32, 'DsGetDcNameA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsGetDcNameA]
- end;
-end;
-
-var
- _DsGetDcNameW: Pointer;
-
-function DsGetDcNameW;
-begin
- GetProcedureAddress(_DsGetDcNameW, netapi32, 'DsGetDcNameW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsGetDcNameW]
- end;
-end;
-
-var
- _DsGetDcName: Pointer;
-
-function DsGetDcName;
-begin
- GetProcedureAddress(_DsGetDcName, netapi32, 'DsGetDcName' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsGetDcName]
- end;
-end;
-
-var
- _DsGetSiteNameA: Pointer;
-
-function DsGetSiteNameA;
-begin
- GetProcedureAddress(_DsGetSiteNameA, netapi32, 'DsGetSiteNameA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsGetSiteNameA]
- end;
-end;
-
-var
- _DsGetSiteNameW: Pointer;
-
-function DsGetSiteNameW;
-begin
- GetProcedureAddress(_DsGetSiteNameW, netapi32, 'DsGetSiteNameW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsGetSiteNameW]
- end;
-end;
-
-var
- _DsGetSiteName: Pointer;
-
-function DsGetSiteName;
-begin
- GetProcedureAddress(_DsGetSiteName, netapi32, 'DsGetSiteName' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsGetSiteName]
- end;
-end;
-
-var
- _DsValidateSubnetNameA: Pointer;
-
-function DsValidateSubnetNameA;
-begin
- GetProcedureAddress(_DsValidateSubnetNameA, netapi32, 'DsValidateSubnetNameA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsValidateSubnetNameA]
- end;
-end;
-
-var
- _DsValidateSubnetNameW: Pointer;
-
-function DsValidateSubnetNameW;
-begin
- GetProcedureAddress(_DsValidateSubnetNameW, netapi32, 'DsValidateSubnetNameW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsValidateSubnetNameW]
- end;
-end;
-
-var
- _DsValidateSubnetName: Pointer;
-
-function DsValidateSubnetName;
-begin
- GetProcedureAddress(_DsValidateSubnetName, netapi32, 'DsValidateSubnetName' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsValidateSubnetName]
- end;
-end;
-
-var
- _DsAddressToSiteNamesA: Pointer;
-
-function DsAddressToSiteNamesA;
-begin
- GetProcedureAddress(_DsAddressToSiteNamesA, netapi32, 'DsAddressToSiteNamesA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsAddressToSiteNamesA]
- end;
-end;
-
-var
- _DsAddressToSiteNamesW: Pointer;
-
-function DsAddressToSiteNamesW;
-begin
- GetProcedureAddress(_DsAddressToSiteNamesW, netapi32, 'DsAddressToSiteNamesW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsAddressToSiteNamesW]
- end;
-end;
-
-var
- _DsAddressToSiteNames: Pointer;
-
-function DsAddressToSiteNames;
-begin
- GetProcedureAddress(_DsAddressToSiteNames, netapi32, 'DsAddressToSiteNames' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsAddressToSiteNames]
- end;
-end;
-
-var
- _DsAddressToSiteNamesExA: Pointer;
-
-function DsAddressToSiteNamesExA;
-begin
- GetProcedureAddress(_DsAddressToSiteNamesExA, netapi32, 'DsAddressToSiteNamesExA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsAddressToSiteNamesExA]
- end;
-end;
-
-var
- _DsAddressToSiteNamesExW: Pointer;
-
-function DsAddressToSiteNamesExW;
-begin
- GetProcedureAddress(_DsAddressToSiteNamesExW, netapi32, 'DsAddressToSiteNamesExW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsAddressToSiteNamesExW]
- end;
-end;
-
-var
- _DsAddressToSiteNamesEx: Pointer;
-
-function DsAddressToSiteNamesEx;
-begin
- GetProcedureAddress(_DsAddressToSiteNamesEx, netapi32, 'DsAddressToSiteNamesEx' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsAddressToSiteNamesEx]
- end;
-end;
-
-var
- _DsEnumerateDomainTrustsA: Pointer;
-
-function DsEnumerateDomainTrustsA;
-begin
- GetProcedureAddress(_DsEnumerateDomainTrustsA, netapi32, 'DsEnumerateDomainTrustsA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsEnumerateDomainTrustsA]
- end;
-end;
-
-var
- _DsEnumerateDomainTrustsW: Pointer;
-
-function DsEnumerateDomainTrustsW;
-begin
- GetProcedureAddress(_DsEnumerateDomainTrustsW, netapi32, 'DsEnumerateDomainTrustsW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsEnumerateDomainTrustsW]
- end;
-end;
-
-var
- _DsEnumerateDomainTrusts: Pointer;
-
-function DsEnumerateDomainTrusts;
-begin
- GetProcedureAddress(_DsEnumerateDomainTrusts, netapi32, 'DsEnumerateDomainTrusts' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsEnumerateDomainTrusts]
- end;
-end;
-
-var
- _DsGetForestTrustInformationW: Pointer;
-
-function DsGetForestTrustInformationW;
-begin
- GetProcedureAddress(_DsGetForestTrustInformationW, netapi32, 'DsGetForestTrustInformationW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsGetForestTrustInformationW]
- end;
-end;
-
-var
- _DsMergeForestTrustInformationW: Pointer;
-
-function DsMergeForestTrustInformationW;
-begin
- GetProcedureAddress(_DsMergeForestTrustInformationW, netapi32, 'DsMergeForestTrustInformationW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsMergeForestTrustInformationW]
- end;
-end;
-
-var
- _DsGetDcSiteCoverageA: Pointer;
-
-function DsGetDcSiteCoverageA;
-begin
- GetProcedureAddress(_DsGetDcSiteCoverageA, netapi32, 'DsGetDcSiteCoverageA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsGetDcSiteCoverageA]
- end;
-end;
-
-var
- _DsGetDcSiteCoverageW: Pointer;
-
-function DsGetDcSiteCoverageW;
-begin
- GetProcedureAddress(_DsGetDcSiteCoverageW, netapi32, 'DsGetDcSiteCoverageW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsGetDcSiteCoverageW]
- end;
-end;
-
-var
- _DsGetDcSiteCoverage: Pointer;
-
-function DsGetDcSiteCoverage;
-begin
- GetProcedureAddress(_DsGetDcSiteCoverage, netapi32, 'DsGetDcSiteCoverage' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsGetDcSiteCoverage]
- end;
-end;
-
-var
- _DsDeregisterDnsHostRecordsA: Pointer;
-
-function DsDeregisterDnsHostRecordsA;
-begin
- GetProcedureAddress(_DsDeregisterDnsHostRecordsA, netapi32, 'DsDeregisterDnsHostRecordsA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsDeregisterDnsHostRecordsA]
- end;
-end;
-
-var
- _DsDeregisterDnsHostRecordsW: Pointer;
-
-function DsDeregisterDnsHostRecordsW;
-begin
- GetProcedureAddress(_DsDeregisterDnsHostRecordsW, netapi32, 'DsDeregisterDnsHostRecordsW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsDeregisterDnsHostRecordsW]
- end;
-end;
-
-var
- _DsDeregisterDnsHostRecords: Pointer;
-
-function DsDeregisterDnsHostRecords;
-begin
- GetProcedureAddress(_DsDeregisterDnsHostRecords, netapi32, 'DsDeregisterDnsHostRecords' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsDeregisterDnsHostRecords]
- end;
-end;
-
-var
- _DsGetDcOpenW: Pointer;
-
-function DsGetDcOpenW;
-begin
- GetProcedureAddress(_DsGetDcOpenW, netapi32, 'DsGetDcOpenW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsGetDcOpenW]
- end;
-end;
-
-var
- _DsGetDcOpenA: Pointer;
-
-function DsGetDcOpenA;
-begin
- GetProcedureAddress(_DsGetDcOpenA, netapi32, 'DsGetDcOpenA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsGetDcOpenA]
- end;
-end;
-
-var
- _DsGetDcOpen: Pointer;
-
-function DsGetDcOpen;
-begin
- GetProcedureAddress(_DsGetDcOpen, netapi32, 'DsGetDcOpen' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsGetDcOpen]
- end;
-end;
-
-var
- _DsGetDcNextW: Pointer;
-
-function DsGetDcNextW;
-begin
- GetProcedureAddress(_DsGetDcNextW, netapi32, 'DsGetDcNextW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsGetDcNextW]
- end;
-end;
-
-var
- _DsGetDcNextA: Pointer;
-
-function DsGetDcNextA;
-begin
- GetProcedureAddress(_DsGetDcNextA, netapi32, 'DsGetDcNextA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsGetDcNextA]
- end;
-end;
-
-var
- _DsGetDcNext: Pointer;
-
-function DsGetDcNext;
-begin
- GetProcedureAddress(_DsGetDcNext, netapi32, 'DsGetDcNext' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsGetDcNext]
- end;
-end;
-
-var
- _DsGetDcCloseW: Pointer;
-
-procedure DsGetDcCloseW;
-begin
- GetProcedureAddress(_DsGetDcCloseW, netapi32, 'DsGetDcCloseW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsGetDcCloseW]
- end;
-end;
-
-var
- _DsGetDcClose: Pointer;
-
-procedure DsGetDcClose;
-begin
- GetProcedureAddress(_DsGetDcClose, netapi32, 'DsGetDcClose');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsGetDcClose]
- end;
-end;
-
-{$ELSE}
-
-function DsGetDcNameA; external netapi32 name 'DsGetDcNameA';
-function DsGetDcNameW; external netapi32 name 'DsGetDcNameW';
-function DsGetDcName; external netapi32 name 'DsGetDcName' + AWSuffix;
-function DsGetSiteNameA; external netapi32 name 'DsGetSiteNameA';
-function DsGetSiteNameW; external netapi32 name 'DsGetSiteNameW';
-function DsGetSiteName; external netapi32 name 'DsGetSiteName' + AWSuffix;
-function DsValidateSubnetNameA; external netapi32 name 'DsValidateSubnetNameA';
-function DsValidateSubnetNameW; external netapi32 name 'DsValidateSubnetNameW';
-function DsValidateSubnetName; external netapi32 name 'DsValidateSubnetName' + AWSuffix;
-function DsAddressToSiteNamesA; external netapi32 name 'DsAddressToSiteNamesA';
-function DsAddressToSiteNamesW; external netapi32 name 'DsAddressToSiteNamesW';
-function DsAddressToSiteNames; external netapi32 name 'DsAddressToSiteNames' + AWSuffix;
-function DsAddressToSiteNamesExA; external netapi32 name 'DsAddressToSiteNamesExA';
-function DsAddressToSiteNamesExW; external netapi32 name 'DsAddressToSiteNamesExW';
-function DsAddressToSiteNamesEx; external netapi32 name 'DsAddressToSiteNamesEx' + AWSuffix;
-function DsEnumerateDomainTrustsA; external netapi32 name 'DsEnumerateDomainTrustsA';
-function DsEnumerateDomainTrustsW; external netapi32 name 'DsEnumerateDomainTrustsW';
-function DsEnumerateDomainTrusts; external netapi32 name 'DsEnumerateDomainTrusts' + AWSuffix;
-function DsGetForestTrustInformationW; external netapi32 name 'DsGetForestTrustInformationW';
-function DsMergeForestTrustInformationW; external netapi32 name 'DsMergeForestTrustInformationW';
-function DsGetDcSiteCoverageA; external netapi32 name 'DsGetDcSiteCoverageA';
-function DsGetDcSiteCoverageW; external netapi32 name 'DsGetDcSiteCoverageW';
-function DsGetDcSiteCoverage; external netapi32 name 'DsGetDcSiteCoverage' + AWSuffix;
-function DsDeregisterDnsHostRecordsA; external netapi32 name 'DsDeregisterDnsHostRecordsA';
-function DsDeregisterDnsHostRecordsW; external netapi32 name 'DsDeregisterDnsHostRecordsW';
-function DsDeregisterDnsHostRecords; external netapi32 name 'DsDeregisterDnsHostRecords' + AWSuffix;
-function DsGetDcOpenW; external netapi32 name 'DsGetDcOpenW';
-function DsGetDcOpenA; external netapi32 name 'DsGetDcOpenA';
-function DsGetDcOpen; external netapi32 name 'DsGetDcOpen' + AWSuffix;
-function DsGetDcNextW; external netapi32 name 'DsGetDcNextW';
-function DsGetDcNextA; external netapi32 name 'DsGetDcNextA';
-function DsGetDcNext; external netapi32 name 'DsGetDcNext' + AWSuffix;
-procedure DsGetDcCloseW; external netapi32 name 'DsGetDcCloseW';
-procedure DsGetDcClose; external netapi32 name 'DsGetDcClose';
-
-{$ENDIF DYNAMIC_LINK}
-
-end.
+{******************************************************************************}
+{ }
+{ Directory Services API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: dsgetdc.h, released June 2000. The original Pascal }
+{ code is: DsGetDc.pas, released December 2000. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwadsgetdc.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaDSGetDc;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "DsGetDC.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaNtSecApi, JwaWinNT, JwaWinType;
+
+//
+// Structure definitions
+//
+
+//
+// Flags to passed to DsGetDcName
+//
+
+const
+ DS_FORCE_REDISCOVERY = $00000001;
+ {$EXTERNALSYM DS_FORCE_REDISCOVERY}
+
+ DS_DIRECTORY_SERVICE_REQUIRED = $00000010;
+ {$EXTERNALSYM DS_DIRECTORY_SERVICE_REQUIRED}
+ DS_DIRECTORY_SERVICE_PREFERRED = $00000020;
+ {$EXTERNALSYM DS_DIRECTORY_SERVICE_PREFERRED}
+ DS_GC_SERVER_REQUIRED = $00000040;
+ {$EXTERNALSYM DS_GC_SERVER_REQUIRED}
+ DS_PDC_REQUIRED = $00000080;
+ {$EXTERNALSYM DS_PDC_REQUIRED}
+ DS_BACKGROUND_ONLY = $00000100;
+ {$EXTERNALSYM DS_BACKGROUND_ONLY}
+ DS_IP_REQUIRED = $00000200;
+ {$EXTERNALSYM DS_IP_REQUIRED}
+ DS_KDC_REQUIRED = $00000400;
+ {$EXTERNALSYM DS_KDC_REQUIRED}
+ DS_TIMESERV_REQUIRED = $00000800;
+ {$EXTERNALSYM DS_TIMESERV_REQUIRED}
+ DS_WRITABLE_REQUIRED = $00001000;
+ {$EXTERNALSYM DS_WRITABLE_REQUIRED}
+ DS_GOOD_TIMESERV_PREFERRED = $00002000;
+ {$EXTERNALSYM DS_GOOD_TIMESERV_PREFERRED}
+ DS_AVOID_SELF = $00004000;
+ {$EXTERNALSYM DS_AVOID_SELF}
+ DS_ONLY_LDAP_NEEDED = $00008000;
+ {$EXTERNALSYM DS_ONLY_LDAP_NEEDED}
+
+ DS_IS_FLAT_NAME = $00010000;
+ {$EXTERNALSYM DS_IS_FLAT_NAME}
+ DS_IS_DNS_NAME = $00020000;
+ {$EXTERNALSYM DS_IS_DNS_NAME}
+
+ DS_RETURN_DNS_NAME = $40000000;
+ {$EXTERNALSYM DS_RETURN_DNS_NAME}
+ DS_RETURN_FLAT_NAME = DWORD($80000000);
+ {$EXTERNALSYM DS_RETURN_FLAT_NAME}
+
+ DSGETDC_VALID_FLAGS =
+ DS_FORCE_REDISCOVERY or
+ DS_DIRECTORY_SERVICE_REQUIRED or
+ DS_DIRECTORY_SERVICE_PREFERRED or
+ DS_GC_SERVER_REQUIRED or
+ DS_PDC_REQUIRED or
+ DS_BACKGROUND_ONLY or
+ DS_IP_REQUIRED or
+ DS_KDC_REQUIRED or
+ DS_TIMESERV_REQUIRED or
+ DS_WRITABLE_REQUIRED or
+ DS_GOOD_TIMESERV_PREFERRED or
+ DS_AVOID_SELF or
+ DS_ONLY_LDAP_NEEDED or
+ DS_IS_FLAT_NAME or
+ DS_IS_DNS_NAME or
+ DS_RETURN_FLAT_NAME or
+ DS_RETURN_DNS_NAME;
+ {$EXTERNALSYM DSGETDC_VALID_FLAGS}
+
+//
+// Structure returned from DsGetDcName
+//
+
+type
+ PDOMAIN_CONTROLLER_INFOA = ^DOMAIN_CONTROLLER_INFOA;
+ {$EXTERNALSYM PDOMAIN_CONTROLLER_INFOA}
+ _DOMAIN_CONTROLLER_INFOA = record
+ DomainControllerName: LPSTR;
+ DomainControllerAddress: LPSTR;
+ DomainControllerAddressType: ULONG;
+ DomainGuid: GUID;
+ DomainName: LPSTR;
+ DnsForestName: LPSTR;
+ Flags: ULONG;
+ DcSiteName: LPSTR;
+ ClientSiteName: LPSTR;
+ end;
+ {$EXTERNALSYM _DOMAIN_CONTROLLER_INFOA}
+ DOMAIN_CONTROLLER_INFOA = _DOMAIN_CONTROLLER_INFOA;
+ {$EXTERNALSYM DOMAIN_CONTROLLER_INFOA}
+ TDomainControllerInfoA = DOMAIN_CONTROLLER_INFOA;
+ PDomainControllerInfoA = PDOMAIN_CONTROLLER_INFOA;
+
+ PDOMAIN_CONTROLLER_INFOW = ^DOMAIN_CONTROLLER_INFOW;
+ {$EXTERNALSYM PDOMAIN_CONTROLLER_INFOW}
+ _DOMAIN_CONTROLLER_INFOW = record
+ DomainControllerName: LPWSTR;
+ DomainControllerAddress: LPWSTR;
+ DomainControllerAddressType: ULONG;
+ DomainGuid: GUID;
+ DomainName: LPWSTR;
+ DnsForestName: LPWSTR;
+ Flags: ULONG;
+ DcSiteName: LPWSTR;
+ ClientSiteName: LPWSTR;
+ end;
+ {$EXTERNALSYM _DOMAIN_CONTROLLER_INFOW}
+ DOMAIN_CONTROLLER_INFOW = _DOMAIN_CONTROLLER_INFOW;
+ {$EXTERNALSYM DOMAIN_CONTROLLER_INFOW}
+ TDomainControllerInfoW = DOMAIN_CONTROLLER_INFOW;
+ PDomainControllerInfoW = PDOMAIN_CONTROLLER_INFOW;
+
+ {$IFDEF UNICODE}
+ DOMAIN_CONTROLLER_INFO = DOMAIN_CONTROLLER_INFOW;
+ {$EXTERNALSYM DOMAIN_CONTROLLER_INFO}
+ PDOMAIN_CONTROLLER_INFO = PDOMAIN_CONTROLLER_INFOW;
+ {$EXTERNALSYM PDOMAIN_CONTROLLER_INFO}
+ TDomainControllerInfo = TDomainControllerInfoW;
+ PDomainControllerInfo = PDomainControllerInfoW;
+ {$ELSE}
+ DOMAIN_CONTROLLER_INFO = DOMAIN_CONTROLLER_INFOA;
+ {$EXTERNALSYM DOMAIN_CONTROLLER_INFO}
+ PDOMAIN_CONTROLLER_INFO = PDOMAIN_CONTROLLER_INFOA;
+ {$EXTERNALSYM PDOMAIN_CONTROLLER_INFO}
+ TDomainControllerInfo = TDomainControllerInfoA;
+ PDomainControllerInfo = PDomainControllerInfoA;
+ {$ENDIF UNICODE}
+
+//
+// Values for DomainControllerAddressType
+//
+
+const
+ DS_INET_ADDRESS = 1;
+ {$EXTERNALSYM DS_INET_ADDRESS}
+ DS_NETBIOS_ADDRESS = 2;
+ {$EXTERNALSYM DS_NETBIOS_ADDRESS}
+
+//
+// Values for returned Flags
+//
+
+ DS_PDC_FLAG = $00000001; // DC is PDC of Domain
+ {$EXTERNALSYM DS_PDC_FLAG}
+ DS_GC_FLAG = $00000004; // DC is a GC of forest
+ {$EXTERNALSYM DS_GC_FLAG}
+ DS_LDAP_FLAG = $00000008; // Server supports an LDAP server
+ {$EXTERNALSYM DS_LDAP_FLAG}
+ DS_DS_FLAG = $00000010; // DC supports a DS and is a Domain Controller
+ {$EXTERNALSYM DS_DS_FLAG}
+ DS_KDC_FLAG = $00000020; // DC is running KDC service
+ {$EXTERNALSYM DS_KDC_FLAG}
+ DS_TIMESERV_FLAG = $00000040; // DC is running time service
+ {$EXTERNALSYM DS_TIMESERV_FLAG}
+ DS_CLOSEST_FLAG = $00000080; // DC is in closest site to client
+ {$EXTERNALSYM DS_CLOSEST_FLAG}
+ DS_WRITABLE_FLAG = $00000100; // DC has a writable DS
+ {$EXTERNALSYM DS_WRITABLE_FLAG}
+ DS_GOOD_TIMESERV_FLAG = $00000200; // DC is running time service (and has clock hardware)
+ {$EXTERNALSYM DS_GOOD_TIMESERV_FLAG}
+ DS_NDNC_FLAG = $00000400; // DomainName is non-domain NC serviced by the LDAP server
+ {$EXTERNALSYM DS_NDNC_FLAG}
+ DS_PING_FLAGS = $0000FFFF; // Flags returned on ping
+ {$EXTERNALSYM DS_PING_FLAGS}
+
+ DS_DNS_CONTROLLER_FLAG = $20000000; // DomainControllerName is a DNS name
+ {$EXTERNALSYM DS_DNS_CONTROLLER_FLAG}
+ DS_DNS_DOMAIN_FLAG = $40000000; // DomainName is a DNS name
+ {$EXTERNALSYM DS_DNS_DOMAIN_FLAG}
+ DS_DNS_FOREST_FLAG = DWORD($80000000); // DnsForestName is a DNS name
+ {$EXTERNALSYM DS_DNS_FOREST_FLAG}
+
+//
+// Function Prototypes
+//
+
+function DsGetDcNameA(ComputerName, DomainName: LPCSTR; DomainGuid: LPGUID;
+ SiteName: LPCSTR; Flags: ULONG; var DomainControllerInfo: PDOMAIN_CONTROLLER_INFOA): DWORD; stdcall;
+{$EXTERNALSYM DsGetDcNameA}
+function DsGetDcNameW(ComputerName, DomainName: LPCWSTR; DomainGuid: LPGUID;
+ SiteName: LPCWSTR; Flags: ULONG; var DomainControllerInfo: PDOMAIN_CONTROLLER_INFOW): DWORD; stdcall;
+{$EXTERNALSYM DsGetDcNameW}
+function DsGetDcName(ComputerName, DomainName: LPCTSTR; DomainGuid: LPGUID;
+ SiteName: LPCTSTR; Flags: ULONG; var DomainControllerInfo: PDOMAIN_CONTROLLER_INFO): DWORD; stdcall;
+{$EXTERNALSYM DsGetDcName}
+
+function DsGetSiteNameA(ComputerName: LPCSTR; var SiteName: LPSTR): DWORD; stdcall;
+{$EXTERNALSYM DsGetSiteNameA}
+function DsGetSiteNameW(ComputerName: LPCWSTR; var SiteName: LPWSTR): DWORD; stdcall;
+{$EXTERNALSYM DsGetSiteNameW}
+function DsGetSiteName(ComputerName: LPCTSTR; var SiteName: LPTSTR): DWORD; stdcall;
+{$EXTERNALSYM DsGetSiteName}
+
+function DsValidateSubnetNameA(SubnetName: LPCSTR): DWORD; stdcall;
+{$EXTERNALSYM DsValidateSubnetNameA}
+function DsValidateSubnetNameW(SubnetName: LPCWSTR): DWORD; stdcall;
+{$EXTERNALSYM DsValidateSubnetNameW}
+function DsValidateSubnetName(SubnetName: LPCTSTR): DWORD; stdcall;
+{$EXTERNALSYM DsValidateSubnetName}
+
+//
+// Only include if winsock2.h has been included
+//
+
+// Types from Winsock2.h
+
+type
+ sockaddr = record
+ sa_family: Word; // address family
+ sa_data: array [0..13]of Char; // up to 14 bytes of direct address
+ end;
+ {$EXTERNALSYM sockaddr}
+
+ PSOCKADDR = ^SOCKADDR;
+ {$EXTERNALSYM PSOCKADDR}
+ LPSOCKADDR = PSOCKADDR;
+ {$EXTERNALSYM LPSOCKADDR}
+
+ _SOCKET_ADDRESS = record
+ lpSockaddr: LPSOCKADDR;
+ iSockaddrLength: Integer;
+ end;
+ {$EXTERNALSYM _SOCKET_ADDRESS}
+ SOCKET_ADDRESS = _SOCKET_ADDRESS;
+ {$EXTERNALSYM SOCKET_ADDRESS}
+ PSOCKET_ADDRESS = ^SOCKET_ADDRESS;
+ {$EXTERNALSYM PSOCKET_ADDRESS}
+ LPSOCKET_ADDRESS = PSOCKET_ADDRESS;
+ {$EXTERNALSYM LPSOCKET_ADDRESS}
+ TSocketAddress = SOCKET_ADDRESS;
+ PSocketAddress = LPSOCKET_ADDRESS;
+
+function DsAddressToSiteNamesA(ComputerName: LPCSTR; EntryCount: DWORD;
+ SocketAddresses: PSOCKET_ADDRESS; var SiteNames: PPChar): DWORD; stdcall;
+{$EXTERNALSYM DsAddressToSiteNamesA}
+function DsAddressToSiteNamesW(ComputerName: LPCWSTR; EntryCount: DWORD;
+ SocketAddresses: PSOCKET_ADDRESS; var SiteNames: PPWideChar): DWORD; stdcall;
+{$EXTERNALSYM DsAddressToSiteNamesW}
+function DsAddressToSiteNames(ComputerName: LPCTSTR; EntryCount: DWORD;
+ SocketAddresses: PSOCKET_ADDRESS; var SiteNames: PPTCHAR): DWORD; stdcall;
+{$EXTERNALSYM DsAddressToSiteNames}
+
+function DsAddressToSiteNamesExA(ComputerName: LPCSTR; EntryCount: DWORD;
+ SocketAddresses: PSOCKET_ADDRESS; var SiteNames, SubnetNames: PPChar): DWORD; stdcall;
+{$EXTERNALSYM DsAddressToSiteNamesExA}
+function DsAddressToSiteNamesExW(ComputerName: LPCWSTR; EntryCount: DWORD;
+ SocketAddresses: PSOCKET_ADDRESS; var SiteNames, SubnetNames: PPWideChar): DWORD; stdcall;
+{$EXTERNALSYM DsAddressToSiteNamesExW}
+function DsAddressToSiteNamesEx(ComputerName: LPCTSTR; EntryCount: DWORD;
+ SocketAddresses: PSOCKET_ADDRESS; var SiteNames, SubnetNames: PPTCHAR): DWORD; stdcall;
+{$EXTERNALSYM DsAddressToSiteNamesEx}
+
+//
+// API to enumerate trusted domains
+//
+
+const
+ DS_DOMAIN_IN_FOREST = $0001; // Domain is a member of the forest
+ {$EXTERNALSYM DS_DOMAIN_IN_FOREST}
+ DS_DOMAIN_DIRECT_OUTBOUND = $0002; // Domain is directly trusted
+ {$EXTERNALSYM DS_DOMAIN_DIRECT_OUTBOUND}
+ DS_DOMAIN_TREE_ROOT = $0004; // Domain is root of a tree in the forest
+ {$EXTERNALSYM DS_DOMAIN_TREE_ROOT}
+ DS_DOMAIN_PRIMARY = $0008; // Domain is the primary domain of queried server
+ {$EXTERNALSYM DS_DOMAIN_PRIMARY}
+ DS_DOMAIN_NATIVE_MODE = $0010; // Primary domain is running in native mode
+ {$EXTERNALSYM DS_DOMAIN_NATIVE_MODE}
+ DS_DOMAIN_DIRECT_INBOUND = $0020; // Domain is directly trusting
+ {$EXTERNALSYM DS_DOMAIN_DIRECT_INBOUND}
+ DS_DOMAIN_VALID_FLAGS = DS_DOMAIN_IN_FOREST or DS_DOMAIN_DIRECT_OUTBOUND or
+ DS_DOMAIN_TREE_ROOT or DS_DOMAIN_PRIMARY or DS_DOMAIN_NATIVE_MODE or
+ DS_DOMAIN_DIRECT_INBOUND;
+ {$EXTERNALSYM DS_DOMAIN_VALID_FLAGS}
+
+type
+ PDS_DOMAIN_TRUSTSW = ^DS_DOMAIN_TRUSTSW;
+ {$EXTERNALSYM PDS_DOMAIN_TRUSTSW}
+ _DS_DOMAIN_TRUSTSW = record
+ //
+ // Name of the trusted domain.
+ //
+ NetbiosDomainName: LPWSTR;
+ DnsDomainName: LPWSTR;
+ //
+ // Flags defining attributes of the trust.
+ //
+ Flags: ULONG;
+ //
+ // Index to the domain that is the parent of this domain.
+ // Only defined if NETLOGON_DOMAIN_IN_FOREST is set and
+ // NETLOGON_DOMAIN_TREE_ROOT is not set.
+ //
+ ParentIndex: ULONG;
+ //
+ // The trust type and attributes of this trust.
+ //
+ // If NETLOGON_DOMAIN_DIRECTLY_TRUSTED is not set,
+ // these value are infered.
+ //
+ TrustType: ULONG;
+ TrustAttributes: ULONG;
+ //
+ // The SID of the trusted domain.
+ //
+ // If NETLOGON_DOMAIN_DIRECTLY_TRUSTED is not set,
+ // this value will be NULL.
+ //
+ DomainSid: PSID;
+ //
+ // The GUID of the trusted domain.
+ //
+ DomainGuid: GUID;
+ end;
+ {$EXTERNALSYM _DS_DOMAIN_TRUSTSW}
+ DS_DOMAIN_TRUSTSW = _DS_DOMAIN_TRUSTSW;
+ {$EXTERNALSYM DS_DOMAIN_TRUSTSW}
+ TDsDomainTrustsW = DS_DOMAIN_TRUSTSW;
+ PDsDomainTrustsW = PDS_DOMAIN_TRUSTSW;
+
+//
+// ANSI version of the above struct
+//
+
+ PDS_DOMAIN_TRUSTSA = ^DS_DOMAIN_TRUSTSA;
+ {$EXTERNALSYM PDS_DOMAIN_TRUSTSA}
+ _DS_DOMAIN_TRUSTSA = record
+ NetbiosDomainName: LPSTR;
+ DnsDomainName: LPSTR;
+ Flags: ULONG;
+ ParentIndex: ULONG;
+ TrustType: ULONG;
+ TrustAttributes: ULONG;
+ DomainSid: PSID;
+ DomainGuid: GUID;
+ end;
+ {$EXTERNALSYM _DS_DOMAIN_TRUSTSA}
+ DS_DOMAIN_TRUSTSA = _DS_DOMAIN_TRUSTSA;
+ {$EXTERNALSYM DS_DOMAIN_TRUSTSA}
+ TDsDomainTrustsA = DS_DOMAIN_TRUSTSA;
+ PDsDomainTrustsA = PDS_DOMAIN_TRUSTSA;
+
+ {$IFDEF UNICODE}
+ DS_DOMAIN_TRUSTS = DS_DOMAIN_TRUSTSW;
+ {$EXTERNALSYM DS_DOMAIN_TRUSTS}
+ PDS_DOMAIN_TRUSTS = PDS_DOMAIN_TRUSTSW;
+ {$EXTERNALSYM PDS_DOMAIN_TRUSTS}
+ TDsDomainTrusts = TDsDomainTrustsW;
+ PDsDomainTrusts = PDsDomainTrustsW;
+ {$ELSE}
+ DS_DOMAIN_TRUSTS = DS_DOMAIN_TRUSTSA;
+ {$EXTERNALSYM DS_DOMAIN_TRUSTS}
+ PDS_DOMAIN_TRUSTS = PDS_DOMAIN_TRUSTSA;
+ {$EXTERNALSYM PDS_DOMAIN_TRUSTS}
+ TDsDomainTrusts = TDsDomainTrustsA;
+ PDsDomainTrusts = PDsDomainTrustsA;
+ {$ENDIF UNICODE}
+
+function DsEnumerateDomainTrustsA(ServerName: LPSTR; Flags: ULONG;
+ var Domains: PDS_DOMAIN_TRUSTSA; var DomainCount: ULONG): DWORD; stdcall;
+{$EXTERNALSYM DsEnumerateDomainTrustsA}
+function DsEnumerateDomainTrustsW(ServerName: LPWSTR; Flags: ULONG;
+ var Domains: PDS_DOMAIN_TRUSTSW; var DomainCount: ULONG): DWORD; stdcall;
+{$EXTERNALSYM DsEnumerateDomainTrustsW}
+function DsEnumerateDomainTrusts(ServerName: LPTSTR; Flags: ULONG;
+ var Domains: PDS_DOMAIN_TRUSTS; var DomainCount: ULONG): DWORD; stdcall;
+{$EXTERNALSYM DsEnumerateDomainTrusts}
+
+//
+// Only define this API if the caller has #included the pre-requisite
+// ntlsa.h or ntsecapi.h
+//
+
+function DsGetForestTrustInformationW(ServerName, TrustedDomainName: LPCWSTR;
+ Flags: DWORD; var ForestTrustInfo: PLSA_FOREST_TRUST_INFORMATION): DWORD; stdcall;
+{$EXTERNALSYM DsGetForestTrustInformationW}
+
+const
+ DS_GFTI_UPDATE_TDO = $1; // Update TDO with information returned
+ {$EXTERNALSYM DS_GFTI_UPDATE_TDO}
+ DS_GFTI_VALID_FLAGS = $1; // All valid flags to DsGetForestTrustInformation
+ {$EXTERNALSYM DS_GFTI_VALID_FLAGS}
+
+function DsMergeForestTrustInformationW(DomainName: LPCWSTR; NewForestTrustInfo,
+ OldForestTrustInfo: PLSA_FOREST_TRUST_INFORMATION;
+ var MergedForestTrustInfo: PLSA_FOREST_TRUST_INFORMATION): DWORD; stdcall;
+{$EXTERNALSYM DsMergeForestTrustInformationW}
+
+function DsGetDcSiteCoverageA(ServerName: LPCSTR; var EntryCount: ULONG;
+ var SiteNames: PPChar): DWORD; stdcall;
+{$EXTERNALSYM DsGetDcSiteCoverageA}
+function DsGetDcSiteCoverageW(ServerName: LPCWSTR; var EntryCount: ULONG;
+ var SiteNames: PPWideChar): DWORD; stdcall;
+{$EXTERNALSYM DsGetDcSiteCoverageW}
+function DsGetDcSiteCoverage(ServerName: LPCTSTR; var EntryCount: ULONG;
+ var SiteNames: PPTCHAR): DWORD; stdcall;
+{$EXTERNALSYM DsGetDcSiteCoverage}
+
+function DsDeregisterDnsHostRecordsA(ServerName, DnsDomainName: LPSTR;
+ DomainGuid, DsaGuid: LPGUID; DnsHostName: LPSTR): DWORD; stdcall;
+{$EXTERNALSYM DsDeregisterDnsHostRecordsA}
+function DsDeregisterDnsHostRecordsW(ServerName, DnsDomainName: LPWSTR;
+ DomainGuid, DsaGuid: LPGUID; DnsHostName: LPWSTR): DWORD; stdcall;
+{$EXTERNALSYM DsDeregisterDnsHostRecordsW}
+function DsDeregisterDnsHostRecords(ServerName, DnsDomainName: LPTSTR;
+ DomainGuid, DsaGuid: LPGUID; DnsHostName: LPTSTR): DWORD; stdcall;
+{$EXTERNALSYM DsDeregisterDnsHostRecords}
+
+//
+// Option flags passed to DsGetDcOpen
+//
+
+const
+ DS_ONLY_DO_SITE_NAME = $01; // Non-site specific names should be avoided.
+ {$EXTERNALSYM DS_ONLY_DO_SITE_NAME}
+ DS_NOTIFY_AFTER_SITE_RECORDS = $02; // Return ERROR_FILEMARK_DETECTED after all
+ {$EXTERNALSYM DS_NOTIFY_AFTER_SITE_RECORDS}
+ // site specific records have been processed.
+
+ DS_OPEN_VALID_OPTION_FLAGS = DS_ONLY_DO_SITE_NAME or DS_NOTIFY_AFTER_SITE_RECORDS;
+ {$EXTERNALSYM DS_OPEN_VALID_OPTION_FLAGS}
+
+//
+// Valid DcFlags for DsGetDcOpen
+//
+
+ DS_OPEN_VALID_FLAGS =
+ DS_FORCE_REDISCOVERY or
+ DS_ONLY_LDAP_NEEDED or
+ DS_KDC_REQUIRED or
+ DS_PDC_REQUIRED or
+ DS_GC_SERVER_REQUIRED or
+ DS_WRITABLE_REQUIRED;
+ {$EXTERNALSYM DS_OPEN_VALID_FLAGS}
+
+function DsGetDcOpenW(DnsName: LPCWSTR; OptionFlags: ULONG; SiteName: LPCWSTR;
+ DomainGuid: PGUID; DnsForestName: LPCWSTR; DcFlags: ULONG;
+ var RetGetDcContext: HANDLE): DWORD; stdcall;
+{$EXTERNALSYM DsGetDcOpenW}
+
+function DsGetDcOpenA(DnsName: LPCSTR; OptionFlags: ULONG; SiteName: LPCSTR;
+ DomainGuid: PGUID; DnsForestName: LPCSTR; DcFlags: ULONG;
+ var RetGetDcContext: HANDLE): DWORD; stdcall;
+{$EXTERNALSYM DsGetDcOpenA}
+function DsGetDcOpen(DnsName: LPCTSTR; OptionFlags: ULONG; SiteName: LPCTSTR;
+ DomainGuid: PGUID; DnsForestName: LPCTSTR; DcFlags: ULONG;
+ var RetGetDcContext: HANDLE): DWORD; stdcall;
+{$EXTERNALSYM DsGetDcOpen}
+
+function DsGetDcNextA(GetDcContextHandle: HANDLE; SockAddressCount: PULONG;
+ SockAddresses: LPSOCKET_ADDRESS; DnsHostName: LPSTR): DWORD; stdcall;
+{$EXTERNALSYM DsGetDcNextA}
+function DsGetDcNextW(GetDcContextHandle: HANDLE; SockAddressCount: PULONG;
+ SockAddresses: LPSOCKET_ADDRESS; DnsHostName: LPWSTR): DWORD; stdcall;
+{$EXTERNALSYM DsGetDcNextW}
+function DsGetDcNext(GetDcContextHandle: HANDLE; SockAddressCount: PULONG;
+ SockAddresses: LPSOCKET_ADDRESS; DnsHostName: LPTSTR): DWORD; stdcall;
+{$EXTERNALSYM DsGetDcNext}
+
+procedure DsGetDcCloseW(GetDcContextHandle: HANDLE); stdcall;
+{$EXTERNALSYM DsGetDcCloseW}
+procedure DsGetDcClose(GetDcContextHandle: HANDLE); stdcall;
+{$EXTERNALSYM DsGetDcClose}
+
+implementation
+
+const
+ netapi32 = 'netapi32.dll';
+ {$IFDEF UNICODE}
+ AWSuffix = 'W';
+ {$ELSE}
+ AWSuffix = 'A';
+ {$ENDIF UNICODE}
+
+{$IFDEF DYNAMIC_LINK}
+
+var
+ _DsGetDcNameA: Pointer;
+
+function DsGetDcNameA;
+begin
+ GetProcedureAddress(_DsGetDcNameA, netapi32, 'DsGetDcNameA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsGetDcNameA]
+ end;
+end;
+
+var
+ _DsGetDcNameW: Pointer;
+
+function DsGetDcNameW;
+begin
+ GetProcedureAddress(_DsGetDcNameW, netapi32, 'DsGetDcNameW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsGetDcNameW]
+ end;
+end;
+
+var
+ _DsGetDcName: Pointer;
+
+function DsGetDcName;
+begin
+ GetProcedureAddress(_DsGetDcName, netapi32, 'DsGetDcName' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsGetDcName]
+ end;
+end;
+
+var
+ _DsGetSiteNameA: Pointer;
+
+function DsGetSiteNameA;
+begin
+ GetProcedureAddress(_DsGetSiteNameA, netapi32, 'DsGetSiteNameA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsGetSiteNameA]
+ end;
+end;
+
+var
+ _DsGetSiteNameW: Pointer;
+
+function DsGetSiteNameW;
+begin
+ GetProcedureAddress(_DsGetSiteNameW, netapi32, 'DsGetSiteNameW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsGetSiteNameW]
+ end;
+end;
+
+var
+ _DsGetSiteName: Pointer;
+
+function DsGetSiteName;
+begin
+ GetProcedureAddress(_DsGetSiteName, netapi32, 'DsGetSiteName' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsGetSiteName]
+ end;
+end;
+
+var
+ _DsValidateSubnetNameA: Pointer;
+
+function DsValidateSubnetNameA;
+begin
+ GetProcedureAddress(_DsValidateSubnetNameA, netapi32, 'DsValidateSubnetNameA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsValidateSubnetNameA]
+ end;
+end;
+
+var
+ _DsValidateSubnetNameW: Pointer;
+
+function DsValidateSubnetNameW;
+begin
+ GetProcedureAddress(_DsValidateSubnetNameW, netapi32, 'DsValidateSubnetNameW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsValidateSubnetNameW]
+ end;
+end;
+
+var
+ _DsValidateSubnetName: Pointer;
+
+function DsValidateSubnetName;
+begin
+ GetProcedureAddress(_DsValidateSubnetName, netapi32, 'DsValidateSubnetName' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsValidateSubnetName]
+ end;
+end;
+
+var
+ _DsAddressToSiteNamesA: Pointer;
+
+function DsAddressToSiteNamesA;
+begin
+ GetProcedureAddress(_DsAddressToSiteNamesA, netapi32, 'DsAddressToSiteNamesA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsAddressToSiteNamesA]
+ end;
+end;
+
+var
+ _DsAddressToSiteNamesW: Pointer;
+
+function DsAddressToSiteNamesW;
+begin
+ GetProcedureAddress(_DsAddressToSiteNamesW, netapi32, 'DsAddressToSiteNamesW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsAddressToSiteNamesW]
+ end;
+end;
+
+var
+ _DsAddressToSiteNames: Pointer;
+
+function DsAddressToSiteNames;
+begin
+ GetProcedureAddress(_DsAddressToSiteNames, netapi32, 'DsAddressToSiteNames' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsAddressToSiteNames]
+ end;
+end;
+
+var
+ _DsAddressToSiteNamesExA: Pointer;
+
+function DsAddressToSiteNamesExA;
+begin
+ GetProcedureAddress(_DsAddressToSiteNamesExA, netapi32, 'DsAddressToSiteNamesExA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsAddressToSiteNamesExA]
+ end;
+end;
+
+var
+ _DsAddressToSiteNamesExW: Pointer;
+
+function DsAddressToSiteNamesExW;
+begin
+ GetProcedureAddress(_DsAddressToSiteNamesExW, netapi32, 'DsAddressToSiteNamesExW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsAddressToSiteNamesExW]
+ end;
+end;
+
+var
+ _DsAddressToSiteNamesEx: Pointer;
+
+function DsAddressToSiteNamesEx;
+begin
+ GetProcedureAddress(_DsAddressToSiteNamesEx, netapi32, 'DsAddressToSiteNamesEx' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsAddressToSiteNamesEx]
+ end;
+end;
+
+var
+ _DsEnumerateDomainTrustsA: Pointer;
+
+function DsEnumerateDomainTrustsA;
+begin
+ GetProcedureAddress(_DsEnumerateDomainTrustsA, netapi32, 'DsEnumerateDomainTrustsA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsEnumerateDomainTrustsA]
+ end;
+end;
+
+var
+ _DsEnumerateDomainTrustsW: Pointer;
+
+function DsEnumerateDomainTrustsW;
+begin
+ GetProcedureAddress(_DsEnumerateDomainTrustsW, netapi32, 'DsEnumerateDomainTrustsW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsEnumerateDomainTrustsW]
+ end;
+end;
+
+var
+ _DsEnumerateDomainTrusts: Pointer;
+
+function DsEnumerateDomainTrusts;
+begin
+ GetProcedureAddress(_DsEnumerateDomainTrusts, netapi32, 'DsEnumerateDomainTrusts' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsEnumerateDomainTrusts]
+ end;
+end;
+
+var
+ _DsGetForestTrustInformationW: Pointer;
+
+function DsGetForestTrustInformationW;
+begin
+ GetProcedureAddress(_DsGetForestTrustInformationW, netapi32, 'DsGetForestTrustInformationW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsGetForestTrustInformationW]
+ end;
+end;
+
+var
+ _DsMergeForestTrustInformationW: Pointer;
+
+function DsMergeForestTrustInformationW;
+begin
+ GetProcedureAddress(_DsMergeForestTrustInformationW, netapi32, 'DsMergeForestTrustInformationW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsMergeForestTrustInformationW]
+ end;
+end;
+
+var
+ _DsGetDcSiteCoverageA: Pointer;
+
+function DsGetDcSiteCoverageA;
+begin
+ GetProcedureAddress(_DsGetDcSiteCoverageA, netapi32, 'DsGetDcSiteCoverageA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsGetDcSiteCoverageA]
+ end;
+end;
+
+var
+ _DsGetDcSiteCoverageW: Pointer;
+
+function DsGetDcSiteCoverageW;
+begin
+ GetProcedureAddress(_DsGetDcSiteCoverageW, netapi32, 'DsGetDcSiteCoverageW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsGetDcSiteCoverageW]
+ end;
+end;
+
+var
+ _DsGetDcSiteCoverage: Pointer;
+
+function DsGetDcSiteCoverage;
+begin
+ GetProcedureAddress(_DsGetDcSiteCoverage, netapi32, 'DsGetDcSiteCoverage' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsGetDcSiteCoverage]
+ end;
+end;
+
+var
+ _DsDeregisterDnsHostRecordsA: Pointer;
+
+function DsDeregisterDnsHostRecordsA;
+begin
+ GetProcedureAddress(_DsDeregisterDnsHostRecordsA, netapi32, 'DsDeregisterDnsHostRecordsA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsDeregisterDnsHostRecordsA]
+ end;
+end;
+
+var
+ _DsDeregisterDnsHostRecordsW: Pointer;
+
+function DsDeregisterDnsHostRecordsW;
+begin
+ GetProcedureAddress(_DsDeregisterDnsHostRecordsW, netapi32, 'DsDeregisterDnsHostRecordsW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsDeregisterDnsHostRecordsW]
+ end;
+end;
+
+var
+ _DsDeregisterDnsHostRecords: Pointer;
+
+function DsDeregisterDnsHostRecords;
+begin
+ GetProcedureAddress(_DsDeregisterDnsHostRecords, netapi32, 'DsDeregisterDnsHostRecords' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsDeregisterDnsHostRecords]
+ end;
+end;
+
+var
+ _DsGetDcOpenW: Pointer;
+
+function DsGetDcOpenW;
+begin
+ GetProcedureAddress(_DsGetDcOpenW, netapi32, 'DsGetDcOpenW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsGetDcOpenW]
+ end;
+end;
+
+var
+ _DsGetDcOpenA: Pointer;
+
+function DsGetDcOpenA;
+begin
+ GetProcedureAddress(_DsGetDcOpenA, netapi32, 'DsGetDcOpenA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsGetDcOpenA]
+ end;
+end;
+
+var
+ _DsGetDcOpen: Pointer;
+
+function DsGetDcOpen;
+begin
+ GetProcedureAddress(_DsGetDcOpen, netapi32, 'DsGetDcOpen' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsGetDcOpen]
+ end;
+end;
+
+var
+ _DsGetDcNextW: Pointer;
+
+function DsGetDcNextW;
+begin
+ GetProcedureAddress(_DsGetDcNextW, netapi32, 'DsGetDcNextW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsGetDcNextW]
+ end;
+end;
+
+var
+ _DsGetDcNextA: Pointer;
+
+function DsGetDcNextA;
+begin
+ GetProcedureAddress(_DsGetDcNextA, netapi32, 'DsGetDcNextA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsGetDcNextA]
+ end;
+end;
+
+var
+ _DsGetDcNext: Pointer;
+
+function DsGetDcNext;
+begin
+ GetProcedureAddress(_DsGetDcNext, netapi32, 'DsGetDcNext' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsGetDcNext]
+ end;
+end;
+
+var
+ _DsGetDcCloseW: Pointer;
+
+procedure DsGetDcCloseW;
+begin
+ GetProcedureAddress(_DsGetDcCloseW, netapi32, 'DsGetDcCloseW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsGetDcCloseW]
+ end;
+end;
+
+var
+ _DsGetDcClose: Pointer;
+
+procedure DsGetDcClose;
+begin
+ GetProcedureAddress(_DsGetDcClose, netapi32, 'DsGetDcClose');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsGetDcClose]
+ end;
+end;
+
+{$ELSE}
+
+function DsGetDcNameA; external netapi32 name 'DsGetDcNameA';
+function DsGetDcNameW; external netapi32 name 'DsGetDcNameW';
+function DsGetDcName; external netapi32 name 'DsGetDcName' + AWSuffix;
+function DsGetSiteNameA; external netapi32 name 'DsGetSiteNameA';
+function DsGetSiteNameW; external netapi32 name 'DsGetSiteNameW';
+function DsGetSiteName; external netapi32 name 'DsGetSiteName' + AWSuffix;
+function DsValidateSubnetNameA; external netapi32 name 'DsValidateSubnetNameA';
+function DsValidateSubnetNameW; external netapi32 name 'DsValidateSubnetNameW';
+function DsValidateSubnetName; external netapi32 name 'DsValidateSubnetName' + AWSuffix;
+function DsAddressToSiteNamesA; external netapi32 name 'DsAddressToSiteNamesA';
+function DsAddressToSiteNamesW; external netapi32 name 'DsAddressToSiteNamesW';
+function DsAddressToSiteNames; external netapi32 name 'DsAddressToSiteNames' + AWSuffix;
+function DsAddressToSiteNamesExA; external netapi32 name 'DsAddressToSiteNamesExA';
+function DsAddressToSiteNamesExW; external netapi32 name 'DsAddressToSiteNamesExW';
+function DsAddressToSiteNamesEx; external netapi32 name 'DsAddressToSiteNamesEx' + AWSuffix;
+function DsEnumerateDomainTrustsA; external netapi32 name 'DsEnumerateDomainTrustsA';
+function DsEnumerateDomainTrustsW; external netapi32 name 'DsEnumerateDomainTrustsW';
+function DsEnumerateDomainTrusts; external netapi32 name 'DsEnumerateDomainTrusts' + AWSuffix;
+function DsGetForestTrustInformationW; external netapi32 name 'DsGetForestTrustInformationW';
+function DsMergeForestTrustInformationW; external netapi32 name 'DsMergeForestTrustInformationW';
+function DsGetDcSiteCoverageA; external netapi32 name 'DsGetDcSiteCoverageA';
+function DsGetDcSiteCoverageW; external netapi32 name 'DsGetDcSiteCoverageW';
+function DsGetDcSiteCoverage; external netapi32 name 'DsGetDcSiteCoverage' + AWSuffix;
+function DsDeregisterDnsHostRecordsA; external netapi32 name 'DsDeregisterDnsHostRecordsA';
+function DsDeregisterDnsHostRecordsW; external netapi32 name 'DsDeregisterDnsHostRecordsW';
+function DsDeregisterDnsHostRecords; external netapi32 name 'DsDeregisterDnsHostRecords' + AWSuffix;
+function DsGetDcOpenW; external netapi32 name 'DsGetDcOpenW';
+function DsGetDcOpenA; external netapi32 name 'DsGetDcOpenA';
+function DsGetDcOpen; external netapi32 name 'DsGetDcOpen' + AWSuffix;
+function DsGetDcNextW; external netapi32 name 'DsGetDcNextW';
+function DsGetDcNextA; external netapi32 name 'DsGetDcNextA';
+function DsGetDcNext; external netapi32 name 'DsGetDcNext' + AWSuffix;
+procedure DsGetDcCloseW; external netapi32 name 'DsGetDcCloseW';
+procedure DsGetDcClose; external netapi32 name 'DsGetDcClose';
+
+{$ENDIF DYNAMIC_LINK}
+
+end.
diff --git a/packages/extra/winunits/jwadskquota.pas b/packages/extra/winunits/jwadskquota.pas
index dd08c2592d..360a8f95ad 100644
--- a/packages/extra/winunits/jwadskquota.pas
+++ b/packages/extra/winunits/jwadskquota.pas
@@ -1,425 +1,425 @@
-{******************************************************************************}
-{ }
-{ Disk Quota's API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: dskquota.h, released June 2000. The original Pascal }
-{ code is: DskQuota.pas, released December 2000. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwadskquota.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaDskQuota;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "DskQuota.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- ActiveX {TODO}, JwaWinNT, JwaWinType;
-
-const
-
-//
-// Class IDs
-//
-// {7988B571-EC89-11cf-9C00-00AA00A14F56}
-
- CLSID_DiskQuotaControl: TGUID = (
- D1:$7988b571; D2:$ec89; D3:$11cf; D4:($9c, $0, $0, $aa, $0, $a1, $4f, $56));
- {$EXTERNALSYM CLSID_DiskQuotaControl}
-
-//
-// Interface IDs
-//
-// {7988B572-EC89-11cf-9C00-00AA00A14F56}
-
- IID_IDiskQuotaControl: TGUID = (
- D1:$7988b572; D2:$ec89; D3:$11cf; D4:($9c, $0, $0, $aa, $0, $a1, $4f, $56));
- {$EXTERNALSYM IID_IDiskQuotaControl}
-
-// {7988B574-EC89-11cf-9C00-00AA00A14F56}
-
- IID_IDiskQuotaUser: TGUID = (
- D1:$7988b574; D2:$ec89; D3:$11cf; D4:($9c, $0, $0, $aa, $0, $a1, $4f, $56));
- {$EXTERNALSYM IID_IDiskQuotaUser}
-
-// {7988B576-EC89-11cf-9C00-00AA00A14F56}
-
- IID_IDiskQuotaUserBatch: TGUID = (
- D1:$7988b576; D2:$ec89; D3:$11cf; D4:($9c, $0, $0, $aa, $0, $a1, $4f, $56));
- {$EXTERNALSYM IID_IDiskQuotaUserBatch}
-
-// {7988B577-EC89-11cf-9C00-00AA00A14F56}
-
- IID_IEnumDiskQuotaUsers: TGUID = (
- D1:$7988b577; D2:$ec89; D3:$11cf; D4:($9c, $0, $0, $aa, $0, $a1, $4f, $56));
- {$EXTERNALSYM IID_IEnumDiskQuotaUsers}
-
-// {7988B579-EC89-11cf-9C00-00AA00A14F56}
-
- IID_IDiskQuotaEvents: TGUID = (
- D1:$7988b579; D2:$ec89; D3:$11cf; D4:($9c, $0, $0, $aa, $0, $a1, $4f, $56));
- {$EXTERNALSYM IID_IDiskQuotaEvents}
-
-//
-// Definitions for value and bits in DWORD returned by
-// IDiskQuotaControl::GetQuotaState.
-//
-
- DISKQUOTA_STATE_DISABLED = $00000000;
- {$EXTERNALSYM DISKQUOTA_STATE_DISABLED}
- DISKQUOTA_STATE_TRACK = $00000001;
- {$EXTERNALSYM DISKQUOTA_STATE_TRACK}
- DISKQUOTA_STATE_ENFORCE = $00000002;
- {$EXTERNALSYM DISKQUOTA_STATE_ENFORCE}
- DISKQUOTA_STATE_MASK = $00000003;
- {$EXTERNALSYM DISKQUOTA_STATE_MASK}
- DISKQUOTA_FILESTATE_INCOMPLETE = $00000100;
- {$EXTERNALSYM DISKQUOTA_FILESTATE_INCOMPLETE}
- DISKQUOTA_FILESTATE_REBUILDING = $00000200;
- {$EXTERNALSYM DISKQUOTA_FILESTATE_REBUILDING}
- DISKQUOTA_FILESTATE_MASK = $00000300;
- {$EXTERNALSYM DISKQUOTA_FILESTATE_MASK}
-
-//
-// Helper macros for setting and testing state value.
-//
-
-function DISKQUOTA_SET_DISABLED(var s: DWORD): DWORD;
-{$EXTERNALSYM DISKQUOTA_SET_DISABLED}
-function DISKQUOTA_SET_TRACKED(var s: DWORD): DWORD;
-{$EXTERNALSYM DISKQUOTA_SET_TRACKED}
-function DISKQUOTA_SET_ENFORCED(var s: DWORD): DWORD;
-{$EXTERNALSYM DISKQUOTA_SET_ENFORCED}
-function DISKQUOTA_IS_DISABLED(s: DWORD): BOOL;
-{$EXTERNALSYM DISKQUOTA_IS_DISABLED}
-function DISKQUOTA_IS_TRACKED(s: DWORD): BOOL;
-{$EXTERNALSYM DISKQUOTA_IS_TRACKED}
-function DISKQUOTA_IS_ENFORCED(s: DWORD): BOOL;
-{$EXTERNALSYM DISKQUOTA_IS_ENFORCED}
-
-//
-// These file state flags are read-only.
-//
-
-function DISKQUOTA_FILE_INCOMPLETE(s: DWORD): BOOL;
-{$EXTERNALSYM DISKQUOTA_FILE_INCOMPLETE}
-function DISKQUOTA_FILE_REBUILDING(s: DWORD): BOOL;
-{$EXTERNALSYM DISKQUOTA_FILE_REBUILDING}
-
-//
-// Definitions for bits in DWORD returned by
-// IDiskQuotaControl::GetQuotaLogFlags.
-//
-
-const
- DISKQUOTA_LOGFLAG_USER_THRESHOLD = $00000001;
- {$EXTERNALSYM DISKQUOTA_LOGFLAG_USER_THRESHOLD}
- DISKQUOTA_LOGFLAG_USER_LIMIT = $00000002;
- {$EXTERNALSYM DISKQUOTA_LOGFLAG_USER_LIMIT}
-
-//
-// Helper macros to interrogate a log flags DWORD.
-//
-
-function DISKQUOTA_IS_LOGGED_USER_THRESHOLD(f: DWORD): BOOL;
-{$EXTERNALSYM DISKQUOTA_IS_LOGGED_USER_THRESHOLD}
-function DISKQUOTA_IS_LOGGED_USER_LIMIT(f: DWORD): BOOL;
-{$EXTERNALSYM DISKQUOTA_IS_LOGGED_USER_LIMIT}
-
-//
-// Helper macros to set/clear bits in a log flags DWORD.
-//
-
-function DISKQUOTA_SET_LOG_USER_THRESHOLD(f: DWORD; yn: BOOL): DWORD;
-{$EXTERNALSYM DISKQUOTA_SET_LOG_USER_THRESHOLD}
-function DISKQUOTA_SET_LOG_USER_LIMIT(f: DWORD; yn: BOOL): DWORD;
-{$EXTERNALSYM DISKQUOTA_SET_LOG_USER_LIMIT}
-
-//
-// Per-user quota information.
-//
-
-type
- PDISKQUOTA_USER_INFORMATION = ^DISKQUOTA_USER_INFORMATION;
- {$EXTERNALSYM PDISKQUOTA_USER_INFORMATION}
- DiskQuotaUserInformation = record
- QuotaUsed: LONGLONG;
- QuotaThreshold: LONGLONG;
- QuotaLimit: LONGLONG;
- end;
- {$EXTERNALSYM DiskQuotaUserInformation}
- DISKQUOTA_USER_INFORMATION = DiskQuotaUserInformation;
- {$EXTERNALSYM DISKQUOTA_USER_INFORMATION}
- TDiskQuotaUserInformation = DISKQUOTA_USER_INFORMATION;
- PDiskQuotaUserInformation = PDISKQUOTA_USER_INFORMATION;
-
-//
-// Values for fNameResolution argument to:
-//
-// IDiskQuotaControl::AddUserSid
-// IDiskQuotaControl::AddUserName
-// IDiskQuotaControl::FindUserSid
-// IDiskQuotaControl::CreateEnumUsers
-//
-
-const
- DISKQUOTA_USERNAME_RESOLVE_NONE = 0;
- {$EXTERNALSYM DISKQUOTA_USERNAME_RESOLVE_NONE}
- DISKQUOTA_USERNAME_RESOLVE_SYNC = 1;
- {$EXTERNALSYM DISKQUOTA_USERNAME_RESOLVE_SYNC}
- DISKQUOTA_USERNAME_RESOLVE_ASYNC = 2;
- {$EXTERNALSYM DISKQUOTA_USERNAME_RESOLVE_ASYNC}
-
-//
-// Values for status returned by IDiskQuotaUser::GetAccountStatus.
-//
-
- DISKQUOTA_USER_ACCOUNT_RESOLVED = 0;
- {$EXTERNALSYM DISKQUOTA_USER_ACCOUNT_RESOLVED}
- DISKQUOTA_USER_ACCOUNT_UNAVAILABLE = 1;
- {$EXTERNALSYM DISKQUOTA_USER_ACCOUNT_UNAVAILABLE}
- DISKQUOTA_USER_ACCOUNT_DELETED = 2;
- {$EXTERNALSYM DISKQUOTA_USER_ACCOUNT_DELETED}
- DISKQUOTA_USER_ACCOUNT_INVALID = 3;
- {$EXTERNALSYM DISKQUOTA_USER_ACCOUNT_INVALID}
- DISKQUOTA_USER_ACCOUNT_UNKNOWN = 4;
- {$EXTERNALSYM DISKQUOTA_USER_ACCOUNT_UNKNOWN}
- DISKQUOTA_USER_ACCOUNT_UNRESOLVED = 5;
- {$EXTERNALSYM DISKQUOTA_USER_ACCOUNT_UNRESOLVED}
-
-//
-// IDiskQuotaUser represents a single user quota record on a particular
-// NTFS volume. Objects using this interface are instantiated
-// through several IDiskQuotaControl methods.
-//
-
-type
- IDiskQuotaUser = interface (IUnknown)
- ['{7988B574-EC89-11cf-9C00-00AA00A14F56}']
- function GetID(var pulID: ULONG): HRESULT; stdcall;
- function GetName(pszAccountContainer: LPWSTR; cchAccountContainer: DWORD;
- pszLogonName: LPWSTR; cchLogonName: DWORD; pszDisplayName: LPWSTR;
- cchDisplayName: DWORD): HRESULT; stdcall;
- function GetSidLength(var pdwLength: DWORD): HRESULT; stdcall;
- function GetSid(pbSidBuffer: LPBYTE; cbSidBuffer: DWORD): HRESULT; stdcall;
- function GetQuotaThreshold(var pllThreshold: LONGLONG): HRESULT; stdcall;
- function GetQuotaThresholdText(pszText: LPWSTR; cchText: DWORD): HRESULT; stdcall;
- function GetQuotaLimit(var pllLimit: LONGLONG): HRESULT; stdcall;
- function GetQuotaLimitText(pszText: LPWSTR; cchText: DWORD): HRESULT; stdcall;
- function GetQuotaUsed(var pllUsed: LONGLONG): HRESULT; stdcall;
- function GetQuotaUsedText(pszText: LPWSTR; cchText: DWORD): HRESULT; stdcall;
- function GetQuotaInformation(pbQuotaInfo: LPVOID; cbQuotaInfo: DWORD): HRESULT; stdcall;
- function SetQuotaThreshold(llThreshold: LONGLONG; fWriteThrough: BOOL): HRESULT; stdcall;
- function SetQuotaLimit(llLimit: LONGLONG; fWriteThrough: BOOL): HRESULT; stdcall;
- function Invalidate: HRESULT; stdcall;
- function GetAccountStatus(var pdwStatus: DWORD): HRESULT; stdcall;
- end;
- {$EXTERNALSYM IDiskQuotaUser}
-
- DISKQUOTA_USER = IDiskQuotaUser;
- {$EXTERNALSYM DISKQUOTA_USER}
- PDISKQUOTA_USER = ^DISKQUOTA_USER;
- {$EXTERNALSYM PDISKQUOTA_USER}
-
-//
-// IEnumDiskQuotaUsers represents an enumerator created by
-// IDiskQuotaControl for the purpose of enumerating individual user quota
-// records on a particular volume. Each record is represented through
-// the IDiskQuotaUser interface.
-//
-
- IEnumDiskQuotaUsers = interface (IUnknown)
- ['{7988B577-EC89-11cf-9C00-00AA00A14F56}']
- function Next(cUsers: DWORD; var rgUsers: IDiskQuotaUser; pcUsersFetched: LPDWORD): HRESULT; stdcall;
- function Skip(cUsers: DWORD): HRESULT; stdcall;
- function Reset: HRESULT; stdcall;
- function Clone(out ppEnum: IEnumDiskQuotaUsers): HRESULT; stdcall;
- end;
- {$EXTERNALSYM IEnumDiskQuotaUsers}
-
- ENUM_DISKQUOTA_USERS = IEnumDiskQuotaUsers;
- {$EXTERNALSYM ENUM_DISKQUOTA_USERS}
- PENUM_DISKQUOTA_USERS = ^ENUM_DISKQUOTA_USERS;
- {$EXTERNALSYM PENUM_DISKQUOTA_USERS}
-
-//
-// IDiskQuotaUserBatch represents a collection of IDiskQuotaUser
-// pointers for the purpose of grouping updates to quota information.
-//
-
- IDiskQuotaUserBatch = interface (IUnknown)
- ['{7988B576-EC89-11cf-9C00-00AA00A14F56}']
- function Add(pUser: IDiskQuotaUser): HRESULT; stdcall;
- function Remove(pUser: IDiskQuotaUser): HRESULT; stdcall;
- function RemoveAll: HRESULT; stdcall;
- function FlushToDisk: HRESULT; stdcall;
- end;
- {$EXTERNALSYM IDiskQuotaUserBatch}
-
- DISKQUOTA_USER_BATCH = IDiskQuotaUserBatch;
- {$EXTERNALSYM DISKQUOTA_USER_BATCH}
- PDISKQUOTA_USER_BATCH = ^DISKQUOTA_USER_BATCH;
- {$EXTERNALSYM PDISKQUOTA_USER_BATCH}
-
-//
-// IDiskQuotaControl represents a disk volume, providing query and
-// control of that volume's quota information.
-//
-
- IDiskQuotaControl = interface (IConnectionPointContainer)
- ['{7988B571-EC89-11cf-9C00-00AA00A14F56}']
- function Initialize(pszPath: LPCWSTR; bReadWrite: BOOL): HRESULT; stdcall;
- function SetQuotaState(dwState: DWORD): HRESULT; stdcall;
- function GetQuotaState(var pdwState: DWORD): HRESULT; stdcall;
- function SetQuotaLogFlags(dwFlags: DWORD): HRESULT; stdcall;
- function GetQuotaLogFlags(var pdwFlags: DWORD): HRESULT; stdcall;
- function SetDefaultQuotaThreshold(llThreshold: LONGLONG): HRESULT; stdcall;
- function GetDefaultQuotaThreshold(var pllThreshold: LONGLONG): HRESULT; stdcall;
- function GetDefaultQuotaThresholdText(pszText: LPWSTR; cchText: DWORD): HRESULT; stdcall;
- function SetDefaultQuotaLimit(llLimit: LONGLONG): HRESULT; stdcall;
- function GetDefaultQuotaLimit(var pllLimit: LONGLONG): HRESULT; stdcall;
- function GetDefaultQuotaLimitText(pszText: LPWSTR; cchText: DWORD): HRESULT; stdcall;
- function AddUserSid(pUserSid: PSID; fNameResolution: DWORD;
- out ppUser: IDiskQuotaUser): HRESULT; stdcall;
- function AddUserName(pszLogonName: LPCWSTR; fNameResolution: DWORD;
- out ppUser: IDiskQuotaUser): HRESULT; stdcall;
- function DeleteUser(pUser: IDiskQuotaUser): HRESULT; stdcall;
- function FindUserSid(pUserSid: PSID; fNameResolution: DWORD;
- out ppUser: IDiskQuotaUser): HRESULT; stdcall;
- function FindUserName(pszLogonName: LPCWSTR; out ppUser: IDiskQuotaUser): HRESULT; stdcall;
- function CreateEnumUsers(rgpUserSids: PSID; cpSids, fNameResolution: DWORD;
- out ppEnum: IEnumDiskQuotaUsers): HRESULT; stdcall;
- function CreateUserBatch(out ppBatch: IDiskQuotaUserBatch): HRESULT; stdcall;
- function InvalidateSidNameCache: HRESULT; stdcall;
- function GiveUserNameResolutionPriority(pUser: IDiskQuotaUser): HRESULT; stdcall;
- function ShutdownNameResolution: HRESULT; stdcall;
- end;
- {$EXTERNALSYM IDiskQuotaControl}
-
- DISKQUOTA_CONTROL = IDiskQuotaControl;
- {$EXTERNALSYM DISKQUOTA_CONTROL}
- PDISKQUOTA_CONTROL = ^DISKQUOTA_CONTROL;
- {$EXTERNALSYM PDISKQUOTA_CONTROL}
-
- IDiskQuotaEvents = interface (IUnknown)
- ['{7988B579-EC89-11cf-9C00-00AA00A14F56}']
- function OnUserNameChanged(pUser: IDiskQuotaUser): HRESULT; stdcall;
- end;
- {$EXTERNALSYM IDiskQuotaEvents}
-
- DISKQUOTA_EVENTS = IDiskQuotaEvents;
- {$EXTERNALSYM DISKQUOTA_EVENTS;}
- PDISKQUOTA_EVENTS = ^DISKQUOTA_EVENTS;
- {$EXTERNALSYM PDISKQUOTA_EVENTS;}
-
-implementation
-
-function DISKQUOTA_SET_DISABLED(var s: DWORD): DWORD;
-begin
- s := DISKQUOTA_STATE_DISABLED;
- Result := s;
-end;
-
-function DISKQUOTA_SET_TRACKED(var s: DWORD): DWORD;
-begin
- s := DISKQUOTA_STATE_TRACK;
- Result := s;
-end;
-
-function DISKQUOTA_SET_ENFORCED(var s: DWORD): DWORD;
-begin
- s := DISKQUOTA_STATE_ENFORCE;
- Result := s;
-end;
-
-function DISKQUOTA_IS_DISABLED(s: DWORD): BOOL;
-begin
- Result := (DISKQUOTA_STATE_DISABLED = (s and DISKQUOTA_STATE_MASK));
-end;
-
-function DISKQUOTA_IS_TRACKED(s: DWORD): BOOL;
-begin
- Result := (DISKQUOTA_STATE_TRACK = (s and DISKQUOTA_STATE_MASK));
-end;
-
-function DISKQUOTA_IS_ENFORCED(s: DWORD): BOOL;
-begin
- Result := (DISKQUOTA_STATE_ENFORCE = (s and DISKQUOTA_STATE_MASK));
-end;
-
-function DISKQUOTA_FILE_INCOMPLETE(s: DWORD): BOOL;
-begin
- Result := (0 <> (s and DISKQUOTA_FILESTATE_INCOMPLETE));
-end;
-
-function DISKQUOTA_FILE_REBUILDING(s: DWORD): BOOL;
-begin
- Result := (0 <> (s and DISKQUOTA_FILESTATE_REBUILDING));
-end;
-
-function DISKQUOTA_IS_LOGGED_USER_THRESHOLD(f: DWORD): BOOL;
-begin
- Result := (0 <> (f and DISKQUOTA_LOGFLAG_USER_THRESHOLD));
-end;
-
-function DISKQUOTA_IS_LOGGED_USER_LIMIT(f: DWORD): BOOL;
-begin
- Result := (0 <> (f and DISKQUOTA_LOGFLAG_USER_LIMIT));
-end;
-
-function DISKQUOTA_SET_LOG_USER_THRESHOLD(f: DWORD; yn: BOOL): DWORD;
-begin
- Result := f and (not DISKQUOTA_LOGFLAG_USER_THRESHOLD);
- if yn then
- Result := Result or DISKQUOTA_LOGFLAG_USER_THRESHOLD;
-end;
-
-function DISKQUOTA_SET_LOG_USER_LIMIT(f: DWORD; yn: BOOL): DWORD;
-begin
- Result := f and (not DISKQUOTA_LOGFLAG_USER_LIMIT);
- if yn then
- Result := Result or DISKQUOTA_LOGFLAG_USER_LIMIT;
-end;
-
-end.
+{******************************************************************************}
+{ }
+{ Disk Quota's API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: dskquota.h, released June 2000. The original Pascal }
+{ code is: DskQuota.pas, released December 2000. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwadskquota.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaDskQuota;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "DskQuota.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ ActiveX {TODO}, JwaWinNT, JwaWinType;
+
+const
+
+//
+// Class IDs
+//
+// {7988B571-EC89-11cf-9C00-00AA00A14F56}
+
+ CLSID_DiskQuotaControl: TGUID = (
+ D1:$7988b571; D2:$ec89; D3:$11cf; D4:($9c, $0, $0, $aa, $0, $a1, $4f, $56));
+ {$EXTERNALSYM CLSID_DiskQuotaControl}
+
+//
+// Interface IDs
+//
+// {7988B572-EC89-11cf-9C00-00AA00A14F56}
+
+ IID_IDiskQuotaControl: TGUID = (
+ D1:$7988b572; D2:$ec89; D3:$11cf; D4:($9c, $0, $0, $aa, $0, $a1, $4f, $56));
+ {$EXTERNALSYM IID_IDiskQuotaControl}
+
+// {7988B574-EC89-11cf-9C00-00AA00A14F56}
+
+ IID_IDiskQuotaUser: TGUID = (
+ D1:$7988b574; D2:$ec89; D3:$11cf; D4:($9c, $0, $0, $aa, $0, $a1, $4f, $56));
+ {$EXTERNALSYM IID_IDiskQuotaUser}
+
+// {7988B576-EC89-11cf-9C00-00AA00A14F56}
+
+ IID_IDiskQuotaUserBatch: TGUID = (
+ D1:$7988b576; D2:$ec89; D3:$11cf; D4:($9c, $0, $0, $aa, $0, $a1, $4f, $56));
+ {$EXTERNALSYM IID_IDiskQuotaUserBatch}
+
+// {7988B577-EC89-11cf-9C00-00AA00A14F56}
+
+ IID_IEnumDiskQuotaUsers: TGUID = (
+ D1:$7988b577; D2:$ec89; D3:$11cf; D4:($9c, $0, $0, $aa, $0, $a1, $4f, $56));
+ {$EXTERNALSYM IID_IEnumDiskQuotaUsers}
+
+// {7988B579-EC89-11cf-9C00-00AA00A14F56}
+
+ IID_IDiskQuotaEvents: TGUID = (
+ D1:$7988b579; D2:$ec89; D3:$11cf; D4:($9c, $0, $0, $aa, $0, $a1, $4f, $56));
+ {$EXTERNALSYM IID_IDiskQuotaEvents}
+
+//
+// Definitions for value and bits in DWORD returned by
+// IDiskQuotaControl::GetQuotaState.
+//
+
+ DISKQUOTA_STATE_DISABLED = $00000000;
+ {$EXTERNALSYM DISKQUOTA_STATE_DISABLED}
+ DISKQUOTA_STATE_TRACK = $00000001;
+ {$EXTERNALSYM DISKQUOTA_STATE_TRACK}
+ DISKQUOTA_STATE_ENFORCE = $00000002;
+ {$EXTERNALSYM DISKQUOTA_STATE_ENFORCE}
+ DISKQUOTA_STATE_MASK = $00000003;
+ {$EXTERNALSYM DISKQUOTA_STATE_MASK}
+ DISKQUOTA_FILESTATE_INCOMPLETE = $00000100;
+ {$EXTERNALSYM DISKQUOTA_FILESTATE_INCOMPLETE}
+ DISKQUOTA_FILESTATE_REBUILDING = $00000200;
+ {$EXTERNALSYM DISKQUOTA_FILESTATE_REBUILDING}
+ DISKQUOTA_FILESTATE_MASK = $00000300;
+ {$EXTERNALSYM DISKQUOTA_FILESTATE_MASK}
+
+//
+// Helper macros for setting and testing state value.
+//
+
+function DISKQUOTA_SET_DISABLED(var s: DWORD): DWORD;
+{$EXTERNALSYM DISKQUOTA_SET_DISABLED}
+function DISKQUOTA_SET_TRACKED(var s: DWORD): DWORD;
+{$EXTERNALSYM DISKQUOTA_SET_TRACKED}
+function DISKQUOTA_SET_ENFORCED(var s: DWORD): DWORD;
+{$EXTERNALSYM DISKQUOTA_SET_ENFORCED}
+function DISKQUOTA_IS_DISABLED(s: DWORD): BOOL;
+{$EXTERNALSYM DISKQUOTA_IS_DISABLED}
+function DISKQUOTA_IS_TRACKED(s: DWORD): BOOL;
+{$EXTERNALSYM DISKQUOTA_IS_TRACKED}
+function DISKQUOTA_IS_ENFORCED(s: DWORD): BOOL;
+{$EXTERNALSYM DISKQUOTA_IS_ENFORCED}
+
+//
+// These file state flags are read-only.
+//
+
+function DISKQUOTA_FILE_INCOMPLETE(s: DWORD): BOOL;
+{$EXTERNALSYM DISKQUOTA_FILE_INCOMPLETE}
+function DISKQUOTA_FILE_REBUILDING(s: DWORD): BOOL;
+{$EXTERNALSYM DISKQUOTA_FILE_REBUILDING}
+
+//
+// Definitions for bits in DWORD returned by
+// IDiskQuotaControl::GetQuotaLogFlags.
+//
+
+const
+ DISKQUOTA_LOGFLAG_USER_THRESHOLD = $00000001;
+ {$EXTERNALSYM DISKQUOTA_LOGFLAG_USER_THRESHOLD}
+ DISKQUOTA_LOGFLAG_USER_LIMIT = $00000002;
+ {$EXTERNALSYM DISKQUOTA_LOGFLAG_USER_LIMIT}
+
+//
+// Helper macros to interrogate a log flags DWORD.
+//
+
+function DISKQUOTA_IS_LOGGED_USER_THRESHOLD(f: DWORD): BOOL;
+{$EXTERNALSYM DISKQUOTA_IS_LOGGED_USER_THRESHOLD}
+function DISKQUOTA_IS_LOGGED_USER_LIMIT(f: DWORD): BOOL;
+{$EXTERNALSYM DISKQUOTA_IS_LOGGED_USER_LIMIT}
+
+//
+// Helper macros to set/clear bits in a log flags DWORD.
+//
+
+function DISKQUOTA_SET_LOG_USER_THRESHOLD(f: DWORD; yn: BOOL): DWORD;
+{$EXTERNALSYM DISKQUOTA_SET_LOG_USER_THRESHOLD}
+function DISKQUOTA_SET_LOG_USER_LIMIT(f: DWORD; yn: BOOL): DWORD;
+{$EXTERNALSYM DISKQUOTA_SET_LOG_USER_LIMIT}
+
+//
+// Per-user quota information.
+//
+
+type
+ PDISKQUOTA_USER_INFORMATION = ^DISKQUOTA_USER_INFORMATION;
+ {$EXTERNALSYM PDISKQUOTA_USER_INFORMATION}
+ DiskQuotaUserInformation = record
+ QuotaUsed: LONGLONG;
+ QuotaThreshold: LONGLONG;
+ QuotaLimit: LONGLONG;
+ end;
+ {$EXTERNALSYM DiskQuotaUserInformation}
+ DISKQUOTA_USER_INFORMATION = DiskQuotaUserInformation;
+ {$EXTERNALSYM DISKQUOTA_USER_INFORMATION}
+ TDiskQuotaUserInformation = DISKQUOTA_USER_INFORMATION;
+ PDiskQuotaUserInformation = PDISKQUOTA_USER_INFORMATION;
+
+//
+// Values for fNameResolution argument to:
+//
+// IDiskQuotaControl::AddUserSid
+// IDiskQuotaControl::AddUserName
+// IDiskQuotaControl::FindUserSid
+// IDiskQuotaControl::CreateEnumUsers
+//
+
+const
+ DISKQUOTA_USERNAME_RESOLVE_NONE = 0;
+ {$EXTERNALSYM DISKQUOTA_USERNAME_RESOLVE_NONE}
+ DISKQUOTA_USERNAME_RESOLVE_SYNC = 1;
+ {$EXTERNALSYM DISKQUOTA_USERNAME_RESOLVE_SYNC}
+ DISKQUOTA_USERNAME_RESOLVE_ASYNC = 2;
+ {$EXTERNALSYM DISKQUOTA_USERNAME_RESOLVE_ASYNC}
+
+//
+// Values for status returned by IDiskQuotaUser::GetAccountStatus.
+//
+
+ DISKQUOTA_USER_ACCOUNT_RESOLVED = 0;
+ {$EXTERNALSYM DISKQUOTA_USER_ACCOUNT_RESOLVED}
+ DISKQUOTA_USER_ACCOUNT_UNAVAILABLE = 1;
+ {$EXTERNALSYM DISKQUOTA_USER_ACCOUNT_UNAVAILABLE}
+ DISKQUOTA_USER_ACCOUNT_DELETED = 2;
+ {$EXTERNALSYM DISKQUOTA_USER_ACCOUNT_DELETED}
+ DISKQUOTA_USER_ACCOUNT_INVALID = 3;
+ {$EXTERNALSYM DISKQUOTA_USER_ACCOUNT_INVALID}
+ DISKQUOTA_USER_ACCOUNT_UNKNOWN = 4;
+ {$EXTERNALSYM DISKQUOTA_USER_ACCOUNT_UNKNOWN}
+ DISKQUOTA_USER_ACCOUNT_UNRESOLVED = 5;
+ {$EXTERNALSYM DISKQUOTA_USER_ACCOUNT_UNRESOLVED}
+
+//
+// IDiskQuotaUser represents a single user quota record on a particular
+// NTFS volume. Objects using this interface are instantiated
+// through several IDiskQuotaControl methods.
+//
+
+type
+ IDiskQuotaUser = interface (IUnknown)
+ ['{7988B574-EC89-11cf-9C00-00AA00A14F56}']
+ function GetID(var pulID: ULONG): HRESULT; stdcall;
+ function GetName(pszAccountContainer: LPWSTR; cchAccountContainer: DWORD;
+ pszLogonName: LPWSTR; cchLogonName: DWORD; pszDisplayName: LPWSTR;
+ cchDisplayName: DWORD): HRESULT; stdcall;
+ function GetSidLength(var pdwLength: DWORD): HRESULT; stdcall;
+ function GetSid(pbSidBuffer: LPBYTE; cbSidBuffer: DWORD): HRESULT; stdcall;
+ function GetQuotaThreshold(var pllThreshold: LONGLONG): HRESULT; stdcall;
+ function GetQuotaThresholdText(pszText: LPWSTR; cchText: DWORD): HRESULT; stdcall;
+ function GetQuotaLimit(var pllLimit: LONGLONG): HRESULT; stdcall;
+ function GetQuotaLimitText(pszText: LPWSTR; cchText: DWORD): HRESULT; stdcall;
+ function GetQuotaUsed(var pllUsed: LONGLONG): HRESULT; stdcall;
+ function GetQuotaUsedText(pszText: LPWSTR; cchText: DWORD): HRESULT; stdcall;
+ function GetQuotaInformation(pbQuotaInfo: LPVOID; cbQuotaInfo: DWORD): HRESULT; stdcall;
+ function SetQuotaThreshold(llThreshold: LONGLONG; fWriteThrough: BOOL): HRESULT; stdcall;
+ function SetQuotaLimit(llLimit: LONGLONG; fWriteThrough: BOOL): HRESULT; stdcall;
+ function Invalidate: HRESULT; stdcall;
+ function GetAccountStatus(var pdwStatus: DWORD): HRESULT; stdcall;
+ end;
+ {$EXTERNALSYM IDiskQuotaUser}
+
+ DISKQUOTA_USER = IDiskQuotaUser;
+ {$EXTERNALSYM DISKQUOTA_USER}
+ PDISKQUOTA_USER = ^DISKQUOTA_USER;
+ {$EXTERNALSYM PDISKQUOTA_USER}
+
+//
+// IEnumDiskQuotaUsers represents an enumerator created by
+// IDiskQuotaControl for the purpose of enumerating individual user quota
+// records on a particular volume. Each record is represented through
+// the IDiskQuotaUser interface.
+//
+
+ IEnumDiskQuotaUsers = interface (IUnknown)
+ ['{7988B577-EC89-11cf-9C00-00AA00A14F56}']
+ function Next(cUsers: DWORD; var rgUsers: IDiskQuotaUser; pcUsersFetched: LPDWORD): HRESULT; stdcall;
+ function Skip(cUsers: DWORD): HRESULT; stdcall;
+ function Reset: HRESULT; stdcall;
+ function Clone(out ppEnum: IEnumDiskQuotaUsers): HRESULT; stdcall;
+ end;
+ {$EXTERNALSYM IEnumDiskQuotaUsers}
+
+ ENUM_DISKQUOTA_USERS = IEnumDiskQuotaUsers;
+ {$EXTERNALSYM ENUM_DISKQUOTA_USERS}
+ PENUM_DISKQUOTA_USERS = ^ENUM_DISKQUOTA_USERS;
+ {$EXTERNALSYM PENUM_DISKQUOTA_USERS}
+
+//
+// IDiskQuotaUserBatch represents a collection of IDiskQuotaUser
+// pointers for the purpose of grouping updates to quota information.
+//
+
+ IDiskQuotaUserBatch = interface (IUnknown)
+ ['{7988B576-EC89-11cf-9C00-00AA00A14F56}']
+ function Add(pUser: IDiskQuotaUser): HRESULT; stdcall;
+ function Remove(pUser: IDiskQuotaUser): HRESULT; stdcall;
+ function RemoveAll: HRESULT; stdcall;
+ function FlushToDisk: HRESULT; stdcall;
+ end;
+ {$EXTERNALSYM IDiskQuotaUserBatch}
+
+ DISKQUOTA_USER_BATCH = IDiskQuotaUserBatch;
+ {$EXTERNALSYM DISKQUOTA_USER_BATCH}
+ PDISKQUOTA_USER_BATCH = ^DISKQUOTA_USER_BATCH;
+ {$EXTERNALSYM PDISKQUOTA_USER_BATCH}
+
+//
+// IDiskQuotaControl represents a disk volume, providing query and
+// control of that volume's quota information.
+//
+
+ IDiskQuotaControl = interface (IConnectionPointContainer)
+ ['{7988B571-EC89-11cf-9C00-00AA00A14F56}']
+ function Initialize(pszPath: LPCWSTR; bReadWrite: BOOL): HRESULT; stdcall;
+ function SetQuotaState(dwState: DWORD): HRESULT; stdcall;
+ function GetQuotaState(var pdwState: DWORD): HRESULT; stdcall;
+ function SetQuotaLogFlags(dwFlags: DWORD): HRESULT; stdcall;
+ function GetQuotaLogFlags(var pdwFlags: DWORD): HRESULT; stdcall;
+ function SetDefaultQuotaThreshold(llThreshold: LONGLONG): HRESULT; stdcall;
+ function GetDefaultQuotaThreshold(var pllThreshold: LONGLONG): HRESULT; stdcall;
+ function GetDefaultQuotaThresholdText(pszText: LPWSTR; cchText: DWORD): HRESULT; stdcall;
+ function SetDefaultQuotaLimit(llLimit: LONGLONG): HRESULT; stdcall;
+ function GetDefaultQuotaLimit(var pllLimit: LONGLONG): HRESULT; stdcall;
+ function GetDefaultQuotaLimitText(pszText: LPWSTR; cchText: DWORD): HRESULT; stdcall;
+ function AddUserSid(pUserSid: PSID; fNameResolution: DWORD;
+ out ppUser: IDiskQuotaUser): HRESULT; stdcall;
+ function AddUserName(pszLogonName: LPCWSTR; fNameResolution: DWORD;
+ out ppUser: IDiskQuotaUser): HRESULT; stdcall;
+ function DeleteUser(pUser: IDiskQuotaUser): HRESULT; stdcall;
+ function FindUserSid(pUserSid: PSID; fNameResolution: DWORD;
+ out ppUser: IDiskQuotaUser): HRESULT; stdcall;
+ function FindUserName(pszLogonName: LPCWSTR; out ppUser: IDiskQuotaUser): HRESULT; stdcall;
+ function CreateEnumUsers(rgpUserSids: PSID; cpSids, fNameResolution: DWORD;
+ out ppEnum: IEnumDiskQuotaUsers): HRESULT; stdcall;
+ function CreateUserBatch(out ppBatch: IDiskQuotaUserBatch): HRESULT; stdcall;
+ function InvalidateSidNameCache: HRESULT; stdcall;
+ function GiveUserNameResolutionPriority(pUser: IDiskQuotaUser): HRESULT; stdcall;
+ function ShutdownNameResolution: HRESULT; stdcall;
+ end;
+ {$EXTERNALSYM IDiskQuotaControl}
+
+ DISKQUOTA_CONTROL = IDiskQuotaControl;
+ {$EXTERNALSYM DISKQUOTA_CONTROL}
+ PDISKQUOTA_CONTROL = ^DISKQUOTA_CONTROL;
+ {$EXTERNALSYM PDISKQUOTA_CONTROL}
+
+ IDiskQuotaEvents = interface (IUnknown)
+ ['{7988B579-EC89-11cf-9C00-00AA00A14F56}']
+ function OnUserNameChanged(pUser: IDiskQuotaUser): HRESULT; stdcall;
+ end;
+ {$EXTERNALSYM IDiskQuotaEvents}
+
+ DISKQUOTA_EVENTS = IDiskQuotaEvents;
+ {$EXTERNALSYM DISKQUOTA_EVENTS;}
+ PDISKQUOTA_EVENTS = ^DISKQUOTA_EVENTS;
+ {$EXTERNALSYM PDISKQUOTA_EVENTS;}
+
+implementation
+
+function DISKQUOTA_SET_DISABLED(var s: DWORD): DWORD;
+begin
+ s := DISKQUOTA_STATE_DISABLED;
+ Result := s;
+end;
+
+function DISKQUOTA_SET_TRACKED(var s: DWORD): DWORD;
+begin
+ s := DISKQUOTA_STATE_TRACK;
+ Result := s;
+end;
+
+function DISKQUOTA_SET_ENFORCED(var s: DWORD): DWORD;
+begin
+ s := DISKQUOTA_STATE_ENFORCE;
+ Result := s;
+end;
+
+function DISKQUOTA_IS_DISABLED(s: DWORD): BOOL;
+begin
+ Result := (DISKQUOTA_STATE_DISABLED = (s and DISKQUOTA_STATE_MASK));
+end;
+
+function DISKQUOTA_IS_TRACKED(s: DWORD): BOOL;
+begin
+ Result := (DISKQUOTA_STATE_TRACK = (s and DISKQUOTA_STATE_MASK));
+end;
+
+function DISKQUOTA_IS_ENFORCED(s: DWORD): BOOL;
+begin
+ Result := (DISKQUOTA_STATE_ENFORCE = (s and DISKQUOTA_STATE_MASK));
+end;
+
+function DISKQUOTA_FILE_INCOMPLETE(s: DWORD): BOOL;
+begin
+ Result := (0 <> (s and DISKQUOTA_FILESTATE_INCOMPLETE));
+end;
+
+function DISKQUOTA_FILE_REBUILDING(s: DWORD): BOOL;
+begin
+ Result := (0 <> (s and DISKQUOTA_FILESTATE_REBUILDING));
+end;
+
+function DISKQUOTA_IS_LOGGED_USER_THRESHOLD(f: DWORD): BOOL;
+begin
+ Result := (0 <> (f and DISKQUOTA_LOGFLAG_USER_THRESHOLD));
+end;
+
+function DISKQUOTA_IS_LOGGED_USER_LIMIT(f: DWORD): BOOL;
+begin
+ Result := (0 <> (f and DISKQUOTA_LOGFLAG_USER_LIMIT));
+end;
+
+function DISKQUOTA_SET_LOG_USER_THRESHOLD(f: DWORD; yn: BOOL): DWORD;
+begin
+ Result := f and (not DISKQUOTA_LOGFLAG_USER_THRESHOLD);
+ if yn then
+ Result := Result or DISKQUOTA_LOGFLAG_USER_THRESHOLD;
+end;
+
+function DISKQUOTA_SET_LOG_USER_LIMIT(f: DWORD; yn: BOOL): DWORD;
+begin
+ Result := f and (not DISKQUOTA_LOGFLAG_USER_LIMIT);
+ if yn then
+ Result := Result or DISKQUOTA_LOGFLAG_USER_LIMIT;
+end;
+
+end.
diff --git a/packages/extra/winunits/jwadsquery.pas b/packages/extra/winunits/jwadsquery.pas
index 50ef590736..ba8464b2c9 100644
--- a/packages/extra/winunits/jwadsquery.pas
+++ b/packages/extra/winunits/jwadsquery.pas
@@ -1,223 +1,223 @@
-{******************************************************************************}
-{ }
-{ Directory Services Query API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: dsquery.h, released November 2002. The original Pascal }
-{ code is: DSQuery.pas, released March 2002. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwadsquery.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaDSQuery;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "dsquery.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaCmnQuery, JwaWinType;
-
-const
- CLSID_DsQuery: TGUID = (D1:$8a23e65e; D2:$31c2; D3:$11d0; D4:($89, $1c, $0, $a0, $24, $ab, $2d, $bb));
- {$EXTERNALSYM CLSID_DsQuery}
-
-//
-// standard forms shipped in dsquery.dll
-//
-
- CLSID_DsFindObjects: TGUID = (D1:$83ee3fe1; D2:$57d9; D3:$11d0; D4:($b9, $32, $0, $a0, $24, $ab, $2d, $bb));
- {$EXTERNALSYM CLSID_DsFindObjects}
- CLSID_DsFindPeople: TGUID = (D1:$83ee3fe2; D2:$57d9; D3:$11d0; D4:($b9, $32, $0, $a0, $24, $ab, $2d, $bb));
- {$EXTERNALSYM CLSID_DsFindPeople}
- CLSID_DsFindPrinter: TGUID = (D1:$b577f070; D2:$7ee2; D3:$11d0; D4:($91, $3f, $0, $aa, $0, $c1, $6e, $65));
- {$EXTERNALSYM CLSID_DsFindPrinter}
- CLSID_DsFindComputer: TGUID = (D1:$16006700; D2:$87ad; D3:$11d0; D4:($91, $40, $0, $aa, $0, $c1, $6e, $65));
- {$EXTERNALSYM CLSID_DsFindComputer}
- CLSID_DsFindVolume: TGUID = (D1:$c1b3cbf1; D2:$886a; D3:$11d0; D4:($91, $40, $0, $aa, $0, $c1, $6e, $65));
- {$EXTERNALSYM CLSID_DsFindVolume}
- CLSID_DsFindContainer: TGUID = (D1:$c1b3cbf2; D2:$886a; D3:$11d0; D4:($91, $40, $0, $aa, $0, $c1, $6e, $65));
- {$EXTERNALSYM CLSID_DsFindContainer}
- CLSID_DsFindAdvanced: TGUID = (D1:$83ee3fe3; D2:$57d9; D3:$11d0; D4:($b9, $32, $0, $a0, $24, $ab, $2d, $bb));
- {$EXTERNALSYM CLSID_DsFindAdvanced}
-
-//
-// admin forms
-//
-
- CLSID_DsFindDomainController: TGUID = (D1:$538c7b7e; D2:$d25e; D3:$11d0; D4:($97, $42, $0, $a0, $c9, $6, $af, $45));
- {$EXTERNALSYM CLSID_DsFindDomainController}
- CLSID_DsFindFrsMembers: TGUID = (D1:$94ce4b18; D2:$b3d3; D3:$11d1; D4:($b9, $b4, $0, $c0, $4f, $d8, $d5, $b0));
- {$EXTERNALSYM CLSID_DsFindFrsMembers}
-
-//
-// DSQUERYINITPARAMS
-// -----------------
-// This structured is used when creating a new query view.
-//
-
-const
- DSQPF_NOSAVE = $00000001; // = 1 => remove save verb
- {$EXTERNALSYM DSQPF_NOSAVE}
- DSQPF_SAVELOCATION = $00000002; // = 1 => pSaveLocation contains directory to save queries into
- {$EXTERNALSYM DSQPF_SAVELOCATION}
- DSQPF_SHOWHIDDENOBJECTS = $00000004; // = 1 => show objects marked as "hidden" in results
- {$EXTERNALSYM DSQPF_SHOWHIDDENOBJECTS}
- DSQPF_ENABLEADMINFEATURES = $00000008; // = 1 => show admin verbs, property pages etc
- {$EXTERNALSYM DSQPF_ENABLEADMINFEATURES}
- DSQPF_ENABLEADVANCEDFEATURES = $00000010; // = 1 => set the advanced flag for the property pages
- {$EXTERNALSYM DSQPF_ENABLEADVANCEDFEATURES}
- DSQPF_HASCREDENTIALS = $00000020; // = 1 => pServer, pUserName & pPassword are valid
- {$EXTERNALSYM DSQPF_HASCREDENTIALS}
- DSQPF_NOCHOOSECOLUMNS = $00000040; // = 1 => remove choose columns from view
- {$EXTERNALSYM DSQPF_NOCHOOSECOLUMNS}
-
-type
- LPDSQUERYINITPARAMS = ^DSQUERYINITPARAMS;
- {$EXTERNALSYM LPDSQUERYINITPARAMS}
- DSQUERYINITPARAMS = record
- cbStruct: DWORD;
- dwFlags: DWORD;
- pDefaultScope: LPWSTR; // -> Active Directory path to use as scope / == NULL for none
- pDefaultSaveLocation: LPWSTR; // -> Directory to save queries into / == NULL default location
- pUserName: LPWSTR; // -> user name to authenticate with
- pPassword: LPWSTR; // -> password for authentication
- pServer: LPWSTR; // -> server to use for obtaining trusts etc
- end;
- {$EXTERNALSYM DSQUERYINITPARAMS}
- TDsQueryInitParams = DSQUERYINITPARAMS;
- PDsQueryInitParams = LPDSQUERYINITPARAMS;
-
-//
-// DSQUERYPARAMS
-// -------------
-// The DS query handle takes a packed structure which contains the
-// columns and query to be issued.
-//
-
-const
- CFSTR_DSQUERYPARAMS = TEXT('DsQueryParameters');
- {$EXTERNALSYM CFSTR_DSQUERYPARAMS}
-
- DSCOLUMNPROP_ADSPATH = LONG(-1);
- {$EXTERNALSYM DSCOLUMNPROP_ADSPATH}
- DSCOLUMNPROP_OBJECTCLASS = LONG(-2);
- {$EXTERNALSYM DSCOLUMNPROP_OBJECTCLASS}
-
-type
- LPDSCOLUMN = ^DSCOLUMN;
- {$EXTERNALSYM LPDSCOLUMN}
- DSCOLUMN = record
- dwFlags: DWORD; // flags for this column
- fmt: INT; // list view form information
- cx: INT; // default column width
- idsName: INT; // resource ID for the column dispaly name
- offsetProperty: LONG; // offset to BSTR defining column ADs property name
- dwReserved: DWORD; // reserved field
- end;
- {$EXTERNALSYM DSCOLUMN}
- TDsColumn = DSCOLUMN;
- PDsColumn = LPDSCOLUMN;
-
- LPDSQUERYPARAMS = ^DSQUERYPARAMS;
- {$EXTERNALSYM LPDSQUERYPARAMS}
- DSQUERYPARAMS = record
- cbStruct: DWORD;
- dwFlags: DWORD;
- hInstance: HINSTANCE; // instance handle used for string extraction
- offsetQuery: LONG; // offset to LDAP filter string
- iColumns: LONG; // column count
- dwReserved: DWORD; // reserved field for this query
- aColumns: array [0..0] of DSCOLUMN; // array of column descriptions
- end;
- {$EXTERNALSYM DSQUERYPARAMS}
- TDsQueryParams = DSQUERYPARAMS;
- PDsQueryParams = LPDSQUERYPARAMS;
-
-//
-// CF_DSQUERYSCOPE
-// ---------------
-// A clipboard format the puts a string version of the scope into a
-// storage medium via GlobalAlloc.
-//
-
-const
- CFSTR_DSQUERYSCOPE = TEXT('DsQueryScope');
- {$EXTERNALSYM CFSTR_DSQUERYSCOPE}
-
-//
-// DSQPM_GETCLASSLIST
-// ------------------
-// This page message is sent to the form pages to retrieve the list of classes
-// that the pages are going to query from. This is used by the feild selector
-// and the property well to build its list of display classes.
-//
-
-type
- LPDSQUERYCLASSLIST = ^DSQUERYCLASSLIST;
- {$EXTERNALSYM LPDSQUERYCLASSLIST}
- DSQUERYCLASSLIST = record
- cbStruct: DWORD;
- cClasses: LONG; // number of classes in array
- offsetClass: array [0..0] of DWORD; // offset to the class names (UNICODE)
- end;
- {$EXTERNALSYM DSQUERYCLASSLIST}
- TDsQueryClassList = DSQUERYCLASSLIST;
- PDsQueryClassList = LPDSQUERYCLASSLIST;
-
-const
- DSQPM_GETCLASSLIST = CQPM_HANDLERSPECIFIC + 0; // wParam == flags, lParam = LPLPDSQUERYCLASSLIST
- {$EXTERNALSYM DSQPM_GETCLASSLIST}
-
-//
-// DSQPM_HELPTOPICS
-// ----------------
-// This page message is sent to the form pages to allow them to handle the
-// "Help Topics" verb.
-//
-
- DSQPM_HELPTOPICS = CQPM_HANDLERSPECIFIC + 1; // wParam = 0, lParam = hWnd parent
- {$EXTERNALSYM DSQPM_HELPTOPICS}
-
-implementation
-
-end.
+{******************************************************************************}
+{ }
+{ Directory Services Query API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: dsquery.h, released November 2002. The original Pascal }
+{ code is: DSQuery.pas, released March 2002. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwadsquery.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaDSQuery;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "dsquery.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaCmnQuery, JwaWinType;
+
+const
+ CLSID_DsQuery: TGUID = (D1:$8a23e65e; D2:$31c2; D3:$11d0; D4:($89, $1c, $0, $a0, $24, $ab, $2d, $bb));
+ {$EXTERNALSYM CLSID_DsQuery}
+
+//
+// standard forms shipped in dsquery.dll
+//
+
+ CLSID_DsFindObjects: TGUID = (D1:$83ee3fe1; D2:$57d9; D3:$11d0; D4:($b9, $32, $0, $a0, $24, $ab, $2d, $bb));
+ {$EXTERNALSYM CLSID_DsFindObjects}
+ CLSID_DsFindPeople: TGUID = (D1:$83ee3fe2; D2:$57d9; D3:$11d0; D4:($b9, $32, $0, $a0, $24, $ab, $2d, $bb));
+ {$EXTERNALSYM CLSID_DsFindPeople}
+ CLSID_DsFindPrinter: TGUID = (D1:$b577f070; D2:$7ee2; D3:$11d0; D4:($91, $3f, $0, $aa, $0, $c1, $6e, $65));
+ {$EXTERNALSYM CLSID_DsFindPrinter}
+ CLSID_DsFindComputer: TGUID = (D1:$16006700; D2:$87ad; D3:$11d0; D4:($91, $40, $0, $aa, $0, $c1, $6e, $65));
+ {$EXTERNALSYM CLSID_DsFindComputer}
+ CLSID_DsFindVolume: TGUID = (D1:$c1b3cbf1; D2:$886a; D3:$11d0; D4:($91, $40, $0, $aa, $0, $c1, $6e, $65));
+ {$EXTERNALSYM CLSID_DsFindVolume}
+ CLSID_DsFindContainer: TGUID = (D1:$c1b3cbf2; D2:$886a; D3:$11d0; D4:($91, $40, $0, $aa, $0, $c1, $6e, $65));
+ {$EXTERNALSYM CLSID_DsFindContainer}
+ CLSID_DsFindAdvanced: TGUID = (D1:$83ee3fe3; D2:$57d9; D3:$11d0; D4:($b9, $32, $0, $a0, $24, $ab, $2d, $bb));
+ {$EXTERNALSYM CLSID_DsFindAdvanced}
+
+//
+// admin forms
+//
+
+ CLSID_DsFindDomainController: TGUID = (D1:$538c7b7e; D2:$d25e; D3:$11d0; D4:($97, $42, $0, $a0, $c9, $6, $af, $45));
+ {$EXTERNALSYM CLSID_DsFindDomainController}
+ CLSID_DsFindFrsMembers: TGUID = (D1:$94ce4b18; D2:$b3d3; D3:$11d1; D4:($b9, $b4, $0, $c0, $4f, $d8, $d5, $b0));
+ {$EXTERNALSYM CLSID_DsFindFrsMembers}
+
+//
+// DSQUERYINITPARAMS
+// -----------------
+// This structured is used when creating a new query view.
+//
+
+const
+ DSQPF_NOSAVE = $00000001; // = 1 => remove save verb
+ {$EXTERNALSYM DSQPF_NOSAVE}
+ DSQPF_SAVELOCATION = $00000002; // = 1 => pSaveLocation contains directory to save queries into
+ {$EXTERNALSYM DSQPF_SAVELOCATION}
+ DSQPF_SHOWHIDDENOBJECTS = $00000004; // = 1 => show objects marked as "hidden" in results
+ {$EXTERNALSYM DSQPF_SHOWHIDDENOBJECTS}
+ DSQPF_ENABLEADMINFEATURES = $00000008; // = 1 => show admin verbs, property pages etc
+ {$EXTERNALSYM DSQPF_ENABLEADMINFEATURES}
+ DSQPF_ENABLEADVANCEDFEATURES = $00000010; // = 1 => set the advanced flag for the property pages
+ {$EXTERNALSYM DSQPF_ENABLEADVANCEDFEATURES}
+ DSQPF_HASCREDENTIALS = $00000020; // = 1 => pServer, pUserName & pPassword are valid
+ {$EXTERNALSYM DSQPF_HASCREDENTIALS}
+ DSQPF_NOCHOOSECOLUMNS = $00000040; // = 1 => remove choose columns from view
+ {$EXTERNALSYM DSQPF_NOCHOOSECOLUMNS}
+
+type
+ LPDSQUERYINITPARAMS = ^DSQUERYINITPARAMS;
+ {$EXTERNALSYM LPDSQUERYINITPARAMS}
+ DSQUERYINITPARAMS = record
+ cbStruct: DWORD;
+ dwFlags: DWORD;
+ pDefaultScope: LPWSTR; // -> Active Directory path to use as scope / == NULL for none
+ pDefaultSaveLocation: LPWSTR; // -> Directory to save queries into / == NULL default location
+ pUserName: LPWSTR; // -> user name to authenticate with
+ pPassword: LPWSTR; // -> password for authentication
+ pServer: LPWSTR; // -> server to use for obtaining trusts etc
+ end;
+ {$EXTERNALSYM DSQUERYINITPARAMS}
+ TDsQueryInitParams = DSQUERYINITPARAMS;
+ PDsQueryInitParams = LPDSQUERYINITPARAMS;
+
+//
+// DSQUERYPARAMS
+// -------------
+// The DS query handle takes a packed structure which contains the
+// columns and query to be issued.
+//
+
+const
+ CFSTR_DSQUERYPARAMS = TEXT('DsQueryParameters');
+ {$EXTERNALSYM CFSTR_DSQUERYPARAMS}
+
+ DSCOLUMNPROP_ADSPATH = LONG(-1);
+ {$EXTERNALSYM DSCOLUMNPROP_ADSPATH}
+ DSCOLUMNPROP_OBJECTCLASS = LONG(-2);
+ {$EXTERNALSYM DSCOLUMNPROP_OBJECTCLASS}
+
+type
+ LPDSCOLUMN = ^DSCOLUMN;
+ {$EXTERNALSYM LPDSCOLUMN}
+ DSCOLUMN = record
+ dwFlags: DWORD; // flags for this column
+ fmt: INT; // list view form information
+ cx: INT; // default column width
+ idsName: INT; // resource ID for the column dispaly name
+ offsetProperty: LONG; // offset to BSTR defining column ADs property name
+ dwReserved: DWORD; // reserved field
+ end;
+ {$EXTERNALSYM DSCOLUMN}
+ TDsColumn = DSCOLUMN;
+ PDsColumn = LPDSCOLUMN;
+
+ LPDSQUERYPARAMS = ^DSQUERYPARAMS;
+ {$EXTERNALSYM LPDSQUERYPARAMS}
+ DSQUERYPARAMS = record
+ cbStruct: DWORD;
+ dwFlags: DWORD;
+ hInstance: HINSTANCE; // instance handle used for string extraction
+ offsetQuery: LONG; // offset to LDAP filter string
+ iColumns: LONG; // column count
+ dwReserved: DWORD; // reserved field for this query
+ aColumns: array [0..0] of DSCOLUMN; // array of column descriptions
+ end;
+ {$EXTERNALSYM DSQUERYPARAMS}
+ TDsQueryParams = DSQUERYPARAMS;
+ PDsQueryParams = LPDSQUERYPARAMS;
+
+//
+// CF_DSQUERYSCOPE
+// ---------------
+// A clipboard format the puts a string version of the scope into a
+// storage medium via GlobalAlloc.
+//
+
+const
+ CFSTR_DSQUERYSCOPE = TEXT('DsQueryScope');
+ {$EXTERNALSYM CFSTR_DSQUERYSCOPE}
+
+//
+// DSQPM_GETCLASSLIST
+// ------------------
+// This page message is sent to the form pages to retrieve the list of classes
+// that the pages are going to query from. This is used by the feild selector
+// and the property well to build its list of display classes.
+//
+
+type
+ LPDSQUERYCLASSLIST = ^DSQUERYCLASSLIST;
+ {$EXTERNALSYM LPDSQUERYCLASSLIST}
+ DSQUERYCLASSLIST = record
+ cbStruct: DWORD;
+ cClasses: LONG; // number of classes in array
+ offsetClass: array [0..0] of DWORD; // offset to the class names (UNICODE)
+ end;
+ {$EXTERNALSYM DSQUERYCLASSLIST}
+ TDsQueryClassList = DSQUERYCLASSLIST;
+ PDsQueryClassList = LPDSQUERYCLASSLIST;
+
+const
+ DSQPM_GETCLASSLIST = CQPM_HANDLERSPECIFIC + 0; // wParam == flags, lParam = LPLPDSQUERYCLASSLIST
+ {$EXTERNALSYM DSQPM_GETCLASSLIST}
+
+//
+// DSQPM_HELPTOPICS
+// ----------------
+// This page message is sent to the form pages to allow them to handle the
+// "Help Topics" verb.
+//
+
+ DSQPM_HELPTOPICS = CQPM_HANDLERSPECIFIC + 1; // wParam = 0, lParam = hWnd parent
+ {$EXTERNALSYM DSQPM_HELPTOPICS}
+
+implementation
+
+end.
diff --git a/packages/extra/winunits/jwadsrole.pas b/packages/extra/winunits/jwadsrole.pas
index a2771dacb7..6ab17d6ba2 100644
--- a/packages/extra/winunits/jwadsrole.pas
+++ b/packages/extra/winunits/jwadsrole.pas
@@ -1,216 +1,216 @@
-{******************************************************************************}
-{ }
-{ Directory Services API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: dsrole.h, released June 2000. The original Pascal }
-{ code is: DsRole.pas, released December 2000. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwadsrole.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaDSRole;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "dsrole.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaWinType;
-
-//
-// Domain information
-//
-
-type
- _DSROLE_MACHINE_ROLE = (
- DsRole_RoleStandaloneWorkstation,
- DsRole_RoleMemberWorkstation,
- DsRole_RoleStandaloneServer,
- DsRole_RoleMemberServer,
- DsRole_RoleBackupDomainController,
- DsRole_RolePrimaryDomainController);
- {$EXTERNALSYM _DSROLE_MACHINE_ROLE}
- DSROLE_MACHINE_ROLE = _DSROLE_MACHINE_ROLE;
- {$EXTERNALSYM DSROLE_MACHINE_ROLE}
- TDsRoleMachineRole = DSROLE_MACHINE_ROLE;
-
-//
-// Previous server state
-//
-
- _DSROLE_SERVER_STATE = (
- DsRoleServerUnknown,
- DsRoleServerPrimary,
- DsRoleServerBackup);
- {$EXTERNALSYM DSROLE_SERVER_STATE}
- DSROLE_SERVER_STATE = _DSROLE_SERVER_STATE;
- {$EXTERNALSYM DSROLE_SERVER_STATE}
- PDSROLE_SERVER_STATE = ^DSROLE_SERVER_STATE;
- {$EXTERNALSYM PDSROLE_SERVER_STATE}
- TDsRoleServerState = DSROLE_SERVER_STATE;
-
- _DSROLE_PRIMARY_DOMAIN_INFO_LEVEL = (
- DsRoleFiller0,
- DsRolePrimaryDomainInfoBasic,
- DsRoleUpgradeStatus,
- DsRoleOperationState);
- {$EXTERNALSYM _DSROLE_PRIMARY_DOMAIN_INFO_LEVEL}
- DSROLE_PRIMARY_DOMAIN_INFO_LEVEL = _DSROLE_PRIMARY_DOMAIN_INFO_LEVEL;
- {$EXTERNALSYM DSROLE_PRIMARY_DOMAIN_INFO_LEVEL}
- TDsRolePrimaryDomainInfoLevel = DSROLE_PRIMARY_DOMAIN_INFO_LEVEL;
-
-//
-// Flags to be used with the PRIMARY_DOMAIN_INFO_LEVEL structures below
-//
-
-const
- DSROLE_PRIMARY_DS_RUNNING = $00000001;
- {$EXTERNALSYM DSROLE_PRIMARY_DS_RUNNING}
- DSROLE_PRIMARY_DS_MIXED_MODE = $00000002;
- {$EXTERNALSYM DSROLE_PRIMARY_DS_MIXED_MODE}
- DSROLE_UPGRADE_IN_PROGRESS = $00000004;
- {$EXTERNALSYM DSROLE_UPGRADE_IN_PROGRESS}
- DSROLE_PRIMARY_DOMAIN_GUID_PRESENT = $01000000;
- {$EXTERNALSYM DSROLE_PRIMARY_DOMAIN_GUID_PRESENT}
-
-//
-// Structure that correspond to the DSROLE_PRIMARY_DOMAIN_INFO_LEVEL
-//
-
-type
- PDSROLE_PRIMARY_DOMAIN_INFO_BASIC = ^DSROLE_PRIMARY_DOMAIN_INFO_BASIC;
- {$EXTERNALSYM PDSROLE_PRIMARY_DOMAIN_INFO_BASIC}
- _DSROLE_PRIMARY_DOMAIN_INFO_BASIC = record
- MachineRole: DSROLE_MACHINE_ROLE;
- Flags: ULONG;
- DomainNameFlat: LPWSTR;
- DomainNameDns: LPWSTR;
- DomainForestName: LPWSTR;
- DomainGuid: GUID;
- end;
- {$EXTERNALSYM _DSROLE_PRIMARY_DOMAIN_INFO_BASIC}
- DSROLE_PRIMARY_DOMAIN_INFO_BASIC = _DSROLE_PRIMARY_DOMAIN_INFO_BASIC;
- {$EXTERNALSYM DSROLE_PRIMARY_DOMAIN_INFO_BASIC}
- TDsRolePrimaryDomainInfoBasic = DSROLE_PRIMARY_DOMAIN_INFO_BASIC;
- PDsRolePrimaryDomainInfoBasic = PDSROLE_PRIMARY_DOMAIN_INFO_BASIC;
-
- PDSROLE_UPGRADE_STATUS_INFO = ^DSROLE_UPGRADE_STATUS_INFO;
- {$EXTERNALSYM PDSROLE_UPGRADE_STATUS_INFO}
- _DSROLE_UPGRADE_STATUS_INFO = record
- OperationState: ULONG;
- PreviousServerState: DSROLE_SERVER_STATE;
- end;
- {$EXTERNALSYM _DSROLE_UPGRADE_STATUS_INFO}
- DSROLE_UPGRADE_STATUS_INFO = _DSROLE_UPGRADE_STATUS_INFO;
- {$EXTERNALSYM DSROLE_UPGRADE_STATUS_INFO}
- TDsRoleUpgradeStatusInfo = DSROLE_UPGRADE_STATUS_INFO;
- PDsRoleUpgradeStatusInfo = PDSROLE_UPGRADE_STATUS_INFO;
-
- _DSROLE_OPERATION_STATE = (
- DsRoleOperationIdle,
- DsRoleOperationActive,
- DsRoleOperationNeedReboot);
- {$EXTERNALSYM _DSROLE_OPERATION_STATE}
- DSROLE_OPERATION_STATE = _DSROLE_OPERATION_STATE;
- {$EXTERNALSYM DSROLE_OPERATION_STATE}
- TDsRoleOperationState = DSROLE_OPERATION_STATE;
-
- PDSROLE_OPERATION_STATE_INFO = ^DSROLE_OPERATION_STATE_INFO;
- {$EXTERNALSYM PDSROLE_OPERATION_STATE_INFO}
- _DSROLE_OPERATION_STATE_INFO = record
- OperationState: DSROLE_OPERATION_STATE;
- end;
- {$EXTERNALSYM _DSROLE_OPERATION_STATE_INFO}
- DSROLE_OPERATION_STATE_INFO = _DSROLE_OPERATION_STATE_INFO;
- {$EXTERNALSYM DSROLE_OPERATION_STATE_INFO}
- TDsRoleOperationStateInfo = DSROLE_OPERATION_STATE_INFO;
- PDsRoleOperationStateInfo = PDSROLE_OPERATION_STATE_INFO;
-
-function DsRoleGetPrimaryDomainInformation(lpServer: LPCWSTR;
- InfoLevel: DSROLE_PRIMARY_DOMAIN_INFO_LEVEL; var Buffer: PVOID): DWORD; stdcall;
-{$EXTERNALSYM DsRoleGetPrimaryDomainInformation}
-
-procedure DsRoleFreeMemory(Buffer: PVOID); stdcall;
-{$EXTERNALSYM DsRoleFreeMemory}
-
-implementation
-
-const
- netapi32 = 'netapi32.dll';
-
-{$IFDEF DYNAMIC_LINK}
-
-var
- _DsRoleGetPrimaryDomainInfo: Pointer;
-
-function DsRoleGetPrimaryDomainInformation;
-begin
- GetProcedureAddress(_DsRoleGetPrimaryDomainInfo, netapi32, 'DsRoleGetPrimaryDomainInformation');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsRoleGetPrimaryDomainInfo]
- end;
-end;
-
-var
- _DsRoleFreeMemory: Pointer;
-
-procedure DsRoleFreeMemory;
-begin
- GetProcedureAddress(_DsRoleFreeMemory, netapi32, 'DsRoleFreeMemory');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsRoleFreeMemory]
- end;
-end;
-
-{$ELSE}
-
-function DsRoleGetPrimaryDomainInformation; external netapi32 name 'DsRoleGetPrimaryDomainInformation';
-procedure DsRoleFreeMemory; external netapi32 name 'DsRoleFreeMemory';
-
-{$ENDIF DYNAMIC_LINK}
-
-end.
+{******************************************************************************}
+{ }
+{ Directory Services API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: dsrole.h, released June 2000. The original Pascal }
+{ code is: DsRole.pas, released December 2000. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwadsrole.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaDSRole;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "dsrole.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaWinType;
+
+//
+// Domain information
+//
+
+type
+ _DSROLE_MACHINE_ROLE = (
+ DsRole_RoleStandaloneWorkstation,
+ DsRole_RoleMemberWorkstation,
+ DsRole_RoleStandaloneServer,
+ DsRole_RoleMemberServer,
+ DsRole_RoleBackupDomainController,
+ DsRole_RolePrimaryDomainController);
+ {$EXTERNALSYM _DSROLE_MACHINE_ROLE}
+ DSROLE_MACHINE_ROLE = _DSROLE_MACHINE_ROLE;
+ {$EXTERNALSYM DSROLE_MACHINE_ROLE}
+ TDsRoleMachineRole = DSROLE_MACHINE_ROLE;
+
+//
+// Previous server state
+//
+
+ _DSROLE_SERVER_STATE = (
+ DsRoleServerUnknown,
+ DsRoleServerPrimary,
+ DsRoleServerBackup);
+ {$EXTERNALSYM DSROLE_SERVER_STATE}
+ DSROLE_SERVER_STATE = _DSROLE_SERVER_STATE;
+ {$EXTERNALSYM DSROLE_SERVER_STATE}
+ PDSROLE_SERVER_STATE = ^DSROLE_SERVER_STATE;
+ {$EXTERNALSYM PDSROLE_SERVER_STATE}
+ TDsRoleServerState = DSROLE_SERVER_STATE;
+
+ _DSROLE_PRIMARY_DOMAIN_INFO_LEVEL = (
+ DsRoleFiller0,
+ DsRolePrimaryDomainInfoBasic,
+ DsRoleUpgradeStatus,
+ DsRoleOperationState);
+ {$EXTERNALSYM _DSROLE_PRIMARY_DOMAIN_INFO_LEVEL}
+ DSROLE_PRIMARY_DOMAIN_INFO_LEVEL = _DSROLE_PRIMARY_DOMAIN_INFO_LEVEL;
+ {$EXTERNALSYM DSROLE_PRIMARY_DOMAIN_INFO_LEVEL}
+ TDsRolePrimaryDomainInfoLevel = DSROLE_PRIMARY_DOMAIN_INFO_LEVEL;
+
+//
+// Flags to be used with the PRIMARY_DOMAIN_INFO_LEVEL structures below
+//
+
+const
+ DSROLE_PRIMARY_DS_RUNNING = $00000001;
+ {$EXTERNALSYM DSROLE_PRIMARY_DS_RUNNING}
+ DSROLE_PRIMARY_DS_MIXED_MODE = $00000002;
+ {$EXTERNALSYM DSROLE_PRIMARY_DS_MIXED_MODE}
+ DSROLE_UPGRADE_IN_PROGRESS = $00000004;
+ {$EXTERNALSYM DSROLE_UPGRADE_IN_PROGRESS}
+ DSROLE_PRIMARY_DOMAIN_GUID_PRESENT = $01000000;
+ {$EXTERNALSYM DSROLE_PRIMARY_DOMAIN_GUID_PRESENT}
+
+//
+// Structure that correspond to the DSROLE_PRIMARY_DOMAIN_INFO_LEVEL
+//
+
+type
+ PDSROLE_PRIMARY_DOMAIN_INFO_BASIC = ^DSROLE_PRIMARY_DOMAIN_INFO_BASIC;
+ {$EXTERNALSYM PDSROLE_PRIMARY_DOMAIN_INFO_BASIC}
+ _DSROLE_PRIMARY_DOMAIN_INFO_BASIC = record
+ MachineRole: DSROLE_MACHINE_ROLE;
+ Flags: ULONG;
+ DomainNameFlat: LPWSTR;
+ DomainNameDns: LPWSTR;
+ DomainForestName: LPWSTR;
+ DomainGuid: GUID;
+ end;
+ {$EXTERNALSYM _DSROLE_PRIMARY_DOMAIN_INFO_BASIC}
+ DSROLE_PRIMARY_DOMAIN_INFO_BASIC = _DSROLE_PRIMARY_DOMAIN_INFO_BASIC;
+ {$EXTERNALSYM DSROLE_PRIMARY_DOMAIN_INFO_BASIC}
+ TDsRolePrimaryDomainInfoBasic = DSROLE_PRIMARY_DOMAIN_INFO_BASIC;
+ PDsRolePrimaryDomainInfoBasic = PDSROLE_PRIMARY_DOMAIN_INFO_BASIC;
+
+ PDSROLE_UPGRADE_STATUS_INFO = ^DSROLE_UPGRADE_STATUS_INFO;
+ {$EXTERNALSYM PDSROLE_UPGRADE_STATUS_INFO}
+ _DSROLE_UPGRADE_STATUS_INFO = record
+ OperationState: ULONG;
+ PreviousServerState: DSROLE_SERVER_STATE;
+ end;
+ {$EXTERNALSYM _DSROLE_UPGRADE_STATUS_INFO}
+ DSROLE_UPGRADE_STATUS_INFO = _DSROLE_UPGRADE_STATUS_INFO;
+ {$EXTERNALSYM DSROLE_UPGRADE_STATUS_INFO}
+ TDsRoleUpgradeStatusInfo = DSROLE_UPGRADE_STATUS_INFO;
+ PDsRoleUpgradeStatusInfo = PDSROLE_UPGRADE_STATUS_INFO;
+
+ _DSROLE_OPERATION_STATE = (
+ DsRoleOperationIdle,
+ DsRoleOperationActive,
+ DsRoleOperationNeedReboot);
+ {$EXTERNALSYM _DSROLE_OPERATION_STATE}
+ DSROLE_OPERATION_STATE = _DSROLE_OPERATION_STATE;
+ {$EXTERNALSYM DSROLE_OPERATION_STATE}
+ TDsRoleOperationState = DSROLE_OPERATION_STATE;
+
+ PDSROLE_OPERATION_STATE_INFO = ^DSROLE_OPERATION_STATE_INFO;
+ {$EXTERNALSYM PDSROLE_OPERATION_STATE_INFO}
+ _DSROLE_OPERATION_STATE_INFO = record
+ OperationState: DSROLE_OPERATION_STATE;
+ end;
+ {$EXTERNALSYM _DSROLE_OPERATION_STATE_INFO}
+ DSROLE_OPERATION_STATE_INFO = _DSROLE_OPERATION_STATE_INFO;
+ {$EXTERNALSYM DSROLE_OPERATION_STATE_INFO}
+ TDsRoleOperationStateInfo = DSROLE_OPERATION_STATE_INFO;
+ PDsRoleOperationStateInfo = PDSROLE_OPERATION_STATE_INFO;
+
+function DsRoleGetPrimaryDomainInformation(lpServer: LPCWSTR;
+ InfoLevel: DSROLE_PRIMARY_DOMAIN_INFO_LEVEL; var Buffer: PVOID): DWORD; stdcall;
+{$EXTERNALSYM DsRoleGetPrimaryDomainInformation}
+
+procedure DsRoleFreeMemory(Buffer: PVOID); stdcall;
+{$EXTERNALSYM DsRoleFreeMemory}
+
+implementation
+
+const
+ netapi32 = 'netapi32.dll';
+
+{$IFDEF DYNAMIC_LINK}
+
+var
+ _DsRoleGetPrimaryDomainInfo: Pointer;
+
+function DsRoleGetPrimaryDomainInformation;
+begin
+ GetProcedureAddress(_DsRoleGetPrimaryDomainInfo, netapi32, 'DsRoleGetPrimaryDomainInformation');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsRoleGetPrimaryDomainInfo]
+ end;
+end;
+
+var
+ _DsRoleFreeMemory: Pointer;
+
+procedure DsRoleFreeMemory;
+begin
+ GetProcedureAddress(_DsRoleFreeMemory, netapi32, 'DsRoleFreeMemory');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsRoleFreeMemory]
+ end;
+end;
+
+{$ELSE}
+
+function DsRoleGetPrimaryDomainInformation; external netapi32 name 'DsRoleGetPrimaryDomainInformation';
+procedure DsRoleFreeMemory; external netapi32 name 'DsRoleFreeMemory';
+
+{$ENDIF DYNAMIC_LINK}
+
+end.
diff --git a/packages/extra/winunits/jwadssec.pas b/packages/extra/winunits/jwadssec.pas
index 4f7813161a..c9fec55283 100644
--- a/packages/extra/winunits/jwadssec.pas
+++ b/packages/extra/winunits/jwadssec.pas
@@ -1,175 +1,175 @@
-{******************************************************************************}
-{ }
-{ AD Security Property Pages API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: dssec.h, released Feb 2003. The original Pascal }
-{ code is: DsSec.pas, released December 2003. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwadssec.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaDsSec;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "dssec.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaWinType, JwaWinNT, JwaPrSht;
-
-//+---------------------------------------------------------------------------
-//
-// Function: PFNREADOBJECTSECURITY
-//
-// Synopsis: Reads the security descriptor of a DS object
-//
-// Arguments: [IN LPCWSTR] -- ADS path of DS Object
-// [IN SECURITY_INFORMATION] -- Which SD parts to read
-// [OUT PSECURITY_DESCRIPTOR*] -- Return SD here. Caller frees with LocalFree
-// [IN LPARAM] -- Context param
-//
-// Return: HRESULT
-//
-//----------------------------------------------------------------------------
-//
-// Function: PFNWRITEOBJECTSECURITY
-//
-// Synopsis: Writes a security descriptor to a DS object
-//
-// Arguments: [IN LPCWSTR] -- ADS path of DS Object
-// [IN SECURITY_INFORMATION] -- Which SD parts to write
-// [OUT PSECURITY_DESCRIPTOR] -- Security descriptor to write
-// [IN LPARAM] -- Context param
-//
-// Return: HRESULT
-//
-//----------------------------------------------------------------------------
-
-type
- PFNREADOBJECTSECURITY = function(p1: LPCWSTR; p2: SECURITY_INFORMATION; p3: PPSECURITY_DESCRIPTOR; p4: LPARAM): HRESULT; stdcall;
- {$EXTERNALSYM PFNREADOBJECTSECURITY}
- PFNWRITEOBJECTSECURITY = function(p1: LPCWSTR; p2: SECURITY_INFORMATION; p3: PSECURITY_DESCRIPTOR; p4: LPARAM): HRESULT; stdcall;
- {$EXTERNALSYM PFNWRITEOBJECTSECURITY}
-
-const
- DSSI_READ_ONLY = $00000001;
- {$EXTERNALSYM DSSI_READ_ONLY}
- DSSI_NO_ACCESS_CHECK = $00000002;
- {$EXTERNALSYM DSSI_NO_ACCESS_CHECK}
- DSSI_NO_EDIT_SACL = $00000004;
- {$EXTERNALSYM DSSI_NO_EDIT_SACL}
- DSSI_NO_EDIT_OWNER = $00000008;
- {$EXTERNALSYM DSSI_NO_EDIT_OWNER}
- DSSI_IS_ROOT = $00000010;
- {$EXTERNALSYM DSSI_IS_ROOT}
- DSSI_NO_FILTER = $00000020;
- {$EXTERNALSYM DSSI_NO_FILTER}
- DSSI_NO_READONLY_MESSAGE = $00000040;
- {$EXTERNALSYM DSSI_NO_READONLY_MESSAGE}
-
-//+---------------------------------------------------------------------------
-//
-// Function: DSCreateSecurityPage
-//
-// Synopsis: Creates a Security property page for a DS object
-//
-// Arguments: [IN pwszObjectPath] -- Full ADS path of DS object
-// [IN pwszObjectClass] -- Class of the object (optional)
-// [IN dwFlags] -- Combination of DSSI_* flags
-// [OUT phPage] -- HPROPSHEETPAGE returned here
-// [IN pfnReadSD] -- Optional function for reading SD
-// [IN pfnWriteSD] -- Optional function for writing SD
-// [IN LPARAM] -- Passed to pfnReadSD/pfnWriteSD
-//
-// Return: HRESULT
-//
-//----------------------------------------------------------------------------
-
-function DSCreateSecurityPage(
- pwszObjectPath: LPCWSTR;
- pwszObjectClass: LPCWSTR;
- dwFlags: DWORD;
- out phPage: HPROPSHEETPAGE;
- pfnReadSD: PFNREADOBJECTSECURITY;
- pfnWriteSD: PFNWRITEOBJECTSECURITY;
- lpContext:LPARAM): HRESULT; stdcall;
-{$EXTERNALSYM DSCreateSecurityPage}
-
-type
- PFNDSCREATESECPAGE = function(
- pwszObjectPath: LPCWSTR;
- pwszObjectClass: LPCWSTR;
- dwFlags: DWORD;
- out phPage: HPROPSHEETPAGE;
- pfnReadSD: PFNREADOBJECTSECURITY;
- pfnWriteSD: PFNWRITEOBJECTSECURITY;
- lpContext:LPARAM): HRESULT; stdcall;
- {$EXTERNALSYM PFNDSCREATESECPAGE}
-
-implementation
-
-const
- dssec = 'dssec.dll';
-
-{$IFDEF DYNAMIC_LINK}
-
-var
- _DSCreateSecurityPage: Pointer;
-
-function DSCreateSecurityPage;
-begin
- GetProcedureAddress(_DSCreateSecurityPage, dssec, 'DSCreateSecurityPage');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DSCreateSecurityPage]
- end;
-end;
-
-{$ELSE}
-
-function DSCreateSecurityPage; external dssec name 'DSCreateSecurityPage';
-
-{$ENDIF DYNAMIC_LINK}
-
-end.
+{******************************************************************************}
+{ }
+{ AD Security Property Pages API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: dssec.h, released Feb 2003. The original Pascal }
+{ code is: DsSec.pas, released December 2003. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwadssec.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaDsSec;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "dssec.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaWinType, JwaWinNT, JwaPrSht;
+
+//+---------------------------------------------------------------------------
+//
+// Function: PFNREADOBJECTSECURITY
+//
+// Synopsis: Reads the security descriptor of a DS object
+//
+// Arguments: [IN LPCWSTR] -- ADS path of DS Object
+// [IN SECURITY_INFORMATION] -- Which SD parts to read
+// [OUT PSECURITY_DESCRIPTOR*] -- Return SD here. Caller frees with LocalFree
+// [IN LPARAM] -- Context param
+//
+// Return: HRESULT
+//
+//----------------------------------------------------------------------------
+//
+// Function: PFNWRITEOBJECTSECURITY
+//
+// Synopsis: Writes a security descriptor to a DS object
+//
+// Arguments: [IN LPCWSTR] -- ADS path of DS Object
+// [IN SECURITY_INFORMATION] -- Which SD parts to write
+// [OUT PSECURITY_DESCRIPTOR] -- Security descriptor to write
+// [IN LPARAM] -- Context param
+//
+// Return: HRESULT
+//
+//----------------------------------------------------------------------------
+
+type
+ PFNREADOBJECTSECURITY = function(p1: LPCWSTR; p2: SECURITY_INFORMATION; p3: PPSECURITY_DESCRIPTOR; p4: LPARAM): HRESULT; stdcall;
+ {$EXTERNALSYM PFNREADOBJECTSECURITY}
+ PFNWRITEOBJECTSECURITY = function(p1: LPCWSTR; p2: SECURITY_INFORMATION; p3: PSECURITY_DESCRIPTOR; p4: LPARAM): HRESULT; stdcall;
+ {$EXTERNALSYM PFNWRITEOBJECTSECURITY}
+
+const
+ DSSI_READ_ONLY = $00000001;
+ {$EXTERNALSYM DSSI_READ_ONLY}
+ DSSI_NO_ACCESS_CHECK = $00000002;
+ {$EXTERNALSYM DSSI_NO_ACCESS_CHECK}
+ DSSI_NO_EDIT_SACL = $00000004;
+ {$EXTERNALSYM DSSI_NO_EDIT_SACL}
+ DSSI_NO_EDIT_OWNER = $00000008;
+ {$EXTERNALSYM DSSI_NO_EDIT_OWNER}
+ DSSI_IS_ROOT = $00000010;
+ {$EXTERNALSYM DSSI_IS_ROOT}
+ DSSI_NO_FILTER = $00000020;
+ {$EXTERNALSYM DSSI_NO_FILTER}
+ DSSI_NO_READONLY_MESSAGE = $00000040;
+ {$EXTERNALSYM DSSI_NO_READONLY_MESSAGE}
+
+//+---------------------------------------------------------------------------
+//
+// Function: DSCreateSecurityPage
+//
+// Synopsis: Creates a Security property page for a DS object
+//
+// Arguments: [IN pwszObjectPath] -- Full ADS path of DS object
+// [IN pwszObjectClass] -- Class of the object (optional)
+// [IN dwFlags] -- Combination of DSSI_* flags
+// [OUT phPage] -- HPROPSHEETPAGE returned here
+// [IN pfnReadSD] -- Optional function for reading SD
+// [IN pfnWriteSD] -- Optional function for writing SD
+// [IN LPARAM] -- Passed to pfnReadSD/pfnWriteSD
+//
+// Return: HRESULT
+//
+//----------------------------------------------------------------------------
+
+function DSCreateSecurityPage(
+ pwszObjectPath: LPCWSTR;
+ pwszObjectClass: LPCWSTR;
+ dwFlags: DWORD;
+ out phPage: HPROPSHEETPAGE;
+ pfnReadSD: PFNREADOBJECTSECURITY;
+ pfnWriteSD: PFNWRITEOBJECTSECURITY;
+ lpContext:LPARAM): HRESULT; stdcall;
+{$EXTERNALSYM DSCreateSecurityPage}
+
+type
+ PFNDSCREATESECPAGE = function(
+ pwszObjectPath: LPCWSTR;
+ pwszObjectClass: LPCWSTR;
+ dwFlags: DWORD;
+ out phPage: HPROPSHEETPAGE;
+ pfnReadSD: PFNREADOBJECTSECURITY;
+ pfnWriteSD: PFNWRITEOBJECTSECURITY;
+ lpContext:LPARAM): HRESULT; stdcall;
+ {$EXTERNALSYM PFNDSCREATESECPAGE}
+
+implementation
+
+const
+ dssec = 'dssec.dll';
+
+{$IFDEF DYNAMIC_LINK}
+
+var
+ _DSCreateSecurityPage: Pointer;
+
+function DSCreateSecurityPage;
+begin
+ GetProcedureAddress(_DSCreateSecurityPage, dssec, 'DSCreateSecurityPage');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DSCreateSecurityPage]
+ end;
+end;
+
+{$ELSE}
+
+function DSCreateSecurityPage; external dssec name 'DSCreateSecurityPage';
+
+{$ENDIF DYNAMIC_LINK}
+
+end.
diff --git a/packages/extra/winunits/jwaerrorrep.pas b/packages/extra/winunits/jwaerrorrep.pas
index 50f8752145..cf51f28466 100644
--- a/packages/extra/winunits/jwaerrorrep.pas
+++ b/packages/extra/winunits/jwaerrorrep.pas
@@ -1,168 +1,168 @@
-{******************************************************************************}
-{ }
-{ Windows Error Reporting API interface unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: errorrep.h, released June 2000. The original Pascal }
-{ code is: ErrorRep.pas, released December 2000. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwaerrorrep.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaErrorRep;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "errorrep.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaWinBase, JwaWinType;
-
-type
- tagEFaultRepRetVal = (
- frrvOk,
- frrvOkManifest,
- frrvOkQueued,
- frrvErr,
- frrvErrNoDW,
- frrvErrTimeout,
- frrvLaunchDebugger,
- frrvOkHeadless);
- {$EXTERNALSYM tagEFaultRepRetVal}
- EFaultRepRetVal = tagEFaultRepRetVal;
- {$EXTERNALSYM EFaultRepRetVal}
-
-function ReportFault(pep: LPEXCEPTION_POINTERS; dwOpt: DWORD): EFaultRepRetVal; stdcall;
-{$EXTERNALSYM ReportFault}
-function AddERExcludedApplicationA(szApplication: LPCSTR): BOOL; stdcall;
-{$EXTERNALSYM AddERExcludedApplicationA}
-function AddERExcludedApplicationW(wszApplication: LPCWSTR): BOOL; stdcall;
-{$EXTERNALSYM AddERExcludedApplicationW}
-
-type
- pfn_REPORTFAULT = function(pep: LPEXCEPTION_POINTERS; dwOpt: DWORD): EFaultRepRetVal; stdcall;
- {$EXTERNALSYM pfn_REPORTFAULT}
- pfn_ADDEREXCLUDEDAPPLICATIONA = function(szApplication: LPCSTR): BOOL; stdcall;
- {$EXTERNALSYM pfn_ADDEREXCLUDEDAPPLICATIONA}
- pfn_ADDEREXCLUDEDAPPLICATIONW = function(wszApplication: LPCWSTR): BOOL; stdcall;
- {$EXTERNALSYM pfn_ADDEREXCLUDEDAPPLICATIONW}
-
-function AddERExcludedApplication(wszApplication: LPCTSTR): BOOL; stdcall;
-{$EXTERNALSYM AddERExcludedApplication}
-type
- pfn_ADDEREXCLUDEDAPPLICATION = pfn_ADDEREXCLUDEDAPPLICATIONW;
- {$EXTERNALSYM pfn_ADDEREXCLUDEDAPPLICATION}
-
-implementation
-
-const
- faultreplib = 'faultrep.dll';
- {$IFDEF UNICODE}
- AWSuffix = 'W';
- {$ELSE}
- AWSuffix = 'A';
- {$ENDIF UNICODE}
-
-{$IFDEF DYNAMIC_LINK}
-
-var
- _ReportFault: Pointer;
-
-function ReportFault;
-begin
- GetProcedureAddress(_ReportFault, faultreplib, 'ReportFault');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ReportFault]
- end;
-end;
-
-var
- _AddERExcludedApplicationA: Pointer;
-
-function AddERExcludedApplicationA;
-begin
- GetProcedureAddress(_AddERExcludedApplicationA, faultreplib, 'AddERExcludedApplicationA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_AddERExcludedApplicationA]
- end;
-end;
-
-var
- _AddERExcludedApplicationW: Pointer;
-
-function AddERExcludedApplicationW;
-begin
- GetProcedureAddress(_AddERExcludedApplicationW, faultreplib, 'AddERExcludedApplicationW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_AddERExcludedApplicationW]
- end;
-end;
-
-var
- _AddERExcludedApplication: Pointer;
-
-function AddERExcludedApplication;
-begin
- GetProcedureAddress(_AddERExcludedApplication, faultreplib, 'AddERExcludedApplication' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_AddERExcludedApplication]
- end;
-end;
-
-{$ELSE}
-
-function ReportFault; external faultreplib name 'ReportFault';
-function AddERExcludedApplicationA; external faultreplib name 'AddERExcludedApplicationA';
-function AddERExcludedApplicationW; external faultreplib name 'AddERExcludedApplicationW';
-function AddERExcludedApplication; external faultreplib name 'AddERExcludedApplication' + AWSuffix;
-
-{$ENDIF DYNAMIC_LINK}
-
-end.
+{******************************************************************************}
+{ }
+{ Windows Error Reporting API interface unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: errorrep.h, released June 2000. The original Pascal }
+{ code is: ErrorRep.pas, released December 2000. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwaerrorrep.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaErrorRep;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "errorrep.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaWinBase, JwaWinType;
+
+type
+ tagEFaultRepRetVal = (
+ frrvOk,
+ frrvOkManifest,
+ frrvOkQueued,
+ frrvErr,
+ frrvErrNoDW,
+ frrvErrTimeout,
+ frrvLaunchDebugger,
+ frrvOkHeadless);
+ {$EXTERNALSYM tagEFaultRepRetVal}
+ EFaultRepRetVal = tagEFaultRepRetVal;
+ {$EXTERNALSYM EFaultRepRetVal}
+
+function ReportFault(pep: LPEXCEPTION_POINTERS; dwOpt: DWORD): EFaultRepRetVal; stdcall;
+{$EXTERNALSYM ReportFault}
+function AddERExcludedApplicationA(szApplication: LPCSTR): BOOL; stdcall;
+{$EXTERNALSYM AddERExcludedApplicationA}
+function AddERExcludedApplicationW(wszApplication: LPCWSTR): BOOL; stdcall;
+{$EXTERNALSYM AddERExcludedApplicationW}
+
+type
+ pfn_REPORTFAULT = function(pep: LPEXCEPTION_POINTERS; dwOpt: DWORD): EFaultRepRetVal; stdcall;
+ {$EXTERNALSYM pfn_REPORTFAULT}
+ pfn_ADDEREXCLUDEDAPPLICATIONA = function(szApplication: LPCSTR): BOOL; stdcall;
+ {$EXTERNALSYM pfn_ADDEREXCLUDEDAPPLICATIONA}
+ pfn_ADDEREXCLUDEDAPPLICATIONW = function(wszApplication: LPCWSTR): BOOL; stdcall;
+ {$EXTERNALSYM pfn_ADDEREXCLUDEDAPPLICATIONW}
+
+function AddERExcludedApplication(wszApplication: LPCTSTR): BOOL; stdcall;
+{$EXTERNALSYM AddERExcludedApplication}
+type
+ pfn_ADDEREXCLUDEDAPPLICATION = pfn_ADDEREXCLUDEDAPPLICATIONW;
+ {$EXTERNALSYM pfn_ADDEREXCLUDEDAPPLICATION}
+
+implementation
+
+const
+ faultreplib = 'faultrep.dll';
+ {$IFDEF UNICODE}
+ AWSuffix = 'W';
+ {$ELSE}
+ AWSuffix = 'A';
+ {$ENDIF UNICODE}
+
+{$IFDEF DYNAMIC_LINK}
+
+var
+ _ReportFault: Pointer;
+
+function ReportFault;
+begin
+ GetProcedureAddress(_ReportFault, faultreplib, 'ReportFault');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ReportFault]
+ end;
+end;
+
+var
+ _AddERExcludedApplicationA: Pointer;
+
+function AddERExcludedApplicationA;
+begin
+ GetProcedureAddress(_AddERExcludedApplicationA, faultreplib, 'AddERExcludedApplicationA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_AddERExcludedApplicationA]
+ end;
+end;
+
+var
+ _AddERExcludedApplicationW: Pointer;
+
+function AddERExcludedApplicationW;
+begin
+ GetProcedureAddress(_AddERExcludedApplicationW, faultreplib, 'AddERExcludedApplicationW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_AddERExcludedApplicationW]
+ end;
+end;
+
+var
+ _AddERExcludedApplication: Pointer;
+
+function AddERExcludedApplication;
+begin
+ GetProcedureAddress(_AddERExcludedApplication, faultreplib, 'AddERExcludedApplication' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_AddERExcludedApplication]
+ end;
+end;
+
+{$ELSE}
+
+function ReportFault; external faultreplib name 'ReportFault';
+function AddERExcludedApplicationA; external faultreplib name 'AddERExcludedApplicationA';
+function AddERExcludedApplicationW; external faultreplib name 'AddERExcludedApplicationW';
+function AddERExcludedApplication; external faultreplib name 'AddERExcludedApplication' + AWSuffix;
+
+{$ENDIF DYNAMIC_LINK}
+
+end.
diff --git a/packages/extra/winunits/jwaexcpt.pas b/packages/extra/winunits/jwaexcpt.pas
index fea37f8858..38d708254d 100644
--- a/packages/extra/winunits/jwaexcpt.pas
+++ b/packages/extra/winunits/jwaexcpt.pas
@@ -1,93 +1,93 @@
-{******************************************************************************}
-{ }
-{ C/C++ SEH Intrinsics interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: excpt.h, released August 2001. The original Pascal }
-{ code is: Excpt.pas, released December 2000. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwaexcpt.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaExcpt;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "excpt.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaWinType;
-
-// This file contains the definitions and prototypes for the compiler-
-// dependent intrinsics, support functions and keywords which implement
-// the structured exception handling extensions.
-
-//
-// Exception disposition return values.
-//
-
-type
- _EXCEPTION_DISPOSITION = (
- ExceptionContinueExecution,
- ExceptionContinueSearch,
- ExceptionNestedException,
- ExceptionCollidedUnwind);
- {$EXTERNALSYM _EXCEPTION_DISPOSITION}
- EXCEPTION_DISPOSITION = _EXCEPTION_DISPOSITION;
- {$EXTERNALSYM EXCEPTION_DISPOSITION}
- TExceptionDisposition = EXCEPTION_DISPOSITION;
-
-//
-// Legal values for expression in except().
-//
-
-const
- EXCEPTION_EXECUTE_HANDLER = 1;
- {$EXTERNALSYM EXCEPTION_EXECUTE_HANDLER}
- EXCEPTION_CONTINUE_SEARCH = 0;
- {$EXTERNALSYM EXCEPTION_CONTINUE_SEARCH}
- EXCEPTION_CONTINUE_EXECUTION = DWORD(-1);
- {$EXTERNALSYM EXCEPTION_CONTINUE_EXECUTION}
-
-implementation
-
-end.
+{******************************************************************************}
+{ }
+{ C/C++ SEH Intrinsics interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: excpt.h, released August 2001. The original Pascal }
+{ code is: Excpt.pas, released December 2000. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwaexcpt.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaExcpt;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "excpt.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaWinType;
+
+// This file contains the definitions and prototypes for the compiler-
+// dependent intrinsics, support functions and keywords which implement
+// the structured exception handling extensions.
+
+//
+// Exception disposition return values.
+//
+
+type
+ _EXCEPTION_DISPOSITION = (
+ ExceptionContinueExecution,
+ ExceptionContinueSearch,
+ ExceptionNestedException,
+ ExceptionCollidedUnwind);
+ {$EXTERNALSYM _EXCEPTION_DISPOSITION}
+ EXCEPTION_DISPOSITION = _EXCEPTION_DISPOSITION;
+ {$EXTERNALSYM EXCEPTION_DISPOSITION}
+ TExceptionDisposition = EXCEPTION_DISPOSITION;
+
+//
+// Legal values for expression in except().
+//
+
+const
+ EXCEPTION_EXECUTE_HANDLER = 1;
+ {$EXTERNALSYM EXCEPTION_EXECUTE_HANDLER}
+ EXCEPTION_CONTINUE_SEARCH = 0;
+ {$EXTERNALSYM EXCEPTION_CONTINUE_SEARCH}
+ EXCEPTION_CONTINUE_EXECUTION = DWORD(-1);
+ {$EXTERNALSYM EXCEPTION_CONTINUE_EXECUTION}
+
+implementation
+
+end.
diff --git a/packages/extra/winunits/jwafaxdev.pas b/packages/extra/winunits/jwafaxdev.pas
index 62a0a65e36..b39ab67c26 100644
--- a/packages/extra/winunits/jwafaxdev.pas
+++ b/packages/extra/winunits/jwafaxdev.pas
@@ -1,207 +1,207 @@
-{******************************************************************************}
-{ }
-{ Fax Device Provider API interface unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: faxdev.h, released November 2001. The original Pascal }
-{ code is: FaxDev.pas, released April 2002. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwafaxdev.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaFaxDev;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "faxdev.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaWinType, JwaPrSht;
-
-//
-// FAX status constants
-//
-
-const
- FS_INITIALIZING = $20000000;
- {$EXTERNALSYM FS_INITIALIZING}
- FS_DIALING = $20000001;
- {$EXTERNALSYM FS_DIALING}
- FS_TRANSMITTING = $20000002;
- {$EXTERNALSYM FS_TRANSMITTING}
- FS_RECEIVING = $20000004;
- {$EXTERNALSYM FS_RECEIVING}
- FS_COMPLETED = $20000008;
- {$EXTERNALSYM FS_COMPLETED}
- FS_HANDLED = $20000010;
- {$EXTERNALSYM FS_HANDLED}
- FS_LINE_UNAVAILABLE = $20000020;
- {$EXTERNALSYM FS_LINE_UNAVAILABLE}
- FS_BUSY = $20000040;
- {$EXTERNALSYM FS_BUSY}
- FS_NO_ANSWER = $20000080;
- {$EXTERNALSYM FS_NO_ANSWER}
- FS_BAD_ADDRESS = $20000100;
- {$EXTERNALSYM FS_BAD_ADDRESS}
- FS_NO_DIAL_TONE = $20000200;
- {$EXTERNALSYM FS_NO_DIAL_TONE}
- FS_DISCONNECTED = $20000400;
- {$EXTERNALSYM FS_DISCONNECTED}
- FS_FATAL_ERROR = $20000800;
- {$EXTERNALSYM FS_FATAL_ERROR}
- FS_NOT_FAX_CALL = $20001000;
- {$EXTERNALSYM FS_NOT_FAX_CALL}
- FS_CALL_DELAYED = $20002000;
- {$EXTERNALSYM FS_CALL_DELAYED}
- FS_CALL_BLACKLISTED = $20004000;
- {$EXTERNALSYM FS_CALL_BLACKLISTED}
- FS_USER_ABORT = $20200000;
- {$EXTERNALSYM FS_USER_ABORT}
- FS_ANSWERED = $20800000;
- {$EXTERNALSYM FS_ANSWERED}
-
-//
-// data structures
-//
-
-type
- HCALL = HANDLE; // todo from TAPI
-
- PFAX_SEND = ^FAX_SEND;
- {$EXTERNALSYM PFAX_SEND}
- _FAX_SEND = record
- SizeOfStruct: DWORD;
- FileName: LPWSTR;
- CallerName: LPWSTR;
- CallerNumber: LPWSTR;
- ReceiverName: LPWSTR;
- ReceiverNumber: LPWSTR;
- Branding: BOOL;
- CallHandle: HCALL;
- Reserved: array [0..2] of DWORD;
- end;
- {$EXTERNALSYM _FAX_SEND}
- FAX_SEND = _FAX_SEND;
- {$EXTERNALSYM FAX_SEND}
- TFaxSend = FAX_SEND;
- PFaxSend = PFAX_SEND;
-
- PFAX_RECEIVE = ^FAX_RECEIVE;
- {$EXTERNALSYM PFAX_RECEIVE}
- _FAX_RECEIVE = record
- SizeOfStruct: DWORD;
- FileName: LPWSTR;
- ReceiverName: LPWSTR;
- ReceiverNumber: LPWSTR;
- Reserved: array [0..3] of DWORD;
- end;
- {$EXTERNALSYM _FAX_RECEIVE}
- FAX_RECEIVE = _FAX_RECEIVE;
- {$EXTERNALSYM FAX_RECEIVE}
- TFaxReceive = FAX_RECEIVE;
- PFaxReceive = PFAX_RECEIVE;
-
- PFAX_DEV_STATUS = ^FAX_DEV_STATUS;
- {$EXTERNALSYM PFAX_DEV_STATUS}
- _FAX_DEV_STATUS = record
- SizeOfStruct: DWORD;
- StatusId: DWORD;
- StringId: DWORD;
- PageCount: DWORD;
- CSI: LPWSTR;
- CallerId: LPWSTR;
- RoutingInfo: LPWSTR;
- ErrorCode: DWORD;
- Reserved: array [0..2] of DWORD;
- end;
- {$EXTERNALSYM _FAX_DEV_STATUS}
- FAX_DEV_STATUS = _FAX_DEV_STATUS;
- {$EXTERNALSYM FAX_DEV_STATUS}
- TFaxDevStatus = FAX_DEV_STATUS;
- PFaxDevStatus = PFAX_DEV_STATUS;
-
- PFAX_SERVICE_CALLBACK = function(FaxHandle: HANDLE; DeviceId: DWORD; Param1, Param2, Param3: DWORD_PTR): BOOL; stdcall;
- {$EXTERNALSYM PFAX_SERVICE_CALLBACK}
-
- PFAX_LINECALLBACK = procedure(FaxHandle: HANDLE; hDevice, dwMessage: DWORD; dwInstance, wParam1, dwParam2, dwParam3: DWORD_PTR); stdcall;
- {$EXTERNALSYM PFAX_LINECALLBACK}
-
-type
- PFAX_SEND_CALLBACK = function(FaxHandle: HANDLE; CallHandle: HCALL; Reserved1, Reserved2: DWORD): BOOL; stdcall;
- {$EXTERNALSYM PFAX_SEND_CALLBACK}
-
-const
- FAXDEVRECEIVE_SIZE = 4096;
- {$EXTERNALSYM FAXDEVRECEIVE_SIZE}
-
-const
- FAXDEVREPORTSTATUS_SIZE = 4096;
- {$EXTERNALSYM FAXDEVREPORTSTATUS_SIZE}
-
-type
- HLINEAPP = HANDLE; // todo from TAPI
- HLINE = HANDLE; // todo form TAPI
-
- PFAXDEVINITIALIZE = function(LineAppHandle: HLINEAPP; HeapHandle: HANDLE; out LineCallbackFunction: PFAX_LINECALLBACK; FaxServiceCallback: PFAX_SERVICE_CALLBACK): BOOL; stdcall;
- {$EXTERNALSYM PFAXDEVINITIALIZE}
- PFAXDEVSHUTDOWN = function : HRESULT; stdcall;
- {$EXTERNALSYM PFAXDEVSHUTDOWN}
- PFAXDEVVIRTUALDEVICECREATION = function(DeviceCount: LPDWORD; DeviceNamePrefix: LPWSTR; DeviceIdPrefix: LPDWORD; CompletionPort: HANDLE; CompletionKey: ULONG_PTR): BOOL; stdcall;
- {$EXTERNALSYM PFAXDEVVIRTUALDEVICECREATION}
- PFAXDEVSTARTJOB = function(LineHandle: HLINE; DeviceId: DWORD; FaxHandle: PHANDLE; CompletionPortHandle: HANDLE; CompletionKey: ULONG_PTR): BOOL; stdcall;
- {$EXTERNALSYM PFAXDEVSTARTJOB}
- PFAXDEVENDJOB = function(FaxHandle: HANDLE): BOOL; stdcall;
- {$EXTERNALSYM PFAXDEVENDJOB}
- PFAXDEVSEND = function(FaxHandle: HANDLE; FaxSend: PFAX_SEND; FaxSendCallback: PFAX_SEND_CALLBACK): BOOL; stdcall;
- {$EXTERNALSYM PFAXDEVSEND}
- PFAXDEVRECEIVE = function(FaxHandle: HANDLE; CallHandle: HCALL; FaxReceive: PFAX_RECEIVE): BOOL; stdcall;
- {$EXTERNALSYM PFAXDEVRECEIVE}
- PFAXDEVREPORTSTATUS = function(FaxHandle: HANDLE; FaxStatus: PFAX_DEV_STATUS; FaxStatusSize: DWORD; FaxStatusSizeRequired: LPDWORD): BOOL; stdcall;
- {$EXTERNALSYM PFAXDEVREPORTSTATUS}
- PFAXDEVABORTOPERATION = function(FaxHandle: HANDLE): BOOL; stdcall;
- {$EXTERNALSYM PFAXDEVABORTOPERATION}
- PFAXDEVCONFIGURE = function(out PropSheetPage: HPROPSHEETPAGE): BOOL; stdcall;
- {$EXTERNALSYM PFAXDEVCONFIGURE}
-
-implementation
-
-end.
+{******************************************************************************}
+{ }
+{ Fax Device Provider API interface unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: faxdev.h, released November 2001. The original Pascal }
+{ code is: FaxDev.pas, released April 2002. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwafaxdev.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaFaxDev;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "faxdev.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaWinType, JwaPrSht;
+
+//
+// FAX status constants
+//
+
+const
+ FS_INITIALIZING = $20000000;
+ {$EXTERNALSYM FS_INITIALIZING}
+ FS_DIALING = $20000001;
+ {$EXTERNALSYM FS_DIALING}
+ FS_TRANSMITTING = $20000002;
+ {$EXTERNALSYM FS_TRANSMITTING}
+ FS_RECEIVING = $20000004;
+ {$EXTERNALSYM FS_RECEIVING}
+ FS_COMPLETED = $20000008;
+ {$EXTERNALSYM FS_COMPLETED}
+ FS_HANDLED = $20000010;
+ {$EXTERNALSYM FS_HANDLED}
+ FS_LINE_UNAVAILABLE = $20000020;
+ {$EXTERNALSYM FS_LINE_UNAVAILABLE}
+ FS_BUSY = $20000040;
+ {$EXTERNALSYM FS_BUSY}
+ FS_NO_ANSWER = $20000080;
+ {$EXTERNALSYM FS_NO_ANSWER}
+ FS_BAD_ADDRESS = $20000100;
+ {$EXTERNALSYM FS_BAD_ADDRESS}
+ FS_NO_DIAL_TONE = $20000200;
+ {$EXTERNALSYM FS_NO_DIAL_TONE}
+ FS_DISCONNECTED = $20000400;
+ {$EXTERNALSYM FS_DISCONNECTED}
+ FS_FATAL_ERROR = $20000800;
+ {$EXTERNALSYM FS_FATAL_ERROR}
+ FS_NOT_FAX_CALL = $20001000;
+ {$EXTERNALSYM FS_NOT_FAX_CALL}
+ FS_CALL_DELAYED = $20002000;
+ {$EXTERNALSYM FS_CALL_DELAYED}
+ FS_CALL_BLACKLISTED = $20004000;
+ {$EXTERNALSYM FS_CALL_BLACKLISTED}
+ FS_USER_ABORT = $20200000;
+ {$EXTERNALSYM FS_USER_ABORT}
+ FS_ANSWERED = $20800000;
+ {$EXTERNALSYM FS_ANSWERED}
+
+//
+// data structures
+//
+
+type
+ HCALL = HANDLE; // todo from TAPI
+
+ PFAX_SEND = ^FAX_SEND;
+ {$EXTERNALSYM PFAX_SEND}
+ _FAX_SEND = record
+ SizeOfStruct: DWORD;
+ FileName: LPWSTR;
+ CallerName: LPWSTR;
+ CallerNumber: LPWSTR;
+ ReceiverName: LPWSTR;
+ ReceiverNumber: LPWSTR;
+ Branding: BOOL;
+ CallHandle: HCALL;
+ Reserved: array [0..2] of DWORD;
+ end;
+ {$EXTERNALSYM _FAX_SEND}
+ FAX_SEND = _FAX_SEND;
+ {$EXTERNALSYM FAX_SEND}
+ TFaxSend = FAX_SEND;
+ PFaxSend = PFAX_SEND;
+
+ PFAX_RECEIVE = ^FAX_RECEIVE;
+ {$EXTERNALSYM PFAX_RECEIVE}
+ _FAX_RECEIVE = record
+ SizeOfStruct: DWORD;
+ FileName: LPWSTR;
+ ReceiverName: LPWSTR;
+ ReceiverNumber: LPWSTR;
+ Reserved: array [0..3] of DWORD;
+ end;
+ {$EXTERNALSYM _FAX_RECEIVE}
+ FAX_RECEIVE = _FAX_RECEIVE;
+ {$EXTERNALSYM FAX_RECEIVE}
+ TFaxReceive = FAX_RECEIVE;
+ PFaxReceive = PFAX_RECEIVE;
+
+ PFAX_DEV_STATUS = ^FAX_DEV_STATUS;
+ {$EXTERNALSYM PFAX_DEV_STATUS}
+ _FAX_DEV_STATUS = record
+ SizeOfStruct: DWORD;
+ StatusId: DWORD;
+ StringId: DWORD;
+ PageCount: DWORD;
+ CSI: LPWSTR;
+ CallerId: LPWSTR;
+ RoutingInfo: LPWSTR;
+ ErrorCode: DWORD;
+ Reserved: array [0..2] of DWORD;
+ end;
+ {$EXTERNALSYM _FAX_DEV_STATUS}
+ FAX_DEV_STATUS = _FAX_DEV_STATUS;
+ {$EXTERNALSYM FAX_DEV_STATUS}
+ TFaxDevStatus = FAX_DEV_STATUS;
+ PFaxDevStatus = PFAX_DEV_STATUS;
+
+ PFAX_SERVICE_CALLBACK = function(FaxHandle: HANDLE; DeviceId: DWORD; Param1, Param2, Param3: DWORD_PTR): BOOL; stdcall;
+ {$EXTERNALSYM PFAX_SERVICE_CALLBACK}
+
+ PFAX_LINECALLBACK = procedure(FaxHandle: HANDLE; hDevice, dwMessage: DWORD; dwInstance, wParam1, dwParam2, dwParam3: DWORD_PTR); stdcall;
+ {$EXTERNALSYM PFAX_LINECALLBACK}
+
+type
+ PFAX_SEND_CALLBACK = function(FaxHandle: HANDLE; CallHandle: HCALL; Reserved1, Reserved2: DWORD): BOOL; stdcall;
+ {$EXTERNALSYM PFAX_SEND_CALLBACK}
+
+const
+ FAXDEVRECEIVE_SIZE = 4096;
+ {$EXTERNALSYM FAXDEVRECEIVE_SIZE}
+
+const
+ FAXDEVREPORTSTATUS_SIZE = 4096;
+ {$EXTERNALSYM FAXDEVREPORTSTATUS_SIZE}
+
+type
+ HLINEAPP = HANDLE; // todo from TAPI
+ HLINE = HANDLE; // todo form TAPI
+
+ PFAXDEVINITIALIZE = function(LineAppHandle: HLINEAPP; HeapHandle: HANDLE; out LineCallbackFunction: PFAX_LINECALLBACK; FaxServiceCallback: PFAX_SERVICE_CALLBACK): BOOL; stdcall;
+ {$EXTERNALSYM PFAXDEVINITIALIZE}
+ PFAXDEVSHUTDOWN = function : HRESULT; stdcall;
+ {$EXTERNALSYM PFAXDEVSHUTDOWN}
+ PFAXDEVVIRTUALDEVICECREATION = function(DeviceCount: LPDWORD; DeviceNamePrefix: LPWSTR; DeviceIdPrefix: LPDWORD; CompletionPort: HANDLE; CompletionKey: ULONG_PTR): BOOL; stdcall;
+ {$EXTERNALSYM PFAXDEVVIRTUALDEVICECREATION}
+ PFAXDEVSTARTJOB = function(LineHandle: HLINE; DeviceId: DWORD; FaxHandle: PHANDLE; CompletionPortHandle: HANDLE; CompletionKey: ULONG_PTR): BOOL; stdcall;
+ {$EXTERNALSYM PFAXDEVSTARTJOB}
+ PFAXDEVENDJOB = function(FaxHandle: HANDLE): BOOL; stdcall;
+ {$EXTERNALSYM PFAXDEVENDJOB}
+ PFAXDEVSEND = function(FaxHandle: HANDLE; FaxSend: PFAX_SEND; FaxSendCallback: PFAX_SEND_CALLBACK): BOOL; stdcall;
+ {$EXTERNALSYM PFAXDEVSEND}
+ PFAXDEVRECEIVE = function(FaxHandle: HANDLE; CallHandle: HCALL; FaxReceive: PFAX_RECEIVE): BOOL; stdcall;
+ {$EXTERNALSYM PFAXDEVRECEIVE}
+ PFAXDEVREPORTSTATUS = function(FaxHandle: HANDLE; FaxStatus: PFAX_DEV_STATUS; FaxStatusSize: DWORD; FaxStatusSizeRequired: LPDWORD): BOOL; stdcall;
+ {$EXTERNALSYM PFAXDEVREPORTSTATUS}
+ PFAXDEVABORTOPERATION = function(FaxHandle: HANDLE): BOOL; stdcall;
+ {$EXTERNALSYM PFAXDEVABORTOPERATION}
+ PFAXDEVCONFIGURE = function(out PropSheetPage: HPROPSHEETPAGE): BOOL; stdcall;
+ {$EXTERNALSYM PFAXDEVCONFIGURE}
+
+implementation
+
+end.
diff --git a/packages/extra/winunits/jwafaxext.pas b/packages/extra/winunits/jwafaxext.pas
index 5dc25f9c93..b6d844ba2c 100644
--- a/packages/extra/winunits/jwafaxext.pas
+++ b/packages/extra/winunits/jwafaxext.pas
@@ -1,126 +1,126 @@
-{******************************************************************************}
-{ }
-{ Fax Config and Notififcation Extensions API interface unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: faxext.h, released November 2001. The original Pascal }
-{ code is: FaxExt.pas, released April 2002. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwafaxext.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaFaxExt;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "faxext.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaWinType;
-
-{************************************
-* *
-* Extension configuration data *
-* *
-************************************}
-
-type
- FAX_ENUM_DEVICE_ID_SOURCE = (
- DEV_ID_SRC_FAX, // Device id is generated by the fax server
- DEV_ID_SRC_TAPI); // Device id is generated by a TAPI TSP (of FSP).
- {$EXTERNALSYM FAX_ENUM_DEVICE_ID_SOURCE}
- TFaxEnumDeviceIdSource = FAX_ENUM_DEVICE_ID_SOURCE;
-
-//
-// Prototype of FaxExtGetData
-//
-
-type
- PFAX_EXT_GET_DATA = function(dwDeviceId: DWORD; DevIdSrc: FAX_ENUM_DEVICE_ID_SOURCE; lpcwstrDataGUID: LPCWSTR; out ppData: LPBYTE; lpdwDataSize: LPDWORD): DWORD; stdcall;
- {$EXTERNALSYM PFAX_EXT_GET_DATA}
-
-//
-// Prototype of FaxExtSetData
-//
-
- PFAX_EXT_SET_DATA = function(hInst: HINSTANCE; dwDeviceId: DWORD; DevIdSrc: FAX_ENUM_DEVICE_ID_SOURCE; lpcwstrDataGUID: LPCWSTR; pData: LPBYTE; dwDataSize: DWORD): DWORD; stdcall;
- {$EXTERNALSYM PFAX_EXT_SET_DATA}
-
- PFAX_EXT_CONFIG_CHANGE = function(dwDeviceId: DWORD; lpcwstrDataGUID: LPCWSTR; lpData: LPBYTE; dwDataSize: DWORD): HRESULT; stdcall;
- {$EXTERNALSYM PFAX_EXT_CONFIG_CHANGE}
-
-//
-// Prototype of FaxExtRegisterForEvents
-//
-
- PFAX_EXT_REGISTER_FOR_EVENTS = function(hInst: HINSTANCE; dwDeviceId: DWORD; DevIdSrc: FAX_ENUM_DEVICE_ID_SOURCE; lpcwstrDataGUID: LPCWSTR; lpConfigChangeCallback: PFAX_EXT_CONFIG_CHANGE): HANDLE; stdcall;
- {$EXTERNALSYM PFAX_EXT_REGISTER_FOR_EVENTS}
-
-//
-// Prototype of FaxExtUnregisterForEvents
-//
-
- PFAX_EXT_UNREGISTER_FOR_EVENTS = function(hNotification: HANDLE): DWORD; stdcall;
- {$EXTERNALSYM PFAX_EXT_UNREGISTER_FOR_EVENTS}
-
-//
-// Prototype of FaxExtFreeBuffer
-//
-
- PFAX_EXT_FREE_BUFFER = procedure(lpvBuffer: LPVOID); stdcall;
- {$EXTERNALSYM PFAX_EXT_FREE_BUFFER}
-
-//
-// The extension should implement and export the following function:
-//
-
- PFAX_EXT_INITIALIZE_CONFIG = function(
- pFaxExtGetData: PFAX_EXT_GET_DATA;
- pFaxExtSetData: PFAX_EXT_SET_DATA;
- pFaxExtRegisterForEvents: PFAX_EXT_REGISTER_FOR_EVENTS;
- pFaxExtUnregisterForEvents: PFAX_EXT_UNREGISTER_FOR_EVENTS;
- pFaxExtFreeBuffer: PFAX_EXT_FREE_BUFFER): HRESULT; stdcall;
- {$EXTERNALSYM PFAX_EXT_INITIALIZE_CONFIG}
-
-implementation
-
-end.
+{******************************************************************************}
+{ }
+{ Fax Config and Notififcation Extensions API interface unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: faxext.h, released November 2001. The original Pascal }
+{ code is: FaxExt.pas, released April 2002. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwafaxext.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaFaxExt;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "faxext.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaWinType;
+
+{************************************
+* *
+* Extension configuration data *
+* *
+************************************}
+
+type
+ FAX_ENUM_DEVICE_ID_SOURCE = (
+ DEV_ID_SRC_FAX, // Device id is generated by the fax server
+ DEV_ID_SRC_TAPI); // Device id is generated by a TAPI TSP (of FSP).
+ {$EXTERNALSYM FAX_ENUM_DEVICE_ID_SOURCE}
+ TFaxEnumDeviceIdSource = FAX_ENUM_DEVICE_ID_SOURCE;
+
+//
+// Prototype of FaxExtGetData
+//
+
+type
+ PFAX_EXT_GET_DATA = function(dwDeviceId: DWORD; DevIdSrc: FAX_ENUM_DEVICE_ID_SOURCE; lpcwstrDataGUID: LPCWSTR; out ppData: LPBYTE; lpdwDataSize: LPDWORD): DWORD; stdcall;
+ {$EXTERNALSYM PFAX_EXT_GET_DATA}
+
+//
+// Prototype of FaxExtSetData
+//
+
+ PFAX_EXT_SET_DATA = function(hInst: HINSTANCE; dwDeviceId: DWORD; DevIdSrc: FAX_ENUM_DEVICE_ID_SOURCE; lpcwstrDataGUID: LPCWSTR; pData: LPBYTE; dwDataSize: DWORD): DWORD; stdcall;
+ {$EXTERNALSYM PFAX_EXT_SET_DATA}
+
+ PFAX_EXT_CONFIG_CHANGE = function(dwDeviceId: DWORD; lpcwstrDataGUID: LPCWSTR; lpData: LPBYTE; dwDataSize: DWORD): HRESULT; stdcall;
+ {$EXTERNALSYM PFAX_EXT_CONFIG_CHANGE}
+
+//
+// Prototype of FaxExtRegisterForEvents
+//
+
+ PFAX_EXT_REGISTER_FOR_EVENTS = function(hInst: HINSTANCE; dwDeviceId: DWORD; DevIdSrc: FAX_ENUM_DEVICE_ID_SOURCE; lpcwstrDataGUID: LPCWSTR; lpConfigChangeCallback: PFAX_EXT_CONFIG_CHANGE): HANDLE; stdcall;
+ {$EXTERNALSYM PFAX_EXT_REGISTER_FOR_EVENTS}
+
+//
+// Prototype of FaxExtUnregisterForEvents
+//
+
+ PFAX_EXT_UNREGISTER_FOR_EVENTS = function(hNotification: HANDLE): DWORD; stdcall;
+ {$EXTERNALSYM PFAX_EXT_UNREGISTER_FOR_EVENTS}
+
+//
+// Prototype of FaxExtFreeBuffer
+//
+
+ PFAX_EXT_FREE_BUFFER = procedure(lpvBuffer: LPVOID); stdcall;
+ {$EXTERNALSYM PFAX_EXT_FREE_BUFFER}
+
+//
+// The extension should implement and export the following function:
+//
+
+ PFAX_EXT_INITIALIZE_CONFIG = function(
+ pFaxExtGetData: PFAX_EXT_GET_DATA;
+ pFaxExtSetData: PFAX_EXT_SET_DATA;
+ pFaxExtRegisterForEvents: PFAX_EXT_REGISTER_FOR_EVENTS;
+ pFaxExtUnregisterForEvents: PFAX_EXT_UNREGISTER_FOR_EVENTS;
+ pFaxExtFreeBuffer: PFAX_EXT_FREE_BUFFER): HRESULT; stdcall;
+ {$EXTERNALSYM PFAX_EXT_INITIALIZE_CONFIG}
+
+implementation
+
+end.
diff --git a/packages/extra/winunits/jwafaxmmc.pas b/packages/extra/winunits/jwafaxmmc.pas
index 689d3e3040..fdd80e8034 100644
--- a/packages/extra/winunits/jwafaxmmc.pas
+++ b/packages/extra/winunits/jwafaxmmc.pas
@@ -1,99 +1,99 @@
-{******************************************************************************}
-{ }
-{ Fax MMC Extension Components API interface unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: faxmmc.h, released November 2001. The original Pascal }
-{ code is: FaxMmc.pas, released April 2002. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwafaxmmc.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaFaxMmc;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "faxmmc.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaWinType;
-
-type
- OLESTR = WideString; // todo
-
-const
- FAXSRV_DEVICE_NODETYPE_GUID_STR = OLESTR('{3115A19A-6251-46ac-9425-14782858B8C9}');
- {$EXTERNALSYM FAXSRV_DEVICE_NODETYPE_GUID_STR}
- FAXSRV_DEVICE_NODETYPE_GUID: TGUID = '{3115A19A-6251-46ac-9425-14782858B8C9}';
- {$EXTERNALSYM FAXSRV_DEVICE_NODETYPE_GUID}
-
- FAXSRV_DEVICE_PROVIDER_NODETYPE_GUID_STR = OLESTR('{BD38E2AC-B926-4161-8640-0F6956EE2BA3}');
- {$EXTERNALSYM FAXSRV_DEVICE_PROVIDER_NODETYPE_GUID_STR}
- FAXSRV_DEVICE_PROVIDER_NODETYPE_GUID: TGUID = '{BD38E2AC-B926-4161-8640-0F6956EE2BA3}';
- {$EXTERNALSYM FAXSRV_DEVICE_PROVIDER_NODETYPE_GUID}
-
- FAXSRV_ROUTING_METHOD_NODETYPE_GUID_STR = OLESTR('{220D2CB0-85A9-4a43-B6E8-9D66B44F1AF5}');
- {$EXTERNALSYM FAXSRV_ROUTING_METHOD_NODETYPE_GUID_STR}
- FAXSRV_ROUTING_METHOD_NODETYPE_GUID: TGUID = '{220D2CB0-85A9-4a43-B6E8-9D66B44F1AF5}';
- {$EXTERNALSYM FAXSRV_ROUTING_METHOD_NODETYPE_GUID}
-
- FAXSRV_MAX_GUID_LEN = SizeOf(FAXSRV_DEVICE_NODETYPE_GUID_STR) div SizeOf(WCHAR);
- {$EXTERNALSYM FAXSRV_MAX_GUID_LEN}
- FAXSRV_MAX_SERVER_NAME = MAX_PATH;
- {$EXTERNALSYM FAXSRV_MAX_SERVER_NAME}
- FAXSRV_MAX_ROUTEEXT_NAME_LEN = MAX_PATH;
- {$EXTERNALSYM FAXSRV_MAX_ROUTEEXT_NAME_LEN}
-
- CF_MSFAXSRV_DEVICE_ID = TEXT('FAXSRV_DeviceID');
- {$EXTERNALSYM CF_MSFAXSRV_DEVICE_ID}
- CF_MSFAXSRV_FSP_GUID = TEXT('FAXSRV_FSPGuid');
- {$EXTERNALSYM CF_MSFAXSRV_FSP_GUID}
- CF_MSFAXSRV_SERVER_NAME = TEXT('FAXSRV_ServerName');
- {$EXTERNALSYM CF_MSFAXSRV_SERVER_NAME}
- CF_MSFAXSRV_ROUTEEXT_NAME = TEXT('FAXSRV_RoutingExtName');
- {$EXTERNALSYM CF_MSFAXSRV_ROUTEEXT_NAME}
- CF_MSFAXSRV_ROUTING_METHOD_GUID = TEXT('FAXSRV_RoutingMethodGuid');
- {$EXTERNALSYM CF_MSFAXSRV_ROUTING_METHOD_GUID}
-
-implementation
-
-end.
+{******************************************************************************}
+{ }
+{ Fax MMC Extension Components API interface unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: faxmmc.h, released November 2001. The original Pascal }
+{ code is: FaxMmc.pas, released April 2002. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwafaxmmc.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaFaxMmc;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "faxmmc.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaWinType;
+
+type
+ OLESTR = WideString; // todo
+
+const
+ FAXSRV_DEVICE_NODETYPE_GUID_STR = OLESTR('{3115A19A-6251-46ac-9425-14782858B8C9}');
+ {$EXTERNALSYM FAXSRV_DEVICE_NODETYPE_GUID_STR}
+ FAXSRV_DEVICE_NODETYPE_GUID: TGUID = '{3115A19A-6251-46ac-9425-14782858B8C9}';
+ {$EXTERNALSYM FAXSRV_DEVICE_NODETYPE_GUID}
+
+ FAXSRV_DEVICE_PROVIDER_NODETYPE_GUID_STR = OLESTR('{BD38E2AC-B926-4161-8640-0F6956EE2BA3}');
+ {$EXTERNALSYM FAXSRV_DEVICE_PROVIDER_NODETYPE_GUID_STR}
+ FAXSRV_DEVICE_PROVIDER_NODETYPE_GUID: TGUID = '{BD38E2AC-B926-4161-8640-0F6956EE2BA3}';
+ {$EXTERNALSYM FAXSRV_DEVICE_PROVIDER_NODETYPE_GUID}
+
+ FAXSRV_ROUTING_METHOD_NODETYPE_GUID_STR = OLESTR('{220D2CB0-85A9-4a43-B6E8-9D66B44F1AF5}');
+ {$EXTERNALSYM FAXSRV_ROUTING_METHOD_NODETYPE_GUID_STR}
+ FAXSRV_ROUTING_METHOD_NODETYPE_GUID: TGUID = '{220D2CB0-85A9-4a43-B6E8-9D66B44F1AF5}';
+ {$EXTERNALSYM FAXSRV_ROUTING_METHOD_NODETYPE_GUID}
+
+ FAXSRV_MAX_GUID_LEN = SizeOf(FAXSRV_DEVICE_NODETYPE_GUID_STR) div SizeOf(WCHAR);
+ {$EXTERNALSYM FAXSRV_MAX_GUID_LEN}
+ FAXSRV_MAX_SERVER_NAME = MAX_PATH;
+ {$EXTERNALSYM FAXSRV_MAX_SERVER_NAME}
+ FAXSRV_MAX_ROUTEEXT_NAME_LEN = MAX_PATH;
+ {$EXTERNALSYM FAXSRV_MAX_ROUTEEXT_NAME_LEN}
+
+ CF_MSFAXSRV_DEVICE_ID = TEXT('FAXSRV_DeviceID');
+ {$EXTERNALSYM CF_MSFAXSRV_DEVICE_ID}
+ CF_MSFAXSRV_FSP_GUID = TEXT('FAXSRV_FSPGuid');
+ {$EXTERNALSYM CF_MSFAXSRV_FSP_GUID}
+ CF_MSFAXSRV_SERVER_NAME = TEXT('FAXSRV_ServerName');
+ {$EXTERNALSYM CF_MSFAXSRV_SERVER_NAME}
+ CF_MSFAXSRV_ROUTEEXT_NAME = TEXT('FAXSRV_RoutingExtName');
+ {$EXTERNALSYM CF_MSFAXSRV_ROUTEEXT_NAME}
+ CF_MSFAXSRV_ROUTING_METHOD_GUID = TEXT('FAXSRV_RoutingMethodGuid');
+ {$EXTERNALSYM CF_MSFAXSRV_ROUTING_METHOD_GUID}
+
+implementation
+
+end.
diff --git a/packages/extra/winunits/jwafaxroute.pas b/packages/extra/winunits/jwafaxroute.pas
index b2b837398d..f1f0cbe976 100644
--- a/packages/extra/winunits/jwafaxroute.pas
+++ b/packages/extra/winunits/jwafaxroute.pas
@@ -1,167 +1,167 @@
-{******************************************************************************}
-{ }
-{ Fax Routing Extension API interface unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: faxroute.h, released November 2001. The original Pascal}
-{ code is: FaxRoute.pas, released April 2002. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwafaxroute.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaFaxRoute;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "faxroute.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaWinType;
-
-//
-// microsoft routing guids
-//
-
-const
- MS_FAXROUTE_PRINTING_GUID = TEXT('{aec1b37c-9af2-11d0-abf7-00c04fd91a4e}');
- {$EXTERNALSYM MS_FAXROUTE_PRINTING_GUID}
- MS_FAXROUTE_FOLDER_GUID = TEXT('{92041a90-9af2-11d0-abf7-00c04fd91a4e}');
- {$EXTERNALSYM MS_FAXROUTE_FOLDER_GUID}
- MS_FAXROUTE_EMAIL_GUID = TEXT('{6bbf7bfe-9af2-11d0-abf7-00c04fd91a4e}');
- {$EXTERNALSYM MS_FAXROUTE_EMAIL_GUID}
-
-//
-// callback routines
-//
-
-type
- PFAXROUTEADDFILE = function(JobId: DWORD; FileName: LPCWSTR; Guid: LPGUID): LONG; stdcall;
- {$EXTERNALSYM PFAXROUTEADDFILE}
- PFAXROUTEDELETEFILE = function(JobId: DWORD; FileName: LPCWSTR): LONG; stdcall;
- {$EXTERNALSYM PFAXROUTEDELETEFILE}
- PFAXROUTEGETFILE = function(JobId, Index: DWORD; FileNameBuffer: LPWSTR; RequiredSize: LPDWORD): BOOL; stdcall;
- {$EXTERNALSYM PFAXROUTEGETFILE}
- PFAXROUTEENUMFILE = function(JobId: DWORD; GuidOwner, GuidCaller: LPGUID; FileName: LPCWSTR; Context: PVOID): BOOL; stdcall;
- {$EXTERNALSYM PFAXROUTEENUMFILE}
- PFAXROUTEENUMFILES = function(JobId: DWORD; Guid: LPGUID; FileEnumerator: PFAXROUTEENUMFILE; Context: PVOID): BOOL; stdcall;
- {$EXTERNALSYM PFAXROUTEENUMFILES}
- PFAXROUTEMODIFYROUTINGDATA = function(JobId: DWORD; RoutingGuid: LPCWSTR; RoutingData: LPBYTE; RoutingDataSize: DWORD): BOOL; stdcall;
- {$EXTERNALSYM PFAXROUTEMODIFYROUTINGDATA}
-
- PFAX_ROUTE_CALLBACKROUTINES = ^FAX_ROUTE_CALLBACKROUTINES;
- {$EXTERNALSYM PFAX_ROUTE_CALLBACKROUTINES}
- _FAX_ROUTE_CALLBACKROUTINES = record
- SizeOfStruct: DWORD; // size of the struct set by the fax service
- FaxRouteAddFile: PFAXROUTEADDFILE;
- FaxRouteDeleteFile: PFAXROUTEDELETEFILE;
- FaxRouteGetFile: PFAXROUTEGETFILE;
- FaxRouteEnumFiles: PFAXROUTEENUMFILES;
- FaxRouteModifyRoutingData: PFAXROUTEMODIFYROUTINGDATA;
- end;
- {$EXTERNALSYM _FAX_ROUTE_CALLBACKROUTINES}
- FAX_ROUTE_CALLBACKROUTINES = _FAX_ROUTE_CALLBACKROUTINES;
- {$EXTERNALSYM FAX_ROUTE_CALLBACKROUTINES}
- TFaxRouteCallbackRoutines = FAX_ROUTE_CALLBACKROUTINES;
- PFaxRouteCallbackRoutines = PFAX_ROUTE_CALLBACKROUTINES;
-
-//
-// routing data structure
-//
-
- PFAX_ROUTE = ^FAX_ROUTE;
- {$EXTERNALSYM PFAX_ROUTE}
- _FAX_ROUTE = record
- SizeOfStruct: DWORD; // size of the struct set by the fax service
- JobId: DWORD; // Fax job identifier
- ElapsedTime: DWORDLONG; // Elapsed time for whole fax job in Coordinated Universal Time (UTC)
- ReceiveTime: DWORDLONG; // Starting time for fax job in Coordinated Universal Time (UTC)
- PageCount: DWORD; // Number of pages received
- Csid: LPCWSTR; // Called station identifier
- Tsid: LPCWSTR; // Transmitting station identifier
- CallerId: LPCWSTR; // Caller id
- RoutingInfo: LPCWSTR; // Routing info such as DID, T.30-subaddress, etc.
- ReceiverName: LPCWSTR; // Receiver's name
- ReceiverNumber: LPCWSTR; // Receiver's fax number
- DeviceName: LPCWSTR; // Device name for the line that received the fax
- DeviceId: DWORD; // Permenant line identifier for the receiving device
- RoutingInfoData: LPBYTE; // Routing infor data to override configured info
- RoutingInfoDataSize: DWORD; // Size of routing info data
- end;
- {$EXTERNALSYM _FAX_ROUTE}
- FAX_ROUTE = _FAX_ROUTE;
- {$EXTERNALSYM FAX_ROUTE}
- TFaxRoute = FAX_ROUTE;
- PFaxRoute = PFAX_ROUTE;
-
- FAXROUTE_ENABLE = DWORD;
- {$EXTERNALSYM FAXROUTE_ENABLE}
- TFaxRouteEnabl = FAXROUTE_ENABLE;
-
-const
- QUERY_STATUS = DWORD(-1);
- {$EXTERNALSYM QUERY_STATUS}
- STATUS_DISABLE = 0;
- {$EXTERNALSYM STATUS_DISABLE}
- STATUS_ENABLE = 1;
- {$EXTERNALSYM STATUS_ENABLE}
-
-//
-// prototypes
-//
-
-type
- PFAXROUTEINITIALIZE = function(HeapHandle: HANDLE; FaxRouteCallbackRoutines: PFAX_ROUTE_CALLBACKROUTINES): BOOL; stdcall;
- {$EXTERNALSYM PFAXROUTEINITIALIZE}
- PFAXROUTEMETHOD = function(FaxRoute: PFAX_ROUTE; P: PVOID; D: LPDWORD): BOOL; stdcall;
- {$EXTERNALSYM PFAXROUTEMETHOD}
- PFAXROUTEDEVICEENABLE = function(RoutingGuid: LPCWSTR; DeviceId: DWORD; Enabled: LONG): BOOL; stdcall;
- {$EXTERNALSYM PFAXROUTEDEVICEENABLE}
- PFAXROUTEDEVICECHANGENOTIFICATION = function(DeviceId: DWORD; NewDevice: BOOL): BOOL; stdcall;
- {$EXTERNALSYM PFAXROUTEDEVICECHANGENOTIFICATION}
- PFAXROUTEGETROUTINGINFO = function(RoutingGuid: LPCWSTR; DeviceId: DWORD; RoutingInfo: LPBYTE; RoutingInfoSize: LPDWORD): BOOL; stdcall;
- {$EXTERNALSYM PFAXROUTEGETROUTINGINFO}
- PFAXROUTESETROUTINGINFO = function(RoutingGuid: LPCWSTR; DeviceId: DWORD; RoutingInfo: LPBYTE; RoutingInfoSize: DWORD): BOOL; stdcall;
- {$EXTERNALSYM PFAXROUTESETROUTINGINFO}
-
-implementation
-
-end.
+{******************************************************************************}
+{ }
+{ Fax Routing Extension API interface unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: faxroute.h, released November 2001. The original Pascal}
+{ code is: FaxRoute.pas, released April 2002. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwafaxroute.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaFaxRoute;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "faxroute.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaWinType;
+
+//
+// microsoft routing guids
+//
+
+const
+ MS_FAXROUTE_PRINTING_GUID = TEXT('{aec1b37c-9af2-11d0-abf7-00c04fd91a4e}');
+ {$EXTERNALSYM MS_FAXROUTE_PRINTING_GUID}
+ MS_FAXROUTE_FOLDER_GUID = TEXT('{92041a90-9af2-11d0-abf7-00c04fd91a4e}');
+ {$EXTERNALSYM MS_FAXROUTE_FOLDER_GUID}
+ MS_FAXROUTE_EMAIL_GUID = TEXT('{6bbf7bfe-9af2-11d0-abf7-00c04fd91a4e}');
+ {$EXTERNALSYM MS_FAXROUTE_EMAIL_GUID}
+
+//
+// callback routines
+//
+
+type
+ PFAXROUTEADDFILE = function(JobId: DWORD; FileName: LPCWSTR; Guid: LPGUID): LONG; stdcall;
+ {$EXTERNALSYM PFAXROUTEADDFILE}
+ PFAXROUTEDELETEFILE = function(JobId: DWORD; FileName: LPCWSTR): LONG; stdcall;
+ {$EXTERNALSYM PFAXROUTEDELETEFILE}
+ PFAXROUTEGETFILE = function(JobId, Index: DWORD; FileNameBuffer: LPWSTR; RequiredSize: LPDWORD): BOOL; stdcall;
+ {$EXTERNALSYM PFAXROUTEGETFILE}
+ PFAXROUTEENUMFILE = function(JobId: DWORD; GuidOwner, GuidCaller: LPGUID; FileName: LPCWSTR; Context: PVOID): BOOL; stdcall;
+ {$EXTERNALSYM PFAXROUTEENUMFILE}
+ PFAXROUTEENUMFILES = function(JobId: DWORD; Guid: LPGUID; FileEnumerator: PFAXROUTEENUMFILE; Context: PVOID): BOOL; stdcall;
+ {$EXTERNALSYM PFAXROUTEENUMFILES}
+ PFAXROUTEMODIFYROUTINGDATA = function(JobId: DWORD; RoutingGuid: LPCWSTR; RoutingData: LPBYTE; RoutingDataSize: DWORD): BOOL; stdcall;
+ {$EXTERNALSYM PFAXROUTEMODIFYROUTINGDATA}
+
+ PFAX_ROUTE_CALLBACKROUTINES = ^FAX_ROUTE_CALLBACKROUTINES;
+ {$EXTERNALSYM PFAX_ROUTE_CALLBACKROUTINES}
+ _FAX_ROUTE_CALLBACKROUTINES = record
+ SizeOfStruct: DWORD; // size of the struct set by the fax service
+ FaxRouteAddFile: PFAXROUTEADDFILE;
+ FaxRouteDeleteFile: PFAXROUTEDELETEFILE;
+ FaxRouteGetFile: PFAXROUTEGETFILE;
+ FaxRouteEnumFiles: PFAXROUTEENUMFILES;
+ FaxRouteModifyRoutingData: PFAXROUTEMODIFYROUTINGDATA;
+ end;
+ {$EXTERNALSYM _FAX_ROUTE_CALLBACKROUTINES}
+ FAX_ROUTE_CALLBACKROUTINES = _FAX_ROUTE_CALLBACKROUTINES;
+ {$EXTERNALSYM FAX_ROUTE_CALLBACKROUTINES}
+ TFaxRouteCallbackRoutines = FAX_ROUTE_CALLBACKROUTINES;
+ PFaxRouteCallbackRoutines = PFAX_ROUTE_CALLBACKROUTINES;
+
+//
+// routing data structure
+//
+
+ PFAX_ROUTE = ^FAX_ROUTE;
+ {$EXTERNALSYM PFAX_ROUTE}
+ _FAX_ROUTE = record
+ SizeOfStruct: DWORD; // size of the struct set by the fax service
+ JobId: DWORD; // Fax job identifier
+ ElapsedTime: DWORDLONG; // Elapsed time for whole fax job in Coordinated Universal Time (UTC)
+ ReceiveTime: DWORDLONG; // Starting time for fax job in Coordinated Universal Time (UTC)
+ PageCount: DWORD; // Number of pages received
+ Csid: LPCWSTR; // Called station identifier
+ Tsid: LPCWSTR; // Transmitting station identifier
+ CallerId: LPCWSTR; // Caller id
+ RoutingInfo: LPCWSTR; // Routing info such as DID, T.30-subaddress, etc.
+ ReceiverName: LPCWSTR; // Receiver's name
+ ReceiverNumber: LPCWSTR; // Receiver's fax number
+ DeviceName: LPCWSTR; // Device name for the line that received the fax
+ DeviceId: DWORD; // Permenant line identifier for the receiving device
+ RoutingInfoData: LPBYTE; // Routing infor data to override configured info
+ RoutingInfoDataSize: DWORD; // Size of routing info data
+ end;
+ {$EXTERNALSYM _FAX_ROUTE}
+ FAX_ROUTE = _FAX_ROUTE;
+ {$EXTERNALSYM FAX_ROUTE}
+ TFaxRoute = FAX_ROUTE;
+ PFaxRoute = PFAX_ROUTE;
+
+ FAXROUTE_ENABLE = DWORD;
+ {$EXTERNALSYM FAXROUTE_ENABLE}
+ TFaxRouteEnabl = FAXROUTE_ENABLE;
+
+const
+ QUERY_STATUS = DWORD(-1);
+ {$EXTERNALSYM QUERY_STATUS}
+ STATUS_DISABLE = 0;
+ {$EXTERNALSYM STATUS_DISABLE}
+ STATUS_ENABLE = 1;
+ {$EXTERNALSYM STATUS_ENABLE}
+
+//
+// prototypes
+//
+
+type
+ PFAXROUTEINITIALIZE = function(HeapHandle: HANDLE; FaxRouteCallbackRoutines: PFAX_ROUTE_CALLBACKROUTINES): BOOL; stdcall;
+ {$EXTERNALSYM PFAXROUTEINITIALIZE}
+ PFAXROUTEMETHOD = function(FaxRoute: PFAX_ROUTE; P: PVOID; D: LPDWORD): BOOL; stdcall;
+ {$EXTERNALSYM PFAXROUTEMETHOD}
+ PFAXROUTEDEVICEENABLE = function(RoutingGuid: LPCWSTR; DeviceId: DWORD; Enabled: LONG): BOOL; stdcall;
+ {$EXTERNALSYM PFAXROUTEDEVICEENABLE}
+ PFAXROUTEDEVICECHANGENOTIFICATION = function(DeviceId: DWORD; NewDevice: BOOL): BOOL; stdcall;
+ {$EXTERNALSYM PFAXROUTEDEVICECHANGENOTIFICATION}
+ PFAXROUTEGETROUTINGINFO = function(RoutingGuid: LPCWSTR; DeviceId: DWORD; RoutingInfo: LPBYTE; RoutingInfoSize: LPDWORD): BOOL; stdcall;
+ {$EXTERNALSYM PFAXROUTEGETROUTINGINFO}
+ PFAXROUTESETROUTINGINFO = function(RoutingGuid: LPCWSTR; DeviceId: DWORD; RoutingInfo: LPBYTE; RoutingInfoSize: DWORD): BOOL; stdcall;
+ {$EXTERNALSYM PFAXROUTESETROUTINGINFO}
+
+implementation
+
+end.
diff --git a/packages/extra/winunits/jwagpedit.pas b/packages/extra/winunits/jwagpedit.pas
index 34b00b93f2..a211b36f24 100644
--- a/packages/extra/winunits/jwagpedit.pas
+++ b/packages/extra/winunits/jwagpedit.pas
@@ -1,950 +1,950 @@
-{******************************************************************************}
-{ }
-{ Group Policy API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: gpedit.h, released June 2000. The original Pascal }
-{ code is: GPEdit.pas, released December 2000. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwagpedit.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaGPEdit;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "GPEdit.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- ActiveX {TODO}, JwaPrSht, JwaWinType;
-
-type
- LPOLESTR = POleStr;
- {$NODEFINE LPOLESTR}
-
-//-----------------------------------------------------------------------------
-//
-// GPEDIT.H - Definitions and prototypes for Group Policy
-//
-// Copyright 1997-1999, Microsoft Corporation
-//
-//-----------------------------------------------------------------------------
-
-//
-// Terminology
-//
-// Group Policy Editor - The tool to view a Group Policy Object.
-//
-// Group Policy Object - A collection of administrator defined policies.
-// Each Group Policy Object (GPO) has both file system
-// and Active Directory storage available to it.
-//
-// IGPEInformation - The interface MMC Snapin Extensions use to
-// talk to the Group Policy Editor.
-//
-// IGroupPolicyObject - The interface used to create/edit a GPO directly
-// without going through the Group Policy Editor
-//
-
-//
-// Group Policy Editor MMC SnapIn GUID
-//
-// {8FC0B734-A0E1-11d1-A7D3-0000F87571E3}
-
-const
- CLSID_GPESnapIn: TGUID = (
- D1:$8fc0b734; D2:$a0e1; D3:$11d1; D4:($a7, $d3, $0, $0, $f8, $75, $71, $e3));
- {$EXTERNALSYM CLSID_GPESnapIn}
-
-//
-// Group Policy Editor node ids
-//
-
-//
-// Computer Configuration\Windows Settings
-// {8FC0B737-A0E1-11d1-A7D3-0000F87571E3}
-//
-
- NODEID_Machine: TGUID = (
- D1:$8fc0b737; D2:$a0e1; D3:$11d1; D4:($a7, $d3, $0, $0, $f8, $75, $71, $e3));
- {$EXTERNALSYM NODEID_Machine}
-
-//
-// Computer Configuration\Software Settings
-// {8FC0B73A-A0E1-11d1-A7D3-0000F87571E3}
-//
-
- NODEID_MachineSWSettings: TGUID = (
- D1:$8fc0b73a; D2:$a0e1; D3:$11d1; D4:($a7, $d3, $0, $0, $f8, $75, $71, $e3));
- {$EXTERNALSYM NODEID_MachineSWSettings}
-
-//
-// User Configuration\Windows Settings
-// {8FC0B738-A0E1-11d1-A7D3-0000F87571E3}
-//
-
- NODEID_User: TGUID = (
- D1:$8fc0b738; D2:$a0e1; D3:$11d1; D4:($a7, $d3, $0, $0, $f8, $75, $71, $e3));
- {$EXTERNALSYM NODEID_User}
-
-//
-// User Configuration\Software Settings
-// {8FC0B73C-A0E1-11d1-A7D3-0000F87571E3}
-//
-
- NODEID_UserSWSettings: TGUID = (
- D1:$8fc0b73c; D2:$a0e1; D3:$11d1; D4:($a7, $d3, $0, $0, $f8, $75, $71, $e3));
- {$EXTERNALSYM NODEID_UserSWSettings}
-
-//
-// IGPEInformation interface id
-//
-// {8FC0B735-A0E1-11d1-A7D3-0000F87571E3}
-
- IID_IGPEInformation: TGUID = (
- D1:$8fc0b735; D2:$a0e1; D3:$11d1; D4:($a7, $d3, $0, $0, $f8, $75, $71, $e3));
- {$EXTERNALSYM IID_IGPEInformation}
-
-//
-// Group Policy Object class id
-//
-// {EA502722-A23D-11d1-A7D3-0000F87571E3}
-
- CLSID_GroupPolicyObject: TGUID = (
- D1:$ea502722; D2:$a23d; D3:$11d1; D4:($a7, $d3, $0, $0, $f8, $75, $71, $e3));
- {$EXTERNALSYM CLSID_GroupPolicyObject}
-
-//
-// Group Policy Object interface id
-//
-// {EA502723-A23D-11d1-A7D3-0000F87571E3}
-
- IID_IGroupPolicyObject: TGUID = (
- D1:$ea502723; D2:$a23d; D3:$11d1; D4:($a7, $d3, $0, $0, $f8, $75, $71, $e3));
- {$EXTERNALSYM IID_IGroupPolicyObject}
-
-//
-// GUID that identifies the registry extension
-//
-
- REGISTRY_EXTENSION_GUID: TGUID = (
- D1:$35378EAC; D2:$683F; D3:$11D2; D4:($A8, $9A, $00, $C0, $4F, $BB, $CF, $A2));
- {$EXTERNALSYM IID_IGroupPolicyObject}
-
-//========================================================================================
-//
-// Resultant Set of Policy node ids
-//
-//========================================================================================
-
-//
-// Resultant Set of Policy MMC SnapIn GUID
-//
-// {6DC3804B-7212-458D-ADB0-9A07E2AE1FA2}
-
- CLSID_RSOPSnapIn: TGUID = (
- D1:$6dc3804b; D2:$7212; D3:$458d; D4:($ad, $b0, $9a, $07, $e2, $ae, $1f, $a2));
- {$EXTERNALSYM CLSID_RSOPSnapIn}
-
-//
-// Computer Configuration\Windows Settings
-// {BD4C1A2E-0B7A-4A62-A6B0-C0577539C97E}
-//
-
- NODEID_RSOPMachine: TGUID = (
- D1:$bd4c1a2e; D2:$0b7a; D3:$4a62; D4:($a6, $b0, $c0, $57, $75, $39, $c9, $7e));
- {$EXTERNALSYM NODEID_RSOPMachine}
-
-//
-// Computer Configuration\Software Settings
-// {6A76273E-EB8E-45DB-94C5-25663A5f2C1A}
-//
-
- NODEID_RSOPMachineSWSettings: TGUID = (
- D1:$6a76273e; D2:$eb8e; D3:$45db; D4:($94, $c5, $25, $66, $3a, $5f, $2c, $1a));
- {$EXTERNALSYM NODEID_RSOPMachineSWSettings}
-
-//
-// User Configuration\Windows Settings
-// {AB87364F-0CEC-4CD8-9BF8-898F34628FB8}
-//
-
- NODEID_RSOPUser: TGUID = (
- D1:$ab87364f; D2:$0cec; D3:$4cd8; D4:($9b, $f8, $89, $8f, $34, $62, $8f, $b8));
- {$EXTERNALSYM NODEID_RSOPUser}
-
-//
-// User Configuration\Software Settings
-// {E52C5CE3-FD27-4402-84DE-D9A5F2858910}
-//
-
- NODEID_RSOPUserSWSettings: TGUID = (
- D1:$e52c5ce3; D2:$fd27; D3:$4402; D4:($84, $de, $d9, $a5, $f2, $85, $89, $10));
- {$EXTERNALSYM NODEID_RSOPUserSWSettings}
-
-//
-// IRSOPInformation interface id
-//
-// {9A5A81B5-D9C7-49EF-9D11-DDF50968C48D}
-
- IID_IRSOPInformation: TGUID = (
- D1:$9a5a81b5; D2:$d9c7; D3:$49ef; D4:($9d, $11, $dd, $f5, $09, $68, $c4, $8d));
- {$EXTERNALSYM IID_IRSOPInformation}
-
-// #include <objbase.h>
-
-//
-// Group Policy Object Section flags
-//
-
-const
- GPO_SECTION_ROOT = 0; // Root
- {$EXTERNALSYM GPO_SECTION_ROOT}
- GPO_SECTION_USER = 1; // User
- {$EXTERNALSYM GPO_SECTION_USER}
- GPO_SECTION_MACHINE = 2; // Machine
- {$EXTERNALSYM GPO_SECTION_MACHINE}
-
-//
-// Group Policy Object types
-//
-
-type
- _GROUP_POLICY_OBJECT_TYPE = (
- GPOTypeLocal, // GPO on the local machine
- GPOTypeRemote, // GPO on a remote machine
- GPOTypeDS); // GPO in the Active Directory
- {$EXTERNALSYM _GROUP_POLICY_OBJECT_TYPE}
- GROUP_POLICY_OBJECT_TYPE = _GROUP_POLICY_OBJECT_TYPE;
- {$EXTERNALSYM GROUP_POLICY_OBJECT_TYPE}
- PGROUP_POLICY_OBJECT_TYPE = ^GROUP_POLICY_OBJECT_TYPE;
- {$EXTERNALSYM PGROUP_POLICY_OBJECT_TYPE}
- TGroupPolicyObjectType = GROUP_POLICY_OBJECT_TYPE;
- PGroupPolicyObjectType = PGROUP_POLICY_OBJECT_TYPE;
-
-//
-// Group Policy Hint types
-//
-
- _GROUP_POLICY_HINT_TYPE = (
- GPHintUnknown, // No link information available
- GPHintMachine, // GPO linked to a machine (local or remote)
- GPHintSite, // GPO linked to a site
- GPHintDomain, // GPO linked to a domain
- GPHintOrganizationalUnit); // GPO linked to a organizational unit
- {$EXTERNALSYM _GROUP_POLICY_HINT_TYPE}
- GROUP_POLICY_HINT_TYPE = _GROUP_POLICY_HINT_TYPE;
- {$EXTERNALSYM GROUP_POLICY_HINT_TYPE}
- PGROUP_POLICY_HINT_TYPE = ^GROUP_POLICY_HINT_TYPE;
- {$EXTERNALSYM PGROUP_POLICY_HINT_TYPE}
- TGroupPolicyHintType = GROUP_POLICY_HINT_TYPE;
- PGroupPolicyHintType = PGROUP_POLICY_HINT_TYPE;
-
- IGPEInformation = interface (IUnknown)
- ['{8FC0B735-A0E1-11d1-A7D3-0000F87571E3}']
-
- // *** IGPEInformation methods ***
-
- //
- // Returns the unique Group Policy Object name (a GUID)
- //
- // pszName contains the name on return
- // cchMaxLength is the max number of characters that can be stored in pszName
- //
-
- function GetName(pszName: LPOLESTR; cchMaxLength: Integer): HRESULT; stdcall;
-
- //
- // Returns the friendly display name for this Group Policy Object
- //
- // pszName contains the name on return
- // cchMaxLength is the max number of characters that can be stored in pszName
- //
-
- function GetDisplayName(pszName: LPOLESTR; cchMaxLength: Integer): HRESULT; stdcall;
-
- //
- // Returns a registry key handle for the requested section. The returned
- // key is the root of the registry, not the Policies subkey. To set / read
- // a value in the Policies subkey, you will need to call RegOpenKeyEx to
- // open Software\Policies subkey first.
- //
- // The handle has been opened with ALL ACCESS rights. Call RegCloseKey
- // on the handle when finished.
- //
- // dwSection is either GPO_SECTION_USER or GPO_SECTION_MACHINE
- // hKey contains the registry key on return
- //
-
- function GetRegistryKey(dwSection: DWORD; var hKey: HKEY): HRESULT; stdcall;
-
- //
- // Returns the Active Directory path to the root of the request section.
- // The path is in ADSI name format.
- //
- // dwSection is one of the GPO_SECTION_* flags
- // pszPath contains the path on return
- // cchMaxPath is the max number of characters that can be stored in pszPath
- //
-
- function GetDSPath(dwSection: DWORD; pszPath: LPOLESTR; cchMaxPath: Integer): HRESULT; stdcall;
-
- //
- // Returns the UNC path to the root of the requested section.
- //
- // dwSection is one of the GPO_SECTION_* flags
- // pszPath contains the path on return
- // cchMaxPath is the number of characters that can be stored in pszPath.
- //
-
- function GetFileSysPath(dwSection: DWORD; pszPath: LPOLESTR; cchMaxPath: Integer): HRESULT; stdcall;
-
- //
- // Returns the user preferences (options)
- //
- // Currently, there are no options defined. This is reserved for future use.
- //
- // dwOptions receives a bitmask value
- //
-
- function GetOptions(var dwOptions: DWORD): HRESULT; stdcall;
-
- //
- // Returns the type of GPO being edited.
- //
- // The three types are: a GPO in the Active Directory, the GPO on the local machine,
- // and the GPO on a remote machine.
- //
- // Machine GPOs only have file system storage (no Active Directory storage available).
- // If GetDSPath is called for a machine GPO, the function will succeed
- // and the returned buffer will be the empty string ""
- //
- // Active Directory GPOs have both file system and Active Directory storage available to them.
- //
- // gpoType receives one of the type flags listed above.
- //
-
- function GetType(var gpoType: GROUP_POLICY_OBJECT_TYPE): HRESULT; stdcall;
-
- //
- // Returns the type of Active Directory object (or machine) that could be linked to
- // this GPO
- //
- // This is a hint api only. The GPE does not know which Active Directory objects are
- // linked to a particular GPO, but it can offer a hint based upon how the
- // user started the GPE.
- //
- // Use this method with great caution. Some extensions might want to
- // customize their user interface based upon the scoping for this GPO,
- // but it is easy to offer the wrong namespace. Best advice is to
- // always offer your full user interface, but if you choose to use this
- // method, always offer your full user interface if you recieve the
- // unknown hint back.
- //
- // gpHint receives one of the hint flags listed above.
- //
-
- function GetHint(var gpHint: GROUP_POLICY_HINT_TYPE): HRESULT; stdcall;
-
- //
- // Informs the Group Policy Editor that policy settings have changed.
- // Extensions MUST call this methold every time a change is made
- // to a Group Policy Object.
- //
- // bMachine specifies if machine or user policy has changed.
- // bAdd specifies whether this is an add or delete.
- // pGuidExtension is the guid or unique name of extension that
- // will process this GPO.
- // pGuidSnapin is the guid or unique name of snapin that is making
- // this call
- //
-
- function PolicyChanged(bMachine, bAdd: BOOL; const pGuidExtension, pGuidSnapin: GUID): HRESULT; stdcall;
-
- end;
- {$EXTERNALSYM IGPEInformation}
-
- LPGPEINFORMATION = ^IGPEInformation;
- {$EXTERNALSYM LPGPEINFORMATION}
-
-//
-// Group Policy Object open / creation flags
-//
-
-const
- GPO_OPEN_LOAD_REGISTRY = $00000001; // Load the registry files
- {$EXTERNALSYM GPO_OPEN_LOAD_REGISTRY}
- GPO_OPEN_READ_ONLY = $00000002; // Open the GPO as read only
- {$EXTERNALSYM GPO_OPEN_READ_ONLY}
-
-//
-// Group Policy Object option flags
-//
-
-const
- GPO_OPTION_DISABLE_USER = $00000001; // The user portion of this GPO is disabled
- {$EXTERNALSYM GPO_OPTION_DISABLE_USER}
- GPO_OPTION_DISABLE_MACHINE = $00000002; // The machine portion of this GPO is disabled
- {$EXTERNALSYM GPO_OPTION_DISABLE_MACHINE}
-
-type
- IGroupPolicyObject = interface (IUnknown)
- ['{EA502723-A23D-11d1-A7D3-0000F87571E3}']
-
- // *** IGroupPolicyObject methods ***
-
- //
- // Creates a new GPO in the Active Directory with the given friendly name
- // and opens it via OpenDSGPO(). If pszDomainName contains a domain
- // controller name, the GPO will be created on that DC. If it does not
- // specify a domain controller name, the method will select a DC on
- // the callers behalf.
- //
- // pszDomainName contains the ADSI path of the domain root
- // pszDisplayName contains the friendly display name
- // dwFlags is a bitmask of GPO open / creation flags listed above
- //
-
- function New(pszDomainName, pszDisplayName: LPOLESTR; dwFlags: DWORD): HRESULT; stdcall;
-
- //
- // Opens the specified Group Policy Object in the Active Directory
- // based upon the passed in flags. If pszPath contains a domain
- // controller name, the GPO will be opened on that DC. If it does
- // not contain a domain controller name, the method will select a
- // DC on the callers behalf. If the registry is not loaded,
- // GetRegistryKey() will return E_FAIL.
- //
- // pszPath contains the ADSI path to the GPO to open
- // dwFlags is a bitmask of GPO open / creation flags listed above
- //
-
- function OpenDSGPO(pszPath: LPOLESTR; dwFlags: DWORD): HRESULT; stdcall;
-
- //
- // Opens the default Group Policy Object on this machine with the
- // dwFlags options listed above. If the registry is not loaded,
- // GetRegistryKey() will return E_FAIL.
- //
- // dwFlags is a bitmask of GPO open / creation flags listed above
- //
-
- function OpenLocalMachineGPO(dwFlags: DWORD): HRESULT; stdcall;
-
- //
- // Opens the default Group Policy Object on a remote machine with the
- // dwFlags options listed above. If the registry is not loaded,
- // GetRegistryKey() will return E_FAIL.
- //
- // pszComputerName contains the machine name in \\machine format
- // dwFlags is a bitmask of GPO open / creation flags listed above
- //
-
- function OpenRemoteMachineGPO(pszComputerName: LPOLESTR; dwFlags: DWORD): HRESULT; stdcall;
-
- //
- // Flushes the registry settings to disk and updates the revision
- // number of the GPO.
- //
- // bMachine specifies if machine or user should be saved.
- // bAdd specifies whether this is an add or delete.
- // pGuidExtension is the guid or unique name of extension that
- // will process this GPO.
- // pGuid is a guid
- //
-
- function Save(bMachine, bAdd: BOOL; const pGuidExtension, pGuid: GUID): HRESULT; stdcall;
-
- //
- // Deletes this Group Policy Object.
- //
- // After calling this method, no other methods are valid to call
- // since the data will have been deleted.
- //
-
- function Delete: HRESULT; stdcall;
-
- //
- // Returns the unique Group Policy Object name
- //
- // For Active Directory policy objects, this is a GUID
- // For the local policy object, it is the string "Local"
- // For remote policy objects, it is the computername
- //
- // pszName contains the name on return
- // cchMaxLength is the max number of characters that can be stored in pszName
- //
-
- function GetName(pszName: LPOLESTR; cchMaxLength: Integer): HRESULT; stdcall;
-
- //
- // Returns the friendly display name for this Group Policy Object
- //
- // pszName contains the name on return
- // cchMaxLength is the max number of characters that can be stored in pszName
- //
-
- function GetDisplayName(pszName: LPOLESTR; cchMaxLength: Integer): HRESULT; stdcall;
-
- //
- // Sets the friendly display name for this Group Policy Object
- //
- // pszName is the new display name
- //
-
- function SetDisplayName(pszName: LPOLESTR): HRESULT; stdcall;
-
- //
- // Returns the path to the Group Policy Object
- //
- //
- // If the GPO is an Active Directory object, the path is in ADSI name format.
- // If the GPO is a machine object, it is a file system path
- //
- // pszPath contains the path on return
- // cchMaxPath is the max number of characters that can be stored in pszPath
- //
-
- function GetPath(pszPath: LPOLESTR; cchMaxPath: Integer): HRESULT; stdcall;
-
- //
- // Returns the Active Directory path to the root of the request section.
- // The path is in DN name format.
- //
- // dwSection is one of the GPO_SECTION_* flags
- // pszPath contains the path on return
- // cchMaxPath is the max number of characters that can be stored in pszPath
- //
-
- function GetDSPath(dwSection: DWORD; pszPath: LPOLESTR; cchMaxPath: Integer): HRESULT; stdcall;
-
- //
- // Returns the UNC path to the root of the requested section.
- //
- // dwSection is one of the GPO_SECTION_* flags
- // pszPath contains the path on return
- // cchMaxPath is the number of characters that can be stored in pszPath.
- //
-
- function GetFileSysPath(dwSection: DWORD; pszPath: LPOLESTR; cchMaxPath: Integer): HRESULT; stdcall;
-
- //
- // Returns a registry key handle for the requested section. The returned
- // key is the root of the registry, not the Policies subkey. To set / read
- // a value in the Policies subkey, you will need to call RegOpenKeyEx to
- // open Software\Policies subkey first.
- //
- // The handle has been opened with ALL ACCESS rights. Call RegCloseKey
- // on the handle when finished.
- //
- // If the GPO was loaded / created without the registry being loaded
- // this method will return E_FAIL.
- //
- // dwSection is either GPO_SECTION_USER or GPO_SECTION_MACHINE
- // hKey contains the registry key on return
- //
-
- function GetRegistryKey(dwSection: DWORD; var hKey: HKEY): HRESULT; stdcall;
-
- //
- // Returns any options for this Group Policy Object
- //
- // dwOptions receives the GPO_OPTION_* flags
- //
-
- function GetOptions(var dwOptions: DWORD): HRESULT; stdcall;
-
- //
- // Sets any options for this Group Policy Object
- //
- // This method sets any options for this GPO. To change
- // an option, that flag must be set in the mask field.
- // If the flag is in the mask field, then the dwOptions
- // field is read for the current state.
- //
- // For example: to disable the GPO, make this call
- //
- // SetOptions (GPO_OPTION_DISABLED, GPO_OPTION_DISABLED);
- //
- // dwOptions specifies one or more GPO_OPTION_* flags
- // dwMask specificies which of the dwOptions to change
- //
-
- function SetOptions(dwOptions, dwMask: DWORD): HRESULT; stdcall;
-
- //
- // Returns the type of GPO being edited.
- //
- // The three types are: a GPO in the Active Directory, the GPO on the local machine,
- // and the GPO on a remote machine.
- //
- // Machine GPOs only have file system storage (no Active Directory storage available).
- // If GetDSPath is called for a machine GPO, the function will succeed
- // and the returned buffer will be the empty string ""
- //
- // Active Directory GPOs have both file system and Active Directory storage available to them.
- //
- // gpoType receives one of the type flags
- //
-
- function GetType(var gpoType: GROUP_POLICY_OBJECT_TYPE): HRESULT; stdcall;
-
- //
- // Returns the machine name of the remote GPO
- //
- // This method returns the name passed to OpenRemoteMachineGPO.
- //
- // pszName contains the name on return
- // cchMaxLength is the max number of characters that can be stored in pszName
- //
-
- function GetMachineName(pszName: LPOLESTR; cchMaxLength: Integer): HRESULT; stdcall;
-
- //
- // Returns an array of property sheet pages and the number of pages
- // in the array
- //
- // Note, this method will allocate memory for the array with
- // LocalAlloc. When finished, the caller should free the array
- // with LocalFree
- //
- // hPages address of the pointer for the array of property sheet pages
- // uPageCount receives the number of pages in the array
- //
-
- function GetPropertySheetPages(var hPages: PHPROPSHEETPAGE; var uPageCount: UINT): HRESULT; stdcall;
-
- end;
- {$EXTERNALSYM IGroupPolicyObject}
-
- LPGROUPPOLICYOBJECT = ^IGroupPolicyObject;
- {$EXTERNALSYM LPGROUPPOLICYOBJECT}
-
-//
-// RSOP flags
-//
-
-const
- RSOP_INFO_FLAG_DIAGNOSTIC_MODE = $00000001; // Running in diagnostic mode vs planning mode
- {$EXTERNALSYM RSOP_INFO_FLAG_DIAGNOSTIC_MODE}
-
-type
- IRSOPInformation = interface (IUnknown)
- ['{9A5A81B5-D9C7-49EF-9D11-DDF50968C48D}']
-
- // *** IRSOPInformation methods ***
-
- //
- // Returns the namespace for the RSOP data
- //
- // dwSection is either GPO_SECTION_USER or GPO_SECTION_MACHINE
- // pszName contains the namespace on return
- // cchMaxLength is the max number of characters that can be stored in pszName
- //
-
- function GetNamespace(dwSection: DWORD; pszName: LPOLESTR; cchMaxLength: Integer): HRESULT; stdcall;
-
- //
- // Returns information about the RSOP session
- //
- // pdwFlags points to a DWORD which contains the flags on return
- //
-
- function GetFlags(var pdwFlags: DWORD): HRESULT; stdcall;
-
- //
- // Returns the event log text for a specific entry
- //
- // lpEventSource - event log source name
- // lpEventLogName - event log name
- // lpEventTime - event log time in WMI datetime format
- // dwEventID - event ID
- // lpText - Receives a pointer to a buffer containing the text.
- // The caller should free this buffer with CoTaskMemFree.
- //
-
- function GetEventLogEntryText(pszEventSource, pszEventLogName, pszEventTime: LPOLESTR;
- dwEventID: DWORD; out ppszText: LPOLESTR): HRESULT; stdcall;
-
- end;
- {$EXTERNALSYM IRSOPInformation}
-
- LPRSOPINFORMATION = IRSOPInformation;
- {$EXTERNALSYM LPRSOPINFORMATION}
-
-//=============================================================================
-//
-// CreateGPOLink
-//
-// Creates a link to a GPO for the specified Site, Domain, or Organizational Unit
-//
-// lpGPO - ADSI path to the GPO
-// lpContainer - ADSI path to the Site, Domain, or Organizational Unit
-// fHighPriority - Create the link as the highest or lowest priority
-//
-// Returns: S_OK if successful
-//
-//=============================================================================
-
-function CreateGPOLink(lpGPO, lpContainer: LPOLESTR; fHighPriority: BOOL): HRESULT; stdcall;
-{$EXTERNALSYM CreateGPOLink}
-
-//=============================================================================
-//
-// DeleteGPOLink
-//
-// Deletes a link to a GPO for the specified Site, Domain, or Organizational Unit
-//
-// lpGPO - ADSI path to the GPO
-// lpContainer - ADSI path to the Site, Domain, or Organizational Unit
-//
-// Returns: S_OK if successful
-//
-//=============================================================================
-
-function DeleteGPOLink(lpGPO, lpContainer: LPOLESTR): HRESULT; stdcall;
-{$EXTERNALSYM DeleteGPOLink}
-
-//=============================================================================
-//
-// DeleteAllGPOLinks
-//
-// Deletes all GPO links for the specified Site, Domain, or Organizational Unit
-//
-// lpContainer - ADSI path to the Site, Domain, or Organizational Unit
-//
-// Returns: S_OK if successful
-//
-//=============================================================================
-
-function DeleteAllGPOLinks(lpContainer: LPOLESTR): HRESULT; stdcall;
-{$EXTERNALSYM DeleteAllGPOLinks}
-
-//=============================================================================
-//
-// BrowseForGPO
-//
-// Displays the GPO browser dialog
-//
-// lpBrowseInfo - Address of a GPOBROWSEINFO structure
-//
-// Returns: S_OK if successful
-//
-//=============================================================================
-
-//
-// Flags passed in the dwFlags field of the GPOBROWSEINFO structure
-//
-
-const
- GPO_BROWSE_DISABLENEW = $00000001; // Disables the New GPO functionality on all pages except "All"
- {$EXTERNALSYM GPO_BROWSE_DISABLENEW}
- GPO_BROWSE_NOCOMPUTERS = $00000002; // Removes the Computers tab
- {$EXTERNALSYM GPO_BROWSE_NOCOMPUTERS}
- GPO_BROWSE_NODSGPOS = $00000004; // Removes the Domain/OU and Sites tabs
- {$EXTERNALSYM GPO_BROWSE_NODSGPOS}
- GPO_BROWSE_OPENBUTTON = $00000008; // Change the Ok button to say Open
- {$EXTERNALSYM GPO_BROWSE_OPENBUTTON}
- GPO_BROWSE_INITTOALL = $00000010; // Initialize the dialog focused on the All pane
- {$EXTERNALSYM GPO_BROWSE_INITTOALL}
-
-type
- tag_GPOBROWSEINFO = record
- dwSize: DWORD; // [in] Initialized to the size of this structure
- dwFlags: DWORD; // [in] Flags defined above
- hwndOwner: HWND; // [in] Parent window handle (can be NULL)
- lpTitle: LPOLESTR; // [in] Title bar text. If NULL, "Browse for a Group Policy Object" will be the default text
- lpInitialOU: LPOLESTR; // [in] Initial Domain/Organizational Unit to open focus on
- lpDSPath: LPOLESTR; // [in/out] Pointer to the buffer that receives the Active Directory GPO path
- dwDSPathSize: DWORD; // [in] Size in characters of buffer given in lpDSPath
- lpName: LPOLESTR; // [in/out] Pointer to a buffer that receives either the computer name or
- // the friendly name of the GPO (can be NULL)
- dwNameSize: DWORD; // [in] Size in characters of buffer given in lpName
- gpoType: GROUP_POLICY_OBJECT_TYPE; // [out] Specifies the type of GPO
- gpoHint: GROUP_POLICY_HINT_TYPE; // [out] Specifies a hint of the GPO association
- end;
- {$EXTERNALSYM tag_GPOBROWSEINFO}
- GPOBROWSEINFO = tag_GPOBROWSEINFO;
- {$EXTERNALSYM GPOBROWSEINFO}
- LPGPOBROWSEINFO = ^GPOBROWSEINFO;
- TGpoBrowseInfo = GPOBROWSEINFO;
- PGpoBrowseInfo = LPGPOBROWSEINFO;
-
-function BrowseForGPO(var lpBrowseInfo: GPOBROWSEINFO): HRESULT; stdcall;
-{$EXTERNALSYM BrowseForGPO}
-
-//=============================================================================
-//
-// ImportRSoPData
-//
-// Imports a data file generated by ExportRSoPData
-//
-// lpNameSpace - Namespace to place the data in
-// lpFileName - Filename containing the data
-//
-// Returns: S_OK if successful
-//
-// Notes: The namespace specified in lpNameSpace must exist prior to calling
-// this function.
-//
-//=============================================================================
-
-function ImportRSoPData(lpNameSpace, lpFileName: LPOLESTR): HRESULT; stdcall;
-{$EXTERNALSYM ImportRSoPData}
-
-//=============================================================================
-//
-// ExportRSoPData
-//
-// Exports a WBEM namespace containing RSoP information to a data file.
-// This data file can be imported to a WBEM namespace using ImportRSoPData.
-//
-// lpNameSpace - Namespace to read the data from
-// lpFileName - Filename to receive the data
-//
-// Returns: S_OK if successful
-//
-// Notes: This function should be called twice. Once for the user data
-// and once for the computer data.
-//
-//=============================================================================
-
-function ExportRSoPData(lpNameSpace, lpFileName: LPOLESTR): HRESULT; stdcall;
-{$EXTERNALSYM ExportRSoPData}
-
-implementation
-
-const
- gpeditlib = 'gpedit.dll';
-
-{$IFDEF DYNAMIC_LINK}
-
-var
- _CreateGPOLink: Pointer;
-
-function CreateGPOLink;
-begin
- GetProcedureAddress(_CreateGPOLink, gpeditlib, 'CreateGPOLink');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreateGPOLink]
- end;
-end;
-
-var
- _DeleteGPOLink: Pointer;
-
-function DeleteGPOLink;
-begin
- GetProcedureAddress(_DeleteGPOLink, gpeditlib, 'DeleteGPOLink');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DeleteGPOLink]
- end;
-end;
-
-var
- _DeleteAllGPOLinks: Pointer;
-
-function DeleteAllGPOLinks;
-begin
- GetProcedureAddress(_DeleteAllGPOLinks, gpeditlib, 'DeleteAllGPOLinks');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DeleteAllGPOLinks]
- end;
-end;
-
-var
- _BrowseForGPO: Pointer;
-
-function BrowseForGPO;
-begin
- GetProcedureAddress(_BrowseForGPO, gpeditlib, 'BrowseForGPO');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_BrowseForGPO]
- end;
-end;
-
-var
- _ImportRSoPData: Pointer;
-
-function ImportRSoPData;
-begin
- GetProcedureAddress(_ImportRSoPData, gpeditlib, 'ImportRSoPData');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ImportRSoPData]
- end;
-end;
-
-var
- _ExportRSoPData: Pointer;
-
-function ExportRSoPData;
-begin
- GetProcedureAddress(_ExportRSoPData, gpeditlib, 'ExportRSoPData');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ExportRSoPData]
- end;
-end;
-
-{$ELSE}
-
-function CreateGPOLink; external gpeditlib name 'CreateGPOLink';
-function DeleteGPOLink; external gpeditlib name 'DeleteGPOLink';
-function DeleteAllGPOLinks; external gpeditlib name 'DeleteAllGPOLinks';
-function BrowseForGPO; external gpeditlib name 'BrowseForGPO';
-function ImportRSoPData; external gpeditlib name 'ImportRSoPData';
-function ExportRSoPData; external gpeditlib name 'ExportRSoPData';
-
-{$ENDIF DYNAMIC_LINK}
-
-end.
+{******************************************************************************}
+{ }
+{ Group Policy API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: gpedit.h, released June 2000. The original Pascal }
+{ code is: GPEdit.pas, released December 2000. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwagpedit.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaGPEdit;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "GPEdit.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ ActiveX {TODO}, JwaPrSht, JwaWinType;
+
+type
+ LPOLESTR = POleStr;
+ {$NODEFINE LPOLESTR}
+
+//-----------------------------------------------------------------------------
+//
+// GPEDIT.H - Definitions and prototypes for Group Policy
+//
+// Copyright 1997-1999, Microsoft Corporation
+//
+//-----------------------------------------------------------------------------
+
+//
+// Terminology
+//
+// Group Policy Editor - The tool to view a Group Policy Object.
+//
+// Group Policy Object - A collection of administrator defined policies.
+// Each Group Policy Object (GPO) has both file system
+// and Active Directory storage available to it.
+//
+// IGPEInformation - The interface MMC Snapin Extensions use to
+// talk to the Group Policy Editor.
+//
+// IGroupPolicyObject - The interface used to create/edit a GPO directly
+// without going through the Group Policy Editor
+//
+
+//
+// Group Policy Editor MMC SnapIn GUID
+//
+// {8FC0B734-A0E1-11d1-A7D3-0000F87571E3}
+
+const
+ CLSID_GPESnapIn: TGUID = (
+ D1:$8fc0b734; D2:$a0e1; D3:$11d1; D4:($a7, $d3, $0, $0, $f8, $75, $71, $e3));
+ {$EXTERNALSYM CLSID_GPESnapIn}
+
+//
+// Group Policy Editor node ids
+//
+
+//
+// Computer Configuration\Windows Settings
+// {8FC0B737-A0E1-11d1-A7D3-0000F87571E3}
+//
+
+ NODEID_Machine: TGUID = (
+ D1:$8fc0b737; D2:$a0e1; D3:$11d1; D4:($a7, $d3, $0, $0, $f8, $75, $71, $e3));
+ {$EXTERNALSYM NODEID_Machine}
+
+//
+// Computer Configuration\Software Settings
+// {8FC0B73A-A0E1-11d1-A7D3-0000F87571E3}
+//
+
+ NODEID_MachineSWSettings: TGUID = (
+ D1:$8fc0b73a; D2:$a0e1; D3:$11d1; D4:($a7, $d3, $0, $0, $f8, $75, $71, $e3));
+ {$EXTERNALSYM NODEID_MachineSWSettings}
+
+//
+// User Configuration\Windows Settings
+// {8FC0B738-A0E1-11d1-A7D3-0000F87571E3}
+//
+
+ NODEID_User: TGUID = (
+ D1:$8fc0b738; D2:$a0e1; D3:$11d1; D4:($a7, $d3, $0, $0, $f8, $75, $71, $e3));
+ {$EXTERNALSYM NODEID_User}
+
+//
+// User Configuration\Software Settings
+// {8FC0B73C-A0E1-11d1-A7D3-0000F87571E3}
+//
+
+ NODEID_UserSWSettings: TGUID = (
+ D1:$8fc0b73c; D2:$a0e1; D3:$11d1; D4:($a7, $d3, $0, $0, $f8, $75, $71, $e3));
+ {$EXTERNALSYM NODEID_UserSWSettings}
+
+//
+// IGPEInformation interface id
+//
+// {8FC0B735-A0E1-11d1-A7D3-0000F87571E3}
+
+ IID_IGPEInformation: TGUID = (
+ D1:$8fc0b735; D2:$a0e1; D3:$11d1; D4:($a7, $d3, $0, $0, $f8, $75, $71, $e3));
+ {$EXTERNALSYM IID_IGPEInformation}
+
+//
+// Group Policy Object class id
+//
+// {EA502722-A23D-11d1-A7D3-0000F87571E3}
+
+ CLSID_GroupPolicyObject: TGUID = (
+ D1:$ea502722; D2:$a23d; D3:$11d1; D4:($a7, $d3, $0, $0, $f8, $75, $71, $e3));
+ {$EXTERNALSYM CLSID_GroupPolicyObject}
+
+//
+// Group Policy Object interface id
+//
+// {EA502723-A23D-11d1-A7D3-0000F87571E3}
+
+ IID_IGroupPolicyObject: TGUID = (
+ D1:$ea502723; D2:$a23d; D3:$11d1; D4:($a7, $d3, $0, $0, $f8, $75, $71, $e3));
+ {$EXTERNALSYM IID_IGroupPolicyObject}
+
+//
+// GUID that identifies the registry extension
+//
+
+ REGISTRY_EXTENSION_GUID: TGUID = (
+ D1:$35378EAC; D2:$683F; D3:$11D2; D4:($A8, $9A, $00, $C0, $4F, $BB, $CF, $A2));
+ {$EXTERNALSYM IID_IGroupPolicyObject}
+
+//========================================================================================
+//
+// Resultant Set of Policy node ids
+//
+//========================================================================================
+
+//
+// Resultant Set of Policy MMC SnapIn GUID
+//
+// {6DC3804B-7212-458D-ADB0-9A07E2AE1FA2}
+
+ CLSID_RSOPSnapIn: TGUID = (
+ D1:$6dc3804b; D2:$7212; D3:$458d; D4:($ad, $b0, $9a, $07, $e2, $ae, $1f, $a2));
+ {$EXTERNALSYM CLSID_RSOPSnapIn}
+
+//
+// Computer Configuration\Windows Settings
+// {BD4C1A2E-0B7A-4A62-A6B0-C0577539C97E}
+//
+
+ NODEID_RSOPMachine: TGUID = (
+ D1:$bd4c1a2e; D2:$0b7a; D3:$4a62; D4:($a6, $b0, $c0, $57, $75, $39, $c9, $7e));
+ {$EXTERNALSYM NODEID_RSOPMachine}
+
+//
+// Computer Configuration\Software Settings
+// {6A76273E-EB8E-45DB-94C5-25663A5f2C1A}
+//
+
+ NODEID_RSOPMachineSWSettings: TGUID = (
+ D1:$6a76273e; D2:$eb8e; D3:$45db; D4:($94, $c5, $25, $66, $3a, $5f, $2c, $1a));
+ {$EXTERNALSYM NODEID_RSOPMachineSWSettings}
+
+//
+// User Configuration\Windows Settings
+// {AB87364F-0CEC-4CD8-9BF8-898F34628FB8}
+//
+
+ NODEID_RSOPUser: TGUID = (
+ D1:$ab87364f; D2:$0cec; D3:$4cd8; D4:($9b, $f8, $89, $8f, $34, $62, $8f, $b8));
+ {$EXTERNALSYM NODEID_RSOPUser}
+
+//
+// User Configuration\Software Settings
+// {E52C5CE3-FD27-4402-84DE-D9A5F2858910}
+//
+
+ NODEID_RSOPUserSWSettings: TGUID = (
+ D1:$e52c5ce3; D2:$fd27; D3:$4402; D4:($84, $de, $d9, $a5, $f2, $85, $89, $10));
+ {$EXTERNALSYM NODEID_RSOPUserSWSettings}
+
+//
+// IRSOPInformation interface id
+//
+// {9A5A81B5-D9C7-49EF-9D11-DDF50968C48D}
+
+ IID_IRSOPInformation: TGUID = (
+ D1:$9a5a81b5; D2:$d9c7; D3:$49ef; D4:($9d, $11, $dd, $f5, $09, $68, $c4, $8d));
+ {$EXTERNALSYM IID_IRSOPInformation}
+
+// #include <objbase.h>
+
+//
+// Group Policy Object Section flags
+//
+
+const
+ GPO_SECTION_ROOT = 0; // Root
+ {$EXTERNALSYM GPO_SECTION_ROOT}
+ GPO_SECTION_USER = 1; // User
+ {$EXTERNALSYM GPO_SECTION_USER}
+ GPO_SECTION_MACHINE = 2; // Machine
+ {$EXTERNALSYM GPO_SECTION_MACHINE}
+
+//
+// Group Policy Object types
+//
+
+type
+ _GROUP_POLICY_OBJECT_TYPE = (
+ GPOTypeLocal, // GPO on the local machine
+ GPOTypeRemote, // GPO on a remote machine
+ GPOTypeDS); // GPO in the Active Directory
+ {$EXTERNALSYM _GROUP_POLICY_OBJECT_TYPE}
+ GROUP_POLICY_OBJECT_TYPE = _GROUP_POLICY_OBJECT_TYPE;
+ {$EXTERNALSYM GROUP_POLICY_OBJECT_TYPE}
+ PGROUP_POLICY_OBJECT_TYPE = ^GROUP_POLICY_OBJECT_TYPE;
+ {$EXTERNALSYM PGROUP_POLICY_OBJECT_TYPE}
+ TGroupPolicyObjectType = GROUP_POLICY_OBJECT_TYPE;
+ PGroupPolicyObjectType = PGROUP_POLICY_OBJECT_TYPE;
+
+//
+// Group Policy Hint types
+//
+
+ _GROUP_POLICY_HINT_TYPE = (
+ GPHintUnknown, // No link information available
+ GPHintMachine, // GPO linked to a machine (local or remote)
+ GPHintSite, // GPO linked to a site
+ GPHintDomain, // GPO linked to a domain
+ GPHintOrganizationalUnit); // GPO linked to a organizational unit
+ {$EXTERNALSYM _GROUP_POLICY_HINT_TYPE}
+ GROUP_POLICY_HINT_TYPE = _GROUP_POLICY_HINT_TYPE;
+ {$EXTERNALSYM GROUP_POLICY_HINT_TYPE}
+ PGROUP_POLICY_HINT_TYPE = ^GROUP_POLICY_HINT_TYPE;
+ {$EXTERNALSYM PGROUP_POLICY_HINT_TYPE}
+ TGroupPolicyHintType = GROUP_POLICY_HINT_TYPE;
+ PGroupPolicyHintType = PGROUP_POLICY_HINT_TYPE;
+
+ IGPEInformation = interface (IUnknown)
+ ['{8FC0B735-A0E1-11d1-A7D3-0000F87571E3}']
+
+ // *** IGPEInformation methods ***
+
+ //
+ // Returns the unique Group Policy Object name (a GUID)
+ //
+ // pszName contains the name on return
+ // cchMaxLength is the max number of characters that can be stored in pszName
+ //
+
+ function GetName(pszName: LPOLESTR; cchMaxLength: Integer): HRESULT; stdcall;
+
+ //
+ // Returns the friendly display name for this Group Policy Object
+ //
+ // pszName contains the name on return
+ // cchMaxLength is the max number of characters that can be stored in pszName
+ //
+
+ function GetDisplayName(pszName: LPOLESTR; cchMaxLength: Integer): HRESULT; stdcall;
+
+ //
+ // Returns a registry key handle for the requested section. The returned
+ // key is the root of the registry, not the Policies subkey. To set / read
+ // a value in the Policies subkey, you will need to call RegOpenKeyEx to
+ // open Software\Policies subkey first.
+ //
+ // The handle has been opened with ALL ACCESS rights. Call RegCloseKey
+ // on the handle when finished.
+ //
+ // dwSection is either GPO_SECTION_USER or GPO_SECTION_MACHINE
+ // hKey contains the registry key on return
+ //
+
+ function GetRegistryKey(dwSection: DWORD; var hKey: HKEY): HRESULT; stdcall;
+
+ //
+ // Returns the Active Directory path to the root of the request section.
+ // The path is in ADSI name format.
+ //
+ // dwSection is one of the GPO_SECTION_* flags
+ // pszPath contains the path on return
+ // cchMaxPath is the max number of characters that can be stored in pszPath
+ //
+
+ function GetDSPath(dwSection: DWORD; pszPath: LPOLESTR; cchMaxPath: Integer): HRESULT; stdcall;
+
+ //
+ // Returns the UNC path to the root of the requested section.
+ //
+ // dwSection is one of the GPO_SECTION_* flags
+ // pszPath contains the path on return
+ // cchMaxPath is the number of characters that can be stored in pszPath.
+ //
+
+ function GetFileSysPath(dwSection: DWORD; pszPath: LPOLESTR; cchMaxPath: Integer): HRESULT; stdcall;
+
+ //
+ // Returns the user preferences (options)
+ //
+ // Currently, there are no options defined. This is reserved for future use.
+ //
+ // dwOptions receives a bitmask value
+ //
+
+ function GetOptions(var dwOptions: DWORD): HRESULT; stdcall;
+
+ //
+ // Returns the type of GPO being edited.
+ //
+ // The three types are: a GPO in the Active Directory, the GPO on the local machine,
+ // and the GPO on a remote machine.
+ //
+ // Machine GPOs only have file system storage (no Active Directory storage available).
+ // If GetDSPath is called for a machine GPO, the function will succeed
+ // and the returned buffer will be the empty string ""
+ //
+ // Active Directory GPOs have both file system and Active Directory storage available to them.
+ //
+ // gpoType receives one of the type flags listed above.
+ //
+
+ function GetType(var gpoType: GROUP_POLICY_OBJECT_TYPE): HRESULT; stdcall;
+
+ //
+ // Returns the type of Active Directory object (or machine) that could be linked to
+ // this GPO
+ //
+ // This is a hint api only. The GPE does not know which Active Directory objects are
+ // linked to a particular GPO, but it can offer a hint based upon how the
+ // user started the GPE.
+ //
+ // Use this method with great caution. Some extensions might want to
+ // customize their user interface based upon the scoping for this GPO,
+ // but it is easy to offer the wrong namespace. Best advice is to
+ // always offer your full user interface, but if you choose to use this
+ // method, always offer your full user interface if you recieve the
+ // unknown hint back.
+ //
+ // gpHint receives one of the hint flags listed above.
+ //
+
+ function GetHint(var gpHint: GROUP_POLICY_HINT_TYPE): HRESULT; stdcall;
+
+ //
+ // Informs the Group Policy Editor that policy settings have changed.
+ // Extensions MUST call this methold every time a change is made
+ // to a Group Policy Object.
+ //
+ // bMachine specifies if machine or user policy has changed.
+ // bAdd specifies whether this is an add or delete.
+ // pGuidExtension is the guid or unique name of extension that
+ // will process this GPO.
+ // pGuidSnapin is the guid or unique name of snapin that is making
+ // this call
+ //
+
+ function PolicyChanged(bMachine, bAdd: BOOL; const pGuidExtension, pGuidSnapin: GUID): HRESULT; stdcall;
+
+ end;
+ {$EXTERNALSYM IGPEInformation}
+
+ LPGPEINFORMATION = ^IGPEInformation;
+ {$EXTERNALSYM LPGPEINFORMATION}
+
+//
+// Group Policy Object open / creation flags
+//
+
+const
+ GPO_OPEN_LOAD_REGISTRY = $00000001; // Load the registry files
+ {$EXTERNALSYM GPO_OPEN_LOAD_REGISTRY}
+ GPO_OPEN_READ_ONLY = $00000002; // Open the GPO as read only
+ {$EXTERNALSYM GPO_OPEN_READ_ONLY}
+
+//
+// Group Policy Object option flags
+//
+
+const
+ GPO_OPTION_DISABLE_USER = $00000001; // The user portion of this GPO is disabled
+ {$EXTERNALSYM GPO_OPTION_DISABLE_USER}
+ GPO_OPTION_DISABLE_MACHINE = $00000002; // The machine portion of this GPO is disabled
+ {$EXTERNALSYM GPO_OPTION_DISABLE_MACHINE}
+
+type
+ IGroupPolicyObject = interface (IUnknown)
+ ['{EA502723-A23D-11d1-A7D3-0000F87571E3}']
+
+ // *** IGroupPolicyObject methods ***
+
+ //
+ // Creates a new GPO in the Active Directory with the given friendly name
+ // and opens it via OpenDSGPO(). If pszDomainName contains a domain
+ // controller name, the GPO will be created on that DC. If it does not
+ // specify a domain controller name, the method will select a DC on
+ // the callers behalf.
+ //
+ // pszDomainName contains the ADSI path of the domain root
+ // pszDisplayName contains the friendly display name
+ // dwFlags is a bitmask of GPO open / creation flags listed above
+ //
+
+ function New(pszDomainName, pszDisplayName: LPOLESTR; dwFlags: DWORD): HRESULT; stdcall;
+
+ //
+ // Opens the specified Group Policy Object in the Active Directory
+ // based upon the passed in flags. If pszPath contains a domain
+ // controller name, the GPO will be opened on that DC. If it does
+ // not contain a domain controller name, the method will select a
+ // DC on the callers behalf. If the registry is not loaded,
+ // GetRegistryKey() will return E_FAIL.
+ //
+ // pszPath contains the ADSI path to the GPO to open
+ // dwFlags is a bitmask of GPO open / creation flags listed above
+ //
+
+ function OpenDSGPO(pszPath: LPOLESTR; dwFlags: DWORD): HRESULT; stdcall;
+
+ //
+ // Opens the default Group Policy Object on this machine with the
+ // dwFlags options listed above. If the registry is not loaded,
+ // GetRegistryKey() will return E_FAIL.
+ //
+ // dwFlags is a bitmask of GPO open / creation flags listed above
+ //
+
+ function OpenLocalMachineGPO(dwFlags: DWORD): HRESULT; stdcall;
+
+ //
+ // Opens the default Group Policy Object on a remote machine with the
+ // dwFlags options listed above. If the registry is not loaded,
+ // GetRegistryKey() will return E_FAIL.
+ //
+ // pszComputerName contains the machine name in \\machine format
+ // dwFlags is a bitmask of GPO open / creation flags listed above
+ //
+
+ function OpenRemoteMachineGPO(pszComputerName: LPOLESTR; dwFlags: DWORD): HRESULT; stdcall;
+
+ //
+ // Flushes the registry settings to disk and updates the revision
+ // number of the GPO.
+ //
+ // bMachine specifies if machine or user should be saved.
+ // bAdd specifies whether this is an add or delete.
+ // pGuidExtension is the guid or unique name of extension that
+ // will process this GPO.
+ // pGuid is a guid
+ //
+
+ function Save(bMachine, bAdd: BOOL; const pGuidExtension, pGuid: GUID): HRESULT; stdcall;
+
+ //
+ // Deletes this Group Policy Object.
+ //
+ // After calling this method, no other methods are valid to call
+ // since the data will have been deleted.
+ //
+
+ function Delete: HRESULT; stdcall;
+
+ //
+ // Returns the unique Group Policy Object name
+ //
+ // For Active Directory policy objects, this is a GUID
+ // For the local policy object, it is the string "Local"
+ // For remote policy objects, it is the computername
+ //
+ // pszName contains the name on return
+ // cchMaxLength is the max number of characters that can be stored in pszName
+ //
+
+ function GetName(pszName: LPOLESTR; cchMaxLength: Integer): HRESULT; stdcall;
+
+ //
+ // Returns the friendly display name for this Group Policy Object
+ //
+ // pszName contains the name on return
+ // cchMaxLength is the max number of characters that can be stored in pszName
+ //
+
+ function GetDisplayName(pszName: LPOLESTR; cchMaxLength: Integer): HRESULT; stdcall;
+
+ //
+ // Sets the friendly display name for this Group Policy Object
+ //
+ // pszName is the new display name
+ //
+
+ function SetDisplayName(pszName: LPOLESTR): HRESULT; stdcall;
+
+ //
+ // Returns the path to the Group Policy Object
+ //
+ //
+ // If the GPO is an Active Directory object, the path is in ADSI name format.
+ // If the GPO is a machine object, it is a file system path
+ //
+ // pszPath contains the path on return
+ // cchMaxPath is the max number of characters that can be stored in pszPath
+ //
+
+ function GetPath(pszPath: LPOLESTR; cchMaxPath: Integer): HRESULT; stdcall;
+
+ //
+ // Returns the Active Directory path to the root of the request section.
+ // The path is in DN name format.
+ //
+ // dwSection is one of the GPO_SECTION_* flags
+ // pszPath contains the path on return
+ // cchMaxPath is the max number of characters that can be stored in pszPath
+ //
+
+ function GetDSPath(dwSection: DWORD; pszPath: LPOLESTR; cchMaxPath: Integer): HRESULT; stdcall;
+
+ //
+ // Returns the UNC path to the root of the requested section.
+ //
+ // dwSection is one of the GPO_SECTION_* flags
+ // pszPath contains the path on return
+ // cchMaxPath is the number of characters that can be stored in pszPath.
+ //
+
+ function GetFileSysPath(dwSection: DWORD; pszPath: LPOLESTR; cchMaxPath: Integer): HRESULT; stdcall;
+
+ //
+ // Returns a registry key handle for the requested section. The returned
+ // key is the root of the registry, not the Policies subkey. To set / read
+ // a value in the Policies subkey, you will need to call RegOpenKeyEx to
+ // open Software\Policies subkey first.
+ //
+ // The handle has been opened with ALL ACCESS rights. Call RegCloseKey
+ // on the handle when finished.
+ //
+ // If the GPO was loaded / created without the registry being loaded
+ // this method will return E_FAIL.
+ //
+ // dwSection is either GPO_SECTION_USER or GPO_SECTION_MACHINE
+ // hKey contains the registry key on return
+ //
+
+ function GetRegistryKey(dwSection: DWORD; var hKey: HKEY): HRESULT; stdcall;
+
+ //
+ // Returns any options for this Group Policy Object
+ //
+ // dwOptions receives the GPO_OPTION_* flags
+ //
+
+ function GetOptions(var dwOptions: DWORD): HRESULT; stdcall;
+
+ //
+ // Sets any options for this Group Policy Object
+ //
+ // This method sets any options for this GPO. To change
+ // an option, that flag must be set in the mask field.
+ // If the flag is in the mask field, then the dwOptions
+ // field is read for the current state.
+ //
+ // For example: to disable the GPO, make this call
+ //
+ // SetOptions (GPO_OPTION_DISABLED, GPO_OPTION_DISABLED);
+ //
+ // dwOptions specifies one or more GPO_OPTION_* flags
+ // dwMask specificies which of the dwOptions to change
+ //
+
+ function SetOptions(dwOptions, dwMask: DWORD): HRESULT; stdcall;
+
+ //
+ // Returns the type of GPO being edited.
+ //
+ // The three types are: a GPO in the Active Directory, the GPO on the local machine,
+ // and the GPO on a remote machine.
+ //
+ // Machine GPOs only have file system storage (no Active Directory storage available).
+ // If GetDSPath is called for a machine GPO, the function will succeed
+ // and the returned buffer will be the empty string ""
+ //
+ // Active Directory GPOs have both file system and Active Directory storage available to them.
+ //
+ // gpoType receives one of the type flags
+ //
+
+ function GetType(var gpoType: GROUP_POLICY_OBJECT_TYPE): HRESULT; stdcall;
+
+ //
+ // Returns the machine name of the remote GPO
+ //
+ // This method returns the name passed to OpenRemoteMachineGPO.
+ //
+ // pszName contains the name on return
+ // cchMaxLength is the max number of characters that can be stored in pszName
+ //
+
+ function GetMachineName(pszName: LPOLESTR; cchMaxLength: Integer): HRESULT; stdcall;
+
+ //
+ // Returns an array of property sheet pages and the number of pages
+ // in the array
+ //
+ // Note, this method will allocate memory for the array with
+ // LocalAlloc. When finished, the caller should free the array
+ // with LocalFree
+ //
+ // hPages address of the pointer for the array of property sheet pages
+ // uPageCount receives the number of pages in the array
+ //
+
+ function GetPropertySheetPages(var hPages: PHPROPSHEETPAGE; var uPageCount: UINT): HRESULT; stdcall;
+
+ end;
+ {$EXTERNALSYM IGroupPolicyObject}
+
+ LPGROUPPOLICYOBJECT = ^IGroupPolicyObject;
+ {$EXTERNALSYM LPGROUPPOLICYOBJECT}
+
+//
+// RSOP flags
+//
+
+const
+ RSOP_INFO_FLAG_DIAGNOSTIC_MODE = $00000001; // Running in diagnostic mode vs planning mode
+ {$EXTERNALSYM RSOP_INFO_FLAG_DIAGNOSTIC_MODE}
+
+type
+ IRSOPInformation = interface (IUnknown)
+ ['{9A5A81B5-D9C7-49EF-9D11-DDF50968C48D}']
+
+ // *** IRSOPInformation methods ***
+
+ //
+ // Returns the namespace for the RSOP data
+ //
+ // dwSection is either GPO_SECTION_USER or GPO_SECTION_MACHINE
+ // pszName contains the namespace on return
+ // cchMaxLength is the max number of characters that can be stored in pszName
+ //
+
+ function GetNamespace(dwSection: DWORD; pszName: LPOLESTR; cchMaxLength: Integer): HRESULT; stdcall;
+
+ //
+ // Returns information about the RSOP session
+ //
+ // pdwFlags points to a DWORD which contains the flags on return
+ //
+
+ function GetFlags(var pdwFlags: DWORD): HRESULT; stdcall;
+
+ //
+ // Returns the event log text for a specific entry
+ //
+ // lpEventSource - event log source name
+ // lpEventLogName - event log name
+ // lpEventTime - event log time in WMI datetime format
+ // dwEventID - event ID
+ // lpText - Receives a pointer to a buffer containing the text.
+ // The caller should free this buffer with CoTaskMemFree.
+ //
+
+ function GetEventLogEntryText(pszEventSource, pszEventLogName, pszEventTime: LPOLESTR;
+ dwEventID: DWORD; out ppszText: LPOLESTR): HRESULT; stdcall;
+
+ end;
+ {$EXTERNALSYM IRSOPInformation}
+
+ LPRSOPINFORMATION = IRSOPInformation;
+ {$EXTERNALSYM LPRSOPINFORMATION}
+
+//=============================================================================
+//
+// CreateGPOLink
+//
+// Creates a link to a GPO for the specified Site, Domain, or Organizational Unit
+//
+// lpGPO - ADSI path to the GPO
+// lpContainer - ADSI path to the Site, Domain, or Organizational Unit
+// fHighPriority - Create the link as the highest or lowest priority
+//
+// Returns: S_OK if successful
+//
+//=============================================================================
+
+function CreateGPOLink(lpGPO, lpContainer: LPOLESTR; fHighPriority: BOOL): HRESULT; stdcall;
+{$EXTERNALSYM CreateGPOLink}
+
+//=============================================================================
+//
+// DeleteGPOLink
+//
+// Deletes a link to a GPO for the specified Site, Domain, or Organizational Unit
+//
+// lpGPO - ADSI path to the GPO
+// lpContainer - ADSI path to the Site, Domain, or Organizational Unit
+//
+// Returns: S_OK if successful
+//
+//=============================================================================
+
+function DeleteGPOLink(lpGPO, lpContainer: LPOLESTR): HRESULT; stdcall;
+{$EXTERNALSYM DeleteGPOLink}
+
+//=============================================================================
+//
+// DeleteAllGPOLinks
+//
+// Deletes all GPO links for the specified Site, Domain, or Organizational Unit
+//
+// lpContainer - ADSI path to the Site, Domain, or Organizational Unit
+//
+// Returns: S_OK if successful
+//
+//=============================================================================
+
+function DeleteAllGPOLinks(lpContainer: LPOLESTR): HRESULT; stdcall;
+{$EXTERNALSYM DeleteAllGPOLinks}
+
+//=============================================================================
+//
+// BrowseForGPO
+//
+// Displays the GPO browser dialog
+//
+// lpBrowseInfo - Address of a GPOBROWSEINFO structure
+//
+// Returns: S_OK if successful
+//
+//=============================================================================
+
+//
+// Flags passed in the dwFlags field of the GPOBROWSEINFO structure
+//
+
+const
+ GPO_BROWSE_DISABLENEW = $00000001; // Disables the New GPO functionality on all pages except "All"
+ {$EXTERNALSYM GPO_BROWSE_DISABLENEW}
+ GPO_BROWSE_NOCOMPUTERS = $00000002; // Removes the Computers tab
+ {$EXTERNALSYM GPO_BROWSE_NOCOMPUTERS}
+ GPO_BROWSE_NODSGPOS = $00000004; // Removes the Domain/OU and Sites tabs
+ {$EXTERNALSYM GPO_BROWSE_NODSGPOS}
+ GPO_BROWSE_OPENBUTTON = $00000008; // Change the Ok button to say Open
+ {$EXTERNALSYM GPO_BROWSE_OPENBUTTON}
+ GPO_BROWSE_INITTOALL = $00000010; // Initialize the dialog focused on the All pane
+ {$EXTERNALSYM GPO_BROWSE_INITTOALL}
+
+type
+ tag_GPOBROWSEINFO = record
+ dwSize: DWORD; // [in] Initialized to the size of this structure
+ dwFlags: DWORD; // [in] Flags defined above
+ hwndOwner: HWND; // [in] Parent window handle (can be NULL)
+ lpTitle: LPOLESTR; // [in] Title bar text. If NULL, "Browse for a Group Policy Object" will be the default text
+ lpInitialOU: LPOLESTR; // [in] Initial Domain/Organizational Unit to open focus on
+ lpDSPath: LPOLESTR; // [in/out] Pointer to the buffer that receives the Active Directory GPO path
+ dwDSPathSize: DWORD; // [in] Size in characters of buffer given in lpDSPath
+ lpName: LPOLESTR; // [in/out] Pointer to a buffer that receives either the computer name or
+ // the friendly name of the GPO (can be NULL)
+ dwNameSize: DWORD; // [in] Size in characters of buffer given in lpName
+ gpoType: GROUP_POLICY_OBJECT_TYPE; // [out] Specifies the type of GPO
+ gpoHint: GROUP_POLICY_HINT_TYPE; // [out] Specifies a hint of the GPO association
+ end;
+ {$EXTERNALSYM tag_GPOBROWSEINFO}
+ GPOBROWSEINFO = tag_GPOBROWSEINFO;
+ {$EXTERNALSYM GPOBROWSEINFO}
+ LPGPOBROWSEINFO = ^GPOBROWSEINFO;
+ TGpoBrowseInfo = GPOBROWSEINFO;
+ PGpoBrowseInfo = LPGPOBROWSEINFO;
+
+function BrowseForGPO(var lpBrowseInfo: GPOBROWSEINFO): HRESULT; stdcall;
+{$EXTERNALSYM BrowseForGPO}
+
+//=============================================================================
+//
+// ImportRSoPData
+//
+// Imports a data file generated by ExportRSoPData
+//
+// lpNameSpace - Namespace to place the data in
+// lpFileName - Filename containing the data
+//
+// Returns: S_OK if successful
+//
+// Notes: The namespace specified in lpNameSpace must exist prior to calling
+// this function.
+//
+//=============================================================================
+
+function ImportRSoPData(lpNameSpace, lpFileName: LPOLESTR): HRESULT; stdcall;
+{$EXTERNALSYM ImportRSoPData}
+
+//=============================================================================
+//
+// ExportRSoPData
+//
+// Exports a WBEM namespace containing RSoP information to a data file.
+// This data file can be imported to a WBEM namespace using ImportRSoPData.
+//
+// lpNameSpace - Namespace to read the data from
+// lpFileName - Filename to receive the data
+//
+// Returns: S_OK if successful
+//
+// Notes: This function should be called twice. Once for the user data
+// and once for the computer data.
+//
+//=============================================================================
+
+function ExportRSoPData(lpNameSpace, lpFileName: LPOLESTR): HRESULT; stdcall;
+{$EXTERNALSYM ExportRSoPData}
+
+implementation
+
+const
+ gpeditlib = 'gpedit.dll';
+
+{$IFDEF DYNAMIC_LINK}
+
+var
+ _CreateGPOLink: Pointer;
+
+function CreateGPOLink;
+begin
+ GetProcedureAddress(_CreateGPOLink, gpeditlib, 'CreateGPOLink');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreateGPOLink]
+ end;
+end;
+
+var
+ _DeleteGPOLink: Pointer;
+
+function DeleteGPOLink;
+begin
+ GetProcedureAddress(_DeleteGPOLink, gpeditlib, 'DeleteGPOLink');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DeleteGPOLink]
+ end;
+end;
+
+var
+ _DeleteAllGPOLinks: Pointer;
+
+function DeleteAllGPOLinks;
+begin
+ GetProcedureAddress(_DeleteAllGPOLinks, gpeditlib, 'DeleteAllGPOLinks');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DeleteAllGPOLinks]
+ end;
+end;
+
+var
+ _BrowseForGPO: Pointer;
+
+function BrowseForGPO;
+begin
+ GetProcedureAddress(_BrowseForGPO, gpeditlib, 'BrowseForGPO');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_BrowseForGPO]
+ end;
+end;
+
+var
+ _ImportRSoPData: Pointer;
+
+function ImportRSoPData;
+begin
+ GetProcedureAddress(_ImportRSoPData, gpeditlib, 'ImportRSoPData');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ImportRSoPData]
+ end;
+end;
+
+var
+ _ExportRSoPData: Pointer;
+
+function ExportRSoPData;
+begin
+ GetProcedureAddress(_ExportRSoPData, gpeditlib, 'ExportRSoPData');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ExportRSoPData]
+ end;
+end;
+
+{$ELSE}
+
+function CreateGPOLink; external gpeditlib name 'CreateGPOLink';
+function DeleteGPOLink; external gpeditlib name 'DeleteGPOLink';
+function DeleteAllGPOLinks; external gpeditlib name 'DeleteAllGPOLinks';
+function BrowseForGPO; external gpeditlib name 'BrowseForGPO';
+function ImportRSoPData; external gpeditlib name 'ImportRSoPData';
+function ExportRSoPData; external gpeditlib name 'ExportRSoPData';
+
+{$ENDIF DYNAMIC_LINK}
+
+end.
diff --git a/packages/extra/winunits/jwahherror.pas b/packages/extra/winunits/jwahherror.pas
index 40aed27556..46e3fe07d5 100644
--- a/packages/extra/winunits/jwahherror.pas
+++ b/packages/extra/winunits/jwahherror.pas
@@ -1,93 +1,93 @@
-{******************************************************************************}
-{ }
-{ HTML Help Error API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: hherror.h, released Dec 2002. The original Pascal }
-{ code is: HhError.pas, released Dec 2002. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Contributor(s): Robert Chandler (robert att helpware dott net) }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwahherror.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaHhError;
-
-interface
-
-{$WEAKPACKAGEUNIT}
-
-{$I jediapilib.inc}
-
-uses
- JwaWinType, JwaWinError;
-
-// Published: http://support.microsoft.com/default.aspx?scid=kb;en-us;297768
-
-type
- // HH_LAST_ERROR Command Related structures and constants
- // Used by command HH_GET_LAST_ERROR
- // You must call SysFreeString(xx.description) to free BSTR
-
- tagHH_LAST_ERROR = packed record
- cbStruct: Integer; // sizeof this structure
- hr: HRESULT; // Specifies the last error code.
- description: PWideChar; // (BSTR) Specifies a Unicode string containing a description of the error.
- end;
- HH_LAST_ERROR = tagHH_LAST_ERROR;
- THHLastError = tagHH_LAST_ERROR;
-
-// Error codes
-
-const
- HH_E_FILENOTFOUND = HRESULT((ERROR_SEVERITY_ERROR shl 31) or (FACILITY_ITF shl 16) or $0201); // %1 could not be found.
- HH_E_TOPICDOESNOTEXIST = HRESULT((ERROR_SEVERITY_ERROR shl 31) or (FACILITY_ITF shl 16) or $0202); // The requested topic does not exist.
- HH_E_INVALIDHELPFILE = HRESULT((ERROR_SEVERITY_ERROR shl 31) or (FACILITY_ITF shl 16) or $0203); // %1 is not a valid help file.
- HH_E_NOCONTEXTIDS = HRESULT((ERROR_SEVERITY_ERROR shl 31) or (FACILITY_ITF shl 16) or $020A); // Help file does not contain context ids.
- HH_E_CONTEXTIDDOESNTEXIT = HRESULT((ERROR_SEVERITY_ERROR shl 31) or (FACILITY_ITF shl 16) or $020B); // The context id does not exist.
-
- // 0x0300 - 0x03FF reserved for keywords
-
- HH_E_KEYWORD_NOT_FOUND = HRESULT((ERROR_SEVERITY_ERROR shl 31) or (FACILITY_ITF shl 16) or $0300); // no hits found.
- HH_E_KEYWORD_IS_PLACEHOLDER = HRESULT((ERROR_SEVERITY_ERROR shl 31) or (FACILITY_ITF shl 16) or $0301); // keyword is a placeholder or a "runaway" see also.
- HH_E_KEYWORD_NOT_IN_SUBSET = HRESULT((ERROR_SEVERITY_ERROR shl 31) or (FACILITY_ITF shl 16) or $0302); // no hits found because of subset exclusion.
- HH_E_KEYWORD_NOT_IN_INFOTYPE = HRESULT((ERROR_SEVERITY_ERROR shl 31) or (FACILITY_ITF shl 16) or $0303); // no hits found because of infotype exclusion.
- HH_E_KEYWORD_EXCLUDED = HRESULT((ERROR_SEVERITY_ERROR shl 31) or (FACILITY_ITF shl 16) or $0304); // no hits found because of infotype and subset exclusion.
- HH_E_KEYWORD_NOT_SUPPORTED = HRESULT((ERROR_SEVERITY_ERROR shl 31) or (FACILITY_ITF shl 16) or $0305); // no hits found because of keywords not being supported in this mode.
-
-implementation
-
-end.
+{******************************************************************************}
+{ }
+{ HTML Help Error API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: hherror.h, released Dec 2002. The original Pascal }
+{ code is: HhError.pas, released Dec 2002. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Contributor(s): Robert Chandler (robert att helpware dott net) }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwahherror.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaHhError;
+
+interface
+
+{$WEAKPACKAGEUNIT}
+
+{$I jediapilib.inc}
+
+uses
+ JwaWinType, JwaWinError;
+
+// Published: http://support.microsoft.com/default.aspx?scid=kb;en-us;297768
+
+type
+ // HH_LAST_ERROR Command Related structures and constants
+ // Used by command HH_GET_LAST_ERROR
+ // You must call SysFreeString(xx.description) to free BSTR
+
+ tagHH_LAST_ERROR = packed record
+ cbStruct: Integer; // sizeof this structure
+ hr: HRESULT; // Specifies the last error code.
+ description: PWideChar; // (BSTR) Specifies a Unicode string containing a description of the error.
+ end;
+ HH_LAST_ERROR = tagHH_LAST_ERROR;
+ THHLastError = tagHH_LAST_ERROR;
+
+// Error codes
+
+const
+ HH_E_FILENOTFOUND = HRESULT((ERROR_SEVERITY_ERROR shl 31) or (FACILITY_ITF shl 16) or $0201); // %1 could not be found.
+ HH_E_TOPICDOESNOTEXIST = HRESULT((ERROR_SEVERITY_ERROR shl 31) or (FACILITY_ITF shl 16) or $0202); // The requested topic does not exist.
+ HH_E_INVALIDHELPFILE = HRESULT((ERROR_SEVERITY_ERROR shl 31) or (FACILITY_ITF shl 16) or $0203); // %1 is not a valid help file.
+ HH_E_NOCONTEXTIDS = HRESULT((ERROR_SEVERITY_ERROR shl 31) or (FACILITY_ITF shl 16) or $020A); // Help file does not contain context ids.
+ HH_E_CONTEXTIDDOESNTEXIT = HRESULT((ERROR_SEVERITY_ERROR shl 31) or (FACILITY_ITF shl 16) or $020B); // The context id does not exist.
+
+ // 0x0300 - 0x03FF reserved for keywords
+
+ HH_E_KEYWORD_NOT_FOUND = HRESULT((ERROR_SEVERITY_ERROR shl 31) or (FACILITY_ITF shl 16) or $0300); // no hits found.
+ HH_E_KEYWORD_IS_PLACEHOLDER = HRESULT((ERROR_SEVERITY_ERROR shl 31) or (FACILITY_ITF shl 16) or $0301); // keyword is a placeholder or a "runaway" see also.
+ HH_E_KEYWORD_NOT_IN_SUBSET = HRESULT((ERROR_SEVERITY_ERROR shl 31) or (FACILITY_ITF shl 16) or $0302); // no hits found because of subset exclusion.
+ HH_E_KEYWORD_NOT_IN_INFOTYPE = HRESULT((ERROR_SEVERITY_ERROR shl 31) or (FACILITY_ITF shl 16) or $0303); // no hits found because of infotype exclusion.
+ HH_E_KEYWORD_EXCLUDED = HRESULT((ERROR_SEVERITY_ERROR shl 31) or (FACILITY_ITF shl 16) or $0304); // no hits found because of infotype and subset exclusion.
+ HH_E_KEYWORD_NOT_SUPPORTED = HRESULT((ERROR_SEVERITY_ERROR shl 31) or (FACILITY_ITF shl 16) or $0305); // no hits found because of keywords not being supported in this mode.
+
+implementation
+
+end.
diff --git a/packages/extra/winunits/jwahtmlGuid.pas b/packages/extra/winunits/jwahtmlGuid.pas
index 873929827f..5eb5f02232 100644
--- a/packages/extra/winunits/jwahtmlGuid.pas
+++ b/packages/extra/winunits/jwahtmlGuid.pas
@@ -1,90 +1,90 @@
-{******************************************************************************}
-{ }
-{ GUID Definitions for HTML Viewer object API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: htmlguid.h, released November 2002. The original Pascal}
-{ code is: HtmlGuid.pas, released March 2002. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwahtmlGuid.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaHtmlGuid;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "htmlguid.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-const
-// GUID for HTML viewer is: {25336920-03F9-11cf-8FD0-00AA00686F13}
- CLSID_HTMLViewer: TGUID = (D1:$25336920; D2:$3f9; D3:$11cf; D4:($8f, $d0, $0, $aa, $0, $68, $6f, $13));
- {$EXTERNALSYM CLSID_HTMLViewer}
-
-// GUID for BSCB proxy is: {25336922-03F9-11cf-8FD0-00AA00686F13}
- CLSID_HTMLBSCBProxy: TGUID = (D1:$25336922; D2:$3f9; D3:$11cf; D4:($8f, $d0, $0, $aa, $0, $68, $6f, $13));
- {$EXTERNALSYM CLSID_HTMLBSCBProxy}
-
-// The GUID used to identify the TypeLib of the HTML Page
-// {71BC8840-60BB-11cf-8B97-00AA00476DA6}
- GUID_PageTL: TGUID = (D1:$71bc8840; D2:$60bb; D3:$11cf; D4:($8b, $97, $0, $aa, $0, $47, $6d, $a6));
- {$EXTERNALSYM GUID_PageTL}
-
-// The GUID used to identify the Primary dispinterface of the HTML Page
-// {71BC8841-60BB-11cf-8B97-00AA00476DA6}
- IID_PageProps: TGUID = (D1:$71bc8841; D2:$60bb; D3:$11cf; D4:($8b, $97, $0, $aa, $0, $47, $6d, $a6));
- {$EXTERNALSYM IID_PageProps}
-
-// The GUID used to identify the Event dispinterface of the HTML Page
-// The page events are currently commented out but will be added later
-// so I grabbed a guid for the events now.
-// {71BC8842-60BB-11cf-8B97-00AA00476DA6}
- IID_PageEvents: TGUID = (D1:$71bc8842; D2:$60bb; D3:$11cf; D4:($8b, $97, $0, $aa, $0, $47, $6d, $a6));
- {$EXTERNALSYM IID_PageEvents}
-
-// The GUID used to identify the coclass of the HTML Page
-// {71BC8843-60BB-11cf-8B97-00AA00476DA6}
- CLSID_Page: TGUID = (D1:$71bc8843; D2:$60bb; D3:$11cf; D4:($8b, $97, $0, $aa, $0, $47, $6d, $a6));
- {$EXTERNALSYM CLSID_Page}
-
-implementation
-
-end.
+{******************************************************************************}
+{ }
+{ GUID Definitions for HTML Viewer object API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: htmlguid.h, released November 2002. The original Pascal}
+{ code is: HtmlGuid.pas, released March 2002. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwahtmlGuid.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaHtmlGuid;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "htmlguid.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+const
+// GUID for HTML viewer is: {25336920-03F9-11cf-8FD0-00AA00686F13}
+ CLSID_HTMLViewer: TGUID = (D1:$25336920; D2:$3f9; D3:$11cf; D4:($8f, $d0, $0, $aa, $0, $68, $6f, $13));
+ {$EXTERNALSYM CLSID_HTMLViewer}
+
+// GUID for BSCB proxy is: {25336922-03F9-11cf-8FD0-00AA00686F13}
+ CLSID_HTMLBSCBProxy: TGUID = (D1:$25336922; D2:$3f9; D3:$11cf; D4:($8f, $d0, $0, $aa, $0, $68, $6f, $13));
+ {$EXTERNALSYM CLSID_HTMLBSCBProxy}
+
+// The GUID used to identify the TypeLib of the HTML Page
+// {71BC8840-60BB-11cf-8B97-00AA00476DA6}
+ GUID_PageTL: TGUID = (D1:$71bc8840; D2:$60bb; D3:$11cf; D4:($8b, $97, $0, $aa, $0, $47, $6d, $a6));
+ {$EXTERNALSYM GUID_PageTL}
+
+// The GUID used to identify the Primary dispinterface of the HTML Page
+// {71BC8841-60BB-11cf-8B97-00AA00476DA6}
+ IID_PageProps: TGUID = (D1:$71bc8841; D2:$60bb; D3:$11cf; D4:($8b, $97, $0, $aa, $0, $47, $6d, $a6));
+ {$EXTERNALSYM IID_PageProps}
+
+// The GUID used to identify the Event dispinterface of the HTML Page
+// The page events are currently commented out but will be added later
+// so I grabbed a guid for the events now.
+// {71BC8842-60BB-11cf-8B97-00AA00476DA6}
+ IID_PageEvents: TGUID = (D1:$71bc8842; D2:$60bb; D3:$11cf; D4:($8b, $97, $0, $aa, $0, $47, $6d, $a6));
+ {$EXTERNALSYM IID_PageEvents}
+
+// The GUID used to identify the coclass of the HTML Page
+// {71BC8843-60BB-11cf-8B97-00AA00476DA6}
+ CLSID_Page: TGUID = (D1:$71bc8843; D2:$60bb; D3:$11cf; D4:($8b, $97, $0, $aa, $0, $47, $6d, $a6));
+ {$EXTERNALSYM CLSID_Page}
+
+implementation
+
+end.
diff --git a/packages/extra/winunits/jwahtmlhelp.pas b/packages/extra/winunits/jwahtmlhelp.pas
index 7dce61e4aa..9f3dd4a2ce 100644
--- a/packages/extra/winunits/jwahtmlhelp.pas
+++ b/packages/extra/winunits/jwahtmlhelp.pas
@@ -1,831 +1,831 @@
-{******************************************************************************}
-{ }
-{ HTML Help API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: htmlhelp.h, released July 2000. The original Pascal }
-{ code is: HtmlHelp.pas, released September 2000. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Contributor(s): Robert Chandler (robert att helpware dott net) }
-{ Kurt Senfer (ks att siemens dott dk) }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwahtmlhelp.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaHtmlHelp;
-
-{$I jediapilib.inc}
-
-interface
-
-{$WEAKPACKAGEUNIT}
-
-(*$HPPEMIT ''*)
-(*$HPPEMIT '#include "htmlhelp.h"'*)
-(*$HPPEMIT ''*)
-(*$HPPEMIT 'typedef struct tagHH_LAST_ERROR'*)
-(*$HPPEMIT '{'*)
-(*$HPPEMIT ' int cbStruct ;'*)
-(*$HPPEMIT ' HRESULT hr ;'*)
-(*$HPPEMIT ' BSTR description ;'*)
-(*$HPPEMIT '} HH_LAST_ERROR ;'*)
-(*$HPPEMIT ''*)
-
-uses
- {$IFDEF HAS_UNIT_VARIANTS}
- Variants,
- {$ENDIF HAS_UNIT_VARIANTS}
- JwaWinType, JwaWinUser;
-
-// Commands to pass to HtmlHelp()
-
-const
- HH_DISPLAY_TOPIC = $0000;
- {$EXTERNALSYM HH_DISPLAY_TOPIC}
- HH_HELP_FINDER = $0000; // WinHelp equivalent
- {$EXTERNALSYM HH_HELP_FINDER}
- HH_DISPLAY_TOC = $0001; // not currently implemented
- {$EXTERNALSYM HH_DISPLAY_TOC}
- HH_DISPLAY_INDEX = $0002; // not currently implemented
- {$EXTERNALSYM HH_DISPLAY_INDEX}
- HH_DISPLAY_SEARCH = $0003; // not currently implemented
- {$EXTERNALSYM HH_DISPLAY_SEARCH}
- HH_SET_WIN_TYPE = $0004;
- {$EXTERNALSYM HH_SET_WIN_TYPE}
- HH_GET_WIN_TYPE = $0005;
- {$EXTERNALSYM HH_GET_WIN_TYPE}
- HH_GET_WIN_HANDLE = $0006;
- {$EXTERNALSYM HH_GET_WIN_HANDLE}
- HH_ENUM_INFO_TYPE = $0007; // Get Info type name, call repeatedly to enumerate, -1 at end
- {$EXTERNALSYM HH_ENUM_INFO_TYPE}
- HH_SET_INFO_TYPE = $0008; // Add Info type to filter.
- {$EXTERNALSYM HH_SET_INFO_TYPE}
- HH_SYNC = $0009;
- {$EXTERNALSYM HH_SYNC}
- {$IFDEF HTMLHELP11}
- HH_ADD_NAV_UI = $000A; // not currently implemented
- {$EXTERNALSYM HH_ADD_NAV_UI}
- HH_ADD_BUTTON = $000B; // not currently implemented
- {$EXTERNALSYM HH_ADD_BUTTON}
- HH_GETBROWSER_APP = $000C; // not currently implemented
- {$EXTERNALSYM HH_GETBROWSER_APP}
- {$ENDIF HTMLHELP11}
- {$IFDEF HTMLHELP12}
- HH_RESERVED1 = $000A;
- {$EXTERNALSYM HH_RESERVED1}
- HH_RESERVED2 = $000B;
- {$EXTERNALSYM HH_RESERVED2}
- HH_RESERVED3 = $000C;
- {$EXTERNALSYM HH_RESERVED3}
- {$ENDIF HTMLHELP12}
- HH_KEYWORD_LOOKUP = $000D;
- {$EXTERNALSYM HH_KEYWORD_LOOKUP}
- HH_DISPLAY_TEXT_POPUP = $000E; // display string resource id or text in a popup window
- {$EXTERNALSYM HH_DISPLAY_TEXT_POPUP}
- HH_HELP_CONTEXT = $000F; // display mapped numeric value in dwData
- {$EXTERNALSYM HH_HELP_CONTEXT}
- HH_TP_HELP_CONTEXTMENU = $0010; // text popup help, same as WinHelp HELP_CONTEXTMENU
- {$EXTERNALSYM HH_TP_HELP_CONTEXTMENU}
- HH_TP_HELP_WM_HELP = $0011; // text popup help, same as WinHelp HELP_WM_HELP
- {$EXTERNALSYM HH_TP_HELP_WM_HELP}
- HH_CLOSE_ALL = $0012; // close all windows opened directly or indirectly by the caller
- {$EXTERNALSYM HH_CLOSE_ALL}
- HH_ALINK_LOOKUP = $0013; // ALink version of HH_KEYWORD_LOOKUP
- {$EXTERNALSYM HH_ALINK_LOOKUP}
- HH_GET_LAST_ERROR = $0014; // not currently implemented, See HHERROR.h
- {$EXTERNALSYM HH_GET_LAST_ERROR}
- HH_ENUM_CATEGORY = $0015; // Get category name, call repeatedly to enumerate, -1 at end
- {$EXTERNALSYM HH_ENUM_CATEGORY}
- HH_ENUM_CATEGORY_IT = $0016; // Get category info type members, call repeatedly to enumerate, -1 at end
- {$EXTERNALSYM HH_ENUM_CATEGORY_IT}
- HH_RESET_IT_FILTER = $0017; // Clear the info type filter of all info types.
- {$EXTERNALSYM HH_RESET_IT_FILTER}
- HH_SET_INCLUSIVE_FILTER = $0018; // set inclusive filtering method for untyped topics to be included in display
- {$EXTERNALSYM HH_SET_INCLUSIVE_FILTER}
- HH_SET_EXCLUSIVE_FILTER = $0019; // set exclusive filtering method for untyped topics to be excluded from display
- {$EXTERNALSYM HH_SET_EXCLUSIVE_FILTER}
- {$IFDEF HTMLHELP11}
- HH_SET_GUID = $001A; // For Microsoft Installer -- dwData is a pointer to the GUID string
- {$EXTERNALSYM HH_SET_GUID}
- {$ENDIF HTMLHELP11}
- {$IFDEF HTMLHELP12}
- HH_INITIALIZE = $001C; // Initializes the help system.
- {$EXTERNALSYM HH_INITIALIZE}
- HH_UNINITIALIZE = $001D; // Uninitializes the help system.
- {$EXTERNALSYM HH_UNINITIALIZE}
- HH_PRETRANSLATEMESSAGE = $00FD; // Pumps messages. (NULL, NULL, MSG*).
- {$EXTERNALSYM HH_PRETRANSLATEMESSAGE}
- HH_SET_GLOBAL_PROPERTY = $00FC; // Set a global property. (NULL, NULL, HH_GPROP)
- {$EXTERNALSYM HH_SET_GLOBAL_PROPERTY}
- {$ENDIF HTMLHELP12}
-
- {$IFDEF HTMLHELP11}
- HH_INTERNAL = $00FF; // Used internally.
- {$EXTERNALSYM HH_INTERNAL}
- {$ENDIF HTMLHELP11}
-
- {$IFDEF HTMLHELP12}
- HHWIN_PROP_TAB_AUTOHIDESHOW = 1 shl 0; // Automatically hide/show tri-pane window
- {$EXTERNALSYM HHWIN_PROP_TAB_AUTOHIDESHOW}
- {$ENDIF HTMLHELP12}
- HHWIN_PROP_ONTOP = 1 shl 1; // Top-most window (not currently implemented)
- {$EXTERNALSYM HHWIN_PROP_ONTOP}
- HHWIN_PROP_NOTITLEBAR = 1 shl 2; // no title bar
- {$EXTERNALSYM HHWIN_PROP_NOTITLEBAR}
- HHWIN_PROP_NODEF_STYLES = 1 shl 3; // no default window styles (only HH_WINTYPE.dwStyles)
- {$EXTERNALSYM HHWIN_PROP_NODEF_STYLES}
- HHWIN_PROP_NODEF_EXSTYLES = 1 shl 4; // no default extended window styles (only HH_WINTYPE.dwExStyles)
- {$EXTERNALSYM HHWIN_PROP_NODEF_EXSTYLES}
- HHWIN_PROP_TRI_PANE = 1 shl 5; // use a tri-pane window
- {$EXTERNALSYM HHWIN_PROP_TRI_PANE}
- HHWIN_PROP_NOTB_TEXT = 1 shl 6; // no text on toolbar buttons
- {$EXTERNALSYM HHWIN_PROP_NOTB_TEXT}
- HHWIN_PROP_POST_QUIT = 1 shl 7; // post WM_QUIT message when window closes
- {$EXTERNALSYM HHWIN_PROP_POST_QUIT}
- HHWIN_PROP_AUTO_SYNC = 1 shl 8; // automatically ssync contents and index
- {$EXTERNALSYM HHWIN_PROP_AUTO_SYNC}
- HHWIN_PROP_TRACKING = 1 shl 9; // send tracking notification messages
- {$EXTERNALSYM HHWIN_PROP_TRACKING}
- HHWIN_PROP_TAB_SEARCH = 1 shl 10; // include search tab in navigation pane
- {$EXTERNALSYM HHWIN_PROP_TAB_SEARCH}
- HHWIN_PROP_TAB_HISTORY = 1 shl 11; // include history tab in navigation pane
- {$EXTERNALSYM HHWIN_PROP_TAB_HISTORY}
- {$IFDEF HTMLHELP11}
- HHWIN_PROP_TAB_BOOKMARKS = 1 shl 12; // include bookmark tab in navigation pane
- {$EXTERNALSYM HHWIN_PROP_TAB_BOOKMARKS}
- {$ENDIF HTMLHELP11}
- {$IFDEF HTMLHELP12}
- HHWIN_PROP_TAB_FAVORITES = 1 shl 12; // include favorites tab in navigation pane
- {$EXTERNALSYM HHWIN_PROP_TAB_FAVORITES}
- {$ENDIF HTMLHELP12}
- HHWIN_PROP_CHANGE_TITLE = 1 shl 13; // Put current HTML title in title bar
- {$EXTERNALSYM HHWIN_PROP_CHANGE_TITLE}
- HHWIN_PROP_NAV_ONLY_WIN = 1 shl 14; // Only display the navigation window
- {$EXTERNALSYM HHWIN_PROP_NAV_ONLY_WIN}
- HHWIN_PROP_NO_TOOLBAR = 1 shl 15; // Don't display a toolbar
- {$EXTERNALSYM HHWIN_PROP_NO_TOOLBAR}
- HHWIN_PROP_MENU = 1 shl 16; // Menu
- {$EXTERNALSYM HHWIN_PROP_MENU}
- HHWIN_PROP_TAB_ADVSEARCH = 1 shl 17; // Advanced FTS UI.
- {$EXTERNALSYM HHWIN_PROP_TAB_ADVSEARCH}
- HHWIN_PROP_USER_POS = 1 shl 18; // After initial creation, user controls window size/Position
- {$EXTERNALSYM HHWIN_PROP_USER_POS}
-{$IFDEF HTMLHELP12}
- HHWIN_PROP_TAB_CUSTOM1 = 1 shl 19; // Use custom tab #1
- {$EXTERNALSYM HHWIN_PROP_TAB_CUSTOM1}
- HHWIN_PROP_TAB_CUSTOM2 = 1 shl 20; // Use custom tab #2
- {$EXTERNALSYM HHWIN_PROP_TAB_CUSTOM2}
- HHWIN_PROP_TAB_CUSTOM3 = 1 shl 21; // Use custom tab #3
- {$EXTERNALSYM HHWIN_PROP_TAB_CUSTOM3}
- HHWIN_PROP_TAB_CUSTOM4 = 1 shl 22; // Use custom tab #4
- {$EXTERNALSYM HHWIN_PROP_TAB_CUSTOM4}
- HHWIN_PROP_TAB_CUSTOM5 = 1 shl 23; // Use custom tab #5
- {$EXTERNALSYM HHWIN_PROP_TAB_CUSTOM5}
- HHWIN_PROP_TAB_CUSTOM6 = 1 shl 24; // Use custom tab #6
- {$EXTERNALSYM HHWIN_PROP_TAB_CUSTOM6}
- HHWIN_PROP_TAB_CUSTOM7 = 1 shl 25; // Use custom tab #7
- {$EXTERNALSYM HHWIN_PROP_TAB_CUSTOM7}
- HHWIN_PROP_TAB_CUSTOM8 = 1 shl 26; // Use custom tab #8
- {$EXTERNALSYM HHWIN_PROP_TAB_CUSTOM8}
- HHWIN_PROP_TAB_CUSTOM9 = 1 shl 27; // Use custom tab #9
- {$EXTERNALSYM HHWIN_PROP_TAB_CUSTOM9}
- HHWIN_TB_MARGIN = 1 shl 28; // the window type has a margin
- {$EXTERNALSYM HHWIN_TB_MARGIN}
-{$ENDIF HTMLHELP12}
-
- HHWIN_PARAM_PROPERTIES = 1 shl 1; // valid fsWinProperties
- {$EXTERNALSYM HHWIN_PARAM_PROPERTIES}
- HHWIN_PARAM_STYLES = 1 shl 2; // valid dwStyles
- {$EXTERNALSYM HHWIN_PARAM_STYLES}
- HHWIN_PARAM_EXSTYLES = 1 shl 3; // valid dwExStyles
- {$EXTERNALSYM HHWIN_PARAM_EXSTYLES}
- HHWIN_PARAM_RECT = 1 shl 4; // valid rcWindowPos
- {$EXTERNALSYM HHWIN_PARAM_RECT}
- HHWIN_PARAM_NAV_WIDTH = 1 shl 5; // valid iNavWidth
- {$EXTERNALSYM HHWIN_PARAM_NAV_WIDTH}
- HHWIN_PARAM_SHOWSTATE = 1 shl 6; // valid nShowState
- {$EXTERNALSYM HHWIN_PARAM_SHOWSTATE}
- HHWIN_PARAM_INFOTYPES = 1 shl 7; // valid apInfoTypes
- {$EXTERNALSYM HHWIN_PARAM_INFOTYPES}
- HHWIN_PARAM_TB_FLAGS = 1 shl 8; // valid fsToolBarFlags
- {$EXTERNALSYM HHWIN_PARAM_TB_FLAGS}
- HHWIN_PARAM_EXPANSION = 1 shl 9; // valid fNotExpanded
- {$EXTERNALSYM HHWIN_PARAM_EXPANSION}
- HHWIN_PARAM_TABPOS = 1 shl 10; // valid tabpos
- {$EXTERNALSYM HHWIN_PARAM_TABPOS}
- HHWIN_PARAM_TABORDER = 1 shl 11; // valid taborder
- {$EXTERNALSYM HHWIN_PARAM_TABORDER}
- HHWIN_PARAM_HISTORY_COUNT = 1 shl 12; // valid cHistory
- {$EXTERNALSYM HHWIN_PARAM_HISTORY_COUNT}
- HHWIN_PARAM_CUR_TAB = 1 shl 13; // valid curNavType
- {$EXTERNALSYM HHWIN_PARAM_CUR_TAB}
-
- HHWIN_BUTTON_EXPAND = 1 shl 1; // Expand/contract button
- {$EXTERNALSYM HHWIN_BUTTON_EXPAND}
- HHWIN_BUTTON_BACK = 1 shl 2; // Back button
- {$EXTERNALSYM HHWIN_BUTTON_BACK}
- HHWIN_BUTTON_FORWARD = 1 shl 3; // Forward button
- {$EXTERNALSYM HHWIN_BUTTON_FORWARD}
- HHWIN_BUTTON_STOP = 1 shl 4; // Stop button
- {$EXTERNALSYM HHWIN_BUTTON_STOP}
- HHWIN_BUTTON_REFRESH = 1 shl 5; // Refresh button
- {$EXTERNALSYM HHWIN_BUTTON_REFRESH}
- HHWIN_BUTTON_HOME = 1 shl 6; // Home button
- {$EXTERNALSYM HHWIN_BUTTON_HOME}
- HHWIN_BUTTON_BROWSE_FWD = 1 shl 7; // not implemented
- {$EXTERNALSYM HHWIN_BUTTON_BROWSE_FWD}
- HHWIN_BUTTON_BROWSE_BCK = 1 shl 8; // not implemented
- {$EXTERNALSYM HHWIN_BUTTON_BROWSE_BCK}
- HHWIN_BUTTON_NOTES = 1 shl 9; // not implemented
- {$EXTERNALSYM HHWIN_BUTTON_NOTES}
- HHWIN_BUTTON_CONTENTS = 1 shl 10; // not implemented
- {$EXTERNALSYM HHWIN_BUTTON_CONTENTS}
- HHWIN_BUTTON_SYNC = 1 shl 11; // Sync button
- {$EXTERNALSYM HHWIN_BUTTON_SYNC}
- HHWIN_BUTTON_OPTIONS = 1 shl 12; // Options button
- {$EXTERNALSYM HHWIN_BUTTON_OPTIONS}
- HHWIN_BUTTON_PRINT = 1 shl 13; // Print button
- {$EXTERNALSYM HHWIN_BUTTON_PRINT}
- HHWIN_BUTTON_INDEX = 1 shl 14; // not implemented
- {$EXTERNALSYM HHWIN_BUTTON_INDEX}
- HHWIN_BUTTON_SEARCH = 1 shl 15; // not implemented
- {$EXTERNALSYM HHWIN_BUTTON_SEARCH}
- HHWIN_BUTTON_HISTORY = 1 shl 16; // not implemented
- {$EXTERNALSYM HHWIN_BUTTON_HISTORY}
- {$IFDEF HTMLHELP11}
- HHWIN_BUTTON_BOOKMARKS = 1 shl 17; // not implemented
- {$EXTERNALSYM HHWIN_BUTTON_BOOKMARKS}
- {$ENDIF HTMLHELP11}
- {$IFDEF HTMLHELP12}
- HHWIN_BUTTON_FAVORITES = 1 shl 17; // not implemented
- {$EXTERNALSYM HHWIN_BUTTON_FAVORITES}
- {$ENDIF HTMLHELP12}
- HHWIN_BUTTON_JUMP1 = 1 shl 18;
- {$EXTERNALSYM HHWIN_BUTTON_JUMP1}
- HHWIN_BUTTON_JUMP2 = 1 shl 19;
- {$EXTERNALSYM HHWIN_BUTTON_JUMP2}
- HHWIN_BUTTON_ZOOM = 1 shl 20;
- {$EXTERNALSYM HHWIN_BUTTON_ZOOM}
- HHWIN_BUTTON_TOC_NEXT = 1 shl 21;
- {$EXTERNALSYM HHWIN_BUTTON_TOC_NEXT}
- HHWIN_BUTTON_TOC_PREV = 1 shl 22;
- {$EXTERNALSYM HHWIN_BUTTON_TOC_PREV}
-
- HHWIN_DEF_BUTTONS = HHWIN_BUTTON_EXPAND or HHWIN_BUTTON_BACK or
- HHWIN_BUTTON_OPTIONS or HHWIN_BUTTON_PRINT;
- {$EXTERNALSYM HHWIN_DEF_BUTTONS}
-
-// Button IDs
-
- IDTB_EXPAND = 200;
- {$EXTERNALSYM IDTB_EXPAND}
- IDTB_CONTRACT = 201;
- {$EXTERNALSYM IDTB_CONTRACT}
- IDTB_STOP = 202;
- {$EXTERNALSYM IDTB_STOP}
- IDTB_REFRESH = 203;
- {$EXTERNALSYM IDTB_REFRESH}
- IDTB_BACK = 204;
- {$EXTERNALSYM IDTB_BACK}
- IDTB_HOME = 205;
- {$EXTERNALSYM IDTB_HOME}
- IDTB_SYNC = 206;
- {$EXTERNALSYM IDTB_SYNC}
- IDTB_PRINT = 207;
- {$EXTERNALSYM IDTB_PRINT}
- IDTB_OPTIONS = 208;
- {$EXTERNALSYM IDTB_OPTIONS}
- IDTB_FORWARD = 209;
- {$EXTERNALSYM IDTB_FORWARD}
- IDTB_NOTES = 210; // not implemented
- {$EXTERNALSYM IDTB_NOTES}
- IDTB_BROWSE_FWD = 211;
- {$EXTERNALSYM IDTB_BROWSE_FWD}
- IDTB_BROWSE_BACK = 212;
- {$EXTERNALSYM IDTB_BROWSE_BACK}
- IDTB_CONTENTS = 213; // not implemented
- {$EXTERNALSYM IDTB_CONTENTS}
- IDTB_INDEX = 214; // not implemented
- {$EXTERNALSYM IDTB_INDEX}
- IDTB_SEARCH = 215; // not implemented
- {$EXTERNALSYM IDTB_SEARCH}
- IDTB_HISTORY = 216; // not implemented
- {$EXTERNALSYM IDTB_HISTORY}
- {$IFDEF HTMLHELP11}
- IDTB_BOOKMARKS = 217; // not implemented
- {$EXTERNALSYM IDTB_BOOKMARKS}
- {$ENDIF HTMLHELP11}
- {$IFDEF HTMLHELP12}
- IDTB_FAVORITES = 217; // not implemented
- {$EXTERNALSYM IDTB_FAVORITES}
- {$ENDIF HTMLHELP12}
- IDTB_JUMP1 = 218;
- {$EXTERNALSYM IDTB_JUMP1}
- IDTB_JUMP2 = 219;
- {$EXTERNALSYM IDTB_JUMP2}
- IDTB_CUSTOMIZE = 221;
- {$EXTERNALSYM IDTB_CUSTOMIZE}
- IDTB_ZOOM = 222;
- {$EXTERNALSYM IDTB_ZOOM}
- IDTB_TOC_NEXT = 223;
- {$EXTERNALSYM IDTB_TOC_NEXT}
- IDTB_TOC_PREV = 224;
- {$EXTERNALSYM IDTB_TOC_PREV}
-
-// Notification codes
-
- HHN_FIRST = -860;
- {$EXTERNALSYM HHN_FIRST}
- HHN_LAST = -879;
- {$EXTERNALSYM HHN_LAST}
-
- HHN_NAVCOMPLETE = HHN_FIRST - 0;
- {$EXTERNALSYM HHN_NAVCOMPLETE}
- HHN_TRACK = HHN_FIRST - 1;
- {$EXTERNALSYM HHN_TRACK}
- HHN_WINDOW_CREATE = HHN_FIRST - 2;
- {$EXTERNALSYM HHN_WINDOW_CREATE}
-
-type
- PHHLastError = ^THHLastError;
- tagHH_LAST_ERROR = packed record
- cbStruct: INT; // size of this structure
- hr: HRESULT; // the last error code.
- description: LPWSTR; // a description of the error (unicode string - BSTR).
- end;
- THHLastError = tagHH_LAST_ERROR;
-
- PHHNNotify = ^THHNNotify;
- tagHHN_NOTIFY = packed record
- hdr: NMHDR;
- pszUrl: PCSTR; // multibyte null-terminated string
- end;
- {$EXTERNALSYM tagHHN_NOTIFY}
- HHN_NOTIFY = tagHHN_NOTIFY;
- {$EXTERNALSYM HHN_NOTIFY}
- THHNNotify = tagHHN_NOTIFY;
-
- PHHPopup = ^THHPopup;
- tagHH_POPUP = packed record
- cbStruct: Integer; // sizeof this structure
- hinst_: HINSTANCE; // instance handle for string resource
- idString: UINT; // string resource id, or text id if pszFile is specified in HtmlHelp call
- pszText: LPCTSTR; // used if idString is zero
- pt: POINT; // top center of popup window
- clrForeGround: COLORREF; // use -1 for default
- clrBackground: COLORREF; // use -1 for default
- rcMargins: RECT; // amount of space between edges of window and text, -1 for each member to ignore
- pszFont: LPCTSTR; // facename, point size, char set, BOLD ITALIC UNDERLINE
- end;
- {$EXTERNALSYM tagHH_POPUP}
- HH_POPUP = tagHH_POPUP;
- {$EXTERNALSYM HH_POPUP}
- THHPopup = tagHH_POPUP;
-
- PHHAKLink = ^THHAKLink;
- tagHH_AKLINK = packed record
- cbStruct: Integer; // sizeof this structure
- fReserved: BOOL; // must be FALSE (really!)
- pszKeywords: LPCTSTR; // semi-colon separated keywords
- pszUrl: LPCTSTR; // URL to jump to if no keywords found (may be NULL)
- pszMsgText: LPCTSTR; // Message text to display in MessageBox if pszUrl is NULL and no keyword match
- pszMsgTitle: LPCTSTR; // Message text to display in MessageBox if pszUrl is NULL and no keyword match
- pszWindow: LPCTSTR; // Window to display URL in
- fIndexOnFail: BOOL; // Displays index if keyword lookup fails.
- end;
- {$EXTERNALSYM tagHH_AKLINK}
- HH_AKLINK = tagHH_AKLINK;
- {$EXTERNALSYM HH_AKLINK}
- THHAKLink = tagHH_AKLINK;
-
-const
- HHWIN_NAVTYPE_TOC = 0;
- {$EXTERNALSYM HHWIN_NAVTYPE_TOC}
- HHWIN_NAVTYPE_INDEX = 1;
- {$EXTERNALSYM HHWIN_NAVTYPE_INDEX}
- HHWIN_NAVTYPE_SEARCH = 2;
- {$EXTERNALSYM HHWIN_NAVTYPE_SEARCH}
- {$IFDEF HTMLHELP11}
- HHWIN_NAVTYPE_BOOKMARKS = 3;
- {$EXTERNALSYM HHWIN_NAVTYPE_BOOKMARKS}
- HHWIN_NAVTYPE_HISTORY = 4; //not implemented
- {$EXTERNALSYM HHWIN_NAVTYPE_HISTORY}
- {$ENDIF HTMLHELP11}
- {$IFDEF HTMLHELP12}
- HHWIN_NAVTYPE_FAVORITES = 3;
- {$EXTERNALSYM HHWIN_NAVTYPE_FAVORITES}
- HHWIN_NAVTYPE_HISTORY = 4; //not implemented
- {$EXTERNALSYM HHWIN_NAVTYPE_HISTORY}
- HHWIN_NAVTYPE_AUTHOR = 5;
- {$EXTERNALSYM HHWIN_NAVTYPE_AUTHOR}
- HHWIN_NAVTYPE_CUSTOM_FIRST = 11;
- {$EXTERNALSYM HHWIN_NAVTYPE_CUSTOM_FIRST}
-{$ENDIF HTMLHELP12}
-
- IT_INCLUSIVE = 0;
- {$EXTERNALSYM IT_INCLUSIVE}
- IT_EXCLUSIVE = 1;
- {$EXTERNALSYM IT_EXCLUSIVE}
- IT_HIDDEN = 2;
- {$EXTERNALSYM IT_HIDDEN}
-
-type
- PHHEnumIT = ^THHEnumIT;
- tagHH_ENUM_IT = packed record
- cbStruct: Integer; // size of this structure
- iType: Integer; // the type of the information type ie. Inclusive, Exclusive, or Hidden
- pszCatName: LPCSTR; // Set to the name of the Category to enumerate the info types in a category; else NULL
- pszITName: LPCSTR; // volitile pointer to the name of the infotype. Allocated by call. Caller responsible for freeing
- pszITDescription: LPCSTR; // volitile pointer to the description of the infotype.
- end;
- {$EXTERNALSYM tagHH_ENUM_IT}
- HH_ENUM_IT = tagHH_ENUM_IT;
- {$EXTERNALSYM HH_ENUM_IT}
- PHH_ENUM_IT = ^tagHH_ENUM_IT;
- {$EXTERNALSYM PHH_ENUM_IT}
- THHEnumIT = tagHH_ENUM_IT;
-
- PHHEnumCat = ^THHEnumCat;
- tagHH_ENUM_CAT = packed record
- cbStruct: Integer; // size of this structure
- pszCatName: LPCSTR; // volitile pointer to the category name
- pszCatDescription: LPCSTR; // volitile pointer to the category description
- end;
- {$EXTERNALSYM tagHH_ENUM_CAT}
- HH_ENUM_CAT = tagHH_ENUM_CAT;
- {$EXTERNALSYM HH_ENUM_CAT}
- PHH_ENUM_CAT = ^tagHH_ENUM_CAT;
- {$EXTERNALSYM PHH_ENUM_CAT}
- THHEnumCat = tagHH_ENUM_CAT;
-
- PHHSetInfoType = ^THHSetInfoType;
- tagHH_SET_INFOTYPE = packed record
- cbStruct: Integer; // the size of this structure
- pszCatName: LPCSTR; // the name of the category, if any, the InfoType is a member of.
- pszInfoTypeName: LPCSTR; // the name of the info type to add to the filter
- end;
- {$EXTERNALSYM tagHH_SET_INFOTYPE}
- HH_SET_INFOTYPE = tagHH_SET_INFOTYPE;
- {$EXTERNALSYM HH_SET_INFOTYPE}
- PHH_SET_INFOTYPE = ^tagHH_SET_INFOTYPE;
- {$EXTERNALSYM PHH_SET_INFOTYPE}
- THHSetInfoType = tagHH_SET_INFOTYPE;
-
- HH_INFOTYPE = DWORD;
- {$EXTERNALSYM HH_INFOTYPE}
- PHH_INFOTYPE = ^HH_INFOTYPE;
- {$EXTERNALSYM PHH_INFOTYPE}
- PHHInfoType = ^THHInfoType;
- THHInfoType = HH_INFOTYPE;
-
-const
- HHWIN_NAVTAB_TOP = 0;
- {$EXTERNALSYM HHWIN_NAVTAB_TOP}
- HHWIN_NAVTAB_LEFT = 1;
- {$EXTERNALSYM HHWIN_NAVTAB_LEFT}
- HHWIN_NAVTAB_BOTTOM = 2;
- {$EXTERNALSYM HHWIN_NAVTAB_BOTTOM}
-
- HH_MAX_TABS = 19;
- {$EXTERNALSYM HH_MAX_TABS}
-
- HH_TAB_CONTENTS = 0;
- {$EXTERNALSYM HH_TAB_CONTENTS}
- HH_TAB_INDEX = 1;
- {$EXTERNALSYM HH_TAB_INDEX}
- HH_TAB_SEARCH = 2;
- {$EXTERNALSYM HH_TAB_SEARCH}
- {$IFDEF HTMLHELP11}
- HH_TAB_BOOKMARKS = 3;
- {$EXTERNALSYM HH_TAB_BOOKMARKS}
- HH_TAB_HISTORY = 4;
- {$EXTERNALSYM HH_TAB_HISTORY}
- {$ENDIF HTMLHELP11}
- {$IFDEF HTMLHELP12}
- HH_TAB_FAVORITES = 3;
- {$EXTERNALSYM HH_TAB_FAVORITES}
- HH_TAB_HISTORY = 4;
- {$EXTERNALSYM HH_TAB_HISTORY}
- HH_TAB_AUTHOR = 5;
- {$EXTERNALSYM HH_TAB_AUTHOR}
-
- HH_TAB_CUSTOM_FIRST = 11;
- {$EXTERNALSYM HH_TAB_CUSTOM_FIRST}
- HH_TAB_CUSTOM_LAST = HH_MAX_TABS;
- {$EXTERNALSYM HH_TAB_CUSTOM_LAST}
-
- HH_MAX_TABS_CUSTOM = HH_TAB_CUSTOM_LAST - HH_TAB_CUSTOM_FIRST + 1;
- {$EXTERNALSYM HH_MAX_TABS_CUSTOM}
-{$ENDIF HTMLHELP12}
-
-// HH_DISPLAY_SEARCH Command Related Structures and Constants
-
- HH_FTS_DEFAULT_PROXIMITY = -1;
- {$EXTERNALSYM HH_FTS_DEFAULT_PROXIMITY}
-
-type
- PHHFtsQuery = ^THHFtsQuery;
- tagHH_FTS_QUERY = packed record
- cbStruct: Integer; // Sizeof structure in bytes.
- fUniCodeStrings: BOOL; // TRUE if all strings are unicode.
- pszSearchQuery: LPCTSTR; // String containing the search query.
- iProximity: LONG; // Word proximity.
- fStemmedSearch: BOOL; // TRUE for StemmedSearch only.
- fTitleOnly: BOOL; // TRUE for Title search only.
- fExecute: BOOL; // TRUE to initiate the search.
- pszWindow: LPCTSTR; // Window to display in
- end;
- {$EXTERNALSYM tagHH_FTS_QUERY}
- HH_FTS_QUERY = tagHH_FTS_QUERY;
- {$EXTERNALSYM HH_FTS_QUERY}
- THHFtsQuery = tagHH_FTS_QUERY;
-
- PHHWinType = ^THHWinType;
- tagHH_WINTYPE = packed record
- cbStruct: Integer; // IN: size of this structure including all Information Types
- fUniCodeStrings: BOOL; // IN/OUT: TRUE if all strings are in UNICODE
- pszType: LPCTSTR; // IN/OUT: Name of a type of window
- fsValidMembers: DWORD; // IN: Bit flag of valid members (HHWIN_PARAM_)
- fsWinProperties: DWORD; // IN/OUT: Properties/attributes of the window (HHWIN_)
-
- pszCaption: LPCTSTR; // IN/OUT: Window title
- dwStyles: DWORD; // IN/OUT: Window styles
- dwExStyles: DWORD; // IN/OUT: Extended Window styles
- rcWindowPos: RECT; // IN: Starting position, OUT: current position
- nShowState: Integer; // IN: show state (e.g., SW_SHOW)
-
- hwndHelp: HWND; // OUT: window handle
- hwndCaller: HWND; // OUT: who called this window
-
- paInfoTypes: PHHInfoType; // IN: Pointer to an array of Information Types
-
- { The following members are only valid if HHWIN_PROP_TRI_PANE is set }
-
- hwndToolBar: HWND; // OUT: toolbar window in tri-pane window
- hwndNavigation: HWND; // OUT: navigation window in tri-pane window
- hwndHTML: HWND; // OUT: window displaying HTML in tri-pane window
- iNavWidth: Integer; // IN/OUT: width of navigation window
- rcHTML: RECT; // OUT: HTML window coordinates
-
- pszToc: LPCTSTR; // IN: Location of the table of contents file
- pszIndex: LPCTSTR; // IN: Location of the index file
- pszFile: LPCTSTR; // IN: Default location of the html file
- pszHome: LPCTSTR; // IN/OUT: html file to display when Home button is clicked
- fsToolBarFlags: DWORD; // IN: flags controling the appearance of the toolbar
- fNotExpanded: BOOL; // IN: TRUE/FALSE to contract or expand, OUT: current state
- curNavType: Integer; // IN/OUT: UI to display in the navigational pane
- tabpos: Integer; // IN/OUT: HHWIN_NAVTAB_TOP, HHWIN_NAVTAB_LEFT, or HHWIN_NAVTAB_BOTTOM
- idNotify: Integer; // IN: ID to use for WM_NOTIFY messages
- tabOrder: array[0..HH_MAX_TABS] of Byte; // IN/OUT: tab order: Contents, Index, Search, History, Favorites, Reserved 1-5, Custom tabs
- cHistory: Integer; // IN/OUT: number of history items to keep (default is 30)
- pszJump1: LPCTSTR; // Text for HHWIN_BUTTON_JUMP1
- pszJump2: LPCTSTR; // Text for HHWIN_BUTTON_JUMP2
- pszUrlJump1: LPCTSTR; // URL for HHWIN_BUTTON_JUMP1
- pszUrlJump2: LPCTSTR; // URL for HHWIN_BUTTON_JUMP2
- rcMinSize: RECT; // Minimum size for window (ignored in version 1)
- cbInfoTypes: Integer; // size of paInfoTypes;
- {$IFDEF HTMLHELP12}
- pszCustomTabs: LPCTSTR; // multiple zero-terminated Strings
- {$ENDIF HTMLHELP12}
- end;
- {$EXTERNALSYM tagHH_WINTYPE}
- HH_WINTYPE = tagHH_WINTYPE;
- {$EXTERNALSYM HH_WINTYPE}
- PHH_WINTYPE = ^tagHH_WINTYPE;
- {$EXTERNALSYM PHH_WINTYPE}
- THHWinType = tagHH_WINTYPE;
-
-const
- HHACT_TAB_CONTENTS = 0;
- {$EXTERNALSYM HHACT_TAB_CONTENTS}
- HHACT_TAB_INDEX = 1;
- {$EXTERNALSYM HHACT_TAB_INDEX}
- HHACT_TAB_SEARCH = 2;
- {$EXTERNALSYM HHACT_TAB_SEARCH}
- HHACT_TAB_HISTORY = 3;
- {$EXTERNALSYM HHACT_TAB_HISTORY}
- HHACT_TAB_FAVORITES = 4;
- {$EXTERNALSYM HHACT_TAB_FAVORITES}
- HHACT_EXPAND = 5;
- {$EXTERNALSYM HHACT_EXPAND}
- HHACT_CONTRACT = 6;
- {$EXTERNALSYM HHACT_CONTRACT}
- HHACT_BACK = 7;
- {$EXTERNALSYM HHACT_BACK}
- HHACT_FORWARD = 8;
- {$EXTERNALSYM HHACT_FORWARD}
- HHACT_STOP = 9;
- {$EXTERNALSYM HHACT_STOP}
- HHACT_REFRESH = 10;
- {$EXTERNALSYM HHACT_REFRESH}
- HHACT_HOME = 11;
- {$EXTERNALSYM HHACT_HOME}
- HHACT_SYNC = 12;
- {$EXTERNALSYM HHACT_SYNC}
- HHACT_OPTIONS = 13;
- {$EXTERNALSYM HHACT_OPTIONS}
- HHACT_PRINT = 14;
- {$EXTERNALSYM HHACT_PRINT}
- HHACT_HIGHLIGHT = 15;
- {$EXTERNALSYM HHACT_HIGHLIGHT}
- HHACT_CUSTOMIZE = 16;
- {$EXTERNALSYM HHACT_CUSTOMIZE}
- HHACT_JUMP1 = 17;
- {$EXTERNALSYM HHACT_JUMP1}
- HHACT_JUMP2 = 18;
- {$EXTERNALSYM HHACT_JUMP2}
- HHACT_ZOOM = 19;
- {$EXTERNALSYM HHACT_ZOOM}
- HHACT_TOC_NEXT = 20;
- {$EXTERNALSYM HHACT_TOC_NEXT}
- HHACT_TOC_PREV = 21;
- {$EXTERNALSYM HHACT_TOC_PREV}
- HHACT_NOTES = 22;
- {$EXTERNALSYM HHACT_NOTES}
- HHACT_LAST_ENUM = 23;
- {$EXTERNALSYM HHACT_LAST_ENUM}
-
-type
- PHHNTrack = ^THHNTrack;
- tagHHNTRACK = packed record
- hdr: NMHDR;
- pszCurUrl: PCSTR; // Multi-byte, null-terminated string
- idAction: Integer; // HHACT_ value
- phhWinType: PHHWinType; // Current window type structure
- end;
- {$EXTERNALSYM tagHHNTRACK}
- HHNTRACK = tagHHNTRACK;
- {$EXTERNALSYM HHNTRACK}
- THHNTrack = tagHHNTRACK;
-
-function HtmlHelpA(hwndCaller: HWND; pszFile: LPCSTR; uCommand: UINT; dwData: DWORD_PTR): HWND; stdcall;
-{$EXTERNALSYM HtmlHelpA}
-function HtmlHelpW(hwndCaller: HWND; pszFile: LPCWSTR; uCommand: UINT; dwData: DWORD_PTR): HWND; stdcall;
-{$EXTERNALSYM HtmlHelpW}
-function HtmlHelp(hwndCaller: HWND; pszFile: LPCTSTR; uCommand: UINT; dwData: DWORD_PTR): HWND; stdcall;
-
-// Use the following for GetProcAddress to load from hhctrl.ocx
-
-const
- ATOM_HTMLHELP_API_ANSI = LPTSTR(DWORD(WORD(14)));
- {$EXTERNALSYM ATOM_HTMLHELP_API_ANSI}
- ATOM_HTMLHELP_API_UNICODE = LPTSTR(DWORD(WORD(15)));
- {$EXTERNALSYM ATOM_HTMLHELP_API_UNICODE}
-
-{$IFDEF HTMLHELP12}
-// Global Control Properties
-
-const
- HH_GPROPID_SINGLETHREAD = 1; // VARIANT_BOOL: True for single thread
- {$EXTERNALSYM HH_GPROPID_SINGLETHREAD}
- HH_GPROPID_TOOLBAR_MARGIN = 2; // long: Provides a left/right margin around the toolbar.
- {$EXTERNALSYM HH_GPROPID_TOOLBAR_MARGIN}
- HH_GPROPID_UI_LANGUAGE = 3; // long: LangId of the UI.
- {$EXTERNALSYM HH_GPROPID_UI_LANGUAGE}
- HH_GPROPID_CURRENT_SUBSET = 4; // BSTR: Current subset.
- {$EXTERNALSYM HH_GPROPID_CURRENT_SUBSET}
- HH_GPROPID_CONTENT_LANGUAGE = 5; // long: LandId for desired content.
- {$EXTERNALSYM HH_GPROPID_CONTENT_LANGUAGE}
-
-type
- HH_GPROPID = HH_GPROPID_SINGLETHREAD..HH_GPROPID_CONTENT_LANGUAGE;
- {$EXTERNALSYM HH_GPROPID}
- THHGPropID = HH_GPROPID;
-
-// Global Property structure
-
- PHHGlobalProperty = ^THHGlobalProperty;
- tagHH_GLOBAL_PROPERTY = record
- id: THHGPropID;
- Dummy: Integer; // MVB: Added to enforce 8-byte packing
- var_: OleVariant;
- end;
- HH_GLOBAL_PROPERTY = tagHH_GLOBAL_PROPERTY;
- THHGlobalProperty = tagHH_GLOBAL_PROPERTY;
-
-{$ENDIF HTMLHELP12}
-
-implementation
-
-{$IFDEF DYNAMIC_LINK}
-uses
- JwaWinBase, JwaWinError, JwaWinNT, JwaWinReg;
-{$ENDIF DYNAMIC_LINK}
-
-const
- {$IFDEF UNICODE}
- AWSuffix = 'W';
- {$ELSE}
- AWSuffix = 'A';
- {$ENDIF UNICODE}
-
-{$IFDEF DYNAMIC_LINK}
-
-function GetOCXPath: string;
-const
- HHPathRegKey = 'CLSID\{adb880a6-d8ff-11cf-9377-00aa003b7a11}\InprocServer32';
-var
- HHKey: HKEY;
- R, PathSize, ValueType: DWORD;
- Path: string;
-begin
- R := ERROR_PATH_NOT_FOUND;
- if RegOpenKeyExA(HKEY_CLASSES_ROOT, PChar(HHPathRegKey), 0, KEY_QUERY_VALUE, HHKey) = ERROR_SUCCESS then
- begin
- ValueType := 0;
- PathSize := 0;
- if RegQueryValueExA(HHKey, PChar(''), nil, @ValueType, nil, @PathSize) = ERROR_SUCCESS then
- begin
- if ValueType = REG_SZ then
- begin
- SetLength(Path, PathSize);
- R := RegQueryValueExA(HHKey, PChar(''), nil, @ValueType, PByte(Path), @PathSize);
- Result := PChar(Path);
- end;
- end;
- RegCloseKey(HHKey);
- end;
- if R <> ERROR_SUCCESS then
- Result := 'hhctrl.ocx';
-end;
-
-var
- _HtmlHelpA: Pointer;
- _HtmlHelpW: Pointer;
- _HtmlHelp: Pointer;
-
-function HtmlHelpA;
-begin
- GetProcedureAddress(_HtmlHelpA, GetOCXPath, 'HtmlHelpA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_HtmlHelpA]
- end;
-end;
-
-function HtmlHelpW;
-begin
- GetProcedureAddress(_HtmlHelpW, GetOCXPath, 'HtmlHelpW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_HtmlHelpW]
- end;
-end;
-
-function HtmlHelp;
-begin
- GetProcedureAddress(_HtmlHelp, GetOCXPath, 'HtmlHelp' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_HtmlHelp]
- end;
-end;
-
-{$ELSE}
-
-const
- hhctrl = 'hhctrl.ocx';
-
-function HtmlHelpA; external hhctrl name 'HtmlHelpA';
-function HtmlHelpW; external hhctrl name 'HtmlHelpW';
-function HtmlHelp; external hhctrl name 'HtmlHelp' + AWSuffix;
-
-{$ENDIF DYNAMIC_LINK}
-
-end.
+{******************************************************************************}
+{ }
+{ HTML Help API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: htmlhelp.h, released July 2000. The original Pascal }
+{ code is: HtmlHelp.pas, released September 2000. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Contributor(s): Robert Chandler (robert att helpware dott net) }
+{ Kurt Senfer (ks att siemens dott dk) }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwahtmlhelp.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaHtmlHelp;
+
+{$I jediapilib.inc}
+
+interface
+
+{$WEAKPACKAGEUNIT}
+
+(*$HPPEMIT ''*)
+(*$HPPEMIT '#include "htmlhelp.h"'*)
+(*$HPPEMIT ''*)
+(*$HPPEMIT 'typedef struct tagHH_LAST_ERROR'*)
+(*$HPPEMIT '{'*)
+(*$HPPEMIT ' int cbStruct ;'*)
+(*$HPPEMIT ' HRESULT hr ;'*)
+(*$HPPEMIT ' BSTR description ;'*)
+(*$HPPEMIT '} HH_LAST_ERROR ;'*)
+(*$HPPEMIT ''*)
+
+uses
+ {$IFDEF HAS_UNIT_VARIANTS}
+ Variants,
+ {$ENDIF HAS_UNIT_VARIANTS}
+ JwaWinType, JwaWinUser;
+
+// Commands to pass to HtmlHelp()
+
+const
+ HH_DISPLAY_TOPIC = $0000;
+ {$EXTERNALSYM HH_DISPLAY_TOPIC}
+ HH_HELP_FINDER = $0000; // WinHelp equivalent
+ {$EXTERNALSYM HH_HELP_FINDER}
+ HH_DISPLAY_TOC = $0001; // not currently implemented
+ {$EXTERNALSYM HH_DISPLAY_TOC}
+ HH_DISPLAY_INDEX = $0002; // not currently implemented
+ {$EXTERNALSYM HH_DISPLAY_INDEX}
+ HH_DISPLAY_SEARCH = $0003; // not currently implemented
+ {$EXTERNALSYM HH_DISPLAY_SEARCH}
+ HH_SET_WIN_TYPE = $0004;
+ {$EXTERNALSYM HH_SET_WIN_TYPE}
+ HH_GET_WIN_TYPE = $0005;
+ {$EXTERNALSYM HH_GET_WIN_TYPE}
+ HH_GET_WIN_HANDLE = $0006;
+ {$EXTERNALSYM HH_GET_WIN_HANDLE}
+ HH_ENUM_INFO_TYPE = $0007; // Get Info type name, call repeatedly to enumerate, -1 at end
+ {$EXTERNALSYM HH_ENUM_INFO_TYPE}
+ HH_SET_INFO_TYPE = $0008; // Add Info type to filter.
+ {$EXTERNALSYM HH_SET_INFO_TYPE}
+ HH_SYNC = $0009;
+ {$EXTERNALSYM HH_SYNC}
+ {$IFDEF HTMLHELP11}
+ HH_ADD_NAV_UI = $000A; // not currently implemented
+ {$EXTERNALSYM HH_ADD_NAV_UI}
+ HH_ADD_BUTTON = $000B; // not currently implemented
+ {$EXTERNALSYM HH_ADD_BUTTON}
+ HH_GETBROWSER_APP = $000C; // not currently implemented
+ {$EXTERNALSYM HH_GETBROWSER_APP}
+ {$ENDIF HTMLHELP11}
+ {$IFDEF HTMLHELP12}
+ HH_RESERVED1 = $000A;
+ {$EXTERNALSYM HH_RESERVED1}
+ HH_RESERVED2 = $000B;
+ {$EXTERNALSYM HH_RESERVED2}
+ HH_RESERVED3 = $000C;
+ {$EXTERNALSYM HH_RESERVED3}
+ {$ENDIF HTMLHELP12}
+ HH_KEYWORD_LOOKUP = $000D;
+ {$EXTERNALSYM HH_KEYWORD_LOOKUP}
+ HH_DISPLAY_TEXT_POPUP = $000E; // display string resource id or text in a popup window
+ {$EXTERNALSYM HH_DISPLAY_TEXT_POPUP}
+ HH_HELP_CONTEXT = $000F; // display mapped numeric value in dwData
+ {$EXTERNALSYM HH_HELP_CONTEXT}
+ HH_TP_HELP_CONTEXTMENU = $0010; // text popup help, same as WinHelp HELP_CONTEXTMENU
+ {$EXTERNALSYM HH_TP_HELP_CONTEXTMENU}
+ HH_TP_HELP_WM_HELP = $0011; // text popup help, same as WinHelp HELP_WM_HELP
+ {$EXTERNALSYM HH_TP_HELP_WM_HELP}
+ HH_CLOSE_ALL = $0012; // close all windows opened directly or indirectly by the caller
+ {$EXTERNALSYM HH_CLOSE_ALL}
+ HH_ALINK_LOOKUP = $0013; // ALink version of HH_KEYWORD_LOOKUP
+ {$EXTERNALSYM HH_ALINK_LOOKUP}
+ HH_GET_LAST_ERROR = $0014; // not currently implemented, See HHERROR.h
+ {$EXTERNALSYM HH_GET_LAST_ERROR}
+ HH_ENUM_CATEGORY = $0015; // Get category name, call repeatedly to enumerate, -1 at end
+ {$EXTERNALSYM HH_ENUM_CATEGORY}
+ HH_ENUM_CATEGORY_IT = $0016; // Get category info type members, call repeatedly to enumerate, -1 at end
+ {$EXTERNALSYM HH_ENUM_CATEGORY_IT}
+ HH_RESET_IT_FILTER = $0017; // Clear the info type filter of all info types.
+ {$EXTERNALSYM HH_RESET_IT_FILTER}
+ HH_SET_INCLUSIVE_FILTER = $0018; // set inclusive filtering method for untyped topics to be included in display
+ {$EXTERNALSYM HH_SET_INCLUSIVE_FILTER}
+ HH_SET_EXCLUSIVE_FILTER = $0019; // set exclusive filtering method for untyped topics to be excluded from display
+ {$EXTERNALSYM HH_SET_EXCLUSIVE_FILTER}
+ {$IFDEF HTMLHELP11}
+ HH_SET_GUID = $001A; // For Microsoft Installer -- dwData is a pointer to the GUID string
+ {$EXTERNALSYM HH_SET_GUID}
+ {$ENDIF HTMLHELP11}
+ {$IFDEF HTMLHELP12}
+ HH_INITIALIZE = $001C; // Initializes the help system.
+ {$EXTERNALSYM HH_INITIALIZE}
+ HH_UNINITIALIZE = $001D; // Uninitializes the help system.
+ {$EXTERNALSYM HH_UNINITIALIZE}
+ HH_PRETRANSLATEMESSAGE = $00FD; // Pumps messages. (NULL, NULL, MSG*).
+ {$EXTERNALSYM HH_PRETRANSLATEMESSAGE}
+ HH_SET_GLOBAL_PROPERTY = $00FC; // Set a global property. (NULL, NULL, HH_GPROP)
+ {$EXTERNALSYM HH_SET_GLOBAL_PROPERTY}
+ {$ENDIF HTMLHELP12}
+
+ {$IFDEF HTMLHELP11}
+ HH_INTERNAL = $00FF; // Used internally.
+ {$EXTERNALSYM HH_INTERNAL}
+ {$ENDIF HTMLHELP11}
+
+ {$IFDEF HTMLHELP12}
+ HHWIN_PROP_TAB_AUTOHIDESHOW = 1 shl 0; // Automatically hide/show tri-pane window
+ {$EXTERNALSYM HHWIN_PROP_TAB_AUTOHIDESHOW}
+ {$ENDIF HTMLHELP12}
+ HHWIN_PROP_ONTOP = 1 shl 1; // Top-most window (not currently implemented)
+ {$EXTERNALSYM HHWIN_PROP_ONTOP}
+ HHWIN_PROP_NOTITLEBAR = 1 shl 2; // no title bar
+ {$EXTERNALSYM HHWIN_PROP_NOTITLEBAR}
+ HHWIN_PROP_NODEF_STYLES = 1 shl 3; // no default window styles (only HH_WINTYPE.dwStyles)
+ {$EXTERNALSYM HHWIN_PROP_NODEF_STYLES}
+ HHWIN_PROP_NODEF_EXSTYLES = 1 shl 4; // no default extended window styles (only HH_WINTYPE.dwExStyles)
+ {$EXTERNALSYM HHWIN_PROP_NODEF_EXSTYLES}
+ HHWIN_PROP_TRI_PANE = 1 shl 5; // use a tri-pane window
+ {$EXTERNALSYM HHWIN_PROP_TRI_PANE}
+ HHWIN_PROP_NOTB_TEXT = 1 shl 6; // no text on toolbar buttons
+ {$EXTERNALSYM HHWIN_PROP_NOTB_TEXT}
+ HHWIN_PROP_POST_QUIT = 1 shl 7; // post WM_QUIT message when window closes
+ {$EXTERNALSYM HHWIN_PROP_POST_QUIT}
+ HHWIN_PROP_AUTO_SYNC = 1 shl 8; // automatically ssync contents and index
+ {$EXTERNALSYM HHWIN_PROP_AUTO_SYNC}
+ HHWIN_PROP_TRACKING = 1 shl 9; // send tracking notification messages
+ {$EXTERNALSYM HHWIN_PROP_TRACKING}
+ HHWIN_PROP_TAB_SEARCH = 1 shl 10; // include search tab in navigation pane
+ {$EXTERNALSYM HHWIN_PROP_TAB_SEARCH}
+ HHWIN_PROP_TAB_HISTORY = 1 shl 11; // include history tab in navigation pane
+ {$EXTERNALSYM HHWIN_PROP_TAB_HISTORY}
+ {$IFDEF HTMLHELP11}
+ HHWIN_PROP_TAB_BOOKMARKS = 1 shl 12; // include bookmark tab in navigation pane
+ {$EXTERNALSYM HHWIN_PROP_TAB_BOOKMARKS}
+ {$ENDIF HTMLHELP11}
+ {$IFDEF HTMLHELP12}
+ HHWIN_PROP_TAB_FAVORITES = 1 shl 12; // include favorites tab in navigation pane
+ {$EXTERNALSYM HHWIN_PROP_TAB_FAVORITES}
+ {$ENDIF HTMLHELP12}
+ HHWIN_PROP_CHANGE_TITLE = 1 shl 13; // Put current HTML title in title bar
+ {$EXTERNALSYM HHWIN_PROP_CHANGE_TITLE}
+ HHWIN_PROP_NAV_ONLY_WIN = 1 shl 14; // Only display the navigation window
+ {$EXTERNALSYM HHWIN_PROP_NAV_ONLY_WIN}
+ HHWIN_PROP_NO_TOOLBAR = 1 shl 15; // Don't display a toolbar
+ {$EXTERNALSYM HHWIN_PROP_NO_TOOLBAR}
+ HHWIN_PROP_MENU = 1 shl 16; // Menu
+ {$EXTERNALSYM HHWIN_PROP_MENU}
+ HHWIN_PROP_TAB_ADVSEARCH = 1 shl 17; // Advanced FTS UI.
+ {$EXTERNALSYM HHWIN_PROP_TAB_ADVSEARCH}
+ HHWIN_PROP_USER_POS = 1 shl 18; // After initial creation, user controls window size/Position
+ {$EXTERNALSYM HHWIN_PROP_USER_POS}
+{$IFDEF HTMLHELP12}
+ HHWIN_PROP_TAB_CUSTOM1 = 1 shl 19; // Use custom tab #1
+ {$EXTERNALSYM HHWIN_PROP_TAB_CUSTOM1}
+ HHWIN_PROP_TAB_CUSTOM2 = 1 shl 20; // Use custom tab #2
+ {$EXTERNALSYM HHWIN_PROP_TAB_CUSTOM2}
+ HHWIN_PROP_TAB_CUSTOM3 = 1 shl 21; // Use custom tab #3
+ {$EXTERNALSYM HHWIN_PROP_TAB_CUSTOM3}
+ HHWIN_PROP_TAB_CUSTOM4 = 1 shl 22; // Use custom tab #4
+ {$EXTERNALSYM HHWIN_PROP_TAB_CUSTOM4}
+ HHWIN_PROP_TAB_CUSTOM5 = 1 shl 23; // Use custom tab #5
+ {$EXTERNALSYM HHWIN_PROP_TAB_CUSTOM5}
+ HHWIN_PROP_TAB_CUSTOM6 = 1 shl 24; // Use custom tab #6
+ {$EXTERNALSYM HHWIN_PROP_TAB_CUSTOM6}
+ HHWIN_PROP_TAB_CUSTOM7 = 1 shl 25; // Use custom tab #7
+ {$EXTERNALSYM HHWIN_PROP_TAB_CUSTOM7}
+ HHWIN_PROP_TAB_CUSTOM8 = 1 shl 26; // Use custom tab #8
+ {$EXTERNALSYM HHWIN_PROP_TAB_CUSTOM8}
+ HHWIN_PROP_TAB_CUSTOM9 = 1 shl 27; // Use custom tab #9
+ {$EXTERNALSYM HHWIN_PROP_TAB_CUSTOM9}
+ HHWIN_TB_MARGIN = 1 shl 28; // the window type has a margin
+ {$EXTERNALSYM HHWIN_TB_MARGIN}
+{$ENDIF HTMLHELP12}
+
+ HHWIN_PARAM_PROPERTIES = 1 shl 1; // valid fsWinProperties
+ {$EXTERNALSYM HHWIN_PARAM_PROPERTIES}
+ HHWIN_PARAM_STYLES = 1 shl 2; // valid dwStyles
+ {$EXTERNALSYM HHWIN_PARAM_STYLES}
+ HHWIN_PARAM_EXSTYLES = 1 shl 3; // valid dwExStyles
+ {$EXTERNALSYM HHWIN_PARAM_EXSTYLES}
+ HHWIN_PARAM_RECT = 1 shl 4; // valid rcWindowPos
+ {$EXTERNALSYM HHWIN_PARAM_RECT}
+ HHWIN_PARAM_NAV_WIDTH = 1 shl 5; // valid iNavWidth
+ {$EXTERNALSYM HHWIN_PARAM_NAV_WIDTH}
+ HHWIN_PARAM_SHOWSTATE = 1 shl 6; // valid nShowState
+ {$EXTERNALSYM HHWIN_PARAM_SHOWSTATE}
+ HHWIN_PARAM_INFOTYPES = 1 shl 7; // valid apInfoTypes
+ {$EXTERNALSYM HHWIN_PARAM_INFOTYPES}
+ HHWIN_PARAM_TB_FLAGS = 1 shl 8; // valid fsToolBarFlags
+ {$EXTERNALSYM HHWIN_PARAM_TB_FLAGS}
+ HHWIN_PARAM_EXPANSION = 1 shl 9; // valid fNotExpanded
+ {$EXTERNALSYM HHWIN_PARAM_EXPANSION}
+ HHWIN_PARAM_TABPOS = 1 shl 10; // valid tabpos
+ {$EXTERNALSYM HHWIN_PARAM_TABPOS}
+ HHWIN_PARAM_TABORDER = 1 shl 11; // valid taborder
+ {$EXTERNALSYM HHWIN_PARAM_TABORDER}
+ HHWIN_PARAM_HISTORY_COUNT = 1 shl 12; // valid cHistory
+ {$EXTERNALSYM HHWIN_PARAM_HISTORY_COUNT}
+ HHWIN_PARAM_CUR_TAB = 1 shl 13; // valid curNavType
+ {$EXTERNALSYM HHWIN_PARAM_CUR_TAB}
+
+ HHWIN_BUTTON_EXPAND = 1 shl 1; // Expand/contract button
+ {$EXTERNALSYM HHWIN_BUTTON_EXPAND}
+ HHWIN_BUTTON_BACK = 1 shl 2; // Back button
+ {$EXTERNALSYM HHWIN_BUTTON_BACK}
+ HHWIN_BUTTON_FORWARD = 1 shl 3; // Forward button
+ {$EXTERNALSYM HHWIN_BUTTON_FORWARD}
+ HHWIN_BUTTON_STOP = 1 shl 4; // Stop button
+ {$EXTERNALSYM HHWIN_BUTTON_STOP}
+ HHWIN_BUTTON_REFRESH = 1 shl 5; // Refresh button
+ {$EXTERNALSYM HHWIN_BUTTON_REFRESH}
+ HHWIN_BUTTON_HOME = 1 shl 6; // Home button
+ {$EXTERNALSYM HHWIN_BUTTON_HOME}
+ HHWIN_BUTTON_BROWSE_FWD = 1 shl 7; // not implemented
+ {$EXTERNALSYM HHWIN_BUTTON_BROWSE_FWD}
+ HHWIN_BUTTON_BROWSE_BCK = 1 shl 8; // not implemented
+ {$EXTERNALSYM HHWIN_BUTTON_BROWSE_BCK}
+ HHWIN_BUTTON_NOTES = 1 shl 9; // not implemented
+ {$EXTERNALSYM HHWIN_BUTTON_NOTES}
+ HHWIN_BUTTON_CONTENTS = 1 shl 10; // not implemented
+ {$EXTERNALSYM HHWIN_BUTTON_CONTENTS}
+ HHWIN_BUTTON_SYNC = 1 shl 11; // Sync button
+ {$EXTERNALSYM HHWIN_BUTTON_SYNC}
+ HHWIN_BUTTON_OPTIONS = 1 shl 12; // Options button
+ {$EXTERNALSYM HHWIN_BUTTON_OPTIONS}
+ HHWIN_BUTTON_PRINT = 1 shl 13; // Print button
+ {$EXTERNALSYM HHWIN_BUTTON_PRINT}
+ HHWIN_BUTTON_INDEX = 1 shl 14; // not implemented
+ {$EXTERNALSYM HHWIN_BUTTON_INDEX}
+ HHWIN_BUTTON_SEARCH = 1 shl 15; // not implemented
+ {$EXTERNALSYM HHWIN_BUTTON_SEARCH}
+ HHWIN_BUTTON_HISTORY = 1 shl 16; // not implemented
+ {$EXTERNALSYM HHWIN_BUTTON_HISTORY}
+ {$IFDEF HTMLHELP11}
+ HHWIN_BUTTON_BOOKMARKS = 1 shl 17; // not implemented
+ {$EXTERNALSYM HHWIN_BUTTON_BOOKMARKS}
+ {$ENDIF HTMLHELP11}
+ {$IFDEF HTMLHELP12}
+ HHWIN_BUTTON_FAVORITES = 1 shl 17; // not implemented
+ {$EXTERNALSYM HHWIN_BUTTON_FAVORITES}
+ {$ENDIF HTMLHELP12}
+ HHWIN_BUTTON_JUMP1 = 1 shl 18;
+ {$EXTERNALSYM HHWIN_BUTTON_JUMP1}
+ HHWIN_BUTTON_JUMP2 = 1 shl 19;
+ {$EXTERNALSYM HHWIN_BUTTON_JUMP2}
+ HHWIN_BUTTON_ZOOM = 1 shl 20;
+ {$EXTERNALSYM HHWIN_BUTTON_ZOOM}
+ HHWIN_BUTTON_TOC_NEXT = 1 shl 21;
+ {$EXTERNALSYM HHWIN_BUTTON_TOC_NEXT}
+ HHWIN_BUTTON_TOC_PREV = 1 shl 22;
+ {$EXTERNALSYM HHWIN_BUTTON_TOC_PREV}
+
+ HHWIN_DEF_BUTTONS = HHWIN_BUTTON_EXPAND or HHWIN_BUTTON_BACK or
+ HHWIN_BUTTON_OPTIONS or HHWIN_BUTTON_PRINT;
+ {$EXTERNALSYM HHWIN_DEF_BUTTONS}
+
+// Button IDs
+
+ IDTB_EXPAND = 200;
+ {$EXTERNALSYM IDTB_EXPAND}
+ IDTB_CONTRACT = 201;
+ {$EXTERNALSYM IDTB_CONTRACT}
+ IDTB_STOP = 202;
+ {$EXTERNALSYM IDTB_STOP}
+ IDTB_REFRESH = 203;
+ {$EXTERNALSYM IDTB_REFRESH}
+ IDTB_BACK = 204;
+ {$EXTERNALSYM IDTB_BACK}
+ IDTB_HOME = 205;
+ {$EXTERNALSYM IDTB_HOME}
+ IDTB_SYNC = 206;
+ {$EXTERNALSYM IDTB_SYNC}
+ IDTB_PRINT = 207;
+ {$EXTERNALSYM IDTB_PRINT}
+ IDTB_OPTIONS = 208;
+ {$EXTERNALSYM IDTB_OPTIONS}
+ IDTB_FORWARD = 209;
+ {$EXTERNALSYM IDTB_FORWARD}
+ IDTB_NOTES = 210; // not implemented
+ {$EXTERNALSYM IDTB_NOTES}
+ IDTB_BROWSE_FWD = 211;
+ {$EXTERNALSYM IDTB_BROWSE_FWD}
+ IDTB_BROWSE_BACK = 212;
+ {$EXTERNALSYM IDTB_BROWSE_BACK}
+ IDTB_CONTENTS = 213; // not implemented
+ {$EXTERNALSYM IDTB_CONTENTS}
+ IDTB_INDEX = 214; // not implemented
+ {$EXTERNALSYM IDTB_INDEX}
+ IDTB_SEARCH = 215; // not implemented
+ {$EXTERNALSYM IDTB_SEARCH}
+ IDTB_HISTORY = 216; // not implemented
+ {$EXTERNALSYM IDTB_HISTORY}
+ {$IFDEF HTMLHELP11}
+ IDTB_BOOKMARKS = 217; // not implemented
+ {$EXTERNALSYM IDTB_BOOKMARKS}
+ {$ENDIF HTMLHELP11}
+ {$IFDEF HTMLHELP12}
+ IDTB_FAVORITES = 217; // not implemented
+ {$EXTERNALSYM IDTB_FAVORITES}
+ {$ENDIF HTMLHELP12}
+ IDTB_JUMP1 = 218;
+ {$EXTERNALSYM IDTB_JUMP1}
+ IDTB_JUMP2 = 219;
+ {$EXTERNALSYM IDTB_JUMP2}
+ IDTB_CUSTOMIZE = 221;
+ {$EXTERNALSYM IDTB_CUSTOMIZE}
+ IDTB_ZOOM = 222;
+ {$EXTERNALSYM IDTB_ZOOM}
+ IDTB_TOC_NEXT = 223;
+ {$EXTERNALSYM IDTB_TOC_NEXT}
+ IDTB_TOC_PREV = 224;
+ {$EXTERNALSYM IDTB_TOC_PREV}
+
+// Notification codes
+
+ HHN_FIRST = -860;
+ {$EXTERNALSYM HHN_FIRST}
+ HHN_LAST = -879;
+ {$EXTERNALSYM HHN_LAST}
+
+ HHN_NAVCOMPLETE = HHN_FIRST - 0;
+ {$EXTERNALSYM HHN_NAVCOMPLETE}
+ HHN_TRACK = HHN_FIRST - 1;
+ {$EXTERNALSYM HHN_TRACK}
+ HHN_WINDOW_CREATE = HHN_FIRST - 2;
+ {$EXTERNALSYM HHN_WINDOW_CREATE}
+
+type
+ PHHLastError = ^THHLastError;
+ tagHH_LAST_ERROR = packed record
+ cbStruct: INT; // size of this structure
+ hr: HRESULT; // the last error code.
+ description: LPWSTR; // a description of the error (unicode string - BSTR).
+ end;
+ THHLastError = tagHH_LAST_ERROR;
+
+ PHHNNotify = ^THHNNotify;
+ tagHHN_NOTIFY = packed record
+ hdr: NMHDR;
+ pszUrl: PCSTR; // multibyte null-terminated string
+ end;
+ {$EXTERNALSYM tagHHN_NOTIFY}
+ HHN_NOTIFY = tagHHN_NOTIFY;
+ {$EXTERNALSYM HHN_NOTIFY}
+ THHNNotify = tagHHN_NOTIFY;
+
+ PHHPopup = ^THHPopup;
+ tagHH_POPUP = packed record
+ cbStruct: Integer; // sizeof this structure
+ hinst_: HINSTANCE; // instance handle for string resource
+ idString: UINT; // string resource id, or text id if pszFile is specified in HtmlHelp call
+ pszText: LPCTSTR; // used if idString is zero
+ pt: POINT; // top center of popup window
+ clrForeGround: COLORREF; // use -1 for default
+ clrBackground: COLORREF; // use -1 for default
+ rcMargins: RECT; // amount of space between edges of window and text, -1 for each member to ignore
+ pszFont: LPCTSTR; // facename, point size, char set, BOLD ITALIC UNDERLINE
+ end;
+ {$EXTERNALSYM tagHH_POPUP}
+ HH_POPUP = tagHH_POPUP;
+ {$EXTERNALSYM HH_POPUP}
+ THHPopup = tagHH_POPUP;
+
+ PHHAKLink = ^THHAKLink;
+ tagHH_AKLINK = packed record
+ cbStruct: Integer; // sizeof this structure
+ fReserved: BOOL; // must be FALSE (really!)
+ pszKeywords: LPCTSTR; // semi-colon separated keywords
+ pszUrl: LPCTSTR; // URL to jump to if no keywords found (may be NULL)
+ pszMsgText: LPCTSTR; // Message text to display in MessageBox if pszUrl is NULL and no keyword match
+ pszMsgTitle: LPCTSTR; // Message text to display in MessageBox if pszUrl is NULL and no keyword match
+ pszWindow: LPCTSTR; // Window to display URL in
+ fIndexOnFail: BOOL; // Displays index if keyword lookup fails.
+ end;
+ {$EXTERNALSYM tagHH_AKLINK}
+ HH_AKLINK = tagHH_AKLINK;
+ {$EXTERNALSYM HH_AKLINK}
+ THHAKLink = tagHH_AKLINK;
+
+const
+ HHWIN_NAVTYPE_TOC = 0;
+ {$EXTERNALSYM HHWIN_NAVTYPE_TOC}
+ HHWIN_NAVTYPE_INDEX = 1;
+ {$EXTERNALSYM HHWIN_NAVTYPE_INDEX}
+ HHWIN_NAVTYPE_SEARCH = 2;
+ {$EXTERNALSYM HHWIN_NAVTYPE_SEARCH}
+ {$IFDEF HTMLHELP11}
+ HHWIN_NAVTYPE_BOOKMARKS = 3;
+ {$EXTERNALSYM HHWIN_NAVTYPE_BOOKMARKS}
+ HHWIN_NAVTYPE_HISTORY = 4; //not implemented
+ {$EXTERNALSYM HHWIN_NAVTYPE_HISTORY}
+ {$ENDIF HTMLHELP11}
+ {$IFDEF HTMLHELP12}
+ HHWIN_NAVTYPE_FAVORITES = 3;
+ {$EXTERNALSYM HHWIN_NAVTYPE_FAVORITES}
+ HHWIN_NAVTYPE_HISTORY = 4; //not implemented
+ {$EXTERNALSYM HHWIN_NAVTYPE_HISTORY}
+ HHWIN_NAVTYPE_AUTHOR = 5;
+ {$EXTERNALSYM HHWIN_NAVTYPE_AUTHOR}
+ HHWIN_NAVTYPE_CUSTOM_FIRST = 11;
+ {$EXTERNALSYM HHWIN_NAVTYPE_CUSTOM_FIRST}
+{$ENDIF HTMLHELP12}
+
+ IT_INCLUSIVE = 0;
+ {$EXTERNALSYM IT_INCLUSIVE}
+ IT_EXCLUSIVE = 1;
+ {$EXTERNALSYM IT_EXCLUSIVE}
+ IT_HIDDEN = 2;
+ {$EXTERNALSYM IT_HIDDEN}
+
+type
+ PHHEnumIT = ^THHEnumIT;
+ tagHH_ENUM_IT = packed record
+ cbStruct: Integer; // size of this structure
+ iType: Integer; // the type of the information type ie. Inclusive, Exclusive, or Hidden
+ pszCatName: LPCSTR; // Set to the name of the Category to enumerate the info types in a category; else NULL
+ pszITName: LPCSTR; // volitile pointer to the name of the infotype. Allocated by call. Caller responsible for freeing
+ pszITDescription: LPCSTR; // volitile pointer to the description of the infotype.
+ end;
+ {$EXTERNALSYM tagHH_ENUM_IT}
+ HH_ENUM_IT = tagHH_ENUM_IT;
+ {$EXTERNALSYM HH_ENUM_IT}
+ PHH_ENUM_IT = ^tagHH_ENUM_IT;
+ {$EXTERNALSYM PHH_ENUM_IT}
+ THHEnumIT = tagHH_ENUM_IT;
+
+ PHHEnumCat = ^THHEnumCat;
+ tagHH_ENUM_CAT = packed record
+ cbStruct: Integer; // size of this structure
+ pszCatName: LPCSTR; // volitile pointer to the category name
+ pszCatDescription: LPCSTR; // volitile pointer to the category description
+ end;
+ {$EXTERNALSYM tagHH_ENUM_CAT}
+ HH_ENUM_CAT = tagHH_ENUM_CAT;
+ {$EXTERNALSYM HH_ENUM_CAT}
+ PHH_ENUM_CAT = ^tagHH_ENUM_CAT;
+ {$EXTERNALSYM PHH_ENUM_CAT}
+ THHEnumCat = tagHH_ENUM_CAT;
+
+ PHHSetInfoType = ^THHSetInfoType;
+ tagHH_SET_INFOTYPE = packed record
+ cbStruct: Integer; // the size of this structure
+ pszCatName: LPCSTR; // the name of the category, if any, the InfoType is a member of.
+ pszInfoTypeName: LPCSTR; // the name of the info type to add to the filter
+ end;
+ {$EXTERNALSYM tagHH_SET_INFOTYPE}
+ HH_SET_INFOTYPE = tagHH_SET_INFOTYPE;
+ {$EXTERNALSYM HH_SET_INFOTYPE}
+ PHH_SET_INFOTYPE = ^tagHH_SET_INFOTYPE;
+ {$EXTERNALSYM PHH_SET_INFOTYPE}
+ THHSetInfoType = tagHH_SET_INFOTYPE;
+
+ HH_INFOTYPE = DWORD;
+ {$EXTERNALSYM HH_INFOTYPE}
+ PHH_INFOTYPE = ^HH_INFOTYPE;
+ {$EXTERNALSYM PHH_INFOTYPE}
+ PHHInfoType = ^THHInfoType;
+ THHInfoType = HH_INFOTYPE;
+
+const
+ HHWIN_NAVTAB_TOP = 0;
+ {$EXTERNALSYM HHWIN_NAVTAB_TOP}
+ HHWIN_NAVTAB_LEFT = 1;
+ {$EXTERNALSYM HHWIN_NAVTAB_LEFT}
+ HHWIN_NAVTAB_BOTTOM = 2;
+ {$EXTERNALSYM HHWIN_NAVTAB_BOTTOM}
+
+ HH_MAX_TABS = 19;
+ {$EXTERNALSYM HH_MAX_TABS}
+
+ HH_TAB_CONTENTS = 0;
+ {$EXTERNALSYM HH_TAB_CONTENTS}
+ HH_TAB_INDEX = 1;
+ {$EXTERNALSYM HH_TAB_INDEX}
+ HH_TAB_SEARCH = 2;
+ {$EXTERNALSYM HH_TAB_SEARCH}
+ {$IFDEF HTMLHELP11}
+ HH_TAB_BOOKMARKS = 3;
+ {$EXTERNALSYM HH_TAB_BOOKMARKS}
+ HH_TAB_HISTORY = 4;
+ {$EXTERNALSYM HH_TAB_HISTORY}
+ {$ENDIF HTMLHELP11}
+ {$IFDEF HTMLHELP12}
+ HH_TAB_FAVORITES = 3;
+ {$EXTERNALSYM HH_TAB_FAVORITES}
+ HH_TAB_HISTORY = 4;
+ {$EXTERNALSYM HH_TAB_HISTORY}
+ HH_TAB_AUTHOR = 5;
+ {$EXTERNALSYM HH_TAB_AUTHOR}
+
+ HH_TAB_CUSTOM_FIRST = 11;
+ {$EXTERNALSYM HH_TAB_CUSTOM_FIRST}
+ HH_TAB_CUSTOM_LAST = HH_MAX_TABS;
+ {$EXTERNALSYM HH_TAB_CUSTOM_LAST}
+
+ HH_MAX_TABS_CUSTOM = HH_TAB_CUSTOM_LAST - HH_TAB_CUSTOM_FIRST + 1;
+ {$EXTERNALSYM HH_MAX_TABS_CUSTOM}
+{$ENDIF HTMLHELP12}
+
+// HH_DISPLAY_SEARCH Command Related Structures and Constants
+
+ HH_FTS_DEFAULT_PROXIMITY = -1;
+ {$EXTERNALSYM HH_FTS_DEFAULT_PROXIMITY}
+
+type
+ PHHFtsQuery = ^THHFtsQuery;
+ tagHH_FTS_QUERY = packed record
+ cbStruct: Integer; // Sizeof structure in bytes.
+ fUniCodeStrings: BOOL; // TRUE if all strings are unicode.
+ pszSearchQuery: LPCTSTR; // String containing the search query.
+ iProximity: LONG; // Word proximity.
+ fStemmedSearch: BOOL; // TRUE for StemmedSearch only.
+ fTitleOnly: BOOL; // TRUE for Title search only.
+ fExecute: BOOL; // TRUE to initiate the search.
+ pszWindow: LPCTSTR; // Window to display in
+ end;
+ {$EXTERNALSYM tagHH_FTS_QUERY}
+ HH_FTS_QUERY = tagHH_FTS_QUERY;
+ {$EXTERNALSYM HH_FTS_QUERY}
+ THHFtsQuery = tagHH_FTS_QUERY;
+
+ PHHWinType = ^THHWinType;
+ tagHH_WINTYPE = packed record
+ cbStruct: Integer; // IN: size of this structure including all Information Types
+ fUniCodeStrings: BOOL; // IN/OUT: TRUE if all strings are in UNICODE
+ pszType: LPCTSTR; // IN/OUT: Name of a type of window
+ fsValidMembers: DWORD; // IN: Bit flag of valid members (HHWIN_PARAM_)
+ fsWinProperties: DWORD; // IN/OUT: Properties/attributes of the window (HHWIN_)
+
+ pszCaption: LPCTSTR; // IN/OUT: Window title
+ dwStyles: DWORD; // IN/OUT: Window styles
+ dwExStyles: DWORD; // IN/OUT: Extended Window styles
+ rcWindowPos: RECT; // IN: Starting position, OUT: current position
+ nShowState: Integer; // IN: show state (e.g., SW_SHOW)
+
+ hwndHelp: HWND; // OUT: window handle
+ hwndCaller: HWND; // OUT: who called this window
+
+ paInfoTypes: PHHInfoType; // IN: Pointer to an array of Information Types
+
+ { The following members are only valid if HHWIN_PROP_TRI_PANE is set }
+
+ hwndToolBar: HWND; // OUT: toolbar window in tri-pane window
+ hwndNavigation: HWND; // OUT: navigation window in tri-pane window
+ hwndHTML: HWND; // OUT: window displaying HTML in tri-pane window
+ iNavWidth: Integer; // IN/OUT: width of navigation window
+ rcHTML: RECT; // OUT: HTML window coordinates
+
+ pszToc: LPCTSTR; // IN: Location of the table of contents file
+ pszIndex: LPCTSTR; // IN: Location of the index file
+ pszFile: LPCTSTR; // IN: Default location of the html file
+ pszHome: LPCTSTR; // IN/OUT: html file to display when Home button is clicked
+ fsToolBarFlags: DWORD; // IN: flags controling the appearance of the toolbar
+ fNotExpanded: BOOL; // IN: TRUE/FALSE to contract or expand, OUT: current state
+ curNavType: Integer; // IN/OUT: UI to display in the navigational pane
+ tabpos: Integer; // IN/OUT: HHWIN_NAVTAB_TOP, HHWIN_NAVTAB_LEFT, or HHWIN_NAVTAB_BOTTOM
+ idNotify: Integer; // IN: ID to use for WM_NOTIFY messages
+ tabOrder: array[0..HH_MAX_TABS] of Byte; // IN/OUT: tab order: Contents, Index, Search, History, Favorites, Reserved 1-5, Custom tabs
+ cHistory: Integer; // IN/OUT: number of history items to keep (default is 30)
+ pszJump1: LPCTSTR; // Text for HHWIN_BUTTON_JUMP1
+ pszJump2: LPCTSTR; // Text for HHWIN_BUTTON_JUMP2
+ pszUrlJump1: LPCTSTR; // URL for HHWIN_BUTTON_JUMP1
+ pszUrlJump2: LPCTSTR; // URL for HHWIN_BUTTON_JUMP2
+ rcMinSize: RECT; // Minimum size for window (ignored in version 1)
+ cbInfoTypes: Integer; // size of paInfoTypes;
+ {$IFDEF HTMLHELP12}
+ pszCustomTabs: LPCTSTR; // multiple zero-terminated Strings
+ {$ENDIF HTMLHELP12}
+ end;
+ {$EXTERNALSYM tagHH_WINTYPE}
+ HH_WINTYPE = tagHH_WINTYPE;
+ {$EXTERNALSYM HH_WINTYPE}
+ PHH_WINTYPE = ^tagHH_WINTYPE;
+ {$EXTERNALSYM PHH_WINTYPE}
+ THHWinType = tagHH_WINTYPE;
+
+const
+ HHACT_TAB_CONTENTS = 0;
+ {$EXTERNALSYM HHACT_TAB_CONTENTS}
+ HHACT_TAB_INDEX = 1;
+ {$EXTERNALSYM HHACT_TAB_INDEX}
+ HHACT_TAB_SEARCH = 2;
+ {$EXTERNALSYM HHACT_TAB_SEARCH}
+ HHACT_TAB_HISTORY = 3;
+ {$EXTERNALSYM HHACT_TAB_HISTORY}
+ HHACT_TAB_FAVORITES = 4;
+ {$EXTERNALSYM HHACT_TAB_FAVORITES}
+ HHACT_EXPAND = 5;
+ {$EXTERNALSYM HHACT_EXPAND}
+ HHACT_CONTRACT = 6;
+ {$EXTERNALSYM HHACT_CONTRACT}
+ HHACT_BACK = 7;
+ {$EXTERNALSYM HHACT_BACK}
+ HHACT_FORWARD = 8;
+ {$EXTERNALSYM HHACT_FORWARD}
+ HHACT_STOP = 9;
+ {$EXTERNALSYM HHACT_STOP}
+ HHACT_REFRESH = 10;
+ {$EXTERNALSYM HHACT_REFRESH}
+ HHACT_HOME = 11;
+ {$EXTERNALSYM HHACT_HOME}
+ HHACT_SYNC = 12;
+ {$EXTERNALSYM HHACT_SYNC}
+ HHACT_OPTIONS = 13;
+ {$EXTERNALSYM HHACT_OPTIONS}
+ HHACT_PRINT = 14;
+ {$EXTERNALSYM HHACT_PRINT}
+ HHACT_HIGHLIGHT = 15;
+ {$EXTERNALSYM HHACT_HIGHLIGHT}
+ HHACT_CUSTOMIZE = 16;
+ {$EXTERNALSYM HHACT_CUSTOMIZE}
+ HHACT_JUMP1 = 17;
+ {$EXTERNALSYM HHACT_JUMP1}
+ HHACT_JUMP2 = 18;
+ {$EXTERNALSYM HHACT_JUMP2}
+ HHACT_ZOOM = 19;
+ {$EXTERNALSYM HHACT_ZOOM}
+ HHACT_TOC_NEXT = 20;
+ {$EXTERNALSYM HHACT_TOC_NEXT}
+ HHACT_TOC_PREV = 21;
+ {$EXTERNALSYM HHACT_TOC_PREV}
+ HHACT_NOTES = 22;
+ {$EXTERNALSYM HHACT_NOTES}
+ HHACT_LAST_ENUM = 23;
+ {$EXTERNALSYM HHACT_LAST_ENUM}
+
+type
+ PHHNTrack = ^THHNTrack;
+ tagHHNTRACK = packed record
+ hdr: NMHDR;
+ pszCurUrl: PCSTR; // Multi-byte, null-terminated string
+ idAction: Integer; // HHACT_ value
+ phhWinType: PHHWinType; // Current window type structure
+ end;
+ {$EXTERNALSYM tagHHNTRACK}
+ HHNTRACK = tagHHNTRACK;
+ {$EXTERNALSYM HHNTRACK}
+ THHNTrack = tagHHNTRACK;
+
+function HtmlHelpA(hwndCaller: HWND; pszFile: LPCSTR; uCommand: UINT; dwData: DWORD_PTR): HWND; stdcall;
+{$EXTERNALSYM HtmlHelpA}
+function HtmlHelpW(hwndCaller: HWND; pszFile: LPCWSTR; uCommand: UINT; dwData: DWORD_PTR): HWND; stdcall;
+{$EXTERNALSYM HtmlHelpW}
+function HtmlHelp(hwndCaller: HWND; pszFile: LPCTSTR; uCommand: UINT; dwData: DWORD_PTR): HWND; stdcall;
+
+// Use the following for GetProcAddress to load from hhctrl.ocx
+
+const
+ ATOM_HTMLHELP_API_ANSI = LPTSTR(DWORD(WORD(14)));
+ {$EXTERNALSYM ATOM_HTMLHELP_API_ANSI}
+ ATOM_HTMLHELP_API_UNICODE = LPTSTR(DWORD(WORD(15)));
+ {$EXTERNALSYM ATOM_HTMLHELP_API_UNICODE}
+
+{$IFDEF HTMLHELP12}
+// Global Control Properties
+
+const
+ HH_GPROPID_SINGLETHREAD = 1; // VARIANT_BOOL: True for single thread
+ {$EXTERNALSYM HH_GPROPID_SINGLETHREAD}
+ HH_GPROPID_TOOLBAR_MARGIN = 2; // long: Provides a left/right margin around the toolbar.
+ {$EXTERNALSYM HH_GPROPID_TOOLBAR_MARGIN}
+ HH_GPROPID_UI_LANGUAGE = 3; // long: LangId of the UI.
+ {$EXTERNALSYM HH_GPROPID_UI_LANGUAGE}
+ HH_GPROPID_CURRENT_SUBSET = 4; // BSTR: Current subset.
+ {$EXTERNALSYM HH_GPROPID_CURRENT_SUBSET}
+ HH_GPROPID_CONTENT_LANGUAGE = 5; // long: LandId for desired content.
+ {$EXTERNALSYM HH_GPROPID_CONTENT_LANGUAGE}
+
+type
+ HH_GPROPID = HH_GPROPID_SINGLETHREAD..HH_GPROPID_CONTENT_LANGUAGE;
+ {$EXTERNALSYM HH_GPROPID}
+ THHGPropID = HH_GPROPID;
+
+// Global Property structure
+
+ PHHGlobalProperty = ^THHGlobalProperty;
+ tagHH_GLOBAL_PROPERTY = record
+ id: THHGPropID;
+ Dummy: Integer; // MVB: Added to enforce 8-byte packing
+ var_: OleVariant;
+ end;
+ HH_GLOBAL_PROPERTY = tagHH_GLOBAL_PROPERTY;
+ THHGlobalProperty = tagHH_GLOBAL_PROPERTY;
+
+{$ENDIF HTMLHELP12}
+
+implementation
+
+{$IFDEF DYNAMIC_LINK}
+uses
+ JwaWinBase, JwaWinError, JwaWinNT, JwaWinReg;
+{$ENDIF DYNAMIC_LINK}
+
+const
+ {$IFDEF UNICODE}
+ AWSuffix = 'W';
+ {$ELSE}
+ AWSuffix = 'A';
+ {$ENDIF UNICODE}
+
+{$IFDEF DYNAMIC_LINK}
+
+function GetOCXPath: string;
+const
+ HHPathRegKey = 'CLSID\{adb880a6-d8ff-11cf-9377-00aa003b7a11}\InprocServer32';
+var
+ HHKey: HKEY;
+ R, PathSize, ValueType: DWORD;
+ Path: string;
+begin
+ R := ERROR_PATH_NOT_FOUND;
+ if RegOpenKeyExA(HKEY_CLASSES_ROOT, PChar(HHPathRegKey), 0, KEY_QUERY_VALUE, HHKey) = ERROR_SUCCESS then
+ begin
+ ValueType := 0;
+ PathSize := 0;
+ if RegQueryValueExA(HHKey, PChar(''), nil, @ValueType, nil, @PathSize) = ERROR_SUCCESS then
+ begin
+ if ValueType = REG_SZ then
+ begin
+ SetLength(Path, PathSize);
+ R := RegQueryValueExA(HHKey, PChar(''), nil, @ValueType, PByte(Path), @PathSize);
+ Result := PChar(Path);
+ end;
+ end;
+ RegCloseKey(HHKey);
+ end;
+ if R <> ERROR_SUCCESS then
+ Result := 'hhctrl.ocx';
+end;
+
+var
+ _HtmlHelpA: Pointer;
+ _HtmlHelpW: Pointer;
+ _HtmlHelp: Pointer;
+
+function HtmlHelpA;
+begin
+ GetProcedureAddress(_HtmlHelpA, GetOCXPath, 'HtmlHelpA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_HtmlHelpA]
+ end;
+end;
+
+function HtmlHelpW;
+begin
+ GetProcedureAddress(_HtmlHelpW, GetOCXPath, 'HtmlHelpW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_HtmlHelpW]
+ end;
+end;
+
+function HtmlHelp;
+begin
+ GetProcedureAddress(_HtmlHelp, GetOCXPath, 'HtmlHelp' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_HtmlHelp]
+ end;
+end;
+
+{$ELSE}
+
+const
+ hhctrl = 'hhctrl.ocx';
+
+function HtmlHelpA; external hhctrl name 'HtmlHelpA';
+function HtmlHelpW; external hhctrl name 'HtmlHelpW';
+function HtmlHelp; external hhctrl name 'HtmlHelp' + AWSuffix;
+
+{$ENDIF DYNAMIC_LINK}
+
+end.
diff --git a/packages/extra/winunits/jwaiaccess.pas b/packages/extra/winunits/jwaiaccess.pas
index 654baf9a2f..79285f5c73 100644
--- a/packages/extra/winunits/jwaiaccess.pas
+++ b/packages/extra/winunits/jwaiaccess.pas
@@ -1,116 +1,116 @@
-{******************************************************************************}
-{ }
-{ Access and Audit Control interfaces API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: iaccess.h, released November 2002. The original Pascal }
-{ code is: IAccess.pas, released March 2002. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwaiaccess.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaIAccess;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "iaccess.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaAccCtrl, JwaWinType;
-
-{****************************************************************************
- * Storage access control interface
- ****************************************************************************}
-
-// All nested structures are allocated in the same block of memory.
-// Thus these types are freed with a single call to CoTaskMemFree.
-
-type
- PACTRL_ACCESSW_ALLOCATE_ALL_NODES = PACTRL_ACCESSW;
- {$EXTERNALSYM PACTRL_ACCESSW_ALLOCATE_ALL_NODES}
- PActrlAccessWAllocateAllNodes = PACTRL_ACCESSW_ALLOCATE_ALL_NODES;
- PACTRL_AUDITW_ALLOCATE_ALL_NODES = PACTRL_AUDITW;
- {$EXTERNALSYM PACTRL_AUDITW_ALLOCATE_ALL_NODES}
- PActrlAuditWAllocateAllNodes = PACTRL_AUDITW_ALLOCATE_ALL_NODES;
-
-const
- IID_IAccessControl = '{EEDD23E0-8410-11CE-A1C3-08002B2B8D8F}';
- {$EXTERNALSYM IID_IAccessControl}
-
-type
- IAccessControl = interface (IUnknown)
- ['{EEDD23E0-8410-11CE-A1C3-08002B2B8D8F}']
- function GrantAccessRights(pAccessList: PACTRL_ACCESSW): HRESULT; stdcall;
- function SetAccessRights(pAccessList: PACTRL_ACCESSW): HRESULT; stdcall;
- function SetOwner(pOwner: PTRUSTEEW; pGroup: PTRUSTEEW): HRESULT; stdcall;
- function RevokeAccessRights(lpProperty: LPWSTR; cTrustees: ULONG; prgTrustees: PTRUSTEEW): HRESULT; stdcall;
- function GetAllAccessRights(lpProperty: LPWSTR; var ppAccessList: PACTRL_ACCESSW_ALLOCATE_ALL_NODES; var ppOwner, ppGroup: PTRUSTEEW): HRESULT; stdcall;
- function IsAccessAllowed(pTrustee: PTRUSTEEW; lpProperty: LPWSTR; AccessRights: ACCESS_RIGHTS; var pfAccessAllowed: BOOL): HRESULT; stdcall;
- end;
- {$EXTERNALSYM IAccessControl}
-
-{****************************************************************************
- * Storage audit control interface
- ****************************************************************************}
-
-const
- IID_IAuditControl = '{1da6292f-bc66-11ce-aae3-00aa004c2737}';
- {$EXTERNALSYM IID_IAuditControl}
-
-type
- IAuditControl = interface (IUnknown)
- ['{1da6292f-bc66-11ce-aae3-00aa004c2737}']
- function GrantAuditRights(pAuditList: PACTRL_AUDITW): HRESULT; stdcall;
- function SetAuditRights(pAuditList: PACTRL_AUDITW): HRESULT; stdcall;
- function RevokeAuditRights(lpProperty: LPWSTR; cTrustees: ULONG; prgTrustees: PTRUSTEEW): HRESULT; stdcall;
- function GetAllAuditRights(lpProperty: LPWSTR; var ppAuditList: PACTRL_AUDITW): HRESULT; stdcall;
- //
- // Determines if the given trustee with the state audit rights will generate an audit event if the object is accessed.
- //
- function IsAccessAudited(pTrustee: PTRUSTEEW; AuditRights: ACCESS_RIGHTS; var pfAccessAudited: BOOL): HRESULT; stdcall;
- end;
- {$EXTERNALSYM IAuditControl}
-
-implementation
-
-end.
-
+{******************************************************************************}
+{ }
+{ Access and Audit Control interfaces API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: iaccess.h, released November 2002. The original Pascal }
+{ code is: IAccess.pas, released March 2002. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwaiaccess.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaIAccess;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "iaccess.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaAccCtrl, JwaWinType;
+
+{****************************************************************************
+ * Storage access control interface
+ ****************************************************************************}
+
+// All nested structures are allocated in the same block of memory.
+// Thus these types are freed with a single call to CoTaskMemFree.
+
+type
+ PACTRL_ACCESSW_ALLOCATE_ALL_NODES = PACTRL_ACCESSW;
+ {$EXTERNALSYM PACTRL_ACCESSW_ALLOCATE_ALL_NODES}
+ PActrlAccessWAllocateAllNodes = PACTRL_ACCESSW_ALLOCATE_ALL_NODES;
+ PACTRL_AUDITW_ALLOCATE_ALL_NODES = PACTRL_AUDITW;
+ {$EXTERNALSYM PACTRL_AUDITW_ALLOCATE_ALL_NODES}
+ PActrlAuditWAllocateAllNodes = PACTRL_AUDITW_ALLOCATE_ALL_NODES;
+
+const
+ IID_IAccessControl = '{EEDD23E0-8410-11CE-A1C3-08002B2B8D8F}';
+ {$EXTERNALSYM IID_IAccessControl}
+
+type
+ IAccessControl = interface (IUnknown)
+ ['{EEDD23E0-8410-11CE-A1C3-08002B2B8D8F}']
+ function GrantAccessRights(pAccessList: PACTRL_ACCESSW): HRESULT; stdcall;
+ function SetAccessRights(pAccessList: PACTRL_ACCESSW): HRESULT; stdcall;
+ function SetOwner(pOwner: PTRUSTEEW; pGroup: PTRUSTEEW): HRESULT; stdcall;
+ function RevokeAccessRights(lpProperty: LPWSTR; cTrustees: ULONG; prgTrustees: PTRUSTEEW): HRESULT; stdcall;
+ function GetAllAccessRights(lpProperty: LPWSTR; var ppAccessList: PACTRL_ACCESSW_ALLOCATE_ALL_NODES; var ppOwner, ppGroup: PTRUSTEEW): HRESULT; stdcall;
+ function IsAccessAllowed(pTrustee: PTRUSTEEW; lpProperty: LPWSTR; AccessRights: ACCESS_RIGHTS; var pfAccessAllowed: BOOL): HRESULT; stdcall;
+ end;
+ {$EXTERNALSYM IAccessControl}
+
+{****************************************************************************
+ * Storage audit control interface
+ ****************************************************************************}
+
+const
+ IID_IAuditControl = '{1da6292f-bc66-11ce-aae3-00aa004c2737}';
+ {$EXTERNALSYM IID_IAuditControl}
+
+type
+ IAuditControl = interface (IUnknown)
+ ['{1da6292f-bc66-11ce-aae3-00aa004c2737}']
+ function GrantAuditRights(pAuditList: PACTRL_AUDITW): HRESULT; stdcall;
+ function SetAuditRights(pAuditList: PACTRL_AUDITW): HRESULT; stdcall;
+ function RevokeAuditRights(lpProperty: LPWSTR; cTrustees: ULONG; prgTrustees: PTRUSTEEW): HRESULT; stdcall;
+ function GetAllAuditRights(lpProperty: LPWSTR; var ppAuditList: PACTRL_AUDITW): HRESULT; stdcall;
+ //
+ // Determines if the given trustee with the state audit rights will generate an audit event if the object is accessed.
+ //
+ function IsAccessAudited(pTrustee: PTRUSTEEW; AuditRights: ACCESS_RIGHTS; var pfAccessAudited: BOOL): HRESULT; stdcall;
+ end;
+ {$EXTERNALSYM IAuditControl}
+
+implementation
+
+end.
+
diff --git a/packages/extra/winunits/jwaiadmext.pas b/packages/extra/winunits/jwaiadmext.pas
index ab48a7db8e..44e49fbe4e 100644
--- a/packages/extra/winunits/jwaiadmext.pas
+++ b/packages/extra/winunits/jwaiadmext.pas
@@ -1,130 +1,130 @@
-{******************************************************************************}
-{ }
-{ IISAdmin Extensions API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: iadmext.h, released November 2002. The original Pascal }
-{ code is: IAdmExt.pas, released March 2002. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwaiadmext.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaIAdmExt;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "iadmext.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaIisCnfg, JwaWinType;
-
-//
-// The Main Interface. All extensions must support this interface.
-//
-// {51DFE970-F6F2-11d0-B9BD-00A0C922E750}
-
-const
- IID_IADMEXT: TGUID = (D1:$51dfe970; D2:$f6f2; D3:$11d0; D4:($b9, $bd, $0, $a0, $c9, $22, $e7, $50));
- {$EXTERNALSYM IID_IADMEXT}
-
-//
-// InProcess COM Registration. All extensions must write a subkey name by the
-// CLSID for the above interface under this key in the Registry.
-//
-
- IISADMIN_EXTENSIONS_REG_KEYA = 'SOFTWARE\Microsoft\InetStp\Extensions';
- {$EXTERNALSYM IISADMIN_EXTENSIONS_REG_KEYA}
- IISADMIN_EXTENSIONS_REG_KEYW = WideString('SOFTWARE\Microsoft\InetStp\Extensions');
- {$EXTERNALSYM IISADMIN_EXTENSIONS_REG_KEYW}
- IISADMIN_EXTENSIONS_REG_KEY = TEXT('SOFTWARE\Microsoft\InetStp\Extensions');
- {$EXTERNALSYM IISADMIN_EXTENSIONS_REG_KEY}
-
-//
-// COM Registration. CLSIDS for the DCOM interface provided by these extensions will
-// be written to this key and ID by IISADMIN as a multisz property.
-//
-// This is intended for use by other applications which need to find out what classid's are
-// registered.
-//
-
- IISADMIN_EXTENSIONS_CLSID_MD_KEYA = 'LM/IISADMIN/EXTENSIONS/DCOMCLSIDS';
- {$EXTERNALSYM IISADMIN_EXTENSIONS_CLSID_MD_KEYA}
- IISADMIN_EXTENSIONS_CLSID_MD_KEYW = WideString('LM/IISADMIN/EXTENSIONS/DCOMCLSIDS');
- {$EXTERNALSYM IISADMIN_EXTENSIONS_CLSID_MD_KEYW}
- IISADMIN_EXTENSIONS_CLSID_MD_KEY = TEXT('LM/IISADMIN/EXTENSIONS/DCOMCLSIDS');
- {$EXTERNALSYM IISADMIN_EXTENSIONS_CLSID_MD_KEY}
- IISADMIN_EXTENSIONS_CLSID_MD_ID = MD_IISADMIN_EXTENSIONS;
- {$EXTERNALSYM IISADMIN_EXTENSIONS_CLSID_MD_ID}
-
-type
- IADMEXT = interface (IUnknown)
- ['{51DFE970-F6F2-11d0-B9BD-00A0C922E750}']
- //
- // All methods below will be called under a thread which has called
- // CoInitializeEx(NULL, COINIT_MULTITHREADED).
- //
- // The IMSAdminBase Object will be available during all of these calls.
- //
-
- //
- // Initialize will be called by IISADMIN when it initializes.
- //
- function Initialize: HRESULT; stdcall;
-
- //
- // EnumDcomCLSIDs will be called by IISADMIN when it initializes,
- // and the returned CLSIDs will be written to the metabase at
- // the path IISADMIN_EXTENSIONS_CLSID_MD_KEY.
- //
- function EnumDcomCLSIDs(var pclsidDcom: CLSID; dwEnumIndex: DWORD): HRESULT; stdcall;
-
- //
- // Terminate will be called by IISADMIN when it terminates.
- //
- function Terminate: HRESULT; stdcall;
- end;
- {$EXTERNALSYM IADMEXT}
-
-implementation
-
-end.
-
+{******************************************************************************}
+{ }
+{ IISAdmin Extensions API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: iadmext.h, released November 2002. The original Pascal }
+{ code is: IAdmExt.pas, released March 2002. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwaiadmext.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaIAdmExt;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "iadmext.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaIisCnfg, JwaWinType;
+
+//
+// The Main Interface. All extensions must support this interface.
+//
+// {51DFE970-F6F2-11d0-B9BD-00A0C922E750}
+
+const
+ IID_IADMEXT: TGUID = (D1:$51dfe970; D2:$f6f2; D3:$11d0; D4:($b9, $bd, $0, $a0, $c9, $22, $e7, $50));
+ {$EXTERNALSYM IID_IADMEXT}
+
+//
+// InProcess COM Registration. All extensions must write a subkey name by the
+// CLSID for the above interface under this key in the Registry.
+//
+
+ IISADMIN_EXTENSIONS_REG_KEYA = 'SOFTWARE\Microsoft\InetStp\Extensions';
+ {$EXTERNALSYM IISADMIN_EXTENSIONS_REG_KEYA}
+ IISADMIN_EXTENSIONS_REG_KEYW = WideString('SOFTWARE\Microsoft\InetStp\Extensions');
+ {$EXTERNALSYM IISADMIN_EXTENSIONS_REG_KEYW}
+ IISADMIN_EXTENSIONS_REG_KEY = TEXT('SOFTWARE\Microsoft\InetStp\Extensions');
+ {$EXTERNALSYM IISADMIN_EXTENSIONS_REG_KEY}
+
+//
+// COM Registration. CLSIDS for the DCOM interface provided by these extensions will
+// be written to this key and ID by IISADMIN as a multisz property.
+//
+// This is intended for use by other applications which need to find out what classid's are
+// registered.
+//
+
+ IISADMIN_EXTENSIONS_CLSID_MD_KEYA = 'LM/IISADMIN/EXTENSIONS/DCOMCLSIDS';
+ {$EXTERNALSYM IISADMIN_EXTENSIONS_CLSID_MD_KEYA}
+ IISADMIN_EXTENSIONS_CLSID_MD_KEYW = WideString('LM/IISADMIN/EXTENSIONS/DCOMCLSIDS');
+ {$EXTERNALSYM IISADMIN_EXTENSIONS_CLSID_MD_KEYW}
+ IISADMIN_EXTENSIONS_CLSID_MD_KEY = TEXT('LM/IISADMIN/EXTENSIONS/DCOMCLSIDS');
+ {$EXTERNALSYM IISADMIN_EXTENSIONS_CLSID_MD_KEY}
+ IISADMIN_EXTENSIONS_CLSID_MD_ID = MD_IISADMIN_EXTENSIONS;
+ {$EXTERNALSYM IISADMIN_EXTENSIONS_CLSID_MD_ID}
+
+type
+ IADMEXT = interface (IUnknown)
+ ['{51DFE970-F6F2-11d0-B9BD-00A0C922E750}']
+ //
+ // All methods below will be called under a thread which has called
+ // CoInitializeEx(NULL, COINIT_MULTITHREADED).
+ //
+ // The IMSAdminBase Object will be available during all of these calls.
+ //
+
+ //
+ // Initialize will be called by IISADMIN when it initializes.
+ //
+ function Initialize: HRESULT; stdcall;
+
+ //
+ // EnumDcomCLSIDs will be called by IISADMIN when it initializes,
+ // and the returned CLSIDs will be written to the metabase at
+ // the path IISADMIN_EXTENSIONS_CLSID_MD_KEY.
+ //
+ function EnumDcomCLSIDs(var pclsidDcom: CLSID; dwEnumIndex: DWORD): HRESULT; stdcall;
+
+ //
+ // Terminate will be called by IISADMIN when it terminates.
+ //
+ function Terminate: HRESULT; stdcall;
+ end;
+ {$EXTERNALSYM IADMEXT}
+
+implementation
+
+end.
+
diff --git a/packages/extra/winunits/jwaicmpapi.pas b/packages/extra/winunits/jwaicmpapi.pas
index 57e1d1434b..2ee0ad79bc 100644
--- a/packages/extra/winunits/jwaicmpapi.pas
+++ b/packages/extra/winunits/jwaicmpapi.pas
@@ -1,445 +1,445 @@
-{******************************************************************************}
-{ }
-{ ICMP Echo API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: icmpapi.h, released Feb 2003. The original Pascal }
-{ code is: IcmpApi.pas, released December 2003. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwaicmpapi.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaIcmpApi;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "icmpapi.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaWinType, JwaIpExport, JwaNative, JwaWS2tcpip;
-
-// Declarations for the Win32 ICMP Echo request API.
-
-//
-// Exported Routines.
-//
-
-//++
-//
-// Routine Name:
-//
-// IcmpCreateFile
-//
-// Routine Description:
-//
-// Opens a handle on which ICMP Echo Requests can be issued.
-//
-// Arguments:
-//
-// None.
-//
-// Return Value:
-//
-// An open file handle or INVALID_HANDLE_VALUE. Extended error information
-// is available by calling GetLastError().
-//
-//--
-
-function IcmpCreateFile: HANDLE; stdcall;
-{$EXTERNALSYM IcmpCreateFile}
-
-//++
-//
-// Routine Name:
-//
-// Icmp6CreateFile
-//
-// Routine Description:
-//
-// Opens a handle on which ICMPv6 Echo Requests can be issued.
-//
-// Arguments:
-//
-// None.
-//
-// Return Value:
-//
-// An open file handle or INVALID_HANDLE_VALUE. Extended error information
-// is available by calling GetLastError().
-//
-//--
-
-function Icmp6CreateFile: HANDLE; stdcall;
-{$EXTERNALSYM Icmp6CreateFile}
-
-//++
-//
-// Routine Name:
-//
-// IcmpCloseHandle
-//
-// Routine Description:
-//
-// Closes a handle opened by ICMPOpenFile.
-//
-// Arguments:
-//
-// IcmpHandle - The handle to close.
-//
-// Return Value:
-//
-// TRUE if the handle was closed successfully, otherwise FALSE. Extended
-// error information is available by calling GetLastError().
-//
-//--
-
-function IcmpCloseHandle(IcmpHandle: HANDLE): BOOL; stdcall;
-{$EXTERNALSYM IcmpCloseHandle}
-
-//++
-//
-// Routine Name:
-//
-// IcmpSendEcho
-//
-// Routine Description:
-//
-// Sends an ICMP Echo request and returns any replies. The
-// call returns when the timeout has expired or the reply buffer
-// is filled.
-//
-// Arguments:
-//
-// IcmpHandle - An open handle returned by ICMPCreateFile.
-//
-// DestinationAddress - The destination of the echo request.
-//
-// RequestData - A buffer containing the data to send in the
-// request.
-//
-// RequestSize - The number of bytes in the request data buffer.
-//
-// RequestOptions - Pointer to the IP header options for the request.
-// May be NULL.
-//
-// ReplyBuffer - A buffer to hold any replies to the request.
-// On return, the buffer will contain an array of
-// ICMP_ECHO_REPLY structures followed by the
-// options and data for the replies. The buffer
-// should be large enough to hold at least one
-// ICMP_ECHO_REPLY structure plus
-// MAX(RequestSize, 8) bytes of data since an ICMP
-// error message contains 8 bytes of data.
-//
-// ReplySize - The size in bytes of the reply buffer.
-//
-// Timeout - The time in milliseconds to wait for replies.
-//
-// Return Value:
-//
-// Returns the number of ICMP_ECHO_REPLY structures stored in ReplyBuffer.
-// The status of each reply is contained in the structure. If the return
-// value is zero, extended error information is available via
-// GetLastError().
-//
-//--
-
-function IcmpSendEcho(
- IcmpHandle: HANDLE;
- DestinationAddress: IpAddr;
- RequestData: LPVOID;
- RequestSize: WORD;
- RequestOptions: PIP_OPTION_INFORMATION;
- ReplyBuffer: LPVOID;
- ReplySize: DWORD;
- Timeout: DWORD): DWORD; stdcall;
-{$EXTERNALSYM IcmpSendEcho}
-
-//++
-//
-// Routine Description:
-//
-// Sends an ICMP Echo request and the call returns either immediately
-// (if Event or ApcRoutine is NonNULL) or returns after the specified
-// timeout. The ReplyBuffer contains the ICMP responses, if any.
-//
-// Arguments:
-//
-// IcmpHandle - An open handle returned by ICMPCreateFile.
-//
-// Event - This is the event to be signalled whenever an IcmpResponse
-// comes in.
-//
-// ApcRoutine - This routine would be called when the calling thread
-// is in an alertable thread and an ICMP reply comes in.
-//
-// ApcContext - This optional parameter is given to the ApcRoutine when
-// this call succeeds.
-//
-// DestinationAddress - The destination of the echo request.
-//
-// RequestData - A buffer containing the data to send in the
-// request.
-//
-// RequestSize - The number of bytes in the request data buffer.
-//
-// RequestOptions - Pointer to the IP header options for the request.
-// May be NULL.
-//
-// ReplyBuffer - A buffer to hold any replies to the request.
-// On return, the buffer will contain an array of
-// ICMP_ECHO_REPLY structures followed by options
-// and data. The buffer must be large enough to
-// hold at least one ICMP_ECHO_REPLY structure.
-// It should be large enough to also hold
-// 8 more bytes of data - this is the size of
-// an ICMP error message.
-//
-// ReplySize - The size in bytes of the reply buffer.
-//
-// Timeout - The time in milliseconds to wait for replies.
-// This is NOT used if ApcRoutine is not NULL or if Event
-// is not NULL.
-//
-// Return Value:
-//
-// Returns the number of replies received and stored in ReplyBuffer. If
-// the return value is zero, extended error information is available
-// via GetLastError().
-//
-// Remarks:
-//
-// On NT platforms,
-// If used Asynchronously (either ApcRoutine or Event is specified), then
-// ReplyBuffer and ReplySize are still needed. This is where the response
-// comes in.
-// ICMP Response data is copied to the ReplyBuffer provided, and the caller of
-// this function has to parse it asynchronously. The function IcmpParseReply
-// is provided for this purpose.
-//
-// On non-NT platforms,
-// Event, ApcRoutine and ApcContext are IGNORED.
-//
-//--
-
-function IcmpSendEcho2(
- IcmpHandle: HANDLE;
- Event: HANDLE;
- ApcRoutine: PIO_APC_ROUTINE;
- ApcContext: PVOID;
- DestinationAddress: IpAddr;
- RequestData: LPVOID;
- RequestSize: WORD;
- RequestOptions: PIP_OPTION_INFORMATION;
- ReplyBuffer: LPVOID;
- ReplySize: DWORD;
- Timeout: DWORD): DWORD; stdcall;
-
-function Icmp6SendEcho2(
- IcmpHandle: HANDLE;
- Event: HANDLE;
- ApcRoutine: PIO_APC_ROUTINE;
- ApcContext: PVOID;
- SourceAddress: Psockaddr_in6;
- DestinationAddress: Psockaddr_in6;
- RequestData,
- RequestSize: WORD;
- RequestOptions: PIP_OPTION_INFORMATION;
- ReplyBuffer: LPVOID;
- ReplySize: DWORD;
- Timeout: DWORD): DWORD; stdcall;
-
-//++
-//
-// Routine Description:
-//
-// Parses the reply buffer provided and returns the number of ICMP responses found.
-//
-// Arguments:
-//
-// ReplyBuffer - This must be the same buffer that was passed to IcmpSendEcho2
-// This is rewritten to hold an array of ICMP_ECHO_REPLY structures.
-// (i.e. the type is PICMP_ECHO_REPLY).
-//
-// ReplySize - This must be the size of the above buffer.
-//
-// Return Value:
-// Returns the number of ICMP responses found. If there is an errors, return value is
-// zero. The error can be determined by a call to GetLastError.
-//
-// Remarks:
-// This function SHOULD NOT BE USED on a reply buffer that was passed to SendIcmpEcho.
-// SendIcmpEcho actually parses the buffer before returning back to the user. This function
-// is meant to be used only with SendIcmpEcho2.
-//--
-
-function IcmpParseReplies(ReplyBuffer: LPVOID; ReplySize: DWORD): DWORD; stdcall;
-{$EXTERNALSYM IcmpParseReplies}
-
-function Icmp6ParseReplies(ReplyBuffer: LPVOID; ReplySize: DWORD): DWORD; stdcall;
-{$EXTERNALSYM Icmp6ParseReplies}
-
-implementation
-
-const
- icmplib = 'iphlpapi.dll';
-
-{$IFDEF DYNAMIC_LINK}
-
-var
- _IcmpCreateFile: Pointer;
-
-function IcmpCreateFile;
-begin
- GetProcedureAddress(_IcmpCreateFile, icmplib, 'IcmpCreateFile');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_IcmpCreateFile]
- end;
-end;
-
-var
- _Icmp6CreateFile: Pointer;
-
-function Icmp6CreateFile;
-begin
- GetProcedureAddress(_Icmp6CreateFile, icmplib, 'Icmp6CreateFile');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_Icmp6CreateFile]
- end;
-end;
-
-var
- _IcmpCloseHandle: Pointer;
-
-function IcmpCloseHandle;
-begin
- GetProcedureAddress(_IcmpCloseHandle, icmplib, 'IcmpCloseHandle');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_IcmpCloseHandle]
- end;
-end;
-
-var
- _IcmpSendEcho: Pointer;
-
-function IcmpSendEcho;
-begin
- GetProcedureAddress(_IcmpSendEcho, icmplib, 'IcmpSendEcho');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_IcmpSendEcho]
- end;
-end;
-
-var
- _IcmpSendEcho2: Pointer;
-
-function IcmpSendEcho2;
-begin
- GetProcedureAddress(_IcmpSendEcho2, icmplib, 'IcmpSendEcho2');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_IcmpSendEcho2]
- end;
-end;
-
-var
- _Icmp6SendEcho2: Pointer;
-
-function Icmp6SendEcho2;
-begin
- GetProcedureAddress(_Icmp6SendEcho2, icmplib, 'Icmp6SendEcho2');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_Icmp6SendEcho2]
- end;
-end;
-
-var
- _IcmpParseReplies: Pointer;
-
-function IcmpParseReplies;
-begin
- GetProcedureAddress(_IcmpParseReplies, icmplib, 'IcmpParseReplies');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_IcmpParseReplies]
- end;
-end;
-
-var
- _Icmp6ParseReplies: Pointer;
-
-function Icmp6ParseReplies;
-begin
- GetProcedureAddress(_Icmp6ParseReplies, icmplib, 'Icmp6ParseReplies');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_Icmp6ParseReplies]
- end;
-end;
-
-{$ELSE}
-
-function IcmpCreateFile; external icmplib name 'IcmpCreateFile';
-function Icmp6CreateFile; external icmplib name 'Icmp6CreateFile';
-function IcmpCloseHandle; external icmplib name 'IcmpCloseHandle';
-function IcmpSendEcho; external icmplib name 'IcmpSendEcho';
-function IcmpSendEcho2; external icmplib name 'IcmpSendEcho2';
-function Icmp6SendEcho2; external icmplib name 'Icmp6SendEcho2';
-function IcmpParseReplies; external icmplib name 'IcmpParseReplies';
-function Icmp6ParseReplies; external icmplib name 'Icmp6ParseReplies';
-
-{$ENDIF DYNAMIC_LINK}
-
-end.
+{******************************************************************************}
+{ }
+{ ICMP Echo API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: icmpapi.h, released Feb 2003. The original Pascal }
+{ code is: IcmpApi.pas, released December 2003. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwaicmpapi.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaIcmpApi;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "icmpapi.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaWinType, JwaIpExport, JwaNative, JwaWS2tcpip;
+
+// Declarations for the Win32 ICMP Echo request API.
+
+//
+// Exported Routines.
+//
+
+//++
+//
+// Routine Name:
+//
+// IcmpCreateFile
+//
+// Routine Description:
+//
+// Opens a handle on which ICMP Echo Requests can be issued.
+//
+// Arguments:
+//
+// None.
+//
+// Return Value:
+//
+// An open file handle or INVALID_HANDLE_VALUE. Extended error information
+// is available by calling GetLastError().
+//
+//--
+
+function IcmpCreateFile: HANDLE; stdcall;
+{$EXTERNALSYM IcmpCreateFile}
+
+//++
+//
+// Routine Name:
+//
+// Icmp6CreateFile
+//
+// Routine Description:
+//
+// Opens a handle on which ICMPv6 Echo Requests can be issued.
+//
+// Arguments:
+//
+// None.
+//
+// Return Value:
+//
+// An open file handle or INVALID_HANDLE_VALUE. Extended error information
+// is available by calling GetLastError().
+//
+//--
+
+function Icmp6CreateFile: HANDLE; stdcall;
+{$EXTERNALSYM Icmp6CreateFile}
+
+//++
+//
+// Routine Name:
+//
+// IcmpCloseHandle
+//
+// Routine Description:
+//
+// Closes a handle opened by ICMPOpenFile.
+//
+// Arguments:
+//
+// IcmpHandle - The handle to close.
+//
+// Return Value:
+//
+// TRUE if the handle was closed successfully, otherwise FALSE. Extended
+// error information is available by calling GetLastError().
+//
+//--
+
+function IcmpCloseHandle(IcmpHandle: HANDLE): BOOL; stdcall;
+{$EXTERNALSYM IcmpCloseHandle}
+
+//++
+//
+// Routine Name:
+//
+// IcmpSendEcho
+//
+// Routine Description:
+//
+// Sends an ICMP Echo request and returns any replies. The
+// call returns when the timeout has expired or the reply buffer
+// is filled.
+//
+// Arguments:
+//
+// IcmpHandle - An open handle returned by ICMPCreateFile.
+//
+// DestinationAddress - The destination of the echo request.
+//
+// RequestData - A buffer containing the data to send in the
+// request.
+//
+// RequestSize - The number of bytes in the request data buffer.
+//
+// RequestOptions - Pointer to the IP header options for the request.
+// May be NULL.
+//
+// ReplyBuffer - A buffer to hold any replies to the request.
+// On return, the buffer will contain an array of
+// ICMP_ECHO_REPLY structures followed by the
+// options and data for the replies. The buffer
+// should be large enough to hold at least one
+// ICMP_ECHO_REPLY structure plus
+// MAX(RequestSize, 8) bytes of data since an ICMP
+// error message contains 8 bytes of data.
+//
+// ReplySize - The size in bytes of the reply buffer.
+//
+// Timeout - The time in milliseconds to wait for replies.
+//
+// Return Value:
+//
+// Returns the number of ICMP_ECHO_REPLY structures stored in ReplyBuffer.
+// The status of each reply is contained in the structure. If the return
+// value is zero, extended error information is available via
+// GetLastError().
+//
+//--
+
+function IcmpSendEcho(
+ IcmpHandle: HANDLE;
+ DestinationAddress: IpAddr;
+ RequestData: LPVOID;
+ RequestSize: WORD;
+ RequestOptions: PIP_OPTION_INFORMATION;
+ ReplyBuffer: LPVOID;
+ ReplySize: DWORD;
+ Timeout: DWORD): DWORD; stdcall;
+{$EXTERNALSYM IcmpSendEcho}
+
+//++
+//
+// Routine Description:
+//
+// Sends an ICMP Echo request and the call returns either immediately
+// (if Event or ApcRoutine is NonNULL) or returns after the specified
+// timeout. The ReplyBuffer contains the ICMP responses, if any.
+//
+// Arguments:
+//
+// IcmpHandle - An open handle returned by ICMPCreateFile.
+//
+// Event - This is the event to be signalled whenever an IcmpResponse
+// comes in.
+//
+// ApcRoutine - This routine would be called when the calling thread
+// is in an alertable thread and an ICMP reply comes in.
+//
+// ApcContext - This optional parameter is given to the ApcRoutine when
+// this call succeeds.
+//
+// DestinationAddress - The destination of the echo request.
+//
+// RequestData - A buffer containing the data to send in the
+// request.
+//
+// RequestSize - The number of bytes in the request data buffer.
+//
+// RequestOptions - Pointer to the IP header options for the request.
+// May be NULL.
+//
+// ReplyBuffer - A buffer to hold any replies to the request.
+// On return, the buffer will contain an array of
+// ICMP_ECHO_REPLY structures followed by options
+// and data. The buffer must be large enough to
+// hold at least one ICMP_ECHO_REPLY structure.
+// It should be large enough to also hold
+// 8 more bytes of data - this is the size of
+// an ICMP error message.
+//
+// ReplySize - The size in bytes of the reply buffer.
+//
+// Timeout - The time in milliseconds to wait for replies.
+// This is NOT used if ApcRoutine is not NULL or if Event
+// is not NULL.
+//
+// Return Value:
+//
+// Returns the number of replies received and stored in ReplyBuffer. If
+// the return value is zero, extended error information is available
+// via GetLastError().
+//
+// Remarks:
+//
+// On NT platforms,
+// If used Asynchronously (either ApcRoutine or Event is specified), then
+// ReplyBuffer and ReplySize are still needed. This is where the response
+// comes in.
+// ICMP Response data is copied to the ReplyBuffer provided, and the caller of
+// this function has to parse it asynchronously. The function IcmpParseReply
+// is provided for this purpose.
+//
+// On non-NT platforms,
+// Event, ApcRoutine and ApcContext are IGNORED.
+//
+//--
+
+function IcmpSendEcho2(
+ IcmpHandle: HANDLE;
+ Event: HANDLE;
+ ApcRoutine: PIO_APC_ROUTINE;
+ ApcContext: PVOID;
+ DestinationAddress: IpAddr;
+ RequestData: LPVOID;
+ RequestSize: WORD;
+ RequestOptions: PIP_OPTION_INFORMATION;
+ ReplyBuffer: LPVOID;
+ ReplySize: DWORD;
+ Timeout: DWORD): DWORD; stdcall;
+
+function Icmp6SendEcho2(
+ IcmpHandle: HANDLE;
+ Event: HANDLE;
+ ApcRoutine: PIO_APC_ROUTINE;
+ ApcContext: PVOID;
+ SourceAddress: Psockaddr_in6;
+ DestinationAddress: Psockaddr_in6;
+ RequestData,
+ RequestSize: WORD;
+ RequestOptions: PIP_OPTION_INFORMATION;
+ ReplyBuffer: LPVOID;
+ ReplySize: DWORD;
+ Timeout: DWORD): DWORD; stdcall;
+
+//++
+//
+// Routine Description:
+//
+// Parses the reply buffer provided and returns the number of ICMP responses found.
+//
+// Arguments:
+//
+// ReplyBuffer - This must be the same buffer that was passed to IcmpSendEcho2
+// This is rewritten to hold an array of ICMP_ECHO_REPLY structures.
+// (i.e. the type is PICMP_ECHO_REPLY).
+//
+// ReplySize - This must be the size of the above buffer.
+//
+// Return Value:
+// Returns the number of ICMP responses found. If there is an errors, return value is
+// zero. The error can be determined by a call to GetLastError.
+//
+// Remarks:
+// This function SHOULD NOT BE USED on a reply buffer that was passed to SendIcmpEcho.
+// SendIcmpEcho actually parses the buffer before returning back to the user. This function
+// is meant to be used only with SendIcmpEcho2.
+//--
+
+function IcmpParseReplies(ReplyBuffer: LPVOID; ReplySize: DWORD): DWORD; stdcall;
+{$EXTERNALSYM IcmpParseReplies}
+
+function Icmp6ParseReplies(ReplyBuffer: LPVOID; ReplySize: DWORD): DWORD; stdcall;
+{$EXTERNALSYM Icmp6ParseReplies}
+
+implementation
+
+const
+ icmplib = 'iphlpapi.dll';
+
+{$IFDEF DYNAMIC_LINK}
+
+var
+ _IcmpCreateFile: Pointer;
+
+function IcmpCreateFile;
+begin
+ GetProcedureAddress(_IcmpCreateFile, icmplib, 'IcmpCreateFile');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_IcmpCreateFile]
+ end;
+end;
+
+var
+ _Icmp6CreateFile: Pointer;
+
+function Icmp6CreateFile;
+begin
+ GetProcedureAddress(_Icmp6CreateFile, icmplib, 'Icmp6CreateFile');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_Icmp6CreateFile]
+ end;
+end;
+
+var
+ _IcmpCloseHandle: Pointer;
+
+function IcmpCloseHandle;
+begin
+ GetProcedureAddress(_IcmpCloseHandle, icmplib, 'IcmpCloseHandle');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_IcmpCloseHandle]
+ end;
+end;
+
+var
+ _IcmpSendEcho: Pointer;
+
+function IcmpSendEcho;
+begin
+ GetProcedureAddress(_IcmpSendEcho, icmplib, 'IcmpSendEcho');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_IcmpSendEcho]
+ end;
+end;
+
+var
+ _IcmpSendEcho2: Pointer;
+
+function IcmpSendEcho2;
+begin
+ GetProcedureAddress(_IcmpSendEcho2, icmplib, 'IcmpSendEcho2');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_IcmpSendEcho2]
+ end;
+end;
+
+var
+ _Icmp6SendEcho2: Pointer;
+
+function Icmp6SendEcho2;
+begin
+ GetProcedureAddress(_Icmp6SendEcho2, icmplib, 'Icmp6SendEcho2');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_Icmp6SendEcho2]
+ end;
+end;
+
+var
+ _IcmpParseReplies: Pointer;
+
+function IcmpParseReplies;
+begin
+ GetProcedureAddress(_IcmpParseReplies, icmplib, 'IcmpParseReplies');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_IcmpParseReplies]
+ end;
+end;
+
+var
+ _Icmp6ParseReplies: Pointer;
+
+function Icmp6ParseReplies;
+begin
+ GetProcedureAddress(_Icmp6ParseReplies, icmplib, 'Icmp6ParseReplies');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_Icmp6ParseReplies]
+ end;
+end;
+
+{$ELSE}
+
+function IcmpCreateFile; external icmplib name 'IcmpCreateFile';
+function Icmp6CreateFile; external icmplib name 'Icmp6CreateFile';
+function IcmpCloseHandle; external icmplib name 'IcmpCloseHandle';
+function IcmpSendEcho; external icmplib name 'IcmpSendEcho';
+function IcmpSendEcho2; external icmplib name 'IcmpSendEcho2';
+function Icmp6SendEcho2; external icmplib name 'Icmp6SendEcho2';
+function IcmpParseReplies; external icmplib name 'IcmpParseReplies';
+function Icmp6ParseReplies; external icmplib name 'Icmp6ParseReplies';
+
+{$ENDIF DYNAMIC_LINK}
+
+end.
diff --git a/packages/extra/winunits/jwaiiscnfg.pas b/packages/extra/winunits/jwaiiscnfg.pas
index d4b5b6175d..198433d090 100644
--- a/packages/extra/winunits/jwaiiscnfg.pas
+++ b/packages/extra/winunits/jwaiiscnfg.pas
@@ -1,1773 +1,1773 @@
-{******************************************************************************}
-{ }
-{ IIS Public Metdata IDs API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: iiscnfg.h, released November 2002. The original Pascal }
-{ code is: IisCnfg.pas, released March 2002. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-unit JwaIisCnfg;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "iiscnfg.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaWinType;
-
-//
-// Paths
-//
-
-const
- IIS_MD_LOCAL_MACHINE_PATH = 'LM';
- {$EXTERNALSYM IIS_MD_LOCAL_MACHINE_PATH}
-
-//
-// Name of the default publishing root under an instance
-//
-
- IIS_MD_INSTANCE_ROOT = 'Root';
- {$EXTERNALSYM IIS_MD_INSTANCE_ROOT}
-
-//
-// ISAPI Filters are kept in a list under the instances and the service (for
-// global filters) in the following format:
-//
-// LM/W3Svc/<Instance>/Filters
-// MD_FILTER_LOAD_ORDER "Filter1, Filter2, Filter3"
-//
-// LM/W3Svc/<Instance>/Filters/Filter1
-// MD_FILTER_IMAGE_PATH "d:\inetsrv\myfilter.dll"
-//
-// LM/W3Svc/<Instance>/Filters/Filter2
-// MD_FILTER_IMAGE_PATH "d:\inetsrv\otherfilter.dll"
-//
-
- IIS_MD_ISAPI_FILTERS = '/Filters';
- {$EXTERNALSYM IIS_MD_ISAPI_FILTERS}
-
-//
-// Path below each service to the key that publishes service information
-//
-
- IIS_MD_SVC_INFO_PATH = 'Info';
- {$EXTERNALSYM IIS_MD_SVC_INFO_PATH}
-
-//
-// ADSI schema properties path
-//
-
- IIS_MD_ADSI_SCHEMA_PATH_A = '/Schema';
- {$EXTERNALSYM IIS_MD_ADSI_SCHEMA_PATH_A}
- IIS_MD_ADSI_SCHEMA_PATH_W = WideString('/Schema');
- {$EXTERNALSYM IIS_MD_ADSI_SCHEMA_PATH_W}
- IIS_MD_ADSI_METAID_BEGIN = 130000;
- {$EXTERNALSYM IIS_MD_ADSI_METAID_BEGIN}
-
-//
-// user types
-//
-// There are two user types:
-//
-// Server configuration - All the properties for configuring the server that
-// are not applicable to files and directories - such as Port, Host name,
-// Server comment, Connection timeout etc.
-//
-// File/Dir configuration - All the properties that can be configured down to
-// the files and directories - such as Access permissions (Read, Write etc),
-// Extension mapping, IP Security etc.
-//
-
- IIS_MD_UT_SERVER = 1; // Server configuration parameters
- {$EXTERNALSYM IIS_MD_UT_SERVER}
- IIS_MD_UT_FILE = 2; // File/Dir inheritable properties
- {$EXTERNALSYM IIS_MD_UT_FILE}
- IIS_MD_UT_WAM = 100; // Web Application configuration parameters
- {$EXTERNALSYM IIS_MD_UT_WAM}
- ASP_MD_UT_APP = 101; // ASP application configuration parameters
- {$EXTERNALSYM ASP_MD_UT_APP}
- IIS_MD_UT_END_RESERVED = 2000; // All user types below this are reserved for IIS services
- {$EXTERNALSYM IIS_MD_UT_END_RESERVED}
-
-//
-// Metabase property IDs must be unique. This table defines reserved ranges
-//
-
- IIS_MD_ID_BEGIN_RESERVED = $00000001; // IIS reserved range
- {$EXTERNALSYM IIS_MD_ID_BEGIN_RESERVED}
- IIS_MD_ID_END_RESERVED = $00007fff;
- {$EXTERNALSYM IIS_MD_ID_END_RESERVED}
- ASP_MD_ID_BEGIN_RESERVED = $00007000; // ASP reserved range, subrange of IIS.
- {$EXTERNALSYM ASP_MD_ID_BEGIN_RESERVED}
- ASP_MD_ID_END_RESERVED = $000074ff;
- {$EXTERNALSYM ASP_MD_ID_END_RESERVED}
- WAM_MD_ID_BEGIN_RESERVED = $00007500; // ASP reserved range, subrange of IIS.
- {$EXTERNALSYM WAM_MD_ID_BEGIN_RESERVED}
- WAM_MD_ID_END_RESERVED = $00007fff;
- {$EXTERNALSYM WAM_MD_ID_END_RESERVED}
- FP_MD_ID_BEGIN_RESERVED = $00008000; // Front page reserved range
- {$EXTERNALSYM FP_MD_ID_BEGIN_RESERVED}
- FP_MD_ID_END_RESERVED = $00008fff;
- {$EXTERNALSYM FP_MD_ID_END_RESERVED}
- SMTP_MD_ID_BEGIN_RESERVED = $00009000;
- {$EXTERNALSYM SMTP_MD_ID_BEGIN_RESERVED}
- SMTP_MD_ID_END_RESERVED = $00009fff;
- {$EXTERNALSYM SMTP_MD_ID_END_RESERVED}
- POP3_MD_ID_BEGIN_RESERVED = $0000a000;
- {$EXTERNALSYM POP3_MD_ID_BEGIN_RESERVED}
- POP3_MD_ID_END_RESERVED = $0000afff;
- {$EXTERNALSYM POP3_MD_ID_END_RESERVED}
- NNTP_MD_ID_BEGIN_RESERVED = $0000b000;
- {$EXTERNALSYM NNTP_MD_ID_BEGIN_RESERVED}
- NNTP_MD_ID_END_RESERVED = $0000bfff;
- {$EXTERNALSYM NNTP_MD_ID_END_RESERVED}
- IMAP_MD_ID_BEGIN_RESERVED = $0000c000;
- {$EXTERNALSYM IMAP_MD_ID_BEGIN_RESERVED}
- IMAP_MD_ID_END_RESERVED = $0000cfff;
- {$EXTERNALSYM IMAP_MD_ID_END_RESERVED}
- MSCS_MD_ID_BEGIN_RESERVED = $0000d000;
- {$EXTERNALSYM MSCS_MD_ID_BEGIN_RESERVED}
- MSCS_MD_ID_END_RESERVED = $0000dfff;
- {$EXTERNALSYM MSCS_MD_ID_END_RESERVED}
- APPCTR_MD_ID_BEGIN_RESERVED = $0000e000;
- {$EXTERNALSYM APPCTR_MD_ID_BEGIN_RESERVED}
- APPCTR_MD_ID_END_RESERVED = $0000efff;
- {$EXTERNALSYM APPCTR_MD_ID_END_RESERVED}
-
- USER_MD_ID_BASE_RESERVED = $0000ffff;
- {$EXTERNALSYM USER_MD_ID_BASE_RESERVED}
-
-//
-// General server related attributes - these should be added in the metabase
-// with a user type of IIS_MD_UT_SERVER
-//
-
- IIS_MD_SERVER_BASE = 1000;
- {$EXTERNALSYM IIS_MD_SERVER_BASE}
-
-//
-// These are global to all services and should only be set at
-// the IIS root
-//
-
- MD_MAX_BANDWIDTH = IIS_MD_SERVER_BASE + 0;
- {$EXTERNALSYM MD_MAX_BANDWIDTH}
- MD_KEY_TYPE = IIS_MD_SERVER_BASE + 2;
- {$EXTERNALSYM MD_KEY_TYPE}
- MD_MAX_BANDWIDTH_BLOCKED = IIS_MD_SERVER_BASE + 3;
- {$EXTERNALSYM MD_MAX_BANDWIDTH_BLOCKED}
- MD_SCHEMA_METAID = IIS_MD_SERVER_BASE + 4;
- {$EXTERNALSYM MD_SCHEMA_METAID}
-
-//
-// These properties are applicable to both HTTP and FTP virtual
-// servers
-//
-
- MD_SERVER_COMMAND = IIS_MD_SERVER_BASE + 12;
- {$EXTERNALSYM MD_SERVER_COMMAND}
- MD_CONNECTION_TIMEOUT = IIS_MD_SERVER_BASE + 13;
- {$EXTERNALSYM MD_CONNECTION_TIMEOUT}
- MD_MAX_CONNECTIONS = IIS_MD_SERVER_BASE + 14;
- {$EXTERNALSYM MD_MAX_CONNECTIONS}
- MD_SERVER_COMMENT = IIS_MD_SERVER_BASE + 15;
- {$EXTERNALSYM MD_SERVER_COMMENT}
- MD_SERVER_STATE = IIS_MD_SERVER_BASE + 16;
- {$EXTERNALSYM MD_SERVER_STATE}
- MD_SERVER_AUTOSTART = IIS_MD_SERVER_BASE + 17;
- {$EXTERNALSYM MD_SERVER_AUTOSTART}
- MD_SERVER_SIZE = IIS_MD_SERVER_BASE + 18;
- {$EXTERNALSYM MD_SERVER_SIZE}
- MD_SERVER_LISTEN_BACKLOG = IIS_MD_SERVER_BASE + 19;
- {$EXTERNALSYM MD_SERVER_LISTEN_BACKLOG}
- MD_SERVER_LISTEN_TIMEOUT = IIS_MD_SERVER_BASE + 20;
- {$EXTERNALSYM MD_SERVER_LISTEN_TIMEOUT}
- MD_DOWNLEVEL_ADMIN_INSTANCE = IIS_MD_SERVER_BASE + 21;
- {$EXTERNALSYM MD_DOWNLEVEL_ADMIN_INSTANCE}
- MD_LEVELS_TO_SCAN = IIS_MD_SERVER_BASE + 22;
- {$EXTERNALSYM MD_LEVELS_TO_SCAN}
- MD_SERVER_BINDINGS = IIS_MD_SERVER_BASE + 23;
- {$EXTERNALSYM MD_SERVER_BINDINGS}
- MD_MAX_ENDPOINT_CONNECTIONS = IIS_MD_SERVER_BASE + 24;
- {$EXTERNALSYM MD_MAX_ENDPOINT_CONNECTIONS}
- MD_SERVER_CONFIGURATION_INFO = IIS_MD_SERVER_BASE + 27;
- {$EXTERNALSYM MD_SERVER_CONFIGURATION_INFO}
- MD_IISADMIN_EXTENSIONS = IIS_MD_SERVER_BASE + 28;
- {$EXTERNALSYM MD_IISADMIN_EXTENSIONS}
- MD_DISABLE_SOCKET_POOLING = IIS_MD_SERVER_BASE + 29;
- {$EXTERNALSYM MD_DISABLE_SOCKET_POOLING}
- MD_METADATA_ID_REGISTRATION = IIS_MD_SERVER_BASE + 30;
- {$EXTERNALSYM MD_METADATA_ID_REGISTRATION}
-
-//
-// These properties are specific to HTTP and belong to the website
-//
-
- IIS_MD_HTTP_BASE = 2000;
- {$EXTERNALSYM IIS_MD_HTTP_BASE}
-
- MD_SECURE_BINDINGS = IIS_MD_HTTP_BASE + 21;
- {$EXTERNALSYM MD_SECURE_BINDINGS}
-
- MD_FILTER_LOAD_ORDER = IIS_MD_HTTP_BASE + 40;
- {$EXTERNALSYM MD_FILTER_LOAD_ORDER}
- MD_FILTER_IMAGE_PATH = IIS_MD_HTTP_BASE + 41;
- {$EXTERNALSYM MD_FILTER_IMAGE_PATH}
- MD_FILTER_STATE = IIS_MD_HTTP_BASE + 42;
- {$EXTERNALSYM MD_FILTER_STATE}
- MD_FILTER_ENABLED = IIS_MD_HTTP_BASE + 43;
- {$EXTERNALSYM MD_FILTER_ENABLED}
- MD_FILTER_FLAGS = IIS_MD_HTTP_BASE + 44;
- {$EXTERNALSYM MD_FILTER_FLAGS}
- MD_FILTER_DESCRIPTION = IIS_MD_HTTP_BASE + 45;
- {$EXTERNALSYM MD_FILTER_DESCRIPTION}
- MD_FILTER_ENABLE_CACHE = IIS_MD_HTTP_BASE + 46;
- {$EXTERNALSYM MD_FILTER_ENABLE_CACHE}
-
- MD_ADV_NOTIFY_PWD_EXP_IN_DAYS = IIS_MD_HTTP_BASE + 63;
- {$EXTERNALSYM MD_ADV_NOTIFY_PWD_EXP_IN_DAYS}
- MD_ADV_CACHE_TTL = IIS_MD_HTTP_BASE + 64;
- {$EXTERNALSYM MD_ADV_CACHE_TTL}
- MD_AUTH_CHANGE_FLAGS = IIS_MD_HTTP_BASE + 68;
- {$EXTERNALSYM MD_AUTH_CHANGE_FLAGS}
-
- MD_PROCESS_NTCR_IF_LOGGED_ON = IIS_MD_HTTP_BASE + 70;
- {$EXTERNALSYM MD_PROCESS_NTCR_IF_LOGGED_ON}
-
- MD_FRONTPAGE_WEB = IIS_MD_HTTP_BASE + 72;
- {$EXTERNALSYM MD_FRONTPAGE_WEB}
- MD_IN_PROCESS_ISAPI_APPS = IIS_MD_HTTP_BASE + 73;
- {$EXTERNALSYM MD_IN_PROCESS_ISAPI_APPS}
-
- MD_ALLOW_PATH_INFO_FOR_SCRIPT_MAPPINGS = IIS_MD_HTTP_BASE + 95;
- {$EXTERNALSYM MD_ALLOW_PATH_INFO_FOR_SCRIPT_MAPPINGS}
-
- MD_APP_FRIENDLY_NAME = IIS_MD_HTTP_BASE + 102;
- {$EXTERNALSYM MD_APP_FRIENDLY_NAME}
- MD_APP_ROOT = IIS_MD_HTTP_BASE + 103;
- {$EXTERNALSYM MD_APP_ROOT}
- MD_APP_ISOLATED = IIS_MD_HTTP_BASE + 104;
- {$EXTERNALSYM MD_APP_ISOLATED}
- MD_APP_WAM_CLSID = IIS_MD_HTTP_BASE + 105;
- {$EXTERNALSYM MD_APP_WAM_CLSID}
- MD_APP_PACKAGE_ID = IIS_MD_HTTP_BASE + 106;
- {$EXTERNALSYM MD_APP_PACKAGE_ID}
- MD_APP_PACKAGE_NAME = IIS_MD_HTTP_BASE + 107;
- {$EXTERNALSYM MD_APP_PACKAGE_NAME}
- MD_APP_OOP_RECOVER_LIMIT = IIS_MD_HTTP_BASE + 110;
- {$EXTERNALSYM MD_APP_OOP_RECOVER_LIMIT}
- MD_APP_PERIODIC_RESTART_TIME = IIS_MD_HTTP_BASE + 111;
- {$EXTERNALSYM MD_APP_PERIODIC_RESTART_TIME}
- MD_APP_PERIODIC_RESTART_REQUESTS = IIS_MD_HTTP_BASE + 112;
- {$EXTERNALSYM MD_APP_PERIODIC_RESTART_REQUESTS}
- MD_APP_PERIODIC_RESTART_SCHEDULE = IIS_MD_HTTP_BASE + 113;
- {$EXTERNALSYM MD_APP_PERIODIC_RESTART_SCHEDULE}
- MD_APP_SHUTDOWN_TIME_LIMIT = IIS_MD_HTTP_BASE + 114;
- {$EXTERNALSYM MD_APP_SHUTDOWN_TIME_LIMIT}
-
- MD_ADMIN_INSTANCE = IIS_MD_HTTP_BASE + 115;
- {$EXTERNALSYM MD_ADMIN_INSTANCE}
-
- MD_CUSTOM_ERROR_DESC = IIS_MD_HTTP_BASE + 120;
- {$EXTERNALSYM MD_CUSTOM_ERROR_DESC}
-
-//
-// Client Access License parameters
-//
-
-//
-// CPU Accounting and Throttling Properties
-//
-
-//
-// The enabled flags are per Application or CGI
-//
-
- MD_CPU_RESET_INTERVAL = IIS_MD_HTTP_BASE + 144;
- {$EXTERNALSYM MD_CPU_RESET_INTERVAL}
-
-//
-// Site Server properties
-//
-
-//
-// Properties to disable/restrict request handlers.
-//
-
- MD_ISAPI_RESTRICTION_LIST = IIS_MD_HTTP_BASE + 163;
- {$EXTERNALSYM MD_ISAPI_RESTRICTION_LIST}
- MD_CGI_RESTRICTION_LIST = IIS_MD_HTTP_BASE + 164;
- {$EXTERNALSYM MD_CGI_RESTRICTION_LIST}
- MD_APP_DEPENDENCIES = IIS_MD_HTTP_BASE + 167;
- {$EXTERNALSYM MD_APP_DEPENDENCIES}
- MD_WEB_SVC_EXT_RESTRICTION_LIST = IIS_MD_HTTP_BASE + 168;
- {$EXTERNALSYM MD_WEB_SVC_EXT_RESTRICTION_LIST}
-
- MD_MD_SERVER_SS_AUTH_MAPPING = IIS_MD_HTTP_BASE + 200;
- {$EXTERNALSYM MD_MD_SERVER_SS_AUTH_MAPPING}
-
-//
-// valid values for MD_CERT_CHECK_MODE
-//
-
- MD_CERT_NO_REVOC_CHECK = $00000001;
- {$EXTERNALSYM MD_CERT_NO_REVOC_CHECK}
- MD_CERT_CACHE_RETRIEVAL_ONLY = $00000002;
- {$EXTERNALSYM MD_CERT_CACHE_RETRIEVAL_ONLY}
- MD_CERT_CHECK_REVOCATION_FRESHNESS_TIME = $00000004;
- {$EXTERNALSYM MD_CERT_CHECK_REVOCATION_FRESHNESS_TIME}
- MD_CERT_NO_USAGE_CHECK = $00010000;
- {$EXTERNALSYM MD_CERT_NO_USAGE_CHECK}
-
-//
-// HTTP Compression properties. All are global and unheritable.
-//
-
- MD_HC_COMPRESSION_DIRECTORY = IIS_MD_HTTP_BASE + 210;
- {$EXTERNALSYM MD_HC_COMPRESSION_DIRECTORY}
- MD_HC_CACHE_CONTROL_HEADER = IIS_MD_HTTP_BASE + 211;
- {$EXTERNALSYM MD_HC_CACHE_CONTROL_HEADER}
- MD_HC_EXPIRES_HEADER = IIS_MD_HTTP_BASE + 212;
- {$EXTERNALSYM MD_HC_EXPIRES_HEADER}
- MD_HC_DO_DYNAMIC_COMPRESSION = IIS_MD_HTTP_BASE + 213;
- {$EXTERNALSYM MD_HC_DO_DYNAMIC_COMPRESSION}
- MD_HC_DO_STATIC_COMPRESSION = IIS_MD_HTTP_BASE + 214;
- {$EXTERNALSYM MD_HC_DO_STATIC_COMPRESSION}
- MD_HC_DO_ON_DEMAND_COMPRESSION = IIS_MD_HTTP_BASE + 215;
- {$EXTERNALSYM MD_HC_DO_ON_DEMAND_COMPRESSION}
- MD_HC_DO_DISK_SPACE_LIMITING = IIS_MD_HTTP_BASE + 216;
- {$EXTERNALSYM MD_HC_DO_DISK_SPACE_LIMITING}
- MD_HC_NO_COMPRESSION_FOR_HTTP_10 = IIS_MD_HTTP_BASE + 217;
- {$EXTERNALSYM MD_HC_NO_COMPRESSION_FOR_HTTP_10}
- MD_HC_NO_COMPRESSION_FOR_PROXIES = IIS_MD_HTTP_BASE + 218;
- {$EXTERNALSYM MD_HC_NO_COMPRESSION_FOR_PROXIES}
- MD_HC_NO_COMPRESSION_FOR_RANGE = IIS_MD_HTTP_BASE + 219;
- {$EXTERNALSYM MD_HC_NO_COMPRESSION_FOR_RANGE}
- MD_HC_SEND_CACHE_HEADERS = IIS_MD_HTTP_BASE + 220;
- {$EXTERNALSYM MD_HC_SEND_CACHE_HEADERS}
- MD_HC_MAX_DISK_SPACE_USAGE = IIS_MD_HTTP_BASE + 221;
- {$EXTERNALSYM MD_HC_MAX_DISK_SPACE_USAGE}
- MD_HC_IO_BUFFER_SIZE = IIS_MD_HTTP_BASE + 222;
- {$EXTERNALSYM MD_HC_IO_BUFFER_SIZE}
- MD_HC_COMPRESSION_BUFFER_SIZE = IIS_MD_HTTP_BASE + 223;
- {$EXTERNALSYM MD_HC_COMPRESSION_BUFFER_SIZE}
- MD_HC_MAX_QUEUE_LENGTH = IIS_MD_HTTP_BASE + 224;
- {$EXTERNALSYM MD_HC_MAX_QUEUE_LENGTH}
- MD_HC_FILES_DELETED_PER_DISK_FREE = IIS_MD_HTTP_BASE + 225;
- {$EXTERNALSYM MD_HC_FILES_DELETED_PER_DISK_FREE}
- MD_HC_MIN_FILE_SIZE_FOR_COMP = IIS_MD_HTTP_BASE + 226;
- {$EXTERNALSYM MD_HC_MIN_FILE_SIZE_FOR_COMP}
-
- MD_HC_COMPRESSION_DLL = IIS_MD_HTTP_BASE + 237;
- {$EXTERNALSYM MD_HC_COMPRESSION_DLL}
- MD_HC_FILE_EXTENSIONS = IIS_MD_HTTP_BASE + 238;
- {$EXTERNALSYM MD_HC_FILE_EXTENSIONS}
- //MD_HC_MIME_TYPE = IIS_MD_HTTP_BASE + 239;
- //{$EXTERNALSYM MD_HC_MIME_TYPE}
- MD_HC_PRIORITY = IIS_MD_HTTP_BASE + 240;
- {$EXTERNALSYM MD_HC_PRIORITY}
- MD_HC_DYNAMIC_COMPRESSION_LEVEL = IIS_MD_HTTP_BASE + 241;
- {$EXTERNALSYM MD_HC_DYNAMIC_COMPRESSION_LEVEL}
- MD_HC_ON_DEMAND_COMP_LEVEL = IIS_MD_HTTP_BASE + 242;
- {$EXTERNALSYM MD_HC_ON_DEMAND_COMP_LEVEL}
- MD_HC_CREATE_FLAGS = IIS_MD_HTTP_BASE + 243;
- {$EXTERNALSYM MD_HC_CREATE_FLAGS}
- MD_HC_SCRIPT_FILE_EXTENSIONS = IIS_MD_HTTP_BASE + 244;
- {$EXTERNALSYM MD_HC_SCRIPT_FILE_EXTENSIONS}
-
- MD_HC_DO_NAMESPACE_DYNAMIC_COMPRESSION = IIS_MD_HTTP_BASE + 255;
- {$EXTERNALSYM MD_HC_DO_NAMESPACE_DYNAMIC_COMPRESSION}
- MD_HC_DO_NAMESPACE_STATIC_COMPRESSION = IIS_MD_HTTP_BASE + 256;
- {$EXTERNALSYM MD_HC_DO_NAMESPACE_STATIC_COMPRESSION}
-
-//
-// Generic property indicating a failure status code - Can be used under
-// any component that can fail (virtual directory, filters, applications etc)
-//
-
- MD_WIN32_ERROR = IIS_MD_SERVER_BASE + 99;
- {$EXTERNALSYM MD_WIN32_ERROR}
-
-//
-// Virtual root properties - note MD_ACCESS_PERM is also generally set at
-// the virtual directory. These are used for both HTTP and FTP
-//
-
- IIS_MD_VR_BASE = 3000;
- {$EXTERNALSYM IIS_MD_VR_BASE}
-
- MD_VR_PATH = IIS_MD_VR_BASE + 1;
- {$EXTERNALSYM MD_VR_PATH}
- MD_VR_USERNAME = IIS_MD_VR_BASE + 2;
- {$EXTERNALSYM MD_VR_USERNAME}
- MD_VR_PASSWORD = IIS_MD_VR_BASE + 3;
- {$EXTERNALSYM MD_VR_PASSWORD}
- MD_VR_PASSTHROUGH = IIS_MD_VR_BASE + 6;
- {$EXTERNALSYM MD_VR_PASSTHROUGH}
- MD_VR_NO_CACHE = IIS_MD_VR_BASE + 7;
- {$EXTERNALSYM MD_VR_NO_CACHE}
- //MD_VR_IGNORE_TRANSLATE = IIS_MD_VR_BASE + 8;
- //{$EXTERNALSYM MD_VR_IGNORE_TRANSLATE}
-
-//
-// Logging related attributes
-//
-
- IIS_MD_LOG_BASE = 4000;
- {$EXTERNALSYM IIS_MD_LOG_BASE}
-
- MD_LOG_TYPE = IIS_MD_LOG_BASE + 0;
- {$EXTERNALSYM MD_LOG_TYPE}
- MD_LOGFILE_DIRECTORY = IIS_MD_LOG_BASE + 1;
- {$EXTERNALSYM MD_LOGFILE_DIRECTORY}
- MD_LOG_UNUSED1 = IIS_MD_LOG_BASE + 2;
- {$EXTERNALSYM MD_LOG_UNUSED1}
- MD_LOGFILE_PERIOD = IIS_MD_LOG_BASE + 3;
- {$EXTERNALSYM MD_LOGFILE_PERIOD}
- MD_LOGFILE_TRUNCATE_SIZE = IIS_MD_LOG_BASE + 4;
- {$EXTERNALSYM MD_LOGFILE_TRUNCATE_SIZE}
- MD_LOG_PLUGIN_MOD_ID = IIS_MD_LOG_BASE + 5;
- {$EXTERNALSYM MD_LOG_PLUGIN_MOD_ID}
- MD_LOG_PLUGIN_UI_ID = IIS_MD_LOG_BASE + 6;
- {$EXTERNALSYM MD_LOG_PLUGIN_UI_ID}
- MD_LOGSQL_DATA_SOURCES = IIS_MD_LOG_BASE + 7;
- {$EXTERNALSYM MD_LOGSQL_DATA_SOURCES}
- MD_LOGSQL_TABLE_NAME = IIS_MD_LOG_BASE + 8;
- {$EXTERNALSYM MD_LOGSQL_TABLE_NAME}
- MD_LOGSQL_USER_NAME = IIS_MD_LOG_BASE + 9;
- {$EXTERNALSYM MD_LOGSQL_USER_NAME}
- MD_LOGSQL_PASSWORD = IIS_MD_LOG_BASE + 10;
- {$EXTERNALSYM MD_LOGSQL_PASSWORD}
- MD_LOG_PLUGIN_ORDER = IIS_MD_LOG_BASE + 11;
- {$EXTERNALSYM MD_LOG_PLUGIN_ORDER}
- MD_LOG_PLUGINS_AVAILABLE = IIS_MD_LOG_BASE + 12;
- {$EXTERNALSYM MD_LOG_PLUGINS_AVAILABLE}
- MD_LOGEXT_FIELD_MASK = IIS_MD_LOG_BASE + 13;
- {$EXTERNALSYM MD_LOGEXT_FIELD_MASK}
- MD_LOGEXT_FIELD_MASK2 = IIS_MD_LOG_BASE + 14;
- {$EXTERNALSYM MD_LOGEXT_FIELD_MASK2}
-
-//
-// Allow W3C logging file naming and rollover based on Local Time
-//
-
- MD_LOGFILE_LOCALTIME_ROLLOVER = IIS_MD_LOG_BASE + 15;
- {$EXTERNALSYM MD_LOGFILE_LOCALTIME_ROLLOVER}
-
- IIS_MD_LOG_LAST = MD_LOGFILE_LOCALTIME_ROLLOVER;
- {$EXTERNALSYM IIS_MD_LOG_LAST}
-
-//
-// Global Flag to denote that IIS will generate one centralized
-// binary log file rather than a separate file per web site
-//
-
- MD_GLOBAL_BINARY_LOGGING_ENABLED = IIS_MD_LOG_BASE + 16;
- {$EXTERNALSYM MD_GLOBAL_BINARY_LOGGING_ENABLED}
-
-//
-// Log type
-//
-
- MD_LOG_TYPE_DISABLED = 0;
- {$EXTERNALSYM MD_LOG_TYPE_DISABLED}
- MD_LOG_TYPE_ENABLED = 1;
- {$EXTERNALSYM MD_LOG_TYPE_ENABLED}
-
-//
-// LOGGING values
-//
-
- MD_LOGFILE_PERIOD_NONE = 0;
- {$EXTERNALSYM MD_LOGFILE_PERIOD_NONE}
- MD_LOGFILE_PERIOD_MAXSIZE = 0;
- {$EXTERNALSYM MD_LOGFILE_PERIOD_MAXSIZE}
- MD_LOGFILE_PERIOD_DAILY = 1;
- {$EXTERNALSYM MD_LOGFILE_PERIOD_DAILY}
- MD_LOGFILE_PERIOD_WEEKLY = 2;
- {$EXTERNALSYM MD_LOGFILE_PERIOD_WEEKLY}
- MD_LOGFILE_PERIOD_MONTHLY = 3;
- {$EXTERNALSYM MD_LOGFILE_PERIOD_MONTHLY}
- MD_LOGFILE_PERIOD_HOURLY = 4;
- {$EXTERNALSYM MD_LOGFILE_PERIOD_HOURLY}
-
-//
-// Field masks for extended logging
-// Fields are logged in order of increasing mask value
-//
-
- MD_EXTLOG_DATE = $00000001;
- {$EXTERNALSYM MD_EXTLOG_DATE}
- MD_EXTLOG_TIME = $00000002;
- {$EXTERNALSYM MD_EXTLOG_TIME}
- MD_EXTLOG_CLIENT_IP = $00000004;
- {$EXTERNALSYM MD_EXTLOG_CLIENT_IP}
- MD_EXTLOG_USERNAME = $00000008;
- {$EXTERNALSYM MD_EXTLOG_USERNAME}
- MD_EXTLOG_SITE_NAME = $00000010;
- {$EXTERNALSYM MD_EXTLOG_SITE_NAME}
- MD_EXTLOG_COMPUTER_NAME = $00000020;
- {$EXTERNALSYM MD_EXTLOG_COMPUTER_NAME}
- MD_EXTLOG_SERVER_IP = $00000040;
- {$EXTERNALSYM MD_EXTLOG_SERVER_IP}
- MD_EXTLOG_METHOD = $00000080;
- {$EXTERNALSYM MD_EXTLOG_METHOD}
- MD_EXTLOG_URI_STEM = $00000100;
- {$EXTERNALSYM MD_EXTLOG_URI_STEM}
- MD_EXTLOG_URI_QUERY = $00000200;
- {$EXTERNALSYM MD_EXTLOG_URI_QUERY}
- MD_EXTLOG_HTTP_STATUS = $00000400;
- {$EXTERNALSYM MD_EXTLOG_HTTP_STATUS}
- MD_EXTLOG_WIN32_STATUS = $00000800;
- {$EXTERNALSYM MD_EXTLOG_WIN32_STATUS}
- MD_EXTLOG_BYTES_SENT = $00001000;
- {$EXTERNALSYM MD_EXTLOG_BYTES_SENT}
- MD_EXTLOG_BYTES_RECV = $00002000;
- {$EXTERNALSYM MD_EXTLOG_BYTES_RECV}
- MD_EXTLOG_TIME_TAKEN = $00004000;
- {$EXTERNALSYM MD_EXTLOG_TIME_TAKEN}
- MD_EXTLOG_SERVER_PORT = $00008000;
- {$EXTERNALSYM MD_EXTLOG_SERVER_PORT}
- MD_EXTLOG_USER_AGENT = $00010000;
- {$EXTERNALSYM MD_EXTLOG_USER_AGENT}
- MD_EXTLOG_COOKIE = $00020000;
- {$EXTERNALSYM MD_EXTLOG_COOKIE}
- MD_EXTLOG_REFERER = $00040000;
- {$EXTERNALSYM MD_EXTLOG_REFERER}
- MD_EXTLOG_PROTOCOL_VERSION = $00080000;
- {$EXTERNALSYM MD_EXTLOG_PROTOCOL_VERSION}
- MD_EXTLOG_HOST = $00100000;
- {$EXTERNALSYM MD_EXTLOG_HOST}
- MD_EXTLOG_HTTP_SUB_STATUS = $00200000;
- {$EXTERNALSYM MD_EXTLOG_HTTP_SUB_STATUS}
-
- MD_DEFAULT_EXTLOG_FIELDS = MD_EXTLOG_CLIENT_IP or MD_EXTLOG_TIME or MD_EXTLOG_METHOD or
- MD_EXTLOG_URI_STEM or MD_EXTLOG_HTTP_STATUS or MD_EXTLOG_HTTP_SUB_STATUS;
- {$EXTERNALSYM MD_DEFAULT_EXTLOG_FIELDS}
-
-//
-// Custom Logging related attributes
-//
-
- IIS_MD_LOGCUSTOM_BASE = 4500;
- {$EXTERNALSYM IIS_MD_LOGCUSTOM_BASE}
-
-//
-// Custom Logging configuration attributes
-//
-
- MD_LOGCUSTOM_PROPERTY_NAME = IIS_MD_LOGCUSTOM_BASE + 1;
- {$EXTERNALSYM MD_LOGCUSTOM_PROPERTY_NAME}
- MD_LOGCUSTOM_PROPERTY_HEADER = IIS_MD_LOGCUSTOM_BASE + 2;
- {$EXTERNALSYM MD_LOGCUSTOM_PROPERTY_HEADER}
- MD_LOGCUSTOM_PROPERTY_ID = IIS_MD_LOGCUSTOM_BASE + 3;
- {$EXTERNALSYM MD_LOGCUSTOM_PROPERTY_ID}
- MD_LOGCUSTOM_PROPERTY_MASK = IIS_MD_LOGCUSTOM_BASE + 4;
- {$EXTERNALSYM MD_LOGCUSTOM_PROPERTY_MASK}
- MD_LOGCUSTOM_PROPERTY_DATATYPE = IIS_MD_LOGCUSTOM_BASE + 5;
- {$EXTERNALSYM MD_LOGCUSTOM_PROPERTY_DATATYPE}
- MD_LOGCUSTOM_SERVICES_STRING = IIS_MD_LOGCUSTOM_BASE + 6; // MultiSZ List of services that the property is applicable to.
- {$EXTERNALSYM MD_LOGCUSTOM_SERVICES_STRING}
-
- MD_LOGCUSTOM_PROPERTY_NODE_ID = IIS_MD_LOGCUSTOM_BASE + 8;
- {$EXTERNALSYM MD_LOGCUSTOM_PROPERTY_NODE_ID}
-
- IIS_MD_LOGCUSTOM_LAST = MD_LOGCUSTOM_PROPERTY_NODE_ID;
- {$EXTERNALSYM IIS_MD_LOGCUSTOM_LAST}
-
-//
-// Valid values for Custom Logging's MD_LOGCUSTOM_PROPERTY_DATATYPE field
-//
-
- MD_LOGCUSTOM_DATATYPE_INT = 0;
- {$EXTERNALSYM MD_LOGCUSTOM_DATATYPE_INT}
- MD_LOGCUSTOM_DATATYPE_UINT = 1;
- {$EXTERNALSYM MD_LOGCUSTOM_DATATYPE_UINT}
- MD_LOGCUSTOM_DATATYPE_LONG = 2;
- {$EXTERNALSYM MD_LOGCUSTOM_DATATYPE_LONG}
- MD_LOGCUSTOM_DATATYPE_ULONG = 3;
- {$EXTERNALSYM MD_LOGCUSTOM_DATATYPE_ULONG}
- MD_LOGCUSTOM_DATATYPE_FLOAT = 4;
- {$EXTERNALSYM MD_LOGCUSTOM_DATATYPE_FLOAT}
- MD_LOGCUSTOM_DATATYPE_DOUBLE = 5;
- {$EXTERNALSYM MD_LOGCUSTOM_DATATYPE_DOUBLE}
- MD_LOGCUSTOM_DATATYPE_LPSTR = 6;
- {$EXTERNALSYM MD_LOGCUSTOM_DATATYPE_LPSTR}
- MD_LOGCUSTOM_DATATYPE_LPWSTR = 7;
- {$EXTERNALSYM MD_LOGCUSTOM_DATATYPE_LPWSTR}
-
-//
-// ISAPI Filter Notification Flags
-//
-
- MD_NOTIFY_SECURE_PORT = $00000001;
- {$EXTERNALSYM MD_NOTIFY_SECURE_PORT}
- MD_NOTIFY_NONSECURE_PORT = $00000002;
- {$EXTERNALSYM MD_NOTIFY_NONSECURE_PORT}
-
- MD_NOTIFY_READ_RAW_DATA = $00008000;
- {$EXTERNALSYM MD_NOTIFY_READ_RAW_DATA}
- MD_NOTIFY_PREPROC_HEADERS = $00004000;
- {$EXTERNALSYM MD_NOTIFY_PREPROC_HEADERS}
- MD_NOTIFY_AUTHENTICATION = $00002000;
- {$EXTERNALSYM MD_NOTIFY_AUTHENTICATION}
- MD_NOTIFY_URL_MAP = $00001000;
- {$EXTERNALSYM MD_NOTIFY_URL_MAP}
- MD_NOTIFY_ACCESS_DENIED = $00000800;
- {$EXTERNALSYM MD_NOTIFY_ACCESS_DENIED}
- MD_NOTIFY_SEND_RESPONSE = $00000040;
- {$EXTERNALSYM MD_NOTIFY_SEND_RESPONSE}
- MD_NOTIFY_SEND_RAW_DATA = $00000400;
- {$EXTERNALSYM MD_NOTIFY_SEND_RAW_DATA}
- MD_NOTIFY_LOG = $00000200;
- {$EXTERNALSYM MD_NOTIFY_LOG}
- MD_NOTIFY_END_OF_REQUEST = $00000080;
- {$EXTERNALSYM MD_NOTIFY_END_OF_REQUEST}
- MD_NOTIFY_END_OF_NET_SESSION = $00000100;
- {$EXTERNALSYM MD_NOTIFY_END_OF_NET_SESSION}
- MD_NOTIFY_AUTH_COMPLETE = $04000000;
- {$EXTERNALSYM MD_NOTIFY_AUTH_COMPLETE}
-
-//
-// ISAPI Filter ordering flags
-//
-
- MD_NOTIFY_ORDER_HIGH = $00080000;
- {$EXTERNALSYM MD_NOTIFY_ORDER_HIGH}
- MD_NOTIFY_ORDER_MEDIUM = $00040000;
- {$EXTERNALSYM MD_NOTIFY_ORDER_MEDIUM}
- MD_NOTIFY_ORDER_LOW = $00020000;
- {$EXTERNALSYM MD_NOTIFY_ORDER_LOW}
- MD_NOTIFY_ORDER_DEFAULT = MD_NOTIFY_ORDER_LOW;
- {$EXTERNALSYM MD_NOTIFY_ORDER_DEFAULT}
-
- MD_NOTIFY_ORDER_MASK = MD_NOTIFY_ORDER_HIGH or MD_NOTIFY_ORDER_MEDIUM or MD_NOTIFY_ORDER_LOW;
- {$EXTERNALSYM MD_NOTIFY_ORDER_MASK}
-
-//
-// These are FTP specific properties
-//
-
- IIS_MD_FTP_BASE = 5000;
- {$EXTERNALSYM IIS_MD_FTP_BASE}
-
- MD_EXIT_MESSAGE = IIS_MD_FTP_BASE + 1;
- {$EXTERNALSYM MD_EXIT_MESSAGE}
- MD_GREETING_MESSAGE = IIS_MD_FTP_BASE + 2;
- {$EXTERNALSYM MD_GREETING_MESSAGE}
- MD_MAX_CLIENTS_MESSAGE = IIS_MD_FTP_BASE + 3;
- {$EXTERNALSYM MD_MAX_CLIENTS_MESSAGE}
- MD_MSDOS_DIR_OUTPUT = IIS_MD_FTP_BASE + 4;
- {$EXTERNALSYM MD_MSDOS_DIR_OUTPUT}
- MD_ALLOW_ANONYMOUS = IIS_MD_FTP_BASE + 5;
- {$EXTERNALSYM MD_ALLOW_ANONYMOUS}
- MD_ANONYMOUS_ONLY = IIS_MD_FTP_BASE + 6;
- {$EXTERNALSYM MD_ANONYMOUS_ONLY}
- MD_LOG_ANONYMOUS = IIS_MD_FTP_BASE + 7;
- {$EXTERNALSYM MD_LOG_ANONYMOUS}
- MD_LOG_NONANONYMOUS = IIS_MD_FTP_BASE + 8;
- {$EXTERNALSYM MD_LOG_NONANONYMOUS}
- MD_ALLOW_REPLACE_ON_RENAME = IIS_MD_FTP_BASE + 9;
- {$EXTERNALSYM MD_ALLOW_REPLACE_ON_RENAME}
- MD_SHOW_4_DIGIT_YEAR = IIS_MD_FTP_BASE + 10;
- {$EXTERNALSYM MD_SHOW_4_DIGIT_YEAR}
- MD_BANNER_MESSAGE = IIS_MD_FTP_BASE + 11;
- {$EXTERNALSYM MD_BANNER_MESSAGE}
- MD_USER_ISOLATION = IIS_MD_FTP_BASE + 12;
- {$EXTERNALSYM MD_USER_ISOLATION}
- MD_FTP_LOG_IN_UTF_8 = IIS_MD_FTP_BASE + 13;
- {$EXTERNALSYM MD_FTP_LOG_IN_UTF_8}
- MD_AD_CONNECTIONS_USERNAME = IIS_MD_FTP_BASE + 14;
- {$EXTERNALSYM MD_AD_CONNECTIONS_USERNAME}
- MD_AD_CONNECTIONS_PASSWORD = IIS_MD_FTP_BASE + 15;
- {$EXTERNALSYM MD_AD_CONNECTIONS_PASSWORD}
- MD_PASSIVE_PORT_RANGE = IIS_MD_FTP_BASE + 16;
- {$EXTERNALSYM MD_PASSIVE_PORT_RANGE}
-
-//
-// These are SSL specific properties
-//
-
- IIS_MD_SSL_BASE = 5500;
- {$EXTERNALSYM IIS_MD_SSL_BASE}
-
- MD_SSL_PUBLIC_KEY = IIS_MD_SSL_BASE + 0;
- {$EXTERNALSYM MD_SSL_PUBLIC_KEY}
- MD_SSL_PRIVATE_KEY = IIS_MD_SSL_BASE + 1;
- {$EXTERNALSYM MD_SSL_PRIVATE_KEY}
- MD_SSL_KEY_PASSWORD = IIS_MD_SSL_BASE + 2;
- {$EXTERNALSYM MD_SSL_KEY_PASSWORD}
- MD_SSL_KEY_REQUEST = IIS_MD_SSL_BASE + 3;
- {$EXTERNALSYM MD_SSL_KEY_REQUEST}
-
-//
-// These are server certificate properties
-//
-//
-// These are Certificate Trust List properties
-//
-
-//
-// Metabase property that defines whether to use DS mapper or not
-//
-
- MD_SSL_USE_DS_MAPPER = IIS_MD_SSL_BASE + 19;
- {$EXTERNALSYM MD_SSL_USE_DS_MAPPER}
-
- MD_SSL_ALWAYS_NEGO_CLIENT_CERT = IIS_MD_SSL_BASE + 21;
- {$EXTERNALSYM MD_SSL_ALWAYS_NEGO_CLIENT_CERT}
-
-//
-// Metabase properties that are used by the CertWiz ActiveX control, that
-// is used for the Certificate/CTL UI management tool
-//
-
-//
-// Metabase properties used for Fortezza certificates
-//
-
-//
-// Metabase properties that are used by the CertWiz ActiveX control to keep
-// track of the user's entry history, and whether DEBUG is enabled. We keep
-// these private properties on a per VS basis.
-//
-
-// File and Directory related properties - these should be added in the
-// metabase with a user type of IIS_MD_UT_FILE
-//
-
- IIS_MD_FILE_PROP_BASE = 6000;
- {$EXTERNALSYM IIS_MD_FILE_PROP_BASE}
-
- MD_AUTHORIZATION = IIS_MD_FILE_PROP_BASE;
- {$EXTERNALSYM MD_AUTHORIZATION}
- MD_REALM = IIS_MD_FILE_PROP_BASE + 1;
- {$EXTERNALSYM MD_REALM}
- MD_HTTP_EXPIRES = IIS_MD_FILE_PROP_BASE + 2;
- {$EXTERNALSYM MD_HTTP_EXPIRES}
- MD_HTTP_PICS = IIS_MD_FILE_PROP_BASE + 3;
- {$EXTERNALSYM MD_HTTP_PICS}
- MD_HTTP_CUSTOM = IIS_MD_FILE_PROP_BASE + 4;
- {$EXTERNALSYM MD_HTTP_CUSTOM}
- MD_DIRECTORY_BROWSING = IIS_MD_FILE_PROP_BASE + 5;
- {$EXTERNALSYM MD_DIRECTORY_BROWSING}
- MD_DEFAULT_LOAD_FILE = IIS_MD_FILE_PROP_BASE + 6;
- {$EXTERNALSYM MD_DEFAULT_LOAD_FILE}
- MD_CUSTOM_ERROR = IIS_MD_FILE_PROP_BASE + 8;
- {$EXTERNALSYM MD_CUSTOM_ERROR}
- MD_FOOTER_DOCUMENT = IIS_MD_FILE_PROP_BASE + 9;
- {$EXTERNALSYM MD_FOOTER_DOCUMENT}
- MD_FOOTER_ENABLED = IIS_MD_FILE_PROP_BASE + 10;
- {$EXTERNALSYM MD_FOOTER_ENABLED}
- MD_HTTP_REDIRECT = IIS_MD_FILE_PROP_BASE + 11;
- {$EXTERNALSYM MD_HTTP_REDIRECT}
- MD_DEFAULT_LOGON_DOMAIN = IIS_MD_FILE_PROP_BASE + 12;
- {$EXTERNALSYM MD_DEFAULT_LOGON_DOMAIN}
- MD_LOGON_METHOD = IIS_MD_FILE_PROP_BASE + 13;
- {$EXTERNALSYM MD_LOGON_METHOD}
- MD_SCRIPT_MAPS = IIS_MD_FILE_PROP_BASE + 14;
- {$EXTERNALSYM MD_SCRIPT_MAPS}
- MD_MIME_MAP = IIS_MD_FILE_PROP_BASE + 15;
- {$EXTERNALSYM MD_MIME_MAP}
- MD_ACCESS_PERM = IIS_MD_FILE_PROP_BASE + 16;
- {$EXTERNALSYM MD_ACCESS_PERM}
- MD_IP_SEC = IIS_MD_FILE_PROP_BASE + 19;
- {$EXTERNALSYM MD_IP_SEC}
- MD_ANONYMOUS_USER_NAME = IIS_MD_FILE_PROP_BASE + 20;
- {$EXTERNALSYM MD_ANONYMOUS_USER_NAME}
- MD_ANONYMOUS_PWD = IIS_MD_FILE_PROP_BASE + 21;
- {$EXTERNALSYM MD_ANONYMOUS_PWD}
- MD_ANONYMOUS_USE_SUBAUTH = IIS_MD_FILE_PROP_BASE + 22;
- {$EXTERNALSYM MD_ANONYMOUS_USE_SUBAUTH}
- MD_DONT_LOG = IIS_MD_FILE_PROP_BASE + 23;
- {$EXTERNALSYM MD_DONT_LOG}
- MD_ADMIN_ACL = IIS_MD_FILE_PROP_BASE + 27;
- {$EXTERNALSYM MD_ADMIN_ACL}
- MD_SSI_EXEC_DISABLED = IIS_MD_FILE_PROP_BASE + 28;
- {$EXTERNALSYM MD_SSI_EXEC_DISABLED}
- MD_DO_REVERSE_DNS = IIS_MD_FILE_PROP_BASE + 29;
- {$EXTERNALSYM MD_DO_REVERSE_DNS}
- MD_SSL_ACCESS_PERM = IIS_MD_FILE_PROP_BASE + 30;
- {$EXTERNALSYM MD_SSL_ACCESS_PERM}
- MD_AUTHORIZATION_PERSISTENCE = IIS_MD_FILE_PROP_BASE + 31;
- {$EXTERNALSYM MD_AUTHORIZATION_PERSISTENCE}
- MD_NTAUTHENTICATION_PROVIDERS = IIS_MD_FILE_PROP_BASE + 32;
- {$EXTERNALSYM MD_NTAUTHENTICATION_PROVIDERS}
- MD_SCRIPT_TIMEOUT = IIS_MD_FILE_PROP_BASE + 33;
- {$EXTERNALSYM MD_SCRIPT_TIMEOUT}
- MD_CACHE_EXTENSIONS = IIS_MD_FILE_PROP_BASE + 34;
- {$EXTERNALSYM MD_CACHE_EXTENSIONS}
- MD_CREATE_PROCESS_AS_USER = IIS_MD_FILE_PROP_BASE + 35;
- {$EXTERNALSYM MD_CREATE_PROCESS_AS_USER}
- MD_CREATE_PROC_NEW_CONSOLE = IIS_MD_FILE_PROP_BASE + 36;
- {$EXTERNALSYM MD_CREATE_PROC_NEW_CONSOLE}
- MD_POOL_IDC_TIMEOUT = IIS_MD_FILE_PROP_BASE + 37;
- {$EXTERNALSYM MD_POOL_IDC_TIMEOUT}
- MD_ALLOW_KEEPALIVES = IIS_MD_FILE_PROP_BASE + 38;
- {$EXTERNALSYM MD_ALLOW_KEEPALIVES}
- MD_IS_CONTENT_INDEXED = IIS_MD_FILE_PROP_BASE + 39;
- {$EXTERNALSYM MD_IS_CONTENT_INDEXED}
- MD_CC_NO_CACHE = IIS_MD_FILE_PROP_BASE + 41;
- {$EXTERNALSYM MD_CC_NO_CACHE}
- MD_CC_MAX_AGE = IIS_MD_FILE_PROP_BASE + 42;
- {$EXTERNALSYM MD_CC_MAX_AGE}
- MD_CC_OTHER = IIS_MD_FILE_PROP_BASE + 43;
- {$EXTERNALSYM MD_CC_OTHER}
- MD_REDIRECT_HEADERS = IIS_MD_FILE_PROP_BASE + 44;
- {$EXTERNALSYM MD_REDIRECT_HEADERS}
- MD_UPLOAD_READAHEAD_SIZE = IIS_MD_FILE_PROP_BASE + 45;
- {$EXTERNALSYM MD_UPLOAD_READAHEAD_SIZE}
- MD_PUT_READ_SIZE = IIS_MD_FILE_PROP_BASE + 46;
- {$EXTERNALSYM MD_PUT_READ_SIZE}
- MD_USE_DIGEST_SSP = IIS_MD_FILE_PROP_BASE + 47;
- {$EXTERNALSYM MD_USE_DIGEST_SSP}
-
- MD_ENABLE_URL_AUTHORIZATION = IIS_MD_FILE_PROP_BASE + 48;
- {$EXTERNALSYM MD_ENABLE_URL_AUTHORIZATION}
- MD_URL_AUTHORIZATION_STORE_NAME = IIS_MD_FILE_PROP_BASE + 49;
- {$EXTERNALSYM MD_URL_AUTHORIZATION_STORE_NAME}
- MD_URL_AUTHORIZATION_SCOPE_NAME = IIS_MD_FILE_PROP_BASE + 50;
- {$EXTERNALSYM MD_URL_AUTHORIZATION_SCOPE_NAME}
-
- MD_MAX_REQUEST_ENTITY_ALLOWED = IIS_MD_FILE_PROP_BASE + 51;
- {$EXTERNALSYM MD_MAX_REQUEST_ENTITY_ALLOWED}
-
- MD_PASSPORT_REQUIRE_AD_MAPPING = IIS_MD_FILE_PROP_BASE + 52;
- {$EXTERNALSYM MD_PASSPORT_REQUIRE_AD_MAPPING}
-
- MD_URL_AUTHORIZATION_IMPERSONATION_LEVEL = IIS_MD_FILE_PROP_BASE + 53;
- {$EXTERNALSYM MD_URL_AUTHORIZATION_IMPERSONATION_LEVEL}
-
- ASP_MD_SERVER_BASE = 7000;
- {$EXTERNALSYM ASP_MD_SERVER_BASE}
-
- MD_ASP_BUFFERINGON = ASP_MD_SERVER_BASE + 0;
- {$EXTERNALSYM MD_ASP_BUFFERINGON}
- MD_ASP_LOGERRORREQUESTS = ASP_MD_SERVER_BASE + 1;
- {$EXTERNALSYM MD_ASP_LOGERRORREQUESTS}
- MD_ASP_SCRIPTERRORSSENTTOBROWSER = ASP_MD_SERVER_BASE + 2;
- {$EXTERNALSYM MD_ASP_SCRIPTERRORSSENTTOBROWSER}
- MD_ASP_SCRIPTERRORMESSAGE = ASP_MD_SERVER_BASE + 3;
- {$EXTERNALSYM MD_ASP_SCRIPTERRORMESSAGE}
- MD_ASP_SCRIPTFILECACHESIZE = ASP_MD_SERVER_BASE + 4;
- {$EXTERNALSYM MD_ASP_SCRIPTFILECACHESIZE}
- MD_ASP_SCRIPTENGINECACHEMAX = ASP_MD_SERVER_BASE + 5;
- {$EXTERNALSYM MD_ASP_SCRIPTENGINECACHEMAX}
- MD_ASP_SCRIPTTIMEOUT = ASP_MD_SERVER_BASE + 6;
- {$EXTERNALSYM MD_ASP_SCRIPTTIMEOUT}
- MD_ASP_SESSIONTIMEOUT = ASP_MD_SERVER_BASE + 7;
- {$EXTERNALSYM MD_ASP_SESSIONTIMEOUT}
- MD_ASP_ENABLEPARENTPATHS = ASP_MD_SERVER_BASE + 8;
- {$EXTERNALSYM MD_ASP_ENABLEPARENTPATHS}
- MD_ASP_MEMFREEFACTOR = ASP_MD_SERVER_BASE + 9; // OBSOLETE
- {$EXTERNALSYM MD_ASP_MEMFREEFACTOR}
- MD_ASP_MINUSEDBLOCKS = ASP_MD_SERVER_BASE + 10; // OBSOLETE
- {$EXTERNALSYM MD_ASP_MINUSEDBLOCKS}
- MD_ASP_ALLOWSESSIONSTATE = ASP_MD_SERVER_BASE + 11;
- {$EXTERNALSYM MD_ASP_ALLOWSESSIONSTATE}
- MD_ASP_SCRIPTLANGUAGE = ASP_MD_SERVER_BASE + 12;
- {$EXTERNALSYM MD_ASP_SCRIPTLANGUAGE}
- MD_ASP_QUEUETIMEOUT = ASP_MD_SERVER_BASE + 13;
- {$EXTERNALSYM MD_ASP_QUEUETIMEOUT}
- MD_ASP_ALLOWOUTOFPROCCOMPONENTS = ASP_MD_SERVER_BASE + 14;
- {$EXTERNALSYM MD_ASP_ALLOWOUTOFPROCCOMPONENTS}
- MD_ASP_ALLOWOUTOFPROCCMPNTS = MD_ASP_ALLOWOUTOFPROCCOMPONENTS; // Deprecated. Use MD_ASP_ALLOWOUTOFPROCCMPNTS
- {$EXTERNALSYM MD_ASP_ALLOWOUTOFPROCCMPNTS}
- MD_ASP_EXCEPTIONCATCHENABLE = ASP_MD_SERVER_BASE + 15;
- {$EXTERNALSYM MD_ASP_EXCEPTIONCATCHENABLE}
- MD_ASP_CODEPAGE = ASP_MD_SERVER_BASE + 16;
- {$EXTERNALSYM MD_ASP_CODEPAGE}
- MD_ASP_SCRIPTLANGUAGELIST = ASP_MD_SERVER_BASE + 17;
- {$EXTERNALSYM MD_ASP_SCRIPTLANGUAGELIST}
- MD_ASP_ENABLESERVERDEBUG = ASP_MD_SERVER_BASE + 18;
- {$EXTERNALSYM MD_ASP_ENABLESERVERDEBUG}
- MD_ASP_ENABLECLIENTDEBUG = ASP_MD_SERVER_BASE + 19;
- {$EXTERNALSYM MD_ASP_ENABLECLIENTDEBUG}
- MD_ASP_TRACKTHREADINGMODEL = ASP_MD_SERVER_BASE + 20;
- {$EXTERNALSYM MD_ASP_TRACKTHREADINGMODEL}
-// added for IIS 5.0
- MD_ASP_ENABLEASPHTMLFALLBACK = ASP_MD_SERVER_BASE + 21;
- {$EXTERNALSYM MD_ASP_ENABLEASPHTMLFALLBACK}
- MD_ASP_ENABLECHUNKEDENCODING = ASP_MD_SERVER_BASE + 22;
- {$EXTERNALSYM MD_ASP_ENABLECHUNKEDENCODING}
- MD_ASP_ENABLETYPELIBCACHE = ASP_MD_SERVER_BASE + 23;
- {$EXTERNALSYM MD_ASP_ENABLETYPELIBCACHE}
- MD_ASP_ERRORSTONTLOG = ASP_MD_SERVER_BASE + 24;
- {$EXTERNALSYM MD_ASP_ERRORSTONTLOG}
- MD_ASP_PROCESSORTHREADMAX = ASP_MD_SERVER_BASE + 25;
- {$EXTERNALSYM MD_ASP_PROCESSORTHREADMAX}
- MD_ASP_REQEUSTQUEUEMAX = ASP_MD_SERVER_BASE + 26;
- {$EXTERNALSYM MD_ASP_REQEUSTQUEUEMAX}
- MD_ASP_ENABLEAPPLICATIONRESTART = ASP_MD_SERVER_BASE + 27;
- {$EXTERNALSYM MD_ASP_ENABLEAPPLICATIONRESTART}
- MD_ASP_QUEUECONNECTIONTESTTIME = ASP_MD_SERVER_BASE + 28;
- {$EXTERNALSYM MD_ASP_QUEUECONNECTIONTESTTIME}
- MD_ASP_SESSIONMAX = ASP_MD_SERVER_BASE + 29;
- {$EXTERNALSYM MD_ASP_SESSIONMAX}
-
-// thread gate
-// MD_ASP_THREADGATEENABLED = ASP_MD_SERVER_BASE + 30;
-// {$EXTERNALSYM MD_ASP_THREADGATEENABLED}
-// MD_ASP_THREADGATETIMESLICE = ASP_MD_SERVER_BASE + 31;
-// {$EXTERNALSYM MD_ASP_THREADGATETIMESLICE}
-// MD_ASP_THREADGATESLEEPDELAY = ASP_MD_SERVER_BASE + 32;
-// {$EXTERNALSYM MD_ASP_THREADGATESLEEPDELAY}
-// MD_ASP_THREADGATESLEEPMAX = ASP_MD_SERVER_BASE + 33;
-// {$EXTERNALSYM MD_ASP_THREADGATESLEEPMAX}
-// MD_ASP_THREADGATELOADLOW = ASP_MD_SERVER_BASE + 34;
-// {$EXTERNALSYM MD_ASP_THREADGATELOADLOW}
-// MD_ASP_THREADGATELOADHIGH = ASP_MD_SERVER_BASE + 35;
-// {$EXTERNALSYM MD_ASP_THREADGATELOADHIGH}
-
-// added IIS5.1
-
-// persist template cache
- MD_ASP_DISKTEMPLATECACHEDIRECTORY = ASP_MD_SERVER_BASE + 36;
- {$EXTERNALSYM MD_ASP_DISKTEMPLATECACHEDIRECTORY}
- MD_ASP_MAXDISKTEMPLATECACHEFILES = ASP_MD_SERVER_BASE + 40;
- {$EXTERNALSYM MD_ASP_MAXDISKTEMPLATECACHEFILES}
- MD_ASP_EXECUTEINMTA = ASP_MD_SERVER_BASE + 41;
- {$EXTERNALSYM MD_ASP_EXECUTEINMTA}
- MD_ASP_LCID = ASP_MD_SERVER_BASE + 42;
- {$EXTERNALSYM MD_ASP_LCID}
- MD_ASP_KEEPSESSIONIDSECURE = ASP_MD_SERVER_BASE + 43;
- {$EXTERNALSYM MD_ASP_KEEPSESSIONIDSECURE}
-
-// added IIS6.0
-
-// Services without components integration
- MD_ASP_SERVICE_FLAGS = ASP_MD_SERVER_BASE + 44;
- {$EXTERNALSYM MD_ASP_SERVICE_FLAGS}
- MD_ASP_SERVICE_FLAG_TRACKER = ASP_MD_SERVER_BASE + 45;
- {$EXTERNALSYM MD_ASP_SERVICE_FLAG_TRACKER}
- MD_ASP_SERVICE_FLAG_FUSION = ASP_MD_SERVER_BASE + 46;
- {$EXTERNALSYM MD_ASP_SERVICE_FLAG_FUSION}
- MD_ASP_SERVICE_FLAG_PARTITIONS = ASP_MD_SERVER_BASE + 47;
- {$EXTERNALSYM MD_ASP_SERVICE_FLAG_PARTITIONS}
- MD_ASP_SERVICE_PARTITION_ID = ASP_MD_SERVER_BASE + 48;
- {$EXTERNALSYM MD_ASP_SERVICE_PARTITION_ID}
- MD_ASP_SERVICE_SXS_NAME = ASP_MD_SERVER_BASE + 49;
- {$EXTERNALSYM MD_ASP_SERVICE_SXS_NAME}
-
-// Valid flags for MD_ASP_SERVICE_FLAGS property
-
- MD_ASP_SERVICE_ENABLE_TRACKER = 1;
- {$EXTERNALSYM MD_ASP_SERVICE_ENABLE_TRACKER}
- MD_ASP_SERVICE_ENABLE_SXS = 2;
- {$EXTERNALSYM MD_ASP_SERVICE_ENABLE_SXS}
- MD_ASP_SERVICE_USE_PARTITION = 4;
- {$EXTERNALSYM MD_ASP_SERVICE_USE_PARTITION}
-
-// Line number calculation flag.
-
- MD_ASP_CALCLINENUMBER = ASP_MD_SERVER_BASE + 50;
- {$EXTERNALSYM MD_ASP_CALCLINENUMBER}
-
- MD_ASP_RUN_ONEND_ANON = ASP_MD_SERVER_BASE + 51;
- {$EXTERNALSYM MD_ASP_RUN_ONEND_ANON}
-
- MD_ASP_BUFFER_LIMIT = ASP_MD_SERVER_BASE + 52;
- {$EXTERNALSYM MD_ASP_BUFFER_LIMIT}
-
- MD_ASP_MAX_REQUEST_ENTITY_ALLOWED = ASP_MD_SERVER_BASE + 53;
- {$EXTERNALSYM MD_ASP_MAX_REQUEST_ENTITY_ALLOWED}
-
- MD_ASP_ID_LAST = ASP_MD_SERVER_BASE + 53;
- {$EXTERNALSYM MD_ASP_ID_LAST}
-
-//
-// Valid values for WAM
-//
-
- WAM_MD_SERVER_BASE = 7500;
- {$EXTERNALSYM WAM_MD_SERVER_BASE}
-
- MD_WAM_USER_NAME = WAM_MD_SERVER_BASE + 1;
- {$EXTERNALSYM MD_WAM_USER_NAME}
- MD_WAM_PWD = WAM_MD_SERVER_BASE + 2;
- {$EXTERNALSYM MD_WAM_PWD}
-
-// added IIS6
-
-//
-// Valid values for APP POOL
-//
-
- IIS_MD_APPPOOL_BASE = 9000;
- {$EXTERNALSYM IIS_MD_APPPOOL_BASE}
-
- MD_APPPOOL_PERIODIC_RESTART_TIME = IIS_MD_APPPOOL_BASE + 1;
- {$EXTERNALSYM MD_APPPOOL_PERIODIC_RESTART_TIME}
- MD_APPPOOL_PERIODIC_RESTART_REQUEST_COUNT = IIS_MD_APPPOOL_BASE + 2;
- {$EXTERNALSYM MD_APPPOOL_PERIODIC_RESTART_REQUEST_COUNT}
- MD_APPPOOL_MAX_PROCESS_COUNT = IIS_MD_APPPOOL_BASE + 3;
- {$EXTERNALSYM MD_APPPOOL_MAX_PROCESS_COUNT}
- MD_APPPOOL_PINGING_ENABLED = IIS_MD_APPPOOL_BASE + 4;
- {$EXTERNALSYM MD_APPPOOL_PINGING_ENABLED}
- MD_APPPOOL_IDLE_TIMEOUT = IIS_MD_APPPOOL_BASE + 5;
- {$EXTERNALSYM MD_APPPOOL_IDLE_TIMEOUT}
- MD_APPPOOL_RAPID_FAIL_PROTECTION_ENABLED = IIS_MD_APPPOOL_BASE + 6;
- {$EXTERNALSYM MD_APPPOOL_RAPID_FAIL_PROTECTION_ENABLED}
- MD_APPPOOL_SMP_AFFINITIZED = IIS_MD_APPPOOL_BASE + 7;
- {$EXTERNALSYM MD_APPPOOL_SMP_AFFINITIZED}
- MD_APPPOOL_SMP_AFFINITIZED_PROCESSOR_MASK = IIS_MD_APPPOOL_BASE + 8;
- {$EXTERNALSYM MD_APPPOOL_SMP_AFFINITIZED_PROCESSOR_MASK}
- MD_APPPOOL_ORPHAN_PROCESSES_FOR_DEBUGGING = IIS_MD_APPPOOL_BASE + 9;
- {$EXTERNALSYM MD_APPPOOL_ORPHAN_PROCESSES_FOR_DEBUGGING}
-
- //MD_APPPOOL_RUN_AS_LOCALSYSTEM = IIS_MD_APPPOOL_BASE + 10;
- //{$EXTERNALSYM MD_APPPOOL_RUN_AS_LOCALSYSTEM}
- MD_APPPOOL_STARTUP_TIMELIMIT = IIS_MD_APPPOOL_BASE + 11;
- {$EXTERNALSYM MD_APPPOOL_STARTUP_TIMELIMIT}
- MD_APPPOOL_SHUTDOWN_TIMELIMIT = IIS_MD_APPPOOL_BASE + 12;
- {$EXTERNALSYM MD_APPPOOL_SHUTDOWN_TIMELIMIT}
- MD_APPPOOL_PING_INTERVAL = IIS_MD_APPPOOL_BASE + 13;
- {$EXTERNALSYM MD_APPPOOL_PING_INTERVAL}
- MD_APPPOOL_PING_RESPONSE_TIMELIMIT = IIS_MD_APPPOOL_BASE + 14;
- {$EXTERNALSYM MD_APPPOOL_PING_RESPONSE_TIMELIMIT}
- MD_APPPOOL_DISALLOW_OVERLAPPING_ROTATION = IIS_MD_APPPOOL_BASE + 15;
- {$EXTERNALSYM MD_APPPOOL_DISALLOW_OVERLAPPING_ROTATION}
- //MD_APPPOOL_ORPHAN_ACTION = IIS_MD_APPPOOL_BASE + 16;
- //{$EXTERNALSYM MD_APPPOOL_ORPHAN_ACTION}
- MD_APPPOOL_UL_APPPOOL_QUEUE_LENGTH = IIS_MD_APPPOOL_BASE + 17;
- {$EXTERNALSYM MD_APPPOOL_UL_APPPOOL_QUEUE_LENGTH}
- MD_APPPOOL_DISALLOW_ROTATION_ON_CONFIG_CHANGE = IIS_MD_APPPOOL_BASE + 18;
- {$EXTERNALSYM MD_APPPOOL_DISALLOW_ROTATION_ON_CONFIG_CHANGE}
- //MD_APPPOOL_FRIENDLY_NAME = IIS_MD_APPPOOL_BASE + 19;
- //{$EXTERNALSYM MD_APPPOOL_FRIENDLY_NAME}
- MD_APPPOOL_PERIODIC_RESTART_SCHEDULE = IIS_MD_APPPOOL_BASE + 20;
- {$EXTERNALSYM MD_APPPOOL_PERIODIC_RESTART_SCHEDULE}
- MD_APPPOOL_IDENTITY_TYPE = IIS_MD_APPPOOL_BASE + 21;
- {$EXTERNALSYM MD_APPPOOL_IDENTITY_TYPE}
- MD_CPU_ACTION = IIS_MD_APPPOOL_BASE + 22;
- {$EXTERNALSYM MD_CPU_ACTION}
- MD_CPU_LIMIT = IIS_MD_APPPOOL_BASE + 23;
- {$EXTERNALSYM MD_CPU_LIMIT}
- MD_APPPOOL_PERIODIC_RESTART_MEMORY = IIS_MD_APPPOOL_BASE + 24;
- {$EXTERNALSYM MD_APPPOOL_PERIODIC_RESTART_MEMORY}
- //MD_DISABLE_PUBLISHING = IIS_MD_APPPOOL_BASE + 25;
- //{$EXTERNALSYM MD_DISABLE_PUBLISHING}
- MD_APPPOOL_COMMAND = IIS_MD_APPPOOL_BASE + 26;
- {$EXTERNALSYM MD_APPPOOL_COMMAND}
- MD_APPPOOL_STATE = IIS_MD_APPPOOL_BASE + 27;
- {$EXTERNALSYM MD_APPPOOL_STATE}
- MD_APPPOOL_AUTO_START = IIS_MD_APPPOOL_BASE + 28;
- {$EXTERNALSYM MD_APPPOOL_AUTO_START}
- MD_RAPID_FAIL_PROTECTION_INTERVAL = IIS_MD_APPPOOL_BASE + 29;
- {$EXTERNALSYM MD_RAPID_FAIL_PROTECTION_INTERVAL}
- MD_RAPID_FAIL_PROTECTION_MAX_CRASHES = IIS_MD_APPPOOL_BASE + 30;
- {$EXTERNALSYM MD_RAPID_FAIL_PROTECTION_MAX_CRASHES}
- MD_APPPOOL_ORPHAN_ACTION_EXE = IIS_MD_APPPOOL_BASE + 31;
- {$EXTERNALSYM MD_APPPOOL_ORPHAN_ACTION_EXE}
- MD_APPPOOL_ORPHAN_ACTION_PARAMS = IIS_MD_APPPOOL_BASE + 32;
- {$EXTERNALSYM MD_APPPOOL_ORPHAN_ACTION_PARAMS}
-
-//
-// Load balancer properties
-//
-
- MD_LOAD_BALANCER_CAPABILITIES = IIS_MD_APPPOOL_BASE + 34;
- {$EXTERNALSYM MD_LOAD_BALANCER_CAPABILITIES}
-
-//
-// Valid values for APP POOL
-//
-
- MD_APPPOOL_AUTO_SHUTDOWN_EXE = IIS_MD_APPPOOL_BASE + 35;
- {$EXTERNALSYM MD_APPPOOL_AUTO_SHUTDOWN_EXE}
- MD_APPPOOL_AUTO_SHUTDOWN_PARAMS = IIS_MD_APPPOOL_BASE + 36;
- {$EXTERNALSYM MD_APPPOOL_AUTO_SHUTDOWN_PARAMS}
- MD_APP_POOL_LOG_EVENT_ON_RECYCLE = IIS_MD_APPPOOL_BASE + 37;
- {$EXTERNALSYM MD_APP_POOL_LOG_EVENT_ON_RECYCLE}
- MD_APPPOOL_PERIODIC_RESTART_PRIVATE_MEMORY = IIS_MD_APPPOOL_BASE + 38;
- {$EXTERNALSYM MD_APPPOOL_PERIODIC_RESTART_PRIVATE_MEMORY}
-
-//
-// Valid values for MD_APP_POOL_LOG_EVENT_ON_RECYCLE
-//
-
- MD_APP_POOL_RECYCLE_TIME = 1;
- {$EXTERNALSYM MD_APP_POOL_RECYCLE_TIME}
- MD_APP_POOL_RECYCLE_REQUESTS = 2;
- {$EXTERNALSYM MD_APP_POOL_RECYCLE_REQUESTS}
- MD_APP_POOL_RECYCLE_SCHEDULE = 4;
- {$EXTERNALSYM MD_APP_POOL_RECYCLE_SCHEDULE}
- MD_APP_POOL_RECYCLE_MEMORY = 8;
- {$EXTERNALSYM MD_APP_POOL_RECYCLE_MEMORY}
- MD_APP_POOL_RECYCLE_ISAPI_UNHEALTHY = 16;
- {$EXTERNALSYM MD_APP_POOL_RECYCLE_ISAPI_UNHEALTHY}
- MD_APP_POOL_RECYCLE_ON_DEMAND = 32;
- {$EXTERNALSYM MD_APP_POOL_RECYCLE_ON_DEMAND}
- MD_APP_POOL_RECYCLE_CONFIG_CHANGE = 64;
- {$EXTERNALSYM MD_APP_POOL_RECYCLE_CONFIG_CHANGE}
- MD_APP_POOL_RECYCLE_PRIVATE_MEMORY = 128;
- {$EXTERNALSYM MD_APP_POOL_RECYCLE_PRIVATE_MEMORY}
-
-//
-// Valid values for MD_CPU_ACTION
-//
-
- MD_CPU_NO_ACTION = 0;
- {$EXTERNALSYM MD_CPU_NO_ACTION}
- MD_CPU_KILL_W3WP = 1;
- {$EXTERNALSYM MD_CPU_KILL_W3WP}
- MD_CPU_TRACE = 2;
- {$EXTERNALSYM MD_CPU_TRACE}
- MD_CPU_THROTTLE = 3;
- {$EXTERNALSYM MD_CPU_THROTTLE}
-
-//
-// Valid values for MD_APPPOOL_COMMAND
-//
-
- MD_APPPOOL_COMMAND_START = 1;
- {$EXTERNALSYM MD_APPPOOL_COMMAND_START}
- MD_APPPOOL_COMMAND_STOP = 2;
- {$EXTERNALSYM MD_APPPOOL_COMMAND_STOP}
-
-//
-// Valid values for MD_APPPOOL_STATE
-//
-
- MD_APPPOOL_STATE_STARTING = 1;
- {$EXTERNALSYM MD_APPPOOL_STATE_STARTING}
- MD_APPPOOL_STATE_STARTED = 2;
- {$EXTERNALSYM MD_APPPOOL_STATE_STARTED}
- MD_APPPOOL_STATE_STOPPING = 3;
- {$EXTERNALSYM MD_APPPOOL_STATE_STOPPING}
- MD_APPPOOL_STATE_STOPPED = 4;
- {$EXTERNALSYM MD_APPPOOL_STATE_STOPPED}
-
-//
-// Valid values for MD_APPPOOL_IDENTITY_TYPE
-//
-
- MD_APPPOOL_IDENTITY_TYPE_LOCALSYSTEM = 0;
- {$EXTERNALSYM MD_APPPOOL_IDENTITY_TYPE_LOCALSYSTEM}
- MD_APPPOOL_IDENTITY_TYPE_LOCALSERVICE = 1;
- {$EXTERNALSYM MD_APPPOOL_IDENTITY_TYPE_LOCALSERVICE}
- MD_APPPOOL_IDENTITY_TYPE_NETWORKSERVICE = 2;
- {$EXTERNALSYM MD_APPPOOL_IDENTITY_TYPE_NETWORKSERVICE}
- MD_APPPOOL_IDENTITY_TYPE_SPECIFICUSER = 3;
- {$EXTERNALSYM MD_APPPOOL_IDENTITY_TYPE_SPECIFICUSER}
-
-//
-// Valid values for MD_LOAD_BALANCER_CAPABILITIES
-//
-
- MD_LOAD_BALANCER_CAPABILITIES_BASIC = 1;
- {$EXTERNALSYM MD_LOAD_BALANCER_CAPABILITIES_BASIC}
- MD_LOAD_BALANCER_CAPABILITIES_SOPHISTICATED = 2;
- {$EXTERNALSYM MD_LOAD_BALANCER_CAPABILITIES_SOPHISTICATED}
-
-//
-// Valid values for MD_APPPOOL_STATE
-//
-
- IIS_MD_APP_BASE = 9100;
- {$EXTERNALSYM IIS_MD_APP_BASE}
- MD_APP_APPPOOL_ID = IIS_MD_APP_BASE + 1;
- {$EXTERNALSYM MD_APP_APPPOOL_ID}
- MD_APP_ALLOW_TRANSIENT_REGISTRATION = IIS_MD_APP_BASE + 2;
- {$EXTERNALSYM MD_APP_ALLOW_TRANSIENT_REGISTRATION}
- MD_APP_AUTO_START = IIS_MD_APP_BASE + 3;
- {$EXTERNALSYM MD_APP_AUTO_START}
- MD_APPPOOL_PERIODIC_RESTART_CONNECTIONS = IIS_MD_APP_BASE + 4;
- {$EXTERNALSYM MD_APPPOOL_PERIODIC_RESTART_CONNECTIONS}
-
-//
-// TODO: These are duplicate definitions. Remove them if no one is using it.
-//
-
- MD_APPPOOL_APPPOOL_ID = IIS_MD_APP_BASE + 101;
- {$EXTERNALSYM MD_APPPOOL_APPPOOL_ID}
- MD_APPPOOL_ALLOW_TRANSIENT_REGISTRATION = IIS_MD_APP_BASE + 102;
- {$EXTERNALSYM MD_APPPOOL_ALLOW_TRANSIENT_REGISTRATION}
- // commented out so we can build
- //MD_APPPOOL_AUTO_START = IIS_MD_APP_BASE + 103;
-
- IIS_MD_GLOBAL_BASE = 9200;
- {$EXTERNALSYM IIS_MD_GLOBAL_BASE}
- MD_MAX_GLOBAL_BANDWIDTH = IIS_MD_GLOBAL_BASE + 1;
- {$EXTERNALSYM MD_MAX_GLOBAL_BANDWIDTH}
- MD_GLOBAL_STANDARD_APP_MODE_ENABLED = IIS_MD_GLOBAL_BASE + 3;
- {$EXTERNALSYM MD_GLOBAL_STANDARD_APP_MODE_ENABLED}
- MD_HEADER_WAIT_TIMEOUT = IIS_MD_GLOBAL_BASE + 4;
- {$EXTERNALSYM MD_HEADER_WAIT_TIMEOUT}
- MD_MIN_FILE_BYTES_PER_SEC = IIS_MD_GLOBAL_BASE + 5;
- {$EXTERNALSYM MD_MIN_FILE_BYTES_PER_SEC}
- MD_GLOBAL_LOG_IN_UTF_8 = IIS_MD_GLOBAL_BASE + 6;
- {$EXTERNALSYM MD_GLOBAL_LOG_IN_UTF_8}
- MD_DEMAND_START_THRESHOLD = IIS_MD_GLOBAL_BASE + 7;
- {$EXTERNALSYM MD_DEMAND_START_THRESHOLD}
-
- MD_GLOBAL_SESSIONKEY = 9999;
- {$EXTERNALSYM MD_GLOBAL_SESSIONKEY}
- MD_ROOT_ENABLE_EDIT_WHILE_RUNNING = 9998;
- {$EXTERNALSYM MD_ROOT_ENABLE_EDIT_WHILE_RUNNING}
- MD_GLOBAL_CHANGE_NUMBER = 9997;
- {$EXTERNALSYM MD_GLOBAL_CHANGE_NUMBER}
- MD_ROOT_ENABLE_HISTORY = 9996;
- {$EXTERNALSYM MD_ROOT_ENABLE_HISTORY}
- MD_ROOT_MAX_HISTORY_FILES = 9995;
- {$EXTERNALSYM MD_ROOT_MAX_HISTORY_FILES}
- MD_GLOBAL_EDIT_WHILE_RUNNING_MAJOR_VERSION_NUMBER = 9994;
- {$EXTERNALSYM MD_GLOBAL_EDIT_WHILE_RUNNING_MAJOR_VERSION_NUMBER}
- MD_GLOBAL_EDIT_WHILE_RUNNING_MINOR_VERSION_NUMBER = 9993;
- {$EXTERNALSYM MD_GLOBAL_EDIT_WHILE_RUNNING_MINOR_VERSION_NUMBER}
- MD_GLOBAL_XMLSCHEMATIMESTAMP = 9992;
- {$EXTERNALSYM MD_GLOBAL_XMLSCHEMATIMESTAMP}
- MD_GLOBAL_BINSCHEMATIMESTAMP = 9991;
- {$EXTERNALSYM MD_GLOBAL_BINSCHEMATIMESTAMP}
- MD_COMMENTS = 9990;
- {$EXTERNALSYM MD_COMMENTS}
- MD_LOCATION = 9989;
- {$EXTERNALSYM MD_LOCATION}
- MD_MAX_ERROR_FILES = 9988;
- {$EXTERNALSYM MD_MAX_ERROR_FILES}
-
-//
-// Valid values for MD_AUTHORIZATION
-//
-
- MD_AUTH_ANONYMOUS = $00000001;
- {$EXTERNALSYM MD_AUTH_ANONYMOUS}
- MD_AUTH_BASIC = $00000002;
- {$EXTERNALSYM MD_AUTH_BASIC}
- MD_AUTH_NT = $00000004; // Use NT auth provider (like NTLM)
- {$EXTERNALSYM MD_AUTH_NT}
- MD_AUTH_PASSPORT = $00000040;
- {$EXTERNALSYM MD_AUTH_PASSPORT}
-
-//
-// Valid values for MD_AUTHORIZATION_PERSISTENCE
-//
-
- MD_AUTH_SINGLEREQUEST = $00000040;
- {$EXTERNALSYM MD_AUTH_SINGLEREQUEST}
- MD_AUTH_SINGLEREQUESTIFPROXY = $00000080;
- {$EXTERNALSYM MD_AUTH_SINGLEREQUESTIFPROXY}
- MD_AUTH_SINGLEREQUESTALWAYSIFPROXY = $00000100;
- {$EXTERNALSYM MD_AUTH_SINGLEREQUESTALWAYSIFPROXY}
-
-//
-// Valid values for MD_ACCESS_PERM
-//
-
- MD_ACCESS_READ = $00000001; // Allow for Read
- {$EXTERNALSYM MD_ACCESS_READ}
- MD_ACCESS_WRITE = $00000002; // Allow for Write
- {$EXTERNALSYM MD_ACCESS_WRITE}
- MD_ACCESS_EXECUTE = $00000004; // Allow for Execute
- {$EXTERNALSYM MD_ACCESS_EXECUTE}
- MD_ACCESS_SOURCE = $00000010; // Apply access mask to source
- {$EXTERNALSYM MD_ACCESS_SOURCE}
- MD_ACCESS_SCRIPT = $00000200; // Allow for Script execution
- {$EXTERNALSYM MD_ACCESS_SCRIPT}
- MD_ACCESS_NO_REMOTE_WRITE = $00000400; // Local host access only
- {$EXTERNALSYM MD_ACCESS_NO_REMOTE_WRITE}
- MD_ACCESS_NO_REMOTE_READ = $00001000; // Local host access only
- {$EXTERNALSYM MD_ACCESS_NO_REMOTE_READ}
- MD_ACCESS_NO_REMOTE_EXECUTE = $00002000; // Local host access only
- {$EXTERNALSYM MD_ACCESS_NO_REMOTE_EXECUTE}
- MD_ACCESS_NO_REMOTE_SCRIPT = $00004000; // Local host access only
- {$EXTERNALSYM MD_ACCESS_NO_REMOTE_SCRIPT}
- MD_ACCESS_NO_PHYSICAL_DIR = $00008000; // VR maps to no physical path
- {$EXTERNALSYM MD_ACCESS_NO_PHYSICAL_DIR}
-
- MD_NONSSL_ACCESS_MASK = (MD_ACCESS_READ or MD_ACCESS_WRITE or MD_ACCESS_EXECUTE or
- MD_ACCESS_SOURCE or MD_ACCESS_SCRIPT or MD_ACCESS_NO_REMOTE_READ or
- MD_ACCESS_NO_REMOTE_WRITE or MD_ACCESS_NO_REMOTE_EXECUTE or MD_ACCESS_NO_REMOTE_SCRIPT or
- MD_ACCESS_NO_PHYSICAL_DIR);
- {$EXTERNALSYM MD_NONSSL_ACCESS_MASK}
-
-//
-// Valid values for MD_SSL_ACCESS_PERM
-//
-
- MD_ACCESS_SSL = $00000008; // Require SSL
- {$EXTERNALSYM MD_ACCESS_SSL}
- MD_ACCESS_NEGO_CERT = $00000020; // Allow client SSL certs
- {$EXTERNALSYM MD_ACCESS_NEGO_CERT}
- MD_ACCESS_REQUIRE_CERT = $00000040; // Require client SSL certs
- {$EXTERNALSYM MD_ACCESS_REQUIRE_CERT}
- MD_ACCESS_MAP_CERT = $00000080; // Map SSL cert to NT account
- {$EXTERNALSYM MD_ACCESS_MAP_CERT}
- MD_ACCESS_SSL128 = $00000100; // Require 128 bit SSL
- {$EXTERNALSYM MD_ACCESS_SSL128}
-
- MD_SSL_ACCESS_MASK = MD_ACCESS_SSL or MD_ACCESS_NEGO_CERT or MD_ACCESS_REQUIRE_CERT or MD_ACCESS_MAP_CERT or MD_ACCESS_SSL128;
- {$EXTERNALSYM MD_SSL_ACCESS_MASK}
-
- MD_ACCESS_MASK = $0000ffff;
- {$EXTERNALSYM MD_ACCESS_MASK}
-
-//
-// Valid values for MD_DIRECTORY_BROWSING
-//
-
- MD_DIRBROW_SHOW_DATE = $00000002;
- {$EXTERNALSYM MD_DIRBROW_SHOW_DATE}
- MD_DIRBROW_SHOW_TIME = $00000004;
- {$EXTERNALSYM MD_DIRBROW_SHOW_TIME}
- MD_DIRBROW_SHOW_SIZE = $00000008;
- {$EXTERNALSYM MD_DIRBROW_SHOW_SIZE}
- MD_DIRBROW_SHOW_EXTENSION = $00000010;
- {$EXTERNALSYM MD_DIRBROW_SHOW_EXTENSION}
- MD_DIRBROW_LONG_DATE = $00000020;
- {$EXTERNALSYM MD_DIRBROW_LONG_DATE}
-
- MD_DIRBROW_ENABLED = DWORD($80000000); // Allow directory browsing
- {$EXTERNALSYM MD_DIRBROW_ENABLED}
- MD_DIRBROW_LOADDEFAULT = $40000000; // Load default doc if exists
- {$EXTERNALSYM MD_DIRBROW_LOADDEFAULT}
-
- MD_DIRBROW_MASK = (MD_DIRBROW_SHOW_DATE or MD_DIRBROW_SHOW_TIME or MD_DIRBROW_SHOW_SIZE or
- MD_DIRBROW_SHOW_EXTENSION or MD_DIRBROW_LONG_DATE or MD_DIRBROW_LOADDEFAULT or MD_DIRBROW_ENABLED);
- {$EXTERNALSYM MD_DIRBROW_MASK}
-
-//
-// Valid values for MD_LOGON_METHOD
-//
-
- MD_LOGON_INTERACTIVE = 0;
- {$EXTERNALSYM MD_LOGON_INTERACTIVE}
- MD_LOGON_BATCH = 1;
- {$EXTERNALSYM MD_LOGON_BATCH}
- MD_LOGON_NETWORK = 2;
- {$EXTERNALSYM MD_LOGON_NETWORK}
- MD_LOGON_NETWORK_CLEARTEXT = 3;
- {$EXTERNALSYM MD_LOGON_NETWORK_CLEARTEXT}
-
-//
-// Valid values for MD_PASSPORT_REQUIRE_AD_MAPPING
-//
-
- MD_PASSPORT_NO_MAPPING = 0;
- {$EXTERNALSYM MD_PASSPORT_NO_MAPPING}
- MD_PASSPORT_TRY_MAPPING = 1;
- {$EXTERNALSYM MD_PASSPORT_TRY_MAPPING}
- MD_PASSPORT_NEED_MAPPING = 2;
- {$EXTERNALSYM MD_PASSPORT_NEED_MAPPING}
-
-//
-// Valid values for MD_NOTIFY_EXAUTH
-//
-
- MD_NOTIFEXAUTH_NTLMSSL = 1;
- {$EXTERNALSYM MD_NOTIFEXAUTH_NTLMSSL}
-
-//
-// Valid values for MD_FILTER_STATE
-//
-
- MD_FILTER_STATE_LOADED = 1;
- {$EXTERNALSYM MD_FILTER_STATE_LOADED}
- MD_FILTER_STATE_UNLOADED = 4;
- {$EXTERNALSYM MD_FILTER_STATE_UNLOADED}
-
-//
-// Valid values for MD_SERVER_STATE
-//
-
- MD_SERVER_STATE_STARTING = 1;
- {$EXTERNALSYM MD_SERVER_STATE_STARTING}
- MD_SERVER_STATE_STARTED = 2;
- {$EXTERNALSYM MD_SERVER_STATE_STARTED}
- MD_SERVER_STATE_STOPPING = 3;
- {$EXTERNALSYM MD_SERVER_STATE_STOPPING}
- MD_SERVER_STATE_STOPPED = 4;
- {$EXTERNALSYM MD_SERVER_STATE_STOPPED}
- MD_SERVER_STATE_PAUSING = 5;
- {$EXTERNALSYM MD_SERVER_STATE_PAUSING}
- MD_SERVER_STATE_PAUSED = 6;
- {$EXTERNALSYM MD_SERVER_STATE_PAUSED}
- MD_SERVER_STATE_CONTINUING = 7;
- {$EXTERNALSYM MD_SERVER_STATE_CONTINUING}
-
-//
-// Valid values for MD_SERVER_COMMAND
-//
-
- MD_SERVER_COMMAND_START = 1;
- {$EXTERNALSYM MD_SERVER_COMMAND_START}
- MD_SERVER_COMMAND_STOP = 2;
- {$EXTERNALSYM MD_SERVER_COMMAND_STOP}
- MD_SERVER_COMMAND_PAUSE = 3;
- {$EXTERNALSYM MD_SERVER_COMMAND_PAUSE}
- MD_SERVER_COMMAND_CONTINUE = 4;
- {$EXTERNALSYM MD_SERVER_COMMAND_CONTINUE}
-
-//
-// Valid values for MD_SERVER_SIZE
-//
-
- MD_SERVER_SIZE_SMALL = 0;
- {$EXTERNALSYM MD_SERVER_SIZE_SMALL}
- MD_SERVER_SIZE_MEDIUM = 1;
- {$EXTERNALSYM MD_SERVER_SIZE_MEDIUM}
- MD_SERVER_SIZE_LARGE = 2;
- {$EXTERNALSYM MD_SERVER_SIZE_LARGE}
-
-//
-// Valid values for MD_SERVER_CONFIG_INFO
-//
-
- MD_SERVER_CONFIG_SSL_40 = $00000001;
- {$EXTERNALSYM MD_SERVER_CONFIG_SSL_40}
- MD_SERVER_CONFIG_SSL_128 = $00000002;
- {$EXTERNALSYM MD_SERVER_CONFIG_SSL_128}
- MD_SERVER_CONFIG_ALLOW_ENCRYPT = $00000004;
- {$EXTERNALSYM MD_SERVER_CONFIG_ALLOW_ENCRYPT}
- MD_SERVER_CONFIG_AUTO_PW_SYNC = $00000008;
- {$EXTERNALSYM MD_SERVER_CONFIG_AUTO_PW_SYNC}
-
- // todo MD_SERVER_CONFIG_ENCRYPT unknown!
- //MD_SERVER_CONFIGURATION_MASK = MD_SERVER_CONFIG_SSL_40 or MD_SERVER_CONFIG_SSL_128 or MD_SERVER_CONFIG_ENCRYPT or MD_SERVER_CONFIG_AUTO_PW_SYNC;
- //{$EXTERNALSYM MD_SERVER_CONFIGURATION_MASK}
-
-//
-// Valid values for MD_SCRIPT_MAPS flag field
-//
-
- MD_SCRIPTMAPFLAG_SCRIPT = $00000001;
- {$EXTERNALSYM MD_SCRIPTMAPFLAG_SCRIPT}
- MD_SCRIPTMAPFLAG_CHECK_PATH_INFO = $00000004;
- {$EXTERNALSYM MD_SCRIPTMAPFLAG_CHECK_PATH_INFO}
-
-//
-// Bogus value - do not use
-//
-
- MD_SCRIPTMAPFLAG_ALLOWED_ON_READ_DIR = $00000001;
- {$EXTERNALSYM MD_SCRIPTMAPFLAG_ALLOWED_ON_READ_DIR}
-
-//
-// Valid values for MD_AUTH_CHANGE_ENABLE
-//
-
- MD_AUTH_CHANGE_UNSECURE = $00000001;
- {$EXTERNALSYM MD_AUTH_CHANGE_UNSECURE}
- MD_AUTH_CHANGE_DISABLE = $00000002;
- {$EXTERNALSYM MD_AUTH_CHANGE_DISABLE}
- MD_AUTH_ADVNOTIFY_DISABLE = $00000004;
- {$EXTERNALSYM MD_AUTH_ADVNOTIFY_DISABLE}
-
-//
-// Valide substatus errors for MD_CUSTOM_ERROR
-//
-
- MD_ERROR_SUB401_LOGON = 1;
- {$EXTERNALSYM MD_ERROR_SUB401_LOGON}
- MD_ERROR_SUB401_LOGON_CONFIG = 2;
- {$EXTERNALSYM MD_ERROR_SUB401_LOGON_CONFIG}
- MD_ERROR_SUB401_LOGON_ACL = 3;
- {$EXTERNALSYM MD_ERROR_SUB401_LOGON_ACL}
- MD_ERROR_SUB401_FILTER = 4;
- {$EXTERNALSYM MD_ERROR_SUB401_FILTER}
- MD_ERROR_SUB401_APPLICATION = 5;
- {$EXTERNALSYM MD_ERROR_SUB401_APPLICATION}
- MD_ERROR_SUB401_URLAUTH_POLICY = 7;
- {$EXTERNALSYM MD_ERROR_SUB401_URLAUTH_POLICY}
-
- MD_ERROR_SUB403_EXECUTE_ACCESS_DENIED = 1;
- {$EXTERNALSYM MD_ERROR_SUB403_EXECUTE_ACCESS_DENIED}
- MD_ERROR_SUB403_READ_ACCESS_DENIED = 2;
- {$EXTERNALSYM MD_ERROR_SUB403_READ_ACCESS_DENIED}
- MD_ERROR_SUB403_WRITE_ACCESS_DENIED = 3;
- {$EXTERNALSYM MD_ERROR_SUB403_WRITE_ACCESS_DENIED}
- MD_ERROR_SUB403_SSL_REQUIRED = 4;
- {$EXTERNALSYM MD_ERROR_SUB403_SSL_REQUIRED}
- MD_ERROR_SUB403_SSL128_REQUIRED = 5;
- {$EXTERNALSYM MD_ERROR_SUB403_SSL128_REQUIRED}
- MD_ERROR_SUB403_ADDR_REJECT = 6;
- {$EXTERNALSYM MD_ERROR_SUB403_ADDR_REJECT}
- MD_ERROR_SUB403_CERT_REQUIRED = 7;
- {$EXTERNALSYM MD_ERROR_SUB403_CERT_REQUIRED}
- MD_ERROR_SUB403_SITE_ACCESS_DENIED = 8;
- {$EXTERNALSYM MD_ERROR_SUB403_SITE_ACCESS_DENIED}
- MD_ERROR_SUB403_TOO_MANY_USERS = 9;
- {$EXTERNALSYM MD_ERROR_SUB403_TOO_MANY_USERS}
- MD_ERROR_SUB403_INVALID_CNFG = 10;
- {$EXTERNALSYM MD_ERROR_SUB403_INVALID_CNFG}
- MD_ERROR_SUB403_PWD_CHANGE = 11;
- {$EXTERNALSYM MD_ERROR_SUB403_PWD_CHANGE}
- MD_ERROR_SUB403_MAPPER_DENY_ACCESS = 12;
- {$EXTERNALSYM MD_ERROR_SUB403_MAPPER_DENY_ACCESS}
- MD_ERROR_SUB403_CERT_REVOKED = 13;
- {$EXTERNALSYM MD_ERROR_SUB403_CERT_REVOKED}
- MD_ERROR_SUB403_DIR_LIST_DENIED = 14;
- {$EXTERNALSYM MD_ERROR_SUB403_DIR_LIST_DENIED}
- MD_ERROR_SUB403_CAL_EXCEEDED = 15;
- {$EXTERNALSYM MD_ERROR_SUB403_CAL_EXCEEDED}
- MD_ERROR_SUB403_CERT_BAD = 16;
- {$EXTERNALSYM MD_ERROR_SUB403_CERT_BAD}
- MD_ERROR_SUB403_CERT_TIME_INVALID = 17;
- {$EXTERNALSYM MD_ERROR_SUB403_CERT_TIME_INVALID}
- MD_ERROR_SUB403_APPPOOL_DENIED = 18;
- {$EXTERNALSYM MD_ERROR_SUB403_APPPOOL_DENIED}
- MD_ERROR_SUB403_INSUFFICIENT_PRIVILEGE_FOR_CGI = 19;
- {$EXTERNALSYM MD_ERROR_SUB403_INSUFFICIENT_PRIVILEGE_FOR_CGI}
- MD_ERROR_SUB403_PASSPORT_LOGIN_FAILURE = 20;
- {$EXTERNALSYM MD_ERROR_SUB403_PASSPORT_LOGIN_FAILURE}
-
- MD_ERROR_SUB404_SITE_NOT_FOUND = 1;
- {$EXTERNALSYM MD_ERROR_SUB404_SITE_NOT_FOUND}
- MD_ERROR_SUB404_DENIED_BY_POLICY = 2;
- {$EXTERNALSYM MD_ERROR_SUB404_DENIED_BY_POLICY}
- MD_ERROR_SUB404_DENIED_BY_MIMEMAP = 3;
- {$EXTERNALSYM MD_ERROR_SUB404_DENIED_BY_MIMEMAP}
-
- MD_ERROR_SUB500_UNC_ACCESS = 16;
- {$EXTERNALSYM MD_ERROR_SUB500_UNC_ACCESS}
- MD_ERROR_SUB500_URLAUTH_NO_STORE = 17;
- {$EXTERNALSYM MD_ERROR_SUB500_URLAUTH_NO_STORE}
- MD_ERROR_SUB500_URLAUTH_STORE_ERROR = 18;
- {$EXTERNALSYM MD_ERROR_SUB500_URLAUTH_STORE_ERROR}
- MD_ERROR_SUB500_BAD_METADATA = 19;
- {$EXTERNALSYM MD_ERROR_SUB500_BAD_METADATA}
- MD_ERROR_SUB500_URLAUTH_NO_SCOPE = 20;
- {$EXTERNALSYM MD_ERROR_SUB500_URLAUTH_NO_SCOPE}
-
- MD_ERROR_SUB502_TIMEOUT = 1;
- {$EXTERNALSYM MD_ERROR_SUB502_TIMEOUT}
- MD_ERROR_SUB502_PREMATURE_EXIT = 2;
- {$EXTERNALSYM MD_ERROR_SUB502_PREMATURE_EXIT}
-
- MD_ERROR_SUB503_CPU_LIMIT = 1;
- {$EXTERNALSYM MD_ERROR_SUB503_CPU_LIMIT}
-
-//
-// Valid access rights for ACE entries in MD_ADMIN_ACL
-//
-
- MD_ACR_READ = $00000001;
- {$EXTERNALSYM MD_ACR_READ}
- MD_ACR_WRITE = $00000002;
- {$EXTERNALSYM MD_ACR_WRITE}
- MD_ACR_RESTRICTED_WRITE = $00000020;
- {$EXTERNALSYM MD_ACR_RESTRICTED_WRITE}
- MD_ACR_UNSECURE_PROPS_READ = $00000080;
- {$EXTERNALSYM MD_ACR_UNSECURE_PROPS_READ}
- MD_ACR_ENUM_KEYS = $00000008;
- {$EXTERNALSYM MD_ACR_ENUM_KEYS}
- MD_ACR_WRITE_DAC = $00040000;
- {$EXTERNALSYM MD_ACR_WRITE_DAC}
-
-//
-// Valid modes for MD_USER_ISOLATION
-//
-
- MD_USER_ISOLATION_NONE = 0;
- {$EXTERNALSYM MD_USER_ISOLATION_NONE}
- MD_USER_ISOLATION_BASIC = 1;
- {$EXTERNALSYM MD_USER_ISOLATION_BASIC}
- MD_USER_ISOLATION_AD = 2;
- {$EXTERNALSYM MD_USER_ISOLATION_AD}
- MD_USER_ISOLATION_LAST = 2;
- {$EXTERNALSYM MD_USER_ISOLATION_LAST}
-
-//
-// MD_IP_SEC binary format description
-//
-
-(*
-
- This object is composed of 4 lists : 2 lists ( deny & grant ) of network addresses,
- the only allowed family is AF_INET.
- Each of this list is composed of sublists, one for each ( network address family,
- significant subnet mask ) combination. The significant subnet mask is stored as
- ( number of bytes all 1 ( 0xff ), bitmask in last byte ).
- This is followed by 2 lists ( deny & grant ) of DNS names. Each of these lists is
- composed of sublists, based on then number of components in the DNS name
- e.g. "microsoft.com" has 2 components, "www.msft.com" has 3.
-
-Header:
- SELFREFINDEX iDenyAddr; // address deny list
- // points to ADDRESS_HEADER
- SELFREFINDEX iGrantAddr; // address grant list
- // points to ADDRESS_HEADER
- SELFREFINDEX iDenyName; // DNS name deny list
- // points to NAME_HEADER
- SELFREFINDEX iGrantName; // DNS name grant list
- // points to NAME_HEADER
- DWORD dwFlags;
- DWORD cRefSize; // size of reference area ( in bytes )
-
-ADDRESS_HEADER :
- DWORD cEntries; // # of Entries[]
- DWORD cAddresses; // total # of addresses in all
- // ADDRESS_LIST_ENTRY
- ADDRESS_LIST_ENTRY Entries[];
-
-ADDRESS_LIST_ENTRY :
- DWORD iFamily;
- DWORD cAddresses;
- DWORD cFullBytes;
- DWORD LastByte;
- SELFREFINDEX iFirstAddress; // points to array of addresses
-
-NAME_HEADER :
- DWORD cEntries;
- DWORD cNames; // total # of names for all Entries[]
- NAME_LIST_ENTRY Entries[];
-
-Name list entry :
- DWORD cComponents; // # of DNS components
- DWORD cNames;
- SELFREFINDEX iName[]; // array of references to DNS names
-
-This is followed by address arrays & names pointed to by iFirstAddress & iName
-Names are '\0' delimited
-
-SELFREFINDEX is a DWORD offset from start of structure with high bit set to 1
-
-*)
-
-//
-// Macros
-//
-
-{TODO structure declaration is in generated file
-procedure MD_SET_DATA_RECORD(_pMDR, _id, _attr, _utype, _dtype, _dlen, _pData);
-}
-
-//
-// IIS ADSI Admin Object class names
-//
-
- IIS_CLASS_COMPUTER = 'IIsComputer';
- {$EXTERNALSYM IIS_CLASS_COMPUTER}
- IIS_CLASS_WEB_SERVICE = 'IIsWebService';
- {$EXTERNALSYM IIS_CLASS_WEB_SERVICE}
- IIS_CLASS_WEB_SERVER = 'IIsWebServer';
- {$EXTERNALSYM IIS_CLASS_WEB_SERVER}
- IIS_CLASS_WEB_INFO = 'IIsWebInfo';
- {$EXTERNALSYM IIS_CLASS_WEB_INFO}
- IIS_CLASS_WEB_DIR = 'IIsWebDirectory';
- {$EXTERNALSYM IIS_CLASS_WEB_DIR}
- IIS_CLASS_WEB_VDIR = 'IIsWebVirtualDir';
- {$EXTERNALSYM IIS_CLASS_WEB_VDIR}
- IIS_CLASS_WEB_FILE = 'IIsWebFile';
- {$EXTERNALSYM IIS_CLASS_WEB_FILE}
- IIS_CLASS_FTP_SERVICE = 'IIsFtpService';
- {$EXTERNALSYM IIS_CLASS_FTP_SERVICE}
- IIS_CLASS_FTP_SERVER = 'IIsFtpServer';
- {$EXTERNALSYM IIS_CLASS_FTP_SERVER}
- IIS_CLASS_FTP_INFO = 'IIsFtpInfo';
- {$EXTERNALSYM IIS_CLASS_FTP_INFO}
- IIS_CLASS_FTP_VDIR = 'IIsFtpVirtualDir';
- {$EXTERNALSYM IIS_CLASS_FTP_VDIR}
- IIS_CLASS_FILTERS = 'IIsFilters';
- {$EXTERNALSYM IIS_CLASS_FILTERS}
- IIS_CLASS_FILTER = 'IIsFilter';
- {$EXTERNALSYM IIS_CLASS_FILTER}
- IIS_CLASS_LOG_MODULES = 'IIsLogModules';
- {$EXTERNALSYM IIS_CLASS_LOG_MODULES}
- IIS_CLASS_LOG_MODULE = 'IIsLogModule';
- {$EXTERNALSYM IIS_CLASS_LOG_MODULE}
- IIS_CLASS_MIMEMAP = 'IIsMimeMap';
- {$EXTERNALSYM IIS_CLASS_MIMEMAP}
- IIS_CLASS_CERTMAPPER = 'IIsCertMapper';
- {$EXTERNALSYM IIS_CLASS_CERTMAPPER}
- IIS_CLASS_COMPRESS_SCHEMES = 'IIsCompressionSchemes';
- {$EXTERNALSYM IIS_CLASS_COMPRESS_SCHEMES}
- IIS_CLASS_COMPRESS_SCHEME = 'IIsCompressionScheme';
- {$EXTERNALSYM IIS_CLASS_COMPRESS_SCHEME}
-
- IIS_CLASS_COMPUTER_W = WideString('IIsComputer');
- {$EXTERNALSYM IIS_CLASS_COMPUTER_W}
- IIS_CLASS_WEB_SERVICE_W = WideString('IIsWebService');
- {$EXTERNALSYM IIS_CLASS_WEB_SERVICE_W}
- IIS_CLASS_WEB_SERVER_W = WideString('IIsWebServer');
- {$EXTERNALSYM IIS_CLASS_WEB_SERVER_W}
- IIS_CLASS_WEB_INFO_W = WideString('IIsWebInfo');
- {$EXTERNALSYM IIS_CLASS_WEB_INFO_W}
- IIS_CLASS_WEB_DIR_W = WideString('IIsWebDirectory');
- {$EXTERNALSYM IIS_CLASS_WEB_DIR_W}
- IIS_CLASS_WEB_VDIR_W = WideString('IIsWebVirtualDir');
- {$EXTERNALSYM IIS_CLASS_WEB_VDIR_W}
- IIS_CLASS_WEB_FILE_W = WideString('IIsWebFile');
- {$EXTERNALSYM IIS_CLASS_WEB_FILE_W}
- IIS_CLASS_FTP_SERVICE_W = WideString('IIsFtpService');
- {$EXTERNALSYM IIS_CLASS_FTP_SERVICE_W}
- IIS_CLASS_FTP_SERVER_W = WideString('IIsFtpServer');
- {$EXTERNALSYM IIS_CLASS_FTP_SERVER_W}
- IIS_CLASS_FTP_INFO_W = WideString('IIsFtpInfo');
- {$EXTERNALSYM IIS_CLASS_FTP_INFO_W}
- IIS_CLASS_FTP_VDIR_W = WideString('IIsFtpVirtualDir');
- {$EXTERNALSYM IIS_CLASS_FTP_VDIR_W}
- IIS_CLASS_FILTERS_W = WideString('IIsFilters');
- {$EXTERNALSYM IIS_CLASS_FILTERS_W}
- IIS_CLASS_FILTER_W = WideString('IIsFilter');
- {$EXTERNALSYM IIS_CLASS_FILTER_W}
- IIS_CLASS_LOG_MODULES_W = WideString('IIsLogModules');
- {$EXTERNALSYM IIS_CLASS_LOG_MODULES_W}
- IIS_CLASS_LOG_MODULE_W = WideString('IIsLogModule');
- {$EXTERNALSYM IIS_CLASS_LOG_MODULE_W}
- IIS_CLASS_MIMEMAP_W = WideString('IIsMimeMap');
- {$EXTERNALSYM IIS_CLASS_MIMEMAP_W}
- IIS_CLASS_CERTMAPPER_W = WideString('IIsCertMapper');
- {$EXTERNALSYM IIS_CLASS_CERTMAPPER_W}
- IIS_CLASS_COMPRESS_SCHEMES_W = WideString('IIsCompressionSchemes');
- {$EXTERNALSYM IIS_CLASS_COMPRESS_SCHEMES_W}
- IIS_CLASS_COMPRESS_SCHEME_W = WideString('IIsCompressionScheme');
- {$EXTERNALSYM IIS_CLASS_COMPRESS_SCHEME_W}
-
-implementation
-
-{TODO structure declaration is in generated file
-procedure MD_SET_DATA_RECORD(_pMDR: Pointer; _id, _attr, _utype, _dtype, _dlen: DWORD; _pData: Pointer);
-begin
- _pMDR^.dwMDIdentifier := _id;
- _pMDR^.dwMDAttributes := _attr;
- _pMDR^.dwMDUserType := _utype;
- _pMDR^.dwMDDataType := _dtype;
- _pMDR^.dwMDDataLen := _dlen;
- _pMDR^.pbMDData := LPBYTE(_pData);
-end;
-}
-
-end.
-
+{******************************************************************************}
+{ }
+{ IIS Public Metdata IDs API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: iiscnfg.h, released November 2002. The original Pascal }
+{ code is: IisCnfg.pas, released March 2002. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+unit JwaIisCnfg;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "iiscnfg.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaWinType;
+
+//
+// Paths
+//
+
+const
+ IIS_MD_LOCAL_MACHINE_PATH = 'LM';
+ {$EXTERNALSYM IIS_MD_LOCAL_MACHINE_PATH}
+
+//
+// Name of the default publishing root under an instance
+//
+
+ IIS_MD_INSTANCE_ROOT = 'Root';
+ {$EXTERNALSYM IIS_MD_INSTANCE_ROOT}
+
+//
+// ISAPI Filters are kept in a list under the instances and the service (for
+// global filters) in the following format:
+//
+// LM/W3Svc/<Instance>/Filters
+// MD_FILTER_LOAD_ORDER "Filter1, Filter2, Filter3"
+//
+// LM/W3Svc/<Instance>/Filters/Filter1
+// MD_FILTER_IMAGE_PATH "d:\inetsrv\myfilter.dll"
+//
+// LM/W3Svc/<Instance>/Filters/Filter2
+// MD_FILTER_IMAGE_PATH "d:\inetsrv\otherfilter.dll"
+//
+
+ IIS_MD_ISAPI_FILTERS = '/Filters';
+ {$EXTERNALSYM IIS_MD_ISAPI_FILTERS}
+
+//
+// Path below each service to the key that publishes service information
+//
+
+ IIS_MD_SVC_INFO_PATH = 'Info';
+ {$EXTERNALSYM IIS_MD_SVC_INFO_PATH}
+
+//
+// ADSI schema properties path
+//
+
+ IIS_MD_ADSI_SCHEMA_PATH_A = '/Schema';
+ {$EXTERNALSYM IIS_MD_ADSI_SCHEMA_PATH_A}
+ IIS_MD_ADSI_SCHEMA_PATH_W = WideString('/Schema');
+ {$EXTERNALSYM IIS_MD_ADSI_SCHEMA_PATH_W}
+ IIS_MD_ADSI_METAID_BEGIN = 130000;
+ {$EXTERNALSYM IIS_MD_ADSI_METAID_BEGIN}
+
+//
+// user types
+//
+// There are two user types:
+//
+// Server configuration - All the properties for configuring the server that
+// are not applicable to files and directories - such as Port, Host name,
+// Server comment, Connection timeout etc.
+//
+// File/Dir configuration - All the properties that can be configured down to
+// the files and directories - such as Access permissions (Read, Write etc),
+// Extension mapping, IP Security etc.
+//
+
+ IIS_MD_UT_SERVER = 1; // Server configuration parameters
+ {$EXTERNALSYM IIS_MD_UT_SERVER}
+ IIS_MD_UT_FILE = 2; // File/Dir inheritable properties
+ {$EXTERNALSYM IIS_MD_UT_FILE}
+ IIS_MD_UT_WAM = 100; // Web Application configuration parameters
+ {$EXTERNALSYM IIS_MD_UT_WAM}
+ ASP_MD_UT_APP = 101; // ASP application configuration parameters
+ {$EXTERNALSYM ASP_MD_UT_APP}
+ IIS_MD_UT_END_RESERVED = 2000; // All user types below this are reserved for IIS services
+ {$EXTERNALSYM IIS_MD_UT_END_RESERVED}
+
+//
+// Metabase property IDs must be unique. This table defines reserved ranges
+//
+
+ IIS_MD_ID_BEGIN_RESERVED = $00000001; // IIS reserved range
+ {$EXTERNALSYM IIS_MD_ID_BEGIN_RESERVED}
+ IIS_MD_ID_END_RESERVED = $00007fff;
+ {$EXTERNALSYM IIS_MD_ID_END_RESERVED}
+ ASP_MD_ID_BEGIN_RESERVED = $00007000; // ASP reserved range, subrange of IIS.
+ {$EXTERNALSYM ASP_MD_ID_BEGIN_RESERVED}
+ ASP_MD_ID_END_RESERVED = $000074ff;
+ {$EXTERNALSYM ASP_MD_ID_END_RESERVED}
+ WAM_MD_ID_BEGIN_RESERVED = $00007500; // ASP reserved range, subrange of IIS.
+ {$EXTERNALSYM WAM_MD_ID_BEGIN_RESERVED}
+ WAM_MD_ID_END_RESERVED = $00007fff;
+ {$EXTERNALSYM WAM_MD_ID_END_RESERVED}
+ FP_MD_ID_BEGIN_RESERVED = $00008000; // Front page reserved range
+ {$EXTERNALSYM FP_MD_ID_BEGIN_RESERVED}
+ FP_MD_ID_END_RESERVED = $00008fff;
+ {$EXTERNALSYM FP_MD_ID_END_RESERVED}
+ SMTP_MD_ID_BEGIN_RESERVED = $00009000;
+ {$EXTERNALSYM SMTP_MD_ID_BEGIN_RESERVED}
+ SMTP_MD_ID_END_RESERVED = $00009fff;
+ {$EXTERNALSYM SMTP_MD_ID_END_RESERVED}
+ POP3_MD_ID_BEGIN_RESERVED = $0000a000;
+ {$EXTERNALSYM POP3_MD_ID_BEGIN_RESERVED}
+ POP3_MD_ID_END_RESERVED = $0000afff;
+ {$EXTERNALSYM POP3_MD_ID_END_RESERVED}
+ NNTP_MD_ID_BEGIN_RESERVED = $0000b000;
+ {$EXTERNALSYM NNTP_MD_ID_BEGIN_RESERVED}
+ NNTP_MD_ID_END_RESERVED = $0000bfff;
+ {$EXTERNALSYM NNTP_MD_ID_END_RESERVED}
+ IMAP_MD_ID_BEGIN_RESERVED = $0000c000;
+ {$EXTERNALSYM IMAP_MD_ID_BEGIN_RESERVED}
+ IMAP_MD_ID_END_RESERVED = $0000cfff;
+ {$EXTERNALSYM IMAP_MD_ID_END_RESERVED}
+ MSCS_MD_ID_BEGIN_RESERVED = $0000d000;
+ {$EXTERNALSYM MSCS_MD_ID_BEGIN_RESERVED}
+ MSCS_MD_ID_END_RESERVED = $0000dfff;
+ {$EXTERNALSYM MSCS_MD_ID_END_RESERVED}
+ APPCTR_MD_ID_BEGIN_RESERVED = $0000e000;
+ {$EXTERNALSYM APPCTR_MD_ID_BEGIN_RESERVED}
+ APPCTR_MD_ID_END_RESERVED = $0000efff;
+ {$EXTERNALSYM APPCTR_MD_ID_END_RESERVED}
+
+ USER_MD_ID_BASE_RESERVED = $0000ffff;
+ {$EXTERNALSYM USER_MD_ID_BASE_RESERVED}
+
+//
+// General server related attributes - these should be added in the metabase
+// with a user type of IIS_MD_UT_SERVER
+//
+
+ IIS_MD_SERVER_BASE = 1000;
+ {$EXTERNALSYM IIS_MD_SERVER_BASE}
+
+//
+// These are global to all services and should only be set at
+// the IIS root
+//
+
+ MD_MAX_BANDWIDTH = IIS_MD_SERVER_BASE + 0;
+ {$EXTERNALSYM MD_MAX_BANDWIDTH}
+ MD_KEY_TYPE = IIS_MD_SERVER_BASE + 2;
+ {$EXTERNALSYM MD_KEY_TYPE}
+ MD_MAX_BANDWIDTH_BLOCKED = IIS_MD_SERVER_BASE + 3;
+ {$EXTERNALSYM MD_MAX_BANDWIDTH_BLOCKED}
+ MD_SCHEMA_METAID = IIS_MD_SERVER_BASE + 4;
+ {$EXTERNALSYM MD_SCHEMA_METAID}
+
+//
+// These properties are applicable to both HTTP and FTP virtual
+// servers
+//
+
+ MD_SERVER_COMMAND = IIS_MD_SERVER_BASE + 12;
+ {$EXTERNALSYM MD_SERVER_COMMAND}
+ MD_CONNECTION_TIMEOUT = IIS_MD_SERVER_BASE + 13;
+ {$EXTERNALSYM MD_CONNECTION_TIMEOUT}
+ MD_MAX_CONNECTIONS = IIS_MD_SERVER_BASE + 14;
+ {$EXTERNALSYM MD_MAX_CONNECTIONS}
+ MD_SERVER_COMMENT = IIS_MD_SERVER_BASE + 15;
+ {$EXTERNALSYM MD_SERVER_COMMENT}
+ MD_SERVER_STATE = IIS_MD_SERVER_BASE + 16;
+ {$EXTERNALSYM MD_SERVER_STATE}
+ MD_SERVER_AUTOSTART = IIS_MD_SERVER_BASE + 17;
+ {$EXTERNALSYM MD_SERVER_AUTOSTART}
+ MD_SERVER_SIZE = IIS_MD_SERVER_BASE + 18;
+ {$EXTERNALSYM MD_SERVER_SIZE}
+ MD_SERVER_LISTEN_BACKLOG = IIS_MD_SERVER_BASE + 19;
+ {$EXTERNALSYM MD_SERVER_LISTEN_BACKLOG}
+ MD_SERVER_LISTEN_TIMEOUT = IIS_MD_SERVER_BASE + 20;
+ {$EXTERNALSYM MD_SERVER_LISTEN_TIMEOUT}
+ MD_DOWNLEVEL_ADMIN_INSTANCE = IIS_MD_SERVER_BASE + 21;
+ {$EXTERNALSYM MD_DOWNLEVEL_ADMIN_INSTANCE}
+ MD_LEVELS_TO_SCAN = IIS_MD_SERVER_BASE + 22;
+ {$EXTERNALSYM MD_LEVELS_TO_SCAN}
+ MD_SERVER_BINDINGS = IIS_MD_SERVER_BASE + 23;
+ {$EXTERNALSYM MD_SERVER_BINDINGS}
+ MD_MAX_ENDPOINT_CONNECTIONS = IIS_MD_SERVER_BASE + 24;
+ {$EXTERNALSYM MD_MAX_ENDPOINT_CONNECTIONS}
+ MD_SERVER_CONFIGURATION_INFO = IIS_MD_SERVER_BASE + 27;
+ {$EXTERNALSYM MD_SERVER_CONFIGURATION_INFO}
+ MD_IISADMIN_EXTENSIONS = IIS_MD_SERVER_BASE + 28;
+ {$EXTERNALSYM MD_IISADMIN_EXTENSIONS}
+ MD_DISABLE_SOCKET_POOLING = IIS_MD_SERVER_BASE + 29;
+ {$EXTERNALSYM MD_DISABLE_SOCKET_POOLING}
+ MD_METADATA_ID_REGISTRATION = IIS_MD_SERVER_BASE + 30;
+ {$EXTERNALSYM MD_METADATA_ID_REGISTRATION}
+
+//
+// These properties are specific to HTTP and belong to the website
+//
+
+ IIS_MD_HTTP_BASE = 2000;
+ {$EXTERNALSYM IIS_MD_HTTP_BASE}
+
+ MD_SECURE_BINDINGS = IIS_MD_HTTP_BASE + 21;
+ {$EXTERNALSYM MD_SECURE_BINDINGS}
+
+ MD_FILTER_LOAD_ORDER = IIS_MD_HTTP_BASE + 40;
+ {$EXTERNALSYM MD_FILTER_LOAD_ORDER}
+ MD_FILTER_IMAGE_PATH = IIS_MD_HTTP_BASE + 41;
+ {$EXTERNALSYM MD_FILTER_IMAGE_PATH}
+ MD_FILTER_STATE = IIS_MD_HTTP_BASE + 42;
+ {$EXTERNALSYM MD_FILTER_STATE}
+ MD_FILTER_ENABLED = IIS_MD_HTTP_BASE + 43;
+ {$EXTERNALSYM MD_FILTER_ENABLED}
+ MD_FILTER_FLAGS = IIS_MD_HTTP_BASE + 44;
+ {$EXTERNALSYM MD_FILTER_FLAGS}
+ MD_FILTER_DESCRIPTION = IIS_MD_HTTP_BASE + 45;
+ {$EXTERNALSYM MD_FILTER_DESCRIPTION}
+ MD_FILTER_ENABLE_CACHE = IIS_MD_HTTP_BASE + 46;
+ {$EXTERNALSYM MD_FILTER_ENABLE_CACHE}
+
+ MD_ADV_NOTIFY_PWD_EXP_IN_DAYS = IIS_MD_HTTP_BASE + 63;
+ {$EXTERNALSYM MD_ADV_NOTIFY_PWD_EXP_IN_DAYS}
+ MD_ADV_CACHE_TTL = IIS_MD_HTTP_BASE + 64;
+ {$EXTERNALSYM MD_ADV_CACHE_TTL}
+ MD_AUTH_CHANGE_FLAGS = IIS_MD_HTTP_BASE + 68;
+ {$EXTERNALSYM MD_AUTH_CHANGE_FLAGS}
+
+ MD_PROCESS_NTCR_IF_LOGGED_ON = IIS_MD_HTTP_BASE + 70;
+ {$EXTERNALSYM MD_PROCESS_NTCR_IF_LOGGED_ON}
+
+ MD_FRONTPAGE_WEB = IIS_MD_HTTP_BASE + 72;
+ {$EXTERNALSYM MD_FRONTPAGE_WEB}
+ MD_IN_PROCESS_ISAPI_APPS = IIS_MD_HTTP_BASE + 73;
+ {$EXTERNALSYM MD_IN_PROCESS_ISAPI_APPS}
+
+ MD_ALLOW_PATH_INFO_FOR_SCRIPT_MAPPINGS = IIS_MD_HTTP_BASE + 95;
+ {$EXTERNALSYM MD_ALLOW_PATH_INFO_FOR_SCRIPT_MAPPINGS}
+
+ MD_APP_FRIENDLY_NAME = IIS_MD_HTTP_BASE + 102;
+ {$EXTERNALSYM MD_APP_FRIENDLY_NAME}
+ MD_APP_ROOT = IIS_MD_HTTP_BASE + 103;
+ {$EXTERNALSYM MD_APP_ROOT}
+ MD_APP_ISOLATED = IIS_MD_HTTP_BASE + 104;
+ {$EXTERNALSYM MD_APP_ISOLATED}
+ MD_APP_WAM_CLSID = IIS_MD_HTTP_BASE + 105;
+ {$EXTERNALSYM MD_APP_WAM_CLSID}
+ MD_APP_PACKAGE_ID = IIS_MD_HTTP_BASE + 106;
+ {$EXTERNALSYM MD_APP_PACKAGE_ID}
+ MD_APP_PACKAGE_NAME = IIS_MD_HTTP_BASE + 107;
+ {$EXTERNALSYM MD_APP_PACKAGE_NAME}
+ MD_APP_OOP_RECOVER_LIMIT = IIS_MD_HTTP_BASE + 110;
+ {$EXTERNALSYM MD_APP_OOP_RECOVER_LIMIT}
+ MD_APP_PERIODIC_RESTART_TIME = IIS_MD_HTTP_BASE + 111;
+ {$EXTERNALSYM MD_APP_PERIODIC_RESTART_TIME}
+ MD_APP_PERIODIC_RESTART_REQUESTS = IIS_MD_HTTP_BASE + 112;
+ {$EXTERNALSYM MD_APP_PERIODIC_RESTART_REQUESTS}
+ MD_APP_PERIODIC_RESTART_SCHEDULE = IIS_MD_HTTP_BASE + 113;
+ {$EXTERNALSYM MD_APP_PERIODIC_RESTART_SCHEDULE}
+ MD_APP_SHUTDOWN_TIME_LIMIT = IIS_MD_HTTP_BASE + 114;
+ {$EXTERNALSYM MD_APP_SHUTDOWN_TIME_LIMIT}
+
+ MD_ADMIN_INSTANCE = IIS_MD_HTTP_BASE + 115;
+ {$EXTERNALSYM MD_ADMIN_INSTANCE}
+
+ MD_CUSTOM_ERROR_DESC = IIS_MD_HTTP_BASE + 120;
+ {$EXTERNALSYM MD_CUSTOM_ERROR_DESC}
+
+//
+// Client Access License parameters
+//
+
+//
+// CPU Accounting and Throttling Properties
+//
+
+//
+// The enabled flags are per Application or CGI
+//
+
+ MD_CPU_RESET_INTERVAL = IIS_MD_HTTP_BASE + 144;
+ {$EXTERNALSYM MD_CPU_RESET_INTERVAL}
+
+//
+// Site Server properties
+//
+
+//
+// Properties to disable/restrict request handlers.
+//
+
+ MD_ISAPI_RESTRICTION_LIST = IIS_MD_HTTP_BASE + 163;
+ {$EXTERNALSYM MD_ISAPI_RESTRICTION_LIST}
+ MD_CGI_RESTRICTION_LIST = IIS_MD_HTTP_BASE + 164;
+ {$EXTERNALSYM MD_CGI_RESTRICTION_LIST}
+ MD_APP_DEPENDENCIES = IIS_MD_HTTP_BASE + 167;
+ {$EXTERNALSYM MD_APP_DEPENDENCIES}
+ MD_WEB_SVC_EXT_RESTRICTION_LIST = IIS_MD_HTTP_BASE + 168;
+ {$EXTERNALSYM MD_WEB_SVC_EXT_RESTRICTION_LIST}
+
+ MD_MD_SERVER_SS_AUTH_MAPPING = IIS_MD_HTTP_BASE + 200;
+ {$EXTERNALSYM MD_MD_SERVER_SS_AUTH_MAPPING}
+
+//
+// valid values for MD_CERT_CHECK_MODE
+//
+
+ MD_CERT_NO_REVOC_CHECK = $00000001;
+ {$EXTERNALSYM MD_CERT_NO_REVOC_CHECK}
+ MD_CERT_CACHE_RETRIEVAL_ONLY = $00000002;
+ {$EXTERNALSYM MD_CERT_CACHE_RETRIEVAL_ONLY}
+ MD_CERT_CHECK_REVOCATION_FRESHNESS_TIME = $00000004;
+ {$EXTERNALSYM MD_CERT_CHECK_REVOCATION_FRESHNESS_TIME}
+ MD_CERT_NO_USAGE_CHECK = $00010000;
+ {$EXTERNALSYM MD_CERT_NO_USAGE_CHECK}
+
+//
+// HTTP Compression properties. All are global and unheritable.
+//
+
+ MD_HC_COMPRESSION_DIRECTORY = IIS_MD_HTTP_BASE + 210;
+ {$EXTERNALSYM MD_HC_COMPRESSION_DIRECTORY}
+ MD_HC_CACHE_CONTROL_HEADER = IIS_MD_HTTP_BASE + 211;
+ {$EXTERNALSYM MD_HC_CACHE_CONTROL_HEADER}
+ MD_HC_EXPIRES_HEADER = IIS_MD_HTTP_BASE + 212;
+ {$EXTERNALSYM MD_HC_EXPIRES_HEADER}
+ MD_HC_DO_DYNAMIC_COMPRESSION = IIS_MD_HTTP_BASE + 213;
+ {$EXTERNALSYM MD_HC_DO_DYNAMIC_COMPRESSION}
+ MD_HC_DO_STATIC_COMPRESSION = IIS_MD_HTTP_BASE + 214;
+ {$EXTERNALSYM MD_HC_DO_STATIC_COMPRESSION}
+ MD_HC_DO_ON_DEMAND_COMPRESSION = IIS_MD_HTTP_BASE + 215;
+ {$EXTERNALSYM MD_HC_DO_ON_DEMAND_COMPRESSION}
+ MD_HC_DO_DISK_SPACE_LIMITING = IIS_MD_HTTP_BASE + 216;
+ {$EXTERNALSYM MD_HC_DO_DISK_SPACE_LIMITING}
+ MD_HC_NO_COMPRESSION_FOR_HTTP_10 = IIS_MD_HTTP_BASE + 217;
+ {$EXTERNALSYM MD_HC_NO_COMPRESSION_FOR_HTTP_10}
+ MD_HC_NO_COMPRESSION_FOR_PROXIES = IIS_MD_HTTP_BASE + 218;
+ {$EXTERNALSYM MD_HC_NO_COMPRESSION_FOR_PROXIES}
+ MD_HC_NO_COMPRESSION_FOR_RANGE = IIS_MD_HTTP_BASE + 219;
+ {$EXTERNALSYM MD_HC_NO_COMPRESSION_FOR_RANGE}
+ MD_HC_SEND_CACHE_HEADERS = IIS_MD_HTTP_BASE + 220;
+ {$EXTERNALSYM MD_HC_SEND_CACHE_HEADERS}
+ MD_HC_MAX_DISK_SPACE_USAGE = IIS_MD_HTTP_BASE + 221;
+ {$EXTERNALSYM MD_HC_MAX_DISK_SPACE_USAGE}
+ MD_HC_IO_BUFFER_SIZE = IIS_MD_HTTP_BASE + 222;
+ {$EXTERNALSYM MD_HC_IO_BUFFER_SIZE}
+ MD_HC_COMPRESSION_BUFFER_SIZE = IIS_MD_HTTP_BASE + 223;
+ {$EXTERNALSYM MD_HC_COMPRESSION_BUFFER_SIZE}
+ MD_HC_MAX_QUEUE_LENGTH = IIS_MD_HTTP_BASE + 224;
+ {$EXTERNALSYM MD_HC_MAX_QUEUE_LENGTH}
+ MD_HC_FILES_DELETED_PER_DISK_FREE = IIS_MD_HTTP_BASE + 225;
+ {$EXTERNALSYM MD_HC_FILES_DELETED_PER_DISK_FREE}
+ MD_HC_MIN_FILE_SIZE_FOR_COMP = IIS_MD_HTTP_BASE + 226;
+ {$EXTERNALSYM MD_HC_MIN_FILE_SIZE_FOR_COMP}
+
+ MD_HC_COMPRESSION_DLL = IIS_MD_HTTP_BASE + 237;
+ {$EXTERNALSYM MD_HC_COMPRESSION_DLL}
+ MD_HC_FILE_EXTENSIONS = IIS_MD_HTTP_BASE + 238;
+ {$EXTERNALSYM MD_HC_FILE_EXTENSIONS}
+ //MD_HC_MIME_TYPE = IIS_MD_HTTP_BASE + 239;
+ //{$EXTERNALSYM MD_HC_MIME_TYPE}
+ MD_HC_PRIORITY = IIS_MD_HTTP_BASE + 240;
+ {$EXTERNALSYM MD_HC_PRIORITY}
+ MD_HC_DYNAMIC_COMPRESSION_LEVEL = IIS_MD_HTTP_BASE + 241;
+ {$EXTERNALSYM MD_HC_DYNAMIC_COMPRESSION_LEVEL}
+ MD_HC_ON_DEMAND_COMP_LEVEL = IIS_MD_HTTP_BASE + 242;
+ {$EXTERNALSYM MD_HC_ON_DEMAND_COMP_LEVEL}
+ MD_HC_CREATE_FLAGS = IIS_MD_HTTP_BASE + 243;
+ {$EXTERNALSYM MD_HC_CREATE_FLAGS}
+ MD_HC_SCRIPT_FILE_EXTENSIONS = IIS_MD_HTTP_BASE + 244;
+ {$EXTERNALSYM MD_HC_SCRIPT_FILE_EXTENSIONS}
+
+ MD_HC_DO_NAMESPACE_DYNAMIC_COMPRESSION = IIS_MD_HTTP_BASE + 255;
+ {$EXTERNALSYM MD_HC_DO_NAMESPACE_DYNAMIC_COMPRESSION}
+ MD_HC_DO_NAMESPACE_STATIC_COMPRESSION = IIS_MD_HTTP_BASE + 256;
+ {$EXTERNALSYM MD_HC_DO_NAMESPACE_STATIC_COMPRESSION}
+
+//
+// Generic property indicating a failure status code - Can be used under
+// any component that can fail (virtual directory, filters, applications etc)
+//
+
+ MD_WIN32_ERROR = IIS_MD_SERVER_BASE + 99;
+ {$EXTERNALSYM MD_WIN32_ERROR}
+
+//
+// Virtual root properties - note MD_ACCESS_PERM is also generally set at
+// the virtual directory. These are used for both HTTP and FTP
+//
+
+ IIS_MD_VR_BASE = 3000;
+ {$EXTERNALSYM IIS_MD_VR_BASE}
+
+ MD_VR_PATH = IIS_MD_VR_BASE + 1;
+ {$EXTERNALSYM MD_VR_PATH}
+ MD_VR_USERNAME = IIS_MD_VR_BASE + 2;
+ {$EXTERNALSYM MD_VR_USERNAME}
+ MD_VR_PASSWORD = IIS_MD_VR_BASE + 3;
+ {$EXTERNALSYM MD_VR_PASSWORD}
+ MD_VR_PASSTHROUGH = IIS_MD_VR_BASE + 6;
+ {$EXTERNALSYM MD_VR_PASSTHROUGH}
+ MD_VR_NO_CACHE = IIS_MD_VR_BASE + 7;
+ {$EXTERNALSYM MD_VR_NO_CACHE}
+ //MD_VR_IGNORE_TRANSLATE = IIS_MD_VR_BASE + 8;
+ //{$EXTERNALSYM MD_VR_IGNORE_TRANSLATE}
+
+//
+// Logging related attributes
+//
+
+ IIS_MD_LOG_BASE = 4000;
+ {$EXTERNALSYM IIS_MD_LOG_BASE}
+
+ MD_LOG_TYPE = IIS_MD_LOG_BASE + 0;
+ {$EXTERNALSYM MD_LOG_TYPE}
+ MD_LOGFILE_DIRECTORY = IIS_MD_LOG_BASE + 1;
+ {$EXTERNALSYM MD_LOGFILE_DIRECTORY}
+ MD_LOG_UNUSED1 = IIS_MD_LOG_BASE + 2;
+ {$EXTERNALSYM MD_LOG_UNUSED1}
+ MD_LOGFILE_PERIOD = IIS_MD_LOG_BASE + 3;
+ {$EXTERNALSYM MD_LOGFILE_PERIOD}
+ MD_LOGFILE_TRUNCATE_SIZE = IIS_MD_LOG_BASE + 4;
+ {$EXTERNALSYM MD_LOGFILE_TRUNCATE_SIZE}
+ MD_LOG_PLUGIN_MOD_ID = IIS_MD_LOG_BASE + 5;
+ {$EXTERNALSYM MD_LOG_PLUGIN_MOD_ID}
+ MD_LOG_PLUGIN_UI_ID = IIS_MD_LOG_BASE + 6;
+ {$EXTERNALSYM MD_LOG_PLUGIN_UI_ID}
+ MD_LOGSQL_DATA_SOURCES = IIS_MD_LOG_BASE + 7;
+ {$EXTERNALSYM MD_LOGSQL_DATA_SOURCES}
+ MD_LOGSQL_TABLE_NAME = IIS_MD_LOG_BASE + 8;
+ {$EXTERNALSYM MD_LOGSQL_TABLE_NAME}
+ MD_LOGSQL_USER_NAME = IIS_MD_LOG_BASE + 9;
+ {$EXTERNALSYM MD_LOGSQL_USER_NAME}
+ MD_LOGSQL_PASSWORD = IIS_MD_LOG_BASE + 10;
+ {$EXTERNALSYM MD_LOGSQL_PASSWORD}
+ MD_LOG_PLUGIN_ORDER = IIS_MD_LOG_BASE + 11;
+ {$EXTERNALSYM MD_LOG_PLUGIN_ORDER}
+ MD_LOG_PLUGINS_AVAILABLE = IIS_MD_LOG_BASE + 12;
+ {$EXTERNALSYM MD_LOG_PLUGINS_AVAILABLE}
+ MD_LOGEXT_FIELD_MASK = IIS_MD_LOG_BASE + 13;
+ {$EXTERNALSYM MD_LOGEXT_FIELD_MASK}
+ MD_LOGEXT_FIELD_MASK2 = IIS_MD_LOG_BASE + 14;
+ {$EXTERNALSYM MD_LOGEXT_FIELD_MASK2}
+
+//
+// Allow W3C logging file naming and rollover based on Local Time
+//
+
+ MD_LOGFILE_LOCALTIME_ROLLOVER = IIS_MD_LOG_BASE + 15;
+ {$EXTERNALSYM MD_LOGFILE_LOCALTIME_ROLLOVER}
+
+ IIS_MD_LOG_LAST = MD_LOGFILE_LOCALTIME_ROLLOVER;
+ {$EXTERNALSYM IIS_MD_LOG_LAST}
+
+//
+// Global Flag to denote that IIS will generate one centralized
+// binary log file rather than a separate file per web site
+//
+
+ MD_GLOBAL_BINARY_LOGGING_ENABLED = IIS_MD_LOG_BASE + 16;
+ {$EXTERNALSYM MD_GLOBAL_BINARY_LOGGING_ENABLED}
+
+//
+// Log type
+//
+
+ MD_LOG_TYPE_DISABLED = 0;
+ {$EXTERNALSYM MD_LOG_TYPE_DISABLED}
+ MD_LOG_TYPE_ENABLED = 1;
+ {$EXTERNALSYM MD_LOG_TYPE_ENABLED}
+
+//
+// LOGGING values
+//
+
+ MD_LOGFILE_PERIOD_NONE = 0;
+ {$EXTERNALSYM MD_LOGFILE_PERIOD_NONE}
+ MD_LOGFILE_PERIOD_MAXSIZE = 0;
+ {$EXTERNALSYM MD_LOGFILE_PERIOD_MAXSIZE}
+ MD_LOGFILE_PERIOD_DAILY = 1;
+ {$EXTERNALSYM MD_LOGFILE_PERIOD_DAILY}
+ MD_LOGFILE_PERIOD_WEEKLY = 2;
+ {$EXTERNALSYM MD_LOGFILE_PERIOD_WEEKLY}
+ MD_LOGFILE_PERIOD_MONTHLY = 3;
+ {$EXTERNALSYM MD_LOGFILE_PERIOD_MONTHLY}
+ MD_LOGFILE_PERIOD_HOURLY = 4;
+ {$EXTERNALSYM MD_LOGFILE_PERIOD_HOURLY}
+
+//
+// Field masks for extended logging
+// Fields are logged in order of increasing mask value
+//
+
+ MD_EXTLOG_DATE = $00000001;
+ {$EXTERNALSYM MD_EXTLOG_DATE}
+ MD_EXTLOG_TIME = $00000002;
+ {$EXTERNALSYM MD_EXTLOG_TIME}
+ MD_EXTLOG_CLIENT_IP = $00000004;
+ {$EXTERNALSYM MD_EXTLOG_CLIENT_IP}
+ MD_EXTLOG_USERNAME = $00000008;
+ {$EXTERNALSYM MD_EXTLOG_USERNAME}
+ MD_EXTLOG_SITE_NAME = $00000010;
+ {$EXTERNALSYM MD_EXTLOG_SITE_NAME}
+ MD_EXTLOG_COMPUTER_NAME = $00000020;
+ {$EXTERNALSYM MD_EXTLOG_COMPUTER_NAME}
+ MD_EXTLOG_SERVER_IP = $00000040;
+ {$EXTERNALSYM MD_EXTLOG_SERVER_IP}
+ MD_EXTLOG_METHOD = $00000080;
+ {$EXTERNALSYM MD_EXTLOG_METHOD}
+ MD_EXTLOG_URI_STEM = $00000100;
+ {$EXTERNALSYM MD_EXTLOG_URI_STEM}
+ MD_EXTLOG_URI_QUERY = $00000200;
+ {$EXTERNALSYM MD_EXTLOG_URI_QUERY}
+ MD_EXTLOG_HTTP_STATUS = $00000400;
+ {$EXTERNALSYM MD_EXTLOG_HTTP_STATUS}
+ MD_EXTLOG_WIN32_STATUS = $00000800;
+ {$EXTERNALSYM MD_EXTLOG_WIN32_STATUS}
+ MD_EXTLOG_BYTES_SENT = $00001000;
+ {$EXTERNALSYM MD_EXTLOG_BYTES_SENT}
+ MD_EXTLOG_BYTES_RECV = $00002000;
+ {$EXTERNALSYM MD_EXTLOG_BYTES_RECV}
+ MD_EXTLOG_TIME_TAKEN = $00004000;
+ {$EXTERNALSYM MD_EXTLOG_TIME_TAKEN}
+ MD_EXTLOG_SERVER_PORT = $00008000;
+ {$EXTERNALSYM MD_EXTLOG_SERVER_PORT}
+ MD_EXTLOG_USER_AGENT = $00010000;
+ {$EXTERNALSYM MD_EXTLOG_USER_AGENT}
+ MD_EXTLOG_COOKIE = $00020000;
+ {$EXTERNALSYM MD_EXTLOG_COOKIE}
+ MD_EXTLOG_REFERER = $00040000;
+ {$EXTERNALSYM MD_EXTLOG_REFERER}
+ MD_EXTLOG_PROTOCOL_VERSION = $00080000;
+ {$EXTERNALSYM MD_EXTLOG_PROTOCOL_VERSION}
+ MD_EXTLOG_HOST = $00100000;
+ {$EXTERNALSYM MD_EXTLOG_HOST}
+ MD_EXTLOG_HTTP_SUB_STATUS = $00200000;
+ {$EXTERNALSYM MD_EXTLOG_HTTP_SUB_STATUS}
+
+ MD_DEFAULT_EXTLOG_FIELDS = MD_EXTLOG_CLIENT_IP or MD_EXTLOG_TIME or MD_EXTLOG_METHOD or
+ MD_EXTLOG_URI_STEM or MD_EXTLOG_HTTP_STATUS or MD_EXTLOG_HTTP_SUB_STATUS;
+ {$EXTERNALSYM MD_DEFAULT_EXTLOG_FIELDS}
+
+//
+// Custom Logging related attributes
+//
+
+ IIS_MD_LOGCUSTOM_BASE = 4500;
+ {$EXTERNALSYM IIS_MD_LOGCUSTOM_BASE}
+
+//
+// Custom Logging configuration attributes
+//
+
+ MD_LOGCUSTOM_PROPERTY_NAME = IIS_MD_LOGCUSTOM_BASE + 1;
+ {$EXTERNALSYM MD_LOGCUSTOM_PROPERTY_NAME}
+ MD_LOGCUSTOM_PROPERTY_HEADER = IIS_MD_LOGCUSTOM_BASE + 2;
+ {$EXTERNALSYM MD_LOGCUSTOM_PROPERTY_HEADER}
+ MD_LOGCUSTOM_PROPERTY_ID = IIS_MD_LOGCUSTOM_BASE + 3;
+ {$EXTERNALSYM MD_LOGCUSTOM_PROPERTY_ID}
+ MD_LOGCUSTOM_PROPERTY_MASK = IIS_MD_LOGCUSTOM_BASE + 4;
+ {$EXTERNALSYM MD_LOGCUSTOM_PROPERTY_MASK}
+ MD_LOGCUSTOM_PROPERTY_DATATYPE = IIS_MD_LOGCUSTOM_BASE + 5;
+ {$EXTERNALSYM MD_LOGCUSTOM_PROPERTY_DATATYPE}
+ MD_LOGCUSTOM_SERVICES_STRING = IIS_MD_LOGCUSTOM_BASE + 6; // MultiSZ List of services that the property is applicable to.
+ {$EXTERNALSYM MD_LOGCUSTOM_SERVICES_STRING}
+
+ MD_LOGCUSTOM_PROPERTY_NODE_ID = IIS_MD_LOGCUSTOM_BASE + 8;
+ {$EXTERNALSYM MD_LOGCUSTOM_PROPERTY_NODE_ID}
+
+ IIS_MD_LOGCUSTOM_LAST = MD_LOGCUSTOM_PROPERTY_NODE_ID;
+ {$EXTERNALSYM IIS_MD_LOGCUSTOM_LAST}
+
+//
+// Valid values for Custom Logging's MD_LOGCUSTOM_PROPERTY_DATATYPE field
+//
+
+ MD_LOGCUSTOM_DATATYPE_INT = 0;
+ {$EXTERNALSYM MD_LOGCUSTOM_DATATYPE_INT}
+ MD_LOGCUSTOM_DATATYPE_UINT = 1;
+ {$EXTERNALSYM MD_LOGCUSTOM_DATATYPE_UINT}
+ MD_LOGCUSTOM_DATATYPE_LONG = 2;
+ {$EXTERNALSYM MD_LOGCUSTOM_DATATYPE_LONG}
+ MD_LOGCUSTOM_DATATYPE_ULONG = 3;
+ {$EXTERNALSYM MD_LOGCUSTOM_DATATYPE_ULONG}
+ MD_LOGCUSTOM_DATATYPE_FLOAT = 4;
+ {$EXTERNALSYM MD_LOGCUSTOM_DATATYPE_FLOAT}
+ MD_LOGCUSTOM_DATATYPE_DOUBLE = 5;
+ {$EXTERNALSYM MD_LOGCUSTOM_DATATYPE_DOUBLE}
+ MD_LOGCUSTOM_DATATYPE_LPSTR = 6;
+ {$EXTERNALSYM MD_LOGCUSTOM_DATATYPE_LPSTR}
+ MD_LOGCUSTOM_DATATYPE_LPWSTR = 7;
+ {$EXTERNALSYM MD_LOGCUSTOM_DATATYPE_LPWSTR}
+
+//
+// ISAPI Filter Notification Flags
+//
+
+ MD_NOTIFY_SECURE_PORT = $00000001;
+ {$EXTERNALSYM MD_NOTIFY_SECURE_PORT}
+ MD_NOTIFY_NONSECURE_PORT = $00000002;
+ {$EXTERNALSYM MD_NOTIFY_NONSECURE_PORT}
+
+ MD_NOTIFY_READ_RAW_DATA = $00008000;
+ {$EXTERNALSYM MD_NOTIFY_READ_RAW_DATA}
+ MD_NOTIFY_PREPROC_HEADERS = $00004000;
+ {$EXTERNALSYM MD_NOTIFY_PREPROC_HEADERS}
+ MD_NOTIFY_AUTHENTICATION = $00002000;
+ {$EXTERNALSYM MD_NOTIFY_AUTHENTICATION}
+ MD_NOTIFY_URL_MAP = $00001000;
+ {$EXTERNALSYM MD_NOTIFY_URL_MAP}
+ MD_NOTIFY_ACCESS_DENIED = $00000800;
+ {$EXTERNALSYM MD_NOTIFY_ACCESS_DENIED}
+ MD_NOTIFY_SEND_RESPONSE = $00000040;
+ {$EXTERNALSYM MD_NOTIFY_SEND_RESPONSE}
+ MD_NOTIFY_SEND_RAW_DATA = $00000400;
+ {$EXTERNALSYM MD_NOTIFY_SEND_RAW_DATA}
+ MD_NOTIFY_LOG = $00000200;
+ {$EXTERNALSYM MD_NOTIFY_LOG}
+ MD_NOTIFY_END_OF_REQUEST = $00000080;
+ {$EXTERNALSYM MD_NOTIFY_END_OF_REQUEST}
+ MD_NOTIFY_END_OF_NET_SESSION = $00000100;
+ {$EXTERNALSYM MD_NOTIFY_END_OF_NET_SESSION}
+ MD_NOTIFY_AUTH_COMPLETE = $04000000;
+ {$EXTERNALSYM MD_NOTIFY_AUTH_COMPLETE}
+
+//
+// ISAPI Filter ordering flags
+//
+
+ MD_NOTIFY_ORDER_HIGH = $00080000;
+ {$EXTERNALSYM MD_NOTIFY_ORDER_HIGH}
+ MD_NOTIFY_ORDER_MEDIUM = $00040000;
+ {$EXTERNALSYM MD_NOTIFY_ORDER_MEDIUM}
+ MD_NOTIFY_ORDER_LOW = $00020000;
+ {$EXTERNALSYM MD_NOTIFY_ORDER_LOW}
+ MD_NOTIFY_ORDER_DEFAULT = MD_NOTIFY_ORDER_LOW;
+ {$EXTERNALSYM MD_NOTIFY_ORDER_DEFAULT}
+
+ MD_NOTIFY_ORDER_MASK = MD_NOTIFY_ORDER_HIGH or MD_NOTIFY_ORDER_MEDIUM or MD_NOTIFY_ORDER_LOW;
+ {$EXTERNALSYM MD_NOTIFY_ORDER_MASK}
+
+//
+// These are FTP specific properties
+//
+
+ IIS_MD_FTP_BASE = 5000;
+ {$EXTERNALSYM IIS_MD_FTP_BASE}
+
+ MD_EXIT_MESSAGE = IIS_MD_FTP_BASE + 1;
+ {$EXTERNALSYM MD_EXIT_MESSAGE}
+ MD_GREETING_MESSAGE = IIS_MD_FTP_BASE + 2;
+ {$EXTERNALSYM MD_GREETING_MESSAGE}
+ MD_MAX_CLIENTS_MESSAGE = IIS_MD_FTP_BASE + 3;
+ {$EXTERNALSYM MD_MAX_CLIENTS_MESSAGE}
+ MD_MSDOS_DIR_OUTPUT = IIS_MD_FTP_BASE + 4;
+ {$EXTERNALSYM MD_MSDOS_DIR_OUTPUT}
+ MD_ALLOW_ANONYMOUS = IIS_MD_FTP_BASE + 5;
+ {$EXTERNALSYM MD_ALLOW_ANONYMOUS}
+ MD_ANONYMOUS_ONLY = IIS_MD_FTP_BASE + 6;
+ {$EXTERNALSYM MD_ANONYMOUS_ONLY}
+ MD_LOG_ANONYMOUS = IIS_MD_FTP_BASE + 7;
+ {$EXTERNALSYM MD_LOG_ANONYMOUS}
+ MD_LOG_NONANONYMOUS = IIS_MD_FTP_BASE + 8;
+ {$EXTERNALSYM MD_LOG_NONANONYMOUS}
+ MD_ALLOW_REPLACE_ON_RENAME = IIS_MD_FTP_BASE + 9;
+ {$EXTERNALSYM MD_ALLOW_REPLACE_ON_RENAME}
+ MD_SHOW_4_DIGIT_YEAR = IIS_MD_FTP_BASE + 10;
+ {$EXTERNALSYM MD_SHOW_4_DIGIT_YEAR}
+ MD_BANNER_MESSAGE = IIS_MD_FTP_BASE + 11;
+ {$EXTERNALSYM MD_BANNER_MESSAGE}
+ MD_USER_ISOLATION = IIS_MD_FTP_BASE + 12;
+ {$EXTERNALSYM MD_USER_ISOLATION}
+ MD_FTP_LOG_IN_UTF_8 = IIS_MD_FTP_BASE + 13;
+ {$EXTERNALSYM MD_FTP_LOG_IN_UTF_8}
+ MD_AD_CONNECTIONS_USERNAME = IIS_MD_FTP_BASE + 14;
+ {$EXTERNALSYM MD_AD_CONNECTIONS_USERNAME}
+ MD_AD_CONNECTIONS_PASSWORD = IIS_MD_FTP_BASE + 15;
+ {$EXTERNALSYM MD_AD_CONNECTIONS_PASSWORD}
+ MD_PASSIVE_PORT_RANGE = IIS_MD_FTP_BASE + 16;
+ {$EXTERNALSYM MD_PASSIVE_PORT_RANGE}
+
+//
+// These are SSL specific properties
+//
+
+ IIS_MD_SSL_BASE = 5500;
+ {$EXTERNALSYM IIS_MD_SSL_BASE}
+
+ MD_SSL_PUBLIC_KEY = IIS_MD_SSL_BASE + 0;
+ {$EXTERNALSYM MD_SSL_PUBLIC_KEY}
+ MD_SSL_PRIVATE_KEY = IIS_MD_SSL_BASE + 1;
+ {$EXTERNALSYM MD_SSL_PRIVATE_KEY}
+ MD_SSL_KEY_PASSWORD = IIS_MD_SSL_BASE + 2;
+ {$EXTERNALSYM MD_SSL_KEY_PASSWORD}
+ MD_SSL_KEY_REQUEST = IIS_MD_SSL_BASE + 3;
+ {$EXTERNALSYM MD_SSL_KEY_REQUEST}
+
+//
+// These are server certificate properties
+//
+//
+// These are Certificate Trust List properties
+//
+
+//
+// Metabase property that defines whether to use DS mapper or not
+//
+
+ MD_SSL_USE_DS_MAPPER = IIS_MD_SSL_BASE + 19;
+ {$EXTERNALSYM MD_SSL_USE_DS_MAPPER}
+
+ MD_SSL_ALWAYS_NEGO_CLIENT_CERT = IIS_MD_SSL_BASE + 21;
+ {$EXTERNALSYM MD_SSL_ALWAYS_NEGO_CLIENT_CERT}
+
+//
+// Metabase properties that are used by the CertWiz ActiveX control, that
+// is used for the Certificate/CTL UI management tool
+//
+
+//
+// Metabase properties used for Fortezza certificates
+//
+
+//
+// Metabase properties that are used by the CertWiz ActiveX control to keep
+// track of the user's entry history, and whether DEBUG is enabled. We keep
+// these private properties on a per VS basis.
+//
+
+// File and Directory related properties - these should be added in the
+// metabase with a user type of IIS_MD_UT_FILE
+//
+
+ IIS_MD_FILE_PROP_BASE = 6000;
+ {$EXTERNALSYM IIS_MD_FILE_PROP_BASE}
+
+ MD_AUTHORIZATION = IIS_MD_FILE_PROP_BASE;
+ {$EXTERNALSYM MD_AUTHORIZATION}
+ MD_REALM = IIS_MD_FILE_PROP_BASE + 1;
+ {$EXTERNALSYM MD_REALM}
+ MD_HTTP_EXPIRES = IIS_MD_FILE_PROP_BASE + 2;
+ {$EXTERNALSYM MD_HTTP_EXPIRES}
+ MD_HTTP_PICS = IIS_MD_FILE_PROP_BASE + 3;
+ {$EXTERNALSYM MD_HTTP_PICS}
+ MD_HTTP_CUSTOM = IIS_MD_FILE_PROP_BASE + 4;
+ {$EXTERNALSYM MD_HTTP_CUSTOM}
+ MD_DIRECTORY_BROWSING = IIS_MD_FILE_PROP_BASE + 5;
+ {$EXTERNALSYM MD_DIRECTORY_BROWSING}
+ MD_DEFAULT_LOAD_FILE = IIS_MD_FILE_PROP_BASE + 6;
+ {$EXTERNALSYM MD_DEFAULT_LOAD_FILE}
+ MD_CUSTOM_ERROR = IIS_MD_FILE_PROP_BASE + 8;
+ {$EXTERNALSYM MD_CUSTOM_ERROR}
+ MD_FOOTER_DOCUMENT = IIS_MD_FILE_PROP_BASE + 9;
+ {$EXTERNALSYM MD_FOOTER_DOCUMENT}
+ MD_FOOTER_ENABLED = IIS_MD_FILE_PROP_BASE + 10;
+ {$EXTERNALSYM MD_FOOTER_ENABLED}
+ MD_HTTP_REDIRECT = IIS_MD_FILE_PROP_BASE + 11;
+ {$EXTERNALSYM MD_HTTP_REDIRECT}
+ MD_DEFAULT_LOGON_DOMAIN = IIS_MD_FILE_PROP_BASE + 12;
+ {$EXTERNALSYM MD_DEFAULT_LOGON_DOMAIN}
+ MD_LOGON_METHOD = IIS_MD_FILE_PROP_BASE + 13;
+ {$EXTERNALSYM MD_LOGON_METHOD}
+ MD_SCRIPT_MAPS = IIS_MD_FILE_PROP_BASE + 14;
+ {$EXTERNALSYM MD_SCRIPT_MAPS}
+ MD_MIME_MAP = IIS_MD_FILE_PROP_BASE + 15;
+ {$EXTERNALSYM MD_MIME_MAP}
+ MD_ACCESS_PERM = IIS_MD_FILE_PROP_BASE + 16;
+ {$EXTERNALSYM MD_ACCESS_PERM}
+ MD_IP_SEC = IIS_MD_FILE_PROP_BASE + 19;
+ {$EXTERNALSYM MD_IP_SEC}
+ MD_ANONYMOUS_USER_NAME = IIS_MD_FILE_PROP_BASE + 20;
+ {$EXTERNALSYM MD_ANONYMOUS_USER_NAME}
+ MD_ANONYMOUS_PWD = IIS_MD_FILE_PROP_BASE + 21;
+ {$EXTERNALSYM MD_ANONYMOUS_PWD}
+ MD_ANONYMOUS_USE_SUBAUTH = IIS_MD_FILE_PROP_BASE + 22;
+ {$EXTERNALSYM MD_ANONYMOUS_USE_SUBAUTH}
+ MD_DONT_LOG = IIS_MD_FILE_PROP_BASE + 23;
+ {$EXTERNALSYM MD_DONT_LOG}
+ MD_ADMIN_ACL = IIS_MD_FILE_PROP_BASE + 27;
+ {$EXTERNALSYM MD_ADMIN_ACL}
+ MD_SSI_EXEC_DISABLED = IIS_MD_FILE_PROP_BASE + 28;
+ {$EXTERNALSYM MD_SSI_EXEC_DISABLED}
+ MD_DO_REVERSE_DNS = IIS_MD_FILE_PROP_BASE + 29;
+ {$EXTERNALSYM MD_DO_REVERSE_DNS}
+ MD_SSL_ACCESS_PERM = IIS_MD_FILE_PROP_BASE + 30;
+ {$EXTERNALSYM MD_SSL_ACCESS_PERM}
+ MD_AUTHORIZATION_PERSISTENCE = IIS_MD_FILE_PROP_BASE + 31;
+ {$EXTERNALSYM MD_AUTHORIZATION_PERSISTENCE}
+ MD_NTAUTHENTICATION_PROVIDERS = IIS_MD_FILE_PROP_BASE + 32;
+ {$EXTERNALSYM MD_NTAUTHENTICATION_PROVIDERS}
+ MD_SCRIPT_TIMEOUT = IIS_MD_FILE_PROP_BASE + 33;
+ {$EXTERNALSYM MD_SCRIPT_TIMEOUT}
+ MD_CACHE_EXTENSIONS = IIS_MD_FILE_PROP_BASE + 34;
+ {$EXTERNALSYM MD_CACHE_EXTENSIONS}
+ MD_CREATE_PROCESS_AS_USER = IIS_MD_FILE_PROP_BASE + 35;
+ {$EXTERNALSYM MD_CREATE_PROCESS_AS_USER}
+ MD_CREATE_PROC_NEW_CONSOLE = IIS_MD_FILE_PROP_BASE + 36;
+ {$EXTERNALSYM MD_CREATE_PROC_NEW_CONSOLE}
+ MD_POOL_IDC_TIMEOUT = IIS_MD_FILE_PROP_BASE + 37;
+ {$EXTERNALSYM MD_POOL_IDC_TIMEOUT}
+ MD_ALLOW_KEEPALIVES = IIS_MD_FILE_PROP_BASE + 38;
+ {$EXTERNALSYM MD_ALLOW_KEEPALIVES}
+ MD_IS_CONTENT_INDEXED = IIS_MD_FILE_PROP_BASE + 39;
+ {$EXTERNALSYM MD_IS_CONTENT_INDEXED}
+ MD_CC_NO_CACHE = IIS_MD_FILE_PROP_BASE + 41;
+ {$EXTERNALSYM MD_CC_NO_CACHE}
+ MD_CC_MAX_AGE = IIS_MD_FILE_PROP_BASE + 42;
+ {$EXTERNALSYM MD_CC_MAX_AGE}
+ MD_CC_OTHER = IIS_MD_FILE_PROP_BASE + 43;
+ {$EXTERNALSYM MD_CC_OTHER}
+ MD_REDIRECT_HEADERS = IIS_MD_FILE_PROP_BASE + 44;
+ {$EXTERNALSYM MD_REDIRECT_HEADERS}
+ MD_UPLOAD_READAHEAD_SIZE = IIS_MD_FILE_PROP_BASE + 45;
+ {$EXTERNALSYM MD_UPLOAD_READAHEAD_SIZE}
+ MD_PUT_READ_SIZE = IIS_MD_FILE_PROP_BASE + 46;
+ {$EXTERNALSYM MD_PUT_READ_SIZE}
+ MD_USE_DIGEST_SSP = IIS_MD_FILE_PROP_BASE + 47;
+ {$EXTERNALSYM MD_USE_DIGEST_SSP}
+
+ MD_ENABLE_URL_AUTHORIZATION = IIS_MD_FILE_PROP_BASE + 48;
+ {$EXTERNALSYM MD_ENABLE_URL_AUTHORIZATION}
+ MD_URL_AUTHORIZATION_STORE_NAME = IIS_MD_FILE_PROP_BASE + 49;
+ {$EXTERNALSYM MD_URL_AUTHORIZATION_STORE_NAME}
+ MD_URL_AUTHORIZATION_SCOPE_NAME = IIS_MD_FILE_PROP_BASE + 50;
+ {$EXTERNALSYM MD_URL_AUTHORIZATION_SCOPE_NAME}
+
+ MD_MAX_REQUEST_ENTITY_ALLOWED = IIS_MD_FILE_PROP_BASE + 51;
+ {$EXTERNALSYM MD_MAX_REQUEST_ENTITY_ALLOWED}
+
+ MD_PASSPORT_REQUIRE_AD_MAPPING = IIS_MD_FILE_PROP_BASE + 52;
+ {$EXTERNALSYM MD_PASSPORT_REQUIRE_AD_MAPPING}
+
+ MD_URL_AUTHORIZATION_IMPERSONATION_LEVEL = IIS_MD_FILE_PROP_BASE + 53;
+ {$EXTERNALSYM MD_URL_AUTHORIZATION_IMPERSONATION_LEVEL}
+
+ ASP_MD_SERVER_BASE = 7000;
+ {$EXTERNALSYM ASP_MD_SERVER_BASE}
+
+ MD_ASP_BUFFERINGON = ASP_MD_SERVER_BASE + 0;
+ {$EXTERNALSYM MD_ASP_BUFFERINGON}
+ MD_ASP_LOGERRORREQUESTS = ASP_MD_SERVER_BASE + 1;
+ {$EXTERNALSYM MD_ASP_LOGERRORREQUESTS}
+ MD_ASP_SCRIPTERRORSSENTTOBROWSER = ASP_MD_SERVER_BASE + 2;
+ {$EXTERNALSYM MD_ASP_SCRIPTERRORSSENTTOBROWSER}
+ MD_ASP_SCRIPTERRORMESSAGE = ASP_MD_SERVER_BASE + 3;
+ {$EXTERNALSYM MD_ASP_SCRIPTERRORMESSAGE}
+ MD_ASP_SCRIPTFILECACHESIZE = ASP_MD_SERVER_BASE + 4;
+ {$EXTERNALSYM MD_ASP_SCRIPTFILECACHESIZE}
+ MD_ASP_SCRIPTENGINECACHEMAX = ASP_MD_SERVER_BASE + 5;
+ {$EXTERNALSYM MD_ASP_SCRIPTENGINECACHEMAX}
+ MD_ASP_SCRIPTTIMEOUT = ASP_MD_SERVER_BASE + 6;
+ {$EXTERNALSYM MD_ASP_SCRIPTTIMEOUT}
+ MD_ASP_SESSIONTIMEOUT = ASP_MD_SERVER_BASE + 7;
+ {$EXTERNALSYM MD_ASP_SESSIONTIMEOUT}
+ MD_ASP_ENABLEPARENTPATHS = ASP_MD_SERVER_BASE + 8;
+ {$EXTERNALSYM MD_ASP_ENABLEPARENTPATHS}
+ MD_ASP_MEMFREEFACTOR = ASP_MD_SERVER_BASE + 9; // OBSOLETE
+ {$EXTERNALSYM MD_ASP_MEMFREEFACTOR}
+ MD_ASP_MINUSEDBLOCKS = ASP_MD_SERVER_BASE + 10; // OBSOLETE
+ {$EXTERNALSYM MD_ASP_MINUSEDBLOCKS}
+ MD_ASP_ALLOWSESSIONSTATE = ASP_MD_SERVER_BASE + 11;
+ {$EXTERNALSYM MD_ASP_ALLOWSESSIONSTATE}
+ MD_ASP_SCRIPTLANGUAGE = ASP_MD_SERVER_BASE + 12;
+ {$EXTERNALSYM MD_ASP_SCRIPTLANGUAGE}
+ MD_ASP_QUEUETIMEOUT = ASP_MD_SERVER_BASE + 13;
+ {$EXTERNALSYM MD_ASP_QUEUETIMEOUT}
+ MD_ASP_ALLOWOUTOFPROCCOMPONENTS = ASP_MD_SERVER_BASE + 14;
+ {$EXTERNALSYM MD_ASP_ALLOWOUTOFPROCCOMPONENTS}
+ MD_ASP_ALLOWOUTOFPROCCMPNTS = MD_ASP_ALLOWOUTOFPROCCOMPONENTS; // Deprecated. Use MD_ASP_ALLOWOUTOFPROCCMPNTS
+ {$EXTERNALSYM MD_ASP_ALLOWOUTOFPROCCMPNTS}
+ MD_ASP_EXCEPTIONCATCHENABLE = ASP_MD_SERVER_BASE + 15;
+ {$EXTERNALSYM MD_ASP_EXCEPTIONCATCHENABLE}
+ MD_ASP_CODEPAGE = ASP_MD_SERVER_BASE + 16;
+ {$EXTERNALSYM MD_ASP_CODEPAGE}
+ MD_ASP_SCRIPTLANGUAGELIST = ASP_MD_SERVER_BASE + 17;
+ {$EXTERNALSYM MD_ASP_SCRIPTLANGUAGELIST}
+ MD_ASP_ENABLESERVERDEBUG = ASP_MD_SERVER_BASE + 18;
+ {$EXTERNALSYM MD_ASP_ENABLESERVERDEBUG}
+ MD_ASP_ENABLECLIENTDEBUG = ASP_MD_SERVER_BASE + 19;
+ {$EXTERNALSYM MD_ASP_ENABLECLIENTDEBUG}
+ MD_ASP_TRACKTHREADINGMODEL = ASP_MD_SERVER_BASE + 20;
+ {$EXTERNALSYM MD_ASP_TRACKTHREADINGMODEL}
+// added for IIS 5.0
+ MD_ASP_ENABLEASPHTMLFALLBACK = ASP_MD_SERVER_BASE + 21;
+ {$EXTERNALSYM MD_ASP_ENABLEASPHTMLFALLBACK}
+ MD_ASP_ENABLECHUNKEDENCODING = ASP_MD_SERVER_BASE + 22;
+ {$EXTERNALSYM MD_ASP_ENABLECHUNKEDENCODING}
+ MD_ASP_ENABLETYPELIBCACHE = ASP_MD_SERVER_BASE + 23;
+ {$EXTERNALSYM MD_ASP_ENABLETYPELIBCACHE}
+ MD_ASP_ERRORSTONTLOG = ASP_MD_SERVER_BASE + 24;
+ {$EXTERNALSYM MD_ASP_ERRORSTONTLOG}
+ MD_ASP_PROCESSORTHREADMAX = ASP_MD_SERVER_BASE + 25;
+ {$EXTERNALSYM MD_ASP_PROCESSORTHREADMAX}
+ MD_ASP_REQEUSTQUEUEMAX = ASP_MD_SERVER_BASE + 26;
+ {$EXTERNALSYM MD_ASP_REQEUSTQUEUEMAX}
+ MD_ASP_ENABLEAPPLICATIONRESTART = ASP_MD_SERVER_BASE + 27;
+ {$EXTERNALSYM MD_ASP_ENABLEAPPLICATIONRESTART}
+ MD_ASP_QUEUECONNECTIONTESTTIME = ASP_MD_SERVER_BASE + 28;
+ {$EXTERNALSYM MD_ASP_QUEUECONNECTIONTESTTIME}
+ MD_ASP_SESSIONMAX = ASP_MD_SERVER_BASE + 29;
+ {$EXTERNALSYM MD_ASP_SESSIONMAX}
+
+// thread gate
+// MD_ASP_THREADGATEENABLED = ASP_MD_SERVER_BASE + 30;
+// {$EXTERNALSYM MD_ASP_THREADGATEENABLED}
+// MD_ASP_THREADGATETIMESLICE = ASP_MD_SERVER_BASE + 31;
+// {$EXTERNALSYM MD_ASP_THREADGATETIMESLICE}
+// MD_ASP_THREADGATESLEEPDELAY = ASP_MD_SERVER_BASE + 32;
+// {$EXTERNALSYM MD_ASP_THREADGATESLEEPDELAY}
+// MD_ASP_THREADGATESLEEPMAX = ASP_MD_SERVER_BASE + 33;
+// {$EXTERNALSYM MD_ASP_THREADGATESLEEPMAX}
+// MD_ASP_THREADGATELOADLOW = ASP_MD_SERVER_BASE + 34;
+// {$EXTERNALSYM MD_ASP_THREADGATELOADLOW}
+// MD_ASP_THREADGATELOADHIGH = ASP_MD_SERVER_BASE + 35;
+// {$EXTERNALSYM MD_ASP_THREADGATELOADHIGH}
+
+// added IIS5.1
+
+// persist template cache
+ MD_ASP_DISKTEMPLATECACHEDIRECTORY = ASP_MD_SERVER_BASE + 36;
+ {$EXTERNALSYM MD_ASP_DISKTEMPLATECACHEDIRECTORY}
+ MD_ASP_MAXDISKTEMPLATECACHEFILES = ASP_MD_SERVER_BASE + 40;
+ {$EXTERNALSYM MD_ASP_MAXDISKTEMPLATECACHEFILES}
+ MD_ASP_EXECUTEINMTA = ASP_MD_SERVER_BASE + 41;
+ {$EXTERNALSYM MD_ASP_EXECUTEINMTA}
+ MD_ASP_LCID = ASP_MD_SERVER_BASE + 42;
+ {$EXTERNALSYM MD_ASP_LCID}
+ MD_ASP_KEEPSESSIONIDSECURE = ASP_MD_SERVER_BASE + 43;
+ {$EXTERNALSYM MD_ASP_KEEPSESSIONIDSECURE}
+
+// added IIS6.0
+
+// Services without components integration
+ MD_ASP_SERVICE_FLAGS = ASP_MD_SERVER_BASE + 44;
+ {$EXTERNALSYM MD_ASP_SERVICE_FLAGS}
+ MD_ASP_SERVICE_FLAG_TRACKER = ASP_MD_SERVER_BASE + 45;
+ {$EXTERNALSYM MD_ASP_SERVICE_FLAG_TRACKER}
+ MD_ASP_SERVICE_FLAG_FUSION = ASP_MD_SERVER_BASE + 46;
+ {$EXTERNALSYM MD_ASP_SERVICE_FLAG_FUSION}
+ MD_ASP_SERVICE_FLAG_PARTITIONS = ASP_MD_SERVER_BASE + 47;
+ {$EXTERNALSYM MD_ASP_SERVICE_FLAG_PARTITIONS}
+ MD_ASP_SERVICE_PARTITION_ID = ASP_MD_SERVER_BASE + 48;
+ {$EXTERNALSYM MD_ASP_SERVICE_PARTITION_ID}
+ MD_ASP_SERVICE_SXS_NAME = ASP_MD_SERVER_BASE + 49;
+ {$EXTERNALSYM MD_ASP_SERVICE_SXS_NAME}
+
+// Valid flags for MD_ASP_SERVICE_FLAGS property
+
+ MD_ASP_SERVICE_ENABLE_TRACKER = 1;
+ {$EXTERNALSYM MD_ASP_SERVICE_ENABLE_TRACKER}
+ MD_ASP_SERVICE_ENABLE_SXS = 2;
+ {$EXTERNALSYM MD_ASP_SERVICE_ENABLE_SXS}
+ MD_ASP_SERVICE_USE_PARTITION = 4;
+ {$EXTERNALSYM MD_ASP_SERVICE_USE_PARTITION}
+
+// Line number calculation flag.
+
+ MD_ASP_CALCLINENUMBER = ASP_MD_SERVER_BASE + 50;
+ {$EXTERNALSYM MD_ASP_CALCLINENUMBER}
+
+ MD_ASP_RUN_ONEND_ANON = ASP_MD_SERVER_BASE + 51;
+ {$EXTERNALSYM MD_ASP_RUN_ONEND_ANON}
+
+ MD_ASP_BUFFER_LIMIT = ASP_MD_SERVER_BASE + 52;
+ {$EXTERNALSYM MD_ASP_BUFFER_LIMIT}
+
+ MD_ASP_MAX_REQUEST_ENTITY_ALLOWED = ASP_MD_SERVER_BASE + 53;
+ {$EXTERNALSYM MD_ASP_MAX_REQUEST_ENTITY_ALLOWED}
+
+ MD_ASP_ID_LAST = ASP_MD_SERVER_BASE + 53;
+ {$EXTERNALSYM MD_ASP_ID_LAST}
+
+//
+// Valid values for WAM
+//
+
+ WAM_MD_SERVER_BASE = 7500;
+ {$EXTERNALSYM WAM_MD_SERVER_BASE}
+
+ MD_WAM_USER_NAME = WAM_MD_SERVER_BASE + 1;
+ {$EXTERNALSYM MD_WAM_USER_NAME}
+ MD_WAM_PWD = WAM_MD_SERVER_BASE + 2;
+ {$EXTERNALSYM MD_WAM_PWD}
+
+// added IIS6
+
+//
+// Valid values for APP POOL
+//
+
+ IIS_MD_APPPOOL_BASE = 9000;
+ {$EXTERNALSYM IIS_MD_APPPOOL_BASE}
+
+ MD_APPPOOL_PERIODIC_RESTART_TIME = IIS_MD_APPPOOL_BASE + 1;
+ {$EXTERNALSYM MD_APPPOOL_PERIODIC_RESTART_TIME}
+ MD_APPPOOL_PERIODIC_RESTART_REQUEST_COUNT = IIS_MD_APPPOOL_BASE + 2;
+ {$EXTERNALSYM MD_APPPOOL_PERIODIC_RESTART_REQUEST_COUNT}
+ MD_APPPOOL_MAX_PROCESS_COUNT = IIS_MD_APPPOOL_BASE + 3;
+ {$EXTERNALSYM MD_APPPOOL_MAX_PROCESS_COUNT}
+ MD_APPPOOL_PINGING_ENABLED = IIS_MD_APPPOOL_BASE + 4;
+ {$EXTERNALSYM MD_APPPOOL_PINGING_ENABLED}
+ MD_APPPOOL_IDLE_TIMEOUT = IIS_MD_APPPOOL_BASE + 5;
+ {$EXTERNALSYM MD_APPPOOL_IDLE_TIMEOUT}
+ MD_APPPOOL_RAPID_FAIL_PROTECTION_ENABLED = IIS_MD_APPPOOL_BASE + 6;
+ {$EXTERNALSYM MD_APPPOOL_RAPID_FAIL_PROTECTION_ENABLED}
+ MD_APPPOOL_SMP_AFFINITIZED = IIS_MD_APPPOOL_BASE + 7;
+ {$EXTERNALSYM MD_APPPOOL_SMP_AFFINITIZED}
+ MD_APPPOOL_SMP_AFFINITIZED_PROCESSOR_MASK = IIS_MD_APPPOOL_BASE + 8;
+ {$EXTERNALSYM MD_APPPOOL_SMP_AFFINITIZED_PROCESSOR_MASK}
+ MD_APPPOOL_ORPHAN_PROCESSES_FOR_DEBUGGING = IIS_MD_APPPOOL_BASE + 9;
+ {$EXTERNALSYM MD_APPPOOL_ORPHAN_PROCESSES_FOR_DEBUGGING}
+
+ //MD_APPPOOL_RUN_AS_LOCALSYSTEM = IIS_MD_APPPOOL_BASE + 10;
+ //{$EXTERNALSYM MD_APPPOOL_RUN_AS_LOCALSYSTEM}
+ MD_APPPOOL_STARTUP_TIMELIMIT = IIS_MD_APPPOOL_BASE + 11;
+ {$EXTERNALSYM MD_APPPOOL_STARTUP_TIMELIMIT}
+ MD_APPPOOL_SHUTDOWN_TIMELIMIT = IIS_MD_APPPOOL_BASE + 12;
+ {$EXTERNALSYM MD_APPPOOL_SHUTDOWN_TIMELIMIT}
+ MD_APPPOOL_PING_INTERVAL = IIS_MD_APPPOOL_BASE + 13;
+ {$EXTERNALSYM MD_APPPOOL_PING_INTERVAL}
+ MD_APPPOOL_PING_RESPONSE_TIMELIMIT = IIS_MD_APPPOOL_BASE + 14;
+ {$EXTERNALSYM MD_APPPOOL_PING_RESPONSE_TIMELIMIT}
+ MD_APPPOOL_DISALLOW_OVERLAPPING_ROTATION = IIS_MD_APPPOOL_BASE + 15;
+ {$EXTERNALSYM MD_APPPOOL_DISALLOW_OVERLAPPING_ROTATION}
+ //MD_APPPOOL_ORPHAN_ACTION = IIS_MD_APPPOOL_BASE + 16;
+ //{$EXTERNALSYM MD_APPPOOL_ORPHAN_ACTION}
+ MD_APPPOOL_UL_APPPOOL_QUEUE_LENGTH = IIS_MD_APPPOOL_BASE + 17;
+ {$EXTERNALSYM MD_APPPOOL_UL_APPPOOL_QUEUE_LENGTH}
+ MD_APPPOOL_DISALLOW_ROTATION_ON_CONFIG_CHANGE = IIS_MD_APPPOOL_BASE + 18;
+ {$EXTERNALSYM MD_APPPOOL_DISALLOW_ROTATION_ON_CONFIG_CHANGE}
+ //MD_APPPOOL_FRIENDLY_NAME = IIS_MD_APPPOOL_BASE + 19;
+ //{$EXTERNALSYM MD_APPPOOL_FRIENDLY_NAME}
+ MD_APPPOOL_PERIODIC_RESTART_SCHEDULE = IIS_MD_APPPOOL_BASE + 20;
+ {$EXTERNALSYM MD_APPPOOL_PERIODIC_RESTART_SCHEDULE}
+ MD_APPPOOL_IDENTITY_TYPE = IIS_MD_APPPOOL_BASE + 21;
+ {$EXTERNALSYM MD_APPPOOL_IDENTITY_TYPE}
+ MD_CPU_ACTION = IIS_MD_APPPOOL_BASE + 22;
+ {$EXTERNALSYM MD_CPU_ACTION}
+ MD_CPU_LIMIT = IIS_MD_APPPOOL_BASE + 23;
+ {$EXTERNALSYM MD_CPU_LIMIT}
+ MD_APPPOOL_PERIODIC_RESTART_MEMORY = IIS_MD_APPPOOL_BASE + 24;
+ {$EXTERNALSYM MD_APPPOOL_PERIODIC_RESTART_MEMORY}
+ //MD_DISABLE_PUBLISHING = IIS_MD_APPPOOL_BASE + 25;
+ //{$EXTERNALSYM MD_DISABLE_PUBLISHING}
+ MD_APPPOOL_COMMAND = IIS_MD_APPPOOL_BASE + 26;
+ {$EXTERNALSYM MD_APPPOOL_COMMAND}
+ MD_APPPOOL_STATE = IIS_MD_APPPOOL_BASE + 27;
+ {$EXTERNALSYM MD_APPPOOL_STATE}
+ MD_APPPOOL_AUTO_START = IIS_MD_APPPOOL_BASE + 28;
+ {$EXTERNALSYM MD_APPPOOL_AUTO_START}
+ MD_RAPID_FAIL_PROTECTION_INTERVAL = IIS_MD_APPPOOL_BASE + 29;
+ {$EXTERNALSYM MD_RAPID_FAIL_PROTECTION_INTERVAL}
+ MD_RAPID_FAIL_PROTECTION_MAX_CRASHES = IIS_MD_APPPOOL_BASE + 30;
+ {$EXTERNALSYM MD_RAPID_FAIL_PROTECTION_MAX_CRASHES}
+ MD_APPPOOL_ORPHAN_ACTION_EXE = IIS_MD_APPPOOL_BASE + 31;
+ {$EXTERNALSYM MD_APPPOOL_ORPHAN_ACTION_EXE}
+ MD_APPPOOL_ORPHAN_ACTION_PARAMS = IIS_MD_APPPOOL_BASE + 32;
+ {$EXTERNALSYM MD_APPPOOL_ORPHAN_ACTION_PARAMS}
+
+//
+// Load balancer properties
+//
+
+ MD_LOAD_BALANCER_CAPABILITIES = IIS_MD_APPPOOL_BASE + 34;
+ {$EXTERNALSYM MD_LOAD_BALANCER_CAPABILITIES}
+
+//
+// Valid values for APP POOL
+//
+
+ MD_APPPOOL_AUTO_SHUTDOWN_EXE = IIS_MD_APPPOOL_BASE + 35;
+ {$EXTERNALSYM MD_APPPOOL_AUTO_SHUTDOWN_EXE}
+ MD_APPPOOL_AUTO_SHUTDOWN_PARAMS = IIS_MD_APPPOOL_BASE + 36;
+ {$EXTERNALSYM MD_APPPOOL_AUTO_SHUTDOWN_PARAMS}
+ MD_APP_POOL_LOG_EVENT_ON_RECYCLE = IIS_MD_APPPOOL_BASE + 37;
+ {$EXTERNALSYM MD_APP_POOL_LOG_EVENT_ON_RECYCLE}
+ MD_APPPOOL_PERIODIC_RESTART_PRIVATE_MEMORY = IIS_MD_APPPOOL_BASE + 38;
+ {$EXTERNALSYM MD_APPPOOL_PERIODIC_RESTART_PRIVATE_MEMORY}
+
+//
+// Valid values for MD_APP_POOL_LOG_EVENT_ON_RECYCLE
+//
+
+ MD_APP_POOL_RECYCLE_TIME = 1;
+ {$EXTERNALSYM MD_APP_POOL_RECYCLE_TIME}
+ MD_APP_POOL_RECYCLE_REQUESTS = 2;
+ {$EXTERNALSYM MD_APP_POOL_RECYCLE_REQUESTS}
+ MD_APP_POOL_RECYCLE_SCHEDULE = 4;
+ {$EXTERNALSYM MD_APP_POOL_RECYCLE_SCHEDULE}
+ MD_APP_POOL_RECYCLE_MEMORY = 8;
+ {$EXTERNALSYM MD_APP_POOL_RECYCLE_MEMORY}
+ MD_APP_POOL_RECYCLE_ISAPI_UNHEALTHY = 16;
+ {$EXTERNALSYM MD_APP_POOL_RECYCLE_ISAPI_UNHEALTHY}
+ MD_APP_POOL_RECYCLE_ON_DEMAND = 32;
+ {$EXTERNALSYM MD_APP_POOL_RECYCLE_ON_DEMAND}
+ MD_APP_POOL_RECYCLE_CONFIG_CHANGE = 64;
+ {$EXTERNALSYM MD_APP_POOL_RECYCLE_CONFIG_CHANGE}
+ MD_APP_POOL_RECYCLE_PRIVATE_MEMORY = 128;
+ {$EXTERNALSYM MD_APP_POOL_RECYCLE_PRIVATE_MEMORY}
+
+//
+// Valid values for MD_CPU_ACTION
+//
+
+ MD_CPU_NO_ACTION = 0;
+ {$EXTERNALSYM MD_CPU_NO_ACTION}
+ MD_CPU_KILL_W3WP = 1;
+ {$EXTERNALSYM MD_CPU_KILL_W3WP}
+ MD_CPU_TRACE = 2;
+ {$EXTERNALSYM MD_CPU_TRACE}
+ MD_CPU_THROTTLE = 3;
+ {$EXTERNALSYM MD_CPU_THROTTLE}
+
+//
+// Valid values for MD_APPPOOL_COMMAND
+//
+
+ MD_APPPOOL_COMMAND_START = 1;
+ {$EXTERNALSYM MD_APPPOOL_COMMAND_START}
+ MD_APPPOOL_COMMAND_STOP = 2;
+ {$EXTERNALSYM MD_APPPOOL_COMMAND_STOP}
+
+//
+// Valid values for MD_APPPOOL_STATE
+//
+
+ MD_APPPOOL_STATE_STARTING = 1;
+ {$EXTERNALSYM MD_APPPOOL_STATE_STARTING}
+ MD_APPPOOL_STATE_STARTED = 2;
+ {$EXTERNALSYM MD_APPPOOL_STATE_STARTED}
+ MD_APPPOOL_STATE_STOPPING = 3;
+ {$EXTERNALSYM MD_APPPOOL_STATE_STOPPING}
+ MD_APPPOOL_STATE_STOPPED = 4;
+ {$EXTERNALSYM MD_APPPOOL_STATE_STOPPED}
+
+//
+// Valid values for MD_APPPOOL_IDENTITY_TYPE
+//
+
+ MD_APPPOOL_IDENTITY_TYPE_LOCALSYSTEM = 0;
+ {$EXTERNALSYM MD_APPPOOL_IDENTITY_TYPE_LOCALSYSTEM}
+ MD_APPPOOL_IDENTITY_TYPE_LOCALSERVICE = 1;
+ {$EXTERNALSYM MD_APPPOOL_IDENTITY_TYPE_LOCALSERVICE}
+ MD_APPPOOL_IDENTITY_TYPE_NETWORKSERVICE = 2;
+ {$EXTERNALSYM MD_APPPOOL_IDENTITY_TYPE_NETWORKSERVICE}
+ MD_APPPOOL_IDENTITY_TYPE_SPECIFICUSER = 3;
+ {$EXTERNALSYM MD_APPPOOL_IDENTITY_TYPE_SPECIFICUSER}
+
+//
+// Valid values for MD_LOAD_BALANCER_CAPABILITIES
+//
+
+ MD_LOAD_BALANCER_CAPABILITIES_BASIC = 1;
+ {$EXTERNALSYM MD_LOAD_BALANCER_CAPABILITIES_BASIC}
+ MD_LOAD_BALANCER_CAPABILITIES_SOPHISTICATED = 2;
+ {$EXTERNALSYM MD_LOAD_BALANCER_CAPABILITIES_SOPHISTICATED}
+
+//
+// Valid values for MD_APPPOOL_STATE
+//
+
+ IIS_MD_APP_BASE = 9100;
+ {$EXTERNALSYM IIS_MD_APP_BASE}
+ MD_APP_APPPOOL_ID = IIS_MD_APP_BASE + 1;
+ {$EXTERNALSYM MD_APP_APPPOOL_ID}
+ MD_APP_ALLOW_TRANSIENT_REGISTRATION = IIS_MD_APP_BASE + 2;
+ {$EXTERNALSYM MD_APP_ALLOW_TRANSIENT_REGISTRATION}
+ MD_APP_AUTO_START = IIS_MD_APP_BASE + 3;
+ {$EXTERNALSYM MD_APP_AUTO_START}
+ MD_APPPOOL_PERIODIC_RESTART_CONNECTIONS = IIS_MD_APP_BASE + 4;
+ {$EXTERNALSYM MD_APPPOOL_PERIODIC_RESTART_CONNECTIONS}
+
+//
+// TODO: These are duplicate definitions. Remove them if no one is using it.
+//
+
+ MD_APPPOOL_APPPOOL_ID = IIS_MD_APP_BASE + 101;
+ {$EXTERNALSYM MD_APPPOOL_APPPOOL_ID}
+ MD_APPPOOL_ALLOW_TRANSIENT_REGISTRATION = IIS_MD_APP_BASE + 102;
+ {$EXTERNALSYM MD_APPPOOL_ALLOW_TRANSIENT_REGISTRATION}
+ // commented out so we can build
+ //MD_APPPOOL_AUTO_START = IIS_MD_APP_BASE + 103;
+
+ IIS_MD_GLOBAL_BASE = 9200;
+ {$EXTERNALSYM IIS_MD_GLOBAL_BASE}
+ MD_MAX_GLOBAL_BANDWIDTH = IIS_MD_GLOBAL_BASE + 1;
+ {$EXTERNALSYM MD_MAX_GLOBAL_BANDWIDTH}
+ MD_GLOBAL_STANDARD_APP_MODE_ENABLED = IIS_MD_GLOBAL_BASE + 3;
+ {$EXTERNALSYM MD_GLOBAL_STANDARD_APP_MODE_ENABLED}
+ MD_HEADER_WAIT_TIMEOUT = IIS_MD_GLOBAL_BASE + 4;
+ {$EXTERNALSYM MD_HEADER_WAIT_TIMEOUT}
+ MD_MIN_FILE_BYTES_PER_SEC = IIS_MD_GLOBAL_BASE + 5;
+ {$EXTERNALSYM MD_MIN_FILE_BYTES_PER_SEC}
+ MD_GLOBAL_LOG_IN_UTF_8 = IIS_MD_GLOBAL_BASE + 6;
+ {$EXTERNALSYM MD_GLOBAL_LOG_IN_UTF_8}
+ MD_DEMAND_START_THRESHOLD = IIS_MD_GLOBAL_BASE + 7;
+ {$EXTERNALSYM MD_DEMAND_START_THRESHOLD}
+
+ MD_GLOBAL_SESSIONKEY = 9999;
+ {$EXTERNALSYM MD_GLOBAL_SESSIONKEY}
+ MD_ROOT_ENABLE_EDIT_WHILE_RUNNING = 9998;
+ {$EXTERNALSYM MD_ROOT_ENABLE_EDIT_WHILE_RUNNING}
+ MD_GLOBAL_CHANGE_NUMBER = 9997;
+ {$EXTERNALSYM MD_GLOBAL_CHANGE_NUMBER}
+ MD_ROOT_ENABLE_HISTORY = 9996;
+ {$EXTERNALSYM MD_ROOT_ENABLE_HISTORY}
+ MD_ROOT_MAX_HISTORY_FILES = 9995;
+ {$EXTERNALSYM MD_ROOT_MAX_HISTORY_FILES}
+ MD_GLOBAL_EDIT_WHILE_RUNNING_MAJOR_VERSION_NUMBER = 9994;
+ {$EXTERNALSYM MD_GLOBAL_EDIT_WHILE_RUNNING_MAJOR_VERSION_NUMBER}
+ MD_GLOBAL_EDIT_WHILE_RUNNING_MINOR_VERSION_NUMBER = 9993;
+ {$EXTERNALSYM MD_GLOBAL_EDIT_WHILE_RUNNING_MINOR_VERSION_NUMBER}
+ MD_GLOBAL_XMLSCHEMATIMESTAMP = 9992;
+ {$EXTERNALSYM MD_GLOBAL_XMLSCHEMATIMESTAMP}
+ MD_GLOBAL_BINSCHEMATIMESTAMP = 9991;
+ {$EXTERNALSYM MD_GLOBAL_BINSCHEMATIMESTAMP}
+ MD_COMMENTS = 9990;
+ {$EXTERNALSYM MD_COMMENTS}
+ MD_LOCATION = 9989;
+ {$EXTERNALSYM MD_LOCATION}
+ MD_MAX_ERROR_FILES = 9988;
+ {$EXTERNALSYM MD_MAX_ERROR_FILES}
+
+//
+// Valid values for MD_AUTHORIZATION
+//
+
+ MD_AUTH_ANONYMOUS = $00000001;
+ {$EXTERNALSYM MD_AUTH_ANONYMOUS}
+ MD_AUTH_BASIC = $00000002;
+ {$EXTERNALSYM MD_AUTH_BASIC}
+ MD_AUTH_NT = $00000004; // Use NT auth provider (like NTLM)
+ {$EXTERNALSYM MD_AUTH_NT}
+ MD_AUTH_PASSPORT = $00000040;
+ {$EXTERNALSYM MD_AUTH_PASSPORT}
+
+//
+// Valid values for MD_AUTHORIZATION_PERSISTENCE
+//
+
+ MD_AUTH_SINGLEREQUEST = $00000040;
+ {$EXTERNALSYM MD_AUTH_SINGLEREQUEST}
+ MD_AUTH_SINGLEREQUESTIFPROXY = $00000080;
+ {$EXTERNALSYM MD_AUTH_SINGLEREQUESTIFPROXY}
+ MD_AUTH_SINGLEREQUESTALWAYSIFPROXY = $00000100;
+ {$EXTERNALSYM MD_AUTH_SINGLEREQUESTALWAYSIFPROXY}
+
+//
+// Valid values for MD_ACCESS_PERM
+//
+
+ MD_ACCESS_READ = $00000001; // Allow for Read
+ {$EXTERNALSYM MD_ACCESS_READ}
+ MD_ACCESS_WRITE = $00000002; // Allow for Write
+ {$EXTERNALSYM MD_ACCESS_WRITE}
+ MD_ACCESS_EXECUTE = $00000004; // Allow for Execute
+ {$EXTERNALSYM MD_ACCESS_EXECUTE}
+ MD_ACCESS_SOURCE = $00000010; // Apply access mask to source
+ {$EXTERNALSYM MD_ACCESS_SOURCE}
+ MD_ACCESS_SCRIPT = $00000200; // Allow for Script execution
+ {$EXTERNALSYM MD_ACCESS_SCRIPT}
+ MD_ACCESS_NO_REMOTE_WRITE = $00000400; // Local host access only
+ {$EXTERNALSYM MD_ACCESS_NO_REMOTE_WRITE}
+ MD_ACCESS_NO_REMOTE_READ = $00001000; // Local host access only
+ {$EXTERNALSYM MD_ACCESS_NO_REMOTE_READ}
+ MD_ACCESS_NO_REMOTE_EXECUTE = $00002000; // Local host access only
+ {$EXTERNALSYM MD_ACCESS_NO_REMOTE_EXECUTE}
+ MD_ACCESS_NO_REMOTE_SCRIPT = $00004000; // Local host access only
+ {$EXTERNALSYM MD_ACCESS_NO_REMOTE_SCRIPT}
+ MD_ACCESS_NO_PHYSICAL_DIR = $00008000; // VR maps to no physical path
+ {$EXTERNALSYM MD_ACCESS_NO_PHYSICAL_DIR}
+
+ MD_NONSSL_ACCESS_MASK = (MD_ACCESS_READ or MD_ACCESS_WRITE or MD_ACCESS_EXECUTE or
+ MD_ACCESS_SOURCE or MD_ACCESS_SCRIPT or MD_ACCESS_NO_REMOTE_READ or
+ MD_ACCESS_NO_REMOTE_WRITE or MD_ACCESS_NO_REMOTE_EXECUTE or MD_ACCESS_NO_REMOTE_SCRIPT or
+ MD_ACCESS_NO_PHYSICAL_DIR);
+ {$EXTERNALSYM MD_NONSSL_ACCESS_MASK}
+
+//
+// Valid values for MD_SSL_ACCESS_PERM
+//
+
+ MD_ACCESS_SSL = $00000008; // Require SSL
+ {$EXTERNALSYM MD_ACCESS_SSL}
+ MD_ACCESS_NEGO_CERT = $00000020; // Allow client SSL certs
+ {$EXTERNALSYM MD_ACCESS_NEGO_CERT}
+ MD_ACCESS_REQUIRE_CERT = $00000040; // Require client SSL certs
+ {$EXTERNALSYM MD_ACCESS_REQUIRE_CERT}
+ MD_ACCESS_MAP_CERT = $00000080; // Map SSL cert to NT account
+ {$EXTERNALSYM MD_ACCESS_MAP_CERT}
+ MD_ACCESS_SSL128 = $00000100; // Require 128 bit SSL
+ {$EXTERNALSYM MD_ACCESS_SSL128}
+
+ MD_SSL_ACCESS_MASK = MD_ACCESS_SSL or MD_ACCESS_NEGO_CERT or MD_ACCESS_REQUIRE_CERT or MD_ACCESS_MAP_CERT or MD_ACCESS_SSL128;
+ {$EXTERNALSYM MD_SSL_ACCESS_MASK}
+
+ MD_ACCESS_MASK = $0000ffff;
+ {$EXTERNALSYM MD_ACCESS_MASK}
+
+//
+// Valid values for MD_DIRECTORY_BROWSING
+//
+
+ MD_DIRBROW_SHOW_DATE = $00000002;
+ {$EXTERNALSYM MD_DIRBROW_SHOW_DATE}
+ MD_DIRBROW_SHOW_TIME = $00000004;
+ {$EXTERNALSYM MD_DIRBROW_SHOW_TIME}
+ MD_DIRBROW_SHOW_SIZE = $00000008;
+ {$EXTERNALSYM MD_DIRBROW_SHOW_SIZE}
+ MD_DIRBROW_SHOW_EXTENSION = $00000010;
+ {$EXTERNALSYM MD_DIRBROW_SHOW_EXTENSION}
+ MD_DIRBROW_LONG_DATE = $00000020;
+ {$EXTERNALSYM MD_DIRBROW_LONG_DATE}
+
+ MD_DIRBROW_ENABLED = DWORD($80000000); // Allow directory browsing
+ {$EXTERNALSYM MD_DIRBROW_ENABLED}
+ MD_DIRBROW_LOADDEFAULT = $40000000; // Load default doc if exists
+ {$EXTERNALSYM MD_DIRBROW_LOADDEFAULT}
+
+ MD_DIRBROW_MASK = (MD_DIRBROW_SHOW_DATE or MD_DIRBROW_SHOW_TIME or MD_DIRBROW_SHOW_SIZE or
+ MD_DIRBROW_SHOW_EXTENSION or MD_DIRBROW_LONG_DATE or MD_DIRBROW_LOADDEFAULT or MD_DIRBROW_ENABLED);
+ {$EXTERNALSYM MD_DIRBROW_MASK}
+
+//
+// Valid values for MD_LOGON_METHOD
+//
+
+ MD_LOGON_INTERACTIVE = 0;
+ {$EXTERNALSYM MD_LOGON_INTERACTIVE}
+ MD_LOGON_BATCH = 1;
+ {$EXTERNALSYM MD_LOGON_BATCH}
+ MD_LOGON_NETWORK = 2;
+ {$EXTERNALSYM MD_LOGON_NETWORK}
+ MD_LOGON_NETWORK_CLEARTEXT = 3;
+ {$EXTERNALSYM MD_LOGON_NETWORK_CLEARTEXT}
+
+//
+// Valid values for MD_PASSPORT_REQUIRE_AD_MAPPING
+//
+
+ MD_PASSPORT_NO_MAPPING = 0;
+ {$EXTERNALSYM MD_PASSPORT_NO_MAPPING}
+ MD_PASSPORT_TRY_MAPPING = 1;
+ {$EXTERNALSYM MD_PASSPORT_TRY_MAPPING}
+ MD_PASSPORT_NEED_MAPPING = 2;
+ {$EXTERNALSYM MD_PASSPORT_NEED_MAPPING}
+
+//
+// Valid values for MD_NOTIFY_EXAUTH
+//
+
+ MD_NOTIFEXAUTH_NTLMSSL = 1;
+ {$EXTERNALSYM MD_NOTIFEXAUTH_NTLMSSL}
+
+//
+// Valid values for MD_FILTER_STATE
+//
+
+ MD_FILTER_STATE_LOADED = 1;
+ {$EXTERNALSYM MD_FILTER_STATE_LOADED}
+ MD_FILTER_STATE_UNLOADED = 4;
+ {$EXTERNALSYM MD_FILTER_STATE_UNLOADED}
+
+//
+// Valid values for MD_SERVER_STATE
+//
+
+ MD_SERVER_STATE_STARTING = 1;
+ {$EXTERNALSYM MD_SERVER_STATE_STARTING}
+ MD_SERVER_STATE_STARTED = 2;
+ {$EXTERNALSYM MD_SERVER_STATE_STARTED}
+ MD_SERVER_STATE_STOPPING = 3;
+ {$EXTERNALSYM MD_SERVER_STATE_STOPPING}
+ MD_SERVER_STATE_STOPPED = 4;
+ {$EXTERNALSYM MD_SERVER_STATE_STOPPED}
+ MD_SERVER_STATE_PAUSING = 5;
+ {$EXTERNALSYM MD_SERVER_STATE_PAUSING}
+ MD_SERVER_STATE_PAUSED = 6;
+ {$EXTERNALSYM MD_SERVER_STATE_PAUSED}
+ MD_SERVER_STATE_CONTINUING = 7;
+ {$EXTERNALSYM MD_SERVER_STATE_CONTINUING}
+
+//
+// Valid values for MD_SERVER_COMMAND
+//
+
+ MD_SERVER_COMMAND_START = 1;
+ {$EXTERNALSYM MD_SERVER_COMMAND_START}
+ MD_SERVER_COMMAND_STOP = 2;
+ {$EXTERNALSYM MD_SERVER_COMMAND_STOP}
+ MD_SERVER_COMMAND_PAUSE = 3;
+ {$EXTERNALSYM MD_SERVER_COMMAND_PAUSE}
+ MD_SERVER_COMMAND_CONTINUE = 4;
+ {$EXTERNALSYM MD_SERVER_COMMAND_CONTINUE}
+
+//
+// Valid values for MD_SERVER_SIZE
+//
+
+ MD_SERVER_SIZE_SMALL = 0;
+ {$EXTERNALSYM MD_SERVER_SIZE_SMALL}
+ MD_SERVER_SIZE_MEDIUM = 1;
+ {$EXTERNALSYM MD_SERVER_SIZE_MEDIUM}
+ MD_SERVER_SIZE_LARGE = 2;
+ {$EXTERNALSYM MD_SERVER_SIZE_LARGE}
+
+//
+// Valid values for MD_SERVER_CONFIG_INFO
+//
+
+ MD_SERVER_CONFIG_SSL_40 = $00000001;
+ {$EXTERNALSYM MD_SERVER_CONFIG_SSL_40}
+ MD_SERVER_CONFIG_SSL_128 = $00000002;
+ {$EXTERNALSYM MD_SERVER_CONFIG_SSL_128}
+ MD_SERVER_CONFIG_ALLOW_ENCRYPT = $00000004;
+ {$EXTERNALSYM MD_SERVER_CONFIG_ALLOW_ENCRYPT}
+ MD_SERVER_CONFIG_AUTO_PW_SYNC = $00000008;
+ {$EXTERNALSYM MD_SERVER_CONFIG_AUTO_PW_SYNC}
+
+ // todo MD_SERVER_CONFIG_ENCRYPT unknown!
+ //MD_SERVER_CONFIGURATION_MASK = MD_SERVER_CONFIG_SSL_40 or MD_SERVER_CONFIG_SSL_128 or MD_SERVER_CONFIG_ENCRYPT or MD_SERVER_CONFIG_AUTO_PW_SYNC;
+ //{$EXTERNALSYM MD_SERVER_CONFIGURATION_MASK}
+
+//
+// Valid values for MD_SCRIPT_MAPS flag field
+//
+
+ MD_SCRIPTMAPFLAG_SCRIPT = $00000001;
+ {$EXTERNALSYM MD_SCRIPTMAPFLAG_SCRIPT}
+ MD_SCRIPTMAPFLAG_CHECK_PATH_INFO = $00000004;
+ {$EXTERNALSYM MD_SCRIPTMAPFLAG_CHECK_PATH_INFO}
+
+//
+// Bogus value - do not use
+//
+
+ MD_SCRIPTMAPFLAG_ALLOWED_ON_READ_DIR = $00000001;
+ {$EXTERNALSYM MD_SCRIPTMAPFLAG_ALLOWED_ON_READ_DIR}
+
+//
+// Valid values for MD_AUTH_CHANGE_ENABLE
+//
+
+ MD_AUTH_CHANGE_UNSECURE = $00000001;
+ {$EXTERNALSYM MD_AUTH_CHANGE_UNSECURE}
+ MD_AUTH_CHANGE_DISABLE = $00000002;
+ {$EXTERNALSYM MD_AUTH_CHANGE_DISABLE}
+ MD_AUTH_ADVNOTIFY_DISABLE = $00000004;
+ {$EXTERNALSYM MD_AUTH_ADVNOTIFY_DISABLE}
+
+//
+// Valide substatus errors for MD_CUSTOM_ERROR
+//
+
+ MD_ERROR_SUB401_LOGON = 1;
+ {$EXTERNALSYM MD_ERROR_SUB401_LOGON}
+ MD_ERROR_SUB401_LOGON_CONFIG = 2;
+ {$EXTERNALSYM MD_ERROR_SUB401_LOGON_CONFIG}
+ MD_ERROR_SUB401_LOGON_ACL = 3;
+ {$EXTERNALSYM MD_ERROR_SUB401_LOGON_ACL}
+ MD_ERROR_SUB401_FILTER = 4;
+ {$EXTERNALSYM MD_ERROR_SUB401_FILTER}
+ MD_ERROR_SUB401_APPLICATION = 5;
+ {$EXTERNALSYM MD_ERROR_SUB401_APPLICATION}
+ MD_ERROR_SUB401_URLAUTH_POLICY = 7;
+ {$EXTERNALSYM MD_ERROR_SUB401_URLAUTH_POLICY}
+
+ MD_ERROR_SUB403_EXECUTE_ACCESS_DENIED = 1;
+ {$EXTERNALSYM MD_ERROR_SUB403_EXECUTE_ACCESS_DENIED}
+ MD_ERROR_SUB403_READ_ACCESS_DENIED = 2;
+ {$EXTERNALSYM MD_ERROR_SUB403_READ_ACCESS_DENIED}
+ MD_ERROR_SUB403_WRITE_ACCESS_DENIED = 3;
+ {$EXTERNALSYM MD_ERROR_SUB403_WRITE_ACCESS_DENIED}
+ MD_ERROR_SUB403_SSL_REQUIRED = 4;
+ {$EXTERNALSYM MD_ERROR_SUB403_SSL_REQUIRED}
+ MD_ERROR_SUB403_SSL128_REQUIRED = 5;
+ {$EXTERNALSYM MD_ERROR_SUB403_SSL128_REQUIRED}
+ MD_ERROR_SUB403_ADDR_REJECT = 6;
+ {$EXTERNALSYM MD_ERROR_SUB403_ADDR_REJECT}
+ MD_ERROR_SUB403_CERT_REQUIRED = 7;
+ {$EXTERNALSYM MD_ERROR_SUB403_CERT_REQUIRED}
+ MD_ERROR_SUB403_SITE_ACCESS_DENIED = 8;
+ {$EXTERNALSYM MD_ERROR_SUB403_SITE_ACCESS_DENIED}
+ MD_ERROR_SUB403_TOO_MANY_USERS = 9;
+ {$EXTERNALSYM MD_ERROR_SUB403_TOO_MANY_USERS}
+ MD_ERROR_SUB403_INVALID_CNFG = 10;
+ {$EXTERNALSYM MD_ERROR_SUB403_INVALID_CNFG}
+ MD_ERROR_SUB403_PWD_CHANGE = 11;
+ {$EXTERNALSYM MD_ERROR_SUB403_PWD_CHANGE}
+ MD_ERROR_SUB403_MAPPER_DENY_ACCESS = 12;
+ {$EXTERNALSYM MD_ERROR_SUB403_MAPPER_DENY_ACCESS}
+ MD_ERROR_SUB403_CERT_REVOKED = 13;
+ {$EXTERNALSYM MD_ERROR_SUB403_CERT_REVOKED}
+ MD_ERROR_SUB403_DIR_LIST_DENIED = 14;
+ {$EXTERNALSYM MD_ERROR_SUB403_DIR_LIST_DENIED}
+ MD_ERROR_SUB403_CAL_EXCEEDED = 15;
+ {$EXTERNALSYM MD_ERROR_SUB403_CAL_EXCEEDED}
+ MD_ERROR_SUB403_CERT_BAD = 16;
+ {$EXTERNALSYM MD_ERROR_SUB403_CERT_BAD}
+ MD_ERROR_SUB403_CERT_TIME_INVALID = 17;
+ {$EXTERNALSYM MD_ERROR_SUB403_CERT_TIME_INVALID}
+ MD_ERROR_SUB403_APPPOOL_DENIED = 18;
+ {$EXTERNALSYM MD_ERROR_SUB403_APPPOOL_DENIED}
+ MD_ERROR_SUB403_INSUFFICIENT_PRIVILEGE_FOR_CGI = 19;
+ {$EXTERNALSYM MD_ERROR_SUB403_INSUFFICIENT_PRIVILEGE_FOR_CGI}
+ MD_ERROR_SUB403_PASSPORT_LOGIN_FAILURE = 20;
+ {$EXTERNALSYM MD_ERROR_SUB403_PASSPORT_LOGIN_FAILURE}
+
+ MD_ERROR_SUB404_SITE_NOT_FOUND = 1;
+ {$EXTERNALSYM MD_ERROR_SUB404_SITE_NOT_FOUND}
+ MD_ERROR_SUB404_DENIED_BY_POLICY = 2;
+ {$EXTERNALSYM MD_ERROR_SUB404_DENIED_BY_POLICY}
+ MD_ERROR_SUB404_DENIED_BY_MIMEMAP = 3;
+ {$EXTERNALSYM MD_ERROR_SUB404_DENIED_BY_MIMEMAP}
+
+ MD_ERROR_SUB500_UNC_ACCESS = 16;
+ {$EXTERNALSYM MD_ERROR_SUB500_UNC_ACCESS}
+ MD_ERROR_SUB500_URLAUTH_NO_STORE = 17;
+ {$EXTERNALSYM MD_ERROR_SUB500_URLAUTH_NO_STORE}
+ MD_ERROR_SUB500_URLAUTH_STORE_ERROR = 18;
+ {$EXTERNALSYM MD_ERROR_SUB500_URLAUTH_STORE_ERROR}
+ MD_ERROR_SUB500_BAD_METADATA = 19;
+ {$EXTERNALSYM MD_ERROR_SUB500_BAD_METADATA}
+ MD_ERROR_SUB500_URLAUTH_NO_SCOPE = 20;
+ {$EXTERNALSYM MD_ERROR_SUB500_URLAUTH_NO_SCOPE}
+
+ MD_ERROR_SUB502_TIMEOUT = 1;
+ {$EXTERNALSYM MD_ERROR_SUB502_TIMEOUT}
+ MD_ERROR_SUB502_PREMATURE_EXIT = 2;
+ {$EXTERNALSYM MD_ERROR_SUB502_PREMATURE_EXIT}
+
+ MD_ERROR_SUB503_CPU_LIMIT = 1;
+ {$EXTERNALSYM MD_ERROR_SUB503_CPU_LIMIT}
+
+//
+// Valid access rights for ACE entries in MD_ADMIN_ACL
+//
+
+ MD_ACR_READ = $00000001;
+ {$EXTERNALSYM MD_ACR_READ}
+ MD_ACR_WRITE = $00000002;
+ {$EXTERNALSYM MD_ACR_WRITE}
+ MD_ACR_RESTRICTED_WRITE = $00000020;
+ {$EXTERNALSYM MD_ACR_RESTRICTED_WRITE}
+ MD_ACR_UNSECURE_PROPS_READ = $00000080;
+ {$EXTERNALSYM MD_ACR_UNSECURE_PROPS_READ}
+ MD_ACR_ENUM_KEYS = $00000008;
+ {$EXTERNALSYM MD_ACR_ENUM_KEYS}
+ MD_ACR_WRITE_DAC = $00040000;
+ {$EXTERNALSYM MD_ACR_WRITE_DAC}
+
+//
+// Valid modes for MD_USER_ISOLATION
+//
+
+ MD_USER_ISOLATION_NONE = 0;
+ {$EXTERNALSYM MD_USER_ISOLATION_NONE}
+ MD_USER_ISOLATION_BASIC = 1;
+ {$EXTERNALSYM MD_USER_ISOLATION_BASIC}
+ MD_USER_ISOLATION_AD = 2;
+ {$EXTERNALSYM MD_USER_ISOLATION_AD}
+ MD_USER_ISOLATION_LAST = 2;
+ {$EXTERNALSYM MD_USER_ISOLATION_LAST}
+
+//
+// MD_IP_SEC binary format description
+//
+
+(*
+
+ This object is composed of 4 lists : 2 lists ( deny & grant ) of network addresses,
+ the only allowed family is AF_INET.
+ Each of this list is composed of sublists, one for each ( network address family,
+ significant subnet mask ) combination. The significant subnet mask is stored as
+ ( number of bytes all 1 ( 0xff ), bitmask in last byte ).
+ This is followed by 2 lists ( deny & grant ) of DNS names. Each of these lists is
+ composed of sublists, based on then number of components in the DNS name
+ e.g. "microsoft.com" has 2 components, "www.msft.com" has 3.
+
+Header:
+ SELFREFINDEX iDenyAddr; // address deny list
+ // points to ADDRESS_HEADER
+ SELFREFINDEX iGrantAddr; // address grant list
+ // points to ADDRESS_HEADER
+ SELFREFINDEX iDenyName; // DNS name deny list
+ // points to NAME_HEADER
+ SELFREFINDEX iGrantName; // DNS name grant list
+ // points to NAME_HEADER
+ DWORD dwFlags;
+ DWORD cRefSize; // size of reference area ( in bytes )
+
+ADDRESS_HEADER :
+ DWORD cEntries; // # of Entries[]
+ DWORD cAddresses; // total # of addresses in all
+ // ADDRESS_LIST_ENTRY
+ ADDRESS_LIST_ENTRY Entries[];
+
+ADDRESS_LIST_ENTRY :
+ DWORD iFamily;
+ DWORD cAddresses;
+ DWORD cFullBytes;
+ DWORD LastByte;
+ SELFREFINDEX iFirstAddress; // points to array of addresses
+
+NAME_HEADER :
+ DWORD cEntries;
+ DWORD cNames; // total # of names for all Entries[]
+ NAME_LIST_ENTRY Entries[];
+
+Name list entry :
+ DWORD cComponents; // # of DNS components
+ DWORD cNames;
+ SELFREFINDEX iName[]; // array of references to DNS names
+
+This is followed by address arrays & names pointed to by iFirstAddress & iName
+Names are '\0' delimited
+
+SELFREFINDEX is a DWORD offset from start of structure with high bit set to 1
+
+*)
+
+//
+// Macros
+//
+
+{TODO structure declaration is in generated file
+procedure MD_SET_DATA_RECORD(_pMDR, _id, _attr, _utype, _dtype, _dlen, _pData);
+}
+
+//
+// IIS ADSI Admin Object class names
+//
+
+ IIS_CLASS_COMPUTER = 'IIsComputer';
+ {$EXTERNALSYM IIS_CLASS_COMPUTER}
+ IIS_CLASS_WEB_SERVICE = 'IIsWebService';
+ {$EXTERNALSYM IIS_CLASS_WEB_SERVICE}
+ IIS_CLASS_WEB_SERVER = 'IIsWebServer';
+ {$EXTERNALSYM IIS_CLASS_WEB_SERVER}
+ IIS_CLASS_WEB_INFO = 'IIsWebInfo';
+ {$EXTERNALSYM IIS_CLASS_WEB_INFO}
+ IIS_CLASS_WEB_DIR = 'IIsWebDirectory';
+ {$EXTERNALSYM IIS_CLASS_WEB_DIR}
+ IIS_CLASS_WEB_VDIR = 'IIsWebVirtualDir';
+ {$EXTERNALSYM IIS_CLASS_WEB_VDIR}
+ IIS_CLASS_WEB_FILE = 'IIsWebFile';
+ {$EXTERNALSYM IIS_CLASS_WEB_FILE}
+ IIS_CLASS_FTP_SERVICE = 'IIsFtpService';
+ {$EXTERNALSYM IIS_CLASS_FTP_SERVICE}
+ IIS_CLASS_FTP_SERVER = 'IIsFtpServer';
+ {$EXTERNALSYM IIS_CLASS_FTP_SERVER}
+ IIS_CLASS_FTP_INFO = 'IIsFtpInfo';
+ {$EXTERNALSYM IIS_CLASS_FTP_INFO}
+ IIS_CLASS_FTP_VDIR = 'IIsFtpVirtualDir';
+ {$EXTERNALSYM IIS_CLASS_FTP_VDIR}
+ IIS_CLASS_FILTERS = 'IIsFilters';
+ {$EXTERNALSYM IIS_CLASS_FILTERS}
+ IIS_CLASS_FILTER = 'IIsFilter';
+ {$EXTERNALSYM IIS_CLASS_FILTER}
+ IIS_CLASS_LOG_MODULES = 'IIsLogModules';
+ {$EXTERNALSYM IIS_CLASS_LOG_MODULES}
+ IIS_CLASS_LOG_MODULE = 'IIsLogModule';
+ {$EXTERNALSYM IIS_CLASS_LOG_MODULE}
+ IIS_CLASS_MIMEMAP = 'IIsMimeMap';
+ {$EXTERNALSYM IIS_CLASS_MIMEMAP}
+ IIS_CLASS_CERTMAPPER = 'IIsCertMapper';
+ {$EXTERNALSYM IIS_CLASS_CERTMAPPER}
+ IIS_CLASS_COMPRESS_SCHEMES = 'IIsCompressionSchemes';
+ {$EXTERNALSYM IIS_CLASS_COMPRESS_SCHEMES}
+ IIS_CLASS_COMPRESS_SCHEME = 'IIsCompressionScheme';
+ {$EXTERNALSYM IIS_CLASS_COMPRESS_SCHEME}
+
+ IIS_CLASS_COMPUTER_W = WideString('IIsComputer');
+ {$EXTERNALSYM IIS_CLASS_COMPUTER_W}
+ IIS_CLASS_WEB_SERVICE_W = WideString('IIsWebService');
+ {$EXTERNALSYM IIS_CLASS_WEB_SERVICE_W}
+ IIS_CLASS_WEB_SERVER_W = WideString('IIsWebServer');
+ {$EXTERNALSYM IIS_CLASS_WEB_SERVER_W}
+ IIS_CLASS_WEB_INFO_W = WideString('IIsWebInfo');
+ {$EXTERNALSYM IIS_CLASS_WEB_INFO_W}
+ IIS_CLASS_WEB_DIR_W = WideString('IIsWebDirectory');
+ {$EXTERNALSYM IIS_CLASS_WEB_DIR_W}
+ IIS_CLASS_WEB_VDIR_W = WideString('IIsWebVirtualDir');
+ {$EXTERNALSYM IIS_CLASS_WEB_VDIR_W}
+ IIS_CLASS_WEB_FILE_W = WideString('IIsWebFile');
+ {$EXTERNALSYM IIS_CLASS_WEB_FILE_W}
+ IIS_CLASS_FTP_SERVICE_W = WideString('IIsFtpService');
+ {$EXTERNALSYM IIS_CLASS_FTP_SERVICE_W}
+ IIS_CLASS_FTP_SERVER_W = WideString('IIsFtpServer');
+ {$EXTERNALSYM IIS_CLASS_FTP_SERVER_W}
+ IIS_CLASS_FTP_INFO_W = WideString('IIsFtpInfo');
+ {$EXTERNALSYM IIS_CLASS_FTP_INFO_W}
+ IIS_CLASS_FTP_VDIR_W = WideString('IIsFtpVirtualDir');
+ {$EXTERNALSYM IIS_CLASS_FTP_VDIR_W}
+ IIS_CLASS_FILTERS_W = WideString('IIsFilters');
+ {$EXTERNALSYM IIS_CLASS_FILTERS_W}
+ IIS_CLASS_FILTER_W = WideString('IIsFilter');
+ {$EXTERNALSYM IIS_CLASS_FILTER_W}
+ IIS_CLASS_LOG_MODULES_W = WideString('IIsLogModules');
+ {$EXTERNALSYM IIS_CLASS_LOG_MODULES_W}
+ IIS_CLASS_LOG_MODULE_W = WideString('IIsLogModule');
+ {$EXTERNALSYM IIS_CLASS_LOG_MODULE_W}
+ IIS_CLASS_MIMEMAP_W = WideString('IIsMimeMap');
+ {$EXTERNALSYM IIS_CLASS_MIMEMAP_W}
+ IIS_CLASS_CERTMAPPER_W = WideString('IIsCertMapper');
+ {$EXTERNALSYM IIS_CLASS_CERTMAPPER_W}
+ IIS_CLASS_COMPRESS_SCHEMES_W = WideString('IIsCompressionSchemes');
+ {$EXTERNALSYM IIS_CLASS_COMPRESS_SCHEMES_W}
+ IIS_CLASS_COMPRESS_SCHEME_W = WideString('IIsCompressionScheme');
+ {$EXTERNALSYM IIS_CLASS_COMPRESS_SCHEME_W}
+
+implementation
+
+{TODO structure declaration is in generated file
+procedure MD_SET_DATA_RECORD(_pMDR: Pointer; _id, _attr, _utype, _dtype, _dlen: DWORD; _pData: Pointer);
+begin
+ _pMDR^.dwMDIdentifier := _id;
+ _pMDR^.dwMDAttributes := _attr;
+ _pMDR^.dwMDUserType := _utype;
+ _pMDR^.dwMDDataType := _dtype;
+ _pMDR^.dwMDDataLen := _dlen;
+ _pMDR^.pbMDData := LPBYTE(_pData);
+end;
+}
+
+end.
+
diff --git a/packages/extra/winunits/jwaimagehlp.pas b/packages/extra/winunits/jwaimagehlp.pas
index d726a14f27..d3bccc4886 100644
--- a/packages/extra/winunits/jwaimagehlp.pas
+++ b/packages/extra/winunits/jwaimagehlp.pas
@@ -1,4402 +1,4402 @@
-{******************************************************************************}
-{ }
-{ Image Help API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: imagehlp.h, released August 2001. The original Pascal }
-{ code is: ImageHelp.pas, released December 2000. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwaimagehlp.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaImageHlp;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "ImageHlp.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- Windows, JwaWinBase, JwaWinNT, JwaWinType;
-
-const
- IMAGE_SEPARATION = 64*1024;
- {$EXTERNALSYM IMAGE_SEPARATION}
-
-type
- PLOADED_IMAGE = ^LOADED_IMAGE;
- {$EXTERNALSYM PLOADED_IMAGE}
- _LOADED_IMAGE = record
- ModuleName: PSTR;
- hFile: HANDLE;
- MappedAddress: PUCHAR;
- FileHeader: PIMAGE_NT_HEADERS32;
- LastRvaSection: PIMAGE_SECTION_HEADER;
- NumberOfSections: ULONG;
- Sections: PIMAGE_SECTION_HEADER;
- Characteristics: ULONG;
- fSystemImage: ByteBool;
- fDOSImage: ByteBool;
- Links: LIST_ENTRY;
- SizeOfImage: ULONG;
- end;
- {$EXTERNALSYM _LOADED_IMAGE}
- LOADED_IMAGE = _LOADED_IMAGE;
- {$EXTERNALSYM LOADED_IMAGE}
- TLoadedImage = LOADED_IMAGE;
- PLoadedImage = PLOADED_IMAGE;
-
-const
- MAX_SYM_NAME = 2000;
- {$EXTERNALSYM MAX_SYM_NAME}
-
-function BindImage(ImageName, DllPath, SymbolPath: PSTR): BOOL; stdcall;
-{$EXTERNALSYM BindImage}
-
-type
- _IMAGEHLP_STATUS_REASON = (
- BindOutOfMemory,
- BindRvaToVaFailed,
- BindNoRoomInImage,
- BindImportModuleFailed,
- BindImportProcedureFailed,
- BindImportModule,
- BindImportProcedure,
- BindForwarder,
- BindForwarderNOT,
- BindImageModified,
- BindExpandFileHeaders,
- BindImageComplete,
- BindMismatchedSymbols,
- BindSymbolsNotUpdated,
- BindImportProcedure32,
- BindImportProcedure64,
- BindForwarder32,
- BindForwarder64,
- BindForwarderNOT32,
- BindForwarderNOT64);
- {$EXTERNALSYM _IMAGEHLP_STATUS_REASON}
- IMAGEHLP_STATUS_REASON = _IMAGEHLP_STATUS_REASON;
- {$EXTERNALSYM IMAGEHLP_STATUS_REASON}
- TImageHlpStatusReason = IMAGEHLP_STATUS_REASON;
-
- PIMAGEHLP_STATUS_ROUTINE = function(Reason: IMAGEHLP_STATUS_REASON;
- ImageName, DllName: PSTR; Va, Parameter: ULONG_PTR): BOOL; stdcall;
- {$EXTERNALSYM PIMAGEHLP_STATUS_ROUTINE}
- PImageHlpStatusRoutine = PIMAGEHLP_STATUS_ROUTINE;
-
- PIMAGEHLP_STATUS_ROUTINE32 = function(Reason: IMAGEHLP_STATUS_REASON; ImageName, DllName: PSTR;
- Va: ULONG; Parameter: ULONG_PTR): BOOL; stdcall;
- {$EXTERNALSYM PIMAGEHLP_STATUS_ROUTINE32}
- PImageHlpStatusRoutine23 = PIMAGEHLP_STATUS_ROUTINE32;
-
- PIMAGEHLP_STATUS_ROUTINE64 = function(Reason: IMAGEHLP_STATUS_REASON; ImageName, DllName: PSTR;
- Va: ULONG64; Parameter: ULONG_PTR): BOOL; stdcall;
- {$EXTERNALSYM PIMAGEHLP_STATUS_ROUTINE64}
- PImageHlpStatusRoutine64 = PIMAGEHLP_STATUS_ROUTINE64;
-
-function BindImageEx(Flags: DWORD; ImageName, DllPath, SymbolPath: PSTR;
- StatusRoutine: PIMAGEHLP_STATUS_ROUTINE): BOOL; stdcall;
-{$EXTERNALSYM BindImageEx}
-
-const
- BIND_NO_BOUND_IMPORTS = $00000001;
- {$EXTERNALSYM BIND_NO_BOUND_IMPORTS}
- BIND_NO_UPDATE = $00000002;
- {$EXTERNALSYM BIND_NO_UPDATE}
- BIND_ALL_IMAGES = $00000004;
- {$EXTERNALSYM BIND_ALL_IMAGES}
- BIND_CACHE_IMPORT_DLLS = $00000008; // Cache dll's across calls to BindImageEx (same as NT 3.1->NT 4.0)
- {$EXTERNALSYM BIND_CACHE_IMPORT_DLLS}
-
- BIND_REPORT_64BIT_VA = $00000010;
- {$EXTERNALSYM BIND_REPORT_64BIT_VA}
-
-function ReBaseImage(CurrentImageName: PSTR; SymbolPath: PSTR; fReBase: BOOL;
- fRebaseSysfileOk: BOOL; fGoingDown: BOOL; CheckImageSize: ULONG;
- var OldImageSize: ULONG; var OldImageBase: ULONG_PTR; var NewImageSize: ULONG;
- var NewImageBase: ULONG_PTR; TimeStamp: ULONG): BOOL; stdcall;
-{$EXTERNALSYM ReBaseImage}
-
-function ReBaseImage64(CurrentImageName: PSTR; SymbolPath: PSTR; fReBase: BOOL;
- fRebaseSysfileOk: BOOL; fGoingDown: BOOL; CheckImageSize: ULONG;
- var OldImageSize: ULONG; var OldImageBase: ULONG64; var NewImageSize: ULONG;
- var NewImageBase: ULONG64; TimeStamp: ULONG): BOOL; stdcall;
-{$EXTERNALSYM ReBaseImage64}
-
-//
-// Define checksum return codes.
-//
-
-const
- CHECKSUM_SUCCESS = 0;
- {$EXTERNALSYM CHECKSUM_SUCCESS}
- CHECKSUM_OPEN_FAILURE = 1;
- {$EXTERNALSYM CHECKSUM_OPEN_FAILURE}
- CHECKSUM_MAP_FAILURE = 2;
- {$EXTERNALSYM CHECKSUM_MAP_FAILURE}
- CHECKSUM_MAPVIEW_FAILURE = 3;
- {$EXTERNALSYM CHECKSUM_MAPVIEW_FAILURE}
- CHECKSUM_UNICODE_FAILURE = 4;
- {$EXTERNALSYM CHECKSUM_UNICODE_FAILURE}
-
-// Define Splitsym flags.
-
- SPLITSYM_REMOVE_PRIVATE = $00000001; // Remove CV types/symbols and Fixup debug
- {$EXTERNALSYM SPLITSYM_REMOVE_PRIVATE}
- // Used for creating .dbg files that ship
- // as part of the product.
-
- SPLITSYM_EXTRACT_ALL = $00000002; // Extract all debug info from image.
- {$EXTERNALSYM SPLITSYM_EXTRACT_ALL}
- // Normally, FPO is left in the image
- // to allow stack traces through the code.
- // Using this switch is similar to linking
- // with -debug:none except the .dbg file
- // exists...
-
- SPLITSYM_SYMBOLPATH_IS_SRC = $00000004; // The SymbolFilePath contains an alternate
- {$EXTERNALSYM SPLITSYM_SYMBOLPATH_IS_SRC}
- // path to locate the pdb.
-
-//
-// Define checksum function prototypes.
-//
-
-function CheckSumMappedFile(BaseAddress: PVOID; FileLength: DWORD;
- var HeaderSum, CheckSum: DWORD): PIMAGE_NT_HEADERS; stdcall;
-{$EXTERNALSYM CheckSumMappedFile}
-
-function MapFileAndCheckSumA(Filename: PSTR; var HeaderSum, CheckSum: DWORD): DWORD; stdcall;
-{$EXTERNALSYM MapFileAndCheckSumA}
-function MapFileAndCheckSumW(Filename: PWSTR; var HeaderSum, CheckSum: DWORD): DWORD; stdcall;
-{$EXTERNALSYM MapFileAndCheckSumW}
-function MapFileAndCheckSum(Filename: PTSTR; var HeaderSum, CheckSum: DWORD): DWORD; stdcall;
-{$EXTERNALSYM MapFileAndCheckSum}
-
-function GetImageConfigInformation(const LoadedImage: LOADED_IMAGE;
- var ImageConfigInformation: IMAGE_LOAD_CONFIG_DIRECTORY): BOOL; stdcall;
-{$EXTERNALSYM GetImageConfigInformation}
-
-function GetImageUnusedHeaderBytes(const LoadedImage: LOADED_IMAGE;
- var SizeUnusedHeaderBytes: DWORD): DWORD; stdcall;
-{$EXTERNALSYM GetImageUnusedHeaderBytes}
-
-function SetImageConfigInformation(const LoadedImage: LOADED_IMAGE;
- const ImageConfigInformation: IMAGE_LOAD_CONFIG_DIRECTORY): BOOL; stdcall;
-{$EXTERNALSYM SetImageConfigInformation}
-
-// Image Integrity API's
-
-const
- CERT_PE_IMAGE_DIGEST_DEBUG_INFO = $01;
- {$EXTERNALSYM CERT_PE_IMAGE_DIGEST_DEBUG_INFO}
- CERT_PE_IMAGE_DIGEST_RESOURCES = $02;
- {$EXTERNALSYM CERT_PE_IMAGE_DIGEST_RESOURCES}
- CERT_PE_IMAGE_DIGEST_ALL_IMPORT_INFO = $04;
- {$EXTERNALSYM CERT_PE_IMAGE_DIGEST_ALL_IMPORT_INFO}
- CERT_PE_IMAGE_DIGEST_NON_PE_INFO = $08; // include data outside the PE image
- {$EXTERNALSYM CERT_PE_IMAGE_DIGEST_NON_PE_INFO}
-
- CERT_SECTION_TYPE_ANY = $FF; // Any Certificate type
- {$EXTERNALSYM CERT_SECTION_TYPE_ANY}
-
-type
- DIGEST_HANDLE = PVOID;
- {$EXTERNALSYM DIGEST_HANDLE}
- TDigestHandle = DIGEST_HANDLE;
-
- DIGEST_FUNCTION = function(refdata: DIGEST_HANDLE; pData: PBYTE; dwLength: DWORD): BOOL; stdcall;
- {$EXTERNALSYM DIGEST_FUNCTION}
- TDigestFunction = DIGEST_FUNCTION;
-
-function ImageGetDigestStream(FileHandle: HANDLE; DigestLevel: DWORD;
- DigestFunction: DIGEST_FUNCTION; DigestHandle: DIGEST_HANDLE): BOOL; stdcall;
-{$EXTERNALSYM ImageGetDigestStream}
-
-function ImageAddCertificate(FileHandle: HANDLE; Certificate: PWinCertificate;
- var Index: DWORD): BOOL; stdcall;
-{$EXTERNALSYM ImageAddCertificate}
-
-function ImageRemoveCertificate(FileHandle: HANDLE; Index: DWORD): BOOL; stdcall;
-{$EXTERNALSYM ImageRemoveCertificate}
-
-function ImageEnumerateCertificates(FileHandle: HANDLE; TypeFilter: WORD;
- var CertificateCount: DWORD; Indices: PDWORD; IndexCount: DWORD): BOOL; stdcall;
-{$EXTERNALSYM ImageEnumerateCertificates}
-
-function ImageGetCertificateData(FileHandle: HANDLE; CertificateIndex: DWORD;
- Certificate: PWinCertificate; var RequiredLength: DWORD): BOOL; stdcall;
-{$EXTERNALSYM ImageGetCertificateData}
-
-function ImageGetCertificateHeader(FileHandle: HANDLE; CertificateIndex: DWORD;
- Certificateheader: PWinCertificate): BOOL; stdcall;
-{$EXTERNALSYM ImageGetCertificateHeader}
-
-function ImageLoad(DllName: PSTR; DllPath: PSTR): PLOADED_IMAGE; stdcall;
-{$EXTERNALSYM ImageLoad}
-
-function ImageUnload(const LoadedImage: LOADED_IMAGE): BOOL; stdcall;
-{$EXTERNALSYM ImageUnload}
-
-function MapAndLoad(ImageName, DllPath: PSTR; var LoadedImage: LOADED_IMAGE;
- DotDll: BOOL; ReadOnly: BOOL): BOOL; stdcall;
-{$EXTERNALSYM MapAndLoad}
-
-function UnMapAndLoad(const LoadedImage: LOADED_IMAGE): BOOL; stdcall;
-{$EXTERNALSYM UnMapAndLoad}
-
-function TouchFileTimes(FileHandle: HANDLE; pSystemTime: PSYSTEMTIME): BOOL; stdcall;
-{$EXTERNALSYM TouchFileTimes}
-
-function SplitSymbols(ImageName, SymbolsPath, SymbolFilePath: PSTR; Flags: DWORD): BOOL; stdcall;
-{$EXTERNALSYM SplitSymbols}
-
-function UpdateDebugInfoFile(ImageFileName, SymbolPath, DebugFilePath: PSTR;
- const NtHeaders: IMAGE_NT_HEADERS32): BOOL; stdcall;
-{$EXTERNALSYM UpdateDebugInfoFile}
-
-function UpdateDebugInfoFileEx(ImageFileName, SymbolPath, DebugFilePath: PSTR;
- const NtHeaders: IMAGE_NT_HEADERS32; OldChecksum: DWORD): BOOL; stdcall;
-{$EXTERNALSYM UpdateDebugInfoFileEx}
-
-function FindDebugInfoFile(FileName, SymbolPath, DebugFilePath: PSTR): HANDLE; stdcall;
-{$EXTERNALSYM FindDebugInfoFile}
-
-type
- PFIND_DEBUG_FILE_CALLBACK = function(FileHandle: HANDLE; FileName: PSTR;
- CallerData: PVOID): BOOL; stdcall;
- {$EXTERNALSYM PFIND_DEBUG_FILE_CALLBACK}
- PFindDebugFileCallback = PFIND_DEBUG_FILE_CALLBACK;
-
-function FindDebugInfoFileEx(FileName, SymbolPath, DebugFilePath: PSTR;
- Callback: PFIND_DEBUG_FILE_CALLBACK; CallerData: PVOID): HANDLE; stdcall;
-{$EXTERNALSYM FindDebugInfoFileEx}
-
-type
- PFINDFILEINPATHCALLBACK = function(filename: PSTR; context: PVOID): BOOL; stdcall;
- {$EXTERNALSYM PFINDFILEINPATHCALLBACK}
-
-function SymFindFileInPath(hprocess: HANDLE; SearchPath, FileName: LPSTR; id: PVOID; two, three, flags: DWORD;
- FoundFile: LPSTR; callback: PFINDFILEINPATHCALLBACK; context: PVOID): BOOL; stdcall;
-{$EXTERNALSYM SymFindFileInPath}
-
-function FindExecutableImage(FileName, SymbolPath, ImageFilePath: PSTR): HANDLE; stdcall;
-{$EXTERNALSYM FindExecutableImage}
-
-type
- PFIND_EXE_FILE_CALLBACK = function(FileHandle: HANDLE; FileName: PSTR;
- CallerData: PVOID): BOOL; stdcall;
- {$EXTERNALSYM PFIND_EXE_FILE_CALLBACK}
- PFindExeFileCallback = PFIND_EXE_FILE_CALLBACK;
-
-function FindExecutableImageEx(FileName, SymbolPath, ImageFilePath: PSTR;
- Callback: PFIND_EXE_FILE_CALLBACK; CallerData: PVOID): HANDLE; stdcall;
-{$EXTERNALSYM FindExecutableImageEx}
-
-function ImageNtHeader(Base: PVOID): PIMAGE_NT_HEADERS; stdcall;
-{$EXTERNALSYM ImageNtHeader}
-
-function ImageDirectoryEntryToDataEx(Base: PVOID; MappedAsImage: ByteBool;
- DirectoryEntry: USHORT; var Size: ULONG; var FoundHeader: PIMAGE_SECTION_HEADER): PVOID; stdcall;
-{$EXTERNALSYM ImageDirectoryEntryToDataEx}
-
-function ImageDirectoryEntryToData(Base: PVOID; MappedAsImage: ByteBool;
- DirectoryEntry: USHORT; var Size: ULONG): PVOID; stdcall;
-{$EXTERNALSYM ImageDirectoryEntryToData}
-
-function ImageRvaToSection(NtHeaders: PIMAGE_NT_HEADERS; Base: PVOID; Rva: ULONG): PIMAGE_SECTION_HEADER; stdcall;
-{$EXTERNALSYM ImageRvaToSection}
-
-function ImageRvaToVa(NtHeaders: PIMAGE_NT_HEADERS; Base: PVOID; Rva: ULONG;
- var LastRvaSection: PIMAGE_SECTION_HEADER): PVOID; stdcall;
-{$EXTERNALSYM ImageRvaToVa}
-
-// Symbol server exports
-
-type
- PSYMBOLSERVERPROC = function(a1, a2: LPCSTR; a3: PVOID; a4, a5: DWORD; a6: LPSTR): BOOL; stdcall;
- {$EXTERNALSYM PSYMBOLSERVERPROC}
- PSYMBOLSERVEROPENPROC = function: BOOL; stdcall;
- {$EXTERNALSYM PSYMBOLSERVEROPENPROC}
- PSYMBOLSERVERCLOSEPROC = function: BOOL; stdcall;
- {$EXTERNALSYM PSYMBOLSERVERCLOSEPROC}
- PSYMBOLSERVERSETOPTIONSPROC = function(a1: UINT_PTR; a2: ULONG64): BOOL; stdcall;
- {$EXTERNALSYM PSYMBOLSERVERSETOPTIONSPROC}
- PSYMBOLSERVERCALLBACKPROC = function(action: UINT_PTR; data: ULONG64; context: ULONG64): BOOL; stdcall;
- {$EXTERNALSYM PSYMBOLSERVERCALLBACKPROC}
- PSYMBOLSERVERGETOPTIONSPROC = function: UINT_PTR; stdcall;
- {$EXTERNALSYM PSYMBOLSERVERGETOPTIONSPROC}
- PSYMBOLSERVERPINGPROC = function(a1: LPCSTR): BOOL; stdcall;
- {$EXTERNALSYM PSYMBOLSERVERPINGPROC}
-
-const
- SSRVOPT_CALLBACK = $01;
- {$EXTERNALSYM SSRVOPT_CALLBACK}
- SSRVOPT_DWORD = $02;
- {$EXTERNALSYM SSRVOPT_DWORD}
- SSRVOPT_DWORDPTR = $04;
- {$EXTERNALSYM SSRVOPT_DWORDPTR}
- SSRVOPT_GUIDPTR = $08;
- {$EXTERNALSYM SSRVOPT_GUIDPTR}
- SSRVOPT_OLDGUIDPTR = $10;
- {$EXTERNALSYM SSRVOPT_OLDGUIDPTR}
- SSRVOPT_UNATTENDED = $20;
- {$EXTERNALSYM SSRVOPT_UNATTENDED}
- SSRVOPT_RESET = ULONG_PTR(-1);
- {$EXTERNALSYM SSRVOPT_RESET}
-
- SSRVACTION_TRACE = 1;
- {$EXTERNALSYM SSRVACTION_TRACE}
-
-// This api won't be ported to Win64 - Fix your code.
-
-type
- PIMAGE_DEBUG_INFORMATION = ^IMAGE_DEBUG_INFORMATION;
- {$EXTERNALSYM PIMAGE_DEBUG_INFORMATION}
- _IMAGE_DEBUG_INFORMATION = record
- List: LIST_ENTRY;
- ReservedSize: DWORD;
- ReservedMappedBase: PVOID;
- ReservedMachine: USHORT;
- ReservedCharacteristics: USHORT;
- ReservedCheckSum: DWORD;
- ImageBase: DWORD;
- SizeOfImage: DWORD;
- ReservedNumberOfSections: DWORD;
- ReservedSections: PIMAGE_SECTION_HEADER;
- ReservedExportedNamesSize: DWORD;
- ReservedExportedNames: PSTR;
- ReservedNumberOfFunctionTableEntries: DWORD;
- ReservedFunctionTableEntries: PIMAGE_FUNCTION_ENTRY;
- ReservedLowestFunctionStartingAddress: DWORD;
- ReservedHighestFunctionEndingAddress: DWORD;
- ReservedNumberOfFpoTableEntries: DWORD;
- ReservedFpoTableEntries: PFPO_DATA;
- SizeOfCoffSymbols: DWORD;
- CoffSymbols: PIMAGE_COFF_SYMBOLS_HEADER;
- ReservedSizeOfCodeViewSymbols: DWORD;
- ReservedCodeViewSymbols: PVOID;
- ImageFilePath: PSTR;
- ImageFileName: PSTR;
- ReservedDebugFilePath: PSTR;
- ReservedTimeDateStamp: DWORD;
- ReservedRomImage: BOOL;
- ReservedDebugDirectory: PIMAGE_DEBUG_DIRECTORY;
- ReservedNumberOfDebugDirectories: DWORD;
- ReservedOriginalFunctionTableBaseAddress: DWORD;
- Reserved: array [0..1] of DWORD;
- end;
- {$EXTERNALSYM _IMAGE_DEBUG_INFORMATION}
- IMAGE_DEBUG_INFORMATION = _IMAGE_DEBUG_INFORMATION;
- {$EXTERNALSYM IMAGE_DEBUG_INFORMATION}
- TImageDebugInformation = IMAGE_DEBUG_INFORMATION;
- PImageDebugInformation = PIMAGE_DEBUG_INFORMATION;
-
-function MapDebugInformation(FileHandle: HANDLE; FileName, SymbolPath: PSTR;
- ImageBase: DWORD): PIMAGE_DEBUG_INFORMATION; stdcall;
-{$EXTERNALSYM MapDebugInformation}
-
-function UnmapDebugInformation(DebugInfo: PIMAGE_DEBUG_INFORMATION): BOOL; stdcall;
-{$EXTERNALSYM UnmapDebugInformation}
-
-function SearchTreeForFile(RootPath, InputPathName, OutputPathBuffer: PSTR): BOOL; stdcall;
-{$EXTERNALSYM SearchTreeForFile}
-
-type
- PENUMDIRTREE_CALLBACK = function(FilePath: LPCSTR; CallerData: PVOID): BOOL; stdcall;
- {$EXTERNALSYM PENUMDIRTREE_CALLBACK}
- PEnumDirTreeCallback = PENUMDIRTREE_CALLBACK;
-
-function EnumDirTree(hProcess: HANDLE; RootPath, InputPathName, OutputPathBuffer: PSTR;
- Callback: PENUMDIRTREE_CALLBACK; CallbackData: PVOID): BOOL; stdcall;
-{$EXTERNALSYM EnumDirTree}
-
-function MakeSureDirectoryPathExists(DirPath: PCSTR): BOOL; stdcall;
-{$EXTERNALSYM MakeSureDirectoryPathExists}
-
-//
-// UnDecorateSymbolName Flags
-//
-
-const
- UNDNAME_COMPLETE = $0000; // Enable full undecoration
- {$EXTERNALSYM UNDNAME_COMPLETE}
- UNDNAME_NO_LEADING_UNDERSCORES = $0001; // Remove leading underscores from MS extended keywords
- {$EXTERNALSYM UNDNAME_NO_LEADING_UNDERSCORES}
- UNDNAME_NO_MS_KEYWORDS = $0002; // Disable expansion of MS extended keywords
- {$EXTERNALSYM UNDNAME_NO_MS_KEYWORDS}
- UNDNAME_NO_FUNCTION_RETURNS = $0004; // Disable expansion of return type for primary declaration
- {$EXTERNALSYM UNDNAME_NO_FUNCTION_RETURNS}
- UNDNAME_NO_ALLOCATION_MODEL = $0008; // Disable expansion of the declaration model
- {$EXTERNALSYM UNDNAME_NO_ALLOCATION_MODEL}
- UNDNAME_NO_ALLOCATION_LANGUAGE = $0010; // Disable expansion of the declaration language specifier
- {$EXTERNALSYM UNDNAME_NO_ALLOCATION_LANGUAGE}
- UNDNAME_NO_MS_THISTYPE = $0020; // NYI Disable expansion of MS keywords on the 'this' type for primary declaration
- {$EXTERNALSYM UNDNAME_NO_MS_THISTYPE}
- UNDNAME_NO_CV_THISTYPE = $0040; // NYI Disable expansion of CV modifiers on the 'this' type for primary declaration
- {$EXTERNALSYM UNDNAME_NO_CV_THISTYPE}
- UNDNAME_NO_THISTYPE = $0060; // Disable all modifiers on the 'this' type
- {$EXTERNALSYM UNDNAME_NO_THISTYPE}
- UNDNAME_NO_ACCESS_SPECIFIERS = $0080; // Disable expansion of access specifiers for members
- {$EXTERNALSYM UNDNAME_NO_ACCESS_SPECIFIERS}
- UNDNAME_NO_THROW_SIGNATURES = $0100; // Disable expansion of 'throw-signatures' for functions and pointers to functions
- {$EXTERNALSYM UNDNAME_NO_THROW_SIGNATURES}
- UNDNAME_NO_MEMBER_TYPE = $0200; // Disable expansion of 'static' or 'virtual'ness of members
- {$EXTERNALSYM UNDNAME_NO_MEMBER_TYPE}
- UNDNAME_NO_RETURN_UDT_MODEL = $0400; // Disable expansion of MS model for UDT returns
- {$EXTERNALSYM UNDNAME_NO_RETURN_UDT_MODEL}
- UNDNAME_32_BIT_DECODE = $0800; // Undecorate 32-bit decorated names
- {$EXTERNALSYM UNDNAME_32_BIT_DECODE}
- UNDNAME_NAME_ONLY = $1000; // Crack only the name for primary declaration;
- {$EXTERNALSYM UNDNAME_NAME_ONLY}
- // return just [scope::]name. Does expand template params
- UNDNAME_NO_ARGUMENTS = $2000; // Don't undecorate arguments to function
- {$EXTERNALSYM UNDNAME_NO_ARGUMENTS}
- UNDNAME_NO_SPECIAL_SYMS = $4000; // Don't undecorate special names (v-table, vcall, vector xxx, metatype, etc)
- {$EXTERNALSYM UNDNAME_NO_SPECIAL_SYMS}
-
-function UnDecorateSymbolName(DecoratedName: PCSTR; UnDecoratedName: PSTR;
- UndecoratedLength: DWORD; Flags: DWORD): DWORD; stdcall;
-{$EXTERNALSYM UnDecorateSymbolName}
-
-//
-// these values are used for synthesized file types
-// that can be passed in as image headers instead of
-// the standard ones from ntimage.h
-//
-
-const
- DBHHEADER_DEBUGDIRS = $1;
- {$EXTERNALSYM DBHHEADER_DEBUGDIRS}
-
-type
- _MODLOAD_DATA = record
- ssize: DWORD; // size of this struct
- ssig: DWORD; // signature identifying the passed data
- data: PVOID; // pointer to passed data
- size: DWORD; // size of passed data
- flags: DWORD; // options
- end;
- {$EXTERNALSYM _MODLOAD_DATA}
- MODLOAD_DATA = _MODLOAD_DATA;
- {$EXTERNALSYM MODLOAD_DATA}
- PMODLOAD_DATA = ^MODLOAD_DATA;
- {$EXTERNALSYM PMODLOAD_DATA}
- TModLoadData = MODLOAD_DATA;
- PModLoadData = PMODLOAD_DATA;
-
-//
-// StackWalking API
-//
-
-type
- ADDRESS_MODE = (
- AddrMode1616,
- AddrMode1632,
- AddrModeReal,
- AddrModeFlat);
- {$EXTERNALSYM ADDRESS_MODE}
- TAddressMode = ADDRESS_MODE;
-
- LPADDRESS64 = ^ADDRESS64;
- {$EXTERNALSYM PADDRESS64}
- _tagADDRESS64 = record
- Offset: DWORD64;
- Segment: WORD;
- Mode: ADDRESS_MODE;
- end;
- {$EXTERNALSYM _tagADDRESS64}
- ADDRESS64 = _tagADDRESS64;
- {$EXTERNALSYM ADDRESS64}
- TAddress64 = ADDRESS64;
- PAddress64 = LPADDRESS64;
-
- LPADDRESS = ^ADDRESS;
- {$EXTERNALSYM PADDRESS}
- _tagADDRESS = record
- Offset: DWORD;
- Segment: WORD;
- Mode: ADDRESS_MODE;
- end;
- {$EXTERNALSYM _tagADDRESS}
- ADDRESS = _tagADDRESS;
- {$EXTERNALSYM ADDRESS}
- TAddress = ADDRESS;
- PAddress = LPADDRESS;
-
-procedure Address32To64(a32: LPADDRESS; a64: LPADDRESS64);
-{$EXTERNALSYM Address32To64}
-
-procedure Address64To32(a64: LPADDRESS64; a32: LPADDRESS);
-{$EXTERNALSYM Address64To32}
-
-//
-// This structure is included in the STACKFRAME structure,
-// and is used to trace through usermode callbacks in a thread's
-// kernel stack. The values must be copied by the kernel debugger
-// from the DBGKD_GET_VERSION and WAIT_STATE_CHANGE packets.
-//
-
-//
-// New KDHELP structure for 64 bit system support.
-// This structure is preferred in new code.
-//
-
-type
- PKDHELP64 = ^KDHELP64;
- {$EXTERNALSYM PKDHELP64}
- _KDHELP64 = record
- //
- // address of kernel thread object, as provided in the
- // WAIT_STATE_CHANGE packet.
- //
- Thread: DWORD64;
- //
- // offset in thread object to pointer to the current callback frame
- // in kernel stack.
- //
- ThCallbackStack: DWORD;
- //
- // offset in thread object to pointer to the current callback backing
- // store frame in kernel stack.
- //
- ThCallbackBStore: DWORD;
- //
- // offsets to values in frame:
- //
- // address of next callback frame
- NextCallback: DWORD;
- // address of saved frame pointer (if applicable)
- FramePointer: DWORD;
- //
- // Address of the kernel function that calls out to user mode
- //
- KiCallUserMode: DWORD64;
- //
- // Address of the user mode dispatcher function
- //
- KeUserCallbackDispatcher: DWORD64;
- //
- // Lowest kernel mode address
- //
- SystemRangeStart: DWORD64;
- Reserved: array [0..7] of DWORD64;
- end;
- {$EXTERNALSYM _KDHELP64}
- KDHELP64 = _KDHELP64;
- {$EXTERNALSYM KDHELP64}
- TKdHelp64 = KDHELP64;
- //PKdHelp64 = PKDHELP64;
-
- PKDHELP = ^KDHELP;
- {$EXTERNALSYM PKDHELP}
- _KDHELP = record
- //
- // address of kernel thread object, as provided in the
- // WAIT_STATE_CHANGE packet.
- //
- Thread: DWORD;
- //
- // offset in thread object to pointer to the current callback frame
- // in kernel stack.
- //
- ThCallbackStack: DWORD;
- //
- // offsets to values in frame:
- //
- // address of next callback frame
- NextCallback: DWORD;
- // address of saved frame pointer (if applicable)
- FramePointer: DWORD;
- //
- // Address of the kernel function that calls out to user mode
- //
- KiCallUserMode: DWORD;
- //
- // Address of the user mode dispatcher function
- //
- KeUserCallbackDispatcher: DWORD;
- //
- // Lowest kernel mode address
- //
- SystemRangeStart: DWORD;
- //
- // offset in thread object to pointer to the current callback backing
- // store frame in kernel stack.
- //
- ThCallbackBStore: DWORD;
- Reserved: array [0..7] of DWORD;
- end;
- {$EXTERNALSYM _KDHELP}
- KDHELP = _KDHELP;
- {$EXTERNALSYM KDHELP}
- TKdHelp = KDHELP;
- //PKdHelp = PKDHELP;
-
-procedure KdHelp32To64(p32: PKDHELP; p64: PKDHELP64);
-{$EXTERNALSYM KdHelp32To64}
-
-type
- LPSTACKFRAME64 = ^STACKFRAME64;
- {$EXTERNALSYM LPSTACKFRAME64}
- _tagSTACKFRAME64 = record
- AddrPC: ADDRESS64; // program counter
- AddrReturn: ADDRESS64; // return address
- AddrFrame: ADDRESS64; // frame pointer
- AddrStack: ADDRESS64; // stack pointer
- AddrBStore: ADDRESS64; // backing store pointer
- FuncTableEntry: PVOID; // pointer to pdata/fpo or NULL
- Params: array [0..3] of DWORD64; // possible arguments to the function
- Far: BOOL; // WOW far call
- Virtual: BOOL; // is this a virtual frame?
- Reserved: array [0..2] of DWORD64;
- KdHelp: KDHELP64;
- end;
- {$EXTERNALSYM _tagSTACKFRAME64}
- STACKFRAME64 = _tagSTACKFRAME64;
- {$EXTERNALSYM STACKFRAME64}
- TStackFrame64 = STACKFRAME64;
- PStackFrame64 = LPSTACKFRAME64;
-
- LPSTACKFRAME = ^STACKFRAME;
- {$EXTERNALSYM LPSTACKFRAME}
- _tagSTACKFRAME = record
- AddrPC: ADDRESS; // program counter
- AddrReturn: ADDRESS; // return address
- AddrFrame: ADDRESS; // frame pointer
- AddrStack: ADDRESS; // stack pointer
- FuncTableEntry: PVOID; // pointer to pdata/fpo or NULL
- Params: array [0..3] of DWORD; // possible arguments to the function
- Far: BOOL; // WOW far call
- Virtual: BOOL; // is this a virtual frame?
- Reserved: array [0..2] of DWORD;
- KdHelp: KDHELP;
- AddrBStore: ADDRESS; // backing store pointer
- end;
- {$EXTERNALSYM _tagSTACKFRAME}
- STACKFRAME = _tagSTACKFRAME;
- {$EXTERNALSYM STACKFRAME}
- TStackFrame = STACKFRAME;
- PStackFrame = LPSTACKFRAME;
-
- PREAD_PROCESS_MEMORY_ROUTINE64 = function(hProcess: HANDLE; qwBaseAddress: DWORD64;
- lpBuffer: PVOID; nSize: DWORD; var lpNumberOfBytesRead: DWORD): BOOL; stdcall;
- {$EXTERNALSYM PREAD_PROCESS_MEMORY_ROUTINE64}
- PReadProcessMemoryRoutine64 = PREAD_PROCESS_MEMORY_ROUTINE64;
-
- PFUNCTION_TABLE_ACCESS_ROUTINE64 = function(hProcess: HANDLE;
- AddrBase: DWORD64): PVOID; stdcall;
- {$EXTERNALSYM PFUNCTION_TABLE_ACCESS_ROUTINE64}
- PFunctionTableAccessRoutine64 = PFUNCTION_TABLE_ACCESS_ROUTINE64;
-
- PGET_MODULE_BASE_ROUTINE64 = function(hProcess: HANDLE;
- Address: DWORD64): DWORD64; stdcall;
- {$EXTERNALSYM PGET_MODULE_BASE_ROUTINE64}
- PGetModuleBaseRoutine64 = PGET_MODULE_BASE_ROUTINE64;
-
- PTRANSLATE_ADDRESS_ROUTINE64 = function(hProcess: HANDLE; hThread: HANDLE;
- const lpaddr: ADDRESS64): DWORD64; stdcall;
- {$EXTERNALSYM PTRANSLATE_ADDRESS_ROUTINE64}
- PTranslateAddressRoutine64 = PTRANSLATE_ADDRESS_ROUTINE64;
-
-function StackWalk64(MachineType: DWORD; hProcess: HANDLE; hThread: HANDLE;
- var StackFrame: STACKFRAME64; ContextRecord: PVOID;
- ReadMemoryRoutine: PREAD_PROCESS_MEMORY_ROUTINE64;
- FunctionTableAccessRoutine: PFUNCTION_TABLE_ACCESS_ROUTINE64;
- GetModuleBaseRoutine: PGET_MODULE_BASE_ROUTINE64;
- TranslateAddress: PTRANSLATE_ADDRESS_ROUTINE64): BOOL; stdcall;
-{$EXTERNALSYM StackWalk64}
-
-type
- PREAD_PROCESS_MEMORY_ROUTINE = function(hProcess: HANDLE;
- lpBaseAddress: DWORD; lpBuffer: PVOID; nSize: DWORD;
- var lpNumberOfBytesRead: DWORD): BOOL; stdcall;
- {$EXTERNALSYM PREAD_PROCESS_MEMORY_ROUTINE}
- PreadProcessMemoryRoutine = PREAD_PROCESS_MEMORY_ROUTINE;
-
- PFUNCTION_TABLE_ACCESS_ROUTINE = function(hProcess: HANDLE; AddrBase: DWORD): PVOID; stdcall;
- {$EXTERNALSYM PFUNCTION_TABLE_ACCESS_ROUTINE}
- PFunctionTableAccessRoutine = PFUNCTION_TABLE_ACCESS_ROUTINE;
-
- PGET_MODULE_BASE_ROUTINE = function(hProcess: HANDLE; Address: DWORD): DWORD; stdcall;
- {$EXTERNALSYM PGET_MODULE_BASE_ROUTINE}
- PGetModuleBaseRoutine = PGET_MODULE_BASE_ROUTINE;
-
- PTRANSLATE_ADDRESS_ROUTINE = function(hProcess: HANDLE; hThread: HANDLE;
- const lpaddr: ADDRESS): DWORD; stdcall;
- {$EXTERNALSYM PTRANSLATE_ADDRESS_ROUTINE}
- PTranslateAddressRoutine = PTRANSLATE_ADDRESS_ROUTINE;
-
-function StackWalk(MachineType: DWORD; hProcess: HANDLE; hThread: HANDLE;
- var StackFrame: STACKFRAME; ContextRecord: PVOID;
- ReadMemoryRoutine: PREAD_PROCESS_MEMORY_ROUTINE;
- FunctionTableAccessRoutine: PFUNCTION_TABLE_ACCESS_ROUTINE;
- GetModuleBaseRoutine: PGET_MODULE_BASE_ROUTINE;
- TranslateAddress: PTRANSLATE_ADDRESS_ROUTINE): BOOL; stdcall;
-{$EXTERNALSYM StackWalk}
-
-const
- API_VERSION_NUMBER = 9;
- {$EXTERNALSYM API_VERSION_NUMBER}
-
-type
- LPAPI_VERSION = ^API_VERSION;
- {$EXTERNALSYM LPAPI_VERSION}
- API_VERSION = record
- MajorVersion: USHORT;
- MinorVersion: USHORT;
- Revision: USHORT;
- Reserved: USHORT;
- end;
- {$EXTERNALSYM API_VERSION}
- TApiVersion = API_VERSION;
- PApiVersion = LPAPI_VERSION;
-
-function ImagehlpApiVersion: LPAPI_VERSION; stdcall;
-{$EXTERNALSYM ImagehlpApiVersion}
-
-function ImagehlpApiVersionEx(const AppVersion: API_VERSION): LPAPI_VERSION; stdcall;
-{$EXTERNALSYM ImagehlpApiVersionEx}
-
-function GetTimestampForLoadedLibrary(Module: HMODULE): DWORD; stdcall;
-{$EXTERNALSYM GetTimestampForLoadedLibrary}
-
-//
-// typedefs for function pointers
-//
-
-type
- PSYM_ENUMMODULES_CALLBACK64 = function(ModuleName: PSTR; BaseOfDll: DWORD64;
- UserContext: PVOID): BOOL; stdcall;
- {$EXTERNALSYM PSYM_ENUMMODULES_CALLBACK64}
- PSymEnummodulesCallback64 = PSYM_ENUMMODULES_CALLBACK64;
-
- PSYM_ENUMSYMBOLS_CALLBACK64 = function(SymbolName: PSTR; SymbolAddress: DWORD64;
- SymbolSize: ULONG; UserContext: PVOID): BOOL; stdcall;
- {$EXTERNALSYM PSYM_ENUMSYMBOLS_CALLBACK64}
- PSymEnumsymbolsCallback64 = PSYM_ENUMSYMBOLS_CALLBACK64;
-
- PSYM_ENUMSYMBOLS_CALLBACK64W = function(SymbolName: PWSTR;
- SymbolAddress: DWORD64; SymbolSize: ULONG; UserContext: PVOID): BOOL; stdcall;
- {$EXTERNALSYM PSYM_ENUMSYMBOLS_CALLBACK64W}
- PSymEnumsymbolsCallback64w = PSYM_ENUMSYMBOLS_CALLBACK64W;
-
- PENUMLOADED_MODULES_CALLBACK64 = function(ModuleName: PSTR;
- ModuleBase: DWORD64; ModuleSize: ULONG; UserContext: PVOID): BOOL; stdcall;
- {$EXTERNALSYM PENUMLOADED_MODULES_CALLBACK64}
- PSnumloadedModulesCallback64 = PENUMLOADED_MODULES_CALLBACK64;
-
- PSYMBOL_REGISTERED_CALLBACK64 = function(hProcess: HANDLE; ActionCode: ULONG;
- CallbackData: ULONG64; UserContext: ULONG64): BOOL; stdcall;
- {$EXTERNALSYM PSYMBOL_REGISTERED_CALLBACK64}
- PSymbolRegisteredCallback64 = PSYMBOL_REGISTERED_CALLBACK64;
-
- PSYMBOL_FUNCENTRY_CALLBACK = function(hProcess: HANDLE; AddrBase: DWORD;
- UserContext: PVOID): PVOID; stdcall;
- {$EXTERNALSYM PSYMBOL_FUNCENTRY_CALLBACK}
- PSymbolFuncentryCallback = PSYMBOL_FUNCENTRY_CALLBACK;
-
- PSYMBOL_FUNCENTRY_CALLBACK64 = function(hProcess: HANDLE; AddrBase: ULONG64;
- UserContext: ULONG64): PVOID; stdcall;
- {$EXTERNALSYM PSYMBOL_FUNCENTRY_CALLBACK64}
- PSymbolFuncentryCallback64 = PSYMBOL_FUNCENTRY_CALLBACK64;
-
- PSYM_ENUMMODULES_CALLBACK = function(ModuleName: PSTR; BaseOfDll: ULONG;
- UserContext: PVOID): BOOL; stdcall;
- {$EXTERNALSYM PSYM_ENUMMODULES_CALLBACK}
- PSymEnummodulesCallback = PSYM_ENUMMODULES_CALLBACK;
-
- PSYM_ENUMSYMBOLS_CALLBACK = function(SymbolName: PSTR; SymbolAddress: ULONG;
- SymbolSize: ULONG; UserContext: PVOID): BOOL; stdcall;
- {$EXTERNALSYM PSYM_ENUMSYMBOLS_CALLBACK}
- PSymEnumsymbolsCallback = PSYM_ENUMSYMBOLS_CALLBACK;
-
- PSYM_ENUMSYMBOLS_CALLBACKW = function(SymbolName: PWSTR; SymbolAddress: ULONG;
- SymbolSize: ULONG; UserContext: PVOID): BOOL; stdcall;
- {$EXTERNALSYM PSYM_ENUMSYMBOLS_CALLBACKW}
- PSymEnumsymbolsCallbackw = PSYM_ENUMSYMBOLS_CALLBACKW;
-
- PENUMLOADED_MODULES_CALLBACK = function(ModuleName: PSTR; ModuleBase: ULONG;
- ModuleSize: ULONG; UserContext: PVOID): BOOL; stdcall;
- {$EXTERNALSYM PENUMLOADED_MODULES_CALLBACK}
- PEnumloadedModulesCallback = PENUMLOADED_MODULES_CALLBACK;
-
- PSYMBOL_REGISTERED_CALLBACK = function(hProcess: HANDLE; ActionCode: ULONG;
- CallbackData: PVOID; UserContext: PVOID): BOOL; stdcall;
- {$EXTERNALSYM PSYMBOL_REGISTERED_CALLBACK}
- PSymbolRegisteredCallback = PSYMBOL_REGISTERED_CALLBACK;
-
-//
-// flags found in SYMBOL_INFO.Flags
-//
-
-const
- SYMFLAG_VALUEPRESENT = $00000001;
- {$EXTERNALSYM SYMFLAG_VALUEPRESENT}
- SYMFLAG_REGISTER = $00000008;
- {$EXTERNALSYM SYMFLAG_REGISTER}
- SYMFLAG_REGREL = $00000010;
- {$EXTERNALSYM SYMFLAG_REGREL}
- SYMFLAG_FRAMEREL = $00000020;
- {$EXTERNALSYM SYMFLAG_FRAMEREL}
- SYMFLAG_PARAMETER = $00000040;
- {$EXTERNALSYM SYMFLAG_PARAMETER}
- SYMFLAG_LOCAL = $00000080;
- {$EXTERNALSYM SYMFLAG_LOCAL}
- SYMFLAG_CONSTANT = $00000100;
- {$EXTERNALSYM SYMFLAG_CONSTANT}
- SYMFLAG_EXPORT = $00000200;
- {$EXTERNALSYM SYMFLAG_EXPORT}
- SYMFLAG_FORWARDER = $00000400;
- {$EXTERNALSYM SYMFLAG_FORWARDER}
- SYMFLAG_FUNCTION = $00000800;
- {$EXTERNALSYM SYMFLAG_FUNCTION}
- SYMFLAG_VIRTUAL = $00001000;
- {$EXTERNALSYM SYMFLAG_VIRTUAL}
- SYMFLAG_THUNK = $00002000;
- {$EXTERNALSYM SYMFLAG_THUNK}
- SYMFLAG_TLSREL = $00004000;
- {$EXTERNALSYM SYMFLAG_TLSREL}
-
-//
-// symbol type enumeration
-//
-
-type
- SYM_TYPE = (
- SymNone,
- SymCoff,
- SymCv,
- SymPdb,
- SymExport,
- SymDeferred,
- SymSym, // .sym file
- SymDia,
- SymVirtual,
- NumSymTypes);
- {$EXTERNALSYM SYM_TYPE}
- TSymType = SYM_TYPE;
-
-//
-// symbol data structure
-//
-
- PIMAGEHLP_SYMBOL64 = ^IMAGEHLP_SYMBOL64;
- {$EXTERNALSYM PIMAGEHLP_SYMBOL64}
- _IMAGEHLP_SYMBOL64 = record
- SizeOfStruct: DWORD; // set to sizeof(IMAGEHLP_SYMBOL64)
- Address: DWORD64; // virtual address including dll base address
- Size: DWORD; // estimated size of symbol, can be zero
- Flags: DWORD; // info about the symbols, see the SYMF defines
- MaxNameLength: DWORD; // maximum size of symbol name in 'Name'
- Name: array [0..0] of CHAR; // symbol name (null terminated string)
- end;
- {$EXTERNALSYM _IMAGEHLP_SYMBOL64}
- IMAGEHLP_SYMBOL64 = _IMAGEHLP_SYMBOL64;
- {$EXTERNALSYM IMAGEHLP_SYMBOL64}
- TImageHlpSymbol64 = IMAGEHLP_SYMBOL64;
- PImageHlpSymbol64 = PIMAGEHLP_SYMBOL64;
-
- _IMAGEHLP_SYMBOL64_PACKAGE = record
- sym: IMAGEHLP_SYMBOL64;
- name: array [0..MAX_SYM_NAME] of CHAR;
- end;
- {$EXTERNALSYM _IMAGEHLP_SYMBOL64_PACKAGE}
- IMAGEHLP_SYMBOL64_PACKAGE = _IMAGEHLP_SYMBOL64_PACKAGE;
- {$EXTERNALSYM IMAGEHLP_SYMBOL64_PACKAGE}
- PIMAGEHLP_SYMBOL64_PACKAGE = ^IMAGEHLP_SYMBOL64_PACKAGE;
- {$EXTERNALSYM PIMAGEHLP_SYMBOL64_PACKAGE}
- TImageHlpSymbol64Package = IMAGEHLP_SYMBOL64_PACKAGE;
- PImageHlpSymbol64Package = PIMAGEHLP_SYMBOL64_PACKAGE;
-
-//#if !defined(_IMAGEHLP_SOURCE_) && defined(_IMAGEHLP64)
-//
-//#define IMAGEHLP_SYMBOL IMAGEHLP_SYMBOL64
-//#define PIMAGEHLP_SYMBOL PIMAGEHLP_SYMBOL64
-//#define IMAGEHLP_SYMBOL_PACKAGE IMAGEHLP_SYMBOL64_PACKAGE
-//#define PIMAGEHLP_SYMBOL_PACKAGE PIMAGEHLP_SYMBOL64_PACKAGE
-//
-//#else
-
- PIMAGEHLP_SYMBOL = ^IMAGEHLP_SYMBOL;
- {$EXTERNALSYM PIMAGEHLP_SYMBOL}
- _IMAGEHLP_SYMBOL = record
- SizeOfStruct: DWORD; // set to sizeof(IMAGEHLP_SYMBOL)
- Address: DWORD; // virtual address including dll base address
- Size: DWORD; // estimated size of symbol, can be zero
- Flags: DWORD; // info about the symbols, see the SYMF defines
- MaxNameLength: DWORD; // maximum size of symbol name in 'Name'
- Name: array [0..0] of CHAR; // symbol name (null terminated string)
- end;
- {$EXTERNALSYM _IMAGEHLP_SYMBOL}
- IMAGEHLP_SYMBOL = _IMAGEHLP_SYMBOL;
- {$EXTERNALSYM IMAGEHLP_SYMBOL}
- TImageHlpSymbol = IMAGEHLP_SYMBOL;
- PImageHlpSymbol = PIMAGEHLP_SYMBOL;
-
- _IMAGEHLP_SYMBOL_PACKAGE = record
- sym: IMAGEHLP_SYMBOL;
- name: array [0..MAX_SYM_NAME] of CHAR;
- end;
- {$EXTERNALSYM _IMAGEHLP_SYMBOL_PACKAGE}
- IMAGEHLP_SYMBOL_PACKAGE = _IMAGEHLP_SYMBOL_PACKAGE;
- {$EXTERNALSYM IMAGEHLP_SYMBOL_PACKAGE}
- PIMAGEHLP_SYMBOL_PACKAGE = ^IMAGEHLP_SYMBOL_PACKAGE;
- {$EXTERNALSYM PIMAGEHLP_SYMBOL_PACKAGE}
- TImageHlpSymbolPackage = IMAGEHLP_SYMBOL_PACKAGE;
- PImageHlpSymbolPackage = PIMAGEHLP_SYMBOL_PACKAGE;
-
-//#endif
-
-//
-// module data structure
-//
-
- PIMAGEHLP_MODULE64 = ^IMAGEHLP_MODULE64;
- {$EXTERNALSYM PIMAGEHLP_MODULE64}
- _IMAGEHLP_MODULE64 = record
- SizeOfStruct: DWORD; // set to sizeof(IMAGEHLP_MODULE64)
- BaseOfImage: DWORD64; // base load address of module
- ImageSize: DWORD; // virtual size of the loaded module
- TimeDateStamp: DWORD; // date/time stamp from pe header
- CheckSum: DWORD; // checksum from the pe header
- NumSyms: DWORD; // number of symbols in the symbol table
- SymType: SYM_TYPE; // type of symbols loaded
- ModuleName: array [0..3] of CHAR; // module name
- ImageName: array [0..255] of CHAR; // image name
- LoadedImageName: array [0..255] of CHAR; // symbol file name
- end;
- {$EXTERNALSYM _IMAGEHLP_MODULE64}
- IMAGEHLP_MODULE64 = _IMAGEHLP_MODULE64;
- {$EXTERNALSYM IMAGEHLP_MODULE64}
- TImageHlpModule64 = IMAGEHLP_MODULE64;
- PImageHlpModule64 = PIMAGEHLP_MODULE64;
-
- PIMAGEHLP_MODULEW64 = ^IMAGEHLP_MODULEW64;
- {$EXTERNALSYM PIMAGEHLP_MODULEW64}
- _IMAGEHLP_MODULE64W = record
- SizeOfStruct: DWORD; // set to sizeof(IMAGEHLP_MODULE64)
- BaseOfImage: DWORD64; // base load address of module
- ImageSize: DWORD; // virtual size of the loaded module
- TimeDateStamp: DWORD; // date/time stamp from pe header
- CheckSum: DWORD; // checksum from the pe header
- NumSyms: DWORD; // number of symbols in the symbol table
- SymType: SYM_TYPE; // type of symbols loaded
- ModuleName: array [0..31] of WCHAR; // module name
- ImageName: array [0..255] of WCHAR; // image name
- LoadedImageName: array [0..255] of WCHAR; // symbol file name
- end;
- {$EXTERNALSYM _IMAGEHLP_MODULE64W}
- IMAGEHLP_MODULEW64 = _IMAGEHLP_MODULE64W;
- {$EXTERNALSYM IMAGEHLP_MODULEW64}
- TImageHlpModuleW64 = IMAGEHLP_MODULEW64;
- PImageHlpModuleW64 = PIMAGEHLP_MODULEW64;
-
- PIMAGEHLP_MODULE = ^IMAGEHLP_MODULE;
- {$EXTERNALSYM PIMAGEHLP_MODULE}
- _IMAGEHLP_MODULE = record
- SizeOfStruct: DWORD; // set to sizeof(IMAGEHLP_MODULE)
- BaseOfImage: DWORD; // base load address of module
- ImageSize: DWORD; // virtual size of the loaded module
- TimeDateStamp: DWORD; // date/time stamp from pe header
- CheckSum: DWORD; // checksum from the pe header
- NumSyms: DWORD; // number of symbols in the symbol table
- SymType: SYM_TYPE; // type of symbols loaded
- ModuleName: array [0..31] of CHAR; // module name
- ImageName: array [0..255] of CHAR; // image name
- LoadedImageName: array [0..255] of CHAR; // symbol file name
- end;
- {$EXTERNALSYM _IMAGEHLP_MODULE}
- IMAGEHLP_MODULE = _IMAGEHLP_MODULE;
- {$EXTERNALSYM IMAGEHLP_MODULE}
- TImageHlpModule = IMAGEHLP_MODULE;
- PImageHlpModule = PIMAGEHLP_MODULE;
-
- PIMAGEHLP_MODULEW = ^IMAGEHLP_MODULEW;
- {$EXTERNALSYM PIMAGEHLP_MODULEW}
- _IMAGEHLP_MODULEW = record
- SizeOfStruct: DWORD; // set to sizeof(IMAGEHLP_MODULE)
- BaseOfImage: DWORD; // base load address of module
- ImageSize: DWORD; // virtual size of the loaded module
- TimeDateStamp: DWORD; // date/time stamp from pe header
- CheckSum: DWORD; // checksum from the pe header
- NumSyms: DWORD; // number of symbols in the symbol table
- SymType: SYM_TYPE; // type of symbols loaded
- ModuleName: array [0..31] of WCHAR; // module name
- ImageName: array [0..255] of WCHAR; // image name
- LoadedImageName: array [0..255] of WCHAR; // symbol file name
- end;
- {$EXTERNALSYM _IMAGEHLP_MODULEW}
- IMAGEHLP_MODULEW = _IMAGEHLP_MODULEW;
- {$EXTERNALSYM IMAGEHLP_MODULEW}
- TImageHlpModuleW = IMAGEHLP_MODULEW;
- PImageHlpModuleW = PIMAGEHLP_MODULEW;
-
-//
-// source file line data structure
-//
-
- PIMAGEHLP_LINE64 = ^IMAGEHLP_LINE64;
- {$EXTERNALSYM PIMAGEHLP_LINE64}
- _IMAGEHLP_LINE64 = record
- SizeOfStruct: DWORD; // set to sizeof(IMAGEHLP_LINE64)
- Key: PVOID; // internal
- LineNumber: DWORD; // line number in file
- FileName: PCHAR; // full filename
- Address: DWORD64; // first instruction of line
- end;
- {$EXTERNALSYM _IMAGEHLP_LINE64}
- IMAGEHLP_LINE64 = _IMAGEHLP_LINE64;
- {$EXTERNALSYM IMAGEHLP_LINE64}
- TImageHlpLine64 = IMAGEHLP_LINE64;
- PImageHlpLine64 = PIMAGEHLP_LINE64;
-
- PIMAGEHLP_LINE = ^IMAGEHLP_LINE;
- {$EXTERNALSYM PIMAGEHLP_LINE}
- _IMAGEHLP_LINE = record
- SizeOfStruct: DWORD; // set to sizeof(IMAGEHLP_LINE)
- Key: PVOID; // internal
- LineNumber: DWORD; // line number in file
- FileName: PCHAR; // full filename
- Address: DWORD; // first instruction of line
- end;
- {$EXTERNALSYM _IMAGEHLP_LINE}
- IMAGEHLP_LINE = _IMAGEHLP_LINE;
- {$EXTERNALSYM IMAGEHLP_LINE}
- TImageHlpLine = IMAGEHLP_LINE;
- PImageHlpLine = PIMAGEHLP_LINE;
-
-//
-// source file structure
-//
-
-type
- _SOURCEFILE = record
- ModBase: DWORD64; // base address of loaded module
- FileName: PCHAR; // full filename of source
- end;
- {$EXTERNALSYM _SOURCEFILE}
- SOURCEFILE = _SOURCEFILE;
- {$EXTERNALSYM SOURCEFILE}
- PSOURCEFILE = ^SOURCEFILE;
- {$EXTERNALSYM PSOURCEFILE}
- TSourceFile = SOURCEFILE;
-
-//
-// data structures used for registered symbol callbacks
-//
-
-const
- CBA_DEFERRED_SYMBOL_LOAD_START = $00000001;
- {$EXTERNALSYM CBA_DEFERRED_SYMBOL_LOAD_START}
- CBA_DEFERRED_SYMBOL_LOAD_COMPLETE = $00000002;
- {$EXTERNALSYM CBA_DEFERRED_SYMBOL_LOAD_COMPLETE}
- CBA_DEFERRED_SYMBOL_LOAD_FAILURE = $00000003;
- {$EXTERNALSYM CBA_DEFERRED_SYMBOL_LOAD_FAILURE}
- CBA_SYMBOLS_UNLOADED = $00000004;
- {$EXTERNALSYM CBA_SYMBOLS_UNLOADED}
- CBA_DUPLICATE_SYMBOL = $00000005;
- {$EXTERNALSYM CBA_DUPLICATE_SYMBOL}
- CBA_READ_MEMORY = $00000006;
- {$EXTERNALSYM CBA_READ_MEMORY}
- CBA_DEFERRED_SYMBOL_LOAD_CANCEL = $00000007;
- {$EXTERNALSYM CBA_DEFERRED_SYMBOL_LOAD_CANCEL}
- CBA_SET_OPTIONS = $00000008;
- {$EXTERNALSYM CBA_SET_OPTIONS}
- CBA_EVENT = $00000010;
- {$EXTERNALSYM CBA_EVENT}
- CBA_DEFERRED_SYMBOL_LOAD_PARTIAL = $00000020;
- {$EXTERNALSYM CBA_DEFERRED_SYMBOL_LOAD_PARTIAL}
- CBA_DEBUG_INFO = $10000000;
- {$EXTERNALSYM CBA_DEBUG_INFO}
-
-type
- PIMAGEHLP_CBA_READ_MEMORY = ^IMAGEHLP_CBA_READ_MEMORY;
- {$EXTERNALSYM PIMAGEHLP_CBA_READ_MEMORY}
- _IMAGEHLP_CBA_READ_MEMORY = record
- addr: DWORD64; // address to read from
- buf: PVOID; // buffer to read to
- bytes: DWORD; // amount of bytes to read
- bytesread: LPDWORD; // pointer to store amount of bytes read
- end;
- {$EXTERNALSYM _IMAGEHLP_CBA_READ_MEMORY}
- IMAGEHLP_CBA_READ_MEMORY = _IMAGEHLP_CBA_READ_MEMORY;
- {$EXTERNALSYM IMAGEHLP_CBA_READ_MEMORY}
- TImageHlpCbaReadMemory = IMAGEHLP_CBA_READ_MEMORY;
- PImageHlpCbaReadMemory = PIMAGEHLP_CBA_READ_MEMORY;
-
-const
- sevInfo = 0;
- {$EXTERNALSYM sevInfo}
- sevProblem = 1;
- {$EXTERNALSYM sevProblem}
- sevAttn = 2;
- {$EXTERNALSYM sevAttn}
- sevFatal = 3;
- {$EXTERNALSYM sevFatal}
- sevMax = 4; // unused
- {$EXTERNALSYM sevMax}
-
-type
- _IMAGEHLP_CBA_EVENT = record
- severity: DWORD; // values from sevInfo to sevFatal
- code: DWORD; // numerical code IDs the error
- desc: PCHAR; // may contain a text description of the error
- object_: PVOID; // value dependant upon the error code
- end;
- {$EXTERNALSYM _IMAGEHLP_CBA_EVENT}
- IMAGEHLP_CBA_EVENT = _IMAGEHLP_CBA_EVENT;
- {$EXTERNALSYM IMAGEHLP_CBA_EVENT}
- PIMAGEHLP_CBA_EVENT = ^IMAGEHLP_CBA_EVENT;
- {$EXTERNALSYM PIMAGEHLP_CBA_EVENT}
- TImageHlpCbaEvent = IMAGEHLP_CBA_EVENT;
- PImageHlpCbaEvent = PIMAGEHLP_CBA_EVENT;
-
- PIMAGEHLP_DEFERRED_SYMBOL_LOAD64 = ^IMAGEHLP_DEFERRED_SYMBOL_LOAD64;
- {$EXTERNALSYM PIMAGEHLP_DEFERRED_SYMBOL_LOAD64}
- _IMAGEHLP_DEFERRED_SYMBOL_LOAD64 = record
- SizeOfStruct: DWORD; // set to sizeof(IMAGEHLP_DEFERRED_SYMBOL_LOAD64)
- BaseOfImage: DWORD64; // base load address of module
- CheckSum: DWORD; // checksum from the pe header
- TimeDateStamp: DWORD; // date/time stamp from pe header
- FileName: array [0..MAX_PATH - 1] of CHAR; // symbols file or image name
- Reparse: ByteBool; // load failure reparse
- hFile: HANDLE; // file handle, if passed
- Flags: DWORD; //
- end;
- {$EXTERNALSYM _IMAGEHLP_DEFERRED_SYMBOL_LOAD64}
- IMAGEHLP_DEFERRED_SYMBOL_LOAD64 = _IMAGEHLP_DEFERRED_SYMBOL_LOAD64;
- {$EXTERNALSYM IMAGEHLP_DEFERRED_SYMBOL_LOAD64}
- TImageHlpDeferredSymbolLoad64 = IMAGEHLP_DEFERRED_SYMBOL_LOAD64;
- PImageHlpDeferredSymbolLoad64 = PIMAGEHLP_DEFERRED_SYMBOL_LOAD64;
-
-const
- DSLFLAG_MISMATCHED_PDB = $1;
- {$EXTERNALSYM DSLFLAG_MISMATCHED_PDB}
- DSLFLAG_MISMATCHED_DBG = $2;
- {$EXTERNALSYM DSLFLAG_MISMATCHED_DBG}
-
-type
- PIMAGEHLP_DEFERRED_SYMBOL_LOAD = ^IMAGEHLP_DEFERRED_SYMBOL_LOAD;
- {$EXTERNALSYM PIMAGEHLP_DEFERRED_SYMBOL_LOAD}
- _IMAGEHLP_DEFERRED_SYMBOL_LOAD = record
- SizeOfStruct: DWORD; // set to sizeof(IMAGEHLP_DEFERRED_SYMBOL_LOAD)
- BaseOfImage: DWORD; // base load address of module
- CheckSum: DWORD; // checksum from the pe header
- TimeDateStamp: DWORD; // date/time stamp from pe header
- FileName: array [0..MAX_PATH - 1] of CHAR; // symbols file or image name
- Reparse: ByteBool; // load failure reparse
- hFile: HANDLE; // file handle, if passed
- end;
- {$EXTERNALSYM _IMAGEHLP_DEFERRED_SYMBOL_LOAD}
- IMAGEHLP_DEFERRED_SYMBOL_LOAD = _IMAGEHLP_DEFERRED_SYMBOL_LOAD;
- {$EXTERNALSYM IMAGEHLP_DEFERRED_SYMBOL_LOAD}
- TImageHlpDeferredSymbolLoad = IMAGEHLP_DEFERRED_SYMBOL_LOAD;
- PImageHlpDeferredSymbolLoad = PIMAGEHLP_DEFERRED_SYMBOL_LOAD;
-
- PIMAGEHLP_DUPLICATE_SYMBOL64 = ^IMAGEHLP_DUPLICATE_SYMBOL64;
- {$EXTERNALSYM PIMAGEHLP_DUPLICATE_SYMBOL64}
- _IMAGEHLP_DUPLICATE_SYMBOL64 = record
- SizeOfStruct: DWORD; // set to sizeof(IMAGEHLP_DUPLICATE_SYMBOL64)
- NumberOfDups: DWORD; // number of duplicates in the Symbol array
- Symbol: PIMAGEHLP_SYMBOL64; // array of duplicate symbols
- SelectedSymbol: DWORD; // symbol selected (-1 to start)
- end;
- {$EXTERNALSYM _IMAGEHLP_DUPLICATE_SYMBOL64}
- IMAGEHLP_DUPLICATE_SYMBOL64 = _IMAGEHLP_DUPLICATE_SYMBOL64;
- {$EXTERNALSYM IMAGEHLP_DUPLICATE_SYMBOL64}
- TImageHlpDuplicateSymbol64 = IMAGEHLP_DUPLICATE_SYMBOL64;
- PImageHlpDuplicateSymbol64 = PIMAGEHLP_DUPLICATE_SYMBOL64;
-
- PIMAGEHLP_DUPLICATE_SYMBOL = ^IMAGEHLP_DUPLICATE_SYMBOL;
- {$EXTERNALSYM PIMAGEHLP_DUPLICATE_SYMBOL}
- _IMAGEHLP_DUPLICATE_SYMBOL = record
- SizeOfStruct: DWORD; // set to sizeof(IMAGEHLP_DUPLICATE_SYMBOL)
- NumberOfDups: DWORD; // number of duplicates in the Symbol array
- Symbol: PIMAGEHLP_SYMBOL; // array of duplicate symbols
- SelectedSymbol: DWORD; // symbol selected (-1 to start)
- end;
- {$EXTERNALSYM _IMAGEHLP_DUPLICATE_SYMBOL}
- IMAGEHLP_DUPLICATE_SYMBOL = _IMAGEHLP_DUPLICATE_SYMBOL;
- {$EXTERNALSYM IMAGEHLP_DUPLICATE_SYMBOL}
- TImageHlpDuplicateSymbol = IMAGEHLP_DUPLICATE_SYMBOL;
- PImageHlpDuplicateSymbol = PIMAGEHLP_DUPLICATE_SYMBOL;
-
-// If dbghelp ever needs to display graphical UI, it will use this as the parent window.
-
-//BOOL
-//SymSetParentWindow(
-// HWND hwnd
-// );
-
-//
-// options that are set/returned by SymSetOptions() & SymGetOptions()
-// these are used as a mask
-//
-
-const
- SYMOPT_CASE_INSENSITIVE = $00000001;
- {$EXTERNALSYM SYMOPT_CASE_INSENSITIVE}
- SYMOPT_UNDNAME = $00000002;
- {$EXTERNALSYM SYMOPT_UNDNAME}
- SYMOPT_DEFERRED_LOADS = $00000004;
- {$EXTERNALSYM SYMOPT_DEFERRED_LOADS}
- SYMOPT_NO_CPP = $00000008;
- {$EXTERNALSYM SYMOPT_NO_CPP}
- SYMOPT_LOAD_LINES = $00000010;
- {$EXTERNALSYM SYMOPT_LOAD_LINES}
- SYMOPT_OMAP_FIND_NEAREST = $00000020;
- {$EXTERNALSYM SYMOPT_OMAP_FIND_NEAREST}
- SYMOPT_LOAD_ANYTHING = $00000040;
- {$EXTERNALSYM SYMOPT_LOAD_ANYTHING}
- SYMOPT_IGNORE_CVREC = $00000080;
- {$EXTERNALSYM SYMOPT_IGNORE_CVREC}
- SYMOPT_NO_UNQUALIFIED_LOADS = $00000100;
- {$EXTERNALSYM SYMOPT_NO_UNQUALIFIED_LOADS}
- SYMOPT_FAIL_CRITICAL_ERRORS = $00000200;
- {$EXTERNALSYM SYMOPT_FAIL_CRITICAL_ERRORS}
- SYMOPT_EXACT_SYMBOLS = $00000400;
- {$EXTERNALSYM SYMOPT_EXACT_SYMBOLS}
- SYMOPT_ALLOW_ABSOLUTE_SYMBOLS = $00000800;
- {$EXTERNALSYM SYMOPT_ALLOW_ABSOLUTE_SYMBOLS}
- SYMOPT_IGNORE_NT_SYMPATH = $00001000;
- {$EXTERNALSYM SYMOPT_IGNORE_NT_SYMPATH}
- SYMOPT_INCLUDE_32BIT_MODULES = $00002000;
- {$EXTERNALSYM SYMOPT_INCLUDE_32BIT_MODULES}
- SYMOPT_PUBLICS_ONLY = $00004000;
- {$EXTERNALSYM SYMOPT_PUBLICS_ONLY}
- SYMOPT_NO_PUBLICS = $00008000;
- {$EXTERNALSYM SYMOPT_NO_PUBLICS}
- SYMOPT_AUTO_PUBLICS = $00010000;
- {$EXTERNALSYM SYMOPT_AUTO_PUBLICS}
- SYMOPT_NO_IMAGE_SEARCH = $00020000;
- {$EXTERNALSYM SYMOPT_NO_IMAGE_SEARCH}
- SYMOPT_SECURE = $00040000;
- {$EXTERNALSYM SYMOPT_SECURE}
-
- SYMOPT_DEBUG = DWORD($80000000);
- {$EXTERNALSYM SYMOPT_DEBUG}
-
-function SymSetOptions(SymOptions: DWORD): DWORD; stdcall;
-{$EXTERNALSYM SymSetOptions}
-
-function SymGetOptions: DWORD; stdcall;
-{$EXTERNALSYM SymGetOptions}
-
-function SymCleanup(hProcess: HANDLE): BOOL; stdcall;
-{$EXTERNALSYM SymCleanup}
-
-function SymMatchString(string_, expression: LPSTR; fCase: BOOL): BOOL; stdcall;
-{$EXTERNALSYM SymMatchString}
-
-type
- PSYM_ENUMSOURCFILES_CALLBACK = function(pSourceFile: PSOURCEFILE; UserContext: PVOID): BOOL; stdcall;
- {$EXTERNALSYM PSYM_ENUMSOURCFILES_CALLBACK}
- PSymEnumSourceFilesCallback = PSYM_ENUMSOURCFILES_CALLBACK;
-
-function SymEnumSourceFiles(hProcess: HANDLE; ModBase: ULONG64; Mask: LPSTR;
- cbSrcFiles: PSYM_ENUMSOURCFILES_CALLBACK; UserContext: PVOID): BOOL; stdcall;
-{$EXTERNALSYM SymEnumSourceFiles}
-
-function SymEnumerateModules64(hProcess: HANDLE; EnumModulesCallback: PSYM_ENUMMODULES_CALLBACK64;
- UserContext: PVOID): BOOL; stdcall;
-{$EXTERNALSYM SymEnumerateModules64}
-
-function SymEnumerateModules(hProcess: HANDLE; EnumModulesCallback: PSYM_ENUMMODULES_CALLBACK;
- UserContext: PVOID): BOOL; stdcall;
-{$EXTERNALSYM SymEnumerateModules}
-
-function SymEnumerateSymbols64(hProcess: HANDLE; BaseOfDll: DWORD64;
- EnumSymbolsCallback: PSYM_ENUMSYMBOLS_CALLBACK64; UserContext: PVOID): BOOL; stdcall;
-{$EXTERNALSYM SymEnumerateSymbols64}
-
-function SymEnumerateSymbolsW64(hProcess: HANDLE; BaseOfDll: DWORD64;
- EnumSymbolsCallback: PSYM_ENUMSYMBOLS_CALLBACK64W; UserContext: PVOID): BOOL; stdcall;
-{$EXTERNALSYM SymEnumerateSymbolsW64}
-
-function SymEnumerateSymbols(hProcess: HANDLE; BaseOfDll: DWORD;
- EnumSymbolsCallback: PSYM_ENUMSYMBOLS_CALLBACK; UserContext: PVOID): BOOL; stdcall;
-{$EXTERNALSYM SymEnumerateSymbols}
-
-function SymEnumerateSymbolsW(hProcess: HANDLE; BaseOfDll: DWORD;
- EnumSymbolsCallback: PSYM_ENUMSYMBOLS_CALLBACKW; UserContext: PVOID): BOOL; stdcall;
-{$EXTERNALSYM SymEnumerateSymbolsW}
-
-function EnumerateLoadedModules64(hProcess: HANDLE; EnumLoadedModulesCallback: PENUMLOADED_MODULES_CALLBACK64;
- UserContext: PVOID): BOOL; stdcall;
-{$EXTERNALSYM EnumerateLoadedModules64}
-
-function EnumerateLoadedModules(hProcess: HANDLE; EnumLoadedModulesCallback: PENUMLOADED_MODULES_CALLBACK;
- UserContext: PVOID): BOOL; stdcall;
-{$EXTERNALSYM EnumerateLoadedModules}
-
-function SymFunctionTableAccess64(hProcess: HANDLE; AddrBase: DWORD64): PVOID; stdcall;
-{$EXTERNALSYM SymFunctionTableAccess64}
-
-function SymFunctionTableAccess(hProcess: HANDLE; AddrBase: DWORD): PVOID; stdcall;
-{$EXTERNALSYM SymFunctionTableAccess}
-
-function SymGetModuleInfo64(hProcess: HANDLE; qwAddr: DWORD64;
- var ModuleInfo: IMAGEHLP_MODULE64): BOOL; stdcall;
-{$EXTERNALSYM SymGetModuleInfo64}
-
-function SymGetModuleInfoW64(hProcess: HANDLE; qwAddr: DWORD64;
- var ModuleInfo: IMAGEHLP_MODULEW64): BOOL; stdcall;
-{$EXTERNALSYM SymGetModuleInfoW64}
-
-function SymGetModuleInfo(hProcess: HANDLE; dwAddr: DWORD;
- var ModuleInfo: IMAGEHLP_MODULE): BOOL; stdcall;
-{$EXTERNALSYM SymGetModuleInfo}
-
-function SymGetModuleInfoW(hProcess: HANDLE; dwAddr: DWORD;
- var ModuleInfo: IMAGEHLP_MODULEW): BOOL; stdcall;
-{$EXTERNALSYM SymGetModuleInfoW}
-
-function SymGetModuleBase64(hProcess: HANDLE; qwAddr: DWORD64): DWORD64; stdcall;
-{$EXTERNALSYM SymGetModuleBase64}
-
-function SymGetModuleBase(hProcess: HANDLE; dwAddr: DWORD): DWORD; stdcall;
-{$EXTERNALSYM SymGetModuleBase}
-
-function SymGetSymNext64(hProcess: HANDLE; var Symbol: IMAGEHLP_SYMBOL64): BOOL; stdcall;
-{$EXTERNALSYM SymGetSymNext64}
-
-function SymGetSymNext(hProcess: HANDLE; var Symbol: IMAGEHLP_SYMBOL): BOOL; stdcall;
-{$EXTERNALSYM SymGetSymNext}
-
-function SymGetSymPrev64(hProcess: HANDLE; var Symbol: IMAGEHLP_SYMBOL64): BOOL; stdcall;
-{$EXTERNALSYM SymGetSymPrev64}
-
-function SymGetSymPrev(hProcess: HANDLE; var Symbol: IMAGEHLP_SYMBOL): BOOL; stdcall;
-{$EXTERNALSYM SymGetSymPrev}
-
-function SymGetLineFromAddr64(hProcess: HANDLE; qwAddr: DWORD64;
- var pdwDisplacement: DWORD; var Line64: IMAGEHLP_LINE64): BOOL; stdcall;
-{$EXTERNALSYM SymGetLineFromAddr64}
-
-function SymGetLineFromAddr(hProcess: HANDLE; dwAddr: DWORD;
- var pdwDisplacement: DWORD; var Line: IMAGEHLP_LINE): BOOL; stdcall;
-{$EXTERNALSYM SymGetLineFromAddr}
-
-function SymGetLineFromName64(hProcess: HANDLE; ModuleName: PSTR; FileName: PSTR;
- dwLineNumber: DWORD; var plDisplacement: LONG; var Line: IMAGEHLP_LINE64): BOOL; stdcall;
-{$EXTERNALSYM SymGetLineFromName64}
-
-function SymGetLineFromName(hProcess: HANDLE; ModuleName: PSTR; FileName: PSTR;
- dwLineNumber: DWORD; var plDisplacement: LONG; var Line: IMAGEHLP_LINE): BOOL; stdcall;
-{$EXTERNALSYM SymGetLineFromName}
-
-function SymGetLineNext64(hProcess: HANDLE; var Line: IMAGEHLP_LINE64): BOOL; stdcall;
-{$EXTERNALSYM SymGetLineNext64}
-
-function SymGetLineNext(hProcess: HANDLE; var Line: IMAGEHLP_LINE): BOOL; stdcall;
-{$EXTERNALSYM SymGetLineNext}
-
-function SymGetLinePrev64(hProcess: HANDLE; var Line: IMAGEHLP_LINE64): BOOL; stdcall;
-{$EXTERNALSYM SymGetLinePrev64}
-
-function SymGetLinePrev(hProcess: HANDLE; var Line: IMAGEHLP_LINE): BOOL; stdcall;
-{$EXTERNALSYM SymGetLinePrev}
-
-function SymMatchFileName(FileName, Match: PSTR; var FileNameStop, MatchStop: PSTR): BOOL; stdcall;
-{$EXTERNALSYM SymMatchFileName}
-
-function SymInitialize(hProcess: HANDLE; UserSearchPath: PSTR; fInvadeProcess: BOOL): BOOL; stdcall;
-{$EXTERNALSYM SymInitialize}
-
-function SymGetSearchPath(hProcess: HANDLE; SearchPath: PSTR; SearchPathLength: DWORD): BOOL; stdcall;
-{$EXTERNALSYM SymGetSearchPath}
-
-function SymSetSearchPath(hProcess: HANDLE; SearchPath: PSTR): BOOL; stdcall;
-{$EXTERNALSYM SymSetSearchPath}
-
-function SymLoadModule64(hProcess, hFile: HANDLE; ImageName, ModuleName: PSTR;
- BaseOfDll: DWORD64; SizeOfDll: DWORD): DWORD64; stdcall;
-{$EXTERNALSYM SymLoadModule64}
-
-const
- SLMFLAG_VIRTUAL = $1;
- {$EXTERNALSYM SLMFLAG_VIRTUAL}
-
-function SymLoadModuleEx(hProcess, hFile: HANDLE; ImageName, ModuleName: PSTR; BaseOfDll: DWORD64;
- DllSize: DWORD; Data: PMODLOAD_DATA; Flag: DWORD): DWORD64; stdcall;
-{$EXTERNALSYM SymLoadModuleEx}
-
-function SymLoadModule(hProcess, hFile: HANDLE; ImageName, ModuleName: PSTR;
- BaseOfDll: DWORD; SizeOfDll: DWORD): DWORD; stdcall;
-{$EXTERNALSYM SymLoadModule}
-
-function SymUnloadModule64(hProcess: HANDLE; BaseOfDll: DWORD64): BOOL; stdcall;
-{$EXTERNALSYM SymUnloadModule64}
-
-function SymUnloadModule(hProcess: HANDLE; BaseOfDll: DWORD): BOOL; stdcall;
-{$EXTERNALSYM SymUnloadModule}
-
-function SymUnDName64(const sym: IMAGEHLP_SYMBOL64; UnDecName: PSTR;
- UnDecNameLength: DWORD): BOOL; stdcall;
-{$EXTERNALSYM SymUnDName64}
-
-function SymUnDName(const sym: IMAGEHLP_SYMBOL; UnDecName: PSTR;
- UnDecNameLength: DWORD): BOOL; stdcall;
-{$EXTERNALSYM SymUnDName}
-
-function SymRegisterCallback64(hProcess: HANDLE; CallbackFunction: PSYMBOL_REGISTERED_CALLBACK64;
- UserContext: ULONG64): BOOL; stdcall;
-{$EXTERNALSYM SymRegisterCallback64}
-
-function SymRegisterFunctionEntryCallback64(hProcess: HANDLE; CallbackFunction: PSYMBOL_FUNCENTRY_CALLBACK64;
- UserContext: ULONG64): BOOL; stdcall;
-{$EXTERNALSYM SymRegisterFunctionEntryCallback64}
-
-function SymRegisterCallback(hProcess: HANDLE; CallbackFunction: PSYMBOL_REGISTERED_CALLBACK;
- UserContext: PVOID): BOOL; stdcall;
-{$EXTERNALSYM SymRegisterCallback}
-
-function SymRegisterFunctionEntryCallback(hProcess: HANDLE; CallbackFunction: PSYMBOL_FUNCENTRY_CALLBACK;
- UserContext: PVOID): BOOL; stdcall;
-{$EXTERNALSYM SymRegisterFunctionEntryCallback}
-
-type
- PIMAGEHLP_SYMBOL_SRC = ^IMAGEHLP_SYMBOL_SRC;
- {$EXTERNALSYM PIMAGEHLP_SYMBOL_SRC}
- _IMAGEHLP_SYMBOL_SRC = record
- sizeofstruct: DWORD;
- type_: DWORD;
- file_: array [0..MAX_PATH - 1] of Char;
- end;
- {$EXTERNALSYM _IMAGEHLP_SYMBOL_SRC}
- IMAGEHLP_SYMBOL_SRC = _IMAGEHLP_SYMBOL_SRC;
- {$EXTERNALSYM IMAGEHLP_SYMBOL_SRC}
- TImageHlpSymbolSrc = IMAGEHLP_SYMBOL_SRC;
- PImageHlpSymbolSrc = PIMAGEHLP_SYMBOL_SRC;
-
- PMODULE_TYPE_INFO = ^MODULE_TYPE_INFO;
- {$EXTERNALSYM PMODULE_TYPE_INFO}
- _MODULE_TYPE_INFO = record
- dataLength: USHORT;
- leaf: USHORT;
- data: array [0..0] of BYTE;
- end;
- {$EXTERNALSYM _MODULE_TYPE_INFO}
- MODULE_TYPE_INFO = _MODULE_TYPE_INFO;
- {$EXTERNALSYM MODULE_TYPE_INFO}
- TModuleTypeInfo = MODULE_TYPE_INFO;
- PModuleTypeInfo = PMODULE_TYPE_INFO;
-
-type
- PSYMBOL_INFO = ^SYMBOL_INFO;
- {$EXTERNALSYM PSYMBOL_INFO}
- _SYMBOL_INFO = record
- SizeOfStruct: ULONG;
- TypeIndex: ULONG; // Type Index of symbol
- Reserved: array [0..1] of ULONG64;
- Info: ULONG;
- Size: ULONG;
- ModBase: ULONG64; // Base Address of module comtaining this symbol
- Flags: ULONG;
- Value: ULONG64; // Value of symbol, ValuePresent should be 1
- Address: ULONG64; // Address of symbol including base address of module
- Register_: ULONG; // register holding value or pointer to value
- Scope: ULONG; // scope of the symbol
- Tag: ULONG; // pdb classification
- NameLen: ULONG; // Actual length of name
- MaxNameLen: ULONG;
- Name: array [0..0] of CHAR; // Name of symbol
- end;
- {$EXTERNALSYM _SYMBOL_INFO}
- SYMBOL_INFO = _SYMBOL_INFO;
- {$EXTERNALSYM SYMBOL_INFO}
- TSymbolInfo = SYMBOL_INFO;
- PSymbolInfo = PSYMBOL_INFO;
-
- _SYMBOL_INFO_PACKAGE = record
- si: SYMBOL_INFO;
- name: array [0..MAX_SYM_NAME] of CHAR;
- end;
- {$EXTERNALSYM _SYMBOL_INFO_PACKAGE}
- SYMBOL_INFO_PACKAGE = _SYMBOL_INFO_PACKAGE;
- {$EXTERNALSYM SYMBOL_INFO_PACKAGE}
- PSYMBOL_INFO_PACKAGE = ^SYMBOL_INFO_PACKAGE;
- {$EXTERNALSYM PSYMBOL_INFO_PACKAGE}
- TSymbolInfoPackage = SYMBOL_INFO_PACKAGE;
- PSymbolInfoPackage = PSYMBOL_INFO_PACKAGE;
-
- PIMAGEHLP_STACK_FRAME = ^IMAGEHLP_STACK_FRAME;
- {$EXTERNALSYM PIMAGEHLP_STACK_FRAME}
- _IMAGEHLP_STACK_FRAME = record
- InstructionOffset: ULONG64;
- ReturnOffset: ULONG64;
- FrameOffset: ULONG64;
- StackOffset: ULONG64;
- BackingStoreOffset: ULONG64;
- FuncTableEntry: ULONG64;
- Params: array [0..3] of ULONG64;
- Reserved: array [0..4] of ULONG64;
- Virtual_: BOOL;
- Reserved2: ULONG;
- end;
- {$EXTERNALSYM _IMAGEHLP_STACK_FRAME}
- IMAGEHLP_STACK_FRAME = _IMAGEHLP_STACK_FRAME;
- {$EXTERNALSYM IMAGEHLP_STACK_FRAME}
- TImageHlpStackFrame = IMAGEHLP_STACK_FRAME;
- PImageHlpStackFrame = PIMAGEHLP_STACK_FRAME;
-
- IMAGEHLP_CONTEXT = LPVOID;
- {$EXTERNALSYM IMAGEHLP_CONTEXT}
- PIMAGEHLP_CONTEXT = ^IMAGEHLP_CONTEXT;
- {$EXTERNALSYM PIMAGEHLP_CONTEXT}
- TImageHlpContext = IMAGEHLP_CONTEXT;
- PImageHlpContext = PIMAGEHLP_CONTEXT;
-
-function SymSetContext(hProcess: HANDLE; StackFrame: PIMAGEHLP_STACK_FRAME; Context: PIMAGEHLP_CONTEXT): BOOL; stdcall;
-{$EXTERNALSYM SymSetContext}
-
-function SymFromAddr(hProcess: HANDLE; Address: DWORD64; Displacement: PDWORD64; Symbol: PSYMBOL_INFO): BOOL; stdcall;
-{$EXTERNALSYM SymFromAddr}
-
-// While SymFromName will provide a symbol from a name,
-// SymEnumSymbols can provide the same matching information
-// for ALL symbols with a matching name, even regular
-// expressions. That way you can search across modules
-// and differentiate between identically named symbols.
-
-function SymFromName(hProcess: HANDLE; Name: LPSTR; Symbol: PSYMBOL_INFO): BOOL; stdcall;
-{$EXTERNALSYM SymFromName}
-
-type
- PSYM_ENUMERATESYMBOLS_CALLBACK = function(pSymInfo: PSYMBOL_INFO; SymbolSize: ULONG; UserContext: PVOID): BOOL; stdcall;
- {$EXTERNALSYM PSYM_ENUMERATESYMBOLS_CALLBACK}
- PSymEnumerateSymbolsCallback = PSYM_ENUMERATESYMBOLS_CALLBACK;
-
-function SymEnumSymbols(hProcess: HANDLE; BaseOfDll: ULONG64; Mask: PCSTR; EnumSymbolsCallback: PSYM_ENUMERATESYMBOLS_CALLBACK; UserContext: PVOID): BOOL; stdcall;
-{$EXTERNALSYM SymEnumSymbols}
-
-function SymEnumSymbolsForAddr(hProcess: HANDLE; Address: DWORD64;
- EnumSymbolsCallback: PSYM_ENUMERATESYMBOLS_CALLBACK; UserContext: PVOID): BOOL; stdcall;
-{$EXTERNALSYM SymEnumSymbolsForAddr}
-
-type
- _IMAGEHLP_SYMBOL_TYPE_INFO = (
- TI_GET_SYMTAG,
- TI_GET_SYMNAME,
- TI_GET_LENGTH,
- TI_GET_TYPE,
- TI_GET_TYPEID,
- TI_GET_BASETYPE,
- TI_GET_ARRAYINDEXTYPEID,
- TI_FINDCHILDREN,
- TI_GET_DATAKIND,
- TI_GET_ADDRESSOFFSET,
- TI_GET_OFFSET,
- TI_GET_VALUE,
- TI_GET_COUNT,
- TI_GET_CHILDRENCOUNT,
- TI_GET_BITPOSITION,
- TI_GET_VIRTUALBASECLASS,
- TI_GET_VIRTUALTABLESHAPEID,
- TI_GET_VIRTUALBASEPOINTEROFFSET,
- TI_GET_CLASSPARENTID,
- TI_GET_NESTED,
- TI_GET_SYMINDEX,
- TI_GET_LEXICALPARENT,
- TI_GET_ADDRESS,
- TI_GET_THISADJUST,
- TI_GET_UDTKIND,
- TI_IS_EQUIV_TO,
- TI_GET_CALLING_CONVENTION);
- {$EXTERNALSYM _IMAGEHLP_SYMBOL_TYPE_INFO}
- IMAGEHLP_SYMBOL_TYPE_INFO = _IMAGEHLP_SYMBOL_TYPE_INFO;
- {$EXTERNALSYM IMAGEHLP_SYMBOL_TYPE_INFO}
- TImageHlpSymbolTypeInfo = IMAGEHLP_SYMBOL_TYPE_INFO;
-
- PTI_FINDCHILDREN_PARAMS = ^TI_FINDCHILDREN_PARAMS;
- {$EXTERNALSYM PTI_FINDCHILDREN_PARAMS}
- _TI_FINDCHILDREN_PARAMS = record
- Count: ULONG;
- Start: ULONG;
- ChildId: array [0..0] of ULONG;
- end;
- {$EXTERNALSYM _TI_FINDCHILDREN_PARAMS}
- TI_FINDCHILDREN_PARAMS = _TI_FINDCHILDREN_PARAMS;
- {$EXTERNALSYM TI_FINDCHILDREN_PARAMS}
- TTiFindChildrenParams = TI_FINDCHILDREN_PARAMS;
- PTiFindChildrenParams = PTI_FINDCHILDREN_PARAMS;
-
-function SymGetTypeInfo(hProcess: HANDLE; ModBase: DWORD64; TypeId: ULONG; GetType: IMAGEHLP_SYMBOL_TYPE_INFO; pInfo: PVOID): BOOL; stdcall;
-{$EXTERNALSYM SymGetTypeInfo}
-
-function SymEnumTypes(hProcess: HANDLE; BaseOfDll: ULONG64; EnumSymbolsCallback: PSYM_ENUMERATESYMBOLS_CALLBACK; UserContext: PVOID): BOOL; stdcall;
-{$EXTERNALSYM SymEnumTypes}
-
-function SymGetTypeFromName(hProcess: HANDLE; BaseOfDll: ULONG64; Name: LPSTR; Symbol: PSYMBOL_INFO): BOOL; stdcall;
-{$EXTERNALSYM SymGetTypeFromName}
-
-function SymAddSymbol(hProcess: HANDLE; BaseOfDll: ULONG64; Name: PCSTR; Address: DWORD64; Size, Flags: DWORD): BOOL; stdcall;
-{$EXTERNALSYM SymAddSymbol}
-
-function SymDeleteSymbol(hProcess: HANDLE; BaseOfDll: ULONG64; Name: PCSTR; Address: DWORD64; Flags: DWORD): BOOL; stdcall;
-{$EXTERNALSYM SymDeleteSymbol}
-
-//
-// Full user-mode dump creation.
-//
-
-type
- PDBGHELP_CREATE_USER_DUMP_CALLBACK = function(DataType: DWORD; var Data: PVOID; DataLength: LPDWORD; UserData: PVOID): BOOL; stdcall;
- {$EXTERNALSYM PDBGHELP_CREATE_USER_DUMP_CALLBACK}
- PDbgHelpCreateUserDumpCallback = PDBGHELP_CREATE_USER_DUMP_CALLBACK;
-
-function DbgHelpCreateUserDump(FileName: LPSTR; Callback: PDBGHELP_CREATE_USER_DUMP_CALLBACK; UserData: PVOID): BOOL; stdcall;
-{$EXTERNALSYM DbgHelpCreateUserDump}
-
-function DbgHelpCreateUserDumpW(FileName: LPWSTR; Callback: PDBGHELP_CREATE_USER_DUMP_CALLBACK; UserData: PVOID): BOOL; stdcall;
-{$EXTERNALSYM DbgHelpCreateUserDumpW}
-
-// -----------------------------------------------------------------
-// The following 4 legacy APIs are fully supported, but newer
-// ones are recommended. SymFromName and SymFromAddr provide
-// much more detailed info on the returned symbol.
-
-function SymGetSymFromAddr64(hProcess: HANDLE; qwAddr: DWORD64; pdwDisplacement: PDWORD64; Symbol: PIMAGEHLP_SYMBOL64): BOOL; stdcall;
-{$EXTERNALSYM SymGetSymFromAddr64}
-
-function SymGetSymFromAddr(hProcess: HANDLE; dwAddr: DWORD; pdwDisplacement: PDWORD; Symbol: PIMAGEHLP_SYMBOL): BOOL; stdcall;
-{$EXTERNALSYM SymGetSymFromAddr}
-
-// While following two APIs will provide a symbol from a name,
-// SymEnumSymbols can provide the same matching information
-// for ALL symbols with a matching name, even regular
-// expressions. That way you can search across modules
-// and differentiate between identically named symbols.
-
-function SymGetSymFromName64(hProcess: HANDLE; Name: PSTR; Symbol: PIMAGEHLP_SYMBOL64): BOOL; stdcall;
-{$EXTERNALSYM SymGetSymFromName64}
-
-function SymGetSymFromName(hProcess: HANDLE; Name: PSTR; Symbol: PIMAGEHLP_SYMBOL): BOOL; stdcall;
-{$EXTERNALSYM SymGetSymFromName}
-
-// -----------------------------------------------------------------
-// The following APIs exist only for backwards compatibility
-// with a pre-release version documented in an MSDN release.
-
-// You should use SymFindFileInPath if you want to maintain
-// future compatibility.
-
-function FindFileInPath(hprocess: HANDLE; SearchPath: LPSTR; FileName: LPSTR; id: PVOID; two: DWORD; three: DWORD; flags: DWORD; FilePath: LPSTR): BOOL; stdcall;
-{$EXTERNALSYM FindFileInPath}
-
-// You should use SymFindFileInPath if you want to maintain
-// future compatibility.
-
-function FindFileInSearchPath(hprocess: HANDLE; SearchPath: LPSTR; FileName: LPSTR; one: DWORD; two: DWORD; three: DWORD; FilePath: LPSTR): BOOL; stdcall;
-{$EXTERNALSYM FindFileInSearchPath}
-
-function SymEnumSym(hProcess: HANDLE; BaseOfDll: ULONG64; EnumSymbolsCallback: PSYM_ENUMERATESYMBOLS_CALLBACK; UserContext: PVOID): BOOL; stdcall;
-{$EXTERNALSYM SymEnumSym}
-
-// These values should not be used.
-// They have been replaced by SYMFLAG_ values.
-
-const
- SYMF_OMAP_GENERATED = $00000001;
- SYMF_OMAP_MODIFIED = $00000002;
- SYMF_REGISTER = $00000008;
- SYMF_REGREL = $00000010;
- SYMF_FRAMEREL = $00000020;
- SYMF_PARAMETER = $00000040;
- SYMF_LOCAL = $00000080;
- SYMF_CONSTANT = $00000100;
- SYMF_EXPORT = $00000200;
- SYMF_FORWARDER = $00000400;
- SYMF_FUNCTION = $00000800;
- SYMF_VIRTUAL = $00001000;
- SYMF_THUNK = $00002000;
- SYMF_TLSREL = $00004000;
-
-// These values should also not be used.
-// They have been replaced by SYMFLAG_ values.
-
- IMAGEHLP_SYMBOL_INFO_VALUEPRESENT = 1;
- IMAGEHLP_SYMBOL_INFO_REGISTER = SYMF_REGISTER; // 0x0008
- IMAGEHLP_SYMBOL_INFO_REGRELATIVE = SYMF_REGREL; // 0x0010
- IMAGEHLP_SYMBOL_INFO_FRAMERELATIVE = SYMF_FRAMEREL; // 0x0020
- IMAGEHLP_SYMBOL_INFO_PARAMETER = SYMF_PARAMETER; // 0x0040
- IMAGEHLP_SYMBOL_INFO_LOCAL = SYMF_LOCAL; // 0x0080
- IMAGEHLP_SYMBOL_INFO_CONSTANT = SYMF_CONSTANT; // 0x0100
- IMAGEHLP_SYMBOL_FUNCTION = SYMF_FUNCTION; // 0x0800
- IMAGEHLP_SYMBOL_VIRTUAL = SYMF_VIRTUAL; // 0x1000
- IMAGEHLP_SYMBOL_THUNK = SYMF_THUNK; // 0x2000
- IMAGEHLP_SYMBOL_INFO_TLSRELATIVE = SYMF_TLSREL; // 0x4000
-
-const
- MINIDUMP_SIGNATURE = 'PMDM';
- {$EXTERNALSYM MINIDUMP_SIGNATURE}
- MINIDUMP_VERSION = 42899;
- {$EXTERNALSYM MINIDUMP_VERSION}
-
-type
- RVA = DWORD;
- {$EXTERNALSYM RVA}
- RVA64 = ULONG64;
- {$EXTERNALSYM RVA64}
-
- _MINIDUMP_LOCATION_DESCRIPTOR = record
- DataSize: ULONG32;
- Rva: RVA;
- end;
- {$EXTERNALSYM _MINIDUMP_LOCATION_DESCRIPTOR}
- MINIDUMP_LOCATION_DESCRIPTOR = _MINIDUMP_LOCATION_DESCRIPTOR;
- {$EXTERNALSYM MINIDUMP_LOCATION_DESCRIPTOR}
- TMinidumpLocationDescriptor = MINIDUMP_LOCATION_DESCRIPTOR;
- PMinidumpLocationDescriptor = ^MINIDUMP_LOCATION_DESCRIPTOR;
-
- _MINIDUMP_LOCATION_DESCRIPTOR64 = record
- DataSize: ULONG64;
- Rva: RVA64;
- end;
- {$EXTERNALSYM _MINIDUMP_LOCATION_DESCRIPTOR64}
- MINIDUMP_LOCATION_DESCRIPTOR64 = _MINIDUMP_LOCATION_DESCRIPTOR64;
- {$EXTERNALSYM MINIDUMP_LOCATION_DESCRIPTOR64}
- TMinidumpLocationDescriptor64 = MINIDUMP_LOCATION_DESCRIPTOR64;
- PMinidumpLocationDescriptor64 = ^MINIDUMP_LOCATION_DESCRIPTOR64;
-
- PMINIDUMP_MEMORY_DESCRIPTOR = ^MINIDUMP_MEMORY_DESCRIPTOR;
- {$EXTERNALSYM PMINIDUMP_MEMORY_DESCRIPTOR}
- _MINIDUMP_MEMORY_DESCRIPTOR = record
- StartOfMemoryRange: ULONG64;
- Memory: MINIDUMP_LOCATION_DESCRIPTOR;
- end;
- {$EXTERNALSYM _MINIDUMP_MEMORY_DESCRIPTOR}
- MINIDUMP_MEMORY_DESCRIPTOR = _MINIDUMP_MEMORY_DESCRIPTOR;
- {$EXTERNALSYM MINIDUMP_MEMORY_DESCRIPTOR}
- TMinidumpMemoryDescriptor = MINIDUMP_MEMORY_DESCRIPTOR;
- PMinidumpMemoryDescriptor = PMINIDUMP_MEMORY_DESCRIPTOR;
-
-// DESCRIPTOR64 is used for full-memory minidumps where
-// all of the raw memory is laid out sequentially at the
-// end of the dump. There is no need for individual RVAs
-// as the RVA is the base RVA plus the sum of the preceeding
-// data blocks.
-
- PMINIDUMP_MEMORY_DESCRIPTOR64 = ^MINIDUMP_MEMORY_DESCRIPTOR64;
- {$EXTERNALSYM PMINIDUMP_MEMORY_DESCRIPTOR64}
- _MINIDUMP_MEMORY_DESCRIPTOR64 = record
- StartOfMemoryRange: ULONG64;
- DataSize: ULONG64;
- end;
- {$EXTERNALSYM _MINIDUMP_MEMORY_DESCRIPTOR64}
- MINIDUMP_MEMORY_DESCRIPTOR64 = _MINIDUMP_MEMORY_DESCRIPTOR64;
- {$EXTERNALSYM MINIDUMP_MEMORY_DESCRIPTOR64}
- TMinidumpMemoryDescriptor64 = MINIDUMP_MEMORY_DESCRIPTOR64;
- PMinidumpMemoryDescriptor64 = PMINIDUMP_MEMORY_DESCRIPTOR64;
-
- PMINIDUMP_HEADER = ^MINIDUMP_HEADER;
- {$EXTERNALSYM PMINIDUMP_HEADER}
- _MINIDUMP_HEADER = record
- Signature: ULONG32;
- Version: ULONG32;
- NumberOfStreams: ULONG32;
- StreamDirectoryRva: RVA;
- CheckSum: ULONG32;
- U: record
- case Integer of
- 0: (Reserved: ULONG32);
- 1: (TimeDateStamp: ULONG32);
- end;
- Flags: ULONG64;
- end;
- {$EXTERNALSYM _MINIDUMP_HEADER}
- MINIDUMP_HEADER = _MINIDUMP_HEADER;
- {$EXTERNALSYM MINIDUMP_HEADER}
- TMinidumpHeader = MINIDUMP_HEADER;
- PMinidumpHeader = PMINIDUMP_HEADER;
-
-//
-// The MINIDUMP_HEADER field StreamDirectoryRva points to
-// an array of MINIDUMP_DIRECTORY structures.
-//
-
- PMINIDUMP_DIRECTORY = ^MINIDUMP_DIRECTORY;
- {$EXTERNALSYM PMINIDUMP_DIRECTORY}
- _MINIDUMP_DIRECTORY = record
- StreamType: ULONG32;
- Location: MINIDUMP_LOCATION_DESCRIPTOR;
- end;
- {$EXTERNALSYM _MINIDUMP_DIRECTORY}
- MINIDUMP_DIRECTORY = _MINIDUMP_DIRECTORY;
- {$EXTERNALSYM MINIDUMP_DIRECTORY}
- TMinidumpDirectory = MINIDUMP_DIRECTORY;
- PMinidumpDirectory = PMINIDUMP_DIRECTORY;
-
- PMINIDUMP_STRING = ^MINIDUMP_STRING;
- {$EXTERNALSYM PMINIDUMP_STRING}
- _MINIDUMP_STRING = record
- Length: ULONG32; // Length in bytes of the string
- Buffer: PWCHAR; // Variable size buffer
- end;
- {$EXTERNALSYM _MINIDUMP_STRING}
- MINIDUMP_STRING = _MINIDUMP_STRING;
- {$EXTERNALSYM MINIDUMP_STRING}
- TMinidumpString = MINIDUMP_STRING;
- PMinidumpString = PMINIDUMP_STRING;
-
-//
-// The MINIDUMP_DIRECTORY field StreamType may be one of the following types.
-// Types will be added in the future, so if a program reading the minidump
-// header encounters a stream type it does not understand it should ignore
-// the data altogether. Any tag above LastReservedStream will not be used by
-// the system and is reserved for program-specific information.
-//
-
-const
- UnusedStream = 0;
- {$EXTERNALSYM UnusedStream}
- ReservedStream0 = 1;
- {$EXTERNALSYM ReservedStream0}
- ReservedStream1 = 2;
- {$EXTERNALSYM ReservedStream1}
- ThreadListStream = 3;
- {$EXTERNALSYM ThreadListStream}
- ModuleListStream = 4;
- {$EXTERNALSYM ModuleListStream}
- MemoryListStream = 5;
- {$EXTERNALSYM MemoryListStream}
- ExceptionStream = 6;
- {$EXTERNALSYM ExceptionStream}
- SystemInfoStream = 7;
- {$EXTERNALSYM SystemInfoStream}
- ThreadExListStream = 8;
- {$EXTERNALSYM ThreadExListStream}
- Memory64ListStream = 9;
- {$EXTERNALSYM Memory64ListStream}
- CommentStreamA = 10;
- {$EXTERNALSYM CommentStreamA}
- CommentStreamW = 11;
- {$EXTERNALSYM CommentStreamW}
- HandleDataStream = 12;
- {$EXTERNALSYM HandleDataStream}
- FunctionTableStream = 13;
- {$EXTERNALSYM FunctionTableStream}
- UnloadedModuleListStream = 14;
- {$EXTERNALSYM UnloadedModuleListStream}
- MiscInfoStream = 15;
- {$EXTERNALSYM MiscInfoStream}
-
- LastReservedStream = $ffff;
- {$EXTERNALSYM LastReservedStream}
-
-type
- _MINIDUMP_STREAM_TYPE = DWORD;
- {$EXTERNALSYM MINIDUMP_STREAM_TYPE}
- MINIDUMP_STREAM_TYPE = _MINIDUMP_STREAM_TYPE;
- {$EXTERNALSYM _MINIDUMP_STREAM_TYPE}
- TMinidumpStreamType = MINIDUMP_STREAM_TYPE;
-
-//
-// The minidump system information contains processor and
-// Operating System specific information.
-//
-
-type
- _CPU_INFORMATION = record
- case Integer of
-
- //
- // X86 platforms use CPUID function to obtain processor information.
- //
-
- 0: (
-
- //
- // CPUID Subfunction 0, register EAX (VendorId [0]),
- // EBX (VendorId [1]) and ECX (VendorId [2]).
- //
-
- VendorId: array [0..2] of ULONG32;
-
- //
- // CPUID Subfunction 1, register EAX
- //
-
- VersionInformation: ULONG32;
-
- //
- // CPUID Subfunction 1, register EDX
- //
-
- FeatureInformation: ULONG32;
-
- //
- // CPUID, Subfunction 80000001, register EBX. This will only
- // be obtained if the vendor id is "AuthenticAMD".
- //
-
- AMDExtendedCpuFeatures: ULONG32);
-
- //
- // Non-x86 platforms use processor feature flags.
- //
-
- 1: (
- ProcessorFeatures: array [0..1] of ULONG64);
- end;
-
- _MINIDUMP_SYSTEM_INFO = record
-
- //
- // ProcessorArchitecture, ProcessorLevel and ProcessorRevision are all
- // taken from the SYSTEM_INFO structure obtained by GetSystemInfo( ).
- //
-
- ProcessorArchitecture: USHORT;
- ProcessorLevel: USHORT;
- ProcessorRevision: USHORT;
-
- U: record
- case Integer of
- 0: (Reserved0: USHORT);
- 1: (
- NumberOfProcessors: UCHAR;
- ProductType: UCHAR);
- end;
-
- //
- // MajorVersion, MinorVersion, BuildNumber, PlatformId and
- // CSDVersion are all taken from the OSVERSIONINFO structure
- // returned by GetVersionEx( ).
- //
-
- MajorVersion: ULONG32;
- MinorVersion: ULONG32;
- BuildNumber: ULONG32;
- PlatformId: ULONG32;
-
- //
- // RVA to a CSDVersion string in the string table.
- //
-
- CSDVersionRva: RVA;
-
- U2: record
- case Integer of
- 0: (Reserved1: ULONG32);
- 1: (
- SuiteMask: USHORT;
- Reserved2: USHORT);
- end;
-
- //
- // CPU information is obtained from one of two places.
- //
- // 1) On x86 computers, CPU_INFORMATION is obtained from the CPUID
- // instruction. You must use the X86 portion of the union for X86
- // computers.
- //
- // 2) On non-x86 architectures, CPU_INFORMATION is obtained by calling
- // IsProcessorFeatureSupported().
- //
-
- Cpu: _CPU_INFORMATION;
- end;
- {$EXTERNALSYM _MINIDUMP_SYSTEM_INFO}
- MINIDUMP_SYSTEM_INFO = _MINIDUMP_SYSTEM_INFO;
- {$EXTERNALSYM MINIDUMP_SYSTEM_INFO}
- PMINIDUMP_SYSTEM_INFO = ^MINIDUMP_SYSTEM_INFO;
- {$EXTERNALSYM PMINIDUMP_SYSTEM_INFO}
- TMinidumpSystemInfo = MINIDUMP_SYSTEM_INFO;
- PMinidumpSystemInfo = PMINIDUMP_SYSTEM_INFO;
-
- CPU_INFORMATION = _CPU_INFORMATION;
- {$EXTERNALSYM CPU_INFORMATION}
- PCPU_INFORMATION = CPU_INFORMATION;
- {$EXTERNALSYM PCPU_INFORMATION}
-
-//
-// The minidump thread contains standard thread
-// information plus an RVA to the memory for this
-// thread and an RVA to the CONTEXT structure for
-// this thread.
-//
-
-//
-// ThreadId must be 4 bytes on all architectures.
-//
-
-// C_ASSERT (sizeof ( ((PPROCESS_INFORMATION)0)->dwThreadId ) == 4);
-
-type
- PMINIDUMP_THREAD = ^MINIDUMP_THREAD;
- {$EXTERNALSYM PMINIDUMP_THREAD}
- _MINIDUMP_THREAD = record
- ThreadId: ULONG32;
- SuspendCount: ULONG32;
- PriorityClass: ULONG32;
- Priority: ULONG32;
- Teb: ULONG64;
- Stack: MINIDUMP_MEMORY_DESCRIPTOR;
- ThreadContext: MINIDUMP_LOCATION_DESCRIPTOR;
- end;
- {$EXTERNALSYM _MINIDUMP_THREAD}
- MINIDUMP_THREAD = _MINIDUMP_THREAD;
- {$EXTERNALSYM MINIDUMP_THREAD}
- TMinidumpThread = MINIDUMP_THREAD;
- PMinidumpThread = PMINIDUMP_THREAD;
-
-//
-// The thread list is a container of threads.
-//
-
- PMINIDUMP_THREAD_LIST = ^MINIDUMP_THREAD_LIST;
- {$EXTERNALSYM PMINIDUMP_THREAD_LIST}
- _MINIDUMP_THREAD_LIST = record
- NumberOfThreads: ULONG32;
- Threads: array [0..0] of MINIDUMP_THREAD;
- end;
- {$EXTERNALSYM _MINIDUMP_THREAD_LIST}
- MINIDUMP_THREAD_LIST = _MINIDUMP_THREAD_LIST;
- {$EXTERNALSYM MINIDUMP_THREAD_LIST}
- TMinidumpThreadList = MINIDUMP_THREAD_LIST;
- PMinidumpThreadList = PMINIDUMP_THREAD_LIST;
-
- PMINIDUMP_THREAD_EX = ^MINIDUMP_THREAD_EX;
- {$EXTERNALSYM PMINIDUMP_THREAD_EX}
- _MINIDUMP_THREAD_EX = record
- ThreadId: ULONG32;
- SuspendCount: ULONG32;
- PriorityClass: ULONG32;
- Priority: ULONG32;
- Teb: ULONG64;
- Stack: MINIDUMP_MEMORY_DESCRIPTOR;
- ThreadContext: MINIDUMP_LOCATION_DESCRIPTOR;
- BackingStore: MINIDUMP_MEMORY_DESCRIPTOR;
- end;
- {$EXTERNALSYM _MINIDUMP_THREAD_EX}
- MINIDUMP_THREAD_EX = _MINIDUMP_THREAD_EX;
- {$EXTERNALSYM MINIDUMP_THREAD_EX}
- TMinidumpThreadEx = MINIDUMP_THREAD_EX;
- PMinidumpThreadEx = PMINIDUMP_THREAD_EX;
-
-//
-// The thread list is a container of threads.
-//
-
- PMINIDUMP_THREAD_EX_LIST = ^MINIDUMP_THREAD_EX_LIST;
- {$EXTERNALSYM PMINIDUMP_THREAD_EX_LIST}
- _MINIDUMP_THREAD_EX_LIST = record
- NumberOfThreads: ULONG32;
- Threads: array [0..0] of MINIDUMP_THREAD_EX;
- end;
- {$EXTERNALSYM _MINIDUMP_THREAD_EX_LIST}
- MINIDUMP_THREAD_EX_LIST = _MINIDUMP_THREAD_EX_LIST;
- {$EXTERNALSYM MINIDUMP_THREAD_EX_LIST}
- TMinidumpThreadExList = MINIDUMP_THREAD_EX_LIST;
- PMinidumpThreadExList = PMINIDUMP_THREAD_EX_LIST;
-
-//
-// The MINIDUMP_EXCEPTION is the same as EXCEPTION on Win64.
-//
-
- PMINIDUMP_EXCEPTION = ^MINIDUMP_EXCEPTION;
- {$EXTERNALSYM PMINIDUMP_EXCEPTION}
- _MINIDUMP_EXCEPTION = record
- ExceptionCode: ULONG32;
- ExceptionFlags: ULONG32;
- ExceptionRecord: ULONG64;
- ExceptionAddress: ULONG64;
- NumberParameters: ULONG32;
- __unusedAlignment: ULONG32;
- ExceptionInformation: array [0..EXCEPTION_MAXIMUM_PARAMETERS - 1] of ULONG64;
- end;
- {$EXTERNALSYM _MINIDUMP_EXCEPTION}
- MINIDUMP_EXCEPTION = _MINIDUMP_EXCEPTION;
- {$EXTERNALSYM MINIDUMP_EXCEPTION}
- TMinidumpException = MINIDUMP_EXCEPTION;
- PMinidumpException = PMINIDUMP_EXCEPTION;
-
-//
-// The exception information stream contains the id of the thread that caused
-// the exception (ThreadId), the exception record for the exception
-// (ExceptionRecord) and an RVA to the thread context where the exception
-// occured.
-//
-
- PMINIDUMP_EXCEPTION_STREAM = ^MINIDUMP_EXCEPTION_STREAM;
- {$EXTERNALSYM PMINIDUMP_EXCEPTION_STREAM}
- _MINIDUMP_EXCEPTION_STREAM = record
- ThreadId: ULONG32;
- __alignment: ULONG32;
- ExceptionRecord: MINIDUMP_EXCEPTION;
- ThreadContext: MINIDUMP_LOCATION_DESCRIPTOR;
- end;
- {$EXTERNALSYM _MINIDUMP_EXCEPTION_STREAM}
- MINIDUMP_EXCEPTION_STREAM = _MINIDUMP_EXCEPTION_STREAM;
- {$EXTERNALSYM MINIDUMP_EXCEPTION_STREAM}
- TMinidumpExceptionStream = MINIDUMP_EXCEPTION_STREAM;
- PMinidumpExceptionStream = PMINIDUMP_EXCEPTION_STREAM;
-
-//
-// The MINIDUMP_MODULE contains information about a
-// a specific module. It includes the CheckSum and
-// the TimeDateStamp for the module so the module
-// can be reloaded during the analysis phase.
-//
-
- PMINIDUMP_MODULE = ^MINIDUMP_MODULE;
- {$EXTERNALSYM PMINIDUMP_MODULE}
- _MINIDUMP_MODULE = record
- BaseOfImage: ULONG64;
- SizeOfImage: ULONG32;
- CheckSum: ULONG32;
- TimeDateStamp: ULONG32;
- ModuleNameRva: RVA;
- VersionInfo: VS_FIXEDFILEINFO;
- CvRecord: MINIDUMP_LOCATION_DESCRIPTOR;
- MiscRecord: MINIDUMP_LOCATION_DESCRIPTOR;
- Reserved0: ULONG64; // Reserved for future use.
- Reserved1: ULONG64; // Reserved for future use.
- end;
- {$EXTERNALSYM _MINIDUMP_MODULE}
- MINIDUMP_MODULE = _MINIDUMP_MODULE;
- {$EXTERNALSYM MINIDUMP_MODULE}
- TMinidumpModule = MINIDUMP_MODULE;
- PMinidumpModule = PMINIDUMP_MODULE;
-
-//
-// The minidump module list is a container for modules.
-//
-
- PMINIDUMP_MODULE_LIST = ^MINIDUMP_MODULE_LIST;
- {$EXTERNALSYM PMINIDUMP_MODULE_LIST}
- _MINIDUMP_MODULE_LIST = record
- NumberOfModules: ULONG32;
- Modules: array [0..0] of MINIDUMP_MODULE;
- end;
- {$EXTERNALSYM _MINIDUMP_MODULE_LIST}
- MINIDUMP_MODULE_LIST = _MINIDUMP_MODULE_LIST;
- {$EXTERNALSYM MINIDUMP_MODULE_LIST}
- TMinidumpModuleList = MINIDUMP_MODULE_LIST;
- PMinidumpModuleList = PMINIDUMP_MODULE_LIST;
-
-//
-// Memory Ranges
-//
-
- PMINIDUMP_MEMORY_LIST = ^MINIDUMP_MEMORY_LIST;
- {$EXTERNALSYM PMINIDUMP_MEMORY_LIST}
- _MINIDUMP_MEMORY_LIST = record
- NumberOfMemoryRanges: ULONG32;
- MemoryRanges: array [0..0] of MINIDUMP_MEMORY_DESCRIPTOR;
- end;
- {$EXTERNALSYM _MINIDUMP_MEMORY_LIST}
- MINIDUMP_MEMORY_LIST = _MINIDUMP_MEMORY_LIST;
- {$EXTERNALSYM MINIDUMP_MEMORY_LIST}
- TMinidumpMemoryList = MINIDUMP_MEMORY_LIST;
- PMinidumpMemoryList = PMINIDUMP_MEMORY_LIST;
-
- PMINIDUMP_MEMORY64_LIST = ^MINIDUMP_MEMORY64_LIST;
- {$EXTERNALSYM PMINIDUMP_MEMORY64_LIST}
- _MINIDUMP_MEMORY64_LIST = record
- NumberOfMemoryRanges: ULONG64;
- BaseRva: RVA64;
- MemoryRanges: array [0..0] of MINIDUMP_MEMORY_DESCRIPTOR64;
- end;
- {$EXTERNALSYM _MINIDUMP_MEMORY64_LIST}
- MINIDUMP_MEMORY64_LIST = _MINIDUMP_MEMORY64_LIST;
- {$EXTERNALSYM MINIDUMP_MEMORY64_LIST}
- TMinidumpMemory64List = MINIDUMP_MEMORY64_LIST;
- PMinidumpMemory64List = PMINIDUMP_MEMORY64_LIST;
-
-//
-// Support for user supplied exception information.
-//
-
- PMINIDUMP_EXCEPTION_INFORMATION = ^MINIDUMP_EXCEPTION_INFORMATION;
- {$EXTERNALSYM PMINIDUMP_EXCEPTION_INFORMATION}
- _MINIDUMP_EXCEPTION_INFORMATION = record
- ThreadId: DWORD;
- ExceptionPointers: PEXCEPTION_POINTERS;
- ClientPointers: BOOL;
- end;
- {$EXTERNALSYM _MINIDUMP_EXCEPTION_INFORMATION}
- MINIDUMP_EXCEPTION_INFORMATION = _MINIDUMP_EXCEPTION_INFORMATION;
- {$EXTERNALSYM MINIDUMP_EXCEPTION_INFORMATION}
- TMinidumpExceptionInformation = MINIDUMP_EXCEPTION_INFORMATION;
- PMinidumpExceptionInformation = PMINIDUMP_EXCEPTION_INFORMATION;
-
-//
-// Support for capturing system handle state at the time of the dump.
-//
-
- PMINIDUMP_HANDLE_DESCRIPTOR = ^MINIDUMP_HANDLE_DESCRIPTOR;
- {$EXTERNALSYM PMINIDUMP_HANDLE_DESCRIPTOR}
- _MINIDUMP_HANDLE_DESCRIPTOR = record
- Handle: ULONG64;
- TypeNameRva: RVA;
- ObjectNameRva: RVA;
- Attributes: ULONG32;
- GrantedAccess: ULONG32;
- HandleCount: ULONG32;
- PointerCount: ULONG32;
- end;
- {$EXTERNALSYM _MINIDUMP_HANDLE_DESCRIPTOR}
- MINIDUMP_HANDLE_DESCRIPTOR = _MINIDUMP_HANDLE_DESCRIPTOR;
- {$EXTERNALSYM MINIDUMP_HANDLE_DESCRIPTOR}
- TMinidumpHandleDescriptor = MINIDUMP_HANDLE_DESCRIPTOR;
- PMinidumpHandleDescriptor = PMINIDUMP_HANDLE_DESCRIPTOR;
-
- PMINIDUMP_HANDLE_DATA_STREAM = ^MINIDUMP_HANDLE_DATA_STREAM;
- {$EXTERNALSYM PMINIDUMP_HANDLE_DATA_STREAM}
- _MINIDUMP_HANDLE_DATA_STREAM = record
- SizeOfHeader: ULONG32;
- SizeOfDescriptor: ULONG32;
- NumberOfDescriptors: ULONG32;
- Reserved: ULONG32;
- end;
- {$EXTERNALSYM _MINIDUMP_HANDLE_DATA_STREAM}
- MINIDUMP_HANDLE_DATA_STREAM = _MINIDUMP_HANDLE_DATA_STREAM;
- {$EXTERNALSYM MINIDUMP_HANDLE_DATA_STREAM}
- TMinidumpHandleDataStream = MINIDUMP_HANDLE_DATA_STREAM;
- PMinidumpHandleDataStream = PMINIDUMP_HANDLE_DATA_STREAM;
-
-//
-// Support for capturing dynamic function table state at the time of the dump.
-//
-
- PMINIDUMP_FUNCTION_TABLE_DESCRIPTOR = ^MINIDUMP_FUNCTION_TABLE_DESCRIPTOR;
- {$EXTERNALSYM PMINIDUMP_FUNCTION_TABLE_DESCRIPTOR}
- _MINIDUMP_FUNCTION_TABLE_DESCRIPTOR = record
- MinimumAddress: ULONG64;
- MaximumAddress: ULONG64;
- BaseAddress: ULONG64;
- EntryCount: ULONG32;
- SizeOfAlignPad: ULONG32;
- end;
- {$EXTERNALSYM _MINIDUMP_FUNCTION_TABLE_DESCRIPTOR}
- MINIDUMP_FUNCTION_TABLE_DESCRIPTOR = _MINIDUMP_FUNCTION_TABLE_DESCRIPTOR;
- {$EXTERNALSYM MINIDUMP_FUNCTION_TABLE_DESCRIPTOR}
- TMinidumpFunctionTableDescriptor = MINIDUMP_FUNCTION_TABLE_DESCRIPTOR;
- PMinidumpFunctionTableDescriptor = PMINIDUMP_FUNCTION_TABLE_DESCRIPTOR;
-
- PMINIDUMP_FUNCTION_TABLE_STREAM = ^MINIDUMP_FUNCTION_TABLE_STREAM;
- {$EXTERNALSYM PMINIDUMP_FUNCTION_TABLE_STREAM}
- _MINIDUMP_FUNCTION_TABLE_STREAM = record
- SizeOfHeader: ULONG32;
- SizeOfDescriptor: ULONG32;
- SizeOfNativeDescriptor: ULONG32;
- SizeOfFunctionEntry: ULONG32;
- NumberOfDescriptors: ULONG32;
- SizeOfAlignPad: ULONG32;
- end;
- {$EXTERNALSYM _MINIDUMP_FUNCTION_TABLE_STREAM}
- MINIDUMP_FUNCTION_TABLE_STREAM = _MINIDUMP_FUNCTION_TABLE_STREAM;
- {$EXTERNALSYM MINIDUMP_FUNCTION_TABLE_STREAM}
- TMinidumpFunctionTableStream = MINIDUMP_FUNCTION_TABLE_STREAM;
- PMinidumpFunctionTableStream = PMINIDUMP_FUNCTION_TABLE_STREAM;
-
-//
-// The MINIDUMP_UNLOADED_MODULE contains information about a
-// a specific module that was previously loaded but no
-// longer is. This can help with diagnosing problems where
-// callers attempt to call code that is no longer loaded.
-//
-
- _MINIDUMP_UNLOADED_MODULE = record
- BaseOfImage: ULONG64;
- SizeOfImage: ULONG32;
- CheckSum: ULONG32;
- TimeDateStamp: ULONG32;
- ModuleNameRva: RVA;
- end;
- {$EXTERNALSYM _MINIDUMP_UNLOADED_MODULE}
- MINIDUMP_UNLOADED_MODULE = _MINIDUMP_UNLOADED_MODULE;
- {$EXTERNALSYM MINIDUMP_UNLOADED_MODULE}
- PMINIDUMP_UNLOADED_MODULE = ^MINIDUMP_UNLOADED_MODULE;
- {$EXTERNALSYM PMINIDUMP_UNLOADED_MODULE}
- TMiniDumpUnloadedModule = MINIDUMP_UNLOADED_MODULE;
- PMiniDumpUnloadedModule = PMINIDUMP_UNLOADED_MODULE;
-
-//
-// The minidump unloaded module list is a container for unloaded modules.
-//
-
- _MINIDUMP_UNLOADED_MODULE_LIST = record
- SizeOfHeader: ULONG32;
- SizeOfEntry: ULONG32;
- NumberOfEntries: ULONG32;
- end;
- {$EXTERNALSYM _MINIDUMP_UNLOADED_MODULE_LIST}
- MINIDUMP_UNLOADED_MODULE_LIST = _MINIDUMP_UNLOADED_MODULE_LIST;
- {$EXTERNALSYM MINIDUMP_UNLOADED_MODULE_LIST}
- PMINIDUMP_UNLOADED_MODULE_LIST = ^MINIDUMP_UNLOADED_MODULE_LIST;
- {$EXTERNALSYM PMINIDUMP_UNLOADED_MODULE_LIST}
- TMiniDumpUnloadedModuleList = MINIDUMP_UNLOADED_MODULE_LIST;
- PMiniDumpUnloadedModuleList = PMINIDUMP_UNLOADED_MODULE_LIST;
-
-//
-// The miscellaneous information stream contains a variety
-// of small pieces of information. A member is valid if
-// it's within the available size and its corresponding
-// bit is set.
-//
-
-const
- MINIDUMP_MISC1_PROCESS_ID = $00000001;
- {$EXTERNALSYM MINIDUMP_MISC1_PROCESS_ID}
- MINIDUMP_MISC1_PROCESS_TIMES = $00000002;
- {$EXTERNALSYM MINIDUMP_MISC1_PROCESS_TIMES}
-
-type
- _MINIDUMP_MISC_INFO = record
- SizeOfInfo: ULONG32;
- Flags1: ULONG32;
- ProcessId: ULONG32;
- ProcessCreateTime: ULONG32;
- ProcessUserTime: ULONG32;
- ProcessKernelTime: ULONG32;
- end;
- {$EXTERNALSYM _MINIDUMP_MISC_INFO}
- MINIDUMP_MISC_INFO = _MINIDUMP_MISC_INFO;
- {$EXTERNALSYM MINIDUMP_MISC_INFO}
- PMINIDUMP_MISC_INFO = ^MINIDUMP_MISC_INFO;
- {$EXTERNALSYM PMINIDUMP_MISC_INFO}
- TMiniDumpMiscInfo = MINIDUMP_MISC_INFO;
- PMiniDumpMiscInfo = PMINIDUMP_MISC_INFO;
-
-//
-// Support for arbitrary user-defined information.
-//
-
- PMINIDUMP_USER_RECORD = ^MINIDUMP_USER_RECORD;
- {$EXTERNALSYM PMINIDUMP_USER_RECORD}
- _MINIDUMP_USER_RECORD = record
- Type_: ULONG32;
- Memory: MINIDUMP_LOCATION_DESCRIPTOR;
- end;
- {$EXTERNALSYM _MINIDUMP_USER_RECORD}
- MINIDUMP_USER_RECORD = _MINIDUMP_USER_RECORD;
- {$EXTERNALSYM MINIDUMP_USER_RECORD}
- TMinidumpUserRecord = MINIDUMP_USER_RECORD;
- PMinidumpUserRecord = PMINIDUMP_USER_RECORD;
-
- PMINIDUMP_USER_STREAM = ^MINIDUMP_USER_STREAM;
- {$EXTERNALSYM PMINIDUMP_USER_STREAM}
- _MINIDUMP_USER_STREAM = record
- Type_: ULONG32;
- BufferSize: ULONG;
- Buffer: PVOID;
- end;
- {$EXTERNALSYM _MINIDUMP_USER_STREAM}
- MINIDUMP_USER_STREAM = _MINIDUMP_USER_STREAM;
- {$EXTERNALSYM MINIDUMP_USER_STREAM}
- TMinidumpUserStream = MINIDUMP_USER_STREAM;
- PMinidumpUserStream = PMINIDUMP_USER_STREAM;
-
- PMINIDUMP_USER_STREAM_INFORMATION = ^MINIDUMP_USER_STREAM_INFORMATION;
- {$EXTERNALSYM PMINIDUMP_USER_STREAM_INFORMATION}
- _MINIDUMP_USER_STREAM_INFORMATION = record
- UserStreamCount: ULONG;
- UserStreamArray: PMINIDUMP_USER_STREAM;
- end;
- {$EXTERNALSYM _MINIDUMP_USER_STREAM_INFORMATION}
- MINIDUMP_USER_STREAM_INFORMATION = _MINIDUMP_USER_STREAM_INFORMATION;
- {$EXTERNALSYM MINIDUMP_USER_STREAM_INFORMATION}
- TMinidumpUserStreamInformation = MINIDUMP_USER_STREAM_INFORMATION;
- PMinidumpUserStreamInformation = PMINIDUMP_USER_STREAM_INFORMATION;
-
-//
-// Callback support.
-//
-
- _MINIDUMP_CALLBACK_TYPE = (
- ModuleCallback,
- ThreadCallback,
- ThreadExCallback,
- IncludeThreadCallback,
- IncludeModuleCallback);
- {$EXTERNALSYM _MINIDUMP_CALLBACK_TYPE}
- MINIDUMP_CALLBACK_TYPE = _MINIDUMP_CALLBACK_TYPE;
- {$EXTERNALSYM MINIDUMP_CALLBACK_TYPE}
- TMinidumpCallbackType = MINIDUMP_CALLBACK_TYPE;
-
- PMINIDUMP_THREAD_CALLBACK = ^MINIDUMP_THREAD_CALLBACK;
- {$EXTERNALSYM PMINIDUMP_THREAD_CALLBACK}
- _MINIDUMP_THREAD_CALLBACK = record
- ThreadId: ULONG;
- ThreadHandle: HANDLE;
- Context: CONTEXT;
- SizeOfContext: ULONG;
- StackBase: ULONG64;
- StackEnd: ULONG64;
- end;
- {$EXTERNALSYM _MINIDUMP_THREAD_CALLBACK}
- MINIDUMP_THREAD_CALLBACK = _MINIDUMP_THREAD_CALLBACK;
- {$EXTERNALSYM MINIDUMP_THREAD_CALLBACK}
- TMinidumpThreadCallback = MINIDUMP_THREAD_CALLBACK;
- PMinidumpThreadCallback = PMINIDUMP_THREAD_CALLBACK;
-
- PMINIDUMP_THREAD_EX_CALLBACK = ^MINIDUMP_THREAD_EX_CALLBACK;
- {$EXTERNALSYM PMINIDUMP_THREAD_EX_CALLBACK}
- _MINIDUMP_THREAD_EX_CALLBACK = record
- ThreadId: ULONG;
- ThreadHandle: HANDLE;
- Context: CONTEXT;
- SizeOfContext: ULONG;
- StackBase: ULONG64;
- StackEnd: ULONG64;
- BackingStoreBase: ULONG64;
- BackingStoreEnd: ULONG64;
- end;
- {$EXTERNALSYM _MINIDUMP_THREAD_EX_CALLBACK}
- MINIDUMP_THREAD_EX_CALLBACK = _MINIDUMP_THREAD_EX_CALLBACK;
- {$EXTERNALSYM MINIDUMP_THREAD_EX_CALLBACK}
- TMinidumpThreadExCallback = MINIDUMP_THREAD_EX_CALLBACK;
- PMinidumpThreadExCallback = PMINIDUMP_THREAD_EX_CALLBACK;
-
- PMINIDUMP_INCLUDE_THREAD_CALLBACK = ^MINIDUMP_INCLUDE_THREAD_CALLBACK;
- {$EXTERNALSYM PMINIDUMP_INCLUDE_THREAD_CALLBACK}
- _MINIDUMP_INCLUDE_THREAD_CALLBACK = record
- ThreadId: ULONG;
- end;
- {$EXTERNALSYM _MINIDUMP_INCLUDE_THREAD_CALLBACK}
- MINIDUMP_INCLUDE_THREAD_CALLBACK = _MINIDUMP_INCLUDE_THREAD_CALLBACK;
- {$EXTERNALSYM MINIDUMP_INCLUDE_THREAD_CALLBACK}
- TMinidumpIncludeThreadCallback = MINIDUMP_INCLUDE_THREAD_CALLBACK;
- PMinidumpIncludeThreadCallback = PMINIDUMP_INCLUDE_THREAD_CALLBACK;
-
-const
- ThreadWriteThread = $0001;
- {$EXTERNALSYM ThreadWriteThread}
- ThreadWriteStack = $0002;
- {$EXTERNALSYM ThreadWriteStack}
- ThreadWriteContext = $0004;
- {$EXTERNALSYM ThreadWriteContext}
- ThreadWriteBackingStore = $0008;
- {$EXTERNALSYM ThreadWriteBackingStore}
- ThreadWriteInstructionWindow = $0010;
- {$EXTERNALSYM ThreadWriteInstructionWindow}
- ThreadWriteThreadData = $0020;
- {$EXTERNALSYM ThreadWriteThreadData}
-
-type
- _THREAD_WRITE_FLAGS = DWORD;
- {$EXTERNALSYM _THREAD_WRITE_FLAGS}
- THREAD_WRITE_FLAGS = _THREAD_WRITE_FLAGS;
- {$EXTERNALSYM THREAD_WRITE_FLAGS}
- TThreadWriteFlags = THREAD_WRITE_FLAGS;
-
-type
- PMINIDUMP_MODULE_CALLBACK = ^MINIDUMP_MODULE_CALLBACK;
- {$EXTERNALSYM PMINIDUMP_MODULE_CALLBACK}
- _MINIDUMP_MODULE_CALLBACK = record
- FullPath: PWCHAR;
- BaseOfImage: ULONG64;
- SizeOfImage: ULONG;
- CheckSum: ULONG;
- TimeDateStamp: ULONG;
- VersionInfo: VS_FIXEDFILEINFO;
- CvRecord: PVOID;
- SizeOfCvRecord: ULONG;
- MiscRecord: PVOID;
- SizeOfMiscRecord: ULONG;
- end;
- {$EXTERNALSYM _MINIDUMP_MODULE_CALLBACK}
- MINIDUMP_MODULE_CALLBACK = _MINIDUMP_MODULE_CALLBACK;
- {$EXTERNALSYM MINIDUMP_MODULE_CALLBACK}
- TMinidumpModuleCallback = MINIDUMP_MODULE_CALLBACK;
- PMinidumpModuleCallback = PMINIDUMP_MODULE_CALLBACK;
-
- PMINIDUMP_INCLUDE_MODULE_CALLBACK = ^MINIDUMP_INCLUDE_MODULE_CALLBACK;
- {$EXTERNALSYM PMINIDUMP_INCLUDE_MODULE_CALLBACK}
- _MINIDUMP_INCLUDE_MODULE_CALLBACK = record
- BaseOfImage: ULONG64;
- end;
- {$EXTERNALSYM _MINIDUMP_INCLUDE_MODULE_CALLBACK}
- MINIDUMP_INCLUDE_MODULE_CALLBACK = _MINIDUMP_INCLUDE_MODULE_CALLBACK;
- {$EXTERNALSYM MINIDUMP_INCLUDE_MODULE_CALLBACK}
- TMinidumpIncludeModuleCallback = MINIDUMP_INCLUDE_MODULE_CALLBACK;
- PMinidumpIncludeModuleCallback = PMINIDUMP_INCLUDE_MODULE_CALLBACK;
-
-const
- ModuleWriteModule = $0001;
- {$EXTERNALSYM ModuleWriteModule}
- ModuleWriteDataSeg = $0002;
- {$EXTERNALSYM ModuleWriteDataSeg}
- ModuleWriteMiscRecord = $0004;
- {$EXTERNALSYM ModuleWriteMiscRecord}
- ModuleWriteCvRecord = $0008;
- {$EXTERNALSYM ModuleWriteCvRecord}
- ModuleReferencedByMemory = $0010;
- {$EXTERNALSYM ModuleReferencedByMemory}
-
-type
- _MODULE_WRITE_FLAGS = DWORD;
- {$EXTERNALSYM _MODULE_WRITE_FLAGS}
- MODULE_WRITE_FLAGS = _MODULE_WRITE_FLAGS;
- {$EXTERNALSYM MODULE_WRITE_FLAGS}
- TModuleWriteFlags = MODULE_WRITE_FLAGS;
-
- _MINIDUMP_CALLBACK_INPUT = record
- ProcessId: ULONG;
- ProcessHandle: HANDLE;
- CallbackType: ULONG;
- case Integer of
- 0: (Thread: MINIDUMP_THREAD_CALLBACK);
- 1: (ThreadEx: MINIDUMP_THREAD_EX_CALLBACK);
- 2: (Module: MINIDUMP_MODULE_CALLBACK);
- 3: (IncludeThread: MINIDUMP_INCLUDE_THREAD_CALLBACK);
- 4: (IncludeModule: MINIDUMP_INCLUDE_MODULE_CALLBACK);
- end;
- {$EXTERNALSYM _MINIDUMP_CALLBACK_INPUT}
- MINIDUMP_CALLBACK_INPUT = _MINIDUMP_CALLBACK_INPUT;
- {$EXTERNALSYM MINIDUMP_CALLBACK_INPUT}
- PMINIDUMP_CALLBACK_INPUT = ^MINIDUMP_CALLBACK_INPUT;
- {$EXTERNALSYM PMINIDUMP_CALLBACK_INPUT}
- TminidumpCallbackInput = MINIDUMP_CALLBACK_INPUT;
-
- PMINIDUMP_CALLBACK_OUTPUT = ^MINIDUMP_CALLBACK_OUTPUT;
- {$EXTERNALSYM PMINIDUMP_CALLBACK_OUTPUT}
- _MINIDUMP_CALLBACK_OUTPUT = record
- case Integer of
- 0: (ModuleWriteFlags: ULONG);
- 1: (ThreadWriteFlags: ULONG);
- end;
- {$EXTERNALSYM _MINIDUMP_CALLBACK_OUTPUT}
- MINIDUMP_CALLBACK_OUTPUT = _MINIDUMP_CALLBACK_OUTPUT;
- {$EXTERNALSYM MINIDUMP_CALLBACK_OUTPUT}
- TMinidumpCallbackOutput = MINIDUMP_CALLBACK_OUTPUT;
- PMinidumpCallbackOutput = PMINIDUMP_CALLBACK_OUTPUT;
-
-//
-// A normal minidump contains just the information
-// necessary to capture stack traces for all of the
-// existing threads in a process.
-//
-// A minidump with data segments includes all of the data
-// sections from loaded modules in order to capture
-// global variable contents. This can make the dump much
-// larger if many modules have global data.
-//
-// A minidump with full memory includes all of the accessible
-// memory in the process and can be very large. A minidump
-// with full memory always has the raw memory data at the end
-// of the dump so that the initial structures in the dump can
-// be mapped directly without having to include the raw
-// memory information.
-//
-// Stack and backing store memory can be filtered to remove
-// data unnecessary for stack walking. This can improve
-// compression of stacks and also deletes data that may
-// be private and should not be stored in a dump.
-// Memory can also be scanned to see what modules are
-// referenced by stack and backing store memory to allow
-// omission of other modules to reduce dump size.
-// In either of these modes the ModuleReferencedByMemory flag
-// is set for all modules referenced before the base
-// module callbacks occur.
-//
-// On some operating systems a list of modules that were
-// recently unloaded is kept in addition to the currently
-// loaded module list. This information can be saved in
-// the dump if desired.
-//
-// Stack and backing store memory can be scanned for referenced
-// pages in order to pick up data referenced by locals or other
-// stack memory. This can increase the size of a dump significantly.
-//
-// Module paths may contain undesired information such as user names
-// or other important directory names so they can be stripped. This
-// option reduces the ability to locate the proper image later
-// and should only be used in certain situations.
-//
-// Complete operating system per-process and per-thread information can
-// be gathered and stored in the dump.
-//
-// The virtual address space can be scanned for various types
-// of memory to be included in the dump.
-//
-
-const
- MiniDumpNormal = $0000;
- {$EXTERNALSYM MiniDumpNormal}
- MiniDumpWithDataSegs = $0001;
- {$EXTERNALSYM MiniDumpWithDataSegs}
- MiniDumpWithFullMemory = $0002;
- {$EXTERNALSYM MiniDumpWithFullMemory}
- MiniDumpWithHandleData = $0004;
- {$EXTERNALSYM MiniDumpWithHandleData}
- MiniDumpFilterMemory = $0008;
- {$EXTERNALSYM MiniDumpFilterMemory}
- MiniDumpScanMemory = $0010;
- {$EXTERNALSYM MiniDumpScanMemory}
- MiniDumpWithUnloadedModules = $0020;
- {$EXTERNALSYM MiniDumpWithUnloadedModules}
- MiniDumpWithIndirectlyReferencedMemory = $0040;
- {$EXTERNALSYM MiniDumpWithIndirectlyReferencedMemory}
- MiniDumpFilterModulePaths = $0080;
- {$EXTERNALSYM MiniDumpFilterModulePaths}
- MiniDumpWithProcessThreadData = $0100;
- {$EXTERNALSYM MiniDumpWithProcessThreadData}
- MiniDumpWithPrivateReadWriteMemory = $0200;
- {$EXTERNALSYM MiniDumpWithPrivateReadWriteMemory}
-
-type
- _MINIDUMP_TYPE = DWORD;
- {$EXTERNALSYM _MINIDUMP_TYPE}
- MINIDUMP_TYPE = _MINIDUMP_TYPE;
- {$EXTERNALSYM MINIDUMP_TYPE}
- TMinidumpType = MINIDUMP_TYPE;
-
-//
-// The minidump callback should modify the FieldsToWrite parameter to reflect
-// what portions of the specified thread or module should be written to the
-// file.
-//
-
- MINIDUMP_CALLBACK_ROUTINE = function(CallbackParam: PVOID; CallbackInput: PMINIDUMP_CALLBACK_INPUT;
- CallbackOutput: PMINIDUMP_CALLBACK_OUTPUT): BOOL; stdcall;
- {$EXTERNALSYM MINIDUMP_CALLBACK_ROUTINE}
- TMinidumpCallbackRoutine = MINIDUMP_CALLBACK_ROUTINE;
-
- PMINIDUMP_CALLBACK_INFORMATION = ^MINIDUMP_CALLBACK_INFORMATION;
- {$EXTERNALSYM PMINIDUMP_CALLBACK_INFORMATION}
- _MINIDUMP_CALLBACK_INFORMATION = record
- CallbackRoutine: MINIDUMP_CALLBACK_ROUTINE;
- CallbackParam: PVOID;
- end;
- {$EXTERNALSYM _MINIDUMP_CALLBACK_INFORMATION}
- MINIDUMP_CALLBACK_INFORMATION = _MINIDUMP_CALLBACK_INFORMATION;
- {$EXTERNALSYM MINIDUMP_CALLBACK_INFORMATION}
- TMinidumpCallbackInformation = MINIDUMP_CALLBACK_INFORMATION;
- PMinidumpCallbackInformation = PMINIDUMP_CALLBACK_INFORMATION;
-
-//++
-//
-// PVOID
-// RVA_TO_ADDR(
-// PVOID Mapping,
-// ULONG Rva
-// )
-//
-// Routine Description:
-//
-// Map an RVA that is contained within a mapped file to it's associated
-// flat address.
-//
-// Arguments:
-//
-// Mapping - Base address of mapped file containing the RVA.
-//
-// Rva - An Rva to fixup.
-//
-// Return Values:
-//
-// A pointer to the desired data.
-//
-//--
-
-function RVA_TO_ADDR(Mapping, Rva: Pointer): Pointer;
-{$EXTERNALSYM RVA_TO_ADDR}
-
-function MiniDumpWriteDump(hProcess: HANDLE; ProcessId: DWORD; hFile: HANDLE; DumpType: MINIDUMP_TYPE; ExceptionParam: PMINIDUMP_EXCEPTION_INFORMATION; UserStreamParam: PMINIDUMP_USER_STREAM_INFORMATION; CallbackParam: PMINIDUMP_CALLBACK_INFORMATION): BOOL; stdcall;
-{$EXTERNALSYM MiniDumpWriteDump}
-
-function MiniDumpReadDumpStream(BaseOfDump: PVOID; StreamNumber: ULONG; var Dir: PMINIDUMP_DIRECTORY; var StreamPointer: PVOID; var StreamSize: ULONG): BOOL; stdcall;
-{$EXTERNALSYM MiniDumpReadDumpStream}
-
-implementation
-
-const
- ImageHlpLib = 'imagehlp.dll';
- {$IFDEF UNICODE}
- AWSuffix = 'W';
- {$ELSE}
- AWSuffix = 'A';
- {$ENDIF UNICODE}
-
-procedure Address32To64(a32: LPADDRESS; a64: LPADDRESS64);
-begin
- a64^.Offset := {ULONG64(LONG64(LONG(}a32^.Offset{)))};
- a64^.Segment := a32^.Segment;
- a64^.Mode := a32^.Mode;
-end;
-
-procedure Address64To32(a64: LPADDRESS64; a32: LPADDRESS);
-begin
- a32^.Offset := ULONG(a64^.Offset);
- a32^.Segment := a64^.Segment;
- a32^.Mode := a64^.Mode;
-end;
-
-procedure KdHelp32To64(p32: PKDHELP; p64: PKDHELP64);
-begin
- p64^.Thread := p32^.Thread;
- p64^.ThCallbackStack := p32^.ThCallbackStack;
- p64^.NextCallback := p32^.NextCallback;
- p64^.FramePointer := p32^.FramePointer;
- p64^.KiCallUserMode := p32^.KiCallUserMode;
- p64^.KeUserCallbackDispatcher := p32^.KeUserCallbackDispatcher;
- p64^.SystemRangeStart := p32^.SystemRangeStart;
-end;
-
-function RVA_TO_ADDR(Mapping, Rva: Pointer): Pointer;
-begin
- Result := Pointer(Cardinal(Mapping) + Cardinal(Rva));
-end;
-
-{$IFDEF DYNAMIC_LINK}
-
-var
- _BindImage: Pointer;
-
-function BindImage;
-begin
- GetProcedureAddress(_BindImage, ImageHlpLib, 'BindImage');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_BindImage]
- end;
-end;
-
-var
- _BindImageEx: Pointer;
-
-function BindImageEx;
-begin
- GetProcedureAddress(_BindImageEx, ImageHlpLib, 'BindImageEx');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_BindImageEx]
- end;
-end;
-
-var
- _ReBaseImage: Pointer;
-
-function ReBaseImage;
-begin
- GetProcedureAddress(_ReBaseImage, ImageHlpLib, 'ReBaseImage');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ReBaseImage]
- end;
-end;
-
-var
- _ReBaseImage64: Pointer;
-
-function ReBaseImage64;
-begin
- GetProcedureAddress(_ReBaseImage64, ImageHlpLib, 'ReBaseImage64');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ReBaseImage64]
- end;
-end;
-
-var
- _CheckSumMappedFile: Pointer;
-
-function CheckSumMappedFile;
-begin
- GetProcedureAddress(_CheckSumMappedFile, ImageHlpLib, 'CheckSumMappedFile');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CheckSumMappedFile]
- end;
-end;
-
-var
- _MapFileAndCheckSumA: Pointer;
-
-function MapFileAndCheckSumA;
-begin
- GetProcedureAddress(_MapFileAndCheckSumA, ImageHlpLib, 'MapFileAndCheckSumA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MapFileAndCheckSumA]
- end;
-end;
-
-var
- _MapFileAndCheckSumW: Pointer;
-
-function MapFileAndCheckSumW;
-begin
- GetProcedureAddress(_MapFileAndCheckSumW, ImageHlpLib, 'MapFileAndCheckSumW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MapFileAndCheckSumW]
- end;
-end;
-
-var
- _MapFileAndCheckSum: Pointer;
-
-function MapFileAndCheckSum;
-begin
- GetProcedureAddress(_MapFileAndCheckSum, ImageHlpLib, 'MapFileAndCheckSum' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MapFileAndCheckSum]
- end;
-end;
-
-var
- _GetImageConfigInformation: Pointer;
-
-function GetImageConfigInformation;
-begin
- GetProcedureAddress(_GetImageConfigInformation, ImageHlpLib, 'GetImageConfigInformation');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetImageConfigInformation]
- end;
-end;
-
-var
- _GetImageUnusedHeaderBytes: Pointer;
-
-function GetImageUnusedHeaderBytes;
-begin
- GetProcedureAddress(_GetImageUnusedHeaderBytes, ImageHlpLib, 'GetImageUnusedHeaderBytes');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetImageUnusedHeaderBytes]
- end;
-end;
-
-var
- _SetImageConfigInformation: Pointer;
-
-function SetImageConfigInformation;
-begin
- GetProcedureAddress(_SetImageConfigInformation, ImageHlpLib, 'SetImageConfigInformation');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetImageConfigInformation]
- end;
-end;
-
-var
- _ImageGetDigestStream: Pointer;
-
-function ImageGetDigestStream;
-begin
- GetProcedureAddress(_ImageGetDigestStream, ImageHlpLib, 'ImageGetDigestStream');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ImageGetDigestStream]
- end;
-end;
-
-var
- _ImageAddCertificate: Pointer;
-
-function ImageAddCertificate;
-begin
- GetProcedureAddress(_ImageAddCertificate, ImageHlpLib, 'ImageAddCertificate');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ImageAddCertificate]
- end;
-end;
-
-var
- _ImageRemoveCertificate: Pointer;
-
-function ImageRemoveCertificate;
-begin
- GetProcedureAddress(_ImageRemoveCertificate, ImageHlpLib, 'ImageRemoveCertificate');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ImageRemoveCertificate]
- end;
-end;
-
-var
- _ImageEnumerateCertificates: Pointer;
-
-function ImageEnumerateCertificates;
-begin
- GetProcedureAddress(_ImageEnumerateCertificates, ImageHlpLib, 'ImageEnumerateCertificates');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ImageEnumerateCertificates]
- end;
-end;
-
-var
- _ImageGetCertificateData: Pointer;
-
-function ImageGetCertificateData;
-begin
- GetProcedureAddress(_ImageGetCertificateData, ImageHlpLib, 'ImageGetCertificateData');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ImageGetCertificateData]
- end;
-end;
-
-var
- _ImageGetCertificateHeader: Pointer;
-
-function ImageGetCertificateHeader;
-begin
- GetProcedureAddress(_ImageGetCertificateHeader, ImageHlpLib, 'ImageGetCertificateHeader');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ImageGetCertificateHeader]
- end;
-end;
-
-var
- _ImageLoad: Pointer;
-
-function ImageLoad;
-begin
- GetProcedureAddress(_ImageLoad, ImageHlpLib, 'ImageLoad');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ImageLoad]
- end;
-end;
-
-var
- _ImageUnload: Pointer;
-
-function ImageUnload;
-begin
- GetProcedureAddress(_ImageUnload, ImageHlpLib, 'ImageUnload');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ImageUnload]
- end;
-end;
-
-var
- _MapAndLoad: Pointer;
-
-function MapAndLoad;
-begin
- GetProcedureAddress(_MapAndLoad, ImageHlpLib, 'MapAndLoad');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MapAndLoad]
- end;
-end;
-
-var
- _UnMapAndLoad: Pointer;
-
-function UnMapAndLoad;
-begin
- GetProcedureAddress(_UnMapAndLoad, ImageHlpLib, 'UnMapAndLoad');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_UnMapAndLoad]
- end;
-end;
-
-var
- _TouchFileTimes: Pointer;
-
-function TouchFileTimes;
-begin
- GetProcedureAddress(_TouchFileTimes, ImageHlpLib, 'TouchFileTimes');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_TouchFileTimes]
- end;
-end;
-
-var
- _SplitSymbols: Pointer;
-
-function SplitSymbols;
-begin
- GetProcedureAddress(_SplitSymbols, ImageHlpLib, 'SplitSymbols');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SplitSymbols]
- end;
-end;
-
-var
- _UpdateDebugInfoFile: Pointer;
-
-function UpdateDebugInfoFile;
-begin
- GetProcedureAddress(_UpdateDebugInfoFile, ImageHlpLib, 'UpdateDebugInfoFile');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_UpdateDebugInfoFile]
- end;
-end;
-
-var
- _UpdateDebugInfoFileEx: Pointer;
-
-function UpdateDebugInfoFileEx;
-begin
- GetProcedureAddress(_UpdateDebugInfoFileEx, ImageHlpLib, 'UpdateDebugInfoFileEx');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_UpdateDebugInfoFileEx]
- end;
-end;
-
-var
- _FindDebugInfoFile: Pointer;
-
-function FindDebugInfoFile;
-begin
- GetProcedureAddress(_FindDebugInfoFile, ImageHlpLib, 'FindDebugInfoFile');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_FindDebugInfoFile]
- end;
-end;
-
-var
- _FindDebugInfoFileEx: Pointer;
-
-function FindDebugInfoFileEx;
-begin
- GetProcedureAddress(_FindDebugInfoFileEx, ImageHlpLib, 'FindDebugInfoFileEx');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_FindDebugInfoFileEx]
- end;
-end;
-
-var
- _SymFindFileInPath: Pointer;
-
-function SymFindFileInPath;
-begin
- GetProcedureAddress(_SymFindFileInPath, ImageHlpLib, 'SymFindFileInPath');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SymFindFileInPath]
- end;
-end;
-
-var
- _FindExecutableImage: Pointer;
-
-function FindExecutableImage;
-begin
- GetProcedureAddress(_FindExecutableImage, ImageHlpLib, 'FindExecutableImage');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_FindExecutableImage]
- end;
-end;
-
-var
- _FindExecutableImageEx: Pointer;
-
-function FindExecutableImageEx;
-begin
- GetProcedureAddress(_FindExecutableImageEx, ImageHlpLib, 'FindExecutableImageEx');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_FindExecutableImageEx]
- end;
-end;
-
-var
- _ImageNtHeader: Pointer;
-
-function ImageNtHeader;
-begin
- GetProcedureAddress(_ImageNtHeader, ImageHlpLib, 'ImageNtHeader');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ImageNtHeader]
- end;
-end;
-
-var
- _ImageDirectoryEntryToDataEx: Pointer;
-
-function ImageDirectoryEntryToDataEx;
-begin
- GetProcedureAddress(_ImageDirectoryEntryToDataEx, ImageHlpLib, 'ImageDirectoryEntryToDataEx');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ImageDirectoryEntryToDataEx]
- end;
-end;
-
-var
- _ImageDirectoryEntryToData: Pointer;
-
-function ImageDirectoryEntryToData;
-begin
- GetProcedureAddress(_ImageDirectoryEntryToData, ImageHlpLib, 'ImageDirectoryEntryToData');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ImageDirectoryEntryToData]
- end;
-end;
-
-var
- _ImageRvaToSection: Pointer;
-
-function ImageRvaToSection;
-begin
- GetProcedureAddress(_ImageRvaToSection, ImageHlpLib, 'ImageRvaToSection');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ImageRvaToSection]
- end;
-end;
-
-var
- _ImageRvaToVa: Pointer;
-
-function ImageRvaToVa;
-begin
- GetProcedureAddress(_ImageRvaToVa, ImageHlpLib, 'ImageRvaToVa');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ImageRvaToVa]
- end;
-end;
-
-var
- _MapDebugInformation: Pointer;
-
-function MapDebugInformation;
-begin
- GetProcedureAddress(_MapDebugInformation, ImageHlpLib, 'MapDebugInformation');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MapDebugInformation]
- end;
-end;
-
-var
- _UnmapDebugInformation: Pointer;
-
-function UnmapDebugInformation;
-begin
- GetProcedureAddress(_UnmapDebugInformation, ImageHlpLib, 'UnmapDebugInformation');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_UnmapDebugInformation]
- end;
-end;
-
-var
- _SearchTreeForFile: Pointer;
-
-function SearchTreeForFile;
-begin
- GetProcedureAddress(_SearchTreeForFile, ImageHlpLib, 'SearchTreeForFile');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SearchTreeForFile]
- end;
-end;
-
-var
- _EnumDirTree: Pointer;
-
-function EnumDirTree;
-begin
- GetProcedureAddress(_EnumDirTree, ImageHlpLib, 'EnumDirTree');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_EnumDirTree]
- end;
-end;
-
-var
- _MakeSureDirectoryPathExists: Pointer;
-
-function MakeSureDirectoryPathExists;
-begin
- GetProcedureAddress(_MakeSureDirectoryPathExists, ImageHlpLib, 'MakeSureDirectoryPathExists');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MakeSureDirectoryPathExists]
- end;
-end;
-
-var
- _UnDecorateSymbolName: Pointer;
-
-function UnDecorateSymbolName;
-begin
- GetProcedureAddress(_UnDecorateSymbolName, ImageHlpLib, 'UnDecorateSymbolName');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_UnDecorateSymbolName]
- end;
-end;
-
-var
- _StackWalk64: Pointer;
-
-function StackWalk64;
-begin
- GetProcedureAddress(_StackWalk64, ImageHlpLib, 'StackWalk64');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_StackWalk64]
- end;
-end;
-
-var
- _StackWalk: Pointer;
-
-function StackWalk;
-begin
- GetProcedureAddress(_StackWalk, ImageHlpLib, 'StackWalk');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_StackWalk]
- end;
-end;
-
-var
- _ImagehlpApiVersion: Pointer;
-
-function ImagehlpApiVersion;
-begin
- GetProcedureAddress(_ImagehlpApiVersion, ImageHlpLib, 'ImagehlpApiVersion');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ImagehlpApiVersion]
- end;
-end;
-
-var
- _ImagehlpApiVersionEx: Pointer;
-
-function ImagehlpApiVersionEx;
-begin
- GetProcedureAddress(_ImagehlpApiVersionEx, ImageHlpLib, 'ImagehlpApiVersionEx');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ImagehlpApiVersionEx]
- end;
-end;
-
-var
- _GetTimestampForLoadedLibrary: Pointer;
-
-function GetTimestampForLoadedLibrary;
-begin
- GetProcedureAddress(_GetTimestampForLoadedLibrary, ImageHlpLib, 'GetTimestampForLoadedLibrary');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetTimestampForLoadedLibrary]
- end;
-end;
-
-var
- _SymSetOptions: Pointer;
-
-function SymSetOptions;
-begin
- GetProcedureAddress(_SymSetOptions, ImageHlpLib, 'SymSetOptions');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SymSetOptions]
- end;
-end;
-
-var
- _SymGetOptions: Pointer;
-
-function SymGetOptions;
-begin
- GetProcedureAddress(_SymGetOptions, ImageHlpLib, 'SymGetOptions');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SymGetOptions]
- end;
-end;
-
-var
- _SymCleanup: Pointer;
-
-function SymCleanup;
-begin
- GetProcedureAddress(_SymCleanup, ImageHlpLib, 'SymCleanup');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SymCleanup]
- end;
-end;
-
-var
- _SymMatchString: Pointer;
-
-function SymMatchString;
-begin
- GetProcedureAddress(_SymMatchString, ImageHlpLib, 'SymMatchString');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SymMatchString]
- end;
-end;
-
-var
- _SymEnumSourceFiles: Pointer;
-
-function SymEnumSourceFiles;
-begin
- GetProcedureAddress(_SymEnumSourceFiles, ImageHlpLib, 'SymEnumSourceFiles');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SymEnumSourceFiles]
- end;
-end;
-
-var
- _SymEnumerateModules64: Pointer;
-
-function SymEnumerateModules64;
-begin
- GetProcedureAddress(_SymEnumerateModules64, ImageHlpLib, 'SymEnumerateModules64');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SymEnumerateModules64]
- end;
-end;
-
-var
- _SymEnumerateModules: Pointer;
-
-function SymEnumerateModules;
-begin
- GetProcedureAddress(_SymEnumerateModules, ImageHlpLib, 'SymEnumerateModules');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SymEnumerateModules]
- end;
-end;
-
-var
- _SymEnumerateSymbols64: Pointer;
-
-function SymEnumerateSymbols64;
-begin
- GetProcedureAddress(_SymEnumerateSymbols64, ImageHlpLib, 'SymEnumerateSymbols64');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SymEnumerateSymbols64]
- end;
-end;
-
-var
- _SymEnumerateSymbolsW64: Pointer;
-
-function SymEnumerateSymbolsW64;
-begin
- GetProcedureAddress(_SymEnumerateSymbolsW64, ImageHlpLib, 'SymEnumerateSymbolsW64');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SymEnumerateSymbolsW64]
- end;
-end;
-
-var
- _SymEnumerateSymbols: Pointer;
-
-function SymEnumerateSymbols;
-begin
- GetProcedureAddress(_SymEnumerateSymbols, ImageHlpLib, 'SymEnumerateSymbols');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SymEnumerateSymbols]
- end;
-end;
-
-var
- _SymEnumerateSymbolsW: Pointer;
-
-function SymEnumerateSymbolsW;
-begin
- GetProcedureAddress(_SymEnumerateSymbolsW, ImageHlpLib, 'SymEnumerateSymbolsW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SymEnumerateSymbolsW]
- end;
-end;
-
-var
- _EnumerateLoadedModules64: Pointer;
-
-function EnumerateLoadedModules64;
-begin
- GetProcedureAddress(_EnumerateLoadedModules64, ImageHlpLib, 'EnumerateLoadedModules64');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_EnumerateLoadedModules64]
- end;
-end;
-
-var
- _EnumerateLoadedModules: Pointer;
-
-function EnumerateLoadedModules;
-begin
- GetProcedureAddress(_EnumerateLoadedModules, ImageHlpLib, 'EnumerateLoadedModules');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_EnumerateLoadedModules]
- end;
-end;
-
-var
- _SymFunctionTableAccess64: Pointer;
-
-function SymFunctionTableAccess64;
-begin
- GetProcedureAddress(_SymFunctionTableAccess64, ImageHlpLib, 'SymFunctionTableAccess64');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SymFunctionTableAccess64]
- end;
-end;
-
-var
- _SymFunctionTableAccess: Pointer;
-
-function SymFunctionTableAccess;
-begin
- GetProcedureAddress(_SymFunctionTableAccess, ImageHlpLib, 'SymFunctionTableAccess');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SymFunctionTableAccess]
- end;
-end;
-
-var
- _SymGetModuleInfo64: Pointer;
-
-function SymGetModuleInfo64;
-begin
- GetProcedureAddress(_SymGetModuleInfo64, ImageHlpLib, 'SymGetModuleInfo64');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SymGetModuleInfo64]
- end;
-end;
-
-var
- _SymGetModuleInfoW64: Pointer;
-
-function SymGetModuleInfoW64;
-begin
- GetProcedureAddress(_SymGetModuleInfoW64, ImageHlpLib, 'SymGetModuleInfoW64');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SymGetModuleInfoW64]
- end;
-end;
-
-var
- _SymGetModuleInfo: Pointer;
-
-function SymGetModuleInfo;
-begin
- GetProcedureAddress(_SymGetModuleInfo, ImageHlpLib, 'SymGetModuleInfo');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SymGetModuleInfo]
- end;
-end;
-
-var
- _SymGetModuleInfoW: Pointer;
-
-function SymGetModuleInfoW;
-begin
- GetProcedureAddress(_SymGetModuleInfoW, ImageHlpLib, 'SymGetModuleInfoW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SymGetModuleInfoW]
- end;
-end;
-
-var
- _SymGetModuleBase64: Pointer;
-
-function SymGetModuleBase64;
-begin
- GetProcedureAddress(_SymGetModuleBase64, ImageHlpLib, 'SymGetModuleBase64');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SymGetModuleBase64]
- end;
-end;
-
-var
- _SymGetModuleBase: Pointer;
-
-function SymGetModuleBase;
-begin
- GetProcedureAddress(_SymGetModuleBase, ImageHlpLib, 'SymGetModuleBase');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SymGetModuleBase]
- end;
-end;
-
-var
- _SymGetSymNext64: Pointer;
-
-function SymGetSymNext64;
-begin
- GetProcedureAddress(_SymGetSymNext64, ImageHlpLib, 'SymGetSymNext64');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SymGetSymNext64]
- end;
-end;
-
-var
- _SymGetSymNext: Pointer;
-
-function SymGetSymNext;
-begin
- GetProcedureAddress(_SymGetSymNext, ImageHlpLib, 'SymGetSymNext');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SymGetSymNext]
- end;
-end;
-
-var
- _SymGetSymPrev64: Pointer;
-
-function SymGetSymPrev64;
-begin
- GetProcedureAddress(_SymGetSymPrev64, ImageHlpLib, 'SymGetSymPrev64');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SymGetSymPrev64]
- end;
-end;
-
-var
- _SymGetSymPrev: Pointer;
-
-function SymGetSymPrev;
-begin
- GetProcedureAddress(_SymGetSymPrev, ImageHlpLib, 'SymGetSymPrev');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SymGetSymPrev]
- end;
-end;
-
-var
- _SymGetLineFromAddr64: Pointer;
-
-function SymGetLineFromAddr64;
-begin
- GetProcedureAddress(_SymGetLineFromAddr64, ImageHlpLib, 'SymGetLineFromAddr64');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SymGetLineFromAddr64]
- end;
-end;
-
-var
- _SymGetLineFromAddr: Pointer;
-
-function SymGetLineFromAddr;
-begin
- GetProcedureAddress(_SymGetLineFromAddr, ImageHlpLib, 'SymGetLineFromAddr');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SymGetLineFromAddr]
- end;
-end;
-
-var
- _SymGetLineFromName64: Pointer;
-
-function SymGetLineFromName64;
-begin
- GetProcedureAddress(_SymGetLineFromName64, ImageHlpLib, 'SymGetLineFromName64');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SymGetLineFromName64]
- end;
-end;
-
-var
- _SymGetLineFromName: Pointer;
-
-function SymGetLineFromName;
-begin
- GetProcedureAddress(_SymGetLineFromName, ImageHlpLib, 'SymGetLineFromName');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SymGetLineFromName]
- end;
-end;
-
-var
- _SymGetLineNext64: Pointer;
-
-function SymGetLineNext64;
-begin
- GetProcedureAddress(_SymGetLineNext64, ImageHlpLib, 'SymGetLineNext64');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SymGetLineNext64]
- end;
-end;
-
-var
- _SymGetLineNext: Pointer;
-
-function SymGetLineNext;
-begin
- GetProcedureAddress(_SymGetLineNext, ImageHlpLib, 'SymGetLineNext');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SymGetLineNext]
- end;
-end;
-
-var
- _SymGetLinePrev64: Pointer;
-
-function SymGetLinePrev64;
-begin
- GetProcedureAddress(_SymGetLinePrev64, ImageHlpLib, 'SymGetLinePrev64');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SymGetLinePrev64]
- end;
-end;
-
-var
- _SymGetLinePrev: Pointer;
-
-function SymGetLinePrev;
-begin
- GetProcedureAddress(_SymGetLinePrev, ImageHlpLib, 'SymGetLinePrev');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SymGetLinePrev]
- end;
-end;
-
-var
- _SymMatchFileName: Pointer;
-
-function SymMatchFileName;
-begin
- GetProcedureAddress(_SymMatchFileName, ImageHlpLib, 'SymMatchFileName');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SymMatchFileName]
- end;
-end;
-
-var
- _SymInitialize: Pointer;
-
-function SymInitialize;
-begin
- GetProcedureAddress(_SymInitialize, ImageHlpLib, 'SymInitialize');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SymInitialize]
- end;
-end;
-
-var
- _SymGetSearchPath: Pointer;
-
-function SymGetSearchPath;
-begin
- GetProcedureAddress(_SymGetSearchPath, ImageHlpLib, 'SymGetSearchPath');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SymGetSearchPath]
- end;
-end;
-
-var
- _SymSetSearchPath: Pointer;
-
-function SymSetSearchPath;
-begin
- GetProcedureAddress(_SymSetSearchPath, ImageHlpLib, 'SymSetSearchPath');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SymSetSearchPath]
- end;
-end;
-
-var
- _SymLoadModuleEx: Pointer;
-
-function SymLoadModuleEx;
-begin
- GetProcedureAddress(_SymLoadModuleEx, ImageHlpLib, 'SymLoadModuleEx');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SymLoadModuleEx]
- end;
-end;
-
-var
- _SymLoadModule64: Pointer;
-
-function SymLoadModule64;
-begin
- GetProcedureAddress(_SymLoadModule64, ImageHlpLib, 'SymLoadModule64');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SymLoadModule64]
- end;
-end;
-
-var
- _SymLoadModule: Pointer;
-
-function SymLoadModule;
-begin
- GetProcedureAddress(_SymLoadModule, ImageHlpLib, 'SymLoadModule');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SymLoadModule]
- end;
-end;
-
-var
- _SymUnloadModule64: Pointer;
-
-function SymUnloadModule64;
-begin
- GetProcedureAddress(_SymUnloadModule64, ImageHlpLib, 'SymUnloadModule64');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SymUnloadModule64]
- end;
-end;
-
-var
- _SymUnloadModule: Pointer;
-
-function SymUnloadModule;
-begin
- GetProcedureAddress(_SymUnloadModule, ImageHlpLib, 'SymUnloadModule');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SymUnloadModule]
- end;
-end;
-
-var
- _SymUnDName64: Pointer;
-
-function SymUnDName64;
-begin
- GetProcedureAddress(_SymUnDName64, ImageHlpLib, 'SymUnDName64');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SymUnDName64]
- end;
-end;
-
-var
- _SymUnDName: Pointer;
-
-function SymUnDName;
-begin
- GetProcedureAddress(_SymUnDName, ImageHlpLib, 'SymUnDName');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SymUnDName]
- end;
-end;
-
-var
- _SymRegisterCallback64: Pointer;
-
-function SymRegisterCallback64;
-begin
- GetProcedureAddress(_SymRegisterCallback64, ImageHlpLib, 'SymRegisterCallback64');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SymRegisterCallback64]
- end;
-end;
-
-var
- _SymRegFuncEntryCallback64: Pointer;
-
-function SymRegisterFunctionEntryCallback64;
-begin
- GetProcedureAddress(_SymRegFuncEntryCallback64, ImageHlpLib, 'SymRegisterFunctionEntryCallback64');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SymRegFuncEntryCallback64]
- end;
-end;
-
-var
- _SymRegisterCallback: Pointer;
-
-function SymRegisterCallback;
-begin
- GetProcedureAddress(_SymRegisterCallback, ImageHlpLib, 'SymRegisterCallback');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SymRegisterCallback]
- end;
-end;
-
-var
- _SymRegisterFuncEntryCallback: Pointer;
-
-function SymRegisterFunctionEntryCallback;
-begin
- GetProcedureAddress(_SymRegisterFuncEntryCallback, ImageHlpLib, 'SymRegisterFunctionEntryCallback');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SymRegisterFuncEntryCallback]
- end;
-end;
-
-var
- _SymSetContext: Pointer;
-
-function SymSetContext;
-begin
- GetProcedureAddress(_SymSetContext, ImageHlpLib, 'SymSetContext');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SymSetContext]
- end;
-end;
-
-var
- _SymFromAddr: Pointer;
-
-function SymFromAddr;
-begin
- GetProcedureAddress(_SymFromAddr, ImageHlpLib, 'SymFromAddr');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SymFromAddr]
- end;
-end;
-
-var
- _SymFromName: Pointer;
-
-function SymFromName;
-begin
- GetProcedureAddress(_SymFromName, ImageHlpLib, 'SymFromName');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SymFromName]
- end;
-end;
-
-var
- _SymEnumSymbolsForAddr: Pointer;
-
-function SymEnumSymbolsForAddr;
-begin
- GetProcedureAddress(_SymEnumSymbolsForAddr, ImageHlpLib, 'SymEnumSymbolsForAddr');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SymEnumSymbolsForAddr]
- end;
-end;
-
-var
- _SymEnumSymbols: Pointer;
-
-function SymEnumSymbols;
-begin
- GetProcedureAddress(_SymEnumSymbols, ImageHlpLib, 'SymEnumSymbols');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SymEnumSymbols]
- end;
-end;
-
-var
- _SymGetTypeInfo: Pointer;
-
-function SymGetTypeInfo;
-begin
- GetProcedureAddress(_SymGetTypeInfo, ImageHlpLib, 'SymGetTypeInfo');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SymGetTypeInfo]
- end;
-end;
-
-var
- _SymEnumTypes: Pointer;
-
-function SymEnumTypes;
-begin
- GetProcedureAddress(_SymEnumTypes, ImageHlpLib, 'SymEnumTypes');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SymEnumTypes]
- end;
-end;
-
-var
- _SymGetTypeFromName: Pointer;
-
-function SymGetTypeFromName;
-begin
- GetProcedureAddress(_SymGetTypeFromName, ImageHlpLib, 'SymGetTypeFromName');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SymGetTypeFromName]
- end;
-end;
-
-var
- _SymAddSymbol: Pointer;
-
-function SymAddSymbol;
-begin
- GetProcedureAddress(_SymAddSymbol, ImageHlpLib, 'SymAddSymbol');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SymAddSymbol]
- end;
-end;
-
-var
- _SymDeleteSymbol: Pointer;
-
-function SymDeleteSymbol;
-begin
- GetProcedureAddress(_SymDeleteSymbol, ImageHlpLib, 'SymDeleteSymbol');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SymDeleteSymbol]
- end;
-end;
-
-var
- _DbgHelpCreateUserDump: Pointer;
-
-function DbgHelpCreateUserDump;
-begin
- GetProcedureAddress(_DbgHelpCreateUserDump, ImageHlpLib, 'DbgHelpCreateUserDump');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DbgHelpCreateUserDump]
- end;
-end;
-
-var
- _DbgHelpCreateUserDumpW: Pointer;
-
-function DbgHelpCreateUserDumpW;
-begin
- GetProcedureAddress(_DbgHelpCreateUserDumpW, ImageHlpLib, 'DbgHelpCreateUserDumpW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DbgHelpCreateUserDumpW]
- end;
-end;
-
-var
- _SymGetSymFromAddr64: Pointer;
-
-function SymGetSymFromAddr64;
-begin
- GetProcedureAddress(_SymGetSymFromAddr64, ImageHlpLib, 'SymGetSymFromAddr64');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SymGetSymFromAddr64]
- end;
-end;
-
-var
- _SymGetSymFromAddr: Pointer;
-
-function SymGetSymFromAddr;
-begin
- GetProcedureAddress(_SymGetSymFromAddr, ImageHlpLib, 'SymGetSymFromAddr');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SymGetSymFromAddr]
- end;
-end;
-
-var
- _SymGetSymFromName64: Pointer;
-
-function SymGetSymFromName64;
-begin
- GetProcedureAddress(_SymGetSymFromName64, ImageHlpLib, 'SymGetSymFromName64');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SymGetSymFromName64]
- end;
-end;
-
-var
- _SymGetSymFromName: Pointer;
-
-function SymGetSymFromName;
-begin
- GetProcedureAddress(_SymGetSymFromName, ImageHlpLib, 'SymGetSymFromName');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SymGetSymFromName]
- end;
-end;
-
-var
- _FindFileInPath: Pointer;
-
-function FindFileInPath;
-begin
- GetProcedureAddress(_FindFileInPath, ImageHlpLib, 'FindFileInPath');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_FindFileInPath]
- end;
-end;
-
-var
- _FindFileInSearchPath: Pointer;
-
-function FindFileInSearchPath;
-begin
- GetProcedureAddress(_FindFileInSearchPath, ImageHlpLib, 'FindFileInSearchPath');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_FindFileInSearchPath]
- end;
-end;
-
-var
- _SymEnumSym: Pointer;
-
-function SymEnumSym;
-begin
- GetProcedureAddress(_SymEnumSym, ImageHlpLib, 'SymEnumSym');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SymEnumSym]
- end;
-end;
-
-var
- _MiniDumpWriteDump: Pointer;
-
-function MiniDumpWriteDump;
-begin
- GetProcedureAddress(_MiniDumpWriteDump, ImageHlpLib, 'MiniDumpWriteDump');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MiniDumpWriteDump]
- end;
-end;
-
-var
- _MiniDumpReadDumpStream: Pointer;
-
-function MiniDumpReadDumpStream;
-begin
- GetProcedureAddress(_MiniDumpReadDumpStream, ImageHlpLib, 'MiniDumpReadDumpStream');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MiniDumpReadDumpStream]
- end;
-end;
-
-{$ELSE}
-
-function BindImage; external ImageHlpLib name 'BindImage';
-function BindImageEx; external ImageHlpLib name 'BindImageEx';
-function ReBaseImage; external ImageHlpLib name 'ReBaseImage';
-function ReBaseImage64; external ImageHlpLib name 'ReBaseImage64';
-function CheckSumMappedFile; external ImageHlpLib name 'CheckSumMappedFile';
-function MapFileAndCheckSumA; external ImageHlpLib name 'MapFileAndCheckSumA';
-function MapFileAndCheckSumW; external ImageHlpLib name 'MapFileAndCheckSumW';
-function MapFileAndCheckSum; external ImageHlpLib name 'MapFileAndCheckSum' + AWSuffix;
-function GetImageConfigInformation; external ImageHlpLib name 'GetImageConfigInformation';
-function GetImageUnusedHeaderBytes; external ImageHlpLib name 'GetImageUnusedHeaderBytes';
-function SetImageConfigInformation; external ImageHlpLib name 'SetImageConfigInformation';
-function ImageGetDigestStream; external ImageHlpLib name 'ImageGetDigestStream';
-function ImageAddCertificate; external ImageHlpLib name 'ImageAddCertificate';
-function ImageRemoveCertificate; external ImageHlpLib name 'ImageRemoveCertificate';
-function ImageEnumerateCertificates; external ImageHlpLib name 'ImageEnumerateCertificates';
-function ImageGetCertificateData; external ImageHlpLib name 'ImageGetCertificateData';
-function ImageGetCertificateHeader; external ImageHlpLib name 'ImageGetCertificateHeader';
-function ImageLoad; external ImageHlpLib name 'ImageLoad';
-function ImageUnload; external ImageHlpLib name 'ImageUnload';
-function MapAndLoad; external ImageHlpLib name 'MapAndLoad';
-function UnMapAndLoad; external ImageHlpLib name 'UnMapAndLoad';
-function TouchFileTimes; external ImageHlpLib name 'TouchFileTimes';
-function SplitSymbols; external ImageHlpLib name 'SplitSymbols';
-function UpdateDebugInfoFile; external ImageHlpLib name 'UpdateDebugInfoFile';
-function UpdateDebugInfoFileEx; external ImageHlpLib name 'UpdateDebugInfoFileEx';
-function FindDebugInfoFile; external ImageHlpLib name 'FindDebugInfoFile';
-function FindDebugInfoFileEx; external ImageHlpLib name 'FindDebugInfoFileEx';
-function SymFindFileInPath; external ImageHlpLib name 'SymFindFileInPath';
-function FindExecutableImage; external ImageHlpLib name 'FindExecutableImage';
-function FindExecutableImageEx; external ImageHlpLib name 'FindExecutableImageEx';
-function ImageNtHeader; external ImageHlpLib name 'ImageNtHeader';
-function ImageDirectoryEntryToDataEx; external ImageHlpLib name 'ImageDirectoryEntryToDataEx';
-function ImageDirectoryEntryToData; external ImageHlpLib name 'ImageDirectoryEntryToData';
-function ImageRvaToSection; external ImageHlpLib name 'ImageRvaToSection';
-function ImageRvaToVa; external ImageHlpLib name 'ImageRvaToVa';
-function MapDebugInformation; external ImageHlpLib name 'MapDebugInformation';
-function UnmapDebugInformation; external ImageHlpLib name 'UnmapDebugInformation';
-function SearchTreeForFile; external ImageHlpLib name 'SearchTreeForFile';
-function EnumDirTree; external ImageHlpLib name 'EnumDirTree';
-function MakeSureDirectoryPathExists; external ImageHlpLib name 'MakeSureDirectoryPathExists';
-function UnDecorateSymbolName; external ImageHlpLib name 'UnDecorateSymbolName';
-function StackWalk64; external ImageHlpLib name 'StackWalk64';
-function StackWalk; external ImageHlpLib name 'StackWalk';
-function ImagehlpApiVersion; external ImageHlpLib name 'ImagehlpApiVersion';
-function ImagehlpApiVersionEx; external ImageHlpLib name 'ImagehlpApiVersionEx';
-function GetTimestampForLoadedLibrary; external ImageHlpLib name 'GetTimestampForLoadedLibrary';
-function SymSetOptions; external ImageHlpLib name 'SymSetOptions';
-function SymGetOptions; external ImageHlpLib name 'SymGetOptions';
-function SymCleanup; external ImageHlpLib name 'SymCleanup';
-function SymMatchString; external ImageHlpLib name 'SymMatchString';
-function SymEnumSourceFiles; external ImageHlpLib name 'SymEnumSourceFiles';
-function SymEnumerateModules64; external ImageHlpLib name 'SymEnumerateModules64';
-function SymEnumerateModules; external ImageHlpLib name 'SymEnumerateModules';
-function SymEnumerateSymbols64; external ImageHlpLib name 'SymEnumerateSymbols64';
-function SymEnumerateSymbolsW64; external ImageHlpLib name 'SymEnumerateSymbolsW64';
-function SymEnumerateSymbols; external ImageHlpLib name 'SymEnumerateSymbols';
-function SymEnumerateSymbolsW; external ImageHlpLib name 'SymEnumerateSymbolsW';
-function EnumerateLoadedModules64; external ImageHlpLib name 'EnumerateLoadedModules64';
-function EnumerateLoadedModules; external ImageHlpLib name 'EnumerateLoadedModules';
-function SymFunctionTableAccess64; external ImageHlpLib name 'SymFunctionTableAccess64';
-function SymFunctionTableAccess; external ImageHlpLib name 'SymFunctionTableAccess';
-function SymGetModuleInfo64; external ImageHlpLib name 'SymGetModuleInfo64';
-function SymGetModuleInfoW64; external ImageHlpLib name 'SymGetModuleInfoW64';
-function SymGetModuleInfo; external ImageHlpLib name 'SymGetModuleInfo';
-function SymGetModuleInfoW; external ImageHlpLib name 'SymGetModuleInfoW';
-function SymGetModuleBase64; external ImageHlpLib name 'SymGetModuleBase64';
-function SymGetModuleBase; external ImageHlpLib name 'SymGetModuleBase';
-function SymGetSymNext64; external ImageHlpLib name 'SymGetSymNext64';
-function SymGetSymNext; external ImageHlpLib name 'SymGetSymNext';
-function SymGetSymPrev64; external ImageHlpLib name 'SymGetSymPrev64';
-function SymGetSymPrev; external ImageHlpLib name 'SymGetSymPrev';
-function SymGetLineFromAddr64; external ImageHlpLib name 'SymGetLineFromAddr64';
-function SymGetLineFromAddr; external ImageHlpLib name 'SymGetLineFromAddr';
-function SymGetLineFromName64; external ImageHlpLib name 'SymGetLineFromName64';
-function SymGetLineFromName; external ImageHlpLib name 'SymGetLineFromName';
-function SymGetLineNext64; external ImageHlpLib name 'SymGetLineNext64';
-function SymGetLineNext; external ImageHlpLib name 'SymGetLineNext';
-function SymGetLinePrev64; external ImageHlpLib name 'SymGetLinePrev64';
-function SymGetLinePrev; external ImageHlpLib name 'SymGetLinePrev';
-function SymMatchFileName; external ImageHlpLib name 'SymMatchFileName';
-function SymInitialize; external ImageHlpLib name 'SymInitialize';
-function SymGetSearchPath; external ImageHlpLib name 'SymGetSearchPath';
-function SymSetSearchPath; external ImageHlpLib name 'SymSetSearchPath';
-function SymLoadModuleEx; external ImageHlpLib name 'SymLoadModuleEx';
-function SymLoadModule64; external ImageHlpLib name 'SymLoadModule64';
-function SymLoadModule; external ImageHlpLib name 'SymLoadModule';
-function SymUnloadModule64; external ImageHlpLib name 'SymUnloadModule64';
-function SymUnloadModule; external ImageHlpLib name 'SymUnloadModule';
-function SymUnDName64; external ImageHlpLib name 'SymUnDName64';
-function SymUnDName; external ImageHlpLib name 'SymUnDName';
-function SymRegisterCallback64; external ImageHlpLib name 'SymRegisterCallback64';
-function SymRegisterFunctionEntryCallback64; external ImageHlpLib name 'SymRegisterFunctionEntryCallback64';
-function SymRegisterCallback; external ImageHlpLib name 'SymRegisterCallback';
-function SymRegisterFunctionEntryCallback; external ImageHlpLib name 'SymRegisterFunctionEntryCallback';
-function SymSetContext; external ImageHlpLib name 'SymSetContext';
-function SymFromAddr; external ImageHlpLib name 'SymFromAddr';
-function SymFromName; external ImageHlpLib name 'SymFromName';
-function SymEnumSymbolsForAddr; external ImageHlpLib name 'SymEnumSymbolsForAddr';
-function SymEnumSymbols; external ImageHlpLib name 'SymEnumSymbols';
-function SymGetTypeInfo; external ImageHlpLib name 'SymGetTypeInfo';
-function SymEnumTypes; external ImageHlpLib name 'SymEnumTypes';
-function SymGetTypeFromName; external ImageHlpLib name 'SymGetTypeFromName';
-function SymAddSymbol; external ImageHlpLib name 'SymAddSymbol';
-function SymDeleteSymbol; external ImageHlpLib name 'SymDeleteSymbol';
-function DbgHelpCreateUserDump; external ImageHlpLib name 'DbgHelpCreateUserDump';
-function DbgHelpCreateUserDumpW; external ImageHlpLib name 'DbgHelpCreateUserDumpW';
-function SymGetSymFromAddr64; external ImageHlpLib name 'SymGetSymFromAddr64';
-function SymGetSymFromAddr; external ImageHlpLib name 'SymGetSymFromAddr';
-function SymGetSymFromName64; external ImageHlpLib name 'SymGetSymFromName64';
-function SymGetSymFromName; external ImageHlpLib name 'SymGetSymFromName';
-function FindFileInPath; external ImageHlpLib name 'FindFileInPath';
-function FindFileInSearchPath; external ImageHlpLib name 'FindFileInSearchPath';
-function SymEnumSym; external ImageHlpLib name 'SymEnumSym';
-function MiniDumpWriteDump; external ImageHlpLib name 'MiniDumpWriteDump';
-function MiniDumpReadDumpStream; external ImageHlpLib name 'MiniDumpReadDumpStream';
-
-{$ENDIF DYNAMIC_LINK}
-
-end.
+{******************************************************************************}
+{ }
+{ Image Help API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: imagehlp.h, released August 2001. The original Pascal }
+{ code is: ImageHelp.pas, released December 2000. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwaimagehlp.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaImageHlp;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "ImageHlp.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ Windows, JwaWinBase, JwaWinNT, JwaWinType;
+
+const
+ IMAGE_SEPARATION = 64*1024;
+ {$EXTERNALSYM IMAGE_SEPARATION}
+
+type
+ PLOADED_IMAGE = ^LOADED_IMAGE;
+ {$EXTERNALSYM PLOADED_IMAGE}
+ _LOADED_IMAGE = record
+ ModuleName: PSTR;
+ hFile: HANDLE;
+ MappedAddress: PUCHAR;
+ FileHeader: PIMAGE_NT_HEADERS32;
+ LastRvaSection: PIMAGE_SECTION_HEADER;
+ NumberOfSections: ULONG;
+ Sections: PIMAGE_SECTION_HEADER;
+ Characteristics: ULONG;
+ fSystemImage: ByteBool;
+ fDOSImage: ByteBool;
+ Links: LIST_ENTRY;
+ SizeOfImage: ULONG;
+ end;
+ {$EXTERNALSYM _LOADED_IMAGE}
+ LOADED_IMAGE = _LOADED_IMAGE;
+ {$EXTERNALSYM LOADED_IMAGE}
+ TLoadedImage = LOADED_IMAGE;
+ PLoadedImage = PLOADED_IMAGE;
+
+const
+ MAX_SYM_NAME = 2000;
+ {$EXTERNALSYM MAX_SYM_NAME}
+
+function BindImage(ImageName, DllPath, SymbolPath: PSTR): BOOL; stdcall;
+{$EXTERNALSYM BindImage}
+
+type
+ _IMAGEHLP_STATUS_REASON = (
+ BindOutOfMemory,
+ BindRvaToVaFailed,
+ BindNoRoomInImage,
+ BindImportModuleFailed,
+ BindImportProcedureFailed,
+ BindImportModule,
+ BindImportProcedure,
+ BindForwarder,
+ BindForwarderNOT,
+ BindImageModified,
+ BindExpandFileHeaders,
+ BindImageComplete,
+ BindMismatchedSymbols,
+ BindSymbolsNotUpdated,
+ BindImportProcedure32,
+ BindImportProcedure64,
+ BindForwarder32,
+ BindForwarder64,
+ BindForwarderNOT32,
+ BindForwarderNOT64);
+ {$EXTERNALSYM _IMAGEHLP_STATUS_REASON}
+ IMAGEHLP_STATUS_REASON = _IMAGEHLP_STATUS_REASON;
+ {$EXTERNALSYM IMAGEHLP_STATUS_REASON}
+ TImageHlpStatusReason = IMAGEHLP_STATUS_REASON;
+
+ PIMAGEHLP_STATUS_ROUTINE = function(Reason: IMAGEHLP_STATUS_REASON;
+ ImageName, DllName: PSTR; Va, Parameter: ULONG_PTR): BOOL; stdcall;
+ {$EXTERNALSYM PIMAGEHLP_STATUS_ROUTINE}
+ PImageHlpStatusRoutine = PIMAGEHLP_STATUS_ROUTINE;
+
+ PIMAGEHLP_STATUS_ROUTINE32 = function(Reason: IMAGEHLP_STATUS_REASON; ImageName, DllName: PSTR;
+ Va: ULONG; Parameter: ULONG_PTR): BOOL; stdcall;
+ {$EXTERNALSYM PIMAGEHLP_STATUS_ROUTINE32}
+ PImageHlpStatusRoutine23 = PIMAGEHLP_STATUS_ROUTINE32;
+
+ PIMAGEHLP_STATUS_ROUTINE64 = function(Reason: IMAGEHLP_STATUS_REASON; ImageName, DllName: PSTR;
+ Va: ULONG64; Parameter: ULONG_PTR): BOOL; stdcall;
+ {$EXTERNALSYM PIMAGEHLP_STATUS_ROUTINE64}
+ PImageHlpStatusRoutine64 = PIMAGEHLP_STATUS_ROUTINE64;
+
+function BindImageEx(Flags: DWORD; ImageName, DllPath, SymbolPath: PSTR;
+ StatusRoutine: PIMAGEHLP_STATUS_ROUTINE): BOOL; stdcall;
+{$EXTERNALSYM BindImageEx}
+
+const
+ BIND_NO_BOUND_IMPORTS = $00000001;
+ {$EXTERNALSYM BIND_NO_BOUND_IMPORTS}
+ BIND_NO_UPDATE = $00000002;
+ {$EXTERNALSYM BIND_NO_UPDATE}
+ BIND_ALL_IMAGES = $00000004;
+ {$EXTERNALSYM BIND_ALL_IMAGES}
+ BIND_CACHE_IMPORT_DLLS = $00000008; // Cache dll's across calls to BindImageEx (same as NT 3.1->NT 4.0)
+ {$EXTERNALSYM BIND_CACHE_IMPORT_DLLS}
+
+ BIND_REPORT_64BIT_VA = $00000010;
+ {$EXTERNALSYM BIND_REPORT_64BIT_VA}
+
+function ReBaseImage(CurrentImageName: PSTR; SymbolPath: PSTR; fReBase: BOOL;
+ fRebaseSysfileOk: BOOL; fGoingDown: BOOL; CheckImageSize: ULONG;
+ var OldImageSize: ULONG; var OldImageBase: ULONG_PTR; var NewImageSize: ULONG;
+ var NewImageBase: ULONG_PTR; TimeStamp: ULONG): BOOL; stdcall;
+{$EXTERNALSYM ReBaseImage}
+
+function ReBaseImage64(CurrentImageName: PSTR; SymbolPath: PSTR; fReBase: BOOL;
+ fRebaseSysfileOk: BOOL; fGoingDown: BOOL; CheckImageSize: ULONG;
+ var OldImageSize: ULONG; var OldImageBase: ULONG64; var NewImageSize: ULONG;
+ var NewImageBase: ULONG64; TimeStamp: ULONG): BOOL; stdcall;
+{$EXTERNALSYM ReBaseImage64}
+
+//
+// Define checksum return codes.
+//
+
+const
+ CHECKSUM_SUCCESS = 0;
+ {$EXTERNALSYM CHECKSUM_SUCCESS}
+ CHECKSUM_OPEN_FAILURE = 1;
+ {$EXTERNALSYM CHECKSUM_OPEN_FAILURE}
+ CHECKSUM_MAP_FAILURE = 2;
+ {$EXTERNALSYM CHECKSUM_MAP_FAILURE}
+ CHECKSUM_MAPVIEW_FAILURE = 3;
+ {$EXTERNALSYM CHECKSUM_MAPVIEW_FAILURE}
+ CHECKSUM_UNICODE_FAILURE = 4;
+ {$EXTERNALSYM CHECKSUM_UNICODE_FAILURE}
+
+// Define Splitsym flags.
+
+ SPLITSYM_REMOVE_PRIVATE = $00000001; // Remove CV types/symbols and Fixup debug
+ {$EXTERNALSYM SPLITSYM_REMOVE_PRIVATE}
+ // Used for creating .dbg files that ship
+ // as part of the product.
+
+ SPLITSYM_EXTRACT_ALL = $00000002; // Extract all debug info from image.
+ {$EXTERNALSYM SPLITSYM_EXTRACT_ALL}
+ // Normally, FPO is left in the image
+ // to allow stack traces through the code.
+ // Using this switch is similar to linking
+ // with -debug:none except the .dbg file
+ // exists...
+
+ SPLITSYM_SYMBOLPATH_IS_SRC = $00000004; // The SymbolFilePath contains an alternate
+ {$EXTERNALSYM SPLITSYM_SYMBOLPATH_IS_SRC}
+ // path to locate the pdb.
+
+//
+// Define checksum function prototypes.
+//
+
+function CheckSumMappedFile(BaseAddress: PVOID; FileLength: DWORD;
+ var HeaderSum, CheckSum: DWORD): PIMAGE_NT_HEADERS; stdcall;
+{$EXTERNALSYM CheckSumMappedFile}
+
+function MapFileAndCheckSumA(Filename: PSTR; var HeaderSum, CheckSum: DWORD): DWORD; stdcall;
+{$EXTERNALSYM MapFileAndCheckSumA}
+function MapFileAndCheckSumW(Filename: PWSTR; var HeaderSum, CheckSum: DWORD): DWORD; stdcall;
+{$EXTERNALSYM MapFileAndCheckSumW}
+function MapFileAndCheckSum(Filename: PTSTR; var HeaderSum, CheckSum: DWORD): DWORD; stdcall;
+{$EXTERNALSYM MapFileAndCheckSum}
+
+function GetImageConfigInformation(const LoadedImage: LOADED_IMAGE;
+ var ImageConfigInformation: IMAGE_LOAD_CONFIG_DIRECTORY): BOOL; stdcall;
+{$EXTERNALSYM GetImageConfigInformation}
+
+function GetImageUnusedHeaderBytes(const LoadedImage: LOADED_IMAGE;
+ var SizeUnusedHeaderBytes: DWORD): DWORD; stdcall;
+{$EXTERNALSYM GetImageUnusedHeaderBytes}
+
+function SetImageConfigInformation(const LoadedImage: LOADED_IMAGE;
+ const ImageConfigInformation: IMAGE_LOAD_CONFIG_DIRECTORY): BOOL; stdcall;
+{$EXTERNALSYM SetImageConfigInformation}
+
+// Image Integrity API's
+
+const
+ CERT_PE_IMAGE_DIGEST_DEBUG_INFO = $01;
+ {$EXTERNALSYM CERT_PE_IMAGE_DIGEST_DEBUG_INFO}
+ CERT_PE_IMAGE_DIGEST_RESOURCES = $02;
+ {$EXTERNALSYM CERT_PE_IMAGE_DIGEST_RESOURCES}
+ CERT_PE_IMAGE_DIGEST_ALL_IMPORT_INFO = $04;
+ {$EXTERNALSYM CERT_PE_IMAGE_DIGEST_ALL_IMPORT_INFO}
+ CERT_PE_IMAGE_DIGEST_NON_PE_INFO = $08; // include data outside the PE image
+ {$EXTERNALSYM CERT_PE_IMAGE_DIGEST_NON_PE_INFO}
+
+ CERT_SECTION_TYPE_ANY = $FF; // Any Certificate type
+ {$EXTERNALSYM CERT_SECTION_TYPE_ANY}
+
+type
+ DIGEST_HANDLE = PVOID;
+ {$EXTERNALSYM DIGEST_HANDLE}
+ TDigestHandle = DIGEST_HANDLE;
+
+ DIGEST_FUNCTION = function(refdata: DIGEST_HANDLE; pData: PBYTE; dwLength: DWORD): BOOL; stdcall;
+ {$EXTERNALSYM DIGEST_FUNCTION}
+ TDigestFunction = DIGEST_FUNCTION;
+
+function ImageGetDigestStream(FileHandle: HANDLE; DigestLevel: DWORD;
+ DigestFunction: DIGEST_FUNCTION; DigestHandle: DIGEST_HANDLE): BOOL; stdcall;
+{$EXTERNALSYM ImageGetDigestStream}
+
+function ImageAddCertificate(FileHandle: HANDLE; Certificate: PWinCertificate;
+ var Index: DWORD): BOOL; stdcall;
+{$EXTERNALSYM ImageAddCertificate}
+
+function ImageRemoveCertificate(FileHandle: HANDLE; Index: DWORD): BOOL; stdcall;
+{$EXTERNALSYM ImageRemoveCertificate}
+
+function ImageEnumerateCertificates(FileHandle: HANDLE; TypeFilter: WORD;
+ var CertificateCount: DWORD; Indices: PDWORD; IndexCount: DWORD): BOOL; stdcall;
+{$EXTERNALSYM ImageEnumerateCertificates}
+
+function ImageGetCertificateData(FileHandle: HANDLE; CertificateIndex: DWORD;
+ Certificate: PWinCertificate; var RequiredLength: DWORD): BOOL; stdcall;
+{$EXTERNALSYM ImageGetCertificateData}
+
+function ImageGetCertificateHeader(FileHandle: HANDLE; CertificateIndex: DWORD;
+ Certificateheader: PWinCertificate): BOOL; stdcall;
+{$EXTERNALSYM ImageGetCertificateHeader}
+
+function ImageLoad(DllName: PSTR; DllPath: PSTR): PLOADED_IMAGE; stdcall;
+{$EXTERNALSYM ImageLoad}
+
+function ImageUnload(const LoadedImage: LOADED_IMAGE): BOOL; stdcall;
+{$EXTERNALSYM ImageUnload}
+
+function MapAndLoad(ImageName, DllPath: PSTR; var LoadedImage: LOADED_IMAGE;
+ DotDll: BOOL; ReadOnly: BOOL): BOOL; stdcall;
+{$EXTERNALSYM MapAndLoad}
+
+function UnMapAndLoad(const LoadedImage: LOADED_IMAGE): BOOL; stdcall;
+{$EXTERNALSYM UnMapAndLoad}
+
+function TouchFileTimes(FileHandle: HANDLE; pSystemTime: PSYSTEMTIME): BOOL; stdcall;
+{$EXTERNALSYM TouchFileTimes}
+
+function SplitSymbols(ImageName, SymbolsPath, SymbolFilePath: PSTR; Flags: DWORD): BOOL; stdcall;
+{$EXTERNALSYM SplitSymbols}
+
+function UpdateDebugInfoFile(ImageFileName, SymbolPath, DebugFilePath: PSTR;
+ const NtHeaders: IMAGE_NT_HEADERS32): BOOL; stdcall;
+{$EXTERNALSYM UpdateDebugInfoFile}
+
+function UpdateDebugInfoFileEx(ImageFileName, SymbolPath, DebugFilePath: PSTR;
+ const NtHeaders: IMAGE_NT_HEADERS32; OldChecksum: DWORD): BOOL; stdcall;
+{$EXTERNALSYM UpdateDebugInfoFileEx}
+
+function FindDebugInfoFile(FileName, SymbolPath, DebugFilePath: PSTR): HANDLE; stdcall;
+{$EXTERNALSYM FindDebugInfoFile}
+
+type
+ PFIND_DEBUG_FILE_CALLBACK = function(FileHandle: HANDLE; FileName: PSTR;
+ CallerData: PVOID): BOOL; stdcall;
+ {$EXTERNALSYM PFIND_DEBUG_FILE_CALLBACK}
+ PFindDebugFileCallback = PFIND_DEBUG_FILE_CALLBACK;
+
+function FindDebugInfoFileEx(FileName, SymbolPath, DebugFilePath: PSTR;
+ Callback: PFIND_DEBUG_FILE_CALLBACK; CallerData: PVOID): HANDLE; stdcall;
+{$EXTERNALSYM FindDebugInfoFileEx}
+
+type
+ PFINDFILEINPATHCALLBACK = function(filename: PSTR; context: PVOID): BOOL; stdcall;
+ {$EXTERNALSYM PFINDFILEINPATHCALLBACK}
+
+function SymFindFileInPath(hprocess: HANDLE; SearchPath, FileName: LPSTR; id: PVOID; two, three, flags: DWORD;
+ FoundFile: LPSTR; callback: PFINDFILEINPATHCALLBACK; context: PVOID): BOOL; stdcall;
+{$EXTERNALSYM SymFindFileInPath}
+
+function FindExecutableImage(FileName, SymbolPath, ImageFilePath: PSTR): HANDLE; stdcall;
+{$EXTERNALSYM FindExecutableImage}
+
+type
+ PFIND_EXE_FILE_CALLBACK = function(FileHandle: HANDLE; FileName: PSTR;
+ CallerData: PVOID): BOOL; stdcall;
+ {$EXTERNALSYM PFIND_EXE_FILE_CALLBACK}
+ PFindExeFileCallback = PFIND_EXE_FILE_CALLBACK;
+
+function FindExecutableImageEx(FileName, SymbolPath, ImageFilePath: PSTR;
+ Callback: PFIND_EXE_FILE_CALLBACK; CallerData: PVOID): HANDLE; stdcall;
+{$EXTERNALSYM FindExecutableImageEx}
+
+function ImageNtHeader(Base: PVOID): PIMAGE_NT_HEADERS; stdcall;
+{$EXTERNALSYM ImageNtHeader}
+
+function ImageDirectoryEntryToDataEx(Base: PVOID; MappedAsImage: ByteBool;
+ DirectoryEntry: USHORT; var Size: ULONG; var FoundHeader: PIMAGE_SECTION_HEADER): PVOID; stdcall;
+{$EXTERNALSYM ImageDirectoryEntryToDataEx}
+
+function ImageDirectoryEntryToData(Base: PVOID; MappedAsImage: ByteBool;
+ DirectoryEntry: USHORT; var Size: ULONG): PVOID; stdcall;
+{$EXTERNALSYM ImageDirectoryEntryToData}
+
+function ImageRvaToSection(NtHeaders: PIMAGE_NT_HEADERS; Base: PVOID; Rva: ULONG): PIMAGE_SECTION_HEADER; stdcall;
+{$EXTERNALSYM ImageRvaToSection}
+
+function ImageRvaToVa(NtHeaders: PIMAGE_NT_HEADERS; Base: PVOID; Rva: ULONG;
+ var LastRvaSection: PIMAGE_SECTION_HEADER): PVOID; stdcall;
+{$EXTERNALSYM ImageRvaToVa}
+
+// Symbol server exports
+
+type
+ PSYMBOLSERVERPROC = function(a1, a2: LPCSTR; a3: PVOID; a4, a5: DWORD; a6: LPSTR): BOOL; stdcall;
+ {$EXTERNALSYM PSYMBOLSERVERPROC}
+ PSYMBOLSERVEROPENPROC = function: BOOL; stdcall;
+ {$EXTERNALSYM PSYMBOLSERVEROPENPROC}
+ PSYMBOLSERVERCLOSEPROC = function: BOOL; stdcall;
+ {$EXTERNALSYM PSYMBOLSERVERCLOSEPROC}
+ PSYMBOLSERVERSETOPTIONSPROC = function(a1: UINT_PTR; a2: ULONG64): BOOL; stdcall;
+ {$EXTERNALSYM PSYMBOLSERVERSETOPTIONSPROC}
+ PSYMBOLSERVERCALLBACKPROC = function(action: UINT_PTR; data: ULONG64; context: ULONG64): BOOL; stdcall;
+ {$EXTERNALSYM PSYMBOLSERVERCALLBACKPROC}
+ PSYMBOLSERVERGETOPTIONSPROC = function: UINT_PTR; stdcall;
+ {$EXTERNALSYM PSYMBOLSERVERGETOPTIONSPROC}
+ PSYMBOLSERVERPINGPROC = function(a1: LPCSTR): BOOL; stdcall;
+ {$EXTERNALSYM PSYMBOLSERVERPINGPROC}
+
+const
+ SSRVOPT_CALLBACK = $01;
+ {$EXTERNALSYM SSRVOPT_CALLBACK}
+ SSRVOPT_DWORD = $02;
+ {$EXTERNALSYM SSRVOPT_DWORD}
+ SSRVOPT_DWORDPTR = $04;
+ {$EXTERNALSYM SSRVOPT_DWORDPTR}
+ SSRVOPT_GUIDPTR = $08;
+ {$EXTERNALSYM SSRVOPT_GUIDPTR}
+ SSRVOPT_OLDGUIDPTR = $10;
+ {$EXTERNALSYM SSRVOPT_OLDGUIDPTR}
+ SSRVOPT_UNATTENDED = $20;
+ {$EXTERNALSYM SSRVOPT_UNATTENDED}
+ SSRVOPT_RESET = ULONG_PTR(-1);
+ {$EXTERNALSYM SSRVOPT_RESET}
+
+ SSRVACTION_TRACE = 1;
+ {$EXTERNALSYM SSRVACTION_TRACE}
+
+// This api won't be ported to Win64 - Fix your code.
+
+type
+ PIMAGE_DEBUG_INFORMATION = ^IMAGE_DEBUG_INFORMATION;
+ {$EXTERNALSYM PIMAGE_DEBUG_INFORMATION}
+ _IMAGE_DEBUG_INFORMATION = record
+ List: LIST_ENTRY;
+ ReservedSize: DWORD;
+ ReservedMappedBase: PVOID;
+ ReservedMachine: USHORT;
+ ReservedCharacteristics: USHORT;
+ ReservedCheckSum: DWORD;
+ ImageBase: DWORD;
+ SizeOfImage: DWORD;
+ ReservedNumberOfSections: DWORD;
+ ReservedSections: PIMAGE_SECTION_HEADER;
+ ReservedExportedNamesSize: DWORD;
+ ReservedExportedNames: PSTR;
+ ReservedNumberOfFunctionTableEntries: DWORD;
+ ReservedFunctionTableEntries: PIMAGE_FUNCTION_ENTRY;
+ ReservedLowestFunctionStartingAddress: DWORD;
+ ReservedHighestFunctionEndingAddress: DWORD;
+ ReservedNumberOfFpoTableEntries: DWORD;
+ ReservedFpoTableEntries: PFPO_DATA;
+ SizeOfCoffSymbols: DWORD;
+ CoffSymbols: PIMAGE_COFF_SYMBOLS_HEADER;
+ ReservedSizeOfCodeViewSymbols: DWORD;
+ ReservedCodeViewSymbols: PVOID;
+ ImageFilePath: PSTR;
+ ImageFileName: PSTR;
+ ReservedDebugFilePath: PSTR;
+ ReservedTimeDateStamp: DWORD;
+ ReservedRomImage: BOOL;
+ ReservedDebugDirectory: PIMAGE_DEBUG_DIRECTORY;
+ ReservedNumberOfDebugDirectories: DWORD;
+ ReservedOriginalFunctionTableBaseAddress: DWORD;
+ Reserved: array [0..1] of DWORD;
+ end;
+ {$EXTERNALSYM _IMAGE_DEBUG_INFORMATION}
+ IMAGE_DEBUG_INFORMATION = _IMAGE_DEBUG_INFORMATION;
+ {$EXTERNALSYM IMAGE_DEBUG_INFORMATION}
+ TImageDebugInformation = IMAGE_DEBUG_INFORMATION;
+ PImageDebugInformation = PIMAGE_DEBUG_INFORMATION;
+
+function MapDebugInformation(FileHandle: HANDLE; FileName, SymbolPath: PSTR;
+ ImageBase: DWORD): PIMAGE_DEBUG_INFORMATION; stdcall;
+{$EXTERNALSYM MapDebugInformation}
+
+function UnmapDebugInformation(DebugInfo: PIMAGE_DEBUG_INFORMATION): BOOL; stdcall;
+{$EXTERNALSYM UnmapDebugInformation}
+
+function SearchTreeForFile(RootPath, InputPathName, OutputPathBuffer: PSTR): BOOL; stdcall;
+{$EXTERNALSYM SearchTreeForFile}
+
+type
+ PENUMDIRTREE_CALLBACK = function(FilePath: LPCSTR; CallerData: PVOID): BOOL; stdcall;
+ {$EXTERNALSYM PENUMDIRTREE_CALLBACK}
+ PEnumDirTreeCallback = PENUMDIRTREE_CALLBACK;
+
+function EnumDirTree(hProcess: HANDLE; RootPath, InputPathName, OutputPathBuffer: PSTR;
+ Callback: PENUMDIRTREE_CALLBACK; CallbackData: PVOID): BOOL; stdcall;
+{$EXTERNALSYM EnumDirTree}
+
+function MakeSureDirectoryPathExists(DirPath: PCSTR): BOOL; stdcall;
+{$EXTERNALSYM MakeSureDirectoryPathExists}
+
+//
+// UnDecorateSymbolName Flags
+//
+
+const
+ UNDNAME_COMPLETE = $0000; // Enable full undecoration
+ {$EXTERNALSYM UNDNAME_COMPLETE}
+ UNDNAME_NO_LEADING_UNDERSCORES = $0001; // Remove leading underscores from MS extended keywords
+ {$EXTERNALSYM UNDNAME_NO_LEADING_UNDERSCORES}
+ UNDNAME_NO_MS_KEYWORDS = $0002; // Disable expansion of MS extended keywords
+ {$EXTERNALSYM UNDNAME_NO_MS_KEYWORDS}
+ UNDNAME_NO_FUNCTION_RETURNS = $0004; // Disable expansion of return type for primary declaration
+ {$EXTERNALSYM UNDNAME_NO_FUNCTION_RETURNS}
+ UNDNAME_NO_ALLOCATION_MODEL = $0008; // Disable expansion of the declaration model
+ {$EXTERNALSYM UNDNAME_NO_ALLOCATION_MODEL}
+ UNDNAME_NO_ALLOCATION_LANGUAGE = $0010; // Disable expansion of the declaration language specifier
+ {$EXTERNALSYM UNDNAME_NO_ALLOCATION_LANGUAGE}
+ UNDNAME_NO_MS_THISTYPE = $0020; // NYI Disable expansion of MS keywords on the 'this' type for primary declaration
+ {$EXTERNALSYM UNDNAME_NO_MS_THISTYPE}
+ UNDNAME_NO_CV_THISTYPE = $0040; // NYI Disable expansion of CV modifiers on the 'this' type for primary declaration
+ {$EXTERNALSYM UNDNAME_NO_CV_THISTYPE}
+ UNDNAME_NO_THISTYPE = $0060; // Disable all modifiers on the 'this' type
+ {$EXTERNALSYM UNDNAME_NO_THISTYPE}
+ UNDNAME_NO_ACCESS_SPECIFIERS = $0080; // Disable expansion of access specifiers for members
+ {$EXTERNALSYM UNDNAME_NO_ACCESS_SPECIFIERS}
+ UNDNAME_NO_THROW_SIGNATURES = $0100; // Disable expansion of 'throw-signatures' for functions and pointers to functions
+ {$EXTERNALSYM UNDNAME_NO_THROW_SIGNATURES}
+ UNDNAME_NO_MEMBER_TYPE = $0200; // Disable expansion of 'static' or 'virtual'ness of members
+ {$EXTERNALSYM UNDNAME_NO_MEMBER_TYPE}
+ UNDNAME_NO_RETURN_UDT_MODEL = $0400; // Disable expansion of MS model for UDT returns
+ {$EXTERNALSYM UNDNAME_NO_RETURN_UDT_MODEL}
+ UNDNAME_32_BIT_DECODE = $0800; // Undecorate 32-bit decorated names
+ {$EXTERNALSYM UNDNAME_32_BIT_DECODE}
+ UNDNAME_NAME_ONLY = $1000; // Crack only the name for primary declaration;
+ {$EXTERNALSYM UNDNAME_NAME_ONLY}
+ // return just [scope::]name. Does expand template params
+ UNDNAME_NO_ARGUMENTS = $2000; // Don't undecorate arguments to function
+ {$EXTERNALSYM UNDNAME_NO_ARGUMENTS}
+ UNDNAME_NO_SPECIAL_SYMS = $4000; // Don't undecorate special names (v-table, vcall, vector xxx, metatype, etc)
+ {$EXTERNALSYM UNDNAME_NO_SPECIAL_SYMS}
+
+function UnDecorateSymbolName(DecoratedName: PCSTR; UnDecoratedName: PSTR;
+ UndecoratedLength: DWORD; Flags: DWORD): DWORD; stdcall;
+{$EXTERNALSYM UnDecorateSymbolName}
+
+//
+// these values are used for synthesized file types
+// that can be passed in as image headers instead of
+// the standard ones from ntimage.h
+//
+
+const
+ DBHHEADER_DEBUGDIRS = $1;
+ {$EXTERNALSYM DBHHEADER_DEBUGDIRS}
+
+type
+ _MODLOAD_DATA = record
+ ssize: DWORD; // size of this struct
+ ssig: DWORD; // signature identifying the passed data
+ data: PVOID; // pointer to passed data
+ size: DWORD; // size of passed data
+ flags: DWORD; // options
+ end;
+ {$EXTERNALSYM _MODLOAD_DATA}
+ MODLOAD_DATA = _MODLOAD_DATA;
+ {$EXTERNALSYM MODLOAD_DATA}
+ PMODLOAD_DATA = ^MODLOAD_DATA;
+ {$EXTERNALSYM PMODLOAD_DATA}
+ TModLoadData = MODLOAD_DATA;
+ PModLoadData = PMODLOAD_DATA;
+
+//
+// StackWalking API
+//
+
+type
+ ADDRESS_MODE = (
+ AddrMode1616,
+ AddrMode1632,
+ AddrModeReal,
+ AddrModeFlat);
+ {$EXTERNALSYM ADDRESS_MODE}
+ TAddressMode = ADDRESS_MODE;
+
+ LPADDRESS64 = ^ADDRESS64;
+ {$EXTERNALSYM PADDRESS64}
+ _tagADDRESS64 = record
+ Offset: DWORD64;
+ Segment: WORD;
+ Mode: ADDRESS_MODE;
+ end;
+ {$EXTERNALSYM _tagADDRESS64}
+ ADDRESS64 = _tagADDRESS64;
+ {$EXTERNALSYM ADDRESS64}
+ TAddress64 = ADDRESS64;
+ PAddress64 = LPADDRESS64;
+
+ LPADDRESS = ^ADDRESS;
+ {$EXTERNALSYM PADDRESS}
+ _tagADDRESS = record
+ Offset: DWORD;
+ Segment: WORD;
+ Mode: ADDRESS_MODE;
+ end;
+ {$EXTERNALSYM _tagADDRESS}
+ ADDRESS = _tagADDRESS;
+ {$EXTERNALSYM ADDRESS}
+ TAddress = ADDRESS;
+ PAddress = LPADDRESS;
+
+procedure Address32To64(a32: LPADDRESS; a64: LPADDRESS64);
+{$EXTERNALSYM Address32To64}
+
+procedure Address64To32(a64: LPADDRESS64; a32: LPADDRESS);
+{$EXTERNALSYM Address64To32}
+
+//
+// This structure is included in the STACKFRAME structure,
+// and is used to trace through usermode callbacks in a thread's
+// kernel stack. The values must be copied by the kernel debugger
+// from the DBGKD_GET_VERSION and WAIT_STATE_CHANGE packets.
+//
+
+//
+// New KDHELP structure for 64 bit system support.
+// This structure is preferred in new code.
+//
+
+type
+ PKDHELP64 = ^KDHELP64;
+ {$EXTERNALSYM PKDHELP64}
+ _KDHELP64 = record
+ //
+ // address of kernel thread object, as provided in the
+ // WAIT_STATE_CHANGE packet.
+ //
+ Thread: DWORD64;
+ //
+ // offset in thread object to pointer to the current callback frame
+ // in kernel stack.
+ //
+ ThCallbackStack: DWORD;
+ //
+ // offset in thread object to pointer to the current callback backing
+ // store frame in kernel stack.
+ //
+ ThCallbackBStore: DWORD;
+ //
+ // offsets to values in frame:
+ //
+ // address of next callback frame
+ NextCallback: DWORD;
+ // address of saved frame pointer (if applicable)
+ FramePointer: DWORD;
+ //
+ // Address of the kernel function that calls out to user mode
+ //
+ KiCallUserMode: DWORD64;
+ //
+ // Address of the user mode dispatcher function
+ //
+ KeUserCallbackDispatcher: DWORD64;
+ //
+ // Lowest kernel mode address
+ //
+ SystemRangeStart: DWORD64;
+ Reserved: array [0..7] of DWORD64;
+ end;
+ {$EXTERNALSYM _KDHELP64}
+ KDHELP64 = _KDHELP64;
+ {$EXTERNALSYM KDHELP64}
+ TKdHelp64 = KDHELP64;
+ //PKdHelp64 = PKDHELP64;
+
+ PKDHELP = ^KDHELP;
+ {$EXTERNALSYM PKDHELP}
+ _KDHELP = record
+ //
+ // address of kernel thread object, as provided in the
+ // WAIT_STATE_CHANGE packet.
+ //
+ Thread: DWORD;
+ //
+ // offset in thread object to pointer to the current callback frame
+ // in kernel stack.
+ //
+ ThCallbackStack: DWORD;
+ //
+ // offsets to values in frame:
+ //
+ // address of next callback frame
+ NextCallback: DWORD;
+ // address of saved frame pointer (if applicable)
+ FramePointer: DWORD;
+ //
+ // Address of the kernel function that calls out to user mode
+ //
+ KiCallUserMode: DWORD;
+ //
+ // Address of the user mode dispatcher function
+ //
+ KeUserCallbackDispatcher: DWORD;
+ //
+ // Lowest kernel mode address
+ //
+ SystemRangeStart: DWORD;
+ //
+ // offset in thread object to pointer to the current callback backing
+ // store frame in kernel stack.
+ //
+ ThCallbackBStore: DWORD;
+ Reserved: array [0..7] of DWORD;
+ end;
+ {$EXTERNALSYM _KDHELP}
+ KDHELP = _KDHELP;
+ {$EXTERNALSYM KDHELP}
+ TKdHelp = KDHELP;
+ //PKdHelp = PKDHELP;
+
+procedure KdHelp32To64(p32: PKDHELP; p64: PKDHELP64);
+{$EXTERNALSYM KdHelp32To64}
+
+type
+ LPSTACKFRAME64 = ^STACKFRAME64;
+ {$EXTERNALSYM LPSTACKFRAME64}
+ _tagSTACKFRAME64 = record
+ AddrPC: ADDRESS64; // program counter
+ AddrReturn: ADDRESS64; // return address
+ AddrFrame: ADDRESS64; // frame pointer
+ AddrStack: ADDRESS64; // stack pointer
+ AddrBStore: ADDRESS64; // backing store pointer
+ FuncTableEntry: PVOID; // pointer to pdata/fpo or NULL
+ Params: array [0..3] of DWORD64; // possible arguments to the function
+ Far: BOOL; // WOW far call
+ Virtual: BOOL; // is this a virtual frame?
+ Reserved: array [0..2] of DWORD64;
+ KdHelp: KDHELP64;
+ end;
+ {$EXTERNALSYM _tagSTACKFRAME64}
+ STACKFRAME64 = _tagSTACKFRAME64;
+ {$EXTERNALSYM STACKFRAME64}
+ TStackFrame64 = STACKFRAME64;
+ PStackFrame64 = LPSTACKFRAME64;
+
+ LPSTACKFRAME = ^STACKFRAME;
+ {$EXTERNALSYM LPSTACKFRAME}
+ _tagSTACKFRAME = record
+ AddrPC: ADDRESS; // program counter
+ AddrReturn: ADDRESS; // return address
+ AddrFrame: ADDRESS; // frame pointer
+ AddrStack: ADDRESS; // stack pointer
+ FuncTableEntry: PVOID; // pointer to pdata/fpo or NULL
+ Params: array [0..3] of DWORD; // possible arguments to the function
+ Far: BOOL; // WOW far call
+ Virtual: BOOL; // is this a virtual frame?
+ Reserved: array [0..2] of DWORD;
+ KdHelp: KDHELP;
+ AddrBStore: ADDRESS; // backing store pointer
+ end;
+ {$EXTERNALSYM _tagSTACKFRAME}
+ STACKFRAME = _tagSTACKFRAME;
+ {$EXTERNALSYM STACKFRAME}
+ TStackFrame = STACKFRAME;
+ PStackFrame = LPSTACKFRAME;
+
+ PREAD_PROCESS_MEMORY_ROUTINE64 = function(hProcess: HANDLE; qwBaseAddress: DWORD64;
+ lpBuffer: PVOID; nSize: DWORD; var lpNumberOfBytesRead: DWORD): BOOL; stdcall;
+ {$EXTERNALSYM PREAD_PROCESS_MEMORY_ROUTINE64}
+ PReadProcessMemoryRoutine64 = PREAD_PROCESS_MEMORY_ROUTINE64;
+
+ PFUNCTION_TABLE_ACCESS_ROUTINE64 = function(hProcess: HANDLE;
+ AddrBase: DWORD64): PVOID; stdcall;
+ {$EXTERNALSYM PFUNCTION_TABLE_ACCESS_ROUTINE64}
+ PFunctionTableAccessRoutine64 = PFUNCTION_TABLE_ACCESS_ROUTINE64;
+
+ PGET_MODULE_BASE_ROUTINE64 = function(hProcess: HANDLE;
+ Address: DWORD64): DWORD64; stdcall;
+ {$EXTERNALSYM PGET_MODULE_BASE_ROUTINE64}
+ PGetModuleBaseRoutine64 = PGET_MODULE_BASE_ROUTINE64;
+
+ PTRANSLATE_ADDRESS_ROUTINE64 = function(hProcess: HANDLE; hThread: HANDLE;
+ const lpaddr: ADDRESS64): DWORD64; stdcall;
+ {$EXTERNALSYM PTRANSLATE_ADDRESS_ROUTINE64}
+ PTranslateAddressRoutine64 = PTRANSLATE_ADDRESS_ROUTINE64;
+
+function StackWalk64(MachineType: DWORD; hProcess: HANDLE; hThread: HANDLE;
+ var StackFrame: STACKFRAME64; ContextRecord: PVOID;
+ ReadMemoryRoutine: PREAD_PROCESS_MEMORY_ROUTINE64;
+ FunctionTableAccessRoutine: PFUNCTION_TABLE_ACCESS_ROUTINE64;
+ GetModuleBaseRoutine: PGET_MODULE_BASE_ROUTINE64;
+ TranslateAddress: PTRANSLATE_ADDRESS_ROUTINE64): BOOL; stdcall;
+{$EXTERNALSYM StackWalk64}
+
+type
+ PREAD_PROCESS_MEMORY_ROUTINE = function(hProcess: HANDLE;
+ lpBaseAddress: DWORD; lpBuffer: PVOID; nSize: DWORD;
+ var lpNumberOfBytesRead: DWORD): BOOL; stdcall;
+ {$EXTERNALSYM PREAD_PROCESS_MEMORY_ROUTINE}
+ PreadProcessMemoryRoutine = PREAD_PROCESS_MEMORY_ROUTINE;
+
+ PFUNCTION_TABLE_ACCESS_ROUTINE = function(hProcess: HANDLE; AddrBase: DWORD): PVOID; stdcall;
+ {$EXTERNALSYM PFUNCTION_TABLE_ACCESS_ROUTINE}
+ PFunctionTableAccessRoutine = PFUNCTION_TABLE_ACCESS_ROUTINE;
+
+ PGET_MODULE_BASE_ROUTINE = function(hProcess: HANDLE; Address: DWORD): DWORD; stdcall;
+ {$EXTERNALSYM PGET_MODULE_BASE_ROUTINE}
+ PGetModuleBaseRoutine = PGET_MODULE_BASE_ROUTINE;
+
+ PTRANSLATE_ADDRESS_ROUTINE = function(hProcess: HANDLE; hThread: HANDLE;
+ const lpaddr: ADDRESS): DWORD; stdcall;
+ {$EXTERNALSYM PTRANSLATE_ADDRESS_ROUTINE}
+ PTranslateAddressRoutine = PTRANSLATE_ADDRESS_ROUTINE;
+
+function StackWalk(MachineType: DWORD; hProcess: HANDLE; hThread: HANDLE;
+ var StackFrame: STACKFRAME; ContextRecord: PVOID;
+ ReadMemoryRoutine: PREAD_PROCESS_MEMORY_ROUTINE;
+ FunctionTableAccessRoutine: PFUNCTION_TABLE_ACCESS_ROUTINE;
+ GetModuleBaseRoutine: PGET_MODULE_BASE_ROUTINE;
+ TranslateAddress: PTRANSLATE_ADDRESS_ROUTINE): BOOL; stdcall;
+{$EXTERNALSYM StackWalk}
+
+const
+ API_VERSION_NUMBER = 9;
+ {$EXTERNALSYM API_VERSION_NUMBER}
+
+type
+ LPAPI_VERSION = ^API_VERSION;
+ {$EXTERNALSYM LPAPI_VERSION}
+ API_VERSION = record
+ MajorVersion: USHORT;
+ MinorVersion: USHORT;
+ Revision: USHORT;
+ Reserved: USHORT;
+ end;
+ {$EXTERNALSYM API_VERSION}
+ TApiVersion = API_VERSION;
+ PApiVersion = LPAPI_VERSION;
+
+function ImagehlpApiVersion: LPAPI_VERSION; stdcall;
+{$EXTERNALSYM ImagehlpApiVersion}
+
+function ImagehlpApiVersionEx(const AppVersion: API_VERSION): LPAPI_VERSION; stdcall;
+{$EXTERNALSYM ImagehlpApiVersionEx}
+
+function GetTimestampForLoadedLibrary(Module: HMODULE): DWORD; stdcall;
+{$EXTERNALSYM GetTimestampForLoadedLibrary}
+
+//
+// typedefs for function pointers
+//
+
+type
+ PSYM_ENUMMODULES_CALLBACK64 = function(ModuleName: PSTR; BaseOfDll: DWORD64;
+ UserContext: PVOID): BOOL; stdcall;
+ {$EXTERNALSYM PSYM_ENUMMODULES_CALLBACK64}
+ PSymEnummodulesCallback64 = PSYM_ENUMMODULES_CALLBACK64;
+
+ PSYM_ENUMSYMBOLS_CALLBACK64 = function(SymbolName: PSTR; SymbolAddress: DWORD64;
+ SymbolSize: ULONG; UserContext: PVOID): BOOL; stdcall;
+ {$EXTERNALSYM PSYM_ENUMSYMBOLS_CALLBACK64}
+ PSymEnumsymbolsCallback64 = PSYM_ENUMSYMBOLS_CALLBACK64;
+
+ PSYM_ENUMSYMBOLS_CALLBACK64W = function(SymbolName: PWSTR;
+ SymbolAddress: DWORD64; SymbolSize: ULONG; UserContext: PVOID): BOOL; stdcall;
+ {$EXTERNALSYM PSYM_ENUMSYMBOLS_CALLBACK64W}
+ PSymEnumsymbolsCallback64w = PSYM_ENUMSYMBOLS_CALLBACK64W;
+
+ PENUMLOADED_MODULES_CALLBACK64 = function(ModuleName: PSTR;
+ ModuleBase: DWORD64; ModuleSize: ULONG; UserContext: PVOID): BOOL; stdcall;
+ {$EXTERNALSYM PENUMLOADED_MODULES_CALLBACK64}
+ PSnumloadedModulesCallback64 = PENUMLOADED_MODULES_CALLBACK64;
+
+ PSYMBOL_REGISTERED_CALLBACK64 = function(hProcess: HANDLE; ActionCode: ULONG;
+ CallbackData: ULONG64; UserContext: ULONG64): BOOL; stdcall;
+ {$EXTERNALSYM PSYMBOL_REGISTERED_CALLBACK64}
+ PSymbolRegisteredCallback64 = PSYMBOL_REGISTERED_CALLBACK64;
+
+ PSYMBOL_FUNCENTRY_CALLBACK = function(hProcess: HANDLE; AddrBase: DWORD;
+ UserContext: PVOID): PVOID; stdcall;
+ {$EXTERNALSYM PSYMBOL_FUNCENTRY_CALLBACK}
+ PSymbolFuncentryCallback = PSYMBOL_FUNCENTRY_CALLBACK;
+
+ PSYMBOL_FUNCENTRY_CALLBACK64 = function(hProcess: HANDLE; AddrBase: ULONG64;
+ UserContext: ULONG64): PVOID; stdcall;
+ {$EXTERNALSYM PSYMBOL_FUNCENTRY_CALLBACK64}
+ PSymbolFuncentryCallback64 = PSYMBOL_FUNCENTRY_CALLBACK64;
+
+ PSYM_ENUMMODULES_CALLBACK = function(ModuleName: PSTR; BaseOfDll: ULONG;
+ UserContext: PVOID): BOOL; stdcall;
+ {$EXTERNALSYM PSYM_ENUMMODULES_CALLBACK}
+ PSymEnummodulesCallback = PSYM_ENUMMODULES_CALLBACK;
+
+ PSYM_ENUMSYMBOLS_CALLBACK = function(SymbolName: PSTR; SymbolAddress: ULONG;
+ SymbolSize: ULONG; UserContext: PVOID): BOOL; stdcall;
+ {$EXTERNALSYM PSYM_ENUMSYMBOLS_CALLBACK}
+ PSymEnumsymbolsCallback = PSYM_ENUMSYMBOLS_CALLBACK;
+
+ PSYM_ENUMSYMBOLS_CALLBACKW = function(SymbolName: PWSTR; SymbolAddress: ULONG;
+ SymbolSize: ULONG; UserContext: PVOID): BOOL; stdcall;
+ {$EXTERNALSYM PSYM_ENUMSYMBOLS_CALLBACKW}
+ PSymEnumsymbolsCallbackw = PSYM_ENUMSYMBOLS_CALLBACKW;
+
+ PENUMLOADED_MODULES_CALLBACK = function(ModuleName: PSTR; ModuleBase: ULONG;
+ ModuleSize: ULONG; UserContext: PVOID): BOOL; stdcall;
+ {$EXTERNALSYM PENUMLOADED_MODULES_CALLBACK}
+ PEnumloadedModulesCallback = PENUMLOADED_MODULES_CALLBACK;
+
+ PSYMBOL_REGISTERED_CALLBACK = function(hProcess: HANDLE; ActionCode: ULONG;
+ CallbackData: PVOID; UserContext: PVOID): BOOL; stdcall;
+ {$EXTERNALSYM PSYMBOL_REGISTERED_CALLBACK}
+ PSymbolRegisteredCallback = PSYMBOL_REGISTERED_CALLBACK;
+
+//
+// flags found in SYMBOL_INFO.Flags
+//
+
+const
+ SYMFLAG_VALUEPRESENT = $00000001;
+ {$EXTERNALSYM SYMFLAG_VALUEPRESENT}
+ SYMFLAG_REGISTER = $00000008;
+ {$EXTERNALSYM SYMFLAG_REGISTER}
+ SYMFLAG_REGREL = $00000010;
+ {$EXTERNALSYM SYMFLAG_REGREL}
+ SYMFLAG_FRAMEREL = $00000020;
+ {$EXTERNALSYM SYMFLAG_FRAMEREL}
+ SYMFLAG_PARAMETER = $00000040;
+ {$EXTERNALSYM SYMFLAG_PARAMETER}
+ SYMFLAG_LOCAL = $00000080;
+ {$EXTERNALSYM SYMFLAG_LOCAL}
+ SYMFLAG_CONSTANT = $00000100;
+ {$EXTERNALSYM SYMFLAG_CONSTANT}
+ SYMFLAG_EXPORT = $00000200;
+ {$EXTERNALSYM SYMFLAG_EXPORT}
+ SYMFLAG_FORWARDER = $00000400;
+ {$EXTERNALSYM SYMFLAG_FORWARDER}
+ SYMFLAG_FUNCTION = $00000800;
+ {$EXTERNALSYM SYMFLAG_FUNCTION}
+ SYMFLAG_VIRTUAL = $00001000;
+ {$EXTERNALSYM SYMFLAG_VIRTUAL}
+ SYMFLAG_THUNK = $00002000;
+ {$EXTERNALSYM SYMFLAG_THUNK}
+ SYMFLAG_TLSREL = $00004000;
+ {$EXTERNALSYM SYMFLAG_TLSREL}
+
+//
+// symbol type enumeration
+//
+
+type
+ SYM_TYPE = (
+ SymNone,
+ SymCoff,
+ SymCv,
+ SymPdb,
+ SymExport,
+ SymDeferred,
+ SymSym, // .sym file
+ SymDia,
+ SymVirtual,
+ NumSymTypes);
+ {$EXTERNALSYM SYM_TYPE}
+ TSymType = SYM_TYPE;
+
+//
+// symbol data structure
+//
+
+ PIMAGEHLP_SYMBOL64 = ^IMAGEHLP_SYMBOL64;
+ {$EXTERNALSYM PIMAGEHLP_SYMBOL64}
+ _IMAGEHLP_SYMBOL64 = record
+ SizeOfStruct: DWORD; // set to sizeof(IMAGEHLP_SYMBOL64)
+ Address: DWORD64; // virtual address including dll base address
+ Size: DWORD; // estimated size of symbol, can be zero
+ Flags: DWORD; // info about the symbols, see the SYMF defines
+ MaxNameLength: DWORD; // maximum size of symbol name in 'Name'
+ Name: array [0..0] of CHAR; // symbol name (null terminated string)
+ end;
+ {$EXTERNALSYM _IMAGEHLP_SYMBOL64}
+ IMAGEHLP_SYMBOL64 = _IMAGEHLP_SYMBOL64;
+ {$EXTERNALSYM IMAGEHLP_SYMBOL64}
+ TImageHlpSymbol64 = IMAGEHLP_SYMBOL64;
+ PImageHlpSymbol64 = PIMAGEHLP_SYMBOL64;
+
+ _IMAGEHLP_SYMBOL64_PACKAGE = record
+ sym: IMAGEHLP_SYMBOL64;
+ name: array [0..MAX_SYM_NAME] of CHAR;
+ end;
+ {$EXTERNALSYM _IMAGEHLP_SYMBOL64_PACKAGE}
+ IMAGEHLP_SYMBOL64_PACKAGE = _IMAGEHLP_SYMBOL64_PACKAGE;
+ {$EXTERNALSYM IMAGEHLP_SYMBOL64_PACKAGE}
+ PIMAGEHLP_SYMBOL64_PACKAGE = ^IMAGEHLP_SYMBOL64_PACKAGE;
+ {$EXTERNALSYM PIMAGEHLP_SYMBOL64_PACKAGE}
+ TImageHlpSymbol64Package = IMAGEHLP_SYMBOL64_PACKAGE;
+ PImageHlpSymbol64Package = PIMAGEHLP_SYMBOL64_PACKAGE;
+
+//#if !defined(_IMAGEHLP_SOURCE_) && defined(_IMAGEHLP64)
+//
+//#define IMAGEHLP_SYMBOL IMAGEHLP_SYMBOL64
+//#define PIMAGEHLP_SYMBOL PIMAGEHLP_SYMBOL64
+//#define IMAGEHLP_SYMBOL_PACKAGE IMAGEHLP_SYMBOL64_PACKAGE
+//#define PIMAGEHLP_SYMBOL_PACKAGE PIMAGEHLP_SYMBOL64_PACKAGE
+//
+//#else
+
+ PIMAGEHLP_SYMBOL = ^IMAGEHLP_SYMBOL;
+ {$EXTERNALSYM PIMAGEHLP_SYMBOL}
+ _IMAGEHLP_SYMBOL = record
+ SizeOfStruct: DWORD; // set to sizeof(IMAGEHLP_SYMBOL)
+ Address: DWORD; // virtual address including dll base address
+ Size: DWORD; // estimated size of symbol, can be zero
+ Flags: DWORD; // info about the symbols, see the SYMF defines
+ MaxNameLength: DWORD; // maximum size of symbol name in 'Name'
+ Name: array [0..0] of CHAR; // symbol name (null terminated string)
+ end;
+ {$EXTERNALSYM _IMAGEHLP_SYMBOL}
+ IMAGEHLP_SYMBOL = _IMAGEHLP_SYMBOL;
+ {$EXTERNALSYM IMAGEHLP_SYMBOL}
+ TImageHlpSymbol = IMAGEHLP_SYMBOL;
+ PImageHlpSymbol = PIMAGEHLP_SYMBOL;
+
+ _IMAGEHLP_SYMBOL_PACKAGE = record
+ sym: IMAGEHLP_SYMBOL;
+ name: array [0..MAX_SYM_NAME] of CHAR;
+ end;
+ {$EXTERNALSYM _IMAGEHLP_SYMBOL_PACKAGE}
+ IMAGEHLP_SYMBOL_PACKAGE = _IMAGEHLP_SYMBOL_PACKAGE;
+ {$EXTERNALSYM IMAGEHLP_SYMBOL_PACKAGE}
+ PIMAGEHLP_SYMBOL_PACKAGE = ^IMAGEHLP_SYMBOL_PACKAGE;
+ {$EXTERNALSYM PIMAGEHLP_SYMBOL_PACKAGE}
+ TImageHlpSymbolPackage = IMAGEHLP_SYMBOL_PACKAGE;
+ PImageHlpSymbolPackage = PIMAGEHLP_SYMBOL_PACKAGE;
+
+//#endif
+
+//
+// module data structure
+//
+
+ PIMAGEHLP_MODULE64 = ^IMAGEHLP_MODULE64;
+ {$EXTERNALSYM PIMAGEHLP_MODULE64}
+ _IMAGEHLP_MODULE64 = record
+ SizeOfStruct: DWORD; // set to sizeof(IMAGEHLP_MODULE64)
+ BaseOfImage: DWORD64; // base load address of module
+ ImageSize: DWORD; // virtual size of the loaded module
+ TimeDateStamp: DWORD; // date/time stamp from pe header
+ CheckSum: DWORD; // checksum from the pe header
+ NumSyms: DWORD; // number of symbols in the symbol table
+ SymType: SYM_TYPE; // type of symbols loaded
+ ModuleName: array [0..3] of CHAR; // module name
+ ImageName: array [0..255] of CHAR; // image name
+ LoadedImageName: array [0..255] of CHAR; // symbol file name
+ end;
+ {$EXTERNALSYM _IMAGEHLP_MODULE64}
+ IMAGEHLP_MODULE64 = _IMAGEHLP_MODULE64;
+ {$EXTERNALSYM IMAGEHLP_MODULE64}
+ TImageHlpModule64 = IMAGEHLP_MODULE64;
+ PImageHlpModule64 = PIMAGEHLP_MODULE64;
+
+ PIMAGEHLP_MODULEW64 = ^IMAGEHLP_MODULEW64;
+ {$EXTERNALSYM PIMAGEHLP_MODULEW64}
+ _IMAGEHLP_MODULE64W = record
+ SizeOfStruct: DWORD; // set to sizeof(IMAGEHLP_MODULE64)
+ BaseOfImage: DWORD64; // base load address of module
+ ImageSize: DWORD; // virtual size of the loaded module
+ TimeDateStamp: DWORD; // date/time stamp from pe header
+ CheckSum: DWORD; // checksum from the pe header
+ NumSyms: DWORD; // number of symbols in the symbol table
+ SymType: SYM_TYPE; // type of symbols loaded
+ ModuleName: array [0..31] of WCHAR; // module name
+ ImageName: array [0..255] of WCHAR; // image name
+ LoadedImageName: array [0..255] of WCHAR; // symbol file name
+ end;
+ {$EXTERNALSYM _IMAGEHLP_MODULE64W}
+ IMAGEHLP_MODULEW64 = _IMAGEHLP_MODULE64W;
+ {$EXTERNALSYM IMAGEHLP_MODULEW64}
+ TImageHlpModuleW64 = IMAGEHLP_MODULEW64;
+ PImageHlpModuleW64 = PIMAGEHLP_MODULEW64;
+
+ PIMAGEHLP_MODULE = ^IMAGEHLP_MODULE;
+ {$EXTERNALSYM PIMAGEHLP_MODULE}
+ _IMAGEHLP_MODULE = record
+ SizeOfStruct: DWORD; // set to sizeof(IMAGEHLP_MODULE)
+ BaseOfImage: DWORD; // base load address of module
+ ImageSize: DWORD; // virtual size of the loaded module
+ TimeDateStamp: DWORD; // date/time stamp from pe header
+ CheckSum: DWORD; // checksum from the pe header
+ NumSyms: DWORD; // number of symbols in the symbol table
+ SymType: SYM_TYPE; // type of symbols loaded
+ ModuleName: array [0..31] of CHAR; // module name
+ ImageName: array [0..255] of CHAR; // image name
+ LoadedImageName: array [0..255] of CHAR; // symbol file name
+ end;
+ {$EXTERNALSYM _IMAGEHLP_MODULE}
+ IMAGEHLP_MODULE = _IMAGEHLP_MODULE;
+ {$EXTERNALSYM IMAGEHLP_MODULE}
+ TImageHlpModule = IMAGEHLP_MODULE;
+ PImageHlpModule = PIMAGEHLP_MODULE;
+
+ PIMAGEHLP_MODULEW = ^IMAGEHLP_MODULEW;
+ {$EXTERNALSYM PIMAGEHLP_MODULEW}
+ _IMAGEHLP_MODULEW = record
+ SizeOfStruct: DWORD; // set to sizeof(IMAGEHLP_MODULE)
+ BaseOfImage: DWORD; // base load address of module
+ ImageSize: DWORD; // virtual size of the loaded module
+ TimeDateStamp: DWORD; // date/time stamp from pe header
+ CheckSum: DWORD; // checksum from the pe header
+ NumSyms: DWORD; // number of symbols in the symbol table
+ SymType: SYM_TYPE; // type of symbols loaded
+ ModuleName: array [0..31] of WCHAR; // module name
+ ImageName: array [0..255] of WCHAR; // image name
+ LoadedImageName: array [0..255] of WCHAR; // symbol file name
+ end;
+ {$EXTERNALSYM _IMAGEHLP_MODULEW}
+ IMAGEHLP_MODULEW = _IMAGEHLP_MODULEW;
+ {$EXTERNALSYM IMAGEHLP_MODULEW}
+ TImageHlpModuleW = IMAGEHLP_MODULEW;
+ PImageHlpModuleW = PIMAGEHLP_MODULEW;
+
+//
+// source file line data structure
+//
+
+ PIMAGEHLP_LINE64 = ^IMAGEHLP_LINE64;
+ {$EXTERNALSYM PIMAGEHLP_LINE64}
+ _IMAGEHLP_LINE64 = record
+ SizeOfStruct: DWORD; // set to sizeof(IMAGEHLP_LINE64)
+ Key: PVOID; // internal
+ LineNumber: DWORD; // line number in file
+ FileName: PCHAR; // full filename
+ Address: DWORD64; // first instruction of line
+ end;
+ {$EXTERNALSYM _IMAGEHLP_LINE64}
+ IMAGEHLP_LINE64 = _IMAGEHLP_LINE64;
+ {$EXTERNALSYM IMAGEHLP_LINE64}
+ TImageHlpLine64 = IMAGEHLP_LINE64;
+ PImageHlpLine64 = PIMAGEHLP_LINE64;
+
+ PIMAGEHLP_LINE = ^IMAGEHLP_LINE;
+ {$EXTERNALSYM PIMAGEHLP_LINE}
+ _IMAGEHLP_LINE = record
+ SizeOfStruct: DWORD; // set to sizeof(IMAGEHLP_LINE)
+ Key: PVOID; // internal
+ LineNumber: DWORD; // line number in file
+ FileName: PCHAR; // full filename
+ Address: DWORD; // first instruction of line
+ end;
+ {$EXTERNALSYM _IMAGEHLP_LINE}
+ IMAGEHLP_LINE = _IMAGEHLP_LINE;
+ {$EXTERNALSYM IMAGEHLP_LINE}
+ TImageHlpLine = IMAGEHLP_LINE;
+ PImageHlpLine = PIMAGEHLP_LINE;
+
+//
+// source file structure
+//
+
+type
+ _SOURCEFILE = record
+ ModBase: DWORD64; // base address of loaded module
+ FileName: PCHAR; // full filename of source
+ end;
+ {$EXTERNALSYM _SOURCEFILE}
+ SOURCEFILE = _SOURCEFILE;
+ {$EXTERNALSYM SOURCEFILE}
+ PSOURCEFILE = ^SOURCEFILE;
+ {$EXTERNALSYM PSOURCEFILE}
+ TSourceFile = SOURCEFILE;
+
+//
+// data structures used for registered symbol callbacks
+//
+
+const
+ CBA_DEFERRED_SYMBOL_LOAD_START = $00000001;
+ {$EXTERNALSYM CBA_DEFERRED_SYMBOL_LOAD_START}
+ CBA_DEFERRED_SYMBOL_LOAD_COMPLETE = $00000002;
+ {$EXTERNALSYM CBA_DEFERRED_SYMBOL_LOAD_COMPLETE}
+ CBA_DEFERRED_SYMBOL_LOAD_FAILURE = $00000003;
+ {$EXTERNALSYM CBA_DEFERRED_SYMBOL_LOAD_FAILURE}
+ CBA_SYMBOLS_UNLOADED = $00000004;
+ {$EXTERNALSYM CBA_SYMBOLS_UNLOADED}
+ CBA_DUPLICATE_SYMBOL = $00000005;
+ {$EXTERNALSYM CBA_DUPLICATE_SYMBOL}
+ CBA_READ_MEMORY = $00000006;
+ {$EXTERNALSYM CBA_READ_MEMORY}
+ CBA_DEFERRED_SYMBOL_LOAD_CANCEL = $00000007;
+ {$EXTERNALSYM CBA_DEFERRED_SYMBOL_LOAD_CANCEL}
+ CBA_SET_OPTIONS = $00000008;
+ {$EXTERNALSYM CBA_SET_OPTIONS}
+ CBA_EVENT = $00000010;
+ {$EXTERNALSYM CBA_EVENT}
+ CBA_DEFERRED_SYMBOL_LOAD_PARTIAL = $00000020;
+ {$EXTERNALSYM CBA_DEFERRED_SYMBOL_LOAD_PARTIAL}
+ CBA_DEBUG_INFO = $10000000;
+ {$EXTERNALSYM CBA_DEBUG_INFO}
+
+type
+ PIMAGEHLP_CBA_READ_MEMORY = ^IMAGEHLP_CBA_READ_MEMORY;
+ {$EXTERNALSYM PIMAGEHLP_CBA_READ_MEMORY}
+ _IMAGEHLP_CBA_READ_MEMORY = record
+ addr: DWORD64; // address to read from
+ buf: PVOID; // buffer to read to
+ bytes: DWORD; // amount of bytes to read
+ bytesread: LPDWORD; // pointer to store amount of bytes read
+ end;
+ {$EXTERNALSYM _IMAGEHLP_CBA_READ_MEMORY}
+ IMAGEHLP_CBA_READ_MEMORY = _IMAGEHLP_CBA_READ_MEMORY;
+ {$EXTERNALSYM IMAGEHLP_CBA_READ_MEMORY}
+ TImageHlpCbaReadMemory = IMAGEHLP_CBA_READ_MEMORY;
+ PImageHlpCbaReadMemory = PIMAGEHLP_CBA_READ_MEMORY;
+
+const
+ sevInfo = 0;
+ {$EXTERNALSYM sevInfo}
+ sevProblem = 1;
+ {$EXTERNALSYM sevProblem}
+ sevAttn = 2;
+ {$EXTERNALSYM sevAttn}
+ sevFatal = 3;
+ {$EXTERNALSYM sevFatal}
+ sevMax = 4; // unused
+ {$EXTERNALSYM sevMax}
+
+type
+ _IMAGEHLP_CBA_EVENT = record
+ severity: DWORD; // values from sevInfo to sevFatal
+ code: DWORD; // numerical code IDs the error
+ desc: PCHAR; // may contain a text description of the error
+ object_: PVOID; // value dependant upon the error code
+ end;
+ {$EXTERNALSYM _IMAGEHLP_CBA_EVENT}
+ IMAGEHLP_CBA_EVENT = _IMAGEHLP_CBA_EVENT;
+ {$EXTERNALSYM IMAGEHLP_CBA_EVENT}
+ PIMAGEHLP_CBA_EVENT = ^IMAGEHLP_CBA_EVENT;
+ {$EXTERNALSYM PIMAGEHLP_CBA_EVENT}
+ TImageHlpCbaEvent = IMAGEHLP_CBA_EVENT;
+ PImageHlpCbaEvent = PIMAGEHLP_CBA_EVENT;
+
+ PIMAGEHLP_DEFERRED_SYMBOL_LOAD64 = ^IMAGEHLP_DEFERRED_SYMBOL_LOAD64;
+ {$EXTERNALSYM PIMAGEHLP_DEFERRED_SYMBOL_LOAD64}
+ _IMAGEHLP_DEFERRED_SYMBOL_LOAD64 = record
+ SizeOfStruct: DWORD; // set to sizeof(IMAGEHLP_DEFERRED_SYMBOL_LOAD64)
+ BaseOfImage: DWORD64; // base load address of module
+ CheckSum: DWORD; // checksum from the pe header
+ TimeDateStamp: DWORD; // date/time stamp from pe header
+ FileName: array [0..MAX_PATH - 1] of CHAR; // symbols file or image name
+ Reparse: ByteBool; // load failure reparse
+ hFile: HANDLE; // file handle, if passed
+ Flags: DWORD; //
+ end;
+ {$EXTERNALSYM _IMAGEHLP_DEFERRED_SYMBOL_LOAD64}
+ IMAGEHLP_DEFERRED_SYMBOL_LOAD64 = _IMAGEHLP_DEFERRED_SYMBOL_LOAD64;
+ {$EXTERNALSYM IMAGEHLP_DEFERRED_SYMBOL_LOAD64}
+ TImageHlpDeferredSymbolLoad64 = IMAGEHLP_DEFERRED_SYMBOL_LOAD64;
+ PImageHlpDeferredSymbolLoad64 = PIMAGEHLP_DEFERRED_SYMBOL_LOAD64;
+
+const
+ DSLFLAG_MISMATCHED_PDB = $1;
+ {$EXTERNALSYM DSLFLAG_MISMATCHED_PDB}
+ DSLFLAG_MISMATCHED_DBG = $2;
+ {$EXTERNALSYM DSLFLAG_MISMATCHED_DBG}
+
+type
+ PIMAGEHLP_DEFERRED_SYMBOL_LOAD = ^IMAGEHLP_DEFERRED_SYMBOL_LOAD;
+ {$EXTERNALSYM PIMAGEHLP_DEFERRED_SYMBOL_LOAD}
+ _IMAGEHLP_DEFERRED_SYMBOL_LOAD = record
+ SizeOfStruct: DWORD; // set to sizeof(IMAGEHLP_DEFERRED_SYMBOL_LOAD)
+ BaseOfImage: DWORD; // base load address of module
+ CheckSum: DWORD; // checksum from the pe header
+ TimeDateStamp: DWORD; // date/time stamp from pe header
+ FileName: array [0..MAX_PATH - 1] of CHAR; // symbols file or image name
+ Reparse: ByteBool; // load failure reparse
+ hFile: HANDLE; // file handle, if passed
+ end;
+ {$EXTERNALSYM _IMAGEHLP_DEFERRED_SYMBOL_LOAD}
+ IMAGEHLP_DEFERRED_SYMBOL_LOAD = _IMAGEHLP_DEFERRED_SYMBOL_LOAD;
+ {$EXTERNALSYM IMAGEHLP_DEFERRED_SYMBOL_LOAD}
+ TImageHlpDeferredSymbolLoad = IMAGEHLP_DEFERRED_SYMBOL_LOAD;
+ PImageHlpDeferredSymbolLoad = PIMAGEHLP_DEFERRED_SYMBOL_LOAD;
+
+ PIMAGEHLP_DUPLICATE_SYMBOL64 = ^IMAGEHLP_DUPLICATE_SYMBOL64;
+ {$EXTERNALSYM PIMAGEHLP_DUPLICATE_SYMBOL64}
+ _IMAGEHLP_DUPLICATE_SYMBOL64 = record
+ SizeOfStruct: DWORD; // set to sizeof(IMAGEHLP_DUPLICATE_SYMBOL64)
+ NumberOfDups: DWORD; // number of duplicates in the Symbol array
+ Symbol: PIMAGEHLP_SYMBOL64; // array of duplicate symbols
+ SelectedSymbol: DWORD; // symbol selected (-1 to start)
+ end;
+ {$EXTERNALSYM _IMAGEHLP_DUPLICATE_SYMBOL64}
+ IMAGEHLP_DUPLICATE_SYMBOL64 = _IMAGEHLP_DUPLICATE_SYMBOL64;
+ {$EXTERNALSYM IMAGEHLP_DUPLICATE_SYMBOL64}
+ TImageHlpDuplicateSymbol64 = IMAGEHLP_DUPLICATE_SYMBOL64;
+ PImageHlpDuplicateSymbol64 = PIMAGEHLP_DUPLICATE_SYMBOL64;
+
+ PIMAGEHLP_DUPLICATE_SYMBOL = ^IMAGEHLP_DUPLICATE_SYMBOL;
+ {$EXTERNALSYM PIMAGEHLP_DUPLICATE_SYMBOL}
+ _IMAGEHLP_DUPLICATE_SYMBOL = record
+ SizeOfStruct: DWORD; // set to sizeof(IMAGEHLP_DUPLICATE_SYMBOL)
+ NumberOfDups: DWORD; // number of duplicates in the Symbol array
+ Symbol: PIMAGEHLP_SYMBOL; // array of duplicate symbols
+ SelectedSymbol: DWORD; // symbol selected (-1 to start)
+ end;
+ {$EXTERNALSYM _IMAGEHLP_DUPLICATE_SYMBOL}
+ IMAGEHLP_DUPLICATE_SYMBOL = _IMAGEHLP_DUPLICATE_SYMBOL;
+ {$EXTERNALSYM IMAGEHLP_DUPLICATE_SYMBOL}
+ TImageHlpDuplicateSymbol = IMAGEHLP_DUPLICATE_SYMBOL;
+ PImageHlpDuplicateSymbol = PIMAGEHLP_DUPLICATE_SYMBOL;
+
+// If dbghelp ever needs to display graphical UI, it will use this as the parent window.
+
+//BOOL
+//SymSetParentWindow(
+// HWND hwnd
+// );
+
+//
+// options that are set/returned by SymSetOptions() & SymGetOptions()
+// these are used as a mask
+//
+
+const
+ SYMOPT_CASE_INSENSITIVE = $00000001;
+ {$EXTERNALSYM SYMOPT_CASE_INSENSITIVE}
+ SYMOPT_UNDNAME = $00000002;
+ {$EXTERNALSYM SYMOPT_UNDNAME}
+ SYMOPT_DEFERRED_LOADS = $00000004;
+ {$EXTERNALSYM SYMOPT_DEFERRED_LOADS}
+ SYMOPT_NO_CPP = $00000008;
+ {$EXTERNALSYM SYMOPT_NO_CPP}
+ SYMOPT_LOAD_LINES = $00000010;
+ {$EXTERNALSYM SYMOPT_LOAD_LINES}
+ SYMOPT_OMAP_FIND_NEAREST = $00000020;
+ {$EXTERNALSYM SYMOPT_OMAP_FIND_NEAREST}
+ SYMOPT_LOAD_ANYTHING = $00000040;
+ {$EXTERNALSYM SYMOPT_LOAD_ANYTHING}
+ SYMOPT_IGNORE_CVREC = $00000080;
+ {$EXTERNALSYM SYMOPT_IGNORE_CVREC}
+ SYMOPT_NO_UNQUALIFIED_LOADS = $00000100;
+ {$EXTERNALSYM SYMOPT_NO_UNQUALIFIED_LOADS}
+ SYMOPT_FAIL_CRITICAL_ERRORS = $00000200;
+ {$EXTERNALSYM SYMOPT_FAIL_CRITICAL_ERRORS}
+ SYMOPT_EXACT_SYMBOLS = $00000400;
+ {$EXTERNALSYM SYMOPT_EXACT_SYMBOLS}
+ SYMOPT_ALLOW_ABSOLUTE_SYMBOLS = $00000800;
+ {$EXTERNALSYM SYMOPT_ALLOW_ABSOLUTE_SYMBOLS}
+ SYMOPT_IGNORE_NT_SYMPATH = $00001000;
+ {$EXTERNALSYM SYMOPT_IGNORE_NT_SYMPATH}
+ SYMOPT_INCLUDE_32BIT_MODULES = $00002000;
+ {$EXTERNALSYM SYMOPT_INCLUDE_32BIT_MODULES}
+ SYMOPT_PUBLICS_ONLY = $00004000;
+ {$EXTERNALSYM SYMOPT_PUBLICS_ONLY}
+ SYMOPT_NO_PUBLICS = $00008000;
+ {$EXTERNALSYM SYMOPT_NO_PUBLICS}
+ SYMOPT_AUTO_PUBLICS = $00010000;
+ {$EXTERNALSYM SYMOPT_AUTO_PUBLICS}
+ SYMOPT_NO_IMAGE_SEARCH = $00020000;
+ {$EXTERNALSYM SYMOPT_NO_IMAGE_SEARCH}
+ SYMOPT_SECURE = $00040000;
+ {$EXTERNALSYM SYMOPT_SECURE}
+
+ SYMOPT_DEBUG = DWORD($80000000);
+ {$EXTERNALSYM SYMOPT_DEBUG}
+
+function SymSetOptions(SymOptions: DWORD): DWORD; stdcall;
+{$EXTERNALSYM SymSetOptions}
+
+function SymGetOptions: DWORD; stdcall;
+{$EXTERNALSYM SymGetOptions}
+
+function SymCleanup(hProcess: HANDLE): BOOL; stdcall;
+{$EXTERNALSYM SymCleanup}
+
+function SymMatchString(string_, expression: LPSTR; fCase: BOOL): BOOL; stdcall;
+{$EXTERNALSYM SymMatchString}
+
+type
+ PSYM_ENUMSOURCFILES_CALLBACK = function(pSourceFile: PSOURCEFILE; UserContext: PVOID): BOOL; stdcall;
+ {$EXTERNALSYM PSYM_ENUMSOURCFILES_CALLBACK}
+ PSymEnumSourceFilesCallback = PSYM_ENUMSOURCFILES_CALLBACK;
+
+function SymEnumSourceFiles(hProcess: HANDLE; ModBase: ULONG64; Mask: LPSTR;
+ cbSrcFiles: PSYM_ENUMSOURCFILES_CALLBACK; UserContext: PVOID): BOOL; stdcall;
+{$EXTERNALSYM SymEnumSourceFiles}
+
+function SymEnumerateModules64(hProcess: HANDLE; EnumModulesCallback: PSYM_ENUMMODULES_CALLBACK64;
+ UserContext: PVOID): BOOL; stdcall;
+{$EXTERNALSYM SymEnumerateModules64}
+
+function SymEnumerateModules(hProcess: HANDLE; EnumModulesCallback: PSYM_ENUMMODULES_CALLBACK;
+ UserContext: PVOID): BOOL; stdcall;
+{$EXTERNALSYM SymEnumerateModules}
+
+function SymEnumerateSymbols64(hProcess: HANDLE; BaseOfDll: DWORD64;
+ EnumSymbolsCallback: PSYM_ENUMSYMBOLS_CALLBACK64; UserContext: PVOID): BOOL; stdcall;
+{$EXTERNALSYM SymEnumerateSymbols64}
+
+function SymEnumerateSymbolsW64(hProcess: HANDLE; BaseOfDll: DWORD64;
+ EnumSymbolsCallback: PSYM_ENUMSYMBOLS_CALLBACK64W; UserContext: PVOID): BOOL; stdcall;
+{$EXTERNALSYM SymEnumerateSymbolsW64}
+
+function SymEnumerateSymbols(hProcess: HANDLE; BaseOfDll: DWORD;
+ EnumSymbolsCallback: PSYM_ENUMSYMBOLS_CALLBACK; UserContext: PVOID): BOOL; stdcall;
+{$EXTERNALSYM SymEnumerateSymbols}
+
+function SymEnumerateSymbolsW(hProcess: HANDLE; BaseOfDll: DWORD;
+ EnumSymbolsCallback: PSYM_ENUMSYMBOLS_CALLBACKW; UserContext: PVOID): BOOL; stdcall;
+{$EXTERNALSYM SymEnumerateSymbolsW}
+
+function EnumerateLoadedModules64(hProcess: HANDLE; EnumLoadedModulesCallback: PENUMLOADED_MODULES_CALLBACK64;
+ UserContext: PVOID): BOOL; stdcall;
+{$EXTERNALSYM EnumerateLoadedModules64}
+
+function EnumerateLoadedModules(hProcess: HANDLE; EnumLoadedModulesCallback: PENUMLOADED_MODULES_CALLBACK;
+ UserContext: PVOID): BOOL; stdcall;
+{$EXTERNALSYM EnumerateLoadedModules}
+
+function SymFunctionTableAccess64(hProcess: HANDLE; AddrBase: DWORD64): PVOID; stdcall;
+{$EXTERNALSYM SymFunctionTableAccess64}
+
+function SymFunctionTableAccess(hProcess: HANDLE; AddrBase: DWORD): PVOID; stdcall;
+{$EXTERNALSYM SymFunctionTableAccess}
+
+function SymGetModuleInfo64(hProcess: HANDLE; qwAddr: DWORD64;
+ var ModuleInfo: IMAGEHLP_MODULE64): BOOL; stdcall;
+{$EXTERNALSYM SymGetModuleInfo64}
+
+function SymGetModuleInfoW64(hProcess: HANDLE; qwAddr: DWORD64;
+ var ModuleInfo: IMAGEHLP_MODULEW64): BOOL; stdcall;
+{$EXTERNALSYM SymGetModuleInfoW64}
+
+function SymGetModuleInfo(hProcess: HANDLE; dwAddr: DWORD;
+ var ModuleInfo: IMAGEHLP_MODULE): BOOL; stdcall;
+{$EXTERNALSYM SymGetModuleInfo}
+
+function SymGetModuleInfoW(hProcess: HANDLE; dwAddr: DWORD;
+ var ModuleInfo: IMAGEHLP_MODULEW): BOOL; stdcall;
+{$EXTERNALSYM SymGetModuleInfoW}
+
+function SymGetModuleBase64(hProcess: HANDLE; qwAddr: DWORD64): DWORD64; stdcall;
+{$EXTERNALSYM SymGetModuleBase64}
+
+function SymGetModuleBase(hProcess: HANDLE; dwAddr: DWORD): DWORD; stdcall;
+{$EXTERNALSYM SymGetModuleBase}
+
+function SymGetSymNext64(hProcess: HANDLE; var Symbol: IMAGEHLP_SYMBOL64): BOOL; stdcall;
+{$EXTERNALSYM SymGetSymNext64}
+
+function SymGetSymNext(hProcess: HANDLE; var Symbol: IMAGEHLP_SYMBOL): BOOL; stdcall;
+{$EXTERNALSYM SymGetSymNext}
+
+function SymGetSymPrev64(hProcess: HANDLE; var Symbol: IMAGEHLP_SYMBOL64): BOOL; stdcall;
+{$EXTERNALSYM SymGetSymPrev64}
+
+function SymGetSymPrev(hProcess: HANDLE; var Symbol: IMAGEHLP_SYMBOL): BOOL; stdcall;
+{$EXTERNALSYM SymGetSymPrev}
+
+function SymGetLineFromAddr64(hProcess: HANDLE; qwAddr: DWORD64;
+ var pdwDisplacement: DWORD; var Line64: IMAGEHLP_LINE64): BOOL; stdcall;
+{$EXTERNALSYM SymGetLineFromAddr64}
+
+function SymGetLineFromAddr(hProcess: HANDLE; dwAddr: DWORD;
+ var pdwDisplacement: DWORD; var Line: IMAGEHLP_LINE): BOOL; stdcall;
+{$EXTERNALSYM SymGetLineFromAddr}
+
+function SymGetLineFromName64(hProcess: HANDLE; ModuleName: PSTR; FileName: PSTR;
+ dwLineNumber: DWORD; var plDisplacement: LONG; var Line: IMAGEHLP_LINE64): BOOL; stdcall;
+{$EXTERNALSYM SymGetLineFromName64}
+
+function SymGetLineFromName(hProcess: HANDLE; ModuleName: PSTR; FileName: PSTR;
+ dwLineNumber: DWORD; var plDisplacement: LONG; var Line: IMAGEHLP_LINE): BOOL; stdcall;
+{$EXTERNALSYM SymGetLineFromName}
+
+function SymGetLineNext64(hProcess: HANDLE; var Line: IMAGEHLP_LINE64): BOOL; stdcall;
+{$EXTERNALSYM SymGetLineNext64}
+
+function SymGetLineNext(hProcess: HANDLE; var Line: IMAGEHLP_LINE): BOOL; stdcall;
+{$EXTERNALSYM SymGetLineNext}
+
+function SymGetLinePrev64(hProcess: HANDLE; var Line: IMAGEHLP_LINE64): BOOL; stdcall;
+{$EXTERNALSYM SymGetLinePrev64}
+
+function SymGetLinePrev(hProcess: HANDLE; var Line: IMAGEHLP_LINE): BOOL; stdcall;
+{$EXTERNALSYM SymGetLinePrev}
+
+function SymMatchFileName(FileName, Match: PSTR; var FileNameStop, MatchStop: PSTR): BOOL; stdcall;
+{$EXTERNALSYM SymMatchFileName}
+
+function SymInitialize(hProcess: HANDLE; UserSearchPath: PSTR; fInvadeProcess: BOOL): BOOL; stdcall;
+{$EXTERNALSYM SymInitialize}
+
+function SymGetSearchPath(hProcess: HANDLE; SearchPath: PSTR; SearchPathLength: DWORD): BOOL; stdcall;
+{$EXTERNALSYM SymGetSearchPath}
+
+function SymSetSearchPath(hProcess: HANDLE; SearchPath: PSTR): BOOL; stdcall;
+{$EXTERNALSYM SymSetSearchPath}
+
+function SymLoadModule64(hProcess, hFile: HANDLE; ImageName, ModuleName: PSTR;
+ BaseOfDll: DWORD64; SizeOfDll: DWORD): DWORD64; stdcall;
+{$EXTERNALSYM SymLoadModule64}
+
+const
+ SLMFLAG_VIRTUAL = $1;
+ {$EXTERNALSYM SLMFLAG_VIRTUAL}
+
+function SymLoadModuleEx(hProcess, hFile: HANDLE; ImageName, ModuleName: PSTR; BaseOfDll: DWORD64;
+ DllSize: DWORD; Data: PMODLOAD_DATA; Flag: DWORD): DWORD64; stdcall;
+{$EXTERNALSYM SymLoadModuleEx}
+
+function SymLoadModule(hProcess, hFile: HANDLE; ImageName, ModuleName: PSTR;
+ BaseOfDll: DWORD; SizeOfDll: DWORD): DWORD; stdcall;
+{$EXTERNALSYM SymLoadModule}
+
+function SymUnloadModule64(hProcess: HANDLE; BaseOfDll: DWORD64): BOOL; stdcall;
+{$EXTERNALSYM SymUnloadModule64}
+
+function SymUnloadModule(hProcess: HANDLE; BaseOfDll: DWORD): BOOL; stdcall;
+{$EXTERNALSYM SymUnloadModule}
+
+function SymUnDName64(const sym: IMAGEHLP_SYMBOL64; UnDecName: PSTR;
+ UnDecNameLength: DWORD): BOOL; stdcall;
+{$EXTERNALSYM SymUnDName64}
+
+function SymUnDName(const sym: IMAGEHLP_SYMBOL; UnDecName: PSTR;
+ UnDecNameLength: DWORD): BOOL; stdcall;
+{$EXTERNALSYM SymUnDName}
+
+function SymRegisterCallback64(hProcess: HANDLE; CallbackFunction: PSYMBOL_REGISTERED_CALLBACK64;
+ UserContext: ULONG64): BOOL; stdcall;
+{$EXTERNALSYM SymRegisterCallback64}
+
+function SymRegisterFunctionEntryCallback64(hProcess: HANDLE; CallbackFunction: PSYMBOL_FUNCENTRY_CALLBACK64;
+ UserContext: ULONG64): BOOL; stdcall;
+{$EXTERNALSYM SymRegisterFunctionEntryCallback64}
+
+function SymRegisterCallback(hProcess: HANDLE; CallbackFunction: PSYMBOL_REGISTERED_CALLBACK;
+ UserContext: PVOID): BOOL; stdcall;
+{$EXTERNALSYM SymRegisterCallback}
+
+function SymRegisterFunctionEntryCallback(hProcess: HANDLE; CallbackFunction: PSYMBOL_FUNCENTRY_CALLBACK;
+ UserContext: PVOID): BOOL; stdcall;
+{$EXTERNALSYM SymRegisterFunctionEntryCallback}
+
+type
+ PIMAGEHLP_SYMBOL_SRC = ^IMAGEHLP_SYMBOL_SRC;
+ {$EXTERNALSYM PIMAGEHLP_SYMBOL_SRC}
+ _IMAGEHLP_SYMBOL_SRC = record
+ sizeofstruct: DWORD;
+ type_: DWORD;
+ file_: array [0..MAX_PATH - 1] of Char;
+ end;
+ {$EXTERNALSYM _IMAGEHLP_SYMBOL_SRC}
+ IMAGEHLP_SYMBOL_SRC = _IMAGEHLP_SYMBOL_SRC;
+ {$EXTERNALSYM IMAGEHLP_SYMBOL_SRC}
+ TImageHlpSymbolSrc = IMAGEHLP_SYMBOL_SRC;
+ PImageHlpSymbolSrc = PIMAGEHLP_SYMBOL_SRC;
+
+ PMODULE_TYPE_INFO = ^MODULE_TYPE_INFO;
+ {$EXTERNALSYM PMODULE_TYPE_INFO}
+ _MODULE_TYPE_INFO = record
+ dataLength: USHORT;
+ leaf: USHORT;
+ data: array [0..0] of BYTE;
+ end;
+ {$EXTERNALSYM _MODULE_TYPE_INFO}
+ MODULE_TYPE_INFO = _MODULE_TYPE_INFO;
+ {$EXTERNALSYM MODULE_TYPE_INFO}
+ TModuleTypeInfo = MODULE_TYPE_INFO;
+ PModuleTypeInfo = PMODULE_TYPE_INFO;
+
+type
+ PSYMBOL_INFO = ^SYMBOL_INFO;
+ {$EXTERNALSYM PSYMBOL_INFO}
+ _SYMBOL_INFO = record
+ SizeOfStruct: ULONG;
+ TypeIndex: ULONG; // Type Index of symbol
+ Reserved: array [0..1] of ULONG64;
+ Info: ULONG;
+ Size: ULONG;
+ ModBase: ULONG64; // Base Address of module comtaining this symbol
+ Flags: ULONG;
+ Value: ULONG64; // Value of symbol, ValuePresent should be 1
+ Address: ULONG64; // Address of symbol including base address of module
+ Register_: ULONG; // register holding value or pointer to value
+ Scope: ULONG; // scope of the symbol
+ Tag: ULONG; // pdb classification
+ NameLen: ULONG; // Actual length of name
+ MaxNameLen: ULONG;
+ Name: array [0..0] of CHAR; // Name of symbol
+ end;
+ {$EXTERNALSYM _SYMBOL_INFO}
+ SYMBOL_INFO = _SYMBOL_INFO;
+ {$EXTERNALSYM SYMBOL_INFO}
+ TSymbolInfo = SYMBOL_INFO;
+ PSymbolInfo = PSYMBOL_INFO;
+
+ _SYMBOL_INFO_PACKAGE = record
+ si: SYMBOL_INFO;
+ name: array [0..MAX_SYM_NAME] of CHAR;
+ end;
+ {$EXTERNALSYM _SYMBOL_INFO_PACKAGE}
+ SYMBOL_INFO_PACKAGE = _SYMBOL_INFO_PACKAGE;
+ {$EXTERNALSYM SYMBOL_INFO_PACKAGE}
+ PSYMBOL_INFO_PACKAGE = ^SYMBOL_INFO_PACKAGE;
+ {$EXTERNALSYM PSYMBOL_INFO_PACKAGE}
+ TSymbolInfoPackage = SYMBOL_INFO_PACKAGE;
+ PSymbolInfoPackage = PSYMBOL_INFO_PACKAGE;
+
+ PIMAGEHLP_STACK_FRAME = ^IMAGEHLP_STACK_FRAME;
+ {$EXTERNALSYM PIMAGEHLP_STACK_FRAME}
+ _IMAGEHLP_STACK_FRAME = record
+ InstructionOffset: ULONG64;
+ ReturnOffset: ULONG64;
+ FrameOffset: ULONG64;
+ StackOffset: ULONG64;
+ BackingStoreOffset: ULONG64;
+ FuncTableEntry: ULONG64;
+ Params: array [0..3] of ULONG64;
+ Reserved: array [0..4] of ULONG64;
+ Virtual_: BOOL;
+ Reserved2: ULONG;
+ end;
+ {$EXTERNALSYM _IMAGEHLP_STACK_FRAME}
+ IMAGEHLP_STACK_FRAME = _IMAGEHLP_STACK_FRAME;
+ {$EXTERNALSYM IMAGEHLP_STACK_FRAME}
+ TImageHlpStackFrame = IMAGEHLP_STACK_FRAME;
+ PImageHlpStackFrame = PIMAGEHLP_STACK_FRAME;
+
+ IMAGEHLP_CONTEXT = LPVOID;
+ {$EXTERNALSYM IMAGEHLP_CONTEXT}
+ PIMAGEHLP_CONTEXT = ^IMAGEHLP_CONTEXT;
+ {$EXTERNALSYM PIMAGEHLP_CONTEXT}
+ TImageHlpContext = IMAGEHLP_CONTEXT;
+ PImageHlpContext = PIMAGEHLP_CONTEXT;
+
+function SymSetContext(hProcess: HANDLE; StackFrame: PIMAGEHLP_STACK_FRAME; Context: PIMAGEHLP_CONTEXT): BOOL; stdcall;
+{$EXTERNALSYM SymSetContext}
+
+function SymFromAddr(hProcess: HANDLE; Address: DWORD64; Displacement: PDWORD64; Symbol: PSYMBOL_INFO): BOOL; stdcall;
+{$EXTERNALSYM SymFromAddr}
+
+// While SymFromName will provide a symbol from a name,
+// SymEnumSymbols can provide the same matching information
+// for ALL symbols with a matching name, even regular
+// expressions. That way you can search across modules
+// and differentiate between identically named symbols.
+
+function SymFromName(hProcess: HANDLE; Name: LPSTR; Symbol: PSYMBOL_INFO): BOOL; stdcall;
+{$EXTERNALSYM SymFromName}
+
+type
+ PSYM_ENUMERATESYMBOLS_CALLBACK = function(pSymInfo: PSYMBOL_INFO; SymbolSize: ULONG; UserContext: PVOID): BOOL; stdcall;
+ {$EXTERNALSYM PSYM_ENUMERATESYMBOLS_CALLBACK}
+ PSymEnumerateSymbolsCallback = PSYM_ENUMERATESYMBOLS_CALLBACK;
+
+function SymEnumSymbols(hProcess: HANDLE; BaseOfDll: ULONG64; Mask: PCSTR; EnumSymbolsCallback: PSYM_ENUMERATESYMBOLS_CALLBACK; UserContext: PVOID): BOOL; stdcall;
+{$EXTERNALSYM SymEnumSymbols}
+
+function SymEnumSymbolsForAddr(hProcess: HANDLE; Address: DWORD64;
+ EnumSymbolsCallback: PSYM_ENUMERATESYMBOLS_CALLBACK; UserContext: PVOID): BOOL; stdcall;
+{$EXTERNALSYM SymEnumSymbolsForAddr}
+
+type
+ _IMAGEHLP_SYMBOL_TYPE_INFO = (
+ TI_GET_SYMTAG,
+ TI_GET_SYMNAME,
+ TI_GET_LENGTH,
+ TI_GET_TYPE,
+ TI_GET_TYPEID,
+ TI_GET_BASETYPE,
+ TI_GET_ARRAYINDEXTYPEID,
+ TI_FINDCHILDREN,
+ TI_GET_DATAKIND,
+ TI_GET_ADDRESSOFFSET,
+ TI_GET_OFFSET,
+ TI_GET_VALUE,
+ TI_GET_COUNT,
+ TI_GET_CHILDRENCOUNT,
+ TI_GET_BITPOSITION,
+ TI_GET_VIRTUALBASECLASS,
+ TI_GET_VIRTUALTABLESHAPEID,
+ TI_GET_VIRTUALBASEPOINTEROFFSET,
+ TI_GET_CLASSPARENTID,
+ TI_GET_NESTED,
+ TI_GET_SYMINDEX,
+ TI_GET_LEXICALPARENT,
+ TI_GET_ADDRESS,
+ TI_GET_THISADJUST,
+ TI_GET_UDTKIND,
+ TI_IS_EQUIV_TO,
+ TI_GET_CALLING_CONVENTION);
+ {$EXTERNALSYM _IMAGEHLP_SYMBOL_TYPE_INFO}
+ IMAGEHLP_SYMBOL_TYPE_INFO = _IMAGEHLP_SYMBOL_TYPE_INFO;
+ {$EXTERNALSYM IMAGEHLP_SYMBOL_TYPE_INFO}
+ TImageHlpSymbolTypeInfo = IMAGEHLP_SYMBOL_TYPE_INFO;
+
+ PTI_FINDCHILDREN_PARAMS = ^TI_FINDCHILDREN_PARAMS;
+ {$EXTERNALSYM PTI_FINDCHILDREN_PARAMS}
+ _TI_FINDCHILDREN_PARAMS = record
+ Count: ULONG;
+ Start: ULONG;
+ ChildId: array [0..0] of ULONG;
+ end;
+ {$EXTERNALSYM _TI_FINDCHILDREN_PARAMS}
+ TI_FINDCHILDREN_PARAMS = _TI_FINDCHILDREN_PARAMS;
+ {$EXTERNALSYM TI_FINDCHILDREN_PARAMS}
+ TTiFindChildrenParams = TI_FINDCHILDREN_PARAMS;
+ PTiFindChildrenParams = PTI_FINDCHILDREN_PARAMS;
+
+function SymGetTypeInfo(hProcess: HANDLE; ModBase: DWORD64; TypeId: ULONG; GetType: IMAGEHLP_SYMBOL_TYPE_INFO; pInfo: PVOID): BOOL; stdcall;
+{$EXTERNALSYM SymGetTypeInfo}
+
+function SymEnumTypes(hProcess: HANDLE; BaseOfDll: ULONG64; EnumSymbolsCallback: PSYM_ENUMERATESYMBOLS_CALLBACK; UserContext: PVOID): BOOL; stdcall;
+{$EXTERNALSYM SymEnumTypes}
+
+function SymGetTypeFromName(hProcess: HANDLE; BaseOfDll: ULONG64; Name: LPSTR; Symbol: PSYMBOL_INFO): BOOL; stdcall;
+{$EXTERNALSYM SymGetTypeFromName}
+
+function SymAddSymbol(hProcess: HANDLE; BaseOfDll: ULONG64; Name: PCSTR; Address: DWORD64; Size, Flags: DWORD): BOOL; stdcall;
+{$EXTERNALSYM SymAddSymbol}
+
+function SymDeleteSymbol(hProcess: HANDLE; BaseOfDll: ULONG64; Name: PCSTR; Address: DWORD64; Flags: DWORD): BOOL; stdcall;
+{$EXTERNALSYM SymDeleteSymbol}
+
+//
+// Full user-mode dump creation.
+//
+
+type
+ PDBGHELP_CREATE_USER_DUMP_CALLBACK = function(DataType: DWORD; var Data: PVOID; DataLength: LPDWORD; UserData: PVOID): BOOL; stdcall;
+ {$EXTERNALSYM PDBGHELP_CREATE_USER_DUMP_CALLBACK}
+ PDbgHelpCreateUserDumpCallback = PDBGHELP_CREATE_USER_DUMP_CALLBACK;
+
+function DbgHelpCreateUserDump(FileName: LPSTR; Callback: PDBGHELP_CREATE_USER_DUMP_CALLBACK; UserData: PVOID): BOOL; stdcall;
+{$EXTERNALSYM DbgHelpCreateUserDump}
+
+function DbgHelpCreateUserDumpW(FileName: LPWSTR; Callback: PDBGHELP_CREATE_USER_DUMP_CALLBACK; UserData: PVOID): BOOL; stdcall;
+{$EXTERNALSYM DbgHelpCreateUserDumpW}
+
+// -----------------------------------------------------------------
+// The following 4 legacy APIs are fully supported, but newer
+// ones are recommended. SymFromName and SymFromAddr provide
+// much more detailed info on the returned symbol.
+
+function SymGetSymFromAddr64(hProcess: HANDLE; qwAddr: DWORD64; pdwDisplacement: PDWORD64; Symbol: PIMAGEHLP_SYMBOL64): BOOL; stdcall;
+{$EXTERNALSYM SymGetSymFromAddr64}
+
+function SymGetSymFromAddr(hProcess: HANDLE; dwAddr: DWORD; pdwDisplacement: PDWORD; Symbol: PIMAGEHLP_SYMBOL): BOOL; stdcall;
+{$EXTERNALSYM SymGetSymFromAddr}
+
+// While following two APIs will provide a symbol from a name,
+// SymEnumSymbols can provide the same matching information
+// for ALL symbols with a matching name, even regular
+// expressions. That way you can search across modules
+// and differentiate between identically named symbols.
+
+function SymGetSymFromName64(hProcess: HANDLE; Name: PSTR; Symbol: PIMAGEHLP_SYMBOL64): BOOL; stdcall;
+{$EXTERNALSYM SymGetSymFromName64}
+
+function SymGetSymFromName(hProcess: HANDLE; Name: PSTR; Symbol: PIMAGEHLP_SYMBOL): BOOL; stdcall;
+{$EXTERNALSYM SymGetSymFromName}
+
+// -----------------------------------------------------------------
+// The following APIs exist only for backwards compatibility
+// with a pre-release version documented in an MSDN release.
+
+// You should use SymFindFileInPath if you want to maintain
+// future compatibility.
+
+function FindFileInPath(hprocess: HANDLE; SearchPath: LPSTR; FileName: LPSTR; id: PVOID; two: DWORD; three: DWORD; flags: DWORD; FilePath: LPSTR): BOOL; stdcall;
+{$EXTERNALSYM FindFileInPath}
+
+// You should use SymFindFileInPath if you want to maintain
+// future compatibility.
+
+function FindFileInSearchPath(hprocess: HANDLE; SearchPath: LPSTR; FileName: LPSTR; one: DWORD; two: DWORD; three: DWORD; FilePath: LPSTR): BOOL; stdcall;
+{$EXTERNALSYM FindFileInSearchPath}
+
+function SymEnumSym(hProcess: HANDLE; BaseOfDll: ULONG64; EnumSymbolsCallback: PSYM_ENUMERATESYMBOLS_CALLBACK; UserContext: PVOID): BOOL; stdcall;
+{$EXTERNALSYM SymEnumSym}
+
+// These values should not be used.
+// They have been replaced by SYMFLAG_ values.
+
+const
+ SYMF_OMAP_GENERATED = $00000001;
+ SYMF_OMAP_MODIFIED = $00000002;
+ SYMF_REGISTER = $00000008;
+ SYMF_REGREL = $00000010;
+ SYMF_FRAMEREL = $00000020;
+ SYMF_PARAMETER = $00000040;
+ SYMF_LOCAL = $00000080;
+ SYMF_CONSTANT = $00000100;
+ SYMF_EXPORT = $00000200;
+ SYMF_FORWARDER = $00000400;
+ SYMF_FUNCTION = $00000800;
+ SYMF_VIRTUAL = $00001000;
+ SYMF_THUNK = $00002000;
+ SYMF_TLSREL = $00004000;
+
+// These values should also not be used.
+// They have been replaced by SYMFLAG_ values.
+
+ IMAGEHLP_SYMBOL_INFO_VALUEPRESENT = 1;
+ IMAGEHLP_SYMBOL_INFO_REGISTER = SYMF_REGISTER; // 0x0008
+ IMAGEHLP_SYMBOL_INFO_REGRELATIVE = SYMF_REGREL; // 0x0010
+ IMAGEHLP_SYMBOL_INFO_FRAMERELATIVE = SYMF_FRAMEREL; // 0x0020
+ IMAGEHLP_SYMBOL_INFO_PARAMETER = SYMF_PARAMETER; // 0x0040
+ IMAGEHLP_SYMBOL_INFO_LOCAL = SYMF_LOCAL; // 0x0080
+ IMAGEHLP_SYMBOL_INFO_CONSTANT = SYMF_CONSTANT; // 0x0100
+ IMAGEHLP_SYMBOL_FUNCTION = SYMF_FUNCTION; // 0x0800
+ IMAGEHLP_SYMBOL_VIRTUAL = SYMF_VIRTUAL; // 0x1000
+ IMAGEHLP_SYMBOL_THUNK = SYMF_THUNK; // 0x2000
+ IMAGEHLP_SYMBOL_INFO_TLSRELATIVE = SYMF_TLSREL; // 0x4000
+
+const
+ MINIDUMP_SIGNATURE = 'PMDM';
+ {$EXTERNALSYM MINIDUMP_SIGNATURE}
+ MINIDUMP_VERSION = 42899;
+ {$EXTERNALSYM MINIDUMP_VERSION}
+
+type
+ RVA = DWORD;
+ {$EXTERNALSYM RVA}
+ RVA64 = ULONG64;
+ {$EXTERNALSYM RVA64}
+
+ _MINIDUMP_LOCATION_DESCRIPTOR = record
+ DataSize: ULONG32;
+ Rva: RVA;
+ end;
+ {$EXTERNALSYM _MINIDUMP_LOCATION_DESCRIPTOR}
+ MINIDUMP_LOCATION_DESCRIPTOR = _MINIDUMP_LOCATION_DESCRIPTOR;
+ {$EXTERNALSYM MINIDUMP_LOCATION_DESCRIPTOR}
+ TMinidumpLocationDescriptor = MINIDUMP_LOCATION_DESCRIPTOR;
+ PMinidumpLocationDescriptor = ^MINIDUMP_LOCATION_DESCRIPTOR;
+
+ _MINIDUMP_LOCATION_DESCRIPTOR64 = record
+ DataSize: ULONG64;
+ Rva: RVA64;
+ end;
+ {$EXTERNALSYM _MINIDUMP_LOCATION_DESCRIPTOR64}
+ MINIDUMP_LOCATION_DESCRIPTOR64 = _MINIDUMP_LOCATION_DESCRIPTOR64;
+ {$EXTERNALSYM MINIDUMP_LOCATION_DESCRIPTOR64}
+ TMinidumpLocationDescriptor64 = MINIDUMP_LOCATION_DESCRIPTOR64;
+ PMinidumpLocationDescriptor64 = ^MINIDUMP_LOCATION_DESCRIPTOR64;
+
+ PMINIDUMP_MEMORY_DESCRIPTOR = ^MINIDUMP_MEMORY_DESCRIPTOR;
+ {$EXTERNALSYM PMINIDUMP_MEMORY_DESCRIPTOR}
+ _MINIDUMP_MEMORY_DESCRIPTOR = record
+ StartOfMemoryRange: ULONG64;
+ Memory: MINIDUMP_LOCATION_DESCRIPTOR;
+ end;
+ {$EXTERNALSYM _MINIDUMP_MEMORY_DESCRIPTOR}
+ MINIDUMP_MEMORY_DESCRIPTOR = _MINIDUMP_MEMORY_DESCRIPTOR;
+ {$EXTERNALSYM MINIDUMP_MEMORY_DESCRIPTOR}
+ TMinidumpMemoryDescriptor = MINIDUMP_MEMORY_DESCRIPTOR;
+ PMinidumpMemoryDescriptor = PMINIDUMP_MEMORY_DESCRIPTOR;
+
+// DESCRIPTOR64 is used for full-memory minidumps where
+// all of the raw memory is laid out sequentially at the
+// end of the dump. There is no need for individual RVAs
+// as the RVA is the base RVA plus the sum of the preceeding
+// data blocks.
+
+ PMINIDUMP_MEMORY_DESCRIPTOR64 = ^MINIDUMP_MEMORY_DESCRIPTOR64;
+ {$EXTERNALSYM PMINIDUMP_MEMORY_DESCRIPTOR64}
+ _MINIDUMP_MEMORY_DESCRIPTOR64 = record
+ StartOfMemoryRange: ULONG64;
+ DataSize: ULONG64;
+ end;
+ {$EXTERNALSYM _MINIDUMP_MEMORY_DESCRIPTOR64}
+ MINIDUMP_MEMORY_DESCRIPTOR64 = _MINIDUMP_MEMORY_DESCRIPTOR64;
+ {$EXTERNALSYM MINIDUMP_MEMORY_DESCRIPTOR64}
+ TMinidumpMemoryDescriptor64 = MINIDUMP_MEMORY_DESCRIPTOR64;
+ PMinidumpMemoryDescriptor64 = PMINIDUMP_MEMORY_DESCRIPTOR64;
+
+ PMINIDUMP_HEADER = ^MINIDUMP_HEADER;
+ {$EXTERNALSYM PMINIDUMP_HEADER}
+ _MINIDUMP_HEADER = record
+ Signature: ULONG32;
+ Version: ULONG32;
+ NumberOfStreams: ULONG32;
+ StreamDirectoryRva: RVA;
+ CheckSum: ULONG32;
+ U: record
+ case Integer of
+ 0: (Reserved: ULONG32);
+ 1: (TimeDateStamp: ULONG32);
+ end;
+ Flags: ULONG64;
+ end;
+ {$EXTERNALSYM _MINIDUMP_HEADER}
+ MINIDUMP_HEADER = _MINIDUMP_HEADER;
+ {$EXTERNALSYM MINIDUMP_HEADER}
+ TMinidumpHeader = MINIDUMP_HEADER;
+ PMinidumpHeader = PMINIDUMP_HEADER;
+
+//
+// The MINIDUMP_HEADER field StreamDirectoryRva points to
+// an array of MINIDUMP_DIRECTORY structures.
+//
+
+ PMINIDUMP_DIRECTORY = ^MINIDUMP_DIRECTORY;
+ {$EXTERNALSYM PMINIDUMP_DIRECTORY}
+ _MINIDUMP_DIRECTORY = record
+ StreamType: ULONG32;
+ Location: MINIDUMP_LOCATION_DESCRIPTOR;
+ end;
+ {$EXTERNALSYM _MINIDUMP_DIRECTORY}
+ MINIDUMP_DIRECTORY = _MINIDUMP_DIRECTORY;
+ {$EXTERNALSYM MINIDUMP_DIRECTORY}
+ TMinidumpDirectory = MINIDUMP_DIRECTORY;
+ PMinidumpDirectory = PMINIDUMP_DIRECTORY;
+
+ PMINIDUMP_STRING = ^MINIDUMP_STRING;
+ {$EXTERNALSYM PMINIDUMP_STRING}
+ _MINIDUMP_STRING = record
+ Length: ULONG32; // Length in bytes of the string
+ Buffer: PWCHAR; // Variable size buffer
+ end;
+ {$EXTERNALSYM _MINIDUMP_STRING}
+ MINIDUMP_STRING = _MINIDUMP_STRING;
+ {$EXTERNALSYM MINIDUMP_STRING}
+ TMinidumpString = MINIDUMP_STRING;
+ PMinidumpString = PMINIDUMP_STRING;
+
+//
+// The MINIDUMP_DIRECTORY field StreamType may be one of the following types.
+// Types will be added in the future, so if a program reading the minidump
+// header encounters a stream type it does not understand it should ignore
+// the data altogether. Any tag above LastReservedStream will not be used by
+// the system and is reserved for program-specific information.
+//
+
+const
+ UnusedStream = 0;
+ {$EXTERNALSYM UnusedStream}
+ ReservedStream0 = 1;
+ {$EXTERNALSYM ReservedStream0}
+ ReservedStream1 = 2;
+ {$EXTERNALSYM ReservedStream1}
+ ThreadListStream = 3;
+ {$EXTERNALSYM ThreadListStream}
+ ModuleListStream = 4;
+ {$EXTERNALSYM ModuleListStream}
+ MemoryListStream = 5;
+ {$EXTERNALSYM MemoryListStream}
+ ExceptionStream = 6;
+ {$EXTERNALSYM ExceptionStream}
+ SystemInfoStream = 7;
+ {$EXTERNALSYM SystemInfoStream}
+ ThreadExListStream = 8;
+ {$EXTERNALSYM ThreadExListStream}
+ Memory64ListStream = 9;
+ {$EXTERNALSYM Memory64ListStream}
+ CommentStreamA = 10;
+ {$EXTERNALSYM CommentStreamA}
+ CommentStreamW = 11;
+ {$EXTERNALSYM CommentStreamW}
+ HandleDataStream = 12;
+ {$EXTERNALSYM HandleDataStream}
+ FunctionTableStream = 13;
+ {$EXTERNALSYM FunctionTableStream}
+ UnloadedModuleListStream = 14;
+ {$EXTERNALSYM UnloadedModuleListStream}
+ MiscInfoStream = 15;
+ {$EXTERNALSYM MiscInfoStream}
+
+ LastReservedStream = $ffff;
+ {$EXTERNALSYM LastReservedStream}
+
+type
+ _MINIDUMP_STREAM_TYPE = DWORD;
+ {$EXTERNALSYM MINIDUMP_STREAM_TYPE}
+ MINIDUMP_STREAM_TYPE = _MINIDUMP_STREAM_TYPE;
+ {$EXTERNALSYM _MINIDUMP_STREAM_TYPE}
+ TMinidumpStreamType = MINIDUMP_STREAM_TYPE;
+
+//
+// The minidump system information contains processor and
+// Operating System specific information.
+//
+
+type
+ _CPU_INFORMATION = record
+ case Integer of
+
+ //
+ // X86 platforms use CPUID function to obtain processor information.
+ //
+
+ 0: (
+
+ //
+ // CPUID Subfunction 0, register EAX (VendorId [0]),
+ // EBX (VendorId [1]) and ECX (VendorId [2]).
+ //
+
+ VendorId: array [0..2] of ULONG32;
+
+ //
+ // CPUID Subfunction 1, register EAX
+ //
+
+ VersionInformation: ULONG32;
+
+ //
+ // CPUID Subfunction 1, register EDX
+ //
+
+ FeatureInformation: ULONG32;
+
+ //
+ // CPUID, Subfunction 80000001, register EBX. This will only
+ // be obtained if the vendor id is "AuthenticAMD".
+ //
+
+ AMDExtendedCpuFeatures: ULONG32);
+
+ //
+ // Non-x86 platforms use processor feature flags.
+ //
+
+ 1: (
+ ProcessorFeatures: array [0..1] of ULONG64);
+ end;
+
+ _MINIDUMP_SYSTEM_INFO = record
+
+ //
+ // ProcessorArchitecture, ProcessorLevel and ProcessorRevision are all
+ // taken from the SYSTEM_INFO structure obtained by GetSystemInfo( ).
+ //
+
+ ProcessorArchitecture: USHORT;
+ ProcessorLevel: USHORT;
+ ProcessorRevision: USHORT;
+
+ U: record
+ case Integer of
+ 0: (Reserved0: USHORT);
+ 1: (
+ NumberOfProcessors: UCHAR;
+ ProductType: UCHAR);
+ end;
+
+ //
+ // MajorVersion, MinorVersion, BuildNumber, PlatformId and
+ // CSDVersion are all taken from the OSVERSIONINFO structure
+ // returned by GetVersionEx( ).
+ //
+
+ MajorVersion: ULONG32;
+ MinorVersion: ULONG32;
+ BuildNumber: ULONG32;
+ PlatformId: ULONG32;
+
+ //
+ // RVA to a CSDVersion string in the string table.
+ //
+
+ CSDVersionRva: RVA;
+
+ U2: record
+ case Integer of
+ 0: (Reserved1: ULONG32);
+ 1: (
+ SuiteMask: USHORT;
+ Reserved2: USHORT);
+ end;
+
+ //
+ // CPU information is obtained from one of two places.
+ //
+ // 1) On x86 computers, CPU_INFORMATION is obtained from the CPUID
+ // instruction. You must use the X86 portion of the union for X86
+ // computers.
+ //
+ // 2) On non-x86 architectures, CPU_INFORMATION is obtained by calling
+ // IsProcessorFeatureSupported().
+ //
+
+ Cpu: _CPU_INFORMATION;
+ end;
+ {$EXTERNALSYM _MINIDUMP_SYSTEM_INFO}
+ MINIDUMP_SYSTEM_INFO = _MINIDUMP_SYSTEM_INFO;
+ {$EXTERNALSYM MINIDUMP_SYSTEM_INFO}
+ PMINIDUMP_SYSTEM_INFO = ^MINIDUMP_SYSTEM_INFO;
+ {$EXTERNALSYM PMINIDUMP_SYSTEM_INFO}
+ TMinidumpSystemInfo = MINIDUMP_SYSTEM_INFO;
+ PMinidumpSystemInfo = PMINIDUMP_SYSTEM_INFO;
+
+ CPU_INFORMATION = _CPU_INFORMATION;
+ {$EXTERNALSYM CPU_INFORMATION}
+ PCPU_INFORMATION = CPU_INFORMATION;
+ {$EXTERNALSYM PCPU_INFORMATION}
+
+//
+// The minidump thread contains standard thread
+// information plus an RVA to the memory for this
+// thread and an RVA to the CONTEXT structure for
+// this thread.
+//
+
+//
+// ThreadId must be 4 bytes on all architectures.
+//
+
+// C_ASSERT (sizeof ( ((PPROCESS_INFORMATION)0)->dwThreadId ) == 4);
+
+type
+ PMINIDUMP_THREAD = ^MINIDUMP_THREAD;
+ {$EXTERNALSYM PMINIDUMP_THREAD}
+ _MINIDUMP_THREAD = record
+ ThreadId: ULONG32;
+ SuspendCount: ULONG32;
+ PriorityClass: ULONG32;
+ Priority: ULONG32;
+ Teb: ULONG64;
+ Stack: MINIDUMP_MEMORY_DESCRIPTOR;
+ ThreadContext: MINIDUMP_LOCATION_DESCRIPTOR;
+ end;
+ {$EXTERNALSYM _MINIDUMP_THREAD}
+ MINIDUMP_THREAD = _MINIDUMP_THREAD;
+ {$EXTERNALSYM MINIDUMP_THREAD}
+ TMinidumpThread = MINIDUMP_THREAD;
+ PMinidumpThread = PMINIDUMP_THREAD;
+
+//
+// The thread list is a container of threads.
+//
+
+ PMINIDUMP_THREAD_LIST = ^MINIDUMP_THREAD_LIST;
+ {$EXTERNALSYM PMINIDUMP_THREAD_LIST}
+ _MINIDUMP_THREAD_LIST = record
+ NumberOfThreads: ULONG32;
+ Threads: array [0..0] of MINIDUMP_THREAD;
+ end;
+ {$EXTERNALSYM _MINIDUMP_THREAD_LIST}
+ MINIDUMP_THREAD_LIST = _MINIDUMP_THREAD_LIST;
+ {$EXTERNALSYM MINIDUMP_THREAD_LIST}
+ TMinidumpThreadList = MINIDUMP_THREAD_LIST;
+ PMinidumpThreadList = PMINIDUMP_THREAD_LIST;
+
+ PMINIDUMP_THREAD_EX = ^MINIDUMP_THREAD_EX;
+ {$EXTERNALSYM PMINIDUMP_THREAD_EX}
+ _MINIDUMP_THREAD_EX = record
+ ThreadId: ULONG32;
+ SuspendCount: ULONG32;
+ PriorityClass: ULONG32;
+ Priority: ULONG32;
+ Teb: ULONG64;
+ Stack: MINIDUMP_MEMORY_DESCRIPTOR;
+ ThreadContext: MINIDUMP_LOCATION_DESCRIPTOR;
+ BackingStore: MINIDUMP_MEMORY_DESCRIPTOR;
+ end;
+ {$EXTERNALSYM _MINIDUMP_THREAD_EX}
+ MINIDUMP_THREAD_EX = _MINIDUMP_THREAD_EX;
+ {$EXTERNALSYM MINIDUMP_THREAD_EX}
+ TMinidumpThreadEx = MINIDUMP_THREAD_EX;
+ PMinidumpThreadEx = PMINIDUMP_THREAD_EX;
+
+//
+// The thread list is a container of threads.
+//
+
+ PMINIDUMP_THREAD_EX_LIST = ^MINIDUMP_THREAD_EX_LIST;
+ {$EXTERNALSYM PMINIDUMP_THREAD_EX_LIST}
+ _MINIDUMP_THREAD_EX_LIST = record
+ NumberOfThreads: ULONG32;
+ Threads: array [0..0] of MINIDUMP_THREAD_EX;
+ end;
+ {$EXTERNALSYM _MINIDUMP_THREAD_EX_LIST}
+ MINIDUMP_THREAD_EX_LIST = _MINIDUMP_THREAD_EX_LIST;
+ {$EXTERNALSYM MINIDUMP_THREAD_EX_LIST}
+ TMinidumpThreadExList = MINIDUMP_THREAD_EX_LIST;
+ PMinidumpThreadExList = PMINIDUMP_THREAD_EX_LIST;
+
+//
+// The MINIDUMP_EXCEPTION is the same as EXCEPTION on Win64.
+//
+
+ PMINIDUMP_EXCEPTION = ^MINIDUMP_EXCEPTION;
+ {$EXTERNALSYM PMINIDUMP_EXCEPTION}
+ _MINIDUMP_EXCEPTION = record
+ ExceptionCode: ULONG32;
+ ExceptionFlags: ULONG32;
+ ExceptionRecord: ULONG64;
+ ExceptionAddress: ULONG64;
+ NumberParameters: ULONG32;
+ __unusedAlignment: ULONG32;
+ ExceptionInformation: array [0..EXCEPTION_MAXIMUM_PARAMETERS - 1] of ULONG64;
+ end;
+ {$EXTERNALSYM _MINIDUMP_EXCEPTION}
+ MINIDUMP_EXCEPTION = _MINIDUMP_EXCEPTION;
+ {$EXTERNALSYM MINIDUMP_EXCEPTION}
+ TMinidumpException = MINIDUMP_EXCEPTION;
+ PMinidumpException = PMINIDUMP_EXCEPTION;
+
+//
+// The exception information stream contains the id of the thread that caused
+// the exception (ThreadId), the exception record for the exception
+// (ExceptionRecord) and an RVA to the thread context where the exception
+// occured.
+//
+
+ PMINIDUMP_EXCEPTION_STREAM = ^MINIDUMP_EXCEPTION_STREAM;
+ {$EXTERNALSYM PMINIDUMP_EXCEPTION_STREAM}
+ _MINIDUMP_EXCEPTION_STREAM = record
+ ThreadId: ULONG32;
+ __alignment: ULONG32;
+ ExceptionRecord: MINIDUMP_EXCEPTION;
+ ThreadContext: MINIDUMP_LOCATION_DESCRIPTOR;
+ end;
+ {$EXTERNALSYM _MINIDUMP_EXCEPTION_STREAM}
+ MINIDUMP_EXCEPTION_STREAM = _MINIDUMP_EXCEPTION_STREAM;
+ {$EXTERNALSYM MINIDUMP_EXCEPTION_STREAM}
+ TMinidumpExceptionStream = MINIDUMP_EXCEPTION_STREAM;
+ PMinidumpExceptionStream = PMINIDUMP_EXCEPTION_STREAM;
+
+//
+// The MINIDUMP_MODULE contains information about a
+// a specific module. It includes the CheckSum and
+// the TimeDateStamp for the module so the module
+// can be reloaded during the analysis phase.
+//
+
+ PMINIDUMP_MODULE = ^MINIDUMP_MODULE;
+ {$EXTERNALSYM PMINIDUMP_MODULE}
+ _MINIDUMP_MODULE = record
+ BaseOfImage: ULONG64;
+ SizeOfImage: ULONG32;
+ CheckSum: ULONG32;
+ TimeDateStamp: ULONG32;
+ ModuleNameRva: RVA;
+ VersionInfo: VS_FIXEDFILEINFO;
+ CvRecord: MINIDUMP_LOCATION_DESCRIPTOR;
+ MiscRecord: MINIDUMP_LOCATION_DESCRIPTOR;
+ Reserved0: ULONG64; // Reserved for future use.
+ Reserved1: ULONG64; // Reserved for future use.
+ end;
+ {$EXTERNALSYM _MINIDUMP_MODULE}
+ MINIDUMP_MODULE = _MINIDUMP_MODULE;
+ {$EXTERNALSYM MINIDUMP_MODULE}
+ TMinidumpModule = MINIDUMP_MODULE;
+ PMinidumpModule = PMINIDUMP_MODULE;
+
+//
+// The minidump module list is a container for modules.
+//
+
+ PMINIDUMP_MODULE_LIST = ^MINIDUMP_MODULE_LIST;
+ {$EXTERNALSYM PMINIDUMP_MODULE_LIST}
+ _MINIDUMP_MODULE_LIST = record
+ NumberOfModules: ULONG32;
+ Modules: array [0..0] of MINIDUMP_MODULE;
+ end;
+ {$EXTERNALSYM _MINIDUMP_MODULE_LIST}
+ MINIDUMP_MODULE_LIST = _MINIDUMP_MODULE_LIST;
+ {$EXTERNALSYM MINIDUMP_MODULE_LIST}
+ TMinidumpModuleList = MINIDUMP_MODULE_LIST;
+ PMinidumpModuleList = PMINIDUMP_MODULE_LIST;
+
+//
+// Memory Ranges
+//
+
+ PMINIDUMP_MEMORY_LIST = ^MINIDUMP_MEMORY_LIST;
+ {$EXTERNALSYM PMINIDUMP_MEMORY_LIST}
+ _MINIDUMP_MEMORY_LIST = record
+ NumberOfMemoryRanges: ULONG32;
+ MemoryRanges: array [0..0] of MINIDUMP_MEMORY_DESCRIPTOR;
+ end;
+ {$EXTERNALSYM _MINIDUMP_MEMORY_LIST}
+ MINIDUMP_MEMORY_LIST = _MINIDUMP_MEMORY_LIST;
+ {$EXTERNALSYM MINIDUMP_MEMORY_LIST}
+ TMinidumpMemoryList = MINIDUMP_MEMORY_LIST;
+ PMinidumpMemoryList = PMINIDUMP_MEMORY_LIST;
+
+ PMINIDUMP_MEMORY64_LIST = ^MINIDUMP_MEMORY64_LIST;
+ {$EXTERNALSYM PMINIDUMP_MEMORY64_LIST}
+ _MINIDUMP_MEMORY64_LIST = record
+ NumberOfMemoryRanges: ULONG64;
+ BaseRva: RVA64;
+ MemoryRanges: array [0..0] of MINIDUMP_MEMORY_DESCRIPTOR64;
+ end;
+ {$EXTERNALSYM _MINIDUMP_MEMORY64_LIST}
+ MINIDUMP_MEMORY64_LIST = _MINIDUMP_MEMORY64_LIST;
+ {$EXTERNALSYM MINIDUMP_MEMORY64_LIST}
+ TMinidumpMemory64List = MINIDUMP_MEMORY64_LIST;
+ PMinidumpMemory64List = PMINIDUMP_MEMORY64_LIST;
+
+//
+// Support for user supplied exception information.
+//
+
+ PMINIDUMP_EXCEPTION_INFORMATION = ^MINIDUMP_EXCEPTION_INFORMATION;
+ {$EXTERNALSYM PMINIDUMP_EXCEPTION_INFORMATION}
+ _MINIDUMP_EXCEPTION_INFORMATION = record
+ ThreadId: DWORD;
+ ExceptionPointers: PEXCEPTION_POINTERS;
+ ClientPointers: BOOL;
+ end;
+ {$EXTERNALSYM _MINIDUMP_EXCEPTION_INFORMATION}
+ MINIDUMP_EXCEPTION_INFORMATION = _MINIDUMP_EXCEPTION_INFORMATION;
+ {$EXTERNALSYM MINIDUMP_EXCEPTION_INFORMATION}
+ TMinidumpExceptionInformation = MINIDUMP_EXCEPTION_INFORMATION;
+ PMinidumpExceptionInformation = PMINIDUMP_EXCEPTION_INFORMATION;
+
+//
+// Support for capturing system handle state at the time of the dump.
+//
+
+ PMINIDUMP_HANDLE_DESCRIPTOR = ^MINIDUMP_HANDLE_DESCRIPTOR;
+ {$EXTERNALSYM PMINIDUMP_HANDLE_DESCRIPTOR}
+ _MINIDUMP_HANDLE_DESCRIPTOR = record
+ Handle: ULONG64;
+ TypeNameRva: RVA;
+ ObjectNameRva: RVA;
+ Attributes: ULONG32;
+ GrantedAccess: ULONG32;
+ HandleCount: ULONG32;
+ PointerCount: ULONG32;
+ end;
+ {$EXTERNALSYM _MINIDUMP_HANDLE_DESCRIPTOR}
+ MINIDUMP_HANDLE_DESCRIPTOR = _MINIDUMP_HANDLE_DESCRIPTOR;
+ {$EXTERNALSYM MINIDUMP_HANDLE_DESCRIPTOR}
+ TMinidumpHandleDescriptor = MINIDUMP_HANDLE_DESCRIPTOR;
+ PMinidumpHandleDescriptor = PMINIDUMP_HANDLE_DESCRIPTOR;
+
+ PMINIDUMP_HANDLE_DATA_STREAM = ^MINIDUMP_HANDLE_DATA_STREAM;
+ {$EXTERNALSYM PMINIDUMP_HANDLE_DATA_STREAM}
+ _MINIDUMP_HANDLE_DATA_STREAM = record
+ SizeOfHeader: ULONG32;
+ SizeOfDescriptor: ULONG32;
+ NumberOfDescriptors: ULONG32;
+ Reserved: ULONG32;
+ end;
+ {$EXTERNALSYM _MINIDUMP_HANDLE_DATA_STREAM}
+ MINIDUMP_HANDLE_DATA_STREAM = _MINIDUMP_HANDLE_DATA_STREAM;
+ {$EXTERNALSYM MINIDUMP_HANDLE_DATA_STREAM}
+ TMinidumpHandleDataStream = MINIDUMP_HANDLE_DATA_STREAM;
+ PMinidumpHandleDataStream = PMINIDUMP_HANDLE_DATA_STREAM;
+
+//
+// Support for capturing dynamic function table state at the time of the dump.
+//
+
+ PMINIDUMP_FUNCTION_TABLE_DESCRIPTOR = ^MINIDUMP_FUNCTION_TABLE_DESCRIPTOR;
+ {$EXTERNALSYM PMINIDUMP_FUNCTION_TABLE_DESCRIPTOR}
+ _MINIDUMP_FUNCTION_TABLE_DESCRIPTOR = record
+ MinimumAddress: ULONG64;
+ MaximumAddress: ULONG64;
+ BaseAddress: ULONG64;
+ EntryCount: ULONG32;
+ SizeOfAlignPad: ULONG32;
+ end;
+ {$EXTERNALSYM _MINIDUMP_FUNCTION_TABLE_DESCRIPTOR}
+ MINIDUMP_FUNCTION_TABLE_DESCRIPTOR = _MINIDUMP_FUNCTION_TABLE_DESCRIPTOR;
+ {$EXTERNALSYM MINIDUMP_FUNCTION_TABLE_DESCRIPTOR}
+ TMinidumpFunctionTableDescriptor = MINIDUMP_FUNCTION_TABLE_DESCRIPTOR;
+ PMinidumpFunctionTableDescriptor = PMINIDUMP_FUNCTION_TABLE_DESCRIPTOR;
+
+ PMINIDUMP_FUNCTION_TABLE_STREAM = ^MINIDUMP_FUNCTION_TABLE_STREAM;
+ {$EXTERNALSYM PMINIDUMP_FUNCTION_TABLE_STREAM}
+ _MINIDUMP_FUNCTION_TABLE_STREAM = record
+ SizeOfHeader: ULONG32;
+ SizeOfDescriptor: ULONG32;
+ SizeOfNativeDescriptor: ULONG32;
+ SizeOfFunctionEntry: ULONG32;
+ NumberOfDescriptors: ULONG32;
+ SizeOfAlignPad: ULONG32;
+ end;
+ {$EXTERNALSYM _MINIDUMP_FUNCTION_TABLE_STREAM}
+ MINIDUMP_FUNCTION_TABLE_STREAM = _MINIDUMP_FUNCTION_TABLE_STREAM;
+ {$EXTERNALSYM MINIDUMP_FUNCTION_TABLE_STREAM}
+ TMinidumpFunctionTableStream = MINIDUMP_FUNCTION_TABLE_STREAM;
+ PMinidumpFunctionTableStream = PMINIDUMP_FUNCTION_TABLE_STREAM;
+
+//
+// The MINIDUMP_UNLOADED_MODULE contains information about a
+// a specific module that was previously loaded but no
+// longer is. This can help with diagnosing problems where
+// callers attempt to call code that is no longer loaded.
+//
+
+ _MINIDUMP_UNLOADED_MODULE = record
+ BaseOfImage: ULONG64;
+ SizeOfImage: ULONG32;
+ CheckSum: ULONG32;
+ TimeDateStamp: ULONG32;
+ ModuleNameRva: RVA;
+ end;
+ {$EXTERNALSYM _MINIDUMP_UNLOADED_MODULE}
+ MINIDUMP_UNLOADED_MODULE = _MINIDUMP_UNLOADED_MODULE;
+ {$EXTERNALSYM MINIDUMP_UNLOADED_MODULE}
+ PMINIDUMP_UNLOADED_MODULE = ^MINIDUMP_UNLOADED_MODULE;
+ {$EXTERNALSYM PMINIDUMP_UNLOADED_MODULE}
+ TMiniDumpUnloadedModule = MINIDUMP_UNLOADED_MODULE;
+ PMiniDumpUnloadedModule = PMINIDUMP_UNLOADED_MODULE;
+
+//
+// The minidump unloaded module list is a container for unloaded modules.
+//
+
+ _MINIDUMP_UNLOADED_MODULE_LIST = record
+ SizeOfHeader: ULONG32;
+ SizeOfEntry: ULONG32;
+ NumberOfEntries: ULONG32;
+ end;
+ {$EXTERNALSYM _MINIDUMP_UNLOADED_MODULE_LIST}
+ MINIDUMP_UNLOADED_MODULE_LIST = _MINIDUMP_UNLOADED_MODULE_LIST;
+ {$EXTERNALSYM MINIDUMP_UNLOADED_MODULE_LIST}
+ PMINIDUMP_UNLOADED_MODULE_LIST = ^MINIDUMP_UNLOADED_MODULE_LIST;
+ {$EXTERNALSYM PMINIDUMP_UNLOADED_MODULE_LIST}
+ TMiniDumpUnloadedModuleList = MINIDUMP_UNLOADED_MODULE_LIST;
+ PMiniDumpUnloadedModuleList = PMINIDUMP_UNLOADED_MODULE_LIST;
+
+//
+// The miscellaneous information stream contains a variety
+// of small pieces of information. A member is valid if
+// it's within the available size and its corresponding
+// bit is set.
+//
+
+const
+ MINIDUMP_MISC1_PROCESS_ID = $00000001;
+ {$EXTERNALSYM MINIDUMP_MISC1_PROCESS_ID}
+ MINIDUMP_MISC1_PROCESS_TIMES = $00000002;
+ {$EXTERNALSYM MINIDUMP_MISC1_PROCESS_TIMES}
+
+type
+ _MINIDUMP_MISC_INFO = record
+ SizeOfInfo: ULONG32;
+ Flags1: ULONG32;
+ ProcessId: ULONG32;
+ ProcessCreateTime: ULONG32;
+ ProcessUserTime: ULONG32;
+ ProcessKernelTime: ULONG32;
+ end;
+ {$EXTERNALSYM _MINIDUMP_MISC_INFO}
+ MINIDUMP_MISC_INFO = _MINIDUMP_MISC_INFO;
+ {$EXTERNALSYM MINIDUMP_MISC_INFO}
+ PMINIDUMP_MISC_INFO = ^MINIDUMP_MISC_INFO;
+ {$EXTERNALSYM PMINIDUMP_MISC_INFO}
+ TMiniDumpMiscInfo = MINIDUMP_MISC_INFO;
+ PMiniDumpMiscInfo = PMINIDUMP_MISC_INFO;
+
+//
+// Support for arbitrary user-defined information.
+//
+
+ PMINIDUMP_USER_RECORD = ^MINIDUMP_USER_RECORD;
+ {$EXTERNALSYM PMINIDUMP_USER_RECORD}
+ _MINIDUMP_USER_RECORD = record
+ Type_: ULONG32;
+ Memory: MINIDUMP_LOCATION_DESCRIPTOR;
+ end;
+ {$EXTERNALSYM _MINIDUMP_USER_RECORD}
+ MINIDUMP_USER_RECORD = _MINIDUMP_USER_RECORD;
+ {$EXTERNALSYM MINIDUMP_USER_RECORD}
+ TMinidumpUserRecord = MINIDUMP_USER_RECORD;
+ PMinidumpUserRecord = PMINIDUMP_USER_RECORD;
+
+ PMINIDUMP_USER_STREAM = ^MINIDUMP_USER_STREAM;
+ {$EXTERNALSYM PMINIDUMP_USER_STREAM}
+ _MINIDUMP_USER_STREAM = record
+ Type_: ULONG32;
+ BufferSize: ULONG;
+ Buffer: PVOID;
+ end;
+ {$EXTERNALSYM _MINIDUMP_USER_STREAM}
+ MINIDUMP_USER_STREAM = _MINIDUMP_USER_STREAM;
+ {$EXTERNALSYM MINIDUMP_USER_STREAM}
+ TMinidumpUserStream = MINIDUMP_USER_STREAM;
+ PMinidumpUserStream = PMINIDUMP_USER_STREAM;
+
+ PMINIDUMP_USER_STREAM_INFORMATION = ^MINIDUMP_USER_STREAM_INFORMATION;
+ {$EXTERNALSYM PMINIDUMP_USER_STREAM_INFORMATION}
+ _MINIDUMP_USER_STREAM_INFORMATION = record
+ UserStreamCount: ULONG;
+ UserStreamArray: PMINIDUMP_USER_STREAM;
+ end;
+ {$EXTERNALSYM _MINIDUMP_USER_STREAM_INFORMATION}
+ MINIDUMP_USER_STREAM_INFORMATION = _MINIDUMP_USER_STREAM_INFORMATION;
+ {$EXTERNALSYM MINIDUMP_USER_STREAM_INFORMATION}
+ TMinidumpUserStreamInformation = MINIDUMP_USER_STREAM_INFORMATION;
+ PMinidumpUserStreamInformation = PMINIDUMP_USER_STREAM_INFORMATION;
+
+//
+// Callback support.
+//
+
+ _MINIDUMP_CALLBACK_TYPE = (
+ ModuleCallback,
+ ThreadCallback,
+ ThreadExCallback,
+ IncludeThreadCallback,
+ IncludeModuleCallback);
+ {$EXTERNALSYM _MINIDUMP_CALLBACK_TYPE}
+ MINIDUMP_CALLBACK_TYPE = _MINIDUMP_CALLBACK_TYPE;
+ {$EXTERNALSYM MINIDUMP_CALLBACK_TYPE}
+ TMinidumpCallbackType = MINIDUMP_CALLBACK_TYPE;
+
+ PMINIDUMP_THREAD_CALLBACK = ^MINIDUMP_THREAD_CALLBACK;
+ {$EXTERNALSYM PMINIDUMP_THREAD_CALLBACK}
+ _MINIDUMP_THREAD_CALLBACK = record
+ ThreadId: ULONG;
+ ThreadHandle: HANDLE;
+ Context: CONTEXT;
+ SizeOfContext: ULONG;
+ StackBase: ULONG64;
+ StackEnd: ULONG64;
+ end;
+ {$EXTERNALSYM _MINIDUMP_THREAD_CALLBACK}
+ MINIDUMP_THREAD_CALLBACK = _MINIDUMP_THREAD_CALLBACK;
+ {$EXTERNALSYM MINIDUMP_THREAD_CALLBACK}
+ TMinidumpThreadCallback = MINIDUMP_THREAD_CALLBACK;
+ PMinidumpThreadCallback = PMINIDUMP_THREAD_CALLBACK;
+
+ PMINIDUMP_THREAD_EX_CALLBACK = ^MINIDUMP_THREAD_EX_CALLBACK;
+ {$EXTERNALSYM PMINIDUMP_THREAD_EX_CALLBACK}
+ _MINIDUMP_THREAD_EX_CALLBACK = record
+ ThreadId: ULONG;
+ ThreadHandle: HANDLE;
+ Context: CONTEXT;
+ SizeOfContext: ULONG;
+ StackBase: ULONG64;
+ StackEnd: ULONG64;
+ BackingStoreBase: ULONG64;
+ BackingStoreEnd: ULONG64;
+ end;
+ {$EXTERNALSYM _MINIDUMP_THREAD_EX_CALLBACK}
+ MINIDUMP_THREAD_EX_CALLBACK = _MINIDUMP_THREAD_EX_CALLBACK;
+ {$EXTERNALSYM MINIDUMP_THREAD_EX_CALLBACK}
+ TMinidumpThreadExCallback = MINIDUMP_THREAD_EX_CALLBACK;
+ PMinidumpThreadExCallback = PMINIDUMP_THREAD_EX_CALLBACK;
+
+ PMINIDUMP_INCLUDE_THREAD_CALLBACK = ^MINIDUMP_INCLUDE_THREAD_CALLBACK;
+ {$EXTERNALSYM PMINIDUMP_INCLUDE_THREAD_CALLBACK}
+ _MINIDUMP_INCLUDE_THREAD_CALLBACK = record
+ ThreadId: ULONG;
+ end;
+ {$EXTERNALSYM _MINIDUMP_INCLUDE_THREAD_CALLBACK}
+ MINIDUMP_INCLUDE_THREAD_CALLBACK = _MINIDUMP_INCLUDE_THREAD_CALLBACK;
+ {$EXTERNALSYM MINIDUMP_INCLUDE_THREAD_CALLBACK}
+ TMinidumpIncludeThreadCallback = MINIDUMP_INCLUDE_THREAD_CALLBACK;
+ PMinidumpIncludeThreadCallback = PMINIDUMP_INCLUDE_THREAD_CALLBACK;
+
+const
+ ThreadWriteThread = $0001;
+ {$EXTERNALSYM ThreadWriteThread}
+ ThreadWriteStack = $0002;
+ {$EXTERNALSYM ThreadWriteStack}
+ ThreadWriteContext = $0004;
+ {$EXTERNALSYM ThreadWriteContext}
+ ThreadWriteBackingStore = $0008;
+ {$EXTERNALSYM ThreadWriteBackingStore}
+ ThreadWriteInstructionWindow = $0010;
+ {$EXTERNALSYM ThreadWriteInstructionWindow}
+ ThreadWriteThreadData = $0020;
+ {$EXTERNALSYM ThreadWriteThreadData}
+
+type
+ _THREAD_WRITE_FLAGS = DWORD;
+ {$EXTERNALSYM _THREAD_WRITE_FLAGS}
+ THREAD_WRITE_FLAGS = _THREAD_WRITE_FLAGS;
+ {$EXTERNALSYM THREAD_WRITE_FLAGS}
+ TThreadWriteFlags = THREAD_WRITE_FLAGS;
+
+type
+ PMINIDUMP_MODULE_CALLBACK = ^MINIDUMP_MODULE_CALLBACK;
+ {$EXTERNALSYM PMINIDUMP_MODULE_CALLBACK}
+ _MINIDUMP_MODULE_CALLBACK = record
+ FullPath: PWCHAR;
+ BaseOfImage: ULONG64;
+ SizeOfImage: ULONG;
+ CheckSum: ULONG;
+ TimeDateStamp: ULONG;
+ VersionInfo: VS_FIXEDFILEINFO;
+ CvRecord: PVOID;
+ SizeOfCvRecord: ULONG;
+ MiscRecord: PVOID;
+ SizeOfMiscRecord: ULONG;
+ end;
+ {$EXTERNALSYM _MINIDUMP_MODULE_CALLBACK}
+ MINIDUMP_MODULE_CALLBACK = _MINIDUMP_MODULE_CALLBACK;
+ {$EXTERNALSYM MINIDUMP_MODULE_CALLBACK}
+ TMinidumpModuleCallback = MINIDUMP_MODULE_CALLBACK;
+ PMinidumpModuleCallback = PMINIDUMP_MODULE_CALLBACK;
+
+ PMINIDUMP_INCLUDE_MODULE_CALLBACK = ^MINIDUMP_INCLUDE_MODULE_CALLBACK;
+ {$EXTERNALSYM PMINIDUMP_INCLUDE_MODULE_CALLBACK}
+ _MINIDUMP_INCLUDE_MODULE_CALLBACK = record
+ BaseOfImage: ULONG64;
+ end;
+ {$EXTERNALSYM _MINIDUMP_INCLUDE_MODULE_CALLBACK}
+ MINIDUMP_INCLUDE_MODULE_CALLBACK = _MINIDUMP_INCLUDE_MODULE_CALLBACK;
+ {$EXTERNALSYM MINIDUMP_INCLUDE_MODULE_CALLBACK}
+ TMinidumpIncludeModuleCallback = MINIDUMP_INCLUDE_MODULE_CALLBACK;
+ PMinidumpIncludeModuleCallback = PMINIDUMP_INCLUDE_MODULE_CALLBACK;
+
+const
+ ModuleWriteModule = $0001;
+ {$EXTERNALSYM ModuleWriteModule}
+ ModuleWriteDataSeg = $0002;
+ {$EXTERNALSYM ModuleWriteDataSeg}
+ ModuleWriteMiscRecord = $0004;
+ {$EXTERNALSYM ModuleWriteMiscRecord}
+ ModuleWriteCvRecord = $0008;
+ {$EXTERNALSYM ModuleWriteCvRecord}
+ ModuleReferencedByMemory = $0010;
+ {$EXTERNALSYM ModuleReferencedByMemory}
+
+type
+ _MODULE_WRITE_FLAGS = DWORD;
+ {$EXTERNALSYM _MODULE_WRITE_FLAGS}
+ MODULE_WRITE_FLAGS = _MODULE_WRITE_FLAGS;
+ {$EXTERNALSYM MODULE_WRITE_FLAGS}
+ TModuleWriteFlags = MODULE_WRITE_FLAGS;
+
+ _MINIDUMP_CALLBACK_INPUT = record
+ ProcessId: ULONG;
+ ProcessHandle: HANDLE;
+ CallbackType: ULONG;
+ case Integer of
+ 0: (Thread: MINIDUMP_THREAD_CALLBACK);
+ 1: (ThreadEx: MINIDUMP_THREAD_EX_CALLBACK);
+ 2: (Module: MINIDUMP_MODULE_CALLBACK);
+ 3: (IncludeThread: MINIDUMP_INCLUDE_THREAD_CALLBACK);
+ 4: (IncludeModule: MINIDUMP_INCLUDE_MODULE_CALLBACK);
+ end;
+ {$EXTERNALSYM _MINIDUMP_CALLBACK_INPUT}
+ MINIDUMP_CALLBACK_INPUT = _MINIDUMP_CALLBACK_INPUT;
+ {$EXTERNALSYM MINIDUMP_CALLBACK_INPUT}
+ PMINIDUMP_CALLBACK_INPUT = ^MINIDUMP_CALLBACK_INPUT;
+ {$EXTERNALSYM PMINIDUMP_CALLBACK_INPUT}
+ TminidumpCallbackInput = MINIDUMP_CALLBACK_INPUT;
+
+ PMINIDUMP_CALLBACK_OUTPUT = ^MINIDUMP_CALLBACK_OUTPUT;
+ {$EXTERNALSYM PMINIDUMP_CALLBACK_OUTPUT}
+ _MINIDUMP_CALLBACK_OUTPUT = record
+ case Integer of
+ 0: (ModuleWriteFlags: ULONG);
+ 1: (ThreadWriteFlags: ULONG);
+ end;
+ {$EXTERNALSYM _MINIDUMP_CALLBACK_OUTPUT}
+ MINIDUMP_CALLBACK_OUTPUT = _MINIDUMP_CALLBACK_OUTPUT;
+ {$EXTERNALSYM MINIDUMP_CALLBACK_OUTPUT}
+ TMinidumpCallbackOutput = MINIDUMP_CALLBACK_OUTPUT;
+ PMinidumpCallbackOutput = PMINIDUMP_CALLBACK_OUTPUT;
+
+//
+// A normal minidump contains just the information
+// necessary to capture stack traces for all of the
+// existing threads in a process.
+//
+// A minidump with data segments includes all of the data
+// sections from loaded modules in order to capture
+// global variable contents. This can make the dump much
+// larger if many modules have global data.
+//
+// A minidump with full memory includes all of the accessible
+// memory in the process and can be very large. A minidump
+// with full memory always has the raw memory data at the end
+// of the dump so that the initial structures in the dump can
+// be mapped directly without having to include the raw
+// memory information.
+//
+// Stack and backing store memory can be filtered to remove
+// data unnecessary for stack walking. This can improve
+// compression of stacks and also deletes data that may
+// be private and should not be stored in a dump.
+// Memory can also be scanned to see what modules are
+// referenced by stack and backing store memory to allow
+// omission of other modules to reduce dump size.
+// In either of these modes the ModuleReferencedByMemory flag
+// is set for all modules referenced before the base
+// module callbacks occur.
+//
+// On some operating systems a list of modules that were
+// recently unloaded is kept in addition to the currently
+// loaded module list. This information can be saved in
+// the dump if desired.
+//
+// Stack and backing store memory can be scanned for referenced
+// pages in order to pick up data referenced by locals or other
+// stack memory. This can increase the size of a dump significantly.
+//
+// Module paths may contain undesired information such as user names
+// or other important directory names so they can be stripped. This
+// option reduces the ability to locate the proper image later
+// and should only be used in certain situations.
+//
+// Complete operating system per-process and per-thread information can
+// be gathered and stored in the dump.
+//
+// The virtual address space can be scanned for various types
+// of memory to be included in the dump.
+//
+
+const
+ MiniDumpNormal = $0000;
+ {$EXTERNALSYM MiniDumpNormal}
+ MiniDumpWithDataSegs = $0001;
+ {$EXTERNALSYM MiniDumpWithDataSegs}
+ MiniDumpWithFullMemory = $0002;
+ {$EXTERNALSYM MiniDumpWithFullMemory}
+ MiniDumpWithHandleData = $0004;
+ {$EXTERNALSYM MiniDumpWithHandleData}
+ MiniDumpFilterMemory = $0008;
+ {$EXTERNALSYM MiniDumpFilterMemory}
+ MiniDumpScanMemory = $0010;
+ {$EXTERNALSYM MiniDumpScanMemory}
+ MiniDumpWithUnloadedModules = $0020;
+ {$EXTERNALSYM MiniDumpWithUnloadedModules}
+ MiniDumpWithIndirectlyReferencedMemory = $0040;
+ {$EXTERNALSYM MiniDumpWithIndirectlyReferencedMemory}
+ MiniDumpFilterModulePaths = $0080;
+ {$EXTERNALSYM MiniDumpFilterModulePaths}
+ MiniDumpWithProcessThreadData = $0100;
+ {$EXTERNALSYM MiniDumpWithProcessThreadData}
+ MiniDumpWithPrivateReadWriteMemory = $0200;
+ {$EXTERNALSYM MiniDumpWithPrivateReadWriteMemory}
+
+type
+ _MINIDUMP_TYPE = DWORD;
+ {$EXTERNALSYM _MINIDUMP_TYPE}
+ MINIDUMP_TYPE = _MINIDUMP_TYPE;
+ {$EXTERNALSYM MINIDUMP_TYPE}
+ TMinidumpType = MINIDUMP_TYPE;
+
+//
+// The minidump callback should modify the FieldsToWrite parameter to reflect
+// what portions of the specified thread or module should be written to the
+// file.
+//
+
+ MINIDUMP_CALLBACK_ROUTINE = function(CallbackParam: PVOID; CallbackInput: PMINIDUMP_CALLBACK_INPUT;
+ CallbackOutput: PMINIDUMP_CALLBACK_OUTPUT): BOOL; stdcall;
+ {$EXTERNALSYM MINIDUMP_CALLBACK_ROUTINE}
+ TMinidumpCallbackRoutine = MINIDUMP_CALLBACK_ROUTINE;
+
+ PMINIDUMP_CALLBACK_INFORMATION = ^MINIDUMP_CALLBACK_INFORMATION;
+ {$EXTERNALSYM PMINIDUMP_CALLBACK_INFORMATION}
+ _MINIDUMP_CALLBACK_INFORMATION = record
+ CallbackRoutine: MINIDUMP_CALLBACK_ROUTINE;
+ CallbackParam: PVOID;
+ end;
+ {$EXTERNALSYM _MINIDUMP_CALLBACK_INFORMATION}
+ MINIDUMP_CALLBACK_INFORMATION = _MINIDUMP_CALLBACK_INFORMATION;
+ {$EXTERNALSYM MINIDUMP_CALLBACK_INFORMATION}
+ TMinidumpCallbackInformation = MINIDUMP_CALLBACK_INFORMATION;
+ PMinidumpCallbackInformation = PMINIDUMP_CALLBACK_INFORMATION;
+
+//++
+//
+// PVOID
+// RVA_TO_ADDR(
+// PVOID Mapping,
+// ULONG Rva
+// )
+//
+// Routine Description:
+//
+// Map an RVA that is contained within a mapped file to it's associated
+// flat address.
+//
+// Arguments:
+//
+// Mapping - Base address of mapped file containing the RVA.
+//
+// Rva - An Rva to fixup.
+//
+// Return Values:
+//
+// A pointer to the desired data.
+//
+//--
+
+function RVA_TO_ADDR(Mapping, Rva: Pointer): Pointer;
+{$EXTERNALSYM RVA_TO_ADDR}
+
+function MiniDumpWriteDump(hProcess: HANDLE; ProcessId: DWORD; hFile: HANDLE; DumpType: MINIDUMP_TYPE; ExceptionParam: PMINIDUMP_EXCEPTION_INFORMATION; UserStreamParam: PMINIDUMP_USER_STREAM_INFORMATION; CallbackParam: PMINIDUMP_CALLBACK_INFORMATION): BOOL; stdcall;
+{$EXTERNALSYM MiniDumpWriteDump}
+
+function MiniDumpReadDumpStream(BaseOfDump: PVOID; StreamNumber: ULONG; var Dir: PMINIDUMP_DIRECTORY; var StreamPointer: PVOID; var StreamSize: ULONG): BOOL; stdcall;
+{$EXTERNALSYM MiniDumpReadDumpStream}
+
+implementation
+
+const
+ ImageHlpLib = 'imagehlp.dll';
+ {$IFDEF UNICODE}
+ AWSuffix = 'W';
+ {$ELSE}
+ AWSuffix = 'A';
+ {$ENDIF UNICODE}
+
+procedure Address32To64(a32: LPADDRESS; a64: LPADDRESS64);
+begin
+ a64^.Offset := {ULONG64(LONG64(LONG(}a32^.Offset{)))};
+ a64^.Segment := a32^.Segment;
+ a64^.Mode := a32^.Mode;
+end;
+
+procedure Address64To32(a64: LPADDRESS64; a32: LPADDRESS);
+begin
+ a32^.Offset := ULONG(a64^.Offset);
+ a32^.Segment := a64^.Segment;
+ a32^.Mode := a64^.Mode;
+end;
+
+procedure KdHelp32To64(p32: PKDHELP; p64: PKDHELP64);
+begin
+ p64^.Thread := p32^.Thread;
+ p64^.ThCallbackStack := p32^.ThCallbackStack;
+ p64^.NextCallback := p32^.NextCallback;
+ p64^.FramePointer := p32^.FramePointer;
+ p64^.KiCallUserMode := p32^.KiCallUserMode;
+ p64^.KeUserCallbackDispatcher := p32^.KeUserCallbackDispatcher;
+ p64^.SystemRangeStart := p32^.SystemRangeStart;
+end;
+
+function RVA_TO_ADDR(Mapping, Rva: Pointer): Pointer;
+begin
+ Result := Pointer(Cardinal(Mapping) + Cardinal(Rva));
+end;
+
+{$IFDEF DYNAMIC_LINK}
+
+var
+ _BindImage: Pointer;
+
+function BindImage;
+begin
+ GetProcedureAddress(_BindImage, ImageHlpLib, 'BindImage');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_BindImage]
+ end;
+end;
+
+var
+ _BindImageEx: Pointer;
+
+function BindImageEx;
+begin
+ GetProcedureAddress(_BindImageEx, ImageHlpLib, 'BindImageEx');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_BindImageEx]
+ end;
+end;
+
+var
+ _ReBaseImage: Pointer;
+
+function ReBaseImage;
+begin
+ GetProcedureAddress(_ReBaseImage, ImageHlpLib, 'ReBaseImage');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ReBaseImage]
+ end;
+end;
+
+var
+ _ReBaseImage64: Pointer;
+
+function ReBaseImage64;
+begin
+ GetProcedureAddress(_ReBaseImage64, ImageHlpLib, 'ReBaseImage64');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ReBaseImage64]
+ end;
+end;
+
+var
+ _CheckSumMappedFile: Pointer;
+
+function CheckSumMappedFile;
+begin
+ GetProcedureAddress(_CheckSumMappedFile, ImageHlpLib, 'CheckSumMappedFile');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CheckSumMappedFile]
+ end;
+end;
+
+var
+ _MapFileAndCheckSumA: Pointer;
+
+function MapFileAndCheckSumA;
+begin
+ GetProcedureAddress(_MapFileAndCheckSumA, ImageHlpLib, 'MapFileAndCheckSumA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MapFileAndCheckSumA]
+ end;
+end;
+
+var
+ _MapFileAndCheckSumW: Pointer;
+
+function MapFileAndCheckSumW;
+begin
+ GetProcedureAddress(_MapFileAndCheckSumW, ImageHlpLib, 'MapFileAndCheckSumW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MapFileAndCheckSumW]
+ end;
+end;
+
+var
+ _MapFileAndCheckSum: Pointer;
+
+function MapFileAndCheckSum;
+begin
+ GetProcedureAddress(_MapFileAndCheckSum, ImageHlpLib, 'MapFileAndCheckSum' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MapFileAndCheckSum]
+ end;
+end;
+
+var
+ _GetImageConfigInformation: Pointer;
+
+function GetImageConfigInformation;
+begin
+ GetProcedureAddress(_GetImageConfigInformation, ImageHlpLib, 'GetImageConfigInformation');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetImageConfigInformation]
+ end;
+end;
+
+var
+ _GetImageUnusedHeaderBytes: Pointer;
+
+function GetImageUnusedHeaderBytes;
+begin
+ GetProcedureAddress(_GetImageUnusedHeaderBytes, ImageHlpLib, 'GetImageUnusedHeaderBytes');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetImageUnusedHeaderBytes]
+ end;
+end;
+
+var
+ _SetImageConfigInformation: Pointer;
+
+function SetImageConfigInformation;
+begin
+ GetProcedureAddress(_SetImageConfigInformation, ImageHlpLib, 'SetImageConfigInformation');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetImageConfigInformation]
+ end;
+end;
+
+var
+ _ImageGetDigestStream: Pointer;
+
+function ImageGetDigestStream;
+begin
+ GetProcedureAddress(_ImageGetDigestStream, ImageHlpLib, 'ImageGetDigestStream');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ImageGetDigestStream]
+ end;
+end;
+
+var
+ _ImageAddCertificate: Pointer;
+
+function ImageAddCertificate;
+begin
+ GetProcedureAddress(_ImageAddCertificate, ImageHlpLib, 'ImageAddCertificate');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ImageAddCertificate]
+ end;
+end;
+
+var
+ _ImageRemoveCertificate: Pointer;
+
+function ImageRemoveCertificate;
+begin
+ GetProcedureAddress(_ImageRemoveCertificate, ImageHlpLib, 'ImageRemoveCertificate');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ImageRemoveCertificate]
+ end;
+end;
+
+var
+ _ImageEnumerateCertificates: Pointer;
+
+function ImageEnumerateCertificates;
+begin
+ GetProcedureAddress(_ImageEnumerateCertificates, ImageHlpLib, 'ImageEnumerateCertificates');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ImageEnumerateCertificates]
+ end;
+end;
+
+var
+ _ImageGetCertificateData: Pointer;
+
+function ImageGetCertificateData;
+begin
+ GetProcedureAddress(_ImageGetCertificateData, ImageHlpLib, 'ImageGetCertificateData');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ImageGetCertificateData]
+ end;
+end;
+
+var
+ _ImageGetCertificateHeader: Pointer;
+
+function ImageGetCertificateHeader;
+begin
+ GetProcedureAddress(_ImageGetCertificateHeader, ImageHlpLib, 'ImageGetCertificateHeader');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ImageGetCertificateHeader]
+ end;
+end;
+
+var
+ _ImageLoad: Pointer;
+
+function ImageLoad;
+begin
+ GetProcedureAddress(_ImageLoad, ImageHlpLib, 'ImageLoad');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ImageLoad]
+ end;
+end;
+
+var
+ _ImageUnload: Pointer;
+
+function ImageUnload;
+begin
+ GetProcedureAddress(_ImageUnload, ImageHlpLib, 'ImageUnload');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ImageUnload]
+ end;
+end;
+
+var
+ _MapAndLoad: Pointer;
+
+function MapAndLoad;
+begin
+ GetProcedureAddress(_MapAndLoad, ImageHlpLib, 'MapAndLoad');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MapAndLoad]
+ end;
+end;
+
+var
+ _UnMapAndLoad: Pointer;
+
+function UnMapAndLoad;
+begin
+ GetProcedureAddress(_UnMapAndLoad, ImageHlpLib, 'UnMapAndLoad');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_UnMapAndLoad]
+ end;
+end;
+
+var
+ _TouchFileTimes: Pointer;
+
+function TouchFileTimes;
+begin
+ GetProcedureAddress(_TouchFileTimes, ImageHlpLib, 'TouchFileTimes');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_TouchFileTimes]
+ end;
+end;
+
+var
+ _SplitSymbols: Pointer;
+
+function SplitSymbols;
+begin
+ GetProcedureAddress(_SplitSymbols, ImageHlpLib, 'SplitSymbols');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SplitSymbols]
+ end;
+end;
+
+var
+ _UpdateDebugInfoFile: Pointer;
+
+function UpdateDebugInfoFile;
+begin
+ GetProcedureAddress(_UpdateDebugInfoFile, ImageHlpLib, 'UpdateDebugInfoFile');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_UpdateDebugInfoFile]
+ end;
+end;
+
+var
+ _UpdateDebugInfoFileEx: Pointer;
+
+function UpdateDebugInfoFileEx;
+begin
+ GetProcedureAddress(_UpdateDebugInfoFileEx, ImageHlpLib, 'UpdateDebugInfoFileEx');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_UpdateDebugInfoFileEx]
+ end;
+end;
+
+var
+ _FindDebugInfoFile: Pointer;
+
+function FindDebugInfoFile;
+begin
+ GetProcedureAddress(_FindDebugInfoFile, ImageHlpLib, 'FindDebugInfoFile');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_FindDebugInfoFile]
+ end;
+end;
+
+var
+ _FindDebugInfoFileEx: Pointer;
+
+function FindDebugInfoFileEx;
+begin
+ GetProcedureAddress(_FindDebugInfoFileEx, ImageHlpLib, 'FindDebugInfoFileEx');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_FindDebugInfoFileEx]
+ end;
+end;
+
+var
+ _SymFindFileInPath: Pointer;
+
+function SymFindFileInPath;
+begin
+ GetProcedureAddress(_SymFindFileInPath, ImageHlpLib, 'SymFindFileInPath');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SymFindFileInPath]
+ end;
+end;
+
+var
+ _FindExecutableImage: Pointer;
+
+function FindExecutableImage;
+begin
+ GetProcedureAddress(_FindExecutableImage, ImageHlpLib, 'FindExecutableImage');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_FindExecutableImage]
+ end;
+end;
+
+var
+ _FindExecutableImageEx: Pointer;
+
+function FindExecutableImageEx;
+begin
+ GetProcedureAddress(_FindExecutableImageEx, ImageHlpLib, 'FindExecutableImageEx');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_FindExecutableImageEx]
+ end;
+end;
+
+var
+ _ImageNtHeader: Pointer;
+
+function ImageNtHeader;
+begin
+ GetProcedureAddress(_ImageNtHeader, ImageHlpLib, 'ImageNtHeader');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ImageNtHeader]
+ end;
+end;
+
+var
+ _ImageDirectoryEntryToDataEx: Pointer;
+
+function ImageDirectoryEntryToDataEx;
+begin
+ GetProcedureAddress(_ImageDirectoryEntryToDataEx, ImageHlpLib, 'ImageDirectoryEntryToDataEx');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ImageDirectoryEntryToDataEx]
+ end;
+end;
+
+var
+ _ImageDirectoryEntryToData: Pointer;
+
+function ImageDirectoryEntryToData;
+begin
+ GetProcedureAddress(_ImageDirectoryEntryToData, ImageHlpLib, 'ImageDirectoryEntryToData');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ImageDirectoryEntryToData]
+ end;
+end;
+
+var
+ _ImageRvaToSection: Pointer;
+
+function ImageRvaToSection;
+begin
+ GetProcedureAddress(_ImageRvaToSection, ImageHlpLib, 'ImageRvaToSection');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ImageRvaToSection]
+ end;
+end;
+
+var
+ _ImageRvaToVa: Pointer;
+
+function ImageRvaToVa;
+begin
+ GetProcedureAddress(_ImageRvaToVa, ImageHlpLib, 'ImageRvaToVa');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ImageRvaToVa]
+ end;
+end;
+
+var
+ _MapDebugInformation: Pointer;
+
+function MapDebugInformation;
+begin
+ GetProcedureAddress(_MapDebugInformation, ImageHlpLib, 'MapDebugInformation');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MapDebugInformation]
+ end;
+end;
+
+var
+ _UnmapDebugInformation: Pointer;
+
+function UnmapDebugInformation;
+begin
+ GetProcedureAddress(_UnmapDebugInformation, ImageHlpLib, 'UnmapDebugInformation');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_UnmapDebugInformation]
+ end;
+end;
+
+var
+ _SearchTreeForFile: Pointer;
+
+function SearchTreeForFile;
+begin
+ GetProcedureAddress(_SearchTreeForFile, ImageHlpLib, 'SearchTreeForFile');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SearchTreeForFile]
+ end;
+end;
+
+var
+ _EnumDirTree: Pointer;
+
+function EnumDirTree;
+begin
+ GetProcedureAddress(_EnumDirTree, ImageHlpLib, 'EnumDirTree');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_EnumDirTree]
+ end;
+end;
+
+var
+ _MakeSureDirectoryPathExists: Pointer;
+
+function MakeSureDirectoryPathExists;
+begin
+ GetProcedureAddress(_MakeSureDirectoryPathExists, ImageHlpLib, 'MakeSureDirectoryPathExists');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MakeSureDirectoryPathExists]
+ end;
+end;
+
+var
+ _UnDecorateSymbolName: Pointer;
+
+function UnDecorateSymbolName;
+begin
+ GetProcedureAddress(_UnDecorateSymbolName, ImageHlpLib, 'UnDecorateSymbolName');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_UnDecorateSymbolName]
+ end;
+end;
+
+var
+ _StackWalk64: Pointer;
+
+function StackWalk64;
+begin
+ GetProcedureAddress(_StackWalk64, ImageHlpLib, 'StackWalk64');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_StackWalk64]
+ end;
+end;
+
+var
+ _StackWalk: Pointer;
+
+function StackWalk;
+begin
+ GetProcedureAddress(_StackWalk, ImageHlpLib, 'StackWalk');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_StackWalk]
+ end;
+end;
+
+var
+ _ImagehlpApiVersion: Pointer;
+
+function ImagehlpApiVersion;
+begin
+ GetProcedureAddress(_ImagehlpApiVersion, ImageHlpLib, 'ImagehlpApiVersion');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ImagehlpApiVersion]
+ end;
+end;
+
+var
+ _ImagehlpApiVersionEx: Pointer;
+
+function ImagehlpApiVersionEx;
+begin
+ GetProcedureAddress(_ImagehlpApiVersionEx, ImageHlpLib, 'ImagehlpApiVersionEx');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ImagehlpApiVersionEx]
+ end;
+end;
+
+var
+ _GetTimestampForLoadedLibrary: Pointer;
+
+function GetTimestampForLoadedLibrary;
+begin
+ GetProcedureAddress(_GetTimestampForLoadedLibrary, ImageHlpLib, 'GetTimestampForLoadedLibrary');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetTimestampForLoadedLibrary]
+ end;
+end;
+
+var
+ _SymSetOptions: Pointer;
+
+function SymSetOptions;
+begin
+ GetProcedureAddress(_SymSetOptions, ImageHlpLib, 'SymSetOptions');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SymSetOptions]
+ end;
+end;
+
+var
+ _SymGetOptions: Pointer;
+
+function SymGetOptions;
+begin
+ GetProcedureAddress(_SymGetOptions, ImageHlpLib, 'SymGetOptions');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SymGetOptions]
+ end;
+end;
+
+var
+ _SymCleanup: Pointer;
+
+function SymCleanup;
+begin
+ GetProcedureAddress(_SymCleanup, ImageHlpLib, 'SymCleanup');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SymCleanup]
+ end;
+end;
+
+var
+ _SymMatchString: Pointer;
+
+function SymMatchString;
+begin
+ GetProcedureAddress(_SymMatchString, ImageHlpLib, 'SymMatchString');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SymMatchString]
+ end;
+end;
+
+var
+ _SymEnumSourceFiles: Pointer;
+
+function SymEnumSourceFiles;
+begin
+ GetProcedureAddress(_SymEnumSourceFiles, ImageHlpLib, 'SymEnumSourceFiles');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SymEnumSourceFiles]
+ end;
+end;
+
+var
+ _SymEnumerateModules64: Pointer;
+
+function SymEnumerateModules64;
+begin
+ GetProcedureAddress(_SymEnumerateModules64, ImageHlpLib, 'SymEnumerateModules64');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SymEnumerateModules64]
+ end;
+end;
+
+var
+ _SymEnumerateModules: Pointer;
+
+function SymEnumerateModules;
+begin
+ GetProcedureAddress(_SymEnumerateModules, ImageHlpLib, 'SymEnumerateModules');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SymEnumerateModules]
+ end;
+end;
+
+var
+ _SymEnumerateSymbols64: Pointer;
+
+function SymEnumerateSymbols64;
+begin
+ GetProcedureAddress(_SymEnumerateSymbols64, ImageHlpLib, 'SymEnumerateSymbols64');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SymEnumerateSymbols64]
+ end;
+end;
+
+var
+ _SymEnumerateSymbolsW64: Pointer;
+
+function SymEnumerateSymbolsW64;
+begin
+ GetProcedureAddress(_SymEnumerateSymbolsW64, ImageHlpLib, 'SymEnumerateSymbolsW64');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SymEnumerateSymbolsW64]
+ end;
+end;
+
+var
+ _SymEnumerateSymbols: Pointer;
+
+function SymEnumerateSymbols;
+begin
+ GetProcedureAddress(_SymEnumerateSymbols, ImageHlpLib, 'SymEnumerateSymbols');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SymEnumerateSymbols]
+ end;
+end;
+
+var
+ _SymEnumerateSymbolsW: Pointer;
+
+function SymEnumerateSymbolsW;
+begin
+ GetProcedureAddress(_SymEnumerateSymbolsW, ImageHlpLib, 'SymEnumerateSymbolsW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SymEnumerateSymbolsW]
+ end;
+end;
+
+var
+ _EnumerateLoadedModules64: Pointer;
+
+function EnumerateLoadedModules64;
+begin
+ GetProcedureAddress(_EnumerateLoadedModules64, ImageHlpLib, 'EnumerateLoadedModules64');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_EnumerateLoadedModules64]
+ end;
+end;
+
+var
+ _EnumerateLoadedModules: Pointer;
+
+function EnumerateLoadedModules;
+begin
+ GetProcedureAddress(_EnumerateLoadedModules, ImageHlpLib, 'EnumerateLoadedModules');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_EnumerateLoadedModules]
+ end;
+end;
+
+var
+ _SymFunctionTableAccess64: Pointer;
+
+function SymFunctionTableAccess64;
+begin
+ GetProcedureAddress(_SymFunctionTableAccess64, ImageHlpLib, 'SymFunctionTableAccess64');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SymFunctionTableAccess64]
+ end;
+end;
+
+var
+ _SymFunctionTableAccess: Pointer;
+
+function SymFunctionTableAccess;
+begin
+ GetProcedureAddress(_SymFunctionTableAccess, ImageHlpLib, 'SymFunctionTableAccess');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SymFunctionTableAccess]
+ end;
+end;
+
+var
+ _SymGetModuleInfo64: Pointer;
+
+function SymGetModuleInfo64;
+begin
+ GetProcedureAddress(_SymGetModuleInfo64, ImageHlpLib, 'SymGetModuleInfo64');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SymGetModuleInfo64]
+ end;
+end;
+
+var
+ _SymGetModuleInfoW64: Pointer;
+
+function SymGetModuleInfoW64;
+begin
+ GetProcedureAddress(_SymGetModuleInfoW64, ImageHlpLib, 'SymGetModuleInfoW64');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SymGetModuleInfoW64]
+ end;
+end;
+
+var
+ _SymGetModuleInfo: Pointer;
+
+function SymGetModuleInfo;
+begin
+ GetProcedureAddress(_SymGetModuleInfo, ImageHlpLib, 'SymGetModuleInfo');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SymGetModuleInfo]
+ end;
+end;
+
+var
+ _SymGetModuleInfoW: Pointer;
+
+function SymGetModuleInfoW;
+begin
+ GetProcedureAddress(_SymGetModuleInfoW, ImageHlpLib, 'SymGetModuleInfoW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SymGetModuleInfoW]
+ end;
+end;
+
+var
+ _SymGetModuleBase64: Pointer;
+
+function SymGetModuleBase64;
+begin
+ GetProcedureAddress(_SymGetModuleBase64, ImageHlpLib, 'SymGetModuleBase64');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SymGetModuleBase64]
+ end;
+end;
+
+var
+ _SymGetModuleBase: Pointer;
+
+function SymGetModuleBase;
+begin
+ GetProcedureAddress(_SymGetModuleBase, ImageHlpLib, 'SymGetModuleBase');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SymGetModuleBase]
+ end;
+end;
+
+var
+ _SymGetSymNext64: Pointer;
+
+function SymGetSymNext64;
+begin
+ GetProcedureAddress(_SymGetSymNext64, ImageHlpLib, 'SymGetSymNext64');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SymGetSymNext64]
+ end;
+end;
+
+var
+ _SymGetSymNext: Pointer;
+
+function SymGetSymNext;
+begin
+ GetProcedureAddress(_SymGetSymNext, ImageHlpLib, 'SymGetSymNext');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SymGetSymNext]
+ end;
+end;
+
+var
+ _SymGetSymPrev64: Pointer;
+
+function SymGetSymPrev64;
+begin
+ GetProcedureAddress(_SymGetSymPrev64, ImageHlpLib, 'SymGetSymPrev64');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SymGetSymPrev64]
+ end;
+end;
+
+var
+ _SymGetSymPrev: Pointer;
+
+function SymGetSymPrev;
+begin
+ GetProcedureAddress(_SymGetSymPrev, ImageHlpLib, 'SymGetSymPrev');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SymGetSymPrev]
+ end;
+end;
+
+var
+ _SymGetLineFromAddr64: Pointer;
+
+function SymGetLineFromAddr64;
+begin
+ GetProcedureAddress(_SymGetLineFromAddr64, ImageHlpLib, 'SymGetLineFromAddr64');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SymGetLineFromAddr64]
+ end;
+end;
+
+var
+ _SymGetLineFromAddr: Pointer;
+
+function SymGetLineFromAddr;
+begin
+ GetProcedureAddress(_SymGetLineFromAddr, ImageHlpLib, 'SymGetLineFromAddr');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SymGetLineFromAddr]
+ end;
+end;
+
+var
+ _SymGetLineFromName64: Pointer;
+
+function SymGetLineFromName64;
+begin
+ GetProcedureAddress(_SymGetLineFromName64, ImageHlpLib, 'SymGetLineFromName64');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SymGetLineFromName64]
+ end;
+end;
+
+var
+ _SymGetLineFromName: Pointer;
+
+function SymGetLineFromName;
+begin
+ GetProcedureAddress(_SymGetLineFromName, ImageHlpLib, 'SymGetLineFromName');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SymGetLineFromName]
+ end;
+end;
+
+var
+ _SymGetLineNext64: Pointer;
+
+function SymGetLineNext64;
+begin
+ GetProcedureAddress(_SymGetLineNext64, ImageHlpLib, 'SymGetLineNext64');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SymGetLineNext64]
+ end;
+end;
+
+var
+ _SymGetLineNext: Pointer;
+
+function SymGetLineNext;
+begin
+ GetProcedureAddress(_SymGetLineNext, ImageHlpLib, 'SymGetLineNext');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SymGetLineNext]
+ end;
+end;
+
+var
+ _SymGetLinePrev64: Pointer;
+
+function SymGetLinePrev64;
+begin
+ GetProcedureAddress(_SymGetLinePrev64, ImageHlpLib, 'SymGetLinePrev64');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SymGetLinePrev64]
+ end;
+end;
+
+var
+ _SymGetLinePrev: Pointer;
+
+function SymGetLinePrev;
+begin
+ GetProcedureAddress(_SymGetLinePrev, ImageHlpLib, 'SymGetLinePrev');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SymGetLinePrev]
+ end;
+end;
+
+var
+ _SymMatchFileName: Pointer;
+
+function SymMatchFileName;
+begin
+ GetProcedureAddress(_SymMatchFileName, ImageHlpLib, 'SymMatchFileName');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SymMatchFileName]
+ end;
+end;
+
+var
+ _SymInitialize: Pointer;
+
+function SymInitialize;
+begin
+ GetProcedureAddress(_SymInitialize, ImageHlpLib, 'SymInitialize');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SymInitialize]
+ end;
+end;
+
+var
+ _SymGetSearchPath: Pointer;
+
+function SymGetSearchPath;
+begin
+ GetProcedureAddress(_SymGetSearchPath, ImageHlpLib, 'SymGetSearchPath');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SymGetSearchPath]
+ end;
+end;
+
+var
+ _SymSetSearchPath: Pointer;
+
+function SymSetSearchPath;
+begin
+ GetProcedureAddress(_SymSetSearchPath, ImageHlpLib, 'SymSetSearchPath');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SymSetSearchPath]
+ end;
+end;
+
+var
+ _SymLoadModuleEx: Pointer;
+
+function SymLoadModuleEx;
+begin
+ GetProcedureAddress(_SymLoadModuleEx, ImageHlpLib, 'SymLoadModuleEx');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SymLoadModuleEx]
+ end;
+end;
+
+var
+ _SymLoadModule64: Pointer;
+
+function SymLoadModule64;
+begin
+ GetProcedureAddress(_SymLoadModule64, ImageHlpLib, 'SymLoadModule64');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SymLoadModule64]
+ end;
+end;
+
+var
+ _SymLoadModule: Pointer;
+
+function SymLoadModule;
+begin
+ GetProcedureAddress(_SymLoadModule, ImageHlpLib, 'SymLoadModule');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SymLoadModule]
+ end;
+end;
+
+var
+ _SymUnloadModule64: Pointer;
+
+function SymUnloadModule64;
+begin
+ GetProcedureAddress(_SymUnloadModule64, ImageHlpLib, 'SymUnloadModule64');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SymUnloadModule64]
+ end;
+end;
+
+var
+ _SymUnloadModule: Pointer;
+
+function SymUnloadModule;
+begin
+ GetProcedureAddress(_SymUnloadModule, ImageHlpLib, 'SymUnloadModule');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SymUnloadModule]
+ end;
+end;
+
+var
+ _SymUnDName64: Pointer;
+
+function SymUnDName64;
+begin
+ GetProcedureAddress(_SymUnDName64, ImageHlpLib, 'SymUnDName64');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SymUnDName64]
+ end;
+end;
+
+var
+ _SymUnDName: Pointer;
+
+function SymUnDName;
+begin
+ GetProcedureAddress(_SymUnDName, ImageHlpLib, 'SymUnDName');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SymUnDName]
+ end;
+end;
+
+var
+ _SymRegisterCallback64: Pointer;
+
+function SymRegisterCallback64;
+begin
+ GetProcedureAddress(_SymRegisterCallback64, ImageHlpLib, 'SymRegisterCallback64');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SymRegisterCallback64]
+ end;
+end;
+
+var
+ _SymRegFuncEntryCallback64: Pointer;
+
+function SymRegisterFunctionEntryCallback64;
+begin
+ GetProcedureAddress(_SymRegFuncEntryCallback64, ImageHlpLib, 'SymRegisterFunctionEntryCallback64');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SymRegFuncEntryCallback64]
+ end;
+end;
+
+var
+ _SymRegisterCallback: Pointer;
+
+function SymRegisterCallback;
+begin
+ GetProcedureAddress(_SymRegisterCallback, ImageHlpLib, 'SymRegisterCallback');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SymRegisterCallback]
+ end;
+end;
+
+var
+ _SymRegisterFuncEntryCallback: Pointer;
+
+function SymRegisterFunctionEntryCallback;
+begin
+ GetProcedureAddress(_SymRegisterFuncEntryCallback, ImageHlpLib, 'SymRegisterFunctionEntryCallback');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SymRegisterFuncEntryCallback]
+ end;
+end;
+
+var
+ _SymSetContext: Pointer;
+
+function SymSetContext;
+begin
+ GetProcedureAddress(_SymSetContext, ImageHlpLib, 'SymSetContext');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SymSetContext]
+ end;
+end;
+
+var
+ _SymFromAddr: Pointer;
+
+function SymFromAddr;
+begin
+ GetProcedureAddress(_SymFromAddr, ImageHlpLib, 'SymFromAddr');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SymFromAddr]
+ end;
+end;
+
+var
+ _SymFromName: Pointer;
+
+function SymFromName;
+begin
+ GetProcedureAddress(_SymFromName, ImageHlpLib, 'SymFromName');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SymFromName]
+ end;
+end;
+
+var
+ _SymEnumSymbolsForAddr: Pointer;
+
+function SymEnumSymbolsForAddr;
+begin
+ GetProcedureAddress(_SymEnumSymbolsForAddr, ImageHlpLib, 'SymEnumSymbolsForAddr');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SymEnumSymbolsForAddr]
+ end;
+end;
+
+var
+ _SymEnumSymbols: Pointer;
+
+function SymEnumSymbols;
+begin
+ GetProcedureAddress(_SymEnumSymbols, ImageHlpLib, 'SymEnumSymbols');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SymEnumSymbols]
+ end;
+end;
+
+var
+ _SymGetTypeInfo: Pointer;
+
+function SymGetTypeInfo;
+begin
+ GetProcedureAddress(_SymGetTypeInfo, ImageHlpLib, 'SymGetTypeInfo');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SymGetTypeInfo]
+ end;
+end;
+
+var
+ _SymEnumTypes: Pointer;
+
+function SymEnumTypes;
+begin
+ GetProcedureAddress(_SymEnumTypes, ImageHlpLib, 'SymEnumTypes');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SymEnumTypes]
+ end;
+end;
+
+var
+ _SymGetTypeFromName: Pointer;
+
+function SymGetTypeFromName;
+begin
+ GetProcedureAddress(_SymGetTypeFromName, ImageHlpLib, 'SymGetTypeFromName');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SymGetTypeFromName]
+ end;
+end;
+
+var
+ _SymAddSymbol: Pointer;
+
+function SymAddSymbol;
+begin
+ GetProcedureAddress(_SymAddSymbol, ImageHlpLib, 'SymAddSymbol');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SymAddSymbol]
+ end;
+end;
+
+var
+ _SymDeleteSymbol: Pointer;
+
+function SymDeleteSymbol;
+begin
+ GetProcedureAddress(_SymDeleteSymbol, ImageHlpLib, 'SymDeleteSymbol');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SymDeleteSymbol]
+ end;
+end;
+
+var
+ _DbgHelpCreateUserDump: Pointer;
+
+function DbgHelpCreateUserDump;
+begin
+ GetProcedureAddress(_DbgHelpCreateUserDump, ImageHlpLib, 'DbgHelpCreateUserDump');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DbgHelpCreateUserDump]
+ end;
+end;
+
+var
+ _DbgHelpCreateUserDumpW: Pointer;
+
+function DbgHelpCreateUserDumpW;
+begin
+ GetProcedureAddress(_DbgHelpCreateUserDumpW, ImageHlpLib, 'DbgHelpCreateUserDumpW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DbgHelpCreateUserDumpW]
+ end;
+end;
+
+var
+ _SymGetSymFromAddr64: Pointer;
+
+function SymGetSymFromAddr64;
+begin
+ GetProcedureAddress(_SymGetSymFromAddr64, ImageHlpLib, 'SymGetSymFromAddr64');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SymGetSymFromAddr64]
+ end;
+end;
+
+var
+ _SymGetSymFromAddr: Pointer;
+
+function SymGetSymFromAddr;
+begin
+ GetProcedureAddress(_SymGetSymFromAddr, ImageHlpLib, 'SymGetSymFromAddr');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SymGetSymFromAddr]
+ end;
+end;
+
+var
+ _SymGetSymFromName64: Pointer;
+
+function SymGetSymFromName64;
+begin
+ GetProcedureAddress(_SymGetSymFromName64, ImageHlpLib, 'SymGetSymFromName64');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SymGetSymFromName64]
+ end;
+end;
+
+var
+ _SymGetSymFromName: Pointer;
+
+function SymGetSymFromName;
+begin
+ GetProcedureAddress(_SymGetSymFromName, ImageHlpLib, 'SymGetSymFromName');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SymGetSymFromName]
+ end;
+end;
+
+var
+ _FindFileInPath: Pointer;
+
+function FindFileInPath;
+begin
+ GetProcedureAddress(_FindFileInPath, ImageHlpLib, 'FindFileInPath');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_FindFileInPath]
+ end;
+end;
+
+var
+ _FindFileInSearchPath: Pointer;
+
+function FindFileInSearchPath;
+begin
+ GetProcedureAddress(_FindFileInSearchPath, ImageHlpLib, 'FindFileInSearchPath');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_FindFileInSearchPath]
+ end;
+end;
+
+var
+ _SymEnumSym: Pointer;
+
+function SymEnumSym;
+begin
+ GetProcedureAddress(_SymEnumSym, ImageHlpLib, 'SymEnumSym');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SymEnumSym]
+ end;
+end;
+
+var
+ _MiniDumpWriteDump: Pointer;
+
+function MiniDumpWriteDump;
+begin
+ GetProcedureAddress(_MiniDumpWriteDump, ImageHlpLib, 'MiniDumpWriteDump');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MiniDumpWriteDump]
+ end;
+end;
+
+var
+ _MiniDumpReadDumpStream: Pointer;
+
+function MiniDumpReadDumpStream;
+begin
+ GetProcedureAddress(_MiniDumpReadDumpStream, ImageHlpLib, 'MiniDumpReadDumpStream');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MiniDumpReadDumpStream]
+ end;
+end;
+
+{$ELSE}
+
+function BindImage; external ImageHlpLib name 'BindImage';
+function BindImageEx; external ImageHlpLib name 'BindImageEx';
+function ReBaseImage; external ImageHlpLib name 'ReBaseImage';
+function ReBaseImage64; external ImageHlpLib name 'ReBaseImage64';
+function CheckSumMappedFile; external ImageHlpLib name 'CheckSumMappedFile';
+function MapFileAndCheckSumA; external ImageHlpLib name 'MapFileAndCheckSumA';
+function MapFileAndCheckSumW; external ImageHlpLib name 'MapFileAndCheckSumW';
+function MapFileAndCheckSum; external ImageHlpLib name 'MapFileAndCheckSum' + AWSuffix;
+function GetImageConfigInformation; external ImageHlpLib name 'GetImageConfigInformation';
+function GetImageUnusedHeaderBytes; external ImageHlpLib name 'GetImageUnusedHeaderBytes';
+function SetImageConfigInformation; external ImageHlpLib name 'SetImageConfigInformation';
+function ImageGetDigestStream; external ImageHlpLib name 'ImageGetDigestStream';
+function ImageAddCertificate; external ImageHlpLib name 'ImageAddCertificate';
+function ImageRemoveCertificate; external ImageHlpLib name 'ImageRemoveCertificate';
+function ImageEnumerateCertificates; external ImageHlpLib name 'ImageEnumerateCertificates';
+function ImageGetCertificateData; external ImageHlpLib name 'ImageGetCertificateData';
+function ImageGetCertificateHeader; external ImageHlpLib name 'ImageGetCertificateHeader';
+function ImageLoad; external ImageHlpLib name 'ImageLoad';
+function ImageUnload; external ImageHlpLib name 'ImageUnload';
+function MapAndLoad; external ImageHlpLib name 'MapAndLoad';
+function UnMapAndLoad; external ImageHlpLib name 'UnMapAndLoad';
+function TouchFileTimes; external ImageHlpLib name 'TouchFileTimes';
+function SplitSymbols; external ImageHlpLib name 'SplitSymbols';
+function UpdateDebugInfoFile; external ImageHlpLib name 'UpdateDebugInfoFile';
+function UpdateDebugInfoFileEx; external ImageHlpLib name 'UpdateDebugInfoFileEx';
+function FindDebugInfoFile; external ImageHlpLib name 'FindDebugInfoFile';
+function FindDebugInfoFileEx; external ImageHlpLib name 'FindDebugInfoFileEx';
+function SymFindFileInPath; external ImageHlpLib name 'SymFindFileInPath';
+function FindExecutableImage; external ImageHlpLib name 'FindExecutableImage';
+function FindExecutableImageEx; external ImageHlpLib name 'FindExecutableImageEx';
+function ImageNtHeader; external ImageHlpLib name 'ImageNtHeader';
+function ImageDirectoryEntryToDataEx; external ImageHlpLib name 'ImageDirectoryEntryToDataEx';
+function ImageDirectoryEntryToData; external ImageHlpLib name 'ImageDirectoryEntryToData';
+function ImageRvaToSection; external ImageHlpLib name 'ImageRvaToSection';
+function ImageRvaToVa; external ImageHlpLib name 'ImageRvaToVa';
+function MapDebugInformation; external ImageHlpLib name 'MapDebugInformation';
+function UnmapDebugInformation; external ImageHlpLib name 'UnmapDebugInformation';
+function SearchTreeForFile; external ImageHlpLib name 'SearchTreeForFile';
+function EnumDirTree; external ImageHlpLib name 'EnumDirTree';
+function MakeSureDirectoryPathExists; external ImageHlpLib name 'MakeSureDirectoryPathExists';
+function UnDecorateSymbolName; external ImageHlpLib name 'UnDecorateSymbolName';
+function StackWalk64; external ImageHlpLib name 'StackWalk64';
+function StackWalk; external ImageHlpLib name 'StackWalk';
+function ImagehlpApiVersion; external ImageHlpLib name 'ImagehlpApiVersion';
+function ImagehlpApiVersionEx; external ImageHlpLib name 'ImagehlpApiVersionEx';
+function GetTimestampForLoadedLibrary; external ImageHlpLib name 'GetTimestampForLoadedLibrary';
+function SymSetOptions; external ImageHlpLib name 'SymSetOptions';
+function SymGetOptions; external ImageHlpLib name 'SymGetOptions';
+function SymCleanup; external ImageHlpLib name 'SymCleanup';
+function SymMatchString; external ImageHlpLib name 'SymMatchString';
+function SymEnumSourceFiles; external ImageHlpLib name 'SymEnumSourceFiles';
+function SymEnumerateModules64; external ImageHlpLib name 'SymEnumerateModules64';
+function SymEnumerateModules; external ImageHlpLib name 'SymEnumerateModules';
+function SymEnumerateSymbols64; external ImageHlpLib name 'SymEnumerateSymbols64';
+function SymEnumerateSymbolsW64; external ImageHlpLib name 'SymEnumerateSymbolsW64';
+function SymEnumerateSymbols; external ImageHlpLib name 'SymEnumerateSymbols';
+function SymEnumerateSymbolsW; external ImageHlpLib name 'SymEnumerateSymbolsW';
+function EnumerateLoadedModules64; external ImageHlpLib name 'EnumerateLoadedModules64';
+function EnumerateLoadedModules; external ImageHlpLib name 'EnumerateLoadedModules';
+function SymFunctionTableAccess64; external ImageHlpLib name 'SymFunctionTableAccess64';
+function SymFunctionTableAccess; external ImageHlpLib name 'SymFunctionTableAccess';
+function SymGetModuleInfo64; external ImageHlpLib name 'SymGetModuleInfo64';
+function SymGetModuleInfoW64; external ImageHlpLib name 'SymGetModuleInfoW64';
+function SymGetModuleInfo; external ImageHlpLib name 'SymGetModuleInfo';
+function SymGetModuleInfoW; external ImageHlpLib name 'SymGetModuleInfoW';
+function SymGetModuleBase64; external ImageHlpLib name 'SymGetModuleBase64';
+function SymGetModuleBase; external ImageHlpLib name 'SymGetModuleBase';
+function SymGetSymNext64; external ImageHlpLib name 'SymGetSymNext64';
+function SymGetSymNext; external ImageHlpLib name 'SymGetSymNext';
+function SymGetSymPrev64; external ImageHlpLib name 'SymGetSymPrev64';
+function SymGetSymPrev; external ImageHlpLib name 'SymGetSymPrev';
+function SymGetLineFromAddr64; external ImageHlpLib name 'SymGetLineFromAddr64';
+function SymGetLineFromAddr; external ImageHlpLib name 'SymGetLineFromAddr';
+function SymGetLineFromName64; external ImageHlpLib name 'SymGetLineFromName64';
+function SymGetLineFromName; external ImageHlpLib name 'SymGetLineFromName';
+function SymGetLineNext64; external ImageHlpLib name 'SymGetLineNext64';
+function SymGetLineNext; external ImageHlpLib name 'SymGetLineNext';
+function SymGetLinePrev64; external ImageHlpLib name 'SymGetLinePrev64';
+function SymGetLinePrev; external ImageHlpLib name 'SymGetLinePrev';
+function SymMatchFileName; external ImageHlpLib name 'SymMatchFileName';
+function SymInitialize; external ImageHlpLib name 'SymInitialize';
+function SymGetSearchPath; external ImageHlpLib name 'SymGetSearchPath';
+function SymSetSearchPath; external ImageHlpLib name 'SymSetSearchPath';
+function SymLoadModuleEx; external ImageHlpLib name 'SymLoadModuleEx';
+function SymLoadModule64; external ImageHlpLib name 'SymLoadModule64';
+function SymLoadModule; external ImageHlpLib name 'SymLoadModule';
+function SymUnloadModule64; external ImageHlpLib name 'SymUnloadModule64';
+function SymUnloadModule; external ImageHlpLib name 'SymUnloadModule';
+function SymUnDName64; external ImageHlpLib name 'SymUnDName64';
+function SymUnDName; external ImageHlpLib name 'SymUnDName';
+function SymRegisterCallback64; external ImageHlpLib name 'SymRegisterCallback64';
+function SymRegisterFunctionEntryCallback64; external ImageHlpLib name 'SymRegisterFunctionEntryCallback64';
+function SymRegisterCallback; external ImageHlpLib name 'SymRegisterCallback';
+function SymRegisterFunctionEntryCallback; external ImageHlpLib name 'SymRegisterFunctionEntryCallback';
+function SymSetContext; external ImageHlpLib name 'SymSetContext';
+function SymFromAddr; external ImageHlpLib name 'SymFromAddr';
+function SymFromName; external ImageHlpLib name 'SymFromName';
+function SymEnumSymbolsForAddr; external ImageHlpLib name 'SymEnumSymbolsForAddr';
+function SymEnumSymbols; external ImageHlpLib name 'SymEnumSymbols';
+function SymGetTypeInfo; external ImageHlpLib name 'SymGetTypeInfo';
+function SymEnumTypes; external ImageHlpLib name 'SymEnumTypes';
+function SymGetTypeFromName; external ImageHlpLib name 'SymGetTypeFromName';
+function SymAddSymbol; external ImageHlpLib name 'SymAddSymbol';
+function SymDeleteSymbol; external ImageHlpLib name 'SymDeleteSymbol';
+function DbgHelpCreateUserDump; external ImageHlpLib name 'DbgHelpCreateUserDump';
+function DbgHelpCreateUserDumpW; external ImageHlpLib name 'DbgHelpCreateUserDumpW';
+function SymGetSymFromAddr64; external ImageHlpLib name 'SymGetSymFromAddr64';
+function SymGetSymFromAddr; external ImageHlpLib name 'SymGetSymFromAddr';
+function SymGetSymFromName64; external ImageHlpLib name 'SymGetSymFromName64';
+function SymGetSymFromName; external ImageHlpLib name 'SymGetSymFromName';
+function FindFileInPath; external ImageHlpLib name 'FindFileInPath';
+function FindFileInSearchPath; external ImageHlpLib name 'FindFileInSearchPath';
+function SymEnumSym; external ImageHlpLib name 'SymEnumSym';
+function MiniDumpWriteDump; external ImageHlpLib name 'MiniDumpWriteDump';
+function MiniDumpReadDumpStream; external ImageHlpLib name 'MiniDumpReadDumpStream';
+
+{$ENDIF DYNAMIC_LINK}
+
+end.
diff --git a/packages/extra/winunits/jwaimapi.pas b/packages/extra/winunits/jwaimapi.pas
index fc3552ce78..1c017fdb2c 100644
--- a/packages/extra/winunits/jwaimapi.pas
+++ b/packages/extra/winunits/jwaimapi.pas
@@ -1,301 +1,301 @@
-{******************************************************************************}
-{ }
-{ Image Mastering API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: imapi.h, released Aug 2002. The original Pascal }
-{ code is: Imapi.pas, released November 2002. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwaimapi.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaImapi;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "imapi.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- ActiveX {todo},
- JwaWinType;
-
-{$IFDEF FPC}
-Type
- IPropertyStorage = interface end;
-{$ENDIF}
-//
-// interface IDiscRecorder
-//
-
-type
- MEDIA_TYPES = DWORD;
- {$EXTERNALSYM MEDIA_TYPES}
- TMediaTypes = MEDIA_TYPES;
-
-const
- MEDIA_CDDA_CDROM = 1;
- {$EXTERNALSYM MEDIA_CDDA_CDROM}
- MEDIA_CD_ROM_XA = MEDIA_CDDA_CDROM + 1;
- {$EXTERNALSYM MEDIA_CD_ROM_XA}
- MEDIA_CD_I = MEDIA_CD_ROM_XA + 1;
- {$EXTERNALSYM MEDIA_CD_I}
- MEDIA_CD_EXTRA = MEDIA_CD_I + 1;
- {$EXTERNALSYM MEDIA_CD_EXTRA}
- MEDIA_CD_OTHER = MEDIA_CD_EXTRA + 1;
- {$EXTERNALSYM MEDIA_CD_OTHER}
- MEDIA_SPECIAL = MEDIA_CD_OTHER + 1;
- {$EXTERNALSYM MEDIA_SPECIAL}
-
-type
- MEDIA_FLAGS = DWORD;
- {$EXTERNALSYM MEDIA_FLAGS}
- TMediaFlags = MEDIA_FLAGS;
-
-const
- MEDIA_BLANK = $1;
- {$EXTERNALSYM MEDIA_BLANK}
- MEDIA_RW = $2;
- {$EXTERNALSYM MEDIA_RW}
- MEDIA_WRITABLE = $4;
- {$EXTERNALSYM MEDIA_WRITABLE}
- MEDIA_FORMAT_UNUSABLE_BY_IMAPI = $8;
- {$EXTERNALSYM MEDIA_FORMAT_UNUSABLE_BY_IMAPI}
-
-type
- RECORDER_TYPES = DWORD;
- {$EXTERNALSYM RECORDER_TYPES}
- TRecorderTypes = RECORDER_TYPES;
-
-const
- RECORDER_CDR = $1;
- {$EXTERNALSYM RECORDER_CDR}
- RECORDER_CDRW = $2;
- {$EXTERNALSYM RECORDER_CDRW}
-
- RECORDER_DOING_NOTHING = 0;
- {$EXTERNALSYM RECORDER_DOING_NOTHING}
-
- RECORDER_OPENED = $1;
- {$EXTERNALSYM RECORDER_OPENED}
-
- RECORDER_BURNING = $2;
- {$EXTERNALSYM RECORDER_BURNING}
-
- IID_IDiscRecorder: TGUID = '{85AC9776-CA88-4cf2-894E-09598C078A41}';
- {$EXTERNALSYM IID_IDiscRecorder}
-
-
-type
- IDiscRecorder = interface(IUnknown)
- ['{85AC9776-CA88-4cf2-894E-09598C078A41}']
- function Init(pbyUniqueID: PByte; nulIDSize, nulDriveNumber: ULONG): HRESULT; stdcall;
- function GetRecorderGUID(pbyUniqueID: PByte; ulBufferSize: ULONG; out pulReturnSizeRequired: ULONG): HRESULT; stdcall;
- function GetRecorderType(out fTypeCode: Longint): HRESULT; stdcall;
- function GetDisplayNames(var pbstrVendorID, pbstrProductID, pbstrRevision: PWideChar): HRESULT; stdcall;
- function GetBasePnPID(out pbstrBasePnPID: PWideChar): HRESULT; stdcall;
- function GetPath(out pbstrPath: PWideChar): HRESULT; stdcall;
- function GetRecorderProperties(out ppPropStg: IPropertyStorage): HRESULT; stdcall;
- function SetRecorderProperties(pPropStg: IPropertyStorage): HRESULT; stdcall;
- function GetRecorderState(out pulDevStateFlags: ULONG): HRESULT; stdcall;
- function OpenExclusive: HRESULT; stdcall;
- function QueryMediaType(out fMediaType, fMediaFlags: Longint): HRESULT; stdcall;
- function QueryMediaInfo(out pbSessions, pbLastTrack: Byte; out ulStartAddress, ulNextWritable, ulFreeBlocks: ULONG): HRESULT; stdcall;
- function Eject: HRESULT; stdcall;
- function Erase(bFullErase: BOOL): HRESULT; stdcall;
- function Close: HRESULT; stdcall;
- end;
- {$EXTERNALSYM IDiscRecorder}
-
-//
-// interface IEnumDiscRecorders
-//
-
-const
- IID_IEnumDiscRecorders: TGUID = '{9B1921E1-54AC-11d3-9144-00104BA11C5E}';
- {$EXTERNALSYM IID_IEnumDiscRecorders}
-
-
-type
- IEnumDiscRecorders = interface(IUnknown)
- ['{9B1921E1-54AC-11d3-9144-00104BA11C5E}']
- function Next(cRecorders: ULONG; out ppRecorder: IDiscRecorder; out pcFetched: ULONG): HRESULT; stdcall;
- function Skip(cRecorders: ULONG): HRESULT; stdcall;
- function Reset: HRESULT; stdcall;
- function Clone(out ppEnum: IEnumDiscRecorders): HRESULT; stdcall;
- end;
- {$EXTERNALSYM IEnumDiscRecorders}
-
-//
-// interface IEnumDiscMasterFormats
-//
-
-const
- IID_IEnumDiscMasterFormats: TGUID = '{DDF445E1-54BA-11d3-9144-00104BA11C5E}';
- {$EXTERNALSYM IID_IEnumDiscMasterFormats}
-
-type
- IEnumDiscMasterFormats = interface(IUnknown)
- ['{DDF445E1-54BA-11d3-9144-00104BA11C5E}']
- function Next(cFormats: ULONG; out lpiidFormatID: TGUID; out pcFetched: ULONG): HRESULT; stdcall;
- function Skip(cFormats: ULONG): HRESULT; stdcall;
- function Reset: HRESULT; stdcall;
- function Clone(out ppEnum: IEnumDiscMasterFormats): HRESULT; stdcall;
- end;
- {$EXTERNALSYM IEnumDiscMasterFormats}
-
-//
-// interface IRedbookDiscMaster
-//
-
-const
- IID_IRedbookDiscMaster: TGUID = '{E3BC42CD-4E5C-11D3-9144-00104BA11C5E}';
- {$EXTERNALSYM IID_IRedbookDiscMaster}
-
-type
- IRedbookDiscMaster = interface(IUnknown)
- ['{E3BC42CD-4E5C-11D3-9144-00104BA11C5E}']
- function GetTotalAudioTracks(out pnTracks: Longint): HRESULT; stdcall;
- function GetTotalAudioBlocks(out pnBlocks: Longint): HRESULT; stdcall;
- function GetUsedAudioBlocks(out pnBlocks: Longint): HRESULT; stdcall;
- function GetAvailableAudioTrackBlocks(out pnBlocks: Longint): HRESULT; stdcall;
- function GetAudioBlockSize(out pnBlockBytes: Longint): HRESULT; stdcall;
- function CreateAudioTrack(nBlocks: Longint): HRESULT; stdcall;
- function AddAudioTrackBlocks(pby: PByte; cb: Longint): HRESULT; stdcall;
- function CloseAudioTrack: HRESULT; stdcall;
- end;
- {$EXTERNALSYM IRedbookDiscMaster}
-
-//
-// interface IJolietDiscMaster
-//
-
-const
- IID_IJolietDiscMaster: TGUID = '{E3BC42CE-4E5C-11D3-9144-00104BA11C5E}';
- {$EXTERNALSYM IID_IJolietDiscMaster}
-
-
-type
- IJolietDiscMaster = interface(IUnknown)
- ['{E3BC42CE-4E5C-11D3-9144-00104BA11C5E}']
- function GetTotalDataBlocks(out pnBlocks: Longint): HRESULT; stdcall;
- function GetUsedDataBlocks(out pnBlocks: Longint): HRESULT; stdcall;
- function GetDataBlockSize(out pnBlockBytes: Longint): HRESULT; stdcall;
- function AddData(pStorage: IStorage; lFileOverwrite: Longint): HRESULT; stdcall;
- function GetJolietProperties(out ppPropStg: IPropertyStorage): HRESULT; stdcall;
- function SetJolietProperties(pPropStg: IPropertyStorage): HRESULT; stdcall;
- end;
- {$EXTERNALSYM IJolietDiscMaster}
-
-//
-// interface IDiscMasterProgressEvents
-//
-
-const
- IID_IDiscMasterProgressEvents: TGUID = '{EC9E51C1-4E5D-11D3-9144-00104BA11C5E}';
- {$EXTERNALSYM IID_IDiscMasterProgressEvents}
-
-type
- IDiscMasterProgressEvents = interface(IUnknown)
- ['{EC9E51C1-4E5D-11D3-9144-00104BA11C5E}']
- function QueryCancel(out pbCancel: BOOL): HRESULT; stdcall;
- function NotifyPnPActivity: HRESULT; stdcall;
- function NotifyAddProgress(nCompletedSteps, nTotalSteps: Longint): HRESULT; stdcall;
- function NotifyBlockProgress(nCompleted, nTotal: Longint): HRESULT; stdcall;
- function NotifyTrackProgress(nCurrentTrack, nTotalTracks: Longint): HRESULT; stdcall;
- function NotifyPreparingBurn(nEstimatedSeconds: Longint): HRESULT; stdcall;
- function NotifyClosingDisc(nEstimatedSeconds: Longint): HRESULT; stdcall;
- function NotifyBurnComplete(status: HRESULT): HRESULT; stdcall;
- function NotifyEraseComplete(status: HRESULT): HRESULT; stdcall;
- end;
- {$EXTERNALSYM IDiscMasterProgressEvents}
-
-//
-// interface IDiscMaster
-//
-
-const
- IID_IDiscMaster: TGUID = '{520CCA62-51A5-11D3-9144-00104BA11C5E}';
- {$EXTERNALSYM IID_IDiscMaster}
-
-type
- IDiscMaster = interface(IUnknown)
- ['{520CCA62-51A5-11D3-9144-00104BA11C5E}']
- function Open: HRESULT; stdcall;
- function EnumDiscMasterFormats(out ppEnum: IEnumDiscMasterFormats): HRESULT; stdcall;
- function GetActiveDiscMasterFormat(out lpiid: TGUID): HRESULT; stdcall;
- function SetActiveDiscMasterFormat(const riid: TGUID; out ppUnk: IUnknown): HRESULT; stdcall;
- function EnumDiscRecorders(out ppEnum: IEnumDiscRecorders): HRESULT; stdcall;
- function GetActiveDiscRecorder(out ppRecorder: IDiscRecorder): HRESULT; stdcall;
- function SetActiveDiscRecorder(pRecorder: IDiscRecorder): HRESULT; stdcall;
- function ClearFormatContent: HRESULT; stdcall;
- function ProgressAdvise(pEvents: IDiscMasterProgressEvents; out pvCookie: UINT): HRESULT; stdcall;
- function ProgressUnadvise(vCookie: UINT): HRESULT; stdcall;
- function RecordDisc(bSimulate, bEjectAfterBurn: BOOL): HRESULT; stdcall;
- function Close: HRESULT; stdcall;
- end;
- {$EXTERNALSYM IDiscMaster}
-
-//
-// library IMAPILib
-//
-
-const
- //EXTERN_C const IID LIBID_IMAPILib;
-
- CLSID_MSDiscRecorderObj: TGUID = '{520CCA61-51A5-11D3-9144-00104BA11C5E}';
- {$EXTERNALSYM CLSID_MSDiscRecorderObj}
- MSDiscRecorderObj: TGUID = '{520CCA61-51A5-11D3-9144-00104BA11C5E}';
- {$EXTERNALSYM MSDiscRecorderObj}
-
- CLSID_MSDiscMasterObj: TGUID = '{520CCA63-51A5-11D3-9144-00104BA11C5E}';
- {$EXTERNALSYM CLSID_MSDiscMasterObj}
- MSDiscMasterObj: TGUID = '{520CCA63-51A5-11D3-9144-00104BA11C5E}';
- {$EXTERNALSYM MSDiscMasterObj}
-
- CLSID_MSEnumDiscRecordersObj: TGUID = '{8A03567A-63CB-4BA8-BAF6-52119816D1EF}';
- {$EXTERNALSYM CLSID_MSEnumDiscRecordersObj}
- MSEnumDiscRecordersObj: TGUID = '{8A03567A-63CB-4BA8-BAF6-52119816D1EF}';
- {$EXTERNALSYM MSEnumDiscRecordersObj}
-
-implementation
-
-end.
+{******************************************************************************}
+{ }
+{ Image Mastering API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: imapi.h, released Aug 2002. The original Pascal }
+{ code is: Imapi.pas, released November 2002. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwaimapi.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaImapi;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "imapi.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ ActiveX {todo},
+ JwaWinType;
+
+{$IFDEF FPC}
+Type
+ IPropertyStorage = interface end;
+{$ENDIF}
+//
+// interface IDiscRecorder
+//
+
+type
+ MEDIA_TYPES = DWORD;
+ {$EXTERNALSYM MEDIA_TYPES}
+ TMediaTypes = MEDIA_TYPES;
+
+const
+ MEDIA_CDDA_CDROM = 1;
+ {$EXTERNALSYM MEDIA_CDDA_CDROM}
+ MEDIA_CD_ROM_XA = MEDIA_CDDA_CDROM + 1;
+ {$EXTERNALSYM MEDIA_CD_ROM_XA}
+ MEDIA_CD_I = MEDIA_CD_ROM_XA + 1;
+ {$EXTERNALSYM MEDIA_CD_I}
+ MEDIA_CD_EXTRA = MEDIA_CD_I + 1;
+ {$EXTERNALSYM MEDIA_CD_EXTRA}
+ MEDIA_CD_OTHER = MEDIA_CD_EXTRA + 1;
+ {$EXTERNALSYM MEDIA_CD_OTHER}
+ MEDIA_SPECIAL = MEDIA_CD_OTHER + 1;
+ {$EXTERNALSYM MEDIA_SPECIAL}
+
+type
+ MEDIA_FLAGS = DWORD;
+ {$EXTERNALSYM MEDIA_FLAGS}
+ TMediaFlags = MEDIA_FLAGS;
+
+const
+ MEDIA_BLANK = $1;
+ {$EXTERNALSYM MEDIA_BLANK}
+ MEDIA_RW = $2;
+ {$EXTERNALSYM MEDIA_RW}
+ MEDIA_WRITABLE = $4;
+ {$EXTERNALSYM MEDIA_WRITABLE}
+ MEDIA_FORMAT_UNUSABLE_BY_IMAPI = $8;
+ {$EXTERNALSYM MEDIA_FORMAT_UNUSABLE_BY_IMAPI}
+
+type
+ RECORDER_TYPES = DWORD;
+ {$EXTERNALSYM RECORDER_TYPES}
+ TRecorderTypes = RECORDER_TYPES;
+
+const
+ RECORDER_CDR = $1;
+ {$EXTERNALSYM RECORDER_CDR}
+ RECORDER_CDRW = $2;
+ {$EXTERNALSYM RECORDER_CDRW}
+
+ RECORDER_DOING_NOTHING = 0;
+ {$EXTERNALSYM RECORDER_DOING_NOTHING}
+
+ RECORDER_OPENED = $1;
+ {$EXTERNALSYM RECORDER_OPENED}
+
+ RECORDER_BURNING = $2;
+ {$EXTERNALSYM RECORDER_BURNING}
+
+ IID_IDiscRecorder: TGUID = '{85AC9776-CA88-4cf2-894E-09598C078A41}';
+ {$EXTERNALSYM IID_IDiscRecorder}
+
+
+type
+ IDiscRecorder = interface(IUnknown)
+ ['{85AC9776-CA88-4cf2-894E-09598C078A41}']
+ function Init(pbyUniqueID: PByte; nulIDSize, nulDriveNumber: ULONG): HRESULT; stdcall;
+ function GetRecorderGUID(pbyUniqueID: PByte; ulBufferSize: ULONG; out pulReturnSizeRequired: ULONG): HRESULT; stdcall;
+ function GetRecorderType(out fTypeCode: Longint): HRESULT; stdcall;
+ function GetDisplayNames(var pbstrVendorID, pbstrProductID, pbstrRevision: PWideChar): HRESULT; stdcall;
+ function GetBasePnPID(out pbstrBasePnPID: PWideChar): HRESULT; stdcall;
+ function GetPath(out pbstrPath: PWideChar): HRESULT; stdcall;
+ function GetRecorderProperties(out ppPropStg: IPropertyStorage): HRESULT; stdcall;
+ function SetRecorderProperties(pPropStg: IPropertyStorage): HRESULT; stdcall;
+ function GetRecorderState(out pulDevStateFlags: ULONG): HRESULT; stdcall;
+ function OpenExclusive: HRESULT; stdcall;
+ function QueryMediaType(out fMediaType, fMediaFlags: Longint): HRESULT; stdcall;
+ function QueryMediaInfo(out pbSessions, pbLastTrack: Byte; out ulStartAddress, ulNextWritable, ulFreeBlocks: ULONG): HRESULT; stdcall;
+ function Eject: HRESULT; stdcall;
+ function Erase(bFullErase: BOOL): HRESULT; stdcall;
+ function Close: HRESULT; stdcall;
+ end;
+ {$EXTERNALSYM IDiscRecorder}
+
+//
+// interface IEnumDiscRecorders
+//
+
+const
+ IID_IEnumDiscRecorders: TGUID = '{9B1921E1-54AC-11d3-9144-00104BA11C5E}';
+ {$EXTERNALSYM IID_IEnumDiscRecorders}
+
+
+type
+ IEnumDiscRecorders = interface(IUnknown)
+ ['{9B1921E1-54AC-11d3-9144-00104BA11C5E}']
+ function Next(cRecorders: ULONG; out ppRecorder: IDiscRecorder; out pcFetched: ULONG): HRESULT; stdcall;
+ function Skip(cRecorders: ULONG): HRESULT; stdcall;
+ function Reset: HRESULT; stdcall;
+ function Clone(out ppEnum: IEnumDiscRecorders): HRESULT; stdcall;
+ end;
+ {$EXTERNALSYM IEnumDiscRecorders}
+
+//
+// interface IEnumDiscMasterFormats
+//
+
+const
+ IID_IEnumDiscMasterFormats: TGUID = '{DDF445E1-54BA-11d3-9144-00104BA11C5E}';
+ {$EXTERNALSYM IID_IEnumDiscMasterFormats}
+
+type
+ IEnumDiscMasterFormats = interface(IUnknown)
+ ['{DDF445E1-54BA-11d3-9144-00104BA11C5E}']
+ function Next(cFormats: ULONG; out lpiidFormatID: TGUID; out pcFetched: ULONG): HRESULT; stdcall;
+ function Skip(cFormats: ULONG): HRESULT; stdcall;
+ function Reset: HRESULT; stdcall;
+ function Clone(out ppEnum: IEnumDiscMasterFormats): HRESULT; stdcall;
+ end;
+ {$EXTERNALSYM IEnumDiscMasterFormats}
+
+//
+// interface IRedbookDiscMaster
+//
+
+const
+ IID_IRedbookDiscMaster: TGUID = '{E3BC42CD-4E5C-11D3-9144-00104BA11C5E}';
+ {$EXTERNALSYM IID_IRedbookDiscMaster}
+
+type
+ IRedbookDiscMaster = interface(IUnknown)
+ ['{E3BC42CD-4E5C-11D3-9144-00104BA11C5E}']
+ function GetTotalAudioTracks(out pnTracks: Longint): HRESULT; stdcall;
+ function GetTotalAudioBlocks(out pnBlocks: Longint): HRESULT; stdcall;
+ function GetUsedAudioBlocks(out pnBlocks: Longint): HRESULT; stdcall;
+ function GetAvailableAudioTrackBlocks(out pnBlocks: Longint): HRESULT; stdcall;
+ function GetAudioBlockSize(out pnBlockBytes: Longint): HRESULT; stdcall;
+ function CreateAudioTrack(nBlocks: Longint): HRESULT; stdcall;
+ function AddAudioTrackBlocks(pby: PByte; cb: Longint): HRESULT; stdcall;
+ function CloseAudioTrack: HRESULT; stdcall;
+ end;
+ {$EXTERNALSYM IRedbookDiscMaster}
+
+//
+// interface IJolietDiscMaster
+//
+
+const
+ IID_IJolietDiscMaster: TGUID = '{E3BC42CE-4E5C-11D3-9144-00104BA11C5E}';
+ {$EXTERNALSYM IID_IJolietDiscMaster}
+
+
+type
+ IJolietDiscMaster = interface(IUnknown)
+ ['{E3BC42CE-4E5C-11D3-9144-00104BA11C5E}']
+ function GetTotalDataBlocks(out pnBlocks: Longint): HRESULT; stdcall;
+ function GetUsedDataBlocks(out pnBlocks: Longint): HRESULT; stdcall;
+ function GetDataBlockSize(out pnBlockBytes: Longint): HRESULT; stdcall;
+ function AddData(pStorage: IStorage; lFileOverwrite: Longint): HRESULT; stdcall;
+ function GetJolietProperties(out ppPropStg: IPropertyStorage): HRESULT; stdcall;
+ function SetJolietProperties(pPropStg: IPropertyStorage): HRESULT; stdcall;
+ end;
+ {$EXTERNALSYM IJolietDiscMaster}
+
+//
+// interface IDiscMasterProgressEvents
+//
+
+const
+ IID_IDiscMasterProgressEvents: TGUID = '{EC9E51C1-4E5D-11D3-9144-00104BA11C5E}';
+ {$EXTERNALSYM IID_IDiscMasterProgressEvents}
+
+type
+ IDiscMasterProgressEvents = interface(IUnknown)
+ ['{EC9E51C1-4E5D-11D3-9144-00104BA11C5E}']
+ function QueryCancel(out pbCancel: BOOL): HRESULT; stdcall;
+ function NotifyPnPActivity: HRESULT; stdcall;
+ function NotifyAddProgress(nCompletedSteps, nTotalSteps: Longint): HRESULT; stdcall;
+ function NotifyBlockProgress(nCompleted, nTotal: Longint): HRESULT; stdcall;
+ function NotifyTrackProgress(nCurrentTrack, nTotalTracks: Longint): HRESULT; stdcall;
+ function NotifyPreparingBurn(nEstimatedSeconds: Longint): HRESULT; stdcall;
+ function NotifyClosingDisc(nEstimatedSeconds: Longint): HRESULT; stdcall;
+ function NotifyBurnComplete(status: HRESULT): HRESULT; stdcall;
+ function NotifyEraseComplete(status: HRESULT): HRESULT; stdcall;
+ end;
+ {$EXTERNALSYM IDiscMasterProgressEvents}
+
+//
+// interface IDiscMaster
+//
+
+const
+ IID_IDiscMaster: TGUID = '{520CCA62-51A5-11D3-9144-00104BA11C5E}';
+ {$EXTERNALSYM IID_IDiscMaster}
+
+type
+ IDiscMaster = interface(IUnknown)
+ ['{520CCA62-51A5-11D3-9144-00104BA11C5E}']
+ function Open: HRESULT; stdcall;
+ function EnumDiscMasterFormats(out ppEnum: IEnumDiscMasterFormats): HRESULT; stdcall;
+ function GetActiveDiscMasterFormat(out lpiid: TGUID): HRESULT; stdcall;
+ function SetActiveDiscMasterFormat(const riid: TGUID; out ppUnk: IUnknown): HRESULT; stdcall;
+ function EnumDiscRecorders(out ppEnum: IEnumDiscRecorders): HRESULT; stdcall;
+ function GetActiveDiscRecorder(out ppRecorder: IDiscRecorder): HRESULT; stdcall;
+ function SetActiveDiscRecorder(pRecorder: IDiscRecorder): HRESULT; stdcall;
+ function ClearFormatContent: HRESULT; stdcall;
+ function ProgressAdvise(pEvents: IDiscMasterProgressEvents; out pvCookie: UINT): HRESULT; stdcall;
+ function ProgressUnadvise(vCookie: UINT): HRESULT; stdcall;
+ function RecordDisc(bSimulate, bEjectAfterBurn: BOOL): HRESULT; stdcall;
+ function Close: HRESULT; stdcall;
+ end;
+ {$EXTERNALSYM IDiscMaster}
+
+//
+// library IMAPILib
+//
+
+const
+ //EXTERN_C const IID LIBID_IMAPILib;
+
+ CLSID_MSDiscRecorderObj: TGUID = '{520CCA61-51A5-11D3-9144-00104BA11C5E}';
+ {$EXTERNALSYM CLSID_MSDiscRecorderObj}
+ MSDiscRecorderObj: TGUID = '{520CCA61-51A5-11D3-9144-00104BA11C5E}';
+ {$EXTERNALSYM MSDiscRecorderObj}
+
+ CLSID_MSDiscMasterObj: TGUID = '{520CCA63-51A5-11D3-9144-00104BA11C5E}';
+ {$EXTERNALSYM CLSID_MSDiscMasterObj}
+ MSDiscMasterObj: TGUID = '{520CCA63-51A5-11D3-9144-00104BA11C5E}';
+ {$EXTERNALSYM MSDiscMasterObj}
+
+ CLSID_MSEnumDiscRecordersObj: TGUID = '{8A03567A-63CB-4BA8-BAF6-52119816D1EF}';
+ {$EXTERNALSYM CLSID_MSEnumDiscRecordersObj}
+ MSEnumDiscRecordersObj: TGUID = '{8A03567A-63CB-4BA8-BAF6-52119816D1EF}';
+ {$EXTERNALSYM MSEnumDiscRecordersObj}
+
+implementation
+
+end.
diff --git a/packages/extra/winunits/jwaimapierror.pas b/packages/extra/winunits/jwaimapierror.pas
index 491192db28..0b9b2fceda 100644
--- a/packages/extra/winunits/jwaimapierror.pas
+++ b/packages/extra/winunits/jwaimapierror.pas
@@ -1,140 +1,140 @@
-{******************************************************************************}
-{ }
-{ Image Mastering API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: imapierror.h, released Aug 2002. The original Pascal }
-{ code is: ImapiError.pas, released November 2002. The initial developer of the}
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwaimapierror.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaImapiError;
-
-interface
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "imapi.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-uses
- JwaWinError, JwaWinType;
-
-const
- IMAPI_S_PROPERTIESIGNORED = HRESULT((SEVERITY_SUCCESS shl 31) or (FACILITY_ITF shl 16) or $200);
- {$EXTERNALSYM IMAPI_S_PROPERTIESIGNORED}
- IMAPI_S_BUFFER_TO_SMALL = HRESULT((SEVERITY_SUCCESS shl 31) or (FACILITY_ITF shl 16) or $201);
- {$EXTERNALSYM IMAPI_S_BUFFER_TO_SMALL}
- IMAPI_E_NOTOPENED = HRESULT((SEVERITY_ERROR shl 31) or (FACILITY_ITF shl 16) or $200 + 11);
- {$EXTERNALSYM IMAPI_E_NOTOPENED}
- IMAPI_E_NOTINITIALIZED = HRESULT((SEVERITY_ERROR shl 31) or (FACILITY_ITF shl 16) or $200 + 12);
- {$EXTERNALSYM IMAPI_E_NOTINITIALIZED}
- IMAPI_E_USERABORT = HRESULT((SEVERITY_ERROR shl 31) or (FACILITY_ITF shl 16) or $200 + 13);
- {$EXTERNALSYM IMAPI_E_USERABORT}
- IMAPI_E_GENERIC = HRESULT((SEVERITY_ERROR shl 31) or (FACILITY_ITF shl 16) or $200 + 14);
- {$EXTERNALSYM IMAPI_E_GENERIC}
- IMAPI_E_MEDIUM_NOTPRESENT = HRESULT((SEVERITY_ERROR shl 31) or (FACILITY_ITF shl 16) or $200 + 15);
- {$EXTERNALSYM IMAPI_E_MEDIUM_NOTPRESENT}
- IMAPI_E_MEDIUM_INVALIDTYPE = HRESULT((SEVERITY_ERROR shl 31) or (FACILITY_ITF shl 16) or $200 + 16);
- {$EXTERNALSYM IMAPI_E_MEDIUM_INVALIDTYPE}
- IMAPI_E_DEVICE_NOPROPERTIES = HRESULT((SEVERITY_ERROR shl 31) or (FACILITY_ITF shl 16) or $200 + 17);
- {$EXTERNALSYM IMAPI_E_DEVICE_NOPROPERTIES}
- IMAPI_E_DEVICE_NOTACCESSIBLE = HRESULT((SEVERITY_ERROR shl 31) or (FACILITY_ITF shl 16) or $200 + 18);
- {$EXTERNALSYM IMAPI_E_DEVICE_NOTACCESSIBLE}
- IMAPI_E_DEVICE_NOTPRESENT = HRESULT((SEVERITY_ERROR shl 31) or (FACILITY_ITF shl 16) or $200 + 19);
- {$EXTERNALSYM IMAPI_E_DEVICE_NOTPRESENT}
- IMAPI_E_DEVICE_INVALIDTYPE = HRESULT((SEVERITY_ERROR shl 31) or (FACILITY_ITF shl 16) or $200 + 20);
- {$EXTERNALSYM IMAPI_E_DEVICE_INVALIDTYPE}
- IMAPI_E_INITIALIZE_WRITE = HRESULT((SEVERITY_ERROR shl 31) or (FACILITY_ITF shl 16) or $200 + 21);
- {$EXTERNALSYM IMAPI_E_INITIALIZE_WRITE}
- IMAPI_E_INITIALIZE_ENDWRITE = HRESULT((SEVERITY_ERROR shl 31) or (FACILITY_ITF shl 16) or $200 + 22);
- {$EXTERNALSYM IMAPI_E_INITIALIZE_ENDWRITE}
- IMAPI_E_FILESYSTEM = HRESULT((SEVERITY_ERROR shl 31) or (FACILITY_ITF shl 16) or $200 + 23);
- {$EXTERNALSYM IMAPI_E_FILESYSTEM}
- IMAPI_E_FILEACCESS = HRESULT((SEVERITY_ERROR shl 31) or (FACILITY_ITF shl 16) or $200 + 24);
- {$EXTERNALSYM IMAPI_E_FILEACCESS}
- IMAPI_E_DISCINFO = HRESULT((SEVERITY_ERROR shl 31) or (FACILITY_ITF shl 16) or $200 + 25);
- {$EXTERNALSYM IMAPI_E_DISCINFO}
- IMAPI_E_TRACKNOTOPEN = HRESULT((SEVERITY_ERROR shl 31) or (FACILITY_ITF shl 16) or $200 + 26);
- {$EXTERNALSYM IMAPI_E_TRACKNOTOPEN}
- IMAPI_E_TRACKOPEN = HRESULT((SEVERITY_ERROR shl 31) or (FACILITY_ITF shl 16) or $200 + 27);
- {$EXTERNALSYM IMAPI_E_TRACKOPEN}
- IMAPI_E_DISCFULL = HRESULT((SEVERITY_ERROR shl 31) or (FACILITY_ITF shl 16) or $200 + 28);
- {$EXTERNALSYM IMAPI_E_DISCFULL}
- IMAPI_E_BADJOLIETNAME = HRESULT((SEVERITY_ERROR shl 31) or (FACILITY_ITF shl 16) or $200 + 29);
- {$EXTERNALSYM IMAPI_E_BADJOLIETNAME}
- IMAPI_E_INVALIDIMAGE = HRESULT((SEVERITY_ERROR shl 31) or (FACILITY_ITF shl 16) or $200 + 30);
- {$EXTERNALSYM IMAPI_E_INVALIDIMAGE}
- IMAPI_E_NOACTIVEFORMAT = HRESULT((SEVERITY_ERROR shl 31) or (FACILITY_ITF shl 16) or $200 + 31);
- {$EXTERNALSYM IMAPI_E_NOACTIVEFORMAT}
- IMAPI_E_NOACTIVERECORDER = HRESULT((SEVERITY_ERROR shl 31) or (FACILITY_ITF shl 16) or $200 + 32);
- {$EXTERNALSYM IMAPI_E_NOACTIVERECORDER}
- IMAPI_E_WRONGFORMAT = HRESULT((SEVERITY_ERROR shl 31) or (FACILITY_ITF shl 16) or $200 + 33);
- {$EXTERNALSYM IMAPI_E_WRONGFORMAT}
- IMAPI_E_ALREADYOPEN = HRESULT((SEVERITY_ERROR shl 31) or (FACILITY_ITF shl 16) or $200 + 34);
- {$EXTERNALSYM IMAPI_E_ALREADYOPEN}
- IMAPI_E_WRONGDISC = HRESULT((SEVERITY_ERROR shl 31) or (FACILITY_ITF shl 16) or $200 + 35);
- {$EXTERNALSYM IMAPI_E_WRONGDISC}
- IMAPI_E_FILEEXISTS = HRESULT((SEVERITY_ERROR shl 31) or (FACILITY_ITF shl 16) or $200 + 36);
- {$EXTERNALSYM IMAPI_E_FILEEXISTS}
- IMAPI_E_STASHINUSE = HRESULT((SEVERITY_ERROR shl 31) or (FACILITY_ITF shl 16) or $200 + 37);
- {$EXTERNALSYM IMAPI_E_STASHINUSE}
- IMAPI_E_DEVICE_STILL_IN_USE = HRESULT((SEVERITY_ERROR shl 31) or (FACILITY_ITF shl 16) or $200 + 38);
- {$EXTERNALSYM IMAPI_E_DEVICE_STILL_IN_USE}
- IMAPI_E_LOSS_OF_STREAMING = HRESULT((SEVERITY_ERROR shl 31) or (FACILITY_ITF shl 16) or $200 + 39);
- {$EXTERNALSYM IMAPI_E_LOSS_OF_STREAMING}
- IMAPI_E_COMPRESSEDSTASH = HRESULT((SEVERITY_ERROR shl 31) or (FACILITY_ITF shl 16) or $200 + 40);
- {$EXTERNALSYM IMAPI_E_COMPRESSEDSTASH}
- IMAPI_E_ENCRYPTEDSTASH = HRESULT((SEVERITY_ERROR shl 31) or (FACILITY_ITF shl 16) or $200 + 41);
- {$EXTERNALSYM IMAPI_E_ENCRYPTEDSTASH}
- IMAPI_E_NOTENOUGHDISKFORSTASH = HRESULT((SEVERITY_ERROR shl 31) or (FACILITY_ITF shl 16) or $200 + 42);
- {$EXTERNALSYM IMAPI_E_NOTENOUGHDISKFORSTASH}
- IMAPI_E_REMOVABLESTASH = HRESULT((SEVERITY_ERROR shl 31) or (FACILITY_ITF shl 16) or $200 + 43);
- {$EXTERNALSYM IMAPI_E_REMOVABLESTASH}
- IMAPI_E_CANNOT_WRITE_TO_MEDIA = HRESULT((SEVERITY_ERROR shl 31) or (FACILITY_ITF shl 16) or $200 + 44);
- {$EXTERNALSYM IMAPI_E_CANNOT_WRITE_TO_MEDIA}
- IMAPI_E_TRACK_NOT_BIG_ENOUGH = HRESULT((SEVERITY_ERROR shl 31) or (FACILITY_ITF shl 16) or $200 + 45);
- {$EXTERNALSYM IMAPI_E_TRACK_NOT_BIG_ENOUGH}
- IMAPI_E_BOOTIMAGE_AND_NONBLANK_DISC = HRESULT((SEVERITY_ERROR shl 31) or (FACILITY_ITF shl 16) or $200 + 46);
- {$EXTERNALSYM IMAPI_E_BOOTIMAGE_AND_NONBLANK_DISC}
-
-implementation
-
-end.
+{******************************************************************************}
+{ }
+{ Image Mastering API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: imapierror.h, released Aug 2002. The original Pascal }
+{ code is: ImapiError.pas, released November 2002. The initial developer of the}
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwaimapierror.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaImapiError;
+
+interface
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "imapi.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+uses
+ JwaWinError, JwaWinType;
+
+const
+ IMAPI_S_PROPERTIESIGNORED = HRESULT((SEVERITY_SUCCESS shl 31) or (FACILITY_ITF shl 16) or $200);
+ {$EXTERNALSYM IMAPI_S_PROPERTIESIGNORED}
+ IMAPI_S_BUFFER_TO_SMALL = HRESULT((SEVERITY_SUCCESS shl 31) or (FACILITY_ITF shl 16) or $201);
+ {$EXTERNALSYM IMAPI_S_BUFFER_TO_SMALL}
+ IMAPI_E_NOTOPENED = HRESULT((SEVERITY_ERROR shl 31) or (FACILITY_ITF shl 16) or $200 + 11);
+ {$EXTERNALSYM IMAPI_E_NOTOPENED}
+ IMAPI_E_NOTINITIALIZED = HRESULT((SEVERITY_ERROR shl 31) or (FACILITY_ITF shl 16) or $200 + 12);
+ {$EXTERNALSYM IMAPI_E_NOTINITIALIZED}
+ IMAPI_E_USERABORT = HRESULT((SEVERITY_ERROR shl 31) or (FACILITY_ITF shl 16) or $200 + 13);
+ {$EXTERNALSYM IMAPI_E_USERABORT}
+ IMAPI_E_GENERIC = HRESULT((SEVERITY_ERROR shl 31) or (FACILITY_ITF shl 16) or $200 + 14);
+ {$EXTERNALSYM IMAPI_E_GENERIC}
+ IMAPI_E_MEDIUM_NOTPRESENT = HRESULT((SEVERITY_ERROR shl 31) or (FACILITY_ITF shl 16) or $200 + 15);
+ {$EXTERNALSYM IMAPI_E_MEDIUM_NOTPRESENT}
+ IMAPI_E_MEDIUM_INVALIDTYPE = HRESULT((SEVERITY_ERROR shl 31) or (FACILITY_ITF shl 16) or $200 + 16);
+ {$EXTERNALSYM IMAPI_E_MEDIUM_INVALIDTYPE}
+ IMAPI_E_DEVICE_NOPROPERTIES = HRESULT((SEVERITY_ERROR shl 31) or (FACILITY_ITF shl 16) or $200 + 17);
+ {$EXTERNALSYM IMAPI_E_DEVICE_NOPROPERTIES}
+ IMAPI_E_DEVICE_NOTACCESSIBLE = HRESULT((SEVERITY_ERROR shl 31) or (FACILITY_ITF shl 16) or $200 + 18);
+ {$EXTERNALSYM IMAPI_E_DEVICE_NOTACCESSIBLE}
+ IMAPI_E_DEVICE_NOTPRESENT = HRESULT((SEVERITY_ERROR shl 31) or (FACILITY_ITF shl 16) or $200 + 19);
+ {$EXTERNALSYM IMAPI_E_DEVICE_NOTPRESENT}
+ IMAPI_E_DEVICE_INVALIDTYPE = HRESULT((SEVERITY_ERROR shl 31) or (FACILITY_ITF shl 16) or $200 + 20);
+ {$EXTERNALSYM IMAPI_E_DEVICE_INVALIDTYPE}
+ IMAPI_E_INITIALIZE_WRITE = HRESULT((SEVERITY_ERROR shl 31) or (FACILITY_ITF shl 16) or $200 + 21);
+ {$EXTERNALSYM IMAPI_E_INITIALIZE_WRITE}
+ IMAPI_E_INITIALIZE_ENDWRITE = HRESULT((SEVERITY_ERROR shl 31) or (FACILITY_ITF shl 16) or $200 + 22);
+ {$EXTERNALSYM IMAPI_E_INITIALIZE_ENDWRITE}
+ IMAPI_E_FILESYSTEM = HRESULT((SEVERITY_ERROR shl 31) or (FACILITY_ITF shl 16) or $200 + 23);
+ {$EXTERNALSYM IMAPI_E_FILESYSTEM}
+ IMAPI_E_FILEACCESS = HRESULT((SEVERITY_ERROR shl 31) or (FACILITY_ITF shl 16) or $200 + 24);
+ {$EXTERNALSYM IMAPI_E_FILEACCESS}
+ IMAPI_E_DISCINFO = HRESULT((SEVERITY_ERROR shl 31) or (FACILITY_ITF shl 16) or $200 + 25);
+ {$EXTERNALSYM IMAPI_E_DISCINFO}
+ IMAPI_E_TRACKNOTOPEN = HRESULT((SEVERITY_ERROR shl 31) or (FACILITY_ITF shl 16) or $200 + 26);
+ {$EXTERNALSYM IMAPI_E_TRACKNOTOPEN}
+ IMAPI_E_TRACKOPEN = HRESULT((SEVERITY_ERROR shl 31) or (FACILITY_ITF shl 16) or $200 + 27);
+ {$EXTERNALSYM IMAPI_E_TRACKOPEN}
+ IMAPI_E_DISCFULL = HRESULT((SEVERITY_ERROR shl 31) or (FACILITY_ITF shl 16) or $200 + 28);
+ {$EXTERNALSYM IMAPI_E_DISCFULL}
+ IMAPI_E_BADJOLIETNAME = HRESULT((SEVERITY_ERROR shl 31) or (FACILITY_ITF shl 16) or $200 + 29);
+ {$EXTERNALSYM IMAPI_E_BADJOLIETNAME}
+ IMAPI_E_INVALIDIMAGE = HRESULT((SEVERITY_ERROR shl 31) or (FACILITY_ITF shl 16) or $200 + 30);
+ {$EXTERNALSYM IMAPI_E_INVALIDIMAGE}
+ IMAPI_E_NOACTIVEFORMAT = HRESULT((SEVERITY_ERROR shl 31) or (FACILITY_ITF shl 16) or $200 + 31);
+ {$EXTERNALSYM IMAPI_E_NOACTIVEFORMAT}
+ IMAPI_E_NOACTIVERECORDER = HRESULT((SEVERITY_ERROR shl 31) or (FACILITY_ITF shl 16) or $200 + 32);
+ {$EXTERNALSYM IMAPI_E_NOACTIVERECORDER}
+ IMAPI_E_WRONGFORMAT = HRESULT((SEVERITY_ERROR shl 31) or (FACILITY_ITF shl 16) or $200 + 33);
+ {$EXTERNALSYM IMAPI_E_WRONGFORMAT}
+ IMAPI_E_ALREADYOPEN = HRESULT((SEVERITY_ERROR shl 31) or (FACILITY_ITF shl 16) or $200 + 34);
+ {$EXTERNALSYM IMAPI_E_ALREADYOPEN}
+ IMAPI_E_WRONGDISC = HRESULT((SEVERITY_ERROR shl 31) or (FACILITY_ITF shl 16) or $200 + 35);
+ {$EXTERNALSYM IMAPI_E_WRONGDISC}
+ IMAPI_E_FILEEXISTS = HRESULT((SEVERITY_ERROR shl 31) or (FACILITY_ITF shl 16) or $200 + 36);
+ {$EXTERNALSYM IMAPI_E_FILEEXISTS}
+ IMAPI_E_STASHINUSE = HRESULT((SEVERITY_ERROR shl 31) or (FACILITY_ITF shl 16) or $200 + 37);
+ {$EXTERNALSYM IMAPI_E_STASHINUSE}
+ IMAPI_E_DEVICE_STILL_IN_USE = HRESULT((SEVERITY_ERROR shl 31) or (FACILITY_ITF shl 16) or $200 + 38);
+ {$EXTERNALSYM IMAPI_E_DEVICE_STILL_IN_USE}
+ IMAPI_E_LOSS_OF_STREAMING = HRESULT((SEVERITY_ERROR shl 31) or (FACILITY_ITF shl 16) or $200 + 39);
+ {$EXTERNALSYM IMAPI_E_LOSS_OF_STREAMING}
+ IMAPI_E_COMPRESSEDSTASH = HRESULT((SEVERITY_ERROR shl 31) or (FACILITY_ITF shl 16) or $200 + 40);
+ {$EXTERNALSYM IMAPI_E_COMPRESSEDSTASH}
+ IMAPI_E_ENCRYPTEDSTASH = HRESULT((SEVERITY_ERROR shl 31) or (FACILITY_ITF shl 16) or $200 + 41);
+ {$EXTERNALSYM IMAPI_E_ENCRYPTEDSTASH}
+ IMAPI_E_NOTENOUGHDISKFORSTASH = HRESULT((SEVERITY_ERROR shl 31) or (FACILITY_ITF shl 16) or $200 + 42);
+ {$EXTERNALSYM IMAPI_E_NOTENOUGHDISKFORSTASH}
+ IMAPI_E_REMOVABLESTASH = HRESULT((SEVERITY_ERROR shl 31) or (FACILITY_ITF shl 16) or $200 + 43);
+ {$EXTERNALSYM IMAPI_E_REMOVABLESTASH}
+ IMAPI_E_CANNOT_WRITE_TO_MEDIA = HRESULT((SEVERITY_ERROR shl 31) or (FACILITY_ITF shl 16) or $200 + 44);
+ {$EXTERNALSYM IMAPI_E_CANNOT_WRITE_TO_MEDIA}
+ IMAPI_E_TRACK_NOT_BIG_ENOUGH = HRESULT((SEVERITY_ERROR shl 31) or (FACILITY_ITF shl 16) or $200 + 45);
+ {$EXTERNALSYM IMAPI_E_TRACK_NOT_BIG_ENOUGH}
+ IMAPI_E_BOOTIMAGE_AND_NONBLANK_DISC = HRESULT((SEVERITY_ERROR shl 31) or (FACILITY_ITF shl 16) or $200 + 46);
+ {$EXTERNALSYM IMAPI_E_BOOTIMAGE_AND_NONBLANK_DISC}
+
+implementation
+
+end.
diff --git a/packages/extra/winunits/jwaime.pas b/packages/extra/winunits/jwaime.pas
index ad07d3d148..327b597e73 100644
--- a/packages/extra/winunits/jwaime.pas
+++ b/packages/extra/winunits/jwaime.pas
@@ -1,453 +1,453 @@
-{******************************************************************************}
-{ }
-{ IME Component API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: ime.h, released June 2000. The original Pascal }
-{ code is: Ime.pas, released December 2000. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwaime.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaIme;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "Ime.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaWinType;
-
-const
- IME_MAXPROCESS = 32;
- {$EXTERNALSYM IME_MAXPROCESS}
-
-function SendIMEMessageExA(hWnd: HWND; lParam: LPARAM): LRESULT; stdcall;
-{$EXTERNALSYM SendIMEMessageExA}
-function SendIMEMessageExW(hWnd: HWND; lParam: LPARAM): LRESULT; stdcall;
-{$EXTERNALSYM SendIMEMessageExW}
-function SendIMEMessageEx(hWnd: HWND; lParam: LPARAM): LRESULT; stdcall;
-{$EXTERNALSYM SendIMEMessageEx}
-
-//
-// IMESTRUCT structure for SendIMEMessageEx
-//
-
-type
- tagIMESTRUCT = record
- fnc: UINT; // function code
- wParam: WPARAM; // word parameter
- wCount: UINT; // word counter
- dchSource: UINT; // offset to Source from top of memory object
- dchDest: UINT; // offset to Desrination from top of memory object
- lParam1: LPARAM;
- lParam2: LPARAM;
- lParam3: LPARAM;
- end;
- {$EXTERNALSYM tagIMESTRUCT}
- IMESTRUCT = tagIMESTRUCT;
- {$EXTERNALSYM IMESTRUCT}
- LPIMESTRUCT = ^IMESTRUCT;
- {$EXTERNALSYM LPIMESTRUCT}
- PIMESTRUCT = ^IMESTRUCT;
- {$EXTERNALSYM PIMESTRUCT}
- NPIMESTRUCT = ^IMESTRUCT;
- {$EXTERNALSYM NPIMESTRUCT}
- TImeStruct = IMESTRUCT;
-
-const
- CP_HWND = 0;
- {$EXTERNALSYM CP_HWND}
- CP_OPEN = 1;
- {$EXTERNALSYM CP_OPEN}
- CP_DIRECT = 2;
- {$EXTERNALSYM CP_DIRECT}
- CP_LEVEL = 3;
- {$EXTERNALSYM CP_LEVEL}
-
-//
-// Virtual Keys
-//
-
- VK_DBE_ALPHANUMERIC = $0f0;
- {$EXTERNALSYM VK_DBE_ALPHANUMERIC}
- VK_DBE_KATAKANA = $0f1;
- {$EXTERNALSYM VK_DBE_KATAKANA}
- VK_DBE_HIRAGANA = $0f2;
- {$EXTERNALSYM VK_DBE_HIRAGANA}
- VK_DBE_SBCSCHAR = $0f3;
- {$EXTERNALSYM VK_DBE_SBCSCHAR}
- VK_DBE_DBCSCHAR = $0f4;
- {$EXTERNALSYM VK_DBE_DBCSCHAR}
- VK_DBE_ROMAN = $0f5;
- {$EXTERNALSYM VK_DBE_ROMAN}
- VK_DBE_NOROMAN = $0f6;
- {$EXTERNALSYM VK_DBE_NOROMAN}
- VK_DBE_ENTERWORDREGISTERMODE = $0f7;
- {$EXTERNALSYM VK_DBE_ENTERWORDREGISTERMODE}
- VK_DBE_ENTERIMECONFIGMODE = $0f8;
- {$EXTERNALSYM VK_DBE_ENTERIMECONFIGMODE}
- VK_DBE_FLUSHSTRING = $0f9;
- {$EXTERNALSYM VK_DBE_FLUSHSTRING}
- VK_DBE_CODEINPUT = $0fa;
- {$EXTERNALSYM VK_DBE_CODEINPUT}
- VK_DBE_NOCODEINPUT = $0fb;
- {$EXTERNALSYM VK_DBE_NOCODEINPUT}
- VK_DBE_DETERMINESTRING = $0fc;
- {$EXTERNALSYM VK_DBE_DETERMINESTRING}
- VK_DBE_ENTERDLGCONVERSIONMODE = $0fd;
- {$EXTERNALSYM VK_DBE_ENTERDLGCONVERSIONMODE}
-
-//
-// switch for wParam of IME_SETCONVERSIONWINDOW
-//
-
- MCW_DEFAULT = $00;
- {$EXTERNALSYM MCW_DEFAULT}
- MCW_RECT = $01;
- {$EXTERNALSYM MCW_RECT}
- MCW_WINDOW = $02;
- {$EXTERNALSYM MCW_WINDOW}
- MCW_SCREEN = $04;
- {$EXTERNALSYM MCW_SCREEN}
- MCW_VERTICAL = $08;
- {$EXTERNALSYM MCW_VERTICAL}
- MCW_HIDDEN = $10;
- {$EXTERNALSYM MCW_HIDDEN}
-
-//
-// switch for wParam of IME_SETCONVERSIONMODE
-// and IME_GETCONVERSIONMODE
-//
-
- IME_MODE_ALPHANUMERIC = $0001;
- {$EXTERNALSYM IME_MODE_ALPHANUMERIC}
-
- {$IFDEF KOREA} // BeomOh - 9/29/92
- IME_MODE_SBCSCHAR = $0002;
- {$EXTERNALSYM IME_MODE_SBCSCHAR}
- {$ELSE}
- IME_MODE_SBCSCHAR = $0008;
- {$EXTERNALSYM IME_MODE_SBCSCHAR}
- {$ENDIF KOREA}
-
- IME_MODE_KATAKANA = $0002;
- {$EXTERNALSYM IME_MODE_KATAKANA}
- IME_MODE_HIRAGANA = $0004;
- {$EXTERNALSYM IME_MODE_HIRAGANA}
- IME_MODE_HANJACONVERT = $0004;
- {$EXTERNALSYM IME_MODE_HANJACONVERT}
- IME_MODE_DBCSCHAR = $0010;
- {$EXTERNALSYM IME_MODE_DBCSCHAR}
- IME_MODE_ROMAN = $0020;
- {$EXTERNALSYM IME_MODE_ROMAN}
- IME_MODE_NOROMAN = $0040;
- {$EXTERNALSYM IME_MODE_NOROMAN}
- IME_MODE_CODEINPUT = $0080;
- {$EXTERNALSYM IME_MODE_CODEINPUT}
- IME_MODE_NOCODEINPUT = $0100;
- {$EXTERNALSYM IME_MODE_NOCODEINPUT}
-
-//
-//
-
-//
-// IME APIs
-//
-
- IME_GETIMECAPS = $03;
- {$EXTERNALSYM IME_GETIMECAPS}
- IME_SETOPEN = $04;
- {$EXTERNALSYM IME_SETOPEN}
- IME_GETOPEN = $05;
- {$EXTERNALSYM IME_GETOPEN}
- IME_GETVERSION = $07;
- {$EXTERNALSYM IME_GETVERSION}
- IME_SETCONVERSIONWINDOW = $08;
- {$EXTERNALSYM IME_SETCONVERSIONWINDOW}
- IME_MOVEIMEWINDOW = IME_SETCONVERSIONWINDOW; // KOREA only
- {$EXTERNALSYM IME_MOVEIMEWINDOW}
- IME_SETCONVERSIONMODE = $10;
- {$EXTERNALSYM IME_SETCONVERSIONMODE}
-
- IME_GETCONVERSIONMODE = $11;
- {$EXTERNALSYM IME_GETCONVERSIONMODE}
- IME_SET_MODE = $12; // KOREA only
- {$EXTERNALSYM IME_SET_MODE}
- IME_SENDVKEY = $13;
- {$EXTERNALSYM IME_SENDVKEY}
- IME_ENTERWORDREGISTERMODE = $18;
- {$EXTERNALSYM IME_ENTERWORDREGISTERMODE}
- IME_SETCONVERSIONFONTEX = $19;
- {$EXTERNALSYM IME_SETCONVERSIONFONTEX}
-
-//
-// IME_CODECONVERT subfunctions
-//
-
- IME_BANJAtoJUNJA = $13; // KOREA only
- {$EXTERNALSYM IME_BANJAtoJUNJA}
- IME_JUNJAtoBANJA = $14; // KOREA only
- {$EXTERNALSYM IME_JUNJAtoBANJA}
- IME_JOHABtoKS = $15; // KOREA only
- {$EXTERNALSYM IME_JOHABtoKS}
- IME_KStoJOHAB = $16; // KOREA only
- {$EXTERNALSYM IME_KStoJOHAB}
-
-//
-// IME_AUTOMATA subfunctions
-//
-
- IMEA_INIT = $01; // KOREA only
- {$EXTERNALSYM IMEA_INIT}
- IMEA_NEXT = $02; // KOREA only
- {$EXTERNALSYM IMEA_NEXT}
- IMEA_PREV = $03; // KOREA only
- {$EXTERNALSYM IMEA_PREV}
-
-//
-// IME_HANJAMODE subfunctions
-//
-
- IME_REQUEST_CONVERT = $01; // KOREA only
- {$EXTERNALSYM IME_REQUEST_CONVERT}
- IME_ENABLE_CONVERT = $02; // KOREA only
- {$EXTERNALSYM IME_ENABLE_CONVERT}
-
-//
-// IME_MOVEIMEWINDOW subfunctions
-//
-
- INTERIM_WINDOW = $00; // KOREA only
- {$EXTERNALSYM INTERIM_WINDOW}
- MODE_WINDOW = $01; // KOREA only
- {$EXTERNALSYM MODE_WINDOW}
- HANJA_WINDOW = $02; // KOREA only
- {$EXTERNALSYM HANJA_WINDOW}
-
-//
-// error code
-//
-
- IME_RS_ERROR = $01; // genetal error
- {$EXTERNALSYM IME_RS_ERROR}
- IME_RS_NOIME = $02; // IME is not installed
- {$EXTERNALSYM IME_RS_NOIME}
- IME_RS_TOOLONG = $05; // given string is too long
- {$EXTERNALSYM IME_RS_TOOLONG}
- IME_RS_ILLEGAL = $06; // illegal charactor(s) is string
- {$EXTERNALSYM IME_RS_ILLEGAL}
- IME_RS_NOTFOUND = $07; // no (more) candidate
- {$EXTERNALSYM IME_RS_NOTFOUND}
- IME_RS_NOROOM = $0a; // no disk/memory space
- {$EXTERNALSYM IME_RS_NOROOM}
- IME_RS_DISKERROR = $0e; // disk I/O error
- {$EXTERNALSYM IME_RS_DISKERROR}
- IME_RS_INVALID = $11; // Win3.1/NT
- {$EXTERNALSYM IME_RS_INVALID}
- IME_RS_NEST = $12; // called nested
- {$EXTERNALSYM IME_RS_NEST}
- IME_RS_SYSTEMMODAL = $13; // called when system mode
- {$EXTERNALSYM IME_RS_SYSTEMMODAL}
-
-//
-// report messge from IME to WinApps
-//
-
- WM_IME_REPORT = $0280;
- {$EXTERNALSYM WM_IME_REPORT}
-
-//
-// report message parameter for WM_IME_REPORT
-//
-
- IR_STRINGSTART = $100;
- {$EXTERNALSYM IR_STRINGSTART}
- IR_STRINGEND = $101;
- {$EXTERNALSYM IR_STRINGEND}
- IR_OPENCONVERT = $120;
- {$EXTERNALSYM IR_OPENCONVERT}
- IR_CHANGECONVERT = $121;
- {$EXTERNALSYM IR_CHANGECONVERT}
- IR_CLOSECONVERT = $122;
- {$EXTERNALSYM IR_CLOSECONVERT}
- IR_FULLCONVERT = $123;
- {$EXTERNALSYM IR_FULLCONVERT}
- IR_IMESELECT = $130;
- {$EXTERNALSYM IR_IMESELECT}
- IR_STRING = $140;
- {$EXTERNALSYM IR_STRING}
- IR_DBCSCHAR = $160;
- {$EXTERNALSYM IR_DBCSCHAR}
- IR_UNDETERMINE = $170;
- {$EXTERNALSYM IR_UNDETERMINE}
- IR_STRINGEX = $180; // New for 3.1
- {$EXTERNALSYM IR_STRINGEX}
- IR_MODEINFO = $190;
- {$EXTERNALSYM IR_MODEINFO}
-
-//#define WM_CONVERTREQUESTEX 0x0109
-
- WM_WNT_CONVERTREQUESTEX = $0109; // WM_CONVERTREQUESTEX: 109 for NT, 108 for OT
- {$EXTERNALSYM WM_WNT_CONVERTREQUESTEX}
- WM_CONVERTREQUEST = $010A;
- {$EXTERNALSYM WM_CONVERTREQUEST}
- WM_CONVERTRESULT = $010B;
- {$EXTERNALSYM WM_CONVERTRESULT}
- WM_INTERIM = $010C;
- {$EXTERNALSYM WM_INTERIM}
-
- WM_IMEKEYDOWN = $290;
- {$EXTERNALSYM WM_IMEKEYDOWN}
- WM_IMEKEYUP = $291;
- {$EXTERNALSYM WM_IMEKEYUP}
-
-//
-// UNDETERMINESTRING structure for IR_UNDETERMINE
-//
-
-type
- tagUNDETERMINESTRUCT = record
- dwSize: DWORD;
- uDefIMESize: UINT;
- uDefIMEPos: UINT;
- uUndetTextLen: UINT;
- uUndetTextPos: UINT;
- uUndetAttrPos: UINT;
- uCursorPos: UINT;
- uDeltaStart: UINT;
- uDetermineTextLen: UINT;
- uDetermineTextPos: UINT;
- uDetermineDelimPos: UINT;
- uYomiTextLen: UINT;
- uYomiTextPos: UINT;
- uYomiDelimPos: UINT;
- end;
- {$EXTERNALSYM tagUNDETERMINESTRUCT}
- UNDETERMINESTRUCT = tagUNDETERMINESTRUCT;
- {$EXTERNALSYM UNDETERMINESTRUCT}
- LPUNDETERMINESTRUCT = ^UNDETERMINESTRUCT;
- {$EXTERNALSYM LPUNDETERMINESTRUCT}
- PUNDETERMINESTRUCT = ^UNDETERMINESTRUCT;
- {$EXTERNALSYM PUNDETERMINESTRUCT}
- NPUNDETERMINESTRUCT = ^UNDETERMINESTRUCT;
- {$EXTERNALSYM NPUNDETERMINESTRUCT}
- TUndetermineStruct = UNDETERMINESTRUCT;
-
- tagSTRINGEXSTRUCT = record
- dwSize: DWORD;
- uDeterminePos: UINT;
- uDetermineDelimPos: UINT;
- uYomiPos: UINT;
- uYomiDelimPos: UINT;
- end;
- {$EXTERNALSYM tagSTRINGEXSTRUCT}
- STRINGEXSTRUCT = tagSTRINGEXSTRUCT;
- {$EXTERNALSYM STRINGEXSTRUCT}
- LPSTRINGEXSTRUCT = ^STRINGEXSTRUCT;
- {$EXTERNALSYM LPSTRINGEXSTRUCT}
- PSTRINGEXSTRUCT = ^STRINGEXSTRUCT;
- {$EXTERNALSYM PSTRINGEXSTRUCT}
- NPSTRINGEXSTRUCT = ^STRINGEXSTRUCT;
- {$EXTERNALSYM NPSTRINGEXSTRUCT}
- TStringexStruct = STRINGEXSTRUCT;
-
-implementation
-
-const
- imelib = 'user32.dll';
- {$IFDEF UNICODE}
- AWSuffix = 'W';
- {$ELSE}
- AWSuffix = 'A';
- {$ENDIF UNICODE}
-
-{$IFDEF DYNAMIC_LINK}
-
-var
- _SendIMEMessageExA: Pointer;
-
-function SendIMEMessageExA;
-begin
- GetProcedureAddress(_SendIMEMessageExA, imelib, 'SendIMEMessageExA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SendIMEMessageExA]
- end;
-end;
-
-var
- _SendIMEMessageExW: Pointer;
-
-function SendIMEMessageExW;
-begin
- GetProcedureAddress(_SendIMEMessageExW, imelib, 'SendIMEMessageExW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SendIMEMessageExW]
- end;
-end;
-
-var
- _SendIMEMessageEx: Pointer;
-
-function SendIMEMessageEx;
-begin
- GetProcedureAddress(_SendIMEMessageEx, imelib, 'SendIMEMessageEx' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SendIMEMessageEx]
- end;
-end;
-
-{$ELSE}
-
-function SendIMEMessageExA; external imelib name 'SendIMEMessageExA';
-function SendIMEMessageExW; external imelib name 'SendIMEMessageExW';
-function SendIMEMessageEx; external imelib name 'SendIMEMessageEx' + AWSuffix;
-
-{$ENDIF DYNAMIC_LINK}
-
-end.
+{******************************************************************************}
+{ }
+{ IME Component API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: ime.h, released June 2000. The original Pascal }
+{ code is: Ime.pas, released December 2000. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwaime.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaIme;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "Ime.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaWinType;
+
+const
+ IME_MAXPROCESS = 32;
+ {$EXTERNALSYM IME_MAXPROCESS}
+
+function SendIMEMessageExA(hWnd: HWND; lParam: LPARAM): LRESULT; stdcall;
+{$EXTERNALSYM SendIMEMessageExA}
+function SendIMEMessageExW(hWnd: HWND; lParam: LPARAM): LRESULT; stdcall;
+{$EXTERNALSYM SendIMEMessageExW}
+function SendIMEMessageEx(hWnd: HWND; lParam: LPARAM): LRESULT; stdcall;
+{$EXTERNALSYM SendIMEMessageEx}
+
+//
+// IMESTRUCT structure for SendIMEMessageEx
+//
+
+type
+ tagIMESTRUCT = record
+ fnc: UINT; // function code
+ wParam: WPARAM; // word parameter
+ wCount: UINT; // word counter
+ dchSource: UINT; // offset to Source from top of memory object
+ dchDest: UINT; // offset to Desrination from top of memory object
+ lParam1: LPARAM;
+ lParam2: LPARAM;
+ lParam3: LPARAM;
+ end;
+ {$EXTERNALSYM tagIMESTRUCT}
+ IMESTRUCT = tagIMESTRUCT;
+ {$EXTERNALSYM IMESTRUCT}
+ LPIMESTRUCT = ^IMESTRUCT;
+ {$EXTERNALSYM LPIMESTRUCT}
+ PIMESTRUCT = ^IMESTRUCT;
+ {$EXTERNALSYM PIMESTRUCT}
+ NPIMESTRUCT = ^IMESTRUCT;
+ {$EXTERNALSYM NPIMESTRUCT}
+ TImeStruct = IMESTRUCT;
+
+const
+ CP_HWND = 0;
+ {$EXTERNALSYM CP_HWND}
+ CP_OPEN = 1;
+ {$EXTERNALSYM CP_OPEN}
+ CP_DIRECT = 2;
+ {$EXTERNALSYM CP_DIRECT}
+ CP_LEVEL = 3;
+ {$EXTERNALSYM CP_LEVEL}
+
+//
+// Virtual Keys
+//
+
+ VK_DBE_ALPHANUMERIC = $0f0;
+ {$EXTERNALSYM VK_DBE_ALPHANUMERIC}
+ VK_DBE_KATAKANA = $0f1;
+ {$EXTERNALSYM VK_DBE_KATAKANA}
+ VK_DBE_HIRAGANA = $0f2;
+ {$EXTERNALSYM VK_DBE_HIRAGANA}
+ VK_DBE_SBCSCHAR = $0f3;
+ {$EXTERNALSYM VK_DBE_SBCSCHAR}
+ VK_DBE_DBCSCHAR = $0f4;
+ {$EXTERNALSYM VK_DBE_DBCSCHAR}
+ VK_DBE_ROMAN = $0f5;
+ {$EXTERNALSYM VK_DBE_ROMAN}
+ VK_DBE_NOROMAN = $0f6;
+ {$EXTERNALSYM VK_DBE_NOROMAN}
+ VK_DBE_ENTERWORDREGISTERMODE = $0f7;
+ {$EXTERNALSYM VK_DBE_ENTERWORDREGISTERMODE}
+ VK_DBE_ENTERIMECONFIGMODE = $0f8;
+ {$EXTERNALSYM VK_DBE_ENTERIMECONFIGMODE}
+ VK_DBE_FLUSHSTRING = $0f9;
+ {$EXTERNALSYM VK_DBE_FLUSHSTRING}
+ VK_DBE_CODEINPUT = $0fa;
+ {$EXTERNALSYM VK_DBE_CODEINPUT}
+ VK_DBE_NOCODEINPUT = $0fb;
+ {$EXTERNALSYM VK_DBE_NOCODEINPUT}
+ VK_DBE_DETERMINESTRING = $0fc;
+ {$EXTERNALSYM VK_DBE_DETERMINESTRING}
+ VK_DBE_ENTERDLGCONVERSIONMODE = $0fd;
+ {$EXTERNALSYM VK_DBE_ENTERDLGCONVERSIONMODE}
+
+//
+// switch for wParam of IME_SETCONVERSIONWINDOW
+//
+
+ MCW_DEFAULT = $00;
+ {$EXTERNALSYM MCW_DEFAULT}
+ MCW_RECT = $01;
+ {$EXTERNALSYM MCW_RECT}
+ MCW_WINDOW = $02;
+ {$EXTERNALSYM MCW_WINDOW}
+ MCW_SCREEN = $04;
+ {$EXTERNALSYM MCW_SCREEN}
+ MCW_VERTICAL = $08;
+ {$EXTERNALSYM MCW_VERTICAL}
+ MCW_HIDDEN = $10;
+ {$EXTERNALSYM MCW_HIDDEN}
+
+//
+// switch for wParam of IME_SETCONVERSIONMODE
+// and IME_GETCONVERSIONMODE
+//
+
+ IME_MODE_ALPHANUMERIC = $0001;
+ {$EXTERNALSYM IME_MODE_ALPHANUMERIC}
+
+ {$IFDEF KOREA} // BeomOh - 9/29/92
+ IME_MODE_SBCSCHAR = $0002;
+ {$EXTERNALSYM IME_MODE_SBCSCHAR}
+ {$ELSE}
+ IME_MODE_SBCSCHAR = $0008;
+ {$EXTERNALSYM IME_MODE_SBCSCHAR}
+ {$ENDIF KOREA}
+
+ IME_MODE_KATAKANA = $0002;
+ {$EXTERNALSYM IME_MODE_KATAKANA}
+ IME_MODE_HIRAGANA = $0004;
+ {$EXTERNALSYM IME_MODE_HIRAGANA}
+ IME_MODE_HANJACONVERT = $0004;
+ {$EXTERNALSYM IME_MODE_HANJACONVERT}
+ IME_MODE_DBCSCHAR = $0010;
+ {$EXTERNALSYM IME_MODE_DBCSCHAR}
+ IME_MODE_ROMAN = $0020;
+ {$EXTERNALSYM IME_MODE_ROMAN}
+ IME_MODE_NOROMAN = $0040;
+ {$EXTERNALSYM IME_MODE_NOROMAN}
+ IME_MODE_CODEINPUT = $0080;
+ {$EXTERNALSYM IME_MODE_CODEINPUT}
+ IME_MODE_NOCODEINPUT = $0100;
+ {$EXTERNALSYM IME_MODE_NOCODEINPUT}
+
+//
+//
+
+//
+// IME APIs
+//
+
+ IME_GETIMECAPS = $03;
+ {$EXTERNALSYM IME_GETIMECAPS}
+ IME_SETOPEN = $04;
+ {$EXTERNALSYM IME_SETOPEN}
+ IME_GETOPEN = $05;
+ {$EXTERNALSYM IME_GETOPEN}
+ IME_GETVERSION = $07;
+ {$EXTERNALSYM IME_GETVERSION}
+ IME_SETCONVERSIONWINDOW = $08;
+ {$EXTERNALSYM IME_SETCONVERSIONWINDOW}
+ IME_MOVEIMEWINDOW = IME_SETCONVERSIONWINDOW; // KOREA only
+ {$EXTERNALSYM IME_MOVEIMEWINDOW}
+ IME_SETCONVERSIONMODE = $10;
+ {$EXTERNALSYM IME_SETCONVERSIONMODE}
+
+ IME_GETCONVERSIONMODE = $11;
+ {$EXTERNALSYM IME_GETCONVERSIONMODE}
+ IME_SET_MODE = $12; // KOREA only
+ {$EXTERNALSYM IME_SET_MODE}
+ IME_SENDVKEY = $13;
+ {$EXTERNALSYM IME_SENDVKEY}
+ IME_ENTERWORDREGISTERMODE = $18;
+ {$EXTERNALSYM IME_ENTERWORDREGISTERMODE}
+ IME_SETCONVERSIONFONTEX = $19;
+ {$EXTERNALSYM IME_SETCONVERSIONFONTEX}
+
+//
+// IME_CODECONVERT subfunctions
+//
+
+ IME_BANJAtoJUNJA = $13; // KOREA only
+ {$EXTERNALSYM IME_BANJAtoJUNJA}
+ IME_JUNJAtoBANJA = $14; // KOREA only
+ {$EXTERNALSYM IME_JUNJAtoBANJA}
+ IME_JOHABtoKS = $15; // KOREA only
+ {$EXTERNALSYM IME_JOHABtoKS}
+ IME_KStoJOHAB = $16; // KOREA only
+ {$EXTERNALSYM IME_KStoJOHAB}
+
+//
+// IME_AUTOMATA subfunctions
+//
+
+ IMEA_INIT = $01; // KOREA only
+ {$EXTERNALSYM IMEA_INIT}
+ IMEA_NEXT = $02; // KOREA only
+ {$EXTERNALSYM IMEA_NEXT}
+ IMEA_PREV = $03; // KOREA only
+ {$EXTERNALSYM IMEA_PREV}
+
+//
+// IME_HANJAMODE subfunctions
+//
+
+ IME_REQUEST_CONVERT = $01; // KOREA only
+ {$EXTERNALSYM IME_REQUEST_CONVERT}
+ IME_ENABLE_CONVERT = $02; // KOREA only
+ {$EXTERNALSYM IME_ENABLE_CONVERT}
+
+//
+// IME_MOVEIMEWINDOW subfunctions
+//
+
+ INTERIM_WINDOW = $00; // KOREA only
+ {$EXTERNALSYM INTERIM_WINDOW}
+ MODE_WINDOW = $01; // KOREA only
+ {$EXTERNALSYM MODE_WINDOW}
+ HANJA_WINDOW = $02; // KOREA only
+ {$EXTERNALSYM HANJA_WINDOW}
+
+//
+// error code
+//
+
+ IME_RS_ERROR = $01; // genetal error
+ {$EXTERNALSYM IME_RS_ERROR}
+ IME_RS_NOIME = $02; // IME is not installed
+ {$EXTERNALSYM IME_RS_NOIME}
+ IME_RS_TOOLONG = $05; // given string is too long
+ {$EXTERNALSYM IME_RS_TOOLONG}
+ IME_RS_ILLEGAL = $06; // illegal charactor(s) is string
+ {$EXTERNALSYM IME_RS_ILLEGAL}
+ IME_RS_NOTFOUND = $07; // no (more) candidate
+ {$EXTERNALSYM IME_RS_NOTFOUND}
+ IME_RS_NOROOM = $0a; // no disk/memory space
+ {$EXTERNALSYM IME_RS_NOROOM}
+ IME_RS_DISKERROR = $0e; // disk I/O error
+ {$EXTERNALSYM IME_RS_DISKERROR}
+ IME_RS_INVALID = $11; // Win3.1/NT
+ {$EXTERNALSYM IME_RS_INVALID}
+ IME_RS_NEST = $12; // called nested
+ {$EXTERNALSYM IME_RS_NEST}
+ IME_RS_SYSTEMMODAL = $13; // called when system mode
+ {$EXTERNALSYM IME_RS_SYSTEMMODAL}
+
+//
+// report messge from IME to WinApps
+//
+
+ WM_IME_REPORT = $0280;
+ {$EXTERNALSYM WM_IME_REPORT}
+
+//
+// report message parameter for WM_IME_REPORT
+//
+
+ IR_STRINGSTART = $100;
+ {$EXTERNALSYM IR_STRINGSTART}
+ IR_STRINGEND = $101;
+ {$EXTERNALSYM IR_STRINGEND}
+ IR_OPENCONVERT = $120;
+ {$EXTERNALSYM IR_OPENCONVERT}
+ IR_CHANGECONVERT = $121;
+ {$EXTERNALSYM IR_CHANGECONVERT}
+ IR_CLOSECONVERT = $122;
+ {$EXTERNALSYM IR_CLOSECONVERT}
+ IR_FULLCONVERT = $123;
+ {$EXTERNALSYM IR_FULLCONVERT}
+ IR_IMESELECT = $130;
+ {$EXTERNALSYM IR_IMESELECT}
+ IR_STRING = $140;
+ {$EXTERNALSYM IR_STRING}
+ IR_DBCSCHAR = $160;
+ {$EXTERNALSYM IR_DBCSCHAR}
+ IR_UNDETERMINE = $170;
+ {$EXTERNALSYM IR_UNDETERMINE}
+ IR_STRINGEX = $180; // New for 3.1
+ {$EXTERNALSYM IR_STRINGEX}
+ IR_MODEINFO = $190;
+ {$EXTERNALSYM IR_MODEINFO}
+
+//#define WM_CONVERTREQUESTEX 0x0109
+
+ WM_WNT_CONVERTREQUESTEX = $0109; // WM_CONVERTREQUESTEX: 109 for NT, 108 for OT
+ {$EXTERNALSYM WM_WNT_CONVERTREQUESTEX}
+ WM_CONVERTREQUEST = $010A;
+ {$EXTERNALSYM WM_CONVERTREQUEST}
+ WM_CONVERTRESULT = $010B;
+ {$EXTERNALSYM WM_CONVERTRESULT}
+ WM_INTERIM = $010C;
+ {$EXTERNALSYM WM_INTERIM}
+
+ WM_IMEKEYDOWN = $290;
+ {$EXTERNALSYM WM_IMEKEYDOWN}
+ WM_IMEKEYUP = $291;
+ {$EXTERNALSYM WM_IMEKEYUP}
+
+//
+// UNDETERMINESTRING structure for IR_UNDETERMINE
+//
+
+type
+ tagUNDETERMINESTRUCT = record
+ dwSize: DWORD;
+ uDefIMESize: UINT;
+ uDefIMEPos: UINT;
+ uUndetTextLen: UINT;
+ uUndetTextPos: UINT;
+ uUndetAttrPos: UINT;
+ uCursorPos: UINT;
+ uDeltaStart: UINT;
+ uDetermineTextLen: UINT;
+ uDetermineTextPos: UINT;
+ uDetermineDelimPos: UINT;
+ uYomiTextLen: UINT;
+ uYomiTextPos: UINT;
+ uYomiDelimPos: UINT;
+ end;
+ {$EXTERNALSYM tagUNDETERMINESTRUCT}
+ UNDETERMINESTRUCT = tagUNDETERMINESTRUCT;
+ {$EXTERNALSYM UNDETERMINESTRUCT}
+ LPUNDETERMINESTRUCT = ^UNDETERMINESTRUCT;
+ {$EXTERNALSYM LPUNDETERMINESTRUCT}
+ PUNDETERMINESTRUCT = ^UNDETERMINESTRUCT;
+ {$EXTERNALSYM PUNDETERMINESTRUCT}
+ NPUNDETERMINESTRUCT = ^UNDETERMINESTRUCT;
+ {$EXTERNALSYM NPUNDETERMINESTRUCT}
+ TUndetermineStruct = UNDETERMINESTRUCT;
+
+ tagSTRINGEXSTRUCT = record
+ dwSize: DWORD;
+ uDeterminePos: UINT;
+ uDetermineDelimPos: UINT;
+ uYomiPos: UINT;
+ uYomiDelimPos: UINT;
+ end;
+ {$EXTERNALSYM tagSTRINGEXSTRUCT}
+ STRINGEXSTRUCT = tagSTRINGEXSTRUCT;
+ {$EXTERNALSYM STRINGEXSTRUCT}
+ LPSTRINGEXSTRUCT = ^STRINGEXSTRUCT;
+ {$EXTERNALSYM LPSTRINGEXSTRUCT}
+ PSTRINGEXSTRUCT = ^STRINGEXSTRUCT;
+ {$EXTERNALSYM PSTRINGEXSTRUCT}
+ NPSTRINGEXSTRUCT = ^STRINGEXSTRUCT;
+ {$EXTERNALSYM NPSTRINGEXSTRUCT}
+ TStringexStruct = STRINGEXSTRUCT;
+
+implementation
+
+const
+ imelib = 'user32.dll';
+ {$IFDEF UNICODE}
+ AWSuffix = 'W';
+ {$ELSE}
+ AWSuffix = 'A';
+ {$ENDIF UNICODE}
+
+{$IFDEF DYNAMIC_LINK}
+
+var
+ _SendIMEMessageExA: Pointer;
+
+function SendIMEMessageExA;
+begin
+ GetProcedureAddress(_SendIMEMessageExA, imelib, 'SendIMEMessageExA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SendIMEMessageExA]
+ end;
+end;
+
+var
+ _SendIMEMessageExW: Pointer;
+
+function SendIMEMessageExW;
+begin
+ GetProcedureAddress(_SendIMEMessageExW, imelib, 'SendIMEMessageExW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SendIMEMessageExW]
+ end;
+end;
+
+var
+ _SendIMEMessageEx: Pointer;
+
+function SendIMEMessageEx;
+begin
+ GetProcedureAddress(_SendIMEMessageEx, imelib, 'SendIMEMessageEx' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SendIMEMessageEx]
+ end;
+end;
+
+{$ELSE}
+
+function SendIMEMessageExA; external imelib name 'SendIMEMessageExA';
+function SendIMEMessageExW; external imelib name 'SendIMEMessageExW';
+function SendIMEMessageEx; external imelib name 'SendIMEMessageEx' + AWSuffix;
+
+{$ENDIF DYNAMIC_LINK}
+
+end.
diff --git a/packages/extra/winunits/jwaioevent.pas b/packages/extra/winunits/jwaioevent.pas
index 30b6346022..d6f4e80bdc 100644
--- a/packages/extra/winunits/jwaioevent.pas
+++ b/packages/extra/winunits/jwaioevent.pas
@@ -1,290 +1,290 @@
-{******************************************************************************}
-{ }
-{ IO Events API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: Ioevent.h, released June 2000. The original Pascal }
-{ code is: IoEvent.pas, released December 2000. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwaioevent.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaIoEvent;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "Ioevent.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaWinType;
-
-//
-// Label change event. This event is signalled upon successful completion
-// of a label change. There is no additional data.
-//
-
-const
- GUID_IO_VOLUME_CHANGE: TGUID = (D1:$7373654a; D2:$812a; D3:$11d0; D4:($be, $c7, $08, $00, $2b, $e2, $09, $2f));
- {$EXTERNALSYM GUID_IO_VOLUME_CHANGE}
-
-//
-// Volume dismount event. This event is signalled when an attempt is made to
-// dismount a volume. There is no additional data. Note that this will not
-// necessarily be preceded by a GUID_IO_VOLUME_LOCK notification.
-//
-
- GUID_IO_VOLUME_DISMOUNT: TGUID = (D1:$d16a55e8; D2:$1059; D3:$11d2; D4:($8f, $fd, $00, $a0, $c9, $a0, $6d, $32));
- {$EXTERNALSYM GUID_IO_VOLUME_DISMOUNT}
-
-//
-// Volume dismount failed event. This event is signalled when a volume dismount fails.
-// There is no additional data.
-//
-
- GUID_IO_VOLUME_DISMOUNT_FAILED: TGUID = (D1:$e3c5b178; D2:$105d; D3:$11d2; D4:($8f, $fd, $00, $a0, $c9, $a0, $6d, $32));
- {$EXTERNALSYM GUID_IO_VOLUME_DISMOUNT_FAILED}
-
-//
-// Volume mount event. This event is signalled when a volume mount occurs.
-// There is no additional data.
-//
-
- GUID_IO_VOLUME_MOUNT: TGUID = (D1:$b5804878; D2:$1a96; D3:$11d2; D4:($8f, $fd, $00, $a0, $c9, $a0, $6d, $32));
- {$EXTERNALSYM GUID_IO_VOLUME_MOUNT}
-
-//
-// Volume lock event. This event is signalled when an attempt is made to
-// lock a volume. There is no additional data.
-//
-
- GUID_IO_VOLUME_LOCK: TGUID = (D1:$50708874; D2:$c9af; D3:$11d1; D4:($8f, $ef, $00, $a0, $c9, $a0, $6d, $32));
- {$EXTERNALSYM GUID_IO_VOLUME_LOCK}
-
-//
-// Volume lock failed event. This event is signalled when an attempt is made to
-// lock a volume, but it fails. There is no additional data.
-//
-
- GUID_IO_VOLUME_LOCK_FAILED: TGUID = (D1:$ae2eed10; D2:$0ba8; D3:$11d2; D4:($8f, $fb, $00, $a0, $c9, $a0, $6d, $32));
- {$EXTERNALSYM GUID_IO_VOLUME_LOCK_FAILED}
-
-//
-// Volume unlock event. This event is signalled when an attempt is made to
-// unlock a volume. There is no additional data.
-//
-
- GUID_IO_VOLUME_UNLOCK: TGUID = (D1:$9a8c3d68; D2:$d0cb; D3:$11d1; D4:($8f, $ef, $00, $a0, $c9, $a0, $6d, $32));
- {$EXTERNALSYM GUID_IO_VOLUME_UNLOCK}
-
-//
-// Volume name change. This event is signalled when the list of persistent
-// names (like drive letters) for a volume changes. There is no additional
-// data.
-//
-
- GUID_IO_VOLUME_NAME_CHANGE: TGUID = (D1:$2de97f83; D2:$4c06; D3:$11d2; D4:($a5, $32, $0, $60, $97, $13, $5, $5a));
- {$EXTERNALSYM GUID_IO_VOLUME_NAME_CHANGE}
-
-//
-// Volume physical configuration change. This event is signalled when the
-// physical makeup or current physical state of the volume changes.
-//
-
- GUID_IO_VOLUME_PHYSICAL_CONFIGURATION_CHANGE: TGUID = (D1:$2de97f84; D2:$4c06; D3:$11d2; D4:($a5, $32, $0, $60, $97, $13, $5, $5a));
- {$EXTERNALSYM GUID_IO_VOLUME_PHYSICAL_CONFIGURATION_CHANGE}
-
-//
-// Volume device interface. This is a device interface GUID that appears
-// when the device object associated with a volume is created and disappears
-// when the device object associated with the volume is destroyed.
-//
-
- GUID_IO_VOLUME_DEVICE_INTERFACE: TGUID = (D1:$53f5630d; D2:$b6bf; D3:$11d0; D4:($94, $f2, $00, $a0, $c9, $1e, $fb, $8b));
- {$EXTERNALSYM GUID_IO_VOLUME_DEVICE_INTERFACE}
-
-//
-// Sent when the removable media is changed (added, removed) from a device
-// (such as a CDROM, tape, changer, etc).
-//
-// The additional data is a DWORD representing the data event.
-//
-
- GUID_IO_MEDIA_ARRIVAL: TGUID = (D1:$d07433c0; D2:$a98e; D3:$11d2; D4:($91, $7a, $00, $a0, $c9, $06, $8f, $f3));
- {$EXTERNALSYM GUID_IO_MEDIA_ARRIVAL}
- GUID_IO_MEDIA_REMOVAL: TGUID = (D1:$d07433c1; D2:$a98e; D3:$11d2; D4:($91, $7a, $00, $a0, $c9, $06, $8f, $f3));
- {$EXTERNALSYM GUID_IO_MEDIA_REMOVAL}
-
-//
-// Sent when the media is returning that it is not ready right now, but will
-// be ready soon. This can be because the drive has spun down to save power
-// or because new media has been inserted but is not ready for access yet.
-//
-
- GUID_IO_DEVICE_BECOMING_READY: TGUID = (D1:$d07433f0; D2:$a98e; D3:$11d2; D4:($91, $7a, $00, $a0, $c9, $06, $8f, $f3));
- {$EXTERNALSYM GUID_IO_DEVICE_BECOMING_READY}
-
-type
- _DEVICE_EVENT_BECOMING_READY = record
- Version: ULONG;
- Reason: ULONG;
- Estimated100msToReady: ULONG;
- end;
- {$EXTERNALSYM _DEVICE_EVENT_BECOMING_READY}
- DEVICE_EVENT_BECOMING_READY = _DEVICE_EVENT_BECOMING_READY;
- {$EXTERNALSYM DEVICE_EVENT_BECOMING_READY}
- PDEVICE_EVENT_BECOMING_READY = ^DEVICE_EVENT_BECOMING_READY;
- {$EXTERNALSYM PDEVICE_EVENT_BECOMING_READY}
- TDeviceEventBecomingReady = DEVICE_EVENT_BECOMING_READY;
- PDeviceEventBecomingReady = PDEVICE_EVENT_BECOMING_READY;
-
-//
-// Sent when the user presses the eject button on the front of the drive,
-// or when other buttons on the front are pressed via GESN command polling
-// (GESN support to be added)
-//
-
-const
- GUID_IO_DEVICE_EXTERNAL_REQUEST: TGUID = (D1:$d07433d0; D2:$a98e; D3:$11d2; D4:($91, $7a, $00, $a0, $c9, $06, $8f, $f3));
- {$EXTERNALSYM GUID_IO_DEVICE_EXTERNAL_REQUEST}
- GUID_IO_MEDIA_EJECT_REQUEST: TGUID = (D1:$d07433d1; D2:$a98e; D3:$11d2; D4:($91, $7a, $00, $a0, $c9, $06, $8f, $f3));
- {$EXTERNALSYM GUID_IO_MEDIA_EJECT_REQUEST}
-
-type
- PDEVICE_EVENT_EXTERNAL_REQUEST = ^DEVICE_EVENT_EXTERNAL_REQUEST;
- {$EXTERNALSYM PDEVICE_EVENT_EXTERNAL_REQUEST}
- _DEVICE_EVENT_EXTERNAL_REQUEST = record
- Version: ULONG;
- DeviceClass: ULONG; // 0 == MMC Storage Devices
- ButtonStatus: USHORT; // 1 == down, 2 == up
- Request: USHORT;
- SystemTime: LARGE_INTEGER; // for time-related info
- end;
- {$EXTERNALSYM _DEVICE_EVENT_EXTERNAL_REQUEST}
- DEVICE_EVENT_EXTERNAL_REQUEST = _DEVICE_EVENT_EXTERNAL_REQUEST;
- {$EXTERNALSYM DEVICE_EVENT_EXTERNAL_REQUEST}
- TDeviceEventExternalRequest = DEVICE_EVENT_EXTERNAL_REQUEST;
- PDeviceEventExternalRequest = PDEVICE_EVENT_EXTERNAL_REQUEST;
-
-//
-// Sent when a tape drive requires cleaning
-//
-
-const
- GUID_IO_DRIVE_REQUIRES_CLEANING: TGUID = (D1:$7207877c; D2:$90ed; D3:$44e5; D4:($a0, $0, $81, $42, $8d, $4c, $79, $bb));
- {$EXTERNALSYM GUID_IO_DRIVE_REQUIRES_CLEANING}
-
-//
-// Sent when a tape is erased
-//
-
- GUID_IO_TAPE_ERASE: TGUID = (D1:$852d11eb; D2:$4bb8; D3:$4507; D4:($9d, $9b, $41, $7c, $c2, $b1, $b4, $38));
- {$EXTERNALSYM GUID_IO_TAPE_ERASE}
-
-type
- _DEVICE_EVENT_GENERIC_DATA = record
- EventNumber: ULONG;
- end;
- {$EXTERNALSYM _DEVICE_EVENT_GENERIC_DATA}
- DEVICE_EVENT_GENERIC_DATA = _DEVICE_EVENT_GENERIC_DATA;
- {$EXTERNALSYM DEVICE_EVENT_GENERIC_DATA}
- PDEVICE_EVENT_GENERIC_DATA = ^DEVICE_EVENT_GENERIC_DATA;
- {$EXTERNALSYM PDEVICE_EVENT_GENERIC_DATA}
- TDeviceEventGenericData = DEVICE_EVENT_GENERIC_DATA;
- PDeviceEventGenericData = PDEVICE_EVENT_GENERIC_DATA;
-
-//
-// Represents any asynchronous notification coming from a device driver whose
-// notification protocol is RBC
-// Additional data is provided
-
-const
- GUID_DEVICE_EVENT_RBC: TGUID = (D1:$d0744792; D2:$a98e; D3:$11d2; D4:($91, $7a, $00, $a0, $c9, $06, $8f, $f3));
- {$EXTERNALSYM GUID_DEVICE_EVENT_RBC}
-
-type
- _DEVICE_EVENT_RBC_DATA = record
- EventNumber: ULONG;
- SenseQualifier: UCHAR;
- SenseCode: UCHAR;
- SenseKey: UCHAR;
- Reserved: UCHAR;
- Information: ULONG;
- end;
- {$EXTERNALSYM _DEVICE_EVENT_RBC_DATA}
- DEVICE_EVENT_RBC_DATA = _DEVICE_EVENT_RBC_DATA;
- {$EXTERNALSYM DEVICE_EVENT_RBC_DATA}
- PDEVICE_EVENT_RBC_DATA = ^DEVICE_EVENT_RBC_DATA;
- {$EXTERNALSYM PDEVICE_EVENT_RBC_DATA}
- TDeviceEventRbcData = DEVICE_EVENT_RBC_DATA;
- PDeviceEventRbcData = PDEVICE_EVENT_RBC_DATA;
-
-//
-// A clone of this disk has just arrived in the system.
-//
-
-const
- GUID_IO_DISK_CLONE_ARRIVAL: TGUID = (D1:$6a61885b; D2:$7c39; D3:$43dd; D4:($9b, $56, $b8, $ac, $22, $a5, $49, $aa));
- {$EXTERNALSYM GUID_IO_DISK_CLONE_ARRIVAL}
-
-type
- _GUID_IO_DISK_CLONE_ARRIVAL_INFORMATION = record
- DiskNumber: ULONG; // The disk number of the new disk arriving in the system.
- end;
- {$EXTERNALSYM _GUID_IO_DISK_CLONE_ARRIVAL_INFORMATION}
- GUID_IO_DISK_CLONE_ARRIVAL_INFORMATION = _GUID_IO_DISK_CLONE_ARRIVAL_INFORMATION;
- {$EXTERNALSYM GUID_IO_DISK_CLONE_ARRIVAL_INFORMATION}
- PGUID_IO_DISK_CLONE_ARRIVAL_INFORMATION = ^GUID_IO_DISK_CLONE_ARRIVAL_INFORMATION;
- {$EXTERNALSYM PGUID_IO_DISK_CLONE_ARRIVAL_INFORMATION}
- TGuidIoDiskCloneArrivalInformation = GUID_IO_DISK_CLONE_ARRIVAL_INFORMATION;
- PGuidIoDiskCloneArrivalInformation = PGUID_IO_DISK_CLONE_ARRIVAL_INFORMATION;
-
-//
-// The disk layout has changed
-//
-
-const
- GUID_IO_DISK_LAYOUT_CHANGE: TGUID = (D1:$11dff54c; D2:$8469; D3:$41f9; D4:($b3, $de, $ef, $83, $64, $87, $c5, $4a));
- {$EXTERNALSYM GUID_IO_DISK_LAYOUT_CHANGE}
-
-implementation
-
-end.
+{******************************************************************************}
+{ }
+{ IO Events API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: Ioevent.h, released June 2000. The original Pascal }
+{ code is: IoEvent.pas, released December 2000. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwaioevent.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaIoEvent;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "Ioevent.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaWinType;
+
+//
+// Label change event. This event is signalled upon successful completion
+// of a label change. There is no additional data.
+//
+
+const
+ GUID_IO_VOLUME_CHANGE: TGUID = (D1:$7373654a; D2:$812a; D3:$11d0; D4:($be, $c7, $08, $00, $2b, $e2, $09, $2f));
+ {$EXTERNALSYM GUID_IO_VOLUME_CHANGE}
+
+//
+// Volume dismount event. This event is signalled when an attempt is made to
+// dismount a volume. There is no additional data. Note that this will not
+// necessarily be preceded by a GUID_IO_VOLUME_LOCK notification.
+//
+
+ GUID_IO_VOLUME_DISMOUNT: TGUID = (D1:$d16a55e8; D2:$1059; D3:$11d2; D4:($8f, $fd, $00, $a0, $c9, $a0, $6d, $32));
+ {$EXTERNALSYM GUID_IO_VOLUME_DISMOUNT}
+
+//
+// Volume dismount failed event. This event is signalled when a volume dismount fails.
+// There is no additional data.
+//
+
+ GUID_IO_VOLUME_DISMOUNT_FAILED: TGUID = (D1:$e3c5b178; D2:$105d; D3:$11d2; D4:($8f, $fd, $00, $a0, $c9, $a0, $6d, $32));
+ {$EXTERNALSYM GUID_IO_VOLUME_DISMOUNT_FAILED}
+
+//
+// Volume mount event. This event is signalled when a volume mount occurs.
+// There is no additional data.
+//
+
+ GUID_IO_VOLUME_MOUNT: TGUID = (D1:$b5804878; D2:$1a96; D3:$11d2; D4:($8f, $fd, $00, $a0, $c9, $a0, $6d, $32));
+ {$EXTERNALSYM GUID_IO_VOLUME_MOUNT}
+
+//
+// Volume lock event. This event is signalled when an attempt is made to
+// lock a volume. There is no additional data.
+//
+
+ GUID_IO_VOLUME_LOCK: TGUID = (D1:$50708874; D2:$c9af; D3:$11d1; D4:($8f, $ef, $00, $a0, $c9, $a0, $6d, $32));
+ {$EXTERNALSYM GUID_IO_VOLUME_LOCK}
+
+//
+// Volume lock failed event. This event is signalled when an attempt is made to
+// lock a volume, but it fails. There is no additional data.
+//
+
+ GUID_IO_VOLUME_LOCK_FAILED: TGUID = (D1:$ae2eed10; D2:$0ba8; D3:$11d2; D4:($8f, $fb, $00, $a0, $c9, $a0, $6d, $32));
+ {$EXTERNALSYM GUID_IO_VOLUME_LOCK_FAILED}
+
+//
+// Volume unlock event. This event is signalled when an attempt is made to
+// unlock a volume. There is no additional data.
+//
+
+ GUID_IO_VOLUME_UNLOCK: TGUID = (D1:$9a8c3d68; D2:$d0cb; D3:$11d1; D4:($8f, $ef, $00, $a0, $c9, $a0, $6d, $32));
+ {$EXTERNALSYM GUID_IO_VOLUME_UNLOCK}
+
+//
+// Volume name change. This event is signalled when the list of persistent
+// names (like drive letters) for a volume changes. There is no additional
+// data.
+//
+
+ GUID_IO_VOLUME_NAME_CHANGE: TGUID = (D1:$2de97f83; D2:$4c06; D3:$11d2; D4:($a5, $32, $0, $60, $97, $13, $5, $5a));
+ {$EXTERNALSYM GUID_IO_VOLUME_NAME_CHANGE}
+
+//
+// Volume physical configuration change. This event is signalled when the
+// physical makeup or current physical state of the volume changes.
+//
+
+ GUID_IO_VOLUME_PHYSICAL_CONFIGURATION_CHANGE: TGUID = (D1:$2de97f84; D2:$4c06; D3:$11d2; D4:($a5, $32, $0, $60, $97, $13, $5, $5a));
+ {$EXTERNALSYM GUID_IO_VOLUME_PHYSICAL_CONFIGURATION_CHANGE}
+
+//
+// Volume device interface. This is a device interface GUID that appears
+// when the device object associated with a volume is created and disappears
+// when the device object associated with the volume is destroyed.
+//
+
+ GUID_IO_VOLUME_DEVICE_INTERFACE: TGUID = (D1:$53f5630d; D2:$b6bf; D3:$11d0; D4:($94, $f2, $00, $a0, $c9, $1e, $fb, $8b));
+ {$EXTERNALSYM GUID_IO_VOLUME_DEVICE_INTERFACE}
+
+//
+// Sent when the removable media is changed (added, removed) from a device
+// (such as a CDROM, tape, changer, etc).
+//
+// The additional data is a DWORD representing the data event.
+//
+
+ GUID_IO_MEDIA_ARRIVAL: TGUID = (D1:$d07433c0; D2:$a98e; D3:$11d2; D4:($91, $7a, $00, $a0, $c9, $06, $8f, $f3));
+ {$EXTERNALSYM GUID_IO_MEDIA_ARRIVAL}
+ GUID_IO_MEDIA_REMOVAL: TGUID = (D1:$d07433c1; D2:$a98e; D3:$11d2; D4:($91, $7a, $00, $a0, $c9, $06, $8f, $f3));
+ {$EXTERNALSYM GUID_IO_MEDIA_REMOVAL}
+
+//
+// Sent when the media is returning that it is not ready right now, but will
+// be ready soon. This can be because the drive has spun down to save power
+// or because new media has been inserted but is not ready for access yet.
+//
+
+ GUID_IO_DEVICE_BECOMING_READY: TGUID = (D1:$d07433f0; D2:$a98e; D3:$11d2; D4:($91, $7a, $00, $a0, $c9, $06, $8f, $f3));
+ {$EXTERNALSYM GUID_IO_DEVICE_BECOMING_READY}
+
+type
+ _DEVICE_EVENT_BECOMING_READY = record
+ Version: ULONG;
+ Reason: ULONG;
+ Estimated100msToReady: ULONG;
+ end;
+ {$EXTERNALSYM _DEVICE_EVENT_BECOMING_READY}
+ DEVICE_EVENT_BECOMING_READY = _DEVICE_EVENT_BECOMING_READY;
+ {$EXTERNALSYM DEVICE_EVENT_BECOMING_READY}
+ PDEVICE_EVENT_BECOMING_READY = ^DEVICE_EVENT_BECOMING_READY;
+ {$EXTERNALSYM PDEVICE_EVENT_BECOMING_READY}
+ TDeviceEventBecomingReady = DEVICE_EVENT_BECOMING_READY;
+ PDeviceEventBecomingReady = PDEVICE_EVENT_BECOMING_READY;
+
+//
+// Sent when the user presses the eject button on the front of the drive,
+// or when other buttons on the front are pressed via GESN command polling
+// (GESN support to be added)
+//
+
+const
+ GUID_IO_DEVICE_EXTERNAL_REQUEST: TGUID = (D1:$d07433d0; D2:$a98e; D3:$11d2; D4:($91, $7a, $00, $a0, $c9, $06, $8f, $f3));
+ {$EXTERNALSYM GUID_IO_DEVICE_EXTERNAL_REQUEST}
+ GUID_IO_MEDIA_EJECT_REQUEST: TGUID = (D1:$d07433d1; D2:$a98e; D3:$11d2; D4:($91, $7a, $00, $a0, $c9, $06, $8f, $f3));
+ {$EXTERNALSYM GUID_IO_MEDIA_EJECT_REQUEST}
+
+type
+ PDEVICE_EVENT_EXTERNAL_REQUEST = ^DEVICE_EVENT_EXTERNAL_REQUEST;
+ {$EXTERNALSYM PDEVICE_EVENT_EXTERNAL_REQUEST}
+ _DEVICE_EVENT_EXTERNAL_REQUEST = record
+ Version: ULONG;
+ DeviceClass: ULONG; // 0 == MMC Storage Devices
+ ButtonStatus: USHORT; // 1 == down, 2 == up
+ Request: USHORT;
+ SystemTime: LARGE_INTEGER; // for time-related info
+ end;
+ {$EXTERNALSYM _DEVICE_EVENT_EXTERNAL_REQUEST}
+ DEVICE_EVENT_EXTERNAL_REQUEST = _DEVICE_EVENT_EXTERNAL_REQUEST;
+ {$EXTERNALSYM DEVICE_EVENT_EXTERNAL_REQUEST}
+ TDeviceEventExternalRequest = DEVICE_EVENT_EXTERNAL_REQUEST;
+ PDeviceEventExternalRequest = PDEVICE_EVENT_EXTERNAL_REQUEST;
+
+//
+// Sent when a tape drive requires cleaning
+//
+
+const
+ GUID_IO_DRIVE_REQUIRES_CLEANING: TGUID = (D1:$7207877c; D2:$90ed; D3:$44e5; D4:($a0, $0, $81, $42, $8d, $4c, $79, $bb));
+ {$EXTERNALSYM GUID_IO_DRIVE_REQUIRES_CLEANING}
+
+//
+// Sent when a tape is erased
+//
+
+ GUID_IO_TAPE_ERASE: TGUID = (D1:$852d11eb; D2:$4bb8; D3:$4507; D4:($9d, $9b, $41, $7c, $c2, $b1, $b4, $38));
+ {$EXTERNALSYM GUID_IO_TAPE_ERASE}
+
+type
+ _DEVICE_EVENT_GENERIC_DATA = record
+ EventNumber: ULONG;
+ end;
+ {$EXTERNALSYM _DEVICE_EVENT_GENERIC_DATA}
+ DEVICE_EVENT_GENERIC_DATA = _DEVICE_EVENT_GENERIC_DATA;
+ {$EXTERNALSYM DEVICE_EVENT_GENERIC_DATA}
+ PDEVICE_EVENT_GENERIC_DATA = ^DEVICE_EVENT_GENERIC_DATA;
+ {$EXTERNALSYM PDEVICE_EVENT_GENERIC_DATA}
+ TDeviceEventGenericData = DEVICE_EVENT_GENERIC_DATA;
+ PDeviceEventGenericData = PDEVICE_EVENT_GENERIC_DATA;
+
+//
+// Represents any asynchronous notification coming from a device driver whose
+// notification protocol is RBC
+// Additional data is provided
+
+const
+ GUID_DEVICE_EVENT_RBC: TGUID = (D1:$d0744792; D2:$a98e; D3:$11d2; D4:($91, $7a, $00, $a0, $c9, $06, $8f, $f3));
+ {$EXTERNALSYM GUID_DEVICE_EVENT_RBC}
+
+type
+ _DEVICE_EVENT_RBC_DATA = record
+ EventNumber: ULONG;
+ SenseQualifier: UCHAR;
+ SenseCode: UCHAR;
+ SenseKey: UCHAR;
+ Reserved: UCHAR;
+ Information: ULONG;
+ end;
+ {$EXTERNALSYM _DEVICE_EVENT_RBC_DATA}
+ DEVICE_EVENT_RBC_DATA = _DEVICE_EVENT_RBC_DATA;
+ {$EXTERNALSYM DEVICE_EVENT_RBC_DATA}
+ PDEVICE_EVENT_RBC_DATA = ^DEVICE_EVENT_RBC_DATA;
+ {$EXTERNALSYM PDEVICE_EVENT_RBC_DATA}
+ TDeviceEventRbcData = DEVICE_EVENT_RBC_DATA;
+ PDeviceEventRbcData = PDEVICE_EVENT_RBC_DATA;
+
+//
+// A clone of this disk has just arrived in the system.
+//
+
+const
+ GUID_IO_DISK_CLONE_ARRIVAL: TGUID = (D1:$6a61885b; D2:$7c39; D3:$43dd; D4:($9b, $56, $b8, $ac, $22, $a5, $49, $aa));
+ {$EXTERNALSYM GUID_IO_DISK_CLONE_ARRIVAL}
+
+type
+ _GUID_IO_DISK_CLONE_ARRIVAL_INFORMATION = record
+ DiskNumber: ULONG; // The disk number of the new disk arriving in the system.
+ end;
+ {$EXTERNALSYM _GUID_IO_DISK_CLONE_ARRIVAL_INFORMATION}
+ GUID_IO_DISK_CLONE_ARRIVAL_INFORMATION = _GUID_IO_DISK_CLONE_ARRIVAL_INFORMATION;
+ {$EXTERNALSYM GUID_IO_DISK_CLONE_ARRIVAL_INFORMATION}
+ PGUID_IO_DISK_CLONE_ARRIVAL_INFORMATION = ^GUID_IO_DISK_CLONE_ARRIVAL_INFORMATION;
+ {$EXTERNALSYM PGUID_IO_DISK_CLONE_ARRIVAL_INFORMATION}
+ TGuidIoDiskCloneArrivalInformation = GUID_IO_DISK_CLONE_ARRIVAL_INFORMATION;
+ PGuidIoDiskCloneArrivalInformation = PGUID_IO_DISK_CLONE_ARRIVAL_INFORMATION;
+
+//
+// The disk layout has changed
+//
+
+const
+ GUID_IO_DISK_LAYOUT_CHANGE: TGUID = (D1:$11dff54c; D2:$8469; D3:$41f9; D4:($b3, $de, $ef, $83, $64, $87, $c5, $4a));
+ {$EXTERNALSYM GUID_IO_DISK_LAYOUT_CHANGE}
+
+implementation
+
+end.
diff --git a/packages/extra/winunits/jwaipexport.pas b/packages/extra/winunits/jwaipexport.pas
index 15b0c94c5b..060a0b53d2 100644
--- a/packages/extra/winunits/jwaipexport.pas
+++ b/packages/extra/winunits/jwaipexport.pas
@@ -1,441 +1,441 @@
-{******************************************************************************}
-{ }
-{ Internet Protocol Helper API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: ipexport.h, released August 2001. The original Pascal }
-{ code is: IpExport.pas, released September 2000. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Contributor(s): John C. Penman (jcp att craiglockhart dott com) }
-{ Vladimir Vassiliev (voldemarv att hotpop dott com) }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwaipexport.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaIpExport;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "ipexport.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaWinType, JwaWS2tcpip;
-
-//
-// IP type definitions.
-//
-
-type
- IPAddr = ULONG; // An IP address.
- {$EXTERNALSYM IPAddr}
- IPMask = ULONG; // An IP subnet mask.
- {$EXTERNALSYM IPMask}
- IP_STATUS = ULONG; // Status code returned from IP APIs.
- {$EXTERNALSYM IP_STATUS}
-
-(* (rom) deactivated kernel mode is irrelevant for Delphi
-//
-// Duplicate these definitions here so that this file can be included by
-// kernel-mode components which cannot include ws2tcpip.h, as well as
-// by user-mode components which do.
-//
-
-type
- IN6_ADDR = record
- case Integer of
- 0: (Byte: array [0..15] of UCHAR);
- 1: (Word: array [0..7] of USHORT);
- end;
- {$EXTERNALSYM IN6_ADDR}
- TIn6Addr = IN6_ADDR;
- PIn6Addr = ^IN6_ADDR;
-
- in_addr6 = in6_addr;
- {$EXTERNALSYM in_addr6}
- TInAddr6 = in_addr6;
- PInAddr6 = ^in_addr6;
-*)
-
-type
- IPv6Addr = in6_addr;
- {$EXTERNALSYM IPv6Addr}
- TIPv6Addr = IPv6Addr;
- PIPv6Addr = ^IPv6Addr;
-
-//#ifndef s_addr
-
- in_addr = record
- case Integer of
- 0: (
- s_b1, s_b2, s_b3, s_b4: UCHAR;
- );
- 1: (
- s_w1, s_w2: USHORT
- );
- 2: (
- S_addr: ULONG
- );
- end;
- {$EXTERNALSYM in_addr}
-
-//#define s_addr S_un.S_addr /* can be used for most tcp & ip code */
-
-//#endif
-
-//
-// The ip_option_information structure describes the options to be
-// included in the header of an IP packet. The TTL, TOS, and Flags
-// values are carried in specific fields in the header. The OptionsData
-// bytes are carried in the options area following the standard IP header.
-// With the exception of source route options, this data must be in the
-// format to be transmitted on the wire as specified in RFC 791. A source
-// route option should contain the full route - first hop thru final
-// destination - in the route data. The first hop will be pulled out of the
-// data and the option will be reformatted accordingly. Otherwise, the route
-// option should be formatted as specified in RFC 791.
-//
-
-type
- IP_OPTION_INFORMATION = record
- Ttl: UCHAR; // Time To Live
- Tos: UCHAR; // Type Of Service
- Flags: UCHAR; // IP header flags
- OptionsSize: UCHAR; // Size in bytes of options data
- OptionsData: PUCHAR; // Pointer to options data
- end;
- {$EXTERNALSYM IP_OPTION_INFORMATION}
- PIP_OPTION_INFORMATION = ^IP_OPTION_INFORMATION;
- {$EXTERNALSYM PIP_OPTION_INFORMATION}
- TIpOptionInformation = IP_OPTION_INFORMATION;
- PIpOptionInformation = PIP_OPTION_INFORMATION;
-
-//
-// The icmp_echo_reply structure describes the data returned in response
-// to an echo request.
-//
-
- ICMP_ECHO_REPLY = record
- Address: IPAddr; // Replying address
- Status: ULONG; // Reply IP_STATUS
- RoundTripTime: ULONG; // RTT in milliseconds
- DataSize: USHORT; // Reply data size in bytes
- Reserved: USHORT; // Reserved for system use
- Data: LPVOID; // Pointer to the reply data
- Options: ip_option_information; // Reply options
- end;
- {$EXTERNALSYM ICMP_ECHO_REPLY}
- PICMP_ECHO_REPLY = ^ICMP_ECHO_REPLY;
- {$EXTERNALSYM PICMP_ECHO_REPLY}
- TIcmpEchoReply = ICMP_ECHO_REPLY;
- PIcmpEchoReply = PICMP_ECHO_REPLY;
-
- ARP_SEND_REPLY = record
- DestAddress: IPAddr;
- SrcAddress: IPAddr;
- end;
- {$EXTERNALSYM ARP_SEND_REPLY}
- PARP_SEND_REPLY = ^ARP_SEND_REPLY;
- {$EXTERNALSYM PARP_SEND_REPLY}
- TArpSendReply = ARP_SEND_REPLY;
- PArpSendReply = PARP_SEND_REPLY;
-
- TCP_RESERVE_PORT_RANGE = record
- UpperRange: USHORT;
- LowerRange: USHORT;
- end;
- {$EXTERNALSYM TCP_RESERVE_PORT_RANGE}
- PTCP_RESERVE_PORT_RANGE = ^TCP_RESERVE_PORT_RANGE;
- {$EXTERNALSYM PTCP_RESERVE_PORT_RANGE}
- TTcpReservePortRange = TCP_RESERVE_PORT_RANGE;
- PTcpReservePortRange = PTCP_RESERVE_PORT_RANGE;
-
-const
- MAX_ADAPTER_NAME = 128;
- {$EXTERNALSYM MAX_ADAPTER_NAME}
-
-type
- PIP_ADAPTER_INDEX_MAP = ^IP_ADAPTER_INDEX_MAP;
- {$EXTERNALSYM PIP_ADAPTER_INDEX_MAP}
- _IP_ADAPTER_INDEX_MAP = record
- Index: ULONG;
- Name: array [0..MAX_ADAPTER_NAME - 1] of WCHAR;
- end;
- {$EXTERNALSYM _IP_ADAPTER_INDEX_MAP}
- IP_ADAPTER_INDEX_MAP = _IP_ADAPTER_INDEX_MAP;
- {$EXTERNALSYM IP_ADAPTER_INDEX_MAP}
- TIpAdapterIndexMap = IP_ADAPTER_INDEX_MAP;
- PIpAdapterIndexMap = PIP_ADAPTER_INDEX_MAP;
-
- PIP_INTERFACE_INFO = ^IP_INTERFACE_INFO;
- {$EXTERNALSYM PIP_INTERFACE_INFO}
- _IP_INTERFACE_INFO = record
- NumAdapters: Longint;
- Adapter: array [0..0] of IP_ADAPTER_INDEX_MAP;
- end;
- {$EXTERNALSYM _IP_INTERFACE_INFO}
- IP_INTERFACE_INFO = _IP_INTERFACE_INFO;
- {$EXTERNALSYM IP_INTERFACE_INFO}
- TIpInterfaceInfo = IP_INTERFACE_INFO;
- PIpInterfaceInfo = PIP_INTERFACE_INFO;
-
- PIP_UNIDIRECTIONAL_ADAPTER_ADDRESS = ^IP_UNIDIRECTIONAL_ADAPTER_ADDRESS;
- {$EXTERNALSYM PIP_UNIDIRECTIONAL_ADAPTER_ADDRESS}
- _IP_UNIDIRECTIONAL_ADAPTER_ADDRESS = record
- NumAdapters: ULONG;
- Address: array [0..0] of IPAddr;
- end;
- {$EXTERNALSYM _IP_UNIDIRECTIONAL_ADAPTER_ADDRESS}
- IP_UNIDIRECTIONAL_ADAPTER_ADDRESS = _IP_UNIDIRECTIONAL_ADAPTER_ADDRESS;
- {$EXTERNALSYM IP_UNIDIRECTIONAL_ADAPTER_ADDRESS}
- TIpUnidirectionalAdapterAddress = IP_UNIDIRECTIONAL_ADAPTER_ADDRESS;
- PIpUnidirectionalAdapterAddress = PIP_UNIDIRECTIONAL_ADAPTER_ADDRESS;
-
- PIP_ADAPTER_ORDER_MAP = ^IP_ADAPTER_ORDER_MAP;
- {$EXTERNALSYM PIP_ADAPTER_ORDER_MAP}
- _IP_ADAPTER_ORDER_MAP = record
- NumAdapters: ULONG;
- AdapterOrder: array [0..0] of ULONG;
- end;
- {$EXTERNALSYM _IP_ADAPTER_ORDER_MAP}
- IP_ADAPTER_ORDER_MAP = _IP_ADAPTER_ORDER_MAP;
- {$EXTERNALSYM IP_ADAPTER_ORDER_MAP}
- TIpAdapterOrderMap = IP_ADAPTER_ORDER_MAP;
- PIpAdapterOrderMap = PIP_ADAPTER_ORDER_MAP;
-
- _IP_MCAST_COUNTER_INFO = record
- InMcastOctets: ULONG64;
- OutMcastOctets: ULONG64;
- InMcastPkts: ULONG64;
- OutMcastPkts: ULONG64;
- end;
- {$EXTERNALSYM _IP_MCAST_COUNTER_INFO}
- IP_MCAST_COUNTER_INFO = _IP_MCAST_COUNTER_INFO;
- {$EXTERNALSYM IP_MCAST_COUNTER_INFO}
- PIP_MCAST_COUNTER_INFO = ^IP_MCAST_COUNTER_INFO;
- {$EXTERNALSYM PIP_MCAST_COUNTER_INFO}
- TIpMCastCounterInfo = IP_MCAST_COUNTER_INFO;
- PIpMCastCounterInfo = PIP_MCAST_COUNTER_INFO;
-
-//
-// IP_STATUS codes returned from IP APIs
-//
-
-const
- IP_STATUS_BASE = 11000;
- {$EXTERNALSYM IP_STATUS_BASE}
-
- IP_SUCCESS = 0;
- {$EXTERNALSYM IP_SUCCESS}
- IP_BUF_TOO_SMALL = IP_STATUS_BASE + 1;
- {$EXTERNALSYM IP_BUF_TOO_SMALL}
- IP_DEST_NET_UNREACHABLE = IP_STATUS_BASE + 2;
- {$EXTERNALSYM IP_DEST_NET_UNREACHABLE}
- IP_DEST_HOST_UNREACHABLE = IP_STATUS_BASE + 3;
- {$EXTERNALSYM IP_DEST_HOST_UNREACHABLE}
- IP_DEST_PROT_UNREACHABLE = IP_STATUS_BASE + 4;
- {$EXTERNALSYM IP_DEST_PROT_UNREACHABLE}
- IP_DEST_PORT_UNREACHABLE = IP_STATUS_BASE + 5;
- {$EXTERNALSYM IP_DEST_PORT_UNREACHABLE}
- IP_NO_RESOURCES = IP_STATUS_BASE + 6;
- {$EXTERNALSYM IP_NO_RESOURCES}
- IP_BAD_OPTION = IP_STATUS_BASE + 7;
- {$EXTERNALSYM IP_BAD_OPTION}
- IP_HW_ERROR = IP_STATUS_BASE + 8;
- {$EXTERNALSYM IP_HW_ERROR}
- IP_PACKET_TOO_BIG = IP_STATUS_BASE + 9;
- {$EXTERNALSYM IP_PACKET_TOO_BIG}
- IP_REQ_TIMED_OUT = IP_STATUS_BASE + 10;
- {$EXTERNALSYM IP_REQ_TIMED_OUT}
- IP_BAD_REQ = IP_STATUS_BASE + 11;
- {$EXTERNALSYM IP_BAD_REQ}
- IP_BAD_ROUTE = IP_STATUS_BASE + 12;
- {$EXTERNALSYM IP_BAD_ROUTE}
- IP_TTL_EXPIRED_TRANSIT = IP_STATUS_BASE + 13;
- {$EXTERNALSYM IP_TTL_EXPIRED_TRANSIT}
- IP_TTL_EXPIRED_REASSEM = IP_STATUS_BASE + 14;
- {$EXTERNALSYM IP_TTL_EXPIRED_REASSEM}
- IP_PARAM_PROBLEM = IP_STATUS_BASE + 15;
- {$EXTERNALSYM IP_PARAM_PROBLEM}
- IP_SOURCE_QUENCH = IP_STATUS_BASE + 16;
- {$EXTERNALSYM IP_SOURCE_QUENCH}
- IP_OPTION_TOO_BIG = IP_STATUS_BASE + 17;
- {$EXTERNALSYM IP_OPTION_TOO_BIG}
- IP_BAD_DESTINATION = IP_STATUS_BASE + 18;
- {$EXTERNALSYM IP_BAD_DESTINATION}
-
-//
-// Variants of the above using IPv6 terminology, where different
-//
-
- IP_DEST_NO_ROUTE = IP_STATUS_BASE + 2;
- {$EXTERNALSYM IP_DEST_NO_ROUTE}
- IP_DEST_ADDR_UNREACHABLE = IP_STATUS_BASE + 3;
- {$EXTERNALSYM IP_DEST_ADDR_UNREACHABLE}
- IP_DEST_PROHIBITED = IP_STATUS_BASE + 4;
- {$EXTERNALSYM IP_DEST_PROHIBITED}
- //IP_DEST_PORT_UNREACHABLE = IP_STATUS_BASE + 5;
- //{$EXTERNALSYM IP_DEST_PORT_UNREACHABLE}
- IP_HOP_LIMIT_EXCEEDED = IP_STATUS_BASE + 13;
- {$EXTERNALSYM IP_HOP_LIMIT_EXCEEDED}
- IP_REASSEMBLY_TIME_EXCEEDED = IP_STATUS_BASE + 14;
- {$EXTERNALSYM IP_REASSEMBLY_TIME_EXCEEDED}
- IP_PARAMETER_PROBLEM = IP_STATUS_BASE + 15;
- {$EXTERNALSYM IP_PARAMETER_PROBLEM}
-
-//
-// IPv6-only status codes
-//
-
- IP_DEST_UNREACHABLE = IP_STATUS_BASE + 40;
- {$EXTERNALSYM IP_DEST_UNREACHABLE}
- IP_TIME_EXCEEDED = IP_STATUS_BASE + 41;
- {$EXTERNALSYM IP_TIME_EXCEEDED}
- IP_BAD_HEADER = IP_STATUS_BASE + 42;
- {$EXTERNALSYM IP_BAD_HEADER}
- IP_UNRECOGNIZED_NEXT_HEADER = IP_STATUS_BASE + 43;
- {$EXTERNALSYM IP_UNRECOGNIZED_NEXT_HEADER}
- IP_ICMP_ERROR = IP_STATUS_BASE + 44;
- {$EXTERNALSYM IP_ICMP_ERROR}
- IP_DEST_SCOPE_MISMATCH = IP_STATUS_BASE + 45;
- {$EXTERNALSYM IP_DEST_SCOPE_MISMATCH}
-
-//
-// The next group are status codes passed up on status indications to
-// transport layer protocols.
-//
-
- IP_ADDR_DELETED = IP_STATUS_BASE + 19;
- {$EXTERNALSYM IP_ADDR_DELETED}
- IP_SPEC_MTU_CHANGE = IP_STATUS_BASE + 20;
- {$EXTERNALSYM IP_SPEC_MTU_CHANGE}
- IP_MTU_CHANGE = IP_STATUS_BASE + 21;
- {$EXTERNALSYM IP_MTU_CHANGE}
- IP_UNLOAD = IP_STATUS_BASE + 22;
- {$EXTERNALSYM IP_UNLOAD}
- IP_ADDR_ADDED = IP_STATUS_BASE + 23;
- {$EXTERNALSYM IP_ADDR_ADDED}
- IP_MEDIA_CONNECT = IP_STATUS_BASE + 24;
- {$EXTERNALSYM IP_MEDIA_CONNECT}
- IP_MEDIA_DISCONNECT = IP_STATUS_BASE + 25;
- {$EXTERNALSYM IP_MEDIA_DISCONNECT}
- IP_BIND_ADAPTER = IP_STATUS_BASE + 26;
- {$EXTERNALSYM IP_BIND_ADAPTER}
- IP_UNBIND_ADAPTER = IP_STATUS_BASE + 27;
- {$EXTERNALSYM IP_UNBIND_ADAPTER}
- IP_DEVICE_DOES_NOT_EXIST = IP_STATUS_BASE + 28;
- {$EXTERNALSYM IP_DEVICE_DOES_NOT_EXIST}
- IP_DUPLICATE_ADDRESS = IP_STATUS_BASE + 29;
- {$EXTERNALSYM IP_DUPLICATE_ADDRESS}
- IP_INTERFACE_METRIC_CHANGE = IP_STATUS_BASE + 30;
- {$EXTERNALSYM IP_INTERFACE_METRIC_CHANGE}
- IP_RECONFIG_SECFLTR = IP_STATUS_BASE + 31;
- {$EXTERNALSYM IP_RECONFIG_SECFLTR}
- IP_NEGOTIATING_IPSEC = IP_STATUS_BASE + 32;
- {$EXTERNALSYM IP_NEGOTIATING_IPSEC}
- IP_INTERFACE_WOL_CAPABILITY_CHANGE = IP_STATUS_BASE + 33;
- {$EXTERNALSYM IP_INTERFACE_WOL_CAPABILITY_CHANGE}
- IP_DUPLICATE_IPADD = IP_STATUS_BASE + 34;
- {$EXTERNALSYM IP_DUPLICATE_IPADD}
-
- IP_GENERAL_FAILURE = IP_STATUS_BASE + 50;
- {$EXTERNALSYM IP_GENERAL_FAILURE}
- MAX_IP_STATUS = IP_GENERAL_FAILURE;
- {$EXTERNALSYM MAX_IP_STATUS}
- IP_PENDING = IP_STATUS_BASE + 255;
- {$EXTERNALSYM IP_PENDING}
-
-//
-// Values used in the IP header Flags field.
-//
-
- IP_FLAG_DF = $2; // Don't fragment this packet.
- {$EXTERNALSYM IP_FLAG_DF}
-
-//
-// Supported IP Option Types.
-//
-// These types define the options which may be used in the OptionsData field
-// of the ip_option_information structure. See RFC 791 for a complete
-// description of each.
-//
-
- IP_OPT_EOL = 0; // End of list option
- {$EXTERNALSYM IP_OPT_EOL}
- IP_OPT_NOP = 1; // No operation
- {$EXTERNALSYM IP_OPT_NOP}
- IP_OPT_SECURITY = $82; // Security option
- {$EXTERNALSYM IP_OPT_SECURITY}
- IP_OPT_LSRR = $83; // Loose source route
- {$EXTERNALSYM IP_OPT_LSRR}
- IP_OPT_SSRR = $89; // Strict source route
- {$EXTERNALSYM IP_OPT_SSRR}
- IP_OPT_RR = $7; // Record route
- {$EXTERNALSYM IP_OPT_RR}
- IP_OPT_TS = $44; // Timestamp
- {$EXTERNALSYM IP_OPT_TS}
- IP_OPT_SID = $88; // Stream ID (obsolete)
- {$EXTERNALSYM IP_OPT_SID}
- IP_OPT_ROUTER_ALERT = $94; // Router Alert Option
- {$EXTERNALSYM IP_OPT_ROUTER_ALERT}
-
- MAX_OPT_SIZE = 40; // Maximum length of IP options in bytes
- {$EXTERNALSYM MAX_OPT_SIZE}
-
-// Ioctls code exposed by Memphis tcpip stack.
-// For NT these ioctls are define in ntddip.h (private\inc)
-
- IOCTL_IP_RTCHANGE_NOTIFY_REQUEST = 101;
- {$EXTERNALSYM IOCTL_IP_RTCHANGE_NOTIFY_REQUEST}
- IOCTL_IP_ADDCHANGE_NOTIFY_REQUEST = 102;
- {$EXTERNALSYM IOCTL_IP_ADDCHANGE_NOTIFY_REQUEST}
- IOCTL_ARP_SEND_REQUEST = 103;
- {$EXTERNALSYM IOCTL_ARP_SEND_REQUEST}
- IOCTL_IP_INTERFACE_INFO = 104;
- {$EXTERNALSYM IOCTL_IP_INTERFACE_INFO}
- IOCTL_IP_GET_BEST_INTERFACE = 105;
- {$EXTERNALSYM IOCTL_IP_GET_BEST_INTERFACE}
- IOCTL_IP_UNIDIRECTIONAL_ADAPTER_ADDRESS = 106;
- {$EXTERNALSYM IOCTL_IP_UNIDIRECTIONAL_ADAPTER_ADDRESS}
-
-implementation
-
-end.
+{******************************************************************************}
+{ }
+{ Internet Protocol Helper API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: ipexport.h, released August 2001. The original Pascal }
+{ code is: IpExport.pas, released September 2000. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Contributor(s): John C. Penman (jcp att craiglockhart dott com) }
+{ Vladimir Vassiliev (voldemarv att hotpop dott com) }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwaipexport.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaIpExport;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "ipexport.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaWinType, JwaWS2tcpip;
+
+//
+// IP type definitions.
+//
+
+type
+ IPAddr = ULONG; // An IP address.
+ {$EXTERNALSYM IPAddr}
+ IPMask = ULONG; // An IP subnet mask.
+ {$EXTERNALSYM IPMask}
+ IP_STATUS = ULONG; // Status code returned from IP APIs.
+ {$EXTERNALSYM IP_STATUS}
+
+(* (rom) deactivated kernel mode is irrelevant for Delphi
+//
+// Duplicate these definitions here so that this file can be included by
+// kernel-mode components which cannot include ws2tcpip.h, as well as
+// by user-mode components which do.
+//
+
+type
+ IN6_ADDR = record
+ case Integer of
+ 0: (Byte: array [0..15] of UCHAR);
+ 1: (Word: array [0..7] of USHORT);
+ end;
+ {$EXTERNALSYM IN6_ADDR}
+ TIn6Addr = IN6_ADDR;
+ PIn6Addr = ^IN6_ADDR;
+
+ in_addr6 = in6_addr;
+ {$EXTERNALSYM in_addr6}
+ TInAddr6 = in_addr6;
+ PInAddr6 = ^in_addr6;
+*)
+
+type
+ IPv6Addr = in6_addr;
+ {$EXTERNALSYM IPv6Addr}
+ TIPv6Addr = IPv6Addr;
+ PIPv6Addr = ^IPv6Addr;
+
+//#ifndef s_addr
+
+ in_addr = record
+ case Integer of
+ 0: (
+ s_b1, s_b2, s_b3, s_b4: UCHAR;
+ );
+ 1: (
+ s_w1, s_w2: USHORT
+ );
+ 2: (
+ S_addr: ULONG
+ );
+ end;
+ {$EXTERNALSYM in_addr}
+
+//#define s_addr S_un.S_addr /* can be used for most tcp & ip code */
+
+//#endif
+
+//
+// The ip_option_information structure describes the options to be
+// included in the header of an IP packet. The TTL, TOS, and Flags
+// values are carried in specific fields in the header. The OptionsData
+// bytes are carried in the options area following the standard IP header.
+// With the exception of source route options, this data must be in the
+// format to be transmitted on the wire as specified in RFC 791. A source
+// route option should contain the full route - first hop thru final
+// destination - in the route data. The first hop will be pulled out of the
+// data and the option will be reformatted accordingly. Otherwise, the route
+// option should be formatted as specified in RFC 791.
+//
+
+type
+ IP_OPTION_INFORMATION = record
+ Ttl: UCHAR; // Time To Live
+ Tos: UCHAR; // Type Of Service
+ Flags: UCHAR; // IP header flags
+ OptionsSize: UCHAR; // Size in bytes of options data
+ OptionsData: PUCHAR; // Pointer to options data
+ end;
+ {$EXTERNALSYM IP_OPTION_INFORMATION}
+ PIP_OPTION_INFORMATION = ^IP_OPTION_INFORMATION;
+ {$EXTERNALSYM PIP_OPTION_INFORMATION}
+ TIpOptionInformation = IP_OPTION_INFORMATION;
+ PIpOptionInformation = PIP_OPTION_INFORMATION;
+
+//
+// The icmp_echo_reply structure describes the data returned in response
+// to an echo request.
+//
+
+ ICMP_ECHO_REPLY = record
+ Address: IPAddr; // Replying address
+ Status: ULONG; // Reply IP_STATUS
+ RoundTripTime: ULONG; // RTT in milliseconds
+ DataSize: USHORT; // Reply data size in bytes
+ Reserved: USHORT; // Reserved for system use
+ Data: LPVOID; // Pointer to the reply data
+ Options: ip_option_information; // Reply options
+ end;
+ {$EXTERNALSYM ICMP_ECHO_REPLY}
+ PICMP_ECHO_REPLY = ^ICMP_ECHO_REPLY;
+ {$EXTERNALSYM PICMP_ECHO_REPLY}
+ TIcmpEchoReply = ICMP_ECHO_REPLY;
+ PIcmpEchoReply = PICMP_ECHO_REPLY;
+
+ ARP_SEND_REPLY = record
+ DestAddress: IPAddr;
+ SrcAddress: IPAddr;
+ end;
+ {$EXTERNALSYM ARP_SEND_REPLY}
+ PARP_SEND_REPLY = ^ARP_SEND_REPLY;
+ {$EXTERNALSYM PARP_SEND_REPLY}
+ TArpSendReply = ARP_SEND_REPLY;
+ PArpSendReply = PARP_SEND_REPLY;
+
+ TCP_RESERVE_PORT_RANGE = record
+ UpperRange: USHORT;
+ LowerRange: USHORT;
+ end;
+ {$EXTERNALSYM TCP_RESERVE_PORT_RANGE}
+ PTCP_RESERVE_PORT_RANGE = ^TCP_RESERVE_PORT_RANGE;
+ {$EXTERNALSYM PTCP_RESERVE_PORT_RANGE}
+ TTcpReservePortRange = TCP_RESERVE_PORT_RANGE;
+ PTcpReservePortRange = PTCP_RESERVE_PORT_RANGE;
+
+const
+ MAX_ADAPTER_NAME = 128;
+ {$EXTERNALSYM MAX_ADAPTER_NAME}
+
+type
+ PIP_ADAPTER_INDEX_MAP = ^IP_ADAPTER_INDEX_MAP;
+ {$EXTERNALSYM PIP_ADAPTER_INDEX_MAP}
+ _IP_ADAPTER_INDEX_MAP = record
+ Index: ULONG;
+ Name: array [0..MAX_ADAPTER_NAME - 1] of WCHAR;
+ end;
+ {$EXTERNALSYM _IP_ADAPTER_INDEX_MAP}
+ IP_ADAPTER_INDEX_MAP = _IP_ADAPTER_INDEX_MAP;
+ {$EXTERNALSYM IP_ADAPTER_INDEX_MAP}
+ TIpAdapterIndexMap = IP_ADAPTER_INDEX_MAP;
+ PIpAdapterIndexMap = PIP_ADAPTER_INDEX_MAP;
+
+ PIP_INTERFACE_INFO = ^IP_INTERFACE_INFO;
+ {$EXTERNALSYM PIP_INTERFACE_INFO}
+ _IP_INTERFACE_INFO = record
+ NumAdapters: Longint;
+ Adapter: array [0..0] of IP_ADAPTER_INDEX_MAP;
+ end;
+ {$EXTERNALSYM _IP_INTERFACE_INFO}
+ IP_INTERFACE_INFO = _IP_INTERFACE_INFO;
+ {$EXTERNALSYM IP_INTERFACE_INFO}
+ TIpInterfaceInfo = IP_INTERFACE_INFO;
+ PIpInterfaceInfo = PIP_INTERFACE_INFO;
+
+ PIP_UNIDIRECTIONAL_ADAPTER_ADDRESS = ^IP_UNIDIRECTIONAL_ADAPTER_ADDRESS;
+ {$EXTERNALSYM PIP_UNIDIRECTIONAL_ADAPTER_ADDRESS}
+ _IP_UNIDIRECTIONAL_ADAPTER_ADDRESS = record
+ NumAdapters: ULONG;
+ Address: array [0..0] of IPAddr;
+ end;
+ {$EXTERNALSYM _IP_UNIDIRECTIONAL_ADAPTER_ADDRESS}
+ IP_UNIDIRECTIONAL_ADAPTER_ADDRESS = _IP_UNIDIRECTIONAL_ADAPTER_ADDRESS;
+ {$EXTERNALSYM IP_UNIDIRECTIONAL_ADAPTER_ADDRESS}
+ TIpUnidirectionalAdapterAddress = IP_UNIDIRECTIONAL_ADAPTER_ADDRESS;
+ PIpUnidirectionalAdapterAddress = PIP_UNIDIRECTIONAL_ADAPTER_ADDRESS;
+
+ PIP_ADAPTER_ORDER_MAP = ^IP_ADAPTER_ORDER_MAP;
+ {$EXTERNALSYM PIP_ADAPTER_ORDER_MAP}
+ _IP_ADAPTER_ORDER_MAP = record
+ NumAdapters: ULONG;
+ AdapterOrder: array [0..0] of ULONG;
+ end;
+ {$EXTERNALSYM _IP_ADAPTER_ORDER_MAP}
+ IP_ADAPTER_ORDER_MAP = _IP_ADAPTER_ORDER_MAP;
+ {$EXTERNALSYM IP_ADAPTER_ORDER_MAP}
+ TIpAdapterOrderMap = IP_ADAPTER_ORDER_MAP;
+ PIpAdapterOrderMap = PIP_ADAPTER_ORDER_MAP;
+
+ _IP_MCAST_COUNTER_INFO = record
+ InMcastOctets: ULONG64;
+ OutMcastOctets: ULONG64;
+ InMcastPkts: ULONG64;
+ OutMcastPkts: ULONG64;
+ end;
+ {$EXTERNALSYM _IP_MCAST_COUNTER_INFO}
+ IP_MCAST_COUNTER_INFO = _IP_MCAST_COUNTER_INFO;
+ {$EXTERNALSYM IP_MCAST_COUNTER_INFO}
+ PIP_MCAST_COUNTER_INFO = ^IP_MCAST_COUNTER_INFO;
+ {$EXTERNALSYM PIP_MCAST_COUNTER_INFO}
+ TIpMCastCounterInfo = IP_MCAST_COUNTER_INFO;
+ PIpMCastCounterInfo = PIP_MCAST_COUNTER_INFO;
+
+//
+// IP_STATUS codes returned from IP APIs
+//
+
+const
+ IP_STATUS_BASE = 11000;
+ {$EXTERNALSYM IP_STATUS_BASE}
+
+ IP_SUCCESS = 0;
+ {$EXTERNALSYM IP_SUCCESS}
+ IP_BUF_TOO_SMALL = IP_STATUS_BASE + 1;
+ {$EXTERNALSYM IP_BUF_TOO_SMALL}
+ IP_DEST_NET_UNREACHABLE = IP_STATUS_BASE + 2;
+ {$EXTERNALSYM IP_DEST_NET_UNREACHABLE}
+ IP_DEST_HOST_UNREACHABLE = IP_STATUS_BASE + 3;
+ {$EXTERNALSYM IP_DEST_HOST_UNREACHABLE}
+ IP_DEST_PROT_UNREACHABLE = IP_STATUS_BASE + 4;
+ {$EXTERNALSYM IP_DEST_PROT_UNREACHABLE}
+ IP_DEST_PORT_UNREACHABLE = IP_STATUS_BASE + 5;
+ {$EXTERNALSYM IP_DEST_PORT_UNREACHABLE}
+ IP_NO_RESOURCES = IP_STATUS_BASE + 6;
+ {$EXTERNALSYM IP_NO_RESOURCES}
+ IP_BAD_OPTION = IP_STATUS_BASE + 7;
+ {$EXTERNALSYM IP_BAD_OPTION}
+ IP_HW_ERROR = IP_STATUS_BASE + 8;
+ {$EXTERNALSYM IP_HW_ERROR}
+ IP_PACKET_TOO_BIG = IP_STATUS_BASE + 9;
+ {$EXTERNALSYM IP_PACKET_TOO_BIG}
+ IP_REQ_TIMED_OUT = IP_STATUS_BASE + 10;
+ {$EXTERNALSYM IP_REQ_TIMED_OUT}
+ IP_BAD_REQ = IP_STATUS_BASE + 11;
+ {$EXTERNALSYM IP_BAD_REQ}
+ IP_BAD_ROUTE = IP_STATUS_BASE + 12;
+ {$EXTERNALSYM IP_BAD_ROUTE}
+ IP_TTL_EXPIRED_TRANSIT = IP_STATUS_BASE + 13;
+ {$EXTERNALSYM IP_TTL_EXPIRED_TRANSIT}
+ IP_TTL_EXPIRED_REASSEM = IP_STATUS_BASE + 14;
+ {$EXTERNALSYM IP_TTL_EXPIRED_REASSEM}
+ IP_PARAM_PROBLEM = IP_STATUS_BASE + 15;
+ {$EXTERNALSYM IP_PARAM_PROBLEM}
+ IP_SOURCE_QUENCH = IP_STATUS_BASE + 16;
+ {$EXTERNALSYM IP_SOURCE_QUENCH}
+ IP_OPTION_TOO_BIG = IP_STATUS_BASE + 17;
+ {$EXTERNALSYM IP_OPTION_TOO_BIG}
+ IP_BAD_DESTINATION = IP_STATUS_BASE + 18;
+ {$EXTERNALSYM IP_BAD_DESTINATION}
+
+//
+// Variants of the above using IPv6 terminology, where different
+//
+
+ IP_DEST_NO_ROUTE = IP_STATUS_BASE + 2;
+ {$EXTERNALSYM IP_DEST_NO_ROUTE}
+ IP_DEST_ADDR_UNREACHABLE = IP_STATUS_BASE + 3;
+ {$EXTERNALSYM IP_DEST_ADDR_UNREACHABLE}
+ IP_DEST_PROHIBITED = IP_STATUS_BASE + 4;
+ {$EXTERNALSYM IP_DEST_PROHIBITED}
+ //IP_DEST_PORT_UNREACHABLE = IP_STATUS_BASE + 5;
+ //{$EXTERNALSYM IP_DEST_PORT_UNREACHABLE}
+ IP_HOP_LIMIT_EXCEEDED = IP_STATUS_BASE + 13;
+ {$EXTERNALSYM IP_HOP_LIMIT_EXCEEDED}
+ IP_REASSEMBLY_TIME_EXCEEDED = IP_STATUS_BASE + 14;
+ {$EXTERNALSYM IP_REASSEMBLY_TIME_EXCEEDED}
+ IP_PARAMETER_PROBLEM = IP_STATUS_BASE + 15;
+ {$EXTERNALSYM IP_PARAMETER_PROBLEM}
+
+//
+// IPv6-only status codes
+//
+
+ IP_DEST_UNREACHABLE = IP_STATUS_BASE + 40;
+ {$EXTERNALSYM IP_DEST_UNREACHABLE}
+ IP_TIME_EXCEEDED = IP_STATUS_BASE + 41;
+ {$EXTERNALSYM IP_TIME_EXCEEDED}
+ IP_BAD_HEADER = IP_STATUS_BASE + 42;
+ {$EXTERNALSYM IP_BAD_HEADER}
+ IP_UNRECOGNIZED_NEXT_HEADER = IP_STATUS_BASE + 43;
+ {$EXTERNALSYM IP_UNRECOGNIZED_NEXT_HEADER}
+ IP_ICMP_ERROR = IP_STATUS_BASE + 44;
+ {$EXTERNALSYM IP_ICMP_ERROR}
+ IP_DEST_SCOPE_MISMATCH = IP_STATUS_BASE + 45;
+ {$EXTERNALSYM IP_DEST_SCOPE_MISMATCH}
+
+//
+// The next group are status codes passed up on status indications to
+// transport layer protocols.
+//
+
+ IP_ADDR_DELETED = IP_STATUS_BASE + 19;
+ {$EXTERNALSYM IP_ADDR_DELETED}
+ IP_SPEC_MTU_CHANGE = IP_STATUS_BASE + 20;
+ {$EXTERNALSYM IP_SPEC_MTU_CHANGE}
+ IP_MTU_CHANGE = IP_STATUS_BASE + 21;
+ {$EXTERNALSYM IP_MTU_CHANGE}
+ IP_UNLOAD = IP_STATUS_BASE + 22;
+ {$EXTERNALSYM IP_UNLOAD}
+ IP_ADDR_ADDED = IP_STATUS_BASE + 23;
+ {$EXTERNALSYM IP_ADDR_ADDED}
+ IP_MEDIA_CONNECT = IP_STATUS_BASE + 24;
+ {$EXTERNALSYM IP_MEDIA_CONNECT}
+ IP_MEDIA_DISCONNECT = IP_STATUS_BASE + 25;
+ {$EXTERNALSYM IP_MEDIA_DISCONNECT}
+ IP_BIND_ADAPTER = IP_STATUS_BASE + 26;
+ {$EXTERNALSYM IP_BIND_ADAPTER}
+ IP_UNBIND_ADAPTER = IP_STATUS_BASE + 27;
+ {$EXTERNALSYM IP_UNBIND_ADAPTER}
+ IP_DEVICE_DOES_NOT_EXIST = IP_STATUS_BASE + 28;
+ {$EXTERNALSYM IP_DEVICE_DOES_NOT_EXIST}
+ IP_DUPLICATE_ADDRESS = IP_STATUS_BASE + 29;
+ {$EXTERNALSYM IP_DUPLICATE_ADDRESS}
+ IP_INTERFACE_METRIC_CHANGE = IP_STATUS_BASE + 30;
+ {$EXTERNALSYM IP_INTERFACE_METRIC_CHANGE}
+ IP_RECONFIG_SECFLTR = IP_STATUS_BASE + 31;
+ {$EXTERNALSYM IP_RECONFIG_SECFLTR}
+ IP_NEGOTIATING_IPSEC = IP_STATUS_BASE + 32;
+ {$EXTERNALSYM IP_NEGOTIATING_IPSEC}
+ IP_INTERFACE_WOL_CAPABILITY_CHANGE = IP_STATUS_BASE + 33;
+ {$EXTERNALSYM IP_INTERFACE_WOL_CAPABILITY_CHANGE}
+ IP_DUPLICATE_IPADD = IP_STATUS_BASE + 34;
+ {$EXTERNALSYM IP_DUPLICATE_IPADD}
+
+ IP_GENERAL_FAILURE = IP_STATUS_BASE + 50;
+ {$EXTERNALSYM IP_GENERAL_FAILURE}
+ MAX_IP_STATUS = IP_GENERAL_FAILURE;
+ {$EXTERNALSYM MAX_IP_STATUS}
+ IP_PENDING = IP_STATUS_BASE + 255;
+ {$EXTERNALSYM IP_PENDING}
+
+//
+// Values used in the IP header Flags field.
+//
+
+ IP_FLAG_DF = $2; // Don't fragment this packet.
+ {$EXTERNALSYM IP_FLAG_DF}
+
+//
+// Supported IP Option Types.
+//
+// These types define the options which may be used in the OptionsData field
+// of the ip_option_information structure. See RFC 791 for a complete
+// description of each.
+//
+
+ IP_OPT_EOL = 0; // End of list option
+ {$EXTERNALSYM IP_OPT_EOL}
+ IP_OPT_NOP = 1; // No operation
+ {$EXTERNALSYM IP_OPT_NOP}
+ IP_OPT_SECURITY = $82; // Security option
+ {$EXTERNALSYM IP_OPT_SECURITY}
+ IP_OPT_LSRR = $83; // Loose source route
+ {$EXTERNALSYM IP_OPT_LSRR}
+ IP_OPT_SSRR = $89; // Strict source route
+ {$EXTERNALSYM IP_OPT_SSRR}
+ IP_OPT_RR = $7; // Record route
+ {$EXTERNALSYM IP_OPT_RR}
+ IP_OPT_TS = $44; // Timestamp
+ {$EXTERNALSYM IP_OPT_TS}
+ IP_OPT_SID = $88; // Stream ID (obsolete)
+ {$EXTERNALSYM IP_OPT_SID}
+ IP_OPT_ROUTER_ALERT = $94; // Router Alert Option
+ {$EXTERNALSYM IP_OPT_ROUTER_ALERT}
+
+ MAX_OPT_SIZE = 40; // Maximum length of IP options in bytes
+ {$EXTERNALSYM MAX_OPT_SIZE}
+
+// Ioctls code exposed by Memphis tcpip stack.
+// For NT these ioctls are define in ntddip.h (private\inc)
+
+ IOCTL_IP_RTCHANGE_NOTIFY_REQUEST = 101;
+ {$EXTERNALSYM IOCTL_IP_RTCHANGE_NOTIFY_REQUEST}
+ IOCTL_IP_ADDCHANGE_NOTIFY_REQUEST = 102;
+ {$EXTERNALSYM IOCTL_IP_ADDCHANGE_NOTIFY_REQUEST}
+ IOCTL_ARP_SEND_REQUEST = 103;
+ {$EXTERNALSYM IOCTL_ARP_SEND_REQUEST}
+ IOCTL_IP_INTERFACE_INFO = 104;
+ {$EXTERNALSYM IOCTL_IP_INTERFACE_INFO}
+ IOCTL_IP_GET_BEST_INTERFACE = 105;
+ {$EXTERNALSYM IOCTL_IP_GET_BEST_INTERFACE}
+ IOCTL_IP_UNIDIRECTIONAL_ADAPTER_ADDRESS = 106;
+ {$EXTERNALSYM IOCTL_IP_UNIDIRECTIONAL_ADAPTER_ADDRESS}
+
+implementation
+
+end.
diff --git a/packages/extra/winunits/jwaiphlpapi.pas b/packages/extra/winunits/jwaiphlpapi.pas
index 6952ad738d..16df43adff 100644
--- a/packages/extra/winunits/jwaiphlpapi.pas
+++ b/packages/extra/winunits/jwaiphlpapi.pas
@@ -1,1185 +1,1185 @@
-{******************************************************************************}
-{ }
-{ Internet Protocol Helper API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: iphlpapi.h, released August 2000. The original Pascal }
-{ code is: IpHlpApi.pas, released September 2000. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Contributor(s): John C. Penman (jcp att craiglockhart dott com) }
-{ Vladimir Vassiliev (voldemarv att hotpop dott com) }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwaiphlpapi.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaIpHlpApi;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "iphlpapi.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaIpExport, JwaIpRtrMib, JwaIpTypes, JwaWinType, JwaWinBase, JwaWinSock;
-
-//////////////////////////////////////////////////////////////////////////////
-// //
-// IPRTRMIB.H has the definitions of the strcutures used to set and get //
-// information //
-// //
-//////////////////////////////////////////////////////////////////////////////
-
-// #include <iprtrmib.h>
-// #include <ipexport.h>
-// #include <iptypes.h>
-
-//////////////////////////////////////////////////////////////////////////////
-// //
-// The GetXXXTable APIs take a buffer and a size of buffer. If the buffer //
-// is not large enough, the APIs return ERROR_INSUFFICIENT_BUFFER and //
-// *pdwSize is the required buffer size //
-// The bOrder is a BOOLEAN, which if TRUE sorts the table according to //
-// MIB-II (RFC XXXX) //
-// //
-//////////////////////////////////////////////////////////////////////////////
-
-//////////////////////////////////////////////////////////////////////////////
-// //
-// Retrieves the number of interfaces in the system. These include LAN and //
-// WAN interfaces //
-// //
-//////////////////////////////////////////////////////////////////////////////
-
-function GetNumberOfInterfaces(var pdwNumIf: DWORD): DWORD; stdcall;
-{$EXTERNALSYM GetNumberOfInterfaces}
-
-//////////////////////////////////////////////////////////////////////////////
-// //
-// Gets the MIB-II ifEntry //
-// The dwIndex field of the MIB_IFROW should be set to the index of the //
-// interface being queried //
-// //
-//////////////////////////////////////////////////////////////////////////////
-
-function GetIfEntry(pIfRow: PMIB_IFROW): DWORD; stdcall;
-{$EXTERNALSYM GetIfEntry}
-
-//////////////////////////////////////////////////////////////////////////////
-// //
-// Gets the MIB-II IfTable //
-// //
-//////////////////////////////////////////////////////////////////////////////
-
-function GetIfTable(pIfTable: PMIB_IFTABLE; var pdwSize: ULONG; bOrder: BOOL): DWORD; stdcall;
-{$EXTERNALSYM GetIfTable}
-
-//////////////////////////////////////////////////////////////////////////////
-// //
-// Gets the Interface to IP Address mapping //
-// //
-//////////////////////////////////////////////////////////////////////////////
-
-function GetIpAddrTable(pIpAddrTable: PMIB_IPADDRTABLE; var pdwSize: ULONG; bOrder: BOOL): DWORD; stdcall;
-{$EXTERNALSYM GetIpAddrTable}
-
-//////////////////////////////////////////////////////////////////////////////
-// //
-// Gets the current IP Address to Physical Address (ARP) mapping //
-// //
-//////////////////////////////////////////////////////////////////////////////
-
-function GetIpNetTable(pIpNetTable: PMIB_IPNETTABLE; var pdwSize: ULONG; bOrder: BOOL): DWORD; stdcall;
-{$EXTERNALSYM GetIpNetTable}
-
-//////////////////////////////////////////////////////////////////////////////
-// //
-// Gets the IP Routing Table (RFX XXXX) //
-// //
-//////////////////////////////////////////////////////////////////////////////
-
-function GetIpForwardTable(pIpForwardTable: PMIB_IPFORWARDTABLE; var pdwSize: ULONG;
- bOrder: BOOL): DWORD; stdcall;
-{$EXTERNALSYM GetIpForwardTable}
-
-//////////////////////////////////////////////////////////////////////////////
-// //
-// Gets TCP Connection/UDP Listener Table //
-// //
-//////////////////////////////////////////////////////////////////////////////
-
-function GetTcpTable(pTcpTable: PMIB_TCPTABLE; var pdwSize: DWORD; bOrder: BOOL): DWORD; stdcall;
-{$EXTERNALSYM GetTcpTable}
-
-function GetUdpTable(pUdpTable: PMIB_UDPTABLE; var pdwSize: DWORD; bOrder: BOOL): DWORD; stdcall;
-{$EXTERNALSYM GetUdpTable}
-
-//////////////////////////////////////////////////////////////////////////////
-// //
-// Gets IP/ICMP/TCP/UDP Statistics //
-// //
-//////////////////////////////////////////////////////////////////////////////
-
-function GetIpStatistics(var pStats: MIB_IPSTATS): DWORD; stdcall;
-{$EXTERNALSYM GetIpStatistics}
-
-function GetIpStatisticsEx(pStats: PMIB_IPSTATS; dwFamily: DWORD): DWORD; stdcall;
-{$EXTERNALSYM GetIpStatisticsEx}
-
-function GetIcmpStatistics(var pStats: MIB_ICMP): DWORD; stdcall;
-{$EXTERNALSYM GetIcmpStatistics}
-
-function GetIcmpStatisticsEx(pStats: PMIB_ICMP_EX; dwFamily: DWORD): DWORD; stdcall;
-{$EXTERNALSYM GetIcmpStatisticsEx}
-
-function GetTcpStatistics(var pStats: MIB_TCPSTATS): DWORD; stdcall;
-{$EXTERNALSYM GetTcpStatistics}
-
-function GetTcpStatisticsEx(pStats: PMIB_TCPSTATS; dwFamily: DWORD): DWORD; stdcall;
-{$EXTERNALSYM GetTcpStatisticsEx}
-
-function GetUdpStatistics(var pStats: MIB_UDPSTATS): DWORD; stdcall;
-{$EXTERNALSYM GetUdpStatistics}
-
-function GetUdpStatisticsEx(pStats: PMIB_UDPSTATS; dwFamily: DWORD): DWORD; stdcall;
-{$EXTERNALSYM GetUdpStatisticsEx}
-
-//////////////////////////////////////////////////////////////////////////////
-// //
-// Used to set the ifAdminStatus on an interface. The only fields of the //
-// MIB_IFROW that are relevant are the dwIndex (index of the interface //
-// whose status needs to be set) and the dwAdminStatus which can be either //
-// MIB_IF_ADMIN_STATUS_UP or MIB_IF_ADMIN_STATUS_DOWN //
-// //
-//////////////////////////////////////////////////////////////////////////////
-
-function SetIfEntry(const pIfRow: MIB_IFROW): DWORD; stdcall;
-{$EXTERNALSYM SetIfEntry}
-
-//////////////////////////////////////////////////////////////////////////////
-// //
-// Used to create, modify or delete a route. In all cases the //
-// dwForwardIfIndex, dwForwardDest, dwForwardMask, dwForwardNextHop and //
-// dwForwardPolicy MUST BE SPECIFIED. Currently dwForwardPolicy is unused //
-// and MUST BE 0. //
-// For a set, the complete MIB_IPFORWARDROW structure must be specified //
-// //
-//////////////////////////////////////////////////////////////////////////////
-
-function CreateIpForwardEntry(const pRoute: MIB_IPFORWARDROW): DWORD; stdcall;
-{$EXTERNALSYM CreateIpForwardEntry}
-
-function SetIpForwardEntry(const pRoute: MIB_IPFORWARDROW): DWORD; stdcall;
-{$EXTERNALSYM SetIpForwardEntry}
-
-function DeleteIpForwardEntry(const pRoute: MIB_IPFORWARDROW): DWORD; stdcall;
-{$EXTERNALSYM DeleteIpForwardEntry}
-
-//////////////////////////////////////////////////////////////////////////////
-// //
-// Used to set the ipForwarding to ON or OFF (currently only ON->OFF is //
-// allowed) and to set the defaultTTL. If only one of the fields needs to //
-// be modified and the other needs to be the same as before the other field //
-// needs to be set to MIB_USE_CURRENT_TTL or MIB_USE_CURRENT_FORWARDING as //
-// the case may be //
-// //
-//////////////////////////////////////////////////////////////////////////////
-
-function SetIpStatistics(const pIpStats: MIB_IPSTATS): DWORD; stdcall;
-{$EXTERNALSYM SetIpStatistics}
-
-//////////////////////////////////////////////////////////////////////////////
-// //
-// Used to set the defaultTTL. //
-// //
-//////////////////////////////////////////////////////////////////////////////
-
-function SetIpTTL(nTTL: UINT): DWORD; stdcall;
-{$EXTERNALSYM SetIpTTL}
-
-//////////////////////////////////////////////////////////////////////////////
-// //
-// Used to create, modify or delete an ARP entry. In all cases the dwIndex //
-// dwAddr field MUST BE SPECIFIED. //
-// For a set, the complete MIB_IPNETROW structure must be specified //
-// //
-//////////////////////////////////////////////////////////////////////////////
-
-function CreateIpNetEntry(const pArpEntry: MIB_IPNETROW): DWORD; stdcall;
-{$EXTERNALSYM CreateIpNetEntry}
-
-function SetIpNetEntry(const pArpEntry: MIB_IPNETROW): DWORD; stdcall;
-{$EXTERNALSYM SetIpNetEntry}
-
-function DeleteIpNetEntry(const pArpEntry: MIB_IPNETROW): DWORD; stdcall;
-{$EXTERNALSYM DeleteIpNetEntry}
-
-function FlushIpNetTable(dwIfIndex: DWORD): DWORD; stdcall;
-{$EXTERNALSYM FlushIpNetTable}
-
-//////////////////////////////////////////////////////////////////////////////
-// //
-// Used to create or delete a Proxy ARP entry. The dwIndex is the index of //
-// the interface on which to PARP for the dwAddress. If the interface is //
-// of a type that doesnt support ARP, e.g. PPP, then the call will fail //
-// //
-//////////////////////////////////////////////////////////////////////////////
-
-function CreateProxyArpEntry(dwAddress, dwMask, dwIfIndex: DWORD): DWORD; stdcall;
-{$EXTERNALSYM CreateProxyArpEntry}
-
-function DeleteProxyArpEntry(dwAddress, dwMask, dwIfIndex: DWORD): DWORD; stdcall;
-{$EXTERNALSYM DeleteProxyArpEntry}
-
-//////////////////////////////////////////////////////////////////////////////
-// //
-// Used to set the state of a TCP Connection. The only state that it can be //
-// set to is MIB_TCP_STATE_DELETE_TCB. The complete MIB_TCPROW structure //
-// MUST BE SPECIFIED //
-// //
-//////////////////////////////////////////////////////////////////////////////
-
-function SetTcpEntry(const pTcpRow: MIB_TCPROW): DWORD; stdcall;
-{$EXTERNALSYM SetTcpEntry}
-
-function GetInterfaceInfo(pIfTable: PIP_INTERFACE_INFO; var dwOutBufLen: ULONG): DWORD; stdcall;
-{$EXTERNALSYM GetInterfaceInfo}
-
-function GetUniDirectionalAdapterInfo(pIPIfInfo: PIP_UNIDIRECTIONAL_ADAPTER_ADDRESS;
- var dwOutBufLen: ULONG): DWORD; stdcall;
-{$EXTERNALSYM GetUniDirectionalAdapterInfo(OUT PIP_UNIDIRECTIONAL_ADAPTER_ADDRESS pIPIfInfo}
-
-function NhpAllocateAndGetInterfaceInfoFromStack(out ppTable: PIP_INTERFACE_NAME_INFO;
- pdwCount: PDWORD; bOrder: BOOL; hHeap: HANDLE; dwFlags: DWORD): DWORD; stdcall;
-{$EXTERNALSYM NhpAllocateAndGetInterfaceInfoFromStack}
-
-//////////////////////////////////////////////////////////////////////////////
-// //
-// Gets the "best" outgoing interface for the specified destination address //
-// //
-//////////////////////////////////////////////////////////////////////////////
-
-function GetBestInterface(dwDestAddr: IPAddr; var pdwBestIfIndex: DWORD): DWORD; stdcall;
-{$EXTERNALSYM GetBestInterface}
-
-function GetBestInterfaceEx(pDestAddr: PSockAddr; var pdwBestIfIndex: DWORD): DWORD; stdcall;
-{$EXTERNALSYM GetBestInterfaceEx}
-
-//////////////////////////////////////////////////////////////////////////////
-// //
-// Gets the best (longest matching prefix) route for the given destination //
-// If the source address is also specified (i.e. is not 0x00000000), and //
-// there are multiple "best" routes to the given destination, the returned //
-// route will be one that goes out over the interface which has an address //
-// that matches the source address //
-// //
-//////////////////////////////////////////////////////////////////////////////
-
-function GetBestRoute(dwDestAddr, dwSourceAddr: DWORD; pBestRoute: PMIB_IPFORWARDROW): DWORD; stdcall;
-{$EXTERNALSYM GetBestRoute}
-
-function NotifyAddrChange(var Handle: THandle; overlapped: POVERLAPPED): DWORD; stdcall;
-{$EXTERNALSYM NotifyAddrChange}
-
-function NotifyRouteChange(var Handle: THandle; overlapped: POVERLAPPED): DWORD; stdcall;
-{$EXTERNALSYM NotifyRouteChange}
-
-function CancelIPChangeNotify(notifyOverlapped: LPOVERLAPPED): BOOL; stdcall;
-{$EXTERNALSYM CancelIPChangeNotify}
-
-function GetAdapterIndex(AdapterName: LPWSTR; var IfIndex: ULONG): DWORD; stdcall;
-{$EXTERNALSYM GetAdapterIndex}
-
-function AddIPAddress(Address: IPAddr; IpMask: IPMask; IfIndex: DWORD;
- var NTEContext, NTEInstance: ULONG): DWORD; stdcall;
-{$EXTERNALSYM AddIPAddress}
-
-function DeleteIPAddress(NTEContext: ULONG): DWORD; stdcall;
-{$EXTERNALSYM DeleteIPAddress}
-
-function GetNetworkParams(pFixedInfo: PFIXED_INFO; var pOutBufLen: ULONG): DWORD; stdcall;
-{$EXTERNALSYM GetNetworkParams}
-
-function GetAdaptersInfo(pAdapterInfo: PIP_ADAPTER_INFO; var pOutBufLen: ULONG): DWORD; stdcall;
-{$EXTERNALSYM GetAdaptersInfo}
-
-function GetAdapterOrderMap: PIP_ADAPTER_ORDER_MAP; stdcall;
-{$EXTERNALSYM GetAdapterOrderMap}
-
-//
-// The following functions require Winsock2.
-//
-
-function GetAdaptersAddresses(Family: ULONG; Flags: DWORD; Reserved: PVOID;
- pAdapterAddresses: PIP_ADAPTER_ADDRESSES; pOutBufLen: PULONG): DWORD; stdcall;
-{$EXTERNALSYM GetAdaptersAddresses}
-
-function GetPerAdapterInfo(IfIndex: ULONG; pPerAdapterInfo: PIP_PER_ADAPTER_INFO;
- var pOutBufLen: ULONG): DWORD; stdcall;
-{$EXTERNALSYM GetPerAdapterInfo}
-
-function IpReleaseAddress(const AdapterInfo: IP_ADAPTER_INDEX_MAP): DWORD; stdcall;
-{$EXTERNALSYM IpReleaseAddress}
-
-function IpRenewAddress(const AdapterInfo: IP_ADAPTER_INDEX_MAP): DWORD; stdcall;
-{$EXTERNALSYM IpRenewAddress}
-
-function SendARP(const DestIP, SrcIP: IPAddr; pMacAddr: PULONG; var PhyAddrLen: ULONG): DWORD; stdcall;
-{$EXTERNALSYM SendARP}
-
-function GetRTTAndHopCount(DestIpAddress: IPAddr; var HopCount: ULONG;
- MaxHops: ULONG; var RTT: ULONG): BOOL; stdcall;
-{$EXTERNALSYM GetRTTAndHopCount}
-
-function GetFriendlyIfIndex(IfIndex: DWORD): DWORD; stdcall;
-{$EXTERNALSYM GetFriendlyIfIndex}
-
-function EnableRouter(var pHandle: THandle; pOverlapped: POVERLAPPED): DWORD; stdcall;
-{$EXTERNALSYM EnableRouter}
-
-function UnenableRouter(pOverlapped: POVERLAPPED; lpdwEnableCount: LPDWORD): DWORD; stdcall;
-{$EXTERNALSYM UnenableRouter}
-
-function DisableMediaSense(var pHandle: HANDLE; pOverLapped: POVERLAPPED): DWORD; stdcall;
-{$EXTERNALSYM DisableMediaSense}
-
-function RestoreMediaSense(pOverlapped: POVERLAPPED; lpdwEnableCount: LPDWORD): DWORD; stdcall;
-{$EXTERNALSYM RestoreMediaSense}
-
-function GetIpErrorString(ErrorCode: IP_STATUS; Buffer: PWCHAR; var Size: DWORD): DWORD; stdcall;
-{$EXTERNALSYM GetIpErrorString}
-
-implementation
-
-const
- iphlpapilib = 'iphlpapi.dll';
-
-{$IFDEF DYNAMIC_LINK}
-
-var
- _GetNumberOfInterfaces: Pointer;
-
-function GetNumberOfInterfaces;
-begin
- GetProcedureAddress(_GetNumberOfInterfaces, iphlpapilib, 'GetNumberOfInterfaces');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetNumberOfInterfaces]
- end;
-end;
-
-var
- _GetIfEntry: Pointer;
-
-function GetIfEntry;
-begin
- GetProcedureAddress(_GetIfEntry, iphlpapilib, 'GetIfEntry');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetIfEntry]
- end;
-end;
-
-var
- _GetIfTable: Pointer;
-
-function GetIfTable;
-begin
- GetProcedureAddress(_GetIfTable, iphlpapilib, 'GetIfTable');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetIfTable]
- end;
-end;
-
-var
- _GetIpAddrTable: Pointer;
-
-function GetIpAddrTable;
-begin
- GetProcedureAddress(_GetIpAddrTable, iphlpapilib, 'GetIpAddrTable');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetIpAddrTable]
- end;
-end;
-
-var
- _GetIpNetTable: Pointer;
-
-function GetIpNetTable;
-begin
- GetProcedureAddress(_GetIpNetTable, iphlpapilib, 'GetIpNetTable');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetIpNetTable]
- end;
-end;
-
-var
- _GetIpForwardTable: Pointer;
-
-function GetIpForwardTable;
-begin
- GetProcedureAddress(_GetIpForwardTable, iphlpapilib, 'GetIpForwardTable');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetIpForwardTable]
- end;
-end;
-
-var
- _GetTcpTable: Pointer;
-
-function GetTcpTable;
-begin
- GetProcedureAddress(_GetTcpTable, iphlpapilib, 'GetTcpTable');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetTcpTable]
- end;
-end;
-
-var
- _GetUdpTable: Pointer;
-
-function GetUdpTable;
-begin
- GetProcedureAddress(_GetUdpTable, iphlpapilib, 'GetUdpTable');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetUdpTable]
- end;
-end;
-
-var
- _GetIpStatistics: Pointer;
-
-function GetIpStatistics;
-begin
- GetProcedureAddress(_GetIpStatistics, iphlpapilib, 'GetIpStatistics');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetIpStatistics]
- end;
-end;
-
-var
- _GetIpStatisticsEx: Pointer;
-
-function GetIpStatisticsEx;
-begin
- GetProcedureAddress(_GetIpStatisticsEx, iphlpapilib, 'GetIpStatisticsEx');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetIpStatisticsEx]
- end;
-end;
-
-var
- _GetIcmpStatistics: Pointer;
-
-function GetIcmpStatistics;
-begin
- GetProcedureAddress(_GetIcmpStatistics, iphlpapilib, 'GetIcmpStatistics');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetIcmpStatistics]
- end;
-end;
-
-var
- _GetIcmpStatisticsEx: Pointer;
-
-function GetIcmpStatisticsEx;
-begin
- GetProcedureAddress(_GetIcmpStatisticsEx, iphlpapilib, 'GetIcmpStatisticsEx');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetIcmpStatisticsEx]
- end;
-end;
-
-var
- _GetTcpStatistics: Pointer;
-
-function GetTcpStatistics;
-begin
- GetProcedureAddress(_GetTcpStatistics, iphlpapilib, 'GetTcpStatistics');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetTcpStatistics]
- end;
-end;
-
-var
- _GetTcpStatisticsEx: Pointer;
-
-function GetTcpStatisticsEx;
-begin
- GetProcedureAddress(_GetTcpStatisticsEx, iphlpapilib, 'GetTcpStatisticsEx');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetTcpStatisticsEx]
- end;
-end;
-
-var
- _GetUdpStatistics: Pointer;
-
-function GetUdpStatistics;
-begin
- GetProcedureAddress(_GetUdpStatistics, iphlpapilib, 'GetUdpStatistics');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetUdpStatistics]
- end;
-end;
-
-var
- _GetUdpStatisticsEx: Pointer;
-
-function GetUdpStatisticsEx;
-begin
- GetProcedureAddress(_GetUdpStatisticsEx, iphlpapilib, 'GetUdpStatisticsEx');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetUdpStatisticsEx]
- end;
-end;
-
-var
- _SetIfEntry: Pointer;
-
-function SetIfEntry;
-begin
- GetProcedureAddress(_SetIfEntry, iphlpapilib, 'SetIfEntry');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetIfEntry]
- end;
-end;
-
-var
- _CreateIpForwardEntry: Pointer;
-
-function CreateIpForwardEntry;
-begin
- GetProcedureAddress(_CreateIpForwardEntry, iphlpapilib, 'CreateIpForwardEntry');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreateIpForwardEntry]
- end;
-end;
-
-var
- _SetIpForwardEntry: Pointer;
-
-function SetIpForwardEntry;
-begin
- GetProcedureAddress(_SetIpForwardEntry, iphlpapilib, 'SetIpForwardEntry');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetIpForwardEntry]
- end;
-end;
-
-var
- _DeleteIpForwardEntry: Pointer;
-
-function DeleteIpForwardEntry;
-begin
- GetProcedureAddress(_DeleteIpForwardEntry, iphlpapilib, 'DeleteIpForwardEntry');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DeleteIpForwardEntry]
- end;
-end;
-
-var
- _SetIpStatistics: Pointer;
-
-function SetIpStatistics;
-begin
- GetProcedureAddress(_SetIpStatistics, iphlpapilib, 'SetIpStatistics');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetIpStatistics]
- end;
-end;
-
-var
- _SetIpTTL: Pointer;
-
-function SetIpTTL;
-begin
- GetProcedureAddress(_SetIpTTL, iphlpapilib, 'SetIpTTL');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetIpTTL]
- end;
-end;
-
-var
- _CreateIpNetEntry: Pointer;
-
-function CreateIpNetEntry;
-begin
- GetProcedureAddress(_CreateIpNetEntry, iphlpapilib, 'CreateIpNetEntry');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreateIpNetEntry]
- end;
-end;
-
-var
- _SetIpNetEntry: Pointer;
-
-function SetIpNetEntry;
-begin
- GetProcedureAddress(_SetIpNetEntry, iphlpapilib, 'SetIpNetEntry');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetIpNetEntry]
- end;
-end;
-
-var
- _DeleteIpNetEntry: Pointer;
-
-function DeleteIpNetEntry;
-begin
- GetProcedureAddress(_DeleteIpNetEntry, iphlpapilib, 'DeleteIpNetEntry');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DeleteIpNetEntry]
- end;
-end;
-
-var
- _FlushIpNetTable: Pointer;
-
-function FlushIpNetTable;
-begin
- GetProcedureAddress(_FlushIpNetTable, iphlpapilib, 'FlushIpNetTable');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_FlushIpNetTable]
- end;
-end;
-
-var
- _CreateProxyArpEntry: Pointer;
-
-function CreateProxyArpEntry;
-begin
- GetProcedureAddress(_CreateProxyArpEntry, iphlpapilib, 'CreateProxyArpEntry');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreateProxyArpEntry]
- end;
-end;
-
-var
- _DeleteProxyArpEntry: Pointer;
-
-function DeleteProxyArpEntry;
-begin
- GetProcedureAddress(_DeleteProxyArpEntry, iphlpapilib, 'DeleteProxyArpEntry');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DeleteProxyArpEntry]
- end;
-end;
-
-var
- _SetTcpEntry: Pointer;
-
-function SetTcpEntry;
-begin
- GetProcedureAddress(_SetTcpEntry, iphlpapilib, 'SetTcpEntry');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetTcpEntry]
- end;
-end;
-
-var
- _GetInterfaceInfo: Pointer;
-
-function GetInterfaceInfo;
-begin
- GetProcedureAddress(_GetInterfaceInfo, iphlpapilib, 'GetInterfaceInfo');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetInterfaceInfo]
- end;
-end;
-
-var
- _GetUniDirectionalAdapterInfo: Pointer;
-
-function GetUniDirectionalAdapterInfo;
-begin
- GetProcedureAddress(_GetUniDirectionalAdapterInfo, iphlpapilib, 'GetUniDirectionalAdapterInfo');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetUniDirectionalAdapterInfo]
- end;
-end;
-
-var
- _NhpAllocateAndGetInterfaceInfoFromStack: Pointer;
-
-function NhpAllocateAndGetInterfaceInfoFromStack;
-begin
- GetProcedureAddress(_NhpAllocateAndGetInterfaceInfoFromStack, iphlpapilib, 'NhpAllocateAndGetInterfaceInfoFromStack');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NhpAllocateAndGetInterfaceInfoFromStack]
- end;
-end;
-
-var
- _GetBestInterface: Pointer;
-
-function GetBestInterface;
-begin
- GetProcedureAddress(_GetBestInterface, iphlpapilib, 'GetBestInterface');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetBestInterface]
- end;
-end;
-
-var
- _GetBestInterfaceEx: Pointer;
-
-function GetBestInterfaceEx;
-begin
- GetProcedureAddress(_GetBestInterfaceEx, iphlpapilib, 'GetBestInterfaceEx');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetBestInterfaceEx]
- end;
-end;
-
-var
- _GetBestRoute: Pointer;
-
-function GetBestRoute;
-begin
- GetProcedureAddress(_GetBestRoute, iphlpapilib, 'GetBestRoute');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetBestRoute]
- end;
-end;
-
-var
- _NotifyAddrChange: Pointer;
-
-function NotifyAddrChange;
-begin
- GetProcedureAddress(_NotifyAddrChange, iphlpapilib, 'NotifyAddrChange');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NotifyAddrChange]
- end;
-end;
-
-var
- _NotifyRouteChange: Pointer;
-
-function NotifyRouteChange;
-begin
- GetProcedureAddress(_NotifyRouteChange, iphlpapilib, 'NotifyRouteChange');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NotifyRouteChange]
- end;
-end;
-
-var
- _CancelIPChangeNotify: Pointer;
-
-function CancelIPChangeNotify;
-begin
- GetProcedureAddress(_CancelIPChangeNotify, iphlpapilib, 'CancelIPChangeNotify');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CancelIPChangeNotify]
- end;
-end;
-
-var
- _GetAdapterIndex: Pointer;
-
-function GetAdapterIndex;
-begin
- GetProcedureAddress(_GetAdapterIndex, iphlpapilib, 'GetAdapterIndex');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetAdapterIndex]
- end;
-end;
-
-var
- _AddIPAddress: Pointer;
-
-function AddIPAddress;
-begin
- GetProcedureAddress(_AddIPAddress, iphlpapilib, 'AddIPAddress');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_AddIPAddress]
- end;
-end;
-
-var
- _DeleteIPAddress: Pointer;
-
-function DeleteIPAddress;
-begin
- GetProcedureAddress(_DeleteIPAddress, iphlpapilib, 'DeleteIPAddress');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DeleteIPAddress]
- end;
-end;
-
-var
- _GetNetworkParams: Pointer;
-
-function GetNetworkParams;
-begin
- GetProcedureAddress(_GetNetworkParams, iphlpapilib, 'GetNetworkParams');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetNetworkParams]
- end;
-end;
-
-var
- _GetAdaptersInfo: Pointer;
-
-function GetAdaptersInfo;
-begin
- GetProcedureAddress(_GetAdaptersInfo, iphlpapilib, 'GetAdaptersInfo');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetAdaptersInfo]
- end;
-end;
-
-var
- _GetAdapterOrderMap: Pointer;
-
-function GetAdapterOrderMap;
-begin
- GetProcedureAddress(_GetAdapterOrderMap, iphlpapilib, 'GetAdapterOrderMap');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetAdapterOrderMap]
- end;
-end;
-
-var
- _GetAdaptersAddresses: Pointer;
-
-function GetAdaptersAddresses;
-begin
- GetProcedureAddress(_GetAdaptersAddresses, iphlpapilib, 'GetAdaptersAddresses');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetAdaptersAddresses]
- end;
-end;
-
-var
- _GetPerAdapterInfo: Pointer;
-
-function GetPerAdapterInfo;
-begin
- GetProcedureAddress(_GetPerAdapterInfo, iphlpapilib, 'GetPerAdapterInfo');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetPerAdapterInfo]
- end;
-end;
-
-var
- _IpReleaseAddress: Pointer;
-
-function IpReleaseAddress;
-begin
- GetProcedureAddress(_IpReleaseAddress, iphlpapilib, 'IpReleaseAddress');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_IpReleaseAddress]
- end;
-end;
-
-var
- _IpRenewAddress: Pointer;
-
-function IpRenewAddress;
-begin
- GetProcedureAddress(_IpRenewAddress, iphlpapilib, 'IpRenewAddress');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_IpRenewAddress]
- end;
-end;
-
-var
- _SendARP: Pointer;
-
-function SendARP;
-begin
- GetProcedureAddress(_SendARP, iphlpapilib, 'SendARP');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SendARP]
- end;
-end;
-
-var
- _GetRTTAndHopCount: Pointer;
-
-function GetRTTAndHopCount;
-begin
- GetProcedureAddress(_GetRTTAndHopCount, iphlpapilib, 'GetRTTAndHopCount');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetRTTAndHopCount]
- end;
-end;
-
-var
- _GetFriendlyIfIndex: Pointer;
-
-function GetFriendlyIfIndex;
-begin
- GetProcedureAddress(_GetFriendlyIfIndex, iphlpapilib, 'GetFriendlyIfIndex');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetFriendlyIfIndex]
- end;
-end;
-
-var
- _EnableRouter: Pointer;
-
-function EnableRouter;
-begin
- GetProcedureAddress(_EnableRouter, iphlpapilib, 'EnableRouter');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_EnableRouter]
- end;
-end;
-
-var
- _UnenableRouter: Pointer;
-
-function UnenableRouter;
-begin
- GetProcedureAddress(_UnenableRouter, iphlpapilib, 'UnenableRouter');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_UnenableRouter]
- end;
-end;
-
-var
- _DisableMediaSense: Pointer;
-
-function DisableMediaSense;
-begin
- GetProcedureAddress(_DisableMediaSense, iphlpapilib, 'DisableMediaSense');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DisableMediaSense]
- end;
-end;
-
-var
- _RestoreMediaSense: Pointer;
-
-function RestoreMediaSense;
-begin
- GetProcedureAddress(_RestoreMediaSense, iphlpapilib, 'RestoreMediaSense');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RestoreMediaSense]
- end;
-end;
-
-var
- _GetIpErrorString: Pointer;
-
-function GetIpErrorString;
-begin
- GetProcedureAddress(_GetIpErrorString, iphlpapilib, 'GetIpErrorString');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetIpErrorString]
- end;
-end;
-
-{$ELSE}
-
-function GetNumberOfInterfaces; external iphlpapilib name 'GetNumberOfInterfaces';
-function GetIfEntry; external iphlpapilib name 'GetIfEntry';
-function GetIfTable; external iphlpapilib name 'GetIfTable';
-function GetIpAddrTable; external iphlpapilib name 'GetIpAddrTable';
-function GetIpNetTable; external iphlpapilib name 'GetIpNetTable';
-function GetIpForwardTable; external iphlpapilib name 'GetIpForwardTable';
-function GetTcpTable; external iphlpapilib name 'GetTcpTable';
-function GetUdpTable; external iphlpapilib name 'GetUdpTable';
-function GetIpStatistics; external iphlpapilib name 'GetIpStatistics';
-function GetIpStatisticsEx; external iphlpapilib name 'GetIpStatisticsEx';
-function GetIcmpStatistics; external iphlpapilib name 'GetIcmpStatistics';
-function GetIcmpStatisticsEx; external iphlpapilib name 'GetIcmpStatisticsEx';
-function GetTcpStatistics; external iphlpapilib name 'GetTcpStatistics';
-function GetTcpStatisticsEx; external iphlpapilib name 'GetTcpStatisticsEx';
-function GetUdpStatistics; external iphlpapilib name 'GetUdpStatistics';
-function GetUdpStatisticsEx; external iphlpapilib name 'GetUdpStatisticsEx';
-function SetIfEntry; external iphlpapilib name 'SetIfEntry';
-function CreateIpForwardEntry; external iphlpapilib name 'CreateIpForwardEntry';
-function SetIpForwardEntry; external iphlpapilib name 'SetIpForwardEntry';
-function DeleteIpForwardEntry; external iphlpapilib name 'DeleteIpForwardEntry';
-function SetIpStatistics; external iphlpapilib name 'SetIpStatistics';
-function SetIpTTL; external iphlpapilib name 'SetIpTTL';
-function CreateIpNetEntry; external iphlpapilib name 'CreateIpNetEntry';
-function SetIpNetEntry; external iphlpapilib name 'SetIpNetEntry';
-function DeleteIpNetEntry; external iphlpapilib name 'DeleteIpNetEntry';
-function FlushIpNetTable; external iphlpapilib name 'FlushIpNetTable';
-function CreateProxyArpEntry; external iphlpapilib name 'CreateProxyArpEntry';
-function DeleteProxyArpEntry; external iphlpapilib name 'DeleteProxyArpEntry';
-function SetTcpEntry; external iphlpapilib name 'SetTcpEntry';
-function GetInterfaceInfo; external iphlpapilib name 'GetInterfaceInfo';
-function GetUniDirectionalAdapterInfo; external iphlpapilib name 'GetUniDirectionalAdapterInfo';
-function NhpAllocateAndGetInterfaceInfoFromStack; external iphlpapilib name 'NhpAllocateAndGetInterfaceInfoFromStack';
-function GetBestInterface; external iphlpapilib name 'GetBestInterface';
-function GetBestInterfaceEx; external iphlpapilib name 'GetBestInterfaceEx';
-function GetBestRoute; external iphlpapilib name 'GetBestRoute';
-function NotifyAddrChange; external iphlpapilib name 'NotifyAddrChange';
-function NotifyRouteChange; external iphlpapilib name 'NotifyRouteChange';
-function CancelIPChangeNotify; external iphlpapilib name 'CancelIPChangeNotify';
-function GetAdapterIndex; external iphlpapilib name 'GetAdapterIndex';
-function AddIPAddress; external iphlpapilib name 'AddIPAddress';
-function DeleteIPAddress; external iphlpapilib name 'DeleteIPAddress';
-function GetNetworkParams; external iphlpapilib name 'GetNetworkParams';
-function GetAdaptersInfo; external iphlpapilib name 'GetAdaptersInfo';
-function GetAdapterOrderMap; external iphlpapilib name 'GetAdapterOrderMap';
-function GetAdaptersAddresses; external iphlpapilib name 'GetAdaptersAddresses';
-function GetPerAdapterInfo; external iphlpapilib name 'GetPerAdapterInfo';
-function IpReleaseAddress; external iphlpapilib name 'IpReleaseAddress';
-function IpRenewAddress; external iphlpapilib name 'IpRenewAddress';
-function SendARP; external iphlpapilib name 'SendARP';
-function GetRTTAndHopCount; external iphlpapilib name 'GetRTTAndHopCount';
-function GetFriendlyIfIndex; external iphlpapilib name 'GetFriendlyIfIndex';
-function EnableRouter; external iphlpapilib name 'EnableRouter';
-function UnenableRouter; external iphlpapilib name 'UnenableRouter';
-function DisableMediaSense; external iphlpapilib name 'DisableMediaSense';
-function RestoreMediaSense; external iphlpapilib name 'RestoreMediaSense';
-function GetIpErrorString; external iphlpapilib name 'GetIpErrorString';
-
-{$ENDIF DYNAMIC_LINK}
-
-end.
+{******************************************************************************}
+{ }
+{ Internet Protocol Helper API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: iphlpapi.h, released August 2000. The original Pascal }
+{ code is: IpHlpApi.pas, released September 2000. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Contributor(s): John C. Penman (jcp att craiglockhart dott com) }
+{ Vladimir Vassiliev (voldemarv att hotpop dott com) }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwaiphlpapi.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaIpHlpApi;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "iphlpapi.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaIpExport, JwaIpRtrMib, JwaIpTypes, JwaWinType, JwaWinBase, JwaWinSock;
+
+//////////////////////////////////////////////////////////////////////////////
+// //
+// IPRTRMIB.H has the definitions of the strcutures used to set and get //
+// information //
+// //
+//////////////////////////////////////////////////////////////////////////////
+
+// #include <iprtrmib.h>
+// #include <ipexport.h>
+// #include <iptypes.h>
+
+//////////////////////////////////////////////////////////////////////////////
+// //
+// The GetXXXTable APIs take a buffer and a size of buffer. If the buffer //
+// is not large enough, the APIs return ERROR_INSUFFICIENT_BUFFER and //
+// *pdwSize is the required buffer size //
+// The bOrder is a BOOLEAN, which if TRUE sorts the table according to //
+// MIB-II (RFC XXXX) //
+// //
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+// //
+// Retrieves the number of interfaces in the system. These include LAN and //
+// WAN interfaces //
+// //
+//////////////////////////////////////////////////////////////////////////////
+
+function GetNumberOfInterfaces(var pdwNumIf: DWORD): DWORD; stdcall;
+{$EXTERNALSYM GetNumberOfInterfaces}
+
+//////////////////////////////////////////////////////////////////////////////
+// //
+// Gets the MIB-II ifEntry //
+// The dwIndex field of the MIB_IFROW should be set to the index of the //
+// interface being queried //
+// //
+//////////////////////////////////////////////////////////////////////////////
+
+function GetIfEntry(pIfRow: PMIB_IFROW): DWORD; stdcall;
+{$EXTERNALSYM GetIfEntry}
+
+//////////////////////////////////////////////////////////////////////////////
+// //
+// Gets the MIB-II IfTable //
+// //
+//////////////////////////////////////////////////////////////////////////////
+
+function GetIfTable(pIfTable: PMIB_IFTABLE; var pdwSize: ULONG; bOrder: BOOL): DWORD; stdcall;
+{$EXTERNALSYM GetIfTable}
+
+//////////////////////////////////////////////////////////////////////////////
+// //
+// Gets the Interface to IP Address mapping //
+// //
+//////////////////////////////////////////////////////////////////////////////
+
+function GetIpAddrTable(pIpAddrTable: PMIB_IPADDRTABLE; var pdwSize: ULONG; bOrder: BOOL): DWORD; stdcall;
+{$EXTERNALSYM GetIpAddrTable}
+
+//////////////////////////////////////////////////////////////////////////////
+// //
+// Gets the current IP Address to Physical Address (ARP) mapping //
+// //
+//////////////////////////////////////////////////////////////////////////////
+
+function GetIpNetTable(pIpNetTable: PMIB_IPNETTABLE; var pdwSize: ULONG; bOrder: BOOL): DWORD; stdcall;
+{$EXTERNALSYM GetIpNetTable}
+
+//////////////////////////////////////////////////////////////////////////////
+// //
+// Gets the IP Routing Table (RFX XXXX) //
+// //
+//////////////////////////////////////////////////////////////////////////////
+
+function GetIpForwardTable(pIpForwardTable: PMIB_IPFORWARDTABLE; var pdwSize: ULONG;
+ bOrder: BOOL): DWORD; stdcall;
+{$EXTERNALSYM GetIpForwardTable}
+
+//////////////////////////////////////////////////////////////////////////////
+// //
+// Gets TCP Connection/UDP Listener Table //
+// //
+//////////////////////////////////////////////////////////////////////////////
+
+function GetTcpTable(pTcpTable: PMIB_TCPTABLE; var pdwSize: DWORD; bOrder: BOOL): DWORD; stdcall;
+{$EXTERNALSYM GetTcpTable}
+
+function GetUdpTable(pUdpTable: PMIB_UDPTABLE; var pdwSize: DWORD; bOrder: BOOL): DWORD; stdcall;
+{$EXTERNALSYM GetUdpTable}
+
+//////////////////////////////////////////////////////////////////////////////
+// //
+// Gets IP/ICMP/TCP/UDP Statistics //
+// //
+//////////////////////////////////////////////////////////////////////////////
+
+function GetIpStatistics(var pStats: MIB_IPSTATS): DWORD; stdcall;
+{$EXTERNALSYM GetIpStatistics}
+
+function GetIpStatisticsEx(pStats: PMIB_IPSTATS; dwFamily: DWORD): DWORD; stdcall;
+{$EXTERNALSYM GetIpStatisticsEx}
+
+function GetIcmpStatistics(var pStats: MIB_ICMP): DWORD; stdcall;
+{$EXTERNALSYM GetIcmpStatistics}
+
+function GetIcmpStatisticsEx(pStats: PMIB_ICMP_EX; dwFamily: DWORD): DWORD; stdcall;
+{$EXTERNALSYM GetIcmpStatisticsEx}
+
+function GetTcpStatistics(var pStats: MIB_TCPSTATS): DWORD; stdcall;
+{$EXTERNALSYM GetTcpStatistics}
+
+function GetTcpStatisticsEx(pStats: PMIB_TCPSTATS; dwFamily: DWORD): DWORD; stdcall;
+{$EXTERNALSYM GetTcpStatisticsEx}
+
+function GetUdpStatistics(var pStats: MIB_UDPSTATS): DWORD; stdcall;
+{$EXTERNALSYM GetUdpStatistics}
+
+function GetUdpStatisticsEx(pStats: PMIB_UDPSTATS; dwFamily: DWORD): DWORD; stdcall;
+{$EXTERNALSYM GetUdpStatisticsEx}
+
+//////////////////////////////////////////////////////////////////////////////
+// //
+// Used to set the ifAdminStatus on an interface. The only fields of the //
+// MIB_IFROW that are relevant are the dwIndex (index of the interface //
+// whose status needs to be set) and the dwAdminStatus which can be either //
+// MIB_IF_ADMIN_STATUS_UP or MIB_IF_ADMIN_STATUS_DOWN //
+// //
+//////////////////////////////////////////////////////////////////////////////
+
+function SetIfEntry(const pIfRow: MIB_IFROW): DWORD; stdcall;
+{$EXTERNALSYM SetIfEntry}
+
+//////////////////////////////////////////////////////////////////////////////
+// //
+// Used to create, modify or delete a route. In all cases the //
+// dwForwardIfIndex, dwForwardDest, dwForwardMask, dwForwardNextHop and //
+// dwForwardPolicy MUST BE SPECIFIED. Currently dwForwardPolicy is unused //
+// and MUST BE 0. //
+// For a set, the complete MIB_IPFORWARDROW structure must be specified //
+// //
+//////////////////////////////////////////////////////////////////////////////
+
+function CreateIpForwardEntry(const pRoute: MIB_IPFORWARDROW): DWORD; stdcall;
+{$EXTERNALSYM CreateIpForwardEntry}
+
+function SetIpForwardEntry(const pRoute: MIB_IPFORWARDROW): DWORD; stdcall;
+{$EXTERNALSYM SetIpForwardEntry}
+
+function DeleteIpForwardEntry(const pRoute: MIB_IPFORWARDROW): DWORD; stdcall;
+{$EXTERNALSYM DeleteIpForwardEntry}
+
+//////////////////////////////////////////////////////////////////////////////
+// //
+// Used to set the ipForwarding to ON or OFF (currently only ON->OFF is //
+// allowed) and to set the defaultTTL. If only one of the fields needs to //
+// be modified and the other needs to be the same as before the other field //
+// needs to be set to MIB_USE_CURRENT_TTL or MIB_USE_CURRENT_FORWARDING as //
+// the case may be //
+// //
+//////////////////////////////////////////////////////////////////////////////
+
+function SetIpStatistics(const pIpStats: MIB_IPSTATS): DWORD; stdcall;
+{$EXTERNALSYM SetIpStatistics}
+
+//////////////////////////////////////////////////////////////////////////////
+// //
+// Used to set the defaultTTL. //
+// //
+//////////////////////////////////////////////////////////////////////////////
+
+function SetIpTTL(nTTL: UINT): DWORD; stdcall;
+{$EXTERNALSYM SetIpTTL}
+
+//////////////////////////////////////////////////////////////////////////////
+// //
+// Used to create, modify or delete an ARP entry. In all cases the dwIndex //
+// dwAddr field MUST BE SPECIFIED. //
+// For a set, the complete MIB_IPNETROW structure must be specified //
+// //
+//////////////////////////////////////////////////////////////////////////////
+
+function CreateIpNetEntry(const pArpEntry: MIB_IPNETROW): DWORD; stdcall;
+{$EXTERNALSYM CreateIpNetEntry}
+
+function SetIpNetEntry(const pArpEntry: MIB_IPNETROW): DWORD; stdcall;
+{$EXTERNALSYM SetIpNetEntry}
+
+function DeleteIpNetEntry(const pArpEntry: MIB_IPNETROW): DWORD; stdcall;
+{$EXTERNALSYM DeleteIpNetEntry}
+
+function FlushIpNetTable(dwIfIndex: DWORD): DWORD; stdcall;
+{$EXTERNALSYM FlushIpNetTable}
+
+//////////////////////////////////////////////////////////////////////////////
+// //
+// Used to create or delete a Proxy ARP entry. The dwIndex is the index of //
+// the interface on which to PARP for the dwAddress. If the interface is //
+// of a type that doesnt support ARP, e.g. PPP, then the call will fail //
+// //
+//////////////////////////////////////////////////////////////////////////////
+
+function CreateProxyArpEntry(dwAddress, dwMask, dwIfIndex: DWORD): DWORD; stdcall;
+{$EXTERNALSYM CreateProxyArpEntry}
+
+function DeleteProxyArpEntry(dwAddress, dwMask, dwIfIndex: DWORD): DWORD; stdcall;
+{$EXTERNALSYM DeleteProxyArpEntry}
+
+//////////////////////////////////////////////////////////////////////////////
+// //
+// Used to set the state of a TCP Connection. The only state that it can be //
+// set to is MIB_TCP_STATE_DELETE_TCB. The complete MIB_TCPROW structure //
+// MUST BE SPECIFIED //
+// //
+//////////////////////////////////////////////////////////////////////////////
+
+function SetTcpEntry(const pTcpRow: MIB_TCPROW): DWORD; stdcall;
+{$EXTERNALSYM SetTcpEntry}
+
+function GetInterfaceInfo(pIfTable: PIP_INTERFACE_INFO; var dwOutBufLen: ULONG): DWORD; stdcall;
+{$EXTERNALSYM GetInterfaceInfo}
+
+function GetUniDirectionalAdapterInfo(pIPIfInfo: PIP_UNIDIRECTIONAL_ADAPTER_ADDRESS;
+ var dwOutBufLen: ULONG): DWORD; stdcall;
+{$EXTERNALSYM GetUniDirectionalAdapterInfo(OUT PIP_UNIDIRECTIONAL_ADAPTER_ADDRESS pIPIfInfo}
+
+function NhpAllocateAndGetInterfaceInfoFromStack(out ppTable: PIP_INTERFACE_NAME_INFO;
+ pdwCount: PDWORD; bOrder: BOOL; hHeap: HANDLE; dwFlags: DWORD): DWORD; stdcall;
+{$EXTERNALSYM NhpAllocateAndGetInterfaceInfoFromStack}
+
+//////////////////////////////////////////////////////////////////////////////
+// //
+// Gets the "best" outgoing interface for the specified destination address //
+// //
+//////////////////////////////////////////////////////////////////////////////
+
+function GetBestInterface(dwDestAddr: IPAddr; var pdwBestIfIndex: DWORD): DWORD; stdcall;
+{$EXTERNALSYM GetBestInterface}
+
+function GetBestInterfaceEx(pDestAddr: PSockAddr; var pdwBestIfIndex: DWORD): DWORD; stdcall;
+{$EXTERNALSYM GetBestInterfaceEx}
+
+//////////////////////////////////////////////////////////////////////////////
+// //
+// Gets the best (longest matching prefix) route for the given destination //
+// If the source address is also specified (i.e. is not 0x00000000), and //
+// there are multiple "best" routes to the given destination, the returned //
+// route will be one that goes out over the interface which has an address //
+// that matches the source address //
+// //
+//////////////////////////////////////////////////////////////////////////////
+
+function GetBestRoute(dwDestAddr, dwSourceAddr: DWORD; pBestRoute: PMIB_IPFORWARDROW): DWORD; stdcall;
+{$EXTERNALSYM GetBestRoute}
+
+function NotifyAddrChange(var Handle: THandle; overlapped: POVERLAPPED): DWORD; stdcall;
+{$EXTERNALSYM NotifyAddrChange}
+
+function NotifyRouteChange(var Handle: THandle; overlapped: POVERLAPPED): DWORD; stdcall;
+{$EXTERNALSYM NotifyRouteChange}
+
+function CancelIPChangeNotify(notifyOverlapped: LPOVERLAPPED): BOOL; stdcall;
+{$EXTERNALSYM CancelIPChangeNotify}
+
+function GetAdapterIndex(AdapterName: LPWSTR; var IfIndex: ULONG): DWORD; stdcall;
+{$EXTERNALSYM GetAdapterIndex}
+
+function AddIPAddress(Address: IPAddr; IpMask: IPMask; IfIndex: DWORD;
+ var NTEContext, NTEInstance: ULONG): DWORD; stdcall;
+{$EXTERNALSYM AddIPAddress}
+
+function DeleteIPAddress(NTEContext: ULONG): DWORD; stdcall;
+{$EXTERNALSYM DeleteIPAddress}
+
+function GetNetworkParams(pFixedInfo: PFIXED_INFO; var pOutBufLen: ULONG): DWORD; stdcall;
+{$EXTERNALSYM GetNetworkParams}
+
+function GetAdaptersInfo(pAdapterInfo: PIP_ADAPTER_INFO; var pOutBufLen: ULONG): DWORD; stdcall;
+{$EXTERNALSYM GetAdaptersInfo}
+
+function GetAdapterOrderMap: PIP_ADAPTER_ORDER_MAP; stdcall;
+{$EXTERNALSYM GetAdapterOrderMap}
+
+//
+// The following functions require Winsock2.
+//
+
+function GetAdaptersAddresses(Family: ULONG; Flags: DWORD; Reserved: PVOID;
+ pAdapterAddresses: PIP_ADAPTER_ADDRESSES; pOutBufLen: PULONG): DWORD; stdcall;
+{$EXTERNALSYM GetAdaptersAddresses}
+
+function GetPerAdapterInfo(IfIndex: ULONG; pPerAdapterInfo: PIP_PER_ADAPTER_INFO;
+ var pOutBufLen: ULONG): DWORD; stdcall;
+{$EXTERNALSYM GetPerAdapterInfo}
+
+function IpReleaseAddress(const AdapterInfo: IP_ADAPTER_INDEX_MAP): DWORD; stdcall;
+{$EXTERNALSYM IpReleaseAddress}
+
+function IpRenewAddress(const AdapterInfo: IP_ADAPTER_INDEX_MAP): DWORD; stdcall;
+{$EXTERNALSYM IpRenewAddress}
+
+function SendARP(const DestIP, SrcIP: IPAddr; pMacAddr: PULONG; var PhyAddrLen: ULONG): DWORD; stdcall;
+{$EXTERNALSYM SendARP}
+
+function GetRTTAndHopCount(DestIpAddress: IPAddr; var HopCount: ULONG;
+ MaxHops: ULONG; var RTT: ULONG): BOOL; stdcall;
+{$EXTERNALSYM GetRTTAndHopCount}
+
+function GetFriendlyIfIndex(IfIndex: DWORD): DWORD; stdcall;
+{$EXTERNALSYM GetFriendlyIfIndex}
+
+function EnableRouter(var pHandle: THandle; pOverlapped: POVERLAPPED): DWORD; stdcall;
+{$EXTERNALSYM EnableRouter}
+
+function UnenableRouter(pOverlapped: POVERLAPPED; lpdwEnableCount: LPDWORD): DWORD; stdcall;
+{$EXTERNALSYM UnenableRouter}
+
+function DisableMediaSense(var pHandle: HANDLE; pOverLapped: POVERLAPPED): DWORD; stdcall;
+{$EXTERNALSYM DisableMediaSense}
+
+function RestoreMediaSense(pOverlapped: POVERLAPPED; lpdwEnableCount: LPDWORD): DWORD; stdcall;
+{$EXTERNALSYM RestoreMediaSense}
+
+function GetIpErrorString(ErrorCode: IP_STATUS; Buffer: PWCHAR; var Size: DWORD): DWORD; stdcall;
+{$EXTERNALSYM GetIpErrorString}
+
+implementation
+
+const
+ iphlpapilib = 'iphlpapi.dll';
+
+{$IFDEF DYNAMIC_LINK}
+
+var
+ _GetNumberOfInterfaces: Pointer;
+
+function GetNumberOfInterfaces;
+begin
+ GetProcedureAddress(_GetNumberOfInterfaces, iphlpapilib, 'GetNumberOfInterfaces');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetNumberOfInterfaces]
+ end;
+end;
+
+var
+ _GetIfEntry: Pointer;
+
+function GetIfEntry;
+begin
+ GetProcedureAddress(_GetIfEntry, iphlpapilib, 'GetIfEntry');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetIfEntry]
+ end;
+end;
+
+var
+ _GetIfTable: Pointer;
+
+function GetIfTable;
+begin
+ GetProcedureAddress(_GetIfTable, iphlpapilib, 'GetIfTable');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetIfTable]
+ end;
+end;
+
+var
+ _GetIpAddrTable: Pointer;
+
+function GetIpAddrTable;
+begin
+ GetProcedureAddress(_GetIpAddrTable, iphlpapilib, 'GetIpAddrTable');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetIpAddrTable]
+ end;
+end;
+
+var
+ _GetIpNetTable: Pointer;
+
+function GetIpNetTable;
+begin
+ GetProcedureAddress(_GetIpNetTable, iphlpapilib, 'GetIpNetTable');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetIpNetTable]
+ end;
+end;
+
+var
+ _GetIpForwardTable: Pointer;
+
+function GetIpForwardTable;
+begin
+ GetProcedureAddress(_GetIpForwardTable, iphlpapilib, 'GetIpForwardTable');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetIpForwardTable]
+ end;
+end;
+
+var
+ _GetTcpTable: Pointer;
+
+function GetTcpTable;
+begin
+ GetProcedureAddress(_GetTcpTable, iphlpapilib, 'GetTcpTable');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetTcpTable]
+ end;
+end;
+
+var
+ _GetUdpTable: Pointer;
+
+function GetUdpTable;
+begin
+ GetProcedureAddress(_GetUdpTable, iphlpapilib, 'GetUdpTable');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetUdpTable]
+ end;
+end;
+
+var
+ _GetIpStatistics: Pointer;
+
+function GetIpStatistics;
+begin
+ GetProcedureAddress(_GetIpStatistics, iphlpapilib, 'GetIpStatistics');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetIpStatistics]
+ end;
+end;
+
+var
+ _GetIpStatisticsEx: Pointer;
+
+function GetIpStatisticsEx;
+begin
+ GetProcedureAddress(_GetIpStatisticsEx, iphlpapilib, 'GetIpStatisticsEx');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetIpStatisticsEx]
+ end;
+end;
+
+var
+ _GetIcmpStatistics: Pointer;
+
+function GetIcmpStatistics;
+begin
+ GetProcedureAddress(_GetIcmpStatistics, iphlpapilib, 'GetIcmpStatistics');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetIcmpStatistics]
+ end;
+end;
+
+var
+ _GetIcmpStatisticsEx: Pointer;
+
+function GetIcmpStatisticsEx;
+begin
+ GetProcedureAddress(_GetIcmpStatisticsEx, iphlpapilib, 'GetIcmpStatisticsEx');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetIcmpStatisticsEx]
+ end;
+end;
+
+var
+ _GetTcpStatistics: Pointer;
+
+function GetTcpStatistics;
+begin
+ GetProcedureAddress(_GetTcpStatistics, iphlpapilib, 'GetTcpStatistics');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetTcpStatistics]
+ end;
+end;
+
+var
+ _GetTcpStatisticsEx: Pointer;
+
+function GetTcpStatisticsEx;
+begin
+ GetProcedureAddress(_GetTcpStatisticsEx, iphlpapilib, 'GetTcpStatisticsEx');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetTcpStatisticsEx]
+ end;
+end;
+
+var
+ _GetUdpStatistics: Pointer;
+
+function GetUdpStatistics;
+begin
+ GetProcedureAddress(_GetUdpStatistics, iphlpapilib, 'GetUdpStatistics');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetUdpStatistics]
+ end;
+end;
+
+var
+ _GetUdpStatisticsEx: Pointer;
+
+function GetUdpStatisticsEx;
+begin
+ GetProcedureAddress(_GetUdpStatisticsEx, iphlpapilib, 'GetUdpStatisticsEx');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetUdpStatisticsEx]
+ end;
+end;
+
+var
+ _SetIfEntry: Pointer;
+
+function SetIfEntry;
+begin
+ GetProcedureAddress(_SetIfEntry, iphlpapilib, 'SetIfEntry');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetIfEntry]
+ end;
+end;
+
+var
+ _CreateIpForwardEntry: Pointer;
+
+function CreateIpForwardEntry;
+begin
+ GetProcedureAddress(_CreateIpForwardEntry, iphlpapilib, 'CreateIpForwardEntry');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreateIpForwardEntry]
+ end;
+end;
+
+var
+ _SetIpForwardEntry: Pointer;
+
+function SetIpForwardEntry;
+begin
+ GetProcedureAddress(_SetIpForwardEntry, iphlpapilib, 'SetIpForwardEntry');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetIpForwardEntry]
+ end;
+end;
+
+var
+ _DeleteIpForwardEntry: Pointer;
+
+function DeleteIpForwardEntry;
+begin
+ GetProcedureAddress(_DeleteIpForwardEntry, iphlpapilib, 'DeleteIpForwardEntry');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DeleteIpForwardEntry]
+ end;
+end;
+
+var
+ _SetIpStatistics: Pointer;
+
+function SetIpStatistics;
+begin
+ GetProcedureAddress(_SetIpStatistics, iphlpapilib, 'SetIpStatistics');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetIpStatistics]
+ end;
+end;
+
+var
+ _SetIpTTL: Pointer;
+
+function SetIpTTL;
+begin
+ GetProcedureAddress(_SetIpTTL, iphlpapilib, 'SetIpTTL');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetIpTTL]
+ end;
+end;
+
+var
+ _CreateIpNetEntry: Pointer;
+
+function CreateIpNetEntry;
+begin
+ GetProcedureAddress(_CreateIpNetEntry, iphlpapilib, 'CreateIpNetEntry');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreateIpNetEntry]
+ end;
+end;
+
+var
+ _SetIpNetEntry: Pointer;
+
+function SetIpNetEntry;
+begin
+ GetProcedureAddress(_SetIpNetEntry, iphlpapilib, 'SetIpNetEntry');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetIpNetEntry]
+ end;
+end;
+
+var
+ _DeleteIpNetEntry: Pointer;
+
+function DeleteIpNetEntry;
+begin
+ GetProcedureAddress(_DeleteIpNetEntry, iphlpapilib, 'DeleteIpNetEntry');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DeleteIpNetEntry]
+ end;
+end;
+
+var
+ _FlushIpNetTable: Pointer;
+
+function FlushIpNetTable;
+begin
+ GetProcedureAddress(_FlushIpNetTable, iphlpapilib, 'FlushIpNetTable');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_FlushIpNetTable]
+ end;
+end;
+
+var
+ _CreateProxyArpEntry: Pointer;
+
+function CreateProxyArpEntry;
+begin
+ GetProcedureAddress(_CreateProxyArpEntry, iphlpapilib, 'CreateProxyArpEntry');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreateProxyArpEntry]
+ end;
+end;
+
+var
+ _DeleteProxyArpEntry: Pointer;
+
+function DeleteProxyArpEntry;
+begin
+ GetProcedureAddress(_DeleteProxyArpEntry, iphlpapilib, 'DeleteProxyArpEntry');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DeleteProxyArpEntry]
+ end;
+end;
+
+var
+ _SetTcpEntry: Pointer;
+
+function SetTcpEntry;
+begin
+ GetProcedureAddress(_SetTcpEntry, iphlpapilib, 'SetTcpEntry');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetTcpEntry]
+ end;
+end;
+
+var
+ _GetInterfaceInfo: Pointer;
+
+function GetInterfaceInfo;
+begin
+ GetProcedureAddress(_GetInterfaceInfo, iphlpapilib, 'GetInterfaceInfo');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetInterfaceInfo]
+ end;
+end;
+
+var
+ _GetUniDirectionalAdapterInfo: Pointer;
+
+function GetUniDirectionalAdapterInfo;
+begin
+ GetProcedureAddress(_GetUniDirectionalAdapterInfo, iphlpapilib, 'GetUniDirectionalAdapterInfo');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetUniDirectionalAdapterInfo]
+ end;
+end;
+
+var
+ _NhpAllocateAndGetInterfaceInfoFromStack: Pointer;
+
+function NhpAllocateAndGetInterfaceInfoFromStack;
+begin
+ GetProcedureAddress(_NhpAllocateAndGetInterfaceInfoFromStack, iphlpapilib, 'NhpAllocateAndGetInterfaceInfoFromStack');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NhpAllocateAndGetInterfaceInfoFromStack]
+ end;
+end;
+
+var
+ _GetBestInterface: Pointer;
+
+function GetBestInterface;
+begin
+ GetProcedureAddress(_GetBestInterface, iphlpapilib, 'GetBestInterface');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetBestInterface]
+ end;
+end;
+
+var
+ _GetBestInterfaceEx: Pointer;
+
+function GetBestInterfaceEx;
+begin
+ GetProcedureAddress(_GetBestInterfaceEx, iphlpapilib, 'GetBestInterfaceEx');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetBestInterfaceEx]
+ end;
+end;
+
+var
+ _GetBestRoute: Pointer;
+
+function GetBestRoute;
+begin
+ GetProcedureAddress(_GetBestRoute, iphlpapilib, 'GetBestRoute');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetBestRoute]
+ end;
+end;
+
+var
+ _NotifyAddrChange: Pointer;
+
+function NotifyAddrChange;
+begin
+ GetProcedureAddress(_NotifyAddrChange, iphlpapilib, 'NotifyAddrChange');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NotifyAddrChange]
+ end;
+end;
+
+var
+ _NotifyRouteChange: Pointer;
+
+function NotifyRouteChange;
+begin
+ GetProcedureAddress(_NotifyRouteChange, iphlpapilib, 'NotifyRouteChange');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NotifyRouteChange]
+ end;
+end;
+
+var
+ _CancelIPChangeNotify: Pointer;
+
+function CancelIPChangeNotify;
+begin
+ GetProcedureAddress(_CancelIPChangeNotify, iphlpapilib, 'CancelIPChangeNotify');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CancelIPChangeNotify]
+ end;
+end;
+
+var
+ _GetAdapterIndex: Pointer;
+
+function GetAdapterIndex;
+begin
+ GetProcedureAddress(_GetAdapterIndex, iphlpapilib, 'GetAdapterIndex');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetAdapterIndex]
+ end;
+end;
+
+var
+ _AddIPAddress: Pointer;
+
+function AddIPAddress;
+begin
+ GetProcedureAddress(_AddIPAddress, iphlpapilib, 'AddIPAddress');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_AddIPAddress]
+ end;
+end;
+
+var
+ _DeleteIPAddress: Pointer;
+
+function DeleteIPAddress;
+begin
+ GetProcedureAddress(_DeleteIPAddress, iphlpapilib, 'DeleteIPAddress');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DeleteIPAddress]
+ end;
+end;
+
+var
+ _GetNetworkParams: Pointer;
+
+function GetNetworkParams;
+begin
+ GetProcedureAddress(_GetNetworkParams, iphlpapilib, 'GetNetworkParams');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetNetworkParams]
+ end;
+end;
+
+var
+ _GetAdaptersInfo: Pointer;
+
+function GetAdaptersInfo;
+begin
+ GetProcedureAddress(_GetAdaptersInfo, iphlpapilib, 'GetAdaptersInfo');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetAdaptersInfo]
+ end;
+end;
+
+var
+ _GetAdapterOrderMap: Pointer;
+
+function GetAdapterOrderMap;
+begin
+ GetProcedureAddress(_GetAdapterOrderMap, iphlpapilib, 'GetAdapterOrderMap');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetAdapterOrderMap]
+ end;
+end;
+
+var
+ _GetAdaptersAddresses: Pointer;
+
+function GetAdaptersAddresses;
+begin
+ GetProcedureAddress(_GetAdaptersAddresses, iphlpapilib, 'GetAdaptersAddresses');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetAdaptersAddresses]
+ end;
+end;
+
+var
+ _GetPerAdapterInfo: Pointer;
+
+function GetPerAdapterInfo;
+begin
+ GetProcedureAddress(_GetPerAdapterInfo, iphlpapilib, 'GetPerAdapterInfo');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetPerAdapterInfo]
+ end;
+end;
+
+var
+ _IpReleaseAddress: Pointer;
+
+function IpReleaseAddress;
+begin
+ GetProcedureAddress(_IpReleaseAddress, iphlpapilib, 'IpReleaseAddress');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_IpReleaseAddress]
+ end;
+end;
+
+var
+ _IpRenewAddress: Pointer;
+
+function IpRenewAddress;
+begin
+ GetProcedureAddress(_IpRenewAddress, iphlpapilib, 'IpRenewAddress');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_IpRenewAddress]
+ end;
+end;
+
+var
+ _SendARP: Pointer;
+
+function SendARP;
+begin
+ GetProcedureAddress(_SendARP, iphlpapilib, 'SendARP');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SendARP]
+ end;
+end;
+
+var
+ _GetRTTAndHopCount: Pointer;
+
+function GetRTTAndHopCount;
+begin
+ GetProcedureAddress(_GetRTTAndHopCount, iphlpapilib, 'GetRTTAndHopCount');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetRTTAndHopCount]
+ end;
+end;
+
+var
+ _GetFriendlyIfIndex: Pointer;
+
+function GetFriendlyIfIndex;
+begin
+ GetProcedureAddress(_GetFriendlyIfIndex, iphlpapilib, 'GetFriendlyIfIndex');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetFriendlyIfIndex]
+ end;
+end;
+
+var
+ _EnableRouter: Pointer;
+
+function EnableRouter;
+begin
+ GetProcedureAddress(_EnableRouter, iphlpapilib, 'EnableRouter');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_EnableRouter]
+ end;
+end;
+
+var
+ _UnenableRouter: Pointer;
+
+function UnenableRouter;
+begin
+ GetProcedureAddress(_UnenableRouter, iphlpapilib, 'UnenableRouter');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_UnenableRouter]
+ end;
+end;
+
+var
+ _DisableMediaSense: Pointer;
+
+function DisableMediaSense;
+begin
+ GetProcedureAddress(_DisableMediaSense, iphlpapilib, 'DisableMediaSense');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DisableMediaSense]
+ end;
+end;
+
+var
+ _RestoreMediaSense: Pointer;
+
+function RestoreMediaSense;
+begin
+ GetProcedureAddress(_RestoreMediaSense, iphlpapilib, 'RestoreMediaSense');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RestoreMediaSense]
+ end;
+end;
+
+var
+ _GetIpErrorString: Pointer;
+
+function GetIpErrorString;
+begin
+ GetProcedureAddress(_GetIpErrorString, iphlpapilib, 'GetIpErrorString');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetIpErrorString]
+ end;
+end;
+
+{$ELSE}
+
+function GetNumberOfInterfaces; external iphlpapilib name 'GetNumberOfInterfaces';
+function GetIfEntry; external iphlpapilib name 'GetIfEntry';
+function GetIfTable; external iphlpapilib name 'GetIfTable';
+function GetIpAddrTable; external iphlpapilib name 'GetIpAddrTable';
+function GetIpNetTable; external iphlpapilib name 'GetIpNetTable';
+function GetIpForwardTable; external iphlpapilib name 'GetIpForwardTable';
+function GetTcpTable; external iphlpapilib name 'GetTcpTable';
+function GetUdpTable; external iphlpapilib name 'GetUdpTable';
+function GetIpStatistics; external iphlpapilib name 'GetIpStatistics';
+function GetIpStatisticsEx; external iphlpapilib name 'GetIpStatisticsEx';
+function GetIcmpStatistics; external iphlpapilib name 'GetIcmpStatistics';
+function GetIcmpStatisticsEx; external iphlpapilib name 'GetIcmpStatisticsEx';
+function GetTcpStatistics; external iphlpapilib name 'GetTcpStatistics';
+function GetTcpStatisticsEx; external iphlpapilib name 'GetTcpStatisticsEx';
+function GetUdpStatistics; external iphlpapilib name 'GetUdpStatistics';
+function GetUdpStatisticsEx; external iphlpapilib name 'GetUdpStatisticsEx';
+function SetIfEntry; external iphlpapilib name 'SetIfEntry';
+function CreateIpForwardEntry; external iphlpapilib name 'CreateIpForwardEntry';
+function SetIpForwardEntry; external iphlpapilib name 'SetIpForwardEntry';
+function DeleteIpForwardEntry; external iphlpapilib name 'DeleteIpForwardEntry';
+function SetIpStatistics; external iphlpapilib name 'SetIpStatistics';
+function SetIpTTL; external iphlpapilib name 'SetIpTTL';
+function CreateIpNetEntry; external iphlpapilib name 'CreateIpNetEntry';
+function SetIpNetEntry; external iphlpapilib name 'SetIpNetEntry';
+function DeleteIpNetEntry; external iphlpapilib name 'DeleteIpNetEntry';
+function FlushIpNetTable; external iphlpapilib name 'FlushIpNetTable';
+function CreateProxyArpEntry; external iphlpapilib name 'CreateProxyArpEntry';
+function DeleteProxyArpEntry; external iphlpapilib name 'DeleteProxyArpEntry';
+function SetTcpEntry; external iphlpapilib name 'SetTcpEntry';
+function GetInterfaceInfo; external iphlpapilib name 'GetInterfaceInfo';
+function GetUniDirectionalAdapterInfo; external iphlpapilib name 'GetUniDirectionalAdapterInfo';
+function NhpAllocateAndGetInterfaceInfoFromStack; external iphlpapilib name 'NhpAllocateAndGetInterfaceInfoFromStack';
+function GetBestInterface; external iphlpapilib name 'GetBestInterface';
+function GetBestInterfaceEx; external iphlpapilib name 'GetBestInterfaceEx';
+function GetBestRoute; external iphlpapilib name 'GetBestRoute';
+function NotifyAddrChange; external iphlpapilib name 'NotifyAddrChange';
+function NotifyRouteChange; external iphlpapilib name 'NotifyRouteChange';
+function CancelIPChangeNotify; external iphlpapilib name 'CancelIPChangeNotify';
+function GetAdapterIndex; external iphlpapilib name 'GetAdapterIndex';
+function AddIPAddress; external iphlpapilib name 'AddIPAddress';
+function DeleteIPAddress; external iphlpapilib name 'DeleteIPAddress';
+function GetNetworkParams; external iphlpapilib name 'GetNetworkParams';
+function GetAdaptersInfo; external iphlpapilib name 'GetAdaptersInfo';
+function GetAdapterOrderMap; external iphlpapilib name 'GetAdapterOrderMap';
+function GetAdaptersAddresses; external iphlpapilib name 'GetAdaptersAddresses';
+function GetPerAdapterInfo; external iphlpapilib name 'GetPerAdapterInfo';
+function IpReleaseAddress; external iphlpapilib name 'IpReleaseAddress';
+function IpRenewAddress; external iphlpapilib name 'IpRenewAddress';
+function SendARP; external iphlpapilib name 'SendARP';
+function GetRTTAndHopCount; external iphlpapilib name 'GetRTTAndHopCount';
+function GetFriendlyIfIndex; external iphlpapilib name 'GetFriendlyIfIndex';
+function EnableRouter; external iphlpapilib name 'EnableRouter';
+function UnenableRouter; external iphlpapilib name 'UnenableRouter';
+function DisableMediaSense; external iphlpapilib name 'DisableMediaSense';
+function RestoreMediaSense; external iphlpapilib name 'RestoreMediaSense';
+function GetIpErrorString; external iphlpapilib name 'GetIpErrorString';
+
+{$ENDIF DYNAMIC_LINK}
+
+end.
diff --git a/packages/extra/winunits/jwaipifcons.pas b/packages/extra/winunits/jwaipifcons.pas
index 320898808c..eb41913c4a 100644
--- a/packages/extra/winunits/jwaipifcons.pas
+++ b/packages/extra/winunits/jwaipifcons.pas
@@ -1,490 +1,490 @@
-{******************************************************************************}
-{ }
-{ Internet Protocol Helper API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: ipifcons.h, released August 2001. The original Pascal }
-{ code is: IpIfCons.pas, released September 2000. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Contributor(s): John C. Penman (jcp att craiglockhart dott com) }
-{ Vladimir Vassiliev (voldemarv att hotpop dott com) }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwaipifcons.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaIpIfCons;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "ipifcons.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-//////////////////////////////////////////////////////////////////////////////
-// //
-// Media types //
-// //
-//////////////////////////////////////////////////////////////////////////////
-
-const
- MIN_IF_TYPE = 1;
- {$EXTERNALSYM MIN_IF_TYPE}
-
- IF_TYPE_OTHER = 1; // None of the below
- {$EXTERNALSYM IF_TYPE_OTHER}
- IF_TYPE_REGULAR_1822 = 2;
- {$EXTERNALSYM IF_TYPE_REGULAR_1822}
- IF_TYPE_HDH_1822 = 3;
- {$EXTERNALSYM IF_TYPE_HDH_1822}
- IF_TYPE_DDN_X25 = 4;
- {$EXTERNALSYM IF_TYPE_DDN_X25}
- IF_TYPE_RFC877_X25 = 5;
- {$EXTERNALSYM IF_TYPE_RFC877_X25}
- IF_TYPE_ETHERNET_CSMACD = 6;
- {$EXTERNALSYM IF_TYPE_ETHERNET_CSMACD}
- IF_TYPE_IS088023_CSMACD = 7;
- {$EXTERNALSYM IF_TYPE_IS088023_CSMACD}
- IF_TYPE_ISO88024_TOKENBUS = 8;
- {$EXTERNALSYM IF_TYPE_ISO88024_TOKENBUS}
- IF_TYPE_ISO88025_TOKENRING = 9;
- {$EXTERNALSYM IF_TYPE_ISO88025_TOKENRING}
- IF_TYPE_ISO88026_MAN = 10;
- {$EXTERNALSYM IF_TYPE_ISO88026_MAN}
- IF_TYPE_STARLAN = 11;
- {$EXTERNALSYM IF_TYPE_STARLAN}
- IF_TYPE_PROTEON_10MBIT = 12;
- {$EXTERNALSYM IF_TYPE_PROTEON_10MBIT}
- IF_TYPE_PROTEON_80MBIT = 13;
- {$EXTERNALSYM IF_TYPE_PROTEON_80MBIT}
- IF_TYPE_HYPERCHANNEL = 14;
- {$EXTERNALSYM IF_TYPE_HYPERCHANNEL}
- IF_TYPE_FDDI = 15;
- {$EXTERNALSYM IF_TYPE_FDDI}
- IF_TYPE_LAP_B = 16;
- {$EXTERNALSYM IF_TYPE_LAP_B}
- IF_TYPE_SDLC = 17;
- {$EXTERNALSYM IF_TYPE_SDLC}
- IF_TYPE_DS1 = 18; // DS1-MIB
- {$EXTERNALSYM IF_TYPE_DS1}
- IF_TYPE_E1 = 19; // Obsolete; see DS1-MIB
- {$EXTERNALSYM IF_TYPE_E1}
- IF_TYPE_BASIC_ISDN = 20;
- {$EXTERNALSYM IF_TYPE_BASIC_ISDN}
- IF_TYPE_PRIMARY_ISDN = 21;
- {$EXTERNALSYM IF_TYPE_PRIMARY_ISDN}
- IF_TYPE_PROP_POINT2POINT_SERIAL = 22; // proprietary serial
- {$EXTERNALSYM IF_TYPE_PROP_POINT2POINT_SERIAL}
- IF_TYPE_PPP = 23;
- {$EXTERNALSYM IF_TYPE_PPP}
- IF_TYPE_SOFTWARE_LOOPBACK = 24;
- {$EXTERNALSYM IF_TYPE_SOFTWARE_LOOPBACK}
- IF_TYPE_EON = 25; // CLNP over IP
- {$EXTERNALSYM IF_TYPE_EON}
- IF_TYPE_ETHERNET_3MBIT = 26;
- {$EXTERNALSYM IF_TYPE_ETHERNET_3MBIT}
- IF_TYPE_NSIP = 27; // XNS over IP
- {$EXTERNALSYM IF_TYPE_NSIP}
- IF_TYPE_SLIP = 28; // Generic Slip
- {$EXTERNALSYM IF_TYPE_SLIP}
- IF_TYPE_ULTRA = 29; // ULTRA Technologies
- {$EXTERNALSYM IF_TYPE_ULTRA}
- IF_TYPE_DS3 = 30; // DS3-MIB
- {$EXTERNALSYM IF_TYPE_DS3}
- IF_TYPE_SIP = 31; // SMDS, coffee
- {$EXTERNALSYM IF_TYPE_SIP}
- IF_TYPE_FRAMERELAY = 32; // DTE only
- {$EXTERNALSYM IF_TYPE_FRAMERELAY}
- IF_TYPE_RS232 = 33;
- {$EXTERNALSYM IF_TYPE_RS232}
- IF_TYPE_PARA = 34; // Parallel port
- {$EXTERNALSYM IF_TYPE_PARA}
- IF_TYPE_ARCNET = 35;
- {$EXTERNALSYM IF_TYPE_ARCNET}
- IF_TYPE_ARCNET_PLUS = 36;
- {$EXTERNALSYM IF_TYPE_ARCNET_PLUS}
- IF_TYPE_ATM = 37; // ATM cells
- {$EXTERNALSYM IF_TYPE_ATM}
- IF_TYPE_MIO_X25 = 38;
- {$EXTERNALSYM IF_TYPE_MIO_X25}
- IF_TYPE_SONET = 39; // SONET or SDH
- {$EXTERNALSYM IF_TYPE_SONET}
- IF_TYPE_X25_PLE = 40;
- {$EXTERNALSYM IF_TYPE_X25_PLE}
- IF_TYPE_ISO88022_LLC = 41;
- {$EXTERNALSYM IF_TYPE_ISO88022_LLC}
- IF_TYPE_LOCALTALK = 42;
- {$EXTERNALSYM IF_TYPE_LOCALTALK}
- IF_TYPE_SMDS_DXI = 43;
- {$EXTERNALSYM IF_TYPE_SMDS_DXI}
- IF_TYPE_FRAMERELAY_SERVICE = 44; // FRNETSERV-MIB
- {$EXTERNALSYM IF_TYPE_FRAMERELAY_SERVICE}
- IF_TYPE_V35 = 45;
- {$EXTERNALSYM IF_TYPE_V35}
- IF_TYPE_HSSI = 46;
- {$EXTERNALSYM IF_TYPE_HSSI}
- IF_TYPE_HIPPI = 47;
- {$EXTERNALSYM IF_TYPE_HIPPI}
- IF_TYPE_MODEM = 48; // Generic Modem
- {$EXTERNALSYM IF_TYPE_MODEM}
- IF_TYPE_AAL5 = 49; // AAL5 over ATM
- {$EXTERNALSYM IF_TYPE_AAL5}
- IF_TYPE_SONET_PATH = 50;
- {$EXTERNALSYM IF_TYPE_SONET_PATH}
- IF_TYPE_SONET_VT = 51;
- {$EXTERNALSYM IF_TYPE_SONET_VT}
- IF_TYPE_SMDS_ICIP = 52; // SMDS InterCarrier Interface
- {$EXTERNALSYM IF_TYPE_SMDS_ICIP}
- IF_TYPE_PROP_VIRTUAL = 53; // Proprietary virtual/internal
- {$EXTERNALSYM IF_TYPE_PROP_VIRTUAL}
- IF_TYPE_PROP_MULTIPLEXOR = 54; // Proprietary multiplexing
- {$EXTERNALSYM IF_TYPE_PROP_MULTIPLEXOR}
- IF_TYPE_IEEE80212 = 55; // 100BaseVG
- {$EXTERNALSYM IF_TYPE_IEEE80212}
- IF_TYPE_FIBRECHANNEL = 56;
- {$EXTERNALSYM IF_TYPE_FIBRECHANNEL}
- IF_TYPE_HIPPIINTERFACE = 57;
- {$EXTERNALSYM IF_TYPE_HIPPIINTERFACE}
- IF_TYPE_FRAMERELAY_INTERCONNECT = 58; // Obsolete, use 32 or 44
- {$EXTERNALSYM IF_TYPE_FRAMERELAY_INTERCONNECT}
- IF_TYPE_AFLANE_8023 = 59; // ATM Emulated LAN for 802.3
- {$EXTERNALSYM IF_TYPE_AFLANE_8023}
- IF_TYPE_AFLANE_8025 = 60; // ATM Emulated LAN for 802.5
- {$EXTERNALSYM IF_TYPE_AFLANE_8025}
- IF_TYPE_CCTEMUL = 61; // ATM Emulated circuit
- {$EXTERNALSYM IF_TYPE_CCTEMUL}
- IF_TYPE_FASTETHER = 62; // Fast Ethernet (100BaseT)
- {$EXTERNALSYM IF_TYPE_FASTETHER}
- IF_TYPE_ISDN = 63; // ISDN and X.25
- {$EXTERNALSYM IF_TYPE_ISDN}
- IF_TYPE_V11 = 64; // CCITT V.11/X.21
- {$EXTERNALSYM IF_TYPE_V11}
- IF_TYPE_V36 = 65; // CCITT V.36
- {$EXTERNALSYM IF_TYPE_V36}
- IF_TYPE_G703_64K = 66; // CCITT G703 at 64Kbps
- {$EXTERNALSYM IF_TYPE_G703_64K}
- IF_TYPE_G703_2MB = 67; // Obsolete; see DS1-MIB
- {$EXTERNALSYM IF_TYPE_G703_2MB}
- IF_TYPE_QLLC = 68; // SNA QLLC
- {$EXTERNALSYM IF_TYPE_QLLC}
- IF_TYPE_FASTETHER_FX = 69; // Fast Ethernet (100BaseFX)
- {$EXTERNALSYM IF_TYPE_FASTETHER_FX}
- IF_TYPE_CHANNEL = 70;
- {$EXTERNALSYM IF_TYPE_CHANNEL}
- IF_TYPE_IEEE80211 = 71; // Radio spread spectrum
- {$EXTERNALSYM IF_TYPE_IEEE80211}
- IF_TYPE_IBM370PARCHAN = 72; // IBM System 360/370 OEMI Channel
- {$EXTERNALSYM IF_TYPE_IBM370PARCHAN}
- IF_TYPE_ESCON = 73; // IBM Enterprise Systems Connection
- {$EXTERNALSYM IF_TYPE_ESCON}
- IF_TYPE_DLSW = 74; // Data Link Switching
- {$EXTERNALSYM IF_TYPE_DLSW}
- IF_TYPE_ISDN_S = 75; // ISDN S/T interface
- {$EXTERNALSYM IF_TYPE_ISDN_S}
- IF_TYPE_ISDN_U = 76; // ISDN U interface
- {$EXTERNALSYM IF_TYPE_ISDN_U}
- IF_TYPE_LAP_D = 77; // Link Access Protocol D
- {$EXTERNALSYM IF_TYPE_LAP_D}
- IF_TYPE_IPSWITCH = 78; // IP Switching Objects
- {$EXTERNALSYM IF_TYPE_IPSWITCH}
- IF_TYPE_RSRB = 79; // Remote Source Route Bridging
- {$EXTERNALSYM IF_TYPE_RSRB}
- IF_TYPE_ATM_LOGICAL = 80; // ATM Logical Port
- {$EXTERNALSYM IF_TYPE_ATM_LOGICAL}
- IF_TYPE_DS0 = 81; // Digital Signal Level 0
- {$EXTERNALSYM IF_TYPE_DS0}
- IF_TYPE_DS0_BUNDLE = 82; // Group of ds0s on the same ds1
- {$EXTERNALSYM IF_TYPE_DS0_BUNDLE}
- IF_TYPE_BSC = 83; // Bisynchronous Protocol
- {$EXTERNALSYM IF_TYPE_BSC}
- IF_TYPE_ASYNC = 84; // Asynchronous Protocol
- {$EXTERNALSYM IF_TYPE_ASYNC}
- IF_TYPE_CNR = 85; // Combat Net Radio
- {$EXTERNALSYM IF_TYPE_CNR}
- IF_TYPE_ISO88025R_DTR = 86; // ISO 802.5r DTR
- {$EXTERNALSYM IF_TYPE_ISO88025R_DTR}
- IF_TYPE_EPLRS = 87; // Ext Pos Loc Report Sys
- {$EXTERNALSYM IF_TYPE_EPLRS}
- IF_TYPE_ARAP = 88; // Appletalk Remote Access Protocol
- {$EXTERNALSYM IF_TYPE_ARAP}
- IF_TYPE_PROP_CNLS = 89; // Proprietary Connectionless Proto
- {$EXTERNALSYM IF_TYPE_PROP_CNLS}
- IF_TYPE_HOSTPAD = 90; // CCITT-ITU X.29 PAD Protocol
- {$EXTERNALSYM IF_TYPE_HOSTPAD}
- IF_TYPE_TERMPAD = 91; // CCITT-ITU X.3 PAD Facility
- {$EXTERNALSYM IF_TYPE_TERMPAD}
- IF_TYPE_FRAMERELAY_MPI = 92; // Multiproto Interconnect over FR
- {$EXTERNALSYM IF_TYPE_FRAMERELAY_MPI}
- IF_TYPE_X213 = 93; // CCITT-ITU X213
- {$EXTERNALSYM IF_TYPE_X213}
- IF_TYPE_ADSL = 94; // Asymmetric Digital Subscrbr Loop
- {$EXTERNALSYM IF_TYPE_ADSL}
- IF_TYPE_RADSL = 95; // Rate-Adapt Digital Subscrbr Loop
- {$EXTERNALSYM IF_TYPE_RADSL}
- IF_TYPE_SDSL = 96; // Symmetric Digital Subscriber Loop
- {$EXTERNALSYM IF_TYPE_SDSL}
- IF_TYPE_VDSL = 97; // Very H-Speed Digital Subscrb Loop
- {$EXTERNALSYM IF_TYPE_VDSL}
- IF_TYPE_ISO88025_CRFPRINT = 98; // ISO 802.5 CRFP
- {$EXTERNALSYM IF_TYPE_ISO88025_CRFPRINT}
- IF_TYPE_MYRINET = 99; // Myricom Myrinet
- {$EXTERNALSYM IF_TYPE_MYRINET}
- IF_TYPE_VOICE_EM = 100; // Voice recEive and transMit
- {$EXTERNALSYM IF_TYPE_VOICE_EM}
- IF_TYPE_VOICE_FXO = 101; // Voice Foreign Exchange Office
- {$EXTERNALSYM IF_TYPE_VOICE_FXO}
- IF_TYPE_VOICE_FXS = 102; // Voice Foreign Exchange Station
- {$EXTERNALSYM IF_TYPE_VOICE_FXS}
- IF_TYPE_VOICE_ENCAP = 103; // Voice encapsulation
- {$EXTERNALSYM IF_TYPE_VOICE_ENCAP}
- IF_TYPE_VOICE_OVERIP = 104; // Voice over IP encapsulation
- {$EXTERNALSYM IF_TYPE_VOICE_OVERIP}
- IF_TYPE_ATM_DXI = 105; // ATM DXI
- {$EXTERNALSYM IF_TYPE_ATM_DXI}
- IF_TYPE_ATM_FUNI = 106; // ATM FUNI
- {$EXTERNALSYM IF_TYPE_ATM_FUNI}
- IF_TYPE_ATM_IMA = 107; // ATM IMA
- {$EXTERNALSYM IF_TYPE_ATM_IMA}
- IF_TYPE_PPPMULTILINKBUNDLE = 108; // PPP Multilink Bundle
- {$EXTERNALSYM IF_TYPE_PPPMULTILINKBUNDLE}
- IF_TYPE_IPOVER_CDLC = 109; // IBM ipOverCdlc
- {$EXTERNALSYM IF_TYPE_IPOVER_CDLC}
- IF_TYPE_IPOVER_CLAW = 110; // IBM Common Link Access to Workstn
- {$EXTERNALSYM IF_TYPE_IPOVER_CLAW}
- IF_TYPE_STACKTOSTACK = 111; // IBM stackToStack
- {$EXTERNALSYM IF_TYPE_STACKTOSTACK}
- IF_TYPE_VIRTUALIPADDRESS = 112; // IBM VIPA
- {$EXTERNALSYM IF_TYPE_VIRTUALIPADDRESS}
- IF_TYPE_MPC = 113; // IBM multi-proto channel support
- {$EXTERNALSYM IF_TYPE_MPC}
- IF_TYPE_IPOVER_ATM = 114; // IBM ipOverAtm
- {$EXTERNALSYM IF_TYPE_IPOVER_ATM}
- IF_TYPE_ISO88025_FIBER = 115; // ISO 802.5j Fiber Token Ring
- {$EXTERNALSYM IF_TYPE_ISO88025_FIBER}
- IF_TYPE_TDLC = 116; // IBM twinaxial data link control
- {$EXTERNALSYM IF_TYPE_TDLC}
- IF_TYPE_GIGABITETHERNET = 117;
- {$EXTERNALSYM IF_TYPE_GIGABITETHERNET}
- IF_TYPE_HDLC = 118;
- {$EXTERNALSYM IF_TYPE_HDLC}
- IF_TYPE_LAP_F = 119;
- {$EXTERNALSYM IF_TYPE_LAP_F}
- IF_TYPE_V37 = 120;
- {$EXTERNALSYM IF_TYPE_V37}
- IF_TYPE_X25_MLP = 121; // Multi-Link Protocol
- {$EXTERNALSYM IF_TYPE_X25_MLP}
- IF_TYPE_X25_HUNTGROUP = 122; // X.25 Hunt Group
- {$EXTERNALSYM IF_TYPE_X25_HUNTGROUP}
- IF_TYPE_TRANSPHDLC = 123;
- {$EXTERNALSYM IF_TYPE_TRANSPHDLC}
- IF_TYPE_INTERLEAVE = 124; // Interleave channel
- {$EXTERNALSYM IF_TYPE_INTERLEAVE}
- IF_TYPE_FAST = 125; // Fast channel
- {$EXTERNALSYM IF_TYPE_FAST}
- IF_TYPE_IP = 126; // IP (for APPN HPR in IP networks)
- {$EXTERNALSYM IF_TYPE_IP}
- IF_TYPE_DOCSCABLE_MACLAYER = 127; // CATV Mac Layer
- {$EXTERNALSYM IF_TYPE_DOCSCABLE_MACLAYER}
- IF_TYPE_DOCSCABLE_DOWNSTREAM = 128; // CATV Downstream interface
- {$EXTERNALSYM IF_TYPE_DOCSCABLE_DOWNSTREAM}
- IF_TYPE_DOCSCABLE_UPSTREAM = 129; // CATV Upstream interface
- {$EXTERNALSYM IF_TYPE_DOCSCABLE_UPSTREAM}
- IF_TYPE_A12MPPSWITCH = 130; // Avalon Parallel Processor
- {$EXTERNALSYM IF_TYPE_A12MPPSWITCH}
- IF_TYPE_TUNNEL = 131; // Encapsulation interface
- {$EXTERNALSYM IF_TYPE_TUNNEL}
- IF_TYPE_COFFEE = 132; // Coffee pot
- {$EXTERNALSYM IF_TYPE_COFFEE}
- IF_TYPE_CES = 133; // Circuit Emulation Service
- {$EXTERNALSYM IF_TYPE_CES}
- IF_TYPE_ATM_SUBINTERFACE = 134; // ATM Sub Interface
- {$EXTERNALSYM IF_TYPE_ATM_SUBINTERFACE}
- IF_TYPE_L2_VLAN = 135; // Layer 2 Virtual LAN using 802.1Q
- {$EXTERNALSYM IF_TYPE_L2_VLAN}
- IF_TYPE_L3_IPVLAN = 136; // Layer 3 Virtual LAN using IP
- {$EXTERNALSYM IF_TYPE_L3_IPVLAN}
- IF_TYPE_L3_IPXVLAN = 137; // Layer 3 Virtual LAN using IPX
- {$EXTERNALSYM IF_TYPE_L3_IPXVLAN}
- IF_TYPE_DIGITALPOWERLINE = 138; // IP over Power Lines
- {$EXTERNALSYM IF_TYPE_DIGITALPOWERLINE}
- IF_TYPE_MEDIAMAILOVERIP = 139; // Multimedia Mail over IP
- {$EXTERNALSYM IF_TYPE_MEDIAMAILOVERIP}
- IF_TYPE_DTM = 140; // Dynamic syncronous Transfer Mode
- {$EXTERNALSYM IF_TYPE_DTM}
- IF_TYPE_DCN = 141; // Data Communications Network
- {$EXTERNALSYM IF_TYPE_DCN}
- IF_TYPE_IPFORWARD = 142; // IP Forwarding Interface
- {$EXTERNALSYM IF_TYPE_IPFORWARD}
- IF_TYPE_MSDSL = 143; // Multi-rate Symmetric DSL
- {$EXTERNALSYM IF_TYPE_MSDSL}
- IF_TYPE_IEEE1394 = 144; // IEEE1394 High Perf Serial Bus
- {$EXTERNALSYM IF_TYPE_IEEE1394}
- IF_TYPE_RECEIVE_ONLY = 145; // TV adapter type
- {$EXTERNALSYM IF_TYPE_RECEIVE_ONLY}
-
- MAX_IF_TYPE = 145;
- {$EXTERNALSYM MAX_IF_TYPE}
-
-//////////////////////////////////////////////////////////////////////////////
-// //
-// Access types //
-// //
-//////////////////////////////////////////////////////////////////////////////
-
- IF_ACCESS_LOOPBACK = 1;
- {$EXTERNALSYM IF_ACCESS_LOOPBACK}
- IF_ACCESS_BROADCAST = 2;
- {$EXTERNALSYM IF_ACCESS_BROADCAST}
- IF_ACCESS_POINTTOPOINT = 3;
- {$EXTERNALSYM IF_ACCESS_POINTTOPOINT}
- IF_ACCESS_POINTTOMULTIPOINT = 4;
- {$EXTERNALSYM IF_ACCESS_POINTTOMULTIPOINT}
-
-//////////////////////////////////////////////////////////////////////////////
-// //
-// Interface Capabilities (bit flags) //
-// //
-//////////////////////////////////////////////////////////////////////////////
-
- IF_CHECK_NONE = $00;
- {$EXTERNALSYM IF_CHECK_NONE}
- IF_CHECK_MCAST = $01;
- {$EXTERNALSYM IF_CHECK_MCAST}
- IF_CHECK_SEND = $02;
- {$EXTERNALSYM IF_CHECK_SEND}
-
-//////////////////////////////////////////////////////////////////////////////
-// //
-// Connection Types //
-// //
-//////////////////////////////////////////////////////////////////////////////
-
- IF_CONNECTION_DEDICATED = 1;
- {$EXTERNALSYM IF_CONNECTION_DEDICATED}
- IF_CONNECTION_PASSIVE = 2;
- {$EXTERNALSYM IF_CONNECTION_PASSIVE}
- IF_CONNECTION_DEMAND = 3;
- {$EXTERNALSYM IF_CONNECTION_DEMAND}
-
- IF_ADMIN_STATUS_UP = 1;
- {$EXTERNALSYM IF_ADMIN_STATUS_UP}
- IF_ADMIN_STATUS_DOWN = 2;
- {$EXTERNALSYM IF_ADMIN_STATUS_DOWN}
- IF_ADMIN_STATUS_TESTING = 3;
- {$EXTERNALSYM IF_ADMIN_STATUS_TESTING}
-
-//////////////////////////////////////////////////////////////////////////////
-// //
-// The following are the the operational states for WAN and LAN interfaces. //
-// The order of the states seems weird, but is done for a purpose. All //
-// states >= CONNECTED can transmit data right away. States >= DISCONNECTED //
-// can tx data but some set up might be needed. States < DISCONNECTED can //
-// not transmit data. //
-// A card is marked UNREACHABLE if DIM calls InterfaceUnreachable for //
-// reasons other than failure to connect. //
-// //
-// NON_OPERATIONAL -- Valid for LAN Interfaces. Means the card is not //
-// working or not plugged in or has no address. //
-// UNREACHABLE -- Valid for WAN Interfaces. Means the remote site is //
-// not reachable at this time. //
-// DISCONNECTED -- Valid for WAN Interfaces. Means the remote site is //
-// not connected at this time. //
-// CONNECTING -- Valid for WAN Interfaces. Means a connection attempt //
-// has been initiated to the remote site. //
-// CONNECTED -- Valid for WAN Interfaces. Means the remote site is //
-// connected. //
-// OPERATIONAL -- Valid for LAN Interfaces. Means the card is plugged //
-// in and working. //
-// //
-// It is the users duty to convert these values to MIB-II values if they //
-// are to be used by a subagent //
-// //
-//////////////////////////////////////////////////////////////////////////////
-
- IF_OPER_STATUS_NON_OPERATIONAL = 0;
- {$EXTERNALSYM IF_OPER_STATUS_NON_OPERATIONAL}
- IF_OPER_STATUS_UNREACHABLE = 1;
- {$EXTERNALSYM IF_OPER_STATUS_UNREACHABLE}
- IF_OPER_STATUS_DISCONNECTED = 2;
- {$EXTERNALSYM IF_OPER_STATUS_DISCONNECTED}
- IF_OPER_STATUS_CONNECTING = 3;
- {$EXTERNALSYM IF_OPER_STATUS_CONNECTING}
- IF_OPER_STATUS_CONNECTED = 4;
- {$EXTERNALSYM IF_OPER_STATUS_CONNECTED}
- IF_OPER_STATUS_OPERATIONAL = 5;
- {$EXTERNALSYM IF_OPER_STATUS_OPERATIONAL}
-
- MIB_IF_TYPE_OTHER = 1;
- {$EXTERNALSYM MIB_IF_TYPE_OTHER}
- MIB_IF_TYPE_ETHERNET = 6;
- {$EXTERNALSYM MIB_IF_TYPE_ETHERNET}
- MIB_IF_TYPE_TOKENRING = 9;
- {$EXTERNALSYM MIB_IF_TYPE_TOKENRING}
- MIB_IF_TYPE_FDDI = 15;
- {$EXTERNALSYM MIB_IF_TYPE_FDDI}
- MIB_IF_TYPE_PPP = 23;
- {$EXTERNALSYM MIB_IF_TYPE_PPP}
- MIB_IF_TYPE_LOOPBACK = 24;
- {$EXTERNALSYM MIB_IF_TYPE_LOOPBACK}
- MIB_IF_TYPE_SLIP = 28;
- {$EXTERNALSYM MIB_IF_TYPE_SLIP}
-
- MIB_IF_ADMIN_STATUS_UP = 1;
- {$EXTERNALSYM MIB_IF_ADMIN_STATUS_UP}
- MIB_IF_ADMIN_STATUS_DOWN = 2;
- {$EXTERNALSYM MIB_IF_ADMIN_STATUS_DOWN}
- MIB_IF_ADMIN_STATUS_TESTING = 3;
- {$EXTERNALSYM MIB_IF_ADMIN_STATUS_TESTING}
-
- MIB_IF_OPER_STATUS_NON_OPERATIONAL = 0;
- {$EXTERNALSYM MIB_IF_OPER_STATUS_NON_OPERATIONAL}
- MIB_IF_OPER_STATUS_UNREACHABLE = 1;
- {$EXTERNALSYM MIB_IF_OPER_STATUS_UNREACHABLE}
- MIB_IF_OPER_STATUS_DISCONNECTED = 2;
- {$EXTERNALSYM MIB_IF_OPER_STATUS_DISCONNECTED}
- MIB_IF_OPER_STATUS_CONNECTING = 3;
- {$EXTERNALSYM MIB_IF_OPER_STATUS_CONNECTING}
- MIB_IF_OPER_STATUS_CONNECTED = 4;
- {$EXTERNALSYM MIB_IF_OPER_STATUS_CONNECTED}
- MIB_IF_OPER_STATUS_OPERATIONAL = 5;
- {$EXTERNALSYM MIB_IF_OPER_STATUS_OPERATIONAL}
-
-implementation
-
-end.
+{******************************************************************************}
+{ }
+{ Internet Protocol Helper API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: ipifcons.h, released August 2001. The original Pascal }
+{ code is: IpIfCons.pas, released September 2000. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Contributor(s): John C. Penman (jcp att craiglockhart dott com) }
+{ Vladimir Vassiliev (voldemarv att hotpop dott com) }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwaipifcons.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaIpIfCons;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "ipifcons.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+//////////////////////////////////////////////////////////////////////////////
+// //
+// Media types //
+// //
+//////////////////////////////////////////////////////////////////////////////
+
+const
+ MIN_IF_TYPE = 1;
+ {$EXTERNALSYM MIN_IF_TYPE}
+
+ IF_TYPE_OTHER = 1; // None of the below
+ {$EXTERNALSYM IF_TYPE_OTHER}
+ IF_TYPE_REGULAR_1822 = 2;
+ {$EXTERNALSYM IF_TYPE_REGULAR_1822}
+ IF_TYPE_HDH_1822 = 3;
+ {$EXTERNALSYM IF_TYPE_HDH_1822}
+ IF_TYPE_DDN_X25 = 4;
+ {$EXTERNALSYM IF_TYPE_DDN_X25}
+ IF_TYPE_RFC877_X25 = 5;
+ {$EXTERNALSYM IF_TYPE_RFC877_X25}
+ IF_TYPE_ETHERNET_CSMACD = 6;
+ {$EXTERNALSYM IF_TYPE_ETHERNET_CSMACD}
+ IF_TYPE_IS088023_CSMACD = 7;
+ {$EXTERNALSYM IF_TYPE_IS088023_CSMACD}
+ IF_TYPE_ISO88024_TOKENBUS = 8;
+ {$EXTERNALSYM IF_TYPE_ISO88024_TOKENBUS}
+ IF_TYPE_ISO88025_TOKENRING = 9;
+ {$EXTERNALSYM IF_TYPE_ISO88025_TOKENRING}
+ IF_TYPE_ISO88026_MAN = 10;
+ {$EXTERNALSYM IF_TYPE_ISO88026_MAN}
+ IF_TYPE_STARLAN = 11;
+ {$EXTERNALSYM IF_TYPE_STARLAN}
+ IF_TYPE_PROTEON_10MBIT = 12;
+ {$EXTERNALSYM IF_TYPE_PROTEON_10MBIT}
+ IF_TYPE_PROTEON_80MBIT = 13;
+ {$EXTERNALSYM IF_TYPE_PROTEON_80MBIT}
+ IF_TYPE_HYPERCHANNEL = 14;
+ {$EXTERNALSYM IF_TYPE_HYPERCHANNEL}
+ IF_TYPE_FDDI = 15;
+ {$EXTERNALSYM IF_TYPE_FDDI}
+ IF_TYPE_LAP_B = 16;
+ {$EXTERNALSYM IF_TYPE_LAP_B}
+ IF_TYPE_SDLC = 17;
+ {$EXTERNALSYM IF_TYPE_SDLC}
+ IF_TYPE_DS1 = 18; // DS1-MIB
+ {$EXTERNALSYM IF_TYPE_DS1}
+ IF_TYPE_E1 = 19; // Obsolete; see DS1-MIB
+ {$EXTERNALSYM IF_TYPE_E1}
+ IF_TYPE_BASIC_ISDN = 20;
+ {$EXTERNALSYM IF_TYPE_BASIC_ISDN}
+ IF_TYPE_PRIMARY_ISDN = 21;
+ {$EXTERNALSYM IF_TYPE_PRIMARY_ISDN}
+ IF_TYPE_PROP_POINT2POINT_SERIAL = 22; // proprietary serial
+ {$EXTERNALSYM IF_TYPE_PROP_POINT2POINT_SERIAL}
+ IF_TYPE_PPP = 23;
+ {$EXTERNALSYM IF_TYPE_PPP}
+ IF_TYPE_SOFTWARE_LOOPBACK = 24;
+ {$EXTERNALSYM IF_TYPE_SOFTWARE_LOOPBACK}
+ IF_TYPE_EON = 25; // CLNP over IP
+ {$EXTERNALSYM IF_TYPE_EON}
+ IF_TYPE_ETHERNET_3MBIT = 26;
+ {$EXTERNALSYM IF_TYPE_ETHERNET_3MBIT}
+ IF_TYPE_NSIP = 27; // XNS over IP
+ {$EXTERNALSYM IF_TYPE_NSIP}
+ IF_TYPE_SLIP = 28; // Generic Slip
+ {$EXTERNALSYM IF_TYPE_SLIP}
+ IF_TYPE_ULTRA = 29; // ULTRA Technologies
+ {$EXTERNALSYM IF_TYPE_ULTRA}
+ IF_TYPE_DS3 = 30; // DS3-MIB
+ {$EXTERNALSYM IF_TYPE_DS3}
+ IF_TYPE_SIP = 31; // SMDS, coffee
+ {$EXTERNALSYM IF_TYPE_SIP}
+ IF_TYPE_FRAMERELAY = 32; // DTE only
+ {$EXTERNALSYM IF_TYPE_FRAMERELAY}
+ IF_TYPE_RS232 = 33;
+ {$EXTERNALSYM IF_TYPE_RS232}
+ IF_TYPE_PARA = 34; // Parallel port
+ {$EXTERNALSYM IF_TYPE_PARA}
+ IF_TYPE_ARCNET = 35;
+ {$EXTERNALSYM IF_TYPE_ARCNET}
+ IF_TYPE_ARCNET_PLUS = 36;
+ {$EXTERNALSYM IF_TYPE_ARCNET_PLUS}
+ IF_TYPE_ATM = 37; // ATM cells
+ {$EXTERNALSYM IF_TYPE_ATM}
+ IF_TYPE_MIO_X25 = 38;
+ {$EXTERNALSYM IF_TYPE_MIO_X25}
+ IF_TYPE_SONET = 39; // SONET or SDH
+ {$EXTERNALSYM IF_TYPE_SONET}
+ IF_TYPE_X25_PLE = 40;
+ {$EXTERNALSYM IF_TYPE_X25_PLE}
+ IF_TYPE_ISO88022_LLC = 41;
+ {$EXTERNALSYM IF_TYPE_ISO88022_LLC}
+ IF_TYPE_LOCALTALK = 42;
+ {$EXTERNALSYM IF_TYPE_LOCALTALK}
+ IF_TYPE_SMDS_DXI = 43;
+ {$EXTERNALSYM IF_TYPE_SMDS_DXI}
+ IF_TYPE_FRAMERELAY_SERVICE = 44; // FRNETSERV-MIB
+ {$EXTERNALSYM IF_TYPE_FRAMERELAY_SERVICE}
+ IF_TYPE_V35 = 45;
+ {$EXTERNALSYM IF_TYPE_V35}
+ IF_TYPE_HSSI = 46;
+ {$EXTERNALSYM IF_TYPE_HSSI}
+ IF_TYPE_HIPPI = 47;
+ {$EXTERNALSYM IF_TYPE_HIPPI}
+ IF_TYPE_MODEM = 48; // Generic Modem
+ {$EXTERNALSYM IF_TYPE_MODEM}
+ IF_TYPE_AAL5 = 49; // AAL5 over ATM
+ {$EXTERNALSYM IF_TYPE_AAL5}
+ IF_TYPE_SONET_PATH = 50;
+ {$EXTERNALSYM IF_TYPE_SONET_PATH}
+ IF_TYPE_SONET_VT = 51;
+ {$EXTERNALSYM IF_TYPE_SONET_VT}
+ IF_TYPE_SMDS_ICIP = 52; // SMDS InterCarrier Interface
+ {$EXTERNALSYM IF_TYPE_SMDS_ICIP}
+ IF_TYPE_PROP_VIRTUAL = 53; // Proprietary virtual/internal
+ {$EXTERNALSYM IF_TYPE_PROP_VIRTUAL}
+ IF_TYPE_PROP_MULTIPLEXOR = 54; // Proprietary multiplexing
+ {$EXTERNALSYM IF_TYPE_PROP_MULTIPLEXOR}
+ IF_TYPE_IEEE80212 = 55; // 100BaseVG
+ {$EXTERNALSYM IF_TYPE_IEEE80212}
+ IF_TYPE_FIBRECHANNEL = 56;
+ {$EXTERNALSYM IF_TYPE_FIBRECHANNEL}
+ IF_TYPE_HIPPIINTERFACE = 57;
+ {$EXTERNALSYM IF_TYPE_HIPPIINTERFACE}
+ IF_TYPE_FRAMERELAY_INTERCONNECT = 58; // Obsolete, use 32 or 44
+ {$EXTERNALSYM IF_TYPE_FRAMERELAY_INTERCONNECT}
+ IF_TYPE_AFLANE_8023 = 59; // ATM Emulated LAN for 802.3
+ {$EXTERNALSYM IF_TYPE_AFLANE_8023}
+ IF_TYPE_AFLANE_8025 = 60; // ATM Emulated LAN for 802.5
+ {$EXTERNALSYM IF_TYPE_AFLANE_8025}
+ IF_TYPE_CCTEMUL = 61; // ATM Emulated circuit
+ {$EXTERNALSYM IF_TYPE_CCTEMUL}
+ IF_TYPE_FASTETHER = 62; // Fast Ethernet (100BaseT)
+ {$EXTERNALSYM IF_TYPE_FASTETHER}
+ IF_TYPE_ISDN = 63; // ISDN and X.25
+ {$EXTERNALSYM IF_TYPE_ISDN}
+ IF_TYPE_V11 = 64; // CCITT V.11/X.21
+ {$EXTERNALSYM IF_TYPE_V11}
+ IF_TYPE_V36 = 65; // CCITT V.36
+ {$EXTERNALSYM IF_TYPE_V36}
+ IF_TYPE_G703_64K = 66; // CCITT G703 at 64Kbps
+ {$EXTERNALSYM IF_TYPE_G703_64K}
+ IF_TYPE_G703_2MB = 67; // Obsolete; see DS1-MIB
+ {$EXTERNALSYM IF_TYPE_G703_2MB}
+ IF_TYPE_QLLC = 68; // SNA QLLC
+ {$EXTERNALSYM IF_TYPE_QLLC}
+ IF_TYPE_FASTETHER_FX = 69; // Fast Ethernet (100BaseFX)
+ {$EXTERNALSYM IF_TYPE_FASTETHER_FX}
+ IF_TYPE_CHANNEL = 70;
+ {$EXTERNALSYM IF_TYPE_CHANNEL}
+ IF_TYPE_IEEE80211 = 71; // Radio spread spectrum
+ {$EXTERNALSYM IF_TYPE_IEEE80211}
+ IF_TYPE_IBM370PARCHAN = 72; // IBM System 360/370 OEMI Channel
+ {$EXTERNALSYM IF_TYPE_IBM370PARCHAN}
+ IF_TYPE_ESCON = 73; // IBM Enterprise Systems Connection
+ {$EXTERNALSYM IF_TYPE_ESCON}
+ IF_TYPE_DLSW = 74; // Data Link Switching
+ {$EXTERNALSYM IF_TYPE_DLSW}
+ IF_TYPE_ISDN_S = 75; // ISDN S/T interface
+ {$EXTERNALSYM IF_TYPE_ISDN_S}
+ IF_TYPE_ISDN_U = 76; // ISDN U interface
+ {$EXTERNALSYM IF_TYPE_ISDN_U}
+ IF_TYPE_LAP_D = 77; // Link Access Protocol D
+ {$EXTERNALSYM IF_TYPE_LAP_D}
+ IF_TYPE_IPSWITCH = 78; // IP Switching Objects
+ {$EXTERNALSYM IF_TYPE_IPSWITCH}
+ IF_TYPE_RSRB = 79; // Remote Source Route Bridging
+ {$EXTERNALSYM IF_TYPE_RSRB}
+ IF_TYPE_ATM_LOGICAL = 80; // ATM Logical Port
+ {$EXTERNALSYM IF_TYPE_ATM_LOGICAL}
+ IF_TYPE_DS0 = 81; // Digital Signal Level 0
+ {$EXTERNALSYM IF_TYPE_DS0}
+ IF_TYPE_DS0_BUNDLE = 82; // Group of ds0s on the same ds1
+ {$EXTERNALSYM IF_TYPE_DS0_BUNDLE}
+ IF_TYPE_BSC = 83; // Bisynchronous Protocol
+ {$EXTERNALSYM IF_TYPE_BSC}
+ IF_TYPE_ASYNC = 84; // Asynchronous Protocol
+ {$EXTERNALSYM IF_TYPE_ASYNC}
+ IF_TYPE_CNR = 85; // Combat Net Radio
+ {$EXTERNALSYM IF_TYPE_CNR}
+ IF_TYPE_ISO88025R_DTR = 86; // ISO 802.5r DTR
+ {$EXTERNALSYM IF_TYPE_ISO88025R_DTR}
+ IF_TYPE_EPLRS = 87; // Ext Pos Loc Report Sys
+ {$EXTERNALSYM IF_TYPE_EPLRS}
+ IF_TYPE_ARAP = 88; // Appletalk Remote Access Protocol
+ {$EXTERNALSYM IF_TYPE_ARAP}
+ IF_TYPE_PROP_CNLS = 89; // Proprietary Connectionless Proto
+ {$EXTERNALSYM IF_TYPE_PROP_CNLS}
+ IF_TYPE_HOSTPAD = 90; // CCITT-ITU X.29 PAD Protocol
+ {$EXTERNALSYM IF_TYPE_HOSTPAD}
+ IF_TYPE_TERMPAD = 91; // CCITT-ITU X.3 PAD Facility
+ {$EXTERNALSYM IF_TYPE_TERMPAD}
+ IF_TYPE_FRAMERELAY_MPI = 92; // Multiproto Interconnect over FR
+ {$EXTERNALSYM IF_TYPE_FRAMERELAY_MPI}
+ IF_TYPE_X213 = 93; // CCITT-ITU X213
+ {$EXTERNALSYM IF_TYPE_X213}
+ IF_TYPE_ADSL = 94; // Asymmetric Digital Subscrbr Loop
+ {$EXTERNALSYM IF_TYPE_ADSL}
+ IF_TYPE_RADSL = 95; // Rate-Adapt Digital Subscrbr Loop
+ {$EXTERNALSYM IF_TYPE_RADSL}
+ IF_TYPE_SDSL = 96; // Symmetric Digital Subscriber Loop
+ {$EXTERNALSYM IF_TYPE_SDSL}
+ IF_TYPE_VDSL = 97; // Very H-Speed Digital Subscrb Loop
+ {$EXTERNALSYM IF_TYPE_VDSL}
+ IF_TYPE_ISO88025_CRFPRINT = 98; // ISO 802.5 CRFP
+ {$EXTERNALSYM IF_TYPE_ISO88025_CRFPRINT}
+ IF_TYPE_MYRINET = 99; // Myricom Myrinet
+ {$EXTERNALSYM IF_TYPE_MYRINET}
+ IF_TYPE_VOICE_EM = 100; // Voice recEive and transMit
+ {$EXTERNALSYM IF_TYPE_VOICE_EM}
+ IF_TYPE_VOICE_FXO = 101; // Voice Foreign Exchange Office
+ {$EXTERNALSYM IF_TYPE_VOICE_FXO}
+ IF_TYPE_VOICE_FXS = 102; // Voice Foreign Exchange Station
+ {$EXTERNALSYM IF_TYPE_VOICE_FXS}
+ IF_TYPE_VOICE_ENCAP = 103; // Voice encapsulation
+ {$EXTERNALSYM IF_TYPE_VOICE_ENCAP}
+ IF_TYPE_VOICE_OVERIP = 104; // Voice over IP encapsulation
+ {$EXTERNALSYM IF_TYPE_VOICE_OVERIP}
+ IF_TYPE_ATM_DXI = 105; // ATM DXI
+ {$EXTERNALSYM IF_TYPE_ATM_DXI}
+ IF_TYPE_ATM_FUNI = 106; // ATM FUNI
+ {$EXTERNALSYM IF_TYPE_ATM_FUNI}
+ IF_TYPE_ATM_IMA = 107; // ATM IMA
+ {$EXTERNALSYM IF_TYPE_ATM_IMA}
+ IF_TYPE_PPPMULTILINKBUNDLE = 108; // PPP Multilink Bundle
+ {$EXTERNALSYM IF_TYPE_PPPMULTILINKBUNDLE}
+ IF_TYPE_IPOVER_CDLC = 109; // IBM ipOverCdlc
+ {$EXTERNALSYM IF_TYPE_IPOVER_CDLC}
+ IF_TYPE_IPOVER_CLAW = 110; // IBM Common Link Access to Workstn
+ {$EXTERNALSYM IF_TYPE_IPOVER_CLAW}
+ IF_TYPE_STACKTOSTACK = 111; // IBM stackToStack
+ {$EXTERNALSYM IF_TYPE_STACKTOSTACK}
+ IF_TYPE_VIRTUALIPADDRESS = 112; // IBM VIPA
+ {$EXTERNALSYM IF_TYPE_VIRTUALIPADDRESS}
+ IF_TYPE_MPC = 113; // IBM multi-proto channel support
+ {$EXTERNALSYM IF_TYPE_MPC}
+ IF_TYPE_IPOVER_ATM = 114; // IBM ipOverAtm
+ {$EXTERNALSYM IF_TYPE_IPOVER_ATM}
+ IF_TYPE_ISO88025_FIBER = 115; // ISO 802.5j Fiber Token Ring
+ {$EXTERNALSYM IF_TYPE_ISO88025_FIBER}
+ IF_TYPE_TDLC = 116; // IBM twinaxial data link control
+ {$EXTERNALSYM IF_TYPE_TDLC}
+ IF_TYPE_GIGABITETHERNET = 117;
+ {$EXTERNALSYM IF_TYPE_GIGABITETHERNET}
+ IF_TYPE_HDLC = 118;
+ {$EXTERNALSYM IF_TYPE_HDLC}
+ IF_TYPE_LAP_F = 119;
+ {$EXTERNALSYM IF_TYPE_LAP_F}
+ IF_TYPE_V37 = 120;
+ {$EXTERNALSYM IF_TYPE_V37}
+ IF_TYPE_X25_MLP = 121; // Multi-Link Protocol
+ {$EXTERNALSYM IF_TYPE_X25_MLP}
+ IF_TYPE_X25_HUNTGROUP = 122; // X.25 Hunt Group
+ {$EXTERNALSYM IF_TYPE_X25_HUNTGROUP}
+ IF_TYPE_TRANSPHDLC = 123;
+ {$EXTERNALSYM IF_TYPE_TRANSPHDLC}
+ IF_TYPE_INTERLEAVE = 124; // Interleave channel
+ {$EXTERNALSYM IF_TYPE_INTERLEAVE}
+ IF_TYPE_FAST = 125; // Fast channel
+ {$EXTERNALSYM IF_TYPE_FAST}
+ IF_TYPE_IP = 126; // IP (for APPN HPR in IP networks)
+ {$EXTERNALSYM IF_TYPE_IP}
+ IF_TYPE_DOCSCABLE_MACLAYER = 127; // CATV Mac Layer
+ {$EXTERNALSYM IF_TYPE_DOCSCABLE_MACLAYER}
+ IF_TYPE_DOCSCABLE_DOWNSTREAM = 128; // CATV Downstream interface
+ {$EXTERNALSYM IF_TYPE_DOCSCABLE_DOWNSTREAM}
+ IF_TYPE_DOCSCABLE_UPSTREAM = 129; // CATV Upstream interface
+ {$EXTERNALSYM IF_TYPE_DOCSCABLE_UPSTREAM}
+ IF_TYPE_A12MPPSWITCH = 130; // Avalon Parallel Processor
+ {$EXTERNALSYM IF_TYPE_A12MPPSWITCH}
+ IF_TYPE_TUNNEL = 131; // Encapsulation interface
+ {$EXTERNALSYM IF_TYPE_TUNNEL}
+ IF_TYPE_COFFEE = 132; // Coffee pot
+ {$EXTERNALSYM IF_TYPE_COFFEE}
+ IF_TYPE_CES = 133; // Circuit Emulation Service
+ {$EXTERNALSYM IF_TYPE_CES}
+ IF_TYPE_ATM_SUBINTERFACE = 134; // ATM Sub Interface
+ {$EXTERNALSYM IF_TYPE_ATM_SUBINTERFACE}
+ IF_TYPE_L2_VLAN = 135; // Layer 2 Virtual LAN using 802.1Q
+ {$EXTERNALSYM IF_TYPE_L2_VLAN}
+ IF_TYPE_L3_IPVLAN = 136; // Layer 3 Virtual LAN using IP
+ {$EXTERNALSYM IF_TYPE_L3_IPVLAN}
+ IF_TYPE_L3_IPXVLAN = 137; // Layer 3 Virtual LAN using IPX
+ {$EXTERNALSYM IF_TYPE_L3_IPXVLAN}
+ IF_TYPE_DIGITALPOWERLINE = 138; // IP over Power Lines
+ {$EXTERNALSYM IF_TYPE_DIGITALPOWERLINE}
+ IF_TYPE_MEDIAMAILOVERIP = 139; // Multimedia Mail over IP
+ {$EXTERNALSYM IF_TYPE_MEDIAMAILOVERIP}
+ IF_TYPE_DTM = 140; // Dynamic syncronous Transfer Mode
+ {$EXTERNALSYM IF_TYPE_DTM}
+ IF_TYPE_DCN = 141; // Data Communications Network
+ {$EXTERNALSYM IF_TYPE_DCN}
+ IF_TYPE_IPFORWARD = 142; // IP Forwarding Interface
+ {$EXTERNALSYM IF_TYPE_IPFORWARD}
+ IF_TYPE_MSDSL = 143; // Multi-rate Symmetric DSL
+ {$EXTERNALSYM IF_TYPE_MSDSL}
+ IF_TYPE_IEEE1394 = 144; // IEEE1394 High Perf Serial Bus
+ {$EXTERNALSYM IF_TYPE_IEEE1394}
+ IF_TYPE_RECEIVE_ONLY = 145; // TV adapter type
+ {$EXTERNALSYM IF_TYPE_RECEIVE_ONLY}
+
+ MAX_IF_TYPE = 145;
+ {$EXTERNALSYM MAX_IF_TYPE}
+
+//////////////////////////////////////////////////////////////////////////////
+// //
+// Access types //
+// //
+//////////////////////////////////////////////////////////////////////////////
+
+ IF_ACCESS_LOOPBACK = 1;
+ {$EXTERNALSYM IF_ACCESS_LOOPBACK}
+ IF_ACCESS_BROADCAST = 2;
+ {$EXTERNALSYM IF_ACCESS_BROADCAST}
+ IF_ACCESS_POINTTOPOINT = 3;
+ {$EXTERNALSYM IF_ACCESS_POINTTOPOINT}
+ IF_ACCESS_POINTTOMULTIPOINT = 4;
+ {$EXTERNALSYM IF_ACCESS_POINTTOMULTIPOINT}
+
+//////////////////////////////////////////////////////////////////////////////
+// //
+// Interface Capabilities (bit flags) //
+// //
+//////////////////////////////////////////////////////////////////////////////
+
+ IF_CHECK_NONE = $00;
+ {$EXTERNALSYM IF_CHECK_NONE}
+ IF_CHECK_MCAST = $01;
+ {$EXTERNALSYM IF_CHECK_MCAST}
+ IF_CHECK_SEND = $02;
+ {$EXTERNALSYM IF_CHECK_SEND}
+
+//////////////////////////////////////////////////////////////////////////////
+// //
+// Connection Types //
+// //
+//////////////////////////////////////////////////////////////////////////////
+
+ IF_CONNECTION_DEDICATED = 1;
+ {$EXTERNALSYM IF_CONNECTION_DEDICATED}
+ IF_CONNECTION_PASSIVE = 2;
+ {$EXTERNALSYM IF_CONNECTION_PASSIVE}
+ IF_CONNECTION_DEMAND = 3;
+ {$EXTERNALSYM IF_CONNECTION_DEMAND}
+
+ IF_ADMIN_STATUS_UP = 1;
+ {$EXTERNALSYM IF_ADMIN_STATUS_UP}
+ IF_ADMIN_STATUS_DOWN = 2;
+ {$EXTERNALSYM IF_ADMIN_STATUS_DOWN}
+ IF_ADMIN_STATUS_TESTING = 3;
+ {$EXTERNALSYM IF_ADMIN_STATUS_TESTING}
+
+//////////////////////////////////////////////////////////////////////////////
+// //
+// The following are the the operational states for WAN and LAN interfaces. //
+// The order of the states seems weird, but is done for a purpose. All //
+// states >= CONNECTED can transmit data right away. States >= DISCONNECTED //
+// can tx data but some set up might be needed. States < DISCONNECTED can //
+// not transmit data. //
+// A card is marked UNREACHABLE if DIM calls InterfaceUnreachable for //
+// reasons other than failure to connect. //
+// //
+// NON_OPERATIONAL -- Valid for LAN Interfaces. Means the card is not //
+// working or not plugged in or has no address. //
+// UNREACHABLE -- Valid for WAN Interfaces. Means the remote site is //
+// not reachable at this time. //
+// DISCONNECTED -- Valid for WAN Interfaces. Means the remote site is //
+// not connected at this time. //
+// CONNECTING -- Valid for WAN Interfaces. Means a connection attempt //
+// has been initiated to the remote site. //
+// CONNECTED -- Valid for WAN Interfaces. Means the remote site is //
+// connected. //
+// OPERATIONAL -- Valid for LAN Interfaces. Means the card is plugged //
+// in and working. //
+// //
+// It is the users duty to convert these values to MIB-II values if they //
+// are to be used by a subagent //
+// //
+//////////////////////////////////////////////////////////////////////////////
+
+ IF_OPER_STATUS_NON_OPERATIONAL = 0;
+ {$EXTERNALSYM IF_OPER_STATUS_NON_OPERATIONAL}
+ IF_OPER_STATUS_UNREACHABLE = 1;
+ {$EXTERNALSYM IF_OPER_STATUS_UNREACHABLE}
+ IF_OPER_STATUS_DISCONNECTED = 2;
+ {$EXTERNALSYM IF_OPER_STATUS_DISCONNECTED}
+ IF_OPER_STATUS_CONNECTING = 3;
+ {$EXTERNALSYM IF_OPER_STATUS_CONNECTING}
+ IF_OPER_STATUS_CONNECTED = 4;
+ {$EXTERNALSYM IF_OPER_STATUS_CONNECTED}
+ IF_OPER_STATUS_OPERATIONAL = 5;
+ {$EXTERNALSYM IF_OPER_STATUS_OPERATIONAL}
+
+ MIB_IF_TYPE_OTHER = 1;
+ {$EXTERNALSYM MIB_IF_TYPE_OTHER}
+ MIB_IF_TYPE_ETHERNET = 6;
+ {$EXTERNALSYM MIB_IF_TYPE_ETHERNET}
+ MIB_IF_TYPE_TOKENRING = 9;
+ {$EXTERNALSYM MIB_IF_TYPE_TOKENRING}
+ MIB_IF_TYPE_FDDI = 15;
+ {$EXTERNALSYM MIB_IF_TYPE_FDDI}
+ MIB_IF_TYPE_PPP = 23;
+ {$EXTERNALSYM MIB_IF_TYPE_PPP}
+ MIB_IF_TYPE_LOOPBACK = 24;
+ {$EXTERNALSYM MIB_IF_TYPE_LOOPBACK}
+ MIB_IF_TYPE_SLIP = 28;
+ {$EXTERNALSYM MIB_IF_TYPE_SLIP}
+
+ MIB_IF_ADMIN_STATUS_UP = 1;
+ {$EXTERNALSYM MIB_IF_ADMIN_STATUS_UP}
+ MIB_IF_ADMIN_STATUS_DOWN = 2;
+ {$EXTERNALSYM MIB_IF_ADMIN_STATUS_DOWN}
+ MIB_IF_ADMIN_STATUS_TESTING = 3;
+ {$EXTERNALSYM MIB_IF_ADMIN_STATUS_TESTING}
+
+ MIB_IF_OPER_STATUS_NON_OPERATIONAL = 0;
+ {$EXTERNALSYM MIB_IF_OPER_STATUS_NON_OPERATIONAL}
+ MIB_IF_OPER_STATUS_UNREACHABLE = 1;
+ {$EXTERNALSYM MIB_IF_OPER_STATUS_UNREACHABLE}
+ MIB_IF_OPER_STATUS_DISCONNECTED = 2;
+ {$EXTERNALSYM MIB_IF_OPER_STATUS_DISCONNECTED}
+ MIB_IF_OPER_STATUS_CONNECTING = 3;
+ {$EXTERNALSYM MIB_IF_OPER_STATUS_CONNECTING}
+ MIB_IF_OPER_STATUS_CONNECTED = 4;
+ {$EXTERNALSYM MIB_IF_OPER_STATUS_CONNECTED}
+ MIB_IF_OPER_STATUS_OPERATIONAL = 5;
+ {$EXTERNALSYM MIB_IF_OPER_STATUS_OPERATIONAL}
+
+implementation
+
+end.
diff --git a/packages/extra/winunits/jwaipinfoid.pas b/packages/extra/winunits/jwaipinfoid.pas
index aef0b8c0e7..b8c888c75f 100644
--- a/packages/extra/winunits/jwaipinfoid.pas
+++ b/packages/extra/winunits/jwaipinfoid.pas
@@ -1,133 +1,133 @@
-{******************************************************************************}
-{ }
-{ Router Manager Protocol IDs API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: ipinfoid.h, released November 2002. The original Pascal}
-{ code is: IpInfoId.pas, released March 2002. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwaipinfoid.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaIpInfoId;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "ipinfoid.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaWinType;
-
-const
- IP_ROUTER_MANAGER_VERSION = 1;
- {$EXTERNALSYM IP_ROUTER_MANAGER_VERSION}
-
-//////////////////////////////////////////////////////////////////////////////
-// //
-// These are the ids used for different information types supported by //
-// IP Router Manager. These ids live in the same space as the IP Routing //
-// Protocol IDs, so any addition to them must be done with care //
-// //
-//////////////////////////////////////////////////////////////////////////////
-
- IP_GENERAL_INFO_BASE = DWORD($ffff0000);
- {$EXTERNALSYM IP_GENERAL_INFO_BASE}
-
- IP_IN_FILTER_INFO = IP_GENERAL_INFO_BASE + 1;
- {$EXTERNALSYM IP_IN_FILTER_INFO}
- IP_OUT_FILTER_INFO = IP_GENERAL_INFO_BASE + 2;
- {$EXTERNALSYM IP_OUT_FILTER_INFO}
- IP_GLOBAL_INFO = IP_GENERAL_INFO_BASE + 3;
- {$EXTERNALSYM IP_GLOBAL_INFO}
- IP_INTERFACE_STATUS_INFO = IP_GENERAL_INFO_BASE + 4;
- {$EXTERNALSYM IP_INTERFACE_STATUS_INFO}
- IP_ROUTE_INFO = IP_GENERAL_INFO_BASE + 5;
- {$EXTERNALSYM IP_ROUTE_INFO}
- IP_PROT_PRIORITY_INFO = IP_GENERAL_INFO_BASE + 6;
- {$EXTERNALSYM IP_PROT_PRIORITY_INFO}
- IP_ROUTER_DISC_INFO = IP_GENERAL_INFO_BASE + 7;
- {$EXTERNALSYM IP_ROUTER_DISC_INFO}
-
-// N.B. Unused ID available at IP_GENERAL_INFO_BASE + 8.
-
- IP_DEMAND_DIAL_FILTER_INFO = IP_GENERAL_INFO_BASE + 9;
- {$EXTERNALSYM IP_DEMAND_DIAL_FILTER_INFO}
- IP_MCAST_HEARBEAT_INFO = IP_GENERAL_INFO_BASE + 10;
- {$EXTERNALSYM IP_MCAST_HEARBEAT_INFO}
- IP_MCAST_BOUNDARY_INFO = IP_GENERAL_INFO_BASE + 11;
- {$EXTERNALSYM IP_MCAST_BOUNDARY_INFO}
- IP_IPINIP_CFG_INFO = IP_GENERAL_INFO_BASE + 12;
- {$EXTERNALSYM IP_IPINIP_CFG_INFO}
- IP_IFFILTER_INFO = IP_GENERAL_INFO_BASE + 13;
- {$EXTERNALSYM IP_IFFILTER_INFO}
- IP_MCAST_LIMIT_INFO = IP_GENERAL_INFO_BASE + 14;
- {$EXTERNALSYM IP_MCAST_LIMIT_INFO}
-
-//////////////////////////////////////////////////////////////////////////////
-// //
-// The following IDS are defined in routprot.h and given here for //
-// informational purposes only //
-// //
-// #define IP_OTHER 1 //
-// #define IP_LOCAL 2 //
-// #define IP_NETMGMT 3 //
-// #define IP_ICMP 4 //
-// #define IP_EGP 5 //
-// #define IP_GGP 6 //
-// #define IP_HELLO 7 //
-// #define IP_RIP 8 //
-// #define IP_IS_IS 9 //
-// #define IP_ES_IS 10 //
-// #define IP_CISCO 11 //
-// #define IP_BBN 12 //
-// #define IP_OSPF 13 //
-// #define IP_BGP 14 //
-// //
-// #define IP_BOOTP 9999 //
-// #define IPRTRMGR_PID 10000 //
-// #define IP_NT_AUTOSTATIC 10002 //
-// //
-//////////////////////////////////////////////////////////////////////////////
-
-implementation
-
-end.
+{******************************************************************************}
+{ }
+{ Router Manager Protocol IDs API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: ipinfoid.h, released November 2002. The original Pascal}
+{ code is: IpInfoId.pas, released March 2002. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwaipinfoid.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaIpInfoId;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "ipinfoid.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaWinType;
+
+const
+ IP_ROUTER_MANAGER_VERSION = 1;
+ {$EXTERNALSYM IP_ROUTER_MANAGER_VERSION}
+
+//////////////////////////////////////////////////////////////////////////////
+// //
+// These are the ids used for different information types supported by //
+// IP Router Manager. These ids live in the same space as the IP Routing //
+// Protocol IDs, so any addition to them must be done with care //
+// //
+//////////////////////////////////////////////////////////////////////////////
+
+ IP_GENERAL_INFO_BASE = DWORD($ffff0000);
+ {$EXTERNALSYM IP_GENERAL_INFO_BASE}
+
+ IP_IN_FILTER_INFO = IP_GENERAL_INFO_BASE + 1;
+ {$EXTERNALSYM IP_IN_FILTER_INFO}
+ IP_OUT_FILTER_INFO = IP_GENERAL_INFO_BASE + 2;
+ {$EXTERNALSYM IP_OUT_FILTER_INFO}
+ IP_GLOBAL_INFO = IP_GENERAL_INFO_BASE + 3;
+ {$EXTERNALSYM IP_GLOBAL_INFO}
+ IP_INTERFACE_STATUS_INFO = IP_GENERAL_INFO_BASE + 4;
+ {$EXTERNALSYM IP_INTERFACE_STATUS_INFO}
+ IP_ROUTE_INFO = IP_GENERAL_INFO_BASE + 5;
+ {$EXTERNALSYM IP_ROUTE_INFO}
+ IP_PROT_PRIORITY_INFO = IP_GENERAL_INFO_BASE + 6;
+ {$EXTERNALSYM IP_PROT_PRIORITY_INFO}
+ IP_ROUTER_DISC_INFO = IP_GENERAL_INFO_BASE + 7;
+ {$EXTERNALSYM IP_ROUTER_DISC_INFO}
+
+// N.B. Unused ID available at IP_GENERAL_INFO_BASE + 8.
+
+ IP_DEMAND_DIAL_FILTER_INFO = IP_GENERAL_INFO_BASE + 9;
+ {$EXTERNALSYM IP_DEMAND_DIAL_FILTER_INFO}
+ IP_MCAST_HEARBEAT_INFO = IP_GENERAL_INFO_BASE + 10;
+ {$EXTERNALSYM IP_MCAST_HEARBEAT_INFO}
+ IP_MCAST_BOUNDARY_INFO = IP_GENERAL_INFO_BASE + 11;
+ {$EXTERNALSYM IP_MCAST_BOUNDARY_INFO}
+ IP_IPINIP_CFG_INFO = IP_GENERAL_INFO_BASE + 12;
+ {$EXTERNALSYM IP_IPINIP_CFG_INFO}
+ IP_IFFILTER_INFO = IP_GENERAL_INFO_BASE + 13;
+ {$EXTERNALSYM IP_IFFILTER_INFO}
+ IP_MCAST_LIMIT_INFO = IP_GENERAL_INFO_BASE + 14;
+ {$EXTERNALSYM IP_MCAST_LIMIT_INFO}
+
+//////////////////////////////////////////////////////////////////////////////
+// //
+// The following IDS are defined in routprot.h and given here for //
+// informational purposes only //
+// //
+// #define IP_OTHER 1 //
+// #define IP_LOCAL 2 //
+// #define IP_NETMGMT 3 //
+// #define IP_ICMP 4 //
+// #define IP_EGP 5 //
+// #define IP_GGP 6 //
+// #define IP_HELLO 7 //
+// #define IP_RIP 8 //
+// #define IP_IS_IS 9 //
+// #define IP_ES_IS 10 //
+// #define IP_CISCO 11 //
+// #define IP_BBN 12 //
+// #define IP_OSPF 13 //
+// #define IP_BGP 14 //
+// //
+// #define IP_BOOTP 9999 //
+// #define IPRTRMGR_PID 10000 //
+// #define IP_NT_AUTOSTATIC 10002 //
+// //
+//////////////////////////////////////////////////////////////////////////////
+
+implementation
+
+end.
diff --git a/packages/extra/winunits/jwaiprtrmib.pas b/packages/extra/winunits/jwaiprtrmib.pas
index e2d5489a4d..a2f11e3878 100644
--- a/packages/extra/winunits/jwaiprtrmib.pas
+++ b/packages/extra/winunits/jwaiprtrmib.pas
@@ -1,1244 +1,1244 @@
-{******************************************************************************}
-{ }
-{ Management Information Base API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: iprtrmib.h, released August 2001. The original Pascal }
-{ code is: IpRtrMib.pas, released September 2000. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Contributor(s): John C. Penman (jcp att craiglockhart dott com) }
-{ Vladimir Vassiliev (voldemarv att hotpop dott com) }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwaiprtrmib.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaIpRtrMib;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "iprtrmib.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaWinType;
-
-//////////////////////////////////////////////////////////////////////////////
-// //
-// Included to get the value of MAX_INTERFACE_NAME_LEN //
-// //
-//////////////////////////////////////////////////////////////////////////////
-
-// #include <mprapi.h>
-
-//////////////////////////////////////////////////////////////////////////////
-// //
-// Included to get the necessary constants //
-// //
-//////////////////////////////////////////////////////////////////////////////
-
-// #include <ipifcons.h>
-
-//////////////////////////////////////////////////////////////////////////////
-// //
-// This is the Id for IP Router Manager. The Router Manager handles //
-// MIB-II, Forwarding MIB and some enterprise specific information. //
-// Calls made with any other ID are passed on to the corresponding protocol //
-// For example, an MprAdminMIBXXX call with a protocol ID of PID_IP and //
-// a routing Id of 0xD will be sent to the IP Router Manager and then //
-// forwarded to OSPF //
-// This lives in the same number space as the protocol Ids of RIP, OSPF //
-// etc, so any change made to it should be done keeping this in mind //
-// //
-//////////////////////////////////////////////////////////////////////////////
-
-const
- MAX_INTERFACE_NAME_LEN = 256; // MPRAPI.H
- {$EXTERNALSYM MAX_INTERFACE_NAME_LEN}
-
- IPRTRMGR_PID = 10000;
- {$EXTERNALSYM IPRTRMGR_PID}
-
- ANY_SIZE = 1;
- {$EXTERNALSYM ANY_SIZE}
-
-//////////////////////////////////////////////////////////////////////////////
-// //
-// The following #defines are the Ids of the MIB variables made accessible //
-// to the user via MprAdminMIBXXX Apis. It will be noticed that these are //
-// not the same as RFC 1213, since the MprAdminMIBXXX APIs work on rows and //
-// groups instead of scalar variables //
-// //
-//////////////////////////////////////////////////////////////////////////////
-
- IF_NUMBER = 0;
- {$EXTERNALSYM IF_NUMBER}
- IF_TABLE = IF_NUMBER + 1;
- {$EXTERNALSYM IF_TABLE}
- IF_ROW = IF_TABLE + 1;
- {$EXTERNALSYM IF_ROW}
- IP_STATS = IF_ROW + 1;
- {$EXTERNALSYM IP_STATS}
- IP_ADDRTABLE = IP_STATS + 1;
- {$EXTERNALSYM IP_ADDRTABLE}
- IP_ADDRROW = IP_ADDRTABLE + 1;
- {$EXTERNALSYM IP_ADDRROW}
- IP_FORWARDNUMBER = IP_ADDRROW + 1;
- {$EXTERNALSYM IP_FORWARDNUMBER}
- IP_FORWARDTABLE = IP_FORWARDNUMBER + 1;
- {$EXTERNALSYM IP_FORWARDTABLE}
- IP_FORWARDROW = IP_FORWARDTABLE + 1;
- {$EXTERNALSYM IP_FORWARDROW}
- IP_NETTABLE = IP_FORWARDROW + 1;
- {$EXTERNALSYM IP_NETTABLE}
- IP_NETROW = IP_NETTABLE + 1;
- {$EXTERNALSYM IP_NETROW}
- ICMP_STATS = IP_NETROW + 1;
- {$EXTERNALSYM ICMP_STATS}
- TCP_STATS = ICMP_STATS + 1;
- {$EXTERNALSYM TCP_STATS}
- TCP_TABLE = TCP_STATS + 1;
- {$EXTERNALSYM TCP_TABLE}
- TCP_ROW = TCP_TABLE + 1;
- {$EXTERNALSYM TCP_ROW}
- UDP_STATS = TCP_ROW + 1;
- {$EXTERNALSYM UDP_STATS}
- UDP_TABLE = UDP_STATS + 1;
- {$EXTERNALSYM UDP_TABLE}
- UDP_ROW = UDP_TABLE + 1;
- {$EXTERNALSYM UDP_ROW}
- MCAST_MFE = UDP_ROW + 1;
- {$EXTERNALSYM MCAST_MFE}
- MCAST_MFE_STATS = MCAST_MFE + 1;
- {$EXTERNALSYM MCAST_MFE_STATS}
- BEST_IF = MCAST_MFE_STATS + 1;
- {$EXTERNALSYM BEST_IF}
- BEST_ROUTE = BEST_IF + 1;
- {$EXTERNALSYM BEST_ROUTE}
- PROXY_ARP = BEST_ROUTE + 1;
- {$EXTERNALSYM PROXY_ARP}
- MCAST_IF_ENTRY = PROXY_ARP + 1;
- {$EXTERNALSYM MCAST_IF_ENTRY}
- MCAST_GLOBAL = MCAST_IF_ENTRY + 1;
- {$EXTERNALSYM MCAST_GLOBAL}
- IF_STATUS = MCAST_GLOBAL + 1;
- {$EXTERNALSYM IF_STATUS}
- MCAST_BOUNDARY = IF_STATUS + 1;
- {$EXTERNALSYM MCAST_BOUNDARY}
- MCAST_SCOPE = MCAST_BOUNDARY + 1;
- {$EXTERNALSYM MCAST_SCOPE}
- DEST_MATCHING = MCAST_SCOPE + 1;
- {$EXTERNALSYM DEST_MATCHING}
- DEST_LONGER = DEST_MATCHING + 1;
- {$EXTERNALSYM DEST_LONGER}
- DEST_SHORTER = DEST_LONGER + 1;
- {$EXTERNALSYM DEST_SHORTER}
- ROUTE_MATCHING = DEST_SHORTER + 1;
- {$EXTERNALSYM ROUTE_MATCHING}
- ROUTE_LONGER = ROUTE_MATCHING + 1;
- {$EXTERNALSYM ROUTE_LONGER}
- ROUTE_SHORTER = ROUTE_LONGER + 1;
- {$EXTERNALSYM ROUTE_SHORTER}
- ROUTE_STATE = ROUTE_SHORTER + 1;
- {$EXTERNALSYM ROUTE_STATE}
- MCAST_MFE_STATS_EX = ROUTE_STATE + 1;
- {$EXTERNALSYM MCAST_MFE_STATS_EX}
- IP6_STATS = MCAST_MFE_STATS_EX + 1;
- {$EXTERNALSYM IP6_STATS}
- UDP6_STATS = IP6_STATS + 1;
- {$EXTERNALSYM UDP6_STATS}
- TCP6_STATS = UDP6_STATS + 1;
- {$EXTERNALSYM TCP6_STATS}
-
- NUMBER_OF_EXPORTED_VARIABLES = TCP6_STATS + 1;
- {$EXTERNALSYM NUMBER_OF_EXPORTED_VARIABLES}
-
-//////////////////////////////////////////////////////////////////////////////
-// //
-// MIB_OPAQUE_QUERY is the structure filled in by the user to identify a //
-// MIB variable //
-// //
-// dwVarId ID of MIB Variable (One of the Ids #defined above) //
-// dwVarIndex Variable sized array containing the indices needed to //
-// identify a variable. NOTE: Unlike SNMP we dont require that //
-// a scalar variable be indexed by 0 //
-// //
-//////////////////////////////////////////////////////////////////////////////
-
-type
- PMIB_OPAQUE_QUERY = ^MIB_OPAQUE_QUERY;
- {$EXTERNALSYM PMIB_OPAQUE_QUERY}
- _MIB_OPAQUE_QUERY = record
- dwVarId: DWORD;
- rgdwVarIndex: array [0..ANY_SIZE - 1] of DWORD;
- end;
- {$EXTERNALSYM _MIB_OPAQUE_QUERY}
- MIB_OPAQUE_QUERY = _MIB_OPAQUE_QUERY;
- {$EXTERNALSYM MIB_OPAQUE_QUERY}
- TMibOpaqueQuery = MIB_OPAQUE_QUERY;
- PMibOpaqueQuery = PMIB_OPAQUE_QUERY;
-
-//////////////////////////////////////////////////////////////////////////////
-// //
-// The following are the structures which are filled in and returned to the //
-// user when a query is made, OR are filled in BY THE USER when a set is //
-// done //
-// //
-//////////////////////////////////////////////////////////////////////////////
-
-type
- PMIB_IFNUMBER = ^MIB_IFNUMBER;
- {$EXTERNALSYM PMIB_IFNUMBER}
- _MIB_IFNUMBER = record
- dwValue: DWORD;
- end;
- {$EXTERNALSYM _MIB_IFNUMBER}
- MIB_IFNUMBER = _MIB_IFNUMBER;
- {$EXTERNALSYM MIB_IFNUMBER}
- TMibIfnumber = MIB_IFNUMBER;
- PMibIfnumber = PMIB_IFNUMBER;
-
-const
- MAXLEN_IFDESCR = 256;
- {$EXTERNALSYM MAXLEN_IFDESCR}
- MAXLEN_PHYSADDR = 8;
- {$EXTERNALSYM MAXLEN_PHYSADDR}
-
-type
- PMIB_IFROW = ^MIB_IFROW;
- {$EXTERNALSYM PMIB_IFROW}
- _MIB_IFROW = record
- wszName: array [0..MAX_INTERFACE_NAME_LEN - 1] of WCHAR;
- dwIndex: DWORD;
- dwType: DWORD;
- dwMtu: DWORD;
- dwSpeed: DWORD;
- dwPhysAddrLen: DWORD;
- bPhysAddr: array [0..MAXLEN_PHYSADDR - 1] of BYTE;
- dwAdminStatus: DWORD;
- dwOperStatus: DWORD;
- dwLastChange: DWORD;
- dwInOctets: DWORD;
- dwInUcastPkts: DWORD;
- dwInNUcastPkts: DWORD;
- dwInDiscards: DWORD;
- dwInErrors: DWORD;
- dwInUnknownProtos: DWORD;
- dwOutOctets: DWORD;
- dwOutUcastPkts: DWORD;
- dwOutNUcastPkts: DWORD;
- dwOutDiscards: DWORD;
- dwOutErrors: DWORD;
- dwOutQLen: DWORD;
- dwDescrLen: DWORD;
- bDescr: array[0..MAXLEN_IFDESCR - 1] of BYTE;
- end;
- {$EXTERNALSYM _MIB_IFROW}
- MIB_IFROW = _MIB_IFROW;
- {$EXTERNALSYM MIB_IFROW}
- TMibIfRow = MIB_IFROW;
- PMibIfRow = PMIB_IFROW;
-
- PMIB_IFTABLE = ^MIB_IFTABLE;
- {$EXTERNALSYM PMIB_IFTABLE}
- _MIB_IFTABLE = record
- dwNumEntries: DWORD;
- table: array [0..ANY_SIZE - 1] of MIB_IFROW;
- end;
- {$EXTERNALSYM _MIB_IFTABLE}
- MIB_IFTABLE = _MIB_IFTABLE;
- {$EXTERNALSYM MIB_IFTABLE}
- TMibIftable = MIB_IFTABLE;
- PMibIftable = PMIB_IFTABLE;
-
-// #define SIZEOF_IFTABLE(X) (FIELD_OFFSET(MIB_IFTABLE,table[0]) + ((X) * sizeof(MIB_IFROW)) + ALIGN_SIZE)
-
-type
- PMibIcmpStats = ^TMibIcmpStats;
- _MIBICMPSTATS = record
- dwMsgs: DWORD;
- dwErrors: DWORD;
- dwDestUnreachs: DWORD;
- dwTimeExcds: DWORD;
- dwParmProbs: DWORD;
- dwSrcQuenchs: DWORD;
- dwRedirects: DWORD;
- dwEchos: DWORD;
- dwEchoReps: DWORD;
- dwTimestamps: DWORD;
- dwTimestampReps: DWORD;
- dwAddrMasks: DWORD;
- dwAddrMaskReps: DWORD;
- end;
- {$EXTERNALSYM _MIBICMPSTATS}
- MIBICMPSTATS = _MIBICMPSTATS;
- {$EXTERNALSYM MIBICMPSTATS}
- TMibIcmpStats = _MIBICMPSTATS;
-
- _MIBICMPINFO = record
- icmpInStats: MIBICMPSTATS;
- icmpOutStats: MIBICMPSTATS;
- end;
- {$EXTERNALSYM _MIBICMPINFO}
- MIBICMPINFO = _MIBICMPINFO;
- {$EXTERNALSYM MIBICMPINFO}
- PMIBICMPINFO = ^MIBICMPINFO;
- {$EXTERNALSYM PMIBICMPINFO}
- TMibIcmpInfo = MIBICMPINFO;
-
- PMIB_ICMP = ^MIB_ICMP;
- {$EXTERNALSYM PMIB_ICMP}
- _MIB_ICMP = record
- stats: MIBICMPINFO;
- end;
- {$EXTERNALSYM _MIB_ICMP}
- MIB_ICMP = _MIB_ICMP;
- {$EXTERNALSYM MIB_ICMP}
- TMibIcmp = MIB_ICMP;
- PMibIcmp = PMIB_ICMP;
-
-//
-// ICMPv6 Type Values from RFC 2292.
-//
-
-const
- ICMP6_DST_UNREACH = 1;
- {$EXTERNALSYM ICMP6_DST_UNREACH}
- ICMP6_PACKET_TOO_BIG = 2;
- {$EXTERNALSYM ICMP6_PACKET_TOO_BIG}
- ICMP6_TIME_EXCEEDED = 3;
- {$EXTERNALSYM ICMP6_TIME_EXCEEDED}
- ICMP6_PARAM_PROB = 4;
- {$EXTERNALSYM ICMP6_PARAM_PROB}
- ICMP6_ECHO_REQUEST = 128;
- {$EXTERNALSYM ICMP6_ECHO_REQUEST}
- ICMP6_ECHO_REPLY = 129;
- {$EXTERNALSYM ICMP6_ECHO_REPLY}
- ICMP6_MEMBERSHIP_QUERY = 130;
- {$EXTERNALSYM ICMP6_MEMBERSHIP_QUERY}
- ICMP6_MEMBERSHIP_REPORT = 131;
- {$EXTERNALSYM ICMP6_MEMBERSHIP_REPORT}
- ICMP6_MEMBERSHIP_REDUCTION = 132;
- {$EXTERNALSYM ICMP6_MEMBERSHIP_REDUCTION}
- ND_ROUTER_SOLICIT = 133;
- {$EXTERNALSYM ND_ROUTER_SOLICIT}
- ND_ROUTER_ADVERT = 134;
- {$EXTERNALSYM ND_ROUTER_ADVERT}
- ND_NEIGHBOR_SOLICIT = 135;
- {$EXTERNALSYM ND_NEIGHBOR_SOLICIT}
- ND_NEIGHBOR_ADVERT = 136;
- {$EXTERNALSYM ND_NEIGHBOR_ADVERT}
- ND_REDIRECT = 137;
- {$EXTERNALSYM ND_REDIRECT}
-
-type
- ICMP6_TYPE = DWORD;
- {$EXTERNALSYM ICMP6_TYPE}
- PICMP6_TYPE = ^ICMP6_TYPE;
- {$EXTERNALSYM PICMP6_TYPE}
- TIcmp6Type = ICMP6_TYPE;
- PIcmp6Type = PICMP6_TYPE;
-
-//
-// There are no RFC-specified defines for ICMPv4 message types, so we try to
-// use the ICMP6 values from RFC 2292 modified to be prefixed with ICMP4.
-//
-
-const
- ICMP4_ECHO_REPLY = 0; // Echo Reply
- {$EXTERNALSYM ICMP4_ECHO_REPLY}
- ICMP4_DST_UNREACH = 3; // Destination Unreachable
- {$EXTERNALSYM ICMP4_DST_UNREACH}
- ICMP4_SOURCE_QUENCH = 4; // Source Quench
- {$EXTERNALSYM ICMP4_SOURCE_QUENCH}
- ICMP4_REDIRECT = 5; // Redirect
- {$EXTERNALSYM ICMP4_REDIRECT}
- ICMP4_ECHO_REQUEST = 8; // Echo Request
- {$EXTERNALSYM ICMP4_ECHO_REQUEST}
- ICMP4_ROUTER_ADVERT = 9; // Router Advertisement
- {$EXTERNALSYM ICMP4_ROUTER_ADVERT}
- ICMP4_ROUTER_SOLICIT = 10; // Router Solicitation
- {$EXTERNALSYM ICMP4_ROUTER_SOLICIT}
- ICMP4_TIME_EXCEEDED = 11; // Time Exceeded
- {$EXTERNALSYM ICMP4_TIME_EXCEEDED}
- ICMP4_PARAM_PROB = 12; // Parameter Problem
- {$EXTERNALSYM ICMP4_PARAM_PROB}
- ICMP4_TIMESTAMP_REQUEST = 13; // Timestamp Request
- {$EXTERNALSYM ICMP4_TIMESTAMP_REQUEST}
- ICMP4_TIMESTAMP_REPLY = 14; // Timestamp Reply
- {$EXTERNALSYM ICMP4_TIMESTAMP_REPLY}
- ICMP4_MASK_REQUEST = 17; // Address Mask Request
- {$EXTERNALSYM ICMP4_MASK_REQUEST}
- ICMP4_MASK_REPLY = 18; // Address Mask Reply
- {$EXTERNALSYM ICMP4_MASK_REPLY}
-
-type
- ICMP4_TYPE = DWORD;
- {$EXTERNALSYM ICMP4_TYPE}
- PICMP4_TYPE = ^ICMP4_TYPE;
- {$EXTERNALSYM PICMP4_TYPE}
- TIcmp4Type = ICMP4_TYPE;
- PIcmp4Type = PICMP4_TYPE;
-
- _MIBICMPSTATS_EX = record
- dwMsgs: DWORD;
- dwErrors: DWORD;
- rgdwTypeCount: array [0..255] of DWORD;
- end;
- {$EXTERNALSYM _MIBICMPSTATS_EX}
- MIBICMPSTATS_EX = _MIBICMPSTATS_EX;
- {$EXTERNALSYM MIBICMPSTATS_EX}
- PMIBICMPSTATS_EX = ^MIBICMPSTATS_EX;
- {$EXTERNALSYM PMIBICMPSTATS_EX}
- TMibIcmpStatsEx = MIBICMPSTATS_EX;
- PMibIcmpStatsEx = PMIBICMPSTATS_EX;
-
- _MIB_ICMP_EX = record
- icmpInStats: MIBICMPSTATS_EX;
- icmpOutStats: MIBICMPSTATS_EX;
- end;
- {$EXTERNALSYM _MIB_ICMP_EX}
- MIB_ICMP_EX = _MIB_ICMP_EX;
- {$EXTERNALSYM MIB_ICMP_EX}
- PMIB_ICMP_EX = ^MIB_ICMP_EX;
- {$EXTERNALSYM PMIB_ICMP_EX}
- TMibIcmpEx = MIB_ICMP_EX;
- PMibIcmpEx = PMIB_ICMP_EX;
-
- PMIB_UDPSTATS = ^MIB_UDPSTATS;
- {$EXTERNALSYM PMIB_UDPSTATS}
- _MIB_UDPSTATS = record
- dwInDatagrams: DWORD;
- dwNoPorts: DWORD;
- dwInErrors: DWORD;
- dwOutDatagrams: DWORD;
- dwNumAddrs: DWORD;
- end;
- {$EXTERNALSYM _MIB_UDPSTATS}
- MIB_UDPSTATS = _MIB_UDPSTATS;
- {$EXTERNALSYM MIB_UDPSTATS}
- TMibUdpStats = MIB_UDPSTATS;
- PMibUdpStats = PMIB_UDPSTATS;
-
- PMIB_UDPROW = ^MIB_UDPROW;
- {$EXTERNALSYM PMIB_UDPROW}
- _MIB_UDPROW = record
- dwLocalAddr: DWORD;
- dwLocalPort: DWORD;
- end;
- {$EXTERNALSYM _MIB_UDPROW}
- MIB_UDPROW = _MIB_UDPROW;
- {$EXTERNALSYM MIB_UDPROW}
- TMibUdpRow = MIB_UDPROW;
- PMibUdpRow = PMIB_UDPROW;
-
- PMIB_UDPTABLE = ^MIB_UDPTABLE;
- {$EXTERNALSYM PMIB_UDPTABLE}
- _MIB_UDPTABLE = record
- dwNumEntries: DWORD;
- table: array [0..ANY_SIZE - 1] of MIB_UDPROW;
- end;
- {$EXTERNALSYM _MIB_UDPTABLE}
- MIB_UDPTABLE = _MIB_UDPTABLE;
- {$EXTERNALSYM MIB_UDPTABLE}
- TMibUdpTable = MIB_UDPTABLE;
- PMibUdpTable = PMIB_UDPTABLE;
-
-// #define SIZEOF_UDPTABLE(X) (FIELD_OFFSET(MIB_UDPTABLE, table[0]) + ((X) * sizeof(MIB_UDPROW)) + ALIGN_SIZE)
-
- PMIB_TCPSTATS = ^MIB_TCPSTATS;
- {$EXTERNALSYM PMIB_TCPSTATS}
- _MIB_TCPSTATS = record
- dwRtoAlgorithm: DWORD;
- dwRtoMin: DWORD;
- dwRtoMax: DWORD;
- dwMaxConn: DWORD;
- dwActiveOpens: DWORD;
- dwPassiveOpens: DWORD;
- dwAttemptFails: DWORD;
- dwEstabResets: DWORD;
- dwCurrEstab: DWORD;
- dwInSegs: DWORD;
- dwOutSegs: DWORD;
- dwRetransSegs: DWORD;
- dwInErrs: DWORD;
- dwOutRsts: DWORD;
- dwNumConns: DWORD;
- end;
- {$EXTERNALSYM _MIB_TCPSTATS}
- MIB_TCPSTATS = _MIB_TCPSTATS;
- {$EXTERNALSYM MIB_TCPSTATS}
- TMibTcpStats = MIB_TCPSTATS;
- PMibTcpStats = PMIB_TCPSTATS;
-
-const
- MIB_TCP_RTO_OTHER = 1;
- {$EXTERNALSYM MIB_TCP_RTO_OTHER}
- MIB_TCP_RTO_CONSTANT = 2;
- {$EXTERNALSYM MIB_TCP_RTO_CONSTANT}
- MIB_TCP_RTO_RSRE = 3;
- {$EXTERNALSYM MIB_TCP_RTO_RSRE}
- MIB_TCP_RTO_VANJ = 4;
- {$EXTERNALSYM MIB_TCP_RTO_VANJ}
-
- MIB_TCP_MAXCONN_DYNAMIC = DWORD(-1);
- {$EXTERNALSYM MIB_TCP_MAXCONN_DYNAMIC}
-
-type
- PMIB_TCPROW = ^MIB_TCPROW;
- {$EXTERNALSYM PMIB_TCPROW}
- _MIB_TCPROW = record
- dwState: DWORD;
- dwLocalAddr: DWORD;
- dwLocalPort: DWORD;
- dwRemoteAddr: DWORD;
- dwRemotePort: DWORD;
- end;
- {$EXTERNALSYM _MIB_TCPROW}
- MIB_TCPROW = _MIB_TCPROW;
- {$EXTERNALSYM MIB_TCPROW}
- TMibTcpRow = MIB_TCPROW;
- PMibTcpRow = PMIB_TCPROW;
-
-const
- MIB_TCP_STATE_CLOSED = 1;
- {$EXTERNALSYM MIB_TCP_STATE_CLOSED}
- MIB_TCP_STATE_LISTEN = 2;
- {$EXTERNALSYM MIB_TCP_STATE_LISTEN}
- MIB_TCP_STATE_SYN_SENT = 3;
- {$EXTERNALSYM MIB_TCP_STATE_SYN_SENT}
- MIB_TCP_STATE_SYN_RCVD = 4;
- {$EXTERNALSYM MIB_TCP_STATE_SYN_RCVD}
- MIB_TCP_STATE_ESTAB = 5;
- {$EXTERNALSYM MIB_TCP_STATE_ESTAB}
- MIB_TCP_STATE_FIN_WAIT1 = 6;
- {$EXTERNALSYM MIB_TCP_STATE_FIN_WAIT1}
- MIB_TCP_STATE_FIN_WAIT2 = 7;
- {$EXTERNALSYM MIB_TCP_STATE_FIN_WAIT2}
- MIB_TCP_STATE_CLOSE_WAIT = 8;
- {$EXTERNALSYM MIB_TCP_STATE_CLOSE_WAIT}
- MIB_TCP_STATE_CLOSING = 9;
- {$EXTERNALSYM MIB_TCP_STATE_CLOSING}
- MIB_TCP_STATE_LAST_ACK = 10;
- {$EXTERNALSYM MIB_TCP_STATE_LAST_ACK}
- MIB_TCP_STATE_TIME_WAIT = 11;
- {$EXTERNALSYM MIB_TCP_STATE_TIME_WAIT}
- MIB_TCP_STATE_DELETE_TCB = 12;
- {$EXTERNALSYM MIB_TCP_STATE_DELETE_TCB}
-
-type
- PMIB_TCPTABLE = ^MIB_TCPTABLE;
- {$EXTERNALSYM PMIB_TCPTABLE}
- _MIB_TCPTABLE = record
- dwNumEntries: DWORD;
- table: array [0..ANY_SIZE - 1] of MIB_TCPROW;
- end;
- {$EXTERNALSYM _MIB_TCPTABLE}
- MIB_TCPTABLE = _MIB_TCPTABLE;
- {$EXTERNALSYM MIB_TCPTABLE}
- TMibTcpTable = MIB_TCPTABLE;
- PMibTcpTable = PMIB_TCPTABLE;
-
-// #define SIZEOF_TCPTABLE(X) (FIELD_OFFSET(MIB_TCPTABLE,table[0]) + ((X) * sizeof(MIB_TCPROW)) + ALIGN_SIZE)
-
-const
- MIB_USE_CURRENT_TTL = DWORD(-1);
- {$EXTERNALSYM MIB_USE_CURRENT_TTL}
- MIB_USE_CURRENT_FORWARDING = DWORD(-1);
- {$EXTERNALSYM MIB_USE_CURRENT_FORWARDING}
-
-type
- PMIB_IPSTATS = ^MIB_IPSTATS;
- {$EXTERNALSYM PMIB_IPSTATS}
- _MIB_IPSTATS = record
- dwForwarding: DWORD;
- dwDefaultTTL: DWORD;
- dwInReceives: DWORD;
- dwInHdrErrors: DWORD;
- dwInAddrErrors: DWORD;
- dwForwDatagrams: DWORD;
- dwInUnknownProtos: DWORD;
- dwInDiscards: DWORD;
- dwInDelivers: DWORD;
- dwOutRequests: DWORD;
- dwRoutingDiscards: DWORD;
- dwOutDiscards: DWORD;
- dwOutNoRoutes: DWORD;
- dwReasmTimeout: DWORD;
- dwReasmReqds: DWORD;
- dwReasmOks: DWORD;
- dwReasmFails: DWORD;
- dwFragOks: DWORD;
- dwFragFails: DWORD;
- dwFragCreates: DWORD;
- dwNumIf: DWORD;
- dwNumAddr: DWORD;
- dwNumRoutes: DWORD;
- end;
- {$EXTERNALSYM _MIB_IPSTATS}
- MIB_IPSTATS = _MIB_IPSTATS;
- {$EXTERNALSYM MIB_IPSTATS}
- TMibIpStats = MIB_IPSTATS;
- PMibIpStats = PMIB_IPSTATS;
-
-const
- MIB_IP_FORWARDING = 1;
- {$EXTERNALSYM MIB_IP_FORWARDING}
- MIB_IP_NOT_FORWARDING = 2;
- {$EXTERNALSYM MIB_IP_NOT_FORWARDING}
-
-// Note: These addr types have dependency on ipdef.h
-
- MIB_IPADDR_PRIMARY = $0001; // Primary ipaddr
- {$EXTERNALSYM MIB_IPADDR_PRIMARY}
- MIB_IPADDR_DYNAMIC = $0004; // Dynamic ipaddr
- {$EXTERNALSYM MIB_IPADDR_DYNAMIC}
- MIB_IPADDR_DISCONNECTED = $0008; // Address is on disconnected interface
- {$EXTERNALSYM MIB_IPADDR_DISCONNECTED}
- MIB_IPADDR_DELETED = $0040; // Address being deleted
- {$EXTERNALSYM MIB_IPADDR_DELETED}
- MIB_IPADDR_TRANSIENT = $0080; // Transient address
- {$EXTERNALSYM MIB_IPADDR_TRANSIENT}
-
-type
- PMIB_IPADDRROW = ^MIB_IPADDRROW;
- {$EXTERNALSYM PMIB_IPADDRROW}
- _MIB_IPADDRROW = record
- dwAddr: DWORD;
- dwIndex: DWORD;
- dwMask: DWORD;
- dwBCastAddr: DWORD;
- dwReasmSize: DWORD;
- unused1: Word;
- wType: Word;
- end;
- {$EXTERNALSYM _MIB_IPADDRROW}
- MIB_IPADDRROW = _MIB_IPADDRROW;
- {$EXTERNALSYM MIB_IPADDRROW}
- TMibIpAddrRow = MIB_IPADDRROW;
- PMibIpAddrRow = PMIB_IPADDRROW;
-
- PMIB_IPADDRTABLE = ^MIB_IPADDRTABLE;
- {$EXTERNALSYM PMIB_IPADDRTABLE}
- _MIB_IPADDRTABLE = record
- dwNumEntries: DWORD;
- table: array [0..ANY_SIZE - 1] of MIB_IPADDRROW;
- end;
- {$EXTERNALSYM _MIB_IPADDRTABLE}
- MIB_IPADDRTABLE = _MIB_IPADDRTABLE;
- {$EXTERNALSYM MIB_IPADDRTABLE}
- TMibIpAddrTable = _MIB_IPADDRTABLE;
- PMibIpAddrTable = PMIB_IPADDRTABLE;
-
-// #define SIZEOF_IPADDRTABLE(X) (FIELD_OFFSET(MIB_IPADDRTABLE,table[0]) + ((X) * sizeof(MIB_IPADDRROW)) + ALIGN_SIZE)
-
-type
- PMIB_IPFORWARDNUMBER = ^MIB_IPFORWARDNUMBER;
- {$EXTERNALSYM PMIB_IPFORWARDNUMBER}
- _MIB_IPFORWARDNUMBER = record
- dwValue: DWORD;
- end;
- {$EXTERNALSYM _MIB_IPFORWARDNUMBER}
- MIB_IPFORWARDNUMBER = _MIB_IPFORWARDNUMBER;
- {$EXTERNALSYM MIB_IPFORWARDNUMBER}
- TMibIpForwardNumber = MIB_IPFORWARDNUMBER;
- PMibIpForwardNumber = PMIB_IPFORWARDNUMBER;
-
- PMIB_IPFORWARDROW = ^MIB_IPFORWARDROW;
- {$EXTERNALSYM PMIB_IPFORWARDROW}
- _MIB_IPFORWARDROW = record
- dwForwardDest: DWORD;
- dwForwardMask: DWORD;
- dwForwardPolicy: DWORD;
- dwForwardNextHop: DWORD;
- dwForwardIfIndex: DWORD;
- dwForwardType: DWORD;
- dwForwardProto: DWORD;
- dwForwardAge: DWORD;
- dwForwardNextHopAS: DWORD;
- dwForwardMetric1: DWORD;
- dwForwardMetric2: DWORD;
- dwForwardMetric3: DWORD;
- dwForwardMetric4: DWORD;
- dwForwardMetric5: DWORD;
- end;
- {$EXTERNALSYM _MIB_IPFORWARDROW}
- MIB_IPFORWARDROW = _MIB_IPFORWARDROW;
- {$EXTERNALSYM MIB_IPFORWARDROW}
- TMibIpForwardRow = MIB_IPFORWARDROW;
- PMibIpForwardRow = PMIB_IPFORWARDROW;
-
-const
- MIB_IPROUTE_TYPE_OTHER = 1;
- {$EXTERNALSYM MIB_IPROUTE_TYPE_OTHER}
- MIB_IPROUTE_TYPE_INVALID = 2;
- {$EXTERNALSYM MIB_IPROUTE_TYPE_INVALID}
- MIB_IPROUTE_TYPE_DIRECT = 3;
- {$EXTERNALSYM MIB_IPROUTE_TYPE_DIRECT}
- MIB_IPROUTE_TYPE_INDIRECT = 4;
- {$EXTERNALSYM MIB_IPROUTE_TYPE_INDIRECT}
-
- MIB_IPROUTE_METRIC_UNUSED = DWORD(-1);
- {$EXTERNALSYM MIB_IPROUTE_METRIC_UNUSED}
-
-//
-// THESE MUST MATCH the ids in routprot.h
-//
-
-const
- MIB_IPPROTO_OTHER = 1;
- {$EXTERNALSYM MIB_IPPROTO_OTHER}
- MIB_IPPROTO_LOCAL = 2;
- {$EXTERNALSYM MIB_IPPROTO_LOCAL}
- MIB_IPPROTO_NETMGMT = 3;
- {$EXTERNALSYM MIB_IPPROTO_NETMGMT}
- MIB_IPPROTO_ICMP = 4;
- {$EXTERNALSYM MIB_IPPROTO_ICMP}
- MIB_IPPROTO_EGP = 5;
- {$EXTERNALSYM MIB_IPPROTO_EGP}
- MIB_IPPROTO_GGP = 6;
- {$EXTERNALSYM MIB_IPPROTO_GGP}
- MIB_IPPROTO_HELLO = 7;
- {$EXTERNALSYM MIB_IPPROTO_HELLO}
- MIB_IPPROTO_RIP = 8;
- {$EXTERNALSYM MIB_IPPROTO_RIP}
- MIB_IPPROTO_IS_IS = 9;
- {$EXTERNALSYM MIB_IPPROTO_IS_IS}
- MIB_IPPROTO_ES_IS = 10;
- {$EXTERNALSYM MIB_IPPROTO_ES_IS}
- MIB_IPPROTO_CISCO = 11;
- {$EXTERNALSYM MIB_IPPROTO_CISCO}
- MIB_IPPROTO_BBN = 12;
- {$EXTERNALSYM MIB_IPPROTO_BBN}
- MIB_IPPROTO_OSPF = 13;
- {$EXTERNALSYM MIB_IPPROTO_OSPF}
- MIB_IPPROTO_BGP = 14;
- {$EXTERNALSYM MIB_IPPROTO_BGP}
-
- MIB_IPPROTO_NT_AUTOSTATIC = 10002;
- {$EXTERNALSYM MIB_IPPROTO_NT_AUTOSTATIC}
- MIB_IPPROTO_NT_STATIC = 10006;
- {$EXTERNALSYM MIB_IPPROTO_NT_STATIC}
- MIB_IPPROTO_NT_STATIC_NON_DOD = 10007;
- {$EXTERNALSYM MIB_IPPROTO_NT_STATIC_NON_DOD}
-
-type
- PMIB_IPFORWARDTABLE = ^MIB_IPFORWARDTABLE;
- {$EXTERNALSYM PMIB_IPFORWARDTABLE}
- _MIB_IPFORWARDTABLE = record
- dwNumEntries: DWORD;
- table: array [0..ANY_SIZE - 1] of MIB_IPFORWARDROW;
- end;
- {$EXTERNALSYM _MIB_IPFORWARDTABLE}
- MIB_IPFORWARDTABLE = _MIB_IPFORWARDTABLE;
- {$EXTERNALSYM MIB_IPFORWARDTABLE}
- TMibIpForwardTable = MIB_IPFORWARDTABLE;
- PMibIpForwardTable = PMIB_IPFORWARDTABLE;
-
-// #define SIZEOF_IPFORWARDTABLE(X) (FIELD_OFFSET(MIB_IPFORWARDTABLE,table[0]) + ((X) * sizeof(MIB_IPFORWARDROW)) + ALIGN_SIZE)
-
-type
- PMIB_IPNETROW = ^MIB_IPNETROW;
- {$EXTERNALSYM PMIB_IPNETROW}
- _MIB_IPNETROW = record
- dwIndex: DWORD;
- dwPhysAddrLen: DWORD;
- bPhysAddr: array [0..MAXLEN_PHYSADDR - 1] of BYTE;
- dwAddr: DWORD;
- dwType: DWORD;
- end;
- {$EXTERNALSYM _MIB_IPNETROW}
- MIB_IPNETROW = _MIB_IPNETROW;
- {$EXTERNALSYM MIB_IPNETROW}
- TMibIpNetRow = MIB_IPNETROW;
- PMibIpNetRow = PMIB_IPNETROW;
-
-const
- MIB_IPNET_TYPE_OTHER = 1;
- {$EXTERNALSYM MIB_IPNET_TYPE_OTHER}
- MIB_IPNET_TYPE_INVALID = 2;
- {$EXTERNALSYM MIB_IPNET_TYPE_INVALID}
- MIB_IPNET_TYPE_DYNAMIC = 3;
- {$EXTERNALSYM MIB_IPNET_TYPE_DYNAMIC}
- MIB_IPNET_TYPE_STATIC = 4;
- {$EXTERNALSYM MIB_IPNET_TYPE_STATIC}
-
-type
- PMIB_IPNETTABLE = ^MIB_IPNETTABLE;
- {$EXTERNALSYM PMIB_IPNETTABLE}
- _MIB_IPNETTABLE = record
- dwNumEntries: DWORD;
- table: array [0..ANY_SIZE - 1] of MIB_IPNETROW;
- end;
- {$EXTERNALSYM _MIB_IPNETTABLE}
- MIB_IPNETTABLE = _MIB_IPNETTABLE;
- {$EXTERNALSYM MIB_IPNETTABLE}
- TMibIpNetTable = MIB_IPNETTABLE;
- PMibIpNetTable = PMIB_IPNETTABLE;
-
-// #define SIZEOF_IPNETTABLE(X) (FIELD_OFFSET(MIB_IPNETTABLE, table[0]) + ((X) * sizeof(MIB_IPNETROW)) + ALIGN_SIZE)
-
-type
- PMIB_IPMCAST_OIF = ^MIB_IPMCAST_OIF;
- {$EXTERNALSYM PMIB_IPMCAST_OIF}
- _MIB_IPMCAST_OIF = record
- dwOutIfIndex: DWORD;
- dwNextHopAddr: DWORD;
- dwReserved: DWORD;
- dwReserved1: DWORD;
- end;
- {$EXTERNALSYM _MIB_IPMCAST_OIF}
- MIB_IPMCAST_OIF = _MIB_IPMCAST_OIF;
- {$EXTERNALSYM MIB_IPMCAST_OIF}
- TMibIpmCastOif = MIB_IPMCAST_OIF;
- PMibIpmCastOif = PMIB_IPMCAST_OIF;
-
- PMIB_IPMCAST_MFE = ^MIB_IPMCAST_MFE;
- {$EXTERNALSYM PMIB_IPMCAST_MFE}
- _MIB_IPMCAST_MFE = record
- dwGroup: DWORD;
- dwSource: DWORD;
- dwSrcMask: DWORD;
- dwUpStrmNgbr: DWORD;
- dwInIfIndex: DWORD;
- dwInIfProtocol: DWORD;
- dwRouteProtocol: DWORD;
- dwRouteNetwork: DWORD;
- dwRouteMask: DWORD;
- ulUpTime: ULONG;
- ulExpiryTime: ULONG;
- ulTimeOut: ULONG;
- ulNumOutIf: ULONG;
- fFlags: DWORD;
- dwReserved: DWORD;
- rgmioOutInfo: array [0..ANY_SIZE - 1] of MIB_IPMCAST_OIF;
- end;
- {$EXTERNALSYM _MIB_IPMCAST_MFE}
- MIB_IPMCAST_MFE = _MIB_IPMCAST_MFE;
- {$EXTERNALSYM MIB_IPMCAST_MFE}
- TMibIpmCastMfe = MIB_IPMCAST_MFE;
- PMibIpmCastMfe = PMIB_IPMCAST_MFE;
-
- PMIB_MFE_TABLE = ^MIB_MFE_TABLE;
- {$EXTERNALSYM PMIB_MFE_TABLE}
- _MIB_MFE_TABLE = record
- dwNumEntries: DWORD;
- table: array [0..ANY_SIZE - 1] of MIB_IPMCAST_MFE;
- end;
- {$EXTERNALSYM _MIB_MFE_TABLE}
- MIB_MFE_TABLE = _MIB_MFE_TABLE;
- {$EXTERNALSYM MIB_MFE_TABLE}
- TMibMfeTable = MIB_MFE_TABLE;
- PMibMfeTable = PMIB_MFE_TABLE;
-
-// #define SIZEOF_BASIC_MIB_MFE \
-// (ULONG)(FIELD_OFFSET(MIB_IPMCAST_MFE, rgmioOutInfo[0]))
-
-// #define SIZEOF_MIB_MFE(X) \
-// (SIZEOF_BASIC_MIB_MFE + ((X) * sizeof(MIB_IPMCAST_OIF)))
-
-type
- PMIB_IPMCAST_OIF_STATS = ^MIB_IPMCAST_OIF_STATS;
- {$EXTERNALSYM PMIB_IPMCAST_OIF_STATS}
- _MIB_IPMCAST_OIF_STATS = record
- dwOutIfIndex: DWORD;
- dwNextHopAddr: DWORD;
- dwDialContext: DWORD;
- ulTtlTooLow: ULONG;
- ulFragNeeded: ULONG;
- ulOutPackets: ULONG;
- ulOutDiscards: ULONG;
- end;
- {$EXTERNALSYM _MIB_IPMCAST_OIF_STATS}
- MIB_IPMCAST_OIF_STATS = _MIB_IPMCAST_OIF_STATS;
- {$EXTERNALSYM MIB_IPMCAST_OIF_STATS}
- TMibIpmCastOifStats = MIB_IPMCAST_OIF_STATS;
- PMibIpmCastOifStats = PMIB_IPMCAST_OIF_STATS;
-
- PMIB_IPMCAST_MFE_STATS = ^MIB_IPMCAST_MFE_STATS;
- {$EXTERNALSYM PMIB_IPMCAST_MFE_STATS}
- _MIB_IPMCAST_MFE_STATS = record
- dwGroup: DWORD;
- dwSource: DWORD;
- dwSrcMask: DWORD;
- dwUpStrmNgbr: DWORD;
- dwInIfIndex: DWORD;
- dwInIfProtocol: DWORD;
- dwRouteProtocol: DWORD;
- dwRouteNetwork: DWORD;
- dwRouteMask: DWORD;
- ulUpTime: ULONG;
- ulExpiryTime: ULONG;
- ulNumOutIf: ULONG;
- ulInPkts: ULONG;
- ulInOctets: ULONG;
- ulPktsDifferentIf: ULONG;
- ulQueueOverflow: ULONG;
- rgmiosOutStats: array [0..ANY_SIZE - 1] of MIB_IPMCAST_OIF_STATS;
- end;
- {$EXTERNALSYM _MIB_IPMCAST_MFE_STATS}
- MIB_IPMCAST_MFE_STATS = _MIB_IPMCAST_MFE_STATS;
- {$EXTERNALSYM MIB_IPMCAST_MFE_STATS}
- TMibIpmCastMfeStats = MIB_IPMCAST_MFE_STATS;
- PMibIpmCastMfeStats = PMIB_IPMCAST_MFE_STATS;
-
- PMIB_MFE_STATS_TABLE = ^MIB_MFE_STATS_TABLE;
- {$EXTERNALSYM PMIB_MFE_STATS_TABLE}
- _MIB_MFE_STATS_TABLE = record
- dwNumEntries: DWORD;
- table: array [0..ANY_SIZE - 1] of MIB_IPMCAST_MFE_STATS;
- end;
- {$EXTERNALSYM _MIB_MFE_STATS_TABLE}
- MIB_MFE_STATS_TABLE = _MIB_MFE_STATS_TABLE;
- {$EXTERNALSYM MIB_MFE_STATS_TABLE}
- TMibMfeStatsTable = MIB_MFE_STATS_TABLE;
- PMibMfeStatsTable = PMIB_MFE_STATS_TABLE;
-
-// #define SIZEOF_BASIC_MIB_MFE_STATS \
-// (ULONG)(FIELD_OFFSET(MIB_IPMCAST_MFE_STATS, rgmiosOutStats[0]))
-
-// #define SIZEOF_MIB_MFE_STATS(X) \
-// (SIZEOF_BASIC_MIB_MFE_STATS + ((X) * sizeof(MIB_IPMCAST_OIF_STATS)))
-
-type
- _MIB_IPMCAST_MFE_STATS_EX = record
- dwGroup: DWORD;
- dwSource: DWORD;
- dwSrcMask: DWORD;
- dwUpStrmNgbr: DWORD;
- dwInIfIndex: DWORD;
- dwInIfProtocol: DWORD;
- dwRouteProtocol: DWORD;
- dwRouteNetwork: DWORD;
- dwRouteMask: DWORD;
- ulUpTime: ULONG;
- ulExpiryTime: ULONG;
- ulNumOutIf: ULONG;
- ulInPkts: ULONG;
- ulInOctets: ULONG;
- ulPktsDifferentIf: ULONG;
- ulQueueOverflow: ULONG;
- ulUninitMfe: ULONG;
- ulNegativeMfe: ULONG;
- ulInDiscards: ULONG;
- ulInHdrErrors: ULONG;
- ulTotalOutPackets: ULONG;
-
- rgmiosOutStats: array [0..ANY_SIZE - 1] of MIB_IPMCAST_OIF_STATS;
- end;
- {$EXTERNALSYM _MIB_IPMCAST_MFE_STATS_EX}
- MIB_IPMCAST_MFE_STATS_EX = _MIB_IPMCAST_MFE_STATS_EX;
- {$EXTERNALSYM MIB_IPMCAST_MFE_STATS_EX}
- PMIB_IPMCAST_MFE_STATS_EX = ^MIB_IPMCAST_MFE_STATS_EX;
- {$EXTERNALSYM PMIB_IPMCAST_MFE_STATS_EX}
- TMibIpMCastMfeStatsEx = MIB_IPMCAST_MFE_STATS_EX;
- PMibIpMCastMfeStatsEx = PMIB_IPMCAST_MFE_STATS_EX;
-
- _MIB_MFE_STATS_TABLE_EX = record
- dwNumEntries: DWORD;
- table: array [0..ANY_SIZE - 1] of MIB_IPMCAST_MFE_STATS_EX;
- end;
- {$EXTERNALSYM _MIB_MFE_STATS_TABLE_EX}
- MIB_MFE_STATS_TABLE_EX = _MIB_MFE_STATS_TABLE_EX;
- {$EXTERNALSYM MIB_MFE_STATS_TABLE_EX}
- PMIB_MFE_STATS_TABLE_EX = ^MIB_MFE_STATS_TABLE_EX;
- {$EXTERNALSYM PMIB_MFE_STATS_TABLE_EX}
- TMibMfeStatsTableEx = MIB_MFE_STATS_TABLE_EX;
- PMibMfeStatsTableEx = PMIB_MFE_STATS_TABLE_EX;
-
-//#define SIZEOF_BASIC_MIB_MFE_STATS_EX \
-// (ULONG)(FIELD_OFFSET(MIB_IPMCAST_MFE_STATS_EX, rgmiosOutStats[0]))
-
-//#define SIZEOF_MIB_MFE_STATS_EX(X) \
-// (SIZEOF_BASIC_MIB_MFE_STATS_EX + ((X) * sizeof(MIB_IPMCAST_OIF_STATS)))
-
-type
- PMIB_IPMCAST_GLOBAL = ^MIB_IPMCAST_GLOBAL;
- {$EXTERNALSYM PMIB_IPMCAST_GLOBAL}
- _MIB_IPMCAST_GLOBAL = record
- dwEnable: DWORD;
- end;
- {$EXTERNALSYM _MIB_IPMCAST_GLOBAL}
- MIB_IPMCAST_GLOBAL = _MIB_IPMCAST_GLOBAL;
- {$EXTERNALSYM MIB_IPMCAST_GLOBAL}
- TMibIpmCastGlobal = MIB_IPMCAST_GLOBAL;
- PMibIpmCastGlobal = PMIB_IPMCAST_GLOBAL;
-
- PMIB_IPMCAST_IF_ENTRY = ^MIB_IPMCAST_IF_ENTRY;
- {$EXTERNALSYM PMIB_IPMCAST_IF_ENTRY}
- _MIB_IPMCAST_IF_ENTRY = record
- dwIfIndex: DWORD;
- dwTtl: DWORD;
- dwProtocol: DWORD;
- dwRateLimit: DWORD;
- ulInMcastOctets: ULONG;
- ulOutMcastOctets: ULONG;
- end;
- {$EXTERNALSYM _MIB_IPMCAST_IF_ENTRY}
- MIB_IPMCAST_IF_ENTRY = _MIB_IPMCAST_IF_ENTRY;
- {$EXTERNALSYM MIB_IPMCAST_IF_ENTRY}
- TMibIpmCastIfEntry = MIB_IPMCAST_IF_ENTRY;
- PMibIpmCastIfEntry = PMIB_IPMCAST_IF_ENTRY;
-
- PMIB_IPMCAST_IF_TABLE = ^MIB_IPMCAST_IF_TABLE;
- {$EXTERNALSYM PMIB_IPMCAST_IF_TABLE}
- _MIB_IPMCAST_IF_TABLE = record
- dwNumEntries: DWORD;
- table: array [0..ANY_SIZE - 1] of MIB_IPMCAST_IF_ENTRY;
- end;
- {$EXTERNALSYM _MIB_IPMCAST_IF_TABLE}
- MIB_IPMCAST_IF_TABLE = _MIB_IPMCAST_IF_TABLE;
- {$EXTERNALSYM MIB_IPMCAST_IF_TABLE}
- TMibIpmCastIfTable = MIB_IPMCAST_IF_TABLE;
- PMibIpmCastIfTable = PMIB_IPMCAST_IF_TABLE;
-
-// #define SIZEOF_MCAST_IF_TABLE(X) (FIELD_OFFSET(MIB_IPMCAST_IF_TABLE,table[0]) + ((X) * sizeof(MIB_IPMCAST_IF_ENTRY)) + ALIGN_SIZE)
-
-type
- PMIB_IPMCAST_BOUNDARY = ^MIB_IPMCAST_BOUNDARY;
- {$EXTERNALSYM PMIB_IPMCAST_BOUNDARY}
- _MIB_IPMCAST_BOUNDARY = record
- dwIfIndex: DWORD;
- dwGroupAddress: DWORD;
- dwGroupMask: DWORD;
- dwStatus: DWORD;
- end;
- {$EXTERNALSYM _MIB_IPMCAST_BOUNDARY}
- MIB_IPMCAST_BOUNDARY = _MIB_IPMCAST_BOUNDARY;
- {$EXTERNALSYM MIB_IPMCAST_BOUNDARY}
- TMibIpmCastBoundary = MIB_IPMCAST_BOUNDARY;
- PMibIpmCastBoundary = PMIB_IPMCAST_BOUNDARY;
-
- PMIB_IPMCAST_BOUNDARY_TABLE = ^MIB_IPMCAST_BOUNDARY_TABLE;
- {$EXTERNALSYM PMIB_IPMCAST_BOUNDARY_TABLE}
- _MIB_IPMCAST_BOUNDARY_TABLE = record
- dwNumEntries: DWORD;
- table: array [0..ANY_SIZE - 1] of MIB_IPMCAST_BOUNDARY;
- end;
- {$EXTERNALSYM _MIB_IPMCAST_BOUNDARY_TABLE}
- MIB_IPMCAST_BOUNDARY_TABLE = _MIB_IPMCAST_BOUNDARY_TABLE;
- {$EXTERNALSYM MIB_IPMCAST_BOUNDARY_TABLE}
- TMibIpmCastBoundaryTable = MIB_IPMCAST_BOUNDARY_TABLE;
- PMibIpmCastBoundaryTable = PMIB_IPMCAST_BOUNDARY_TABLE;
-
-// #define SIZEOF_BOUNDARY_TABLE(X) (FIELD_OFFSET(MIB_IPMCAST_BOUNDARY_TABLE,table[0]) + ((X) * sizeof(MIB_IPMCAST_BOUNDARY)) + ALIGN_SIZE)
-
-type
- PMIB_BOUNDARYROW = ^MIB_BOUNDARYROW;
- {$EXTERNALSYM PMIB_BOUNDARYROW}
- MIB_BOUNDARYROW = record
- dwGroupAddress: DWORD;
- dwGroupMask: DWORD;
- end;
- {$EXTERNALSYM MIB_BOUNDARYROW}
- TMibBoundaryRow = MIB_BOUNDARYROW;
- PMibBoundaryRow = PMIB_BOUNDARYROW;
-
-// Structure matching what goes in the registry in a block of type
-// IP_MCAST_LIMIT_INFO. This contains the fields of
-// MIB_IPMCAST_IF_ENTRY which are configurable.
-
- PMIB_MCAST_LIMIT_ROW = ^MIB_MCAST_LIMIT_ROW;
- {$EXTERNALSYM PMIB_MCAST_LIMIT_ROW}
- MIB_MCAST_LIMIT_ROW = record
- dwTtl: DWORD;
- dwRateLimit: DWORD;
- end;
- {$EXTERNALSYM MIB_MCAST_LIMIT_ROW}
- TMibMcastLimitRow = MIB_MCAST_LIMIT_ROW;
- PMibMcastLimitRow = PMIB_MCAST_LIMIT_ROW;
-
-const
- MAX_SCOPE_NAME_LEN = 255;
- {$EXTERNALSYM MAX_SCOPE_NAME_LEN}
-
-//
-// Scope names are unicode. SNMP and MZAP use UTF-8 encoding.
-//
-
-type
- SN_CHAR = WCHAR;
- {$EXTERNALSYM SN_CHAR}
- SCOPE_NAME_BUFFER = array [0..MAX_SCOPE_NAME_LEN] of SN_CHAR;
- {$EXTERNALSYM SCOPE_NAME_BUFFER}
- SCOPE_NAME = ^SN_CHAR;
- {$EXTERNALSYM SCOPE_NAME}
-
- PMIB_IPMCAST_SCOPE = ^MIB_IPMCAST_SCOPE;
- {$EXTERNALSYM PMIB_IPMCAST_SCOPE}
- _MIB_IPMCAST_SCOPE = record
- dwGroupAddress: DWORD;
- dwGroupMask: DWORD;
- snNameBuffer: SCOPE_NAME_BUFFER;
- dwStatus: DWORD;
- end;
- {$EXTERNALSYM _MIB_IPMCAST_SCOPE}
- MIB_IPMCAST_SCOPE = _MIB_IPMCAST_SCOPE;
- {$EXTERNALSYM MIB_IPMCAST_SCOPE}
- TMibIpmCastScope = MIB_IPMCAST_SCOPE;
- PMibIpmCastScope = PMIB_IPMCAST_SCOPE;
-
- PMIB_IPDESTROW = ^MIB_IPDESTROW;
- {$EXTERNALSYM PMIB_IPDESTROW}
- _MIB_IPDESTROW = record
- ForwardRow: MIB_IPFORWARDROW;
- dwForwardPreference: DWORD;
- dwForwardViewSet: DWORD;
- end;
- {$EXTERNALSYM _MIB_IPDESTROW}
- MIB_IPDESTROW = _MIB_IPDESTROW;
- {$EXTERNALSYM MIB_IPDESTROW}
- TMibIpDestRow = MIB_IPDESTROW;
- PMibIpDestRow = PMIB_IPDESTROW;
-
- PMIB_IPDESTTABLE = ^MIB_IPDESTTABLE;
- {$EXTERNALSYM PMIB_IPDESTTABLE}
- _MIB_IPDESTTABLE = record
- dwNumEntries: DWORD;
- table: array [0..ANY_SIZE - 1] of MIB_IPDESTROW;
- end;
- {$EXTERNALSYM _MIB_IPDESTTABLE}
- MIB_IPDESTTABLE = _MIB_IPDESTTABLE;
- {$EXTERNALSYM MIB_IPDESTTABLE}
- TMibIpDestTable = MIB_IPDESTTABLE;
- PMibIpDestTable = PMIB_IPDESTTABLE;
-
- PMIB_BEST_IF = ^MIB_BEST_IF;
- {$EXTERNALSYM PMIB_BEST_IF}
- _MIB_BEST_IF = record
- dwDestAddr: DWORD;
- dwIfIndex: DWORD;
- end;
- {$EXTERNALSYM _MIB_BEST_IF}
- MIB_BEST_IF = _MIB_BEST_IF;
- {$EXTERNALSYM MIB_BEST_IF}
- TMibBestIf = MIB_BEST_IF;
- PMibBestIf = PMIB_BEST_IF;
-
- PMIB_PROXYARP = ^MIB_PROXYARP;
- {$EXTERNALSYM PMIB_PROXYARP}
- _MIB_PROXYARP = record
- dwAddress: DWORD;
- dwMask: DWORD;
- dwIfIndex: DWORD;
- end;
- {$EXTERNALSYM _MIB_PROXYARP}
- MIB_PROXYARP = _MIB_PROXYARP;
- {$EXTERNALSYM MIB_PROXYARP}
- TMibProxyArp = MIB_PROXYARP;
- PMibProxyArp = PMIB_PROXYARP;
-
- PMIB_IFSTATUS = ^MIB_IFSTATUS;
- {$EXTERNALSYM PMIB_IFSTATUS}
- _MIB_IFSTATUS = record
- dwIfIndex: DWORD;
- dwAdminStatus: DWORD;
- dwOperationalStatus: DWORD;
- bMHbeatActive: BOOL;
- bMHbeatAlive: BOOL;
- end;
- {$EXTERNALSYM _MIB_IFSTATUS}
- MIB_IFSTATUS = _MIB_IFSTATUS;
- {$EXTERNALSYM MIB_IFSTATUS}
- TMibIfStatus = MIB_IFSTATUS;
- PMibIfStatus = PMIB_IFSTATUS;
-
- PMIB_ROUTESTATE = ^MIB_ROUTESTATE;
- {$EXTERNALSYM PMIB_ROUTESTATE}
- _MIB_ROUTESTATE = record
- bRoutesSetToStack: BOOL;
- end;
- {$EXTERNALSYM _MIB_ROUTESTATE}
- MIB_ROUTESTATE = _MIB_ROUTESTATE;
- {$EXTERNALSYM MIB_ROUTESTATE}
- TMibRouteState = MIB_ROUTESTATE;
- PMibRouteState = PMIB_ROUTESTATE;
-
-//////////////////////////////////////////////////////////////////////////////
-// //
-// All the info passed to (SET/CREATE) and from (GET/GETNEXT/GETFIRST) //
-// IP Router Manager is encapsulated in the following "discriminated" //
-// union. To pass, say MIB_IFROW, use the following code //
-// //
-// PMIB_OPAQUE_INFO pInfo; //
-// PMIB_IFROW pIfRow; //
-// DWORD rgdwBuff[(MAX_MIB_OFFSET + sizeof(MIB_IFROW))/sizeof(DWORD) + 1]; //
-// //
-// pInfo = (PMIB_OPAQUE_INFO)rgdwBuffer; //
-// pIfRow = (MIB_IFROW *)(pInfo->rgbyData); //
-// //
-// This can also be accomplished by using the following macro //
-// //
-// DEFINE_MIB_BUFFER(pInfo,MIB_IFROW, pIfRow); //
-// //
-//////////////////////////////////////////////////////////////////////////////
-
-type
- PMibOpaqueInfo = ^TMibOpaqueInfo;
- _MIB_OPAQUE_INFO = record
- dwId: DWORD;
- case Integer of
- 0: (ullAlign: Int64); // ULONGLONG (unsigned!)
- 1: (rgbyData: array [0..0] of BYTE);
- end;
- {$EXTERNALSYM _MIB_OPAQUE_INFO}
- MIB_OPAQUE_INFO = _MIB_OPAQUE_INFO;
- {$EXTERNALSYM MIB_OPAQUE_INFO}
- TMibOpaqueInfo = MIB_OPAQUE_INFO;
-
-const
- MAX_MIB_OFFSET = 8;
- {$EXTERNALSYM MAX_MIB_OFFSET}
-
-// #define MIB_INFO_SIZE(S) (MAX_MIB_OFFSET + sizeof(S))
-
-// #define MIB_INFO_SIZE_IN_DWORDS(S) \
-// ((MIB_INFO_SIZE(S))/sizeof(DWORD) + 1)
-
-// #define DEFINE_MIB_BUFFER(X,Y,Z) \
-// DWORD __rgdwBuff[MIB_INFO_SIZE_IN_DWORDS(Y)]; \
-// PMIB_OPAQUE_INFO X = (PMIB_OPAQUE_INFO)__rgdwBuff; \
-// Y * Z = (Y *)(X->rgbyData)
-
-// #define CAST_MIB_INFO(X,Y,Z) Z = (Y)(X->rgbyData)
-
-implementation
-
-end.
+{******************************************************************************}
+{ }
+{ Management Information Base API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: iprtrmib.h, released August 2001. The original Pascal }
+{ code is: IpRtrMib.pas, released September 2000. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Contributor(s): John C. Penman (jcp att craiglockhart dott com) }
+{ Vladimir Vassiliev (voldemarv att hotpop dott com) }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwaiprtrmib.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaIpRtrMib;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "iprtrmib.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaWinType;
+
+//////////////////////////////////////////////////////////////////////////////
+// //
+// Included to get the value of MAX_INTERFACE_NAME_LEN //
+// //
+//////////////////////////////////////////////////////////////////////////////
+
+// #include <mprapi.h>
+
+//////////////////////////////////////////////////////////////////////////////
+// //
+// Included to get the necessary constants //
+// //
+//////////////////////////////////////////////////////////////////////////////
+
+// #include <ipifcons.h>
+
+//////////////////////////////////////////////////////////////////////////////
+// //
+// This is the Id for IP Router Manager. The Router Manager handles //
+// MIB-II, Forwarding MIB and some enterprise specific information. //
+// Calls made with any other ID are passed on to the corresponding protocol //
+// For example, an MprAdminMIBXXX call with a protocol ID of PID_IP and //
+// a routing Id of 0xD will be sent to the IP Router Manager and then //
+// forwarded to OSPF //
+// This lives in the same number space as the protocol Ids of RIP, OSPF //
+// etc, so any change made to it should be done keeping this in mind //
+// //
+//////////////////////////////////////////////////////////////////////////////
+
+const
+ MAX_INTERFACE_NAME_LEN = 256; // MPRAPI.H
+ {$EXTERNALSYM MAX_INTERFACE_NAME_LEN}
+
+ IPRTRMGR_PID = 10000;
+ {$EXTERNALSYM IPRTRMGR_PID}
+
+ ANY_SIZE = 1;
+ {$EXTERNALSYM ANY_SIZE}
+
+//////////////////////////////////////////////////////////////////////////////
+// //
+// The following #defines are the Ids of the MIB variables made accessible //
+// to the user via MprAdminMIBXXX Apis. It will be noticed that these are //
+// not the same as RFC 1213, since the MprAdminMIBXXX APIs work on rows and //
+// groups instead of scalar variables //
+// //
+//////////////////////////////////////////////////////////////////////////////
+
+ IF_NUMBER = 0;
+ {$EXTERNALSYM IF_NUMBER}
+ IF_TABLE = IF_NUMBER + 1;
+ {$EXTERNALSYM IF_TABLE}
+ IF_ROW = IF_TABLE + 1;
+ {$EXTERNALSYM IF_ROW}
+ IP_STATS = IF_ROW + 1;
+ {$EXTERNALSYM IP_STATS}
+ IP_ADDRTABLE = IP_STATS + 1;
+ {$EXTERNALSYM IP_ADDRTABLE}
+ IP_ADDRROW = IP_ADDRTABLE + 1;
+ {$EXTERNALSYM IP_ADDRROW}
+ IP_FORWARDNUMBER = IP_ADDRROW + 1;
+ {$EXTERNALSYM IP_FORWARDNUMBER}
+ IP_FORWARDTABLE = IP_FORWARDNUMBER + 1;
+ {$EXTERNALSYM IP_FORWARDTABLE}
+ IP_FORWARDROW = IP_FORWARDTABLE + 1;
+ {$EXTERNALSYM IP_FORWARDROW}
+ IP_NETTABLE = IP_FORWARDROW + 1;
+ {$EXTERNALSYM IP_NETTABLE}
+ IP_NETROW = IP_NETTABLE + 1;
+ {$EXTERNALSYM IP_NETROW}
+ ICMP_STATS = IP_NETROW + 1;
+ {$EXTERNALSYM ICMP_STATS}
+ TCP_STATS = ICMP_STATS + 1;
+ {$EXTERNALSYM TCP_STATS}
+ TCP_TABLE = TCP_STATS + 1;
+ {$EXTERNALSYM TCP_TABLE}
+ TCP_ROW = TCP_TABLE + 1;
+ {$EXTERNALSYM TCP_ROW}
+ UDP_STATS = TCP_ROW + 1;
+ {$EXTERNALSYM UDP_STATS}
+ UDP_TABLE = UDP_STATS + 1;
+ {$EXTERNALSYM UDP_TABLE}
+ UDP_ROW = UDP_TABLE + 1;
+ {$EXTERNALSYM UDP_ROW}
+ MCAST_MFE = UDP_ROW + 1;
+ {$EXTERNALSYM MCAST_MFE}
+ MCAST_MFE_STATS = MCAST_MFE + 1;
+ {$EXTERNALSYM MCAST_MFE_STATS}
+ BEST_IF = MCAST_MFE_STATS + 1;
+ {$EXTERNALSYM BEST_IF}
+ BEST_ROUTE = BEST_IF + 1;
+ {$EXTERNALSYM BEST_ROUTE}
+ PROXY_ARP = BEST_ROUTE + 1;
+ {$EXTERNALSYM PROXY_ARP}
+ MCAST_IF_ENTRY = PROXY_ARP + 1;
+ {$EXTERNALSYM MCAST_IF_ENTRY}
+ MCAST_GLOBAL = MCAST_IF_ENTRY + 1;
+ {$EXTERNALSYM MCAST_GLOBAL}
+ IF_STATUS = MCAST_GLOBAL + 1;
+ {$EXTERNALSYM IF_STATUS}
+ MCAST_BOUNDARY = IF_STATUS + 1;
+ {$EXTERNALSYM MCAST_BOUNDARY}
+ MCAST_SCOPE = MCAST_BOUNDARY + 1;
+ {$EXTERNALSYM MCAST_SCOPE}
+ DEST_MATCHING = MCAST_SCOPE + 1;
+ {$EXTERNALSYM DEST_MATCHING}
+ DEST_LONGER = DEST_MATCHING + 1;
+ {$EXTERNALSYM DEST_LONGER}
+ DEST_SHORTER = DEST_LONGER + 1;
+ {$EXTERNALSYM DEST_SHORTER}
+ ROUTE_MATCHING = DEST_SHORTER + 1;
+ {$EXTERNALSYM ROUTE_MATCHING}
+ ROUTE_LONGER = ROUTE_MATCHING + 1;
+ {$EXTERNALSYM ROUTE_LONGER}
+ ROUTE_SHORTER = ROUTE_LONGER + 1;
+ {$EXTERNALSYM ROUTE_SHORTER}
+ ROUTE_STATE = ROUTE_SHORTER + 1;
+ {$EXTERNALSYM ROUTE_STATE}
+ MCAST_MFE_STATS_EX = ROUTE_STATE + 1;
+ {$EXTERNALSYM MCAST_MFE_STATS_EX}
+ IP6_STATS = MCAST_MFE_STATS_EX + 1;
+ {$EXTERNALSYM IP6_STATS}
+ UDP6_STATS = IP6_STATS + 1;
+ {$EXTERNALSYM UDP6_STATS}
+ TCP6_STATS = UDP6_STATS + 1;
+ {$EXTERNALSYM TCP6_STATS}
+
+ NUMBER_OF_EXPORTED_VARIABLES = TCP6_STATS + 1;
+ {$EXTERNALSYM NUMBER_OF_EXPORTED_VARIABLES}
+
+//////////////////////////////////////////////////////////////////////////////
+// //
+// MIB_OPAQUE_QUERY is the structure filled in by the user to identify a //
+// MIB variable //
+// //
+// dwVarId ID of MIB Variable (One of the Ids #defined above) //
+// dwVarIndex Variable sized array containing the indices needed to //
+// identify a variable. NOTE: Unlike SNMP we dont require that //
+// a scalar variable be indexed by 0 //
+// //
+//////////////////////////////////////////////////////////////////////////////
+
+type
+ PMIB_OPAQUE_QUERY = ^MIB_OPAQUE_QUERY;
+ {$EXTERNALSYM PMIB_OPAQUE_QUERY}
+ _MIB_OPAQUE_QUERY = record
+ dwVarId: DWORD;
+ rgdwVarIndex: array [0..ANY_SIZE - 1] of DWORD;
+ end;
+ {$EXTERNALSYM _MIB_OPAQUE_QUERY}
+ MIB_OPAQUE_QUERY = _MIB_OPAQUE_QUERY;
+ {$EXTERNALSYM MIB_OPAQUE_QUERY}
+ TMibOpaqueQuery = MIB_OPAQUE_QUERY;
+ PMibOpaqueQuery = PMIB_OPAQUE_QUERY;
+
+//////////////////////////////////////////////////////////////////////////////
+// //
+// The following are the structures which are filled in and returned to the //
+// user when a query is made, OR are filled in BY THE USER when a set is //
+// done //
+// //
+//////////////////////////////////////////////////////////////////////////////
+
+type
+ PMIB_IFNUMBER = ^MIB_IFNUMBER;
+ {$EXTERNALSYM PMIB_IFNUMBER}
+ _MIB_IFNUMBER = record
+ dwValue: DWORD;
+ end;
+ {$EXTERNALSYM _MIB_IFNUMBER}
+ MIB_IFNUMBER = _MIB_IFNUMBER;
+ {$EXTERNALSYM MIB_IFNUMBER}
+ TMibIfnumber = MIB_IFNUMBER;
+ PMibIfnumber = PMIB_IFNUMBER;
+
+const
+ MAXLEN_IFDESCR = 256;
+ {$EXTERNALSYM MAXLEN_IFDESCR}
+ MAXLEN_PHYSADDR = 8;
+ {$EXTERNALSYM MAXLEN_PHYSADDR}
+
+type
+ PMIB_IFROW = ^MIB_IFROW;
+ {$EXTERNALSYM PMIB_IFROW}
+ _MIB_IFROW = record
+ wszName: array [0..MAX_INTERFACE_NAME_LEN - 1] of WCHAR;
+ dwIndex: DWORD;
+ dwType: DWORD;
+ dwMtu: DWORD;
+ dwSpeed: DWORD;
+ dwPhysAddrLen: DWORD;
+ bPhysAddr: array [0..MAXLEN_PHYSADDR - 1] of BYTE;
+ dwAdminStatus: DWORD;
+ dwOperStatus: DWORD;
+ dwLastChange: DWORD;
+ dwInOctets: DWORD;
+ dwInUcastPkts: DWORD;
+ dwInNUcastPkts: DWORD;
+ dwInDiscards: DWORD;
+ dwInErrors: DWORD;
+ dwInUnknownProtos: DWORD;
+ dwOutOctets: DWORD;
+ dwOutUcastPkts: DWORD;
+ dwOutNUcastPkts: DWORD;
+ dwOutDiscards: DWORD;
+ dwOutErrors: DWORD;
+ dwOutQLen: DWORD;
+ dwDescrLen: DWORD;
+ bDescr: array[0..MAXLEN_IFDESCR - 1] of BYTE;
+ end;
+ {$EXTERNALSYM _MIB_IFROW}
+ MIB_IFROW = _MIB_IFROW;
+ {$EXTERNALSYM MIB_IFROW}
+ TMibIfRow = MIB_IFROW;
+ PMibIfRow = PMIB_IFROW;
+
+ PMIB_IFTABLE = ^MIB_IFTABLE;
+ {$EXTERNALSYM PMIB_IFTABLE}
+ _MIB_IFTABLE = record
+ dwNumEntries: DWORD;
+ table: array [0..ANY_SIZE - 1] of MIB_IFROW;
+ end;
+ {$EXTERNALSYM _MIB_IFTABLE}
+ MIB_IFTABLE = _MIB_IFTABLE;
+ {$EXTERNALSYM MIB_IFTABLE}
+ TMibIftable = MIB_IFTABLE;
+ PMibIftable = PMIB_IFTABLE;
+
+// #define SIZEOF_IFTABLE(X) (FIELD_OFFSET(MIB_IFTABLE,table[0]) + ((X) * sizeof(MIB_IFROW)) + ALIGN_SIZE)
+
+type
+ PMibIcmpStats = ^TMibIcmpStats;
+ _MIBICMPSTATS = record
+ dwMsgs: DWORD;
+ dwErrors: DWORD;
+ dwDestUnreachs: DWORD;
+ dwTimeExcds: DWORD;
+ dwParmProbs: DWORD;
+ dwSrcQuenchs: DWORD;
+ dwRedirects: DWORD;
+ dwEchos: DWORD;
+ dwEchoReps: DWORD;
+ dwTimestamps: DWORD;
+ dwTimestampReps: DWORD;
+ dwAddrMasks: DWORD;
+ dwAddrMaskReps: DWORD;
+ end;
+ {$EXTERNALSYM _MIBICMPSTATS}
+ MIBICMPSTATS = _MIBICMPSTATS;
+ {$EXTERNALSYM MIBICMPSTATS}
+ TMibIcmpStats = _MIBICMPSTATS;
+
+ _MIBICMPINFO = record
+ icmpInStats: MIBICMPSTATS;
+ icmpOutStats: MIBICMPSTATS;
+ end;
+ {$EXTERNALSYM _MIBICMPINFO}
+ MIBICMPINFO = _MIBICMPINFO;
+ {$EXTERNALSYM MIBICMPINFO}
+ PMIBICMPINFO = ^MIBICMPINFO;
+ {$EXTERNALSYM PMIBICMPINFO}
+ TMibIcmpInfo = MIBICMPINFO;
+
+ PMIB_ICMP = ^MIB_ICMP;
+ {$EXTERNALSYM PMIB_ICMP}
+ _MIB_ICMP = record
+ stats: MIBICMPINFO;
+ end;
+ {$EXTERNALSYM _MIB_ICMP}
+ MIB_ICMP = _MIB_ICMP;
+ {$EXTERNALSYM MIB_ICMP}
+ TMibIcmp = MIB_ICMP;
+ PMibIcmp = PMIB_ICMP;
+
+//
+// ICMPv6 Type Values from RFC 2292.
+//
+
+const
+ ICMP6_DST_UNREACH = 1;
+ {$EXTERNALSYM ICMP6_DST_UNREACH}
+ ICMP6_PACKET_TOO_BIG = 2;
+ {$EXTERNALSYM ICMP6_PACKET_TOO_BIG}
+ ICMP6_TIME_EXCEEDED = 3;
+ {$EXTERNALSYM ICMP6_TIME_EXCEEDED}
+ ICMP6_PARAM_PROB = 4;
+ {$EXTERNALSYM ICMP6_PARAM_PROB}
+ ICMP6_ECHO_REQUEST = 128;
+ {$EXTERNALSYM ICMP6_ECHO_REQUEST}
+ ICMP6_ECHO_REPLY = 129;
+ {$EXTERNALSYM ICMP6_ECHO_REPLY}
+ ICMP6_MEMBERSHIP_QUERY = 130;
+ {$EXTERNALSYM ICMP6_MEMBERSHIP_QUERY}
+ ICMP6_MEMBERSHIP_REPORT = 131;
+ {$EXTERNALSYM ICMP6_MEMBERSHIP_REPORT}
+ ICMP6_MEMBERSHIP_REDUCTION = 132;
+ {$EXTERNALSYM ICMP6_MEMBERSHIP_REDUCTION}
+ ND_ROUTER_SOLICIT = 133;
+ {$EXTERNALSYM ND_ROUTER_SOLICIT}
+ ND_ROUTER_ADVERT = 134;
+ {$EXTERNALSYM ND_ROUTER_ADVERT}
+ ND_NEIGHBOR_SOLICIT = 135;
+ {$EXTERNALSYM ND_NEIGHBOR_SOLICIT}
+ ND_NEIGHBOR_ADVERT = 136;
+ {$EXTERNALSYM ND_NEIGHBOR_ADVERT}
+ ND_REDIRECT = 137;
+ {$EXTERNALSYM ND_REDIRECT}
+
+type
+ ICMP6_TYPE = DWORD;
+ {$EXTERNALSYM ICMP6_TYPE}
+ PICMP6_TYPE = ^ICMP6_TYPE;
+ {$EXTERNALSYM PICMP6_TYPE}
+ TIcmp6Type = ICMP6_TYPE;
+ PIcmp6Type = PICMP6_TYPE;
+
+//
+// There are no RFC-specified defines for ICMPv4 message types, so we try to
+// use the ICMP6 values from RFC 2292 modified to be prefixed with ICMP4.
+//
+
+const
+ ICMP4_ECHO_REPLY = 0; // Echo Reply
+ {$EXTERNALSYM ICMP4_ECHO_REPLY}
+ ICMP4_DST_UNREACH = 3; // Destination Unreachable
+ {$EXTERNALSYM ICMP4_DST_UNREACH}
+ ICMP4_SOURCE_QUENCH = 4; // Source Quench
+ {$EXTERNALSYM ICMP4_SOURCE_QUENCH}
+ ICMP4_REDIRECT = 5; // Redirect
+ {$EXTERNALSYM ICMP4_REDIRECT}
+ ICMP4_ECHO_REQUEST = 8; // Echo Request
+ {$EXTERNALSYM ICMP4_ECHO_REQUEST}
+ ICMP4_ROUTER_ADVERT = 9; // Router Advertisement
+ {$EXTERNALSYM ICMP4_ROUTER_ADVERT}
+ ICMP4_ROUTER_SOLICIT = 10; // Router Solicitation
+ {$EXTERNALSYM ICMP4_ROUTER_SOLICIT}
+ ICMP4_TIME_EXCEEDED = 11; // Time Exceeded
+ {$EXTERNALSYM ICMP4_TIME_EXCEEDED}
+ ICMP4_PARAM_PROB = 12; // Parameter Problem
+ {$EXTERNALSYM ICMP4_PARAM_PROB}
+ ICMP4_TIMESTAMP_REQUEST = 13; // Timestamp Request
+ {$EXTERNALSYM ICMP4_TIMESTAMP_REQUEST}
+ ICMP4_TIMESTAMP_REPLY = 14; // Timestamp Reply
+ {$EXTERNALSYM ICMP4_TIMESTAMP_REPLY}
+ ICMP4_MASK_REQUEST = 17; // Address Mask Request
+ {$EXTERNALSYM ICMP4_MASK_REQUEST}
+ ICMP4_MASK_REPLY = 18; // Address Mask Reply
+ {$EXTERNALSYM ICMP4_MASK_REPLY}
+
+type
+ ICMP4_TYPE = DWORD;
+ {$EXTERNALSYM ICMP4_TYPE}
+ PICMP4_TYPE = ^ICMP4_TYPE;
+ {$EXTERNALSYM PICMP4_TYPE}
+ TIcmp4Type = ICMP4_TYPE;
+ PIcmp4Type = PICMP4_TYPE;
+
+ _MIBICMPSTATS_EX = record
+ dwMsgs: DWORD;
+ dwErrors: DWORD;
+ rgdwTypeCount: array [0..255] of DWORD;
+ end;
+ {$EXTERNALSYM _MIBICMPSTATS_EX}
+ MIBICMPSTATS_EX = _MIBICMPSTATS_EX;
+ {$EXTERNALSYM MIBICMPSTATS_EX}
+ PMIBICMPSTATS_EX = ^MIBICMPSTATS_EX;
+ {$EXTERNALSYM PMIBICMPSTATS_EX}
+ TMibIcmpStatsEx = MIBICMPSTATS_EX;
+ PMibIcmpStatsEx = PMIBICMPSTATS_EX;
+
+ _MIB_ICMP_EX = record
+ icmpInStats: MIBICMPSTATS_EX;
+ icmpOutStats: MIBICMPSTATS_EX;
+ end;
+ {$EXTERNALSYM _MIB_ICMP_EX}
+ MIB_ICMP_EX = _MIB_ICMP_EX;
+ {$EXTERNALSYM MIB_ICMP_EX}
+ PMIB_ICMP_EX = ^MIB_ICMP_EX;
+ {$EXTERNALSYM PMIB_ICMP_EX}
+ TMibIcmpEx = MIB_ICMP_EX;
+ PMibIcmpEx = PMIB_ICMP_EX;
+
+ PMIB_UDPSTATS = ^MIB_UDPSTATS;
+ {$EXTERNALSYM PMIB_UDPSTATS}
+ _MIB_UDPSTATS = record
+ dwInDatagrams: DWORD;
+ dwNoPorts: DWORD;
+ dwInErrors: DWORD;
+ dwOutDatagrams: DWORD;
+ dwNumAddrs: DWORD;
+ end;
+ {$EXTERNALSYM _MIB_UDPSTATS}
+ MIB_UDPSTATS = _MIB_UDPSTATS;
+ {$EXTERNALSYM MIB_UDPSTATS}
+ TMibUdpStats = MIB_UDPSTATS;
+ PMibUdpStats = PMIB_UDPSTATS;
+
+ PMIB_UDPROW = ^MIB_UDPROW;
+ {$EXTERNALSYM PMIB_UDPROW}
+ _MIB_UDPROW = record
+ dwLocalAddr: DWORD;
+ dwLocalPort: DWORD;
+ end;
+ {$EXTERNALSYM _MIB_UDPROW}
+ MIB_UDPROW = _MIB_UDPROW;
+ {$EXTERNALSYM MIB_UDPROW}
+ TMibUdpRow = MIB_UDPROW;
+ PMibUdpRow = PMIB_UDPROW;
+
+ PMIB_UDPTABLE = ^MIB_UDPTABLE;
+ {$EXTERNALSYM PMIB_UDPTABLE}
+ _MIB_UDPTABLE = record
+ dwNumEntries: DWORD;
+ table: array [0..ANY_SIZE - 1] of MIB_UDPROW;
+ end;
+ {$EXTERNALSYM _MIB_UDPTABLE}
+ MIB_UDPTABLE = _MIB_UDPTABLE;
+ {$EXTERNALSYM MIB_UDPTABLE}
+ TMibUdpTable = MIB_UDPTABLE;
+ PMibUdpTable = PMIB_UDPTABLE;
+
+// #define SIZEOF_UDPTABLE(X) (FIELD_OFFSET(MIB_UDPTABLE, table[0]) + ((X) * sizeof(MIB_UDPROW)) + ALIGN_SIZE)
+
+ PMIB_TCPSTATS = ^MIB_TCPSTATS;
+ {$EXTERNALSYM PMIB_TCPSTATS}
+ _MIB_TCPSTATS = record
+ dwRtoAlgorithm: DWORD;
+ dwRtoMin: DWORD;
+ dwRtoMax: DWORD;
+ dwMaxConn: DWORD;
+ dwActiveOpens: DWORD;
+ dwPassiveOpens: DWORD;
+ dwAttemptFails: DWORD;
+ dwEstabResets: DWORD;
+ dwCurrEstab: DWORD;
+ dwInSegs: DWORD;
+ dwOutSegs: DWORD;
+ dwRetransSegs: DWORD;
+ dwInErrs: DWORD;
+ dwOutRsts: DWORD;
+ dwNumConns: DWORD;
+ end;
+ {$EXTERNALSYM _MIB_TCPSTATS}
+ MIB_TCPSTATS = _MIB_TCPSTATS;
+ {$EXTERNALSYM MIB_TCPSTATS}
+ TMibTcpStats = MIB_TCPSTATS;
+ PMibTcpStats = PMIB_TCPSTATS;
+
+const
+ MIB_TCP_RTO_OTHER = 1;
+ {$EXTERNALSYM MIB_TCP_RTO_OTHER}
+ MIB_TCP_RTO_CONSTANT = 2;
+ {$EXTERNALSYM MIB_TCP_RTO_CONSTANT}
+ MIB_TCP_RTO_RSRE = 3;
+ {$EXTERNALSYM MIB_TCP_RTO_RSRE}
+ MIB_TCP_RTO_VANJ = 4;
+ {$EXTERNALSYM MIB_TCP_RTO_VANJ}
+
+ MIB_TCP_MAXCONN_DYNAMIC = DWORD(-1);
+ {$EXTERNALSYM MIB_TCP_MAXCONN_DYNAMIC}
+
+type
+ PMIB_TCPROW = ^MIB_TCPROW;
+ {$EXTERNALSYM PMIB_TCPROW}
+ _MIB_TCPROW = record
+ dwState: DWORD;
+ dwLocalAddr: DWORD;
+ dwLocalPort: DWORD;
+ dwRemoteAddr: DWORD;
+ dwRemotePort: DWORD;
+ end;
+ {$EXTERNALSYM _MIB_TCPROW}
+ MIB_TCPROW = _MIB_TCPROW;
+ {$EXTERNALSYM MIB_TCPROW}
+ TMibTcpRow = MIB_TCPROW;
+ PMibTcpRow = PMIB_TCPROW;
+
+const
+ MIB_TCP_STATE_CLOSED = 1;
+ {$EXTERNALSYM MIB_TCP_STATE_CLOSED}
+ MIB_TCP_STATE_LISTEN = 2;
+ {$EXTERNALSYM MIB_TCP_STATE_LISTEN}
+ MIB_TCP_STATE_SYN_SENT = 3;
+ {$EXTERNALSYM MIB_TCP_STATE_SYN_SENT}
+ MIB_TCP_STATE_SYN_RCVD = 4;
+ {$EXTERNALSYM MIB_TCP_STATE_SYN_RCVD}
+ MIB_TCP_STATE_ESTAB = 5;
+ {$EXTERNALSYM MIB_TCP_STATE_ESTAB}
+ MIB_TCP_STATE_FIN_WAIT1 = 6;
+ {$EXTERNALSYM MIB_TCP_STATE_FIN_WAIT1}
+ MIB_TCP_STATE_FIN_WAIT2 = 7;
+ {$EXTERNALSYM MIB_TCP_STATE_FIN_WAIT2}
+ MIB_TCP_STATE_CLOSE_WAIT = 8;
+ {$EXTERNALSYM MIB_TCP_STATE_CLOSE_WAIT}
+ MIB_TCP_STATE_CLOSING = 9;
+ {$EXTERNALSYM MIB_TCP_STATE_CLOSING}
+ MIB_TCP_STATE_LAST_ACK = 10;
+ {$EXTERNALSYM MIB_TCP_STATE_LAST_ACK}
+ MIB_TCP_STATE_TIME_WAIT = 11;
+ {$EXTERNALSYM MIB_TCP_STATE_TIME_WAIT}
+ MIB_TCP_STATE_DELETE_TCB = 12;
+ {$EXTERNALSYM MIB_TCP_STATE_DELETE_TCB}
+
+type
+ PMIB_TCPTABLE = ^MIB_TCPTABLE;
+ {$EXTERNALSYM PMIB_TCPTABLE}
+ _MIB_TCPTABLE = record
+ dwNumEntries: DWORD;
+ table: array [0..ANY_SIZE - 1] of MIB_TCPROW;
+ end;
+ {$EXTERNALSYM _MIB_TCPTABLE}
+ MIB_TCPTABLE = _MIB_TCPTABLE;
+ {$EXTERNALSYM MIB_TCPTABLE}
+ TMibTcpTable = MIB_TCPTABLE;
+ PMibTcpTable = PMIB_TCPTABLE;
+
+// #define SIZEOF_TCPTABLE(X) (FIELD_OFFSET(MIB_TCPTABLE,table[0]) + ((X) * sizeof(MIB_TCPROW)) + ALIGN_SIZE)
+
+const
+ MIB_USE_CURRENT_TTL = DWORD(-1);
+ {$EXTERNALSYM MIB_USE_CURRENT_TTL}
+ MIB_USE_CURRENT_FORWARDING = DWORD(-1);
+ {$EXTERNALSYM MIB_USE_CURRENT_FORWARDING}
+
+type
+ PMIB_IPSTATS = ^MIB_IPSTATS;
+ {$EXTERNALSYM PMIB_IPSTATS}
+ _MIB_IPSTATS = record
+ dwForwarding: DWORD;
+ dwDefaultTTL: DWORD;
+ dwInReceives: DWORD;
+ dwInHdrErrors: DWORD;
+ dwInAddrErrors: DWORD;
+ dwForwDatagrams: DWORD;
+ dwInUnknownProtos: DWORD;
+ dwInDiscards: DWORD;
+ dwInDelivers: DWORD;
+ dwOutRequests: DWORD;
+ dwRoutingDiscards: DWORD;
+ dwOutDiscards: DWORD;
+ dwOutNoRoutes: DWORD;
+ dwReasmTimeout: DWORD;
+ dwReasmReqds: DWORD;
+ dwReasmOks: DWORD;
+ dwReasmFails: DWORD;
+ dwFragOks: DWORD;
+ dwFragFails: DWORD;
+ dwFragCreates: DWORD;
+ dwNumIf: DWORD;
+ dwNumAddr: DWORD;
+ dwNumRoutes: DWORD;
+ end;
+ {$EXTERNALSYM _MIB_IPSTATS}
+ MIB_IPSTATS = _MIB_IPSTATS;
+ {$EXTERNALSYM MIB_IPSTATS}
+ TMibIpStats = MIB_IPSTATS;
+ PMibIpStats = PMIB_IPSTATS;
+
+const
+ MIB_IP_FORWARDING = 1;
+ {$EXTERNALSYM MIB_IP_FORWARDING}
+ MIB_IP_NOT_FORWARDING = 2;
+ {$EXTERNALSYM MIB_IP_NOT_FORWARDING}
+
+// Note: These addr types have dependency on ipdef.h
+
+ MIB_IPADDR_PRIMARY = $0001; // Primary ipaddr
+ {$EXTERNALSYM MIB_IPADDR_PRIMARY}
+ MIB_IPADDR_DYNAMIC = $0004; // Dynamic ipaddr
+ {$EXTERNALSYM MIB_IPADDR_DYNAMIC}
+ MIB_IPADDR_DISCONNECTED = $0008; // Address is on disconnected interface
+ {$EXTERNALSYM MIB_IPADDR_DISCONNECTED}
+ MIB_IPADDR_DELETED = $0040; // Address being deleted
+ {$EXTERNALSYM MIB_IPADDR_DELETED}
+ MIB_IPADDR_TRANSIENT = $0080; // Transient address
+ {$EXTERNALSYM MIB_IPADDR_TRANSIENT}
+
+type
+ PMIB_IPADDRROW = ^MIB_IPADDRROW;
+ {$EXTERNALSYM PMIB_IPADDRROW}
+ _MIB_IPADDRROW = record
+ dwAddr: DWORD;
+ dwIndex: DWORD;
+ dwMask: DWORD;
+ dwBCastAddr: DWORD;
+ dwReasmSize: DWORD;
+ unused1: Word;
+ wType: Word;
+ end;
+ {$EXTERNALSYM _MIB_IPADDRROW}
+ MIB_IPADDRROW = _MIB_IPADDRROW;
+ {$EXTERNALSYM MIB_IPADDRROW}
+ TMibIpAddrRow = MIB_IPADDRROW;
+ PMibIpAddrRow = PMIB_IPADDRROW;
+
+ PMIB_IPADDRTABLE = ^MIB_IPADDRTABLE;
+ {$EXTERNALSYM PMIB_IPADDRTABLE}
+ _MIB_IPADDRTABLE = record
+ dwNumEntries: DWORD;
+ table: array [0..ANY_SIZE - 1] of MIB_IPADDRROW;
+ end;
+ {$EXTERNALSYM _MIB_IPADDRTABLE}
+ MIB_IPADDRTABLE = _MIB_IPADDRTABLE;
+ {$EXTERNALSYM MIB_IPADDRTABLE}
+ TMibIpAddrTable = _MIB_IPADDRTABLE;
+ PMibIpAddrTable = PMIB_IPADDRTABLE;
+
+// #define SIZEOF_IPADDRTABLE(X) (FIELD_OFFSET(MIB_IPADDRTABLE,table[0]) + ((X) * sizeof(MIB_IPADDRROW)) + ALIGN_SIZE)
+
+type
+ PMIB_IPFORWARDNUMBER = ^MIB_IPFORWARDNUMBER;
+ {$EXTERNALSYM PMIB_IPFORWARDNUMBER}
+ _MIB_IPFORWARDNUMBER = record
+ dwValue: DWORD;
+ end;
+ {$EXTERNALSYM _MIB_IPFORWARDNUMBER}
+ MIB_IPFORWARDNUMBER = _MIB_IPFORWARDNUMBER;
+ {$EXTERNALSYM MIB_IPFORWARDNUMBER}
+ TMibIpForwardNumber = MIB_IPFORWARDNUMBER;
+ PMibIpForwardNumber = PMIB_IPFORWARDNUMBER;
+
+ PMIB_IPFORWARDROW = ^MIB_IPFORWARDROW;
+ {$EXTERNALSYM PMIB_IPFORWARDROW}
+ _MIB_IPFORWARDROW = record
+ dwForwardDest: DWORD;
+ dwForwardMask: DWORD;
+ dwForwardPolicy: DWORD;
+ dwForwardNextHop: DWORD;
+ dwForwardIfIndex: DWORD;
+ dwForwardType: DWORD;
+ dwForwardProto: DWORD;
+ dwForwardAge: DWORD;
+ dwForwardNextHopAS: DWORD;
+ dwForwardMetric1: DWORD;
+ dwForwardMetric2: DWORD;
+ dwForwardMetric3: DWORD;
+ dwForwardMetric4: DWORD;
+ dwForwardMetric5: DWORD;
+ end;
+ {$EXTERNALSYM _MIB_IPFORWARDROW}
+ MIB_IPFORWARDROW = _MIB_IPFORWARDROW;
+ {$EXTERNALSYM MIB_IPFORWARDROW}
+ TMibIpForwardRow = MIB_IPFORWARDROW;
+ PMibIpForwardRow = PMIB_IPFORWARDROW;
+
+const
+ MIB_IPROUTE_TYPE_OTHER = 1;
+ {$EXTERNALSYM MIB_IPROUTE_TYPE_OTHER}
+ MIB_IPROUTE_TYPE_INVALID = 2;
+ {$EXTERNALSYM MIB_IPROUTE_TYPE_INVALID}
+ MIB_IPROUTE_TYPE_DIRECT = 3;
+ {$EXTERNALSYM MIB_IPROUTE_TYPE_DIRECT}
+ MIB_IPROUTE_TYPE_INDIRECT = 4;
+ {$EXTERNALSYM MIB_IPROUTE_TYPE_INDIRECT}
+
+ MIB_IPROUTE_METRIC_UNUSED = DWORD(-1);
+ {$EXTERNALSYM MIB_IPROUTE_METRIC_UNUSED}
+
+//
+// THESE MUST MATCH the ids in routprot.h
+//
+
+const
+ MIB_IPPROTO_OTHER = 1;
+ {$EXTERNALSYM MIB_IPPROTO_OTHER}
+ MIB_IPPROTO_LOCAL = 2;
+ {$EXTERNALSYM MIB_IPPROTO_LOCAL}
+ MIB_IPPROTO_NETMGMT = 3;
+ {$EXTERNALSYM MIB_IPPROTO_NETMGMT}
+ MIB_IPPROTO_ICMP = 4;
+ {$EXTERNALSYM MIB_IPPROTO_ICMP}
+ MIB_IPPROTO_EGP = 5;
+ {$EXTERNALSYM MIB_IPPROTO_EGP}
+ MIB_IPPROTO_GGP = 6;
+ {$EXTERNALSYM MIB_IPPROTO_GGP}
+ MIB_IPPROTO_HELLO = 7;
+ {$EXTERNALSYM MIB_IPPROTO_HELLO}
+ MIB_IPPROTO_RIP = 8;
+ {$EXTERNALSYM MIB_IPPROTO_RIP}
+ MIB_IPPROTO_IS_IS = 9;
+ {$EXTERNALSYM MIB_IPPROTO_IS_IS}
+ MIB_IPPROTO_ES_IS = 10;
+ {$EXTERNALSYM MIB_IPPROTO_ES_IS}
+ MIB_IPPROTO_CISCO = 11;
+ {$EXTERNALSYM MIB_IPPROTO_CISCO}
+ MIB_IPPROTO_BBN = 12;
+ {$EXTERNALSYM MIB_IPPROTO_BBN}
+ MIB_IPPROTO_OSPF = 13;
+ {$EXTERNALSYM MIB_IPPROTO_OSPF}
+ MIB_IPPROTO_BGP = 14;
+ {$EXTERNALSYM MIB_IPPROTO_BGP}
+
+ MIB_IPPROTO_NT_AUTOSTATIC = 10002;
+ {$EXTERNALSYM MIB_IPPROTO_NT_AUTOSTATIC}
+ MIB_IPPROTO_NT_STATIC = 10006;
+ {$EXTERNALSYM MIB_IPPROTO_NT_STATIC}
+ MIB_IPPROTO_NT_STATIC_NON_DOD = 10007;
+ {$EXTERNALSYM MIB_IPPROTO_NT_STATIC_NON_DOD}
+
+type
+ PMIB_IPFORWARDTABLE = ^MIB_IPFORWARDTABLE;
+ {$EXTERNALSYM PMIB_IPFORWARDTABLE}
+ _MIB_IPFORWARDTABLE = record
+ dwNumEntries: DWORD;
+ table: array [0..ANY_SIZE - 1] of MIB_IPFORWARDROW;
+ end;
+ {$EXTERNALSYM _MIB_IPFORWARDTABLE}
+ MIB_IPFORWARDTABLE = _MIB_IPFORWARDTABLE;
+ {$EXTERNALSYM MIB_IPFORWARDTABLE}
+ TMibIpForwardTable = MIB_IPFORWARDTABLE;
+ PMibIpForwardTable = PMIB_IPFORWARDTABLE;
+
+// #define SIZEOF_IPFORWARDTABLE(X) (FIELD_OFFSET(MIB_IPFORWARDTABLE,table[0]) + ((X) * sizeof(MIB_IPFORWARDROW)) + ALIGN_SIZE)
+
+type
+ PMIB_IPNETROW = ^MIB_IPNETROW;
+ {$EXTERNALSYM PMIB_IPNETROW}
+ _MIB_IPNETROW = record
+ dwIndex: DWORD;
+ dwPhysAddrLen: DWORD;
+ bPhysAddr: array [0..MAXLEN_PHYSADDR - 1] of BYTE;
+ dwAddr: DWORD;
+ dwType: DWORD;
+ end;
+ {$EXTERNALSYM _MIB_IPNETROW}
+ MIB_IPNETROW = _MIB_IPNETROW;
+ {$EXTERNALSYM MIB_IPNETROW}
+ TMibIpNetRow = MIB_IPNETROW;
+ PMibIpNetRow = PMIB_IPNETROW;
+
+const
+ MIB_IPNET_TYPE_OTHER = 1;
+ {$EXTERNALSYM MIB_IPNET_TYPE_OTHER}
+ MIB_IPNET_TYPE_INVALID = 2;
+ {$EXTERNALSYM MIB_IPNET_TYPE_INVALID}
+ MIB_IPNET_TYPE_DYNAMIC = 3;
+ {$EXTERNALSYM MIB_IPNET_TYPE_DYNAMIC}
+ MIB_IPNET_TYPE_STATIC = 4;
+ {$EXTERNALSYM MIB_IPNET_TYPE_STATIC}
+
+type
+ PMIB_IPNETTABLE = ^MIB_IPNETTABLE;
+ {$EXTERNALSYM PMIB_IPNETTABLE}
+ _MIB_IPNETTABLE = record
+ dwNumEntries: DWORD;
+ table: array [0..ANY_SIZE - 1] of MIB_IPNETROW;
+ end;
+ {$EXTERNALSYM _MIB_IPNETTABLE}
+ MIB_IPNETTABLE = _MIB_IPNETTABLE;
+ {$EXTERNALSYM MIB_IPNETTABLE}
+ TMibIpNetTable = MIB_IPNETTABLE;
+ PMibIpNetTable = PMIB_IPNETTABLE;
+
+// #define SIZEOF_IPNETTABLE(X) (FIELD_OFFSET(MIB_IPNETTABLE, table[0]) + ((X) * sizeof(MIB_IPNETROW)) + ALIGN_SIZE)
+
+type
+ PMIB_IPMCAST_OIF = ^MIB_IPMCAST_OIF;
+ {$EXTERNALSYM PMIB_IPMCAST_OIF}
+ _MIB_IPMCAST_OIF = record
+ dwOutIfIndex: DWORD;
+ dwNextHopAddr: DWORD;
+ dwReserved: DWORD;
+ dwReserved1: DWORD;
+ end;
+ {$EXTERNALSYM _MIB_IPMCAST_OIF}
+ MIB_IPMCAST_OIF = _MIB_IPMCAST_OIF;
+ {$EXTERNALSYM MIB_IPMCAST_OIF}
+ TMibIpmCastOif = MIB_IPMCAST_OIF;
+ PMibIpmCastOif = PMIB_IPMCAST_OIF;
+
+ PMIB_IPMCAST_MFE = ^MIB_IPMCAST_MFE;
+ {$EXTERNALSYM PMIB_IPMCAST_MFE}
+ _MIB_IPMCAST_MFE = record
+ dwGroup: DWORD;
+ dwSource: DWORD;
+ dwSrcMask: DWORD;
+ dwUpStrmNgbr: DWORD;
+ dwInIfIndex: DWORD;
+ dwInIfProtocol: DWORD;
+ dwRouteProtocol: DWORD;
+ dwRouteNetwork: DWORD;
+ dwRouteMask: DWORD;
+ ulUpTime: ULONG;
+ ulExpiryTime: ULONG;
+ ulTimeOut: ULONG;
+ ulNumOutIf: ULONG;
+ fFlags: DWORD;
+ dwReserved: DWORD;
+ rgmioOutInfo: array [0..ANY_SIZE - 1] of MIB_IPMCAST_OIF;
+ end;
+ {$EXTERNALSYM _MIB_IPMCAST_MFE}
+ MIB_IPMCAST_MFE = _MIB_IPMCAST_MFE;
+ {$EXTERNALSYM MIB_IPMCAST_MFE}
+ TMibIpmCastMfe = MIB_IPMCAST_MFE;
+ PMibIpmCastMfe = PMIB_IPMCAST_MFE;
+
+ PMIB_MFE_TABLE = ^MIB_MFE_TABLE;
+ {$EXTERNALSYM PMIB_MFE_TABLE}
+ _MIB_MFE_TABLE = record
+ dwNumEntries: DWORD;
+ table: array [0..ANY_SIZE - 1] of MIB_IPMCAST_MFE;
+ end;
+ {$EXTERNALSYM _MIB_MFE_TABLE}
+ MIB_MFE_TABLE = _MIB_MFE_TABLE;
+ {$EXTERNALSYM MIB_MFE_TABLE}
+ TMibMfeTable = MIB_MFE_TABLE;
+ PMibMfeTable = PMIB_MFE_TABLE;
+
+// #define SIZEOF_BASIC_MIB_MFE \
+// (ULONG)(FIELD_OFFSET(MIB_IPMCAST_MFE, rgmioOutInfo[0]))
+
+// #define SIZEOF_MIB_MFE(X) \
+// (SIZEOF_BASIC_MIB_MFE + ((X) * sizeof(MIB_IPMCAST_OIF)))
+
+type
+ PMIB_IPMCAST_OIF_STATS = ^MIB_IPMCAST_OIF_STATS;
+ {$EXTERNALSYM PMIB_IPMCAST_OIF_STATS}
+ _MIB_IPMCAST_OIF_STATS = record
+ dwOutIfIndex: DWORD;
+ dwNextHopAddr: DWORD;
+ dwDialContext: DWORD;
+ ulTtlTooLow: ULONG;
+ ulFragNeeded: ULONG;
+ ulOutPackets: ULONG;
+ ulOutDiscards: ULONG;
+ end;
+ {$EXTERNALSYM _MIB_IPMCAST_OIF_STATS}
+ MIB_IPMCAST_OIF_STATS = _MIB_IPMCAST_OIF_STATS;
+ {$EXTERNALSYM MIB_IPMCAST_OIF_STATS}
+ TMibIpmCastOifStats = MIB_IPMCAST_OIF_STATS;
+ PMibIpmCastOifStats = PMIB_IPMCAST_OIF_STATS;
+
+ PMIB_IPMCAST_MFE_STATS = ^MIB_IPMCAST_MFE_STATS;
+ {$EXTERNALSYM PMIB_IPMCAST_MFE_STATS}
+ _MIB_IPMCAST_MFE_STATS = record
+ dwGroup: DWORD;
+ dwSource: DWORD;
+ dwSrcMask: DWORD;
+ dwUpStrmNgbr: DWORD;
+ dwInIfIndex: DWORD;
+ dwInIfProtocol: DWORD;
+ dwRouteProtocol: DWORD;
+ dwRouteNetwork: DWORD;
+ dwRouteMask: DWORD;
+ ulUpTime: ULONG;
+ ulExpiryTime: ULONG;
+ ulNumOutIf: ULONG;
+ ulInPkts: ULONG;
+ ulInOctets: ULONG;
+ ulPktsDifferentIf: ULONG;
+ ulQueueOverflow: ULONG;
+ rgmiosOutStats: array [0..ANY_SIZE - 1] of MIB_IPMCAST_OIF_STATS;
+ end;
+ {$EXTERNALSYM _MIB_IPMCAST_MFE_STATS}
+ MIB_IPMCAST_MFE_STATS = _MIB_IPMCAST_MFE_STATS;
+ {$EXTERNALSYM MIB_IPMCAST_MFE_STATS}
+ TMibIpmCastMfeStats = MIB_IPMCAST_MFE_STATS;
+ PMibIpmCastMfeStats = PMIB_IPMCAST_MFE_STATS;
+
+ PMIB_MFE_STATS_TABLE = ^MIB_MFE_STATS_TABLE;
+ {$EXTERNALSYM PMIB_MFE_STATS_TABLE}
+ _MIB_MFE_STATS_TABLE = record
+ dwNumEntries: DWORD;
+ table: array [0..ANY_SIZE - 1] of MIB_IPMCAST_MFE_STATS;
+ end;
+ {$EXTERNALSYM _MIB_MFE_STATS_TABLE}
+ MIB_MFE_STATS_TABLE = _MIB_MFE_STATS_TABLE;
+ {$EXTERNALSYM MIB_MFE_STATS_TABLE}
+ TMibMfeStatsTable = MIB_MFE_STATS_TABLE;
+ PMibMfeStatsTable = PMIB_MFE_STATS_TABLE;
+
+// #define SIZEOF_BASIC_MIB_MFE_STATS \
+// (ULONG)(FIELD_OFFSET(MIB_IPMCAST_MFE_STATS, rgmiosOutStats[0]))
+
+// #define SIZEOF_MIB_MFE_STATS(X) \
+// (SIZEOF_BASIC_MIB_MFE_STATS + ((X) * sizeof(MIB_IPMCAST_OIF_STATS)))
+
+type
+ _MIB_IPMCAST_MFE_STATS_EX = record
+ dwGroup: DWORD;
+ dwSource: DWORD;
+ dwSrcMask: DWORD;
+ dwUpStrmNgbr: DWORD;
+ dwInIfIndex: DWORD;
+ dwInIfProtocol: DWORD;
+ dwRouteProtocol: DWORD;
+ dwRouteNetwork: DWORD;
+ dwRouteMask: DWORD;
+ ulUpTime: ULONG;
+ ulExpiryTime: ULONG;
+ ulNumOutIf: ULONG;
+ ulInPkts: ULONG;
+ ulInOctets: ULONG;
+ ulPktsDifferentIf: ULONG;
+ ulQueueOverflow: ULONG;
+ ulUninitMfe: ULONG;
+ ulNegativeMfe: ULONG;
+ ulInDiscards: ULONG;
+ ulInHdrErrors: ULONG;
+ ulTotalOutPackets: ULONG;
+
+ rgmiosOutStats: array [0..ANY_SIZE - 1] of MIB_IPMCAST_OIF_STATS;
+ end;
+ {$EXTERNALSYM _MIB_IPMCAST_MFE_STATS_EX}
+ MIB_IPMCAST_MFE_STATS_EX = _MIB_IPMCAST_MFE_STATS_EX;
+ {$EXTERNALSYM MIB_IPMCAST_MFE_STATS_EX}
+ PMIB_IPMCAST_MFE_STATS_EX = ^MIB_IPMCAST_MFE_STATS_EX;
+ {$EXTERNALSYM PMIB_IPMCAST_MFE_STATS_EX}
+ TMibIpMCastMfeStatsEx = MIB_IPMCAST_MFE_STATS_EX;
+ PMibIpMCastMfeStatsEx = PMIB_IPMCAST_MFE_STATS_EX;
+
+ _MIB_MFE_STATS_TABLE_EX = record
+ dwNumEntries: DWORD;
+ table: array [0..ANY_SIZE - 1] of MIB_IPMCAST_MFE_STATS_EX;
+ end;
+ {$EXTERNALSYM _MIB_MFE_STATS_TABLE_EX}
+ MIB_MFE_STATS_TABLE_EX = _MIB_MFE_STATS_TABLE_EX;
+ {$EXTERNALSYM MIB_MFE_STATS_TABLE_EX}
+ PMIB_MFE_STATS_TABLE_EX = ^MIB_MFE_STATS_TABLE_EX;
+ {$EXTERNALSYM PMIB_MFE_STATS_TABLE_EX}
+ TMibMfeStatsTableEx = MIB_MFE_STATS_TABLE_EX;
+ PMibMfeStatsTableEx = PMIB_MFE_STATS_TABLE_EX;
+
+//#define SIZEOF_BASIC_MIB_MFE_STATS_EX \
+// (ULONG)(FIELD_OFFSET(MIB_IPMCAST_MFE_STATS_EX, rgmiosOutStats[0]))
+
+//#define SIZEOF_MIB_MFE_STATS_EX(X) \
+// (SIZEOF_BASIC_MIB_MFE_STATS_EX + ((X) * sizeof(MIB_IPMCAST_OIF_STATS)))
+
+type
+ PMIB_IPMCAST_GLOBAL = ^MIB_IPMCAST_GLOBAL;
+ {$EXTERNALSYM PMIB_IPMCAST_GLOBAL}
+ _MIB_IPMCAST_GLOBAL = record
+ dwEnable: DWORD;
+ end;
+ {$EXTERNALSYM _MIB_IPMCAST_GLOBAL}
+ MIB_IPMCAST_GLOBAL = _MIB_IPMCAST_GLOBAL;
+ {$EXTERNALSYM MIB_IPMCAST_GLOBAL}
+ TMibIpmCastGlobal = MIB_IPMCAST_GLOBAL;
+ PMibIpmCastGlobal = PMIB_IPMCAST_GLOBAL;
+
+ PMIB_IPMCAST_IF_ENTRY = ^MIB_IPMCAST_IF_ENTRY;
+ {$EXTERNALSYM PMIB_IPMCAST_IF_ENTRY}
+ _MIB_IPMCAST_IF_ENTRY = record
+ dwIfIndex: DWORD;
+ dwTtl: DWORD;
+ dwProtocol: DWORD;
+ dwRateLimit: DWORD;
+ ulInMcastOctets: ULONG;
+ ulOutMcastOctets: ULONG;
+ end;
+ {$EXTERNALSYM _MIB_IPMCAST_IF_ENTRY}
+ MIB_IPMCAST_IF_ENTRY = _MIB_IPMCAST_IF_ENTRY;
+ {$EXTERNALSYM MIB_IPMCAST_IF_ENTRY}
+ TMibIpmCastIfEntry = MIB_IPMCAST_IF_ENTRY;
+ PMibIpmCastIfEntry = PMIB_IPMCAST_IF_ENTRY;
+
+ PMIB_IPMCAST_IF_TABLE = ^MIB_IPMCAST_IF_TABLE;
+ {$EXTERNALSYM PMIB_IPMCAST_IF_TABLE}
+ _MIB_IPMCAST_IF_TABLE = record
+ dwNumEntries: DWORD;
+ table: array [0..ANY_SIZE - 1] of MIB_IPMCAST_IF_ENTRY;
+ end;
+ {$EXTERNALSYM _MIB_IPMCAST_IF_TABLE}
+ MIB_IPMCAST_IF_TABLE = _MIB_IPMCAST_IF_TABLE;
+ {$EXTERNALSYM MIB_IPMCAST_IF_TABLE}
+ TMibIpmCastIfTable = MIB_IPMCAST_IF_TABLE;
+ PMibIpmCastIfTable = PMIB_IPMCAST_IF_TABLE;
+
+// #define SIZEOF_MCAST_IF_TABLE(X) (FIELD_OFFSET(MIB_IPMCAST_IF_TABLE,table[0]) + ((X) * sizeof(MIB_IPMCAST_IF_ENTRY)) + ALIGN_SIZE)
+
+type
+ PMIB_IPMCAST_BOUNDARY = ^MIB_IPMCAST_BOUNDARY;
+ {$EXTERNALSYM PMIB_IPMCAST_BOUNDARY}
+ _MIB_IPMCAST_BOUNDARY = record
+ dwIfIndex: DWORD;
+ dwGroupAddress: DWORD;
+ dwGroupMask: DWORD;
+ dwStatus: DWORD;
+ end;
+ {$EXTERNALSYM _MIB_IPMCAST_BOUNDARY}
+ MIB_IPMCAST_BOUNDARY = _MIB_IPMCAST_BOUNDARY;
+ {$EXTERNALSYM MIB_IPMCAST_BOUNDARY}
+ TMibIpmCastBoundary = MIB_IPMCAST_BOUNDARY;
+ PMibIpmCastBoundary = PMIB_IPMCAST_BOUNDARY;
+
+ PMIB_IPMCAST_BOUNDARY_TABLE = ^MIB_IPMCAST_BOUNDARY_TABLE;
+ {$EXTERNALSYM PMIB_IPMCAST_BOUNDARY_TABLE}
+ _MIB_IPMCAST_BOUNDARY_TABLE = record
+ dwNumEntries: DWORD;
+ table: array [0..ANY_SIZE - 1] of MIB_IPMCAST_BOUNDARY;
+ end;
+ {$EXTERNALSYM _MIB_IPMCAST_BOUNDARY_TABLE}
+ MIB_IPMCAST_BOUNDARY_TABLE = _MIB_IPMCAST_BOUNDARY_TABLE;
+ {$EXTERNALSYM MIB_IPMCAST_BOUNDARY_TABLE}
+ TMibIpmCastBoundaryTable = MIB_IPMCAST_BOUNDARY_TABLE;
+ PMibIpmCastBoundaryTable = PMIB_IPMCAST_BOUNDARY_TABLE;
+
+// #define SIZEOF_BOUNDARY_TABLE(X) (FIELD_OFFSET(MIB_IPMCAST_BOUNDARY_TABLE,table[0]) + ((X) * sizeof(MIB_IPMCAST_BOUNDARY)) + ALIGN_SIZE)
+
+type
+ PMIB_BOUNDARYROW = ^MIB_BOUNDARYROW;
+ {$EXTERNALSYM PMIB_BOUNDARYROW}
+ MIB_BOUNDARYROW = record
+ dwGroupAddress: DWORD;
+ dwGroupMask: DWORD;
+ end;
+ {$EXTERNALSYM MIB_BOUNDARYROW}
+ TMibBoundaryRow = MIB_BOUNDARYROW;
+ PMibBoundaryRow = PMIB_BOUNDARYROW;
+
+// Structure matching what goes in the registry in a block of type
+// IP_MCAST_LIMIT_INFO. This contains the fields of
+// MIB_IPMCAST_IF_ENTRY which are configurable.
+
+ PMIB_MCAST_LIMIT_ROW = ^MIB_MCAST_LIMIT_ROW;
+ {$EXTERNALSYM PMIB_MCAST_LIMIT_ROW}
+ MIB_MCAST_LIMIT_ROW = record
+ dwTtl: DWORD;
+ dwRateLimit: DWORD;
+ end;
+ {$EXTERNALSYM MIB_MCAST_LIMIT_ROW}
+ TMibMcastLimitRow = MIB_MCAST_LIMIT_ROW;
+ PMibMcastLimitRow = PMIB_MCAST_LIMIT_ROW;
+
+const
+ MAX_SCOPE_NAME_LEN = 255;
+ {$EXTERNALSYM MAX_SCOPE_NAME_LEN}
+
+//
+// Scope names are unicode. SNMP and MZAP use UTF-8 encoding.
+//
+
+type
+ SN_CHAR = WCHAR;
+ {$EXTERNALSYM SN_CHAR}
+ SCOPE_NAME_BUFFER = array [0..MAX_SCOPE_NAME_LEN] of SN_CHAR;
+ {$EXTERNALSYM SCOPE_NAME_BUFFER}
+ SCOPE_NAME = ^SN_CHAR;
+ {$EXTERNALSYM SCOPE_NAME}
+
+ PMIB_IPMCAST_SCOPE = ^MIB_IPMCAST_SCOPE;
+ {$EXTERNALSYM PMIB_IPMCAST_SCOPE}
+ _MIB_IPMCAST_SCOPE = record
+ dwGroupAddress: DWORD;
+ dwGroupMask: DWORD;
+ snNameBuffer: SCOPE_NAME_BUFFER;
+ dwStatus: DWORD;
+ end;
+ {$EXTERNALSYM _MIB_IPMCAST_SCOPE}
+ MIB_IPMCAST_SCOPE = _MIB_IPMCAST_SCOPE;
+ {$EXTERNALSYM MIB_IPMCAST_SCOPE}
+ TMibIpmCastScope = MIB_IPMCAST_SCOPE;
+ PMibIpmCastScope = PMIB_IPMCAST_SCOPE;
+
+ PMIB_IPDESTROW = ^MIB_IPDESTROW;
+ {$EXTERNALSYM PMIB_IPDESTROW}
+ _MIB_IPDESTROW = record
+ ForwardRow: MIB_IPFORWARDROW;
+ dwForwardPreference: DWORD;
+ dwForwardViewSet: DWORD;
+ end;
+ {$EXTERNALSYM _MIB_IPDESTROW}
+ MIB_IPDESTROW = _MIB_IPDESTROW;
+ {$EXTERNALSYM MIB_IPDESTROW}
+ TMibIpDestRow = MIB_IPDESTROW;
+ PMibIpDestRow = PMIB_IPDESTROW;
+
+ PMIB_IPDESTTABLE = ^MIB_IPDESTTABLE;
+ {$EXTERNALSYM PMIB_IPDESTTABLE}
+ _MIB_IPDESTTABLE = record
+ dwNumEntries: DWORD;
+ table: array [0..ANY_SIZE - 1] of MIB_IPDESTROW;
+ end;
+ {$EXTERNALSYM _MIB_IPDESTTABLE}
+ MIB_IPDESTTABLE = _MIB_IPDESTTABLE;
+ {$EXTERNALSYM MIB_IPDESTTABLE}
+ TMibIpDestTable = MIB_IPDESTTABLE;
+ PMibIpDestTable = PMIB_IPDESTTABLE;
+
+ PMIB_BEST_IF = ^MIB_BEST_IF;
+ {$EXTERNALSYM PMIB_BEST_IF}
+ _MIB_BEST_IF = record
+ dwDestAddr: DWORD;
+ dwIfIndex: DWORD;
+ end;
+ {$EXTERNALSYM _MIB_BEST_IF}
+ MIB_BEST_IF = _MIB_BEST_IF;
+ {$EXTERNALSYM MIB_BEST_IF}
+ TMibBestIf = MIB_BEST_IF;
+ PMibBestIf = PMIB_BEST_IF;
+
+ PMIB_PROXYARP = ^MIB_PROXYARP;
+ {$EXTERNALSYM PMIB_PROXYARP}
+ _MIB_PROXYARP = record
+ dwAddress: DWORD;
+ dwMask: DWORD;
+ dwIfIndex: DWORD;
+ end;
+ {$EXTERNALSYM _MIB_PROXYARP}
+ MIB_PROXYARP = _MIB_PROXYARP;
+ {$EXTERNALSYM MIB_PROXYARP}
+ TMibProxyArp = MIB_PROXYARP;
+ PMibProxyArp = PMIB_PROXYARP;
+
+ PMIB_IFSTATUS = ^MIB_IFSTATUS;
+ {$EXTERNALSYM PMIB_IFSTATUS}
+ _MIB_IFSTATUS = record
+ dwIfIndex: DWORD;
+ dwAdminStatus: DWORD;
+ dwOperationalStatus: DWORD;
+ bMHbeatActive: BOOL;
+ bMHbeatAlive: BOOL;
+ end;
+ {$EXTERNALSYM _MIB_IFSTATUS}
+ MIB_IFSTATUS = _MIB_IFSTATUS;
+ {$EXTERNALSYM MIB_IFSTATUS}
+ TMibIfStatus = MIB_IFSTATUS;
+ PMibIfStatus = PMIB_IFSTATUS;
+
+ PMIB_ROUTESTATE = ^MIB_ROUTESTATE;
+ {$EXTERNALSYM PMIB_ROUTESTATE}
+ _MIB_ROUTESTATE = record
+ bRoutesSetToStack: BOOL;
+ end;
+ {$EXTERNALSYM _MIB_ROUTESTATE}
+ MIB_ROUTESTATE = _MIB_ROUTESTATE;
+ {$EXTERNALSYM MIB_ROUTESTATE}
+ TMibRouteState = MIB_ROUTESTATE;
+ PMibRouteState = PMIB_ROUTESTATE;
+
+//////////////////////////////////////////////////////////////////////////////
+// //
+// All the info passed to (SET/CREATE) and from (GET/GETNEXT/GETFIRST) //
+// IP Router Manager is encapsulated in the following "discriminated" //
+// union. To pass, say MIB_IFROW, use the following code //
+// //
+// PMIB_OPAQUE_INFO pInfo; //
+// PMIB_IFROW pIfRow; //
+// DWORD rgdwBuff[(MAX_MIB_OFFSET + sizeof(MIB_IFROW))/sizeof(DWORD) + 1]; //
+// //
+// pInfo = (PMIB_OPAQUE_INFO)rgdwBuffer; //
+// pIfRow = (MIB_IFROW *)(pInfo->rgbyData); //
+// //
+// This can also be accomplished by using the following macro //
+// //
+// DEFINE_MIB_BUFFER(pInfo,MIB_IFROW, pIfRow); //
+// //
+//////////////////////////////////////////////////////////////////////////////
+
+type
+ PMibOpaqueInfo = ^TMibOpaqueInfo;
+ _MIB_OPAQUE_INFO = record
+ dwId: DWORD;
+ case Integer of
+ 0: (ullAlign: Int64); // ULONGLONG (unsigned!)
+ 1: (rgbyData: array [0..0] of BYTE);
+ end;
+ {$EXTERNALSYM _MIB_OPAQUE_INFO}
+ MIB_OPAQUE_INFO = _MIB_OPAQUE_INFO;
+ {$EXTERNALSYM MIB_OPAQUE_INFO}
+ TMibOpaqueInfo = MIB_OPAQUE_INFO;
+
+const
+ MAX_MIB_OFFSET = 8;
+ {$EXTERNALSYM MAX_MIB_OFFSET}
+
+// #define MIB_INFO_SIZE(S) (MAX_MIB_OFFSET + sizeof(S))
+
+// #define MIB_INFO_SIZE_IN_DWORDS(S) \
+// ((MIB_INFO_SIZE(S))/sizeof(DWORD) + 1)
+
+// #define DEFINE_MIB_BUFFER(X,Y,Z) \
+// DWORD __rgdwBuff[MIB_INFO_SIZE_IN_DWORDS(Y)]; \
+// PMIB_OPAQUE_INFO X = (PMIB_OPAQUE_INFO)__rgdwBuff; \
+// Y * Z = (Y *)(X->rgbyData)
+
+// #define CAST_MIB_INFO(X,Y,Z) Z = (Y)(X->rgbyData)
+
+implementation
+
+end.
diff --git a/packages/extra/winunits/jwaiptypes.pas b/packages/extra/winunits/jwaiptypes.pas
index f743ec494a..2917b29a58 100644
--- a/packages/extra/winunits/jwaiptypes.pas
+++ b/packages/extra/winunits/jwaiptypes.pas
@@ -1,494 +1,494 @@
-{******************************************************************************}
-{ }
-{ Internet Protocol Helper API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: iptypes.h, released July 2000. The original Pascal }
-{ code is: IpTypes.pas, released September 2000. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Contributor(s): John C. Penman (jcp att craiglockhart dott com) }
-{ Vladimir Vassiliev (voldemarv att hotpop dott com) }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwaiptypes.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaIpTypes;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "iptypes.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaWinsock2, JwaWinType;
-
-type
- // #include <time.h> // TODO
- time_t = Longint;
- {$EXTERNALSYM time_t}
-
-// Definitions and structures used by getnetworkparams and getadaptersinfo apis
-
-const
- MAX_ADAPTER_DESCRIPTION_LENGTH = 128; // arb.
- {$EXTERNALSYM MAX_ADAPTER_DESCRIPTION_LENGTH}
- MAX_ADAPTER_NAME_LENGTH = 256; // arb.
- {$EXTERNALSYM MAX_ADAPTER_NAME_LENGTH}
- MAX_ADAPTER_ADDRESS_LENGTH = 8; // arb.
- {$EXTERNALSYM MAX_ADAPTER_ADDRESS_LENGTH}
- DEFAULT_MINIMUM_ENTITIES = 32; // arb.
- {$EXTERNALSYM DEFAULT_MINIMUM_ENTITIES}
- MAX_HOSTNAME_LEN = 128; // arb.
- {$EXTERNALSYM MAX_HOSTNAME_LEN}
- MAX_DOMAIN_NAME_LEN = 128; // arb.
- {$EXTERNALSYM MAX_DOMAIN_NAME_LEN}
- MAX_SCOPE_ID_LEN = 256; // arb.
- {$EXTERNALSYM MAX_SCOPE_ID_LEN}
-
-//
-// types
-//
-
-// Node Type
-
- BROADCAST_NODETYPE = 1;
- {$EXTERNALSYM BROADCAST_NODETYPE}
- PEER_TO_PEER_NODETYPE = 2;
- {$EXTERNALSYM PEER_TO_PEER_NODETYPE}
- MIXED_NODETYPE = 4;
- {$EXTERNALSYM MIXED_NODETYPE}
- HYBRID_NODETYPE = 8;
- {$EXTERNALSYM HYBRID_NODETYPE}
-
-//
-// IP_ADDRESS_STRING - store an IP address as a dotted decimal string
-//
-
-type
- PIP_MASK_STRING = ^IP_MASK_STRING;
- {$EXTERNALSYM PIP_MASK_STRING}
- IP_ADDRESS_STRING = record
- S: array [0..15] of Char;
- end;
- {$EXTERNALSYM IP_ADDRESS_STRING}
- PIP_ADDRESS_STRING = ^IP_ADDRESS_STRING;
- {$EXTERNALSYM PIP_ADDRESS_STRING}
- IP_MASK_STRING = IP_ADDRESS_STRING;
- {$EXTERNALSYM IP_MASK_STRING}
- TIpAddressString = IP_ADDRESS_STRING;
- PIpAddressString = PIP_MASK_STRING;
-
-//
-// IP_ADDR_STRING - store an IP address with its corresponding subnet mask,
-// both as dotted decimal strings
-//
-
- PIP_ADDR_STRING = ^IP_ADDR_STRING;
- {$EXTERNALSYM PIP_ADDR_STRING}
- _IP_ADDR_STRING = record
- Next: PIP_ADDR_STRING;
- IpAddress: IP_ADDRESS_STRING;
- IpMask: IP_MASK_STRING;
- Context: DWORD;
- end;
- {$EXTERNALSYM _IP_ADDR_STRING}
- IP_ADDR_STRING = _IP_ADDR_STRING;
- {$EXTERNALSYM IP_ADDR_STRING}
- TIpAddrString = IP_ADDR_STRING;
- PIpAddrString = PIP_ADDR_STRING;
-
-//
-// ADAPTER_INFO - per-adapter information. All IP addresses are stored as
-// strings
-//
-
- PIP_ADAPTER_INFO = ^IP_ADAPTER_INFO;
- {$EXTERNALSYM PIP_ADAPTER_INFO}
- _IP_ADAPTER_INFO = record
- Next: PIP_ADAPTER_INFO;
- ComboIndex: DWORD;
- AdapterName: array [0..MAX_ADAPTER_NAME_LENGTH + 3] of Char;
- Description: array [0..MAX_ADAPTER_DESCRIPTION_LENGTH + 3] of Char;
- AddressLength: UINT;
- Address: array [0..MAX_ADAPTER_ADDRESS_LENGTH - 1] of BYTE;
- Index: DWORD;
- Type_: UINT;
- DhcpEnabled: UINT;
- CurrentIpAddress: PIP_ADDR_STRING;
- IpAddressList: IP_ADDR_STRING;
- GatewayList: IP_ADDR_STRING;
- DhcpServer: IP_ADDR_STRING;
- HaveWins: BOOL;
- PrimaryWinsServer: IP_ADDR_STRING;
- SecondaryWinsServer: IP_ADDR_STRING;
- LeaseObtained: time_t;
- LeaseExpires: time_t;
- end;
- {$EXTERNALSYM _IP_ADAPTER_INFO}
- IP_ADAPTER_INFO = _IP_ADAPTER_INFO;
- {$EXTERNALSYM IP_ADAPTER_INFO}
- TIpAdapterInfo = IP_ADAPTER_INFO;
- PIpAdapterInfo = PIP_ADAPTER_INFO;
-
-//
-// The following types require Winsock2.
-//
-
- IP_PREFIX_ORIGIN = (
- IpPrefixOriginOther,
- IpPrefixOriginManual,
- IpPrefixOriginWellKnown,
- IpPrefixOriginDhcp,
- IpPrefixOriginRouterAdvertisement);
- {$EXTERNALSYM IP_PREFIX_ORIGIN}
- TIpPrefixOrigin = IP_PREFIX_ORIGIN;
-
- IP_SUFFIX_ORIGIN = (
- IpSuffixOriginOther,
- IpSuffixOriginManual,
- IpSuffixOriginWellKnown,
- IpSuffixOriginDhcp,
- IpSuffixOriginLinkLayerAddress,
- IpSuffixOriginRandom);
- {$EXTERNALSYM IP_SUFFIX_ORIGIN}
- TIpSuffixOrigin = IP_SUFFIX_ORIGIN;
-
- IP_DAD_STATE = (
- IpDadStateInvalid,
- IpDadStateTentative,
- IpDadStateDuplicate,
- IpDadStateDeprecated,
- IpDadStatePreferred);
- {$EXTERNALSYM IP_DAD_STATE}
- TIpDadState = IP_DAD_STATE;
-
- PIP_ADAPTER_UNICAST_ADDRESS = ^_IP_ADAPTER_UNICAST_ADDRESS;
- {$EXTERNALSYM PIP_ADAPTER_UNICAST_ADDRESS}
- _IP_ADAPTER_UNICAST_ADDRESS = record
- Union: record
- case Integer of
- 0: (
- Alignment: ULONGLONG);
- 1: (
- Length: ULONG;
- Flags: DWORD);
- end;
- Next: PIP_ADAPTER_UNICAST_ADDRESS;
- Address: SOCKET_ADDRESS;
-
- PrefixOrigin: IP_PREFIX_ORIGIN;
- SuffixOrigin: IP_SUFFIX_ORIGIN;
- DadState: IP_DAD_STATE;
-
- ValidLifetime: ULONG;
- PreferredLifetime: ULONG;
- LeaseLifetime: ULONG;
- end;
- {$EXTERNALSYM _IP_ADAPTER_UNICAST_ADDRESS}
- IP_ADAPTER_UNICAST_ADDRESS = _IP_ADAPTER_UNICAST_ADDRESS;
- {$EXTERNALSYM IP_ADAPTER_UNICAST_ADDRESS}
- TIpAdapterUnicastAddress = IP_ADAPTER_UNICAST_ADDRESS;
- PIpAdapterUnicastAddress = PIP_ADAPTER_UNICAST_ADDRESS;
-
- PIP_ADAPTER_ANYCAST_ADDRESS = ^_IP_ADAPTER_ANYCAST_ADDRESS;
- {$EXTERNALSYM PIP_ADAPTER_ANYCAST_ADDRESS}
- _IP_ADAPTER_ANYCAST_ADDRESS = record
- Union: record
- case Integer of
- 0: (
- Alignment: ULONGLONG);
- 1: (
- Length: ULONG;
- Flags: DWORD);
- end;
- Next: PIP_ADAPTER_ANYCAST_ADDRESS;
- Address: SOCKET_ADDRESS;
- end;
- {$EXTERNALSYM _IP_ADAPTER_ANYCAST_ADDRESS}
- IP_ADAPTER_ANYCAST_ADDRESS = _IP_ADAPTER_ANYCAST_ADDRESS;
- {$EXTERNALSYM IP_ADAPTER_ANYCAST_ADDRESS}
- TIpAdapterAnycaseAddress = IP_ADAPTER_ANYCAST_ADDRESS;
- PIpAdapterAnycaseAddress = PIP_ADAPTER_ANYCAST_ADDRESS;
-
- PIP_ADAPTER_MULTICAST_ADDRESS = ^_IP_ADAPTER_MULTICAST_ADDRESS;
- {$EXTERNALSYM PIP_ADAPTER_MULTICAST_ADDRESS}
- _IP_ADAPTER_MULTICAST_ADDRESS = record
- Union: record
- case Integer of
- 0: (
- Alignment: ULONGLONG);
- 1: (
- Length: ULONG;
- Flags: DWORD);
- end;
- Next: PIP_ADAPTER_MULTICAST_ADDRESS;
- Address: SOCKET_ADDRESS;
- end;
- {$EXTERNALSYM _IP_ADAPTER_MULTICAST_ADDRESS}
- IP_ADAPTER_MULTICAST_ADDRESS = _IP_ADAPTER_MULTICAST_ADDRESS;
- TIpAdapterMulticastAddress = IP_ADAPTER_MULTICAST_ADDRESS;
- PIpAdapterMulticastAddress = PIP_ADAPTER_MULTICAST_ADDRESS;
-
-//
-// Per-address Flags
-//
-
-const
- IP_ADAPTER_ADDRESS_DNS_ELIGIBLE = $01;
- {$EXTERNALSYM IP_ADAPTER_ADDRESS_DNS_ELIGIBLE}
- IP_ADAPTER_ADDRESS_TRANSIENT = $02;
- {$EXTERNALSYM IP_ADAPTER_ADDRESS_TRANSIENT}
-
-type
- PIP_ADAPTER_DNS_SERVER_ADDRESS = ^_IP_ADAPTER_DNS_SERVER_ADDRESS;
- {$EXTERNALSYM PIP_ADAPTER_DNS_SERVER_ADDRESS}
- _IP_ADAPTER_DNS_SERVER_ADDRESS = record
- Union: record
- case Integer of
- 0: (
- Alignment: ULONGLONG);
- 1: (
- Length: ULONG;
- Reserved: DWORD);
- end;
- Next: PIP_ADAPTER_DNS_SERVER_ADDRESS;
- Address: SOCKET_ADDRESS;
- end;
- {$EXTERNALSYM _IP_ADAPTER_DNS_SERVER_ADDRESS}
- IP_ADAPTER_DNS_SERVER_ADDRESS = _IP_ADAPTER_DNS_SERVER_ADDRESS;
- {$EXTERNALSYM IP_ADAPTER_DNS_SERVER_ADDRESS}
- TIpAdapterDnsServerAddress = IP_ADAPTER_DNS_SERVER_ADDRESS;
- PIpAdapterDnsServerAddress = PIP_ADAPTER_DNS_SERVER_ADDRESS;
-
- PIP_ADAPTER_PREFIX = ^IP_ADAPTER_PREFIX;
- {$EXTERNALSYM PIP_ADAPTER_PREFIX}
- _IP_ADAPTER_PREFIX = record
- Union: record
- case Integer of
- 0: (
- Alignment: ULONGLONG);
- 1: (
- Length: ULONG;
- Flags: DWORD);
- end;
- Next: PIP_ADAPTER_PREFIX;
- Address: SOCKET_ADDRESS;
- PrefixLength: ULONG;
- end;
- {$EXTERNALSYM _IP_ADAPTER_PREFIX}
- IP_ADAPTER_PREFIX = _IP_ADAPTER_PREFIX;
- {$EXTERNALSYM IP_ADAPTER_PREFIX}
- TIpAdapterPrefix = IP_ADAPTER_PREFIX;
- PIpAdapterPrefix = PIP_ADAPTER_PREFIX;
-
-//
-// Per-adapter Flags
-//
-
-const
- IP_ADAPTER_DDNS_ENABLED = $01;
- {$EXTERNALSYM IP_ADAPTER_DDNS_ENABLED}
- IP_ADAPTER_REGISTER_ADAPTER_SUFFIX = $02;
- {$EXTERNALSYM IP_ADAPTER_REGISTER_ADAPTER_SUFFIX}
- IP_ADAPTER_DHCP_ENABLED = $04;
- {$EXTERNALSYM IP_ADAPTER_DHCP_ENABLED}
- IP_ADAPTER_RECEIVE_ONLY = $08;
- {$EXTERNALSYM IP_ADAPTER_RECEIVE_ONLY}
- IP_ADAPTER_NO_MULTICAST = $10;
- {$EXTERNALSYM IP_ADAPTER_NO_MULTICAST}
- IP_ADAPTER_IPV6_OTHER_STATEFUL_CONFIG = $20;
- {$EXTERNALSYM IP_ADAPTER_IPV6_OTHER_STATEFUL_CONFIG}
-
-//
-// OperStatus values from RFC 2863
-//
-
-type
- IF_OPER_STATUS = (
- IfOperStatusUp,
- IfOperStatusDown,
- IfOperStatusTesting,
- IfOperStatusUnknown,
- IfOperStatusDormant,
- IfOperStatusNotPresent,
- IfOperStatusLowerLayerDown);
- {$EXTERNALSYM IF_OPER_STATUS}
- TIfOperStatus = IF_OPER_STATUS;
-
-//
-// Scope levels from RFC 2373 used with ZoneIndices array.
-//
-
-const
- ScopeLevelInterface = 1;
- {$EXTERNALSYM ScopeLevelInterface}
- ScopeLevelLink = 2;
- {$EXTERNALSYM ScopeLevelLink}
- ScopeLevelSubnet = 3;
- {$EXTERNALSYM ScopeLevelSubnet}
- ScopeLevelAdmin = 4;
- {$EXTERNALSYM ScopeLevelAdmin}
- ScopeLevelSite = 5;
- {$EXTERNALSYM ScopeLevelSite}
- ScopeLevelOrganization = 8;
- {$EXTERNALSYM ScopeLevelOrganization}
- ScopeLevelGlobal = 14;
- {$EXTERNALSYM ScopeLevelGlobal}
-
-type
- SCOPE_LEVEL = DWORD;
- {$EXTERNALSYM SCOPE_LEVEL}
- TScopeLevel = SCOPE_LEVEL;
-
- PIP_ADAPTER_ADDRESSES = ^_IP_ADAPTER_ADDRESSES;
- {$EXTERNALSYM PIP_ADAPTER_ADDRESSES}
- _IP_ADAPTER_ADDRESSES = record
- Union: record
- case Integer of
- 0: (
- Alignment: ULONGLONG);
- 1: (
- Length: ULONG;
- IfIndex: DWORD);
- end;
- Next: PIP_ADAPTER_ADDRESSES;
- AdapterName: PCHAR;
- FirstUnicastAddress: PIP_ADAPTER_UNICAST_ADDRESS;
- FirstAnycastAddress: PIP_ADAPTER_ANYCAST_ADDRESS;
- FirstMulticastAddress: PIP_ADAPTER_MULTICAST_ADDRESS;
- FirstDnsServerAddress: PIP_ADAPTER_DNS_SERVER_ADDRESS;
- DnsSuffix: PWCHAR;
- Description: PWCHAR;
- FriendlyName: PWCHAR;
- PhysicalAddress: array [0..MAX_ADAPTER_ADDRESS_LENGTH - 1] of BYTE;
- PhysicalAddressLength: DWORD;
- Flags: DWORD;
- Mtu: DWORD;
- IfType: DWORD;
- OperStatus: IF_OPER_STATUS;
- Ipv6IfIndex: DWORD;
- ZoneIndices: array [0..15] of DWORD;
- FirstPrefix: PIP_ADAPTER_PREFIX;
- end;
- {$EXTERNALSYM _IP_ADAPTER_ADDRESSES}
- IP_ADAPTER_ADDRESSES = _IP_ADAPTER_ADDRESSES;
- {$EXTERNALSYM IP_ADAPTER_ADDRESSES}
- TIpAdapterAddresses = IP_ADAPTER_ADDRESSES;
- PIpAdapterAddresses = PIP_ADAPTER_ADDRESSES;
-
-//
-// Flags used as argument to GetAdaptersAddresses().
-// "SKIP" flags are added when the default is to include the information.
-// "INCLUDE" flags are added when the default is to skip the information.
-//
-
-const
- GAA_FLAG_SKIP_UNICAST = $0001;
- {$EXTERNALSYM GAA_FLAG_SKIP_UNICAST}
- GAA_FLAG_SKIP_ANYCAST = $0002;
- {$EXTERNALSYM GAA_FLAG_SKIP_ANYCAST}
- GAA_FLAG_SKIP_MULTICAST = $0004;
- {$EXTERNALSYM GAA_FLAG_SKIP_MULTICAST}
- GAA_FLAG_SKIP_DNS_SERVER = $0008;
- {$EXTERNALSYM GAA_FLAG_SKIP_DNS_SERVER}
- GAA_FLAG_INCLUDE_PREFIX = $0010;
- {$EXTERNALSYM GAA_FLAG_INCLUDE_PREFIX}
- GAA_FLAG_SKIP_FRIENDLY_NAME = $0020;
- {$EXTERNALSYM GAA_FLAG_SKIP_FRIENDLY_NAME}
-
-//
-// IP_PER_ADAPTER_INFO - per-adapter IP information such as DNS server list.
-//
-
-type
- PIP_PER_ADAPTER_INFO = ^IP_PER_ADAPTER_INFO;
- {$EXTERNALSYM PIP_PER_ADAPTER_INFO}
- _IP_PER_ADAPTER_INFO = record
- AutoconfigEnabled: UINT;
- AutoconfigActive: UINT;
- CurrentDnsServer: PIP_ADDR_STRING;
- DnsServerList: IP_ADDR_STRING;
- end;
- {$EXTERNALSYM _IP_PER_ADAPTER_INFO}
- IP_PER_ADAPTER_INFO = _IP_PER_ADAPTER_INFO;
- {$EXTERNALSYM IP_PER_ADAPTER_INFO}
- TIpPerAdapterInfo = IP_PER_ADAPTER_INFO;
- PIpPerAdapterInfo = PIP_PER_ADAPTER_INFO;
-
-//
-// FIXED_INFO - the set of IP-related information which does not depend on DHCP
-//
-
- PFIXED_INFO = ^FIXED_INFO;
- {$EXTERNALSYM PFIXED_INFO}
- FIXED_INFO = record
- HostName: array [0..MAX_HOSTNAME_LEN + 3] of Char;
- DomainName: array[0..MAX_DOMAIN_NAME_LEN + 3] of Char;
- CurrentDnsServer: PIP_ADDR_STRING;
- DnsServerList: IP_ADDR_STRING;
- NodeType: UINT;
- ScopeId: array [0..MAX_SCOPE_ID_LEN + 3] of Char;
- EnableRouting: UINT;
- EnableProxy: UINT;
- EnableDns: UINT;
- end;
- {$EXTERNALSYM FIXED_INFO}
- TFixedInfo = FIXED_INFO;
- PFixedInfo = PFIXED_INFO;
-
- IP_INTERFACE_NAME_INFO = record
- Index: ULONG; // Interface Index
- MediaType: ULONG; // Interface Types - see ipifcons.h
- ConnectionType: UCHAR;
- AccessType: UCHAR;
- DeviceGuid: TGUID; // Device GUID is the guid of the device
- // that IP exposes
- InterfaceGuid: TGUID; // Interface GUID, if not GUID_NULL is the
- // GUID for the interface mapped to the device.
- end;
- PIP_INTERFACE_NAME_INFO = ^IP_INTERFACE_NAME_INFO;
- {$EXTERNALSYM PIP_INTERFACE_NAME_INFO}
- TIpInterfaceNameInfo = IP_INTERFACE_NAME_INFO;
- PIpInterfaceNameInfo = ^IP_INTERFACE_NAME_INFO;
-
-implementation
-
-end.
+{******************************************************************************}
+{ }
+{ Internet Protocol Helper API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: iptypes.h, released July 2000. The original Pascal }
+{ code is: IpTypes.pas, released September 2000. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Contributor(s): John C. Penman (jcp att craiglockhart dott com) }
+{ Vladimir Vassiliev (voldemarv att hotpop dott com) }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwaiptypes.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaIpTypes;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "iptypes.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaWinsock2, JwaWinType;
+
+type
+ // #include <time.h> // TODO
+ time_t = Longint;
+ {$EXTERNALSYM time_t}
+
+// Definitions and structures used by getnetworkparams and getadaptersinfo apis
+
+const
+ MAX_ADAPTER_DESCRIPTION_LENGTH = 128; // arb.
+ {$EXTERNALSYM MAX_ADAPTER_DESCRIPTION_LENGTH}
+ MAX_ADAPTER_NAME_LENGTH = 256; // arb.
+ {$EXTERNALSYM MAX_ADAPTER_NAME_LENGTH}
+ MAX_ADAPTER_ADDRESS_LENGTH = 8; // arb.
+ {$EXTERNALSYM MAX_ADAPTER_ADDRESS_LENGTH}
+ DEFAULT_MINIMUM_ENTITIES = 32; // arb.
+ {$EXTERNALSYM DEFAULT_MINIMUM_ENTITIES}
+ MAX_HOSTNAME_LEN = 128; // arb.
+ {$EXTERNALSYM MAX_HOSTNAME_LEN}
+ MAX_DOMAIN_NAME_LEN = 128; // arb.
+ {$EXTERNALSYM MAX_DOMAIN_NAME_LEN}
+ MAX_SCOPE_ID_LEN = 256; // arb.
+ {$EXTERNALSYM MAX_SCOPE_ID_LEN}
+
+//
+// types
+//
+
+// Node Type
+
+ BROADCAST_NODETYPE = 1;
+ {$EXTERNALSYM BROADCAST_NODETYPE}
+ PEER_TO_PEER_NODETYPE = 2;
+ {$EXTERNALSYM PEER_TO_PEER_NODETYPE}
+ MIXED_NODETYPE = 4;
+ {$EXTERNALSYM MIXED_NODETYPE}
+ HYBRID_NODETYPE = 8;
+ {$EXTERNALSYM HYBRID_NODETYPE}
+
+//
+// IP_ADDRESS_STRING - store an IP address as a dotted decimal string
+//
+
+type
+ PIP_MASK_STRING = ^IP_MASK_STRING;
+ {$EXTERNALSYM PIP_MASK_STRING}
+ IP_ADDRESS_STRING = record
+ S: array [0..15] of Char;
+ end;
+ {$EXTERNALSYM IP_ADDRESS_STRING}
+ PIP_ADDRESS_STRING = ^IP_ADDRESS_STRING;
+ {$EXTERNALSYM PIP_ADDRESS_STRING}
+ IP_MASK_STRING = IP_ADDRESS_STRING;
+ {$EXTERNALSYM IP_MASK_STRING}
+ TIpAddressString = IP_ADDRESS_STRING;
+ PIpAddressString = PIP_MASK_STRING;
+
+//
+// IP_ADDR_STRING - store an IP address with its corresponding subnet mask,
+// both as dotted decimal strings
+//
+
+ PIP_ADDR_STRING = ^IP_ADDR_STRING;
+ {$EXTERNALSYM PIP_ADDR_STRING}
+ _IP_ADDR_STRING = record
+ Next: PIP_ADDR_STRING;
+ IpAddress: IP_ADDRESS_STRING;
+ IpMask: IP_MASK_STRING;
+ Context: DWORD;
+ end;
+ {$EXTERNALSYM _IP_ADDR_STRING}
+ IP_ADDR_STRING = _IP_ADDR_STRING;
+ {$EXTERNALSYM IP_ADDR_STRING}
+ TIpAddrString = IP_ADDR_STRING;
+ PIpAddrString = PIP_ADDR_STRING;
+
+//
+// ADAPTER_INFO - per-adapter information. All IP addresses are stored as
+// strings
+//
+
+ PIP_ADAPTER_INFO = ^IP_ADAPTER_INFO;
+ {$EXTERNALSYM PIP_ADAPTER_INFO}
+ _IP_ADAPTER_INFO = record
+ Next: PIP_ADAPTER_INFO;
+ ComboIndex: DWORD;
+ AdapterName: array [0..MAX_ADAPTER_NAME_LENGTH + 3] of Char;
+ Description: array [0..MAX_ADAPTER_DESCRIPTION_LENGTH + 3] of Char;
+ AddressLength: UINT;
+ Address: array [0..MAX_ADAPTER_ADDRESS_LENGTH - 1] of BYTE;
+ Index: DWORD;
+ Type_: UINT;
+ DhcpEnabled: UINT;
+ CurrentIpAddress: PIP_ADDR_STRING;
+ IpAddressList: IP_ADDR_STRING;
+ GatewayList: IP_ADDR_STRING;
+ DhcpServer: IP_ADDR_STRING;
+ HaveWins: BOOL;
+ PrimaryWinsServer: IP_ADDR_STRING;
+ SecondaryWinsServer: IP_ADDR_STRING;
+ LeaseObtained: time_t;
+ LeaseExpires: time_t;
+ end;
+ {$EXTERNALSYM _IP_ADAPTER_INFO}
+ IP_ADAPTER_INFO = _IP_ADAPTER_INFO;
+ {$EXTERNALSYM IP_ADAPTER_INFO}
+ TIpAdapterInfo = IP_ADAPTER_INFO;
+ PIpAdapterInfo = PIP_ADAPTER_INFO;
+
+//
+// The following types require Winsock2.
+//
+
+ IP_PREFIX_ORIGIN = (
+ IpPrefixOriginOther,
+ IpPrefixOriginManual,
+ IpPrefixOriginWellKnown,
+ IpPrefixOriginDhcp,
+ IpPrefixOriginRouterAdvertisement);
+ {$EXTERNALSYM IP_PREFIX_ORIGIN}
+ TIpPrefixOrigin = IP_PREFIX_ORIGIN;
+
+ IP_SUFFIX_ORIGIN = (
+ IpSuffixOriginOther,
+ IpSuffixOriginManual,
+ IpSuffixOriginWellKnown,
+ IpSuffixOriginDhcp,
+ IpSuffixOriginLinkLayerAddress,
+ IpSuffixOriginRandom);
+ {$EXTERNALSYM IP_SUFFIX_ORIGIN}
+ TIpSuffixOrigin = IP_SUFFIX_ORIGIN;
+
+ IP_DAD_STATE = (
+ IpDadStateInvalid,
+ IpDadStateTentative,
+ IpDadStateDuplicate,
+ IpDadStateDeprecated,
+ IpDadStatePreferred);
+ {$EXTERNALSYM IP_DAD_STATE}
+ TIpDadState = IP_DAD_STATE;
+
+ PIP_ADAPTER_UNICAST_ADDRESS = ^_IP_ADAPTER_UNICAST_ADDRESS;
+ {$EXTERNALSYM PIP_ADAPTER_UNICAST_ADDRESS}
+ _IP_ADAPTER_UNICAST_ADDRESS = record
+ Union: record
+ case Integer of
+ 0: (
+ Alignment: ULONGLONG);
+ 1: (
+ Length: ULONG;
+ Flags: DWORD);
+ end;
+ Next: PIP_ADAPTER_UNICAST_ADDRESS;
+ Address: SOCKET_ADDRESS;
+
+ PrefixOrigin: IP_PREFIX_ORIGIN;
+ SuffixOrigin: IP_SUFFIX_ORIGIN;
+ DadState: IP_DAD_STATE;
+
+ ValidLifetime: ULONG;
+ PreferredLifetime: ULONG;
+ LeaseLifetime: ULONG;
+ end;
+ {$EXTERNALSYM _IP_ADAPTER_UNICAST_ADDRESS}
+ IP_ADAPTER_UNICAST_ADDRESS = _IP_ADAPTER_UNICAST_ADDRESS;
+ {$EXTERNALSYM IP_ADAPTER_UNICAST_ADDRESS}
+ TIpAdapterUnicastAddress = IP_ADAPTER_UNICAST_ADDRESS;
+ PIpAdapterUnicastAddress = PIP_ADAPTER_UNICAST_ADDRESS;
+
+ PIP_ADAPTER_ANYCAST_ADDRESS = ^_IP_ADAPTER_ANYCAST_ADDRESS;
+ {$EXTERNALSYM PIP_ADAPTER_ANYCAST_ADDRESS}
+ _IP_ADAPTER_ANYCAST_ADDRESS = record
+ Union: record
+ case Integer of
+ 0: (
+ Alignment: ULONGLONG);
+ 1: (
+ Length: ULONG;
+ Flags: DWORD);
+ end;
+ Next: PIP_ADAPTER_ANYCAST_ADDRESS;
+ Address: SOCKET_ADDRESS;
+ end;
+ {$EXTERNALSYM _IP_ADAPTER_ANYCAST_ADDRESS}
+ IP_ADAPTER_ANYCAST_ADDRESS = _IP_ADAPTER_ANYCAST_ADDRESS;
+ {$EXTERNALSYM IP_ADAPTER_ANYCAST_ADDRESS}
+ TIpAdapterAnycaseAddress = IP_ADAPTER_ANYCAST_ADDRESS;
+ PIpAdapterAnycaseAddress = PIP_ADAPTER_ANYCAST_ADDRESS;
+
+ PIP_ADAPTER_MULTICAST_ADDRESS = ^_IP_ADAPTER_MULTICAST_ADDRESS;
+ {$EXTERNALSYM PIP_ADAPTER_MULTICAST_ADDRESS}
+ _IP_ADAPTER_MULTICAST_ADDRESS = record
+ Union: record
+ case Integer of
+ 0: (
+ Alignment: ULONGLONG);
+ 1: (
+ Length: ULONG;
+ Flags: DWORD);
+ end;
+ Next: PIP_ADAPTER_MULTICAST_ADDRESS;
+ Address: SOCKET_ADDRESS;
+ end;
+ {$EXTERNALSYM _IP_ADAPTER_MULTICAST_ADDRESS}
+ IP_ADAPTER_MULTICAST_ADDRESS = _IP_ADAPTER_MULTICAST_ADDRESS;
+ TIpAdapterMulticastAddress = IP_ADAPTER_MULTICAST_ADDRESS;
+ PIpAdapterMulticastAddress = PIP_ADAPTER_MULTICAST_ADDRESS;
+
+//
+// Per-address Flags
+//
+
+const
+ IP_ADAPTER_ADDRESS_DNS_ELIGIBLE = $01;
+ {$EXTERNALSYM IP_ADAPTER_ADDRESS_DNS_ELIGIBLE}
+ IP_ADAPTER_ADDRESS_TRANSIENT = $02;
+ {$EXTERNALSYM IP_ADAPTER_ADDRESS_TRANSIENT}
+
+type
+ PIP_ADAPTER_DNS_SERVER_ADDRESS = ^_IP_ADAPTER_DNS_SERVER_ADDRESS;
+ {$EXTERNALSYM PIP_ADAPTER_DNS_SERVER_ADDRESS}
+ _IP_ADAPTER_DNS_SERVER_ADDRESS = record
+ Union: record
+ case Integer of
+ 0: (
+ Alignment: ULONGLONG);
+ 1: (
+ Length: ULONG;
+ Reserved: DWORD);
+ end;
+ Next: PIP_ADAPTER_DNS_SERVER_ADDRESS;
+ Address: SOCKET_ADDRESS;
+ end;
+ {$EXTERNALSYM _IP_ADAPTER_DNS_SERVER_ADDRESS}
+ IP_ADAPTER_DNS_SERVER_ADDRESS = _IP_ADAPTER_DNS_SERVER_ADDRESS;
+ {$EXTERNALSYM IP_ADAPTER_DNS_SERVER_ADDRESS}
+ TIpAdapterDnsServerAddress = IP_ADAPTER_DNS_SERVER_ADDRESS;
+ PIpAdapterDnsServerAddress = PIP_ADAPTER_DNS_SERVER_ADDRESS;
+
+ PIP_ADAPTER_PREFIX = ^IP_ADAPTER_PREFIX;
+ {$EXTERNALSYM PIP_ADAPTER_PREFIX}
+ _IP_ADAPTER_PREFIX = record
+ Union: record
+ case Integer of
+ 0: (
+ Alignment: ULONGLONG);
+ 1: (
+ Length: ULONG;
+ Flags: DWORD);
+ end;
+ Next: PIP_ADAPTER_PREFIX;
+ Address: SOCKET_ADDRESS;
+ PrefixLength: ULONG;
+ end;
+ {$EXTERNALSYM _IP_ADAPTER_PREFIX}
+ IP_ADAPTER_PREFIX = _IP_ADAPTER_PREFIX;
+ {$EXTERNALSYM IP_ADAPTER_PREFIX}
+ TIpAdapterPrefix = IP_ADAPTER_PREFIX;
+ PIpAdapterPrefix = PIP_ADAPTER_PREFIX;
+
+//
+// Per-adapter Flags
+//
+
+const
+ IP_ADAPTER_DDNS_ENABLED = $01;
+ {$EXTERNALSYM IP_ADAPTER_DDNS_ENABLED}
+ IP_ADAPTER_REGISTER_ADAPTER_SUFFIX = $02;
+ {$EXTERNALSYM IP_ADAPTER_REGISTER_ADAPTER_SUFFIX}
+ IP_ADAPTER_DHCP_ENABLED = $04;
+ {$EXTERNALSYM IP_ADAPTER_DHCP_ENABLED}
+ IP_ADAPTER_RECEIVE_ONLY = $08;
+ {$EXTERNALSYM IP_ADAPTER_RECEIVE_ONLY}
+ IP_ADAPTER_NO_MULTICAST = $10;
+ {$EXTERNALSYM IP_ADAPTER_NO_MULTICAST}
+ IP_ADAPTER_IPV6_OTHER_STATEFUL_CONFIG = $20;
+ {$EXTERNALSYM IP_ADAPTER_IPV6_OTHER_STATEFUL_CONFIG}
+
+//
+// OperStatus values from RFC 2863
+//
+
+type
+ IF_OPER_STATUS = (
+ IfOperStatusUp,
+ IfOperStatusDown,
+ IfOperStatusTesting,
+ IfOperStatusUnknown,
+ IfOperStatusDormant,
+ IfOperStatusNotPresent,
+ IfOperStatusLowerLayerDown);
+ {$EXTERNALSYM IF_OPER_STATUS}
+ TIfOperStatus = IF_OPER_STATUS;
+
+//
+// Scope levels from RFC 2373 used with ZoneIndices array.
+//
+
+const
+ ScopeLevelInterface = 1;
+ {$EXTERNALSYM ScopeLevelInterface}
+ ScopeLevelLink = 2;
+ {$EXTERNALSYM ScopeLevelLink}
+ ScopeLevelSubnet = 3;
+ {$EXTERNALSYM ScopeLevelSubnet}
+ ScopeLevelAdmin = 4;
+ {$EXTERNALSYM ScopeLevelAdmin}
+ ScopeLevelSite = 5;
+ {$EXTERNALSYM ScopeLevelSite}
+ ScopeLevelOrganization = 8;
+ {$EXTERNALSYM ScopeLevelOrganization}
+ ScopeLevelGlobal = 14;
+ {$EXTERNALSYM ScopeLevelGlobal}
+
+type
+ SCOPE_LEVEL = DWORD;
+ {$EXTERNALSYM SCOPE_LEVEL}
+ TScopeLevel = SCOPE_LEVEL;
+
+ PIP_ADAPTER_ADDRESSES = ^_IP_ADAPTER_ADDRESSES;
+ {$EXTERNALSYM PIP_ADAPTER_ADDRESSES}
+ _IP_ADAPTER_ADDRESSES = record
+ Union: record
+ case Integer of
+ 0: (
+ Alignment: ULONGLONG);
+ 1: (
+ Length: ULONG;
+ IfIndex: DWORD);
+ end;
+ Next: PIP_ADAPTER_ADDRESSES;
+ AdapterName: PCHAR;
+ FirstUnicastAddress: PIP_ADAPTER_UNICAST_ADDRESS;
+ FirstAnycastAddress: PIP_ADAPTER_ANYCAST_ADDRESS;
+ FirstMulticastAddress: PIP_ADAPTER_MULTICAST_ADDRESS;
+ FirstDnsServerAddress: PIP_ADAPTER_DNS_SERVER_ADDRESS;
+ DnsSuffix: PWCHAR;
+ Description: PWCHAR;
+ FriendlyName: PWCHAR;
+ PhysicalAddress: array [0..MAX_ADAPTER_ADDRESS_LENGTH - 1] of BYTE;
+ PhysicalAddressLength: DWORD;
+ Flags: DWORD;
+ Mtu: DWORD;
+ IfType: DWORD;
+ OperStatus: IF_OPER_STATUS;
+ Ipv6IfIndex: DWORD;
+ ZoneIndices: array [0..15] of DWORD;
+ FirstPrefix: PIP_ADAPTER_PREFIX;
+ end;
+ {$EXTERNALSYM _IP_ADAPTER_ADDRESSES}
+ IP_ADAPTER_ADDRESSES = _IP_ADAPTER_ADDRESSES;
+ {$EXTERNALSYM IP_ADAPTER_ADDRESSES}
+ TIpAdapterAddresses = IP_ADAPTER_ADDRESSES;
+ PIpAdapterAddresses = PIP_ADAPTER_ADDRESSES;
+
+//
+// Flags used as argument to GetAdaptersAddresses().
+// "SKIP" flags are added when the default is to include the information.
+// "INCLUDE" flags are added when the default is to skip the information.
+//
+
+const
+ GAA_FLAG_SKIP_UNICAST = $0001;
+ {$EXTERNALSYM GAA_FLAG_SKIP_UNICAST}
+ GAA_FLAG_SKIP_ANYCAST = $0002;
+ {$EXTERNALSYM GAA_FLAG_SKIP_ANYCAST}
+ GAA_FLAG_SKIP_MULTICAST = $0004;
+ {$EXTERNALSYM GAA_FLAG_SKIP_MULTICAST}
+ GAA_FLAG_SKIP_DNS_SERVER = $0008;
+ {$EXTERNALSYM GAA_FLAG_SKIP_DNS_SERVER}
+ GAA_FLAG_INCLUDE_PREFIX = $0010;
+ {$EXTERNALSYM GAA_FLAG_INCLUDE_PREFIX}
+ GAA_FLAG_SKIP_FRIENDLY_NAME = $0020;
+ {$EXTERNALSYM GAA_FLAG_SKIP_FRIENDLY_NAME}
+
+//
+// IP_PER_ADAPTER_INFO - per-adapter IP information such as DNS server list.
+//
+
+type
+ PIP_PER_ADAPTER_INFO = ^IP_PER_ADAPTER_INFO;
+ {$EXTERNALSYM PIP_PER_ADAPTER_INFO}
+ _IP_PER_ADAPTER_INFO = record
+ AutoconfigEnabled: UINT;
+ AutoconfigActive: UINT;
+ CurrentDnsServer: PIP_ADDR_STRING;
+ DnsServerList: IP_ADDR_STRING;
+ end;
+ {$EXTERNALSYM _IP_PER_ADAPTER_INFO}
+ IP_PER_ADAPTER_INFO = _IP_PER_ADAPTER_INFO;
+ {$EXTERNALSYM IP_PER_ADAPTER_INFO}
+ TIpPerAdapterInfo = IP_PER_ADAPTER_INFO;
+ PIpPerAdapterInfo = PIP_PER_ADAPTER_INFO;
+
+//
+// FIXED_INFO - the set of IP-related information which does not depend on DHCP
+//
+
+ PFIXED_INFO = ^FIXED_INFO;
+ {$EXTERNALSYM PFIXED_INFO}
+ FIXED_INFO = record
+ HostName: array [0..MAX_HOSTNAME_LEN + 3] of Char;
+ DomainName: array[0..MAX_DOMAIN_NAME_LEN + 3] of Char;
+ CurrentDnsServer: PIP_ADDR_STRING;
+ DnsServerList: IP_ADDR_STRING;
+ NodeType: UINT;
+ ScopeId: array [0..MAX_SCOPE_ID_LEN + 3] of Char;
+ EnableRouting: UINT;
+ EnableProxy: UINT;
+ EnableDns: UINT;
+ end;
+ {$EXTERNALSYM FIXED_INFO}
+ TFixedInfo = FIXED_INFO;
+ PFixedInfo = PFIXED_INFO;
+
+ IP_INTERFACE_NAME_INFO = record
+ Index: ULONG; // Interface Index
+ MediaType: ULONG; // Interface Types - see ipifcons.h
+ ConnectionType: UCHAR;
+ AccessType: UCHAR;
+ DeviceGuid: TGUID; // Device GUID is the guid of the device
+ // that IP exposes
+ InterfaceGuid: TGUID; // Interface GUID, if not GUID_NULL is the
+ // GUID for the interface mapped to the device.
+ end;
+ PIP_INTERFACE_NAME_INFO = ^IP_INTERFACE_NAME_INFO;
+ {$EXTERNALSYM PIP_INTERFACE_NAME_INFO}
+ TIpInterfaceNameInfo = IP_INTERFACE_NAME_INFO;
+ PIpInterfaceNameInfo = ^IP_INTERFACE_NAME_INFO;
+
+implementation
+
+end.
diff --git a/packages/extra/winunits/jwaisguids.pas b/packages/extra/winunits/jwaisguids.pas
index 67571ec181..47b2e31b27 100644
--- a/packages/extra/winunits/jwaisguids.pas
+++ b/packages/extra/winunits/jwaisguids.pas
@@ -1,82 +1,82 @@
-{******************************************************************************}
-{ }
-{ Internet Shortcut GUID definitions API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: isguids.h, released November 2002. The original Pascal }
-{ code is: JwaIsGuids.pas, released April 2002. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwaisguids.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaIsGuids;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "isguids.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-//
-// isguids.h - Internet Shortcut GUID definitions.
-//
-// Copyright (c) Microsoft Corporation. All rights reserved.
-//
-
-const
- CLSID_InternetShortcut: TGUID = (D1:$FBF23B40; D2:$E3F0; D3:$101B; D4:($84, $88, $00, $AA, $00, $3E, $56, $F8));
- {$EXTERNALSYM CLSID_InternetShortcut}
-
- IID_IUniformResourceLocatorA: TGUID = (D1:$FBF23B80; D2:$E3F0; D3:$101B; D4:($84, $88, $00, $AA, $00, $3E, $56, $F8));
- {$EXTERNALSYM IID_IUniformResourceLocatorA}
- IID_IUniformResourceLocatorW: TGUID = (D1:$CABB0DA0; D2:$DA57; D3:$11CF; D4:($99, $74, $00, $20, $AF, $D7, $97, $62));
- {$EXTERNALSYM IID_IUniformResourceLocatorW}
-
- {$IFDEF UNICODE}
- IID_IUniformResourceLocator: TGUID = (D1:$CABB0DA0; D2:$DA57; D3:$11CF; D4:($99, $74, $00, $20, $AF, $D7, $97, $62));
- {$EXTERNALSYM IID_IUniformResourceLocator}
- {$ELSE}
- IID_IUniformResourceLocator: TGUID = (D1:$FBF23B80; D2:$E3F0; D3:$101B; D4:($84, $88, $00, $AA, $00, $3E, $56, $F8));
- {$EXTERNALSYM IID_IUniformResourceLocator}
- {$ENDIF UNICODE}
-
-implementation
-
-end.
+{******************************************************************************}
+{ }
+{ Internet Shortcut GUID definitions API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: isguids.h, released November 2002. The original Pascal }
+{ code is: JwaIsGuids.pas, released April 2002. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwaisguids.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaIsGuids;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "isguids.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+//
+// isguids.h - Internet Shortcut GUID definitions.
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+//
+
+const
+ CLSID_InternetShortcut: TGUID = (D1:$FBF23B40; D2:$E3F0; D3:$101B; D4:($84, $88, $00, $AA, $00, $3E, $56, $F8));
+ {$EXTERNALSYM CLSID_InternetShortcut}
+
+ IID_IUniformResourceLocatorA: TGUID = (D1:$FBF23B80; D2:$E3F0; D3:$101B; D4:($84, $88, $00, $AA, $00, $3E, $56, $F8));
+ {$EXTERNALSYM IID_IUniformResourceLocatorA}
+ IID_IUniformResourceLocatorW: TGUID = (D1:$CABB0DA0; D2:$DA57; D3:$11CF; D4:($99, $74, $00, $20, $AF, $D7, $97, $62));
+ {$EXTERNALSYM IID_IUniformResourceLocatorW}
+
+ {$IFDEF UNICODE}
+ IID_IUniformResourceLocator: TGUID = (D1:$CABB0DA0; D2:$DA57; D3:$11CF; D4:($99, $74, $00, $20, $AF, $D7, $97, $62));
+ {$EXTERNALSYM IID_IUniformResourceLocator}
+ {$ELSE}
+ IID_IUniformResourceLocator: TGUID = (D1:$FBF23B80; D2:$E3F0; D3:$101B; D4:($84, $88, $00, $AA, $00, $3E, $56, $F8));
+ {$EXTERNALSYM IID_IUniformResourceLocator}
+ {$ENDIF UNICODE}
+
+implementation
+
+end.
diff --git a/packages/extra/winunits/jwaissper16.pas b/packages/extra/winunits/jwaissper16.pas
index 3f4903e452..c588f3772e 100644
--- a/packages/extra/winunits/jwaissper16.pas
+++ b/packages/extra/winunits/jwaissper16.pas
@@ -1,400 +1,400 @@
-{******************************************************************************}
-{ }
-{ Security Package Error Codes API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: issper16.h, released June 2000. The original Pascal }
-{ code is: IssPer16.pas, released December 2000. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwaissper16.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaIssPer16;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "issper16.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaSSPI;
-
-// Define the severities
-//
-// Values are 32 bit values layed out as follows:
-//
-// 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1
-// 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
-// +---+-+-+-----------------------+-------------------------------+
-// |Sev|C|R| Facility | Code |
-// +---+-+-+-----------------------+-------------------------------+
-//
-// where
-//
-// Sev - is the severity code
-//
-// 00 - Success
-// 01 - Informational
-// 10 - Warning
-// 11 - Error
-//
-// C - is the Customer code flag
-//
-// R - is a reserved bit
-//
-// Facility - is the facility code
-//
-// Code - is the facility's status code
-//
-//
-// Define the facility codes
-//
-
-const
- FACILITY_SECURITY = $9;
- {$EXTERNALSYM FACILITY_SECURITY}
- FACILITY_NULL = 0;
- {$EXTERNALSYM FACILITY_NULL}
-
-//
-// Define the severity codes
-//
-
- STATUS_SEVERITY_SUCCESS = $0;
- {$EXTERNALSYM STATUS_SEVERITY_SUCCESS}
- STATUS_SEVERITY_COERROR = $2;
- {$EXTERNALSYM STATUS_SEVERITY_COERROR}
-
-//
-// MessageId: SEC_E_INSUFFICIENT_MEMORY
-//
-// MessageText:
-//
-// Not enough memory is available to complete this request
-//
-
- SEC_E_INSUFFICIENT_MEMORY = SECURITY_STATUS($1300);
- {$EXTERNALSYM SEC_E_INSUFFICIENT_MEMORY}
-
-//
-// MessageId: SEC_E_INVALID_HANDLE
-//
-// MessageText:
-//
-// The handle specified is invalid
-//
-
- SEC_E_INVALID_HANDLE = SECURITY_STATUS($1301);
- {$EXTERNALSYM SEC_E_INVALID_HANDLE}
-
-//
-// MessageId: SEC_E_UNSUPPORTED_FUNCTION
-//
-// MessageText:
-//
-// The function requested is not supported
-//
-
- SEC_E_UNSUPPORTED_FUNCTION = SECURITY_STATUS($1302);
- {$EXTERNALSYM SEC_E_UNSUPPORTED_FUNCTION}
-
-//
-// MessageId: SEC_E_TARGET_UNKNOWN
-//
-// MessageText:
-//
-// The specified target is unknown or unreachable
-//
-
- SEC_E_TARGET_UNKNOWN = SECURITY_STATUS($1303);
- {$EXTERNALSYM SEC_E_TARGET_UNKNOWN}
-
-//
-// MessageId: SEC_E_INTERNAL_ERROR
-//
-// MessageText:
-//
-// The Local Security Authority cannot be contacted
-//
-
- SEC_E_INTERNAL_ERROR = SECURITY_STATUS($1304);
- {$EXTERNALSYM SEC_E_INTERNAL_ERROR}
-
-//
-// MessageId: SEC_E_SECPKG_NOT_FOUND
-//
-// MessageText:
-//
-// The requested security package does not exist
-//
-
- SEC_E_SECPKG_NOT_FOUND = SECURITY_STATUS($1305);
- {$EXTERNALSYM SEC_E_SECPKG_NOT_FOUND}
-
-//
-// MessageId: SEC_E_NOT_OWNER
-//
-// MessageText:
-//
-// The caller is not the owner of the desired credentials
-//
-
- SEC_E_NOT_OWNER = SECURITY_STATUS($1306);
- {$EXTERNALSYM SEC_E_NOT_OWNER}
-
-//
-// MessageId: SEC_E_CANNOT_INSTALL
-//
-// MessageText:
-//
-// The security package failed to initialize, and cannot be installed
-//
-
- SEC_E_CANNOT_INSTALL = SECURITY_STATUS($1307);
- {$EXTERNALSYM SEC_E_CANNOT_INSTALL}
-
-//
-// MessageId: SEC_E_INVALID_TOKEN
-//
-// MessageText:
-//
-// The token supplied to the function is invalid
-//
-
- SEC_E_INVALID_TOKEN = SECURITY_STATUS($1308);
- {$EXTERNALSYM SEC_E_INVALID_TOKEN}
-
-//
-// MessageId: SEC_E_CANNOT_PACK
-//
-// MessageText:
-//
-// The security package is not able to marshall the logon buffer,
-// so the logon attempt has failed
-//
-
- SEC_E_CANNOT_PACK = SECURITY_STATUS($1309);
- {$EXTERNALSYM SEC_E_CANNOT_PACK}
-
-//
-// MessageId: SEC_E_QOP_NOT_SUPPORTED
-//
-// MessageText:
-//
-// The per-message Quality of Protection is not supported by the
-// security package
-//
-
- SEC_E_QOP_NOT_SUPPORTED = SECURITY_STATUS($130A);
- {$EXTERNALSYM SEC_E_QOP_NOT_SUPPORTED}
-
-//
-// MessageId: SEC_E_NO_IMPERSONATION
-//
-// MessageText:
-//
-// The security context does not allow impersonation of the client
-//
-
- SEC_E_NO_IMPERSONATION = SECURITY_STATUS($130B);
- {$EXTERNALSYM SEC_E_NO_IMPERSONATION}
-
-//
-// MessageId: SEC_E_LOGON_DENIED
-//
-// MessageText:
-//
-// The logon attempt failed
-//
-
- SEC_E_LOGON_DENIED = SECURITY_STATUS($130C);
- {$EXTERNALSYM SEC_E_LOGON_DENIED}
-
-//
-// MessageId: SEC_E_UNKNOWN_CREDENTIALS
-//
-// MessageText:
-//
-// The credentials supplied to the package were not
-// recognized
-//
-
- SEC_E_UNKNOWN_CREDENTIALS = SECURITY_STATUS($130D);
- {$EXTERNALSYM SEC_E_UNKNOWN_CREDENTIALS}
-
-//
-// MessageId: SEC_E_NO_CREDENTIALS
-//
-// MessageText:
-//
-// No credentials are available in the security package
-//
-
- SEC_E_NO_CREDENTIALS = SECURITY_STATUS($130E);
- {$EXTERNALSYM SEC_E_NO_CREDENTIALS}
-
-//
-// MessageId: SEC_E_MESSAGE_ALTERED
-//
-// MessageText:
-//
-// The message supplied for verification has been altered
-//
-
- SEC_E_MESSAGE_ALTERED = SECURITY_STATUS($130F);
- {$EXTERNALSYM SEC_E_MESSAGE_ALTERED}
-
-//
-// MessageId: SEC_E_OUT_OF_SEQUENCE
-//
-// MessageText:
-//
-// The message supplied for verification is out of sequence
-//
-
- SEC_E_OUT_OF_SEQUENCE = SECURITY_STATUS($1310);
- {$EXTERNALSYM SEC_E_OUT_OF_SEQUENCE}
-
-//
-// MessageId: SEC_E_NO_AUTHENTICATING_AUTHORITY
-//
-// MessageText:
-//
-// No authority could be contacted for authentication.
-//
-
- SEC_E_NO_AUTHENTICATING_AUTHORITY = SECURITY_STATUS($1311);
- {$EXTERNALSYM SEC_E_NO_AUTHENTICATING_AUTHORITY}
-
-// MessageId: SEC_E_CONTEXT_EXPIRED
-//
-// MessageText:
-//
-// The context has expired and can no longer be used.
-//
-
- SEC_E_CONTEXT_EXPIRED = SECURITY_STATUS($1312);
- {$EXTERNALSYM SEC_E_CONTEXT_EXPIRED}
-
-//
-// MessageId: SEC_E_INCOMPLETE_MESSAGE
-//
-// MessageText:
-//
-// The supplied message is incomplete. The signature was not verified.
-//
-
- SEC_E_INCOMPLETE_MESSAGE = SECURITY_STATUS($1313);
- {$EXTERNALSYM SEC_E_INCOMPLETE_MESSAGE}
-
-//
-// MessageId: SEC_I_CONTINUE_NEEDED
-//
-// MessageText:
-//
-// The function completed successfully, but must be called
-// again to complete the context
-//
-
- SEC_I_CONTINUE_NEEDED = SECURITY_STATUS($1012);
- {$EXTERNALSYM SEC_I_CONTINUE_NEEDED}
-
-//
-// MessageId: SEC_I_COMPLETE_NEEDED
-//
-// MessageText:
-//
-// The function completed successfully, but CompleteToken
-// must be called
-//
-
- SEC_I_COMPLETE_NEEDED = SECURITY_STATUS($1013);
- {$EXTERNALSYM SEC_I_COMPLETE_NEEDED}
-
-//
-// MessageId: SEC_I_COMPLETE_AND_CONTINUE
-//
-// MessageText:
-//
-// The function completed successfully, but both CompleteToken
-// and this function must be called to complete the context
-//
-
- SEC_I_COMPLETE_AND_CONTINUE = SECURITY_STATUS($1014);
- {$EXTERNALSYM SEC_I_COMPLETE_AND_CONTINUE}
-
-//
-// MessageId: SEC_I_LOCAL_LOGON
-//
-// MessageText:
-//
-// The logon was completed, but no network authority was
-// available. The logon was made using locally known information
-//
-
- SEC_I_LOCAL_LOGON = SECURITY_STATUS($1015);
- {$EXTERNALSYM SEC_I_LOCAL_LOGON}
-
-//
-// MessageId: SEC_E_OK
-//
-// MessageText:
-//
-// Call completed successfully
-//
-
- SEC_E_OK = SECURITY_STATUS($0000);
- {$EXTERNALSYM SEC_E_OK}
-
-//
-// Older error names for backwards compatibility
-//
-
- SEC_E_NOT_SUPPORTED = SEC_E_UNSUPPORTED_FUNCTION;
- {$EXTERNALSYM SEC_E_NOT_SUPPORTED}
- SEC_E_NO_SPM = SEC_E_INTERNAL_ERROR;
- {$EXTERNALSYM SEC_E_NO_SPM}
- SEC_E_BAD_PKGID = SEC_E_SECPKG_NOT_FOUND;
- {$EXTERNALSYM SEC_E_BAD_PKGID}
-
-implementation
-
-end.
+{******************************************************************************}
+{ }
+{ Security Package Error Codes API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: issper16.h, released June 2000. The original Pascal }
+{ code is: IssPer16.pas, released December 2000. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwaissper16.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaIssPer16;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "issper16.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaSSPI;
+
+// Define the severities
+//
+// Values are 32 bit values layed out as follows:
+//
+// 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1
+// 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
+// +---+-+-+-----------------------+-------------------------------+
+// |Sev|C|R| Facility | Code |
+// +---+-+-+-----------------------+-------------------------------+
+//
+// where
+//
+// Sev - is the severity code
+//
+// 00 - Success
+// 01 - Informational
+// 10 - Warning
+// 11 - Error
+//
+// C - is the Customer code flag
+//
+// R - is a reserved bit
+//
+// Facility - is the facility code
+//
+// Code - is the facility's status code
+//
+//
+// Define the facility codes
+//
+
+const
+ FACILITY_SECURITY = $9;
+ {$EXTERNALSYM FACILITY_SECURITY}
+ FACILITY_NULL = 0;
+ {$EXTERNALSYM FACILITY_NULL}
+
+//
+// Define the severity codes
+//
+
+ STATUS_SEVERITY_SUCCESS = $0;
+ {$EXTERNALSYM STATUS_SEVERITY_SUCCESS}
+ STATUS_SEVERITY_COERROR = $2;
+ {$EXTERNALSYM STATUS_SEVERITY_COERROR}
+
+//
+// MessageId: SEC_E_INSUFFICIENT_MEMORY
+//
+// MessageText:
+//
+// Not enough memory is available to complete this request
+//
+
+ SEC_E_INSUFFICIENT_MEMORY = SECURITY_STATUS($1300);
+ {$EXTERNALSYM SEC_E_INSUFFICIENT_MEMORY}
+
+//
+// MessageId: SEC_E_INVALID_HANDLE
+//
+// MessageText:
+//
+// The handle specified is invalid
+//
+
+ SEC_E_INVALID_HANDLE = SECURITY_STATUS($1301);
+ {$EXTERNALSYM SEC_E_INVALID_HANDLE}
+
+//
+// MessageId: SEC_E_UNSUPPORTED_FUNCTION
+//
+// MessageText:
+//
+// The function requested is not supported
+//
+
+ SEC_E_UNSUPPORTED_FUNCTION = SECURITY_STATUS($1302);
+ {$EXTERNALSYM SEC_E_UNSUPPORTED_FUNCTION}
+
+//
+// MessageId: SEC_E_TARGET_UNKNOWN
+//
+// MessageText:
+//
+// The specified target is unknown or unreachable
+//
+
+ SEC_E_TARGET_UNKNOWN = SECURITY_STATUS($1303);
+ {$EXTERNALSYM SEC_E_TARGET_UNKNOWN}
+
+//
+// MessageId: SEC_E_INTERNAL_ERROR
+//
+// MessageText:
+//
+// The Local Security Authority cannot be contacted
+//
+
+ SEC_E_INTERNAL_ERROR = SECURITY_STATUS($1304);
+ {$EXTERNALSYM SEC_E_INTERNAL_ERROR}
+
+//
+// MessageId: SEC_E_SECPKG_NOT_FOUND
+//
+// MessageText:
+//
+// The requested security package does not exist
+//
+
+ SEC_E_SECPKG_NOT_FOUND = SECURITY_STATUS($1305);
+ {$EXTERNALSYM SEC_E_SECPKG_NOT_FOUND}
+
+//
+// MessageId: SEC_E_NOT_OWNER
+//
+// MessageText:
+//
+// The caller is not the owner of the desired credentials
+//
+
+ SEC_E_NOT_OWNER = SECURITY_STATUS($1306);
+ {$EXTERNALSYM SEC_E_NOT_OWNER}
+
+//
+// MessageId: SEC_E_CANNOT_INSTALL
+//
+// MessageText:
+//
+// The security package failed to initialize, and cannot be installed
+//
+
+ SEC_E_CANNOT_INSTALL = SECURITY_STATUS($1307);
+ {$EXTERNALSYM SEC_E_CANNOT_INSTALL}
+
+//
+// MessageId: SEC_E_INVALID_TOKEN
+//
+// MessageText:
+//
+// The token supplied to the function is invalid
+//
+
+ SEC_E_INVALID_TOKEN = SECURITY_STATUS($1308);
+ {$EXTERNALSYM SEC_E_INVALID_TOKEN}
+
+//
+// MessageId: SEC_E_CANNOT_PACK
+//
+// MessageText:
+//
+// The security package is not able to marshall the logon buffer,
+// so the logon attempt has failed
+//
+
+ SEC_E_CANNOT_PACK = SECURITY_STATUS($1309);
+ {$EXTERNALSYM SEC_E_CANNOT_PACK}
+
+//
+// MessageId: SEC_E_QOP_NOT_SUPPORTED
+//
+// MessageText:
+//
+// The per-message Quality of Protection is not supported by the
+// security package
+//
+
+ SEC_E_QOP_NOT_SUPPORTED = SECURITY_STATUS($130A);
+ {$EXTERNALSYM SEC_E_QOP_NOT_SUPPORTED}
+
+//
+// MessageId: SEC_E_NO_IMPERSONATION
+//
+// MessageText:
+//
+// The security context does not allow impersonation of the client
+//
+
+ SEC_E_NO_IMPERSONATION = SECURITY_STATUS($130B);
+ {$EXTERNALSYM SEC_E_NO_IMPERSONATION}
+
+//
+// MessageId: SEC_E_LOGON_DENIED
+//
+// MessageText:
+//
+// The logon attempt failed
+//
+
+ SEC_E_LOGON_DENIED = SECURITY_STATUS($130C);
+ {$EXTERNALSYM SEC_E_LOGON_DENIED}
+
+//
+// MessageId: SEC_E_UNKNOWN_CREDENTIALS
+//
+// MessageText:
+//
+// The credentials supplied to the package were not
+// recognized
+//
+
+ SEC_E_UNKNOWN_CREDENTIALS = SECURITY_STATUS($130D);
+ {$EXTERNALSYM SEC_E_UNKNOWN_CREDENTIALS}
+
+//
+// MessageId: SEC_E_NO_CREDENTIALS
+//
+// MessageText:
+//
+// No credentials are available in the security package
+//
+
+ SEC_E_NO_CREDENTIALS = SECURITY_STATUS($130E);
+ {$EXTERNALSYM SEC_E_NO_CREDENTIALS}
+
+//
+// MessageId: SEC_E_MESSAGE_ALTERED
+//
+// MessageText:
+//
+// The message supplied for verification has been altered
+//
+
+ SEC_E_MESSAGE_ALTERED = SECURITY_STATUS($130F);
+ {$EXTERNALSYM SEC_E_MESSAGE_ALTERED}
+
+//
+// MessageId: SEC_E_OUT_OF_SEQUENCE
+//
+// MessageText:
+//
+// The message supplied for verification is out of sequence
+//
+
+ SEC_E_OUT_OF_SEQUENCE = SECURITY_STATUS($1310);
+ {$EXTERNALSYM SEC_E_OUT_OF_SEQUENCE}
+
+//
+// MessageId: SEC_E_NO_AUTHENTICATING_AUTHORITY
+//
+// MessageText:
+//
+// No authority could be contacted for authentication.
+//
+
+ SEC_E_NO_AUTHENTICATING_AUTHORITY = SECURITY_STATUS($1311);
+ {$EXTERNALSYM SEC_E_NO_AUTHENTICATING_AUTHORITY}
+
+// MessageId: SEC_E_CONTEXT_EXPIRED
+//
+// MessageText:
+//
+// The context has expired and can no longer be used.
+//
+
+ SEC_E_CONTEXT_EXPIRED = SECURITY_STATUS($1312);
+ {$EXTERNALSYM SEC_E_CONTEXT_EXPIRED}
+
+//
+// MessageId: SEC_E_INCOMPLETE_MESSAGE
+//
+// MessageText:
+//
+// The supplied message is incomplete. The signature was not verified.
+//
+
+ SEC_E_INCOMPLETE_MESSAGE = SECURITY_STATUS($1313);
+ {$EXTERNALSYM SEC_E_INCOMPLETE_MESSAGE}
+
+//
+// MessageId: SEC_I_CONTINUE_NEEDED
+//
+// MessageText:
+//
+// The function completed successfully, but must be called
+// again to complete the context
+//
+
+ SEC_I_CONTINUE_NEEDED = SECURITY_STATUS($1012);
+ {$EXTERNALSYM SEC_I_CONTINUE_NEEDED}
+
+//
+// MessageId: SEC_I_COMPLETE_NEEDED
+//
+// MessageText:
+//
+// The function completed successfully, but CompleteToken
+// must be called
+//
+
+ SEC_I_COMPLETE_NEEDED = SECURITY_STATUS($1013);
+ {$EXTERNALSYM SEC_I_COMPLETE_NEEDED}
+
+//
+// MessageId: SEC_I_COMPLETE_AND_CONTINUE
+//
+// MessageText:
+//
+// The function completed successfully, but both CompleteToken
+// and this function must be called to complete the context
+//
+
+ SEC_I_COMPLETE_AND_CONTINUE = SECURITY_STATUS($1014);
+ {$EXTERNALSYM SEC_I_COMPLETE_AND_CONTINUE}
+
+//
+// MessageId: SEC_I_LOCAL_LOGON
+//
+// MessageText:
+//
+// The logon was completed, but no network authority was
+// available. The logon was made using locally known information
+//
+
+ SEC_I_LOCAL_LOGON = SECURITY_STATUS($1015);
+ {$EXTERNALSYM SEC_I_LOCAL_LOGON}
+
+//
+// MessageId: SEC_E_OK
+//
+// MessageText:
+//
+// Call completed successfully
+//
+
+ SEC_E_OK = SECURITY_STATUS($0000);
+ {$EXTERNALSYM SEC_E_OK}
+
+//
+// Older error names for backwards compatibility
+//
+
+ SEC_E_NOT_SUPPORTED = SEC_E_UNSUPPORTED_FUNCTION;
+ {$EXTERNALSYM SEC_E_NOT_SUPPORTED}
+ SEC_E_NO_SPM = SEC_E_INTERNAL_ERROR;
+ {$EXTERNALSYM SEC_E_NO_SPM}
+ SEC_E_BAD_PKGID = SEC_E_SECPKG_NOT_FOUND;
+ {$EXTERNALSYM SEC_E_BAD_PKGID}
+
+implementation
+
+end.
diff --git a/packages/extra/winunits/jwalmaccess.pas b/packages/extra/winunits/jwalmaccess.pas
index e6e996753e..88fe7d52e8 100644
--- a/packages/extra/winunits/jwalmaccess.pas
+++ b/packages/extra/winunits/jwalmaccess.pas
@@ -1,2820 +1,2820 @@
-{******************************************************************************}
-{ }
-{ Lan Manager Access API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: lmaccess.h, released November 2001. The original Pascal}
-{ code is: LmAccess.pas, released Februari 2002. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwalmaccess.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaLmAccess;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "lmaccess.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaWinNT, JwaWinType, JwaLmCons;
-
-//
-// Function Prototypes - User
-//
-
-function NetUserAdd(servername: LPCWSTR; level: DWORD; buf: LPBYTE; parm_err: LPDWORD): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetUserAdd}
-
-function NetUserEnum(servername: LPCWSTR; level, filter: DWORD; var bufptr: LPBYTE; prefmaxlen: DWORD; entriesread, totalentries, resume_handle: LPDWORD): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetUserEnum}
-
-function NetUserGetInfo(servername, username: LPCWSTR; level: DWORD; var bufptr: LPBYTE): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetUserGetInfo}
-
-function NetUserSetInfo(servername, username: LPCWSTR; level: DWORD; buf: LPBYTE; parm_err: LPDWORD): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetUserSetInfo}
-
-function NetUserDel(servername: LPCWSTR; username: LPCWSTR): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetUserDel}
-
-function NetUserGetGroups(servername, username: LPCWSTR; level: DWORD; var bufptr: LPBYTE; prefmaxlen: DWORD; entriesread, totalentries: LPDWORD): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetUserGetGroups}
-
-function NetUserSetGroups(servername, username: LPCWSTR; level: DWORD; buf: LPBYTE; num_entries: DWORD): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetUserSetGroups}
-
-function NetUserGetLocalGroups(servername, username: LPCWSTR; level, flags: DWORD; var bufptr: LPBYTE; prefmaxlen: DWORD; entriesread, totalentries: LPDWORD): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetUserGetLocalGroups}
-
-function NetUserModalsGet(servername: LPCWSTR; level: DWORD; var bufptr: LPBYTE): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetUserModalsGet}
-
-function NetUserModalsSet(servername: LPCWSTR; level: DWORD; buf: LPBYTE; parm_err: LPDWORD): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetUserModalsSet}
-
-function NetUserChangePassword(domainname, username, oldpassword, newpassword: LPCWSTR): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetUserChangePassword}
-
-//
-// Data Structures - User
-//
-
-type
- LPUSER_INFO_0 = ^USER_INFO_0;
- {$EXTERNALSYM LPUSER_INFO_0}
- PUSER_INFO_0 = ^USER_INFO_0;
- {$EXTERNALSYM PUSER_INFO_0}
- _USER_INFO_0 = record
- usri0_name: LPWSTR;
- end;
- {$EXTERNALSYM _USER_INFO_0}
- USER_INFO_0 = _USER_INFO_0;
- {$EXTERNALSYM USER_INFO_0}
- TUserInfo0 = USER_INFO_0;
- PUserInfo0 = PUSER_INFO_0;
-
- LPUSER_INFO_1 = ^USER_INFO_1;
- {$EXTERNALSYM LPUSER_INFO_1}
- PUSER_INFO_1 = ^USER_INFO_1;
- {$EXTERNALSYM PUSER_INFO_1}
- _USER_INFO_1 = record
- usri1_name: LPWSTR;
- usri1_password: LPWSTR;
- usri1_password_age: DWORD;
- usri1_priv: DWORD;
- usri1_home_dir: LPWSTR;
- usri1_comment: LPWSTR;
- usri1_flags: DWORD;
- usri1_script_path: LPWSTR;
- end;
- {$EXTERNALSYM _USER_INFO_1}
- USER_INFO_1 = _USER_INFO_1;
- {$EXTERNALSYM USER_INFO_1}
- TUserInfo1 = USER_INFO_1;
- PUserInfo1 = PUSER_INFO_1;
-
- LPUSER_INFO_2 = ^USER_INFO_2;
- {$EXTERNALSYM LPUSER_INFO_2}
- PUSER_INFO_2 = ^USER_INFO_2;
- {$EXTERNALSYM PUSER_INFO_2}
- _USER_INFO_2 = record
- usri2_name: LPWSTR;
- usri2_password: LPWSTR;
- usri2_password_age: DWORD;
- usri2_priv: DWORD;
- usri2_home_dir: LPWSTR;
- usri2_comment: LPWSTR;
- usri2_flags: DWORD;
- usri2_script_path: LPWSTR;
- usri2_auth_flags: DWORD;
- usri2_full_name: LPWSTR;
- usri2_usr_comment: LPWSTR;
- usri2_parms: LPWSTR;
- usri2_workstations: LPWSTR;
- usri2_last_logon: DWORD;
- usri2_last_logoff: DWORD;
- usri2_acct_expires: DWORD;
- usri2_max_storage: DWORD;
- usri2_units_per_week: DWORD;
- usri2_logon_hours: PBYTE;
- usri2_bad_pw_count: DWORD;
- usri2_num_logons: DWORD;
- usri2_logon_server: LPWSTR;
- usri2_country_code: DWORD;
- usri2_code_page: DWORD;
- end;
- {$EXTERNALSYM _USER_INFO_2}
- USER_INFO_2 = _USER_INFO_2;
- {$EXTERNALSYM USER_INFO_2}
- TUserInfo2 = USER_INFO_2;
- PUserInfo2 = PUSER_INFO_2;
-
- LPUSER_INFO_3 = ^USER_INFO_3;
- {$EXTERNALSYM LPUSER_INFO_3}
- PUSER_INFO_3 = ^USER_INFO_3;
- {$EXTERNALSYM PUSER_INFO_3}
- _USER_INFO_3 = record
- usri3_name: LPWSTR;
- usri3_password: LPWSTR;
- usri3_password_age: DWORD;
- usri3_priv: DWORD;
- usri3_home_dir: LPWSTR;
- usri3_comment: LPWSTR;
- usri3_flags: DWORD;
- usri3_script_path: LPWSTR;
- usri3_auth_flags: DWORD;
- usri3_full_name: LPWSTR;
- usri3_usr_comment: LPWSTR;
- usri3_parms: LPWSTR;
- usri3_workstations: LPWSTR;
- usri3_last_logon: DWORD;
- usri3_last_logoff: DWORD;
- usri3_acct_expires: DWORD;
- usri3_max_storage: DWORD;
- usri3_units_per_week: DWORD;
- usri3_logon_hours: PBYTE;
- usri3_bad_pw_count: DWORD;
- usri3_num_logons: DWORD;
- usri3_logon_server: LPWSTR;
- usri3_country_code: DWORD;
- usri3_code_page: DWORD;
- usri3_user_id: DWORD;
- usri3_primary_group_id: DWORD;
- usri3_profile: LPWSTR;
- usri3_home_dir_drive: LPWSTR;
- usri3_password_expired: DWORD;
- end;
- {$EXTERNALSYM _USER_INFO_3}
- USER_INFO_3 = _USER_INFO_3;
- {$EXTERNALSYM USER_INFO_3}
- TUserInfo3 = USER_INFO_3;
- PUserInfo3 = PUSER_INFO_3;
-
- LPUSER_INFO_4 = ^USER_INFO_4;
- {$EXTERNALSYM LPUSER_INFO_4}
- PUSER_INFO_4 = ^USER_INFO_4;
- {$EXTERNALSYM PUSER_INFO_4}
- _USER_INFO_4 = record
- usri4_name: LPWSTR;
- usri4_password: LPWSTR;
- usri4_password_age: DWORD;
- usri4_priv: DWORD;
- usri4_home_dir: LPWSTR;
- usri4_comment: LPWSTR;
- usri4_flags: DWORD;
- usri4_script_path: LPWSTR;
- usri4_auth_flags: DWORD;
- usri4_full_name: LPWSTR;
- usri4_usr_comment: LPWSTR;
- usri4_parms: LPWSTR;
- usri4_workstations: LPWSTR;
- usri4_last_logon: DWORD;
- usri4_last_logoff: DWORD;
- usri4_acct_expires: DWORD;
- usri4_max_storage: DWORD;
- usri4_units_per_week: DWORD;
- usri4_logon_hours: PBYTE;
- usri4_bad_pw_count: DWORD;
- usri4_num_logons: DWORD;
- usri4_logon_server: LPWSTR;
- usri4_country_code: DWORD;
- usri4_code_page: DWORD;
- usri4_user_sid: PSID;
- usri4_primary_group_id: DWORD;
- usri4_profile: LPWSTR;
- usri4_home_dir_drive: LPWSTR;
- usri4_password_expired: DWORD;
- end;
- {$EXTERNALSYM _USER_INFO_4}
- USER_INFO_4 = _USER_INFO_4;
- {$EXTERNALSYM USER_INFO_4}
- TUserInfo4 = USER_INFO_4;
- PUserInfo4 = PUSER_INFO_4;
-
- LPUSER_INFO_10 = ^USER_INFO_10;
- {$EXTERNALSYM LPUSER_INFO_10}
- PUSER_INFO_10 = ^USER_INFO_10;
- {$EXTERNALSYM PUSER_INFO_10}
- _USER_INFO_10 = record
- usri10_name: LPWSTR;
- usri10_comment: LPWSTR;
- usri10_usr_comment: LPWSTR;
- usri10_full_name: LPWSTR;
- end;
- {$EXTERNALSYM _USER_INFO_10}
- USER_INFO_10 = _USER_INFO_10;
- {$EXTERNALSYM USER_INFO_10}
- TUserInfo10 = USER_INFO_10;
- PUserInfo10 = PUSER_INFO_10;
-
- LPUSER_INFO_11 = ^USER_INFO_11;
- {$EXTERNALSYM LPUSER_INFO_11}
- PUSER_INFO_11 = ^USER_INFO_11;
- {$EXTERNALSYM PUSER_INFO_11}
- _USER_INFO_11 = record
- usri11_name: LPWSTR;
- usri11_comment: LPWSTR;
- usri11_usr_comment: LPWSTR;
- usri11_full_name: LPWSTR;
- usri11_priv: DWORD;
- usri11_auth_flags: DWORD;
- usri11_password_age: DWORD;
- usri11_home_dir: LPWSTR;
- usri11_parms: LPWSTR;
- usri11_last_logon: DWORD;
- usri11_last_logoff: DWORD;
- usri11_bad_pw_count: DWORD;
- usri11_num_logons: DWORD;
- usri11_logon_server: LPWSTR;
- usri11_country_code: DWORD;
- usri11_workstations: LPWSTR;
- usri11_max_storage: DWORD;
- usri11_units_per_week: DWORD;
- usri11_logon_hours: PBYTE;
- usri11_code_page: DWORD;
- end;
- {$EXTERNALSYM _USER_INFO_11}
- USER_INFO_11 = _USER_INFO_11;
- {$EXTERNALSYM USER_INFO_11}
- TUserInfo11 = USER_INFO_11;
- PUserInfo11 = PUSER_INFO_11;
-
- LPUSER_INFO_20 = ^USER_INFO_20;
- {$EXTERNALSYM LPUSER_INFO_20}
- PUSER_INFO_20 = ^USER_INFO_20;
- {$EXTERNALSYM PUSER_INFO_20}
- _USER_INFO_20 = record
- usri20_name: LPWSTR;
- usri20_full_name: LPWSTR;
- usri20_comment: LPWSTR;
- usri20_flags: DWORD;
- usri20_user_id: DWORD;
- end;
- {$EXTERNALSYM _USER_INFO_20}
- USER_INFO_20 = _USER_INFO_20;
- {$EXTERNALSYM USER_INFO_20}
- TUserInfo20 = USER_INFO_20;
- PUserInfo20 = PUSER_INFO_20;
-
- LPUSER_INFO_21 = ^USER_INFO_21;
- {$EXTERNALSYM LPUSER_INFO_21}
- PUSER_INFO_21 = ^USER_INFO_21;
- {$EXTERNALSYM PUSER_INFO_21}
- _USER_INFO_21 = record
- usri21_password: array [0..ENCRYPTED_PWLEN - 1] of BYTE;
- end;
- {$EXTERNALSYM _USER_INFO_21}
- USER_INFO_21 = _USER_INFO_21;
- {$EXTERNALSYM USER_INFO_21}
- TUserInfo21 = USER_INFO_21;
- PUserInfo21 = PUSER_INFO_21;
-
- LPUSER_INFO_22 = ^USER_INFO_22;
- {$EXTERNALSYM LPUSER_INFO_22}
- PUSER_INFO_22 = ^USER_INFO_22;
- {$EXTERNALSYM PUSER_INFO_22}
- _USER_INFO_22 = record
- usri22_name: LPWSTR;
- usri22_password: array [0..ENCRYPTED_PWLEN - 1] of BYTE;
- usri22_password_age: DWORD;
- usri22_priv: DWORD;
- usri22_home_dir: LPWSTR;
- usri22_comment: LPWSTR;
- usri22_flags: DWORD;
- usri22_script_path: LPWSTR;
- usri22_auth_flags: DWORD;
- usri22_full_name: LPWSTR;
- usri22_usr_comment: LPWSTR;
- usri22_parms: LPWSTR;
- usri22_workstations: LPWSTR;
- usri22_last_logon: DWORD;
- usri22_last_logoff: DWORD;
- usri22_acct_expires: DWORD;
- usri22_max_storage: DWORD;
- usri22_units_per_week: DWORD;
- usri22_logon_hours: PBYTE;
- usri22_bad_pw_count: DWORD;
- usri22_num_logons: DWORD;
- usri22_logon_server: LPWSTR;
- usri22_country_code: DWORD;
- usri22_code_page: DWORD;
- end;
- {$EXTERNALSYM _USER_INFO_22}
- USER_INFO_22 = _USER_INFO_22;
- {$EXTERNALSYM USER_INFO_22}
- TUserInfo22 = USER_INFO_22;
- PUserInfo22 = PUSER_INFO_22;
-
- LPUSER_INFO_23 = ^USER_INFO_23;
- {$EXTERNALSYM LPUSER_INFO_23}
- PUSER_INFO_23 = ^USER_INFO_23;
- {$EXTERNALSYM PUSER_INFO_23}
- _USER_INFO_23 = record
- usri23_name: LPWSTR;
- usri23_full_name: LPWSTR;
- usri23_comment: LPWSTR;
- usri23_flags: DWORD;
- usri23_user_sid: PSID;
- end;
- {$EXTERNALSYM _USER_INFO_23}
- USER_INFO_23 = _USER_INFO_23;
- {$EXTERNALSYM USER_INFO_23}
- TUserInfo23 = USER_INFO_23;
- PUserInfo23 = PUSER_INFO_23;
-
- LPUSER_INFO_1003 = ^USER_INFO_1003;
- {$EXTERNALSYM LPUSER_INFO_1003}
- PUSER_INFO_1003 = ^USER_INFO_1003;
- {$EXTERNALSYM PUSER_INFO_1003}
- _USER_INFO_1003 = record
- usri1003_password: LPWSTR;
- end;
- {$EXTERNALSYM _USER_INFO_1003}
- USER_INFO_1003 = _USER_INFO_1003;
- {$EXTERNALSYM USER_INFO_1003}
- TUserInfo1003 = USER_INFO_1003;
- PUserInfo1003 = PUSER_INFO_1003;
-
- LPUSER_INFO_1005 = ^USER_INFO_1005;
- {$EXTERNALSYM LPUSER_INFO_1005}
- PUSER_INFO_1005 = ^USER_INFO_1005;
- {$EXTERNALSYM PUSER_INFO_1005}
- _USER_INFO_1005 = record
- usri1005_priv: DWORD;
- end;
- {$EXTERNALSYM _USER_INFO_1005}
- USER_INFO_1005 = _USER_INFO_1005;
- {$EXTERNALSYM USER_INFO_1005}
- TUserInfo1005 = USER_INFO_1005;
- PUserInfo1005 = PUSER_INFO_1005;
-
- LPUSER_INFO_1006 = ^USER_INFO_1006;
- {$EXTERNALSYM LPUSER_INFO_1006}
- PUSER_INFO_1006 = ^USER_INFO_1006;
- {$EXTERNALSYM PUSER_INFO_1006}
- _USER_INFO_1006 = record
- usri1006_home_dir: LPWSTR;
- end;
- {$EXTERNALSYM _USER_INFO_1006}
- USER_INFO_1006 = _USER_INFO_1006;
- {$EXTERNALSYM USER_INFO_1006}
- TUserInfo1006 = USER_INFO_1006;
- PUserInfo1006 = PUSER_INFO_1006;
-
- LPUSER_INFO_1007 = ^USER_INFO_1007;
- {$EXTERNALSYM LPUSER_INFO_1007}
- PUSER_INFO_1007 = ^USER_INFO_1007;
- {$EXTERNALSYM PUSER_INFO_1007}
- _USER_INFO_1007 = record
- usri1007_comment: LPWSTR;
- end;
- {$EXTERNALSYM _USER_INFO_1007}
- USER_INFO_1007 = _USER_INFO_1007;
- {$EXTERNALSYM USER_INFO_1007}
- TUserInfo1007 = USER_INFO_1007;
- PUserInfo1007 = PUSER_INFO_1007;
-
- LPUSER_INFO_1008 = ^USER_INFO_1008;
- {$EXTERNALSYM LPUSER_INFO_1008}
- PUSER_INFO_1008 = ^USER_INFO_1008;
- {$EXTERNALSYM PUSER_INFO_1008}
- _USER_INFO_1008 = record
- usri1008_flags: DWORD;
- end;
- {$EXTERNALSYM _USER_INFO_1008}
- USER_INFO_1008 = _USER_INFO_1008;
- {$EXTERNALSYM USER_INFO_1008}
- TUserInfo1008 = USER_INFO_1008;
- PUserInfo1008 = PUSER_INFO_1008;
-
- LPUSER_INFO_1009 = ^USER_INFO_1009;
- {$EXTERNALSYM LPUSER_INFO_1009}
- PUSER_INFO_1009 = ^USER_INFO_1009;
- {$EXTERNALSYM PUSER_INFO_1009}
- _USER_INFO_1009 = record
- usri1009_script_path: LPWSTR;
- end;
- {$EXTERNALSYM _USER_INFO_1009}
- USER_INFO_1009 = _USER_INFO_1009;
- {$EXTERNALSYM USER_INFO_1009}
- TUserInfo1009 = USER_INFO_1009;
- PUserInfo1009 = PUSER_INFO_1009;
-
- LPUSER_INFO_1010 = ^USER_INFO_1010;
- {$EXTERNALSYM LPUSER_INFO_1010}
- PUSER_INFO_1010 = ^USER_INFO_1010;
- {$EXTERNALSYM PUSER_INFO_1010}
- _USER_INFO_1010 = record
- usri1010_auth_flags: DWORD;
- end;
- {$EXTERNALSYM _USER_INFO_1010}
- USER_INFO_1010 = _USER_INFO_1010;
- {$EXTERNALSYM USER_INFO_1010}
- TUserInfo1010 = USER_INFO_1010;
- PUserInfo1010 = PUSER_INFO_1010;
-
- LPUSER_INFO_1011 = ^USER_INFO_1011;
- {$EXTERNALSYM LPUSER_INFO_1011}
- PUSER_INFO_1011 = ^USER_INFO_1011;
- {$EXTERNALSYM PUSER_INFO_1011}
- _USER_INFO_1011 = record
- usri1011_full_name: LPWSTR;
- end;
- {$EXTERNALSYM _USER_INFO_1011}
- USER_INFO_1011 = _USER_INFO_1011;
- {$EXTERNALSYM USER_INFO_1011}
- TUserInfo1011 = USER_INFO_1011;
- PUserInfo1011 = PUSER_INFO_1011;
-
- LPUSER_INFO_1012 = ^USER_INFO_1012;
- {$EXTERNALSYM LPUSER_INFO_1012}
- PUSER_INFO_1012 = ^USER_INFO_1012;
- {$EXTERNALSYM PUSER_INFO_1012}
- _USER_INFO_1012 = record
- usri1012_usr_comment: LPWSTR;
- end;
- {$EXTERNALSYM _USER_INFO_1012}
- USER_INFO_1012 = _USER_INFO_1012;
- {$EXTERNALSYM USER_INFO_1012}
- TUserInfo1012 = USER_INFO_1012;
- PUserInfo1012 = PUSER_INFO_1012;
-
- LPUSER_INFO_1013 = ^USER_INFO_1013;
- {$EXTERNALSYM LPUSER_INFO_1013}
- PUSER_INFO_1013 = ^USER_INFO_1013;
- {$EXTERNALSYM PUSER_INFO_1013}
- _USER_INFO_1013 = record
- usri1013_parms: LPWSTR;
- end;
- {$EXTERNALSYM _USER_INFO_1013}
- USER_INFO_1013 = _USER_INFO_1013;
- {$EXTERNALSYM USER_INFO_1013}
- TUserInfo1013 = USER_INFO_1013;
- PUserInfo1013 = PUSER_INFO_1013;
-
- LPUSER_INFO_1014 = ^USER_INFO_1014;
- {$EXTERNALSYM LPUSER_INFO_1014}
- PUSER_INFO_1014 = ^USER_INFO_1014;
- {$EXTERNALSYM PUSER_INFO_1014}
- _USER_INFO_1014 = record
- usri1014_workstations: LPWSTR;
- end;
- {$EXTERNALSYM _USER_INFO_1014}
- USER_INFO_1014 = _USER_INFO_1014;
- {$EXTERNALSYM USER_INFO_1014}
- TUserInfo1014 = USER_INFO_1014;
- PUserInfo1014 = PUSER_INFO_1014;
-
- LPUSER_INFO_1017 = ^USER_INFO_1017;
- {$EXTERNALSYM LPUSER_INFO_1017}
- PUSER_INFO_1017 = ^USER_INFO_1017;
- {$EXTERNALSYM PUSER_INFO_1017}
- _USER_INFO_1017 = record
- usri1017_acct_expires: DWORD;
- end;
- {$EXTERNALSYM _USER_INFO_1017}
- USER_INFO_1017 = _USER_INFO_1017;
- {$EXTERNALSYM USER_INFO_1017}
- TUserInfo1017 = USER_INFO_1017;
- PUserInfo1017 = PUSER_INFO_1017;
-
- LPUSER_INFO_1018 = ^USER_INFO_1018;
- {$EXTERNALSYM LPUSER_INFO_1018}
- PUSER_INFO_1018 = ^USER_INFO_1018;
- {$EXTERNALSYM PUSER_INFO_1018}
- _USER_INFO_1018 = record
- usri1018_max_storage: DWORD;
- end;
- {$EXTERNALSYM _USER_INFO_1018}
- USER_INFO_1018 = _USER_INFO_1018;
- {$EXTERNALSYM USER_INFO_1018}
- TUserInfo1018 = USER_INFO_1018;
- PUserInfo1018 = PUSER_INFO_1018;
-
- LPUSER_INFO_1020 = ^USER_INFO_1020;
- {$EXTERNALSYM LPUSER_INFO_1020}
- PUSER_INFO_1020 = ^USER_INFO_1020;
- {$EXTERNALSYM PUSER_INFO_1020}
- _USER_INFO_1020 = record
- usri1020_units_per_week: DWORD;
- usri1020_logon_hours: LPBYTE;
- end;
- {$EXTERNALSYM _USER_INFO_1020}
- USER_INFO_1020 = _USER_INFO_1020;
- {$EXTERNALSYM USER_INFO_1020}
- TUserInfo1020 = USER_INFO_1020;
- PUserInfo1020 = PUSER_INFO_1020;
-
- LPUSER_INFO_1023 = ^USER_INFO_1023;
- {$EXTERNALSYM LPUSER_INFO_1023}
- PUSER_INFO_1023 = ^USER_INFO_1023;
- {$EXTERNALSYM PUSER_INFO_1023}
- _USER_INFO_1023 = record
- usri1023_logon_server: LPWSTR;
- end;
- {$EXTERNALSYM _USER_INFO_1023}
- USER_INFO_1023 = _USER_INFO_1023;
- {$EXTERNALSYM USER_INFO_1023}
- TUserInfo1023 = USER_INFO_1023;
- PUserInfo1023 = PUSER_INFO_1023;
-
- LPUSER_INFO_1024 = ^USER_INFO_1024;
- {$EXTERNALSYM LPUSER_INFO_1024}
- PUSER_INFO_1024 = ^USER_INFO_1024;
- {$EXTERNALSYM PUSER_INFO_1024}
- _USER_INFO_1024 = record
- usri1024_country_code: DWORD;
- end;
- {$EXTERNALSYM _USER_INFO_1024}
- USER_INFO_1024 = _USER_INFO_1024;
- {$EXTERNALSYM USER_INFO_1024}
- TUserInfo1024 = USER_INFO_1024;
- PUserInfo1024 = PUSER_INFO_1024;
-
- LPUSER_INFO_1025 = ^USER_INFO_1025;
- {$EXTERNALSYM LPUSER_INFO_1025}
- PUSER_INFO_1025 = ^USER_INFO_1025;
- {$EXTERNALSYM PUSER_INFO_1025}
- _USER_INFO_1025 = record
- usri1025_code_page: DWORD;
- end;
- {$EXTERNALSYM _USER_INFO_1025}
- USER_INFO_1025 = _USER_INFO_1025;
- {$EXTERNALSYM USER_INFO_1025}
- TUserInfo1025 = USER_INFO_1025;
- PUserInfo1025 = PUSER_INFO_1025;
-
- LPUSER_INFO_1051 = ^USER_INFO_1051;
- {$EXTERNALSYM LPUSER_INFO_1051}
- PUSER_INFO_1051 = ^USER_INFO_1051;
- {$EXTERNALSYM PUSER_INFO_1051}
- _USER_INFO_1051 = record
- usri1051_primary_group_id: DWORD;
- end;
- {$EXTERNALSYM _USER_INFO_1051}
- USER_INFO_1051 = _USER_INFO_1051;
- {$EXTERNALSYM USER_INFO_1051}
- TUserInfo1051 = USER_INFO_1051;
- PUserInfo1051 = PUSER_INFO_1051;
-
- LPUSER_INFO_1052 = ^USER_INFO_1052;
- {$EXTERNALSYM LPUSER_INFO_1052}
- PUSER_INFO_1052 = ^USER_INFO_1052;
- {$EXTERNALSYM PUSER_INFO_1052}
- _USER_INFO_1052 = record
- usri1052_profile: LPWSTR;
- end;
- {$EXTERNALSYM _USER_INFO_1052}
- USER_INFO_1052 = _USER_INFO_1052;
- {$EXTERNALSYM USER_INFO_1052}
- TUserInfo1052 = USER_INFO_1052;
- PUserInfo1052 = PUSER_INFO_1052;
-
- LPUSER_INFO_1053 = ^USER_INFO_1053;
- {$EXTERNALSYM LPUSER_INFO_1053}
- PUSER_INFO_1053 = ^USER_INFO_1053;
- {$EXTERNALSYM PUSER_INFO_1053}
- _USER_INFO_1053 = record
- usri1053_home_dir_drive: LPWSTR;
- end;
- {$EXTERNALSYM _USER_INFO_1053}
- USER_INFO_1053 = _USER_INFO_1053;
- {$EXTERNALSYM USER_INFO_1053}
- TUserInfo1053 = USER_INFO_1053;
- PUserInfo1053 = PUSER_INFO_1053;
-
-//
-// Data Structures - User Modals
-//
-
- LPUSER_MODALS_INFO_0 = ^USER_MODALS_INFO_0;
- {$EXTERNALSYM LPUSER_MODALS_INFO_0}
- PUSER_MODALS_INFO_0 = ^USER_MODALS_INFO_0;
- {$EXTERNALSYM PUSER_MODALS_INFO_0}
- _USER_MODALS_INFO_0 = record
- usrmod0_min_passwd_len: DWORD;
- usrmod0_max_passwd_age: DWORD;
- usrmod0_min_passwd_age: DWORD;
- usrmod0_force_logoff: DWORD;
- usrmod0_password_hist_len: DWORD;
- end;
- {$EXTERNALSYM _USER_MODALS_INFO_0}
- USER_MODALS_INFO_0 = _USER_MODALS_INFO_0;
- {$EXTERNALSYM USER_MODALS_INFO_0}
- TUserModalsInfo0 = USER_MODALS_INFO_0;
- PUserModalsInfo0 = PUSER_MODALS_INFO_0;
-
- LPUSER_MODALS_INFO_1 = ^USER_MODALS_INFO_1;
- {$EXTERNALSYM LPUSER_MODALS_INFO_1}
- PUSER_MODALS_INFO_1 = ^USER_MODALS_INFO_1;
- {$EXTERNALSYM PUSER_MODALS_INFO_1}
- _USER_MODALS_INFO_1 = record
- usrmod1_role: DWORD;
- usrmod1_primary: LPWSTR;
- end;
- {$EXTERNALSYM _USER_MODALS_INFO_1}
- USER_MODALS_INFO_1 = _USER_MODALS_INFO_1;
- {$EXTERNALSYM USER_MODALS_INFO_1}
- TUserModalsInfo1 = USER_MODALS_INFO_1;
- PUserModalsInfo1 = PUSER_MODALS_INFO_1;
-
- LPUSER_MODALS_INFO_2 = ^USER_MODALS_INFO_2;
- {$EXTERNALSYM LPUSER_MODALS_INFO_2}
- PUSER_MODALS_INFO_2 = ^USER_MODALS_INFO_2;
- {$EXTERNALSYM PUSER_MODALS_INFO_2}
- _USER_MODALS_INFO_2 = record
- usrmod2_domain_name: LPWSTR;
- usrmod2_domain_id: PSID;
- end;
- {$EXTERNALSYM _USER_MODALS_INFO_2}
- USER_MODALS_INFO_2 = _USER_MODALS_INFO_2;
- {$EXTERNALSYM USER_MODALS_INFO_2}
- TUserModalsInfo2 = USER_MODALS_INFO_2;
- PUserModalsInfo2 = PUSER_MODALS_INFO_2;
-
- LPUSER_MODALS_INFO_3 = ^USER_MODALS_INFO_3;
- {$EXTERNALSYM LPUSER_MODALS_INFO_3}
- PUSER_MODALS_INFO_3 = ^USER_MODALS_INFO_3;
- {$EXTERNALSYM PUSER_MODALS_INFO_3}
- _USER_MODALS_INFO_3 = record
- usrmod3_lockout_duration: DWORD;
- usrmod3_lockout_observation_window: DWORD;
- usrmod3_lockout_threshold: DWORD;
- end;
- {$EXTERNALSYM _USER_MODALS_INFO_3}
- USER_MODALS_INFO_3 = _USER_MODALS_INFO_3;
- {$EXTERNALSYM USER_MODALS_INFO_3}
- TUserModalsInfo3 = USER_MODALS_INFO_3;
- PUserModalsInfo3 = PUSER_MODALS_INFO_3;
-
- LPUSER_MODALS_INFO_1001 = ^USER_MODALS_INFO_1001;
- {$EXTERNALSYM LPUSER_MODALS_INFO_1001}
- PUSER_MODALS_INFO_1001 = ^USER_MODALS_INFO_1001;
- {$EXTERNALSYM PUSER_MODALS_INFO_1001}
- _USER_MODALS_INFO_1001 = record
- usrmod1001_min_passwd_len: DWORD;
- end;
- {$EXTERNALSYM _USER_MODALS_INFO_1001}
- USER_MODALS_INFO_1001 = _USER_MODALS_INFO_1001;
- {$EXTERNALSYM USER_MODALS_INFO_1001}
- TUserModalsInfo1001 = USER_MODALS_INFO_1001;
- PUserModalsInfo1001 = PUSER_MODALS_INFO_1001;
-
- LPUSER_MODALS_INFO_1002 = ^USER_MODALS_INFO_1002;
- {$EXTERNALSYM LPUSER_MODALS_INFO_1002}
- PUSER_MODALS_INFO_1002 = ^USER_MODALS_INFO_1002;
- {$EXTERNALSYM PUSER_MODALS_INFO_1002}
- _USER_MODALS_INFO_1002 = record
- usrmod1002_max_passwd_age: DWORD;
- end;
- {$EXTERNALSYM _USER_MODALS_INFO_1002}
- USER_MODALS_INFO_1002 = _USER_MODALS_INFO_1002;
- {$EXTERNALSYM USER_MODALS_INFO_1002}
- TUserModalsInfo1002 = USER_MODALS_INFO_1002;
- PUserModalsInfo1002 = PUSER_MODALS_INFO_1002;
-
- LPUSER_MODALS_INFO_1003 = ^USER_MODALS_INFO_1003;
- {$EXTERNALSYM LPUSER_MODALS_INFO_1003}
- PUSER_MODALS_INFO_1003 = ^USER_MODALS_INFO_1003;
- {$EXTERNALSYM PUSER_MODALS_INFO_1003}
- _USER_MODALS_INFO_1003 = record
- usrmod1003_min_passwd_age: DWORD;
- end;
- {$EXTERNALSYM _USER_MODALS_INFO_1003}
- USER_MODALS_INFO_1003 = _USER_MODALS_INFO_1003;
- {$EXTERNALSYM USER_MODALS_INFO_1003}
- TUserModalsInfo1003 = USER_MODALS_INFO_1003;
- PUserModalsInfo1003 = PUSER_MODALS_INFO_1003;
-
- LPUSER_MODALS_INFO_1004 = ^USER_MODALS_INFO_1004;
- {$EXTERNALSYM LPUSER_MODALS_INFO_1004}
- PUSER_MODALS_INFO_1004 = ^USER_MODALS_INFO_1004;
- {$EXTERNALSYM PUSER_MODALS_INFO_1004}
- _USER_MODALS_INFO_1004 = record
- usrmod1004_force_logoff: DWORD;
- end;
- {$EXTERNALSYM _USER_MODALS_INFO_1004}
- USER_MODALS_INFO_1004 = _USER_MODALS_INFO_1004;
- {$EXTERNALSYM USER_MODALS_INFO_1004}
- TUserModalsInfo1004 = USER_MODALS_INFO_1004;
- PUserModalsInfo1004 = PUSER_MODALS_INFO_1004;
-
- LPUSER_MODALS_INFO_1005 = ^USER_MODALS_INFO_1005;
- {$EXTERNALSYM LPUSER_MODALS_INFO_1005}
- PUSER_MODALS_INFO_1005 = ^USER_MODALS_INFO_1005;
- {$EXTERNALSYM PUSER_MODALS_INFO_1005}
- _USER_MODALS_INFO_1005 = record
- usrmod1005_password_hist_len: DWORD;
- end;
- {$EXTERNALSYM _USER_MODALS_INFO_1005}
- USER_MODALS_INFO_1005 = _USER_MODALS_INFO_1005;
- {$EXTERNALSYM USER_MODALS_INFO_1005}
- TUserModalsInfo1005 = USER_MODALS_INFO_1005;
- PUserModalsInfo1005 = PUSER_MODALS_INFO_1005;
-
- LPUSER_MODALS_INFO_1006 = ^USER_MODALS_INFO_1006;
- {$EXTERNALSYM LPUSER_MODALS_INFO_1006}
- PUSER_MODALS_INFO_1006 = ^USER_MODALS_INFO_1006;
- {$EXTERNALSYM PUSER_MODALS_INFO_1006}
- _USER_MODALS_INFO_1006 = record
- usrmod1006_role: DWORD;
- end;
- {$EXTERNALSYM _USER_MODALS_INFO_1006}
- USER_MODALS_INFO_1006 = _USER_MODALS_INFO_1006;
- {$EXTERNALSYM USER_MODALS_INFO_1006}
- TUserModalsInfo1006 = USER_MODALS_INFO_1006;
- PUserModalsInfo1006 = PUSER_MODALS_INFO_1006;
-
- LPUSER_MODALS_INFO_1007 = ^USER_MODALS_INFO_1007;
- {$EXTERNALSYM LPUSER_MODALS_INFO_1007}
- PUSER_MODALS_INFO_1007 = ^USER_MODALS_INFO_1007;
- {$EXTERNALSYM PUSER_MODALS_INFO_1007}
- _USER_MODALS_INFO_1007 = record
- usrmod1007_primary: LPWSTR;
- end;
- {$EXTERNALSYM _USER_MODALS_INFO_1007}
- USER_MODALS_INFO_1007 = _USER_MODALS_INFO_1007;
- {$EXTERNALSYM USER_MODALS_INFO_1007}
- TUserModalsInfo1007 = USER_MODALS_INFO_1007;
- PUserModalsInfo1007 = PUSER_MODALS_INFO_1007;
-
-//
-// Special Values and Constants - User
-//
-
-//
-// Bit masks for field usriX_flags of USER_INFO_X (X = 0/1).
-//
-
-const
- UF_SCRIPT = $0001;
- {$EXTERNALSYM UF_SCRIPT}
- UF_ACCOUNTDISABLE = $0002;
- {$EXTERNALSYM UF_ACCOUNTDISABLE}
- UF_HOMEDIR_REQUIRED = $0008;
- {$EXTERNALSYM UF_HOMEDIR_REQUIRED}
- UF_LOCKOUT = $0010;
- {$EXTERNALSYM UF_LOCKOUT}
- UF_PASSWD_NOTREQD = $0020;
- {$EXTERNALSYM UF_PASSWD_NOTREQD}
- UF_PASSWD_CANT_CHANGE = $0040;
- {$EXTERNALSYM UF_PASSWD_CANT_CHANGE}
- UF_ENCRYPTED_TEXT_PASSWORD_ALLOWED = $0080;
- {$EXTERNALSYM UF_ENCRYPTED_TEXT_PASSWORD_ALLOWED}
-
-//
-// Account type bits as part of usri_flags.
-//
-
- UF_TEMP_DUPLICATE_ACCOUNT = $0100;
- {$EXTERNALSYM UF_TEMP_DUPLICATE_ACCOUNT}
- UF_NORMAL_ACCOUNT = $0200;
- {$EXTERNALSYM UF_NORMAL_ACCOUNT}
- UF_INTERDOMAIN_TRUST_ACCOUNT = $0800;
- {$EXTERNALSYM UF_INTERDOMAIN_TRUST_ACCOUNT}
- UF_WORKSTATION_TRUST_ACCOUNT = $1000;
- {$EXTERNALSYM UF_WORKSTATION_TRUST_ACCOUNT}
- UF_SERVER_TRUST_ACCOUNT = $2000;
- {$EXTERNALSYM UF_SERVER_TRUST_ACCOUNT}
-
- UF_MACHINE_ACCOUNT_MASK = UF_INTERDOMAIN_TRUST_ACCOUNT or UF_WORKSTATION_TRUST_ACCOUNT or UF_SERVER_TRUST_ACCOUNT;
- {$EXTERNALSYM UF_MACHINE_ACCOUNT_MASK}
-
- UF_ACCOUNT_TYPE_MASK = UF_TEMP_DUPLICATE_ACCOUNT or UF_NORMAL_ACCOUNT or UF_INTERDOMAIN_TRUST_ACCOUNT or UF_WORKSTATION_TRUST_ACCOUNT or UF_SERVER_TRUST_ACCOUNT;
- {$EXTERNALSYM UF_ACCOUNT_TYPE_MASK}
-
- UF_DONT_EXPIRE_PASSWD = $10000;
- {$EXTERNALSYM UF_DONT_EXPIRE_PASSWD}
- UF_MNS_LOGON_ACCOUNT = $20000;
- {$EXTERNALSYM UF_MNS_LOGON_ACCOUNT}
- UF_SMARTCARD_REQUIRED = $40000;
- {$EXTERNALSYM UF_SMARTCARD_REQUIRED}
- UF_TRUSTED_FOR_DELEGATION = $80000;
- {$EXTERNALSYM UF_TRUSTED_FOR_DELEGATION}
- UF_NOT_DELEGATED = $100000;
- {$EXTERNALSYM UF_NOT_DELEGATED}
- UF_USE_DES_KEY_ONLY = $200000;
- {$EXTERNALSYM UF_USE_DES_KEY_ONLY}
- UF_DONT_REQUIRE_PREAUTH = $400000;
- {$EXTERNALSYM UF_DONT_REQUIRE_PREAUTH}
- UF_PASSWORD_EXPIRED = DWORD($800000);
- {$EXTERNALSYM UF_PASSWORD_EXPIRED}
- UF_TRUSTED_TO_AUTHENTICATE_FOR_DELEGATION = $1000000;
- {$EXTERNALSYM UF_TRUSTED_TO_AUTHENTICATE_FOR_DELEGATION}
-
- UF_SETTABLE_BITS =
- UF_SCRIPT or
- UF_ACCOUNTDISABLE or
- UF_LOCKOUT or
- UF_HOMEDIR_REQUIRED or
- UF_PASSWD_NOTREQD or
- UF_PASSWD_CANT_CHANGE or
- UF_ACCOUNT_TYPE_MASK or
- UF_DONT_EXPIRE_PASSWD or
- UF_MNS_LOGON_ACCOUNT or
- UF_ENCRYPTED_TEXT_PASSWORD_ALLOWED or
- UF_SMARTCARD_REQUIRED or
- UF_TRUSTED_FOR_DELEGATION or
- UF_NOT_DELEGATED or
- UF_USE_DES_KEY_ONLY or
- UF_DONT_REQUIRE_PREAUTH or
- UF_PASSWORD_EXPIRED or
- UF_TRUSTED_TO_AUTHENTICATE_FOR_DELEGATION;
- {$EXTERNALSYM UF_SETTABLE_BITS}
-
-//
-// bit masks for the NetUserEnum filter parameter.
-//
-
- FILTER_TEMP_DUPLICATE_ACCOUNT = $0001;
- {$EXTERNALSYM FILTER_TEMP_DUPLICATE_ACCOUNT}
- FILTER_NORMAL_ACCOUNT = $0002;
- {$EXTERNALSYM FILTER_NORMAL_ACCOUNT}
-// #define FILTER_PROXY_ACCOUNT (0x0004)
- FILTER_INTERDOMAIN_TRUST_ACCOUNT = $0008;
- {$EXTERNALSYM FILTER_INTERDOMAIN_TRUST_ACCOUNT}
- FILTER_WORKSTATION_TRUST_ACCOUNT = $0010;
- {$EXTERNALSYM FILTER_WORKSTATION_TRUST_ACCOUNT}
- FILTER_SERVER_TRUST_ACCOUNT = $0020;
- {$EXTERNALSYM FILTER_SERVER_TRUST_ACCOUNT}
-
-//
-// bit masks for the NetUserGetLocalGroups flags
-//
-
- LG_INCLUDE_INDIRECT = $0001;
- {$EXTERNALSYM LG_INCLUDE_INDIRECT}
-
-//
-// Bit masks for field usri2_auth_flags of USER_INFO_2.
-//
-
- AF_OP_PRINT = $1;
- {$EXTERNALSYM AF_OP_PRINT}
- AF_OP_COMM = $2;
- {$EXTERNALSYM AF_OP_COMM}
- AF_OP_SERVER = $4;
- {$EXTERNALSYM AF_OP_SERVER}
- AF_OP_ACCOUNTS = $8;
- {$EXTERNALSYM AF_OP_ACCOUNTS}
- AF_SETTABLE_BITS = AF_OP_PRINT or AF_OP_COMM or AF_OP_SERVER or AF_OP_ACCOUNTS;
- {$EXTERNALSYM AF_SETTABLE_BITS}
-
-//
-// UAS role manifests under NETLOGON
-//
-
- UAS_ROLE_STANDALONE = 0;
- {$EXTERNALSYM UAS_ROLE_STANDALONE}
- UAS_ROLE_MEMBER = 1;
- {$EXTERNALSYM UAS_ROLE_MEMBER}
- UAS_ROLE_BACKUP = 2;
- {$EXTERNALSYM UAS_ROLE_BACKUP}
- UAS_ROLE_PRIMARY = 3;
- {$EXTERNALSYM UAS_ROLE_PRIMARY}
-
-//
-// Values for ParmError for NetUserSetInfo.
-//
-
- USER_NAME_PARMNUM = 1;
- {$EXTERNALSYM USER_NAME_PARMNUM}
- USER_PASSWORD_PARMNUM = 3;
- {$EXTERNALSYM USER_PASSWORD_PARMNUM}
- USER_PASSWORD_AGE_PARMNUM = 4;
- {$EXTERNALSYM USER_PASSWORD_AGE_PARMNUM}
- USER_PRIV_PARMNUM = 5;
- {$EXTERNALSYM USER_PRIV_PARMNUM}
- USER_HOME_DIR_PARMNUM = 6;
- {$EXTERNALSYM USER_HOME_DIR_PARMNUM}
- USER_COMMENT_PARMNUM = 7;
- {$EXTERNALSYM USER_COMMENT_PARMNUM}
- USER_FLAGS_PARMNUM = 8;
- {$EXTERNALSYM USER_FLAGS_PARMNUM}
- USER_SCRIPT_PATH_PARMNUM = 9;
- {$EXTERNALSYM USER_SCRIPT_PATH_PARMNUM}
- USER_AUTH_FLAGS_PARMNUM = 10;
- {$EXTERNALSYM USER_AUTH_FLAGS_PARMNUM}
- USER_FULL_NAME_PARMNUM = 11;
- {$EXTERNALSYM USER_FULL_NAME_PARMNUM}
- USER_USR_COMMENT_PARMNUM = 12;
- {$EXTERNALSYM USER_USR_COMMENT_PARMNUM}
- USER_PARMS_PARMNUM = 13;
- {$EXTERNALSYM USER_PARMS_PARMNUM}
- USER_WORKSTATIONS_PARMNUM = 14;
- {$EXTERNALSYM USER_WORKSTATIONS_PARMNUM}
- USER_LAST_LOGON_PARMNUM = 15;
- {$EXTERNALSYM USER_LAST_LOGON_PARMNUM}
- USER_LAST_LOGOFF_PARMNUM = 16;
- {$EXTERNALSYM USER_LAST_LOGOFF_PARMNUM}
- USER_ACCT_EXPIRES_PARMNUM = 17;
- {$EXTERNALSYM USER_ACCT_EXPIRES_PARMNUM}
- USER_MAX_STORAGE_PARMNUM = 18;
- {$EXTERNALSYM USER_MAX_STORAGE_PARMNUM}
- USER_UNITS_PER_WEEK_PARMNUM = 19;
- {$EXTERNALSYM USER_UNITS_PER_WEEK_PARMNUM}
- USER_LOGON_HOURS_PARMNUM = 20;
- {$EXTERNALSYM USER_LOGON_HOURS_PARMNUM}
- USER_PAD_PW_COUNT_PARMNUM = 21;
- {$EXTERNALSYM USER_PAD_PW_COUNT_PARMNUM}
- USER_NUM_LOGONS_PARMNUM = 22;
- {$EXTERNALSYM USER_NUM_LOGONS_PARMNUM}
- USER_LOGON_SERVER_PARMNUM = 23;
- {$EXTERNALSYM USER_LOGON_SERVER_PARMNUM}
- USER_COUNTRY_CODE_PARMNUM = 24;
- {$EXTERNALSYM USER_COUNTRY_CODE_PARMNUM}
- USER_CODE_PAGE_PARMNUM = 25;
- {$EXTERNALSYM USER_CODE_PAGE_PARMNUM}
- USER_PRIMARY_GROUP_PARMNUM = 51;
- {$EXTERNALSYM USER_PRIMARY_GROUP_PARMNUM}
- USER_PROFILE = 52; // ?? Delete when convenient
- {$EXTERNALSYM USER_PROFILE}
- USER_PROFILE_PARMNUM = 52;
- {$EXTERNALSYM USER_PROFILE_PARMNUM}
- USER_HOME_DIR_DRIVE_PARMNUM = 53;
- {$EXTERNALSYM USER_HOME_DIR_DRIVE_PARMNUM}
-
-//
-// the new infolevel counterparts of the old info level + parmnum
-//
-
- USER_NAME_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + USER_NAME_PARMNUM;
- {$EXTERNALSYM USER_NAME_INFOLEVEL}
- USER_PASSWORD_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + USER_PASSWORD_PARMNUM;
- {$EXTERNALSYM USER_PASSWORD_INFOLEVEL}
- USER_PASSWORD_AGE_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + USER_PASSWORD_AGE_PARMNUM;
- {$EXTERNALSYM USER_PASSWORD_AGE_INFOLEVEL}
- USER_PRIV_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + USER_PRIV_PARMNUM;
- {$EXTERNALSYM USER_PRIV_INFOLEVEL}
- USER_HOME_DIR_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + USER_HOME_DIR_PARMNUM;
- {$EXTERNALSYM USER_HOME_DIR_INFOLEVEL}
- USER_COMMENT_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + USER_COMMENT_PARMNUM;
- {$EXTERNALSYM USER_COMMENT_INFOLEVEL}
- USER_FLAGS_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + USER_FLAGS_PARMNUM;
- {$EXTERNALSYM USER_FLAGS_INFOLEVEL}
- USER_SCRIPT_PATH_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + USER_SCRIPT_PATH_PARMNUM;
- {$EXTERNALSYM USER_SCRIPT_PATH_INFOLEVEL}
- USER_AUTH_FLAGS_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + USER_AUTH_FLAGS_PARMNUM;
- {$EXTERNALSYM USER_AUTH_FLAGS_INFOLEVEL}
- USER_FULL_NAME_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + USER_FULL_NAME_PARMNUM;
- {$EXTERNALSYM USER_FULL_NAME_INFOLEVEL}
- USER_USR_COMMENT_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + USER_USR_COMMENT_PARMNUM;
- {$EXTERNALSYM USER_USR_COMMENT_INFOLEVEL}
- USER_PARMS_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + USER_PARMS_PARMNUM;
- {$EXTERNALSYM USER_PARMS_INFOLEVEL}
- USER_WORKSTATIONS_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + USER_WORKSTATIONS_PARMNUM;
- {$EXTERNALSYM USER_WORKSTATIONS_INFOLEVEL}
- USER_LAST_LOGON_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + USER_LAST_LOGON_PARMNUM;
- {$EXTERNALSYM USER_LAST_LOGON_INFOLEVEL}
- USER_LAST_LOGOFF_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + USER_LAST_LOGOFF_PARMNUM;
- {$EXTERNALSYM USER_LAST_LOGOFF_INFOLEVEL}
- USER_ACCT_EXPIRES_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + USER_ACCT_EXPIRES_PARMNUM;
- {$EXTERNALSYM USER_ACCT_EXPIRES_INFOLEVEL}
- USER_MAX_STORAGE_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + USER_MAX_STORAGE_PARMNUM;
- {$EXTERNALSYM USER_MAX_STORAGE_INFOLEVEL}
- USER_UNITS_PER_WEEK_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + USER_UNITS_PER_WEEK_PARMNUM;
- {$EXTERNALSYM USER_UNITS_PER_WEEK_INFOLEVEL}
- USER_LOGON_HOURS_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + USER_LOGON_HOURS_PARMNUM;
- {$EXTERNALSYM USER_LOGON_HOURS_INFOLEVEL}
- USER_PAD_PW_COUNT_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + USER_PAD_PW_COUNT_PARMNUM;
- {$EXTERNALSYM USER_PAD_PW_COUNT_INFOLEVEL}
- USER_NUM_LOGONS_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + USER_NUM_LOGONS_PARMNUM;
- {$EXTERNALSYM USER_NUM_LOGONS_INFOLEVEL}
- USER_LOGON_SERVER_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + USER_LOGON_SERVER_PARMNUM;
- {$EXTERNALSYM USER_LOGON_SERVER_INFOLEVEL}
- USER_COUNTRY_CODE_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + USER_COUNTRY_CODE_PARMNUM;
- {$EXTERNALSYM USER_COUNTRY_CODE_INFOLEVEL}
- USER_CODE_PAGE_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + USER_CODE_PAGE_PARMNUM;
- {$EXTERNALSYM USER_CODE_PAGE_INFOLEVEL}
- USER_PRIMARY_GROUP_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + USER_PRIMARY_GROUP_PARMNUM;
- {$EXTERNALSYM USER_PRIMARY_GROUP_INFOLEVEL}
-// todo USER_POSIX_ID_PARMNUM where is it defined?
-// USER_POSIX_ID_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + USER_POSIX_ID_PARMNUM;
-// {$EXTERNALSYM USER_POSIX_ID_INFOLEVEL}
- USER_HOME_DIR_DRIVE_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + USER_HOME_DIR_DRIVE_PARMNUM;
- {$EXTERNALSYM USER_HOME_DIR_DRIVE_INFOLEVEL}
-
-//
-// For SetInfo call (parmnum 0) when password change not required
-//
-
- NULL_USERSETINFO_PASSWD = ' ';
- {$EXTERNALSYM NULL_USERSETINFO_PASSWD}
-
- TIMEQ_FOREVER = ULONG(-1);
- {$EXTERNALSYM TIMEQ_FOREVER}
- USER_MAXSTORAGE_UNLIMITED = ULONG(-1);
- {$EXTERNALSYM USER_MAXSTORAGE_UNLIMITED}
- USER_NO_LOGOFF = ULONG(-1);
- {$EXTERNALSYM USER_NO_LOGOFF}
- UNITS_PER_DAY = 24;
- {$EXTERNALSYM UNITS_PER_DAY}
- UNITS_PER_WEEK = UNITS_PER_DAY * 7;
- {$EXTERNALSYM UNITS_PER_WEEK}
-
-//
-// Privilege levels (USER_INFO_X field usriX_priv (X = 0/1)).
-//
-
- USER_PRIV_MASK = $3;
- {$EXTERNALSYM USER_PRIV_MASK}
- USER_PRIV_GUEST = 0;
- {$EXTERNALSYM USER_PRIV_GUEST}
- USER_PRIV_USER = 1;
- {$EXTERNALSYM USER_PRIV_USER}
- USER_PRIV_ADMIN = 2;
- {$EXTERNALSYM USER_PRIV_ADMIN}
-
-//
-// user modals related defaults
-//
-
- MAX_PASSWD_LEN = PWLEN;
- {$EXTERNALSYM MAX_PASSWD_LEN}
- DEF_MIN_PWLEN = 6;
- {$EXTERNALSYM DEF_MIN_PWLEN}
- DEF_PWUNIQUENESS = 5;
- {$EXTERNALSYM DEF_PWUNIQUENESS}
- DEF_MAX_PWHIST = 8;
- {$EXTERNALSYM DEF_MAX_PWHIST}
-
- DEF_MAX_PWAGE = TIMEQ_FOREVER; // forever
- {$EXTERNALSYM DEF_MAX_PWAGE}
- DEF_MIN_PWAGE = 0; // 0 days
- {$EXTERNALSYM DEF_MIN_PWAGE}
- DEF_FORCE_LOGOFF = ULONG($ffffffff); // never
- {$EXTERNALSYM DEF_FORCE_LOGOFF}
- DEF_MAX_BADPW = 0; // no limit
- {$EXTERNALSYM DEF_MAX_BADPW}
- ONE_DAY = ULONG(01*24*3600); // 01 day
- {$EXTERNALSYM ONE_DAY}
-
-//
-// User Logon Validation (codes returned)
-//
-
- VALIDATED_LOGON = 0;
- {$EXTERNALSYM VALIDATED_LOGON}
- PASSWORD_EXPIRED = 2;
- {$EXTERNALSYM PASSWORD_EXPIRED}
- NON_VALIDATED_LOGON = 3;
- {$EXTERNALSYM NON_VALIDATED_LOGON}
-
- VALID_LOGOFF = 1;
- {$EXTERNALSYM VALID_LOGOFF}
-
-//
-// parmnum manifests for user modals
-//
-
- MODALS_MIN_PASSWD_LEN_PARMNUM = 1;
- {$EXTERNALSYM MODALS_MIN_PASSWD_LEN_PARMNUM}
- MODALS_MAX_PASSWD_AGE_PARMNUM = 2;
- {$EXTERNALSYM MODALS_MAX_PASSWD_AGE_PARMNUM}
- MODALS_MIN_PASSWD_AGE_PARMNUM = 3;
- {$EXTERNALSYM MODALS_MIN_PASSWD_AGE_PARMNUM}
- MODALS_FORCE_LOGOFF_PARMNUM = 4;
- {$EXTERNALSYM MODALS_FORCE_LOGOFF_PARMNUM}
- MODALS_PASSWD_HIST_LEN_PARMNUM = 5;
- {$EXTERNALSYM MODALS_PASSWD_HIST_LEN_PARMNUM}
- MODALS_ROLE_PARMNUM = 6;
- {$EXTERNALSYM MODALS_ROLE_PARMNUM}
- MODALS_PRIMARY_PARMNUM = 7;
- {$EXTERNALSYM MODALS_PRIMARY_PARMNUM}
- MODALS_DOMAIN_NAME_PARMNUM = 8;
- {$EXTERNALSYM MODALS_DOMAIN_NAME_PARMNUM}
- MODALS_DOMAIN_ID_PARMNUM = 9;
- {$EXTERNALSYM MODALS_DOMAIN_ID_PARMNUM}
- MODALS_LOCKOUT_DURATION_PARMNUM = 10;
- {$EXTERNALSYM MODALS_LOCKOUT_DURATION_PARMNUM}
- MODALS_LOCKOUT_OBSERVATION_WINDOW_PARMNUM = 11;
- {$EXTERNALSYM MODALS_LOCKOUT_OBSERVATION_WINDOW_PARMNUM}
- MODALS_LOCKOUT_THRESHOLD_PARMNUM = 12;
- {$EXTERNALSYM MODALS_LOCKOUT_THRESHOLD_PARMNUM}
-
-//
-// the new infolevel counterparts of the old info level + parmnum
-//
-
- MODALS_MIN_PASSWD_LEN_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + MODALS_MIN_PASSWD_LEN_PARMNUM;
- {$EXTERNALSYM MODALS_MIN_PASSWD_LEN_INFOLEVEL}
- MODALS_MAX_PASSWD_AGE_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + MODALS_MAX_PASSWD_AGE_PARMNUM;
- {$EXTERNALSYM MODALS_MAX_PASSWD_AGE_INFOLEVEL}
- MODALS_MIN_PASSWD_AGE_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + MODALS_MIN_PASSWD_AGE_PARMNUM;
- {$EXTERNALSYM MODALS_MIN_PASSWD_AGE_INFOLEVEL}
- MODALS_FORCE_LOGOFF_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + MODALS_FORCE_LOGOFF_PARMNUM;
- {$EXTERNALSYM MODALS_FORCE_LOGOFF_INFOLEVEL}
- MODALS_PASSWD_HIST_LEN_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + MODALS_PASSWD_HIST_LEN_PARMNUM;
- {$EXTERNALSYM MODALS_PASSWD_HIST_LEN_INFOLEVEL}
- MODALS_ROLE_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + MODALS_ROLE_PARMNUM;
- {$EXTERNALSYM MODALS_ROLE_INFOLEVEL}
- MODALS_PRIMARY_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + MODALS_PRIMARY_PARMNUM;
- {$EXTERNALSYM MODALS_PRIMARY_INFOLEVEL}
- MODALS_DOMAIN_NAME_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + MODALS_DOMAIN_NAME_PARMNUM;
- {$EXTERNALSYM MODALS_DOMAIN_NAME_INFOLEVEL}
- MODALS_DOMAIN_ID_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + MODALS_DOMAIN_ID_PARMNUM;
- {$EXTERNALSYM MODALS_DOMAIN_ID_INFOLEVEL}
-
-//
-// Group Class
-//
-
-//
-// Function Prototypes
-//
-
-function NetGroupAdd(servername: LPCWSTR; level: DWORD; buf: LPBYTE; parm_err: LPDWORD): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetGroupAdd}
-
-function NetGroupAddUser(servername, GroupName, username: LPCWSTR): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetGroupAddUser}
-
-function NetGroupEnum(servername: LPCWSTR; level: DWORD; var bufptr: LPBYTE; prefmaxlen: DWORD; entriesread, totalentries: LPDWORD; resume_handle: PDWORD_PTR): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetGroupEnum}
-
-function NetGroupGetInfo(servername, groupname: LPCWSTR; level: DWORD; bufptr: LPBYTE): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetGroupGetInfo}
-
-function NetGroupSetInfo(servername, groupname: LPCWSTR; level: DWORD; buf: LPBYTE; parm_err: LPDWORD): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetGroupSetInfo}
-
-function NetGroupDel(servername: LPCWSTR; groupname: LPCWSTR): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetGroupDel}
-
-function NetGroupDelUser(servername: LPCWSTR; GroupName: LPCWSTR; Username: LPCWSTR): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetGroupDelUser}
-
-function NetGroupGetUsers(servername, groupname: LPCWSTR; level: DWORD; var bufptr: LPBYTE; prefmaxlen: DWORD; entriesread, totalentries: LPDWORD; ResumeHandle: PDWORD_PTR): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetGroupGetUsers}
-
-function NetGroupSetUsers(servername, groupname: LPCWSTR; level: DWORD; buf: LPBYTE; totalentries: DWORD): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetGroupSetUsers}
-
-//
-// Data Structures - Group
-//
-
-type
- LPGROUP_INFO_0 = ^GROUP_INFO_0;
- {$EXTERNALSYM LPGROUP_INFO_0}
- PGROUP_INFO_0 = ^GROUP_INFO_0;
- {$EXTERNALSYM PGROUP_INFO_0}
- _GROUP_INFO_0 = record
- grpi0_name: LPWSTR;
- end;
- {$EXTERNALSYM _GROUP_INFO_0}
- GROUP_INFO_0 = _GROUP_INFO_0;
- {$EXTERNALSYM GROUP_INFO_0}
- TGroupInfo0 = GROUP_INFO_0;
- PGroupInfo0 = PGROUP_INFO_0;
-
- LPGROUP_INFO_1 = ^GROUP_INFO_1;
- {$EXTERNALSYM LPGROUP_INFO_1}
- PGROUP_INFO_1 = ^GROUP_INFO_1;
- {$EXTERNALSYM PGROUP_INFO_1}
- _GROUP_INFO_1 = record
- grpi1_name: LPWSTR;
- grpi1_comment: LPWSTR;
- end;
- {$EXTERNALSYM _GROUP_INFO_1}
- GROUP_INFO_1 = _GROUP_INFO_1;
- {$EXTERNALSYM GROUP_INFO_1}
- TGroupInfo1 = GROUP_INFO_1;
- PGroupInfo1 = PGROUP_INFO_1;
-
- LPGROUP_INFO_2 = ^GROUP_INFO_2;
- {$EXTERNALSYM LPGROUP_INFO_2}
- PGROUP_INFO_2 = ^GROUP_INFO_2;
- {$EXTERNALSYM PGROUP_INFO_2}
- _GROUP_INFO_2 = record
- grpi2_name: LPWSTR;
- grpi2_comment: LPWSTR;
- grpi2_group_id: DWORD;
- grpi2_attributes: DWORD;
- end;
- {$EXTERNALSYM _GROUP_INFO_2}
- GROUP_INFO_2 = _GROUP_INFO_2;
- {$EXTERNALSYM GROUP_INFO_2}
- TGroupInfo2 = GROUP_INFO_2;
- PGroupInfo2 = PGROUP_INFO_2;
-
- LPGROUP_INFO_3 = ^GROUP_INFO_3;
- {$EXTERNALSYM LPGROUP_INFO_3}
- PGROUP_INFO_3 = ^GROUP_INFO_3;
- {$EXTERNALSYM PGROUP_INFO_3}
- _GROUP_INFO_3 = record
- grpi3_name: LPWSTR;
- grpi3_comment: LPWSTR;
- grpi3_group_sid: PSID;
- grpi3_attributes: DWORD;
- end;
- {$EXTERNALSYM _GROUP_INFO_3}
- GROUP_INFO_3 = _GROUP_INFO_3;
- {$EXTERNALSYM GROUP_INFO_3}
- TGroupInfo3 = GROUP_INFO_3;
- PGroupInfo3 = PGROUP_INFO_3;
-
- LPGROUP_INFO_1002 = ^GROUP_INFO_1002;
- {$EXTERNALSYM LPGROUP_INFO_1002}
- PGROUP_INFO_1002 = ^GROUP_INFO_1002;
- {$EXTERNALSYM PGROUP_INFO_1002}
- _GROUP_INFO_1002 = record
- grpi1002_comment: LPWSTR;
- end;
- {$EXTERNALSYM _GROUP_INFO_1002}
- GROUP_INFO_1002 = _GROUP_INFO_1002;
- {$EXTERNALSYM GROUP_INFO_1002}
- TGroupInfo1002 = GROUP_INFO_1002;
- PGroupInfo1002 = PGROUP_INFO_1002;
-
- LPGROUP_INFO_1005 = ^GROUP_INFO_1005;
- {$EXTERNALSYM LPGROUP_INFO_1005}
- PGROUP_INFO_1005 = ^GROUP_INFO_1005;
- {$EXTERNALSYM PGROUP_INFO_1005}
- _GROUP_INFO_1005 = record
- grpi1005_attributes: DWORD;
- end;
- {$EXTERNALSYM _GROUP_INFO_1005}
- GROUP_INFO_1005 = _GROUP_INFO_1005;
- {$EXTERNALSYM GROUP_INFO_1005}
- TGroupInfo1005 = GROUP_INFO_1005;
- PGroupInfo1005 = PGROUP_INFO_1005;
-
- LPGROUP_USERS_INFO_0 = ^GROUP_USERS_INFO_0;
- {$EXTERNALSYM LPGROUP_USERS_INFO_0}
- PGROUP_USERS_INFO_0 = ^GROUP_USERS_INFO_0;
- {$EXTERNALSYM PGROUP_USERS_INFO_0}
- _GROUP_USERS_INFO_0 = record
- grui0_name: LPWSTR;
- end;
- {$EXTERNALSYM _GROUP_USERS_INFO_0}
- GROUP_USERS_INFO_0 = _GROUP_USERS_INFO_0;
- {$EXTERNALSYM GROUP_USERS_INFO_0}
- TGroupUsersInfo0 = GROUP_USERS_INFO_0;
- PGroupUsersInfo0 = PGROUP_USERS_INFO_0;
-
- LPGROUP_USERS_INFO_1 = ^GROUP_USERS_INFO_1;
- {$EXTERNALSYM LPGROUP_USERS_INFO_1}
- PGROUP_USERS_INFO_1 = ^GROUP_USERS_INFO_1;
- {$EXTERNALSYM PGROUP_USERS_INFO_1}
- _GROUP_USERS_INFO_1 = record
- grui1_name: LPWSTR;
- grui1_attributes: DWORD;
- end;
- {$EXTERNALSYM _GROUP_USERS_INFO_1}
- GROUP_USERS_INFO_1 = _GROUP_USERS_INFO_1;
- {$EXTERNALSYM GROUP_USERS_INFO_1}
- TGroupUsersInfo1 = GROUP_USERS_INFO_1;
- PGroupUsersInfo1 = PGROUP_USERS_INFO_1;
-
-//
-// Special Values and Constants - Group
-//
-
-const
- GROUPIDMASK = $8000; // MSB set if uid refers to a group
- {$EXTERNALSYM GROUPIDMASK}
-
-//
-// Predefined group for all normal users, administrators and guests
-// LOCAL is a special group for pinball local security.
-//
-
- GROUP_SPECIALGRP_USERS = WideString('USERS');
- {$EXTERNALSYM GROUP_SPECIALGRP_USERS}
- GROUP_SPECIALGRP_ADMINS = WideString('ADMINS');
- {$EXTERNALSYM GROUP_SPECIALGRP_ADMINS}
- GROUP_SPECIALGRP_GUESTS = WideString('GUESTS');
- {$EXTERNALSYM GROUP_SPECIALGRP_GUESTS}
- GROUP_SPECIALGRP_LOCAL = WideString('LOCAL');
- {$EXTERNALSYM GROUP_SPECIALGRP_LOCAL}
-
-//
-// parmnum manifests for SetInfo calls (only comment is settable)
-//
-
- GROUP_ALL_PARMNUM = 0;
- {$EXTERNALSYM GROUP_ALL_PARMNUM}
- GROUP_NAME_PARMNUM = 1;
- {$EXTERNALSYM GROUP_NAME_PARMNUM}
- GROUP_COMMENT_PARMNUM = 2;
- {$EXTERNALSYM GROUP_COMMENT_PARMNUM}
- GROUP_ATTRIBUTES_PARMNUM = 3;
- {$EXTERNALSYM GROUP_ATTRIBUTES_PARMNUM}
-
-//
-// the new infolevel counterparts of the old info level + parmnum
-//
-
- GROUP_ALL_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + GROUP_ALL_PARMNUM;
- {$EXTERNALSYM GROUP_ALL_INFOLEVEL}
- GROUP_NAME_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + GROUP_NAME_PARMNUM;
- {$EXTERNALSYM GROUP_NAME_INFOLEVEL}
- GROUP_COMMENT_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + GROUP_COMMENT_PARMNUM;
- {$EXTERNALSYM GROUP_COMMENT_INFOLEVEL}
- GROUP_ATTRIBUTES_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + GROUP_ATTRIBUTES_PARMNUM;
- {$EXTERNALSYM GROUP_ATTRIBUTES_INFOLEVEL}
-// todo see GROUP_POSIX_ID_PARMNUM
-// GROUP_POSIX_ID_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + GROUP_POSIX_ID_PARMNUM;
-// {$EXTERNALSYM GROUP_POSIX_ID_INFOLEVEL}
-
-//
-// LocalGroup Class
-//
-
-//
-// Function Prototypes
-//
-
-function NetLocalGroupAdd(servername: LPCWSTR; level: DWORD; buf: LPBYTE; parm_err: LPDWORD): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetLocalGroupAdd}
-
-function NetLocalGroupAddMember(servername, groupname: LPCWSTR; membersid: PSID): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetLocalGroupAddMember}
-
-function NetLocalGroupEnum(servername: LPCWSTR; level: DWORD; var bufptr: LPBYTE; prefmaxlen: DWORD; entriesread, totalentries: LPDWORD; resumehandle: PDWORD_PTR): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetLocalGroupEnum}
-
-function NetLocalGroupGetInfo(servername, groupname: LPCWSTR; level: DWORD; var bufptr: LPBYTE): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetLocalGroupGetInfo}
-
-function NetLocalGroupSetInfo(servername, groupname: LPCWSTR; level: DWORD; buf: LPBYTE; parm_err: LPDWORD): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetLocalGroupSetInfo}
-
-function NetLocalGroupDel(servername: LPCWSTR; groupname: LPCWSTR): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetLocalGroupDel}
-
-function NetLocalGroupDelMember(servername: LPCWSTR; groupname: LPCWSTR; membersid: PSID): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetLocalGroupDelMember}
-
-function NetLocalGroupGetMembers(servername, localgroupname: LPCWSTR; level: DWORD; var bufptr: LPBYTE; prefmaxlen: DWORD; entriesread, totalentries: LPDWORD; resumehandle: PDWORD_PTR): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetLocalGroupGetMembers}
-
-function NetLocalGroupSetMembers(servername, groupname: LPCWSTR; level: DWORD; buf: LPBYTE; totalentries: DWORD): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetLocalGroupSetMembers}
-
-function NetLocalGroupAddMembers(servername, groupname: LPCWSTR; level: DWORD; buf: LPBYTE; totalentries: DWORD): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetLocalGroupAddMembers}
-
-function NetLocalGroupDelMembers(servername, groupname: LPCWSTR; level: DWORD; buf: LPBYTE; totalentries: DWORD): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetLocalGroupDelMembers}
-
-//
-// Data Structures - LocalGroup
-//
-
-type
- LPLOCALGROUP_INFO_0 = ^LOCALGROUP_INFO_0;
- {$EXTERNALSYM LPLOCALGROUP_INFO_0}
- PLOCALGROUP_INFO_0 = ^LOCALGROUP_INFO_0;
- {$EXTERNALSYM PLOCALGROUP_INFO_0}
- _LOCALGROUP_INFO_0 = record
- lgrpi0_name: LPWSTR;
- end;
- {$EXTERNALSYM _LOCALGROUP_INFO_0}
- LOCALGROUP_INFO_0 = _LOCALGROUP_INFO_0;
- {$EXTERNALSYM LOCALGROUP_INFO_0}
- TLocalGroupInfo0 = LOCALGROUP_INFO_0;
- PLocalGroupInfo0 = PLOCALGROUP_INFO_0;
-
- LPLOCALGROUP_INFO_1 = ^LOCALGROUP_INFO_1;
- {$EXTERNALSYM LPLOCALGROUP_INFO_1}
- PLOCALGROUP_INFO_1 = ^LOCALGROUP_INFO_1;
- {$EXTERNALSYM PLOCALGROUP_INFO_1}
- _LOCALGROUP_INFO_1 = record
- lgrpi1_name: LPWSTR;
- lgrpi1_comment: LPWSTR;
- end;
- {$EXTERNALSYM _LOCALGROUP_INFO_1}
- LOCALGROUP_INFO_1 = _LOCALGROUP_INFO_1;
- {$EXTERNALSYM LOCALGROUP_INFO_1}
- TLocalGroupInfo1 = LOCALGROUP_INFO_1;
- PLocalGroupInfo1 = PLOCALGROUP_INFO_1;
-
- LPLOCALGROUP_INFO_1002 = ^LOCALGROUP_INFO_1002;
- {$EXTERNALSYM LPLOCALGROUP_INFO_1002}
- PLOCALGROUP_INFO_1002 = ^LOCALGROUP_INFO_1002;
- {$EXTERNALSYM PLOCALGROUP_INFO_1002}
- _LOCALGROUP_INFO_1002 = record
- lgrpi1002_comment: LPWSTR;
- end;
- {$EXTERNALSYM _LOCALGROUP_INFO_1002}
- LOCALGROUP_INFO_1002 = _LOCALGROUP_INFO_1002;
- {$EXTERNALSYM LOCALGROUP_INFO_1002}
- TLocalGroupInfo1002 = LOCALGROUP_INFO_1002;
- PLocalGroupInfo1002 = PLOCALGROUP_INFO_1002;
-
- LPLOCALGROUP_MEMBERS_INFO_0 = ^LOCALGROUP_MEMBERS_INFO_0;
- {$EXTERNALSYM LPLOCALGROUP_MEMBERS_INFO_0}
- PLOCALGROUP_MEMBERS_INFO_0 = ^LOCALGROUP_MEMBERS_INFO_0;
- {$EXTERNALSYM PLOCALGROUP_MEMBERS_INFO_0}
- _LOCALGROUP_MEMBERS_INFO_0 = record
- lgrmi0_sid: PSID;
- end;
- {$EXTERNALSYM _LOCALGROUP_MEMBERS_INFO_0}
- LOCALGROUP_MEMBERS_INFO_0 = _LOCALGROUP_MEMBERS_INFO_0;
- {$EXTERNALSYM LOCALGROUP_MEMBERS_INFO_0}
- TLocalGroupMembersInfo0 = LOCALGROUP_MEMBERS_INFO_0;
- PLocalGroupMembersInfo0 = PLOCALGROUP_MEMBERS_INFO_0;
-
- LPLOCALGROUP_MEMBERS_INFO_1 = ^LOCALGROUP_MEMBERS_INFO_1;
- {$EXTERNALSYM LPLOCALGROUP_MEMBERS_INFO_1}
- PLOCALGROUP_MEMBERS_INFO_1 = ^LOCALGROUP_MEMBERS_INFO_1;
- {$EXTERNALSYM PLOCALGROUP_MEMBERS_INFO_1}
- _LOCALGROUP_MEMBERS_INFO_1 = record
- lgrmi1_sid: PSID;
- lgrmi1_sidusage: SID_NAME_USE;
- lgrmi1_name: LPWSTR;
- end;
- {$EXTERNALSYM _LOCALGROUP_MEMBERS_INFO_1}
- LOCALGROUP_MEMBERS_INFO_1 = _LOCALGROUP_MEMBERS_INFO_1;
- {$EXTERNALSYM LOCALGROUP_MEMBERS_INFO_1}
- TLocalGroupMembersInfo1 = LOCALGROUP_MEMBERS_INFO_1;
- PLocalGroupMembersInfo1 = PLOCALGROUP_MEMBERS_INFO_1;
-
- LPLOCALGROUP_MEMBERS_INFO_2 = ^LOCALGROUP_MEMBERS_INFO_2;
- {$EXTERNALSYM LPLOCALGROUP_MEMBERS_INFO_2}
- PLOCALGROUP_MEMBERS_INFO_2 = ^LOCALGROUP_MEMBERS_INFO_2;
- {$EXTERNALSYM PLOCALGROUP_MEMBERS_INFO_2}
- _LOCALGROUP_MEMBERS_INFO_2 = record
- lgrmi2_sid: PSID;
- lgrmi2_sidusage: SID_NAME_USE;
- lgrmi2_domainandname: LPWSTR;
- end;
- {$EXTERNALSYM _LOCALGROUP_MEMBERS_INFO_2}
- LOCALGROUP_MEMBERS_INFO_2 = _LOCALGROUP_MEMBERS_INFO_2;
- {$EXTERNALSYM LOCALGROUP_MEMBERS_INFO_2}
- TLocalGroupMembersInfo2 = LOCALGROUP_MEMBERS_INFO_2;
- PLocalGroupMembersInfo2 = PLOCALGROUP_MEMBERS_INFO_2;
-
- LPLOCALGROUP_MEMBERS_INFO_3 = ^LOCALGROUP_MEMBERS_INFO_3;
- {$EXTERNALSYM LPLOCALGROUP_MEMBERS_INFO_3}
- PLOCALGROUP_MEMBERS_INFO_3 = ^LOCALGROUP_MEMBERS_INFO_3;
- {$EXTERNALSYM PLOCALGROUP_MEMBERS_INFO_3}
- _LOCALGROUP_MEMBERS_INFO_3 = record
- lgrmi3_domainandname: LPWSTR;
- end;
- {$EXTERNALSYM _LOCALGROUP_MEMBERS_INFO_3}
- LOCALGROUP_MEMBERS_INFO_3 = _LOCALGROUP_MEMBERS_INFO_3;
- {$EXTERNALSYM LOCALGROUP_MEMBERS_INFO_3}
- TLocalGroupMembersInfo3 = LOCALGROUP_MEMBERS_INFO_3;
- PLocalGroupMembersInfo3 = PLOCALGROUP_MEMBERS_INFO_3;
-
- LPLOCALGROUP_USERS_INFO_0 = ^LOCALGROUP_USERS_INFO_0;
- {$EXTERNALSYM LPLOCALGROUP_USERS_INFO_0}
- PLOCALGROUP_USERS_INFO_0 = ^LOCALGROUP_USERS_INFO_0;
- {$EXTERNALSYM PLOCALGROUP_USERS_INFO_0}
- _LOCALGROUP_USERS_INFO_0 = record
- lgrui0_name: LPWSTR;
- end;
- {$EXTERNALSYM _LOCALGROUP_USERS_INFO_0}
- LOCALGROUP_USERS_INFO_0 = _LOCALGROUP_USERS_INFO_0;
- {$EXTERNALSYM LOCALGROUP_USERS_INFO_0}
- TLocalGroupUsersInfo0 = LOCALGROUP_USERS_INFO_0;
- PLocalGroupUsersInfo0 = PLOCALGROUP_USERS_INFO_0;
-
-const
- LOCALGROUP_NAME_PARMNUM = 1;
- {$EXTERNALSYM LOCALGROUP_NAME_PARMNUM}
- LOCALGROUP_COMMENT_PARMNUM = 2;
- {$EXTERNALSYM LOCALGROUP_COMMENT_PARMNUM}
-
-//
-// Display Information APIs
-//
-
-function NetQueryDisplayInformation(ServerName: LPCWSTR; Level, Index, EntriesRequested, PreferredMaximumLength: DWORD; ReturnedEntryCount: LPDWORD; var SortedBuffer: PVOID): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetQueryDisplayInformation}
-
-function NetGetDisplayInformationIndex(ServerName: LPCWSTR; Level: DWORD; Prefix: LPCWSTR; Index: LPDWORD): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetGetDisplayInformationIndex}
-
-//
-// QueryDisplayInformation levels
-
-type
- PNET_DISPLAY_USER = ^NET_DISPLAY_USER;
- {$EXTERNALSYM PNET_DISPLAY_USER}
- _NET_DISPLAY_USER = record
- usri1_name: LPWSTR;
- usri1_comment: LPWSTR;
- usri1_flags: DWORD;
- usri1_full_name: LPWSTR;
- usri1_user_id: DWORD;
- usri1_next_index: DWORD;
- end;
- {$EXTERNALSYM _NET_DISPLAY_USER}
- NET_DISPLAY_USER = _NET_DISPLAY_USER;
- {$EXTERNALSYM NET_DISPLAY_USER}
- TNetDisplayUser = NET_DISPLAY_USER;
- PNetDisplayUser = PNET_DISPLAY_USER;
-
- PNET_DISPLAY_MACHINE = ^NET_DISPLAY_MACHINE;
- {$EXTERNALSYM PNET_DISPLAY_MACHINE}
- _NET_DISPLAY_MACHINE = record
- usri2_name: LPWSTR;
- usri2_comment: LPWSTR;
- usri2_flags: DWORD;
- usri2_user_id: DWORD;
- usri2_next_index: DWORD;
- end;
- {$EXTERNALSYM _NET_DISPLAY_MACHINE}
- NET_DISPLAY_MACHINE = _NET_DISPLAY_MACHINE;
- {$EXTERNALSYM NET_DISPLAY_MACHINE}
- TNetDisplayMachine = NET_DISPLAY_MACHINE;
- PNetDisplayMachine = PNET_DISPLAY_MACHINE;
-
- PNET_DISPLAY_GROUP = ^NET_DISPLAY_GROUP;
- {$EXTERNALSYM PNET_DISPLAY_GROUP}
- _NET_DISPLAY_GROUP = record
- grpi3_name: LPWSTR;
- grpi3_comment: LPWSTR;
- grpi3_group_id: DWORD;
- grpi3_attributes: DWORD;
- grpi3_next_index: DWORD;
- end;
- {$EXTERNALSYM _NET_DISPLAY_GROUP}
- NET_DISPLAY_GROUP = _NET_DISPLAY_GROUP;
- {$EXTERNALSYM NET_DISPLAY_GROUP}
- TNetDisplayGroup = NET_DISPLAY_GROUP;
- PNetDisplayGroup = PNET_DISPLAY_GROUP;
-
-//
-// Access Class
-//
-
-//
-// Function Prototypes - Access
-//
-//
-// The NetAccess APIs are only available to downlevel
-//
-
-//#define NetAccessAdd RxNetAccessAdd
-
-function NetAccessAdd(servername: LPCWSTR; level: DWORD; buf: LPBYTE; parm_err: LPDWORD): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetAccessAdd}
-
-//#define NetAccessEnum RxNetAccessEnum
-
-function NetAccessEnum(servername, BasePath: LPCWSTR; Recursive, level: DWORD; var bufptr: LPBYTE; prefmaxlen: DWORD; entriesread, totalentries, resume_handle: LPDWORD): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetAccessEnum}
-
-//#define NetAccessGetInfo RxNetAccessGetInfo
-
-function NetAccessGetInfo(servername, resource: LPCWSTR; level: DWORD; var bufptr: LPBYTE): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetAccessGetInfo}
-
-//#define NetAccessSetInfo RxNetAccessSetInfo
-
-function NetAccessSetInfo(servername, resource: LPCWSTR; level: DWORD; buf: LPBYTE; parm_err: LPDWORD): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetAccessSetInfo}
-
-//#define NetAccessDel RxNetAccessDel
-
-function NetAccessDel(servername: LPCWSTR; resource: LPCWSTR): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetAccessDel}
-
-//#define NetAccessGetUserPerms RxNetAccessGetUserPerms
-
-function NetAccessGetUserPerms(servername, UGname, resource: LPCWSTR; Perms: LPDWORD): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetAccessGetUserPerms}
-
-//
-// Data Structures - Access
-//
-
-type
- LPACCESS_INFO_0 = ^ACCESS_INFO_0;
- {$EXTERNALSYM LPACCESS_INFO_0}
- PACCESS_INFO_0 = ^ACCESS_INFO_0;
- {$EXTERNALSYM PACCESS_INFO_0}
- _ACCESS_INFO_0 = record
- acc0_resource_name: LPWSTR;
- end;
- {$EXTERNALSYM _ACCESS_INFO_0}
- ACCESS_INFO_0 = _ACCESS_INFO_0;
- {$EXTERNALSYM ACCESS_INFO_0}
- TAccessInfo0 = ACCESS_INFO_0;
- PAccessInfo0 = PACCESS_INFO_0;
-
- LPACCESS_INFO_1 = ^ACCESS_INFO_1;
- {$EXTERNALSYM LPACCESS_INFO_1}
- PACCESS_INFO_1 = ^ACCESS_INFO_1;
- {$EXTERNALSYM PACCESS_INFO_1}
- _ACCESS_INFO_1 = record
- acc1_resource_name: LPWSTR;
- acc1_attr: DWORD;
- acc1_count: DWORD;
- end;
- {$EXTERNALSYM _ACCESS_INFO_1}
- ACCESS_INFO_1 = _ACCESS_INFO_1;
- {$EXTERNALSYM ACCESS_INFO_1}
- TAccessInfo1 = ACCESS_INFO_1;
- PAccessInfo1 = PACCESS_INFO_1;
-
- LPACCESS_INFO_1002 = ^ACCESS_INFO_1002;
- {$EXTERNALSYM LPACCESS_INFO_1002}
- PACCESS_INFO_1002 = ^ACCESS_INFO_1002;
- {$EXTERNALSYM PACCESS_INFO_1002}
- _ACCESS_INFO_1002 = record
- acc1002_attr: DWORD;
- end;
- {$EXTERNALSYM _ACCESS_INFO_1002}
- ACCESS_INFO_1002 = _ACCESS_INFO_1002;
- {$EXTERNALSYM ACCESS_INFO_1002}
- TAccessInfo1002 = ACCESS_INFO_1002;
- PAccessInfo1002 = PACCESS_INFO_1002;
-
- LPACCESS_LIST = ^ACCESS_LIST;
- {$EXTERNALSYM LPACCESS_LIST}
- PACCESS_LIST = ^ACCESS_LIST;
- {$EXTERNALSYM PACCESS_LIST}
- _ACCESS_LIST = record
- acl_ugname: LPWSTR;
- acl_access: DWORD;
- end;
- {$EXTERNALSYM _ACCESS_LIST}
- ACCESS_LIST = _ACCESS_LIST;
- {$EXTERNALSYM ACCESS_LIST}
- TAccessList = ACCESS_LIST;
- PAccessList = PACCESS_LIST;
-
-//
-// Special Values and Constants - Access
-//
-
-//
-// Maximum number of permission entries for each resource.
-//
-
-const
- MAXPERMENTRIES = 64;
- {$EXTERNALSYM MAXPERMENTRIES}
-
-//
-// Bit values for the access permissions. ACCESS_ALL is a handy
-// way to specify maximum permissions. These are used in
-// acl_access field of access_list structures.
-//
-
- ACCESS_READ = $01;
- {$EXTERNALSYM ACCESS_READ}
- ACCESS_WRITE = $02;
- {$EXTERNALSYM ACCESS_WRITE}
- ACCESS_CREATE = $04;
- {$EXTERNALSYM ACCESS_CREATE}
- ACCESS_EXEC = $08;
- {$EXTERNALSYM ACCESS_EXEC}
- ACCESS_DELETE = $10;
- {$EXTERNALSYM ACCESS_DELETE}
- ACCESS_ATRIB = $20;
- {$EXTERNALSYM ACCESS_ATRIB}
- ACCESS_PERM = $40;
- {$EXTERNALSYM ACCESS_PERM}
-
- ACCESS_GROUP = $8000;
- {$EXTERNALSYM ACCESS_GROUP}
-
- ACCESS_NONE = 0;
- {$EXTERNALSYM ACCESS_NONE}
- ACCESS_ALL = ACCESS_READ or ACCESS_WRITE or ACCESS_CREATE or ACCESS_EXEC or ACCESS_DELETE or ACCESS_ATRIB or ACCESS_PERM;
- {$EXTERNALSYM ACCESS_ALL}
-
-//
-// Bit values for the acc1_attr field of the ACCESS_INFO_1 structure.
-//
-
- ACCESS_AUDIT = $1;
- {$EXTERNALSYM ACCESS_AUDIT}
-
- ACCESS_SUCCESS_OPEN = $10;
- {$EXTERNALSYM ACCESS_SUCCESS_OPEN}
- ACCESS_SUCCESS_WRITE = $20;
- {$EXTERNALSYM ACCESS_SUCCESS_WRITE}
- ACCESS_SUCCESS_DELETE = $40;
- {$EXTERNALSYM ACCESS_SUCCESS_DELETE}
- ACCESS_SUCCESS_ACL = $80;
- {$EXTERNALSYM ACCESS_SUCCESS_ACL}
- ACCESS_SUCCESS_MASK = $F0;
- {$EXTERNALSYM ACCESS_SUCCESS_MASK}
-
- ACCESS_FAIL_OPEN = $100;
- {$EXTERNALSYM ACCESS_FAIL_OPEN}
- ACCESS_FAIL_WRITE = $200;
- {$EXTERNALSYM ACCESS_FAIL_WRITE}
- ACCESS_FAIL_DELETE = $400;
- {$EXTERNALSYM ACCESS_FAIL_DELETE}
- ACCESS_FAIL_ACL = $800;
- {$EXTERNALSYM ACCESS_FAIL_ACL}
- ACCESS_FAIL_MASK = $F00;
- {$EXTERNALSYM ACCESS_FAIL_MASK}
-
- ACCESS_FAIL_SHIFT = 4;
- {$EXTERNALSYM ACCESS_FAIL_SHIFT}
-
-//
-// Parmnum value for NetAccessSetInfo.
-//
-
- ACCESS_RESOURCE_NAME_PARMNUM = 1;
- {$EXTERNALSYM ACCESS_RESOURCE_NAME_PARMNUM}
- ACCESS_ATTR_PARMNUM = 2;
- {$EXTERNALSYM ACCESS_ATTR_PARMNUM}
- ACCESS_COUNT_PARMNUM = 3;
- {$EXTERNALSYM ACCESS_COUNT_PARMNUM}
- ACCESS_ACCESS_LIST_PARMNUM = 4;
- {$EXTERNALSYM ACCESS_ACCESS_LIST_PARMNUM}
-
-//
-// the new infolevel counterparts of the old info level + parmnum
-//
-
- ACCESS_RESOURCE_NAME_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + ACCESS_RESOURCE_NAME_PARMNUM;
- {$EXTERNALSYM ACCESS_RESOURCE_NAME_INFOLEVEL}
- ACCESS_ATTR_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + ACCESS_ATTR_PARMNUM;
- {$EXTERNALSYM ACCESS_ATTR_INFOLEVEL}
- ACCESS_COUNT_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + ACCESS_COUNT_PARMNUM;
- {$EXTERNALSYM ACCESS_COUNT_INFOLEVEL}
- ACCESS_ACCESS_LIST_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + ACCESS_ACCESS_LIST_PARMNUM;
- {$EXTERNALSYM ACCESS_ACCESS_LIST_INFOLEVEL}
-
-//
-// ACCESS_LETTERS defines a letter for each bit position in
-// the acl_access field of struct access_list. Note that some
-// bits have a corresponding letter of ' ' (space).
-//
-
- ACCESS_LETTERS = 'RWCXDAP ';
- {$EXTERNALSYM ACCESS_LETTERS}
-
-// ********************************
-//
-// Password Checking API structures
-//
-// ********************************
-
-//
-// What kind of password checking is to be performed?
-// NetValidateAuthentication : Check if the authentication can be done
-// NetValidatePasswordChange: Check if the password can be changed
-// NetValidatePasswordReset: Reset the password to the given value
-//
-
-type
- _NET_VALIDATE_PASSWORD_TYPE = (
- NetValidateFiller0,
- NetValidateAuthentication,
- NetValidatePasswordChange,
- NetValidatePasswordReset);
- {$EXTERNALSYM _NET_VALIDATE_PASSWORD_TYPE}
- NET_VALIDATE_PASSWORD_TYPE = _NET_VALIDATE_PASSWORD_TYPE;
- {$EXTERNALSYM NET_VALIDATE_PASSWORD_TYPE}
- PNET_VALIDATE_PASSWORD_TYPE = ^NET_VALIDATE_PASSWORD_TYPE;
- {$EXTERNALSYM PNET_VALIDATE_PASSWORD_TYPE}
- TNetValidatePasswordType = NET_VALIDATE_PASSWORD_TYPE;
- PNetValidatePasswordType = PNET_VALIDATE_PASSWORD_TYPE;
-
-//
-// Structure to keep the password hash
-//
-
- _NET_VALIDATE_PASSWORD_HASH = record
- Length: ULONG;
- Hash: LPBYTE;
- end;
- {$EXTERNALSYM _NET_VALIDATE_PASSWORD_HASH}
- NET_VALIDATE_PASSWORD_HASH = _NET_VALIDATE_PASSWORD_HASH;
- {$EXTERNALSYM NET_VALIDATE_PASSWORD_HASH}
- PNET_VALIDATE_PASSWORD_HASH = ^NET_VALIDATE_PASSWORD_HASH;
- {$EXTERNALSYM PNET_VALIDATE_PASSWORD_HASH}
- TNetValidatePasswordHash = NET_VALIDATE_PASSWORD_HASH;
- PNetValidatePasswordHash = PNET_VALIDATE_PASSWORD_HASH;
-
-// To be used with PresentFields member of NET_VALIDATE_PERSISTED_FIELDS
-
-const
- NET_VALIDATE_PASSWORD_LAST_SET = $00000001;
- {$EXTERNALSYM NET_VALIDATE_PASSWORD_LAST_SET}
- NET_VALIDATE_BAD_PASSWORD_TIME = $00000002;
- {$EXTERNALSYM NET_VALIDATE_BAD_PASSWORD_TIME}
- NET_VALIDATE_LOCKOUT_TIME = $00000004;
- {$EXTERNALSYM NET_VALIDATE_LOCKOUT_TIME}
- NET_VALIDATE_BAD_PASSWORD_COUNT = $00000008;
- {$EXTERNALSYM NET_VALIDATE_BAD_PASSWORD_COUNT}
- NET_VALIDATE_PASSWORD_HISTORY_LENGTH = $00000010;
- {$EXTERNALSYM NET_VALIDATE_PASSWORD_HISTORY_LENGTH}
- NET_VALIDATE_PASSWORD_HISTORY = $00000020;
- {$EXTERNALSYM NET_VALIDATE_PASSWORD_HISTORY}
-
-//
-// Structure to keep information about the password and related things.
-// Present Fields: (used only in output args) which fields are changed.
-// See the constants above.
-// PasswordLastSet: When the password is last set.
-// BadPasswordTime: When the password was incorrect for the last time.
-// LockoutTime: When the account is locked out. If the account is not locked out
-// it is 0.
-// BadPasswordCount: How many times the password has given incorrectly in the
-// Observation Window.
-// PasswordHistoryLength: How many passwords are kept in the history
-// PasswordHistory: Password hashes that are in the history
-//
-
-type
- _NET_VALIDATE_PERSISTED_FIELDS = record
- PresentFields: ULONG;
- PasswordLastSet: FILETIME;
- BadPasswordTime: FILETIME;
- LockoutTime: FILETIME;
- BadPasswordCount: ULONG;
- PasswordHistoryLength: ULONG;
- PasswordHistory: PNET_VALIDATE_PASSWORD_HASH;
- end;
- {$EXTERNALSYM _NET_VALIDATE_PERSISTED_FIELDS}
- NET_VALIDATE_PERSISTED_FIELDS = _NET_VALIDATE_PERSISTED_FIELDS;
- {$EXTERNALSYM NET_VALIDATE_PERSISTED_FIELDS}
- PNET_VALIDATE_PERSISTED_FIELDS = ^NET_VALIDATE_PERSISTED_FIELDS;
- {$EXTERNALSYM PNET_VALIDATE_PERSISTED_FIELDS}
- TNetValidatePersistedFields = NET_VALIDATE_PERSISTED_FIELDS;
- PNetValidatePersistedFields = PNET_VALIDATE_PERSISTED_FIELDS;
-
-//
-// Output Arg
-// ChangedPersistedFields: Any changes to the password related info
-// ValidationStatus: Shows the result of the request
-//
-
- _NET_VALIDATE_OUTPUT_ARG = record
- ChangedPersistedFields: NET_VALIDATE_PERSISTED_FIELDS;
- ValidationStatus: NET_API_STATUS;
- end;
- {$EXTERNALSYM _NET_VALIDATE_OUTPUT_ARG}
- NET_VALIDATE_OUTPUT_ARG = _NET_VALIDATE_OUTPUT_ARG;
- {$EXTERNALSYM NET_VALIDATE_OUTPUT_ARG}
- PNET_VALIDATE_OUTPUT_ARG = ^NET_VALIDATE_OUTPUT_ARG;
- {$EXTERNALSYM PNET_VALIDATE_OUTPUT_ARG}
- TNetValidateOutputArg = NET_VALIDATE_OUTPUT_ARG;
- PNetValidateOutputArg = PNET_VALIDATE_OUTPUT_ARG;
-
-//
-// If authentication type of password check is to be made,
-// this kind of input must be used
-//
-// InputPersistedFields: Information about the account to be logged into
-// PasswordMatched: Indicates the result of the application's authentication of the supplied password
-//
-
- _NET_VALIDATE_AUTHENTICATION_INPUT_ARG = record
- InputPersistedFields: NET_VALIDATE_PERSISTED_FIELDS;
- PasswordMatched: BOOLEAN;
- end;
- {$EXTERNALSYM _NET_VALIDATE_AUTHENTICATION_INPUT_ARG}
- NET_VALIDATE_AUTHENTICATION_INPUT_ARG = _NET_VALIDATE_AUTHENTICATION_INPUT_ARG;
- {$EXTERNALSYM NET_VALIDATE_AUTHENTICATION_INPUT_ARG}
- PNET_VALIDATE_AUTHENTICATION_INPUT_ARG = ^NET_VALIDATE_AUTHENTICATION_INPUT_ARG;
- {$EXTERNALSYM PNET_VALIDATE_AUTHENTICATION_INPUT_ARG}
- TNetValidateAuthenticationInputArg = NET_VALIDATE_AUTHENTICATION_INPUT_ARG;
- PNetValidateAuthenticationInputArg = PNET_VALIDATE_AUTHENTICATION_INPUT_ARG;
-
-//
-// If password change type of check is to be made,
-// this kind of input must be used
-//
-// InputPersistedFields: Information about the account to be logged into
-// ClearPassword: The string which password is going to be
-// UserAccountName: Name of the user account
-// HashedPassword: Hash of the string that the password is going to be
-// PasswordMatch: denotes if the old password supplied by user matched or not
-//
-
- _NET_VALIDATE_PASSWORD_CHANGE_INPUT_ARG = record
- InputPersistedFields: NET_VALIDATE_PERSISTED_FIELDS;
- ClearPassword: LPWSTR;
- UserAccountName: LPWSTR;
- HashedPassword: NET_VALIDATE_PASSWORD_HASH;
- PasswordMatch: BOOLEAN;
- end;
- {$EXTERNALSYM _NET_VALIDATE_PASSWORD_CHANGE_INPUT_ARG}
- NET_VALIDATE_PASSWORD_CHANGE_INPUT_ARG = _NET_VALIDATE_PASSWORD_CHANGE_INPUT_ARG;
- {$EXTERNALSYM NET_VALIDATE_PASSWORD_CHANGE_INPUT_ARG}
- PNET_VALIDATE_PASSWORD_CHANGE_INPUT_ARG = ^NET_VALIDATE_PASSWORD_CHANGE_INPUT_ARG;
- {$EXTERNALSYM PNET_VALIDATE_PASSWORD_CHANGE_INPUT_ARG}
- TNetValidatePasswordChangeInputArg = NET_VALIDATE_PASSWORD_CHANGE_INPUT_ARG;
- PNetValidatePasswordChangeInputArg = PNET_VALIDATE_PASSWORD_CHANGE_INPUT_ARG;
-
-//
-// If password reset type of check is to be made,
-// this kind of input must be used
-//
-// InputPersistedFields: Information about the account to be logged into
-// ClearPassword: The string which password is going to be
-// UserAccountName: Name of the user account
-// HashedPassword: Hash of the string that the password is going to be
-// PasswordMustChangeAtNextLogon: Password must change for the user to be logged in
-// ClearLockout: If the account was locked out, this field can be used to clear lockout
-//
-
- _NET_VALIDATE_PASSWORD_RESET_INPUT_ARG = record
- InputPersistedFields: NET_VALIDATE_PERSISTED_FIELDS;
- ClearPassword: LPWSTR;
- UserAccountName: LPWSTR;
- HashedPassword: NET_VALIDATE_PASSWORD_HASH;
- PasswordMustChangeAtNextLogon: BOOLEAN;
- ClearLockout: BOOLEAN;
- end;
- {$EXTERNALSYM _NET_VALIDATE_PASSWORD_RESET_INPUT_ARG}
- NET_VALIDATE_PASSWORD_RESET_INPUT_ARG = _NET_VALIDATE_PASSWORD_RESET_INPUT_ARG;
- {$EXTERNALSYM NET_VALIDATE_PASSWORD_RESET_INPUT_ARG}
- PNET_VALIDATE_PASSWORD_RESET_INPUT_ARG = ^NET_VALIDATE_PASSWORD_RESET_INPUT_ARG;
- {$EXTERNALSYM PNET_VALIDATE_PASSWORD_RESET_INPUT_ARG}
- TNetValidatePasswordResetInputArg = NET_VALIDATE_PASSWORD_RESET_INPUT_ARG;
- PNetValidatePasswordResetInputArg = PNET_VALIDATE_PASSWORD_RESET_INPUT_ARG;
-
-//
-// Password Checking API structures end here
-//
-
-function NetValidatePasswordPolicy(ServerName: LPWSTR; Qualifier: LPVOID; ValidationType: NET_VALIDATE_PASSWORD_TYPE;
- InputArg: LPVOID; var OutputArg: LPVOID): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetValidatePasswordPolicy}
-
-function NetValidatePasswordPolicyFree(var OutputArg: LPVOID): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetValidatePasswordPolicyFree}
-
-//
-// Domain Class
-//
-
-//
-// Function Prototypes - Domain
-//
-
-function NetGetDCName(servername, domainname: LPCWSTR; var bufptr: LPBYTE): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetGetDCName}
-
-function NetGetAnyDCName(servername, domainname: LPCWSTR; var bufptr: LPBYTE): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetGetAnyDCName}
-
-function I_NetLogonControl(ServerName: LPCWSTR; FunctionCode, QueryLevel: DWORD; var Buffer: LPBYTE): NET_API_STATUS; stdcall;
-{$EXTERNALSYM I_NetLogonControl}
-
-function I_NetLogonControl2(ServerName: LPCWSTR; FunctionCode, QueryLevel: DWORD; Data: LPBYTE; var Buffer: LPBYTE): NET_API_STATUS; stdcall;
-{$EXTERNALSYM I_NetLogonControl2}
-
-function NetEnumerateTrustedDomains(ServerName: LPWSTR; var DomainNames: LPWSTR): NTSTATUS; stdcall;
-{$EXTERNALSYM NetEnumerateTrustedDomains}
-
-//
-// Special Values and Constants - Domain
-//
-
-//
-// FunctionCode values for I_NetLogonControl.
-//
-// NOTE : if you change the following NETLOGON_CONTROL_* values,
-// change them in net\svcdlls\logonsrv\logon.idl file also.
-//
-
-const
- NETLOGON_CONTROL_QUERY = 1; // No-op: just query
- {$EXTERNALSYM NETLOGON_CONTROL_QUERY}
- NETLOGON_CONTROL_REPLICATE = 2; // Force replicate on BDC
- {$EXTERNALSYM NETLOGON_CONTROL_REPLICATE}
- NETLOGON_CONTROL_SYNCHRONIZE = 3; // Force synchronize on BDC
- {$EXTERNALSYM NETLOGON_CONTROL_SYNCHRONIZE}
- NETLOGON_CONTROL_PDC_REPLICATE = 4; // Force PDC to broadcast change
- {$EXTERNALSYM NETLOGON_CONTROL_PDC_REPLICATE}
- NETLOGON_CONTROL_REDISCOVER = 5; // Force to re-discover trusted domain DCs
- {$EXTERNALSYM NETLOGON_CONTROL_REDISCOVER}
- NETLOGON_CONTROL_TC_QUERY = 6; // Query status of specified trusted channel status
- {$EXTERNALSYM NETLOGON_CONTROL_TC_QUERY}
- NETLOGON_CONTROL_TRANSPORT_NOTIFY = 7; // Notify netlogon that a new transport has come online
- {$EXTERNALSYM NETLOGON_CONTROL_TRANSPORT_NOTIFY}
- NETLOGON_CONTROL_FIND_USER = 8; // Find named user in a trusted domain
- {$EXTERNALSYM NETLOGON_CONTROL_FIND_USER}
- NETLOGON_CONTROL_CHANGE_PASSWORD = 9; // Change machine password on a secure channel to a trusted domain
- {$EXTERNALSYM NETLOGON_CONTROL_CHANGE_PASSWORD}
- NETLOGON_CONTROL_TC_VERIFY = 10; // Verify status of specified trusted channel
- {$EXTERNALSYM NETLOGON_CONTROL_TC_VERIFY}
- NETLOGON_CONTROL_FORCE_DNS_REG = 11; // Force DNS re-registration of all registered records
- {$EXTERNALSYM NETLOGON_CONTROL_FORCE_DNS_REG}
- NETLOGON_CONTROL_QUERY_DNS_REG = 12; // Query the status of DNS updates
- {$EXTERNALSYM NETLOGON_CONTROL_QUERY_DNS_REG}
-
-// Debug function codes
-
- NETLOGON_CONTROL_UNLOAD_NETLOGON_DLL = $FFFB;
- {$EXTERNALSYM NETLOGON_CONTROL_UNLOAD_NETLOGON_DLL}
- NETLOGON_CONTROL_BACKUP_CHANGE_LOG = $FFFC;
- {$EXTERNALSYM NETLOGON_CONTROL_BACKUP_CHANGE_LOG}
- NETLOGON_CONTROL_TRUNCATE_LOG = $FFFD;
- {$EXTERNALSYM NETLOGON_CONTROL_TRUNCATE_LOG}
- NETLOGON_CONTROL_SET_DBFLAG = $FFFE;
- {$EXTERNALSYM NETLOGON_CONTROL_SET_DBFLAG}
- NETLOGON_CONTROL_BREAKPOINT = $FFFF;
- {$EXTERNALSYM NETLOGON_CONTROL_BREAKPOINT}
-
-//
-// Query level 1 for I_NetLogonControl
-//
-
-type
- PNETLOGON_INFO_1 = ^NETLOGON_INFO_1;
- {$EXTERNALSYM PNETLOGON_INFO_1}
- _NETLOGON_INFO_1 = record
- netlog1_flags: DWORD;
- netlog1_pdc_connection_status: NET_API_STATUS;
- end;
- {$EXTERNALSYM _NETLOGON_INFO_1}
- NETLOGON_INFO_1 = _NETLOGON_INFO_1;
- {$EXTERNALSYM NETLOGON_INFO_1}
- TNetLogonInfo1 = NETLOGON_INFO_1;
- PNetLogonInfo1 = PNETLOGON_INFO_1;
-
- PNETLOGON_INFO_2 = ^NETLOGON_INFO_2;
- {$EXTERNALSYM PNETLOGON_INFO_2}
- _NETLOGON_INFO_2 = record
- netlog2_flags: DWORD;
- //
- // If NETLOGON_VERIFY_STATUS_RETURNED bit is set in
- // netlog2_flags, the following field will return
- // the status of trust verification. Otherwise,
- // the field will return the status of the secure
- // channel to the primary domain of the machine
- // (useful for BDCs only).
- //
- netlog2_pdc_connection_status: NET_API_STATUS;
- netlog2_trusted_dc_name: LPWSTR;
- netlog2_tc_connection_status: NET_API_STATUS;
- end;
- {$EXTERNALSYM _NETLOGON_INFO_2}
- NETLOGON_INFO_2 = _NETLOGON_INFO_2;
- {$EXTERNALSYM NETLOGON_INFO_2}
- TNetLogonInfo2 = NETLOGON_INFO_2;
- PNetLogonInfo2 = PNETLOGON_INFO_2;
-
- PNETLOGON_INFO_3 = ^NETLOGON_INFO_3;
- {$EXTERNALSYM PNETLOGON_INFO_3}
- _NETLOGON_INFO_3 = record
- netlog3_flags: DWORD;
- netlog3_logon_attempts: DWORD;
- netlog3_reserved1: DWORD;
- netlog3_reserved2: DWORD;
- netlog3_reserved3: DWORD;
- netlog3_reserved4: DWORD;
- netlog3_reserved5: DWORD;
- end;
- {$EXTERNALSYM _NETLOGON_INFO_3}
- NETLOGON_INFO_3 = _NETLOGON_INFO_3;
- {$EXTERNALSYM NETLOGON_INFO_3}
- TNetLogonInfo3 = NETLOGON_INFO_3;
- PNetLogonInfo3 = PNETLOGON_INFO_3;
-
- PNETLOGON_INFO_4 = ^NETLOGON_INFO_4;
- {$EXTERNALSYM PNETLOGON_INFO_4}
- _NETLOGON_INFO_4 = record
- netlog4_trusted_dc_name: LPWSTR;
- netlog4_trusted_domain_name: LPWSTR;
- end;
- {$EXTERNALSYM _NETLOGON_INFO_4}
- NETLOGON_INFO_4 = _NETLOGON_INFO_4;
- {$EXTERNALSYM NETLOGON_INFO_4}
- TNetLogonInfo4 = NETLOGON_INFO_4;
- PNetLogonInfo4 = PNETLOGON_INFO_4;
-
-//
-// Values of netlog1_flags
-//
-
-const
- NETLOGON_REPLICATION_NEEDED = $01; // Database is out of date
- {$EXTERNALSYM NETLOGON_REPLICATION_NEEDED}
- NETLOGON_REPLICATION_IN_PROGRESS = $02; // Replication is happening now
- {$EXTERNALSYM NETLOGON_REPLICATION_IN_PROGRESS}
- NETLOGON_FULL_SYNC_REPLICATION = $04; // full sync replication required/progress
- {$EXTERNALSYM NETLOGON_FULL_SYNC_REPLICATION}
- NETLOGON_REDO_NEEDED = $08; // Redo of previous replication needed
- {$EXTERNALSYM NETLOGON_REDO_NEEDED}
- NETLOGON_HAS_IP = $10; // The trusted domain DC has an IP address
- {$EXTERNALSYM NETLOGON_HAS_IP}
- NETLOGON_HAS_TIMESERV = $20; // The trusted domain DC runs the Windows Time Service
- {$EXTERNALSYM NETLOGON_HAS_TIMESERV}
- NETLOGON_DNS_UPDATE_FAILURE = $40; // There was a failure in the last update for one of the DNS records
- {$EXTERNALSYM NETLOGON_DNS_UPDATE_FAILURE}
- NETLOGON_VERIFY_STATUS_RETURNED = $80; // Trust verification status returned in netlog2_pdc_connection_status
- {$EXTERNALSYM NETLOGON_VERIFY_STATUS_RETURNED}
-
-implementation
-
-{$IFDEF DYNAMIC_LINK}
-
-var
- _NetUserAdd: Pointer;
-
-function NetUserAdd;
-begin
- GetProcedureAddress(_NetUserAdd, netapi32, 'NetUserAdd');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetUserAdd]
- end;
-end;
-
-var
- _NetUserEnum: Pointer;
-
-function NetUserEnum;
-begin
- GetProcedureAddress(_NetUserEnum, netapi32, 'NetUserEnum');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetUserEnum]
- end;
-end;
-
-var
- _NetUserGetInfo: Pointer;
-
-function NetUserGetInfo;
-begin
- GetProcedureAddress(_NetUserGetInfo, netapi32, 'NetUserGetInfo');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetUserGetInfo]
- end;
-end;
-
-var
- _NetUserSetInfo: Pointer;
-
-function NetUserSetInfo;
-begin
- GetProcedureAddress(_NetUserSetInfo, netapi32, 'NetUserSetInfo');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetUserSetInfo]
- end;
-end;
-
-var
- _NetUserDel: Pointer;
-
-function NetUserDel;
-begin
- GetProcedureAddress(_NetUserDel, netapi32, 'NetUserDel');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetUserDel]
- end;
-end;
-
-var
- _NetUserGetGroups: Pointer;
-
-function NetUserGetGroups;
-begin
- GetProcedureAddress(_NetUserGetGroups, netapi32, 'NetUserGetGroups');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetUserGetGroups]
- end;
-end;
-
-var
- _NetUserSetGroups: Pointer;
-
-function NetUserSetGroups;
-begin
- GetProcedureAddress(_NetUserSetGroups, netapi32, 'NetUserSetGroups');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetUserSetGroups]
- end;
-end;
-
-var
- _NetUserGetLocalGroups: Pointer;
-
-function NetUserGetLocalGroups;
-begin
- GetProcedureAddress(_NetUserGetLocalGroups, netapi32, 'NetUserGetLocalGroups');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetUserGetLocalGroups]
- end;
-end;
-
-var
- _NetUserModalsGet: Pointer;
-
-function NetUserModalsGet;
-begin
- GetProcedureAddress(_NetUserModalsGet, netapi32, 'NetUserModalsGet');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetUserModalsGet]
- end;
-end;
-
-var
- _NetUserModalsSet: Pointer;
-
-function NetUserModalsSet;
-begin
- GetProcedureAddress(_NetUserModalsSet, netapi32, 'NetUserModalsSet');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetUserModalsSet]
- end;
-end;
-
-var
- _NetUserChangePassword: Pointer;
-
-function NetUserChangePassword;
-begin
- GetProcedureAddress(_NetUserChangePassword, netapi32, 'NetUserChangePassword');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetUserChangePassword]
- end;
-end;
-
-var
- _NetGroupAdd: Pointer;
-
-function NetGroupAdd;
-begin
- GetProcedureAddress(_NetGroupAdd, netapi32, 'NetGroupAdd');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetGroupAdd]
- end;
-end;
-
-var
- _NetGroupAddUser: Pointer;
-
-function NetGroupAddUser;
-begin
- GetProcedureAddress(_NetGroupAddUser, netapi32, 'NetGroupAddUser');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetGroupAddUser]
- end;
-end;
-
-var
- _NetGroupEnum: Pointer;
-
-function NetGroupEnum;
-begin
- GetProcedureAddress(_NetGroupEnum, netapi32, 'NetGroupEnum');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetGroupEnum]
- end;
-end;
-
-var
- _NetGroupGetInfo: Pointer;
-
-function NetGroupGetInfo;
-begin
- GetProcedureAddress(_NetGroupGetInfo, netapi32, 'NetGroupGetInfo');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetGroupGetInfo]
- end;
-end;
-
-var
- _NetGroupSetInfo: Pointer;
-
-function NetGroupSetInfo;
-begin
- GetProcedureAddress(_NetGroupSetInfo, netapi32, 'NetGroupSetInfo');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetGroupSetInfo]
- end;
-end;
-
-var
- _NetGroupDel: Pointer;
-
-function NetGroupDel;
-begin
- GetProcedureAddress(_NetGroupDel, netapi32, 'NetGroupDel');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetGroupDel]
- end;
-end;
-
-var
- _NetGroupDelUser: Pointer;
-
-function NetGroupDelUser;
-begin
- GetProcedureAddress(_NetGroupDelUser, netapi32, 'NetGroupDelUser');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetGroupDelUser]
- end;
-end;
-
-var
- _NetGroupGetUsers: Pointer;
-
-function NetGroupGetUsers;
-begin
- GetProcedureAddress(_NetGroupGetUsers, netapi32, 'NetGroupGetUsers');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetGroupGetUsers]
- end;
-end;
-
-var
- _NetGroupSetUsers: Pointer;
-
-function NetGroupSetUsers;
-begin
- GetProcedureAddress(_NetGroupSetUsers, netapi32, 'NetGroupSetUsers');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetGroupSetUsers]
- end;
-end;
-
-var
- _NetLocalGroupAdd: Pointer;
-
-function NetLocalGroupAdd;
-begin
- GetProcedureAddress(_NetLocalGroupAdd, netapi32, 'NetLocalGroupAdd');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetLocalGroupAdd]
- end;
-end;
-
-var
- _NetLocalGroupAddMember: Pointer;
-
-function NetLocalGroupAddMember;
-begin
- GetProcedureAddress(_NetLocalGroupAddMember, netapi32, 'NetLocalGroupAddMember');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetLocalGroupAddMember]
- end;
-end;
-
-var
- _NetLocalGroupEnum: Pointer;
-
-function NetLocalGroupEnum;
-begin
- GetProcedureAddress(_NetLocalGroupEnum, netapi32, 'NetLocalGroupEnum');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetLocalGroupEnum]
- end;
-end;
-
-var
- _NetLocalGroupGetInfo: Pointer;
-
-function NetLocalGroupGetInfo;
-begin
- GetProcedureAddress(_NetLocalGroupGetInfo, netapi32, 'NetLocalGroupGetInfo');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetLocalGroupGetInfo]
- end;
-end;
-
-var
- _NetLocalGroupSetInfo: Pointer;
-
-function NetLocalGroupSetInfo;
-begin
- GetProcedureAddress(_NetLocalGroupSetInfo, netapi32, 'NetLocalGroupSetInfo');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetLocalGroupSetInfo]
- end;
-end;
-
-var
- _NetLocalGroupDel: Pointer;
-
-function NetLocalGroupDel;
-begin
- GetProcedureAddress(_NetLocalGroupDel, netapi32, 'NetLocalGroupDel');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetLocalGroupDel]
- end;
-end;
-
-var
- _NetLocalGroupDelMember: Pointer;
-
-function NetLocalGroupDelMember;
-begin
- GetProcedureAddress(_NetLocalGroupDelMember, netapi32, 'NetLocalGroupDelMember');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetLocalGroupDelMember]
- end;
-end;
-
-var
- _NetLocalGroupGetMembers: Pointer;
-
-function NetLocalGroupGetMembers;
-begin
- GetProcedureAddress(_NetLocalGroupGetMembers, netapi32, 'NetLocalGroupGetMembers');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetLocalGroupGetMembers]
- end;
-end;
-
-var
- _NetLocalGroupSetMembers: Pointer;
-
-function NetLocalGroupSetMembers;
-begin
- GetProcedureAddress(_NetLocalGroupSetMembers, netapi32, 'NetLocalGroupSetMembers');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetLocalGroupSetMembers]
- end;
-end;
-
-var
- _NetLocalGroupAddMembers: Pointer;
-
-function NetLocalGroupAddMembers;
-begin
- GetProcedureAddress(_NetLocalGroupAddMembers, netapi32, 'NetLocalGroupAddMembers');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetLocalGroupAddMembers]
- end;
-end;
-
-var
- _NetLocalGroupDelMembers: Pointer;
-
-function NetLocalGroupDelMembers;
-begin
- GetProcedureAddress(_NetLocalGroupDelMembers, netapi32, 'NetLocalGroupDelMembers');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetLocalGroupDelMembers]
- end;
-end;
-
-var
- _NetQueryDisplayInformation: Pointer;
-
-function NetQueryDisplayInformation;
-begin
- GetProcedureAddress(_NetQueryDisplayInformation, netapi32, 'NetQueryDisplayInformation');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetQueryDisplayInformation]
- end;
-end;
-
-var
- _NetGetDisplayInformationIndex: Pointer;
-
-function NetGetDisplayInformationIndex;
-begin
- GetProcedureAddress(_NetGetDisplayInformationIndex, netapi32, 'NetGetDisplayInformationIndex');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetGetDisplayInformationIndex]
- end;
-end;
-
-var
- _NetAccessAdd: Pointer;
-
-function NetAccessAdd;
-begin
- GetProcedureAddress(_NetAccessAdd, netapi32, 'NetAccessAdd');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetAccessAdd]
- end;
-end;
-
-var
- _NetAccessEnum: Pointer;
-
-function NetAccessEnum;
-begin
- GetProcedureAddress(_NetAccessEnum, netapi32, 'NetAccessEnum');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetAccessEnum]
- end;
-end;
-
-var
- _NetAccessGetInfo: Pointer;
-
-function NetAccessGetInfo;
-begin
- GetProcedureAddress(_NetAccessGetInfo, netapi32, 'NetAccessGetInfo');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetAccessGetInfo]
- end;
-end;
-
-var
- _NetAccessSetInfo: Pointer;
-
-function NetAccessSetInfo;
-begin
- GetProcedureAddress(_NetAccessSetInfo, netapi32, 'NetAccessSetInfo');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetAccessSetInfo]
- end;
-end;
-
-var
- _NetAccessDel: Pointer;
-
-function NetAccessDel;
-begin
- GetProcedureAddress(_NetAccessDel, netapi32, 'NetAccessDel');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetAccessDel]
- end;
-end;
-
-var
- _NetAccessGetUserPerms: Pointer;
-
-function NetAccessGetUserPerms;
-begin
- GetProcedureAddress(_NetAccessGetUserPerms, netapi32, 'NetAccessGetUserPerms');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetAccessGetUserPerms]
- end;
-end;
-
-var
- _NetValidatePasswordPolicy: Pointer;
-
-function NetValidatePasswordPolicy;
-begin
- GetProcedureAddress(_NetValidatePasswordPolicy, netapi32, 'NetValidatePasswordPolicy');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetValidatePasswordPolicy]
- end;
-end;
-
-var
- _NetValidatePasswordPolicyFree: Pointer;
-
-function NetValidatePasswordPolicyFree;
-begin
- GetProcedureAddress(_NetValidatePasswordPolicyFree, netapi32, 'NetValidatePasswordPolicyFree');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetValidatePasswordPolicyFree]
- end;
-end;
-
-var
- _NetGetDCName: Pointer;
-
-function NetGetDCName;
-begin
- GetProcedureAddress(_NetGetDCName, netapi32, 'NetGetDCName');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetGetDCName]
- end;
-end;
-
-var
- _NetGetAnyDCName: Pointer;
-
-function NetGetAnyDCName;
-begin
- GetProcedureAddress(_NetGetAnyDCName, netapi32, 'NetGetAnyDCName');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetGetAnyDCName]
- end;
-end;
-
-var
- _I_NetLogonControl: Pointer;
-
-function I_NetLogonControl;
-begin
- GetProcedureAddress(_I_NetLogonControl, netapi32, 'I_NetLogonControl');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_I_NetLogonControl]
- end;
-end;
-
-var
- _I_NetLogonControl2: Pointer;
-
-function I_NetLogonControl2;
-begin
- GetProcedureAddress(_I_NetLogonControl2, netapi32, 'I_NetLogonControl2');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_I_NetLogonControl2]
- end;
-end;
-
-var
- _NetEnumerateTrustedDomains: Pointer;
-
-function NetEnumerateTrustedDomains;
-begin
- GetProcedureAddress(_NetEnumerateTrustedDomains, netapi32, 'NetEnumerateTrustedDomains');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetEnumerateTrustedDomains]
- end;
-end;
-
-{$ELSE}
-
-function NetUserAdd; external netapi32 name 'NetUserAdd';
-function NetUserEnum; external netapi32 name 'NetUserEnum';
-function NetUserGetInfo; external netapi32 name 'NetUserGetInfo';
-function NetUserSetInfo; external netapi32 name 'NetUserSetInfo';
-function NetUserDel; external netapi32 name 'NetUserDel';
-function NetUserGetGroups; external netapi32 name 'NetUserGetGroups';
-function NetUserSetGroups; external netapi32 name 'NetUserSetGroups';
-function NetUserGetLocalGroups; external netapi32 name 'NetUserGetLocalGroups';
-function NetUserModalsGet; external netapi32 name 'NetUserModalsGet';
-function NetUserModalsSet; external netapi32 name 'NetUserModalsSet';
-function NetUserChangePassword; external netapi32 name 'NetUserChangePassword';
-function NetGroupAdd; external netapi32 name 'NetGroupAdd';
-function NetGroupAddUser; external netapi32 name 'NetGroupAddUser';
-function NetGroupEnum; external netapi32 name 'NetGroupEnum';
-function NetGroupGetInfo; external netapi32 name 'NetGroupGetInfo';
-function NetGroupSetInfo; external netapi32 name 'NetGroupSetInfo';
-function NetGroupDel; external netapi32 name 'NetGroupDel';
-function NetGroupDelUser; external netapi32 name 'NetGroupDelUser';
-function NetGroupGetUsers; external netapi32 name 'NetGroupGetUsers';
-function NetGroupSetUsers; external netapi32 name 'NetGroupSetUsers';
-function NetLocalGroupAdd; external netapi32 name 'NetLocalGroupAdd';
-function NetLocalGroupAddMember; external netapi32 name 'NetLocalGroupAddMember';
-function NetLocalGroupEnum; external netapi32 name 'NetLocalGroupEnum';
-function NetLocalGroupGetInfo; external netapi32 name 'NetLocalGroupGetInfo';
-function NetLocalGroupSetInfo; external netapi32 name 'NetLocalGroupSetInfo';
-function NetLocalGroupDel; external netapi32 name 'NetLocalGroupDel';
-function NetLocalGroupDelMember; external netapi32 name 'NetLocalGroupDelMember';
-function NetLocalGroupGetMembers; external netapi32 name 'NetLocalGroupGetMembers';
-function NetLocalGroupSetMembers; external netapi32 name 'NetLocalGroupSetMembers';
-function NetLocalGroupAddMembers; external netapi32 name 'NetLocalGroupAddMembers';
-function NetLocalGroupDelMembers; external netapi32 name 'NetLocalGroupDelMembers';
-function NetQueryDisplayInformation; external netapi32 name 'NetQueryDisplayInformation';
-function NetGetDisplayInformationIndex; external netapi32 name 'NetGetDisplayInformationIndex';
-function NetAccessAdd; external netapi32 name 'NetAccessAdd';
-function NetAccessEnum; external netapi32 name 'NetAccessEnum';
-function NetAccessGetInfo; external netapi32 name 'NetAccessGetInfo';
-function NetAccessSetInfo; external netapi32 name 'NetAccessSetInfo';
-function NetAccessDel; external netapi32 name 'NetAccessDel';
-function NetAccessGetUserPerms; external netapi32 name 'NetAccessGetUserPerms';
-function NetValidatePasswordPolicy; external netapi32 name 'NetValidatePasswordPolicy';
-function NetValidatePasswordPolicyFree; external netapi32 name 'NetValidatePasswordPolicyFree';
-function NetGetDCName; external netapi32 name 'NetGetDCName';
-function NetGetAnyDCName; external netapi32 name 'NetGetAnyDCName';
-function I_NetLogonControl; external netapi32 name 'I_NetLogonControl';
-function I_NetLogonControl2; external netapi32 name 'I_NetLogonControl2';
-function NetEnumerateTrustedDomains; external netapi32 name 'NetEnumerateTrustedDomains';
-
-{$ENDIF DYNAMIC_LINK}
-
-end.
+{******************************************************************************}
+{ }
+{ Lan Manager Access API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: lmaccess.h, released November 2001. The original Pascal}
+{ code is: LmAccess.pas, released Februari 2002. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwalmaccess.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaLmAccess;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "lmaccess.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaWinNT, JwaWinType, JwaLmCons;
+
+//
+// Function Prototypes - User
+//
+
+function NetUserAdd(servername: LPCWSTR; level: DWORD; buf: LPBYTE; parm_err: LPDWORD): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetUserAdd}
+
+function NetUserEnum(servername: LPCWSTR; level, filter: DWORD; var bufptr: LPBYTE; prefmaxlen: DWORD; entriesread, totalentries, resume_handle: LPDWORD): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetUserEnum}
+
+function NetUserGetInfo(servername, username: LPCWSTR; level: DWORD; var bufptr: LPBYTE): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetUserGetInfo}
+
+function NetUserSetInfo(servername, username: LPCWSTR; level: DWORD; buf: LPBYTE; parm_err: LPDWORD): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetUserSetInfo}
+
+function NetUserDel(servername: LPCWSTR; username: LPCWSTR): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetUserDel}
+
+function NetUserGetGroups(servername, username: LPCWSTR; level: DWORD; var bufptr: LPBYTE; prefmaxlen: DWORD; entriesread, totalentries: LPDWORD): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetUserGetGroups}
+
+function NetUserSetGroups(servername, username: LPCWSTR; level: DWORD; buf: LPBYTE; num_entries: DWORD): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetUserSetGroups}
+
+function NetUserGetLocalGroups(servername, username: LPCWSTR; level, flags: DWORD; var bufptr: LPBYTE; prefmaxlen: DWORD; entriesread, totalentries: LPDWORD): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetUserGetLocalGroups}
+
+function NetUserModalsGet(servername: LPCWSTR; level: DWORD; var bufptr: LPBYTE): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetUserModalsGet}
+
+function NetUserModalsSet(servername: LPCWSTR; level: DWORD; buf: LPBYTE; parm_err: LPDWORD): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetUserModalsSet}
+
+function NetUserChangePassword(domainname, username, oldpassword, newpassword: LPCWSTR): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetUserChangePassword}
+
+//
+// Data Structures - User
+//
+
+type
+ LPUSER_INFO_0 = ^USER_INFO_0;
+ {$EXTERNALSYM LPUSER_INFO_0}
+ PUSER_INFO_0 = ^USER_INFO_0;
+ {$EXTERNALSYM PUSER_INFO_0}
+ _USER_INFO_0 = record
+ usri0_name: LPWSTR;
+ end;
+ {$EXTERNALSYM _USER_INFO_0}
+ USER_INFO_0 = _USER_INFO_0;
+ {$EXTERNALSYM USER_INFO_0}
+ TUserInfo0 = USER_INFO_0;
+ PUserInfo0 = PUSER_INFO_0;
+
+ LPUSER_INFO_1 = ^USER_INFO_1;
+ {$EXTERNALSYM LPUSER_INFO_1}
+ PUSER_INFO_1 = ^USER_INFO_1;
+ {$EXTERNALSYM PUSER_INFO_1}
+ _USER_INFO_1 = record
+ usri1_name: LPWSTR;
+ usri1_password: LPWSTR;
+ usri1_password_age: DWORD;
+ usri1_priv: DWORD;
+ usri1_home_dir: LPWSTR;
+ usri1_comment: LPWSTR;
+ usri1_flags: DWORD;
+ usri1_script_path: LPWSTR;
+ end;
+ {$EXTERNALSYM _USER_INFO_1}
+ USER_INFO_1 = _USER_INFO_1;
+ {$EXTERNALSYM USER_INFO_1}
+ TUserInfo1 = USER_INFO_1;
+ PUserInfo1 = PUSER_INFO_1;
+
+ LPUSER_INFO_2 = ^USER_INFO_2;
+ {$EXTERNALSYM LPUSER_INFO_2}
+ PUSER_INFO_2 = ^USER_INFO_2;
+ {$EXTERNALSYM PUSER_INFO_2}
+ _USER_INFO_2 = record
+ usri2_name: LPWSTR;
+ usri2_password: LPWSTR;
+ usri2_password_age: DWORD;
+ usri2_priv: DWORD;
+ usri2_home_dir: LPWSTR;
+ usri2_comment: LPWSTR;
+ usri2_flags: DWORD;
+ usri2_script_path: LPWSTR;
+ usri2_auth_flags: DWORD;
+ usri2_full_name: LPWSTR;
+ usri2_usr_comment: LPWSTR;
+ usri2_parms: LPWSTR;
+ usri2_workstations: LPWSTR;
+ usri2_last_logon: DWORD;
+ usri2_last_logoff: DWORD;
+ usri2_acct_expires: DWORD;
+ usri2_max_storage: DWORD;
+ usri2_units_per_week: DWORD;
+ usri2_logon_hours: PBYTE;
+ usri2_bad_pw_count: DWORD;
+ usri2_num_logons: DWORD;
+ usri2_logon_server: LPWSTR;
+ usri2_country_code: DWORD;
+ usri2_code_page: DWORD;
+ end;
+ {$EXTERNALSYM _USER_INFO_2}
+ USER_INFO_2 = _USER_INFO_2;
+ {$EXTERNALSYM USER_INFO_2}
+ TUserInfo2 = USER_INFO_2;
+ PUserInfo2 = PUSER_INFO_2;
+
+ LPUSER_INFO_3 = ^USER_INFO_3;
+ {$EXTERNALSYM LPUSER_INFO_3}
+ PUSER_INFO_3 = ^USER_INFO_3;
+ {$EXTERNALSYM PUSER_INFO_3}
+ _USER_INFO_3 = record
+ usri3_name: LPWSTR;
+ usri3_password: LPWSTR;
+ usri3_password_age: DWORD;
+ usri3_priv: DWORD;
+ usri3_home_dir: LPWSTR;
+ usri3_comment: LPWSTR;
+ usri3_flags: DWORD;
+ usri3_script_path: LPWSTR;
+ usri3_auth_flags: DWORD;
+ usri3_full_name: LPWSTR;
+ usri3_usr_comment: LPWSTR;
+ usri3_parms: LPWSTR;
+ usri3_workstations: LPWSTR;
+ usri3_last_logon: DWORD;
+ usri3_last_logoff: DWORD;
+ usri3_acct_expires: DWORD;
+ usri3_max_storage: DWORD;
+ usri3_units_per_week: DWORD;
+ usri3_logon_hours: PBYTE;
+ usri3_bad_pw_count: DWORD;
+ usri3_num_logons: DWORD;
+ usri3_logon_server: LPWSTR;
+ usri3_country_code: DWORD;
+ usri3_code_page: DWORD;
+ usri3_user_id: DWORD;
+ usri3_primary_group_id: DWORD;
+ usri3_profile: LPWSTR;
+ usri3_home_dir_drive: LPWSTR;
+ usri3_password_expired: DWORD;
+ end;
+ {$EXTERNALSYM _USER_INFO_3}
+ USER_INFO_3 = _USER_INFO_3;
+ {$EXTERNALSYM USER_INFO_3}
+ TUserInfo3 = USER_INFO_3;
+ PUserInfo3 = PUSER_INFO_3;
+
+ LPUSER_INFO_4 = ^USER_INFO_4;
+ {$EXTERNALSYM LPUSER_INFO_4}
+ PUSER_INFO_4 = ^USER_INFO_4;
+ {$EXTERNALSYM PUSER_INFO_4}
+ _USER_INFO_4 = record
+ usri4_name: LPWSTR;
+ usri4_password: LPWSTR;
+ usri4_password_age: DWORD;
+ usri4_priv: DWORD;
+ usri4_home_dir: LPWSTR;
+ usri4_comment: LPWSTR;
+ usri4_flags: DWORD;
+ usri4_script_path: LPWSTR;
+ usri4_auth_flags: DWORD;
+ usri4_full_name: LPWSTR;
+ usri4_usr_comment: LPWSTR;
+ usri4_parms: LPWSTR;
+ usri4_workstations: LPWSTR;
+ usri4_last_logon: DWORD;
+ usri4_last_logoff: DWORD;
+ usri4_acct_expires: DWORD;
+ usri4_max_storage: DWORD;
+ usri4_units_per_week: DWORD;
+ usri4_logon_hours: PBYTE;
+ usri4_bad_pw_count: DWORD;
+ usri4_num_logons: DWORD;
+ usri4_logon_server: LPWSTR;
+ usri4_country_code: DWORD;
+ usri4_code_page: DWORD;
+ usri4_user_sid: PSID;
+ usri4_primary_group_id: DWORD;
+ usri4_profile: LPWSTR;
+ usri4_home_dir_drive: LPWSTR;
+ usri4_password_expired: DWORD;
+ end;
+ {$EXTERNALSYM _USER_INFO_4}
+ USER_INFO_4 = _USER_INFO_4;
+ {$EXTERNALSYM USER_INFO_4}
+ TUserInfo4 = USER_INFO_4;
+ PUserInfo4 = PUSER_INFO_4;
+
+ LPUSER_INFO_10 = ^USER_INFO_10;
+ {$EXTERNALSYM LPUSER_INFO_10}
+ PUSER_INFO_10 = ^USER_INFO_10;
+ {$EXTERNALSYM PUSER_INFO_10}
+ _USER_INFO_10 = record
+ usri10_name: LPWSTR;
+ usri10_comment: LPWSTR;
+ usri10_usr_comment: LPWSTR;
+ usri10_full_name: LPWSTR;
+ end;
+ {$EXTERNALSYM _USER_INFO_10}
+ USER_INFO_10 = _USER_INFO_10;
+ {$EXTERNALSYM USER_INFO_10}
+ TUserInfo10 = USER_INFO_10;
+ PUserInfo10 = PUSER_INFO_10;
+
+ LPUSER_INFO_11 = ^USER_INFO_11;
+ {$EXTERNALSYM LPUSER_INFO_11}
+ PUSER_INFO_11 = ^USER_INFO_11;
+ {$EXTERNALSYM PUSER_INFO_11}
+ _USER_INFO_11 = record
+ usri11_name: LPWSTR;
+ usri11_comment: LPWSTR;
+ usri11_usr_comment: LPWSTR;
+ usri11_full_name: LPWSTR;
+ usri11_priv: DWORD;
+ usri11_auth_flags: DWORD;
+ usri11_password_age: DWORD;
+ usri11_home_dir: LPWSTR;
+ usri11_parms: LPWSTR;
+ usri11_last_logon: DWORD;
+ usri11_last_logoff: DWORD;
+ usri11_bad_pw_count: DWORD;
+ usri11_num_logons: DWORD;
+ usri11_logon_server: LPWSTR;
+ usri11_country_code: DWORD;
+ usri11_workstations: LPWSTR;
+ usri11_max_storage: DWORD;
+ usri11_units_per_week: DWORD;
+ usri11_logon_hours: PBYTE;
+ usri11_code_page: DWORD;
+ end;
+ {$EXTERNALSYM _USER_INFO_11}
+ USER_INFO_11 = _USER_INFO_11;
+ {$EXTERNALSYM USER_INFO_11}
+ TUserInfo11 = USER_INFO_11;
+ PUserInfo11 = PUSER_INFO_11;
+
+ LPUSER_INFO_20 = ^USER_INFO_20;
+ {$EXTERNALSYM LPUSER_INFO_20}
+ PUSER_INFO_20 = ^USER_INFO_20;
+ {$EXTERNALSYM PUSER_INFO_20}
+ _USER_INFO_20 = record
+ usri20_name: LPWSTR;
+ usri20_full_name: LPWSTR;
+ usri20_comment: LPWSTR;
+ usri20_flags: DWORD;
+ usri20_user_id: DWORD;
+ end;
+ {$EXTERNALSYM _USER_INFO_20}
+ USER_INFO_20 = _USER_INFO_20;
+ {$EXTERNALSYM USER_INFO_20}
+ TUserInfo20 = USER_INFO_20;
+ PUserInfo20 = PUSER_INFO_20;
+
+ LPUSER_INFO_21 = ^USER_INFO_21;
+ {$EXTERNALSYM LPUSER_INFO_21}
+ PUSER_INFO_21 = ^USER_INFO_21;
+ {$EXTERNALSYM PUSER_INFO_21}
+ _USER_INFO_21 = record
+ usri21_password: array [0..ENCRYPTED_PWLEN - 1] of BYTE;
+ end;
+ {$EXTERNALSYM _USER_INFO_21}
+ USER_INFO_21 = _USER_INFO_21;
+ {$EXTERNALSYM USER_INFO_21}
+ TUserInfo21 = USER_INFO_21;
+ PUserInfo21 = PUSER_INFO_21;
+
+ LPUSER_INFO_22 = ^USER_INFO_22;
+ {$EXTERNALSYM LPUSER_INFO_22}
+ PUSER_INFO_22 = ^USER_INFO_22;
+ {$EXTERNALSYM PUSER_INFO_22}
+ _USER_INFO_22 = record
+ usri22_name: LPWSTR;
+ usri22_password: array [0..ENCRYPTED_PWLEN - 1] of BYTE;
+ usri22_password_age: DWORD;
+ usri22_priv: DWORD;
+ usri22_home_dir: LPWSTR;
+ usri22_comment: LPWSTR;
+ usri22_flags: DWORD;
+ usri22_script_path: LPWSTR;
+ usri22_auth_flags: DWORD;
+ usri22_full_name: LPWSTR;
+ usri22_usr_comment: LPWSTR;
+ usri22_parms: LPWSTR;
+ usri22_workstations: LPWSTR;
+ usri22_last_logon: DWORD;
+ usri22_last_logoff: DWORD;
+ usri22_acct_expires: DWORD;
+ usri22_max_storage: DWORD;
+ usri22_units_per_week: DWORD;
+ usri22_logon_hours: PBYTE;
+ usri22_bad_pw_count: DWORD;
+ usri22_num_logons: DWORD;
+ usri22_logon_server: LPWSTR;
+ usri22_country_code: DWORD;
+ usri22_code_page: DWORD;
+ end;
+ {$EXTERNALSYM _USER_INFO_22}
+ USER_INFO_22 = _USER_INFO_22;
+ {$EXTERNALSYM USER_INFO_22}
+ TUserInfo22 = USER_INFO_22;
+ PUserInfo22 = PUSER_INFO_22;
+
+ LPUSER_INFO_23 = ^USER_INFO_23;
+ {$EXTERNALSYM LPUSER_INFO_23}
+ PUSER_INFO_23 = ^USER_INFO_23;
+ {$EXTERNALSYM PUSER_INFO_23}
+ _USER_INFO_23 = record
+ usri23_name: LPWSTR;
+ usri23_full_name: LPWSTR;
+ usri23_comment: LPWSTR;
+ usri23_flags: DWORD;
+ usri23_user_sid: PSID;
+ end;
+ {$EXTERNALSYM _USER_INFO_23}
+ USER_INFO_23 = _USER_INFO_23;
+ {$EXTERNALSYM USER_INFO_23}
+ TUserInfo23 = USER_INFO_23;
+ PUserInfo23 = PUSER_INFO_23;
+
+ LPUSER_INFO_1003 = ^USER_INFO_1003;
+ {$EXTERNALSYM LPUSER_INFO_1003}
+ PUSER_INFO_1003 = ^USER_INFO_1003;
+ {$EXTERNALSYM PUSER_INFO_1003}
+ _USER_INFO_1003 = record
+ usri1003_password: LPWSTR;
+ end;
+ {$EXTERNALSYM _USER_INFO_1003}
+ USER_INFO_1003 = _USER_INFO_1003;
+ {$EXTERNALSYM USER_INFO_1003}
+ TUserInfo1003 = USER_INFO_1003;
+ PUserInfo1003 = PUSER_INFO_1003;
+
+ LPUSER_INFO_1005 = ^USER_INFO_1005;
+ {$EXTERNALSYM LPUSER_INFO_1005}
+ PUSER_INFO_1005 = ^USER_INFO_1005;
+ {$EXTERNALSYM PUSER_INFO_1005}
+ _USER_INFO_1005 = record
+ usri1005_priv: DWORD;
+ end;
+ {$EXTERNALSYM _USER_INFO_1005}
+ USER_INFO_1005 = _USER_INFO_1005;
+ {$EXTERNALSYM USER_INFO_1005}
+ TUserInfo1005 = USER_INFO_1005;
+ PUserInfo1005 = PUSER_INFO_1005;
+
+ LPUSER_INFO_1006 = ^USER_INFO_1006;
+ {$EXTERNALSYM LPUSER_INFO_1006}
+ PUSER_INFO_1006 = ^USER_INFO_1006;
+ {$EXTERNALSYM PUSER_INFO_1006}
+ _USER_INFO_1006 = record
+ usri1006_home_dir: LPWSTR;
+ end;
+ {$EXTERNALSYM _USER_INFO_1006}
+ USER_INFO_1006 = _USER_INFO_1006;
+ {$EXTERNALSYM USER_INFO_1006}
+ TUserInfo1006 = USER_INFO_1006;
+ PUserInfo1006 = PUSER_INFO_1006;
+
+ LPUSER_INFO_1007 = ^USER_INFO_1007;
+ {$EXTERNALSYM LPUSER_INFO_1007}
+ PUSER_INFO_1007 = ^USER_INFO_1007;
+ {$EXTERNALSYM PUSER_INFO_1007}
+ _USER_INFO_1007 = record
+ usri1007_comment: LPWSTR;
+ end;
+ {$EXTERNALSYM _USER_INFO_1007}
+ USER_INFO_1007 = _USER_INFO_1007;
+ {$EXTERNALSYM USER_INFO_1007}
+ TUserInfo1007 = USER_INFO_1007;
+ PUserInfo1007 = PUSER_INFO_1007;
+
+ LPUSER_INFO_1008 = ^USER_INFO_1008;
+ {$EXTERNALSYM LPUSER_INFO_1008}
+ PUSER_INFO_1008 = ^USER_INFO_1008;
+ {$EXTERNALSYM PUSER_INFO_1008}
+ _USER_INFO_1008 = record
+ usri1008_flags: DWORD;
+ end;
+ {$EXTERNALSYM _USER_INFO_1008}
+ USER_INFO_1008 = _USER_INFO_1008;
+ {$EXTERNALSYM USER_INFO_1008}
+ TUserInfo1008 = USER_INFO_1008;
+ PUserInfo1008 = PUSER_INFO_1008;
+
+ LPUSER_INFO_1009 = ^USER_INFO_1009;
+ {$EXTERNALSYM LPUSER_INFO_1009}
+ PUSER_INFO_1009 = ^USER_INFO_1009;
+ {$EXTERNALSYM PUSER_INFO_1009}
+ _USER_INFO_1009 = record
+ usri1009_script_path: LPWSTR;
+ end;
+ {$EXTERNALSYM _USER_INFO_1009}
+ USER_INFO_1009 = _USER_INFO_1009;
+ {$EXTERNALSYM USER_INFO_1009}
+ TUserInfo1009 = USER_INFO_1009;
+ PUserInfo1009 = PUSER_INFO_1009;
+
+ LPUSER_INFO_1010 = ^USER_INFO_1010;
+ {$EXTERNALSYM LPUSER_INFO_1010}
+ PUSER_INFO_1010 = ^USER_INFO_1010;
+ {$EXTERNALSYM PUSER_INFO_1010}
+ _USER_INFO_1010 = record
+ usri1010_auth_flags: DWORD;
+ end;
+ {$EXTERNALSYM _USER_INFO_1010}
+ USER_INFO_1010 = _USER_INFO_1010;
+ {$EXTERNALSYM USER_INFO_1010}
+ TUserInfo1010 = USER_INFO_1010;
+ PUserInfo1010 = PUSER_INFO_1010;
+
+ LPUSER_INFO_1011 = ^USER_INFO_1011;
+ {$EXTERNALSYM LPUSER_INFO_1011}
+ PUSER_INFO_1011 = ^USER_INFO_1011;
+ {$EXTERNALSYM PUSER_INFO_1011}
+ _USER_INFO_1011 = record
+ usri1011_full_name: LPWSTR;
+ end;
+ {$EXTERNALSYM _USER_INFO_1011}
+ USER_INFO_1011 = _USER_INFO_1011;
+ {$EXTERNALSYM USER_INFO_1011}
+ TUserInfo1011 = USER_INFO_1011;
+ PUserInfo1011 = PUSER_INFO_1011;
+
+ LPUSER_INFO_1012 = ^USER_INFO_1012;
+ {$EXTERNALSYM LPUSER_INFO_1012}
+ PUSER_INFO_1012 = ^USER_INFO_1012;
+ {$EXTERNALSYM PUSER_INFO_1012}
+ _USER_INFO_1012 = record
+ usri1012_usr_comment: LPWSTR;
+ end;
+ {$EXTERNALSYM _USER_INFO_1012}
+ USER_INFO_1012 = _USER_INFO_1012;
+ {$EXTERNALSYM USER_INFO_1012}
+ TUserInfo1012 = USER_INFO_1012;
+ PUserInfo1012 = PUSER_INFO_1012;
+
+ LPUSER_INFO_1013 = ^USER_INFO_1013;
+ {$EXTERNALSYM LPUSER_INFO_1013}
+ PUSER_INFO_1013 = ^USER_INFO_1013;
+ {$EXTERNALSYM PUSER_INFO_1013}
+ _USER_INFO_1013 = record
+ usri1013_parms: LPWSTR;
+ end;
+ {$EXTERNALSYM _USER_INFO_1013}
+ USER_INFO_1013 = _USER_INFO_1013;
+ {$EXTERNALSYM USER_INFO_1013}
+ TUserInfo1013 = USER_INFO_1013;
+ PUserInfo1013 = PUSER_INFO_1013;
+
+ LPUSER_INFO_1014 = ^USER_INFO_1014;
+ {$EXTERNALSYM LPUSER_INFO_1014}
+ PUSER_INFO_1014 = ^USER_INFO_1014;
+ {$EXTERNALSYM PUSER_INFO_1014}
+ _USER_INFO_1014 = record
+ usri1014_workstations: LPWSTR;
+ end;
+ {$EXTERNALSYM _USER_INFO_1014}
+ USER_INFO_1014 = _USER_INFO_1014;
+ {$EXTERNALSYM USER_INFO_1014}
+ TUserInfo1014 = USER_INFO_1014;
+ PUserInfo1014 = PUSER_INFO_1014;
+
+ LPUSER_INFO_1017 = ^USER_INFO_1017;
+ {$EXTERNALSYM LPUSER_INFO_1017}
+ PUSER_INFO_1017 = ^USER_INFO_1017;
+ {$EXTERNALSYM PUSER_INFO_1017}
+ _USER_INFO_1017 = record
+ usri1017_acct_expires: DWORD;
+ end;
+ {$EXTERNALSYM _USER_INFO_1017}
+ USER_INFO_1017 = _USER_INFO_1017;
+ {$EXTERNALSYM USER_INFO_1017}
+ TUserInfo1017 = USER_INFO_1017;
+ PUserInfo1017 = PUSER_INFO_1017;
+
+ LPUSER_INFO_1018 = ^USER_INFO_1018;
+ {$EXTERNALSYM LPUSER_INFO_1018}
+ PUSER_INFO_1018 = ^USER_INFO_1018;
+ {$EXTERNALSYM PUSER_INFO_1018}
+ _USER_INFO_1018 = record
+ usri1018_max_storage: DWORD;
+ end;
+ {$EXTERNALSYM _USER_INFO_1018}
+ USER_INFO_1018 = _USER_INFO_1018;
+ {$EXTERNALSYM USER_INFO_1018}
+ TUserInfo1018 = USER_INFO_1018;
+ PUserInfo1018 = PUSER_INFO_1018;
+
+ LPUSER_INFO_1020 = ^USER_INFO_1020;
+ {$EXTERNALSYM LPUSER_INFO_1020}
+ PUSER_INFO_1020 = ^USER_INFO_1020;
+ {$EXTERNALSYM PUSER_INFO_1020}
+ _USER_INFO_1020 = record
+ usri1020_units_per_week: DWORD;
+ usri1020_logon_hours: LPBYTE;
+ end;
+ {$EXTERNALSYM _USER_INFO_1020}
+ USER_INFO_1020 = _USER_INFO_1020;
+ {$EXTERNALSYM USER_INFO_1020}
+ TUserInfo1020 = USER_INFO_1020;
+ PUserInfo1020 = PUSER_INFO_1020;
+
+ LPUSER_INFO_1023 = ^USER_INFO_1023;
+ {$EXTERNALSYM LPUSER_INFO_1023}
+ PUSER_INFO_1023 = ^USER_INFO_1023;
+ {$EXTERNALSYM PUSER_INFO_1023}
+ _USER_INFO_1023 = record
+ usri1023_logon_server: LPWSTR;
+ end;
+ {$EXTERNALSYM _USER_INFO_1023}
+ USER_INFO_1023 = _USER_INFO_1023;
+ {$EXTERNALSYM USER_INFO_1023}
+ TUserInfo1023 = USER_INFO_1023;
+ PUserInfo1023 = PUSER_INFO_1023;
+
+ LPUSER_INFO_1024 = ^USER_INFO_1024;
+ {$EXTERNALSYM LPUSER_INFO_1024}
+ PUSER_INFO_1024 = ^USER_INFO_1024;
+ {$EXTERNALSYM PUSER_INFO_1024}
+ _USER_INFO_1024 = record
+ usri1024_country_code: DWORD;
+ end;
+ {$EXTERNALSYM _USER_INFO_1024}
+ USER_INFO_1024 = _USER_INFO_1024;
+ {$EXTERNALSYM USER_INFO_1024}
+ TUserInfo1024 = USER_INFO_1024;
+ PUserInfo1024 = PUSER_INFO_1024;
+
+ LPUSER_INFO_1025 = ^USER_INFO_1025;
+ {$EXTERNALSYM LPUSER_INFO_1025}
+ PUSER_INFO_1025 = ^USER_INFO_1025;
+ {$EXTERNALSYM PUSER_INFO_1025}
+ _USER_INFO_1025 = record
+ usri1025_code_page: DWORD;
+ end;
+ {$EXTERNALSYM _USER_INFO_1025}
+ USER_INFO_1025 = _USER_INFO_1025;
+ {$EXTERNALSYM USER_INFO_1025}
+ TUserInfo1025 = USER_INFO_1025;
+ PUserInfo1025 = PUSER_INFO_1025;
+
+ LPUSER_INFO_1051 = ^USER_INFO_1051;
+ {$EXTERNALSYM LPUSER_INFO_1051}
+ PUSER_INFO_1051 = ^USER_INFO_1051;
+ {$EXTERNALSYM PUSER_INFO_1051}
+ _USER_INFO_1051 = record
+ usri1051_primary_group_id: DWORD;
+ end;
+ {$EXTERNALSYM _USER_INFO_1051}
+ USER_INFO_1051 = _USER_INFO_1051;
+ {$EXTERNALSYM USER_INFO_1051}
+ TUserInfo1051 = USER_INFO_1051;
+ PUserInfo1051 = PUSER_INFO_1051;
+
+ LPUSER_INFO_1052 = ^USER_INFO_1052;
+ {$EXTERNALSYM LPUSER_INFO_1052}
+ PUSER_INFO_1052 = ^USER_INFO_1052;
+ {$EXTERNALSYM PUSER_INFO_1052}
+ _USER_INFO_1052 = record
+ usri1052_profile: LPWSTR;
+ end;
+ {$EXTERNALSYM _USER_INFO_1052}
+ USER_INFO_1052 = _USER_INFO_1052;
+ {$EXTERNALSYM USER_INFO_1052}
+ TUserInfo1052 = USER_INFO_1052;
+ PUserInfo1052 = PUSER_INFO_1052;
+
+ LPUSER_INFO_1053 = ^USER_INFO_1053;
+ {$EXTERNALSYM LPUSER_INFO_1053}
+ PUSER_INFO_1053 = ^USER_INFO_1053;
+ {$EXTERNALSYM PUSER_INFO_1053}
+ _USER_INFO_1053 = record
+ usri1053_home_dir_drive: LPWSTR;
+ end;
+ {$EXTERNALSYM _USER_INFO_1053}
+ USER_INFO_1053 = _USER_INFO_1053;
+ {$EXTERNALSYM USER_INFO_1053}
+ TUserInfo1053 = USER_INFO_1053;
+ PUserInfo1053 = PUSER_INFO_1053;
+
+//
+// Data Structures - User Modals
+//
+
+ LPUSER_MODALS_INFO_0 = ^USER_MODALS_INFO_0;
+ {$EXTERNALSYM LPUSER_MODALS_INFO_0}
+ PUSER_MODALS_INFO_0 = ^USER_MODALS_INFO_0;
+ {$EXTERNALSYM PUSER_MODALS_INFO_0}
+ _USER_MODALS_INFO_0 = record
+ usrmod0_min_passwd_len: DWORD;
+ usrmod0_max_passwd_age: DWORD;
+ usrmod0_min_passwd_age: DWORD;
+ usrmod0_force_logoff: DWORD;
+ usrmod0_password_hist_len: DWORD;
+ end;
+ {$EXTERNALSYM _USER_MODALS_INFO_0}
+ USER_MODALS_INFO_0 = _USER_MODALS_INFO_0;
+ {$EXTERNALSYM USER_MODALS_INFO_0}
+ TUserModalsInfo0 = USER_MODALS_INFO_0;
+ PUserModalsInfo0 = PUSER_MODALS_INFO_0;
+
+ LPUSER_MODALS_INFO_1 = ^USER_MODALS_INFO_1;
+ {$EXTERNALSYM LPUSER_MODALS_INFO_1}
+ PUSER_MODALS_INFO_1 = ^USER_MODALS_INFO_1;
+ {$EXTERNALSYM PUSER_MODALS_INFO_1}
+ _USER_MODALS_INFO_1 = record
+ usrmod1_role: DWORD;
+ usrmod1_primary: LPWSTR;
+ end;
+ {$EXTERNALSYM _USER_MODALS_INFO_1}
+ USER_MODALS_INFO_1 = _USER_MODALS_INFO_1;
+ {$EXTERNALSYM USER_MODALS_INFO_1}
+ TUserModalsInfo1 = USER_MODALS_INFO_1;
+ PUserModalsInfo1 = PUSER_MODALS_INFO_1;
+
+ LPUSER_MODALS_INFO_2 = ^USER_MODALS_INFO_2;
+ {$EXTERNALSYM LPUSER_MODALS_INFO_2}
+ PUSER_MODALS_INFO_2 = ^USER_MODALS_INFO_2;
+ {$EXTERNALSYM PUSER_MODALS_INFO_2}
+ _USER_MODALS_INFO_2 = record
+ usrmod2_domain_name: LPWSTR;
+ usrmod2_domain_id: PSID;
+ end;
+ {$EXTERNALSYM _USER_MODALS_INFO_2}
+ USER_MODALS_INFO_2 = _USER_MODALS_INFO_2;
+ {$EXTERNALSYM USER_MODALS_INFO_2}
+ TUserModalsInfo2 = USER_MODALS_INFO_2;
+ PUserModalsInfo2 = PUSER_MODALS_INFO_2;
+
+ LPUSER_MODALS_INFO_3 = ^USER_MODALS_INFO_3;
+ {$EXTERNALSYM LPUSER_MODALS_INFO_3}
+ PUSER_MODALS_INFO_3 = ^USER_MODALS_INFO_3;
+ {$EXTERNALSYM PUSER_MODALS_INFO_3}
+ _USER_MODALS_INFO_3 = record
+ usrmod3_lockout_duration: DWORD;
+ usrmod3_lockout_observation_window: DWORD;
+ usrmod3_lockout_threshold: DWORD;
+ end;
+ {$EXTERNALSYM _USER_MODALS_INFO_3}
+ USER_MODALS_INFO_3 = _USER_MODALS_INFO_3;
+ {$EXTERNALSYM USER_MODALS_INFO_3}
+ TUserModalsInfo3 = USER_MODALS_INFO_3;
+ PUserModalsInfo3 = PUSER_MODALS_INFO_3;
+
+ LPUSER_MODALS_INFO_1001 = ^USER_MODALS_INFO_1001;
+ {$EXTERNALSYM LPUSER_MODALS_INFO_1001}
+ PUSER_MODALS_INFO_1001 = ^USER_MODALS_INFO_1001;
+ {$EXTERNALSYM PUSER_MODALS_INFO_1001}
+ _USER_MODALS_INFO_1001 = record
+ usrmod1001_min_passwd_len: DWORD;
+ end;
+ {$EXTERNALSYM _USER_MODALS_INFO_1001}
+ USER_MODALS_INFO_1001 = _USER_MODALS_INFO_1001;
+ {$EXTERNALSYM USER_MODALS_INFO_1001}
+ TUserModalsInfo1001 = USER_MODALS_INFO_1001;
+ PUserModalsInfo1001 = PUSER_MODALS_INFO_1001;
+
+ LPUSER_MODALS_INFO_1002 = ^USER_MODALS_INFO_1002;
+ {$EXTERNALSYM LPUSER_MODALS_INFO_1002}
+ PUSER_MODALS_INFO_1002 = ^USER_MODALS_INFO_1002;
+ {$EXTERNALSYM PUSER_MODALS_INFO_1002}
+ _USER_MODALS_INFO_1002 = record
+ usrmod1002_max_passwd_age: DWORD;
+ end;
+ {$EXTERNALSYM _USER_MODALS_INFO_1002}
+ USER_MODALS_INFO_1002 = _USER_MODALS_INFO_1002;
+ {$EXTERNALSYM USER_MODALS_INFO_1002}
+ TUserModalsInfo1002 = USER_MODALS_INFO_1002;
+ PUserModalsInfo1002 = PUSER_MODALS_INFO_1002;
+
+ LPUSER_MODALS_INFO_1003 = ^USER_MODALS_INFO_1003;
+ {$EXTERNALSYM LPUSER_MODALS_INFO_1003}
+ PUSER_MODALS_INFO_1003 = ^USER_MODALS_INFO_1003;
+ {$EXTERNALSYM PUSER_MODALS_INFO_1003}
+ _USER_MODALS_INFO_1003 = record
+ usrmod1003_min_passwd_age: DWORD;
+ end;
+ {$EXTERNALSYM _USER_MODALS_INFO_1003}
+ USER_MODALS_INFO_1003 = _USER_MODALS_INFO_1003;
+ {$EXTERNALSYM USER_MODALS_INFO_1003}
+ TUserModalsInfo1003 = USER_MODALS_INFO_1003;
+ PUserModalsInfo1003 = PUSER_MODALS_INFO_1003;
+
+ LPUSER_MODALS_INFO_1004 = ^USER_MODALS_INFO_1004;
+ {$EXTERNALSYM LPUSER_MODALS_INFO_1004}
+ PUSER_MODALS_INFO_1004 = ^USER_MODALS_INFO_1004;
+ {$EXTERNALSYM PUSER_MODALS_INFO_1004}
+ _USER_MODALS_INFO_1004 = record
+ usrmod1004_force_logoff: DWORD;
+ end;
+ {$EXTERNALSYM _USER_MODALS_INFO_1004}
+ USER_MODALS_INFO_1004 = _USER_MODALS_INFO_1004;
+ {$EXTERNALSYM USER_MODALS_INFO_1004}
+ TUserModalsInfo1004 = USER_MODALS_INFO_1004;
+ PUserModalsInfo1004 = PUSER_MODALS_INFO_1004;
+
+ LPUSER_MODALS_INFO_1005 = ^USER_MODALS_INFO_1005;
+ {$EXTERNALSYM LPUSER_MODALS_INFO_1005}
+ PUSER_MODALS_INFO_1005 = ^USER_MODALS_INFO_1005;
+ {$EXTERNALSYM PUSER_MODALS_INFO_1005}
+ _USER_MODALS_INFO_1005 = record
+ usrmod1005_password_hist_len: DWORD;
+ end;
+ {$EXTERNALSYM _USER_MODALS_INFO_1005}
+ USER_MODALS_INFO_1005 = _USER_MODALS_INFO_1005;
+ {$EXTERNALSYM USER_MODALS_INFO_1005}
+ TUserModalsInfo1005 = USER_MODALS_INFO_1005;
+ PUserModalsInfo1005 = PUSER_MODALS_INFO_1005;
+
+ LPUSER_MODALS_INFO_1006 = ^USER_MODALS_INFO_1006;
+ {$EXTERNALSYM LPUSER_MODALS_INFO_1006}
+ PUSER_MODALS_INFO_1006 = ^USER_MODALS_INFO_1006;
+ {$EXTERNALSYM PUSER_MODALS_INFO_1006}
+ _USER_MODALS_INFO_1006 = record
+ usrmod1006_role: DWORD;
+ end;
+ {$EXTERNALSYM _USER_MODALS_INFO_1006}
+ USER_MODALS_INFO_1006 = _USER_MODALS_INFO_1006;
+ {$EXTERNALSYM USER_MODALS_INFO_1006}
+ TUserModalsInfo1006 = USER_MODALS_INFO_1006;
+ PUserModalsInfo1006 = PUSER_MODALS_INFO_1006;
+
+ LPUSER_MODALS_INFO_1007 = ^USER_MODALS_INFO_1007;
+ {$EXTERNALSYM LPUSER_MODALS_INFO_1007}
+ PUSER_MODALS_INFO_1007 = ^USER_MODALS_INFO_1007;
+ {$EXTERNALSYM PUSER_MODALS_INFO_1007}
+ _USER_MODALS_INFO_1007 = record
+ usrmod1007_primary: LPWSTR;
+ end;
+ {$EXTERNALSYM _USER_MODALS_INFO_1007}
+ USER_MODALS_INFO_1007 = _USER_MODALS_INFO_1007;
+ {$EXTERNALSYM USER_MODALS_INFO_1007}
+ TUserModalsInfo1007 = USER_MODALS_INFO_1007;
+ PUserModalsInfo1007 = PUSER_MODALS_INFO_1007;
+
+//
+// Special Values and Constants - User
+//
+
+//
+// Bit masks for field usriX_flags of USER_INFO_X (X = 0/1).
+//
+
+const
+ UF_SCRIPT = $0001;
+ {$EXTERNALSYM UF_SCRIPT}
+ UF_ACCOUNTDISABLE = $0002;
+ {$EXTERNALSYM UF_ACCOUNTDISABLE}
+ UF_HOMEDIR_REQUIRED = $0008;
+ {$EXTERNALSYM UF_HOMEDIR_REQUIRED}
+ UF_LOCKOUT = $0010;
+ {$EXTERNALSYM UF_LOCKOUT}
+ UF_PASSWD_NOTREQD = $0020;
+ {$EXTERNALSYM UF_PASSWD_NOTREQD}
+ UF_PASSWD_CANT_CHANGE = $0040;
+ {$EXTERNALSYM UF_PASSWD_CANT_CHANGE}
+ UF_ENCRYPTED_TEXT_PASSWORD_ALLOWED = $0080;
+ {$EXTERNALSYM UF_ENCRYPTED_TEXT_PASSWORD_ALLOWED}
+
+//
+// Account type bits as part of usri_flags.
+//
+
+ UF_TEMP_DUPLICATE_ACCOUNT = $0100;
+ {$EXTERNALSYM UF_TEMP_DUPLICATE_ACCOUNT}
+ UF_NORMAL_ACCOUNT = $0200;
+ {$EXTERNALSYM UF_NORMAL_ACCOUNT}
+ UF_INTERDOMAIN_TRUST_ACCOUNT = $0800;
+ {$EXTERNALSYM UF_INTERDOMAIN_TRUST_ACCOUNT}
+ UF_WORKSTATION_TRUST_ACCOUNT = $1000;
+ {$EXTERNALSYM UF_WORKSTATION_TRUST_ACCOUNT}
+ UF_SERVER_TRUST_ACCOUNT = $2000;
+ {$EXTERNALSYM UF_SERVER_TRUST_ACCOUNT}
+
+ UF_MACHINE_ACCOUNT_MASK = UF_INTERDOMAIN_TRUST_ACCOUNT or UF_WORKSTATION_TRUST_ACCOUNT or UF_SERVER_TRUST_ACCOUNT;
+ {$EXTERNALSYM UF_MACHINE_ACCOUNT_MASK}
+
+ UF_ACCOUNT_TYPE_MASK = UF_TEMP_DUPLICATE_ACCOUNT or UF_NORMAL_ACCOUNT or UF_INTERDOMAIN_TRUST_ACCOUNT or UF_WORKSTATION_TRUST_ACCOUNT or UF_SERVER_TRUST_ACCOUNT;
+ {$EXTERNALSYM UF_ACCOUNT_TYPE_MASK}
+
+ UF_DONT_EXPIRE_PASSWD = $10000;
+ {$EXTERNALSYM UF_DONT_EXPIRE_PASSWD}
+ UF_MNS_LOGON_ACCOUNT = $20000;
+ {$EXTERNALSYM UF_MNS_LOGON_ACCOUNT}
+ UF_SMARTCARD_REQUIRED = $40000;
+ {$EXTERNALSYM UF_SMARTCARD_REQUIRED}
+ UF_TRUSTED_FOR_DELEGATION = $80000;
+ {$EXTERNALSYM UF_TRUSTED_FOR_DELEGATION}
+ UF_NOT_DELEGATED = $100000;
+ {$EXTERNALSYM UF_NOT_DELEGATED}
+ UF_USE_DES_KEY_ONLY = $200000;
+ {$EXTERNALSYM UF_USE_DES_KEY_ONLY}
+ UF_DONT_REQUIRE_PREAUTH = $400000;
+ {$EXTERNALSYM UF_DONT_REQUIRE_PREAUTH}
+ UF_PASSWORD_EXPIRED = DWORD($800000);
+ {$EXTERNALSYM UF_PASSWORD_EXPIRED}
+ UF_TRUSTED_TO_AUTHENTICATE_FOR_DELEGATION = $1000000;
+ {$EXTERNALSYM UF_TRUSTED_TO_AUTHENTICATE_FOR_DELEGATION}
+
+ UF_SETTABLE_BITS =
+ UF_SCRIPT or
+ UF_ACCOUNTDISABLE or
+ UF_LOCKOUT or
+ UF_HOMEDIR_REQUIRED or
+ UF_PASSWD_NOTREQD or
+ UF_PASSWD_CANT_CHANGE or
+ UF_ACCOUNT_TYPE_MASK or
+ UF_DONT_EXPIRE_PASSWD or
+ UF_MNS_LOGON_ACCOUNT or
+ UF_ENCRYPTED_TEXT_PASSWORD_ALLOWED or
+ UF_SMARTCARD_REQUIRED or
+ UF_TRUSTED_FOR_DELEGATION or
+ UF_NOT_DELEGATED or
+ UF_USE_DES_KEY_ONLY or
+ UF_DONT_REQUIRE_PREAUTH or
+ UF_PASSWORD_EXPIRED or
+ UF_TRUSTED_TO_AUTHENTICATE_FOR_DELEGATION;
+ {$EXTERNALSYM UF_SETTABLE_BITS}
+
+//
+// bit masks for the NetUserEnum filter parameter.
+//
+
+ FILTER_TEMP_DUPLICATE_ACCOUNT = $0001;
+ {$EXTERNALSYM FILTER_TEMP_DUPLICATE_ACCOUNT}
+ FILTER_NORMAL_ACCOUNT = $0002;
+ {$EXTERNALSYM FILTER_NORMAL_ACCOUNT}
+// #define FILTER_PROXY_ACCOUNT (0x0004)
+ FILTER_INTERDOMAIN_TRUST_ACCOUNT = $0008;
+ {$EXTERNALSYM FILTER_INTERDOMAIN_TRUST_ACCOUNT}
+ FILTER_WORKSTATION_TRUST_ACCOUNT = $0010;
+ {$EXTERNALSYM FILTER_WORKSTATION_TRUST_ACCOUNT}
+ FILTER_SERVER_TRUST_ACCOUNT = $0020;
+ {$EXTERNALSYM FILTER_SERVER_TRUST_ACCOUNT}
+
+//
+// bit masks for the NetUserGetLocalGroups flags
+//
+
+ LG_INCLUDE_INDIRECT = $0001;
+ {$EXTERNALSYM LG_INCLUDE_INDIRECT}
+
+//
+// Bit masks for field usri2_auth_flags of USER_INFO_2.
+//
+
+ AF_OP_PRINT = $1;
+ {$EXTERNALSYM AF_OP_PRINT}
+ AF_OP_COMM = $2;
+ {$EXTERNALSYM AF_OP_COMM}
+ AF_OP_SERVER = $4;
+ {$EXTERNALSYM AF_OP_SERVER}
+ AF_OP_ACCOUNTS = $8;
+ {$EXTERNALSYM AF_OP_ACCOUNTS}
+ AF_SETTABLE_BITS = AF_OP_PRINT or AF_OP_COMM or AF_OP_SERVER or AF_OP_ACCOUNTS;
+ {$EXTERNALSYM AF_SETTABLE_BITS}
+
+//
+// UAS role manifests under NETLOGON
+//
+
+ UAS_ROLE_STANDALONE = 0;
+ {$EXTERNALSYM UAS_ROLE_STANDALONE}
+ UAS_ROLE_MEMBER = 1;
+ {$EXTERNALSYM UAS_ROLE_MEMBER}
+ UAS_ROLE_BACKUP = 2;
+ {$EXTERNALSYM UAS_ROLE_BACKUP}
+ UAS_ROLE_PRIMARY = 3;
+ {$EXTERNALSYM UAS_ROLE_PRIMARY}
+
+//
+// Values for ParmError for NetUserSetInfo.
+//
+
+ USER_NAME_PARMNUM = 1;
+ {$EXTERNALSYM USER_NAME_PARMNUM}
+ USER_PASSWORD_PARMNUM = 3;
+ {$EXTERNALSYM USER_PASSWORD_PARMNUM}
+ USER_PASSWORD_AGE_PARMNUM = 4;
+ {$EXTERNALSYM USER_PASSWORD_AGE_PARMNUM}
+ USER_PRIV_PARMNUM = 5;
+ {$EXTERNALSYM USER_PRIV_PARMNUM}
+ USER_HOME_DIR_PARMNUM = 6;
+ {$EXTERNALSYM USER_HOME_DIR_PARMNUM}
+ USER_COMMENT_PARMNUM = 7;
+ {$EXTERNALSYM USER_COMMENT_PARMNUM}
+ USER_FLAGS_PARMNUM = 8;
+ {$EXTERNALSYM USER_FLAGS_PARMNUM}
+ USER_SCRIPT_PATH_PARMNUM = 9;
+ {$EXTERNALSYM USER_SCRIPT_PATH_PARMNUM}
+ USER_AUTH_FLAGS_PARMNUM = 10;
+ {$EXTERNALSYM USER_AUTH_FLAGS_PARMNUM}
+ USER_FULL_NAME_PARMNUM = 11;
+ {$EXTERNALSYM USER_FULL_NAME_PARMNUM}
+ USER_USR_COMMENT_PARMNUM = 12;
+ {$EXTERNALSYM USER_USR_COMMENT_PARMNUM}
+ USER_PARMS_PARMNUM = 13;
+ {$EXTERNALSYM USER_PARMS_PARMNUM}
+ USER_WORKSTATIONS_PARMNUM = 14;
+ {$EXTERNALSYM USER_WORKSTATIONS_PARMNUM}
+ USER_LAST_LOGON_PARMNUM = 15;
+ {$EXTERNALSYM USER_LAST_LOGON_PARMNUM}
+ USER_LAST_LOGOFF_PARMNUM = 16;
+ {$EXTERNALSYM USER_LAST_LOGOFF_PARMNUM}
+ USER_ACCT_EXPIRES_PARMNUM = 17;
+ {$EXTERNALSYM USER_ACCT_EXPIRES_PARMNUM}
+ USER_MAX_STORAGE_PARMNUM = 18;
+ {$EXTERNALSYM USER_MAX_STORAGE_PARMNUM}
+ USER_UNITS_PER_WEEK_PARMNUM = 19;
+ {$EXTERNALSYM USER_UNITS_PER_WEEK_PARMNUM}
+ USER_LOGON_HOURS_PARMNUM = 20;
+ {$EXTERNALSYM USER_LOGON_HOURS_PARMNUM}
+ USER_PAD_PW_COUNT_PARMNUM = 21;
+ {$EXTERNALSYM USER_PAD_PW_COUNT_PARMNUM}
+ USER_NUM_LOGONS_PARMNUM = 22;
+ {$EXTERNALSYM USER_NUM_LOGONS_PARMNUM}
+ USER_LOGON_SERVER_PARMNUM = 23;
+ {$EXTERNALSYM USER_LOGON_SERVER_PARMNUM}
+ USER_COUNTRY_CODE_PARMNUM = 24;
+ {$EXTERNALSYM USER_COUNTRY_CODE_PARMNUM}
+ USER_CODE_PAGE_PARMNUM = 25;
+ {$EXTERNALSYM USER_CODE_PAGE_PARMNUM}
+ USER_PRIMARY_GROUP_PARMNUM = 51;
+ {$EXTERNALSYM USER_PRIMARY_GROUP_PARMNUM}
+ USER_PROFILE = 52; // ?? Delete when convenient
+ {$EXTERNALSYM USER_PROFILE}
+ USER_PROFILE_PARMNUM = 52;
+ {$EXTERNALSYM USER_PROFILE_PARMNUM}
+ USER_HOME_DIR_DRIVE_PARMNUM = 53;
+ {$EXTERNALSYM USER_HOME_DIR_DRIVE_PARMNUM}
+
+//
+// the new infolevel counterparts of the old info level + parmnum
+//
+
+ USER_NAME_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + USER_NAME_PARMNUM;
+ {$EXTERNALSYM USER_NAME_INFOLEVEL}
+ USER_PASSWORD_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + USER_PASSWORD_PARMNUM;
+ {$EXTERNALSYM USER_PASSWORD_INFOLEVEL}
+ USER_PASSWORD_AGE_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + USER_PASSWORD_AGE_PARMNUM;
+ {$EXTERNALSYM USER_PASSWORD_AGE_INFOLEVEL}
+ USER_PRIV_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + USER_PRIV_PARMNUM;
+ {$EXTERNALSYM USER_PRIV_INFOLEVEL}
+ USER_HOME_DIR_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + USER_HOME_DIR_PARMNUM;
+ {$EXTERNALSYM USER_HOME_DIR_INFOLEVEL}
+ USER_COMMENT_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + USER_COMMENT_PARMNUM;
+ {$EXTERNALSYM USER_COMMENT_INFOLEVEL}
+ USER_FLAGS_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + USER_FLAGS_PARMNUM;
+ {$EXTERNALSYM USER_FLAGS_INFOLEVEL}
+ USER_SCRIPT_PATH_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + USER_SCRIPT_PATH_PARMNUM;
+ {$EXTERNALSYM USER_SCRIPT_PATH_INFOLEVEL}
+ USER_AUTH_FLAGS_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + USER_AUTH_FLAGS_PARMNUM;
+ {$EXTERNALSYM USER_AUTH_FLAGS_INFOLEVEL}
+ USER_FULL_NAME_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + USER_FULL_NAME_PARMNUM;
+ {$EXTERNALSYM USER_FULL_NAME_INFOLEVEL}
+ USER_USR_COMMENT_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + USER_USR_COMMENT_PARMNUM;
+ {$EXTERNALSYM USER_USR_COMMENT_INFOLEVEL}
+ USER_PARMS_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + USER_PARMS_PARMNUM;
+ {$EXTERNALSYM USER_PARMS_INFOLEVEL}
+ USER_WORKSTATIONS_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + USER_WORKSTATIONS_PARMNUM;
+ {$EXTERNALSYM USER_WORKSTATIONS_INFOLEVEL}
+ USER_LAST_LOGON_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + USER_LAST_LOGON_PARMNUM;
+ {$EXTERNALSYM USER_LAST_LOGON_INFOLEVEL}
+ USER_LAST_LOGOFF_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + USER_LAST_LOGOFF_PARMNUM;
+ {$EXTERNALSYM USER_LAST_LOGOFF_INFOLEVEL}
+ USER_ACCT_EXPIRES_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + USER_ACCT_EXPIRES_PARMNUM;
+ {$EXTERNALSYM USER_ACCT_EXPIRES_INFOLEVEL}
+ USER_MAX_STORAGE_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + USER_MAX_STORAGE_PARMNUM;
+ {$EXTERNALSYM USER_MAX_STORAGE_INFOLEVEL}
+ USER_UNITS_PER_WEEK_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + USER_UNITS_PER_WEEK_PARMNUM;
+ {$EXTERNALSYM USER_UNITS_PER_WEEK_INFOLEVEL}
+ USER_LOGON_HOURS_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + USER_LOGON_HOURS_PARMNUM;
+ {$EXTERNALSYM USER_LOGON_HOURS_INFOLEVEL}
+ USER_PAD_PW_COUNT_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + USER_PAD_PW_COUNT_PARMNUM;
+ {$EXTERNALSYM USER_PAD_PW_COUNT_INFOLEVEL}
+ USER_NUM_LOGONS_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + USER_NUM_LOGONS_PARMNUM;
+ {$EXTERNALSYM USER_NUM_LOGONS_INFOLEVEL}
+ USER_LOGON_SERVER_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + USER_LOGON_SERVER_PARMNUM;
+ {$EXTERNALSYM USER_LOGON_SERVER_INFOLEVEL}
+ USER_COUNTRY_CODE_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + USER_COUNTRY_CODE_PARMNUM;
+ {$EXTERNALSYM USER_COUNTRY_CODE_INFOLEVEL}
+ USER_CODE_PAGE_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + USER_CODE_PAGE_PARMNUM;
+ {$EXTERNALSYM USER_CODE_PAGE_INFOLEVEL}
+ USER_PRIMARY_GROUP_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + USER_PRIMARY_GROUP_PARMNUM;
+ {$EXTERNALSYM USER_PRIMARY_GROUP_INFOLEVEL}
+// todo USER_POSIX_ID_PARMNUM where is it defined?
+// USER_POSIX_ID_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + USER_POSIX_ID_PARMNUM;
+// {$EXTERNALSYM USER_POSIX_ID_INFOLEVEL}
+ USER_HOME_DIR_DRIVE_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + USER_HOME_DIR_DRIVE_PARMNUM;
+ {$EXTERNALSYM USER_HOME_DIR_DRIVE_INFOLEVEL}
+
+//
+// For SetInfo call (parmnum 0) when password change not required
+//
+
+ NULL_USERSETINFO_PASSWD = ' ';
+ {$EXTERNALSYM NULL_USERSETINFO_PASSWD}
+
+ TIMEQ_FOREVER = ULONG(-1);
+ {$EXTERNALSYM TIMEQ_FOREVER}
+ USER_MAXSTORAGE_UNLIMITED = ULONG(-1);
+ {$EXTERNALSYM USER_MAXSTORAGE_UNLIMITED}
+ USER_NO_LOGOFF = ULONG(-1);
+ {$EXTERNALSYM USER_NO_LOGOFF}
+ UNITS_PER_DAY = 24;
+ {$EXTERNALSYM UNITS_PER_DAY}
+ UNITS_PER_WEEK = UNITS_PER_DAY * 7;
+ {$EXTERNALSYM UNITS_PER_WEEK}
+
+//
+// Privilege levels (USER_INFO_X field usriX_priv (X = 0/1)).
+//
+
+ USER_PRIV_MASK = $3;
+ {$EXTERNALSYM USER_PRIV_MASK}
+ USER_PRIV_GUEST = 0;
+ {$EXTERNALSYM USER_PRIV_GUEST}
+ USER_PRIV_USER = 1;
+ {$EXTERNALSYM USER_PRIV_USER}
+ USER_PRIV_ADMIN = 2;
+ {$EXTERNALSYM USER_PRIV_ADMIN}
+
+//
+// user modals related defaults
+//
+
+ MAX_PASSWD_LEN = PWLEN;
+ {$EXTERNALSYM MAX_PASSWD_LEN}
+ DEF_MIN_PWLEN = 6;
+ {$EXTERNALSYM DEF_MIN_PWLEN}
+ DEF_PWUNIQUENESS = 5;
+ {$EXTERNALSYM DEF_PWUNIQUENESS}
+ DEF_MAX_PWHIST = 8;
+ {$EXTERNALSYM DEF_MAX_PWHIST}
+
+ DEF_MAX_PWAGE = TIMEQ_FOREVER; // forever
+ {$EXTERNALSYM DEF_MAX_PWAGE}
+ DEF_MIN_PWAGE = 0; // 0 days
+ {$EXTERNALSYM DEF_MIN_PWAGE}
+ DEF_FORCE_LOGOFF = ULONG($ffffffff); // never
+ {$EXTERNALSYM DEF_FORCE_LOGOFF}
+ DEF_MAX_BADPW = 0; // no limit
+ {$EXTERNALSYM DEF_MAX_BADPW}
+ ONE_DAY = ULONG(01*24*3600); // 01 day
+ {$EXTERNALSYM ONE_DAY}
+
+//
+// User Logon Validation (codes returned)
+//
+
+ VALIDATED_LOGON = 0;
+ {$EXTERNALSYM VALIDATED_LOGON}
+ PASSWORD_EXPIRED = 2;
+ {$EXTERNALSYM PASSWORD_EXPIRED}
+ NON_VALIDATED_LOGON = 3;
+ {$EXTERNALSYM NON_VALIDATED_LOGON}
+
+ VALID_LOGOFF = 1;
+ {$EXTERNALSYM VALID_LOGOFF}
+
+//
+// parmnum manifests for user modals
+//
+
+ MODALS_MIN_PASSWD_LEN_PARMNUM = 1;
+ {$EXTERNALSYM MODALS_MIN_PASSWD_LEN_PARMNUM}
+ MODALS_MAX_PASSWD_AGE_PARMNUM = 2;
+ {$EXTERNALSYM MODALS_MAX_PASSWD_AGE_PARMNUM}
+ MODALS_MIN_PASSWD_AGE_PARMNUM = 3;
+ {$EXTERNALSYM MODALS_MIN_PASSWD_AGE_PARMNUM}
+ MODALS_FORCE_LOGOFF_PARMNUM = 4;
+ {$EXTERNALSYM MODALS_FORCE_LOGOFF_PARMNUM}
+ MODALS_PASSWD_HIST_LEN_PARMNUM = 5;
+ {$EXTERNALSYM MODALS_PASSWD_HIST_LEN_PARMNUM}
+ MODALS_ROLE_PARMNUM = 6;
+ {$EXTERNALSYM MODALS_ROLE_PARMNUM}
+ MODALS_PRIMARY_PARMNUM = 7;
+ {$EXTERNALSYM MODALS_PRIMARY_PARMNUM}
+ MODALS_DOMAIN_NAME_PARMNUM = 8;
+ {$EXTERNALSYM MODALS_DOMAIN_NAME_PARMNUM}
+ MODALS_DOMAIN_ID_PARMNUM = 9;
+ {$EXTERNALSYM MODALS_DOMAIN_ID_PARMNUM}
+ MODALS_LOCKOUT_DURATION_PARMNUM = 10;
+ {$EXTERNALSYM MODALS_LOCKOUT_DURATION_PARMNUM}
+ MODALS_LOCKOUT_OBSERVATION_WINDOW_PARMNUM = 11;
+ {$EXTERNALSYM MODALS_LOCKOUT_OBSERVATION_WINDOW_PARMNUM}
+ MODALS_LOCKOUT_THRESHOLD_PARMNUM = 12;
+ {$EXTERNALSYM MODALS_LOCKOUT_THRESHOLD_PARMNUM}
+
+//
+// the new infolevel counterparts of the old info level + parmnum
+//
+
+ MODALS_MIN_PASSWD_LEN_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + MODALS_MIN_PASSWD_LEN_PARMNUM;
+ {$EXTERNALSYM MODALS_MIN_PASSWD_LEN_INFOLEVEL}
+ MODALS_MAX_PASSWD_AGE_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + MODALS_MAX_PASSWD_AGE_PARMNUM;
+ {$EXTERNALSYM MODALS_MAX_PASSWD_AGE_INFOLEVEL}
+ MODALS_MIN_PASSWD_AGE_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + MODALS_MIN_PASSWD_AGE_PARMNUM;
+ {$EXTERNALSYM MODALS_MIN_PASSWD_AGE_INFOLEVEL}
+ MODALS_FORCE_LOGOFF_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + MODALS_FORCE_LOGOFF_PARMNUM;
+ {$EXTERNALSYM MODALS_FORCE_LOGOFF_INFOLEVEL}
+ MODALS_PASSWD_HIST_LEN_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + MODALS_PASSWD_HIST_LEN_PARMNUM;
+ {$EXTERNALSYM MODALS_PASSWD_HIST_LEN_INFOLEVEL}
+ MODALS_ROLE_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + MODALS_ROLE_PARMNUM;
+ {$EXTERNALSYM MODALS_ROLE_INFOLEVEL}
+ MODALS_PRIMARY_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + MODALS_PRIMARY_PARMNUM;
+ {$EXTERNALSYM MODALS_PRIMARY_INFOLEVEL}
+ MODALS_DOMAIN_NAME_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + MODALS_DOMAIN_NAME_PARMNUM;
+ {$EXTERNALSYM MODALS_DOMAIN_NAME_INFOLEVEL}
+ MODALS_DOMAIN_ID_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + MODALS_DOMAIN_ID_PARMNUM;
+ {$EXTERNALSYM MODALS_DOMAIN_ID_INFOLEVEL}
+
+//
+// Group Class
+//
+
+//
+// Function Prototypes
+//
+
+function NetGroupAdd(servername: LPCWSTR; level: DWORD; buf: LPBYTE; parm_err: LPDWORD): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetGroupAdd}
+
+function NetGroupAddUser(servername, GroupName, username: LPCWSTR): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetGroupAddUser}
+
+function NetGroupEnum(servername: LPCWSTR; level: DWORD; var bufptr: LPBYTE; prefmaxlen: DWORD; entriesread, totalentries: LPDWORD; resume_handle: PDWORD_PTR): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetGroupEnum}
+
+function NetGroupGetInfo(servername, groupname: LPCWSTR; level: DWORD; bufptr: LPBYTE): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetGroupGetInfo}
+
+function NetGroupSetInfo(servername, groupname: LPCWSTR; level: DWORD; buf: LPBYTE; parm_err: LPDWORD): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetGroupSetInfo}
+
+function NetGroupDel(servername: LPCWSTR; groupname: LPCWSTR): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetGroupDel}
+
+function NetGroupDelUser(servername: LPCWSTR; GroupName: LPCWSTR; Username: LPCWSTR): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetGroupDelUser}
+
+function NetGroupGetUsers(servername, groupname: LPCWSTR; level: DWORD; var bufptr: LPBYTE; prefmaxlen: DWORD; entriesread, totalentries: LPDWORD; ResumeHandle: PDWORD_PTR): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetGroupGetUsers}
+
+function NetGroupSetUsers(servername, groupname: LPCWSTR; level: DWORD; buf: LPBYTE; totalentries: DWORD): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetGroupSetUsers}
+
+//
+// Data Structures - Group
+//
+
+type
+ LPGROUP_INFO_0 = ^GROUP_INFO_0;
+ {$EXTERNALSYM LPGROUP_INFO_0}
+ PGROUP_INFO_0 = ^GROUP_INFO_0;
+ {$EXTERNALSYM PGROUP_INFO_0}
+ _GROUP_INFO_0 = record
+ grpi0_name: LPWSTR;
+ end;
+ {$EXTERNALSYM _GROUP_INFO_0}
+ GROUP_INFO_0 = _GROUP_INFO_0;
+ {$EXTERNALSYM GROUP_INFO_0}
+ TGroupInfo0 = GROUP_INFO_0;
+ PGroupInfo0 = PGROUP_INFO_0;
+
+ LPGROUP_INFO_1 = ^GROUP_INFO_1;
+ {$EXTERNALSYM LPGROUP_INFO_1}
+ PGROUP_INFO_1 = ^GROUP_INFO_1;
+ {$EXTERNALSYM PGROUP_INFO_1}
+ _GROUP_INFO_1 = record
+ grpi1_name: LPWSTR;
+ grpi1_comment: LPWSTR;
+ end;
+ {$EXTERNALSYM _GROUP_INFO_1}
+ GROUP_INFO_1 = _GROUP_INFO_1;
+ {$EXTERNALSYM GROUP_INFO_1}
+ TGroupInfo1 = GROUP_INFO_1;
+ PGroupInfo1 = PGROUP_INFO_1;
+
+ LPGROUP_INFO_2 = ^GROUP_INFO_2;
+ {$EXTERNALSYM LPGROUP_INFO_2}
+ PGROUP_INFO_2 = ^GROUP_INFO_2;
+ {$EXTERNALSYM PGROUP_INFO_2}
+ _GROUP_INFO_2 = record
+ grpi2_name: LPWSTR;
+ grpi2_comment: LPWSTR;
+ grpi2_group_id: DWORD;
+ grpi2_attributes: DWORD;
+ end;
+ {$EXTERNALSYM _GROUP_INFO_2}
+ GROUP_INFO_2 = _GROUP_INFO_2;
+ {$EXTERNALSYM GROUP_INFO_2}
+ TGroupInfo2 = GROUP_INFO_2;
+ PGroupInfo2 = PGROUP_INFO_2;
+
+ LPGROUP_INFO_3 = ^GROUP_INFO_3;
+ {$EXTERNALSYM LPGROUP_INFO_3}
+ PGROUP_INFO_3 = ^GROUP_INFO_3;
+ {$EXTERNALSYM PGROUP_INFO_3}
+ _GROUP_INFO_3 = record
+ grpi3_name: LPWSTR;
+ grpi3_comment: LPWSTR;
+ grpi3_group_sid: PSID;
+ grpi3_attributes: DWORD;
+ end;
+ {$EXTERNALSYM _GROUP_INFO_3}
+ GROUP_INFO_3 = _GROUP_INFO_3;
+ {$EXTERNALSYM GROUP_INFO_3}
+ TGroupInfo3 = GROUP_INFO_3;
+ PGroupInfo3 = PGROUP_INFO_3;
+
+ LPGROUP_INFO_1002 = ^GROUP_INFO_1002;
+ {$EXTERNALSYM LPGROUP_INFO_1002}
+ PGROUP_INFO_1002 = ^GROUP_INFO_1002;
+ {$EXTERNALSYM PGROUP_INFO_1002}
+ _GROUP_INFO_1002 = record
+ grpi1002_comment: LPWSTR;
+ end;
+ {$EXTERNALSYM _GROUP_INFO_1002}
+ GROUP_INFO_1002 = _GROUP_INFO_1002;
+ {$EXTERNALSYM GROUP_INFO_1002}
+ TGroupInfo1002 = GROUP_INFO_1002;
+ PGroupInfo1002 = PGROUP_INFO_1002;
+
+ LPGROUP_INFO_1005 = ^GROUP_INFO_1005;
+ {$EXTERNALSYM LPGROUP_INFO_1005}
+ PGROUP_INFO_1005 = ^GROUP_INFO_1005;
+ {$EXTERNALSYM PGROUP_INFO_1005}
+ _GROUP_INFO_1005 = record
+ grpi1005_attributes: DWORD;
+ end;
+ {$EXTERNALSYM _GROUP_INFO_1005}
+ GROUP_INFO_1005 = _GROUP_INFO_1005;
+ {$EXTERNALSYM GROUP_INFO_1005}
+ TGroupInfo1005 = GROUP_INFO_1005;
+ PGroupInfo1005 = PGROUP_INFO_1005;
+
+ LPGROUP_USERS_INFO_0 = ^GROUP_USERS_INFO_0;
+ {$EXTERNALSYM LPGROUP_USERS_INFO_0}
+ PGROUP_USERS_INFO_0 = ^GROUP_USERS_INFO_0;
+ {$EXTERNALSYM PGROUP_USERS_INFO_0}
+ _GROUP_USERS_INFO_0 = record
+ grui0_name: LPWSTR;
+ end;
+ {$EXTERNALSYM _GROUP_USERS_INFO_0}
+ GROUP_USERS_INFO_0 = _GROUP_USERS_INFO_0;
+ {$EXTERNALSYM GROUP_USERS_INFO_0}
+ TGroupUsersInfo0 = GROUP_USERS_INFO_0;
+ PGroupUsersInfo0 = PGROUP_USERS_INFO_0;
+
+ LPGROUP_USERS_INFO_1 = ^GROUP_USERS_INFO_1;
+ {$EXTERNALSYM LPGROUP_USERS_INFO_1}
+ PGROUP_USERS_INFO_1 = ^GROUP_USERS_INFO_1;
+ {$EXTERNALSYM PGROUP_USERS_INFO_1}
+ _GROUP_USERS_INFO_1 = record
+ grui1_name: LPWSTR;
+ grui1_attributes: DWORD;
+ end;
+ {$EXTERNALSYM _GROUP_USERS_INFO_1}
+ GROUP_USERS_INFO_1 = _GROUP_USERS_INFO_1;
+ {$EXTERNALSYM GROUP_USERS_INFO_1}
+ TGroupUsersInfo1 = GROUP_USERS_INFO_1;
+ PGroupUsersInfo1 = PGROUP_USERS_INFO_1;
+
+//
+// Special Values and Constants - Group
+//
+
+const
+ GROUPIDMASK = $8000; // MSB set if uid refers to a group
+ {$EXTERNALSYM GROUPIDMASK}
+
+//
+// Predefined group for all normal users, administrators and guests
+// LOCAL is a special group for pinball local security.
+//
+
+ GROUP_SPECIALGRP_USERS = WideString('USERS');
+ {$EXTERNALSYM GROUP_SPECIALGRP_USERS}
+ GROUP_SPECIALGRP_ADMINS = WideString('ADMINS');
+ {$EXTERNALSYM GROUP_SPECIALGRP_ADMINS}
+ GROUP_SPECIALGRP_GUESTS = WideString('GUESTS');
+ {$EXTERNALSYM GROUP_SPECIALGRP_GUESTS}
+ GROUP_SPECIALGRP_LOCAL = WideString('LOCAL');
+ {$EXTERNALSYM GROUP_SPECIALGRP_LOCAL}
+
+//
+// parmnum manifests for SetInfo calls (only comment is settable)
+//
+
+ GROUP_ALL_PARMNUM = 0;
+ {$EXTERNALSYM GROUP_ALL_PARMNUM}
+ GROUP_NAME_PARMNUM = 1;
+ {$EXTERNALSYM GROUP_NAME_PARMNUM}
+ GROUP_COMMENT_PARMNUM = 2;
+ {$EXTERNALSYM GROUP_COMMENT_PARMNUM}
+ GROUP_ATTRIBUTES_PARMNUM = 3;
+ {$EXTERNALSYM GROUP_ATTRIBUTES_PARMNUM}
+
+//
+// the new infolevel counterparts of the old info level + parmnum
+//
+
+ GROUP_ALL_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + GROUP_ALL_PARMNUM;
+ {$EXTERNALSYM GROUP_ALL_INFOLEVEL}
+ GROUP_NAME_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + GROUP_NAME_PARMNUM;
+ {$EXTERNALSYM GROUP_NAME_INFOLEVEL}
+ GROUP_COMMENT_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + GROUP_COMMENT_PARMNUM;
+ {$EXTERNALSYM GROUP_COMMENT_INFOLEVEL}
+ GROUP_ATTRIBUTES_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + GROUP_ATTRIBUTES_PARMNUM;
+ {$EXTERNALSYM GROUP_ATTRIBUTES_INFOLEVEL}
+// todo see GROUP_POSIX_ID_PARMNUM
+// GROUP_POSIX_ID_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + GROUP_POSIX_ID_PARMNUM;
+// {$EXTERNALSYM GROUP_POSIX_ID_INFOLEVEL}
+
+//
+// LocalGroup Class
+//
+
+//
+// Function Prototypes
+//
+
+function NetLocalGroupAdd(servername: LPCWSTR; level: DWORD; buf: LPBYTE; parm_err: LPDWORD): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetLocalGroupAdd}
+
+function NetLocalGroupAddMember(servername, groupname: LPCWSTR; membersid: PSID): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetLocalGroupAddMember}
+
+function NetLocalGroupEnum(servername: LPCWSTR; level: DWORD; var bufptr: LPBYTE; prefmaxlen: DWORD; entriesread, totalentries: LPDWORD; resumehandle: PDWORD_PTR): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetLocalGroupEnum}
+
+function NetLocalGroupGetInfo(servername, groupname: LPCWSTR; level: DWORD; var bufptr: LPBYTE): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetLocalGroupGetInfo}
+
+function NetLocalGroupSetInfo(servername, groupname: LPCWSTR; level: DWORD; buf: LPBYTE; parm_err: LPDWORD): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetLocalGroupSetInfo}
+
+function NetLocalGroupDel(servername: LPCWSTR; groupname: LPCWSTR): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetLocalGroupDel}
+
+function NetLocalGroupDelMember(servername: LPCWSTR; groupname: LPCWSTR; membersid: PSID): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetLocalGroupDelMember}
+
+function NetLocalGroupGetMembers(servername, localgroupname: LPCWSTR; level: DWORD; var bufptr: LPBYTE; prefmaxlen: DWORD; entriesread, totalentries: LPDWORD; resumehandle: PDWORD_PTR): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetLocalGroupGetMembers}
+
+function NetLocalGroupSetMembers(servername, groupname: LPCWSTR; level: DWORD; buf: LPBYTE; totalentries: DWORD): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetLocalGroupSetMembers}
+
+function NetLocalGroupAddMembers(servername, groupname: LPCWSTR; level: DWORD; buf: LPBYTE; totalentries: DWORD): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetLocalGroupAddMembers}
+
+function NetLocalGroupDelMembers(servername, groupname: LPCWSTR; level: DWORD; buf: LPBYTE; totalentries: DWORD): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetLocalGroupDelMembers}
+
+//
+// Data Structures - LocalGroup
+//
+
+type
+ LPLOCALGROUP_INFO_0 = ^LOCALGROUP_INFO_0;
+ {$EXTERNALSYM LPLOCALGROUP_INFO_0}
+ PLOCALGROUP_INFO_0 = ^LOCALGROUP_INFO_0;
+ {$EXTERNALSYM PLOCALGROUP_INFO_0}
+ _LOCALGROUP_INFO_0 = record
+ lgrpi0_name: LPWSTR;
+ end;
+ {$EXTERNALSYM _LOCALGROUP_INFO_0}
+ LOCALGROUP_INFO_0 = _LOCALGROUP_INFO_0;
+ {$EXTERNALSYM LOCALGROUP_INFO_0}
+ TLocalGroupInfo0 = LOCALGROUP_INFO_0;
+ PLocalGroupInfo0 = PLOCALGROUP_INFO_0;
+
+ LPLOCALGROUP_INFO_1 = ^LOCALGROUP_INFO_1;
+ {$EXTERNALSYM LPLOCALGROUP_INFO_1}
+ PLOCALGROUP_INFO_1 = ^LOCALGROUP_INFO_1;
+ {$EXTERNALSYM PLOCALGROUP_INFO_1}
+ _LOCALGROUP_INFO_1 = record
+ lgrpi1_name: LPWSTR;
+ lgrpi1_comment: LPWSTR;
+ end;
+ {$EXTERNALSYM _LOCALGROUP_INFO_1}
+ LOCALGROUP_INFO_1 = _LOCALGROUP_INFO_1;
+ {$EXTERNALSYM LOCALGROUP_INFO_1}
+ TLocalGroupInfo1 = LOCALGROUP_INFO_1;
+ PLocalGroupInfo1 = PLOCALGROUP_INFO_1;
+
+ LPLOCALGROUP_INFO_1002 = ^LOCALGROUP_INFO_1002;
+ {$EXTERNALSYM LPLOCALGROUP_INFO_1002}
+ PLOCALGROUP_INFO_1002 = ^LOCALGROUP_INFO_1002;
+ {$EXTERNALSYM PLOCALGROUP_INFO_1002}
+ _LOCALGROUP_INFO_1002 = record
+ lgrpi1002_comment: LPWSTR;
+ end;
+ {$EXTERNALSYM _LOCALGROUP_INFO_1002}
+ LOCALGROUP_INFO_1002 = _LOCALGROUP_INFO_1002;
+ {$EXTERNALSYM LOCALGROUP_INFO_1002}
+ TLocalGroupInfo1002 = LOCALGROUP_INFO_1002;
+ PLocalGroupInfo1002 = PLOCALGROUP_INFO_1002;
+
+ LPLOCALGROUP_MEMBERS_INFO_0 = ^LOCALGROUP_MEMBERS_INFO_0;
+ {$EXTERNALSYM LPLOCALGROUP_MEMBERS_INFO_0}
+ PLOCALGROUP_MEMBERS_INFO_0 = ^LOCALGROUP_MEMBERS_INFO_0;
+ {$EXTERNALSYM PLOCALGROUP_MEMBERS_INFO_0}
+ _LOCALGROUP_MEMBERS_INFO_0 = record
+ lgrmi0_sid: PSID;
+ end;
+ {$EXTERNALSYM _LOCALGROUP_MEMBERS_INFO_0}
+ LOCALGROUP_MEMBERS_INFO_0 = _LOCALGROUP_MEMBERS_INFO_0;
+ {$EXTERNALSYM LOCALGROUP_MEMBERS_INFO_0}
+ TLocalGroupMembersInfo0 = LOCALGROUP_MEMBERS_INFO_0;
+ PLocalGroupMembersInfo0 = PLOCALGROUP_MEMBERS_INFO_0;
+
+ LPLOCALGROUP_MEMBERS_INFO_1 = ^LOCALGROUP_MEMBERS_INFO_1;
+ {$EXTERNALSYM LPLOCALGROUP_MEMBERS_INFO_1}
+ PLOCALGROUP_MEMBERS_INFO_1 = ^LOCALGROUP_MEMBERS_INFO_1;
+ {$EXTERNALSYM PLOCALGROUP_MEMBERS_INFO_1}
+ _LOCALGROUP_MEMBERS_INFO_1 = record
+ lgrmi1_sid: PSID;
+ lgrmi1_sidusage: SID_NAME_USE;
+ lgrmi1_name: LPWSTR;
+ end;
+ {$EXTERNALSYM _LOCALGROUP_MEMBERS_INFO_1}
+ LOCALGROUP_MEMBERS_INFO_1 = _LOCALGROUP_MEMBERS_INFO_1;
+ {$EXTERNALSYM LOCALGROUP_MEMBERS_INFO_1}
+ TLocalGroupMembersInfo1 = LOCALGROUP_MEMBERS_INFO_1;
+ PLocalGroupMembersInfo1 = PLOCALGROUP_MEMBERS_INFO_1;
+
+ LPLOCALGROUP_MEMBERS_INFO_2 = ^LOCALGROUP_MEMBERS_INFO_2;
+ {$EXTERNALSYM LPLOCALGROUP_MEMBERS_INFO_2}
+ PLOCALGROUP_MEMBERS_INFO_2 = ^LOCALGROUP_MEMBERS_INFO_2;
+ {$EXTERNALSYM PLOCALGROUP_MEMBERS_INFO_2}
+ _LOCALGROUP_MEMBERS_INFO_2 = record
+ lgrmi2_sid: PSID;
+ lgrmi2_sidusage: SID_NAME_USE;
+ lgrmi2_domainandname: LPWSTR;
+ end;
+ {$EXTERNALSYM _LOCALGROUP_MEMBERS_INFO_2}
+ LOCALGROUP_MEMBERS_INFO_2 = _LOCALGROUP_MEMBERS_INFO_2;
+ {$EXTERNALSYM LOCALGROUP_MEMBERS_INFO_2}
+ TLocalGroupMembersInfo2 = LOCALGROUP_MEMBERS_INFO_2;
+ PLocalGroupMembersInfo2 = PLOCALGROUP_MEMBERS_INFO_2;
+
+ LPLOCALGROUP_MEMBERS_INFO_3 = ^LOCALGROUP_MEMBERS_INFO_3;
+ {$EXTERNALSYM LPLOCALGROUP_MEMBERS_INFO_3}
+ PLOCALGROUP_MEMBERS_INFO_3 = ^LOCALGROUP_MEMBERS_INFO_3;
+ {$EXTERNALSYM PLOCALGROUP_MEMBERS_INFO_3}
+ _LOCALGROUP_MEMBERS_INFO_3 = record
+ lgrmi3_domainandname: LPWSTR;
+ end;
+ {$EXTERNALSYM _LOCALGROUP_MEMBERS_INFO_3}
+ LOCALGROUP_MEMBERS_INFO_3 = _LOCALGROUP_MEMBERS_INFO_3;
+ {$EXTERNALSYM LOCALGROUP_MEMBERS_INFO_3}
+ TLocalGroupMembersInfo3 = LOCALGROUP_MEMBERS_INFO_3;
+ PLocalGroupMembersInfo3 = PLOCALGROUP_MEMBERS_INFO_3;
+
+ LPLOCALGROUP_USERS_INFO_0 = ^LOCALGROUP_USERS_INFO_0;
+ {$EXTERNALSYM LPLOCALGROUP_USERS_INFO_0}
+ PLOCALGROUP_USERS_INFO_0 = ^LOCALGROUP_USERS_INFO_0;
+ {$EXTERNALSYM PLOCALGROUP_USERS_INFO_0}
+ _LOCALGROUP_USERS_INFO_0 = record
+ lgrui0_name: LPWSTR;
+ end;
+ {$EXTERNALSYM _LOCALGROUP_USERS_INFO_0}
+ LOCALGROUP_USERS_INFO_0 = _LOCALGROUP_USERS_INFO_0;
+ {$EXTERNALSYM LOCALGROUP_USERS_INFO_0}
+ TLocalGroupUsersInfo0 = LOCALGROUP_USERS_INFO_0;
+ PLocalGroupUsersInfo0 = PLOCALGROUP_USERS_INFO_0;
+
+const
+ LOCALGROUP_NAME_PARMNUM = 1;
+ {$EXTERNALSYM LOCALGROUP_NAME_PARMNUM}
+ LOCALGROUP_COMMENT_PARMNUM = 2;
+ {$EXTERNALSYM LOCALGROUP_COMMENT_PARMNUM}
+
+//
+// Display Information APIs
+//
+
+function NetQueryDisplayInformation(ServerName: LPCWSTR; Level, Index, EntriesRequested, PreferredMaximumLength: DWORD; ReturnedEntryCount: LPDWORD; var SortedBuffer: PVOID): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetQueryDisplayInformation}
+
+function NetGetDisplayInformationIndex(ServerName: LPCWSTR; Level: DWORD; Prefix: LPCWSTR; Index: LPDWORD): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetGetDisplayInformationIndex}
+
+//
+// QueryDisplayInformation levels
+
+type
+ PNET_DISPLAY_USER = ^NET_DISPLAY_USER;
+ {$EXTERNALSYM PNET_DISPLAY_USER}
+ _NET_DISPLAY_USER = record
+ usri1_name: LPWSTR;
+ usri1_comment: LPWSTR;
+ usri1_flags: DWORD;
+ usri1_full_name: LPWSTR;
+ usri1_user_id: DWORD;
+ usri1_next_index: DWORD;
+ end;
+ {$EXTERNALSYM _NET_DISPLAY_USER}
+ NET_DISPLAY_USER = _NET_DISPLAY_USER;
+ {$EXTERNALSYM NET_DISPLAY_USER}
+ TNetDisplayUser = NET_DISPLAY_USER;
+ PNetDisplayUser = PNET_DISPLAY_USER;
+
+ PNET_DISPLAY_MACHINE = ^NET_DISPLAY_MACHINE;
+ {$EXTERNALSYM PNET_DISPLAY_MACHINE}
+ _NET_DISPLAY_MACHINE = record
+ usri2_name: LPWSTR;
+ usri2_comment: LPWSTR;
+ usri2_flags: DWORD;
+ usri2_user_id: DWORD;
+ usri2_next_index: DWORD;
+ end;
+ {$EXTERNALSYM _NET_DISPLAY_MACHINE}
+ NET_DISPLAY_MACHINE = _NET_DISPLAY_MACHINE;
+ {$EXTERNALSYM NET_DISPLAY_MACHINE}
+ TNetDisplayMachine = NET_DISPLAY_MACHINE;
+ PNetDisplayMachine = PNET_DISPLAY_MACHINE;
+
+ PNET_DISPLAY_GROUP = ^NET_DISPLAY_GROUP;
+ {$EXTERNALSYM PNET_DISPLAY_GROUP}
+ _NET_DISPLAY_GROUP = record
+ grpi3_name: LPWSTR;
+ grpi3_comment: LPWSTR;
+ grpi3_group_id: DWORD;
+ grpi3_attributes: DWORD;
+ grpi3_next_index: DWORD;
+ end;
+ {$EXTERNALSYM _NET_DISPLAY_GROUP}
+ NET_DISPLAY_GROUP = _NET_DISPLAY_GROUP;
+ {$EXTERNALSYM NET_DISPLAY_GROUP}
+ TNetDisplayGroup = NET_DISPLAY_GROUP;
+ PNetDisplayGroup = PNET_DISPLAY_GROUP;
+
+//
+// Access Class
+//
+
+//
+// Function Prototypes - Access
+//
+//
+// The NetAccess APIs are only available to downlevel
+//
+
+//#define NetAccessAdd RxNetAccessAdd
+
+function NetAccessAdd(servername: LPCWSTR; level: DWORD; buf: LPBYTE; parm_err: LPDWORD): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetAccessAdd}
+
+//#define NetAccessEnum RxNetAccessEnum
+
+function NetAccessEnum(servername, BasePath: LPCWSTR; Recursive, level: DWORD; var bufptr: LPBYTE; prefmaxlen: DWORD; entriesread, totalentries, resume_handle: LPDWORD): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetAccessEnum}
+
+//#define NetAccessGetInfo RxNetAccessGetInfo
+
+function NetAccessGetInfo(servername, resource: LPCWSTR; level: DWORD; var bufptr: LPBYTE): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetAccessGetInfo}
+
+//#define NetAccessSetInfo RxNetAccessSetInfo
+
+function NetAccessSetInfo(servername, resource: LPCWSTR; level: DWORD; buf: LPBYTE; parm_err: LPDWORD): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetAccessSetInfo}
+
+//#define NetAccessDel RxNetAccessDel
+
+function NetAccessDel(servername: LPCWSTR; resource: LPCWSTR): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetAccessDel}
+
+//#define NetAccessGetUserPerms RxNetAccessGetUserPerms
+
+function NetAccessGetUserPerms(servername, UGname, resource: LPCWSTR; Perms: LPDWORD): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetAccessGetUserPerms}
+
+//
+// Data Structures - Access
+//
+
+type
+ LPACCESS_INFO_0 = ^ACCESS_INFO_0;
+ {$EXTERNALSYM LPACCESS_INFO_0}
+ PACCESS_INFO_0 = ^ACCESS_INFO_0;
+ {$EXTERNALSYM PACCESS_INFO_0}
+ _ACCESS_INFO_0 = record
+ acc0_resource_name: LPWSTR;
+ end;
+ {$EXTERNALSYM _ACCESS_INFO_0}
+ ACCESS_INFO_0 = _ACCESS_INFO_0;
+ {$EXTERNALSYM ACCESS_INFO_0}
+ TAccessInfo0 = ACCESS_INFO_0;
+ PAccessInfo0 = PACCESS_INFO_0;
+
+ LPACCESS_INFO_1 = ^ACCESS_INFO_1;
+ {$EXTERNALSYM LPACCESS_INFO_1}
+ PACCESS_INFO_1 = ^ACCESS_INFO_1;
+ {$EXTERNALSYM PACCESS_INFO_1}
+ _ACCESS_INFO_1 = record
+ acc1_resource_name: LPWSTR;
+ acc1_attr: DWORD;
+ acc1_count: DWORD;
+ end;
+ {$EXTERNALSYM _ACCESS_INFO_1}
+ ACCESS_INFO_1 = _ACCESS_INFO_1;
+ {$EXTERNALSYM ACCESS_INFO_1}
+ TAccessInfo1 = ACCESS_INFO_1;
+ PAccessInfo1 = PACCESS_INFO_1;
+
+ LPACCESS_INFO_1002 = ^ACCESS_INFO_1002;
+ {$EXTERNALSYM LPACCESS_INFO_1002}
+ PACCESS_INFO_1002 = ^ACCESS_INFO_1002;
+ {$EXTERNALSYM PACCESS_INFO_1002}
+ _ACCESS_INFO_1002 = record
+ acc1002_attr: DWORD;
+ end;
+ {$EXTERNALSYM _ACCESS_INFO_1002}
+ ACCESS_INFO_1002 = _ACCESS_INFO_1002;
+ {$EXTERNALSYM ACCESS_INFO_1002}
+ TAccessInfo1002 = ACCESS_INFO_1002;
+ PAccessInfo1002 = PACCESS_INFO_1002;
+
+ LPACCESS_LIST = ^ACCESS_LIST;
+ {$EXTERNALSYM LPACCESS_LIST}
+ PACCESS_LIST = ^ACCESS_LIST;
+ {$EXTERNALSYM PACCESS_LIST}
+ _ACCESS_LIST = record
+ acl_ugname: LPWSTR;
+ acl_access: DWORD;
+ end;
+ {$EXTERNALSYM _ACCESS_LIST}
+ ACCESS_LIST = _ACCESS_LIST;
+ {$EXTERNALSYM ACCESS_LIST}
+ TAccessList = ACCESS_LIST;
+ PAccessList = PACCESS_LIST;
+
+//
+// Special Values and Constants - Access
+//
+
+//
+// Maximum number of permission entries for each resource.
+//
+
+const
+ MAXPERMENTRIES = 64;
+ {$EXTERNALSYM MAXPERMENTRIES}
+
+//
+// Bit values for the access permissions. ACCESS_ALL is a handy
+// way to specify maximum permissions. These are used in
+// acl_access field of access_list structures.
+//
+
+ ACCESS_READ = $01;
+ {$EXTERNALSYM ACCESS_READ}
+ ACCESS_WRITE = $02;
+ {$EXTERNALSYM ACCESS_WRITE}
+ ACCESS_CREATE = $04;
+ {$EXTERNALSYM ACCESS_CREATE}
+ ACCESS_EXEC = $08;
+ {$EXTERNALSYM ACCESS_EXEC}
+ ACCESS_DELETE = $10;
+ {$EXTERNALSYM ACCESS_DELETE}
+ ACCESS_ATRIB = $20;
+ {$EXTERNALSYM ACCESS_ATRIB}
+ ACCESS_PERM = $40;
+ {$EXTERNALSYM ACCESS_PERM}
+
+ ACCESS_GROUP = $8000;
+ {$EXTERNALSYM ACCESS_GROUP}
+
+ ACCESS_NONE = 0;
+ {$EXTERNALSYM ACCESS_NONE}
+ ACCESS_ALL = ACCESS_READ or ACCESS_WRITE or ACCESS_CREATE or ACCESS_EXEC or ACCESS_DELETE or ACCESS_ATRIB or ACCESS_PERM;
+ {$EXTERNALSYM ACCESS_ALL}
+
+//
+// Bit values for the acc1_attr field of the ACCESS_INFO_1 structure.
+//
+
+ ACCESS_AUDIT = $1;
+ {$EXTERNALSYM ACCESS_AUDIT}
+
+ ACCESS_SUCCESS_OPEN = $10;
+ {$EXTERNALSYM ACCESS_SUCCESS_OPEN}
+ ACCESS_SUCCESS_WRITE = $20;
+ {$EXTERNALSYM ACCESS_SUCCESS_WRITE}
+ ACCESS_SUCCESS_DELETE = $40;
+ {$EXTERNALSYM ACCESS_SUCCESS_DELETE}
+ ACCESS_SUCCESS_ACL = $80;
+ {$EXTERNALSYM ACCESS_SUCCESS_ACL}
+ ACCESS_SUCCESS_MASK = $F0;
+ {$EXTERNALSYM ACCESS_SUCCESS_MASK}
+
+ ACCESS_FAIL_OPEN = $100;
+ {$EXTERNALSYM ACCESS_FAIL_OPEN}
+ ACCESS_FAIL_WRITE = $200;
+ {$EXTERNALSYM ACCESS_FAIL_WRITE}
+ ACCESS_FAIL_DELETE = $400;
+ {$EXTERNALSYM ACCESS_FAIL_DELETE}
+ ACCESS_FAIL_ACL = $800;
+ {$EXTERNALSYM ACCESS_FAIL_ACL}
+ ACCESS_FAIL_MASK = $F00;
+ {$EXTERNALSYM ACCESS_FAIL_MASK}
+
+ ACCESS_FAIL_SHIFT = 4;
+ {$EXTERNALSYM ACCESS_FAIL_SHIFT}
+
+//
+// Parmnum value for NetAccessSetInfo.
+//
+
+ ACCESS_RESOURCE_NAME_PARMNUM = 1;
+ {$EXTERNALSYM ACCESS_RESOURCE_NAME_PARMNUM}
+ ACCESS_ATTR_PARMNUM = 2;
+ {$EXTERNALSYM ACCESS_ATTR_PARMNUM}
+ ACCESS_COUNT_PARMNUM = 3;
+ {$EXTERNALSYM ACCESS_COUNT_PARMNUM}
+ ACCESS_ACCESS_LIST_PARMNUM = 4;
+ {$EXTERNALSYM ACCESS_ACCESS_LIST_PARMNUM}
+
+//
+// the new infolevel counterparts of the old info level + parmnum
+//
+
+ ACCESS_RESOURCE_NAME_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + ACCESS_RESOURCE_NAME_PARMNUM;
+ {$EXTERNALSYM ACCESS_RESOURCE_NAME_INFOLEVEL}
+ ACCESS_ATTR_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + ACCESS_ATTR_PARMNUM;
+ {$EXTERNALSYM ACCESS_ATTR_INFOLEVEL}
+ ACCESS_COUNT_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + ACCESS_COUNT_PARMNUM;
+ {$EXTERNALSYM ACCESS_COUNT_INFOLEVEL}
+ ACCESS_ACCESS_LIST_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + ACCESS_ACCESS_LIST_PARMNUM;
+ {$EXTERNALSYM ACCESS_ACCESS_LIST_INFOLEVEL}
+
+//
+// ACCESS_LETTERS defines a letter for each bit position in
+// the acl_access field of struct access_list. Note that some
+// bits have a corresponding letter of ' ' (space).
+//
+
+ ACCESS_LETTERS = 'RWCXDAP ';
+ {$EXTERNALSYM ACCESS_LETTERS}
+
+// ********************************
+//
+// Password Checking API structures
+//
+// ********************************
+
+//
+// What kind of password checking is to be performed?
+// NetValidateAuthentication : Check if the authentication can be done
+// NetValidatePasswordChange: Check if the password can be changed
+// NetValidatePasswordReset: Reset the password to the given value
+//
+
+type
+ _NET_VALIDATE_PASSWORD_TYPE = (
+ NetValidateFiller0,
+ NetValidateAuthentication,
+ NetValidatePasswordChange,
+ NetValidatePasswordReset);
+ {$EXTERNALSYM _NET_VALIDATE_PASSWORD_TYPE}
+ NET_VALIDATE_PASSWORD_TYPE = _NET_VALIDATE_PASSWORD_TYPE;
+ {$EXTERNALSYM NET_VALIDATE_PASSWORD_TYPE}
+ PNET_VALIDATE_PASSWORD_TYPE = ^NET_VALIDATE_PASSWORD_TYPE;
+ {$EXTERNALSYM PNET_VALIDATE_PASSWORD_TYPE}
+ TNetValidatePasswordType = NET_VALIDATE_PASSWORD_TYPE;
+ PNetValidatePasswordType = PNET_VALIDATE_PASSWORD_TYPE;
+
+//
+// Structure to keep the password hash
+//
+
+ _NET_VALIDATE_PASSWORD_HASH = record
+ Length: ULONG;
+ Hash: LPBYTE;
+ end;
+ {$EXTERNALSYM _NET_VALIDATE_PASSWORD_HASH}
+ NET_VALIDATE_PASSWORD_HASH = _NET_VALIDATE_PASSWORD_HASH;
+ {$EXTERNALSYM NET_VALIDATE_PASSWORD_HASH}
+ PNET_VALIDATE_PASSWORD_HASH = ^NET_VALIDATE_PASSWORD_HASH;
+ {$EXTERNALSYM PNET_VALIDATE_PASSWORD_HASH}
+ TNetValidatePasswordHash = NET_VALIDATE_PASSWORD_HASH;
+ PNetValidatePasswordHash = PNET_VALIDATE_PASSWORD_HASH;
+
+// To be used with PresentFields member of NET_VALIDATE_PERSISTED_FIELDS
+
+const
+ NET_VALIDATE_PASSWORD_LAST_SET = $00000001;
+ {$EXTERNALSYM NET_VALIDATE_PASSWORD_LAST_SET}
+ NET_VALIDATE_BAD_PASSWORD_TIME = $00000002;
+ {$EXTERNALSYM NET_VALIDATE_BAD_PASSWORD_TIME}
+ NET_VALIDATE_LOCKOUT_TIME = $00000004;
+ {$EXTERNALSYM NET_VALIDATE_LOCKOUT_TIME}
+ NET_VALIDATE_BAD_PASSWORD_COUNT = $00000008;
+ {$EXTERNALSYM NET_VALIDATE_BAD_PASSWORD_COUNT}
+ NET_VALIDATE_PASSWORD_HISTORY_LENGTH = $00000010;
+ {$EXTERNALSYM NET_VALIDATE_PASSWORD_HISTORY_LENGTH}
+ NET_VALIDATE_PASSWORD_HISTORY = $00000020;
+ {$EXTERNALSYM NET_VALIDATE_PASSWORD_HISTORY}
+
+//
+// Structure to keep information about the password and related things.
+// Present Fields: (used only in output args) which fields are changed.
+// See the constants above.
+// PasswordLastSet: When the password is last set.
+// BadPasswordTime: When the password was incorrect for the last time.
+// LockoutTime: When the account is locked out. If the account is not locked out
+// it is 0.
+// BadPasswordCount: How many times the password has given incorrectly in the
+// Observation Window.
+// PasswordHistoryLength: How many passwords are kept in the history
+// PasswordHistory: Password hashes that are in the history
+//
+
+type
+ _NET_VALIDATE_PERSISTED_FIELDS = record
+ PresentFields: ULONG;
+ PasswordLastSet: FILETIME;
+ BadPasswordTime: FILETIME;
+ LockoutTime: FILETIME;
+ BadPasswordCount: ULONG;
+ PasswordHistoryLength: ULONG;
+ PasswordHistory: PNET_VALIDATE_PASSWORD_HASH;
+ end;
+ {$EXTERNALSYM _NET_VALIDATE_PERSISTED_FIELDS}
+ NET_VALIDATE_PERSISTED_FIELDS = _NET_VALIDATE_PERSISTED_FIELDS;
+ {$EXTERNALSYM NET_VALIDATE_PERSISTED_FIELDS}
+ PNET_VALIDATE_PERSISTED_FIELDS = ^NET_VALIDATE_PERSISTED_FIELDS;
+ {$EXTERNALSYM PNET_VALIDATE_PERSISTED_FIELDS}
+ TNetValidatePersistedFields = NET_VALIDATE_PERSISTED_FIELDS;
+ PNetValidatePersistedFields = PNET_VALIDATE_PERSISTED_FIELDS;
+
+//
+// Output Arg
+// ChangedPersistedFields: Any changes to the password related info
+// ValidationStatus: Shows the result of the request
+//
+
+ _NET_VALIDATE_OUTPUT_ARG = record
+ ChangedPersistedFields: NET_VALIDATE_PERSISTED_FIELDS;
+ ValidationStatus: NET_API_STATUS;
+ end;
+ {$EXTERNALSYM _NET_VALIDATE_OUTPUT_ARG}
+ NET_VALIDATE_OUTPUT_ARG = _NET_VALIDATE_OUTPUT_ARG;
+ {$EXTERNALSYM NET_VALIDATE_OUTPUT_ARG}
+ PNET_VALIDATE_OUTPUT_ARG = ^NET_VALIDATE_OUTPUT_ARG;
+ {$EXTERNALSYM PNET_VALIDATE_OUTPUT_ARG}
+ TNetValidateOutputArg = NET_VALIDATE_OUTPUT_ARG;
+ PNetValidateOutputArg = PNET_VALIDATE_OUTPUT_ARG;
+
+//
+// If authentication type of password check is to be made,
+// this kind of input must be used
+//
+// InputPersistedFields: Information about the account to be logged into
+// PasswordMatched: Indicates the result of the application's authentication of the supplied password
+//
+
+ _NET_VALIDATE_AUTHENTICATION_INPUT_ARG = record
+ InputPersistedFields: NET_VALIDATE_PERSISTED_FIELDS;
+ PasswordMatched: BOOLEAN;
+ end;
+ {$EXTERNALSYM _NET_VALIDATE_AUTHENTICATION_INPUT_ARG}
+ NET_VALIDATE_AUTHENTICATION_INPUT_ARG = _NET_VALIDATE_AUTHENTICATION_INPUT_ARG;
+ {$EXTERNALSYM NET_VALIDATE_AUTHENTICATION_INPUT_ARG}
+ PNET_VALIDATE_AUTHENTICATION_INPUT_ARG = ^NET_VALIDATE_AUTHENTICATION_INPUT_ARG;
+ {$EXTERNALSYM PNET_VALIDATE_AUTHENTICATION_INPUT_ARG}
+ TNetValidateAuthenticationInputArg = NET_VALIDATE_AUTHENTICATION_INPUT_ARG;
+ PNetValidateAuthenticationInputArg = PNET_VALIDATE_AUTHENTICATION_INPUT_ARG;
+
+//
+// If password change type of check is to be made,
+// this kind of input must be used
+//
+// InputPersistedFields: Information about the account to be logged into
+// ClearPassword: The string which password is going to be
+// UserAccountName: Name of the user account
+// HashedPassword: Hash of the string that the password is going to be
+// PasswordMatch: denotes if the old password supplied by user matched or not
+//
+
+ _NET_VALIDATE_PASSWORD_CHANGE_INPUT_ARG = record
+ InputPersistedFields: NET_VALIDATE_PERSISTED_FIELDS;
+ ClearPassword: LPWSTR;
+ UserAccountName: LPWSTR;
+ HashedPassword: NET_VALIDATE_PASSWORD_HASH;
+ PasswordMatch: BOOLEAN;
+ end;
+ {$EXTERNALSYM _NET_VALIDATE_PASSWORD_CHANGE_INPUT_ARG}
+ NET_VALIDATE_PASSWORD_CHANGE_INPUT_ARG = _NET_VALIDATE_PASSWORD_CHANGE_INPUT_ARG;
+ {$EXTERNALSYM NET_VALIDATE_PASSWORD_CHANGE_INPUT_ARG}
+ PNET_VALIDATE_PASSWORD_CHANGE_INPUT_ARG = ^NET_VALIDATE_PASSWORD_CHANGE_INPUT_ARG;
+ {$EXTERNALSYM PNET_VALIDATE_PASSWORD_CHANGE_INPUT_ARG}
+ TNetValidatePasswordChangeInputArg = NET_VALIDATE_PASSWORD_CHANGE_INPUT_ARG;
+ PNetValidatePasswordChangeInputArg = PNET_VALIDATE_PASSWORD_CHANGE_INPUT_ARG;
+
+//
+// If password reset type of check is to be made,
+// this kind of input must be used
+//
+// InputPersistedFields: Information about the account to be logged into
+// ClearPassword: The string which password is going to be
+// UserAccountName: Name of the user account
+// HashedPassword: Hash of the string that the password is going to be
+// PasswordMustChangeAtNextLogon: Password must change for the user to be logged in
+// ClearLockout: If the account was locked out, this field can be used to clear lockout
+//
+
+ _NET_VALIDATE_PASSWORD_RESET_INPUT_ARG = record
+ InputPersistedFields: NET_VALIDATE_PERSISTED_FIELDS;
+ ClearPassword: LPWSTR;
+ UserAccountName: LPWSTR;
+ HashedPassword: NET_VALIDATE_PASSWORD_HASH;
+ PasswordMustChangeAtNextLogon: BOOLEAN;
+ ClearLockout: BOOLEAN;
+ end;
+ {$EXTERNALSYM _NET_VALIDATE_PASSWORD_RESET_INPUT_ARG}
+ NET_VALIDATE_PASSWORD_RESET_INPUT_ARG = _NET_VALIDATE_PASSWORD_RESET_INPUT_ARG;
+ {$EXTERNALSYM NET_VALIDATE_PASSWORD_RESET_INPUT_ARG}
+ PNET_VALIDATE_PASSWORD_RESET_INPUT_ARG = ^NET_VALIDATE_PASSWORD_RESET_INPUT_ARG;
+ {$EXTERNALSYM PNET_VALIDATE_PASSWORD_RESET_INPUT_ARG}
+ TNetValidatePasswordResetInputArg = NET_VALIDATE_PASSWORD_RESET_INPUT_ARG;
+ PNetValidatePasswordResetInputArg = PNET_VALIDATE_PASSWORD_RESET_INPUT_ARG;
+
+//
+// Password Checking API structures end here
+//
+
+function NetValidatePasswordPolicy(ServerName: LPWSTR; Qualifier: LPVOID; ValidationType: NET_VALIDATE_PASSWORD_TYPE;
+ InputArg: LPVOID; var OutputArg: LPVOID): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetValidatePasswordPolicy}
+
+function NetValidatePasswordPolicyFree(var OutputArg: LPVOID): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetValidatePasswordPolicyFree}
+
+//
+// Domain Class
+//
+
+//
+// Function Prototypes - Domain
+//
+
+function NetGetDCName(servername, domainname: LPCWSTR; var bufptr: LPBYTE): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetGetDCName}
+
+function NetGetAnyDCName(servername, domainname: LPCWSTR; var bufptr: LPBYTE): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetGetAnyDCName}
+
+function I_NetLogonControl(ServerName: LPCWSTR; FunctionCode, QueryLevel: DWORD; var Buffer: LPBYTE): NET_API_STATUS; stdcall;
+{$EXTERNALSYM I_NetLogonControl}
+
+function I_NetLogonControl2(ServerName: LPCWSTR; FunctionCode, QueryLevel: DWORD; Data: LPBYTE; var Buffer: LPBYTE): NET_API_STATUS; stdcall;
+{$EXTERNALSYM I_NetLogonControl2}
+
+function NetEnumerateTrustedDomains(ServerName: LPWSTR; var DomainNames: LPWSTR): NTSTATUS; stdcall;
+{$EXTERNALSYM NetEnumerateTrustedDomains}
+
+//
+// Special Values and Constants - Domain
+//
+
+//
+// FunctionCode values for I_NetLogonControl.
+//
+// NOTE : if you change the following NETLOGON_CONTROL_* values,
+// change them in net\svcdlls\logonsrv\logon.idl file also.
+//
+
+const
+ NETLOGON_CONTROL_QUERY = 1; // No-op: just query
+ {$EXTERNALSYM NETLOGON_CONTROL_QUERY}
+ NETLOGON_CONTROL_REPLICATE = 2; // Force replicate on BDC
+ {$EXTERNALSYM NETLOGON_CONTROL_REPLICATE}
+ NETLOGON_CONTROL_SYNCHRONIZE = 3; // Force synchronize on BDC
+ {$EXTERNALSYM NETLOGON_CONTROL_SYNCHRONIZE}
+ NETLOGON_CONTROL_PDC_REPLICATE = 4; // Force PDC to broadcast change
+ {$EXTERNALSYM NETLOGON_CONTROL_PDC_REPLICATE}
+ NETLOGON_CONTROL_REDISCOVER = 5; // Force to re-discover trusted domain DCs
+ {$EXTERNALSYM NETLOGON_CONTROL_REDISCOVER}
+ NETLOGON_CONTROL_TC_QUERY = 6; // Query status of specified trusted channel status
+ {$EXTERNALSYM NETLOGON_CONTROL_TC_QUERY}
+ NETLOGON_CONTROL_TRANSPORT_NOTIFY = 7; // Notify netlogon that a new transport has come online
+ {$EXTERNALSYM NETLOGON_CONTROL_TRANSPORT_NOTIFY}
+ NETLOGON_CONTROL_FIND_USER = 8; // Find named user in a trusted domain
+ {$EXTERNALSYM NETLOGON_CONTROL_FIND_USER}
+ NETLOGON_CONTROL_CHANGE_PASSWORD = 9; // Change machine password on a secure channel to a trusted domain
+ {$EXTERNALSYM NETLOGON_CONTROL_CHANGE_PASSWORD}
+ NETLOGON_CONTROL_TC_VERIFY = 10; // Verify status of specified trusted channel
+ {$EXTERNALSYM NETLOGON_CONTROL_TC_VERIFY}
+ NETLOGON_CONTROL_FORCE_DNS_REG = 11; // Force DNS re-registration of all registered records
+ {$EXTERNALSYM NETLOGON_CONTROL_FORCE_DNS_REG}
+ NETLOGON_CONTROL_QUERY_DNS_REG = 12; // Query the status of DNS updates
+ {$EXTERNALSYM NETLOGON_CONTROL_QUERY_DNS_REG}
+
+// Debug function codes
+
+ NETLOGON_CONTROL_UNLOAD_NETLOGON_DLL = $FFFB;
+ {$EXTERNALSYM NETLOGON_CONTROL_UNLOAD_NETLOGON_DLL}
+ NETLOGON_CONTROL_BACKUP_CHANGE_LOG = $FFFC;
+ {$EXTERNALSYM NETLOGON_CONTROL_BACKUP_CHANGE_LOG}
+ NETLOGON_CONTROL_TRUNCATE_LOG = $FFFD;
+ {$EXTERNALSYM NETLOGON_CONTROL_TRUNCATE_LOG}
+ NETLOGON_CONTROL_SET_DBFLAG = $FFFE;
+ {$EXTERNALSYM NETLOGON_CONTROL_SET_DBFLAG}
+ NETLOGON_CONTROL_BREAKPOINT = $FFFF;
+ {$EXTERNALSYM NETLOGON_CONTROL_BREAKPOINT}
+
+//
+// Query level 1 for I_NetLogonControl
+//
+
+type
+ PNETLOGON_INFO_1 = ^NETLOGON_INFO_1;
+ {$EXTERNALSYM PNETLOGON_INFO_1}
+ _NETLOGON_INFO_1 = record
+ netlog1_flags: DWORD;
+ netlog1_pdc_connection_status: NET_API_STATUS;
+ end;
+ {$EXTERNALSYM _NETLOGON_INFO_1}
+ NETLOGON_INFO_1 = _NETLOGON_INFO_1;
+ {$EXTERNALSYM NETLOGON_INFO_1}
+ TNetLogonInfo1 = NETLOGON_INFO_1;
+ PNetLogonInfo1 = PNETLOGON_INFO_1;
+
+ PNETLOGON_INFO_2 = ^NETLOGON_INFO_2;
+ {$EXTERNALSYM PNETLOGON_INFO_2}
+ _NETLOGON_INFO_2 = record
+ netlog2_flags: DWORD;
+ //
+ // If NETLOGON_VERIFY_STATUS_RETURNED bit is set in
+ // netlog2_flags, the following field will return
+ // the status of trust verification. Otherwise,
+ // the field will return the status of the secure
+ // channel to the primary domain of the machine
+ // (useful for BDCs only).
+ //
+ netlog2_pdc_connection_status: NET_API_STATUS;
+ netlog2_trusted_dc_name: LPWSTR;
+ netlog2_tc_connection_status: NET_API_STATUS;
+ end;
+ {$EXTERNALSYM _NETLOGON_INFO_2}
+ NETLOGON_INFO_2 = _NETLOGON_INFO_2;
+ {$EXTERNALSYM NETLOGON_INFO_2}
+ TNetLogonInfo2 = NETLOGON_INFO_2;
+ PNetLogonInfo2 = PNETLOGON_INFO_2;
+
+ PNETLOGON_INFO_3 = ^NETLOGON_INFO_3;
+ {$EXTERNALSYM PNETLOGON_INFO_3}
+ _NETLOGON_INFO_3 = record
+ netlog3_flags: DWORD;
+ netlog3_logon_attempts: DWORD;
+ netlog3_reserved1: DWORD;
+ netlog3_reserved2: DWORD;
+ netlog3_reserved3: DWORD;
+ netlog3_reserved4: DWORD;
+ netlog3_reserved5: DWORD;
+ end;
+ {$EXTERNALSYM _NETLOGON_INFO_3}
+ NETLOGON_INFO_3 = _NETLOGON_INFO_3;
+ {$EXTERNALSYM NETLOGON_INFO_3}
+ TNetLogonInfo3 = NETLOGON_INFO_3;
+ PNetLogonInfo3 = PNETLOGON_INFO_3;
+
+ PNETLOGON_INFO_4 = ^NETLOGON_INFO_4;
+ {$EXTERNALSYM PNETLOGON_INFO_4}
+ _NETLOGON_INFO_4 = record
+ netlog4_trusted_dc_name: LPWSTR;
+ netlog4_trusted_domain_name: LPWSTR;
+ end;
+ {$EXTERNALSYM _NETLOGON_INFO_4}
+ NETLOGON_INFO_4 = _NETLOGON_INFO_4;
+ {$EXTERNALSYM NETLOGON_INFO_4}
+ TNetLogonInfo4 = NETLOGON_INFO_4;
+ PNetLogonInfo4 = PNETLOGON_INFO_4;
+
+//
+// Values of netlog1_flags
+//
+
+const
+ NETLOGON_REPLICATION_NEEDED = $01; // Database is out of date
+ {$EXTERNALSYM NETLOGON_REPLICATION_NEEDED}
+ NETLOGON_REPLICATION_IN_PROGRESS = $02; // Replication is happening now
+ {$EXTERNALSYM NETLOGON_REPLICATION_IN_PROGRESS}
+ NETLOGON_FULL_SYNC_REPLICATION = $04; // full sync replication required/progress
+ {$EXTERNALSYM NETLOGON_FULL_SYNC_REPLICATION}
+ NETLOGON_REDO_NEEDED = $08; // Redo of previous replication needed
+ {$EXTERNALSYM NETLOGON_REDO_NEEDED}
+ NETLOGON_HAS_IP = $10; // The trusted domain DC has an IP address
+ {$EXTERNALSYM NETLOGON_HAS_IP}
+ NETLOGON_HAS_TIMESERV = $20; // The trusted domain DC runs the Windows Time Service
+ {$EXTERNALSYM NETLOGON_HAS_TIMESERV}
+ NETLOGON_DNS_UPDATE_FAILURE = $40; // There was a failure in the last update for one of the DNS records
+ {$EXTERNALSYM NETLOGON_DNS_UPDATE_FAILURE}
+ NETLOGON_VERIFY_STATUS_RETURNED = $80; // Trust verification status returned in netlog2_pdc_connection_status
+ {$EXTERNALSYM NETLOGON_VERIFY_STATUS_RETURNED}
+
+implementation
+
+{$IFDEF DYNAMIC_LINK}
+
+var
+ _NetUserAdd: Pointer;
+
+function NetUserAdd;
+begin
+ GetProcedureAddress(_NetUserAdd, netapi32, 'NetUserAdd');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetUserAdd]
+ end;
+end;
+
+var
+ _NetUserEnum: Pointer;
+
+function NetUserEnum;
+begin
+ GetProcedureAddress(_NetUserEnum, netapi32, 'NetUserEnum');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetUserEnum]
+ end;
+end;
+
+var
+ _NetUserGetInfo: Pointer;
+
+function NetUserGetInfo;
+begin
+ GetProcedureAddress(_NetUserGetInfo, netapi32, 'NetUserGetInfo');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetUserGetInfo]
+ end;
+end;
+
+var
+ _NetUserSetInfo: Pointer;
+
+function NetUserSetInfo;
+begin
+ GetProcedureAddress(_NetUserSetInfo, netapi32, 'NetUserSetInfo');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetUserSetInfo]
+ end;
+end;
+
+var
+ _NetUserDel: Pointer;
+
+function NetUserDel;
+begin
+ GetProcedureAddress(_NetUserDel, netapi32, 'NetUserDel');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetUserDel]
+ end;
+end;
+
+var
+ _NetUserGetGroups: Pointer;
+
+function NetUserGetGroups;
+begin
+ GetProcedureAddress(_NetUserGetGroups, netapi32, 'NetUserGetGroups');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetUserGetGroups]
+ end;
+end;
+
+var
+ _NetUserSetGroups: Pointer;
+
+function NetUserSetGroups;
+begin
+ GetProcedureAddress(_NetUserSetGroups, netapi32, 'NetUserSetGroups');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetUserSetGroups]
+ end;
+end;
+
+var
+ _NetUserGetLocalGroups: Pointer;
+
+function NetUserGetLocalGroups;
+begin
+ GetProcedureAddress(_NetUserGetLocalGroups, netapi32, 'NetUserGetLocalGroups');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetUserGetLocalGroups]
+ end;
+end;
+
+var
+ _NetUserModalsGet: Pointer;
+
+function NetUserModalsGet;
+begin
+ GetProcedureAddress(_NetUserModalsGet, netapi32, 'NetUserModalsGet');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetUserModalsGet]
+ end;
+end;
+
+var
+ _NetUserModalsSet: Pointer;
+
+function NetUserModalsSet;
+begin
+ GetProcedureAddress(_NetUserModalsSet, netapi32, 'NetUserModalsSet');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetUserModalsSet]
+ end;
+end;
+
+var
+ _NetUserChangePassword: Pointer;
+
+function NetUserChangePassword;
+begin
+ GetProcedureAddress(_NetUserChangePassword, netapi32, 'NetUserChangePassword');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetUserChangePassword]
+ end;
+end;
+
+var
+ _NetGroupAdd: Pointer;
+
+function NetGroupAdd;
+begin
+ GetProcedureAddress(_NetGroupAdd, netapi32, 'NetGroupAdd');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetGroupAdd]
+ end;
+end;
+
+var
+ _NetGroupAddUser: Pointer;
+
+function NetGroupAddUser;
+begin
+ GetProcedureAddress(_NetGroupAddUser, netapi32, 'NetGroupAddUser');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetGroupAddUser]
+ end;
+end;
+
+var
+ _NetGroupEnum: Pointer;
+
+function NetGroupEnum;
+begin
+ GetProcedureAddress(_NetGroupEnum, netapi32, 'NetGroupEnum');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetGroupEnum]
+ end;
+end;
+
+var
+ _NetGroupGetInfo: Pointer;
+
+function NetGroupGetInfo;
+begin
+ GetProcedureAddress(_NetGroupGetInfo, netapi32, 'NetGroupGetInfo');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetGroupGetInfo]
+ end;
+end;
+
+var
+ _NetGroupSetInfo: Pointer;
+
+function NetGroupSetInfo;
+begin
+ GetProcedureAddress(_NetGroupSetInfo, netapi32, 'NetGroupSetInfo');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetGroupSetInfo]
+ end;
+end;
+
+var
+ _NetGroupDel: Pointer;
+
+function NetGroupDel;
+begin
+ GetProcedureAddress(_NetGroupDel, netapi32, 'NetGroupDel');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetGroupDel]
+ end;
+end;
+
+var
+ _NetGroupDelUser: Pointer;
+
+function NetGroupDelUser;
+begin
+ GetProcedureAddress(_NetGroupDelUser, netapi32, 'NetGroupDelUser');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetGroupDelUser]
+ end;
+end;
+
+var
+ _NetGroupGetUsers: Pointer;
+
+function NetGroupGetUsers;
+begin
+ GetProcedureAddress(_NetGroupGetUsers, netapi32, 'NetGroupGetUsers');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetGroupGetUsers]
+ end;
+end;
+
+var
+ _NetGroupSetUsers: Pointer;
+
+function NetGroupSetUsers;
+begin
+ GetProcedureAddress(_NetGroupSetUsers, netapi32, 'NetGroupSetUsers');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetGroupSetUsers]
+ end;
+end;
+
+var
+ _NetLocalGroupAdd: Pointer;
+
+function NetLocalGroupAdd;
+begin
+ GetProcedureAddress(_NetLocalGroupAdd, netapi32, 'NetLocalGroupAdd');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetLocalGroupAdd]
+ end;
+end;
+
+var
+ _NetLocalGroupAddMember: Pointer;
+
+function NetLocalGroupAddMember;
+begin
+ GetProcedureAddress(_NetLocalGroupAddMember, netapi32, 'NetLocalGroupAddMember');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetLocalGroupAddMember]
+ end;
+end;
+
+var
+ _NetLocalGroupEnum: Pointer;
+
+function NetLocalGroupEnum;
+begin
+ GetProcedureAddress(_NetLocalGroupEnum, netapi32, 'NetLocalGroupEnum');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetLocalGroupEnum]
+ end;
+end;
+
+var
+ _NetLocalGroupGetInfo: Pointer;
+
+function NetLocalGroupGetInfo;
+begin
+ GetProcedureAddress(_NetLocalGroupGetInfo, netapi32, 'NetLocalGroupGetInfo');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetLocalGroupGetInfo]
+ end;
+end;
+
+var
+ _NetLocalGroupSetInfo: Pointer;
+
+function NetLocalGroupSetInfo;
+begin
+ GetProcedureAddress(_NetLocalGroupSetInfo, netapi32, 'NetLocalGroupSetInfo');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetLocalGroupSetInfo]
+ end;
+end;
+
+var
+ _NetLocalGroupDel: Pointer;
+
+function NetLocalGroupDel;
+begin
+ GetProcedureAddress(_NetLocalGroupDel, netapi32, 'NetLocalGroupDel');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetLocalGroupDel]
+ end;
+end;
+
+var
+ _NetLocalGroupDelMember: Pointer;
+
+function NetLocalGroupDelMember;
+begin
+ GetProcedureAddress(_NetLocalGroupDelMember, netapi32, 'NetLocalGroupDelMember');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetLocalGroupDelMember]
+ end;
+end;
+
+var
+ _NetLocalGroupGetMembers: Pointer;
+
+function NetLocalGroupGetMembers;
+begin
+ GetProcedureAddress(_NetLocalGroupGetMembers, netapi32, 'NetLocalGroupGetMembers');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetLocalGroupGetMembers]
+ end;
+end;
+
+var
+ _NetLocalGroupSetMembers: Pointer;
+
+function NetLocalGroupSetMembers;
+begin
+ GetProcedureAddress(_NetLocalGroupSetMembers, netapi32, 'NetLocalGroupSetMembers');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetLocalGroupSetMembers]
+ end;
+end;
+
+var
+ _NetLocalGroupAddMembers: Pointer;
+
+function NetLocalGroupAddMembers;
+begin
+ GetProcedureAddress(_NetLocalGroupAddMembers, netapi32, 'NetLocalGroupAddMembers');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetLocalGroupAddMembers]
+ end;
+end;
+
+var
+ _NetLocalGroupDelMembers: Pointer;
+
+function NetLocalGroupDelMembers;
+begin
+ GetProcedureAddress(_NetLocalGroupDelMembers, netapi32, 'NetLocalGroupDelMembers');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetLocalGroupDelMembers]
+ end;
+end;
+
+var
+ _NetQueryDisplayInformation: Pointer;
+
+function NetQueryDisplayInformation;
+begin
+ GetProcedureAddress(_NetQueryDisplayInformation, netapi32, 'NetQueryDisplayInformation');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetQueryDisplayInformation]
+ end;
+end;
+
+var
+ _NetGetDisplayInformationIndex: Pointer;
+
+function NetGetDisplayInformationIndex;
+begin
+ GetProcedureAddress(_NetGetDisplayInformationIndex, netapi32, 'NetGetDisplayInformationIndex');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetGetDisplayInformationIndex]
+ end;
+end;
+
+var
+ _NetAccessAdd: Pointer;
+
+function NetAccessAdd;
+begin
+ GetProcedureAddress(_NetAccessAdd, netapi32, 'NetAccessAdd');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetAccessAdd]
+ end;
+end;
+
+var
+ _NetAccessEnum: Pointer;
+
+function NetAccessEnum;
+begin
+ GetProcedureAddress(_NetAccessEnum, netapi32, 'NetAccessEnum');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetAccessEnum]
+ end;
+end;
+
+var
+ _NetAccessGetInfo: Pointer;
+
+function NetAccessGetInfo;
+begin
+ GetProcedureAddress(_NetAccessGetInfo, netapi32, 'NetAccessGetInfo');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetAccessGetInfo]
+ end;
+end;
+
+var
+ _NetAccessSetInfo: Pointer;
+
+function NetAccessSetInfo;
+begin
+ GetProcedureAddress(_NetAccessSetInfo, netapi32, 'NetAccessSetInfo');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetAccessSetInfo]
+ end;
+end;
+
+var
+ _NetAccessDel: Pointer;
+
+function NetAccessDel;
+begin
+ GetProcedureAddress(_NetAccessDel, netapi32, 'NetAccessDel');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetAccessDel]
+ end;
+end;
+
+var
+ _NetAccessGetUserPerms: Pointer;
+
+function NetAccessGetUserPerms;
+begin
+ GetProcedureAddress(_NetAccessGetUserPerms, netapi32, 'NetAccessGetUserPerms');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetAccessGetUserPerms]
+ end;
+end;
+
+var
+ _NetValidatePasswordPolicy: Pointer;
+
+function NetValidatePasswordPolicy;
+begin
+ GetProcedureAddress(_NetValidatePasswordPolicy, netapi32, 'NetValidatePasswordPolicy');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetValidatePasswordPolicy]
+ end;
+end;
+
+var
+ _NetValidatePasswordPolicyFree: Pointer;
+
+function NetValidatePasswordPolicyFree;
+begin
+ GetProcedureAddress(_NetValidatePasswordPolicyFree, netapi32, 'NetValidatePasswordPolicyFree');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetValidatePasswordPolicyFree]
+ end;
+end;
+
+var
+ _NetGetDCName: Pointer;
+
+function NetGetDCName;
+begin
+ GetProcedureAddress(_NetGetDCName, netapi32, 'NetGetDCName');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetGetDCName]
+ end;
+end;
+
+var
+ _NetGetAnyDCName: Pointer;
+
+function NetGetAnyDCName;
+begin
+ GetProcedureAddress(_NetGetAnyDCName, netapi32, 'NetGetAnyDCName');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetGetAnyDCName]
+ end;
+end;
+
+var
+ _I_NetLogonControl: Pointer;
+
+function I_NetLogonControl;
+begin
+ GetProcedureAddress(_I_NetLogonControl, netapi32, 'I_NetLogonControl');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_I_NetLogonControl]
+ end;
+end;
+
+var
+ _I_NetLogonControl2: Pointer;
+
+function I_NetLogonControl2;
+begin
+ GetProcedureAddress(_I_NetLogonControl2, netapi32, 'I_NetLogonControl2');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_I_NetLogonControl2]
+ end;
+end;
+
+var
+ _NetEnumerateTrustedDomains: Pointer;
+
+function NetEnumerateTrustedDomains;
+begin
+ GetProcedureAddress(_NetEnumerateTrustedDomains, netapi32, 'NetEnumerateTrustedDomains');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetEnumerateTrustedDomains]
+ end;
+end;
+
+{$ELSE}
+
+function NetUserAdd; external netapi32 name 'NetUserAdd';
+function NetUserEnum; external netapi32 name 'NetUserEnum';
+function NetUserGetInfo; external netapi32 name 'NetUserGetInfo';
+function NetUserSetInfo; external netapi32 name 'NetUserSetInfo';
+function NetUserDel; external netapi32 name 'NetUserDel';
+function NetUserGetGroups; external netapi32 name 'NetUserGetGroups';
+function NetUserSetGroups; external netapi32 name 'NetUserSetGroups';
+function NetUserGetLocalGroups; external netapi32 name 'NetUserGetLocalGroups';
+function NetUserModalsGet; external netapi32 name 'NetUserModalsGet';
+function NetUserModalsSet; external netapi32 name 'NetUserModalsSet';
+function NetUserChangePassword; external netapi32 name 'NetUserChangePassword';
+function NetGroupAdd; external netapi32 name 'NetGroupAdd';
+function NetGroupAddUser; external netapi32 name 'NetGroupAddUser';
+function NetGroupEnum; external netapi32 name 'NetGroupEnum';
+function NetGroupGetInfo; external netapi32 name 'NetGroupGetInfo';
+function NetGroupSetInfo; external netapi32 name 'NetGroupSetInfo';
+function NetGroupDel; external netapi32 name 'NetGroupDel';
+function NetGroupDelUser; external netapi32 name 'NetGroupDelUser';
+function NetGroupGetUsers; external netapi32 name 'NetGroupGetUsers';
+function NetGroupSetUsers; external netapi32 name 'NetGroupSetUsers';
+function NetLocalGroupAdd; external netapi32 name 'NetLocalGroupAdd';
+function NetLocalGroupAddMember; external netapi32 name 'NetLocalGroupAddMember';
+function NetLocalGroupEnum; external netapi32 name 'NetLocalGroupEnum';
+function NetLocalGroupGetInfo; external netapi32 name 'NetLocalGroupGetInfo';
+function NetLocalGroupSetInfo; external netapi32 name 'NetLocalGroupSetInfo';
+function NetLocalGroupDel; external netapi32 name 'NetLocalGroupDel';
+function NetLocalGroupDelMember; external netapi32 name 'NetLocalGroupDelMember';
+function NetLocalGroupGetMembers; external netapi32 name 'NetLocalGroupGetMembers';
+function NetLocalGroupSetMembers; external netapi32 name 'NetLocalGroupSetMembers';
+function NetLocalGroupAddMembers; external netapi32 name 'NetLocalGroupAddMembers';
+function NetLocalGroupDelMembers; external netapi32 name 'NetLocalGroupDelMembers';
+function NetQueryDisplayInformation; external netapi32 name 'NetQueryDisplayInformation';
+function NetGetDisplayInformationIndex; external netapi32 name 'NetGetDisplayInformationIndex';
+function NetAccessAdd; external netapi32 name 'NetAccessAdd';
+function NetAccessEnum; external netapi32 name 'NetAccessEnum';
+function NetAccessGetInfo; external netapi32 name 'NetAccessGetInfo';
+function NetAccessSetInfo; external netapi32 name 'NetAccessSetInfo';
+function NetAccessDel; external netapi32 name 'NetAccessDel';
+function NetAccessGetUserPerms; external netapi32 name 'NetAccessGetUserPerms';
+function NetValidatePasswordPolicy; external netapi32 name 'NetValidatePasswordPolicy';
+function NetValidatePasswordPolicyFree; external netapi32 name 'NetValidatePasswordPolicyFree';
+function NetGetDCName; external netapi32 name 'NetGetDCName';
+function NetGetAnyDCName; external netapi32 name 'NetGetAnyDCName';
+function I_NetLogonControl; external netapi32 name 'I_NetLogonControl';
+function I_NetLogonControl2; external netapi32 name 'I_NetLogonControl2';
+function NetEnumerateTrustedDomains; external netapi32 name 'NetEnumerateTrustedDomains';
+
+{$ENDIF DYNAMIC_LINK}
+
+end.
diff --git a/packages/extra/winunits/jwalmalert.pas b/packages/extra/winunits/jwalmalert.pas
index 5cada4c1c6..9748cddca0 100644
--- a/packages/extra/winunits/jwalmalert.pas
+++ b/packages/extra/winunits/jwalmalert.pas
@@ -1,276 +1,276 @@
-{******************************************************************************}
-{ }
-{ Lan Manager Alterter API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: lmalert.h, released November 2001. The original Pascal }
-{ code is: LmAlert.pas, released Februari 2002. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwalmalert.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaLmAlert;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "lmalert.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaLmCons, JwaWinType;
-
-//
-// Function Prototypes
-//
-
-function NetAlertRaise(AlertEventName: LPCWSTR; Buffer: LPVOID; BufferSize: DWORD): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetAlertRaise}
-
-function NetAlertRaiseEx(AlertEventName: LPCWSTR; VariableInfo: LPVOID; VariableInfoSize: DWORD; ServiceName: LPCWSTR): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetAlertRaiseEx}
-
-//
-// Data Structures
-//
-
-type
- _STD_ALERT = record
- alrt_timestamp: DWORD;
- alrt_eventname: array [0..EVLEN] of WCHAR;
- alrt_servicename: array [0..SNLEN] of WCHAR;
- end;
- {$EXTERNALSYM _STD_ALERT}
- STD_ALERT = _STD_ALERT;
- {$EXTERNALSYM STD_ALERT}
- PSTD_ALERT = ^STD_ALERT;
- {$EXTERNALSYM PSTD_ALERT}
- LPSTD_ALERT = ^STD_ALERT;
- {$EXTERNALSYM LPSTD_ALERT}
- TStdAlert = STD_ALERT;
- PStdAlert = PSTD_ALERT;
-
- _ADMIN_OTHER_INFO = record
- alrtad_errcode: DWORD;
- alrtad_numstrings: DWORD;
- end;
- {$EXTERNALSYM _ADMIN_OTHER_INFO}
- ADMIN_OTHER_INFO = _ADMIN_OTHER_INFO;
- {$EXTERNALSYM ADMIN_OTHER_INFO}
- PADMIN_OTHER_INFO = ^ADMIN_OTHER_INFO;
- {$EXTERNALSYM PADMIN_OTHER_INFO}
- LPADMIN_OTHER_INFO = ^ADMIN_OTHER_INFO;
- {$EXTERNALSYM LPADMIN_OTHER_INFO}
- TAdminOtherInfo = ADMIN_OTHER_INFO;
- PAdminOtherInfo = PADMIN_OTHER_INFO;
-
- _ERRLOG_OTHER_INFO = record
- alrter_errcode: DWORD;
- alrter_offset: DWORD;
- end;
- {$EXTERNALSYM _ERRLOG_OTHER_INFO}
- ERRLOG_OTHER_INFO = _ERRLOG_OTHER_INFO;
- {$EXTERNALSYM ERRLOG_OTHER_INFO}
- PERRLOG_OTHER_INFO = ^ERRLOG_OTHER_INFO;
- {$EXTERNALSYM PERRLOG_OTHER_INFO}
- LPERRLOG_OTHER_INFO = ^ERRLOG_OTHER_INFO;
- {$EXTERNALSYM LPERRLOG_OTHER_INFO}
- TErrlogOtherInfo = ERRLOG_OTHER_INFO;
- PErrlogOtherInfo = PERRLOG_OTHER_INFO;
-
- _PRINT_OTHER_INFO = record
- alrtpr_jobid: DWORD;
- alrtpr_status: DWORD;
- alrtpr_submitted: DWORD;
- alrtpr_size: DWORD;
- end;
- {$EXTERNALSYM _PRINT_OTHER_INFO}
- PRINT_OTHER_INFO = _PRINT_OTHER_INFO;
- {$EXTERNALSYM PRINT_OTHER_INFO}
- PPRINT_OTHER_INFO = ^PRINT_OTHER_INFO;
- {$EXTERNALSYM PPRINT_OTHER_INFO}
- LPPRINT_OTHER_INFO = ^PRINT_OTHER_INFO;
- {$EXTERNALSYM LPPRINT_OTHER_INFO}
- TPrintOtherInfo = PRINT_OTHER_INFO;
- PPrintOtherInfo = PPRINT_OTHER_INFO;
-
- _USER_OTHER_INFO = record
- alrtus_errcode: DWORD;
- alrtus_numstrings: DWORD;
- end;
- {$EXTERNALSYM _USER_OTHER_INFO}
- USER_OTHER_INFO = _USER_OTHER_INFO;
- {$EXTERNALSYM USER_OTHER_INFO}
- PUSER_OTHER_INFO = ^USER_OTHER_INFO;
- {$EXTERNALSYM PUSER_OTHER_INFO}
- LPUSER_OTHER_INFO = ^USER_OTHER_INFO;
- {$EXTERNALSYM LPUSER_OTHER_INFO}
- TUserOtherInfo = USER_OTHER_INFO;
- PUserOtherInfo = PUSER_OTHER_INFO;
-
-//
-// Special Values and Constants
-//
-
-//
-// Name of mailslot to send alert notifications
-//
-
-const
- ALERTER_MAILSLOT = WideString('\\.\MAILSLOT\Alerter');
- {$EXTERNALSYM ALERTER_MAILSLOT}
-
-//
-// The following macro gives a pointer to the other_info data.
-// It takes an alert structure and returns a pointer to structure
-// beyond the standard portion.
-//
-
-function ALERT_OTHER_INFO(x: Pointer): Pointer;
-{$EXTERNALSYM ALERT_OTHER_INFO}
-
-//
-// The following macro gives a pointer to the variable-length data.
-// It takes a pointer to one of the other-info structs and returns a
-// pointer to the variable data portion.
-//
-
-// (rom) cannot be implemented in Delphi
-//function ALERT_VAR_DATA(const p): Pointer;
-
-//
-// Names of standard Microsoft-defined alert events.
-//
-
-const
- ALERT_PRINT_EVENT = WideString('PRINTING');
- {$EXTERNALSYM ALERT_PRINT_EVENT}
- ALERT_MESSAGE_EVENT = WideString('MESSAGE');
- {$EXTERNALSYM ALERT_MESSAGE_EVENT}
- ALERT_ERRORLOG_EVENT = WideString('ERRORLOG');
- {$EXTERNALSYM ALERT_ERRORLOG_EVENT}
- ALERT_ADMIN_EVENT = WideString('ADMIN');
- {$EXTERNALSYM ALERT_ADMIN_EVENT}
- ALERT_USER_EVENT = WideString('USER');
- {$EXTERNALSYM ALERT_USER_EVENT}
-
-//
-// Bitmap masks for prjob_status field of PRINTJOB.
-//
-
-// 2-7 bits also used in device status
-
- PRJOB_QSTATUS = $3; // Bits 0,1
- {$EXTERNALSYM PRJOB_QSTATUS}
- PRJOB_DEVSTATUS = $1fc; // 2-8 bits
- {$EXTERNALSYM PRJOB_DEVSTATUS}
- PRJOB_COMPLETE = $4; // Bit 2
- {$EXTERNALSYM PRJOB_COMPLETE}
- PRJOB_INTERV = $8; // Bit 3
- {$EXTERNALSYM PRJOB_INTERV}
- PRJOB_ERROR = $10; // Bit 4
- {$EXTERNALSYM PRJOB_ERROR}
- PRJOB_DESTOFFLINE = $20; // Bit 5
- {$EXTERNALSYM PRJOB_DESTOFFLINE}
- PRJOB_DESTPAUSED = $40; // Bit 6
- {$EXTERNALSYM PRJOB_DESTPAUSED}
- PRJOB_NOTIFY = $80; // BIT 7
- {$EXTERNALSYM PRJOB_NOTIFY}
- PRJOB_DESTNOPAPER = $100; // BIT 8
- {$EXTERNALSYM PRJOB_DESTNOPAPER}
- PRJOB_DELETED = $8000; // BIT 15
- {$EXTERNALSYM PRJOB_DELETED}
-
-//
-// Values of PRJOB_QSTATUS bits in prjob_status field of PRINTJOB.
-//
-
- PRJOB_QS_QUEUED = 0;
- {$EXTERNALSYM PRJOB_QS_QUEUED}
- PRJOB_QS_PAUSED = 1;
- {$EXTERNALSYM PRJOB_QS_PAUSED}
- PRJOB_QS_SPOOLING = 2;
- {$EXTERNALSYM PRJOB_QS_SPOOLING}
- PRJOB_QS_PRINTING = 3;
- {$EXTERNALSYM PRJOB_QS_PRINTING}
-
-implementation
-
-function ALERT_OTHER_INFO(x: Pointer): Pointer;
-begin
- Result := Pointer(PChar(x) + SizeOf(STD_ALERT));
-end;
-
-{$IFDEF DYNAMIC_LINK}
-
-var
- _NetAlertRaise: Pointer;
-
-function NetAlertRaise;
-begin
- GetProcedureAddress(_NetAlertRaise, netapi32, 'NetAlertRaise');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetAlertRaise]
- end;
-end;
-
-var
- _NetAlertRaiseEx: Pointer;
-
-function NetAlertRaiseEx;
-begin
- GetProcedureAddress(_NetAlertRaiseEx, netapi32, 'NetAlertRaiseEx');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetAlertRaiseEx]
- end;
-end;
-
-{$ELSE}
-
-function NetAlertRaise; external netapi32 name 'NetAlertRaise';
-function NetAlertRaiseEx; external netapi32 name 'NetAlertRaiseEx';
-
-{$ENDIF DYNAMIC_LINK}
-
-end.
+{******************************************************************************}
+{ }
+{ Lan Manager Alterter API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: lmalert.h, released November 2001. The original Pascal }
+{ code is: LmAlert.pas, released Februari 2002. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwalmalert.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaLmAlert;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "lmalert.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaLmCons, JwaWinType;
+
+//
+// Function Prototypes
+//
+
+function NetAlertRaise(AlertEventName: LPCWSTR; Buffer: LPVOID; BufferSize: DWORD): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetAlertRaise}
+
+function NetAlertRaiseEx(AlertEventName: LPCWSTR; VariableInfo: LPVOID; VariableInfoSize: DWORD; ServiceName: LPCWSTR): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetAlertRaiseEx}
+
+//
+// Data Structures
+//
+
+type
+ _STD_ALERT = record
+ alrt_timestamp: DWORD;
+ alrt_eventname: array [0..EVLEN] of WCHAR;
+ alrt_servicename: array [0..SNLEN] of WCHAR;
+ end;
+ {$EXTERNALSYM _STD_ALERT}
+ STD_ALERT = _STD_ALERT;
+ {$EXTERNALSYM STD_ALERT}
+ PSTD_ALERT = ^STD_ALERT;
+ {$EXTERNALSYM PSTD_ALERT}
+ LPSTD_ALERT = ^STD_ALERT;
+ {$EXTERNALSYM LPSTD_ALERT}
+ TStdAlert = STD_ALERT;
+ PStdAlert = PSTD_ALERT;
+
+ _ADMIN_OTHER_INFO = record
+ alrtad_errcode: DWORD;
+ alrtad_numstrings: DWORD;
+ end;
+ {$EXTERNALSYM _ADMIN_OTHER_INFO}
+ ADMIN_OTHER_INFO = _ADMIN_OTHER_INFO;
+ {$EXTERNALSYM ADMIN_OTHER_INFO}
+ PADMIN_OTHER_INFO = ^ADMIN_OTHER_INFO;
+ {$EXTERNALSYM PADMIN_OTHER_INFO}
+ LPADMIN_OTHER_INFO = ^ADMIN_OTHER_INFO;
+ {$EXTERNALSYM LPADMIN_OTHER_INFO}
+ TAdminOtherInfo = ADMIN_OTHER_INFO;
+ PAdminOtherInfo = PADMIN_OTHER_INFO;
+
+ _ERRLOG_OTHER_INFO = record
+ alrter_errcode: DWORD;
+ alrter_offset: DWORD;
+ end;
+ {$EXTERNALSYM _ERRLOG_OTHER_INFO}
+ ERRLOG_OTHER_INFO = _ERRLOG_OTHER_INFO;
+ {$EXTERNALSYM ERRLOG_OTHER_INFO}
+ PERRLOG_OTHER_INFO = ^ERRLOG_OTHER_INFO;
+ {$EXTERNALSYM PERRLOG_OTHER_INFO}
+ LPERRLOG_OTHER_INFO = ^ERRLOG_OTHER_INFO;
+ {$EXTERNALSYM LPERRLOG_OTHER_INFO}
+ TErrlogOtherInfo = ERRLOG_OTHER_INFO;
+ PErrlogOtherInfo = PERRLOG_OTHER_INFO;
+
+ _PRINT_OTHER_INFO = record
+ alrtpr_jobid: DWORD;
+ alrtpr_status: DWORD;
+ alrtpr_submitted: DWORD;
+ alrtpr_size: DWORD;
+ end;
+ {$EXTERNALSYM _PRINT_OTHER_INFO}
+ PRINT_OTHER_INFO = _PRINT_OTHER_INFO;
+ {$EXTERNALSYM PRINT_OTHER_INFO}
+ PPRINT_OTHER_INFO = ^PRINT_OTHER_INFO;
+ {$EXTERNALSYM PPRINT_OTHER_INFO}
+ LPPRINT_OTHER_INFO = ^PRINT_OTHER_INFO;
+ {$EXTERNALSYM LPPRINT_OTHER_INFO}
+ TPrintOtherInfo = PRINT_OTHER_INFO;
+ PPrintOtherInfo = PPRINT_OTHER_INFO;
+
+ _USER_OTHER_INFO = record
+ alrtus_errcode: DWORD;
+ alrtus_numstrings: DWORD;
+ end;
+ {$EXTERNALSYM _USER_OTHER_INFO}
+ USER_OTHER_INFO = _USER_OTHER_INFO;
+ {$EXTERNALSYM USER_OTHER_INFO}
+ PUSER_OTHER_INFO = ^USER_OTHER_INFO;
+ {$EXTERNALSYM PUSER_OTHER_INFO}
+ LPUSER_OTHER_INFO = ^USER_OTHER_INFO;
+ {$EXTERNALSYM LPUSER_OTHER_INFO}
+ TUserOtherInfo = USER_OTHER_INFO;
+ PUserOtherInfo = PUSER_OTHER_INFO;
+
+//
+// Special Values and Constants
+//
+
+//
+// Name of mailslot to send alert notifications
+//
+
+const
+ ALERTER_MAILSLOT = WideString('\\.\MAILSLOT\Alerter');
+ {$EXTERNALSYM ALERTER_MAILSLOT}
+
+//
+// The following macro gives a pointer to the other_info data.
+// It takes an alert structure and returns a pointer to structure
+// beyond the standard portion.
+//
+
+function ALERT_OTHER_INFO(x: Pointer): Pointer;
+{$EXTERNALSYM ALERT_OTHER_INFO}
+
+//
+// The following macro gives a pointer to the variable-length data.
+// It takes a pointer to one of the other-info structs and returns a
+// pointer to the variable data portion.
+//
+
+// (rom) cannot be implemented in Delphi
+//function ALERT_VAR_DATA(const p): Pointer;
+
+//
+// Names of standard Microsoft-defined alert events.
+//
+
+const
+ ALERT_PRINT_EVENT = WideString('PRINTING');
+ {$EXTERNALSYM ALERT_PRINT_EVENT}
+ ALERT_MESSAGE_EVENT = WideString('MESSAGE');
+ {$EXTERNALSYM ALERT_MESSAGE_EVENT}
+ ALERT_ERRORLOG_EVENT = WideString('ERRORLOG');
+ {$EXTERNALSYM ALERT_ERRORLOG_EVENT}
+ ALERT_ADMIN_EVENT = WideString('ADMIN');
+ {$EXTERNALSYM ALERT_ADMIN_EVENT}
+ ALERT_USER_EVENT = WideString('USER');
+ {$EXTERNALSYM ALERT_USER_EVENT}
+
+//
+// Bitmap masks for prjob_status field of PRINTJOB.
+//
+
+// 2-7 bits also used in device status
+
+ PRJOB_QSTATUS = $3; // Bits 0,1
+ {$EXTERNALSYM PRJOB_QSTATUS}
+ PRJOB_DEVSTATUS = $1fc; // 2-8 bits
+ {$EXTERNALSYM PRJOB_DEVSTATUS}
+ PRJOB_COMPLETE = $4; // Bit 2
+ {$EXTERNALSYM PRJOB_COMPLETE}
+ PRJOB_INTERV = $8; // Bit 3
+ {$EXTERNALSYM PRJOB_INTERV}
+ PRJOB_ERROR = $10; // Bit 4
+ {$EXTERNALSYM PRJOB_ERROR}
+ PRJOB_DESTOFFLINE = $20; // Bit 5
+ {$EXTERNALSYM PRJOB_DESTOFFLINE}
+ PRJOB_DESTPAUSED = $40; // Bit 6
+ {$EXTERNALSYM PRJOB_DESTPAUSED}
+ PRJOB_NOTIFY = $80; // BIT 7
+ {$EXTERNALSYM PRJOB_NOTIFY}
+ PRJOB_DESTNOPAPER = $100; // BIT 8
+ {$EXTERNALSYM PRJOB_DESTNOPAPER}
+ PRJOB_DELETED = $8000; // BIT 15
+ {$EXTERNALSYM PRJOB_DELETED}
+
+//
+// Values of PRJOB_QSTATUS bits in prjob_status field of PRINTJOB.
+//
+
+ PRJOB_QS_QUEUED = 0;
+ {$EXTERNALSYM PRJOB_QS_QUEUED}
+ PRJOB_QS_PAUSED = 1;
+ {$EXTERNALSYM PRJOB_QS_PAUSED}
+ PRJOB_QS_SPOOLING = 2;
+ {$EXTERNALSYM PRJOB_QS_SPOOLING}
+ PRJOB_QS_PRINTING = 3;
+ {$EXTERNALSYM PRJOB_QS_PRINTING}
+
+implementation
+
+function ALERT_OTHER_INFO(x: Pointer): Pointer;
+begin
+ Result := Pointer(PChar(x) + SizeOf(STD_ALERT));
+end;
+
+{$IFDEF DYNAMIC_LINK}
+
+var
+ _NetAlertRaise: Pointer;
+
+function NetAlertRaise;
+begin
+ GetProcedureAddress(_NetAlertRaise, netapi32, 'NetAlertRaise');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetAlertRaise]
+ end;
+end;
+
+var
+ _NetAlertRaiseEx: Pointer;
+
+function NetAlertRaiseEx;
+begin
+ GetProcedureAddress(_NetAlertRaiseEx, netapi32, 'NetAlertRaiseEx');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetAlertRaiseEx]
+ end;
+end;
+
+{$ELSE}
+
+function NetAlertRaise; external netapi32 name 'NetAlertRaise';
+function NetAlertRaiseEx; external netapi32 name 'NetAlertRaiseEx';
+
+{$ENDIF DYNAMIC_LINK}
+
+end.
diff --git a/packages/extra/winunits/jwalmapibuf.pas b/packages/extra/winunits/jwalmapibuf.pas
index 3c85d06ed2..5f7f1ae113 100644
--- a/packages/extra/winunits/jwalmapibuf.pas
+++ b/packages/extra/winunits/jwalmapibuf.pas
@@ -1,160 +1,160 @@
-{******************************************************************************}
-{ }
-{ Lan Manager Buffer API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: lmapibuf.h, released November 2001. The original }
-{ Pascal code is: LmApiBuf.pas, released Februari 2002. The initial developer }
-{ of the Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwalmapibuf.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaLmApiBuf;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "lmapibuf.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaLmCons, JwaWinType;
-
-//
-// Function Prototypes
-//
-
-function NetApiBufferAllocate(ByteCount: DWORD; var Buffer: LPVOID): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetApiBufferAllocate}
-function NetApiBufferFree(Buffer: LPVOID): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetApiBufferFree}
-function NetApiBufferReallocate(OldBuffer: LPVOID; NewByteCount: DWORD; var NewBuffer: LPVOID): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetApiBufferReallocate}
-function NetApiBufferSize(Buffer: LPVOID; var ByteCount: DWORD): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetApiBufferSize}
-
-//
-// The following private function will go away eventually.
-// Call NetApiBufferAllocate instead.
-//
-
-function NetapipBufferAllocate(ByteCount: DWORD; var Buffer: LPVOID): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetapipBufferAllocate}
-
-implementation
-
-{$IFDEF DYNAMIC_LINK}
-
-var
- _NetApiBufferAllocate: Pointer;
-
-function NetApiBufferAllocate;
-begin
- GetProcedureAddress(_NetApiBufferAllocate, netapi32, 'NetApiBufferAllocate');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetApiBufferAllocate]
- end;
-end;
-
-var
- _NetApiBufferFree: Pointer;
-
-function NetApiBufferFree;
-begin
- GetProcedureAddress(_NetApiBufferFree, netapi32, 'NetApiBufferFree');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetApiBufferFree]
- end;
-end;
-
-var
- _NetApiBufferReallocate: Pointer;
-
-function NetApiBufferReallocate;
-begin
- GetProcedureAddress(_NetApiBufferReallocate, netapi32, 'NetApiBufferReallocate');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetApiBufferReallocate]
- end;
-end;
-
-var
- _NetApiBufferSize: Pointer;
-
-function NetApiBufferSize;
-begin
- GetProcedureAddress(_NetApiBufferSize, netapi32, 'NetApiBufferSize');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetApiBufferSize]
- end;
-end;
-
-var
- _NetapipBufferAllocate: Pointer;
-
-function NetapipBufferAllocate;
-begin
- GetProcedureAddress(_NetapipBufferAllocate, netapi32, 'NetapipBufferAllocate');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetapipBufferAllocate]
- end;
-end;
-
-{$ELSE}
-
-function NetApiBufferAllocate; external netapi32 name 'NetApiBufferAllocate';
-function NetApiBufferFree; external netapi32 name 'NetApiBufferFree';
-function NetApiBufferReallocate; external netapi32 name 'NetApiBufferReallocate';
-function NetApiBufferSize; external netapi32 name 'NetApiBufferSize';
-function NetapipBufferAllocate; external netapi32 name 'NetapipBufferAllocate';
-
-{$ENDIF DYNAMIC_LINK}
-
-end.
+{******************************************************************************}
+{ }
+{ Lan Manager Buffer API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: lmapibuf.h, released November 2001. The original }
+{ Pascal code is: LmApiBuf.pas, released Februari 2002. The initial developer }
+{ of the Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwalmapibuf.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaLmApiBuf;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "lmapibuf.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaLmCons, JwaWinType;
+
+//
+// Function Prototypes
+//
+
+function NetApiBufferAllocate(ByteCount: DWORD; var Buffer: LPVOID): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetApiBufferAllocate}
+function NetApiBufferFree(Buffer: LPVOID): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetApiBufferFree}
+function NetApiBufferReallocate(OldBuffer: LPVOID; NewByteCount: DWORD; var NewBuffer: LPVOID): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetApiBufferReallocate}
+function NetApiBufferSize(Buffer: LPVOID; var ByteCount: DWORD): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetApiBufferSize}
+
+//
+// The following private function will go away eventually.
+// Call NetApiBufferAllocate instead.
+//
+
+function NetapipBufferAllocate(ByteCount: DWORD; var Buffer: LPVOID): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetapipBufferAllocate}
+
+implementation
+
+{$IFDEF DYNAMIC_LINK}
+
+var
+ _NetApiBufferAllocate: Pointer;
+
+function NetApiBufferAllocate;
+begin
+ GetProcedureAddress(_NetApiBufferAllocate, netapi32, 'NetApiBufferAllocate');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetApiBufferAllocate]
+ end;
+end;
+
+var
+ _NetApiBufferFree: Pointer;
+
+function NetApiBufferFree;
+begin
+ GetProcedureAddress(_NetApiBufferFree, netapi32, 'NetApiBufferFree');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetApiBufferFree]
+ end;
+end;
+
+var
+ _NetApiBufferReallocate: Pointer;
+
+function NetApiBufferReallocate;
+begin
+ GetProcedureAddress(_NetApiBufferReallocate, netapi32, 'NetApiBufferReallocate');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetApiBufferReallocate]
+ end;
+end;
+
+var
+ _NetApiBufferSize: Pointer;
+
+function NetApiBufferSize;
+begin
+ GetProcedureAddress(_NetApiBufferSize, netapi32, 'NetApiBufferSize');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetApiBufferSize]
+ end;
+end;
+
+var
+ _NetapipBufferAllocate: Pointer;
+
+function NetapipBufferAllocate;
+begin
+ GetProcedureAddress(_NetapipBufferAllocate, netapi32, 'NetapipBufferAllocate');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetapipBufferAllocate]
+ end;
+end;
+
+{$ELSE}
+
+function NetApiBufferAllocate; external netapi32 name 'NetApiBufferAllocate';
+function NetApiBufferFree; external netapi32 name 'NetApiBufferFree';
+function NetApiBufferReallocate; external netapi32 name 'NetApiBufferReallocate';
+function NetApiBufferSize; external netapi32 name 'NetApiBufferSize';
+function NetapipBufferAllocate; external netapi32 name 'NetapipBufferAllocate';
+
+{$ENDIF DYNAMIC_LINK}
+
+end.
diff --git a/packages/extra/winunits/jwalmat.pas b/packages/extra/winunits/jwalmat.pas
index 3294356164..7aacca2189 100644
--- a/packages/extra/winunits/jwalmat.pas
+++ b/packages/extra/winunits/jwalmat.pas
@@ -1,225 +1,225 @@
-{******************************************************************************}
-{ }
-{ Lan Manager Scheduler API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: lmat.h, released November 2001. The original Pascal }
-{ code is: LmAt.pas, released Februari 2002. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwalmat.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaLmAt;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "lmat.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaLmCons, JwaWinType;
-
-//
-// The following bits are used with Flags field in structures below.
-//
-
-//
-// Do we exec programs for this job periodically (/EVERY switch)
-// or one time (/NEXT switch).
-//
-
-const
- JOB_RUN_PERIODICALLY = $01; // set if EVERY
- {$EXTERNALSYM JOB_RUN_PERIODICALLY}
-
-//
-// Was there an error last time we tried to exec a program on behalf of
-// this job.
-// This flag is meaningfull on output only!
-//
-
- JOB_EXEC_ERROR = $02; // set if error
- {$EXTERNALSYM JOB_EXEC_ERROR}
-
-//
-// Will this job run today or tomorrow.
-// This flag is meaningfull on output only!
-//
-
- JOB_RUNS_TODAY = $04; // set if today
- {$EXTERNALSYM JOB_RUNS_TODAY}
-
-//
-// Add current day of the month to DaysOfMonth input.
-// This flag is meaningfull on input only!
-//
-
- JOB_ADD_CURRENT_DATE = $08; // set if to add current date
- {$EXTERNALSYM JOB_ADD_CURRENT_DATE}
-
-//
-// Will this job be run interactively or not. Windows NT 3.1 do not
-// know about this bit, i.e. they submit interactive jobs only.
-//
-
- JOB_NONINTERACTIVE = $10; // set for noninteractive
- {$EXTERNALSYM JOB_NONINTERACTIVE}
-
- JOB_INPUT_FLAGS = JOB_RUN_PERIODICALLY or JOB_ADD_CURRENT_DATE or JOB_NONINTERACTIVE;
- {$EXTERNALSYM JOB_INPUT_FLAGS}
-
- JOB_OUTPUT_FLAGS = JOB_RUN_PERIODICALLY or JOB_EXEC_ERROR or JOB_RUNS_TODAY or JOB_NONINTERACTIVE;
- {$EXTERNALSYM JOB_OUTPUT_FLAGS}
-
-type
- _AT_INFO = record
- JobTime: DWORD_PTR;
- DaysOfMonth: DWORD;
- DaysOfWeek: UCHAR;
- Flags: UCHAR;
- Command: LPWSTR;
- end;
- {$EXTERNALSYM _AT_INFO}
- AT_INFO = _AT_INFO;
- {$EXTERNALSYM AT_INFO}
- PAT_INFO = ^AT_INFO;
- {$EXTERNALSYM PAT_INFO}
- LPAT_INFO = ^AT_INFO;
- {$EXTERNALSYM LPAT_INFO}
- TAtInfo = AT_INFO;
- PAtInfo = PAT_INFO;
-
- _AT_ENUM = record
- JobId: DWORD;
- JobTime: DWORD_PTR;
- DaysOfMonth: DWORD;
- DaysOfWeek: UCHAR;
- Flags: UCHAR;
- Command: LPWSTR;
- end;
- {$EXTERNALSYM _AT_ENUM}
- AT_ENUM = _AT_ENUM;
- {$EXTERNALSYM AT_ENUM}
- PAT_ENUM = ^AT_ENUM;
- {$EXTERNALSYM PAT_ENUM}
- LPAT_ENUM = ^AT_ENUM;
- {$EXTERNALSYM LPAT_ENUM}
- TAtEnum = AT_ENUM;
- PAtEnum = PAT_ENUM;
-
-function NetScheduleJobAdd(Servername: LPCWSTR; Buffer: LPBYTE; JobId: LPDWORD): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetScheduleJobAdd}
-
-function NetScheduleJobDel(Servername: LPCWSTR; MinJobId, MaxJobId: DWORD): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetScheduleJobDel}
-
-function NetScheduleJobEnum(Servername: LPCWSTR; var PointerToBuffer: LPBYTE; PrefferedMaximumLength: DWORD; EntriesRead, TotalEntries, ResumeHandle: LPDWORD): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetScheduleJobEnum}
-
-function NetScheduleJobGetInfo(Servername: LPCWSTR; JobId: DWORD; var PointerToBuffer: LPBYTE): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetScheduleJobGetInfo}
-
-implementation
-
-{$IFDEF DYNAMIC_LINK}
-
-var
- _NetScheduleJobAdd: Pointer;
-
-function NetScheduleJobAdd;
-begin
- GetProcedureAddress(_NetScheduleJobAdd, netapi32, 'NetScheduleJobAdd');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetScheduleJobAdd]
- end;
-end;
-
-var
- _NetScheduleJobDel: Pointer;
-
-function NetScheduleJobDel;
-begin
- GetProcedureAddress(_NetScheduleJobDel, netapi32, 'NetScheduleJobDel');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetScheduleJobDel]
- end;
-end;
-
-var
- _NetScheduleJobEnum: Pointer;
-
-function NetScheduleJobEnum;
-begin
- GetProcedureAddress(_NetScheduleJobEnum, netapi32, 'NetScheduleJobEnum');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetScheduleJobEnum]
- end;
-end;
-
-var
- _NetScheduleJobGetInfo: Pointer;
-
-function NetScheduleJobGetInfo;
-begin
- GetProcedureAddress(_NetScheduleJobGetInfo, netapi32, 'NetScheduleJobGetInfo');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetScheduleJobGetInfo]
- end;
-end;
-
-{$ELSE}
-
-function NetScheduleJobAdd; external netapi32 name 'NetScheduleJobAdd';
-function NetScheduleJobDel; external netapi32 name 'NetScheduleJobDel';
-function NetScheduleJobEnum; external netapi32 name 'NetScheduleJobEnum';
-function NetScheduleJobGetInfo; external netapi32 name 'NetScheduleJobGetInfo';
-
-{$ENDIF DYNAMIC_LINK}
-
-end.
+{******************************************************************************}
+{ }
+{ Lan Manager Scheduler API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: lmat.h, released November 2001. The original Pascal }
+{ code is: LmAt.pas, released Februari 2002. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwalmat.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaLmAt;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "lmat.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaLmCons, JwaWinType;
+
+//
+// The following bits are used with Flags field in structures below.
+//
+
+//
+// Do we exec programs for this job periodically (/EVERY switch)
+// or one time (/NEXT switch).
+//
+
+const
+ JOB_RUN_PERIODICALLY = $01; // set if EVERY
+ {$EXTERNALSYM JOB_RUN_PERIODICALLY}
+
+//
+// Was there an error last time we tried to exec a program on behalf of
+// this job.
+// This flag is meaningfull on output only!
+//
+
+ JOB_EXEC_ERROR = $02; // set if error
+ {$EXTERNALSYM JOB_EXEC_ERROR}
+
+//
+// Will this job run today or tomorrow.
+// This flag is meaningfull on output only!
+//
+
+ JOB_RUNS_TODAY = $04; // set if today
+ {$EXTERNALSYM JOB_RUNS_TODAY}
+
+//
+// Add current day of the month to DaysOfMonth input.
+// This flag is meaningfull on input only!
+//
+
+ JOB_ADD_CURRENT_DATE = $08; // set if to add current date
+ {$EXTERNALSYM JOB_ADD_CURRENT_DATE}
+
+//
+// Will this job be run interactively or not. Windows NT 3.1 do not
+// know about this bit, i.e. they submit interactive jobs only.
+//
+
+ JOB_NONINTERACTIVE = $10; // set for noninteractive
+ {$EXTERNALSYM JOB_NONINTERACTIVE}
+
+ JOB_INPUT_FLAGS = JOB_RUN_PERIODICALLY or JOB_ADD_CURRENT_DATE or JOB_NONINTERACTIVE;
+ {$EXTERNALSYM JOB_INPUT_FLAGS}
+
+ JOB_OUTPUT_FLAGS = JOB_RUN_PERIODICALLY or JOB_EXEC_ERROR or JOB_RUNS_TODAY or JOB_NONINTERACTIVE;
+ {$EXTERNALSYM JOB_OUTPUT_FLAGS}
+
+type
+ _AT_INFO = record
+ JobTime: DWORD_PTR;
+ DaysOfMonth: DWORD;
+ DaysOfWeek: UCHAR;
+ Flags: UCHAR;
+ Command: LPWSTR;
+ end;
+ {$EXTERNALSYM _AT_INFO}
+ AT_INFO = _AT_INFO;
+ {$EXTERNALSYM AT_INFO}
+ PAT_INFO = ^AT_INFO;
+ {$EXTERNALSYM PAT_INFO}
+ LPAT_INFO = ^AT_INFO;
+ {$EXTERNALSYM LPAT_INFO}
+ TAtInfo = AT_INFO;
+ PAtInfo = PAT_INFO;
+
+ _AT_ENUM = record
+ JobId: DWORD;
+ JobTime: DWORD_PTR;
+ DaysOfMonth: DWORD;
+ DaysOfWeek: UCHAR;
+ Flags: UCHAR;
+ Command: LPWSTR;
+ end;
+ {$EXTERNALSYM _AT_ENUM}
+ AT_ENUM = _AT_ENUM;
+ {$EXTERNALSYM AT_ENUM}
+ PAT_ENUM = ^AT_ENUM;
+ {$EXTERNALSYM PAT_ENUM}
+ LPAT_ENUM = ^AT_ENUM;
+ {$EXTERNALSYM LPAT_ENUM}
+ TAtEnum = AT_ENUM;
+ PAtEnum = PAT_ENUM;
+
+function NetScheduleJobAdd(Servername: LPCWSTR; Buffer: LPBYTE; JobId: LPDWORD): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetScheduleJobAdd}
+
+function NetScheduleJobDel(Servername: LPCWSTR; MinJobId, MaxJobId: DWORD): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetScheduleJobDel}
+
+function NetScheduleJobEnum(Servername: LPCWSTR; var PointerToBuffer: LPBYTE; PrefferedMaximumLength: DWORD; EntriesRead, TotalEntries, ResumeHandle: LPDWORD): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetScheduleJobEnum}
+
+function NetScheduleJobGetInfo(Servername: LPCWSTR; JobId: DWORD; var PointerToBuffer: LPBYTE): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetScheduleJobGetInfo}
+
+implementation
+
+{$IFDEF DYNAMIC_LINK}
+
+var
+ _NetScheduleJobAdd: Pointer;
+
+function NetScheduleJobAdd;
+begin
+ GetProcedureAddress(_NetScheduleJobAdd, netapi32, 'NetScheduleJobAdd');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetScheduleJobAdd]
+ end;
+end;
+
+var
+ _NetScheduleJobDel: Pointer;
+
+function NetScheduleJobDel;
+begin
+ GetProcedureAddress(_NetScheduleJobDel, netapi32, 'NetScheduleJobDel');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetScheduleJobDel]
+ end;
+end;
+
+var
+ _NetScheduleJobEnum: Pointer;
+
+function NetScheduleJobEnum;
+begin
+ GetProcedureAddress(_NetScheduleJobEnum, netapi32, 'NetScheduleJobEnum');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetScheduleJobEnum]
+ end;
+end;
+
+var
+ _NetScheduleJobGetInfo: Pointer;
+
+function NetScheduleJobGetInfo;
+begin
+ GetProcedureAddress(_NetScheduleJobGetInfo, netapi32, 'NetScheduleJobGetInfo');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetScheduleJobGetInfo]
+ end;
+end;
+
+{$ELSE}
+
+function NetScheduleJobAdd; external netapi32 name 'NetScheduleJobAdd';
+function NetScheduleJobDel; external netapi32 name 'NetScheduleJobDel';
+function NetScheduleJobEnum; external netapi32 name 'NetScheduleJobEnum';
+function NetScheduleJobGetInfo; external netapi32 name 'NetScheduleJobGetInfo';
+
+{$ENDIF DYNAMIC_LINK}
+
+end.
diff --git a/packages/extra/winunits/jwalmaudit.pas b/packages/extra/winunits/jwalmaudit.pas
index 109e6bbcfb..1bfe618848 100644
--- a/packages/extra/winunits/jwalmaudit.pas
+++ b/packages/extra/winunits/jwalmaudit.pas
@@ -1,722 +1,722 @@
-{******************************************************************************}
-{ }
-{ Lan Manager Audit API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: lmaudit.h, released November 2001. The original Pascal }
-{ code is: LmAudit.pas, released Februari 2002. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwalmaudit.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaLmAudit;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "lmaudit.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaLmCons, JwaWinType;
-
-type
- _HLOG = record
- time: DWORD;
- last_flags: DWORD;
- offset: DWORD;
- rec_offset: DWORD;
- end;
- {$EXTERNALSYM _HLOG}
- HLOG = _HLOG;
- {$EXTERNALSYM HLOG}
- LPHLOG = ^HLOG;
- {$EXTERNALSYM LPHLOG}
- PHLOG = ^HLOG;
- {$EXTERNALSYM PHLOG}
-
-const
- LOGFLAGS_FORWARD = 0;
- {$EXTERNALSYM LOGFLAGS_FORWARD}
- LOGFLAGS_BACKWARD = $1;
- {$EXTERNALSYM LOGFLAGS_BACKWARD}
- LOGFLAGS_SEEK = $2;
- {$EXTERNALSYM LOGFLAGS_SEEK}
-
-//
-// Function Prototypes - Audit
-//
-
-function NetAuditClear(server, backupfile, service: LPCWSTR): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetAuditClear}
-
-function NetAuditRead(server, service: LPCWSTR; auditloghandle: LPHLOG; offset: DWORD; reserved1: LPDWORD; reserved2, offsetflag: DWORD; var bufptr: LPBYTE; prefmaxlen: DWORD; bytesread, totalavailable: LPDWORD): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetAuditRead}
-
-function NetAuditWrite(type_: DWORD; buf: LPBYTE; numbytes: DWORD; service: LPCWSTR; reserved: LPBYTE): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetAuditWrite}
-
-//
-// Data Structures - Audit
-//
-
-type
- _AUDIT_ENTRY = record
- ae_len: DWORD;
- ae_reserved: DWORD;
- ae_time: DWORD;
- ae_type: DWORD;
- ae_data_offset: DWORD; // Offset from beginning address of audit_entry
- ae_data_size: DWORD; // byte count of ae_data area (not incl pad).
- end;
- {$EXTERNALSYM _AUDIT_ENTRY}
- AUDIT_ENTRY = _AUDIT_ENTRY;
- {$EXTERNALSYM AUDIT_ENTRY}
- LPAUDIT_ENTRY = ^AUDIT_ENTRY;
- {$EXTERNALSYM LPAUDIT_ENTRY}
- PAUDIT_ENTRY = ^AUDIT_ENTRY;
- {$EXTERNALSYM PAUDIT_ENTRY}
- TAuditEntry = AUDIT_ENTRY;
- PAuditEntry = PAUDIT_ENTRY;
-
-{$DEFINE REVISED_AUDIT_ENTRY_STRUCT}
-
- _AE_SRVSTATUS = record
- ae_sv_status: DWORD;
- end;
- {$EXTERNALSYM _AE_SRVSTATUS}
- //AE_SRVSTATUS = _AE_SRVSTATUS;
- //{$EXTERNALSYM AE_SRVSTATUS}
- LPAE_SRVSTATUS = ^_AE_SRVSTATUS;
- {$EXTERNALSYM LPAE_SRVSTATUS}
- PAE_SRVSTATUS = ^_AE_SRVSTATUS;
- {$EXTERNALSYM PAE_SRVSTATUS}
- TAeSrvStatus = _AE_SRVSTATUS;
- PAeSrvStatus = PAE_SRVSTATUS;
-
- _AE_SESSLOGON = record
- ae_so_compname: DWORD;
- ae_so_username: DWORD;
- ae_so_privilege: DWORD;
- end;
- {$EXTERNALSYM _AE_SESSLOGON}
- //AE_SESSLOGON = _AE_SESSLOGON;
- //{$EXTERNALSYM AE_SESSLOGON}
- LPAE_SESSLOGON = ^_AE_SESSLOGON;
- {$EXTERNALSYM LPAE_SESSLOGON}
- PAE_SESSLOGON = ^_AE_SESSLOGON;
- {$EXTERNALSYM PAE_SESSLOGON}
- TAeSessLogon = _AE_SESSLOGON;
- PAeSessLogon = PAE_SESSLOGON;
-
- _AE_SESSLOGOFF = record
- ae_sf_compname: DWORD;
- ae_sf_username: DWORD;
- ae_sf_reason: DWORD;
- end;
- {$EXTERNALSYM _AE_SESSLOGOFF}
- //AE_SESSLOGOFF = _AE_SESSLOGOFF;
- //{$EXTERNALSYM AE_SESSLOGOFF}
- LPAE_SESSLOGOFF = ^_AE_SESSLOGOFF;
- {$EXTERNALSYM LPAE_SESSLOGOFF}
- PAE_SESSLOGOFF = ^_AE_SESSLOGOFF;
- {$EXTERNALSYM PAE_SESSLOGOFF}
- TAeSessLogoff = _AE_SESSLOGOFF;
- PAeSessLogoff = PAE_SESSLOGOFF;
-
- _AE_SESSPWERR = record
- ae_sp_compname: DWORD;
- ae_sp_username: DWORD;
- end;
- {$EXTERNALSYM _AE_SESSPWERR}
- //AE_SESSPWERR = _AE_SESSPWERR;
- //{$EXTERNALSYM AE_SESSPWERR}
- LPAE_SESSPWERR = ^_AE_SESSPWERR;
- {$EXTERNALSYM LPAE_SESSPWERR}
- PAE_SESSPWERR = ^_AE_SESSPWERR;
- {$EXTERNALSYM PAE_SESSPWERR}
- TAeSessPwerr = _AE_SESSPWERR;
- PAeSessPwerr = PAE_SESSPWERR;
-
- _AE_CONNSTART = record
- ae_ct_compname: DWORD;
- ae_ct_username: DWORD;
- ae_ct_netname: DWORD;
- ae_ct_connid: DWORD;
- end;
- {$EXTERNALSYM _AE_CONNSTART}
- //AE_CONNSTART = _AE_CONNSTART;
- //{$EXTERNALSYM AE_CONNSTART}
- LPAE_CONNSTART = ^_AE_CONNSTART;
- {$EXTERNALSYM LPAE_CONNSTART}
- PAE_CONNSTART = ^_AE_CONNSTART;
- {$EXTERNALSYM PAE_CONNSTART}
- TAeConnStart = _AE_CONNSTART;
- PAeConnStart = PAE_CONNSTART;
-
- _AE_CONNSTOP = record
- ae_cp_compname: DWORD;
- ae_cp_username: DWORD;
- ae_cp_netname: DWORD;
- ae_cp_connid: DWORD;
- ae_cp_reason: DWORD;
- end;
- {$EXTERNALSYM _AE_CONNSTOP}
- //AE_CONNSTOP = _AE_CONNSTOP;
- //{$EXTERNALSYM AE_CONNSTOP}
- LPAE_CONNSTOP = ^_AE_CONNSTOP;
- {$EXTERNALSYM LPAE_CONNSTOP}
- PAE_CONNSTOP = ^_AE_CONNSTOP;
- {$EXTERNALSYM PAE_CONNSTOP}
- TAeConnStop = _AE_CONNSTOP;
- PAeConnStop = PAE_CONNSTOP;
-
- _AE_CONNREJ = record
- ae_cr_compname: DWORD;
- ae_cr_username: DWORD;
- ae_cr_netname: DWORD;
- ae_cr_reason: DWORD;
- end;
- {$EXTERNALSYM _AE_CONNREJ}
- //AE_CONNREJ = _AE_CONNREJ;
- //{$EXTERNALSYM AE_CONNREJ}
- LPAE_CONNREJ = ^_AE_CONNREJ;
- {$EXTERNALSYM LPAE_CONNREJ}
- PAE_CONNREJ = ^_AE_CONNREJ;
- {$EXTERNALSYM PAE_CONNREJ}
- TAeConnRej = _AE_CONNREJ;
- PAeConnRej = PAE_CONNREJ;
-
- _AE_RESACCESS = record
- ae_ra_compname: DWORD;
- ae_ra_username: DWORD;
- ae_ra_resname: DWORD;
- ae_ra_operation: DWORD;
- ae_ra_returncode: DWORD;
- ae_ra_restype: DWORD;
- ae_ra_fileid: DWORD;
- end;
- {$EXTERNALSYM _AE_RESACCESS}
- //AE_RESACCESS = _AE_RESACCESS;
- //{$EXTERNALSYM AE_RESACCESS}
- LPAE_RESACCESS = ^_AE_RESACCESS;
- {$EXTERNALSYM LPAE_RESACCESS}
- PAE_RESACCESS = ^_AE_RESACCESS;
- {$EXTERNALSYM PAE_RESACCESS}
- TAeResAccess = _AE_RESACCESS;
- PAeResAccess = PAE_RESACCESS;
-
- _AE_RESACCESSREJ = record
- ae_rr_compname: DWORD;
- ae_rr_username: DWORD;
- ae_rr_resname: DWORD;
- ae_rr_operation: DWORD;
- end;
- {$EXTERNALSYM _AE_RESACCESSREJ}
- //AE_RESACCESSREJ = _AE_RESACCESSREJ;
- //{$EXTERNALSYM AE_RESACCESSREJ}
- LPAE_RESACCESSREJ = ^_AE_RESACCESSREJ;
- {$EXTERNALSYM LPAE_RESACCESSREJ}
- PAE_RESACCESSREJ = ^_AE_RESACCESSREJ;
- {$EXTERNALSYM PAE_RESACCESSREJ}
- TAeResAccessRej = _AE_RESACCESSREJ;
- PAeResAccessRej = PAE_RESACCESSREJ;
-
- _AE_CLOSEFILE = record
- ae_cf_compname: DWORD;
- ae_cf_username: DWORD;
- ae_cf_resname: DWORD;
- ae_cf_fileid: DWORD;
- ae_cf_duration: DWORD;
- ae_cf_reason: DWORD;
- end;
- {$EXTERNALSYM _AE_CLOSEFILE}
- //AE_CLOSEFILE = _AE_CLOSEFILE;
- //{$EXTERNALSYM AE_CLOSEFILE}
- LPAE_CLOSEFILE = ^_AE_CLOSEFILE;
- {$EXTERNALSYM LPAE_CLOSEFILE}
- PAE_CLOSEFILE = ^_AE_CLOSEFILE;
- {$EXTERNALSYM PAE_CLOSEFILE}
- TAeCloseFile = _AE_CLOSEFILE;
- PAeCloseFile = PAE_CLOSEFILE;
-
- _AE_SERVICESTAT = record
- ae_ss_compname: DWORD;
- ae_ss_username: DWORD;
- ae_ss_svcname: DWORD;
- ae_ss_status: DWORD;
- ae_ss_code: DWORD;
- ae_ss_text: DWORD;
- ae_ss_returnval: DWORD;
- end;
- {$EXTERNALSYM _AE_SERVICESTAT}
- //AE_SERVICESTAT = _AE_SERVICESTAT;
- //{$EXTERNALSYM AE_SERVICESTAT}
- LPAE_SERVICESTAT = ^_AE_SERVICESTAT;
- {$EXTERNALSYM LPAE_SERVICESTAT}
- PAE_SERVICESTAT = ^_AE_SERVICESTAT;
- {$EXTERNALSYM PAE_SERVICESTAT}
- TAeServiceStat = _AE_SERVICESTAT;
- PAeServiceStat = PAE_SERVICESTAT;
-
- _AE_ACLMOD = record
- ae_am_compname: DWORD;
- ae_am_username: DWORD;
- ae_am_resname: DWORD;
- ae_am_action: DWORD;
- ae_am_datalen: DWORD;
- end;
- {$EXTERNALSYM _AE_ACLMOD}
- //AE_ACLMOD = _AE_ACLMOD;
- //{$EXTERNALSYM AE_ACLMOD}
- LPAE_ACLMOD = ^_AE_ACLMOD;
- {$EXTERNALSYM LPAE_ACLMOD}
- PAE_ACLMOD = ^_AE_ACLMOD;
- {$EXTERNALSYM PAE_ACLMOD}
- TAeAclMod = _AE_ACLMOD;
- PAeAclMod = PAE_ACLMOD;
-
- _AE_UASMOD = record
- ae_um_compname: DWORD;
- ae_um_username: DWORD;
- ae_um_resname: DWORD;
- ae_um_rectype: DWORD;
- ae_um_action: DWORD;
- ae_um_datalen: DWORD;
- end;
- {$EXTERNALSYM _AE_UASMOD}
- //AE_UASMOD = _AE_UASMOD;
- //{$EXTERNALSYM AE_UASMOD}
- LPAE_UASMOD = ^_AE_UASMOD;
- {$EXTERNALSYM LPAE_UASMOD}
- PAE_UASMOD = ^_AE_UASMOD;
- {$EXTERNALSYM PAE_UASMOD}
- TAeUasMod = _AE_UASMOD;
- PAeUasMod = PAE_UASMOD;
-
- _AE_NETLOGON = record
- ae_no_compname: DWORD;
- ae_no_username: DWORD;
- ae_no_privilege: DWORD;
- ae_no_authflags: DWORD;
- end;
- {$EXTERNALSYM _AE_NETLOGON}
- //AE_NETLOGON = _AE_NETLOGON;
- //{$EXTERNALSYM AE_NETLOGON}
- LPAE_NETLOGON = ^_AE_NETLOGON;
- {$EXTERNALSYM LPAE_NETLOGON}
- PAE_NETLOGON = ^_AE_NETLOGON;
- {$EXTERNALSYM PAE_NETLOGON}
- TAeNetLogon = _AE_NETLOGON;
- PAeNetLogon = PAE_NETLOGON;
-
- _AE_NETLOGOFF = record
- ae_nf_compname: DWORD;
- ae_nf_username: DWORD;
- ae_nf_reserved1: DWORD;
- ae_nf_reserved2: DWORD;
- end;
- {$EXTERNALSYM _AE_NETLOGOFF}
- //AE_NETLOGOFF = _AE_NETLOGOFF;
- //{$EXTERNALSYM AE_NETLOGOFF}
- LPAE_NETLOGOFF = ^_AE_NETLOGOFF;
- {$EXTERNALSYM LPAE_NETLOGOFF}
- PAE_NETLOGOFF = ^_AE_NETLOGOFF;
- {$EXTERNALSYM PAE_NETLOGOFF}
- TAeNetLogoff = _AE_NETLOGOFF;
- PAeNetLogoff = PAE_NETLOGOFF;
-
- _AE_ACCLIM = record
- ae_al_compname: DWORD;
- ae_al_username: DWORD;
- ae_al_resname: DWORD;
- ae_al_limit: DWORD;
- end;
- {$EXTERNALSYM _AE_ACCLIM}
- //AE_ACCLIM = _AE_ACCLIM;
- //{$EXTERNALSYM AE_ACCLIM}
- LPAE_ACCLIM = ^_AE_ACCLIM;
- {$EXTERNALSYM LPAE_ACCLIM}
- PAE_ACCLIM = ^_AE_ACCLIM;
- {$EXTERNALSYM PAE_ACCLIM}
- TAeAccLim = _AE_ACCLIM;
- PAeAccLim = PAE_ACCLIM;
-
-const
- ACTION_LOCKOUT = 0;
- {$EXTERNALSYM ACTION_LOCKOUT}
- ACTION_ADMINUNLOCK = 1;
- {$EXTERNALSYM ACTION_ADMINUNLOCK}
-
-type
- _AE_LOCKOUT = record
- ae_lk_compname: DWORD; // Ptr to computername of client.
- ae_lk_username: DWORD; // Ptr to username of client (NULL
- // if same as computername).
- ae_lk_action: DWORD; // Action taken on account:
- // 0 means locked out, 1 means not.
- ae_lk_bad_pw_count: DWORD; // Bad password count at the time
- // of lockout.
- end;
- {$EXTERNALSYM _AE_LOCKOUT}
- //AE_LOCKOUT = _AE_LOCKOUT;
- //{$EXTERNALSYM AE_LOCKOUT}
- LPAE_LOCKOUT = ^_AE_LOCKOUT;
- {$EXTERNALSYM LPAE_LOCKOUT}
- PAE_LOCKOUT = ^_AE_LOCKOUT;
- {$EXTERNALSYM PAE_LOCKOUT}
- TAeLockout = _AE_LOCKOUT;
- PAeLockout = PAE_LOCKOUT;
-
- _AE_GENERIC = record
- ae_ge_msgfile: DWORD;
- ae_ge_msgnum: DWORD;
- ae_ge_params: DWORD;
- ae_ge_param1: DWORD;
- ae_ge_param2: DWORD;
- ae_ge_param3: DWORD;
- ae_ge_param4: DWORD;
- ae_ge_param5: DWORD;
- ae_ge_param6: DWORD;
- ae_ge_param7: DWORD;
- ae_ge_param8: DWORD;
- ae_ge_param9: DWORD;
- end;
- {$EXTERNALSYM _AE_GENERIC}
- //AE_GENERIC = _AE_GENERIC;
- //{$EXTERNALSYM AE_GENERIC}
- LPAE_GENERIC = ^_AE_GENERIC;
- {$EXTERNALSYM LPAE_GENERIC}
- PAE_GENERIC = ^_AE_GENERIC;
- {$EXTERNALSYM PAE_GENERIC}
- TAeGeneric = _AE_GENERIC;
- PAeGeneric = PAE_GENERIC;
-
-//
-// Special Values and Constants - Audit
-//
-
-//
-// Audit entry types (field ae_type in audit_entry).
-//
-
-const
- AE_SRVSTATUS = 0;
- {$EXTERNALSYM AE_SRVSTATUS}
- AE_SESSLOGON = 1;
- {$EXTERNALSYM AE_SESSLOGON}
- AE_SESSLOGOFF = 2;
- {$EXTERNALSYM AE_SESSLOGOFF}
- AE_SESSPWERR = 3;
- {$EXTERNALSYM AE_SESSPWERR}
- AE_CONNSTART = 4;
- {$EXTERNALSYM AE_CONNSTART}
- AE_CONNSTOP = 5;
- {$EXTERNALSYM AE_CONNSTOP}
- AE_CONNREJ = 6;
- {$EXTERNALSYM AE_CONNREJ}
- AE_RESACCESS = 7;
- {$EXTERNALSYM AE_RESACCESS}
- AE_RESACCESSREJ = 8;
- {$EXTERNALSYM AE_RESACCESSREJ}
- AE_CLOSEFILE = 9;
- {$EXTERNALSYM AE_CLOSEFILE}
- AE_SERVICESTAT = 11;
- {$EXTERNALSYM AE_SERVICESTAT}
- AE_ACLMOD = 12;
- {$EXTERNALSYM AE_ACLMOD}
- AE_UASMOD = 13;
- {$EXTERNALSYM AE_UASMOD}
- AE_NETLOGON = 14;
- {$EXTERNALSYM AE_NETLOGON}
- AE_NETLOGOFF = 15;
- {$EXTERNALSYM AE_NETLOGOFF}
- AE_NETLOGDENIED = 16;
- {$EXTERNALSYM AE_NETLOGDENIED}
- AE_ACCLIMITEXCD = 17;
- {$EXTERNALSYM AE_ACCLIMITEXCD}
- AE_RESACCESS2 = 18;
- {$EXTERNALSYM AE_RESACCESS2}
- AE_ACLMODFAIL = 19;
- {$EXTERNALSYM AE_ACLMODFAIL}
- AE_LOCKOUT = 20;
- {$EXTERNALSYM AE_LOCKOUT}
- AE_GENERIC_TYPE = 21;
- {$EXTERNALSYM AE_GENERIC_TYPE}
-
-//
-// Values for ae_ss_status field of ae_srvstatus.
-//
-
- AE_SRVSTART = 0;
- {$EXTERNALSYM AE_SRVSTART}
- AE_SRVPAUSED = 1;
- {$EXTERNALSYM AE_SRVPAUSED}
- AE_SRVCONT = 2;
- {$EXTERNALSYM AE_SRVCONT}
- AE_SRVSTOP = 3;
- {$EXTERNALSYM AE_SRVSTOP}
-
-//
-// Values for ae_so_privilege field of ae_sesslogon.
-//
-
- AE_GUEST = 0;
- {$EXTERNALSYM AE_GUEST}
- AE_USER = 1;
- {$EXTERNALSYM AE_USER}
- AE_ADMIN = 2;
- {$EXTERNALSYM AE_ADMIN}
-
-//
-// Values for various ae_XX_reason fields.
-//
-
- AE_NORMAL = 0;
- {$EXTERNALSYM AE_NORMAL}
- AE_USERLIMIT = 0;
- {$EXTERNALSYM AE_USERLIMIT}
- AE_GENERAL = 0;
- {$EXTERNALSYM AE_GENERAL}
- AE_ERROR = 1;
- {$EXTERNALSYM AE_ERROR}
- AE_SESSDIS = 1;
- {$EXTERNALSYM AE_SESSDIS}
- AE_BADPW = 1;
- {$EXTERNALSYM AE_BADPW}
- AE_AUTODIS = 2;
- {$EXTERNALSYM AE_AUTODIS}
- AE_UNSHARE = 2;
- {$EXTERNALSYM AE_UNSHARE}
- AE_ADMINPRIVREQD = 2;
- {$EXTERNALSYM AE_ADMINPRIVREQD}
- AE_ADMINDIS = 3;
- {$EXTERNALSYM AE_ADMINDIS}
- AE_NOACCESSPERM = 3;
- {$EXTERNALSYM AE_NOACCESSPERM}
- AE_ACCRESTRICT = 4;
- {$EXTERNALSYM AE_ACCRESTRICT}
-
- AE_NORMAL_CLOSE = 0;
- {$EXTERNALSYM AE_NORMAL_CLOSE}
- AE_SES_CLOSE = 1;
- {$EXTERNALSYM AE_SES_CLOSE}
- AE_ADMIN_CLOSE = 2;
- {$EXTERNALSYM AE_ADMIN_CLOSE}
-
-//
-// Values for xx_subreason fields.
-//
-
- AE_LIM_UNKNOWN = 0;
- {$EXTERNALSYM AE_LIM_UNKNOWN}
- AE_LIM_LOGONHOURS = 1;
- {$EXTERNALSYM AE_LIM_LOGONHOURS}
- AE_LIM_EXPIRED = 2;
- {$EXTERNALSYM AE_LIM_EXPIRED}
- AE_LIM_INVAL_WKSTA = 3;
- {$EXTERNALSYM AE_LIM_INVAL_WKSTA}
- AE_LIM_DISABLED = 4;
- {$EXTERNALSYM AE_LIM_DISABLED}
- AE_LIM_DELETED = 5;
- {$EXTERNALSYM AE_LIM_DELETED}
-
-//
-// Values for xx_action fields
-//
-
- AE_MOD = 0;
- {$EXTERNALSYM AE_MOD}
- AE_DELETE = 1;
- {$EXTERNALSYM AE_DELETE}
- AE_ADD = 2;
- {$EXTERNALSYM AE_ADD}
-
-//
-// Types of UAS record for um_rectype field
-//
-
- AE_UAS_USER = 0;
- {$EXTERNALSYM AE_UAS_USER}
- AE_UAS_GROUP = 1;
- {$EXTERNALSYM AE_UAS_GROUP}
- AE_UAS_MODALS = 2;
- {$EXTERNALSYM AE_UAS_MODALS}
-
-//
-// Bitmasks for auditing events
-//
-// The parentheses around the hex constants broke h_to_inc
-// and have been purged from the face of the earth.
-//
-
- SVAUD_SERVICE = $1;
- {$EXTERNALSYM SVAUD_SERVICE}
- SVAUD_GOODSESSLOGON = $6;
- {$EXTERNALSYM SVAUD_GOODSESSLOGON}
- SVAUD_BADSESSLOGON = $18;
- {$EXTERNALSYM SVAUD_BADSESSLOGON}
- SVAUD_SESSLOGON = SVAUD_GOODSESSLOGON or SVAUD_BADSESSLOGON;
- {$EXTERNALSYM SVAUD_SESSLOGON}
- SVAUD_GOODNETLOGON = $60;
- {$EXTERNALSYM SVAUD_GOODNETLOGON}
- SVAUD_BADNETLOGON = $180;
- {$EXTERNALSYM SVAUD_BADNETLOGON}
- SVAUD_NETLOGON = SVAUD_GOODNETLOGON or SVAUD_BADNETLOGON;
- {$EXTERNALSYM SVAUD_NETLOGON}
- SVAUD_LOGON = SVAUD_NETLOGON or SVAUD_SESSLOGON;
- {$EXTERNALSYM SVAUD_LOGON}
- SVAUD_GOODUSE = $600;
- {$EXTERNALSYM SVAUD_GOODUSE}
- SVAUD_BADUSE = $1800;
- {$EXTERNALSYM SVAUD_BADUSE}
- SVAUD_USE = SVAUD_GOODUSE or SVAUD_BADUSE;
- {$EXTERNALSYM SVAUD_USE}
- SVAUD_USERLIST = $2000;
- {$EXTERNALSYM SVAUD_USERLIST}
- SVAUD_PERMISSIONS = $4000;
- {$EXTERNALSYM SVAUD_PERMISSIONS}
- SVAUD_RESOURCE = $8000;
- {$EXTERNALSYM SVAUD_RESOURCE}
- SVAUD_LOGONLIM = $00010000;
- {$EXTERNALSYM SVAUD_LOGONLIM}
-
-//
-// Resource access audit bitmasks.
-//
-
- AA_AUDIT_ALL = $0001;
- {$EXTERNALSYM AA_AUDIT_ALL}
- AA_A_OWNER = $0004;
- {$EXTERNALSYM AA_A_OWNER}
- AA_CLOSE = $0008;
- {$EXTERNALSYM AA_CLOSE}
- AA_S_OPEN = $0010;
- {$EXTERNALSYM AA_S_OPEN}
- AA_S_WRITE = $0020;
- {$EXTERNALSYM AA_S_WRITE}
- AA_S_CREATE = $0020;
- {$EXTERNALSYM AA_S_CREATE}
- AA_S_DELETE = $0040;
- {$EXTERNALSYM AA_S_DELETE}
- AA_S_ACL = $0080;
- {$EXTERNALSYM AA_S_ACL}
- AA_S_ALL = AA_S_OPEN or AA_S_WRITE or AA_S_DELETE or AA_S_ACL;
- {$EXTERNALSYM AA_S_ALL}
- AA_F_OPEN = $0100;
- {$EXTERNALSYM AA_F_OPEN}
- AA_F_WRITE = $0200;
- {$EXTERNALSYM AA_F_WRITE}
- AA_F_CREATE = $0200;
- {$EXTERNALSYM AA_F_CREATE}
- AA_F_DELETE = $0400;
- {$EXTERNALSYM AA_F_DELETE}
- AA_F_ACL = $0800;
- {$EXTERNALSYM AA_F_ACL}
- AA_F_ALL = AA_F_OPEN or AA_F_WRITE or AA_F_DELETE or AA_F_ACL;
- {$EXTERNALSYM AA_F_ALL}
-
-// Pinball-specific
-
- AA_A_OPEN = $1000;
- {$EXTERNALSYM AA_A_OPEN}
- AA_A_WRITE = $2000;
- {$EXTERNALSYM AA_A_WRITE}
- AA_A_CREATE = $2000;
- {$EXTERNALSYM AA_A_CREATE}
- AA_A_DELETE = $4000;
- {$EXTERNALSYM AA_A_DELETE}
- AA_A_ACL = $8000;
- {$EXTERNALSYM AA_A_ACL}
- AA_A_ALL = AA_F_OPEN or AA_F_WRITE or AA_F_DELETE or AA_F_ACL;
- {$EXTERNALSYM AA_A_ALL}
-
-implementation
-
-{$IFDEF DYNAMIC_LINK}
-
-var
- _NetAuditClear: Pointer;
-
-function NetAuditClear;
-begin
- GetProcedureAddress(_NetAuditClear, netapi32, 'NetAuditClear');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetAuditClear]
- end;
-end;
-
-var
- _NetAuditRead: Pointer;
-
-function NetAuditRead;
-begin
- GetProcedureAddress(_NetAuditRead, netapi32, 'NetAuditRead');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetAuditRead]
- end;
-end;
-
-var
- _NetAuditWrite: Pointer;
-
-function NetAuditWrite;
-begin
- GetProcedureAddress(_NetAuditWrite, netapi32, 'NetAuditWrite');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetAuditWrite]
- end;
-end;
-
-{$ELSE}
-
-function NetAuditClear; external netapi32 name 'NetAuditClear';
-function NetAuditRead; external netapi32 name 'NetAuditRead';
-function NetAuditWrite; external netapi32 name 'NetAuditWrite';
-
-{$ENDIF DYNAMIC_LINK}
-
-end.
+{******************************************************************************}
+{ }
+{ Lan Manager Audit API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: lmaudit.h, released November 2001. The original Pascal }
+{ code is: LmAudit.pas, released Februari 2002. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwalmaudit.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaLmAudit;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "lmaudit.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaLmCons, JwaWinType;
+
+type
+ _HLOG = record
+ time: DWORD;
+ last_flags: DWORD;
+ offset: DWORD;
+ rec_offset: DWORD;
+ end;
+ {$EXTERNALSYM _HLOG}
+ HLOG = _HLOG;
+ {$EXTERNALSYM HLOG}
+ LPHLOG = ^HLOG;
+ {$EXTERNALSYM LPHLOG}
+ PHLOG = ^HLOG;
+ {$EXTERNALSYM PHLOG}
+
+const
+ LOGFLAGS_FORWARD = 0;
+ {$EXTERNALSYM LOGFLAGS_FORWARD}
+ LOGFLAGS_BACKWARD = $1;
+ {$EXTERNALSYM LOGFLAGS_BACKWARD}
+ LOGFLAGS_SEEK = $2;
+ {$EXTERNALSYM LOGFLAGS_SEEK}
+
+//
+// Function Prototypes - Audit
+//
+
+function NetAuditClear(server, backupfile, service: LPCWSTR): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetAuditClear}
+
+function NetAuditRead(server, service: LPCWSTR; auditloghandle: LPHLOG; offset: DWORD; reserved1: LPDWORD; reserved2, offsetflag: DWORD; var bufptr: LPBYTE; prefmaxlen: DWORD; bytesread, totalavailable: LPDWORD): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetAuditRead}
+
+function NetAuditWrite(type_: DWORD; buf: LPBYTE; numbytes: DWORD; service: LPCWSTR; reserved: LPBYTE): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetAuditWrite}
+
+//
+// Data Structures - Audit
+//
+
+type
+ _AUDIT_ENTRY = record
+ ae_len: DWORD;
+ ae_reserved: DWORD;
+ ae_time: DWORD;
+ ae_type: DWORD;
+ ae_data_offset: DWORD; // Offset from beginning address of audit_entry
+ ae_data_size: DWORD; // byte count of ae_data area (not incl pad).
+ end;
+ {$EXTERNALSYM _AUDIT_ENTRY}
+ AUDIT_ENTRY = _AUDIT_ENTRY;
+ {$EXTERNALSYM AUDIT_ENTRY}
+ LPAUDIT_ENTRY = ^AUDIT_ENTRY;
+ {$EXTERNALSYM LPAUDIT_ENTRY}
+ PAUDIT_ENTRY = ^AUDIT_ENTRY;
+ {$EXTERNALSYM PAUDIT_ENTRY}
+ TAuditEntry = AUDIT_ENTRY;
+ PAuditEntry = PAUDIT_ENTRY;
+
+{$DEFINE REVISED_AUDIT_ENTRY_STRUCT}
+
+ _AE_SRVSTATUS = record
+ ae_sv_status: DWORD;
+ end;
+ {$EXTERNALSYM _AE_SRVSTATUS}
+ //AE_SRVSTATUS = _AE_SRVSTATUS;
+ //{$EXTERNALSYM AE_SRVSTATUS}
+ LPAE_SRVSTATUS = ^_AE_SRVSTATUS;
+ {$EXTERNALSYM LPAE_SRVSTATUS}
+ PAE_SRVSTATUS = ^_AE_SRVSTATUS;
+ {$EXTERNALSYM PAE_SRVSTATUS}
+ TAeSrvStatus = _AE_SRVSTATUS;
+ PAeSrvStatus = PAE_SRVSTATUS;
+
+ _AE_SESSLOGON = record
+ ae_so_compname: DWORD;
+ ae_so_username: DWORD;
+ ae_so_privilege: DWORD;
+ end;
+ {$EXTERNALSYM _AE_SESSLOGON}
+ //AE_SESSLOGON = _AE_SESSLOGON;
+ //{$EXTERNALSYM AE_SESSLOGON}
+ LPAE_SESSLOGON = ^_AE_SESSLOGON;
+ {$EXTERNALSYM LPAE_SESSLOGON}
+ PAE_SESSLOGON = ^_AE_SESSLOGON;
+ {$EXTERNALSYM PAE_SESSLOGON}
+ TAeSessLogon = _AE_SESSLOGON;
+ PAeSessLogon = PAE_SESSLOGON;
+
+ _AE_SESSLOGOFF = record
+ ae_sf_compname: DWORD;
+ ae_sf_username: DWORD;
+ ae_sf_reason: DWORD;
+ end;
+ {$EXTERNALSYM _AE_SESSLOGOFF}
+ //AE_SESSLOGOFF = _AE_SESSLOGOFF;
+ //{$EXTERNALSYM AE_SESSLOGOFF}
+ LPAE_SESSLOGOFF = ^_AE_SESSLOGOFF;
+ {$EXTERNALSYM LPAE_SESSLOGOFF}
+ PAE_SESSLOGOFF = ^_AE_SESSLOGOFF;
+ {$EXTERNALSYM PAE_SESSLOGOFF}
+ TAeSessLogoff = _AE_SESSLOGOFF;
+ PAeSessLogoff = PAE_SESSLOGOFF;
+
+ _AE_SESSPWERR = record
+ ae_sp_compname: DWORD;
+ ae_sp_username: DWORD;
+ end;
+ {$EXTERNALSYM _AE_SESSPWERR}
+ //AE_SESSPWERR = _AE_SESSPWERR;
+ //{$EXTERNALSYM AE_SESSPWERR}
+ LPAE_SESSPWERR = ^_AE_SESSPWERR;
+ {$EXTERNALSYM LPAE_SESSPWERR}
+ PAE_SESSPWERR = ^_AE_SESSPWERR;
+ {$EXTERNALSYM PAE_SESSPWERR}
+ TAeSessPwerr = _AE_SESSPWERR;
+ PAeSessPwerr = PAE_SESSPWERR;
+
+ _AE_CONNSTART = record
+ ae_ct_compname: DWORD;
+ ae_ct_username: DWORD;
+ ae_ct_netname: DWORD;
+ ae_ct_connid: DWORD;
+ end;
+ {$EXTERNALSYM _AE_CONNSTART}
+ //AE_CONNSTART = _AE_CONNSTART;
+ //{$EXTERNALSYM AE_CONNSTART}
+ LPAE_CONNSTART = ^_AE_CONNSTART;
+ {$EXTERNALSYM LPAE_CONNSTART}
+ PAE_CONNSTART = ^_AE_CONNSTART;
+ {$EXTERNALSYM PAE_CONNSTART}
+ TAeConnStart = _AE_CONNSTART;
+ PAeConnStart = PAE_CONNSTART;
+
+ _AE_CONNSTOP = record
+ ae_cp_compname: DWORD;
+ ae_cp_username: DWORD;
+ ae_cp_netname: DWORD;
+ ae_cp_connid: DWORD;
+ ae_cp_reason: DWORD;
+ end;
+ {$EXTERNALSYM _AE_CONNSTOP}
+ //AE_CONNSTOP = _AE_CONNSTOP;
+ //{$EXTERNALSYM AE_CONNSTOP}
+ LPAE_CONNSTOP = ^_AE_CONNSTOP;
+ {$EXTERNALSYM LPAE_CONNSTOP}
+ PAE_CONNSTOP = ^_AE_CONNSTOP;
+ {$EXTERNALSYM PAE_CONNSTOP}
+ TAeConnStop = _AE_CONNSTOP;
+ PAeConnStop = PAE_CONNSTOP;
+
+ _AE_CONNREJ = record
+ ae_cr_compname: DWORD;
+ ae_cr_username: DWORD;
+ ae_cr_netname: DWORD;
+ ae_cr_reason: DWORD;
+ end;
+ {$EXTERNALSYM _AE_CONNREJ}
+ //AE_CONNREJ = _AE_CONNREJ;
+ //{$EXTERNALSYM AE_CONNREJ}
+ LPAE_CONNREJ = ^_AE_CONNREJ;
+ {$EXTERNALSYM LPAE_CONNREJ}
+ PAE_CONNREJ = ^_AE_CONNREJ;
+ {$EXTERNALSYM PAE_CONNREJ}
+ TAeConnRej = _AE_CONNREJ;
+ PAeConnRej = PAE_CONNREJ;
+
+ _AE_RESACCESS = record
+ ae_ra_compname: DWORD;
+ ae_ra_username: DWORD;
+ ae_ra_resname: DWORD;
+ ae_ra_operation: DWORD;
+ ae_ra_returncode: DWORD;
+ ae_ra_restype: DWORD;
+ ae_ra_fileid: DWORD;
+ end;
+ {$EXTERNALSYM _AE_RESACCESS}
+ //AE_RESACCESS = _AE_RESACCESS;
+ //{$EXTERNALSYM AE_RESACCESS}
+ LPAE_RESACCESS = ^_AE_RESACCESS;
+ {$EXTERNALSYM LPAE_RESACCESS}
+ PAE_RESACCESS = ^_AE_RESACCESS;
+ {$EXTERNALSYM PAE_RESACCESS}
+ TAeResAccess = _AE_RESACCESS;
+ PAeResAccess = PAE_RESACCESS;
+
+ _AE_RESACCESSREJ = record
+ ae_rr_compname: DWORD;
+ ae_rr_username: DWORD;
+ ae_rr_resname: DWORD;
+ ae_rr_operation: DWORD;
+ end;
+ {$EXTERNALSYM _AE_RESACCESSREJ}
+ //AE_RESACCESSREJ = _AE_RESACCESSREJ;
+ //{$EXTERNALSYM AE_RESACCESSREJ}
+ LPAE_RESACCESSREJ = ^_AE_RESACCESSREJ;
+ {$EXTERNALSYM LPAE_RESACCESSREJ}
+ PAE_RESACCESSREJ = ^_AE_RESACCESSREJ;
+ {$EXTERNALSYM PAE_RESACCESSREJ}
+ TAeResAccessRej = _AE_RESACCESSREJ;
+ PAeResAccessRej = PAE_RESACCESSREJ;
+
+ _AE_CLOSEFILE = record
+ ae_cf_compname: DWORD;
+ ae_cf_username: DWORD;
+ ae_cf_resname: DWORD;
+ ae_cf_fileid: DWORD;
+ ae_cf_duration: DWORD;
+ ae_cf_reason: DWORD;
+ end;
+ {$EXTERNALSYM _AE_CLOSEFILE}
+ //AE_CLOSEFILE = _AE_CLOSEFILE;
+ //{$EXTERNALSYM AE_CLOSEFILE}
+ LPAE_CLOSEFILE = ^_AE_CLOSEFILE;
+ {$EXTERNALSYM LPAE_CLOSEFILE}
+ PAE_CLOSEFILE = ^_AE_CLOSEFILE;
+ {$EXTERNALSYM PAE_CLOSEFILE}
+ TAeCloseFile = _AE_CLOSEFILE;
+ PAeCloseFile = PAE_CLOSEFILE;
+
+ _AE_SERVICESTAT = record
+ ae_ss_compname: DWORD;
+ ae_ss_username: DWORD;
+ ae_ss_svcname: DWORD;
+ ae_ss_status: DWORD;
+ ae_ss_code: DWORD;
+ ae_ss_text: DWORD;
+ ae_ss_returnval: DWORD;
+ end;
+ {$EXTERNALSYM _AE_SERVICESTAT}
+ //AE_SERVICESTAT = _AE_SERVICESTAT;
+ //{$EXTERNALSYM AE_SERVICESTAT}
+ LPAE_SERVICESTAT = ^_AE_SERVICESTAT;
+ {$EXTERNALSYM LPAE_SERVICESTAT}
+ PAE_SERVICESTAT = ^_AE_SERVICESTAT;
+ {$EXTERNALSYM PAE_SERVICESTAT}
+ TAeServiceStat = _AE_SERVICESTAT;
+ PAeServiceStat = PAE_SERVICESTAT;
+
+ _AE_ACLMOD = record
+ ae_am_compname: DWORD;
+ ae_am_username: DWORD;
+ ae_am_resname: DWORD;
+ ae_am_action: DWORD;
+ ae_am_datalen: DWORD;
+ end;
+ {$EXTERNALSYM _AE_ACLMOD}
+ //AE_ACLMOD = _AE_ACLMOD;
+ //{$EXTERNALSYM AE_ACLMOD}
+ LPAE_ACLMOD = ^_AE_ACLMOD;
+ {$EXTERNALSYM LPAE_ACLMOD}
+ PAE_ACLMOD = ^_AE_ACLMOD;
+ {$EXTERNALSYM PAE_ACLMOD}
+ TAeAclMod = _AE_ACLMOD;
+ PAeAclMod = PAE_ACLMOD;
+
+ _AE_UASMOD = record
+ ae_um_compname: DWORD;
+ ae_um_username: DWORD;
+ ae_um_resname: DWORD;
+ ae_um_rectype: DWORD;
+ ae_um_action: DWORD;
+ ae_um_datalen: DWORD;
+ end;
+ {$EXTERNALSYM _AE_UASMOD}
+ //AE_UASMOD = _AE_UASMOD;
+ //{$EXTERNALSYM AE_UASMOD}
+ LPAE_UASMOD = ^_AE_UASMOD;
+ {$EXTERNALSYM LPAE_UASMOD}
+ PAE_UASMOD = ^_AE_UASMOD;
+ {$EXTERNALSYM PAE_UASMOD}
+ TAeUasMod = _AE_UASMOD;
+ PAeUasMod = PAE_UASMOD;
+
+ _AE_NETLOGON = record
+ ae_no_compname: DWORD;
+ ae_no_username: DWORD;
+ ae_no_privilege: DWORD;
+ ae_no_authflags: DWORD;
+ end;
+ {$EXTERNALSYM _AE_NETLOGON}
+ //AE_NETLOGON = _AE_NETLOGON;
+ //{$EXTERNALSYM AE_NETLOGON}
+ LPAE_NETLOGON = ^_AE_NETLOGON;
+ {$EXTERNALSYM LPAE_NETLOGON}
+ PAE_NETLOGON = ^_AE_NETLOGON;
+ {$EXTERNALSYM PAE_NETLOGON}
+ TAeNetLogon = _AE_NETLOGON;
+ PAeNetLogon = PAE_NETLOGON;
+
+ _AE_NETLOGOFF = record
+ ae_nf_compname: DWORD;
+ ae_nf_username: DWORD;
+ ae_nf_reserved1: DWORD;
+ ae_nf_reserved2: DWORD;
+ end;
+ {$EXTERNALSYM _AE_NETLOGOFF}
+ //AE_NETLOGOFF = _AE_NETLOGOFF;
+ //{$EXTERNALSYM AE_NETLOGOFF}
+ LPAE_NETLOGOFF = ^_AE_NETLOGOFF;
+ {$EXTERNALSYM LPAE_NETLOGOFF}
+ PAE_NETLOGOFF = ^_AE_NETLOGOFF;
+ {$EXTERNALSYM PAE_NETLOGOFF}
+ TAeNetLogoff = _AE_NETLOGOFF;
+ PAeNetLogoff = PAE_NETLOGOFF;
+
+ _AE_ACCLIM = record
+ ae_al_compname: DWORD;
+ ae_al_username: DWORD;
+ ae_al_resname: DWORD;
+ ae_al_limit: DWORD;
+ end;
+ {$EXTERNALSYM _AE_ACCLIM}
+ //AE_ACCLIM = _AE_ACCLIM;
+ //{$EXTERNALSYM AE_ACCLIM}
+ LPAE_ACCLIM = ^_AE_ACCLIM;
+ {$EXTERNALSYM LPAE_ACCLIM}
+ PAE_ACCLIM = ^_AE_ACCLIM;
+ {$EXTERNALSYM PAE_ACCLIM}
+ TAeAccLim = _AE_ACCLIM;
+ PAeAccLim = PAE_ACCLIM;
+
+const
+ ACTION_LOCKOUT = 0;
+ {$EXTERNALSYM ACTION_LOCKOUT}
+ ACTION_ADMINUNLOCK = 1;
+ {$EXTERNALSYM ACTION_ADMINUNLOCK}
+
+type
+ _AE_LOCKOUT = record
+ ae_lk_compname: DWORD; // Ptr to computername of client.
+ ae_lk_username: DWORD; // Ptr to username of client (NULL
+ // if same as computername).
+ ae_lk_action: DWORD; // Action taken on account:
+ // 0 means locked out, 1 means not.
+ ae_lk_bad_pw_count: DWORD; // Bad password count at the time
+ // of lockout.
+ end;
+ {$EXTERNALSYM _AE_LOCKOUT}
+ //AE_LOCKOUT = _AE_LOCKOUT;
+ //{$EXTERNALSYM AE_LOCKOUT}
+ LPAE_LOCKOUT = ^_AE_LOCKOUT;
+ {$EXTERNALSYM LPAE_LOCKOUT}
+ PAE_LOCKOUT = ^_AE_LOCKOUT;
+ {$EXTERNALSYM PAE_LOCKOUT}
+ TAeLockout = _AE_LOCKOUT;
+ PAeLockout = PAE_LOCKOUT;
+
+ _AE_GENERIC = record
+ ae_ge_msgfile: DWORD;
+ ae_ge_msgnum: DWORD;
+ ae_ge_params: DWORD;
+ ae_ge_param1: DWORD;
+ ae_ge_param2: DWORD;
+ ae_ge_param3: DWORD;
+ ae_ge_param4: DWORD;
+ ae_ge_param5: DWORD;
+ ae_ge_param6: DWORD;
+ ae_ge_param7: DWORD;
+ ae_ge_param8: DWORD;
+ ae_ge_param9: DWORD;
+ end;
+ {$EXTERNALSYM _AE_GENERIC}
+ //AE_GENERIC = _AE_GENERIC;
+ //{$EXTERNALSYM AE_GENERIC}
+ LPAE_GENERIC = ^_AE_GENERIC;
+ {$EXTERNALSYM LPAE_GENERIC}
+ PAE_GENERIC = ^_AE_GENERIC;
+ {$EXTERNALSYM PAE_GENERIC}
+ TAeGeneric = _AE_GENERIC;
+ PAeGeneric = PAE_GENERIC;
+
+//
+// Special Values and Constants - Audit
+//
+
+//
+// Audit entry types (field ae_type in audit_entry).
+//
+
+const
+ AE_SRVSTATUS = 0;
+ {$EXTERNALSYM AE_SRVSTATUS}
+ AE_SESSLOGON = 1;
+ {$EXTERNALSYM AE_SESSLOGON}
+ AE_SESSLOGOFF = 2;
+ {$EXTERNALSYM AE_SESSLOGOFF}
+ AE_SESSPWERR = 3;
+ {$EXTERNALSYM AE_SESSPWERR}
+ AE_CONNSTART = 4;
+ {$EXTERNALSYM AE_CONNSTART}
+ AE_CONNSTOP = 5;
+ {$EXTERNALSYM AE_CONNSTOP}
+ AE_CONNREJ = 6;
+ {$EXTERNALSYM AE_CONNREJ}
+ AE_RESACCESS = 7;
+ {$EXTERNALSYM AE_RESACCESS}
+ AE_RESACCESSREJ = 8;
+ {$EXTERNALSYM AE_RESACCESSREJ}
+ AE_CLOSEFILE = 9;
+ {$EXTERNALSYM AE_CLOSEFILE}
+ AE_SERVICESTAT = 11;
+ {$EXTERNALSYM AE_SERVICESTAT}
+ AE_ACLMOD = 12;
+ {$EXTERNALSYM AE_ACLMOD}
+ AE_UASMOD = 13;
+ {$EXTERNALSYM AE_UASMOD}
+ AE_NETLOGON = 14;
+ {$EXTERNALSYM AE_NETLOGON}
+ AE_NETLOGOFF = 15;
+ {$EXTERNALSYM AE_NETLOGOFF}
+ AE_NETLOGDENIED = 16;
+ {$EXTERNALSYM AE_NETLOGDENIED}
+ AE_ACCLIMITEXCD = 17;
+ {$EXTERNALSYM AE_ACCLIMITEXCD}
+ AE_RESACCESS2 = 18;
+ {$EXTERNALSYM AE_RESACCESS2}
+ AE_ACLMODFAIL = 19;
+ {$EXTERNALSYM AE_ACLMODFAIL}
+ AE_LOCKOUT = 20;
+ {$EXTERNALSYM AE_LOCKOUT}
+ AE_GENERIC_TYPE = 21;
+ {$EXTERNALSYM AE_GENERIC_TYPE}
+
+//
+// Values for ae_ss_status field of ae_srvstatus.
+//
+
+ AE_SRVSTART = 0;
+ {$EXTERNALSYM AE_SRVSTART}
+ AE_SRVPAUSED = 1;
+ {$EXTERNALSYM AE_SRVPAUSED}
+ AE_SRVCONT = 2;
+ {$EXTERNALSYM AE_SRVCONT}
+ AE_SRVSTOP = 3;
+ {$EXTERNALSYM AE_SRVSTOP}
+
+//
+// Values for ae_so_privilege field of ae_sesslogon.
+//
+
+ AE_GUEST = 0;
+ {$EXTERNALSYM AE_GUEST}
+ AE_USER = 1;
+ {$EXTERNALSYM AE_USER}
+ AE_ADMIN = 2;
+ {$EXTERNALSYM AE_ADMIN}
+
+//
+// Values for various ae_XX_reason fields.
+//
+
+ AE_NORMAL = 0;
+ {$EXTERNALSYM AE_NORMAL}
+ AE_USERLIMIT = 0;
+ {$EXTERNALSYM AE_USERLIMIT}
+ AE_GENERAL = 0;
+ {$EXTERNALSYM AE_GENERAL}
+ AE_ERROR = 1;
+ {$EXTERNALSYM AE_ERROR}
+ AE_SESSDIS = 1;
+ {$EXTERNALSYM AE_SESSDIS}
+ AE_BADPW = 1;
+ {$EXTERNALSYM AE_BADPW}
+ AE_AUTODIS = 2;
+ {$EXTERNALSYM AE_AUTODIS}
+ AE_UNSHARE = 2;
+ {$EXTERNALSYM AE_UNSHARE}
+ AE_ADMINPRIVREQD = 2;
+ {$EXTERNALSYM AE_ADMINPRIVREQD}
+ AE_ADMINDIS = 3;
+ {$EXTERNALSYM AE_ADMINDIS}
+ AE_NOACCESSPERM = 3;
+ {$EXTERNALSYM AE_NOACCESSPERM}
+ AE_ACCRESTRICT = 4;
+ {$EXTERNALSYM AE_ACCRESTRICT}
+
+ AE_NORMAL_CLOSE = 0;
+ {$EXTERNALSYM AE_NORMAL_CLOSE}
+ AE_SES_CLOSE = 1;
+ {$EXTERNALSYM AE_SES_CLOSE}
+ AE_ADMIN_CLOSE = 2;
+ {$EXTERNALSYM AE_ADMIN_CLOSE}
+
+//
+// Values for xx_subreason fields.
+//
+
+ AE_LIM_UNKNOWN = 0;
+ {$EXTERNALSYM AE_LIM_UNKNOWN}
+ AE_LIM_LOGONHOURS = 1;
+ {$EXTERNALSYM AE_LIM_LOGONHOURS}
+ AE_LIM_EXPIRED = 2;
+ {$EXTERNALSYM AE_LIM_EXPIRED}
+ AE_LIM_INVAL_WKSTA = 3;
+ {$EXTERNALSYM AE_LIM_INVAL_WKSTA}
+ AE_LIM_DISABLED = 4;
+ {$EXTERNALSYM AE_LIM_DISABLED}
+ AE_LIM_DELETED = 5;
+ {$EXTERNALSYM AE_LIM_DELETED}
+
+//
+// Values for xx_action fields
+//
+
+ AE_MOD = 0;
+ {$EXTERNALSYM AE_MOD}
+ AE_DELETE = 1;
+ {$EXTERNALSYM AE_DELETE}
+ AE_ADD = 2;
+ {$EXTERNALSYM AE_ADD}
+
+//
+// Types of UAS record for um_rectype field
+//
+
+ AE_UAS_USER = 0;
+ {$EXTERNALSYM AE_UAS_USER}
+ AE_UAS_GROUP = 1;
+ {$EXTERNALSYM AE_UAS_GROUP}
+ AE_UAS_MODALS = 2;
+ {$EXTERNALSYM AE_UAS_MODALS}
+
+//
+// Bitmasks for auditing events
+//
+// The parentheses around the hex constants broke h_to_inc
+// and have been purged from the face of the earth.
+//
+
+ SVAUD_SERVICE = $1;
+ {$EXTERNALSYM SVAUD_SERVICE}
+ SVAUD_GOODSESSLOGON = $6;
+ {$EXTERNALSYM SVAUD_GOODSESSLOGON}
+ SVAUD_BADSESSLOGON = $18;
+ {$EXTERNALSYM SVAUD_BADSESSLOGON}
+ SVAUD_SESSLOGON = SVAUD_GOODSESSLOGON or SVAUD_BADSESSLOGON;
+ {$EXTERNALSYM SVAUD_SESSLOGON}
+ SVAUD_GOODNETLOGON = $60;
+ {$EXTERNALSYM SVAUD_GOODNETLOGON}
+ SVAUD_BADNETLOGON = $180;
+ {$EXTERNALSYM SVAUD_BADNETLOGON}
+ SVAUD_NETLOGON = SVAUD_GOODNETLOGON or SVAUD_BADNETLOGON;
+ {$EXTERNALSYM SVAUD_NETLOGON}
+ SVAUD_LOGON = SVAUD_NETLOGON or SVAUD_SESSLOGON;
+ {$EXTERNALSYM SVAUD_LOGON}
+ SVAUD_GOODUSE = $600;
+ {$EXTERNALSYM SVAUD_GOODUSE}
+ SVAUD_BADUSE = $1800;
+ {$EXTERNALSYM SVAUD_BADUSE}
+ SVAUD_USE = SVAUD_GOODUSE or SVAUD_BADUSE;
+ {$EXTERNALSYM SVAUD_USE}
+ SVAUD_USERLIST = $2000;
+ {$EXTERNALSYM SVAUD_USERLIST}
+ SVAUD_PERMISSIONS = $4000;
+ {$EXTERNALSYM SVAUD_PERMISSIONS}
+ SVAUD_RESOURCE = $8000;
+ {$EXTERNALSYM SVAUD_RESOURCE}
+ SVAUD_LOGONLIM = $00010000;
+ {$EXTERNALSYM SVAUD_LOGONLIM}
+
+//
+// Resource access audit bitmasks.
+//
+
+ AA_AUDIT_ALL = $0001;
+ {$EXTERNALSYM AA_AUDIT_ALL}
+ AA_A_OWNER = $0004;
+ {$EXTERNALSYM AA_A_OWNER}
+ AA_CLOSE = $0008;
+ {$EXTERNALSYM AA_CLOSE}
+ AA_S_OPEN = $0010;
+ {$EXTERNALSYM AA_S_OPEN}
+ AA_S_WRITE = $0020;
+ {$EXTERNALSYM AA_S_WRITE}
+ AA_S_CREATE = $0020;
+ {$EXTERNALSYM AA_S_CREATE}
+ AA_S_DELETE = $0040;
+ {$EXTERNALSYM AA_S_DELETE}
+ AA_S_ACL = $0080;
+ {$EXTERNALSYM AA_S_ACL}
+ AA_S_ALL = AA_S_OPEN or AA_S_WRITE or AA_S_DELETE or AA_S_ACL;
+ {$EXTERNALSYM AA_S_ALL}
+ AA_F_OPEN = $0100;
+ {$EXTERNALSYM AA_F_OPEN}
+ AA_F_WRITE = $0200;
+ {$EXTERNALSYM AA_F_WRITE}
+ AA_F_CREATE = $0200;
+ {$EXTERNALSYM AA_F_CREATE}
+ AA_F_DELETE = $0400;
+ {$EXTERNALSYM AA_F_DELETE}
+ AA_F_ACL = $0800;
+ {$EXTERNALSYM AA_F_ACL}
+ AA_F_ALL = AA_F_OPEN or AA_F_WRITE or AA_F_DELETE or AA_F_ACL;
+ {$EXTERNALSYM AA_F_ALL}
+
+// Pinball-specific
+
+ AA_A_OPEN = $1000;
+ {$EXTERNALSYM AA_A_OPEN}
+ AA_A_WRITE = $2000;
+ {$EXTERNALSYM AA_A_WRITE}
+ AA_A_CREATE = $2000;
+ {$EXTERNALSYM AA_A_CREATE}
+ AA_A_DELETE = $4000;
+ {$EXTERNALSYM AA_A_DELETE}
+ AA_A_ACL = $8000;
+ {$EXTERNALSYM AA_A_ACL}
+ AA_A_ALL = AA_F_OPEN or AA_F_WRITE or AA_F_DELETE or AA_F_ACL;
+ {$EXTERNALSYM AA_A_ALL}
+
+implementation
+
+{$IFDEF DYNAMIC_LINK}
+
+var
+ _NetAuditClear: Pointer;
+
+function NetAuditClear;
+begin
+ GetProcedureAddress(_NetAuditClear, netapi32, 'NetAuditClear');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetAuditClear]
+ end;
+end;
+
+var
+ _NetAuditRead: Pointer;
+
+function NetAuditRead;
+begin
+ GetProcedureAddress(_NetAuditRead, netapi32, 'NetAuditRead');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetAuditRead]
+ end;
+end;
+
+var
+ _NetAuditWrite: Pointer;
+
+function NetAuditWrite;
+begin
+ GetProcedureAddress(_NetAuditWrite, netapi32, 'NetAuditWrite');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetAuditWrite]
+ end;
+end;
+
+{$ELSE}
+
+function NetAuditClear; external netapi32 name 'NetAuditClear';
+function NetAuditRead; external netapi32 name 'NetAuditRead';
+function NetAuditWrite; external netapi32 name 'NetAuditWrite';
+
+{$ENDIF DYNAMIC_LINK}
+
+end.
diff --git a/packages/extra/winunits/jwalmconfig.pas b/packages/extra/winunits/jwalmconfig.pas
index 81712e1ae4..3b2f45b293 100644
--- a/packages/extra/winunits/jwalmconfig.pas
+++ b/packages/extra/winunits/jwalmconfig.pas
@@ -1,191 +1,191 @@
-{******************************************************************************}
-{ }
-{ Lan Manager Config API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: lmconfig.h, released November 2001. The original Pascal}
-{ code is: LmConfig.pas, released Februari 2002. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwalmconfig.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaLmConfig;
-
-{$I jediapilib.inc}
-
-{$WEAKPACKAGEUNIT}
-
-interface
-
-uses
- JwaLmCons, JwaWinType;
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "lmconfig.h"'}
-{$HPPEMIT ''}
-
-{$DEFINE LM_REVISED_CONFIG_APIS}
-
-//
-// Function Prototypes - Config
-//
-
-{$IFDEF LM_REVISED_CONFIG_APIS}
-
-function NetConfigGet(server, component, parameter: LPCWSTR; var bufptr: LPBYTE): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetConfigGet}
-
-function NetConfigGetAll(server, component: LPCWSTR; var bufptr: LPBYTE): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetConfigGetAll}
-
-{$ELSE}
-
-function NetConfigGet(server, component, parameter: LPCWSTR; var bufptr: LPBYTE; totalavailable: LPDWORD): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetConfigGet}
-
-function NetConfigGetAll(server, component: LPCWSTR; var bufptr: LPBYTE; totalavailable: LPDWORD): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetConfigGetAll}
-
-{$ENDIF LM_REVISED_CONFIG_APIS}
-
-function NetConfigSet(server, reserved1, component: LPCWSTR; level, reserved2: DWORD; buf: LPBYTE; reserved3: DWORD): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetConfigSet}
-
-function NetRegisterDomainNameChangeNotification(NotificationEventHandle: PHANDLE): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetRegisterDomainNameChangeNotification}
-
-function NetUnregisterDomainNameChangeNotification(NotificationEventHandle: HANDLE): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetUnregisterDomainNameChangeNotification}
-
-//
-// Data Structures - Config
-//
-
-type
- _CONFIG_INFO_0 = record
- cfgi0_key: LPWSTR;
- cfgi0_data: LPWSTR;
- end;
- {$EXTERNALSYM _CONFIG_INFO_0}
- CONFIG_INFO_0 = _CONFIG_INFO_0;
- {$EXTERNALSYM CONFIG_INFO_0}
- PCONFIG_INFO_0 = ^CONFIG_INFO_0;
- {$EXTERNALSYM PCONFIG_INFO_0}
- LPCONFIG_INFO_0 = ^CONFIG_INFO_0;
- {$EXTERNALSYM LPCONFIG_INFO_0}
- TConfigInfo0 = CONFIG_INFO_0;
- PConfigInfo0 = PCONFIG_INFO_0;
-
-implementation
-
-{$IFDEF DYNAMIC_LINK}
-
-var
- _NetConfigGet: Pointer;
-
-function NetConfigGet;
-begin
- GetProcedureAddress(_NetConfigGet, netapi32, 'NetConfigGet');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetConfigGet]
- end;
-end;
-
-var
- _NetConfigGetAll: Pointer;
-
-function NetConfigGetAll;
-begin
- GetProcedureAddress(_NetConfigGetAll, netapi32, 'NetConfigGetAll');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetConfigGetAll]
- end;
-end;
-
-var
- _NetConfigSet: Pointer;
-
-function NetConfigSet;
-begin
- GetProcedureAddress(_NetConfigSet, netapi32, 'NetConfigSet');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetConfigSet]
- end;
-end;
-
-var
- _NetRegisterDomainNameChangeNotification: Pointer;
-
-function NetRegisterDomainNameChangeNotification;
-begin
- GetProcedureAddress(_NetRegisterDomainNameChangeNotification, netapi32, 'NetRegisterDomainNameChangeNotification');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetRegisterDomainNameChangeNotification]
- end;
-end;
-
-var
- _NetUnregisterDomainNameChangeNotification: Pointer;
-
-function NetUnregisterDomainNameChangeNotification;
-begin
- GetProcedureAddress(_NetUnregisterDomainNameChangeNotification, netapi32, 'NetUnregisterDomainNameChangeNotification');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetUnregisterDomainNameChangeNotification]
- end;
-end;
-
-{$ELSE}
-
-function NetConfigGet; external netapi32 name 'NetConfigGet';
-function NetConfigGetAll; external netapi32 name 'NetConfigGetAll';
-function NetConfigSet; external netapi32 name 'NetConfigSet';
-function NetRegisterDomainNameChangeNotification; external netapi32 name 'NetRegisterDomainNameChangeNotification';
-function NetUnregisterDomainNameChangeNotification; external netapi32 name 'NetUnregisterDomainNameChangeNotification';
-
-{$ENDIF DYNAMIC_LINK}
-
-end.
+{******************************************************************************}
+{ }
+{ Lan Manager Config API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: lmconfig.h, released November 2001. The original Pascal}
+{ code is: LmConfig.pas, released Februari 2002. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwalmconfig.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaLmConfig;
+
+{$I jediapilib.inc}
+
+{$WEAKPACKAGEUNIT}
+
+interface
+
+uses
+ JwaLmCons, JwaWinType;
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "lmconfig.h"'}
+{$HPPEMIT ''}
+
+{$DEFINE LM_REVISED_CONFIG_APIS}
+
+//
+// Function Prototypes - Config
+//
+
+{$IFDEF LM_REVISED_CONFIG_APIS}
+
+function NetConfigGet(server, component, parameter: LPCWSTR; var bufptr: LPBYTE): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetConfigGet}
+
+function NetConfigGetAll(server, component: LPCWSTR; var bufptr: LPBYTE): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetConfigGetAll}
+
+{$ELSE}
+
+function NetConfigGet(server, component, parameter: LPCWSTR; var bufptr: LPBYTE; totalavailable: LPDWORD): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetConfigGet}
+
+function NetConfigGetAll(server, component: LPCWSTR; var bufptr: LPBYTE; totalavailable: LPDWORD): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetConfigGetAll}
+
+{$ENDIF LM_REVISED_CONFIG_APIS}
+
+function NetConfigSet(server, reserved1, component: LPCWSTR; level, reserved2: DWORD; buf: LPBYTE; reserved3: DWORD): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetConfigSet}
+
+function NetRegisterDomainNameChangeNotification(NotificationEventHandle: PHANDLE): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetRegisterDomainNameChangeNotification}
+
+function NetUnregisterDomainNameChangeNotification(NotificationEventHandle: HANDLE): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetUnregisterDomainNameChangeNotification}
+
+//
+// Data Structures - Config
+//
+
+type
+ _CONFIG_INFO_0 = record
+ cfgi0_key: LPWSTR;
+ cfgi0_data: LPWSTR;
+ end;
+ {$EXTERNALSYM _CONFIG_INFO_0}
+ CONFIG_INFO_0 = _CONFIG_INFO_0;
+ {$EXTERNALSYM CONFIG_INFO_0}
+ PCONFIG_INFO_0 = ^CONFIG_INFO_0;
+ {$EXTERNALSYM PCONFIG_INFO_0}
+ LPCONFIG_INFO_0 = ^CONFIG_INFO_0;
+ {$EXTERNALSYM LPCONFIG_INFO_0}
+ TConfigInfo0 = CONFIG_INFO_0;
+ PConfigInfo0 = PCONFIG_INFO_0;
+
+implementation
+
+{$IFDEF DYNAMIC_LINK}
+
+var
+ _NetConfigGet: Pointer;
+
+function NetConfigGet;
+begin
+ GetProcedureAddress(_NetConfigGet, netapi32, 'NetConfigGet');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetConfigGet]
+ end;
+end;
+
+var
+ _NetConfigGetAll: Pointer;
+
+function NetConfigGetAll;
+begin
+ GetProcedureAddress(_NetConfigGetAll, netapi32, 'NetConfigGetAll');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetConfigGetAll]
+ end;
+end;
+
+var
+ _NetConfigSet: Pointer;
+
+function NetConfigSet;
+begin
+ GetProcedureAddress(_NetConfigSet, netapi32, 'NetConfigSet');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetConfigSet]
+ end;
+end;
+
+var
+ _NetRegisterDomainNameChangeNotification: Pointer;
+
+function NetRegisterDomainNameChangeNotification;
+begin
+ GetProcedureAddress(_NetRegisterDomainNameChangeNotification, netapi32, 'NetRegisterDomainNameChangeNotification');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetRegisterDomainNameChangeNotification]
+ end;
+end;
+
+var
+ _NetUnregisterDomainNameChangeNotification: Pointer;
+
+function NetUnregisterDomainNameChangeNotification;
+begin
+ GetProcedureAddress(_NetUnregisterDomainNameChangeNotification, netapi32, 'NetUnregisterDomainNameChangeNotification');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetUnregisterDomainNameChangeNotification]
+ end;
+end;
+
+{$ELSE}
+
+function NetConfigGet; external netapi32 name 'NetConfigGet';
+function NetConfigGetAll; external netapi32 name 'NetConfigGetAll';
+function NetConfigSet; external netapi32 name 'NetConfigSet';
+function NetRegisterDomainNameChangeNotification; external netapi32 name 'NetRegisterDomainNameChangeNotification';
+function NetUnregisterDomainNameChangeNotification; external netapi32 name 'NetUnregisterDomainNameChangeNotification';
+
+{$ENDIF DYNAMIC_LINK}
+
+end.
diff --git a/packages/extra/winunits/jwalmcons.pas b/packages/extra/winunits/jwalmcons.pas
index 3710d63ab1..06223da240 100644
--- a/packages/extra/winunits/jwalmcons.pas
+++ b/packages/extra/winunits/jwalmcons.pas
@@ -1,363 +1,363 @@
-{******************************************************************************}
-{ }
-{ Lan Manager Constants API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: lmcons.h, released November 2001. The original Pascal }
-{ code is: LmCons.pas, released Februari 2002. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwalmcons.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaLmCons;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "lm.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaWinType, JwaLmErr;
-
-const
- NetApi32 = 'netapi32.dll';
-
-//
-// NOTE: Lengths of strings are given as the maximum lengths of the
-// string in characters (not bytes). This does not include space for the
-// terminating 0-characters. When allocating space for such an item,
-// use the form:
-//
-// TCHAR username[UNLEN+1];
-//
-// Definitions of the form LN20_* define those values in effect for
-// LanMan 2.0.
-//
-
-//
-// String Lengths for various LanMan names
-//
-
-const
- CNLEN = 15; // Computer name length
- {$EXTERNALSYM CNLEN}
- LM20_CNLEN = 15; // LM 2.0 Computer name length
- {$EXTERNALSYM LM20_CNLEN}
- DNLEN = CNLEN; // Maximum domain name length
- {$EXTERNALSYM DNLEN}
- LM20_DNLEN = LM20_CNLEN; // LM 2.0 Maximum domain name length
- {$EXTERNALSYM LM20_DNLEN}
-
-//#if (CNLEN != DNLEN)
-//#error CNLEN and DNLEN are not equal
-//#endif
-
- UNCLEN = CNLEN + 2; // UNC computer name length
- {$EXTERNALSYM UNCLEN}
- LM20_UNCLEN = LM20_CNLEN + 2; // LM 2.0 UNC computer name length
- {$EXTERNALSYM LM20_UNCLEN}
-
- NNLEN = 80; // Net name length (share name)
- {$EXTERNALSYM NNLEN}
- LM20_NNLEN = 12; // LM 2.0 Net name length
- {$EXTERNALSYM LM20_NNLEN}
-
- RMLEN = UNCLEN + 1 + NNLEN; // Max remote name length
- {$EXTERNALSYM RMLEN}
- LM20_RMLEN = LM20_UNCLEN + 1 + LM20_NNLEN; // LM 2.0 Max remote name length
- {$EXTERNALSYM LM20_RMLEN}
-
- SNLEN = 80; // Service name length
- {$EXTERNALSYM SNLEN}
- LM20_SNLEN = 15; // LM 2.0 Service name length
- {$EXTERNALSYM LM20_SNLEN}
- STXTLEN = 256; // Service text length
- {$EXTERNALSYM STXTLEN}
- LM20_STXTLEN = 63; // LM 2.0 Service text length
- {$EXTERNALSYM LM20_STXTLEN}
-
- PATHLEN = 256; // Max. path (not including drive name)
- {$EXTERNALSYM PATHLEN}
- LM20_PATHLEN = 256; // LM 2.0 Max. path
- {$EXTERNALSYM LM20_PATHLEN}
-
- DEVLEN = 80; // Device name length
- {$EXTERNALSYM DEVLEN}
- LM20_DEVLEN = 8; // LM 2.0 Device name length
- {$EXTERNALSYM LM20_DEVLEN}
-
- EVLEN = 16; // Event name length
- {$EXTERNALSYM EVLEN}
-
-//
-// User, Group and Password lengths
-//
-
- UNLEN = 256; // Maximum user name length
- {$EXTERNALSYM UNLEN}
- LM20_UNLEN = 20; // LM 2.0 Maximum user name length
- {$EXTERNALSYM LM20_UNLEN}
-
- GNLEN = UNLEN; // Group name
- {$EXTERNALSYM GNLEN}
- LM20_GNLEN = LM20_UNLEN; // LM 2.0 Group name
- {$EXTERNALSYM LM20_GNLEN}
-
- PWLEN = 256; // Maximum password length
- {$EXTERNALSYM PWLEN}
- LM20_PWLEN = 14; // LM 2.0 Maximum password length
- {$EXTERNALSYM LM20_PWLEN}
-
- SHPWLEN = 8; // Share password length (bytes)
- {$EXTERNALSYM SHPWLEN}
-
- CLTYPE_LEN = 12; // Length of client type string
- {$EXTERNALSYM CLTYPE_LEN}
-
- MAXCOMMENTSZ = 256; // Multipurpose comment length
- {$EXTERNALSYM MAXCOMMENTSZ}
- LM20_MAXCOMMENTSZ = 48; // LM 2.0 Multipurpose comment length
- {$EXTERNALSYM LM20_MAXCOMMENTSZ}
-
- QNLEN = NNLEN; // Queue name maximum length
- {$EXTERNALSYM QNLEN}
- LM20_QNLEN = LM20_NNLEN; // LM 2.0 Queue name maximum length
- {$EXTERNALSYM LM20_QNLEN}
-
-//#if (QNLEN != NNLEN)
-//# error QNLEN and NNLEN are not equal
-//#endif
-
-//
-// The ALERTSZ and MAXDEVENTRIES defines have not yet been NT'ized.
-// Whoever ports these components should change these values appropriately.
-//
-
- ALERTSZ = 128; // size of alert string in server
- {$EXTERNALSYM ALERTSZ}
- MAXDEVENTRIES = SizeOf(Integer)*8; // Max number of device entries
- {$EXTERNALSYM MAXDEVENTRIES}
-
- //
- // We use int bitmap to represent
- //
-
- NETBIOS_NAME_LEN = 16; // NetBIOS net name (bytes)
- {$EXTERNALSYM NETBIOS_NAME_LEN}
-
-//
-// Value to be used with APIs which have a "preferred maximum length"
-// parameter. This value indicates that the API should just allocate
-// "as much as it takes."
-//
-
- MAX_PREFERRED_LENGTH = DWORD(-1);
- {$EXTERNALSYM MAX_PREFERRED_LENGTH}
-
-//
-// Constants used with encryption
-//
-
- CRYPT_KEY_LEN = 7;
- {$EXTERNALSYM CRYPT_KEY_LEN}
- CRYPT_TXT_LEN = 8;
- {$EXTERNALSYM CRYPT_TXT_LEN}
- ENCRYPTED_PWLEN = 16;
- {$EXTERNALSYM ENCRYPTED_PWLEN}
- SESSION_PWLEN = 24;
- {$EXTERNALSYM SESSION_PWLEN}
- SESSION_CRYPT_KLEN = 21;
- {$EXTERNALSYM SESSION_CRYPT_KLEN}
-
-//
-// Value to be used with SetInfo calls to allow setting of all
-// settable parameters (parmnum zero option)
-//
-
- PARMNUM_ALL = 0;
- {$EXTERNALSYM PARMNUM_ALL}
-
- PARM_ERROR_UNKNOWN = DWORD(-1);
- {$EXTERNALSYM PARM_ERROR_UNKNOWN}
- PARM_ERROR_NONE = 0;
- {$EXTERNALSYM PARM_ERROR_NONE}
- PARMNUM_BASE_INFOLEVEL = 1000;
- {$EXTERNALSYM PARMNUM_BASE_INFOLEVEL}
-
-//
-// Only the UNICODE version of the LM APIs are available on NT.
-// Non-UNICODE version on other platforms
-//
-
-//#if defined( _WIN32_WINNT ) || defined( WINNT ) || defined( FORCE_UNICODE )
-
-{$IFDEF WINNT4_UP}
-{$DEFINE LM_USE_UNICODE}
-{$ENDIF WINNT4_UP}
-
-{$IFDEF LM_FORCE_UNICODE}
-{$DEFINE LM_USE_UNICODE}
-{$ENDIF LM_FORCE_UNICODE}
-
-{$IFDEF LM_USE_UNICODE}
-
-type
- LMSTR = LPWSTR;
- {$EXTERNALSYM LMSTR}
- LMCSTR = LPCWSTR;
- {$EXTERNALSYM LMCSTR}
- PLMSTR = ^LMSTR;
- {$NODEFINE PLMSTR}
-
-const
- MESSAGE_FILENAME = WideString('NETMSG');
- {$EXTERNALSYM MESSAGE_FILENAME}
- OS2MSG_FILENAME = WideString('BASE');
- {$EXTERNALSYM OS2MSG_FILENAME}
- HELP_MSG_FILENAME = WideString('NETH');
- {$EXTERNALSYM HELP_MSG_FILENAME}
-
-// ** INTERNAL_ONLY **
-
-// The backup message file named here is a duplicate of net.msg. It
-// is not shipped with the product, but is used at buildtime to
-// msgbind certain messages to netapi.dll and some of the services.
-// This allows for OEMs to modify the message text in net.msg and
-// have those changes show up. Only in case there is an error in
-// retrieving the messages from net.msg do we then get the bound
-// messages out of bak.msg (really out of the message segment).
-
- BACKUP_MSG_FILENAME = WideString('BAK.MSG');
- {$EXTERNALSYM BACKUP_MSG_FILENAME}
-
-// ** END_INTERNAL **
-
-{$ELSE}
-
-type
- LMSTR = LPSTR;
- {$EXTERNALSYM LMSTR}
- LMCSTR = LPCSTR;
- {$EXTERNALSYM LMCSTR}
-
-const
- MESSAGE_FILENAME = AnsiString('NETMSG');
- {$EXTERNALSYM MESSAGE_FILENAME}
- OS2MSG_FILENAME = AnsiString('BASE');
- {$EXTERNALSYM OS2MSG_FILENAME}
- HELP_MSG_FILENAME = AnsiString('NETH');
- {$EXTERNALSYM HELP_MSG_FILENAME}
-
-// ** INTERNAL_ONLY **
-
-// The backup message file named here is a duplicate of net.msg. It
-// is not shipped with the product, but is used at buildtime to
-// msgbind certain messages to netapi.dll and some of the services.
-// This allows for OEMs to modify the message text in net.msg and
-// have those changes show up. Only in case there is an error in
-// retrieving the messages from net.msg do we then get the bound
-// messages out of bak.msg (really out of the message segment).
-
- BACKUP_MSG_FILENAME = LMSTR('BAK.MSG');
- {$EXTERNALSYM BACKUP_MSG_FILENAME}
-
-// ** END_INTERNAL **
-
-{$ENDIF LM_USE_UNICODE}
-
-{$UNDEF LM_USE_UNICODE}
-
-//
-// Message File Names
-//
-
-//
-// Keywords used in Function Prototypes
-//
-
-type
- NET_API_STATUS = DWORD;
- {$EXTERNALSYM NET_API_STATUS}
- TNetApiStatus = NET_API_STATUS;
-
-//
-// The platform ID indicates the levels to use for platform-specific
-// information.
-//
-
-const
- PLATFORM_ID_DOS = 300;
- {$EXTERNALSYM PLATFORM_ID_DOS}
- PLATFORM_ID_OS2 = 400;
- {$EXTERNALSYM PLATFORM_ID_OS2}
- PLATFORM_ID_NT = 500;
- {$EXTERNALSYM PLATFORM_ID_NT}
- PLATFORM_ID_OSF = 600;
- {$EXTERNALSYM PLATFORM_ID_OSF}
- PLATFORM_ID_VMS = 700;
- {$EXTERNALSYM PLATFORM_ID_VMS}
-
-//
-// There message numbers assigned to different LANMAN components
-// are as defined below.
-//
-// lmerr.h: 2100 - 2999 NERR_BASE
-// alertmsg.h: 3000 - 3049 ALERT_BASE
-// lmsvc.h: 3050 - 3099 SERVICE_BASE
-// lmerrlog.h: 3100 - 3299 ERRLOG_BASE
-// msgtext.h: 3300 - 3499 MTXT_BASE
-// apperr.h: 3500 - 3999 APPERR_BASE
-// apperrfs.h: 4000 - 4299 APPERRFS_BASE
-// apperr2.h: 4300 - 5299 APPERR2_BASE
-// ncberr.h: 5300 - 5499 NRCERR_BASE
-// alertmsg.h: 5500 - 5599 ALERT2_BASE
-// lmsvc.h: 5600 - 5699 SERVICE2_BASE
-// lmerrlog.h 5700 - 5899 ERRLOG2_BASE
-//
-
- MIN_LANMAN_MESSAGE_ID = NERR_BASE;
- {$EXTERNALSYM MIN_LANMAN_MESSAGE_ID}
- MAX_LANMAN_MESSAGE_ID = 5899;
- {$EXTERNALSYM MAX_LANMAN_MESSAGE_ID}
-
-implementation
-
-end.
+{******************************************************************************}
+{ }
+{ Lan Manager Constants API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: lmcons.h, released November 2001. The original Pascal }
+{ code is: LmCons.pas, released Februari 2002. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwalmcons.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaLmCons;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "lm.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaWinType, JwaLmErr;
+
+const
+ NetApi32 = 'netapi32.dll';
+
+//
+// NOTE: Lengths of strings are given as the maximum lengths of the
+// string in characters (not bytes). This does not include space for the
+// terminating 0-characters. When allocating space for such an item,
+// use the form:
+//
+// TCHAR username[UNLEN+1];
+//
+// Definitions of the form LN20_* define those values in effect for
+// LanMan 2.0.
+//
+
+//
+// String Lengths for various LanMan names
+//
+
+const
+ CNLEN = 15; // Computer name length
+ {$EXTERNALSYM CNLEN}
+ LM20_CNLEN = 15; // LM 2.0 Computer name length
+ {$EXTERNALSYM LM20_CNLEN}
+ DNLEN = CNLEN; // Maximum domain name length
+ {$EXTERNALSYM DNLEN}
+ LM20_DNLEN = LM20_CNLEN; // LM 2.0 Maximum domain name length
+ {$EXTERNALSYM LM20_DNLEN}
+
+//#if (CNLEN != DNLEN)
+//#error CNLEN and DNLEN are not equal
+//#endif
+
+ UNCLEN = CNLEN + 2; // UNC computer name length
+ {$EXTERNALSYM UNCLEN}
+ LM20_UNCLEN = LM20_CNLEN + 2; // LM 2.0 UNC computer name length
+ {$EXTERNALSYM LM20_UNCLEN}
+
+ NNLEN = 80; // Net name length (share name)
+ {$EXTERNALSYM NNLEN}
+ LM20_NNLEN = 12; // LM 2.0 Net name length
+ {$EXTERNALSYM LM20_NNLEN}
+
+ RMLEN = UNCLEN + 1 + NNLEN; // Max remote name length
+ {$EXTERNALSYM RMLEN}
+ LM20_RMLEN = LM20_UNCLEN + 1 + LM20_NNLEN; // LM 2.0 Max remote name length
+ {$EXTERNALSYM LM20_RMLEN}
+
+ SNLEN = 80; // Service name length
+ {$EXTERNALSYM SNLEN}
+ LM20_SNLEN = 15; // LM 2.0 Service name length
+ {$EXTERNALSYM LM20_SNLEN}
+ STXTLEN = 256; // Service text length
+ {$EXTERNALSYM STXTLEN}
+ LM20_STXTLEN = 63; // LM 2.0 Service text length
+ {$EXTERNALSYM LM20_STXTLEN}
+
+ PATHLEN = 256; // Max. path (not including drive name)
+ {$EXTERNALSYM PATHLEN}
+ LM20_PATHLEN = 256; // LM 2.0 Max. path
+ {$EXTERNALSYM LM20_PATHLEN}
+
+ DEVLEN = 80; // Device name length
+ {$EXTERNALSYM DEVLEN}
+ LM20_DEVLEN = 8; // LM 2.0 Device name length
+ {$EXTERNALSYM LM20_DEVLEN}
+
+ EVLEN = 16; // Event name length
+ {$EXTERNALSYM EVLEN}
+
+//
+// User, Group and Password lengths
+//
+
+ UNLEN = 256; // Maximum user name length
+ {$EXTERNALSYM UNLEN}
+ LM20_UNLEN = 20; // LM 2.0 Maximum user name length
+ {$EXTERNALSYM LM20_UNLEN}
+
+ GNLEN = UNLEN; // Group name
+ {$EXTERNALSYM GNLEN}
+ LM20_GNLEN = LM20_UNLEN; // LM 2.0 Group name
+ {$EXTERNALSYM LM20_GNLEN}
+
+ PWLEN = 256; // Maximum password length
+ {$EXTERNALSYM PWLEN}
+ LM20_PWLEN = 14; // LM 2.0 Maximum password length
+ {$EXTERNALSYM LM20_PWLEN}
+
+ SHPWLEN = 8; // Share password length (bytes)
+ {$EXTERNALSYM SHPWLEN}
+
+ CLTYPE_LEN = 12; // Length of client type string
+ {$EXTERNALSYM CLTYPE_LEN}
+
+ MAXCOMMENTSZ = 256; // Multipurpose comment length
+ {$EXTERNALSYM MAXCOMMENTSZ}
+ LM20_MAXCOMMENTSZ = 48; // LM 2.0 Multipurpose comment length
+ {$EXTERNALSYM LM20_MAXCOMMENTSZ}
+
+ QNLEN = NNLEN; // Queue name maximum length
+ {$EXTERNALSYM QNLEN}
+ LM20_QNLEN = LM20_NNLEN; // LM 2.0 Queue name maximum length
+ {$EXTERNALSYM LM20_QNLEN}
+
+//#if (QNLEN != NNLEN)
+//# error QNLEN and NNLEN are not equal
+//#endif
+
+//
+// The ALERTSZ and MAXDEVENTRIES defines have not yet been NT'ized.
+// Whoever ports these components should change these values appropriately.
+//
+
+ ALERTSZ = 128; // size of alert string in server
+ {$EXTERNALSYM ALERTSZ}
+ MAXDEVENTRIES = SizeOf(Integer)*8; // Max number of device entries
+ {$EXTERNALSYM MAXDEVENTRIES}
+
+ //
+ // We use int bitmap to represent
+ //
+
+ NETBIOS_NAME_LEN = 16; // NetBIOS net name (bytes)
+ {$EXTERNALSYM NETBIOS_NAME_LEN}
+
+//
+// Value to be used with APIs which have a "preferred maximum length"
+// parameter. This value indicates that the API should just allocate
+// "as much as it takes."
+//
+
+ MAX_PREFERRED_LENGTH = DWORD(-1);
+ {$EXTERNALSYM MAX_PREFERRED_LENGTH}
+
+//
+// Constants used with encryption
+//
+
+ CRYPT_KEY_LEN = 7;
+ {$EXTERNALSYM CRYPT_KEY_LEN}
+ CRYPT_TXT_LEN = 8;
+ {$EXTERNALSYM CRYPT_TXT_LEN}
+ ENCRYPTED_PWLEN = 16;
+ {$EXTERNALSYM ENCRYPTED_PWLEN}
+ SESSION_PWLEN = 24;
+ {$EXTERNALSYM SESSION_PWLEN}
+ SESSION_CRYPT_KLEN = 21;
+ {$EXTERNALSYM SESSION_CRYPT_KLEN}
+
+//
+// Value to be used with SetInfo calls to allow setting of all
+// settable parameters (parmnum zero option)
+//
+
+ PARMNUM_ALL = 0;
+ {$EXTERNALSYM PARMNUM_ALL}
+
+ PARM_ERROR_UNKNOWN = DWORD(-1);
+ {$EXTERNALSYM PARM_ERROR_UNKNOWN}
+ PARM_ERROR_NONE = 0;
+ {$EXTERNALSYM PARM_ERROR_NONE}
+ PARMNUM_BASE_INFOLEVEL = 1000;
+ {$EXTERNALSYM PARMNUM_BASE_INFOLEVEL}
+
+//
+// Only the UNICODE version of the LM APIs are available on NT.
+// Non-UNICODE version on other platforms
+//
+
+//#if defined( _WIN32_WINNT ) || defined( WINNT ) || defined( FORCE_UNICODE )
+
+{$IFDEF WINNT4_UP}
+{$DEFINE LM_USE_UNICODE}
+{$ENDIF WINNT4_UP}
+
+{$IFDEF LM_FORCE_UNICODE}
+{$DEFINE LM_USE_UNICODE}
+{$ENDIF LM_FORCE_UNICODE}
+
+{$IFDEF LM_USE_UNICODE}
+
+type
+ LMSTR = LPWSTR;
+ {$EXTERNALSYM LMSTR}
+ LMCSTR = LPCWSTR;
+ {$EXTERNALSYM LMCSTR}
+ PLMSTR = ^LMSTR;
+ {$NODEFINE PLMSTR}
+
+const
+ MESSAGE_FILENAME = WideString('NETMSG');
+ {$EXTERNALSYM MESSAGE_FILENAME}
+ OS2MSG_FILENAME = WideString('BASE');
+ {$EXTERNALSYM OS2MSG_FILENAME}
+ HELP_MSG_FILENAME = WideString('NETH');
+ {$EXTERNALSYM HELP_MSG_FILENAME}
+
+// ** INTERNAL_ONLY **
+
+// The backup message file named here is a duplicate of net.msg. It
+// is not shipped with the product, but is used at buildtime to
+// msgbind certain messages to netapi.dll and some of the services.
+// This allows for OEMs to modify the message text in net.msg and
+// have those changes show up. Only in case there is an error in
+// retrieving the messages from net.msg do we then get the bound
+// messages out of bak.msg (really out of the message segment).
+
+ BACKUP_MSG_FILENAME = WideString('BAK.MSG');
+ {$EXTERNALSYM BACKUP_MSG_FILENAME}
+
+// ** END_INTERNAL **
+
+{$ELSE}
+
+type
+ LMSTR = LPSTR;
+ {$EXTERNALSYM LMSTR}
+ LMCSTR = LPCSTR;
+ {$EXTERNALSYM LMCSTR}
+
+const
+ MESSAGE_FILENAME = AnsiString('NETMSG');
+ {$EXTERNALSYM MESSAGE_FILENAME}
+ OS2MSG_FILENAME = AnsiString('BASE');
+ {$EXTERNALSYM OS2MSG_FILENAME}
+ HELP_MSG_FILENAME = AnsiString('NETH');
+ {$EXTERNALSYM HELP_MSG_FILENAME}
+
+// ** INTERNAL_ONLY **
+
+// The backup message file named here is a duplicate of net.msg. It
+// is not shipped with the product, but is used at buildtime to
+// msgbind certain messages to netapi.dll and some of the services.
+// This allows for OEMs to modify the message text in net.msg and
+// have those changes show up. Only in case there is an error in
+// retrieving the messages from net.msg do we then get the bound
+// messages out of bak.msg (really out of the message segment).
+
+ BACKUP_MSG_FILENAME = LMSTR('BAK.MSG');
+ {$EXTERNALSYM BACKUP_MSG_FILENAME}
+
+// ** END_INTERNAL **
+
+{$ENDIF LM_USE_UNICODE}
+
+{$UNDEF LM_USE_UNICODE}
+
+//
+// Message File Names
+//
+
+//
+// Keywords used in Function Prototypes
+//
+
+type
+ NET_API_STATUS = DWORD;
+ {$EXTERNALSYM NET_API_STATUS}
+ TNetApiStatus = NET_API_STATUS;
+
+//
+// The platform ID indicates the levels to use for platform-specific
+// information.
+//
+
+const
+ PLATFORM_ID_DOS = 300;
+ {$EXTERNALSYM PLATFORM_ID_DOS}
+ PLATFORM_ID_OS2 = 400;
+ {$EXTERNALSYM PLATFORM_ID_OS2}
+ PLATFORM_ID_NT = 500;
+ {$EXTERNALSYM PLATFORM_ID_NT}
+ PLATFORM_ID_OSF = 600;
+ {$EXTERNALSYM PLATFORM_ID_OSF}
+ PLATFORM_ID_VMS = 700;
+ {$EXTERNALSYM PLATFORM_ID_VMS}
+
+//
+// There message numbers assigned to different LANMAN components
+// are as defined below.
+//
+// lmerr.h: 2100 - 2999 NERR_BASE
+// alertmsg.h: 3000 - 3049 ALERT_BASE
+// lmsvc.h: 3050 - 3099 SERVICE_BASE
+// lmerrlog.h: 3100 - 3299 ERRLOG_BASE
+// msgtext.h: 3300 - 3499 MTXT_BASE
+// apperr.h: 3500 - 3999 APPERR_BASE
+// apperrfs.h: 4000 - 4299 APPERRFS_BASE
+// apperr2.h: 4300 - 5299 APPERR2_BASE
+// ncberr.h: 5300 - 5499 NRCERR_BASE
+// alertmsg.h: 5500 - 5599 ALERT2_BASE
+// lmsvc.h: 5600 - 5699 SERVICE2_BASE
+// lmerrlog.h 5700 - 5899 ERRLOG2_BASE
+//
+
+ MIN_LANMAN_MESSAGE_ID = NERR_BASE;
+ {$EXTERNALSYM MIN_LANMAN_MESSAGE_ID}
+ MAX_LANMAN_MESSAGE_ID = 5899;
+ {$EXTERNALSYM MAX_LANMAN_MESSAGE_ID}
+
+implementation
+
+end.
diff --git a/packages/extra/winunits/jwalmdfs.pas b/packages/extra/winunits/jwalmdfs.pas
index 21ed1e483c..febc63af92 100644
--- a/packages/extra/winunits/jwalmdfs.pas
+++ b/packages/extra/winunits/jwalmdfs.pas
@@ -1,731 +1,731 @@
-{******************************************************************************}
-{ }
-{ Lan Manager DFS API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: lmdfs.h, released November 2001. The original Pascal }
-{ code is: LmDfs.pas, released Februari 2002. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwalmdfs.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaLmDFS;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "lmdfs.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaLmCons, JwaWinType;
-
-//
-// DFS Volume state
-//
-
-const
- DFS_VOLUME_STATES = $F;
- {$EXTERNALSYM DFS_VOLUME_STATES}
-
- DFS_VOLUME_STATE_OK = 1;
- {$EXTERNALSYM DFS_VOLUME_STATE_OK}
- DFS_VOLUME_STATE_INCONSISTENT = 2;
- {$EXTERNALSYM DFS_VOLUME_STATE_INCONSISTENT}
- DFS_VOLUME_STATE_OFFLINE = 3;
- {$EXTERNALSYM DFS_VOLUME_STATE_OFFLINE}
- DFS_VOLUME_STATE_ONLINE = 4;
- {$EXTERNALSYM DFS_VOLUME_STATE_ONLINE}
-
-//
-// These are valid for setting the volume state on the root
-// These are available to force a resynchronize on the root
-// volume or to put it in a standby mode.
-//
-
- DFS_VOLUME_STATE_RESYNCHRONIZE = $10;
- {$EXTERNALSYM DFS_VOLUME_STATE_RESYNCHRONIZE}
- DFS_VOLUME_STATE_STANDBY = $20;
- {$EXTERNALSYM DFS_VOLUME_STATE_STANDBY}
-
-//
-// These are valid on getting the volume state on the root
-// These are available to determine the flavor of DFS
-// A few bits are reserved to determine the flavor of the DFS root.
-// To get the flavor, and the state with DFS_VOLUME_FLAVORS.
-//
-// (_state & DFS_VOLUME_FLAVORS) will tell you the flavor of the dfs root.
-//
-//
-
- DFS_VOLUME_FLAVORS = $0300;
- {$EXTERNALSYM DFS_VOLUME_FLAVORS}
-
- DFS_VOLUME_FLAVOR_UNUSED1 = $0000;
- {$EXTERNALSYM DFS_VOLUME_FLAVOR_UNUSED1}
- DFS_VOLUME_FLAVOR_STANDALONE = $0100;
- {$EXTERNALSYM DFS_VOLUME_FLAVOR_STANDALONE}
- DFS_VOLUME_FLAVOR_AD_BLOB = $0200;
- {$EXTERNALSYM DFS_VOLUME_FLAVOR_AD_BLOB}
- DFS_STORAGE_FLAVOR_UNUSED2 = $0300;
- {$EXTERNALSYM DFS_STORAGE_FLAVOR_UNUSED2}
-
-//
-// DFS Storage State
-//
-
- DFS_STORAGE_STATES = $F;
- {$EXTERNALSYM DFS_STORAGE_STATES}
- DFS_STORAGE_STATE_OFFLINE = 1;
- {$EXTERNALSYM DFS_STORAGE_STATE_OFFLINE}
- DFS_STORAGE_STATE_ONLINE = 2;
- {$EXTERNALSYM DFS_STORAGE_STATE_ONLINE}
- DFS_STORAGE_STATE_ACTIVE = 4;
- {$EXTERNALSYM DFS_STORAGE_STATE_ACTIVE}
-
-//
-// Level 1:
-//
-
-type
- LPDFS_INFO_1 = ^DFS_INFO_1;
- {$EXTERNALSYM LPDFS_INFO_1}
- PDFS_INFO_1 = ^DFS_INFO_1;
- {$EXTERNALSYM PDFS_INFO_1}
- _DFS_INFO_1 = record
- EntryPath: LPWSTR; // Dfs name for the top of this piece of storage
- end;
- {$EXTERNALSYM _DFS_INFO_1}
- DFS_INFO_1 = _DFS_INFO_1;
- {$EXTERNALSYM DFS_INFO_1}
- TDfsInfo1 = DFS_INFO_1;
- PDfsInfo1 = PDFS_INFO_1;
-
-//
-// Level 2:
-//
-
- LPDFS_INFO_2 = ^DFS_INFO_2;
- {$EXTERNALSYM LPDFS_INFO_2}
- PDFS_INFO_2 = ^DFS_INFO_2;
- {$EXTERNALSYM PDFS_INFO_2}
- _DFS_INFO_2 = record
- EntryPath: LPWSTR; // Dfs name for the top of this volume
- Comment: LPWSTR; // Comment for this volume
- State: DWORD; // State of this volume, one of DFS_VOLUME_STATE_*
- NumberOfStorages: DWORD; // Number of storages for this volume
- end;
- {$EXTERNALSYM _DFS_INFO_2}
- DFS_INFO_2 = _DFS_INFO_2;
- {$EXTERNALSYM DFS_INFO_2}
- TDfsInfo2 = DFS_INFO_2;
- PDfsInfo2 = PDFS_INFO_2;
-
- LPDFS_STORAGE_INFO = ^DFS_STORAGE_INFO;
- {$EXTERNALSYM LPDFS_STORAGE_INFO}
- PDFS_STORAGE_INFO = ^DFS_STORAGE_INFO;
- {$EXTERNALSYM PDFS_STORAGE_INFO}
- _DFS_STORAGE_INFO = record
- State: ULONG; // State of this storage, one of DFS_STORAGE_STATE_*
- // possibly OR'd with DFS_STORAGE_STATE_ACTIVE
- ServerName: LPWSTR; // Name of server hosting this storage
- ShareName: LPWSTR; // Name of share hosting this storage
- end;
- {$EXTERNALSYM _DFS_STORAGE_INFO}
- DFS_STORAGE_INFO = _DFS_STORAGE_INFO;
- {$EXTERNALSYM DFS_STORAGE_INFO}
- TDfsStorageInfo = DFS_STORAGE_INFO;
- PDfsStorageInfo = PDFS_STORAGE_INFO;
-
-//
-// Level 3:
-//
-
- LPDFS_INFO_3 = ^DFS_INFO_3;
- {$EXTERNALSYM LPDFS_INFO_3}
- PDFS_INFO_3 = ^DFS_INFO_3;
- {$EXTERNALSYM PDFS_INFO_3}
- _DFS_INFO_3 = record
- EntryPath: LPWSTR; // Dfs name for the top of this volume
- Comment: LPWSTR; // Comment for this volume
- State: DWORD; // State of this volume, one of DFS_VOLUME_STATE_*
- NumberOfStorages: DWORD; // Number of storage servers for this volume
- Storage: LPDFS_STORAGE_INFO; // An array (of NumberOfStorages elements) of storage-specific information.
- end;
- {$EXTERNALSYM _DFS_INFO_3}
- DFS_INFO_3 = _DFS_INFO_3;
- {$EXTERNALSYM DFS_INFO_3}
- TDfsInfo3 = DFS_INFO_3;
- PDfsInfo3 = PDFS_INFO_3;
-
-//
-// Level 4:
-//
-
- LPDFS_INFO_4 = ^DFS_INFO_4;
- {$EXTERNALSYM LPDFS_INFO_4}
- PDFS_INFO_4 = ^DFS_INFO_4;
- {$EXTERNALSYM PDFS_INFO_4}
- _DFS_INFO_4 = record
- EntryPath: LPWSTR; // Dfs name for the top of this volume
- Comment: LPWSTR; // Comment for this volume
- State: DWORD; // State of this volume, one of DFS_VOLUME_STATE_*
- Timeout: ULONG; // Timeout, in seconds, of this junction point
- Guid: GUID; // Guid of this junction point
- NumberOfStorages: DWORD; // Number of storage servers for this volume
- Storage: LPDFS_STORAGE_INFO; // An array (of NumberOfStorages elements) of storage-specific information.
- end;
- {$EXTERNALSYM _DFS_INFO_4}
- DFS_INFO_4 = _DFS_INFO_4;
- {$EXTERNALSYM DFS_INFO_4}
- TDfsInfo4 = DFS_INFO_4;
- PDfsInfo4 = PDFS_INFO_4;
-
-//
-// Level 100:
-//
-
- LPDFS_INFO_100 = ^DFS_INFO_100;
- {$EXTERNALSYM LPDFS_INFO_100}
- PDFS_INFO_100 = ^DFS_INFO_100;
- {$EXTERNALSYM PDFS_INFO_100}
- _DFS_INFO_100 = record
- Comment: LPWSTR; // Comment for this volume or storage
- end;
- {$EXTERNALSYM _DFS_INFO_100}
- DFS_INFO_100 = _DFS_INFO_100;
- {$EXTERNALSYM DFS_INFO_100}
- TDfsInfo100 = DFS_INFO_100;
- PDfsInfo100 = PDFS_INFO_100;
-
-//
-// Level 101:
-//
-
- LPDFS_INFO_101 = ^DFS_INFO_101;
- {$EXTERNALSYM LPDFS_INFO_101}
- PDFS_INFO_101 = ^DFS_INFO_101;
- {$EXTERNALSYM PDFS_INFO_101}
- _DFS_INFO_101 = record
- State: DWORD; // State of this storage, one of DFS_STORAGE_STATE_*
- // possibly OR'd with DFS_STORAGE_STATE_ACTIVE
- end;
- {$EXTERNALSYM _DFS_INFO_101}
- DFS_INFO_101 = _DFS_INFO_101;
- {$EXTERNALSYM DFS_INFO_101}
- TDfsInfo101 = DFS_INFO_101;
- PDfsInfo101 = PDFS_INFO_101;
-
-//
-// Level 102:
-//
-
- LPDFS_INFO_102 = ^DFS_INFO_102;
- {$EXTERNALSYM LPDFS_INFO_102}
- PDFS_INFO_102 = ^DFS_INFO_102;
- {$EXTERNALSYM PDFS_INFO_102}
- _DFS_INFO_102 = record
- Timeout: ULONG; // Timeout, in seconds, of the junction
- end;
- {$EXTERNALSYM _DFS_INFO_102}
- DFS_INFO_102 = _DFS_INFO_102;
- {$EXTERNALSYM DFS_INFO_102}
- TDfsInfo102 = DFS_INFO_102;
- PDfsInfo102 = PDFS_INFO_102;
-
-//
-// Level 200:
-//
-
- LPDFS_INFO_200 = ^DFS_INFO_200;
- {$EXTERNALSYM LPDFS_INFO_200}
- PDFS_INFO_200 = ^DFS_INFO_200;
- {$EXTERNALSYM PDFS_INFO_200}
- _DFS_INFO_200 = record
- FtDfsName: LPWSTR; // FtDfs name
- end;
- {$EXTERNALSYM _DFS_INFO_200}
- DFS_INFO_200 = _DFS_INFO_200;
- {$EXTERNALSYM DFS_INFO_200}
- TDfsInfo200 = DFS_INFO_200;
- PDfsInfo200 = PDFS_INFO_200;
-
-//
-// Level 300:
-//
-
- LPDFS_INFO_300 = ^DFS_INFO_300;
- {$EXTERNALSYM LPDFS_INFO_300}
- PDFS_INFO_300 = ^DFS_INFO_300;
- {$EXTERNALSYM PDFS_INFO_300}
- _DFS_INFO_300 = record
- Flags: DWORD;
- DfsName: LPWSTR; // Dfs name
- end;
- {$EXTERNALSYM _DFS_INFO_300}
- DFS_INFO_300 = _DFS_INFO_300;
- {$EXTERNALSYM DFS_INFO_300}
- TDfsInfo300 = DFS_INFO_300;
- PDfsInfo300 = PDFS_INFO_300;
-
-//
-// Add a new volume or additional storage for an existing volume at
-// DfsEntryPath.
-//
-
-function NetDfsAdd(DfsEntryPath, ServerName, ShareName, Comment: LPWSTR; Flags: DWORD): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetDfsAdd}
-
-//
-// Flags:
-//
-
-const
- DFS_ADD_VOLUME = 1; // Add a new volume to the DFS if not already there
- {$EXTERNALSYM DFS_ADD_VOLUME}
- DFS_RESTORE_VOLUME = 2; // Volume/Replica is being restored - do not verify share etc.
- {$EXTERNALSYM DFS_RESTORE_VOLUME}
-
-//
-// Setup/teardown API's for standard and FtDfs roots.
-//
-
-function NetDfsAddStdRoot(ServerName, RootShare, Comment: LPWSTR; Flags: DWORD): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetDfsAddStdRoot}
-
-function NetDfsRemoveStdRoot(ServerName, RootShare: LPWSTR; Flags: DWORD): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetDfsRemoveStdRoot}
-
-function NetDfsAddFtRoot(ServerName, RootShare, FtDfsName, Comment: LPWSTR; Flags: DWORD): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetDfsAddFtRoot}
-
-function NetDfsRemoveFtRoot(ServerName, RootShare, FtDfsName: LPWSTR; Flags: DWORD): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetDfsRemoveFtRoot}
-
-function NetDfsRemoveFtRootForced(DomainName, ServerName, RootShare, FtDfsName: LPWSTR; Flags: DWORD): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetDfsRemoveFtRootForced}
-
-//
-// Call to reinitialize the dfsmanager on a machine
-//
-
-function NetDfsManagerInitialize(ServerName: LPWSTR; Flags: DWORD): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetDfsManagerInitialize}
-
-function NetDfsAddStdRootForced(ServerName, RootShare, Comment, Store: LPWSTR): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetDfsAddStdRootForced}
-
-function NetDfsGetDcAddress(ServerName: LPWSTR; var DcIpAddress: LPWSTR; var IsRoot: BOOLEAN; Timeout: PULONG): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetDfsGetDcAddress}
-
-//
-// Flags for NetDfsSetDcAddress()
-//
-
-const
- NET_DFS_SETDC_FLAGS = $00000000;
- {$EXTERNALSYM NET_DFS_SETDC_FLAGS}
- NET_DFS_SETDC_TIMEOUT = $00000001;
- {$EXTERNALSYM NET_DFS_SETDC_TIMEOUT}
- NET_DFS_SETDC_INITPKT = $00000002;
- {$EXTERNALSYM NET_DFS_SETDC_INITPKT}
-
-//
-// Structures used for site reporting
-//
-
-type
- LPDFS_SITENAME_INFO = ^DFS_SITENAME_INFO;
- {$EXTERNALSYM LPDFS_SITENAME_INFO}
- PDFS_SITENAME_INFO = ^DFS_SITENAME_INFO;
- {$EXTERNALSYM PDFS_SITENAME_INFO}
- DFS_SITENAME_INFO = record
- SiteFlags: ULONG; // Below
- SiteName: LPWSTR;
- end;
- {$EXTERNALSYM DFS_SITENAME_INFO}
- TDfsSiteNameInfo = DFS_SITENAME_INFO;
- PDfsSiteNameInfo = PDFS_SITENAME_INFO;
-
-// SiteFlags
-
-const
- DFS_SITE_PRIMARY = $1; // This site returned by DsGetSiteName()
- {$EXTERNALSYM DFS_SITE_PRIMARY}
-
-type
- LPDFS_SITELIST_INFO = ^DFS_SITELIST_INFO;
- {$EXTERNALSYM LPDFS_SITELIST_INFO}
- PDFS_SITELIST_INFO = ^DFS_SITELIST_INFO;
- {$EXTERNALSYM PDFS_SITELIST_INFO}
- DFS_SITELIST_INFO = record
- cSites: ULONG;
- Site: array [0..0] of DFS_SITENAME_INFO;
- end;
- {$EXTERNALSYM DFS_SITELIST_INFO}
- TDfsSiteListInfo = DFS_SITELIST_INFO;
- PDfsSiteListInfo = PDFS_SITELIST_INFO;
-
-//
-// Remove a volume or additional storage for volume from the Dfs at
-// DfsEntryPath. When applied to the last storage in a volume, removes
-// the volume from the DFS.
-//
-
-function NetDfsRemove(DfsEntryPath, ServerName, ShareName: LPWSTR): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetDfsRemove}
-
-//
-// Get information about all of the volumes in the Dfs. DfsName is
-// the "server" part of the UNC name used to refer to this particular Dfs.
-//
-// Valid levels are 1-4, 200
-//
-
-function NetDfsEnum(DfsName: LPWSTR; Level, PrefMaxLen: DWORD; var Buffer: LPBYTE; EntriesRead, ResumeHandle: LPDWORD): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetDfsEnum}
-
-//
-// Get information about the volume or storage.
-// If ServerName and ShareName are specified, the information returned
-// is specific to that server and share, else the information is specific
-// to the volume as a whole.
-//
-// Valid levels are 1-4, 100
-//
-
-function NetDfsGetInfo(DfsEntryPath, ServerName, ShareName: LPWSTR; Level: DWORD; var Buffer: LPBYTE): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetDfsGetInfo}
-
-//
-// Set info about the volume or storage.
-// If ServerName and ShareName are specified, the information set is
-// specific to that server and share, else the information is specific
-// to the volume as a whole.
-//
-// Valid levels are 100, 101 and 102
-//
-
-function NetDfsSetInfo(DfsEntryPath, ServerName, ShareName: LPWSTR; Level: DWORD; Buffer: LPBYTE): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetDfsSetInfo}
-
-//
-// Get client's cached information about the volume or storage.
-// If ServerName and ShareName are specified, the information returned
-// is specific to that server and share, else the information is specific
-// to the volume as a whole.
-//
-// Valid levels are 1-4
-//
-
-function NetDfsGetClientInfo(DfsEntryPath, ServerName, ShareName: LPWSTR; Level: DWORD; var Buffer: LPBYTE): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetDfsGetClientInfo}
-
-//
-// Set client's cached info about the volume or storage.
-// If ServerName and ShareName are specified, the information set is
-// specific to that server and share, else the information is specific
-// to the volume as a whole.
-//
-// Valid levels are 101 and 102.
-//
-
-function NetDfsSetClientInfo(DfsEntryPath, ServerName, ShareName: LPWSTR; Level: DWORD; Buffer: LPBYTE): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetDfsSetClientInfo}
-
-//
-// Move a DFS volume and all subordinate volumes from one place in the
-// DFS to another place in the DFS.
-//
-
-function NetDfsMove(DfsEntryPath: LPWSTR; DfsNewEntryPath: LPWSTR): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetDfsMove}
-
-function NetDfsRename(Path: LPWSTR; NewPath: LPWSTR): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetDfsRename}
-
-implementation
-
-{$IFDEF DYNAMIC_LINK}
-
-var
- _NetDfsAdd: Pointer;
-
-function NetDfsAdd;
-begin
- GetProcedureAddress(_NetDfsAdd, netapi32, 'NetDfsAdd');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetDfsAdd]
- end;
-end;
-
-var
- _NetDfsAddStdRoot: Pointer;
-
-function NetDfsAddStdRoot;
-begin
- GetProcedureAddress(_NetDfsAddStdRoot, netapi32, 'NetDfsAddStdRoot');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetDfsAddStdRoot]
- end;
-end;
-
-var
- _NetDfsRemoveStdRoot: Pointer;
-
-function NetDfsRemoveStdRoot;
-begin
- GetProcedureAddress(_NetDfsRemoveStdRoot, netapi32, 'NetDfsRemoveStdRoot');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetDfsRemoveStdRoot]
- end;
-end;
-
-var
- _NetDfsAddFtRoot: Pointer;
-
-function NetDfsAddFtRoot;
-begin
- GetProcedureAddress(_NetDfsAddFtRoot, netapi32, 'NetDfsAddFtRoot');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetDfsAddFtRoot]
- end;
-end;
-
-var
- _NetDfsRemoveFtRoot: Pointer;
-
-function NetDfsRemoveFtRoot;
-begin
- GetProcedureAddress(_NetDfsRemoveFtRoot, netapi32, 'NetDfsRemoveFtRoot');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetDfsRemoveFtRoot]
- end;
-end;
-
-var
- _NetDfsRemoveFtRootForced: Pointer;
-
-function NetDfsRemoveFtRootForced;
-begin
- GetProcedureAddress(_NetDfsRemoveFtRootForced, netapi32, 'NetDfsRemoveFtRootForced');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetDfsRemoveFtRootForced]
- end;
-end;
-
-var
- _NetDfsManagerInitialize: Pointer;
-
-function NetDfsManagerInitialize;
-begin
- GetProcedureAddress(_NetDfsManagerInitialize, netapi32, 'NetDfsManagerInitialize');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetDfsManagerInitialize]
- end;
-end;
-
-var
- _NetDfsAddStdRootForced: Pointer;
-
-function NetDfsAddStdRootForced;
-begin
- GetProcedureAddress(_NetDfsAddStdRootForced, netapi32, 'NetDfsAddStdRootForced');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetDfsAddStdRootForced]
- end;
-end;
-
-var
- _NetDfsGetDcAddress: Pointer;
-
-function NetDfsGetDcAddress;
-begin
- GetProcedureAddress(_NetDfsGetDcAddress, netapi32, 'NetDfsGetDcAddress');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetDfsGetDcAddress]
- end;
-end;
-
-var
- _NetDfsRemove: Pointer;
-
-function NetDfsRemove;
-begin
- GetProcedureAddress(_NetDfsRemove, netapi32, 'NetDfsRemove');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetDfsRemove]
- end;
-end;
-
-var
- _NetDfsEnum: Pointer;
-
-function NetDfsEnum;
-begin
- GetProcedureAddress(_NetDfsEnum, netapi32, 'NetDfsEnum');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetDfsEnum]
- end;
-end;
-
-var
- _NetDfsGetInfo: Pointer;
-
-function NetDfsGetInfo;
-begin
- GetProcedureAddress(_NetDfsGetInfo, netapi32, 'NetDfsGetInfo');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetDfsGetInfo]
- end;
-end;
-
-var
- _NetDfsSetInfo: Pointer;
-
-function NetDfsSetInfo;
-begin
- GetProcedureAddress(_NetDfsSetInfo, netapi32, 'NetDfsSetInfo');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetDfsSetInfo]
- end;
-end;
-
-var
- _NetDfsGetClientInfo: Pointer;
-
-function NetDfsGetClientInfo;
-begin
- GetProcedureAddress(_NetDfsGetClientInfo, netapi32, 'NetDfsGetClientInfo');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetDfsGetClientInfo]
- end;
-end;
-
-var
- _NetDfsSetClientInfo: Pointer;
-
-function NetDfsSetClientInfo;
-begin
- GetProcedureAddress(_NetDfsSetClientInfo, netapi32, 'NetDfsSetClientInfo');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetDfsSetClientInfo]
- end;
-end;
-
-var
- _NetDfsMove: Pointer;
-
-function NetDfsMove;
-begin
- GetProcedureAddress(_NetDfsMove, netapi32, 'NetDfsMove');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetDfsMove]
- end;
-end;
-
-var
- _NetDfsRename: Pointer;
-
-function NetDfsRename;
-begin
- GetProcedureAddress(_NetDfsRename, netapi32, 'NetDfsRename');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetDfsRename]
- end;
-end;
-
-{$ELSE}
-
-function NetDfsAdd; external netapi32 name 'NetDfsAdd';
-function NetDfsAddStdRoot; external netapi32 name 'NetDfsAddStdRoot';
-function NetDfsRemoveStdRoot; external netapi32 name 'NetDfsRemoveStdRoot';
-function NetDfsAddFtRoot; external netapi32 name 'NetDfsAddFtRoot';
-function NetDfsRemoveFtRoot; external netapi32 name 'NetDfsRemoveFtRoot';
-function NetDfsRemoveFtRootForced; external netapi32 name 'NetDfsRemoveFtRootForced';
-function NetDfsManagerInitialize; external netapi32 name 'NetDfsManagerInitialize';
-function NetDfsAddStdRootForced; external netapi32 name 'NetDfsAddStdRootForced';
-function NetDfsGetDcAddress; external netapi32 name 'NetDfsGetDcAddress';
-function NetDfsRemove; external netapi32 name 'NetDfsRemove';
-function NetDfsEnum; external netapi32 name 'NetDfsEnum';
-function NetDfsGetInfo; external netapi32 name 'NetDfsGetInfo';
-function NetDfsSetInfo; external netapi32 name 'NetDfsSetInfo';
-function NetDfsGetClientInfo; external netapi32 name 'NetDfsGetClientInfo';
-function NetDfsSetClientInfo; external netapi32 name 'NetDfsSetClientInfo';
-function NetDfsMove; external netapi32 name 'NetDfsMove';
-function NetDfsRename; external netapi32 name 'NetDfsRename';
-
-{$ENDIF DYNAMIC_LINK}
-
-end.
+{******************************************************************************}
+{ }
+{ Lan Manager DFS API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: lmdfs.h, released November 2001. The original Pascal }
+{ code is: LmDfs.pas, released Februari 2002. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwalmdfs.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaLmDFS;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "lmdfs.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaLmCons, JwaWinType;
+
+//
+// DFS Volume state
+//
+
+const
+ DFS_VOLUME_STATES = $F;
+ {$EXTERNALSYM DFS_VOLUME_STATES}
+
+ DFS_VOLUME_STATE_OK = 1;
+ {$EXTERNALSYM DFS_VOLUME_STATE_OK}
+ DFS_VOLUME_STATE_INCONSISTENT = 2;
+ {$EXTERNALSYM DFS_VOLUME_STATE_INCONSISTENT}
+ DFS_VOLUME_STATE_OFFLINE = 3;
+ {$EXTERNALSYM DFS_VOLUME_STATE_OFFLINE}
+ DFS_VOLUME_STATE_ONLINE = 4;
+ {$EXTERNALSYM DFS_VOLUME_STATE_ONLINE}
+
+//
+// These are valid for setting the volume state on the root
+// These are available to force a resynchronize on the root
+// volume or to put it in a standby mode.
+//
+
+ DFS_VOLUME_STATE_RESYNCHRONIZE = $10;
+ {$EXTERNALSYM DFS_VOLUME_STATE_RESYNCHRONIZE}
+ DFS_VOLUME_STATE_STANDBY = $20;
+ {$EXTERNALSYM DFS_VOLUME_STATE_STANDBY}
+
+//
+// These are valid on getting the volume state on the root
+// These are available to determine the flavor of DFS
+// A few bits are reserved to determine the flavor of the DFS root.
+// To get the flavor, and the state with DFS_VOLUME_FLAVORS.
+//
+// (_state & DFS_VOLUME_FLAVORS) will tell you the flavor of the dfs root.
+//
+//
+
+ DFS_VOLUME_FLAVORS = $0300;
+ {$EXTERNALSYM DFS_VOLUME_FLAVORS}
+
+ DFS_VOLUME_FLAVOR_UNUSED1 = $0000;
+ {$EXTERNALSYM DFS_VOLUME_FLAVOR_UNUSED1}
+ DFS_VOLUME_FLAVOR_STANDALONE = $0100;
+ {$EXTERNALSYM DFS_VOLUME_FLAVOR_STANDALONE}
+ DFS_VOLUME_FLAVOR_AD_BLOB = $0200;
+ {$EXTERNALSYM DFS_VOLUME_FLAVOR_AD_BLOB}
+ DFS_STORAGE_FLAVOR_UNUSED2 = $0300;
+ {$EXTERNALSYM DFS_STORAGE_FLAVOR_UNUSED2}
+
+//
+// DFS Storage State
+//
+
+ DFS_STORAGE_STATES = $F;
+ {$EXTERNALSYM DFS_STORAGE_STATES}
+ DFS_STORAGE_STATE_OFFLINE = 1;
+ {$EXTERNALSYM DFS_STORAGE_STATE_OFFLINE}
+ DFS_STORAGE_STATE_ONLINE = 2;
+ {$EXTERNALSYM DFS_STORAGE_STATE_ONLINE}
+ DFS_STORAGE_STATE_ACTIVE = 4;
+ {$EXTERNALSYM DFS_STORAGE_STATE_ACTIVE}
+
+//
+// Level 1:
+//
+
+type
+ LPDFS_INFO_1 = ^DFS_INFO_1;
+ {$EXTERNALSYM LPDFS_INFO_1}
+ PDFS_INFO_1 = ^DFS_INFO_1;
+ {$EXTERNALSYM PDFS_INFO_1}
+ _DFS_INFO_1 = record
+ EntryPath: LPWSTR; // Dfs name for the top of this piece of storage
+ end;
+ {$EXTERNALSYM _DFS_INFO_1}
+ DFS_INFO_1 = _DFS_INFO_1;
+ {$EXTERNALSYM DFS_INFO_1}
+ TDfsInfo1 = DFS_INFO_1;
+ PDfsInfo1 = PDFS_INFO_1;
+
+//
+// Level 2:
+//
+
+ LPDFS_INFO_2 = ^DFS_INFO_2;
+ {$EXTERNALSYM LPDFS_INFO_2}
+ PDFS_INFO_2 = ^DFS_INFO_2;
+ {$EXTERNALSYM PDFS_INFO_2}
+ _DFS_INFO_2 = record
+ EntryPath: LPWSTR; // Dfs name for the top of this volume
+ Comment: LPWSTR; // Comment for this volume
+ State: DWORD; // State of this volume, one of DFS_VOLUME_STATE_*
+ NumberOfStorages: DWORD; // Number of storages for this volume
+ end;
+ {$EXTERNALSYM _DFS_INFO_2}
+ DFS_INFO_2 = _DFS_INFO_2;
+ {$EXTERNALSYM DFS_INFO_2}
+ TDfsInfo2 = DFS_INFO_2;
+ PDfsInfo2 = PDFS_INFO_2;
+
+ LPDFS_STORAGE_INFO = ^DFS_STORAGE_INFO;
+ {$EXTERNALSYM LPDFS_STORAGE_INFO}
+ PDFS_STORAGE_INFO = ^DFS_STORAGE_INFO;
+ {$EXTERNALSYM PDFS_STORAGE_INFO}
+ _DFS_STORAGE_INFO = record
+ State: ULONG; // State of this storage, one of DFS_STORAGE_STATE_*
+ // possibly OR'd with DFS_STORAGE_STATE_ACTIVE
+ ServerName: LPWSTR; // Name of server hosting this storage
+ ShareName: LPWSTR; // Name of share hosting this storage
+ end;
+ {$EXTERNALSYM _DFS_STORAGE_INFO}
+ DFS_STORAGE_INFO = _DFS_STORAGE_INFO;
+ {$EXTERNALSYM DFS_STORAGE_INFO}
+ TDfsStorageInfo = DFS_STORAGE_INFO;
+ PDfsStorageInfo = PDFS_STORAGE_INFO;
+
+//
+// Level 3:
+//
+
+ LPDFS_INFO_3 = ^DFS_INFO_3;
+ {$EXTERNALSYM LPDFS_INFO_3}
+ PDFS_INFO_3 = ^DFS_INFO_3;
+ {$EXTERNALSYM PDFS_INFO_3}
+ _DFS_INFO_3 = record
+ EntryPath: LPWSTR; // Dfs name for the top of this volume
+ Comment: LPWSTR; // Comment for this volume
+ State: DWORD; // State of this volume, one of DFS_VOLUME_STATE_*
+ NumberOfStorages: DWORD; // Number of storage servers for this volume
+ Storage: LPDFS_STORAGE_INFO; // An array (of NumberOfStorages elements) of storage-specific information.
+ end;
+ {$EXTERNALSYM _DFS_INFO_3}
+ DFS_INFO_3 = _DFS_INFO_3;
+ {$EXTERNALSYM DFS_INFO_3}
+ TDfsInfo3 = DFS_INFO_3;
+ PDfsInfo3 = PDFS_INFO_3;
+
+//
+// Level 4:
+//
+
+ LPDFS_INFO_4 = ^DFS_INFO_4;
+ {$EXTERNALSYM LPDFS_INFO_4}
+ PDFS_INFO_4 = ^DFS_INFO_4;
+ {$EXTERNALSYM PDFS_INFO_4}
+ _DFS_INFO_4 = record
+ EntryPath: LPWSTR; // Dfs name for the top of this volume
+ Comment: LPWSTR; // Comment for this volume
+ State: DWORD; // State of this volume, one of DFS_VOLUME_STATE_*
+ Timeout: ULONG; // Timeout, in seconds, of this junction point
+ Guid: GUID; // Guid of this junction point
+ NumberOfStorages: DWORD; // Number of storage servers for this volume
+ Storage: LPDFS_STORAGE_INFO; // An array (of NumberOfStorages elements) of storage-specific information.
+ end;
+ {$EXTERNALSYM _DFS_INFO_4}
+ DFS_INFO_4 = _DFS_INFO_4;
+ {$EXTERNALSYM DFS_INFO_4}
+ TDfsInfo4 = DFS_INFO_4;
+ PDfsInfo4 = PDFS_INFO_4;
+
+//
+// Level 100:
+//
+
+ LPDFS_INFO_100 = ^DFS_INFO_100;
+ {$EXTERNALSYM LPDFS_INFO_100}
+ PDFS_INFO_100 = ^DFS_INFO_100;
+ {$EXTERNALSYM PDFS_INFO_100}
+ _DFS_INFO_100 = record
+ Comment: LPWSTR; // Comment for this volume or storage
+ end;
+ {$EXTERNALSYM _DFS_INFO_100}
+ DFS_INFO_100 = _DFS_INFO_100;
+ {$EXTERNALSYM DFS_INFO_100}
+ TDfsInfo100 = DFS_INFO_100;
+ PDfsInfo100 = PDFS_INFO_100;
+
+//
+// Level 101:
+//
+
+ LPDFS_INFO_101 = ^DFS_INFO_101;
+ {$EXTERNALSYM LPDFS_INFO_101}
+ PDFS_INFO_101 = ^DFS_INFO_101;
+ {$EXTERNALSYM PDFS_INFO_101}
+ _DFS_INFO_101 = record
+ State: DWORD; // State of this storage, one of DFS_STORAGE_STATE_*
+ // possibly OR'd with DFS_STORAGE_STATE_ACTIVE
+ end;
+ {$EXTERNALSYM _DFS_INFO_101}
+ DFS_INFO_101 = _DFS_INFO_101;
+ {$EXTERNALSYM DFS_INFO_101}
+ TDfsInfo101 = DFS_INFO_101;
+ PDfsInfo101 = PDFS_INFO_101;
+
+//
+// Level 102:
+//
+
+ LPDFS_INFO_102 = ^DFS_INFO_102;
+ {$EXTERNALSYM LPDFS_INFO_102}
+ PDFS_INFO_102 = ^DFS_INFO_102;
+ {$EXTERNALSYM PDFS_INFO_102}
+ _DFS_INFO_102 = record
+ Timeout: ULONG; // Timeout, in seconds, of the junction
+ end;
+ {$EXTERNALSYM _DFS_INFO_102}
+ DFS_INFO_102 = _DFS_INFO_102;
+ {$EXTERNALSYM DFS_INFO_102}
+ TDfsInfo102 = DFS_INFO_102;
+ PDfsInfo102 = PDFS_INFO_102;
+
+//
+// Level 200:
+//
+
+ LPDFS_INFO_200 = ^DFS_INFO_200;
+ {$EXTERNALSYM LPDFS_INFO_200}
+ PDFS_INFO_200 = ^DFS_INFO_200;
+ {$EXTERNALSYM PDFS_INFO_200}
+ _DFS_INFO_200 = record
+ FtDfsName: LPWSTR; // FtDfs name
+ end;
+ {$EXTERNALSYM _DFS_INFO_200}
+ DFS_INFO_200 = _DFS_INFO_200;
+ {$EXTERNALSYM DFS_INFO_200}
+ TDfsInfo200 = DFS_INFO_200;
+ PDfsInfo200 = PDFS_INFO_200;
+
+//
+// Level 300:
+//
+
+ LPDFS_INFO_300 = ^DFS_INFO_300;
+ {$EXTERNALSYM LPDFS_INFO_300}
+ PDFS_INFO_300 = ^DFS_INFO_300;
+ {$EXTERNALSYM PDFS_INFO_300}
+ _DFS_INFO_300 = record
+ Flags: DWORD;
+ DfsName: LPWSTR; // Dfs name
+ end;
+ {$EXTERNALSYM _DFS_INFO_300}
+ DFS_INFO_300 = _DFS_INFO_300;
+ {$EXTERNALSYM DFS_INFO_300}
+ TDfsInfo300 = DFS_INFO_300;
+ PDfsInfo300 = PDFS_INFO_300;
+
+//
+// Add a new volume or additional storage for an existing volume at
+// DfsEntryPath.
+//
+
+function NetDfsAdd(DfsEntryPath, ServerName, ShareName, Comment: LPWSTR; Flags: DWORD): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetDfsAdd}
+
+//
+// Flags:
+//
+
+const
+ DFS_ADD_VOLUME = 1; // Add a new volume to the DFS if not already there
+ {$EXTERNALSYM DFS_ADD_VOLUME}
+ DFS_RESTORE_VOLUME = 2; // Volume/Replica is being restored - do not verify share etc.
+ {$EXTERNALSYM DFS_RESTORE_VOLUME}
+
+//
+// Setup/teardown API's for standard and FtDfs roots.
+//
+
+function NetDfsAddStdRoot(ServerName, RootShare, Comment: LPWSTR; Flags: DWORD): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetDfsAddStdRoot}
+
+function NetDfsRemoveStdRoot(ServerName, RootShare: LPWSTR; Flags: DWORD): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetDfsRemoveStdRoot}
+
+function NetDfsAddFtRoot(ServerName, RootShare, FtDfsName, Comment: LPWSTR; Flags: DWORD): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetDfsAddFtRoot}
+
+function NetDfsRemoveFtRoot(ServerName, RootShare, FtDfsName: LPWSTR; Flags: DWORD): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetDfsRemoveFtRoot}
+
+function NetDfsRemoveFtRootForced(DomainName, ServerName, RootShare, FtDfsName: LPWSTR; Flags: DWORD): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetDfsRemoveFtRootForced}
+
+//
+// Call to reinitialize the dfsmanager on a machine
+//
+
+function NetDfsManagerInitialize(ServerName: LPWSTR; Flags: DWORD): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetDfsManagerInitialize}
+
+function NetDfsAddStdRootForced(ServerName, RootShare, Comment, Store: LPWSTR): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetDfsAddStdRootForced}
+
+function NetDfsGetDcAddress(ServerName: LPWSTR; var DcIpAddress: LPWSTR; var IsRoot: BOOLEAN; Timeout: PULONG): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetDfsGetDcAddress}
+
+//
+// Flags for NetDfsSetDcAddress()
+//
+
+const
+ NET_DFS_SETDC_FLAGS = $00000000;
+ {$EXTERNALSYM NET_DFS_SETDC_FLAGS}
+ NET_DFS_SETDC_TIMEOUT = $00000001;
+ {$EXTERNALSYM NET_DFS_SETDC_TIMEOUT}
+ NET_DFS_SETDC_INITPKT = $00000002;
+ {$EXTERNALSYM NET_DFS_SETDC_INITPKT}
+
+//
+// Structures used for site reporting
+//
+
+type
+ LPDFS_SITENAME_INFO = ^DFS_SITENAME_INFO;
+ {$EXTERNALSYM LPDFS_SITENAME_INFO}
+ PDFS_SITENAME_INFO = ^DFS_SITENAME_INFO;
+ {$EXTERNALSYM PDFS_SITENAME_INFO}
+ DFS_SITENAME_INFO = record
+ SiteFlags: ULONG; // Below
+ SiteName: LPWSTR;
+ end;
+ {$EXTERNALSYM DFS_SITENAME_INFO}
+ TDfsSiteNameInfo = DFS_SITENAME_INFO;
+ PDfsSiteNameInfo = PDFS_SITENAME_INFO;
+
+// SiteFlags
+
+const
+ DFS_SITE_PRIMARY = $1; // This site returned by DsGetSiteName()
+ {$EXTERNALSYM DFS_SITE_PRIMARY}
+
+type
+ LPDFS_SITELIST_INFO = ^DFS_SITELIST_INFO;
+ {$EXTERNALSYM LPDFS_SITELIST_INFO}
+ PDFS_SITELIST_INFO = ^DFS_SITELIST_INFO;
+ {$EXTERNALSYM PDFS_SITELIST_INFO}
+ DFS_SITELIST_INFO = record
+ cSites: ULONG;
+ Site: array [0..0] of DFS_SITENAME_INFO;
+ end;
+ {$EXTERNALSYM DFS_SITELIST_INFO}
+ TDfsSiteListInfo = DFS_SITELIST_INFO;
+ PDfsSiteListInfo = PDFS_SITELIST_INFO;
+
+//
+// Remove a volume or additional storage for volume from the Dfs at
+// DfsEntryPath. When applied to the last storage in a volume, removes
+// the volume from the DFS.
+//
+
+function NetDfsRemove(DfsEntryPath, ServerName, ShareName: LPWSTR): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetDfsRemove}
+
+//
+// Get information about all of the volumes in the Dfs. DfsName is
+// the "server" part of the UNC name used to refer to this particular Dfs.
+//
+// Valid levels are 1-4, 200
+//
+
+function NetDfsEnum(DfsName: LPWSTR; Level, PrefMaxLen: DWORD; var Buffer: LPBYTE; EntriesRead, ResumeHandle: LPDWORD): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetDfsEnum}
+
+//
+// Get information about the volume or storage.
+// If ServerName and ShareName are specified, the information returned
+// is specific to that server and share, else the information is specific
+// to the volume as a whole.
+//
+// Valid levels are 1-4, 100
+//
+
+function NetDfsGetInfo(DfsEntryPath, ServerName, ShareName: LPWSTR; Level: DWORD; var Buffer: LPBYTE): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetDfsGetInfo}
+
+//
+// Set info about the volume or storage.
+// If ServerName and ShareName are specified, the information set is
+// specific to that server and share, else the information is specific
+// to the volume as a whole.
+//
+// Valid levels are 100, 101 and 102
+//
+
+function NetDfsSetInfo(DfsEntryPath, ServerName, ShareName: LPWSTR; Level: DWORD; Buffer: LPBYTE): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetDfsSetInfo}
+
+//
+// Get client's cached information about the volume or storage.
+// If ServerName and ShareName are specified, the information returned
+// is specific to that server and share, else the information is specific
+// to the volume as a whole.
+//
+// Valid levels are 1-4
+//
+
+function NetDfsGetClientInfo(DfsEntryPath, ServerName, ShareName: LPWSTR; Level: DWORD; var Buffer: LPBYTE): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetDfsGetClientInfo}
+
+//
+// Set client's cached info about the volume or storage.
+// If ServerName and ShareName are specified, the information set is
+// specific to that server and share, else the information is specific
+// to the volume as a whole.
+//
+// Valid levels are 101 and 102.
+//
+
+function NetDfsSetClientInfo(DfsEntryPath, ServerName, ShareName: LPWSTR; Level: DWORD; Buffer: LPBYTE): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetDfsSetClientInfo}
+
+//
+// Move a DFS volume and all subordinate volumes from one place in the
+// DFS to another place in the DFS.
+//
+
+function NetDfsMove(DfsEntryPath: LPWSTR; DfsNewEntryPath: LPWSTR): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetDfsMove}
+
+function NetDfsRename(Path: LPWSTR; NewPath: LPWSTR): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetDfsRename}
+
+implementation
+
+{$IFDEF DYNAMIC_LINK}
+
+var
+ _NetDfsAdd: Pointer;
+
+function NetDfsAdd;
+begin
+ GetProcedureAddress(_NetDfsAdd, netapi32, 'NetDfsAdd');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetDfsAdd]
+ end;
+end;
+
+var
+ _NetDfsAddStdRoot: Pointer;
+
+function NetDfsAddStdRoot;
+begin
+ GetProcedureAddress(_NetDfsAddStdRoot, netapi32, 'NetDfsAddStdRoot');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetDfsAddStdRoot]
+ end;
+end;
+
+var
+ _NetDfsRemoveStdRoot: Pointer;
+
+function NetDfsRemoveStdRoot;
+begin
+ GetProcedureAddress(_NetDfsRemoveStdRoot, netapi32, 'NetDfsRemoveStdRoot');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetDfsRemoveStdRoot]
+ end;
+end;
+
+var
+ _NetDfsAddFtRoot: Pointer;
+
+function NetDfsAddFtRoot;
+begin
+ GetProcedureAddress(_NetDfsAddFtRoot, netapi32, 'NetDfsAddFtRoot');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetDfsAddFtRoot]
+ end;
+end;
+
+var
+ _NetDfsRemoveFtRoot: Pointer;
+
+function NetDfsRemoveFtRoot;
+begin
+ GetProcedureAddress(_NetDfsRemoveFtRoot, netapi32, 'NetDfsRemoveFtRoot');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetDfsRemoveFtRoot]
+ end;
+end;
+
+var
+ _NetDfsRemoveFtRootForced: Pointer;
+
+function NetDfsRemoveFtRootForced;
+begin
+ GetProcedureAddress(_NetDfsRemoveFtRootForced, netapi32, 'NetDfsRemoveFtRootForced');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetDfsRemoveFtRootForced]
+ end;
+end;
+
+var
+ _NetDfsManagerInitialize: Pointer;
+
+function NetDfsManagerInitialize;
+begin
+ GetProcedureAddress(_NetDfsManagerInitialize, netapi32, 'NetDfsManagerInitialize');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetDfsManagerInitialize]
+ end;
+end;
+
+var
+ _NetDfsAddStdRootForced: Pointer;
+
+function NetDfsAddStdRootForced;
+begin
+ GetProcedureAddress(_NetDfsAddStdRootForced, netapi32, 'NetDfsAddStdRootForced');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetDfsAddStdRootForced]
+ end;
+end;
+
+var
+ _NetDfsGetDcAddress: Pointer;
+
+function NetDfsGetDcAddress;
+begin
+ GetProcedureAddress(_NetDfsGetDcAddress, netapi32, 'NetDfsGetDcAddress');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetDfsGetDcAddress]
+ end;
+end;
+
+var
+ _NetDfsRemove: Pointer;
+
+function NetDfsRemove;
+begin
+ GetProcedureAddress(_NetDfsRemove, netapi32, 'NetDfsRemove');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetDfsRemove]
+ end;
+end;
+
+var
+ _NetDfsEnum: Pointer;
+
+function NetDfsEnum;
+begin
+ GetProcedureAddress(_NetDfsEnum, netapi32, 'NetDfsEnum');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetDfsEnum]
+ end;
+end;
+
+var
+ _NetDfsGetInfo: Pointer;
+
+function NetDfsGetInfo;
+begin
+ GetProcedureAddress(_NetDfsGetInfo, netapi32, 'NetDfsGetInfo');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetDfsGetInfo]
+ end;
+end;
+
+var
+ _NetDfsSetInfo: Pointer;
+
+function NetDfsSetInfo;
+begin
+ GetProcedureAddress(_NetDfsSetInfo, netapi32, 'NetDfsSetInfo');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetDfsSetInfo]
+ end;
+end;
+
+var
+ _NetDfsGetClientInfo: Pointer;
+
+function NetDfsGetClientInfo;
+begin
+ GetProcedureAddress(_NetDfsGetClientInfo, netapi32, 'NetDfsGetClientInfo');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetDfsGetClientInfo]
+ end;
+end;
+
+var
+ _NetDfsSetClientInfo: Pointer;
+
+function NetDfsSetClientInfo;
+begin
+ GetProcedureAddress(_NetDfsSetClientInfo, netapi32, 'NetDfsSetClientInfo');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetDfsSetClientInfo]
+ end;
+end;
+
+var
+ _NetDfsMove: Pointer;
+
+function NetDfsMove;
+begin
+ GetProcedureAddress(_NetDfsMove, netapi32, 'NetDfsMove');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetDfsMove]
+ end;
+end;
+
+var
+ _NetDfsRename: Pointer;
+
+function NetDfsRename;
+begin
+ GetProcedureAddress(_NetDfsRename, netapi32, 'NetDfsRename');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetDfsRename]
+ end;
+end;
+
+{$ELSE}
+
+function NetDfsAdd; external netapi32 name 'NetDfsAdd';
+function NetDfsAddStdRoot; external netapi32 name 'NetDfsAddStdRoot';
+function NetDfsRemoveStdRoot; external netapi32 name 'NetDfsRemoveStdRoot';
+function NetDfsAddFtRoot; external netapi32 name 'NetDfsAddFtRoot';
+function NetDfsRemoveFtRoot; external netapi32 name 'NetDfsRemoveFtRoot';
+function NetDfsRemoveFtRootForced; external netapi32 name 'NetDfsRemoveFtRootForced';
+function NetDfsManagerInitialize; external netapi32 name 'NetDfsManagerInitialize';
+function NetDfsAddStdRootForced; external netapi32 name 'NetDfsAddStdRootForced';
+function NetDfsGetDcAddress; external netapi32 name 'NetDfsGetDcAddress';
+function NetDfsRemove; external netapi32 name 'NetDfsRemove';
+function NetDfsEnum; external netapi32 name 'NetDfsEnum';
+function NetDfsGetInfo; external netapi32 name 'NetDfsGetInfo';
+function NetDfsSetInfo; external netapi32 name 'NetDfsSetInfo';
+function NetDfsGetClientInfo; external netapi32 name 'NetDfsGetClientInfo';
+function NetDfsSetClientInfo; external netapi32 name 'NetDfsSetClientInfo';
+function NetDfsMove; external netapi32 name 'NetDfsMove';
+function NetDfsRename; external netapi32 name 'NetDfsRename';
+
+{$ENDIF DYNAMIC_LINK}
+
+end.
diff --git a/packages/extra/winunits/jwalmerr.pas b/packages/extra/winunits/jwalmerr.pas
index b4f601756b..be2eb13061 100644
--- a/packages/extra/winunits/jwalmerr.pas
+++ b/packages/extra/winunits/jwalmerr.pas
@@ -1,930 +1,930 @@
-{******************************************************************************}
-{ }
-{ Lan Manager Error API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: lmerr.h, released November 2001. The original Pascal }
-{ code is: LmErr.pas, released Februari 2002. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwalmerr.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaLmErr;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "lmerr.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-const
- NERR_Success = 0; // Success
- {$EXTERNALSYM NERR_Success}
-
-// ERROR_ equates can be intermixed with NERR_ equates.
-
-// NERR_BASE is the base of error codes from network utilities,
-// chosen to avoid conflict with system and redirector error codes.
-// 2100 is a value that has been assigned to us by system.
-
- NERR_BASE = 2100;
- {$EXTERNALSYM NERR_BASE}
-
-//*INTERNAL_ONLY*
-
-{**********WARNING *****************
- *See the comment in lmcons.h for *
- *info on the allocation of errors *
- ***********************************}
-
-{**********WARNING *****************
- *The range 2750-2799 has been *
- *allocated to the IBM LAN Server *
- ***********************************}
-
-{**********WARNING *****************
- *The range 2900-2999 has been *
- *reserved for Microsoft OEMs *
- ***********************************}
-
-// UNUSED BASE+0
-// UNUSED BASE+1
- NERR_NetNotStarted = NERR_BASE + 2; // The workstation driver is not installed.
- {$EXTERNALSYM NERR_NetNotStarted}
- NERR_UnknownServer = NERR_BASE + 3; // The server could not be located.
- {$EXTERNALSYM NERR_UnknownServer}
- NERR_ShareMem = NERR_BASE + 4; // An internal error occurred. The network cannot access a shared memory segment.
- {$EXTERNALSYM NERR_ShareMem}
-
- NERR_NoNetworkResource = NERR_BASE + 5; // A network resource shortage occurred .
- {$EXTERNALSYM NERR_NoNetworkResource}
- NERR_RemoteOnly = NERR_BASE + 6; // This operation is not supported on workstations.
- {$EXTERNALSYM NERR_RemoteOnly}
- NERR_DevNotRedirected = NERR_BASE + 7; // The device is not connected.
- {$EXTERNALSYM NERR_DevNotRedirected}
-// NERR_BASE+8 is used for ERROR_CONNECTED_OTHER_PASSWORD
-// NERR_BASE+9 is used for ERROR_CONNECTED_OTHER_PASSWORD_DEFAULT
-// UNUSED BASE+10
-// UNUSED BASE+11
-// UNUSED BASE+12
-// UNUSED BASE+13
- NERR_ServerNotStarted = NERR_BASE + 14; // The Server service is not started.
- {$EXTERNALSYM NERR_ServerNotStarted}
- NERR_ItemNotFound = NERR_BASE + 15; // The queue is empty.
- {$EXTERNALSYM NERR_ItemNotFound}
- NERR_UnknownDevDir = NERR_BASE + 16; // The device or directory does not exist.
- {$EXTERNALSYM NERR_UnknownDevDir}
- NERR_RedirectedPath = NERR_BASE + 17; // The operation is invalid on a redirected resource.
- {$EXTERNALSYM NERR_RedirectedPath}
- NERR_DuplicateShare = NERR_BASE + 18; // The name has already been shared.
- {$EXTERNALSYM NERR_DuplicateShare}
- NERR_NoRoom = NERR_BASE + 19; // The server is currently out of the requested resource.
- {$EXTERNALSYM NERR_NoRoom}
-// UNUSED BASE+20
- NERR_TooManyItems = NERR_BASE + 21; // Requested addition of items exceeds the maximum allowed.
- {$EXTERNALSYM NERR_TooManyItems}
- NERR_InvalidMaxUsers = NERR_BASE + 22; // The Peer service supports only two simultaneous users.
- {$EXTERNALSYM NERR_InvalidMaxUsers}
- NERR_BufTooSmall = NERR_BASE + 23; // The API return buffer is too small.
- {$EXTERNALSYM NERR_BufTooSmall}
-// UNUSED BASE+24
-// UNUSED BASE+25
-// UNUSED BASE+26
- NERR_RemoteErr = NERR_BASE + 27; // A remote API error occurred.
- {$EXTERNALSYM NERR_RemoteErr}
-// UNUSED BASE+28
-// UNUSED BASE+29
-// UNUSED BASE+30
- NERR_LanmanIniError = NERR_BASE + 31; // An error occurred when opening or reading the configuration file.
- {$EXTERNALSYM NERR_LanmanIniError}
-// UNUSED BASE+32
-// UNUSED BASE+33
-// UNUSED BASE+34
-// UNUSED BASE+35
- NERR_NetworkError = NERR_BASE + 36; // A general network error occurred.
- {$EXTERNALSYM NERR_NetworkError}
- NERR_WkstaInconsistentState = NERR_BASE + 37;
- {$EXTERNALSYM NERR_WkstaInconsistentState}
- // The Workstation service is in an inconsistent state. Restart the computer before restarting the Workstation service.
- NERR_WkstaNotStarted = NERR_BASE + 38; // The Workstation service has not been started.
- {$EXTERNALSYM NERR_WkstaNotStarted}
- NERR_BrowserNotStarted = NERR_BASE + 39; // The requested information is not available.
- {$EXTERNALSYM NERR_BrowserNotStarted}
- NERR_InternalError = NERR_BASE + 40; // An internal Windows 2000 error occurred.
- {$EXTERNALSYM NERR_InternalError}
- NERR_BadTransactConfig = NERR_BASE + 41; // The server is not configured for transactions.
- {$EXTERNALSYM NERR_BadTransactConfig}
- NERR_InvalidAPI = NERR_BASE + 42; // The requested API is not supported on the remote server.
- {$EXTERNALSYM NERR_InvalidAPI}
- NERR_BadEventName = NERR_BASE + 43; // The event name is invalid.
- {$EXTERNALSYM NERR_BadEventName}
- NERR_DupNameReboot = NERR_BASE + 44; // The computer name already exists on the network. Change it and restart the computer.
- {$EXTERNALSYM NERR_DupNameReboot}
-
-//
-// Config API related
-// Error codes from BASE+45 to BASE+49
-
-// UNUSED BASE+45
- NERR_CfgCompNotFound = NERR_BASE + 46; // The specified component could not be found in the configuration information.
- {$EXTERNALSYM NERR_CfgCompNotFound}
- NERR_CfgParamNotFound = NERR_BASE + 47; // The specified parameter could not be found in the configuration information.
- {$EXTERNALSYM NERR_CfgParamNotFound}
- NERR_LineTooLong = NERR_BASE + 49; // A line in the configuration file is too long.
- {$EXTERNALSYM NERR_LineTooLong}
-
-//
-// Spooler API related
-// Error codes from BASE+50 to BASE+79
-
- NERR_QNotFound = NERR_BASE + 50; // The printer does not exist.
- {$EXTERNALSYM NERR_QNotFound}
- NERR_JobNotFound = NERR_BASE + 51; // The print job does not exist.
- {$EXTERNALSYM NERR_JobNotFound}
- NERR_DestNotFound = NERR_BASE + 52; // The printer destination cannot be found.
- {$EXTERNALSYM NERR_DestNotFound}
- NERR_DestExists = NERR_BASE + 53; // The printer destination already exists.
- {$EXTERNALSYM NERR_DestExists}
- NERR_QExists = NERR_BASE + 54; // The printer queue already exists.
- {$EXTERNALSYM NERR_QExists}
- NERR_QNoRoom = NERR_BASE + 55; // No more printers can be added.
- {$EXTERNALSYM NERR_QNoRoom}
- NERR_JobNoRoom = NERR_BASE + 56; // No more print jobs can be added.
- {$EXTERNALSYM NERR_JobNoRoom}
- NERR_DestNoRoom = NERR_BASE + 57; // No more printer destinations can be added.
- {$EXTERNALSYM NERR_DestNoRoom}
- NERR_DestIdle = NERR_BASE + 58; // This printer destination is idle and cannot accept control operations.
- {$EXTERNALSYM NERR_DestIdle}
- NERR_DestInvalidOp = NERR_BASE + 59; // This printer destination request contains an invalid control function.
- {$EXTERNALSYM NERR_DestInvalidOp}
- NERR_ProcNoRespond = NERR_BASE + 60; // The print processor is not responding.
- {$EXTERNALSYM NERR_ProcNoRespond}
- NERR_SpoolerNotLoaded = NERR_BASE + 61; // The spooler is not running.
- {$EXTERNALSYM NERR_SpoolerNotLoaded}
- NERR_DestInvalidState = NERR_BASE + 62; // This operation cannot be performed on the print destination in its current state.
- {$EXTERNALSYM NERR_DestInvalidState}
- NERR_QInvalidState = NERR_BASE + 63; // This operation cannot be performed on the printer queue in its current state.
- {$EXTERNALSYM NERR_QInvalidState}
- NERR_JobInvalidState = NERR_BASE + 64; // This operation cannot be performed on the print job in its current state.
- {$EXTERNALSYM NERR_JobInvalidState}
- NERR_SpoolNoMemory = NERR_BASE + 65; // A spooler memory allocation failure occurred.
- {$EXTERNALSYM NERR_SpoolNoMemory}
- NERR_DriverNotFound = NERR_BASE + 66; // The device driver does not exist.
- {$EXTERNALSYM NERR_DriverNotFound}
- NERR_DataTypeInvalid = NERR_BASE + 67; // The data type is not supported by the print processor.
- {$EXTERNALSYM NERR_DataTypeInvalid}
- NERR_ProcNotFound = NERR_BASE + 68; // The print processor is not installed.
- {$EXTERNALSYM NERR_ProcNotFound}
-
-//
-// Service API related
-// Error codes from BASE+80 to BASE+99
-
- NERR_ServiceTableLocked = NERR_BASE + 80; // The service database is locked.
- {$EXTERNALSYM NERR_ServiceTableLocked}
- NERR_ServiceTableFull = NERR_BASE + 81; // The service table is full.
- {$EXTERNALSYM NERR_ServiceTableFull}
- NERR_ServiceInstalled = NERR_BASE + 82; // The requested service has already been started.
- {$EXTERNALSYM NERR_ServiceInstalled}
- NERR_ServiceEntryLocked = NERR_BASE + 83; // The service does not respond to control actions.
- {$EXTERNALSYM NERR_ServiceEntryLocked}
- NERR_ServiceNotInstalled = NERR_BASE + 84; // The service has not been started.
- {$EXTERNALSYM NERR_ServiceNotInstalled}
- NERR_BadServiceName = NERR_BASE + 85; // The service name is invalid.
- {$EXTERNALSYM NERR_BadServiceName}
- NERR_ServiceCtlTimeout = NERR_BASE + 86; // The service is not responding to the control function.
- {$EXTERNALSYM NERR_ServiceCtlTimeout}
- NERR_ServiceCtlBusy = NERR_BASE + 87; // The service control is busy.
- {$EXTERNALSYM NERR_ServiceCtlBusy}
- NERR_BadServiceProgName = NERR_BASE + 88; // The configuration file contains an invalid service program name.
- {$EXTERNALSYM NERR_BadServiceProgName}
- NERR_ServiceNotCtrl = NERR_BASE + 89; // The service could not be controlled in its present state.
- {$EXTERNALSYM NERR_ServiceNotCtrl}
- NERR_ServiceKillProc = NERR_BASE + 90; // The service ended abnormally.
- {$EXTERNALSYM NERR_ServiceKillProc}
- NERR_ServiceCtlNotValid = NERR_BASE + 91; // The requested pause,continue, or stop is not valid for this service.
- {$EXTERNALSYM NERR_ServiceCtlNotValid}
- NERR_NotInDispatchTbl = NERR_BASE + 92; // The service control dispatcher could not find the service name in the dispatch table.
- {$EXTERNALSYM NERR_NotInDispatchTbl}
- NERR_BadControlRecv = NERR_BASE + 93; // The service control dispatcher pipe read failed.
- {$EXTERNALSYM NERR_BadControlRecv}
- NERR_ServiceNotStarting = NERR_BASE + 94; // A thread for the new service could not be created.
- {$EXTERNALSYM NERR_ServiceNotStarting}
-
-//
-// Wksta and Logon API related
-// Error codes from BASE+100 to BASE+118
-
- NERR_AlreadyLoggedOn = NERR_BASE + 100; // This workstation is already logged on to the local-area network.
- {$EXTERNALSYM NERR_AlreadyLoggedOn}
- NERR_NotLoggedOn = NERR_BASE + 101; // The workstation is not logged on to the local-area network.
- {$EXTERNALSYM NERR_NotLoggedOn}
- NERR_BadUsername = NERR_BASE + 102; // The user name or group name parameter is invalid.
- {$EXTERNALSYM NERR_BadUsername}
- NERR_BadPassword = NERR_BASE + 103; // The password parameter is invalid.
- {$EXTERNALSYM NERR_BadPassword}
- NERR_UnableToAddName_W = NERR_BASE + 104; // @W The logon processor did not add the message alias.
- {$EXTERNALSYM NERR_UnableToAddName_W}
- NERR_UnableToAddName_F = NERR_BASE + 105; // The logon processor did not add the message alias.
- {$EXTERNALSYM NERR_UnableToAddName_F}
- NERR_UnableToDelName_W = NERR_BASE + 106; // @W The logoff processor did not delete the message alias.
- {$EXTERNALSYM NERR_UnableToDelName_W}
- NERR_UnableToDelName_F = NERR_BASE + 107; // The logoff processor did not delete the message alias.
- {$EXTERNALSYM NERR_UnableToDelName_F}
-// UNUSED BASE+108
- NERR_LogonsPaused = NERR_BASE + 109; // Network logons are paused.
- {$EXTERNALSYM NERR_LogonsPaused}
- NERR_LogonServerConflict = NERR_BASE + 110; // A centralized logon-server conflict occurred.
- {$EXTERNALSYM NERR_LogonServerConflict}
- NERR_LogonNoUserPath = NERR_BASE + 111; // The server is configured without a valid user path.
- {$EXTERNALSYM NERR_LogonNoUserPath}
- NERR_LogonScriptError = NERR_BASE + 112; // An error occurred while loading or running the logon script.
- {$EXTERNALSYM NERR_LogonScriptError}
-// UNUSED BASE+113
- NERR_StandaloneLogon = NERR_BASE + 114; // The logon server was not specified. Your computer will be logged on as STANDALONE.
- {$EXTERNALSYM NERR_StandaloneLogon}
- NERR_LogonServerNotFound = NERR_BASE + 115; // The logon server could not be found.
- {$EXTERNALSYM NERR_LogonServerNotFound}
- NERR_LogonDomainExists = NERR_BASE + 116; // There is already a logon domain for this computer.
- {$EXTERNALSYM NERR_LogonDomainExists}
- NERR_NonValidatedLogon = NERR_BASE + 117; // The logon server could not validate the logon.
- {$EXTERNALSYM NERR_NonValidatedLogon}
-
-//
-// ACF API related (access, user, group)
-// Error codes from BASE+119 to BASE+149
-
- NERR_ACFNotFound = NERR_BASE + 119; // The security database could not be found.
- {$EXTERNALSYM NERR_ACFNotFound}
- NERR_GroupNotFound = NERR_BASE + 120; // The group name could not be found.
- {$EXTERNALSYM NERR_GroupNotFound}
- NERR_UserNotFound = NERR_BASE + 121; // The user name could not be found.
- {$EXTERNALSYM NERR_UserNotFound}
- NERR_ResourceNotFound = NERR_BASE + 122; // The resource name could not be found.
- {$EXTERNALSYM NERR_ResourceNotFound}
- NERR_GroupExists = NERR_BASE + 123; // The group already exists.
- {$EXTERNALSYM NERR_GroupExists}
- NERR_UserExists = NERR_BASE + 124; // The account already exists.
- {$EXTERNALSYM NERR_UserExists}
- NERR_ResourceExists = NERR_BASE + 125; // The resource permission list already exists.
- {$EXTERNALSYM NERR_ResourceExists}
- NERR_NotPrimary = NERR_BASE + 126; // This operation is only allowed on the primary domain controller of the domain.
- {$EXTERNALSYM NERR_NotPrimary}
- NERR_ACFNotLoaded = NERR_BASE + 127; // The security database has not been started.
- {$EXTERNALSYM NERR_ACFNotLoaded}
- NERR_ACFNoRoom = NERR_BASE + 128; // There are too many names in the user accounts database.
- {$EXTERNALSYM NERR_ACFNoRoom}
- NERR_ACFFileIOFail = NERR_BASE + 129; // A disk I/O failure occurred.
- {$EXTERNALSYM NERR_ACFFileIOFail}
- NERR_ACFTooManyLists = NERR_BASE + 130; // The limit of 64 entries per resource was exceeded.
- {$EXTERNALSYM NERR_ACFTooManyLists}
- NERR_UserLogon = NERR_BASE + 131; // Deleting a user with a session is not allowed.
- {$EXTERNALSYM NERR_UserLogon}
- NERR_ACFNoParent = NERR_BASE + 132; // The parent directory could not be located.
- {$EXTERNALSYM NERR_ACFNoParent}
- NERR_CanNotGrowSegment = NERR_BASE + 133; // Unable to add to the security database session cache segment.
- {$EXTERNALSYM NERR_CanNotGrowSegment}
- NERR_SpeGroupOp = NERR_BASE + 134; // This operation is not allowed on this special group.
- {$EXTERNALSYM NERR_SpeGroupOp}
- NERR_NotInCache = NERR_BASE + 135; // This user is not cached in user accounts database session cache.
- {$EXTERNALSYM NERR_NotInCache}
- NERR_UserInGroup = NERR_BASE + 136; // The user already belongs to this group.
- {$EXTERNALSYM NERR_UserInGroup}
- NERR_UserNotInGroup = NERR_BASE + 137; // The user does not belong to this group.
- {$EXTERNALSYM NERR_UserNotInGroup}
- NERR_AccountUndefined = NERR_BASE + 138; // This user account is undefined.
- {$EXTERNALSYM NERR_AccountUndefined}
- NERR_AccountExpired = NERR_BASE + 139; // This user account has expired.
- {$EXTERNALSYM NERR_AccountExpired}
- NERR_InvalidWorkstation = NERR_BASE + 140; // The user is not allowed to log on from this workstation.
- {$EXTERNALSYM NERR_InvalidWorkstation}
- NERR_InvalidLogonHours = NERR_BASE + 141; // The user is not allowed to log on at this time.
- {$EXTERNALSYM NERR_InvalidLogonHours}
- NERR_PasswordExpired = NERR_BASE + 142; // The password of this user has expired.
- {$EXTERNALSYM NERR_PasswordExpired}
- NERR_PasswordCantChange = NERR_BASE + 143; // The password of this user cannot change.
- {$EXTERNALSYM NERR_PasswordCantChange}
- NERR_PasswordHistConflict = NERR_BASE + 144; // This password cannot be used now.
- {$EXTERNALSYM NERR_PasswordHistConflict}
- NERR_PasswordTooShort = NERR_BASE + 145; // The password does not meet the password policy requirements. Check the minimum password length, password complexity and password history requirements.
- {$EXTERNALSYM NERR_PasswordTooShort}
- NERR_PasswordTooRecent = NERR_BASE + 146; // The password of this user is too recent to change.
- {$EXTERNALSYM NERR_PasswordTooRecent}
- NERR_InvalidDatabase = NERR_BASE + 147; // The security database is corrupted.
- {$EXTERNALSYM NERR_InvalidDatabase}
- NERR_DatabaseUpToDate = NERR_BASE + 148; // No updates are necessary to this replicant network/local security database.
- {$EXTERNALSYM NERR_DatabaseUpToDate}
- NERR_SyncRequired = NERR_BASE + 149; // This replicant database is outdated; synchronization is required.
- {$EXTERNALSYM NERR_SyncRequired}
-
-//
-// Use API related
-// Error codes from BASE+150 to BASE+169
-
- NERR_UseNotFound = NERR_BASE + 150; // The network connection could not be found.
- {$EXTERNALSYM NERR_UseNotFound}
- NERR_BadAsgType = NERR_BASE + 151; // This asg_type is invalid.
- {$EXTERNALSYM NERR_BadAsgType}
- NERR_DeviceIsShared = NERR_BASE + 152; // This device is currently being shared.
- {$EXTERNALSYM NERR_DeviceIsShared}
-
-//
-// Message Server related
-// Error codes BASE+170 to BASE+209
-
- NERR_NoComputerName = NERR_BASE + 170; // The computer name could not be added as a message alias. The name may already exist on the network.
- {$EXTERNALSYM NERR_NoComputerName}
- NERR_MsgAlreadyStarted = NERR_BASE + 171; // The Messenger service is already started.
- {$EXTERNALSYM NERR_MsgAlreadyStarted}
- NERR_MsgInitFailed = NERR_BASE + 172; // The Messenger service failed to start.
- {$EXTERNALSYM NERR_MsgInitFailed}
- NERR_NameNotFound = NERR_BASE + 173; // The message alias could not be found on the network.
- {$EXTERNALSYM NERR_NameNotFound}
- NERR_AlreadyForwarded = NERR_BASE + 174; // This message alias has already been forwarded.
- {$EXTERNALSYM NERR_AlreadyForwarded}
- NERR_AddForwarded = NERR_BASE + 175; // This message alias has been added but is still forwarded.
- {$EXTERNALSYM NERR_AddForwarded}
- NERR_AlreadyExists = NERR_BASE + 176; // This message alias already exists locally.
- {$EXTERNALSYM NERR_AlreadyExists}
- NERR_TooManyNames = NERR_BASE + 177; // The maximum number of added message aliases has been exceeded.
- {$EXTERNALSYM NERR_TooManyNames}
- NERR_DelComputerName = NERR_BASE + 178; // The computer name could not be deleted.
- {$EXTERNALSYM NERR_DelComputerName}
- NERR_LocalForward = NERR_BASE + 179; // Messages cannot be forwarded back to the same workstation.
- {$EXTERNALSYM NERR_LocalForward}
- NERR_GrpMsgProcessor = NERR_BASE + 180; // An error occurred in the domain message processor.
- {$EXTERNALSYM NERR_GrpMsgProcessor}
- NERR_PausedRemote = NERR_BASE + 181; // The message was sent, but the recipient has paused the Messenger service.
- {$EXTERNALSYM NERR_PausedRemote}
- NERR_BadReceive = NERR_BASE + 182; // The message was sent but not received.
- {$EXTERNALSYM NERR_BadReceive}
- NERR_NameInUse = NERR_BASE + 183; // The message alias is currently in use. Try again later.
- {$EXTERNALSYM NERR_NameInUse}
- NERR_MsgNotStarted = NERR_BASE + 184; // The Messenger service has not been started.
- {$EXTERNALSYM NERR_MsgNotStarted}
- NERR_NotLocalName = NERR_BASE + 185; // The name is not on the local computer.
- {$EXTERNALSYM NERR_NotLocalName}
- NERR_NoForwardName = NERR_BASE + 186; // The forwarded message alias could not be found on the network.
- {$EXTERNALSYM NERR_NoForwardName}
- NERR_RemoteFull = NERR_BASE + 187; // The message alias table on the remote station is full.
- {$EXTERNALSYM NERR_RemoteFull}
- NERR_NameNotForwarded = NERR_BASE + 188; // Messages for this alias are not currently being forwarded.
- {$EXTERNALSYM NERR_NameNotForwarded}
- NERR_TruncatedBroadcast = NERR_BASE + 189; // The broadcast message was truncated.
- {$EXTERNALSYM NERR_TruncatedBroadcast}
- NERR_InvalidDevice = NERR_BASE + 194; // This is an invalid device name.
- {$EXTERNALSYM NERR_InvalidDevice}
- NERR_WriteFault = NERR_BASE + 195; // A write fault occurred.
- {$EXTERNALSYM NERR_WriteFault}
-// UNUSED BASE+196
- NERR_DuplicateName = NERR_BASE + 197; // A duplicate message alias exists on the network.
- {$EXTERNALSYM NERR_DuplicateName}
- NERR_DeleteLater = NERR_BASE + 198; // @W This message alias will be deleted later.
- {$EXTERNALSYM NERR_DeleteLater}
- NERR_IncompleteDel = NERR_BASE + 199; // The message alias was not successfully deleted from all networks.
- {$EXTERNALSYM NERR_IncompleteDel}
- NERR_MultipleNets = NERR_BASE + 200; // This operation is not supported on computers with multiple networks.
- {$EXTERNALSYM NERR_MultipleNets}
-
-//
-// Server API related
-// Error codes BASE+210 to BASE+229
-
- NERR_NetNameNotFound = NERR_BASE + 210; // This shared resource does not exist.
- {$EXTERNALSYM NERR_NetNameNotFound}
- NERR_DeviceNotShared = NERR_BASE + 211; // This device is not shared.
- {$EXTERNALSYM NERR_DeviceNotShared}
- NERR_ClientNameNotFound = NERR_BASE + 212; // A session does not exist with that computer name.
- {$EXTERNALSYM NERR_ClientNameNotFound}
- NERR_FileIdNotFound = NERR_BASE + 214; // There is not an open file with that identification number.
- {$EXTERNALSYM NERR_FileIdNotFound}
- NERR_ExecFailure = NERR_BASE + 215; // A failure occurred when executing a remote administration command.
- {$EXTERNALSYM NERR_ExecFailure}
- NERR_TmpFile = NERR_BASE + 216; // A failure occurred when opening a remote temporary file.
- {$EXTERNALSYM NERR_TmpFile}
- NERR_TooMuchData = NERR_BASE + 217; // The data returned from a remote administration command has been truncated to 64K.
- {$EXTERNALSYM NERR_TooMuchData}
- NERR_DeviceShareConflict = NERR_BASE + 218; // This device cannot be shared as both a spooled and a non-spooled resource.
- {$EXTERNALSYM NERR_DeviceShareConflict}
- NERR_BrowserTableIncomplete = NERR_BASE + 219; // The information in the list of servers may be incorrect.
- {$EXTERNALSYM NERR_BrowserTableIncomplete}
- NERR_NotLocalDomain = NERR_BASE + 220; // The computer is not active in this domain.
- {$EXTERNALSYM NERR_NotLocalDomain}
- NERR_IsDfsShare = NERR_BASE + 221; // The share must be removed from the Distributed File System before it can be deleted.
- {$EXTERNALSYM NERR_IsDfsShare}
-
-//
-// CharDev API related
-// Error codes BASE+230 to BASE+249
-
-// UNUSED BASE+230
- NERR_DevInvalidOpCode = NERR_BASE + 231; // The operation is invalid for this device.
- {$EXTERNALSYM NERR_DevInvalidOpCode}
- NERR_DevNotFound = NERR_BASE + 232; // This device cannot be shared.
- {$EXTERNALSYM NERR_DevNotFound}
- NERR_DevNotOpen = NERR_BASE + 233; // This device was not open.
- {$EXTERNALSYM NERR_DevNotOpen}
- NERR_BadQueueDevString = NERR_BASE + 234; // This device name list is invalid.
- {$EXTERNALSYM NERR_BadQueueDevString}
- NERR_BadQueuePriority = NERR_BASE + 235; // The queue priority is invalid.
- {$EXTERNALSYM NERR_BadQueuePriority}
- NERR_NoCommDevs = NERR_BASE + 237; // There are no shared communication devices.
- {$EXTERNALSYM NERR_NoCommDevs}
- NERR_QueueNotFound = NERR_BASE + 238; // The queue you specified does not exist.
- {$EXTERNALSYM NERR_QueueNotFound}
- NERR_BadDevString = NERR_BASE + 240; // This list of devices is invalid.
- {$EXTERNALSYM NERR_BadDevString}
- NERR_BadDev = NERR_BASE + 241; // The requested device is invalid.
- {$EXTERNALSYM NERR_BadDev}
- NERR_InUseBySpooler = NERR_BASE + 242; // This device is already in use by the spooler.
- {$EXTERNALSYM NERR_InUseBySpooler}
- NERR_CommDevInUse = NERR_BASE + 243; // This device is already in use as a communication device.
- {$EXTERNALSYM NERR_CommDevInUse}
-
-//
-// NetICanonicalize and NetIType and NetIMakeLMFileName
-// NetIListCanon and NetINameCheck
-// Error codes BASE+250 to BASE+269
-
- NERR_InvalidComputer = NERR_BASE + 251; // This computer name is invalid.
- {$EXTERNALSYM NERR_InvalidComputer}
-// UNUSED BASE+252
-// UNUSED BASE+253
- NERR_MaxLenExceeded = NERR_BASE + 254; // The string and prefix specified are too long.
- {$EXTERNALSYM NERR_MaxLenExceeded}
-// UNUSED BASE+255
- NERR_BadComponent = NERR_BASE + 256; // This path component is invalid.
- {$EXTERNALSYM NERR_BadComponent}
- NERR_CantType = NERR_BASE + 257; // Could not determine the type of input.
- {$EXTERNALSYM NERR_CantType}
-// UNUSED BASE+258
-// UNUSED BASE+259
- NERR_TooManyEntries = NERR_BASE + 262; // The buffer for types is not big enough.
- {$EXTERNALSYM NERR_TooManyEntries}
-
-//
-// NetProfile
-// Error codes BASE+270 to BASE+276
-
- NERR_ProfileFileTooBig = NERR_BASE + 270; // Profile files cannot exceed 64K.
- {$EXTERNALSYM NERR_ProfileFileTooBig}
- NERR_ProfileOffset = NERR_BASE + 271; // The start offset is out of range.
- {$EXTERNALSYM NERR_ProfileOffset}
- NERR_ProfileCleanup = NERR_BASE + 272; // The system cannot delete current connections to network resources.
- {$EXTERNALSYM NERR_ProfileCleanup}
- NERR_ProfileUnknownCmd = NERR_BASE + 273; // The system was unable to parse the command line in this file.
- {$EXTERNALSYM NERR_ProfileUnknownCmd}
- NERR_ProfileLoadErr = NERR_BASE + 274; // An error occurred while loading the profile file.
- {$EXTERNALSYM NERR_ProfileLoadErr}
- NERR_ProfileSaveErr = NERR_BASE + 275; // @W Errors occurred while saving the profile file. The profile was partially saved.
- {$EXTERNALSYM NERR_ProfileSaveErr}
-
-//
-// NetAudit and NetErrorLog
-// Error codes BASE+277 to BASE+279
-
- NERR_LogOverflow = NERR_BASE + 277; // Log file %1 is full.
- {$EXTERNALSYM NERR_LogOverflow}
- NERR_LogFileChanged = NERR_BASE + 278; // This log file has changed between reads.
- {$EXTERNALSYM NERR_LogFileChanged}
- NERR_LogFileCorrupt = NERR_BASE + 279; // Log file %1 is corrupt.
- {$EXTERNALSYM NERR_LogFileCorrupt}
-
-//
-// NetRemote
-// Error codes BASE+280 to BASE+299
-
- NERR_SourceIsDir = NERR_BASE + 280; // The source path cannot be a directory.
- {$EXTERNALSYM NERR_SourceIsDir}
- NERR_BadSource = NERR_BASE + 281; // The source path is illegal.
- {$EXTERNALSYM NERR_BadSource}
- NERR_BadDest = NERR_BASE + 282; // The destination path is illegal.
- {$EXTERNALSYM NERR_BadDest}
- NERR_DifferentServers = NERR_BASE + 283; // The source and destination paths are on different servers.
- {$EXTERNALSYM NERR_DifferentServers}
-// UNUSED BASE+284
- NERR_RunSrvPaused = NERR_BASE + 285; // The Run server you requested is paused.
- {$EXTERNALSYM NERR_RunSrvPaused}
-// UNUSED BASE+286
-// UNUSED BASE+287
-// UNUSED BASE+288
- NERR_ErrCommRunSrv = NERR_BASE + 289; // An error occurred when communicating with a Run server.
- {$EXTERNALSYM NERR_ErrCommRunSrv}
-// UNUSED BASE+290
- NERR_ErrorExecingGhost = NERR_BASE + 291; // An error occurred when starting a background process.
- {$EXTERNALSYM NERR_ErrorExecingGhost}
- NERR_ShareNotFound = NERR_BASE + 292; // The shared resource you are connected to could not be found.
- {$EXTERNALSYM NERR_ShareNotFound}
-// UNUSED BASE+293
-// UNUSED BASE+294
-
-//
-// NetWksta.sys (redir) returned error codes.
-//
-// NERR_BASE + (300-329)
-
- NERR_InvalidLana = NERR_BASE + 300; // The LAN adapter number is invalid.
- {$EXTERNALSYM NERR_InvalidLana}
- NERR_OpenFiles = NERR_BASE + 301; // There are open files on the connection.
- {$EXTERNALSYM NERR_OpenFiles}
- NERR_ActiveConns = NERR_BASE + 302; // Active connections still exist.
- {$EXTERNALSYM NERR_ActiveConns}
- NERR_BadPasswordCore = NERR_BASE + 303; // This share name or password is invalid.
- {$EXTERNALSYM NERR_BadPasswordCore}
- NERR_DevInUse = NERR_BASE + 304; // The device is being accessed by an active process.
- {$EXTERNALSYM NERR_DevInUse}
- NERR_LocalDrive = NERR_BASE + 305; // The drive letter is in use locally.
- {$EXTERNALSYM NERR_LocalDrive}
-
-//
-// Alert error codes.
-//
-// NERR_BASE + (330-339)
-
- NERR_AlertExists = NERR_BASE + 330; // The specified client is already registered for the specified event.
- {$EXTERNALSYM NERR_AlertExists}
- NERR_TooManyAlerts = NERR_BASE + 331; // The alert table is full.
- {$EXTERNALSYM NERR_TooManyAlerts}
- NERR_NoSuchAlert = NERR_BASE + 332; // An invalid or nonexistent alert name was raised.
- {$EXTERNALSYM NERR_NoSuchAlert}
- NERR_BadRecipient = NERR_BASE + 333; // The alert recipient is invalid.
- {$EXTERNALSYM NERR_BadRecipient}
- NERR_AcctLimitExceeded = NERR_BASE + 334; // A user's session with this server has been deleted
- {$EXTERNALSYM NERR_AcctLimitExceeded}
- // because the user's logon hours are no longer valid.
-
-//
-// Additional Error and Audit log codes.
-//
-// NERR_BASE +(340-343)
-
- NERR_InvalidLogSeek = NERR_BASE + 340; // The log file does not contain the requested record number.
- {$EXTERNALSYM NERR_InvalidLogSeek}
-// UNUSED BASE+341
-// UNUSED BASE+342
-// UNUSED BASE+343
-
-//
-// Additional UAS and NETLOGON codes
-//
-// NERR_BASE +(350-359)
-
- NERR_BadUasConfig = NERR_BASE + 350; // The user accounts database is not configured correctly.
- {$EXTERNALSYM NERR_BadUasConfig}
- NERR_InvalidUASOp = NERR_BASE + 351; // This operation is not permitted when the Netlogon service is running.
- {$EXTERNALSYM NERR_InvalidUASOp}
- NERR_LastAdmin = NERR_BASE + 352; // This operation is not allowed on the last administrative account.
- {$EXTERNALSYM NERR_LastAdmin}
- NERR_DCNotFound = NERR_BASE + 353; // Could not find domain controller for this domain.
- {$EXTERNALSYM NERR_DCNotFound}
- NERR_LogonTrackingError = NERR_BASE + 354; // Could not set logon information for this user.
- {$EXTERNALSYM NERR_LogonTrackingError}
- NERR_NetlogonNotStarted = NERR_BASE + 355; // The Netlogon service has not been started.
- {$EXTERNALSYM NERR_NetlogonNotStarted}
- NERR_CanNotGrowUASFile = NERR_BASE + 356; // Unable to add to the user accounts database.
- {$EXTERNALSYM NERR_CanNotGrowUASFile}
- NERR_TimeDiffAtDC = NERR_BASE + 357; // This server's clock is not synchronized with the primary domain controller's clock.
- {$EXTERNALSYM NERR_TimeDiffAtDC}
- NERR_PasswordMismatch = NERR_BASE + 358; // A password mismatch has been detected.
- {$EXTERNALSYM NERR_PasswordMismatch}
-
-//
-// Server Integration error codes.
-//
-// NERR_BASE +(360-369)
-
- NERR_NoSuchServer = NERR_BASE + 360; // The server identification does not specify a valid server.
- {$EXTERNALSYM NERR_NoSuchServer}
- NERR_NoSuchSession = NERR_BASE + 361; // The session identification does not specify a valid session.
- {$EXTERNALSYM NERR_NoSuchSession}
- NERR_NoSuchConnection = NERR_BASE + 362; // The connection identification does not specify a valid connection.
- {$EXTERNALSYM NERR_NoSuchConnection}
- NERR_TooManyServers = NERR_BASE + 363; // There is no space for another entry in the table of available servers.
- {$EXTERNALSYM NERR_TooManyServers}
- NERR_TooManySessions = NERR_BASE + 364; // The server has reached the maximum number of sessions it supports.
- {$EXTERNALSYM NERR_TooManySessions}
- NERR_TooManyConnections = NERR_BASE + 365; // The server has reached the maximum number of connections it supports.
- {$EXTERNALSYM NERR_TooManyConnections}
- NERR_TooManyFiles = NERR_BASE + 366; // The server cannot open more files because it has reached its maximum number.
- {$EXTERNALSYM NERR_TooManyFiles}
- NERR_NoAlternateServers = NERR_BASE + 367; // There are no alternate servers registered on this server.
- {$EXTERNALSYM NERR_NoAlternateServers}
-// UNUSED BASE+368
-// UNUSED BASE+369
-
- NERR_TryDownLevel = NERR_BASE + 370; // Try down-level (remote admin protocol) version of API instead.
- {$EXTERNALSYM NERR_TryDownLevel}
-
-//
-// UPS error codes.
-//
-// NERR_BASE + (380-384)
-
- NERR_UPSDriverNotStarted = NERR_BASE + 380; // The UPS driver could not be accessed by the UPS service.
- {$EXTERNALSYM NERR_UPSDriverNotStarted}
- NERR_UPSInvalidConfig = NERR_BASE + 381; // The UPS service is not configured correctly.
- {$EXTERNALSYM NERR_UPSInvalidConfig}
- NERR_UPSInvalidCommPort = NERR_BASE + 382; // The UPS service could not access the specified Comm Port.
- {$EXTERNALSYM NERR_UPSInvalidCommPort}
- NERR_UPSSignalAsserted = NERR_BASE + 383; // The UPS indicated a line fail or low battery situation. Service not started.
- {$EXTERNALSYM NERR_UPSSignalAsserted}
- NERR_UPSShutdownFailed = NERR_BASE + 384; // The UPS service failed to perform a system shut down.
- {$EXTERNALSYM NERR_UPSShutdownFailed}
-
-//
-// Remoteboot error codes.
-//
-// NERR_BASE + (400-419)
-// Error codes 400 - 405 are used by RPLBOOT.SYS.
-// Error codes 403, 407 - 416 are used by RPLLOADR.COM,
-// Error code 417 is the alerter message of REMOTEBOOT (RPLSERVR.EXE).
-// Error code 418 is for when REMOTEBOOT can't start
-// Error code 419 is for a disallowed 2nd rpl connection
-//
-
- NERR_BadDosRetCode = NERR_BASE + 400; // The program below returned an MS-DOS error code:
- {$EXTERNALSYM NERR_BadDosRetCode}
- NERR_ProgNeedsExtraMem = NERR_BASE + 401; // The program below needs more memory:
- {$EXTERNALSYM NERR_ProgNeedsExtraMem}
- NERR_BadDosFunction = NERR_BASE + 402; // The program below called an unsupported MS-DOS function:
- {$EXTERNALSYM NERR_BadDosFunction}
- NERR_RemoteBootFailed = NERR_BASE + 403; // The workstation failed to boot.
- {$EXTERNALSYM NERR_RemoteBootFailed}
- NERR_BadFileCheckSum = NERR_BASE + 404; // The file below is corrupt.
- {$EXTERNALSYM NERR_BadFileCheckSum}
- NERR_NoRplBootSystem = NERR_BASE + 405; // No loader is specified in the boot-block definition file.
- {$EXTERNALSYM NERR_NoRplBootSystem}
- NERR_RplLoadrNetBiosErr = NERR_BASE + 406; // NetBIOS returned an error: The NCB and SMB are dumped above.
- {$EXTERNALSYM NERR_RplLoadrNetBiosErr}
- NERR_RplLoadrDiskErr = NERR_BASE + 407; // A disk I/O error occurred.
- {$EXTERNALSYM NERR_RplLoadrDiskErr}
- NERR_ImageParamErr = NERR_BASE + 408; // Image parameter substitution failed.
- {$EXTERNALSYM NERR_ImageParamErr}
- NERR_TooManyImageParams = NERR_BASE + 409; // Too many image parameters cross disk sector boundaries.
- {$EXTERNALSYM NERR_TooManyImageParams}
- NERR_NonDosFloppyUsed = NERR_BASE + 410; // The image was not generated from an MS-DOS diskette formatted with /S.
- {$EXTERNALSYM NERR_NonDosFloppyUsed}
- NERR_RplBootRestart = NERR_BASE + 411; // Remote boot will be restarted later.
- {$EXTERNALSYM NERR_RplBootRestart}
- NERR_RplSrvrCallFailed = NERR_BASE + 412; // The call to the Remoteboot server failed.
- {$EXTERNALSYM NERR_RplSrvrCallFailed}
- NERR_CantConnectRplSrvr = NERR_BASE + 413; // Cannot connect to the Remoteboot server.
- {$EXTERNALSYM NERR_CantConnectRplSrvr}
- NERR_CantOpenImageFile = NERR_BASE + 414; // Cannot open image file on the Remoteboot server.
- {$EXTERNALSYM NERR_CantOpenImageFile}
- NERR_CallingRplSrvr = NERR_BASE + 415; // Connecting to the Remoteboot server...
- {$EXTERNALSYM NERR_CallingRplSrvr}
- NERR_StartingRplBoot = NERR_BASE + 416; // Connecting to the Remoteboot server...
- {$EXTERNALSYM NERR_StartingRplBoot}
- NERR_RplBootServiceTerm = NERR_BASE + 417; // Remote boot service was stopped; check the error log for the cause of the problem.
- {$EXTERNALSYM NERR_RplBootServiceTerm}
- NERR_RplBootStartFailed = NERR_BASE + 418; // Remote boot startup failed; check the error log for the cause of the problem.
- {$EXTERNALSYM NERR_RplBootStartFailed}
- NERR_RPL_CONNECTED = NERR_BASE + 419; // A second connection to a Remoteboot resource is not allowed.
- {$EXTERNALSYM NERR_RPL_CONNECTED}
-
-//
-// FTADMIN API error codes
-//
-// NERR_BASE + (425-434)
-//
-// (Currently not used in NT)
-//
-
-//
-// Browser service API error codes
-//
-// NERR_BASE + (450-475)
-//
-
- NERR_BrowserConfiguredToNotRun = NERR_BASE + 450; // The browser service was configured with MaintainServerList=No.
- {$EXTERNALSYM NERR_BrowserConfiguredToNotRun}
-
-//
-// Additional Remoteboot error codes.
-//
-// NERR_BASE + (510-550)
-
- NERR_RplNoAdaptersStarted = NERR_BASE + 510; // Service failed to start since none of the network adapters started with this service.
- {$EXTERNALSYM NERR_RplNoAdaptersStarted}
- NERR_RplBadRegistry = NERR_BASE + 511; // Service failed to start due to bad startup information in the registry.
- {$EXTERNALSYM NERR_RplBadRegistry}
- NERR_RplBadDatabase = NERR_BASE + 512; // Service failed to start because its database is absent or corrupt.
- {$EXTERNALSYM NERR_RplBadDatabase}
- NERR_RplRplfilesShare = NERR_BASE + 513; // Service failed to start because RPLFILES share is absent.
- {$EXTERNALSYM NERR_RplRplfilesShare}
- NERR_RplNotRplServer = NERR_BASE + 514; // Service failed to start because RPLUSER group is absent.
- {$EXTERNALSYM NERR_RplNotRplServer}
- NERR_RplCannotEnum = NERR_BASE + 515; // Cannot enumerate service records.
- {$EXTERNALSYM NERR_RplCannotEnum}
- NERR_RplWkstaInfoCorrupted = NERR_BASE + 516; // Workstation record information has been corrupted.
- {$EXTERNALSYM NERR_RplWkstaInfoCorrupted}
- NERR_RplWkstaNotFound = NERR_BASE + 517; // Workstation record was not found.
- {$EXTERNALSYM NERR_RplWkstaNotFound}
- NERR_RplWkstaNameUnavailable = NERR_BASE + 518; // Workstation name is in use by some other workstation.
- {$EXTERNALSYM NERR_RplWkstaNameUnavailable}
- NERR_RplProfileInfoCorrupted = NERR_BASE + 519; // Profile record information has been corrupted.
- {$EXTERNALSYM NERR_RplProfileInfoCorrupted}
- NERR_RplProfileNotFound = NERR_BASE + 520; // Profile record was not found.
- {$EXTERNALSYM NERR_RplProfileNotFound}
- NERR_RplProfileNameUnavailable = NERR_BASE + 521; // Profile name is in use by some other profile.
- {$EXTERNALSYM NERR_RplProfileNameUnavailable}
- NERR_RplProfileNotEmpty = NERR_BASE + 522; // There are workstations using this profile.
- {$EXTERNALSYM NERR_RplProfileNotEmpty}
- NERR_RplConfigInfoCorrupted = NERR_BASE + 523; // Configuration record information has been corrupted.
- {$EXTERNALSYM NERR_RplConfigInfoCorrupted}
- NERR_RplConfigNotFound = NERR_BASE + 524; // Configuration record was not found.
- {$EXTERNALSYM NERR_RplConfigNotFound}
- NERR_RplAdapterInfoCorrupted = NERR_BASE + 525; // Adapter id record information has been corrupted.
- {$EXTERNALSYM NERR_RplAdapterInfoCorrupted}
- NERR_RplInternal = NERR_BASE + 526; // An internal service error has occurred.
- {$EXTERNALSYM NERR_RplInternal}
- NERR_RplVendorInfoCorrupted = NERR_BASE + 527; // Vendor id record information has been corrupted.
- {$EXTERNALSYM NERR_RplVendorInfoCorrupted}
- NERR_RplBootInfoCorrupted = NERR_BASE + 528; // Boot block record information has been corrupted.
- {$EXTERNALSYM NERR_RplBootInfoCorrupted}
- NERR_RplWkstaNeedsUserAcct = NERR_BASE + 529; // The user account for this workstation record is missing.
- {$EXTERNALSYM NERR_RplWkstaNeedsUserAcct}
- NERR_RplNeedsRPLUSERAcct = NERR_BASE + 530; // The RPLUSER local group could not be found.
- {$EXTERNALSYM NERR_RplNeedsRPLUSERAcct}
- NERR_RplBootNotFound = NERR_BASE + 531; // Boot block record was not found.
- {$EXTERNALSYM NERR_RplBootNotFound}
- NERR_RplIncompatibleProfile = NERR_BASE + 532; // Chosen profile is incompatible with this workstation.
- {$EXTERNALSYM NERR_RplIncompatibleProfile}
- NERR_RplAdapterNameUnavailable = NERR_BASE + 533; // Chosen network adapter id is in use by some other workstation.
- {$EXTERNALSYM NERR_RplAdapterNameUnavailable}
- NERR_RplConfigNotEmpty = NERR_BASE + 534; // There are profiles using this configuration.
- {$EXTERNALSYM NERR_RplConfigNotEmpty}
- NERR_RplBootInUse = NERR_BASE + 535; // There are workstations, profiles or configurations using this boot block.
- {$EXTERNALSYM NERR_RplBootInUse}
- NERR_RplBackupDatabase = NERR_BASE + 536; // Service failed to backup Remoteboot database.
- {$EXTERNALSYM NERR_RplBackupDatabase}
- NERR_RplAdapterNotFound = NERR_BASE + 537; // Adapter record was not found.
- {$EXTERNALSYM NERR_RplAdapterNotFound}
- NERR_RplVendorNotFound = NERR_BASE + 538; // Vendor record was not found.
- {$EXTERNALSYM NERR_RplVendorNotFound}
- NERR_RplVendorNameUnavailable = NERR_BASE + 539; // Vendor name is in use by some other vendor record.
- {$EXTERNALSYM NERR_RplVendorNameUnavailable}
- NERR_RplBootNameUnavailable = NERR_BASE + 540; // (boot name, vendor id) is in use by some other boot block record.
- {$EXTERNALSYM NERR_RplBootNameUnavailable}
- NERR_RplConfigNameUnavailable = NERR_BASE + 541; // Configuration name is in use by some other configuration.
- {$EXTERNALSYM NERR_RplConfigNameUnavailable}
-
-//*INTERNAL_ONLY*
-
-//
-// Dfs API error codes.
-//
-// NERR_BASE + (560-590)
-
- NERR_DfsInternalCorruption = NERR_BASE + 560; // The internal database maintained by the DFS service is corrupt
- {$EXTERNALSYM NERR_DfsInternalCorruption}
- NERR_DfsVolumeDataCorrupt = NERR_BASE + 561; // One of the records in the internal DFS database is corrupt
- {$EXTERNALSYM NERR_DfsVolumeDataCorrupt}
- NERR_DfsNoSuchVolume = NERR_BASE + 562; // There is no DFS name whose entry path matches the input Entry Path
- {$EXTERNALSYM NERR_DfsNoSuchVolume}
- NERR_DfsVolumeAlreadyExists = NERR_BASE + 563; // A root or link with the given name already exists
- {$EXTERNALSYM NERR_DfsVolumeAlreadyExists}
- NERR_DfsAlreadyShared = NERR_BASE + 564; // The server share specified is already shared in the DFS
- {$EXTERNALSYM NERR_DfsAlreadyShared}
- NERR_DfsNoSuchShare = NERR_BASE + 565; // The indicated server share does not support the indicated DFS namespace
- {$EXTERNALSYM NERR_DfsNoSuchShare}
- NERR_DfsNotALeafVolume = NERR_BASE + 566; // The operation is not valid on this portion of the namespace
- {$EXTERNALSYM NERR_DfsNotALeafVolume}
- NERR_DfsLeafVolume = NERR_BASE + 567; // The operation is not valid on this portion of the namespace
- {$EXTERNALSYM NERR_DfsLeafVolume}
- NERR_DfsVolumeHasMultipleServers = NERR_BASE + 568; // The operation is ambiguous because the link has multiple servers
- {$EXTERNALSYM NERR_DfsVolumeHasMultipleServers}
- NERR_DfsCantCreateJunctionPoint = NERR_BASE + 569; // Unable to create a link
- {$EXTERNALSYM NERR_DfsCantCreateJunctionPoint}
- NERR_DfsServerNotDfsAware = NERR_BASE + 570; // The server is not DFS Aware
- {$EXTERNALSYM NERR_DfsServerNotDfsAware}
- NERR_DfsBadRenamePath = NERR_BASE + 571; // The specified rename target path is invalid
- {$EXTERNALSYM NERR_DfsBadRenamePath}
- NERR_DfsVolumeIsOffline = NERR_BASE + 572; // The specified DFS link is offline
- {$EXTERNALSYM NERR_DfsVolumeIsOffline}
- NERR_DfsNoSuchServer = NERR_BASE + 573; // The specified server is not a server for this link
- {$EXTERNALSYM NERR_DfsNoSuchServer}
- NERR_DfsCyclicalName = NERR_BASE + 574; // A cycle in the DFS name was detected
- {$EXTERNALSYM NERR_DfsCyclicalName}
- NERR_DfsNotSupportedInServerDfs = NERR_BASE + 575; // The operation is not supported on a server-based DFS
- {$EXTERNALSYM NERR_DfsNotSupportedInServerDfs}
- NERR_DfsDuplicateService = NERR_BASE + 576; // This link is already supported by the specified server-share
- {$EXTERNALSYM NERR_DfsDuplicateService}
- NERR_DfsCantRemoveLastServerShare = NERR_BASE + 577; // Can't remove the last server-share supporting this root or link
- {$EXTERNALSYM NERR_DfsCantRemoveLastServerShare}
- NERR_DfsVolumeIsInterDfs = NERR_BASE + 578; // The operation is not supported for an Inter-DFS link
- {$EXTERNALSYM NERR_DfsVolumeIsInterDfs}
- NERR_DfsInconsistent = NERR_BASE + 579; // The internal state of the DFS Service has become inconsistent
- {$EXTERNALSYM NERR_DfsInconsistent}
- NERR_DfsServerUpgraded = NERR_BASE + 580; // The DFS Service has been installed on the specified server
- {$EXTERNALSYM NERR_DfsServerUpgraded}
- NERR_DfsDataIsIdentical = NERR_BASE + 581; // The DFS data being reconciled is identical
- {$EXTERNALSYM NERR_DfsDataIsIdentical}
- NERR_DfsCantRemoveDfsRoot = NERR_BASE + 582; // The DFS root cannot be deleted - Uninstall DFS if required
- {$EXTERNALSYM NERR_DfsCantRemoveDfsRoot}
- NERR_DfsChildOrParentInDfs = NERR_BASE + 583; // A child or parent directory of the share is already in a DFS
- {$EXTERNALSYM NERR_DfsChildOrParentInDfs}
- NERR_DfsInternalError = NERR_BASE + 590; // DFS internal error
- {$EXTERNALSYM NERR_DfsInternalError}
-
-//
-// Net setup error codes.
-//
-// NERR_BASE + (591-600)
-
- NERR_SetupAlreadyJoined = NERR_BASE + 591; // This machine is already joined to a domain.
- {$EXTERNALSYM NERR_SetupAlreadyJoined}
- NERR_SetupNotJoined = NERR_BASE + 592; // This machine is not currently joined to a domain.
- {$EXTERNALSYM NERR_SetupNotJoined}
- NERR_SetupDomainController = NERR_BASE + 593; // This machine is a domain controller and cannot be unjoined from a domain.
- {$EXTERNALSYM NERR_SetupDomainController}
- NERR_DefaultJoinRequired = NERR_BASE + 594; // The destination domain controller does not support creating machine accounts in OUs.
- {$EXTERNALSYM NERR_DefaultJoinRequired}
- NERR_InvalidWorkgroupName = NERR_BASE + 595; // The specified workgroup name is invalid.
- {$EXTERNALSYM NERR_InvalidWorkgroupName}
- NERR_NameUsesIncompatibleCodePage = NERR_BASE + 596; // The specified computer name is incompatible with the default language used on the domain controller.
- {$EXTERNALSYM NERR_NameUsesIncompatibleCodePage}
- NERR_ComputerAccountNotFound = NERR_BASE + 597; // The specified computer account could not be found.
- {$EXTERNALSYM NERR_ComputerAccountNotFound}
- NERR_PersonalSku = NERR_BASE + 598; // This version of Windows cannot be joined to a domain.
- {$EXTERNALSYM NERR_PersonalSku}
-
-//
-// Some Password and account error results
-//
-// NERR_BASE + (601 - 608)
-//
-
- NERR_PasswordMustChange = NERR_BASE + 601; // Password must change at next logon
- {$EXTERNALSYM NERR_PasswordMustChange}
- NERR_AccountLockedOut = NERR_BASE + 602; // Account is locked out
- {$EXTERNALSYM NERR_AccountLockedOut}
- NERR_PasswordTooLong = NERR_BASE + 603; // Password is too long
- {$EXTERNALSYM NERR_PasswordTooLong}
- NERR_PasswordNotComplexEnough = NERR_BASE + 604; // Password doesn't meet the complexity policy
- {$EXTERNALSYM NERR_PasswordNotComplexEnough}
- NERR_PasswordFilterError = NERR_BASE + 605; // Password doesn't meet the requirements of the filter dll's
- {$EXTERNALSYM NERR_PasswordFilterError}
-
-//**********WARNING ****************
-//The range 2750-2799 has been *
-//allocated to the IBM LAN Server *
-//*********************************
-
-//**********WARNING ****************
-//The range 2900-2999 has been *
-//reserved for Microsoft OEMs *
-//*********************************
-
-//*END_INTERNAL*
-
- MAX_NERR = NERR_BASE + 899; // This is the last error in NERR range.
- {$EXTERNALSYM MAX_NERR}
-
-//
-// end of list
-//
-// WARNING: Do not exceed MAX_NERR; values above this are used by
-// other error code ranges (errlog.h, service.h, apperr.h).
-
-implementation
-
-end.
+{******************************************************************************}
+{ }
+{ Lan Manager Error API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: lmerr.h, released November 2001. The original Pascal }
+{ code is: LmErr.pas, released Februari 2002. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwalmerr.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaLmErr;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "lmerr.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+const
+ NERR_Success = 0; // Success
+ {$EXTERNALSYM NERR_Success}
+
+// ERROR_ equates can be intermixed with NERR_ equates.
+
+// NERR_BASE is the base of error codes from network utilities,
+// chosen to avoid conflict with system and redirector error codes.
+// 2100 is a value that has been assigned to us by system.
+
+ NERR_BASE = 2100;
+ {$EXTERNALSYM NERR_BASE}
+
+//*INTERNAL_ONLY*
+
+{**********WARNING *****************
+ *See the comment in lmcons.h for *
+ *info on the allocation of errors *
+ ***********************************}
+
+{**********WARNING *****************
+ *The range 2750-2799 has been *
+ *allocated to the IBM LAN Server *
+ ***********************************}
+
+{**********WARNING *****************
+ *The range 2900-2999 has been *
+ *reserved for Microsoft OEMs *
+ ***********************************}
+
+// UNUSED BASE+0
+// UNUSED BASE+1
+ NERR_NetNotStarted = NERR_BASE + 2; // The workstation driver is not installed.
+ {$EXTERNALSYM NERR_NetNotStarted}
+ NERR_UnknownServer = NERR_BASE + 3; // The server could not be located.
+ {$EXTERNALSYM NERR_UnknownServer}
+ NERR_ShareMem = NERR_BASE + 4; // An internal error occurred. The network cannot access a shared memory segment.
+ {$EXTERNALSYM NERR_ShareMem}
+
+ NERR_NoNetworkResource = NERR_BASE + 5; // A network resource shortage occurred .
+ {$EXTERNALSYM NERR_NoNetworkResource}
+ NERR_RemoteOnly = NERR_BASE + 6; // This operation is not supported on workstations.
+ {$EXTERNALSYM NERR_RemoteOnly}
+ NERR_DevNotRedirected = NERR_BASE + 7; // The device is not connected.
+ {$EXTERNALSYM NERR_DevNotRedirected}
+// NERR_BASE+8 is used for ERROR_CONNECTED_OTHER_PASSWORD
+// NERR_BASE+9 is used for ERROR_CONNECTED_OTHER_PASSWORD_DEFAULT
+// UNUSED BASE+10
+// UNUSED BASE+11
+// UNUSED BASE+12
+// UNUSED BASE+13
+ NERR_ServerNotStarted = NERR_BASE + 14; // The Server service is not started.
+ {$EXTERNALSYM NERR_ServerNotStarted}
+ NERR_ItemNotFound = NERR_BASE + 15; // The queue is empty.
+ {$EXTERNALSYM NERR_ItemNotFound}
+ NERR_UnknownDevDir = NERR_BASE + 16; // The device or directory does not exist.
+ {$EXTERNALSYM NERR_UnknownDevDir}
+ NERR_RedirectedPath = NERR_BASE + 17; // The operation is invalid on a redirected resource.
+ {$EXTERNALSYM NERR_RedirectedPath}
+ NERR_DuplicateShare = NERR_BASE + 18; // The name has already been shared.
+ {$EXTERNALSYM NERR_DuplicateShare}
+ NERR_NoRoom = NERR_BASE + 19; // The server is currently out of the requested resource.
+ {$EXTERNALSYM NERR_NoRoom}
+// UNUSED BASE+20
+ NERR_TooManyItems = NERR_BASE + 21; // Requested addition of items exceeds the maximum allowed.
+ {$EXTERNALSYM NERR_TooManyItems}
+ NERR_InvalidMaxUsers = NERR_BASE + 22; // The Peer service supports only two simultaneous users.
+ {$EXTERNALSYM NERR_InvalidMaxUsers}
+ NERR_BufTooSmall = NERR_BASE + 23; // The API return buffer is too small.
+ {$EXTERNALSYM NERR_BufTooSmall}
+// UNUSED BASE+24
+// UNUSED BASE+25
+// UNUSED BASE+26
+ NERR_RemoteErr = NERR_BASE + 27; // A remote API error occurred.
+ {$EXTERNALSYM NERR_RemoteErr}
+// UNUSED BASE+28
+// UNUSED BASE+29
+// UNUSED BASE+30
+ NERR_LanmanIniError = NERR_BASE + 31; // An error occurred when opening or reading the configuration file.
+ {$EXTERNALSYM NERR_LanmanIniError}
+// UNUSED BASE+32
+// UNUSED BASE+33
+// UNUSED BASE+34
+// UNUSED BASE+35
+ NERR_NetworkError = NERR_BASE + 36; // A general network error occurred.
+ {$EXTERNALSYM NERR_NetworkError}
+ NERR_WkstaInconsistentState = NERR_BASE + 37;
+ {$EXTERNALSYM NERR_WkstaInconsistentState}
+ // The Workstation service is in an inconsistent state. Restart the computer before restarting the Workstation service.
+ NERR_WkstaNotStarted = NERR_BASE + 38; // The Workstation service has not been started.
+ {$EXTERNALSYM NERR_WkstaNotStarted}
+ NERR_BrowserNotStarted = NERR_BASE + 39; // The requested information is not available.
+ {$EXTERNALSYM NERR_BrowserNotStarted}
+ NERR_InternalError = NERR_BASE + 40; // An internal Windows 2000 error occurred.
+ {$EXTERNALSYM NERR_InternalError}
+ NERR_BadTransactConfig = NERR_BASE + 41; // The server is not configured for transactions.
+ {$EXTERNALSYM NERR_BadTransactConfig}
+ NERR_InvalidAPI = NERR_BASE + 42; // The requested API is not supported on the remote server.
+ {$EXTERNALSYM NERR_InvalidAPI}
+ NERR_BadEventName = NERR_BASE + 43; // The event name is invalid.
+ {$EXTERNALSYM NERR_BadEventName}
+ NERR_DupNameReboot = NERR_BASE + 44; // The computer name already exists on the network. Change it and restart the computer.
+ {$EXTERNALSYM NERR_DupNameReboot}
+
+//
+// Config API related
+// Error codes from BASE+45 to BASE+49
+
+// UNUSED BASE+45
+ NERR_CfgCompNotFound = NERR_BASE + 46; // The specified component could not be found in the configuration information.
+ {$EXTERNALSYM NERR_CfgCompNotFound}
+ NERR_CfgParamNotFound = NERR_BASE + 47; // The specified parameter could not be found in the configuration information.
+ {$EXTERNALSYM NERR_CfgParamNotFound}
+ NERR_LineTooLong = NERR_BASE + 49; // A line in the configuration file is too long.
+ {$EXTERNALSYM NERR_LineTooLong}
+
+//
+// Spooler API related
+// Error codes from BASE+50 to BASE+79
+
+ NERR_QNotFound = NERR_BASE + 50; // The printer does not exist.
+ {$EXTERNALSYM NERR_QNotFound}
+ NERR_JobNotFound = NERR_BASE + 51; // The print job does not exist.
+ {$EXTERNALSYM NERR_JobNotFound}
+ NERR_DestNotFound = NERR_BASE + 52; // The printer destination cannot be found.
+ {$EXTERNALSYM NERR_DestNotFound}
+ NERR_DestExists = NERR_BASE + 53; // The printer destination already exists.
+ {$EXTERNALSYM NERR_DestExists}
+ NERR_QExists = NERR_BASE + 54; // The printer queue already exists.
+ {$EXTERNALSYM NERR_QExists}
+ NERR_QNoRoom = NERR_BASE + 55; // No more printers can be added.
+ {$EXTERNALSYM NERR_QNoRoom}
+ NERR_JobNoRoom = NERR_BASE + 56; // No more print jobs can be added.
+ {$EXTERNALSYM NERR_JobNoRoom}
+ NERR_DestNoRoom = NERR_BASE + 57; // No more printer destinations can be added.
+ {$EXTERNALSYM NERR_DestNoRoom}
+ NERR_DestIdle = NERR_BASE + 58; // This printer destination is idle and cannot accept control operations.
+ {$EXTERNALSYM NERR_DestIdle}
+ NERR_DestInvalidOp = NERR_BASE + 59; // This printer destination request contains an invalid control function.
+ {$EXTERNALSYM NERR_DestInvalidOp}
+ NERR_ProcNoRespond = NERR_BASE + 60; // The print processor is not responding.
+ {$EXTERNALSYM NERR_ProcNoRespond}
+ NERR_SpoolerNotLoaded = NERR_BASE + 61; // The spooler is not running.
+ {$EXTERNALSYM NERR_SpoolerNotLoaded}
+ NERR_DestInvalidState = NERR_BASE + 62; // This operation cannot be performed on the print destination in its current state.
+ {$EXTERNALSYM NERR_DestInvalidState}
+ NERR_QInvalidState = NERR_BASE + 63; // This operation cannot be performed on the printer queue in its current state.
+ {$EXTERNALSYM NERR_QInvalidState}
+ NERR_JobInvalidState = NERR_BASE + 64; // This operation cannot be performed on the print job in its current state.
+ {$EXTERNALSYM NERR_JobInvalidState}
+ NERR_SpoolNoMemory = NERR_BASE + 65; // A spooler memory allocation failure occurred.
+ {$EXTERNALSYM NERR_SpoolNoMemory}
+ NERR_DriverNotFound = NERR_BASE + 66; // The device driver does not exist.
+ {$EXTERNALSYM NERR_DriverNotFound}
+ NERR_DataTypeInvalid = NERR_BASE + 67; // The data type is not supported by the print processor.
+ {$EXTERNALSYM NERR_DataTypeInvalid}
+ NERR_ProcNotFound = NERR_BASE + 68; // The print processor is not installed.
+ {$EXTERNALSYM NERR_ProcNotFound}
+
+//
+// Service API related
+// Error codes from BASE+80 to BASE+99
+
+ NERR_ServiceTableLocked = NERR_BASE + 80; // The service database is locked.
+ {$EXTERNALSYM NERR_ServiceTableLocked}
+ NERR_ServiceTableFull = NERR_BASE + 81; // The service table is full.
+ {$EXTERNALSYM NERR_ServiceTableFull}
+ NERR_ServiceInstalled = NERR_BASE + 82; // The requested service has already been started.
+ {$EXTERNALSYM NERR_ServiceInstalled}
+ NERR_ServiceEntryLocked = NERR_BASE + 83; // The service does not respond to control actions.
+ {$EXTERNALSYM NERR_ServiceEntryLocked}
+ NERR_ServiceNotInstalled = NERR_BASE + 84; // The service has not been started.
+ {$EXTERNALSYM NERR_ServiceNotInstalled}
+ NERR_BadServiceName = NERR_BASE + 85; // The service name is invalid.
+ {$EXTERNALSYM NERR_BadServiceName}
+ NERR_ServiceCtlTimeout = NERR_BASE + 86; // The service is not responding to the control function.
+ {$EXTERNALSYM NERR_ServiceCtlTimeout}
+ NERR_ServiceCtlBusy = NERR_BASE + 87; // The service control is busy.
+ {$EXTERNALSYM NERR_ServiceCtlBusy}
+ NERR_BadServiceProgName = NERR_BASE + 88; // The configuration file contains an invalid service program name.
+ {$EXTERNALSYM NERR_BadServiceProgName}
+ NERR_ServiceNotCtrl = NERR_BASE + 89; // The service could not be controlled in its present state.
+ {$EXTERNALSYM NERR_ServiceNotCtrl}
+ NERR_ServiceKillProc = NERR_BASE + 90; // The service ended abnormally.
+ {$EXTERNALSYM NERR_ServiceKillProc}
+ NERR_ServiceCtlNotValid = NERR_BASE + 91; // The requested pause,continue, or stop is not valid for this service.
+ {$EXTERNALSYM NERR_ServiceCtlNotValid}
+ NERR_NotInDispatchTbl = NERR_BASE + 92; // The service control dispatcher could not find the service name in the dispatch table.
+ {$EXTERNALSYM NERR_NotInDispatchTbl}
+ NERR_BadControlRecv = NERR_BASE + 93; // The service control dispatcher pipe read failed.
+ {$EXTERNALSYM NERR_BadControlRecv}
+ NERR_ServiceNotStarting = NERR_BASE + 94; // A thread for the new service could not be created.
+ {$EXTERNALSYM NERR_ServiceNotStarting}
+
+//
+// Wksta and Logon API related
+// Error codes from BASE+100 to BASE+118
+
+ NERR_AlreadyLoggedOn = NERR_BASE + 100; // This workstation is already logged on to the local-area network.
+ {$EXTERNALSYM NERR_AlreadyLoggedOn}
+ NERR_NotLoggedOn = NERR_BASE + 101; // The workstation is not logged on to the local-area network.
+ {$EXTERNALSYM NERR_NotLoggedOn}
+ NERR_BadUsername = NERR_BASE + 102; // The user name or group name parameter is invalid.
+ {$EXTERNALSYM NERR_BadUsername}
+ NERR_BadPassword = NERR_BASE + 103; // The password parameter is invalid.
+ {$EXTERNALSYM NERR_BadPassword}
+ NERR_UnableToAddName_W = NERR_BASE + 104; // @W The logon processor did not add the message alias.
+ {$EXTERNALSYM NERR_UnableToAddName_W}
+ NERR_UnableToAddName_F = NERR_BASE + 105; // The logon processor did not add the message alias.
+ {$EXTERNALSYM NERR_UnableToAddName_F}
+ NERR_UnableToDelName_W = NERR_BASE + 106; // @W The logoff processor did not delete the message alias.
+ {$EXTERNALSYM NERR_UnableToDelName_W}
+ NERR_UnableToDelName_F = NERR_BASE + 107; // The logoff processor did not delete the message alias.
+ {$EXTERNALSYM NERR_UnableToDelName_F}
+// UNUSED BASE+108
+ NERR_LogonsPaused = NERR_BASE + 109; // Network logons are paused.
+ {$EXTERNALSYM NERR_LogonsPaused}
+ NERR_LogonServerConflict = NERR_BASE + 110; // A centralized logon-server conflict occurred.
+ {$EXTERNALSYM NERR_LogonServerConflict}
+ NERR_LogonNoUserPath = NERR_BASE + 111; // The server is configured without a valid user path.
+ {$EXTERNALSYM NERR_LogonNoUserPath}
+ NERR_LogonScriptError = NERR_BASE + 112; // An error occurred while loading or running the logon script.
+ {$EXTERNALSYM NERR_LogonScriptError}
+// UNUSED BASE+113
+ NERR_StandaloneLogon = NERR_BASE + 114; // The logon server was not specified. Your computer will be logged on as STANDALONE.
+ {$EXTERNALSYM NERR_StandaloneLogon}
+ NERR_LogonServerNotFound = NERR_BASE + 115; // The logon server could not be found.
+ {$EXTERNALSYM NERR_LogonServerNotFound}
+ NERR_LogonDomainExists = NERR_BASE + 116; // There is already a logon domain for this computer.
+ {$EXTERNALSYM NERR_LogonDomainExists}
+ NERR_NonValidatedLogon = NERR_BASE + 117; // The logon server could not validate the logon.
+ {$EXTERNALSYM NERR_NonValidatedLogon}
+
+//
+// ACF API related (access, user, group)
+// Error codes from BASE+119 to BASE+149
+
+ NERR_ACFNotFound = NERR_BASE + 119; // The security database could not be found.
+ {$EXTERNALSYM NERR_ACFNotFound}
+ NERR_GroupNotFound = NERR_BASE + 120; // The group name could not be found.
+ {$EXTERNALSYM NERR_GroupNotFound}
+ NERR_UserNotFound = NERR_BASE + 121; // The user name could not be found.
+ {$EXTERNALSYM NERR_UserNotFound}
+ NERR_ResourceNotFound = NERR_BASE + 122; // The resource name could not be found.
+ {$EXTERNALSYM NERR_ResourceNotFound}
+ NERR_GroupExists = NERR_BASE + 123; // The group already exists.
+ {$EXTERNALSYM NERR_GroupExists}
+ NERR_UserExists = NERR_BASE + 124; // The account already exists.
+ {$EXTERNALSYM NERR_UserExists}
+ NERR_ResourceExists = NERR_BASE + 125; // The resource permission list already exists.
+ {$EXTERNALSYM NERR_ResourceExists}
+ NERR_NotPrimary = NERR_BASE + 126; // This operation is only allowed on the primary domain controller of the domain.
+ {$EXTERNALSYM NERR_NotPrimary}
+ NERR_ACFNotLoaded = NERR_BASE + 127; // The security database has not been started.
+ {$EXTERNALSYM NERR_ACFNotLoaded}
+ NERR_ACFNoRoom = NERR_BASE + 128; // There are too many names in the user accounts database.
+ {$EXTERNALSYM NERR_ACFNoRoom}
+ NERR_ACFFileIOFail = NERR_BASE + 129; // A disk I/O failure occurred.
+ {$EXTERNALSYM NERR_ACFFileIOFail}
+ NERR_ACFTooManyLists = NERR_BASE + 130; // The limit of 64 entries per resource was exceeded.
+ {$EXTERNALSYM NERR_ACFTooManyLists}
+ NERR_UserLogon = NERR_BASE + 131; // Deleting a user with a session is not allowed.
+ {$EXTERNALSYM NERR_UserLogon}
+ NERR_ACFNoParent = NERR_BASE + 132; // The parent directory could not be located.
+ {$EXTERNALSYM NERR_ACFNoParent}
+ NERR_CanNotGrowSegment = NERR_BASE + 133; // Unable to add to the security database session cache segment.
+ {$EXTERNALSYM NERR_CanNotGrowSegment}
+ NERR_SpeGroupOp = NERR_BASE + 134; // This operation is not allowed on this special group.
+ {$EXTERNALSYM NERR_SpeGroupOp}
+ NERR_NotInCache = NERR_BASE + 135; // This user is not cached in user accounts database session cache.
+ {$EXTERNALSYM NERR_NotInCache}
+ NERR_UserInGroup = NERR_BASE + 136; // The user already belongs to this group.
+ {$EXTERNALSYM NERR_UserInGroup}
+ NERR_UserNotInGroup = NERR_BASE + 137; // The user does not belong to this group.
+ {$EXTERNALSYM NERR_UserNotInGroup}
+ NERR_AccountUndefined = NERR_BASE + 138; // This user account is undefined.
+ {$EXTERNALSYM NERR_AccountUndefined}
+ NERR_AccountExpired = NERR_BASE + 139; // This user account has expired.
+ {$EXTERNALSYM NERR_AccountExpired}
+ NERR_InvalidWorkstation = NERR_BASE + 140; // The user is not allowed to log on from this workstation.
+ {$EXTERNALSYM NERR_InvalidWorkstation}
+ NERR_InvalidLogonHours = NERR_BASE + 141; // The user is not allowed to log on at this time.
+ {$EXTERNALSYM NERR_InvalidLogonHours}
+ NERR_PasswordExpired = NERR_BASE + 142; // The password of this user has expired.
+ {$EXTERNALSYM NERR_PasswordExpired}
+ NERR_PasswordCantChange = NERR_BASE + 143; // The password of this user cannot change.
+ {$EXTERNALSYM NERR_PasswordCantChange}
+ NERR_PasswordHistConflict = NERR_BASE + 144; // This password cannot be used now.
+ {$EXTERNALSYM NERR_PasswordHistConflict}
+ NERR_PasswordTooShort = NERR_BASE + 145; // The password does not meet the password policy requirements. Check the minimum password length, password complexity and password history requirements.
+ {$EXTERNALSYM NERR_PasswordTooShort}
+ NERR_PasswordTooRecent = NERR_BASE + 146; // The password of this user is too recent to change.
+ {$EXTERNALSYM NERR_PasswordTooRecent}
+ NERR_InvalidDatabase = NERR_BASE + 147; // The security database is corrupted.
+ {$EXTERNALSYM NERR_InvalidDatabase}
+ NERR_DatabaseUpToDate = NERR_BASE + 148; // No updates are necessary to this replicant network/local security database.
+ {$EXTERNALSYM NERR_DatabaseUpToDate}
+ NERR_SyncRequired = NERR_BASE + 149; // This replicant database is outdated; synchronization is required.
+ {$EXTERNALSYM NERR_SyncRequired}
+
+//
+// Use API related
+// Error codes from BASE+150 to BASE+169
+
+ NERR_UseNotFound = NERR_BASE + 150; // The network connection could not be found.
+ {$EXTERNALSYM NERR_UseNotFound}
+ NERR_BadAsgType = NERR_BASE + 151; // This asg_type is invalid.
+ {$EXTERNALSYM NERR_BadAsgType}
+ NERR_DeviceIsShared = NERR_BASE + 152; // This device is currently being shared.
+ {$EXTERNALSYM NERR_DeviceIsShared}
+
+//
+// Message Server related
+// Error codes BASE+170 to BASE+209
+
+ NERR_NoComputerName = NERR_BASE + 170; // The computer name could not be added as a message alias. The name may already exist on the network.
+ {$EXTERNALSYM NERR_NoComputerName}
+ NERR_MsgAlreadyStarted = NERR_BASE + 171; // The Messenger service is already started.
+ {$EXTERNALSYM NERR_MsgAlreadyStarted}
+ NERR_MsgInitFailed = NERR_BASE + 172; // The Messenger service failed to start.
+ {$EXTERNALSYM NERR_MsgInitFailed}
+ NERR_NameNotFound = NERR_BASE + 173; // The message alias could not be found on the network.
+ {$EXTERNALSYM NERR_NameNotFound}
+ NERR_AlreadyForwarded = NERR_BASE + 174; // This message alias has already been forwarded.
+ {$EXTERNALSYM NERR_AlreadyForwarded}
+ NERR_AddForwarded = NERR_BASE + 175; // This message alias has been added but is still forwarded.
+ {$EXTERNALSYM NERR_AddForwarded}
+ NERR_AlreadyExists = NERR_BASE + 176; // This message alias already exists locally.
+ {$EXTERNALSYM NERR_AlreadyExists}
+ NERR_TooManyNames = NERR_BASE + 177; // The maximum number of added message aliases has been exceeded.
+ {$EXTERNALSYM NERR_TooManyNames}
+ NERR_DelComputerName = NERR_BASE + 178; // The computer name could not be deleted.
+ {$EXTERNALSYM NERR_DelComputerName}
+ NERR_LocalForward = NERR_BASE + 179; // Messages cannot be forwarded back to the same workstation.
+ {$EXTERNALSYM NERR_LocalForward}
+ NERR_GrpMsgProcessor = NERR_BASE + 180; // An error occurred in the domain message processor.
+ {$EXTERNALSYM NERR_GrpMsgProcessor}
+ NERR_PausedRemote = NERR_BASE + 181; // The message was sent, but the recipient has paused the Messenger service.
+ {$EXTERNALSYM NERR_PausedRemote}
+ NERR_BadReceive = NERR_BASE + 182; // The message was sent but not received.
+ {$EXTERNALSYM NERR_BadReceive}
+ NERR_NameInUse = NERR_BASE + 183; // The message alias is currently in use. Try again later.
+ {$EXTERNALSYM NERR_NameInUse}
+ NERR_MsgNotStarted = NERR_BASE + 184; // The Messenger service has not been started.
+ {$EXTERNALSYM NERR_MsgNotStarted}
+ NERR_NotLocalName = NERR_BASE + 185; // The name is not on the local computer.
+ {$EXTERNALSYM NERR_NotLocalName}
+ NERR_NoForwardName = NERR_BASE + 186; // The forwarded message alias could not be found on the network.
+ {$EXTERNALSYM NERR_NoForwardName}
+ NERR_RemoteFull = NERR_BASE + 187; // The message alias table on the remote station is full.
+ {$EXTERNALSYM NERR_RemoteFull}
+ NERR_NameNotForwarded = NERR_BASE + 188; // Messages for this alias are not currently being forwarded.
+ {$EXTERNALSYM NERR_NameNotForwarded}
+ NERR_TruncatedBroadcast = NERR_BASE + 189; // The broadcast message was truncated.
+ {$EXTERNALSYM NERR_TruncatedBroadcast}
+ NERR_InvalidDevice = NERR_BASE + 194; // This is an invalid device name.
+ {$EXTERNALSYM NERR_InvalidDevice}
+ NERR_WriteFault = NERR_BASE + 195; // A write fault occurred.
+ {$EXTERNALSYM NERR_WriteFault}
+// UNUSED BASE+196
+ NERR_DuplicateName = NERR_BASE + 197; // A duplicate message alias exists on the network.
+ {$EXTERNALSYM NERR_DuplicateName}
+ NERR_DeleteLater = NERR_BASE + 198; // @W This message alias will be deleted later.
+ {$EXTERNALSYM NERR_DeleteLater}
+ NERR_IncompleteDel = NERR_BASE + 199; // The message alias was not successfully deleted from all networks.
+ {$EXTERNALSYM NERR_IncompleteDel}
+ NERR_MultipleNets = NERR_BASE + 200; // This operation is not supported on computers with multiple networks.
+ {$EXTERNALSYM NERR_MultipleNets}
+
+//
+// Server API related
+// Error codes BASE+210 to BASE+229
+
+ NERR_NetNameNotFound = NERR_BASE + 210; // This shared resource does not exist.
+ {$EXTERNALSYM NERR_NetNameNotFound}
+ NERR_DeviceNotShared = NERR_BASE + 211; // This device is not shared.
+ {$EXTERNALSYM NERR_DeviceNotShared}
+ NERR_ClientNameNotFound = NERR_BASE + 212; // A session does not exist with that computer name.
+ {$EXTERNALSYM NERR_ClientNameNotFound}
+ NERR_FileIdNotFound = NERR_BASE + 214; // There is not an open file with that identification number.
+ {$EXTERNALSYM NERR_FileIdNotFound}
+ NERR_ExecFailure = NERR_BASE + 215; // A failure occurred when executing a remote administration command.
+ {$EXTERNALSYM NERR_ExecFailure}
+ NERR_TmpFile = NERR_BASE + 216; // A failure occurred when opening a remote temporary file.
+ {$EXTERNALSYM NERR_TmpFile}
+ NERR_TooMuchData = NERR_BASE + 217; // The data returned from a remote administration command has been truncated to 64K.
+ {$EXTERNALSYM NERR_TooMuchData}
+ NERR_DeviceShareConflict = NERR_BASE + 218; // This device cannot be shared as both a spooled and a non-spooled resource.
+ {$EXTERNALSYM NERR_DeviceShareConflict}
+ NERR_BrowserTableIncomplete = NERR_BASE + 219; // The information in the list of servers may be incorrect.
+ {$EXTERNALSYM NERR_BrowserTableIncomplete}
+ NERR_NotLocalDomain = NERR_BASE + 220; // The computer is not active in this domain.
+ {$EXTERNALSYM NERR_NotLocalDomain}
+ NERR_IsDfsShare = NERR_BASE + 221; // The share must be removed from the Distributed File System before it can be deleted.
+ {$EXTERNALSYM NERR_IsDfsShare}
+
+//
+// CharDev API related
+// Error codes BASE+230 to BASE+249
+
+// UNUSED BASE+230
+ NERR_DevInvalidOpCode = NERR_BASE + 231; // The operation is invalid for this device.
+ {$EXTERNALSYM NERR_DevInvalidOpCode}
+ NERR_DevNotFound = NERR_BASE + 232; // This device cannot be shared.
+ {$EXTERNALSYM NERR_DevNotFound}
+ NERR_DevNotOpen = NERR_BASE + 233; // This device was not open.
+ {$EXTERNALSYM NERR_DevNotOpen}
+ NERR_BadQueueDevString = NERR_BASE + 234; // This device name list is invalid.
+ {$EXTERNALSYM NERR_BadQueueDevString}
+ NERR_BadQueuePriority = NERR_BASE + 235; // The queue priority is invalid.
+ {$EXTERNALSYM NERR_BadQueuePriority}
+ NERR_NoCommDevs = NERR_BASE + 237; // There are no shared communication devices.
+ {$EXTERNALSYM NERR_NoCommDevs}
+ NERR_QueueNotFound = NERR_BASE + 238; // The queue you specified does not exist.
+ {$EXTERNALSYM NERR_QueueNotFound}
+ NERR_BadDevString = NERR_BASE + 240; // This list of devices is invalid.
+ {$EXTERNALSYM NERR_BadDevString}
+ NERR_BadDev = NERR_BASE + 241; // The requested device is invalid.
+ {$EXTERNALSYM NERR_BadDev}
+ NERR_InUseBySpooler = NERR_BASE + 242; // This device is already in use by the spooler.
+ {$EXTERNALSYM NERR_InUseBySpooler}
+ NERR_CommDevInUse = NERR_BASE + 243; // This device is already in use as a communication device.
+ {$EXTERNALSYM NERR_CommDevInUse}
+
+//
+// NetICanonicalize and NetIType and NetIMakeLMFileName
+// NetIListCanon and NetINameCheck
+// Error codes BASE+250 to BASE+269
+
+ NERR_InvalidComputer = NERR_BASE + 251; // This computer name is invalid.
+ {$EXTERNALSYM NERR_InvalidComputer}
+// UNUSED BASE+252
+// UNUSED BASE+253
+ NERR_MaxLenExceeded = NERR_BASE + 254; // The string and prefix specified are too long.
+ {$EXTERNALSYM NERR_MaxLenExceeded}
+// UNUSED BASE+255
+ NERR_BadComponent = NERR_BASE + 256; // This path component is invalid.
+ {$EXTERNALSYM NERR_BadComponent}
+ NERR_CantType = NERR_BASE + 257; // Could not determine the type of input.
+ {$EXTERNALSYM NERR_CantType}
+// UNUSED BASE+258
+// UNUSED BASE+259
+ NERR_TooManyEntries = NERR_BASE + 262; // The buffer for types is not big enough.
+ {$EXTERNALSYM NERR_TooManyEntries}
+
+//
+// NetProfile
+// Error codes BASE+270 to BASE+276
+
+ NERR_ProfileFileTooBig = NERR_BASE + 270; // Profile files cannot exceed 64K.
+ {$EXTERNALSYM NERR_ProfileFileTooBig}
+ NERR_ProfileOffset = NERR_BASE + 271; // The start offset is out of range.
+ {$EXTERNALSYM NERR_ProfileOffset}
+ NERR_ProfileCleanup = NERR_BASE + 272; // The system cannot delete current connections to network resources.
+ {$EXTERNALSYM NERR_ProfileCleanup}
+ NERR_ProfileUnknownCmd = NERR_BASE + 273; // The system was unable to parse the command line in this file.
+ {$EXTERNALSYM NERR_ProfileUnknownCmd}
+ NERR_ProfileLoadErr = NERR_BASE + 274; // An error occurred while loading the profile file.
+ {$EXTERNALSYM NERR_ProfileLoadErr}
+ NERR_ProfileSaveErr = NERR_BASE + 275; // @W Errors occurred while saving the profile file. The profile was partially saved.
+ {$EXTERNALSYM NERR_ProfileSaveErr}
+
+//
+// NetAudit and NetErrorLog
+// Error codes BASE+277 to BASE+279
+
+ NERR_LogOverflow = NERR_BASE + 277; // Log file %1 is full.
+ {$EXTERNALSYM NERR_LogOverflow}
+ NERR_LogFileChanged = NERR_BASE + 278; // This log file has changed between reads.
+ {$EXTERNALSYM NERR_LogFileChanged}
+ NERR_LogFileCorrupt = NERR_BASE + 279; // Log file %1 is corrupt.
+ {$EXTERNALSYM NERR_LogFileCorrupt}
+
+//
+// NetRemote
+// Error codes BASE+280 to BASE+299
+
+ NERR_SourceIsDir = NERR_BASE + 280; // The source path cannot be a directory.
+ {$EXTERNALSYM NERR_SourceIsDir}
+ NERR_BadSource = NERR_BASE + 281; // The source path is illegal.
+ {$EXTERNALSYM NERR_BadSource}
+ NERR_BadDest = NERR_BASE + 282; // The destination path is illegal.
+ {$EXTERNALSYM NERR_BadDest}
+ NERR_DifferentServers = NERR_BASE + 283; // The source and destination paths are on different servers.
+ {$EXTERNALSYM NERR_DifferentServers}
+// UNUSED BASE+284
+ NERR_RunSrvPaused = NERR_BASE + 285; // The Run server you requested is paused.
+ {$EXTERNALSYM NERR_RunSrvPaused}
+// UNUSED BASE+286
+// UNUSED BASE+287
+// UNUSED BASE+288
+ NERR_ErrCommRunSrv = NERR_BASE + 289; // An error occurred when communicating with a Run server.
+ {$EXTERNALSYM NERR_ErrCommRunSrv}
+// UNUSED BASE+290
+ NERR_ErrorExecingGhost = NERR_BASE + 291; // An error occurred when starting a background process.
+ {$EXTERNALSYM NERR_ErrorExecingGhost}
+ NERR_ShareNotFound = NERR_BASE + 292; // The shared resource you are connected to could not be found.
+ {$EXTERNALSYM NERR_ShareNotFound}
+// UNUSED BASE+293
+// UNUSED BASE+294
+
+//
+// NetWksta.sys (redir) returned error codes.
+//
+// NERR_BASE + (300-329)
+
+ NERR_InvalidLana = NERR_BASE + 300; // The LAN adapter number is invalid.
+ {$EXTERNALSYM NERR_InvalidLana}
+ NERR_OpenFiles = NERR_BASE + 301; // There are open files on the connection.
+ {$EXTERNALSYM NERR_OpenFiles}
+ NERR_ActiveConns = NERR_BASE + 302; // Active connections still exist.
+ {$EXTERNALSYM NERR_ActiveConns}
+ NERR_BadPasswordCore = NERR_BASE + 303; // This share name or password is invalid.
+ {$EXTERNALSYM NERR_BadPasswordCore}
+ NERR_DevInUse = NERR_BASE + 304; // The device is being accessed by an active process.
+ {$EXTERNALSYM NERR_DevInUse}
+ NERR_LocalDrive = NERR_BASE + 305; // The drive letter is in use locally.
+ {$EXTERNALSYM NERR_LocalDrive}
+
+//
+// Alert error codes.
+//
+// NERR_BASE + (330-339)
+
+ NERR_AlertExists = NERR_BASE + 330; // The specified client is already registered for the specified event.
+ {$EXTERNALSYM NERR_AlertExists}
+ NERR_TooManyAlerts = NERR_BASE + 331; // The alert table is full.
+ {$EXTERNALSYM NERR_TooManyAlerts}
+ NERR_NoSuchAlert = NERR_BASE + 332; // An invalid or nonexistent alert name was raised.
+ {$EXTERNALSYM NERR_NoSuchAlert}
+ NERR_BadRecipient = NERR_BASE + 333; // The alert recipient is invalid.
+ {$EXTERNALSYM NERR_BadRecipient}
+ NERR_AcctLimitExceeded = NERR_BASE + 334; // A user's session with this server has been deleted
+ {$EXTERNALSYM NERR_AcctLimitExceeded}
+ // because the user's logon hours are no longer valid.
+
+//
+// Additional Error and Audit log codes.
+//
+// NERR_BASE +(340-343)
+
+ NERR_InvalidLogSeek = NERR_BASE + 340; // The log file does not contain the requested record number.
+ {$EXTERNALSYM NERR_InvalidLogSeek}
+// UNUSED BASE+341
+// UNUSED BASE+342
+// UNUSED BASE+343
+
+//
+// Additional UAS and NETLOGON codes
+//
+// NERR_BASE +(350-359)
+
+ NERR_BadUasConfig = NERR_BASE + 350; // The user accounts database is not configured correctly.
+ {$EXTERNALSYM NERR_BadUasConfig}
+ NERR_InvalidUASOp = NERR_BASE + 351; // This operation is not permitted when the Netlogon service is running.
+ {$EXTERNALSYM NERR_InvalidUASOp}
+ NERR_LastAdmin = NERR_BASE + 352; // This operation is not allowed on the last administrative account.
+ {$EXTERNALSYM NERR_LastAdmin}
+ NERR_DCNotFound = NERR_BASE + 353; // Could not find domain controller for this domain.
+ {$EXTERNALSYM NERR_DCNotFound}
+ NERR_LogonTrackingError = NERR_BASE + 354; // Could not set logon information for this user.
+ {$EXTERNALSYM NERR_LogonTrackingError}
+ NERR_NetlogonNotStarted = NERR_BASE + 355; // The Netlogon service has not been started.
+ {$EXTERNALSYM NERR_NetlogonNotStarted}
+ NERR_CanNotGrowUASFile = NERR_BASE + 356; // Unable to add to the user accounts database.
+ {$EXTERNALSYM NERR_CanNotGrowUASFile}
+ NERR_TimeDiffAtDC = NERR_BASE + 357; // This server's clock is not synchronized with the primary domain controller's clock.
+ {$EXTERNALSYM NERR_TimeDiffAtDC}
+ NERR_PasswordMismatch = NERR_BASE + 358; // A password mismatch has been detected.
+ {$EXTERNALSYM NERR_PasswordMismatch}
+
+//
+// Server Integration error codes.
+//
+// NERR_BASE +(360-369)
+
+ NERR_NoSuchServer = NERR_BASE + 360; // The server identification does not specify a valid server.
+ {$EXTERNALSYM NERR_NoSuchServer}
+ NERR_NoSuchSession = NERR_BASE + 361; // The session identification does not specify a valid session.
+ {$EXTERNALSYM NERR_NoSuchSession}
+ NERR_NoSuchConnection = NERR_BASE + 362; // The connection identification does not specify a valid connection.
+ {$EXTERNALSYM NERR_NoSuchConnection}
+ NERR_TooManyServers = NERR_BASE + 363; // There is no space for another entry in the table of available servers.
+ {$EXTERNALSYM NERR_TooManyServers}
+ NERR_TooManySessions = NERR_BASE + 364; // The server has reached the maximum number of sessions it supports.
+ {$EXTERNALSYM NERR_TooManySessions}
+ NERR_TooManyConnections = NERR_BASE + 365; // The server has reached the maximum number of connections it supports.
+ {$EXTERNALSYM NERR_TooManyConnections}
+ NERR_TooManyFiles = NERR_BASE + 366; // The server cannot open more files because it has reached its maximum number.
+ {$EXTERNALSYM NERR_TooManyFiles}
+ NERR_NoAlternateServers = NERR_BASE + 367; // There are no alternate servers registered on this server.
+ {$EXTERNALSYM NERR_NoAlternateServers}
+// UNUSED BASE+368
+// UNUSED BASE+369
+
+ NERR_TryDownLevel = NERR_BASE + 370; // Try down-level (remote admin protocol) version of API instead.
+ {$EXTERNALSYM NERR_TryDownLevel}
+
+//
+// UPS error codes.
+//
+// NERR_BASE + (380-384)
+
+ NERR_UPSDriverNotStarted = NERR_BASE + 380; // The UPS driver could not be accessed by the UPS service.
+ {$EXTERNALSYM NERR_UPSDriverNotStarted}
+ NERR_UPSInvalidConfig = NERR_BASE + 381; // The UPS service is not configured correctly.
+ {$EXTERNALSYM NERR_UPSInvalidConfig}
+ NERR_UPSInvalidCommPort = NERR_BASE + 382; // The UPS service could not access the specified Comm Port.
+ {$EXTERNALSYM NERR_UPSInvalidCommPort}
+ NERR_UPSSignalAsserted = NERR_BASE + 383; // The UPS indicated a line fail or low battery situation. Service not started.
+ {$EXTERNALSYM NERR_UPSSignalAsserted}
+ NERR_UPSShutdownFailed = NERR_BASE + 384; // The UPS service failed to perform a system shut down.
+ {$EXTERNALSYM NERR_UPSShutdownFailed}
+
+//
+// Remoteboot error codes.
+//
+// NERR_BASE + (400-419)
+// Error codes 400 - 405 are used by RPLBOOT.SYS.
+// Error codes 403, 407 - 416 are used by RPLLOADR.COM,
+// Error code 417 is the alerter message of REMOTEBOOT (RPLSERVR.EXE).
+// Error code 418 is for when REMOTEBOOT can't start
+// Error code 419 is for a disallowed 2nd rpl connection
+//
+
+ NERR_BadDosRetCode = NERR_BASE + 400; // The program below returned an MS-DOS error code:
+ {$EXTERNALSYM NERR_BadDosRetCode}
+ NERR_ProgNeedsExtraMem = NERR_BASE + 401; // The program below needs more memory:
+ {$EXTERNALSYM NERR_ProgNeedsExtraMem}
+ NERR_BadDosFunction = NERR_BASE + 402; // The program below called an unsupported MS-DOS function:
+ {$EXTERNALSYM NERR_BadDosFunction}
+ NERR_RemoteBootFailed = NERR_BASE + 403; // The workstation failed to boot.
+ {$EXTERNALSYM NERR_RemoteBootFailed}
+ NERR_BadFileCheckSum = NERR_BASE + 404; // The file below is corrupt.
+ {$EXTERNALSYM NERR_BadFileCheckSum}
+ NERR_NoRplBootSystem = NERR_BASE + 405; // No loader is specified in the boot-block definition file.
+ {$EXTERNALSYM NERR_NoRplBootSystem}
+ NERR_RplLoadrNetBiosErr = NERR_BASE + 406; // NetBIOS returned an error: The NCB and SMB are dumped above.
+ {$EXTERNALSYM NERR_RplLoadrNetBiosErr}
+ NERR_RplLoadrDiskErr = NERR_BASE + 407; // A disk I/O error occurred.
+ {$EXTERNALSYM NERR_RplLoadrDiskErr}
+ NERR_ImageParamErr = NERR_BASE + 408; // Image parameter substitution failed.
+ {$EXTERNALSYM NERR_ImageParamErr}
+ NERR_TooManyImageParams = NERR_BASE + 409; // Too many image parameters cross disk sector boundaries.
+ {$EXTERNALSYM NERR_TooManyImageParams}
+ NERR_NonDosFloppyUsed = NERR_BASE + 410; // The image was not generated from an MS-DOS diskette formatted with /S.
+ {$EXTERNALSYM NERR_NonDosFloppyUsed}
+ NERR_RplBootRestart = NERR_BASE + 411; // Remote boot will be restarted later.
+ {$EXTERNALSYM NERR_RplBootRestart}
+ NERR_RplSrvrCallFailed = NERR_BASE + 412; // The call to the Remoteboot server failed.
+ {$EXTERNALSYM NERR_RplSrvrCallFailed}
+ NERR_CantConnectRplSrvr = NERR_BASE + 413; // Cannot connect to the Remoteboot server.
+ {$EXTERNALSYM NERR_CantConnectRplSrvr}
+ NERR_CantOpenImageFile = NERR_BASE + 414; // Cannot open image file on the Remoteboot server.
+ {$EXTERNALSYM NERR_CantOpenImageFile}
+ NERR_CallingRplSrvr = NERR_BASE + 415; // Connecting to the Remoteboot server...
+ {$EXTERNALSYM NERR_CallingRplSrvr}
+ NERR_StartingRplBoot = NERR_BASE + 416; // Connecting to the Remoteboot server...
+ {$EXTERNALSYM NERR_StartingRplBoot}
+ NERR_RplBootServiceTerm = NERR_BASE + 417; // Remote boot service was stopped; check the error log for the cause of the problem.
+ {$EXTERNALSYM NERR_RplBootServiceTerm}
+ NERR_RplBootStartFailed = NERR_BASE + 418; // Remote boot startup failed; check the error log for the cause of the problem.
+ {$EXTERNALSYM NERR_RplBootStartFailed}
+ NERR_RPL_CONNECTED = NERR_BASE + 419; // A second connection to a Remoteboot resource is not allowed.
+ {$EXTERNALSYM NERR_RPL_CONNECTED}
+
+//
+// FTADMIN API error codes
+//
+// NERR_BASE + (425-434)
+//
+// (Currently not used in NT)
+//
+
+//
+// Browser service API error codes
+//
+// NERR_BASE + (450-475)
+//
+
+ NERR_BrowserConfiguredToNotRun = NERR_BASE + 450; // The browser service was configured with MaintainServerList=No.
+ {$EXTERNALSYM NERR_BrowserConfiguredToNotRun}
+
+//
+// Additional Remoteboot error codes.
+//
+// NERR_BASE + (510-550)
+
+ NERR_RplNoAdaptersStarted = NERR_BASE + 510; // Service failed to start since none of the network adapters started with this service.
+ {$EXTERNALSYM NERR_RplNoAdaptersStarted}
+ NERR_RplBadRegistry = NERR_BASE + 511; // Service failed to start due to bad startup information in the registry.
+ {$EXTERNALSYM NERR_RplBadRegistry}
+ NERR_RplBadDatabase = NERR_BASE + 512; // Service failed to start because its database is absent or corrupt.
+ {$EXTERNALSYM NERR_RplBadDatabase}
+ NERR_RplRplfilesShare = NERR_BASE + 513; // Service failed to start because RPLFILES share is absent.
+ {$EXTERNALSYM NERR_RplRplfilesShare}
+ NERR_RplNotRplServer = NERR_BASE + 514; // Service failed to start because RPLUSER group is absent.
+ {$EXTERNALSYM NERR_RplNotRplServer}
+ NERR_RplCannotEnum = NERR_BASE + 515; // Cannot enumerate service records.
+ {$EXTERNALSYM NERR_RplCannotEnum}
+ NERR_RplWkstaInfoCorrupted = NERR_BASE + 516; // Workstation record information has been corrupted.
+ {$EXTERNALSYM NERR_RplWkstaInfoCorrupted}
+ NERR_RplWkstaNotFound = NERR_BASE + 517; // Workstation record was not found.
+ {$EXTERNALSYM NERR_RplWkstaNotFound}
+ NERR_RplWkstaNameUnavailable = NERR_BASE + 518; // Workstation name is in use by some other workstation.
+ {$EXTERNALSYM NERR_RplWkstaNameUnavailable}
+ NERR_RplProfileInfoCorrupted = NERR_BASE + 519; // Profile record information has been corrupted.
+ {$EXTERNALSYM NERR_RplProfileInfoCorrupted}
+ NERR_RplProfileNotFound = NERR_BASE + 520; // Profile record was not found.
+ {$EXTERNALSYM NERR_RplProfileNotFound}
+ NERR_RplProfileNameUnavailable = NERR_BASE + 521; // Profile name is in use by some other profile.
+ {$EXTERNALSYM NERR_RplProfileNameUnavailable}
+ NERR_RplProfileNotEmpty = NERR_BASE + 522; // There are workstations using this profile.
+ {$EXTERNALSYM NERR_RplProfileNotEmpty}
+ NERR_RplConfigInfoCorrupted = NERR_BASE + 523; // Configuration record information has been corrupted.
+ {$EXTERNALSYM NERR_RplConfigInfoCorrupted}
+ NERR_RplConfigNotFound = NERR_BASE + 524; // Configuration record was not found.
+ {$EXTERNALSYM NERR_RplConfigNotFound}
+ NERR_RplAdapterInfoCorrupted = NERR_BASE + 525; // Adapter id record information has been corrupted.
+ {$EXTERNALSYM NERR_RplAdapterInfoCorrupted}
+ NERR_RplInternal = NERR_BASE + 526; // An internal service error has occurred.
+ {$EXTERNALSYM NERR_RplInternal}
+ NERR_RplVendorInfoCorrupted = NERR_BASE + 527; // Vendor id record information has been corrupted.
+ {$EXTERNALSYM NERR_RplVendorInfoCorrupted}
+ NERR_RplBootInfoCorrupted = NERR_BASE + 528; // Boot block record information has been corrupted.
+ {$EXTERNALSYM NERR_RplBootInfoCorrupted}
+ NERR_RplWkstaNeedsUserAcct = NERR_BASE + 529; // The user account for this workstation record is missing.
+ {$EXTERNALSYM NERR_RplWkstaNeedsUserAcct}
+ NERR_RplNeedsRPLUSERAcct = NERR_BASE + 530; // The RPLUSER local group could not be found.
+ {$EXTERNALSYM NERR_RplNeedsRPLUSERAcct}
+ NERR_RplBootNotFound = NERR_BASE + 531; // Boot block record was not found.
+ {$EXTERNALSYM NERR_RplBootNotFound}
+ NERR_RplIncompatibleProfile = NERR_BASE + 532; // Chosen profile is incompatible with this workstation.
+ {$EXTERNALSYM NERR_RplIncompatibleProfile}
+ NERR_RplAdapterNameUnavailable = NERR_BASE + 533; // Chosen network adapter id is in use by some other workstation.
+ {$EXTERNALSYM NERR_RplAdapterNameUnavailable}
+ NERR_RplConfigNotEmpty = NERR_BASE + 534; // There are profiles using this configuration.
+ {$EXTERNALSYM NERR_RplConfigNotEmpty}
+ NERR_RplBootInUse = NERR_BASE + 535; // There are workstations, profiles or configurations using this boot block.
+ {$EXTERNALSYM NERR_RplBootInUse}
+ NERR_RplBackupDatabase = NERR_BASE + 536; // Service failed to backup Remoteboot database.
+ {$EXTERNALSYM NERR_RplBackupDatabase}
+ NERR_RplAdapterNotFound = NERR_BASE + 537; // Adapter record was not found.
+ {$EXTERNALSYM NERR_RplAdapterNotFound}
+ NERR_RplVendorNotFound = NERR_BASE + 538; // Vendor record was not found.
+ {$EXTERNALSYM NERR_RplVendorNotFound}
+ NERR_RplVendorNameUnavailable = NERR_BASE + 539; // Vendor name is in use by some other vendor record.
+ {$EXTERNALSYM NERR_RplVendorNameUnavailable}
+ NERR_RplBootNameUnavailable = NERR_BASE + 540; // (boot name, vendor id) is in use by some other boot block record.
+ {$EXTERNALSYM NERR_RplBootNameUnavailable}
+ NERR_RplConfigNameUnavailable = NERR_BASE + 541; // Configuration name is in use by some other configuration.
+ {$EXTERNALSYM NERR_RplConfigNameUnavailable}
+
+//*INTERNAL_ONLY*
+
+//
+// Dfs API error codes.
+//
+// NERR_BASE + (560-590)
+
+ NERR_DfsInternalCorruption = NERR_BASE + 560; // The internal database maintained by the DFS service is corrupt
+ {$EXTERNALSYM NERR_DfsInternalCorruption}
+ NERR_DfsVolumeDataCorrupt = NERR_BASE + 561; // One of the records in the internal DFS database is corrupt
+ {$EXTERNALSYM NERR_DfsVolumeDataCorrupt}
+ NERR_DfsNoSuchVolume = NERR_BASE + 562; // There is no DFS name whose entry path matches the input Entry Path
+ {$EXTERNALSYM NERR_DfsNoSuchVolume}
+ NERR_DfsVolumeAlreadyExists = NERR_BASE + 563; // A root or link with the given name already exists
+ {$EXTERNALSYM NERR_DfsVolumeAlreadyExists}
+ NERR_DfsAlreadyShared = NERR_BASE + 564; // The server share specified is already shared in the DFS
+ {$EXTERNALSYM NERR_DfsAlreadyShared}
+ NERR_DfsNoSuchShare = NERR_BASE + 565; // The indicated server share does not support the indicated DFS namespace
+ {$EXTERNALSYM NERR_DfsNoSuchShare}
+ NERR_DfsNotALeafVolume = NERR_BASE + 566; // The operation is not valid on this portion of the namespace
+ {$EXTERNALSYM NERR_DfsNotALeafVolume}
+ NERR_DfsLeafVolume = NERR_BASE + 567; // The operation is not valid on this portion of the namespace
+ {$EXTERNALSYM NERR_DfsLeafVolume}
+ NERR_DfsVolumeHasMultipleServers = NERR_BASE + 568; // The operation is ambiguous because the link has multiple servers
+ {$EXTERNALSYM NERR_DfsVolumeHasMultipleServers}
+ NERR_DfsCantCreateJunctionPoint = NERR_BASE + 569; // Unable to create a link
+ {$EXTERNALSYM NERR_DfsCantCreateJunctionPoint}
+ NERR_DfsServerNotDfsAware = NERR_BASE + 570; // The server is not DFS Aware
+ {$EXTERNALSYM NERR_DfsServerNotDfsAware}
+ NERR_DfsBadRenamePath = NERR_BASE + 571; // The specified rename target path is invalid
+ {$EXTERNALSYM NERR_DfsBadRenamePath}
+ NERR_DfsVolumeIsOffline = NERR_BASE + 572; // The specified DFS link is offline
+ {$EXTERNALSYM NERR_DfsVolumeIsOffline}
+ NERR_DfsNoSuchServer = NERR_BASE + 573; // The specified server is not a server for this link
+ {$EXTERNALSYM NERR_DfsNoSuchServer}
+ NERR_DfsCyclicalName = NERR_BASE + 574; // A cycle in the DFS name was detected
+ {$EXTERNALSYM NERR_DfsCyclicalName}
+ NERR_DfsNotSupportedInServerDfs = NERR_BASE + 575; // The operation is not supported on a server-based DFS
+ {$EXTERNALSYM NERR_DfsNotSupportedInServerDfs}
+ NERR_DfsDuplicateService = NERR_BASE + 576; // This link is already supported by the specified server-share
+ {$EXTERNALSYM NERR_DfsDuplicateService}
+ NERR_DfsCantRemoveLastServerShare = NERR_BASE + 577; // Can't remove the last server-share supporting this root or link
+ {$EXTERNALSYM NERR_DfsCantRemoveLastServerShare}
+ NERR_DfsVolumeIsInterDfs = NERR_BASE + 578; // The operation is not supported for an Inter-DFS link
+ {$EXTERNALSYM NERR_DfsVolumeIsInterDfs}
+ NERR_DfsInconsistent = NERR_BASE + 579; // The internal state of the DFS Service has become inconsistent
+ {$EXTERNALSYM NERR_DfsInconsistent}
+ NERR_DfsServerUpgraded = NERR_BASE + 580; // The DFS Service has been installed on the specified server
+ {$EXTERNALSYM NERR_DfsServerUpgraded}
+ NERR_DfsDataIsIdentical = NERR_BASE + 581; // The DFS data being reconciled is identical
+ {$EXTERNALSYM NERR_DfsDataIsIdentical}
+ NERR_DfsCantRemoveDfsRoot = NERR_BASE + 582; // The DFS root cannot be deleted - Uninstall DFS if required
+ {$EXTERNALSYM NERR_DfsCantRemoveDfsRoot}
+ NERR_DfsChildOrParentInDfs = NERR_BASE + 583; // A child or parent directory of the share is already in a DFS
+ {$EXTERNALSYM NERR_DfsChildOrParentInDfs}
+ NERR_DfsInternalError = NERR_BASE + 590; // DFS internal error
+ {$EXTERNALSYM NERR_DfsInternalError}
+
+//
+// Net setup error codes.
+//
+// NERR_BASE + (591-600)
+
+ NERR_SetupAlreadyJoined = NERR_BASE + 591; // This machine is already joined to a domain.
+ {$EXTERNALSYM NERR_SetupAlreadyJoined}
+ NERR_SetupNotJoined = NERR_BASE + 592; // This machine is not currently joined to a domain.
+ {$EXTERNALSYM NERR_SetupNotJoined}
+ NERR_SetupDomainController = NERR_BASE + 593; // This machine is a domain controller and cannot be unjoined from a domain.
+ {$EXTERNALSYM NERR_SetupDomainController}
+ NERR_DefaultJoinRequired = NERR_BASE + 594; // The destination domain controller does not support creating machine accounts in OUs.
+ {$EXTERNALSYM NERR_DefaultJoinRequired}
+ NERR_InvalidWorkgroupName = NERR_BASE + 595; // The specified workgroup name is invalid.
+ {$EXTERNALSYM NERR_InvalidWorkgroupName}
+ NERR_NameUsesIncompatibleCodePage = NERR_BASE + 596; // The specified computer name is incompatible with the default language used on the domain controller.
+ {$EXTERNALSYM NERR_NameUsesIncompatibleCodePage}
+ NERR_ComputerAccountNotFound = NERR_BASE + 597; // The specified computer account could not be found.
+ {$EXTERNALSYM NERR_ComputerAccountNotFound}
+ NERR_PersonalSku = NERR_BASE + 598; // This version of Windows cannot be joined to a domain.
+ {$EXTERNALSYM NERR_PersonalSku}
+
+//
+// Some Password and account error results
+//
+// NERR_BASE + (601 - 608)
+//
+
+ NERR_PasswordMustChange = NERR_BASE + 601; // Password must change at next logon
+ {$EXTERNALSYM NERR_PasswordMustChange}
+ NERR_AccountLockedOut = NERR_BASE + 602; // Account is locked out
+ {$EXTERNALSYM NERR_AccountLockedOut}
+ NERR_PasswordTooLong = NERR_BASE + 603; // Password is too long
+ {$EXTERNALSYM NERR_PasswordTooLong}
+ NERR_PasswordNotComplexEnough = NERR_BASE + 604; // Password doesn't meet the complexity policy
+ {$EXTERNALSYM NERR_PasswordNotComplexEnough}
+ NERR_PasswordFilterError = NERR_BASE + 605; // Password doesn't meet the requirements of the filter dll's
+ {$EXTERNALSYM NERR_PasswordFilterError}
+
+//**********WARNING ****************
+//The range 2750-2799 has been *
+//allocated to the IBM LAN Server *
+//*********************************
+
+//**********WARNING ****************
+//The range 2900-2999 has been *
+//reserved for Microsoft OEMs *
+//*********************************
+
+//*END_INTERNAL*
+
+ MAX_NERR = NERR_BASE + 899; // This is the last error in NERR range.
+ {$EXTERNALSYM MAX_NERR}
+
+//
+// end of list
+//
+// WARNING: Do not exceed MAX_NERR; values above this are used by
+// other error code ranges (errlog.h, service.h, apperr.h).
+
+implementation
+
+end.
diff --git a/packages/extra/winunits/jwalmerrlog.pas b/packages/extra/winunits/jwalmerrlog.pas
index 3c2d50fcae..8be89d88d7 100644
--- a/packages/extra/winunits/jwalmerrlog.pas
+++ b/packages/extra/winunits/jwalmerrlog.pas
@@ -1,2188 +1,2188 @@
-{******************************************************************************}
-{ }
-{ Lan Manager Error Log API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: lmerrlog.h, released November 2001. The original Pascal}
-{ code is: LmErrLog.pas, released Februari 2002. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwalmerrlog.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaLmErrLog;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "lmerrlog.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaLmCons, JwaWinType;
-
-//
-// Data Structures - Config
-//
-
-type
- _ERROR_LOG = record
- el_len: DWORD;
- el_reserved: DWORD;
- el_time: DWORD;
- el_error: DWORD;
- el_name: LPWSTR; // pointer to service name
- el_text: LPWSTR; // pointer to string array
- el_data: LPBYTE; // pointer to BYTE array
- el_data_size: DWORD; // byte count of el_data area
- el_nstrings: DWORD; // number of strings in el_text.
- end;
- {$EXTERNALSYM _ERROR_LOG}
- ERROR_LOG = _ERROR_LOG;
- {$EXTERNALSYM ERROR_LOG}
- PERROR_LOG = ^ERROR_LOG;
- {$EXTERNALSYM PERROR_LOG}
- LPERROR_LOG = ^ERROR_LOG;
- {$EXTERNALSYM LPERROR_LOG}
- TErrorLog = ERROR_LOG;
- PErrorLog = PERROR_LOG;
-
-{$DEFINE REVISED_ERROR_LOG_STRUCT}
-
- _HLOG = record
- time: DWORD;
- last_flags: DWORD;
- offset: DWORD;
- rec_offset: DWORD;
- end;
- {$EXTERNALSYM _HLOG}
- HLOG = _HLOG;
- {$EXTERNALSYM HLOG}
- PHLOG = ^HLOG;
- {$EXTERNALSYM PHLOG}
- LPHLOG = ^HLOG;
- {$EXTERNALSYM LPHLOG}
-
-const
- LOGFLAGS_FORWARD = 0;
- {$EXTERNALSYM LOGFLAGS_FORWARD}
- LOGFLAGS_BACKWARD = $1;
- {$EXTERNALSYM LOGFLAGS_BACKWARD}
- LOGFLAGS_SEEK = $2;
- {$EXTERNALSYM LOGFLAGS_SEEK}
-
-//
-// Function Prototypes - ErrorLog
-//
-
-function NetErrorLogClear(server, backupfile: LPCWSTR; reserved: LPBYTE): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetErrorLogClear}
-
-function NetErrorLogRead(server: LPCWSTR; reserved1: LPWSTR; errloghandle: LPHLOG; offset: DWORD; reserved2: LPDWORD;
- reserved3, offsetflag: DWORD; var bufptr: LPBYTE; prefmaxlen: DWORD; bytesread, totalbytes: LPDWORD): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetErrorLogRead}
-
-function NetErrorLogWrite(reserved1: LPBYTE; code: DWORD; component: LPCWSTR; buffer: LPBYTE; numbytes: DWORD;
- msgbuf: LPBYTE; strcount: DWORD; reserved2: LPBYTE): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetErrorLogWrite}
-
-//
-// Special Values and Constants
-//
-
-//
-// Generic (could be used by more than one service)
-// error log messages from 0 to 25
-//
-// Do not change the comments following the manifest constants without
-// understanding how mapmsg works.
-//
-
-const
- ERRLOG_BASE = 3100; { NELOG errors start here }
- {$EXTERNALSYM ERRLOG_BASE}
-
- NELOG_Internal_Error = ERRLOG_BASE + 0;
- {$EXTERNALSYM NELOG_Internal_Error}
-
- {
- * The operation failed because a network software error occurred.
- }
-
- NELOG_Resource_Shortage = ERRLOG_BASE + 1;
- {$EXTERNALSYM NELOG_Resource_Shortage}
-
- {
- * The system ran out of a resource controlled by the %1 option.
- }
-
- NELOG_Unable_To_Lock_Segment = ERRLOG_BASE + 2;
- {$EXTERNALSYM NELOG_Unable_To_Lock_Segment}
-
- {
- * The service failed to obtain a long-term lock on the
- * segment for network control blocks (NCBs). The error code is the data.
- }
-
- NELOG_Unable_To_Unlock_Segment = ERRLOG_BASE + 3;
- {$EXTERNALSYM NELOG_Unable_To_Unlock_Segment}
-
- {
- * The service failed to release the long-term lock on the
- * segment for network control blocks (NCBs). The error code is the data.
- }
-
- NELOG_Uninstall_Service = ERRLOG_BASE + 4;
- {$EXTERNALSYM NELOG_Uninstall_Service}
-
- {
- * There was an error stopping service %1.
- * The error code from NetServiceControl is the data.
- }
-
- NELOG_Init_Exec_Fail = ERRLOG_BASE + 5;
- {$EXTERNALSYM NELOG_Init_Exec_Fail}
-
- {
- * Initialization failed because of a system execution failure on
- * path %1. The system error code is the data.
- }
-
- NELOG_Ncb_Error = ERRLOG_BASE + 6;
- {$EXTERNALSYM NELOG_Ncb_Error}
-
- {
- * An unexpected network control block (NCB) was received. The NCB is the data.
- }
-
- NELOG_Net_Not_Started = ERRLOG_BASE + 7;
- {$EXTERNALSYM NELOG_Net_Not_Started}
-
- {
- * The network is not started.
- }
-
- NELOG_Ioctl_Error = ERRLOG_BASE + 8;
- {$EXTERNALSYM NELOG_Ioctl_Error}
-
- {
- * A DosDevIoctl or DosFsCtl to NETWKSTA.SYS failed.
- * The data shown is in this format:
- * DWORD approx CS:IP of call to ioctl or fsctl
- * WORD error code
- * WORD ioctl or fsctl number
- }
-
- NELOG_System_Semaphore = ERRLOG_BASE + 9;
- {$EXTERNALSYM NELOG_System_Semaphore}
-
- {
- * Unable to create or open system semaphore %1.
- * The error code is the data.
- }
-
- NELOG_Init_OpenCreate_Err = ERRLOG_BASE + 10;
- {$EXTERNALSYM NELOG_Init_OpenCreate_Err}
-
- {
- * Initialization failed because of an open/create error on the
- * file %1. The system error code is the data.
- }
-
- NELOG_NetBios = ERRLOG_BASE + 11;
- {$EXTERNALSYM NELOG_NetBios}
-
- {
- * An unexpected NetBIOS error occurred.
- * The error code is the data.
- }
-
- NELOG_SMB_Illegal = ERRLOG_BASE + 12;
- {$EXTERNALSYM NELOG_SMB_Illegal}
-
- {
- * An illegal server message block (SMB) was received.
- * The SMB is the data.
- }
-
- NELOG_Service_Fail = ERRLOG_BASE + 13;
- {$EXTERNALSYM NELOG_Service_Fail}
-
- {
- * Initialization failed because the requested service %1
- * could not be started.
- }
-
- NELOG_Entries_Lost = ERRLOG_BASE + 14;
- {$EXTERNALSYM NELOG_Entries_Lost}
-
- {
- * Some entries in the error log were lost because of a buffer
- * overflow.
- }
-
-//
-// Server specific error log messages from 20 to 40
-//
-
- NELOG_Init_Seg_Overflow = ERRLOG_BASE + 20;
- {$EXTERNALSYM NELOG_Init_Seg_Overflow}
-
- {
- * Initialization parameters controlling resource usage other
- * than net buffers are sized so that too much memory is needed.
- }
-
- NELOG_Srv_No_Mem_Grow = ERRLOG_BASE + 21;
- {$EXTERNALSYM NELOG_Srv_No_Mem_Grow}
-
- {
- * The server cannot increase the size of a memory segment.
- }
-
- NELOG_Access_File_Bad = ERRLOG_BASE + 22;
- {$EXTERNALSYM NELOG_Access_File_Bad}
-
- {
- * Initialization failed because account file %1 is either incorrect
- * or not present.
- }
-
- NELOG_Srvnet_Not_Started = ERRLOG_BASE + 23;
- {$EXTERNALSYM NELOG_Srvnet_Not_Started}
-
- {
- * Initialization failed because network %1 was not started.
- }
-
- NELOG_Init_Chardev_Err = ERRLOG_BASE + 24;
- {$EXTERNALSYM NELOG_Init_Chardev_Err}
-
- {
- * The server failed to start. Either all three chdev
- * parameters must be zero or all three must be nonzero.
- }
-
- NELOG_Remote_API = ERRLOG_BASE + 25;
- {$EXTERNALSYM NELOG_Remote_API}
-
- { A remote API request was halted due to the following
- * invalid description string: %1.
- }
-
- NELOG_Ncb_TooManyErr = ERRLOG_BASE + 26;
- {$EXTERNALSYM NELOG_Ncb_TooManyErr}
-
- { The network %1 ran out of network control blocks (NCBs). You may need to increase NCBs
- * for this network. The following information includes the
- * number of NCBs submitted by the server when this error occurred:
- }
-
- NELOG_Mailslot_err = ERRLOG_BASE + 27;
- {$EXTERNALSYM NELOG_Mailslot_err}
-
- { The server cannot create the %1 mailslot needed to send
- * the ReleaseMemory alert message. The error received is:
- }
-
- NELOG_ReleaseMem_Alert = ERRLOG_BASE + 28;
- {$EXTERNALSYM NELOG_ReleaseMem_Alert}
-
- { The server failed to register for the ReleaseMemory alert,
- * with recipient %1. The error code from
- * NetAlertStart is the data.
- }
-
- NELOG_AT_cannot_write = ERRLOG_BASE + 29;
- {$EXTERNALSYM NELOG_AT_cannot_write}
-
- { The server cannot update the AT schedule file. The file
- * is corrupted.
- }
-
- NELOG_Cant_Make_Msg_File = ERRLOG_BASE + 30;
- {$EXTERNALSYM NELOG_Cant_Make_Msg_File}
-
- { The server encountered an error when calling
- * NetIMakeLMFileName. The error code is the data.
- }
-
- NELOG_Exec_Netservr_NoMem = ERRLOG_BASE + 31;
- {$EXTERNALSYM NELOG_Exec_Netservr_NoMem}
-
- { Initialization failed because of a system execution failure on
- * path %1. There is not enough memory to start the process.
- * The system error code is the data.
- }
-
- NELOG_Server_Lock_Failure = ERRLOG_BASE + 32;
- {$EXTERNALSYM NELOG_Server_Lock_Failure}
-
- { Longterm lock of the server buffers failed.
- * Check swap disk's free space and restart the system to start the server.
- }
-
-//
-// Message service and POPUP specific error log messages from 40 to 55
-//
-
- NELOG_Msg_Shutdown = ERRLOG_BASE + 40;
- {$EXTERNALSYM NELOG_Msg_Shutdown}
-
- {
- * The service has stopped due to repeated consecutive
- * occurrences of a network control block (NCB) error. The last bad NCB follows
- * in raw data.
- }
-
- NELOG_Msg_Sem_Shutdown = ERRLOG_BASE + 41;
- {$EXTERNALSYM NELOG_Msg_Sem_Shutdown}
-
- {
- * The Message server has stopped due to a lock on the
- * Message server shared data segment.
- }
-
- NELOG_Msg_Log_Err = ERRLOG_BASE + 50;
- {$EXTERNALSYM NELOG_Msg_Log_Err}
-
- {
- * A file system error occurred while opening or writing to the
- * system message log file %1. Message logging has been
- * switched off due to the error. The error code is the data.
- }
-
- NELOG_VIO_POPUP_ERR = ERRLOG_BASE + 51;
- {$EXTERNALSYM NELOG_VIO_POPUP_ERR}
-
- {
- * Unable to display message POPUP due to system VIO call error.
- * The error code is the data.
- }
-
- NELOG_Msg_Unexpected_SMB_Type = ERRLOG_BASE + 52;
- {$EXTERNALSYM NELOG_Msg_Unexpected_SMB_Type}
-
- {
- * An illegal server message block (SMB) was received. The SMB is the data.
- }
-
-//
-// Workstation specific error log messages from 60 to 75
-//
-
- NELOG_Wksta_Infoseg = ERRLOG_BASE + 60;
- {$EXTERNALSYM NELOG_Wksta_Infoseg}
-
- {
- * The workstation information segment is bigger than 64K.
- * The size follows, in DWORD format:
- }
-
- NELOG_Wksta_Compname = ERRLOG_BASE + 61;
- {$EXTERNALSYM NELOG_Wksta_Compname}
-
- {
- * The workstation was unable to get the name-number of the computer.
- }
-
- NELOG_Wksta_BiosThreadFailure = ERRLOG_BASE + 62;
- {$EXTERNALSYM NELOG_Wksta_BiosThreadFailure}
-
- {
- * The workstation could not initialize the Async NetBIOS Thread.
- * The error code is the data.
- }
-
- NELOG_Wksta_IniSeg = ERRLOG_BASE + 63;
- {$EXTERNALSYM NELOG_Wksta_IniSeg}
-
- {
- * The workstation could not open the initial shared segment.
- * The error code is the data.
- }
-
- NELOG_Wksta_HostTab_Full = ERRLOG_BASE + 64;
- {$EXTERNALSYM NELOG_Wksta_HostTab_Full}
-
- {
- * The workstation host table is full.
- }
-
- NELOG_Wksta_Bad_Mailslot_SMB = ERRLOG_BASE + 65;
- {$EXTERNALSYM NELOG_Wksta_Bad_Mailslot_SMB}
-
- {
- * A bad mailslot server message block (SMB) was received. The SMB is the data.
- }
-
- NELOG_Wksta_UASInit = ERRLOG_BASE + 66;
- {$EXTERNALSYM NELOG_Wksta_UASInit}
-
- {
- * The workstation encountered an error while trying to start the user accounts database.
- * The error code is the data.
- }
-
- NELOG_Wksta_SSIRelogon = ERRLOG_BASE + 67;
- {$EXTERNALSYM NELOG_Wksta_SSIRelogon}
-
- {
- * The workstation encountered an error while responding to an SSI revalidation request.
- * The function code and the error codes are the data.
- }
-
-//
-// Alerter service specific error log messages from 70 to 79
-//
-
- NELOG_Build_Name = ERRLOG_BASE + 70;
- {$EXTERNALSYM NELOG_Build_Name}
-
- {
- * The Alerter service had a problem creating the list of
- * alert recipients. The error code is %1.
- }
-
- NELOG_Name_Expansion = ERRLOG_BASE + 71;
- {$EXTERNALSYM NELOG_Name_Expansion}
-
- {
- * There was an error expanding %1 as a group name. Try
- * splitting the group into two or more smaller groups.
- }
-
- NELOG_Message_Send = ERRLOG_BASE + 72;
- {$EXTERNALSYM NELOG_Message_Send}
-
- {
- * There was an error sending %2 the alert message -
- * (
- * %3 )
- * The error code is %1.
- }
-
- NELOG_Mail_Slt_Err = ERRLOG_BASE + 73;
- {$EXTERNALSYM NELOG_Mail_Slt_Err}
-
- {
- * There was an error in creating or reading the alerter mailslot.
- * The error code is %1.
- }
-
- NELOG_AT_cannot_read = ERRLOG_BASE + 74;
- {$EXTERNALSYM NELOG_AT_cannot_read}
-
- {
- * The server could not read the AT schedule file.
- }
-
- NELOG_AT_sched_err = ERRLOG_BASE + 75;
- {$EXTERNALSYM NELOG_AT_sched_err}
-
- {
- * The server found an invalid AT schedule record.
- }
-
- NELOG_AT_schedule_file_created = ERRLOG_BASE + 76;
- {$EXTERNALSYM NELOG_AT_schedule_file_created}
-
- {
- * The server could not find an AT schedule file so it created one.
- }
-
- NELOG_Srvnet_NB_Open = ERRLOG_BASE + 77;
- {$EXTERNALSYM NELOG_Srvnet_NB_Open}
-
- {
- * The server could not access the %1 network with NetBiosOpen.
- }
-
- NELOG_AT_Exec_Err = ERRLOG_BASE + 78;
- {$EXTERNALSYM NELOG_AT_Exec_Err}
-
- {
- * The AT command processor could not run %1.
- }
-
-//
-// Cache Lazy Write and HPFS386 specific error log messages from 80 to 89
-//
-
- NELOG_Lazy_Write_Err = ERRLOG_BASE + 80;
- {$EXTERNALSYM NELOG_Lazy_Write_Err}
-
- {
- * WARNING: Because of a lazy-write error, drive %1 now
- * contains some corrupted data. The cache is stopped.
- }
-
- NELOG_HotFix = ERRLOG_BASE + 81;
- {$EXTERNALSYM NELOG_HotFix}
-
- {
- * A defective sector on drive %1 has been replaced (hotfixed).
- * No data was lost. You should run CHKDSK soon to restore full
- * performance and replenish the volume's spare sector pool.
- *
- * The hotfix occurred while processing a remote request.
- }
-
- NELOG_HardErr_From_Server = ERRLOG_BASE + 82;
- {$EXTERNALSYM NELOG_HardErr_From_Server}
-
- {
- * A disk error occurred on the HPFS volume in drive %1.
- * The error occurred while processing a remote request.
- }
-
- NELOG_LocalSecFail1 = ERRLOG_BASE + 83;
- {$EXTERNALSYM NELOG_LocalSecFail1}
-
- {
- * The user accounts database (NET.ACC) is corrupted. The local security
- * system is replacing the corrupted NET.ACC with the backup
- * made at %1.
- * Any updates made to the database after this time are lost.
- *
- }
-
- NELOG_LocalSecFail2 = ERRLOG_BASE + 84;
- {$EXTERNALSYM NELOG_LocalSecFail2}
-
- {
- * The user accounts database (NET.ACC) is missing. The local
- * security system is restoring the backup database
- * made at %1.
- * Any updates made to the database made after this time are lost.
- *
- }
-
- NELOG_LocalSecFail3 = ERRLOG_BASE + 85;
- {$EXTERNALSYM NELOG_LocalSecFail3}
-
- {
- * Local security could not be started because the user accounts database
- * (NET.ACC) was missing or corrupted, and no usable backup
- * database was present.
- *
- * THE SYSTEM IS NOT SECURE.
- }
-
- NELOG_LocalSecGeneralFail = ERRLOG_BASE + 86;
- {$EXTERNALSYM NELOG_LocalSecGeneralFail}
-
- {
- * Local security could not be started because an error
- * occurred during initialization. The error code returned is %1.
- *
- * THE SYSTEM IS NOT SECURE.
- *
- }
-
-//
-// NETWKSTA.SYS specific error log messages from 90 to 99
-//
-
- NELOG_NetWkSta_Internal_Error = ERRLOG_BASE + 90;
- {$EXTERNALSYM NELOG_NetWkSta_Internal_Error}
-
- {
- * A NetWksta internal error has occurred:
- * %1
- }
-
- NELOG_NetWkSta_No_Resource = ERRLOG_BASE + 91;
- {$EXTERNALSYM NELOG_NetWkSta_No_Resource}
-
- {
- * The redirector is out of a resource: %1.
- }
-
- NELOG_NetWkSta_SMB_Err = ERRLOG_BASE + 92;
- {$EXTERNALSYM NELOG_NetWkSta_SMB_Err}
-
- {
- * A server message block (SMB) error occurred on the connection to %1.
- * The SMB header is the data.
- }
-
- NELOG_NetWkSta_VC_Err = ERRLOG_BASE + 93;
- {$EXTERNALSYM NELOG_NetWkSta_VC_Err}
-
- {
- * A virtual circuit error occurred on the session to %1.
- * The network control block (NCB) command and return code is the data.
- }
-
- NELOG_NetWkSta_Stuck_VC_Err = ERRLOG_BASE + 94;
- {$EXTERNALSYM NELOG_NetWkSta_Stuck_VC_Err}
-
- {
- * Hanging up a stuck session to %1.
- }
-
- NELOG_NetWkSta_NCB_Err = ERRLOG_BASE + 95;
- {$EXTERNALSYM NELOG_NetWkSta_NCB_Err}
-
- {
- * A network control block (NCB) error occurred (%1).
- * The NCB is the data.
- }
-
- NELOG_NetWkSta_Write_Behind_Err = ERRLOG_BASE + 96;
- {$EXTERNALSYM NELOG_NetWkSta_Write_Behind_Err}
-
- {
- * A write operation to %1 failed.
- * Data may have been lost.
- }
-
- NELOG_NetWkSta_Reset_Err = ERRLOG_BASE + 97;
- {$EXTERNALSYM NELOG_NetWkSta_Reset_Err}
-
- {
- * Reset of driver %1 failed to complete the network control block (NCB).
- * The NCB is the data.
- }
-
- NELOG_NetWkSta_Too_Many = ERRLOG_BASE + 98;
- {$EXTERNALSYM NELOG_NetWkSta_Too_Many}
-
- {
- * The amount of resource %1 requested was more
- * than the maximum. The maximum amount was allocated.
- }
-
-//
-// Spooler specific error log messages from 100 to 103
-//
-
- NELOG_Srv_Thread_Failure = ERRLOG_BASE + 104;
- {$EXTERNALSYM NELOG_Srv_Thread_Failure}
-
- {
- * The server could not create a thread.
- * The THREADS parameter in the CONFIG.SYS file should be increased.
- }
-
- NELOG_Srv_Close_Failure = ERRLOG_BASE + 105;
- {$EXTERNALSYM NELOG_Srv_Close_Failure}
-
- {
- * The server could not close %1.
- * The file is probably corrupted.
- }
-
- NELOG_ReplUserCurDir = ERRLOG_BASE + 106;
- {$EXTERNALSYM NELOG_ReplUserCurDir}
-
- {
- *The replicator cannot update directory %1. It has tree integrity
- * and is the current directory for some process.
- }
-
- NELOG_ReplCannotMasterDir = ERRLOG_BASE + 107;
- {$EXTERNALSYM NELOG_ReplCannotMasterDir}
-
- {
- *The server cannot export directory %1 to client %2.
- * It is exported from another server.
- }
-
- NELOG_ReplUpdateError = ERRLOG_BASE + 108;
- {$EXTERNALSYM NELOG_ReplUpdateError}
-
- {
- *The replication server could not update directory %2 from the source
- * on %3 due to error %1.
- }
-
- NELOG_ReplLostMaster = ERRLOG_BASE + 109;
- {$EXTERNALSYM NELOG_ReplLostMaster}
-
- {
- *Master %1 did not send an update notice for directory %2 at the expected
- * time.
- }
-
- NELOG_NetlogonAuthDCFail = ERRLOG_BASE + 110;
- {$EXTERNALSYM NELOG_NetlogonAuthDCFail}
-
- {
- *This computer could not authenticate with %2, a Windows domain controller
- * for domain %1, and therefore this computer might deny logon requests.
- * This inability to authenticate might be caused by another computer on the
- * same network using the same name or the password for this computer account
- * is not recognized. If this message appears again, contact your system
- * administrator.
- }
-
- NELOG_ReplLogonFailed = ERRLOG_BASE + 111;
- {$EXTERNALSYM NELOG_ReplLogonFailed}
-
- {
- *The replicator attempted to log on at %2 as %1 and failed.
- }
-
- NELOG_ReplNetErr = ERRLOG_BASE + 112;
- {$EXTERNALSYM NELOG_ReplNetErr}
-
- {
- * Network error %1 occurred.
- }
-
- NELOG_ReplMaxFiles = ERRLOG_BASE + 113;
- {$EXTERNALSYM NELOG_ReplMaxFiles}
-
- {
- * Replicator limit for files in a directory has been exceeded.
- }
-
- NELOG_ReplMaxTreeDepth = ERRLOG_BASE + 114;
- {$EXTERNALSYM NELOG_ReplMaxTreeDepth}
-
- {
- * Replicator limit for tree depth has been exceeded.
- }
-
- NELOG_ReplBadMsg = ERRLOG_BASE + 115;
- {$EXTERNALSYM NELOG_ReplBadMsg}
-
- {
- * Unrecognized message received in mailslot.
- }
-
- NELOG_ReplSysErr = ERRLOG_BASE + 116;
- {$EXTERNALSYM NELOG_ReplSysErr}
-
- {
- * System error %1 occurred.
- }
-
- NELOG_ReplUserLoged = ERRLOG_BASE + 117;
- {$EXTERNALSYM NELOG_ReplUserLoged}
-
- {
- * Cannot log on. User is currently logged on and argument TRYUSER
- * is set to NO.
- }
-
- NELOG_ReplBadImport = ERRLOG_BASE + 118;
- {$EXTERNALSYM NELOG_ReplBadImport}
-
- {
- * IMPORT path %1 cannot be found.
- }
-
- NELOG_ReplBadExport = ERRLOG_BASE + 119;
- {$EXTERNALSYM NELOG_ReplBadExport}
-
- {
- * EXPORT path %1 cannot be found.
- }
-
- NELOG_ReplSignalFileErr = ERRLOG_BASE + 120;
- {$EXTERNALSYM NELOG_ReplSignalFileErr}
-
- {
- * Replicator failed to update signal file in directory %2 due to
- * %1 system error.
- }
-
- NELOG_DiskFT = (ERRLOG_BASE+121);
- {$EXTERNALSYM NELOG_DiskFT}
-
- {
- * Disk Fault Tolerance Error
- *
- * %1
- }
-
- NELOG_ReplAccessDenied = ERRLOG_BASE + 122;
- {$EXTERNALSYM NELOG_ReplAccessDenied}
-
- {
- * Replicator could not access %2
- * on %3 due to system error %1.
- }
-
- NELOG_NetlogonFailedPrimary = ERRLOG_BASE + 123;
- {$EXTERNALSYM NELOG_NetlogonFailedPrimary}
-
- {
- *The primary domain controller for domain %1 has apparently failed.
- }
-
- NELOG_NetlogonPasswdSetFailed = ERRLOG_BASE + 124;
- {$EXTERNALSYM NELOG_NetlogonPasswdSetFailed}
-
- {
- * Changing machine account password for account %1 failed with
- * the following error: %n%2
- }
-
- NELOG_NetlogonTrackingError = ERRLOG_BASE + 125;
- {$EXTERNALSYM NELOG_NetlogonTrackingError}
-
- {
- *An error occurred while updating the logon or logoff information for %1.
- }
-
- NELOG_NetlogonSyncError = ERRLOG_BASE + 126;
- {$EXTERNALSYM NELOG_NetlogonSyncError}
-
- {
- *An error occurred while synchronizing with primary domain controller %1
- }
-
- NELOG_NetlogonRequireSignOrSealError = ERRLOG_BASE + 127;
- {$EXTERNALSYM NELOG_NetlogonRequireSignOrSealError}
-
- {
- * The session setup to the Windows NT or Windows 2000 Domain Controller %1 for the domain %2
- * failed because %1 does not support signing or sealing the Netlogon
- * session.
- *
- * Either upgrade the Domain controller or set the RequireSignOrSeal
- * registry entry on this machine to 0.
- }
-
-//
-// UPS service specific error log messages from 130 to 135
-//
-
- NELOG_UPS_PowerOut = ERRLOG_BASE + 130;
- {$EXTERNALSYM NELOG_UPS_PowerOut}
-
- {
- * A power failure was detected at the server.
- }
-
- NELOG_UPS_Shutdown = ERRLOG_BASE + 131;
- {$EXTERNALSYM NELOG_UPS_Shutdown}
-
- {
- * The UPS service performed server shut down.
- }
-
- NELOG_UPS_CmdFileError = ERRLOG_BASE + 132;
- {$EXTERNALSYM NELOG_UPS_CmdFileError}
-
- {
- * The UPS service did not complete execution of the
- * user specified shut down command file.
- }
-
- NELOG_UPS_CannotOpenDriver = (ERRLOG_BASE+133);
- {$EXTERNALSYM NELOG_UPS_CannotOpenDriver}
-
- {
- * The UPS driver could not be opened. The error code is
- * the data.
- }
-
- NELOG_UPS_PowerBack = ERRLOG_BASE + 134;
- {$EXTERNALSYM NELOG_UPS_PowerBack}
-
- {
- * Power has been restored.
- }
-
- NELOG_UPS_CmdFileConfig = ERRLOG_BASE + 135;
- {$EXTERNALSYM NELOG_UPS_CmdFileConfig}
-
- {
- * There is a problem with a configuration of user specified
- * shut down command file.
- }
-
- NELOG_UPS_CmdFileExec = ERRLOG_BASE + 136;
- {$EXTERNALSYM NELOG_UPS_CmdFileExec}
-
- {
- * The UPS service failed to execute a user specified shutdown
- * command file %1. The error code is the data.
- }
-
-//
-// Remoteboot server specific error log messages are from 150 to 157
-//
-
- NELOG_Missing_Parameter = ERRLOG_BASE + 150;
- {$EXTERNALSYM NELOG_Missing_Parameter}
-
- {
- * Initialization failed because of an invalid or missing
- * parameter in the configuration file %1.
- }
-
- NELOG_Invalid_Config_Line = ERRLOG_BASE + 151;
- {$EXTERNALSYM NELOG_Invalid_Config_Line}
-
- {
- * Initialization failed because of an invalid line in the
- * configuration file %1. The invalid line is the data.
- }
-
- NELOG_Invalid_Config_File = ERRLOG_BASE + 152;
- {$EXTERNALSYM NELOG_Invalid_Config_File}
-
- {
- * Initialization failed because of an error in the configuration
- * file %1.
- }
-
- NELOG_File_Changed = ERRLOG_BASE + 153;
- {$EXTERNALSYM NELOG_File_Changed}
-
- {
- * The file %1 has been changed after initialization.
- * The boot-block loading was temporarily terminated.
- }
-
- NELOG_Files_Dont_Fit = ERRLOG_BASE + 154;
- {$EXTERNALSYM NELOG_Files_Dont_Fit}
-
- {
- * The files do not fit to the boot-block configuration
- * file %1. Change the BASE and ORG definitions or the order
- * of the files.
- }
-
- NELOG_Wrong_DLL_Version = ERRLOG_BASE + 155;
- {$EXTERNALSYM NELOG_Wrong_DLL_Version}
-
- {
- * Initialization failed because the dynamic-link
- * library %1 returned an incorrect version number.
- }
-
- NELOG_Error_in_DLL = ERRLOG_BASE + 156;
- {$EXTERNALSYM NELOG_Error_in_DLL}
-
- {
- * There was an unrecoverable error in the dynamic-
- * link library of the service.
- }
-
- NELOG_System_Error = ERRLOG_BASE + 157;
- {$EXTERNALSYM NELOG_System_Error}
-
- {
- * The system returned an unexpected error code.
- * The error code is the data.
- }
-
- NELOG_FT_ErrLog_Too_Large = ERRLOG_BASE + 158;
- {$EXTERNALSYM NELOG_FT_ErrLog_Too_Large}
-
- {
- * The fault-tolerance error log file, LANROOT\LOGS\FT.LOG,
- * is more than 64K.
- }
-
- NELOG_FT_Update_In_Progress = ERRLOG_BASE + 159;
- {$EXTERNALSYM NELOG_FT_Update_In_Progress}
-
- {
- * The fault-tolerance error-log file, LANROOT\LOGS\FT.LOG, had the
- * update in progress bit set upon opening, which means that the
- * system crashed while working on the error log.
- }
-
- NELOG_Joined_Domain = ERRLOG_BASE + 160;
- {$EXTERNALSYM NELOG_Joined_Domain}
-
- {
- * This computer has been successfully joined to %1 '%2'.
- }
-
- NELOG_Joined_Workgroup = ERRLOG_BASE + 161;
- {$EXTERNALSYM NELOG_Joined_Workgroup}
-
- (*
- * This computer has been successfully joined to workgroup '%1'.
- *)
-
-//
-// Microsoft has created a generic error log entry for OEMs to use to
-// log errors from OEM value added services. The code, which is the
-// 2nd arg to NetErrorLogWrite, is 3299. This value is manifest in
-// NET/H/ERRLOG.H as NELOG_OEM_Code. The text for error log entry
-// NELOG_OEM_Code is: "%1 %2 %3 %4 %5 %6 %7 %8 %9.".
-//
-// Microsoft suggests that OEMs use the insertion strings as follows:
-// %1: OEM System Name (e.g. 3+Open)
-// %2: OEM Service Name (e.g. 3+Mail)
-// %3: Severity level (e.g. error, warning, etc.)
-// %4: OEM error log entry sub-identifier (e.g. error code #)
-// %5 - % 9: Text.
-//
-// The call to NetErrorWrite must set nstrings = 9, and provide 9
-// ASCIIZ strings. If the caller does not have 9 insertion strings,
-// provide null strings for the empty insertion strings.
-//
-
- NELOG_OEM_Code = ERRLOG_BASE + 199;
- {$EXTERNALSYM NELOG_OEM_Code}
-
- {
- * %1 %2 %3 %4 %5 %6 %7 %8 %9.
- }
-
-//
-// another error log range defined for NT Lanman.
-//
-
- ERRLOG2_BASE = 5700 { New NT NELOG errors start here };
- {$EXTERNALSYM ERRLOG2_BASE}
-
- NELOG_NetlogonSSIInitError = ERRLOG2_BASE + 0;
- {$EXTERNALSYM NELOG_NetlogonSSIInitError}
-
- {
- * The Netlogon service could not initialize the replication data
- * structures successfully. The service was terminated. The following
- * error occurred: %n%1
- }
-
- NELOG_NetlogonFailedToUpdateTrustList = ERRLOG2_BASE + 1;
- {$EXTERNALSYM NELOG_NetlogonFailedToUpdateTrustList}
-
- {
- * The Netlogon service failed to update the domain trust list. The
- * following error occurred: %n%1
- }
-
- NELOG_NetlogonFailedToAddRpcInterface = ERRLOG2_BASE + 2;
- {$EXTERNALSYM NELOG_NetlogonFailedToAddRpcInterface}
-
- {
- * The Netlogon service could not add the RPC interface. The
- * service was terminated. The following error occurred: %n%1
- }
-
- NELOG_NetlogonFailedToReadMailslot = ERRLOG2_BASE + 3;
- {$EXTERNALSYM NELOG_NetlogonFailedToReadMailslot}
-
- {
- * The Netlogon service could not read a mailslot message from %1 due
- * to the following error: %n%2
- }
-
- NELOG_NetlogonFailedToRegisterSC = ERRLOG2_BASE + 4;
- {$EXTERNALSYM NELOG_NetlogonFailedToRegisterSC}
-
- (*
- * The Netlogon service failed to register the service with the
- * service controller. The service was terminated. The following
- * error occurred: %n%1
- *)
-
- NELOG_NetlogonChangeLogCorrupt = ERRLOG2_BASE + 5;
- {$EXTERNALSYM NELOG_NetlogonChangeLogCorrupt}
-
- {
- * The change log cache maintained by the Netlogon service for %1
- * database changes is inconsistent. The Netlogon service is resetting
- * the change log.
- }
-
- NELOG_NetlogonFailedToCreateShare = ERRLOG2_BASE + 6;
- {$EXTERNALSYM NELOG_NetlogonFailedToCreateShare}
-
- {
- * The Netlogon service could not create server share %1. The following
- * error occurred: %n%2
- }
-
- NELOG_NetlogonDownLevelLogonFailed = ERRLOG2_BASE + 7;
- {$EXTERNALSYM NELOG_NetlogonDownLevelLogonFailed}
-
- {
- * The down-level logon request for the user %1 from %2 failed.
- }
-
- NELOG_NetlogonDownLevelLogoffFailed = ERRLOG2_BASE + 8;
- {$EXTERNALSYM NELOG_NetlogonDownLevelLogoffFailed}
-
- {
- * The down-level logoff request for the user %1 from %2 failed.
- }
-
- NELOG_NetlogonNTLogonFailed = ERRLOG2_BASE + 9;
- {$EXTERNALSYM NELOG_NetlogonNTLogonFailed}
-
- {
- * The Windows NT or Windows 2000 %1 logon request for the user %2\%3 from %4 (via %5)
- * failed.
- }
-
- NELOG_NetlogonNTLogoffFailed = ERRLOG2_BASE + 10;
- {$EXTERNALSYM NELOG_NetlogonNTLogoffFailed}
-
- {
- * The Windows NT or Windows 2000 %1 logoff request for the user %2\%3 from %4
- * failed.
- }
-
- NELOG_NetlogonPartialSyncCallSuccess = ERRLOG2_BASE + 11;
- {$EXTERNALSYM NELOG_NetlogonPartialSyncCallSuccess}
-
- {
- * The partial synchronization request from the server %1 completed
- * successfully. %2 changes(s) has(have) been returned to the
- * caller.
- }
-
- NELOG_NetlogonPartialSyncCallFailed = ERRLOG2_BASE + 12;
- {$EXTERNALSYM NELOG_NetlogonPartialSyncCallFailed}
-
- {
- * The partial synchronization request from the server %1 failed with
- * the following error: %n%2
- }
-
- NELOG_NetlogonFullSyncCallSuccess = ERRLOG2_BASE + 13;
- {$EXTERNALSYM NELOG_NetlogonFullSyncCallSuccess}
-
- {
- * The full synchronization request from the server %1 completed
- * successfully. %2 object(s) has(have) been returned to
- * the caller.
- }
-
- NELOG_NetlogonFullSyncCallFailed = ERRLOG2_BASE + 14;
- {$EXTERNALSYM NELOG_NetlogonFullSyncCallFailed}
-
- {
- * The full synchronization request from the server %1 failed with
- * the following error: %n%2
- }
-
- NELOG_NetlogonPartialSyncSuccess = ERRLOG2_BASE + 15;
- {$EXTERNALSYM NELOG_NetlogonPartialSyncSuccess}
-
- {
- * The partial synchronization replication of the %1 database from the
- * primary domain controller %2 completed successfully. %3 change(s) is(are)
- * applied to the database.
- }
-
- NELOG_NetlogonPartialSyncFailed = ERRLOG2_BASE + 16;
- {$EXTERNALSYM NELOG_NetlogonPartialSyncFailed}
-
- {
- * The partial synchronization replication of the %1 database from the
- * primary domain controller %2 failed with the following error: %n%3
- }
-
- NELOG_NetlogonFullSyncSuccess = ERRLOG2_BASE + 17;
- {$EXTERNALSYM NELOG_NetlogonFullSyncSuccess}
-
- {
- * The full synchronization replication of the %1 database from the
- * primary domain controller %2 completed successfully.
- }
-
- NELOG_NetlogonFullSyncFailed = ERRLOG2_BASE + 18;
- {$EXTERNALSYM NELOG_NetlogonFullSyncFailed}
-
- {
- * The full synchronization replication of the %1 database from the
- * primary domain controller %2 failed with the following error: %n%3
- }
-
- NELOG_NetlogonAuthNoDomainController = ERRLOG2_BASE + 19;
- {$EXTERNALSYM NELOG_NetlogonAuthNoDomainController}
-
- {
- * This computer was not able to set up a secure session with a domain
- * controller in domain %1 due to the following: %n%2
- * %nThis may lead to authentication problems. Make sure that this
- * computer is connected to the network. If the problem persists,
- * please contact your domain administrator.
- *
- * %n%nADDITIONAL INFO
- * %nIf this computer is a domain controller for the specified domain, it
- * sets up the secure session to the primary domain controller emulator in the specified
- * domain. Otherwise, this computer sets up the secure session to any domain controller
- * in the specified domain.
- }
-
- NELOG_NetlogonAuthNoTrustLsaSecret = ERRLOG2_BASE + 20;
- {$EXTERNALSYM NELOG_NetlogonAuthNoTrustLsaSecret}
-
- {
- * The session setup to the Windows NT or Windows 2000 Domain Controller %1 for the domain %2
- * failed because the computer %3 does not have a local security database account.
- }
-
- NELOG_NetlogonAuthNoTrustSamAccount = ERRLOG2_BASE + 21;
- {$EXTERNALSYM NELOG_NetlogonAuthNoTrustSamAccount}
-
- {
- * The session setup to the Windows NT or Windows 2000 Domain Controller %1 for the domain %2
- * failed because the Domain Controller did not have an account %4
- * needed to set up the session by this computer %3.
- *
- * %n%nADDITIONAL DATA
- * %nIf this computer is a member of or a Domain Controller in the specified domain, the
- * aforementioned account is a computer account for this computer in the specified domain.
- * Otherwise, the account is an interdomain trust account with the specified domain.
- }
-
- NELOG_NetlogonServerAuthFailed = ERRLOG2_BASE + 22;
- {$EXTERNALSYM NELOG_NetlogonServerAuthFailed}
-
- {
- * The session setup from the computer %1 failed to authenticate.
- * The name(s) of the account(s) referenced in the security database is
- * %2. The following error occurred: %n%3
- }
-
- NELOG_NetlogonServerAuthNoTrustSamAccount = ERRLOG2_BASE + 23;
- {$EXTERNALSYM NELOG_NetlogonServerAuthNoTrustSamAccount}
-
- {
- * The session setup from computer '%1' failed because the security database
- * does not contain a trust account '%2' referenced by the specified computer.
- *
- * %n%nUSER ACTION
- *
- * %nIf this is the first occurrence of this event for the specified computer
- * and account, this may be a transient issue that doesn't require any action
- * at this time. Otherwise, the following steps may be taken to resolve this problem:
- *
- * %n%nIf '%2' is a legitimate machine account for the computer '%1', then '%1'
- * should be rejoined to the domain.
- *
- * %n%nIf '%2' is a legitimate interdomain trust account, then the trust should
- * be recreated.
- *
- * %n%nOtherwise, assuming that '%2' is not a legitimate account, the following
- * action should be taken on '%1':
- *
- * %n%nIf '%1' is a Domain Controller, then the trust associated with '%2' should be deleted.
- *
- * %n%nIf '%1' is not a Domain Controller, it should be disjoined from the domain.
- }
-
-//
-// General log messages for NT services.
-//
-
- NELOG_FailedToRegisterSC = ERRLOG2_BASE + 24;
- {$EXTERNALSYM NELOG_FailedToRegisterSC}
-
- {
- * Could not register control handler with service controller %1.
- }
-
- NELOG_FailedToSetServiceStatus = ERRLOG2_BASE + 25;
- {$EXTERNALSYM NELOG_FailedToSetServiceStatus}
-
- {
- * Could not set service status with service controller %1.
- }
-
- NELOG_FailedToGetComputerName = ERRLOG2_BASE + 26;
- {$EXTERNALSYM NELOG_FailedToGetComputerName}
-
- {
- * Could not find the computer name %1.
- }
-
- NELOG_DriverNotLoaded = ERRLOG2_BASE + 27;
- {$EXTERNALSYM NELOG_DriverNotLoaded}
-
- {
- * Could not load %1 device driver.
- }
-
- NELOG_NoTranportLoaded = ERRLOG2_BASE + 28;
- {$EXTERNALSYM NELOG_NoTranportLoaded}
-
- {
- * Could not load any transport.
- }
-
-//
-// More Netlogon service events
-//
-
- NELOG_NetlogonFailedDomainDelta = ERRLOG2_BASE + 29;
- {$EXTERNALSYM NELOG_NetlogonFailedDomainDelta}
-
- {
- * Replication of the %1 Domain Object "%2" from primary domain controller
- * %3 failed with the following error: %n%4
- }
-
- NELOG_NetlogonFailedGlobalGroupDelta = ERRLOG2_BASE + 30;
- {$EXTERNALSYM NELOG_NetlogonFailedGlobalGroupDelta}
-
- {
- * Replication of the %1 Global Group "%2" from primary domain controller
- * %3 failed with the following error: %n%4
- }
-
- NELOG_NetlogonFailedLocalGroupDelta = ERRLOG2_BASE + 31;
- {$EXTERNALSYM NELOG_NetlogonFailedLocalGroupDelta}
-
- {
- * Replication of the %1 Local Group "%2" from primary domain controller
- * %3 failed with the following error: %n%4
- }
-
- NELOG_NetlogonFailedUserDelta = ERRLOG2_BASE + 32;
- {$EXTERNALSYM NELOG_NetlogonFailedUserDelta}
-
- {
- * Replication of the %1 User "%2" from primary domain controller
- * %3 failed with the following error: %n%4
- }
-
- NELOG_NetlogonFailedPolicyDelta = ERRLOG2_BASE + 33;
- {$EXTERNALSYM NELOG_NetlogonFailedPolicyDelta}
-
- {
- * Replication of the %1 Policy Object "%2" from primary domain controller
- * %3 failed with the following error: %n%4
- }
-
- NELOG_NetlogonFailedTrustedDomainDelta = ERRLOG2_BASE + 34;
- {$EXTERNALSYM NELOG_NetlogonFailedTrustedDomainDelta}
-
- {
- * Replication of the %1 Trusted Domain Object "%2" from primary domain controller
- * %3 failed with the following error: %n%4
- }
-
- NELOG_NetlogonFailedAccountDelta = ERRLOG2_BASE + 35;
- {$EXTERNALSYM NELOG_NetlogonFailedAccountDelta}
-
- {
- * Replication of the %1 Account Object "%2" from primary domain controller
- * %3 failed with the following error: %n%4
- }
-
- NELOG_NetlogonFailedSecretDelta = ERRLOG2_BASE + 36;
- {$EXTERNALSYM NELOG_NetlogonFailedSecretDelta}
-
- {
- * Replication of the %1 Secret "%2" from primary domain controller
- * %3 failed with the following error: %n%4
- }
-
- NELOG_NetlogonSystemError = ERRLOG2_BASE + 37;
- {$EXTERNALSYM NELOG_NetlogonSystemError}
-
- {
- * The system returned the following unexpected error code: %n%1
- }
-
- NELOG_NetlogonDuplicateMachineAccounts = ERRLOG2_BASE + 38;
- {$EXTERNALSYM NELOG_NetlogonDuplicateMachineAccounts}
-
- {
- * Netlogon has detected two machine accounts for server "%1".
- * The server can be either a Windows 2000 Server that is a member of the
- * domain or the server can be a LAN Manager server with an account in the
- * SERVERS global group. It cannot be both.
- }
-
- NELOG_NetlogonTooManyGlobalGroups = ERRLOG2_BASE + 39;
- {$EXTERNALSYM NELOG_NetlogonTooManyGlobalGroups}
-
- {
- * This domain has more global groups than can be replicated to a LanMan
- * BDC. Either delete some of your global groups or remove the LanMan
- * BDCs from the domain.
- }
-
- NELOG_NetlogonBrowserDriver = ERRLOG2_BASE + 40;
- {$EXTERNALSYM NELOG_NetlogonBrowserDriver}
-
- {
- * The Browser driver returned the following error to Netlogon: %n%1
- }
-
- NELOG_NetlogonAddNameFailure = ERRLOG2_BASE + 41;
- {$EXTERNALSYM NELOG_NetlogonAddNameFailure}
-
- {
- * Netlogon could not register the %1<1B> name for the following reason: %n%2
- }
-
-//
-// More Remoteboot service events.
-//
- NELOG_RplMessages = ERRLOG2_BASE + 42;
- {$EXTERNALSYM NELOG_RplMessages}
-
- {
- * Service failed to retrieve messages needed to boot remote boot clients.
- }
-
- NELOG_RplXnsBoot = ERRLOG2_BASE + 43;
- {$EXTERNALSYM NELOG_RplXnsBoot}
-
- {
- * Service experienced a severe error and can no longer provide remote boot
- * for 3Com 3Start remote boot clients.
- }
-
- NELOG_RplSystem = ERRLOG2_BASE + 44;
- {$EXTERNALSYM NELOG_RplSystem}
-
- {
- * Service experienced a severe system error and will shut itself down.
- }
-
- NELOG_RplWkstaTimeout = ERRLOG2_BASE + 45;
- {$EXTERNALSYM NELOG_RplWkstaTimeout}
-
- {
- * Client with computer name %1 failed to acknowledge receipt of the
- * boot data. Remote boot of this client was not completed.
- }
-
- NELOG_RplWkstaFileOpen = ERRLOG2_BASE + 46;
- {$EXTERNALSYM NELOG_RplWkstaFileOpen}
-
- {
- * Client with computer name %1 was not booted due to an error in opening
- * file %2.
- }
-
- NELOG_RplWkstaFileRead = ERRLOG2_BASE + 47;
- {$EXTERNALSYM NELOG_RplWkstaFileRead}
-
- {
- * Client with computer name %1 was not booted due to an error in reading
- * file %2.
- }
-
- NELOG_RplWkstaMemory = ERRLOG2_BASE + 48;
- {$EXTERNALSYM NELOG_RplWkstaMemory}
-
- {
- * Client with computer name %1 was not booted due to insufficient memory
- * at the remote boot server.
- }
-
- NELOG_RplWkstaFileChecksum = ERRLOG2_BASE + 49;
- {$EXTERNALSYM NELOG_RplWkstaFileChecksum}
-
- {
- * Client with computer name %1 will be booted without using checksums
- * because checksum for file %2 could not be calculated.
- }
-
- NELOG_RplWkstaFileLineCount = ERRLOG2_BASE + 50;
- {$EXTERNALSYM NELOG_RplWkstaFileLineCount}
-
- {
- * Client with computer name %1 was not booted due to too many lines in
- * file %2.
- }
-
- NELOG_RplWkstaBbcFile = ERRLOG2_BASE + 51;
- {$EXTERNALSYM NELOG_RplWkstaBbcFile}
-
- {
- * Client with computer name %1 was not booted because the boot block
- * configuration file %2 for this client does not contain boot block
- * line and/or loader line.
- }
-
- NELOG_RplWkstaFileSize = ERRLOG2_BASE + 52;
- {$EXTERNALSYM NELOG_RplWkstaFileSize}
-
- {
- * Client with computer name %1 was not booted due to a bad size of
- * file %2.
- }
-
- NELOG_RplWkstaInternal = ERRLOG2_BASE + 53;
- {$EXTERNALSYM NELOG_RplWkstaInternal}
-
- {
- * Client with computer name %1 was not booted due to remote boot
- * service internal error.
- }
-
- NELOG_RplWkstaWrongVersion = ERRLOG2_BASE + 54;
- {$EXTERNALSYM NELOG_RplWkstaWrongVersion}
-
- {
- * Client with computer name %1 was not booted because file %2 has an
- * invalid boot header.
- }
-
- NELOG_RplWkstaNetwork = ERRLOG2_BASE + 55;
- {$EXTERNALSYM NELOG_RplWkstaNetwork}
-
- {
- * Client with computer name %1 was not booted due to network error.
- }
-
- NELOG_RplAdapterResource = ERRLOG2_BASE + 56;
- {$EXTERNALSYM NELOG_RplAdapterResource}
-
- {
- * Client with adapter id %1 was not booted due to lack of resources.
- }
-
- NELOG_RplFileCopy = ERRLOG2_BASE + 57;
- {$EXTERNALSYM NELOG_RplFileCopy}
-
- {
- * Service experienced error copying file or directory %1.
- }
-
- NELOG_RplFileDelete = ERRLOG2_BASE + 58;
- {$EXTERNALSYM NELOG_RplFileDelete}
-
- {
- * Service experienced error deleting file or directory %1.
- }
-
- NELOG_RplFilePerms = ERRLOG2_BASE + 59;
- {$EXTERNALSYM NELOG_RplFilePerms}
-
- {
- * Service experienced error setting permissions on file or directory %1.
- }
- NELOG_RplCheckConfigs = ERRLOG2_BASE + 60;
- {$EXTERNALSYM NELOG_RplCheckConfigs}
-
- {
- * Service experienced error evaluating RPL configurations.
- }
- NELOG_RplCreateProfiles = ERRLOG2_BASE + 61;
- {$EXTERNALSYM NELOG_RplCreateProfiles}
-
- {
- * Service experienced error creating RPL profiles for all configurations.
- }
- NELOG_RplRegistry = ERRLOG2_BASE + 62;
- {$EXTERNALSYM NELOG_RplRegistry}
-
- {
- * Service experienced error accessing registry.
- }
- NELOG_RplReplaceRPLDISK = ERRLOG2_BASE + 63;
- {$EXTERNALSYM NELOG_RplReplaceRPLDISK}
-
- {
- * Service experienced error replacing possibly outdated RPLDISK.SYS.
- }
- NELOG_RplCheckSecurity = ERRLOG2_BASE + 64;
- {$EXTERNALSYM NELOG_RplCheckSecurity}
-
- {
- * Service experienced error adding security accounts or setting
- * file permissions. These accounts are the RPLUSER local group
- * and the user accounts for the individual RPL workstations.
- }
- NELOG_RplBackupDatabase = ERRLOG2_BASE + 65;
- {$EXTERNALSYM NELOG_RplBackupDatabase}
-
- {
- * Service failed to back up its database.
- }
- NELOG_RplInitDatabase = ERRLOG2_BASE + 66;
- {$EXTERNALSYM NELOG_RplInitDatabase}
-
- {
- * Service failed to initialize from its database. The database may be
- * missing or corrupted. Service will attempt restoring the database
- * from the backup.
- }
- NELOG_RplRestoreDatabaseFailure = ERRLOG2_BASE + 67;
- {$EXTERNALSYM NELOG_RplRestoreDatabaseFailure}
-
- {
- * Service failed to restore its database from the backup. Service
- * will not start.
- }
- NELOG_RplRestoreDatabaseSuccess = ERRLOG2_BASE + 68;
- {$EXTERNALSYM NELOG_RplRestoreDatabaseSuccess}
-
- {
- * Service successfully restored its database from the backup.
- }
- NELOG_RplInitRestoredDatabase = ERRLOG2_BASE + 69;
- {$EXTERNALSYM NELOG_RplInitRestoredDatabase}
-
- {
- * Service failed to initialize from its restored database. Service
- * will not start.
- }
-
-//
-// More Netlogon and RPL service events
-//
- NELOG_NetlogonSessionTypeWrong = ERRLOG2_BASE + 70;
- {$EXTERNALSYM NELOG_NetlogonSessionTypeWrong}
-
- {
- * The session setup to the Windows NT or Windows 2000 Domain Controller %1 from computer
- * %2 using account %4 failed. %2 is declared to be a BDC in domain %3.
- * However, %2 tried to connect as either a DC in a trusted domain,
- * a member workstation in domain %3, or as a server in domain %3.
- * Use the Active Directory Users and Computers tool or Server Manager to remove the BDC account for %2.
- }
- NELOG_RplUpgradeDBTo40 = ERRLOG2_BASE + 71;
- {$EXTERNALSYM NELOG_RplUpgradeDBTo40}
-
- {
- * The Remoteboot database was in NT 3.5 / NT 3.51 format and NT is
- * attempting to convert it to NT 4.0 format. The JETCONV converter
- * will write to the Application event log when it is finished.
- }
- NELOG_NetlogonLanmanBdcsNotAllowed = ERRLOG2_BASE + 72;
- {$EXTERNALSYM NELOG_NetlogonLanmanBdcsNotAllowed}
-
- {
- * Global group SERVERS exists in domain %1 and has members.
- * This group defines Lan Manager BDCs in the domain.
- * Lan Manager BDCs are not permitted in NT domains.
- }
- NELOG_NetlogonNoDynamicDns = ERRLOG2_BASE + 73;
- {$EXTERNALSYM NELOG_NetlogonNoDynamicDns}
-
- {
- * The following DNS server that is authoritative for the DNS domain controller
- * locator records of this domain controller does not support dynamic DNS updates:
- *
- * %n%nDNS server IP address: %1
- * %nReturned Response Code (RCODE): %2
- * %nReturned Status Code: %3
- *
- * %n%nUSER ACTION
- *
- * %nConfigure the DNS server to allow dynamic DNS updates or manually add the DNS
- * records from the file '%SystemRoot%\System32\Config\Netlogon.dns' to the DNS database.
- }
-
- NELOG_NetlogonDynamicDnsRegisterFailure = ERRLOG2_BASE + 74;
- {$EXTERNALSYM NELOG_NetlogonDynamicDnsRegisterFailure}
-
- {
- *
- * The dynamic registration of the DNS record '%1' failed on the following DNS server:
- *
- * %n%nDNS server IP address: %3
- * %nReturned Response Code (RCODE): %4
- * %nReturned Status Code: %5
- *
- * %n%nFor computers and users to locate this domain controller, this record must be
- * registered in DNS.
- *
- * %n%nUSER ACTION
- *
- * %nDetermine what might have caused this failure, resolve the problem, and initiate
- * registration of the DNS records by the domain controller. To determine what might
- * have caused this failure, run DCDiag.exe. You can find this program on the Windows
- * Server 2003 installation CD in Support\Tools\support.cab. To learn more about
- * DCDiag.exe, see Help and Support Center. To initiate registration of the DNS records by
- * this domain controller, run 'nltest.exe /dsregdns' from the command prompt on the domain
- * controller or restart Net Logon service. Nltest.exe is available in the Microsoft Windows
- * Server Resource Kit CD. %n Or, you can manually add this record to DNS, but it is not
- * recommended.
- *
- * %n%nADDITIONAL DATA
- * %nError Value: %2
- *
- }
-
- NELOG_NetlogonDynamicDnsDeregisterFailure = ERRLOG2_BASE + 75;
- {$EXTERNALSYM NELOG_NetlogonDynamicDnsDeregisterFailure}
-
- {
- * The dynamic deletion of the DNS record '%1' failed on the following DNS server:
- *
- * %n%nDNS server IP address: %3
- * %nReturned Response Code (RCODE): %4
- * %nReturned Status Code: %5
- *
- * %n%nUSER ACTION
- *
- * %nTo prevent remote computers from connecting unnecessarily to the domain controller,
- * delete the record manually or troubleshoot the failure to dynamically delete the
- * record. To learn more about debugging DNS, see Help and Support Center.
- *
- * %n%nADDITIONAL DATA
- * %nError Value: %2
- }
-
- NELOG_NetlogonFailedFileCreate = ERRLOG2_BASE + 76;
- {$EXTERNALSYM NELOG_NetlogonFailedFileCreate}
-
- {
- * Failed to create/open file %1 with the following error: %n%2
- }
-
- NELOG_NetlogonGetSubnetToSite = ERRLOG2_BASE + 77;
- {$EXTERNALSYM NELOG_NetlogonGetSubnetToSite}
-
- {
- * Netlogon got the following error while trying to get the subnet to site
- * mapping information from the DS: %n%1
- }
-
- NELOG_NetlogonNoSiteForClient = ERRLOG2_BASE + 78;
- {$EXTERNALSYM NELOG_NetlogonNoSiteForClient}
-
- {
- * '%1' tried to determine its site by looking up its IP address ('%2')
- * in the Configuration\Sites\Subnets container in the DS. No subnet matched
- * the IP address. Consider adding a subnet object for this IP address.
- }
-
- NELOG_NetlogonBadSiteName = ERRLOG2_BASE + 79;
- {$EXTERNALSYM NELOG_NetlogonBadSiteName}
-
- {
- * The site name for this computer is '%1'. That site name is not a valid
- * site name. A site name must be a valid DNS label.
- * Rename the site to be a valid name.
- }
-
- NELOG_NetlogonBadSubnetName = ERRLOG2_BASE + 80;
- {$EXTERNALSYM NELOG_NetlogonBadSubnetName}
-
- {
- * The subnet object '%1' appears in the Configuration\Sites\Subnets
- * container in the DS. The name is not syntactically valid. The valid
- * syntax is xx.xx.xx.xx/yy where xx.xx.xx.xx is a valid IP subnet number
- * and yy is the number of bits in the subnet mask.
- *
- * Correct the name of the subnet object.
- }
-
- NELOG_NetlogonDynamicDnsServerFailure = ERRLOG2_BASE + 81;
- {$EXTERNALSYM NELOG_NetlogonDynamicDnsServerFailure}
-
- {
- * Dynamic registration or deletion of one or more DNS records associated with DNS
- * domain '%1' failed. These records are used by other computers to locate this
- * server as a domain controller (if the specified domain is an Active Directory
- * domain) or as an LDAP server (if the specified domain is an application partition).
- *
- * %n%nPossible causes of failure include:
- *
- * %n- TCP/IP properties of the network connections of this computer contain wrong IP address(es) of the preferred and alternate DNS servers
- * %n- Specified preferred and alternate DNS servers are not running
- * %n- DNS server(s) primary for the records to be registered is not running
- * %n- Preferred or alternate DNS servers are configured with wrong root hints
- * %n- Parent DNS zone contains incorrect delegation to the child zone authoritative for the DNS records that failed registration
- *
- * %n%nUSER ACTION
- *
- * %nFix possible misconfiguration(s) specified above and initiate registration or deletion of
- * the DNS records by running 'nltest.exe /dsregdns' from the command prompt or by restarting
- * Net Logon service. Nltest.exe is available in the Microsoft Windows Server Resource Kit CD.
- }
-
- NELOG_NetlogonDynamicDnsFailure = ERRLOG2_BASE + 82;
- {$EXTERNALSYM NELOG_NetlogonDynamicDnsFailure}
-
- {
- * Dynamic registration or deregistration of one or more DNS records failed with the following error: %n%1
- }
-
- NELOG_NetlogonRpcCallCancelled = ERRLOG2_BASE + 83;
- {$EXTERNALSYM NELOG_NetlogonRpcCallCancelled}
-
- {
- * The session setup to the Windows NT or Windows 2000 Domain Controller %1 for the domain %2
- * is not responsive. The current RPC call from Netlogon on \\%3 to %1 has been cancelled.
- }
-
- NELOG_NetlogonDcSiteCovered = ERRLOG2_BASE + 84;
- {$EXTERNALSYM NELOG_NetlogonDcSiteCovered}
-
- {
- * Site '%2' does not have any Domain Controllers for domain '%3'.
- * Domain Controllers in site '%1' have been automatically
- * selected to cover site '%2' for domain '%3' based on configured
- * Directory Server replication costs.
- }
-
- NELOG_NetlogonDcSiteNotCovered = ERRLOG2_BASE + 85;
- {$EXTERNALSYM NELOG_NetlogonDcSiteNotCovered}
-
- {
- * This Domain Controller no longer automatically covers site '%1' for domain '%2'.
- }
-
- NELOG_NetlogonGcSiteCovered = ERRLOG2_BASE + 86;
- {$EXTERNALSYM NELOG_NetlogonGcSiteCovered}
-
- {
- * Site '%2' does not have any Global Catalog servers for forest '%3'.
- * Global Catalog servers in site '%1' have been automatically
- * selected to cover site '%2' for forest '%3' based on configured
- * Directory Server replication costs.
- }
-
- NELOG_NetlogonGcSiteNotCovered = ERRLOG2_BASE + 87;
- {$EXTERNALSYM NELOG_NetlogonGcSiteNotCovered}
-
- {
- * This Global Catalog server no longer automatically covers site '%1' for forest '%2'.
- }
-
- NELOG_NetlogonFailedSpnUpdate = ERRLOG2_BASE + 88;
- {$EXTERNALSYM NELOG_NetlogonFailedSpnUpdate}
-
- {
- * Attempt to update HOST Service Principal Names (SPNs) of the computer
- * object in Active Directory failed. The updated values were '%1' and '%2'.
- * The following error occurred: %n%3
- }
-
- NELOG_NetlogonFailedDnsHostNameUpdate = ERRLOG2_BASE + 89;
- {$EXTERNALSYM NELOG_NetlogonFailedDnsHostNameUpdate}
-
- {
- * Attempt to update DNS Host Name of the computer object
- * in Active Directory failed. The updated value was '%1'.
- * The following error occurred: %n%2
- }
-
- NELOG_NetlogonAuthNoUplevelDomainController = ERRLOG2_BASE + 90;
- {$EXTERNALSYM NELOG_NetlogonAuthNoUplevelDomainController}
-
- {
- * No suitable Domain Controller is available for domain %1.
- * An NT4 or older domain controller is available but it cannot
- * be used for authentication purposes in the Windows 2000 or newer
- * domain that this computer is a member of.
- * The following error occurred:%n%2
- }
-
- NELOG_NetlogonAuthDomainDowngraded = ERRLOG2_BASE + 91;
- {$EXTERNALSYM NELOG_NetlogonAuthDomainDowngraded}
-
- {
- * The domain of this computer, %1 has been downgraded from Windows 2000
- * or newer to Windows NT4 or older. The computer cannot function properly
- * in this case for authentication purposes. This computer needs to rejoin
- * the domain.
- * The following error occurred:%n%2
- }
-
- NELOG_NetlogonNdncSiteCovered = ERRLOG2_BASE + 92;
- {$EXTERNALSYM NELOG_NetlogonNdncSiteCovered}
-
- {
- * Site '%2' does not have any LDAP servers for non-domain NC '%3'.
- * LDAP servers in site '%1' have been automatically selected to
- * cover site '%2' for non-domain NC '%3' based on configured
- * Directory Server replication costs.
- }
-
- NELOG_NetlogonNdncSiteNotCovered = ERRLOG2_BASE + 93;
- {$EXTERNALSYM NELOG_NetlogonNdncSiteNotCovered}
-
- {
- * This LDAP server no longer automatically covers site '%1' for non-domain NC '%2'.
- }
-
- NELOG_NetlogonDcOldSiteCovered = ERRLOG2_BASE + 94;
- {$EXTERNALSYM NELOG_NetlogonDcOldSiteCovered}
-
- {
- * Site '%2' is no longer manually configured in the registry as
- * covered by this Domain Controller for domain '%3'. As a result,
- * site '%2' does not have any Domain Controllers for domain '%3'.
- * Domain Controllers in site '%1' have been automatically
- * selected to cover site '%2' for domain '%3' based on configured
- * Directory Server replication costs.
- }
-
- NELOG_NetlogonDcSiteNotCoveredAuto = ERRLOG2_BASE + 95;
- {$EXTERNALSYM NELOG_NetlogonDcSiteNotCoveredAuto}
-
- {
- * This Domain Controller no longer automatically covers site '%1' for domain '%2'.
- * However, site '%1' is still (manually) covered by this Domain Controller for
- * domain '%2' since this site has been manually configured in the registry.
- }
-
- NELOG_NetlogonGcOldSiteCovered = ERRLOG2_BASE + 96;
- {$EXTERNALSYM NELOG_NetlogonGcOldSiteCovered}
-
- {
- * Site '%2' is no longer manually configured in the registry as
- * covered by this Global Catalog server for forest '%3'. As a result,
- * site '%2' does not have any Global Catalog servers for forest '%3'.
- * Global Catalog servers in site '%1' have been automatically
- * selected to cover site '%2' for forest '%3' based on configured
- * Directory Server replication costs.
- }
-
- NELOG_NetlogonGcSiteNotCoveredAuto = ERRLOG2_BASE + 97;
- {$EXTERNALSYM NELOG_NetlogonGcSiteNotCoveredAuto}
-
- {
- * This Global Catalog server no longer automatically covers site '%1' for forest '%2'.
- * However, site '%1' is still (manually) covered by this Global catalog for
- * forest '%2' since this site has been manually configured in the registry.
- }
-
- NELOG_NetlogonNdncOldSiteCovered = ERRLOG2_BASE + 98;
- {$EXTERNALSYM NELOG_NetlogonNdncOldSiteCovered}
-
- {
- * Site '%2' is no longer manually configured in the registry as
- * covered by this LDAP server for non-domain NC '%3'. As a result,
- * site '%2' does not have any LDAP servers for non-domain NC '%3'.
- * LDAP servers in site '%1' have been automatically
- * selected to cover site '%2' for non-domain NC '%3' based on
- * configured Directory Server replication costs.
- }
-
- NELOG_NetlogonNdncSiteNotCoveredAuto = ERRLOG2_BASE + 99;
- {$EXTERNALSYM NELOG_NetlogonNdncSiteNotCoveredAuto}
-
- {
- * This LDAP server no longer automatically covers site '%1' for non-domain NC '%2'.
- * However, site '%1' is still (manually) covered by this LDAP server for
- * non-domain NC '%2' since this site has been manually configured in the registry.
- }
-
- NELOG_NetlogonSpnMultipleSamAccountNames = ERRLOG2_BASE + 100;
- {$EXTERNALSYM NELOG_NetlogonSpnMultipleSamAccountNames}
-
- {
- * Attempt to update DnsHostName and HOST Service Principal Name (SPN) attributes
- * of the computer object in Active Directory failed because the Domain Controller
- * '%1' had more than one account with the name '%2' corresponding to this computer.
- * Not having SPNs registered may result in authentication failures for this computer.
- * Contact your domain administrator who may need to manually resolve the account name
- * collision.
- }
-
- NELOG_NetlogonSpnCrackNamesFailure = ERRLOG2_BASE + 101;
- {$EXTERNALSYM NELOG_NetlogonSpnCrackNamesFailure}
-
- {
- * Attempt to update DnsHostName and HOST Service Principal Name (SPN) attributes
- * of the computer object in Active Directory failed because this computer account
- * name, '%2' could not be mapped to the computer object on Domain Controller '%1'.
- * Not having SPNs registered may result in authentication failures for this computer.
- * Contact your domain administrator. The following technical information may be
- * useful for the resolution of this failure:%n
- * DsCrackNames status = 0x%3, crack error = 0x%4.
- }
-
- NELOG_NetlogonNoAddressToSiteMapping = ERRLOG2_BASE + 102;
- {$EXTERNALSYM NELOG_NetlogonNoAddressToSiteMapping}
-
- {
- * None of the IP addresses (%2) of this Domain Controller map to the configured site '%1'.
- * While this may be a temporary situation due to IP address changes, it is generally
- * recommended that the IP address of the Domain Controller (accessible to machines in
- * its domain) maps to the Site which it services. If the above list of IP addresses is
- * stable, consider moving this server to a site (or create one if it does not already
- * exist) such that the above IP address maps to the selected site. This may require the
- * creation of a new subnet object (whose range includes the above IP address) which maps
- * to the selected site object.
- }
-
- NELOG_NetlogonInvalidGenericParameterValue = ERRLOG2_BASE + 103;
- {$EXTERNALSYM NELOG_NetlogonInvalidGenericParameterValue}
-
- {
- * The following error occurred while reading a parameter '%2' in the
- * Netlogon %1 registry section:%n%3
- }
-
- NELOG_NetlogonInvalidDwordParameterValue = ERRLOG2_BASE + 104;
- {$EXTERNALSYM NELOG_NetlogonInvalidDwordParameterValue}
-
- {
- * The Netlogon %1 registry key contains an invalid value 0x%2 for parameter '%3'.
- * The minimum and maximum values allowed for this parameter are 0x%4 and 0x%5, respectively.
- * The value of 0x%6 has been assigned to this parameter.
- }
-
- NELOG_NetlogonServerAuthFailedNoAccount = ERRLOG2_BASE + 105;
- {$EXTERNALSYM NELOG_NetlogonServerAuthFailedNoAccount}
-
- {
- * The session setup from the computer %1 failed to authenticate.
- * The following error occurred: %n%2
- }
-
- NELOG_NetlogonNoDynamicDnsManual = ERRLOG2_BASE + 106;
- {$EXTERNALSYM NELOG_NetlogonNoDynamicDnsManual}
-
- (*
- * Dynamic DNS updates have been manually disabled on this domain controller.
- *
- * %n%nUSER ACTION
- *
- * %nReconfigure this domain controller to use dynamic DNS updates or manually add the DNS
- * records from the file '%SystemRoot%\System32\Config\Netlogon.dns' to the DNS database.
- *)
-
- NELOG_NetlogonNoSiteForClients = ERRLOG2_BASE + 107;
- {$EXTERNALSYM NELOG_NetlogonNoSiteForClients}
-
- {
- * During the past %1 hours there have been %2 connections to this Domain
- * Controller from client machines whose IP addresses don't map to any of
- * the existing sites in the enterprise. Those clients, therefore, have
- * undefined sites and may connect to any Domain Controller including
- * those that are in far distant locations from the clients. A client's site
- * is determined by the mapping of its subnet to one of the existing sites.
- * To move the above clients to one of the sites, please consider creating
- * subnet object(s) covering the above IP addresses with mapping to one of the
- * existing sites. The names and IP addresses of the clients in question have
- * been logged on this computer in the following log file
- * '%SystemRoot%\debug\netlogon.log' and, potentially, in the log file
- * '%SystemRoot%\debug\netlogon.bak' created if the former log becomes full.
- * The log(s) may contain additional unrelated debugging information. To filter
- * out the needed information, please search for lines which contain text
- * 'NO_CLIENT_SITE:'. The first word after this string is the client name and
- * the second word is the client IP address. The maximum size of the log(s) is
- * controlled by the following registry DWORD value
- * 'HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Netlogon\Parameters\LogFileMaxSize';
- * the default is %3 bytes. The current maximum size is %4 bytes. To set a
- * different maximum size, create the above registry value and set the desired
- * maximum size in bytes.
- }
-
- NELOG_NetlogonDnsDeregAborted = ERRLOG2_BASE + 108;
- {$EXTERNALSYM NELOG_NetlogonDnsDeregAborted}
-
- (*
- * The deregistration of some DNS domain controller locator records was aborted
- * at the time of this domain controller demotion because the DNS deregistrations
- * took too long.
- *
- * %n%nUSER ACTION
- *
- * %nManually delete the DNS records listed in the file
- * '%SystemRoot%\System32\Config\Netlogon.dns' from the DNS database.
- *)
-
- NELOG_NetlogonRpcPortRequestFailure = ERRLOG2_BASE + 109;
- {$EXTERNALSYM NELOG_NetlogonRpcPortRequestFailure}
-
- (*
- * The NetLogon service on this domain controller has been configured to use port %1
- * for incoming RPC connections over TCP/IP from remote machines. However, the
- * following error occurred when Netlogon attempted to register this port with the RPC
- * endpoint mapper service: %n%2 %nThis will prevent the NetLogon service on remote
- * machines from connecting to this domain controller over TCP/IP that may result in
- * authentication problems.
- *
- * %n%nUSER ACTION
- *
- * %nThe specified port is configured via the Group Policy or via a registry value 'DcTcpipPort'
- * under the 'HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Netlogon\Parameters'
- * registry key; the value configured through the Group Policy takes precedence. If the
- * port specified is in error, reset it to a correct value. You can also remove this
- * configuration for the port in which case the port will be assigned dynamically by
- * the endpoint mapper at the time the NetLogon service on remote machines makes RPC connections
- * to this domain controller. After the misconfiguration is corrected, restart the NetLogon
- * service on this machine and verify that this event log no longer appears.
- *)
-
-implementation
-
-{$IFDEF DYNAMIC_LINK}
-
-var
- _NetErrorLogClear: Pointer;
-
-function NetErrorLogClear;
-begin
- GetProcedureAddress(_NetErrorLogClear, netapi32, 'NetErrorLogClear');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetErrorLogClear]
- end;
-end;
-
-var
- _NetErrorLogRead: Pointer;
-
-function NetErrorLogRead;
-begin
- GetProcedureAddress(_NetErrorLogRead, netapi32, 'NetErrorLogRead');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetErrorLogRead]
- end;
-end;
-
-var
- _NetErrorLogWrite: Pointer;
-
-function NetErrorLogWrite;
-begin
- GetProcedureAddress(_NetErrorLogWrite, netapi32, 'NetErrorLogWrite');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetErrorLogWrite]
- end;
-end;
-
-{$ELSE}
-
-function NetErrorLogClear; external netapi32 name 'NetErrorLogClear';
-function NetErrorLogRead; external netapi32 name 'NetErrorLogRead';
-function NetErrorLogWrite; external netapi32 name 'NetErrorLogWrite';
-
-{$ENDIF DYNAMIC_LINK}
-
-end.
+{******************************************************************************}
+{ }
+{ Lan Manager Error Log API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: lmerrlog.h, released November 2001. The original Pascal}
+{ code is: LmErrLog.pas, released Februari 2002. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwalmerrlog.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaLmErrLog;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "lmerrlog.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaLmCons, JwaWinType;
+
+//
+// Data Structures - Config
+//
+
+type
+ _ERROR_LOG = record
+ el_len: DWORD;
+ el_reserved: DWORD;
+ el_time: DWORD;
+ el_error: DWORD;
+ el_name: LPWSTR; // pointer to service name
+ el_text: LPWSTR; // pointer to string array
+ el_data: LPBYTE; // pointer to BYTE array
+ el_data_size: DWORD; // byte count of el_data area
+ el_nstrings: DWORD; // number of strings in el_text.
+ end;
+ {$EXTERNALSYM _ERROR_LOG}
+ ERROR_LOG = _ERROR_LOG;
+ {$EXTERNALSYM ERROR_LOG}
+ PERROR_LOG = ^ERROR_LOG;
+ {$EXTERNALSYM PERROR_LOG}
+ LPERROR_LOG = ^ERROR_LOG;
+ {$EXTERNALSYM LPERROR_LOG}
+ TErrorLog = ERROR_LOG;
+ PErrorLog = PERROR_LOG;
+
+{$DEFINE REVISED_ERROR_LOG_STRUCT}
+
+ _HLOG = record
+ time: DWORD;
+ last_flags: DWORD;
+ offset: DWORD;
+ rec_offset: DWORD;
+ end;
+ {$EXTERNALSYM _HLOG}
+ HLOG = _HLOG;
+ {$EXTERNALSYM HLOG}
+ PHLOG = ^HLOG;
+ {$EXTERNALSYM PHLOG}
+ LPHLOG = ^HLOG;
+ {$EXTERNALSYM LPHLOG}
+
+const
+ LOGFLAGS_FORWARD = 0;
+ {$EXTERNALSYM LOGFLAGS_FORWARD}
+ LOGFLAGS_BACKWARD = $1;
+ {$EXTERNALSYM LOGFLAGS_BACKWARD}
+ LOGFLAGS_SEEK = $2;
+ {$EXTERNALSYM LOGFLAGS_SEEK}
+
+//
+// Function Prototypes - ErrorLog
+//
+
+function NetErrorLogClear(server, backupfile: LPCWSTR; reserved: LPBYTE): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetErrorLogClear}
+
+function NetErrorLogRead(server: LPCWSTR; reserved1: LPWSTR; errloghandle: LPHLOG; offset: DWORD; reserved2: LPDWORD;
+ reserved3, offsetflag: DWORD; var bufptr: LPBYTE; prefmaxlen: DWORD; bytesread, totalbytes: LPDWORD): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetErrorLogRead}
+
+function NetErrorLogWrite(reserved1: LPBYTE; code: DWORD; component: LPCWSTR; buffer: LPBYTE; numbytes: DWORD;
+ msgbuf: LPBYTE; strcount: DWORD; reserved2: LPBYTE): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetErrorLogWrite}
+
+//
+// Special Values and Constants
+//
+
+//
+// Generic (could be used by more than one service)
+// error log messages from 0 to 25
+//
+// Do not change the comments following the manifest constants without
+// understanding how mapmsg works.
+//
+
+const
+ ERRLOG_BASE = 3100; { NELOG errors start here }
+ {$EXTERNALSYM ERRLOG_BASE}
+
+ NELOG_Internal_Error = ERRLOG_BASE + 0;
+ {$EXTERNALSYM NELOG_Internal_Error}
+
+ {
+ * The operation failed because a network software error occurred.
+ }
+
+ NELOG_Resource_Shortage = ERRLOG_BASE + 1;
+ {$EXTERNALSYM NELOG_Resource_Shortage}
+
+ {
+ * The system ran out of a resource controlled by the %1 option.
+ }
+
+ NELOG_Unable_To_Lock_Segment = ERRLOG_BASE + 2;
+ {$EXTERNALSYM NELOG_Unable_To_Lock_Segment}
+
+ {
+ * The service failed to obtain a long-term lock on the
+ * segment for network control blocks (NCBs). The error code is the data.
+ }
+
+ NELOG_Unable_To_Unlock_Segment = ERRLOG_BASE + 3;
+ {$EXTERNALSYM NELOG_Unable_To_Unlock_Segment}
+
+ {
+ * The service failed to release the long-term lock on the
+ * segment for network control blocks (NCBs). The error code is the data.
+ }
+
+ NELOG_Uninstall_Service = ERRLOG_BASE + 4;
+ {$EXTERNALSYM NELOG_Uninstall_Service}
+
+ {
+ * There was an error stopping service %1.
+ * The error code from NetServiceControl is the data.
+ }
+
+ NELOG_Init_Exec_Fail = ERRLOG_BASE + 5;
+ {$EXTERNALSYM NELOG_Init_Exec_Fail}
+
+ {
+ * Initialization failed because of a system execution failure on
+ * path %1. The system error code is the data.
+ }
+
+ NELOG_Ncb_Error = ERRLOG_BASE + 6;
+ {$EXTERNALSYM NELOG_Ncb_Error}
+
+ {
+ * An unexpected network control block (NCB) was received. The NCB is the data.
+ }
+
+ NELOG_Net_Not_Started = ERRLOG_BASE + 7;
+ {$EXTERNALSYM NELOG_Net_Not_Started}
+
+ {
+ * The network is not started.
+ }
+
+ NELOG_Ioctl_Error = ERRLOG_BASE + 8;
+ {$EXTERNALSYM NELOG_Ioctl_Error}
+
+ {
+ * A DosDevIoctl or DosFsCtl to NETWKSTA.SYS failed.
+ * The data shown is in this format:
+ * DWORD approx CS:IP of call to ioctl or fsctl
+ * WORD error code
+ * WORD ioctl or fsctl number
+ }
+
+ NELOG_System_Semaphore = ERRLOG_BASE + 9;
+ {$EXTERNALSYM NELOG_System_Semaphore}
+
+ {
+ * Unable to create or open system semaphore %1.
+ * The error code is the data.
+ }
+
+ NELOG_Init_OpenCreate_Err = ERRLOG_BASE + 10;
+ {$EXTERNALSYM NELOG_Init_OpenCreate_Err}
+
+ {
+ * Initialization failed because of an open/create error on the
+ * file %1. The system error code is the data.
+ }
+
+ NELOG_NetBios = ERRLOG_BASE + 11;
+ {$EXTERNALSYM NELOG_NetBios}
+
+ {
+ * An unexpected NetBIOS error occurred.
+ * The error code is the data.
+ }
+
+ NELOG_SMB_Illegal = ERRLOG_BASE + 12;
+ {$EXTERNALSYM NELOG_SMB_Illegal}
+
+ {
+ * An illegal server message block (SMB) was received.
+ * The SMB is the data.
+ }
+
+ NELOG_Service_Fail = ERRLOG_BASE + 13;
+ {$EXTERNALSYM NELOG_Service_Fail}
+
+ {
+ * Initialization failed because the requested service %1
+ * could not be started.
+ }
+
+ NELOG_Entries_Lost = ERRLOG_BASE + 14;
+ {$EXTERNALSYM NELOG_Entries_Lost}
+
+ {
+ * Some entries in the error log were lost because of a buffer
+ * overflow.
+ }
+
+//
+// Server specific error log messages from 20 to 40
+//
+
+ NELOG_Init_Seg_Overflow = ERRLOG_BASE + 20;
+ {$EXTERNALSYM NELOG_Init_Seg_Overflow}
+
+ {
+ * Initialization parameters controlling resource usage other
+ * than net buffers are sized so that too much memory is needed.
+ }
+
+ NELOG_Srv_No_Mem_Grow = ERRLOG_BASE + 21;
+ {$EXTERNALSYM NELOG_Srv_No_Mem_Grow}
+
+ {
+ * The server cannot increase the size of a memory segment.
+ }
+
+ NELOG_Access_File_Bad = ERRLOG_BASE + 22;
+ {$EXTERNALSYM NELOG_Access_File_Bad}
+
+ {
+ * Initialization failed because account file %1 is either incorrect
+ * or not present.
+ }
+
+ NELOG_Srvnet_Not_Started = ERRLOG_BASE + 23;
+ {$EXTERNALSYM NELOG_Srvnet_Not_Started}
+
+ {
+ * Initialization failed because network %1 was not started.
+ }
+
+ NELOG_Init_Chardev_Err = ERRLOG_BASE + 24;
+ {$EXTERNALSYM NELOG_Init_Chardev_Err}
+
+ {
+ * The server failed to start. Either all three chdev
+ * parameters must be zero or all three must be nonzero.
+ }
+
+ NELOG_Remote_API = ERRLOG_BASE + 25;
+ {$EXTERNALSYM NELOG_Remote_API}
+
+ { A remote API request was halted due to the following
+ * invalid description string: %1.
+ }
+
+ NELOG_Ncb_TooManyErr = ERRLOG_BASE + 26;
+ {$EXTERNALSYM NELOG_Ncb_TooManyErr}
+
+ { The network %1 ran out of network control blocks (NCBs). You may need to increase NCBs
+ * for this network. The following information includes the
+ * number of NCBs submitted by the server when this error occurred:
+ }
+
+ NELOG_Mailslot_err = ERRLOG_BASE + 27;
+ {$EXTERNALSYM NELOG_Mailslot_err}
+
+ { The server cannot create the %1 mailslot needed to send
+ * the ReleaseMemory alert message. The error received is:
+ }
+
+ NELOG_ReleaseMem_Alert = ERRLOG_BASE + 28;
+ {$EXTERNALSYM NELOG_ReleaseMem_Alert}
+
+ { The server failed to register for the ReleaseMemory alert,
+ * with recipient %1. The error code from
+ * NetAlertStart is the data.
+ }
+
+ NELOG_AT_cannot_write = ERRLOG_BASE + 29;
+ {$EXTERNALSYM NELOG_AT_cannot_write}
+
+ { The server cannot update the AT schedule file. The file
+ * is corrupted.
+ }
+
+ NELOG_Cant_Make_Msg_File = ERRLOG_BASE + 30;
+ {$EXTERNALSYM NELOG_Cant_Make_Msg_File}
+
+ { The server encountered an error when calling
+ * NetIMakeLMFileName. The error code is the data.
+ }
+
+ NELOG_Exec_Netservr_NoMem = ERRLOG_BASE + 31;
+ {$EXTERNALSYM NELOG_Exec_Netservr_NoMem}
+
+ { Initialization failed because of a system execution failure on
+ * path %1. There is not enough memory to start the process.
+ * The system error code is the data.
+ }
+
+ NELOG_Server_Lock_Failure = ERRLOG_BASE + 32;
+ {$EXTERNALSYM NELOG_Server_Lock_Failure}
+
+ { Longterm lock of the server buffers failed.
+ * Check swap disk's free space and restart the system to start the server.
+ }
+
+//
+// Message service and POPUP specific error log messages from 40 to 55
+//
+
+ NELOG_Msg_Shutdown = ERRLOG_BASE + 40;
+ {$EXTERNALSYM NELOG_Msg_Shutdown}
+
+ {
+ * The service has stopped due to repeated consecutive
+ * occurrences of a network control block (NCB) error. The last bad NCB follows
+ * in raw data.
+ }
+
+ NELOG_Msg_Sem_Shutdown = ERRLOG_BASE + 41;
+ {$EXTERNALSYM NELOG_Msg_Sem_Shutdown}
+
+ {
+ * The Message server has stopped due to a lock on the
+ * Message server shared data segment.
+ }
+
+ NELOG_Msg_Log_Err = ERRLOG_BASE + 50;
+ {$EXTERNALSYM NELOG_Msg_Log_Err}
+
+ {
+ * A file system error occurred while opening or writing to the
+ * system message log file %1. Message logging has been
+ * switched off due to the error. The error code is the data.
+ }
+
+ NELOG_VIO_POPUP_ERR = ERRLOG_BASE + 51;
+ {$EXTERNALSYM NELOG_VIO_POPUP_ERR}
+
+ {
+ * Unable to display message POPUP due to system VIO call error.
+ * The error code is the data.
+ }
+
+ NELOG_Msg_Unexpected_SMB_Type = ERRLOG_BASE + 52;
+ {$EXTERNALSYM NELOG_Msg_Unexpected_SMB_Type}
+
+ {
+ * An illegal server message block (SMB) was received. The SMB is the data.
+ }
+
+//
+// Workstation specific error log messages from 60 to 75
+//
+
+ NELOG_Wksta_Infoseg = ERRLOG_BASE + 60;
+ {$EXTERNALSYM NELOG_Wksta_Infoseg}
+
+ {
+ * The workstation information segment is bigger than 64K.
+ * The size follows, in DWORD format:
+ }
+
+ NELOG_Wksta_Compname = ERRLOG_BASE + 61;
+ {$EXTERNALSYM NELOG_Wksta_Compname}
+
+ {
+ * The workstation was unable to get the name-number of the computer.
+ }
+
+ NELOG_Wksta_BiosThreadFailure = ERRLOG_BASE + 62;
+ {$EXTERNALSYM NELOG_Wksta_BiosThreadFailure}
+
+ {
+ * The workstation could not initialize the Async NetBIOS Thread.
+ * The error code is the data.
+ }
+
+ NELOG_Wksta_IniSeg = ERRLOG_BASE + 63;
+ {$EXTERNALSYM NELOG_Wksta_IniSeg}
+
+ {
+ * The workstation could not open the initial shared segment.
+ * The error code is the data.
+ }
+
+ NELOG_Wksta_HostTab_Full = ERRLOG_BASE + 64;
+ {$EXTERNALSYM NELOG_Wksta_HostTab_Full}
+
+ {
+ * The workstation host table is full.
+ }
+
+ NELOG_Wksta_Bad_Mailslot_SMB = ERRLOG_BASE + 65;
+ {$EXTERNALSYM NELOG_Wksta_Bad_Mailslot_SMB}
+
+ {
+ * A bad mailslot server message block (SMB) was received. The SMB is the data.
+ }
+
+ NELOG_Wksta_UASInit = ERRLOG_BASE + 66;
+ {$EXTERNALSYM NELOG_Wksta_UASInit}
+
+ {
+ * The workstation encountered an error while trying to start the user accounts database.
+ * The error code is the data.
+ }
+
+ NELOG_Wksta_SSIRelogon = ERRLOG_BASE + 67;
+ {$EXTERNALSYM NELOG_Wksta_SSIRelogon}
+
+ {
+ * The workstation encountered an error while responding to an SSI revalidation request.
+ * The function code and the error codes are the data.
+ }
+
+//
+// Alerter service specific error log messages from 70 to 79
+//
+
+ NELOG_Build_Name = ERRLOG_BASE + 70;
+ {$EXTERNALSYM NELOG_Build_Name}
+
+ {
+ * The Alerter service had a problem creating the list of
+ * alert recipients. The error code is %1.
+ }
+
+ NELOG_Name_Expansion = ERRLOG_BASE + 71;
+ {$EXTERNALSYM NELOG_Name_Expansion}
+
+ {
+ * There was an error expanding %1 as a group name. Try
+ * splitting the group into two or more smaller groups.
+ }
+
+ NELOG_Message_Send = ERRLOG_BASE + 72;
+ {$EXTERNALSYM NELOG_Message_Send}
+
+ {
+ * There was an error sending %2 the alert message -
+ * (
+ * %3 )
+ * The error code is %1.
+ }
+
+ NELOG_Mail_Slt_Err = ERRLOG_BASE + 73;
+ {$EXTERNALSYM NELOG_Mail_Slt_Err}
+
+ {
+ * There was an error in creating or reading the alerter mailslot.
+ * The error code is %1.
+ }
+
+ NELOG_AT_cannot_read = ERRLOG_BASE + 74;
+ {$EXTERNALSYM NELOG_AT_cannot_read}
+
+ {
+ * The server could not read the AT schedule file.
+ }
+
+ NELOG_AT_sched_err = ERRLOG_BASE + 75;
+ {$EXTERNALSYM NELOG_AT_sched_err}
+
+ {
+ * The server found an invalid AT schedule record.
+ }
+
+ NELOG_AT_schedule_file_created = ERRLOG_BASE + 76;
+ {$EXTERNALSYM NELOG_AT_schedule_file_created}
+
+ {
+ * The server could not find an AT schedule file so it created one.
+ }
+
+ NELOG_Srvnet_NB_Open = ERRLOG_BASE + 77;
+ {$EXTERNALSYM NELOG_Srvnet_NB_Open}
+
+ {
+ * The server could not access the %1 network with NetBiosOpen.
+ }
+
+ NELOG_AT_Exec_Err = ERRLOG_BASE + 78;
+ {$EXTERNALSYM NELOG_AT_Exec_Err}
+
+ {
+ * The AT command processor could not run %1.
+ }
+
+//
+// Cache Lazy Write and HPFS386 specific error log messages from 80 to 89
+//
+
+ NELOG_Lazy_Write_Err = ERRLOG_BASE + 80;
+ {$EXTERNALSYM NELOG_Lazy_Write_Err}
+
+ {
+ * WARNING: Because of a lazy-write error, drive %1 now
+ * contains some corrupted data. The cache is stopped.
+ }
+
+ NELOG_HotFix = ERRLOG_BASE + 81;
+ {$EXTERNALSYM NELOG_HotFix}
+
+ {
+ * A defective sector on drive %1 has been replaced (hotfixed).
+ * No data was lost. You should run CHKDSK soon to restore full
+ * performance and replenish the volume's spare sector pool.
+ *
+ * The hotfix occurred while processing a remote request.
+ }
+
+ NELOG_HardErr_From_Server = ERRLOG_BASE + 82;
+ {$EXTERNALSYM NELOG_HardErr_From_Server}
+
+ {
+ * A disk error occurred on the HPFS volume in drive %1.
+ * The error occurred while processing a remote request.
+ }
+
+ NELOG_LocalSecFail1 = ERRLOG_BASE + 83;
+ {$EXTERNALSYM NELOG_LocalSecFail1}
+
+ {
+ * The user accounts database (NET.ACC) is corrupted. The local security
+ * system is replacing the corrupted NET.ACC with the backup
+ * made at %1.
+ * Any updates made to the database after this time are lost.
+ *
+ }
+
+ NELOG_LocalSecFail2 = ERRLOG_BASE + 84;
+ {$EXTERNALSYM NELOG_LocalSecFail2}
+
+ {
+ * The user accounts database (NET.ACC) is missing. The local
+ * security system is restoring the backup database
+ * made at %1.
+ * Any updates made to the database made after this time are lost.
+ *
+ }
+
+ NELOG_LocalSecFail3 = ERRLOG_BASE + 85;
+ {$EXTERNALSYM NELOG_LocalSecFail3}
+
+ {
+ * Local security could not be started because the user accounts database
+ * (NET.ACC) was missing or corrupted, and no usable backup
+ * database was present.
+ *
+ * THE SYSTEM IS NOT SECURE.
+ }
+
+ NELOG_LocalSecGeneralFail = ERRLOG_BASE + 86;
+ {$EXTERNALSYM NELOG_LocalSecGeneralFail}
+
+ {
+ * Local security could not be started because an error
+ * occurred during initialization. The error code returned is %1.
+ *
+ * THE SYSTEM IS NOT SECURE.
+ *
+ }
+
+//
+// NETWKSTA.SYS specific error log messages from 90 to 99
+//
+
+ NELOG_NetWkSta_Internal_Error = ERRLOG_BASE + 90;
+ {$EXTERNALSYM NELOG_NetWkSta_Internal_Error}
+
+ {
+ * A NetWksta internal error has occurred:
+ * %1
+ }
+
+ NELOG_NetWkSta_No_Resource = ERRLOG_BASE + 91;
+ {$EXTERNALSYM NELOG_NetWkSta_No_Resource}
+
+ {
+ * The redirector is out of a resource: %1.
+ }
+
+ NELOG_NetWkSta_SMB_Err = ERRLOG_BASE + 92;
+ {$EXTERNALSYM NELOG_NetWkSta_SMB_Err}
+
+ {
+ * A server message block (SMB) error occurred on the connection to %1.
+ * The SMB header is the data.
+ }
+
+ NELOG_NetWkSta_VC_Err = ERRLOG_BASE + 93;
+ {$EXTERNALSYM NELOG_NetWkSta_VC_Err}
+
+ {
+ * A virtual circuit error occurred on the session to %1.
+ * The network control block (NCB) command and return code is the data.
+ }
+
+ NELOG_NetWkSta_Stuck_VC_Err = ERRLOG_BASE + 94;
+ {$EXTERNALSYM NELOG_NetWkSta_Stuck_VC_Err}
+
+ {
+ * Hanging up a stuck session to %1.
+ }
+
+ NELOG_NetWkSta_NCB_Err = ERRLOG_BASE + 95;
+ {$EXTERNALSYM NELOG_NetWkSta_NCB_Err}
+
+ {
+ * A network control block (NCB) error occurred (%1).
+ * The NCB is the data.
+ }
+
+ NELOG_NetWkSta_Write_Behind_Err = ERRLOG_BASE + 96;
+ {$EXTERNALSYM NELOG_NetWkSta_Write_Behind_Err}
+
+ {
+ * A write operation to %1 failed.
+ * Data may have been lost.
+ }
+
+ NELOG_NetWkSta_Reset_Err = ERRLOG_BASE + 97;
+ {$EXTERNALSYM NELOG_NetWkSta_Reset_Err}
+
+ {
+ * Reset of driver %1 failed to complete the network control block (NCB).
+ * The NCB is the data.
+ }
+
+ NELOG_NetWkSta_Too_Many = ERRLOG_BASE + 98;
+ {$EXTERNALSYM NELOG_NetWkSta_Too_Many}
+
+ {
+ * The amount of resource %1 requested was more
+ * than the maximum. The maximum amount was allocated.
+ }
+
+//
+// Spooler specific error log messages from 100 to 103
+//
+
+ NELOG_Srv_Thread_Failure = ERRLOG_BASE + 104;
+ {$EXTERNALSYM NELOG_Srv_Thread_Failure}
+
+ {
+ * The server could not create a thread.
+ * The THREADS parameter in the CONFIG.SYS file should be increased.
+ }
+
+ NELOG_Srv_Close_Failure = ERRLOG_BASE + 105;
+ {$EXTERNALSYM NELOG_Srv_Close_Failure}
+
+ {
+ * The server could not close %1.
+ * The file is probably corrupted.
+ }
+
+ NELOG_ReplUserCurDir = ERRLOG_BASE + 106;
+ {$EXTERNALSYM NELOG_ReplUserCurDir}
+
+ {
+ *The replicator cannot update directory %1. It has tree integrity
+ * and is the current directory for some process.
+ }
+
+ NELOG_ReplCannotMasterDir = ERRLOG_BASE + 107;
+ {$EXTERNALSYM NELOG_ReplCannotMasterDir}
+
+ {
+ *The server cannot export directory %1 to client %2.
+ * It is exported from another server.
+ }
+
+ NELOG_ReplUpdateError = ERRLOG_BASE + 108;
+ {$EXTERNALSYM NELOG_ReplUpdateError}
+
+ {
+ *The replication server could not update directory %2 from the source
+ * on %3 due to error %1.
+ }
+
+ NELOG_ReplLostMaster = ERRLOG_BASE + 109;
+ {$EXTERNALSYM NELOG_ReplLostMaster}
+
+ {
+ *Master %1 did not send an update notice for directory %2 at the expected
+ * time.
+ }
+
+ NELOG_NetlogonAuthDCFail = ERRLOG_BASE + 110;
+ {$EXTERNALSYM NELOG_NetlogonAuthDCFail}
+
+ {
+ *This computer could not authenticate with %2, a Windows domain controller
+ * for domain %1, and therefore this computer might deny logon requests.
+ * This inability to authenticate might be caused by another computer on the
+ * same network using the same name or the password for this computer account
+ * is not recognized. If this message appears again, contact your system
+ * administrator.
+ }
+
+ NELOG_ReplLogonFailed = ERRLOG_BASE + 111;
+ {$EXTERNALSYM NELOG_ReplLogonFailed}
+
+ {
+ *The replicator attempted to log on at %2 as %1 and failed.
+ }
+
+ NELOG_ReplNetErr = ERRLOG_BASE + 112;
+ {$EXTERNALSYM NELOG_ReplNetErr}
+
+ {
+ * Network error %1 occurred.
+ }
+
+ NELOG_ReplMaxFiles = ERRLOG_BASE + 113;
+ {$EXTERNALSYM NELOG_ReplMaxFiles}
+
+ {
+ * Replicator limit for files in a directory has been exceeded.
+ }
+
+ NELOG_ReplMaxTreeDepth = ERRLOG_BASE + 114;
+ {$EXTERNALSYM NELOG_ReplMaxTreeDepth}
+
+ {
+ * Replicator limit for tree depth has been exceeded.
+ }
+
+ NELOG_ReplBadMsg = ERRLOG_BASE + 115;
+ {$EXTERNALSYM NELOG_ReplBadMsg}
+
+ {
+ * Unrecognized message received in mailslot.
+ }
+
+ NELOG_ReplSysErr = ERRLOG_BASE + 116;
+ {$EXTERNALSYM NELOG_ReplSysErr}
+
+ {
+ * System error %1 occurred.
+ }
+
+ NELOG_ReplUserLoged = ERRLOG_BASE + 117;
+ {$EXTERNALSYM NELOG_ReplUserLoged}
+
+ {
+ * Cannot log on. User is currently logged on and argument TRYUSER
+ * is set to NO.
+ }
+
+ NELOG_ReplBadImport = ERRLOG_BASE + 118;
+ {$EXTERNALSYM NELOG_ReplBadImport}
+
+ {
+ * IMPORT path %1 cannot be found.
+ }
+
+ NELOG_ReplBadExport = ERRLOG_BASE + 119;
+ {$EXTERNALSYM NELOG_ReplBadExport}
+
+ {
+ * EXPORT path %1 cannot be found.
+ }
+
+ NELOG_ReplSignalFileErr = ERRLOG_BASE + 120;
+ {$EXTERNALSYM NELOG_ReplSignalFileErr}
+
+ {
+ * Replicator failed to update signal file in directory %2 due to
+ * %1 system error.
+ }
+
+ NELOG_DiskFT = (ERRLOG_BASE+121);
+ {$EXTERNALSYM NELOG_DiskFT}
+
+ {
+ * Disk Fault Tolerance Error
+ *
+ * %1
+ }
+
+ NELOG_ReplAccessDenied = ERRLOG_BASE + 122;
+ {$EXTERNALSYM NELOG_ReplAccessDenied}
+
+ {
+ * Replicator could not access %2
+ * on %3 due to system error %1.
+ }
+
+ NELOG_NetlogonFailedPrimary = ERRLOG_BASE + 123;
+ {$EXTERNALSYM NELOG_NetlogonFailedPrimary}
+
+ {
+ *The primary domain controller for domain %1 has apparently failed.
+ }
+
+ NELOG_NetlogonPasswdSetFailed = ERRLOG_BASE + 124;
+ {$EXTERNALSYM NELOG_NetlogonPasswdSetFailed}
+
+ {
+ * Changing machine account password for account %1 failed with
+ * the following error: %n%2
+ }
+
+ NELOG_NetlogonTrackingError = ERRLOG_BASE + 125;
+ {$EXTERNALSYM NELOG_NetlogonTrackingError}
+
+ {
+ *An error occurred while updating the logon or logoff information for %1.
+ }
+
+ NELOG_NetlogonSyncError = ERRLOG_BASE + 126;
+ {$EXTERNALSYM NELOG_NetlogonSyncError}
+
+ {
+ *An error occurred while synchronizing with primary domain controller %1
+ }
+
+ NELOG_NetlogonRequireSignOrSealError = ERRLOG_BASE + 127;
+ {$EXTERNALSYM NELOG_NetlogonRequireSignOrSealError}
+
+ {
+ * The session setup to the Windows NT or Windows 2000 Domain Controller %1 for the domain %2
+ * failed because %1 does not support signing or sealing the Netlogon
+ * session.
+ *
+ * Either upgrade the Domain controller or set the RequireSignOrSeal
+ * registry entry on this machine to 0.
+ }
+
+//
+// UPS service specific error log messages from 130 to 135
+//
+
+ NELOG_UPS_PowerOut = ERRLOG_BASE + 130;
+ {$EXTERNALSYM NELOG_UPS_PowerOut}
+
+ {
+ * A power failure was detected at the server.
+ }
+
+ NELOG_UPS_Shutdown = ERRLOG_BASE + 131;
+ {$EXTERNALSYM NELOG_UPS_Shutdown}
+
+ {
+ * The UPS service performed server shut down.
+ }
+
+ NELOG_UPS_CmdFileError = ERRLOG_BASE + 132;
+ {$EXTERNALSYM NELOG_UPS_CmdFileError}
+
+ {
+ * The UPS service did not complete execution of the
+ * user specified shut down command file.
+ }
+
+ NELOG_UPS_CannotOpenDriver = (ERRLOG_BASE+133);
+ {$EXTERNALSYM NELOG_UPS_CannotOpenDriver}
+
+ {
+ * The UPS driver could not be opened. The error code is
+ * the data.
+ }
+
+ NELOG_UPS_PowerBack = ERRLOG_BASE + 134;
+ {$EXTERNALSYM NELOG_UPS_PowerBack}
+
+ {
+ * Power has been restored.
+ }
+
+ NELOG_UPS_CmdFileConfig = ERRLOG_BASE + 135;
+ {$EXTERNALSYM NELOG_UPS_CmdFileConfig}
+
+ {
+ * There is a problem with a configuration of user specified
+ * shut down command file.
+ }
+
+ NELOG_UPS_CmdFileExec = ERRLOG_BASE + 136;
+ {$EXTERNALSYM NELOG_UPS_CmdFileExec}
+
+ {
+ * The UPS service failed to execute a user specified shutdown
+ * command file %1. The error code is the data.
+ }
+
+//
+// Remoteboot server specific error log messages are from 150 to 157
+//
+
+ NELOG_Missing_Parameter = ERRLOG_BASE + 150;
+ {$EXTERNALSYM NELOG_Missing_Parameter}
+
+ {
+ * Initialization failed because of an invalid or missing
+ * parameter in the configuration file %1.
+ }
+
+ NELOG_Invalid_Config_Line = ERRLOG_BASE + 151;
+ {$EXTERNALSYM NELOG_Invalid_Config_Line}
+
+ {
+ * Initialization failed because of an invalid line in the
+ * configuration file %1. The invalid line is the data.
+ }
+
+ NELOG_Invalid_Config_File = ERRLOG_BASE + 152;
+ {$EXTERNALSYM NELOG_Invalid_Config_File}
+
+ {
+ * Initialization failed because of an error in the configuration
+ * file %1.
+ }
+
+ NELOG_File_Changed = ERRLOG_BASE + 153;
+ {$EXTERNALSYM NELOG_File_Changed}
+
+ {
+ * The file %1 has been changed after initialization.
+ * The boot-block loading was temporarily terminated.
+ }
+
+ NELOG_Files_Dont_Fit = ERRLOG_BASE + 154;
+ {$EXTERNALSYM NELOG_Files_Dont_Fit}
+
+ {
+ * The files do not fit to the boot-block configuration
+ * file %1. Change the BASE and ORG definitions or the order
+ * of the files.
+ }
+
+ NELOG_Wrong_DLL_Version = ERRLOG_BASE + 155;
+ {$EXTERNALSYM NELOG_Wrong_DLL_Version}
+
+ {
+ * Initialization failed because the dynamic-link
+ * library %1 returned an incorrect version number.
+ }
+
+ NELOG_Error_in_DLL = ERRLOG_BASE + 156;
+ {$EXTERNALSYM NELOG_Error_in_DLL}
+
+ {
+ * There was an unrecoverable error in the dynamic-
+ * link library of the service.
+ }
+
+ NELOG_System_Error = ERRLOG_BASE + 157;
+ {$EXTERNALSYM NELOG_System_Error}
+
+ {
+ * The system returned an unexpected error code.
+ * The error code is the data.
+ }
+
+ NELOG_FT_ErrLog_Too_Large = ERRLOG_BASE + 158;
+ {$EXTERNALSYM NELOG_FT_ErrLog_Too_Large}
+
+ {
+ * The fault-tolerance error log file, LANROOT\LOGS\FT.LOG,
+ * is more than 64K.
+ }
+
+ NELOG_FT_Update_In_Progress = ERRLOG_BASE + 159;
+ {$EXTERNALSYM NELOG_FT_Update_In_Progress}
+
+ {
+ * The fault-tolerance error-log file, LANROOT\LOGS\FT.LOG, had the
+ * update in progress bit set upon opening, which means that the
+ * system crashed while working on the error log.
+ }
+
+ NELOG_Joined_Domain = ERRLOG_BASE + 160;
+ {$EXTERNALSYM NELOG_Joined_Domain}
+
+ {
+ * This computer has been successfully joined to %1 '%2'.
+ }
+
+ NELOG_Joined_Workgroup = ERRLOG_BASE + 161;
+ {$EXTERNALSYM NELOG_Joined_Workgroup}
+
+ (*
+ * This computer has been successfully joined to workgroup '%1'.
+ *)
+
+//
+// Microsoft has created a generic error log entry for OEMs to use to
+// log errors from OEM value added services. The code, which is the
+// 2nd arg to NetErrorLogWrite, is 3299. This value is manifest in
+// NET/H/ERRLOG.H as NELOG_OEM_Code. The text for error log entry
+// NELOG_OEM_Code is: "%1 %2 %3 %4 %5 %6 %7 %8 %9.".
+//
+// Microsoft suggests that OEMs use the insertion strings as follows:
+// %1: OEM System Name (e.g. 3+Open)
+// %2: OEM Service Name (e.g. 3+Mail)
+// %3: Severity level (e.g. error, warning, etc.)
+// %4: OEM error log entry sub-identifier (e.g. error code #)
+// %5 - % 9: Text.
+//
+// The call to NetErrorWrite must set nstrings = 9, and provide 9
+// ASCIIZ strings. If the caller does not have 9 insertion strings,
+// provide null strings for the empty insertion strings.
+//
+
+ NELOG_OEM_Code = ERRLOG_BASE + 199;
+ {$EXTERNALSYM NELOG_OEM_Code}
+
+ {
+ * %1 %2 %3 %4 %5 %6 %7 %8 %9.
+ }
+
+//
+// another error log range defined for NT Lanman.
+//
+
+ ERRLOG2_BASE = 5700 { New NT NELOG errors start here };
+ {$EXTERNALSYM ERRLOG2_BASE}
+
+ NELOG_NetlogonSSIInitError = ERRLOG2_BASE + 0;
+ {$EXTERNALSYM NELOG_NetlogonSSIInitError}
+
+ {
+ * The Netlogon service could not initialize the replication data
+ * structures successfully. The service was terminated. The following
+ * error occurred: %n%1
+ }
+
+ NELOG_NetlogonFailedToUpdateTrustList = ERRLOG2_BASE + 1;
+ {$EXTERNALSYM NELOG_NetlogonFailedToUpdateTrustList}
+
+ {
+ * The Netlogon service failed to update the domain trust list. The
+ * following error occurred: %n%1
+ }
+
+ NELOG_NetlogonFailedToAddRpcInterface = ERRLOG2_BASE + 2;
+ {$EXTERNALSYM NELOG_NetlogonFailedToAddRpcInterface}
+
+ {
+ * The Netlogon service could not add the RPC interface. The
+ * service was terminated. The following error occurred: %n%1
+ }
+
+ NELOG_NetlogonFailedToReadMailslot = ERRLOG2_BASE + 3;
+ {$EXTERNALSYM NELOG_NetlogonFailedToReadMailslot}
+
+ {
+ * The Netlogon service could not read a mailslot message from %1 due
+ * to the following error: %n%2
+ }
+
+ NELOG_NetlogonFailedToRegisterSC = ERRLOG2_BASE + 4;
+ {$EXTERNALSYM NELOG_NetlogonFailedToRegisterSC}
+
+ (*
+ * The Netlogon service failed to register the service with the
+ * service controller. The service was terminated. The following
+ * error occurred: %n%1
+ *)
+
+ NELOG_NetlogonChangeLogCorrupt = ERRLOG2_BASE + 5;
+ {$EXTERNALSYM NELOG_NetlogonChangeLogCorrupt}
+
+ {
+ * The change log cache maintained by the Netlogon service for %1
+ * database changes is inconsistent. The Netlogon service is resetting
+ * the change log.
+ }
+
+ NELOG_NetlogonFailedToCreateShare = ERRLOG2_BASE + 6;
+ {$EXTERNALSYM NELOG_NetlogonFailedToCreateShare}
+
+ {
+ * The Netlogon service could not create server share %1. The following
+ * error occurred: %n%2
+ }
+
+ NELOG_NetlogonDownLevelLogonFailed = ERRLOG2_BASE + 7;
+ {$EXTERNALSYM NELOG_NetlogonDownLevelLogonFailed}
+
+ {
+ * The down-level logon request for the user %1 from %2 failed.
+ }
+
+ NELOG_NetlogonDownLevelLogoffFailed = ERRLOG2_BASE + 8;
+ {$EXTERNALSYM NELOG_NetlogonDownLevelLogoffFailed}
+
+ {
+ * The down-level logoff request for the user %1 from %2 failed.
+ }
+
+ NELOG_NetlogonNTLogonFailed = ERRLOG2_BASE + 9;
+ {$EXTERNALSYM NELOG_NetlogonNTLogonFailed}
+
+ {
+ * The Windows NT or Windows 2000 %1 logon request for the user %2\%3 from %4 (via %5)
+ * failed.
+ }
+
+ NELOG_NetlogonNTLogoffFailed = ERRLOG2_BASE + 10;
+ {$EXTERNALSYM NELOG_NetlogonNTLogoffFailed}
+
+ {
+ * The Windows NT or Windows 2000 %1 logoff request for the user %2\%3 from %4
+ * failed.
+ }
+
+ NELOG_NetlogonPartialSyncCallSuccess = ERRLOG2_BASE + 11;
+ {$EXTERNALSYM NELOG_NetlogonPartialSyncCallSuccess}
+
+ {
+ * The partial synchronization request from the server %1 completed
+ * successfully. %2 changes(s) has(have) been returned to the
+ * caller.
+ }
+
+ NELOG_NetlogonPartialSyncCallFailed = ERRLOG2_BASE + 12;
+ {$EXTERNALSYM NELOG_NetlogonPartialSyncCallFailed}
+
+ {
+ * The partial synchronization request from the server %1 failed with
+ * the following error: %n%2
+ }
+
+ NELOG_NetlogonFullSyncCallSuccess = ERRLOG2_BASE + 13;
+ {$EXTERNALSYM NELOG_NetlogonFullSyncCallSuccess}
+
+ {
+ * The full synchronization request from the server %1 completed
+ * successfully. %2 object(s) has(have) been returned to
+ * the caller.
+ }
+
+ NELOG_NetlogonFullSyncCallFailed = ERRLOG2_BASE + 14;
+ {$EXTERNALSYM NELOG_NetlogonFullSyncCallFailed}
+
+ {
+ * The full synchronization request from the server %1 failed with
+ * the following error: %n%2
+ }
+
+ NELOG_NetlogonPartialSyncSuccess = ERRLOG2_BASE + 15;
+ {$EXTERNALSYM NELOG_NetlogonPartialSyncSuccess}
+
+ {
+ * The partial synchronization replication of the %1 database from the
+ * primary domain controller %2 completed successfully. %3 change(s) is(are)
+ * applied to the database.
+ }
+
+ NELOG_NetlogonPartialSyncFailed = ERRLOG2_BASE + 16;
+ {$EXTERNALSYM NELOG_NetlogonPartialSyncFailed}
+
+ {
+ * The partial synchronization replication of the %1 database from the
+ * primary domain controller %2 failed with the following error: %n%3
+ }
+
+ NELOG_NetlogonFullSyncSuccess = ERRLOG2_BASE + 17;
+ {$EXTERNALSYM NELOG_NetlogonFullSyncSuccess}
+
+ {
+ * The full synchronization replication of the %1 database from the
+ * primary domain controller %2 completed successfully.
+ }
+
+ NELOG_NetlogonFullSyncFailed = ERRLOG2_BASE + 18;
+ {$EXTERNALSYM NELOG_NetlogonFullSyncFailed}
+
+ {
+ * The full synchronization replication of the %1 database from the
+ * primary domain controller %2 failed with the following error: %n%3
+ }
+
+ NELOG_NetlogonAuthNoDomainController = ERRLOG2_BASE + 19;
+ {$EXTERNALSYM NELOG_NetlogonAuthNoDomainController}
+
+ {
+ * This computer was not able to set up a secure session with a domain
+ * controller in domain %1 due to the following: %n%2
+ * %nThis may lead to authentication problems. Make sure that this
+ * computer is connected to the network. If the problem persists,
+ * please contact your domain administrator.
+ *
+ * %n%nADDITIONAL INFO
+ * %nIf this computer is a domain controller for the specified domain, it
+ * sets up the secure session to the primary domain controller emulator in the specified
+ * domain. Otherwise, this computer sets up the secure session to any domain controller
+ * in the specified domain.
+ }
+
+ NELOG_NetlogonAuthNoTrustLsaSecret = ERRLOG2_BASE + 20;
+ {$EXTERNALSYM NELOG_NetlogonAuthNoTrustLsaSecret}
+
+ {
+ * The session setup to the Windows NT or Windows 2000 Domain Controller %1 for the domain %2
+ * failed because the computer %3 does not have a local security database account.
+ }
+
+ NELOG_NetlogonAuthNoTrustSamAccount = ERRLOG2_BASE + 21;
+ {$EXTERNALSYM NELOG_NetlogonAuthNoTrustSamAccount}
+
+ {
+ * The session setup to the Windows NT or Windows 2000 Domain Controller %1 for the domain %2
+ * failed because the Domain Controller did not have an account %4
+ * needed to set up the session by this computer %3.
+ *
+ * %n%nADDITIONAL DATA
+ * %nIf this computer is a member of or a Domain Controller in the specified domain, the
+ * aforementioned account is a computer account for this computer in the specified domain.
+ * Otherwise, the account is an interdomain trust account with the specified domain.
+ }
+
+ NELOG_NetlogonServerAuthFailed = ERRLOG2_BASE + 22;
+ {$EXTERNALSYM NELOG_NetlogonServerAuthFailed}
+
+ {
+ * The session setup from the computer %1 failed to authenticate.
+ * The name(s) of the account(s) referenced in the security database is
+ * %2. The following error occurred: %n%3
+ }
+
+ NELOG_NetlogonServerAuthNoTrustSamAccount = ERRLOG2_BASE + 23;
+ {$EXTERNALSYM NELOG_NetlogonServerAuthNoTrustSamAccount}
+
+ {
+ * The session setup from computer '%1' failed because the security database
+ * does not contain a trust account '%2' referenced by the specified computer.
+ *
+ * %n%nUSER ACTION
+ *
+ * %nIf this is the first occurrence of this event for the specified computer
+ * and account, this may be a transient issue that doesn't require any action
+ * at this time. Otherwise, the following steps may be taken to resolve this problem:
+ *
+ * %n%nIf '%2' is a legitimate machine account for the computer '%1', then '%1'
+ * should be rejoined to the domain.
+ *
+ * %n%nIf '%2' is a legitimate interdomain trust account, then the trust should
+ * be recreated.
+ *
+ * %n%nOtherwise, assuming that '%2' is not a legitimate account, the following
+ * action should be taken on '%1':
+ *
+ * %n%nIf '%1' is a Domain Controller, then the trust associated with '%2' should be deleted.
+ *
+ * %n%nIf '%1' is not a Domain Controller, it should be disjoined from the domain.
+ }
+
+//
+// General log messages for NT services.
+//
+
+ NELOG_FailedToRegisterSC = ERRLOG2_BASE + 24;
+ {$EXTERNALSYM NELOG_FailedToRegisterSC}
+
+ {
+ * Could not register control handler with service controller %1.
+ }
+
+ NELOG_FailedToSetServiceStatus = ERRLOG2_BASE + 25;
+ {$EXTERNALSYM NELOG_FailedToSetServiceStatus}
+
+ {
+ * Could not set service status with service controller %1.
+ }
+
+ NELOG_FailedToGetComputerName = ERRLOG2_BASE + 26;
+ {$EXTERNALSYM NELOG_FailedToGetComputerName}
+
+ {
+ * Could not find the computer name %1.
+ }
+
+ NELOG_DriverNotLoaded = ERRLOG2_BASE + 27;
+ {$EXTERNALSYM NELOG_DriverNotLoaded}
+
+ {
+ * Could not load %1 device driver.
+ }
+
+ NELOG_NoTranportLoaded = ERRLOG2_BASE + 28;
+ {$EXTERNALSYM NELOG_NoTranportLoaded}
+
+ {
+ * Could not load any transport.
+ }
+
+//
+// More Netlogon service events
+//
+
+ NELOG_NetlogonFailedDomainDelta = ERRLOG2_BASE + 29;
+ {$EXTERNALSYM NELOG_NetlogonFailedDomainDelta}
+
+ {
+ * Replication of the %1 Domain Object "%2" from primary domain controller
+ * %3 failed with the following error: %n%4
+ }
+
+ NELOG_NetlogonFailedGlobalGroupDelta = ERRLOG2_BASE + 30;
+ {$EXTERNALSYM NELOG_NetlogonFailedGlobalGroupDelta}
+
+ {
+ * Replication of the %1 Global Group "%2" from primary domain controller
+ * %3 failed with the following error: %n%4
+ }
+
+ NELOG_NetlogonFailedLocalGroupDelta = ERRLOG2_BASE + 31;
+ {$EXTERNALSYM NELOG_NetlogonFailedLocalGroupDelta}
+
+ {
+ * Replication of the %1 Local Group "%2" from primary domain controller
+ * %3 failed with the following error: %n%4
+ }
+
+ NELOG_NetlogonFailedUserDelta = ERRLOG2_BASE + 32;
+ {$EXTERNALSYM NELOG_NetlogonFailedUserDelta}
+
+ {
+ * Replication of the %1 User "%2" from primary domain controller
+ * %3 failed with the following error: %n%4
+ }
+
+ NELOG_NetlogonFailedPolicyDelta = ERRLOG2_BASE + 33;
+ {$EXTERNALSYM NELOG_NetlogonFailedPolicyDelta}
+
+ {
+ * Replication of the %1 Policy Object "%2" from primary domain controller
+ * %3 failed with the following error: %n%4
+ }
+
+ NELOG_NetlogonFailedTrustedDomainDelta = ERRLOG2_BASE + 34;
+ {$EXTERNALSYM NELOG_NetlogonFailedTrustedDomainDelta}
+
+ {
+ * Replication of the %1 Trusted Domain Object "%2" from primary domain controller
+ * %3 failed with the following error: %n%4
+ }
+
+ NELOG_NetlogonFailedAccountDelta = ERRLOG2_BASE + 35;
+ {$EXTERNALSYM NELOG_NetlogonFailedAccountDelta}
+
+ {
+ * Replication of the %1 Account Object "%2" from primary domain controller
+ * %3 failed with the following error: %n%4
+ }
+
+ NELOG_NetlogonFailedSecretDelta = ERRLOG2_BASE + 36;
+ {$EXTERNALSYM NELOG_NetlogonFailedSecretDelta}
+
+ {
+ * Replication of the %1 Secret "%2" from primary domain controller
+ * %3 failed with the following error: %n%4
+ }
+
+ NELOG_NetlogonSystemError = ERRLOG2_BASE + 37;
+ {$EXTERNALSYM NELOG_NetlogonSystemError}
+
+ {
+ * The system returned the following unexpected error code: %n%1
+ }
+
+ NELOG_NetlogonDuplicateMachineAccounts = ERRLOG2_BASE + 38;
+ {$EXTERNALSYM NELOG_NetlogonDuplicateMachineAccounts}
+
+ {
+ * Netlogon has detected two machine accounts for server "%1".
+ * The server can be either a Windows 2000 Server that is a member of the
+ * domain or the server can be a LAN Manager server with an account in the
+ * SERVERS global group. It cannot be both.
+ }
+
+ NELOG_NetlogonTooManyGlobalGroups = ERRLOG2_BASE + 39;
+ {$EXTERNALSYM NELOG_NetlogonTooManyGlobalGroups}
+
+ {
+ * This domain has more global groups than can be replicated to a LanMan
+ * BDC. Either delete some of your global groups or remove the LanMan
+ * BDCs from the domain.
+ }
+
+ NELOG_NetlogonBrowserDriver = ERRLOG2_BASE + 40;
+ {$EXTERNALSYM NELOG_NetlogonBrowserDriver}
+
+ {
+ * The Browser driver returned the following error to Netlogon: %n%1
+ }
+
+ NELOG_NetlogonAddNameFailure = ERRLOG2_BASE + 41;
+ {$EXTERNALSYM NELOG_NetlogonAddNameFailure}
+
+ {
+ * Netlogon could not register the %1<1B> name for the following reason: %n%2
+ }
+
+//
+// More Remoteboot service events.
+//
+ NELOG_RplMessages = ERRLOG2_BASE + 42;
+ {$EXTERNALSYM NELOG_RplMessages}
+
+ {
+ * Service failed to retrieve messages needed to boot remote boot clients.
+ }
+
+ NELOG_RplXnsBoot = ERRLOG2_BASE + 43;
+ {$EXTERNALSYM NELOG_RplXnsBoot}
+
+ {
+ * Service experienced a severe error and can no longer provide remote boot
+ * for 3Com 3Start remote boot clients.
+ }
+
+ NELOG_RplSystem = ERRLOG2_BASE + 44;
+ {$EXTERNALSYM NELOG_RplSystem}
+
+ {
+ * Service experienced a severe system error and will shut itself down.
+ }
+
+ NELOG_RplWkstaTimeout = ERRLOG2_BASE + 45;
+ {$EXTERNALSYM NELOG_RplWkstaTimeout}
+
+ {
+ * Client with computer name %1 failed to acknowledge receipt of the
+ * boot data. Remote boot of this client was not completed.
+ }
+
+ NELOG_RplWkstaFileOpen = ERRLOG2_BASE + 46;
+ {$EXTERNALSYM NELOG_RplWkstaFileOpen}
+
+ {
+ * Client with computer name %1 was not booted due to an error in opening
+ * file %2.
+ }
+
+ NELOG_RplWkstaFileRead = ERRLOG2_BASE + 47;
+ {$EXTERNALSYM NELOG_RplWkstaFileRead}
+
+ {
+ * Client with computer name %1 was not booted due to an error in reading
+ * file %2.
+ }
+
+ NELOG_RplWkstaMemory = ERRLOG2_BASE + 48;
+ {$EXTERNALSYM NELOG_RplWkstaMemory}
+
+ {
+ * Client with computer name %1 was not booted due to insufficient memory
+ * at the remote boot server.
+ }
+
+ NELOG_RplWkstaFileChecksum = ERRLOG2_BASE + 49;
+ {$EXTERNALSYM NELOG_RplWkstaFileChecksum}
+
+ {
+ * Client with computer name %1 will be booted without using checksums
+ * because checksum for file %2 could not be calculated.
+ }
+
+ NELOG_RplWkstaFileLineCount = ERRLOG2_BASE + 50;
+ {$EXTERNALSYM NELOG_RplWkstaFileLineCount}
+
+ {
+ * Client with computer name %1 was not booted due to too many lines in
+ * file %2.
+ }
+
+ NELOG_RplWkstaBbcFile = ERRLOG2_BASE + 51;
+ {$EXTERNALSYM NELOG_RplWkstaBbcFile}
+
+ {
+ * Client with computer name %1 was not booted because the boot block
+ * configuration file %2 for this client does not contain boot block
+ * line and/or loader line.
+ }
+
+ NELOG_RplWkstaFileSize = ERRLOG2_BASE + 52;
+ {$EXTERNALSYM NELOG_RplWkstaFileSize}
+
+ {
+ * Client with computer name %1 was not booted due to a bad size of
+ * file %2.
+ }
+
+ NELOG_RplWkstaInternal = ERRLOG2_BASE + 53;
+ {$EXTERNALSYM NELOG_RplWkstaInternal}
+
+ {
+ * Client with computer name %1 was not booted due to remote boot
+ * service internal error.
+ }
+
+ NELOG_RplWkstaWrongVersion = ERRLOG2_BASE + 54;
+ {$EXTERNALSYM NELOG_RplWkstaWrongVersion}
+
+ {
+ * Client with computer name %1 was not booted because file %2 has an
+ * invalid boot header.
+ }
+
+ NELOG_RplWkstaNetwork = ERRLOG2_BASE + 55;
+ {$EXTERNALSYM NELOG_RplWkstaNetwork}
+
+ {
+ * Client with computer name %1 was not booted due to network error.
+ }
+
+ NELOG_RplAdapterResource = ERRLOG2_BASE + 56;
+ {$EXTERNALSYM NELOG_RplAdapterResource}
+
+ {
+ * Client with adapter id %1 was not booted due to lack of resources.
+ }
+
+ NELOG_RplFileCopy = ERRLOG2_BASE + 57;
+ {$EXTERNALSYM NELOG_RplFileCopy}
+
+ {
+ * Service experienced error copying file or directory %1.
+ }
+
+ NELOG_RplFileDelete = ERRLOG2_BASE + 58;
+ {$EXTERNALSYM NELOG_RplFileDelete}
+
+ {
+ * Service experienced error deleting file or directory %1.
+ }
+
+ NELOG_RplFilePerms = ERRLOG2_BASE + 59;
+ {$EXTERNALSYM NELOG_RplFilePerms}
+
+ {
+ * Service experienced error setting permissions on file or directory %1.
+ }
+ NELOG_RplCheckConfigs = ERRLOG2_BASE + 60;
+ {$EXTERNALSYM NELOG_RplCheckConfigs}
+
+ {
+ * Service experienced error evaluating RPL configurations.
+ }
+ NELOG_RplCreateProfiles = ERRLOG2_BASE + 61;
+ {$EXTERNALSYM NELOG_RplCreateProfiles}
+
+ {
+ * Service experienced error creating RPL profiles for all configurations.
+ }
+ NELOG_RplRegistry = ERRLOG2_BASE + 62;
+ {$EXTERNALSYM NELOG_RplRegistry}
+
+ {
+ * Service experienced error accessing registry.
+ }
+ NELOG_RplReplaceRPLDISK = ERRLOG2_BASE + 63;
+ {$EXTERNALSYM NELOG_RplReplaceRPLDISK}
+
+ {
+ * Service experienced error replacing possibly outdated RPLDISK.SYS.
+ }
+ NELOG_RplCheckSecurity = ERRLOG2_BASE + 64;
+ {$EXTERNALSYM NELOG_RplCheckSecurity}
+
+ {
+ * Service experienced error adding security accounts or setting
+ * file permissions. These accounts are the RPLUSER local group
+ * and the user accounts for the individual RPL workstations.
+ }
+ NELOG_RplBackupDatabase = ERRLOG2_BASE + 65;
+ {$EXTERNALSYM NELOG_RplBackupDatabase}
+
+ {
+ * Service failed to back up its database.
+ }
+ NELOG_RplInitDatabase = ERRLOG2_BASE + 66;
+ {$EXTERNALSYM NELOG_RplInitDatabase}
+
+ {
+ * Service failed to initialize from its database. The database may be
+ * missing or corrupted. Service will attempt restoring the database
+ * from the backup.
+ }
+ NELOG_RplRestoreDatabaseFailure = ERRLOG2_BASE + 67;
+ {$EXTERNALSYM NELOG_RplRestoreDatabaseFailure}
+
+ {
+ * Service failed to restore its database from the backup. Service
+ * will not start.
+ }
+ NELOG_RplRestoreDatabaseSuccess = ERRLOG2_BASE + 68;
+ {$EXTERNALSYM NELOG_RplRestoreDatabaseSuccess}
+
+ {
+ * Service successfully restored its database from the backup.
+ }
+ NELOG_RplInitRestoredDatabase = ERRLOG2_BASE + 69;
+ {$EXTERNALSYM NELOG_RplInitRestoredDatabase}
+
+ {
+ * Service failed to initialize from its restored database. Service
+ * will not start.
+ }
+
+//
+// More Netlogon and RPL service events
+//
+ NELOG_NetlogonSessionTypeWrong = ERRLOG2_BASE + 70;
+ {$EXTERNALSYM NELOG_NetlogonSessionTypeWrong}
+
+ {
+ * The session setup to the Windows NT or Windows 2000 Domain Controller %1 from computer
+ * %2 using account %4 failed. %2 is declared to be a BDC in domain %3.
+ * However, %2 tried to connect as either a DC in a trusted domain,
+ * a member workstation in domain %3, or as a server in domain %3.
+ * Use the Active Directory Users and Computers tool or Server Manager to remove the BDC account for %2.
+ }
+ NELOG_RplUpgradeDBTo40 = ERRLOG2_BASE + 71;
+ {$EXTERNALSYM NELOG_RplUpgradeDBTo40}
+
+ {
+ * The Remoteboot database was in NT 3.5 / NT 3.51 format and NT is
+ * attempting to convert it to NT 4.0 format. The JETCONV converter
+ * will write to the Application event log when it is finished.
+ }
+ NELOG_NetlogonLanmanBdcsNotAllowed = ERRLOG2_BASE + 72;
+ {$EXTERNALSYM NELOG_NetlogonLanmanBdcsNotAllowed}
+
+ {
+ * Global group SERVERS exists in domain %1 and has members.
+ * This group defines Lan Manager BDCs in the domain.
+ * Lan Manager BDCs are not permitted in NT domains.
+ }
+ NELOG_NetlogonNoDynamicDns = ERRLOG2_BASE + 73;
+ {$EXTERNALSYM NELOG_NetlogonNoDynamicDns}
+
+ {
+ * The following DNS server that is authoritative for the DNS domain controller
+ * locator records of this domain controller does not support dynamic DNS updates:
+ *
+ * %n%nDNS server IP address: %1
+ * %nReturned Response Code (RCODE): %2
+ * %nReturned Status Code: %3
+ *
+ * %n%nUSER ACTION
+ *
+ * %nConfigure the DNS server to allow dynamic DNS updates or manually add the DNS
+ * records from the file '%SystemRoot%\System32\Config\Netlogon.dns' to the DNS database.
+ }
+
+ NELOG_NetlogonDynamicDnsRegisterFailure = ERRLOG2_BASE + 74;
+ {$EXTERNALSYM NELOG_NetlogonDynamicDnsRegisterFailure}
+
+ {
+ *
+ * The dynamic registration of the DNS record '%1' failed on the following DNS server:
+ *
+ * %n%nDNS server IP address: %3
+ * %nReturned Response Code (RCODE): %4
+ * %nReturned Status Code: %5
+ *
+ * %n%nFor computers and users to locate this domain controller, this record must be
+ * registered in DNS.
+ *
+ * %n%nUSER ACTION
+ *
+ * %nDetermine what might have caused this failure, resolve the problem, and initiate
+ * registration of the DNS records by the domain controller. To determine what might
+ * have caused this failure, run DCDiag.exe. You can find this program on the Windows
+ * Server 2003 installation CD in Support\Tools\support.cab. To learn more about
+ * DCDiag.exe, see Help and Support Center. To initiate registration of the DNS records by
+ * this domain controller, run 'nltest.exe /dsregdns' from the command prompt on the domain
+ * controller or restart Net Logon service. Nltest.exe is available in the Microsoft Windows
+ * Server Resource Kit CD. %n Or, you can manually add this record to DNS, but it is not
+ * recommended.
+ *
+ * %n%nADDITIONAL DATA
+ * %nError Value: %2
+ *
+ }
+
+ NELOG_NetlogonDynamicDnsDeregisterFailure = ERRLOG2_BASE + 75;
+ {$EXTERNALSYM NELOG_NetlogonDynamicDnsDeregisterFailure}
+
+ {
+ * The dynamic deletion of the DNS record '%1' failed on the following DNS server:
+ *
+ * %n%nDNS server IP address: %3
+ * %nReturned Response Code (RCODE): %4
+ * %nReturned Status Code: %5
+ *
+ * %n%nUSER ACTION
+ *
+ * %nTo prevent remote computers from connecting unnecessarily to the domain controller,
+ * delete the record manually or troubleshoot the failure to dynamically delete the
+ * record. To learn more about debugging DNS, see Help and Support Center.
+ *
+ * %n%nADDITIONAL DATA
+ * %nError Value: %2
+ }
+
+ NELOG_NetlogonFailedFileCreate = ERRLOG2_BASE + 76;
+ {$EXTERNALSYM NELOG_NetlogonFailedFileCreate}
+
+ {
+ * Failed to create/open file %1 with the following error: %n%2
+ }
+
+ NELOG_NetlogonGetSubnetToSite = ERRLOG2_BASE + 77;
+ {$EXTERNALSYM NELOG_NetlogonGetSubnetToSite}
+
+ {
+ * Netlogon got the following error while trying to get the subnet to site
+ * mapping information from the DS: %n%1
+ }
+
+ NELOG_NetlogonNoSiteForClient = ERRLOG2_BASE + 78;
+ {$EXTERNALSYM NELOG_NetlogonNoSiteForClient}
+
+ {
+ * '%1' tried to determine its site by looking up its IP address ('%2')
+ * in the Configuration\Sites\Subnets container in the DS. No subnet matched
+ * the IP address. Consider adding a subnet object for this IP address.
+ }
+
+ NELOG_NetlogonBadSiteName = ERRLOG2_BASE + 79;
+ {$EXTERNALSYM NELOG_NetlogonBadSiteName}
+
+ {
+ * The site name for this computer is '%1'. That site name is not a valid
+ * site name. A site name must be a valid DNS label.
+ * Rename the site to be a valid name.
+ }
+
+ NELOG_NetlogonBadSubnetName = ERRLOG2_BASE + 80;
+ {$EXTERNALSYM NELOG_NetlogonBadSubnetName}
+
+ {
+ * The subnet object '%1' appears in the Configuration\Sites\Subnets
+ * container in the DS. The name is not syntactically valid. The valid
+ * syntax is xx.xx.xx.xx/yy where xx.xx.xx.xx is a valid IP subnet number
+ * and yy is the number of bits in the subnet mask.
+ *
+ * Correct the name of the subnet object.
+ }
+
+ NELOG_NetlogonDynamicDnsServerFailure = ERRLOG2_BASE + 81;
+ {$EXTERNALSYM NELOG_NetlogonDynamicDnsServerFailure}
+
+ {
+ * Dynamic registration or deletion of one or more DNS records associated with DNS
+ * domain '%1' failed. These records are used by other computers to locate this
+ * server as a domain controller (if the specified domain is an Active Directory
+ * domain) or as an LDAP server (if the specified domain is an application partition).
+ *
+ * %n%nPossible causes of failure include:
+ *
+ * %n- TCP/IP properties of the network connections of this computer contain wrong IP address(es) of the preferred and alternate DNS servers
+ * %n- Specified preferred and alternate DNS servers are not running
+ * %n- DNS server(s) primary for the records to be registered is not running
+ * %n- Preferred or alternate DNS servers are configured with wrong root hints
+ * %n- Parent DNS zone contains incorrect delegation to the child zone authoritative for the DNS records that failed registration
+ *
+ * %n%nUSER ACTION
+ *
+ * %nFix possible misconfiguration(s) specified above and initiate registration or deletion of
+ * the DNS records by running 'nltest.exe /dsregdns' from the command prompt or by restarting
+ * Net Logon service. Nltest.exe is available in the Microsoft Windows Server Resource Kit CD.
+ }
+
+ NELOG_NetlogonDynamicDnsFailure = ERRLOG2_BASE + 82;
+ {$EXTERNALSYM NELOG_NetlogonDynamicDnsFailure}
+
+ {
+ * Dynamic registration or deregistration of one or more DNS records failed with the following error: %n%1
+ }
+
+ NELOG_NetlogonRpcCallCancelled = ERRLOG2_BASE + 83;
+ {$EXTERNALSYM NELOG_NetlogonRpcCallCancelled}
+
+ {
+ * The session setup to the Windows NT or Windows 2000 Domain Controller %1 for the domain %2
+ * is not responsive. The current RPC call from Netlogon on \\%3 to %1 has been cancelled.
+ }
+
+ NELOG_NetlogonDcSiteCovered = ERRLOG2_BASE + 84;
+ {$EXTERNALSYM NELOG_NetlogonDcSiteCovered}
+
+ {
+ * Site '%2' does not have any Domain Controllers for domain '%3'.
+ * Domain Controllers in site '%1' have been automatically
+ * selected to cover site '%2' for domain '%3' based on configured
+ * Directory Server replication costs.
+ }
+
+ NELOG_NetlogonDcSiteNotCovered = ERRLOG2_BASE + 85;
+ {$EXTERNALSYM NELOG_NetlogonDcSiteNotCovered}
+
+ {
+ * This Domain Controller no longer automatically covers site '%1' for domain '%2'.
+ }
+
+ NELOG_NetlogonGcSiteCovered = ERRLOG2_BASE + 86;
+ {$EXTERNALSYM NELOG_NetlogonGcSiteCovered}
+
+ {
+ * Site '%2' does not have any Global Catalog servers for forest '%3'.
+ * Global Catalog servers in site '%1' have been automatically
+ * selected to cover site '%2' for forest '%3' based on configured
+ * Directory Server replication costs.
+ }
+
+ NELOG_NetlogonGcSiteNotCovered = ERRLOG2_BASE + 87;
+ {$EXTERNALSYM NELOG_NetlogonGcSiteNotCovered}
+
+ {
+ * This Global Catalog server no longer automatically covers site '%1' for forest '%2'.
+ }
+
+ NELOG_NetlogonFailedSpnUpdate = ERRLOG2_BASE + 88;
+ {$EXTERNALSYM NELOG_NetlogonFailedSpnUpdate}
+
+ {
+ * Attempt to update HOST Service Principal Names (SPNs) of the computer
+ * object in Active Directory failed. The updated values were '%1' and '%2'.
+ * The following error occurred: %n%3
+ }
+
+ NELOG_NetlogonFailedDnsHostNameUpdate = ERRLOG2_BASE + 89;
+ {$EXTERNALSYM NELOG_NetlogonFailedDnsHostNameUpdate}
+
+ {
+ * Attempt to update DNS Host Name of the computer object
+ * in Active Directory failed. The updated value was '%1'.
+ * The following error occurred: %n%2
+ }
+
+ NELOG_NetlogonAuthNoUplevelDomainController = ERRLOG2_BASE + 90;
+ {$EXTERNALSYM NELOG_NetlogonAuthNoUplevelDomainController}
+
+ {
+ * No suitable Domain Controller is available for domain %1.
+ * An NT4 or older domain controller is available but it cannot
+ * be used for authentication purposes in the Windows 2000 or newer
+ * domain that this computer is a member of.
+ * The following error occurred:%n%2
+ }
+
+ NELOG_NetlogonAuthDomainDowngraded = ERRLOG2_BASE + 91;
+ {$EXTERNALSYM NELOG_NetlogonAuthDomainDowngraded}
+
+ {
+ * The domain of this computer, %1 has been downgraded from Windows 2000
+ * or newer to Windows NT4 or older. The computer cannot function properly
+ * in this case for authentication purposes. This computer needs to rejoin
+ * the domain.
+ * The following error occurred:%n%2
+ }
+
+ NELOG_NetlogonNdncSiteCovered = ERRLOG2_BASE + 92;
+ {$EXTERNALSYM NELOG_NetlogonNdncSiteCovered}
+
+ {
+ * Site '%2' does not have any LDAP servers for non-domain NC '%3'.
+ * LDAP servers in site '%1' have been automatically selected to
+ * cover site '%2' for non-domain NC '%3' based on configured
+ * Directory Server replication costs.
+ }
+
+ NELOG_NetlogonNdncSiteNotCovered = ERRLOG2_BASE + 93;
+ {$EXTERNALSYM NELOG_NetlogonNdncSiteNotCovered}
+
+ {
+ * This LDAP server no longer automatically covers site '%1' for non-domain NC '%2'.
+ }
+
+ NELOG_NetlogonDcOldSiteCovered = ERRLOG2_BASE + 94;
+ {$EXTERNALSYM NELOG_NetlogonDcOldSiteCovered}
+
+ {
+ * Site '%2' is no longer manually configured in the registry as
+ * covered by this Domain Controller for domain '%3'. As a result,
+ * site '%2' does not have any Domain Controllers for domain '%3'.
+ * Domain Controllers in site '%1' have been automatically
+ * selected to cover site '%2' for domain '%3' based on configured
+ * Directory Server replication costs.
+ }
+
+ NELOG_NetlogonDcSiteNotCoveredAuto = ERRLOG2_BASE + 95;
+ {$EXTERNALSYM NELOG_NetlogonDcSiteNotCoveredAuto}
+
+ {
+ * This Domain Controller no longer automatically covers site '%1' for domain '%2'.
+ * However, site '%1' is still (manually) covered by this Domain Controller for
+ * domain '%2' since this site has been manually configured in the registry.
+ }
+
+ NELOG_NetlogonGcOldSiteCovered = ERRLOG2_BASE + 96;
+ {$EXTERNALSYM NELOG_NetlogonGcOldSiteCovered}
+
+ {
+ * Site '%2' is no longer manually configured in the registry as
+ * covered by this Global Catalog server for forest '%3'. As a result,
+ * site '%2' does not have any Global Catalog servers for forest '%3'.
+ * Global Catalog servers in site '%1' have been automatically
+ * selected to cover site '%2' for forest '%3' based on configured
+ * Directory Server replication costs.
+ }
+
+ NELOG_NetlogonGcSiteNotCoveredAuto = ERRLOG2_BASE + 97;
+ {$EXTERNALSYM NELOG_NetlogonGcSiteNotCoveredAuto}
+
+ {
+ * This Global Catalog server no longer automatically covers site '%1' for forest '%2'.
+ * However, site '%1' is still (manually) covered by this Global catalog for
+ * forest '%2' since this site has been manually configured in the registry.
+ }
+
+ NELOG_NetlogonNdncOldSiteCovered = ERRLOG2_BASE + 98;
+ {$EXTERNALSYM NELOG_NetlogonNdncOldSiteCovered}
+
+ {
+ * Site '%2' is no longer manually configured in the registry as
+ * covered by this LDAP server for non-domain NC '%3'. As a result,
+ * site '%2' does not have any LDAP servers for non-domain NC '%3'.
+ * LDAP servers in site '%1' have been automatically
+ * selected to cover site '%2' for non-domain NC '%3' based on
+ * configured Directory Server replication costs.
+ }
+
+ NELOG_NetlogonNdncSiteNotCoveredAuto = ERRLOG2_BASE + 99;
+ {$EXTERNALSYM NELOG_NetlogonNdncSiteNotCoveredAuto}
+
+ {
+ * This LDAP server no longer automatically covers site '%1' for non-domain NC '%2'.
+ * However, site '%1' is still (manually) covered by this LDAP server for
+ * non-domain NC '%2' since this site has been manually configured in the registry.
+ }
+
+ NELOG_NetlogonSpnMultipleSamAccountNames = ERRLOG2_BASE + 100;
+ {$EXTERNALSYM NELOG_NetlogonSpnMultipleSamAccountNames}
+
+ {
+ * Attempt to update DnsHostName and HOST Service Principal Name (SPN) attributes
+ * of the computer object in Active Directory failed because the Domain Controller
+ * '%1' had more than one account with the name '%2' corresponding to this computer.
+ * Not having SPNs registered may result in authentication failures for this computer.
+ * Contact your domain administrator who may need to manually resolve the account name
+ * collision.
+ }
+
+ NELOG_NetlogonSpnCrackNamesFailure = ERRLOG2_BASE + 101;
+ {$EXTERNALSYM NELOG_NetlogonSpnCrackNamesFailure}
+
+ {
+ * Attempt to update DnsHostName and HOST Service Principal Name (SPN) attributes
+ * of the computer object in Active Directory failed because this computer account
+ * name, '%2' could not be mapped to the computer object on Domain Controller '%1'.
+ * Not having SPNs registered may result in authentication failures for this computer.
+ * Contact your domain administrator. The following technical information may be
+ * useful for the resolution of this failure:%n
+ * DsCrackNames status = 0x%3, crack error = 0x%4.
+ }
+
+ NELOG_NetlogonNoAddressToSiteMapping = ERRLOG2_BASE + 102;
+ {$EXTERNALSYM NELOG_NetlogonNoAddressToSiteMapping}
+
+ {
+ * None of the IP addresses (%2) of this Domain Controller map to the configured site '%1'.
+ * While this may be a temporary situation due to IP address changes, it is generally
+ * recommended that the IP address of the Domain Controller (accessible to machines in
+ * its domain) maps to the Site which it services. If the above list of IP addresses is
+ * stable, consider moving this server to a site (or create one if it does not already
+ * exist) such that the above IP address maps to the selected site. This may require the
+ * creation of a new subnet object (whose range includes the above IP address) which maps
+ * to the selected site object.
+ }
+
+ NELOG_NetlogonInvalidGenericParameterValue = ERRLOG2_BASE + 103;
+ {$EXTERNALSYM NELOG_NetlogonInvalidGenericParameterValue}
+
+ {
+ * The following error occurred while reading a parameter '%2' in the
+ * Netlogon %1 registry section:%n%3
+ }
+
+ NELOG_NetlogonInvalidDwordParameterValue = ERRLOG2_BASE + 104;
+ {$EXTERNALSYM NELOG_NetlogonInvalidDwordParameterValue}
+
+ {
+ * The Netlogon %1 registry key contains an invalid value 0x%2 for parameter '%3'.
+ * The minimum and maximum values allowed for this parameter are 0x%4 and 0x%5, respectively.
+ * The value of 0x%6 has been assigned to this parameter.
+ }
+
+ NELOG_NetlogonServerAuthFailedNoAccount = ERRLOG2_BASE + 105;
+ {$EXTERNALSYM NELOG_NetlogonServerAuthFailedNoAccount}
+
+ {
+ * The session setup from the computer %1 failed to authenticate.
+ * The following error occurred: %n%2
+ }
+
+ NELOG_NetlogonNoDynamicDnsManual = ERRLOG2_BASE + 106;
+ {$EXTERNALSYM NELOG_NetlogonNoDynamicDnsManual}
+
+ (*
+ * Dynamic DNS updates have been manually disabled on this domain controller.
+ *
+ * %n%nUSER ACTION
+ *
+ * %nReconfigure this domain controller to use dynamic DNS updates or manually add the DNS
+ * records from the file '%SystemRoot%\System32\Config\Netlogon.dns' to the DNS database.
+ *)
+
+ NELOG_NetlogonNoSiteForClients = ERRLOG2_BASE + 107;
+ {$EXTERNALSYM NELOG_NetlogonNoSiteForClients}
+
+ {
+ * During the past %1 hours there have been %2 connections to this Domain
+ * Controller from client machines whose IP addresses don't map to any of
+ * the existing sites in the enterprise. Those clients, therefore, have
+ * undefined sites and may connect to any Domain Controller including
+ * those that are in far distant locations from the clients. A client's site
+ * is determined by the mapping of its subnet to one of the existing sites.
+ * To move the above clients to one of the sites, please consider creating
+ * subnet object(s) covering the above IP addresses with mapping to one of the
+ * existing sites. The names and IP addresses of the clients in question have
+ * been logged on this computer in the following log file
+ * '%SystemRoot%\debug\netlogon.log' and, potentially, in the log file
+ * '%SystemRoot%\debug\netlogon.bak' created if the former log becomes full.
+ * The log(s) may contain additional unrelated debugging information. To filter
+ * out the needed information, please search for lines which contain text
+ * 'NO_CLIENT_SITE:'. The first word after this string is the client name and
+ * the second word is the client IP address. The maximum size of the log(s) is
+ * controlled by the following registry DWORD value
+ * 'HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Netlogon\Parameters\LogFileMaxSize';
+ * the default is %3 bytes. The current maximum size is %4 bytes. To set a
+ * different maximum size, create the above registry value and set the desired
+ * maximum size in bytes.
+ }
+
+ NELOG_NetlogonDnsDeregAborted = ERRLOG2_BASE + 108;
+ {$EXTERNALSYM NELOG_NetlogonDnsDeregAborted}
+
+ (*
+ * The deregistration of some DNS domain controller locator records was aborted
+ * at the time of this domain controller demotion because the DNS deregistrations
+ * took too long.
+ *
+ * %n%nUSER ACTION
+ *
+ * %nManually delete the DNS records listed in the file
+ * '%SystemRoot%\System32\Config\Netlogon.dns' from the DNS database.
+ *)
+
+ NELOG_NetlogonRpcPortRequestFailure = ERRLOG2_BASE + 109;
+ {$EXTERNALSYM NELOG_NetlogonRpcPortRequestFailure}
+
+ (*
+ * The NetLogon service on this domain controller has been configured to use port %1
+ * for incoming RPC connections over TCP/IP from remote machines. However, the
+ * following error occurred when Netlogon attempted to register this port with the RPC
+ * endpoint mapper service: %n%2 %nThis will prevent the NetLogon service on remote
+ * machines from connecting to this domain controller over TCP/IP that may result in
+ * authentication problems.
+ *
+ * %n%nUSER ACTION
+ *
+ * %nThe specified port is configured via the Group Policy or via a registry value 'DcTcpipPort'
+ * under the 'HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Netlogon\Parameters'
+ * registry key; the value configured through the Group Policy takes precedence. If the
+ * port specified is in error, reset it to a correct value. You can also remove this
+ * configuration for the port in which case the port will be assigned dynamically by
+ * the endpoint mapper at the time the NetLogon service on remote machines makes RPC connections
+ * to this domain controller. After the misconfiguration is corrected, restart the NetLogon
+ * service on this machine and verify that this event log no longer appears.
+ *)
+
+implementation
+
+{$IFDEF DYNAMIC_LINK}
+
+var
+ _NetErrorLogClear: Pointer;
+
+function NetErrorLogClear;
+begin
+ GetProcedureAddress(_NetErrorLogClear, netapi32, 'NetErrorLogClear');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetErrorLogClear]
+ end;
+end;
+
+var
+ _NetErrorLogRead: Pointer;
+
+function NetErrorLogRead;
+begin
+ GetProcedureAddress(_NetErrorLogRead, netapi32, 'NetErrorLogRead');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetErrorLogRead]
+ end;
+end;
+
+var
+ _NetErrorLogWrite: Pointer;
+
+function NetErrorLogWrite;
+begin
+ GetProcedureAddress(_NetErrorLogWrite, netapi32, 'NetErrorLogWrite');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetErrorLogWrite]
+ end;
+end;
+
+{$ELSE}
+
+function NetErrorLogClear; external netapi32 name 'NetErrorLogClear';
+function NetErrorLogRead; external netapi32 name 'NetErrorLogRead';
+function NetErrorLogWrite; external netapi32 name 'NetErrorLogWrite';
+
+{$ENDIF DYNAMIC_LINK}
+
+end.
diff --git a/packages/extra/winunits/jwalmjoin.pas b/packages/extra/winunits/jwalmjoin.pas
index 9672879f27..1506d1f83c 100644
--- a/packages/extra/winunits/jwalmjoin.pas
+++ b/packages/extra/winunits/jwalmjoin.pas
@@ -1,366 +1,366 @@
-{******************************************************************************}
-{ }
-{ Lan Manager Join API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: lmjoin.h, released November 2001. The original Pascal }
-{ code is: LmJoin.pas, released Februari 2002. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwalmjoin.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaLmJoin;
-
-{$WEAKPACKAGEUNIT}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaLmCons, JwaWinType;
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "lmjoin.h"'}
-{$HPPEMIT ''}
-
-//
-// Types of name that can be validated
-//
-
-type
- _NETSETUP_NAME_TYPE = (
- NetSetupUnknown,
- NetSetupMachine,
- NetSetupWorkgroup,
- NetSetupDomain,
- NetSetupNonExistentDomain
- {$IFDEF WIN2000_UP}
- , NetSetupDnsMachine
- {$ENDIF WIN2000_UP}
- );
- {$EXTERNALSYM _NETSETUP_NAME_TYPE}
- NETSETUP_NAME_TYPE = _NETSETUP_NAME_TYPE;
- {$EXTERNALSYM NETSETUP_NAME_TYPE}
- PNETSETUP_NAME_TYPE = ^NETSETUP_NAME_TYPE;
- {$EXTERNALSYM PNETSETUP_NAME_TYPE}
- TNetSetupNameType = NETSETUP_NAME_TYPE;
- PNetSetupNameType = PNETSETUP_NAME_TYPE;
-
-//
-// Status of a workstation
-//
-
- _NETSETUP_JOIN_STATUS = (
- NetSetupUnknownStatus,
- NetSetupUnjoined,
- NetSetupWorkgroupName,
- NetSetupDomainName);
- {$EXTERNALSYM _NETSETUP_JOIN_STATUS}
- NETSETUP_JOIN_STATUS = _NETSETUP_JOIN_STATUS;
- {$EXTERNALSYM NETSETUP_JOIN_STATUS}
- PNETSETUP_JOIN_STATUS = ^NETSETUP_JOIN_STATUS;
- {$EXTERNALSYM PNETSETUP_JOIN_STATUS}
- TNetSetupJoinStatus = NETSETUP_JOIN_STATUS;
- PNetSetupJoinStatus = PNETSETUP_JOIN_STATUS;
-
-//
-// Flags to determine the behavior of the join/unjoin APIs
-//
-
-const
- NETSETUP_JOIN_DOMAIN = $00000001; // If not present, workgroup is joined
- {$EXTERNALSYM NETSETUP_JOIN_DOMAIN}
- NETSETUP_ACCT_CREATE = $00000002; // Do the server side account creation/rename
- {$EXTERNALSYM NETSETUP_ACCT_CREATE}
- NETSETUP_ACCT_DELETE = $00000004; // Delete the account when a domain is left
- {$EXTERNALSYM NETSETUP_ACCT_DELETE}
- NETSETUP_WIN9X_UPGRADE = $00000010; // Invoked during upgrade of Windows 9x to
- {$EXTERNALSYM NETSETUP_WIN9X_UPGRADE}
- // Windows NT
- NETSETUP_DOMAIN_JOIN_IF_JOINED = $00000020; // Allow the client to join a new domain
- {$EXTERNALSYM NETSETUP_DOMAIN_JOIN_IF_JOINED}
- // even if it is already joined to a domain
- NETSETUP_JOIN_UNSECURE = $00000040; // Performs an unsecure join
- {$EXTERNALSYM NETSETUP_JOIN_UNSECURE}
- NETSETUP_MACHINE_PWD_PASSED = $00000080; // Indicates that the machine (not user) password
- {$EXTERNALSYM NETSETUP_MACHINE_PWD_PASSED}
- // is passed. Valid only for unsecure joins
- NETSETUP_DEFER_SPN_SET = $00000100; // Specifies that writting SPN and DnsHostName
- {$EXTERNALSYM NETSETUP_DEFER_SPN_SET}
- // attributes on the computer object should be
- // defered until rename that will follow join
-
- NETSETUP_INSTALL_INVOCATION = $00040000; // The APIs were invoked during install
- {$EXTERNALSYM NETSETUP_INSTALL_INVOCATION}
-
- NETSETUP_IGNORE_UNSUPPORTED_FLAGS = $10000000; // If this bit is set, unrecognized flags
- // will be ignored by the NetJoin API and
- // the API will behave as if the flags
- // were not set.
- {$EXTERNALSYM NETSETUP_IGNORE_UNSUPPORTED_FLAGS}
-
- NETSETUP_VALID_UNJOIN_FLAGS = NETSETUP_ACCT_DELETE or NETSETUP_IGNORE_UNSUPPORTED_FLAGS;
- {$EXTERNALSYM NETSETUP_VALID_UNJOIN_FLAGS}
-
-//
-// 0x80000000 is reserved for internal use only
-//
-
-//
-// Joins a machine to the domain.
-//
-
-function NetJoinDomain(lpServer, lpDomain, lpAccountOU, lpAccount, lpPassword: LPCWSTR; fJoinOptions: DWORD): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetJoinDomain}
-
-function NetUnjoinDomain(lpServer, lpAccount, lpPassword: LPCWSTR; fUnjoinOptions: DWORD): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetUnjoinDomain}
-
-function NetRenameMachineInDomain(lpServer, lpNewMachineName, lpAccount, lpPassword: LPCWSTR; fRenameOptions: DWORD): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetRenameMachineInDomain}
-
-//
-// Determine the validity of a name
-//
-
-function NetValidateName(lpServer, lpName, lpAccount, lpPassword: LPCWSTR; NameType: NETSETUP_NAME_TYPE): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetValidateName}
-
-//
-// Determines whether a workstation is joined to a domain or not
-//
-
-function NetGetJoinInformation(lpServer: LPCWSTR; var lpNameBuffer: LPWSTR; BufferType: PNETSETUP_JOIN_STATUS): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetGetJoinInformation}
-
-//
-// Determines the list of OUs that the client can create a machine account in
-//
-
-function NetGetJoinableOUs(lpServer, lpDomain, lpAccount, lpPassword: LPCWSTR; OUCount: LPDWORD; var OUs: LPLPWSTR): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetGetJoinableOUs}
-
-//
-// Computer rename preparation APIs
-//
-
-const
- NET_IGNORE_UNSUPPORTED_FLAGS = $01;
- {$EXTERNALSYM NET_IGNORE_UNSUPPORTED_FLAGS}
-
-function NetAddAlternateComputerName(Server, AlternateName, DomainAccount, DomainAccountPassword: LPCWSTR; Reserved: ULONG): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetAddAlternateComputerName}
-
-function NetRemoveAlternateComputerName(Server, AlternateName, DomainAccount, DomainAccountPassword: LPCWSTR; Reserved: ULONG): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetRemoveAlternateComputerName}
-
-function NetSetPrimaryComputerName(Server, PrimaryName, DomainAccount, DomainAccountPassword: LPCWSTR; Reserved: ULONG): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetSetPrimaryComputerName}
-
-//
-// The following enumeration must be kept
-// in sync with COMPUTER_NAME_TYPE defined
-// in winbase.h
-//
-
-type
- _NET_COMPUTER_NAME_TYPE = (
- NetPrimaryComputerName,
- NetAlternateComputerNames,
- NetAllComputerNames,
- NetComputerNameTypeMax);
- {$EXTERNALSYM _NET_COMPUTER_NAME_TYPE}
- NET_COMPUTER_NAME_TYPE = _NET_COMPUTER_NAME_TYPE;
- {$EXTERNALSYM NET_COMPUTER_NAME_TYPE}
- PNET_COMPUTER_NAME_TYPE = ^NET_COMPUTER_NAME_TYPE;
- {$EXTERNALSYM PNET_COMPUTER_NAME_TYPE}
- TNetComputerNameType = NET_COMPUTER_NAME_TYPE;
- PNetComputerNameType = PNET_COMPUTER_NAME_TYPE;
-
-function NetEnumerateComputerNames(Server: LPCWSTR; NameType: NET_COMPUTER_NAME_TYPE; Reserved: ULONG; EntryCount: PDWORD; var ComputerNames: LPLPWSTR): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetEnumerateComputerNames}
-
-implementation
-
-{$IFDEF DYNAMIC_LINK}
-
-var
- _NetJoinDomain: Pointer;
-
-function NetJoinDomain;
-begin
- GetProcedureAddress(_NetJoinDomain, netapi32, 'NetJoinDomain');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetJoinDomain]
- end;
-end;
-
-var
- _NetUnjoinDomain: Pointer;
-
-function NetUnjoinDomain;
-begin
- GetProcedureAddress(_NetUnjoinDomain, netapi32, 'NetUnjoinDomain');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetUnjoinDomain]
- end;
-end;
-
-var
- _NetRenameMachineInDomain: Pointer;
-
-function NetRenameMachineInDomain;
-begin
- GetProcedureAddress(_NetRenameMachineInDomain, netapi32, 'NetRenameMachineInDomain');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetRenameMachineInDomain]
- end;
-end;
-
-var
- _NetValidateName: Pointer;
-
-function NetValidateName;
-begin
- GetProcedureAddress(_NetValidateName, netapi32, 'NetValidateName');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetValidateName]
- end;
-end;
-
-var
- _NetGetJoinInformation: Pointer;
-
-function NetGetJoinInformation;
-begin
- GetProcedureAddress(_NetGetJoinInformation, netapi32, 'NetGetJoinInformation');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetGetJoinInformation]
- end;
-end;
-
-var
- _NetGetJoinableOUs: Pointer;
-
-function NetGetJoinableOUs;
-begin
- GetProcedureAddress(_NetGetJoinableOUs, netapi32, 'NetGetJoinableOUs');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetGetJoinableOUs]
- end;
-end;
-
-var
- _NetAddAlternateComputerName: Pointer;
-
-function NetAddAlternateComputerName;
-begin
- GetProcedureAddress(_NetAddAlternateComputerName, netapi32, 'NetAddAlternateComputerName');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetAddAlternateComputerName]
- end;
-end;
-
-var
- _NetRemoveAlternateComputerName: Pointer;
-
-function NetRemoveAlternateComputerName;
-begin
- GetProcedureAddress(_NetRemoveAlternateComputerName, netapi32, 'NetRemoveAlternateComputerName');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetRemoveAlternateComputerName]
- end;
-end;
-
-var
- _NetSetPrimaryComputerName: Pointer;
-
-function NetSetPrimaryComputerName;
-begin
- GetProcedureAddress(_NetSetPrimaryComputerName, netapi32, 'NetSetPrimaryComputerName');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetSetPrimaryComputerName]
- end;
-end;
-
-var
- _NetEnumerateComputerNames: Pointer;
-
-function NetEnumerateComputerNames;
-begin
- GetProcedureAddress(_NetEnumerateComputerNames, netapi32, 'NetEnumerateComputerNames');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetEnumerateComputerNames]
- end;
-end;
-
-{$ELSE}
-
-function NetJoinDomain; external netapi32 name 'NetJoinDomain';
-function NetUnjoinDomain; external netapi32 name 'NetUnjoinDomain';
-function NetRenameMachineInDomain; external netapi32 name 'NetRenameMachineInDomain';
-function NetValidateName; external netapi32 name 'NetValidateName';
-function NetGetJoinInformation; external netapi32 name 'NetGetJoinInformation';
-function NetGetJoinableOUs; external netapi32 name 'NetGetJoinableOUs';
-function NetAddAlternateComputerName; external netapi32 name 'NetAddAlternateComputerName';
-function NetRemoveAlternateComputerName; external netapi32 name 'NetRemoveAlternateComputerName';
-function NetSetPrimaryComputerName; external netapi32 name 'NetSetPrimaryComputerName';
-function NetEnumerateComputerNames; external netapi32 name 'NetEnumerateComputerNames';
-
-{$ENDIF DYNAMIC_LINK}
-
-end.
+{******************************************************************************}
+{ }
+{ Lan Manager Join API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: lmjoin.h, released November 2001. The original Pascal }
+{ code is: LmJoin.pas, released Februari 2002. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwalmjoin.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaLmJoin;
+
+{$WEAKPACKAGEUNIT}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaLmCons, JwaWinType;
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "lmjoin.h"'}
+{$HPPEMIT ''}
+
+//
+// Types of name that can be validated
+//
+
+type
+ _NETSETUP_NAME_TYPE = (
+ NetSetupUnknown,
+ NetSetupMachine,
+ NetSetupWorkgroup,
+ NetSetupDomain,
+ NetSetupNonExistentDomain
+ {$IFDEF WIN2000_UP}
+ , NetSetupDnsMachine
+ {$ENDIF WIN2000_UP}
+ );
+ {$EXTERNALSYM _NETSETUP_NAME_TYPE}
+ NETSETUP_NAME_TYPE = _NETSETUP_NAME_TYPE;
+ {$EXTERNALSYM NETSETUP_NAME_TYPE}
+ PNETSETUP_NAME_TYPE = ^NETSETUP_NAME_TYPE;
+ {$EXTERNALSYM PNETSETUP_NAME_TYPE}
+ TNetSetupNameType = NETSETUP_NAME_TYPE;
+ PNetSetupNameType = PNETSETUP_NAME_TYPE;
+
+//
+// Status of a workstation
+//
+
+ _NETSETUP_JOIN_STATUS = (
+ NetSetupUnknownStatus,
+ NetSetupUnjoined,
+ NetSetupWorkgroupName,
+ NetSetupDomainName);
+ {$EXTERNALSYM _NETSETUP_JOIN_STATUS}
+ NETSETUP_JOIN_STATUS = _NETSETUP_JOIN_STATUS;
+ {$EXTERNALSYM NETSETUP_JOIN_STATUS}
+ PNETSETUP_JOIN_STATUS = ^NETSETUP_JOIN_STATUS;
+ {$EXTERNALSYM PNETSETUP_JOIN_STATUS}
+ TNetSetupJoinStatus = NETSETUP_JOIN_STATUS;
+ PNetSetupJoinStatus = PNETSETUP_JOIN_STATUS;
+
+//
+// Flags to determine the behavior of the join/unjoin APIs
+//
+
+const
+ NETSETUP_JOIN_DOMAIN = $00000001; // If not present, workgroup is joined
+ {$EXTERNALSYM NETSETUP_JOIN_DOMAIN}
+ NETSETUP_ACCT_CREATE = $00000002; // Do the server side account creation/rename
+ {$EXTERNALSYM NETSETUP_ACCT_CREATE}
+ NETSETUP_ACCT_DELETE = $00000004; // Delete the account when a domain is left
+ {$EXTERNALSYM NETSETUP_ACCT_DELETE}
+ NETSETUP_WIN9X_UPGRADE = $00000010; // Invoked during upgrade of Windows 9x to
+ {$EXTERNALSYM NETSETUP_WIN9X_UPGRADE}
+ // Windows NT
+ NETSETUP_DOMAIN_JOIN_IF_JOINED = $00000020; // Allow the client to join a new domain
+ {$EXTERNALSYM NETSETUP_DOMAIN_JOIN_IF_JOINED}
+ // even if it is already joined to a domain
+ NETSETUP_JOIN_UNSECURE = $00000040; // Performs an unsecure join
+ {$EXTERNALSYM NETSETUP_JOIN_UNSECURE}
+ NETSETUP_MACHINE_PWD_PASSED = $00000080; // Indicates that the machine (not user) password
+ {$EXTERNALSYM NETSETUP_MACHINE_PWD_PASSED}
+ // is passed. Valid only for unsecure joins
+ NETSETUP_DEFER_SPN_SET = $00000100; // Specifies that writting SPN and DnsHostName
+ {$EXTERNALSYM NETSETUP_DEFER_SPN_SET}
+ // attributes on the computer object should be
+ // defered until rename that will follow join
+
+ NETSETUP_INSTALL_INVOCATION = $00040000; // The APIs were invoked during install
+ {$EXTERNALSYM NETSETUP_INSTALL_INVOCATION}
+
+ NETSETUP_IGNORE_UNSUPPORTED_FLAGS = $10000000; // If this bit is set, unrecognized flags
+ // will be ignored by the NetJoin API and
+ // the API will behave as if the flags
+ // were not set.
+ {$EXTERNALSYM NETSETUP_IGNORE_UNSUPPORTED_FLAGS}
+
+ NETSETUP_VALID_UNJOIN_FLAGS = NETSETUP_ACCT_DELETE or NETSETUP_IGNORE_UNSUPPORTED_FLAGS;
+ {$EXTERNALSYM NETSETUP_VALID_UNJOIN_FLAGS}
+
+//
+// 0x80000000 is reserved for internal use only
+//
+
+//
+// Joins a machine to the domain.
+//
+
+function NetJoinDomain(lpServer, lpDomain, lpAccountOU, lpAccount, lpPassword: LPCWSTR; fJoinOptions: DWORD): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetJoinDomain}
+
+function NetUnjoinDomain(lpServer, lpAccount, lpPassword: LPCWSTR; fUnjoinOptions: DWORD): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetUnjoinDomain}
+
+function NetRenameMachineInDomain(lpServer, lpNewMachineName, lpAccount, lpPassword: LPCWSTR; fRenameOptions: DWORD): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetRenameMachineInDomain}
+
+//
+// Determine the validity of a name
+//
+
+function NetValidateName(lpServer, lpName, lpAccount, lpPassword: LPCWSTR; NameType: NETSETUP_NAME_TYPE): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetValidateName}
+
+//
+// Determines whether a workstation is joined to a domain or not
+//
+
+function NetGetJoinInformation(lpServer: LPCWSTR; var lpNameBuffer: LPWSTR; BufferType: PNETSETUP_JOIN_STATUS): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetGetJoinInformation}
+
+//
+// Determines the list of OUs that the client can create a machine account in
+//
+
+function NetGetJoinableOUs(lpServer, lpDomain, lpAccount, lpPassword: LPCWSTR; OUCount: LPDWORD; var OUs: LPLPWSTR): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetGetJoinableOUs}
+
+//
+// Computer rename preparation APIs
+//
+
+const
+ NET_IGNORE_UNSUPPORTED_FLAGS = $01;
+ {$EXTERNALSYM NET_IGNORE_UNSUPPORTED_FLAGS}
+
+function NetAddAlternateComputerName(Server, AlternateName, DomainAccount, DomainAccountPassword: LPCWSTR; Reserved: ULONG): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetAddAlternateComputerName}
+
+function NetRemoveAlternateComputerName(Server, AlternateName, DomainAccount, DomainAccountPassword: LPCWSTR; Reserved: ULONG): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetRemoveAlternateComputerName}
+
+function NetSetPrimaryComputerName(Server, PrimaryName, DomainAccount, DomainAccountPassword: LPCWSTR; Reserved: ULONG): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetSetPrimaryComputerName}
+
+//
+// The following enumeration must be kept
+// in sync with COMPUTER_NAME_TYPE defined
+// in winbase.h
+//
+
+type
+ _NET_COMPUTER_NAME_TYPE = (
+ NetPrimaryComputerName,
+ NetAlternateComputerNames,
+ NetAllComputerNames,
+ NetComputerNameTypeMax);
+ {$EXTERNALSYM _NET_COMPUTER_NAME_TYPE}
+ NET_COMPUTER_NAME_TYPE = _NET_COMPUTER_NAME_TYPE;
+ {$EXTERNALSYM NET_COMPUTER_NAME_TYPE}
+ PNET_COMPUTER_NAME_TYPE = ^NET_COMPUTER_NAME_TYPE;
+ {$EXTERNALSYM PNET_COMPUTER_NAME_TYPE}
+ TNetComputerNameType = NET_COMPUTER_NAME_TYPE;
+ PNetComputerNameType = PNET_COMPUTER_NAME_TYPE;
+
+function NetEnumerateComputerNames(Server: LPCWSTR; NameType: NET_COMPUTER_NAME_TYPE; Reserved: ULONG; EntryCount: PDWORD; var ComputerNames: LPLPWSTR): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetEnumerateComputerNames}
+
+implementation
+
+{$IFDEF DYNAMIC_LINK}
+
+var
+ _NetJoinDomain: Pointer;
+
+function NetJoinDomain;
+begin
+ GetProcedureAddress(_NetJoinDomain, netapi32, 'NetJoinDomain');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetJoinDomain]
+ end;
+end;
+
+var
+ _NetUnjoinDomain: Pointer;
+
+function NetUnjoinDomain;
+begin
+ GetProcedureAddress(_NetUnjoinDomain, netapi32, 'NetUnjoinDomain');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetUnjoinDomain]
+ end;
+end;
+
+var
+ _NetRenameMachineInDomain: Pointer;
+
+function NetRenameMachineInDomain;
+begin
+ GetProcedureAddress(_NetRenameMachineInDomain, netapi32, 'NetRenameMachineInDomain');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetRenameMachineInDomain]
+ end;
+end;
+
+var
+ _NetValidateName: Pointer;
+
+function NetValidateName;
+begin
+ GetProcedureAddress(_NetValidateName, netapi32, 'NetValidateName');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetValidateName]
+ end;
+end;
+
+var
+ _NetGetJoinInformation: Pointer;
+
+function NetGetJoinInformation;
+begin
+ GetProcedureAddress(_NetGetJoinInformation, netapi32, 'NetGetJoinInformation');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetGetJoinInformation]
+ end;
+end;
+
+var
+ _NetGetJoinableOUs: Pointer;
+
+function NetGetJoinableOUs;
+begin
+ GetProcedureAddress(_NetGetJoinableOUs, netapi32, 'NetGetJoinableOUs');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetGetJoinableOUs]
+ end;
+end;
+
+var
+ _NetAddAlternateComputerName: Pointer;
+
+function NetAddAlternateComputerName;
+begin
+ GetProcedureAddress(_NetAddAlternateComputerName, netapi32, 'NetAddAlternateComputerName');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetAddAlternateComputerName]
+ end;
+end;
+
+var
+ _NetRemoveAlternateComputerName: Pointer;
+
+function NetRemoveAlternateComputerName;
+begin
+ GetProcedureAddress(_NetRemoveAlternateComputerName, netapi32, 'NetRemoveAlternateComputerName');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetRemoveAlternateComputerName]
+ end;
+end;
+
+var
+ _NetSetPrimaryComputerName: Pointer;
+
+function NetSetPrimaryComputerName;
+begin
+ GetProcedureAddress(_NetSetPrimaryComputerName, netapi32, 'NetSetPrimaryComputerName');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetSetPrimaryComputerName]
+ end;
+end;
+
+var
+ _NetEnumerateComputerNames: Pointer;
+
+function NetEnumerateComputerNames;
+begin
+ GetProcedureAddress(_NetEnumerateComputerNames, netapi32, 'NetEnumerateComputerNames');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetEnumerateComputerNames]
+ end;
+end;
+
+{$ELSE}
+
+function NetJoinDomain; external netapi32 name 'NetJoinDomain';
+function NetUnjoinDomain; external netapi32 name 'NetUnjoinDomain';
+function NetRenameMachineInDomain; external netapi32 name 'NetRenameMachineInDomain';
+function NetValidateName; external netapi32 name 'NetValidateName';
+function NetGetJoinInformation; external netapi32 name 'NetGetJoinInformation';
+function NetGetJoinableOUs; external netapi32 name 'NetGetJoinableOUs';
+function NetAddAlternateComputerName; external netapi32 name 'NetAddAlternateComputerName';
+function NetRemoveAlternateComputerName; external netapi32 name 'NetRemoveAlternateComputerName';
+function NetSetPrimaryComputerName; external netapi32 name 'NetSetPrimaryComputerName';
+function NetEnumerateComputerNames; external netapi32 name 'NetEnumerateComputerNames';
+
+{$ENDIF DYNAMIC_LINK}
+
+end.
diff --git a/packages/extra/winunits/jwalmmsg.pas b/packages/extra/winunits/jwalmmsg.pas
index e2790d5f79..040e4584cb 100644
--- a/packages/extra/winunits/jwalmmsg.pas
+++ b/packages/extra/winunits/jwalmmsg.pas
@@ -1,207 +1,207 @@
-{******************************************************************************}
-{ }
-{ Lan Manager Messages API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: lmmsg.h, released November 2001. The original Pascal }
-{ code is: LmMsg.pas, released Februari 2002. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwalmmsg.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaLmMsg;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "lmmsg.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaLmCons, JwaWinType;
-
-//
-// Function Prototypes
-//
-
-function NetMessageNameAdd(servername, msgname: LPCWSTR): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetMessageNameAdd}
-
-function NetMessageNameEnum(servername: LPCWSTR; level: DWORD; var bufptr: LPBYTE; prefmaxlen: DWORD; entriesread, totalentries: LPDWORD; resume_handle: LPDWORD): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetMessageNameEnum}
-
-function NetMessageNameGetInfo(servername, msgname: LPCWSTR; level: DWORD; var bufptr: LPBYTE): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetMessageNameGetInfo}
-
-function NetMessageNameDel(servername, msgname: LPCWSTR): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetMessageNameDel}
-
-function NetMessageBufferSend(servername, msgname, fromname: LPCWSTR; buf: LPBYTE; buflen: DWORD): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetMessageBufferSend}
-
-//
-// Data Structures
-//
-
-type
- _MSG_INFO_0 = record
- msgi0_name: LPWSTR;
- end;
- {$EXTERNALSYM _MSG_INFO_0}
- MSG_INFO_0 = _MSG_INFO_0;
- {$EXTERNALSYM MSG_INFO_0}
- PMSG_INFO_0 = ^MSG_INFO_0;
- {$EXTERNALSYM PMSG_INFO_0}
- LPMSG_INFO_0 = ^MSG_INFO_0;
- {$EXTERNALSYM LPMSG_INFO_0}
- TMsgInfo0 = MSG_INFO_0;
- PMsgInfo0 = PMSG_INFO_0;
-
- _MSG_INFO_1 = record
- msgi1_name: LPWSTR;
- msgi1_forward_flag: DWORD;
- msgi1_forward: LPWSTR;
- end;
- {$EXTERNALSYM _MSG_INFO_1}
- MSG_INFO_1 = _MSG_INFO_1;
- {$EXTERNALSYM MSG_INFO_1}
- PMSG_INFO_1 = ^MSG_INFO_1;
- {$EXTERNALSYM PMSG_INFO_1}
- LPMSG_INFO_1 = ^MSG_INFO_1;
- {$EXTERNALSYM LPMSG_INFO_1}
- TMsgInfo1 = MSG_INFO_1;
- PMsgInfo1 = PMSG_INFO_1;
-
-//
-// Special Values and Constants
-//
-
-//
-// Values for msgi1_forward_flag.
-//
-
-const
- MSGNAME_NOT_FORWARDED = 0; // Name not forwarded
- {$EXTERNALSYM MSGNAME_NOT_FORWARDED}
- MSGNAME_FORWARDED_TO = $04; // Name forward to remote station
- {$EXTERNALSYM MSGNAME_FORWARDED_TO}
- MSGNAME_FORWARDED_FROM = $10; // Name forwarded from remote station
- {$EXTERNALSYM MSGNAME_FORWARDED_FROM}
-
-implementation
-
-{$IFDEF DYNAMIC_LINK}
-
-var
- _NetMessageNameAdd: Pointer;
-
-function NetMessageNameAdd;
-begin
- GetProcedureAddress(_NetMessageNameAdd, netapi32, 'NetMessageNameAdd');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetMessageNameAdd]
- end;
-end;
-
-var
- _NetMessageNameEnum: Pointer;
-
-function NetMessageNameEnum;
-begin
- GetProcedureAddress(_NetMessageNameEnum, netapi32, 'NetMessageNameEnum');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetMessageNameEnum]
- end;
-end;
-
-var
- _NetMessageNameGetInfo: Pointer;
-
-function NetMessageNameGetInfo;
-begin
- GetProcedureAddress(_NetMessageNameGetInfo, netapi32, 'NetMessageNameGetInfo');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetMessageNameGetInfo]
- end;
-end;
-
-var
- _NetMessageNameDel: Pointer;
-
-function NetMessageNameDel;
-begin
- GetProcedureAddress(_NetMessageNameDel, netapi32, 'NetMessageNameDel');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetMessageNameDel]
- end;
-end;
-
-var
- _NetMessageBufferSend: Pointer;
-
-function NetMessageBufferSend;
-begin
- GetProcedureAddress(_NetMessageBufferSend, netapi32, 'NetMessageBufferSend');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetMessageBufferSend]
- end;
-end;
-
-{$ELSE}
-
-function NetMessageNameAdd; external netapi32 name 'NetMessageNameAdd';
-function NetMessageNameEnum; external netapi32 name 'NetMessageNameEnum';
-function NetMessageNameGetInfo; external netapi32 name 'NetMessageNameGetInfo';
-function NetMessageNameDel; external netapi32 name 'NetMessageNameDel';
-function NetMessageBufferSend; external netapi32 name 'NetMessageBufferSend';
-
-{$ENDIF DYNAMIC_LINK}
-
-end.
+{******************************************************************************}
+{ }
+{ Lan Manager Messages API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: lmmsg.h, released November 2001. The original Pascal }
+{ code is: LmMsg.pas, released Februari 2002. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwalmmsg.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaLmMsg;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "lmmsg.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaLmCons, JwaWinType;
+
+//
+// Function Prototypes
+//
+
+function NetMessageNameAdd(servername, msgname: LPCWSTR): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetMessageNameAdd}
+
+function NetMessageNameEnum(servername: LPCWSTR; level: DWORD; var bufptr: LPBYTE; prefmaxlen: DWORD; entriesread, totalentries: LPDWORD; resume_handle: LPDWORD): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetMessageNameEnum}
+
+function NetMessageNameGetInfo(servername, msgname: LPCWSTR; level: DWORD; var bufptr: LPBYTE): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetMessageNameGetInfo}
+
+function NetMessageNameDel(servername, msgname: LPCWSTR): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetMessageNameDel}
+
+function NetMessageBufferSend(servername, msgname, fromname: LPCWSTR; buf: LPBYTE; buflen: DWORD): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetMessageBufferSend}
+
+//
+// Data Structures
+//
+
+type
+ _MSG_INFO_0 = record
+ msgi0_name: LPWSTR;
+ end;
+ {$EXTERNALSYM _MSG_INFO_0}
+ MSG_INFO_0 = _MSG_INFO_0;
+ {$EXTERNALSYM MSG_INFO_0}
+ PMSG_INFO_0 = ^MSG_INFO_0;
+ {$EXTERNALSYM PMSG_INFO_0}
+ LPMSG_INFO_0 = ^MSG_INFO_0;
+ {$EXTERNALSYM LPMSG_INFO_0}
+ TMsgInfo0 = MSG_INFO_0;
+ PMsgInfo0 = PMSG_INFO_0;
+
+ _MSG_INFO_1 = record
+ msgi1_name: LPWSTR;
+ msgi1_forward_flag: DWORD;
+ msgi1_forward: LPWSTR;
+ end;
+ {$EXTERNALSYM _MSG_INFO_1}
+ MSG_INFO_1 = _MSG_INFO_1;
+ {$EXTERNALSYM MSG_INFO_1}
+ PMSG_INFO_1 = ^MSG_INFO_1;
+ {$EXTERNALSYM PMSG_INFO_1}
+ LPMSG_INFO_1 = ^MSG_INFO_1;
+ {$EXTERNALSYM LPMSG_INFO_1}
+ TMsgInfo1 = MSG_INFO_1;
+ PMsgInfo1 = PMSG_INFO_1;
+
+//
+// Special Values and Constants
+//
+
+//
+// Values for msgi1_forward_flag.
+//
+
+const
+ MSGNAME_NOT_FORWARDED = 0; // Name not forwarded
+ {$EXTERNALSYM MSGNAME_NOT_FORWARDED}
+ MSGNAME_FORWARDED_TO = $04; // Name forward to remote station
+ {$EXTERNALSYM MSGNAME_FORWARDED_TO}
+ MSGNAME_FORWARDED_FROM = $10; // Name forwarded from remote station
+ {$EXTERNALSYM MSGNAME_FORWARDED_FROM}
+
+implementation
+
+{$IFDEF DYNAMIC_LINK}
+
+var
+ _NetMessageNameAdd: Pointer;
+
+function NetMessageNameAdd;
+begin
+ GetProcedureAddress(_NetMessageNameAdd, netapi32, 'NetMessageNameAdd');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetMessageNameAdd]
+ end;
+end;
+
+var
+ _NetMessageNameEnum: Pointer;
+
+function NetMessageNameEnum;
+begin
+ GetProcedureAddress(_NetMessageNameEnum, netapi32, 'NetMessageNameEnum');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetMessageNameEnum]
+ end;
+end;
+
+var
+ _NetMessageNameGetInfo: Pointer;
+
+function NetMessageNameGetInfo;
+begin
+ GetProcedureAddress(_NetMessageNameGetInfo, netapi32, 'NetMessageNameGetInfo');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetMessageNameGetInfo]
+ end;
+end;
+
+var
+ _NetMessageNameDel: Pointer;
+
+function NetMessageNameDel;
+begin
+ GetProcedureAddress(_NetMessageNameDel, netapi32, 'NetMessageNameDel');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetMessageNameDel]
+ end;
+end;
+
+var
+ _NetMessageBufferSend: Pointer;
+
+function NetMessageBufferSend;
+begin
+ GetProcedureAddress(_NetMessageBufferSend, netapi32, 'NetMessageBufferSend');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetMessageBufferSend]
+ end;
+end;
+
+{$ELSE}
+
+function NetMessageNameAdd; external netapi32 name 'NetMessageNameAdd';
+function NetMessageNameEnum; external netapi32 name 'NetMessageNameEnum';
+function NetMessageNameGetInfo; external netapi32 name 'NetMessageNameGetInfo';
+function NetMessageNameDel; external netapi32 name 'NetMessageNameDel';
+function NetMessageBufferSend; external netapi32 name 'NetMessageBufferSend';
+
+{$ENDIF DYNAMIC_LINK}
+
+end.
diff --git a/packages/extra/winunits/jwalmremutl.pas b/packages/extra/winunits/jwalmremutl.pas
index f6e7225a4c..f825a857cf 100644
--- a/packages/extra/winunits/jwalmremutl.pas
+++ b/packages/extra/winunits/jwalmremutl.pas
@@ -1,201 +1,201 @@
-{******************************************************************************}
-{ }
-{ Lan Manager Remote API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: lmremutl.h, released November 2001. The original Pascal}
-{ code is: LmRemUtl.pas, released Februari 2002. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwalmremutl.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaLmRemUtl;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "lmremutl.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaLmCons, JwaWinType;
-
-//
-// Type Definitions
-//
-
-type
- {$IFDEF DESC_CHAR_UNICODE}
- DESC_CHAR = WCHAR;
- {$EXTERNALSYM DESC_CHAR}
- {$ELSE}
- DESC_CHAR = Char;
- {$EXTERNALSYM DESC_CHAR}
- {$ENDIF DESC_CHAR_UNICODE}
- TDescChar = DESC_CHAR;
-
- LPDESC = ^DESC_CHAR;
- {$EXTERNALSYM LPDESC}
- PDesc = LPDESC;
-
-//
-// Function Prototypes
-//
-
-function NetRemoteTOD(UncServerName: LPCWSTR; var BufferPtr: LPBYTE): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetRemoteTOD}
-
-function NetRemoteComputerSupports(UncServerName: LPCWSTR; OptionsWanted: DWORD; OptionsSupported: LPDWORD): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetRemoteComputerSupports}
-
-{$IFDEF SUPPORTS_VARARGS}
-// mvb Delphi 6 and up only (because of the varargs)
-function RxRemoteApi(ApiNumber: DWORD; UncServerName: LPCWSTR; ParmDescString, DataDesc16, DataDesc32, DataDescSmb,
- AuxDesc16, AuxDesc32, AuxDescSmb: LPDESC; Flags: DWORD{, ...}): NET_API_STATUS; cdecl; varargs;
-{$EXTERNALSYM RxRemoteApi}
-{$ENDIF SUPPORTS_VARARGS}
-
-//
-// Data Structures
-//
-
-type
- _TIME_OF_DAY_INFO = record
- tod_elapsedt: DWORD;
- tod_msecs: DWORD;
- tod_hours: DWORD;
- tod_mins: DWORD;
- tod_secs: DWORD;
- tod_hunds: DWORD;
- tod_timezone: LONG;
- tod_tinterval: DWORD;
- tod_day: DWORD;
- tod_month: DWORD;
- tod_year: DWORD;
- tod_weekday: DWORD;
- end;
- {$EXTERNALSYM _TIME_OF_DAY_INFO}
- TIME_OF_DAY_INFO = _TIME_OF_DAY_INFO;
- {$EXTERNALSYM TIME_OF_DAY_INFO}
- PTIME_OF_DAY_INFO = ^TIME_OF_DAY_INFO;
- {$EXTERNALSYM PTIME_OF_DAY_INFO}
- LPTIME_OF_DAY_INFO = ^TIME_OF_DAY_INFO;
- {$EXTERNALSYM LPTIME_OF_DAY_INFO}
- TTimeOfDayInfo = TIME_OF_DAY_INFO;
- PTimeOfDayInfo = PTIME_OF_DAY_INFO;
-
-//
-// Special Values and Constants
-//
-
-//
-// Mask bits for use with NetRemoteComputerSupports:
-//
-
-const
- SUPPORTS_REMOTE_ADMIN_PROTOCOL = $00000002;
- {$EXTERNALSYM SUPPORTS_REMOTE_ADMIN_PROTOCOL}
- SUPPORTS_RPC = $00000004;
- {$EXTERNALSYM SUPPORTS_RPC}
- SUPPORTS_SAM_PROTOCOL = $00000008;
- {$EXTERNALSYM SUPPORTS_SAM_PROTOCOL}
- SUPPORTS_UNICODE = $00000010;
- {$EXTERNALSYM SUPPORTS_UNICODE}
- SUPPORTS_LOCAL = $00000020;
- {$EXTERNALSYM SUPPORTS_LOCAL}
- SUPPORTS_ANY = DWORD($FFFFFFFF);
- {$EXTERNALSYM SUPPORTS_ANY}
-
-//
-// Flag bits for RxRemoteApi:
-//
-
-const
- NO_PERMISSION_REQUIRED = $00000001; // set if use NULL session
- {$EXTERNALSYM NO_PERMISSION_REQUIRED}
- ALLOCATE_RESPONSE = $00000002; // set if RxRemoteApi allocates response buffer
- {$EXTERNALSYM ALLOCATE_RESPONSE}
- USE_SPECIFIC_TRANSPORT = DWORD($80000000);
- {$EXTERNALSYM USE_SPECIFIC_TRANSPORT}
-
-implementation
-
-// todo cdecl function so no dynamic linking for the time being...
-
-{$IFDEF SUPPORTS_VARARGS}
-function RxRemoteApi; external netapi32 name 'RxRemoteApi';
-{$ENDIF SUPPORTS_VARARGS}
-
-{$IFDEF DYNAMIC_LINK}
-
-var
- _NetRemoteTOD: Pointer;
-
-function NetRemoteTOD;
-begin
- GetProcedureAddress(_NetRemoteTOD, netapi32, 'NetRemoteTOD');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetRemoteTOD]
- end;
-end;
-
-var
- _NetRemoteComputerSupports: Pointer;
-
-function NetRemoteComputerSupports;
-begin
- GetProcedureAddress(_NetRemoteComputerSupports, netapi32, 'NetRemoteComputerSupports');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetRemoteComputerSupports]
- end;
-end;
-
-{$ELSE}
-
-function NetRemoteTOD; external netapi32 name 'NetRemoteTOD';
-function NetRemoteComputerSupports; external netapi32 name 'NetRemoteComputerSupports';
-
-{$ENDIF DYNAMIC_LINK}
-
-end.
+{******************************************************************************}
+{ }
+{ Lan Manager Remote API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: lmremutl.h, released November 2001. The original Pascal}
+{ code is: LmRemUtl.pas, released Februari 2002. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwalmremutl.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaLmRemUtl;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "lmremutl.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaLmCons, JwaWinType;
+
+//
+// Type Definitions
+//
+
+type
+ {$IFDEF DESC_CHAR_UNICODE}
+ DESC_CHAR = WCHAR;
+ {$EXTERNALSYM DESC_CHAR}
+ {$ELSE}
+ DESC_CHAR = Char;
+ {$EXTERNALSYM DESC_CHAR}
+ {$ENDIF DESC_CHAR_UNICODE}
+ TDescChar = DESC_CHAR;
+
+ LPDESC = ^DESC_CHAR;
+ {$EXTERNALSYM LPDESC}
+ PDesc = LPDESC;
+
+//
+// Function Prototypes
+//
+
+function NetRemoteTOD(UncServerName: LPCWSTR; var BufferPtr: LPBYTE): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetRemoteTOD}
+
+function NetRemoteComputerSupports(UncServerName: LPCWSTR; OptionsWanted: DWORD; OptionsSupported: LPDWORD): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetRemoteComputerSupports}
+
+{$IFDEF SUPPORTS_VARARGS}
+// mvb Delphi 6 and up only (because of the varargs)
+function RxRemoteApi(ApiNumber: DWORD; UncServerName: LPCWSTR; ParmDescString, DataDesc16, DataDesc32, DataDescSmb,
+ AuxDesc16, AuxDesc32, AuxDescSmb: LPDESC; Flags: DWORD{, ...}): NET_API_STATUS; cdecl; varargs;
+{$EXTERNALSYM RxRemoteApi}
+{$ENDIF SUPPORTS_VARARGS}
+
+//
+// Data Structures
+//
+
+type
+ _TIME_OF_DAY_INFO = record
+ tod_elapsedt: DWORD;
+ tod_msecs: DWORD;
+ tod_hours: DWORD;
+ tod_mins: DWORD;
+ tod_secs: DWORD;
+ tod_hunds: DWORD;
+ tod_timezone: LONG;
+ tod_tinterval: DWORD;
+ tod_day: DWORD;
+ tod_month: DWORD;
+ tod_year: DWORD;
+ tod_weekday: DWORD;
+ end;
+ {$EXTERNALSYM _TIME_OF_DAY_INFO}
+ TIME_OF_DAY_INFO = _TIME_OF_DAY_INFO;
+ {$EXTERNALSYM TIME_OF_DAY_INFO}
+ PTIME_OF_DAY_INFO = ^TIME_OF_DAY_INFO;
+ {$EXTERNALSYM PTIME_OF_DAY_INFO}
+ LPTIME_OF_DAY_INFO = ^TIME_OF_DAY_INFO;
+ {$EXTERNALSYM LPTIME_OF_DAY_INFO}
+ TTimeOfDayInfo = TIME_OF_DAY_INFO;
+ PTimeOfDayInfo = PTIME_OF_DAY_INFO;
+
+//
+// Special Values and Constants
+//
+
+//
+// Mask bits for use with NetRemoteComputerSupports:
+//
+
+const
+ SUPPORTS_REMOTE_ADMIN_PROTOCOL = $00000002;
+ {$EXTERNALSYM SUPPORTS_REMOTE_ADMIN_PROTOCOL}
+ SUPPORTS_RPC = $00000004;
+ {$EXTERNALSYM SUPPORTS_RPC}
+ SUPPORTS_SAM_PROTOCOL = $00000008;
+ {$EXTERNALSYM SUPPORTS_SAM_PROTOCOL}
+ SUPPORTS_UNICODE = $00000010;
+ {$EXTERNALSYM SUPPORTS_UNICODE}
+ SUPPORTS_LOCAL = $00000020;
+ {$EXTERNALSYM SUPPORTS_LOCAL}
+ SUPPORTS_ANY = DWORD($FFFFFFFF);
+ {$EXTERNALSYM SUPPORTS_ANY}
+
+//
+// Flag bits for RxRemoteApi:
+//
+
+const
+ NO_PERMISSION_REQUIRED = $00000001; // set if use NULL session
+ {$EXTERNALSYM NO_PERMISSION_REQUIRED}
+ ALLOCATE_RESPONSE = $00000002; // set if RxRemoteApi allocates response buffer
+ {$EXTERNALSYM ALLOCATE_RESPONSE}
+ USE_SPECIFIC_TRANSPORT = DWORD($80000000);
+ {$EXTERNALSYM USE_SPECIFIC_TRANSPORT}
+
+implementation
+
+// todo cdecl function so no dynamic linking for the time being...
+
+{$IFDEF SUPPORTS_VARARGS}
+function RxRemoteApi; external netapi32 name 'RxRemoteApi';
+{$ENDIF SUPPORTS_VARARGS}
+
+{$IFDEF DYNAMIC_LINK}
+
+var
+ _NetRemoteTOD: Pointer;
+
+function NetRemoteTOD;
+begin
+ GetProcedureAddress(_NetRemoteTOD, netapi32, 'NetRemoteTOD');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetRemoteTOD]
+ end;
+end;
+
+var
+ _NetRemoteComputerSupports: Pointer;
+
+function NetRemoteComputerSupports;
+begin
+ GetProcedureAddress(_NetRemoteComputerSupports, netapi32, 'NetRemoteComputerSupports');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetRemoteComputerSupports]
+ end;
+end;
+
+{$ELSE}
+
+function NetRemoteTOD; external netapi32 name 'NetRemoteTOD';
+function NetRemoteComputerSupports; external netapi32 name 'NetRemoteComputerSupports';
+
+{$ENDIF DYNAMIC_LINK}
+
+end.
diff --git a/packages/extra/winunits/jwalmrepl.pas b/packages/extra/winunits/jwalmrepl.pas
index fda827631b..ef1cf3ad20 100644
--- a/packages/extra/winunits/jwalmrepl.pas
+++ b/packages/extra/winunits/jwalmrepl.pas
@@ -1,564 +1,564 @@
-{******************************************************************************}
-{ }
-{ Lan Manager Replicator API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: lmrepl.h, released November 2001. The original Pascal }
-{ code is: LmRepl.pas, released Februari 2002. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwalmrepl.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaLmRepl;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "lmrepl.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaLmCons, JwaWinType;
-
-//
-// Replicator Configuration APIs
-//
-
-const
- REPL_ROLE_EXPORT = 1;
- {$EXTERNALSYM REPL_ROLE_EXPORT}
- REPL_ROLE_IMPORT = 2;
- {$EXTERNALSYM REPL_ROLE_IMPORT}
- REPL_ROLE_BOTH = 3;
- {$EXTERNALSYM REPL_ROLE_BOTH}
-
- REPL_INTERVAL_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + 0;
- {$EXTERNALSYM REPL_INTERVAL_INFOLEVEL}
- REPL_PULSE_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + 1;
- {$EXTERNALSYM REPL_PULSE_INFOLEVEL}
- REPL_GUARDTIME_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + 2;
- {$EXTERNALSYM REPL_GUARDTIME_INFOLEVEL}
- REPL_RANDOM_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + 3;
- {$EXTERNALSYM REPL_RANDOM_INFOLEVEL}
-
-type
- _REPL_INFO_0 = record
- rp0_role: DWORD;
- rp0_exportpath: LPWSTR;
- rp0_exportlist: LPWSTR;
- rp0_importpath: LPWSTR;
- rp0_importlist: LPWSTR;
- rp0_logonusername: LPWSTR;
- rp0_interval: DWORD;
- rp0_pulse: DWORD;
- rp0_guardtime: DWORD;
- rp0_random: DWORD;
- end;
- {$EXTERNALSYM _REPL_INFO_0}
- REPL_INFO_0 = _REPL_INFO_0;
- {$EXTERNALSYM REPL_INFO_0}
- LPREPL_INFO_0 = ^REPL_INFO_0;
- {$EXTERNALSYM LPREPL_INFO_0}
- PREPL_INFO_0 = ^REPL_INFO_0;
- {$EXTERNALSYM PREPL_INFO_0}
- TReplInfo0 = REPL_INFO_0;
- PReplInfo0 = PREPL_INFO_0;
-
- _REPL_INFO_1000 = record
- rp1000_interval: DWORD;
- end;
- {$EXTERNALSYM _REPL_INFO_1000}
- REPL_INFO_1000 = _REPL_INFO_1000;
- {$EXTERNALSYM REPL_INFO_1000}
- LPREPL_INFO_1000 = ^REPL_INFO_1000;
- {$EXTERNALSYM LPREPL_INFO_1000}
- PREPL_INFO_1000 = ^REPL_INFO_1000;
- {$EXTERNALSYM PREPL_INFO_1000}
- TReplInfo1000 = REPL_INFO_1000;
- PReplInfo1000 = PREPL_INFO_1000;
-
- _REPL_INFO_1001 = record
- rp1001_pulse: DWORD;
- end;
- {$EXTERNALSYM _REPL_INFO_1001}
- REPL_INFO_1001 = _REPL_INFO_1001;
- {$EXTERNALSYM REPL_INFO_1001}
- LPREPL_INFO_1001 = ^REPL_INFO_1001;
- {$EXTERNALSYM LPREPL_INFO_1001}
- PREPL_INFO_1001 = ^REPL_INFO_1001;
- {$EXTERNALSYM PREPL_INFO_1001}
- TReplInfo1001 = REPL_INFO_1001;
- PReplInfo1001 = PREPL_INFO_1001;
-
- _REPL_INFO_1002 = record
- rp1002_guardtime: DWORD;
- end;
- {$EXTERNALSYM _REPL_INFO_1002}
- REPL_INFO_1002 = _REPL_INFO_1002;
- {$EXTERNALSYM REPL_INFO_1002}
- LPREPL_INFO_1002 = ^REPL_INFO_1002;
- {$EXTERNALSYM LPREPL_INFO_1002}
- PREPL_INFO_1002 = ^REPL_INFO_1002;
- {$EXTERNALSYM PREPL_INFO_1002}
- TReplInfo1002 = REPL_INFO_1002;
- PReplInfo1002 = PREPL_INFO_1002;
-
- _REPL_INFO_1003 = record
- rp1003_random: DWORD;
- end;
- {$EXTERNALSYM _REPL_INFO_1003}
- REPL_INFO_1003 = _REPL_INFO_1003;
- {$EXTERNALSYM REPL_INFO_1003}
- LPREPL_INFO_1003 = ^REPL_INFO_1003;
- {$EXTERNALSYM LPREPL_INFO_1003}
- PREPL_INFO_1003 = ^REPL_INFO_1003;
- {$EXTERNALSYM PREPL_INFO_1003}
- TReplInfo1003 = REPL_INFO_1003;
- PReplInfo1003 = PREPL_INFO_1003;
-
-function NetReplGetInfo(servername: LPCWSTR; level: DWORD; var bufptr: LPBYTE): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetReplGetInfo}
-
-function NetReplSetInfo(servername: LPCWSTR; level: DWORD; buf: LPBYTE ; parm_err: LPDWORD): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetReplSetInfo}
-
-//
-// Replicator Export Directory APIs
-//
-
-const
- REPL_INTEGRITY_FILE = 1;
- {$EXTERNALSYM REPL_INTEGRITY_FILE}
- REPL_INTEGRITY_TREE = 2;
- {$EXTERNALSYM REPL_INTEGRITY_TREE}
-
- REPL_EXTENT_FILE = 1;
- {$EXTERNALSYM REPL_EXTENT_FILE}
- REPL_EXTENT_TREE = 2;
- {$EXTERNALSYM REPL_EXTENT_TREE}
-
- REPL_EXPORT_INTEGRITY_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + 0;
- {$EXTERNALSYM REPL_EXPORT_INTEGRITY_INFOLEVEL}
- REPL_EXPORT_EXTENT_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + 1;
- {$EXTERNALSYM REPL_EXPORT_EXTENT_INFOLEVEL}
-
-type
- _REPL_EDIR_INFO_0 = record
- rped0_dirname: LPWSTR;
- end;
- {$EXTERNALSYM _REPL_EDIR_INFO_0}
- REPL_EDIR_INFO_0 = _REPL_EDIR_INFO_0;
- {$EXTERNALSYM REPL_EDIR_INFO_0}
- LPREPL_EDIR_INFO_0 = ^REPL_EDIR_INFO_0;
- {$EXTERNALSYM LPREPL_EDIR_INFO_0}
- PREPL_EDIR_INFO_0 = ^REPL_EDIR_INFO_0;
- {$EXTERNALSYM PREPL_EDIR_INFO_0}
- TReplEdirInfo0 = REPL_EDIR_INFO_0;
- PReplEdirInfo0 = PREPL_EDIR_INFO_0;
-
- _REPL_EDIR_INFO_1 = record
- rped1_dirname: LPWSTR;
- rped1_integrity: DWORD;
- rped1_extent: DWORD;
- end;
- {$EXTERNALSYM _REPL_EDIR_INFO_1}
- REPL_EDIR_INFO_1 = _REPL_EDIR_INFO_1;
- {$EXTERNALSYM REPL_EDIR_INFO_1}
- LPREPL_EDIR_INFO_1 = ^REPL_EDIR_INFO_1;
- {$EXTERNALSYM LPREPL_EDIR_INFO_1}
- PREPL_EDIR_INFO_1 = ^REPL_EDIR_INFO_1;
- {$EXTERNALSYM PREPL_EDIR_INFO_1}
- TReplEdirInfo1 = REPL_EDIR_INFO_1;
- PReplEdirInfo1 = PREPL_EDIR_INFO_1;
-
- _REPL_EDIR_INFO_2 = record
- rped2_dirname: LPWSTR;
- rped2_integrity: DWORD;
- rped2_extent: DWORD;
- rped2_lockcount: DWORD;
- rped2_locktime: DWORD;
- end;
- {$EXTERNALSYM _REPL_EDIR_INFO_2}
- REPL_EDIR_INFO_2 = _REPL_EDIR_INFO_2;
- {$EXTERNALSYM REPL_EDIR_INFO_2}
- LPREPL_EDIR_INFO_2 = ^REPL_EDIR_INFO_2;
- {$EXTERNALSYM LPREPL_EDIR_INFO_2}
- PREPL_EDIR_INFO_2 = ^REPL_EDIR_INFO_2;
- {$EXTERNALSYM PREPL_EDIR_INFO_2}
- TReplEdirInfo2 = REPL_EDIR_INFO_2;
- PReplEdirInfo2 = PREPL_EDIR_INFO_2;
-
- _REPL_EDIR_INFO_1000 = record
- rped1000_integrity: DWORD;
- end;
- {$EXTERNALSYM _REPL_EDIR_INFO_1000}
- REPL_EDIR_INFO_1000 = _REPL_EDIR_INFO_1000;
- {$EXTERNALSYM REPL_EDIR_INFO_1000}
- LPREPL_EDIR_INFO_1000 = ^REPL_EDIR_INFO_1000;
- {$EXTERNALSYM LPREPL_EDIR_INFO_1000}
- PREPL_EDIR_INFO_1000 = ^REPL_EDIR_INFO_1000;
- {$EXTERNALSYM PREPL_EDIR_INFO_1000}
- TReplEdirInfo1000 = REPL_EDIR_INFO_1000;
- PReplEdirInfo1000 = PREPL_EDIR_INFO_1000;
-
- _REPL_EDIR_INFO_1001 = record
- rped1001_extent: DWORD;
- end;
- {$EXTERNALSYM _REPL_EDIR_INFO_1001}
- REPL_EDIR_INFO_1001 = _REPL_EDIR_INFO_1001;
- {$EXTERNALSYM REPL_EDIR_INFO_1001}
- LPREPL_EDIR_INFO_1001 = ^REPL_EDIR_INFO_1001;
- {$EXTERNALSYM LPREPL_EDIR_INFO_1001}
- PREPL_EDIR_INFO_1001 = ^REPL_EDIR_INFO_1001;
- {$EXTERNALSYM PREPL_EDIR_INFO_1001}
- TReplEdirInfo1001 = REPL_EDIR_INFO_1001;
- PReplEdirInfo1001 = PREPL_EDIR_INFO_1001;
-
-function NetReplExportDirAdd(servername: LPCWSTR; level: DWORD; buf: LPBYTE ; parm_err: LPDWORD): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetReplExportDirAdd}
-
-function NetReplExportDirDel(servername: LPCWSTR; dirname: LPCWSTR): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetReplExportDirDel}
-
-function NetReplExportDirEnum(servername: LPCWSTR; level: DWORD; var bufptr: LPBYTE; prefmaxlen: DWORD; entriesread, totalentries, resumehandle: LPDWORD): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetReplExportDirEnum}
-
-function NetReplExportDirGetInfo(servername, dirname: LPCWSTR; level: DWORD; var bufptr: LPBYTE): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetReplExportDirGetInfo}
-
-function NetReplExportDirSetInfo(servername, dirname: LPCWSTR; level: DWORD; buf: LPBYTE; parm_err: LPDWORD): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetReplExportDirSetInfo}
-
-function NetReplExportDirLock(servername: LPCWSTR; dirname: LPCWSTR): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetReplExportDirLock}
-
-function NetReplExportDirUnlock(servername: LPCWSTR; dirname: LPCWSTR; unlockforce: DWORD): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetReplExportDirUnlock}
-
-const
- REPL_UNLOCK_NOFORCE = 0;
- {$EXTERNALSYM REPL_UNLOCK_NOFORCE}
- REPL_UNLOCK_FORCE = 1;
- {$EXTERNALSYM REPL_UNLOCK_FORCE}
-
-//
-// Replicator Import Directory APIs
-//
-
-type
- _REPL_IDIR_INFO_0 = record
- rpid0_dirname: LPWSTR;
- end;
- {$EXTERNALSYM _REPL_IDIR_INFO_0}
- REPL_IDIR_INFO_0 = _REPL_IDIR_INFO_0;
- {$EXTERNALSYM REPL_IDIR_INFO_0}
- LPREPL_IDIR_INFO_0 = ^REPL_IDIR_INFO_0;
- {$EXTERNALSYM LPREPL_IDIR_INFO_0}
- PREPL_IDIR_INFO_0 = ^REPL_IDIR_INFO_0;
- {$EXTERNALSYM PREPL_IDIR_INFO_0}
- TReplIdirInfo0 = REPL_IDIR_INFO_0;
- PReplIdirInfo0 = PREPL_IDIR_INFO_0;
-
- _REPL_IDIR_INFO_1 = record
- rpid1_dirname: LPWSTR;
- rpid1_state: DWORD;
- rpid1_mastername: LPWSTR;
- rpid1_last_update_time: DWORD;
- rpid1_lockcount: DWORD;
- rpid1_locktime: DWORD;
- end;
- {$EXTERNALSYM _REPL_IDIR_INFO_1}
- REPL_IDIR_INFO_1 = _REPL_IDIR_INFO_1;
- {$EXTERNALSYM REPL_IDIR_INFO_1}
- LPREPL_IDIR_INFO_1 = ^REPL_IDIR_INFO_1;
- {$EXTERNALSYM LPREPL_IDIR_INFO_1}
- PREPL_IDIR_INFO_1 = ^REPL_IDIR_INFO_1;
- {$EXTERNALSYM PREPL_IDIR_INFO_1}
- TReplIdirInfo1 = REPL_IDIR_INFO_1;
- PReplIdirInfo1 = PREPL_IDIR_INFO_1;
-
-function NetReplImportDirAdd(servername: LPCWSTR; level: DWORD; buf: LPBYTE; parm_err: LPDWORD): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetReplImportDirAdd}
-
-function NetReplImportDirDel(servername: LPCWSTR; dirname: LPCWSTR): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetReplImportDirDel}
-
-function NetReplImportDirEnum(servername: LPCWSTR; level: DWORD; var bufptr: LPBYTE; prefmaxlen: DWORD; entriesread, totalentries, resumehandle: LPDWORD): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetReplImportDirEnum}
-
-function NetReplImportDirGetInfo(servername, dirname: LPCWSTR; level: DWORD; var bufptr: LPBYTE): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetReplImportDirGetInfo}
-
-function NetReplImportDirLock(servername: LPCWSTR; dirname: LPCWSTR): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetReplImportDirLock}
-
-function NetReplImportDirUnlock(servername: LPCWSTR; dirname: LPCWSTR; unlockforce: DWORD): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetReplImportDirUnlock}
-
-const
- REPL_STATE_OK = 0;
- {$EXTERNALSYM REPL_STATE_OK}
- REPL_STATE_NO_MASTER = 1;
- {$EXTERNALSYM REPL_STATE_NO_MASTER}
- REPL_STATE_NO_SYNC = 2;
- {$EXTERNALSYM REPL_STATE_NO_SYNC}
- REPL_STATE_NEVER_REPLICATED = 3;
- {$EXTERNALSYM REPL_STATE_NEVER_REPLICATED}
-
-implementation
-
-{$IFDEF DYNAMIC_LINK}
-
-var
- _NetReplGetInfo: Pointer;
-
-function NetReplGetInfo;
-begin
- GetProcedureAddress(_NetReplGetInfo, netapi32, 'NetReplGetInfo');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetReplGetInfo]
- end;
-end;
-
-var
- _NetReplSetInfo: Pointer;
-
-function NetReplSetInfo;
-begin
- GetProcedureAddress(_NetReplSetInfo, netapi32, 'NetReplSetInfo');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetReplSetInfo]
- end;
-end;
-
-var
- _NetReplExportDirAdd: Pointer;
-
-function NetReplExportDirAdd;
-begin
- GetProcedureAddress(_NetReplExportDirAdd, netapi32, 'NetReplExportDirAdd');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetReplExportDirAdd]
- end;
-end;
-
-var
- _NetReplExportDirDel: Pointer;
-
-function NetReplExportDirDel;
-begin
- GetProcedureAddress(_NetReplExportDirDel, netapi32, 'NetReplExportDirDel');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetReplExportDirDel]
- end;
-end;
-
-var
- _NetReplExportDirEnum: Pointer;
-
-function NetReplExportDirEnum;
-begin
- GetProcedureAddress(_NetReplExportDirEnum, netapi32, 'NetReplExportDirEnum');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetReplExportDirEnum]
- end;
-end;
-
-var
- _NetReplExportDirGetInfo: Pointer;
-
-function NetReplExportDirGetInfo;
-begin
- GetProcedureAddress(_NetReplExportDirGetInfo, netapi32, 'NetReplExportDirGetInfo');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetReplExportDirGetInfo]
- end;
-end;
-
-var
- _NetReplExportDirSetInfo: Pointer;
-
-function NetReplExportDirSetInfo;
-begin
- GetProcedureAddress(_NetReplExportDirSetInfo, netapi32, 'NetReplExportDirSetInfo');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetReplExportDirSetInfo]
- end;
-end;
-
-var
- _NetReplExportDirLock: Pointer;
-
-function NetReplExportDirLock;
-begin
- GetProcedureAddress(_NetReplExportDirLock, netapi32, 'NetReplExportDirLock');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetReplExportDirLock]
- end;
-end;
-
-var
- _NetReplExportDirUnlock: Pointer;
-
-function NetReplExportDirUnlock;
-begin
- GetProcedureAddress(_NetReplExportDirUnlock, netapi32, 'NetReplExportDirUnlock');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetReplExportDirUnlock]
- end;
-end;
-
-var
- _NetReplImportDirAdd: Pointer;
-
-function NetReplImportDirAdd;
-begin
- GetProcedureAddress(_NetReplImportDirAdd, netapi32, 'NetReplImportDirAdd');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetReplImportDirAdd]
- end;
-end;
-
-var
- _NetReplImportDirDel: Pointer;
-
-function NetReplImportDirDel;
-begin
- GetProcedureAddress(_NetReplImportDirDel, netapi32, 'NetReplImportDirDel');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetReplImportDirDel]
- end;
-end;
-
-var
- _NetReplImportDirEnum: Pointer;
-
-function NetReplImportDirEnum;
-begin
- GetProcedureAddress(_NetReplImportDirEnum, netapi32, 'NetReplImportDirEnum');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetReplImportDirEnum]
- end;
-end;
-
-var
- _NetReplImportDirGetInfo: Pointer;
-
-function NetReplImportDirGetInfo;
-begin
- GetProcedureAddress(_NetReplImportDirGetInfo, netapi32, 'NetReplImportDirGetInfo');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetReplImportDirGetInfo]
- end;
-end;
-
-var
- _NetReplImportDirLock: Pointer;
-
-function NetReplImportDirLock;
-begin
- GetProcedureAddress(_NetReplImportDirLock, netapi32, 'NetReplImportDirLock');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetReplImportDirLock]
- end;
-end;
-
-var
- _NetReplImportDirUnlock: Pointer;
-
-function NetReplImportDirUnlock;
-begin
- GetProcedureAddress(_NetReplImportDirUnlock, netapi32, 'NetReplImportDirUnlock');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetReplImportDirUnlock]
- end;
-end;
-
-{$ELSE}
-
-function NetReplGetInfo; external netapi32 name 'NetReplGetInfo';
-function NetReplSetInfo; external netapi32 name 'NetReplSetInfo';
-function NetReplExportDirAdd; external netapi32 name 'NetReplExportDirAdd';
-function NetReplExportDirDel; external netapi32 name 'NetReplExportDirDel';
-function NetReplExportDirEnum; external netapi32 name 'NetReplExportDirEnum';
-function NetReplExportDirGetInfo; external netapi32 name 'NetReplExportDirGetInfo';
-function NetReplExportDirSetInfo; external netapi32 name 'NetReplExportDirSetInfo';
-function NetReplExportDirLock; external netapi32 name 'NetReplExportDirLock';
-function NetReplExportDirUnlock; external netapi32 name 'NetReplExportDirUnlock';
-function NetReplImportDirAdd; external netapi32 name 'NetReplImportDirAdd';
-function NetReplImportDirDel; external netapi32 name 'NetReplImportDirDel';
-function NetReplImportDirEnum; external netapi32 name 'NetReplImportDirEnum';
-function NetReplImportDirGetInfo; external netapi32 name 'NetReplImportDirGetInfo';
-function NetReplImportDirLock; external netapi32 name 'NetReplImportDirLock';
-function NetReplImportDirUnlock; external netapi32 name 'NetReplImportDirUnlock';
-
-{$ENDIF DYNAMIC_LINK}
-
-end.
+{******************************************************************************}
+{ }
+{ Lan Manager Replicator API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: lmrepl.h, released November 2001. The original Pascal }
+{ code is: LmRepl.pas, released Februari 2002. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwalmrepl.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaLmRepl;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "lmrepl.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaLmCons, JwaWinType;
+
+//
+// Replicator Configuration APIs
+//
+
+const
+ REPL_ROLE_EXPORT = 1;
+ {$EXTERNALSYM REPL_ROLE_EXPORT}
+ REPL_ROLE_IMPORT = 2;
+ {$EXTERNALSYM REPL_ROLE_IMPORT}
+ REPL_ROLE_BOTH = 3;
+ {$EXTERNALSYM REPL_ROLE_BOTH}
+
+ REPL_INTERVAL_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + 0;
+ {$EXTERNALSYM REPL_INTERVAL_INFOLEVEL}
+ REPL_PULSE_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + 1;
+ {$EXTERNALSYM REPL_PULSE_INFOLEVEL}
+ REPL_GUARDTIME_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + 2;
+ {$EXTERNALSYM REPL_GUARDTIME_INFOLEVEL}
+ REPL_RANDOM_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + 3;
+ {$EXTERNALSYM REPL_RANDOM_INFOLEVEL}
+
+type
+ _REPL_INFO_0 = record
+ rp0_role: DWORD;
+ rp0_exportpath: LPWSTR;
+ rp0_exportlist: LPWSTR;
+ rp0_importpath: LPWSTR;
+ rp0_importlist: LPWSTR;
+ rp0_logonusername: LPWSTR;
+ rp0_interval: DWORD;
+ rp0_pulse: DWORD;
+ rp0_guardtime: DWORD;
+ rp0_random: DWORD;
+ end;
+ {$EXTERNALSYM _REPL_INFO_0}
+ REPL_INFO_0 = _REPL_INFO_0;
+ {$EXTERNALSYM REPL_INFO_0}
+ LPREPL_INFO_0 = ^REPL_INFO_0;
+ {$EXTERNALSYM LPREPL_INFO_0}
+ PREPL_INFO_0 = ^REPL_INFO_0;
+ {$EXTERNALSYM PREPL_INFO_0}
+ TReplInfo0 = REPL_INFO_0;
+ PReplInfo0 = PREPL_INFO_0;
+
+ _REPL_INFO_1000 = record
+ rp1000_interval: DWORD;
+ end;
+ {$EXTERNALSYM _REPL_INFO_1000}
+ REPL_INFO_1000 = _REPL_INFO_1000;
+ {$EXTERNALSYM REPL_INFO_1000}
+ LPREPL_INFO_1000 = ^REPL_INFO_1000;
+ {$EXTERNALSYM LPREPL_INFO_1000}
+ PREPL_INFO_1000 = ^REPL_INFO_1000;
+ {$EXTERNALSYM PREPL_INFO_1000}
+ TReplInfo1000 = REPL_INFO_1000;
+ PReplInfo1000 = PREPL_INFO_1000;
+
+ _REPL_INFO_1001 = record
+ rp1001_pulse: DWORD;
+ end;
+ {$EXTERNALSYM _REPL_INFO_1001}
+ REPL_INFO_1001 = _REPL_INFO_1001;
+ {$EXTERNALSYM REPL_INFO_1001}
+ LPREPL_INFO_1001 = ^REPL_INFO_1001;
+ {$EXTERNALSYM LPREPL_INFO_1001}
+ PREPL_INFO_1001 = ^REPL_INFO_1001;
+ {$EXTERNALSYM PREPL_INFO_1001}
+ TReplInfo1001 = REPL_INFO_1001;
+ PReplInfo1001 = PREPL_INFO_1001;
+
+ _REPL_INFO_1002 = record
+ rp1002_guardtime: DWORD;
+ end;
+ {$EXTERNALSYM _REPL_INFO_1002}
+ REPL_INFO_1002 = _REPL_INFO_1002;
+ {$EXTERNALSYM REPL_INFO_1002}
+ LPREPL_INFO_1002 = ^REPL_INFO_1002;
+ {$EXTERNALSYM LPREPL_INFO_1002}
+ PREPL_INFO_1002 = ^REPL_INFO_1002;
+ {$EXTERNALSYM PREPL_INFO_1002}
+ TReplInfo1002 = REPL_INFO_1002;
+ PReplInfo1002 = PREPL_INFO_1002;
+
+ _REPL_INFO_1003 = record
+ rp1003_random: DWORD;
+ end;
+ {$EXTERNALSYM _REPL_INFO_1003}
+ REPL_INFO_1003 = _REPL_INFO_1003;
+ {$EXTERNALSYM REPL_INFO_1003}
+ LPREPL_INFO_1003 = ^REPL_INFO_1003;
+ {$EXTERNALSYM LPREPL_INFO_1003}
+ PREPL_INFO_1003 = ^REPL_INFO_1003;
+ {$EXTERNALSYM PREPL_INFO_1003}
+ TReplInfo1003 = REPL_INFO_1003;
+ PReplInfo1003 = PREPL_INFO_1003;
+
+function NetReplGetInfo(servername: LPCWSTR; level: DWORD; var bufptr: LPBYTE): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetReplGetInfo}
+
+function NetReplSetInfo(servername: LPCWSTR; level: DWORD; buf: LPBYTE ; parm_err: LPDWORD): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetReplSetInfo}
+
+//
+// Replicator Export Directory APIs
+//
+
+const
+ REPL_INTEGRITY_FILE = 1;
+ {$EXTERNALSYM REPL_INTEGRITY_FILE}
+ REPL_INTEGRITY_TREE = 2;
+ {$EXTERNALSYM REPL_INTEGRITY_TREE}
+
+ REPL_EXTENT_FILE = 1;
+ {$EXTERNALSYM REPL_EXTENT_FILE}
+ REPL_EXTENT_TREE = 2;
+ {$EXTERNALSYM REPL_EXTENT_TREE}
+
+ REPL_EXPORT_INTEGRITY_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + 0;
+ {$EXTERNALSYM REPL_EXPORT_INTEGRITY_INFOLEVEL}
+ REPL_EXPORT_EXTENT_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + 1;
+ {$EXTERNALSYM REPL_EXPORT_EXTENT_INFOLEVEL}
+
+type
+ _REPL_EDIR_INFO_0 = record
+ rped0_dirname: LPWSTR;
+ end;
+ {$EXTERNALSYM _REPL_EDIR_INFO_0}
+ REPL_EDIR_INFO_0 = _REPL_EDIR_INFO_0;
+ {$EXTERNALSYM REPL_EDIR_INFO_0}
+ LPREPL_EDIR_INFO_0 = ^REPL_EDIR_INFO_0;
+ {$EXTERNALSYM LPREPL_EDIR_INFO_0}
+ PREPL_EDIR_INFO_0 = ^REPL_EDIR_INFO_0;
+ {$EXTERNALSYM PREPL_EDIR_INFO_0}
+ TReplEdirInfo0 = REPL_EDIR_INFO_0;
+ PReplEdirInfo0 = PREPL_EDIR_INFO_0;
+
+ _REPL_EDIR_INFO_1 = record
+ rped1_dirname: LPWSTR;
+ rped1_integrity: DWORD;
+ rped1_extent: DWORD;
+ end;
+ {$EXTERNALSYM _REPL_EDIR_INFO_1}
+ REPL_EDIR_INFO_1 = _REPL_EDIR_INFO_1;
+ {$EXTERNALSYM REPL_EDIR_INFO_1}
+ LPREPL_EDIR_INFO_1 = ^REPL_EDIR_INFO_1;
+ {$EXTERNALSYM LPREPL_EDIR_INFO_1}
+ PREPL_EDIR_INFO_1 = ^REPL_EDIR_INFO_1;
+ {$EXTERNALSYM PREPL_EDIR_INFO_1}
+ TReplEdirInfo1 = REPL_EDIR_INFO_1;
+ PReplEdirInfo1 = PREPL_EDIR_INFO_1;
+
+ _REPL_EDIR_INFO_2 = record
+ rped2_dirname: LPWSTR;
+ rped2_integrity: DWORD;
+ rped2_extent: DWORD;
+ rped2_lockcount: DWORD;
+ rped2_locktime: DWORD;
+ end;
+ {$EXTERNALSYM _REPL_EDIR_INFO_2}
+ REPL_EDIR_INFO_2 = _REPL_EDIR_INFO_2;
+ {$EXTERNALSYM REPL_EDIR_INFO_2}
+ LPREPL_EDIR_INFO_2 = ^REPL_EDIR_INFO_2;
+ {$EXTERNALSYM LPREPL_EDIR_INFO_2}
+ PREPL_EDIR_INFO_2 = ^REPL_EDIR_INFO_2;
+ {$EXTERNALSYM PREPL_EDIR_INFO_2}
+ TReplEdirInfo2 = REPL_EDIR_INFO_2;
+ PReplEdirInfo2 = PREPL_EDIR_INFO_2;
+
+ _REPL_EDIR_INFO_1000 = record
+ rped1000_integrity: DWORD;
+ end;
+ {$EXTERNALSYM _REPL_EDIR_INFO_1000}
+ REPL_EDIR_INFO_1000 = _REPL_EDIR_INFO_1000;
+ {$EXTERNALSYM REPL_EDIR_INFO_1000}
+ LPREPL_EDIR_INFO_1000 = ^REPL_EDIR_INFO_1000;
+ {$EXTERNALSYM LPREPL_EDIR_INFO_1000}
+ PREPL_EDIR_INFO_1000 = ^REPL_EDIR_INFO_1000;
+ {$EXTERNALSYM PREPL_EDIR_INFO_1000}
+ TReplEdirInfo1000 = REPL_EDIR_INFO_1000;
+ PReplEdirInfo1000 = PREPL_EDIR_INFO_1000;
+
+ _REPL_EDIR_INFO_1001 = record
+ rped1001_extent: DWORD;
+ end;
+ {$EXTERNALSYM _REPL_EDIR_INFO_1001}
+ REPL_EDIR_INFO_1001 = _REPL_EDIR_INFO_1001;
+ {$EXTERNALSYM REPL_EDIR_INFO_1001}
+ LPREPL_EDIR_INFO_1001 = ^REPL_EDIR_INFO_1001;
+ {$EXTERNALSYM LPREPL_EDIR_INFO_1001}
+ PREPL_EDIR_INFO_1001 = ^REPL_EDIR_INFO_1001;
+ {$EXTERNALSYM PREPL_EDIR_INFO_1001}
+ TReplEdirInfo1001 = REPL_EDIR_INFO_1001;
+ PReplEdirInfo1001 = PREPL_EDIR_INFO_1001;
+
+function NetReplExportDirAdd(servername: LPCWSTR; level: DWORD; buf: LPBYTE ; parm_err: LPDWORD): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetReplExportDirAdd}
+
+function NetReplExportDirDel(servername: LPCWSTR; dirname: LPCWSTR): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetReplExportDirDel}
+
+function NetReplExportDirEnum(servername: LPCWSTR; level: DWORD; var bufptr: LPBYTE; prefmaxlen: DWORD; entriesread, totalentries, resumehandle: LPDWORD): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetReplExportDirEnum}
+
+function NetReplExportDirGetInfo(servername, dirname: LPCWSTR; level: DWORD; var bufptr: LPBYTE): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetReplExportDirGetInfo}
+
+function NetReplExportDirSetInfo(servername, dirname: LPCWSTR; level: DWORD; buf: LPBYTE; parm_err: LPDWORD): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetReplExportDirSetInfo}
+
+function NetReplExportDirLock(servername: LPCWSTR; dirname: LPCWSTR): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetReplExportDirLock}
+
+function NetReplExportDirUnlock(servername: LPCWSTR; dirname: LPCWSTR; unlockforce: DWORD): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetReplExportDirUnlock}
+
+const
+ REPL_UNLOCK_NOFORCE = 0;
+ {$EXTERNALSYM REPL_UNLOCK_NOFORCE}
+ REPL_UNLOCK_FORCE = 1;
+ {$EXTERNALSYM REPL_UNLOCK_FORCE}
+
+//
+// Replicator Import Directory APIs
+//
+
+type
+ _REPL_IDIR_INFO_0 = record
+ rpid0_dirname: LPWSTR;
+ end;
+ {$EXTERNALSYM _REPL_IDIR_INFO_0}
+ REPL_IDIR_INFO_0 = _REPL_IDIR_INFO_0;
+ {$EXTERNALSYM REPL_IDIR_INFO_0}
+ LPREPL_IDIR_INFO_0 = ^REPL_IDIR_INFO_0;
+ {$EXTERNALSYM LPREPL_IDIR_INFO_0}
+ PREPL_IDIR_INFO_0 = ^REPL_IDIR_INFO_0;
+ {$EXTERNALSYM PREPL_IDIR_INFO_0}
+ TReplIdirInfo0 = REPL_IDIR_INFO_0;
+ PReplIdirInfo0 = PREPL_IDIR_INFO_0;
+
+ _REPL_IDIR_INFO_1 = record
+ rpid1_dirname: LPWSTR;
+ rpid1_state: DWORD;
+ rpid1_mastername: LPWSTR;
+ rpid1_last_update_time: DWORD;
+ rpid1_lockcount: DWORD;
+ rpid1_locktime: DWORD;
+ end;
+ {$EXTERNALSYM _REPL_IDIR_INFO_1}
+ REPL_IDIR_INFO_1 = _REPL_IDIR_INFO_1;
+ {$EXTERNALSYM REPL_IDIR_INFO_1}
+ LPREPL_IDIR_INFO_1 = ^REPL_IDIR_INFO_1;
+ {$EXTERNALSYM LPREPL_IDIR_INFO_1}
+ PREPL_IDIR_INFO_1 = ^REPL_IDIR_INFO_1;
+ {$EXTERNALSYM PREPL_IDIR_INFO_1}
+ TReplIdirInfo1 = REPL_IDIR_INFO_1;
+ PReplIdirInfo1 = PREPL_IDIR_INFO_1;
+
+function NetReplImportDirAdd(servername: LPCWSTR; level: DWORD; buf: LPBYTE; parm_err: LPDWORD): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetReplImportDirAdd}
+
+function NetReplImportDirDel(servername: LPCWSTR; dirname: LPCWSTR): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetReplImportDirDel}
+
+function NetReplImportDirEnum(servername: LPCWSTR; level: DWORD; var bufptr: LPBYTE; prefmaxlen: DWORD; entriesread, totalentries, resumehandle: LPDWORD): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetReplImportDirEnum}
+
+function NetReplImportDirGetInfo(servername, dirname: LPCWSTR; level: DWORD; var bufptr: LPBYTE): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetReplImportDirGetInfo}
+
+function NetReplImportDirLock(servername: LPCWSTR; dirname: LPCWSTR): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetReplImportDirLock}
+
+function NetReplImportDirUnlock(servername: LPCWSTR; dirname: LPCWSTR; unlockforce: DWORD): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetReplImportDirUnlock}
+
+const
+ REPL_STATE_OK = 0;
+ {$EXTERNALSYM REPL_STATE_OK}
+ REPL_STATE_NO_MASTER = 1;
+ {$EXTERNALSYM REPL_STATE_NO_MASTER}
+ REPL_STATE_NO_SYNC = 2;
+ {$EXTERNALSYM REPL_STATE_NO_SYNC}
+ REPL_STATE_NEVER_REPLICATED = 3;
+ {$EXTERNALSYM REPL_STATE_NEVER_REPLICATED}
+
+implementation
+
+{$IFDEF DYNAMIC_LINK}
+
+var
+ _NetReplGetInfo: Pointer;
+
+function NetReplGetInfo;
+begin
+ GetProcedureAddress(_NetReplGetInfo, netapi32, 'NetReplGetInfo');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetReplGetInfo]
+ end;
+end;
+
+var
+ _NetReplSetInfo: Pointer;
+
+function NetReplSetInfo;
+begin
+ GetProcedureAddress(_NetReplSetInfo, netapi32, 'NetReplSetInfo');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetReplSetInfo]
+ end;
+end;
+
+var
+ _NetReplExportDirAdd: Pointer;
+
+function NetReplExportDirAdd;
+begin
+ GetProcedureAddress(_NetReplExportDirAdd, netapi32, 'NetReplExportDirAdd');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetReplExportDirAdd]
+ end;
+end;
+
+var
+ _NetReplExportDirDel: Pointer;
+
+function NetReplExportDirDel;
+begin
+ GetProcedureAddress(_NetReplExportDirDel, netapi32, 'NetReplExportDirDel');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetReplExportDirDel]
+ end;
+end;
+
+var
+ _NetReplExportDirEnum: Pointer;
+
+function NetReplExportDirEnum;
+begin
+ GetProcedureAddress(_NetReplExportDirEnum, netapi32, 'NetReplExportDirEnum');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetReplExportDirEnum]
+ end;
+end;
+
+var
+ _NetReplExportDirGetInfo: Pointer;
+
+function NetReplExportDirGetInfo;
+begin
+ GetProcedureAddress(_NetReplExportDirGetInfo, netapi32, 'NetReplExportDirGetInfo');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetReplExportDirGetInfo]
+ end;
+end;
+
+var
+ _NetReplExportDirSetInfo: Pointer;
+
+function NetReplExportDirSetInfo;
+begin
+ GetProcedureAddress(_NetReplExportDirSetInfo, netapi32, 'NetReplExportDirSetInfo');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetReplExportDirSetInfo]
+ end;
+end;
+
+var
+ _NetReplExportDirLock: Pointer;
+
+function NetReplExportDirLock;
+begin
+ GetProcedureAddress(_NetReplExportDirLock, netapi32, 'NetReplExportDirLock');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetReplExportDirLock]
+ end;
+end;
+
+var
+ _NetReplExportDirUnlock: Pointer;
+
+function NetReplExportDirUnlock;
+begin
+ GetProcedureAddress(_NetReplExportDirUnlock, netapi32, 'NetReplExportDirUnlock');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetReplExportDirUnlock]
+ end;
+end;
+
+var
+ _NetReplImportDirAdd: Pointer;
+
+function NetReplImportDirAdd;
+begin
+ GetProcedureAddress(_NetReplImportDirAdd, netapi32, 'NetReplImportDirAdd');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetReplImportDirAdd]
+ end;
+end;
+
+var
+ _NetReplImportDirDel: Pointer;
+
+function NetReplImportDirDel;
+begin
+ GetProcedureAddress(_NetReplImportDirDel, netapi32, 'NetReplImportDirDel');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetReplImportDirDel]
+ end;
+end;
+
+var
+ _NetReplImportDirEnum: Pointer;
+
+function NetReplImportDirEnum;
+begin
+ GetProcedureAddress(_NetReplImportDirEnum, netapi32, 'NetReplImportDirEnum');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetReplImportDirEnum]
+ end;
+end;
+
+var
+ _NetReplImportDirGetInfo: Pointer;
+
+function NetReplImportDirGetInfo;
+begin
+ GetProcedureAddress(_NetReplImportDirGetInfo, netapi32, 'NetReplImportDirGetInfo');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetReplImportDirGetInfo]
+ end;
+end;
+
+var
+ _NetReplImportDirLock: Pointer;
+
+function NetReplImportDirLock;
+begin
+ GetProcedureAddress(_NetReplImportDirLock, netapi32, 'NetReplImportDirLock');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetReplImportDirLock]
+ end;
+end;
+
+var
+ _NetReplImportDirUnlock: Pointer;
+
+function NetReplImportDirUnlock;
+begin
+ GetProcedureAddress(_NetReplImportDirUnlock, netapi32, 'NetReplImportDirUnlock');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetReplImportDirUnlock]
+ end;
+end;
+
+{$ELSE}
+
+function NetReplGetInfo; external netapi32 name 'NetReplGetInfo';
+function NetReplSetInfo; external netapi32 name 'NetReplSetInfo';
+function NetReplExportDirAdd; external netapi32 name 'NetReplExportDirAdd';
+function NetReplExportDirDel; external netapi32 name 'NetReplExportDirDel';
+function NetReplExportDirEnum; external netapi32 name 'NetReplExportDirEnum';
+function NetReplExportDirGetInfo; external netapi32 name 'NetReplExportDirGetInfo';
+function NetReplExportDirSetInfo; external netapi32 name 'NetReplExportDirSetInfo';
+function NetReplExportDirLock; external netapi32 name 'NetReplExportDirLock';
+function NetReplExportDirUnlock; external netapi32 name 'NetReplExportDirUnlock';
+function NetReplImportDirAdd; external netapi32 name 'NetReplImportDirAdd';
+function NetReplImportDirDel; external netapi32 name 'NetReplImportDirDel';
+function NetReplImportDirEnum; external netapi32 name 'NetReplImportDirEnum';
+function NetReplImportDirGetInfo; external netapi32 name 'NetReplImportDirGetInfo';
+function NetReplImportDirLock; external netapi32 name 'NetReplImportDirLock';
+function NetReplImportDirUnlock; external netapi32 name 'NetReplImportDirUnlock';
+
+{$ENDIF DYNAMIC_LINK}
+
+end.
diff --git a/packages/extra/winunits/jwalmserver.pas b/packages/extra/winunits/jwalmserver.pas
index 6b1f954fec..57a069e712 100644
--- a/packages/extra/winunits/jwalmserver.pas
+++ b/packages/extra/winunits/jwalmserver.pas
@@ -1,2604 +1,2604 @@
-{******************************************************************************}
-{ }
-{ Lan Manager Server API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: lmserver.h, released November 2001. The original Pascal}
-{ code is: LmServer.pas, released Februari 2002. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwalmserver.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaLmServer;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "lmserver.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaLmCons, JwaWinSvc, JwaWinType;
-
-//
-// Function Prototypes - SERVER
-//
-
-function NetServerEnum(servername: LMCSTR; level: DWORD; var bufptr: LPBYTE; prefmaxlen: DWORD; entriesread: LPDWORD; totalentries: LPDWORD; servertype: DWORD; domain: LMCSTR; resume_handle: LPDWORD): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetServerEnum}
-
-function NetServerEnumEx(ServerName: LMCSTR; Level: DWORD; var Bufptr: LPBYTE; PrefMaxlen: DWORD; EntriesRead: LPDWORD; totalentries: LPDWORD; servertype: DWORD; domain: LMCSTR; FirstNameToReturn: LMCSTR): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetServerEnumEx}
-
-function NetServerGetInfo(servername: LMSTR; level: DWORD; var bufptr: LPBYTE): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetServerGetInfo}
-
-function NetServerSetInfo(servername: LMSTR; level: DWORD; buf: LPBYTE; ParmError: LPDWORD): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetServerSetInfo}
-
-//
-// Temporary hack function.
-//
-
-// todo cdecl??
-
-function NetServerSetInfoCommandLine(argc: WORD; argv: PLMSTR): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetServerSetInfoCommandLine}
-
-function NetServerDiskEnum(servername: LMSTR; level: DWORD; var bufptr: LPBYTE; prefmaxlen: DWORD; entriesread, totalentries, resume_handle: LPDWORD): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetServerDiskEnum}
-
-function NetServerComputerNameAdd(ServerName, EmulatedDomainName, EmulatedServerName: LMSTR): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetServerComputerNameAdd}
-
-function NetServerComputerNameDel(ServerName: LMSTR; EmulatedServerName: LMSTR): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetServerComputerNameDel}
-
-function NetServerTransportAdd(servername: LMSTR; level: DWORD; bufptr: LPBYTE): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetServerTransportAdd}
-
-function NetServerTransportAddEx(servername: LMSTR; level: DWORD; bufptr: LPBYTE): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetServerTransportAddEx}
-
-function NetServerTransportDel(servername: LMSTR; level: DWORD; bufptr: LPBYTE): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetServerTransportDel}
-
-function NetServerTransportEnum(servername: LMSTR; level: DWORD; var bufptr: LPBYTE; prefmaxlen: DWORD; entriesread, totalentries, resumehandle: LPDWORD): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetServerTransportEnum}
-
-//
-// The following function can be called by Win NT services to register
-// their service type. This function is exported from advapi32.dll.
-// Therefore, if this is the only function called by that service, then
-// it is not necessary to link to netapi32.lib.
-//
-
-function SetServiceBits(hServiceStatus: SERVICE_STATUS_HANDLE; dwServiceBits: DWORD; bSetBitsOn: BOOL; bUpdateImmediately: BOOL): BOOL; stdcall;
-{$EXTERNALSYM SetServiceBits}
-
-//
-// Data Structures - SERVER
-//
-
-type
- LPSERVER_INFO_100 = ^SERVER_INFO_100;
- {$EXTERNALSYM LPSERVER_INFO_100}
- PSERVER_INFO_100 = ^SERVER_INFO_100;
- {$EXTERNALSYM PSERVER_INFO_100}
- _SERVER_INFO_100 = record
- sv100_platform_id: DWORD;
- sv100_name: LMSTR;
- end;
- {$EXTERNALSYM _SERVER_INFO_100}
- SERVER_INFO_100 = _SERVER_INFO_100;
- {$EXTERNALSYM SERVER_INFO_100}
- TServerInfo100 = SERVER_INFO_100;
- PServerInfo100 = PSERVER_INFO_100;
-
- LPSERVER_INFO_101 = ^SERVER_INFO_101;
- {$EXTERNALSYM LPSERVER_INFO_101}
- PSERVER_INFO_101 = ^SERVER_INFO_101;
- {$EXTERNALSYM PSERVER_INFO_101}
- _SERVER_INFO_101 = record
- sv101_platform_id: DWORD;
- sv101_name: LMSTR;
- sv101_version_major: DWORD;
- sv101_version_minor: DWORD;
- sv101_type: DWORD;
- sv101_comment: LMSTR;
- end;
- {$EXTERNALSYM _SERVER_INFO_101}
- SERVER_INFO_101 = _SERVER_INFO_101;
- {$EXTERNALSYM SERVER_INFO_101}
- TServerInfo101 = SERVER_INFO_101;
- PServerInfo101 = PSERVER_INFO_101;
-
- LPSERVER_INFO_102 = ^SERVER_INFO_102;
- {$EXTERNALSYM LPSERVER_INFO_102}
- PSERVER_INFO_102 = ^SERVER_INFO_102;
- {$EXTERNALSYM PSERVER_INFO_102}
- _SERVER_INFO_102 = record
- sv102_platform_id: DWORD;
- sv102_name: LMSTR;
- sv102_version_major: DWORD;
- sv102_version_minor: DWORD;
- sv102_type: DWORD;
- sv102_comment: LMSTR;
- sv102_users: DWORD;
- sv102_disc: LONG;
- sv102_hidden: BOOL;
- sv102_announce: DWORD;
- sv102_anndelta: DWORD;
- sv102_licenses: DWORD;
- sv102_userpath: LMSTR;
- end;
- {$EXTERNALSYM _SERVER_INFO_102}
- SERVER_INFO_102 = _SERVER_INFO_102;
- {$EXTERNALSYM SERVER_INFO_102}
- TServerInfo102 = SERVER_INFO_102;
- PServerInfo102 = PSERVER_INFO_102;
-
- LPSERVER_INFO_402 = ^SERVER_INFO_402;
- {$EXTERNALSYM LPSERVER_INFO_402}
- PSERVER_INFO_402 = ^SERVER_INFO_402;
- {$EXTERNALSYM PSERVER_INFO_402}
- _SERVER_INFO_402 = record
- sv402_ulist_mtime: DWORD;
- sv402_glist_mtime: DWORD;
- sv402_alist_mtime: DWORD;
- sv402_alerts: LMSTR;
- sv402_security: DWORD;
- sv402_numadmin: DWORD;
- sv402_lanmask: DWORD;
- sv402_guestacct: LMSTR;
- sv402_chdevs: DWORD;
- sv402_chdevq: DWORD;
- sv402_chdevjobs: DWORD;
- sv402_connections: DWORD;
- sv402_shares: DWORD;
- sv402_openfiles: DWORD;
- sv402_sessopens: DWORD;
- sv402_sessvcs: DWORD;
- sv402_sessreqs: DWORD;
- sv402_opensearch: DWORD;
- sv402_activelocks: DWORD;
- sv402_numreqbuf: DWORD;
- sv402_sizreqbuf: DWORD;
- sv402_numbigbuf: DWORD;
- sv402_numfiletasks: DWORD;
- sv402_alertsched: DWORD;
- sv402_erroralert: DWORD;
- sv402_logonalert: DWORD;
- sv402_accessalert: DWORD;
- sv402_diskalert: DWORD;
- sv402_netioalert: DWORD;
- sv402_maxauditsz: DWORD;
- sv402_srvheuristics: LMSTR;
- end;
- {$EXTERNALSYM _SERVER_INFO_402}
- SERVER_INFO_402 = _SERVER_INFO_402;
- {$EXTERNALSYM SERVER_INFO_402}
- TServerInfo402 = SERVER_INFO_402;
- PServerInfo402 = PSERVER_INFO_402;
-
- LPSERVER_INFO_403 = ^SERVER_INFO_403;
- {$EXTERNALSYM LPSERVER_INFO_403}
- PSERVER_INFO_403 = ^SERVER_INFO_403;
- {$EXTERNALSYM PSERVER_INFO_403}
- _SERVER_INFO_403 = record
- sv403_ulist_mtime: DWORD;
- sv403_glist_mtime: DWORD;
- sv403_alist_mtime: DWORD;
- sv403_alerts: LMSTR;
- sv403_security: DWORD;
- sv403_numadmin: DWORD;
- sv403_lanmask: DWORD;
- sv403_guestacct: LMSTR;
- sv403_chdevs: DWORD;
- sv403_chdevq: DWORD;
- sv403_chdevjobs: DWORD;
- sv403_connections: DWORD;
- sv403_shares: DWORD;
- sv403_openfiles: DWORD;
- sv403_sessopens: DWORD;
- sv403_sessvcs: DWORD;
- sv403_sessreqs: DWORD;
- sv403_opensearch: DWORD;
- sv403_activelocks: DWORD;
- sv403_numreqbuf: DWORD;
- sv403_sizreqbuf: DWORD;
- sv403_numbigbuf: DWORD;
- sv403_numfiletasks: DWORD;
- sv403_alertsched: DWORD;
- sv403_erroralert: DWORD;
- sv403_logonalert: DWORD;
- sv403_accessalert: DWORD;
- sv403_diskalert: DWORD;
- sv403_netioalert: DWORD;
- sv403_maxauditsz: DWORD;
- sv403_srvheuristics: LMSTR;
- sv403_auditedevents: DWORD;
- sv403_autoprofile: DWORD;
- sv403_autopath: LMSTR;
- end;
- {$EXTERNALSYM _SERVER_INFO_403}
- SERVER_INFO_403 = _SERVER_INFO_403;
- {$EXTERNALSYM SERVER_INFO_403}
- TServerInfo403 = SERVER_INFO_403;
- PServerInfo403 = PSERVER_INFO_403;
-
- LPSERVER_INFO_502 = ^SERVER_INFO_502;
- {$EXTERNALSYM LPSERVER_INFO_502}
- PSERVER_INFO_502 = ^SERVER_INFO_502;
- {$EXTERNALSYM PSERVER_INFO_502}
- _SERVER_INFO_502 = record
- sv502_sessopens: DWORD;
- sv502_sessvcs: DWORD;
- sv502_opensearch: DWORD;
- sv502_sizreqbuf: DWORD;
- sv502_initworkitems: DWORD;
- sv502_maxworkitems: DWORD;
- sv502_rawworkitems: DWORD;
- sv502_irpstacksize: DWORD;
- sv502_maxrawbuflen: DWORD;
- sv502_sessusers: DWORD;
- sv502_sessconns: DWORD;
- sv502_maxpagedmemoryusage: DWORD;
- sv502_maxnonpagedmemoryusage: DWORD;
- sv502_enablesoftcompat: BOOL;
- sv502_enableforcedlogoff: BOOL;
- sv502_timesource: BOOL;
- sv502_acceptdownlevelapis: BOOL;
- sv502_lmannounce: BOOL;
- end;
- {$EXTERNALSYM _SERVER_INFO_502}
- SERVER_INFO_502 = _SERVER_INFO_502;
- {$EXTERNALSYM SERVER_INFO_502}
- TServerInfo502 = SERVER_INFO_502;
- PServerInfo502 = PSERVER_INFO_502;
-
- LPSERVER_INFO_503 = ^SERVER_INFO_503;
- {$EXTERNALSYM LPSERVER_INFO_503}
- PSERVER_INFO_503 = ^SERVER_INFO_503;
- {$EXTERNALSYM PSERVER_INFO_503}
- _SERVER_INFO_503 = record
- sv503_sessopens: DWORD;
- sv503_sessvcs: DWORD;
- sv503_opensearch: DWORD;
- sv503_sizreqbuf: DWORD;
- sv503_initworkitems: DWORD;
- sv503_maxworkitems: DWORD;
- sv503_rawworkitems: DWORD;
- sv503_irpstacksize: DWORD;
- sv503_maxrawbuflen: DWORD;
- sv503_sessusers: DWORD;
- sv503_sessconns: DWORD;
- sv503_maxpagedmemoryusage: DWORD;
- sv503_maxnonpagedmemoryusage: DWORD;
- sv503_enablesoftcompat: BOOL;
- sv503_enableforcedlogoff: BOOL;
- sv503_timesource: BOOL;
- sv503_acceptdownlevelapis: BOOL;
- sv503_lmannounce: BOOL;
- sv503_domain: LMSTR;
- sv503_maxcopyreadlen: DWORD;
- sv503_maxcopywritelen: DWORD;
- sv503_minkeepsearch: DWORD;
- sv503_maxkeepsearch: DWORD;
- sv503_minkeepcomplsearch: DWORD;
- sv503_maxkeepcomplsearch: DWORD;
- sv503_threadcountadd: DWORD;
- sv503_numblockthreads: DWORD;
- sv503_scavtimeout: DWORD;
- sv503_minrcvqueue: DWORD;
- sv503_minfreeworkitems: DWORD;
- sv503_xactmemsize: DWORD;
- sv503_threadpriority: DWORD;
- sv503_maxmpxct: DWORD;
- sv503_oplockbreakwait: DWORD;
- sv503_oplockbreakresponsewait: DWORD;
- sv503_enableoplocks: BOOL;
- sv503_enableoplockforceclose: BOOL;
- sv503_enablefcbopens: BOOL;
- sv503_enableraw: BOOL;
- sv503_enablesharednetdrives: BOOL;
- sv503_minfreeconnections: DWORD;
- sv503_maxfreeconnections: DWORD;
- end;
- {$EXTERNALSYM _SERVER_INFO_503}
- SERVER_INFO_503 = _SERVER_INFO_503;
- {$EXTERNALSYM SERVER_INFO_503}
- TServerInfo503 = SERVER_INFO_503;
- PServerInfo503 = PSERVER_INFO_503;
-
- LPSERVER_INFO_599 = ^SERVER_INFO_599;
- {$EXTERNALSYM LPSERVER_INFO_599}
- PSERVER_INFO_599 = ^SERVER_INFO_599;
- {$EXTERNALSYM PSERVER_INFO_599}
- _SERVER_INFO_599 = record
- sv599_sessopens: DWORD;
- sv599_sessvcs: DWORD;
- sv599_opensearch: DWORD;
- sv599_sizreqbuf: DWORD;
- sv599_initworkitems: DWORD;
- sv599_maxworkitems: DWORD;
- sv599_rawworkitems: DWORD;
- sv599_irpstacksize: DWORD;
- sv599_maxrawbuflen: DWORD;
- sv599_sessusers: DWORD;
- sv599_sessconns: DWORD;
- sv599_maxpagedmemoryusage: DWORD;
- sv599_maxnonpagedmemoryusage: DWORD;
- sv599_enablesoftcompat: BOOL;
- sv599_enableforcedlogoff: BOOL;
- sv599_timesource: BOOL;
- sv599_acceptdownlevelapis: BOOL;
- sv599_lmannounce: BOOL;
- sv599_domain: LMSTR;
- sv599_maxcopyreadlen: DWORD;
- sv599_maxcopywritelen: DWORD;
- sv599_minkeepsearch: DWORD;
- sv599_maxkeepsearch: DWORD;
- sv599_minkeepcomplsearch: DWORD;
- sv599_maxkeepcomplsearch: DWORD;
- sv599_threadcountadd: DWORD;
- sv599_numblockthreads: DWORD;
- sv599_scavtimeout: DWORD;
- sv599_minrcvqueue: DWORD;
- sv599_minfreeworkitems: DWORD;
- sv599_xactmemsize: DWORD;
- sv599_threadpriority: DWORD;
- sv599_maxmpxct: DWORD;
- sv599_oplockbreakwait: DWORD;
- sv599_oplockbreakresponsewait: DWORD;
- sv599_enableoplocks: BOOL;
- sv599_enableoplockforceclose: BOOL;
- sv599_enablefcbopens: BOOL;
- sv599_enableraw: BOOL;
- sv599_enablesharednetdrives: BOOL;
- sv599_minfreeconnections: DWORD;
- sv599_maxfreeconnections: DWORD;
- sv599_initsesstable: DWORD;
- sv599_initconntable: DWORD;
- sv599_initfiletable: DWORD;
- sv599_initsearchtable: DWORD;
- sv599_alertschedule: DWORD;
- sv599_errorthreshold: DWORD;
- sv599_networkerrorthreshold: DWORD;
- sv599_diskspacethreshold: DWORD;
- sv599_reserved: DWORD;
- sv599_maxlinkdelay: DWORD;
- sv599_minlinkthroughput: DWORD;
- sv599_linkinfovalidtime: DWORD;
- sv599_scavqosinfoupdatetime: DWORD;
- sv599_maxworkitemidletime: DWORD;
- end;
- {$EXTERNALSYM _SERVER_INFO_599}
- SERVER_INFO_599 = _SERVER_INFO_599;
- {$EXTERNALSYM SERVER_INFO_599}
- TServerInfo599 = SERVER_INFO_599;
- PServerInfo599 = PSERVER_INFO_599;
-
- LPSERVER_INFO_598 = ^SERVER_INFO_598;
- {$EXTERNALSYM LPSERVER_INFO_598}
- PSERVER_INFO_598 = ^SERVER_INFO_598;
- {$EXTERNALSYM PSERVER_INFO_598}
- _SERVER_INFO_598 = record
- sv598_maxrawworkitems: DWORD;
- sv598_maxthreadsperqueue: DWORD;
- sv598_producttype: DWORD;
- sv598_serversize: DWORD;
- sv598_connectionlessautodisc: DWORD;
- sv598_sharingviolationretries: DWORD;
- sv598_sharingviolationdelay: DWORD;
- sv598_maxglobalopensearch: DWORD;
- sv598_removeduplicatesearches: DWORD;
- sv598_lockviolationoffset: DWORD;
- sv598_lockviolationdelay: DWORD;
- sv598_mdlreadswitchover: DWORD;
- sv598_cachedopenlimit: DWORD;
- sv598_otherqueueaffinity: DWORD;
- sv598_restrictnullsessaccess: BOOL;
- sv598_enablewfw311directipx: BOOL;
- sv598_queuesamplesecs: DWORD;
- sv598_balancecount: DWORD;
- sv598_preferredaffinity: DWORD;
- sv598_maxfreerfcbs: DWORD;
- sv598_maxfreemfcbs: DWORD;
- sv598_maxfreelfcbs: DWORD;
- sv598_maxfreepagedpoolchunks: DWORD;
- sv598_minpagedpoolchunksize: DWORD;
- sv598_maxpagedpoolchunksize: DWORD;
- sv598_sendsfrompreferredprocessor: BOOL;
- sv598_cacheddirectorylimit: DWORD;
- sv598_maxcopylength: DWORD;
- sv598_enablecompression: BOOL;
- sv598_autosharewks: BOOL;
- sv598_autoshareserver: BOOL;
- sv598_enablesecuritysignature: BOOL;
- sv598_requiresecuritysignature: BOOL;
- sv598_minclientbuffersize: DWORD;
- sv598_serverguid: GUID;
- sv598_ConnectionNoSessionsTimeout: DWORD;
- sv598_IdleThreadTimeOut: DWORD;
- sv598_enableW9xsecuritysignature: BOOL;
- sv598_enforcekerberosreauthentication: BOOL;
- sv598_disabledos: BOOL;
- sv598_lowdiskspaceminimum: DWORD;
- sv598_disablestrictnamechecking: BOOL;
- end;
- {$EXTERNALSYM _SERVER_INFO_598}
- SERVER_INFO_598 = _SERVER_INFO_598;
- {$EXTERNALSYM SERVER_INFO_598}
- TServerInfo598 = SERVER_INFO_598;
- PServerInfo598 = PSERVER_INFO_598;
-
- LPSERVER_INFO_1005 = ^SERVER_INFO_1005;
- {$EXTERNALSYM LPSERVER_INFO_1005}
- PSERVER_INFO_1005 = ^SERVER_INFO_1005;
- {$EXTERNALSYM PSERVER_INFO_1005}
- _SERVER_INFO_1005 = record
- sv1005_comment: LMSTR;
- end;
- {$EXTERNALSYM _SERVER_INFO_1005}
- SERVER_INFO_1005 = _SERVER_INFO_1005;
- {$EXTERNALSYM SERVER_INFO_1005}
- TServerInfo1005 = SERVER_INFO_1005;
- PServerInfo1005 = PSERVER_INFO_1005;
-
- LPSERVER_INFO_1107 = ^SERVER_INFO_1107;
- {$EXTERNALSYM LPSERVER_INFO_1107}
- PSERVER_INFO_1107 = ^SERVER_INFO_1107;
- {$EXTERNALSYM PSERVER_INFO_1107}
- _SERVER_INFO_1107 = record
- sv1107_users: DWORD;
- end;
- {$EXTERNALSYM _SERVER_INFO_1107}
- SERVER_INFO_1107 = _SERVER_INFO_1107;
- {$EXTERNALSYM SERVER_INFO_1107}
- TServerInfo1107 = SERVER_INFO_1107;
- PServerInfo1107 = PSERVER_INFO_1107;
-
- LPSERVER_INFO_1010 = ^SERVER_INFO_1010;
- {$EXTERNALSYM LPSERVER_INFO_1010}
- PSERVER_INFO_1010 = ^SERVER_INFO_1010;
- {$EXTERNALSYM PSERVER_INFO_1010}
- _SERVER_INFO_1010 = record
- sv1010_disc: LONG;
- end;
- {$EXTERNALSYM _SERVER_INFO_1010}
- SERVER_INFO_1010 = _SERVER_INFO_1010;
- {$EXTERNALSYM SERVER_INFO_1010}
- TServerInfo1010 = SERVER_INFO_1010;
- PServerInfo1010 = PSERVER_INFO_1010;
-
- LPSERVER_INFO_1016 = ^SERVER_INFO_1016;
- {$EXTERNALSYM LPSERVER_INFO_1016}
- PSERVER_INFO_1016 = ^SERVER_INFO_1016;
- {$EXTERNALSYM PSERVER_INFO_1016}
- _SERVER_INFO_1016 = record
- sv1016_hidden: BOOL;
- end;
- {$EXTERNALSYM _SERVER_INFO_1016}
- SERVER_INFO_1016 = _SERVER_INFO_1016;
- {$EXTERNALSYM SERVER_INFO_1016}
- TServerInfo1016 = SERVER_INFO_1016;
- PServerInfo1016 = PSERVER_INFO_1016;
-
- LPSERVER_INFO_1017 = ^SERVER_INFO_1017;
- {$EXTERNALSYM LPSERVER_INFO_1017}
- PSERVER_INFO_1017 = ^SERVER_INFO_1017;
- {$EXTERNALSYM PSERVER_INFO_1017}
- _SERVER_INFO_1017 = record
- sv1017_announce: DWORD;
- end;
- {$EXTERNALSYM _SERVER_INFO_1017}
- SERVER_INFO_1017 = _SERVER_INFO_1017;
- {$EXTERNALSYM SERVER_INFO_1017}
- TServerInfo1017 = SERVER_INFO_1017;
- PServerInfo1017 = PSERVER_INFO_1017;
-
- LPSERVER_INFO_1018 = ^SERVER_INFO_1018;
- {$EXTERNALSYM LPSERVER_INFO_1018}
- PSERVER_INFO_1018 = ^SERVER_INFO_1018;
- {$EXTERNALSYM PSERVER_INFO_1018}
- _SERVER_INFO_1018 = record
- sv1018_anndelta: DWORD;
- end;
- {$EXTERNALSYM _SERVER_INFO_1018}
- SERVER_INFO_1018 = _SERVER_INFO_1018;
- {$EXTERNALSYM SERVER_INFO_1018}
- TServerInfo1018 = SERVER_INFO_1018;
- PServerInfo1018 = PSERVER_INFO_1018;
-
- LPSERVER_INFO_1501 = ^SERVER_INFO_1501;
- {$EXTERNALSYM LPSERVER_INFO_1501}
- PSERVER_INFO_1501 = ^SERVER_INFO_1501;
- {$EXTERNALSYM PSERVER_INFO_1501}
- _SERVER_INFO_1501 = record
- sv1501_sessopens: DWORD;
- end;
- {$EXTERNALSYM _SERVER_INFO_1501}
- SERVER_INFO_1501 = _SERVER_INFO_1501;
- {$EXTERNALSYM SERVER_INFO_1501}
- TServerInfo1501 = SERVER_INFO_1501;
- PServerInfo1501 = PSERVER_INFO_1501;
-
- LPSERVER_INFO_1502 = ^SERVER_INFO_1502;
- {$EXTERNALSYM LPSERVER_INFO_1502}
- PSERVER_INFO_1502 = ^SERVER_INFO_1502;
- {$EXTERNALSYM PSERVER_INFO_1502}
- _SERVER_INFO_1502 = record
- sv1502_sessvcs: DWORD;
- end;
- {$EXTERNALSYM _SERVER_INFO_1502}
- SERVER_INFO_1502 = _SERVER_INFO_1502;
- {$EXTERNALSYM SERVER_INFO_1502}
- TServerInfo1502 = SERVER_INFO_1502;
- PServerInfo1502 = PSERVER_INFO_1502;
-
- LPSERVER_INFO_1503 = ^SERVER_INFO_1503;
- {$EXTERNALSYM LPSERVER_INFO_1503}
- PSERVER_INFO_1503 = ^SERVER_INFO_1503;
- {$EXTERNALSYM PSERVER_INFO_1503}
- _SERVER_INFO_1503 = record
- sv1503_opensearch: DWORD;
- end;
- {$EXTERNALSYM _SERVER_INFO_1503}
- SERVER_INFO_1503 = _SERVER_INFO_1503;
- {$EXTERNALSYM SERVER_INFO_1503}
- TServerInfo1503 = SERVER_INFO_1503;
- PServerInfo1503 = PSERVER_INFO_1503;
-
- LPSERVER_INFO_1506 = ^SERVER_INFO_1506;
- {$EXTERNALSYM LPSERVER_INFO_1506}
- PSERVER_INFO_1506 = ^SERVER_INFO_1506;
- {$EXTERNALSYM PSERVER_INFO_1506}
- _SERVER_INFO_1506 = record
- sv1506_maxworkitems: DWORD;
- end;
- {$EXTERNALSYM _SERVER_INFO_1506}
- SERVER_INFO_1506 = _SERVER_INFO_1506;
- {$EXTERNALSYM SERVER_INFO_1506}
- TServerInfo1506 = SERVER_INFO_1506;
- PServerInfo1506 = PSERVER_INFO_1506;
-
- LPSERVER_INFO_1509 = ^SERVER_INFO_1509;
- {$EXTERNALSYM LPSERVER_INFO_1509}
- PSERVER_INFO_1509 = ^SERVER_INFO_1509;
- {$EXTERNALSYM PSERVER_INFO_1509}
- _SERVER_INFO_1509 = record
- sv1509_maxrawbuflen: DWORD;
- end;
- {$EXTERNALSYM _SERVER_INFO_1509}
- SERVER_INFO_1509 = _SERVER_INFO_1509;
- {$EXTERNALSYM SERVER_INFO_1509}
- TServerInfo1509 = SERVER_INFO_1509;
- PServerInfo1509 = PSERVER_INFO_1509;
-
- LPSERVER_INFO_1510 = ^SERVER_INFO_1510;
- {$EXTERNALSYM LPSERVER_INFO_1510}
- PSERVER_INFO_1510 = ^SERVER_INFO_1510;
- {$EXTERNALSYM PSERVER_INFO_1510}
- _SERVER_INFO_1510 = record
- sv1510_sessusers: DWORD;
- end;
- {$EXTERNALSYM _SERVER_INFO_1510}
- SERVER_INFO_1510 = _SERVER_INFO_1510;
- {$EXTERNALSYM SERVER_INFO_1510}
- TServerInfo1510 = SERVER_INFO_1510;
- PServerInfo1510 = PSERVER_INFO_1510;
-
- LPSERVER_INFO_1511 = ^SERVER_INFO_1511;
- {$EXTERNALSYM LPSERVER_INFO_1511}
- PSERVER_INFO_1511 = ^SERVER_INFO_1511;
- {$EXTERNALSYM PSERVER_INFO_1511}
- _SERVER_INFO_1511 = record
- sv1511_sessconns: DWORD;
- end;
- {$EXTERNALSYM _SERVER_INFO_1511}
- SERVER_INFO_1511 = _SERVER_INFO_1511;
- {$EXTERNALSYM SERVER_INFO_1511}
- TServerInfo1511 = SERVER_INFO_1511;
- PServerInfo1511 = PSERVER_INFO_1511;
-
- LPSERVER_INFO_1512 = ^SERVER_INFO_1512;
- {$EXTERNALSYM LPSERVER_INFO_1512}
- PSERVER_INFO_1512 = ^SERVER_INFO_1512;
- {$EXTERNALSYM PSERVER_INFO_1512}
- _SERVER_INFO_1512 = record
- sv1512_maxnonpagedmemoryusage: DWORD;
- end;
- {$EXTERNALSYM _SERVER_INFO_1512}
- SERVER_INFO_1512 = _SERVER_INFO_1512;
- {$EXTERNALSYM SERVER_INFO_1512}
- TServerInfo1512 = SERVER_INFO_1512;
- PServerInfo1512 = PSERVER_INFO_1512;
-
- LPSERVER_INFO_1513 = ^SERVER_INFO_1513;
- {$EXTERNALSYM LPSERVER_INFO_1513}
- PSERVER_INFO_1513 = ^SERVER_INFO_1513;
- {$EXTERNALSYM PSERVER_INFO_1513}
- _SERVER_INFO_1513 = record
- sv1513_maxpagedmemoryusage: DWORD;
- end;
- {$EXTERNALSYM _SERVER_INFO_1513}
- SERVER_INFO_1513 = _SERVER_INFO_1513;
- {$EXTERNALSYM SERVER_INFO_1513}
- TServerInfo1513 = SERVER_INFO_1513;
- PServerInfo1513 = PSERVER_INFO_1513;
-
- LPSERVER_INFO_1514 = ^SERVER_INFO_1514;
- {$EXTERNALSYM LPSERVER_INFO_1514}
- PSERVER_INFO_1514 = ^SERVER_INFO_1514;
- {$EXTERNALSYM PSERVER_INFO_1514}
- _SERVER_INFO_1514 = record
- sv1514_enablesoftcompat: BOOL;
- end;
- {$EXTERNALSYM _SERVER_INFO_1514}
- SERVER_INFO_1514 = _SERVER_INFO_1514;
- {$EXTERNALSYM SERVER_INFO_1514}
- TServerInfo1514 = SERVER_INFO_1514;
- PServerInfo1514 = PSERVER_INFO_1514;
-
- LPSERVER_INFO_1515 = ^SERVER_INFO_1515;
- {$EXTERNALSYM LPSERVER_INFO_1515}
- PSERVER_INFO_1515 = ^SERVER_INFO_1515;
- {$EXTERNALSYM PSERVER_INFO_1515}
- _SERVER_INFO_1515 = record
- sv1515_enableforcedlogoff: BOOL;
- end;
- {$EXTERNALSYM _SERVER_INFO_1515}
- SERVER_INFO_1515 = _SERVER_INFO_1515;
- {$EXTERNALSYM SERVER_INFO_1515}
- TServerInfo1515 = SERVER_INFO_1515;
- PServerInfo1515 = PSERVER_INFO_1515;
-
- LPSERVER_INFO_1516 = ^SERVER_INFO_1516;
- {$EXTERNALSYM LPSERVER_INFO_1516}
- PSERVER_INFO_1516 = ^SERVER_INFO_1516;
- {$EXTERNALSYM PSERVER_INFO_1516}
- _SERVER_INFO_1516 = record
- sv1516_timesource: BOOL;
- end;
- {$EXTERNALSYM _SERVER_INFO_1516}
- SERVER_INFO_1516 = _SERVER_INFO_1516;
- {$EXTERNALSYM SERVER_INFO_1516}
- TServerInfo1516 = SERVER_INFO_1516;
- PServerInfo1516 = PSERVER_INFO_1516;
-
- LPSERVER_INFO_1518 = ^SERVER_INFO_1518;
- {$EXTERNALSYM LPSERVER_INFO_1518}
- PSERVER_INFO_1518 = ^SERVER_INFO_1518;
- {$EXTERNALSYM PSERVER_INFO_1518}
- _SERVER_INFO_1518 = record
- sv1518_lmannounce: BOOL;
- end;
- {$EXTERNALSYM _SERVER_INFO_1518}
- SERVER_INFO_1518 = _SERVER_INFO_1518;
- {$EXTERNALSYM SERVER_INFO_1518}
- TServerInfo1518 = SERVER_INFO_1518;
- PServerInfo1518 = PSERVER_INFO_1518;
-
- LPSERVER_INFO_1520 = ^SERVER_INFO_1520;
- {$EXTERNALSYM LPSERVER_INFO_1520}
- PSERVER_INFO_1520 = ^SERVER_INFO_1520;
- {$EXTERNALSYM PSERVER_INFO_1520}
- _SERVER_INFO_1520 = record
- sv1520_maxcopyreadlen: DWORD;
- end;
- {$EXTERNALSYM _SERVER_INFO_1520}
- SERVER_INFO_1520 = _SERVER_INFO_1520;
- {$EXTERNALSYM SERVER_INFO_1520}
- TServerInfo1520 = SERVER_INFO_1520;
- PServerInfo1520 = PSERVER_INFO_1520;
-
- LPSERVER_INFO_1521 = ^SERVER_INFO_1521;
- {$EXTERNALSYM LPSERVER_INFO_1521}
- PSERVER_INFO_1521 = ^SERVER_INFO_1521;
- {$EXTERNALSYM PSERVER_INFO_1521}
- _SERVER_INFO_1521 = record
- sv1521_maxcopywritelen: DWORD;
- end;
- {$EXTERNALSYM _SERVER_INFO_1521}
- SERVER_INFO_1521 = _SERVER_INFO_1521;
- {$EXTERNALSYM SERVER_INFO_1521}
- TServerInfo1521 = SERVER_INFO_1521;
- PServerInfo1521 = PSERVER_INFO_1521;
-
- LPSERVER_INFO_1522 = ^SERVER_INFO_1522;
- {$EXTERNALSYM LPSERVER_INFO_1522}
- PSERVER_INFO_1522 = ^SERVER_INFO_1522;
- {$EXTERNALSYM PSERVER_INFO_1522}
- _SERVER_INFO_1522 = record
- sv1522_minkeepsearch: DWORD;
- end;
- {$EXTERNALSYM _SERVER_INFO_1522}
- SERVER_INFO_1522 = _SERVER_INFO_1522;
- {$EXTERNALSYM SERVER_INFO_1522}
- TServerInfo1522 = SERVER_INFO_1522;
- PServerInfo1522 = PSERVER_INFO_1522;
-
- LPSERVER_INFO_1523 = ^SERVER_INFO_1523;
- {$EXTERNALSYM LPSERVER_INFO_1523}
- PSERVER_INFO_1523 = ^SERVER_INFO_1523;
- {$EXTERNALSYM PSERVER_INFO_1523}
- _SERVER_INFO_1523 = record
- sv1523_maxkeepsearch: DWORD;
- end;
- {$EXTERNALSYM _SERVER_INFO_1523}
- SERVER_INFO_1523 = _SERVER_INFO_1523;
- {$EXTERNALSYM SERVER_INFO_1523}
- TServerInfo1523 = SERVER_INFO_1523;
- PServerInfo1523 = PSERVER_INFO_1523;
-
- LPSERVER_INFO_1524 = ^SERVER_INFO_1524;
- {$EXTERNALSYM LPSERVER_INFO_1524}
- PSERVER_INFO_1524 = ^SERVER_INFO_1524;
- {$EXTERNALSYM PSERVER_INFO_1524}
- _SERVER_INFO_1524 = record
- sv1524_minkeepcomplsearch: DWORD;
- end;
- {$EXTERNALSYM _SERVER_INFO_1524}
- SERVER_INFO_1524 = _SERVER_INFO_1524;
- {$EXTERNALSYM SERVER_INFO_1524}
- TServerInfo1524 = SERVER_INFO_1524;
- PServerInfo1524 = PSERVER_INFO_1524;
-
- LPSERVER_INFO_1525 = ^SERVER_INFO_1525;
- {$EXTERNALSYM LPSERVER_INFO_1525}
- PSERVER_INFO_1525 = ^SERVER_INFO_1525;
- {$EXTERNALSYM PSERVER_INFO_1525}
- _SERVER_INFO_1525 = record
- sv1525_maxkeepcomplsearch: DWORD;
- end;
- {$EXTERNALSYM _SERVER_INFO_1525}
- SERVER_INFO_1525 = _SERVER_INFO_1525;
- {$EXTERNALSYM SERVER_INFO_1525}
- TServerInfo1525 = SERVER_INFO_1525;
- PServerInfo1525 = PSERVER_INFO_1525;
-
- LPSERVER_INFO_1528 = ^SERVER_INFO_1528;
- {$EXTERNALSYM LPSERVER_INFO_1528}
- PSERVER_INFO_1528 = ^SERVER_INFO_1528;
- {$EXTERNALSYM PSERVER_INFO_1528}
- _SERVER_INFO_1528 = record
- sv1528_scavtimeout: DWORD;
- end;
- {$EXTERNALSYM _SERVER_INFO_1528}
- SERVER_INFO_1528 = _SERVER_INFO_1528;
- {$EXTERNALSYM SERVER_INFO_1528}
- TServerInfo1528 = SERVER_INFO_1528;
- PServerInfo1528 = PSERVER_INFO_1528;
-
- LPSERVER_INFO_1529 = ^SERVER_INFO_1529;
- {$EXTERNALSYM LPSERVER_INFO_1529}
- PSERVER_INFO_1529 = ^SERVER_INFO_1529;
- {$EXTERNALSYM PSERVER_INFO_1529}
- _SERVER_INFO_1529 = record
- sv1529_minrcvqueue: DWORD;
- end;
- {$EXTERNALSYM _SERVER_INFO_1529}
- SERVER_INFO_1529 = _SERVER_INFO_1529;
- {$EXTERNALSYM SERVER_INFO_1529}
- TServerInfo1529 = SERVER_INFO_1529;
- PServerInfo1529 = PSERVER_INFO_1529;
-
- LPSERVER_INFO_1530 = ^SERVER_INFO_1530;
- {$EXTERNALSYM LPSERVER_INFO_1530}
- PSERVER_INFO_1530 = ^SERVER_INFO_1530;
- {$EXTERNALSYM PSERVER_INFO_1530}
- _SERVER_INFO_1530 = record
- sv1530_minfreeworkitems: DWORD;
- end;
- {$EXTERNALSYM _SERVER_INFO_1530}
- SERVER_INFO_1530 = _SERVER_INFO_1530;
- {$EXTERNALSYM SERVER_INFO_1530}
- TServerInfo1530 = SERVER_INFO_1530;
- PServerInfo1530 = PSERVER_INFO_1530;
-
- LPSERVER_INFO_1533 = ^SERVER_INFO_1533;
- {$EXTERNALSYM LPSERVER_INFO_1533}
- PSERVER_INFO_1533 = ^SERVER_INFO_1533;
- {$EXTERNALSYM PSERVER_INFO_1533}
- _SERVER_INFO_1533 = record
- sv1533_maxmpxct: DWORD;
- end;
- {$EXTERNALSYM _SERVER_INFO_1533}
- SERVER_INFO_1533 = _SERVER_INFO_1533;
- {$EXTERNALSYM SERVER_INFO_1533}
- TServerInfo1533 = SERVER_INFO_1533;
- PServerInfo1533 = PSERVER_INFO_1533;
-
- LPSERVER_INFO_1534 = ^SERVER_INFO_1534;
- {$EXTERNALSYM LPSERVER_INFO_1534}
- PSERVER_INFO_1534 = ^SERVER_INFO_1534;
- {$EXTERNALSYM PSERVER_INFO_1534}
- _SERVER_INFO_1534 = record
- sv1534_oplockbreakwait: DWORD;
- end;
- {$EXTERNALSYM _SERVER_INFO_1534}
- SERVER_INFO_1534 = _SERVER_INFO_1534;
- {$EXTERNALSYM SERVER_INFO_1534}
- TServerInfo1534 = SERVER_INFO_1534;
- PServerInfo1534 = PSERVER_INFO_1534;
-
- LPSERVER_INFO_1535 = ^SERVER_INFO_1535;
- {$EXTERNALSYM LPSERVER_INFO_1535}
- PSERVER_INFO_1535 = ^SERVER_INFO_1535;
- {$EXTERNALSYM PSERVER_INFO_1535}
- _SERVER_INFO_1535 = record
- sv1535_oplockbreakresponsewait: DWORD;
- end;
- {$EXTERNALSYM _SERVER_INFO_1535}
- SERVER_INFO_1535 = _SERVER_INFO_1535;
- {$EXTERNALSYM SERVER_INFO_1535}
- TServerInfo1535 = SERVER_INFO_1535;
- PServerInfo1535 = PSERVER_INFO_1535;
-
- LPSERVER_INFO_1536 = ^SERVER_INFO_1536;
- {$EXTERNALSYM LPSERVER_INFO_1536}
- PSERVER_INFO_1536 = ^SERVER_INFO_1536;
- {$EXTERNALSYM PSERVER_INFO_1536}
- _SERVER_INFO_1536 = record
- sv1536_enableoplocks: BOOL;
- end;
- {$EXTERNALSYM _SERVER_INFO_1536}
- SERVER_INFO_1536 = _SERVER_INFO_1536;
- {$EXTERNALSYM SERVER_INFO_1536}
- TServerInfo1536 = SERVER_INFO_1536;
- PServerInfo1536 = PSERVER_INFO_1536;
-
- LPSERVER_INFO_1537 = ^SERVER_INFO_1537;
- {$EXTERNALSYM LPSERVER_INFO_1537}
- PSERVER_INFO_1537 = ^SERVER_INFO_1537;
- {$EXTERNALSYM PSERVER_INFO_1537}
- _SERVER_INFO_1537 = record
- sv1537_enableoplockforceclose: BOOL;
- end;
- {$EXTERNALSYM _SERVER_INFO_1537}
- SERVER_INFO_1537 = _SERVER_INFO_1537;
- {$EXTERNALSYM SERVER_INFO_1537}
- TServerInfo1537 = SERVER_INFO_1537;
- PServerInfo1537 = PSERVER_INFO_1537;
-
- LPSERVER_INFO_1538 = ^SERVER_INFO_1538;
- {$EXTERNALSYM LPSERVER_INFO_1538}
- PSERVER_INFO_1538 = ^SERVER_INFO_1538;
- {$EXTERNALSYM PSERVER_INFO_1538}
- _SERVER_INFO_1538 = record
- sv1538_enablefcbopens: BOOL;
- end;
- {$EXTERNALSYM _SERVER_INFO_1538}
- SERVER_INFO_1538 = _SERVER_INFO_1538;
- {$EXTERNALSYM SERVER_INFO_1538}
- TServerInfo1538 = SERVER_INFO_1538;
- PServerInfo1538 = PSERVER_INFO_1538;
-
- LPSERVER_INFO_1539 = ^SERVER_INFO_1539;
- {$EXTERNALSYM LPSERVER_INFO_1539}
- PSERVER_INFO_1539 = ^SERVER_INFO_1539;
- {$EXTERNALSYM PSERVER_INFO_1539}
- _SERVER_INFO_1539 = record
- sv1539_enableraw: BOOL;
- end;
- {$EXTERNALSYM _SERVER_INFO_1539}
- SERVER_INFO_1539 = _SERVER_INFO_1539;
- {$EXTERNALSYM SERVER_INFO_1539}
- TServerInfo1539 = SERVER_INFO_1539;
- PServerInfo1539 = PSERVER_INFO_1539;
-
- LPSERVER_INFO_1540 = ^SERVER_INFO_1540;
- {$EXTERNALSYM LPSERVER_INFO_1540}
- PSERVER_INFO_1540 = ^SERVER_INFO_1540;
- {$EXTERNALSYM PSERVER_INFO_1540}
- _SERVER_INFO_1540 = record
- sv1540_enablesharednetdrives: BOOL;
- end;
- {$EXTERNALSYM _SERVER_INFO_1540}
- SERVER_INFO_1540 = _SERVER_INFO_1540;
- {$EXTERNALSYM SERVER_INFO_1540}
- TServerInfo1540 = SERVER_INFO_1540;
- PServerInfo1540 = PSERVER_INFO_1540;
-
- LPSERVER_INFO_1541 = ^SERVER_INFO_1541;
- {$EXTERNALSYM LPSERVER_INFO_1541}
- PSERVER_INFO_1541 = ^SERVER_INFO_1541;
- {$EXTERNALSYM PSERVER_INFO_1541}
- _SERVER_INFO_1541 = record
- sv1541_minfreeconnections: BOOL;
- end;
- {$EXTERNALSYM _SERVER_INFO_1541}
- SERVER_INFO_1541 = _SERVER_INFO_1541;
- {$EXTERNALSYM SERVER_INFO_1541}
- TServerInfo1541 = SERVER_INFO_1541;
- PServerInfo1541 = PSERVER_INFO_1541;
-
- LPSERVER_INFO_1542 = ^SERVER_INFO_1542;
- {$EXTERNALSYM LPSERVER_INFO_1542}
- PSERVER_INFO_1542 = ^SERVER_INFO_1542;
- {$EXTERNALSYM PSERVER_INFO_1542}
- _SERVER_INFO_1542 = record
- sv1542_maxfreeconnections: BOOL;
- end;
- {$EXTERNALSYM _SERVER_INFO_1542}
- SERVER_INFO_1542 = _SERVER_INFO_1542;
- {$EXTERNALSYM SERVER_INFO_1542}
- TServerInfo1542 = SERVER_INFO_1542;
- PServerInfo1542 = PSERVER_INFO_1542;
-
- LPSERVER_INFO_1543 = ^SERVER_INFO_1543;
- {$EXTERNALSYM LPSERVER_INFO_1543}
- PSERVER_INFO_1543 = ^SERVER_INFO_1543;
- {$EXTERNALSYM PSERVER_INFO_1543}
- _SERVER_INFO_1543 = record
- sv1543_initsesstable: DWORD;
- end;
- {$EXTERNALSYM _SERVER_INFO_1543}
- SERVER_INFO_1543 = _SERVER_INFO_1543;
- {$EXTERNALSYM SERVER_INFO_1543}
- TServerInfo1543 = SERVER_INFO_1543;
- PServerInfo1543 = PSERVER_INFO_1543;
-
- LPSERVER_INFO_1544 = ^SERVER_INFO_1544;
- {$EXTERNALSYM LPSERVER_INFO_1544}
- PSERVER_INFO_1544 = ^SERVER_INFO_1544;
- {$EXTERNALSYM PSERVER_INFO_1544}
- _SERVER_INFO_1544 = record
- sv1544_initconntable: DWORD;
- end;
- {$EXTERNALSYM _SERVER_INFO_1544}
- SERVER_INFO_1544 = _SERVER_INFO_1544;
- {$EXTERNALSYM SERVER_INFO_1544}
- TServerInfo1544 = SERVER_INFO_1544;
- PServerInfo1544 = PSERVER_INFO_1544;
-
- LPSERVER_INFO_1545 = ^SERVER_INFO_1545;
- {$EXTERNALSYM LPSERVER_INFO_1545}
- PSERVER_INFO_1545 = ^SERVER_INFO_1545;
- {$EXTERNALSYM PSERVER_INFO_1545}
- _SERVER_INFO_1545 = record
- sv1545_initfiletable: DWORD;
- end;
- {$EXTERNALSYM _SERVER_INFO_1545}
- SERVER_INFO_1545 = _SERVER_INFO_1545;
- {$EXTERNALSYM SERVER_INFO_1545}
- TServerInfo1545 = SERVER_INFO_1545;
- PServerInfo1545 = PSERVER_INFO_1545;
-
- LPSERVER_INFO_1546 = ^SERVER_INFO_1546;
- {$EXTERNALSYM LPSERVER_INFO_1546}
- PSERVER_INFO_1546 = ^SERVER_INFO_1546;
- {$EXTERNALSYM PSERVER_INFO_1546}
- _SERVER_INFO_1546 = record
- sv1546_initsearchtable: DWORD;
- end;
- {$EXTERNALSYM _SERVER_INFO_1546}
- SERVER_INFO_1546 = _SERVER_INFO_1546;
- {$EXTERNALSYM SERVER_INFO_1546}
- TServerInfo1546 = SERVER_INFO_1546;
- PServerInfo1546 = PSERVER_INFO_1546;
-
- LPSERVER_INFO_1547 = ^SERVER_INFO_1547;
- {$EXTERNALSYM LPSERVER_INFO_1547}
- PSERVER_INFO_1547 = ^SERVER_INFO_1547;
- {$EXTERNALSYM PSERVER_INFO_1547}
- _SERVER_INFO_1547 = record
- sv1547_alertschedule: DWORD;
- end;
- {$EXTERNALSYM _SERVER_INFO_1547}
- SERVER_INFO_1547 = _SERVER_INFO_1547;
- {$EXTERNALSYM SERVER_INFO_1547}
- TServerInfo1547 = SERVER_INFO_1547;
- PServerInfo1547 = PSERVER_INFO_1547;
-
- LPSERVER_INFO_1548 = ^SERVER_INFO_1548;
- {$EXTERNALSYM LPSERVER_INFO_1548}
- PSERVER_INFO_1548 = ^SERVER_INFO_1548;
- {$EXTERNALSYM PSERVER_INFO_1548}
- _SERVER_INFO_1548 = record
- sv1548_errorthreshold: DWORD;
- end;
- {$EXTERNALSYM _SERVER_INFO_1548}
- SERVER_INFO_1548 = _SERVER_INFO_1548;
- {$EXTERNALSYM SERVER_INFO_1548}
- TServerInfo1548 = SERVER_INFO_1548;
- PServerInfo1548 = PSERVER_INFO_1548;
-
- LPSERVER_INFO_1549 = ^SERVER_INFO_1549;
- {$EXTERNALSYM LPSERVER_INFO_1549}
- PSERVER_INFO_1549 = ^SERVER_INFO_1549;
- {$EXTERNALSYM PSERVER_INFO_1549}
- _SERVER_INFO_1549 = record
- sv1549_networkerrorthreshold: DWORD;
- end;
- {$EXTERNALSYM _SERVER_INFO_1549}
- SERVER_INFO_1549 = _SERVER_INFO_1549;
- {$EXTERNALSYM SERVER_INFO_1549}
- TServerInfo1549 = SERVER_INFO_1549;
- PServerInfo1549 = PSERVER_INFO_1549;
-
- LPSERVER_INFO_1550 = ^SERVER_INFO_1550;
- {$EXTERNALSYM LPSERVER_INFO_1550}
- PSERVER_INFO_1550 = ^SERVER_INFO_1550;
- {$EXTERNALSYM PSERVER_INFO_1550}
- _SERVER_INFO_1550 = record
- sv1550_diskspacethreshold: DWORD;
- end;
- {$EXTERNALSYM _SERVER_INFO_1550}
- SERVER_INFO_1550 = _SERVER_INFO_1550;
- {$EXTERNALSYM SERVER_INFO_1550}
- TServerInfo1550 = SERVER_INFO_1550;
- PServerInfo1550 = PSERVER_INFO_1550;
-
- LPSERVER_INFO_1552 = ^SERVER_INFO_1552;
- {$EXTERNALSYM LPSERVER_INFO_1552}
- PSERVER_INFO_1552 = ^SERVER_INFO_1552;
- {$EXTERNALSYM PSERVER_INFO_1552}
- _SERVER_INFO_1552 = record
- sv1552_maxlinkdelay: DWORD;
- end;
- {$EXTERNALSYM _SERVER_INFO_1552}
- SERVER_INFO_1552 = _SERVER_INFO_1552;
- {$EXTERNALSYM SERVER_INFO_1552}
- TServerInfo1552 = SERVER_INFO_1552;
- PServerInfo1552 = PSERVER_INFO_1552;
-
- LPSERVER_INFO_1553 = ^SERVER_INFO_1553;
- {$EXTERNALSYM LPSERVER_INFO_1553}
- PSERVER_INFO_1553 = ^SERVER_INFO_1553;
- {$EXTERNALSYM PSERVER_INFO_1553}
- _SERVER_INFO_1553 = record
- sv1553_minlinkthroughput: DWORD;
- end;
- {$EXTERNALSYM _SERVER_INFO_1553}
- SERVER_INFO_1553 = _SERVER_INFO_1553;
- {$EXTERNALSYM SERVER_INFO_1553}
- TServerInfo1553 = SERVER_INFO_1553;
- PServerInfo1553 = PSERVER_INFO_1553;
-
- LPSERVER_INFO_1554 = ^SERVER_INFO_1554;
- {$EXTERNALSYM LPSERVER_INFO_1554}
- PSERVER_INFO_1554 = ^SERVER_INFO_1554;
- {$EXTERNALSYM PSERVER_INFO_1554}
- _SERVER_INFO_1554 = record
- sv1554_linkinfovalidtime: DWORD;
- end;
- {$EXTERNALSYM _SERVER_INFO_1554}
- SERVER_INFO_1554 = _SERVER_INFO_1554;
- {$EXTERNALSYM SERVER_INFO_1554}
- TServerInfo1554 = SERVER_INFO_1554;
- PServerInfo1554 = PSERVER_INFO_1554;
-
- LPSERVER_INFO_1555 = ^SERVER_INFO_1555;
- {$EXTERNALSYM LPSERVER_INFO_1555}
- PSERVER_INFO_1555 = ^SERVER_INFO_1555;
- {$EXTERNALSYM PSERVER_INFO_1555}
- _SERVER_INFO_1555 = record
- sv1555_scavqosinfoupdatetime: DWORD;
- end;
- {$EXTERNALSYM _SERVER_INFO_1555}
- SERVER_INFO_1555 = _SERVER_INFO_1555;
- {$EXTERNALSYM SERVER_INFO_1555}
- TServerInfo1555 = SERVER_INFO_1555;
- PServerInfo1555 = PSERVER_INFO_1555;
-
- LPSERVER_INFO_1556 = ^SERVER_INFO_1556;
- {$EXTERNALSYM LPSERVER_INFO_1556}
- PSERVER_INFO_1556 = ^SERVER_INFO_1556;
- {$EXTERNALSYM PSERVER_INFO_1556}
- _SERVER_INFO_1556 = record
- sv1556_maxworkitemidletime: DWORD;
- end;
- {$EXTERNALSYM _SERVER_INFO_1556}
- SERVER_INFO_1556 = _SERVER_INFO_1556;
- {$EXTERNALSYM SERVER_INFO_1556}
- TServerInfo1556 = SERVER_INFO_1556;
- PServerInfo1556 = PSERVER_INFO_1556;
-
- LPSERVER_INFO_1557 = ^SERVER_INFO_1557;
- {$EXTERNALSYM LPSERVER_INFO_1557}
- PSERVER_INFO_1557 = ^SERVER_INFO_1557;
- {$EXTERNALSYM PSERVER_INFO_1557}
- _SERVER_INFO_1557 = record
- sv1557_maxrawworkitems: DWORD;
- end;
- {$EXTERNALSYM _SERVER_INFO_1557}
- SERVER_INFO_1557 = _SERVER_INFO_1557;
- {$EXTERNALSYM SERVER_INFO_1557}
- TServerInfo1557 = SERVER_INFO_1557;
- PServerInfo1557 = PSERVER_INFO_1557;
-
- LPSERVER_INFO_1560 = ^SERVER_INFO_1560;
- {$EXTERNALSYM LPSERVER_INFO_1560}
- PSERVER_INFO_1560 = ^SERVER_INFO_1560;
- {$EXTERNALSYM PSERVER_INFO_1560}
- _SERVER_INFO_1560 = record
- sv1560_producttype: DWORD;
- end;
- {$EXTERNALSYM _SERVER_INFO_1560}
- SERVER_INFO_1560 = _SERVER_INFO_1560;
- {$EXTERNALSYM SERVER_INFO_1560}
- TServerInfo1560 = SERVER_INFO_1560;
- PServerInfo1560 = PSERVER_INFO_1560;
-
- LPSERVER_INFO_1561 = ^SERVER_INFO_1561;
- {$EXTERNALSYM LPSERVER_INFO_1561}
- PSERVER_INFO_1561 = ^SERVER_INFO_1561;
- {$EXTERNALSYM PSERVER_INFO_1561}
- _SERVER_INFO_1561 = record
- sv1561_serversize: DWORD;
- end;
- {$EXTERNALSYM _SERVER_INFO_1561}
- SERVER_INFO_1561 = _SERVER_INFO_1561;
- {$EXTERNALSYM SERVER_INFO_1561}
- TServerInfo1561 = SERVER_INFO_1561;
- PServerInfo1561 = PSERVER_INFO_1561;
-
- LPSERVER_INFO_1562 = ^SERVER_INFO_1562;
- {$EXTERNALSYM LPSERVER_INFO_1562}
- PSERVER_INFO_1562 = ^SERVER_INFO_1562;
- {$EXTERNALSYM PSERVER_INFO_1562}
- _SERVER_INFO_1562 = record
- sv1562_connectionlessautodisc: DWORD;
- end;
- {$EXTERNALSYM _SERVER_INFO_1562}
- SERVER_INFO_1562 = _SERVER_INFO_1562;
- {$EXTERNALSYM SERVER_INFO_1562}
- TServerInfo1562 = SERVER_INFO_1562;
- PServerInfo1562 = PSERVER_INFO_1562;
-
- LPSERVER_INFO_1563 = ^SERVER_INFO_1563;
- {$EXTERNALSYM LPSERVER_INFO_1563}
- PSERVER_INFO_1563 = ^SERVER_INFO_1563;
- {$EXTERNALSYM PSERVER_INFO_1563}
- _SERVER_INFO_1563 = record
- sv1563_sharingviolationretries: DWORD;
- end;
- {$EXTERNALSYM _SERVER_INFO_1563}
- SERVER_INFO_1563 = _SERVER_INFO_1563;
- {$EXTERNALSYM SERVER_INFO_1563}
- TServerInfo1563 = SERVER_INFO_1563;
- PServerInfo1563 = PSERVER_INFO_1563;
-
- LPSERVER_INFO_1564 = ^SERVER_INFO_1564;
- {$EXTERNALSYM LPSERVER_INFO_1564}
- PSERVER_INFO_1564 = ^SERVER_INFO_1564;
- {$EXTERNALSYM PSERVER_INFO_1564}
- _SERVER_INFO_1564 = record
- sv1564_sharingviolationdelay: DWORD;
- end;
- {$EXTERNALSYM _SERVER_INFO_1564}
- SERVER_INFO_1564 = _SERVER_INFO_1564;
- {$EXTERNALSYM SERVER_INFO_1564}
- TServerInfo1564 = SERVER_INFO_1564;
- PServerInfo1564 = PSERVER_INFO_1564;
-
- LPSERVER_INFO_1565 = ^SERVER_INFO_1565;
- {$EXTERNALSYM LPSERVER_INFO_1565}
- PSERVER_INFO_1565 = ^SERVER_INFO_1565;
- {$EXTERNALSYM PSERVER_INFO_1565}
- _SERVER_INFO_1565 = record
- sv1565_maxglobalopensearch: DWORD;
- end;
- {$EXTERNALSYM _SERVER_INFO_1565}
- SERVER_INFO_1565 = _SERVER_INFO_1565;
- {$EXTERNALSYM SERVER_INFO_1565}
- TServerInfo1565 = SERVER_INFO_1565;
- PServerInfo1565 = PSERVER_INFO_1565;
-
- LPSERVER_INFO_1566 = ^SERVER_INFO_1566;
- {$EXTERNALSYM LPSERVER_INFO_1566}
- PSERVER_INFO_1566 = ^SERVER_INFO_1566;
- {$EXTERNALSYM PSERVER_INFO_1566}
- _SERVER_INFO_1566 = record
- sv1566_removeduplicatesearches: BOOL;
- end;
- {$EXTERNALSYM _SERVER_INFO_1566}
- SERVER_INFO_1566 = _SERVER_INFO_1566;
- {$EXTERNALSYM SERVER_INFO_1566}
- TServerInfo1566 = SERVER_INFO_1566;
- PServerInfo1566 = PSERVER_INFO_1566;
-
- LPSERVER_INFO_1567 = ^SERVER_INFO_1567;
- {$EXTERNALSYM LPSERVER_INFO_1567}
- PSERVER_INFO_1567 = ^SERVER_INFO_1567;
- {$EXTERNALSYM PSERVER_INFO_1567}
- _SERVER_INFO_1567 = record
- sv1567_lockviolationretries: DWORD;
- end;
- {$EXTERNALSYM _SERVER_INFO_1567}
- SERVER_INFO_1567 = _SERVER_INFO_1567;
- {$EXTERNALSYM SERVER_INFO_1567}
- TServerInfo1567 = SERVER_INFO_1567;
- PServerInfo1567 = PSERVER_INFO_1567;
-
- LPSERVER_INFO_1568 = ^SERVER_INFO_1568;
- {$EXTERNALSYM LPSERVER_INFO_1568}
- PSERVER_INFO_1568 = ^SERVER_INFO_1568;
- {$EXTERNALSYM PSERVER_INFO_1568}
- _SERVER_INFO_1568 = record
- sv1568_lockviolationoffset: DWORD;
- end;
- {$EXTERNALSYM _SERVER_INFO_1568}
- SERVER_INFO_1568 = _SERVER_INFO_1568;
- {$EXTERNALSYM SERVER_INFO_1568}
- TServerInfo1568 = SERVER_INFO_1568;
- PServerInfo1568 = PSERVER_INFO_1568;
-
- LPSERVER_INFO_1569 = ^SERVER_INFO_1569;
- {$EXTERNALSYM LPSERVER_INFO_1569}
- PSERVER_INFO_1569 = ^SERVER_INFO_1569;
- {$EXTERNALSYM PSERVER_INFO_1569}
- _SERVER_INFO_1569 = record
- sv1569_lockviolationdelay: DWORD;
- end;
- {$EXTERNALSYM _SERVER_INFO_1569}
- SERVER_INFO_1569 = _SERVER_INFO_1569;
- {$EXTERNALSYM SERVER_INFO_1569}
- TServerInfo1569 = SERVER_INFO_1569;
- PServerInfo1569 = PSERVER_INFO_1569;
-
- LPSERVER_INFO_1570 = ^SERVER_INFO_1570;
- {$EXTERNALSYM LPSERVER_INFO_1570}
- PSERVER_INFO_1570 = ^SERVER_INFO_1570;
- {$EXTERNALSYM PSERVER_INFO_1570}
- _SERVER_INFO_1570 = record
- sv1570_mdlreadswitchover: DWORD;
- end;
- {$EXTERNALSYM _SERVER_INFO_1570}
- SERVER_INFO_1570 = _SERVER_INFO_1570;
- {$EXTERNALSYM SERVER_INFO_1570}
- TServerInfo1570 = SERVER_INFO_1570;
- PServerInfo1570 = PSERVER_INFO_1570;
-
- LPSERVER_INFO_1571 = ^SERVER_INFO_1571;
- {$EXTERNALSYM LPSERVER_INFO_1571}
- PSERVER_INFO_1571 = ^SERVER_INFO_1571;
- {$EXTERNALSYM PSERVER_INFO_1571}
- _SERVER_INFO_1571 = record
- sv1571_cachedopenlimit: DWORD;
- end;
- {$EXTERNALSYM _SERVER_INFO_1571}
- SERVER_INFO_1571 = _SERVER_INFO_1571;
- {$EXTERNALSYM SERVER_INFO_1571}
- TServerInfo1571 = SERVER_INFO_1571;
- PServerInfo1571 = PSERVER_INFO_1571;
-
- LPSERVER_INFO_1572 = ^SERVER_INFO_1572;
- {$EXTERNALSYM LPSERVER_INFO_1572}
- PSERVER_INFO_1572 = ^SERVER_INFO_1572;
- {$EXTERNALSYM PSERVER_INFO_1572}
- _SERVER_INFO_1572 = record
- sv1572_criticalthreads: DWORD;
- end;
- {$EXTERNALSYM _SERVER_INFO_1572}
- SERVER_INFO_1572 = _SERVER_INFO_1572;
- {$EXTERNALSYM SERVER_INFO_1572}
- TServerInfo1572 = SERVER_INFO_1572;
- PServerInfo1572 = PSERVER_INFO_1572;
-
- LPSERVER_INFO_1573 = ^SERVER_INFO_1573;
- {$EXTERNALSYM LPSERVER_INFO_1573}
- PSERVER_INFO_1573 = ^SERVER_INFO_1573;
- {$EXTERNALSYM PSERVER_INFO_1573}
- _SERVER_INFO_1573 = record
- sv1573_restrictnullsessaccess: DWORD;
- end;
- {$EXTERNALSYM _SERVER_INFO_1573}
- SERVER_INFO_1573 = _SERVER_INFO_1573;
- {$EXTERNALSYM SERVER_INFO_1573}
- TServerInfo1573 = SERVER_INFO_1573;
- PServerInfo1573 = PSERVER_INFO_1573;
-
- LPSERVER_INFO_1574 = ^SERVER_INFO_1574;
- {$EXTERNALSYM LPSERVER_INFO_1574}
- PSERVER_INFO_1574 = ^SERVER_INFO_1574;
- {$EXTERNALSYM PSERVER_INFO_1574}
- _SERVER_INFO_1574 = record
- sv1574_enablewfw311directipx: DWORD;
- end;
- {$EXTERNALSYM _SERVER_INFO_1574}
- SERVER_INFO_1574 = _SERVER_INFO_1574;
- {$EXTERNALSYM SERVER_INFO_1574}
- TServerInfo1574 = SERVER_INFO_1574;
- PServerInfo1574 = PSERVER_INFO_1574;
-
- LPSERVER_INFO_1575 = ^SERVER_INFO_1575;
- {$EXTERNALSYM LPSERVER_INFO_1575}
- PSERVER_INFO_1575 = ^SERVER_INFO_1575;
- {$EXTERNALSYM PSERVER_INFO_1575}
- _SERVER_INFO_1575 = record
- sv1575_otherqueueaffinity: DWORD;
- end;
- {$EXTERNALSYM _SERVER_INFO_1575}
- SERVER_INFO_1575 = _SERVER_INFO_1575;
- {$EXTERNALSYM SERVER_INFO_1575}
- TServerInfo1575 = SERVER_INFO_1575;
- PServerInfo1575 = PSERVER_INFO_1575;
-
- LPSERVER_INFO_1576 = ^SERVER_INFO_1576;
- {$EXTERNALSYM LPSERVER_INFO_1576}
- PSERVER_INFO_1576 = ^SERVER_INFO_1576;
- {$EXTERNALSYM PSERVER_INFO_1576}
- _SERVER_INFO_1576 = record
- sv1576_queuesamplesecs: DWORD;
- end;
- {$EXTERNALSYM _SERVER_INFO_1576}
- SERVER_INFO_1576 = _SERVER_INFO_1576;
- {$EXTERNALSYM SERVER_INFO_1576}
- TServerInfo1576 = SERVER_INFO_1576;
- PServerInfo1576 = PSERVER_INFO_1576;
-
- LPSERVER_INFO_1577 = ^SERVER_INFO_1577;
- {$EXTERNALSYM LPSERVER_INFO_1577}
- PSERVER_INFO_1577 = ^SERVER_INFO_1577;
- {$EXTERNALSYM PSERVER_INFO_1577}
- _SERVER_INFO_1577 = record
- sv1577_balancecount: DWORD;
- end;
- {$EXTERNALSYM _SERVER_INFO_1577}
- SERVER_INFO_1577 = _SERVER_INFO_1577;
- {$EXTERNALSYM SERVER_INFO_1577}
- TServerInfo1577 = SERVER_INFO_1577;
- PServerInfo1577 = PSERVER_INFO_1577;
-
- LPSERVER_INFO_1578 = ^SERVER_INFO_1578;
- {$EXTERNALSYM LPSERVER_INFO_1578}
- PSERVER_INFO_1578 = ^SERVER_INFO_1578;
- {$EXTERNALSYM PSERVER_INFO_1578}
- _SERVER_INFO_1578 = record
- sv1578_preferredaffinity: DWORD;
- end;
- {$EXTERNALSYM _SERVER_INFO_1578}
- SERVER_INFO_1578 = _SERVER_INFO_1578;
- {$EXTERNALSYM SERVER_INFO_1578}
- TServerInfo1578 = SERVER_INFO_1578;
- PServerInfo1578 = PSERVER_INFO_1578;
-
- LPSERVER_INFO_1579 = ^SERVER_INFO_1579;
- {$EXTERNALSYM LPSERVER_INFO_1579}
- PSERVER_INFO_1579 = ^SERVER_INFO_1579;
- {$EXTERNALSYM PSERVER_INFO_1579}
- _SERVER_INFO_1579 = record
- sv1579_maxfreerfcbs: DWORD;
- end;
- {$EXTERNALSYM _SERVER_INFO_1579}
- SERVER_INFO_1579 = _SERVER_INFO_1579;
- {$EXTERNALSYM SERVER_INFO_1579}
- TServerInfo1579 = SERVER_INFO_1579;
- PServerInfo1579 = PSERVER_INFO_1579;
-
- LPSERVER_INFO_1580 = ^SERVER_INFO_1580;
- {$EXTERNALSYM LPSERVER_INFO_1580}
- PSERVER_INFO_1580 = ^SERVER_INFO_1580;
- {$EXTERNALSYM PSERVER_INFO_1580}
- _SERVER_INFO_1580 = record
- sv1580_maxfreemfcbs: DWORD;
- end;
- {$EXTERNALSYM _SERVER_INFO_1580}
- SERVER_INFO_1580 = _SERVER_INFO_1580;
- {$EXTERNALSYM SERVER_INFO_1580}
- TServerInfo1580 = SERVER_INFO_1580;
- PServerInfo1580 = PSERVER_INFO_1580;
-
- LPSERVER_INFO_1581 = ^SERVER_INFO_1581;
- {$EXTERNALSYM LPSERVER_INFO_1581}
- PSERVER_INFO_1581 = ^SERVER_INFO_1581;
- {$EXTERNALSYM PSERVER_INFO_1581}
- _SERVER_INFO_1581 = record
- sv1581_maxfreemlcbs: DWORD;
- end;
- {$EXTERNALSYM _SERVER_INFO_1581}
- SERVER_INFO_1581 = _SERVER_INFO_1581;
- {$EXTERNALSYM SERVER_INFO_1581}
- TServerInfo1581 = SERVER_INFO_1581;
- PServerInfo1581 = PSERVER_INFO_1581;
-
- LPSERVER_INFO_1582 = ^SERVER_INFO_1582;
- {$EXTERNALSYM LPSERVER_INFO_1582}
- PSERVER_INFO_1582 = ^SERVER_INFO_1582;
- {$EXTERNALSYM PSERVER_INFO_1582}
- _SERVER_INFO_1582 = record
- sv1582_maxfreepagedpoolchunks: DWORD;
- end;
- {$EXTERNALSYM _SERVER_INFO_1582}
- SERVER_INFO_1582 = _SERVER_INFO_1582;
- {$EXTERNALSYM SERVER_INFO_1582}
- TServerInfo1582 = SERVER_INFO_1582;
- PServerInfo1582 = PSERVER_INFO_1582;
-
- LPSERVER_INFO_1583 = ^SERVER_INFO_1583;
- {$EXTERNALSYM LPSERVER_INFO_1583}
- PSERVER_INFO_1583 = ^SERVER_INFO_1583;
- {$EXTERNALSYM PSERVER_INFO_1583}
- _SERVER_INFO_1583 = record
- sv1583_minpagedpoolchunksize: DWORD;
- end;
- {$EXTERNALSYM _SERVER_INFO_1583}
- SERVER_INFO_1583 = _SERVER_INFO_1583;
- {$EXTERNALSYM SERVER_INFO_1583}
- TServerInfo1583 = SERVER_INFO_1583;
- PServerInfo1583 = PSERVER_INFO_1583;
-
- LPSERVER_INFO_1584 = ^SERVER_INFO_1584;
- {$EXTERNALSYM LPSERVER_INFO_1584}
- PSERVER_INFO_1584 = ^SERVER_INFO_1584;
- {$EXTERNALSYM PSERVER_INFO_1584}
- _SERVER_INFO_1584 = record
- sv1584_maxpagedpoolchunksize: DWORD;
- end;
- {$EXTERNALSYM _SERVER_INFO_1584}
- SERVER_INFO_1584 = _SERVER_INFO_1584;
- {$EXTERNALSYM SERVER_INFO_1584}
- TServerInfo1584 = SERVER_INFO_1584;
- PServerInfo1584 = PSERVER_INFO_1584;
-
- LPSERVER_INFO_1585 = ^SERVER_INFO_1585;
- {$EXTERNALSYM LPSERVER_INFO_1585}
- PSERVER_INFO_1585 = ^SERVER_INFO_1585;
- {$EXTERNALSYM PSERVER_INFO_1585}
- _SERVER_INFO_1585 = record
- sv1585_sendsfrompreferredprocessor: BOOL;
- end;
- {$EXTERNALSYM _SERVER_INFO_1585}
- SERVER_INFO_1585 = _SERVER_INFO_1585;
- {$EXTERNALSYM SERVER_INFO_1585}
- TServerInfo1585 = SERVER_INFO_1585;
- PServerInfo1585 = PSERVER_INFO_1585;
-
- LPSERVER_INFO_1586 = ^SERVER_INFO_1586;
- {$EXTERNALSYM LPSERVER_INFO_1586}
- PSERVER_INFO_1586 = ^SERVER_INFO_1586;
- {$EXTERNALSYM PSERVER_INFO_1586}
- _SERVER_INFO_1586 = record
- sv1586_maxthreadsperqueue: DWORD;
- end;
- {$EXTERNALSYM _SERVER_INFO_1586}
- SERVER_INFO_1586 = _SERVER_INFO_1586;
- {$EXTERNALSYM SERVER_INFO_1586}
- TServerInfo1586 = SERVER_INFO_1586;
- PServerInfo1586 = PSERVER_INFO_1586;
-
- LPSERVER_INFO_1587 = ^SERVER_INFO_1587;
- {$EXTERNALSYM LPSERVER_INFO_1587}
- PSERVER_INFO_1587 = ^SERVER_INFO_1587;
- {$EXTERNALSYM PSERVER_INFO_1587}
- _SERVER_INFO_1587 = record
- sv1587_cacheddirectorylimit: DWORD;
- end;
- {$EXTERNALSYM _SERVER_INFO_1587}
- SERVER_INFO_1587 = _SERVER_INFO_1587;
- {$EXTERNALSYM SERVER_INFO_1587}
- TServerInfo1587 = SERVER_INFO_1587;
- PServerInfo1587 = PSERVER_INFO_1587;
-
- LPSERVER_INFO_1588 = ^SERVER_INFO_1588;
- {$EXTERNALSYM LPSERVER_INFO_1588}
- PSERVER_INFO_1588 = ^SERVER_INFO_1588;
- {$EXTERNALSYM PSERVER_INFO_1588}
- _SERVER_INFO_1588 = record
- sv1588_maxcopylength: DWORD;
- end;
- {$EXTERNALSYM _SERVER_INFO_1588}
- SERVER_INFO_1588 = _SERVER_INFO_1588;
- {$EXTERNALSYM SERVER_INFO_1588}
- TServerInfo1588 = SERVER_INFO_1588;
- PServerInfo1588 = PSERVER_INFO_1588;
-
- LPSERVER_INFO_1590 = ^SERVER_INFO_1590;
- {$EXTERNALSYM LPSERVER_INFO_1590}
- PSERVER_INFO_1590 = ^SERVER_INFO_1590;
- {$EXTERNALSYM PSERVER_INFO_1590}
- _SERVER_INFO_1590 = record
- sv1590_enablecompression: DWORD;
- end;
- {$EXTERNALSYM _SERVER_INFO_1590}
- SERVER_INFO_1590 = _SERVER_INFO_1590;
- {$EXTERNALSYM SERVER_INFO_1590}
- TServerInfo1590 = SERVER_INFO_1590;
- PServerInfo1590 = PSERVER_INFO_1590;
-
- LPSERVER_INFO_1591 = ^SERVER_INFO_1591;
- {$EXTERNALSYM LPSERVER_INFO_1591}
- PSERVER_INFO_1591 = ^SERVER_INFO_1591;
- {$EXTERNALSYM PSERVER_INFO_1591}
- _SERVER_INFO_1591 = record
- sv1591_autosharewks: DWORD;
- end;
- {$EXTERNALSYM _SERVER_INFO_1591}
- SERVER_INFO_1591 = _SERVER_INFO_1591;
- {$EXTERNALSYM SERVER_INFO_1591}
- TServerInfo1591 = SERVER_INFO_1591;
- PServerInfo1591 = PSERVER_INFO_1591;
-
- LPSERVER_INFO_1592 = ^SERVER_INFO_1592;
- {$EXTERNALSYM LPSERVER_INFO_1592}
- PSERVER_INFO_1592 = ^SERVER_INFO_1592;
- {$EXTERNALSYM PSERVER_INFO_1592}
- _SERVER_INFO_1592 = record
- sv1592_autosharewks: DWORD;
- end;
- {$EXTERNALSYM _SERVER_INFO_1592}
- SERVER_INFO_1592 = _SERVER_INFO_1592;
- {$EXTERNALSYM SERVER_INFO_1592}
- TServerInfo1592 = SERVER_INFO_1592;
- PServerInfo1592 = PSERVER_INFO_1592;
-
- LPSERVER_INFO_1593 = ^SERVER_INFO_1593;
- {$EXTERNALSYM LPSERVER_INFO_1593}
- PSERVER_INFO_1593 = ^SERVER_INFO_1593;
- {$EXTERNALSYM PSERVER_INFO_1593}
- _SERVER_INFO_1593 = record
- sv1593_enablesecuritysignature: DWORD;
- end;
- {$EXTERNALSYM _SERVER_INFO_1593}
- SERVER_INFO_1593 = _SERVER_INFO_1593;
- {$EXTERNALSYM SERVER_INFO_1593}
- TServerInfo1593 = SERVER_INFO_1593;
- PServerInfo1593 = PSERVER_INFO_1593;
-
- LPSERVER_INFO_1594 = ^SERVER_INFO_1594;
- {$EXTERNALSYM LPSERVER_INFO_1594}
- PSERVER_INFO_1594 = ^SERVER_INFO_1594;
- {$EXTERNALSYM PSERVER_INFO_1594}
- _SERVER_INFO_1594 = record
- sv1594_requiresecuritysignature: DWORD;
- end;
- {$EXTERNALSYM _SERVER_INFO_1594}
- SERVER_INFO_1594 = _SERVER_INFO_1594;
- {$EXTERNALSYM SERVER_INFO_1594}
- TServerInfo1594 = SERVER_INFO_1594;
- PServerInfo1594 = PSERVER_INFO_1594;
-
- LPSERVER_INFO_1595 = ^SERVER_INFO_1595;
- {$EXTERNALSYM LPSERVER_INFO_1595}
- PSERVER_INFO_1595 = ^SERVER_INFO_1595;
- {$EXTERNALSYM PSERVER_INFO_1595}
- _SERVER_INFO_1595 = record
- sv1595_minclientbuffersize: DWORD;
- end;
- {$EXTERNALSYM _SERVER_INFO_1595}
- SERVER_INFO_1595 = _SERVER_INFO_1595;
- {$EXTERNALSYM SERVER_INFO_1595}
- TServerInfo1595 = SERVER_INFO_1595;
- PServerInfo1595 = PSERVER_INFO_1595;
-
- LPSERVER_INFO_1596 = ^SERVER_INFO_1596;
- {$EXTERNALSYM LPSERVER_INFO_1596}
- PSERVER_INFO_1596 = ^SERVER_INFO_1596;
- {$EXTERNALSYM PSERVER_INFO_1596}
- _SERVER_INFO_1596 = record
- sv1596_ConnectionNoSessionsTimeout: DWORD;
- end;
- {$EXTERNALSYM _SERVER_INFO_1596}
- SERVER_INFO_1596 = _SERVER_INFO_1596;
- {$EXTERNALSYM SERVER_INFO_1596}
- TServerInfo1596 = SERVER_INFO_1596;
- PServerInfo1596 = PSERVER_INFO_1596;
-
- LPSERVER_INFO_1597 = ^SERVER_INFO_1597;
- {$EXTERNALSYM LPSERVER_INFO_1597}
- PSERVER_INFO_1597 = ^SERVER_INFO_1597;
- {$EXTERNALSYM PSERVER_INFO_1597}
- _SERVER_INFO_1597 = record
- sv1597_IdleThreadTimeOut: DWORD;
- end;
- {$EXTERNALSYM _SERVER_INFO_1597}
- SERVER_INFO_1597 = _SERVER_INFO_1597;
- {$EXTERNALSYM SERVER_INFO_1597}
- TServerInfo1597 = SERVER_INFO_1597;
- PServerInfo1597 = PSERVER_INFO_1597;
-
- LPSERVER_INFO_1598 = ^SERVER_INFO_1598;
- {$EXTERNALSYM LPSERVER_INFO_1598}
- PSERVER_INFO_1598 = ^SERVER_INFO_1598;
- {$EXTERNALSYM PSERVER_INFO_1598}
- _SERVER_INFO_1598 = record
- sv1598_enableW9xsecuritysignature: DWORD;
- end;
- {$EXTERNALSYM _SERVER_INFO_1598}
- SERVER_INFO_1598 = _SERVER_INFO_1598;
- {$EXTERNALSYM SERVER_INFO_1598}
- TServerInfo1598 = SERVER_INFO_1598;
- PServerInfo1598 = PSERVER_INFO_1598;
-
- LPSERVER_INFO_1599 = ^SERVER_INFO_1599;
- {$EXTERNALSYM LPSERVER_INFO_1599}
- PSERVER_INFO_1599 = ^SERVER_INFO_1599;
- {$EXTERNALSYM PSERVER_INFO_1599}
- _SERVER_INFO_1599 = record
- sv1598_enforcekerberosreauthentication: BOOLEAN;
- end;
- {$EXTERNALSYM _SERVER_INFO_1599}
- SERVER_INFO_1599 = _SERVER_INFO_1599;
- {$EXTERNALSYM SERVER_INFO_1599}
- TServerInfo1599 = SERVER_INFO_1599;
- PServerInfo1599 = PSERVER_INFO_1599;
-
- LPSERVER_INFO_1600 = ^SERVER_INFO_1600;
- {$EXTERNALSYM LPSERVER_INFO_1600}
- PSERVER_INFO_1600 = ^SERVER_INFO_1600;
- {$EXTERNALSYM PSERVER_INFO_1600}
- _SERVER_INFO_1600 = record
- sv1598_disabledos: BOOLEAN;
- end;
- {$EXTERNALSYM _SERVER_INFO_1600}
- SERVER_INFO_1600 = _SERVER_INFO_1600;
- {$EXTERNALSYM SERVER_INFO_1600}
- TServerInfo1600 = SERVER_INFO_1600;
- PServerInfo1600 = PSERVER_INFO_1600;
-
- LPSERVER_INFO_1601 = ^SERVER_INFO_1601;
- {$EXTERNALSYM LPSERVER_INFO_1601}
- PSERVER_INFO_1601 = ^SERVER_INFO_1601;
- {$EXTERNALSYM PSERVER_INFO_1601}
- _SERVER_INFO_1601 = record
- sv1598_lowdiskspaceminimum: DWORD;
- end;
- {$EXTERNALSYM _SERVER_INFO_1601}
- SERVER_INFO_1601 = _SERVER_INFO_1601;
- {$EXTERNALSYM SERVER_INFO_1601}
- TServerInfo1601 = SERVER_INFO_1601;
- PServerInfo1601 = PSERVER_INFO_1601;
-
- LPSERVER_INFO_1602 = ^SERVER_INFO_1602;
- {$EXTERNALSYM LPSERVER_INFO_1602}
- PSERVER_INFO_1602 = ^SERVER_INFO_1602;
- {$EXTERNALSYM PSERVER_INFO_1602}
- _SERVER_INFO_1602 = record
- sv_1598_disablestrictnamechecking: BOOL;
- end;
- {$EXTERNALSYM _SERVER_INFO_1602}
- SERVER_INFO_1602 = _SERVER_INFO_1602;
- {$EXTERNALSYM SERVER_INFO_1602}
- TServerInfo1602 = SERVER_INFO_1602;
- PServerInfo1602 = PSERVER_INFO_1602;
-
-//
-// A special structure definition is required in order for this
-// structure to work with RPC. The problem is that having addresslength
-// indicate the number of bytes in address means that RPC must know the
-// link between the two.
-//
-
- LPSERVER_TRANSPORT_INFO_0 = ^SERVER_TRANSPORT_INFO_0;
- {$EXTERNALSYM LPSERVER_TRANSPORT_INFO_0}
- PSERVER_TRANSPORT_INFO_0 = ^SERVER_TRANSPORT_INFO_0;
- {$EXTERNALSYM PSERVER_TRANSPORT_INFO_0}
- _SERVER_TRANSPORT_INFO_0 = record
- svti0_numberofvcs: DWORD;
- svti0_transportname: LMSTR;
- svti0_transportaddress: LPBYTE;
- svti0_transportaddresslength: DWORD;
- svti0_networkaddress: LMSTR;
- end;
- {$EXTERNALSYM _SERVER_TRANSPORT_INFO_0}
- SERVER_TRANSPORT_INFO_0 = _SERVER_TRANSPORT_INFO_0;
- {$EXTERNALSYM SERVER_TRANSPORT_INFO_0}
- TServerTransportInfo0 = SERVER_TRANSPORT_INFO_0;
- PServerTransportInfo0 = PSERVER_TRANSPORT_INFO_0;
-
- LPSERVER_TRANSPORT_INFO_1 = ^SERVER_TRANSPORT_INFO_1;
- {$EXTERNALSYM LPSERVER_TRANSPORT_INFO_1}
- PSERVER_TRANSPORT_INFO_1 = ^SERVER_TRANSPORT_INFO_1;
- {$EXTERNALSYM PSERVER_TRANSPORT_INFO_1}
- _SERVER_TRANSPORT_INFO_1 = record
- svti1_numberofvcs: DWORD;
- svti1_transportname: LMSTR;
- svti1_transportaddress: LPBYTE;
- svti1_transportaddresslength: DWORD;
- svti1_networkaddress: LMSTR;
- svti1_domain: LMSTR;
- end;
- {$EXTERNALSYM _SERVER_TRANSPORT_INFO_1}
- SERVER_TRANSPORT_INFO_1 = _SERVER_TRANSPORT_INFO_1;
- {$EXTERNALSYM SERVER_TRANSPORT_INFO_1}
- TServerTransportInfo1 = SERVER_TRANSPORT_INFO_1;
- PServerTransportInfo1 = PSERVER_TRANSPORT_INFO_1;
-
- LPSERVER_TRANSPORT_INFO_2 = ^SERVER_TRANSPORT_INFO_2;
- {$EXTERNALSYM LPSERVER_TRANSPORT_INFO_2}
- PSERVER_TRANSPORT_INFO_2 = ^SERVER_TRANSPORT_INFO_2;
- {$EXTERNALSYM PSERVER_TRANSPORT_INFO_2}
- _SERVER_TRANSPORT_INFO_2 = record
- svti2_numberofvcs: DWORD;
- svti2_transportname: LMSTR;
- svti2_transportaddress: LPBYTE;
- svti2_transportaddresslength: DWORD;
- svti2_networkaddress: LMSTR;
- svti2_domain: LMSTR;
- svti2_flags: ULONG;
- end;
- {$EXTERNALSYM _SERVER_TRANSPORT_INFO_2}
- SERVER_TRANSPORT_INFO_2 = _SERVER_TRANSPORT_INFO_2;
- {$EXTERNALSYM SERVER_TRANSPORT_INFO_2}
- TServerTransportInfo2 = SERVER_TRANSPORT_INFO_2;
- PServerTransportInfo2 = PSERVER_TRANSPORT_INFO_2;
-
- LPSERVER_TRANSPORT_INFO_3 = ^SERVER_TRANSPORT_INFO_3;
- {$EXTERNALSYM LPSERVER_TRANSPORT_INFO_3}
- PSERVER_TRANSPORT_INFO_3 = ^SERVER_TRANSPORT_INFO_3;
- {$EXTERNALSYM PSERVER_TRANSPORT_INFO_3}
- _SERVER_TRANSPORT_INFO_3 = record
- svti3_numberofvcs: DWORD;
- svti3_transportname: LMSTR;
- svti3_transportaddress: LPBYTE;
- svti3_transportaddresslength: DWORD;
- svti3_networkaddress: LMSTR;
- svti3_domain: LMSTR;
- svti3_flags: ULONG;
- svti3_passwordlength: DWORD;
- svti3_password: array [0..256 - 1] of BYTE;
- end;
- {$EXTERNALSYM _SERVER_TRANSPORT_INFO_3}
- SERVER_TRANSPORT_INFO_3 = _SERVER_TRANSPORT_INFO_3;
- {$EXTERNALSYM SERVER_TRANSPORT_INFO_3}
- TServerTransportInfo3 = SERVER_TRANSPORT_INFO_3;
- PServerTransportInfo3 = PSERVER_TRANSPORT_INFO_3;
-
-//
-// Defines - SERVER
-//
-
-//
-// The platform ID indicates the levels to use for platform-specific
-// information.
-//
-
-const
- SV_PLATFORM_ID_OS2 = 400;
- {$EXTERNALSYM SV_PLATFORM_ID_OS2}
- SV_PLATFORM_ID_NT = 500;
- {$EXTERNALSYM SV_PLATFORM_ID_NT}
-
-//
-// Mask to be applied to svX_version_major in order to obtain
-// the major version number.
-//
-
- MAJOR_VERSION_MASK = $0F;
- {$EXTERNALSYM MAJOR_VERSION_MASK}
-
-//
-// Bit-mapped values for svX_type fields. X = 1, 2 or 3.
-//
-
- SV_TYPE_WORKSTATION = $00000001;
- {$EXTERNALSYM SV_TYPE_WORKSTATION}
- SV_TYPE_SERVER = $00000002;
- {$EXTERNALSYM SV_TYPE_SERVER}
- SV_TYPE_SQLSERVER = $00000004;
- {$EXTERNALSYM SV_TYPE_SQLSERVER}
- SV_TYPE_DOMAIN_CTRL = $00000008;
- {$EXTERNALSYM SV_TYPE_DOMAIN_CTRL}
- SV_TYPE_DOMAIN_BAKCTRL = $00000010;
- {$EXTERNALSYM SV_TYPE_DOMAIN_BAKCTRL}
- SV_TYPE_TIME_SOURCE = $00000020;
- {$EXTERNALSYM SV_TYPE_TIME_SOURCE}
- SV_TYPE_AFP = $00000040;
- {$EXTERNALSYM SV_TYPE_AFP}
- SV_TYPE_NOVELL = $00000080;
- {$EXTERNALSYM SV_TYPE_NOVELL}
- SV_TYPE_DOMAIN_MEMBER = $00000100;
- {$EXTERNALSYM SV_TYPE_DOMAIN_MEMBER}
- SV_TYPE_PRINTQ_SERVER = $00000200;
- {$EXTERNALSYM SV_TYPE_PRINTQ_SERVER}
- SV_TYPE_DIALIN_SERVER = $00000400;
- {$EXTERNALSYM SV_TYPE_DIALIN_SERVER}
- SV_TYPE_XENIX_SERVER = $00000800;
- {$EXTERNALSYM SV_TYPE_XENIX_SERVER}
- SV_TYPE_SERVER_UNIX = SV_TYPE_XENIX_SERVER;
- {$EXTERNALSYM SV_TYPE_SERVER_UNIX}
- SV_TYPE_NT = $00001000;
- {$EXTERNALSYM SV_TYPE_NT}
- SV_TYPE_WFW = $00002000;
- {$EXTERNALSYM SV_TYPE_WFW}
- SV_TYPE_SERVER_MFPN = $00004000;
- {$EXTERNALSYM SV_TYPE_SERVER_MFPN}
- SV_TYPE_SERVER_NT = $00008000;
- {$EXTERNALSYM SV_TYPE_SERVER_NT}
- SV_TYPE_POTENTIAL_BROWSER = $00010000;
- {$EXTERNALSYM SV_TYPE_POTENTIAL_BROWSER}
- SV_TYPE_BACKUP_BROWSER = $00020000;
- {$EXTERNALSYM SV_TYPE_BACKUP_BROWSER}
- SV_TYPE_MASTER_BROWSER = $00040000;
- {$EXTERNALSYM SV_TYPE_MASTER_BROWSER}
- SV_TYPE_DOMAIN_MASTER = $00080000;
- {$EXTERNALSYM SV_TYPE_DOMAIN_MASTER}
- SV_TYPE_SERVER_OSF = $00100000;
- {$EXTERNALSYM SV_TYPE_SERVER_OSF}
- SV_TYPE_SERVER_VMS = $00200000;
- {$EXTERNALSYM SV_TYPE_SERVER_VMS}
- SV_TYPE_WINDOWS = $00400000; // Windows95 and above
- {$EXTERNALSYM SV_TYPE_WINDOWS}
- SV_TYPE_DFS = $00800000; // Root of a DFS tree
- {$EXTERNALSYM SV_TYPE_DFS}
- SV_TYPE_CLUSTER_NT = $01000000; // NT Cluster
- {$EXTERNALSYM SV_TYPE_CLUSTER_NT}
- SV_TYPE_TERMINALSERVER = $02000000; // Terminal Server(Hydra)
- {$EXTERNALSYM SV_TYPE_TERMINALSERVER}
- SV_TYPE_CLUSTER_VS_NT = $04000000; // NT Cluster Virtual Server Name
- {$EXTERNALSYM SV_TYPE_CLUSTER_VS_NT}
- SV_TYPE_DCE = $10000000; // IBM DSS (Directory and Security Services) or equivalent
- {$EXTERNALSYM SV_TYPE_DCE}
- SV_TYPE_ALTERNATE_XPORT = $20000000; // return list for alternate transport
- {$EXTERNALSYM SV_TYPE_ALTERNATE_XPORT}
- SV_TYPE_LOCAL_LIST_ONLY = $40000000; // Return local list only
- {$EXTERNALSYM SV_TYPE_LOCAL_LIST_ONLY}
- SV_TYPE_DOMAIN_ENUM = DWORD($80000000);
- {$EXTERNALSYM SV_TYPE_DOMAIN_ENUM}
- SV_TYPE_ALL = DWORD($FFFFFFFF); // handy for NetServerEnum2
- {$EXTERNALSYM SV_TYPE_ALL}
-
-//
-// Special value for sv102_disc that specifies infinite disconnect
-// time.
-//
-
- SV_NODISC = DWORD(-1); // No autodisconnect timeout enforced
- {$EXTERNALSYM SV_NODISC}
-
-//
-// Values of svX_security field. X = 2 or 3.
-//
-
- SV_USERSECURITY = 1;
- {$EXTERNALSYM SV_USERSECURITY}
- SV_SHARESECURITY = 0;
- {$EXTERNALSYM SV_SHARESECURITY}
-
-//
-// Values of svX_hidden field. X = 2 or 3.
-//
-
- SV_HIDDEN = 1;
- {$EXTERNALSYM SV_HIDDEN}
- SV_VISIBLE = 0;
- {$EXTERNALSYM SV_VISIBLE}
-
-//
-// Values for ParmError parameter to NetServerSetInfo.
-//
-
- SV_PLATFORM_ID_PARMNUM = 101;
- {$EXTERNALSYM SV_PLATFORM_ID_PARMNUM}
- SV_NAME_PARMNUM = 102;
- {$EXTERNALSYM SV_NAME_PARMNUM}
- SV_VERSION_MAJOR_PARMNUM = 103;
- {$EXTERNALSYM SV_VERSION_MAJOR_PARMNUM}
- SV_VERSION_MINOR_PARMNUM = 104;
- {$EXTERNALSYM SV_VERSION_MINOR_PARMNUM}
- SV_TYPE_PARMNUM = 105;
- {$EXTERNALSYM SV_TYPE_PARMNUM}
- SV_COMMENT_PARMNUM = 5;
- {$EXTERNALSYM SV_COMMENT_PARMNUM}
- SV_USERS_PARMNUM = 107;
- {$EXTERNALSYM SV_USERS_PARMNUM}
- SV_DISC_PARMNUM = 10;
- {$EXTERNALSYM SV_DISC_PARMNUM}
- SV_HIDDEN_PARMNUM = 16;
- {$EXTERNALSYM SV_HIDDEN_PARMNUM}
- SV_ANNOUNCE_PARMNUM = 17;
- {$EXTERNALSYM SV_ANNOUNCE_PARMNUM}
- SV_ANNDELTA_PARMNUM = 18;
- {$EXTERNALSYM SV_ANNDELTA_PARMNUM}
- SV_USERPATH_PARMNUM = 112;
- {$EXTERNALSYM SV_USERPATH_PARMNUM}
-
- SV_ULIST_MTIME_PARMNUM = 401;
- {$EXTERNALSYM SV_ULIST_MTIME_PARMNUM}
- SV_GLIST_MTIME_PARMNUM = 402;
- {$EXTERNALSYM SV_GLIST_MTIME_PARMNUM}
- SV_ALIST_MTIME_PARMNUM = 403;
- {$EXTERNALSYM SV_ALIST_MTIME_PARMNUM}
- SV_ALERTS_PARMNUM = 11;
- {$EXTERNALSYM SV_ALERTS_PARMNUM}
- SV_SECURITY_PARMNUM = 405;
- {$EXTERNALSYM SV_SECURITY_PARMNUM}
- SV_NUMADMIN_PARMNUM = 406;
- {$EXTERNALSYM SV_NUMADMIN_PARMNUM}
- SV_LANMASK_PARMNUM = 407;
- {$EXTERNALSYM SV_LANMASK_PARMNUM}
- SV_GUESTACC_PARMNUM = 408;
- {$EXTERNALSYM SV_GUESTACC_PARMNUM}
- SV_CHDEVQ_PARMNUM = 410;
- {$EXTERNALSYM SV_CHDEVQ_PARMNUM}
- SV_CHDEVJOBS_PARMNUM = 411;
- {$EXTERNALSYM SV_CHDEVJOBS_PARMNUM}
- SV_CONNECTIONS_PARMNUM = 412;
- {$EXTERNALSYM SV_CONNECTIONS_PARMNUM}
- SV_SHARES_PARMNUM = 413;
- {$EXTERNALSYM SV_SHARES_PARMNUM}
- SV_OPENFILES_PARMNUM = 414;
- {$EXTERNALSYM SV_OPENFILES_PARMNUM}
- SV_SESSREQS_PARMNUM = 417;
- {$EXTERNALSYM SV_SESSREQS_PARMNUM}
- SV_ACTIVELOCKS_PARMNUM = 419;
- {$EXTERNALSYM SV_ACTIVELOCKS_PARMNUM}
- SV_NUMREQBUF_PARMNUM = 420;
- {$EXTERNALSYM SV_NUMREQBUF_PARMNUM}
- SV_NUMBIGBUF_PARMNUM = 422;
- {$EXTERNALSYM SV_NUMBIGBUF_PARMNUM}
- SV_NUMFILETASKS_PARMNUM = 423;
- {$EXTERNALSYM SV_NUMFILETASKS_PARMNUM}
- SV_ALERTSCHED_PARMNUM = 37;
- {$EXTERNALSYM SV_ALERTSCHED_PARMNUM}
- SV_ERRORALERT_PARMNUM = 38;
- {$EXTERNALSYM SV_ERRORALERT_PARMNUM}
- SV_LOGONALERT_PARMNUM = 39;
- {$EXTERNALSYM SV_LOGONALERT_PARMNUM}
- SV_ACCESSALERT_PARMNUM = 40;
- {$EXTERNALSYM SV_ACCESSALERT_PARMNUM}
- SV_DISKALERT_PARMNUM = 41;
- {$EXTERNALSYM SV_DISKALERT_PARMNUM}
- SV_NETIOALERT_PARMNUM = 42;
- {$EXTERNALSYM SV_NETIOALERT_PARMNUM}
- SV_MAXAUDITSZ_PARMNUM = 43;
- {$EXTERNALSYM SV_MAXAUDITSZ_PARMNUM}
- SV_SRVHEURISTICS_PARMNUM = 431;
- {$EXTERNALSYM SV_SRVHEURISTICS_PARMNUM}
-
- SV_SESSOPENS_PARMNUM = 501;
- {$EXTERNALSYM SV_SESSOPENS_PARMNUM}
- SV_SESSVCS_PARMNUM = 502;
- {$EXTERNALSYM SV_SESSVCS_PARMNUM}
- SV_OPENSEARCH_PARMNUM = 503;
- {$EXTERNALSYM SV_OPENSEARCH_PARMNUM}
- SV_SIZREQBUF_PARMNUM = 504;
- {$EXTERNALSYM SV_SIZREQBUF_PARMNUM}
- SV_INITWORKITEMS_PARMNUM = 505;
- {$EXTERNALSYM SV_INITWORKITEMS_PARMNUM}
- SV_MAXWORKITEMS_PARMNUM = 506;
- {$EXTERNALSYM SV_MAXWORKITEMS_PARMNUM}
- SV_RAWWORKITEMS_PARMNUM = 507;
- {$EXTERNALSYM SV_RAWWORKITEMS_PARMNUM}
- SV_IRPSTACKSIZE_PARMNUM = 508;
- {$EXTERNALSYM SV_IRPSTACKSIZE_PARMNUM}
- SV_MAXRAWBUFLEN_PARMNUM = 509;
- {$EXTERNALSYM SV_MAXRAWBUFLEN_PARMNUM}
- SV_SESSUSERS_PARMNUM = 510;
- {$EXTERNALSYM SV_SESSUSERS_PARMNUM}
- SV_SESSCONNS_PARMNUM = 511;
- {$EXTERNALSYM SV_SESSCONNS_PARMNUM}
- SV_MAXNONPAGEDMEMORYUSAGE_PARMNUM = 512;
- {$EXTERNALSYM SV_MAXNONPAGEDMEMORYUSAGE_PARMNUM}
- SV_MAXPAGEDMEMORYUSAGE_PARMNUM = 513;
- {$EXTERNALSYM SV_MAXPAGEDMEMORYUSAGE_PARMNUM}
- SV_ENABLESOFTCOMPAT_PARMNUM = 514;
- {$EXTERNALSYM SV_ENABLESOFTCOMPAT_PARMNUM}
- SV_ENABLEFORCEDLOGOFF_PARMNUM = 515;
- {$EXTERNALSYM SV_ENABLEFORCEDLOGOFF_PARMNUM}
- SV_TIMESOURCE_PARMNUM = 516;
- {$EXTERNALSYM SV_TIMESOURCE_PARMNUM}
- SV_ACCEPTDOWNLEVELAPIS_PARMNUM = 517;
- {$EXTERNALSYM SV_ACCEPTDOWNLEVELAPIS_PARMNUM}
- SV_LMANNOUNCE_PARMNUM = 518;
- {$EXTERNALSYM SV_LMANNOUNCE_PARMNUM}
- SV_DOMAIN_PARMNUM = 519;
- {$EXTERNALSYM SV_DOMAIN_PARMNUM}
- SV_MAXCOPYREADLEN_PARMNUM = 520;
- {$EXTERNALSYM SV_MAXCOPYREADLEN_PARMNUM}
- SV_MAXCOPYWRITELEN_PARMNUM = 521;
- {$EXTERNALSYM SV_MAXCOPYWRITELEN_PARMNUM}
- SV_MINKEEPSEARCH_PARMNUM = 522;
- {$EXTERNALSYM SV_MINKEEPSEARCH_PARMNUM}
- SV_MAXKEEPSEARCH_PARMNUM = 523;
- {$EXTERNALSYM SV_MAXKEEPSEARCH_PARMNUM}
- SV_MINKEEPCOMPLSEARCH_PARMNUM = 524;
- {$EXTERNALSYM SV_MINKEEPCOMPLSEARCH_PARMNUM}
- SV_MAXKEEPCOMPLSEARCH_PARMNUM = 525;
- {$EXTERNALSYM SV_MAXKEEPCOMPLSEARCH_PARMNUM}
- SV_THREADCOUNTADD_PARMNUM = 526;
- {$EXTERNALSYM SV_THREADCOUNTADD_PARMNUM}
- SV_NUMBLOCKTHREADS_PARMNUM = 527;
- {$EXTERNALSYM SV_NUMBLOCKTHREADS_PARMNUM}
- SV_SCAVTIMEOUT_PARMNUM = 528;
- {$EXTERNALSYM SV_SCAVTIMEOUT_PARMNUM}
- SV_MINRCVQUEUE_PARMNUM = 529;
- {$EXTERNALSYM SV_MINRCVQUEUE_PARMNUM}
- SV_MINFREEWORKITEMS_PARMNUM = 530;
- {$EXTERNALSYM SV_MINFREEWORKITEMS_PARMNUM}
- SV_XACTMEMSIZE_PARMNUM = 531;
- {$EXTERNALSYM SV_XACTMEMSIZE_PARMNUM}
- SV_THREADPRIORITY_PARMNUM = 532;
- {$EXTERNALSYM SV_THREADPRIORITY_PARMNUM}
- SV_MAXMPXCT_PARMNUM = 533;
- {$EXTERNALSYM SV_MAXMPXCT_PARMNUM}
- SV_OPLOCKBREAKWAIT_PARMNUM = 534;
- {$EXTERNALSYM SV_OPLOCKBREAKWAIT_PARMNUM}
- SV_OPLOCKBREAKRESPONSEWAIT_PARMNUM = 535;
- {$EXTERNALSYM SV_OPLOCKBREAKRESPONSEWAIT_PARMNUM}
- SV_ENABLEOPLOCKS_PARMNUM = 536;
- {$EXTERNALSYM SV_ENABLEOPLOCKS_PARMNUM}
- SV_ENABLEOPLOCKFORCECLOSE_PARMNUM = 537;
- {$EXTERNALSYM SV_ENABLEOPLOCKFORCECLOSE_PARMNUM}
- SV_ENABLEFCBOPENS_PARMNUM = 538;
- {$EXTERNALSYM SV_ENABLEFCBOPENS_PARMNUM}
- SV_ENABLERAW_PARMNUM = 539;
- {$EXTERNALSYM SV_ENABLERAW_PARMNUM}
- SV_ENABLESHAREDNETDRIVES_PARMNUM = 540;
- {$EXTERNALSYM SV_ENABLESHAREDNETDRIVES_PARMNUM}
- SV_MINFREECONNECTIONS_PARMNUM = 541;
- {$EXTERNALSYM SV_MINFREECONNECTIONS_PARMNUM}
- SV_MAXFREECONNECTIONS_PARMNUM = 542;
- {$EXTERNALSYM SV_MAXFREECONNECTIONS_PARMNUM}
- SV_INITSESSTABLE_PARMNUM = 543;
- {$EXTERNALSYM SV_INITSESSTABLE_PARMNUM}
- SV_INITCONNTABLE_PARMNUM = 544;
- {$EXTERNALSYM SV_INITCONNTABLE_PARMNUM}
- SV_INITFILETABLE_PARMNUM = 545;
- {$EXTERNALSYM SV_INITFILETABLE_PARMNUM}
- SV_INITSEARCHTABLE_PARMNUM = 546;
- {$EXTERNALSYM SV_INITSEARCHTABLE_PARMNUM}
- SV_ALERTSCHEDULE_PARMNUM = 547;
- {$EXTERNALSYM SV_ALERTSCHEDULE_PARMNUM}
- SV_ERRORTHRESHOLD_PARMNUM = 548;
- {$EXTERNALSYM SV_ERRORTHRESHOLD_PARMNUM}
- SV_NETWORKERRORTHRESHOLD_PARMNUM = 549;
- {$EXTERNALSYM SV_NETWORKERRORTHRESHOLD_PARMNUM}
- SV_DISKSPACETHRESHOLD_PARMNUM = 550;
- {$EXTERNALSYM SV_DISKSPACETHRESHOLD_PARMNUM}
- SV_MAXLINKDELAY_PARMNUM = 552;
- {$EXTERNALSYM SV_MAXLINKDELAY_PARMNUM}
- SV_MINLINKTHROUGHPUT_PARMNUM = 553;
- {$EXTERNALSYM SV_MINLINKTHROUGHPUT_PARMNUM}
- SV_LINKINFOVALIDTIME_PARMNUM = 554;
- {$EXTERNALSYM SV_LINKINFOVALIDTIME_PARMNUM}
- SV_SCAVQOSINFOUPDATETIME_PARMNUM = 555;
- {$EXTERNALSYM SV_SCAVQOSINFOUPDATETIME_PARMNUM}
- SV_MAXWORKITEMIDLETIME_PARMNUM = 556;
- {$EXTERNALSYM SV_MAXWORKITEMIDLETIME_PARMNUM}
- SV_MAXRAWWORKITEMS_PARMNUM = 557;
- {$EXTERNALSYM SV_MAXRAWWORKITEMS_PARMNUM}
- SV_PRODUCTTYPE_PARMNUM = 560;
- {$EXTERNALSYM SV_PRODUCTTYPE_PARMNUM}
- SV_SERVERSIZE_PARMNUM = 561;
- {$EXTERNALSYM SV_SERVERSIZE_PARMNUM}
- SV_CONNECTIONLESSAUTODISC_PARMNUM = 562;
- {$EXTERNALSYM SV_CONNECTIONLESSAUTODISC_PARMNUM}
- SV_SHARINGVIOLATIONRETRIES_PARMNUM = 563;
- {$EXTERNALSYM SV_SHARINGVIOLATIONRETRIES_PARMNUM}
- SV_SHARINGVIOLATIONDELAY_PARMNUM = 564;
- {$EXTERNALSYM SV_SHARINGVIOLATIONDELAY_PARMNUM}
- SV_MAXGLOBALOPENSEARCH_PARMNUM = 565;
- {$EXTERNALSYM SV_MAXGLOBALOPENSEARCH_PARMNUM}
- SV_REMOVEDUPLICATESEARCHES_PARMNUM = 566;
- {$EXTERNALSYM SV_REMOVEDUPLICATESEARCHES_PARMNUM}
- SV_LOCKVIOLATIONRETRIES_PARMNUM = 567;
- {$EXTERNALSYM SV_LOCKVIOLATIONRETRIES_PARMNUM}
- SV_LOCKVIOLATIONOFFSET_PARMNUM = 568;
- {$EXTERNALSYM SV_LOCKVIOLATIONOFFSET_PARMNUM}
- SV_LOCKVIOLATIONDELAY_PARMNUM = 569;
- {$EXTERNALSYM SV_LOCKVIOLATIONDELAY_PARMNUM}
- SV_MDLREADSWITCHOVER_PARMNUM = 570;
- {$EXTERNALSYM SV_MDLREADSWITCHOVER_PARMNUM}
- SV_CACHEDOPENLIMIT_PARMNUM = 571;
- {$EXTERNALSYM SV_CACHEDOPENLIMIT_PARMNUM}
- SV_CRITICALTHREADS_PARMNUM = 572;
- {$EXTERNALSYM SV_CRITICALTHREADS_PARMNUM}
- SV_RESTRICTNULLSESSACCESS_PARMNUM = 573;
- {$EXTERNALSYM SV_RESTRICTNULLSESSACCESS_PARMNUM}
- SV_ENABLEWFW311DIRECTIPX_PARMNUM = 574;
- {$EXTERNALSYM SV_ENABLEWFW311DIRECTIPX_PARMNUM}
- SV_OTHERQUEUEAFFINITY_PARMNUM = 575;
- {$EXTERNALSYM SV_OTHERQUEUEAFFINITY_PARMNUM}
- SV_QUEUESAMPLESECS_PARMNUM = 576;
- {$EXTERNALSYM SV_QUEUESAMPLESECS_PARMNUM}
- SV_BALANCECOUNT_PARMNUM = 577;
- {$EXTERNALSYM SV_BALANCECOUNT_PARMNUM}
- SV_PREFERREDAFFINITY_PARMNUM = 578;
- {$EXTERNALSYM SV_PREFERREDAFFINITY_PARMNUM}
- SV_MAXFREERFCBS_PARMNUM = 579;
- {$EXTERNALSYM SV_MAXFREERFCBS_PARMNUM}
- SV_MAXFREEMFCBS_PARMNUM = 580;
- {$EXTERNALSYM SV_MAXFREEMFCBS_PARMNUM}
- SV_MAXFREELFCBS_PARMNUM = 581;
- {$EXTERNALSYM SV_MAXFREELFCBS_PARMNUM}
- SV_MAXFREEPAGEDPOOLCHUNKS_PARMNUM = 582;
- {$EXTERNALSYM SV_MAXFREEPAGEDPOOLCHUNKS_PARMNUM}
- SV_MINPAGEDPOOLCHUNKSIZE_PARMNUM = 583;
- {$EXTERNALSYM SV_MINPAGEDPOOLCHUNKSIZE_PARMNUM}
- SV_MAXPAGEDPOOLCHUNKSIZE_PARMNUM = 584;
- {$EXTERNALSYM SV_MAXPAGEDPOOLCHUNKSIZE_PARMNUM}
- SV_SENDSFROMPREFERREDPROCESSOR_PARMNUM = 585;
- {$EXTERNALSYM SV_SENDSFROMPREFERREDPROCESSOR_PARMNUM}
- SV_MAXTHREADSPERQUEUE_PARMNUM = 586;
- {$EXTERNALSYM SV_MAXTHREADSPERQUEUE_PARMNUM}
- SV_CACHEDDIRECTORYLIMIT_PARMNUM = 587;
- {$EXTERNALSYM SV_CACHEDDIRECTORYLIMIT_PARMNUM}
- SV_MAXCOPYLENGTH_PARMNUM = 588;
- {$EXTERNALSYM SV_MAXCOPYLENGTH_PARMNUM}
- SV_ENABLECOMPRESSION_PARMNUM = 590;
- {$EXTERNALSYM SV_ENABLECOMPRESSION_PARMNUM}
- SV_AUTOSHAREWKS_PARMNUM = 591;
- {$EXTERNALSYM SV_AUTOSHAREWKS_PARMNUM}
- SV_AUTOSHARESERVER_PARMNUM = 592;
- {$EXTERNALSYM SV_AUTOSHARESERVER_PARMNUM}
- SV_ENABLESECURITYSIGNATURE_PARMNUM = 593;
- {$EXTERNALSYM SV_ENABLESECURITYSIGNATURE_PARMNUM}
- SV_REQUIRESECURITYSIGNATURE_PARMNUM = 594;
- {$EXTERNALSYM SV_REQUIRESECURITYSIGNATURE_PARMNUM}
- SV_MINCLIENTBUFFERSIZE_PARMNUM = 595;
- {$EXTERNALSYM SV_MINCLIENTBUFFERSIZE_PARMNUM}
- SV_CONNECTIONNOSESSIONSTIMEOUT_PARMNUM = 596;
- {$EXTERNALSYM SV_CONNECTIONNOSESSIONSTIMEOUT_PARMNUM}
- SV_IDLETHREADTIMEOUT_PARMNUM = 597;
- {$EXTERNALSYM SV_IDLETHREADTIMEOUT_PARMNUM}
- SV_ENABLEW9XSECURITYSIGNATURE_PARMNUM = 598;
- {$EXTERNALSYM SV_ENABLEW9XSECURITYSIGNATURE_PARMNUM}
- SV_ENFORCEKERBEROSREAUTHENTICATION_PARMNUM = 599;
- {$EXTERNALSYM SV_ENFORCEKERBEROSREAUTHENTICATION_PARMNUM}
- SV_DISABLEDOS_PARMNUM = 600;
- {$EXTERNALSYM SV_DISABLEDOS_PARMNUM}
- SV_LOWDISKSPACEMINIMUM_PARMNUM = 601;
- {$EXTERNALSYM SV_LOWDISKSPACEMINIMUM_PARMNUM}
- SV_DISABLESTRICTNAMECHECKING_PARMNUM = 602;
- {$EXTERNALSYM SV_DISABLESTRICTNAMECHECKING_PARMNUM}
-
-//
-// Single-field infolevels for NetServerSetInfo.
-//
-
- SV_COMMENT_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_COMMENT_PARMNUM;
- {$EXTERNALSYM SV_COMMENT_INFOLEVEL}
- SV_USERS_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_USERS_PARMNUM;
- {$EXTERNALSYM SV_USERS_INFOLEVEL}
- SV_DISC_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_DISC_PARMNUM;
- {$EXTERNALSYM SV_DISC_INFOLEVEL}
- SV_HIDDEN_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_HIDDEN_PARMNUM;
- {$EXTERNALSYM SV_HIDDEN_INFOLEVEL}
- SV_ANNOUNCE_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_ANNOUNCE_PARMNUM;
- {$EXTERNALSYM SV_ANNOUNCE_INFOLEVEL}
- SV_ANNDELTA_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_ANNDELTA_PARMNUM;
- {$EXTERNALSYM SV_ANNDELTA_INFOLEVEL}
- SV_SESSOPENS_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_SESSOPENS_PARMNUM;
- {$EXTERNALSYM SV_SESSOPENS_INFOLEVEL}
- SV_SESSVCS_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_SESSVCS_PARMNUM;
- {$EXTERNALSYM SV_SESSVCS_INFOLEVEL}
- SV_OPENSEARCH_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_OPENSEARCH_PARMNUM;
- {$EXTERNALSYM SV_OPENSEARCH_INFOLEVEL}
- SV_MAXWORKITEMS_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_MAXWORKITEMS_PARMNUM;
- {$EXTERNALSYM SV_MAXWORKITEMS_INFOLEVEL}
- SV_MAXRAWBUFLEN_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_MAXRAWBUFLEN_PARMNUM;
- {$EXTERNALSYM SV_MAXRAWBUFLEN_INFOLEVEL}
- SV_SESSUSERS_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_SESSUSERS_PARMNUM;
- {$EXTERNALSYM SV_SESSUSERS_INFOLEVEL}
- SV_SESSCONNS_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_SESSCONNS_PARMNUM;
- {$EXTERNALSYM SV_SESSCONNS_INFOLEVEL}
- SV_MAXNONPAGEDMEMORYUSAGE_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_MAXNONPAGEDMEMORYUSAGE_PARMNUM;
- {$EXTERNALSYM SV_MAXNONPAGEDMEMORYUSAGE_INFOLEVEL}
- SV_MAXPAGEDMEMORYUSAGE_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_MAXPAGEDMEMORYUSAGE_PARMNUM;
- {$EXTERNALSYM SV_MAXPAGEDMEMORYUSAGE_INFOLEVEL}
- SV_ENABLESOFTCOMPAT_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_ENABLESOFTCOMPAT_PARMNUM;
- {$EXTERNALSYM SV_ENABLESOFTCOMPAT_INFOLEVEL}
- SV_ENABLEFORCEDLOGOFF_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_ENABLEFORCEDLOGOFF_PARMNUM;
- {$EXTERNALSYM SV_ENABLEFORCEDLOGOFF_INFOLEVEL}
- SV_TIMESOURCE_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_TIMESOURCE_PARMNUM;
- {$EXTERNALSYM SV_TIMESOURCE_INFOLEVEL}
- SV_LMANNOUNCE_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_LMANNOUNCE_PARMNUM;
- {$EXTERNALSYM SV_LMANNOUNCE_INFOLEVEL}
- SV_MAXCOPYREADLEN_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_MAXCOPYREADLEN_PARMNUM;
- {$EXTERNALSYM SV_MAXCOPYREADLEN_INFOLEVEL}
- SV_MAXCOPYWRITELEN_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_MAXCOPYWRITELEN_PARMNUM;
- {$EXTERNALSYM SV_MAXCOPYWRITELEN_INFOLEVEL}
- SV_MINKEEPSEARCH_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_MINKEEPSEARCH_PARMNUM;
- {$EXTERNALSYM SV_MINKEEPSEARCH_INFOLEVEL}
- SV_MAXKEEPSEARCH_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_MAXKEEPSEARCH_PARMNUM;
- {$EXTERNALSYM SV_MAXKEEPSEARCH_INFOLEVEL}
- SV_MINKEEPCOMPLSEARCH_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_MINKEEPCOMPLSEARCH_PARMNUM;
- {$EXTERNALSYM SV_MINKEEPCOMPLSEARCH_INFOLEVEL}
- SV_MAXKEEPCOMPLSEARCH_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_MAXKEEPCOMPLSEARCH_PARMNUM;
- {$EXTERNALSYM SV_MAXKEEPCOMPLSEARCH_INFOLEVEL}
- SV_SCAVTIMEOUT_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_SCAVTIMEOUT_PARMNUM;
- {$EXTERNALSYM SV_SCAVTIMEOUT_INFOLEVEL}
- SV_MINRCVQUEUE_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_MINRCVQUEUE_PARMNUM;
- {$EXTERNALSYM SV_MINRCVQUEUE_INFOLEVEL}
- SV_MINFREEWORKITEMS_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_MINFREEWORKITEMS_PARMNUM;
- {$EXTERNALSYM SV_MINFREEWORKITEMS_INFOLEVEL}
- SV_MAXMPXCT_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_MAXMPXCT_PARMNUM;
- {$EXTERNALSYM SV_MAXMPXCT_INFOLEVEL}
- SV_OPLOCKBREAKWAIT_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_OPLOCKBREAKWAIT_PARMNUM;
- {$EXTERNALSYM SV_OPLOCKBREAKWAIT_INFOLEVEL}
- SV_OPLOCKBREAKRESPONSEWAIT_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_OPLOCKBREAKRESPONSEWAIT_PARMNUM;
- {$EXTERNALSYM SV_OPLOCKBREAKRESPONSEWAIT_INFOLEVEL}
- SV_ENABLEOPLOCKS_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_ENABLEOPLOCKS_PARMNUM;
- {$EXTERNALSYM SV_ENABLEOPLOCKS_INFOLEVEL}
- SV_ENABLEOPLOCKFORCECLOSE_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_ENABLEOPLOCKFORCECLOSE_PARMNUM;
- {$EXTERNALSYM SV_ENABLEOPLOCKFORCECLOSE_INFOLEVEL}
- SV_ENABLEFCBOPENS_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_ENABLEFCBOPENS_PARMNUM;
- {$EXTERNALSYM SV_ENABLEFCBOPENS_INFOLEVEL}
- SV_ENABLERAW_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_ENABLERAW_PARMNUM;
- {$EXTERNALSYM SV_ENABLERAW_INFOLEVEL}
- SV_ENABLESHAREDNETDRIVES_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_ENABLESHAREDNETDRIVES_PARMNUM;
- {$EXTERNALSYM SV_ENABLESHAREDNETDRIVES_INFOLEVEL}
- SV_MINFREECONNECTIONS_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_MINFREECONNECTIONS_PARMNUM;
- {$EXTERNALSYM SV_MINFREECONNECTIONS_INFOLEVEL}
- SV_MAXFREECONNECTIONS_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_MAXFREECONNECTIONS_PARMNUM;
- {$EXTERNALSYM SV_MAXFREECONNECTIONS_INFOLEVEL}
- SV_INITSESSTABLE_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_INITSESSTABLE_PARMNUM;
- {$EXTERNALSYM SV_INITSESSTABLE_INFOLEVEL}
- SV_INITCONNTABLE_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_INITCONNTABLE_PARMNUM;
- {$EXTERNALSYM SV_INITCONNTABLE_INFOLEVEL}
- SV_INITFILETABLE_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_INITFILETABLE_PARMNUM;
- {$EXTERNALSYM SV_INITFILETABLE_INFOLEVEL}
- SV_INITSEARCHTABLE_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_INITSEARCHTABLE_PARMNUM;
- {$EXTERNALSYM SV_INITSEARCHTABLE_INFOLEVEL}
- SV_ALERTSCHEDULE_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_ALERTSCHEDULE_PARMNUM;
- {$EXTERNALSYM SV_ALERTSCHEDULE_INFOLEVEL}
- SV_ERRORTHRESHOLD_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_ERRORTHRESHOLD_PARMNUM;
- {$EXTERNALSYM SV_ERRORTHRESHOLD_INFOLEVEL}
- SV_NETWORKERRORTHRESHOLD_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_NETWORKERRORTHRESHOLD_PARMNUM;
- {$EXTERNALSYM SV_NETWORKERRORTHRESHOLD_INFOLEVEL}
- SV_DISKSPACETHRESHOLD_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_DISKSPACETHRESHOLD_PARMNUM;
- {$EXTERNALSYM SV_DISKSPACETHRESHOLD_INFOLEVEL}
- SV_MAXLINKDELAY_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_MAXLINKDELAY_PARMNUM;
- {$EXTERNALSYM SV_MAXLINKDELAY_INFOLEVEL}
- SV_MINLINKTHROUGHPUT_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_MINLINKTHROUGHPUT_PARMNUM;
- {$EXTERNALSYM SV_MINLINKTHROUGHPUT_INFOLEVEL}
- SV_LINKINFOVALIDTIME_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_LINKINFOVALIDTIME_PARMNUM;
- {$EXTERNALSYM SV_LINKINFOVALIDTIME_INFOLEVEL}
- SV_SCAVQOSINFOUPDATETIME_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_SCAVQOSINFOUPDATETIME_PARMNUM;
- {$EXTERNALSYM SV_SCAVQOSINFOUPDATETIME_INFOLEVEL}
- SV_MAXWORKITEMIDLETIME_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_MAXWORKITEMIDLETIME_PARMNUM;
- {$EXTERNALSYM SV_MAXWORKITEMIDLETIME_INFOLEVEL}
- SV_MAXRAWWORKITEMS_INFOLOEVEL = PARMNUM_BASE_INFOLEVEL + SV_MAXRAWWORKITEMS_PARMNUM;
- {$EXTERNALSYM SV_MAXRAWWORKITEMS_INFOLOEVEL}
- SV_PRODUCTTYPE_INFOLOEVEL = PARMNUM_BASE_INFOLEVEL + SV_PRODUCTTYPE_PARMNUM;
- {$EXTERNALSYM SV_PRODUCTTYPE_INFOLOEVEL}
- SV_SERVERSIZE_INFOLOEVEL = PARMNUM_BASE_INFOLEVEL + SV_SERVERSIZE_PARMNUM;
- {$EXTERNALSYM SV_SERVERSIZE_INFOLOEVEL}
- SV_CONNECTIONLESSAUTODISC_INFOLOEVEL = PARMNUM_BASE_INFOLEVEL + SV_CONNECTIONLESSAUTODISC_PARMNUM;
- {$EXTERNALSYM SV_CONNECTIONLESSAUTODISC_INFOLOEVEL}
- SV_SHARINGVIOLATIONRETRIES_INFOLOEVEL = PARMNUM_BASE_INFOLEVEL + SV_SHARINGVIOLATIONRETRIES_PARMNUM;
- {$EXTERNALSYM SV_SHARINGVIOLATIONRETRIES_INFOLOEVEL}
- SV_SHARINGVIOLATIONDELAY_INFOLOEVEL = PARMNUM_BASE_INFOLEVEL + SV_SHARINGVIOLATIONDELAY_PARMNUM;
- {$EXTERNALSYM SV_SHARINGVIOLATIONDELAY_INFOLOEVEL}
- SV_MAXGLOBALOPENSEARCH_INFOLOEVEL = PARMNUM_BASE_INFOLEVEL + SV_MAXGLOBALOPENSEARCH_PARMNUM;
- {$EXTERNALSYM SV_MAXGLOBALOPENSEARCH_INFOLOEVEL}
- SV_REMOVEDUPLICATESEARCHES_INFOLOEVEL = PARMNUM_BASE_INFOLEVEL + SV_REMOVEDUPLICATESEARCHES_PARMNUM;
- {$EXTERNALSYM SV_REMOVEDUPLICATESEARCHES_INFOLOEVEL}
- SV_LOCKVIOLATIONRETRIES_INFOLOEVEL = PARMNUM_BASE_INFOLEVEL + SV_LOCKVIOLATIONRETRIES_PARMNUM;
- {$EXTERNALSYM SV_LOCKVIOLATIONRETRIES_INFOLOEVEL}
- SV_LOCKVIOLATIONOFFSET_INFOLOEVEL = PARMNUM_BASE_INFOLEVEL + SV_LOCKVIOLATIONOFFSET_PARMNUM;
- {$EXTERNALSYM SV_LOCKVIOLATIONOFFSET_INFOLOEVEL}
- SV_LOCKVIOLATIONDELAY_INFOLOEVEL = PARMNUM_BASE_INFOLEVEL + SV_LOCKVIOLATIONDELAY_PARMNUM;
- {$EXTERNALSYM SV_LOCKVIOLATIONDELAY_INFOLOEVEL}
- SV_MDLREADSWITCHOVER_INFOLOEVEL = PARMNUM_BASE_INFOLEVEL + SV_MDLREADSWITCHOVER_PARMNUM;
- {$EXTERNALSYM SV_MDLREADSWITCHOVER_INFOLOEVEL}
- SV_CACHEDOPENLIMIT_INFOLOEVEL = PARMNUM_BASE_INFOLEVEL + SV_CACHEDOPENLIMIT_PARMNUM;
- {$EXTERNALSYM SV_CACHEDOPENLIMIT_INFOLOEVEL}
- SV_CRITICALTHREADS_INFOLOEVEL = PARMNUM_BASE_INFOLEVEL + SV_CRITICALTHREADS_PARMNUM;
- {$EXTERNALSYM SV_CRITICALTHREADS_INFOLOEVEL}
- SV_RESTRICTNULLSESSACCESS_INFOLOEVEL = PARMNUM_BASE_INFOLEVEL + SV_RESTRICTNULLSESSACCESS_PARMNUM;
- {$EXTERNALSYM SV_RESTRICTNULLSESSACCESS_INFOLOEVEL}
- SV_ENABLEWFW311DIRECTIPX_INFOLOEVEL = PARMNUM_BASE_INFOLEVEL + SV_ENABLEWFW311DIRECTIPX_PARMNUM;
- {$EXTERNALSYM SV_ENABLEWFW311DIRECTIPX_INFOLOEVEL}
- SV_OTHERQUEUEAFFINITY_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_OTHERQUEUEAFFINITY_PARMNUM;
- {$EXTERNALSYM SV_OTHERQUEUEAFFINITY_INFOLEVEL}
- SV_QUEUESAMPLESECS_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_QUEUESAMPLESECS_PARMNUM;
- {$EXTERNALSYM SV_QUEUESAMPLESECS_INFOLEVEL}
- SV_BALANCECOUNT_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_BALANCECOUNT_PARMNUM;
- {$EXTERNALSYM SV_BALANCECOUNT_INFOLEVEL}
- SV_PREFERREDAFFINITY_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_PREFERREDAFFINITY_PARMNUM;
- {$EXTERNALSYM SV_PREFERREDAFFINITY_INFOLEVEL}
- SV_MAXFREERFCBS_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_MAXFREERFCBS_PARMNUM;
- {$EXTERNALSYM SV_MAXFREERFCBS_INFOLEVEL}
- SV_MAXFREEMFCBS_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_MAXFREEMFCBS_PARMNUM;
- {$EXTERNALSYM SV_MAXFREEMFCBS_INFOLEVEL}
- SV_MAXFREELFCBS_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_MAXFREELFCBS_PARMNUM;
- {$EXTERNALSYM SV_MAXFREELFCBS_INFOLEVEL}
- SV_MAXFREEPAGEDPOOLCHUNKS_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_MAXFREEPAGEDPOOLCHUNKS_PARMNUM;
- {$EXTERNALSYM SV_MAXFREEPAGEDPOOLCHUNKS_INFOLEVEL}
- SV_MINPAGEDPOOLCHUNKSIZE_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_MINPAGEDPOOLCHUNKSIZE_PARMNUM;
- {$EXTERNALSYM SV_MINPAGEDPOOLCHUNKSIZE_INFOLEVEL}
- SV_MAXPAGEDPOOLCHUNKSIZE_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_MAXPAGEDPOOLCHUNKSIZE_PARMNUM;
- {$EXTERNALSYM SV_MAXPAGEDPOOLCHUNKSIZE_INFOLEVEL}
- SV_SENDSFROMPREFERREDPROCESSOR_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_SENDSFROMPREFERREDPROCESSOR_PARMNUM;
- {$EXTERNALSYM SV_SENDSFROMPREFERREDPROCESSOR_INFOLEVEL}
- SV_MAXTHREADSPERQUEUE_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_MAXTHREADSPERQUEUE_PARMNUM;
- {$EXTERNALSYM SV_MAXTHREADSPERQUEUE_INFOLEVEL}
- SV_CACHEDDIRECTORYLIMIT_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_CACHEDDIRECTORYLIMIT_PARMNUM;
- {$EXTERNALSYM SV_CACHEDDIRECTORYLIMIT_INFOLEVEL}
- SV_MAXCOPYLENGTH_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_MAXCOPYLENGTH_PARMNUM;
- {$EXTERNALSYM SV_MAXCOPYLENGTH_INFOLEVEL}
- SV_ENABLECOMPRESSION_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_ENABLECOMPRESSION_PARMNUM;
- {$EXTERNALSYM SV_ENABLECOMPRESSION_INFOLEVEL}
- SV_AUTOSHAREWKS_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_AUTOSHAREWKS_PARMNUM;
- {$EXTERNALSYM SV_AUTOSHAREWKS_INFOLEVEL}
- SV_AUTOSHARESERVER_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_AUTOSHARESERVER_PARMNUM;
- {$EXTERNALSYM SV_AUTOSHARESERVER_INFOLEVEL}
- SV_ENABLESECURITYSIGNATURE_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_ENABLESECURITYSIGNATURE_PARMNUM;
- {$EXTERNALSYM SV_ENABLESECURITYSIGNATURE_INFOLEVEL}
- SV_REQUIRESECURITYSIGNATURE_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_REQUIRESECURITYSIGNATURE_PARMNUM;
- {$EXTERNALSYM SV_REQUIRESECURITYSIGNATURE_INFOLEVEL}
- SV_MINCLIENTBUFFERSIZE_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_MINCLIENTBUFFERSIZE_PARMNUM;
- {$EXTERNALSYM SV_MINCLIENTBUFFERSIZE_INFOLEVEL}
- SV_CONNECTIONNOSESSIONSTIMEOUT_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_CONNECTIONNOSESSIONSTIMEOUT_PARMNUM;
- {$EXTERNALSYM SV_CONNECTIONNOSESSIONSTIMEOUT_INFOLEVEL}
- SV_IDLETHREADTIMEOUT_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_IDLETHREADTIMEOUT_PARMNUM;
- {$EXTERNALSYM SV_IDLETHREADTIMEOUT_INFOLEVEL}
- SV_ENABLEW9XSECURITYSIGNATURE_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_ENABLEW9XSECURITYSIGNATURE_PARMNUM;
- {$EXTERNALSYM SV_ENABLEW9XSECURITYSIGNATURE_INFOLEVEL}
- SV_ENFORCEKERBEROSREAUTHENTICATION_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_ENFORCEKERBEROSREAUTHENTICATION_PARMNUM;
- {$EXTERNALSYM SV_ENFORCEKERBEROSREAUTHENTICATION_INFOLEVEL}
- SV_DISABLEDOS_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_DISABLEDOS_PARMNUM;
- {$EXTERNALSYM SV_DISABLEDOS_INFOLEVEL}
- SV_LOWDISKSPACEMINIMUM_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_LOWDISKSPACEMINIMUM_PARMNUM;
- {$EXTERNALSYM SV_LOWDISKSPACEMINIMUM_INFOLEVEL}
- SV_DISABLESTRICTNAMECHECKING_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_DISABLESTRICTNAMECHECKING_PARMNUM;
- {$EXTERNALSYM SV_DISABLESTRICTNAMECHECKING_INFOLEVEL}
-
- SVI1_NUM_ELEMENTS = 5;
- {$EXTERNALSYM SVI1_NUM_ELEMENTS}
- SVI2_NUM_ELEMENTS = 40;
- {$EXTERNALSYM SVI2_NUM_ELEMENTS}
- SVI3_NUM_ELEMENTS = 44;
- {$EXTERNALSYM SVI3_NUM_ELEMENTS}
-
-//
-// Maxmimum length for command string to NetServerAdminCommand.
-//
-
- SV_MAX_CMD_LEN = PATHLEN;
- {$EXTERNALSYM SV_MAX_CMD_LEN}
-
-//
-// Masks describing AUTOPROFILE parameters
-//
-
- SW_AUTOPROF_LOAD_MASK = $1;
- {$EXTERNALSYM SW_AUTOPROF_LOAD_MASK}
- SW_AUTOPROF_SAVE_MASK = $2;
- {$EXTERNALSYM SW_AUTOPROF_SAVE_MASK}
-
-//
-// Max size of svX_srvheuristics.
-//
-
- SV_MAX_SRV_HEUR_LEN = 32; // Max heuristics info string length.
- {$EXTERNALSYM SV_MAX_SRV_HEUR_LEN}
-
-//
-// Equate for use with sv102_licenses.
-//
-
- SV_USERS_PER_LICENSE = 5;
- {$EXTERNALSYM SV_USERS_PER_LICENSE}
-
-//
-// Equate for use with svti2_flags in NetServerTransportAddEx.
-//
-
- SVTI2_REMAP_PIPE_NAMES = $2;
- {$EXTERNALSYM SVTI2_REMAP_PIPE_NAMES}
-
-implementation
-
-{$IFDEF DYNAMIC_LINK}
-
-var
- _NetServerEnum: Pointer;
-
-function NetServerEnum;
-begin
- GetProcedureAddress(_NetServerEnum, netapi32, 'NetServerEnum');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetServerEnum]
- end;
-end;
-
-var
- _NetServerEnumEx: Pointer;
-
-function NetServerEnumEx;
-begin
- GetProcedureAddress(_NetServerEnumEx, netapi32, 'NetServerEnumEx');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetServerEnumEx]
- end;
-end;
-
-var
- _NetServerGetInfo: Pointer;
-
-function NetServerGetInfo;
-begin
- GetProcedureAddress(_NetServerGetInfo, netapi32, 'NetServerGetInfo');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetServerGetInfo]
- end;
-end;
-
-var
- _NetServerSetInfo: Pointer;
-
-function NetServerSetInfo;
-begin
- GetProcedureAddress(_NetServerSetInfo, netapi32, 'NetServerSetInfo');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetServerSetInfo]
- end;
-end;
-
-var
- _NetServerSetInfoCommandLine: Pointer;
-
-function NetServerSetInfoCommandLine;
-begin
- GetProcedureAddress(_NetServerSetInfoCommandLine, netapi32, 'NetServerSetInfoCommandLine');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetServerSetInfoCommandLine]
- end;
-end;
-
-var
- _NetServerDiskEnum: Pointer;
-
-function NetServerDiskEnum;
-begin
- GetProcedureAddress(_NetServerDiskEnum, netapi32, 'NetServerDiskEnum');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetServerDiskEnum]
- end;
-end;
-
-var
- _NetServerComputerNameAdd: Pointer;
-
-function NetServerComputerNameAdd;
-begin
- GetProcedureAddress(_NetServerComputerNameAdd, netapi32, 'NetServerComputerNameAdd');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetServerComputerNameAdd]
- end;
-end;
-
-var
- _NetServerComputerNameDel: Pointer;
-
-function NetServerComputerNameDel;
-begin
- GetProcedureAddress(_NetServerComputerNameDel, netapi32, 'NetServerComputerNameDel');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetServerComputerNameDel]
- end;
-end;
-
-var
- _NetServerTransportAdd: Pointer;
-
-function NetServerTransportAdd;
-begin
- GetProcedureAddress(_NetServerTransportAdd, netapi32, 'NetServerTransportAdd');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetServerTransportAdd]
- end;
-end;
-
-var
- _NetServerTransportAddEx: Pointer;
-
-function NetServerTransportAddEx;
-begin
- GetProcedureAddress(_NetServerTransportAddEx, netapi32, 'NetServerTransportAddEx');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetServerTransportAddEx]
- end;
-end;
-
-var
- _NetServerTransportDel: Pointer;
-
-function NetServerTransportDel;
-begin
- GetProcedureAddress(_NetServerTransportDel, netapi32, 'NetServerTransportDel');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetServerTransportDel]
- end;
-end;
-
-var
- _NetServerTransportEnum: Pointer;
-
-function NetServerTransportEnum;
-begin
- GetProcedureAddress(_NetServerTransportEnum, netapi32, 'NetServerTransportEnum');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetServerTransportEnum]
- end;
-end;
-
-var
- _SetServiceBits: Pointer;
-
-function SetServiceBits;
-begin
- GetProcedureAddress(_SetServiceBits, netapi32, 'SetServiceBits');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetServiceBits]
- end;
-end;
-
-{$ELSE}
-
-function NetServerEnum; external netapi32 name 'NetServerEnum';
-function NetServerEnumEx; external netapi32 name 'NetServerEnumEx';
-function NetServerGetInfo; external netapi32 name 'NetServerGetInfo';
-function NetServerSetInfo; external netapi32 name 'NetServerSetInfo';
-function NetServerSetInfoCommandLine; external netapi32 name 'NetServerSetInfoCommandLine';
-function NetServerDiskEnum; external netapi32 name 'NetServerDiskEnum';
-function NetServerComputerNameAdd; external netapi32 name 'NetServerComputerNameAdd';
-function NetServerComputerNameDel; external netapi32 name 'NetServerComputerNameDel';
-function NetServerTransportAdd; external netapi32 name 'NetServerTransportAdd';
-function NetServerTransportAddEx; external netapi32 name 'NetServerTransportAddEx';
-function NetServerTransportDel; external netapi32 name 'NetServerTransportDel';
-function NetServerTransportEnum; external netapi32 name 'NetServerTransportEnum';
-function SetServiceBits; external netapi32 name 'SetServiceBits';
-
-{$ENDIF DYNAMIC_LINK}
-
-end.
+{******************************************************************************}
+{ }
+{ Lan Manager Server API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: lmserver.h, released November 2001. The original Pascal}
+{ code is: LmServer.pas, released Februari 2002. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwalmserver.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaLmServer;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "lmserver.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaLmCons, JwaWinSvc, JwaWinType;
+
+//
+// Function Prototypes - SERVER
+//
+
+function NetServerEnum(servername: LMCSTR; level: DWORD; var bufptr: LPBYTE; prefmaxlen: DWORD; entriesread: LPDWORD; totalentries: LPDWORD; servertype: DWORD; domain: LMCSTR; resume_handle: LPDWORD): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetServerEnum}
+
+function NetServerEnumEx(ServerName: LMCSTR; Level: DWORD; var Bufptr: LPBYTE; PrefMaxlen: DWORD; EntriesRead: LPDWORD; totalentries: LPDWORD; servertype: DWORD; domain: LMCSTR; FirstNameToReturn: LMCSTR): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetServerEnumEx}
+
+function NetServerGetInfo(servername: LMSTR; level: DWORD; var bufptr: LPBYTE): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetServerGetInfo}
+
+function NetServerSetInfo(servername: LMSTR; level: DWORD; buf: LPBYTE; ParmError: LPDWORD): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetServerSetInfo}
+
+//
+// Temporary hack function.
+//
+
+// todo cdecl??
+
+function NetServerSetInfoCommandLine(argc: WORD; argv: PLMSTR): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetServerSetInfoCommandLine}
+
+function NetServerDiskEnum(servername: LMSTR; level: DWORD; var bufptr: LPBYTE; prefmaxlen: DWORD; entriesread, totalentries, resume_handle: LPDWORD): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetServerDiskEnum}
+
+function NetServerComputerNameAdd(ServerName, EmulatedDomainName, EmulatedServerName: LMSTR): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetServerComputerNameAdd}
+
+function NetServerComputerNameDel(ServerName: LMSTR; EmulatedServerName: LMSTR): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetServerComputerNameDel}
+
+function NetServerTransportAdd(servername: LMSTR; level: DWORD; bufptr: LPBYTE): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetServerTransportAdd}
+
+function NetServerTransportAddEx(servername: LMSTR; level: DWORD; bufptr: LPBYTE): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetServerTransportAddEx}
+
+function NetServerTransportDel(servername: LMSTR; level: DWORD; bufptr: LPBYTE): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetServerTransportDel}
+
+function NetServerTransportEnum(servername: LMSTR; level: DWORD; var bufptr: LPBYTE; prefmaxlen: DWORD; entriesread, totalentries, resumehandle: LPDWORD): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetServerTransportEnum}
+
+//
+// The following function can be called by Win NT services to register
+// their service type. This function is exported from advapi32.dll.
+// Therefore, if this is the only function called by that service, then
+// it is not necessary to link to netapi32.lib.
+//
+
+function SetServiceBits(hServiceStatus: SERVICE_STATUS_HANDLE; dwServiceBits: DWORD; bSetBitsOn: BOOL; bUpdateImmediately: BOOL): BOOL; stdcall;
+{$EXTERNALSYM SetServiceBits}
+
+//
+// Data Structures - SERVER
+//
+
+type
+ LPSERVER_INFO_100 = ^SERVER_INFO_100;
+ {$EXTERNALSYM LPSERVER_INFO_100}
+ PSERVER_INFO_100 = ^SERVER_INFO_100;
+ {$EXTERNALSYM PSERVER_INFO_100}
+ _SERVER_INFO_100 = record
+ sv100_platform_id: DWORD;
+ sv100_name: LMSTR;
+ end;
+ {$EXTERNALSYM _SERVER_INFO_100}
+ SERVER_INFO_100 = _SERVER_INFO_100;
+ {$EXTERNALSYM SERVER_INFO_100}
+ TServerInfo100 = SERVER_INFO_100;
+ PServerInfo100 = PSERVER_INFO_100;
+
+ LPSERVER_INFO_101 = ^SERVER_INFO_101;
+ {$EXTERNALSYM LPSERVER_INFO_101}
+ PSERVER_INFO_101 = ^SERVER_INFO_101;
+ {$EXTERNALSYM PSERVER_INFO_101}
+ _SERVER_INFO_101 = record
+ sv101_platform_id: DWORD;
+ sv101_name: LMSTR;
+ sv101_version_major: DWORD;
+ sv101_version_minor: DWORD;
+ sv101_type: DWORD;
+ sv101_comment: LMSTR;
+ end;
+ {$EXTERNALSYM _SERVER_INFO_101}
+ SERVER_INFO_101 = _SERVER_INFO_101;
+ {$EXTERNALSYM SERVER_INFO_101}
+ TServerInfo101 = SERVER_INFO_101;
+ PServerInfo101 = PSERVER_INFO_101;
+
+ LPSERVER_INFO_102 = ^SERVER_INFO_102;
+ {$EXTERNALSYM LPSERVER_INFO_102}
+ PSERVER_INFO_102 = ^SERVER_INFO_102;
+ {$EXTERNALSYM PSERVER_INFO_102}
+ _SERVER_INFO_102 = record
+ sv102_platform_id: DWORD;
+ sv102_name: LMSTR;
+ sv102_version_major: DWORD;
+ sv102_version_minor: DWORD;
+ sv102_type: DWORD;
+ sv102_comment: LMSTR;
+ sv102_users: DWORD;
+ sv102_disc: LONG;
+ sv102_hidden: BOOL;
+ sv102_announce: DWORD;
+ sv102_anndelta: DWORD;
+ sv102_licenses: DWORD;
+ sv102_userpath: LMSTR;
+ end;
+ {$EXTERNALSYM _SERVER_INFO_102}
+ SERVER_INFO_102 = _SERVER_INFO_102;
+ {$EXTERNALSYM SERVER_INFO_102}
+ TServerInfo102 = SERVER_INFO_102;
+ PServerInfo102 = PSERVER_INFO_102;
+
+ LPSERVER_INFO_402 = ^SERVER_INFO_402;
+ {$EXTERNALSYM LPSERVER_INFO_402}
+ PSERVER_INFO_402 = ^SERVER_INFO_402;
+ {$EXTERNALSYM PSERVER_INFO_402}
+ _SERVER_INFO_402 = record
+ sv402_ulist_mtime: DWORD;
+ sv402_glist_mtime: DWORD;
+ sv402_alist_mtime: DWORD;
+ sv402_alerts: LMSTR;
+ sv402_security: DWORD;
+ sv402_numadmin: DWORD;
+ sv402_lanmask: DWORD;
+ sv402_guestacct: LMSTR;
+ sv402_chdevs: DWORD;
+ sv402_chdevq: DWORD;
+ sv402_chdevjobs: DWORD;
+ sv402_connections: DWORD;
+ sv402_shares: DWORD;
+ sv402_openfiles: DWORD;
+ sv402_sessopens: DWORD;
+ sv402_sessvcs: DWORD;
+ sv402_sessreqs: DWORD;
+ sv402_opensearch: DWORD;
+ sv402_activelocks: DWORD;
+ sv402_numreqbuf: DWORD;
+ sv402_sizreqbuf: DWORD;
+ sv402_numbigbuf: DWORD;
+ sv402_numfiletasks: DWORD;
+ sv402_alertsched: DWORD;
+ sv402_erroralert: DWORD;
+ sv402_logonalert: DWORD;
+ sv402_accessalert: DWORD;
+ sv402_diskalert: DWORD;
+ sv402_netioalert: DWORD;
+ sv402_maxauditsz: DWORD;
+ sv402_srvheuristics: LMSTR;
+ end;
+ {$EXTERNALSYM _SERVER_INFO_402}
+ SERVER_INFO_402 = _SERVER_INFO_402;
+ {$EXTERNALSYM SERVER_INFO_402}
+ TServerInfo402 = SERVER_INFO_402;
+ PServerInfo402 = PSERVER_INFO_402;
+
+ LPSERVER_INFO_403 = ^SERVER_INFO_403;
+ {$EXTERNALSYM LPSERVER_INFO_403}
+ PSERVER_INFO_403 = ^SERVER_INFO_403;
+ {$EXTERNALSYM PSERVER_INFO_403}
+ _SERVER_INFO_403 = record
+ sv403_ulist_mtime: DWORD;
+ sv403_glist_mtime: DWORD;
+ sv403_alist_mtime: DWORD;
+ sv403_alerts: LMSTR;
+ sv403_security: DWORD;
+ sv403_numadmin: DWORD;
+ sv403_lanmask: DWORD;
+ sv403_guestacct: LMSTR;
+ sv403_chdevs: DWORD;
+ sv403_chdevq: DWORD;
+ sv403_chdevjobs: DWORD;
+ sv403_connections: DWORD;
+ sv403_shares: DWORD;
+ sv403_openfiles: DWORD;
+ sv403_sessopens: DWORD;
+ sv403_sessvcs: DWORD;
+ sv403_sessreqs: DWORD;
+ sv403_opensearch: DWORD;
+ sv403_activelocks: DWORD;
+ sv403_numreqbuf: DWORD;
+ sv403_sizreqbuf: DWORD;
+ sv403_numbigbuf: DWORD;
+ sv403_numfiletasks: DWORD;
+ sv403_alertsched: DWORD;
+ sv403_erroralert: DWORD;
+ sv403_logonalert: DWORD;
+ sv403_accessalert: DWORD;
+ sv403_diskalert: DWORD;
+ sv403_netioalert: DWORD;
+ sv403_maxauditsz: DWORD;
+ sv403_srvheuristics: LMSTR;
+ sv403_auditedevents: DWORD;
+ sv403_autoprofile: DWORD;
+ sv403_autopath: LMSTR;
+ end;
+ {$EXTERNALSYM _SERVER_INFO_403}
+ SERVER_INFO_403 = _SERVER_INFO_403;
+ {$EXTERNALSYM SERVER_INFO_403}
+ TServerInfo403 = SERVER_INFO_403;
+ PServerInfo403 = PSERVER_INFO_403;
+
+ LPSERVER_INFO_502 = ^SERVER_INFO_502;
+ {$EXTERNALSYM LPSERVER_INFO_502}
+ PSERVER_INFO_502 = ^SERVER_INFO_502;
+ {$EXTERNALSYM PSERVER_INFO_502}
+ _SERVER_INFO_502 = record
+ sv502_sessopens: DWORD;
+ sv502_sessvcs: DWORD;
+ sv502_opensearch: DWORD;
+ sv502_sizreqbuf: DWORD;
+ sv502_initworkitems: DWORD;
+ sv502_maxworkitems: DWORD;
+ sv502_rawworkitems: DWORD;
+ sv502_irpstacksize: DWORD;
+ sv502_maxrawbuflen: DWORD;
+ sv502_sessusers: DWORD;
+ sv502_sessconns: DWORD;
+ sv502_maxpagedmemoryusage: DWORD;
+ sv502_maxnonpagedmemoryusage: DWORD;
+ sv502_enablesoftcompat: BOOL;
+ sv502_enableforcedlogoff: BOOL;
+ sv502_timesource: BOOL;
+ sv502_acceptdownlevelapis: BOOL;
+ sv502_lmannounce: BOOL;
+ end;
+ {$EXTERNALSYM _SERVER_INFO_502}
+ SERVER_INFO_502 = _SERVER_INFO_502;
+ {$EXTERNALSYM SERVER_INFO_502}
+ TServerInfo502 = SERVER_INFO_502;
+ PServerInfo502 = PSERVER_INFO_502;
+
+ LPSERVER_INFO_503 = ^SERVER_INFO_503;
+ {$EXTERNALSYM LPSERVER_INFO_503}
+ PSERVER_INFO_503 = ^SERVER_INFO_503;
+ {$EXTERNALSYM PSERVER_INFO_503}
+ _SERVER_INFO_503 = record
+ sv503_sessopens: DWORD;
+ sv503_sessvcs: DWORD;
+ sv503_opensearch: DWORD;
+ sv503_sizreqbuf: DWORD;
+ sv503_initworkitems: DWORD;
+ sv503_maxworkitems: DWORD;
+ sv503_rawworkitems: DWORD;
+ sv503_irpstacksize: DWORD;
+ sv503_maxrawbuflen: DWORD;
+ sv503_sessusers: DWORD;
+ sv503_sessconns: DWORD;
+ sv503_maxpagedmemoryusage: DWORD;
+ sv503_maxnonpagedmemoryusage: DWORD;
+ sv503_enablesoftcompat: BOOL;
+ sv503_enableforcedlogoff: BOOL;
+ sv503_timesource: BOOL;
+ sv503_acceptdownlevelapis: BOOL;
+ sv503_lmannounce: BOOL;
+ sv503_domain: LMSTR;
+ sv503_maxcopyreadlen: DWORD;
+ sv503_maxcopywritelen: DWORD;
+ sv503_minkeepsearch: DWORD;
+ sv503_maxkeepsearch: DWORD;
+ sv503_minkeepcomplsearch: DWORD;
+ sv503_maxkeepcomplsearch: DWORD;
+ sv503_threadcountadd: DWORD;
+ sv503_numblockthreads: DWORD;
+ sv503_scavtimeout: DWORD;
+ sv503_minrcvqueue: DWORD;
+ sv503_minfreeworkitems: DWORD;
+ sv503_xactmemsize: DWORD;
+ sv503_threadpriority: DWORD;
+ sv503_maxmpxct: DWORD;
+ sv503_oplockbreakwait: DWORD;
+ sv503_oplockbreakresponsewait: DWORD;
+ sv503_enableoplocks: BOOL;
+ sv503_enableoplockforceclose: BOOL;
+ sv503_enablefcbopens: BOOL;
+ sv503_enableraw: BOOL;
+ sv503_enablesharednetdrives: BOOL;
+ sv503_minfreeconnections: DWORD;
+ sv503_maxfreeconnections: DWORD;
+ end;
+ {$EXTERNALSYM _SERVER_INFO_503}
+ SERVER_INFO_503 = _SERVER_INFO_503;
+ {$EXTERNALSYM SERVER_INFO_503}
+ TServerInfo503 = SERVER_INFO_503;
+ PServerInfo503 = PSERVER_INFO_503;
+
+ LPSERVER_INFO_599 = ^SERVER_INFO_599;
+ {$EXTERNALSYM LPSERVER_INFO_599}
+ PSERVER_INFO_599 = ^SERVER_INFO_599;
+ {$EXTERNALSYM PSERVER_INFO_599}
+ _SERVER_INFO_599 = record
+ sv599_sessopens: DWORD;
+ sv599_sessvcs: DWORD;
+ sv599_opensearch: DWORD;
+ sv599_sizreqbuf: DWORD;
+ sv599_initworkitems: DWORD;
+ sv599_maxworkitems: DWORD;
+ sv599_rawworkitems: DWORD;
+ sv599_irpstacksize: DWORD;
+ sv599_maxrawbuflen: DWORD;
+ sv599_sessusers: DWORD;
+ sv599_sessconns: DWORD;
+ sv599_maxpagedmemoryusage: DWORD;
+ sv599_maxnonpagedmemoryusage: DWORD;
+ sv599_enablesoftcompat: BOOL;
+ sv599_enableforcedlogoff: BOOL;
+ sv599_timesource: BOOL;
+ sv599_acceptdownlevelapis: BOOL;
+ sv599_lmannounce: BOOL;
+ sv599_domain: LMSTR;
+ sv599_maxcopyreadlen: DWORD;
+ sv599_maxcopywritelen: DWORD;
+ sv599_minkeepsearch: DWORD;
+ sv599_maxkeepsearch: DWORD;
+ sv599_minkeepcomplsearch: DWORD;
+ sv599_maxkeepcomplsearch: DWORD;
+ sv599_threadcountadd: DWORD;
+ sv599_numblockthreads: DWORD;
+ sv599_scavtimeout: DWORD;
+ sv599_minrcvqueue: DWORD;
+ sv599_minfreeworkitems: DWORD;
+ sv599_xactmemsize: DWORD;
+ sv599_threadpriority: DWORD;
+ sv599_maxmpxct: DWORD;
+ sv599_oplockbreakwait: DWORD;
+ sv599_oplockbreakresponsewait: DWORD;
+ sv599_enableoplocks: BOOL;
+ sv599_enableoplockforceclose: BOOL;
+ sv599_enablefcbopens: BOOL;
+ sv599_enableraw: BOOL;
+ sv599_enablesharednetdrives: BOOL;
+ sv599_minfreeconnections: DWORD;
+ sv599_maxfreeconnections: DWORD;
+ sv599_initsesstable: DWORD;
+ sv599_initconntable: DWORD;
+ sv599_initfiletable: DWORD;
+ sv599_initsearchtable: DWORD;
+ sv599_alertschedule: DWORD;
+ sv599_errorthreshold: DWORD;
+ sv599_networkerrorthreshold: DWORD;
+ sv599_diskspacethreshold: DWORD;
+ sv599_reserved: DWORD;
+ sv599_maxlinkdelay: DWORD;
+ sv599_minlinkthroughput: DWORD;
+ sv599_linkinfovalidtime: DWORD;
+ sv599_scavqosinfoupdatetime: DWORD;
+ sv599_maxworkitemidletime: DWORD;
+ end;
+ {$EXTERNALSYM _SERVER_INFO_599}
+ SERVER_INFO_599 = _SERVER_INFO_599;
+ {$EXTERNALSYM SERVER_INFO_599}
+ TServerInfo599 = SERVER_INFO_599;
+ PServerInfo599 = PSERVER_INFO_599;
+
+ LPSERVER_INFO_598 = ^SERVER_INFO_598;
+ {$EXTERNALSYM LPSERVER_INFO_598}
+ PSERVER_INFO_598 = ^SERVER_INFO_598;
+ {$EXTERNALSYM PSERVER_INFO_598}
+ _SERVER_INFO_598 = record
+ sv598_maxrawworkitems: DWORD;
+ sv598_maxthreadsperqueue: DWORD;
+ sv598_producttype: DWORD;
+ sv598_serversize: DWORD;
+ sv598_connectionlessautodisc: DWORD;
+ sv598_sharingviolationretries: DWORD;
+ sv598_sharingviolationdelay: DWORD;
+ sv598_maxglobalopensearch: DWORD;
+ sv598_removeduplicatesearches: DWORD;
+ sv598_lockviolationoffset: DWORD;
+ sv598_lockviolationdelay: DWORD;
+ sv598_mdlreadswitchover: DWORD;
+ sv598_cachedopenlimit: DWORD;
+ sv598_otherqueueaffinity: DWORD;
+ sv598_restrictnullsessaccess: BOOL;
+ sv598_enablewfw311directipx: BOOL;
+ sv598_queuesamplesecs: DWORD;
+ sv598_balancecount: DWORD;
+ sv598_preferredaffinity: DWORD;
+ sv598_maxfreerfcbs: DWORD;
+ sv598_maxfreemfcbs: DWORD;
+ sv598_maxfreelfcbs: DWORD;
+ sv598_maxfreepagedpoolchunks: DWORD;
+ sv598_minpagedpoolchunksize: DWORD;
+ sv598_maxpagedpoolchunksize: DWORD;
+ sv598_sendsfrompreferredprocessor: BOOL;
+ sv598_cacheddirectorylimit: DWORD;
+ sv598_maxcopylength: DWORD;
+ sv598_enablecompression: BOOL;
+ sv598_autosharewks: BOOL;
+ sv598_autoshareserver: BOOL;
+ sv598_enablesecuritysignature: BOOL;
+ sv598_requiresecuritysignature: BOOL;
+ sv598_minclientbuffersize: DWORD;
+ sv598_serverguid: GUID;
+ sv598_ConnectionNoSessionsTimeout: DWORD;
+ sv598_IdleThreadTimeOut: DWORD;
+ sv598_enableW9xsecuritysignature: BOOL;
+ sv598_enforcekerberosreauthentication: BOOL;
+ sv598_disabledos: BOOL;
+ sv598_lowdiskspaceminimum: DWORD;
+ sv598_disablestrictnamechecking: BOOL;
+ end;
+ {$EXTERNALSYM _SERVER_INFO_598}
+ SERVER_INFO_598 = _SERVER_INFO_598;
+ {$EXTERNALSYM SERVER_INFO_598}
+ TServerInfo598 = SERVER_INFO_598;
+ PServerInfo598 = PSERVER_INFO_598;
+
+ LPSERVER_INFO_1005 = ^SERVER_INFO_1005;
+ {$EXTERNALSYM LPSERVER_INFO_1005}
+ PSERVER_INFO_1005 = ^SERVER_INFO_1005;
+ {$EXTERNALSYM PSERVER_INFO_1005}
+ _SERVER_INFO_1005 = record
+ sv1005_comment: LMSTR;
+ end;
+ {$EXTERNALSYM _SERVER_INFO_1005}
+ SERVER_INFO_1005 = _SERVER_INFO_1005;
+ {$EXTERNALSYM SERVER_INFO_1005}
+ TServerInfo1005 = SERVER_INFO_1005;
+ PServerInfo1005 = PSERVER_INFO_1005;
+
+ LPSERVER_INFO_1107 = ^SERVER_INFO_1107;
+ {$EXTERNALSYM LPSERVER_INFO_1107}
+ PSERVER_INFO_1107 = ^SERVER_INFO_1107;
+ {$EXTERNALSYM PSERVER_INFO_1107}
+ _SERVER_INFO_1107 = record
+ sv1107_users: DWORD;
+ end;
+ {$EXTERNALSYM _SERVER_INFO_1107}
+ SERVER_INFO_1107 = _SERVER_INFO_1107;
+ {$EXTERNALSYM SERVER_INFO_1107}
+ TServerInfo1107 = SERVER_INFO_1107;
+ PServerInfo1107 = PSERVER_INFO_1107;
+
+ LPSERVER_INFO_1010 = ^SERVER_INFO_1010;
+ {$EXTERNALSYM LPSERVER_INFO_1010}
+ PSERVER_INFO_1010 = ^SERVER_INFO_1010;
+ {$EXTERNALSYM PSERVER_INFO_1010}
+ _SERVER_INFO_1010 = record
+ sv1010_disc: LONG;
+ end;
+ {$EXTERNALSYM _SERVER_INFO_1010}
+ SERVER_INFO_1010 = _SERVER_INFO_1010;
+ {$EXTERNALSYM SERVER_INFO_1010}
+ TServerInfo1010 = SERVER_INFO_1010;
+ PServerInfo1010 = PSERVER_INFO_1010;
+
+ LPSERVER_INFO_1016 = ^SERVER_INFO_1016;
+ {$EXTERNALSYM LPSERVER_INFO_1016}
+ PSERVER_INFO_1016 = ^SERVER_INFO_1016;
+ {$EXTERNALSYM PSERVER_INFO_1016}
+ _SERVER_INFO_1016 = record
+ sv1016_hidden: BOOL;
+ end;
+ {$EXTERNALSYM _SERVER_INFO_1016}
+ SERVER_INFO_1016 = _SERVER_INFO_1016;
+ {$EXTERNALSYM SERVER_INFO_1016}
+ TServerInfo1016 = SERVER_INFO_1016;
+ PServerInfo1016 = PSERVER_INFO_1016;
+
+ LPSERVER_INFO_1017 = ^SERVER_INFO_1017;
+ {$EXTERNALSYM LPSERVER_INFO_1017}
+ PSERVER_INFO_1017 = ^SERVER_INFO_1017;
+ {$EXTERNALSYM PSERVER_INFO_1017}
+ _SERVER_INFO_1017 = record
+ sv1017_announce: DWORD;
+ end;
+ {$EXTERNALSYM _SERVER_INFO_1017}
+ SERVER_INFO_1017 = _SERVER_INFO_1017;
+ {$EXTERNALSYM SERVER_INFO_1017}
+ TServerInfo1017 = SERVER_INFO_1017;
+ PServerInfo1017 = PSERVER_INFO_1017;
+
+ LPSERVER_INFO_1018 = ^SERVER_INFO_1018;
+ {$EXTERNALSYM LPSERVER_INFO_1018}
+ PSERVER_INFO_1018 = ^SERVER_INFO_1018;
+ {$EXTERNALSYM PSERVER_INFO_1018}
+ _SERVER_INFO_1018 = record
+ sv1018_anndelta: DWORD;
+ end;
+ {$EXTERNALSYM _SERVER_INFO_1018}
+ SERVER_INFO_1018 = _SERVER_INFO_1018;
+ {$EXTERNALSYM SERVER_INFO_1018}
+ TServerInfo1018 = SERVER_INFO_1018;
+ PServerInfo1018 = PSERVER_INFO_1018;
+
+ LPSERVER_INFO_1501 = ^SERVER_INFO_1501;
+ {$EXTERNALSYM LPSERVER_INFO_1501}
+ PSERVER_INFO_1501 = ^SERVER_INFO_1501;
+ {$EXTERNALSYM PSERVER_INFO_1501}
+ _SERVER_INFO_1501 = record
+ sv1501_sessopens: DWORD;
+ end;
+ {$EXTERNALSYM _SERVER_INFO_1501}
+ SERVER_INFO_1501 = _SERVER_INFO_1501;
+ {$EXTERNALSYM SERVER_INFO_1501}
+ TServerInfo1501 = SERVER_INFO_1501;
+ PServerInfo1501 = PSERVER_INFO_1501;
+
+ LPSERVER_INFO_1502 = ^SERVER_INFO_1502;
+ {$EXTERNALSYM LPSERVER_INFO_1502}
+ PSERVER_INFO_1502 = ^SERVER_INFO_1502;
+ {$EXTERNALSYM PSERVER_INFO_1502}
+ _SERVER_INFO_1502 = record
+ sv1502_sessvcs: DWORD;
+ end;
+ {$EXTERNALSYM _SERVER_INFO_1502}
+ SERVER_INFO_1502 = _SERVER_INFO_1502;
+ {$EXTERNALSYM SERVER_INFO_1502}
+ TServerInfo1502 = SERVER_INFO_1502;
+ PServerInfo1502 = PSERVER_INFO_1502;
+
+ LPSERVER_INFO_1503 = ^SERVER_INFO_1503;
+ {$EXTERNALSYM LPSERVER_INFO_1503}
+ PSERVER_INFO_1503 = ^SERVER_INFO_1503;
+ {$EXTERNALSYM PSERVER_INFO_1503}
+ _SERVER_INFO_1503 = record
+ sv1503_opensearch: DWORD;
+ end;
+ {$EXTERNALSYM _SERVER_INFO_1503}
+ SERVER_INFO_1503 = _SERVER_INFO_1503;
+ {$EXTERNALSYM SERVER_INFO_1503}
+ TServerInfo1503 = SERVER_INFO_1503;
+ PServerInfo1503 = PSERVER_INFO_1503;
+
+ LPSERVER_INFO_1506 = ^SERVER_INFO_1506;
+ {$EXTERNALSYM LPSERVER_INFO_1506}
+ PSERVER_INFO_1506 = ^SERVER_INFO_1506;
+ {$EXTERNALSYM PSERVER_INFO_1506}
+ _SERVER_INFO_1506 = record
+ sv1506_maxworkitems: DWORD;
+ end;
+ {$EXTERNALSYM _SERVER_INFO_1506}
+ SERVER_INFO_1506 = _SERVER_INFO_1506;
+ {$EXTERNALSYM SERVER_INFO_1506}
+ TServerInfo1506 = SERVER_INFO_1506;
+ PServerInfo1506 = PSERVER_INFO_1506;
+
+ LPSERVER_INFO_1509 = ^SERVER_INFO_1509;
+ {$EXTERNALSYM LPSERVER_INFO_1509}
+ PSERVER_INFO_1509 = ^SERVER_INFO_1509;
+ {$EXTERNALSYM PSERVER_INFO_1509}
+ _SERVER_INFO_1509 = record
+ sv1509_maxrawbuflen: DWORD;
+ end;
+ {$EXTERNALSYM _SERVER_INFO_1509}
+ SERVER_INFO_1509 = _SERVER_INFO_1509;
+ {$EXTERNALSYM SERVER_INFO_1509}
+ TServerInfo1509 = SERVER_INFO_1509;
+ PServerInfo1509 = PSERVER_INFO_1509;
+
+ LPSERVER_INFO_1510 = ^SERVER_INFO_1510;
+ {$EXTERNALSYM LPSERVER_INFO_1510}
+ PSERVER_INFO_1510 = ^SERVER_INFO_1510;
+ {$EXTERNALSYM PSERVER_INFO_1510}
+ _SERVER_INFO_1510 = record
+ sv1510_sessusers: DWORD;
+ end;
+ {$EXTERNALSYM _SERVER_INFO_1510}
+ SERVER_INFO_1510 = _SERVER_INFO_1510;
+ {$EXTERNALSYM SERVER_INFO_1510}
+ TServerInfo1510 = SERVER_INFO_1510;
+ PServerInfo1510 = PSERVER_INFO_1510;
+
+ LPSERVER_INFO_1511 = ^SERVER_INFO_1511;
+ {$EXTERNALSYM LPSERVER_INFO_1511}
+ PSERVER_INFO_1511 = ^SERVER_INFO_1511;
+ {$EXTERNALSYM PSERVER_INFO_1511}
+ _SERVER_INFO_1511 = record
+ sv1511_sessconns: DWORD;
+ end;
+ {$EXTERNALSYM _SERVER_INFO_1511}
+ SERVER_INFO_1511 = _SERVER_INFO_1511;
+ {$EXTERNALSYM SERVER_INFO_1511}
+ TServerInfo1511 = SERVER_INFO_1511;
+ PServerInfo1511 = PSERVER_INFO_1511;
+
+ LPSERVER_INFO_1512 = ^SERVER_INFO_1512;
+ {$EXTERNALSYM LPSERVER_INFO_1512}
+ PSERVER_INFO_1512 = ^SERVER_INFO_1512;
+ {$EXTERNALSYM PSERVER_INFO_1512}
+ _SERVER_INFO_1512 = record
+ sv1512_maxnonpagedmemoryusage: DWORD;
+ end;
+ {$EXTERNALSYM _SERVER_INFO_1512}
+ SERVER_INFO_1512 = _SERVER_INFO_1512;
+ {$EXTERNALSYM SERVER_INFO_1512}
+ TServerInfo1512 = SERVER_INFO_1512;
+ PServerInfo1512 = PSERVER_INFO_1512;
+
+ LPSERVER_INFO_1513 = ^SERVER_INFO_1513;
+ {$EXTERNALSYM LPSERVER_INFO_1513}
+ PSERVER_INFO_1513 = ^SERVER_INFO_1513;
+ {$EXTERNALSYM PSERVER_INFO_1513}
+ _SERVER_INFO_1513 = record
+ sv1513_maxpagedmemoryusage: DWORD;
+ end;
+ {$EXTERNALSYM _SERVER_INFO_1513}
+ SERVER_INFO_1513 = _SERVER_INFO_1513;
+ {$EXTERNALSYM SERVER_INFO_1513}
+ TServerInfo1513 = SERVER_INFO_1513;
+ PServerInfo1513 = PSERVER_INFO_1513;
+
+ LPSERVER_INFO_1514 = ^SERVER_INFO_1514;
+ {$EXTERNALSYM LPSERVER_INFO_1514}
+ PSERVER_INFO_1514 = ^SERVER_INFO_1514;
+ {$EXTERNALSYM PSERVER_INFO_1514}
+ _SERVER_INFO_1514 = record
+ sv1514_enablesoftcompat: BOOL;
+ end;
+ {$EXTERNALSYM _SERVER_INFO_1514}
+ SERVER_INFO_1514 = _SERVER_INFO_1514;
+ {$EXTERNALSYM SERVER_INFO_1514}
+ TServerInfo1514 = SERVER_INFO_1514;
+ PServerInfo1514 = PSERVER_INFO_1514;
+
+ LPSERVER_INFO_1515 = ^SERVER_INFO_1515;
+ {$EXTERNALSYM LPSERVER_INFO_1515}
+ PSERVER_INFO_1515 = ^SERVER_INFO_1515;
+ {$EXTERNALSYM PSERVER_INFO_1515}
+ _SERVER_INFO_1515 = record
+ sv1515_enableforcedlogoff: BOOL;
+ end;
+ {$EXTERNALSYM _SERVER_INFO_1515}
+ SERVER_INFO_1515 = _SERVER_INFO_1515;
+ {$EXTERNALSYM SERVER_INFO_1515}
+ TServerInfo1515 = SERVER_INFO_1515;
+ PServerInfo1515 = PSERVER_INFO_1515;
+
+ LPSERVER_INFO_1516 = ^SERVER_INFO_1516;
+ {$EXTERNALSYM LPSERVER_INFO_1516}
+ PSERVER_INFO_1516 = ^SERVER_INFO_1516;
+ {$EXTERNALSYM PSERVER_INFO_1516}
+ _SERVER_INFO_1516 = record
+ sv1516_timesource: BOOL;
+ end;
+ {$EXTERNALSYM _SERVER_INFO_1516}
+ SERVER_INFO_1516 = _SERVER_INFO_1516;
+ {$EXTERNALSYM SERVER_INFO_1516}
+ TServerInfo1516 = SERVER_INFO_1516;
+ PServerInfo1516 = PSERVER_INFO_1516;
+
+ LPSERVER_INFO_1518 = ^SERVER_INFO_1518;
+ {$EXTERNALSYM LPSERVER_INFO_1518}
+ PSERVER_INFO_1518 = ^SERVER_INFO_1518;
+ {$EXTERNALSYM PSERVER_INFO_1518}
+ _SERVER_INFO_1518 = record
+ sv1518_lmannounce: BOOL;
+ end;
+ {$EXTERNALSYM _SERVER_INFO_1518}
+ SERVER_INFO_1518 = _SERVER_INFO_1518;
+ {$EXTERNALSYM SERVER_INFO_1518}
+ TServerInfo1518 = SERVER_INFO_1518;
+ PServerInfo1518 = PSERVER_INFO_1518;
+
+ LPSERVER_INFO_1520 = ^SERVER_INFO_1520;
+ {$EXTERNALSYM LPSERVER_INFO_1520}
+ PSERVER_INFO_1520 = ^SERVER_INFO_1520;
+ {$EXTERNALSYM PSERVER_INFO_1520}
+ _SERVER_INFO_1520 = record
+ sv1520_maxcopyreadlen: DWORD;
+ end;
+ {$EXTERNALSYM _SERVER_INFO_1520}
+ SERVER_INFO_1520 = _SERVER_INFO_1520;
+ {$EXTERNALSYM SERVER_INFO_1520}
+ TServerInfo1520 = SERVER_INFO_1520;
+ PServerInfo1520 = PSERVER_INFO_1520;
+
+ LPSERVER_INFO_1521 = ^SERVER_INFO_1521;
+ {$EXTERNALSYM LPSERVER_INFO_1521}
+ PSERVER_INFO_1521 = ^SERVER_INFO_1521;
+ {$EXTERNALSYM PSERVER_INFO_1521}
+ _SERVER_INFO_1521 = record
+ sv1521_maxcopywritelen: DWORD;
+ end;
+ {$EXTERNALSYM _SERVER_INFO_1521}
+ SERVER_INFO_1521 = _SERVER_INFO_1521;
+ {$EXTERNALSYM SERVER_INFO_1521}
+ TServerInfo1521 = SERVER_INFO_1521;
+ PServerInfo1521 = PSERVER_INFO_1521;
+
+ LPSERVER_INFO_1522 = ^SERVER_INFO_1522;
+ {$EXTERNALSYM LPSERVER_INFO_1522}
+ PSERVER_INFO_1522 = ^SERVER_INFO_1522;
+ {$EXTERNALSYM PSERVER_INFO_1522}
+ _SERVER_INFO_1522 = record
+ sv1522_minkeepsearch: DWORD;
+ end;
+ {$EXTERNALSYM _SERVER_INFO_1522}
+ SERVER_INFO_1522 = _SERVER_INFO_1522;
+ {$EXTERNALSYM SERVER_INFO_1522}
+ TServerInfo1522 = SERVER_INFO_1522;
+ PServerInfo1522 = PSERVER_INFO_1522;
+
+ LPSERVER_INFO_1523 = ^SERVER_INFO_1523;
+ {$EXTERNALSYM LPSERVER_INFO_1523}
+ PSERVER_INFO_1523 = ^SERVER_INFO_1523;
+ {$EXTERNALSYM PSERVER_INFO_1523}
+ _SERVER_INFO_1523 = record
+ sv1523_maxkeepsearch: DWORD;
+ end;
+ {$EXTERNALSYM _SERVER_INFO_1523}
+ SERVER_INFO_1523 = _SERVER_INFO_1523;
+ {$EXTERNALSYM SERVER_INFO_1523}
+ TServerInfo1523 = SERVER_INFO_1523;
+ PServerInfo1523 = PSERVER_INFO_1523;
+
+ LPSERVER_INFO_1524 = ^SERVER_INFO_1524;
+ {$EXTERNALSYM LPSERVER_INFO_1524}
+ PSERVER_INFO_1524 = ^SERVER_INFO_1524;
+ {$EXTERNALSYM PSERVER_INFO_1524}
+ _SERVER_INFO_1524 = record
+ sv1524_minkeepcomplsearch: DWORD;
+ end;
+ {$EXTERNALSYM _SERVER_INFO_1524}
+ SERVER_INFO_1524 = _SERVER_INFO_1524;
+ {$EXTERNALSYM SERVER_INFO_1524}
+ TServerInfo1524 = SERVER_INFO_1524;
+ PServerInfo1524 = PSERVER_INFO_1524;
+
+ LPSERVER_INFO_1525 = ^SERVER_INFO_1525;
+ {$EXTERNALSYM LPSERVER_INFO_1525}
+ PSERVER_INFO_1525 = ^SERVER_INFO_1525;
+ {$EXTERNALSYM PSERVER_INFO_1525}
+ _SERVER_INFO_1525 = record
+ sv1525_maxkeepcomplsearch: DWORD;
+ end;
+ {$EXTERNALSYM _SERVER_INFO_1525}
+ SERVER_INFO_1525 = _SERVER_INFO_1525;
+ {$EXTERNALSYM SERVER_INFO_1525}
+ TServerInfo1525 = SERVER_INFO_1525;
+ PServerInfo1525 = PSERVER_INFO_1525;
+
+ LPSERVER_INFO_1528 = ^SERVER_INFO_1528;
+ {$EXTERNALSYM LPSERVER_INFO_1528}
+ PSERVER_INFO_1528 = ^SERVER_INFO_1528;
+ {$EXTERNALSYM PSERVER_INFO_1528}
+ _SERVER_INFO_1528 = record
+ sv1528_scavtimeout: DWORD;
+ end;
+ {$EXTERNALSYM _SERVER_INFO_1528}
+ SERVER_INFO_1528 = _SERVER_INFO_1528;
+ {$EXTERNALSYM SERVER_INFO_1528}
+ TServerInfo1528 = SERVER_INFO_1528;
+ PServerInfo1528 = PSERVER_INFO_1528;
+
+ LPSERVER_INFO_1529 = ^SERVER_INFO_1529;
+ {$EXTERNALSYM LPSERVER_INFO_1529}
+ PSERVER_INFO_1529 = ^SERVER_INFO_1529;
+ {$EXTERNALSYM PSERVER_INFO_1529}
+ _SERVER_INFO_1529 = record
+ sv1529_minrcvqueue: DWORD;
+ end;
+ {$EXTERNALSYM _SERVER_INFO_1529}
+ SERVER_INFO_1529 = _SERVER_INFO_1529;
+ {$EXTERNALSYM SERVER_INFO_1529}
+ TServerInfo1529 = SERVER_INFO_1529;
+ PServerInfo1529 = PSERVER_INFO_1529;
+
+ LPSERVER_INFO_1530 = ^SERVER_INFO_1530;
+ {$EXTERNALSYM LPSERVER_INFO_1530}
+ PSERVER_INFO_1530 = ^SERVER_INFO_1530;
+ {$EXTERNALSYM PSERVER_INFO_1530}
+ _SERVER_INFO_1530 = record
+ sv1530_minfreeworkitems: DWORD;
+ end;
+ {$EXTERNALSYM _SERVER_INFO_1530}
+ SERVER_INFO_1530 = _SERVER_INFO_1530;
+ {$EXTERNALSYM SERVER_INFO_1530}
+ TServerInfo1530 = SERVER_INFO_1530;
+ PServerInfo1530 = PSERVER_INFO_1530;
+
+ LPSERVER_INFO_1533 = ^SERVER_INFO_1533;
+ {$EXTERNALSYM LPSERVER_INFO_1533}
+ PSERVER_INFO_1533 = ^SERVER_INFO_1533;
+ {$EXTERNALSYM PSERVER_INFO_1533}
+ _SERVER_INFO_1533 = record
+ sv1533_maxmpxct: DWORD;
+ end;
+ {$EXTERNALSYM _SERVER_INFO_1533}
+ SERVER_INFO_1533 = _SERVER_INFO_1533;
+ {$EXTERNALSYM SERVER_INFO_1533}
+ TServerInfo1533 = SERVER_INFO_1533;
+ PServerInfo1533 = PSERVER_INFO_1533;
+
+ LPSERVER_INFO_1534 = ^SERVER_INFO_1534;
+ {$EXTERNALSYM LPSERVER_INFO_1534}
+ PSERVER_INFO_1534 = ^SERVER_INFO_1534;
+ {$EXTERNALSYM PSERVER_INFO_1534}
+ _SERVER_INFO_1534 = record
+ sv1534_oplockbreakwait: DWORD;
+ end;
+ {$EXTERNALSYM _SERVER_INFO_1534}
+ SERVER_INFO_1534 = _SERVER_INFO_1534;
+ {$EXTERNALSYM SERVER_INFO_1534}
+ TServerInfo1534 = SERVER_INFO_1534;
+ PServerInfo1534 = PSERVER_INFO_1534;
+
+ LPSERVER_INFO_1535 = ^SERVER_INFO_1535;
+ {$EXTERNALSYM LPSERVER_INFO_1535}
+ PSERVER_INFO_1535 = ^SERVER_INFO_1535;
+ {$EXTERNALSYM PSERVER_INFO_1535}
+ _SERVER_INFO_1535 = record
+ sv1535_oplockbreakresponsewait: DWORD;
+ end;
+ {$EXTERNALSYM _SERVER_INFO_1535}
+ SERVER_INFO_1535 = _SERVER_INFO_1535;
+ {$EXTERNALSYM SERVER_INFO_1535}
+ TServerInfo1535 = SERVER_INFO_1535;
+ PServerInfo1535 = PSERVER_INFO_1535;
+
+ LPSERVER_INFO_1536 = ^SERVER_INFO_1536;
+ {$EXTERNALSYM LPSERVER_INFO_1536}
+ PSERVER_INFO_1536 = ^SERVER_INFO_1536;
+ {$EXTERNALSYM PSERVER_INFO_1536}
+ _SERVER_INFO_1536 = record
+ sv1536_enableoplocks: BOOL;
+ end;
+ {$EXTERNALSYM _SERVER_INFO_1536}
+ SERVER_INFO_1536 = _SERVER_INFO_1536;
+ {$EXTERNALSYM SERVER_INFO_1536}
+ TServerInfo1536 = SERVER_INFO_1536;
+ PServerInfo1536 = PSERVER_INFO_1536;
+
+ LPSERVER_INFO_1537 = ^SERVER_INFO_1537;
+ {$EXTERNALSYM LPSERVER_INFO_1537}
+ PSERVER_INFO_1537 = ^SERVER_INFO_1537;
+ {$EXTERNALSYM PSERVER_INFO_1537}
+ _SERVER_INFO_1537 = record
+ sv1537_enableoplockforceclose: BOOL;
+ end;
+ {$EXTERNALSYM _SERVER_INFO_1537}
+ SERVER_INFO_1537 = _SERVER_INFO_1537;
+ {$EXTERNALSYM SERVER_INFO_1537}
+ TServerInfo1537 = SERVER_INFO_1537;
+ PServerInfo1537 = PSERVER_INFO_1537;
+
+ LPSERVER_INFO_1538 = ^SERVER_INFO_1538;
+ {$EXTERNALSYM LPSERVER_INFO_1538}
+ PSERVER_INFO_1538 = ^SERVER_INFO_1538;
+ {$EXTERNALSYM PSERVER_INFO_1538}
+ _SERVER_INFO_1538 = record
+ sv1538_enablefcbopens: BOOL;
+ end;
+ {$EXTERNALSYM _SERVER_INFO_1538}
+ SERVER_INFO_1538 = _SERVER_INFO_1538;
+ {$EXTERNALSYM SERVER_INFO_1538}
+ TServerInfo1538 = SERVER_INFO_1538;
+ PServerInfo1538 = PSERVER_INFO_1538;
+
+ LPSERVER_INFO_1539 = ^SERVER_INFO_1539;
+ {$EXTERNALSYM LPSERVER_INFO_1539}
+ PSERVER_INFO_1539 = ^SERVER_INFO_1539;
+ {$EXTERNALSYM PSERVER_INFO_1539}
+ _SERVER_INFO_1539 = record
+ sv1539_enableraw: BOOL;
+ end;
+ {$EXTERNALSYM _SERVER_INFO_1539}
+ SERVER_INFO_1539 = _SERVER_INFO_1539;
+ {$EXTERNALSYM SERVER_INFO_1539}
+ TServerInfo1539 = SERVER_INFO_1539;
+ PServerInfo1539 = PSERVER_INFO_1539;
+
+ LPSERVER_INFO_1540 = ^SERVER_INFO_1540;
+ {$EXTERNALSYM LPSERVER_INFO_1540}
+ PSERVER_INFO_1540 = ^SERVER_INFO_1540;
+ {$EXTERNALSYM PSERVER_INFO_1540}
+ _SERVER_INFO_1540 = record
+ sv1540_enablesharednetdrives: BOOL;
+ end;
+ {$EXTERNALSYM _SERVER_INFO_1540}
+ SERVER_INFO_1540 = _SERVER_INFO_1540;
+ {$EXTERNALSYM SERVER_INFO_1540}
+ TServerInfo1540 = SERVER_INFO_1540;
+ PServerInfo1540 = PSERVER_INFO_1540;
+
+ LPSERVER_INFO_1541 = ^SERVER_INFO_1541;
+ {$EXTERNALSYM LPSERVER_INFO_1541}
+ PSERVER_INFO_1541 = ^SERVER_INFO_1541;
+ {$EXTERNALSYM PSERVER_INFO_1541}
+ _SERVER_INFO_1541 = record
+ sv1541_minfreeconnections: BOOL;
+ end;
+ {$EXTERNALSYM _SERVER_INFO_1541}
+ SERVER_INFO_1541 = _SERVER_INFO_1541;
+ {$EXTERNALSYM SERVER_INFO_1541}
+ TServerInfo1541 = SERVER_INFO_1541;
+ PServerInfo1541 = PSERVER_INFO_1541;
+
+ LPSERVER_INFO_1542 = ^SERVER_INFO_1542;
+ {$EXTERNALSYM LPSERVER_INFO_1542}
+ PSERVER_INFO_1542 = ^SERVER_INFO_1542;
+ {$EXTERNALSYM PSERVER_INFO_1542}
+ _SERVER_INFO_1542 = record
+ sv1542_maxfreeconnections: BOOL;
+ end;
+ {$EXTERNALSYM _SERVER_INFO_1542}
+ SERVER_INFO_1542 = _SERVER_INFO_1542;
+ {$EXTERNALSYM SERVER_INFO_1542}
+ TServerInfo1542 = SERVER_INFO_1542;
+ PServerInfo1542 = PSERVER_INFO_1542;
+
+ LPSERVER_INFO_1543 = ^SERVER_INFO_1543;
+ {$EXTERNALSYM LPSERVER_INFO_1543}
+ PSERVER_INFO_1543 = ^SERVER_INFO_1543;
+ {$EXTERNALSYM PSERVER_INFO_1543}
+ _SERVER_INFO_1543 = record
+ sv1543_initsesstable: DWORD;
+ end;
+ {$EXTERNALSYM _SERVER_INFO_1543}
+ SERVER_INFO_1543 = _SERVER_INFO_1543;
+ {$EXTERNALSYM SERVER_INFO_1543}
+ TServerInfo1543 = SERVER_INFO_1543;
+ PServerInfo1543 = PSERVER_INFO_1543;
+
+ LPSERVER_INFO_1544 = ^SERVER_INFO_1544;
+ {$EXTERNALSYM LPSERVER_INFO_1544}
+ PSERVER_INFO_1544 = ^SERVER_INFO_1544;
+ {$EXTERNALSYM PSERVER_INFO_1544}
+ _SERVER_INFO_1544 = record
+ sv1544_initconntable: DWORD;
+ end;
+ {$EXTERNALSYM _SERVER_INFO_1544}
+ SERVER_INFO_1544 = _SERVER_INFO_1544;
+ {$EXTERNALSYM SERVER_INFO_1544}
+ TServerInfo1544 = SERVER_INFO_1544;
+ PServerInfo1544 = PSERVER_INFO_1544;
+
+ LPSERVER_INFO_1545 = ^SERVER_INFO_1545;
+ {$EXTERNALSYM LPSERVER_INFO_1545}
+ PSERVER_INFO_1545 = ^SERVER_INFO_1545;
+ {$EXTERNALSYM PSERVER_INFO_1545}
+ _SERVER_INFO_1545 = record
+ sv1545_initfiletable: DWORD;
+ end;
+ {$EXTERNALSYM _SERVER_INFO_1545}
+ SERVER_INFO_1545 = _SERVER_INFO_1545;
+ {$EXTERNALSYM SERVER_INFO_1545}
+ TServerInfo1545 = SERVER_INFO_1545;
+ PServerInfo1545 = PSERVER_INFO_1545;
+
+ LPSERVER_INFO_1546 = ^SERVER_INFO_1546;
+ {$EXTERNALSYM LPSERVER_INFO_1546}
+ PSERVER_INFO_1546 = ^SERVER_INFO_1546;
+ {$EXTERNALSYM PSERVER_INFO_1546}
+ _SERVER_INFO_1546 = record
+ sv1546_initsearchtable: DWORD;
+ end;
+ {$EXTERNALSYM _SERVER_INFO_1546}
+ SERVER_INFO_1546 = _SERVER_INFO_1546;
+ {$EXTERNALSYM SERVER_INFO_1546}
+ TServerInfo1546 = SERVER_INFO_1546;
+ PServerInfo1546 = PSERVER_INFO_1546;
+
+ LPSERVER_INFO_1547 = ^SERVER_INFO_1547;
+ {$EXTERNALSYM LPSERVER_INFO_1547}
+ PSERVER_INFO_1547 = ^SERVER_INFO_1547;
+ {$EXTERNALSYM PSERVER_INFO_1547}
+ _SERVER_INFO_1547 = record
+ sv1547_alertschedule: DWORD;
+ end;
+ {$EXTERNALSYM _SERVER_INFO_1547}
+ SERVER_INFO_1547 = _SERVER_INFO_1547;
+ {$EXTERNALSYM SERVER_INFO_1547}
+ TServerInfo1547 = SERVER_INFO_1547;
+ PServerInfo1547 = PSERVER_INFO_1547;
+
+ LPSERVER_INFO_1548 = ^SERVER_INFO_1548;
+ {$EXTERNALSYM LPSERVER_INFO_1548}
+ PSERVER_INFO_1548 = ^SERVER_INFO_1548;
+ {$EXTERNALSYM PSERVER_INFO_1548}
+ _SERVER_INFO_1548 = record
+ sv1548_errorthreshold: DWORD;
+ end;
+ {$EXTERNALSYM _SERVER_INFO_1548}
+ SERVER_INFO_1548 = _SERVER_INFO_1548;
+ {$EXTERNALSYM SERVER_INFO_1548}
+ TServerInfo1548 = SERVER_INFO_1548;
+ PServerInfo1548 = PSERVER_INFO_1548;
+
+ LPSERVER_INFO_1549 = ^SERVER_INFO_1549;
+ {$EXTERNALSYM LPSERVER_INFO_1549}
+ PSERVER_INFO_1549 = ^SERVER_INFO_1549;
+ {$EXTERNALSYM PSERVER_INFO_1549}
+ _SERVER_INFO_1549 = record
+ sv1549_networkerrorthreshold: DWORD;
+ end;
+ {$EXTERNALSYM _SERVER_INFO_1549}
+ SERVER_INFO_1549 = _SERVER_INFO_1549;
+ {$EXTERNALSYM SERVER_INFO_1549}
+ TServerInfo1549 = SERVER_INFO_1549;
+ PServerInfo1549 = PSERVER_INFO_1549;
+
+ LPSERVER_INFO_1550 = ^SERVER_INFO_1550;
+ {$EXTERNALSYM LPSERVER_INFO_1550}
+ PSERVER_INFO_1550 = ^SERVER_INFO_1550;
+ {$EXTERNALSYM PSERVER_INFO_1550}
+ _SERVER_INFO_1550 = record
+ sv1550_diskspacethreshold: DWORD;
+ end;
+ {$EXTERNALSYM _SERVER_INFO_1550}
+ SERVER_INFO_1550 = _SERVER_INFO_1550;
+ {$EXTERNALSYM SERVER_INFO_1550}
+ TServerInfo1550 = SERVER_INFO_1550;
+ PServerInfo1550 = PSERVER_INFO_1550;
+
+ LPSERVER_INFO_1552 = ^SERVER_INFO_1552;
+ {$EXTERNALSYM LPSERVER_INFO_1552}
+ PSERVER_INFO_1552 = ^SERVER_INFO_1552;
+ {$EXTERNALSYM PSERVER_INFO_1552}
+ _SERVER_INFO_1552 = record
+ sv1552_maxlinkdelay: DWORD;
+ end;
+ {$EXTERNALSYM _SERVER_INFO_1552}
+ SERVER_INFO_1552 = _SERVER_INFO_1552;
+ {$EXTERNALSYM SERVER_INFO_1552}
+ TServerInfo1552 = SERVER_INFO_1552;
+ PServerInfo1552 = PSERVER_INFO_1552;
+
+ LPSERVER_INFO_1553 = ^SERVER_INFO_1553;
+ {$EXTERNALSYM LPSERVER_INFO_1553}
+ PSERVER_INFO_1553 = ^SERVER_INFO_1553;
+ {$EXTERNALSYM PSERVER_INFO_1553}
+ _SERVER_INFO_1553 = record
+ sv1553_minlinkthroughput: DWORD;
+ end;
+ {$EXTERNALSYM _SERVER_INFO_1553}
+ SERVER_INFO_1553 = _SERVER_INFO_1553;
+ {$EXTERNALSYM SERVER_INFO_1553}
+ TServerInfo1553 = SERVER_INFO_1553;
+ PServerInfo1553 = PSERVER_INFO_1553;
+
+ LPSERVER_INFO_1554 = ^SERVER_INFO_1554;
+ {$EXTERNALSYM LPSERVER_INFO_1554}
+ PSERVER_INFO_1554 = ^SERVER_INFO_1554;
+ {$EXTERNALSYM PSERVER_INFO_1554}
+ _SERVER_INFO_1554 = record
+ sv1554_linkinfovalidtime: DWORD;
+ end;
+ {$EXTERNALSYM _SERVER_INFO_1554}
+ SERVER_INFO_1554 = _SERVER_INFO_1554;
+ {$EXTERNALSYM SERVER_INFO_1554}
+ TServerInfo1554 = SERVER_INFO_1554;
+ PServerInfo1554 = PSERVER_INFO_1554;
+
+ LPSERVER_INFO_1555 = ^SERVER_INFO_1555;
+ {$EXTERNALSYM LPSERVER_INFO_1555}
+ PSERVER_INFO_1555 = ^SERVER_INFO_1555;
+ {$EXTERNALSYM PSERVER_INFO_1555}
+ _SERVER_INFO_1555 = record
+ sv1555_scavqosinfoupdatetime: DWORD;
+ end;
+ {$EXTERNALSYM _SERVER_INFO_1555}
+ SERVER_INFO_1555 = _SERVER_INFO_1555;
+ {$EXTERNALSYM SERVER_INFO_1555}
+ TServerInfo1555 = SERVER_INFO_1555;
+ PServerInfo1555 = PSERVER_INFO_1555;
+
+ LPSERVER_INFO_1556 = ^SERVER_INFO_1556;
+ {$EXTERNALSYM LPSERVER_INFO_1556}
+ PSERVER_INFO_1556 = ^SERVER_INFO_1556;
+ {$EXTERNALSYM PSERVER_INFO_1556}
+ _SERVER_INFO_1556 = record
+ sv1556_maxworkitemidletime: DWORD;
+ end;
+ {$EXTERNALSYM _SERVER_INFO_1556}
+ SERVER_INFO_1556 = _SERVER_INFO_1556;
+ {$EXTERNALSYM SERVER_INFO_1556}
+ TServerInfo1556 = SERVER_INFO_1556;
+ PServerInfo1556 = PSERVER_INFO_1556;
+
+ LPSERVER_INFO_1557 = ^SERVER_INFO_1557;
+ {$EXTERNALSYM LPSERVER_INFO_1557}
+ PSERVER_INFO_1557 = ^SERVER_INFO_1557;
+ {$EXTERNALSYM PSERVER_INFO_1557}
+ _SERVER_INFO_1557 = record
+ sv1557_maxrawworkitems: DWORD;
+ end;
+ {$EXTERNALSYM _SERVER_INFO_1557}
+ SERVER_INFO_1557 = _SERVER_INFO_1557;
+ {$EXTERNALSYM SERVER_INFO_1557}
+ TServerInfo1557 = SERVER_INFO_1557;
+ PServerInfo1557 = PSERVER_INFO_1557;
+
+ LPSERVER_INFO_1560 = ^SERVER_INFO_1560;
+ {$EXTERNALSYM LPSERVER_INFO_1560}
+ PSERVER_INFO_1560 = ^SERVER_INFO_1560;
+ {$EXTERNALSYM PSERVER_INFO_1560}
+ _SERVER_INFO_1560 = record
+ sv1560_producttype: DWORD;
+ end;
+ {$EXTERNALSYM _SERVER_INFO_1560}
+ SERVER_INFO_1560 = _SERVER_INFO_1560;
+ {$EXTERNALSYM SERVER_INFO_1560}
+ TServerInfo1560 = SERVER_INFO_1560;
+ PServerInfo1560 = PSERVER_INFO_1560;
+
+ LPSERVER_INFO_1561 = ^SERVER_INFO_1561;
+ {$EXTERNALSYM LPSERVER_INFO_1561}
+ PSERVER_INFO_1561 = ^SERVER_INFO_1561;
+ {$EXTERNALSYM PSERVER_INFO_1561}
+ _SERVER_INFO_1561 = record
+ sv1561_serversize: DWORD;
+ end;
+ {$EXTERNALSYM _SERVER_INFO_1561}
+ SERVER_INFO_1561 = _SERVER_INFO_1561;
+ {$EXTERNALSYM SERVER_INFO_1561}
+ TServerInfo1561 = SERVER_INFO_1561;
+ PServerInfo1561 = PSERVER_INFO_1561;
+
+ LPSERVER_INFO_1562 = ^SERVER_INFO_1562;
+ {$EXTERNALSYM LPSERVER_INFO_1562}
+ PSERVER_INFO_1562 = ^SERVER_INFO_1562;
+ {$EXTERNALSYM PSERVER_INFO_1562}
+ _SERVER_INFO_1562 = record
+ sv1562_connectionlessautodisc: DWORD;
+ end;
+ {$EXTERNALSYM _SERVER_INFO_1562}
+ SERVER_INFO_1562 = _SERVER_INFO_1562;
+ {$EXTERNALSYM SERVER_INFO_1562}
+ TServerInfo1562 = SERVER_INFO_1562;
+ PServerInfo1562 = PSERVER_INFO_1562;
+
+ LPSERVER_INFO_1563 = ^SERVER_INFO_1563;
+ {$EXTERNALSYM LPSERVER_INFO_1563}
+ PSERVER_INFO_1563 = ^SERVER_INFO_1563;
+ {$EXTERNALSYM PSERVER_INFO_1563}
+ _SERVER_INFO_1563 = record
+ sv1563_sharingviolationretries: DWORD;
+ end;
+ {$EXTERNALSYM _SERVER_INFO_1563}
+ SERVER_INFO_1563 = _SERVER_INFO_1563;
+ {$EXTERNALSYM SERVER_INFO_1563}
+ TServerInfo1563 = SERVER_INFO_1563;
+ PServerInfo1563 = PSERVER_INFO_1563;
+
+ LPSERVER_INFO_1564 = ^SERVER_INFO_1564;
+ {$EXTERNALSYM LPSERVER_INFO_1564}
+ PSERVER_INFO_1564 = ^SERVER_INFO_1564;
+ {$EXTERNALSYM PSERVER_INFO_1564}
+ _SERVER_INFO_1564 = record
+ sv1564_sharingviolationdelay: DWORD;
+ end;
+ {$EXTERNALSYM _SERVER_INFO_1564}
+ SERVER_INFO_1564 = _SERVER_INFO_1564;
+ {$EXTERNALSYM SERVER_INFO_1564}
+ TServerInfo1564 = SERVER_INFO_1564;
+ PServerInfo1564 = PSERVER_INFO_1564;
+
+ LPSERVER_INFO_1565 = ^SERVER_INFO_1565;
+ {$EXTERNALSYM LPSERVER_INFO_1565}
+ PSERVER_INFO_1565 = ^SERVER_INFO_1565;
+ {$EXTERNALSYM PSERVER_INFO_1565}
+ _SERVER_INFO_1565 = record
+ sv1565_maxglobalopensearch: DWORD;
+ end;
+ {$EXTERNALSYM _SERVER_INFO_1565}
+ SERVER_INFO_1565 = _SERVER_INFO_1565;
+ {$EXTERNALSYM SERVER_INFO_1565}
+ TServerInfo1565 = SERVER_INFO_1565;
+ PServerInfo1565 = PSERVER_INFO_1565;
+
+ LPSERVER_INFO_1566 = ^SERVER_INFO_1566;
+ {$EXTERNALSYM LPSERVER_INFO_1566}
+ PSERVER_INFO_1566 = ^SERVER_INFO_1566;
+ {$EXTERNALSYM PSERVER_INFO_1566}
+ _SERVER_INFO_1566 = record
+ sv1566_removeduplicatesearches: BOOL;
+ end;
+ {$EXTERNALSYM _SERVER_INFO_1566}
+ SERVER_INFO_1566 = _SERVER_INFO_1566;
+ {$EXTERNALSYM SERVER_INFO_1566}
+ TServerInfo1566 = SERVER_INFO_1566;
+ PServerInfo1566 = PSERVER_INFO_1566;
+
+ LPSERVER_INFO_1567 = ^SERVER_INFO_1567;
+ {$EXTERNALSYM LPSERVER_INFO_1567}
+ PSERVER_INFO_1567 = ^SERVER_INFO_1567;
+ {$EXTERNALSYM PSERVER_INFO_1567}
+ _SERVER_INFO_1567 = record
+ sv1567_lockviolationretries: DWORD;
+ end;
+ {$EXTERNALSYM _SERVER_INFO_1567}
+ SERVER_INFO_1567 = _SERVER_INFO_1567;
+ {$EXTERNALSYM SERVER_INFO_1567}
+ TServerInfo1567 = SERVER_INFO_1567;
+ PServerInfo1567 = PSERVER_INFO_1567;
+
+ LPSERVER_INFO_1568 = ^SERVER_INFO_1568;
+ {$EXTERNALSYM LPSERVER_INFO_1568}
+ PSERVER_INFO_1568 = ^SERVER_INFO_1568;
+ {$EXTERNALSYM PSERVER_INFO_1568}
+ _SERVER_INFO_1568 = record
+ sv1568_lockviolationoffset: DWORD;
+ end;
+ {$EXTERNALSYM _SERVER_INFO_1568}
+ SERVER_INFO_1568 = _SERVER_INFO_1568;
+ {$EXTERNALSYM SERVER_INFO_1568}
+ TServerInfo1568 = SERVER_INFO_1568;
+ PServerInfo1568 = PSERVER_INFO_1568;
+
+ LPSERVER_INFO_1569 = ^SERVER_INFO_1569;
+ {$EXTERNALSYM LPSERVER_INFO_1569}
+ PSERVER_INFO_1569 = ^SERVER_INFO_1569;
+ {$EXTERNALSYM PSERVER_INFO_1569}
+ _SERVER_INFO_1569 = record
+ sv1569_lockviolationdelay: DWORD;
+ end;
+ {$EXTERNALSYM _SERVER_INFO_1569}
+ SERVER_INFO_1569 = _SERVER_INFO_1569;
+ {$EXTERNALSYM SERVER_INFO_1569}
+ TServerInfo1569 = SERVER_INFO_1569;
+ PServerInfo1569 = PSERVER_INFO_1569;
+
+ LPSERVER_INFO_1570 = ^SERVER_INFO_1570;
+ {$EXTERNALSYM LPSERVER_INFO_1570}
+ PSERVER_INFO_1570 = ^SERVER_INFO_1570;
+ {$EXTERNALSYM PSERVER_INFO_1570}
+ _SERVER_INFO_1570 = record
+ sv1570_mdlreadswitchover: DWORD;
+ end;
+ {$EXTERNALSYM _SERVER_INFO_1570}
+ SERVER_INFO_1570 = _SERVER_INFO_1570;
+ {$EXTERNALSYM SERVER_INFO_1570}
+ TServerInfo1570 = SERVER_INFO_1570;
+ PServerInfo1570 = PSERVER_INFO_1570;
+
+ LPSERVER_INFO_1571 = ^SERVER_INFO_1571;
+ {$EXTERNALSYM LPSERVER_INFO_1571}
+ PSERVER_INFO_1571 = ^SERVER_INFO_1571;
+ {$EXTERNALSYM PSERVER_INFO_1571}
+ _SERVER_INFO_1571 = record
+ sv1571_cachedopenlimit: DWORD;
+ end;
+ {$EXTERNALSYM _SERVER_INFO_1571}
+ SERVER_INFO_1571 = _SERVER_INFO_1571;
+ {$EXTERNALSYM SERVER_INFO_1571}
+ TServerInfo1571 = SERVER_INFO_1571;
+ PServerInfo1571 = PSERVER_INFO_1571;
+
+ LPSERVER_INFO_1572 = ^SERVER_INFO_1572;
+ {$EXTERNALSYM LPSERVER_INFO_1572}
+ PSERVER_INFO_1572 = ^SERVER_INFO_1572;
+ {$EXTERNALSYM PSERVER_INFO_1572}
+ _SERVER_INFO_1572 = record
+ sv1572_criticalthreads: DWORD;
+ end;
+ {$EXTERNALSYM _SERVER_INFO_1572}
+ SERVER_INFO_1572 = _SERVER_INFO_1572;
+ {$EXTERNALSYM SERVER_INFO_1572}
+ TServerInfo1572 = SERVER_INFO_1572;
+ PServerInfo1572 = PSERVER_INFO_1572;
+
+ LPSERVER_INFO_1573 = ^SERVER_INFO_1573;
+ {$EXTERNALSYM LPSERVER_INFO_1573}
+ PSERVER_INFO_1573 = ^SERVER_INFO_1573;
+ {$EXTERNALSYM PSERVER_INFO_1573}
+ _SERVER_INFO_1573 = record
+ sv1573_restrictnullsessaccess: DWORD;
+ end;
+ {$EXTERNALSYM _SERVER_INFO_1573}
+ SERVER_INFO_1573 = _SERVER_INFO_1573;
+ {$EXTERNALSYM SERVER_INFO_1573}
+ TServerInfo1573 = SERVER_INFO_1573;
+ PServerInfo1573 = PSERVER_INFO_1573;
+
+ LPSERVER_INFO_1574 = ^SERVER_INFO_1574;
+ {$EXTERNALSYM LPSERVER_INFO_1574}
+ PSERVER_INFO_1574 = ^SERVER_INFO_1574;
+ {$EXTERNALSYM PSERVER_INFO_1574}
+ _SERVER_INFO_1574 = record
+ sv1574_enablewfw311directipx: DWORD;
+ end;
+ {$EXTERNALSYM _SERVER_INFO_1574}
+ SERVER_INFO_1574 = _SERVER_INFO_1574;
+ {$EXTERNALSYM SERVER_INFO_1574}
+ TServerInfo1574 = SERVER_INFO_1574;
+ PServerInfo1574 = PSERVER_INFO_1574;
+
+ LPSERVER_INFO_1575 = ^SERVER_INFO_1575;
+ {$EXTERNALSYM LPSERVER_INFO_1575}
+ PSERVER_INFO_1575 = ^SERVER_INFO_1575;
+ {$EXTERNALSYM PSERVER_INFO_1575}
+ _SERVER_INFO_1575 = record
+ sv1575_otherqueueaffinity: DWORD;
+ end;
+ {$EXTERNALSYM _SERVER_INFO_1575}
+ SERVER_INFO_1575 = _SERVER_INFO_1575;
+ {$EXTERNALSYM SERVER_INFO_1575}
+ TServerInfo1575 = SERVER_INFO_1575;
+ PServerInfo1575 = PSERVER_INFO_1575;
+
+ LPSERVER_INFO_1576 = ^SERVER_INFO_1576;
+ {$EXTERNALSYM LPSERVER_INFO_1576}
+ PSERVER_INFO_1576 = ^SERVER_INFO_1576;
+ {$EXTERNALSYM PSERVER_INFO_1576}
+ _SERVER_INFO_1576 = record
+ sv1576_queuesamplesecs: DWORD;
+ end;
+ {$EXTERNALSYM _SERVER_INFO_1576}
+ SERVER_INFO_1576 = _SERVER_INFO_1576;
+ {$EXTERNALSYM SERVER_INFO_1576}
+ TServerInfo1576 = SERVER_INFO_1576;
+ PServerInfo1576 = PSERVER_INFO_1576;
+
+ LPSERVER_INFO_1577 = ^SERVER_INFO_1577;
+ {$EXTERNALSYM LPSERVER_INFO_1577}
+ PSERVER_INFO_1577 = ^SERVER_INFO_1577;
+ {$EXTERNALSYM PSERVER_INFO_1577}
+ _SERVER_INFO_1577 = record
+ sv1577_balancecount: DWORD;
+ end;
+ {$EXTERNALSYM _SERVER_INFO_1577}
+ SERVER_INFO_1577 = _SERVER_INFO_1577;
+ {$EXTERNALSYM SERVER_INFO_1577}
+ TServerInfo1577 = SERVER_INFO_1577;
+ PServerInfo1577 = PSERVER_INFO_1577;
+
+ LPSERVER_INFO_1578 = ^SERVER_INFO_1578;
+ {$EXTERNALSYM LPSERVER_INFO_1578}
+ PSERVER_INFO_1578 = ^SERVER_INFO_1578;
+ {$EXTERNALSYM PSERVER_INFO_1578}
+ _SERVER_INFO_1578 = record
+ sv1578_preferredaffinity: DWORD;
+ end;
+ {$EXTERNALSYM _SERVER_INFO_1578}
+ SERVER_INFO_1578 = _SERVER_INFO_1578;
+ {$EXTERNALSYM SERVER_INFO_1578}
+ TServerInfo1578 = SERVER_INFO_1578;
+ PServerInfo1578 = PSERVER_INFO_1578;
+
+ LPSERVER_INFO_1579 = ^SERVER_INFO_1579;
+ {$EXTERNALSYM LPSERVER_INFO_1579}
+ PSERVER_INFO_1579 = ^SERVER_INFO_1579;
+ {$EXTERNALSYM PSERVER_INFO_1579}
+ _SERVER_INFO_1579 = record
+ sv1579_maxfreerfcbs: DWORD;
+ end;
+ {$EXTERNALSYM _SERVER_INFO_1579}
+ SERVER_INFO_1579 = _SERVER_INFO_1579;
+ {$EXTERNALSYM SERVER_INFO_1579}
+ TServerInfo1579 = SERVER_INFO_1579;
+ PServerInfo1579 = PSERVER_INFO_1579;
+
+ LPSERVER_INFO_1580 = ^SERVER_INFO_1580;
+ {$EXTERNALSYM LPSERVER_INFO_1580}
+ PSERVER_INFO_1580 = ^SERVER_INFO_1580;
+ {$EXTERNALSYM PSERVER_INFO_1580}
+ _SERVER_INFO_1580 = record
+ sv1580_maxfreemfcbs: DWORD;
+ end;
+ {$EXTERNALSYM _SERVER_INFO_1580}
+ SERVER_INFO_1580 = _SERVER_INFO_1580;
+ {$EXTERNALSYM SERVER_INFO_1580}
+ TServerInfo1580 = SERVER_INFO_1580;
+ PServerInfo1580 = PSERVER_INFO_1580;
+
+ LPSERVER_INFO_1581 = ^SERVER_INFO_1581;
+ {$EXTERNALSYM LPSERVER_INFO_1581}
+ PSERVER_INFO_1581 = ^SERVER_INFO_1581;
+ {$EXTERNALSYM PSERVER_INFO_1581}
+ _SERVER_INFO_1581 = record
+ sv1581_maxfreemlcbs: DWORD;
+ end;
+ {$EXTERNALSYM _SERVER_INFO_1581}
+ SERVER_INFO_1581 = _SERVER_INFO_1581;
+ {$EXTERNALSYM SERVER_INFO_1581}
+ TServerInfo1581 = SERVER_INFO_1581;
+ PServerInfo1581 = PSERVER_INFO_1581;
+
+ LPSERVER_INFO_1582 = ^SERVER_INFO_1582;
+ {$EXTERNALSYM LPSERVER_INFO_1582}
+ PSERVER_INFO_1582 = ^SERVER_INFO_1582;
+ {$EXTERNALSYM PSERVER_INFO_1582}
+ _SERVER_INFO_1582 = record
+ sv1582_maxfreepagedpoolchunks: DWORD;
+ end;
+ {$EXTERNALSYM _SERVER_INFO_1582}
+ SERVER_INFO_1582 = _SERVER_INFO_1582;
+ {$EXTERNALSYM SERVER_INFO_1582}
+ TServerInfo1582 = SERVER_INFO_1582;
+ PServerInfo1582 = PSERVER_INFO_1582;
+
+ LPSERVER_INFO_1583 = ^SERVER_INFO_1583;
+ {$EXTERNALSYM LPSERVER_INFO_1583}
+ PSERVER_INFO_1583 = ^SERVER_INFO_1583;
+ {$EXTERNALSYM PSERVER_INFO_1583}
+ _SERVER_INFO_1583 = record
+ sv1583_minpagedpoolchunksize: DWORD;
+ end;
+ {$EXTERNALSYM _SERVER_INFO_1583}
+ SERVER_INFO_1583 = _SERVER_INFO_1583;
+ {$EXTERNALSYM SERVER_INFO_1583}
+ TServerInfo1583 = SERVER_INFO_1583;
+ PServerInfo1583 = PSERVER_INFO_1583;
+
+ LPSERVER_INFO_1584 = ^SERVER_INFO_1584;
+ {$EXTERNALSYM LPSERVER_INFO_1584}
+ PSERVER_INFO_1584 = ^SERVER_INFO_1584;
+ {$EXTERNALSYM PSERVER_INFO_1584}
+ _SERVER_INFO_1584 = record
+ sv1584_maxpagedpoolchunksize: DWORD;
+ end;
+ {$EXTERNALSYM _SERVER_INFO_1584}
+ SERVER_INFO_1584 = _SERVER_INFO_1584;
+ {$EXTERNALSYM SERVER_INFO_1584}
+ TServerInfo1584 = SERVER_INFO_1584;
+ PServerInfo1584 = PSERVER_INFO_1584;
+
+ LPSERVER_INFO_1585 = ^SERVER_INFO_1585;
+ {$EXTERNALSYM LPSERVER_INFO_1585}
+ PSERVER_INFO_1585 = ^SERVER_INFO_1585;
+ {$EXTERNALSYM PSERVER_INFO_1585}
+ _SERVER_INFO_1585 = record
+ sv1585_sendsfrompreferredprocessor: BOOL;
+ end;
+ {$EXTERNALSYM _SERVER_INFO_1585}
+ SERVER_INFO_1585 = _SERVER_INFO_1585;
+ {$EXTERNALSYM SERVER_INFO_1585}
+ TServerInfo1585 = SERVER_INFO_1585;
+ PServerInfo1585 = PSERVER_INFO_1585;
+
+ LPSERVER_INFO_1586 = ^SERVER_INFO_1586;
+ {$EXTERNALSYM LPSERVER_INFO_1586}
+ PSERVER_INFO_1586 = ^SERVER_INFO_1586;
+ {$EXTERNALSYM PSERVER_INFO_1586}
+ _SERVER_INFO_1586 = record
+ sv1586_maxthreadsperqueue: DWORD;
+ end;
+ {$EXTERNALSYM _SERVER_INFO_1586}
+ SERVER_INFO_1586 = _SERVER_INFO_1586;
+ {$EXTERNALSYM SERVER_INFO_1586}
+ TServerInfo1586 = SERVER_INFO_1586;
+ PServerInfo1586 = PSERVER_INFO_1586;
+
+ LPSERVER_INFO_1587 = ^SERVER_INFO_1587;
+ {$EXTERNALSYM LPSERVER_INFO_1587}
+ PSERVER_INFO_1587 = ^SERVER_INFO_1587;
+ {$EXTERNALSYM PSERVER_INFO_1587}
+ _SERVER_INFO_1587 = record
+ sv1587_cacheddirectorylimit: DWORD;
+ end;
+ {$EXTERNALSYM _SERVER_INFO_1587}
+ SERVER_INFO_1587 = _SERVER_INFO_1587;
+ {$EXTERNALSYM SERVER_INFO_1587}
+ TServerInfo1587 = SERVER_INFO_1587;
+ PServerInfo1587 = PSERVER_INFO_1587;
+
+ LPSERVER_INFO_1588 = ^SERVER_INFO_1588;
+ {$EXTERNALSYM LPSERVER_INFO_1588}
+ PSERVER_INFO_1588 = ^SERVER_INFO_1588;
+ {$EXTERNALSYM PSERVER_INFO_1588}
+ _SERVER_INFO_1588 = record
+ sv1588_maxcopylength: DWORD;
+ end;
+ {$EXTERNALSYM _SERVER_INFO_1588}
+ SERVER_INFO_1588 = _SERVER_INFO_1588;
+ {$EXTERNALSYM SERVER_INFO_1588}
+ TServerInfo1588 = SERVER_INFO_1588;
+ PServerInfo1588 = PSERVER_INFO_1588;
+
+ LPSERVER_INFO_1590 = ^SERVER_INFO_1590;
+ {$EXTERNALSYM LPSERVER_INFO_1590}
+ PSERVER_INFO_1590 = ^SERVER_INFO_1590;
+ {$EXTERNALSYM PSERVER_INFO_1590}
+ _SERVER_INFO_1590 = record
+ sv1590_enablecompression: DWORD;
+ end;
+ {$EXTERNALSYM _SERVER_INFO_1590}
+ SERVER_INFO_1590 = _SERVER_INFO_1590;
+ {$EXTERNALSYM SERVER_INFO_1590}
+ TServerInfo1590 = SERVER_INFO_1590;
+ PServerInfo1590 = PSERVER_INFO_1590;
+
+ LPSERVER_INFO_1591 = ^SERVER_INFO_1591;
+ {$EXTERNALSYM LPSERVER_INFO_1591}
+ PSERVER_INFO_1591 = ^SERVER_INFO_1591;
+ {$EXTERNALSYM PSERVER_INFO_1591}
+ _SERVER_INFO_1591 = record
+ sv1591_autosharewks: DWORD;
+ end;
+ {$EXTERNALSYM _SERVER_INFO_1591}
+ SERVER_INFO_1591 = _SERVER_INFO_1591;
+ {$EXTERNALSYM SERVER_INFO_1591}
+ TServerInfo1591 = SERVER_INFO_1591;
+ PServerInfo1591 = PSERVER_INFO_1591;
+
+ LPSERVER_INFO_1592 = ^SERVER_INFO_1592;
+ {$EXTERNALSYM LPSERVER_INFO_1592}
+ PSERVER_INFO_1592 = ^SERVER_INFO_1592;
+ {$EXTERNALSYM PSERVER_INFO_1592}
+ _SERVER_INFO_1592 = record
+ sv1592_autosharewks: DWORD;
+ end;
+ {$EXTERNALSYM _SERVER_INFO_1592}
+ SERVER_INFO_1592 = _SERVER_INFO_1592;
+ {$EXTERNALSYM SERVER_INFO_1592}
+ TServerInfo1592 = SERVER_INFO_1592;
+ PServerInfo1592 = PSERVER_INFO_1592;
+
+ LPSERVER_INFO_1593 = ^SERVER_INFO_1593;
+ {$EXTERNALSYM LPSERVER_INFO_1593}
+ PSERVER_INFO_1593 = ^SERVER_INFO_1593;
+ {$EXTERNALSYM PSERVER_INFO_1593}
+ _SERVER_INFO_1593 = record
+ sv1593_enablesecuritysignature: DWORD;
+ end;
+ {$EXTERNALSYM _SERVER_INFO_1593}
+ SERVER_INFO_1593 = _SERVER_INFO_1593;
+ {$EXTERNALSYM SERVER_INFO_1593}
+ TServerInfo1593 = SERVER_INFO_1593;
+ PServerInfo1593 = PSERVER_INFO_1593;
+
+ LPSERVER_INFO_1594 = ^SERVER_INFO_1594;
+ {$EXTERNALSYM LPSERVER_INFO_1594}
+ PSERVER_INFO_1594 = ^SERVER_INFO_1594;
+ {$EXTERNALSYM PSERVER_INFO_1594}
+ _SERVER_INFO_1594 = record
+ sv1594_requiresecuritysignature: DWORD;
+ end;
+ {$EXTERNALSYM _SERVER_INFO_1594}
+ SERVER_INFO_1594 = _SERVER_INFO_1594;
+ {$EXTERNALSYM SERVER_INFO_1594}
+ TServerInfo1594 = SERVER_INFO_1594;
+ PServerInfo1594 = PSERVER_INFO_1594;
+
+ LPSERVER_INFO_1595 = ^SERVER_INFO_1595;
+ {$EXTERNALSYM LPSERVER_INFO_1595}
+ PSERVER_INFO_1595 = ^SERVER_INFO_1595;
+ {$EXTERNALSYM PSERVER_INFO_1595}
+ _SERVER_INFO_1595 = record
+ sv1595_minclientbuffersize: DWORD;
+ end;
+ {$EXTERNALSYM _SERVER_INFO_1595}
+ SERVER_INFO_1595 = _SERVER_INFO_1595;
+ {$EXTERNALSYM SERVER_INFO_1595}
+ TServerInfo1595 = SERVER_INFO_1595;
+ PServerInfo1595 = PSERVER_INFO_1595;
+
+ LPSERVER_INFO_1596 = ^SERVER_INFO_1596;
+ {$EXTERNALSYM LPSERVER_INFO_1596}
+ PSERVER_INFO_1596 = ^SERVER_INFO_1596;
+ {$EXTERNALSYM PSERVER_INFO_1596}
+ _SERVER_INFO_1596 = record
+ sv1596_ConnectionNoSessionsTimeout: DWORD;
+ end;
+ {$EXTERNALSYM _SERVER_INFO_1596}
+ SERVER_INFO_1596 = _SERVER_INFO_1596;
+ {$EXTERNALSYM SERVER_INFO_1596}
+ TServerInfo1596 = SERVER_INFO_1596;
+ PServerInfo1596 = PSERVER_INFO_1596;
+
+ LPSERVER_INFO_1597 = ^SERVER_INFO_1597;
+ {$EXTERNALSYM LPSERVER_INFO_1597}
+ PSERVER_INFO_1597 = ^SERVER_INFO_1597;
+ {$EXTERNALSYM PSERVER_INFO_1597}
+ _SERVER_INFO_1597 = record
+ sv1597_IdleThreadTimeOut: DWORD;
+ end;
+ {$EXTERNALSYM _SERVER_INFO_1597}
+ SERVER_INFO_1597 = _SERVER_INFO_1597;
+ {$EXTERNALSYM SERVER_INFO_1597}
+ TServerInfo1597 = SERVER_INFO_1597;
+ PServerInfo1597 = PSERVER_INFO_1597;
+
+ LPSERVER_INFO_1598 = ^SERVER_INFO_1598;
+ {$EXTERNALSYM LPSERVER_INFO_1598}
+ PSERVER_INFO_1598 = ^SERVER_INFO_1598;
+ {$EXTERNALSYM PSERVER_INFO_1598}
+ _SERVER_INFO_1598 = record
+ sv1598_enableW9xsecuritysignature: DWORD;
+ end;
+ {$EXTERNALSYM _SERVER_INFO_1598}
+ SERVER_INFO_1598 = _SERVER_INFO_1598;
+ {$EXTERNALSYM SERVER_INFO_1598}
+ TServerInfo1598 = SERVER_INFO_1598;
+ PServerInfo1598 = PSERVER_INFO_1598;
+
+ LPSERVER_INFO_1599 = ^SERVER_INFO_1599;
+ {$EXTERNALSYM LPSERVER_INFO_1599}
+ PSERVER_INFO_1599 = ^SERVER_INFO_1599;
+ {$EXTERNALSYM PSERVER_INFO_1599}
+ _SERVER_INFO_1599 = record
+ sv1598_enforcekerberosreauthentication: BOOLEAN;
+ end;
+ {$EXTERNALSYM _SERVER_INFO_1599}
+ SERVER_INFO_1599 = _SERVER_INFO_1599;
+ {$EXTERNALSYM SERVER_INFO_1599}
+ TServerInfo1599 = SERVER_INFO_1599;
+ PServerInfo1599 = PSERVER_INFO_1599;
+
+ LPSERVER_INFO_1600 = ^SERVER_INFO_1600;
+ {$EXTERNALSYM LPSERVER_INFO_1600}
+ PSERVER_INFO_1600 = ^SERVER_INFO_1600;
+ {$EXTERNALSYM PSERVER_INFO_1600}
+ _SERVER_INFO_1600 = record
+ sv1598_disabledos: BOOLEAN;
+ end;
+ {$EXTERNALSYM _SERVER_INFO_1600}
+ SERVER_INFO_1600 = _SERVER_INFO_1600;
+ {$EXTERNALSYM SERVER_INFO_1600}
+ TServerInfo1600 = SERVER_INFO_1600;
+ PServerInfo1600 = PSERVER_INFO_1600;
+
+ LPSERVER_INFO_1601 = ^SERVER_INFO_1601;
+ {$EXTERNALSYM LPSERVER_INFO_1601}
+ PSERVER_INFO_1601 = ^SERVER_INFO_1601;
+ {$EXTERNALSYM PSERVER_INFO_1601}
+ _SERVER_INFO_1601 = record
+ sv1598_lowdiskspaceminimum: DWORD;
+ end;
+ {$EXTERNALSYM _SERVER_INFO_1601}
+ SERVER_INFO_1601 = _SERVER_INFO_1601;
+ {$EXTERNALSYM SERVER_INFO_1601}
+ TServerInfo1601 = SERVER_INFO_1601;
+ PServerInfo1601 = PSERVER_INFO_1601;
+
+ LPSERVER_INFO_1602 = ^SERVER_INFO_1602;
+ {$EXTERNALSYM LPSERVER_INFO_1602}
+ PSERVER_INFO_1602 = ^SERVER_INFO_1602;
+ {$EXTERNALSYM PSERVER_INFO_1602}
+ _SERVER_INFO_1602 = record
+ sv_1598_disablestrictnamechecking: BOOL;
+ end;
+ {$EXTERNALSYM _SERVER_INFO_1602}
+ SERVER_INFO_1602 = _SERVER_INFO_1602;
+ {$EXTERNALSYM SERVER_INFO_1602}
+ TServerInfo1602 = SERVER_INFO_1602;
+ PServerInfo1602 = PSERVER_INFO_1602;
+
+//
+// A special structure definition is required in order for this
+// structure to work with RPC. The problem is that having addresslength
+// indicate the number of bytes in address means that RPC must know the
+// link between the two.
+//
+
+ LPSERVER_TRANSPORT_INFO_0 = ^SERVER_TRANSPORT_INFO_0;
+ {$EXTERNALSYM LPSERVER_TRANSPORT_INFO_0}
+ PSERVER_TRANSPORT_INFO_0 = ^SERVER_TRANSPORT_INFO_0;
+ {$EXTERNALSYM PSERVER_TRANSPORT_INFO_0}
+ _SERVER_TRANSPORT_INFO_0 = record
+ svti0_numberofvcs: DWORD;
+ svti0_transportname: LMSTR;
+ svti0_transportaddress: LPBYTE;
+ svti0_transportaddresslength: DWORD;
+ svti0_networkaddress: LMSTR;
+ end;
+ {$EXTERNALSYM _SERVER_TRANSPORT_INFO_0}
+ SERVER_TRANSPORT_INFO_0 = _SERVER_TRANSPORT_INFO_0;
+ {$EXTERNALSYM SERVER_TRANSPORT_INFO_0}
+ TServerTransportInfo0 = SERVER_TRANSPORT_INFO_0;
+ PServerTransportInfo0 = PSERVER_TRANSPORT_INFO_0;
+
+ LPSERVER_TRANSPORT_INFO_1 = ^SERVER_TRANSPORT_INFO_1;
+ {$EXTERNALSYM LPSERVER_TRANSPORT_INFO_1}
+ PSERVER_TRANSPORT_INFO_1 = ^SERVER_TRANSPORT_INFO_1;
+ {$EXTERNALSYM PSERVER_TRANSPORT_INFO_1}
+ _SERVER_TRANSPORT_INFO_1 = record
+ svti1_numberofvcs: DWORD;
+ svti1_transportname: LMSTR;
+ svti1_transportaddress: LPBYTE;
+ svti1_transportaddresslength: DWORD;
+ svti1_networkaddress: LMSTR;
+ svti1_domain: LMSTR;
+ end;
+ {$EXTERNALSYM _SERVER_TRANSPORT_INFO_1}
+ SERVER_TRANSPORT_INFO_1 = _SERVER_TRANSPORT_INFO_1;
+ {$EXTERNALSYM SERVER_TRANSPORT_INFO_1}
+ TServerTransportInfo1 = SERVER_TRANSPORT_INFO_1;
+ PServerTransportInfo1 = PSERVER_TRANSPORT_INFO_1;
+
+ LPSERVER_TRANSPORT_INFO_2 = ^SERVER_TRANSPORT_INFO_2;
+ {$EXTERNALSYM LPSERVER_TRANSPORT_INFO_2}
+ PSERVER_TRANSPORT_INFO_2 = ^SERVER_TRANSPORT_INFO_2;
+ {$EXTERNALSYM PSERVER_TRANSPORT_INFO_2}
+ _SERVER_TRANSPORT_INFO_2 = record
+ svti2_numberofvcs: DWORD;
+ svti2_transportname: LMSTR;
+ svti2_transportaddress: LPBYTE;
+ svti2_transportaddresslength: DWORD;
+ svti2_networkaddress: LMSTR;
+ svti2_domain: LMSTR;
+ svti2_flags: ULONG;
+ end;
+ {$EXTERNALSYM _SERVER_TRANSPORT_INFO_2}
+ SERVER_TRANSPORT_INFO_2 = _SERVER_TRANSPORT_INFO_2;
+ {$EXTERNALSYM SERVER_TRANSPORT_INFO_2}
+ TServerTransportInfo2 = SERVER_TRANSPORT_INFO_2;
+ PServerTransportInfo2 = PSERVER_TRANSPORT_INFO_2;
+
+ LPSERVER_TRANSPORT_INFO_3 = ^SERVER_TRANSPORT_INFO_3;
+ {$EXTERNALSYM LPSERVER_TRANSPORT_INFO_3}
+ PSERVER_TRANSPORT_INFO_3 = ^SERVER_TRANSPORT_INFO_3;
+ {$EXTERNALSYM PSERVER_TRANSPORT_INFO_3}
+ _SERVER_TRANSPORT_INFO_3 = record
+ svti3_numberofvcs: DWORD;
+ svti3_transportname: LMSTR;
+ svti3_transportaddress: LPBYTE;
+ svti3_transportaddresslength: DWORD;
+ svti3_networkaddress: LMSTR;
+ svti3_domain: LMSTR;
+ svti3_flags: ULONG;
+ svti3_passwordlength: DWORD;
+ svti3_password: array [0..256 - 1] of BYTE;
+ end;
+ {$EXTERNALSYM _SERVER_TRANSPORT_INFO_3}
+ SERVER_TRANSPORT_INFO_3 = _SERVER_TRANSPORT_INFO_3;
+ {$EXTERNALSYM SERVER_TRANSPORT_INFO_3}
+ TServerTransportInfo3 = SERVER_TRANSPORT_INFO_3;
+ PServerTransportInfo3 = PSERVER_TRANSPORT_INFO_3;
+
+//
+// Defines - SERVER
+//
+
+//
+// The platform ID indicates the levels to use for platform-specific
+// information.
+//
+
+const
+ SV_PLATFORM_ID_OS2 = 400;
+ {$EXTERNALSYM SV_PLATFORM_ID_OS2}
+ SV_PLATFORM_ID_NT = 500;
+ {$EXTERNALSYM SV_PLATFORM_ID_NT}
+
+//
+// Mask to be applied to svX_version_major in order to obtain
+// the major version number.
+//
+
+ MAJOR_VERSION_MASK = $0F;
+ {$EXTERNALSYM MAJOR_VERSION_MASK}
+
+//
+// Bit-mapped values for svX_type fields. X = 1, 2 or 3.
+//
+
+ SV_TYPE_WORKSTATION = $00000001;
+ {$EXTERNALSYM SV_TYPE_WORKSTATION}
+ SV_TYPE_SERVER = $00000002;
+ {$EXTERNALSYM SV_TYPE_SERVER}
+ SV_TYPE_SQLSERVER = $00000004;
+ {$EXTERNALSYM SV_TYPE_SQLSERVER}
+ SV_TYPE_DOMAIN_CTRL = $00000008;
+ {$EXTERNALSYM SV_TYPE_DOMAIN_CTRL}
+ SV_TYPE_DOMAIN_BAKCTRL = $00000010;
+ {$EXTERNALSYM SV_TYPE_DOMAIN_BAKCTRL}
+ SV_TYPE_TIME_SOURCE = $00000020;
+ {$EXTERNALSYM SV_TYPE_TIME_SOURCE}
+ SV_TYPE_AFP = $00000040;
+ {$EXTERNALSYM SV_TYPE_AFP}
+ SV_TYPE_NOVELL = $00000080;
+ {$EXTERNALSYM SV_TYPE_NOVELL}
+ SV_TYPE_DOMAIN_MEMBER = $00000100;
+ {$EXTERNALSYM SV_TYPE_DOMAIN_MEMBER}
+ SV_TYPE_PRINTQ_SERVER = $00000200;
+ {$EXTERNALSYM SV_TYPE_PRINTQ_SERVER}
+ SV_TYPE_DIALIN_SERVER = $00000400;
+ {$EXTERNALSYM SV_TYPE_DIALIN_SERVER}
+ SV_TYPE_XENIX_SERVER = $00000800;
+ {$EXTERNALSYM SV_TYPE_XENIX_SERVER}
+ SV_TYPE_SERVER_UNIX = SV_TYPE_XENIX_SERVER;
+ {$EXTERNALSYM SV_TYPE_SERVER_UNIX}
+ SV_TYPE_NT = $00001000;
+ {$EXTERNALSYM SV_TYPE_NT}
+ SV_TYPE_WFW = $00002000;
+ {$EXTERNALSYM SV_TYPE_WFW}
+ SV_TYPE_SERVER_MFPN = $00004000;
+ {$EXTERNALSYM SV_TYPE_SERVER_MFPN}
+ SV_TYPE_SERVER_NT = $00008000;
+ {$EXTERNALSYM SV_TYPE_SERVER_NT}
+ SV_TYPE_POTENTIAL_BROWSER = $00010000;
+ {$EXTERNALSYM SV_TYPE_POTENTIAL_BROWSER}
+ SV_TYPE_BACKUP_BROWSER = $00020000;
+ {$EXTERNALSYM SV_TYPE_BACKUP_BROWSER}
+ SV_TYPE_MASTER_BROWSER = $00040000;
+ {$EXTERNALSYM SV_TYPE_MASTER_BROWSER}
+ SV_TYPE_DOMAIN_MASTER = $00080000;
+ {$EXTERNALSYM SV_TYPE_DOMAIN_MASTER}
+ SV_TYPE_SERVER_OSF = $00100000;
+ {$EXTERNALSYM SV_TYPE_SERVER_OSF}
+ SV_TYPE_SERVER_VMS = $00200000;
+ {$EXTERNALSYM SV_TYPE_SERVER_VMS}
+ SV_TYPE_WINDOWS = $00400000; // Windows95 and above
+ {$EXTERNALSYM SV_TYPE_WINDOWS}
+ SV_TYPE_DFS = $00800000; // Root of a DFS tree
+ {$EXTERNALSYM SV_TYPE_DFS}
+ SV_TYPE_CLUSTER_NT = $01000000; // NT Cluster
+ {$EXTERNALSYM SV_TYPE_CLUSTER_NT}
+ SV_TYPE_TERMINALSERVER = $02000000; // Terminal Server(Hydra)
+ {$EXTERNALSYM SV_TYPE_TERMINALSERVER}
+ SV_TYPE_CLUSTER_VS_NT = $04000000; // NT Cluster Virtual Server Name
+ {$EXTERNALSYM SV_TYPE_CLUSTER_VS_NT}
+ SV_TYPE_DCE = $10000000; // IBM DSS (Directory and Security Services) or equivalent
+ {$EXTERNALSYM SV_TYPE_DCE}
+ SV_TYPE_ALTERNATE_XPORT = $20000000; // return list for alternate transport
+ {$EXTERNALSYM SV_TYPE_ALTERNATE_XPORT}
+ SV_TYPE_LOCAL_LIST_ONLY = $40000000; // Return local list only
+ {$EXTERNALSYM SV_TYPE_LOCAL_LIST_ONLY}
+ SV_TYPE_DOMAIN_ENUM = DWORD($80000000);
+ {$EXTERNALSYM SV_TYPE_DOMAIN_ENUM}
+ SV_TYPE_ALL = DWORD($FFFFFFFF); // handy for NetServerEnum2
+ {$EXTERNALSYM SV_TYPE_ALL}
+
+//
+// Special value for sv102_disc that specifies infinite disconnect
+// time.
+//
+
+ SV_NODISC = DWORD(-1); // No autodisconnect timeout enforced
+ {$EXTERNALSYM SV_NODISC}
+
+//
+// Values of svX_security field. X = 2 or 3.
+//
+
+ SV_USERSECURITY = 1;
+ {$EXTERNALSYM SV_USERSECURITY}
+ SV_SHARESECURITY = 0;
+ {$EXTERNALSYM SV_SHARESECURITY}
+
+//
+// Values of svX_hidden field. X = 2 or 3.
+//
+
+ SV_HIDDEN = 1;
+ {$EXTERNALSYM SV_HIDDEN}
+ SV_VISIBLE = 0;
+ {$EXTERNALSYM SV_VISIBLE}
+
+//
+// Values for ParmError parameter to NetServerSetInfo.
+//
+
+ SV_PLATFORM_ID_PARMNUM = 101;
+ {$EXTERNALSYM SV_PLATFORM_ID_PARMNUM}
+ SV_NAME_PARMNUM = 102;
+ {$EXTERNALSYM SV_NAME_PARMNUM}
+ SV_VERSION_MAJOR_PARMNUM = 103;
+ {$EXTERNALSYM SV_VERSION_MAJOR_PARMNUM}
+ SV_VERSION_MINOR_PARMNUM = 104;
+ {$EXTERNALSYM SV_VERSION_MINOR_PARMNUM}
+ SV_TYPE_PARMNUM = 105;
+ {$EXTERNALSYM SV_TYPE_PARMNUM}
+ SV_COMMENT_PARMNUM = 5;
+ {$EXTERNALSYM SV_COMMENT_PARMNUM}
+ SV_USERS_PARMNUM = 107;
+ {$EXTERNALSYM SV_USERS_PARMNUM}
+ SV_DISC_PARMNUM = 10;
+ {$EXTERNALSYM SV_DISC_PARMNUM}
+ SV_HIDDEN_PARMNUM = 16;
+ {$EXTERNALSYM SV_HIDDEN_PARMNUM}
+ SV_ANNOUNCE_PARMNUM = 17;
+ {$EXTERNALSYM SV_ANNOUNCE_PARMNUM}
+ SV_ANNDELTA_PARMNUM = 18;
+ {$EXTERNALSYM SV_ANNDELTA_PARMNUM}
+ SV_USERPATH_PARMNUM = 112;
+ {$EXTERNALSYM SV_USERPATH_PARMNUM}
+
+ SV_ULIST_MTIME_PARMNUM = 401;
+ {$EXTERNALSYM SV_ULIST_MTIME_PARMNUM}
+ SV_GLIST_MTIME_PARMNUM = 402;
+ {$EXTERNALSYM SV_GLIST_MTIME_PARMNUM}
+ SV_ALIST_MTIME_PARMNUM = 403;
+ {$EXTERNALSYM SV_ALIST_MTIME_PARMNUM}
+ SV_ALERTS_PARMNUM = 11;
+ {$EXTERNALSYM SV_ALERTS_PARMNUM}
+ SV_SECURITY_PARMNUM = 405;
+ {$EXTERNALSYM SV_SECURITY_PARMNUM}
+ SV_NUMADMIN_PARMNUM = 406;
+ {$EXTERNALSYM SV_NUMADMIN_PARMNUM}
+ SV_LANMASK_PARMNUM = 407;
+ {$EXTERNALSYM SV_LANMASK_PARMNUM}
+ SV_GUESTACC_PARMNUM = 408;
+ {$EXTERNALSYM SV_GUESTACC_PARMNUM}
+ SV_CHDEVQ_PARMNUM = 410;
+ {$EXTERNALSYM SV_CHDEVQ_PARMNUM}
+ SV_CHDEVJOBS_PARMNUM = 411;
+ {$EXTERNALSYM SV_CHDEVJOBS_PARMNUM}
+ SV_CONNECTIONS_PARMNUM = 412;
+ {$EXTERNALSYM SV_CONNECTIONS_PARMNUM}
+ SV_SHARES_PARMNUM = 413;
+ {$EXTERNALSYM SV_SHARES_PARMNUM}
+ SV_OPENFILES_PARMNUM = 414;
+ {$EXTERNALSYM SV_OPENFILES_PARMNUM}
+ SV_SESSREQS_PARMNUM = 417;
+ {$EXTERNALSYM SV_SESSREQS_PARMNUM}
+ SV_ACTIVELOCKS_PARMNUM = 419;
+ {$EXTERNALSYM SV_ACTIVELOCKS_PARMNUM}
+ SV_NUMREQBUF_PARMNUM = 420;
+ {$EXTERNALSYM SV_NUMREQBUF_PARMNUM}
+ SV_NUMBIGBUF_PARMNUM = 422;
+ {$EXTERNALSYM SV_NUMBIGBUF_PARMNUM}
+ SV_NUMFILETASKS_PARMNUM = 423;
+ {$EXTERNALSYM SV_NUMFILETASKS_PARMNUM}
+ SV_ALERTSCHED_PARMNUM = 37;
+ {$EXTERNALSYM SV_ALERTSCHED_PARMNUM}
+ SV_ERRORALERT_PARMNUM = 38;
+ {$EXTERNALSYM SV_ERRORALERT_PARMNUM}
+ SV_LOGONALERT_PARMNUM = 39;
+ {$EXTERNALSYM SV_LOGONALERT_PARMNUM}
+ SV_ACCESSALERT_PARMNUM = 40;
+ {$EXTERNALSYM SV_ACCESSALERT_PARMNUM}
+ SV_DISKALERT_PARMNUM = 41;
+ {$EXTERNALSYM SV_DISKALERT_PARMNUM}
+ SV_NETIOALERT_PARMNUM = 42;
+ {$EXTERNALSYM SV_NETIOALERT_PARMNUM}
+ SV_MAXAUDITSZ_PARMNUM = 43;
+ {$EXTERNALSYM SV_MAXAUDITSZ_PARMNUM}
+ SV_SRVHEURISTICS_PARMNUM = 431;
+ {$EXTERNALSYM SV_SRVHEURISTICS_PARMNUM}
+
+ SV_SESSOPENS_PARMNUM = 501;
+ {$EXTERNALSYM SV_SESSOPENS_PARMNUM}
+ SV_SESSVCS_PARMNUM = 502;
+ {$EXTERNALSYM SV_SESSVCS_PARMNUM}
+ SV_OPENSEARCH_PARMNUM = 503;
+ {$EXTERNALSYM SV_OPENSEARCH_PARMNUM}
+ SV_SIZREQBUF_PARMNUM = 504;
+ {$EXTERNALSYM SV_SIZREQBUF_PARMNUM}
+ SV_INITWORKITEMS_PARMNUM = 505;
+ {$EXTERNALSYM SV_INITWORKITEMS_PARMNUM}
+ SV_MAXWORKITEMS_PARMNUM = 506;
+ {$EXTERNALSYM SV_MAXWORKITEMS_PARMNUM}
+ SV_RAWWORKITEMS_PARMNUM = 507;
+ {$EXTERNALSYM SV_RAWWORKITEMS_PARMNUM}
+ SV_IRPSTACKSIZE_PARMNUM = 508;
+ {$EXTERNALSYM SV_IRPSTACKSIZE_PARMNUM}
+ SV_MAXRAWBUFLEN_PARMNUM = 509;
+ {$EXTERNALSYM SV_MAXRAWBUFLEN_PARMNUM}
+ SV_SESSUSERS_PARMNUM = 510;
+ {$EXTERNALSYM SV_SESSUSERS_PARMNUM}
+ SV_SESSCONNS_PARMNUM = 511;
+ {$EXTERNALSYM SV_SESSCONNS_PARMNUM}
+ SV_MAXNONPAGEDMEMORYUSAGE_PARMNUM = 512;
+ {$EXTERNALSYM SV_MAXNONPAGEDMEMORYUSAGE_PARMNUM}
+ SV_MAXPAGEDMEMORYUSAGE_PARMNUM = 513;
+ {$EXTERNALSYM SV_MAXPAGEDMEMORYUSAGE_PARMNUM}
+ SV_ENABLESOFTCOMPAT_PARMNUM = 514;
+ {$EXTERNALSYM SV_ENABLESOFTCOMPAT_PARMNUM}
+ SV_ENABLEFORCEDLOGOFF_PARMNUM = 515;
+ {$EXTERNALSYM SV_ENABLEFORCEDLOGOFF_PARMNUM}
+ SV_TIMESOURCE_PARMNUM = 516;
+ {$EXTERNALSYM SV_TIMESOURCE_PARMNUM}
+ SV_ACCEPTDOWNLEVELAPIS_PARMNUM = 517;
+ {$EXTERNALSYM SV_ACCEPTDOWNLEVELAPIS_PARMNUM}
+ SV_LMANNOUNCE_PARMNUM = 518;
+ {$EXTERNALSYM SV_LMANNOUNCE_PARMNUM}
+ SV_DOMAIN_PARMNUM = 519;
+ {$EXTERNALSYM SV_DOMAIN_PARMNUM}
+ SV_MAXCOPYREADLEN_PARMNUM = 520;
+ {$EXTERNALSYM SV_MAXCOPYREADLEN_PARMNUM}
+ SV_MAXCOPYWRITELEN_PARMNUM = 521;
+ {$EXTERNALSYM SV_MAXCOPYWRITELEN_PARMNUM}
+ SV_MINKEEPSEARCH_PARMNUM = 522;
+ {$EXTERNALSYM SV_MINKEEPSEARCH_PARMNUM}
+ SV_MAXKEEPSEARCH_PARMNUM = 523;
+ {$EXTERNALSYM SV_MAXKEEPSEARCH_PARMNUM}
+ SV_MINKEEPCOMPLSEARCH_PARMNUM = 524;
+ {$EXTERNALSYM SV_MINKEEPCOMPLSEARCH_PARMNUM}
+ SV_MAXKEEPCOMPLSEARCH_PARMNUM = 525;
+ {$EXTERNALSYM SV_MAXKEEPCOMPLSEARCH_PARMNUM}
+ SV_THREADCOUNTADD_PARMNUM = 526;
+ {$EXTERNALSYM SV_THREADCOUNTADD_PARMNUM}
+ SV_NUMBLOCKTHREADS_PARMNUM = 527;
+ {$EXTERNALSYM SV_NUMBLOCKTHREADS_PARMNUM}
+ SV_SCAVTIMEOUT_PARMNUM = 528;
+ {$EXTERNALSYM SV_SCAVTIMEOUT_PARMNUM}
+ SV_MINRCVQUEUE_PARMNUM = 529;
+ {$EXTERNALSYM SV_MINRCVQUEUE_PARMNUM}
+ SV_MINFREEWORKITEMS_PARMNUM = 530;
+ {$EXTERNALSYM SV_MINFREEWORKITEMS_PARMNUM}
+ SV_XACTMEMSIZE_PARMNUM = 531;
+ {$EXTERNALSYM SV_XACTMEMSIZE_PARMNUM}
+ SV_THREADPRIORITY_PARMNUM = 532;
+ {$EXTERNALSYM SV_THREADPRIORITY_PARMNUM}
+ SV_MAXMPXCT_PARMNUM = 533;
+ {$EXTERNALSYM SV_MAXMPXCT_PARMNUM}
+ SV_OPLOCKBREAKWAIT_PARMNUM = 534;
+ {$EXTERNALSYM SV_OPLOCKBREAKWAIT_PARMNUM}
+ SV_OPLOCKBREAKRESPONSEWAIT_PARMNUM = 535;
+ {$EXTERNALSYM SV_OPLOCKBREAKRESPONSEWAIT_PARMNUM}
+ SV_ENABLEOPLOCKS_PARMNUM = 536;
+ {$EXTERNALSYM SV_ENABLEOPLOCKS_PARMNUM}
+ SV_ENABLEOPLOCKFORCECLOSE_PARMNUM = 537;
+ {$EXTERNALSYM SV_ENABLEOPLOCKFORCECLOSE_PARMNUM}
+ SV_ENABLEFCBOPENS_PARMNUM = 538;
+ {$EXTERNALSYM SV_ENABLEFCBOPENS_PARMNUM}
+ SV_ENABLERAW_PARMNUM = 539;
+ {$EXTERNALSYM SV_ENABLERAW_PARMNUM}
+ SV_ENABLESHAREDNETDRIVES_PARMNUM = 540;
+ {$EXTERNALSYM SV_ENABLESHAREDNETDRIVES_PARMNUM}
+ SV_MINFREECONNECTIONS_PARMNUM = 541;
+ {$EXTERNALSYM SV_MINFREECONNECTIONS_PARMNUM}
+ SV_MAXFREECONNECTIONS_PARMNUM = 542;
+ {$EXTERNALSYM SV_MAXFREECONNECTIONS_PARMNUM}
+ SV_INITSESSTABLE_PARMNUM = 543;
+ {$EXTERNALSYM SV_INITSESSTABLE_PARMNUM}
+ SV_INITCONNTABLE_PARMNUM = 544;
+ {$EXTERNALSYM SV_INITCONNTABLE_PARMNUM}
+ SV_INITFILETABLE_PARMNUM = 545;
+ {$EXTERNALSYM SV_INITFILETABLE_PARMNUM}
+ SV_INITSEARCHTABLE_PARMNUM = 546;
+ {$EXTERNALSYM SV_INITSEARCHTABLE_PARMNUM}
+ SV_ALERTSCHEDULE_PARMNUM = 547;
+ {$EXTERNALSYM SV_ALERTSCHEDULE_PARMNUM}
+ SV_ERRORTHRESHOLD_PARMNUM = 548;
+ {$EXTERNALSYM SV_ERRORTHRESHOLD_PARMNUM}
+ SV_NETWORKERRORTHRESHOLD_PARMNUM = 549;
+ {$EXTERNALSYM SV_NETWORKERRORTHRESHOLD_PARMNUM}
+ SV_DISKSPACETHRESHOLD_PARMNUM = 550;
+ {$EXTERNALSYM SV_DISKSPACETHRESHOLD_PARMNUM}
+ SV_MAXLINKDELAY_PARMNUM = 552;
+ {$EXTERNALSYM SV_MAXLINKDELAY_PARMNUM}
+ SV_MINLINKTHROUGHPUT_PARMNUM = 553;
+ {$EXTERNALSYM SV_MINLINKTHROUGHPUT_PARMNUM}
+ SV_LINKINFOVALIDTIME_PARMNUM = 554;
+ {$EXTERNALSYM SV_LINKINFOVALIDTIME_PARMNUM}
+ SV_SCAVQOSINFOUPDATETIME_PARMNUM = 555;
+ {$EXTERNALSYM SV_SCAVQOSINFOUPDATETIME_PARMNUM}
+ SV_MAXWORKITEMIDLETIME_PARMNUM = 556;
+ {$EXTERNALSYM SV_MAXWORKITEMIDLETIME_PARMNUM}
+ SV_MAXRAWWORKITEMS_PARMNUM = 557;
+ {$EXTERNALSYM SV_MAXRAWWORKITEMS_PARMNUM}
+ SV_PRODUCTTYPE_PARMNUM = 560;
+ {$EXTERNALSYM SV_PRODUCTTYPE_PARMNUM}
+ SV_SERVERSIZE_PARMNUM = 561;
+ {$EXTERNALSYM SV_SERVERSIZE_PARMNUM}
+ SV_CONNECTIONLESSAUTODISC_PARMNUM = 562;
+ {$EXTERNALSYM SV_CONNECTIONLESSAUTODISC_PARMNUM}
+ SV_SHARINGVIOLATIONRETRIES_PARMNUM = 563;
+ {$EXTERNALSYM SV_SHARINGVIOLATIONRETRIES_PARMNUM}
+ SV_SHARINGVIOLATIONDELAY_PARMNUM = 564;
+ {$EXTERNALSYM SV_SHARINGVIOLATIONDELAY_PARMNUM}
+ SV_MAXGLOBALOPENSEARCH_PARMNUM = 565;
+ {$EXTERNALSYM SV_MAXGLOBALOPENSEARCH_PARMNUM}
+ SV_REMOVEDUPLICATESEARCHES_PARMNUM = 566;
+ {$EXTERNALSYM SV_REMOVEDUPLICATESEARCHES_PARMNUM}
+ SV_LOCKVIOLATIONRETRIES_PARMNUM = 567;
+ {$EXTERNALSYM SV_LOCKVIOLATIONRETRIES_PARMNUM}
+ SV_LOCKVIOLATIONOFFSET_PARMNUM = 568;
+ {$EXTERNALSYM SV_LOCKVIOLATIONOFFSET_PARMNUM}
+ SV_LOCKVIOLATIONDELAY_PARMNUM = 569;
+ {$EXTERNALSYM SV_LOCKVIOLATIONDELAY_PARMNUM}
+ SV_MDLREADSWITCHOVER_PARMNUM = 570;
+ {$EXTERNALSYM SV_MDLREADSWITCHOVER_PARMNUM}
+ SV_CACHEDOPENLIMIT_PARMNUM = 571;
+ {$EXTERNALSYM SV_CACHEDOPENLIMIT_PARMNUM}
+ SV_CRITICALTHREADS_PARMNUM = 572;
+ {$EXTERNALSYM SV_CRITICALTHREADS_PARMNUM}
+ SV_RESTRICTNULLSESSACCESS_PARMNUM = 573;
+ {$EXTERNALSYM SV_RESTRICTNULLSESSACCESS_PARMNUM}
+ SV_ENABLEWFW311DIRECTIPX_PARMNUM = 574;
+ {$EXTERNALSYM SV_ENABLEWFW311DIRECTIPX_PARMNUM}
+ SV_OTHERQUEUEAFFINITY_PARMNUM = 575;
+ {$EXTERNALSYM SV_OTHERQUEUEAFFINITY_PARMNUM}
+ SV_QUEUESAMPLESECS_PARMNUM = 576;
+ {$EXTERNALSYM SV_QUEUESAMPLESECS_PARMNUM}
+ SV_BALANCECOUNT_PARMNUM = 577;
+ {$EXTERNALSYM SV_BALANCECOUNT_PARMNUM}
+ SV_PREFERREDAFFINITY_PARMNUM = 578;
+ {$EXTERNALSYM SV_PREFERREDAFFINITY_PARMNUM}
+ SV_MAXFREERFCBS_PARMNUM = 579;
+ {$EXTERNALSYM SV_MAXFREERFCBS_PARMNUM}
+ SV_MAXFREEMFCBS_PARMNUM = 580;
+ {$EXTERNALSYM SV_MAXFREEMFCBS_PARMNUM}
+ SV_MAXFREELFCBS_PARMNUM = 581;
+ {$EXTERNALSYM SV_MAXFREELFCBS_PARMNUM}
+ SV_MAXFREEPAGEDPOOLCHUNKS_PARMNUM = 582;
+ {$EXTERNALSYM SV_MAXFREEPAGEDPOOLCHUNKS_PARMNUM}
+ SV_MINPAGEDPOOLCHUNKSIZE_PARMNUM = 583;
+ {$EXTERNALSYM SV_MINPAGEDPOOLCHUNKSIZE_PARMNUM}
+ SV_MAXPAGEDPOOLCHUNKSIZE_PARMNUM = 584;
+ {$EXTERNALSYM SV_MAXPAGEDPOOLCHUNKSIZE_PARMNUM}
+ SV_SENDSFROMPREFERREDPROCESSOR_PARMNUM = 585;
+ {$EXTERNALSYM SV_SENDSFROMPREFERREDPROCESSOR_PARMNUM}
+ SV_MAXTHREADSPERQUEUE_PARMNUM = 586;
+ {$EXTERNALSYM SV_MAXTHREADSPERQUEUE_PARMNUM}
+ SV_CACHEDDIRECTORYLIMIT_PARMNUM = 587;
+ {$EXTERNALSYM SV_CACHEDDIRECTORYLIMIT_PARMNUM}
+ SV_MAXCOPYLENGTH_PARMNUM = 588;
+ {$EXTERNALSYM SV_MAXCOPYLENGTH_PARMNUM}
+ SV_ENABLECOMPRESSION_PARMNUM = 590;
+ {$EXTERNALSYM SV_ENABLECOMPRESSION_PARMNUM}
+ SV_AUTOSHAREWKS_PARMNUM = 591;
+ {$EXTERNALSYM SV_AUTOSHAREWKS_PARMNUM}
+ SV_AUTOSHARESERVER_PARMNUM = 592;
+ {$EXTERNALSYM SV_AUTOSHARESERVER_PARMNUM}
+ SV_ENABLESECURITYSIGNATURE_PARMNUM = 593;
+ {$EXTERNALSYM SV_ENABLESECURITYSIGNATURE_PARMNUM}
+ SV_REQUIRESECURITYSIGNATURE_PARMNUM = 594;
+ {$EXTERNALSYM SV_REQUIRESECURITYSIGNATURE_PARMNUM}
+ SV_MINCLIENTBUFFERSIZE_PARMNUM = 595;
+ {$EXTERNALSYM SV_MINCLIENTBUFFERSIZE_PARMNUM}
+ SV_CONNECTIONNOSESSIONSTIMEOUT_PARMNUM = 596;
+ {$EXTERNALSYM SV_CONNECTIONNOSESSIONSTIMEOUT_PARMNUM}
+ SV_IDLETHREADTIMEOUT_PARMNUM = 597;
+ {$EXTERNALSYM SV_IDLETHREADTIMEOUT_PARMNUM}
+ SV_ENABLEW9XSECURITYSIGNATURE_PARMNUM = 598;
+ {$EXTERNALSYM SV_ENABLEW9XSECURITYSIGNATURE_PARMNUM}
+ SV_ENFORCEKERBEROSREAUTHENTICATION_PARMNUM = 599;
+ {$EXTERNALSYM SV_ENFORCEKERBEROSREAUTHENTICATION_PARMNUM}
+ SV_DISABLEDOS_PARMNUM = 600;
+ {$EXTERNALSYM SV_DISABLEDOS_PARMNUM}
+ SV_LOWDISKSPACEMINIMUM_PARMNUM = 601;
+ {$EXTERNALSYM SV_LOWDISKSPACEMINIMUM_PARMNUM}
+ SV_DISABLESTRICTNAMECHECKING_PARMNUM = 602;
+ {$EXTERNALSYM SV_DISABLESTRICTNAMECHECKING_PARMNUM}
+
+//
+// Single-field infolevels for NetServerSetInfo.
+//
+
+ SV_COMMENT_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_COMMENT_PARMNUM;
+ {$EXTERNALSYM SV_COMMENT_INFOLEVEL}
+ SV_USERS_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_USERS_PARMNUM;
+ {$EXTERNALSYM SV_USERS_INFOLEVEL}
+ SV_DISC_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_DISC_PARMNUM;
+ {$EXTERNALSYM SV_DISC_INFOLEVEL}
+ SV_HIDDEN_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_HIDDEN_PARMNUM;
+ {$EXTERNALSYM SV_HIDDEN_INFOLEVEL}
+ SV_ANNOUNCE_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_ANNOUNCE_PARMNUM;
+ {$EXTERNALSYM SV_ANNOUNCE_INFOLEVEL}
+ SV_ANNDELTA_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_ANNDELTA_PARMNUM;
+ {$EXTERNALSYM SV_ANNDELTA_INFOLEVEL}
+ SV_SESSOPENS_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_SESSOPENS_PARMNUM;
+ {$EXTERNALSYM SV_SESSOPENS_INFOLEVEL}
+ SV_SESSVCS_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_SESSVCS_PARMNUM;
+ {$EXTERNALSYM SV_SESSVCS_INFOLEVEL}
+ SV_OPENSEARCH_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_OPENSEARCH_PARMNUM;
+ {$EXTERNALSYM SV_OPENSEARCH_INFOLEVEL}
+ SV_MAXWORKITEMS_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_MAXWORKITEMS_PARMNUM;
+ {$EXTERNALSYM SV_MAXWORKITEMS_INFOLEVEL}
+ SV_MAXRAWBUFLEN_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_MAXRAWBUFLEN_PARMNUM;
+ {$EXTERNALSYM SV_MAXRAWBUFLEN_INFOLEVEL}
+ SV_SESSUSERS_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_SESSUSERS_PARMNUM;
+ {$EXTERNALSYM SV_SESSUSERS_INFOLEVEL}
+ SV_SESSCONNS_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_SESSCONNS_PARMNUM;
+ {$EXTERNALSYM SV_SESSCONNS_INFOLEVEL}
+ SV_MAXNONPAGEDMEMORYUSAGE_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_MAXNONPAGEDMEMORYUSAGE_PARMNUM;
+ {$EXTERNALSYM SV_MAXNONPAGEDMEMORYUSAGE_INFOLEVEL}
+ SV_MAXPAGEDMEMORYUSAGE_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_MAXPAGEDMEMORYUSAGE_PARMNUM;
+ {$EXTERNALSYM SV_MAXPAGEDMEMORYUSAGE_INFOLEVEL}
+ SV_ENABLESOFTCOMPAT_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_ENABLESOFTCOMPAT_PARMNUM;
+ {$EXTERNALSYM SV_ENABLESOFTCOMPAT_INFOLEVEL}
+ SV_ENABLEFORCEDLOGOFF_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_ENABLEFORCEDLOGOFF_PARMNUM;
+ {$EXTERNALSYM SV_ENABLEFORCEDLOGOFF_INFOLEVEL}
+ SV_TIMESOURCE_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_TIMESOURCE_PARMNUM;
+ {$EXTERNALSYM SV_TIMESOURCE_INFOLEVEL}
+ SV_LMANNOUNCE_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_LMANNOUNCE_PARMNUM;
+ {$EXTERNALSYM SV_LMANNOUNCE_INFOLEVEL}
+ SV_MAXCOPYREADLEN_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_MAXCOPYREADLEN_PARMNUM;
+ {$EXTERNALSYM SV_MAXCOPYREADLEN_INFOLEVEL}
+ SV_MAXCOPYWRITELEN_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_MAXCOPYWRITELEN_PARMNUM;
+ {$EXTERNALSYM SV_MAXCOPYWRITELEN_INFOLEVEL}
+ SV_MINKEEPSEARCH_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_MINKEEPSEARCH_PARMNUM;
+ {$EXTERNALSYM SV_MINKEEPSEARCH_INFOLEVEL}
+ SV_MAXKEEPSEARCH_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_MAXKEEPSEARCH_PARMNUM;
+ {$EXTERNALSYM SV_MAXKEEPSEARCH_INFOLEVEL}
+ SV_MINKEEPCOMPLSEARCH_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_MINKEEPCOMPLSEARCH_PARMNUM;
+ {$EXTERNALSYM SV_MINKEEPCOMPLSEARCH_INFOLEVEL}
+ SV_MAXKEEPCOMPLSEARCH_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_MAXKEEPCOMPLSEARCH_PARMNUM;
+ {$EXTERNALSYM SV_MAXKEEPCOMPLSEARCH_INFOLEVEL}
+ SV_SCAVTIMEOUT_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_SCAVTIMEOUT_PARMNUM;
+ {$EXTERNALSYM SV_SCAVTIMEOUT_INFOLEVEL}
+ SV_MINRCVQUEUE_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_MINRCVQUEUE_PARMNUM;
+ {$EXTERNALSYM SV_MINRCVQUEUE_INFOLEVEL}
+ SV_MINFREEWORKITEMS_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_MINFREEWORKITEMS_PARMNUM;
+ {$EXTERNALSYM SV_MINFREEWORKITEMS_INFOLEVEL}
+ SV_MAXMPXCT_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_MAXMPXCT_PARMNUM;
+ {$EXTERNALSYM SV_MAXMPXCT_INFOLEVEL}
+ SV_OPLOCKBREAKWAIT_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_OPLOCKBREAKWAIT_PARMNUM;
+ {$EXTERNALSYM SV_OPLOCKBREAKWAIT_INFOLEVEL}
+ SV_OPLOCKBREAKRESPONSEWAIT_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_OPLOCKBREAKRESPONSEWAIT_PARMNUM;
+ {$EXTERNALSYM SV_OPLOCKBREAKRESPONSEWAIT_INFOLEVEL}
+ SV_ENABLEOPLOCKS_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_ENABLEOPLOCKS_PARMNUM;
+ {$EXTERNALSYM SV_ENABLEOPLOCKS_INFOLEVEL}
+ SV_ENABLEOPLOCKFORCECLOSE_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_ENABLEOPLOCKFORCECLOSE_PARMNUM;
+ {$EXTERNALSYM SV_ENABLEOPLOCKFORCECLOSE_INFOLEVEL}
+ SV_ENABLEFCBOPENS_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_ENABLEFCBOPENS_PARMNUM;
+ {$EXTERNALSYM SV_ENABLEFCBOPENS_INFOLEVEL}
+ SV_ENABLERAW_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_ENABLERAW_PARMNUM;
+ {$EXTERNALSYM SV_ENABLERAW_INFOLEVEL}
+ SV_ENABLESHAREDNETDRIVES_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_ENABLESHAREDNETDRIVES_PARMNUM;
+ {$EXTERNALSYM SV_ENABLESHAREDNETDRIVES_INFOLEVEL}
+ SV_MINFREECONNECTIONS_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_MINFREECONNECTIONS_PARMNUM;
+ {$EXTERNALSYM SV_MINFREECONNECTIONS_INFOLEVEL}
+ SV_MAXFREECONNECTIONS_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_MAXFREECONNECTIONS_PARMNUM;
+ {$EXTERNALSYM SV_MAXFREECONNECTIONS_INFOLEVEL}
+ SV_INITSESSTABLE_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_INITSESSTABLE_PARMNUM;
+ {$EXTERNALSYM SV_INITSESSTABLE_INFOLEVEL}
+ SV_INITCONNTABLE_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_INITCONNTABLE_PARMNUM;
+ {$EXTERNALSYM SV_INITCONNTABLE_INFOLEVEL}
+ SV_INITFILETABLE_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_INITFILETABLE_PARMNUM;
+ {$EXTERNALSYM SV_INITFILETABLE_INFOLEVEL}
+ SV_INITSEARCHTABLE_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_INITSEARCHTABLE_PARMNUM;
+ {$EXTERNALSYM SV_INITSEARCHTABLE_INFOLEVEL}
+ SV_ALERTSCHEDULE_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_ALERTSCHEDULE_PARMNUM;
+ {$EXTERNALSYM SV_ALERTSCHEDULE_INFOLEVEL}
+ SV_ERRORTHRESHOLD_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_ERRORTHRESHOLD_PARMNUM;
+ {$EXTERNALSYM SV_ERRORTHRESHOLD_INFOLEVEL}
+ SV_NETWORKERRORTHRESHOLD_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_NETWORKERRORTHRESHOLD_PARMNUM;
+ {$EXTERNALSYM SV_NETWORKERRORTHRESHOLD_INFOLEVEL}
+ SV_DISKSPACETHRESHOLD_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_DISKSPACETHRESHOLD_PARMNUM;
+ {$EXTERNALSYM SV_DISKSPACETHRESHOLD_INFOLEVEL}
+ SV_MAXLINKDELAY_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_MAXLINKDELAY_PARMNUM;
+ {$EXTERNALSYM SV_MAXLINKDELAY_INFOLEVEL}
+ SV_MINLINKTHROUGHPUT_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_MINLINKTHROUGHPUT_PARMNUM;
+ {$EXTERNALSYM SV_MINLINKTHROUGHPUT_INFOLEVEL}
+ SV_LINKINFOVALIDTIME_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_LINKINFOVALIDTIME_PARMNUM;
+ {$EXTERNALSYM SV_LINKINFOVALIDTIME_INFOLEVEL}
+ SV_SCAVQOSINFOUPDATETIME_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_SCAVQOSINFOUPDATETIME_PARMNUM;
+ {$EXTERNALSYM SV_SCAVQOSINFOUPDATETIME_INFOLEVEL}
+ SV_MAXWORKITEMIDLETIME_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_MAXWORKITEMIDLETIME_PARMNUM;
+ {$EXTERNALSYM SV_MAXWORKITEMIDLETIME_INFOLEVEL}
+ SV_MAXRAWWORKITEMS_INFOLOEVEL = PARMNUM_BASE_INFOLEVEL + SV_MAXRAWWORKITEMS_PARMNUM;
+ {$EXTERNALSYM SV_MAXRAWWORKITEMS_INFOLOEVEL}
+ SV_PRODUCTTYPE_INFOLOEVEL = PARMNUM_BASE_INFOLEVEL + SV_PRODUCTTYPE_PARMNUM;
+ {$EXTERNALSYM SV_PRODUCTTYPE_INFOLOEVEL}
+ SV_SERVERSIZE_INFOLOEVEL = PARMNUM_BASE_INFOLEVEL + SV_SERVERSIZE_PARMNUM;
+ {$EXTERNALSYM SV_SERVERSIZE_INFOLOEVEL}
+ SV_CONNECTIONLESSAUTODISC_INFOLOEVEL = PARMNUM_BASE_INFOLEVEL + SV_CONNECTIONLESSAUTODISC_PARMNUM;
+ {$EXTERNALSYM SV_CONNECTIONLESSAUTODISC_INFOLOEVEL}
+ SV_SHARINGVIOLATIONRETRIES_INFOLOEVEL = PARMNUM_BASE_INFOLEVEL + SV_SHARINGVIOLATIONRETRIES_PARMNUM;
+ {$EXTERNALSYM SV_SHARINGVIOLATIONRETRIES_INFOLOEVEL}
+ SV_SHARINGVIOLATIONDELAY_INFOLOEVEL = PARMNUM_BASE_INFOLEVEL + SV_SHARINGVIOLATIONDELAY_PARMNUM;
+ {$EXTERNALSYM SV_SHARINGVIOLATIONDELAY_INFOLOEVEL}
+ SV_MAXGLOBALOPENSEARCH_INFOLOEVEL = PARMNUM_BASE_INFOLEVEL + SV_MAXGLOBALOPENSEARCH_PARMNUM;
+ {$EXTERNALSYM SV_MAXGLOBALOPENSEARCH_INFOLOEVEL}
+ SV_REMOVEDUPLICATESEARCHES_INFOLOEVEL = PARMNUM_BASE_INFOLEVEL + SV_REMOVEDUPLICATESEARCHES_PARMNUM;
+ {$EXTERNALSYM SV_REMOVEDUPLICATESEARCHES_INFOLOEVEL}
+ SV_LOCKVIOLATIONRETRIES_INFOLOEVEL = PARMNUM_BASE_INFOLEVEL + SV_LOCKVIOLATIONRETRIES_PARMNUM;
+ {$EXTERNALSYM SV_LOCKVIOLATIONRETRIES_INFOLOEVEL}
+ SV_LOCKVIOLATIONOFFSET_INFOLOEVEL = PARMNUM_BASE_INFOLEVEL + SV_LOCKVIOLATIONOFFSET_PARMNUM;
+ {$EXTERNALSYM SV_LOCKVIOLATIONOFFSET_INFOLOEVEL}
+ SV_LOCKVIOLATIONDELAY_INFOLOEVEL = PARMNUM_BASE_INFOLEVEL + SV_LOCKVIOLATIONDELAY_PARMNUM;
+ {$EXTERNALSYM SV_LOCKVIOLATIONDELAY_INFOLOEVEL}
+ SV_MDLREADSWITCHOVER_INFOLOEVEL = PARMNUM_BASE_INFOLEVEL + SV_MDLREADSWITCHOVER_PARMNUM;
+ {$EXTERNALSYM SV_MDLREADSWITCHOVER_INFOLOEVEL}
+ SV_CACHEDOPENLIMIT_INFOLOEVEL = PARMNUM_BASE_INFOLEVEL + SV_CACHEDOPENLIMIT_PARMNUM;
+ {$EXTERNALSYM SV_CACHEDOPENLIMIT_INFOLOEVEL}
+ SV_CRITICALTHREADS_INFOLOEVEL = PARMNUM_BASE_INFOLEVEL + SV_CRITICALTHREADS_PARMNUM;
+ {$EXTERNALSYM SV_CRITICALTHREADS_INFOLOEVEL}
+ SV_RESTRICTNULLSESSACCESS_INFOLOEVEL = PARMNUM_BASE_INFOLEVEL + SV_RESTRICTNULLSESSACCESS_PARMNUM;
+ {$EXTERNALSYM SV_RESTRICTNULLSESSACCESS_INFOLOEVEL}
+ SV_ENABLEWFW311DIRECTIPX_INFOLOEVEL = PARMNUM_BASE_INFOLEVEL + SV_ENABLEWFW311DIRECTIPX_PARMNUM;
+ {$EXTERNALSYM SV_ENABLEWFW311DIRECTIPX_INFOLOEVEL}
+ SV_OTHERQUEUEAFFINITY_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_OTHERQUEUEAFFINITY_PARMNUM;
+ {$EXTERNALSYM SV_OTHERQUEUEAFFINITY_INFOLEVEL}
+ SV_QUEUESAMPLESECS_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_QUEUESAMPLESECS_PARMNUM;
+ {$EXTERNALSYM SV_QUEUESAMPLESECS_INFOLEVEL}
+ SV_BALANCECOUNT_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_BALANCECOUNT_PARMNUM;
+ {$EXTERNALSYM SV_BALANCECOUNT_INFOLEVEL}
+ SV_PREFERREDAFFINITY_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_PREFERREDAFFINITY_PARMNUM;
+ {$EXTERNALSYM SV_PREFERREDAFFINITY_INFOLEVEL}
+ SV_MAXFREERFCBS_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_MAXFREERFCBS_PARMNUM;
+ {$EXTERNALSYM SV_MAXFREERFCBS_INFOLEVEL}
+ SV_MAXFREEMFCBS_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_MAXFREEMFCBS_PARMNUM;
+ {$EXTERNALSYM SV_MAXFREEMFCBS_INFOLEVEL}
+ SV_MAXFREELFCBS_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_MAXFREELFCBS_PARMNUM;
+ {$EXTERNALSYM SV_MAXFREELFCBS_INFOLEVEL}
+ SV_MAXFREEPAGEDPOOLCHUNKS_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_MAXFREEPAGEDPOOLCHUNKS_PARMNUM;
+ {$EXTERNALSYM SV_MAXFREEPAGEDPOOLCHUNKS_INFOLEVEL}
+ SV_MINPAGEDPOOLCHUNKSIZE_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_MINPAGEDPOOLCHUNKSIZE_PARMNUM;
+ {$EXTERNALSYM SV_MINPAGEDPOOLCHUNKSIZE_INFOLEVEL}
+ SV_MAXPAGEDPOOLCHUNKSIZE_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_MAXPAGEDPOOLCHUNKSIZE_PARMNUM;
+ {$EXTERNALSYM SV_MAXPAGEDPOOLCHUNKSIZE_INFOLEVEL}
+ SV_SENDSFROMPREFERREDPROCESSOR_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_SENDSFROMPREFERREDPROCESSOR_PARMNUM;
+ {$EXTERNALSYM SV_SENDSFROMPREFERREDPROCESSOR_INFOLEVEL}
+ SV_MAXTHREADSPERQUEUE_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_MAXTHREADSPERQUEUE_PARMNUM;
+ {$EXTERNALSYM SV_MAXTHREADSPERQUEUE_INFOLEVEL}
+ SV_CACHEDDIRECTORYLIMIT_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_CACHEDDIRECTORYLIMIT_PARMNUM;
+ {$EXTERNALSYM SV_CACHEDDIRECTORYLIMIT_INFOLEVEL}
+ SV_MAXCOPYLENGTH_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_MAXCOPYLENGTH_PARMNUM;
+ {$EXTERNALSYM SV_MAXCOPYLENGTH_INFOLEVEL}
+ SV_ENABLECOMPRESSION_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_ENABLECOMPRESSION_PARMNUM;
+ {$EXTERNALSYM SV_ENABLECOMPRESSION_INFOLEVEL}
+ SV_AUTOSHAREWKS_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_AUTOSHAREWKS_PARMNUM;
+ {$EXTERNALSYM SV_AUTOSHAREWKS_INFOLEVEL}
+ SV_AUTOSHARESERVER_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_AUTOSHARESERVER_PARMNUM;
+ {$EXTERNALSYM SV_AUTOSHARESERVER_INFOLEVEL}
+ SV_ENABLESECURITYSIGNATURE_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_ENABLESECURITYSIGNATURE_PARMNUM;
+ {$EXTERNALSYM SV_ENABLESECURITYSIGNATURE_INFOLEVEL}
+ SV_REQUIRESECURITYSIGNATURE_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_REQUIRESECURITYSIGNATURE_PARMNUM;
+ {$EXTERNALSYM SV_REQUIRESECURITYSIGNATURE_INFOLEVEL}
+ SV_MINCLIENTBUFFERSIZE_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_MINCLIENTBUFFERSIZE_PARMNUM;
+ {$EXTERNALSYM SV_MINCLIENTBUFFERSIZE_INFOLEVEL}
+ SV_CONNECTIONNOSESSIONSTIMEOUT_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_CONNECTIONNOSESSIONSTIMEOUT_PARMNUM;
+ {$EXTERNALSYM SV_CONNECTIONNOSESSIONSTIMEOUT_INFOLEVEL}
+ SV_IDLETHREADTIMEOUT_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_IDLETHREADTIMEOUT_PARMNUM;
+ {$EXTERNALSYM SV_IDLETHREADTIMEOUT_INFOLEVEL}
+ SV_ENABLEW9XSECURITYSIGNATURE_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_ENABLEW9XSECURITYSIGNATURE_PARMNUM;
+ {$EXTERNALSYM SV_ENABLEW9XSECURITYSIGNATURE_INFOLEVEL}
+ SV_ENFORCEKERBEROSREAUTHENTICATION_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_ENFORCEKERBEROSREAUTHENTICATION_PARMNUM;
+ {$EXTERNALSYM SV_ENFORCEKERBEROSREAUTHENTICATION_INFOLEVEL}
+ SV_DISABLEDOS_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_DISABLEDOS_PARMNUM;
+ {$EXTERNALSYM SV_DISABLEDOS_INFOLEVEL}
+ SV_LOWDISKSPACEMINIMUM_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_LOWDISKSPACEMINIMUM_PARMNUM;
+ {$EXTERNALSYM SV_LOWDISKSPACEMINIMUM_INFOLEVEL}
+ SV_DISABLESTRICTNAMECHECKING_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SV_DISABLESTRICTNAMECHECKING_PARMNUM;
+ {$EXTERNALSYM SV_DISABLESTRICTNAMECHECKING_INFOLEVEL}
+
+ SVI1_NUM_ELEMENTS = 5;
+ {$EXTERNALSYM SVI1_NUM_ELEMENTS}
+ SVI2_NUM_ELEMENTS = 40;
+ {$EXTERNALSYM SVI2_NUM_ELEMENTS}
+ SVI3_NUM_ELEMENTS = 44;
+ {$EXTERNALSYM SVI3_NUM_ELEMENTS}
+
+//
+// Maxmimum length for command string to NetServerAdminCommand.
+//
+
+ SV_MAX_CMD_LEN = PATHLEN;
+ {$EXTERNALSYM SV_MAX_CMD_LEN}
+
+//
+// Masks describing AUTOPROFILE parameters
+//
+
+ SW_AUTOPROF_LOAD_MASK = $1;
+ {$EXTERNALSYM SW_AUTOPROF_LOAD_MASK}
+ SW_AUTOPROF_SAVE_MASK = $2;
+ {$EXTERNALSYM SW_AUTOPROF_SAVE_MASK}
+
+//
+// Max size of svX_srvheuristics.
+//
+
+ SV_MAX_SRV_HEUR_LEN = 32; // Max heuristics info string length.
+ {$EXTERNALSYM SV_MAX_SRV_HEUR_LEN}
+
+//
+// Equate for use with sv102_licenses.
+//
+
+ SV_USERS_PER_LICENSE = 5;
+ {$EXTERNALSYM SV_USERS_PER_LICENSE}
+
+//
+// Equate for use with svti2_flags in NetServerTransportAddEx.
+//
+
+ SVTI2_REMAP_PIPE_NAMES = $2;
+ {$EXTERNALSYM SVTI2_REMAP_PIPE_NAMES}
+
+implementation
+
+{$IFDEF DYNAMIC_LINK}
+
+var
+ _NetServerEnum: Pointer;
+
+function NetServerEnum;
+begin
+ GetProcedureAddress(_NetServerEnum, netapi32, 'NetServerEnum');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetServerEnum]
+ end;
+end;
+
+var
+ _NetServerEnumEx: Pointer;
+
+function NetServerEnumEx;
+begin
+ GetProcedureAddress(_NetServerEnumEx, netapi32, 'NetServerEnumEx');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetServerEnumEx]
+ end;
+end;
+
+var
+ _NetServerGetInfo: Pointer;
+
+function NetServerGetInfo;
+begin
+ GetProcedureAddress(_NetServerGetInfo, netapi32, 'NetServerGetInfo');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetServerGetInfo]
+ end;
+end;
+
+var
+ _NetServerSetInfo: Pointer;
+
+function NetServerSetInfo;
+begin
+ GetProcedureAddress(_NetServerSetInfo, netapi32, 'NetServerSetInfo');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetServerSetInfo]
+ end;
+end;
+
+var
+ _NetServerSetInfoCommandLine: Pointer;
+
+function NetServerSetInfoCommandLine;
+begin
+ GetProcedureAddress(_NetServerSetInfoCommandLine, netapi32, 'NetServerSetInfoCommandLine');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetServerSetInfoCommandLine]
+ end;
+end;
+
+var
+ _NetServerDiskEnum: Pointer;
+
+function NetServerDiskEnum;
+begin
+ GetProcedureAddress(_NetServerDiskEnum, netapi32, 'NetServerDiskEnum');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetServerDiskEnum]
+ end;
+end;
+
+var
+ _NetServerComputerNameAdd: Pointer;
+
+function NetServerComputerNameAdd;
+begin
+ GetProcedureAddress(_NetServerComputerNameAdd, netapi32, 'NetServerComputerNameAdd');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetServerComputerNameAdd]
+ end;
+end;
+
+var
+ _NetServerComputerNameDel: Pointer;
+
+function NetServerComputerNameDel;
+begin
+ GetProcedureAddress(_NetServerComputerNameDel, netapi32, 'NetServerComputerNameDel');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetServerComputerNameDel]
+ end;
+end;
+
+var
+ _NetServerTransportAdd: Pointer;
+
+function NetServerTransportAdd;
+begin
+ GetProcedureAddress(_NetServerTransportAdd, netapi32, 'NetServerTransportAdd');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetServerTransportAdd]
+ end;
+end;
+
+var
+ _NetServerTransportAddEx: Pointer;
+
+function NetServerTransportAddEx;
+begin
+ GetProcedureAddress(_NetServerTransportAddEx, netapi32, 'NetServerTransportAddEx');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetServerTransportAddEx]
+ end;
+end;
+
+var
+ _NetServerTransportDel: Pointer;
+
+function NetServerTransportDel;
+begin
+ GetProcedureAddress(_NetServerTransportDel, netapi32, 'NetServerTransportDel');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetServerTransportDel]
+ end;
+end;
+
+var
+ _NetServerTransportEnum: Pointer;
+
+function NetServerTransportEnum;
+begin
+ GetProcedureAddress(_NetServerTransportEnum, netapi32, 'NetServerTransportEnum');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetServerTransportEnum]
+ end;
+end;
+
+var
+ _SetServiceBits: Pointer;
+
+function SetServiceBits;
+begin
+ GetProcedureAddress(_SetServiceBits, netapi32, 'SetServiceBits');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetServiceBits]
+ end;
+end;
+
+{$ELSE}
+
+function NetServerEnum; external netapi32 name 'NetServerEnum';
+function NetServerEnumEx; external netapi32 name 'NetServerEnumEx';
+function NetServerGetInfo; external netapi32 name 'NetServerGetInfo';
+function NetServerSetInfo; external netapi32 name 'NetServerSetInfo';
+function NetServerSetInfoCommandLine; external netapi32 name 'NetServerSetInfoCommandLine';
+function NetServerDiskEnum; external netapi32 name 'NetServerDiskEnum';
+function NetServerComputerNameAdd; external netapi32 name 'NetServerComputerNameAdd';
+function NetServerComputerNameDel; external netapi32 name 'NetServerComputerNameDel';
+function NetServerTransportAdd; external netapi32 name 'NetServerTransportAdd';
+function NetServerTransportAddEx; external netapi32 name 'NetServerTransportAddEx';
+function NetServerTransportDel; external netapi32 name 'NetServerTransportDel';
+function NetServerTransportEnum; external netapi32 name 'NetServerTransportEnum';
+function SetServiceBits; external netapi32 name 'SetServiceBits';
+
+{$ENDIF DYNAMIC_LINK}
+
+end.
diff --git a/packages/extra/winunits/jwalmshare.pas b/packages/extra/winunits/jwalmshare.pas
index 4625c2c25b..382a42b1bb 100644
--- a/packages/extra/winunits/jwalmshare.pas
+++ b/packages/extra/winunits/jwalmshare.pas
@@ -1,798 +1,798 @@
-{******************************************************************************}
-{ }
-{ Lan Manager Shares API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: lmshare.h, released November 2001. The original Pascal }
-{ code is: LmShare.pas, released Februari 2002. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwalmshare.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaLmShare;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "lmshare.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaLmCons, JwaWinNT, JwaWinType;
-
-//
-// Function Prototypes - Share
-//
-
-function NetShareAdd(servername: LMSTR; level: DWORD; buf: LPBYTE; parm_err: LPDWORD): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetShareAdd}
-
-function NetShareEnum(servername: LMSTR; level: DWORD; var bufptr: LPBYTE; prefmaxlen: DWORD; entriesread, totalentries, resume_handle: LPDWORD): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetShareEnum}
-
-function NetShareEnumSticky(servername: LMSTR; level: DWORD; var bufptr: LPBYTE; prefmaxlen: DWORD; entriesread, totalentries, resume_handle: LPDWORD): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetShareEnumSticky}
-
-function NetShareGetInfo(servername, netname: LMSTR; level: DWORD; var bufptr: LPBYTE): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetShareGetInfo}
-
-function NetShareSetInfo(servername, netname: LMSTR; level: DWORD; buf: LPBYTE; parm_err: LPDWORD): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetShareSetInfo}
-
-function NetShareDel(servername, netname: LMSTR; reserved: DWORD): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetShareDel}
-
-function NetShareDelSticky(servername, netname: LMSTR; reserved: DWORD): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetShareDelSticky}
-
-function NetShareCheck(servername, device: LMSTR; type_: LPDWORD): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetShareCheck}
-
-//
-// Data Structures - Share
-//
-
-type
- LPSHARE_INFO_0 = ^SHARE_INFO_0;
- {$EXTERNALSYM LPSHARE_INFO_0}
- PSHARE_INFO_0 = ^SHARE_INFO_0;
- {$EXTERNALSYM PSHARE_INFO_0}
- _SHARE_INFO_0 = record
- shi0_netname: LMSTR;
- end;
- {$EXTERNALSYM _SHARE_INFO_0}
- SHARE_INFO_0 = _SHARE_INFO_0;
- {$EXTERNALSYM SHARE_INFO_0}
- TShareInfo0 = SHARE_INFO_0;
- PShareInfo0 = PSHARE_INFO_0;
-
- LPSHARE_INFO_1 = ^SHARE_INFO_1;
- {$EXTERNALSYM LPSHARE_INFO_1}
- PSHARE_INFO_1 = ^SHARE_INFO_1;
- {$EXTERNALSYM PSHARE_INFO_1}
- _SHARE_INFO_1 = record
- shi1_netname: LMSTR;
- shi1_type: DWORD;
- shi1_remark: LMSTR;
- end;
- {$EXTERNALSYM _SHARE_INFO_1}
- SHARE_INFO_1 = _SHARE_INFO_1;
- {$EXTERNALSYM SHARE_INFO_1}
- TShareInfo1 = SHARE_INFO_1;
- PShareInfo1 = PSHARE_INFO_1;
-
- LPSHARE_INFO_2 = ^SHARE_INFO_2;
- {$EXTERNALSYM LPSHARE_INFO_2}
- PSHARE_INFO_2 = ^SHARE_INFO_2;
- {$EXTERNALSYM PSHARE_INFO_2}
- _SHARE_INFO_2 = record
- shi2_netname: LMSTR;
- shi2_type: DWORD;
- shi2_remark: LMSTR;
- shi2_permissions: DWORD;
- shi2_max_uses: DWORD;
- shi2_current_uses: DWORD;
- shi2_path: LMSTR;
- shi2_passwd: LMSTR;
- end;
- {$EXTERNALSYM _SHARE_INFO_2}
- SHARE_INFO_2 = _SHARE_INFO_2;
- {$EXTERNALSYM SHARE_INFO_2}
- TShareInfo2 = SHARE_INFO_2;
- PShareInfo2 = PSHARE_INFO_2;
-
- LPSHARE_INFO_501 = ^SHARE_INFO_501;
- {$EXTERNALSYM LPSHARE_INFO_501}
- PSHARE_INFO_501 = ^SHARE_INFO_501;
- {$EXTERNALSYM PSHARE_INFO_501}
- _SHARE_INFO_501 = record
- shi501_netname: LMSTR;
- shi501_type: DWORD;
- shi501_remark: LMSTR;
- shi501_flags: DWORD;
- end;
- {$EXTERNALSYM _SHARE_INFO_501}
- SHARE_INFO_501 = _SHARE_INFO_501;
- {$EXTERNALSYM SHARE_INFO_501}
- TShareInfo501 = SHARE_INFO_501;
- PShareInfo501 = PSHARE_INFO_501;
-
- LPSHARE_INFO_502 = ^SHARE_INFO_502;
- {$EXTERNALSYM LPSHARE_INFO_502}
- PSHARE_INFO_502 = ^SHARE_INFO_502;
- {$EXTERNALSYM PSHARE_INFO_502}
- _SHARE_INFO_502 = record
- shi502_netname: LMSTR;
- shi502_type: DWORD;
- shi502_remark: LMSTR;
- shi502_permissions: DWORD;
- shi502_max_uses: DWORD;
- shi502_current_uses: DWORD;
- shi502_path: LMSTR;
- shi502_passwd: LMSTR;
- shi502_reserved: DWORD;
- shi502_security_descriptor: PSECURITY_DESCRIPTOR;
- end;
- {$EXTERNALSYM _SHARE_INFO_502}
- SHARE_INFO_502 = _SHARE_INFO_502;
- {$EXTERNALSYM SHARE_INFO_502}
- TShareInfo502 = SHARE_INFO_502;
- PShareInfo502 = PSHARE_INFO_502;
-
- LPSHARE_INFO_1004 = ^SHARE_INFO_1004;
- {$EXTERNALSYM LPSHARE_INFO_1004}
- PSHARE_INFO_1004 = ^SHARE_INFO_1004;
- {$EXTERNALSYM PSHARE_INFO_1004}
- _SHARE_INFO_1004 = record
- shi1004_remark: LMSTR;
- end;
- {$EXTERNALSYM _SHARE_INFO_1004}
- SHARE_INFO_1004 = _SHARE_INFO_1004;
- {$EXTERNALSYM SHARE_INFO_1004}
- TShareInfo1004 = SHARE_INFO_1004;
- PShareInfo1004 = PSHARE_INFO_1004;
-
- LPSHARE_INFO_1005 = ^SHARE_INFO_1005;
- {$EXTERNALSYM LPSHARE_INFO_1005}
- PSHARE_INFO_1005 = ^SHARE_INFO_1005;
- {$EXTERNALSYM PSHARE_INFO_1005}
- _SHARE_INFO_1005 = record
- shi1005_flags: DWORD;
- end;
- {$EXTERNALSYM _SHARE_INFO_1005}
- SHARE_INFO_1005 = _SHARE_INFO_1005;
- {$EXTERNALSYM SHARE_INFO_1005}
- TShareInfo1005 = SHARE_INFO_1005;
- PShareInfo1005 = PSHARE_INFO_1005;
-
- LPSHARE_INFO_1006 = ^SHARE_INFO_1006;
- {$EXTERNALSYM LPSHARE_INFO_1006}
- PSHARE_INFO_1006 = ^SHARE_INFO_1006;
- {$EXTERNALSYM PSHARE_INFO_1006}
- _SHARE_INFO_1006 = record
- shi1006_max_uses: DWORD;
- end;
- {$EXTERNALSYM _SHARE_INFO_1006}
- SHARE_INFO_1006 = _SHARE_INFO_1006;
- {$EXTERNALSYM SHARE_INFO_1006}
- TShareInfo1006 = SHARE_INFO_1006;
- PShareInfo1006 = PSHARE_INFO_1006;
-
- LPSHARE_INFO_1501 = ^SHARE_INFO_1501;
- {$EXTERNALSYM LPSHARE_INFO_1501}
- PSHARE_INFO_1501 = ^SHARE_INFO_1501;
- {$EXTERNALSYM PSHARE_INFO_1501}
- _SHARE_INFO_1501 = record
- shi1501_reserved: DWORD;
- shi1501_security_descriptor: PSECURITY_DESCRIPTOR;
- end;
- {$EXTERNALSYM _SHARE_INFO_1501}
- SHARE_INFO_1501 = _SHARE_INFO_1501;
- {$EXTERNALSYM SHARE_INFO_1501}
- TShareInfo1501 = SHARE_INFO_1501;
- PShareInfo1501 = PSHARE_INFO_1501;
-
-//
-// Special Values and Constants - Share
-//
-
-//
-// Values for parm_err parameter.
-//
-
-const
- SHARE_NETNAME_PARMNUM = 1;
- {$EXTERNALSYM SHARE_NETNAME_PARMNUM}
- SHARE_TYPE_PARMNUM = 3;
- {$EXTERNALSYM SHARE_TYPE_PARMNUM}
- SHARE_REMARK_PARMNUM = 4;
- {$EXTERNALSYM SHARE_REMARK_PARMNUM}
- SHARE_PERMISSIONS_PARMNUM = 5;
- {$EXTERNALSYM SHARE_PERMISSIONS_PARMNUM}
- SHARE_MAX_USES_PARMNUM = 6;
- {$EXTERNALSYM SHARE_MAX_USES_PARMNUM}
- SHARE_CURRENT_USES_PARMNUM = 7;
- {$EXTERNALSYM SHARE_CURRENT_USES_PARMNUM}
- SHARE_PATH_PARMNUM = 8;
- {$EXTERNALSYM SHARE_PATH_PARMNUM}
- SHARE_PASSWD_PARMNUM = 9;
- {$EXTERNALSYM SHARE_PASSWD_PARMNUM}
- SHARE_FILE_SD_PARMNUM = 501;
- {$EXTERNALSYM SHARE_FILE_SD_PARMNUM}
-
-//
-// Single-field infolevels for NetShareSetInfo.
-//
-
- SHARE_REMARK_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SHARE_REMARK_PARMNUM;
- {$EXTERNALSYM SHARE_REMARK_INFOLEVEL}
- SHARE_MAX_USES_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SHARE_MAX_USES_PARMNUM;
- {$EXTERNALSYM SHARE_MAX_USES_INFOLEVEL}
- SHARE_FILE_SD_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SHARE_FILE_SD_PARMNUM;
- {$EXTERNALSYM SHARE_FILE_SD_INFOLEVEL}
-
- SHI1_NUM_ELEMENTS = 4;
- {$EXTERNALSYM SHI1_NUM_ELEMENTS}
- SHI2_NUM_ELEMENTS = 10;
- {$EXTERNALSYM SHI2_NUM_ELEMENTS}
-
-//
-// Share types (shi1_type and shi2_type fields).
-//
-
- STYPE_DISKTREE = 0;
- {$EXTERNALSYM STYPE_DISKTREE}
- STYPE_PRINTQ = 1;
- {$EXTERNALSYM STYPE_PRINTQ}
- STYPE_DEVICE = 2;
- {$EXTERNALSYM STYPE_DEVICE}
- STYPE_IPC = 3;
- {$EXTERNALSYM STYPE_IPC}
-
- STYPE_TEMPORARY = $40000000;
- {$EXTERNALSYM STYPE_TEMPORARY}
- STYPE_SPECIAL = DWORD($80000000);
- {$EXTERNALSYM STYPE_SPECIAL}
-
- SHI_USES_UNLIMITED = DWORD(-1);
- {$EXTERNALSYM SHI_USES_UNLIMITED}
-
-//
-// Flags values for the 501 and 1005 levels
-//
-
- SHI1005_FLAGS_DFS = $01; // Share is in the DFS
- {$EXTERNALSYM SHI1005_FLAGS_DFS}
- SHI1005_FLAGS_DFS_ROOT = $02; // Share is root of DFS
- {$EXTERNALSYM SHI1005_FLAGS_DFS_ROOT}
-
- CSC_MASK = $30; // Used to mask off the following states
- {$EXTERNALSYM CSC_MASK}
-
- CSC_CACHE_MANUAL_REINT = $00; // No automatic file by file reintegration
- {$EXTERNALSYM CSC_CACHE_MANUAL_REINT}
- CSC_CACHE_AUTO_REINT = $10; // File by file reintegration is OK
- {$EXTERNALSYM CSC_CACHE_AUTO_REINT}
- CSC_CACHE_VDO = $20; // no need to flow opens
- {$EXTERNALSYM CSC_CACHE_VDO}
- CSC_CACHE_NONE = $30; // no CSC for this share
- {$EXTERNALSYM CSC_CACHE_NONE}
-
- SHI1005_FLAGS_RESTRICT_EXCLUSIVE_OPENS = $0100; // Used to disallow read-deny read behavior
- {$EXTERNALSYM SHI1005_FLAGS_RESTRICT_EXCLUSIVE_OPENS}
- SHI1005_FLAGS_FORCE_SHARED_DELETE = $0200; // Used to allows force shared delete
- {$EXTERNALSYM SHI1005_FLAGS_FORCE_SHARED_DELETE}
- SHI1005_FLAGS_ALLOW_NAMESPACE_CACHING = $0400; // The clients may cache the namespace
- {$EXTERNALSYM SHI1005_FLAGS_ALLOW_NAMESPACE_CACHING}
-
-//
-// The subset of 1005 infolevel flags that can be set via the API
-//
-
- SHI1005_VALID_FLAGS_SET = CSC_MASK or SHI1005_FLAGS_RESTRICT_EXCLUSIVE_OPENS or SHI1005_FLAGS_FORCE_SHARED_DELETE or SHI1005_FLAGS_ALLOW_NAMESPACE_CACHING;
- {$EXTERNALSYM SHI1005_VALID_FLAGS_SET}
-
-//
-// SESSION API
-//
-
-//
-// Function Prototypes Session
-//
-
-function NetSessionEnum(servername, UncClientName, username: LMSTR; level: DWORD; var bufptr: LPBYTE; prefmaxlen: DWORD; entriesread, totalentries, resume_handle: LPDWORD): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetSessionEnum}
-
-function NetSessionDel(servername, UncClientName, username: LMSTR): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetSessionDel}
-
-function NetSessionGetInfo(servername, UncClientName, username: LMSTR; level: DWORD; var bufptr: LPBYTE): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetSessionGetInfo}
-
-//
-// Data Structures - Session
-//
-
-type
- LPSESSION_INFO_0 = ^SESSION_INFO_0;
- {$EXTERNALSYM LPSESSION_INFO_0}
- PSESSION_INFO_0 = ^SESSION_INFO_0;
- {$EXTERNALSYM PSESSION_INFO_0}
- _SESSION_INFO_0 = record
- sesi0_cname: LMSTR; // client name (no backslashes)
- end;
- {$EXTERNALSYM _SESSION_INFO_0}
- SESSION_INFO_0 = _SESSION_INFO_0;
- {$EXTERNALSYM SESSION_INFO_0}
- TSessionInfo0 = SESSION_INFO_0;
- PSessionInfo0 = PSESSION_INFO_0;
-
- LPSESSION_INFO_1 = ^SESSION_INFO_1;
- {$EXTERNALSYM LPSESSION_INFO_1}
- PSESSION_INFO_1 = ^SESSION_INFO_1;
- {$EXTERNALSYM PSESSION_INFO_1}
- _SESSION_INFO_1 = record
- sesi1_cname: LMSTR; // client name (no backslashes)
- sesi1_username: LMSTR;
- sesi1_num_opens: DWORD;
- sesi1_time: DWORD;
- sesi1_idle_time: DWORD;
- sesi1_user_flags: DWORD;
- end;
- {$EXTERNALSYM _SESSION_INFO_1}
- SESSION_INFO_1 = _SESSION_INFO_1;
- {$EXTERNALSYM SESSION_INFO_1}
- TSessionInfo1 = SESSION_INFO_1;
- PSessionInfo1 = PSESSION_INFO_1;
-
- LPSESSION_INFO_2 = ^SESSION_INFO_2;
- {$EXTERNALSYM LPSESSION_INFO_2}
- PSESSION_INFO_2 = ^SESSION_INFO_2;
- {$EXTERNALSYM PSESSION_INFO_2}
- _SESSION_INFO_2 = record
- sesi2_cname: LMSTR; // client name (no backslashes)
- sesi2_username: LMSTR;
- sesi2_num_opens: DWORD;
- sesi2_time: DWORD;
- sesi2_idle_time: DWORD;
- sesi2_user_flags: DWORD;
- sesi2_cltype_name: LMSTR;
- end;
- {$EXTERNALSYM _SESSION_INFO_2}
- SESSION_INFO_2 = _SESSION_INFO_2;
- {$EXTERNALSYM SESSION_INFO_2}
- TSessionInfo2 = SESSION_INFO_2;
- PSessionInfo2 = PSESSION_INFO_2;
-
- LPSESSION_INFO_10 = ^SESSION_INFO_10;
- {$EXTERNALSYM LPSESSION_INFO_10}
- PSESSION_INFO_10 = ^SESSION_INFO_10;
- {$EXTERNALSYM PSESSION_INFO_10}
- _SESSION_INFO_10 = record
- sesi10_cname: LMSTR; // client name (no backslashes)
- sesi10_username: LMSTR;
- sesi10_time: DWORD;
- sesi10_idle_time: DWORD;
- end;
- {$EXTERNALSYM _SESSION_INFO_10}
- SESSION_INFO_10 = _SESSION_INFO_10;
- {$EXTERNALSYM SESSION_INFO_10}
- TSessionInfo10 = SESSION_INFO_10;
- PSessionInfo10 = PSESSION_INFO_10;
-
- LPSESSION_INFO_502 = ^SESSION_INFO_502;
- {$EXTERNALSYM LPSESSION_INFO_502}
- PSESSION_INFO_502 = ^SESSION_INFO_502;
- {$EXTERNALSYM PSESSION_INFO_502}
- _SESSION_INFO_502 = record
- sesi502_cname: LMSTR; // client name (no backslashes)
- sesi502_username: LMSTR;
- sesi502_num_opens: DWORD;
- sesi502_time: DWORD;
- sesi502_idle_time: DWORD;
- sesi502_user_flags: DWORD;
- sesi502_cltype_name: LMSTR;
- sesi502_transport: LMSTR;
- end;
- {$EXTERNALSYM _SESSION_INFO_502}
- SESSION_INFO_502 = _SESSION_INFO_502;
- {$EXTERNALSYM SESSION_INFO_502}
- TSessionInfo502 = SESSION_INFO_502;
- PSessionInfo502 = PSESSION_INFO_502;
-
-//
-// Special Values and Constants - Session
-//
-
-//
-// Bits defined in sesi1_user_flags.
-//
-
-const
- SESS_GUEST = $00000001; // session is logged on as a guest
- {$EXTERNALSYM SESS_GUEST}
- SESS_NOENCRYPTION = $00000002; // session is not using encryption
- {$EXTERNALSYM SESS_NOENCRYPTION}
-
- SESI1_NUM_ELEMENTS = 8;
- {$EXTERNALSYM SESI1_NUM_ELEMENTS}
- SESI2_NUM_ELEMENTS = 9;
- {$EXTERNALSYM SESI2_NUM_ELEMENTS}
-
-//
-// CONNECTION API
-//
-
-//
-// Function Prototypes - CONNECTION
-//
-
-function NetConnectionEnum(servername, qualifier: LMSTR; level: DWORD; var bufptr: LPBYTE; prefmaxlen: DWORD; entriesread, totalentries, resume_handle: LPDWORD): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetConnectionEnum}
-
-//
-// Data Structures - CONNECTION
-//
-
-type
- LPCONNECTION_INFO_0 = ^CONNECTION_INFO_0;
- {$EXTERNALSYM LPCONNECTION_INFO_0}
- PCONNECTION_INFO_0 = ^CONNECTION_INFO_0;
- {$EXTERNALSYM PCONNECTION_INFO_0}
- _CONNECTION_INFO_0 = record
- coni0_id: DWORD;
- end;
- {$EXTERNALSYM _CONNECTION_INFO_0}
- CONNECTION_INFO_0 = _CONNECTION_INFO_0;
- {$EXTERNALSYM CONNECTION_INFO_0}
- TConnectionInfo0 = CONNECTION_INFO_0;
- PConnectionInfo0 = PCONNECTION_INFO_0;
-
- LPCONNECTION_INFO_1 = ^CONNECTION_INFO_1;
- {$EXTERNALSYM LPCONNECTION_INFO_1}
- PCONNECTION_INFO_1 = ^CONNECTION_INFO_1;
- {$EXTERNALSYM PCONNECTION_INFO_1}
- _CONNECTION_INFO_1 = record
- coni1_id: DWORD;
- coni1_type: DWORD;
- coni1_num_opens: DWORD;
- coni1_num_users: DWORD;
- coni1_time: DWORD;
- coni1_username: LMSTR;
- coni1_netname: LMSTR;
- end;
- {$EXTERNALSYM _CONNECTION_INFO_1}
- CONNECTION_INFO_1 = _CONNECTION_INFO_1;
- {$EXTERNALSYM CONNECTION_INFO_1}
- TConnectionInfo1 = CONNECTION_INFO_1;
- PConnectionInfo1 = PCONNECTION_INFO_1;
-
-//
-// FILE API
-//
-
-//
-// Function Prototypes - FILE
-//
-
-function NetFileClose(servername: LMSTR; fileid: DWORD): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetFileClose}
-
-function NetFileEnum(servername, basepath, username: LMSTR; level: DWORD; var bufptr: LPBYTE; prefmaxlen: DWORD; entriesread, totalentries, resume_handle: PDWORD_PTR): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetFileEnum}
-
-function NetFileGetInfo(servername: LMSTR; fileid, level: DWORD; var bufptr: LPBYTE): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetFileGetInfo}
-
-//
-// Data Structures - File
-//
-
-// File APIs are available at information levels 2 & 3 only. Levels 0 &
-// 1 are not supported.
-//
-
-type
- LPFILE_INFO_2 = ^FILE_INFO_2;
- {$EXTERNALSYM LPFILE_INFO_2}
- PFILE_INFO_2 = ^FILE_INFO_2;
- {$EXTERNALSYM PFILE_INFO_2}
- _FILE_INFO_2 = record
- fi2_id: DWORD;
- end;
- {$EXTERNALSYM _FILE_INFO_2}
- FILE_INFO_2 = _FILE_INFO_2;
- {$EXTERNALSYM FILE_INFO_2}
- TFileInfo2 = FILE_INFO_2;
- PFileInfo2 = PFILE_INFO_2;
-
- LPFILE_INFO_3 = ^FILE_INFO_3;
- {$EXTERNALSYM LPFILE_INFO_3}
- PFILE_INFO_3 = ^FILE_INFO_3;
- {$EXTERNALSYM PFILE_INFO_3}
- _FILE_INFO_3 = record
- fi3_id: DWORD;
- fi3_permissions: DWORD;
- fi3_num_locks: DWORD;
- fi3_pathname: LMSTR;
- fi3_username: LMSTR;
- end;
- {$EXTERNALSYM _FILE_INFO_3}
- FILE_INFO_3 = _FILE_INFO_3;
- {$EXTERNALSYM FILE_INFO_3}
- TFileInfo3 = FILE_INFO_3;
- PFileInfo3 = PFILE_INFO_3;
-
-//
-// Special Values and Constants - File
-//
-
-//
-// bit values for permissions
-//
-
-const
- PERM_FILE_READ = $1; // user has read access
- {$EXTERNALSYM PERM_FILE_READ}
- PERM_FILE_WRITE = $2; // user has write access
- {$EXTERNALSYM PERM_FILE_WRITE}
- PERM_FILE_CREATE = $4; // user has create access
- {$EXTERNALSYM PERM_FILE_CREATE}
-
-implementation
-
-{$IFDEF DYNAMIC_LINK}
-
-var
- _NetShareAdd: Pointer;
-
-function NetShareAdd;
-begin
- GetProcedureAddress(_NetShareAdd, netapi32, 'NetShareAdd');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetShareAdd]
- end;
-end;
-
-var
- _NetShareEnum: Pointer;
-
-function NetShareEnum;
-begin
- GetProcedureAddress(_NetShareEnum, netapi32, 'NetShareEnum');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetShareEnum]
- end;
-end;
-
-var
- _NetShareEnumSticky: Pointer;
-
-function NetShareEnumSticky;
-begin
- GetProcedureAddress(_NetShareEnumSticky, netapi32, 'NetShareEnumSticky');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetShareEnumSticky]
- end;
-end;
-
-var
- _NetShareGetInfo: Pointer;
-
-function NetShareGetInfo;
-begin
- GetProcedureAddress(_NetShareGetInfo, netapi32, 'NetShareGetInfo');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetShareGetInfo]
- end;
-end;
-
-var
- _NetShareSetInfo: Pointer;
-
-function NetShareSetInfo;
-begin
- GetProcedureAddress(_NetShareSetInfo, netapi32, 'NetShareSetInfo');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetShareSetInfo]
- end;
-end;
-
-var
- _NetShareDel: Pointer;
-
-function NetShareDel;
-begin
- GetProcedureAddress(_NetShareDel, netapi32, 'NetShareDel');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetShareDel]
- end;
-end;
-
-var
- _NetShareDelSticky: Pointer;
-
-function NetShareDelSticky;
-begin
- GetProcedureAddress(_NetShareDelSticky, netapi32, 'NetShareDelSticky');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetShareDelSticky]
- end;
-end;
-
-var
- _NetShareCheck: Pointer;
-
-function NetShareCheck;
-begin
- GetProcedureAddress(_NetShareCheck, netapi32, 'NetShareCheck');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetShareCheck]
- end;
-end;
-
-var
- _NetSessionEnum: Pointer;
-
-function NetSessionEnum;
-begin
- GetProcedureAddress(_NetSessionEnum, netapi32, 'NetSessionEnum');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetSessionEnum]
- end;
-end;
-
-var
- _NetSessionDel: Pointer;
-
-function NetSessionDel;
-begin
- GetProcedureAddress(_NetSessionDel, netapi32, 'NetSessionDel');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetSessionDel]
- end;
-end;
-
-var
- _NetSessionGetInfo: Pointer;
-
-function NetSessionGetInfo;
-begin
- GetProcedureAddress(_NetSessionGetInfo, netapi32, 'NetSessionGetInfo');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetSessionGetInfo]
- end;
-end;
-
-var
- _NetConnectionEnum: Pointer;
-
-function NetConnectionEnum;
-begin
- GetProcedureAddress(_NetConnectionEnum, netapi32, 'NetConnectionEnum');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetConnectionEnum]
- end;
-end;
-
-var
- _NetFileClose: Pointer;
-
-function NetFileClose;
-begin
- GetProcedureAddress(_NetFileClose, netapi32, 'NetFileClose');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetFileClose]
- end;
-end;
-
-var
- _NetFileEnum: Pointer;
-
-function NetFileEnum;
-begin
- GetProcedureAddress(_NetFileEnum, netapi32, 'NetFileEnum');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetFileEnum]
- end;
-end;
-
-var
- _NetFileGetInfo: Pointer;
-
-function NetFileGetInfo;
-begin
- GetProcedureAddress(_NetFileGetInfo, netapi32, 'NetFileGetInfo');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetFileGetInfo]
- end;
-end;
-
-{$ELSE}
-
-function NetShareAdd; external netapi32 name 'NetShareAdd';
-function NetShareEnum; external netapi32 name 'NetShareEnum';
-function NetShareEnumSticky; external netapi32 name 'NetShareEnumSticky';
-function NetShareGetInfo; external netapi32 name 'NetShareGetInfo';
-function NetShareSetInfo; external netapi32 name 'NetShareSetInfo';
-function NetShareDel; external netapi32 name 'NetShareDel';
-function NetShareDelSticky; external netapi32 name 'NetShareDelSticky';
-function NetShareCheck; external netapi32 name 'NetShareCheck';
-function NetSessionEnum; external netapi32 name 'NetSessionEnum';
-function NetSessionDel; external netapi32 name 'NetSessionDel';
-function NetSessionGetInfo; external netapi32 name 'NetSessionGetInfo';
-function NetConnectionEnum; external netapi32 name 'NetConnectionEnum';
-function NetFileClose; external netapi32 name 'NetFileClose';
-function NetFileEnum; external netapi32 name 'NetFileEnum';
-function NetFileGetInfo; external netapi32 name 'NetFileGetInfo';
-
-{$ENDIF DYNAMIC_LINK}
-
-end.
+{******************************************************************************}
+{ }
+{ Lan Manager Shares API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: lmshare.h, released November 2001. The original Pascal }
+{ code is: LmShare.pas, released Februari 2002. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwalmshare.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaLmShare;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "lmshare.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaLmCons, JwaWinNT, JwaWinType;
+
+//
+// Function Prototypes - Share
+//
+
+function NetShareAdd(servername: LMSTR; level: DWORD; buf: LPBYTE; parm_err: LPDWORD): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetShareAdd}
+
+function NetShareEnum(servername: LMSTR; level: DWORD; var bufptr: LPBYTE; prefmaxlen: DWORD; entriesread, totalentries, resume_handle: LPDWORD): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetShareEnum}
+
+function NetShareEnumSticky(servername: LMSTR; level: DWORD; var bufptr: LPBYTE; prefmaxlen: DWORD; entriesread, totalentries, resume_handle: LPDWORD): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetShareEnumSticky}
+
+function NetShareGetInfo(servername, netname: LMSTR; level: DWORD; var bufptr: LPBYTE): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetShareGetInfo}
+
+function NetShareSetInfo(servername, netname: LMSTR; level: DWORD; buf: LPBYTE; parm_err: LPDWORD): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetShareSetInfo}
+
+function NetShareDel(servername, netname: LMSTR; reserved: DWORD): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetShareDel}
+
+function NetShareDelSticky(servername, netname: LMSTR; reserved: DWORD): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetShareDelSticky}
+
+function NetShareCheck(servername, device: LMSTR; type_: LPDWORD): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetShareCheck}
+
+//
+// Data Structures - Share
+//
+
+type
+ LPSHARE_INFO_0 = ^SHARE_INFO_0;
+ {$EXTERNALSYM LPSHARE_INFO_0}
+ PSHARE_INFO_0 = ^SHARE_INFO_0;
+ {$EXTERNALSYM PSHARE_INFO_0}
+ _SHARE_INFO_0 = record
+ shi0_netname: LMSTR;
+ end;
+ {$EXTERNALSYM _SHARE_INFO_0}
+ SHARE_INFO_0 = _SHARE_INFO_0;
+ {$EXTERNALSYM SHARE_INFO_0}
+ TShareInfo0 = SHARE_INFO_0;
+ PShareInfo0 = PSHARE_INFO_0;
+
+ LPSHARE_INFO_1 = ^SHARE_INFO_1;
+ {$EXTERNALSYM LPSHARE_INFO_1}
+ PSHARE_INFO_1 = ^SHARE_INFO_1;
+ {$EXTERNALSYM PSHARE_INFO_1}
+ _SHARE_INFO_1 = record
+ shi1_netname: LMSTR;
+ shi1_type: DWORD;
+ shi1_remark: LMSTR;
+ end;
+ {$EXTERNALSYM _SHARE_INFO_1}
+ SHARE_INFO_1 = _SHARE_INFO_1;
+ {$EXTERNALSYM SHARE_INFO_1}
+ TShareInfo1 = SHARE_INFO_1;
+ PShareInfo1 = PSHARE_INFO_1;
+
+ LPSHARE_INFO_2 = ^SHARE_INFO_2;
+ {$EXTERNALSYM LPSHARE_INFO_2}
+ PSHARE_INFO_2 = ^SHARE_INFO_2;
+ {$EXTERNALSYM PSHARE_INFO_2}
+ _SHARE_INFO_2 = record
+ shi2_netname: LMSTR;
+ shi2_type: DWORD;
+ shi2_remark: LMSTR;
+ shi2_permissions: DWORD;
+ shi2_max_uses: DWORD;
+ shi2_current_uses: DWORD;
+ shi2_path: LMSTR;
+ shi2_passwd: LMSTR;
+ end;
+ {$EXTERNALSYM _SHARE_INFO_2}
+ SHARE_INFO_2 = _SHARE_INFO_2;
+ {$EXTERNALSYM SHARE_INFO_2}
+ TShareInfo2 = SHARE_INFO_2;
+ PShareInfo2 = PSHARE_INFO_2;
+
+ LPSHARE_INFO_501 = ^SHARE_INFO_501;
+ {$EXTERNALSYM LPSHARE_INFO_501}
+ PSHARE_INFO_501 = ^SHARE_INFO_501;
+ {$EXTERNALSYM PSHARE_INFO_501}
+ _SHARE_INFO_501 = record
+ shi501_netname: LMSTR;
+ shi501_type: DWORD;
+ shi501_remark: LMSTR;
+ shi501_flags: DWORD;
+ end;
+ {$EXTERNALSYM _SHARE_INFO_501}
+ SHARE_INFO_501 = _SHARE_INFO_501;
+ {$EXTERNALSYM SHARE_INFO_501}
+ TShareInfo501 = SHARE_INFO_501;
+ PShareInfo501 = PSHARE_INFO_501;
+
+ LPSHARE_INFO_502 = ^SHARE_INFO_502;
+ {$EXTERNALSYM LPSHARE_INFO_502}
+ PSHARE_INFO_502 = ^SHARE_INFO_502;
+ {$EXTERNALSYM PSHARE_INFO_502}
+ _SHARE_INFO_502 = record
+ shi502_netname: LMSTR;
+ shi502_type: DWORD;
+ shi502_remark: LMSTR;
+ shi502_permissions: DWORD;
+ shi502_max_uses: DWORD;
+ shi502_current_uses: DWORD;
+ shi502_path: LMSTR;
+ shi502_passwd: LMSTR;
+ shi502_reserved: DWORD;
+ shi502_security_descriptor: PSECURITY_DESCRIPTOR;
+ end;
+ {$EXTERNALSYM _SHARE_INFO_502}
+ SHARE_INFO_502 = _SHARE_INFO_502;
+ {$EXTERNALSYM SHARE_INFO_502}
+ TShareInfo502 = SHARE_INFO_502;
+ PShareInfo502 = PSHARE_INFO_502;
+
+ LPSHARE_INFO_1004 = ^SHARE_INFO_1004;
+ {$EXTERNALSYM LPSHARE_INFO_1004}
+ PSHARE_INFO_1004 = ^SHARE_INFO_1004;
+ {$EXTERNALSYM PSHARE_INFO_1004}
+ _SHARE_INFO_1004 = record
+ shi1004_remark: LMSTR;
+ end;
+ {$EXTERNALSYM _SHARE_INFO_1004}
+ SHARE_INFO_1004 = _SHARE_INFO_1004;
+ {$EXTERNALSYM SHARE_INFO_1004}
+ TShareInfo1004 = SHARE_INFO_1004;
+ PShareInfo1004 = PSHARE_INFO_1004;
+
+ LPSHARE_INFO_1005 = ^SHARE_INFO_1005;
+ {$EXTERNALSYM LPSHARE_INFO_1005}
+ PSHARE_INFO_1005 = ^SHARE_INFO_1005;
+ {$EXTERNALSYM PSHARE_INFO_1005}
+ _SHARE_INFO_1005 = record
+ shi1005_flags: DWORD;
+ end;
+ {$EXTERNALSYM _SHARE_INFO_1005}
+ SHARE_INFO_1005 = _SHARE_INFO_1005;
+ {$EXTERNALSYM SHARE_INFO_1005}
+ TShareInfo1005 = SHARE_INFO_1005;
+ PShareInfo1005 = PSHARE_INFO_1005;
+
+ LPSHARE_INFO_1006 = ^SHARE_INFO_1006;
+ {$EXTERNALSYM LPSHARE_INFO_1006}
+ PSHARE_INFO_1006 = ^SHARE_INFO_1006;
+ {$EXTERNALSYM PSHARE_INFO_1006}
+ _SHARE_INFO_1006 = record
+ shi1006_max_uses: DWORD;
+ end;
+ {$EXTERNALSYM _SHARE_INFO_1006}
+ SHARE_INFO_1006 = _SHARE_INFO_1006;
+ {$EXTERNALSYM SHARE_INFO_1006}
+ TShareInfo1006 = SHARE_INFO_1006;
+ PShareInfo1006 = PSHARE_INFO_1006;
+
+ LPSHARE_INFO_1501 = ^SHARE_INFO_1501;
+ {$EXTERNALSYM LPSHARE_INFO_1501}
+ PSHARE_INFO_1501 = ^SHARE_INFO_1501;
+ {$EXTERNALSYM PSHARE_INFO_1501}
+ _SHARE_INFO_1501 = record
+ shi1501_reserved: DWORD;
+ shi1501_security_descriptor: PSECURITY_DESCRIPTOR;
+ end;
+ {$EXTERNALSYM _SHARE_INFO_1501}
+ SHARE_INFO_1501 = _SHARE_INFO_1501;
+ {$EXTERNALSYM SHARE_INFO_1501}
+ TShareInfo1501 = SHARE_INFO_1501;
+ PShareInfo1501 = PSHARE_INFO_1501;
+
+//
+// Special Values and Constants - Share
+//
+
+//
+// Values for parm_err parameter.
+//
+
+const
+ SHARE_NETNAME_PARMNUM = 1;
+ {$EXTERNALSYM SHARE_NETNAME_PARMNUM}
+ SHARE_TYPE_PARMNUM = 3;
+ {$EXTERNALSYM SHARE_TYPE_PARMNUM}
+ SHARE_REMARK_PARMNUM = 4;
+ {$EXTERNALSYM SHARE_REMARK_PARMNUM}
+ SHARE_PERMISSIONS_PARMNUM = 5;
+ {$EXTERNALSYM SHARE_PERMISSIONS_PARMNUM}
+ SHARE_MAX_USES_PARMNUM = 6;
+ {$EXTERNALSYM SHARE_MAX_USES_PARMNUM}
+ SHARE_CURRENT_USES_PARMNUM = 7;
+ {$EXTERNALSYM SHARE_CURRENT_USES_PARMNUM}
+ SHARE_PATH_PARMNUM = 8;
+ {$EXTERNALSYM SHARE_PATH_PARMNUM}
+ SHARE_PASSWD_PARMNUM = 9;
+ {$EXTERNALSYM SHARE_PASSWD_PARMNUM}
+ SHARE_FILE_SD_PARMNUM = 501;
+ {$EXTERNALSYM SHARE_FILE_SD_PARMNUM}
+
+//
+// Single-field infolevels for NetShareSetInfo.
+//
+
+ SHARE_REMARK_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SHARE_REMARK_PARMNUM;
+ {$EXTERNALSYM SHARE_REMARK_INFOLEVEL}
+ SHARE_MAX_USES_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SHARE_MAX_USES_PARMNUM;
+ {$EXTERNALSYM SHARE_MAX_USES_INFOLEVEL}
+ SHARE_FILE_SD_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + SHARE_FILE_SD_PARMNUM;
+ {$EXTERNALSYM SHARE_FILE_SD_INFOLEVEL}
+
+ SHI1_NUM_ELEMENTS = 4;
+ {$EXTERNALSYM SHI1_NUM_ELEMENTS}
+ SHI2_NUM_ELEMENTS = 10;
+ {$EXTERNALSYM SHI2_NUM_ELEMENTS}
+
+//
+// Share types (shi1_type and shi2_type fields).
+//
+
+ STYPE_DISKTREE = 0;
+ {$EXTERNALSYM STYPE_DISKTREE}
+ STYPE_PRINTQ = 1;
+ {$EXTERNALSYM STYPE_PRINTQ}
+ STYPE_DEVICE = 2;
+ {$EXTERNALSYM STYPE_DEVICE}
+ STYPE_IPC = 3;
+ {$EXTERNALSYM STYPE_IPC}
+
+ STYPE_TEMPORARY = $40000000;
+ {$EXTERNALSYM STYPE_TEMPORARY}
+ STYPE_SPECIAL = DWORD($80000000);
+ {$EXTERNALSYM STYPE_SPECIAL}
+
+ SHI_USES_UNLIMITED = DWORD(-1);
+ {$EXTERNALSYM SHI_USES_UNLIMITED}
+
+//
+// Flags values for the 501 and 1005 levels
+//
+
+ SHI1005_FLAGS_DFS = $01; // Share is in the DFS
+ {$EXTERNALSYM SHI1005_FLAGS_DFS}
+ SHI1005_FLAGS_DFS_ROOT = $02; // Share is root of DFS
+ {$EXTERNALSYM SHI1005_FLAGS_DFS_ROOT}
+
+ CSC_MASK = $30; // Used to mask off the following states
+ {$EXTERNALSYM CSC_MASK}
+
+ CSC_CACHE_MANUAL_REINT = $00; // No automatic file by file reintegration
+ {$EXTERNALSYM CSC_CACHE_MANUAL_REINT}
+ CSC_CACHE_AUTO_REINT = $10; // File by file reintegration is OK
+ {$EXTERNALSYM CSC_CACHE_AUTO_REINT}
+ CSC_CACHE_VDO = $20; // no need to flow opens
+ {$EXTERNALSYM CSC_CACHE_VDO}
+ CSC_CACHE_NONE = $30; // no CSC for this share
+ {$EXTERNALSYM CSC_CACHE_NONE}
+
+ SHI1005_FLAGS_RESTRICT_EXCLUSIVE_OPENS = $0100; // Used to disallow read-deny read behavior
+ {$EXTERNALSYM SHI1005_FLAGS_RESTRICT_EXCLUSIVE_OPENS}
+ SHI1005_FLAGS_FORCE_SHARED_DELETE = $0200; // Used to allows force shared delete
+ {$EXTERNALSYM SHI1005_FLAGS_FORCE_SHARED_DELETE}
+ SHI1005_FLAGS_ALLOW_NAMESPACE_CACHING = $0400; // The clients may cache the namespace
+ {$EXTERNALSYM SHI1005_FLAGS_ALLOW_NAMESPACE_CACHING}
+
+//
+// The subset of 1005 infolevel flags that can be set via the API
+//
+
+ SHI1005_VALID_FLAGS_SET = CSC_MASK or SHI1005_FLAGS_RESTRICT_EXCLUSIVE_OPENS or SHI1005_FLAGS_FORCE_SHARED_DELETE or SHI1005_FLAGS_ALLOW_NAMESPACE_CACHING;
+ {$EXTERNALSYM SHI1005_VALID_FLAGS_SET}
+
+//
+// SESSION API
+//
+
+//
+// Function Prototypes Session
+//
+
+function NetSessionEnum(servername, UncClientName, username: LMSTR; level: DWORD; var bufptr: LPBYTE; prefmaxlen: DWORD; entriesread, totalentries, resume_handle: LPDWORD): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetSessionEnum}
+
+function NetSessionDel(servername, UncClientName, username: LMSTR): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetSessionDel}
+
+function NetSessionGetInfo(servername, UncClientName, username: LMSTR; level: DWORD; var bufptr: LPBYTE): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetSessionGetInfo}
+
+//
+// Data Structures - Session
+//
+
+type
+ LPSESSION_INFO_0 = ^SESSION_INFO_0;
+ {$EXTERNALSYM LPSESSION_INFO_0}
+ PSESSION_INFO_0 = ^SESSION_INFO_0;
+ {$EXTERNALSYM PSESSION_INFO_0}
+ _SESSION_INFO_0 = record
+ sesi0_cname: LMSTR; // client name (no backslashes)
+ end;
+ {$EXTERNALSYM _SESSION_INFO_0}
+ SESSION_INFO_0 = _SESSION_INFO_0;
+ {$EXTERNALSYM SESSION_INFO_0}
+ TSessionInfo0 = SESSION_INFO_0;
+ PSessionInfo0 = PSESSION_INFO_0;
+
+ LPSESSION_INFO_1 = ^SESSION_INFO_1;
+ {$EXTERNALSYM LPSESSION_INFO_1}
+ PSESSION_INFO_1 = ^SESSION_INFO_1;
+ {$EXTERNALSYM PSESSION_INFO_1}
+ _SESSION_INFO_1 = record
+ sesi1_cname: LMSTR; // client name (no backslashes)
+ sesi1_username: LMSTR;
+ sesi1_num_opens: DWORD;
+ sesi1_time: DWORD;
+ sesi1_idle_time: DWORD;
+ sesi1_user_flags: DWORD;
+ end;
+ {$EXTERNALSYM _SESSION_INFO_1}
+ SESSION_INFO_1 = _SESSION_INFO_1;
+ {$EXTERNALSYM SESSION_INFO_1}
+ TSessionInfo1 = SESSION_INFO_1;
+ PSessionInfo1 = PSESSION_INFO_1;
+
+ LPSESSION_INFO_2 = ^SESSION_INFO_2;
+ {$EXTERNALSYM LPSESSION_INFO_2}
+ PSESSION_INFO_2 = ^SESSION_INFO_2;
+ {$EXTERNALSYM PSESSION_INFO_2}
+ _SESSION_INFO_2 = record
+ sesi2_cname: LMSTR; // client name (no backslashes)
+ sesi2_username: LMSTR;
+ sesi2_num_opens: DWORD;
+ sesi2_time: DWORD;
+ sesi2_idle_time: DWORD;
+ sesi2_user_flags: DWORD;
+ sesi2_cltype_name: LMSTR;
+ end;
+ {$EXTERNALSYM _SESSION_INFO_2}
+ SESSION_INFO_2 = _SESSION_INFO_2;
+ {$EXTERNALSYM SESSION_INFO_2}
+ TSessionInfo2 = SESSION_INFO_2;
+ PSessionInfo2 = PSESSION_INFO_2;
+
+ LPSESSION_INFO_10 = ^SESSION_INFO_10;
+ {$EXTERNALSYM LPSESSION_INFO_10}
+ PSESSION_INFO_10 = ^SESSION_INFO_10;
+ {$EXTERNALSYM PSESSION_INFO_10}
+ _SESSION_INFO_10 = record
+ sesi10_cname: LMSTR; // client name (no backslashes)
+ sesi10_username: LMSTR;
+ sesi10_time: DWORD;
+ sesi10_idle_time: DWORD;
+ end;
+ {$EXTERNALSYM _SESSION_INFO_10}
+ SESSION_INFO_10 = _SESSION_INFO_10;
+ {$EXTERNALSYM SESSION_INFO_10}
+ TSessionInfo10 = SESSION_INFO_10;
+ PSessionInfo10 = PSESSION_INFO_10;
+
+ LPSESSION_INFO_502 = ^SESSION_INFO_502;
+ {$EXTERNALSYM LPSESSION_INFO_502}
+ PSESSION_INFO_502 = ^SESSION_INFO_502;
+ {$EXTERNALSYM PSESSION_INFO_502}
+ _SESSION_INFO_502 = record
+ sesi502_cname: LMSTR; // client name (no backslashes)
+ sesi502_username: LMSTR;
+ sesi502_num_opens: DWORD;
+ sesi502_time: DWORD;
+ sesi502_idle_time: DWORD;
+ sesi502_user_flags: DWORD;
+ sesi502_cltype_name: LMSTR;
+ sesi502_transport: LMSTR;
+ end;
+ {$EXTERNALSYM _SESSION_INFO_502}
+ SESSION_INFO_502 = _SESSION_INFO_502;
+ {$EXTERNALSYM SESSION_INFO_502}
+ TSessionInfo502 = SESSION_INFO_502;
+ PSessionInfo502 = PSESSION_INFO_502;
+
+//
+// Special Values and Constants - Session
+//
+
+//
+// Bits defined in sesi1_user_flags.
+//
+
+const
+ SESS_GUEST = $00000001; // session is logged on as a guest
+ {$EXTERNALSYM SESS_GUEST}
+ SESS_NOENCRYPTION = $00000002; // session is not using encryption
+ {$EXTERNALSYM SESS_NOENCRYPTION}
+
+ SESI1_NUM_ELEMENTS = 8;
+ {$EXTERNALSYM SESI1_NUM_ELEMENTS}
+ SESI2_NUM_ELEMENTS = 9;
+ {$EXTERNALSYM SESI2_NUM_ELEMENTS}
+
+//
+// CONNECTION API
+//
+
+//
+// Function Prototypes - CONNECTION
+//
+
+function NetConnectionEnum(servername, qualifier: LMSTR; level: DWORD; var bufptr: LPBYTE; prefmaxlen: DWORD; entriesread, totalentries, resume_handle: LPDWORD): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetConnectionEnum}
+
+//
+// Data Structures - CONNECTION
+//
+
+type
+ LPCONNECTION_INFO_0 = ^CONNECTION_INFO_0;
+ {$EXTERNALSYM LPCONNECTION_INFO_0}
+ PCONNECTION_INFO_0 = ^CONNECTION_INFO_0;
+ {$EXTERNALSYM PCONNECTION_INFO_0}
+ _CONNECTION_INFO_0 = record
+ coni0_id: DWORD;
+ end;
+ {$EXTERNALSYM _CONNECTION_INFO_0}
+ CONNECTION_INFO_0 = _CONNECTION_INFO_0;
+ {$EXTERNALSYM CONNECTION_INFO_0}
+ TConnectionInfo0 = CONNECTION_INFO_0;
+ PConnectionInfo0 = PCONNECTION_INFO_0;
+
+ LPCONNECTION_INFO_1 = ^CONNECTION_INFO_1;
+ {$EXTERNALSYM LPCONNECTION_INFO_1}
+ PCONNECTION_INFO_1 = ^CONNECTION_INFO_1;
+ {$EXTERNALSYM PCONNECTION_INFO_1}
+ _CONNECTION_INFO_1 = record
+ coni1_id: DWORD;
+ coni1_type: DWORD;
+ coni1_num_opens: DWORD;
+ coni1_num_users: DWORD;
+ coni1_time: DWORD;
+ coni1_username: LMSTR;
+ coni1_netname: LMSTR;
+ end;
+ {$EXTERNALSYM _CONNECTION_INFO_1}
+ CONNECTION_INFO_1 = _CONNECTION_INFO_1;
+ {$EXTERNALSYM CONNECTION_INFO_1}
+ TConnectionInfo1 = CONNECTION_INFO_1;
+ PConnectionInfo1 = PCONNECTION_INFO_1;
+
+//
+// FILE API
+//
+
+//
+// Function Prototypes - FILE
+//
+
+function NetFileClose(servername: LMSTR; fileid: DWORD): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetFileClose}
+
+function NetFileEnum(servername, basepath, username: LMSTR; level: DWORD; var bufptr: LPBYTE; prefmaxlen: DWORD; entriesread, totalentries, resume_handle: PDWORD_PTR): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetFileEnum}
+
+function NetFileGetInfo(servername: LMSTR; fileid, level: DWORD; var bufptr: LPBYTE): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetFileGetInfo}
+
+//
+// Data Structures - File
+//
+
+// File APIs are available at information levels 2 & 3 only. Levels 0 &
+// 1 are not supported.
+//
+
+type
+ LPFILE_INFO_2 = ^FILE_INFO_2;
+ {$EXTERNALSYM LPFILE_INFO_2}
+ PFILE_INFO_2 = ^FILE_INFO_2;
+ {$EXTERNALSYM PFILE_INFO_2}
+ _FILE_INFO_2 = record
+ fi2_id: DWORD;
+ end;
+ {$EXTERNALSYM _FILE_INFO_2}
+ FILE_INFO_2 = _FILE_INFO_2;
+ {$EXTERNALSYM FILE_INFO_2}
+ TFileInfo2 = FILE_INFO_2;
+ PFileInfo2 = PFILE_INFO_2;
+
+ LPFILE_INFO_3 = ^FILE_INFO_3;
+ {$EXTERNALSYM LPFILE_INFO_3}
+ PFILE_INFO_3 = ^FILE_INFO_3;
+ {$EXTERNALSYM PFILE_INFO_3}
+ _FILE_INFO_3 = record
+ fi3_id: DWORD;
+ fi3_permissions: DWORD;
+ fi3_num_locks: DWORD;
+ fi3_pathname: LMSTR;
+ fi3_username: LMSTR;
+ end;
+ {$EXTERNALSYM _FILE_INFO_3}
+ FILE_INFO_3 = _FILE_INFO_3;
+ {$EXTERNALSYM FILE_INFO_3}
+ TFileInfo3 = FILE_INFO_3;
+ PFileInfo3 = PFILE_INFO_3;
+
+//
+// Special Values and Constants - File
+//
+
+//
+// bit values for permissions
+//
+
+const
+ PERM_FILE_READ = $1; // user has read access
+ {$EXTERNALSYM PERM_FILE_READ}
+ PERM_FILE_WRITE = $2; // user has write access
+ {$EXTERNALSYM PERM_FILE_WRITE}
+ PERM_FILE_CREATE = $4; // user has create access
+ {$EXTERNALSYM PERM_FILE_CREATE}
+
+implementation
+
+{$IFDEF DYNAMIC_LINK}
+
+var
+ _NetShareAdd: Pointer;
+
+function NetShareAdd;
+begin
+ GetProcedureAddress(_NetShareAdd, netapi32, 'NetShareAdd');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetShareAdd]
+ end;
+end;
+
+var
+ _NetShareEnum: Pointer;
+
+function NetShareEnum;
+begin
+ GetProcedureAddress(_NetShareEnum, netapi32, 'NetShareEnum');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetShareEnum]
+ end;
+end;
+
+var
+ _NetShareEnumSticky: Pointer;
+
+function NetShareEnumSticky;
+begin
+ GetProcedureAddress(_NetShareEnumSticky, netapi32, 'NetShareEnumSticky');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetShareEnumSticky]
+ end;
+end;
+
+var
+ _NetShareGetInfo: Pointer;
+
+function NetShareGetInfo;
+begin
+ GetProcedureAddress(_NetShareGetInfo, netapi32, 'NetShareGetInfo');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetShareGetInfo]
+ end;
+end;
+
+var
+ _NetShareSetInfo: Pointer;
+
+function NetShareSetInfo;
+begin
+ GetProcedureAddress(_NetShareSetInfo, netapi32, 'NetShareSetInfo');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetShareSetInfo]
+ end;
+end;
+
+var
+ _NetShareDel: Pointer;
+
+function NetShareDel;
+begin
+ GetProcedureAddress(_NetShareDel, netapi32, 'NetShareDel');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetShareDel]
+ end;
+end;
+
+var
+ _NetShareDelSticky: Pointer;
+
+function NetShareDelSticky;
+begin
+ GetProcedureAddress(_NetShareDelSticky, netapi32, 'NetShareDelSticky');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetShareDelSticky]
+ end;
+end;
+
+var
+ _NetShareCheck: Pointer;
+
+function NetShareCheck;
+begin
+ GetProcedureAddress(_NetShareCheck, netapi32, 'NetShareCheck');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetShareCheck]
+ end;
+end;
+
+var
+ _NetSessionEnum: Pointer;
+
+function NetSessionEnum;
+begin
+ GetProcedureAddress(_NetSessionEnum, netapi32, 'NetSessionEnum');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetSessionEnum]
+ end;
+end;
+
+var
+ _NetSessionDel: Pointer;
+
+function NetSessionDel;
+begin
+ GetProcedureAddress(_NetSessionDel, netapi32, 'NetSessionDel');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetSessionDel]
+ end;
+end;
+
+var
+ _NetSessionGetInfo: Pointer;
+
+function NetSessionGetInfo;
+begin
+ GetProcedureAddress(_NetSessionGetInfo, netapi32, 'NetSessionGetInfo');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetSessionGetInfo]
+ end;
+end;
+
+var
+ _NetConnectionEnum: Pointer;
+
+function NetConnectionEnum;
+begin
+ GetProcedureAddress(_NetConnectionEnum, netapi32, 'NetConnectionEnum');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetConnectionEnum]
+ end;
+end;
+
+var
+ _NetFileClose: Pointer;
+
+function NetFileClose;
+begin
+ GetProcedureAddress(_NetFileClose, netapi32, 'NetFileClose');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetFileClose]
+ end;
+end;
+
+var
+ _NetFileEnum: Pointer;
+
+function NetFileEnum;
+begin
+ GetProcedureAddress(_NetFileEnum, netapi32, 'NetFileEnum');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetFileEnum]
+ end;
+end;
+
+var
+ _NetFileGetInfo: Pointer;
+
+function NetFileGetInfo;
+begin
+ GetProcedureAddress(_NetFileGetInfo, netapi32, 'NetFileGetInfo');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetFileGetInfo]
+ end;
+end;
+
+{$ELSE}
+
+function NetShareAdd; external netapi32 name 'NetShareAdd';
+function NetShareEnum; external netapi32 name 'NetShareEnum';
+function NetShareEnumSticky; external netapi32 name 'NetShareEnumSticky';
+function NetShareGetInfo; external netapi32 name 'NetShareGetInfo';
+function NetShareSetInfo; external netapi32 name 'NetShareSetInfo';
+function NetShareDel; external netapi32 name 'NetShareDel';
+function NetShareDelSticky; external netapi32 name 'NetShareDelSticky';
+function NetShareCheck; external netapi32 name 'NetShareCheck';
+function NetSessionEnum; external netapi32 name 'NetSessionEnum';
+function NetSessionDel; external netapi32 name 'NetSessionDel';
+function NetSessionGetInfo; external netapi32 name 'NetSessionGetInfo';
+function NetConnectionEnum; external netapi32 name 'NetConnectionEnum';
+function NetFileClose; external netapi32 name 'NetFileClose';
+function NetFileEnum; external netapi32 name 'NetFileEnum';
+function NetFileGetInfo; external netapi32 name 'NetFileGetInfo';
+
+{$ENDIF DYNAMIC_LINK}
+
+end.
diff --git a/packages/extra/winunits/jwalmsname.pas b/packages/extra/winunits/jwalmsname.pas
index 6e0d20bdc0..4f6c9536ed 100644
--- a/packages/extra/winunits/jwalmsname.pas
+++ b/packages/extra/winunits/jwalmsname.pas
@@ -1,231 +1,231 @@
-{******************************************************************************}
-{ }
-{ Lan Manager Service Names API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: lmsname.h, released November 2001. The original Pascal }
-{ code is: LmSName.pas, released Februari 2002. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwalmsname.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaLmSName;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "lmsname.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaWinType;
-
-//
-// Standard LAN Manager service names.
-//
-
-const
- SERVICE_WORKSTATION = TEXT('LanmanWorkstation');
- {$EXTERNALSYM SERVICE_WORKSTATION}
- SERVICE_LM20_WORKSTATION = TEXT('WORKSTATION');
- {$EXTERNALSYM SERVICE_LM20_WORKSTATION}
- WORKSTATION_DISPLAY_NAME = TEXT('Workstation');
- {$EXTERNALSYM WORKSTATION_DISPLAY_NAME}
-
- SERVICE_SERVER = TEXT('LanmanServer');
- {$EXTERNALSYM SERVICE_SERVER}
- SERVICE_LM20_SERVER = TEXT('SERVER');
- {$EXTERNALSYM SERVICE_LM20_SERVER}
- SERVER_DISPLAY_NAME = TEXT('Server');
- {$EXTERNALSYM SERVER_DISPLAY_NAME}
-
- SERVICE_BROWSER = TEXT('BROWSER');
- {$EXTERNALSYM SERVICE_BROWSER}
- SERVICE_LM20_BROWSER = SERVICE_BROWSER;
- {$EXTERNALSYM SERVICE_LM20_BROWSER}
-
- SERVICE_MESSENGER = TEXT('MESSENGER');
- {$EXTERNALSYM SERVICE_MESSENGER}
- SERVICE_LM20_MESSENGER = SERVICE_MESSENGER;
- {$EXTERNALSYM SERVICE_LM20_MESSENGER}
-
- SERVICE_NETRUN = TEXT('NETRUN');
- {$EXTERNALSYM SERVICE_NETRUN}
- SERVICE_LM20_NETRUN = SERVICE_NETRUN;
- {$EXTERNALSYM SERVICE_LM20_NETRUN}
-
- SERVICE_SPOOLER = TEXT('SPOOLER');
- {$EXTERNALSYM SERVICE_SPOOLER}
- SERVICE_LM20_SPOOLER = SERVICE_SPOOLER;
- {$EXTERNALSYM SERVICE_LM20_SPOOLER}
-
- SERVICE_ALERTER = TEXT('ALERTER');
- {$EXTERNALSYM SERVICE_ALERTER}
- SERVICE_LM20_ALERTER = SERVICE_ALERTER;
- {$EXTERNALSYM SERVICE_LM20_ALERTER}
-
- SERVICE_NETLOGON = TEXT('NETLOGON');
- {$EXTERNALSYM SERVICE_NETLOGON}
- SERVICE_LM20_NETLOGON = SERVICE_NETLOGON;
- {$EXTERNALSYM SERVICE_LM20_NETLOGON}
-
- SERVICE_NETPOPUP = TEXT('NETPOPUP');
- {$EXTERNALSYM SERVICE_NETPOPUP}
- SERVICE_LM20_NETPOPUP = SERVICE_NETPOPUP;
- {$EXTERNALSYM SERVICE_LM20_NETPOPUP}
-
- SERVICE_SQLSERVER = TEXT('SQLSERVER');
- {$EXTERNALSYM SERVICE_SQLSERVER}
- SERVICE_LM20_SQLSERVER = SERVICE_SQLSERVER;
- {$EXTERNALSYM SERVICE_LM20_SQLSERVER}
-
- SERVICE_REPL = TEXT('REPLICATOR');
- {$EXTERNALSYM SERVICE_REPL}
- SERVICE_LM20_REPL = SERVICE_REPL;
- {$EXTERNALSYM SERVICE_LM20_REPL}
-
- SERVICE_RIPL = TEXT('REMOTEBOOT');
- {$EXTERNALSYM SERVICE_RIPL}
- SERVICE_LM20_RIPL = SERVICE_RIPL;
- {$EXTERNALSYM SERVICE_LM20_RIPL}
-
- SERVICE_TIMESOURCE = TEXT('TIMESOURCE');
- {$EXTERNALSYM SERVICE_TIMESOURCE}
- SERVICE_LM20_TIMESOURCE = SERVICE_TIMESOURCE;
- {$EXTERNALSYM SERVICE_LM20_TIMESOURCE}
-
- SERVICE_AFP = TEXT('AFP');
- {$EXTERNALSYM SERVICE_AFP}
- SERVICE_LM20_AFP = SERVICE_AFP;
- {$EXTERNALSYM SERVICE_LM20_AFP}
-
- SERVICE_UPS = TEXT('UPS');
- {$EXTERNALSYM SERVICE_UPS}
- SERVICE_LM20_UPS = SERVICE_UPS;
- {$EXTERNALSYM SERVICE_LM20_UPS}
-
- SERVICE_XACTSRV = TEXT('XACTSRV');
- {$EXTERNALSYM SERVICE_XACTSRV}
- SERVICE_LM20_XACTSRV = SERVICE_XACTSRV;
- {$EXTERNALSYM SERVICE_LM20_XACTSRV}
-
- SERVICE_TCPIP = TEXT('TCPIP');
- {$EXTERNALSYM SERVICE_TCPIP}
- SERVICE_LM20_TCPIP = SERVICE_TCPIP;
- {$EXTERNALSYM SERVICE_LM20_TCPIP}
-
- SERVICE_NBT = TEXT('NBT');
- {$EXTERNALSYM SERVICE_NBT}
- SERVICE_LM20_NBT = SERVICE_NBT;
- {$EXTERNALSYM SERVICE_LM20_NBT}
-
- SERVICE_LMHOSTS = TEXT('LMHOSTS');
- {$EXTERNALSYM SERVICE_LMHOSTS}
- SERVICE_LM20_LMHOSTS = SERVICE_LMHOSTS;
- {$EXTERNALSYM SERVICE_LM20_LMHOSTS}
-
- SERVICE_TELNET = TEXT('Telnet');
- {$EXTERNALSYM SERVICE_TELNET}
- SERVICE_LM20_TELNET = SERVICE_TELNET;
- {$EXTERNALSYM SERVICE_LM20_TELNET}
-
- SERVICE_SCHEDULE = TEXT('Schedule');
- {$EXTERNALSYM SERVICE_SCHEDULE}
- SERVICE_LM20_SCHEDULE = SERVICE_SCHEDULE;
- {$EXTERNALSYM SERVICE_LM20_SCHEDULE}
-
- SERVICE_NTLMSSP = TEXT('NtLmSsp');
- {$EXTERNALSYM SERVICE_NTLMSSP}
-
- SERVICE_DHCP = TEXT('DHCP');
- {$EXTERNALSYM SERVICE_DHCP}
- SERVICE_LM20_DHCP = SERVICE_DHCP;
- {$EXTERNALSYM SERVICE_LM20_DHCP}
-
- SERVICE_NWSAP = TEXT('NwSapAgent');
- {$EXTERNALSYM SERVICE_NWSAP}
- SERVICE_LM20_NWSAP = SERVICE_NWSAP;
- {$EXTERNALSYM SERVICE_LM20_NWSAP}
- NWSAP_DISPLAY_NAME = TEXT('NW Sap Agent');
- {$EXTERNALSYM NWSAP_DISPLAY_NAME}
-
- SERVICE_NWCS = TEXT('NWCWorkstation');
- {$EXTERNALSYM SERVICE_NWCS}
- SERVICE_DNS_CACHE = TEXT('DnsCache');
- {$EXTERNALSYM SERVICE_DNS_CACHE}
-
- SERVICE_W32TIME = TEXT('w32time');
- {$EXTERNALSYM SERVICE_W32TIME}
- SERVCE_LM20_W32TIME = SERVICE_W32TIME;
- {$EXTERNALSYM SERVCE_LM20_W32TIME}
-
- SERVICE_KDC = TEXT('kdc');
- {$EXTERNALSYM SERVICE_KDC}
- SERVICE_LM20_KDC = SERVICE_KDC;
- {$EXTERNALSYM SERVICE_LM20_KDC}
-
- SERVICE_RPCLOCATOR = TEXT('RPCLOCATOR');
- {$EXTERNALSYM SERVICE_RPCLOCATOR}
- SERVICE_LM20_RPCLOCATOR = SERVICE_RPCLOCATOR;
- {$EXTERNALSYM SERVICE_LM20_RPCLOCATOR}
-
- SERVICE_TRKSVR = TEXT('TrkSvr');
- {$EXTERNALSYM SERVICE_TRKSVR}
- SERVICE_LM20_TRKSVR = SERVICE_TRKSVR;
- {$EXTERNALSYM SERVICE_LM20_TRKSVR}
-
- SERVICE_TRKWKS = TEXT('TrkWks');
- {$EXTERNALSYM SERVICE_TRKWKS}
- SERVICE_LM20_TRKWKS = SERVICE_TRKWKS;
- {$EXTERNALSYM SERVICE_LM20_TRKWKS}
-
- SERVICE_NTFRS = TEXT('NtFrs');
- {$EXTERNALSYM SERVICE_NTFRS}
- SERVICE_LM20_NTFRS = SERVICE_NTFRS;
- {$EXTERNALSYM SERVICE_LM20_NTFRS}
-
- SERVICE_ISMSERV = TEXT('IsmServ');
- {$EXTERNALSYM SERVICE_ISMSERV}
- SERVICE_LM20_ISMSERV = SERVICE_ISMSERV;
- {$EXTERNALSYM SERVICE_LM20_ISMSERV}
-
-implementation
-
-end.
+{******************************************************************************}
+{ }
+{ Lan Manager Service Names API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: lmsname.h, released November 2001. The original Pascal }
+{ code is: LmSName.pas, released Februari 2002. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwalmsname.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaLmSName;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "lmsname.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaWinType;
+
+//
+// Standard LAN Manager service names.
+//
+
+const
+ SERVICE_WORKSTATION = TEXT('LanmanWorkstation');
+ {$EXTERNALSYM SERVICE_WORKSTATION}
+ SERVICE_LM20_WORKSTATION = TEXT('WORKSTATION');
+ {$EXTERNALSYM SERVICE_LM20_WORKSTATION}
+ WORKSTATION_DISPLAY_NAME = TEXT('Workstation');
+ {$EXTERNALSYM WORKSTATION_DISPLAY_NAME}
+
+ SERVICE_SERVER = TEXT('LanmanServer');
+ {$EXTERNALSYM SERVICE_SERVER}
+ SERVICE_LM20_SERVER = TEXT('SERVER');
+ {$EXTERNALSYM SERVICE_LM20_SERVER}
+ SERVER_DISPLAY_NAME = TEXT('Server');
+ {$EXTERNALSYM SERVER_DISPLAY_NAME}
+
+ SERVICE_BROWSER = TEXT('BROWSER');
+ {$EXTERNALSYM SERVICE_BROWSER}
+ SERVICE_LM20_BROWSER = SERVICE_BROWSER;
+ {$EXTERNALSYM SERVICE_LM20_BROWSER}
+
+ SERVICE_MESSENGER = TEXT('MESSENGER');
+ {$EXTERNALSYM SERVICE_MESSENGER}
+ SERVICE_LM20_MESSENGER = SERVICE_MESSENGER;
+ {$EXTERNALSYM SERVICE_LM20_MESSENGER}
+
+ SERVICE_NETRUN = TEXT('NETRUN');
+ {$EXTERNALSYM SERVICE_NETRUN}
+ SERVICE_LM20_NETRUN = SERVICE_NETRUN;
+ {$EXTERNALSYM SERVICE_LM20_NETRUN}
+
+ SERVICE_SPOOLER = TEXT('SPOOLER');
+ {$EXTERNALSYM SERVICE_SPOOLER}
+ SERVICE_LM20_SPOOLER = SERVICE_SPOOLER;
+ {$EXTERNALSYM SERVICE_LM20_SPOOLER}
+
+ SERVICE_ALERTER = TEXT('ALERTER');
+ {$EXTERNALSYM SERVICE_ALERTER}
+ SERVICE_LM20_ALERTER = SERVICE_ALERTER;
+ {$EXTERNALSYM SERVICE_LM20_ALERTER}
+
+ SERVICE_NETLOGON = TEXT('NETLOGON');
+ {$EXTERNALSYM SERVICE_NETLOGON}
+ SERVICE_LM20_NETLOGON = SERVICE_NETLOGON;
+ {$EXTERNALSYM SERVICE_LM20_NETLOGON}
+
+ SERVICE_NETPOPUP = TEXT('NETPOPUP');
+ {$EXTERNALSYM SERVICE_NETPOPUP}
+ SERVICE_LM20_NETPOPUP = SERVICE_NETPOPUP;
+ {$EXTERNALSYM SERVICE_LM20_NETPOPUP}
+
+ SERVICE_SQLSERVER = TEXT('SQLSERVER');
+ {$EXTERNALSYM SERVICE_SQLSERVER}
+ SERVICE_LM20_SQLSERVER = SERVICE_SQLSERVER;
+ {$EXTERNALSYM SERVICE_LM20_SQLSERVER}
+
+ SERVICE_REPL = TEXT('REPLICATOR');
+ {$EXTERNALSYM SERVICE_REPL}
+ SERVICE_LM20_REPL = SERVICE_REPL;
+ {$EXTERNALSYM SERVICE_LM20_REPL}
+
+ SERVICE_RIPL = TEXT('REMOTEBOOT');
+ {$EXTERNALSYM SERVICE_RIPL}
+ SERVICE_LM20_RIPL = SERVICE_RIPL;
+ {$EXTERNALSYM SERVICE_LM20_RIPL}
+
+ SERVICE_TIMESOURCE = TEXT('TIMESOURCE');
+ {$EXTERNALSYM SERVICE_TIMESOURCE}
+ SERVICE_LM20_TIMESOURCE = SERVICE_TIMESOURCE;
+ {$EXTERNALSYM SERVICE_LM20_TIMESOURCE}
+
+ SERVICE_AFP = TEXT('AFP');
+ {$EXTERNALSYM SERVICE_AFP}
+ SERVICE_LM20_AFP = SERVICE_AFP;
+ {$EXTERNALSYM SERVICE_LM20_AFP}
+
+ SERVICE_UPS = TEXT('UPS');
+ {$EXTERNALSYM SERVICE_UPS}
+ SERVICE_LM20_UPS = SERVICE_UPS;
+ {$EXTERNALSYM SERVICE_LM20_UPS}
+
+ SERVICE_XACTSRV = TEXT('XACTSRV');
+ {$EXTERNALSYM SERVICE_XACTSRV}
+ SERVICE_LM20_XACTSRV = SERVICE_XACTSRV;
+ {$EXTERNALSYM SERVICE_LM20_XACTSRV}
+
+ SERVICE_TCPIP = TEXT('TCPIP');
+ {$EXTERNALSYM SERVICE_TCPIP}
+ SERVICE_LM20_TCPIP = SERVICE_TCPIP;
+ {$EXTERNALSYM SERVICE_LM20_TCPIP}
+
+ SERVICE_NBT = TEXT('NBT');
+ {$EXTERNALSYM SERVICE_NBT}
+ SERVICE_LM20_NBT = SERVICE_NBT;
+ {$EXTERNALSYM SERVICE_LM20_NBT}
+
+ SERVICE_LMHOSTS = TEXT('LMHOSTS');
+ {$EXTERNALSYM SERVICE_LMHOSTS}
+ SERVICE_LM20_LMHOSTS = SERVICE_LMHOSTS;
+ {$EXTERNALSYM SERVICE_LM20_LMHOSTS}
+
+ SERVICE_TELNET = TEXT('Telnet');
+ {$EXTERNALSYM SERVICE_TELNET}
+ SERVICE_LM20_TELNET = SERVICE_TELNET;
+ {$EXTERNALSYM SERVICE_LM20_TELNET}
+
+ SERVICE_SCHEDULE = TEXT('Schedule');
+ {$EXTERNALSYM SERVICE_SCHEDULE}
+ SERVICE_LM20_SCHEDULE = SERVICE_SCHEDULE;
+ {$EXTERNALSYM SERVICE_LM20_SCHEDULE}
+
+ SERVICE_NTLMSSP = TEXT('NtLmSsp');
+ {$EXTERNALSYM SERVICE_NTLMSSP}
+
+ SERVICE_DHCP = TEXT('DHCP');
+ {$EXTERNALSYM SERVICE_DHCP}
+ SERVICE_LM20_DHCP = SERVICE_DHCP;
+ {$EXTERNALSYM SERVICE_LM20_DHCP}
+
+ SERVICE_NWSAP = TEXT('NwSapAgent');
+ {$EXTERNALSYM SERVICE_NWSAP}
+ SERVICE_LM20_NWSAP = SERVICE_NWSAP;
+ {$EXTERNALSYM SERVICE_LM20_NWSAP}
+ NWSAP_DISPLAY_NAME = TEXT('NW Sap Agent');
+ {$EXTERNALSYM NWSAP_DISPLAY_NAME}
+
+ SERVICE_NWCS = TEXT('NWCWorkstation');
+ {$EXTERNALSYM SERVICE_NWCS}
+ SERVICE_DNS_CACHE = TEXT('DnsCache');
+ {$EXTERNALSYM SERVICE_DNS_CACHE}
+
+ SERVICE_W32TIME = TEXT('w32time');
+ {$EXTERNALSYM SERVICE_W32TIME}
+ SERVCE_LM20_W32TIME = SERVICE_W32TIME;
+ {$EXTERNALSYM SERVCE_LM20_W32TIME}
+
+ SERVICE_KDC = TEXT('kdc');
+ {$EXTERNALSYM SERVICE_KDC}
+ SERVICE_LM20_KDC = SERVICE_KDC;
+ {$EXTERNALSYM SERVICE_LM20_KDC}
+
+ SERVICE_RPCLOCATOR = TEXT('RPCLOCATOR');
+ {$EXTERNALSYM SERVICE_RPCLOCATOR}
+ SERVICE_LM20_RPCLOCATOR = SERVICE_RPCLOCATOR;
+ {$EXTERNALSYM SERVICE_LM20_RPCLOCATOR}
+
+ SERVICE_TRKSVR = TEXT('TrkSvr');
+ {$EXTERNALSYM SERVICE_TRKSVR}
+ SERVICE_LM20_TRKSVR = SERVICE_TRKSVR;
+ {$EXTERNALSYM SERVICE_LM20_TRKSVR}
+
+ SERVICE_TRKWKS = TEXT('TrkWks');
+ {$EXTERNALSYM SERVICE_TRKWKS}
+ SERVICE_LM20_TRKWKS = SERVICE_TRKWKS;
+ {$EXTERNALSYM SERVICE_LM20_TRKWKS}
+
+ SERVICE_NTFRS = TEXT('NtFrs');
+ {$EXTERNALSYM SERVICE_NTFRS}
+ SERVICE_LM20_NTFRS = SERVICE_NTFRS;
+ {$EXTERNALSYM SERVICE_LM20_NTFRS}
+
+ SERVICE_ISMSERV = TEXT('IsmServ');
+ {$EXTERNALSYM SERVICE_ISMSERV}
+ SERVICE_LM20_ISMSERV = SERVICE_ISMSERV;
+ {$EXTERNALSYM SERVICE_LM20_ISMSERV}
+
+implementation
+
+end.
diff --git a/packages/extra/winunits/jwalmstats.pas b/packages/extra/winunits/jwalmstats.pas
index 7cd6be51f0..d3e7b8b461 100644
--- a/packages/extra/winunits/jwalmstats.pas
+++ b/packages/extra/winunits/jwalmstats.pas
@@ -1,248 +1,248 @@
-{******************************************************************************}
-{ }
-{ Lan Manager Statistics API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: lmstats.h, released November 2001. The original Pascal }
-{ code is: LmStats.pas, released Februari 2002. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwalmstats.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaLmStats;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "lmstats.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaLmCons, JwaWinType;
-
-//
-// Function Prototypes - Statistics
-//
-
-function NetStatisticsGet(server: LMSTR; service: LMSTR; level: DWORD; options: DWORD; var bufptr: LPBYTE): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetStatisticsGet}
-
-//
-// Data Structures - Statistics
-//
-
-{$IFDEF LM20_WORKSTATION_STATISTICS}
-
-type
- _STAT_WORKSTATION_0 = record
- stw0_start: DWORD;
- stw0_numNCB_r: DWORD;
- stw0_numNCB_s: DWORD;
- stw0_numNCB_a: DWORD;
- stw0_fiNCB_r: DWORD;
- stw0_fiNCB_s: DWORD;
- stw0_fiNCB_a: DWORD;
- stw0_fcNCB_r: DWORD;
- stw0_fcNCB_s: DWORD;
- stw0_fcNCB_a: DWORD;
- stw0_sesstart: DWORD;
- stw0_sessfailcon: DWORD;
- stw0_sessbroke: DWORD;
- stw0_uses: DWORD;
- stw0_usefail: DWORD;
- stw0_autorec: DWORD;
- stw0_bytessent_r_lo: DWORD;
- stw0_bytessent_r_hi: DWORD;
- stw0_bytesrcvd_r_lo: DWORD;
- stw0_bytesrcvd_r_hi: DWORD;
- stw0_bytessent_s_lo: DWORD;
- stw0_bytessent_s_hi: DWORD;
- stw0_bytesrcvd_s_lo: DWORD;
- stw0_bytesrcvd_s_hi: DWORD;
- stw0_bytessent_a_lo: DWORD;
- stw0_bytessent_a_hi: DWORD;
- stw0_bytesrcvd_a_lo: DWORD;
- stw0_bytesrcvd_a_hi: DWORD;
- stw0_reqbufneed: DWORD;
- stw0_bigbufneed: DWORD;
- end;
- {$EXTERNALSYM _STAT_WORKSTATION_0}
- STAT_WORKSTATION_0 = _STAT_WORKSTATION_0;
- {$EXTERNALSYM STAT_WORKSTATION_0}
- PSTAT_WORKSTATION_0 = ^STAT_WORKSTATION_0;
- {$EXTERNALSYM PSTAT_WORKSTATION_0}
- LPSTAT_WORKSTATION_0 = ^STAT_WORKSTATION_0;
- {$EXTERNALSYM LPSTAT_WORKSTATION_0}
- TStatWorkstation0 = STAT_WORKSTATION_0;
- PStatWorkstation0 = PSTAT_WORKSTATION_0;
-
-{$ELSE}
-
-//
-// NB: The following structure is REDIR_STATISTICS in sdk\inc\ntddnfs.h. If you
-// change the structure, change it in both places
-//
-
-type
- _STAT_WORKSTATION_0 = record
- StatisticsStartTime: LARGE_INTEGER;
- BytesReceived: LARGE_INTEGER;
- SmbsReceived: LARGE_INTEGER;
- PagingReadBytesRequested: LARGE_INTEGER;
- NonPagingReadBytesRequested: LARGE_INTEGER;
- CacheReadBytesRequested: LARGE_INTEGER;
- NetworkReadBytesRequested: LARGE_INTEGER;
- BytesTransmitted: LARGE_INTEGER;
- SmbsTransmitted: LARGE_INTEGER;
- PagingWriteBytesRequested: LARGE_INTEGER;
- NonPagingWriteBytesRequested: LARGE_INTEGER;
- CacheWriteBytesRequested: LARGE_INTEGER;
- NetworkWriteBytesRequested: LARGE_INTEGER;
- InitiallyFailedOperations: DWORD;
- FailedCompletionOperations: DWORD;
- ReadOperations: DWORD;
- RandomReadOperations: DWORD;
- ReadSmbs: DWORD;
- LargeReadSmbs: DWORD;
- SmallReadSmbs: DWORD;
- WriteOperations: DWORD;
- RandomWriteOperations: DWORD;
- WriteSmbs: DWORD;
- LargeWriteSmbs: DWORD;
- SmallWriteSmbs: DWORD;
- RawReadsDenied: DWORD;
- RawWritesDenied: DWORD;
- NetworkErrors: DWORD;
- // Connection/Session counts
- Sessions: DWORD;
- FailedSessions: DWORD;
- Reconnects: DWORD;
- CoreConnects: DWORD;
- Lanman20Connects: DWORD;
- Lanman21Connects: DWORD;
- LanmanNtConnects: DWORD;
- ServerDisconnects: DWORD;
- HungSessions: DWORD;
- UseCount: DWORD;
- FailedUseCount: DWORD;
- //
- // Queue Lengths (updates protected by RdrMpxTableSpinLock NOT
- // RdrStatisticsSpinlock)
- //
- CurrentCommands: DWORD;
- end;
- {$EXTERNALSYM _STAT_WORKSTATION_0}
- STAT_WORKSTATION_0 = _STAT_WORKSTATION_0;
- {$EXTERNALSYM STAT_WORKSTATION_0}
- PSTAT_WORKSTATION_0 = ^STAT_WORKSTATION_0;
- {$EXTERNALSYM PSTAT_WORKSTATION_0}
- LPSTAT_WORKSTATION_0 = ^STAT_WORKSTATION_0;
- {$EXTERNALSYM LPSTAT_WORKSTATION_0}
- TStatWorkstation0 = STAT_WORKSTATION_0;
- PStatWorkstation0 = PSTAT_WORKSTATION_0;
-
-{$ENDIF LM20_WORKSTATION_STATISTICS}
-
-type
- _STAT_SERVER_0 = record
- sts0_start: DWORD;
- sts0_fopens: DWORD;
- sts0_devopens: DWORD;
- sts0_jobsqueued: DWORD;
- sts0_sopens: DWORD;
- sts0_stimedout: DWORD;
- sts0_serrorout: DWORD;
- sts0_pwerrors: DWORD;
- sts0_permerrors: DWORD;
- sts0_syserrors: DWORD;
- sts0_bytessent_low: DWORD;
- sts0_bytessent_high: DWORD;
- sts0_bytesrcvd_low: DWORD;
- sts0_bytesrcvd_high: DWORD;
- sts0_avresponse: DWORD;
- sts0_reqbufneed: DWORD;
- sts0_bigbufneed: DWORD;
- end;
- {$EXTERNALSYM _STAT_SERVER_0}
- STAT_SERVER_0 = _STAT_SERVER_0;
- {$EXTERNALSYM STAT_SERVER_0}
- PSTAT_SERVER_0 = ^STAT_SERVER_0;
- {$EXTERNALSYM PSTAT_SERVER_0}
- LPSTAT_SERVER_0 = ^STAT_SERVER_0;
- {$EXTERNALSYM LPSTAT_SERVER_0}
- TStatServer0 = STAT_SERVER_0;
- PStatServer0 = PSTAT_SERVER_0;
-
-//
-// Special Values and Constants
-//
-
-const
- STATSOPT_CLR = 1;
- {$EXTERNALSYM STATSOPT_CLR}
- STATS_NO_VALUE = ULONG(-1);
- {$EXTERNALSYM STATS_NO_VALUE}
- STATS_OVERFLOW = ULONG(-2);
- {$EXTERNALSYM STATS_OVERFLOW}
-
-implementation
-
-{$IFDEF DYNAMIC_LINK}
-
-var
- _NetStatisticsGet: Pointer;
-
-function NetStatisticsGet;
-begin
- GetProcedureAddress(_NetStatisticsGet, netapi32, 'NetStatisticsGet');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetStatisticsGet]
- end;
-end;
-
-{$ELSE}
-
-function NetStatisticsGet; external netapi32 name 'NetStatisticsGet';
-
-{$ENDIF DYNAMIC_LINK}
-
-end.
+{******************************************************************************}
+{ }
+{ Lan Manager Statistics API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: lmstats.h, released November 2001. The original Pascal }
+{ code is: LmStats.pas, released Februari 2002. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwalmstats.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaLmStats;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "lmstats.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaLmCons, JwaWinType;
+
+//
+// Function Prototypes - Statistics
+//
+
+function NetStatisticsGet(server: LMSTR; service: LMSTR; level: DWORD; options: DWORD; var bufptr: LPBYTE): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetStatisticsGet}
+
+//
+// Data Structures - Statistics
+//
+
+{$IFDEF LM20_WORKSTATION_STATISTICS}
+
+type
+ _STAT_WORKSTATION_0 = record
+ stw0_start: DWORD;
+ stw0_numNCB_r: DWORD;
+ stw0_numNCB_s: DWORD;
+ stw0_numNCB_a: DWORD;
+ stw0_fiNCB_r: DWORD;
+ stw0_fiNCB_s: DWORD;
+ stw0_fiNCB_a: DWORD;
+ stw0_fcNCB_r: DWORD;
+ stw0_fcNCB_s: DWORD;
+ stw0_fcNCB_a: DWORD;
+ stw0_sesstart: DWORD;
+ stw0_sessfailcon: DWORD;
+ stw0_sessbroke: DWORD;
+ stw0_uses: DWORD;
+ stw0_usefail: DWORD;
+ stw0_autorec: DWORD;
+ stw0_bytessent_r_lo: DWORD;
+ stw0_bytessent_r_hi: DWORD;
+ stw0_bytesrcvd_r_lo: DWORD;
+ stw0_bytesrcvd_r_hi: DWORD;
+ stw0_bytessent_s_lo: DWORD;
+ stw0_bytessent_s_hi: DWORD;
+ stw0_bytesrcvd_s_lo: DWORD;
+ stw0_bytesrcvd_s_hi: DWORD;
+ stw0_bytessent_a_lo: DWORD;
+ stw0_bytessent_a_hi: DWORD;
+ stw0_bytesrcvd_a_lo: DWORD;
+ stw0_bytesrcvd_a_hi: DWORD;
+ stw0_reqbufneed: DWORD;
+ stw0_bigbufneed: DWORD;
+ end;
+ {$EXTERNALSYM _STAT_WORKSTATION_0}
+ STAT_WORKSTATION_0 = _STAT_WORKSTATION_0;
+ {$EXTERNALSYM STAT_WORKSTATION_0}
+ PSTAT_WORKSTATION_0 = ^STAT_WORKSTATION_0;
+ {$EXTERNALSYM PSTAT_WORKSTATION_0}
+ LPSTAT_WORKSTATION_0 = ^STAT_WORKSTATION_0;
+ {$EXTERNALSYM LPSTAT_WORKSTATION_0}
+ TStatWorkstation0 = STAT_WORKSTATION_0;
+ PStatWorkstation0 = PSTAT_WORKSTATION_0;
+
+{$ELSE}
+
+//
+// NB: The following structure is REDIR_STATISTICS in sdk\inc\ntddnfs.h. If you
+// change the structure, change it in both places
+//
+
+type
+ _STAT_WORKSTATION_0 = record
+ StatisticsStartTime: LARGE_INTEGER;
+ BytesReceived: LARGE_INTEGER;
+ SmbsReceived: LARGE_INTEGER;
+ PagingReadBytesRequested: LARGE_INTEGER;
+ NonPagingReadBytesRequested: LARGE_INTEGER;
+ CacheReadBytesRequested: LARGE_INTEGER;
+ NetworkReadBytesRequested: LARGE_INTEGER;
+ BytesTransmitted: LARGE_INTEGER;
+ SmbsTransmitted: LARGE_INTEGER;
+ PagingWriteBytesRequested: LARGE_INTEGER;
+ NonPagingWriteBytesRequested: LARGE_INTEGER;
+ CacheWriteBytesRequested: LARGE_INTEGER;
+ NetworkWriteBytesRequested: LARGE_INTEGER;
+ InitiallyFailedOperations: DWORD;
+ FailedCompletionOperations: DWORD;
+ ReadOperations: DWORD;
+ RandomReadOperations: DWORD;
+ ReadSmbs: DWORD;
+ LargeReadSmbs: DWORD;
+ SmallReadSmbs: DWORD;
+ WriteOperations: DWORD;
+ RandomWriteOperations: DWORD;
+ WriteSmbs: DWORD;
+ LargeWriteSmbs: DWORD;
+ SmallWriteSmbs: DWORD;
+ RawReadsDenied: DWORD;
+ RawWritesDenied: DWORD;
+ NetworkErrors: DWORD;
+ // Connection/Session counts
+ Sessions: DWORD;
+ FailedSessions: DWORD;
+ Reconnects: DWORD;
+ CoreConnects: DWORD;
+ Lanman20Connects: DWORD;
+ Lanman21Connects: DWORD;
+ LanmanNtConnects: DWORD;
+ ServerDisconnects: DWORD;
+ HungSessions: DWORD;
+ UseCount: DWORD;
+ FailedUseCount: DWORD;
+ //
+ // Queue Lengths (updates protected by RdrMpxTableSpinLock NOT
+ // RdrStatisticsSpinlock)
+ //
+ CurrentCommands: DWORD;
+ end;
+ {$EXTERNALSYM _STAT_WORKSTATION_0}
+ STAT_WORKSTATION_0 = _STAT_WORKSTATION_0;
+ {$EXTERNALSYM STAT_WORKSTATION_0}
+ PSTAT_WORKSTATION_0 = ^STAT_WORKSTATION_0;
+ {$EXTERNALSYM PSTAT_WORKSTATION_0}
+ LPSTAT_WORKSTATION_0 = ^STAT_WORKSTATION_0;
+ {$EXTERNALSYM LPSTAT_WORKSTATION_0}
+ TStatWorkstation0 = STAT_WORKSTATION_0;
+ PStatWorkstation0 = PSTAT_WORKSTATION_0;
+
+{$ENDIF LM20_WORKSTATION_STATISTICS}
+
+type
+ _STAT_SERVER_0 = record
+ sts0_start: DWORD;
+ sts0_fopens: DWORD;
+ sts0_devopens: DWORD;
+ sts0_jobsqueued: DWORD;
+ sts0_sopens: DWORD;
+ sts0_stimedout: DWORD;
+ sts0_serrorout: DWORD;
+ sts0_pwerrors: DWORD;
+ sts0_permerrors: DWORD;
+ sts0_syserrors: DWORD;
+ sts0_bytessent_low: DWORD;
+ sts0_bytessent_high: DWORD;
+ sts0_bytesrcvd_low: DWORD;
+ sts0_bytesrcvd_high: DWORD;
+ sts0_avresponse: DWORD;
+ sts0_reqbufneed: DWORD;
+ sts0_bigbufneed: DWORD;
+ end;
+ {$EXTERNALSYM _STAT_SERVER_0}
+ STAT_SERVER_0 = _STAT_SERVER_0;
+ {$EXTERNALSYM STAT_SERVER_0}
+ PSTAT_SERVER_0 = ^STAT_SERVER_0;
+ {$EXTERNALSYM PSTAT_SERVER_0}
+ LPSTAT_SERVER_0 = ^STAT_SERVER_0;
+ {$EXTERNALSYM LPSTAT_SERVER_0}
+ TStatServer0 = STAT_SERVER_0;
+ PStatServer0 = PSTAT_SERVER_0;
+
+//
+// Special Values and Constants
+//
+
+const
+ STATSOPT_CLR = 1;
+ {$EXTERNALSYM STATSOPT_CLR}
+ STATS_NO_VALUE = ULONG(-1);
+ {$EXTERNALSYM STATS_NO_VALUE}
+ STATS_OVERFLOW = ULONG(-2);
+ {$EXTERNALSYM STATS_OVERFLOW}
+
+implementation
+
+{$IFDEF DYNAMIC_LINK}
+
+var
+ _NetStatisticsGet: Pointer;
+
+function NetStatisticsGet;
+begin
+ GetProcedureAddress(_NetStatisticsGet, netapi32, 'NetStatisticsGet');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetStatisticsGet]
+ end;
+end;
+
+{$ELSE}
+
+function NetStatisticsGet; external netapi32 name 'NetStatisticsGet';
+
+{$ENDIF DYNAMIC_LINK}
+
+end.
diff --git a/packages/extra/winunits/jwalmsvc.pas b/packages/extra/winunits/jwalmsvc.pas
index 4dd0e38524..23fbb06eb8 100644
--- a/packages/extra/winunits/jwalmsvc.pas
+++ b/packages/extra/winunits/jwalmsvc.pas
@@ -1,795 +1,795 @@
-{******************************************************************************}
-{ }
-{ Lan Manager Service API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: lmsvc.h, released November 2001. The original Pascal }
-{ code is: LmSvc.pas, released Februari 2002. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwalmsvc.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaLmSvc;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "lmsvc.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaLmCons, JwaWinType;
-
-//
-// Data Structures
-//
-
-type
- LPSERVICE_INFO_0 = ^SERVICE_INFO_0;
- {$EXTERNALSYM LPSERVICE_INFO_0}
- PSERVICE_INFO_0 = ^SERVICE_INFO_0;
- {$EXTERNALSYM PSERVICE_INFO_0}
- _SERVICE_INFO_0 = record
- svci0_name: LPWSTR;
- end;
- {$EXTERNALSYM _SERVICE_INFO_0}
- SERVICE_INFO_0 = _SERVICE_INFO_0;
- {$EXTERNALSYM SERVICE_INFO_0}
- TServiceInfo0 = SERVICE_INFO_0;
- PServiceInfo0 = PSERVICE_INFO_0;
-
- LPSERVICE_INFO_1 = ^SERVICE_INFO_1;
- {$EXTERNALSYM LPSERVICE_INFO_1}
- PSERVICE_INFO_1 = ^SERVICE_INFO_1;
- {$EXTERNALSYM PSERVICE_INFO_1}
- _SERVICE_INFO_1 = record
- svci1_name: LPWSTR;
- svci1_status: DWORD;
- svci1_code: DWORD;
- svci1_pid: DWORD;
- end;
- {$EXTERNALSYM _SERVICE_INFO_1}
- SERVICE_INFO_1 = _SERVICE_INFO_1;
- {$EXTERNALSYM SERVICE_INFO_1}
- TServiceInfo1 = SERVICE_INFO_1;
- PServiceInfo1 = PSERVICE_INFO_1;
-
- LPSERVICE_INFO_2 = ^SERVICE_INFO_2;
- {$EXTERNALSYM LPSERVICE_INFO_2}
- PSERVICE_INFO_2 = ^SERVICE_INFO_2;
- {$EXTERNALSYM PSERVICE_INFO_2}
- _SERVICE_INFO_2 = record
- svci2_name: LPWSTR;
- svci2_status: DWORD;
- svci2_code: DWORD;
- svci2_pid: DWORD;
- svci2_text: LPWSTR;
- svci2_specific_error: DWORD;
- svci2_display_name: LPWSTR;
- end;
- {$EXTERNALSYM _SERVICE_INFO_2}
- SERVICE_INFO_2 = _SERVICE_INFO_2;
- {$EXTERNALSYM SERVICE_INFO_2}
- TServiceInfo2 = SERVICE_INFO_2;
- PServiceInfo2 = PSERVICE_INFO_2;
-
-//
-// Function Prototypes
-//
-
-function NetServiceControl(servername, service: LPCWSTR; opcode: DWORD; arg: DWORD; var bufptr: LPBYTE): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetServiceControl}
-
-function NetServiceEnum(servername: LPCWSTR; level: DWORD; var bufptr: LPBYTE; prefmaxlen: DWORD; entriesread, totalentries, resume_handle: LPDWORD): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetServiceEnum}
-
-function NetServiceGetInfo(servername, service: LPCWSTR; level: DWORD; var bufptr: LPBYTE): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetServiceGetInfo}
-
-function NetServiceInstall(servername, service: LPCWSTR; argc: DWORD; argv: LPCWSTR; var bufptr: LPBYTE): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetServiceInstall}
-
-//
-// Special Values and Constants
-//
-
-//
-// Bitmask and bit values for svci1_status, and svci2_status
-// fields. For each "subfield", there is a mask defined,
-// and a number of constants representing the value
-// obtained by doing (status & mask).
-//
-
-// Bits 0,1 -- general status
-
-const
- SERVICE_INSTALL_STATE = $03;
- {$EXTERNALSYM SERVICE_INSTALL_STATE}
- SERVICE_UNINSTALLED = $00;
- {$EXTERNALSYM SERVICE_UNINSTALLED}
- SERVICE_INSTALL_PENDING = $01;
- {$EXTERNALSYM SERVICE_INSTALL_PENDING}
- SERVICE_UNINSTALL_PENDING = $02;
- {$EXTERNALSYM SERVICE_UNINSTALL_PENDING}
- SERVICE_INSTALLED = $03;
- {$EXTERNALSYM SERVICE_INSTALLED}
-
-// Bits 2,3 -- paused/active status
-
- SERVICE_PAUSE_STATE = $0C;
- {$EXTERNALSYM SERVICE_PAUSE_STATE}
- LM20_SERVICE_ACTIVE = $00;
- {$EXTERNALSYM LM20_SERVICE_ACTIVE}
- LM20_SERVICE_CONTINUE_PENDING = $04;
- {$EXTERNALSYM LM20_SERVICE_CONTINUE_PENDING}
- LM20_SERVICE_PAUSE_PENDING = $08;
- {$EXTERNALSYM LM20_SERVICE_PAUSE_PENDING}
- LM20_SERVICE_PAUSED = $0C;
- {$EXTERNALSYM LM20_SERVICE_PAUSED}
-
-// Bit 4 -- uninstallable indication
-
- SERVICE_NOT_UNINSTALLABLE = $00;
- {$EXTERNALSYM SERVICE_NOT_UNINSTALLABLE}
- SERVICE_UNINSTALLABLE = $10;
- {$EXTERNALSYM SERVICE_UNINSTALLABLE}
-
-// Bit 5 -- pausable indication
-
- SERVICE_NOT_PAUSABLE = $00;
- {$EXTERNALSYM SERVICE_NOT_PAUSABLE}
- SERVICE_PAUSABLE = $20;
- {$EXTERNALSYM SERVICE_PAUSABLE}
-
-// Workstation service only:
-// Bits 8,9,10 -- redirection paused/active
-
- SERVICE_REDIR_PAUSED = $700;
- {$EXTERNALSYM SERVICE_REDIR_PAUSED}
- SERVICE_REDIR_DISK_PAUSED = $100;
- {$EXTERNALSYM SERVICE_REDIR_DISK_PAUSED}
- SERVICE_REDIR_PRINT_PAUSED = $200;
- {$EXTERNALSYM SERVICE_REDIR_PRINT_PAUSED}
- SERVICE_REDIR_COMM_PAUSED = $400;
- {$EXTERNALSYM SERVICE_REDIR_COMM_PAUSED}
-
-//
-// Additional standard LAN Manager for MS-DOS services
-//
-
- SERVICE_DOS_ENCRYPTION = WideString('ENCRYPT');
- {$EXTERNALSYM SERVICE_DOS_ENCRYPTION}
-
-//
-// NetServiceControl opcodes.
-//
-
- SERVICE_CTRL_INTERROGATE = 0;
- {$EXTERNALSYM SERVICE_CTRL_INTERROGATE}
- SERVICE_CTRL_PAUSE = 1;
- {$EXTERNALSYM SERVICE_CTRL_PAUSE}
- SERVICE_CTRL_CONTINUE = 2;
- {$EXTERNALSYM SERVICE_CTRL_CONTINUE}
- SERVICE_CTRL_UNINSTALL = 3;
- {$EXTERNALSYM SERVICE_CTRL_UNINSTALL}
-
-//
-// Workstation service only: Bits used in the "arg" parameter
-// to NetServiceControl in conjunction with the opcode
-// SERVICE_CTRL_PAUSE or SERVICE_CTRL_CONTINUE, to pause or
-// continue redirection.
-//
-
- SERVICE_CTRL_REDIR_DISK = $1;
- {$EXTERNALSYM SERVICE_CTRL_REDIR_DISK}
- SERVICE_CTRL_REDIR_PRINT = $2;
- {$EXTERNALSYM SERVICE_CTRL_REDIR_PRINT}
- SERVICE_CTRL_REDIR_COMM = $4;
- {$EXTERNALSYM SERVICE_CTRL_REDIR_COMM}
-
-//
-// Values for svci1_code, and svci2_code when status
-// of the service is SERVICE_INSTALL_PENDING or
-// SERVICE_UNINSTALL_PENDING.
-// A service can optionally provide a hint to the installer
-// that the install is proceeding and how long to wait
-// (in 0.1 second increments) before querying status again.
-//
-
- SERVICE_IP_NO_HINT = $0;
- {$EXTERNALSYM SERVICE_IP_NO_HINT}
- SERVICE_CCP_NO_HINT = $0;
- {$EXTERNALSYM SERVICE_CCP_NO_HINT}
-
- SERVICE_IP_QUERY_HINT = $10000;
- {$EXTERNALSYM SERVICE_IP_QUERY_HINT}
- SERVICE_CCP_QUERY_HINT = $10000;
- {$EXTERNALSYM SERVICE_CCP_QUERY_HINT}
-
-//
-// Mask for install proceeding checkpoint number
-//
-
- SERVICE_IP_CHKPT_NUM = $0FF;
- {$EXTERNALSYM SERVICE_IP_CHKPT_NUM}
- SERVICE_CCP_CHKPT_NUM = $0FF;
- {$EXTERNALSYM SERVICE_CCP_CHKPT_NUM}
-
-//
-// Mask for wait time hint before querying again
-//
-
- SERVICE_IP_WAIT_TIME = $0FF00;
- {$EXTERNALSYM SERVICE_IP_WAIT_TIME}
- SERVICE_CCP_WAIT_TIME = $0FF00;
- {$EXTERNALSYM SERVICE_CCP_WAIT_TIME}
-
-//
-// Shift count for building wait time _code values
-//
-
- SERVICE_IP_WAITTIME_SHIFT = 8;
- {$EXTERNALSYM SERVICE_IP_WAITTIME_SHIFT}
- SERVICE_NTIP_WAITTIME_SHIFT = 12;
- {$EXTERNALSYM SERVICE_NTIP_WAITTIME_SHIFT}
-
-//
-// Mask used for upper and lower portions of wait hint time.
-//
-
- UPPER_HINT_MASK = $0000FF00;
- {$EXTERNALSYM UPPER_HINT_MASK}
- LOWER_HINT_MASK = $000000FF;
- {$EXTERNALSYM LOWER_HINT_MASK}
- UPPER_GET_HINT_MASK = $0FF00000;
- {$EXTERNALSYM UPPER_GET_HINT_MASK}
- LOWER_GET_HINT_MASK = $0000FF00;
- {$EXTERNALSYM LOWER_GET_HINT_MASK}
- SERVICE_NT_MAXTIME = $0000FFFF;
- {$EXTERNALSYM SERVICE_NT_MAXTIME}
- SERVICE_RESRV_MASK = $0001FFFF;
- {$EXTERNALSYM SERVICE_RESRV_MASK}
- SERVICE_MAXTIME = $000000FF;
- {$EXTERNALSYM SERVICE_MAXTIME}
-
-//
-// SERVICE_BASE is the base of service error codes,
-// chosen to avoid conflict with OS, redirector,
-// netapi, and errlog codes.
-//
-// Don't change the comments following the manifest constants without
-// understanding how mapmsg works.
-//
-
- SERVICE_BASE = 3050;
- {$EXTERNALSYM SERVICE_BASE}
- SERVICE_UIC_NORMAL = 0;
- {$EXTERNALSYM SERVICE_UIC_NORMAL}
-
-{*
- * Uninstall codes, to be used in high byte of 'code' on final NetStatus,
- * which sets the status to UNINSTALLED.
- *}
-
- SERVICE_UIC_BADPARMVAL = SERVICE_BASE + 1;
- {$EXTERNALSYM SERVICE_UIC_BADPARMVAL}
-
-{*
- * The Registry or the information you just typed includes an illegal
- * value for "%1".
- *}
-
- SERVICE_UIC_MISSPARM = SERVICE_BASE + 2;
- {$EXTERNALSYM SERVICE_UIC_MISSPARM}
-
-{*
- * The required parameter was not provided on the command
- * line or in the configuration file.
- *}
-
- SERVICE_UIC_UNKPARM = SERVICE_BASE + 3;
- {$EXTERNALSYM SERVICE_UIC_UNKPARM}
-
-{*
- * LAN Manager does not recognize "%1" as a valid option.
- *}
-
- SERVICE_UIC_RESOURCE = SERVICE_BASE + 4;
- {$EXTERNALSYM SERVICE_UIC_RESOURCE}
-
-{*
- * A request for resource could not be satisfied.
- *}
-
- SERVICE_UIC_CONFIG = SERVICE_BASE + 5;
- {$EXTERNALSYM SERVICE_UIC_CONFIG}
-
-{*
- * A problem exists with the system configuration.
- *}
-
- SERVICE_UIC_SYSTEM = SERVICE_BASE + 6;
- {$EXTERNALSYM SERVICE_UIC_SYSTEM}
-
-{*
- * A system error has occurred.
- *}
-
- SERVICE_UIC_INTERNAL = SERVICE_BASE + 7;
- {$EXTERNALSYM SERVICE_UIC_INTERNAL}
-
-{*
- * An internal consistency error has occurred.
- *}
-
- SERVICE_UIC_AMBIGPARM = SERVICE_BASE + 8;
- {$EXTERNALSYM SERVICE_UIC_AMBIGPARM}
-
-{*
- * The configuration file or the command line has an ambiguous option.
- *}
-
- SERVICE_UIC_DUPPARM = SERVICE_BASE + 9;
- {$EXTERNALSYM SERVICE_UIC_DUPPARM}
-
-{*
- * The configuration file or the command line has a duplicate parameter.
- *}
-
- SERVICE_UIC_KILL = SERVICE_BASE + 10;
- {$EXTERNALSYM SERVICE_UIC_KILL}
-
-{*
- * The service did not respond to control and was stopped with
- * the DosKillProc function.
- *}
-
- SERVICE_UIC_EXEC = SERVICE_BASE + 11;
- {$EXTERNALSYM SERVICE_UIC_EXEC}
-
-{*
- * An error occurred when attempting to run the service program.
- *}
-
- SERVICE_UIC_SUBSERV = SERVICE_BASE + 12;
- {$EXTERNALSYM SERVICE_UIC_SUBSERV}
-
-{*
- * The sub-service failed to start.
- *}
-
- SERVICE_UIC_CONFLPARM = SERVICE_BASE + 13;
- {$EXTERNALSYM SERVICE_UIC_CONFLPARM}
-
-{*
- * There is a conflict in the value or use of these options: %1.
- *}
-
- SERVICE_UIC_FILE = SERVICE_BASE + 14;
- {$EXTERNALSYM SERVICE_UIC_FILE}
-
-{*
- * There is a problem with the file.
- *}
-
-//
-// The modifiers
-//
-
-//
-// General:
-//
-
- SERVICE_UIC_M_NULL = 0;
- {$EXTERNALSYM SERVICE_UIC_M_NULL}
-
-//
-// RESOURCE:
-//
-
- SERVICE_UIC_M_MEMORY = SERVICE_BASE + 20; // memory
- {$EXTERNALSYM SERVICE_UIC_M_MEMORY}
- SERVICE_UIC_M_DISK = SERVICE_BASE + 21; // disk space
- {$EXTERNALSYM SERVICE_UIC_M_DISK}
- SERVICE_UIC_M_THREADS = SERVICE_BASE + 22; // thread
- {$EXTERNALSYM SERVICE_UIC_M_THREADS}
- SERVICE_UIC_M_PROCESSES = SERVICE_BASE + 23; // process
- {$EXTERNALSYM SERVICE_UIC_M_PROCESSES}
-
-//
-// CONFIG:
-//
-
-//
-// Security failure
-//
-
- SERVICE_UIC_M_SECURITY = SERVICE_BASE + 24;
- {$EXTERNALSYM SERVICE_UIC_M_SECURITY}
-
-{* Security Failure. %0 *}
-
- SERVICE_UIC_M_LANROOT = SERVICE_BASE + 25;
- {$EXTERNALSYM SERVICE_UIC_M_LANROOT}
-
-{*
- * Bad or missing LAN Manager root directory.
- *}
-
- SERVICE_UIC_M_REDIR = SERVICE_BASE + 26;
- {$EXTERNALSYM SERVICE_UIC_M_REDIR}
-
-{*
- * The network software is not installed.
- *}
-
- SERVICE_UIC_M_SERVER = SERVICE_BASE + 27;
- {$EXTERNALSYM SERVICE_UIC_M_SERVER}
-
-{*
- * The server is not started.
- *}
-
- SERVICE_UIC_M_SEC_FILE_ERR = SERVICE_BASE + 28;
- {$EXTERNALSYM SERVICE_UIC_M_SEC_FILE_ERR}
-
-{*
- * The server cannot access the user accounts database (NET.ACC).
- *}
-
- SERVICE_UIC_M_FILES = SERVICE_BASE + 29;
- {$EXTERNALSYM SERVICE_UIC_M_FILES}
-
-{*
- * Incompatible files are installed in the LANMAN tree.
- *}
-
- SERVICE_UIC_M_LOGS = SERVICE_BASE + 30;
- {$EXTERNALSYM SERVICE_UIC_M_LOGS}
-
-{*
- * The LANMAN\LOGS directory is invalid.
- *}
-
- SERVICE_UIC_M_LANGROUP = SERVICE_BASE + 31;
- {$EXTERNALSYM SERVICE_UIC_M_LANGROUP}
-
-{*
- * The domain specified could not be used.
- *}
-
- SERVICE_UIC_M_MSGNAME = SERVICE_BASE + 32;
- {$EXTERNALSYM SERVICE_UIC_M_MSGNAME}
-
-{*
- * The computer name is being used as a message alias on another computer.
- *}
-
- SERVICE_UIC_M_ANNOUNCE = SERVICE_BASE + 33;
- {$EXTERNALSYM SERVICE_UIC_M_ANNOUNCE}
-
-{*
- * The announcement of the server name failed.
- *}
-
- SERVICE_UIC_M_UAS = SERVICE_BASE + 34;
- {$EXTERNALSYM SERVICE_UIC_M_UAS}
-
-{*
- * The user accounts database is not configured correctly.
- *}
-
- SERVICE_UIC_M_SERVER_SEC_ERR = SERVICE_BASE + 35;
- {$EXTERNALSYM SERVICE_UIC_M_SERVER_SEC_ERR}
-
-{*
- * The server is not running with user-level security.
- *}
-
- SERVICE_UIC_M_WKSTA = SERVICE_BASE + 37;
- {$EXTERNALSYM SERVICE_UIC_M_WKSTA}
-
-{*
- * The workstation is not configured properly.
- *}
-
- SERVICE_UIC_M_ERRLOG = SERVICE_BASE + 38;
- {$EXTERNALSYM SERVICE_UIC_M_ERRLOG}
-
-{*
- * View your error log for details.
- *}
-
- SERVICE_UIC_M_FILE_UW = SERVICE_BASE + 39;
- {$EXTERNALSYM SERVICE_UIC_M_FILE_UW}
-
-{*
- * Unable to write to this file.
- *}
-
- SERVICE_UIC_M_ADDPAK = SERVICE_BASE + 40;
- {$EXTERNALSYM SERVICE_UIC_M_ADDPAK}
-
-{*
- * ADDPAK file is corrupted. Delete LANMAN\NETPROG\ADDPAK.SER
- * and reapply all ADDPAKs.
- *}
-
- SERVICE_UIC_M_LAZY = SERVICE_BASE + 41;
- {$EXTERNALSYM SERVICE_UIC_M_LAZY}
-
-{*
- * The LM386 server cannot be started because CACHE.EXE is not running.
- *}
-
- SERVICE_UIC_M_UAS_MACHINE_ACCT = SERVICE_BASE + 42;
- {$EXTERNALSYM SERVICE_UIC_M_UAS_MACHINE_ACCT}
-
-{*
- * There is no account for this computer in the security database.
- *}
-
- SERVICE_UIC_M_UAS_SERVERS_NMEMB = SERVICE_BASE + 43;
- {$EXTERNALSYM SERVICE_UIC_M_UAS_SERVERS_NMEMB}
-
-{*
- * This computer is not a member of the group SERVERS.
- *}
-
- SERVICE_UIC_M_UAS_SERVERS_NOGRP = SERVICE_BASE + 44;
- {$EXTERNALSYM SERVICE_UIC_M_UAS_SERVERS_NOGRP}
-
-{*
- * The group SERVERS is not present in the local security database.
- *}
-
- SERVICE_UIC_M_UAS_INVALID_ROLE = SERVICE_BASE + 45;
- {$EXTERNALSYM SERVICE_UIC_M_UAS_INVALID_ROLE}
-
-{*
- * This computer is configured as a member of a workgroup, not as
- * a member of a domain. The Netlogon service does not need to run in this
- * configuration.
- *}
-
- SERVICE_UIC_M_NETLOGON_NO_DC = SERVICE_BASE + 46;
- {$EXTERNALSYM SERVICE_UIC_M_NETLOGON_NO_DC}
-
-{*
- * The primary Domain Controller for this domain could not be located.
- *}
-
- SERVICE_UIC_M_NETLOGON_DC_CFLCT = SERVICE_BASE + 47;
- {$EXTERNALSYM SERVICE_UIC_M_NETLOGON_DC_CFLCT}
-
-{*
- * This computer is configured to be the primary domain controller of its domain.
- * However, the computer %1 is currently claiming to be the primary domain controller
- * of the domain.
- *}
-
- SERVICE_UIC_M_NETLOGON_AUTH = SERVICE_BASE + 48;
- {$EXTERNALSYM SERVICE_UIC_M_NETLOGON_AUTH}
-
-{*
- * The service failed to authenticate with the primary domain controller.
- *}
-
- SERVICE_UIC_M_UAS_PROLOG = SERVICE_BASE + 49;
- {$EXTERNALSYM SERVICE_UIC_M_UAS_PROLOG}
-
-{*
- * There is a problem with the security database creation date or serial number.
- *}
-
- SERVICE2_BASE = 5600;
- {$EXTERNALSYM SERVICE2_BASE}
-
-{* new SEVICE_UIC messages go here *}
-
- SERVICE_UIC_M_NETLOGON_MPATH = SERVICE2_BASE + 0;
- {$EXTERNALSYM SERVICE_UIC_M_NETLOGON_MPATH}
-
-{*
- * Could not share the User or Script path.
- *}
-
- SERVICE_UIC_M_LSA_MACHINE_ACCT = SERVICE2_BASE + 1;
- {$EXTERNALSYM SERVICE_UIC_M_LSA_MACHINE_ACCT}
-
-{*
- * The password for this computer is not found in the local security
- * database.
- *}
-
- SERVICE_UIC_M_DATABASE_ERROR = SERVICE2_BASE + 2;
- {$EXTERNALSYM SERVICE_UIC_M_DATABASE_ERROR}
-
-{*
- * An internal error occurred while accessing the computer's
- * local or network security database.
- *}
-
-//
-// End modifiers
-//
-
-//
-// Commonly used Macros:
-//
-
-function SERVICE_IP_CODE(tt, nn: LONG): LONG;
-{$EXTERNALSYM SERVICE_IP_CODE}
-
-function SERVICE_CCP_CODE(tt, nn: LONG): LONG;
-{$EXTERNALSYM SERVICE_CCP_CODE}
-
-function SERVICE_UIC_CODE(cc, mm: LONG): LONG;
-{$EXTERNALSYM SERVICE_UIC_CODE}
-
-//
-// This macro takes a wait hint (tt) which can have a maximum value of
-// 0xFFFF and puts it into the service status code field.
-// 0x0FF1FFnn (where nn is the checkpoint information).
-//
-
-function SERVICE_NT_CCP_CODE(tt, nn: LONG): LONG;
-{$EXTERNALSYM SERVICE_NT_CCP_CODE}
-
-//
-// This macro takes a status code field, and strips out the wait hint
-// from the upper and lower sections.
-// 0x0FF1FFnn results in 0x0000FFFF.
-//
-
-function SERVICE_NT_WAIT_GET(code: DWORD): DWORD;
-{$EXTERNALSYM SERVICE_NT_WAIT_GET}
-
-implementation
-
-// #define SERVICE_IP_CODE(tt,nn) ((long)SERVICE_IP_QUERY_HINT|(long)(nn|(tt<<SERVICE_IP_WAITTIME_SHIFT)))
-
-function SERVICE_IP_CODE(tt, nn: LONG): LONG;
-begin
- Result := SERVICE_IP_QUERY_HINT or (nn or (tt shl SERVICE_IP_WAITTIME_SHIFT));
-end;
-
-// #define SERVICE_CCP_CODE(tt,nn) ((long)SERVICE_CCP_QUERY_HINT|(long)(nn|(tt<<SERVICE_IP_WAITTIME_SHIFT)))
-
-function SERVICE_CCP_CODE(tt, nn: LONG): LONG;
-begin
- Result := SERVICE_CCP_QUERY_HINT or (nn or (tt shl SERVICE_IP_WAITTIME_SHIFT));
-end;
-
-// #define SERVICE_UIC_CODE(cc,mm) ((long)(((long)cc<<16)|(long)(unsigned short)mm))
-
-function SERVICE_UIC_CODE(cc, mm: LONG): LONG;
-begin
- Result := (cc shl 16) or WORD(mm);
-end;
-
-// #define SERVICE_NT_CCP_CODE(tt,nn) \
-// ( \
-// ((long)SERVICE_CCP_QUERY_HINT) | \
-// ((long)(nn)) | \
-// (((tt)&LOWER_HINT_MASK) << SERVICE_IP_WAITTIME_SHIFT) | \
-// (((tt)&UPPER_HINT_MASK) << SERVICE_NTIP_WAITTIME_SHIFT) \
-// )
-
-function SERVICE_NT_CCP_CODE(tt, nn: Longint): Longint;
-begin
- Result := SERVICE_CCP_QUERY_HINT or nn or ((tt and LOWER_HINT_MASK) shl SERVICE_IP_WAITTIME_SHIFT) or ((tt and UPPER_HINT_MASK) shl SERVICE_NTIP_WAITTIME_SHIFT);
-end;
-
-// #define SERVICE_NT_WAIT_GET(code) \
-// ( \
-// (((code) & UPPER_GET_HINT_MASK) >> SERVICE_NTIP_WAITTIME_SHIFT) | \
-// (((code) & LOWER_GET_HINT_MASK) >> SERVICE_IP_WAITTIME_SHIFT) \
-// )
-
-function SERVICE_NT_WAIT_GET(code: DWORD): DWORD;
-begin
- Result := ((code and UPPER_GET_HINT_MASK) shr SERVICE_NTIP_WAITTIME_SHIFT) or ((code and LOWER_GET_HINT_MASK) shr SERVICE_IP_WAITTIME_SHIFT);
-end;
-
-{$IFDEF DYNAMIC_LINK}
-
-var
- _NetServiceControl: Pointer;
-
-function NetServiceControl;
-begin
- GetProcedureAddress(_NetServiceControl, netapi32, 'NetServiceControl');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetServiceControl]
- end;
-end;
-
-var
- _NetServiceEnum: Pointer;
-
-function NetServiceEnum;
-begin
- GetProcedureAddress(_NetServiceEnum, netapi32, 'NetServiceEnum');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetServiceEnum]
- end;
-end;
-
-var
- _NetServiceGetInfo: Pointer;
-
-function NetServiceGetInfo;
-begin
- GetProcedureAddress(_NetServiceGetInfo, netapi32, 'NetServiceGetInfo');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetServiceGetInfo]
- end;
-end;
-
-var
- _NetServiceInstall: Pointer;
-
-function NetServiceInstall;
-begin
- GetProcedureAddress(_NetServiceInstall, netapi32, 'NetServiceInstall');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetServiceInstall]
- end;
-end;
-
-{$ELSE}
-
-function NetServiceControl; external netapi32 name 'NetServiceControl';
-function NetServiceEnum; external netapi32 name 'NetServiceEnum';
-function NetServiceGetInfo; external netapi32 name 'NetServiceGetInfo';
-function NetServiceInstall; external netapi32 name 'NetServiceInstall';
-
-{$ENDIF DYNAMIC_LINK}
-
-end.
+{******************************************************************************}
+{ }
+{ Lan Manager Service API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: lmsvc.h, released November 2001. The original Pascal }
+{ code is: LmSvc.pas, released Februari 2002. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwalmsvc.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaLmSvc;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "lmsvc.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaLmCons, JwaWinType;
+
+//
+// Data Structures
+//
+
+type
+ LPSERVICE_INFO_0 = ^SERVICE_INFO_0;
+ {$EXTERNALSYM LPSERVICE_INFO_0}
+ PSERVICE_INFO_0 = ^SERVICE_INFO_0;
+ {$EXTERNALSYM PSERVICE_INFO_0}
+ _SERVICE_INFO_0 = record
+ svci0_name: LPWSTR;
+ end;
+ {$EXTERNALSYM _SERVICE_INFO_0}
+ SERVICE_INFO_0 = _SERVICE_INFO_0;
+ {$EXTERNALSYM SERVICE_INFO_0}
+ TServiceInfo0 = SERVICE_INFO_0;
+ PServiceInfo0 = PSERVICE_INFO_0;
+
+ LPSERVICE_INFO_1 = ^SERVICE_INFO_1;
+ {$EXTERNALSYM LPSERVICE_INFO_1}
+ PSERVICE_INFO_1 = ^SERVICE_INFO_1;
+ {$EXTERNALSYM PSERVICE_INFO_1}
+ _SERVICE_INFO_1 = record
+ svci1_name: LPWSTR;
+ svci1_status: DWORD;
+ svci1_code: DWORD;
+ svci1_pid: DWORD;
+ end;
+ {$EXTERNALSYM _SERVICE_INFO_1}
+ SERVICE_INFO_1 = _SERVICE_INFO_1;
+ {$EXTERNALSYM SERVICE_INFO_1}
+ TServiceInfo1 = SERVICE_INFO_1;
+ PServiceInfo1 = PSERVICE_INFO_1;
+
+ LPSERVICE_INFO_2 = ^SERVICE_INFO_2;
+ {$EXTERNALSYM LPSERVICE_INFO_2}
+ PSERVICE_INFO_2 = ^SERVICE_INFO_2;
+ {$EXTERNALSYM PSERVICE_INFO_2}
+ _SERVICE_INFO_2 = record
+ svci2_name: LPWSTR;
+ svci2_status: DWORD;
+ svci2_code: DWORD;
+ svci2_pid: DWORD;
+ svci2_text: LPWSTR;
+ svci2_specific_error: DWORD;
+ svci2_display_name: LPWSTR;
+ end;
+ {$EXTERNALSYM _SERVICE_INFO_2}
+ SERVICE_INFO_2 = _SERVICE_INFO_2;
+ {$EXTERNALSYM SERVICE_INFO_2}
+ TServiceInfo2 = SERVICE_INFO_2;
+ PServiceInfo2 = PSERVICE_INFO_2;
+
+//
+// Function Prototypes
+//
+
+function NetServiceControl(servername, service: LPCWSTR; opcode: DWORD; arg: DWORD; var bufptr: LPBYTE): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetServiceControl}
+
+function NetServiceEnum(servername: LPCWSTR; level: DWORD; var bufptr: LPBYTE; prefmaxlen: DWORD; entriesread, totalentries, resume_handle: LPDWORD): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetServiceEnum}
+
+function NetServiceGetInfo(servername, service: LPCWSTR; level: DWORD; var bufptr: LPBYTE): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetServiceGetInfo}
+
+function NetServiceInstall(servername, service: LPCWSTR; argc: DWORD; argv: LPCWSTR; var bufptr: LPBYTE): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetServiceInstall}
+
+//
+// Special Values and Constants
+//
+
+//
+// Bitmask and bit values for svci1_status, and svci2_status
+// fields. For each "subfield", there is a mask defined,
+// and a number of constants representing the value
+// obtained by doing (status & mask).
+//
+
+// Bits 0,1 -- general status
+
+const
+ SERVICE_INSTALL_STATE = $03;
+ {$EXTERNALSYM SERVICE_INSTALL_STATE}
+ SERVICE_UNINSTALLED = $00;
+ {$EXTERNALSYM SERVICE_UNINSTALLED}
+ SERVICE_INSTALL_PENDING = $01;
+ {$EXTERNALSYM SERVICE_INSTALL_PENDING}
+ SERVICE_UNINSTALL_PENDING = $02;
+ {$EXTERNALSYM SERVICE_UNINSTALL_PENDING}
+ SERVICE_INSTALLED = $03;
+ {$EXTERNALSYM SERVICE_INSTALLED}
+
+// Bits 2,3 -- paused/active status
+
+ SERVICE_PAUSE_STATE = $0C;
+ {$EXTERNALSYM SERVICE_PAUSE_STATE}
+ LM20_SERVICE_ACTIVE = $00;
+ {$EXTERNALSYM LM20_SERVICE_ACTIVE}
+ LM20_SERVICE_CONTINUE_PENDING = $04;
+ {$EXTERNALSYM LM20_SERVICE_CONTINUE_PENDING}
+ LM20_SERVICE_PAUSE_PENDING = $08;
+ {$EXTERNALSYM LM20_SERVICE_PAUSE_PENDING}
+ LM20_SERVICE_PAUSED = $0C;
+ {$EXTERNALSYM LM20_SERVICE_PAUSED}
+
+// Bit 4 -- uninstallable indication
+
+ SERVICE_NOT_UNINSTALLABLE = $00;
+ {$EXTERNALSYM SERVICE_NOT_UNINSTALLABLE}
+ SERVICE_UNINSTALLABLE = $10;
+ {$EXTERNALSYM SERVICE_UNINSTALLABLE}
+
+// Bit 5 -- pausable indication
+
+ SERVICE_NOT_PAUSABLE = $00;
+ {$EXTERNALSYM SERVICE_NOT_PAUSABLE}
+ SERVICE_PAUSABLE = $20;
+ {$EXTERNALSYM SERVICE_PAUSABLE}
+
+// Workstation service only:
+// Bits 8,9,10 -- redirection paused/active
+
+ SERVICE_REDIR_PAUSED = $700;
+ {$EXTERNALSYM SERVICE_REDIR_PAUSED}
+ SERVICE_REDIR_DISK_PAUSED = $100;
+ {$EXTERNALSYM SERVICE_REDIR_DISK_PAUSED}
+ SERVICE_REDIR_PRINT_PAUSED = $200;
+ {$EXTERNALSYM SERVICE_REDIR_PRINT_PAUSED}
+ SERVICE_REDIR_COMM_PAUSED = $400;
+ {$EXTERNALSYM SERVICE_REDIR_COMM_PAUSED}
+
+//
+// Additional standard LAN Manager for MS-DOS services
+//
+
+ SERVICE_DOS_ENCRYPTION = WideString('ENCRYPT');
+ {$EXTERNALSYM SERVICE_DOS_ENCRYPTION}
+
+//
+// NetServiceControl opcodes.
+//
+
+ SERVICE_CTRL_INTERROGATE = 0;
+ {$EXTERNALSYM SERVICE_CTRL_INTERROGATE}
+ SERVICE_CTRL_PAUSE = 1;
+ {$EXTERNALSYM SERVICE_CTRL_PAUSE}
+ SERVICE_CTRL_CONTINUE = 2;
+ {$EXTERNALSYM SERVICE_CTRL_CONTINUE}
+ SERVICE_CTRL_UNINSTALL = 3;
+ {$EXTERNALSYM SERVICE_CTRL_UNINSTALL}
+
+//
+// Workstation service only: Bits used in the "arg" parameter
+// to NetServiceControl in conjunction with the opcode
+// SERVICE_CTRL_PAUSE or SERVICE_CTRL_CONTINUE, to pause or
+// continue redirection.
+//
+
+ SERVICE_CTRL_REDIR_DISK = $1;
+ {$EXTERNALSYM SERVICE_CTRL_REDIR_DISK}
+ SERVICE_CTRL_REDIR_PRINT = $2;
+ {$EXTERNALSYM SERVICE_CTRL_REDIR_PRINT}
+ SERVICE_CTRL_REDIR_COMM = $4;
+ {$EXTERNALSYM SERVICE_CTRL_REDIR_COMM}
+
+//
+// Values for svci1_code, and svci2_code when status
+// of the service is SERVICE_INSTALL_PENDING or
+// SERVICE_UNINSTALL_PENDING.
+// A service can optionally provide a hint to the installer
+// that the install is proceeding and how long to wait
+// (in 0.1 second increments) before querying status again.
+//
+
+ SERVICE_IP_NO_HINT = $0;
+ {$EXTERNALSYM SERVICE_IP_NO_HINT}
+ SERVICE_CCP_NO_HINT = $0;
+ {$EXTERNALSYM SERVICE_CCP_NO_HINT}
+
+ SERVICE_IP_QUERY_HINT = $10000;
+ {$EXTERNALSYM SERVICE_IP_QUERY_HINT}
+ SERVICE_CCP_QUERY_HINT = $10000;
+ {$EXTERNALSYM SERVICE_CCP_QUERY_HINT}
+
+//
+// Mask for install proceeding checkpoint number
+//
+
+ SERVICE_IP_CHKPT_NUM = $0FF;
+ {$EXTERNALSYM SERVICE_IP_CHKPT_NUM}
+ SERVICE_CCP_CHKPT_NUM = $0FF;
+ {$EXTERNALSYM SERVICE_CCP_CHKPT_NUM}
+
+//
+// Mask for wait time hint before querying again
+//
+
+ SERVICE_IP_WAIT_TIME = $0FF00;
+ {$EXTERNALSYM SERVICE_IP_WAIT_TIME}
+ SERVICE_CCP_WAIT_TIME = $0FF00;
+ {$EXTERNALSYM SERVICE_CCP_WAIT_TIME}
+
+//
+// Shift count for building wait time _code values
+//
+
+ SERVICE_IP_WAITTIME_SHIFT = 8;
+ {$EXTERNALSYM SERVICE_IP_WAITTIME_SHIFT}
+ SERVICE_NTIP_WAITTIME_SHIFT = 12;
+ {$EXTERNALSYM SERVICE_NTIP_WAITTIME_SHIFT}
+
+//
+// Mask used for upper and lower portions of wait hint time.
+//
+
+ UPPER_HINT_MASK = $0000FF00;
+ {$EXTERNALSYM UPPER_HINT_MASK}
+ LOWER_HINT_MASK = $000000FF;
+ {$EXTERNALSYM LOWER_HINT_MASK}
+ UPPER_GET_HINT_MASK = $0FF00000;
+ {$EXTERNALSYM UPPER_GET_HINT_MASK}
+ LOWER_GET_HINT_MASK = $0000FF00;
+ {$EXTERNALSYM LOWER_GET_HINT_MASK}
+ SERVICE_NT_MAXTIME = $0000FFFF;
+ {$EXTERNALSYM SERVICE_NT_MAXTIME}
+ SERVICE_RESRV_MASK = $0001FFFF;
+ {$EXTERNALSYM SERVICE_RESRV_MASK}
+ SERVICE_MAXTIME = $000000FF;
+ {$EXTERNALSYM SERVICE_MAXTIME}
+
+//
+// SERVICE_BASE is the base of service error codes,
+// chosen to avoid conflict with OS, redirector,
+// netapi, and errlog codes.
+//
+// Don't change the comments following the manifest constants without
+// understanding how mapmsg works.
+//
+
+ SERVICE_BASE = 3050;
+ {$EXTERNALSYM SERVICE_BASE}
+ SERVICE_UIC_NORMAL = 0;
+ {$EXTERNALSYM SERVICE_UIC_NORMAL}
+
+{*
+ * Uninstall codes, to be used in high byte of 'code' on final NetStatus,
+ * which sets the status to UNINSTALLED.
+ *}
+
+ SERVICE_UIC_BADPARMVAL = SERVICE_BASE + 1;
+ {$EXTERNALSYM SERVICE_UIC_BADPARMVAL}
+
+{*
+ * The Registry or the information you just typed includes an illegal
+ * value for "%1".
+ *}
+
+ SERVICE_UIC_MISSPARM = SERVICE_BASE + 2;
+ {$EXTERNALSYM SERVICE_UIC_MISSPARM}
+
+{*
+ * The required parameter was not provided on the command
+ * line or in the configuration file.
+ *}
+
+ SERVICE_UIC_UNKPARM = SERVICE_BASE + 3;
+ {$EXTERNALSYM SERVICE_UIC_UNKPARM}
+
+{*
+ * LAN Manager does not recognize "%1" as a valid option.
+ *}
+
+ SERVICE_UIC_RESOURCE = SERVICE_BASE + 4;
+ {$EXTERNALSYM SERVICE_UIC_RESOURCE}
+
+{*
+ * A request for resource could not be satisfied.
+ *}
+
+ SERVICE_UIC_CONFIG = SERVICE_BASE + 5;
+ {$EXTERNALSYM SERVICE_UIC_CONFIG}
+
+{*
+ * A problem exists with the system configuration.
+ *}
+
+ SERVICE_UIC_SYSTEM = SERVICE_BASE + 6;
+ {$EXTERNALSYM SERVICE_UIC_SYSTEM}
+
+{*
+ * A system error has occurred.
+ *}
+
+ SERVICE_UIC_INTERNAL = SERVICE_BASE + 7;
+ {$EXTERNALSYM SERVICE_UIC_INTERNAL}
+
+{*
+ * An internal consistency error has occurred.
+ *}
+
+ SERVICE_UIC_AMBIGPARM = SERVICE_BASE + 8;
+ {$EXTERNALSYM SERVICE_UIC_AMBIGPARM}
+
+{*
+ * The configuration file or the command line has an ambiguous option.
+ *}
+
+ SERVICE_UIC_DUPPARM = SERVICE_BASE + 9;
+ {$EXTERNALSYM SERVICE_UIC_DUPPARM}
+
+{*
+ * The configuration file or the command line has a duplicate parameter.
+ *}
+
+ SERVICE_UIC_KILL = SERVICE_BASE + 10;
+ {$EXTERNALSYM SERVICE_UIC_KILL}
+
+{*
+ * The service did not respond to control and was stopped with
+ * the DosKillProc function.
+ *}
+
+ SERVICE_UIC_EXEC = SERVICE_BASE + 11;
+ {$EXTERNALSYM SERVICE_UIC_EXEC}
+
+{*
+ * An error occurred when attempting to run the service program.
+ *}
+
+ SERVICE_UIC_SUBSERV = SERVICE_BASE + 12;
+ {$EXTERNALSYM SERVICE_UIC_SUBSERV}
+
+{*
+ * The sub-service failed to start.
+ *}
+
+ SERVICE_UIC_CONFLPARM = SERVICE_BASE + 13;
+ {$EXTERNALSYM SERVICE_UIC_CONFLPARM}
+
+{*
+ * There is a conflict in the value or use of these options: %1.
+ *}
+
+ SERVICE_UIC_FILE = SERVICE_BASE + 14;
+ {$EXTERNALSYM SERVICE_UIC_FILE}
+
+{*
+ * There is a problem with the file.
+ *}
+
+//
+// The modifiers
+//
+
+//
+// General:
+//
+
+ SERVICE_UIC_M_NULL = 0;
+ {$EXTERNALSYM SERVICE_UIC_M_NULL}
+
+//
+// RESOURCE:
+//
+
+ SERVICE_UIC_M_MEMORY = SERVICE_BASE + 20; // memory
+ {$EXTERNALSYM SERVICE_UIC_M_MEMORY}
+ SERVICE_UIC_M_DISK = SERVICE_BASE + 21; // disk space
+ {$EXTERNALSYM SERVICE_UIC_M_DISK}
+ SERVICE_UIC_M_THREADS = SERVICE_BASE + 22; // thread
+ {$EXTERNALSYM SERVICE_UIC_M_THREADS}
+ SERVICE_UIC_M_PROCESSES = SERVICE_BASE + 23; // process
+ {$EXTERNALSYM SERVICE_UIC_M_PROCESSES}
+
+//
+// CONFIG:
+//
+
+//
+// Security failure
+//
+
+ SERVICE_UIC_M_SECURITY = SERVICE_BASE + 24;
+ {$EXTERNALSYM SERVICE_UIC_M_SECURITY}
+
+{* Security Failure. %0 *}
+
+ SERVICE_UIC_M_LANROOT = SERVICE_BASE + 25;
+ {$EXTERNALSYM SERVICE_UIC_M_LANROOT}
+
+{*
+ * Bad or missing LAN Manager root directory.
+ *}
+
+ SERVICE_UIC_M_REDIR = SERVICE_BASE + 26;
+ {$EXTERNALSYM SERVICE_UIC_M_REDIR}
+
+{*
+ * The network software is not installed.
+ *}
+
+ SERVICE_UIC_M_SERVER = SERVICE_BASE + 27;
+ {$EXTERNALSYM SERVICE_UIC_M_SERVER}
+
+{*
+ * The server is not started.
+ *}
+
+ SERVICE_UIC_M_SEC_FILE_ERR = SERVICE_BASE + 28;
+ {$EXTERNALSYM SERVICE_UIC_M_SEC_FILE_ERR}
+
+{*
+ * The server cannot access the user accounts database (NET.ACC).
+ *}
+
+ SERVICE_UIC_M_FILES = SERVICE_BASE + 29;
+ {$EXTERNALSYM SERVICE_UIC_M_FILES}
+
+{*
+ * Incompatible files are installed in the LANMAN tree.
+ *}
+
+ SERVICE_UIC_M_LOGS = SERVICE_BASE + 30;
+ {$EXTERNALSYM SERVICE_UIC_M_LOGS}
+
+{*
+ * The LANMAN\LOGS directory is invalid.
+ *}
+
+ SERVICE_UIC_M_LANGROUP = SERVICE_BASE + 31;
+ {$EXTERNALSYM SERVICE_UIC_M_LANGROUP}
+
+{*
+ * The domain specified could not be used.
+ *}
+
+ SERVICE_UIC_M_MSGNAME = SERVICE_BASE + 32;
+ {$EXTERNALSYM SERVICE_UIC_M_MSGNAME}
+
+{*
+ * The computer name is being used as a message alias on another computer.
+ *}
+
+ SERVICE_UIC_M_ANNOUNCE = SERVICE_BASE + 33;
+ {$EXTERNALSYM SERVICE_UIC_M_ANNOUNCE}
+
+{*
+ * The announcement of the server name failed.
+ *}
+
+ SERVICE_UIC_M_UAS = SERVICE_BASE + 34;
+ {$EXTERNALSYM SERVICE_UIC_M_UAS}
+
+{*
+ * The user accounts database is not configured correctly.
+ *}
+
+ SERVICE_UIC_M_SERVER_SEC_ERR = SERVICE_BASE + 35;
+ {$EXTERNALSYM SERVICE_UIC_M_SERVER_SEC_ERR}
+
+{*
+ * The server is not running with user-level security.
+ *}
+
+ SERVICE_UIC_M_WKSTA = SERVICE_BASE + 37;
+ {$EXTERNALSYM SERVICE_UIC_M_WKSTA}
+
+{*
+ * The workstation is not configured properly.
+ *}
+
+ SERVICE_UIC_M_ERRLOG = SERVICE_BASE + 38;
+ {$EXTERNALSYM SERVICE_UIC_M_ERRLOG}
+
+{*
+ * View your error log for details.
+ *}
+
+ SERVICE_UIC_M_FILE_UW = SERVICE_BASE + 39;
+ {$EXTERNALSYM SERVICE_UIC_M_FILE_UW}
+
+{*
+ * Unable to write to this file.
+ *}
+
+ SERVICE_UIC_M_ADDPAK = SERVICE_BASE + 40;
+ {$EXTERNALSYM SERVICE_UIC_M_ADDPAK}
+
+{*
+ * ADDPAK file is corrupted. Delete LANMAN\NETPROG\ADDPAK.SER
+ * and reapply all ADDPAKs.
+ *}
+
+ SERVICE_UIC_M_LAZY = SERVICE_BASE + 41;
+ {$EXTERNALSYM SERVICE_UIC_M_LAZY}
+
+{*
+ * The LM386 server cannot be started because CACHE.EXE is not running.
+ *}
+
+ SERVICE_UIC_M_UAS_MACHINE_ACCT = SERVICE_BASE + 42;
+ {$EXTERNALSYM SERVICE_UIC_M_UAS_MACHINE_ACCT}
+
+{*
+ * There is no account for this computer in the security database.
+ *}
+
+ SERVICE_UIC_M_UAS_SERVERS_NMEMB = SERVICE_BASE + 43;
+ {$EXTERNALSYM SERVICE_UIC_M_UAS_SERVERS_NMEMB}
+
+{*
+ * This computer is not a member of the group SERVERS.
+ *}
+
+ SERVICE_UIC_M_UAS_SERVERS_NOGRP = SERVICE_BASE + 44;
+ {$EXTERNALSYM SERVICE_UIC_M_UAS_SERVERS_NOGRP}
+
+{*
+ * The group SERVERS is not present in the local security database.
+ *}
+
+ SERVICE_UIC_M_UAS_INVALID_ROLE = SERVICE_BASE + 45;
+ {$EXTERNALSYM SERVICE_UIC_M_UAS_INVALID_ROLE}
+
+{*
+ * This computer is configured as a member of a workgroup, not as
+ * a member of a domain. The Netlogon service does not need to run in this
+ * configuration.
+ *}
+
+ SERVICE_UIC_M_NETLOGON_NO_DC = SERVICE_BASE + 46;
+ {$EXTERNALSYM SERVICE_UIC_M_NETLOGON_NO_DC}
+
+{*
+ * The primary Domain Controller for this domain could not be located.
+ *}
+
+ SERVICE_UIC_M_NETLOGON_DC_CFLCT = SERVICE_BASE + 47;
+ {$EXTERNALSYM SERVICE_UIC_M_NETLOGON_DC_CFLCT}
+
+{*
+ * This computer is configured to be the primary domain controller of its domain.
+ * However, the computer %1 is currently claiming to be the primary domain controller
+ * of the domain.
+ *}
+
+ SERVICE_UIC_M_NETLOGON_AUTH = SERVICE_BASE + 48;
+ {$EXTERNALSYM SERVICE_UIC_M_NETLOGON_AUTH}
+
+{*
+ * The service failed to authenticate with the primary domain controller.
+ *}
+
+ SERVICE_UIC_M_UAS_PROLOG = SERVICE_BASE + 49;
+ {$EXTERNALSYM SERVICE_UIC_M_UAS_PROLOG}
+
+{*
+ * There is a problem with the security database creation date or serial number.
+ *}
+
+ SERVICE2_BASE = 5600;
+ {$EXTERNALSYM SERVICE2_BASE}
+
+{* new SEVICE_UIC messages go here *}
+
+ SERVICE_UIC_M_NETLOGON_MPATH = SERVICE2_BASE + 0;
+ {$EXTERNALSYM SERVICE_UIC_M_NETLOGON_MPATH}
+
+{*
+ * Could not share the User or Script path.
+ *}
+
+ SERVICE_UIC_M_LSA_MACHINE_ACCT = SERVICE2_BASE + 1;
+ {$EXTERNALSYM SERVICE_UIC_M_LSA_MACHINE_ACCT}
+
+{*
+ * The password for this computer is not found in the local security
+ * database.
+ *}
+
+ SERVICE_UIC_M_DATABASE_ERROR = SERVICE2_BASE + 2;
+ {$EXTERNALSYM SERVICE_UIC_M_DATABASE_ERROR}
+
+{*
+ * An internal error occurred while accessing the computer's
+ * local or network security database.
+ *}
+
+//
+// End modifiers
+//
+
+//
+// Commonly used Macros:
+//
+
+function SERVICE_IP_CODE(tt, nn: LONG): LONG;
+{$EXTERNALSYM SERVICE_IP_CODE}
+
+function SERVICE_CCP_CODE(tt, nn: LONG): LONG;
+{$EXTERNALSYM SERVICE_CCP_CODE}
+
+function SERVICE_UIC_CODE(cc, mm: LONG): LONG;
+{$EXTERNALSYM SERVICE_UIC_CODE}
+
+//
+// This macro takes a wait hint (tt) which can have a maximum value of
+// 0xFFFF and puts it into the service status code field.
+// 0x0FF1FFnn (where nn is the checkpoint information).
+//
+
+function SERVICE_NT_CCP_CODE(tt, nn: LONG): LONG;
+{$EXTERNALSYM SERVICE_NT_CCP_CODE}
+
+//
+// This macro takes a status code field, and strips out the wait hint
+// from the upper and lower sections.
+// 0x0FF1FFnn results in 0x0000FFFF.
+//
+
+function SERVICE_NT_WAIT_GET(code: DWORD): DWORD;
+{$EXTERNALSYM SERVICE_NT_WAIT_GET}
+
+implementation
+
+// #define SERVICE_IP_CODE(tt,nn) ((long)SERVICE_IP_QUERY_HINT|(long)(nn|(tt<<SERVICE_IP_WAITTIME_SHIFT)))
+
+function SERVICE_IP_CODE(tt, nn: LONG): LONG;
+begin
+ Result := SERVICE_IP_QUERY_HINT or (nn or (tt shl SERVICE_IP_WAITTIME_SHIFT));
+end;
+
+// #define SERVICE_CCP_CODE(tt,nn) ((long)SERVICE_CCP_QUERY_HINT|(long)(nn|(tt<<SERVICE_IP_WAITTIME_SHIFT)))
+
+function SERVICE_CCP_CODE(tt, nn: LONG): LONG;
+begin
+ Result := SERVICE_CCP_QUERY_HINT or (nn or (tt shl SERVICE_IP_WAITTIME_SHIFT));
+end;
+
+// #define SERVICE_UIC_CODE(cc,mm) ((long)(((long)cc<<16)|(long)(unsigned short)mm))
+
+function SERVICE_UIC_CODE(cc, mm: LONG): LONG;
+begin
+ Result := (cc shl 16) or WORD(mm);
+end;
+
+// #define SERVICE_NT_CCP_CODE(tt,nn) \
+// ( \
+// ((long)SERVICE_CCP_QUERY_HINT) | \
+// ((long)(nn)) | \
+// (((tt)&LOWER_HINT_MASK) << SERVICE_IP_WAITTIME_SHIFT) | \
+// (((tt)&UPPER_HINT_MASK) << SERVICE_NTIP_WAITTIME_SHIFT) \
+// )
+
+function SERVICE_NT_CCP_CODE(tt, nn: Longint): Longint;
+begin
+ Result := SERVICE_CCP_QUERY_HINT or nn or ((tt and LOWER_HINT_MASK) shl SERVICE_IP_WAITTIME_SHIFT) or ((tt and UPPER_HINT_MASK) shl SERVICE_NTIP_WAITTIME_SHIFT);
+end;
+
+// #define SERVICE_NT_WAIT_GET(code) \
+// ( \
+// (((code) & UPPER_GET_HINT_MASK) >> SERVICE_NTIP_WAITTIME_SHIFT) | \
+// (((code) & LOWER_GET_HINT_MASK) >> SERVICE_IP_WAITTIME_SHIFT) \
+// )
+
+function SERVICE_NT_WAIT_GET(code: DWORD): DWORD;
+begin
+ Result := ((code and UPPER_GET_HINT_MASK) shr SERVICE_NTIP_WAITTIME_SHIFT) or ((code and LOWER_GET_HINT_MASK) shr SERVICE_IP_WAITTIME_SHIFT);
+end;
+
+{$IFDEF DYNAMIC_LINK}
+
+var
+ _NetServiceControl: Pointer;
+
+function NetServiceControl;
+begin
+ GetProcedureAddress(_NetServiceControl, netapi32, 'NetServiceControl');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetServiceControl]
+ end;
+end;
+
+var
+ _NetServiceEnum: Pointer;
+
+function NetServiceEnum;
+begin
+ GetProcedureAddress(_NetServiceEnum, netapi32, 'NetServiceEnum');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetServiceEnum]
+ end;
+end;
+
+var
+ _NetServiceGetInfo: Pointer;
+
+function NetServiceGetInfo;
+begin
+ GetProcedureAddress(_NetServiceGetInfo, netapi32, 'NetServiceGetInfo');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetServiceGetInfo]
+ end;
+end;
+
+var
+ _NetServiceInstall: Pointer;
+
+function NetServiceInstall;
+begin
+ GetProcedureAddress(_NetServiceInstall, netapi32, 'NetServiceInstall');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetServiceInstall]
+ end;
+end;
+
+{$ELSE}
+
+function NetServiceControl; external netapi32 name 'NetServiceControl';
+function NetServiceEnum; external netapi32 name 'NetServiceEnum';
+function NetServiceGetInfo; external netapi32 name 'NetServiceGetInfo';
+function NetServiceInstall; external netapi32 name 'NetServiceInstall';
+
+{$ENDIF DYNAMIC_LINK}
+
+end.
diff --git a/packages/extra/winunits/jwalmuse.pas b/packages/extra/winunits/jwalmuse.pas
index 10c8d2ada4..7f04e4ba82 100644
--- a/packages/extra/winunits/jwalmuse.pas
+++ b/packages/extra/winunits/jwalmuse.pas
@@ -1,286 +1,286 @@
-{******************************************************************************}
-{ }
-{ Lan Manager Use API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: lmuse.h, released November 2001. The original Pascal }
-{ code is: LmUse.pas, released Februari 2002. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwalmuse.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaLmUse;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "lmuse.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaLmCons, JwaWinType;
-
-//
-// Function Prototypes
-//
-
-function NetUseAdd(UncServerName: LMSTR; Level: DWORD; Buf: LPBYTE; ParmError: LPDWORD): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetUseAdd}
-
-function NetUseDel(UncServerName: LMSTR; UseName: LMSTR; ForceCond: DWORD): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetUseDel}
-
-function NetUseEnum(UncServerName: LMSTR; Level: DWORD; var BufPtr: LPBYTE; PreferedMaximumSize: DWORD; EntriesRead: LPDWORD; TotalEntries: LPDWORD; ResumeHandle: LPDWORD): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetUseEnum}
-
-function NetUseGetInfo(UncServerName: LMSTR; UseName: LMSTR; Level: DWORD; var BufPtr: LPBYTE): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetUseGetInfo}
-
-//
-// Data Structures
-//
-
-type
- _USE_INFO_0 = record
- ui0_local: LMSTR;
- ui0_remote: LMSTR;
- end;
- {$EXTERNALSYM _USE_INFO_0}
- USE_INFO_0 = _USE_INFO_0;
- {$EXTERNALSYM USE_INFO_0}
- PUSE_INFO_0 = ^USE_INFO_0;
- {$EXTERNALSYM PUSE_INFO_0}
- LPUSE_INFO_0 = ^USE_INFO_0;
- {$EXTERNALSYM LPUSE_INFO_0}
- TUseInfo0 = USE_INFO_0;
- PUseInfo0 = PUSE_INFO_0;
-
- _USE_INFO_1 = record
- ui1_local: LMSTR;
- ui1_remote: LMSTR;
- ui1_password: LMSTR;
- ui1_status: DWORD;
- ui1_asg_type: DWORD;
- ui1_refcount: DWORD;
- ui1_usecount: DWORD;
- end;
- {$EXTERNALSYM _USE_INFO_1}
- USE_INFO_1 = _USE_INFO_1;
- {$EXTERNALSYM USE_INFO_1}
- PUSE_INFO_1 = ^USE_INFO_1;
- {$EXTERNALSYM PUSE_INFO_1}
- LPUSE_INFO_1 = ^USE_INFO_1;
- {$EXTERNALSYM LPUSE_INFO_1}
- TUseInfo1 = USE_INFO_1;
- PUseInfo1 = PUSE_INFO_1;
-
- _USE_INFO_2 = record
- ui2_local: LMSTR;
- ui2_remote: LMSTR;
- ui2_password: LMSTR;
- ui2_status: DWORD;
- ui2_asg_type: DWORD;
- ui2_refcount: DWORD;
- ui2_usecount: DWORD;
- ui2_username: LMSTR;
- ui2_domainname: LMSTR;
- end;
- {$EXTERNALSYM _USE_INFO_2}
- USE_INFO_2 = _USE_INFO_2;
- {$EXTERNALSYM USE_INFO_2}
- PUSE_INFO_2 = ^USE_INFO_2;
- {$EXTERNALSYM PUSE_INFO_2}
- LPUSE_INFO_2 = ^USE_INFO_2;
- {$EXTERNALSYM LPUSE_INFO_2}
- TUseInfo2 = USE_INFO_2;
- PUseInfo2 = PUSE_INFO_2;
-
- _USE_INFO_3 = record
- ui3_ui2: USE_INFO_2;
- ui3_flags: ULONG;
- end;
- {$EXTERNALSYM _USE_INFO_3}
- USE_INFO_3 = _USE_INFO_3;
- {$EXTERNALSYM USE_INFO_3}
- PUSE_INFO_3 = ^USE_INFO_3;
- {$EXTERNALSYM PUSE_INFO_3}
- LPUSE_INFO_3 = ^USE_INFO_3;
- {$EXTERNALSYM LPUSE_INFO_3}
- TUseInfo3 = USE_INFO_3;
- PUseInfo3 = PUSE_INFO_3;
-
-//
-// Special Values and Constants
-//
-
-//
-// One of these values indicates the parameter within an information
-// structure that is invalid when ERROR_INVALID_PARAMETER is returned by
-// NetUseAdd.
-//
-
-const
- USE_LOCAL_PARMNUM = 1;
- {$EXTERNALSYM USE_LOCAL_PARMNUM}
- USE_REMOTE_PARMNUM = 2;
- {$EXTERNALSYM USE_REMOTE_PARMNUM}
- USE_PASSWORD_PARMNUM = 3;
- {$EXTERNALSYM USE_PASSWORD_PARMNUM}
- USE_ASGTYPE_PARMNUM = 4;
- {$EXTERNALSYM USE_ASGTYPE_PARMNUM}
- USE_USERNAME_PARMNUM = 5;
- {$EXTERNALSYM USE_USERNAME_PARMNUM}
- USE_DOMAINNAME_PARMNUM = 6;
- {$EXTERNALSYM USE_DOMAINNAME_PARMNUM}
-
-//
-// Values appearing in the ui1_status field of use_info_1 structure.
-// Note that USE_SESSLOST and USE_DISCONN are synonyms.
-//
-
- USE_OK = 0;
- {$EXTERNALSYM USE_OK}
- USE_PAUSED = 1;
- {$EXTERNALSYM USE_PAUSED}
- USE_SESSLOST = 2;
- {$EXTERNALSYM USE_SESSLOST}
- USE_DISCONN = 2;
- {$EXTERNALSYM USE_DISCONN}
- USE_NETERR = 3;
- {$EXTERNALSYM USE_NETERR}
- USE_CONN = 4;
- {$EXTERNALSYM USE_CONN}
- USE_RECONN = 5;
- {$EXTERNALSYM USE_RECONN}
-
-//
-// Values of the ui1_asg_type field of use_info_1 structure
-//
-
- USE_WILDCARD = DWORD(-1);
- {$EXTERNALSYM USE_WILDCARD}
- USE_DISKDEV = 0;
- {$EXTERNALSYM USE_DISKDEV}
- USE_SPOOLDEV = 1;
- {$EXTERNALSYM USE_SPOOLDEV}
- USE_CHARDEV = 2;
- {$EXTERNALSYM USE_CHARDEV}
- USE_IPC = 3;
- {$EXTERNALSYM USE_IPC}
-
-//
-// Flags defined in the use_info_3 structure
-//
-
- CREATE_NO_CONNECT = $1; // creation flags
- {$EXTERNALSYM CREATE_NO_CONNECT}
- CREATE_BYPASS_CSC = $2; // force connection to server, bypassing CSC
- {$EXTERNALSYM CREATE_BYPASS_CSC}
- // all ops on this connection go to the server,
- // never to the cache
- USE_DEFAULT_CREDENTIALS = $4; // No explicit credentials passed to NetUseAdd
- {$EXTERNALSYM USE_DEFAULT_CREDENTIALS}
-
-implementation
-
-{$IFDEF DYNAMIC_LINK}
-
-var
- _NetUseAdd: Pointer;
-
-function NetUseAdd;
-begin
- GetProcedureAddress(_NetUseAdd, netapi32, 'NetUseAdd');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetUseAdd]
- end;
-end;
-
-var
- _NetUseDel: Pointer;
-
-function NetUseDel;
-begin
- GetProcedureAddress(_NetUseDel, netapi32, 'NetUseDel');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetUseDel]
- end;
-end;
-
-var
- _NetUseEnum: Pointer;
-
-function NetUseEnum;
-begin
- GetProcedureAddress(_NetUseEnum, netapi32, 'NetUseEnum');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetUseEnum]
- end;
-end;
-
-var
- _NetUseGetInfo: Pointer;
-
-function NetUseGetInfo;
-begin
- GetProcedureAddress(_NetUseGetInfo, netapi32, 'NetUseGetInfo');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetUseGetInfo]
- end;
-end;
-
-{$ELSE}
-
-function NetUseAdd; external netapi32 name 'NetUseAdd';
-function NetUseDel; external netapi32 name 'NetUseDel';
-function NetUseEnum; external netapi32 name 'NetUseEnum';
-function NetUseGetInfo; external netapi32 name 'NetUseGetInfo';
-
-{$ENDIF DYNAMIC_LINK}
-
-end.
+{******************************************************************************}
+{ }
+{ Lan Manager Use API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: lmuse.h, released November 2001. The original Pascal }
+{ code is: LmUse.pas, released Februari 2002. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwalmuse.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaLmUse;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "lmuse.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaLmCons, JwaWinType;
+
+//
+// Function Prototypes
+//
+
+function NetUseAdd(UncServerName: LMSTR; Level: DWORD; Buf: LPBYTE; ParmError: LPDWORD): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetUseAdd}
+
+function NetUseDel(UncServerName: LMSTR; UseName: LMSTR; ForceCond: DWORD): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetUseDel}
+
+function NetUseEnum(UncServerName: LMSTR; Level: DWORD; var BufPtr: LPBYTE; PreferedMaximumSize: DWORD; EntriesRead: LPDWORD; TotalEntries: LPDWORD; ResumeHandle: LPDWORD): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetUseEnum}
+
+function NetUseGetInfo(UncServerName: LMSTR; UseName: LMSTR; Level: DWORD; var BufPtr: LPBYTE): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetUseGetInfo}
+
+//
+// Data Structures
+//
+
+type
+ _USE_INFO_0 = record
+ ui0_local: LMSTR;
+ ui0_remote: LMSTR;
+ end;
+ {$EXTERNALSYM _USE_INFO_0}
+ USE_INFO_0 = _USE_INFO_0;
+ {$EXTERNALSYM USE_INFO_0}
+ PUSE_INFO_0 = ^USE_INFO_0;
+ {$EXTERNALSYM PUSE_INFO_0}
+ LPUSE_INFO_0 = ^USE_INFO_0;
+ {$EXTERNALSYM LPUSE_INFO_0}
+ TUseInfo0 = USE_INFO_0;
+ PUseInfo0 = PUSE_INFO_0;
+
+ _USE_INFO_1 = record
+ ui1_local: LMSTR;
+ ui1_remote: LMSTR;
+ ui1_password: LMSTR;
+ ui1_status: DWORD;
+ ui1_asg_type: DWORD;
+ ui1_refcount: DWORD;
+ ui1_usecount: DWORD;
+ end;
+ {$EXTERNALSYM _USE_INFO_1}
+ USE_INFO_1 = _USE_INFO_1;
+ {$EXTERNALSYM USE_INFO_1}
+ PUSE_INFO_1 = ^USE_INFO_1;
+ {$EXTERNALSYM PUSE_INFO_1}
+ LPUSE_INFO_1 = ^USE_INFO_1;
+ {$EXTERNALSYM LPUSE_INFO_1}
+ TUseInfo1 = USE_INFO_1;
+ PUseInfo1 = PUSE_INFO_1;
+
+ _USE_INFO_2 = record
+ ui2_local: LMSTR;
+ ui2_remote: LMSTR;
+ ui2_password: LMSTR;
+ ui2_status: DWORD;
+ ui2_asg_type: DWORD;
+ ui2_refcount: DWORD;
+ ui2_usecount: DWORD;
+ ui2_username: LMSTR;
+ ui2_domainname: LMSTR;
+ end;
+ {$EXTERNALSYM _USE_INFO_2}
+ USE_INFO_2 = _USE_INFO_2;
+ {$EXTERNALSYM USE_INFO_2}
+ PUSE_INFO_2 = ^USE_INFO_2;
+ {$EXTERNALSYM PUSE_INFO_2}
+ LPUSE_INFO_2 = ^USE_INFO_2;
+ {$EXTERNALSYM LPUSE_INFO_2}
+ TUseInfo2 = USE_INFO_2;
+ PUseInfo2 = PUSE_INFO_2;
+
+ _USE_INFO_3 = record
+ ui3_ui2: USE_INFO_2;
+ ui3_flags: ULONG;
+ end;
+ {$EXTERNALSYM _USE_INFO_3}
+ USE_INFO_3 = _USE_INFO_3;
+ {$EXTERNALSYM USE_INFO_3}
+ PUSE_INFO_3 = ^USE_INFO_3;
+ {$EXTERNALSYM PUSE_INFO_3}
+ LPUSE_INFO_3 = ^USE_INFO_3;
+ {$EXTERNALSYM LPUSE_INFO_3}
+ TUseInfo3 = USE_INFO_3;
+ PUseInfo3 = PUSE_INFO_3;
+
+//
+// Special Values and Constants
+//
+
+//
+// One of these values indicates the parameter within an information
+// structure that is invalid when ERROR_INVALID_PARAMETER is returned by
+// NetUseAdd.
+//
+
+const
+ USE_LOCAL_PARMNUM = 1;
+ {$EXTERNALSYM USE_LOCAL_PARMNUM}
+ USE_REMOTE_PARMNUM = 2;
+ {$EXTERNALSYM USE_REMOTE_PARMNUM}
+ USE_PASSWORD_PARMNUM = 3;
+ {$EXTERNALSYM USE_PASSWORD_PARMNUM}
+ USE_ASGTYPE_PARMNUM = 4;
+ {$EXTERNALSYM USE_ASGTYPE_PARMNUM}
+ USE_USERNAME_PARMNUM = 5;
+ {$EXTERNALSYM USE_USERNAME_PARMNUM}
+ USE_DOMAINNAME_PARMNUM = 6;
+ {$EXTERNALSYM USE_DOMAINNAME_PARMNUM}
+
+//
+// Values appearing in the ui1_status field of use_info_1 structure.
+// Note that USE_SESSLOST and USE_DISCONN are synonyms.
+//
+
+ USE_OK = 0;
+ {$EXTERNALSYM USE_OK}
+ USE_PAUSED = 1;
+ {$EXTERNALSYM USE_PAUSED}
+ USE_SESSLOST = 2;
+ {$EXTERNALSYM USE_SESSLOST}
+ USE_DISCONN = 2;
+ {$EXTERNALSYM USE_DISCONN}
+ USE_NETERR = 3;
+ {$EXTERNALSYM USE_NETERR}
+ USE_CONN = 4;
+ {$EXTERNALSYM USE_CONN}
+ USE_RECONN = 5;
+ {$EXTERNALSYM USE_RECONN}
+
+//
+// Values of the ui1_asg_type field of use_info_1 structure
+//
+
+ USE_WILDCARD = DWORD(-1);
+ {$EXTERNALSYM USE_WILDCARD}
+ USE_DISKDEV = 0;
+ {$EXTERNALSYM USE_DISKDEV}
+ USE_SPOOLDEV = 1;
+ {$EXTERNALSYM USE_SPOOLDEV}
+ USE_CHARDEV = 2;
+ {$EXTERNALSYM USE_CHARDEV}
+ USE_IPC = 3;
+ {$EXTERNALSYM USE_IPC}
+
+//
+// Flags defined in the use_info_3 structure
+//
+
+ CREATE_NO_CONNECT = $1; // creation flags
+ {$EXTERNALSYM CREATE_NO_CONNECT}
+ CREATE_BYPASS_CSC = $2; // force connection to server, bypassing CSC
+ {$EXTERNALSYM CREATE_BYPASS_CSC}
+ // all ops on this connection go to the server,
+ // never to the cache
+ USE_DEFAULT_CREDENTIALS = $4; // No explicit credentials passed to NetUseAdd
+ {$EXTERNALSYM USE_DEFAULT_CREDENTIALS}
+
+implementation
+
+{$IFDEF DYNAMIC_LINK}
+
+var
+ _NetUseAdd: Pointer;
+
+function NetUseAdd;
+begin
+ GetProcedureAddress(_NetUseAdd, netapi32, 'NetUseAdd');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetUseAdd]
+ end;
+end;
+
+var
+ _NetUseDel: Pointer;
+
+function NetUseDel;
+begin
+ GetProcedureAddress(_NetUseDel, netapi32, 'NetUseDel');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetUseDel]
+ end;
+end;
+
+var
+ _NetUseEnum: Pointer;
+
+function NetUseEnum;
+begin
+ GetProcedureAddress(_NetUseEnum, netapi32, 'NetUseEnum');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetUseEnum]
+ end;
+end;
+
+var
+ _NetUseGetInfo: Pointer;
+
+function NetUseGetInfo;
+begin
+ GetProcedureAddress(_NetUseGetInfo, netapi32, 'NetUseGetInfo');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetUseGetInfo]
+ end;
+end;
+
+{$ELSE}
+
+function NetUseAdd; external netapi32 name 'NetUseAdd';
+function NetUseDel; external netapi32 name 'NetUseDel';
+function NetUseEnum; external netapi32 name 'NetUseEnum';
+function NetUseGetInfo; external netapi32 name 'NetUseGetInfo';
+
+{$ENDIF DYNAMIC_LINK}
+
+end.
diff --git a/packages/extra/winunits/jwalmuseflg.pas b/packages/extra/winunits/jwalmuseflg.pas
index f00840fbd3..d91be1d70f 100644
--- a/packages/extra/winunits/jwalmuseflg.pas
+++ b/packages/extra/winunits/jwalmuseflg.pas
@@ -1,71 +1,71 @@
-{******************************************************************************}
-{ }
-{ Lan Manager Deletion Force Levels API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: lmuseflg.h, released November 2001. The original Pascal}
-{ code is: LmUseFlg.pas, released Februari 2002. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwalmuseflg.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaLmUseFlg;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "lmuseflg.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-//
-// Definition for NetWkstaTransportDel and NetUseDel deletion force levels
-//
-
-const
- USE_NOFORCE = 0;
- {$EXTERNALSYM USE_NOFORCE}
- USE_FORCE = 1;
- {$EXTERNALSYM USE_FORCE}
- USE_LOTS_OF_FORCE = 2;
- {$EXTERNALSYM USE_LOTS_OF_FORCE}
-
-implementation
-
-end.
+{******************************************************************************}
+{ }
+{ Lan Manager Deletion Force Levels API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: lmuseflg.h, released November 2001. The original Pascal}
+{ code is: LmUseFlg.pas, released Februari 2002. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwalmuseflg.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaLmUseFlg;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "lmuseflg.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+//
+// Definition for NetWkstaTransportDel and NetUseDel deletion force levels
+//
+
+const
+ USE_NOFORCE = 0;
+ {$EXTERNALSYM USE_NOFORCE}
+ USE_FORCE = 1;
+ {$EXTERNALSYM USE_FORCE}
+ USE_LOTS_OF_FORCE = 2;
+ {$EXTERNALSYM USE_LOTS_OF_FORCE}
+
+implementation
+
+end.
diff --git a/packages/extra/winunits/jwalmwksta.pas b/packages/extra/winunits/jwalmwksta.pas
index f20450f792..5b0c35bc49 100644
--- a/packages/extra/winunits/jwalmwksta.pas
+++ b/packages/extra/winunits/jwalmwksta.pas
@@ -1,1075 +1,1075 @@
-{******************************************************************************}
-{ }
-{ Lan Manager Workstation API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: lmwksta.h, released November 2001. The original Pascal }
-{ code is: LmWkSta.pas, released Februari 2002. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwalmwksta.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaLmWkSta;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "lmwksta.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaLmCons, JwaWinType;
-
-//
-// Function Prototypes
-//
-
-function NetWkstaGetInfo(servername: LMSTR; level: DWORD; var bufptr: LPBYTE): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetWkstaGetInfo}
-
-function NetWkstaSetInfo(servername: LMSTR; level: DWORD; buffer: LPBYTE; parm_err: LPDWORD): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetWkstaSetInfo}
-
-function NetWkstaUserGetInfo(reserved: LMSTR; level: DWORD; var bufptr: LPBYTE): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetWkstaUserGetInfo}
-
-function NetWkstaUserSetInfo(reserved: LMSTR; level: DWORD; buf: LPBYTE; parm_err: LPDWORD): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetWkstaUserSetInfo}
-
-function NetWkstaUserEnum(servername: LMSTR; level: DWORD; var bufptr: LPBYTE; prefmaxlen: DWORD; entriesread: LPDWORD; totalentries: LPDWORD; resumehandle: LPDWORD): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetWkstaUserEnum}
-
-function NetWkstaTransportAdd(servername: LMSTR; level: DWORD; buf: LPBYTE; parm_err: LPDWORD): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetWkstaTransportAdd}
-
-function NetWkstaTransportDel(servername: LMSTR; transportname: LMSTR; ucond: DWORD): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetWkstaTransportDel}
-
-function NetWkstaTransportEnum(servername: LMSTR; level: DWORD; var bufptr: LPBYTE; prefmaxlen: DWORD; entriesread: LPDWORD; totalentries: LPDWORD; resumehandle: LPDWORD): NET_API_STATUS; stdcall;
-{$EXTERNALSYM NetWkstaTransportEnum}
-
-//
-// Data Structures
-//
-
-//
-// NetWkstaGetInfo and NetWkstaSetInfo
-//
-
-//
-// NetWkstaGetInfo only. System information - guest access
-//
-
-type
- LPWKSTA_INFO_100 = ^WKSTA_INFO_100;
- {$EXTERNALSYM LPWKSTA_INFO_100}
- PWKSTA_INFO_100 = ^WKSTA_INFO_100;
- {$EXTERNALSYM PWKSTA_INFO_100}
- _WKSTA_INFO_100 = record
- wki100_platform_id: DWORD;
- wki100_computername: LMSTR;
- wki100_langroup: LMSTR;
- wki100_ver_major: DWORD;
- wki100_ver_minor: DWORD;
- end;
- {$EXTERNALSYM _WKSTA_INFO_100}
- WKSTA_INFO_100 = _WKSTA_INFO_100;
- {$EXTERNALSYM WKSTA_INFO_100}
- TWkstaInfo100 = WKSTA_INFO_100;
- PWkstaInfo100 = PWKSTA_INFO_100;
-
-//
-// NetWkstaGetInfo only. System information - user access
-//
-
- LPWKSTA_INFO_101 = ^WKSTA_INFO_101;
- {$EXTERNALSYM LPWKSTA_INFO_101}
- PWKSTA_INFO_101 = ^WKSTA_INFO_101;
- {$EXTERNALSYM PWKSTA_INFO_101}
- _WKSTA_INFO_101 = record
- wki101_platform_id: DWORD;
- wki101_computername: LMSTR;
- wki101_langroup: LMSTR;
- wki101_ver_major: DWORD;
- wki101_ver_minor: DWORD;
- wki101_lanroot: LMSTR;
- end;
- {$EXTERNALSYM _WKSTA_INFO_101}
- WKSTA_INFO_101 = _WKSTA_INFO_101;
- {$EXTERNALSYM WKSTA_INFO_101}
- TWkstaInfo101 = WKSTA_INFO_101;
- PWkstaInfo101 = PWKSTA_INFO_101;
-
-//
-// NetWkstaGetInfo only. System information - admin or operator access
-//
-
- LPWKSTA_INFO_102 = ^WKSTA_INFO_102;
- {$EXTERNALSYM LPWKSTA_INFO_102}
- PWKSTA_INFO_102 = ^WKSTA_INFO_102;
- {$EXTERNALSYM PWKSTA_INFO_102}
- _WKSTA_INFO_102 = record
- wki102_platform_id: DWORD;
- wki102_computername: LMSTR;
- wki102_langroup: LMSTR;
- wki102_ver_major: DWORD;
- wki102_ver_minor: DWORD;
- wki102_lanroot: LMSTR;
- wki102_logged_on_users: DWORD;
- end;
- {$EXTERNALSYM _WKSTA_INFO_102}
- WKSTA_INFO_102 = _WKSTA_INFO_102;
- {$EXTERNALSYM WKSTA_INFO_102}
- TWkstaInfo102 = WKSTA_INFO_102;
- PWkstaInfo102 = PWKSTA_INFO_102;
-
-//
-// Down-level NetWkstaGetInfo and NetWkstaSetInfo.
-//
-// DOS specific workstation information -
-// admin or domain operator access
-//
-
- LPWKSTA_INFO_302 = ^WKSTA_INFO_302;
- {$EXTERNALSYM LPWKSTA_INFO_302}
- PWKSTA_INFO_302 = ^WKSTA_INFO_302;
- {$EXTERNALSYM PWKSTA_INFO_302}
- _WKSTA_INFO_302 = record
- wki302_char_wait: DWORD;
- wki302_collection_time: DWORD;
- wki302_maximum_collection_count: DWORD;
- wki302_keep_conn: DWORD;
- wki302_keep_search: DWORD;
- wki302_max_cmds: DWORD;
- wki302_num_work_buf: DWORD;
- wki302_siz_work_buf: DWORD;
- wki302_max_wrk_cache: DWORD;
- wki302_sess_timeout: DWORD;
- wki302_siz_error: DWORD;
- wki302_num_alerts: DWORD;
- wki302_num_services: DWORD;
- wki302_errlog_sz: DWORD;
- wki302_print_buf_time: DWORD;
- wki302_num_char_buf: DWORD;
- wki302_siz_char_buf: DWORD;
- wki302_wrk_heuristics: LMSTR;
- wki302_mailslots: DWORD;
- wki302_num_dgram_buf: DWORD;
- end;
- {$EXTERNALSYM _WKSTA_INFO_302}
- WKSTA_INFO_302 = _WKSTA_INFO_302;
- {$EXTERNALSYM WKSTA_INFO_302}
- TWkstaInfo302 = WKSTA_INFO_302;
- PWkstaInfo302 = PWKSTA_INFO_302;
-
-//
-// Down-level NetWkstaGetInfo and NetWkstaSetInfo
-//
-// OS/2 specific workstation information -
-// admin or domain operator access
-//
-
- LPWKSTA_INFO_402 = ^WKSTA_INFO_402;
- {$EXTERNALSYM LPWKSTA_INFO_402}
- PWKSTA_INFO_402 = ^WKSTA_INFO_402;
- {$EXTERNALSYM PWKSTA_INFO_402}
- _WKSTA_INFO_402 = record
- wki402_char_wait: DWORD;
- wki402_collection_time: DWORD;
- wki402_maximum_collection_count: DWORD;
- wki402_keep_conn: DWORD;
- wki402_keep_search: DWORD;
- wki402_max_cmds: DWORD;
- wki402_num_work_buf: DWORD;
- wki402_siz_work_buf: DWORD;
- wki402_max_wrk_cache: DWORD;
- wki402_sess_timeout: DWORD;
- wki402_siz_error: DWORD;
- wki402_num_alerts: DWORD;
- wki402_num_services: DWORD;
- wki402_errlog_sz: DWORD;
- wki402_print_buf_time: DWORD;
- wki402_num_char_buf: DWORD;
- wki402_siz_char_buf: DWORD;
- wki402_wrk_heuristics: LMSTR;
- wki402_mailslots: DWORD;
- wki402_num_dgram_buf: DWORD;
- wki402_max_threads: DWORD;
- end;
- {$EXTERNALSYM _WKSTA_INFO_402}
- WKSTA_INFO_402 = _WKSTA_INFO_402;
- {$EXTERNALSYM WKSTA_INFO_402}
- TWkstaInfo402 = WKSTA_INFO_402;
- PWkstaInfo402 = PWKSTA_INFO_402;
-
-//
-// Same-level NetWkstaGetInfo and NetWkstaSetInfo.
-//
-// NT specific workstation information -
-// admin or domain operator access
-//
-
- LPWKSTA_INFO_502 = ^WKSTA_INFO_502;
- {$EXTERNALSYM LPWKSTA_INFO_502}
- PWKSTA_INFO_502 = ^WKSTA_INFO_502;
- {$EXTERNALSYM PWKSTA_INFO_502}
- _WKSTA_INFO_502 = record
- wki502_char_wait: DWORD;
- wki502_collection_time: DWORD;
- wki502_maximum_collection_count: DWORD;
- wki502_keep_conn: DWORD;
- wki502_max_cmds: DWORD;
- wki502_sess_timeout: DWORD;
- wki502_siz_char_buf: DWORD;
- wki502_max_threads: DWORD;
- wki502_lock_quota: DWORD;
- wki502_lock_increment: DWORD;
- wki502_lock_maximum: DWORD;
- wki502_pipe_increment: DWORD;
- wki502_pipe_maximum: DWORD;
- wki502_cache_file_timeout: DWORD;
- wki502_dormant_file_limit: DWORD;
- wki502_read_ahead_throughput: DWORD;
- wki502_num_mailslot_buffers: DWORD;
- wki502_num_srv_announce_buffers: DWORD;
- wki502_max_illegal_datagram_events: DWORD;
- wki502_illegal_datagram_event_reset_frequency: DWORD;
- wki502_log_election_packets: BOOL;
- wki502_use_opportunistic_locking: BOOL;
- wki502_use_unlock_behind: BOOL;
- wki502_use_close_behind: BOOL;
- wki502_buf_named_pipes: BOOL;
- wki502_use_lock_read_unlock: BOOL;
- wki502_utilize_nt_caching: BOOL;
- wki502_use_raw_read: BOOL;
- wki502_use_raw_write: BOOL;
- wki502_use_write_raw_data: BOOL;
- wki502_use_encryption: BOOL;
- wki502_buf_files_deny_write: BOOL;
- wki502_buf_read_only_files: BOOL;
- wki502_force_core_create_mode: BOOL;
- wki502_use_512_byte_max_transfer: BOOL;
- end;
- {$EXTERNALSYM _WKSTA_INFO_502}
- WKSTA_INFO_502 = _WKSTA_INFO_502;
- {$EXTERNALSYM WKSTA_INFO_502}
- TWkstaInfo502 = WKSTA_INFO_502;
- PWkstaInfo502 = PWKSTA_INFO_502;
-
-//
-// The following info-levels are only valid for NetWkstaSetInfo
-//
-
-//
-// The following levels are supported on down-level systems (LAN Man 2.x)
-// as well as NT systems:
-//
-
- LPWKSTA_INFO_1010 = ^WKSTA_INFO_1010;
- {$EXTERNALSYM LPWKSTA_INFO_1010}
- PWKSTA_INFO_1010 = ^WKSTA_INFO_1010;
- {$EXTERNALSYM PWKSTA_INFO_1010}
- _WKSTA_INFO_1010 = record
- wki1010_char_wait: DWORD;
- end;
- {$EXTERNALSYM _WKSTA_INFO_1010}
- WKSTA_INFO_1010 = _WKSTA_INFO_1010;
- {$EXTERNALSYM WKSTA_INFO_1010}
- TWkstaInfo1010 = WKSTA_INFO_1010;
- PWkstaInfo1010 = PWKSTA_INFO_1010;
-
- LPWKSTA_INFO_1011 = ^WKSTA_INFO_1011;
- {$EXTERNALSYM LPWKSTA_INFO_1011}
- PWKSTA_INFO_1011 = ^WKSTA_INFO_1011;
- {$EXTERNALSYM PWKSTA_INFO_1011}
- _WKSTA_INFO_1011 = record
- wki1011_collection_time: DWORD;
- end;
- {$EXTERNALSYM _WKSTA_INFO_1011}
- WKSTA_INFO_1011 = _WKSTA_INFO_1011;
- {$EXTERNALSYM WKSTA_INFO_1011}
- TWkstaInfo1011 = WKSTA_INFO_1011;
- PWkstaInfo1011 = PWKSTA_INFO_1011;
-
- LPWKSTA_INFO_1012 = ^WKSTA_INFO_1012;
- {$EXTERNALSYM LPWKSTA_INFO_1012}
- PWKSTA_INFO_1012 = ^WKSTA_INFO_1012;
- {$EXTERNALSYM PWKSTA_INFO_1012}
- _WKSTA_INFO_1012 = record
- wki1012_maximum_collection_count: DWORD;
- end;
- {$EXTERNALSYM _WKSTA_INFO_1012}
- WKSTA_INFO_1012 = _WKSTA_INFO_1012;
- {$EXTERNALSYM WKSTA_INFO_1012}
- TWkstaInfo1012 = WKSTA_INFO_1012;
- PWkstaInfo1012 = PWKSTA_INFO_1012;
-
-//
-// The following level are supported on down-level systems (LAN Man 2.x)
-// only:
-//
-
- LPWKSTA_INFO_1027 = ^WKSTA_INFO_1027;
- {$EXTERNALSYM LPWKSTA_INFO_1027}
- PWKSTA_INFO_1027 = ^WKSTA_INFO_1027;
- {$EXTERNALSYM PWKSTA_INFO_1027}
- _WKSTA_INFO_1027 = record
- wki1027_errlog_sz: DWORD;
- end;
- {$EXTERNALSYM _WKSTA_INFO_1027}
- WKSTA_INFO_1027 = _WKSTA_INFO_1027;
- {$EXTERNALSYM WKSTA_INFO_1027}
- TWkstaInfo1027 = WKSTA_INFO_1027;
- PWkstaInfo1027 = PWKSTA_INFO_1027;
-
- LPWKSTA_INFO_1028 = ^WKSTA_INFO_1028;
- {$EXTERNALSYM LPWKSTA_INFO_1028}
- PWKSTA_INFO_1028 = ^WKSTA_INFO_1028;
- {$EXTERNALSYM PWKSTA_INFO_1028}
- _WKSTA_INFO_1028 = record
- wki1028_print_buf_time: DWORD;
- end;
- {$EXTERNALSYM _WKSTA_INFO_1028}
- WKSTA_INFO_1028 = _WKSTA_INFO_1028;
- {$EXTERNALSYM WKSTA_INFO_1028}
- TWkstaInfo1028 = WKSTA_INFO_1028;
- PWkstaInfo1028 = PWKSTA_INFO_1028;
-
- LPWKSTA_INFO_1032 = ^WKSTA_INFO_1032;
- {$EXTERNALSYM LPWKSTA_INFO_1032}
- PWKSTA_INFO_1032 = ^WKSTA_INFO_1032;
- {$EXTERNALSYM PWKSTA_INFO_1032}
- _WKSTA_INFO_1032 = record
- wki1032_wrk_heuristics: DWORD;
- end;
- {$EXTERNALSYM _WKSTA_INFO_1032}
- WKSTA_INFO_1032 = _WKSTA_INFO_1032;
- {$EXTERNALSYM WKSTA_INFO_1032}
- TWkstaInfo1032 = WKSTA_INFO_1032;
- PWkstaInfo1032 = PWKSTA_INFO_1032;
-
-//
-// The following levels are settable on NT systems, and have no
-// effect on down-level systems (i.e. LANMan 2.x) since these
-// fields cannot be set on them:
-//
-
- LPWKSTA_INFO_1013 = ^WKSTA_INFO_1013;
- {$EXTERNALSYM LPWKSTA_INFO_1013}
- PWKSTA_INFO_1013 = ^WKSTA_INFO_1013;
- {$EXTERNALSYM PWKSTA_INFO_1013}
- _WKSTA_INFO_1013 = record
- wki1013_keep_conn: DWORD;
- end;
- {$EXTERNALSYM _WKSTA_INFO_1013}
- WKSTA_INFO_1013 = _WKSTA_INFO_1013;
- {$EXTERNALSYM WKSTA_INFO_1013}
- TWkstaInfo1013 = WKSTA_INFO_1013;
- PWkstaInfo1013 = PWKSTA_INFO_1013;
-
- LPWKSTA_INFO_1018 = ^WKSTA_INFO_1018;
- {$EXTERNALSYM LPWKSTA_INFO_1018}
- PWKSTA_INFO_1018 = ^WKSTA_INFO_1018;
- {$EXTERNALSYM PWKSTA_INFO_1018}
- _WKSTA_INFO_1018 = record
- wki1018_sess_timeout: DWORD;
- end;
- {$EXTERNALSYM _WKSTA_INFO_1018}
- WKSTA_INFO_1018 = _WKSTA_INFO_1018;
- {$EXTERNALSYM WKSTA_INFO_1018}
- TWkstaInfo1018 = WKSTA_INFO_1018;
- PWkstaInfo1018 = PWKSTA_INFO_1018;
-
- LPWKSTA_INFO_1023 = ^WKSTA_INFO_1023;
- {$EXTERNALSYM LPWKSTA_INFO_1023}
- PWKSTA_INFO_1023 = ^WKSTA_INFO_1023;
- {$EXTERNALSYM PWKSTA_INFO_1023}
- _WKSTA_INFO_1023 = record
- wki1023_siz_char_buf: DWORD;
- end;
- {$EXTERNALSYM _WKSTA_INFO_1023}
- WKSTA_INFO_1023 = _WKSTA_INFO_1023;
- {$EXTERNALSYM WKSTA_INFO_1023}
- TWkstaInfo1023 = WKSTA_INFO_1023;
- PWkstaInfo1023 = PWKSTA_INFO_1023;
-
- LPWKSTA_INFO_1033 = ^WKSTA_INFO_1033;
- {$EXTERNALSYM LPWKSTA_INFO_1033}
- PWKSTA_INFO_1033 = ^WKSTA_INFO_1033;
- {$EXTERNALSYM PWKSTA_INFO_1033}
- _WKSTA_INFO_1033 = record
- wki1033_max_threads: DWORD;
- end;
- {$EXTERNALSYM _WKSTA_INFO_1033}
- WKSTA_INFO_1033 = _WKSTA_INFO_1033;
- {$EXTERNALSYM WKSTA_INFO_1033}
- TWkstaInfo1033 = WKSTA_INFO_1033;
- PWkstaInfo1033 = PWKSTA_INFO_1033;
-
-//
-// The following levels are only supported on NT systems:
-//
-
- LPWKSTA_INFO_1041 = ^WKSTA_INFO_1041;
- {$EXTERNALSYM LPWKSTA_INFO_1041}
- PWKSTA_INFO_1041 = ^WKSTA_INFO_1041;
- {$EXTERNALSYM PWKSTA_INFO_1041}
- _WKSTA_INFO_1041 = record
- wki1041_lock_quota: DWORD;
- end;
- {$EXTERNALSYM _WKSTA_INFO_1041}
- WKSTA_INFO_1041 = _WKSTA_INFO_1041;
- {$EXTERNALSYM WKSTA_INFO_1041}
- TWkstaInfo1041 = WKSTA_INFO_1041;
- PWkstaInfo1041 = PWKSTA_INFO_1041;
-
- LPWKSTA_INFO_1042 = ^WKSTA_INFO_1042;
- {$EXTERNALSYM LPWKSTA_INFO_1042}
- PWKSTA_INFO_1042 = ^WKSTA_INFO_1042;
- {$EXTERNALSYM PWKSTA_INFO_1042}
- _WKSTA_INFO_1042 = record
- wki1042_lock_increment: DWORD;
- end;
- {$EXTERNALSYM _WKSTA_INFO_1042}
- WKSTA_INFO_1042 = _WKSTA_INFO_1042;
- {$EXTERNALSYM WKSTA_INFO_1042}
- TWkstaInfo1042 = WKSTA_INFO_1042;
- PWkstaInfo1042 = PWKSTA_INFO_1042;
-
- LPWKSTA_INFO_1043 = ^WKSTA_INFO_1043;
- {$EXTERNALSYM LPWKSTA_INFO_1043}
- PWKSTA_INFO_1043 = ^WKSTA_INFO_1043;
- {$EXTERNALSYM PWKSTA_INFO_1043}
- _WKSTA_INFO_1043 = record
- wki1043_lock_maximum: DWORD;
- end;
- {$EXTERNALSYM _WKSTA_INFO_1043}
- WKSTA_INFO_1043 = _WKSTA_INFO_1043;
- {$EXTERNALSYM WKSTA_INFO_1043}
- TWkstaInfo1043 = WKSTA_INFO_1043;
- PWkstaInfo1043 = PWKSTA_INFO_1043;
-
- LPWKSTA_INFO_1044 = ^WKSTA_INFO_1044;
- {$EXTERNALSYM LPWKSTA_INFO_1044}
- PWKSTA_INFO_1044 = ^WKSTA_INFO_1044;
- {$EXTERNALSYM PWKSTA_INFO_1044}
- _WKSTA_INFO_1044 = record
- wki1044_pipe_increment: DWORD;
- end;
- {$EXTERNALSYM _WKSTA_INFO_1044}
- WKSTA_INFO_1044 = _WKSTA_INFO_1044;
- {$EXTERNALSYM WKSTA_INFO_1044}
- TWkstaInfo1044 = WKSTA_INFO_1044;
- PWkstaInfo1044 = PWKSTA_INFO_1044;
-
- LPWKSTA_INFO_1045 = ^WKSTA_INFO_1045;
- {$EXTERNALSYM LPWKSTA_INFO_1045}
- PWKSTA_INFO_1045 = ^WKSTA_INFO_1045;
- {$EXTERNALSYM PWKSTA_INFO_1045}
- _WKSTA_INFO_1045 = record
- wki1045_pipe_maximum: DWORD;
- end;
- {$EXTERNALSYM _WKSTA_INFO_1045}
- WKSTA_INFO_1045 = _WKSTA_INFO_1045;
- {$EXTERNALSYM WKSTA_INFO_1045}
- TWkstaInfo1045 = WKSTA_INFO_1045;
- PWkstaInfo1045 = PWKSTA_INFO_1045;
-
- LPWKSTA_INFO_1046 = ^WKSTA_INFO_1046;
- {$EXTERNALSYM LPWKSTA_INFO_1046}
- PWKSTA_INFO_1046 = ^WKSTA_INFO_1046;
- {$EXTERNALSYM PWKSTA_INFO_1046}
- _WKSTA_INFO_1046 = record
- wki1046_dormant_file_limit: DWORD;
- end;
- {$EXTERNALSYM _WKSTA_INFO_1046}
- WKSTA_INFO_1046 = _WKSTA_INFO_1046;
- {$EXTERNALSYM WKSTA_INFO_1046}
- TWkstaInfo1046 = WKSTA_INFO_1046;
- PWkstaInfo1046 = PWKSTA_INFO_1046;
-
- LPWKSTA_INFO_1047 = ^WKSTA_INFO_1047;
- {$EXTERNALSYM LPWKSTA_INFO_1047}
- PWKSTA_INFO_1047 = ^WKSTA_INFO_1047;
- {$EXTERNALSYM PWKSTA_INFO_1047}
- _WKSTA_INFO_1047 = record
- wki1047_cache_file_timeout: DWORD;
- end;
- {$EXTERNALSYM _WKSTA_INFO_1047}
- WKSTA_INFO_1047 = _WKSTA_INFO_1047;
- {$EXTERNALSYM WKSTA_INFO_1047}
- TWkstaInfo1047 = WKSTA_INFO_1047;
- PWkstaInfo1047 = PWKSTA_INFO_1047;
-
- LPWKSTA_INFO_1048 = ^WKSTA_INFO_1048;
- {$EXTERNALSYM LPWKSTA_INFO_1048}
- PWKSTA_INFO_1048 = ^WKSTA_INFO_1048;
- {$EXTERNALSYM PWKSTA_INFO_1048}
- _WKSTA_INFO_1048 = record
- wki1048_use_opportunistic_locking: BOOL;
- end;
- {$EXTERNALSYM _WKSTA_INFO_1048}
- WKSTA_INFO_1048 = _WKSTA_INFO_1048;
- {$EXTERNALSYM WKSTA_INFO_1048}
- TWkstaInfo1048 = WKSTA_INFO_1048;
- PWkstaInfo1048 = PWKSTA_INFO_1048;
-
- LPWKSTA_INFO_1049 = ^WKSTA_INFO_1049;
- {$EXTERNALSYM LPWKSTA_INFO_1049}
- PWKSTA_INFO_1049 = ^WKSTA_INFO_1049;
- {$EXTERNALSYM PWKSTA_INFO_1049}
- _WKSTA_INFO_1049 = record
- wki1049_use_unlock_behind: BOOL;
- end;
- {$EXTERNALSYM _WKSTA_INFO_1049}
- WKSTA_INFO_1049 = _WKSTA_INFO_1049;
- {$EXTERNALSYM WKSTA_INFO_1049}
- TWkstaInfo1049 = WKSTA_INFO_1049;
- PWkstaInfo1049 = PWKSTA_INFO_1049;
-
- LPWKSTA_INFO_1050 = ^WKSTA_INFO_1050;
- {$EXTERNALSYM LPWKSTA_INFO_1050}
- PWKSTA_INFO_1050 = ^WKSTA_INFO_1050;
- {$EXTERNALSYM PWKSTA_INFO_1050}
- _WKSTA_INFO_1050 = record
- wki1050_use_close_behind: BOOL;
- end;
- {$EXTERNALSYM _WKSTA_INFO_1050}
- WKSTA_INFO_1050 = _WKSTA_INFO_1050;
- {$EXTERNALSYM WKSTA_INFO_1050}
- TWkstaInfo1050 = WKSTA_INFO_1050;
- PWkstaInfo1050 = PWKSTA_INFO_1050;
-
- LPWKSTA_INFO_1051 = ^WKSTA_INFO_1051;
- {$EXTERNALSYM LPWKSTA_INFO_1051}
- PWKSTA_INFO_1051 = ^WKSTA_INFO_1051;
- {$EXTERNALSYM PWKSTA_INFO_1051}
- _WKSTA_INFO_1051 = record
- wki1051_buf_named_pipes: BOOL;
- end;
- {$EXTERNALSYM _WKSTA_INFO_1051}
- WKSTA_INFO_1051 = _WKSTA_INFO_1051;
- {$EXTERNALSYM WKSTA_INFO_1051}
- TWkstaInfo1051 = WKSTA_INFO_1051;
- PWkstaInfo1051 = PWKSTA_INFO_1051;
-
- LPWKSTA_INFO_1052 = ^WKSTA_INFO_1052;
- {$EXTERNALSYM LPWKSTA_INFO_1052}
- PWKSTA_INFO_1052 = ^WKSTA_INFO_1052;
- {$EXTERNALSYM PWKSTA_INFO_1052}
- _WKSTA_INFO_1052 = record
- wki1052_use_lock_read_unlock: BOOL;
- end;
- {$EXTERNALSYM _WKSTA_INFO_1052}
- WKSTA_INFO_1052 = _WKSTA_INFO_1052;
- {$EXTERNALSYM WKSTA_INFO_1052}
- TWkstaInfo1052 = WKSTA_INFO_1052;
- PWkstaInfo1052 = PWKSTA_INFO_1052;
-
- LPWKSTA_INFO_1053 = ^WKSTA_INFO_1053;
- {$EXTERNALSYM LPWKSTA_INFO_1053}
- PWKSTA_INFO_1053 = ^WKSTA_INFO_1053;
- {$EXTERNALSYM PWKSTA_INFO_1053}
- _WKSTA_INFO_1053 = record
- wki1053_utilize_nt_caching: BOOL;
- end;
- {$EXTERNALSYM _WKSTA_INFO_1053}
- WKSTA_INFO_1053 = _WKSTA_INFO_1053;
- {$EXTERNALSYM WKSTA_INFO_1053}
- TWkstaInfo1053 = WKSTA_INFO_1053;
- PWkstaInfo1053 = PWKSTA_INFO_1053;
-
- LPWKSTA_INFO_1054 = ^WKSTA_INFO_1054;
- {$EXTERNALSYM LPWKSTA_INFO_1054}
- PWKSTA_INFO_1054 = ^WKSTA_INFO_1054;
- {$EXTERNALSYM PWKSTA_INFO_1054}
- _WKSTA_INFO_1054 = record
- wki1054_use_raw_read: BOOL;
- end;
- {$EXTERNALSYM _WKSTA_INFO_1054}
- WKSTA_INFO_1054 = _WKSTA_INFO_1054;
- {$EXTERNALSYM WKSTA_INFO_1054}
- TWkstaInfo1054 = WKSTA_INFO_1054;
- PWkstaInfo1054 = PWKSTA_INFO_1054;
-
- LPWKSTA_INFO_1055 = ^WKSTA_INFO_1055;
- {$EXTERNALSYM LPWKSTA_INFO_1055}
- PWKSTA_INFO_1055 = ^WKSTA_INFO_1055;
- {$EXTERNALSYM PWKSTA_INFO_1055}
- _WKSTA_INFO_1055 = record
- wki1055_use_raw_write: BOOL;
- end;
- {$EXTERNALSYM _WKSTA_INFO_1055}
- WKSTA_INFO_1055 = _WKSTA_INFO_1055;
- {$EXTERNALSYM WKSTA_INFO_1055}
- TWkstaInfo1055 = WKSTA_INFO_1055;
- PWkstaInfo1055 = PWKSTA_INFO_1055;
-
- LPWKSTA_INFO_1056 = ^WKSTA_INFO_1056;
- {$EXTERNALSYM LPWKSTA_INFO_1056}
- PWKSTA_INFO_1056 = ^WKSTA_INFO_1056;
- {$EXTERNALSYM PWKSTA_INFO_1056}
- _WKSTA_INFO_1056 = record
- wki1056_use_write_raw_data: BOOL;
- end;
- {$EXTERNALSYM _WKSTA_INFO_1056}
- WKSTA_INFO_1056 = _WKSTA_INFO_1056;
- {$EXTERNALSYM WKSTA_INFO_1056}
- TWkstaInfo1056 = WKSTA_INFO_1056;
- PWkstaInfo1056 = PWKSTA_INFO_1056;
-
- LPWKSTA_INFO_1057 = ^WKSTA_INFO_1057;
- {$EXTERNALSYM LPWKSTA_INFO_1057}
- PWKSTA_INFO_1057 = ^WKSTA_INFO_1057;
- {$EXTERNALSYM PWKSTA_INFO_1057}
- _WKSTA_INFO_1057 = record
- wki1057_use_encryption: BOOL;
- end;
- {$EXTERNALSYM _WKSTA_INFO_1057}
- WKSTA_INFO_1057 = _WKSTA_INFO_1057;
- {$EXTERNALSYM WKSTA_INFO_1057}
- TWkstaInfo1057 = WKSTA_INFO_1057;
- PWkstaInfo1057 = PWKSTA_INFO_1057;
-
- LPWKSTA_INFO_1058 = ^WKSTA_INFO_1058;
- {$EXTERNALSYM LPWKSTA_INFO_1058}
- PWKSTA_INFO_1058 = ^WKSTA_INFO_1058;
- {$EXTERNALSYM PWKSTA_INFO_1058}
- _WKSTA_INFO_1058 = record
- wki1058_buf_files_deny_write: BOOL;
- end;
- {$EXTERNALSYM _WKSTA_INFO_1058}
- WKSTA_INFO_1058 = _WKSTA_INFO_1058;
- {$EXTERNALSYM WKSTA_INFO_1058}
- TWkstaInfo1058 = WKSTA_INFO_1058;
- PWkstaInfo1058 = PWKSTA_INFO_1058;
-
- LPWKSTA_INFO_1059 = ^WKSTA_INFO_1059;
- {$EXTERNALSYM LPWKSTA_INFO_1059}
- PWKSTA_INFO_1059 = ^WKSTA_INFO_1059;
- {$EXTERNALSYM PWKSTA_INFO_1059}
- _WKSTA_INFO_1059 = record
- wki1059_buf_read_only_files: BOOL;
- end;
- {$EXTERNALSYM _WKSTA_INFO_1059}
- WKSTA_INFO_1059 = _WKSTA_INFO_1059;
- {$EXTERNALSYM WKSTA_INFO_1059}
- TWkstaInfo1059 = WKSTA_INFO_1059;
- PWkstaInfo1059 = PWKSTA_INFO_1059;
-
- LPWKSTA_INFO_1060 = ^WKSTA_INFO_1060;
- {$EXTERNALSYM LPWKSTA_INFO_1060}
- PWKSTA_INFO_1060 = ^WKSTA_INFO_1060;
- {$EXTERNALSYM PWKSTA_INFO_1060}
- _WKSTA_INFO_1060 = record
- wki1060_force_core_create_mode: BOOL;
- end;
- {$EXTERNALSYM _WKSTA_INFO_1060}
- WKSTA_INFO_1060 = _WKSTA_INFO_1060;
- {$EXTERNALSYM WKSTA_INFO_1060}
- TWkstaInfo1060 = WKSTA_INFO_1060;
- PWkstaInfo1060 = PWKSTA_INFO_1060;
-
- LPWKSTA_INFO_1061 = ^WKSTA_INFO_1061;
- {$EXTERNALSYM LPWKSTA_INFO_1061}
- PWKSTA_INFO_1061 = ^WKSTA_INFO_1061;
- {$EXTERNALSYM PWKSTA_INFO_1061}
- _WKSTA_INFO_1061 = record
- wki1061_use_512_byte_max_transfer: BOOL;
- end;
- {$EXTERNALSYM _WKSTA_INFO_1061}
- WKSTA_INFO_1061 = _WKSTA_INFO_1061;
- {$EXTERNALSYM WKSTA_INFO_1061}
- TWkstaInfo1061 = WKSTA_INFO_1061;
- PWkstaInfo1061 = PWKSTA_INFO_1061;
-
- LPWKSTA_INFO_1062 = ^WKSTA_INFO_1062;
- {$EXTERNALSYM LPWKSTA_INFO_1062}
- PWKSTA_INFO_1062 = ^WKSTA_INFO_1062;
- {$EXTERNALSYM PWKSTA_INFO_1062}
- _WKSTA_INFO_1062 = record
- wki1062_read_ahead_throughput: DWORD;
- end;
- {$EXTERNALSYM _WKSTA_INFO_1062}
- WKSTA_INFO_1062 = _WKSTA_INFO_1062;
- {$EXTERNALSYM WKSTA_INFO_1062}
- TWkstaInfo1062 = WKSTA_INFO_1062;
- PWkstaInfo1062 = PWKSTA_INFO_1062;
-
-//
-// NetWkstaUserGetInfo (local only) and NetWkstaUserEnum -
-// no access restrictions.
-//
-
- LPWKSTA_USER_INFO_0 = ^WKSTA_USER_INFO_0;
- {$EXTERNALSYM LPWKSTA_USER_INFO_0}
- PWKSTA_USER_INFO_0 = ^WKSTA_USER_INFO_0;
- {$EXTERNALSYM PWKSTA_USER_INFO_0}
- _WKSTA_USER_INFO_0 = record
- wkui0_username: LMSTR;
- end;
- {$EXTERNALSYM _WKSTA_USER_INFO_0}
- WKSTA_USER_INFO_0 = _WKSTA_USER_INFO_0;
- {$EXTERNALSYM WKSTA_USER_INFO_0}
- TWkstaUserInfo0 = WKSTA_USER_INFO_0;
- PWkstaUserInfo0 = PWKSTA_USER_INFO_0;
-
-//
-// NetWkstaUserGetInfo (local only) and NetWkstaUserEnum -
-// no access restrictions.
-//
-
- LPWKSTA_USER_INFO_1 = ^WKSTA_USER_INFO_1;
- {$EXTERNALSYM LPWKSTA_USER_INFO_1}
- PWKSTA_USER_INFO_1 = ^WKSTA_USER_INFO_1;
- {$EXTERNALSYM PWKSTA_USER_INFO_1}
- _WKSTA_USER_INFO_1 = record
- wkui1_username: LMSTR;
- wkui1_logon_domain: LMSTR;
- wkui1_oth_domains: LMSTR;
- wkui1_logon_server: LMSTR;
- end;
- {$EXTERNALSYM _WKSTA_USER_INFO_1}
- WKSTA_USER_INFO_1 = _WKSTA_USER_INFO_1;
- {$EXTERNALSYM WKSTA_USER_INFO_1}
- TWkstaUserInfo1 = WKSTA_USER_INFO_1;
- PWkstaUserInfo1 = PWKSTA_USER_INFO_1;
-
-//
-// NetWkstaUserSetInfo - local access.
-//
-
- LPWKSTA_USER_INFO_1101 = ^WKSTA_USER_INFO_1101;
- {$EXTERNALSYM LPWKSTA_USER_INFO_1101}
- PWKSTA_USER_INFO_1101 = ^WKSTA_USER_INFO_1101;
- {$EXTERNALSYM PWKSTA_USER_INFO_1101}
- _WKSTA_USER_INFO_1101 = record
- wkui1101_oth_domains: LMSTR;
- end;
- {$EXTERNALSYM _WKSTA_USER_INFO_1101}
- WKSTA_USER_INFO_1101 = _WKSTA_USER_INFO_1101;
- {$EXTERNALSYM WKSTA_USER_INFO_1101}
- TWkstaUserInfo1101 = WKSTA_USER_INFO_1101;
- PWkstaUserInfo1101 = PWKSTA_USER_INFO_1101;
-
-//
-// NetWkstaTransportAdd - admin access
-//
-
- LPWKSTA_TRANSPORT_INFO_0 = ^WKSTA_TRANSPORT_INFO_0;
- {$EXTERNALSYM LPWKSTA_TRANSPORT_INFO_0}
- PWKSTA_TRANSPORT_INFO_0 = ^WKSTA_TRANSPORT_INFO_0;
- {$EXTERNALSYM PWKSTA_TRANSPORT_INFO_0}
- _WKSTA_TRANSPORT_INFO_0 = record
- wkti0_quality_of_service: DWORD;
- wkti0_number_of_vcs: DWORD;
- wkti0_transport_name: LMSTR;
- wkti0_transport_address: LMSTR;
- wkti0_wan_ish: BOOL;
- end;
- {$EXTERNALSYM _WKSTA_TRANSPORT_INFO_0}
- WKSTA_TRANSPORT_INFO_0 = _WKSTA_TRANSPORT_INFO_0;
- {$EXTERNALSYM WKSTA_TRANSPORT_INFO_0}
- TWkstaTransportInfo0 = WKSTA_TRANSPORT_INFO_0;
- PWkstaTransportInfo0 = PWKSTA_TRANSPORT_INFO_0;
-
-//
-// Special Values and Constants
-//
-
-//
-// Identifiers for use as NetWkstaSetInfo parmnum parameter
-//
-
-//
-// One of these values indicates the parameter within an information
-// structure that is invalid when ERROR_INVALID_PARAMETER is returned by
-// NetWkstaSetInfo.
-//
-
-const
- WKSTA_PLATFORM_ID_PARMNUM = 100;
- {$EXTERNALSYM WKSTA_PLATFORM_ID_PARMNUM}
- WKSTA_COMPUTERNAME_PARMNUM = 1;
- {$EXTERNALSYM WKSTA_COMPUTERNAME_PARMNUM}
- WKSTA_LANGROUP_PARMNUM = 2;
- {$EXTERNALSYM WKSTA_LANGROUP_PARMNUM}
- WKSTA_VER_MAJOR_PARMNUM = 4;
- {$EXTERNALSYM WKSTA_VER_MAJOR_PARMNUM}
- WKSTA_VER_MINOR_PARMNUM = 5;
- {$EXTERNALSYM WKSTA_VER_MINOR_PARMNUM}
- WKSTA_LOGGED_ON_USERS_PARMNUM = 6;
- {$EXTERNALSYM WKSTA_LOGGED_ON_USERS_PARMNUM}
- WKSTA_LANROOT_PARMNUM = 7;
- {$EXTERNALSYM WKSTA_LANROOT_PARMNUM}
- WKSTA_LOGON_DOMAIN_PARMNUM = 8;
- {$EXTERNALSYM WKSTA_LOGON_DOMAIN_PARMNUM}
- WKSTA_LOGON_SERVER_PARMNUM = 9;
- {$EXTERNALSYM WKSTA_LOGON_SERVER_PARMNUM}
- WKSTA_CHARWAIT_PARMNUM = 10; // Supported by down-level.
- {$EXTERNALSYM WKSTA_CHARWAIT_PARMNUM}
- WKSTA_CHARTIME_PARMNUM = 11; // Supported by down-level.
- {$EXTERNALSYM WKSTA_CHARTIME_PARMNUM}
- WKSTA_CHARCOUNT_PARMNUM = 12; // Supported by down-level.
- {$EXTERNALSYM WKSTA_CHARCOUNT_PARMNUM}
- WKSTA_KEEPCONN_PARMNUM = 13;
- {$EXTERNALSYM WKSTA_KEEPCONN_PARMNUM}
- WKSTA_KEEPSEARCH_PARMNUM = 14;
- {$EXTERNALSYM WKSTA_KEEPSEARCH_PARMNUM}
- WKSTA_MAXCMDS_PARMNUM = 15;
- {$EXTERNALSYM WKSTA_MAXCMDS_PARMNUM}
- WKSTA_NUMWORKBUF_PARMNUM = 16;
- {$EXTERNALSYM WKSTA_NUMWORKBUF_PARMNUM}
- WKSTA_MAXWRKCACHE_PARMNUM = 17;
- {$EXTERNALSYM WKSTA_MAXWRKCACHE_PARMNUM}
- WKSTA_SESSTIMEOUT_PARMNUM = 18;
- {$EXTERNALSYM WKSTA_SESSTIMEOUT_PARMNUM}
- WKSTA_SIZERROR_PARMNUM = 19;
- {$EXTERNALSYM WKSTA_SIZERROR_PARMNUM}
- WKSTA_NUMALERTS_PARMNUM = 20;
- {$EXTERNALSYM WKSTA_NUMALERTS_PARMNUM}
- WKSTA_NUMSERVICES_PARMNUM = 21;
- {$EXTERNALSYM WKSTA_NUMSERVICES_PARMNUM}
- WKSTA_NUMCHARBUF_PARMNUM = 22;
- {$EXTERNALSYM WKSTA_NUMCHARBUF_PARMNUM}
- WKSTA_SIZCHARBUF_PARMNUM = 23;
- {$EXTERNALSYM WKSTA_SIZCHARBUF_PARMNUM}
- WKSTA_ERRLOGSZ_PARMNUM = 27; // Supported by down-level.
- {$EXTERNALSYM WKSTA_ERRLOGSZ_PARMNUM}
- WKSTA_PRINTBUFTIME_PARMNUM = 28; // Supported by down-level.
- {$EXTERNALSYM WKSTA_PRINTBUFTIME_PARMNUM}
- WKSTA_SIZWORKBUF_PARMNUM = 29;
- {$EXTERNALSYM WKSTA_SIZWORKBUF_PARMNUM}
- WKSTA_MAILSLOTS_PARMNUM = 30;
- {$EXTERNALSYM WKSTA_MAILSLOTS_PARMNUM}
- WKSTA_NUMDGRAMBUF_PARMNUM = 31;
- {$EXTERNALSYM WKSTA_NUMDGRAMBUF_PARMNUM}
- WKSTA_WRKHEURISTICS_PARMNUM = 32; // Supported by down-level.
- {$EXTERNALSYM WKSTA_WRKHEURISTICS_PARMNUM}
- WKSTA_MAXTHREADS_PARMNUM = 33;
- {$EXTERNALSYM WKSTA_MAXTHREADS_PARMNUM}
-
- WKSTA_LOCKQUOTA_PARMNUM = 41;
- {$EXTERNALSYM WKSTA_LOCKQUOTA_PARMNUM}
- WKSTA_LOCKINCREMENT_PARMNUM = 42;
- {$EXTERNALSYM WKSTA_LOCKINCREMENT_PARMNUM}
- WKSTA_LOCKMAXIMUM_PARMNUM = 43;
- {$EXTERNALSYM WKSTA_LOCKMAXIMUM_PARMNUM}
- WKSTA_PIPEINCREMENT_PARMNUM = 44;
- {$EXTERNALSYM WKSTA_PIPEINCREMENT_PARMNUM}
- WKSTA_PIPEMAXIMUM_PARMNUM = 45;
- {$EXTERNALSYM WKSTA_PIPEMAXIMUM_PARMNUM}
- WKSTA_DORMANTFILELIMIT_PARMNUM = 46;
- {$EXTERNALSYM WKSTA_DORMANTFILELIMIT_PARMNUM}
- WKSTA_CACHEFILETIMEOUT_PARMNUM = 47;
- {$EXTERNALSYM WKSTA_CACHEFILETIMEOUT_PARMNUM}
- WKSTA_USEOPPORTUNISTICLOCKING_PARMNUM = 48;
- {$EXTERNALSYM WKSTA_USEOPPORTUNISTICLOCKING_PARMNUM}
- WKSTA_USEUNLOCKBEHIND_PARMNUM = 49;
- {$EXTERNALSYM WKSTA_USEUNLOCKBEHIND_PARMNUM}
- WKSTA_USECLOSEBEHIND_PARMNUM = 50;
- {$EXTERNALSYM WKSTA_USECLOSEBEHIND_PARMNUM}
- WKSTA_BUFFERNAMEDPIPES_PARMNUM = 51;
- {$EXTERNALSYM WKSTA_BUFFERNAMEDPIPES_PARMNUM}
- WKSTA_USELOCKANDREADANDUNLOCK_PARMNUM = 52;
- {$EXTERNALSYM WKSTA_USELOCKANDREADANDUNLOCK_PARMNUM}
- WKSTA_UTILIZENTCACHING_PARMNUM = 53;
- {$EXTERNALSYM WKSTA_UTILIZENTCACHING_PARMNUM}
- WKSTA_USERAWREAD_PARMNUM = 54;
- {$EXTERNALSYM WKSTA_USERAWREAD_PARMNUM}
- WKSTA_USERAWWRITE_PARMNUM = 55;
- {$EXTERNALSYM WKSTA_USERAWWRITE_PARMNUM}
- WKSTA_USEWRITERAWWITHDATA_PARMNUM = 56;
- {$EXTERNALSYM WKSTA_USEWRITERAWWITHDATA_PARMNUM}
- WKSTA_USEENCRYPTION_PARMNUM = 57;
- {$EXTERNALSYM WKSTA_USEENCRYPTION_PARMNUM}
- WKSTA_BUFFILESWITHDENYWRITE_PARMNUM = 58;
- {$EXTERNALSYM WKSTA_BUFFILESWITHDENYWRITE_PARMNUM}
- WKSTA_BUFFERREADONLYFILES_PARMNUM = 59;
- {$EXTERNALSYM WKSTA_BUFFERREADONLYFILES_PARMNUM}
- WKSTA_FORCECORECREATEMODE_PARMNUM = 60;
- {$EXTERNALSYM WKSTA_FORCECORECREATEMODE_PARMNUM}
- WKSTA_USE512BYTESMAXTRANSFER_PARMNUM = 61;
- {$EXTERNALSYM WKSTA_USE512BYTESMAXTRANSFER_PARMNUM}
- WKSTA_READAHEADTHRUPUT_PARMNUM = 62;
- {$EXTERNALSYM WKSTA_READAHEADTHRUPUT_PARMNUM}
-
-//
-// One of these values indicates the parameter within an information
-// structure that is invalid when ERROR_INVALID_PARAMETER is returned by
-// NetWkstaUserSetInfo.
-//
-
- WKSTA_OTH_DOMAINS_PARMNUM = 101;
- {$EXTERNALSYM WKSTA_OTH_DOMAINS_PARMNUM}
-
-//
-// One of these values indicates the parameter within an information
-// structure that is invalid when ERROR_INVALID_PARAMETER is returned by
-// NetWkstaTransportAdd.
-//
-
- TRANSPORT_QUALITYOFSERVICE_PARMNUM = 201;
- {$EXTERNALSYM TRANSPORT_QUALITYOFSERVICE_PARMNUM}
- TRANSPORT_NAME_PARMNUM = 202;
- {$EXTERNALSYM TRANSPORT_NAME_PARMNUM}
-
-implementation
-
-{$IFDEF DYNAMIC_LINK}
-
-var
- _NetWkstaGetInfo: Pointer;
-
-function NetWkstaGetInfo;
-begin
- GetProcedureAddress(_NetWkstaGetInfo, netapi32, 'NetWkstaGetInfo');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetWkstaGetInfo]
- end;
-end;
-
-var
- _NetWkstaSetInfo: Pointer;
-
-function NetWkstaSetInfo;
-begin
- GetProcedureAddress(_NetWkstaSetInfo, netapi32, 'NetWkstaSetInfo');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetWkstaSetInfo]
- end;
-end;
-
-var
- _NetWkstaUserGetInfo: Pointer;
-
-function NetWkstaUserGetInfo;
-begin
- GetProcedureAddress(_NetWkstaUserGetInfo, netapi32, 'NetWkstaUserGetInfo');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetWkstaUserGetInfo]
- end;
-end;
-
-var
- _NetWkstaUserSetInfo: Pointer;
-
-function NetWkstaUserSetInfo;
-begin
- GetProcedureAddress(_NetWkstaUserSetInfo, netapi32, 'NetWkstaUserSetInfo');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetWkstaUserSetInfo]
- end;
-end;
-
-var
- _NetWkstaUserEnum: Pointer;
-
-function NetWkstaUserEnum;
-begin
- GetProcedureAddress(_NetWkstaUserEnum, netapi32, 'NetWkstaUserEnum');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetWkstaUserEnum]
- end;
-end;
-
-var
- _NetWkstaTransportAdd: Pointer;
-
-function NetWkstaTransportAdd;
-begin
- GetProcedureAddress(_NetWkstaTransportAdd, netapi32, 'NetWkstaTransportAdd');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetWkstaTransportAdd]
- end;
-end;
-
-var
- _NetWkstaTransportDel: Pointer;
-
-function NetWkstaTransportDel;
-begin
- GetProcedureAddress(_NetWkstaTransportDel, netapi32, 'NetWkstaTransportDel');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetWkstaTransportDel]
- end;
-end;
-
-var
- _NetWkstaTransportEnum: Pointer;
-
-function NetWkstaTransportEnum;
-begin
- GetProcedureAddress(_NetWkstaTransportEnum, netapi32, 'NetWkstaTransportEnum');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NetWkstaTransportEnum]
- end;
-end;
-
-{$ELSE}
-
-function NetWkstaGetInfo; external netapi32 name 'NetWkstaGetInfo';
-function NetWkstaSetInfo; external netapi32 name 'NetWkstaSetInfo';
-function NetWkstaUserGetInfo; external netapi32 name 'NetWkstaUserGetInfo';
-function NetWkstaUserSetInfo; external netapi32 name 'NetWkstaUserSetInfo';
-function NetWkstaUserEnum; external netapi32 name 'NetWkstaUserEnum';
-function NetWkstaTransportAdd; external netapi32 name 'NetWkstaTransportAdd';
-function NetWkstaTransportDel; external netapi32 name 'NetWkstaTransportDel';
-function NetWkstaTransportEnum; external netapi32 name 'NetWkstaTransportEnum';
-
-{$ENDIF DYNAMIC_LINK}
-
-end.
+{******************************************************************************}
+{ }
+{ Lan Manager Workstation API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: lmwksta.h, released November 2001. The original Pascal }
+{ code is: LmWkSta.pas, released Februari 2002. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwalmwksta.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaLmWkSta;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "lmwksta.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaLmCons, JwaWinType;
+
+//
+// Function Prototypes
+//
+
+function NetWkstaGetInfo(servername: LMSTR; level: DWORD; var bufptr: LPBYTE): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetWkstaGetInfo}
+
+function NetWkstaSetInfo(servername: LMSTR; level: DWORD; buffer: LPBYTE; parm_err: LPDWORD): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetWkstaSetInfo}
+
+function NetWkstaUserGetInfo(reserved: LMSTR; level: DWORD; var bufptr: LPBYTE): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetWkstaUserGetInfo}
+
+function NetWkstaUserSetInfo(reserved: LMSTR; level: DWORD; buf: LPBYTE; parm_err: LPDWORD): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetWkstaUserSetInfo}
+
+function NetWkstaUserEnum(servername: LMSTR; level: DWORD; var bufptr: LPBYTE; prefmaxlen: DWORD; entriesread: LPDWORD; totalentries: LPDWORD; resumehandle: LPDWORD): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetWkstaUserEnum}
+
+function NetWkstaTransportAdd(servername: LMSTR; level: DWORD; buf: LPBYTE; parm_err: LPDWORD): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetWkstaTransportAdd}
+
+function NetWkstaTransportDel(servername: LMSTR; transportname: LMSTR; ucond: DWORD): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetWkstaTransportDel}
+
+function NetWkstaTransportEnum(servername: LMSTR; level: DWORD; var bufptr: LPBYTE; prefmaxlen: DWORD; entriesread: LPDWORD; totalentries: LPDWORD; resumehandle: LPDWORD): NET_API_STATUS; stdcall;
+{$EXTERNALSYM NetWkstaTransportEnum}
+
+//
+// Data Structures
+//
+
+//
+// NetWkstaGetInfo and NetWkstaSetInfo
+//
+
+//
+// NetWkstaGetInfo only. System information - guest access
+//
+
+type
+ LPWKSTA_INFO_100 = ^WKSTA_INFO_100;
+ {$EXTERNALSYM LPWKSTA_INFO_100}
+ PWKSTA_INFO_100 = ^WKSTA_INFO_100;
+ {$EXTERNALSYM PWKSTA_INFO_100}
+ _WKSTA_INFO_100 = record
+ wki100_platform_id: DWORD;
+ wki100_computername: LMSTR;
+ wki100_langroup: LMSTR;
+ wki100_ver_major: DWORD;
+ wki100_ver_minor: DWORD;
+ end;
+ {$EXTERNALSYM _WKSTA_INFO_100}
+ WKSTA_INFO_100 = _WKSTA_INFO_100;
+ {$EXTERNALSYM WKSTA_INFO_100}
+ TWkstaInfo100 = WKSTA_INFO_100;
+ PWkstaInfo100 = PWKSTA_INFO_100;
+
+//
+// NetWkstaGetInfo only. System information - user access
+//
+
+ LPWKSTA_INFO_101 = ^WKSTA_INFO_101;
+ {$EXTERNALSYM LPWKSTA_INFO_101}
+ PWKSTA_INFO_101 = ^WKSTA_INFO_101;
+ {$EXTERNALSYM PWKSTA_INFO_101}
+ _WKSTA_INFO_101 = record
+ wki101_platform_id: DWORD;
+ wki101_computername: LMSTR;
+ wki101_langroup: LMSTR;
+ wki101_ver_major: DWORD;
+ wki101_ver_minor: DWORD;
+ wki101_lanroot: LMSTR;
+ end;
+ {$EXTERNALSYM _WKSTA_INFO_101}
+ WKSTA_INFO_101 = _WKSTA_INFO_101;
+ {$EXTERNALSYM WKSTA_INFO_101}
+ TWkstaInfo101 = WKSTA_INFO_101;
+ PWkstaInfo101 = PWKSTA_INFO_101;
+
+//
+// NetWkstaGetInfo only. System information - admin or operator access
+//
+
+ LPWKSTA_INFO_102 = ^WKSTA_INFO_102;
+ {$EXTERNALSYM LPWKSTA_INFO_102}
+ PWKSTA_INFO_102 = ^WKSTA_INFO_102;
+ {$EXTERNALSYM PWKSTA_INFO_102}
+ _WKSTA_INFO_102 = record
+ wki102_platform_id: DWORD;
+ wki102_computername: LMSTR;
+ wki102_langroup: LMSTR;
+ wki102_ver_major: DWORD;
+ wki102_ver_minor: DWORD;
+ wki102_lanroot: LMSTR;
+ wki102_logged_on_users: DWORD;
+ end;
+ {$EXTERNALSYM _WKSTA_INFO_102}
+ WKSTA_INFO_102 = _WKSTA_INFO_102;
+ {$EXTERNALSYM WKSTA_INFO_102}
+ TWkstaInfo102 = WKSTA_INFO_102;
+ PWkstaInfo102 = PWKSTA_INFO_102;
+
+//
+// Down-level NetWkstaGetInfo and NetWkstaSetInfo.
+//
+// DOS specific workstation information -
+// admin or domain operator access
+//
+
+ LPWKSTA_INFO_302 = ^WKSTA_INFO_302;
+ {$EXTERNALSYM LPWKSTA_INFO_302}
+ PWKSTA_INFO_302 = ^WKSTA_INFO_302;
+ {$EXTERNALSYM PWKSTA_INFO_302}
+ _WKSTA_INFO_302 = record
+ wki302_char_wait: DWORD;
+ wki302_collection_time: DWORD;
+ wki302_maximum_collection_count: DWORD;
+ wki302_keep_conn: DWORD;
+ wki302_keep_search: DWORD;
+ wki302_max_cmds: DWORD;
+ wki302_num_work_buf: DWORD;
+ wki302_siz_work_buf: DWORD;
+ wki302_max_wrk_cache: DWORD;
+ wki302_sess_timeout: DWORD;
+ wki302_siz_error: DWORD;
+ wki302_num_alerts: DWORD;
+ wki302_num_services: DWORD;
+ wki302_errlog_sz: DWORD;
+ wki302_print_buf_time: DWORD;
+ wki302_num_char_buf: DWORD;
+ wki302_siz_char_buf: DWORD;
+ wki302_wrk_heuristics: LMSTR;
+ wki302_mailslots: DWORD;
+ wki302_num_dgram_buf: DWORD;
+ end;
+ {$EXTERNALSYM _WKSTA_INFO_302}
+ WKSTA_INFO_302 = _WKSTA_INFO_302;
+ {$EXTERNALSYM WKSTA_INFO_302}
+ TWkstaInfo302 = WKSTA_INFO_302;
+ PWkstaInfo302 = PWKSTA_INFO_302;
+
+//
+// Down-level NetWkstaGetInfo and NetWkstaSetInfo
+//
+// OS/2 specific workstation information -
+// admin or domain operator access
+//
+
+ LPWKSTA_INFO_402 = ^WKSTA_INFO_402;
+ {$EXTERNALSYM LPWKSTA_INFO_402}
+ PWKSTA_INFO_402 = ^WKSTA_INFO_402;
+ {$EXTERNALSYM PWKSTA_INFO_402}
+ _WKSTA_INFO_402 = record
+ wki402_char_wait: DWORD;
+ wki402_collection_time: DWORD;
+ wki402_maximum_collection_count: DWORD;
+ wki402_keep_conn: DWORD;
+ wki402_keep_search: DWORD;
+ wki402_max_cmds: DWORD;
+ wki402_num_work_buf: DWORD;
+ wki402_siz_work_buf: DWORD;
+ wki402_max_wrk_cache: DWORD;
+ wki402_sess_timeout: DWORD;
+ wki402_siz_error: DWORD;
+ wki402_num_alerts: DWORD;
+ wki402_num_services: DWORD;
+ wki402_errlog_sz: DWORD;
+ wki402_print_buf_time: DWORD;
+ wki402_num_char_buf: DWORD;
+ wki402_siz_char_buf: DWORD;
+ wki402_wrk_heuristics: LMSTR;
+ wki402_mailslots: DWORD;
+ wki402_num_dgram_buf: DWORD;
+ wki402_max_threads: DWORD;
+ end;
+ {$EXTERNALSYM _WKSTA_INFO_402}
+ WKSTA_INFO_402 = _WKSTA_INFO_402;
+ {$EXTERNALSYM WKSTA_INFO_402}
+ TWkstaInfo402 = WKSTA_INFO_402;
+ PWkstaInfo402 = PWKSTA_INFO_402;
+
+//
+// Same-level NetWkstaGetInfo and NetWkstaSetInfo.
+//
+// NT specific workstation information -
+// admin or domain operator access
+//
+
+ LPWKSTA_INFO_502 = ^WKSTA_INFO_502;
+ {$EXTERNALSYM LPWKSTA_INFO_502}
+ PWKSTA_INFO_502 = ^WKSTA_INFO_502;
+ {$EXTERNALSYM PWKSTA_INFO_502}
+ _WKSTA_INFO_502 = record
+ wki502_char_wait: DWORD;
+ wki502_collection_time: DWORD;
+ wki502_maximum_collection_count: DWORD;
+ wki502_keep_conn: DWORD;
+ wki502_max_cmds: DWORD;
+ wki502_sess_timeout: DWORD;
+ wki502_siz_char_buf: DWORD;
+ wki502_max_threads: DWORD;
+ wki502_lock_quota: DWORD;
+ wki502_lock_increment: DWORD;
+ wki502_lock_maximum: DWORD;
+ wki502_pipe_increment: DWORD;
+ wki502_pipe_maximum: DWORD;
+ wki502_cache_file_timeout: DWORD;
+ wki502_dormant_file_limit: DWORD;
+ wki502_read_ahead_throughput: DWORD;
+ wki502_num_mailslot_buffers: DWORD;
+ wki502_num_srv_announce_buffers: DWORD;
+ wki502_max_illegal_datagram_events: DWORD;
+ wki502_illegal_datagram_event_reset_frequency: DWORD;
+ wki502_log_election_packets: BOOL;
+ wki502_use_opportunistic_locking: BOOL;
+ wki502_use_unlock_behind: BOOL;
+ wki502_use_close_behind: BOOL;
+ wki502_buf_named_pipes: BOOL;
+ wki502_use_lock_read_unlock: BOOL;
+ wki502_utilize_nt_caching: BOOL;
+ wki502_use_raw_read: BOOL;
+ wki502_use_raw_write: BOOL;
+ wki502_use_write_raw_data: BOOL;
+ wki502_use_encryption: BOOL;
+ wki502_buf_files_deny_write: BOOL;
+ wki502_buf_read_only_files: BOOL;
+ wki502_force_core_create_mode: BOOL;
+ wki502_use_512_byte_max_transfer: BOOL;
+ end;
+ {$EXTERNALSYM _WKSTA_INFO_502}
+ WKSTA_INFO_502 = _WKSTA_INFO_502;
+ {$EXTERNALSYM WKSTA_INFO_502}
+ TWkstaInfo502 = WKSTA_INFO_502;
+ PWkstaInfo502 = PWKSTA_INFO_502;
+
+//
+// The following info-levels are only valid for NetWkstaSetInfo
+//
+
+//
+// The following levels are supported on down-level systems (LAN Man 2.x)
+// as well as NT systems:
+//
+
+ LPWKSTA_INFO_1010 = ^WKSTA_INFO_1010;
+ {$EXTERNALSYM LPWKSTA_INFO_1010}
+ PWKSTA_INFO_1010 = ^WKSTA_INFO_1010;
+ {$EXTERNALSYM PWKSTA_INFO_1010}
+ _WKSTA_INFO_1010 = record
+ wki1010_char_wait: DWORD;
+ end;
+ {$EXTERNALSYM _WKSTA_INFO_1010}
+ WKSTA_INFO_1010 = _WKSTA_INFO_1010;
+ {$EXTERNALSYM WKSTA_INFO_1010}
+ TWkstaInfo1010 = WKSTA_INFO_1010;
+ PWkstaInfo1010 = PWKSTA_INFO_1010;
+
+ LPWKSTA_INFO_1011 = ^WKSTA_INFO_1011;
+ {$EXTERNALSYM LPWKSTA_INFO_1011}
+ PWKSTA_INFO_1011 = ^WKSTA_INFO_1011;
+ {$EXTERNALSYM PWKSTA_INFO_1011}
+ _WKSTA_INFO_1011 = record
+ wki1011_collection_time: DWORD;
+ end;
+ {$EXTERNALSYM _WKSTA_INFO_1011}
+ WKSTA_INFO_1011 = _WKSTA_INFO_1011;
+ {$EXTERNALSYM WKSTA_INFO_1011}
+ TWkstaInfo1011 = WKSTA_INFO_1011;
+ PWkstaInfo1011 = PWKSTA_INFO_1011;
+
+ LPWKSTA_INFO_1012 = ^WKSTA_INFO_1012;
+ {$EXTERNALSYM LPWKSTA_INFO_1012}
+ PWKSTA_INFO_1012 = ^WKSTA_INFO_1012;
+ {$EXTERNALSYM PWKSTA_INFO_1012}
+ _WKSTA_INFO_1012 = record
+ wki1012_maximum_collection_count: DWORD;
+ end;
+ {$EXTERNALSYM _WKSTA_INFO_1012}
+ WKSTA_INFO_1012 = _WKSTA_INFO_1012;
+ {$EXTERNALSYM WKSTA_INFO_1012}
+ TWkstaInfo1012 = WKSTA_INFO_1012;
+ PWkstaInfo1012 = PWKSTA_INFO_1012;
+
+//
+// The following level are supported on down-level systems (LAN Man 2.x)
+// only:
+//
+
+ LPWKSTA_INFO_1027 = ^WKSTA_INFO_1027;
+ {$EXTERNALSYM LPWKSTA_INFO_1027}
+ PWKSTA_INFO_1027 = ^WKSTA_INFO_1027;
+ {$EXTERNALSYM PWKSTA_INFO_1027}
+ _WKSTA_INFO_1027 = record
+ wki1027_errlog_sz: DWORD;
+ end;
+ {$EXTERNALSYM _WKSTA_INFO_1027}
+ WKSTA_INFO_1027 = _WKSTA_INFO_1027;
+ {$EXTERNALSYM WKSTA_INFO_1027}
+ TWkstaInfo1027 = WKSTA_INFO_1027;
+ PWkstaInfo1027 = PWKSTA_INFO_1027;
+
+ LPWKSTA_INFO_1028 = ^WKSTA_INFO_1028;
+ {$EXTERNALSYM LPWKSTA_INFO_1028}
+ PWKSTA_INFO_1028 = ^WKSTA_INFO_1028;
+ {$EXTERNALSYM PWKSTA_INFO_1028}
+ _WKSTA_INFO_1028 = record
+ wki1028_print_buf_time: DWORD;
+ end;
+ {$EXTERNALSYM _WKSTA_INFO_1028}
+ WKSTA_INFO_1028 = _WKSTA_INFO_1028;
+ {$EXTERNALSYM WKSTA_INFO_1028}
+ TWkstaInfo1028 = WKSTA_INFO_1028;
+ PWkstaInfo1028 = PWKSTA_INFO_1028;
+
+ LPWKSTA_INFO_1032 = ^WKSTA_INFO_1032;
+ {$EXTERNALSYM LPWKSTA_INFO_1032}
+ PWKSTA_INFO_1032 = ^WKSTA_INFO_1032;
+ {$EXTERNALSYM PWKSTA_INFO_1032}
+ _WKSTA_INFO_1032 = record
+ wki1032_wrk_heuristics: DWORD;
+ end;
+ {$EXTERNALSYM _WKSTA_INFO_1032}
+ WKSTA_INFO_1032 = _WKSTA_INFO_1032;
+ {$EXTERNALSYM WKSTA_INFO_1032}
+ TWkstaInfo1032 = WKSTA_INFO_1032;
+ PWkstaInfo1032 = PWKSTA_INFO_1032;
+
+//
+// The following levels are settable on NT systems, and have no
+// effect on down-level systems (i.e. LANMan 2.x) since these
+// fields cannot be set on them:
+//
+
+ LPWKSTA_INFO_1013 = ^WKSTA_INFO_1013;
+ {$EXTERNALSYM LPWKSTA_INFO_1013}
+ PWKSTA_INFO_1013 = ^WKSTA_INFO_1013;
+ {$EXTERNALSYM PWKSTA_INFO_1013}
+ _WKSTA_INFO_1013 = record
+ wki1013_keep_conn: DWORD;
+ end;
+ {$EXTERNALSYM _WKSTA_INFO_1013}
+ WKSTA_INFO_1013 = _WKSTA_INFO_1013;
+ {$EXTERNALSYM WKSTA_INFO_1013}
+ TWkstaInfo1013 = WKSTA_INFO_1013;
+ PWkstaInfo1013 = PWKSTA_INFO_1013;
+
+ LPWKSTA_INFO_1018 = ^WKSTA_INFO_1018;
+ {$EXTERNALSYM LPWKSTA_INFO_1018}
+ PWKSTA_INFO_1018 = ^WKSTA_INFO_1018;
+ {$EXTERNALSYM PWKSTA_INFO_1018}
+ _WKSTA_INFO_1018 = record
+ wki1018_sess_timeout: DWORD;
+ end;
+ {$EXTERNALSYM _WKSTA_INFO_1018}
+ WKSTA_INFO_1018 = _WKSTA_INFO_1018;
+ {$EXTERNALSYM WKSTA_INFO_1018}
+ TWkstaInfo1018 = WKSTA_INFO_1018;
+ PWkstaInfo1018 = PWKSTA_INFO_1018;
+
+ LPWKSTA_INFO_1023 = ^WKSTA_INFO_1023;
+ {$EXTERNALSYM LPWKSTA_INFO_1023}
+ PWKSTA_INFO_1023 = ^WKSTA_INFO_1023;
+ {$EXTERNALSYM PWKSTA_INFO_1023}
+ _WKSTA_INFO_1023 = record
+ wki1023_siz_char_buf: DWORD;
+ end;
+ {$EXTERNALSYM _WKSTA_INFO_1023}
+ WKSTA_INFO_1023 = _WKSTA_INFO_1023;
+ {$EXTERNALSYM WKSTA_INFO_1023}
+ TWkstaInfo1023 = WKSTA_INFO_1023;
+ PWkstaInfo1023 = PWKSTA_INFO_1023;
+
+ LPWKSTA_INFO_1033 = ^WKSTA_INFO_1033;
+ {$EXTERNALSYM LPWKSTA_INFO_1033}
+ PWKSTA_INFO_1033 = ^WKSTA_INFO_1033;
+ {$EXTERNALSYM PWKSTA_INFO_1033}
+ _WKSTA_INFO_1033 = record
+ wki1033_max_threads: DWORD;
+ end;
+ {$EXTERNALSYM _WKSTA_INFO_1033}
+ WKSTA_INFO_1033 = _WKSTA_INFO_1033;
+ {$EXTERNALSYM WKSTA_INFO_1033}
+ TWkstaInfo1033 = WKSTA_INFO_1033;
+ PWkstaInfo1033 = PWKSTA_INFO_1033;
+
+//
+// The following levels are only supported on NT systems:
+//
+
+ LPWKSTA_INFO_1041 = ^WKSTA_INFO_1041;
+ {$EXTERNALSYM LPWKSTA_INFO_1041}
+ PWKSTA_INFO_1041 = ^WKSTA_INFO_1041;
+ {$EXTERNALSYM PWKSTA_INFO_1041}
+ _WKSTA_INFO_1041 = record
+ wki1041_lock_quota: DWORD;
+ end;
+ {$EXTERNALSYM _WKSTA_INFO_1041}
+ WKSTA_INFO_1041 = _WKSTA_INFO_1041;
+ {$EXTERNALSYM WKSTA_INFO_1041}
+ TWkstaInfo1041 = WKSTA_INFO_1041;
+ PWkstaInfo1041 = PWKSTA_INFO_1041;
+
+ LPWKSTA_INFO_1042 = ^WKSTA_INFO_1042;
+ {$EXTERNALSYM LPWKSTA_INFO_1042}
+ PWKSTA_INFO_1042 = ^WKSTA_INFO_1042;
+ {$EXTERNALSYM PWKSTA_INFO_1042}
+ _WKSTA_INFO_1042 = record
+ wki1042_lock_increment: DWORD;
+ end;
+ {$EXTERNALSYM _WKSTA_INFO_1042}
+ WKSTA_INFO_1042 = _WKSTA_INFO_1042;
+ {$EXTERNALSYM WKSTA_INFO_1042}
+ TWkstaInfo1042 = WKSTA_INFO_1042;
+ PWkstaInfo1042 = PWKSTA_INFO_1042;
+
+ LPWKSTA_INFO_1043 = ^WKSTA_INFO_1043;
+ {$EXTERNALSYM LPWKSTA_INFO_1043}
+ PWKSTA_INFO_1043 = ^WKSTA_INFO_1043;
+ {$EXTERNALSYM PWKSTA_INFO_1043}
+ _WKSTA_INFO_1043 = record
+ wki1043_lock_maximum: DWORD;
+ end;
+ {$EXTERNALSYM _WKSTA_INFO_1043}
+ WKSTA_INFO_1043 = _WKSTA_INFO_1043;
+ {$EXTERNALSYM WKSTA_INFO_1043}
+ TWkstaInfo1043 = WKSTA_INFO_1043;
+ PWkstaInfo1043 = PWKSTA_INFO_1043;
+
+ LPWKSTA_INFO_1044 = ^WKSTA_INFO_1044;
+ {$EXTERNALSYM LPWKSTA_INFO_1044}
+ PWKSTA_INFO_1044 = ^WKSTA_INFO_1044;
+ {$EXTERNALSYM PWKSTA_INFO_1044}
+ _WKSTA_INFO_1044 = record
+ wki1044_pipe_increment: DWORD;
+ end;
+ {$EXTERNALSYM _WKSTA_INFO_1044}
+ WKSTA_INFO_1044 = _WKSTA_INFO_1044;
+ {$EXTERNALSYM WKSTA_INFO_1044}
+ TWkstaInfo1044 = WKSTA_INFO_1044;
+ PWkstaInfo1044 = PWKSTA_INFO_1044;
+
+ LPWKSTA_INFO_1045 = ^WKSTA_INFO_1045;
+ {$EXTERNALSYM LPWKSTA_INFO_1045}
+ PWKSTA_INFO_1045 = ^WKSTA_INFO_1045;
+ {$EXTERNALSYM PWKSTA_INFO_1045}
+ _WKSTA_INFO_1045 = record
+ wki1045_pipe_maximum: DWORD;
+ end;
+ {$EXTERNALSYM _WKSTA_INFO_1045}
+ WKSTA_INFO_1045 = _WKSTA_INFO_1045;
+ {$EXTERNALSYM WKSTA_INFO_1045}
+ TWkstaInfo1045 = WKSTA_INFO_1045;
+ PWkstaInfo1045 = PWKSTA_INFO_1045;
+
+ LPWKSTA_INFO_1046 = ^WKSTA_INFO_1046;
+ {$EXTERNALSYM LPWKSTA_INFO_1046}
+ PWKSTA_INFO_1046 = ^WKSTA_INFO_1046;
+ {$EXTERNALSYM PWKSTA_INFO_1046}
+ _WKSTA_INFO_1046 = record
+ wki1046_dormant_file_limit: DWORD;
+ end;
+ {$EXTERNALSYM _WKSTA_INFO_1046}
+ WKSTA_INFO_1046 = _WKSTA_INFO_1046;
+ {$EXTERNALSYM WKSTA_INFO_1046}
+ TWkstaInfo1046 = WKSTA_INFO_1046;
+ PWkstaInfo1046 = PWKSTA_INFO_1046;
+
+ LPWKSTA_INFO_1047 = ^WKSTA_INFO_1047;
+ {$EXTERNALSYM LPWKSTA_INFO_1047}
+ PWKSTA_INFO_1047 = ^WKSTA_INFO_1047;
+ {$EXTERNALSYM PWKSTA_INFO_1047}
+ _WKSTA_INFO_1047 = record
+ wki1047_cache_file_timeout: DWORD;
+ end;
+ {$EXTERNALSYM _WKSTA_INFO_1047}
+ WKSTA_INFO_1047 = _WKSTA_INFO_1047;
+ {$EXTERNALSYM WKSTA_INFO_1047}
+ TWkstaInfo1047 = WKSTA_INFO_1047;
+ PWkstaInfo1047 = PWKSTA_INFO_1047;
+
+ LPWKSTA_INFO_1048 = ^WKSTA_INFO_1048;
+ {$EXTERNALSYM LPWKSTA_INFO_1048}
+ PWKSTA_INFO_1048 = ^WKSTA_INFO_1048;
+ {$EXTERNALSYM PWKSTA_INFO_1048}
+ _WKSTA_INFO_1048 = record
+ wki1048_use_opportunistic_locking: BOOL;
+ end;
+ {$EXTERNALSYM _WKSTA_INFO_1048}
+ WKSTA_INFO_1048 = _WKSTA_INFO_1048;
+ {$EXTERNALSYM WKSTA_INFO_1048}
+ TWkstaInfo1048 = WKSTA_INFO_1048;
+ PWkstaInfo1048 = PWKSTA_INFO_1048;
+
+ LPWKSTA_INFO_1049 = ^WKSTA_INFO_1049;
+ {$EXTERNALSYM LPWKSTA_INFO_1049}
+ PWKSTA_INFO_1049 = ^WKSTA_INFO_1049;
+ {$EXTERNALSYM PWKSTA_INFO_1049}
+ _WKSTA_INFO_1049 = record
+ wki1049_use_unlock_behind: BOOL;
+ end;
+ {$EXTERNALSYM _WKSTA_INFO_1049}
+ WKSTA_INFO_1049 = _WKSTA_INFO_1049;
+ {$EXTERNALSYM WKSTA_INFO_1049}
+ TWkstaInfo1049 = WKSTA_INFO_1049;
+ PWkstaInfo1049 = PWKSTA_INFO_1049;
+
+ LPWKSTA_INFO_1050 = ^WKSTA_INFO_1050;
+ {$EXTERNALSYM LPWKSTA_INFO_1050}
+ PWKSTA_INFO_1050 = ^WKSTA_INFO_1050;
+ {$EXTERNALSYM PWKSTA_INFO_1050}
+ _WKSTA_INFO_1050 = record
+ wki1050_use_close_behind: BOOL;
+ end;
+ {$EXTERNALSYM _WKSTA_INFO_1050}
+ WKSTA_INFO_1050 = _WKSTA_INFO_1050;
+ {$EXTERNALSYM WKSTA_INFO_1050}
+ TWkstaInfo1050 = WKSTA_INFO_1050;
+ PWkstaInfo1050 = PWKSTA_INFO_1050;
+
+ LPWKSTA_INFO_1051 = ^WKSTA_INFO_1051;
+ {$EXTERNALSYM LPWKSTA_INFO_1051}
+ PWKSTA_INFO_1051 = ^WKSTA_INFO_1051;
+ {$EXTERNALSYM PWKSTA_INFO_1051}
+ _WKSTA_INFO_1051 = record
+ wki1051_buf_named_pipes: BOOL;
+ end;
+ {$EXTERNALSYM _WKSTA_INFO_1051}
+ WKSTA_INFO_1051 = _WKSTA_INFO_1051;
+ {$EXTERNALSYM WKSTA_INFO_1051}
+ TWkstaInfo1051 = WKSTA_INFO_1051;
+ PWkstaInfo1051 = PWKSTA_INFO_1051;
+
+ LPWKSTA_INFO_1052 = ^WKSTA_INFO_1052;
+ {$EXTERNALSYM LPWKSTA_INFO_1052}
+ PWKSTA_INFO_1052 = ^WKSTA_INFO_1052;
+ {$EXTERNALSYM PWKSTA_INFO_1052}
+ _WKSTA_INFO_1052 = record
+ wki1052_use_lock_read_unlock: BOOL;
+ end;
+ {$EXTERNALSYM _WKSTA_INFO_1052}
+ WKSTA_INFO_1052 = _WKSTA_INFO_1052;
+ {$EXTERNALSYM WKSTA_INFO_1052}
+ TWkstaInfo1052 = WKSTA_INFO_1052;
+ PWkstaInfo1052 = PWKSTA_INFO_1052;
+
+ LPWKSTA_INFO_1053 = ^WKSTA_INFO_1053;
+ {$EXTERNALSYM LPWKSTA_INFO_1053}
+ PWKSTA_INFO_1053 = ^WKSTA_INFO_1053;
+ {$EXTERNALSYM PWKSTA_INFO_1053}
+ _WKSTA_INFO_1053 = record
+ wki1053_utilize_nt_caching: BOOL;
+ end;
+ {$EXTERNALSYM _WKSTA_INFO_1053}
+ WKSTA_INFO_1053 = _WKSTA_INFO_1053;
+ {$EXTERNALSYM WKSTA_INFO_1053}
+ TWkstaInfo1053 = WKSTA_INFO_1053;
+ PWkstaInfo1053 = PWKSTA_INFO_1053;
+
+ LPWKSTA_INFO_1054 = ^WKSTA_INFO_1054;
+ {$EXTERNALSYM LPWKSTA_INFO_1054}
+ PWKSTA_INFO_1054 = ^WKSTA_INFO_1054;
+ {$EXTERNALSYM PWKSTA_INFO_1054}
+ _WKSTA_INFO_1054 = record
+ wki1054_use_raw_read: BOOL;
+ end;
+ {$EXTERNALSYM _WKSTA_INFO_1054}
+ WKSTA_INFO_1054 = _WKSTA_INFO_1054;
+ {$EXTERNALSYM WKSTA_INFO_1054}
+ TWkstaInfo1054 = WKSTA_INFO_1054;
+ PWkstaInfo1054 = PWKSTA_INFO_1054;
+
+ LPWKSTA_INFO_1055 = ^WKSTA_INFO_1055;
+ {$EXTERNALSYM LPWKSTA_INFO_1055}
+ PWKSTA_INFO_1055 = ^WKSTA_INFO_1055;
+ {$EXTERNALSYM PWKSTA_INFO_1055}
+ _WKSTA_INFO_1055 = record
+ wki1055_use_raw_write: BOOL;
+ end;
+ {$EXTERNALSYM _WKSTA_INFO_1055}
+ WKSTA_INFO_1055 = _WKSTA_INFO_1055;
+ {$EXTERNALSYM WKSTA_INFO_1055}
+ TWkstaInfo1055 = WKSTA_INFO_1055;
+ PWkstaInfo1055 = PWKSTA_INFO_1055;
+
+ LPWKSTA_INFO_1056 = ^WKSTA_INFO_1056;
+ {$EXTERNALSYM LPWKSTA_INFO_1056}
+ PWKSTA_INFO_1056 = ^WKSTA_INFO_1056;
+ {$EXTERNALSYM PWKSTA_INFO_1056}
+ _WKSTA_INFO_1056 = record
+ wki1056_use_write_raw_data: BOOL;
+ end;
+ {$EXTERNALSYM _WKSTA_INFO_1056}
+ WKSTA_INFO_1056 = _WKSTA_INFO_1056;
+ {$EXTERNALSYM WKSTA_INFO_1056}
+ TWkstaInfo1056 = WKSTA_INFO_1056;
+ PWkstaInfo1056 = PWKSTA_INFO_1056;
+
+ LPWKSTA_INFO_1057 = ^WKSTA_INFO_1057;
+ {$EXTERNALSYM LPWKSTA_INFO_1057}
+ PWKSTA_INFO_1057 = ^WKSTA_INFO_1057;
+ {$EXTERNALSYM PWKSTA_INFO_1057}
+ _WKSTA_INFO_1057 = record
+ wki1057_use_encryption: BOOL;
+ end;
+ {$EXTERNALSYM _WKSTA_INFO_1057}
+ WKSTA_INFO_1057 = _WKSTA_INFO_1057;
+ {$EXTERNALSYM WKSTA_INFO_1057}
+ TWkstaInfo1057 = WKSTA_INFO_1057;
+ PWkstaInfo1057 = PWKSTA_INFO_1057;
+
+ LPWKSTA_INFO_1058 = ^WKSTA_INFO_1058;
+ {$EXTERNALSYM LPWKSTA_INFO_1058}
+ PWKSTA_INFO_1058 = ^WKSTA_INFO_1058;
+ {$EXTERNALSYM PWKSTA_INFO_1058}
+ _WKSTA_INFO_1058 = record
+ wki1058_buf_files_deny_write: BOOL;
+ end;
+ {$EXTERNALSYM _WKSTA_INFO_1058}
+ WKSTA_INFO_1058 = _WKSTA_INFO_1058;
+ {$EXTERNALSYM WKSTA_INFO_1058}
+ TWkstaInfo1058 = WKSTA_INFO_1058;
+ PWkstaInfo1058 = PWKSTA_INFO_1058;
+
+ LPWKSTA_INFO_1059 = ^WKSTA_INFO_1059;
+ {$EXTERNALSYM LPWKSTA_INFO_1059}
+ PWKSTA_INFO_1059 = ^WKSTA_INFO_1059;
+ {$EXTERNALSYM PWKSTA_INFO_1059}
+ _WKSTA_INFO_1059 = record
+ wki1059_buf_read_only_files: BOOL;
+ end;
+ {$EXTERNALSYM _WKSTA_INFO_1059}
+ WKSTA_INFO_1059 = _WKSTA_INFO_1059;
+ {$EXTERNALSYM WKSTA_INFO_1059}
+ TWkstaInfo1059 = WKSTA_INFO_1059;
+ PWkstaInfo1059 = PWKSTA_INFO_1059;
+
+ LPWKSTA_INFO_1060 = ^WKSTA_INFO_1060;
+ {$EXTERNALSYM LPWKSTA_INFO_1060}
+ PWKSTA_INFO_1060 = ^WKSTA_INFO_1060;
+ {$EXTERNALSYM PWKSTA_INFO_1060}
+ _WKSTA_INFO_1060 = record
+ wki1060_force_core_create_mode: BOOL;
+ end;
+ {$EXTERNALSYM _WKSTA_INFO_1060}
+ WKSTA_INFO_1060 = _WKSTA_INFO_1060;
+ {$EXTERNALSYM WKSTA_INFO_1060}
+ TWkstaInfo1060 = WKSTA_INFO_1060;
+ PWkstaInfo1060 = PWKSTA_INFO_1060;
+
+ LPWKSTA_INFO_1061 = ^WKSTA_INFO_1061;
+ {$EXTERNALSYM LPWKSTA_INFO_1061}
+ PWKSTA_INFO_1061 = ^WKSTA_INFO_1061;
+ {$EXTERNALSYM PWKSTA_INFO_1061}
+ _WKSTA_INFO_1061 = record
+ wki1061_use_512_byte_max_transfer: BOOL;
+ end;
+ {$EXTERNALSYM _WKSTA_INFO_1061}
+ WKSTA_INFO_1061 = _WKSTA_INFO_1061;
+ {$EXTERNALSYM WKSTA_INFO_1061}
+ TWkstaInfo1061 = WKSTA_INFO_1061;
+ PWkstaInfo1061 = PWKSTA_INFO_1061;
+
+ LPWKSTA_INFO_1062 = ^WKSTA_INFO_1062;
+ {$EXTERNALSYM LPWKSTA_INFO_1062}
+ PWKSTA_INFO_1062 = ^WKSTA_INFO_1062;
+ {$EXTERNALSYM PWKSTA_INFO_1062}
+ _WKSTA_INFO_1062 = record
+ wki1062_read_ahead_throughput: DWORD;
+ end;
+ {$EXTERNALSYM _WKSTA_INFO_1062}
+ WKSTA_INFO_1062 = _WKSTA_INFO_1062;
+ {$EXTERNALSYM WKSTA_INFO_1062}
+ TWkstaInfo1062 = WKSTA_INFO_1062;
+ PWkstaInfo1062 = PWKSTA_INFO_1062;
+
+//
+// NetWkstaUserGetInfo (local only) and NetWkstaUserEnum -
+// no access restrictions.
+//
+
+ LPWKSTA_USER_INFO_0 = ^WKSTA_USER_INFO_0;
+ {$EXTERNALSYM LPWKSTA_USER_INFO_0}
+ PWKSTA_USER_INFO_0 = ^WKSTA_USER_INFO_0;
+ {$EXTERNALSYM PWKSTA_USER_INFO_0}
+ _WKSTA_USER_INFO_0 = record
+ wkui0_username: LMSTR;
+ end;
+ {$EXTERNALSYM _WKSTA_USER_INFO_0}
+ WKSTA_USER_INFO_0 = _WKSTA_USER_INFO_0;
+ {$EXTERNALSYM WKSTA_USER_INFO_0}
+ TWkstaUserInfo0 = WKSTA_USER_INFO_0;
+ PWkstaUserInfo0 = PWKSTA_USER_INFO_0;
+
+//
+// NetWkstaUserGetInfo (local only) and NetWkstaUserEnum -
+// no access restrictions.
+//
+
+ LPWKSTA_USER_INFO_1 = ^WKSTA_USER_INFO_1;
+ {$EXTERNALSYM LPWKSTA_USER_INFO_1}
+ PWKSTA_USER_INFO_1 = ^WKSTA_USER_INFO_1;
+ {$EXTERNALSYM PWKSTA_USER_INFO_1}
+ _WKSTA_USER_INFO_1 = record
+ wkui1_username: LMSTR;
+ wkui1_logon_domain: LMSTR;
+ wkui1_oth_domains: LMSTR;
+ wkui1_logon_server: LMSTR;
+ end;
+ {$EXTERNALSYM _WKSTA_USER_INFO_1}
+ WKSTA_USER_INFO_1 = _WKSTA_USER_INFO_1;
+ {$EXTERNALSYM WKSTA_USER_INFO_1}
+ TWkstaUserInfo1 = WKSTA_USER_INFO_1;
+ PWkstaUserInfo1 = PWKSTA_USER_INFO_1;
+
+//
+// NetWkstaUserSetInfo - local access.
+//
+
+ LPWKSTA_USER_INFO_1101 = ^WKSTA_USER_INFO_1101;
+ {$EXTERNALSYM LPWKSTA_USER_INFO_1101}
+ PWKSTA_USER_INFO_1101 = ^WKSTA_USER_INFO_1101;
+ {$EXTERNALSYM PWKSTA_USER_INFO_1101}
+ _WKSTA_USER_INFO_1101 = record
+ wkui1101_oth_domains: LMSTR;
+ end;
+ {$EXTERNALSYM _WKSTA_USER_INFO_1101}
+ WKSTA_USER_INFO_1101 = _WKSTA_USER_INFO_1101;
+ {$EXTERNALSYM WKSTA_USER_INFO_1101}
+ TWkstaUserInfo1101 = WKSTA_USER_INFO_1101;
+ PWkstaUserInfo1101 = PWKSTA_USER_INFO_1101;
+
+//
+// NetWkstaTransportAdd - admin access
+//
+
+ LPWKSTA_TRANSPORT_INFO_0 = ^WKSTA_TRANSPORT_INFO_0;
+ {$EXTERNALSYM LPWKSTA_TRANSPORT_INFO_0}
+ PWKSTA_TRANSPORT_INFO_0 = ^WKSTA_TRANSPORT_INFO_0;
+ {$EXTERNALSYM PWKSTA_TRANSPORT_INFO_0}
+ _WKSTA_TRANSPORT_INFO_0 = record
+ wkti0_quality_of_service: DWORD;
+ wkti0_number_of_vcs: DWORD;
+ wkti0_transport_name: LMSTR;
+ wkti0_transport_address: LMSTR;
+ wkti0_wan_ish: BOOL;
+ end;
+ {$EXTERNALSYM _WKSTA_TRANSPORT_INFO_0}
+ WKSTA_TRANSPORT_INFO_0 = _WKSTA_TRANSPORT_INFO_0;
+ {$EXTERNALSYM WKSTA_TRANSPORT_INFO_0}
+ TWkstaTransportInfo0 = WKSTA_TRANSPORT_INFO_0;
+ PWkstaTransportInfo0 = PWKSTA_TRANSPORT_INFO_0;
+
+//
+// Special Values and Constants
+//
+
+//
+// Identifiers for use as NetWkstaSetInfo parmnum parameter
+//
+
+//
+// One of these values indicates the parameter within an information
+// structure that is invalid when ERROR_INVALID_PARAMETER is returned by
+// NetWkstaSetInfo.
+//
+
+const
+ WKSTA_PLATFORM_ID_PARMNUM = 100;
+ {$EXTERNALSYM WKSTA_PLATFORM_ID_PARMNUM}
+ WKSTA_COMPUTERNAME_PARMNUM = 1;
+ {$EXTERNALSYM WKSTA_COMPUTERNAME_PARMNUM}
+ WKSTA_LANGROUP_PARMNUM = 2;
+ {$EXTERNALSYM WKSTA_LANGROUP_PARMNUM}
+ WKSTA_VER_MAJOR_PARMNUM = 4;
+ {$EXTERNALSYM WKSTA_VER_MAJOR_PARMNUM}
+ WKSTA_VER_MINOR_PARMNUM = 5;
+ {$EXTERNALSYM WKSTA_VER_MINOR_PARMNUM}
+ WKSTA_LOGGED_ON_USERS_PARMNUM = 6;
+ {$EXTERNALSYM WKSTA_LOGGED_ON_USERS_PARMNUM}
+ WKSTA_LANROOT_PARMNUM = 7;
+ {$EXTERNALSYM WKSTA_LANROOT_PARMNUM}
+ WKSTA_LOGON_DOMAIN_PARMNUM = 8;
+ {$EXTERNALSYM WKSTA_LOGON_DOMAIN_PARMNUM}
+ WKSTA_LOGON_SERVER_PARMNUM = 9;
+ {$EXTERNALSYM WKSTA_LOGON_SERVER_PARMNUM}
+ WKSTA_CHARWAIT_PARMNUM = 10; // Supported by down-level.
+ {$EXTERNALSYM WKSTA_CHARWAIT_PARMNUM}
+ WKSTA_CHARTIME_PARMNUM = 11; // Supported by down-level.
+ {$EXTERNALSYM WKSTA_CHARTIME_PARMNUM}
+ WKSTA_CHARCOUNT_PARMNUM = 12; // Supported by down-level.
+ {$EXTERNALSYM WKSTA_CHARCOUNT_PARMNUM}
+ WKSTA_KEEPCONN_PARMNUM = 13;
+ {$EXTERNALSYM WKSTA_KEEPCONN_PARMNUM}
+ WKSTA_KEEPSEARCH_PARMNUM = 14;
+ {$EXTERNALSYM WKSTA_KEEPSEARCH_PARMNUM}
+ WKSTA_MAXCMDS_PARMNUM = 15;
+ {$EXTERNALSYM WKSTA_MAXCMDS_PARMNUM}
+ WKSTA_NUMWORKBUF_PARMNUM = 16;
+ {$EXTERNALSYM WKSTA_NUMWORKBUF_PARMNUM}
+ WKSTA_MAXWRKCACHE_PARMNUM = 17;
+ {$EXTERNALSYM WKSTA_MAXWRKCACHE_PARMNUM}
+ WKSTA_SESSTIMEOUT_PARMNUM = 18;
+ {$EXTERNALSYM WKSTA_SESSTIMEOUT_PARMNUM}
+ WKSTA_SIZERROR_PARMNUM = 19;
+ {$EXTERNALSYM WKSTA_SIZERROR_PARMNUM}
+ WKSTA_NUMALERTS_PARMNUM = 20;
+ {$EXTERNALSYM WKSTA_NUMALERTS_PARMNUM}
+ WKSTA_NUMSERVICES_PARMNUM = 21;
+ {$EXTERNALSYM WKSTA_NUMSERVICES_PARMNUM}
+ WKSTA_NUMCHARBUF_PARMNUM = 22;
+ {$EXTERNALSYM WKSTA_NUMCHARBUF_PARMNUM}
+ WKSTA_SIZCHARBUF_PARMNUM = 23;
+ {$EXTERNALSYM WKSTA_SIZCHARBUF_PARMNUM}
+ WKSTA_ERRLOGSZ_PARMNUM = 27; // Supported by down-level.
+ {$EXTERNALSYM WKSTA_ERRLOGSZ_PARMNUM}
+ WKSTA_PRINTBUFTIME_PARMNUM = 28; // Supported by down-level.
+ {$EXTERNALSYM WKSTA_PRINTBUFTIME_PARMNUM}
+ WKSTA_SIZWORKBUF_PARMNUM = 29;
+ {$EXTERNALSYM WKSTA_SIZWORKBUF_PARMNUM}
+ WKSTA_MAILSLOTS_PARMNUM = 30;
+ {$EXTERNALSYM WKSTA_MAILSLOTS_PARMNUM}
+ WKSTA_NUMDGRAMBUF_PARMNUM = 31;
+ {$EXTERNALSYM WKSTA_NUMDGRAMBUF_PARMNUM}
+ WKSTA_WRKHEURISTICS_PARMNUM = 32; // Supported by down-level.
+ {$EXTERNALSYM WKSTA_WRKHEURISTICS_PARMNUM}
+ WKSTA_MAXTHREADS_PARMNUM = 33;
+ {$EXTERNALSYM WKSTA_MAXTHREADS_PARMNUM}
+
+ WKSTA_LOCKQUOTA_PARMNUM = 41;
+ {$EXTERNALSYM WKSTA_LOCKQUOTA_PARMNUM}
+ WKSTA_LOCKINCREMENT_PARMNUM = 42;
+ {$EXTERNALSYM WKSTA_LOCKINCREMENT_PARMNUM}
+ WKSTA_LOCKMAXIMUM_PARMNUM = 43;
+ {$EXTERNALSYM WKSTA_LOCKMAXIMUM_PARMNUM}
+ WKSTA_PIPEINCREMENT_PARMNUM = 44;
+ {$EXTERNALSYM WKSTA_PIPEINCREMENT_PARMNUM}
+ WKSTA_PIPEMAXIMUM_PARMNUM = 45;
+ {$EXTERNALSYM WKSTA_PIPEMAXIMUM_PARMNUM}
+ WKSTA_DORMANTFILELIMIT_PARMNUM = 46;
+ {$EXTERNALSYM WKSTA_DORMANTFILELIMIT_PARMNUM}
+ WKSTA_CACHEFILETIMEOUT_PARMNUM = 47;
+ {$EXTERNALSYM WKSTA_CACHEFILETIMEOUT_PARMNUM}
+ WKSTA_USEOPPORTUNISTICLOCKING_PARMNUM = 48;
+ {$EXTERNALSYM WKSTA_USEOPPORTUNISTICLOCKING_PARMNUM}
+ WKSTA_USEUNLOCKBEHIND_PARMNUM = 49;
+ {$EXTERNALSYM WKSTA_USEUNLOCKBEHIND_PARMNUM}
+ WKSTA_USECLOSEBEHIND_PARMNUM = 50;
+ {$EXTERNALSYM WKSTA_USECLOSEBEHIND_PARMNUM}
+ WKSTA_BUFFERNAMEDPIPES_PARMNUM = 51;
+ {$EXTERNALSYM WKSTA_BUFFERNAMEDPIPES_PARMNUM}
+ WKSTA_USELOCKANDREADANDUNLOCK_PARMNUM = 52;
+ {$EXTERNALSYM WKSTA_USELOCKANDREADANDUNLOCK_PARMNUM}
+ WKSTA_UTILIZENTCACHING_PARMNUM = 53;
+ {$EXTERNALSYM WKSTA_UTILIZENTCACHING_PARMNUM}
+ WKSTA_USERAWREAD_PARMNUM = 54;
+ {$EXTERNALSYM WKSTA_USERAWREAD_PARMNUM}
+ WKSTA_USERAWWRITE_PARMNUM = 55;
+ {$EXTERNALSYM WKSTA_USERAWWRITE_PARMNUM}
+ WKSTA_USEWRITERAWWITHDATA_PARMNUM = 56;
+ {$EXTERNALSYM WKSTA_USEWRITERAWWITHDATA_PARMNUM}
+ WKSTA_USEENCRYPTION_PARMNUM = 57;
+ {$EXTERNALSYM WKSTA_USEENCRYPTION_PARMNUM}
+ WKSTA_BUFFILESWITHDENYWRITE_PARMNUM = 58;
+ {$EXTERNALSYM WKSTA_BUFFILESWITHDENYWRITE_PARMNUM}
+ WKSTA_BUFFERREADONLYFILES_PARMNUM = 59;
+ {$EXTERNALSYM WKSTA_BUFFERREADONLYFILES_PARMNUM}
+ WKSTA_FORCECORECREATEMODE_PARMNUM = 60;
+ {$EXTERNALSYM WKSTA_FORCECORECREATEMODE_PARMNUM}
+ WKSTA_USE512BYTESMAXTRANSFER_PARMNUM = 61;
+ {$EXTERNALSYM WKSTA_USE512BYTESMAXTRANSFER_PARMNUM}
+ WKSTA_READAHEADTHRUPUT_PARMNUM = 62;
+ {$EXTERNALSYM WKSTA_READAHEADTHRUPUT_PARMNUM}
+
+//
+// One of these values indicates the parameter within an information
+// structure that is invalid when ERROR_INVALID_PARAMETER is returned by
+// NetWkstaUserSetInfo.
+//
+
+ WKSTA_OTH_DOMAINS_PARMNUM = 101;
+ {$EXTERNALSYM WKSTA_OTH_DOMAINS_PARMNUM}
+
+//
+// One of these values indicates the parameter within an information
+// structure that is invalid when ERROR_INVALID_PARAMETER is returned by
+// NetWkstaTransportAdd.
+//
+
+ TRANSPORT_QUALITYOFSERVICE_PARMNUM = 201;
+ {$EXTERNALSYM TRANSPORT_QUALITYOFSERVICE_PARMNUM}
+ TRANSPORT_NAME_PARMNUM = 202;
+ {$EXTERNALSYM TRANSPORT_NAME_PARMNUM}
+
+implementation
+
+{$IFDEF DYNAMIC_LINK}
+
+var
+ _NetWkstaGetInfo: Pointer;
+
+function NetWkstaGetInfo;
+begin
+ GetProcedureAddress(_NetWkstaGetInfo, netapi32, 'NetWkstaGetInfo');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetWkstaGetInfo]
+ end;
+end;
+
+var
+ _NetWkstaSetInfo: Pointer;
+
+function NetWkstaSetInfo;
+begin
+ GetProcedureAddress(_NetWkstaSetInfo, netapi32, 'NetWkstaSetInfo');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetWkstaSetInfo]
+ end;
+end;
+
+var
+ _NetWkstaUserGetInfo: Pointer;
+
+function NetWkstaUserGetInfo;
+begin
+ GetProcedureAddress(_NetWkstaUserGetInfo, netapi32, 'NetWkstaUserGetInfo');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetWkstaUserGetInfo]
+ end;
+end;
+
+var
+ _NetWkstaUserSetInfo: Pointer;
+
+function NetWkstaUserSetInfo;
+begin
+ GetProcedureAddress(_NetWkstaUserSetInfo, netapi32, 'NetWkstaUserSetInfo');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetWkstaUserSetInfo]
+ end;
+end;
+
+var
+ _NetWkstaUserEnum: Pointer;
+
+function NetWkstaUserEnum;
+begin
+ GetProcedureAddress(_NetWkstaUserEnum, netapi32, 'NetWkstaUserEnum');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetWkstaUserEnum]
+ end;
+end;
+
+var
+ _NetWkstaTransportAdd: Pointer;
+
+function NetWkstaTransportAdd;
+begin
+ GetProcedureAddress(_NetWkstaTransportAdd, netapi32, 'NetWkstaTransportAdd');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetWkstaTransportAdd]
+ end;
+end;
+
+var
+ _NetWkstaTransportDel: Pointer;
+
+function NetWkstaTransportDel;
+begin
+ GetProcedureAddress(_NetWkstaTransportDel, netapi32, 'NetWkstaTransportDel');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetWkstaTransportDel]
+ end;
+end;
+
+var
+ _NetWkstaTransportEnum: Pointer;
+
+function NetWkstaTransportEnum;
+begin
+ GetProcedureAddress(_NetWkstaTransportEnum, netapi32, 'NetWkstaTransportEnum');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NetWkstaTransportEnum]
+ end;
+end;
+
+{$ELSE}
+
+function NetWkstaGetInfo; external netapi32 name 'NetWkstaGetInfo';
+function NetWkstaSetInfo; external netapi32 name 'NetWkstaSetInfo';
+function NetWkstaUserGetInfo; external netapi32 name 'NetWkstaUserGetInfo';
+function NetWkstaUserSetInfo; external netapi32 name 'NetWkstaUserSetInfo';
+function NetWkstaUserEnum; external netapi32 name 'NetWkstaUserEnum';
+function NetWkstaTransportAdd; external netapi32 name 'NetWkstaTransportAdd';
+function NetWkstaTransportDel; external netapi32 name 'NetWkstaTransportDel';
+function NetWkstaTransportEnum; external netapi32 name 'NetWkstaTransportEnum';
+
+{$ENDIF DYNAMIC_LINK}
+
+end.
diff --git a/packages/extra/winunits/jwaloadperf.pas b/packages/extra/winunits/jwaloadperf.pas
index a075c11f36..67516a7c4b 100644
--- a/packages/extra/winunits/jwaloadperf.pas
+++ b/packages/extra/winunits/jwaloadperf.pas
@@ -1,382 +1,382 @@
-{******************************************************************************}
-{ }
-{ Performance Monitoring Installer API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: loadperf.h, released June 2000. The original Pascal }
-{ code is: LoadPerf.pas, released December 2000. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwaloadperf.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaLoadPerf;
-
-{$WEAKPACKAGEUNIT}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaWinType;
-
-// flags for dwFlags Argument
-
-const
- LOADPERF_FLAGS_DELETE_MOF_ON_EXIT = ULONG_PTR(1);
- {$EXTERNALSYM LOADPERF_FLAGS_DELETE_MOF_ON_EXIT}
- LOADPERF_FLAGS_LOAD_REGISTRY_ONLY = ULONG_PTR(2);
- {$EXTERNALSYM LOADPERF_FLAGS_LOAD_REGISTRY_ONLY}
- LOADPERF_FLAGS_CREATE_MOF_ONLY = ULONG_PTR(4);
- {$EXTERNALSYM LOADPERF_FLAGS_CREATE_MOF_ONLY}
- LOADPERF_FLAGS_DISPLAY_USER_MSGS = ULONG_PTR(8);
- {$EXTERNALSYM LOADPERF_FLAGS_DISPLAY_USER_MSGS}
-
-(* removed PSDK XP SP1
-// note: LOADPERF_FLAGS_LOAD_REGISTRY_ONLY is not a valid flag for
-// LoadMofFromInstalledServiceA/W as the service must already be installed
-
-function LoadMofFromInstalledServiceA(szServiceName, szMofFilename: LPCSTR;
- dwFlags: ULONG_PTR): DWORD; stdcall;
-{$EXTERNALSYM LoadMofFromInstalledServiceA}
-function LoadMofFromInstalledServiceW(szServiceName, szMofFilename: LPCWSTR;
- dwFlags: ULONG_PTR): DWORD; stdcall;
-{$EXTERNALSYM LoadMofFromInstalledServiceW}
-function LoadMofFromInstalledService(szServiceName, szMofFilename: LPCTSTR;
- dwFlags: ULONG_PTR): DWORD; stdcall;
-{$EXTERNALSYM LoadMofFromInstalledService}
-*)
-
-function InstallPerfDllA(szComputerName, lpIniFile: LPCSTR; dwFlags: ULONG_PTR): DWORD; stdcall;
-{$EXTERNALSYM InstallPerfDllA}
-function InstallPerfDllW(szComputerName, lpIniFile: LPCWSTR; dwFlags: ULONG_PTR): DWORD; stdcall;
-{$EXTERNALSYM InstallPerfDllW}
-function InstallPerfDll(szComputerName, lpIniFile: LPCTSTR; dwFlags: ULONG_PTR): DWORD; stdcall;
-{$EXTERNALSYM InstallPerfDll}
-
-function LoadPerfCounterTextStringsA(lpCommandLine: LPSTR; bQuietModeArg: BOOL): DWORD; stdcall;
-{$EXTERNALSYM LoadPerfCounterTextStringsA}
-function LoadPerfCounterTextStringsW(lpCommandLine: LPWSTR; bQuietModeArg: BOOL): DWORD; stdcall;
-{$EXTERNALSYM LoadPerfCounterTextStringsW}
-function LoadPerfCounterTextStrings(lpCommandLine: LPTSTR; bQuietModeArg: BOOL): DWORD; stdcall;
-{$EXTERNALSYM LoadPerfCounterTextStrings}
-
-function UnloadPerfCounterTextStringsA(lpCommandLine: LPSTR; bQuietModeArg: BOOL): DWORD; stdcall;
-{$EXTERNALSYM UnloadPerfCounterTextStringsA}
-function UnloadPerfCounterTextStringsW(lpCommandLine: LPWSTR; bQuietModeArg: BOOL): DWORD; stdcall;
-{$EXTERNALSYM UnloadPerfCounterTextStringsW}
-function UnloadPerfCounterTextStrings(lpCommandLine: LPTSTR; bQuietModeArg: BOOL): DWORD; stdcall;
-{$EXTERNALSYM UnloadPerfCounterTextStrings}
-
-function UpdatePerfNameFilesA(szNewCtrFilePath, szNewHlpFilePath: LPCSTR;
- szLanguageID: LPSTR; dwFlags: ULONG_PTR): DWORD; stdcall;
-{$EXTERNALSYM UpdatePerfNameFilesA}
-function UpdatePerfNameFilesW(szNewCtrFilePath, szNewHlpFilePath: LPCWSTR;
- szLanguageID: LPWSTR; dwFlags: ULONG_PTR): DWORD; stdcall;
-{$EXTERNALSYM UpdatePerfNameFilesW}
-function UpdatePerfNameFiles(szNewCtrFilePath, szNewHlpFilePath: LPCTSTR;
- szLanguageID: LPTSTR; dwFlags: ULONG_PTR): DWORD; stdcall;
-{$EXTERNALSYM UpdatePerfNameFiles}
-
-function SetServiceAsTrustedA(szReserved, szServiceName: LPCSTR): DWORD; stdcall;
-{$EXTERNALSYM SetServiceAsTrustedA}
-function SetServiceAsTrustedW(szReserved, szServiceName: LPCWSTR): DWORD; stdcall;
-{$EXTERNALSYM SetServiceAsTrustedW}
-function SetServiceAsTrusted(szReserved, szServiceName: LPCTSTR): DWORD; stdcall;
-{$EXTERNALSYM SetServiceAsTrusted}
-
-function BackupPerfRegistryToFileW(szFileName: LPCWSTR; szCommentString: LPCWSTR): DWORD; stdcall;
-{$EXTERNALSYM BackupPerfRegistryToFileW}
-
-function RestorePerfRegistryFromFileW(szFileName: LPCWSTR; szLangId: LPCWSTR): DWORD; stdcall;
-{$EXTERNALSYM RestorePerfRegistryFromFileW}
-
-implementation
-
-const
- loadperflib = 'loadperf.dll';
- {$IFDEF UNICODE}
- AWSuffix = 'W';
- {$ELSE}
- AWSuffix = 'A';
- {$ENDIF UNICODE}
-
-{$IFDEF DYNAMIC_LINK}
-
-var
- _InstallPerfDllA: Pointer;
-
-function InstallPerfDllA;
-begin
- GetProcedureAddress(_InstallPerfDllA, loadperflib, 'InstallPerfDllA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_InstallPerfDllA]
- end;
-end;
-
-var
- _InstallPerfDllW: Pointer;
-
-function InstallPerfDllW;
-begin
- GetProcedureAddress(_InstallPerfDllW, loadperflib, 'InstallPerfDllW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_InstallPerfDllW]
- end;
-end;
-
-var
- _InstallPerfDll: Pointer;
-
-function InstallPerfDll;
-begin
- GetProcedureAddress(_InstallPerfDll, loadperflib, 'InstallPerfDll' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_InstallPerfDll]
- end;
-end;
-
-var
- _LoadPerfCounterTextStringsA: Pointer;
-
-function LoadPerfCounterTextStringsA;
-begin
- GetProcedureAddress(_LoadPerfCounterTextStringsA, loadperflib, 'LoadPerfCounterTextStringsA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_LoadPerfCounterTextStringsA]
- end;
-end;
-
-var
- _LoadPerfCounterTextStringsW: Pointer;
-
-function LoadPerfCounterTextStringsW;
-begin
- GetProcedureAddress(_LoadPerfCounterTextStringsW, loadperflib, 'LoadPerfCounterTextStringsW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_LoadPerfCounterTextStringsW]
- end;
-end;
-
-var
- _LoadPerfCounterTextStrings: Pointer;
-
-function LoadPerfCounterTextStrings;
-begin
- GetProcedureAddress(_LoadPerfCounterTextStrings, loadperflib, 'LoadPerfCounterTextStrings' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_LoadPerfCounterTextStrings]
- end;
-end;
-
-var
- _UnloadPerfCounterTextStringsA: Pointer;
-
-function UnloadPerfCounterTextStringsA;
-begin
- GetProcedureAddress(_UnloadPerfCounterTextStringsA, loadperflib, 'UnloadPerfCounterTextStringsA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_UnloadPerfCounterTextStringsA]
- end;
-end;
-
-var
- _UnloadPerfCounterTextStringsW: Pointer;
-
-function UnloadPerfCounterTextStringsW;
-begin
- GetProcedureAddress(_UnloadPerfCounterTextStringsW, loadperflib, 'UnloadPerfCounterTextStringsW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_UnloadPerfCounterTextStringsW]
- end;
-end;
-
-var
- _UnloadPerfCounterTextStrings: Pointer;
-
-function UnloadPerfCounterTextStrings;
-begin
- GetProcedureAddress(_UnloadPerfCounterTextStrings, loadperflib, 'UnloadPerfCounterTextStrings' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_UnloadPerfCounterTextStrings]
- end;
-end;
-
-var
- _UpdatePerfNameFilesA: Pointer;
-
-function UpdatePerfNameFilesA;
-begin
- GetProcedureAddress(_UpdatePerfNameFilesA, loadperflib, 'UpdatePerfNameFilesA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_UpdatePerfNameFilesA]
- end;
-end;
-
-var
- _UpdatePerfNameFilesW: Pointer;
-
-function UpdatePerfNameFilesW;
-begin
- GetProcedureAddress(_UpdatePerfNameFilesW, loadperflib, 'UpdatePerfNameFilesW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_UpdatePerfNameFilesW]
- end;
-end;
-
-var
- _UpdatePerfNameFiles: Pointer;
-
-function UpdatePerfNameFiles;
-begin
- GetProcedureAddress(_UpdatePerfNameFiles, loadperflib, 'UpdatePerfNameFiles' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_UpdatePerfNameFiles]
- end;
-end;
-
-var
- _SetServiceAsTrustedA: Pointer;
-
-function SetServiceAsTrustedA;
-begin
- GetProcedureAddress(_SetServiceAsTrustedA, loadperflib, 'SetServiceAsTrustedA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetServiceAsTrustedA]
- end;
-end;
-
-var
- _SetServiceAsTrustedW: Pointer;
-
-function SetServiceAsTrustedW;
-begin
- GetProcedureAddress(_SetServiceAsTrustedW, loadperflib, 'SetServiceAsTrustedW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetServiceAsTrustedW]
- end;
-end;
-
-var
- _SetServiceAsTrusted: Pointer;
-
-function SetServiceAsTrusted;
-begin
- GetProcedureAddress(_SetServiceAsTrusted, loadperflib, 'SetServiceAsTrusted' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetServiceAsTrusted]
- end;
-end;
-
-var
- _BackupPerfRegistryToFileW: Pointer;
-
-function BackupPerfRegistryToFileW;
-begin
- GetProcedureAddress(_BackupPerfRegistryToFileW, loadperflib, 'BackupPerfRegistryToFileW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_BackupPerfRegistryToFileW]
- end;
-end;
-
-var
- _RestorePerfRegistryFromFileW: Pointer;
-
-function RestorePerfRegistryFromFileW;
-begin
- GetProcedureAddress(_RestorePerfRegistryFromFileW, loadperflib, 'RestorePerfRegistryFromFileW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RestorePerfRegistryFromFileW]
- end;
-end;
-
-{$ELSE}
-
-function InstallPerfDllA; external loadperflib name 'InstallPerfDllA';
-function InstallPerfDllW; external loadperflib name 'InstallPerfDllW';
-function InstallPerfDll; external loadperflib name 'InstallPerfDll' + AWSuffix;
-function LoadPerfCounterTextStringsA; external loadperflib name 'LoadPerfCounterTextStringsA';
-function LoadPerfCounterTextStringsW; external loadperflib name 'LoadPerfCounterTextStringsW';
-function LoadPerfCounterTextStrings; external loadperflib name 'LoadPerfCounterTextStrings' + AWSuffix;
-function UnloadPerfCounterTextStringsA; external loadperflib name 'UnloadPerfCounterTextStringsA';
-function UnloadPerfCounterTextStringsW; external loadperflib name 'UnloadPerfCounterTextStringsW';
-function UnloadPerfCounterTextStrings; external loadperflib name 'UnloadPerfCounterTextStrings' + AWSuffix;
-function UpdatePerfNameFilesA; external loadperflib name 'UpdatePerfNameFilesA';
-function UpdatePerfNameFilesW; external loadperflib name 'UpdatePerfNameFilesW';
-function UpdatePerfNameFiles; external loadperflib name 'UpdatePerfNameFiles' + AWSuffix;
-function SetServiceAsTrustedA; external loadperflib name 'SetServiceAsTrustedA';
-function SetServiceAsTrustedW; external loadperflib name 'SetServiceAsTrustedW';
-function SetServiceAsTrusted; external loadperflib name 'SetServiceAsTrusted' + AWSuffix;
-function BackupPerfRegistryToFileW; external loadperflib name 'BackupPerfRegistryToFileW';
-function RestorePerfRegistryFromFileW; external loadperflib name 'RestorePerfRegistryFromFileW';
-
-{$ENDIF DYNAMIC_LINK}
-
-end.
+{******************************************************************************}
+{ }
+{ Performance Monitoring Installer API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: loadperf.h, released June 2000. The original Pascal }
+{ code is: LoadPerf.pas, released December 2000. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwaloadperf.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaLoadPerf;
+
+{$WEAKPACKAGEUNIT}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaWinType;
+
+// flags for dwFlags Argument
+
+const
+ LOADPERF_FLAGS_DELETE_MOF_ON_EXIT = ULONG_PTR(1);
+ {$EXTERNALSYM LOADPERF_FLAGS_DELETE_MOF_ON_EXIT}
+ LOADPERF_FLAGS_LOAD_REGISTRY_ONLY = ULONG_PTR(2);
+ {$EXTERNALSYM LOADPERF_FLAGS_LOAD_REGISTRY_ONLY}
+ LOADPERF_FLAGS_CREATE_MOF_ONLY = ULONG_PTR(4);
+ {$EXTERNALSYM LOADPERF_FLAGS_CREATE_MOF_ONLY}
+ LOADPERF_FLAGS_DISPLAY_USER_MSGS = ULONG_PTR(8);
+ {$EXTERNALSYM LOADPERF_FLAGS_DISPLAY_USER_MSGS}
+
+(* removed PSDK XP SP1
+// note: LOADPERF_FLAGS_LOAD_REGISTRY_ONLY is not a valid flag for
+// LoadMofFromInstalledServiceA/W as the service must already be installed
+
+function LoadMofFromInstalledServiceA(szServiceName, szMofFilename: LPCSTR;
+ dwFlags: ULONG_PTR): DWORD; stdcall;
+{$EXTERNALSYM LoadMofFromInstalledServiceA}
+function LoadMofFromInstalledServiceW(szServiceName, szMofFilename: LPCWSTR;
+ dwFlags: ULONG_PTR): DWORD; stdcall;
+{$EXTERNALSYM LoadMofFromInstalledServiceW}
+function LoadMofFromInstalledService(szServiceName, szMofFilename: LPCTSTR;
+ dwFlags: ULONG_PTR): DWORD; stdcall;
+{$EXTERNALSYM LoadMofFromInstalledService}
+*)
+
+function InstallPerfDllA(szComputerName, lpIniFile: LPCSTR; dwFlags: ULONG_PTR): DWORD; stdcall;
+{$EXTERNALSYM InstallPerfDllA}
+function InstallPerfDllW(szComputerName, lpIniFile: LPCWSTR; dwFlags: ULONG_PTR): DWORD; stdcall;
+{$EXTERNALSYM InstallPerfDllW}
+function InstallPerfDll(szComputerName, lpIniFile: LPCTSTR; dwFlags: ULONG_PTR): DWORD; stdcall;
+{$EXTERNALSYM InstallPerfDll}
+
+function LoadPerfCounterTextStringsA(lpCommandLine: LPSTR; bQuietModeArg: BOOL): DWORD; stdcall;
+{$EXTERNALSYM LoadPerfCounterTextStringsA}
+function LoadPerfCounterTextStringsW(lpCommandLine: LPWSTR; bQuietModeArg: BOOL): DWORD; stdcall;
+{$EXTERNALSYM LoadPerfCounterTextStringsW}
+function LoadPerfCounterTextStrings(lpCommandLine: LPTSTR; bQuietModeArg: BOOL): DWORD; stdcall;
+{$EXTERNALSYM LoadPerfCounterTextStrings}
+
+function UnloadPerfCounterTextStringsA(lpCommandLine: LPSTR; bQuietModeArg: BOOL): DWORD; stdcall;
+{$EXTERNALSYM UnloadPerfCounterTextStringsA}
+function UnloadPerfCounterTextStringsW(lpCommandLine: LPWSTR; bQuietModeArg: BOOL): DWORD; stdcall;
+{$EXTERNALSYM UnloadPerfCounterTextStringsW}
+function UnloadPerfCounterTextStrings(lpCommandLine: LPTSTR; bQuietModeArg: BOOL): DWORD; stdcall;
+{$EXTERNALSYM UnloadPerfCounterTextStrings}
+
+function UpdatePerfNameFilesA(szNewCtrFilePath, szNewHlpFilePath: LPCSTR;
+ szLanguageID: LPSTR; dwFlags: ULONG_PTR): DWORD; stdcall;
+{$EXTERNALSYM UpdatePerfNameFilesA}
+function UpdatePerfNameFilesW(szNewCtrFilePath, szNewHlpFilePath: LPCWSTR;
+ szLanguageID: LPWSTR; dwFlags: ULONG_PTR): DWORD; stdcall;
+{$EXTERNALSYM UpdatePerfNameFilesW}
+function UpdatePerfNameFiles(szNewCtrFilePath, szNewHlpFilePath: LPCTSTR;
+ szLanguageID: LPTSTR; dwFlags: ULONG_PTR): DWORD; stdcall;
+{$EXTERNALSYM UpdatePerfNameFiles}
+
+function SetServiceAsTrustedA(szReserved, szServiceName: LPCSTR): DWORD; stdcall;
+{$EXTERNALSYM SetServiceAsTrustedA}
+function SetServiceAsTrustedW(szReserved, szServiceName: LPCWSTR): DWORD; stdcall;
+{$EXTERNALSYM SetServiceAsTrustedW}
+function SetServiceAsTrusted(szReserved, szServiceName: LPCTSTR): DWORD; stdcall;
+{$EXTERNALSYM SetServiceAsTrusted}
+
+function BackupPerfRegistryToFileW(szFileName: LPCWSTR; szCommentString: LPCWSTR): DWORD; stdcall;
+{$EXTERNALSYM BackupPerfRegistryToFileW}
+
+function RestorePerfRegistryFromFileW(szFileName: LPCWSTR; szLangId: LPCWSTR): DWORD; stdcall;
+{$EXTERNALSYM RestorePerfRegistryFromFileW}
+
+implementation
+
+const
+ loadperflib = 'loadperf.dll';
+ {$IFDEF UNICODE}
+ AWSuffix = 'W';
+ {$ELSE}
+ AWSuffix = 'A';
+ {$ENDIF UNICODE}
+
+{$IFDEF DYNAMIC_LINK}
+
+var
+ _InstallPerfDllA: Pointer;
+
+function InstallPerfDllA;
+begin
+ GetProcedureAddress(_InstallPerfDllA, loadperflib, 'InstallPerfDllA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_InstallPerfDllA]
+ end;
+end;
+
+var
+ _InstallPerfDllW: Pointer;
+
+function InstallPerfDllW;
+begin
+ GetProcedureAddress(_InstallPerfDllW, loadperflib, 'InstallPerfDllW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_InstallPerfDllW]
+ end;
+end;
+
+var
+ _InstallPerfDll: Pointer;
+
+function InstallPerfDll;
+begin
+ GetProcedureAddress(_InstallPerfDll, loadperflib, 'InstallPerfDll' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_InstallPerfDll]
+ end;
+end;
+
+var
+ _LoadPerfCounterTextStringsA: Pointer;
+
+function LoadPerfCounterTextStringsA;
+begin
+ GetProcedureAddress(_LoadPerfCounterTextStringsA, loadperflib, 'LoadPerfCounterTextStringsA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_LoadPerfCounterTextStringsA]
+ end;
+end;
+
+var
+ _LoadPerfCounterTextStringsW: Pointer;
+
+function LoadPerfCounterTextStringsW;
+begin
+ GetProcedureAddress(_LoadPerfCounterTextStringsW, loadperflib, 'LoadPerfCounterTextStringsW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_LoadPerfCounterTextStringsW]
+ end;
+end;
+
+var
+ _LoadPerfCounterTextStrings: Pointer;
+
+function LoadPerfCounterTextStrings;
+begin
+ GetProcedureAddress(_LoadPerfCounterTextStrings, loadperflib, 'LoadPerfCounterTextStrings' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_LoadPerfCounterTextStrings]
+ end;
+end;
+
+var
+ _UnloadPerfCounterTextStringsA: Pointer;
+
+function UnloadPerfCounterTextStringsA;
+begin
+ GetProcedureAddress(_UnloadPerfCounterTextStringsA, loadperflib, 'UnloadPerfCounterTextStringsA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_UnloadPerfCounterTextStringsA]
+ end;
+end;
+
+var
+ _UnloadPerfCounterTextStringsW: Pointer;
+
+function UnloadPerfCounterTextStringsW;
+begin
+ GetProcedureAddress(_UnloadPerfCounterTextStringsW, loadperflib, 'UnloadPerfCounterTextStringsW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_UnloadPerfCounterTextStringsW]
+ end;
+end;
+
+var
+ _UnloadPerfCounterTextStrings: Pointer;
+
+function UnloadPerfCounterTextStrings;
+begin
+ GetProcedureAddress(_UnloadPerfCounterTextStrings, loadperflib, 'UnloadPerfCounterTextStrings' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_UnloadPerfCounterTextStrings]
+ end;
+end;
+
+var
+ _UpdatePerfNameFilesA: Pointer;
+
+function UpdatePerfNameFilesA;
+begin
+ GetProcedureAddress(_UpdatePerfNameFilesA, loadperflib, 'UpdatePerfNameFilesA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_UpdatePerfNameFilesA]
+ end;
+end;
+
+var
+ _UpdatePerfNameFilesW: Pointer;
+
+function UpdatePerfNameFilesW;
+begin
+ GetProcedureAddress(_UpdatePerfNameFilesW, loadperflib, 'UpdatePerfNameFilesW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_UpdatePerfNameFilesW]
+ end;
+end;
+
+var
+ _UpdatePerfNameFiles: Pointer;
+
+function UpdatePerfNameFiles;
+begin
+ GetProcedureAddress(_UpdatePerfNameFiles, loadperflib, 'UpdatePerfNameFiles' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_UpdatePerfNameFiles]
+ end;
+end;
+
+var
+ _SetServiceAsTrustedA: Pointer;
+
+function SetServiceAsTrustedA;
+begin
+ GetProcedureAddress(_SetServiceAsTrustedA, loadperflib, 'SetServiceAsTrustedA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetServiceAsTrustedA]
+ end;
+end;
+
+var
+ _SetServiceAsTrustedW: Pointer;
+
+function SetServiceAsTrustedW;
+begin
+ GetProcedureAddress(_SetServiceAsTrustedW, loadperflib, 'SetServiceAsTrustedW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetServiceAsTrustedW]
+ end;
+end;
+
+var
+ _SetServiceAsTrusted: Pointer;
+
+function SetServiceAsTrusted;
+begin
+ GetProcedureAddress(_SetServiceAsTrusted, loadperflib, 'SetServiceAsTrusted' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetServiceAsTrusted]
+ end;
+end;
+
+var
+ _BackupPerfRegistryToFileW: Pointer;
+
+function BackupPerfRegistryToFileW;
+begin
+ GetProcedureAddress(_BackupPerfRegistryToFileW, loadperflib, 'BackupPerfRegistryToFileW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_BackupPerfRegistryToFileW]
+ end;
+end;
+
+var
+ _RestorePerfRegistryFromFileW: Pointer;
+
+function RestorePerfRegistryFromFileW;
+begin
+ GetProcedureAddress(_RestorePerfRegistryFromFileW, loadperflib, 'RestorePerfRegistryFromFileW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RestorePerfRegistryFromFileW]
+ end;
+end;
+
+{$ELSE}
+
+function InstallPerfDllA; external loadperflib name 'InstallPerfDllA';
+function InstallPerfDllW; external loadperflib name 'InstallPerfDllW';
+function InstallPerfDll; external loadperflib name 'InstallPerfDll' + AWSuffix;
+function LoadPerfCounterTextStringsA; external loadperflib name 'LoadPerfCounterTextStringsA';
+function LoadPerfCounterTextStringsW; external loadperflib name 'LoadPerfCounterTextStringsW';
+function LoadPerfCounterTextStrings; external loadperflib name 'LoadPerfCounterTextStrings' + AWSuffix;
+function UnloadPerfCounterTextStringsA; external loadperflib name 'UnloadPerfCounterTextStringsA';
+function UnloadPerfCounterTextStringsW; external loadperflib name 'UnloadPerfCounterTextStringsW';
+function UnloadPerfCounterTextStrings; external loadperflib name 'UnloadPerfCounterTextStrings' + AWSuffix;
+function UpdatePerfNameFilesA; external loadperflib name 'UpdatePerfNameFilesA';
+function UpdatePerfNameFilesW; external loadperflib name 'UpdatePerfNameFilesW';
+function UpdatePerfNameFiles; external loadperflib name 'UpdatePerfNameFiles' + AWSuffix;
+function SetServiceAsTrustedA; external loadperflib name 'SetServiceAsTrustedA';
+function SetServiceAsTrustedW; external loadperflib name 'SetServiceAsTrustedW';
+function SetServiceAsTrusted; external loadperflib name 'SetServiceAsTrusted' + AWSuffix;
+function BackupPerfRegistryToFileW; external loadperflib name 'BackupPerfRegistryToFileW';
+function RestorePerfRegistryFromFileW; external loadperflib name 'RestorePerfRegistryFromFileW';
+
+{$ENDIF DYNAMIC_LINK}
+
+end.
diff --git a/packages/extra/winunits/jwalpmapi.pas b/packages/extra/winunits/jwalpmapi.pas
index 8f55d39277..6aee5e5904 100644
--- a/packages/extra/winunits/jwalpmapi.pas
+++ b/packages/extra/winunits/jwalpmapi.pas
@@ -1,1657 +1,1657 @@
-{******************************************************************************}
-{ }
-{ Winsock2 RSVP/LPM API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: lpmapi.h, released June 2000. The original Pascal }
-{ code is: LpmApi.pas, released December 2000. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwalpmapi.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaLpmApi;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "lpmapi.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaWinSock2, JwaWinType;
-
-type
- FLOAT = Single;
- {$NODEFINE FLOAT}
-
-(****************************************************************************
-
- RSVPD -- ReSerVation Protocol Daemon
-
- USC Information Sciences Institute
- Marina del Rey, California
-
- Original Version: Shai Herzog, Nov. 1993.
- Current Version: Steven Berson & Bob Braden, may 1996.
-
- Copyright (c) 1996 by the University of Southern California
- All rights reserved.
-
- Permission to use, copy, modify, and distribute this software and its
- documentation in source and binary forms for any purpose and without
- fee is hereby granted, provided that both the above copyright notice
- and this permission notice appear in all copies, and that any
- documentation, advertising materials, and other materials related to
- such distribution and use acknowledge that the software was developed
- in part by the University of Southern California, Information
- Sciences Institute. The name of the University may not be used to
- endorse or promote products derived from this software without
- specific prior written permission.
-
- THE UNIVERSITY OF SOUTHERN CALIFORNIA makes no representations about
- the suitability of this software for any purpose. THIS SOFTWARE IS
- PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
- MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-
- Other copyrights might apply to parts of this software and are so
- noted when applicable.
-
-********************************************************************)
-
-(*
- * Standard format of an RSVP object header
- *)
-
-type
- RsvpObjHdr = record
- obj_length: USHORT; (* Length in bytes *)
- obj_class: UCHAR; (* Class (values defined below) *)
- obj_ctype: UCHAR; (* C-Type (values defined below) *)
- end;
- {$EXTERNALSYM RsvpObjHdr}
- TRsvpObjHdr = RsvpObjHdr;
- PRsvpObjHdr = ^RsvpObjHdr;
- PPRsvpObjHdr = ^PRsvpObjHdr;
-
-function ObjLength(const x: TRsvpObjHdr): USHORT;
-{$EXTERNALSYM ObjLength}
-function ObjCType(const x: TRsvpObjHdr): UCHAR;
-{$EXTERNALSYM ObjCType}
-function ObjClass(const x: TRsvpObjHdr): UCHAR;
-{$EXTERNALSYM ObjClass}
-function ObjData(const x: TRsvpObjHdr): Pointer;
-{$EXTERNALSYM ObjData}
-
-(*
- * Define object classes: Class-Num values
- *)
-
-const
- class_NULL = 0;
- {$EXTERNALSYM class_NULL}
- class_SESSION = 1;
- {$EXTERNALSYM class_SESSION}
- class_SESSION_GROUP = 2;
- {$EXTERNALSYM class_SESSION_GROUP}
- class_RSVP_HOP = 3;
- {$EXTERNALSYM class_RSVP_HOP}
- class_INTEGRITY = 4;
- {$EXTERNALSYM class_INTEGRITY}
- class_TIME_VALUES = 5;
- {$EXTERNALSYM class_TIME_VALUES}
- class_ERROR_SPEC = 6;
- {$EXTERNALSYM class_ERROR_SPEC}
- class_SCOPE = 7;
- {$EXTERNALSYM class_SCOPE}
- class_STYLE = 8;
- {$EXTERNALSYM class_STYLE}
- class_FLOWSPEC = 9; // these two are the same
- {$EXTERNALSYM class_FLOWSPEC}
- class_IS_FLOWSPEC = 9; // since we added IS in front of the name
- {$EXTERNALSYM class_IS_FLOWSPEC}
- class_FILTER_SPEC = 10;
- {$EXTERNALSYM class_FILTER_SPEC}
- class_SENDER_TEMPLATE = 11;
- {$EXTERNALSYM class_SENDER_TEMPLATE}
- class_SENDER_TSPEC = 12;
- {$EXTERNALSYM class_SENDER_TSPEC}
- class_ADSPEC = 13;
- {$EXTERNALSYM class_ADSPEC}
- class_POLICY_DATA = 14;
- {$EXTERNALSYM class_POLICY_DATA}
- class_CONFIRM = 15;
- {$EXTERNALSYM class_CONFIRM}
- class_MAX = 15;
- {$EXTERNALSYM class_MAX}
-
-(*
- * RSVP SESSION object
- *)
-
- ctype_SESSION_ipv4 = 1;
- {$EXTERNALSYM ctype_SESSION_ipv4}
- ctype_SESSION_ipv4GPI = 3 (* IPSEC: Generalized Port Id *);
- {$EXTERNALSYM ctype_SESSION_ipv4GPI}
-
- SESSFLG_E_Police = $01 (* E_Police: Entry policing flag*);
- {$EXTERNALSYM SESSFLG_E_Police}
-
-type
- Session_IPv4 = record
- sess_destaddr: IN_ADDR; // DestAddress
- sess_protid: UCHAR; // Protocol Id
- sess_flags: UCHAR; // Use the flags defined above
- sess_destport: USHORT; // DestPort
- end;
- {$EXTERNALSYM Session_IPv4}
- TSessionIPv4 = Session_IPv4;
- PSessionIPv4 = ^Session_IPv4;
-
-(* GPI versions have virtual dest port instead of dest port; this
- * changes the interpretation but not the format, so we do not
- * define new structs for GPI.
- *)
-
- RSVP_SESSION = record
- sess_header: RsvpObjHdr;
- case Integer of
- 0: (sess_ipv4: Session_IPv4);
- end;
- {$EXTERNALSYM RSVP_SESSION}
- TRsvpSession = RSVP_SESSION;
- PRsvpSession = ^RSVP_SESSION;
-
-// Useful defines to access components of SESSION obect
-
-//#define Sess4Addr sess_u.sess_ipv4.sess_destaddr
-//#define Sess4Port sess_u.sess_ipv4.sess_destport
-//#define Sess4Protocol sess_u.sess_ipv4.sess_protid
-//#define Sess4Flags sess_u.sess_ipv4.sess_flags
-
-(*
- * RSVP HOP object
- *)
-
-const
- ctype_RSVP_HOP_ipv4 = 1;
- {$EXTERNALSYM ctype_RSVP_HOP_ipv4}
-
-type
- Rsvp_Hop_IPv4 = record
- hop_ipaddr: IN_ADDR; // Next/Previous Hop Address
- hop_LIH: ULONG; // Logical Interface Handle
- end;
- {$EXTERNALSYM Rsvp_Hop_IPv4}
- TRsvpHopIPv4 = Rsvp_Hop_IPv4;
- PRsvpHopIPv4 = ^Rsvp_Hop_IPv4;
-
- RSVP_HOP = record
- hop_header: RsvpObjHdr;
- case Integer of
- 0: (hop_ipv4: Rsvp_Hop_IPv4);
- end;
- {$EXTERNALSYM RSVP_HOP}
- TRsvpHop = RSVP_HOP;
- PRsvpHop = ^RSVP_HOP;
-
-//#define Hop4LIH hop_u.hop_ipv4.hop_LIH
-//#define Hop4Addr hop_u.hop_ipv4.hop_ipaddr
-
-(*
- * RSVP STYLE object
- *)
-
-// Define values for option vector
-
-const
- Opt_Share_mask = $00000018; // 2 bits: Sharing control
- {$EXTERNALSYM Opt_Share_mask}
- Opt_Distinct = $00000008; // Distinct reservations
- {$EXTERNALSYM Opt_Distinct}
- Opt_Shared = $00000010; // Shared reservations
- {$EXTERNALSYM Opt_Shared}
-
- Opt_SndSel_mask = $00000007; // 3 bits: Sender selection
- {$EXTERNALSYM Opt_SndSel_mask}
- Opt_Wildcard = $00000001; // Wildcard scope
- {$EXTERNALSYM Opt_Wildcard}
- Opt_Explicit = $00000002; // Explicit scope
- {$EXTERNALSYM Opt_Explicit}
-
-function Style_is_Wildcard(p: DWORD): Boolean;
-{$EXTERNALSYM Style_is_Wildcard}
-function Style_is_Shared(p: DWORD): Boolean;
-{$EXTERNALSYM Style_is_Shared}
-
-// Define style values
-
-const
- STYLE_WF = Opt_Shared + Opt_Wildcard;
- {$EXTERNALSYM STYLE_WF}
- STYLE_FF = Opt_Distinct + Opt_Explicit;
- {$EXTERNALSYM STYLE_FF}
- STYLE_SE = Opt_Shared + Opt_Explicit;
- {$EXTERNALSYM STYLE_SE}
-
- ctype_STYLE = 1;
- {$EXTERNALSYM ctype_STYLE}
-
-type
- RESV_STYLE = record
- style_header: RsvpObjHdr;
- style_word: ULONG;
- end;
- {$EXTERNALSYM RESV_STYLE}
- TResvStyle = RESV_STYLE;
- PResvStyle = ^RESV_STYLE;
-
-(*
- * RSVP FILTER SPEC object
- *)
-
-const
- ctype_FILTER_SPEC_ipv4 = 1; // IPv4 FILTER_SPEC
- {$EXTERNALSYM ctype_FILTER_SPEC_ipv4}
- ctype_FILTER_SPEC_ipv4GPI = 4; // IPv4/GPI FILTER_SPEC
- {$EXTERNALSYM ctype_FILTER_SPEC_ipv4GPI}
-
-type
- Filter_Spec_IPv4 = record
- filt_ipaddr: IN_ADDR; // IPv4 SrcAddress
- filt_unused: USHORT;
- filt_port: USHORT; // SrcPort
- end;
- {$EXTERNALSYM Filter_Spec_IPv4}
- TFilterSpecIPv4 = Filter_Spec_IPv4;
- PFilterSpecIPv4 = ^Filter_Spec_IPv4;
-
- Filter_Spec_IPv4GPI = record
- filt_ipaddr: IN_ADDR; // IPv4 SrcAddress
- filt_gpi: ULONG; // Generalized Port Id
- end;
- {$EXTERNALSYM Filter_Spec_IPv4GPI}
- TFilterSpecIPv4GPI = Filter_Spec_IPv4GPI;
- PFilterSpecIPv4GPI = ^Filter_Spec_IPv4GPI;
-
- FILTER_SPEC = record
- filt_header: RsvpObjHdr;
- case Integer of
- 0: (filt_ipv4: Filter_Spec_IPv4);
- 1: (filt_ipv4gpi: Filter_Spec_IPv4GPI);
- end;
- {$EXTERNALSYM FILTER_SPEC}
- TFilterSpec = FILTER_SPEC;
- PFilterSpec = ^FILTER_SPEC;
-
-//#define FilterSrcaddr filt_u.filt_ipv4.filt_ipaddr
-//#define FilterSrcport filt_u.filt_ipv4.filt_port
-
-(*
- * RSVP SENDER_TEMPLATE object
- *)
-
-const
- ctype_SENDER_TEMPLATE_ipv4 = 1; // IPv4 SENDER_TEMPLATE
- {$EXTERNALSYM ctype_SENDER_TEMPLATE_ipv4}
- ctype_SENDER_TEMPLATE_ipv4GPI = 4; // IPv4/GPI SENDER_TEMPLATE
- {$EXTERNALSYM ctype_SENDER_TEMPLATE_ipv4GPI}
-
-type
- SENDER_TEMPLATE = FILTER_SPEC; // Identical to FILTER_SPEC
- {$EXTERNALSYM SENDER_TEMPLATE}
- TSenderTemplate = SENDER_TEMPLATE;
- PSenderTemplate = ^SENDER_TEMPLATE;
-
-(*
- * RSVP SCOPE object class
- *)
-
-const
- ctype_SCOPE_list_ipv4 = 1;
- {$EXTERNALSYM ctype_SCOPE_list_ipv4}
-
-type
- Scope_list_ipv4 = record
- scopl_ipaddr: array [0..0] of IN_ADDR; // var-len list of IP sender addrs
- end;
- {$EXTERNALSYM Scope_list_ipv4}
- TScopeListIPv4 = Scope_list_ipv4;
- PScopeListIPv4 = ^Scope_list_ipv4;
-
- RSVP_SCOPE = record
- scopl_header: RsvpObjHdr;
- case Integer of
- 0: (scopl_ipv4: Scope_list_ipv4);
- end;
- {$EXTERNALSYM RSVP_SCOPE}
- TRsvpScope = RSVP_SCOPE;
- PRsvpScope = ^RSVP_SCOPE;
-
-//#define Scope4Addr scope_u.scopl_ipv4.scopl_ipaddr
-//#define ScopeCnt(scp) ((ObjLength(scp)-sizeof(RsvpObjHdr))/sizeof(struct in_addr))
-//#define ScopeLen(cnt) (cnt*sizeof(struct in_addr)+sizeof(RsvpObjHdr))
-
-(*
- * ERROR_SPEC object class
- *)
-
-const
- ctype_ERROR_SPEC_ipv4 = 1;
- {$EXTERNALSYM ctype_ERROR_SPEC_ipv4}
-
- ERROR_SPECF_InPlace = $01; (* Left resv in place *)
- {$EXTERNALSYM ERROR_SPECF_InPlace}
- ERROR_SPECF_NotGuilty = $02; (* This rcvr not guilty *)
- {$EXTERNALSYM ERROR_SPECF_NotGuilty}
- ERR_FORWARD_OK = $8000; (* Flag: OK to forward state *)
- {$EXTERNALSYM ERR_FORWARD_OK}
-
-function Error_Usage(x: DWORD): DWORD;
-{$EXTERNALSYM Error_Usage}
-
-const
- ERR_Usage_globl = $00; (* Globally-defined sub-code *)
- {$EXTERNALSYM ERR_Usage_globl}
- ERR_Usage_local = $10; (* Locally-defined sub-code *)
- {$EXTERNALSYM ERR_Usage_local}
- ERR_Usage_serv = $11; (* Service-defined sub-code *)
- {$EXTERNALSYM ERR_Usage_serv}
- ERR_global_mask = $0fff; (* Sub-code bits in Error Val *)
- {$EXTERNALSYM ERR_global_mask}
-
-type
- Error_Spec_IPv4 = record
- errs_errnode: in_addr; (* Error Node Address *)
- errs_flags: u_char; (* Flags: *)
- errs_code: UCHAR; (* Error Code (def'd below) *)
- errs_value: USHORT; (* Error Value *)
- end;
- {$EXTERNALSYM Error_Spec_IPv4}
- TErrorSpecIPv4 = Error_Spec_IPv4;
- PErrorSpecIPv4 = ^Error_Spec_IPv4;
-
-type
- ERROR_SPEC = record
- errs_header: RsvpObjHdr;
- case Integer of
- 0: (errs_ipv4: Error_Spec_IPv4);
- end;
- {$EXTERNALSYM ERROR_SPEC}
- TErrorSpec = ERROR_SPEC;
- PErrorSpec = ^ERROR_SPEC;
-
-//#define errspec4_enode errs_u.errs_ipv4.errs_errnode
-//#define errspec4_code errs_u.errs_ipv4.errs_code
-//#define errspec4_value errs_u.errs_ipv4.errs_value
-//#define errspec4_flags errs_u.errs_ipv4.errs_flags
-
-(*
- * POLICY_DATA object class
- *
- * Contents are Opaque RSVP/SBM
- *)
-
-const
- ctype_POLICY_DATA = 1;
- {$EXTERNALSYM ctype_POLICY_DATA}
-
-type
- POLICY_DATA = record
- PolicyObjHdr: RsvpObjHdr;
- usPeOffset: USHORT; // Offset to the start of Policy Elements from the begining of Policy Data
- usReserved: USHORT;
- end;
- {$EXTERNALSYM POLICY_DATA}
- TPolicyData = POLICY_DATA;
- PPolicyData = ^POLICY_DATA;
-
-const
- PD_HDR_LEN = SizeOf(POLICY_DATA);
- {$EXTERNALSYM PD_HDR_LEN}
-
-type
- POLICY_ELEMENT = record
- usPeLength: USHORT; // Policy Element length
- usPeType: USHORT; // Policy Element type
- ucPeData: array [0..3] of UCHAR; // Just a place holder to the start of Policy Element data
- end;
- {$EXTERNALSYM POLICY_ELEMENT}
- TPolicyElement = POLICY_ELEMENT;
- PPolicyElement = ^POLICY_ELEMENT;
-
-const
- PE_HDR_LEN = 2 * SizeOf(USHORT);
- {$EXTERNALSYM PE_HDR_LEN}
-
-(**************************************************************************
- *
- * Int-Serv Data Structures
- *
- **************************************************************************)
-
-(*
- * Service numbers
- *)
-
-const
- GENERAL_INFO = 1;
- {$EXTERNALSYM GENERAL_INFO}
- GUARANTEED_SERV = 2;
- {$EXTERNALSYM GUARANTEED_SERV}
- PREDICTIVE_SERV = 3;
- {$EXTERNALSYM PREDICTIVE_SERV}
- CONTROLLED_DELAY_SERV = 4;
- {$EXTERNALSYM CONTROLLED_DELAY_SERV}
- CONTROLLED_LOAD_SERV = 5;
- {$EXTERNALSYM CONTROLLED_LOAD_SERV}
- QUALITATIVE_SERV = 6;
- {$EXTERNALSYM QUALITATIVE_SERV}
-
-(*
- * Well-known parameter IDs
- *)
-
-const
- IS_WKP_HOP_CNT = 4;
- {$EXTERNALSYM IS_WKP_HOP_CNT}
- IS_WKP_PATH_BW = 6;
- {$EXTERNALSYM IS_WKP_PATH_BW}
- IS_WKP_MIN_LATENCY = 8;
- {$EXTERNALSYM IS_WKP_MIN_LATENCY}
- IS_WKP_COMPOSED_MTU = 10;
- {$EXTERNALSYM IS_WKP_COMPOSED_MTU}
- IS_WKP_TB_TSPEC = 127; (* Token-bucket TSPEC parm *)
- {$EXTERNALSYM IS_WKP_TB_TSPEC}
- IS_WKP_Q_TSPEC = 128;
- {$EXTERNALSYM IS_WKP_Q_TSPEC}
-
-type
- int_serv_wkp = DWORD;
- {$EXTERNALSYM int_serv_wkp}
- TIntServWkp = int_serv_wkp;
-
-(*
- * Int-serv Main header
- *)
-
- IntServMainHdr = record
- ismh_version: UCHAR; // Version
- ismh_unused: UCHAR;
- ismh_len32b: USHORT; // # 32-bit words excluding this hdr
- end;
- {$EXTERNALSYM IntServMainHdr}
- TIntServMainHdr = IntServMainHdr;
- PIntServMainHdr = ^IntServMainHdr;
-
-const
- INTSERV_VERS_MASK = $f0;
- {$EXTERNALSYM INTSERV_VERS_MASK}
- INTSERV_VERSION0 = 0;
- {$EXTERNALSYM INTSERV_VERSION0}
-
-function Intserv_Version(x: DWORD): DWORD;
-{$EXTERNALSYM Intserv_Version}
-function Intserv_Version_OK(const x: TIntServMainHdr): Boolean;
-{$EXTERNALSYM Intserv_Version_OK}
-
-// Convert ishm_length to equivalent RSVP object size, for checking
-
-function Intserv_Obj_size(const x: TIntServMainHdr): DWORD;
-{$EXTERNALSYM Intserv_Obj_size}
-
-(*
- * Int-serv Service Element Header
- *)
-
-// Flag: Break bit
-
-const
- ISSH_BREAK_BIT = $80;
- {$EXTERNALSYM ISSH_BREAK_BIT}
-
-type
- IntServServiceHdr = record
- issh_service: UCHAR; // Service number
- issh_flags: UCHAR; // Flag byte
- issh_len32b: USHORT; // #32-bit words excluding this hdr
- end;
- {$EXTERNALSYM IntServServiceHdr}
- TIntServServiceHdr = IntServServiceHdr;
- PIntServServiceHdr = ^IntServServiceHdr;
-
-function Issh_len32b(const p: TIntServServiceHdr): USHORT;
-{$EXTERNALSYM Issh_len32b}
-
-(*
- * Int-serv Parameter Element Header
- *)
-
-const
- ISPH_FLG_INV = $80; // Flag: Invalid
- {$EXTERNALSYM ISPH_FLG_INV}
-
-type
- IntServParmHdr = record
- isph_parm_num: UCHAR; // Parameter number
- isph_flags: UCHAR; // Flags
- isph_len32b: USHORT; // #32-bit words excluding this hdr
- end;
- {$EXTERNALSYM IntServParmHdr}
- TIntServParmHdr = IntServParmHdr;
- PIntServParmHdr = ^IntServParmHdr;
-
-{
-function Next_Main_Hdr(const p: TIntServMainHdr): PIntServMainHdr;
-begin
- TODO (IntServMainHdr *)((ULONG *)(p)+1+(p)->ismh_len32b)
-end;
-
-function Next_Serv_Hdr(const p: TIntServMainHdr): ULONG;
-begin
- TODO (IntServServiceHdr *)((ULONG *)(p)+1+(p)->issh_len32b)
-end;
-
-function Next_Parm_Hdr(const p: TIntServParmHdr): ULONG;
-begin
- TODO (IntServParmHdr *)((ULONG *)(p)+1+(p)->isph_len32b)
-end;
-}
-
-(*
- * Generic Tspec Parameters
- *)
-
-type
- GenTspecParms = record
- TB_Tspec_r: FLOAT; // Token bucket rate (B/sec)
- TB_Tspec_b: FLOAT; // Token bucket depth (B)
- TB_Tspec_p: FLOAT; // Peak data rate (B/sec)
- TB_Tspec_m: ULONG; // Min Policed Unit (B)
- TB_Tspec_M_: ULONG; // Max pkt size (B)
- end;
- {$EXTERNALSYM GenTspecParms}
- TGenTspecParms = GenTspecParms;
- PGenTspecParms = ^GenTspecParms;
-
-(*
- * Generic Tspec
- *)
-
- GenTspec = record
- gen_Tspec_serv_hdr: IntServServiceHdr; // (GENERAL_INFO, length)
- gen_Tspec_parm_hdr: IntServParmHdr; // (IS_WKP_TB_TSPEC)
- gen_Tspec_parms: GenTspecParms;
- end;
- {$EXTERNALSYM GenTspec}
- TGenTspec = GenTspec;
- PGenTspec = ^GenTspec;
-
-//#define gtspec_r gen_Tspec_parms.TB_Tspec_r
-//#define gtspec_b gen_Tspec_parms.TB_Tspec_b
-//#define gtspec_m gen_Tspec_parms.TB_Tspec_m
-//#define gtspec_M gen_Tspec_parms.TB_Tspec_M
-//#define gtspec_p gen_Tspec_parms.TB_Tspec_p
-//#define gtspec_parmno gen_Tspec_parm_hdr.isph_parm_num
-//#define gtspec_flags gen_Tspec_parm_hdr.isph_flags
-
-//#define gtspec_len (sizeof(GenTspec) - sizeof(IntServServiceHdr))
-
-(* contents of qualitative tspec *)
-
-type
- QualTspecParms = record
- TB_Tspec_M: ULONG; // Max pkt size (M)
- end;
- {$EXTERNALSYM QualTspecParms}
- TQualTspecParms = QualTspecParms;
- PQualTspecParms = ^QualTspecParms;
-
- QualTspec = record
- qual_Tspec_serv_hdr: IntServServiceHdr; // (QUALITATIVE_SERV, length)
- qual_Tspec_parm_hdr: IntServParmHdr; // (IS_WKP_Q_TSPEC)
- qual_Tspec_parms: QualTspecParms;
- end;
- {$EXTERNALSYM QualTspec}
- TQualTspec = QualTspec;
- PQualTspec = ^QualTspec;
-
- QualAppFlowSpec = record
- Q_spec_serv_hdr: IntServServiceHdr; // (QUALITATIVE_SERV,0,len)
- Q_spec_parm_hdr: IntServParmHdr; // (IS_WKP_Q_TSPEC)
- Q_spec_parms: QualTspecParms; // QUALITATIVE Tspec parameters
- end;
- {$EXTERNALSYM QualAppFlowSpec}
- TQualAppFlowSpec = QualAppFlowSpec;
- PQualAppFlowSpec = ^QualAppFlowSpec;
-
-//#define QAspec_M Q_spec_parms.TB_Tspec_M
-
-(*
- * Contents of int-serv Tspec
- *)
-
- IntServTspecBody = record
- st_mh: IntServMainHdr;
- case Integer of
- 0: (gen_stspec: GenTspec); // Generic Tspec
- 1: (qual_stspec: QualTspec);
- end;
- {$EXTERNALSYM IntServTspecBody}
- TIntServTspecBody = IntServTspecBody;
- PIntServTspecBody = ^IntServTspecBody;
-
-(*
- * SENDER_TSPEC class object
- *)
-
-const
- ctype_SENDER_TSPEC = 2;
- {$EXTERNALSYM ctype_SENDER_TSPEC}
-
-type
- SENDER_TSPEC = record
- stspec_header: RsvpObjHdr;
- stspec_body: IntServTspecBody;
- end;
- {$EXTERNALSYM SENDER_TSPEC}
- TSenderTSpec = SENDER_TSPEC;
- PSenderTSpec = ^SENDER_TSPEC;
-
-(*
- * Controlled-Load Flowspec
- *)
-
- CtrlLoadFlowspec = record
- CL_spec_serv_hdr: IntServServiceHdr; // (CONTROLLED_LOAD_SERV,0,len)
- CL_spec_parm_hdr: IntServParmHdr; // (IS_WKP_TB_TSPEC)
- CL_spec_parms: GenTspecParms; // GENERIC Tspec parameters
- end;
- {$EXTERNALSYM CtrlLoadFlowspec}
- TCtrlLoadFlowspec = CtrlLoadFlowspec;
- PCtrlLoadFlowspec = ^CtrlLoadFlowspec;
-
-//#define CLspec_r CL_spec_parms.TB_Tspec_r
-//#define CLspec_b CL_spec_parms.TB_Tspec_b
-//#define CLspec_p CL_spec_parms.TB_Tspec_p
-//#define CLspec_m CL_spec_parms.TB_Tspec_m
-//#define CLspec_M CL_spec_parms.TB_Tspec_M
-//#define CLspec_parmno CL_spec_parm_hdr.isph_parm_num
-//#define CLspec_flags CL_spec_parm_hdr.isph_flags
-//#define CLspec_len32b CL_spec_parm_hdr.isph_len32b
-
-//#define CLspec_len (sizeof(CtrlLoadFlowspec) - sizeof(IntServServiceHdr))
-
-(* Service-specific Parameter IDs
- *)
-
-const
- IS_GUAR_RSPEC = 130;
- {$EXTERNALSYM IS_GUAR_RSPEC}
-
- GUAR_ADSPARM_C = 131;
- {$EXTERNALSYM GUAR_ADSPARM_C}
- GUAR_ADSPARM_D = 132;
- {$EXTERNALSYM GUAR_ADSPARM_D}
- GUAR_ADSPARM_Ctot = 133;
- {$EXTERNALSYM GUAR_ADSPARM_Ctot}
- GUAR_ADSPARM_Dtot = 134;
- {$EXTERNALSYM GUAR_ADSPARM_Dtot}
- GUAR_ADSPARM_Csum = 135;
- {$EXTERNALSYM GUAR_ADSPARM_Csum}
- GUAR_ADSPARM_Dsum = 136;
- {$EXTERNALSYM GUAR_ADSPARM_Dsum}
-
-(*
- * Guaranteed Rspec parameters
- *)
-
-type
- GuarRspec = record
- Guar_R: FLOAT; // Guaranteed Rate B/s
- Guar_S: ULONG; // Slack term secs
- end;
- {$EXTERNALSYM GuarRspec}
- TGuarRspec = GuarRspec;
- PGuarRspec = ^GuarRspec;
-
-(*
- * Guaranteed Flowspec
- *)
-
- GuarFlowSpec = record
- Guar_serv_hdr: IntServServiceHdr; // (GUARANTEED, 0, length)
- Guar_Tspec_hdr: IntServParmHdr; // (IS_WKP_TB_TSPEC,)
- Guar_Tspec_parms: GenTspecParms; // GENERIC Tspec parms
- Guar_Rspec_hdr: IntServParmHdr; // (IS_GUAR_RSPEC)
- Guar_Rspec: GuarRspec; // Guaranteed rate (B/sec)
- end;
- {$EXTERNALSYM GuarFlowSpec}
- TGuarFlowSpec = GuarFlowSpec;
- PGuarFlowSpec = ^GuarFlowSpec;
-
-//#define Gspec_r Guar_Tspec_parms.TB_Tspec_r
-//#define Gspec_b Guar_Tspec_parms.TB_Tspec_b
-//#define Gspec_p Guar_Tspec_parms.TB_Tspec_p
-//#define Gspec_m Guar_Tspec_parms.TB_Tspec_m
-//#define Gspec_M Guar_Tspec_parms.TB_Tspec_M
-//#define Gspec_R Guar_Rspec.Guar_R
-//#define Gspec_S Guar_Rspec.Guar_S
-//#define Gspec_T_parmno Guar_Tspec_hdr.isph_parm_num
-//#define Gspec_T_flags Guar_Tspec_hdr.isph_flags
-//#define Gspec_R_parmno Guar_Rspec_hdr.isph_parm_num
-//#define Gspec_R_flags Guar_Rspec_hdr.isph_flags
-
-//#define Gspec_len (sizeof(GuarFlowSpec) - sizeof(IntServServiceHdr))
-
-(*
- * Contents of int-serv flowspec
- *)
-
-type
- IntServFlowSpec = record
- spec_mh: IntServMainHdr;
- case Integer of
- 0: (CL_spec: CtrlLoadFlowspec); // Controlled-Load service
- 1: (G_spec: GuarFlowSpec); // Guaranteed service
- 2: (Q_spec: QualAppFlowSpec);
- end;
- {$EXTERNALSYM IntServFlowSpec}
- TIntServFlowSpec = IntServFlowSpec;
- PIntServFlowSpec = ^IntServFlowSpec;
-
-//#define ISmh_len32b spec_mh.ismh_len32b
-//#define ISmh_version spec_mh.ismh_version
-//#define ISmh_unused spec_mh.ismh_unused
-
-(*
- * Int-Serv FLOWSPEC object
- *)
-
-const
- ctype_FLOWSPEC_Intserv0 = 2; // The int-serv flowspec (v.0)
- {$EXTERNALSYM ctype_FLOWSPEC_Intserv0}
-
-type
- IS_FLOWSPEC = record
- flow_header: RsvpObjHdr;
- flow_body: IntServFlowSpec;
- end;
- {$EXTERNALSYM IS_FLOWSPEC}
- TIsFlowSpec = IS_FLOWSPEC;
- PIsFlowSpec = ^IS_FLOWSPEC;
-
-(*
- * FLOW DESCRIPTOR
- *)
-
- FLOW_DESC = record
- u1: record
- case Integer of
- 0: (stspec: ^SENDER_TSPEC);
- 1: (isflow: ^IS_FLOWSPEC);
- end;
- u2: record
- case Integer of
- 0: (stemp: ^SENDER_TEMPLATE);
- 1: (fspec: ^FILTER_SPEC);
- end;
- end;
- {$EXTERNALSYM FLOW_DESC}
- TFlowDesc = FLOW_DESC;
- PFlowDesc = ^FLOW_DESC;
-
-//#define FdSenderTspec u1.stspec
-//#define FdIsFlowSpec u1.isflow
-
-//#define FdSenderTemplate u2.stemp
-//#define FdFilterSpec u2.fspec
-
-(*
- * ADSPEC class object
- *
- * Opaque to RSVP -- Contents defined in rapi_lib.h
- *)
-
-const
- ctype_ADSPEC_INTSERV = 2;
- {$EXTERNALSYM ctype_ADSPEC_INTSERV}
-
-(*
- * Guaranteed service Adspec parameters -- fixed part
- *)
-
-type
- Gads_parms_t = record
- Gads_serv_hdr: IntServServiceHdr; // GUARANTEED, x, len
- Gads_Ctot_hdr: IntServParmHdr; // GUAR_ADSPARM_Ctot
- Gads_Ctot: ULONG;
- Gads_Dtot_hdr: IntServParmHdr; // (GUAR_ADSPARM_Dtot
- Gads_Dtot: ULONG;
- Gads_Csum_hdr: IntServParmHdr; // GUAR_ADSPARM_Csum
- Gads_Csum: ULONG;
- Gads_Dsum_hdr: IntServParmHdr; // GUAR_ADSPARM_Dsum
- Gads_Dsum: ULONG;
- (*
- * May be followed by override general param values
- *)
- end;
- {$EXTERNALSYM Gads_parms_t}
- TGadsParmsT = Gads_parms_t;
- PGadsParmsT = ^Gads_parms_t;
-
-(*
- * General Path Characterization Parameters
- *)
-
- GenAdspecParams = record
- gen_parm_hdr: IntServServiceHdr; // GENERAL_INFO, len
- gen_parm_hopcnt_hdr: IntServParmHdr; // (IS_WKP_HOP_CNT
- gen_parm_hopcnt: ULONG;
- gen_parm_pathbw_hdr: IntServParmHdr; // IS_WKP_PATH_BW
- gen_parm_path_bw: FLOAT;
- gen_parm_minlat_hdr: IntServParmHdr; // IS_WKP_MIN_LATENCY
- gen_parm_min_latency: ULONG;
- gen_parm_compmtu_hdr: IntServParmHdr; // IS_WKP_COMPOSED_MTU
- gen_parm_composed_MTU: ULONG;
- end;
- {$EXTERNALSYM GenAdspecParams}
- TGenAdspecParams = GenAdspecParams;
- PGenAdspecParams = ^GenAdspecParams;
-
-(*
- * Contents of (minimal) int-serv Adspec
- *)
-
- IS_ADSPEC_BODY = record
- adspec_mh: IntServMainHdr; // Main header
- adspec_genparms: GenAdspecParams;// General char parm fragment
- (*
- * Followed by variable-length fragments for some or all
- * services. These can be minimal length fragments.
- *)
- end;
- {$EXTERNALSYM IS_ADSPEC_BODY}
- TIsAdSpecBody = IS_ADSPEC_BODY;
- PIsAdSpecBody = ^IS_ADSPEC_BODY;
-
-//const TODO Unknown Object_Header
-// GEN_ADSPEC_LEN = SizeOf(Object_header) + SizeOf(IS_adsbody_t);
-// {$EXTERNALSYM GEN_ADSPEC_LEN}
-
-type
- ADSPEC = record
- adspec_header: RsvpObjHdr;
- adspec_body: IS_ADSPEC_BODY; (* Defined in rapi_lib.h *)
- end;
- {$EXTERNALSYM ADSPEC}
- TAdSpec = ADSPEC;
- PAdSpec = ^ADSPEC;
-
-// RSVP message types
-
-const
- RSVP_PATH = 1;
- {$EXTERNALSYM RSVP_PATH}
- RSVP_RESV = 2;
- {$EXTERNALSYM RSVP_RESV}
- RSVP_PATH_ERR = 3;
- {$EXTERNALSYM RSVP_PATH_ERR}
- RSVP_RESV_ERR = 4;
- {$EXTERNALSYM RSVP_RESV_ERR}
- RSVP_PATH_TEAR = 5;
- {$EXTERNALSYM RSVP_PATH_TEAR}
- RSVP_RESV_TEAR = 6;
- {$EXTERNALSYM RSVP_RESV_TEAR}
-
-(* RSVP error codes
- *)
-
- RSVP_Err_NONE = 0; (* No error (CONFIRM) *)
- {$EXTERNALSYM RSVP_Err_NONE}
- RSVP_Erv_Nonev = 0; (* No-error Error Value *)
- {$EXTERNALSYM RSVP_Erv_Nonev}
-
-(* Admission Control failure *)
-
- RSVP_Err_ADMISSION = 1;
- {$EXTERNALSYM RSVP_Err_ADMISSION}
-
-(* Globally-defined sub-codes for : Admission Control failure *)
-
- RSVP_Erv_Other = 0; (* Unspecified cause *)
- {$EXTERNALSYM RSVP_Erv_Other}
- RSVP_Erv_DelayBnd = 1; (* Cannot meet delay bound req *)
- {$EXTERNALSYM RSVP_Erv_DelayBnd}
- RSVP_Erv_Bandwidth = 2; (* Insufficient bandwidth *)
- {$EXTERNALSYM RSVP_Erv_Bandwidth}
- RSVP_Erv_MTU = 3; (* MTU in flowspec too large *)
- {$EXTERNALSYM RSVP_Erv_MTU}
-
-// Microsoft specific error values
-
- RSVP_Erv_Flow_Rate = $8001;
- {$EXTERNALSYM RSVP_Erv_Flow_Rate}
- RSVP_Erv_Bucket_szie = $8002;
- {$EXTERNALSYM RSVP_Erv_Bucket_szie}
- RSVP_Erv_Peak_Rate = $8003;
- {$EXTERNALSYM RSVP_Erv_Peak_Rate}
- RSVP_Erv_Min_Policied_size = $8004;
- {$EXTERNALSYM RSVP_Erv_Min_Policied_size}
-
-(* Policy control failure *)
-
- RSVP_Err_POLICY = 2;
- {$EXTERNALSYM RSVP_Err_POLICY}
-
-// Policy error values from Identity draft
-
- POLICY_ERRV_NO_MORE_INFO = 1;
- {$EXTERNALSYM POLICY_ERRV_NO_MORE_INFO}
- POLICY_ERRV_UNSUPPORTED_CREDENTIAL_TYPE = 2;
- {$EXTERNALSYM POLICY_ERRV_UNSUPPORTED_CREDENTIAL_TYPE}
- POLICY_ERRV_INSUFFICIENT_PRIVILEGES = 3;
- {$EXTERNALSYM POLICY_ERRV_INSUFFICIENT_PRIVILEGES}
- POLICY_ERRV_EXPIRED_CREDENTIALS = 4;
- {$EXTERNALSYM POLICY_ERRV_EXPIRED_CREDENTIALS}
- POLICY_ERRV_IDENTITY_CHANGED = 5;
- {$EXTERNALSYM POLICY_ERRV_IDENTITY_CHANGED}
-
-// Microsoft specific policy error values
-
- POLICY_ERRV_UNKNOWN = 0;
- {$EXTERNALSYM POLICY_ERRV_UNKNOWN}
-
- POLICY_ERRV_GLOBAL_DEF_FLOW_COUNT = 1;
- {$EXTERNALSYM POLICY_ERRV_GLOBAL_DEF_FLOW_COUNT}
- POLICY_ERRV_GLOBAL_GRP_FLOW_COUNT = 2;
- {$EXTERNALSYM POLICY_ERRV_GLOBAL_GRP_FLOW_COUNT}
- POLICY_ERRV_GLOBAL_USER_FLOW_COUNT = 3;
- {$EXTERNALSYM POLICY_ERRV_GLOBAL_USER_FLOW_COUNT}
- POLICY_ERRV_GLOBAL_UNAUTH_USER_FLOW_COUNT = 4;
- {$EXTERNALSYM POLICY_ERRV_GLOBAL_UNAUTH_USER_FLOW_COUNT}
- POLICY_ERRV_SUBNET_DEF_FLOW_COUNT = 5;
- {$EXTERNALSYM POLICY_ERRV_SUBNET_DEF_FLOW_COUNT}
- POLICY_ERRV_SUBNET_GRP_FLOW_COUNT = 6;
- {$EXTERNALSYM POLICY_ERRV_SUBNET_GRP_FLOW_COUNT}
- POLICY_ERRV_SUBNET_USER_FLOW_COUNT = 7;
- {$EXTERNALSYM POLICY_ERRV_SUBNET_USER_FLOW_COUNT}
- POLICY_ERRV_SUBNET_UNAUTH_USER_FLOW_COUNT = 8;
- {$EXTERNALSYM POLICY_ERRV_SUBNET_UNAUTH_USER_FLOW_COUNT}
-
- POLICY_ERRV_GLOBAL_DEF_FLOW_DURATION = 9;
- {$EXTERNALSYM POLICY_ERRV_GLOBAL_DEF_FLOW_DURATION}
- POLICY_ERRV_GLOBAL_GRP_FLOW_DURATION = 10;
- {$EXTERNALSYM POLICY_ERRV_GLOBAL_GRP_FLOW_DURATION}
- POLICY_ERRV_GLOBAL_USER_FLOW_DURATION = 11;
- {$EXTERNALSYM POLICY_ERRV_GLOBAL_USER_FLOW_DURATION}
- POLICY_ERRV_GLOBAL_UNAUTH_USER_FLOW_DURATION = 12;
- {$EXTERNALSYM POLICY_ERRV_GLOBAL_UNAUTH_USER_FLOW_DURATION}
- POLICY_ERRV_SUBNET_DEF_FLOW_DURATION = 13;
- {$EXTERNALSYM POLICY_ERRV_SUBNET_DEF_FLOW_DURATION}
- POLICY_ERRV_SUBNET_GRP_FLOW_DURATION = 14;
- {$EXTERNALSYM POLICY_ERRV_SUBNET_GRP_FLOW_DURATION}
- POLICY_ERRV_SUBNET_USER_FLOW_DURATION = 15;
- {$EXTERNALSYM POLICY_ERRV_SUBNET_USER_FLOW_DURATION}
- POLICY_ERRV_SUBNET_UNAUTH_USER_FLOW_DURATION = 16;
- {$EXTERNALSYM POLICY_ERRV_SUBNET_UNAUTH_USER_FLOW_DURATION}
-
- POLICY_ERRV_GLOBAL_DEF_FLOW_RATE = 17;
- {$EXTERNALSYM POLICY_ERRV_GLOBAL_DEF_FLOW_RATE}
- POLICY_ERRV_GLOBAL_GRP_FLOW_RATE = 18;
- {$EXTERNALSYM POLICY_ERRV_GLOBAL_GRP_FLOW_RATE}
- POLICY_ERRV_GLOBAL_USER_FLOW_RATE = 19;
- {$EXTERNALSYM POLICY_ERRV_GLOBAL_USER_FLOW_RATE}
- POLICY_ERRV_GLOBAL_UNAUTH_USER_FLOW_RATE = 20;
- {$EXTERNALSYM POLICY_ERRV_GLOBAL_UNAUTH_USER_FLOW_RATE}
- POLICY_ERRV_SUBNET_DEF_FLOW_RATE = 21;
- {$EXTERNALSYM POLICY_ERRV_SUBNET_DEF_FLOW_RATE}
- POLICY_ERRV_SUBNET_GRP_FLOW_RATE = 22;
- {$EXTERNALSYM POLICY_ERRV_SUBNET_GRP_FLOW_RATE}
- POLICY_ERRV_SUBNET_USER_FLOW_RATE = 23;
- {$EXTERNALSYM POLICY_ERRV_SUBNET_USER_FLOW_RATE}
- POLICY_ERRV_SUBNET_UNAUTH_USER_FLOW_RATE = 24;
- {$EXTERNALSYM POLICY_ERRV_SUBNET_UNAUTH_USER_FLOW_RATE}
-
- POLICY_ERRV_GLOBAL_DEF_PEAK_RATE = 25;
- {$EXTERNALSYM POLICY_ERRV_GLOBAL_DEF_PEAK_RATE}
- POLICY_ERRV_GLOBAL_GRP_PEAK_RATE = 26;
- {$EXTERNALSYM POLICY_ERRV_GLOBAL_GRP_PEAK_RATE}
- POLICY_ERRV_GLOBAL_USER_PEAK_RATE = 27;
- {$EXTERNALSYM POLICY_ERRV_GLOBAL_USER_PEAK_RATE}
- POLICY_ERRV_GLOBAL_UNAUTH_USER_PEAK_RATE = 28;
- {$EXTERNALSYM POLICY_ERRV_GLOBAL_UNAUTH_USER_PEAK_RATE}
- POLICY_ERRV_SUBNET_DEF_PEAK_RATE = 29;
- {$EXTERNALSYM POLICY_ERRV_SUBNET_DEF_PEAK_RATE}
- POLICY_ERRV_SUBNET_GRP_PEAK_RATE = 30;
- {$EXTERNALSYM POLICY_ERRV_SUBNET_GRP_PEAK_RATE}
- POLICY_ERRV_SUBNET_USER_PEAK_RATE = 31;
- {$EXTERNALSYM POLICY_ERRV_SUBNET_USER_PEAK_RATE}
- POLICY_ERRV_SUBNET_UNAUTH_USER_PEAK_RATE = 32;
- {$EXTERNALSYM POLICY_ERRV_SUBNET_UNAUTH_USER_PEAK_RATE}
-
- POLICY_ERRV_GLOBAL_DEF_SUM_FLOW_RATE = 33;
- {$EXTERNALSYM POLICY_ERRV_GLOBAL_DEF_SUM_FLOW_RATE}
- POLICY_ERRV_GLOBAL_GRP_SUM_FLOW_RATE = 34;
- {$EXTERNALSYM POLICY_ERRV_GLOBAL_GRP_SUM_FLOW_RATE}
- POLICY_ERRV_GLOBAL_USER_SUM_FLOW_RATE = 35;
- {$EXTERNALSYM POLICY_ERRV_GLOBAL_USER_SUM_FLOW_RATE}
- POLICY_ERRV_GLOBAL_UNAUTH_USER_SUM_FLOW_RATE = 36;
- {$EXTERNALSYM POLICY_ERRV_GLOBAL_UNAUTH_USER_SUM_FLOW_RATE}
- POLICY_ERRV_SUBNET_DEF_SUM_FLOW_RATE = 37;
- {$EXTERNALSYM POLICY_ERRV_SUBNET_DEF_SUM_FLOW_RATE}
- POLICY_ERRV_SUBNET_GRP_SUM_FLOW_RATE = 38;
- {$EXTERNALSYM POLICY_ERRV_SUBNET_GRP_SUM_FLOW_RATE}
- POLICY_ERRV_SUBNET_USER_SUM_FLOW_RATE = 39;
- {$EXTERNALSYM POLICY_ERRV_SUBNET_USER_SUM_FLOW_RATE}
- POLICY_ERRV_SUBNET_UNAUTH_USER_SUM_FLOW_RATE = 40;
- {$EXTERNALSYM POLICY_ERRV_SUBNET_UNAUTH_USER_SUM_FLOW_RATE}
-
- POLICY_ERRV_GLOBAL_DEF_SUM_PEAK_RATE = 41;
- {$EXTERNALSYM POLICY_ERRV_GLOBAL_DEF_SUM_PEAK_RATE}
- POLICY_ERRV_GLOBAL_GRP_SUM_PEAK_RATE = 42;
- {$EXTERNALSYM POLICY_ERRV_GLOBAL_GRP_SUM_PEAK_RATE}
- POLICY_ERRV_GLOBAL_USER_SUM_PEAK_RATE = 43;
- {$EXTERNALSYM POLICY_ERRV_GLOBAL_USER_SUM_PEAK_RATE}
- POLICY_ERRV_GLOBAL_UNAUTH_USER_SUM_PEAK_RATE = 44;
- {$EXTERNALSYM POLICY_ERRV_GLOBAL_UNAUTH_USER_SUM_PEAK_RATE}
- POLICY_ERRV_SUBNET_DEF_SUM_PEAK_RATE = 45;
- {$EXTERNALSYM POLICY_ERRV_SUBNET_DEF_SUM_PEAK_RATE}
- POLICY_ERRV_SUBNET_GRP_SUM_PEAK_RATE = 46;
- {$EXTERNALSYM POLICY_ERRV_SUBNET_GRP_SUM_PEAK_RATE}
- POLICY_ERRV_SUBNET_USER_SUM_PEAK_RATE = 47;
- {$EXTERNALSYM POLICY_ERRV_SUBNET_USER_SUM_PEAK_RATE}
- POLICY_ERRV_SUBNET_UNAUTH_USER_SUM_PEAK_RATE = 48;
- {$EXTERNALSYM POLICY_ERRV_SUBNET_UNAUTH_USER_SUM_PEAK_RATE}
-
- POLICY_ERRV_UNKNOWN_USER = 49;
- {$EXTERNALSYM POLICY_ERRV_UNKNOWN_USER}
- POLICY_ERRV_NO_PRIVILEGES = 50;
- {$EXTERNALSYM POLICY_ERRV_NO_PRIVILEGES}
- POLICY_ERRV_EXPIRED_USER_TOKEN = 51;
- {$EXTERNALSYM POLICY_ERRV_EXPIRED_USER_TOKEN}
- POLICY_ERRV_NO_RESOURCES = 52;
- {$EXTERNALSYM POLICY_ERRV_NO_RESOURCES}
- POLICY_ERRV_PRE_EMPTED = 53;
- {$EXTERNALSYM POLICY_ERRV_PRE_EMPTED}
- POLICY_ERRV_USER_CHANGED = 54;
- {$EXTERNALSYM POLICY_ERRV_USER_CHANGED}
- POLICY_ERRV_NO_ACCEPTS = 55;
- {$EXTERNALSYM POLICY_ERRV_NO_ACCEPTS}
- POLICY_ERRV_NO_MEMORY = 56;
- {$EXTERNALSYM POLICY_ERRV_NO_MEMORY}
- POLICY_ERRV_CRAZY_FLOWSPEC = 57;
- {$EXTERNALSYM POLICY_ERRV_CRAZY_FLOWSPEC}
-
-// Other RSVP defined Error codes
-
- RSVP_Err_NO_PATH = 3; (* No path state for Resv *)
- {$EXTERNALSYM RSVP_Err_NO_PATH}
- RSVP_Err_NO_SENDER = 4; (* No sender info for Resv *)
- {$EXTERNALSYM RSVP_Err_NO_SENDER}
- RSVP_Err_BAD_STYLE = 5; (* Conflicting style *)
- {$EXTERNALSYM RSVP_Err_BAD_STYLE}
- RSVP_Err_UNKNOWN_STYLE = 6; (* Unknown reservation style *)
- {$EXTERNALSYM RSVP_Err_UNKNOWN_STYLE}
- RSVP_Err_BAD_DSTPORT = 7; (* Conflicting DstPort in Sess *)
- {$EXTERNALSYM RSVP_Err_BAD_DSTPORT}
- RSVP_Err_BAD_SNDPORT = 8; (* Conflicting Sender port *)
- {$EXTERNALSYM RSVP_Err_BAD_SNDPORT}
- RSVP_Err_AMBIG_FILTER = 9; (* Ambiguous Filter spec in Resv*)
- {$EXTERNALSYM RSVP_Err_AMBIG_FILTER}
-
- RSVP_Err_PREEMPTED = 12; (* Service Preempted *)
- {$EXTERNALSYM RSVP_Err_PREEMPTED}
-
-(* Unknown object Class-Num *)
-
- RSVP_Err_UNKN_OBJ_CLASS = 13;
- {$EXTERNALSYM RSVP_Err_UNKN_OBJ_CLASS}
-
-(* ErrVal = Class_num, CType *)
-
- (* Unknown object C-Type *)
-
- RSVP_Err_UNKNOWN_CTYPE = 14;
- {$EXTERNALSYM RSVP_Err_UNKNOWN_CTYPE}
-
-(* ErrVal = Class_num, CType *)
-
- RSVP_Err_API_ERROR = 20; (* API client error *)
- {$EXTERNALSYM RSVP_Err_API_ERROR}
-
-(* ErrVal = API error code *)
-
-(* Traffic Control error *)
-
- RSVP_Err_TC_ERROR = 21;
- {$EXTERNALSYM RSVP_Err_TC_ERROR}
-
-(* Globally-defined sub-codes for : Traffic Control errors *)
-
- RSVP_Erv_Conflict_Serv = 01; (* Service Conflict *)
- {$EXTERNALSYM RSVP_Erv_Conflict_Serv}
- RSVP_Erv_No_Serv = 02; (* Unknown Service *)
- {$EXTERNALSYM RSVP_Erv_No_Serv}
- RSVP_Erv_Crazy_Flowspec = 03; (* Unreasonable Flowspec *)
- {$EXTERNALSYM RSVP_Erv_Crazy_Flowspec}
- RSVP_Erv_Crazy_Tspec = 04; (* Unreasonable Tspec *)
- {$EXTERNALSYM RSVP_Erv_Crazy_Tspec}
-
- RSVP_Err_TC_SYS_ERROR = 22; (* Traffic control system error *)
- {$EXTERNALSYM RSVP_Err_TC_SYS_ERROR}
-
-(* ErrVal = kernel error code *)
-
-(* RSVP System error *)
-
- RSVP_Err_RSVP_SYS_ERROR = 23;
- {$EXTERNALSYM RSVP_Err_RSVP_SYS_ERROR}
-
-(* Globally-defined sub-codes for : RSVP system errors *)
-
- RSVP_Erv_MEMORY = 1; (* Out of memory *)
- {$EXTERNALSYM RSVP_Erv_MEMORY}
- RSVP_Erv_API = 2; (* API logic error *)
- {$EXTERNALSYM RSVP_Erv_API}
-
-// Identity Policy elements related defines
-
-// Reseved Identity PE types
-
- LPM_PE_USER_IDENTITY = 2;
- {$EXTERNALSYM LPM_PE_USER_IDENTITY}
- LPM_PE_APP_IDENTITY = 3;
- {$EXTERNALSYM LPM_PE_APP_IDENTITY}
-
-// Defines for Identity error values
-
- ERROR_NO_MORE_INFO = 1;
- {$EXTERNALSYM ERROR_NO_MORE_INFO}
- UNSUPPORTED_CREDENTIAL_TYPE = 2;
- {$EXTERNALSYM UNSUPPORTED_CREDENTIAL_TYPE}
- INSUFFICIENT_PRIVILEGES = 3;
- {$EXTERNALSYM INSUFFICIENT_PRIVILEGES}
- EXPIRED_CREDENTIAL = 4;
- {$EXTERNALSYM EXPIRED_CREDENTIAL}
- IDENTITY_CHANGED = 5;
- {$EXTERNALSYM IDENTITY_CHANGED}
-
-type
- ID_ERROR_OBJECT = record
- usIdErrLength: USHORT;
- ucAType: UCHAR;
- ucSubType: UCHAR;
- usReserved: USHORT;
- usIdErrorValue: USHORT;
- ucIdErrData: array [0..3] of UCHAR;
- end;
- {$EXTERNALSYM ID_ERROR_OBJECT}
- TIdErrorObject = ID_ERROR_OBJECT;
- PIdErrorObject = ^ID_ERROR_OBJECT;
-
-const
- ID_ERR_OBJ_HDR_LEN = SizeOf(ID_ERROR_OBJECT) - 4 * SizeOf(UCHAR);
- {$EXTERNALSYM ID_ERR_OBJ_HDR_LEN}
-
-(*
-
- LPM API specific definitions
-
-*)
-
-(**************************************
-
- LPM_Initialize
-
-***************************************)
-
-type
- LPM_HANDLE = HANDLE;
- {$EXTERNALSYM LPM_HANDLE}
-
- RHANDLE = HANDLE;
- {$EXTERNALSYM RHANDLE}
-
- LPV = ULONG;
- {$EXTERNALSYM LPV}
-
- PETYPE = USHORT;
- {$EXTERNALSYM PETYPE}
-
-const
- LPM_OK = 0;
- {$EXTERNALSYM LPM_OK}
-
-type
- MSG_TYPE = Integer;
- {$EXTERNALSYM MSG_TYPE}
- TMsgType = MSG_TYPE;
-
- rsvpmsgobjs = record
- RsvpMsgType: TMsgType;
- pRsvpSession: PRsvpSession;
- pRsvpFromHop: PRsvpHop;
- pRsvpToHop: PRsvpHop;
- pResvStyle: PResvStyle;
- pRsvpScope: PRsvpScope;
- FlowDescCount: Integer;
- pFlowDescs: PFlowDesc;
- PdObjectCount: Integer;
- ppPdObjects: ^PPolicyData;
- pErrorSpec: PErrorSpec;
- pAdspec: PADSpec;
- end;
- {$EXTERNALSYM rsvpmsgobjs}
- RSVP_MSG_OBJS = rsvpmsgobjs;
- {$EXTERNALSYM RSVP_MSG_OBJS}
- TRsvpMsgObjs = RSVP_MSG_OBJS;
- PRsvpMsgObjs = ^RSVP_MSG_OBJS;
-
- PALLOCMEM = function(Size: DWORD): Pointer; stdcall;
- {$EXTERNALSYM PALLOCMEM}
- TAllocMem = PALLOCMEM;
-
- PFREEMEM = procedure(pv: Pointer); stdcall;
- {$EXTERNALSYM PFREEMEM}
- TFreeMem = PFREEMEM;
-
- policy_decision = record
- lpvResult: LPV; // Use the LPV values from above
- wPolicyErrCode: WORD; // RSVP defined error codes
- wPolicyErrValue: WORD; // RSVP defined error values
- end;
- {$EXTERNALSYM policy_decision}
- TPolicyDecision = policy_decision;
- PPolicyDecision = ^policy_decision;
-
- CBADMITRESULT = function(LpmHandle: LPM_HANDLE; RequestHandle: RHANDLE;
- ulPcmActionFlags: ULONG; LpmError: Integer; PolicyDecisionsCount: Integer;
- pPolicyDecisions: PPolicyDecision): ULONG; stdcall;
- {$EXTERNALSYM CBADMITRESULT}
- TCbAdmitResult = CBADMITRESULT;
-
- CBGETRSVPOBJECTS = function(LpmHandle: LPM_HANDLE; RequestHandle: RHANDLE;
- LpmError: Integer; RsvpObjectsCount: Integer; ppRsvpObjects: PPRsvpObjHdr): ULONG; stdcall;
- {$EXTERNALSYM CBGETRSVPOBJECTS}
- TCbGetRsvpObjects = CBGETRSVPOBJECTS;
-
-// The above 2 call backs can return the following errors
-
-const
- INV_LPM_HANDLE = 1; // Supplied LpmHandle is invalid
- {$EXTERNALSYM INV_LPM_HANDLE}
- LPM_TIME_OUT = 2; // LPM has returned results after the time limit
- {$EXTERNALSYM LPM_TIME_OUT}
- INV_REQ_HANDLE = 3; // Supplied Request handle is invalid
- {$EXTERNALSYM INV_REQ_HANDLE}
- DUP_RESULTS = 4; // LPM has already returned results for this request
- {$EXTERNALSYM DUP_RESULTS}
- INV_RESULTS = 5; // Results supplied are invalid
- {$EXTERNALSYM INV_RESULTS}
-
-type
- lpminitinfo = record
- PcmVersionNumber: DWORD;
- ResultTimeLimit: DWORD;
- ConfiguredLpmCount: Integer;
- AllocMemory: PALLOCMEM;
- FreeMemory: PFREEMEM;
- PcmAdmitResultCallback: CBADMITRESULT;
- GetRsvpObjectsCallback: CBGETRSVPOBJECTS;
- end;
- {$EXTERNALSYM lpminitinfo}
- LPM_INIT_INFO = lpminitinfo;
- {$EXTERNALSYM LPM_INIT_INFO}
- TLpmInitInfo = LPM_INIT_INFO;
- PLpmInitInfo = ^LPM_INIT_INFO;
-
-// Valid PE types
-// XXX ISSUE - Is 0xFFFF a better choice?
-
-const
- LPM_PE_ALL_TYPES = 0;
- {$EXTERNALSYM LPM_PE_ALL_TYPES}
-
-// Current LPM API version number
-
- LPM_API_VERSION_1 = 1;
- {$EXTERNALSYM LPM_API_VERSION_1}
-
-// Current PCM version number
-
- PCM_VERSION_1 = 1;
- {$EXTERNALSYM PCM_VERSION_1}
-
-function LPM_Initialize(LpmHandle: LPM_HANDLE; const pLpmInitInfo: LPM_INIT_INFO;
- var pLpmVersionNumber: DWORD; var pSupportedPeType: PETYPE; Reserved: Pointer): ULONG; stdcall;
-{$EXTERNALSYM LPM_Initialize}
-
-(**************************************
-
- LPM_Deinitialize
-
-***************************************)
-
-function LPM_Deinitialize(LpmHandle: LPM_HANDLE): ULONG; stdcall;
-{$EXTERNALSYM LPM_Deinitialize}
-
-(**************************************
-
- LPM_AdmitRsvpMsg
-
-***************************************)
-
-// Valid LPV - LPM Priority Values
-
-const
- LPV_RESERVED = 0;
- {$EXTERNALSYM LPV_RESERVED}
- LPV_MIN_PRIORITY = 1;
- {$EXTERNALSYM LPV_MIN_PRIORITY}
- LPV_MAX_PRIORITY = $FF00;
- {$EXTERNALSYM LPV_MAX_PRIORITY}
- LPV_DROP_MSG = $FFFD;
- {$EXTERNALSYM LPV_DROP_MSG}
- LPV_DONT_CARE = $FFFE;
- {$EXTERNALSYM LPV_DONT_CARE}
- LPV_REJECT = $FFFF;
- {$EXTERNALSYM LPV_REJECT}
-
-// Valid values for PcmActionFlags
-
- FORCE_IMMEDIATE_REFRESH = 1;
- {$EXTERNALSYM FORCE_IMMEDIATE_REFRESH}
-
-// Function return values for LPM_AdmitResvMsg
-
- LPM_RESULT_READY = 0;
- {$EXTERNALSYM LPM_RESULT_READY}
- LPM_RESULT_DEFER = 1;
- {$EXTERNALSYM LPM_RESULT_DEFER}
-
-function LPM_AdmitRsvpMsg(PcmReqHandle: RHANDLE; const pRecvdIntf: RSVP_HOP;
- const pRsvpMsgObjs: RSVP_MSG_OBJS; RcvdRsvpMsgLength: Integer; RcvdRsvpMsg: PUCHAR;
- var pulPcmActionFlags: ULONG; pPolicyDecisions: PPolicyDecision; Reserved: Pointer): ULONG; stdcall;
-{$EXTERNALSYM LPM_AdmitRsvpMsg}
-
-(**************************************
-
- LPM_GetRsvpObjects
-
-***************************************)
-
-// Function return values are defined in LPM_AdmitResvMsg section
-
-function LPM_GetRsvpObjects(PcmReqHandle: RHANDLE; MaxPdSize: ULONG;
- SendingIntfAddr: PRsvpHop; pRsvpMsgObjs: PRsvpMsgObjs; var pRsvpObjectsCount: Integer;
- var pppRsvpObjects: PRsvpObjHdr; Reserved: Pointer): ULONG; stdcall;
-{$EXTERNALSYM LPM_GetRsvpObjects}
-
-(**************************************
-
- LPM_DeleteState
-
-***************************************)
-
-// TearDown reasons
-
-const
- RCVD_PATH_TEAR = 1;
- {$EXTERNALSYM RCVD_PATH_TEAR}
- RCVD_RESV_TEAR = 2;
- {$EXTERNALSYM RCVD_RESV_TEAR}
- ADM_CTRL_FAILED = 3;
- {$EXTERNALSYM ADM_CTRL_FAILED}
- STATE_TIMEOUT = 4;
- {$EXTERNALSYM STATE_TIMEOUT}
- FLOW_DURATION = 5;
- {$EXTERNALSYM FLOW_DURATION}
-
-procedure LPM_DeleteState(pRcvdIfAddr: PRsvpHop; RsvpMsgType: TMsgType;
- pRsvpSession: PRsvpSession; pRsvpFromHop: PRsvpHop; pResvStyle: PResvStyle;
- FilterSpecCount: Integer; ppFilterSpecList: PFilterSpec; TearDownReason: Integer); stdcall;
-{$EXTERNALSYM LPM_DeleteState}
-
-(**************************************
-
- LPM_IpAddrTable
-
-***************************************)
-
-type
- lpmiptable = record
- ulIfIndex: ULONG; // SNMP index for this interface
- MediaType: ULONG; // As defined in IPIFCONS.H
- IfIpAddr: IN_ADDR; // Interface IP address
- IfNetMask: IN_ADDR; // Interface subnet mask
- end;
- {$EXTERNALSYM lpmiptable}
- TLpmIpTable = lpmiptable;
- PLpmIpTable = ^lpmiptable;
-
-function LPM_IpAddressTable(cIpAddrTable: ULONG; pIpAddrTable: PLpmIpTable): BOOL; stdcall;
-{$EXTERNALSYM LPM_IpAddressTable}
-
-(**************************************
-
- LPM_CommitResv
-
-***************************************)
-
-// CommitDecision values
-
-const
- RESOURCES_ALLOCATED = 1;
- {$EXTERNALSYM RESOURCES_ALLOCATED}
- RESOURCES_MODIFIED = 2;
- {$EXTERNALSYM RESOURCES_MODIFIED}
-
-procedure LPM_CommitResv(RsvpSession: PRsvpSession; FlowInstalledIntf: PRsvpHop;
- RsvpStyle: PResvStyle; FilterSpecCount: Integer; ppFilterSpecList: PFilterSpec;
- pMergedFlowSpec: PIsFlowSpec; CommitDecision: ULONG); stdcall;
-{$EXTERNALSYM LPM_CommitResv}
-
-implementation
-
-const
- lpmlib = 'msidlpm.dll';
-
-function ObjLength(const x: TRsvpObjHdr): USHORT;
-begin
- Result := x.obj_length;
-end;
-
-function ObjCType(const x: TRsvpObjHdr): UCHAR;
-begin
- Result := x.obj_ctype;
-end;
-
-function ObjClass(const x: TRsvpObjHdr): UCHAR;
-begin
- Result := x.obj_class;
-end;
-
-function ObjData(const x: TRsvpObjHdr): Pointer;
-begin
- Result := Pointer(Integer(@x) + SizeOf(x));
-end;
-
-function Style_is_Wildcard(p: DWORD): Boolean;
-begin
- Result := (p and Opt_SndSel_mask) = Opt_Wildcard;
-end;
-
-function Style_is_Shared(p: DWORD): Boolean;
-begin
- Result := (p and Opt_Share_mask) = Opt_Shared;
-end;
-
-function Error_Usage(x: DWORD): DWORD;
-begin
- Result := (x shr 12) and 3;
-end;
-
-function Intserv_Version(x: DWORD): DWORD;
-begin
- Result := (x and INTSERV_VERS_MASK) shr 4;
-end;
-
-function Intserv_Version_OK(const x: TIntServMainHdr): Boolean;
-begin
- Result := (x.ismh_version and INTSERV_VERS_MASK) = INTSERV_VERSION0;
-end;
-
-function Intserv_Obj_size(const x: TIntServMainHdr): DWORD;
-begin
- Result := x.ismh_len32b * 4 + SizeOf(IntServMainHdr) + SizeOf(RsvpObjHdr);
-end;
-
-function Issh_len32b(const p: TIntServServiceHdr): USHORT;
-begin
- Result := p.issh_len32b;
-end;
-
-{$IFDEF DYNAMIC_LINK}
-
-var
- _LPM_Initialize: Pointer;
-
-function LPM_Initialize;
-begin
- GetProcedureAddress(_LPM_Initialize, lpmlib, 'LPM_Initialize');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_LPM_Initialize]
- end;
-end;
-
-var
- _LPM_Deinitialize: Pointer;
-
-function LPM_Deinitialize;
-begin
- GetProcedureAddress(_LPM_Deinitialize, lpmlib, 'LPM_Deinitialize');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_LPM_Deinitialize]
- end;
-end;
-
-var
- _LPM_AdmitRsvpMsg: Pointer;
-
-function LPM_AdmitRsvpMsg;
-begin
- GetProcedureAddress(_LPM_AdmitRsvpMsg, lpmlib, 'LPM_AdmitRsvpMsg');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_LPM_AdmitRsvpMsg]
- end;
-end;
-
-var
- _LPM_GetRsvpObjects: Pointer;
-
-function LPM_GetRsvpObjects;
-begin
- GetProcedureAddress(_LPM_GetRsvpObjects, lpmlib, 'LPM_GetRsvpObjects');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_LPM_GetRsvpObjects]
- end;
-end;
-
-var
- _LPM_DeleteState: Pointer;
-
-procedure LPM_DeleteState;
-begin
- GetProcedureAddress(_LPM_DeleteState, lpmlib, 'LPM_DeleteState');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_LPM_DeleteState]
- end;
-end;
-
-var
- _LPM_IpAddressTable: Pointer;
-
-function LPM_IpAddressTable;
-begin
- GetProcedureAddress(_LPM_IpAddressTable, lpmlib, 'LPM_IpAddressTable');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_LPM_IpAddressTable]
- end;
-end;
-
-var
- _LPM_CommitResv: Pointer;
-
-procedure LPM_CommitResv;
-begin
- GetProcedureAddress(_LPM_CommitResv, lpmlib, 'LPM_CommitResv');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_LPM_CommitResv]
- end;
-end;
-
-{$ELSE}
-
-function LPM_Initialize; external lpmlib name 'LPM_Initialize';
-function LPM_Deinitialize; external lpmlib name 'LPM_Deinitialize';
-function LPM_AdmitRsvpMsg; external lpmlib name 'LPM_AdmitRsvpMsg';
-function LPM_GetRsvpObjects; external lpmlib name 'LPM_GetRsvpObjects';
-procedure LPM_DeleteState; external lpmlib name 'LPM_DeleteState';
-function LPM_IpAddressTable; external lpmlib name 'LPM_IpAddressTable';
-procedure LPM_CommitResv; external lpmlib name 'LPM_CommitResv';
-
-{$ENDIF DYNAMIC_LINK}
-
-end.
+{******************************************************************************}
+{ }
+{ Winsock2 RSVP/LPM API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: lpmapi.h, released June 2000. The original Pascal }
+{ code is: LpmApi.pas, released December 2000. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwalpmapi.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaLpmApi;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "lpmapi.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaWinSock2, JwaWinType;
+
+type
+ FLOAT = Single;
+ {$NODEFINE FLOAT}
+
+(****************************************************************************
+
+ RSVPD -- ReSerVation Protocol Daemon
+
+ USC Information Sciences Institute
+ Marina del Rey, California
+
+ Original Version: Shai Herzog, Nov. 1993.
+ Current Version: Steven Berson & Bob Braden, may 1996.
+
+ Copyright (c) 1996 by the University of Southern California
+ All rights reserved.
+
+ Permission to use, copy, modify, and distribute this software and its
+ documentation in source and binary forms for any purpose and without
+ fee is hereby granted, provided that both the above copyright notice
+ and this permission notice appear in all copies, and that any
+ documentation, advertising materials, and other materials related to
+ such distribution and use acknowledge that the software was developed
+ in part by the University of Southern California, Information
+ Sciences Institute. The name of the University may not be used to
+ endorse or promote products derived from this software without
+ specific prior written permission.
+
+ THE UNIVERSITY OF SOUTHERN CALIFORNIA makes no representations about
+ the suitability of this software for any purpose. THIS SOFTWARE IS
+ PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES,
+ INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
+ MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+
+ Other copyrights might apply to parts of this software and are so
+ noted when applicable.
+
+********************************************************************)
+
+(*
+ * Standard format of an RSVP object header
+ *)
+
+type
+ RsvpObjHdr = record
+ obj_length: USHORT; (* Length in bytes *)
+ obj_class: UCHAR; (* Class (values defined below) *)
+ obj_ctype: UCHAR; (* C-Type (values defined below) *)
+ end;
+ {$EXTERNALSYM RsvpObjHdr}
+ TRsvpObjHdr = RsvpObjHdr;
+ PRsvpObjHdr = ^RsvpObjHdr;
+ PPRsvpObjHdr = ^PRsvpObjHdr;
+
+function ObjLength(const x: TRsvpObjHdr): USHORT;
+{$EXTERNALSYM ObjLength}
+function ObjCType(const x: TRsvpObjHdr): UCHAR;
+{$EXTERNALSYM ObjCType}
+function ObjClass(const x: TRsvpObjHdr): UCHAR;
+{$EXTERNALSYM ObjClass}
+function ObjData(const x: TRsvpObjHdr): Pointer;
+{$EXTERNALSYM ObjData}
+
+(*
+ * Define object classes: Class-Num values
+ *)
+
+const
+ class_NULL = 0;
+ {$EXTERNALSYM class_NULL}
+ class_SESSION = 1;
+ {$EXTERNALSYM class_SESSION}
+ class_SESSION_GROUP = 2;
+ {$EXTERNALSYM class_SESSION_GROUP}
+ class_RSVP_HOP = 3;
+ {$EXTERNALSYM class_RSVP_HOP}
+ class_INTEGRITY = 4;
+ {$EXTERNALSYM class_INTEGRITY}
+ class_TIME_VALUES = 5;
+ {$EXTERNALSYM class_TIME_VALUES}
+ class_ERROR_SPEC = 6;
+ {$EXTERNALSYM class_ERROR_SPEC}
+ class_SCOPE = 7;
+ {$EXTERNALSYM class_SCOPE}
+ class_STYLE = 8;
+ {$EXTERNALSYM class_STYLE}
+ class_FLOWSPEC = 9; // these two are the same
+ {$EXTERNALSYM class_FLOWSPEC}
+ class_IS_FLOWSPEC = 9; // since we added IS in front of the name
+ {$EXTERNALSYM class_IS_FLOWSPEC}
+ class_FILTER_SPEC = 10;
+ {$EXTERNALSYM class_FILTER_SPEC}
+ class_SENDER_TEMPLATE = 11;
+ {$EXTERNALSYM class_SENDER_TEMPLATE}
+ class_SENDER_TSPEC = 12;
+ {$EXTERNALSYM class_SENDER_TSPEC}
+ class_ADSPEC = 13;
+ {$EXTERNALSYM class_ADSPEC}
+ class_POLICY_DATA = 14;
+ {$EXTERNALSYM class_POLICY_DATA}
+ class_CONFIRM = 15;
+ {$EXTERNALSYM class_CONFIRM}
+ class_MAX = 15;
+ {$EXTERNALSYM class_MAX}
+
+(*
+ * RSVP SESSION object
+ *)
+
+ ctype_SESSION_ipv4 = 1;
+ {$EXTERNALSYM ctype_SESSION_ipv4}
+ ctype_SESSION_ipv4GPI = 3 (* IPSEC: Generalized Port Id *);
+ {$EXTERNALSYM ctype_SESSION_ipv4GPI}
+
+ SESSFLG_E_Police = $01 (* E_Police: Entry policing flag*);
+ {$EXTERNALSYM SESSFLG_E_Police}
+
+type
+ Session_IPv4 = record
+ sess_destaddr: IN_ADDR; // DestAddress
+ sess_protid: UCHAR; // Protocol Id
+ sess_flags: UCHAR; // Use the flags defined above
+ sess_destport: USHORT; // DestPort
+ end;
+ {$EXTERNALSYM Session_IPv4}
+ TSessionIPv4 = Session_IPv4;
+ PSessionIPv4 = ^Session_IPv4;
+
+(* GPI versions have virtual dest port instead of dest port; this
+ * changes the interpretation but not the format, so we do not
+ * define new structs for GPI.
+ *)
+
+ RSVP_SESSION = record
+ sess_header: RsvpObjHdr;
+ case Integer of
+ 0: (sess_ipv4: Session_IPv4);
+ end;
+ {$EXTERNALSYM RSVP_SESSION}
+ TRsvpSession = RSVP_SESSION;
+ PRsvpSession = ^RSVP_SESSION;
+
+// Useful defines to access components of SESSION obect
+
+//#define Sess4Addr sess_u.sess_ipv4.sess_destaddr
+//#define Sess4Port sess_u.sess_ipv4.sess_destport
+//#define Sess4Protocol sess_u.sess_ipv4.sess_protid
+//#define Sess4Flags sess_u.sess_ipv4.sess_flags
+
+(*
+ * RSVP HOP object
+ *)
+
+const
+ ctype_RSVP_HOP_ipv4 = 1;
+ {$EXTERNALSYM ctype_RSVP_HOP_ipv4}
+
+type
+ Rsvp_Hop_IPv4 = record
+ hop_ipaddr: IN_ADDR; // Next/Previous Hop Address
+ hop_LIH: ULONG; // Logical Interface Handle
+ end;
+ {$EXTERNALSYM Rsvp_Hop_IPv4}
+ TRsvpHopIPv4 = Rsvp_Hop_IPv4;
+ PRsvpHopIPv4 = ^Rsvp_Hop_IPv4;
+
+ RSVP_HOP = record
+ hop_header: RsvpObjHdr;
+ case Integer of
+ 0: (hop_ipv4: Rsvp_Hop_IPv4);
+ end;
+ {$EXTERNALSYM RSVP_HOP}
+ TRsvpHop = RSVP_HOP;
+ PRsvpHop = ^RSVP_HOP;
+
+//#define Hop4LIH hop_u.hop_ipv4.hop_LIH
+//#define Hop4Addr hop_u.hop_ipv4.hop_ipaddr
+
+(*
+ * RSVP STYLE object
+ *)
+
+// Define values for option vector
+
+const
+ Opt_Share_mask = $00000018; // 2 bits: Sharing control
+ {$EXTERNALSYM Opt_Share_mask}
+ Opt_Distinct = $00000008; // Distinct reservations
+ {$EXTERNALSYM Opt_Distinct}
+ Opt_Shared = $00000010; // Shared reservations
+ {$EXTERNALSYM Opt_Shared}
+
+ Opt_SndSel_mask = $00000007; // 3 bits: Sender selection
+ {$EXTERNALSYM Opt_SndSel_mask}
+ Opt_Wildcard = $00000001; // Wildcard scope
+ {$EXTERNALSYM Opt_Wildcard}
+ Opt_Explicit = $00000002; // Explicit scope
+ {$EXTERNALSYM Opt_Explicit}
+
+function Style_is_Wildcard(p: DWORD): Boolean;
+{$EXTERNALSYM Style_is_Wildcard}
+function Style_is_Shared(p: DWORD): Boolean;
+{$EXTERNALSYM Style_is_Shared}
+
+// Define style values
+
+const
+ STYLE_WF = Opt_Shared + Opt_Wildcard;
+ {$EXTERNALSYM STYLE_WF}
+ STYLE_FF = Opt_Distinct + Opt_Explicit;
+ {$EXTERNALSYM STYLE_FF}
+ STYLE_SE = Opt_Shared + Opt_Explicit;
+ {$EXTERNALSYM STYLE_SE}
+
+ ctype_STYLE = 1;
+ {$EXTERNALSYM ctype_STYLE}
+
+type
+ RESV_STYLE = record
+ style_header: RsvpObjHdr;
+ style_word: ULONG;
+ end;
+ {$EXTERNALSYM RESV_STYLE}
+ TResvStyle = RESV_STYLE;
+ PResvStyle = ^RESV_STYLE;
+
+(*
+ * RSVP FILTER SPEC object
+ *)
+
+const
+ ctype_FILTER_SPEC_ipv4 = 1; // IPv4 FILTER_SPEC
+ {$EXTERNALSYM ctype_FILTER_SPEC_ipv4}
+ ctype_FILTER_SPEC_ipv4GPI = 4; // IPv4/GPI FILTER_SPEC
+ {$EXTERNALSYM ctype_FILTER_SPEC_ipv4GPI}
+
+type
+ Filter_Spec_IPv4 = record
+ filt_ipaddr: IN_ADDR; // IPv4 SrcAddress
+ filt_unused: USHORT;
+ filt_port: USHORT; // SrcPort
+ end;
+ {$EXTERNALSYM Filter_Spec_IPv4}
+ TFilterSpecIPv4 = Filter_Spec_IPv4;
+ PFilterSpecIPv4 = ^Filter_Spec_IPv4;
+
+ Filter_Spec_IPv4GPI = record
+ filt_ipaddr: IN_ADDR; // IPv4 SrcAddress
+ filt_gpi: ULONG; // Generalized Port Id
+ end;
+ {$EXTERNALSYM Filter_Spec_IPv4GPI}
+ TFilterSpecIPv4GPI = Filter_Spec_IPv4GPI;
+ PFilterSpecIPv4GPI = ^Filter_Spec_IPv4GPI;
+
+ FILTER_SPEC = record
+ filt_header: RsvpObjHdr;
+ case Integer of
+ 0: (filt_ipv4: Filter_Spec_IPv4);
+ 1: (filt_ipv4gpi: Filter_Spec_IPv4GPI);
+ end;
+ {$EXTERNALSYM FILTER_SPEC}
+ TFilterSpec = FILTER_SPEC;
+ PFilterSpec = ^FILTER_SPEC;
+
+//#define FilterSrcaddr filt_u.filt_ipv4.filt_ipaddr
+//#define FilterSrcport filt_u.filt_ipv4.filt_port
+
+(*
+ * RSVP SENDER_TEMPLATE object
+ *)
+
+const
+ ctype_SENDER_TEMPLATE_ipv4 = 1; // IPv4 SENDER_TEMPLATE
+ {$EXTERNALSYM ctype_SENDER_TEMPLATE_ipv4}
+ ctype_SENDER_TEMPLATE_ipv4GPI = 4; // IPv4/GPI SENDER_TEMPLATE
+ {$EXTERNALSYM ctype_SENDER_TEMPLATE_ipv4GPI}
+
+type
+ SENDER_TEMPLATE = FILTER_SPEC; // Identical to FILTER_SPEC
+ {$EXTERNALSYM SENDER_TEMPLATE}
+ TSenderTemplate = SENDER_TEMPLATE;
+ PSenderTemplate = ^SENDER_TEMPLATE;
+
+(*
+ * RSVP SCOPE object class
+ *)
+
+const
+ ctype_SCOPE_list_ipv4 = 1;
+ {$EXTERNALSYM ctype_SCOPE_list_ipv4}
+
+type
+ Scope_list_ipv4 = record
+ scopl_ipaddr: array [0..0] of IN_ADDR; // var-len list of IP sender addrs
+ end;
+ {$EXTERNALSYM Scope_list_ipv4}
+ TScopeListIPv4 = Scope_list_ipv4;
+ PScopeListIPv4 = ^Scope_list_ipv4;
+
+ RSVP_SCOPE = record
+ scopl_header: RsvpObjHdr;
+ case Integer of
+ 0: (scopl_ipv4: Scope_list_ipv4);
+ end;
+ {$EXTERNALSYM RSVP_SCOPE}
+ TRsvpScope = RSVP_SCOPE;
+ PRsvpScope = ^RSVP_SCOPE;
+
+//#define Scope4Addr scope_u.scopl_ipv4.scopl_ipaddr
+//#define ScopeCnt(scp) ((ObjLength(scp)-sizeof(RsvpObjHdr))/sizeof(struct in_addr))
+//#define ScopeLen(cnt) (cnt*sizeof(struct in_addr)+sizeof(RsvpObjHdr))
+
+(*
+ * ERROR_SPEC object class
+ *)
+
+const
+ ctype_ERROR_SPEC_ipv4 = 1;
+ {$EXTERNALSYM ctype_ERROR_SPEC_ipv4}
+
+ ERROR_SPECF_InPlace = $01; (* Left resv in place *)
+ {$EXTERNALSYM ERROR_SPECF_InPlace}
+ ERROR_SPECF_NotGuilty = $02; (* This rcvr not guilty *)
+ {$EXTERNALSYM ERROR_SPECF_NotGuilty}
+ ERR_FORWARD_OK = $8000; (* Flag: OK to forward state *)
+ {$EXTERNALSYM ERR_FORWARD_OK}
+
+function Error_Usage(x: DWORD): DWORD;
+{$EXTERNALSYM Error_Usage}
+
+const
+ ERR_Usage_globl = $00; (* Globally-defined sub-code *)
+ {$EXTERNALSYM ERR_Usage_globl}
+ ERR_Usage_local = $10; (* Locally-defined sub-code *)
+ {$EXTERNALSYM ERR_Usage_local}
+ ERR_Usage_serv = $11; (* Service-defined sub-code *)
+ {$EXTERNALSYM ERR_Usage_serv}
+ ERR_global_mask = $0fff; (* Sub-code bits in Error Val *)
+ {$EXTERNALSYM ERR_global_mask}
+
+type
+ Error_Spec_IPv4 = record
+ errs_errnode: in_addr; (* Error Node Address *)
+ errs_flags: u_char; (* Flags: *)
+ errs_code: UCHAR; (* Error Code (def'd below) *)
+ errs_value: USHORT; (* Error Value *)
+ end;
+ {$EXTERNALSYM Error_Spec_IPv4}
+ TErrorSpecIPv4 = Error_Spec_IPv4;
+ PErrorSpecIPv4 = ^Error_Spec_IPv4;
+
+type
+ ERROR_SPEC = record
+ errs_header: RsvpObjHdr;
+ case Integer of
+ 0: (errs_ipv4: Error_Spec_IPv4);
+ end;
+ {$EXTERNALSYM ERROR_SPEC}
+ TErrorSpec = ERROR_SPEC;
+ PErrorSpec = ^ERROR_SPEC;
+
+//#define errspec4_enode errs_u.errs_ipv4.errs_errnode
+//#define errspec4_code errs_u.errs_ipv4.errs_code
+//#define errspec4_value errs_u.errs_ipv4.errs_value
+//#define errspec4_flags errs_u.errs_ipv4.errs_flags
+
+(*
+ * POLICY_DATA object class
+ *
+ * Contents are Opaque RSVP/SBM
+ *)
+
+const
+ ctype_POLICY_DATA = 1;
+ {$EXTERNALSYM ctype_POLICY_DATA}
+
+type
+ POLICY_DATA = record
+ PolicyObjHdr: RsvpObjHdr;
+ usPeOffset: USHORT; // Offset to the start of Policy Elements from the begining of Policy Data
+ usReserved: USHORT;
+ end;
+ {$EXTERNALSYM POLICY_DATA}
+ TPolicyData = POLICY_DATA;
+ PPolicyData = ^POLICY_DATA;
+
+const
+ PD_HDR_LEN = SizeOf(POLICY_DATA);
+ {$EXTERNALSYM PD_HDR_LEN}
+
+type
+ POLICY_ELEMENT = record
+ usPeLength: USHORT; // Policy Element length
+ usPeType: USHORT; // Policy Element type
+ ucPeData: array [0..3] of UCHAR; // Just a place holder to the start of Policy Element data
+ end;
+ {$EXTERNALSYM POLICY_ELEMENT}
+ TPolicyElement = POLICY_ELEMENT;
+ PPolicyElement = ^POLICY_ELEMENT;
+
+const
+ PE_HDR_LEN = 2 * SizeOf(USHORT);
+ {$EXTERNALSYM PE_HDR_LEN}
+
+(**************************************************************************
+ *
+ * Int-Serv Data Structures
+ *
+ **************************************************************************)
+
+(*
+ * Service numbers
+ *)
+
+const
+ GENERAL_INFO = 1;
+ {$EXTERNALSYM GENERAL_INFO}
+ GUARANTEED_SERV = 2;
+ {$EXTERNALSYM GUARANTEED_SERV}
+ PREDICTIVE_SERV = 3;
+ {$EXTERNALSYM PREDICTIVE_SERV}
+ CONTROLLED_DELAY_SERV = 4;
+ {$EXTERNALSYM CONTROLLED_DELAY_SERV}
+ CONTROLLED_LOAD_SERV = 5;
+ {$EXTERNALSYM CONTROLLED_LOAD_SERV}
+ QUALITATIVE_SERV = 6;
+ {$EXTERNALSYM QUALITATIVE_SERV}
+
+(*
+ * Well-known parameter IDs
+ *)
+
+const
+ IS_WKP_HOP_CNT = 4;
+ {$EXTERNALSYM IS_WKP_HOP_CNT}
+ IS_WKP_PATH_BW = 6;
+ {$EXTERNALSYM IS_WKP_PATH_BW}
+ IS_WKP_MIN_LATENCY = 8;
+ {$EXTERNALSYM IS_WKP_MIN_LATENCY}
+ IS_WKP_COMPOSED_MTU = 10;
+ {$EXTERNALSYM IS_WKP_COMPOSED_MTU}
+ IS_WKP_TB_TSPEC = 127; (* Token-bucket TSPEC parm *)
+ {$EXTERNALSYM IS_WKP_TB_TSPEC}
+ IS_WKP_Q_TSPEC = 128;
+ {$EXTERNALSYM IS_WKP_Q_TSPEC}
+
+type
+ int_serv_wkp = DWORD;
+ {$EXTERNALSYM int_serv_wkp}
+ TIntServWkp = int_serv_wkp;
+
+(*
+ * Int-serv Main header
+ *)
+
+ IntServMainHdr = record
+ ismh_version: UCHAR; // Version
+ ismh_unused: UCHAR;
+ ismh_len32b: USHORT; // # 32-bit words excluding this hdr
+ end;
+ {$EXTERNALSYM IntServMainHdr}
+ TIntServMainHdr = IntServMainHdr;
+ PIntServMainHdr = ^IntServMainHdr;
+
+const
+ INTSERV_VERS_MASK = $f0;
+ {$EXTERNALSYM INTSERV_VERS_MASK}
+ INTSERV_VERSION0 = 0;
+ {$EXTERNALSYM INTSERV_VERSION0}
+
+function Intserv_Version(x: DWORD): DWORD;
+{$EXTERNALSYM Intserv_Version}
+function Intserv_Version_OK(const x: TIntServMainHdr): Boolean;
+{$EXTERNALSYM Intserv_Version_OK}
+
+// Convert ishm_length to equivalent RSVP object size, for checking
+
+function Intserv_Obj_size(const x: TIntServMainHdr): DWORD;
+{$EXTERNALSYM Intserv_Obj_size}
+
+(*
+ * Int-serv Service Element Header
+ *)
+
+// Flag: Break bit
+
+const
+ ISSH_BREAK_BIT = $80;
+ {$EXTERNALSYM ISSH_BREAK_BIT}
+
+type
+ IntServServiceHdr = record
+ issh_service: UCHAR; // Service number
+ issh_flags: UCHAR; // Flag byte
+ issh_len32b: USHORT; // #32-bit words excluding this hdr
+ end;
+ {$EXTERNALSYM IntServServiceHdr}
+ TIntServServiceHdr = IntServServiceHdr;
+ PIntServServiceHdr = ^IntServServiceHdr;
+
+function Issh_len32b(const p: TIntServServiceHdr): USHORT;
+{$EXTERNALSYM Issh_len32b}
+
+(*
+ * Int-serv Parameter Element Header
+ *)
+
+const
+ ISPH_FLG_INV = $80; // Flag: Invalid
+ {$EXTERNALSYM ISPH_FLG_INV}
+
+type
+ IntServParmHdr = record
+ isph_parm_num: UCHAR; // Parameter number
+ isph_flags: UCHAR; // Flags
+ isph_len32b: USHORT; // #32-bit words excluding this hdr
+ end;
+ {$EXTERNALSYM IntServParmHdr}
+ TIntServParmHdr = IntServParmHdr;
+ PIntServParmHdr = ^IntServParmHdr;
+
+{
+function Next_Main_Hdr(const p: TIntServMainHdr): PIntServMainHdr;
+begin
+ TODO (IntServMainHdr *)((ULONG *)(p)+1+(p)->ismh_len32b)
+end;
+
+function Next_Serv_Hdr(const p: TIntServMainHdr): ULONG;
+begin
+ TODO (IntServServiceHdr *)((ULONG *)(p)+1+(p)->issh_len32b)
+end;
+
+function Next_Parm_Hdr(const p: TIntServParmHdr): ULONG;
+begin
+ TODO (IntServParmHdr *)((ULONG *)(p)+1+(p)->isph_len32b)
+end;
+}
+
+(*
+ * Generic Tspec Parameters
+ *)
+
+type
+ GenTspecParms = record
+ TB_Tspec_r: FLOAT; // Token bucket rate (B/sec)
+ TB_Tspec_b: FLOAT; // Token bucket depth (B)
+ TB_Tspec_p: FLOAT; // Peak data rate (B/sec)
+ TB_Tspec_m: ULONG; // Min Policed Unit (B)
+ TB_Tspec_M_: ULONG; // Max pkt size (B)
+ end;
+ {$EXTERNALSYM GenTspecParms}
+ TGenTspecParms = GenTspecParms;
+ PGenTspecParms = ^GenTspecParms;
+
+(*
+ * Generic Tspec
+ *)
+
+ GenTspec = record
+ gen_Tspec_serv_hdr: IntServServiceHdr; // (GENERAL_INFO, length)
+ gen_Tspec_parm_hdr: IntServParmHdr; // (IS_WKP_TB_TSPEC)
+ gen_Tspec_parms: GenTspecParms;
+ end;
+ {$EXTERNALSYM GenTspec}
+ TGenTspec = GenTspec;
+ PGenTspec = ^GenTspec;
+
+//#define gtspec_r gen_Tspec_parms.TB_Tspec_r
+//#define gtspec_b gen_Tspec_parms.TB_Tspec_b
+//#define gtspec_m gen_Tspec_parms.TB_Tspec_m
+//#define gtspec_M gen_Tspec_parms.TB_Tspec_M
+//#define gtspec_p gen_Tspec_parms.TB_Tspec_p
+//#define gtspec_parmno gen_Tspec_parm_hdr.isph_parm_num
+//#define gtspec_flags gen_Tspec_parm_hdr.isph_flags
+
+//#define gtspec_len (sizeof(GenTspec) - sizeof(IntServServiceHdr))
+
+(* contents of qualitative tspec *)
+
+type
+ QualTspecParms = record
+ TB_Tspec_M: ULONG; // Max pkt size (M)
+ end;
+ {$EXTERNALSYM QualTspecParms}
+ TQualTspecParms = QualTspecParms;
+ PQualTspecParms = ^QualTspecParms;
+
+ QualTspec = record
+ qual_Tspec_serv_hdr: IntServServiceHdr; // (QUALITATIVE_SERV, length)
+ qual_Tspec_parm_hdr: IntServParmHdr; // (IS_WKP_Q_TSPEC)
+ qual_Tspec_parms: QualTspecParms;
+ end;
+ {$EXTERNALSYM QualTspec}
+ TQualTspec = QualTspec;
+ PQualTspec = ^QualTspec;
+
+ QualAppFlowSpec = record
+ Q_spec_serv_hdr: IntServServiceHdr; // (QUALITATIVE_SERV,0,len)
+ Q_spec_parm_hdr: IntServParmHdr; // (IS_WKP_Q_TSPEC)
+ Q_spec_parms: QualTspecParms; // QUALITATIVE Tspec parameters
+ end;
+ {$EXTERNALSYM QualAppFlowSpec}
+ TQualAppFlowSpec = QualAppFlowSpec;
+ PQualAppFlowSpec = ^QualAppFlowSpec;
+
+//#define QAspec_M Q_spec_parms.TB_Tspec_M
+
+(*
+ * Contents of int-serv Tspec
+ *)
+
+ IntServTspecBody = record
+ st_mh: IntServMainHdr;
+ case Integer of
+ 0: (gen_stspec: GenTspec); // Generic Tspec
+ 1: (qual_stspec: QualTspec);
+ end;
+ {$EXTERNALSYM IntServTspecBody}
+ TIntServTspecBody = IntServTspecBody;
+ PIntServTspecBody = ^IntServTspecBody;
+
+(*
+ * SENDER_TSPEC class object
+ *)
+
+const
+ ctype_SENDER_TSPEC = 2;
+ {$EXTERNALSYM ctype_SENDER_TSPEC}
+
+type
+ SENDER_TSPEC = record
+ stspec_header: RsvpObjHdr;
+ stspec_body: IntServTspecBody;
+ end;
+ {$EXTERNALSYM SENDER_TSPEC}
+ TSenderTSpec = SENDER_TSPEC;
+ PSenderTSpec = ^SENDER_TSPEC;
+
+(*
+ * Controlled-Load Flowspec
+ *)
+
+ CtrlLoadFlowspec = record
+ CL_spec_serv_hdr: IntServServiceHdr; // (CONTROLLED_LOAD_SERV,0,len)
+ CL_spec_parm_hdr: IntServParmHdr; // (IS_WKP_TB_TSPEC)
+ CL_spec_parms: GenTspecParms; // GENERIC Tspec parameters
+ end;
+ {$EXTERNALSYM CtrlLoadFlowspec}
+ TCtrlLoadFlowspec = CtrlLoadFlowspec;
+ PCtrlLoadFlowspec = ^CtrlLoadFlowspec;
+
+//#define CLspec_r CL_spec_parms.TB_Tspec_r
+//#define CLspec_b CL_spec_parms.TB_Tspec_b
+//#define CLspec_p CL_spec_parms.TB_Tspec_p
+//#define CLspec_m CL_spec_parms.TB_Tspec_m
+//#define CLspec_M CL_spec_parms.TB_Tspec_M
+//#define CLspec_parmno CL_spec_parm_hdr.isph_parm_num
+//#define CLspec_flags CL_spec_parm_hdr.isph_flags
+//#define CLspec_len32b CL_spec_parm_hdr.isph_len32b
+
+//#define CLspec_len (sizeof(CtrlLoadFlowspec) - sizeof(IntServServiceHdr))
+
+(* Service-specific Parameter IDs
+ *)
+
+const
+ IS_GUAR_RSPEC = 130;
+ {$EXTERNALSYM IS_GUAR_RSPEC}
+
+ GUAR_ADSPARM_C = 131;
+ {$EXTERNALSYM GUAR_ADSPARM_C}
+ GUAR_ADSPARM_D = 132;
+ {$EXTERNALSYM GUAR_ADSPARM_D}
+ GUAR_ADSPARM_Ctot = 133;
+ {$EXTERNALSYM GUAR_ADSPARM_Ctot}
+ GUAR_ADSPARM_Dtot = 134;
+ {$EXTERNALSYM GUAR_ADSPARM_Dtot}
+ GUAR_ADSPARM_Csum = 135;
+ {$EXTERNALSYM GUAR_ADSPARM_Csum}
+ GUAR_ADSPARM_Dsum = 136;
+ {$EXTERNALSYM GUAR_ADSPARM_Dsum}
+
+(*
+ * Guaranteed Rspec parameters
+ *)
+
+type
+ GuarRspec = record
+ Guar_R: FLOAT; // Guaranteed Rate B/s
+ Guar_S: ULONG; // Slack term secs
+ end;
+ {$EXTERNALSYM GuarRspec}
+ TGuarRspec = GuarRspec;
+ PGuarRspec = ^GuarRspec;
+
+(*
+ * Guaranteed Flowspec
+ *)
+
+ GuarFlowSpec = record
+ Guar_serv_hdr: IntServServiceHdr; // (GUARANTEED, 0, length)
+ Guar_Tspec_hdr: IntServParmHdr; // (IS_WKP_TB_TSPEC,)
+ Guar_Tspec_parms: GenTspecParms; // GENERIC Tspec parms
+ Guar_Rspec_hdr: IntServParmHdr; // (IS_GUAR_RSPEC)
+ Guar_Rspec: GuarRspec; // Guaranteed rate (B/sec)
+ end;
+ {$EXTERNALSYM GuarFlowSpec}
+ TGuarFlowSpec = GuarFlowSpec;
+ PGuarFlowSpec = ^GuarFlowSpec;
+
+//#define Gspec_r Guar_Tspec_parms.TB_Tspec_r
+//#define Gspec_b Guar_Tspec_parms.TB_Tspec_b
+//#define Gspec_p Guar_Tspec_parms.TB_Tspec_p
+//#define Gspec_m Guar_Tspec_parms.TB_Tspec_m
+//#define Gspec_M Guar_Tspec_parms.TB_Tspec_M
+//#define Gspec_R Guar_Rspec.Guar_R
+//#define Gspec_S Guar_Rspec.Guar_S
+//#define Gspec_T_parmno Guar_Tspec_hdr.isph_parm_num
+//#define Gspec_T_flags Guar_Tspec_hdr.isph_flags
+//#define Gspec_R_parmno Guar_Rspec_hdr.isph_parm_num
+//#define Gspec_R_flags Guar_Rspec_hdr.isph_flags
+
+//#define Gspec_len (sizeof(GuarFlowSpec) - sizeof(IntServServiceHdr))
+
+(*
+ * Contents of int-serv flowspec
+ *)
+
+type
+ IntServFlowSpec = record
+ spec_mh: IntServMainHdr;
+ case Integer of
+ 0: (CL_spec: CtrlLoadFlowspec); // Controlled-Load service
+ 1: (G_spec: GuarFlowSpec); // Guaranteed service
+ 2: (Q_spec: QualAppFlowSpec);
+ end;
+ {$EXTERNALSYM IntServFlowSpec}
+ TIntServFlowSpec = IntServFlowSpec;
+ PIntServFlowSpec = ^IntServFlowSpec;
+
+//#define ISmh_len32b spec_mh.ismh_len32b
+//#define ISmh_version spec_mh.ismh_version
+//#define ISmh_unused spec_mh.ismh_unused
+
+(*
+ * Int-Serv FLOWSPEC object
+ *)
+
+const
+ ctype_FLOWSPEC_Intserv0 = 2; // The int-serv flowspec (v.0)
+ {$EXTERNALSYM ctype_FLOWSPEC_Intserv0}
+
+type
+ IS_FLOWSPEC = record
+ flow_header: RsvpObjHdr;
+ flow_body: IntServFlowSpec;
+ end;
+ {$EXTERNALSYM IS_FLOWSPEC}
+ TIsFlowSpec = IS_FLOWSPEC;
+ PIsFlowSpec = ^IS_FLOWSPEC;
+
+(*
+ * FLOW DESCRIPTOR
+ *)
+
+ FLOW_DESC = record
+ u1: record
+ case Integer of
+ 0: (stspec: ^SENDER_TSPEC);
+ 1: (isflow: ^IS_FLOWSPEC);
+ end;
+ u2: record
+ case Integer of
+ 0: (stemp: ^SENDER_TEMPLATE);
+ 1: (fspec: ^FILTER_SPEC);
+ end;
+ end;
+ {$EXTERNALSYM FLOW_DESC}
+ TFlowDesc = FLOW_DESC;
+ PFlowDesc = ^FLOW_DESC;
+
+//#define FdSenderTspec u1.stspec
+//#define FdIsFlowSpec u1.isflow
+
+//#define FdSenderTemplate u2.stemp
+//#define FdFilterSpec u2.fspec
+
+(*
+ * ADSPEC class object
+ *
+ * Opaque to RSVP -- Contents defined in rapi_lib.h
+ *)
+
+const
+ ctype_ADSPEC_INTSERV = 2;
+ {$EXTERNALSYM ctype_ADSPEC_INTSERV}
+
+(*
+ * Guaranteed service Adspec parameters -- fixed part
+ *)
+
+type
+ Gads_parms_t = record
+ Gads_serv_hdr: IntServServiceHdr; // GUARANTEED, x, len
+ Gads_Ctot_hdr: IntServParmHdr; // GUAR_ADSPARM_Ctot
+ Gads_Ctot: ULONG;
+ Gads_Dtot_hdr: IntServParmHdr; // (GUAR_ADSPARM_Dtot
+ Gads_Dtot: ULONG;
+ Gads_Csum_hdr: IntServParmHdr; // GUAR_ADSPARM_Csum
+ Gads_Csum: ULONG;
+ Gads_Dsum_hdr: IntServParmHdr; // GUAR_ADSPARM_Dsum
+ Gads_Dsum: ULONG;
+ (*
+ * May be followed by override general param values
+ *)
+ end;
+ {$EXTERNALSYM Gads_parms_t}
+ TGadsParmsT = Gads_parms_t;
+ PGadsParmsT = ^Gads_parms_t;
+
+(*
+ * General Path Characterization Parameters
+ *)
+
+ GenAdspecParams = record
+ gen_parm_hdr: IntServServiceHdr; // GENERAL_INFO, len
+ gen_parm_hopcnt_hdr: IntServParmHdr; // (IS_WKP_HOP_CNT
+ gen_parm_hopcnt: ULONG;
+ gen_parm_pathbw_hdr: IntServParmHdr; // IS_WKP_PATH_BW
+ gen_parm_path_bw: FLOAT;
+ gen_parm_minlat_hdr: IntServParmHdr; // IS_WKP_MIN_LATENCY
+ gen_parm_min_latency: ULONG;
+ gen_parm_compmtu_hdr: IntServParmHdr; // IS_WKP_COMPOSED_MTU
+ gen_parm_composed_MTU: ULONG;
+ end;
+ {$EXTERNALSYM GenAdspecParams}
+ TGenAdspecParams = GenAdspecParams;
+ PGenAdspecParams = ^GenAdspecParams;
+
+(*
+ * Contents of (minimal) int-serv Adspec
+ *)
+
+ IS_ADSPEC_BODY = record
+ adspec_mh: IntServMainHdr; // Main header
+ adspec_genparms: GenAdspecParams;// General char parm fragment
+ (*
+ * Followed by variable-length fragments for some or all
+ * services. These can be minimal length fragments.
+ *)
+ end;
+ {$EXTERNALSYM IS_ADSPEC_BODY}
+ TIsAdSpecBody = IS_ADSPEC_BODY;
+ PIsAdSpecBody = ^IS_ADSPEC_BODY;
+
+//const TODO Unknown Object_Header
+// GEN_ADSPEC_LEN = SizeOf(Object_header) + SizeOf(IS_adsbody_t);
+// {$EXTERNALSYM GEN_ADSPEC_LEN}
+
+type
+ ADSPEC = record
+ adspec_header: RsvpObjHdr;
+ adspec_body: IS_ADSPEC_BODY; (* Defined in rapi_lib.h *)
+ end;
+ {$EXTERNALSYM ADSPEC}
+ TAdSpec = ADSPEC;
+ PAdSpec = ^ADSPEC;
+
+// RSVP message types
+
+const
+ RSVP_PATH = 1;
+ {$EXTERNALSYM RSVP_PATH}
+ RSVP_RESV = 2;
+ {$EXTERNALSYM RSVP_RESV}
+ RSVP_PATH_ERR = 3;
+ {$EXTERNALSYM RSVP_PATH_ERR}
+ RSVP_RESV_ERR = 4;
+ {$EXTERNALSYM RSVP_RESV_ERR}
+ RSVP_PATH_TEAR = 5;
+ {$EXTERNALSYM RSVP_PATH_TEAR}
+ RSVP_RESV_TEAR = 6;
+ {$EXTERNALSYM RSVP_RESV_TEAR}
+
+(* RSVP error codes
+ *)
+
+ RSVP_Err_NONE = 0; (* No error (CONFIRM) *)
+ {$EXTERNALSYM RSVP_Err_NONE}
+ RSVP_Erv_Nonev = 0; (* No-error Error Value *)
+ {$EXTERNALSYM RSVP_Erv_Nonev}
+
+(* Admission Control failure *)
+
+ RSVP_Err_ADMISSION = 1;
+ {$EXTERNALSYM RSVP_Err_ADMISSION}
+
+(* Globally-defined sub-codes for : Admission Control failure *)
+
+ RSVP_Erv_Other = 0; (* Unspecified cause *)
+ {$EXTERNALSYM RSVP_Erv_Other}
+ RSVP_Erv_DelayBnd = 1; (* Cannot meet delay bound req *)
+ {$EXTERNALSYM RSVP_Erv_DelayBnd}
+ RSVP_Erv_Bandwidth = 2; (* Insufficient bandwidth *)
+ {$EXTERNALSYM RSVP_Erv_Bandwidth}
+ RSVP_Erv_MTU = 3; (* MTU in flowspec too large *)
+ {$EXTERNALSYM RSVP_Erv_MTU}
+
+// Microsoft specific error values
+
+ RSVP_Erv_Flow_Rate = $8001;
+ {$EXTERNALSYM RSVP_Erv_Flow_Rate}
+ RSVP_Erv_Bucket_szie = $8002;
+ {$EXTERNALSYM RSVP_Erv_Bucket_szie}
+ RSVP_Erv_Peak_Rate = $8003;
+ {$EXTERNALSYM RSVP_Erv_Peak_Rate}
+ RSVP_Erv_Min_Policied_size = $8004;
+ {$EXTERNALSYM RSVP_Erv_Min_Policied_size}
+
+(* Policy control failure *)
+
+ RSVP_Err_POLICY = 2;
+ {$EXTERNALSYM RSVP_Err_POLICY}
+
+// Policy error values from Identity draft
+
+ POLICY_ERRV_NO_MORE_INFO = 1;
+ {$EXTERNALSYM POLICY_ERRV_NO_MORE_INFO}
+ POLICY_ERRV_UNSUPPORTED_CREDENTIAL_TYPE = 2;
+ {$EXTERNALSYM POLICY_ERRV_UNSUPPORTED_CREDENTIAL_TYPE}
+ POLICY_ERRV_INSUFFICIENT_PRIVILEGES = 3;
+ {$EXTERNALSYM POLICY_ERRV_INSUFFICIENT_PRIVILEGES}
+ POLICY_ERRV_EXPIRED_CREDENTIALS = 4;
+ {$EXTERNALSYM POLICY_ERRV_EXPIRED_CREDENTIALS}
+ POLICY_ERRV_IDENTITY_CHANGED = 5;
+ {$EXTERNALSYM POLICY_ERRV_IDENTITY_CHANGED}
+
+// Microsoft specific policy error values
+
+ POLICY_ERRV_UNKNOWN = 0;
+ {$EXTERNALSYM POLICY_ERRV_UNKNOWN}
+
+ POLICY_ERRV_GLOBAL_DEF_FLOW_COUNT = 1;
+ {$EXTERNALSYM POLICY_ERRV_GLOBAL_DEF_FLOW_COUNT}
+ POLICY_ERRV_GLOBAL_GRP_FLOW_COUNT = 2;
+ {$EXTERNALSYM POLICY_ERRV_GLOBAL_GRP_FLOW_COUNT}
+ POLICY_ERRV_GLOBAL_USER_FLOW_COUNT = 3;
+ {$EXTERNALSYM POLICY_ERRV_GLOBAL_USER_FLOW_COUNT}
+ POLICY_ERRV_GLOBAL_UNAUTH_USER_FLOW_COUNT = 4;
+ {$EXTERNALSYM POLICY_ERRV_GLOBAL_UNAUTH_USER_FLOW_COUNT}
+ POLICY_ERRV_SUBNET_DEF_FLOW_COUNT = 5;
+ {$EXTERNALSYM POLICY_ERRV_SUBNET_DEF_FLOW_COUNT}
+ POLICY_ERRV_SUBNET_GRP_FLOW_COUNT = 6;
+ {$EXTERNALSYM POLICY_ERRV_SUBNET_GRP_FLOW_COUNT}
+ POLICY_ERRV_SUBNET_USER_FLOW_COUNT = 7;
+ {$EXTERNALSYM POLICY_ERRV_SUBNET_USER_FLOW_COUNT}
+ POLICY_ERRV_SUBNET_UNAUTH_USER_FLOW_COUNT = 8;
+ {$EXTERNALSYM POLICY_ERRV_SUBNET_UNAUTH_USER_FLOW_COUNT}
+
+ POLICY_ERRV_GLOBAL_DEF_FLOW_DURATION = 9;
+ {$EXTERNALSYM POLICY_ERRV_GLOBAL_DEF_FLOW_DURATION}
+ POLICY_ERRV_GLOBAL_GRP_FLOW_DURATION = 10;
+ {$EXTERNALSYM POLICY_ERRV_GLOBAL_GRP_FLOW_DURATION}
+ POLICY_ERRV_GLOBAL_USER_FLOW_DURATION = 11;
+ {$EXTERNALSYM POLICY_ERRV_GLOBAL_USER_FLOW_DURATION}
+ POLICY_ERRV_GLOBAL_UNAUTH_USER_FLOW_DURATION = 12;
+ {$EXTERNALSYM POLICY_ERRV_GLOBAL_UNAUTH_USER_FLOW_DURATION}
+ POLICY_ERRV_SUBNET_DEF_FLOW_DURATION = 13;
+ {$EXTERNALSYM POLICY_ERRV_SUBNET_DEF_FLOW_DURATION}
+ POLICY_ERRV_SUBNET_GRP_FLOW_DURATION = 14;
+ {$EXTERNALSYM POLICY_ERRV_SUBNET_GRP_FLOW_DURATION}
+ POLICY_ERRV_SUBNET_USER_FLOW_DURATION = 15;
+ {$EXTERNALSYM POLICY_ERRV_SUBNET_USER_FLOW_DURATION}
+ POLICY_ERRV_SUBNET_UNAUTH_USER_FLOW_DURATION = 16;
+ {$EXTERNALSYM POLICY_ERRV_SUBNET_UNAUTH_USER_FLOW_DURATION}
+
+ POLICY_ERRV_GLOBAL_DEF_FLOW_RATE = 17;
+ {$EXTERNALSYM POLICY_ERRV_GLOBAL_DEF_FLOW_RATE}
+ POLICY_ERRV_GLOBAL_GRP_FLOW_RATE = 18;
+ {$EXTERNALSYM POLICY_ERRV_GLOBAL_GRP_FLOW_RATE}
+ POLICY_ERRV_GLOBAL_USER_FLOW_RATE = 19;
+ {$EXTERNALSYM POLICY_ERRV_GLOBAL_USER_FLOW_RATE}
+ POLICY_ERRV_GLOBAL_UNAUTH_USER_FLOW_RATE = 20;
+ {$EXTERNALSYM POLICY_ERRV_GLOBAL_UNAUTH_USER_FLOW_RATE}
+ POLICY_ERRV_SUBNET_DEF_FLOW_RATE = 21;
+ {$EXTERNALSYM POLICY_ERRV_SUBNET_DEF_FLOW_RATE}
+ POLICY_ERRV_SUBNET_GRP_FLOW_RATE = 22;
+ {$EXTERNALSYM POLICY_ERRV_SUBNET_GRP_FLOW_RATE}
+ POLICY_ERRV_SUBNET_USER_FLOW_RATE = 23;
+ {$EXTERNALSYM POLICY_ERRV_SUBNET_USER_FLOW_RATE}
+ POLICY_ERRV_SUBNET_UNAUTH_USER_FLOW_RATE = 24;
+ {$EXTERNALSYM POLICY_ERRV_SUBNET_UNAUTH_USER_FLOW_RATE}
+
+ POLICY_ERRV_GLOBAL_DEF_PEAK_RATE = 25;
+ {$EXTERNALSYM POLICY_ERRV_GLOBAL_DEF_PEAK_RATE}
+ POLICY_ERRV_GLOBAL_GRP_PEAK_RATE = 26;
+ {$EXTERNALSYM POLICY_ERRV_GLOBAL_GRP_PEAK_RATE}
+ POLICY_ERRV_GLOBAL_USER_PEAK_RATE = 27;
+ {$EXTERNALSYM POLICY_ERRV_GLOBAL_USER_PEAK_RATE}
+ POLICY_ERRV_GLOBAL_UNAUTH_USER_PEAK_RATE = 28;
+ {$EXTERNALSYM POLICY_ERRV_GLOBAL_UNAUTH_USER_PEAK_RATE}
+ POLICY_ERRV_SUBNET_DEF_PEAK_RATE = 29;
+ {$EXTERNALSYM POLICY_ERRV_SUBNET_DEF_PEAK_RATE}
+ POLICY_ERRV_SUBNET_GRP_PEAK_RATE = 30;
+ {$EXTERNALSYM POLICY_ERRV_SUBNET_GRP_PEAK_RATE}
+ POLICY_ERRV_SUBNET_USER_PEAK_RATE = 31;
+ {$EXTERNALSYM POLICY_ERRV_SUBNET_USER_PEAK_RATE}
+ POLICY_ERRV_SUBNET_UNAUTH_USER_PEAK_RATE = 32;
+ {$EXTERNALSYM POLICY_ERRV_SUBNET_UNAUTH_USER_PEAK_RATE}
+
+ POLICY_ERRV_GLOBAL_DEF_SUM_FLOW_RATE = 33;
+ {$EXTERNALSYM POLICY_ERRV_GLOBAL_DEF_SUM_FLOW_RATE}
+ POLICY_ERRV_GLOBAL_GRP_SUM_FLOW_RATE = 34;
+ {$EXTERNALSYM POLICY_ERRV_GLOBAL_GRP_SUM_FLOW_RATE}
+ POLICY_ERRV_GLOBAL_USER_SUM_FLOW_RATE = 35;
+ {$EXTERNALSYM POLICY_ERRV_GLOBAL_USER_SUM_FLOW_RATE}
+ POLICY_ERRV_GLOBAL_UNAUTH_USER_SUM_FLOW_RATE = 36;
+ {$EXTERNALSYM POLICY_ERRV_GLOBAL_UNAUTH_USER_SUM_FLOW_RATE}
+ POLICY_ERRV_SUBNET_DEF_SUM_FLOW_RATE = 37;
+ {$EXTERNALSYM POLICY_ERRV_SUBNET_DEF_SUM_FLOW_RATE}
+ POLICY_ERRV_SUBNET_GRP_SUM_FLOW_RATE = 38;
+ {$EXTERNALSYM POLICY_ERRV_SUBNET_GRP_SUM_FLOW_RATE}
+ POLICY_ERRV_SUBNET_USER_SUM_FLOW_RATE = 39;
+ {$EXTERNALSYM POLICY_ERRV_SUBNET_USER_SUM_FLOW_RATE}
+ POLICY_ERRV_SUBNET_UNAUTH_USER_SUM_FLOW_RATE = 40;
+ {$EXTERNALSYM POLICY_ERRV_SUBNET_UNAUTH_USER_SUM_FLOW_RATE}
+
+ POLICY_ERRV_GLOBAL_DEF_SUM_PEAK_RATE = 41;
+ {$EXTERNALSYM POLICY_ERRV_GLOBAL_DEF_SUM_PEAK_RATE}
+ POLICY_ERRV_GLOBAL_GRP_SUM_PEAK_RATE = 42;
+ {$EXTERNALSYM POLICY_ERRV_GLOBAL_GRP_SUM_PEAK_RATE}
+ POLICY_ERRV_GLOBAL_USER_SUM_PEAK_RATE = 43;
+ {$EXTERNALSYM POLICY_ERRV_GLOBAL_USER_SUM_PEAK_RATE}
+ POLICY_ERRV_GLOBAL_UNAUTH_USER_SUM_PEAK_RATE = 44;
+ {$EXTERNALSYM POLICY_ERRV_GLOBAL_UNAUTH_USER_SUM_PEAK_RATE}
+ POLICY_ERRV_SUBNET_DEF_SUM_PEAK_RATE = 45;
+ {$EXTERNALSYM POLICY_ERRV_SUBNET_DEF_SUM_PEAK_RATE}
+ POLICY_ERRV_SUBNET_GRP_SUM_PEAK_RATE = 46;
+ {$EXTERNALSYM POLICY_ERRV_SUBNET_GRP_SUM_PEAK_RATE}
+ POLICY_ERRV_SUBNET_USER_SUM_PEAK_RATE = 47;
+ {$EXTERNALSYM POLICY_ERRV_SUBNET_USER_SUM_PEAK_RATE}
+ POLICY_ERRV_SUBNET_UNAUTH_USER_SUM_PEAK_RATE = 48;
+ {$EXTERNALSYM POLICY_ERRV_SUBNET_UNAUTH_USER_SUM_PEAK_RATE}
+
+ POLICY_ERRV_UNKNOWN_USER = 49;
+ {$EXTERNALSYM POLICY_ERRV_UNKNOWN_USER}
+ POLICY_ERRV_NO_PRIVILEGES = 50;
+ {$EXTERNALSYM POLICY_ERRV_NO_PRIVILEGES}
+ POLICY_ERRV_EXPIRED_USER_TOKEN = 51;
+ {$EXTERNALSYM POLICY_ERRV_EXPIRED_USER_TOKEN}
+ POLICY_ERRV_NO_RESOURCES = 52;
+ {$EXTERNALSYM POLICY_ERRV_NO_RESOURCES}
+ POLICY_ERRV_PRE_EMPTED = 53;
+ {$EXTERNALSYM POLICY_ERRV_PRE_EMPTED}
+ POLICY_ERRV_USER_CHANGED = 54;
+ {$EXTERNALSYM POLICY_ERRV_USER_CHANGED}
+ POLICY_ERRV_NO_ACCEPTS = 55;
+ {$EXTERNALSYM POLICY_ERRV_NO_ACCEPTS}
+ POLICY_ERRV_NO_MEMORY = 56;
+ {$EXTERNALSYM POLICY_ERRV_NO_MEMORY}
+ POLICY_ERRV_CRAZY_FLOWSPEC = 57;
+ {$EXTERNALSYM POLICY_ERRV_CRAZY_FLOWSPEC}
+
+// Other RSVP defined Error codes
+
+ RSVP_Err_NO_PATH = 3; (* No path state for Resv *)
+ {$EXTERNALSYM RSVP_Err_NO_PATH}
+ RSVP_Err_NO_SENDER = 4; (* No sender info for Resv *)
+ {$EXTERNALSYM RSVP_Err_NO_SENDER}
+ RSVP_Err_BAD_STYLE = 5; (* Conflicting style *)
+ {$EXTERNALSYM RSVP_Err_BAD_STYLE}
+ RSVP_Err_UNKNOWN_STYLE = 6; (* Unknown reservation style *)
+ {$EXTERNALSYM RSVP_Err_UNKNOWN_STYLE}
+ RSVP_Err_BAD_DSTPORT = 7; (* Conflicting DstPort in Sess *)
+ {$EXTERNALSYM RSVP_Err_BAD_DSTPORT}
+ RSVP_Err_BAD_SNDPORT = 8; (* Conflicting Sender port *)
+ {$EXTERNALSYM RSVP_Err_BAD_SNDPORT}
+ RSVP_Err_AMBIG_FILTER = 9; (* Ambiguous Filter spec in Resv*)
+ {$EXTERNALSYM RSVP_Err_AMBIG_FILTER}
+
+ RSVP_Err_PREEMPTED = 12; (* Service Preempted *)
+ {$EXTERNALSYM RSVP_Err_PREEMPTED}
+
+(* Unknown object Class-Num *)
+
+ RSVP_Err_UNKN_OBJ_CLASS = 13;
+ {$EXTERNALSYM RSVP_Err_UNKN_OBJ_CLASS}
+
+(* ErrVal = Class_num, CType *)
+
+ (* Unknown object C-Type *)
+
+ RSVP_Err_UNKNOWN_CTYPE = 14;
+ {$EXTERNALSYM RSVP_Err_UNKNOWN_CTYPE}
+
+(* ErrVal = Class_num, CType *)
+
+ RSVP_Err_API_ERROR = 20; (* API client error *)
+ {$EXTERNALSYM RSVP_Err_API_ERROR}
+
+(* ErrVal = API error code *)
+
+(* Traffic Control error *)
+
+ RSVP_Err_TC_ERROR = 21;
+ {$EXTERNALSYM RSVP_Err_TC_ERROR}
+
+(* Globally-defined sub-codes for : Traffic Control errors *)
+
+ RSVP_Erv_Conflict_Serv = 01; (* Service Conflict *)
+ {$EXTERNALSYM RSVP_Erv_Conflict_Serv}
+ RSVP_Erv_No_Serv = 02; (* Unknown Service *)
+ {$EXTERNALSYM RSVP_Erv_No_Serv}
+ RSVP_Erv_Crazy_Flowspec = 03; (* Unreasonable Flowspec *)
+ {$EXTERNALSYM RSVP_Erv_Crazy_Flowspec}
+ RSVP_Erv_Crazy_Tspec = 04; (* Unreasonable Tspec *)
+ {$EXTERNALSYM RSVP_Erv_Crazy_Tspec}
+
+ RSVP_Err_TC_SYS_ERROR = 22; (* Traffic control system error *)
+ {$EXTERNALSYM RSVP_Err_TC_SYS_ERROR}
+
+(* ErrVal = kernel error code *)
+
+(* RSVP System error *)
+
+ RSVP_Err_RSVP_SYS_ERROR = 23;
+ {$EXTERNALSYM RSVP_Err_RSVP_SYS_ERROR}
+
+(* Globally-defined sub-codes for : RSVP system errors *)
+
+ RSVP_Erv_MEMORY = 1; (* Out of memory *)
+ {$EXTERNALSYM RSVP_Erv_MEMORY}
+ RSVP_Erv_API = 2; (* API logic error *)
+ {$EXTERNALSYM RSVP_Erv_API}
+
+// Identity Policy elements related defines
+
+// Reseved Identity PE types
+
+ LPM_PE_USER_IDENTITY = 2;
+ {$EXTERNALSYM LPM_PE_USER_IDENTITY}
+ LPM_PE_APP_IDENTITY = 3;
+ {$EXTERNALSYM LPM_PE_APP_IDENTITY}
+
+// Defines for Identity error values
+
+ ERROR_NO_MORE_INFO = 1;
+ {$EXTERNALSYM ERROR_NO_MORE_INFO}
+ UNSUPPORTED_CREDENTIAL_TYPE = 2;
+ {$EXTERNALSYM UNSUPPORTED_CREDENTIAL_TYPE}
+ INSUFFICIENT_PRIVILEGES = 3;
+ {$EXTERNALSYM INSUFFICIENT_PRIVILEGES}
+ EXPIRED_CREDENTIAL = 4;
+ {$EXTERNALSYM EXPIRED_CREDENTIAL}
+ IDENTITY_CHANGED = 5;
+ {$EXTERNALSYM IDENTITY_CHANGED}
+
+type
+ ID_ERROR_OBJECT = record
+ usIdErrLength: USHORT;
+ ucAType: UCHAR;
+ ucSubType: UCHAR;
+ usReserved: USHORT;
+ usIdErrorValue: USHORT;
+ ucIdErrData: array [0..3] of UCHAR;
+ end;
+ {$EXTERNALSYM ID_ERROR_OBJECT}
+ TIdErrorObject = ID_ERROR_OBJECT;
+ PIdErrorObject = ^ID_ERROR_OBJECT;
+
+const
+ ID_ERR_OBJ_HDR_LEN = SizeOf(ID_ERROR_OBJECT) - 4 * SizeOf(UCHAR);
+ {$EXTERNALSYM ID_ERR_OBJ_HDR_LEN}
+
+(*
+
+ LPM API specific definitions
+
+*)
+
+(**************************************
+
+ LPM_Initialize
+
+***************************************)
+
+type
+ LPM_HANDLE = HANDLE;
+ {$EXTERNALSYM LPM_HANDLE}
+
+ RHANDLE = HANDLE;
+ {$EXTERNALSYM RHANDLE}
+
+ LPV = ULONG;
+ {$EXTERNALSYM LPV}
+
+ PETYPE = USHORT;
+ {$EXTERNALSYM PETYPE}
+
+const
+ LPM_OK = 0;
+ {$EXTERNALSYM LPM_OK}
+
+type
+ MSG_TYPE = Integer;
+ {$EXTERNALSYM MSG_TYPE}
+ TMsgType = MSG_TYPE;
+
+ rsvpmsgobjs = record
+ RsvpMsgType: TMsgType;
+ pRsvpSession: PRsvpSession;
+ pRsvpFromHop: PRsvpHop;
+ pRsvpToHop: PRsvpHop;
+ pResvStyle: PResvStyle;
+ pRsvpScope: PRsvpScope;
+ FlowDescCount: Integer;
+ pFlowDescs: PFlowDesc;
+ PdObjectCount: Integer;
+ ppPdObjects: ^PPolicyData;
+ pErrorSpec: PErrorSpec;
+ pAdspec: PADSpec;
+ end;
+ {$EXTERNALSYM rsvpmsgobjs}
+ RSVP_MSG_OBJS = rsvpmsgobjs;
+ {$EXTERNALSYM RSVP_MSG_OBJS}
+ TRsvpMsgObjs = RSVP_MSG_OBJS;
+ PRsvpMsgObjs = ^RSVP_MSG_OBJS;
+
+ PALLOCMEM = function(Size: DWORD): Pointer; stdcall;
+ {$EXTERNALSYM PALLOCMEM}
+ TAllocMem = PALLOCMEM;
+
+ PFREEMEM = procedure(pv: Pointer); stdcall;
+ {$EXTERNALSYM PFREEMEM}
+ TFreeMem = PFREEMEM;
+
+ policy_decision = record
+ lpvResult: LPV; // Use the LPV values from above
+ wPolicyErrCode: WORD; // RSVP defined error codes
+ wPolicyErrValue: WORD; // RSVP defined error values
+ end;
+ {$EXTERNALSYM policy_decision}
+ TPolicyDecision = policy_decision;
+ PPolicyDecision = ^policy_decision;
+
+ CBADMITRESULT = function(LpmHandle: LPM_HANDLE; RequestHandle: RHANDLE;
+ ulPcmActionFlags: ULONG; LpmError: Integer; PolicyDecisionsCount: Integer;
+ pPolicyDecisions: PPolicyDecision): ULONG; stdcall;
+ {$EXTERNALSYM CBADMITRESULT}
+ TCbAdmitResult = CBADMITRESULT;
+
+ CBGETRSVPOBJECTS = function(LpmHandle: LPM_HANDLE; RequestHandle: RHANDLE;
+ LpmError: Integer; RsvpObjectsCount: Integer; ppRsvpObjects: PPRsvpObjHdr): ULONG; stdcall;
+ {$EXTERNALSYM CBGETRSVPOBJECTS}
+ TCbGetRsvpObjects = CBGETRSVPOBJECTS;
+
+// The above 2 call backs can return the following errors
+
+const
+ INV_LPM_HANDLE = 1; // Supplied LpmHandle is invalid
+ {$EXTERNALSYM INV_LPM_HANDLE}
+ LPM_TIME_OUT = 2; // LPM has returned results after the time limit
+ {$EXTERNALSYM LPM_TIME_OUT}
+ INV_REQ_HANDLE = 3; // Supplied Request handle is invalid
+ {$EXTERNALSYM INV_REQ_HANDLE}
+ DUP_RESULTS = 4; // LPM has already returned results for this request
+ {$EXTERNALSYM DUP_RESULTS}
+ INV_RESULTS = 5; // Results supplied are invalid
+ {$EXTERNALSYM INV_RESULTS}
+
+type
+ lpminitinfo = record
+ PcmVersionNumber: DWORD;
+ ResultTimeLimit: DWORD;
+ ConfiguredLpmCount: Integer;
+ AllocMemory: PALLOCMEM;
+ FreeMemory: PFREEMEM;
+ PcmAdmitResultCallback: CBADMITRESULT;
+ GetRsvpObjectsCallback: CBGETRSVPOBJECTS;
+ end;
+ {$EXTERNALSYM lpminitinfo}
+ LPM_INIT_INFO = lpminitinfo;
+ {$EXTERNALSYM LPM_INIT_INFO}
+ TLpmInitInfo = LPM_INIT_INFO;
+ PLpmInitInfo = ^LPM_INIT_INFO;
+
+// Valid PE types
+// XXX ISSUE - Is 0xFFFF a better choice?
+
+const
+ LPM_PE_ALL_TYPES = 0;
+ {$EXTERNALSYM LPM_PE_ALL_TYPES}
+
+// Current LPM API version number
+
+ LPM_API_VERSION_1 = 1;
+ {$EXTERNALSYM LPM_API_VERSION_1}
+
+// Current PCM version number
+
+ PCM_VERSION_1 = 1;
+ {$EXTERNALSYM PCM_VERSION_1}
+
+function LPM_Initialize(LpmHandle: LPM_HANDLE; const pLpmInitInfo: LPM_INIT_INFO;
+ var pLpmVersionNumber: DWORD; var pSupportedPeType: PETYPE; Reserved: Pointer): ULONG; stdcall;
+{$EXTERNALSYM LPM_Initialize}
+
+(**************************************
+
+ LPM_Deinitialize
+
+***************************************)
+
+function LPM_Deinitialize(LpmHandle: LPM_HANDLE): ULONG; stdcall;
+{$EXTERNALSYM LPM_Deinitialize}
+
+(**************************************
+
+ LPM_AdmitRsvpMsg
+
+***************************************)
+
+// Valid LPV - LPM Priority Values
+
+const
+ LPV_RESERVED = 0;
+ {$EXTERNALSYM LPV_RESERVED}
+ LPV_MIN_PRIORITY = 1;
+ {$EXTERNALSYM LPV_MIN_PRIORITY}
+ LPV_MAX_PRIORITY = $FF00;
+ {$EXTERNALSYM LPV_MAX_PRIORITY}
+ LPV_DROP_MSG = $FFFD;
+ {$EXTERNALSYM LPV_DROP_MSG}
+ LPV_DONT_CARE = $FFFE;
+ {$EXTERNALSYM LPV_DONT_CARE}
+ LPV_REJECT = $FFFF;
+ {$EXTERNALSYM LPV_REJECT}
+
+// Valid values for PcmActionFlags
+
+ FORCE_IMMEDIATE_REFRESH = 1;
+ {$EXTERNALSYM FORCE_IMMEDIATE_REFRESH}
+
+// Function return values for LPM_AdmitResvMsg
+
+ LPM_RESULT_READY = 0;
+ {$EXTERNALSYM LPM_RESULT_READY}
+ LPM_RESULT_DEFER = 1;
+ {$EXTERNALSYM LPM_RESULT_DEFER}
+
+function LPM_AdmitRsvpMsg(PcmReqHandle: RHANDLE; const pRecvdIntf: RSVP_HOP;
+ const pRsvpMsgObjs: RSVP_MSG_OBJS; RcvdRsvpMsgLength: Integer; RcvdRsvpMsg: PUCHAR;
+ var pulPcmActionFlags: ULONG; pPolicyDecisions: PPolicyDecision; Reserved: Pointer): ULONG; stdcall;
+{$EXTERNALSYM LPM_AdmitRsvpMsg}
+
+(**************************************
+
+ LPM_GetRsvpObjects
+
+***************************************)
+
+// Function return values are defined in LPM_AdmitResvMsg section
+
+function LPM_GetRsvpObjects(PcmReqHandle: RHANDLE; MaxPdSize: ULONG;
+ SendingIntfAddr: PRsvpHop; pRsvpMsgObjs: PRsvpMsgObjs; var pRsvpObjectsCount: Integer;
+ var pppRsvpObjects: PRsvpObjHdr; Reserved: Pointer): ULONG; stdcall;
+{$EXTERNALSYM LPM_GetRsvpObjects}
+
+(**************************************
+
+ LPM_DeleteState
+
+***************************************)
+
+// TearDown reasons
+
+const
+ RCVD_PATH_TEAR = 1;
+ {$EXTERNALSYM RCVD_PATH_TEAR}
+ RCVD_RESV_TEAR = 2;
+ {$EXTERNALSYM RCVD_RESV_TEAR}
+ ADM_CTRL_FAILED = 3;
+ {$EXTERNALSYM ADM_CTRL_FAILED}
+ STATE_TIMEOUT = 4;
+ {$EXTERNALSYM STATE_TIMEOUT}
+ FLOW_DURATION = 5;
+ {$EXTERNALSYM FLOW_DURATION}
+
+procedure LPM_DeleteState(pRcvdIfAddr: PRsvpHop; RsvpMsgType: TMsgType;
+ pRsvpSession: PRsvpSession; pRsvpFromHop: PRsvpHop; pResvStyle: PResvStyle;
+ FilterSpecCount: Integer; ppFilterSpecList: PFilterSpec; TearDownReason: Integer); stdcall;
+{$EXTERNALSYM LPM_DeleteState}
+
+(**************************************
+
+ LPM_IpAddrTable
+
+***************************************)
+
+type
+ lpmiptable = record
+ ulIfIndex: ULONG; // SNMP index for this interface
+ MediaType: ULONG; // As defined in IPIFCONS.H
+ IfIpAddr: IN_ADDR; // Interface IP address
+ IfNetMask: IN_ADDR; // Interface subnet mask
+ end;
+ {$EXTERNALSYM lpmiptable}
+ TLpmIpTable = lpmiptable;
+ PLpmIpTable = ^lpmiptable;
+
+function LPM_IpAddressTable(cIpAddrTable: ULONG; pIpAddrTable: PLpmIpTable): BOOL; stdcall;
+{$EXTERNALSYM LPM_IpAddressTable}
+
+(**************************************
+
+ LPM_CommitResv
+
+***************************************)
+
+// CommitDecision values
+
+const
+ RESOURCES_ALLOCATED = 1;
+ {$EXTERNALSYM RESOURCES_ALLOCATED}
+ RESOURCES_MODIFIED = 2;
+ {$EXTERNALSYM RESOURCES_MODIFIED}
+
+procedure LPM_CommitResv(RsvpSession: PRsvpSession; FlowInstalledIntf: PRsvpHop;
+ RsvpStyle: PResvStyle; FilterSpecCount: Integer; ppFilterSpecList: PFilterSpec;
+ pMergedFlowSpec: PIsFlowSpec; CommitDecision: ULONG); stdcall;
+{$EXTERNALSYM LPM_CommitResv}
+
+implementation
+
+const
+ lpmlib = 'msidlpm.dll';
+
+function ObjLength(const x: TRsvpObjHdr): USHORT;
+begin
+ Result := x.obj_length;
+end;
+
+function ObjCType(const x: TRsvpObjHdr): UCHAR;
+begin
+ Result := x.obj_ctype;
+end;
+
+function ObjClass(const x: TRsvpObjHdr): UCHAR;
+begin
+ Result := x.obj_class;
+end;
+
+function ObjData(const x: TRsvpObjHdr): Pointer;
+begin
+ Result := Pointer(Integer(@x) + SizeOf(x));
+end;
+
+function Style_is_Wildcard(p: DWORD): Boolean;
+begin
+ Result := (p and Opt_SndSel_mask) = Opt_Wildcard;
+end;
+
+function Style_is_Shared(p: DWORD): Boolean;
+begin
+ Result := (p and Opt_Share_mask) = Opt_Shared;
+end;
+
+function Error_Usage(x: DWORD): DWORD;
+begin
+ Result := (x shr 12) and 3;
+end;
+
+function Intserv_Version(x: DWORD): DWORD;
+begin
+ Result := (x and INTSERV_VERS_MASK) shr 4;
+end;
+
+function Intserv_Version_OK(const x: TIntServMainHdr): Boolean;
+begin
+ Result := (x.ismh_version and INTSERV_VERS_MASK) = INTSERV_VERSION0;
+end;
+
+function Intserv_Obj_size(const x: TIntServMainHdr): DWORD;
+begin
+ Result := x.ismh_len32b * 4 + SizeOf(IntServMainHdr) + SizeOf(RsvpObjHdr);
+end;
+
+function Issh_len32b(const p: TIntServServiceHdr): USHORT;
+begin
+ Result := p.issh_len32b;
+end;
+
+{$IFDEF DYNAMIC_LINK}
+
+var
+ _LPM_Initialize: Pointer;
+
+function LPM_Initialize;
+begin
+ GetProcedureAddress(_LPM_Initialize, lpmlib, 'LPM_Initialize');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_LPM_Initialize]
+ end;
+end;
+
+var
+ _LPM_Deinitialize: Pointer;
+
+function LPM_Deinitialize;
+begin
+ GetProcedureAddress(_LPM_Deinitialize, lpmlib, 'LPM_Deinitialize');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_LPM_Deinitialize]
+ end;
+end;
+
+var
+ _LPM_AdmitRsvpMsg: Pointer;
+
+function LPM_AdmitRsvpMsg;
+begin
+ GetProcedureAddress(_LPM_AdmitRsvpMsg, lpmlib, 'LPM_AdmitRsvpMsg');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_LPM_AdmitRsvpMsg]
+ end;
+end;
+
+var
+ _LPM_GetRsvpObjects: Pointer;
+
+function LPM_GetRsvpObjects;
+begin
+ GetProcedureAddress(_LPM_GetRsvpObjects, lpmlib, 'LPM_GetRsvpObjects');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_LPM_GetRsvpObjects]
+ end;
+end;
+
+var
+ _LPM_DeleteState: Pointer;
+
+procedure LPM_DeleteState;
+begin
+ GetProcedureAddress(_LPM_DeleteState, lpmlib, 'LPM_DeleteState');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_LPM_DeleteState]
+ end;
+end;
+
+var
+ _LPM_IpAddressTable: Pointer;
+
+function LPM_IpAddressTable;
+begin
+ GetProcedureAddress(_LPM_IpAddressTable, lpmlib, 'LPM_IpAddressTable');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_LPM_IpAddressTable]
+ end;
+end;
+
+var
+ _LPM_CommitResv: Pointer;
+
+procedure LPM_CommitResv;
+begin
+ GetProcedureAddress(_LPM_CommitResv, lpmlib, 'LPM_CommitResv');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_LPM_CommitResv]
+ end;
+end;
+
+{$ELSE}
+
+function LPM_Initialize; external lpmlib name 'LPM_Initialize';
+function LPM_Deinitialize; external lpmlib name 'LPM_Deinitialize';
+function LPM_AdmitRsvpMsg; external lpmlib name 'LPM_AdmitRsvpMsg';
+function LPM_GetRsvpObjects; external lpmlib name 'LPM_GetRsvpObjects';
+procedure LPM_DeleteState; external lpmlib name 'LPM_DeleteState';
+function LPM_IpAddressTable; external lpmlib name 'LPM_IpAddressTable';
+procedure LPM_CommitResv; external lpmlib name 'LPM_CommitResv';
+
+{$ENDIF DYNAMIC_LINK}
+
+end.
diff --git a/packages/extra/winunits/jwamciavi.pas b/packages/extra/winunits/jwamciavi.pas
index fc83fd6dc4..0d7f896db4 100644
--- a/packages/extra/winunits/jwamciavi.pas
+++ b/packages/extra/winunits/jwamciavi.pas
@@ -1,150 +1,150 @@
-{******************************************************************************}
-{ }
-{ Multimedia Systems Media Control API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: MciAvi.h, released June 2000. The original Pascal }
-{ code is: MciAvi.pas, released December 2000. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwamciavi.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaMciAvi;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "MciAvi.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-(*
-** These three flags apply to the 'play' command:
-** play <alias> window Play in normal window
-** play <alias> fullscreen Play in 320x240 full-screen mode
-** play <alias> fullscreen by 2 Play fullscreen, zoomed by 2
-*)
-
-const
- MCI_MCIAVI_PLAY_WINDOW = $01000000;
- {$EXTERNALSYM MCI_MCIAVI_PLAY_WINDOW}
- MCI_MCIAVI_PLAY_FULLSCREEN = $02000000;
- {$EXTERNALSYM MCI_MCIAVI_PLAY_FULLSCREEN}
- MCI_MCIAVI_PLAY_FULLBY2 = $04000000;
- {$EXTERNALSYM MCI_MCIAVI_PLAY_FULLBY2}
-
-(*
-** Debugging constants for AVI diagnostics
-*)
-
-(*
-** Returns number of frames not drawn during last play. If this number
-** is more than a small fraction of the number of frames that should have
-** been displayed, things aren't looking good.
-*)
-
- MCI_AVI_STATUS_FRAMES_SKIPPED = $8001;
- {$EXTERNALSYM MCI_AVI_STATUS_FRAMES_SKIPPED}
-
-(*
-** Returns a number representing how well the last AVI play worked.
-** A result of 1000 indicates that the AVI sequence took the amount
-** of time to play that it should have; a result of 2000, for instance,
-** would indicate that a 5-second AVI sequence took 10 seconds to play,
-** implying that the audio and video were badly broken up.
-*)
-
- MCI_AVI_STATUS_LAST_PLAY_SPEED = $8002;
- {$EXTERNALSYM MCI_AVI_STATUS_LAST_PLAY_SPEED}
-
-(*
-** Returns the number of times that the audio definitely broke up.
-** (We count one for every time we're about to write some audio data
-** to the driver, and we notice that it's already played all of the
-** data we have.
-*)
-
- MCI_AVI_STATUS_AUDIO_BREAKS = $8003;
- {$EXTERNALSYM MCI_AVI_STATUS_AUDIO_BREAKS}
-
- MCI_AVI_SETVIDEO_DRAW_PROCEDURE = $8000;
- {$EXTERNALSYM MCI_AVI_SETVIDEO_DRAW_PROCEDURE}
-
- MCI_AVI_SETVIDEO_PALETTE_COLOR = $8100;
- {$EXTERNALSYM MCI_AVI_SETVIDEO_PALETTE_COLOR}
-
-(*
-** This constant specifies that the "halftone" palette should be
-** used, rather than the default palette.
-*)
-
- MCI_AVI_SETVIDEO_PALETTE_HALFTONE = $0000FFFF;
- {$EXTERNALSYM MCI_AVI_SETVIDEO_PALETTE_HALFTONE}
-
-(*
-** Custom error return values
-*)
-
- // TODO FROM MMSystem.h
-
- MCIERR_BASE = 256;
- MCIERR_CUSTOM_DRIVER_BASE = MCIERR_BASE + 256;
-
- MCIERR_AVI_OLDAVIFORMAT = MCIERR_CUSTOM_DRIVER_BASE + 100;
- {$EXTERNALSYM MCIERR_AVI_OLDAVIFORMAT}
- MCIERR_AVI_NOTINTERLEAVED = MCIERR_CUSTOM_DRIVER_BASE + 101;
- {$EXTERNALSYM MCIERR_AVI_NOTINTERLEAVED}
- MCIERR_AVI_NODISPDIB = MCIERR_CUSTOM_DRIVER_BASE + 102;
- {$EXTERNALSYM MCIERR_AVI_NODISPDIB}
- MCIERR_AVI_CANTPLAYFULLSCREEN = MCIERR_CUSTOM_DRIVER_BASE + 103;
- {$EXTERNALSYM MCIERR_AVI_CANTPLAYFULLSCREEN}
- MCIERR_AVI_TOOBIGFORVGA = MCIERR_CUSTOM_DRIVER_BASE + 104;
- {$EXTERNALSYM MCIERR_AVI_TOOBIGFORVGA}
- MCIERR_AVI_NOCOMPRESSOR = MCIERR_CUSTOM_DRIVER_BASE + 105;
- {$EXTERNALSYM MCIERR_AVI_NOCOMPRESSOR}
- MCIERR_AVI_DISPLAYERROR = MCIERR_CUSTOM_DRIVER_BASE + 106;
- {$EXTERNALSYM MCIERR_AVI_DISPLAYERROR}
- MCIERR_AVI_AUDIOERROR = MCIERR_CUSTOM_DRIVER_BASE + 107;
- {$EXTERNALSYM MCIERR_AVI_AUDIOERROR}
- MCIERR_AVI_BADPALETTE = MCIERR_CUSTOM_DRIVER_BASE + 108;
- {$EXTERNALSYM MCIERR_AVI_BADPALETTE}
-
-implementation
-
-end.
+{******************************************************************************}
+{ }
+{ Multimedia Systems Media Control API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: MciAvi.h, released June 2000. The original Pascal }
+{ code is: MciAvi.pas, released December 2000. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwamciavi.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaMciAvi;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "MciAvi.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+(*
+** These three flags apply to the 'play' command:
+** play <alias> window Play in normal window
+** play <alias> fullscreen Play in 320x240 full-screen mode
+** play <alias> fullscreen by 2 Play fullscreen, zoomed by 2
+*)
+
+const
+ MCI_MCIAVI_PLAY_WINDOW = $01000000;
+ {$EXTERNALSYM MCI_MCIAVI_PLAY_WINDOW}
+ MCI_MCIAVI_PLAY_FULLSCREEN = $02000000;
+ {$EXTERNALSYM MCI_MCIAVI_PLAY_FULLSCREEN}
+ MCI_MCIAVI_PLAY_FULLBY2 = $04000000;
+ {$EXTERNALSYM MCI_MCIAVI_PLAY_FULLBY2}
+
+(*
+** Debugging constants for AVI diagnostics
+*)
+
+(*
+** Returns number of frames not drawn during last play. If this number
+** is more than a small fraction of the number of frames that should have
+** been displayed, things aren't looking good.
+*)
+
+ MCI_AVI_STATUS_FRAMES_SKIPPED = $8001;
+ {$EXTERNALSYM MCI_AVI_STATUS_FRAMES_SKIPPED}
+
+(*
+** Returns a number representing how well the last AVI play worked.
+** A result of 1000 indicates that the AVI sequence took the amount
+** of time to play that it should have; a result of 2000, for instance,
+** would indicate that a 5-second AVI sequence took 10 seconds to play,
+** implying that the audio and video were badly broken up.
+*)
+
+ MCI_AVI_STATUS_LAST_PLAY_SPEED = $8002;
+ {$EXTERNALSYM MCI_AVI_STATUS_LAST_PLAY_SPEED}
+
+(*
+** Returns the number of times that the audio definitely broke up.
+** (We count one for every time we're about to write some audio data
+** to the driver, and we notice that it's already played all of the
+** data we have.
+*)
+
+ MCI_AVI_STATUS_AUDIO_BREAKS = $8003;
+ {$EXTERNALSYM MCI_AVI_STATUS_AUDIO_BREAKS}
+
+ MCI_AVI_SETVIDEO_DRAW_PROCEDURE = $8000;
+ {$EXTERNALSYM MCI_AVI_SETVIDEO_DRAW_PROCEDURE}
+
+ MCI_AVI_SETVIDEO_PALETTE_COLOR = $8100;
+ {$EXTERNALSYM MCI_AVI_SETVIDEO_PALETTE_COLOR}
+
+(*
+** This constant specifies that the "halftone" palette should be
+** used, rather than the default palette.
+*)
+
+ MCI_AVI_SETVIDEO_PALETTE_HALFTONE = $0000FFFF;
+ {$EXTERNALSYM MCI_AVI_SETVIDEO_PALETTE_HALFTONE}
+
+(*
+** Custom error return values
+*)
+
+ // TODO FROM MMSystem.h
+
+ MCIERR_BASE = 256;
+ MCIERR_CUSTOM_DRIVER_BASE = MCIERR_BASE + 256;
+
+ MCIERR_AVI_OLDAVIFORMAT = MCIERR_CUSTOM_DRIVER_BASE + 100;
+ {$EXTERNALSYM MCIERR_AVI_OLDAVIFORMAT}
+ MCIERR_AVI_NOTINTERLEAVED = MCIERR_CUSTOM_DRIVER_BASE + 101;
+ {$EXTERNALSYM MCIERR_AVI_NOTINTERLEAVED}
+ MCIERR_AVI_NODISPDIB = MCIERR_CUSTOM_DRIVER_BASE + 102;
+ {$EXTERNALSYM MCIERR_AVI_NODISPDIB}
+ MCIERR_AVI_CANTPLAYFULLSCREEN = MCIERR_CUSTOM_DRIVER_BASE + 103;
+ {$EXTERNALSYM MCIERR_AVI_CANTPLAYFULLSCREEN}
+ MCIERR_AVI_TOOBIGFORVGA = MCIERR_CUSTOM_DRIVER_BASE + 104;
+ {$EXTERNALSYM MCIERR_AVI_TOOBIGFORVGA}
+ MCIERR_AVI_NOCOMPRESSOR = MCIERR_CUSTOM_DRIVER_BASE + 105;
+ {$EXTERNALSYM MCIERR_AVI_NOCOMPRESSOR}
+ MCIERR_AVI_DISPLAYERROR = MCIERR_CUSTOM_DRIVER_BASE + 106;
+ {$EXTERNALSYM MCIERR_AVI_DISPLAYERROR}
+ MCIERR_AVI_AUDIOERROR = MCIERR_CUSTOM_DRIVER_BASE + 107;
+ {$EXTERNALSYM MCIERR_AVI_AUDIOERROR}
+ MCIERR_AVI_BADPALETTE = MCIERR_CUSTOM_DRIVER_BASE + 108;
+ {$EXTERNALSYM MCIERR_AVI_BADPALETTE}
+
+implementation
+
+end.
diff --git a/packages/extra/winunits/jwamprerror.pas b/packages/extra/winunits/jwamprerror.pas
index f929856fc2..5d10caff87 100644
--- a/packages/extra/winunits/jwamprerror.pas
+++ b/packages/extra/winunits/jwamprerror.pas
@@ -1,455 +1,455 @@
-{******************************************************************************}
-{ }
-{ Management Base Information API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: mprerror.h, released August 2001. The original Pascal }
-{ code is: MprError.pas, released September 2000. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwamprerror.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaMprError;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "mprerror.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-const
- ROUTEBASE = 900;
- {$EXTERNALSYM ROUTEBASE}
- SUCCESS = 0;
- {$EXTERNALSYM SUCCESS}
-
- ERROR_ROUTER_STOPPED = ROUTEBASE + 0;
- {$EXTERNALSYM ERROR_ROUTER_STOPPED}
-
-(*
- * The router is not running.%0
- *)
-
- ERROR_ALREADY_CONNECTED = ROUTEBASE + 1;
- {$EXTERNALSYM ERROR_ALREADY_CONNECTED}
-
-(*
- * The interface is already connected.%0
- *)
-
- ERROR_UNKNOWN_PROTOCOL_ID = ROUTEBASE + 2;
- {$EXTERNALSYM ERROR_UNKNOWN_PROTOCOL_ID}
-
-(*
- * The specified protocol identifier is not known to the router.%0
- *)
-
- ERROR_DDM_NOT_RUNNING = ROUTEBASE + 3;
- {$EXTERNALSYM ERROR_DDM_NOT_RUNNING}
-
-(*
- * The Demand-dial Interface Manager is not running.%0
- *)
-
- ERROR_INTERFACE_ALREADY_EXISTS = ROUTEBASE + 4;
- {$EXTERNALSYM ERROR_INTERFACE_ALREADY_EXISTS}
-
-(*
- * An interface with this name is already registered with the router.%0
- *)
-
- ERROR_NO_SUCH_INTERFACE = ROUTEBASE + 5;
- {$EXTERNALSYM ERROR_NO_SUCH_INTERFACE}
-
-(*
- * An interface with this name is not registered with the router.%0
- *)
-
- ERROR_INTERFACE_NOT_CONNECTED = ROUTEBASE + 6;
- {$EXTERNALSYM ERROR_INTERFACE_NOT_CONNECTED}
-
-(*
- * The interface is not connected.%0
- *)
-
- ERROR_PROTOCOL_STOP_PENDING = ROUTEBASE + 7;
- {$EXTERNALSYM ERROR_PROTOCOL_STOP_PENDING}
-
-(*
- * The specified protocol is stopping.%0
- *)
-
- ERROR_INTERFACE_CONNECTED = ROUTEBASE + 8;
- {$EXTERNALSYM ERROR_INTERFACE_CONNECTED}
-
-(*
- * The interface is connected and hence cannot be deleted.%0
- *)
-
- ERROR_NO_INTERFACE_CREDENTIALS_SET = ROUTEBASE + 9;
- {$EXTERNALSYM ERROR_NO_INTERFACE_CREDENTIALS_SET}
-
-(*
- * The interface credentials have not been set.%0
- *)
-
- ERROR_ALREADY_CONNECTING = ROUTEBASE + 10;
- {$EXTERNALSYM ERROR_ALREADY_CONNECTING}
-
-(*
- * This interface is already in the process of connecting.%0
- *)
-
- ERROR_UPDATE_IN_PROGRESS = ROUTEBASE + 11;
- {$EXTERNALSYM ERROR_UPDATE_IN_PROGRESS}
-
-(*
- * An update of routing information on this interface is already in progress.%0
- *)
-
- ERROR_INTERFACE_CONFIGURATION = ROUTEBASE + 12;
- {$EXTERNALSYM ERROR_INTERFACE_CONFIGURATION}
-
-(*
- * The interface confugration in invalid. There is already another interface that is connected to the same inteface on the remote router.%0
- *)
-
- ERROR_NOT_CLIENT_PORT = ROUTEBASE + 13;
- {$EXTERNALSYM ERROR_NOT_CLIENT_PORT}
-
-(*
- * A Remote Access Client attempted to connect over a port that was reserved for Routers only.%0
- *)
-
- ERROR_NOT_ROUTER_PORT = ROUTEBASE + 14;
- {$EXTERNALSYM ERROR_NOT_ROUTER_PORT}
-
-(*
- * A Demand Dial Router attempted to connect over a port that was reserved for Remote Access Clients only.%0
- *)
-
- ERROR_CLIENT_INTERFACE_ALREADY_EXISTS = ROUTEBASE + 15;
- {$EXTERNALSYM ERROR_CLIENT_INTERFACE_ALREADY_EXISTS}
-
-(*
- * The client interface with this name already exists and is currently connected.%0
- *)
-
- ERROR_INTERFACE_DISABLED = ROUTEBASE + 16;
- {$EXTERNALSYM ERROR_INTERFACE_DISABLED}
-
-(*
- * The interface is in a disabled state.%0
- *)
-
- ERROR_AUTH_PROTOCOL_REJECTED = ROUTEBASE + 17;
- {$EXTERNALSYM ERROR_AUTH_PROTOCOL_REJECTED}
-
-(*
- * The authentication protocol was rejected by the remote peer.%0
- *)
-
- ERROR_NO_AUTH_PROTOCOL_AVAILABLE = ROUTEBASE + 18;
- {$EXTERNALSYM ERROR_NO_AUTH_PROTOCOL_AVAILABLE}
-
-(*
- * There are no authentication protocols available for use.%0
- *)
-
- ERROR_PEER_REFUSED_AUTH = ROUTEBASE + 19;
- {$EXTERNALSYM ERROR_PEER_REFUSED_AUTH}
-
-(*
- * The remote computer refused to be authenticated using the configured authentication protocol. The line has been disconnected.%0
- *)
-
- ERROR_REMOTE_NO_DIALIN_PERMISSION = ROUTEBASE + 20;
- {$EXTERNALSYM ERROR_REMOTE_NO_DIALIN_PERMISSION}
-
-(*
- * The remote account does not have Remote Access permission.%0
- *)
-
- ERROR_REMOTE_PASSWD_EXPIRED = ROUTEBASE + 21;
- {$EXTERNALSYM ERROR_REMOTE_PASSWD_EXPIRED}
-
-(*
- * The remote account has expired.%0
- *)
-
- ERROR_REMOTE_ACCT_DISABLED = ROUTEBASE + 22;
- {$EXTERNALSYM ERROR_REMOTE_ACCT_DISABLED}
-
-(*
- * The remote account is disabled.%0
- *)
-
- ERROR_REMOTE_RESTRICTED_LOGON_HOURS = ROUTEBASE + 23;
- {$EXTERNALSYM ERROR_REMOTE_RESTRICTED_LOGON_HOURS}
-
-(*
- * The remote account is not permitted to logon at this time of day.%0
- *)
-
- ERROR_REMOTE_AUTHENTICATION_FAILURE = ROUTEBASE + 24;
- {$EXTERNALSYM ERROR_REMOTE_AUTHENTICATION_FAILURE}
-
-(*
- * Access was denied to the remote peer because username and/or password is invalid on the domain.%0
- *)
-
- ERROR_INTERFACE_HAS_NO_DEVICES = ROUTEBASE + 25;
- {$EXTERNALSYM ERROR_INTERFACE_HAS_NO_DEVICES}
-
-(*
- * There are no routing enabled ports available for use by this demand dial interface.%0
- *)
-
- ERROR_IDLE_DISCONNECTED = ROUTEBASE + 26;
- {$EXTERNALSYM ERROR_IDLE_DISCONNECTED}
-
-(*
- * The port has been disconnected due to inactivity.%0
- *)
-
- ERROR_INTERFACE_UNREACHABLE = ROUTEBASE + 27;
- {$EXTERNALSYM ERROR_INTERFACE_UNREACHABLE}
-
-(*
- * The interface is not reachable at this time.%0
- *)
-
- ERROR_SERVICE_IS_PAUSED = ROUTEBASE + 28;
- {$EXTERNALSYM ERROR_SERVICE_IS_PAUSED}
-
-(*
- * The Demand Dial service is in a paused state.%0
- *)
-
- ERROR_INTERFACE_DISCONNECTED = ROUTEBASE + 29;
- {$EXTERNALSYM ERROR_INTERFACE_DISCONNECTED}
-
-(*
- * The interface has been disconnected by the administrator.%0
- *)
-
- ERROR_AUTH_SERVER_TIMEOUT = ROUTEBASE + 30;
- {$EXTERNALSYM ERROR_AUTH_SERVER_TIMEOUT}
-
-(*
- * The authentication server did not respond to authentication requests in a timely fashion.%0
- *)
-
- ERROR_PORT_LIMIT_REACHED = ROUTEBASE + 31;
- {$EXTERNALSYM ERROR_PORT_LIMIT_REACHED}
-
-(*
- * The maximum number of ports allowed for use in the multilinked connection has been reached.%0
- *)
-
- ERROR_PPP_SESSION_TIMEOUT = ROUTEBASE + 32;
- {$EXTERNALSYM ERROR_PPP_SESSION_TIMEOUT}
-
-(*
- * The connection time limit for the user has been reached.%0
- *)
-
- ERROR_MAX_LAN_INTERFACE_LIMIT = ROUTEBASE + 33;
- {$EXTERNALSYM ERROR_MAX_LAN_INTERFACE_LIMIT}
-
-(*
- * The maximum limit on the number of LAN interfaces supported has been reached.%0
- *)
-
- ERROR_MAX_WAN_INTERFACE_LIMIT = ROUTEBASE + 34;
- {$EXTERNALSYM ERROR_MAX_WAN_INTERFACE_LIMIT}
-
-(*
- * The maximum limit on the number of Demand Dial interfaces supported has been reached.%0
- *)
-
- ERROR_MAX_CLIENT_INTERFACE_LIMIT = ROUTEBASE + 35;
- {$EXTERNALSYM ERROR_MAX_CLIENT_INTERFACE_LIMIT}
-
-(*
- * The maximum limit on the number of Remote Access clients supported has been reached.%0
- *)
-
- ERROR_BAP_DISCONNECTED = ROUTEBASE + 36;
- {$EXTERNALSYM ERROR_BAP_DISCONNECTED}
-
-(*
- * The port has been disconnected due to the BAP policy.%0
- *)
-
- ERROR_USER_LIMIT = ROUTEBASE + 37;
- {$EXTERNALSYM ERROR_USER_LIMIT}
-
-(*
- * Because another connection of your type is in use, the incoming connection cannot accept your connection request.%0
- *)
-
- ERROR_NO_RADIUS_SERVERS = ROUTEBASE + 38;
- {$EXTERNALSYM ERROR_NO_RADIUS_SERVERS}
-
-(*
- * No RADIUS servers were located on the network.%0
- *)
-
- ERROR_INVALID_RADIUS_RESPONSE = ROUTEBASE + 39;
- {$EXTERNALSYM ERROR_INVALID_RADIUS_RESPONSE}
-
-(*
- * An invalid response was received from the RADIUS authentication server.
- * Make sure that the case sensitive secret pasword for the RADIUS server is set correctly.%0
- *)
-
- ERROR_DIALIN_HOURS_RESTRICTION = ROUTEBASE + 40;
- {$EXTERNALSYM ERROR_DIALIN_HOURS_RESTRICTION}
-
-(*
- * You do not have permission to connect at this time.%0
- *)
-
- ERROR_ALLOWED_PORT_TYPE_RESTRICTION = ROUTEBASE + 41;
- {$EXTERNALSYM ERROR_ALLOWED_PORT_TYPE_RESTRICTION}
-
-(*
- * You do not have permission to connect using the current device type.%0
- *)
-
- ERROR_AUTH_PROTOCOL_RESTRICTION = ROUTEBASE + 42;
- {$EXTERNALSYM ERROR_AUTH_PROTOCOL_RESTRICTION}
-
-(*
- * You do not have permission to connect using the selected authentication protocol.%0
- *)
-
- ERROR_BAP_REQUIRED = ROUTEBASE + 43;
- {$EXTERNALSYM ERROR_BAP_REQUIRED}
-
-(*
- * BAP is required for this user.%0
- *)
-
- ERROR_DIALOUT_HOURS_RESTRICTION = ROUTEBASE + 44;
- {$EXTERNALSYM ERROR_DIALOUT_HOURS_RESTRICTION}
-
-(*
- * The interface is not allowed to connect at this time.%0
- *)
-
- ERROR_ROUTER_CONFIG_INCOMPATIBLE = ROUTEBASE + 45;
- {$EXTERNALSYM ERROR_ROUTER_CONFIG_INCOMPATIBLE}
-
-(*
- * The saved router configuration is incompatible with the current router.%0
- *)
-
- WARNING_NO_MD5_MIGRATION = ROUTEBASE + 46;
- {$EXTERNALSYM WARNING_NO_MD5_MIGRATION}
-
-(*
- * RemoteAccess has detected older format user accounts that will not be
- * migrated automatically. To migrate these manually, run XXXX.
- *)
-
- ERROR_PROTOCOL_ALREADY_INSTALLED = ROUTEBASE + 48;
- {$EXTERNALSYM ERROR_PROTOCOL_ALREADY_INSTALLED}
-
-(*
- * The transport is already installed with the router.%0
- *)
-
- ERROR_INVALID_SIGNATURE_LENGTH = ROUTEBASE + 49;
- {$EXTERNALSYM ERROR_INVALID_SIGNATURE_LENGTH}
-
-(*
- * Received invalid signature length in packet from RADIUS server.%0
- *)
-
- ERROR_INVALID_SIGNATURE = ROUTEBASE + 50;
- {$EXTERNALSYM ERROR_INVALID_SIGNATURE}
-
-(*
- * Received invalid signature in packet from RADIUS server.%0
- *)
-
- ERROR_NO_SIGNATURE = ROUTEBASE + 51;
- {$EXTERNALSYM ERROR_NO_SIGNATURE}
-
-(*
- * Did not receive signature along with EAPMessage from RADIUS server.%0
- *)
-
- ERROR_INVALID_PACKET_LENGTH_OR_ID = ROUTEBASE + 52;
- {$EXTERNALSYM ERROR_INVALID_PACKET_LENGTH_OR_ID}
-
-(*
- * Received packet with invalid length or Id from RADIUS server.%0
- *)
-
- ERROR_INVALID_ATTRIBUTE_LENGTH = ROUTEBASE + 53;
- {$EXTERNALSYM ERROR_INVALID_ATTRIBUTE_LENGTH}
-
-(*
- * Received packet with attribute with invalid length from RADIUS server.%0
- *)
-
- ERROR_INVALID_PACKET = ROUTEBASE + 54;
- {$EXTERNALSYM ERROR_INVALID_PACKET}
-
-(*
- * Received invalid packet from RADIUS server.%0
- *)
-
- ERROR_AUTHENTICATOR_MISMATCH = ROUTEBASE + 55;
- {$EXTERNALSYM ERROR_AUTHENTICATOR_MISMATCH}
-
-(*
- * Authenticator does not match in packet from RADIUS server.%0
- *)
-
- ROUTEBASEEND = ROUTEBASE + 56;
- {$EXTERNALSYM ROUTEBASEEND}
-
-implementation
-
-end.
+{******************************************************************************}
+{ }
+{ Management Base Information API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: mprerror.h, released August 2001. The original Pascal }
+{ code is: MprError.pas, released September 2000. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwamprerror.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaMprError;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "mprerror.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+const
+ ROUTEBASE = 900;
+ {$EXTERNALSYM ROUTEBASE}
+ SUCCESS = 0;
+ {$EXTERNALSYM SUCCESS}
+
+ ERROR_ROUTER_STOPPED = ROUTEBASE + 0;
+ {$EXTERNALSYM ERROR_ROUTER_STOPPED}
+
+(*
+ * The router is not running.%0
+ *)
+
+ ERROR_ALREADY_CONNECTED = ROUTEBASE + 1;
+ {$EXTERNALSYM ERROR_ALREADY_CONNECTED}
+
+(*
+ * The interface is already connected.%0
+ *)
+
+ ERROR_UNKNOWN_PROTOCOL_ID = ROUTEBASE + 2;
+ {$EXTERNALSYM ERROR_UNKNOWN_PROTOCOL_ID}
+
+(*
+ * The specified protocol identifier is not known to the router.%0
+ *)
+
+ ERROR_DDM_NOT_RUNNING = ROUTEBASE + 3;
+ {$EXTERNALSYM ERROR_DDM_NOT_RUNNING}
+
+(*
+ * The Demand-dial Interface Manager is not running.%0
+ *)
+
+ ERROR_INTERFACE_ALREADY_EXISTS = ROUTEBASE + 4;
+ {$EXTERNALSYM ERROR_INTERFACE_ALREADY_EXISTS}
+
+(*
+ * An interface with this name is already registered with the router.%0
+ *)
+
+ ERROR_NO_SUCH_INTERFACE = ROUTEBASE + 5;
+ {$EXTERNALSYM ERROR_NO_SUCH_INTERFACE}
+
+(*
+ * An interface with this name is not registered with the router.%0
+ *)
+
+ ERROR_INTERFACE_NOT_CONNECTED = ROUTEBASE + 6;
+ {$EXTERNALSYM ERROR_INTERFACE_NOT_CONNECTED}
+
+(*
+ * The interface is not connected.%0
+ *)
+
+ ERROR_PROTOCOL_STOP_PENDING = ROUTEBASE + 7;
+ {$EXTERNALSYM ERROR_PROTOCOL_STOP_PENDING}
+
+(*
+ * The specified protocol is stopping.%0
+ *)
+
+ ERROR_INTERFACE_CONNECTED = ROUTEBASE + 8;
+ {$EXTERNALSYM ERROR_INTERFACE_CONNECTED}
+
+(*
+ * The interface is connected and hence cannot be deleted.%0
+ *)
+
+ ERROR_NO_INTERFACE_CREDENTIALS_SET = ROUTEBASE + 9;
+ {$EXTERNALSYM ERROR_NO_INTERFACE_CREDENTIALS_SET}
+
+(*
+ * The interface credentials have not been set.%0
+ *)
+
+ ERROR_ALREADY_CONNECTING = ROUTEBASE + 10;
+ {$EXTERNALSYM ERROR_ALREADY_CONNECTING}
+
+(*
+ * This interface is already in the process of connecting.%0
+ *)
+
+ ERROR_UPDATE_IN_PROGRESS = ROUTEBASE + 11;
+ {$EXTERNALSYM ERROR_UPDATE_IN_PROGRESS}
+
+(*
+ * An update of routing information on this interface is already in progress.%0
+ *)
+
+ ERROR_INTERFACE_CONFIGURATION = ROUTEBASE + 12;
+ {$EXTERNALSYM ERROR_INTERFACE_CONFIGURATION}
+
+(*
+ * The interface confugration in invalid. There is already another interface that is connected to the same inteface on the remote router.%0
+ *)
+
+ ERROR_NOT_CLIENT_PORT = ROUTEBASE + 13;
+ {$EXTERNALSYM ERROR_NOT_CLIENT_PORT}
+
+(*
+ * A Remote Access Client attempted to connect over a port that was reserved for Routers only.%0
+ *)
+
+ ERROR_NOT_ROUTER_PORT = ROUTEBASE + 14;
+ {$EXTERNALSYM ERROR_NOT_ROUTER_PORT}
+
+(*
+ * A Demand Dial Router attempted to connect over a port that was reserved for Remote Access Clients only.%0
+ *)
+
+ ERROR_CLIENT_INTERFACE_ALREADY_EXISTS = ROUTEBASE + 15;
+ {$EXTERNALSYM ERROR_CLIENT_INTERFACE_ALREADY_EXISTS}
+
+(*
+ * The client interface with this name already exists and is currently connected.%0
+ *)
+
+ ERROR_INTERFACE_DISABLED = ROUTEBASE + 16;
+ {$EXTERNALSYM ERROR_INTERFACE_DISABLED}
+
+(*
+ * The interface is in a disabled state.%0
+ *)
+
+ ERROR_AUTH_PROTOCOL_REJECTED = ROUTEBASE + 17;
+ {$EXTERNALSYM ERROR_AUTH_PROTOCOL_REJECTED}
+
+(*
+ * The authentication protocol was rejected by the remote peer.%0
+ *)
+
+ ERROR_NO_AUTH_PROTOCOL_AVAILABLE = ROUTEBASE + 18;
+ {$EXTERNALSYM ERROR_NO_AUTH_PROTOCOL_AVAILABLE}
+
+(*
+ * There are no authentication protocols available for use.%0
+ *)
+
+ ERROR_PEER_REFUSED_AUTH = ROUTEBASE + 19;
+ {$EXTERNALSYM ERROR_PEER_REFUSED_AUTH}
+
+(*
+ * The remote computer refused to be authenticated using the configured authentication protocol. The line has been disconnected.%0
+ *)
+
+ ERROR_REMOTE_NO_DIALIN_PERMISSION = ROUTEBASE + 20;
+ {$EXTERNALSYM ERROR_REMOTE_NO_DIALIN_PERMISSION}
+
+(*
+ * The remote account does not have Remote Access permission.%0
+ *)
+
+ ERROR_REMOTE_PASSWD_EXPIRED = ROUTEBASE + 21;
+ {$EXTERNALSYM ERROR_REMOTE_PASSWD_EXPIRED}
+
+(*
+ * The remote account has expired.%0
+ *)
+
+ ERROR_REMOTE_ACCT_DISABLED = ROUTEBASE + 22;
+ {$EXTERNALSYM ERROR_REMOTE_ACCT_DISABLED}
+
+(*
+ * The remote account is disabled.%0
+ *)
+
+ ERROR_REMOTE_RESTRICTED_LOGON_HOURS = ROUTEBASE + 23;
+ {$EXTERNALSYM ERROR_REMOTE_RESTRICTED_LOGON_HOURS}
+
+(*
+ * The remote account is not permitted to logon at this time of day.%0
+ *)
+
+ ERROR_REMOTE_AUTHENTICATION_FAILURE = ROUTEBASE + 24;
+ {$EXTERNALSYM ERROR_REMOTE_AUTHENTICATION_FAILURE}
+
+(*
+ * Access was denied to the remote peer because username and/or password is invalid on the domain.%0
+ *)
+
+ ERROR_INTERFACE_HAS_NO_DEVICES = ROUTEBASE + 25;
+ {$EXTERNALSYM ERROR_INTERFACE_HAS_NO_DEVICES}
+
+(*
+ * There are no routing enabled ports available for use by this demand dial interface.%0
+ *)
+
+ ERROR_IDLE_DISCONNECTED = ROUTEBASE + 26;
+ {$EXTERNALSYM ERROR_IDLE_DISCONNECTED}
+
+(*
+ * The port has been disconnected due to inactivity.%0
+ *)
+
+ ERROR_INTERFACE_UNREACHABLE = ROUTEBASE + 27;
+ {$EXTERNALSYM ERROR_INTERFACE_UNREACHABLE}
+
+(*
+ * The interface is not reachable at this time.%0
+ *)
+
+ ERROR_SERVICE_IS_PAUSED = ROUTEBASE + 28;
+ {$EXTERNALSYM ERROR_SERVICE_IS_PAUSED}
+
+(*
+ * The Demand Dial service is in a paused state.%0
+ *)
+
+ ERROR_INTERFACE_DISCONNECTED = ROUTEBASE + 29;
+ {$EXTERNALSYM ERROR_INTERFACE_DISCONNECTED}
+
+(*
+ * The interface has been disconnected by the administrator.%0
+ *)
+
+ ERROR_AUTH_SERVER_TIMEOUT = ROUTEBASE + 30;
+ {$EXTERNALSYM ERROR_AUTH_SERVER_TIMEOUT}
+
+(*
+ * The authentication server did not respond to authentication requests in a timely fashion.%0
+ *)
+
+ ERROR_PORT_LIMIT_REACHED = ROUTEBASE + 31;
+ {$EXTERNALSYM ERROR_PORT_LIMIT_REACHED}
+
+(*
+ * The maximum number of ports allowed for use in the multilinked connection has been reached.%0
+ *)
+
+ ERROR_PPP_SESSION_TIMEOUT = ROUTEBASE + 32;
+ {$EXTERNALSYM ERROR_PPP_SESSION_TIMEOUT}
+
+(*
+ * The connection time limit for the user has been reached.%0
+ *)
+
+ ERROR_MAX_LAN_INTERFACE_LIMIT = ROUTEBASE + 33;
+ {$EXTERNALSYM ERROR_MAX_LAN_INTERFACE_LIMIT}
+
+(*
+ * The maximum limit on the number of LAN interfaces supported has been reached.%0
+ *)
+
+ ERROR_MAX_WAN_INTERFACE_LIMIT = ROUTEBASE + 34;
+ {$EXTERNALSYM ERROR_MAX_WAN_INTERFACE_LIMIT}
+
+(*
+ * The maximum limit on the number of Demand Dial interfaces supported has been reached.%0
+ *)
+
+ ERROR_MAX_CLIENT_INTERFACE_LIMIT = ROUTEBASE + 35;
+ {$EXTERNALSYM ERROR_MAX_CLIENT_INTERFACE_LIMIT}
+
+(*
+ * The maximum limit on the number of Remote Access clients supported has been reached.%0
+ *)
+
+ ERROR_BAP_DISCONNECTED = ROUTEBASE + 36;
+ {$EXTERNALSYM ERROR_BAP_DISCONNECTED}
+
+(*
+ * The port has been disconnected due to the BAP policy.%0
+ *)
+
+ ERROR_USER_LIMIT = ROUTEBASE + 37;
+ {$EXTERNALSYM ERROR_USER_LIMIT}
+
+(*
+ * Because another connection of your type is in use, the incoming connection cannot accept your connection request.%0
+ *)
+
+ ERROR_NO_RADIUS_SERVERS = ROUTEBASE + 38;
+ {$EXTERNALSYM ERROR_NO_RADIUS_SERVERS}
+
+(*
+ * No RADIUS servers were located on the network.%0
+ *)
+
+ ERROR_INVALID_RADIUS_RESPONSE = ROUTEBASE + 39;
+ {$EXTERNALSYM ERROR_INVALID_RADIUS_RESPONSE}
+
+(*
+ * An invalid response was received from the RADIUS authentication server.
+ * Make sure that the case sensitive secret pasword for the RADIUS server is set correctly.%0
+ *)
+
+ ERROR_DIALIN_HOURS_RESTRICTION = ROUTEBASE + 40;
+ {$EXTERNALSYM ERROR_DIALIN_HOURS_RESTRICTION}
+
+(*
+ * You do not have permission to connect at this time.%0
+ *)
+
+ ERROR_ALLOWED_PORT_TYPE_RESTRICTION = ROUTEBASE + 41;
+ {$EXTERNALSYM ERROR_ALLOWED_PORT_TYPE_RESTRICTION}
+
+(*
+ * You do not have permission to connect using the current device type.%0
+ *)
+
+ ERROR_AUTH_PROTOCOL_RESTRICTION = ROUTEBASE + 42;
+ {$EXTERNALSYM ERROR_AUTH_PROTOCOL_RESTRICTION}
+
+(*
+ * You do not have permission to connect using the selected authentication protocol.%0
+ *)
+
+ ERROR_BAP_REQUIRED = ROUTEBASE + 43;
+ {$EXTERNALSYM ERROR_BAP_REQUIRED}
+
+(*
+ * BAP is required for this user.%0
+ *)
+
+ ERROR_DIALOUT_HOURS_RESTRICTION = ROUTEBASE + 44;
+ {$EXTERNALSYM ERROR_DIALOUT_HOURS_RESTRICTION}
+
+(*
+ * The interface is not allowed to connect at this time.%0
+ *)
+
+ ERROR_ROUTER_CONFIG_INCOMPATIBLE = ROUTEBASE + 45;
+ {$EXTERNALSYM ERROR_ROUTER_CONFIG_INCOMPATIBLE}
+
+(*
+ * The saved router configuration is incompatible with the current router.%0
+ *)
+
+ WARNING_NO_MD5_MIGRATION = ROUTEBASE + 46;
+ {$EXTERNALSYM WARNING_NO_MD5_MIGRATION}
+
+(*
+ * RemoteAccess has detected older format user accounts that will not be
+ * migrated automatically. To migrate these manually, run XXXX.
+ *)
+
+ ERROR_PROTOCOL_ALREADY_INSTALLED = ROUTEBASE + 48;
+ {$EXTERNALSYM ERROR_PROTOCOL_ALREADY_INSTALLED}
+
+(*
+ * The transport is already installed with the router.%0
+ *)
+
+ ERROR_INVALID_SIGNATURE_LENGTH = ROUTEBASE + 49;
+ {$EXTERNALSYM ERROR_INVALID_SIGNATURE_LENGTH}
+
+(*
+ * Received invalid signature length in packet from RADIUS server.%0
+ *)
+
+ ERROR_INVALID_SIGNATURE = ROUTEBASE + 50;
+ {$EXTERNALSYM ERROR_INVALID_SIGNATURE}
+
+(*
+ * Received invalid signature in packet from RADIUS server.%0
+ *)
+
+ ERROR_NO_SIGNATURE = ROUTEBASE + 51;
+ {$EXTERNALSYM ERROR_NO_SIGNATURE}
+
+(*
+ * Did not receive signature along with EAPMessage from RADIUS server.%0
+ *)
+
+ ERROR_INVALID_PACKET_LENGTH_OR_ID = ROUTEBASE + 52;
+ {$EXTERNALSYM ERROR_INVALID_PACKET_LENGTH_OR_ID}
+
+(*
+ * Received packet with invalid length or Id from RADIUS server.%0
+ *)
+
+ ERROR_INVALID_ATTRIBUTE_LENGTH = ROUTEBASE + 53;
+ {$EXTERNALSYM ERROR_INVALID_ATTRIBUTE_LENGTH}
+
+(*
+ * Received packet with attribute with invalid length from RADIUS server.%0
+ *)
+
+ ERROR_INVALID_PACKET = ROUTEBASE + 54;
+ {$EXTERNALSYM ERROR_INVALID_PACKET}
+
+(*
+ * Received invalid packet from RADIUS server.%0
+ *)
+
+ ERROR_AUTHENTICATOR_MISMATCH = ROUTEBASE + 55;
+ {$EXTERNALSYM ERROR_AUTHENTICATOR_MISMATCH}
+
+(*
+ * Authenticator does not match in packet from RADIUS server.%0
+ *)
+
+ ROUTEBASEEND = ROUTEBASE + 56;
+ {$EXTERNALSYM ROUTEBASEEND}
+
+implementation
+
+end.
diff --git a/packages/extra/winunits/jwamsi.pas b/packages/extra/winunits/jwamsi.pas
index 1171ccb737..f814c304d7 100644
--- a/packages/extra/winunits/jwamsi.pas
+++ b/packages/extra/winunits/jwamsi.pas
@@ -1,3647 +1,3647 @@
-{******************************************************************************}
-{ }
-{ Windows Installer API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: msi.h, released June 2000. The original Pascal }
-{ code is: Msi.pas, released June 2001. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Contributors: Steve Moss (spm att coco dott co dott uk) }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwamsi.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaMsi;
-
-{$WEAKPACKAGEUNIT}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaWinType, JwaWinCrypt { for PCCERT_CONTEXT };
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "msi.h"'}
-{$HPPEMIT ''}
-
-// (rom) MSI version IFDEFs now declared in jediapilib.inc
-
-(*****************************************************************************\
-* *
-* msi.h - - Interface for external access to Installer Service *
-* *
-* Version 1.0 - 1.2 *
-* *
-* NOTES: All buffers sizes are TCHAR count, null included only on input *
-* Return argument pointers may be null if not interested in value *
-* *
-* Copyright (c) 1999-2000, Microsoft Corp. All rights reserved. *
-* *
-\*****************************************************************************)
-
-// --------------------------------------------------------------------------
-// Installer generic handle definitions
-// --------------------------------------------------------------------------
-
-type
- MSIHANDLE = DWORD; // abstract generic handle, 0 == no handle
- {$EXTERNALSYM MSIHANDLE}
- TMsiHandle = MSIHANDLE;
-
-// Close a open handle of any type
-// All handles obtained from API calls must be closed when no longer needed
-// Normally succeeds, returning TRUE.
-
-function MsiCloseHandle(hAny: MSIHANDLE): UINT; stdcall;
-{$EXTERNALSYM MsiCloseHandle}
-
-// Close all handles open in the process, a diagnostic call
-// This should NOT be used as a cleanup mechanism -- use PMSIHANDLE class
-// Can be called at termination to assure that all handles have been closed
-// Returns 0 if all handles have been close, else number of open handles
-
-function MsiCloseAllHandles: UINT; stdcall;
-{$EXTERNALSYM MsiCloseAllHandles}
-
-// Install message type for callback is a combination of the following:
-// A message box style: MB_*, where MB_OK is the default
-// A message box icon type: MB_ICON*, where no icon is the default
-// A default button: MB_DEFBUTTON?, where MB_DEFBUTTON1 is the default
-// One of the following install message types, no default
-
-const
- INSTALLMESSAGE_FATALEXIT = $00000000; // premature termination, possibly fatal OOM
- {$EXTERNALSYM INSTALLMESSAGE_FATALEXIT}
- INSTALLMESSAGE_ERROR = $01000000; // formatted error message
- {$EXTERNALSYM INSTALLMESSAGE_ERROR}
- INSTALLMESSAGE_WARNING = $02000000; // formatted warning message
- {$EXTERNALSYM INSTALLMESSAGE_WARNING}
- INSTALLMESSAGE_USER = $03000000; // user request message
- {$EXTERNALSYM INSTALLMESSAGE_USER}
- INSTALLMESSAGE_INFO = $04000000; // informative message for log
- {$EXTERNALSYM INSTALLMESSAGE_INFO}
- INSTALLMESSAGE_FILESINUSE = $05000000; // list of files in use that need to be replaced
- {$EXTERNALSYM INSTALLMESSAGE_FILESINUSE}
- INSTALLMESSAGE_RESOLVESOURCE = $06000000; // request to determine a valid source location
- {$EXTERNALSYM INSTALLMESSAGE_RESOLVESOURCE}
- INSTALLMESSAGE_OUTOFDISKSPACE = $07000000; // insufficient disk space message
- {$EXTERNALSYM INSTALLMESSAGE_OUTOFDISKSPACE}
- INSTALLMESSAGE_ACTIONSTART = $08000000; // start of action: action name & description
- {$EXTERNALSYM INSTALLMESSAGE_ACTIONSTART}
- INSTALLMESSAGE_ACTIONDATA = $09000000; // formatted data associated with individual action item
- {$EXTERNALSYM INSTALLMESSAGE_ACTIONDATA}
- INSTALLMESSAGE_PROGRESS = $0A000000; // progress gauge info: units so far, total
- {$EXTERNALSYM INSTALLMESSAGE_PROGRESS}
- INSTALLMESSAGE_COMMONDATA = $0B000000; // product info for dialog: language Id, dialog caption
- {$EXTERNALSYM INSTALLMESSAGE_COMMONDATA}
- INSTALLMESSAGE_INITIALIZE = $0C000000; // sent prior to UI initialization, no string data
- {$EXTERNALSYM INSTALLMESSAGE_INITIALIZE}
- INSTALLMESSAGE_TERMINATE = $0D000000; // sent after UI termination, no string data
- {$EXTERNALSYM INSTALLMESSAGE_TERMINATE}
- INSTALLMESSAGE_SHOWDIALOG = $0E000000; // sent prior to display or authored dialog or wizard
- {$EXTERNALSYM INSTALLMESSAGE_SHOWDIALOG}
-
-type
- INSTALLMESSAGE = Longint;
- {$EXTERNALSYM INSTALLMESSAGE}
- TInstallMessage = INSTALLMESSAGE;
-
-// external error handler supplied to installation API functions
-
-type
- INSTALLUI_HANDLERA = function(pvContext: LPVOID; iMessageType: UINT; szMessage: LPCSTR): Integer; stdcall;
- {$EXTERNALSYM INSTALLUI_HANDLERA}
- TInstallUIHandlerA = INSTALLUI_HANDLERA;
- INSTALLUI_HANDLERW = function(pvContext: LPVOID; iMessageType: UINT; szMessage: LPCWSTR): Integer; stdcall;
- {$EXTERNALSYM INSTALLUI_HANDLERW}
- TInstallUIHandlerW = INSTALLUI_HANDLERW;
-
- {$IFDEF UNICODE}
- INSTALLUI_HANDLER = INSTALLUI_HANDLERW;
- {$EXTERNALSYM INSTALLUI_HANDLER}
- TInstallUIHandler = TInstallUIHandlerW;
- {$ELSE}
- INSTALLUI_HANDLER = INSTALLUI_HANDLERA;
- {$EXTERNALSYM INSTALLUI_HANDLER}
- TInstallUIHandler = TInstallUIHandlerA;
- {$ENDIF UNICODE}
-
-const
- INSTALLUILEVEL_NOCHANGE = 0; // UI level is unchanged
- {$EXTERNALSYM INSTALLUILEVEL_NOCHANGE}
- INSTALLUILEVEL_DEFAULT = 1; // default UI is used
- {$EXTERNALSYM INSTALLUILEVEL_DEFAULT}
- INSTALLUILEVEL_NONE = 2; // completely silent installation
- {$EXTERNALSYM INSTALLUILEVEL_NONE}
- INSTALLUILEVEL_BASIC = 3; // simple progress and error handling
- {$EXTERNALSYM INSTALLUILEVEL_BASIC}
- INSTALLUILEVEL_REDUCED = 4; // authored UI, wizard dialogs suppressed
- {$EXTERNALSYM INSTALLUILEVEL_REDUCED}
- INSTALLUILEVEL_FULL = 5; // authored UI with wizards, progress, errors
- {$EXTERNALSYM INSTALLUILEVEL_FULL}
- INSTALLUILEVEL_ENDDIALOG = $80; // display success/failure dialog at end of install
- {$EXTERNALSYM INSTALLUILEVEL_ENDDIALOG}
- INSTALLUILEVEL_PROGRESSONLY = $40; // display only progress dialog
- {$EXTERNALSYM INSTALLUILEVEL_PROGRESSONLY}
- INSTALLUILEVEL_HIDECANCEL = $20; // do not display the cancel button in basic UI
- {$EXTERNALSYM INSTALLUILEVEL_HIDECANCEL}
- INSTALLUILEVEL_SOURCERESONLY = $100; // force display of source resolution even if quiet
- {$EXTERNALSYM INSTALLUILEVEL_SOURCERESONLY}
-
-type
- INSTALLUILEVEL = Longint;
- {$EXTERNALSYM INSTALLUILEVEL}
- TInstallUILevel = INSTALLUILEVEL;
-
-const
- INSTALLSTATE_NOTUSED = -7; // component disabled
- {$EXTERNALSYM INSTALLSTATE_NOTUSED}
- INSTALLSTATE_BADCONFIG = -6; // configuration data corrupt
- {$EXTERNALSYM INSTALLSTATE_BADCONFIG}
- INSTALLSTATE_INCOMPLETE = -5; // installation suspended or in progress
- {$EXTERNALSYM INSTALLSTATE_INCOMPLETE}
- INSTALLSTATE_SOURCEABSENT = -4; // run from source, source is unavailable
- {$EXTERNALSYM INSTALLSTATE_SOURCEABSENT}
- INSTALLSTATE_MOREDATA = -3; // return buffer overflow
- {$EXTERNALSYM INSTALLSTATE_MOREDATA}
- INSTALLSTATE_INVALIDARG = -2; // invalid function argument
- {$EXTERNALSYM INSTALLSTATE_INVALIDARG}
- INSTALLSTATE_UNKNOWN = -1; // unrecognized product or feature
- {$EXTERNALSYM INSTALLSTATE_UNKNOWN}
- INSTALLSTATE_BROKEN = 0; // broken
- {$EXTERNALSYM INSTALLSTATE_BROKEN}
- INSTALLSTATE_ADVERTISED = 1; // advertised feature
- {$EXTERNALSYM INSTALLSTATE_ADVERTISED}
- INSTALLSTATE_REMOVED = 1; // component being removed (action state, not settable)
- {$EXTERNALSYM INSTALLSTATE_REMOVED}
- INSTALLSTATE_ABSENT = 2; // uninstalled (or action state absent but clients remain)
- {$EXTERNALSYM INSTALLSTATE_ABSENT}
- INSTALLSTATE_LOCAL = 3; // installed on local drive
- {$EXTERNALSYM INSTALLSTATE_LOCAL}
- INSTALLSTATE_SOURCE = 4; // run from source, CD or net
- {$EXTERNALSYM INSTALLSTATE_SOURCE}
- INSTALLSTATE_DEFAULT = 5; // use default, local or source
- {$EXTERNALSYM INSTALLSTATE_DEFAULT}
-
-type
- INSTALLSTATE = Longint;
- {$EXTERNALSYM INSTALLSTATE}
- TInstallState = INSTALLSTATE;
-
-const
- USERINFOSTATE_MOREDATA = -3; // return buffer overflow
- {$EXTERNALSYM USERINFOSTATE_MOREDATA}
- USERINFOSTATE_INVALIDARG = -2; // invalid function argument
- {$EXTERNALSYM USERINFOSTATE_INVALIDARG}
- USERINFOSTATE_UNKNOWN = -1; // unrecognized product
- {$EXTERNALSYM USERINFOSTATE_UNKNOWN}
- USERINFOSTATE_ABSENT = 0; // user info and PID not initialized
- {$EXTERNALSYM USERINFOSTATE_ABSENT}
- USERINFOSTATE_PRESENT = 1; // user info and PID initialized
- {$EXTERNALSYM USERINFOSTATE_PRESENT}
-
-type
- USERINFOSTATE = DWORD;
- {$EXTERNALSYM USERINFOSTATE}
- TUserInfoState = USERINFOSTATE;
-
-const
- INSTALLLEVEL_DEFAULT = 0; // install authored default
- {$EXTERNALSYM INSTALLLEVEL_DEFAULT}
- INSTALLLEVEL_MINIMUM = 1; // install only required features
- {$EXTERNALSYM INSTALLLEVEL_MINIMUM}
- INSTALLLEVEL_MAXIMUM = $FFFF; // install all features
- {$EXTERNALSYM INSTALLLEVEL_MAXIMUM}
-
-type
- INSTALLLEVEL = DWORD; // intermediate levels dependent on authoring
- {$EXTERNALSYM INSTALLLEVEL}
- TInstallLevel = INSTALLLEVEL;
-
-const
- REINSTALLMODE_REPAIR = $00000001; // Reserved bit - currently ignored
- {$EXTERNALSYM REINSTALLMODE_REPAIR}
- REINSTALLMODE_FILEMISSING = $00000002; // Reinstall only if file is missing
- {$EXTERNALSYM REINSTALLMODE_FILEMISSING}
- REINSTALLMODE_FILEOLDERVERSION = $00000004; // Reinstall if file is missing, or older version
- {$EXTERNALSYM REINSTALLMODE_FILEOLDERVERSION}
- REINSTALLMODE_FILEEQUALVERSION = $00000008; // Reinstall if file is missing, or equal or older version
- {$EXTERNALSYM REINSTALLMODE_FILEEQUALVERSION}
- REINSTALLMODE_FILEEXACT = $00000010; // Reinstall if file is missing, or not exact version
- {$EXTERNALSYM REINSTALLMODE_FILEEXACT}
- REINSTALLMODE_FILEVERIFY = $00000020; // checksum executables, reinstall if missing or corrupt
- {$EXTERNALSYM REINSTALLMODE_FILEVERIFY}
- REINSTALLMODE_FILEREPLACE = $00000040; // Reinstall all files, regardless of version
- {$EXTERNALSYM REINSTALLMODE_FILEREPLACE}
- REINSTALLMODE_MACHINEDATA = $00000080; // insure required machine reg entries
- {$EXTERNALSYM REINSTALLMODE_MACHINEDATA}
- REINSTALLMODE_USERDATA = $00000100; // insure required user reg entries
- {$EXTERNALSYM REINSTALLMODE_USERDATA}
- REINSTALLMODE_SHORTCUT = $00000200; // validate shortcuts items
- {$EXTERNALSYM REINSTALLMODE_SHORTCUT}
- REINSTALLMODE_PACKAGE = $00000400; // use re-cache source install package
- {$EXTERNALSYM REINSTALLMODE_PACKAGE}
-
-type
- REINSTALLMODE = DWORD;
- {$EXTERNALSYM REINSTALLMODE}
- TReinstallMode = REINSTALLMODE;
-
-// bit flags for use with MsiEnableLog and MsiSetExternalUI
-
-const
- INSTALLLOGMODE_FATALEXIT = 1 shl (INSTALLMESSAGE_FATALEXIT shr 24);
- {$EXTERNALSYM INSTALLLOGMODE_FATALEXIT}
- INSTALLLOGMODE_ERROR = 1 shl (INSTALLMESSAGE_ERROR shr 24);
- {$EXTERNALSYM INSTALLLOGMODE_ERROR}
- INSTALLLOGMODE_WARNING = 1 shl (INSTALLMESSAGE_WARNING shr 24);
- {$EXTERNALSYM INSTALLLOGMODE_WARNING}
- INSTALLLOGMODE_USER = 1 shl (INSTALLMESSAGE_USER shr 24);
- {$EXTERNALSYM INSTALLLOGMODE_USER}
- INSTALLLOGMODE_INFO = 1 shl (INSTALLMESSAGE_INFO shr 24);
- {$EXTERNALSYM INSTALLLOGMODE_INFO}
- INSTALLLOGMODE_RESOLVESOURCE = 1 shl (INSTALLMESSAGE_RESOLVESOURCE shr 24);
- {$EXTERNALSYM INSTALLLOGMODE_RESOLVESOURCE}
- INSTALLLOGMODE_OUTOFDISKSPACE = 1 shl (INSTALLMESSAGE_OUTOFDISKSPACE shr 24);
- {$EXTERNALSYM INSTALLLOGMODE_OUTOFDISKSPACE}
- INSTALLLOGMODE_ACTIONSTART = 1 shl (INSTALLMESSAGE_ACTIONSTART shr 24);
- {$EXTERNALSYM INSTALLLOGMODE_ACTIONSTART}
- INSTALLLOGMODE_ACTIONDATA = 1 shl (INSTALLMESSAGE_ACTIONDATA shr 24);
- {$EXTERNALSYM INSTALLLOGMODE_ACTIONDATA}
- INSTALLLOGMODE_COMMONDATA = 1 shl (INSTALLMESSAGE_COMMONDATA shr 24);
- {$EXTERNALSYM INSTALLLOGMODE_COMMONDATA}
- INSTALLLOGMODE_PROPERTYDUMP = 1 shl (INSTALLMESSAGE_PROGRESS shr 24); // log only
- {$EXTERNALSYM INSTALLLOGMODE_PROPERTYDUMP}
- INSTALLLOGMODE_VERBOSE = 1 shl (INSTALLMESSAGE_INITIALIZE shr 24); // log only
- {$EXTERNALSYM INSTALLLOGMODE_VERBOSE}
- INSTALLLOGMODE_EXTRADEBUG = 1 shl (INSTALLMESSAGE_TERMINATE shr 24); // log only
- {$EXTERNALSYM INSTALLLOGMODE_EXTRADEBUG}
- INSTALLLOGMODE_PROGRESS = 1 shl (INSTALLMESSAGE_PROGRESS shr 24); // external handler only
- {$EXTERNALSYM INSTALLLOGMODE_PROGRESS}
- INSTALLLOGMODE_INITIALIZE = 1 shl (INSTALLMESSAGE_INITIALIZE shr 24); // external handler only
- {$EXTERNALSYM INSTALLLOGMODE_INITIALIZE}
- INSTALLLOGMODE_TERMINATE = 1 shl (INSTALLMESSAGE_TERMINATE shr 24); // external handler only
- {$EXTERNALSYM INSTALLLOGMODE_TERMINATE}
- INSTALLLOGMODE_SHOWDIALOG = 1 shl (INSTALLMESSAGE_SHOWDIALOG shr 24); // external handler only
- {$EXTERNALSYM INSTALLLOGMODE_SHOWDIALOG}
-
-type
- INSTALLLOGMODE = DWORD;
- {$EXTERNALSYM INSTALLLOGMODE}
- TInstallLogMode = INSTALLLOGMODE;
-
-const
- INSTALLLOGATTRIBUTES_APPEND = 1 shl 0;
- {$EXTERNALSYM INSTALLLOGATTRIBUTES_APPEND}
- INSTALLLOGATTRIBUTES_FLUSHEACHLINE = 1 shl 1;
- {$EXTERNALSYM INSTALLLOGATTRIBUTES_FLUSHEACHLINE}
-
-type
- INSTALLLOGATTRIBUTES = DWORD;
- {$EXTERNALSYM INSTALLLOGATTRIBUTES}
- TInstallLogAttributes = INSTALLLOGATTRIBUTES;
-
-const
- INSTALLFEATUREATTRIBUTE_FAVORLOCAL = 1 shl 0;
- {$EXTERNALSYM INSTALLFEATUREATTRIBUTE_FAVORLOCAL}
- INSTALLFEATUREATTRIBUTE_FAVORSOURCE = 1 shl 1;
- {$EXTERNALSYM INSTALLFEATUREATTRIBUTE_FAVORSOURCE}
- INSTALLFEATUREATTRIBUTE_FOLLOWPARENT = 1 shl 2;
- {$EXTERNALSYM INSTALLFEATUREATTRIBUTE_FOLLOWPARENT}
- INSTALLFEATUREATTRIBUTE_FAVORADVERTISE = 1 shl 3;
- {$EXTERNALSYM INSTALLFEATUREATTRIBUTE_FAVORADVERTISE}
- INSTALLFEATUREATTRIBUTE_DISALLOWADVERTISE = 1 shl 4;
- {$EXTERNALSYM INSTALLFEATUREATTRIBUTE_DISALLOWADVERTISE}
- INSTALLFEATUREATTRIBUTE_NOUNSUPPORTEDADVERTISE = 1 shl 5;
- {$EXTERNALSYM INSTALLFEATUREATTRIBUTE_NOUNSUPPORTEDADVERTISE}
-
-type
- INSTALLFEATUREATTRIBUTE = DWORD;
- {$EXTERNALSYM INSTALLFEATUREATTRIBUTE}
- TInstallFeatureAttribute = INSTALLFEATUREATTRIBUTE;
-
-const
- INSTALLMODE_NOSOURCERESOLUTION = -3; // skip source resolution
- {$EXTERNALSYM INSTALLMODE_NOSOURCERESOLUTION}
- INSTALLMODE_NODETECTION = -2; // skip detection
- {$EXTERNALSYM INSTALLMODE_NODETECTION}
- INSTALLMODE_EXISTING = -1; // provide, if available
- {$EXTERNALSYM INSTALLMODE_EXISTING}
- INSTALLMODE_DEFAULT = 0; // install, if absent
- {$EXTERNALSYM INSTALLMODE_DEFAULT}
-
-type
- INSTALLMODE = DWORD;
- {$EXTERNALSYM INSTALLMODE}
- TInstallMode = INSTALLMODE;
-
-const
- MAX_FEATURE_CHARS = 38; // maximum chars in feature name (same as string GUID)
- {$EXTERNALSYM MAX_FEATURE_CHARS}
-
-// Product info attributes: advertised information
-
- INSTALLPROPERTY_PACKAGENAME = __TEXT('PackageName');
- {$EXTERNALSYM INSTALLPROPERTY_PACKAGENAME}
- INSTALLPROPERTY_TRANSFORMS = __TEXT('Transforms');
- {$EXTERNALSYM INSTALLPROPERTY_TRANSFORMS}
- INSTALLPROPERTY_LANGUAGE = __TEXT('Language');
- {$EXTERNALSYM INSTALLPROPERTY_LANGUAGE}
- INSTALLPROPERTY_PRODUCTNAME = __TEXT('ProductName');
- {$EXTERNALSYM INSTALLPROPERTY_PRODUCTNAME}
- INSTALLPROPERTY_ASSIGNMENTTYPE = __TEXT('AssignmentType');
- {$EXTERNALSYM INSTALLPROPERTY_ASSIGNMENTTYPE}
-//#if (_WIN32_MSI >= 150)
- INSTALLPROPERTY_INSTANCETYPE = __TEXT('InstanceType');
- {$EXTERNALSYM INSTALLPROPERTY_INSTANCETYPE}
-//#endif //(_WIN32_MSI >= 150)
-
- INSTALLPROPERTY_PACKAGECODE = __TEXT('PackageCode');
- {$EXTERNALSYM INSTALLPROPERTY_PACKAGECODE}
- INSTALLPROPERTY_VERSION = __TEXT('Version');
- {$EXTERNALSYM INSTALLPROPERTY_VERSION}
- INSTALLPROPERTY_PRODUCTICON = __TEXT('ProductIcon');
- {$EXTERNALSYM INSTALLPROPERTY_PRODUCTICON}
-
-// Product info attributes: installed information
-
- INSTALLPROPERTY_INSTALLEDPRODUCTNAME = __TEXT('InstalledProductName');
- {$EXTERNALSYM INSTALLPROPERTY_INSTALLEDPRODUCTNAME}
- INSTALLPROPERTY_VERSIONSTRING = __TEXT('VersionString');
- {$EXTERNALSYM INSTALLPROPERTY_VERSIONSTRING}
- INSTALLPROPERTY_HELPLINK = __TEXT('HelpLink');
- {$EXTERNALSYM INSTALLPROPERTY_HELPLINK}
- INSTALLPROPERTY_HELPTELEPHONE = __TEXT('HelpTelephone');
- {$EXTERNALSYM INSTALLPROPERTY_HELPTELEPHONE}
- INSTALLPROPERTY_INSTALLLOCATION = __TEXT('InstallLocation');
- {$EXTERNALSYM INSTALLPROPERTY_INSTALLLOCATION}
- INSTALLPROPERTY_INSTALLSOURCE = __TEXT('InstallSource');
- {$EXTERNALSYM INSTALLPROPERTY_INSTALLSOURCE}
- INSTALLPROPERTY_INSTALLDATE = __TEXT('InstallDate');
- {$EXTERNALSYM INSTALLPROPERTY_INSTALLDATE}
- INSTALLPROPERTY_PUBLISHER = __TEXT('Publisher');
- {$EXTERNALSYM INSTALLPROPERTY_PUBLISHER}
- INSTALLPROPERTY_LOCALPACKAGE = __TEXT('LocalPackage');
- {$EXTERNALSYM INSTALLPROPERTY_LOCALPACKAGE}
- INSTALLPROPERTY_URLINFOABOUT = __TEXT('URLInfoAbout');
- {$EXTERNALSYM INSTALLPROPERTY_URLINFOABOUT}
- INSTALLPROPERTY_URLUPDATEINFO = __TEXT('URLUpdateInfo');
- {$EXTERNALSYM INSTALLPROPERTY_URLUPDATEINFO}
- INSTALLPROPERTY_VERSIONMINOR = __TEXT('VersionMinor');
- {$EXTERNALSYM INSTALLPROPERTY_VERSIONMINOR}
- INSTALLPROPERTY_VERSIONMAJOR = __TEXT('VersionMajor');
- {$EXTERNALSYM INSTALLPROPERTY_VERSIONMAJOR}
-
-const
- SCRIPTFLAGS_CACHEINFO = $00000001; // set if the icons need to be created/ removed
- {$EXTERNALSYM SCRIPTFLAGS_CACHEINFO}
- SCRIPTFLAGS_SHORTCUTS = $00000004; // set if the shortcuts needs to be created/ deleted
- {$EXTERNALSYM SCRIPTFLAGS_SHORTCUTS}
- SCRIPTFLAGS_MACHINEASSIGN = $00000008; // set if product to be assigned to machine
- {$EXTERNALSYM SCRIPTFLAGS_MACHINEASSIGN}
- SCRIPTFLAGS_REGDATA_CNFGINFO = $00000020; // set if the product cnfg mgmt. registry data needs to be written/ removed
- {$EXTERNALSYM SCRIPTFLAGS_REGDATA_CNFGINFO}
- SCRIPTFLAGS_VALIDATE_TRANSFORMS_LIST = $00000040;
- {$EXTERNALSYM SCRIPTFLAGS_VALIDATE_TRANSFORMS_LIST}
- {$IFDEF MSI200_UP}
- SCRIPTFLAGS_REGDATA_CLASSINFO = $00000080; // set if COM classes related app info needs to be created/ deleted
- {$EXTERNALSYM SCRIPTFLAGS_REGDATA_CLASSINFO}
- SCRIPTFLAGS_REGDATA_EXTENSIONINFO = $00000100; // set if extension related app info needs to be created/ deleted
- {$EXTERNALSYM SCRIPTFLAGS_REGDATA_EXTENSIONINFO}
- SCRIPTFLAGS_REGDATA_APPINFO = SCRIPTFLAGS_REGDATA_CLASSINFO or SCRIPTFLAGS_REGDATA_EXTENSIONINFO; // for source level backward compatibility
- {$EXTERNALSYM SCRIPTFLAGS_REGDATA_APPINFO}
- {$ELSE} // _WIN32_MSI >= 110
- SCRIPTFLAGS_REGDATA_APPINFO = $00000010;
- {$EXTERNALSYM SCRIPTFLAGS_REGDATA_APPINFO}
- {$ENDIF MSI200_UP}
- SCRIPTFLAGS_REGDATA = SCRIPTFLAGS_REGDATA_APPINFO or SCRIPTFLAGS_REGDATA_CNFGINFO;// for source level backward compatibility
- {$EXTERNALSYM SCRIPTFLAGS_REGDATA}
-
-type
- SCRIPTFLAGS = Longint;
- {$EXTERNALSYM SCRIPTFLAGS}
- TScriptFlags = SCRIPTFLAGS;
-
-const
- ADVERTISEFLAGS_MACHINEASSIGN = 0; // set if the product is to be machine assigned
- {$EXTERNALSYM ADVERTISEFLAGS_MACHINEASSIGN}
- ADVERTISEFLAGS_USERASSIGN = 1; // set if the product is to be user assigned
- {$EXTERNALSYM ADVERTISEFLAGS_USERASSIGN}
-
-type
- ADVERTISEFLAGS = Longint;
- {$EXTERNALSYM ADVERTISEFLAGS}
- TAdvertiseFlags = ADVERTISEFLAGS;
-
-const
- INSTALLTYPE_DEFAULT = 0; // set to indicate default behavior
- {$EXTERNALSYM INSTALLTYPE_DEFAULT}
- INSTALLTYPE_NETWORK_IMAGE = 1; // set to indicate network install
- {$EXTERNALSYM INSTALLTYPE_NETWORK_IMAGE}
- INSTALLTYPE_SINGLE_INSTANCE = 2; // set to indicate a particular instance
- {$EXTERNALSYM INSTALLTYPE_SINGLE_INSTANCE}
-
-type
- INSTALLTYPE = DWORD;
- {$EXTERNALSYM INSTALLTYPE}
- TInstallType = INSTALLTYPE;
-
-type
- _MSIFILEHASHINFO = record
- dwFileHashInfoSize: ULONG;
- dwData: array [0..3] of ULONG;
- end;
- {$EXTERNALSYM _MSIFILEHASHINFO}
- MSIFILEHASHINFO = _MSIFILEHASHINFO;
- {$EXTERNALSYM MSIFILEHASHINFO}
- PMSIFILEHASHINFO = ^MSIFILEHASHINFO;
- {$EXTERNALSYM PMSIFILEHASHINFO}
- TMsiFileHashInfo = MSIFILEHASHINFO;
-
-const
- MSIARCHITECTUREFLAGS_X86 = $00000001; // set if creating the script for i386 platform
- {$EXTERNALSYM MSIARCHITECTUREFLAGS_X86}
- MSIARCHITECTUREFLAGS_IA64 = $00000002; // set if creating the script for IA64 platform
- {$EXTERNALSYM MSIARCHITECTUREFLAGS_IA64}
- MSIARCHITECTUREFLAGS_AMD64 = $00000004; // set if creating the script for AMD64 platform
- {$EXTERNALSYM MSIARCHITECTUREFLAGS_AMD64}
-
-type
- MSIARCHITECTUREFLAGS = DWORD;
- {$EXTERNALSYM MSIARCHITECTUREFLAGS}
- TMsiArchitectureFlags = MSIARCHITECTUREFLAGS;
-
-const
- MSIOPENPACKAGEFLAGS_IGNOREMACHINESTATE = $00000001; // ignore the machine state when creating the engine
- {$EXTERNALSYM MSIOPENPACKAGEFLAGS_IGNOREMACHINESTATE}
-
-type
- MSIOPENPACKAGEFLAGS = DWORD;
- {$EXTERNALSYM MSIOPENPACKAGEFLAGS}
- TMsiOpenPackageFlags = MSIOPENPACKAGEFLAGS;
-
-const
- MSIADVERTISEOPTIONFLAGS_INSTANCE = $00000001; // set if advertising a new instance
- {$EXTERNALSYM MSIADVERTISEOPTIONFLAGS_INSTANCE}
-
-type
- tagMSIADVERTISEOPTIONFLAGS = DWORD;
- {$EXTERNALSYM tagMSIADVERTISEOPTIONFLAGS}
- MSIADVERTISEOPTIONFLAGS = tagMSIADVERTISEOPTIONFLAGS;
- {$EXTERNALSYM MSIADVERTISEOPTIONFLAGS}
- TMsiAdvertiseOptionFlags = MSIADVERTISEOPTIONFLAGS;
-
-// --------------------------------------------------------------------------
-// Functions to set the UI handling and logging. The UI will be used for error,
-// progress, and log messages for all subsequent calls to Installer Service
-// API functions that require UI.
-// --------------------------------------------------------------------------
-
-// Enable internal UI
-
-function MsiSetInternalUI(dwUILevel: INSTALLUILEVEL; phWnd: LPHWND): INSTALLUILEVEL; stdcall;
-{$EXTERNALSYM MsiSetInternalUI}
-
-// Enable external UI handling, returns any previous handler or NULL if none.
-// Messages are designated with a combination of bits from INSTALLLOGMODE enum.
-
-function MsiSetExternalUIA(puiHandler: INSTALLUI_HANDLERA; dwMessageFilter: DWORD;
- pvContext: LPVOID): INSTALLUI_HANDLERA; stdcall;
-{$EXTERNALSYM MsiSetExternalUIA}
-function MsiSetExternalUIW(puiHandler: INSTALLUI_HANDLERW; dwMessageFilter: DWORD;
- pvContext: LPVOID): INSTALLUI_HANDLERW; stdcall;
-{$EXTERNALSYM MsiSetExternalUIW}
-function MsiSetExternalUI(puiHandler: INSTALLUI_HANDLER; dwMessageFilter: DWORD;
- pvContext: LPVOID): INSTALLUI_HANDLER; stdcall;
-{$EXTERNALSYM MsiSetExternalUI}
-
-// Enable logging to a file for all install sessions for the client process,
-// with control over which log messages are passed to the specified log file.
-// Messages are designated with a combination of bits from INSTALLLOGMODE enum.
-
-function MsiEnableLogA(dwLogMode: DWORD; szLogFile: LPCSTR; dwLogAttributes: DWORD): UINT; stdcall;
-{$EXTERNALSYM MsiEnableLogA}
-function MsiEnableLogW(dwLogMode: DWORD; szLogFile: LPCWSTR; dwLogAttributes: DWORD): UINT; stdcall;
-{$EXTERNALSYM MsiEnableLogW}
-function MsiEnableLog(dwLogMode: DWORD; szLogFile: LPCTSTR; dwLogAttributes: DWORD): UINT; stdcall;
-{$EXTERNALSYM MsiEnableLog}
-
-// --------------------------------------------------------------------------
-// Functions to query and configure a product as a whole.
-// --------------------------------------------------------------------------
-
-// Return the installed state for a product
-
-function MsiQueryProductStateA(szProduct: LPCSTR): INSTALLSTATE; stdcall;
-{$EXTERNALSYM MsiQueryProductStateA}
-function MsiQueryProductStateW(szProduct: LPCWSTR): INSTALLSTATE; stdcall;
-{$EXTERNALSYM MsiQueryProductStateW}
-function MsiQueryProductState(szProduct: LPCTSTR): INSTALLSTATE; stdcall;
-{$EXTERNALSYM MsiQueryProductState}
-
-// Return product info
-
-function MsiGetProductInfoA(szProduct: LPCSTR; szAttribute: LPCSTR;
- lpValueBuf: LPSTR; pcchValueBuf: LPDWORD): UINT; stdcall;
-{$EXTERNALSYM MsiGetProductInfoA}
-function MsiGetProductInfoW(szProduct: LPCWSTR; szAttribute: LPCWSTR;
- lpValueBuf: LPWSTR; pcchValueBuf: LPDWORD): UINT; stdcall;
-{$EXTERNALSYM MsiGetProductInfoW}
-function MsiGetProductInfo(szProduct: LPCTSTR; szAttribute: LPCTSTR;
- lpValueBuf: LPTSTR; pcchValueBuf: LPDWORD): UINT; stdcall;
-{$EXTERNALSYM MsiGetProductInfo}
-
-// Install a new product.
-// Either may be NULL, but the DATABASE property must be specfied
-
-function MsiInstallProductA(szPackagePath: LPCSTR; szCommandLine: LPCSTR): UINT; stdcall;
-{$EXTERNALSYM MsiInstallProductA}
-function MsiInstallProductW(szPackagePath: LPCWSTR; szCommandLine: LPCWSTR): UINT; stdcall;
-{$EXTERNALSYM MsiInstallProductW}
-function MsiInstallProduct(szPackagePath: LPCTSTR; szCommandLine: LPCTSTR): UINT; stdcall;
-{$EXTERNALSYM MsiInstallProduct}
-
-// Install/uninstall an advertised or installed product
-// No action if installed and INSTALLSTATE_DEFAULT specified
-
-function MsiConfigureProductA(szProduct: LPCSTR; iInstallLevel: Integer;
- eInstallState: INSTALLSTATE): UINT; stdcall;
-{$EXTERNALSYM MsiConfigureProductA}
-function MsiConfigureProductW(szProduct: LPCWSTR; iInstallLevel: Integer;
- eInstallState: INSTALLSTATE): UINT; stdcall;
-{$EXTERNALSYM MsiConfigureProductW}
-function MsiConfigureProduct(szProduct: LPCTSTR; iInstallLevel: Integer;
- eInstallState: INSTALLSTATE): UINT; stdcall;
-{$EXTERNALSYM MsiConfigureProduct}
-
-// Install/uninstall an advertised or installed product
-// No action if installed and INSTALLSTATE_DEFAULT specified
-
-function MsiConfigureProductExA(szProduct: LPCSTR; iInstallLevel: Integer;
- eInstallState: INSTALLSTATE; szCommandLine: LPCSTR): UINT; stdcall;
-{$EXTERNALSYM MsiConfigureProductExA}
-function MsiConfigureProductExW(szProduct: LPCWSTR; iInstallLevel: Integer;
- eInstallState: INSTALLSTATE; szCommandLine: LPCWSTR): UINT; stdcall;
-{$EXTERNALSYM MsiConfigureProductExW}
-function MsiConfigureProductEx(szProduct: LPCTSTR; iInstallLevel: Integer;
- eInstallState: INSTALLSTATE; szCommandLine: LPCTSTR): UINT; stdcall;
-{$EXTERNALSYM MsiConfigureProductEx}
-
-// Reinstall product, used to validate or correct problems
-
-function MsiReinstallProductA(szProduct: LPCSTR; szReinstallMode: DWORD): UINT; stdcall;
-{$EXTERNALSYM MsiReinstallProductA}
-function MsiReinstallProductW(szProduct: LPCWSTR; szReinstallMode: DWORD): UINT; stdcall;
-{$EXTERNALSYM MsiReinstallProductW}
-function MsiReinstallProduct(szProduct: LPCTSTR; szReinstallMode: DWORD): UINT; stdcall;
-{$EXTERNALSYM MsiReinstallProduct}
-
-// Output reg and shortcut info to script file for specified architecture for Assign or Publish
-// If dwPlatform is 0, then the script is created based on the current platform (behavior of MsiAdvertiseProduct)
-// If dwOptions includes MSIADVERTISEOPTIONFLAGS_INSTANCE, then a new instance is advertised. Use of
-// this option requires that szTransforms include the instance transform that changes the product code
-
-function MsiAdvertiseProductExA(szPackagePath, szScriptfilePath, szTransforms: LPCSTR; lgidLanguage: LANGID;
- dwPlatform, dwOptions: DWORD): UINT; stdcall;
-{$EXTERNALSYM MsiAdvertiseProductExA}
-function MsiAdvertiseProductExW(szPackagePath, szScriptfilePath, szTransforms: LPCWSTR; lgidLanguage: LANGID;
- dwPlatform, dwOptions: DWORD): UINT; stdcall;
-{$EXTERNALSYM MsiAdvertiseProductExW}
-function MsiAdvertiseProductEx(szPackagePath, szScriptfilePath, szTransforms: LPCTSTR; lgidLanguage: LANGID;
- dwPlatform, dwOptions: DWORD): UINT; stdcall;
-{$EXTERNALSYM MsiAdvertiseProductEx}
-
-// Output reg and shortcut info to script file for Assign or Publish
-
-function MsiAdvertiseProductA(szPackagePath, szScriptfilePath, szTransforms: LPCSTR; lgidLanguage: LANGID): UINT; stdcall;
-{$EXTERNALSYM MsiAdvertiseProductA}
-function MsiAdvertiseProductW(szPackagePath, szScriptfilePath, szTransforms: LPCWSTR; lgidLanguage: LANGID): UINT; stdcall;
-{$EXTERNALSYM MsiAdvertiseProductW}
-function MsiAdvertiseProduct(szPackagePath, szScriptfilePath, szTransforms: LPCTSTR; lgidLanguage: LANGID): UINT; stdcall;
-{$EXTERNALSYM MsiAdvertiseProduct}
-
-// Process advertise script file into supplied locations
-// If an icon folder is specified, icon files will be placed there
-// If an registry key is specified, registry data will be mapped under it
-// If fShortcuts is TRUE, shortcuts will be created. If a special folder is
-// returned by SHGetSpecialFolderLocation(?), it will hold the shortcuts.
-// if fRemoveItems is TRUE, items that are present will be removed
-
-function MsiProcessAdvertiseScriptA(szScriptFile, szIconFolder: LPCSTR; hRegData: HKEY; fShortcuts, fRemoveItems: BOOL): UINT; stdcall;
-{$EXTERNALSYM MsiProcessAdvertiseScriptA}
-function MsiProcessAdvertiseScriptW(szScriptFile, szIconFolder: LPCWSTR; hRegData: HKEY; fShortcuts, fRemoveItems: BOOL): UINT; stdcall;
-{$EXTERNALSYM MsiProcessAdvertiseScriptW}
-function MsiProcessAdvertiseScript(szScriptFile, szIconFolder: LPCTSTR; hRegData: HKEY; fShortcuts, fRemoveItems: BOOL): UINT; stdcall;
-{$EXTERNALSYM MsiProcessAdvertiseScript}
-
-// Process advertise script file using the supplied dwFlags control flags
-// if fRemoveItems is TRUE, items that are present will be removed
-
-function MsiAdvertiseScriptA(szScriptFile: LPCSTR; dwFlags: DWORD; phRegData: PHKEY; fRemoveItems: BOOL): UINT; stdcall;
-{$EXTERNALSYM MsiAdvertiseScriptA}
-function MsiAdvertiseScriptW(szScriptFile: LPCWSTR; dwFlags: DWORD; phRegData: PHKEY; fRemoveItems: BOOL): UINT; stdcall;
-{$EXTERNALSYM MsiAdvertiseScriptW}
-function MsiAdvertiseScript(szScriptFile: LPCTSTR; dwFlags: DWORD; phRegData: PHKEY; fRemoveItems: BOOL): UINT; stdcall;
-{$EXTERNALSYM MsiAdvertiseScript}
-
-// Return product info from an installer script file:
-// product code, language, version, readable name, path to package
-// Returns TRUE is success, FALSE if szScriptFile is not a valid script file
-
-function MsiGetProductInfoFromScriptA(szScriptFile: LPCSTR; lpProductBuf39: LPSTR; plgidLanguage: PLANGID; pdwVersion: LPDWORD;
- lpNameBuf: LPSTR; pcchNameBuf: LPDWORD; lpPackageBuf: LPSTR; pcchPackageBuf: LPDWORD): UINT; stdcall;
-{$EXTERNALSYM MsiGetProductInfoFromScriptA}
-function MsiGetProductInfoFromScriptW(szScriptFile: LPCWSTR; lpProductBuf39: LPWSTR; plgidLanguage: PLANGID; pdwVersion: LPDWORD;
- lpNameBuf: LPWSTR; pcchNameBuf: LPDWORD; lpPackageBuf: LPWSTR; pcchPackageBuf: LPDWORD): UINT; stdcall;
-{$EXTERNALSYM MsiGetProductInfoFromScriptW}
-function MsiGetProductInfoFromScript(szScriptFile: LPCTSTR; lpProductBuf39: LPTSTR; plgidLanguage: PLANGID; pdwVersion: LPDWORD;
- lpNameBuf: LPTSTR; pcchNameBuf: LPDWORD; lpPackageBuf: LPTSTR; pcchPackageBuf: LPDWORD): UINT; stdcall;
-{$EXTERNALSYM MsiGetProductInfoFromScript}
-
-// Return the product code for a registered component, called once by apps
-
-function MsiGetProductCodeA(szComponent: LPCSTR; lpBuf39: LPSTR): UINT; stdcall;
-{$EXTERNALSYM MsiGetProductCodeA}
-function MsiGetProductCodeW(szComponent: LPCWSTR; lpBuf39: LPWSTR): UINT; stdcall;
-{$EXTERNALSYM MsiGetProductCodeW}
-function MsiGetProductCode(szComponent: LPCTSTR; lpBuf39: LPTSTR): UINT; stdcall;
-{$EXTERNALSYM MsiGetProductCode}
-
-// Return the registered user information for an installed product
-
-function MsiGetUserInfoA(szProduct: LPCSTR; lpUserNameBuf: LPSTR;
- var pcchUserNameBuf: DWORD; lpOrgNameBuf: LPSTR; var pcchOrgNameBuf: DWORD;
- lpSerialBuf: LPSTR; var pcchSerialBuf: DWORD): USERINFOSTATE; stdcall;
-{$EXTERNALSYM MsiGetUserInfoA}
-function MsiGetUserInfoW(szProduct: LPCWSTR; lpUserNameBuf: LPWSTR;
- var pcchUserNameBuf: DWORD; lpOrgNameBuf: LPWSTR; var pcchOrgNameBuf: DWORD;
- lpSerialBuf: LPWSTR; var pcchSerialBuf: DWORD): USERINFOSTATE; stdcall;
-{$EXTERNALSYM MsiGetUserInfoW}
-function MsiGetUserInfo(szProduct: LPCTSTR; lpUserNameBuf: LPTSTR;
- var pcchUserNameBuf: DWORD; lpOrgNameBuf: LPTSTR; var pcchOrgNameBuf: DWORD;
- lpSerialBuf: LPTSTR; var pcchSerialBuf: DWORD): USERINFOSTATE; stdcall;
-{$EXTERNALSYM MsiGetUserInfo}
-
-// Obtain and store user info and PID from installation wizard (first run)
-
-function MsiCollectUserInfoA(szProduct: LPCSTR): UINT; stdcall;
-{$EXTERNALSYM MsiCollectUserInfoA}
-function MsiCollectUserInfoW(szProduct: LPCWSTR): UINT; stdcall;
-{$EXTERNALSYM MsiCollectUserInfoW}
-function MsiCollectUserInfo(szProduct: LPCTSTR): UINT; stdcall;
-{$EXTERNALSYM MsiCollectUserInfo}
-
-// --------------------------------------------------------------------------
-// Functions to patch existing products
-// --------------------------------------------------------------------------
-
-// Patch all possible installed products.
-
-function MsiApplyPatchA(szPatchPackage: LPCSTR; szInstallPackage: LPCSTR;
- eInstallType: INSTALLTYPE; szCommandLine: LPCSTR): UINT; stdcall;
-{$EXTERNALSYM MsiApplyPatchA}
-function MsiApplyPatchW(szPatchPackage: LPCWSTR; szInstallPackage: LPCWSTR;
- eInstallType: INSTALLTYPE; szCommandLine: LPCWSTR): UINT; stdcall;
-{$EXTERNALSYM MsiApplyPatchW}
-function MsiApplyPatch(szPatchPackage: LPCTSTR; szInstallPackage: LPCTSTR;
- eInstallType: INSTALLTYPE; szCommandLine: LPCTSTR): UINT; stdcall;
-{$EXTERNALSYM MsiApplyPatch}
-
-// Return patch info
-
-function MsiGetPatchInfoA(szPatch: LPCSTR; szAttribute: LPCSTR;
- lpValueBuf: LPSTR; pcchValueBuf: LPDWORD): UINT; stdcall;
-{$EXTERNALSYM MsiGetPatchInfoA}
-function MsiGetPatchInfoW(szPatch: LPCWSTR; szAttribute: LPCWSTR;
- lpValueBuf: LPWSTR; pcchValueBuf: LPDWORD): UINT; stdcall;
-{$EXTERNALSYM MsiGetPatchInfoW}
-function MsiGetPatchInfo(szPatch: LPCTSTR; szAttribute: LPCTSTR;
- lpValueBuf: LPTSTR; pcchValueBuf: LPDWORD): UINT; stdcall;
-{$EXTERNALSYM MsiGetPatchInfo}
-
-// Enumerate all patches for a product
-
-function MsiEnumPatchesA(szProduct: LPCSTR; iPatchIndex: DWORD; lpPatchBuf: LPSTR;
- lpTransformsBuf: LPSTR; var pcchTransformsBuf: DWORD): UINT; stdcall;
-{$EXTERNALSYM MsiEnumPatchesA}
-function MsiEnumPatchesW(szProduct: LPCWSTR; iPatchIndex: DWORD; lpPatchBuf: LPWSTR;
- lpTransformsBuf: LPWSTR; var pcchTransformsBuf: DWORD): UINT; stdcall;
-{$EXTERNALSYM MsiEnumPatchesW}
-function MsiEnumPatches(szProduct: LPCTSTR; iPatchIndex: DWORD; lpPatchBuf: LPTSTR;
- lpTransformsBuf: LPTSTR; var pcchTransformsBuf: DWORD): UINT; stdcall;
-{$EXTERNALSYM MsiEnumPatches}
-
-// --------------------------------------------------------------------------
-// Functions to query and configure a feature within a product.
-// --------------------------------------------------------------------------
-
-// Return the installed state for a product feature
-
-function MsiQueryFeatureStateA(szProduct: LPCSTR; szFeature: LPCSTR): INSTALLSTATE; stdcall;
-{$EXTERNALSYM MsiQueryFeatureStateA}
-function MsiQueryFeatureStateW(szProduct: LPCWSTR; szFeature: LPCWSTR): INSTALLSTATE; stdcall;
-{$EXTERNALSYM MsiQueryFeatureStateW}
-function MsiQueryFeatureState(szProduct: LPCTSTR; szFeature: LPCTSTR): INSTALLSTATE; stdcall;
-{$EXTERNALSYM MsiQueryFeatureState}
-
-// Indicate intent to use a product feature, increments usage count
-// Prompts for CD if not loaded, does not install feature
-
-function MsiUseFeatureA(szProduct: LPCSTR; szFeature: LPCSTR): INSTALLSTATE; stdcall;
-{$EXTERNALSYM MsiUseFeatureA}
-function MsiUseFeatureW(szProduct: LPCWSTR; szFeature: LPCWSTR): INSTALLSTATE; stdcall;
-{$EXTERNALSYM MsiUseFeatureW}
-function MsiUseFeature(szProduct: LPCTSTR; szFeature: LPCTSTR): INSTALLSTATE; stdcall;
-{$EXTERNALSYM MsiUseFeature}
-
-// Indicate intent to use a product feature, increments usage count
-// Prompts for CD if not loaded, does not install feature
-// Allows for bypassing component detection where performance is critical
-
-function MsiUseFeatureExA(szProduct: LPCSTR; szFeature: LPCSTR;
- dwInstallMode: DWORD; dwReserved: DWORD): INSTALLSTATE; stdcall;
-{$EXTERNALSYM MsiUseFeatureExA}
-function MsiUseFeatureExW(szProduct: LPCWSTR; szFeature: LPCWSTR; dwInstallMode: DWORD;
- dwReserved: DWORD): INSTALLSTATE; stdcall;
-{$EXTERNALSYM MsiUseFeatureExW}
-function MsiUseFeatureEx(szProduct: LPCTSTR; szFeature: LPCTSTR;
- dwInstallMode: DWORD; dwReserved: DWORD): INSTALLSTATE; stdcall;
-{$EXTERNALSYM MsiUseFeatureEx}
-
-// Return the usage metrics for a product feature
-
-function MsiGetFeatureUsageA(szProduct: LPCSTR; szFeature: LPCSTR;
- var pdwUseCount, pwDateUsed: WORD): UINT; stdcall;
-{$EXTERNALSYM MsiGetFeatureUsageA}
-function MsiGetFeatureUsageW(szProduct: LPCWSTR; szFeature: LPCWSTR;
- var pdwUseCount, pwDateUsed: WORD): UINT; stdcall;
-{$EXTERNALSYM MsiGetFeatureUsageW}
-function MsiGetFeatureUsage(szProduct: LPCTSTR; szFeature: LPCTSTR;
- var pdwUseCount, pwDateUsed: WORD): UINT; stdcall;
-{$EXTERNALSYM MsiGetFeatureUsage}
-
-// Force the installed state for a product feature
-
-function MsiConfigureFeatureA(szProduct, szFeature: LPCSTR; eInstallState: INSTALLSTATE): UINT; stdcall;
-{$EXTERNALSYM MsiConfigureFeatureA}
-function MsiConfigureFeatureW(szProduct, szFeature: LPCWSTR; eInstallState: INSTALLSTATE): UINT; stdcall;
-{$EXTERNALSYM MsiConfigureFeatureW}
-function MsiConfigureFeature(szProduct, szFeature: LPCTSTR; eInstallState: INSTALLSTATE): UINT; stdcall;
-{$EXTERNALSYM MsiConfigureFeature}
-
-// Reinstall feature, used to validate or correct problems
-
-function MsiReinstallFeatureA(szProduct, szFeature: LPCSTR; dwReinstallMode: DWORD): UINT; stdcall;
-{$EXTERNALSYM MsiReinstallFeatureA}
-function MsiReinstallFeatureW(szProduct, szFeature: LPCWSTR; dwReinstallMode: DWORD): UINT; stdcall;
-{$EXTERNALSYM MsiReinstallFeatureW}
-function MsiReinstallFeature(szProduct, szFeature: LPCTSTR; dwReinstallMode: DWORD): UINT; stdcall;
-{$EXTERNALSYM MsiReinstallFeature}
-
-// --------------------------------------------------------------------------
-// Functions to return a path to a particular component.
-// The state of the feature being used should have been checked previously.
-// --------------------------------------------------------------------------
-
-// Return full component path, performing any necessary installation
-// calls MsiQueryFeatureState to detect that all components are installed
-// then calls MsiConfigureFeature if any of its components are uninstalled
-// then calls MsiLocateComponent to obtain the path the its key file
-
-function MsiProvideComponentA(szProduct: LPCSTR; szFeature: LPCSTR; szComponent: LPCSTR;
- dwInstallMode: DWORD; lpPathBuf: LPSTR; pcchPathBuf: LPDWORD): UINT; stdcall;
-{$EXTERNALSYM MsiProvideComponentA}
-function MsiProvideComponentW(szProduct: LPCWSTR; szFeature: LPCWSTR; szComponent: LPCWSTR;
- dwInstallMode: DWORD; lpPathBuf: LPWSTR; pcchPathBuf: LPDWORD): UINT; stdcall;
-{$EXTERNALSYM MsiProvideComponentW}
-function MsiProvideComponent(szProduct: LPCTSTR; szFeature: LPCTSTR; szComponent: LPCTSTR;
- dwInstallMode: DWORD; lpPathBuf: LPTSTR; pcchPathBuf: LPDWORD): UINT; stdcall;
-{$EXTERNALSYM MsiProvideComponent}
-
-// Return full component path for a qualified component, performing any necessary installation.
-// Prompts for source if necessary and increments the usage count for the feature.
-
-function MsiProvideQualifiedComponentA(szCategory: LPCSTR; szQualifier: LPCSTR;
- dwInstallMode: DWORD; lpPathBuf: LPSTR; pcchPathBuf: LPDWORD): UINT; stdcall;
-{$EXTERNALSYM MsiProvideQualifiedComponentA}
-function MsiProvideQualifiedComponentW(szCategory: LPCWSTR; szQualifier: LPCWSTR;
- dwInstallMode: DWORD; lpPathBuf: LPWSTR; pcchPathBuf: LPDWORD): UINT; stdcall;
-{$EXTERNALSYM MsiProvideQualifiedComponentW}
-function MsiProvideQualifiedComponent(szCategory: LPCTSTR; szQualifier: LPCTSTR;
- dwInstallMode: DWORD; lpPathBuf: LPTSTR; pcchPathBuf: LPDWORD): UINT; stdcall;
-{$EXTERNALSYM MsiProvideQualifiedComponent}
-
-// Return full component path for a qualified component, performing any necessary installation.
-// Prompts for source if necessary and increments the usage count for the feature.
-// The szProduct parameter specifies the product to match that has published the qualified
-// component. If null, this API works the same as MsiProvideQualifiedComponent.
-
-function MsiProvideQualifiedComponentExA(szCategory: LPCSTR; szQualifier: LPCSTR;
- dwInstallMode: DWORD; szProduct: LPCSTR; dwUnused1: DWORD; dwUnused2: DWORD;
- lpPathBuf: LPSTR; pcchPathBuf: LPDWORD): UINT; stdcall;
-{$EXTERNALSYM MsiProvideQualifiedComponentExA}
-function MsiProvideQualifiedComponentExW(szCategory: LPCWSTR; szQualifier: LPCWSTR;
- dwInstallMode: DWORD; szProduct: LPCWSTR; dwUnused1: DWORD; dwUnused2: DWORD;
- lpPathBuf: LPWSTR; pcchPathBuf: LPDWORD): UINT; stdcall;
-{$EXTERNALSYM MsiProvideQualifiedComponentExW}
-function MsiProvideQualifiedComponentEx(szCategory: LPCTSTR; szQualifier: LPCTSTR;
- dwInstallMode: DWORD; szProduct: LPCTSTR; dwUnused1: DWORD; dwUnused2: DWORD;
- lpPathBuf: LPTSTR; pcchPathBuf: LPDWORD): UINT; stdcall;
-{$EXTERNALSYM MsiProvideQualifiedComponentEx}
-
-// Return full path to an installed component
-
-function MsiGetComponentPathA(szProduct: LPCSTR; szComponent: LPCSTR;
- lpPathBuf: LPSTR; pcchBuf: LPDWORD): INSTALLSTATE; stdcall;
-{$EXTERNALSYM MsiGetComponentPathA}
-function MsiGetComponentPathW(szProduct: LPCWSTR; szComponent: LPCWSTR;
- lpPathBuf: LPWSTR; pcchBuf: LPDWORD): INSTALLSTATE; stdcall;
-{$EXTERNALSYM MsiGetComponentPathW}
-function MsiGetComponentPath(szProduct: LPCTSTR; szComponent: LPCTSTR;
- lpPathBuf: LPTSTR; pcchBuf: LPDWORD): INSTALLSTATE; stdcall;
-{$EXTERNALSYM MsiGetComponentPath}
-
-const
- MSIASSEMBLYINFO_NETASSEMBLY = 0; // Net assemblies
- {$EXTERNALSYM MSIASSEMBLYINFO_NETASSEMBLY}
- MSIASSEMBLYINFO_WIN32ASSEMBLY = 1; // Win32 assemblies
- {$EXTERNALSYM MSIASSEMBLYINFO_WIN32ASSEMBLY}
-
-// Return full component path for an assembly installed via the WI, performing any necessary installation.
-// Prompts for source if necessary and increments the usage count for the feature.
-// The szAssemblyName parameter specifies the stringized assembly name.
-// The szAppContext is the full path to the .cfg file or the app exe to which the assembly being requested
-// has been privatised to, which is null for global assemblies
-
-function MsiProvideAssemblyA(szAssemblyName, szAppContext: LPCSTR; dwInstallMode, dwAssemblyInfo: DWORD;
- lpPathBuf: LPSTR; pcchPathBuf: LPDWORD): UINT; stdcall;
-{$EXTERNALSYM MsiProvideAssemblyA}
-function MsiProvideAssemblyW(szAssemblyName, szAppContext: LPCWSTR; dwInstallMode, dwAssemblyInfo: DWORD;
- lpPathBuf: LPWSTR; pcchPathBuf: LPDWORD): UINT; stdcall;
-{$EXTERNALSYM MsiProvideAssemblyW}
-function MsiProvideAssembly(szAssemblyName, szAppContext: LPCTSTR; dwInstallMode, dwAssemblyInfo: DWORD;
- lpPathBuf: LPTSTR; pcchPathBuf: LPDWORD): UINT; stdcall;
-{$EXTERNALSYM MsiProvideAssembly}
-
-// --------------------------------------------------------------------------
-// Functions to iterate registered products, features, and components.
-// As with reg keys, they accept a 0-based index into the enumeration.
-// --------------------------------------------------------------------------
-
-// Enumerate the registered products, either installed or advertised
-
-function MsiEnumProductsA(iProductIndex: DWORD; lpProductBuf: LPSTR): UINT; stdcall;
-{$EXTERNALSYM MsiEnumProductsA}
-function MsiEnumProductsW(iProductIndex: DWORD; lpProductBuf: LPWSTR): UINT; stdcall;
-{$EXTERNALSYM MsiEnumProductsW}
-function MsiEnumProducts(iProductIndex: DWORD; lpProductBuf: LPTSTR): UINT; stdcall;
-{$EXTERNALSYM MsiEnumProducts}
-
-{$IFDEF MSI110}
-
-// Enumerate products with given upgrade code
-
-function MsiEnumRelatedProductsA(lpUpgradeCode: LPCSTR; dwReserved: DWORD;
- iProductIndex: DWORD; lpProductBuf: LPSTR): UINT; stdcall;
-{$EXTERNALSYM MsiEnumRelatedProductsA}
-function MsiEnumRelatedProductsW(lpUpgradeCode: LPCWSTR; dwReserved: DWORD;
- iProductIndex: DWORD; lpProductBuf: LPWSTR): UINT; stdcall;
-{$EXTERNALSYM MsiEnumRelatedProductsW}
-function MsiEnumRelatedProducts(lpUpgradeCode: LPCTSTR; dwReserved: DWORD;
- iProductIndex: DWORD; lpProductBuf: LPTSTR): UINT; stdcall;
-{$EXTERNALSYM MsiEnumRelatedProducts}
-
-{$ENDIF MSI110}
-
-// Enumerate the advertised features for a given product.
-// If parent is not required, supplying NULL will improve performance.
-
-function MsiEnumFeaturesA(szProduct: LPCSTR; iFeatureIndex: DWORD;
- lpFeatureBuf: LPSTR; lpParentBuf: LPSTR): UINT; stdcall;
-{$EXTERNALSYM MsiEnumFeaturesA}
-function MsiEnumFeaturesW(szProduct: LPCWSTR; iFeatureIndex: DWORD;
- lpFeatureBuf: LPWSTR; lpParentBuf: LPWSTR): UINT; stdcall;
-{$EXTERNALSYM MsiEnumFeaturesW}
-function MsiEnumFeatures(szProduct: LPCTSTR; iFeatureIndex: DWORD;
- lpFeatureBuf: LPTSTR; lpParentBuf: LPTSTR): UINT; stdcall;
-{$EXTERNALSYM MsiEnumFeatures}
-
-// Enumerate the installed components for all products
-
-function MsiEnumComponentsA(iComponentIndex: DWORD; lpComponentBuf: LPSTR): UINT; stdcall;
-{$EXTERNALSYM MsiEnumComponentsA}
-function MsiEnumComponentsW(iComponentIndex: DWORD; lpComponentBuf: LPWSTR): UINT; stdcall;
-{$EXTERNALSYM MsiEnumComponentsW}
-function MsiEnumComponents(iComponentIndex: DWORD; lpComponentBuf: LPTSTR): UINT; stdcall;
-{$EXTERNALSYM MsiEnumComponents}
-
-// Enumerate the client products for a component
-
-function MsiEnumClientsA(szComponent: LPCSTR; iProductIndex: DWORD; lpProductBuf: LPSTR): UINT; stdcall;
-{$EXTERNALSYM MsiEnumClientsA}
-function MsiEnumClientsW(szComponent: LPCWSTR; iProductIndex: DWORD; lpProductBuf: LPWSTR): UINT; stdcall;
-{$EXTERNALSYM MsiEnumClientsW}
-function MsiEnumClients(szComponent: LPCTSTR; iProductIndex: DWORD; lpProductBuf: LPTSTR): UINT; stdcall;
-{$EXTERNALSYM MsiEnumClients}
-
-// Enumerate the qualifiers for an advertised component.
-
-function MsiEnumComponentQualifiersA(szComponent: LPCSTR; iIndex: DWORD;
- lpQualifierBuf: LPSTR; var pcchQualifierBuf: DWORD; lpApplicationDataBuf: LPSTR;
- pcchApplicationDataBuf: LPDWORD): UINT; stdcall;
-{$EXTERNALSYM MsiEnumComponentQualifiersA}
-function MsiEnumComponentQualifiersW(szComponent: LPCWSTR; iIndex: DWORD;
- lpQualifierBuf: LPWSTR; var pcchQualifierBuf: DWORD; lpApplicationDataBuf: LPWSTR;
- pcchApplicationDataBuf: LPDWORD): UINT; stdcall;
-{$EXTERNALSYM MsiEnumComponentQualifiersW}
-function MsiEnumComponentQualifiers(szComponent: LPCTSTR; iIndex: DWORD;
- lpQualifierBuf: LPTSTR; var pcchQualifierBuf: DWORD; lpApplicationDataBuf: LPTSTR;
- pcchApplicationDataBuf: LPDWORD): UINT; stdcall;
-{$EXTERNALSYM MsiEnumComponentQualifiers}
-
-// --------------------------------------------------------------------------
-// Functions to obtain product or package information.
-// --------------------------------------------------------------------------
-
-// Open the installation for a product to obtain detailed information
-
-function MsiOpenProductA(szProduct: LPCSTR; var hProduct: MSIHANDLE): UINT; stdcall;
-{$EXTERNALSYM MsiOpenProductA}
-function MsiOpenProductW(szProduct: LPCWSTR; var hProduct: MSIHANDLE): UINT; stdcall;
-{$EXTERNALSYM MsiOpenProductW}
-function MsiOpenProduct(szProduct: LPCTSTR; var hProduct: MSIHANDLE): UINT; stdcall;
-{$EXTERNALSYM MsiOpenProduct}
-
-// Open a product package in order to access product properties
-
-function MsiOpenPackageA(szPackagePath: LPCSTR; var hProduct: MSIHANDLE): UINT; stdcall;
-{$EXTERNALSYM MsiOpenPackageA}
-function MsiOpenPackageW(szPackagePath: LPCWSTR; var hProduct: MSIHANDLE): UINT; stdcall;
-{$EXTERNALSYM MsiOpenPackageW}
-function MsiOpenPackage(szPackagePath: LPCTSTR; var hProduct: MSIHANDLE): UINT; stdcall;
-{$EXTERNALSYM MsiOpenPackage}
-
-// Open a product package in order to access product properties
-// Option to create a "safe" engine that does not look at machine state
-// and does not allow for modification of machine state
-
-function MsiOpenPackageExA(szPackagePath: LPCSTR; dwOptions: DWORD; var hProduct: MSIHANDLE): UINT; stdcall;
-{$EXTERNALSYM MsiOpenPackageExA}
-function MsiOpenPackageExW(szPackagePath: LPCWSTR; dwOptions: DWORD; var hProduct: MSIHANDLE): UINT; stdcall;
-{$EXTERNALSYM MsiOpenPackageExW}
-function MsiOpenPackageEx(szPackagePath: LPCTSTR; dwOptions: DWORD; var hProduct: MSIHANDLE): UINT; stdcall;
-{$EXTERNALSYM MsiOpenPackageEx}
-
-// Provide the value for an installation property.
-
-function MsiGetProductPropertyA(hProduct: MSIHANDLE; szProperty: LPCSTR;
- lpValueBuf: LPSTR; pcchValueBuf: LPDWORD): UINT; stdcall;
-{$EXTERNALSYM MsiGetProductPropertyA}
-function MsiGetProductPropertyW(hProduct: MSIHANDLE; szProperty: LPCWSTR;
- lpValueBuf: LPWSTR; pcchValueBuf: LPDWORD): UINT; stdcall;
-{$EXTERNALSYM MsiGetProductPropertyW}
-function MsiGetProductProperty(hProduct: MSIHANDLE; szProperty: LPCTSTR;
- lpValueBuf: LPTSTR; pcchValueBuf: LPDWORD): UINT; stdcall;
-{$EXTERNALSYM MsiGetProductProperty}
-
-// Determine whether a file is a package
-// Returns ERROR_SUCCESS if file is a package.
-
-function MsiVerifyPackageA(szPackagePath: LPCSTR): UINT; stdcall;
-{$EXTERNALSYM MsiVerifyPackageA}
-function MsiVerifyPackageW(szPackagePath: LPCWSTR): UINT; stdcall;
-{$EXTERNALSYM MsiVerifyPackageW}
-function MsiVerifyPackage(szPackagePath: LPCTSTR): UINT; stdcall;
-{$EXTERNALSYM MsiVerifyPackage}
-
-// Provide descriptive information for product feature: title and description.
-// Returns the install level for the feature, or -1 if feature is unknown.
-// 0 = feature is not available on this machine
-// 1 = highest priority, feature installed if parent is installed
-// >1 = decreasing priority, feature installation based on InstallLevel property
-
-function MsiGetFeatureInfoA(hProduct: MSIHANDLE; szFeature: LPCSTR; var lpAttributes: DWORD;
- lpTitleBuf: LPSTR; var pcchTitleBuf: DWORD; lpHelpBuf: LPSTR; var pcchHelpBuf: DWORD): UINT; stdcall;
-{$EXTERNALSYM MsiGetFeatureInfoA}
-function MsiGetFeatureInfoW(hProduct: MSIHANDLE; szFeature: LPCWSTR; var lpAttributes: DWORD;
- lpTitleBuf: LPWSTR; var pcchTitleBuf: DWORD; lpHelpBuf: LPWSTR; var pcchHelpBuf: DWORD): UINT; stdcall;
-{$EXTERNALSYM MsiGetFeatureInfoW}
-function MsiGetFeatureInfo(hProduct: MSIHANDLE; szFeature: LPCTSTR; var lpAttributes: DWORD;
- lpTitleBuf: LPTSTR; var pcchTitleBuf: DWORD; lpHelpBuf: LPTSTR; var pcchHelpBuf: DWORD): UINT; stdcall;
-{$EXTERNALSYM MsiGetFeatureInfo}
-
-// --------------------------------------------------------------------------
-// Functions to access or install missing components and files.
-// These should be used as a last resort.
-// --------------------------------------------------------------------------
-
-// Install a component unexpectedly missing, provided only for error recovery
-// This would typically occur due to failue to establish feature availability
-// The product feature having the smallest incremental cost is installed
-
-function MsiInstallMissingComponentA(szProduct: LPCSTR; szComponent: LPCSTR;
- eInstallState: INSTALLSTATE): UINT; stdcall;
-{$EXTERNALSYM MsiInstallMissingComponentA}
-function MsiInstallMissingComponentW(szProduct: LPCWSTR; szComponent: LPCWSTR;
- eInstallState: INSTALLSTATE): UINT; stdcall;
-{$EXTERNALSYM MsiInstallMissingComponentW}
-function MsiInstallMissingComponent(szProduct: LPCTSTR; szComponent: LPCTSTR;
- eInstallState: INSTALLSTATE): UINT; stdcall;
-{$EXTERNALSYM MsiInstallMissingComponent}
-
-// Install a file unexpectedly missing, provided only for error recovery
-// This would typically occur due to failue to establish feature availability
-// The missing component is determined from the product's File table, then
-// the product feature having the smallest incremental cost is installed
-
-function MsiInstallMissingFileA(szProduct: LPCSTR; szFile: LPCSTR): UINT; stdcall;
-{$EXTERNALSYM MsiInstallMissingFileA}
-function MsiInstallMissingFileW(szProduct: LPCWSTR; szFile: LPCWSTR): UINT; stdcall;
-{$EXTERNALSYM MsiInstallMissingFileW}
-function MsiInstallMissingFile(szProduct: LPCTSTR; szFile: LPCTSTR): UINT; stdcall;
-{$EXTERNALSYM MsiInstallMissingFile}
-
-// Return full path to an installed component without a product code
-// This function attempts to determine the product using MsiGetProductCode
-// but is not guaranteed to find the correct product for the caller.
-// MsiGetComponentPath should always be called when possible.
-
-function MsiLocateComponentA(szComponent: LPCSTR; lpPathBuf: LPSTR; pcchBuf: LPDWORD): INSTALLSTATE; stdcall;
-{$EXTERNALSYM MsiLocateComponentA}
-function MsiLocateComponentW(szComponent: LPCWSTR; lpPathBuf: LPWSTR; pcchBuf: LPDWORD): INSTALLSTATE; stdcall;
-{$EXTERNALSYM MsiLocateComponentW}
-function MsiLocateComponent(szComponent: LPCTSTR; lpPathBuf: LPTSTR; pcchBuf: LPDWORD): INSTALLSTATE; stdcall;
-{$EXTERNALSYM MsiLocateComponent}
-
-{$IFDEF MSI110}
-
-// --------------------------------------------------------------------------
-// Functions used to manage the list of valid sources.
-// --------------------------------------------------------------------------
-
-// Opens the list of sources for the specified user's install of the product
-// and removes all network sources from the list. A NULL or empty value for
-// the user name indicates the per-machine install.
-
-function MsiSourceListClearAllA(szProduct: LPCSTR; szUserName: LPCSTR; dwReserved: DWORD): UINT; stdcall;
-{$EXTERNALSYM MsiSourceListClearAllA}
-function MsiSourceListClearAllW(szProduct: LPCWSTR; szUserName: LPCWSTR; dwReserved: DWORD): UINT; stdcall;
-{$EXTERNALSYM MsiSourceListClearAllW}
-function MsiSourceListClearAll(szProduct: LPCTSTR; szUserName: LPCTSTR; dwReserved: DWORD): UINT; stdcall;
-{$EXTERNALSYM MsiSourceListClearAll}
-
-// Opens the list of sources for the specified user's install of the product
-// and adds the provided source as a new network source. A NULL or empty
-// value for the user name indicates the per-machine install.
-
-function MsiSourceListAddSourceA(szProduct: LPCSTR; szUserName: LPCSTR;
- dwReserved: DWORD; szSource: LPCSTR): UINT; stdcall;
-{$EXTERNALSYM MsiSourceListAddSourceA}
-function MsiSourceListAddSourceW(szProduct: LPCWSTR; szUserName: LPCWSTR;
- dwReserved: DWORD; szSource: LPCWSTR): UINT; stdcall;
-{$EXTERNALSYM MsiSourceListAddSourceW}
-function MsiSourceListAddSource(szProduct: LPCTSTR; szUserName: LPCTSTR;
- dwReserved: DWORD; szSource: LPCTSTR): UINT; stdcall;
-{$EXTERNALSYM MsiSourceListAddSource}
-
-// Forces the installer to reevaluate the list of sources the next time that
-// the specified product needs a source.
-
-function MsiSourceListForceResolutionA(szProduct, szUserName: LPCSTR; dwReserved: DWORD): UINT; stdcall;
-{$EXTERNALSYM MsiSourceListForceResolutionA}
-function MsiSourceListForceResolutionW(szProduct, szUserName: LPCWSTR; dwReserved: DWORD): UINT; stdcall;
-{$EXTERNALSYM MsiSourceListForceResolutionW}
-function MsiSourceListForceResolution(szProduct, szUserName: LPCTSTR; dwReserved: DWORD): UINT; stdcall;
-{$EXTERNALSYM MsiSourceListForceResolution}
-
-{$ENDIF MSI110}
-
-// --------------------------------------------------------------------------
-// Utility functions
-// --------------------------------------------------------------------------
-
-// Give the version string and language for a specified file
-
-function MsiGetFileVersionA(szFilePath: LPCSTR; lpVersionBuf: LPSTR;
- var pcchVersionBuf: DWORD; lpLangBuf: LPSTR; var pcchLangBuf: DWORD): UINT; stdcall;
-{$EXTERNALSYM MsiGetFileVersionA}
-function MsiGetFileVersionW(szFilePath: LPCWSTR; lpVersionBuf: LPWSTR;
- var pcchVersionBuf: DWORD; lpLangBuf: LPWSTR; var pcchLangBuf: DWORD): UINT; stdcall;
-{$EXTERNALSYM MsiGetFileVersionW}
-function MsiGetFileVersion(szFilePath: LPCTSTR; lpVersionBuf: LPTSTR;
- var pcchVersionBuf: DWORD; lpLangBuf: LPTSTR; var pcchLangBuf: DWORD): UINT; stdcall;
-{$EXTERNALSYM MsiGetFileVersion}
-
-function MsiGetFileHashA(szFilePath: LPCSTR; dwOptions: DWORD; pHash: PMSIFILEHASHINFO): UINT; stdcall;
-{$EXTERNALSYM MsiGetFileHashA}
-function MsiGetFileHashW(szFilePath: LPCWSTR; dwOptions: DWORD; pHash: PMSIFILEHASHINFO): UINT; stdcall;
-{$EXTERNALSYM MsiGetFileHashW}
-function MsiGetFileHash(szFilePath: LPCTSTR; dwOptions: DWORD; pHash: PMSIFILEHASHINFO): UINT; stdcall;
-{$EXTERNALSYM MsiGetFileHash}
-
-function MsiGetFileSignatureInformationA(szSignedObjectPath: LPCSTR; dwFlags: DWORD; var ppcCertContext: PCCERT_CONTEXT;
- pbHashData: LPBYTE; pcbHashData: LPDWORD): HRESULT; stdcall;
-{$EXTERNALSYM MsiGetFileSignatureInformationA}
-function MsiGetFileSignatureInformationW(szSignedObjectPath: LPCWSTR; dwFlags: DWORD; var ppcCertContext: PCCERT_CONTEXT;
- pbHashData: LPBYTE; pcbHashData: LPDWORD): HRESULT; stdcall;
-{$EXTERNALSYM MsiGetFileSignatureInformationW}
-function MsiGetFileSignatureInformation(szSignedObjectPath: LPCTSTR; dwFlags: DWORD; var ppcCertContext: PCCERT_CONTEXT;
- pbHashData: LPBYTE; pcbHashData: LPDWORD): HRESULT; stdcall;
-{$EXTERNALSYM MsiGetFileSignatureInformation}
-
-// By default, when only requesting the certificate context, an invalid hash
-// in the digital signature is not a fatal error. Set this flag in the dwFlags
-// parameter to make the TRUST_E_BAD_DIGEST error fatal.
-
-const
- MSI_INVALID_HASH_IS_FATAL = $1;
- {$EXTERNALSYM MSI_INVALID_HASH_IS_FATAL}
-
-{$IFDEF MSI110}
-
-// examine a shortcut, and retrieve its descriptor information
-// if available.
-
-function MsiGetShortcutTargetA(szShortcutPath: LPCSTR; szProductCode: LPSTR;
- szFeatureId: LPSTR; szComponentCode: LPSTR): UINT; stdcall;
-{$EXTERNALSYM MsiGetShortcutTargetA}
-function MsiGetShortcutTargetW(szShortcutPath: LPCWSTR; szProductCode: LPWSTR;
- szFeatureId: LPWSTR; szComponentCode: LPWSTR): UINT; stdcall;
-{$EXTERNALSYM MsiGetShortcutTargetW}
-function MsiGetShortcutTarget(szShortcutPath: LPCTSTR; szProductCode: LPTSTR;
- szFeatureId: LPTSTR; szComponentCode: LPTSTR): UINT; stdcall;
-{$EXTERNALSYM MsiGetShortcutTarget}
-
-{$ENDIF MSI110}
-
-// checks to see if a product is managed
-// checks per-machine if called from system context, per-user if from
-// user context
-
-function MsiIsProductElevatedA(szProduct: LPCSTR; var pfElevated: BOOL): UINT; stdcall;
-{$EXTERNALSYM MsiIsProductElevatedA}
-function MsiIsProductElevatedW(szProduct: LPCWSTR; var pfElevated: BOOL): UINT; stdcall;
-{$EXTERNALSYM MsiIsProductElevatedW}
-function MsiIsProductElevated(szProduct: LPCTSTR; var pfElevated: BOOL): UINT; stdcall;
-{$EXTERNALSYM MsiIsProductElevated}
-
-// --------------------------------------------------------------------------
-// Error codes for installer access functions - until merged to winerr.h
-// --------------------------------------------------------------------------
-
-const
- ERROR_INSTALL_USEREXIT = 1602; // User cancel installation.
- {$EXTERNALSYM ERROR_INSTALL_USEREXIT}
- ERROR_INSTALL_FAILURE = 1603; // Fatal error during installation.
- {$EXTERNALSYM ERROR_INSTALL_FAILURE}
- ERROR_INSTALL_SUSPEND = 1604; // Installation suspended, incomplete.
- {$EXTERNALSYM ERROR_INSTALL_SUSPEND}
- ERROR_UNKNOWN_PRODUCT = 1605; // This action is only valid for products that are currently installed.
- {$EXTERNALSYM ERROR_UNKNOWN_PRODUCT}
- ERROR_UNKNOWN_FEATURE = 1606; // Feature ID not registered.
- {$EXTERNALSYM ERROR_UNKNOWN_FEATURE}
- ERROR_UNKNOWN_COMPONENT = 1607; // Component ID not registered.
- {$EXTERNALSYM ERROR_UNKNOWN_COMPONENT}
- ERROR_UNKNOWN_PROPERTY = 1608; // Unknown property.
- {$EXTERNALSYM ERROR_UNKNOWN_PROPERTY}
- ERROR_INVALID_HANDLE_STATE = 1609; // Handle is in an invalid state.
- {$EXTERNALSYM ERROR_INVALID_HANDLE_STATE}
- ERROR_BAD_CONFIGURATION = 1610; // The configuration data for this product is corrupt. Contact your support personnel.
- {$EXTERNALSYM ERROR_BAD_CONFIGURATION}
- ERROR_INDEX_ABSENT = 1611; // Component qualifier not present.
- {$EXTERNALSYM ERROR_INDEX_ABSENT}
- ERROR_INSTALL_SOURCE_ABSENT = 1612; // The installation source for this product is not available. Verify that the source exists and that you can access it.
- {$EXTERNALSYM ERROR_INSTALL_SOURCE_ABSENT}
- ERROR_PRODUCT_UNINSTALLED = 1614; // Product is uninstalled.
- {$EXTERNALSYM ERROR_PRODUCT_UNINSTALLED}
- ERROR_BAD_QUERY_SYNTAX = 1615; // SQL query syntax invalid or unsupported.
- {$EXTERNALSYM ERROR_BAD_QUERY_SYNTAX}
- ERROR_INVALID_FIELD = 1616; // Record field does not exist.
- {$EXTERNALSYM ERROR_INVALID_FIELD}
-
- ERROR_INSTALL_SERVICE_FAILURE = 1601; // The Windows Installer service could not be accessed. Contact your support personnel to verify that the Windows Installer service is properly registered.
- {$EXTERNALSYM ERROR_INSTALL_SERVICE_FAILURE}
- ERROR_INSTALL_PACKAGE_VERSION = 1613; // This installation package cannot be installed by the Windows Installer service. You must install a Windows service pack that contains a newer version of the Windows Installer service.
- {$EXTERNALSYM ERROR_INSTALL_PACKAGE_VERSION}
- ERROR_INSTALL_ALREADY_RUNNING = 1618; // Another installation is already in progress. Complete that installation before proceeding with this install.
- {$EXTERNALSYM ERROR_INSTALL_ALREADY_RUNNING}
- ERROR_INSTALL_PACKAGE_OPEN_FAILED = 1619; // This installation package could not be opened. Verify that the package exists and that you can access it, or contact the application vendor to verify that this is a valid Windows Installer package.
- {$EXTERNALSYM ERROR_INSTALL_PACKAGE_OPEN_FAILED}
- ERROR_INSTALL_PACKAGE_INVALID = 1620; // This installation package could not be opened. Contact the application vendor to verify that this is a valid Windows Installer package.
- {$EXTERNALSYM ERROR_INSTALL_PACKAGE_INVALID}
- ERROR_INSTALL_UI_FAILURE = 1621; // There was an error starting the Windows Installer service user interface. Contact your support personnel.
- {$EXTERNALSYM ERROR_INSTALL_UI_FAILURE}
- ERROR_INSTALL_LOG_FAILURE = 1622; // Error opening installation log file. Verify that the specified log file location exists and is writable.
- {$EXTERNALSYM ERROR_INSTALL_LOG_FAILURE}
- ERROR_INSTALL_LANGUAGE_UNSUPPORTED = 1623; // This language of this installation package is not supported by your system.
- {$EXTERNALSYM ERROR_INSTALL_LANGUAGE_UNSUPPORTED}
- ERROR_INSTALL_PACKAGE_REJECTED = 1625; // The system administrator has set policies to prevent this installation.
- {$EXTERNALSYM ERROR_INSTALL_PACKAGE_REJECTED}
-
- ERROR_FUNCTION_NOT_CALLED = 1626; // Function could not be executed.
- {$EXTERNALSYM ERROR_FUNCTION_NOT_CALLED}
- ERROR_FUNCTION_FAILED = 1627; // Function failed during execution.
- {$EXTERNALSYM ERROR_FUNCTION_FAILED}
- ERROR_INVALID_TABLE = 1628; // Invalid or unknown table specified.
- {$EXTERNALSYM ERROR_INVALID_TABLE}
- ERROR_DATATYPE_MISMATCH = 1629; // Data supplied is of wrong type.
- {$EXTERNALSYM ERROR_DATATYPE_MISMATCH}
- ERROR_UNSUPPORTED_TYPE = 1630; // Data of this type is not supported.
- {$EXTERNALSYM ERROR_UNSUPPORTED_TYPE}
- ERROR_CREATE_FAILED = 1631; // The Windows Installer service failed to start. Contact your support personnel.
- {$EXTERNALSYM ERROR_CREATE_FAILED}
-
- ERROR_INSTALL_TEMP_UNWRITABLE = 1632; // The Temp folder is on a drive that is full or is inaccessible. Free up space on the drive or verify that you have write permission on the Temp folder.
- {$EXTERNALSYM ERROR_INSTALL_TEMP_UNWRITABLE}
-
- ERROR_INSTALL_PLATFORM_UNSUPPORTED = 1633; // This installation package is not supported by this processor type. Contact your product vendor.
- {$EXTERNALSYM ERROR_INSTALL_PLATFORM_UNSUPPORTED}
-
- ERROR_INSTALL_NOTUSED = 1634; // Component not used on this machine
- {$EXTERNALSYM ERROR_INSTALL_NOTUSED}
-
- ERROR_INSTALL_TRANSFORM_FAILURE = 1624; // Error applying transforms. Verify that the specified transform paths are valid.
- {$EXTERNALSYM ERROR_INSTALL_TRANSFORM_FAILURE}
-
- ERROR_PATCH_PACKAGE_OPEN_FAILED = 1635; // This patch package could not be opened. Verify that the patch package exists and that you can access it, or contact the application vendor to verify that this is a valid Windows Installer patch package.
- {$EXTERNALSYM ERROR_PATCH_PACKAGE_OPEN_FAILED}
- ERROR_PATCH_PACKAGE_INVALID = 1636; // This patch package could not be opened. Contact the application vendor to verify that this is a valid Windows Installer patch package.
- {$EXTERNALSYM ERROR_PATCH_PACKAGE_INVALID}
- ERROR_PATCH_PACKAGE_UNSUPPORTED = 1637; // This patch package cannot be processed by the Windows Installer service. You must install a Windows service pack that contains a newer version of the Windows Installer service.
- {$EXTERNALSYM ERROR_PATCH_PACKAGE_UNSUPPORTED}
-
- ERROR_PRODUCT_VERSION = 1638; // Another version of this product is already installed. Installation of this version cannot continue. To configure or remove the existing version of this product, use Add/Remove Programs on the Control Panel.
- {$EXTERNALSYM ERROR_PRODUCT_VERSION}
-
- ERROR_INVALID_COMMAND_LINE = 1639; // Invalid command line argument. Consult the Windows Installer SDK for detailed command line help.
- {$EXTERNALSYM ERROR_INVALID_COMMAND_LINE}
-
-// The following three error codes are not returned from MSI version 1.0
-
- ERROR_INSTALL_REMOTE_DISALLOWED = 1640; // Configuration of this product is not permitted from remote sessions. Contact your administrator.
- {$EXTERNALSYM ERROR_INSTALL_REMOTE_DISALLOWED}
-
- ERROR_SUCCESS_REBOOT_INITIATED = 1641; // The requested operation completed successfully. The system will be restarted so the changes can take effect.
- {$EXTERNALSYM ERROR_SUCCESS_REBOOT_INITIATED}
-
- ERROR_PATCH_TARGET_NOT_FOUND = 1642; // The upgrade patch cannot be installed by the Windows Installer service because the program to be upgraded may be missing, or the upgrade patch may update a different version of the program. Verify that the program to be upgraded exists on your computer and that you have the correct upgrade patch.
- {$EXTERNALSYM ERROR_PATCH_TARGET_NOT_FOUND}
-
-// The following two error codes are not returned from MSI version 1.0, 1.1. or 1.2
-
- ERROR_PATCH_PACKAGE_REJECTED = 1643; // The patch package is not permitted by software restriction policy.
- {$EXTERNALSYM ERROR_PATCH_PACKAGE_REJECTED}
- ERROR_INSTALL_TRANSFORM_REJECTED = 1644; // One or more customizations are not permitted by software restriction policy.
- {$EXTERNALSYM ERROR_INSTALL_TRANSFORM_REJECTED}
-
-// The following error code is returned only from MSI post version 2.0
-
-// LOCALIZE BEGIN:
-
-//#ifndef ERROR_INSTALL_REMOTE_PROHIBITED
- ERROR_INSTALL_REMOTE_PROHIBITED = 1645; // The Windows Installer does not permit installation from a Remote Desktop Connection.
- {$EXTERNALSYM ERROR_INSTALL_REMOTE_PROHIBITED}
-
-//#endif
-
-// LOCALIZE END
-
-implementation
-
-const
- msilib = 'msi.dll';
- {$IFDEF UNICODE}
- AWSuffix = 'W';
- {$ELSE}
- AWSuffix = 'A';
- {$ENDIF UNICODE}
-
-{$IFDEF DYNAMIC_LINK}
-
-var
- _MsiCloseHandle: Pointer;
-
-function MsiCloseHandle;
-begin
- GetProcedureAddress(_MsiCloseHandle, msilib, 'MsiCloseHandle');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiCloseHandle]
- end;
-end;
-
-var
- _MsiCloseAllHandles: Pointer;
-
-function MsiCloseAllHandles;
-begin
- GetProcedureAddress(_MsiCloseAllHandles, msilib, 'MsiCloseAllHandles');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiCloseAllHandles]
- end;
-end;
-
-var
- _MsiSetInternalUI: Pointer;
-
-function MsiSetInternalUI;
-begin
- GetProcedureAddress(_MsiSetInternalUI, msilib, 'MsiSetInternalUI');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiSetInternalUI]
- end;
-end;
-
-var
- _MsiSetExternalUIA: Pointer;
-
-function MsiSetExternalUIA;
-begin
- GetProcedureAddress(_MsiSetExternalUIA, msilib, 'MsiSetExternalUIA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiSetExternalUIA]
- end;
-end;
-
-var
- _MsiSetExternalUIW: Pointer;
-
-function MsiSetExternalUIW;
-begin
- GetProcedureAddress(_MsiSetExternalUIW, msilib, 'MsiSetExternalUIW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiSetExternalUIW]
- end;
-end;
-
-var
- _MsiSetExternalUI: Pointer;
-
-function MsiSetExternalUI;
-begin
- GetProcedureAddress(_MsiSetExternalUI, msilib, 'MsiSetExternalUI' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiSetExternalUI]
- end;
-end;
-
-var
- _MsiEnableLogA: Pointer;
-
-function MsiEnableLogA;
-begin
- GetProcedureAddress(_MsiEnableLogA, msilib, 'MsiEnableLogA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiEnableLogA]
- end;
-end;
-
-var
- _MsiEnableLogW: Pointer;
-
-function MsiEnableLogW;
-begin
- GetProcedureAddress(_MsiEnableLogW, msilib, 'MsiEnableLogW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiEnableLogW]
- end;
-end;
-
-var
- _MsiEnableLog: Pointer;
-
-function MsiEnableLog;
-begin
- GetProcedureAddress(_MsiEnableLog, msilib, 'MsiEnableLog' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiEnableLog]
- end;
-end;
-
-var
- _MsiQueryProductStateA: Pointer;
-
-function MsiQueryProductStateA;
-begin
- GetProcedureAddress(_MsiQueryProductStateA, msilib, 'MsiQueryProductStateA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiQueryProductStateA]
- end;
-end;
-
-var
- _MsiQueryProductStateW: Pointer;
-
-function MsiQueryProductStateW;
-begin
- GetProcedureAddress(_MsiQueryProductStateW, msilib, 'MsiQueryProductStateW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiQueryProductStateW]
- end;
-end;
-
-var
- _MsiQueryProductState: Pointer;
-
-function MsiQueryProductState;
-begin
- GetProcedureAddress(_MsiQueryProductState, msilib, 'MsiQueryProductState' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiQueryProductState]
- end;
-end;
-
-var
- _MsiGetProductInfoA: Pointer;
-
-function MsiGetProductInfoA;
-begin
- GetProcedureAddress(_MsiGetProductInfoA, msilib, 'MsiGetProductInfoA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiGetProductInfoA]
- end;
-end;
-
-var
- _MsiGetProductInfoW: Pointer;
-
-function MsiGetProductInfoW;
-begin
- GetProcedureAddress(_MsiGetProductInfoW, msilib, 'MsiGetProductInfoW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiGetProductInfoW]
- end;
-end;
-
-var
- _MsiGetProductInfo: Pointer;
-
-function MsiGetProductInfo;
-begin
- GetProcedureAddress(_MsiGetProductInfo, msilib, 'MsiGetProductInfo' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiGetProductInfo]
- end;
-end;
-
-var
- _MsiInstallProductA: Pointer;
-
-function MsiInstallProductA;
-begin
- GetProcedureAddress(_MsiInstallProductA, msilib, 'MsiInstallProductA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiInstallProductA]
- end;
-end;
-
-var
- _MsiInstallProductW: Pointer;
-
-function MsiInstallProductW;
-begin
- GetProcedureAddress(_MsiInstallProductW, msilib, 'MsiInstallProductW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiInstallProductW]
- end;
-end;
-
-var
- _MsiInstallProduct: Pointer;
-
-function MsiInstallProduct;
-begin
- GetProcedureAddress(_MsiInstallProduct, msilib, 'MsiInstallProduct' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiInstallProduct]
- end;
-end;
-
-var
- _MsiConfigureProductA: Pointer;
-
-function MsiConfigureProductA;
-begin
- GetProcedureAddress(_MsiConfigureProductA, msilib, 'MsiConfigureProductA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiConfigureProductA]
- end;
-end;
-
-var
- _MsiConfigureProductW: Pointer;
-
-function MsiConfigureProductW;
-begin
- GetProcedureAddress(_MsiConfigureProductW, msilib, 'MsiConfigureProductW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiConfigureProductW]
- end;
-end;
-
-var
- _MsiConfigureProduct: Pointer;
-
-function MsiConfigureProduct;
-begin
- GetProcedureAddress(_MsiConfigureProduct, msilib, 'MsiConfigureProduct' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiConfigureProduct]
- end;
-end;
-
-var
- _MsiConfigureProductExA: Pointer;
-
-function MsiConfigureProductExA;
-begin
- GetProcedureAddress(_MsiConfigureProductExA, msilib, 'MsiConfigureProductExA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiConfigureProductExA]
- end;
-end;
-
-var
- _MsiConfigureProductExW: Pointer;
-
-function MsiConfigureProductExW;
-begin
- GetProcedureAddress(_MsiConfigureProductExW, msilib, 'MsiConfigureProductExW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiConfigureProductExW]
- end;
-end;
-
-var
- _MsiConfigureProductEx: Pointer;
-
-function MsiConfigureProductEx;
-begin
- GetProcedureAddress(_MsiConfigureProductEx, msilib, 'MsiConfigureProductEx' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiConfigureProductEx]
- end;
-end;
-
-var
- _MsiReinstallProductA: Pointer;
-
-function MsiReinstallProductA;
-begin
- GetProcedureAddress(_MsiReinstallProductA, msilib, 'MsiReinstallProductA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiReinstallProductA]
- end;
-end;
-
-var
- _MsiReinstallProductW: Pointer;
-
-function MsiReinstallProductW;
-begin
- GetProcedureAddress(_MsiReinstallProductW, msilib, 'MsiReinstallProductW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiReinstallProductW]
- end;
-end;
-
-var
- _MsiReinstallProduct: Pointer;
-
-function MsiReinstallProduct;
-begin
- GetProcedureAddress(_MsiReinstallProduct, msilib, 'MsiReinstallProduct' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiReinstallProduct]
- end;
-end;
-
-var
- _MsiAdvertiseProductExA: Pointer;
-
-function MsiAdvertiseProductExA;
-begin
- GetProcedureAddress(_MsiAdvertiseProductExA, msilib, 'MsiAdvertiseProductExA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiAdvertiseProductExA]
- end;
-end;
-
-var
- _MsiAdvertiseProductExW: Pointer;
-
-function MsiAdvertiseProductExW;
-begin
- GetProcedureAddress(_MsiAdvertiseProductExW, msilib, 'MsiAdvertiseProductExW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiAdvertiseProductExW]
- end;
-end;
-
-var
- _MsiAdvertiseProductEx: Pointer;
-
-function MsiAdvertiseProductEx;
-begin
- GetProcedureAddress(_MsiAdvertiseProductEx, msilib, 'MsiAdvertiseProductEx' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiAdvertiseProductEx]
- end;
-end;
-
-var
- _MsiAdvertiseProductA: Pointer;
-
-function MsiAdvertiseProductA;
-begin
- GetProcedureAddress(_MsiAdvertiseProductA, msilib, 'MsiAdvertiseProductA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiAdvertiseProductA]
- end;
-end;
-
-var
- _MsiAdvertiseProductW: Pointer;
-
-function MsiAdvertiseProductW;
-begin
- GetProcedureAddress(_MsiAdvertiseProductW, msilib, 'MsiAdvertiseProductW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiAdvertiseProductW]
- end;
-end;
-
-var
- _MsiAdvertiseProduct: Pointer;
-
-function MsiAdvertiseProduct;
-begin
- GetProcedureAddress(_MsiAdvertiseProduct, msilib, 'MsiAdvertiseProduct' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiAdvertiseProduct]
- end;
-end;
-
-var
- _MsiProcessAdvertiseScriptA: Pointer;
-
-function MsiProcessAdvertiseScriptA;
-begin
- GetProcedureAddress(_MsiProcessAdvertiseScriptA, msilib, 'MsiProcessAdvertiseScriptA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiProcessAdvertiseScriptA]
- end;
-end;
-
-var
- _MsiProcessAdvertiseScriptW: Pointer;
-
-function MsiProcessAdvertiseScriptW;
-begin
- GetProcedureAddress(_MsiProcessAdvertiseScriptW, msilib, 'MsiProcessAdvertiseScriptW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiProcessAdvertiseScriptW]
- end;
-end;
-
-var
- _MsiProcessAdvertiseScript: Pointer;
-
-function MsiProcessAdvertiseScript;
-begin
- GetProcedureAddress(_MsiProcessAdvertiseScript, msilib, 'MsiProcessAdvertiseScript' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiProcessAdvertiseScript]
- end;
-end;
-
-var
- _MsiAdvertiseScriptA: Pointer;
-
-function MsiAdvertiseScriptA;
-begin
- GetProcedureAddress(_MsiAdvertiseScriptA, msilib, 'MsiAdvertiseScriptA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiAdvertiseScriptA]
- end;
-end;
-
-var
- _MsiAdvertiseScriptW: Pointer;
-
-function MsiAdvertiseScriptW;
-begin
- GetProcedureAddress(_MsiAdvertiseScriptW, msilib, 'MsiAdvertiseScriptW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiAdvertiseScriptW]
- end;
-end;
-
-var
- _MsiAdvertiseScript: Pointer;
-
-function MsiAdvertiseScript;
-begin
- GetProcedureAddress(_MsiAdvertiseScript, msilib, 'MsiAdvertiseScript' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiAdvertiseScript]
- end;
-end;
-
-var
- _MsiGetProductInfoFromScriptA: Pointer;
-
-function MsiGetProductInfoFromScriptA;
-begin
- GetProcedureAddress(_MsiGetProductInfoFromScriptA, msilib, 'MsiGetProductInfoFromScriptA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiGetProductInfoFromScriptA]
- end;
-end;
-
-var
- _MsiGetProductInfoFromScriptW: Pointer;
-
-function MsiGetProductInfoFromScriptW;
-begin
- GetProcedureAddress(_MsiGetProductInfoFromScriptW, msilib, 'MsiGetProductInfoFromScriptW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiGetProductInfoFromScriptW]
- end;
-end;
-
-var
- _MsiGetProductInfoFromScript: Pointer;
-
-function MsiGetProductInfoFromScript;
-begin
- GetProcedureAddress(_MsiGetProductInfoFromScript, msilib, 'MsiGetProductInfoFromScript' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiGetProductInfoFromScript]
- end;
-end;
-
-var
- _MsiGetProductCodeA: Pointer;
-
-function MsiGetProductCodeA;
-begin
- GetProcedureAddress(_MsiGetProductCodeA, msilib, 'MsiGetProductCodeA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiGetProductCodeA]
- end;
-end;
-
-var
- _MsiGetProductCodeW: Pointer;
-
-function MsiGetProductCodeW;
-begin
- GetProcedureAddress(_MsiGetProductCodeW, msilib, 'MsiGetProductCodeW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiGetProductCodeW]
- end;
-end;
-
-var
- _MsiGetProductCode: Pointer;
-
-function MsiGetProductCode;
-begin
- GetProcedureAddress(_MsiGetProductCode, msilib, 'MsiGetProductCode' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiGetProductCode]
- end;
-end;
-
-var
- _MsiGetUserInfoA: Pointer;
-
-function MsiGetUserInfoA;
-begin
- GetProcedureAddress(_MsiGetUserInfoA, msilib, 'MsiGetUserInfoA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiGetUserInfoA]
- end;
-end;
-
-var
- _MsiGetUserInfoW: Pointer;
-
-function MsiGetUserInfoW;
-begin
- GetProcedureAddress(_MsiGetUserInfoW, msilib, 'MsiGetUserInfoW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiGetUserInfoW]
- end;
-end;
-
-var
- _MsiGetUserInfo: Pointer;
-
-function MsiGetUserInfo;
-begin
- GetProcedureAddress(_MsiGetUserInfo, msilib, 'MsiGetUserInfo' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiGetUserInfo]
- end;
-end;
-
-var
- _MsiCollectUserInfoA: Pointer;
-
-function MsiCollectUserInfoA;
-begin
- GetProcedureAddress(_MsiCollectUserInfoA, msilib, 'MsiCollectUserInfoA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiCollectUserInfoA]
- end;
-end;
-
-var
- _MsiCollectUserInfoW: Pointer;
-
-function MsiCollectUserInfoW;
-begin
- GetProcedureAddress(_MsiCollectUserInfoW, msilib, 'MsiCollectUserInfoW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiCollectUserInfoW]
- end;
-end;
-
-var
- _MsiCollectUserInfo: Pointer;
-
-function MsiCollectUserInfo;
-begin
- GetProcedureAddress(_MsiCollectUserInfo, msilib, 'MsiCollectUserInfo' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiCollectUserInfo]
- end;
-end;
-
-var
- _MsiApplyPatchA: Pointer;
-
-function MsiApplyPatchA;
-begin
- GetProcedureAddress(_MsiApplyPatchA, msilib, 'MsiApplyPatchA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiApplyPatchA]
- end;
-end;
-
-var
- _MsiApplyPatchW: Pointer;
-
-function MsiApplyPatchW;
-begin
- GetProcedureAddress(_MsiApplyPatchW, msilib, 'MsiApplyPatchW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiApplyPatchW]
- end;
-end;
-
-var
- _MsiApplyPatch: Pointer;
-
-function MsiApplyPatch;
-begin
- GetProcedureAddress(_MsiApplyPatch, msilib, 'MsiApplyPatch' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiApplyPatch]
- end;
-end;
-
-var
- _MsiGetPatchInfoA: Pointer;
-
-function MsiGetPatchInfoA;
-begin
- GetProcedureAddress(_MsiGetPatchInfoA, msilib, 'MsiGetPatchInfoA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiGetPatchInfoA]
- end;
-end;
-
-var
- _MsiGetPatchInfoW: Pointer;
-
-function MsiGetPatchInfoW;
-begin
- GetProcedureAddress(_MsiGetPatchInfoW, msilib, 'MsiGetPatchInfoW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiGetPatchInfoW]
- end;
-end;
-
-var
- _MsiGetPatchInfo: Pointer;
-
-function MsiGetPatchInfo;
-begin
- GetProcedureAddress(_MsiGetPatchInfo, msilib, 'MsiGetPatchInfo' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiGetPatchInfo]
- end;
-end;
-
-var
- _MsiEnumPatchesA: Pointer;
-
-function MsiEnumPatchesA;
-begin
- GetProcedureAddress(_MsiEnumPatchesA, msilib, 'MsiEnumPatchesA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiEnumPatchesA]
- end;
-end;
-
-var
- _MsiEnumPatchesW: Pointer;
-
-function MsiEnumPatchesW;
-begin
- GetProcedureAddress(_MsiEnumPatchesW, msilib, 'MsiEnumPatchesW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiEnumPatchesW]
- end;
-end;
-
-var
- _MsiEnumPatches: Pointer;
-
-function MsiEnumPatches;
-begin
- GetProcedureAddress(_MsiEnumPatches, msilib, 'MsiEnumPatches' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiEnumPatches]
- end;
-end;
-
-var
- _MsiQueryFeatureStateA: Pointer;
-
-function MsiQueryFeatureStateA;
-begin
- GetProcedureAddress(_MsiQueryFeatureStateA, msilib, 'MsiQueryFeatureStateA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiQueryFeatureStateA]
- end;
-end;
-
-var
- _MsiQueryFeatureStateW: Pointer;
-
-function MsiQueryFeatureStateW;
-begin
- GetProcedureAddress(_MsiQueryFeatureStateW, msilib, 'MsiQueryFeatureStateW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiQueryFeatureStateW]
- end;
-end;
-
-var
- _MsiQueryFeatureState: Pointer;
-
-function MsiQueryFeatureState;
-begin
- GetProcedureAddress(_MsiQueryFeatureState, msilib, 'MsiQueryFeatureState' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiQueryFeatureState]
- end;
-end;
-
-var
- _MsiUseFeatureA: Pointer;
-
-function MsiUseFeatureA;
-begin
- GetProcedureAddress(_MsiUseFeatureA, msilib, 'MsiUseFeatureA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiUseFeatureA]
- end;
-end;
-
-var
- _MsiUseFeatureW: Pointer;
-
-function MsiUseFeatureW;
-begin
- GetProcedureAddress(_MsiUseFeatureW, msilib, 'MsiUseFeatureW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiUseFeatureW]
- end;
-end;
-
-var
- _MsiUseFeature: Pointer;
-
-function MsiUseFeature;
-begin
- GetProcedureAddress(_MsiUseFeature, msilib, 'MsiUseFeature' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiUseFeature]
- end;
-end;
-
-var
- _MsiUseFeatureExA: Pointer;
-
-function MsiUseFeatureExA;
-begin
- GetProcedureAddress(_MsiUseFeatureExA, msilib, 'MsiUseFeatureExA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiUseFeatureExA]
- end;
-end;
-
-var
- _MsiUseFeatureExW: Pointer;
-
-function MsiUseFeatureExW;
-begin
- GetProcedureAddress(_MsiUseFeatureExW, msilib, 'MsiUseFeatureExW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiUseFeatureExW]
- end;
-end;
-
-var
- _MsiUseFeatureEx: Pointer;
-
-function MsiUseFeatureEx;
-begin
- GetProcedureAddress(_MsiUseFeatureEx, msilib, 'MsiUseFeatureEx' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiUseFeatureEx]
- end;
-end;
-
-var
- _MsiGetFeatureUsageA: Pointer;
-
-function MsiGetFeatureUsageA;
-begin
- GetProcedureAddress(_MsiGetFeatureUsageA, msilib, 'MsiGetFeatureUsageA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiGetFeatureUsageA]
- end;
-end;
-
-var
- _MsiGetFeatureUsageW: Pointer;
-
-function MsiGetFeatureUsageW;
-begin
- GetProcedureAddress(_MsiGetFeatureUsageW, msilib, 'MsiGetFeatureUsageW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiGetFeatureUsageW]
- end;
-end;
-
-var
- _MsiGetFeatureUsage: Pointer;
-
-function MsiGetFeatureUsage;
-begin
- GetProcedureAddress(_MsiGetFeatureUsage, msilib, 'MsiGetFeatureUsage' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiGetFeatureUsage]
- end;
-end;
-
-var
- _MsiConfigureFeatureA: Pointer;
-
-function MsiConfigureFeatureA;
-begin
- GetProcedureAddress(_MsiConfigureFeatureA, msilib, 'MsiConfigureFeatureA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiConfigureFeatureA]
- end;
-end;
-
-var
- _MsiConfigureFeatureW: Pointer;
-
-function MsiConfigureFeatureW;
-begin
- GetProcedureAddress(_MsiConfigureFeatureW, msilib, 'MsiConfigureFeatureW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiConfigureFeatureW]
- end;
-end;
-
-var
- _MsiConfigureFeature: Pointer;
-
-function MsiConfigureFeature;
-begin
- GetProcedureAddress(_MsiConfigureFeature, msilib, 'MsiConfigureFeature' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiConfigureFeature]
- end;
-end;
-
-var
- _MsiReinstallFeatureA: Pointer;
-
-function MsiReinstallFeatureA;
-begin
- GetProcedureAddress(_MsiReinstallFeatureA, msilib, 'MsiReinstallFeatureA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiReinstallFeatureA]
- end;
-end;
-
-var
- _MsiReinstallFeatureW: Pointer;
-
-function MsiReinstallFeatureW;
-begin
- GetProcedureAddress(_MsiReinstallFeatureW, msilib, 'MsiReinstallFeatureW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiReinstallFeatureW]
- end;
-end;
-
-var
- _MsiReinstallFeature: Pointer;
-
-function MsiReinstallFeature;
-begin
- GetProcedureAddress(_MsiReinstallFeature, msilib, 'MsiReinstallFeature' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiReinstallFeature]
- end;
-end;
-
-var
- _MsiProvideComponentA: Pointer;
-
-function MsiProvideComponentA;
-begin
- GetProcedureAddress(_MsiProvideComponentA, msilib, 'MsiProvideComponentA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiProvideComponentA]
- end;
-end;
-
-var
- _MsiProvideComponentW: Pointer;
-
-function MsiProvideComponentW;
-begin
- GetProcedureAddress(_MsiProvideComponentW, msilib, 'MsiProvideComponentW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiProvideComponentW]
- end;
-end;
-
-var
- _MsiProvideComponent: Pointer;
-
-function MsiProvideComponent;
-begin
- GetProcedureAddress(_MsiProvideComponent, msilib, 'MsiProvideComponent' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiProvideComponent]
- end;
-end;
-
-var
- _MsiProvideQualifiedComponentA: Pointer;
-
-function MsiProvideQualifiedComponentA;
-begin
- GetProcedureAddress(_MsiProvideQualifiedComponentA, msilib, 'MsiProvideQualifiedComponentA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiProvideQualifiedComponentA]
- end;
-end;
-
-var
- _MsiProvideQualifiedComponentW: Pointer;
-
-function MsiProvideQualifiedComponentW;
-begin
- GetProcedureAddress(_MsiProvideQualifiedComponentW, msilib, 'MsiProvideQualifiedComponentW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiProvideQualifiedComponentW]
- end;
-end;
-
-var
- _MsiProvideQualifiedComponent: Pointer;
-
-function MsiProvideQualifiedComponent;
-begin
- GetProcedureAddress(_MsiProvideQualifiedComponent, msilib, 'MsiProvideQualifiedComponent' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiProvideQualifiedComponent]
- end;
-end;
-
-var
- _MsiProvideQualifiedComponentExA: Pointer;
-
-function MsiProvideQualifiedComponentExA;
-begin
- GetProcedureAddress(_MsiProvideQualifiedComponentExA, msilib, 'MsiProvideQualifiedComponentExA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiProvideQualifiedComponentExA]
- end;
-end;
-
-var
- _MsiProvideQualifiedComponentExW: Pointer;
-
-function MsiProvideQualifiedComponentExW;
-begin
- GetProcedureAddress(_MsiProvideQualifiedComponentExW, msilib, 'MsiProvideQualifiedComponentExW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiProvideQualifiedComponentExW]
- end;
-end;
-
-var
- _MsiProvideQualifiedComponentEx: Pointer;
-
-function MsiProvideQualifiedComponentEx;
-begin
- GetProcedureAddress(_MsiProvideQualifiedComponentEx, msilib, 'MsiProvideQualifiedComponentEx' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiProvideQualifiedComponentEx]
- end;
-end;
-
-var
- _MsiGetComponentPathA: Pointer;
-
-function MsiGetComponentPathA;
-begin
- GetProcedureAddress(_MsiGetComponentPathA, msilib, 'MsiGetComponentPathA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiGetComponentPathA]
- end;
-end;
-
-var
- _MsiGetComponentPathW: Pointer;
-
-function MsiGetComponentPathW;
-begin
- GetProcedureAddress(_MsiGetComponentPathW, msilib, 'MsiGetComponentPathW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiGetComponentPathW]
- end;
-end;
-
-var
- _MsiGetComponentPath: Pointer;
-
-function MsiGetComponentPath;
-begin
- GetProcedureAddress(_MsiGetComponentPath, msilib, 'MsiGetComponentPath' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiGetComponentPath]
- end;
-end;
-
-var
- _MsiProvideAssemblyA: Pointer;
-
-function MsiProvideAssemblyA;
-begin
- GetProcedureAddress(_MsiProvideAssemblyA, msilib, 'MsiProvideAssemblyA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiProvideAssemblyA]
- end;
-end;
-
-var
- _MsiProvideAssemblyW: Pointer;
-
-function MsiProvideAssemblyW;
-begin
- GetProcedureAddress(_MsiProvideAssemblyW, msilib, 'MsiProvideAssemblyW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiProvideAssemblyW]
- end;
-end;
-
-var
- _MsiProvideAssembly: Pointer;
-
-function MsiProvideAssembly;
-begin
- GetProcedureAddress(_MsiProvideAssembly, msilib, 'MsiProvideAssembly' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiProvideAssembly]
- end;
-end;
-
-var
- _MsiEnumProductsA: Pointer;
-
-function MsiEnumProductsA;
-begin
- GetProcedureAddress(_MsiEnumProductsA, msilib, 'MsiEnumProductsA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiEnumProductsA]
- end;
-end;
-
-var
- _MsiEnumProductsW: Pointer;
-
-function MsiEnumProductsW;
-begin
- GetProcedureAddress(_MsiEnumProductsW, msilib, 'MsiEnumProductsW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiEnumProductsW]
- end;
-end;
-
-var
- _MsiEnumProducts: Pointer;
-
-function MsiEnumProducts;
-begin
- GetProcedureAddress(_MsiEnumProducts, msilib, 'MsiEnumProducts' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiEnumProducts]
- end;
-end;
-
-{$IFDEF MSI110}
-
-var
- _MsiEnumRelatedProductsA: Pointer;
-
-function MsiEnumRelatedProductsA;
-begin
- GetProcedureAddress(_MsiEnumRelatedProductsA, msilib, 'MsiEnumRelatedProductsA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiEnumRelatedProductsA]
- end;
-end;
-
-var
- _MsiEnumRelatedProductsW: Pointer;
-
-function MsiEnumRelatedProductsW;
-begin
- GetProcedureAddress(_MsiEnumRelatedProductsW, msilib, 'MsiEnumRelatedProductsW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiEnumRelatedProductsW]
- end;
-end;
-
-var
- _MsiEnumRelatedProducts: Pointer;
-
-function MsiEnumRelatedProducts;
-begin
- GetProcedureAddress(_MsiEnumRelatedProducts, msilib, 'MsiEnumRelatedProducts' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiEnumRelatedProducts]
- end;
-end;
-
-{$ENDIF MSI110}
-
-var
- _MsiEnumFeaturesA: Pointer;
-
-function MsiEnumFeaturesA;
-begin
- GetProcedureAddress(_MsiEnumFeaturesA, msilib, 'MsiEnumFeaturesA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiEnumFeaturesA]
- end;
-end;
-
-var
- _MsiEnumFeaturesW: Pointer;
-
-function MsiEnumFeaturesW;
-begin
- GetProcedureAddress(_MsiEnumFeaturesW, msilib, 'MsiEnumFeaturesW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiEnumFeaturesW]
- end;
-end;
-
-var
- _MsiEnumFeatures: Pointer;
-
-function MsiEnumFeatures;
-begin
- GetProcedureAddress(_MsiEnumFeatures, msilib, 'MsiEnumFeatures' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiEnumFeatures]
- end;
-end;
-
-var
- _MsiEnumComponentsA: Pointer;
-
-function MsiEnumComponentsA;
-begin
- GetProcedureAddress(_MsiEnumComponentsA, msilib, 'MsiEnumComponentsA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiEnumComponentsA]
- end;
-end;
-
-var
- _MsiEnumComponentsW: Pointer;
-
-function MsiEnumComponentsW;
-begin
- GetProcedureAddress(_MsiEnumComponentsW, msilib, 'MsiEnumComponentsW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiEnumComponentsW]
- end;
-end;
-
-var
- _MsiEnumComponents: Pointer;
-
-function MsiEnumComponents;
-begin
- GetProcedureAddress(_MsiEnumComponents, msilib, 'MsiEnumComponents' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiEnumComponents]
- end;
-end;
-
-var
- _MsiEnumClientsA: Pointer;
-
-function MsiEnumClientsA;
-begin
- GetProcedureAddress(_MsiEnumClientsA, msilib, 'MsiEnumClientsA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiEnumClientsA]
- end;
-end;
-
-var
- _MsiEnumClientsW: Pointer;
-
-function MsiEnumClientsW;
-begin
- GetProcedureAddress(_MsiEnumClientsW, msilib, 'MsiEnumClientsW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiEnumClientsW]
- end;
-end;
-
-var
- _MsiEnumClients: Pointer;
-
-function MsiEnumClients;
-begin
- GetProcedureAddress(_MsiEnumClients, msilib, 'MsiEnumClients' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiEnumClients]
- end;
-end;
-
-var
- _MsiEnumComponentQualifiersA: Pointer;
-
-function MsiEnumComponentQualifiersA;
-begin
- GetProcedureAddress(_MsiEnumComponentQualifiersA, msilib, 'MsiEnumComponentQualifiersA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiEnumComponentQualifiersA]
- end;
-end;
-
-var
- _MsiEnumComponentQualifiersW: Pointer;
-
-function MsiEnumComponentQualifiersW;
-begin
- GetProcedureAddress(_MsiEnumComponentQualifiersW, msilib, 'MsiEnumComponentQualifiersW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiEnumComponentQualifiersW]
- end;
-end;
-
-var
- _MsiEnumComponentQualifiers: Pointer;
-
-function MsiEnumComponentQualifiers;
-begin
- GetProcedureAddress(_MsiEnumComponentQualifiers, msilib, 'MsiEnumComponentQualifiers' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiEnumComponentQualifiers]
- end;
-end;
-
-var
- _MsiOpenProductA: Pointer;
-
-function MsiOpenProductA;
-begin
- GetProcedureAddress(_MsiOpenProductA, msilib, 'MsiOpenProductA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiOpenProductA]
- end;
-end;
-
-var
- _MsiOpenProductW: Pointer;
-
-function MsiOpenProductW;
-begin
- GetProcedureAddress(_MsiOpenProductW, msilib, 'MsiOpenProductW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiOpenProductW]
- end;
-end;
-
-var
- _MsiOpenProduct: Pointer;
-
-function MsiOpenProduct;
-begin
- GetProcedureAddress(_MsiOpenProduct, msilib, 'MsiOpenProduct' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiOpenProduct]
- end;
-end;
-
-var
- _MsiOpenPackageA: Pointer;
-
-function MsiOpenPackageA;
-begin
- GetProcedureAddress(_MsiOpenPackageA, msilib, 'MsiOpenPackageA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiOpenPackageA]
- end;
-end;
-
-var
- _MsiOpenPackageW: Pointer;
-
-function MsiOpenPackageW;
-begin
- GetProcedureAddress(_MsiOpenPackageW, msilib, 'MsiOpenPackageW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiOpenPackageW]
- end;
-end;
-
-var
- _MsiOpenPackage: Pointer;
-
-function MsiOpenPackage;
-begin
- GetProcedureAddress(_MsiOpenPackage, msilib, 'MsiOpenPackage' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiOpenPackage]
- end;
-end;
-
-var
- _MsiOpenPackageExA: Pointer;
-
-function MsiOpenPackageExA;
-begin
- GetProcedureAddress(_MsiOpenPackageExA, msilib, 'MsiOpenPackageExA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiOpenPackageExA]
- end;
-end;
-
-var
- _MsiOpenPackageExW: Pointer;
-
-function MsiOpenPackageExW;
-begin
- GetProcedureAddress(_MsiOpenPackageExW, msilib, 'MsiOpenPackageExW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiOpenPackageExW]
- end;
-end;
-
-var
- _MsiOpenPackageEx: Pointer;
-
-function MsiOpenPackageEx;
-begin
- GetProcedureAddress(_MsiOpenPackageEx, msilib, 'MsiOpenPackageEx' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiOpenPackageEx]
- end;
-end;
-
-var
- _MsiGetProductPropertyA: Pointer;
-
-function MsiGetProductPropertyA;
-begin
- GetProcedureAddress(_MsiGetProductPropertyA, msilib, 'MsiGetProductPropertyA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiGetProductPropertyA]
- end;
-end;
-
-var
- _MsiGetProductPropertyW: Pointer;
-
-function MsiGetProductPropertyW;
-begin
- GetProcedureAddress(_MsiGetProductPropertyW, msilib, 'MsiGetProductPropertyW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiGetProductPropertyW]
- end;
-end;
-
-var
- _MsiGetProductProperty: Pointer;
-
-function MsiGetProductProperty;
-begin
- GetProcedureAddress(_MsiGetProductProperty, msilib, 'MsiGetProductProperty' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiGetProductProperty]
- end;
-end;
-
-var
- _MsiVerifyPackageA: Pointer;
-
-function MsiVerifyPackageA;
-begin
- GetProcedureAddress(_MsiVerifyPackageA, msilib, 'MsiVerifyPackageA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiVerifyPackageA]
- end;
-end;
-
-var
- _MsiVerifyPackageW: Pointer;
-
-function MsiVerifyPackageW;
-begin
- GetProcedureAddress(_MsiVerifyPackageW, msilib, 'MsiVerifyPackageW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiVerifyPackageW]
- end;
-end;
-
-var
- _MsiVerifyPackage: Pointer;
-
-function MsiVerifyPackage;
-begin
- GetProcedureAddress(_MsiVerifyPackage, msilib, 'MsiVerifyPackage' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiVerifyPackage]
- end;
-end;
-
-var
- _MsiGetFeatureInfoA: Pointer;
-
-function MsiGetFeatureInfoA;
-begin
- GetProcedureAddress(_MsiGetFeatureInfoA, msilib, 'MsiGetFeatureInfoA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiGetFeatureInfoA]
- end;
-end;
-
-var
- _MsiGetFeatureInfoW: Pointer;
-
-function MsiGetFeatureInfoW;
-begin
- GetProcedureAddress(_MsiGetFeatureInfoW, msilib, 'MsiGetFeatureInfoW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiGetFeatureInfoW]
- end;
-end;
-
-var
- _MsiGetFeatureInfo: Pointer;
-
-function MsiGetFeatureInfo;
-begin
- GetProcedureAddress(_MsiGetFeatureInfo, msilib, 'MsiGetFeatureInfo' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiGetFeatureInfo]
- end;
-end;
-
-var
- _MsiInstallMissingComponentA: Pointer;
-
-function MsiInstallMissingComponentA;
-begin
- GetProcedureAddress(_MsiInstallMissingComponentA, msilib, 'MsiInstallMissingComponentA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiInstallMissingComponentA]
- end;
-end;
-
-var
- _MsiInstallMissingComponentW: Pointer;
-
-function MsiInstallMissingComponentW;
-begin
- GetProcedureAddress(_MsiInstallMissingComponentW, msilib, 'MsiInstallMissingComponentW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiInstallMissingComponentW]
- end;
-end;
-
-var
- _MsiInstallMissingComponent: Pointer;
-
-function MsiInstallMissingComponent;
-begin
- GetProcedureAddress(_MsiInstallMissingComponent, msilib, 'MsiInstallMissingComponent' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiInstallMissingComponent]
- end;
-end;
-
-var
- _MsiInstallMissingFileA: Pointer;
-
-function MsiInstallMissingFileA;
-begin
- GetProcedureAddress(_MsiInstallMissingFileA, msilib, 'MsiInstallMissingFileA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiInstallMissingFileA]
- end;
-end;
-
-var
- _MsiInstallMissingFileW: Pointer;
-
-function MsiInstallMissingFileW;
-begin
- GetProcedureAddress(_MsiInstallMissingFileW, msilib, 'MsiInstallMissingFileW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiInstallMissingFileW]
- end;
-end;
-
-var
- _MsiInstallMissingFile: Pointer;
-
-function MsiInstallMissingFile;
-begin
- GetProcedureAddress(_MsiInstallMissingFile, msilib, 'MsiInstallMissingFile' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiInstallMissingFile]
- end;
-end;
-
-var
- _MsiLocateComponentA: Pointer;
-
-function MsiLocateComponentA;
-begin
- GetProcedureAddress(_MsiLocateComponentA, msilib, 'MsiLocateComponentA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiLocateComponentA]
- end;
-end;
-
-var
- _MsiLocateComponentW: Pointer;
-
-function MsiLocateComponentW;
-begin
- GetProcedureAddress(_MsiLocateComponentW, msilib, 'MsiLocateComponentW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiLocateComponentW]
- end;
-end;
-
-var
- _MsiLocateComponent: Pointer;
-
-function MsiLocateComponent;
-begin
- GetProcedureAddress(_MsiLocateComponent, msilib, 'MsiLocateComponent' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiLocateComponent]
- end;
-end;
-
-{$IFDEF MSI110}
-
-var
- _MsiSourceListClearAllA: Pointer;
-
-function MsiSourceListClearAllA;
-begin
- GetProcedureAddress(_MsiSourceListClearAllA, msilib, 'MsiSourceListClearAllA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiSourceListClearAllA]
- end;
-end;
-
-var
- _MsiSourceListClearAllW: Pointer;
-
-function MsiSourceListClearAllW;
-begin
- GetProcedureAddress(_MsiSourceListClearAllW, msilib, 'MsiSourceListClearAllW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiSourceListClearAllW]
- end;
-end;
-
-var
- _MsiSourceListClearAll: Pointer;
-
-function MsiSourceListClearAll;
-begin
- GetProcedureAddress(_MsiSourceListClearAll, msilib, 'MsiSourceListClearAll' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiSourceListClearAll]
- end;
-end;
-
-var
- _MsiSourceListAddSourceA: Pointer;
-
-function MsiSourceListAddSourceA;
-begin
- GetProcedureAddress(_MsiSourceListAddSourceA, msilib, 'MsiSourceListAddSourceA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiSourceListAddSourceA]
- end;
-end;
-
-var
- _MsiSourceListAddSourceW: Pointer;
-
-function MsiSourceListAddSourceW;
-begin
- GetProcedureAddress(_MsiSourceListAddSourceW, msilib, 'MsiSourceListAddSourceW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiSourceListAddSourceW]
- end;
-end;
-
-var
- _MsiSourceListAddSource: Pointer;
-
-function MsiSourceListAddSource;
-begin
- GetProcedureAddress(_MsiSourceListAddSource, msilib, 'MsiSourceListAddSource' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiSourceListAddSource]
- end;
-end;
-
-var
- _MsiSourceListForceResolutionA: Pointer;
-
-function MsiSourceListForceResolutionA;
-begin
- GetProcedureAddress(_MsiSourceListForceResolutionA, msilib, 'MsiSourceListForceResolutionA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiSourceListForceResolutionA]
- end;
-end;
-
-var
- _MsiSourceListForceResolutionW: Pointer;
-
-function MsiSourceListForceResolutionW;
-begin
- GetProcedureAddress(_MsiSourceListForceResolutionW, msilib, 'MsiSourceListForceResolutionW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiSourceListForceResolutionW]
- end;
-end;
-
-var
- _MsiSourceListForceResolution: Pointer;
-
-function MsiSourceListForceResolution;
-begin
- GetProcedureAddress(_MsiSourceListForceResolution, msilib, 'MsiSourceListForceResolution' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiSourceListForceResolution]
- end;
-end;
-
-{$ENDIF MSI110}
-
-var
- _MsiGetFileVersionA: Pointer;
-
-function MsiGetFileVersionA;
-begin
- GetProcedureAddress(_MsiGetFileVersionA, msilib, 'MsiGetFileVersionA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiGetFileVersionA]
- end;
-end;
-
-var
- _MsiGetFileVersionW: Pointer;
-
-function MsiGetFileVersionW;
-begin
- GetProcedureAddress(_MsiGetFileVersionW, msilib, 'MsiGetFileVersionW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiGetFileVersionW]
- end;
-end;
-
-var
- _MsiGetFileVersion: Pointer;
-
-function MsiGetFileVersion;
-begin
- GetProcedureAddress(_MsiGetFileVersion, msilib, 'MsiGetFileVersion' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiGetFileVersion]
- end;
-end;
-
-var
- _MsiGetFileHashA: Pointer;
-
-function MsiGetFileHashA;
-begin
- GetProcedureAddress(_MsiGetFileHashA, msilib, 'MsiGetFileHashA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiGetFileHashA]
- end;
-end;
-
-var
- _MsiGetFileHashW: Pointer;
-
-function MsiGetFileHashW;
-begin
- GetProcedureAddress(_MsiGetFileHashW, msilib, 'MsiGetFileHashW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiGetFileHashW]
- end;
-end;
-
-var
- _MsiGetFileHash: Pointer;
-
-function MsiGetFileHash;
-begin
- GetProcedureAddress(_MsiGetFileHash, msilib, 'MsiGetFileHash' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiGetFileHash]
- end;
-end;
-
-var
- _MsiGetFileSignatureInformationA: Pointer;
-
-function MsiGetFileSignatureInformationA;
-begin
- GetProcedureAddress(_MsiGetFileSignatureInformationA, msilib, 'MsiGetFileSignatureInformationA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiGetFileSignatureInformationA]
- end;
-end;
-
-var
- _MsiGetFileSignatureInformationW: Pointer;
-
-function MsiGetFileSignatureInformationW;
-begin
- GetProcedureAddress(_MsiGetFileSignatureInformationW, msilib, 'MsiGetFileSignatureInformationW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiGetFileSignatureInformationW]
- end;
-end;
-
-var
- _MsiGetFileSignatureInformation: Pointer;
-
-function MsiGetFileSignatureInformation;
-begin
- GetProcedureAddress(_MsiGetFileSignatureInformation, msilib, 'MsiGetFileSignatureInformation' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiGetFileSignatureInformation]
- end;
-end;
-
-{$IFDEF MSI110}
-
-var
- _MsiGetShortcutTargetA: Pointer;
-
-function MsiGetShortcutTargetA;
-begin
- GetProcedureAddress(_MsiGetShortcutTargetA, msilib, 'MsiGetShortcutTargetA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiGetShortcutTargetA]
- end;
-end;
-
-var
- _MsiGetShortcutTargetW: Pointer;
-
-function MsiGetShortcutTargetW;
-begin
- GetProcedureAddress(_MsiGetShortcutTargetW, msilib, 'MsiGetShortcutTargetW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiGetShortcutTargetW]
- end;
-end;
-
-var
- _MsiGetShortcutTarget: Pointer;
-
-function MsiGetShortcutTarget;
-begin
- GetProcedureAddress(_MsiGetShortcutTarget, msilib, 'MsiGetShortcutTarget' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiGetShortcutTarget]
- end;
-end;
-
-{$ENDIF MSI110}
-
-var
- _MsiIsProductElevatedA: Pointer;
-
-function MsiIsProductElevatedA;
-begin
- GetProcedureAddress(_MsiIsProductElevatedA, msilib, 'MsiIsProductElevatedA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiIsProductElevatedA]
- end;
-end;
-
-var
- _MsiIsProductElevatedW: Pointer;
-
-function MsiIsProductElevatedW;
-begin
- GetProcedureAddress(_MsiIsProductElevatedW, msilib, 'MsiIsProductElevatedW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiIsProductElevatedW]
- end;
-end;
-
-var
- _MsiIsProductElevated: Pointer;
-
-function MsiIsProductElevated;
-begin
- GetProcedureAddress(_MsiIsProductElevated, msilib, 'MsiIsProductElevated' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiIsProductElevated]
- end;
-end;
-
-{$ELSE}
-
-function MsiCloseHandle; external msilib name 'MsiCloseHandle';
-function MsiCloseAllHandles; external msilib name 'MsiCloseAllHandles';
-function MsiSetInternalUI; external msilib name 'MsiSetInternalUI';
-function MsiSetExternalUIA; external msilib name 'MsiSetExternalUIA';
-function MsiSetExternalUIW; external msilib name 'MsiSetExternalUIW';
-function MsiSetExternalUI; external msilib name 'MsiSetExternalUI' + AWSuffix;
-function MsiEnableLogA; external msilib name 'MsiEnableLogA';
-function MsiEnableLogW; external msilib name 'MsiEnableLogW';
-function MsiEnableLog; external msilib name 'MsiEnableLog' + AWSuffix;
-function MsiQueryProductStateA; external msilib name 'MsiQueryProductStateA';
-function MsiQueryProductStateW; external msilib name 'MsiQueryProductStateW';
-function MsiQueryProductState; external msilib name 'MsiQueryProductState' + AWSuffix;
-function MsiGetProductInfoA; external msilib name 'MsiGetProductInfoA';
-function MsiGetProductInfoW; external msilib name 'MsiGetProductInfoW';
-function MsiGetProductInfo; external msilib name 'MsiGetProductInfo' + AWSuffix;
-function MsiInstallProductA; external msilib name 'MsiInstallProductA';
-function MsiInstallProductW; external msilib name 'MsiInstallProductW';
-function MsiInstallProduct; external msilib name 'MsiInstallProduct' + AWSuffix;
-function MsiConfigureProductA; external msilib name 'MsiConfigureProductA';
-function MsiConfigureProductW; external msilib name 'MsiConfigureProductW';
-function MsiConfigureProduct; external msilib name 'MsiConfigureProduct' + AWSuffix;
-function MsiConfigureProductExA; external msilib name 'MsiConfigureProductExA';
-function MsiConfigureProductExW; external msilib name 'MsiConfigureProductExW';
-function MsiConfigureProductEx; external msilib name 'MsiConfigureProductEx' + AWSuffix;
-function MsiReinstallProductA; external msilib name 'MsiReinstallProductA';
-function MsiReinstallProductW; external msilib name 'MsiReinstallProductW';
-function MsiReinstallProduct; external msilib name 'MsiReinstallProduct' + AWSuffix;
-function MsiAdvertiseProductExA; external msilib name 'MsiAdvertiseProductExA';
-function MsiAdvertiseProductExW; external msilib name 'MsiAdvertiseProductExW';
-function MsiAdvertiseProductEx; external msilib name 'MsiAdvertiseProductEx' + AWSuffix;
-function MsiAdvertiseProductA; external msilib name 'MsiAdvertiseProductA';
-function MsiAdvertiseProductW; external msilib name 'MsiAdvertiseProductW';
-function MsiAdvertiseProduct; external msilib name 'MsiAdvertiseProduct' + AWSuffix;
-function MsiProcessAdvertiseScriptA; external msilib name 'MsiProcessAdvertiseScriptA';
-function MsiProcessAdvertiseScriptW; external msilib name 'MsiProcessAdvertiseScriptW';
-function MsiProcessAdvertiseScript; external msilib name 'MsiProcessAdvertiseScript' + AWSuffix;
-function MsiAdvertiseScriptA; external msilib name 'MsiAdvertiseScriptA';
-function MsiAdvertiseScriptW; external msilib name 'MsiAdvertiseScriptW';
-function MsiAdvertiseScript; external msilib name 'MsiAdvertiseScript' + AWSuffix;
-function MsiGetProductInfoFromScriptA; external msilib name 'MsiGetProductInfoFromScriptA';
-function MsiGetProductInfoFromScriptW; external msilib name 'MsiGetProductInfoFromScriptW';
-function MsiGetProductInfoFromScript; external msilib name 'MsiGetProductInfoFromScript' + AWSuffix;
-function MsiGetProductCodeA; external msilib name 'MsiGetProductCodeA';
-function MsiGetProductCodeW; external msilib name 'MsiGetProductCodeW';
-function MsiGetProductCode; external msilib name 'MsiGetProductCode' + AWSuffix;
-function MsiGetUserInfoA; external msilib name 'MsiGetUserInfoA';
-function MsiGetUserInfoW; external msilib name 'MsiGetUserInfoW';
-function MsiGetUserInfo; external msilib name 'MsiGetUserInfo' + AWSuffix;
-function MsiCollectUserInfoA; external msilib name 'MsiCollectUserInfoA';
-function MsiCollectUserInfoW; external msilib name 'MsiCollectUserInfoW';
-function MsiCollectUserInfo; external msilib name 'MsiCollectUserInfo' + AWSuffix;
-function MsiApplyPatchA; external msilib name 'MsiApplyPatchA';
-function MsiApplyPatchW; external msilib name 'MsiApplyPatchW';
-function MsiApplyPatch; external msilib name 'MsiApplyPatch' + AWSuffix;
-function MsiGetPatchInfoA; external msilib name 'MsiGetPatchInfoA';
-function MsiGetPatchInfoW; external msilib name 'MsiGetPatchInfoW';
-function MsiGetPatchInfo; external msilib name 'MsiGetPatchInfo' + AWSuffix;
-function MsiEnumPatchesA; external msilib name 'MsiEnumPatchesA';
-function MsiEnumPatchesW; external msilib name 'MsiEnumPatchesW';
-function MsiEnumPatches; external msilib name 'MsiEnumPatches' + AWSuffix;
-function MsiQueryFeatureStateA; external msilib name 'MsiQueryFeatureStateA';
-function MsiQueryFeatureStateW; external msilib name 'MsiQueryFeatureStateW';
-function MsiQueryFeatureState; external msilib name 'MsiQueryFeatureState' + AWSuffix;
-function MsiUseFeatureA; external msilib name 'MsiUseFeatureA';
-function MsiUseFeatureW; external msilib name 'MsiUseFeatureW';
-function MsiUseFeature; external msilib name 'MsiUseFeature' + AWSuffix;
-function MsiUseFeatureExA; external msilib name 'MsiUseFeatureExA';
-function MsiUseFeatureExW; external msilib name 'MsiUseFeatureExW';
-function MsiUseFeatureEx; external msilib name 'MsiUseFeatureEx' + AWSuffix;
-function MsiGetFeatureUsageA; external msilib name 'MsiGetFeatureUsageA';
-function MsiGetFeatureUsageW; external msilib name 'MsiGetFeatureUsageW';
-function MsiGetFeatureUsage; external msilib name 'MsiGetFeatureUsage' + AWSuffix;
-function MsiConfigureFeatureA; external msilib name 'MsiConfigureFeatureA';
-function MsiConfigureFeatureW; external msilib name 'MsiConfigureFeatureW';
-function MsiConfigureFeature; external msilib name 'MsiConfigureFeature' + AWSuffix;
-function MsiReinstallFeatureA; external msilib name 'MsiReinstallFeatureA';
-function MsiReinstallFeatureW; external msilib name 'MsiReinstallFeatureW';
-function MsiReinstallFeature; external msilib name 'MsiReinstallFeature' + AWSuffix;
-function MsiProvideComponentA; external msilib name 'MsiProvideComponentA';
-function MsiProvideComponentW; external msilib name 'MsiProvideComponentW';
-function MsiProvideComponent; external msilib name 'MsiProvideComponent' + AWSuffix;
-function MsiProvideQualifiedComponentA; external msilib name 'MsiProvideQualifiedComponentA';
-function MsiProvideQualifiedComponentW; external msilib name 'MsiProvideQualifiedComponentW';
-function MsiProvideQualifiedComponent; external msilib name 'MsiProvideQualifiedComponent' + AWSuffix;
-function MsiProvideQualifiedComponentExA; external msilib name 'MsiProvideQualifiedComponentExA';
-function MsiProvideQualifiedComponentExW; external msilib name 'MsiProvideQualifiedComponentExW';
-function MsiProvideQualifiedComponentEx; external msilib name 'MsiProvideQualifiedComponentEx' + AWSuffix;
-function MsiGetComponentPathA; external msilib name 'MsiGetComponentPathA';
-function MsiGetComponentPathW; external msilib name 'MsiGetComponentPathW';
-function MsiGetComponentPath; external msilib name 'MsiGetComponentPath' + AWSuffix;
-function MsiProvideAssemblyA; external msilib name 'MsiProvideAssemblyA';
-function MsiProvideAssemblyW; external msilib name 'MsiProvideAssemblyW';
-function MsiProvideAssembly; external msilib name 'MsiProvideAssembly' + AWSuffix;
-function MsiEnumProductsA; external msilib name 'MsiEnumProductsA';
-function MsiEnumProductsW; external msilib name 'MsiEnumProductsW';
-function MsiEnumProducts; external msilib name 'MsiEnumProducts' + AWSuffix;
-{$IFDEF MSI110}
-function MsiEnumRelatedProductsA; external msilib name 'MsiEnumRelatedProductsA';
-function MsiEnumRelatedProductsW; external msilib name 'MsiEnumRelatedProductsW';
-function MsiEnumRelatedProducts; external msilib name 'MsiEnumRelatedProducts' + AWSuffix;
-{$ENDIF MSI110}
-function MsiEnumFeaturesA; external msilib name 'MsiEnumFeaturesA';
-function MsiEnumFeaturesW; external msilib name 'MsiEnumFeaturesW';
-function MsiEnumFeatures; external msilib name 'MsiEnumFeatures' + AWSuffix;
-function MsiEnumComponentsA; external msilib name 'MsiEnumComponentsA';
-function MsiEnumComponentsW; external msilib name 'MsiEnumComponentsW';
-function MsiEnumComponents; external msilib name 'MsiEnumComponents' + AWSuffix;
-function MsiEnumClientsA; external msilib name 'MsiEnumClientsA';
-function MsiEnumClientsW; external msilib name 'MsiEnumClientsW';
-function MsiEnumClients; external msilib name 'MsiEnumClients' + AWSuffix;
-function MsiEnumComponentQualifiersA; external msilib name 'MsiEnumComponentQualifiersA';
-function MsiEnumComponentQualifiersW; external msilib name 'MsiEnumComponentQualifiersW';
-function MsiEnumComponentQualifiers; external msilib name 'MsiEnumComponentQualifiers' + AWSuffix;
-function MsiOpenProductA; external msilib name 'MsiOpenProductA';
-function MsiOpenProductW; external msilib name 'MsiOpenProductW';
-function MsiOpenProduct; external msilib name 'MsiOpenProduct' + AWSuffix;
-function MsiOpenPackageA; external msilib name 'MsiOpenPackageA';
-function MsiOpenPackageW; external msilib name 'MsiOpenPackageW';
-function MsiOpenPackage; external msilib name 'MsiOpenPackage' + AWSuffix;
-function MsiOpenPackageExA; external msilib name 'MsiOpenPackageExA';
-function MsiOpenPackageExW; external msilib name 'MsiOpenPackageExW';
-function MsiOpenPackageEx; external msilib name 'MsiOpenPackageEx' + AWSuffix;
-function MsiGetProductPropertyA; external msilib name 'MsiGetProductPropertyA';
-function MsiGetProductPropertyW; external msilib name 'MsiGetProductPropertyW';
-function MsiGetProductProperty; external msilib name 'MsiGetProductProperty' + AWSuffix;
-function MsiVerifyPackageA; external msilib name 'MsiVerifyPackageA';
-function MsiVerifyPackageW; external msilib name 'MsiVerifyPackageW';
-function MsiVerifyPackage; external msilib name 'MsiVerifyPackage' + AWSuffix;
-function MsiGetFeatureInfoA; external msilib name 'MsiGetFeatureInfoA';
-function MsiGetFeatureInfoW; external msilib name 'MsiGetFeatureInfoW';
-function MsiGetFeatureInfo; external msilib name 'MsiGetFeatureInfo' + AWSuffix;
-function MsiInstallMissingComponentA; external msilib name 'MsiInstallMissingComponentA';
-function MsiInstallMissingComponentW; external msilib name 'MsiInstallMissingComponentW';
-function MsiInstallMissingComponent; external msilib name 'MsiInstallMissingComponent' + AWSuffix;
-function MsiInstallMissingFileA; external msilib name 'MsiInstallMissingFileA';
-function MsiInstallMissingFileW; external msilib name 'MsiInstallMissingFileW';
-function MsiInstallMissingFile; external msilib name 'MsiInstallMissingFile' + AWSuffix;
-function MsiLocateComponentA; external msilib name 'MsiLocateComponentA';
-function MsiLocateComponentW; external msilib name 'MsiLocateComponentW';
-function MsiLocateComponent; external msilib name 'MsiLocateComponent' + AWSuffix;
-{$IFDEF MSI110}
-function MsiSourceListClearAllA; external msilib name 'MsiSourceListClearAllA';
-function MsiSourceListClearAllW; external msilib name 'MsiSourceListClearAllW';
-function MsiSourceListClearAll; external msilib name 'MsiSourceListClearAll' + AWSuffix;
-function MsiSourceListAddSourceA; external msilib name 'MsiSourceListAddSourceA';
-function MsiSourceListAddSourceW; external msilib name 'MsiSourceListAddSourceW';
-function MsiSourceListAddSource; external msilib name 'MsiSourceListAddSource' + AWSuffix;
-function MsiSourceListForceResolutionA; external msilib name 'MsiSourceListForceResolutionA';
-function MsiSourceListForceResolutionW; external msilib name 'MsiSourceListForceResolutionW';
-function MsiSourceListForceResolution; external msilib name 'MsiSourceListForceResolution' + AWSuffix;
-{$ENDIF MSI110}
-function MsiGetFileVersionA; external msilib name 'MsiGetFileVersionA';
-function MsiGetFileVersionW; external msilib name 'MsiGetFileVersionW';
-function MsiGetFileVersion; external msilib name 'MsiGetFileVersion' + AWSuffix;
-function MsiGetFileHashA; external msilib name 'MsiGetFileHashA';
-function MsiGetFileHashW; external msilib name 'MsiGetFileHashW';
-function MsiGetFileHash; external msilib name 'MsiGetFileHash' + AWSuffix;
-function MsiGetFileSignatureInformationA; external msilib name 'MsiGetFileSignatureInformationA';
-function MsiGetFileSignatureInformationW; external msilib name 'MsiGetFileSignatureInformationW';
-function MsiGetFileSignatureInformation; external msilib name 'MsiGetFileSignatureInformation' + AWSuffix;
-{$IFDEF MSI110}
-function MsiGetShortcutTargetA; external msilib name 'MsiGetShortcutTargetA';
-function MsiGetShortcutTargetW; external msilib name 'MsiGetShortcutTargetW';
-function MsiGetShortcutTarget; external msilib name 'MsiGetShortcutTarget' + AWSuffix;
-{$ENDIF MSI110}
-function MsiIsProductElevatedA; external msilib name 'MsiIsProductElevatedA';
-function MsiIsProductElevatedW; external msilib name 'MsiIsProductElevatedW';
-function MsiIsProductElevated; external msilib name 'MsiIsProductElevated' + AWSuffix;
-
-{$ENDIF DYNAMIC_LINK}
-
-end.
+{******************************************************************************}
+{ }
+{ Windows Installer API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: msi.h, released June 2000. The original Pascal }
+{ code is: Msi.pas, released June 2001. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Contributors: Steve Moss (spm att coco dott co dott uk) }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwamsi.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaMsi;
+
+{$WEAKPACKAGEUNIT}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaWinType, JwaWinCrypt { for PCCERT_CONTEXT };
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "msi.h"'}
+{$HPPEMIT ''}
+
+// (rom) MSI version IFDEFs now declared in jediapilib.inc
+
+(*****************************************************************************\
+* *
+* msi.h - - Interface for external access to Installer Service *
+* *
+* Version 1.0 - 1.2 *
+* *
+* NOTES: All buffers sizes are TCHAR count, null included only on input *
+* Return argument pointers may be null if not interested in value *
+* *
+* Copyright (c) 1999-2000, Microsoft Corp. All rights reserved. *
+* *
+\*****************************************************************************)
+
+// --------------------------------------------------------------------------
+// Installer generic handle definitions
+// --------------------------------------------------------------------------
+
+type
+ MSIHANDLE = DWORD; // abstract generic handle, 0 == no handle
+ {$EXTERNALSYM MSIHANDLE}
+ TMsiHandle = MSIHANDLE;
+
+// Close a open handle of any type
+// All handles obtained from API calls must be closed when no longer needed
+// Normally succeeds, returning TRUE.
+
+function MsiCloseHandle(hAny: MSIHANDLE): UINT; stdcall;
+{$EXTERNALSYM MsiCloseHandle}
+
+// Close all handles open in the process, a diagnostic call
+// This should NOT be used as a cleanup mechanism -- use PMSIHANDLE class
+// Can be called at termination to assure that all handles have been closed
+// Returns 0 if all handles have been close, else number of open handles
+
+function MsiCloseAllHandles: UINT; stdcall;
+{$EXTERNALSYM MsiCloseAllHandles}
+
+// Install message type for callback is a combination of the following:
+// A message box style: MB_*, where MB_OK is the default
+// A message box icon type: MB_ICON*, where no icon is the default
+// A default button: MB_DEFBUTTON?, where MB_DEFBUTTON1 is the default
+// One of the following install message types, no default
+
+const
+ INSTALLMESSAGE_FATALEXIT = $00000000; // premature termination, possibly fatal OOM
+ {$EXTERNALSYM INSTALLMESSAGE_FATALEXIT}
+ INSTALLMESSAGE_ERROR = $01000000; // formatted error message
+ {$EXTERNALSYM INSTALLMESSAGE_ERROR}
+ INSTALLMESSAGE_WARNING = $02000000; // formatted warning message
+ {$EXTERNALSYM INSTALLMESSAGE_WARNING}
+ INSTALLMESSAGE_USER = $03000000; // user request message
+ {$EXTERNALSYM INSTALLMESSAGE_USER}
+ INSTALLMESSAGE_INFO = $04000000; // informative message for log
+ {$EXTERNALSYM INSTALLMESSAGE_INFO}
+ INSTALLMESSAGE_FILESINUSE = $05000000; // list of files in use that need to be replaced
+ {$EXTERNALSYM INSTALLMESSAGE_FILESINUSE}
+ INSTALLMESSAGE_RESOLVESOURCE = $06000000; // request to determine a valid source location
+ {$EXTERNALSYM INSTALLMESSAGE_RESOLVESOURCE}
+ INSTALLMESSAGE_OUTOFDISKSPACE = $07000000; // insufficient disk space message
+ {$EXTERNALSYM INSTALLMESSAGE_OUTOFDISKSPACE}
+ INSTALLMESSAGE_ACTIONSTART = $08000000; // start of action: action name & description
+ {$EXTERNALSYM INSTALLMESSAGE_ACTIONSTART}
+ INSTALLMESSAGE_ACTIONDATA = $09000000; // formatted data associated with individual action item
+ {$EXTERNALSYM INSTALLMESSAGE_ACTIONDATA}
+ INSTALLMESSAGE_PROGRESS = $0A000000; // progress gauge info: units so far, total
+ {$EXTERNALSYM INSTALLMESSAGE_PROGRESS}
+ INSTALLMESSAGE_COMMONDATA = $0B000000; // product info for dialog: language Id, dialog caption
+ {$EXTERNALSYM INSTALLMESSAGE_COMMONDATA}
+ INSTALLMESSAGE_INITIALIZE = $0C000000; // sent prior to UI initialization, no string data
+ {$EXTERNALSYM INSTALLMESSAGE_INITIALIZE}
+ INSTALLMESSAGE_TERMINATE = $0D000000; // sent after UI termination, no string data
+ {$EXTERNALSYM INSTALLMESSAGE_TERMINATE}
+ INSTALLMESSAGE_SHOWDIALOG = $0E000000; // sent prior to display or authored dialog or wizard
+ {$EXTERNALSYM INSTALLMESSAGE_SHOWDIALOG}
+
+type
+ INSTALLMESSAGE = Longint;
+ {$EXTERNALSYM INSTALLMESSAGE}
+ TInstallMessage = INSTALLMESSAGE;
+
+// external error handler supplied to installation API functions
+
+type
+ INSTALLUI_HANDLERA = function(pvContext: LPVOID; iMessageType: UINT; szMessage: LPCSTR): Integer; stdcall;
+ {$EXTERNALSYM INSTALLUI_HANDLERA}
+ TInstallUIHandlerA = INSTALLUI_HANDLERA;
+ INSTALLUI_HANDLERW = function(pvContext: LPVOID; iMessageType: UINT; szMessage: LPCWSTR): Integer; stdcall;
+ {$EXTERNALSYM INSTALLUI_HANDLERW}
+ TInstallUIHandlerW = INSTALLUI_HANDLERW;
+
+ {$IFDEF UNICODE}
+ INSTALLUI_HANDLER = INSTALLUI_HANDLERW;
+ {$EXTERNALSYM INSTALLUI_HANDLER}
+ TInstallUIHandler = TInstallUIHandlerW;
+ {$ELSE}
+ INSTALLUI_HANDLER = INSTALLUI_HANDLERA;
+ {$EXTERNALSYM INSTALLUI_HANDLER}
+ TInstallUIHandler = TInstallUIHandlerA;
+ {$ENDIF UNICODE}
+
+const
+ INSTALLUILEVEL_NOCHANGE = 0; // UI level is unchanged
+ {$EXTERNALSYM INSTALLUILEVEL_NOCHANGE}
+ INSTALLUILEVEL_DEFAULT = 1; // default UI is used
+ {$EXTERNALSYM INSTALLUILEVEL_DEFAULT}
+ INSTALLUILEVEL_NONE = 2; // completely silent installation
+ {$EXTERNALSYM INSTALLUILEVEL_NONE}
+ INSTALLUILEVEL_BASIC = 3; // simple progress and error handling
+ {$EXTERNALSYM INSTALLUILEVEL_BASIC}
+ INSTALLUILEVEL_REDUCED = 4; // authored UI, wizard dialogs suppressed
+ {$EXTERNALSYM INSTALLUILEVEL_REDUCED}
+ INSTALLUILEVEL_FULL = 5; // authored UI with wizards, progress, errors
+ {$EXTERNALSYM INSTALLUILEVEL_FULL}
+ INSTALLUILEVEL_ENDDIALOG = $80; // display success/failure dialog at end of install
+ {$EXTERNALSYM INSTALLUILEVEL_ENDDIALOG}
+ INSTALLUILEVEL_PROGRESSONLY = $40; // display only progress dialog
+ {$EXTERNALSYM INSTALLUILEVEL_PROGRESSONLY}
+ INSTALLUILEVEL_HIDECANCEL = $20; // do not display the cancel button in basic UI
+ {$EXTERNALSYM INSTALLUILEVEL_HIDECANCEL}
+ INSTALLUILEVEL_SOURCERESONLY = $100; // force display of source resolution even if quiet
+ {$EXTERNALSYM INSTALLUILEVEL_SOURCERESONLY}
+
+type
+ INSTALLUILEVEL = Longint;
+ {$EXTERNALSYM INSTALLUILEVEL}
+ TInstallUILevel = INSTALLUILEVEL;
+
+const
+ INSTALLSTATE_NOTUSED = -7; // component disabled
+ {$EXTERNALSYM INSTALLSTATE_NOTUSED}
+ INSTALLSTATE_BADCONFIG = -6; // configuration data corrupt
+ {$EXTERNALSYM INSTALLSTATE_BADCONFIG}
+ INSTALLSTATE_INCOMPLETE = -5; // installation suspended or in progress
+ {$EXTERNALSYM INSTALLSTATE_INCOMPLETE}
+ INSTALLSTATE_SOURCEABSENT = -4; // run from source, source is unavailable
+ {$EXTERNALSYM INSTALLSTATE_SOURCEABSENT}
+ INSTALLSTATE_MOREDATA = -3; // return buffer overflow
+ {$EXTERNALSYM INSTALLSTATE_MOREDATA}
+ INSTALLSTATE_INVALIDARG = -2; // invalid function argument
+ {$EXTERNALSYM INSTALLSTATE_INVALIDARG}
+ INSTALLSTATE_UNKNOWN = -1; // unrecognized product or feature
+ {$EXTERNALSYM INSTALLSTATE_UNKNOWN}
+ INSTALLSTATE_BROKEN = 0; // broken
+ {$EXTERNALSYM INSTALLSTATE_BROKEN}
+ INSTALLSTATE_ADVERTISED = 1; // advertised feature
+ {$EXTERNALSYM INSTALLSTATE_ADVERTISED}
+ INSTALLSTATE_REMOVED = 1; // component being removed (action state, not settable)
+ {$EXTERNALSYM INSTALLSTATE_REMOVED}
+ INSTALLSTATE_ABSENT = 2; // uninstalled (or action state absent but clients remain)
+ {$EXTERNALSYM INSTALLSTATE_ABSENT}
+ INSTALLSTATE_LOCAL = 3; // installed on local drive
+ {$EXTERNALSYM INSTALLSTATE_LOCAL}
+ INSTALLSTATE_SOURCE = 4; // run from source, CD or net
+ {$EXTERNALSYM INSTALLSTATE_SOURCE}
+ INSTALLSTATE_DEFAULT = 5; // use default, local or source
+ {$EXTERNALSYM INSTALLSTATE_DEFAULT}
+
+type
+ INSTALLSTATE = Longint;
+ {$EXTERNALSYM INSTALLSTATE}
+ TInstallState = INSTALLSTATE;
+
+const
+ USERINFOSTATE_MOREDATA = -3; // return buffer overflow
+ {$EXTERNALSYM USERINFOSTATE_MOREDATA}
+ USERINFOSTATE_INVALIDARG = -2; // invalid function argument
+ {$EXTERNALSYM USERINFOSTATE_INVALIDARG}
+ USERINFOSTATE_UNKNOWN = -1; // unrecognized product
+ {$EXTERNALSYM USERINFOSTATE_UNKNOWN}
+ USERINFOSTATE_ABSENT = 0; // user info and PID not initialized
+ {$EXTERNALSYM USERINFOSTATE_ABSENT}
+ USERINFOSTATE_PRESENT = 1; // user info and PID initialized
+ {$EXTERNALSYM USERINFOSTATE_PRESENT}
+
+type
+ USERINFOSTATE = DWORD;
+ {$EXTERNALSYM USERINFOSTATE}
+ TUserInfoState = USERINFOSTATE;
+
+const
+ INSTALLLEVEL_DEFAULT = 0; // install authored default
+ {$EXTERNALSYM INSTALLLEVEL_DEFAULT}
+ INSTALLLEVEL_MINIMUM = 1; // install only required features
+ {$EXTERNALSYM INSTALLLEVEL_MINIMUM}
+ INSTALLLEVEL_MAXIMUM = $FFFF; // install all features
+ {$EXTERNALSYM INSTALLLEVEL_MAXIMUM}
+
+type
+ INSTALLLEVEL = DWORD; // intermediate levels dependent on authoring
+ {$EXTERNALSYM INSTALLLEVEL}
+ TInstallLevel = INSTALLLEVEL;
+
+const
+ REINSTALLMODE_REPAIR = $00000001; // Reserved bit - currently ignored
+ {$EXTERNALSYM REINSTALLMODE_REPAIR}
+ REINSTALLMODE_FILEMISSING = $00000002; // Reinstall only if file is missing
+ {$EXTERNALSYM REINSTALLMODE_FILEMISSING}
+ REINSTALLMODE_FILEOLDERVERSION = $00000004; // Reinstall if file is missing, or older version
+ {$EXTERNALSYM REINSTALLMODE_FILEOLDERVERSION}
+ REINSTALLMODE_FILEEQUALVERSION = $00000008; // Reinstall if file is missing, or equal or older version
+ {$EXTERNALSYM REINSTALLMODE_FILEEQUALVERSION}
+ REINSTALLMODE_FILEEXACT = $00000010; // Reinstall if file is missing, or not exact version
+ {$EXTERNALSYM REINSTALLMODE_FILEEXACT}
+ REINSTALLMODE_FILEVERIFY = $00000020; // checksum executables, reinstall if missing or corrupt
+ {$EXTERNALSYM REINSTALLMODE_FILEVERIFY}
+ REINSTALLMODE_FILEREPLACE = $00000040; // Reinstall all files, regardless of version
+ {$EXTERNALSYM REINSTALLMODE_FILEREPLACE}
+ REINSTALLMODE_MACHINEDATA = $00000080; // insure required machine reg entries
+ {$EXTERNALSYM REINSTALLMODE_MACHINEDATA}
+ REINSTALLMODE_USERDATA = $00000100; // insure required user reg entries
+ {$EXTERNALSYM REINSTALLMODE_USERDATA}
+ REINSTALLMODE_SHORTCUT = $00000200; // validate shortcuts items
+ {$EXTERNALSYM REINSTALLMODE_SHORTCUT}
+ REINSTALLMODE_PACKAGE = $00000400; // use re-cache source install package
+ {$EXTERNALSYM REINSTALLMODE_PACKAGE}
+
+type
+ REINSTALLMODE = DWORD;
+ {$EXTERNALSYM REINSTALLMODE}
+ TReinstallMode = REINSTALLMODE;
+
+// bit flags for use with MsiEnableLog and MsiSetExternalUI
+
+const
+ INSTALLLOGMODE_FATALEXIT = 1 shl (INSTALLMESSAGE_FATALEXIT shr 24);
+ {$EXTERNALSYM INSTALLLOGMODE_FATALEXIT}
+ INSTALLLOGMODE_ERROR = 1 shl (INSTALLMESSAGE_ERROR shr 24);
+ {$EXTERNALSYM INSTALLLOGMODE_ERROR}
+ INSTALLLOGMODE_WARNING = 1 shl (INSTALLMESSAGE_WARNING shr 24);
+ {$EXTERNALSYM INSTALLLOGMODE_WARNING}
+ INSTALLLOGMODE_USER = 1 shl (INSTALLMESSAGE_USER shr 24);
+ {$EXTERNALSYM INSTALLLOGMODE_USER}
+ INSTALLLOGMODE_INFO = 1 shl (INSTALLMESSAGE_INFO shr 24);
+ {$EXTERNALSYM INSTALLLOGMODE_INFO}
+ INSTALLLOGMODE_RESOLVESOURCE = 1 shl (INSTALLMESSAGE_RESOLVESOURCE shr 24);
+ {$EXTERNALSYM INSTALLLOGMODE_RESOLVESOURCE}
+ INSTALLLOGMODE_OUTOFDISKSPACE = 1 shl (INSTALLMESSAGE_OUTOFDISKSPACE shr 24);
+ {$EXTERNALSYM INSTALLLOGMODE_OUTOFDISKSPACE}
+ INSTALLLOGMODE_ACTIONSTART = 1 shl (INSTALLMESSAGE_ACTIONSTART shr 24);
+ {$EXTERNALSYM INSTALLLOGMODE_ACTIONSTART}
+ INSTALLLOGMODE_ACTIONDATA = 1 shl (INSTALLMESSAGE_ACTIONDATA shr 24);
+ {$EXTERNALSYM INSTALLLOGMODE_ACTIONDATA}
+ INSTALLLOGMODE_COMMONDATA = 1 shl (INSTALLMESSAGE_COMMONDATA shr 24);
+ {$EXTERNALSYM INSTALLLOGMODE_COMMONDATA}
+ INSTALLLOGMODE_PROPERTYDUMP = 1 shl (INSTALLMESSAGE_PROGRESS shr 24); // log only
+ {$EXTERNALSYM INSTALLLOGMODE_PROPERTYDUMP}
+ INSTALLLOGMODE_VERBOSE = 1 shl (INSTALLMESSAGE_INITIALIZE shr 24); // log only
+ {$EXTERNALSYM INSTALLLOGMODE_VERBOSE}
+ INSTALLLOGMODE_EXTRADEBUG = 1 shl (INSTALLMESSAGE_TERMINATE shr 24); // log only
+ {$EXTERNALSYM INSTALLLOGMODE_EXTRADEBUG}
+ INSTALLLOGMODE_PROGRESS = 1 shl (INSTALLMESSAGE_PROGRESS shr 24); // external handler only
+ {$EXTERNALSYM INSTALLLOGMODE_PROGRESS}
+ INSTALLLOGMODE_INITIALIZE = 1 shl (INSTALLMESSAGE_INITIALIZE shr 24); // external handler only
+ {$EXTERNALSYM INSTALLLOGMODE_INITIALIZE}
+ INSTALLLOGMODE_TERMINATE = 1 shl (INSTALLMESSAGE_TERMINATE shr 24); // external handler only
+ {$EXTERNALSYM INSTALLLOGMODE_TERMINATE}
+ INSTALLLOGMODE_SHOWDIALOG = 1 shl (INSTALLMESSAGE_SHOWDIALOG shr 24); // external handler only
+ {$EXTERNALSYM INSTALLLOGMODE_SHOWDIALOG}
+
+type
+ INSTALLLOGMODE = DWORD;
+ {$EXTERNALSYM INSTALLLOGMODE}
+ TInstallLogMode = INSTALLLOGMODE;
+
+const
+ INSTALLLOGATTRIBUTES_APPEND = 1 shl 0;
+ {$EXTERNALSYM INSTALLLOGATTRIBUTES_APPEND}
+ INSTALLLOGATTRIBUTES_FLUSHEACHLINE = 1 shl 1;
+ {$EXTERNALSYM INSTALLLOGATTRIBUTES_FLUSHEACHLINE}
+
+type
+ INSTALLLOGATTRIBUTES = DWORD;
+ {$EXTERNALSYM INSTALLLOGATTRIBUTES}
+ TInstallLogAttributes = INSTALLLOGATTRIBUTES;
+
+const
+ INSTALLFEATUREATTRIBUTE_FAVORLOCAL = 1 shl 0;
+ {$EXTERNALSYM INSTALLFEATUREATTRIBUTE_FAVORLOCAL}
+ INSTALLFEATUREATTRIBUTE_FAVORSOURCE = 1 shl 1;
+ {$EXTERNALSYM INSTALLFEATUREATTRIBUTE_FAVORSOURCE}
+ INSTALLFEATUREATTRIBUTE_FOLLOWPARENT = 1 shl 2;
+ {$EXTERNALSYM INSTALLFEATUREATTRIBUTE_FOLLOWPARENT}
+ INSTALLFEATUREATTRIBUTE_FAVORADVERTISE = 1 shl 3;
+ {$EXTERNALSYM INSTALLFEATUREATTRIBUTE_FAVORADVERTISE}
+ INSTALLFEATUREATTRIBUTE_DISALLOWADVERTISE = 1 shl 4;
+ {$EXTERNALSYM INSTALLFEATUREATTRIBUTE_DISALLOWADVERTISE}
+ INSTALLFEATUREATTRIBUTE_NOUNSUPPORTEDADVERTISE = 1 shl 5;
+ {$EXTERNALSYM INSTALLFEATUREATTRIBUTE_NOUNSUPPORTEDADVERTISE}
+
+type
+ INSTALLFEATUREATTRIBUTE = DWORD;
+ {$EXTERNALSYM INSTALLFEATUREATTRIBUTE}
+ TInstallFeatureAttribute = INSTALLFEATUREATTRIBUTE;
+
+const
+ INSTALLMODE_NOSOURCERESOLUTION = -3; // skip source resolution
+ {$EXTERNALSYM INSTALLMODE_NOSOURCERESOLUTION}
+ INSTALLMODE_NODETECTION = -2; // skip detection
+ {$EXTERNALSYM INSTALLMODE_NODETECTION}
+ INSTALLMODE_EXISTING = -1; // provide, if available
+ {$EXTERNALSYM INSTALLMODE_EXISTING}
+ INSTALLMODE_DEFAULT = 0; // install, if absent
+ {$EXTERNALSYM INSTALLMODE_DEFAULT}
+
+type
+ INSTALLMODE = DWORD;
+ {$EXTERNALSYM INSTALLMODE}
+ TInstallMode = INSTALLMODE;
+
+const
+ MAX_FEATURE_CHARS = 38; // maximum chars in feature name (same as string GUID)
+ {$EXTERNALSYM MAX_FEATURE_CHARS}
+
+// Product info attributes: advertised information
+
+ INSTALLPROPERTY_PACKAGENAME = __TEXT('PackageName');
+ {$EXTERNALSYM INSTALLPROPERTY_PACKAGENAME}
+ INSTALLPROPERTY_TRANSFORMS = __TEXT('Transforms');
+ {$EXTERNALSYM INSTALLPROPERTY_TRANSFORMS}
+ INSTALLPROPERTY_LANGUAGE = __TEXT('Language');
+ {$EXTERNALSYM INSTALLPROPERTY_LANGUAGE}
+ INSTALLPROPERTY_PRODUCTNAME = __TEXT('ProductName');
+ {$EXTERNALSYM INSTALLPROPERTY_PRODUCTNAME}
+ INSTALLPROPERTY_ASSIGNMENTTYPE = __TEXT('AssignmentType');
+ {$EXTERNALSYM INSTALLPROPERTY_ASSIGNMENTTYPE}
+//#if (_WIN32_MSI >= 150)
+ INSTALLPROPERTY_INSTANCETYPE = __TEXT('InstanceType');
+ {$EXTERNALSYM INSTALLPROPERTY_INSTANCETYPE}
+//#endif //(_WIN32_MSI >= 150)
+
+ INSTALLPROPERTY_PACKAGECODE = __TEXT('PackageCode');
+ {$EXTERNALSYM INSTALLPROPERTY_PACKAGECODE}
+ INSTALLPROPERTY_VERSION = __TEXT('Version');
+ {$EXTERNALSYM INSTALLPROPERTY_VERSION}
+ INSTALLPROPERTY_PRODUCTICON = __TEXT('ProductIcon');
+ {$EXTERNALSYM INSTALLPROPERTY_PRODUCTICON}
+
+// Product info attributes: installed information
+
+ INSTALLPROPERTY_INSTALLEDPRODUCTNAME = __TEXT('InstalledProductName');
+ {$EXTERNALSYM INSTALLPROPERTY_INSTALLEDPRODUCTNAME}
+ INSTALLPROPERTY_VERSIONSTRING = __TEXT('VersionString');
+ {$EXTERNALSYM INSTALLPROPERTY_VERSIONSTRING}
+ INSTALLPROPERTY_HELPLINK = __TEXT('HelpLink');
+ {$EXTERNALSYM INSTALLPROPERTY_HELPLINK}
+ INSTALLPROPERTY_HELPTELEPHONE = __TEXT('HelpTelephone');
+ {$EXTERNALSYM INSTALLPROPERTY_HELPTELEPHONE}
+ INSTALLPROPERTY_INSTALLLOCATION = __TEXT('InstallLocation');
+ {$EXTERNALSYM INSTALLPROPERTY_INSTALLLOCATION}
+ INSTALLPROPERTY_INSTALLSOURCE = __TEXT('InstallSource');
+ {$EXTERNALSYM INSTALLPROPERTY_INSTALLSOURCE}
+ INSTALLPROPERTY_INSTALLDATE = __TEXT('InstallDate');
+ {$EXTERNALSYM INSTALLPROPERTY_INSTALLDATE}
+ INSTALLPROPERTY_PUBLISHER = __TEXT('Publisher');
+ {$EXTERNALSYM INSTALLPROPERTY_PUBLISHER}
+ INSTALLPROPERTY_LOCALPACKAGE = __TEXT('LocalPackage');
+ {$EXTERNALSYM INSTALLPROPERTY_LOCALPACKAGE}
+ INSTALLPROPERTY_URLINFOABOUT = __TEXT('URLInfoAbout');
+ {$EXTERNALSYM INSTALLPROPERTY_URLINFOABOUT}
+ INSTALLPROPERTY_URLUPDATEINFO = __TEXT('URLUpdateInfo');
+ {$EXTERNALSYM INSTALLPROPERTY_URLUPDATEINFO}
+ INSTALLPROPERTY_VERSIONMINOR = __TEXT('VersionMinor');
+ {$EXTERNALSYM INSTALLPROPERTY_VERSIONMINOR}
+ INSTALLPROPERTY_VERSIONMAJOR = __TEXT('VersionMajor');
+ {$EXTERNALSYM INSTALLPROPERTY_VERSIONMAJOR}
+
+const
+ SCRIPTFLAGS_CACHEINFO = $00000001; // set if the icons need to be created/ removed
+ {$EXTERNALSYM SCRIPTFLAGS_CACHEINFO}
+ SCRIPTFLAGS_SHORTCUTS = $00000004; // set if the shortcuts needs to be created/ deleted
+ {$EXTERNALSYM SCRIPTFLAGS_SHORTCUTS}
+ SCRIPTFLAGS_MACHINEASSIGN = $00000008; // set if product to be assigned to machine
+ {$EXTERNALSYM SCRIPTFLAGS_MACHINEASSIGN}
+ SCRIPTFLAGS_REGDATA_CNFGINFO = $00000020; // set if the product cnfg mgmt. registry data needs to be written/ removed
+ {$EXTERNALSYM SCRIPTFLAGS_REGDATA_CNFGINFO}
+ SCRIPTFLAGS_VALIDATE_TRANSFORMS_LIST = $00000040;
+ {$EXTERNALSYM SCRIPTFLAGS_VALIDATE_TRANSFORMS_LIST}
+ {$IFDEF MSI200_UP}
+ SCRIPTFLAGS_REGDATA_CLASSINFO = $00000080; // set if COM classes related app info needs to be created/ deleted
+ {$EXTERNALSYM SCRIPTFLAGS_REGDATA_CLASSINFO}
+ SCRIPTFLAGS_REGDATA_EXTENSIONINFO = $00000100; // set if extension related app info needs to be created/ deleted
+ {$EXTERNALSYM SCRIPTFLAGS_REGDATA_EXTENSIONINFO}
+ SCRIPTFLAGS_REGDATA_APPINFO = SCRIPTFLAGS_REGDATA_CLASSINFO or SCRIPTFLAGS_REGDATA_EXTENSIONINFO; // for source level backward compatibility
+ {$EXTERNALSYM SCRIPTFLAGS_REGDATA_APPINFO}
+ {$ELSE} // _WIN32_MSI >= 110
+ SCRIPTFLAGS_REGDATA_APPINFO = $00000010;
+ {$EXTERNALSYM SCRIPTFLAGS_REGDATA_APPINFO}
+ {$ENDIF MSI200_UP}
+ SCRIPTFLAGS_REGDATA = SCRIPTFLAGS_REGDATA_APPINFO or SCRIPTFLAGS_REGDATA_CNFGINFO;// for source level backward compatibility
+ {$EXTERNALSYM SCRIPTFLAGS_REGDATA}
+
+type
+ SCRIPTFLAGS = Longint;
+ {$EXTERNALSYM SCRIPTFLAGS}
+ TScriptFlags = SCRIPTFLAGS;
+
+const
+ ADVERTISEFLAGS_MACHINEASSIGN = 0; // set if the product is to be machine assigned
+ {$EXTERNALSYM ADVERTISEFLAGS_MACHINEASSIGN}
+ ADVERTISEFLAGS_USERASSIGN = 1; // set if the product is to be user assigned
+ {$EXTERNALSYM ADVERTISEFLAGS_USERASSIGN}
+
+type
+ ADVERTISEFLAGS = Longint;
+ {$EXTERNALSYM ADVERTISEFLAGS}
+ TAdvertiseFlags = ADVERTISEFLAGS;
+
+const
+ INSTALLTYPE_DEFAULT = 0; // set to indicate default behavior
+ {$EXTERNALSYM INSTALLTYPE_DEFAULT}
+ INSTALLTYPE_NETWORK_IMAGE = 1; // set to indicate network install
+ {$EXTERNALSYM INSTALLTYPE_NETWORK_IMAGE}
+ INSTALLTYPE_SINGLE_INSTANCE = 2; // set to indicate a particular instance
+ {$EXTERNALSYM INSTALLTYPE_SINGLE_INSTANCE}
+
+type
+ INSTALLTYPE = DWORD;
+ {$EXTERNALSYM INSTALLTYPE}
+ TInstallType = INSTALLTYPE;
+
+type
+ _MSIFILEHASHINFO = record
+ dwFileHashInfoSize: ULONG;
+ dwData: array [0..3] of ULONG;
+ end;
+ {$EXTERNALSYM _MSIFILEHASHINFO}
+ MSIFILEHASHINFO = _MSIFILEHASHINFO;
+ {$EXTERNALSYM MSIFILEHASHINFO}
+ PMSIFILEHASHINFO = ^MSIFILEHASHINFO;
+ {$EXTERNALSYM PMSIFILEHASHINFO}
+ TMsiFileHashInfo = MSIFILEHASHINFO;
+
+const
+ MSIARCHITECTUREFLAGS_X86 = $00000001; // set if creating the script for i386 platform
+ {$EXTERNALSYM MSIARCHITECTUREFLAGS_X86}
+ MSIARCHITECTUREFLAGS_IA64 = $00000002; // set if creating the script for IA64 platform
+ {$EXTERNALSYM MSIARCHITECTUREFLAGS_IA64}
+ MSIARCHITECTUREFLAGS_AMD64 = $00000004; // set if creating the script for AMD64 platform
+ {$EXTERNALSYM MSIARCHITECTUREFLAGS_AMD64}
+
+type
+ MSIARCHITECTUREFLAGS = DWORD;
+ {$EXTERNALSYM MSIARCHITECTUREFLAGS}
+ TMsiArchitectureFlags = MSIARCHITECTUREFLAGS;
+
+const
+ MSIOPENPACKAGEFLAGS_IGNOREMACHINESTATE = $00000001; // ignore the machine state when creating the engine
+ {$EXTERNALSYM MSIOPENPACKAGEFLAGS_IGNOREMACHINESTATE}
+
+type
+ MSIOPENPACKAGEFLAGS = DWORD;
+ {$EXTERNALSYM MSIOPENPACKAGEFLAGS}
+ TMsiOpenPackageFlags = MSIOPENPACKAGEFLAGS;
+
+const
+ MSIADVERTISEOPTIONFLAGS_INSTANCE = $00000001; // set if advertising a new instance
+ {$EXTERNALSYM MSIADVERTISEOPTIONFLAGS_INSTANCE}
+
+type
+ tagMSIADVERTISEOPTIONFLAGS = DWORD;
+ {$EXTERNALSYM tagMSIADVERTISEOPTIONFLAGS}
+ MSIADVERTISEOPTIONFLAGS = tagMSIADVERTISEOPTIONFLAGS;
+ {$EXTERNALSYM MSIADVERTISEOPTIONFLAGS}
+ TMsiAdvertiseOptionFlags = MSIADVERTISEOPTIONFLAGS;
+
+// --------------------------------------------------------------------------
+// Functions to set the UI handling and logging. The UI will be used for error,
+// progress, and log messages for all subsequent calls to Installer Service
+// API functions that require UI.
+// --------------------------------------------------------------------------
+
+// Enable internal UI
+
+function MsiSetInternalUI(dwUILevel: INSTALLUILEVEL; phWnd: LPHWND): INSTALLUILEVEL; stdcall;
+{$EXTERNALSYM MsiSetInternalUI}
+
+// Enable external UI handling, returns any previous handler or NULL if none.
+// Messages are designated with a combination of bits from INSTALLLOGMODE enum.
+
+function MsiSetExternalUIA(puiHandler: INSTALLUI_HANDLERA; dwMessageFilter: DWORD;
+ pvContext: LPVOID): INSTALLUI_HANDLERA; stdcall;
+{$EXTERNALSYM MsiSetExternalUIA}
+function MsiSetExternalUIW(puiHandler: INSTALLUI_HANDLERW; dwMessageFilter: DWORD;
+ pvContext: LPVOID): INSTALLUI_HANDLERW; stdcall;
+{$EXTERNALSYM MsiSetExternalUIW}
+function MsiSetExternalUI(puiHandler: INSTALLUI_HANDLER; dwMessageFilter: DWORD;
+ pvContext: LPVOID): INSTALLUI_HANDLER; stdcall;
+{$EXTERNALSYM MsiSetExternalUI}
+
+// Enable logging to a file for all install sessions for the client process,
+// with control over which log messages are passed to the specified log file.
+// Messages are designated with a combination of bits from INSTALLLOGMODE enum.
+
+function MsiEnableLogA(dwLogMode: DWORD; szLogFile: LPCSTR; dwLogAttributes: DWORD): UINT; stdcall;
+{$EXTERNALSYM MsiEnableLogA}
+function MsiEnableLogW(dwLogMode: DWORD; szLogFile: LPCWSTR; dwLogAttributes: DWORD): UINT; stdcall;
+{$EXTERNALSYM MsiEnableLogW}
+function MsiEnableLog(dwLogMode: DWORD; szLogFile: LPCTSTR; dwLogAttributes: DWORD): UINT; stdcall;
+{$EXTERNALSYM MsiEnableLog}
+
+// --------------------------------------------------------------------------
+// Functions to query and configure a product as a whole.
+// --------------------------------------------------------------------------
+
+// Return the installed state for a product
+
+function MsiQueryProductStateA(szProduct: LPCSTR): INSTALLSTATE; stdcall;
+{$EXTERNALSYM MsiQueryProductStateA}
+function MsiQueryProductStateW(szProduct: LPCWSTR): INSTALLSTATE; stdcall;
+{$EXTERNALSYM MsiQueryProductStateW}
+function MsiQueryProductState(szProduct: LPCTSTR): INSTALLSTATE; stdcall;
+{$EXTERNALSYM MsiQueryProductState}
+
+// Return product info
+
+function MsiGetProductInfoA(szProduct: LPCSTR; szAttribute: LPCSTR;
+ lpValueBuf: LPSTR; pcchValueBuf: LPDWORD): UINT; stdcall;
+{$EXTERNALSYM MsiGetProductInfoA}
+function MsiGetProductInfoW(szProduct: LPCWSTR; szAttribute: LPCWSTR;
+ lpValueBuf: LPWSTR; pcchValueBuf: LPDWORD): UINT; stdcall;
+{$EXTERNALSYM MsiGetProductInfoW}
+function MsiGetProductInfo(szProduct: LPCTSTR; szAttribute: LPCTSTR;
+ lpValueBuf: LPTSTR; pcchValueBuf: LPDWORD): UINT; stdcall;
+{$EXTERNALSYM MsiGetProductInfo}
+
+// Install a new product.
+// Either may be NULL, but the DATABASE property must be specfied
+
+function MsiInstallProductA(szPackagePath: LPCSTR; szCommandLine: LPCSTR): UINT; stdcall;
+{$EXTERNALSYM MsiInstallProductA}
+function MsiInstallProductW(szPackagePath: LPCWSTR; szCommandLine: LPCWSTR): UINT; stdcall;
+{$EXTERNALSYM MsiInstallProductW}
+function MsiInstallProduct(szPackagePath: LPCTSTR; szCommandLine: LPCTSTR): UINT; stdcall;
+{$EXTERNALSYM MsiInstallProduct}
+
+// Install/uninstall an advertised or installed product
+// No action if installed and INSTALLSTATE_DEFAULT specified
+
+function MsiConfigureProductA(szProduct: LPCSTR; iInstallLevel: Integer;
+ eInstallState: INSTALLSTATE): UINT; stdcall;
+{$EXTERNALSYM MsiConfigureProductA}
+function MsiConfigureProductW(szProduct: LPCWSTR; iInstallLevel: Integer;
+ eInstallState: INSTALLSTATE): UINT; stdcall;
+{$EXTERNALSYM MsiConfigureProductW}
+function MsiConfigureProduct(szProduct: LPCTSTR; iInstallLevel: Integer;
+ eInstallState: INSTALLSTATE): UINT; stdcall;
+{$EXTERNALSYM MsiConfigureProduct}
+
+// Install/uninstall an advertised or installed product
+// No action if installed and INSTALLSTATE_DEFAULT specified
+
+function MsiConfigureProductExA(szProduct: LPCSTR; iInstallLevel: Integer;
+ eInstallState: INSTALLSTATE; szCommandLine: LPCSTR): UINT; stdcall;
+{$EXTERNALSYM MsiConfigureProductExA}
+function MsiConfigureProductExW(szProduct: LPCWSTR; iInstallLevel: Integer;
+ eInstallState: INSTALLSTATE; szCommandLine: LPCWSTR): UINT; stdcall;
+{$EXTERNALSYM MsiConfigureProductExW}
+function MsiConfigureProductEx(szProduct: LPCTSTR; iInstallLevel: Integer;
+ eInstallState: INSTALLSTATE; szCommandLine: LPCTSTR): UINT; stdcall;
+{$EXTERNALSYM MsiConfigureProductEx}
+
+// Reinstall product, used to validate or correct problems
+
+function MsiReinstallProductA(szProduct: LPCSTR; szReinstallMode: DWORD): UINT; stdcall;
+{$EXTERNALSYM MsiReinstallProductA}
+function MsiReinstallProductW(szProduct: LPCWSTR; szReinstallMode: DWORD): UINT; stdcall;
+{$EXTERNALSYM MsiReinstallProductW}
+function MsiReinstallProduct(szProduct: LPCTSTR; szReinstallMode: DWORD): UINT; stdcall;
+{$EXTERNALSYM MsiReinstallProduct}
+
+// Output reg and shortcut info to script file for specified architecture for Assign or Publish
+// If dwPlatform is 0, then the script is created based on the current platform (behavior of MsiAdvertiseProduct)
+// If dwOptions includes MSIADVERTISEOPTIONFLAGS_INSTANCE, then a new instance is advertised. Use of
+// this option requires that szTransforms include the instance transform that changes the product code
+
+function MsiAdvertiseProductExA(szPackagePath, szScriptfilePath, szTransforms: LPCSTR; lgidLanguage: LANGID;
+ dwPlatform, dwOptions: DWORD): UINT; stdcall;
+{$EXTERNALSYM MsiAdvertiseProductExA}
+function MsiAdvertiseProductExW(szPackagePath, szScriptfilePath, szTransforms: LPCWSTR; lgidLanguage: LANGID;
+ dwPlatform, dwOptions: DWORD): UINT; stdcall;
+{$EXTERNALSYM MsiAdvertiseProductExW}
+function MsiAdvertiseProductEx(szPackagePath, szScriptfilePath, szTransforms: LPCTSTR; lgidLanguage: LANGID;
+ dwPlatform, dwOptions: DWORD): UINT; stdcall;
+{$EXTERNALSYM MsiAdvertiseProductEx}
+
+// Output reg and shortcut info to script file for Assign or Publish
+
+function MsiAdvertiseProductA(szPackagePath, szScriptfilePath, szTransforms: LPCSTR; lgidLanguage: LANGID): UINT; stdcall;
+{$EXTERNALSYM MsiAdvertiseProductA}
+function MsiAdvertiseProductW(szPackagePath, szScriptfilePath, szTransforms: LPCWSTR; lgidLanguage: LANGID): UINT; stdcall;
+{$EXTERNALSYM MsiAdvertiseProductW}
+function MsiAdvertiseProduct(szPackagePath, szScriptfilePath, szTransforms: LPCTSTR; lgidLanguage: LANGID): UINT; stdcall;
+{$EXTERNALSYM MsiAdvertiseProduct}
+
+// Process advertise script file into supplied locations
+// If an icon folder is specified, icon files will be placed there
+// If an registry key is specified, registry data will be mapped under it
+// If fShortcuts is TRUE, shortcuts will be created. If a special folder is
+// returned by SHGetSpecialFolderLocation(?), it will hold the shortcuts.
+// if fRemoveItems is TRUE, items that are present will be removed
+
+function MsiProcessAdvertiseScriptA(szScriptFile, szIconFolder: LPCSTR; hRegData: HKEY; fShortcuts, fRemoveItems: BOOL): UINT; stdcall;
+{$EXTERNALSYM MsiProcessAdvertiseScriptA}
+function MsiProcessAdvertiseScriptW(szScriptFile, szIconFolder: LPCWSTR; hRegData: HKEY; fShortcuts, fRemoveItems: BOOL): UINT; stdcall;
+{$EXTERNALSYM MsiProcessAdvertiseScriptW}
+function MsiProcessAdvertiseScript(szScriptFile, szIconFolder: LPCTSTR; hRegData: HKEY; fShortcuts, fRemoveItems: BOOL): UINT; stdcall;
+{$EXTERNALSYM MsiProcessAdvertiseScript}
+
+// Process advertise script file using the supplied dwFlags control flags
+// if fRemoveItems is TRUE, items that are present will be removed
+
+function MsiAdvertiseScriptA(szScriptFile: LPCSTR; dwFlags: DWORD; phRegData: PHKEY; fRemoveItems: BOOL): UINT; stdcall;
+{$EXTERNALSYM MsiAdvertiseScriptA}
+function MsiAdvertiseScriptW(szScriptFile: LPCWSTR; dwFlags: DWORD; phRegData: PHKEY; fRemoveItems: BOOL): UINT; stdcall;
+{$EXTERNALSYM MsiAdvertiseScriptW}
+function MsiAdvertiseScript(szScriptFile: LPCTSTR; dwFlags: DWORD; phRegData: PHKEY; fRemoveItems: BOOL): UINT; stdcall;
+{$EXTERNALSYM MsiAdvertiseScript}
+
+// Return product info from an installer script file:
+// product code, language, version, readable name, path to package
+// Returns TRUE is success, FALSE if szScriptFile is not a valid script file
+
+function MsiGetProductInfoFromScriptA(szScriptFile: LPCSTR; lpProductBuf39: LPSTR; plgidLanguage: PLANGID; pdwVersion: LPDWORD;
+ lpNameBuf: LPSTR; pcchNameBuf: LPDWORD; lpPackageBuf: LPSTR; pcchPackageBuf: LPDWORD): UINT; stdcall;
+{$EXTERNALSYM MsiGetProductInfoFromScriptA}
+function MsiGetProductInfoFromScriptW(szScriptFile: LPCWSTR; lpProductBuf39: LPWSTR; plgidLanguage: PLANGID; pdwVersion: LPDWORD;
+ lpNameBuf: LPWSTR; pcchNameBuf: LPDWORD; lpPackageBuf: LPWSTR; pcchPackageBuf: LPDWORD): UINT; stdcall;
+{$EXTERNALSYM MsiGetProductInfoFromScriptW}
+function MsiGetProductInfoFromScript(szScriptFile: LPCTSTR; lpProductBuf39: LPTSTR; plgidLanguage: PLANGID; pdwVersion: LPDWORD;
+ lpNameBuf: LPTSTR; pcchNameBuf: LPDWORD; lpPackageBuf: LPTSTR; pcchPackageBuf: LPDWORD): UINT; stdcall;
+{$EXTERNALSYM MsiGetProductInfoFromScript}
+
+// Return the product code for a registered component, called once by apps
+
+function MsiGetProductCodeA(szComponent: LPCSTR; lpBuf39: LPSTR): UINT; stdcall;
+{$EXTERNALSYM MsiGetProductCodeA}
+function MsiGetProductCodeW(szComponent: LPCWSTR; lpBuf39: LPWSTR): UINT; stdcall;
+{$EXTERNALSYM MsiGetProductCodeW}
+function MsiGetProductCode(szComponent: LPCTSTR; lpBuf39: LPTSTR): UINT; stdcall;
+{$EXTERNALSYM MsiGetProductCode}
+
+// Return the registered user information for an installed product
+
+function MsiGetUserInfoA(szProduct: LPCSTR; lpUserNameBuf: LPSTR;
+ var pcchUserNameBuf: DWORD; lpOrgNameBuf: LPSTR; var pcchOrgNameBuf: DWORD;
+ lpSerialBuf: LPSTR; var pcchSerialBuf: DWORD): USERINFOSTATE; stdcall;
+{$EXTERNALSYM MsiGetUserInfoA}
+function MsiGetUserInfoW(szProduct: LPCWSTR; lpUserNameBuf: LPWSTR;
+ var pcchUserNameBuf: DWORD; lpOrgNameBuf: LPWSTR; var pcchOrgNameBuf: DWORD;
+ lpSerialBuf: LPWSTR; var pcchSerialBuf: DWORD): USERINFOSTATE; stdcall;
+{$EXTERNALSYM MsiGetUserInfoW}
+function MsiGetUserInfo(szProduct: LPCTSTR; lpUserNameBuf: LPTSTR;
+ var pcchUserNameBuf: DWORD; lpOrgNameBuf: LPTSTR; var pcchOrgNameBuf: DWORD;
+ lpSerialBuf: LPTSTR; var pcchSerialBuf: DWORD): USERINFOSTATE; stdcall;
+{$EXTERNALSYM MsiGetUserInfo}
+
+// Obtain and store user info and PID from installation wizard (first run)
+
+function MsiCollectUserInfoA(szProduct: LPCSTR): UINT; stdcall;
+{$EXTERNALSYM MsiCollectUserInfoA}
+function MsiCollectUserInfoW(szProduct: LPCWSTR): UINT; stdcall;
+{$EXTERNALSYM MsiCollectUserInfoW}
+function MsiCollectUserInfo(szProduct: LPCTSTR): UINT; stdcall;
+{$EXTERNALSYM MsiCollectUserInfo}
+
+// --------------------------------------------------------------------------
+// Functions to patch existing products
+// --------------------------------------------------------------------------
+
+// Patch all possible installed products.
+
+function MsiApplyPatchA(szPatchPackage: LPCSTR; szInstallPackage: LPCSTR;
+ eInstallType: INSTALLTYPE; szCommandLine: LPCSTR): UINT; stdcall;
+{$EXTERNALSYM MsiApplyPatchA}
+function MsiApplyPatchW(szPatchPackage: LPCWSTR; szInstallPackage: LPCWSTR;
+ eInstallType: INSTALLTYPE; szCommandLine: LPCWSTR): UINT; stdcall;
+{$EXTERNALSYM MsiApplyPatchW}
+function MsiApplyPatch(szPatchPackage: LPCTSTR; szInstallPackage: LPCTSTR;
+ eInstallType: INSTALLTYPE; szCommandLine: LPCTSTR): UINT; stdcall;
+{$EXTERNALSYM MsiApplyPatch}
+
+// Return patch info
+
+function MsiGetPatchInfoA(szPatch: LPCSTR; szAttribute: LPCSTR;
+ lpValueBuf: LPSTR; pcchValueBuf: LPDWORD): UINT; stdcall;
+{$EXTERNALSYM MsiGetPatchInfoA}
+function MsiGetPatchInfoW(szPatch: LPCWSTR; szAttribute: LPCWSTR;
+ lpValueBuf: LPWSTR; pcchValueBuf: LPDWORD): UINT; stdcall;
+{$EXTERNALSYM MsiGetPatchInfoW}
+function MsiGetPatchInfo(szPatch: LPCTSTR; szAttribute: LPCTSTR;
+ lpValueBuf: LPTSTR; pcchValueBuf: LPDWORD): UINT; stdcall;
+{$EXTERNALSYM MsiGetPatchInfo}
+
+// Enumerate all patches for a product
+
+function MsiEnumPatchesA(szProduct: LPCSTR; iPatchIndex: DWORD; lpPatchBuf: LPSTR;
+ lpTransformsBuf: LPSTR; var pcchTransformsBuf: DWORD): UINT; stdcall;
+{$EXTERNALSYM MsiEnumPatchesA}
+function MsiEnumPatchesW(szProduct: LPCWSTR; iPatchIndex: DWORD; lpPatchBuf: LPWSTR;
+ lpTransformsBuf: LPWSTR; var pcchTransformsBuf: DWORD): UINT; stdcall;
+{$EXTERNALSYM MsiEnumPatchesW}
+function MsiEnumPatches(szProduct: LPCTSTR; iPatchIndex: DWORD; lpPatchBuf: LPTSTR;
+ lpTransformsBuf: LPTSTR; var pcchTransformsBuf: DWORD): UINT; stdcall;
+{$EXTERNALSYM MsiEnumPatches}
+
+// --------------------------------------------------------------------------
+// Functions to query and configure a feature within a product.
+// --------------------------------------------------------------------------
+
+// Return the installed state for a product feature
+
+function MsiQueryFeatureStateA(szProduct: LPCSTR; szFeature: LPCSTR): INSTALLSTATE; stdcall;
+{$EXTERNALSYM MsiQueryFeatureStateA}
+function MsiQueryFeatureStateW(szProduct: LPCWSTR; szFeature: LPCWSTR): INSTALLSTATE; stdcall;
+{$EXTERNALSYM MsiQueryFeatureStateW}
+function MsiQueryFeatureState(szProduct: LPCTSTR; szFeature: LPCTSTR): INSTALLSTATE; stdcall;
+{$EXTERNALSYM MsiQueryFeatureState}
+
+// Indicate intent to use a product feature, increments usage count
+// Prompts for CD if not loaded, does not install feature
+
+function MsiUseFeatureA(szProduct: LPCSTR; szFeature: LPCSTR): INSTALLSTATE; stdcall;
+{$EXTERNALSYM MsiUseFeatureA}
+function MsiUseFeatureW(szProduct: LPCWSTR; szFeature: LPCWSTR): INSTALLSTATE; stdcall;
+{$EXTERNALSYM MsiUseFeatureW}
+function MsiUseFeature(szProduct: LPCTSTR; szFeature: LPCTSTR): INSTALLSTATE; stdcall;
+{$EXTERNALSYM MsiUseFeature}
+
+// Indicate intent to use a product feature, increments usage count
+// Prompts for CD if not loaded, does not install feature
+// Allows for bypassing component detection where performance is critical
+
+function MsiUseFeatureExA(szProduct: LPCSTR; szFeature: LPCSTR;
+ dwInstallMode: DWORD; dwReserved: DWORD): INSTALLSTATE; stdcall;
+{$EXTERNALSYM MsiUseFeatureExA}
+function MsiUseFeatureExW(szProduct: LPCWSTR; szFeature: LPCWSTR; dwInstallMode: DWORD;
+ dwReserved: DWORD): INSTALLSTATE; stdcall;
+{$EXTERNALSYM MsiUseFeatureExW}
+function MsiUseFeatureEx(szProduct: LPCTSTR; szFeature: LPCTSTR;
+ dwInstallMode: DWORD; dwReserved: DWORD): INSTALLSTATE; stdcall;
+{$EXTERNALSYM MsiUseFeatureEx}
+
+// Return the usage metrics for a product feature
+
+function MsiGetFeatureUsageA(szProduct: LPCSTR; szFeature: LPCSTR;
+ var pdwUseCount, pwDateUsed: WORD): UINT; stdcall;
+{$EXTERNALSYM MsiGetFeatureUsageA}
+function MsiGetFeatureUsageW(szProduct: LPCWSTR; szFeature: LPCWSTR;
+ var pdwUseCount, pwDateUsed: WORD): UINT; stdcall;
+{$EXTERNALSYM MsiGetFeatureUsageW}
+function MsiGetFeatureUsage(szProduct: LPCTSTR; szFeature: LPCTSTR;
+ var pdwUseCount, pwDateUsed: WORD): UINT; stdcall;
+{$EXTERNALSYM MsiGetFeatureUsage}
+
+// Force the installed state for a product feature
+
+function MsiConfigureFeatureA(szProduct, szFeature: LPCSTR; eInstallState: INSTALLSTATE): UINT; stdcall;
+{$EXTERNALSYM MsiConfigureFeatureA}
+function MsiConfigureFeatureW(szProduct, szFeature: LPCWSTR; eInstallState: INSTALLSTATE): UINT; stdcall;
+{$EXTERNALSYM MsiConfigureFeatureW}
+function MsiConfigureFeature(szProduct, szFeature: LPCTSTR; eInstallState: INSTALLSTATE): UINT; stdcall;
+{$EXTERNALSYM MsiConfigureFeature}
+
+// Reinstall feature, used to validate or correct problems
+
+function MsiReinstallFeatureA(szProduct, szFeature: LPCSTR; dwReinstallMode: DWORD): UINT; stdcall;
+{$EXTERNALSYM MsiReinstallFeatureA}
+function MsiReinstallFeatureW(szProduct, szFeature: LPCWSTR; dwReinstallMode: DWORD): UINT; stdcall;
+{$EXTERNALSYM MsiReinstallFeatureW}
+function MsiReinstallFeature(szProduct, szFeature: LPCTSTR; dwReinstallMode: DWORD): UINT; stdcall;
+{$EXTERNALSYM MsiReinstallFeature}
+
+// --------------------------------------------------------------------------
+// Functions to return a path to a particular component.
+// The state of the feature being used should have been checked previously.
+// --------------------------------------------------------------------------
+
+// Return full component path, performing any necessary installation
+// calls MsiQueryFeatureState to detect that all components are installed
+// then calls MsiConfigureFeature if any of its components are uninstalled
+// then calls MsiLocateComponent to obtain the path the its key file
+
+function MsiProvideComponentA(szProduct: LPCSTR; szFeature: LPCSTR; szComponent: LPCSTR;
+ dwInstallMode: DWORD; lpPathBuf: LPSTR; pcchPathBuf: LPDWORD): UINT; stdcall;
+{$EXTERNALSYM MsiProvideComponentA}
+function MsiProvideComponentW(szProduct: LPCWSTR; szFeature: LPCWSTR; szComponent: LPCWSTR;
+ dwInstallMode: DWORD; lpPathBuf: LPWSTR; pcchPathBuf: LPDWORD): UINT; stdcall;
+{$EXTERNALSYM MsiProvideComponentW}
+function MsiProvideComponent(szProduct: LPCTSTR; szFeature: LPCTSTR; szComponent: LPCTSTR;
+ dwInstallMode: DWORD; lpPathBuf: LPTSTR; pcchPathBuf: LPDWORD): UINT; stdcall;
+{$EXTERNALSYM MsiProvideComponent}
+
+// Return full component path for a qualified component, performing any necessary installation.
+// Prompts for source if necessary and increments the usage count for the feature.
+
+function MsiProvideQualifiedComponentA(szCategory: LPCSTR; szQualifier: LPCSTR;
+ dwInstallMode: DWORD; lpPathBuf: LPSTR; pcchPathBuf: LPDWORD): UINT; stdcall;
+{$EXTERNALSYM MsiProvideQualifiedComponentA}
+function MsiProvideQualifiedComponentW(szCategory: LPCWSTR; szQualifier: LPCWSTR;
+ dwInstallMode: DWORD; lpPathBuf: LPWSTR; pcchPathBuf: LPDWORD): UINT; stdcall;
+{$EXTERNALSYM MsiProvideQualifiedComponentW}
+function MsiProvideQualifiedComponent(szCategory: LPCTSTR; szQualifier: LPCTSTR;
+ dwInstallMode: DWORD; lpPathBuf: LPTSTR; pcchPathBuf: LPDWORD): UINT; stdcall;
+{$EXTERNALSYM MsiProvideQualifiedComponent}
+
+// Return full component path for a qualified component, performing any necessary installation.
+// Prompts for source if necessary and increments the usage count for the feature.
+// The szProduct parameter specifies the product to match that has published the qualified
+// component. If null, this API works the same as MsiProvideQualifiedComponent.
+
+function MsiProvideQualifiedComponentExA(szCategory: LPCSTR; szQualifier: LPCSTR;
+ dwInstallMode: DWORD; szProduct: LPCSTR; dwUnused1: DWORD; dwUnused2: DWORD;
+ lpPathBuf: LPSTR; pcchPathBuf: LPDWORD): UINT; stdcall;
+{$EXTERNALSYM MsiProvideQualifiedComponentExA}
+function MsiProvideQualifiedComponentExW(szCategory: LPCWSTR; szQualifier: LPCWSTR;
+ dwInstallMode: DWORD; szProduct: LPCWSTR; dwUnused1: DWORD; dwUnused2: DWORD;
+ lpPathBuf: LPWSTR; pcchPathBuf: LPDWORD): UINT; stdcall;
+{$EXTERNALSYM MsiProvideQualifiedComponentExW}
+function MsiProvideQualifiedComponentEx(szCategory: LPCTSTR; szQualifier: LPCTSTR;
+ dwInstallMode: DWORD; szProduct: LPCTSTR; dwUnused1: DWORD; dwUnused2: DWORD;
+ lpPathBuf: LPTSTR; pcchPathBuf: LPDWORD): UINT; stdcall;
+{$EXTERNALSYM MsiProvideQualifiedComponentEx}
+
+// Return full path to an installed component
+
+function MsiGetComponentPathA(szProduct: LPCSTR; szComponent: LPCSTR;
+ lpPathBuf: LPSTR; pcchBuf: LPDWORD): INSTALLSTATE; stdcall;
+{$EXTERNALSYM MsiGetComponentPathA}
+function MsiGetComponentPathW(szProduct: LPCWSTR; szComponent: LPCWSTR;
+ lpPathBuf: LPWSTR; pcchBuf: LPDWORD): INSTALLSTATE; stdcall;
+{$EXTERNALSYM MsiGetComponentPathW}
+function MsiGetComponentPath(szProduct: LPCTSTR; szComponent: LPCTSTR;
+ lpPathBuf: LPTSTR; pcchBuf: LPDWORD): INSTALLSTATE; stdcall;
+{$EXTERNALSYM MsiGetComponentPath}
+
+const
+ MSIASSEMBLYINFO_NETASSEMBLY = 0; // Net assemblies
+ {$EXTERNALSYM MSIASSEMBLYINFO_NETASSEMBLY}
+ MSIASSEMBLYINFO_WIN32ASSEMBLY = 1; // Win32 assemblies
+ {$EXTERNALSYM MSIASSEMBLYINFO_WIN32ASSEMBLY}
+
+// Return full component path for an assembly installed via the WI, performing any necessary installation.
+// Prompts for source if necessary and increments the usage count for the feature.
+// The szAssemblyName parameter specifies the stringized assembly name.
+// The szAppContext is the full path to the .cfg file or the app exe to which the assembly being requested
+// has been privatised to, which is null for global assemblies
+
+function MsiProvideAssemblyA(szAssemblyName, szAppContext: LPCSTR; dwInstallMode, dwAssemblyInfo: DWORD;
+ lpPathBuf: LPSTR; pcchPathBuf: LPDWORD): UINT; stdcall;
+{$EXTERNALSYM MsiProvideAssemblyA}
+function MsiProvideAssemblyW(szAssemblyName, szAppContext: LPCWSTR; dwInstallMode, dwAssemblyInfo: DWORD;
+ lpPathBuf: LPWSTR; pcchPathBuf: LPDWORD): UINT; stdcall;
+{$EXTERNALSYM MsiProvideAssemblyW}
+function MsiProvideAssembly(szAssemblyName, szAppContext: LPCTSTR; dwInstallMode, dwAssemblyInfo: DWORD;
+ lpPathBuf: LPTSTR; pcchPathBuf: LPDWORD): UINT; stdcall;
+{$EXTERNALSYM MsiProvideAssembly}
+
+// --------------------------------------------------------------------------
+// Functions to iterate registered products, features, and components.
+// As with reg keys, they accept a 0-based index into the enumeration.
+// --------------------------------------------------------------------------
+
+// Enumerate the registered products, either installed or advertised
+
+function MsiEnumProductsA(iProductIndex: DWORD; lpProductBuf: LPSTR): UINT; stdcall;
+{$EXTERNALSYM MsiEnumProductsA}
+function MsiEnumProductsW(iProductIndex: DWORD; lpProductBuf: LPWSTR): UINT; stdcall;
+{$EXTERNALSYM MsiEnumProductsW}
+function MsiEnumProducts(iProductIndex: DWORD; lpProductBuf: LPTSTR): UINT; stdcall;
+{$EXTERNALSYM MsiEnumProducts}
+
+{$IFDEF MSI110}
+
+// Enumerate products with given upgrade code
+
+function MsiEnumRelatedProductsA(lpUpgradeCode: LPCSTR; dwReserved: DWORD;
+ iProductIndex: DWORD; lpProductBuf: LPSTR): UINT; stdcall;
+{$EXTERNALSYM MsiEnumRelatedProductsA}
+function MsiEnumRelatedProductsW(lpUpgradeCode: LPCWSTR; dwReserved: DWORD;
+ iProductIndex: DWORD; lpProductBuf: LPWSTR): UINT; stdcall;
+{$EXTERNALSYM MsiEnumRelatedProductsW}
+function MsiEnumRelatedProducts(lpUpgradeCode: LPCTSTR; dwReserved: DWORD;
+ iProductIndex: DWORD; lpProductBuf: LPTSTR): UINT; stdcall;
+{$EXTERNALSYM MsiEnumRelatedProducts}
+
+{$ENDIF MSI110}
+
+// Enumerate the advertised features for a given product.
+// If parent is not required, supplying NULL will improve performance.
+
+function MsiEnumFeaturesA(szProduct: LPCSTR; iFeatureIndex: DWORD;
+ lpFeatureBuf: LPSTR; lpParentBuf: LPSTR): UINT; stdcall;
+{$EXTERNALSYM MsiEnumFeaturesA}
+function MsiEnumFeaturesW(szProduct: LPCWSTR; iFeatureIndex: DWORD;
+ lpFeatureBuf: LPWSTR; lpParentBuf: LPWSTR): UINT; stdcall;
+{$EXTERNALSYM MsiEnumFeaturesW}
+function MsiEnumFeatures(szProduct: LPCTSTR; iFeatureIndex: DWORD;
+ lpFeatureBuf: LPTSTR; lpParentBuf: LPTSTR): UINT; stdcall;
+{$EXTERNALSYM MsiEnumFeatures}
+
+// Enumerate the installed components for all products
+
+function MsiEnumComponentsA(iComponentIndex: DWORD; lpComponentBuf: LPSTR): UINT; stdcall;
+{$EXTERNALSYM MsiEnumComponentsA}
+function MsiEnumComponentsW(iComponentIndex: DWORD; lpComponentBuf: LPWSTR): UINT; stdcall;
+{$EXTERNALSYM MsiEnumComponentsW}
+function MsiEnumComponents(iComponentIndex: DWORD; lpComponentBuf: LPTSTR): UINT; stdcall;
+{$EXTERNALSYM MsiEnumComponents}
+
+// Enumerate the client products for a component
+
+function MsiEnumClientsA(szComponent: LPCSTR; iProductIndex: DWORD; lpProductBuf: LPSTR): UINT; stdcall;
+{$EXTERNALSYM MsiEnumClientsA}
+function MsiEnumClientsW(szComponent: LPCWSTR; iProductIndex: DWORD; lpProductBuf: LPWSTR): UINT; stdcall;
+{$EXTERNALSYM MsiEnumClientsW}
+function MsiEnumClients(szComponent: LPCTSTR; iProductIndex: DWORD; lpProductBuf: LPTSTR): UINT; stdcall;
+{$EXTERNALSYM MsiEnumClients}
+
+// Enumerate the qualifiers for an advertised component.
+
+function MsiEnumComponentQualifiersA(szComponent: LPCSTR; iIndex: DWORD;
+ lpQualifierBuf: LPSTR; var pcchQualifierBuf: DWORD; lpApplicationDataBuf: LPSTR;
+ pcchApplicationDataBuf: LPDWORD): UINT; stdcall;
+{$EXTERNALSYM MsiEnumComponentQualifiersA}
+function MsiEnumComponentQualifiersW(szComponent: LPCWSTR; iIndex: DWORD;
+ lpQualifierBuf: LPWSTR; var pcchQualifierBuf: DWORD; lpApplicationDataBuf: LPWSTR;
+ pcchApplicationDataBuf: LPDWORD): UINT; stdcall;
+{$EXTERNALSYM MsiEnumComponentQualifiersW}
+function MsiEnumComponentQualifiers(szComponent: LPCTSTR; iIndex: DWORD;
+ lpQualifierBuf: LPTSTR; var pcchQualifierBuf: DWORD; lpApplicationDataBuf: LPTSTR;
+ pcchApplicationDataBuf: LPDWORD): UINT; stdcall;
+{$EXTERNALSYM MsiEnumComponentQualifiers}
+
+// --------------------------------------------------------------------------
+// Functions to obtain product or package information.
+// --------------------------------------------------------------------------
+
+// Open the installation for a product to obtain detailed information
+
+function MsiOpenProductA(szProduct: LPCSTR; var hProduct: MSIHANDLE): UINT; stdcall;
+{$EXTERNALSYM MsiOpenProductA}
+function MsiOpenProductW(szProduct: LPCWSTR; var hProduct: MSIHANDLE): UINT; stdcall;
+{$EXTERNALSYM MsiOpenProductW}
+function MsiOpenProduct(szProduct: LPCTSTR; var hProduct: MSIHANDLE): UINT; stdcall;
+{$EXTERNALSYM MsiOpenProduct}
+
+// Open a product package in order to access product properties
+
+function MsiOpenPackageA(szPackagePath: LPCSTR; var hProduct: MSIHANDLE): UINT; stdcall;
+{$EXTERNALSYM MsiOpenPackageA}
+function MsiOpenPackageW(szPackagePath: LPCWSTR; var hProduct: MSIHANDLE): UINT; stdcall;
+{$EXTERNALSYM MsiOpenPackageW}
+function MsiOpenPackage(szPackagePath: LPCTSTR; var hProduct: MSIHANDLE): UINT; stdcall;
+{$EXTERNALSYM MsiOpenPackage}
+
+// Open a product package in order to access product properties
+// Option to create a "safe" engine that does not look at machine state
+// and does not allow for modification of machine state
+
+function MsiOpenPackageExA(szPackagePath: LPCSTR; dwOptions: DWORD; var hProduct: MSIHANDLE): UINT; stdcall;
+{$EXTERNALSYM MsiOpenPackageExA}
+function MsiOpenPackageExW(szPackagePath: LPCWSTR; dwOptions: DWORD; var hProduct: MSIHANDLE): UINT; stdcall;
+{$EXTERNALSYM MsiOpenPackageExW}
+function MsiOpenPackageEx(szPackagePath: LPCTSTR; dwOptions: DWORD; var hProduct: MSIHANDLE): UINT; stdcall;
+{$EXTERNALSYM MsiOpenPackageEx}
+
+// Provide the value for an installation property.
+
+function MsiGetProductPropertyA(hProduct: MSIHANDLE; szProperty: LPCSTR;
+ lpValueBuf: LPSTR; pcchValueBuf: LPDWORD): UINT; stdcall;
+{$EXTERNALSYM MsiGetProductPropertyA}
+function MsiGetProductPropertyW(hProduct: MSIHANDLE; szProperty: LPCWSTR;
+ lpValueBuf: LPWSTR; pcchValueBuf: LPDWORD): UINT; stdcall;
+{$EXTERNALSYM MsiGetProductPropertyW}
+function MsiGetProductProperty(hProduct: MSIHANDLE; szProperty: LPCTSTR;
+ lpValueBuf: LPTSTR; pcchValueBuf: LPDWORD): UINT; stdcall;
+{$EXTERNALSYM MsiGetProductProperty}
+
+// Determine whether a file is a package
+// Returns ERROR_SUCCESS if file is a package.
+
+function MsiVerifyPackageA(szPackagePath: LPCSTR): UINT; stdcall;
+{$EXTERNALSYM MsiVerifyPackageA}
+function MsiVerifyPackageW(szPackagePath: LPCWSTR): UINT; stdcall;
+{$EXTERNALSYM MsiVerifyPackageW}
+function MsiVerifyPackage(szPackagePath: LPCTSTR): UINT; stdcall;
+{$EXTERNALSYM MsiVerifyPackage}
+
+// Provide descriptive information for product feature: title and description.
+// Returns the install level for the feature, or -1 if feature is unknown.
+// 0 = feature is not available on this machine
+// 1 = highest priority, feature installed if parent is installed
+// >1 = decreasing priority, feature installation based on InstallLevel property
+
+function MsiGetFeatureInfoA(hProduct: MSIHANDLE; szFeature: LPCSTR; var lpAttributes: DWORD;
+ lpTitleBuf: LPSTR; var pcchTitleBuf: DWORD; lpHelpBuf: LPSTR; var pcchHelpBuf: DWORD): UINT; stdcall;
+{$EXTERNALSYM MsiGetFeatureInfoA}
+function MsiGetFeatureInfoW(hProduct: MSIHANDLE; szFeature: LPCWSTR; var lpAttributes: DWORD;
+ lpTitleBuf: LPWSTR; var pcchTitleBuf: DWORD; lpHelpBuf: LPWSTR; var pcchHelpBuf: DWORD): UINT; stdcall;
+{$EXTERNALSYM MsiGetFeatureInfoW}
+function MsiGetFeatureInfo(hProduct: MSIHANDLE; szFeature: LPCTSTR; var lpAttributes: DWORD;
+ lpTitleBuf: LPTSTR; var pcchTitleBuf: DWORD; lpHelpBuf: LPTSTR; var pcchHelpBuf: DWORD): UINT; stdcall;
+{$EXTERNALSYM MsiGetFeatureInfo}
+
+// --------------------------------------------------------------------------
+// Functions to access or install missing components and files.
+// These should be used as a last resort.
+// --------------------------------------------------------------------------
+
+// Install a component unexpectedly missing, provided only for error recovery
+// This would typically occur due to failue to establish feature availability
+// The product feature having the smallest incremental cost is installed
+
+function MsiInstallMissingComponentA(szProduct: LPCSTR; szComponent: LPCSTR;
+ eInstallState: INSTALLSTATE): UINT; stdcall;
+{$EXTERNALSYM MsiInstallMissingComponentA}
+function MsiInstallMissingComponentW(szProduct: LPCWSTR; szComponent: LPCWSTR;
+ eInstallState: INSTALLSTATE): UINT; stdcall;
+{$EXTERNALSYM MsiInstallMissingComponentW}
+function MsiInstallMissingComponent(szProduct: LPCTSTR; szComponent: LPCTSTR;
+ eInstallState: INSTALLSTATE): UINT; stdcall;
+{$EXTERNALSYM MsiInstallMissingComponent}
+
+// Install a file unexpectedly missing, provided only for error recovery
+// This would typically occur due to failue to establish feature availability
+// The missing component is determined from the product's File table, then
+// the product feature having the smallest incremental cost is installed
+
+function MsiInstallMissingFileA(szProduct: LPCSTR; szFile: LPCSTR): UINT; stdcall;
+{$EXTERNALSYM MsiInstallMissingFileA}
+function MsiInstallMissingFileW(szProduct: LPCWSTR; szFile: LPCWSTR): UINT; stdcall;
+{$EXTERNALSYM MsiInstallMissingFileW}
+function MsiInstallMissingFile(szProduct: LPCTSTR; szFile: LPCTSTR): UINT; stdcall;
+{$EXTERNALSYM MsiInstallMissingFile}
+
+// Return full path to an installed component without a product code
+// This function attempts to determine the product using MsiGetProductCode
+// but is not guaranteed to find the correct product for the caller.
+// MsiGetComponentPath should always be called when possible.
+
+function MsiLocateComponentA(szComponent: LPCSTR; lpPathBuf: LPSTR; pcchBuf: LPDWORD): INSTALLSTATE; stdcall;
+{$EXTERNALSYM MsiLocateComponentA}
+function MsiLocateComponentW(szComponent: LPCWSTR; lpPathBuf: LPWSTR; pcchBuf: LPDWORD): INSTALLSTATE; stdcall;
+{$EXTERNALSYM MsiLocateComponentW}
+function MsiLocateComponent(szComponent: LPCTSTR; lpPathBuf: LPTSTR; pcchBuf: LPDWORD): INSTALLSTATE; stdcall;
+{$EXTERNALSYM MsiLocateComponent}
+
+{$IFDEF MSI110}
+
+// --------------------------------------------------------------------------
+// Functions used to manage the list of valid sources.
+// --------------------------------------------------------------------------
+
+// Opens the list of sources for the specified user's install of the product
+// and removes all network sources from the list. A NULL or empty value for
+// the user name indicates the per-machine install.
+
+function MsiSourceListClearAllA(szProduct: LPCSTR; szUserName: LPCSTR; dwReserved: DWORD): UINT; stdcall;
+{$EXTERNALSYM MsiSourceListClearAllA}
+function MsiSourceListClearAllW(szProduct: LPCWSTR; szUserName: LPCWSTR; dwReserved: DWORD): UINT; stdcall;
+{$EXTERNALSYM MsiSourceListClearAllW}
+function MsiSourceListClearAll(szProduct: LPCTSTR; szUserName: LPCTSTR; dwReserved: DWORD): UINT; stdcall;
+{$EXTERNALSYM MsiSourceListClearAll}
+
+// Opens the list of sources for the specified user's install of the product
+// and adds the provided source as a new network source. A NULL or empty
+// value for the user name indicates the per-machine install.
+
+function MsiSourceListAddSourceA(szProduct: LPCSTR; szUserName: LPCSTR;
+ dwReserved: DWORD; szSource: LPCSTR): UINT; stdcall;
+{$EXTERNALSYM MsiSourceListAddSourceA}
+function MsiSourceListAddSourceW(szProduct: LPCWSTR; szUserName: LPCWSTR;
+ dwReserved: DWORD; szSource: LPCWSTR): UINT; stdcall;
+{$EXTERNALSYM MsiSourceListAddSourceW}
+function MsiSourceListAddSource(szProduct: LPCTSTR; szUserName: LPCTSTR;
+ dwReserved: DWORD; szSource: LPCTSTR): UINT; stdcall;
+{$EXTERNALSYM MsiSourceListAddSource}
+
+// Forces the installer to reevaluate the list of sources the next time that
+// the specified product needs a source.
+
+function MsiSourceListForceResolutionA(szProduct, szUserName: LPCSTR; dwReserved: DWORD): UINT; stdcall;
+{$EXTERNALSYM MsiSourceListForceResolutionA}
+function MsiSourceListForceResolutionW(szProduct, szUserName: LPCWSTR; dwReserved: DWORD): UINT; stdcall;
+{$EXTERNALSYM MsiSourceListForceResolutionW}
+function MsiSourceListForceResolution(szProduct, szUserName: LPCTSTR; dwReserved: DWORD): UINT; stdcall;
+{$EXTERNALSYM MsiSourceListForceResolution}
+
+{$ENDIF MSI110}
+
+// --------------------------------------------------------------------------
+// Utility functions
+// --------------------------------------------------------------------------
+
+// Give the version string and language for a specified file
+
+function MsiGetFileVersionA(szFilePath: LPCSTR; lpVersionBuf: LPSTR;
+ var pcchVersionBuf: DWORD; lpLangBuf: LPSTR; var pcchLangBuf: DWORD): UINT; stdcall;
+{$EXTERNALSYM MsiGetFileVersionA}
+function MsiGetFileVersionW(szFilePath: LPCWSTR; lpVersionBuf: LPWSTR;
+ var pcchVersionBuf: DWORD; lpLangBuf: LPWSTR; var pcchLangBuf: DWORD): UINT; stdcall;
+{$EXTERNALSYM MsiGetFileVersionW}
+function MsiGetFileVersion(szFilePath: LPCTSTR; lpVersionBuf: LPTSTR;
+ var pcchVersionBuf: DWORD; lpLangBuf: LPTSTR; var pcchLangBuf: DWORD): UINT; stdcall;
+{$EXTERNALSYM MsiGetFileVersion}
+
+function MsiGetFileHashA(szFilePath: LPCSTR; dwOptions: DWORD; pHash: PMSIFILEHASHINFO): UINT; stdcall;
+{$EXTERNALSYM MsiGetFileHashA}
+function MsiGetFileHashW(szFilePath: LPCWSTR; dwOptions: DWORD; pHash: PMSIFILEHASHINFO): UINT; stdcall;
+{$EXTERNALSYM MsiGetFileHashW}
+function MsiGetFileHash(szFilePath: LPCTSTR; dwOptions: DWORD; pHash: PMSIFILEHASHINFO): UINT; stdcall;
+{$EXTERNALSYM MsiGetFileHash}
+
+function MsiGetFileSignatureInformationA(szSignedObjectPath: LPCSTR; dwFlags: DWORD; var ppcCertContext: PCCERT_CONTEXT;
+ pbHashData: LPBYTE; pcbHashData: LPDWORD): HRESULT; stdcall;
+{$EXTERNALSYM MsiGetFileSignatureInformationA}
+function MsiGetFileSignatureInformationW(szSignedObjectPath: LPCWSTR; dwFlags: DWORD; var ppcCertContext: PCCERT_CONTEXT;
+ pbHashData: LPBYTE; pcbHashData: LPDWORD): HRESULT; stdcall;
+{$EXTERNALSYM MsiGetFileSignatureInformationW}
+function MsiGetFileSignatureInformation(szSignedObjectPath: LPCTSTR; dwFlags: DWORD; var ppcCertContext: PCCERT_CONTEXT;
+ pbHashData: LPBYTE; pcbHashData: LPDWORD): HRESULT; stdcall;
+{$EXTERNALSYM MsiGetFileSignatureInformation}
+
+// By default, when only requesting the certificate context, an invalid hash
+// in the digital signature is not a fatal error. Set this flag in the dwFlags
+// parameter to make the TRUST_E_BAD_DIGEST error fatal.
+
+const
+ MSI_INVALID_HASH_IS_FATAL = $1;
+ {$EXTERNALSYM MSI_INVALID_HASH_IS_FATAL}
+
+{$IFDEF MSI110}
+
+// examine a shortcut, and retrieve its descriptor information
+// if available.
+
+function MsiGetShortcutTargetA(szShortcutPath: LPCSTR; szProductCode: LPSTR;
+ szFeatureId: LPSTR; szComponentCode: LPSTR): UINT; stdcall;
+{$EXTERNALSYM MsiGetShortcutTargetA}
+function MsiGetShortcutTargetW(szShortcutPath: LPCWSTR; szProductCode: LPWSTR;
+ szFeatureId: LPWSTR; szComponentCode: LPWSTR): UINT; stdcall;
+{$EXTERNALSYM MsiGetShortcutTargetW}
+function MsiGetShortcutTarget(szShortcutPath: LPCTSTR; szProductCode: LPTSTR;
+ szFeatureId: LPTSTR; szComponentCode: LPTSTR): UINT; stdcall;
+{$EXTERNALSYM MsiGetShortcutTarget}
+
+{$ENDIF MSI110}
+
+// checks to see if a product is managed
+// checks per-machine if called from system context, per-user if from
+// user context
+
+function MsiIsProductElevatedA(szProduct: LPCSTR; var pfElevated: BOOL): UINT; stdcall;
+{$EXTERNALSYM MsiIsProductElevatedA}
+function MsiIsProductElevatedW(szProduct: LPCWSTR; var pfElevated: BOOL): UINT; stdcall;
+{$EXTERNALSYM MsiIsProductElevatedW}
+function MsiIsProductElevated(szProduct: LPCTSTR; var pfElevated: BOOL): UINT; stdcall;
+{$EXTERNALSYM MsiIsProductElevated}
+
+// --------------------------------------------------------------------------
+// Error codes for installer access functions - until merged to winerr.h
+// --------------------------------------------------------------------------
+
+const
+ ERROR_INSTALL_USEREXIT = 1602; // User cancel installation.
+ {$EXTERNALSYM ERROR_INSTALL_USEREXIT}
+ ERROR_INSTALL_FAILURE = 1603; // Fatal error during installation.
+ {$EXTERNALSYM ERROR_INSTALL_FAILURE}
+ ERROR_INSTALL_SUSPEND = 1604; // Installation suspended, incomplete.
+ {$EXTERNALSYM ERROR_INSTALL_SUSPEND}
+ ERROR_UNKNOWN_PRODUCT = 1605; // This action is only valid for products that are currently installed.
+ {$EXTERNALSYM ERROR_UNKNOWN_PRODUCT}
+ ERROR_UNKNOWN_FEATURE = 1606; // Feature ID not registered.
+ {$EXTERNALSYM ERROR_UNKNOWN_FEATURE}
+ ERROR_UNKNOWN_COMPONENT = 1607; // Component ID not registered.
+ {$EXTERNALSYM ERROR_UNKNOWN_COMPONENT}
+ ERROR_UNKNOWN_PROPERTY = 1608; // Unknown property.
+ {$EXTERNALSYM ERROR_UNKNOWN_PROPERTY}
+ ERROR_INVALID_HANDLE_STATE = 1609; // Handle is in an invalid state.
+ {$EXTERNALSYM ERROR_INVALID_HANDLE_STATE}
+ ERROR_BAD_CONFIGURATION = 1610; // The configuration data for this product is corrupt. Contact your support personnel.
+ {$EXTERNALSYM ERROR_BAD_CONFIGURATION}
+ ERROR_INDEX_ABSENT = 1611; // Component qualifier not present.
+ {$EXTERNALSYM ERROR_INDEX_ABSENT}
+ ERROR_INSTALL_SOURCE_ABSENT = 1612; // The installation source for this product is not available. Verify that the source exists and that you can access it.
+ {$EXTERNALSYM ERROR_INSTALL_SOURCE_ABSENT}
+ ERROR_PRODUCT_UNINSTALLED = 1614; // Product is uninstalled.
+ {$EXTERNALSYM ERROR_PRODUCT_UNINSTALLED}
+ ERROR_BAD_QUERY_SYNTAX = 1615; // SQL query syntax invalid or unsupported.
+ {$EXTERNALSYM ERROR_BAD_QUERY_SYNTAX}
+ ERROR_INVALID_FIELD = 1616; // Record field does not exist.
+ {$EXTERNALSYM ERROR_INVALID_FIELD}
+
+ ERROR_INSTALL_SERVICE_FAILURE = 1601; // The Windows Installer service could not be accessed. Contact your support personnel to verify that the Windows Installer service is properly registered.
+ {$EXTERNALSYM ERROR_INSTALL_SERVICE_FAILURE}
+ ERROR_INSTALL_PACKAGE_VERSION = 1613; // This installation package cannot be installed by the Windows Installer service. You must install a Windows service pack that contains a newer version of the Windows Installer service.
+ {$EXTERNALSYM ERROR_INSTALL_PACKAGE_VERSION}
+ ERROR_INSTALL_ALREADY_RUNNING = 1618; // Another installation is already in progress. Complete that installation before proceeding with this install.
+ {$EXTERNALSYM ERROR_INSTALL_ALREADY_RUNNING}
+ ERROR_INSTALL_PACKAGE_OPEN_FAILED = 1619; // This installation package could not be opened. Verify that the package exists and that you can access it, or contact the application vendor to verify that this is a valid Windows Installer package.
+ {$EXTERNALSYM ERROR_INSTALL_PACKAGE_OPEN_FAILED}
+ ERROR_INSTALL_PACKAGE_INVALID = 1620; // This installation package could not be opened. Contact the application vendor to verify that this is a valid Windows Installer package.
+ {$EXTERNALSYM ERROR_INSTALL_PACKAGE_INVALID}
+ ERROR_INSTALL_UI_FAILURE = 1621; // There was an error starting the Windows Installer service user interface. Contact your support personnel.
+ {$EXTERNALSYM ERROR_INSTALL_UI_FAILURE}
+ ERROR_INSTALL_LOG_FAILURE = 1622; // Error opening installation log file. Verify that the specified log file location exists and is writable.
+ {$EXTERNALSYM ERROR_INSTALL_LOG_FAILURE}
+ ERROR_INSTALL_LANGUAGE_UNSUPPORTED = 1623; // This language of this installation package is not supported by your system.
+ {$EXTERNALSYM ERROR_INSTALL_LANGUAGE_UNSUPPORTED}
+ ERROR_INSTALL_PACKAGE_REJECTED = 1625; // The system administrator has set policies to prevent this installation.
+ {$EXTERNALSYM ERROR_INSTALL_PACKAGE_REJECTED}
+
+ ERROR_FUNCTION_NOT_CALLED = 1626; // Function could not be executed.
+ {$EXTERNALSYM ERROR_FUNCTION_NOT_CALLED}
+ ERROR_FUNCTION_FAILED = 1627; // Function failed during execution.
+ {$EXTERNALSYM ERROR_FUNCTION_FAILED}
+ ERROR_INVALID_TABLE = 1628; // Invalid or unknown table specified.
+ {$EXTERNALSYM ERROR_INVALID_TABLE}
+ ERROR_DATATYPE_MISMATCH = 1629; // Data supplied is of wrong type.
+ {$EXTERNALSYM ERROR_DATATYPE_MISMATCH}
+ ERROR_UNSUPPORTED_TYPE = 1630; // Data of this type is not supported.
+ {$EXTERNALSYM ERROR_UNSUPPORTED_TYPE}
+ ERROR_CREATE_FAILED = 1631; // The Windows Installer service failed to start. Contact your support personnel.
+ {$EXTERNALSYM ERROR_CREATE_FAILED}
+
+ ERROR_INSTALL_TEMP_UNWRITABLE = 1632; // The Temp folder is on a drive that is full or is inaccessible. Free up space on the drive or verify that you have write permission on the Temp folder.
+ {$EXTERNALSYM ERROR_INSTALL_TEMP_UNWRITABLE}
+
+ ERROR_INSTALL_PLATFORM_UNSUPPORTED = 1633; // This installation package is not supported by this processor type. Contact your product vendor.
+ {$EXTERNALSYM ERROR_INSTALL_PLATFORM_UNSUPPORTED}
+
+ ERROR_INSTALL_NOTUSED = 1634; // Component not used on this machine
+ {$EXTERNALSYM ERROR_INSTALL_NOTUSED}
+
+ ERROR_INSTALL_TRANSFORM_FAILURE = 1624; // Error applying transforms. Verify that the specified transform paths are valid.
+ {$EXTERNALSYM ERROR_INSTALL_TRANSFORM_FAILURE}
+
+ ERROR_PATCH_PACKAGE_OPEN_FAILED = 1635; // This patch package could not be opened. Verify that the patch package exists and that you can access it, or contact the application vendor to verify that this is a valid Windows Installer patch package.
+ {$EXTERNALSYM ERROR_PATCH_PACKAGE_OPEN_FAILED}
+ ERROR_PATCH_PACKAGE_INVALID = 1636; // This patch package could not be opened. Contact the application vendor to verify that this is a valid Windows Installer patch package.
+ {$EXTERNALSYM ERROR_PATCH_PACKAGE_INVALID}
+ ERROR_PATCH_PACKAGE_UNSUPPORTED = 1637; // This patch package cannot be processed by the Windows Installer service. You must install a Windows service pack that contains a newer version of the Windows Installer service.
+ {$EXTERNALSYM ERROR_PATCH_PACKAGE_UNSUPPORTED}
+
+ ERROR_PRODUCT_VERSION = 1638; // Another version of this product is already installed. Installation of this version cannot continue. To configure or remove the existing version of this product, use Add/Remove Programs on the Control Panel.
+ {$EXTERNALSYM ERROR_PRODUCT_VERSION}
+
+ ERROR_INVALID_COMMAND_LINE = 1639; // Invalid command line argument. Consult the Windows Installer SDK for detailed command line help.
+ {$EXTERNALSYM ERROR_INVALID_COMMAND_LINE}
+
+// The following three error codes are not returned from MSI version 1.0
+
+ ERROR_INSTALL_REMOTE_DISALLOWED = 1640; // Configuration of this product is not permitted from remote sessions. Contact your administrator.
+ {$EXTERNALSYM ERROR_INSTALL_REMOTE_DISALLOWED}
+
+ ERROR_SUCCESS_REBOOT_INITIATED = 1641; // The requested operation completed successfully. The system will be restarted so the changes can take effect.
+ {$EXTERNALSYM ERROR_SUCCESS_REBOOT_INITIATED}
+
+ ERROR_PATCH_TARGET_NOT_FOUND = 1642; // The upgrade patch cannot be installed by the Windows Installer service because the program to be upgraded may be missing, or the upgrade patch may update a different version of the program. Verify that the program to be upgraded exists on your computer and that you have the correct upgrade patch.
+ {$EXTERNALSYM ERROR_PATCH_TARGET_NOT_FOUND}
+
+// The following two error codes are not returned from MSI version 1.0, 1.1. or 1.2
+
+ ERROR_PATCH_PACKAGE_REJECTED = 1643; // The patch package is not permitted by software restriction policy.
+ {$EXTERNALSYM ERROR_PATCH_PACKAGE_REJECTED}
+ ERROR_INSTALL_TRANSFORM_REJECTED = 1644; // One or more customizations are not permitted by software restriction policy.
+ {$EXTERNALSYM ERROR_INSTALL_TRANSFORM_REJECTED}
+
+// The following error code is returned only from MSI post version 2.0
+
+// LOCALIZE BEGIN:
+
+//#ifndef ERROR_INSTALL_REMOTE_PROHIBITED
+ ERROR_INSTALL_REMOTE_PROHIBITED = 1645; // The Windows Installer does not permit installation from a Remote Desktop Connection.
+ {$EXTERNALSYM ERROR_INSTALL_REMOTE_PROHIBITED}
+
+//#endif
+
+// LOCALIZE END
+
+implementation
+
+const
+ msilib = 'msi.dll';
+ {$IFDEF UNICODE}
+ AWSuffix = 'W';
+ {$ELSE}
+ AWSuffix = 'A';
+ {$ENDIF UNICODE}
+
+{$IFDEF DYNAMIC_LINK}
+
+var
+ _MsiCloseHandle: Pointer;
+
+function MsiCloseHandle;
+begin
+ GetProcedureAddress(_MsiCloseHandle, msilib, 'MsiCloseHandle');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiCloseHandle]
+ end;
+end;
+
+var
+ _MsiCloseAllHandles: Pointer;
+
+function MsiCloseAllHandles;
+begin
+ GetProcedureAddress(_MsiCloseAllHandles, msilib, 'MsiCloseAllHandles');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiCloseAllHandles]
+ end;
+end;
+
+var
+ _MsiSetInternalUI: Pointer;
+
+function MsiSetInternalUI;
+begin
+ GetProcedureAddress(_MsiSetInternalUI, msilib, 'MsiSetInternalUI');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiSetInternalUI]
+ end;
+end;
+
+var
+ _MsiSetExternalUIA: Pointer;
+
+function MsiSetExternalUIA;
+begin
+ GetProcedureAddress(_MsiSetExternalUIA, msilib, 'MsiSetExternalUIA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiSetExternalUIA]
+ end;
+end;
+
+var
+ _MsiSetExternalUIW: Pointer;
+
+function MsiSetExternalUIW;
+begin
+ GetProcedureAddress(_MsiSetExternalUIW, msilib, 'MsiSetExternalUIW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiSetExternalUIW]
+ end;
+end;
+
+var
+ _MsiSetExternalUI: Pointer;
+
+function MsiSetExternalUI;
+begin
+ GetProcedureAddress(_MsiSetExternalUI, msilib, 'MsiSetExternalUI' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiSetExternalUI]
+ end;
+end;
+
+var
+ _MsiEnableLogA: Pointer;
+
+function MsiEnableLogA;
+begin
+ GetProcedureAddress(_MsiEnableLogA, msilib, 'MsiEnableLogA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiEnableLogA]
+ end;
+end;
+
+var
+ _MsiEnableLogW: Pointer;
+
+function MsiEnableLogW;
+begin
+ GetProcedureAddress(_MsiEnableLogW, msilib, 'MsiEnableLogW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiEnableLogW]
+ end;
+end;
+
+var
+ _MsiEnableLog: Pointer;
+
+function MsiEnableLog;
+begin
+ GetProcedureAddress(_MsiEnableLog, msilib, 'MsiEnableLog' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiEnableLog]
+ end;
+end;
+
+var
+ _MsiQueryProductStateA: Pointer;
+
+function MsiQueryProductStateA;
+begin
+ GetProcedureAddress(_MsiQueryProductStateA, msilib, 'MsiQueryProductStateA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiQueryProductStateA]
+ end;
+end;
+
+var
+ _MsiQueryProductStateW: Pointer;
+
+function MsiQueryProductStateW;
+begin
+ GetProcedureAddress(_MsiQueryProductStateW, msilib, 'MsiQueryProductStateW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiQueryProductStateW]
+ end;
+end;
+
+var
+ _MsiQueryProductState: Pointer;
+
+function MsiQueryProductState;
+begin
+ GetProcedureAddress(_MsiQueryProductState, msilib, 'MsiQueryProductState' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiQueryProductState]
+ end;
+end;
+
+var
+ _MsiGetProductInfoA: Pointer;
+
+function MsiGetProductInfoA;
+begin
+ GetProcedureAddress(_MsiGetProductInfoA, msilib, 'MsiGetProductInfoA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiGetProductInfoA]
+ end;
+end;
+
+var
+ _MsiGetProductInfoW: Pointer;
+
+function MsiGetProductInfoW;
+begin
+ GetProcedureAddress(_MsiGetProductInfoW, msilib, 'MsiGetProductInfoW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiGetProductInfoW]
+ end;
+end;
+
+var
+ _MsiGetProductInfo: Pointer;
+
+function MsiGetProductInfo;
+begin
+ GetProcedureAddress(_MsiGetProductInfo, msilib, 'MsiGetProductInfo' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiGetProductInfo]
+ end;
+end;
+
+var
+ _MsiInstallProductA: Pointer;
+
+function MsiInstallProductA;
+begin
+ GetProcedureAddress(_MsiInstallProductA, msilib, 'MsiInstallProductA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiInstallProductA]
+ end;
+end;
+
+var
+ _MsiInstallProductW: Pointer;
+
+function MsiInstallProductW;
+begin
+ GetProcedureAddress(_MsiInstallProductW, msilib, 'MsiInstallProductW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiInstallProductW]
+ end;
+end;
+
+var
+ _MsiInstallProduct: Pointer;
+
+function MsiInstallProduct;
+begin
+ GetProcedureAddress(_MsiInstallProduct, msilib, 'MsiInstallProduct' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiInstallProduct]
+ end;
+end;
+
+var
+ _MsiConfigureProductA: Pointer;
+
+function MsiConfigureProductA;
+begin
+ GetProcedureAddress(_MsiConfigureProductA, msilib, 'MsiConfigureProductA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiConfigureProductA]
+ end;
+end;
+
+var
+ _MsiConfigureProductW: Pointer;
+
+function MsiConfigureProductW;
+begin
+ GetProcedureAddress(_MsiConfigureProductW, msilib, 'MsiConfigureProductW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiConfigureProductW]
+ end;
+end;
+
+var
+ _MsiConfigureProduct: Pointer;
+
+function MsiConfigureProduct;
+begin
+ GetProcedureAddress(_MsiConfigureProduct, msilib, 'MsiConfigureProduct' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiConfigureProduct]
+ end;
+end;
+
+var
+ _MsiConfigureProductExA: Pointer;
+
+function MsiConfigureProductExA;
+begin
+ GetProcedureAddress(_MsiConfigureProductExA, msilib, 'MsiConfigureProductExA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiConfigureProductExA]
+ end;
+end;
+
+var
+ _MsiConfigureProductExW: Pointer;
+
+function MsiConfigureProductExW;
+begin
+ GetProcedureAddress(_MsiConfigureProductExW, msilib, 'MsiConfigureProductExW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiConfigureProductExW]
+ end;
+end;
+
+var
+ _MsiConfigureProductEx: Pointer;
+
+function MsiConfigureProductEx;
+begin
+ GetProcedureAddress(_MsiConfigureProductEx, msilib, 'MsiConfigureProductEx' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiConfigureProductEx]
+ end;
+end;
+
+var
+ _MsiReinstallProductA: Pointer;
+
+function MsiReinstallProductA;
+begin
+ GetProcedureAddress(_MsiReinstallProductA, msilib, 'MsiReinstallProductA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiReinstallProductA]
+ end;
+end;
+
+var
+ _MsiReinstallProductW: Pointer;
+
+function MsiReinstallProductW;
+begin
+ GetProcedureAddress(_MsiReinstallProductW, msilib, 'MsiReinstallProductW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiReinstallProductW]
+ end;
+end;
+
+var
+ _MsiReinstallProduct: Pointer;
+
+function MsiReinstallProduct;
+begin
+ GetProcedureAddress(_MsiReinstallProduct, msilib, 'MsiReinstallProduct' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiReinstallProduct]
+ end;
+end;
+
+var
+ _MsiAdvertiseProductExA: Pointer;
+
+function MsiAdvertiseProductExA;
+begin
+ GetProcedureAddress(_MsiAdvertiseProductExA, msilib, 'MsiAdvertiseProductExA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiAdvertiseProductExA]
+ end;
+end;
+
+var
+ _MsiAdvertiseProductExW: Pointer;
+
+function MsiAdvertiseProductExW;
+begin
+ GetProcedureAddress(_MsiAdvertiseProductExW, msilib, 'MsiAdvertiseProductExW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiAdvertiseProductExW]
+ end;
+end;
+
+var
+ _MsiAdvertiseProductEx: Pointer;
+
+function MsiAdvertiseProductEx;
+begin
+ GetProcedureAddress(_MsiAdvertiseProductEx, msilib, 'MsiAdvertiseProductEx' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiAdvertiseProductEx]
+ end;
+end;
+
+var
+ _MsiAdvertiseProductA: Pointer;
+
+function MsiAdvertiseProductA;
+begin
+ GetProcedureAddress(_MsiAdvertiseProductA, msilib, 'MsiAdvertiseProductA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiAdvertiseProductA]
+ end;
+end;
+
+var
+ _MsiAdvertiseProductW: Pointer;
+
+function MsiAdvertiseProductW;
+begin
+ GetProcedureAddress(_MsiAdvertiseProductW, msilib, 'MsiAdvertiseProductW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiAdvertiseProductW]
+ end;
+end;
+
+var
+ _MsiAdvertiseProduct: Pointer;
+
+function MsiAdvertiseProduct;
+begin
+ GetProcedureAddress(_MsiAdvertiseProduct, msilib, 'MsiAdvertiseProduct' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiAdvertiseProduct]
+ end;
+end;
+
+var
+ _MsiProcessAdvertiseScriptA: Pointer;
+
+function MsiProcessAdvertiseScriptA;
+begin
+ GetProcedureAddress(_MsiProcessAdvertiseScriptA, msilib, 'MsiProcessAdvertiseScriptA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiProcessAdvertiseScriptA]
+ end;
+end;
+
+var
+ _MsiProcessAdvertiseScriptW: Pointer;
+
+function MsiProcessAdvertiseScriptW;
+begin
+ GetProcedureAddress(_MsiProcessAdvertiseScriptW, msilib, 'MsiProcessAdvertiseScriptW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiProcessAdvertiseScriptW]
+ end;
+end;
+
+var
+ _MsiProcessAdvertiseScript: Pointer;
+
+function MsiProcessAdvertiseScript;
+begin
+ GetProcedureAddress(_MsiProcessAdvertiseScript, msilib, 'MsiProcessAdvertiseScript' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiProcessAdvertiseScript]
+ end;
+end;
+
+var
+ _MsiAdvertiseScriptA: Pointer;
+
+function MsiAdvertiseScriptA;
+begin
+ GetProcedureAddress(_MsiAdvertiseScriptA, msilib, 'MsiAdvertiseScriptA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiAdvertiseScriptA]
+ end;
+end;
+
+var
+ _MsiAdvertiseScriptW: Pointer;
+
+function MsiAdvertiseScriptW;
+begin
+ GetProcedureAddress(_MsiAdvertiseScriptW, msilib, 'MsiAdvertiseScriptW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiAdvertiseScriptW]
+ end;
+end;
+
+var
+ _MsiAdvertiseScript: Pointer;
+
+function MsiAdvertiseScript;
+begin
+ GetProcedureAddress(_MsiAdvertiseScript, msilib, 'MsiAdvertiseScript' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiAdvertiseScript]
+ end;
+end;
+
+var
+ _MsiGetProductInfoFromScriptA: Pointer;
+
+function MsiGetProductInfoFromScriptA;
+begin
+ GetProcedureAddress(_MsiGetProductInfoFromScriptA, msilib, 'MsiGetProductInfoFromScriptA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiGetProductInfoFromScriptA]
+ end;
+end;
+
+var
+ _MsiGetProductInfoFromScriptW: Pointer;
+
+function MsiGetProductInfoFromScriptW;
+begin
+ GetProcedureAddress(_MsiGetProductInfoFromScriptW, msilib, 'MsiGetProductInfoFromScriptW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiGetProductInfoFromScriptW]
+ end;
+end;
+
+var
+ _MsiGetProductInfoFromScript: Pointer;
+
+function MsiGetProductInfoFromScript;
+begin
+ GetProcedureAddress(_MsiGetProductInfoFromScript, msilib, 'MsiGetProductInfoFromScript' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiGetProductInfoFromScript]
+ end;
+end;
+
+var
+ _MsiGetProductCodeA: Pointer;
+
+function MsiGetProductCodeA;
+begin
+ GetProcedureAddress(_MsiGetProductCodeA, msilib, 'MsiGetProductCodeA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiGetProductCodeA]
+ end;
+end;
+
+var
+ _MsiGetProductCodeW: Pointer;
+
+function MsiGetProductCodeW;
+begin
+ GetProcedureAddress(_MsiGetProductCodeW, msilib, 'MsiGetProductCodeW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiGetProductCodeW]
+ end;
+end;
+
+var
+ _MsiGetProductCode: Pointer;
+
+function MsiGetProductCode;
+begin
+ GetProcedureAddress(_MsiGetProductCode, msilib, 'MsiGetProductCode' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiGetProductCode]
+ end;
+end;
+
+var
+ _MsiGetUserInfoA: Pointer;
+
+function MsiGetUserInfoA;
+begin
+ GetProcedureAddress(_MsiGetUserInfoA, msilib, 'MsiGetUserInfoA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiGetUserInfoA]
+ end;
+end;
+
+var
+ _MsiGetUserInfoW: Pointer;
+
+function MsiGetUserInfoW;
+begin
+ GetProcedureAddress(_MsiGetUserInfoW, msilib, 'MsiGetUserInfoW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiGetUserInfoW]
+ end;
+end;
+
+var
+ _MsiGetUserInfo: Pointer;
+
+function MsiGetUserInfo;
+begin
+ GetProcedureAddress(_MsiGetUserInfo, msilib, 'MsiGetUserInfo' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiGetUserInfo]
+ end;
+end;
+
+var
+ _MsiCollectUserInfoA: Pointer;
+
+function MsiCollectUserInfoA;
+begin
+ GetProcedureAddress(_MsiCollectUserInfoA, msilib, 'MsiCollectUserInfoA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiCollectUserInfoA]
+ end;
+end;
+
+var
+ _MsiCollectUserInfoW: Pointer;
+
+function MsiCollectUserInfoW;
+begin
+ GetProcedureAddress(_MsiCollectUserInfoW, msilib, 'MsiCollectUserInfoW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiCollectUserInfoW]
+ end;
+end;
+
+var
+ _MsiCollectUserInfo: Pointer;
+
+function MsiCollectUserInfo;
+begin
+ GetProcedureAddress(_MsiCollectUserInfo, msilib, 'MsiCollectUserInfo' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiCollectUserInfo]
+ end;
+end;
+
+var
+ _MsiApplyPatchA: Pointer;
+
+function MsiApplyPatchA;
+begin
+ GetProcedureAddress(_MsiApplyPatchA, msilib, 'MsiApplyPatchA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiApplyPatchA]
+ end;
+end;
+
+var
+ _MsiApplyPatchW: Pointer;
+
+function MsiApplyPatchW;
+begin
+ GetProcedureAddress(_MsiApplyPatchW, msilib, 'MsiApplyPatchW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiApplyPatchW]
+ end;
+end;
+
+var
+ _MsiApplyPatch: Pointer;
+
+function MsiApplyPatch;
+begin
+ GetProcedureAddress(_MsiApplyPatch, msilib, 'MsiApplyPatch' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiApplyPatch]
+ end;
+end;
+
+var
+ _MsiGetPatchInfoA: Pointer;
+
+function MsiGetPatchInfoA;
+begin
+ GetProcedureAddress(_MsiGetPatchInfoA, msilib, 'MsiGetPatchInfoA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiGetPatchInfoA]
+ end;
+end;
+
+var
+ _MsiGetPatchInfoW: Pointer;
+
+function MsiGetPatchInfoW;
+begin
+ GetProcedureAddress(_MsiGetPatchInfoW, msilib, 'MsiGetPatchInfoW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiGetPatchInfoW]
+ end;
+end;
+
+var
+ _MsiGetPatchInfo: Pointer;
+
+function MsiGetPatchInfo;
+begin
+ GetProcedureAddress(_MsiGetPatchInfo, msilib, 'MsiGetPatchInfo' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiGetPatchInfo]
+ end;
+end;
+
+var
+ _MsiEnumPatchesA: Pointer;
+
+function MsiEnumPatchesA;
+begin
+ GetProcedureAddress(_MsiEnumPatchesA, msilib, 'MsiEnumPatchesA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiEnumPatchesA]
+ end;
+end;
+
+var
+ _MsiEnumPatchesW: Pointer;
+
+function MsiEnumPatchesW;
+begin
+ GetProcedureAddress(_MsiEnumPatchesW, msilib, 'MsiEnumPatchesW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiEnumPatchesW]
+ end;
+end;
+
+var
+ _MsiEnumPatches: Pointer;
+
+function MsiEnumPatches;
+begin
+ GetProcedureAddress(_MsiEnumPatches, msilib, 'MsiEnumPatches' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiEnumPatches]
+ end;
+end;
+
+var
+ _MsiQueryFeatureStateA: Pointer;
+
+function MsiQueryFeatureStateA;
+begin
+ GetProcedureAddress(_MsiQueryFeatureStateA, msilib, 'MsiQueryFeatureStateA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiQueryFeatureStateA]
+ end;
+end;
+
+var
+ _MsiQueryFeatureStateW: Pointer;
+
+function MsiQueryFeatureStateW;
+begin
+ GetProcedureAddress(_MsiQueryFeatureStateW, msilib, 'MsiQueryFeatureStateW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiQueryFeatureStateW]
+ end;
+end;
+
+var
+ _MsiQueryFeatureState: Pointer;
+
+function MsiQueryFeatureState;
+begin
+ GetProcedureAddress(_MsiQueryFeatureState, msilib, 'MsiQueryFeatureState' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiQueryFeatureState]
+ end;
+end;
+
+var
+ _MsiUseFeatureA: Pointer;
+
+function MsiUseFeatureA;
+begin
+ GetProcedureAddress(_MsiUseFeatureA, msilib, 'MsiUseFeatureA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiUseFeatureA]
+ end;
+end;
+
+var
+ _MsiUseFeatureW: Pointer;
+
+function MsiUseFeatureW;
+begin
+ GetProcedureAddress(_MsiUseFeatureW, msilib, 'MsiUseFeatureW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiUseFeatureW]
+ end;
+end;
+
+var
+ _MsiUseFeature: Pointer;
+
+function MsiUseFeature;
+begin
+ GetProcedureAddress(_MsiUseFeature, msilib, 'MsiUseFeature' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiUseFeature]
+ end;
+end;
+
+var
+ _MsiUseFeatureExA: Pointer;
+
+function MsiUseFeatureExA;
+begin
+ GetProcedureAddress(_MsiUseFeatureExA, msilib, 'MsiUseFeatureExA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiUseFeatureExA]
+ end;
+end;
+
+var
+ _MsiUseFeatureExW: Pointer;
+
+function MsiUseFeatureExW;
+begin
+ GetProcedureAddress(_MsiUseFeatureExW, msilib, 'MsiUseFeatureExW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiUseFeatureExW]
+ end;
+end;
+
+var
+ _MsiUseFeatureEx: Pointer;
+
+function MsiUseFeatureEx;
+begin
+ GetProcedureAddress(_MsiUseFeatureEx, msilib, 'MsiUseFeatureEx' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiUseFeatureEx]
+ end;
+end;
+
+var
+ _MsiGetFeatureUsageA: Pointer;
+
+function MsiGetFeatureUsageA;
+begin
+ GetProcedureAddress(_MsiGetFeatureUsageA, msilib, 'MsiGetFeatureUsageA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiGetFeatureUsageA]
+ end;
+end;
+
+var
+ _MsiGetFeatureUsageW: Pointer;
+
+function MsiGetFeatureUsageW;
+begin
+ GetProcedureAddress(_MsiGetFeatureUsageW, msilib, 'MsiGetFeatureUsageW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiGetFeatureUsageW]
+ end;
+end;
+
+var
+ _MsiGetFeatureUsage: Pointer;
+
+function MsiGetFeatureUsage;
+begin
+ GetProcedureAddress(_MsiGetFeatureUsage, msilib, 'MsiGetFeatureUsage' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiGetFeatureUsage]
+ end;
+end;
+
+var
+ _MsiConfigureFeatureA: Pointer;
+
+function MsiConfigureFeatureA;
+begin
+ GetProcedureAddress(_MsiConfigureFeatureA, msilib, 'MsiConfigureFeatureA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiConfigureFeatureA]
+ end;
+end;
+
+var
+ _MsiConfigureFeatureW: Pointer;
+
+function MsiConfigureFeatureW;
+begin
+ GetProcedureAddress(_MsiConfigureFeatureW, msilib, 'MsiConfigureFeatureW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiConfigureFeatureW]
+ end;
+end;
+
+var
+ _MsiConfigureFeature: Pointer;
+
+function MsiConfigureFeature;
+begin
+ GetProcedureAddress(_MsiConfigureFeature, msilib, 'MsiConfigureFeature' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiConfigureFeature]
+ end;
+end;
+
+var
+ _MsiReinstallFeatureA: Pointer;
+
+function MsiReinstallFeatureA;
+begin
+ GetProcedureAddress(_MsiReinstallFeatureA, msilib, 'MsiReinstallFeatureA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiReinstallFeatureA]
+ end;
+end;
+
+var
+ _MsiReinstallFeatureW: Pointer;
+
+function MsiReinstallFeatureW;
+begin
+ GetProcedureAddress(_MsiReinstallFeatureW, msilib, 'MsiReinstallFeatureW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiReinstallFeatureW]
+ end;
+end;
+
+var
+ _MsiReinstallFeature: Pointer;
+
+function MsiReinstallFeature;
+begin
+ GetProcedureAddress(_MsiReinstallFeature, msilib, 'MsiReinstallFeature' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiReinstallFeature]
+ end;
+end;
+
+var
+ _MsiProvideComponentA: Pointer;
+
+function MsiProvideComponentA;
+begin
+ GetProcedureAddress(_MsiProvideComponentA, msilib, 'MsiProvideComponentA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiProvideComponentA]
+ end;
+end;
+
+var
+ _MsiProvideComponentW: Pointer;
+
+function MsiProvideComponentW;
+begin
+ GetProcedureAddress(_MsiProvideComponentW, msilib, 'MsiProvideComponentW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiProvideComponentW]
+ end;
+end;
+
+var
+ _MsiProvideComponent: Pointer;
+
+function MsiProvideComponent;
+begin
+ GetProcedureAddress(_MsiProvideComponent, msilib, 'MsiProvideComponent' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiProvideComponent]
+ end;
+end;
+
+var
+ _MsiProvideQualifiedComponentA: Pointer;
+
+function MsiProvideQualifiedComponentA;
+begin
+ GetProcedureAddress(_MsiProvideQualifiedComponentA, msilib, 'MsiProvideQualifiedComponentA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiProvideQualifiedComponentA]
+ end;
+end;
+
+var
+ _MsiProvideQualifiedComponentW: Pointer;
+
+function MsiProvideQualifiedComponentW;
+begin
+ GetProcedureAddress(_MsiProvideQualifiedComponentW, msilib, 'MsiProvideQualifiedComponentW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiProvideQualifiedComponentW]
+ end;
+end;
+
+var
+ _MsiProvideQualifiedComponent: Pointer;
+
+function MsiProvideQualifiedComponent;
+begin
+ GetProcedureAddress(_MsiProvideQualifiedComponent, msilib, 'MsiProvideQualifiedComponent' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiProvideQualifiedComponent]
+ end;
+end;
+
+var
+ _MsiProvideQualifiedComponentExA: Pointer;
+
+function MsiProvideQualifiedComponentExA;
+begin
+ GetProcedureAddress(_MsiProvideQualifiedComponentExA, msilib, 'MsiProvideQualifiedComponentExA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiProvideQualifiedComponentExA]
+ end;
+end;
+
+var
+ _MsiProvideQualifiedComponentExW: Pointer;
+
+function MsiProvideQualifiedComponentExW;
+begin
+ GetProcedureAddress(_MsiProvideQualifiedComponentExW, msilib, 'MsiProvideQualifiedComponentExW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiProvideQualifiedComponentExW]
+ end;
+end;
+
+var
+ _MsiProvideQualifiedComponentEx: Pointer;
+
+function MsiProvideQualifiedComponentEx;
+begin
+ GetProcedureAddress(_MsiProvideQualifiedComponentEx, msilib, 'MsiProvideQualifiedComponentEx' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiProvideQualifiedComponentEx]
+ end;
+end;
+
+var
+ _MsiGetComponentPathA: Pointer;
+
+function MsiGetComponentPathA;
+begin
+ GetProcedureAddress(_MsiGetComponentPathA, msilib, 'MsiGetComponentPathA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiGetComponentPathA]
+ end;
+end;
+
+var
+ _MsiGetComponentPathW: Pointer;
+
+function MsiGetComponentPathW;
+begin
+ GetProcedureAddress(_MsiGetComponentPathW, msilib, 'MsiGetComponentPathW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiGetComponentPathW]
+ end;
+end;
+
+var
+ _MsiGetComponentPath: Pointer;
+
+function MsiGetComponentPath;
+begin
+ GetProcedureAddress(_MsiGetComponentPath, msilib, 'MsiGetComponentPath' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiGetComponentPath]
+ end;
+end;
+
+var
+ _MsiProvideAssemblyA: Pointer;
+
+function MsiProvideAssemblyA;
+begin
+ GetProcedureAddress(_MsiProvideAssemblyA, msilib, 'MsiProvideAssemblyA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiProvideAssemblyA]
+ end;
+end;
+
+var
+ _MsiProvideAssemblyW: Pointer;
+
+function MsiProvideAssemblyW;
+begin
+ GetProcedureAddress(_MsiProvideAssemblyW, msilib, 'MsiProvideAssemblyW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiProvideAssemblyW]
+ end;
+end;
+
+var
+ _MsiProvideAssembly: Pointer;
+
+function MsiProvideAssembly;
+begin
+ GetProcedureAddress(_MsiProvideAssembly, msilib, 'MsiProvideAssembly' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiProvideAssembly]
+ end;
+end;
+
+var
+ _MsiEnumProductsA: Pointer;
+
+function MsiEnumProductsA;
+begin
+ GetProcedureAddress(_MsiEnumProductsA, msilib, 'MsiEnumProductsA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiEnumProductsA]
+ end;
+end;
+
+var
+ _MsiEnumProductsW: Pointer;
+
+function MsiEnumProductsW;
+begin
+ GetProcedureAddress(_MsiEnumProductsW, msilib, 'MsiEnumProductsW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiEnumProductsW]
+ end;
+end;
+
+var
+ _MsiEnumProducts: Pointer;
+
+function MsiEnumProducts;
+begin
+ GetProcedureAddress(_MsiEnumProducts, msilib, 'MsiEnumProducts' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiEnumProducts]
+ end;
+end;
+
+{$IFDEF MSI110}
+
+var
+ _MsiEnumRelatedProductsA: Pointer;
+
+function MsiEnumRelatedProductsA;
+begin
+ GetProcedureAddress(_MsiEnumRelatedProductsA, msilib, 'MsiEnumRelatedProductsA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiEnumRelatedProductsA]
+ end;
+end;
+
+var
+ _MsiEnumRelatedProductsW: Pointer;
+
+function MsiEnumRelatedProductsW;
+begin
+ GetProcedureAddress(_MsiEnumRelatedProductsW, msilib, 'MsiEnumRelatedProductsW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiEnumRelatedProductsW]
+ end;
+end;
+
+var
+ _MsiEnumRelatedProducts: Pointer;
+
+function MsiEnumRelatedProducts;
+begin
+ GetProcedureAddress(_MsiEnumRelatedProducts, msilib, 'MsiEnumRelatedProducts' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiEnumRelatedProducts]
+ end;
+end;
+
+{$ENDIF MSI110}
+
+var
+ _MsiEnumFeaturesA: Pointer;
+
+function MsiEnumFeaturesA;
+begin
+ GetProcedureAddress(_MsiEnumFeaturesA, msilib, 'MsiEnumFeaturesA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiEnumFeaturesA]
+ end;
+end;
+
+var
+ _MsiEnumFeaturesW: Pointer;
+
+function MsiEnumFeaturesW;
+begin
+ GetProcedureAddress(_MsiEnumFeaturesW, msilib, 'MsiEnumFeaturesW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiEnumFeaturesW]
+ end;
+end;
+
+var
+ _MsiEnumFeatures: Pointer;
+
+function MsiEnumFeatures;
+begin
+ GetProcedureAddress(_MsiEnumFeatures, msilib, 'MsiEnumFeatures' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiEnumFeatures]
+ end;
+end;
+
+var
+ _MsiEnumComponentsA: Pointer;
+
+function MsiEnumComponentsA;
+begin
+ GetProcedureAddress(_MsiEnumComponentsA, msilib, 'MsiEnumComponentsA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiEnumComponentsA]
+ end;
+end;
+
+var
+ _MsiEnumComponentsW: Pointer;
+
+function MsiEnumComponentsW;
+begin
+ GetProcedureAddress(_MsiEnumComponentsW, msilib, 'MsiEnumComponentsW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiEnumComponentsW]
+ end;
+end;
+
+var
+ _MsiEnumComponents: Pointer;
+
+function MsiEnumComponents;
+begin
+ GetProcedureAddress(_MsiEnumComponents, msilib, 'MsiEnumComponents' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiEnumComponents]
+ end;
+end;
+
+var
+ _MsiEnumClientsA: Pointer;
+
+function MsiEnumClientsA;
+begin
+ GetProcedureAddress(_MsiEnumClientsA, msilib, 'MsiEnumClientsA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiEnumClientsA]
+ end;
+end;
+
+var
+ _MsiEnumClientsW: Pointer;
+
+function MsiEnumClientsW;
+begin
+ GetProcedureAddress(_MsiEnumClientsW, msilib, 'MsiEnumClientsW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiEnumClientsW]
+ end;
+end;
+
+var
+ _MsiEnumClients: Pointer;
+
+function MsiEnumClients;
+begin
+ GetProcedureAddress(_MsiEnumClients, msilib, 'MsiEnumClients' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiEnumClients]
+ end;
+end;
+
+var
+ _MsiEnumComponentQualifiersA: Pointer;
+
+function MsiEnumComponentQualifiersA;
+begin
+ GetProcedureAddress(_MsiEnumComponentQualifiersA, msilib, 'MsiEnumComponentQualifiersA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiEnumComponentQualifiersA]
+ end;
+end;
+
+var
+ _MsiEnumComponentQualifiersW: Pointer;
+
+function MsiEnumComponentQualifiersW;
+begin
+ GetProcedureAddress(_MsiEnumComponentQualifiersW, msilib, 'MsiEnumComponentQualifiersW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiEnumComponentQualifiersW]
+ end;
+end;
+
+var
+ _MsiEnumComponentQualifiers: Pointer;
+
+function MsiEnumComponentQualifiers;
+begin
+ GetProcedureAddress(_MsiEnumComponentQualifiers, msilib, 'MsiEnumComponentQualifiers' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiEnumComponentQualifiers]
+ end;
+end;
+
+var
+ _MsiOpenProductA: Pointer;
+
+function MsiOpenProductA;
+begin
+ GetProcedureAddress(_MsiOpenProductA, msilib, 'MsiOpenProductA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiOpenProductA]
+ end;
+end;
+
+var
+ _MsiOpenProductW: Pointer;
+
+function MsiOpenProductW;
+begin
+ GetProcedureAddress(_MsiOpenProductW, msilib, 'MsiOpenProductW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiOpenProductW]
+ end;
+end;
+
+var
+ _MsiOpenProduct: Pointer;
+
+function MsiOpenProduct;
+begin
+ GetProcedureAddress(_MsiOpenProduct, msilib, 'MsiOpenProduct' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiOpenProduct]
+ end;
+end;
+
+var
+ _MsiOpenPackageA: Pointer;
+
+function MsiOpenPackageA;
+begin
+ GetProcedureAddress(_MsiOpenPackageA, msilib, 'MsiOpenPackageA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiOpenPackageA]
+ end;
+end;
+
+var
+ _MsiOpenPackageW: Pointer;
+
+function MsiOpenPackageW;
+begin
+ GetProcedureAddress(_MsiOpenPackageW, msilib, 'MsiOpenPackageW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiOpenPackageW]
+ end;
+end;
+
+var
+ _MsiOpenPackage: Pointer;
+
+function MsiOpenPackage;
+begin
+ GetProcedureAddress(_MsiOpenPackage, msilib, 'MsiOpenPackage' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiOpenPackage]
+ end;
+end;
+
+var
+ _MsiOpenPackageExA: Pointer;
+
+function MsiOpenPackageExA;
+begin
+ GetProcedureAddress(_MsiOpenPackageExA, msilib, 'MsiOpenPackageExA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiOpenPackageExA]
+ end;
+end;
+
+var
+ _MsiOpenPackageExW: Pointer;
+
+function MsiOpenPackageExW;
+begin
+ GetProcedureAddress(_MsiOpenPackageExW, msilib, 'MsiOpenPackageExW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiOpenPackageExW]
+ end;
+end;
+
+var
+ _MsiOpenPackageEx: Pointer;
+
+function MsiOpenPackageEx;
+begin
+ GetProcedureAddress(_MsiOpenPackageEx, msilib, 'MsiOpenPackageEx' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiOpenPackageEx]
+ end;
+end;
+
+var
+ _MsiGetProductPropertyA: Pointer;
+
+function MsiGetProductPropertyA;
+begin
+ GetProcedureAddress(_MsiGetProductPropertyA, msilib, 'MsiGetProductPropertyA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiGetProductPropertyA]
+ end;
+end;
+
+var
+ _MsiGetProductPropertyW: Pointer;
+
+function MsiGetProductPropertyW;
+begin
+ GetProcedureAddress(_MsiGetProductPropertyW, msilib, 'MsiGetProductPropertyW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiGetProductPropertyW]
+ end;
+end;
+
+var
+ _MsiGetProductProperty: Pointer;
+
+function MsiGetProductProperty;
+begin
+ GetProcedureAddress(_MsiGetProductProperty, msilib, 'MsiGetProductProperty' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiGetProductProperty]
+ end;
+end;
+
+var
+ _MsiVerifyPackageA: Pointer;
+
+function MsiVerifyPackageA;
+begin
+ GetProcedureAddress(_MsiVerifyPackageA, msilib, 'MsiVerifyPackageA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiVerifyPackageA]
+ end;
+end;
+
+var
+ _MsiVerifyPackageW: Pointer;
+
+function MsiVerifyPackageW;
+begin
+ GetProcedureAddress(_MsiVerifyPackageW, msilib, 'MsiVerifyPackageW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiVerifyPackageW]
+ end;
+end;
+
+var
+ _MsiVerifyPackage: Pointer;
+
+function MsiVerifyPackage;
+begin
+ GetProcedureAddress(_MsiVerifyPackage, msilib, 'MsiVerifyPackage' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiVerifyPackage]
+ end;
+end;
+
+var
+ _MsiGetFeatureInfoA: Pointer;
+
+function MsiGetFeatureInfoA;
+begin
+ GetProcedureAddress(_MsiGetFeatureInfoA, msilib, 'MsiGetFeatureInfoA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiGetFeatureInfoA]
+ end;
+end;
+
+var
+ _MsiGetFeatureInfoW: Pointer;
+
+function MsiGetFeatureInfoW;
+begin
+ GetProcedureAddress(_MsiGetFeatureInfoW, msilib, 'MsiGetFeatureInfoW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiGetFeatureInfoW]
+ end;
+end;
+
+var
+ _MsiGetFeatureInfo: Pointer;
+
+function MsiGetFeatureInfo;
+begin
+ GetProcedureAddress(_MsiGetFeatureInfo, msilib, 'MsiGetFeatureInfo' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiGetFeatureInfo]
+ end;
+end;
+
+var
+ _MsiInstallMissingComponentA: Pointer;
+
+function MsiInstallMissingComponentA;
+begin
+ GetProcedureAddress(_MsiInstallMissingComponentA, msilib, 'MsiInstallMissingComponentA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiInstallMissingComponentA]
+ end;
+end;
+
+var
+ _MsiInstallMissingComponentW: Pointer;
+
+function MsiInstallMissingComponentW;
+begin
+ GetProcedureAddress(_MsiInstallMissingComponentW, msilib, 'MsiInstallMissingComponentW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiInstallMissingComponentW]
+ end;
+end;
+
+var
+ _MsiInstallMissingComponent: Pointer;
+
+function MsiInstallMissingComponent;
+begin
+ GetProcedureAddress(_MsiInstallMissingComponent, msilib, 'MsiInstallMissingComponent' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiInstallMissingComponent]
+ end;
+end;
+
+var
+ _MsiInstallMissingFileA: Pointer;
+
+function MsiInstallMissingFileA;
+begin
+ GetProcedureAddress(_MsiInstallMissingFileA, msilib, 'MsiInstallMissingFileA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiInstallMissingFileA]
+ end;
+end;
+
+var
+ _MsiInstallMissingFileW: Pointer;
+
+function MsiInstallMissingFileW;
+begin
+ GetProcedureAddress(_MsiInstallMissingFileW, msilib, 'MsiInstallMissingFileW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiInstallMissingFileW]
+ end;
+end;
+
+var
+ _MsiInstallMissingFile: Pointer;
+
+function MsiInstallMissingFile;
+begin
+ GetProcedureAddress(_MsiInstallMissingFile, msilib, 'MsiInstallMissingFile' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiInstallMissingFile]
+ end;
+end;
+
+var
+ _MsiLocateComponentA: Pointer;
+
+function MsiLocateComponentA;
+begin
+ GetProcedureAddress(_MsiLocateComponentA, msilib, 'MsiLocateComponentA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiLocateComponentA]
+ end;
+end;
+
+var
+ _MsiLocateComponentW: Pointer;
+
+function MsiLocateComponentW;
+begin
+ GetProcedureAddress(_MsiLocateComponentW, msilib, 'MsiLocateComponentW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiLocateComponentW]
+ end;
+end;
+
+var
+ _MsiLocateComponent: Pointer;
+
+function MsiLocateComponent;
+begin
+ GetProcedureAddress(_MsiLocateComponent, msilib, 'MsiLocateComponent' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiLocateComponent]
+ end;
+end;
+
+{$IFDEF MSI110}
+
+var
+ _MsiSourceListClearAllA: Pointer;
+
+function MsiSourceListClearAllA;
+begin
+ GetProcedureAddress(_MsiSourceListClearAllA, msilib, 'MsiSourceListClearAllA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiSourceListClearAllA]
+ end;
+end;
+
+var
+ _MsiSourceListClearAllW: Pointer;
+
+function MsiSourceListClearAllW;
+begin
+ GetProcedureAddress(_MsiSourceListClearAllW, msilib, 'MsiSourceListClearAllW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiSourceListClearAllW]
+ end;
+end;
+
+var
+ _MsiSourceListClearAll: Pointer;
+
+function MsiSourceListClearAll;
+begin
+ GetProcedureAddress(_MsiSourceListClearAll, msilib, 'MsiSourceListClearAll' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiSourceListClearAll]
+ end;
+end;
+
+var
+ _MsiSourceListAddSourceA: Pointer;
+
+function MsiSourceListAddSourceA;
+begin
+ GetProcedureAddress(_MsiSourceListAddSourceA, msilib, 'MsiSourceListAddSourceA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiSourceListAddSourceA]
+ end;
+end;
+
+var
+ _MsiSourceListAddSourceW: Pointer;
+
+function MsiSourceListAddSourceW;
+begin
+ GetProcedureAddress(_MsiSourceListAddSourceW, msilib, 'MsiSourceListAddSourceW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiSourceListAddSourceW]
+ end;
+end;
+
+var
+ _MsiSourceListAddSource: Pointer;
+
+function MsiSourceListAddSource;
+begin
+ GetProcedureAddress(_MsiSourceListAddSource, msilib, 'MsiSourceListAddSource' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiSourceListAddSource]
+ end;
+end;
+
+var
+ _MsiSourceListForceResolutionA: Pointer;
+
+function MsiSourceListForceResolutionA;
+begin
+ GetProcedureAddress(_MsiSourceListForceResolutionA, msilib, 'MsiSourceListForceResolutionA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiSourceListForceResolutionA]
+ end;
+end;
+
+var
+ _MsiSourceListForceResolutionW: Pointer;
+
+function MsiSourceListForceResolutionW;
+begin
+ GetProcedureAddress(_MsiSourceListForceResolutionW, msilib, 'MsiSourceListForceResolutionW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiSourceListForceResolutionW]
+ end;
+end;
+
+var
+ _MsiSourceListForceResolution: Pointer;
+
+function MsiSourceListForceResolution;
+begin
+ GetProcedureAddress(_MsiSourceListForceResolution, msilib, 'MsiSourceListForceResolution' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiSourceListForceResolution]
+ end;
+end;
+
+{$ENDIF MSI110}
+
+var
+ _MsiGetFileVersionA: Pointer;
+
+function MsiGetFileVersionA;
+begin
+ GetProcedureAddress(_MsiGetFileVersionA, msilib, 'MsiGetFileVersionA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiGetFileVersionA]
+ end;
+end;
+
+var
+ _MsiGetFileVersionW: Pointer;
+
+function MsiGetFileVersionW;
+begin
+ GetProcedureAddress(_MsiGetFileVersionW, msilib, 'MsiGetFileVersionW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiGetFileVersionW]
+ end;
+end;
+
+var
+ _MsiGetFileVersion: Pointer;
+
+function MsiGetFileVersion;
+begin
+ GetProcedureAddress(_MsiGetFileVersion, msilib, 'MsiGetFileVersion' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiGetFileVersion]
+ end;
+end;
+
+var
+ _MsiGetFileHashA: Pointer;
+
+function MsiGetFileHashA;
+begin
+ GetProcedureAddress(_MsiGetFileHashA, msilib, 'MsiGetFileHashA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiGetFileHashA]
+ end;
+end;
+
+var
+ _MsiGetFileHashW: Pointer;
+
+function MsiGetFileHashW;
+begin
+ GetProcedureAddress(_MsiGetFileHashW, msilib, 'MsiGetFileHashW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiGetFileHashW]
+ end;
+end;
+
+var
+ _MsiGetFileHash: Pointer;
+
+function MsiGetFileHash;
+begin
+ GetProcedureAddress(_MsiGetFileHash, msilib, 'MsiGetFileHash' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiGetFileHash]
+ end;
+end;
+
+var
+ _MsiGetFileSignatureInformationA: Pointer;
+
+function MsiGetFileSignatureInformationA;
+begin
+ GetProcedureAddress(_MsiGetFileSignatureInformationA, msilib, 'MsiGetFileSignatureInformationA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiGetFileSignatureInformationA]
+ end;
+end;
+
+var
+ _MsiGetFileSignatureInformationW: Pointer;
+
+function MsiGetFileSignatureInformationW;
+begin
+ GetProcedureAddress(_MsiGetFileSignatureInformationW, msilib, 'MsiGetFileSignatureInformationW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiGetFileSignatureInformationW]
+ end;
+end;
+
+var
+ _MsiGetFileSignatureInformation: Pointer;
+
+function MsiGetFileSignatureInformation;
+begin
+ GetProcedureAddress(_MsiGetFileSignatureInformation, msilib, 'MsiGetFileSignatureInformation' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiGetFileSignatureInformation]
+ end;
+end;
+
+{$IFDEF MSI110}
+
+var
+ _MsiGetShortcutTargetA: Pointer;
+
+function MsiGetShortcutTargetA;
+begin
+ GetProcedureAddress(_MsiGetShortcutTargetA, msilib, 'MsiGetShortcutTargetA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiGetShortcutTargetA]
+ end;
+end;
+
+var
+ _MsiGetShortcutTargetW: Pointer;
+
+function MsiGetShortcutTargetW;
+begin
+ GetProcedureAddress(_MsiGetShortcutTargetW, msilib, 'MsiGetShortcutTargetW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiGetShortcutTargetW]
+ end;
+end;
+
+var
+ _MsiGetShortcutTarget: Pointer;
+
+function MsiGetShortcutTarget;
+begin
+ GetProcedureAddress(_MsiGetShortcutTarget, msilib, 'MsiGetShortcutTarget' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiGetShortcutTarget]
+ end;
+end;
+
+{$ENDIF MSI110}
+
+var
+ _MsiIsProductElevatedA: Pointer;
+
+function MsiIsProductElevatedA;
+begin
+ GetProcedureAddress(_MsiIsProductElevatedA, msilib, 'MsiIsProductElevatedA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiIsProductElevatedA]
+ end;
+end;
+
+var
+ _MsiIsProductElevatedW: Pointer;
+
+function MsiIsProductElevatedW;
+begin
+ GetProcedureAddress(_MsiIsProductElevatedW, msilib, 'MsiIsProductElevatedW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiIsProductElevatedW]
+ end;
+end;
+
+var
+ _MsiIsProductElevated: Pointer;
+
+function MsiIsProductElevated;
+begin
+ GetProcedureAddress(_MsiIsProductElevated, msilib, 'MsiIsProductElevated' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiIsProductElevated]
+ end;
+end;
+
+{$ELSE}
+
+function MsiCloseHandle; external msilib name 'MsiCloseHandle';
+function MsiCloseAllHandles; external msilib name 'MsiCloseAllHandles';
+function MsiSetInternalUI; external msilib name 'MsiSetInternalUI';
+function MsiSetExternalUIA; external msilib name 'MsiSetExternalUIA';
+function MsiSetExternalUIW; external msilib name 'MsiSetExternalUIW';
+function MsiSetExternalUI; external msilib name 'MsiSetExternalUI' + AWSuffix;
+function MsiEnableLogA; external msilib name 'MsiEnableLogA';
+function MsiEnableLogW; external msilib name 'MsiEnableLogW';
+function MsiEnableLog; external msilib name 'MsiEnableLog' + AWSuffix;
+function MsiQueryProductStateA; external msilib name 'MsiQueryProductStateA';
+function MsiQueryProductStateW; external msilib name 'MsiQueryProductStateW';
+function MsiQueryProductState; external msilib name 'MsiQueryProductState' + AWSuffix;
+function MsiGetProductInfoA; external msilib name 'MsiGetProductInfoA';
+function MsiGetProductInfoW; external msilib name 'MsiGetProductInfoW';
+function MsiGetProductInfo; external msilib name 'MsiGetProductInfo' + AWSuffix;
+function MsiInstallProductA; external msilib name 'MsiInstallProductA';
+function MsiInstallProductW; external msilib name 'MsiInstallProductW';
+function MsiInstallProduct; external msilib name 'MsiInstallProduct' + AWSuffix;
+function MsiConfigureProductA; external msilib name 'MsiConfigureProductA';
+function MsiConfigureProductW; external msilib name 'MsiConfigureProductW';
+function MsiConfigureProduct; external msilib name 'MsiConfigureProduct' + AWSuffix;
+function MsiConfigureProductExA; external msilib name 'MsiConfigureProductExA';
+function MsiConfigureProductExW; external msilib name 'MsiConfigureProductExW';
+function MsiConfigureProductEx; external msilib name 'MsiConfigureProductEx' + AWSuffix;
+function MsiReinstallProductA; external msilib name 'MsiReinstallProductA';
+function MsiReinstallProductW; external msilib name 'MsiReinstallProductW';
+function MsiReinstallProduct; external msilib name 'MsiReinstallProduct' + AWSuffix;
+function MsiAdvertiseProductExA; external msilib name 'MsiAdvertiseProductExA';
+function MsiAdvertiseProductExW; external msilib name 'MsiAdvertiseProductExW';
+function MsiAdvertiseProductEx; external msilib name 'MsiAdvertiseProductEx' + AWSuffix;
+function MsiAdvertiseProductA; external msilib name 'MsiAdvertiseProductA';
+function MsiAdvertiseProductW; external msilib name 'MsiAdvertiseProductW';
+function MsiAdvertiseProduct; external msilib name 'MsiAdvertiseProduct' + AWSuffix;
+function MsiProcessAdvertiseScriptA; external msilib name 'MsiProcessAdvertiseScriptA';
+function MsiProcessAdvertiseScriptW; external msilib name 'MsiProcessAdvertiseScriptW';
+function MsiProcessAdvertiseScript; external msilib name 'MsiProcessAdvertiseScript' + AWSuffix;
+function MsiAdvertiseScriptA; external msilib name 'MsiAdvertiseScriptA';
+function MsiAdvertiseScriptW; external msilib name 'MsiAdvertiseScriptW';
+function MsiAdvertiseScript; external msilib name 'MsiAdvertiseScript' + AWSuffix;
+function MsiGetProductInfoFromScriptA; external msilib name 'MsiGetProductInfoFromScriptA';
+function MsiGetProductInfoFromScriptW; external msilib name 'MsiGetProductInfoFromScriptW';
+function MsiGetProductInfoFromScript; external msilib name 'MsiGetProductInfoFromScript' + AWSuffix;
+function MsiGetProductCodeA; external msilib name 'MsiGetProductCodeA';
+function MsiGetProductCodeW; external msilib name 'MsiGetProductCodeW';
+function MsiGetProductCode; external msilib name 'MsiGetProductCode' + AWSuffix;
+function MsiGetUserInfoA; external msilib name 'MsiGetUserInfoA';
+function MsiGetUserInfoW; external msilib name 'MsiGetUserInfoW';
+function MsiGetUserInfo; external msilib name 'MsiGetUserInfo' + AWSuffix;
+function MsiCollectUserInfoA; external msilib name 'MsiCollectUserInfoA';
+function MsiCollectUserInfoW; external msilib name 'MsiCollectUserInfoW';
+function MsiCollectUserInfo; external msilib name 'MsiCollectUserInfo' + AWSuffix;
+function MsiApplyPatchA; external msilib name 'MsiApplyPatchA';
+function MsiApplyPatchW; external msilib name 'MsiApplyPatchW';
+function MsiApplyPatch; external msilib name 'MsiApplyPatch' + AWSuffix;
+function MsiGetPatchInfoA; external msilib name 'MsiGetPatchInfoA';
+function MsiGetPatchInfoW; external msilib name 'MsiGetPatchInfoW';
+function MsiGetPatchInfo; external msilib name 'MsiGetPatchInfo' + AWSuffix;
+function MsiEnumPatchesA; external msilib name 'MsiEnumPatchesA';
+function MsiEnumPatchesW; external msilib name 'MsiEnumPatchesW';
+function MsiEnumPatches; external msilib name 'MsiEnumPatches' + AWSuffix;
+function MsiQueryFeatureStateA; external msilib name 'MsiQueryFeatureStateA';
+function MsiQueryFeatureStateW; external msilib name 'MsiQueryFeatureStateW';
+function MsiQueryFeatureState; external msilib name 'MsiQueryFeatureState' + AWSuffix;
+function MsiUseFeatureA; external msilib name 'MsiUseFeatureA';
+function MsiUseFeatureW; external msilib name 'MsiUseFeatureW';
+function MsiUseFeature; external msilib name 'MsiUseFeature' + AWSuffix;
+function MsiUseFeatureExA; external msilib name 'MsiUseFeatureExA';
+function MsiUseFeatureExW; external msilib name 'MsiUseFeatureExW';
+function MsiUseFeatureEx; external msilib name 'MsiUseFeatureEx' + AWSuffix;
+function MsiGetFeatureUsageA; external msilib name 'MsiGetFeatureUsageA';
+function MsiGetFeatureUsageW; external msilib name 'MsiGetFeatureUsageW';
+function MsiGetFeatureUsage; external msilib name 'MsiGetFeatureUsage' + AWSuffix;
+function MsiConfigureFeatureA; external msilib name 'MsiConfigureFeatureA';
+function MsiConfigureFeatureW; external msilib name 'MsiConfigureFeatureW';
+function MsiConfigureFeature; external msilib name 'MsiConfigureFeature' + AWSuffix;
+function MsiReinstallFeatureA; external msilib name 'MsiReinstallFeatureA';
+function MsiReinstallFeatureW; external msilib name 'MsiReinstallFeatureW';
+function MsiReinstallFeature; external msilib name 'MsiReinstallFeature' + AWSuffix;
+function MsiProvideComponentA; external msilib name 'MsiProvideComponentA';
+function MsiProvideComponentW; external msilib name 'MsiProvideComponentW';
+function MsiProvideComponent; external msilib name 'MsiProvideComponent' + AWSuffix;
+function MsiProvideQualifiedComponentA; external msilib name 'MsiProvideQualifiedComponentA';
+function MsiProvideQualifiedComponentW; external msilib name 'MsiProvideQualifiedComponentW';
+function MsiProvideQualifiedComponent; external msilib name 'MsiProvideQualifiedComponent' + AWSuffix;
+function MsiProvideQualifiedComponentExA; external msilib name 'MsiProvideQualifiedComponentExA';
+function MsiProvideQualifiedComponentExW; external msilib name 'MsiProvideQualifiedComponentExW';
+function MsiProvideQualifiedComponentEx; external msilib name 'MsiProvideQualifiedComponentEx' + AWSuffix;
+function MsiGetComponentPathA; external msilib name 'MsiGetComponentPathA';
+function MsiGetComponentPathW; external msilib name 'MsiGetComponentPathW';
+function MsiGetComponentPath; external msilib name 'MsiGetComponentPath' + AWSuffix;
+function MsiProvideAssemblyA; external msilib name 'MsiProvideAssemblyA';
+function MsiProvideAssemblyW; external msilib name 'MsiProvideAssemblyW';
+function MsiProvideAssembly; external msilib name 'MsiProvideAssembly' + AWSuffix;
+function MsiEnumProductsA; external msilib name 'MsiEnumProductsA';
+function MsiEnumProductsW; external msilib name 'MsiEnumProductsW';
+function MsiEnumProducts; external msilib name 'MsiEnumProducts' + AWSuffix;
+{$IFDEF MSI110}
+function MsiEnumRelatedProductsA; external msilib name 'MsiEnumRelatedProductsA';
+function MsiEnumRelatedProductsW; external msilib name 'MsiEnumRelatedProductsW';
+function MsiEnumRelatedProducts; external msilib name 'MsiEnumRelatedProducts' + AWSuffix;
+{$ENDIF MSI110}
+function MsiEnumFeaturesA; external msilib name 'MsiEnumFeaturesA';
+function MsiEnumFeaturesW; external msilib name 'MsiEnumFeaturesW';
+function MsiEnumFeatures; external msilib name 'MsiEnumFeatures' + AWSuffix;
+function MsiEnumComponentsA; external msilib name 'MsiEnumComponentsA';
+function MsiEnumComponentsW; external msilib name 'MsiEnumComponentsW';
+function MsiEnumComponents; external msilib name 'MsiEnumComponents' + AWSuffix;
+function MsiEnumClientsA; external msilib name 'MsiEnumClientsA';
+function MsiEnumClientsW; external msilib name 'MsiEnumClientsW';
+function MsiEnumClients; external msilib name 'MsiEnumClients' + AWSuffix;
+function MsiEnumComponentQualifiersA; external msilib name 'MsiEnumComponentQualifiersA';
+function MsiEnumComponentQualifiersW; external msilib name 'MsiEnumComponentQualifiersW';
+function MsiEnumComponentQualifiers; external msilib name 'MsiEnumComponentQualifiers' + AWSuffix;
+function MsiOpenProductA; external msilib name 'MsiOpenProductA';
+function MsiOpenProductW; external msilib name 'MsiOpenProductW';
+function MsiOpenProduct; external msilib name 'MsiOpenProduct' + AWSuffix;
+function MsiOpenPackageA; external msilib name 'MsiOpenPackageA';
+function MsiOpenPackageW; external msilib name 'MsiOpenPackageW';
+function MsiOpenPackage; external msilib name 'MsiOpenPackage' + AWSuffix;
+function MsiOpenPackageExA; external msilib name 'MsiOpenPackageExA';
+function MsiOpenPackageExW; external msilib name 'MsiOpenPackageExW';
+function MsiOpenPackageEx; external msilib name 'MsiOpenPackageEx' + AWSuffix;
+function MsiGetProductPropertyA; external msilib name 'MsiGetProductPropertyA';
+function MsiGetProductPropertyW; external msilib name 'MsiGetProductPropertyW';
+function MsiGetProductProperty; external msilib name 'MsiGetProductProperty' + AWSuffix;
+function MsiVerifyPackageA; external msilib name 'MsiVerifyPackageA';
+function MsiVerifyPackageW; external msilib name 'MsiVerifyPackageW';
+function MsiVerifyPackage; external msilib name 'MsiVerifyPackage' + AWSuffix;
+function MsiGetFeatureInfoA; external msilib name 'MsiGetFeatureInfoA';
+function MsiGetFeatureInfoW; external msilib name 'MsiGetFeatureInfoW';
+function MsiGetFeatureInfo; external msilib name 'MsiGetFeatureInfo' + AWSuffix;
+function MsiInstallMissingComponentA; external msilib name 'MsiInstallMissingComponentA';
+function MsiInstallMissingComponentW; external msilib name 'MsiInstallMissingComponentW';
+function MsiInstallMissingComponent; external msilib name 'MsiInstallMissingComponent' + AWSuffix;
+function MsiInstallMissingFileA; external msilib name 'MsiInstallMissingFileA';
+function MsiInstallMissingFileW; external msilib name 'MsiInstallMissingFileW';
+function MsiInstallMissingFile; external msilib name 'MsiInstallMissingFile' + AWSuffix;
+function MsiLocateComponentA; external msilib name 'MsiLocateComponentA';
+function MsiLocateComponentW; external msilib name 'MsiLocateComponentW';
+function MsiLocateComponent; external msilib name 'MsiLocateComponent' + AWSuffix;
+{$IFDEF MSI110}
+function MsiSourceListClearAllA; external msilib name 'MsiSourceListClearAllA';
+function MsiSourceListClearAllW; external msilib name 'MsiSourceListClearAllW';
+function MsiSourceListClearAll; external msilib name 'MsiSourceListClearAll' + AWSuffix;
+function MsiSourceListAddSourceA; external msilib name 'MsiSourceListAddSourceA';
+function MsiSourceListAddSourceW; external msilib name 'MsiSourceListAddSourceW';
+function MsiSourceListAddSource; external msilib name 'MsiSourceListAddSource' + AWSuffix;
+function MsiSourceListForceResolutionA; external msilib name 'MsiSourceListForceResolutionA';
+function MsiSourceListForceResolutionW; external msilib name 'MsiSourceListForceResolutionW';
+function MsiSourceListForceResolution; external msilib name 'MsiSourceListForceResolution' + AWSuffix;
+{$ENDIF MSI110}
+function MsiGetFileVersionA; external msilib name 'MsiGetFileVersionA';
+function MsiGetFileVersionW; external msilib name 'MsiGetFileVersionW';
+function MsiGetFileVersion; external msilib name 'MsiGetFileVersion' + AWSuffix;
+function MsiGetFileHashA; external msilib name 'MsiGetFileHashA';
+function MsiGetFileHashW; external msilib name 'MsiGetFileHashW';
+function MsiGetFileHash; external msilib name 'MsiGetFileHash' + AWSuffix;
+function MsiGetFileSignatureInformationA; external msilib name 'MsiGetFileSignatureInformationA';
+function MsiGetFileSignatureInformationW; external msilib name 'MsiGetFileSignatureInformationW';
+function MsiGetFileSignatureInformation; external msilib name 'MsiGetFileSignatureInformation' + AWSuffix;
+{$IFDEF MSI110}
+function MsiGetShortcutTargetA; external msilib name 'MsiGetShortcutTargetA';
+function MsiGetShortcutTargetW; external msilib name 'MsiGetShortcutTargetW';
+function MsiGetShortcutTarget; external msilib name 'MsiGetShortcutTarget' + AWSuffix;
+{$ENDIF MSI110}
+function MsiIsProductElevatedA; external msilib name 'MsiIsProductElevatedA';
+function MsiIsProductElevatedW; external msilib name 'MsiIsProductElevatedW';
+function MsiIsProductElevated; external msilib name 'MsiIsProductElevated' + AWSuffix;
+
+{$ENDIF DYNAMIC_LINK}
+
+end.
diff --git a/packages/extra/winunits/jwamsidefs.pas b/packages/extra/winunits/jwamsidefs.pas
index 875ca4a5dd..b26e4017db 100644
--- a/packages/extra/winunits/jwamsidefs.pas
+++ b/packages/extra/winunits/jwamsidefs.pas
@@ -1,1068 +1,1068 @@
-{******************************************************************************}
-{ }
-{ Windows Installer API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: msidefs.h, released June 2000. The original Pascal }
-{ code is: MsiDefs.pas, released June 2001. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwamsidefs.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaMsiDefs;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "msidefs.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaWinType;
-
-//------------------------------------------------------------------------------
-// INSTALLER PROPERTY DEFINITIONS
-//------------------------------------------------------------------------------
-
-const
-
-// Required properties: set in Property table
-
- IPROPNAME_PRODUCTNAME = TEXT('ProductName'); // name registered for display
- {$EXTERNALSYM IPROPNAME_PRODUCTNAME}
- IPROPNAME_PRODUCTCODE = TEXT('ProductCode'); // unique string GUID for product
- {$EXTERNALSYM IPROPNAME_PRODUCTCODE}
- IPROPNAME_PRODUCTVERSION = TEXT('ProductVersion'); // string product version
- {$EXTERNALSYM IPROPNAME_PRODUCTVERSION}
- IPROPNAME_INSTALLLANGUAGE = TEXT('ProductLanguage'); // install language of product, use to load resources
- {$EXTERNALSYM IPROPNAME_INSTALLLANGUAGE}
- IPROPNAME_MANUFACTURER = TEXT('Manufacturer'); // name of manufacturer
- {$EXTERNALSYM IPROPNAME_MANUFACTURER}
-
-// Customization properties: set in Property table
-
- IPROPNAME_UPGRADECODE = TEXT('UpgradeCode'); // unique string GUID for product family
- {$EXTERNALSYM IPROPNAME_UPGRADECODE}
- IPROPNAME_PIDTEMPLATE = TEXT('PIDTemplate'); // drives Product ID processing
- {$EXTERNALSYM IPROPNAME_PIDTEMPLATE}
- IPROPNAME_DISKPROMPT = TEXT('DiskPrompt'); // prompt for CD
- {$EXTERNALSYM IPROPNAME_DISKPROMPT}
- IPROPNAME_LEFTUNIT = TEXT('LeftUnit'); // name of unit placed to left of number instead of right
- {$EXTERNALSYM IPROPNAME_LEFTUNIT}
- IPROPNAME_ADMIN_PROPERTIES = TEXT('AdminProperties'); // properties to stuff in admin package
- {$EXTERNALSYM IPROPNAME_ADMIN_PROPERTIES}
- IPROPNAME_DEFAULTUIFONT = TEXT('DefaultUIFont'); // the font used in the UI if no other font is specified
- {$EXTERNALSYM IPROPNAME_DEFAULTUIFONT}
- IPROPNAME_ALLOWEDPROPERTIES = TEXT('SecureCustomProperties');
- {$EXTERNALSYM IPROPNAME_ALLOWEDPROPERTIES}
- IPROPNAME_ENABLEUSERCONTROL = TEXT('EnableUserControl'); // allows user to specify any public property
- {$EXTERNALSYM IPROPNAME_ENABLEUSERCONTROL}
- IPROPNAME_HIDDEN_PROPERTIES = TEXT('MsiHiddenProperties'); // properties that should not be dumped into the log file
- {$EXTERNALSYM IPROPNAME_HIDDEN_PROPERTIES}
-
-// Customization properties: set on command-line or in Property table
-
- IPROPNAME_USERNAME = TEXT('USERNAME');
- {$EXTERNALSYM IPROPNAME_USERNAME}
- IPROPNAME_COMPANYNAME = TEXT('COMPANYNAME');
- {$EXTERNALSYM IPROPNAME_COMPANYNAME}
- IPROPNAME_PIDKEY = TEXT('PIDKEY'); // used with PIDTemplate to form ProductID
- {$EXTERNALSYM IPROPNAME_PIDKEY}
- IPROPNAME_PATCH = TEXT('PATCH'); // patch package to apply - SET BY INSTALLER
- {$EXTERNALSYM IPROPNAME_PATCH}
- IPROPNAME_TARGETDIR = TEXT('TARGETDIR'); // target location - defaults to ROOTDRIVE
- {$EXTERNALSYM IPROPNAME_TARGETDIR}
- IPROPNAME_ACTION = TEXT('ACTION'); // top-level action to perform - default to INSTALL
- {$EXTERNALSYM IPROPNAME_ACTION}
- IPROPNAME_LIMITUI = TEXT('LIMITUI'); // limit ui level to Basic
- {$EXTERNALSYM IPROPNAME_LIMITUI}
- IPROPNAME_LOGACTION = TEXT('LOGACTION'); // log only these actions
- {$EXTERNALSYM IPROPNAME_LOGACTION}
- IPROPNAME_ALLUSERS = TEXT('ALLUSERS'); // install for all users
- {$EXTERNALSYM IPROPNAME_ALLUSERS}
- IPROPNAME_INSTALLLEVEL = TEXT('INSTALLLEVEL');
- {$EXTERNALSYM IPROPNAME_INSTALLLEVEL}
- IPROPNAME_REBOOT = TEXT('REBOOT'); // force or suppress reboot
- {$EXTERNALSYM IPROPNAME_REBOOT}
-
- IPROPNAME_REBOOTPROMPT = TEXT('REBOOTPROMPT'); // allow or suppress reboot prompt
- {$EXTERNALSYM IPROPNAME_REBOOTPROMPT}
-
- IPROPNAME_EXECUTEMODE = TEXT('EXECUTEMODE'); // NONE or SCRIPT
- {$EXTERNALSYM IPROPNAME_EXECUTEMODE}
- IPROPVALUE_EXECUTEMODE_NONE = TEXT('NONE'); // do not update system
- {$EXTERNALSYM IPROPVALUE_EXECUTEMODE_NONE}
- IPROPVALUE_EXECUTEMODE_SCRIPT = TEXT('SCRIPT'); // default - run script to update system
- {$EXTERNALSYM IPROPVALUE_EXECUTEMODE_SCRIPT}
- IPROPNAME_EXECUTEACTION = TEXT('EXECUTEACTION'); // run action on server side
- {$EXTERNALSYM IPROPNAME_EXECUTEACTION}
- IPROPNAME_SOURCELIST = TEXT('SOURCELIST');
- {$EXTERNALSYM IPROPNAME_SOURCELIST}
- IPROPNAME_ROOTDRIVE = TEXT('ROOTDRIVE'); // default drive to install - SET BY INSTALLER
- {$EXTERNALSYM IPROPNAME_ROOTDRIVE}
- IPROPNAME_TRANSFORMS = TEXT('TRANSFORMS'); // transforms to apply
- {$EXTERNALSYM IPROPNAME_TRANSFORMS}
- IPROPNAME_TRANSFORMSATSOURCE = TEXT('TRANSFORMSATSOURCE'); // transforms can be found at source
- {$EXTERNALSYM IPROPNAME_TRANSFORMSATSOURCE}
- IPROPNAME_TRANSFORMSSECURE = TEXT('TRANSFORMSSECURE'); // file transforms are secured
- {$EXTERNALSYM IPROPNAME_TRANSFORMSSECURE}
- IPROPNAME_SEQUENCE = TEXT('SEQUENCE'); // sequence table to run with SEQUENCE action
- {$EXTERNALSYM IPROPNAME_SEQUENCE}
- IPROPNAME_SHORTFILENAMES = TEXT('SHORTFILENAMES'); // force short file names
- {$EXTERNALSYM IPROPNAME_SHORTFILENAMES}
- IPROPNAME_PRIMARYFOLDER = TEXT('PRIMARYFOLDER'); // Folder on the volume the author wants costing info for
- {$EXTERNALSYM IPROPNAME_PRIMARYFOLDER}
- IPROPNAME_AFTERREBOOT = TEXT('AFTERREBOOT'); // install is after a ForceReboot triggered reboot
- {$EXTERNALSYM IPROPNAME_AFTERREBOOT}
- IPROPNAME_NOCOMPANYNAME = TEXT('NOCOMPANYNAME');
- {$EXTERNALSYM IPROPNAME_NOCOMPANYNAME}
- IPROPNAME_NOUSERNAME = TEXT('NOUSERNAME');
- {$EXTERNALSYM IPROPNAME_NOUSERNAME}
- IPROPNAME_DISABLEROLLBACK = TEXT('DISABLEROLLBACK'); // disable rollback for this install
- {$EXTERNALSYM IPROPNAME_DISABLEROLLBACK}
- IPROPNAME_AVAILABLEFREEREG = TEXT('AVAILABLEFREEREG'); // set up the free space in the registry before commencing the install
- {$EXTERNALSYM IPROPNAME_AVAILABLEFREEREG}
- IPROPNAME_DISABLEADVTSHORTCUTS = TEXT('DISABLEADVTSHORTCUTS'); // disable creating darwin shortcuts even if supported
- {$EXTERNALSYM IPROPNAME_DISABLEADVTSHORTCUTS}
- IPROPNAME_PATCHNEWPACKAGECODE = TEXT('PATCHNEWPACKAGECODE'); // added to property table by patch transforms - used to update
- {$EXTERNALSYM IPROPNAME_PATCHNEWPACKAGECODE}
- // PackageCode of admin packages when patching admin installs
- IPROPNAME_PATCHNEWSUMMARYSUBJECT = TEXT('PATCHNEWSUMMARYSUBJECT'); // added to property table by patch transforms - used to update
- {$EXTERNALSYM IPROPNAME_PATCHNEWSUMMARYSUBJECT}
- // Subject summary info property of admin packages when patching admin installs
- IPROPNAME_PATCHNEWSUMMARYCOMMENTS = TEXT('PATCHNEWSUMMARYCOMMENTS'); // added to property table by patch transforms - used to update
- {$EXTERNALSYM IPROPNAME_PATCHNEWSUMMARYCOMMENTS}
- // Comments summary info property of admin packages when patching admin installs
- IPROPNAME_PRODUCTLANGUAGE = TEXT('PRODUCTLANGUAGE'); // requested language, must be one in summary information list, selects language transform
- {$EXTERNALSYM IPROPNAME_PRODUCTLANGUAGE}
-
- IPROPNAME_CHECKCRCS = TEXT('MSICHECKCRCS'); // requests Darwin to check CRCs after copying, moving, patching & duplicating files.
- {$EXTERNALSYM IPROPNAME_CHECKCRCS}
- IPROPNAME_MSINODISABLEMEDIA = TEXT('MSINODISABLEMEDIA'); // if set, DISABLEMEDIA won't be set in the AdminProperties stream during an admin install of
- {$EXTERNALSYM IPROPNAME_MSINODISABLEMEDIA} // a package with compressed source
-
-// property used for URT bootstrapping
-
- IPROPNAME_CARRYINGNDP = TEXT('CARRYINGNDP');
- {$EXTERNALSYM IPROPNAME_CARRYINGNDP}
- IPROPVALUE__CARRYINGNDP_URTREINSTALL = TEXT('URTREINSTALL'); // reinstalling/ uninstalling core URT files
- {$EXTERNALSYM IPROPVALUE__CARRYINGNDP_URTREINSTALL}
- IPROPVALUE__CARRYINGNDP_URTUPGRADE = TEXT('URTUPGRADE'); // upgrading core URT files
- {$EXTERNALSYM IPROPVALUE__CARRYINGNDP_URTUPGRADE}
-
-// property used for multiple instance support
-
- IPROPNAME_MSINEWINSTANCE = TEXT('MSINEWINSTANCE');
- {$EXTERNALSYM IPROPNAME_MSINEWINSTANCE}
- IPROPNAME_MSIINSTANCEGUID = TEXT('MSIINSTANCEGUID');
- {$EXTERNALSYM IPROPNAME_MSIINSTANCEGUID}
-
-// properties used for URL download reduction for admins
-
- IPROPNAME_MSIPACKAGEDOWNLOADLOCALCOPY = TEXT('MSIPACKAGEDOWNLOADLOCALCOPY');
- {$EXTERNALSYM IPROPNAME_MSIPACKAGEDOWNLOADLOCALCOPY}
- IPROPNAME_MSIPATCHDOWNLOADLOCALCOPY = TEXT('MSIPATCHDOWNLOADLOCALCOPY');
- {$EXTERNALSYM IPROPNAME_MSIPATCHDOWNLOADLOCALCOPY}
-
-// Properties used to populate Add/Remove Control Panel values
-
- IPROPNAME_ARPAUTHORIZEDCDFPREFIX = TEXT('ARPAUTHORIZEDCDFPREFIX');
- {$EXTERNALSYM IPROPNAME_ARPAUTHORIZEDCDFPREFIX}
- IPROPNAME_ARPCOMMENTS = TEXT('ARPCOMMENTS');
- {$EXTERNALSYM IPROPNAME_ARPCOMMENTS}
- IPROPNAME_ARPCONTACT = TEXT('ARPCONTACT');
- {$EXTERNALSYM IPROPNAME_ARPCONTACT}
- IPROPNAME_ARPHELPLINK = TEXT('ARPHELPLINK');
- {$EXTERNALSYM IPROPNAME_ARPHELPLINK}
- IPROPNAME_ARPHELPTELEPHONE = TEXT('ARPHELPTELEPHONE');
- {$EXTERNALSYM IPROPNAME_ARPHELPTELEPHONE}
- IPROPNAME_ARPINSTALLLOCATION = TEXT('ARPINSTALLLOCATION');
- {$EXTERNALSYM IPROPNAME_ARPINSTALLLOCATION}
- IPROPNAME_ARPNOMODIFY = TEXT('ARPNOMODIFY');
- {$EXTERNALSYM IPROPNAME_ARPNOMODIFY}
- IPROPNAME_ARPNOREMOVE = TEXT('ARPNOREMOVE');
- {$EXTERNALSYM IPROPNAME_ARPNOREMOVE}
- IPROPNAME_ARPNOREPAIR = TEXT('ARPNOREPAIR');
- {$EXTERNALSYM IPROPNAME_ARPNOREPAIR}
- IPROPNAME_ARPREADME = TEXT('ARPREADME');
- {$EXTERNALSYM IPROPNAME_ARPREADME}
- IPROPNAME_ARPSIZE = TEXT('ARPSIZE');
- {$EXTERNALSYM IPROPNAME_ARPSIZE}
- IPROPNAME_ARPSYSTEMCOMPONENT = TEXT('ARPSYSTEMCOMPONENT');
- {$EXTERNALSYM IPROPNAME_ARPSYSTEMCOMPONENT}
- IPROPNAME_ARPURLINFOABOUT = TEXT('ARPURLINFOABOUT');
- {$EXTERNALSYM IPROPNAME_ARPURLINFOABOUT}
- IPROPNAME_ARPURLUPDATEINFO = TEXT('ARPURLUPDATEINFO');
- {$EXTERNALSYM IPROPNAME_ARPURLUPDATEINFO}
- IPROPNAME_ARPPRODUCTICON = TEXT('ARPPRODUCTICON');
- {$EXTERNALSYM IPROPNAME_ARPPRODUCTICON}
-
-// Dynamic properties set by installer during install
-
- IPROPNAME_INSTALLED = TEXT('Installed'); // product already installed
- {$EXTERNALSYM IPROPNAME_INSTALLED}
- IPROPNAME_PRODUCTSTATE = TEXT('ProductState'); // state of product (installed,advertised,etc...)
- {$EXTERNALSYM IPROPNAME_PRODUCTSTATE}
- IPROPNAME_PRESELECTED = TEXT('Preselected'); // selections made on command line
- {$EXTERNALSYM IPROPNAME_PRESELECTED}
- IPROPNAME_RESUME = TEXT('RESUME'); // resuming suspended install
- {$EXTERNALSYM IPROPNAME_RESUME}
- IPROPNAME_UPDATESTARTED = TEXT('UpdateStarted'); // have begun to update system
- {$EXTERNALSYM IPROPNAME_UPDATESTARTED}
- IPROPNAME_PRODUCTID = TEXT('ProductID'); // the complete validated Product ID
- {$EXTERNALSYM IPROPNAME_PRODUCTID}
- IPROPNAME_OUTOFDISKSPACE = TEXT('OutOfDiskSpace');
- {$EXTERNALSYM IPROPNAME_OUTOFDISKSPACE}
- IPROPNAME_OUTOFNORBDISKSPACE = TEXT('OutOfNoRbDiskSpace');
- {$EXTERNALSYM IPROPNAME_OUTOFNORBDISKSPACE}
- IPROPNAME_COSTINGCOMPLETE = TEXT('CostingComplete');
- {$EXTERNALSYM IPROPNAME_COSTINGCOMPLETE}
- IPROPNAME_SOURCEDIR = TEXT('SourceDir'); // source location - SET BY INSTALLER
- {$EXTERNALSYM IPROPNAME_SOURCEDIR}
- IPROPNAME_REPLACEDINUSEFILES = TEXT('ReplacedInUseFiles'); // need reboot to completely install one or more files
- {$EXTERNALSYM IPROPNAME_REPLACEDINUSEFILES}
- IPROPNAME_PRIMARYFOLDER_PATH = TEXT('PrimaryVolumePath');
- {$EXTERNALSYM IPROPNAME_PRIMARYFOLDER_PATH}
- IPROPNAME_PRIMARYFOLDER_SPACEAVAILABLE = TEXT('PrimaryVolumeSpaceAvailable');
- {$EXTERNALSYM IPROPNAME_PRIMARYFOLDER_SPACEAVAILABLE}
- IPROPNAME_PRIMARYFOLDER_SPACEREQUIRED = TEXT('PrimaryVolumeSpaceRequired');
- {$EXTERNALSYM IPROPNAME_PRIMARYFOLDER_SPACEREQUIRED}
- IPROPNAME_PRIMARYFOLDER_SPACEREMAINING = TEXT('PrimaryVolumeSpaceRemaining');
- {$EXTERNALSYM IPROPNAME_PRIMARYFOLDER_SPACEREMAINING}
- IPROPNAME_ISADMINPACKAGE = TEXT('IsAdminPackage');
- {$EXTERNALSYM IPROPNAME_ISADMINPACKAGE}
- IPROPNAME_ROLLBACKDISABLED = TEXT('RollbackDisabled');
- {$EXTERNALSYM IPROPNAME_ROLLBACKDISABLED}
- IPROPNAME_RESTRICTEDUSERCONTROL = TEXT('RestrictedUserControl');
- {$EXTERNALSYM IPROPNAME_RESTRICTEDUSERCONTROL}
-
-// Dynamic properties evaluated upon use
-
- IPROPNAME_TIME = TEXT('Time');
- {$EXTERNALSYM IPROPNAME_TIME}
- IPROPNAME_DATE = TEXT('Date');
- {$EXTERNALSYM IPROPNAME_DATE}
- IPROPNAME_DATETIME = TEXT('DateTime');
- {$EXTERNALSYM IPROPNAME_DATETIME}
-
-// Hardware properties: set by installer at initialization
-
- IPROPNAME_INTEL = TEXT('Intel');
- {$EXTERNALSYM IPROPNAME_INTEL}
-//#if (_WIN32_MSI >= 150)
- IPROPNAME_AMD64 = TEXT('AMD64');
- {$EXTERNALSYM IPROPNAME_AMD64}
- IPROPNAME_INTEL64 = TEXT('Intel64');
- {$EXTERNALSYM IPROPNAME_INTEL64}
-//#else // (_WIN32_MSI >= 150)
- IPROPNAME_IA64 = TEXT('IA64');
- {$EXTERNALSYM IPROPNAME_IA64}
-//#endif // (_WIN32_MSI >= 150)
- IPROPNAME_TEXTHEIGHT = TEXT('TextHeight');
- {$EXTERNALSYM IPROPNAME_TEXTHEIGHT}
- IPROPNAME_SCREENX = TEXT('ScreenX');
- {$EXTERNALSYM IPROPNAME_SCREENX}
- IPROPNAME_SCREENY = TEXT('ScreenY');
- {$EXTERNALSYM IPROPNAME_SCREENY}
- IPROPNAME_CAPTIONHEIGHT = TEXT('CaptionHeight');
- {$EXTERNALSYM IPROPNAME_CAPTIONHEIGHT}
- IPROPNAME_BORDERTOP = TEXT('BorderTop');
- {$EXTERNALSYM IPROPNAME_BORDERTOP}
- IPROPNAME_BORDERSIDE = TEXT('BorderSide');
- {$EXTERNALSYM IPROPNAME_BORDERSIDE}
- IPROPNAME_COLORBITS = TEXT('ColorBits');
- {$EXTERNALSYM IPROPNAME_COLORBITS}
- IPROPNAME_PHYSICALMEMORY = TEXT('PhysicalMemory');
- {$EXTERNALSYM IPROPNAME_PHYSICALMEMORY}
- IPROPNAME_VIRTUALMEMORY = TEXT('VirtualMemory');
- {$EXTERNALSYM IPROPNAME_VIRTUALMEMORY}
- IPROPNAME_TEXTHEIGHT_CORRECTION = TEXT('TextHeightCorrection');
- {$EXTERNALSYM IPROPNAME_TEXTHEIGHT_CORRECTION}
-
-// Operating System properties: set by installer at initialization
-
- IPROPNAME_VERSIONNT = TEXT('VersionNT');
- {$EXTERNALSYM IPROPNAME_VERSIONNT}
- IPROPNAME_VERSION9X = TEXT('Version9X');
- {$EXTERNALSYM IPROPNAME_VERSION9X}
- IPROPNAME_VERSIONNT64 = TEXT('VersionNT64');
- {$EXTERNALSYM IPROPNAME_VERSIONNT64}
- IPROPNAME_WINDOWSBUILD = TEXT('WindowsBuild');
- {$EXTERNALSYM IPROPNAME_WINDOWSBUILD}
- IPROPNAME_SERVICEPACKLEVEL = TEXT('ServicePackLevel');
- {$EXTERNALSYM IPROPNAME_SERVICEPACKLEVEL}
- IPROPNAME_SERVICEPACKLEVELMINOR = TEXT('ServicePackLevelMinor');
- {$EXTERNALSYM IPROPNAME_SERVICEPACKLEVELMINOR}
- IPROPNAME_SHAREDWINDOWS = TEXT('SharedWindows');
- {$EXTERNALSYM IPROPNAME_SHAREDWINDOWS}
- IPROPNAME_COMPUTERNAME = TEXT('ComputerName');
- {$EXTERNALSYM IPROPNAME_COMPUTERNAME}
- IPROPNAME_SHELLADVTSUPPORT = TEXT('ShellAdvtSupport');
- {$EXTERNALSYM IPROPNAME_SHELLADVTSUPPORT}
- IPROPNAME_OLEADVTSUPPORT = TEXT('OLEAdvtSupport');
- {$EXTERNALSYM IPROPNAME_OLEADVTSUPPORT}
- IPROPNAME_SYSTEMLANGUAGEID = TEXT('SystemLanguageID');
- {$EXTERNALSYM IPROPNAME_SYSTEMLANGUAGEID}
- IPROPNAME_TTCSUPPORT = TEXT('TTCSupport');
- {$EXTERNALSYM IPROPNAME_TTCSUPPORT}
- IPROPNAME_TERMSERVER = TEXT('TerminalServer');
- {$EXTERNALSYM IPROPNAME_TERMSERVER}
- IPROPNAME_REMOTEADMINTS = TEXT('RemoteAdminTS');
- {$EXTERNALSYM IPROPNAME_REMOTEADMINTS}
- IPROPNAME_REDIRECTEDDLLSUPPORT = TEXT('RedirectedDllSupport');
- {$EXTERNALSYM IPROPNAME_REDIRECTEDDLLSUPPORT}
- IPROPNAME_NTPRODUCTTYPE = TEXT('MsiNTProductType');
- {$EXTERNALSYM IPROPNAME_NTPRODUCTTYPE}
- IPROPNAME_NTSUITEBACKOFFICE = TEXT('MsiNTSuiteBackOffice');
- {$EXTERNALSYM IPROPNAME_NTSUITEBACKOFFICE}
- IPROPNAME_NTSUITEDATACENTER = TEXT('MsiNTSuiteDataCenter');
- {$EXTERNALSYM IPROPNAME_NTSUITEDATACENTER}
- IPROPNAME_NTSUITEENTERPRISE = TEXT('MsiNTSuiteEnterprise');
- {$EXTERNALSYM IPROPNAME_NTSUITEENTERPRISE}
- IPROPNAME_NTSUITESMALLBUSINESS = TEXT('MsiNTSuiteSmallBusiness');
- {$EXTERNALSYM IPROPNAME_NTSUITESMALLBUSINESS}
- IPROPNAME_NTSUITESMALLBUSINESSRESTRICTED = TEXT('MsiNTSuiteSmallBusinessRestricted');
- {$EXTERNALSYM IPROPNAME_NTSUITESMALLBUSINESSRESTRICTED}
- IPROPNAME_NTSUITEPERSONAL = TEXT('MsiNTSuitePersonal');
- {$EXTERNALSYM IPROPNAME_NTSUITEPERSONAL}
- IPROPNAME_NTSUITEWEBSERVER = TEXT('MsiNTSuiteWebServer');
- {$EXTERNALSYM IPROPNAME_NTSUITEWEBSERVER}
- IPROPNAME_NETASSEMBLYSUPPORT = TEXT('MsiNetAssemblySupport');
- {$EXTERNALSYM IPROPNAME_NETASSEMBLYSUPPORT}
- IPROPNAME_WIN32ASSEMBLYSUPPORT = TEXT('MsiWin32AssemblySupport');
- {$EXTERNALSYM IPROPNAME_WIN32ASSEMBLYSUPPORT}
-
-// User properties: set by installer at initialization
-
- IPROPNAME_LOGONUSER = TEXT('LogonUser');
- {$EXTERNALSYM IPROPNAME_LOGONUSER}
- IPROPNAME_USERSID = TEXT('UserSID');
- {$EXTERNALSYM IPROPNAME_USERSID}
- IPROPNAME_ADMINUSER = TEXT('AdminUser');
- {$EXTERNALSYM IPROPNAME_ADMINUSER}
- IPROPNAME_USERLANGUAGEID = TEXT('UserLanguageID');
- {$EXTERNALSYM IPROPNAME_USERLANGUAGEID}
- IPROPNAME_PRIVILEGED = TEXT('Privileged');
- {$EXTERNALSYM IPROPNAME_PRIVILEGED}
-
-// System folder properties: set by installer at initialization
-
- IPROPNAME_WINDOWS_FOLDER = TEXT('WindowsFolder');
- {$EXTERNALSYM IPROPNAME_WINDOWS_FOLDER}
- IPROPNAME_SYSTEM_FOLDER = TEXT('SystemFolder');
- {$EXTERNALSYM IPROPNAME_SYSTEM_FOLDER}
- IPROPNAME_SYSTEM16_FOLDER = TEXT('System16Folder');
- {$EXTERNALSYM IPROPNAME_SYSTEM16_FOLDER}
- IPROPNAME_WINDOWS_VOLUME = TEXT('WindowsVolume');
- {$EXTERNALSYM IPROPNAME_WINDOWS_VOLUME}
- IPROPNAME_TEMP_FOLDER = TEXT('TempFolder');
- {$EXTERNALSYM IPROPNAME_TEMP_FOLDER}
- IPROPNAME_PROGRAMFILES_FOLDER = TEXT('ProgramFilesFolder');
- {$EXTERNALSYM IPROPNAME_PROGRAMFILES_FOLDER}
- IPROPNAME_COMMONFILES_FOLDER = TEXT('CommonFilesFolder');
- {$EXTERNALSYM IPROPNAME_COMMONFILES_FOLDER}
- IPROPNAME_SYSTEM64_FOLDER = TEXT('System64Folder');
- {$EXTERNALSYM IPROPNAME_SYSTEM64_FOLDER}
- IPROPNAME_PROGRAMFILES64_FOLDER = TEXT('ProgramFiles64Folder');
- {$EXTERNALSYM IPROPNAME_PROGRAMFILES64_FOLDER}
- IPROPNAME_COMMONFILES64_FOLDER = TEXT('CommonFiles64Folder');
- {$EXTERNALSYM IPROPNAME_COMMONFILES64_FOLDER}
- IPROPNAME_STARTMENU_FOLDER = TEXT('StartMenuFolder');
- {$EXTERNALSYM IPROPNAME_STARTMENU_FOLDER}
- IPROPNAME_PROGRAMMENU_FOLDER = TEXT('ProgramMenuFolder');
- {$EXTERNALSYM IPROPNAME_PROGRAMMENU_FOLDER}
- IPROPNAME_STARTUP_FOLDER = TEXT('StartupFolder');
- {$EXTERNALSYM IPROPNAME_STARTUP_FOLDER}
- IPROPNAME_NETHOOD_FOLDER = TEXT('NetHoodFolder');
- {$EXTERNALSYM IPROPNAME_NETHOOD_FOLDER}
- IPROPNAME_PERSONAL_FOLDER = TEXT('PersonalFolder');
- {$EXTERNALSYM IPROPNAME_PERSONAL_FOLDER}
- IPROPNAME_SENDTO_FOLDER = TEXT('SendToFolder');
- {$EXTERNALSYM IPROPNAME_SENDTO_FOLDER}
- IPROPNAME_DESKTOP_FOLDER = TEXT('DesktopFolder');
- {$EXTERNALSYM IPROPNAME_DESKTOP_FOLDER}
- IPROPNAME_TEMPLATE_FOLDER = TEXT('TemplateFolder');
- {$EXTERNALSYM IPROPNAME_TEMPLATE_FOLDER}
- IPROPNAME_FONTS_FOLDER = TEXT('FontsFolder');
- {$EXTERNALSYM IPROPNAME_FONTS_FOLDER}
- IPROPNAME_FAVORITES_FOLDER = TEXT('FavoritesFolder');
- {$EXTERNALSYM IPROPNAME_FAVORITES_FOLDER}
- IPROPNAME_RECENT_FOLDER = TEXT('RecentFolder');
- {$EXTERNALSYM IPROPNAME_RECENT_FOLDER}
- IPROPNAME_APPDATA_FOLDER = TEXT('AppDataFolder');
- {$EXTERNALSYM IPROPNAME_APPDATA_FOLDER}
- IPROPNAME_PRINTHOOD_FOLDER = TEXT('PrintHoodFolder');
- {$EXTERNALSYM IPROPNAME_PRINTHOOD_FOLDER}
- IPROPNAME_ADMINTOOLS_FOLDER = TEXT('AdminToolsFolder');
- {$EXTERNALSYM IPROPNAME_ADMINTOOLS_FOLDER}
- IPROPNAME_COMMONAPPDATA_FOLDER = TEXT('CommonAppDataFolder');
- {$EXTERNALSYM IPROPNAME_COMMONAPPDATA_FOLDER}
- IPROPNAME_LOCALAPPDATA_FOLDER = TEXT('LocalAppDataFolder');
- {$EXTERNALSYM IPROPNAME_LOCALAPPDATA_FOLDER}
- IPROPNAME_MYPICTURES_FOLDER = TEXT('MyPicturesFolder');
- {$EXTERNALSYM IPROPNAME_MYPICTURES_FOLDER}
-
-// Feature/Component installation properties: set on command-line
-
- IPROPNAME_FEATUREADDLOCAL = TEXT('ADDLOCAL');
- {$EXTERNALSYM IPROPNAME_FEATUREADDLOCAL}
- IPROPNAME_FEATUREADDSOURCE = TEXT('ADDSOURCE');
- {$EXTERNALSYM IPROPNAME_FEATUREADDSOURCE}
- IPROPNAME_FEATUREADDDEFAULT = TEXT('ADDDEFAULT');
- {$EXTERNALSYM IPROPNAME_FEATUREADDDEFAULT}
- IPROPNAME_FEATUREREMOVE = TEXT('REMOVE');
- {$EXTERNALSYM IPROPNAME_FEATUREREMOVE}
- IPROPNAME_FEATUREADVERTISE = TEXT('ADVERTISE');
- {$EXTERNALSYM IPROPNAME_FEATUREADVERTISE}
- IPROPVALUE_FEATURE_ALL = TEXT('ALL');
- {$EXTERNALSYM IPROPVALUE_FEATURE_ALL}
-
- IPROPNAME_COMPONENTADDLOCAL = TEXT('COMPADDLOCAL');
- {$EXTERNALSYM IPROPNAME_COMPONENTADDLOCAL}
- IPROPNAME_COMPONENTADDSOURCE = TEXT('COMPADDSOURCE');
- {$EXTERNALSYM IPROPNAME_COMPONENTADDSOURCE}
- IPROPNAME_COMPONENTADDDEFAULT = TEXT('COMPADDDEFAULT');
- {$EXTERNALSYM IPROPNAME_COMPONENTADDDEFAULT}
-
- IPROPNAME_FILEADDLOCAL = TEXT('FILEADDLOCAL');
- {$EXTERNALSYM IPROPNAME_FILEADDLOCAL}
- IPROPNAME_FILEADDSOURCE = TEXT('FILEADDSOURCE');
- {$EXTERNALSYM IPROPNAME_FILEADDSOURCE}
- IPROPNAME_FILEADDDEFAULT = TEXT('FILEADDDEFAULT');
- {$EXTERNALSYM IPROPNAME_FILEADDDEFAULT}
-
- IPROPNAME_REINSTALL = TEXT('REINSTALL');
- {$EXTERNALSYM IPROPNAME_REINSTALL}
- IPROPNAME_REINSTALLMODE = TEXT('REINSTALLMODE');
- {$EXTERNALSYM IPROPNAME_REINSTALLMODE}
- IPROPNAME_PROMPTROLLBACKCOST = TEXT('PROMPTROLLBACKCOST');
- {$EXTERNALSYM IPROPNAME_PROMPTROLLBACKCOST}
- IPROPVALUE_RBCOST_PROMPT = TEXT('P');
- {$EXTERNALSYM IPROPVALUE_RBCOST_PROMPT}
- IPROPVALUE_RBCOST_SILENT = TEXT('D');
- {$EXTERNALSYM IPROPVALUE_RBCOST_SILENT}
- IPROPVALUE_RBCOST_FAIL = TEXT('F');
- {$EXTERNALSYM IPROPVALUE_RBCOST_FAIL}
-
-// Property for custom actions to communicate
-
- IPROPNAME_CUSTOMACTIONDATA = TEXT('CustomActionData');
- {$EXTERNALSYM IPROPNAME_CUSTOMACTIONDATA}
-
-//------------------------------------------------------------------------------
-// TOP-LEVEL ACTION NAMES
-//------------------------------------------------------------------------------
-
- IACTIONNAME_INSTALL = TEXT('INSTALL');
- {$EXTERNALSYM IACTIONNAME_INSTALL}
- IACTIONNAME_ADVERTISE = TEXT('ADVERTISE');
- {$EXTERNALSYM IACTIONNAME_ADVERTISE}
- IACTIONNAME_ADMIN = TEXT('ADMIN');
- {$EXTERNALSYM IACTIONNAME_ADMIN}
- IACTIONNAME_SEQUENCE = TEXT('SEQUENCE');
- {$EXTERNALSYM IACTIONNAME_SEQUENCE}
- IACTIONNAME_COLLECTUSERINFO = TEXT('CollectUserInfo');
- {$EXTERNALSYM IACTIONNAME_COLLECTUSERINFO}
- IACTIONNAME_FIRSTRUN = TEXT('FirstRun');
- {$EXTERNALSYM IACTIONNAME_FIRSTRUN}
-
-//------------------------------------------------------------------------------
-// SummaryInformation property stream property IDs
-//------------------------------------------------------------------------------
-
-// standard property definitions, from OLE2 documentation
-
- PID_DICTIONARY = 0; // integer count + array of entries
- {$EXTERNALSYM PID_DICTIONARY}
- PID_CODEPAGE = 1; // short integer
- {$EXTERNALSYM PID_CODEPAGE}
- PID_TITLE = 2; // string
- {$EXTERNALSYM PID_TITLE}
- PID_SUBJECT = 3; // string
- {$EXTERNALSYM PID_SUBJECT}
- PID_AUTHOR = 4; // string
- {$EXTERNALSYM PID_AUTHOR}
- PID_KEYWORDS = 5; // string
- {$EXTERNALSYM PID_KEYWORDS}
- PID_COMMENTS = 6; // string
- {$EXTERNALSYM PID_COMMENTS}
- PID_TEMPLATE = 7; // string
- {$EXTERNALSYM PID_TEMPLATE}
- PID_LASTAUTHOR = 8; // string
- {$EXTERNALSYM PID_LASTAUTHOR}
- PID_REVNUMBER = 9; // string
- {$EXTERNALSYM PID_REVNUMBER}
- PID_EDITTIME = 10; // datatime
- {$EXTERNALSYM PID_EDITTIME}
- PID_LASTPRINTED = 11; // datetime
- {$EXTERNALSYM PID_LASTPRINTED}
- PID_CREATE_DTM = 12; // datetime
- {$EXTERNALSYM PID_CREATE_DTM}
- PID_LASTSAVE_DTM = 13; // datetime
- {$EXTERNALSYM PID_LASTSAVE_DTM}
- PID_PAGECOUNT = 14; // integer
- {$EXTERNALSYM PID_PAGECOUNT}
- PID_WORDCOUNT = 15; // integer
- {$EXTERNALSYM PID_WORDCOUNT}
- PID_CHARCOUNT = 16; // integer
- {$EXTERNALSYM PID_CHARCOUNT}
- PID_THUMBNAIL = 17; // clipboard format + metafile/bitmap (not supported)
- {$EXTERNALSYM PID_THUMBNAIL}
- PID_APPNAME = 18; // string
- {$EXTERNALSYM PID_APPNAME}
- PID_SECURITY = 19; // integer
- {$EXTERNALSYM PID_SECURITY}
-
-// PIDs given specific meanings for Installer
-
- PID_MSIVERSION = PID_PAGECOUNT; // integer, Installer version number (major*100+minor)
- {$EXTERNALSYM PID_MSIVERSION}
- PID_MSISOURCE = PID_WORDCOUNT; // integer, type of file image, short/long, media/tree
- {$EXTERNALSYM PID_MSISOURCE}
- PID_MSIRESTRICT = PID_CHARCOUNT; // integer, transform restrictions
- {$EXTERNALSYM PID_MSIRESTRICT}
-
-//------------------------------------------------------------------------------
-// INSTALLER DATABASE INTEGER COLUMN DEFINITIONS
-//------------------------------------------------------------------------------
-
-// BBControl.Attributes
-// Control.Attributes
-
-type
- msidbControlAttributes = DWORD;
- {$EXTERNALSYM msidbControlAttributes}
-
-const
- msidbControlAttributesVisible = $00000001;
- {$EXTERNALSYM msidbControlAttributesVisible}
- msidbControlAttributesEnabled = $00000002;
- {$EXTERNALSYM msidbControlAttributesEnabled}
- msidbControlAttributesSunken = $00000004;
- {$EXTERNALSYM msidbControlAttributesSunken}
- msidbControlAttributesIndirect = $00000008;
- {$EXTERNALSYM msidbControlAttributesIndirect}
- msidbControlAttributesInteger = $00000010;
- {$EXTERNALSYM msidbControlAttributesInteger}
- msidbControlAttributesRTLRO = $00000020;
- {$EXTERNALSYM msidbControlAttributesRTLRO}
- msidbControlAttributesRightAligned = $00000040;
- {$EXTERNALSYM msidbControlAttributesRightAligned}
- msidbControlAttributesLeftScroll = $00000080;
- {$EXTERNALSYM msidbControlAttributesLeftScroll}
- msidbControlAttributesBiDi = msidbControlAttributesRTLRO or
- msidbControlAttributesRightAligned or msidbControlAttributesLeftScroll;
- {$EXTERNALSYM msidbControlAttributesBiDi}
-
- // Text controls
-
- msidbControlAttributesTransparent = $00010000;
- {$EXTERNALSYM msidbControlAttributesTransparent}
- msidbControlAttributesNoPrefix = $00020000;
- {$EXTERNALSYM msidbControlAttributesNoPrefix}
- msidbControlAttributesNoWrap = $00040000;
- {$EXTERNALSYM msidbControlAttributesNoWrap}
- msidbControlAttributesFormatSize = $00080000;
- {$EXTERNALSYM msidbControlAttributesFormatSize}
- msidbControlAttributesUsersLanguage = $00100000;
- {$EXTERNALSYM msidbControlAttributesUsersLanguage}
-
- // Edit controls
-
- msidbControlAttributesMultiline = $00010000;
- {$EXTERNALSYM msidbControlAttributesMultiline}
- msidbControlAttributesPasswordInput = $00200000;
- {$EXTERNALSYM msidbControlAttributesPasswordInput}
-
- // ProgressBar controls
-
- msidbControlAttributesProgress95 = $00010000;
- {$EXTERNALSYM msidbControlAttributesProgress95}
-
- // VolumeSelectCombo and DirectoryCombo controls
-
- msidbControlAttributesRemovableVolume = $00010000;
- {$EXTERNALSYM msidbControlAttributesRemovableVolume}
- msidbControlAttributesFixedVolume = $00020000;
- {$EXTERNALSYM msidbControlAttributesFixedVolume}
- msidbControlAttributesRemoteVolume = $00040000;
- {$EXTERNALSYM msidbControlAttributesRemoteVolume}
- msidbControlAttributesCDROMVolume = $00080000;
- {$EXTERNALSYM msidbControlAttributesCDROMVolume}
- msidbControlAttributesRAMDiskVolume = $00100000;
- {$EXTERNALSYM msidbControlAttributesRAMDiskVolume}
- msidbControlAttributesFloppyVolume = $00200000;
- {$EXTERNALSYM msidbControlAttributesFloppyVolume}
-
- // VolumeCostList controls
-
- msidbControlShowRollbackCost = $00400000;
- {$EXTERNALSYM msidbControlShowRollbackCost}
-
- // ListBox and ComboBox controls
-
- msidbControlAttributesSorted = $00010000;
- {$EXTERNALSYM msidbControlAttributesSorted}
- msidbControlAttributesComboList = $00020000;
- {$EXTERNALSYM msidbControlAttributesComboList}
-
- // picture button controls
-
- msidbControlAttributesImageHandle = $00010000;
- {$EXTERNALSYM msidbControlAttributesImageHandle}
- msidbControlAttributesPushLike = $00020000;
- {$EXTERNALSYM msidbControlAttributesPushLike}
- msidbControlAttributesBitmap = $00040000;
- {$EXTERNALSYM msidbControlAttributesBitmap}
- msidbControlAttributesIcon = $00080000;
- {$EXTERNALSYM msidbControlAttributesIcon}
- msidbControlAttributesFixedSize = $00100000;
- {$EXTERNALSYM msidbControlAttributesFixedSize}
- msidbControlAttributesIconSize16 = $00200000;
- {$EXTERNALSYM msidbControlAttributesIconSize16}
- msidbControlAttributesIconSize32 = $00400000;
- {$EXTERNALSYM msidbControlAttributesIconSize32}
- msidbControlAttributesIconSize48 = $00600000;
- {$EXTERNALSYM msidbControlAttributesIconSize48}
-
- // RadioButton controls
-
- msidbControlAttributesHasBorder = $01000000;
- {$EXTERNALSYM msidbControlAttributesHasBorder}
-
-// CompLocator.Type
-// IniLocator.Type
-// RegLocator.Type
-
-type
- msidbLocatorType = DWORD;
- {$EXTERNALSYM msidbLocatorType}
-
-const
- msidbLocatorTypeDirectory = $00000000;
- {$EXTERNALSYM msidbLocatorTypeDirectory}
- msidbLocatorTypeFileName = $00000001;
- {$EXTERNALSYM msidbLocatorTypeFileName}
- msidbLocatorTypeRawValue = $00000002;
- {$EXTERNALSYM msidbLocatorTypeRawValue}
- msidbLocatorType64bit = $00000010;
- {$EXTERNALSYM msidbLocatorType64bit}
-
-// Component.Attributes
-
-type
- msidbComponentAttributes = DWORD;
- {$EXTERNALSYM msidbComponentAttributes}
-
-const
- msidbComponentAttributesLocalOnly = $00000000;
- {$EXTERNALSYM msidbComponentAttributesLocalOnly}
- msidbComponentAttributesSourceOnly = $00000001;
- {$EXTERNALSYM msidbComponentAttributesSourceOnly}
- msidbComponentAttributesOptional = $00000002; // local or source
- {$EXTERNALSYM msidbComponentAttributesOptional}
- msidbComponentAttributesRegistryKeyPath = $00000004; // KeyPath is key to Registry table
- {$EXTERNALSYM msidbComponentAttributesRegistryKeyPath}
- msidbComponentAttributesSharedDllRefCount = $00000008; // increment SharedDll count
- {$EXTERNALSYM msidbComponentAttributesSharedDllRefCount}
- msidbComponentAttributesPermanent = $00000010; // never uninstall component
- {$EXTERNALSYM msidbComponentAttributesPermanent}
- msidbComponentAttributesODBCDataSource = $00000020; // KeyFile is key to ODBCDataSource table
- {$EXTERNALSYM msidbComponentAttributesODBCDataSource}
- msidbComponentAttributesTransitive = $00000040; // Can transition to/from installed/uninstalled based on changing conditional
- {$EXTERNALSYM msidbComponentAttributesTransitive}
- msidbComponentAttributesNeverOverwrite = $00000080; // dont stomp over existing component if key path exists (file/ regkey)
- {$EXTERNALSYM msidbComponentAttributesNeverOverwrite}
- msidbComponentAttributes64bit = $00000100; // designates a 64-bit component; 32-bit if missing.
- {$EXTERNALSYM msidbComponentAttributes64bit}
-
-// Assembly.Attributes
-
-type
- msidbAssemblyAttributes = DWORD;
- {$EXTERNALSYM msidbAssemblyAttributes}
-
-const
- msidbAssemblyAttributesURT = $00000000;
- {$EXTERNALSYM msidbAssemblyAttributesURT}
- msidbAssemblyAttributesWin32 = $00000001;
- {$EXTERNALSYM msidbAssemblyAttributesWin32}
-
-// CustomAction.Type
-
-type
- msidbCustomActionType = DWORD;
- {$EXTERNALSYM msidbCustomActionType}
-
-const
-
- // executable types
-
- msidbCustomActionTypeDll = $00000001; // Target = entry point name
- {$EXTERNALSYM msidbCustomActionTypeDll}
- msidbCustomActionTypeExe = $00000002; // Target = command line args
- {$EXTERNALSYM msidbCustomActionTypeExe}
- msidbCustomActionTypeTextData = $00000003; // Target = text string to be formatted and set into property
- {$EXTERNALSYM msidbCustomActionTypeTextData}
- msidbCustomActionTypeJScript = $00000005; // Target = entry point name, null if none to call
- {$EXTERNALSYM msidbCustomActionTypeJScript}
- msidbCustomActionTypeVBScript = $00000006; // Target = entry point name, null if none to call
- {$EXTERNALSYM msidbCustomActionTypeVBScript}
- msidbCustomActionTypeInstall = $00000007; // Target = property list for nested engine initialization
- {$EXTERNALSYM msidbCustomActionTypeInstall}
-
- // source of code
-
- msidbCustomActionTypeBinaryData = $00000000; // Source = Binary.Name, data stored in stream
- {$EXTERNALSYM msidbCustomActionTypeBinaryData}
- msidbCustomActionTypeSourceFile = $00000010; // Source = File.File, file part of installation
- {$EXTERNALSYM msidbCustomActionTypeSourceFile}
- msidbCustomActionTypeDirectory = $00000020; // Source = Directory.Directory, folder containing existing file
- {$EXTERNALSYM msidbCustomActionTypeDirectory}
- msidbCustomActionTypeProperty = $00000030; // Source = Property.Property, full path to executable
- {$EXTERNALSYM msidbCustomActionTypeProperty}
-
- // return processing // default is syncronous execution, process return code
-
- msidbCustomActionTypeContinue = $00000040; // ignore action return status, continue running
- {$EXTERNALSYM msidbCustomActionTypeContinue}
- msidbCustomActionTypeAsync = $00000080; // run asynchronously
- {$EXTERNALSYM msidbCustomActionTypeAsync}
-
- // execution scheduling flags // default is execute whenever sequenced
-
- msidbCustomActionTypeFirstSequence = $00000100; // skip if UI sequence already run
- {$EXTERNALSYM msidbCustomActionTypeFirstSequence}
- msidbCustomActionTypeOncePerProcess = $00000200; // skip if UI sequence already run in same process
- {$EXTERNALSYM msidbCustomActionTypeOncePerProcess}
- msidbCustomActionTypeClientRepeat = $00000300; // run on client only if UI already run on client
- {$EXTERNALSYM msidbCustomActionTypeClientRepeat}
- msidbCustomActionTypeInScript = $00000400; // queue for execution within script
- {$EXTERNALSYM msidbCustomActionTypeInScript}
- msidbCustomActionTypeRollback = $00000100; // in conjunction with InScript: queue in Rollback script
- {$EXTERNALSYM msidbCustomActionTypeRollback}
- msidbCustomActionTypeCommit = $00000200; // in conjunction with InScript: run Commit ops from script on success
- {$EXTERNALSYM msidbCustomActionTypeCommit}
-
- // security context flag, default to impersonate as user, valid only if InScript
-
- msidbCustomActionTypeNoImpersonate = $00000800; // no impersonation, run in system context
- {$EXTERNALSYM msidbCustomActionTypeNoImpersonate}
-
-//#if (_WIN32_MSI >= 150)
- msidbCustomActionTypeTSAware = $00004000; // impersonate for per-machine installs on TS machines
- {$EXTERNALSYM msidbCustomActionTypeTSAware}
-//#endif // (_WIN32_MSI >= 150)
-
- // script requires 64bit process
- msidbCustomActionType64BitScript = $00001000; // script should run in 64bit process
- {$EXTERNALSYM msidbCustomActionType64BitScript}
-
- // don't record the contents of the Target field in the log file.
- msidbCustomActionTypeHideTarget = $00002000;
- {$EXTERNALSYM msidbCustomActionTypeHideTarget}
-
-// Dialog.Attributes
-
-type
- msidbDialogAttributes = DWORD;
- {$EXTERNALSYM msidbDialogAttributes}
-
-const
- msidbDialogAttributesVisible = $00000001;
- {$EXTERNALSYM msidbDialogAttributesVisible}
- msidbDialogAttributesModal = $00000002;
- {$EXTERNALSYM msidbDialogAttributesModal}
- msidbDialogAttributesMinimize = $00000004;
- {$EXTERNALSYM msidbDialogAttributesMinimize}
- msidbDialogAttributesSysModal = $00000008;
- {$EXTERNALSYM msidbDialogAttributesSysModal}
- msidbDialogAttributesKeepModeless = $00000010;
- {$EXTERNALSYM msidbDialogAttributesKeepModeless}
- msidbDialogAttributesTrackDiskSpace = $00000020;
- {$EXTERNALSYM msidbDialogAttributesTrackDiskSpace}
- msidbDialogAttributesUseCustomPalette = $00000040;
- {$EXTERNALSYM msidbDialogAttributesUseCustomPalette}
- msidbDialogAttributesRTLRO = $00000080;
- {$EXTERNALSYM msidbDialogAttributesRTLRO}
- msidbDialogAttributesRightAligned = $00000100;
- {$EXTERNALSYM msidbDialogAttributesRightAligned}
- msidbDialogAttributesLeftScroll = $00000200;
- {$EXTERNALSYM msidbDialogAttributesLeftScroll}
- msidbDialogAttributesBiDi = msidbDialogAttributesRTLRO or
- msidbDialogAttributesRightAligned or msidbDialogAttributesLeftScroll;
- {$EXTERNALSYM msidbDialogAttributesBiDi}
- msidbDialogAttributesError = $00010000;
- {$EXTERNALSYM msidbDialogAttributesError}
-
-// Feature.Attributes
-
-type
- msidbFeatureAttributes = DWORD;
- {$EXTERNALSYM msidbFeatureAttributes}
-
-const
- msidbFeatureAttributesFavorLocal = $00000000;
- {$EXTERNALSYM msidbFeatureAttributesFavorLocal}
- msidbFeatureAttributesFavorSource = $00000001;
- {$EXTERNALSYM msidbFeatureAttributesFavorSource}
- msidbFeatureAttributesFollowParent = $00000002;
- {$EXTERNALSYM msidbFeatureAttributesFollowParent}
- msidbFeatureAttributesFavorAdvertise = $00000004;
- {$EXTERNALSYM msidbFeatureAttributesFavorAdvertise}
- msidbFeatureAttributesDisallowAdvertise = $00000008;
- {$EXTERNALSYM msidbFeatureAttributesDisallowAdvertise}
- msidbFeatureAttributesUIDisallowAbsent = $00000010;
- {$EXTERNALSYM msidbFeatureAttributesUIDisallowAbsent}
- msidbFeatureAttributesNoUnsupportedAdvertise = $00000020;
- {$EXTERNALSYM msidbFeatureAttributesNoUnsupportedAdvertise}
-
-// File.Attributes
-
-type
- msidbFileAttributes = DWORD;
- {$EXTERNALSYM msidbFileAttributes}
-
-const
- msidbFileAttributesReadOnly = $00000001;
- {$EXTERNALSYM msidbFileAttributesReadOnly}
- msidbFileAttributesHidden = $00000002;
- {$EXTERNALSYM msidbFileAttributesHidden}
- msidbFileAttributesSystem = $00000004;
- {$EXTERNALSYM msidbFileAttributesSystem}
- msidbFileAttributesReserved0 = $00000008; // Internal use only - must be 0
- {$EXTERNALSYM msidbFileAttributesReserved0}
- msidbFileAttributesReserved1 = $00000040; // Internal use only - must be 0
- {$EXTERNALSYM msidbFileAttributesReserved1}
- msidbFileAttributesReserved2 = $00000080; // Internal use only - must be 0
- {$EXTERNALSYM msidbFileAttributesReserved2}
- msidbFileAttributesReserved3 = $00000100; // Internal use only - must be 0
- {$EXTERNALSYM msidbFileAttributesReserved3}
- msidbFileAttributesVital = $00000200;
- {$EXTERNALSYM msidbFileAttributesVital}
- msidbFileAttributesChecksum = $00000400;
- {$EXTERNALSYM msidbFileAttributesChecksum}
- msidbFileAttributesPatchAdded = $00001000; // Internal use only - set by patches
- {$EXTERNALSYM msidbFileAttributesPatchAdded}
- msidbFileAttributesNoncompressed = $00002000;
- {$EXTERNALSYM msidbFileAttributesNoncompressed}
- msidbFileAttributesCompressed = $00004000;
- {$EXTERNALSYM msidbFileAttributesCompressed}
- msidbFileAttributesReserved4 = $00008000; // Internal use only - must be 0
- {$EXTERNALSYM msidbFileAttributesReserved4}
-
-// IniFile.Action
-// RemoveIniFile.Action
-
-type
- msidbIniFileAction = DWORD;
- {$EXTERNALSYM msidbIniFileAction}
-
-const
- msidbIniFileActionAddLine = $00000000;
- {$EXTERNALSYM msidbIniFileActionAddLine}
- msidbIniFileActionCreateLine = $00000001;
- {$EXTERNALSYM msidbIniFileActionCreateLine}
- msidbIniFileActionRemoveLine = $00000002;
- {$EXTERNALSYM msidbIniFileActionRemoveLine}
- msidbIniFileActionAddTag = $00000003;
- {$EXTERNALSYM msidbIniFileActionAddTag}
- msidbIniFileActionRemoveTag = $00000004;
- {$EXTERNALSYM msidbIniFileActionRemoveTag}
-
-// MoveFile.Options
-
-type
- msidbMoveFileOptions = DWORD;
- {$EXTERNALSYM msidbMoveFileOptions}
-
-const
- msidbMoveFileOptionsMove = $00000001;
- {$EXTERNALSYM msidbMoveFileOptionsMove}
-
-// ODBCDataSource.Registration
-
-type
- msidbODBCDataSourceRegistration = DWORD;
- {$EXTERNALSYM msidbODBCDataSourceRegistration}
-
-const
- msidbODBCDataSourceRegistrationPerMachine = $00000000;
- {$EXTERNALSYM msidbODBCDataSourceRegistrationPerMachine}
- msidbODBCDataSourceRegistrationPerUser = $00000001;
- {$EXTERNALSYM msidbODBCDataSourceRegistrationPerUser}
-
-// Class.Attributes
-
-type
- msidbClassAttributes = DWORD;
- {$EXTERNALSYM msidbClassAttributes}
-
-const
- msidbClassAttributesRelativePath = $00000001;
- {$EXTERNALSYM msidbClassAttributesRelativePath}
-
-// Patch.Attributes
-
-type
- msidbPatchAttributes = DWORD;
- {$EXTERNALSYM msidbPatchAttributes}
-
-const
- msidbPatchAttributesNonVital = $00000001;
- {$EXTERNALSYM msidbPatchAttributesNonVital}
-
-// Registry.Root
-// RegLocator.Root
-// RemoveRegistry.Root
-
-type
- msidbRegistryRoot = DWORD;
- {$EXTERNALSYM msidbRegistryRoot}
-
-const
- msidbRegistryRootClassesRoot = 0;
- {$EXTERNALSYM msidbRegistryRootClassesRoot}
- msidbRegistryRootCurrentUser = 1;
- {$EXTERNALSYM msidbRegistryRootCurrentUser}
- msidbRegistryRootLocalMachine = 2;
- {$EXTERNALSYM msidbRegistryRootLocalMachine}
- msidbRegistryRootUsers = 3;
- {$EXTERNALSYM msidbRegistryRootUsers}
-
-// RemoveFile.InstallMode
-
-type
- msidbRemoveFileInstallMode = DWORD;
- {$EXTERNALSYM msidbRemoveFileInstallMode}
-
-const
- msidbRemoveFileInstallModeOnInstall = $00000001;
- {$EXTERNALSYM msidbRemoveFileInstallModeOnInstall}
- msidbRemoveFileInstallModeOnRemove = $00000002;
- {$EXTERNALSYM msidbRemoveFileInstallModeOnRemove}
- msidbRemoveFileInstallModeOnBoth = $00000003;
- {$EXTERNALSYM msidbRemoveFileInstallModeOnBoth}
-
-// ServiceControl.Event
-
-type
- msidbServiceControlEvent = DWORD;
- {$EXTERNALSYM msidbServiceControlEvent}
-
-const
- msidbServiceControlEventStart = $00000001;
- {$EXTERNALSYM msidbServiceControlEventStart}
- msidbServiceControlEventStop = $00000002;
- {$EXTERNALSYM msidbServiceControlEventStop}
- msidbServiceControlEventDelete = $00000008;
- {$EXTERNALSYM msidbServiceControlEventDelete}
- msidbServiceControlEventUninstallStart = $00000010;
- {$EXTERNALSYM msidbServiceControlEventUninstallStart}
- msidbServiceControlEventUninstallStop = $00000020;
- {$EXTERNALSYM msidbServiceControlEventUninstallStop}
- msidbServiceControlEventUninstallDelete = $00000080;
- {$EXTERNALSYM msidbServiceControlEventUninstallDelete}
-
-// ServiceInstall.ErrorControl
-
-type
- msidbServiceInstallErrorControl = DWORD;
- {$EXTERNALSYM msidbServiceInstallErrorControl}
-
-const
- msidbServiceInstallErrorControlVital = $00008000;
- {$EXTERNALSYM msidbServiceInstallErrorControlVital}
-
-// TextStyle.StyleBits
-
-type
- msidbTextStyleStyleBits = DWORD;
- {$EXTERNALSYM msidbTextStyleStyleBits}
-
-const
- msidbTextStyleStyleBitsBold = $00000001;
- {$EXTERNALSYM msidbTextStyleStyleBitsBold}
- msidbTextStyleStyleBitsItalic = $00000002;
- {$EXTERNALSYM msidbTextStyleStyleBitsItalic}
- msidbTextStyleStyleBitsUnderline = $00000004;
- {$EXTERNALSYM msidbTextStyleStyleBitsUnderline}
- msidbTextStyleStyleBitsStrike = $00000008;
- {$EXTERNALSYM msidbTextStyleStyleBitsStrike}
-
-// Upgrade.Attributes
-
-type
- msidbUpgradeAttributes = DWORD;
- {$EXTERNALSYM msidbUpgradeAttributes}
-
-const
- msidbUpgradeAttributesMigrateFeatures = $00000001;
- {$EXTERNALSYM msidbUpgradeAttributesMigrateFeatures}
- msidbUpgradeAttributesOnlyDetect = $00000002;
- {$EXTERNALSYM msidbUpgradeAttributesOnlyDetect}
- msidbUpgradeAttributesIgnoreRemoveFailure = $00000004;
- {$EXTERNALSYM msidbUpgradeAttributesIgnoreRemoveFailure}
- msidbUpgradeAttributesVersionMinInclusive = $00000100;
- {$EXTERNALSYM msidbUpgradeAttributesVersionMinInclusive}
- msidbUpgradeAttributesVersionMaxInclusive = $00000200;
- {$EXTERNALSYM msidbUpgradeAttributesVersionMaxInclusive}
- msidbUpgradeAttributesLanguagesExclusive = $00000400;
- {$EXTERNALSYM msidbUpgradeAttributesLanguagesExclusive}
-
-//------------------------------------------------------------------------------
-// SUMMARY INFORMATION PROPERTY DEFINITIONS
-//------------------------------------------------------------------------------
-
-type
- msidbSumInfoSourceType = DWORD;
- {$EXTERNALSYM msidbSumInfoSourceType}
-
-const
- msidbSumInfoSourceTypeSFN = $00000001; // source uses short filenames
- {$EXTERNALSYM msidbSumInfoSourceTypeSFN}
- msidbSumInfoSourceTypeCompressed = $00000002; // source is compressed
- {$EXTERNALSYM msidbSumInfoSourceTypeCompressed}
- msidbSumInfoSourceTypeAdminImage = $00000004; // source is an admin image
- {$EXTERNALSYM msidbSumInfoSourceTypeAdminImage}
-
-implementation
-
-end.
+{******************************************************************************}
+{ }
+{ Windows Installer API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: msidefs.h, released June 2000. The original Pascal }
+{ code is: MsiDefs.pas, released June 2001. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwamsidefs.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaMsiDefs;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "msidefs.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaWinType;
+
+//------------------------------------------------------------------------------
+// INSTALLER PROPERTY DEFINITIONS
+//------------------------------------------------------------------------------
+
+const
+
+// Required properties: set in Property table
+
+ IPROPNAME_PRODUCTNAME = TEXT('ProductName'); // name registered for display
+ {$EXTERNALSYM IPROPNAME_PRODUCTNAME}
+ IPROPNAME_PRODUCTCODE = TEXT('ProductCode'); // unique string GUID for product
+ {$EXTERNALSYM IPROPNAME_PRODUCTCODE}
+ IPROPNAME_PRODUCTVERSION = TEXT('ProductVersion'); // string product version
+ {$EXTERNALSYM IPROPNAME_PRODUCTVERSION}
+ IPROPNAME_INSTALLLANGUAGE = TEXT('ProductLanguage'); // install language of product, use to load resources
+ {$EXTERNALSYM IPROPNAME_INSTALLLANGUAGE}
+ IPROPNAME_MANUFACTURER = TEXT('Manufacturer'); // name of manufacturer
+ {$EXTERNALSYM IPROPNAME_MANUFACTURER}
+
+// Customization properties: set in Property table
+
+ IPROPNAME_UPGRADECODE = TEXT('UpgradeCode'); // unique string GUID for product family
+ {$EXTERNALSYM IPROPNAME_UPGRADECODE}
+ IPROPNAME_PIDTEMPLATE = TEXT('PIDTemplate'); // drives Product ID processing
+ {$EXTERNALSYM IPROPNAME_PIDTEMPLATE}
+ IPROPNAME_DISKPROMPT = TEXT('DiskPrompt'); // prompt for CD
+ {$EXTERNALSYM IPROPNAME_DISKPROMPT}
+ IPROPNAME_LEFTUNIT = TEXT('LeftUnit'); // name of unit placed to left of number instead of right
+ {$EXTERNALSYM IPROPNAME_LEFTUNIT}
+ IPROPNAME_ADMIN_PROPERTIES = TEXT('AdminProperties'); // properties to stuff in admin package
+ {$EXTERNALSYM IPROPNAME_ADMIN_PROPERTIES}
+ IPROPNAME_DEFAULTUIFONT = TEXT('DefaultUIFont'); // the font used in the UI if no other font is specified
+ {$EXTERNALSYM IPROPNAME_DEFAULTUIFONT}
+ IPROPNAME_ALLOWEDPROPERTIES = TEXT('SecureCustomProperties');
+ {$EXTERNALSYM IPROPNAME_ALLOWEDPROPERTIES}
+ IPROPNAME_ENABLEUSERCONTROL = TEXT('EnableUserControl'); // allows user to specify any public property
+ {$EXTERNALSYM IPROPNAME_ENABLEUSERCONTROL}
+ IPROPNAME_HIDDEN_PROPERTIES = TEXT('MsiHiddenProperties'); // properties that should not be dumped into the log file
+ {$EXTERNALSYM IPROPNAME_HIDDEN_PROPERTIES}
+
+// Customization properties: set on command-line or in Property table
+
+ IPROPNAME_USERNAME = TEXT('USERNAME');
+ {$EXTERNALSYM IPROPNAME_USERNAME}
+ IPROPNAME_COMPANYNAME = TEXT('COMPANYNAME');
+ {$EXTERNALSYM IPROPNAME_COMPANYNAME}
+ IPROPNAME_PIDKEY = TEXT('PIDKEY'); // used with PIDTemplate to form ProductID
+ {$EXTERNALSYM IPROPNAME_PIDKEY}
+ IPROPNAME_PATCH = TEXT('PATCH'); // patch package to apply - SET BY INSTALLER
+ {$EXTERNALSYM IPROPNAME_PATCH}
+ IPROPNAME_TARGETDIR = TEXT('TARGETDIR'); // target location - defaults to ROOTDRIVE
+ {$EXTERNALSYM IPROPNAME_TARGETDIR}
+ IPROPNAME_ACTION = TEXT('ACTION'); // top-level action to perform - default to INSTALL
+ {$EXTERNALSYM IPROPNAME_ACTION}
+ IPROPNAME_LIMITUI = TEXT('LIMITUI'); // limit ui level to Basic
+ {$EXTERNALSYM IPROPNAME_LIMITUI}
+ IPROPNAME_LOGACTION = TEXT('LOGACTION'); // log only these actions
+ {$EXTERNALSYM IPROPNAME_LOGACTION}
+ IPROPNAME_ALLUSERS = TEXT('ALLUSERS'); // install for all users
+ {$EXTERNALSYM IPROPNAME_ALLUSERS}
+ IPROPNAME_INSTALLLEVEL = TEXT('INSTALLLEVEL');
+ {$EXTERNALSYM IPROPNAME_INSTALLLEVEL}
+ IPROPNAME_REBOOT = TEXT('REBOOT'); // force or suppress reboot
+ {$EXTERNALSYM IPROPNAME_REBOOT}
+
+ IPROPNAME_REBOOTPROMPT = TEXT('REBOOTPROMPT'); // allow or suppress reboot prompt
+ {$EXTERNALSYM IPROPNAME_REBOOTPROMPT}
+
+ IPROPNAME_EXECUTEMODE = TEXT('EXECUTEMODE'); // NONE or SCRIPT
+ {$EXTERNALSYM IPROPNAME_EXECUTEMODE}
+ IPROPVALUE_EXECUTEMODE_NONE = TEXT('NONE'); // do not update system
+ {$EXTERNALSYM IPROPVALUE_EXECUTEMODE_NONE}
+ IPROPVALUE_EXECUTEMODE_SCRIPT = TEXT('SCRIPT'); // default - run script to update system
+ {$EXTERNALSYM IPROPVALUE_EXECUTEMODE_SCRIPT}
+ IPROPNAME_EXECUTEACTION = TEXT('EXECUTEACTION'); // run action on server side
+ {$EXTERNALSYM IPROPNAME_EXECUTEACTION}
+ IPROPNAME_SOURCELIST = TEXT('SOURCELIST');
+ {$EXTERNALSYM IPROPNAME_SOURCELIST}
+ IPROPNAME_ROOTDRIVE = TEXT('ROOTDRIVE'); // default drive to install - SET BY INSTALLER
+ {$EXTERNALSYM IPROPNAME_ROOTDRIVE}
+ IPROPNAME_TRANSFORMS = TEXT('TRANSFORMS'); // transforms to apply
+ {$EXTERNALSYM IPROPNAME_TRANSFORMS}
+ IPROPNAME_TRANSFORMSATSOURCE = TEXT('TRANSFORMSATSOURCE'); // transforms can be found at source
+ {$EXTERNALSYM IPROPNAME_TRANSFORMSATSOURCE}
+ IPROPNAME_TRANSFORMSSECURE = TEXT('TRANSFORMSSECURE'); // file transforms are secured
+ {$EXTERNALSYM IPROPNAME_TRANSFORMSSECURE}
+ IPROPNAME_SEQUENCE = TEXT('SEQUENCE'); // sequence table to run with SEQUENCE action
+ {$EXTERNALSYM IPROPNAME_SEQUENCE}
+ IPROPNAME_SHORTFILENAMES = TEXT('SHORTFILENAMES'); // force short file names
+ {$EXTERNALSYM IPROPNAME_SHORTFILENAMES}
+ IPROPNAME_PRIMARYFOLDER = TEXT('PRIMARYFOLDER'); // Folder on the volume the author wants costing info for
+ {$EXTERNALSYM IPROPNAME_PRIMARYFOLDER}
+ IPROPNAME_AFTERREBOOT = TEXT('AFTERREBOOT'); // install is after a ForceReboot triggered reboot
+ {$EXTERNALSYM IPROPNAME_AFTERREBOOT}
+ IPROPNAME_NOCOMPANYNAME = TEXT('NOCOMPANYNAME');
+ {$EXTERNALSYM IPROPNAME_NOCOMPANYNAME}
+ IPROPNAME_NOUSERNAME = TEXT('NOUSERNAME');
+ {$EXTERNALSYM IPROPNAME_NOUSERNAME}
+ IPROPNAME_DISABLEROLLBACK = TEXT('DISABLEROLLBACK'); // disable rollback for this install
+ {$EXTERNALSYM IPROPNAME_DISABLEROLLBACK}
+ IPROPNAME_AVAILABLEFREEREG = TEXT('AVAILABLEFREEREG'); // set up the free space in the registry before commencing the install
+ {$EXTERNALSYM IPROPNAME_AVAILABLEFREEREG}
+ IPROPNAME_DISABLEADVTSHORTCUTS = TEXT('DISABLEADVTSHORTCUTS'); // disable creating darwin shortcuts even if supported
+ {$EXTERNALSYM IPROPNAME_DISABLEADVTSHORTCUTS}
+ IPROPNAME_PATCHNEWPACKAGECODE = TEXT('PATCHNEWPACKAGECODE'); // added to property table by patch transforms - used to update
+ {$EXTERNALSYM IPROPNAME_PATCHNEWPACKAGECODE}
+ // PackageCode of admin packages when patching admin installs
+ IPROPNAME_PATCHNEWSUMMARYSUBJECT = TEXT('PATCHNEWSUMMARYSUBJECT'); // added to property table by patch transforms - used to update
+ {$EXTERNALSYM IPROPNAME_PATCHNEWSUMMARYSUBJECT}
+ // Subject summary info property of admin packages when patching admin installs
+ IPROPNAME_PATCHNEWSUMMARYCOMMENTS = TEXT('PATCHNEWSUMMARYCOMMENTS'); // added to property table by patch transforms - used to update
+ {$EXTERNALSYM IPROPNAME_PATCHNEWSUMMARYCOMMENTS}
+ // Comments summary info property of admin packages when patching admin installs
+ IPROPNAME_PRODUCTLANGUAGE = TEXT('PRODUCTLANGUAGE'); // requested language, must be one in summary information list, selects language transform
+ {$EXTERNALSYM IPROPNAME_PRODUCTLANGUAGE}
+
+ IPROPNAME_CHECKCRCS = TEXT('MSICHECKCRCS'); // requests Darwin to check CRCs after copying, moving, patching & duplicating files.
+ {$EXTERNALSYM IPROPNAME_CHECKCRCS}
+ IPROPNAME_MSINODISABLEMEDIA = TEXT('MSINODISABLEMEDIA'); // if set, DISABLEMEDIA won't be set in the AdminProperties stream during an admin install of
+ {$EXTERNALSYM IPROPNAME_MSINODISABLEMEDIA} // a package with compressed source
+
+// property used for URT bootstrapping
+
+ IPROPNAME_CARRYINGNDP = TEXT('CARRYINGNDP');
+ {$EXTERNALSYM IPROPNAME_CARRYINGNDP}
+ IPROPVALUE__CARRYINGNDP_URTREINSTALL = TEXT('URTREINSTALL'); // reinstalling/ uninstalling core URT files
+ {$EXTERNALSYM IPROPVALUE__CARRYINGNDP_URTREINSTALL}
+ IPROPVALUE__CARRYINGNDP_URTUPGRADE = TEXT('URTUPGRADE'); // upgrading core URT files
+ {$EXTERNALSYM IPROPVALUE__CARRYINGNDP_URTUPGRADE}
+
+// property used for multiple instance support
+
+ IPROPNAME_MSINEWINSTANCE = TEXT('MSINEWINSTANCE');
+ {$EXTERNALSYM IPROPNAME_MSINEWINSTANCE}
+ IPROPNAME_MSIINSTANCEGUID = TEXT('MSIINSTANCEGUID');
+ {$EXTERNALSYM IPROPNAME_MSIINSTANCEGUID}
+
+// properties used for URL download reduction for admins
+
+ IPROPNAME_MSIPACKAGEDOWNLOADLOCALCOPY = TEXT('MSIPACKAGEDOWNLOADLOCALCOPY');
+ {$EXTERNALSYM IPROPNAME_MSIPACKAGEDOWNLOADLOCALCOPY}
+ IPROPNAME_MSIPATCHDOWNLOADLOCALCOPY = TEXT('MSIPATCHDOWNLOADLOCALCOPY');
+ {$EXTERNALSYM IPROPNAME_MSIPATCHDOWNLOADLOCALCOPY}
+
+// Properties used to populate Add/Remove Control Panel values
+
+ IPROPNAME_ARPAUTHORIZEDCDFPREFIX = TEXT('ARPAUTHORIZEDCDFPREFIX');
+ {$EXTERNALSYM IPROPNAME_ARPAUTHORIZEDCDFPREFIX}
+ IPROPNAME_ARPCOMMENTS = TEXT('ARPCOMMENTS');
+ {$EXTERNALSYM IPROPNAME_ARPCOMMENTS}
+ IPROPNAME_ARPCONTACT = TEXT('ARPCONTACT');
+ {$EXTERNALSYM IPROPNAME_ARPCONTACT}
+ IPROPNAME_ARPHELPLINK = TEXT('ARPHELPLINK');
+ {$EXTERNALSYM IPROPNAME_ARPHELPLINK}
+ IPROPNAME_ARPHELPTELEPHONE = TEXT('ARPHELPTELEPHONE');
+ {$EXTERNALSYM IPROPNAME_ARPHELPTELEPHONE}
+ IPROPNAME_ARPINSTALLLOCATION = TEXT('ARPINSTALLLOCATION');
+ {$EXTERNALSYM IPROPNAME_ARPINSTALLLOCATION}
+ IPROPNAME_ARPNOMODIFY = TEXT('ARPNOMODIFY');
+ {$EXTERNALSYM IPROPNAME_ARPNOMODIFY}
+ IPROPNAME_ARPNOREMOVE = TEXT('ARPNOREMOVE');
+ {$EXTERNALSYM IPROPNAME_ARPNOREMOVE}
+ IPROPNAME_ARPNOREPAIR = TEXT('ARPNOREPAIR');
+ {$EXTERNALSYM IPROPNAME_ARPNOREPAIR}
+ IPROPNAME_ARPREADME = TEXT('ARPREADME');
+ {$EXTERNALSYM IPROPNAME_ARPREADME}
+ IPROPNAME_ARPSIZE = TEXT('ARPSIZE');
+ {$EXTERNALSYM IPROPNAME_ARPSIZE}
+ IPROPNAME_ARPSYSTEMCOMPONENT = TEXT('ARPSYSTEMCOMPONENT');
+ {$EXTERNALSYM IPROPNAME_ARPSYSTEMCOMPONENT}
+ IPROPNAME_ARPURLINFOABOUT = TEXT('ARPURLINFOABOUT');
+ {$EXTERNALSYM IPROPNAME_ARPURLINFOABOUT}
+ IPROPNAME_ARPURLUPDATEINFO = TEXT('ARPURLUPDATEINFO');
+ {$EXTERNALSYM IPROPNAME_ARPURLUPDATEINFO}
+ IPROPNAME_ARPPRODUCTICON = TEXT('ARPPRODUCTICON');
+ {$EXTERNALSYM IPROPNAME_ARPPRODUCTICON}
+
+// Dynamic properties set by installer during install
+
+ IPROPNAME_INSTALLED = TEXT('Installed'); // product already installed
+ {$EXTERNALSYM IPROPNAME_INSTALLED}
+ IPROPNAME_PRODUCTSTATE = TEXT('ProductState'); // state of product (installed,advertised,etc...)
+ {$EXTERNALSYM IPROPNAME_PRODUCTSTATE}
+ IPROPNAME_PRESELECTED = TEXT('Preselected'); // selections made on command line
+ {$EXTERNALSYM IPROPNAME_PRESELECTED}
+ IPROPNAME_RESUME = TEXT('RESUME'); // resuming suspended install
+ {$EXTERNALSYM IPROPNAME_RESUME}
+ IPROPNAME_UPDATESTARTED = TEXT('UpdateStarted'); // have begun to update system
+ {$EXTERNALSYM IPROPNAME_UPDATESTARTED}
+ IPROPNAME_PRODUCTID = TEXT('ProductID'); // the complete validated Product ID
+ {$EXTERNALSYM IPROPNAME_PRODUCTID}
+ IPROPNAME_OUTOFDISKSPACE = TEXT('OutOfDiskSpace');
+ {$EXTERNALSYM IPROPNAME_OUTOFDISKSPACE}
+ IPROPNAME_OUTOFNORBDISKSPACE = TEXT('OutOfNoRbDiskSpace');
+ {$EXTERNALSYM IPROPNAME_OUTOFNORBDISKSPACE}
+ IPROPNAME_COSTINGCOMPLETE = TEXT('CostingComplete');
+ {$EXTERNALSYM IPROPNAME_COSTINGCOMPLETE}
+ IPROPNAME_SOURCEDIR = TEXT('SourceDir'); // source location - SET BY INSTALLER
+ {$EXTERNALSYM IPROPNAME_SOURCEDIR}
+ IPROPNAME_REPLACEDINUSEFILES = TEXT('ReplacedInUseFiles'); // need reboot to completely install one or more files
+ {$EXTERNALSYM IPROPNAME_REPLACEDINUSEFILES}
+ IPROPNAME_PRIMARYFOLDER_PATH = TEXT('PrimaryVolumePath');
+ {$EXTERNALSYM IPROPNAME_PRIMARYFOLDER_PATH}
+ IPROPNAME_PRIMARYFOLDER_SPACEAVAILABLE = TEXT('PrimaryVolumeSpaceAvailable');
+ {$EXTERNALSYM IPROPNAME_PRIMARYFOLDER_SPACEAVAILABLE}
+ IPROPNAME_PRIMARYFOLDER_SPACEREQUIRED = TEXT('PrimaryVolumeSpaceRequired');
+ {$EXTERNALSYM IPROPNAME_PRIMARYFOLDER_SPACEREQUIRED}
+ IPROPNAME_PRIMARYFOLDER_SPACEREMAINING = TEXT('PrimaryVolumeSpaceRemaining');
+ {$EXTERNALSYM IPROPNAME_PRIMARYFOLDER_SPACEREMAINING}
+ IPROPNAME_ISADMINPACKAGE = TEXT('IsAdminPackage');
+ {$EXTERNALSYM IPROPNAME_ISADMINPACKAGE}
+ IPROPNAME_ROLLBACKDISABLED = TEXT('RollbackDisabled');
+ {$EXTERNALSYM IPROPNAME_ROLLBACKDISABLED}
+ IPROPNAME_RESTRICTEDUSERCONTROL = TEXT('RestrictedUserControl');
+ {$EXTERNALSYM IPROPNAME_RESTRICTEDUSERCONTROL}
+
+// Dynamic properties evaluated upon use
+
+ IPROPNAME_TIME = TEXT('Time');
+ {$EXTERNALSYM IPROPNAME_TIME}
+ IPROPNAME_DATE = TEXT('Date');
+ {$EXTERNALSYM IPROPNAME_DATE}
+ IPROPNAME_DATETIME = TEXT('DateTime');
+ {$EXTERNALSYM IPROPNAME_DATETIME}
+
+// Hardware properties: set by installer at initialization
+
+ IPROPNAME_INTEL = TEXT('Intel');
+ {$EXTERNALSYM IPROPNAME_INTEL}
+//#if (_WIN32_MSI >= 150)
+ IPROPNAME_AMD64 = TEXT('AMD64');
+ {$EXTERNALSYM IPROPNAME_AMD64}
+ IPROPNAME_INTEL64 = TEXT('Intel64');
+ {$EXTERNALSYM IPROPNAME_INTEL64}
+//#else // (_WIN32_MSI >= 150)
+ IPROPNAME_IA64 = TEXT('IA64');
+ {$EXTERNALSYM IPROPNAME_IA64}
+//#endif // (_WIN32_MSI >= 150)
+ IPROPNAME_TEXTHEIGHT = TEXT('TextHeight');
+ {$EXTERNALSYM IPROPNAME_TEXTHEIGHT}
+ IPROPNAME_SCREENX = TEXT('ScreenX');
+ {$EXTERNALSYM IPROPNAME_SCREENX}
+ IPROPNAME_SCREENY = TEXT('ScreenY');
+ {$EXTERNALSYM IPROPNAME_SCREENY}
+ IPROPNAME_CAPTIONHEIGHT = TEXT('CaptionHeight');
+ {$EXTERNALSYM IPROPNAME_CAPTIONHEIGHT}
+ IPROPNAME_BORDERTOP = TEXT('BorderTop');
+ {$EXTERNALSYM IPROPNAME_BORDERTOP}
+ IPROPNAME_BORDERSIDE = TEXT('BorderSide');
+ {$EXTERNALSYM IPROPNAME_BORDERSIDE}
+ IPROPNAME_COLORBITS = TEXT('ColorBits');
+ {$EXTERNALSYM IPROPNAME_COLORBITS}
+ IPROPNAME_PHYSICALMEMORY = TEXT('PhysicalMemory');
+ {$EXTERNALSYM IPROPNAME_PHYSICALMEMORY}
+ IPROPNAME_VIRTUALMEMORY = TEXT('VirtualMemory');
+ {$EXTERNALSYM IPROPNAME_VIRTUALMEMORY}
+ IPROPNAME_TEXTHEIGHT_CORRECTION = TEXT('TextHeightCorrection');
+ {$EXTERNALSYM IPROPNAME_TEXTHEIGHT_CORRECTION}
+
+// Operating System properties: set by installer at initialization
+
+ IPROPNAME_VERSIONNT = TEXT('VersionNT');
+ {$EXTERNALSYM IPROPNAME_VERSIONNT}
+ IPROPNAME_VERSION9X = TEXT('Version9X');
+ {$EXTERNALSYM IPROPNAME_VERSION9X}
+ IPROPNAME_VERSIONNT64 = TEXT('VersionNT64');
+ {$EXTERNALSYM IPROPNAME_VERSIONNT64}
+ IPROPNAME_WINDOWSBUILD = TEXT('WindowsBuild');
+ {$EXTERNALSYM IPROPNAME_WINDOWSBUILD}
+ IPROPNAME_SERVICEPACKLEVEL = TEXT('ServicePackLevel');
+ {$EXTERNALSYM IPROPNAME_SERVICEPACKLEVEL}
+ IPROPNAME_SERVICEPACKLEVELMINOR = TEXT('ServicePackLevelMinor');
+ {$EXTERNALSYM IPROPNAME_SERVICEPACKLEVELMINOR}
+ IPROPNAME_SHAREDWINDOWS = TEXT('SharedWindows');
+ {$EXTERNALSYM IPROPNAME_SHAREDWINDOWS}
+ IPROPNAME_COMPUTERNAME = TEXT('ComputerName');
+ {$EXTERNALSYM IPROPNAME_COMPUTERNAME}
+ IPROPNAME_SHELLADVTSUPPORT = TEXT('ShellAdvtSupport');
+ {$EXTERNALSYM IPROPNAME_SHELLADVTSUPPORT}
+ IPROPNAME_OLEADVTSUPPORT = TEXT('OLEAdvtSupport');
+ {$EXTERNALSYM IPROPNAME_OLEADVTSUPPORT}
+ IPROPNAME_SYSTEMLANGUAGEID = TEXT('SystemLanguageID');
+ {$EXTERNALSYM IPROPNAME_SYSTEMLANGUAGEID}
+ IPROPNAME_TTCSUPPORT = TEXT('TTCSupport');
+ {$EXTERNALSYM IPROPNAME_TTCSUPPORT}
+ IPROPNAME_TERMSERVER = TEXT('TerminalServer');
+ {$EXTERNALSYM IPROPNAME_TERMSERVER}
+ IPROPNAME_REMOTEADMINTS = TEXT('RemoteAdminTS');
+ {$EXTERNALSYM IPROPNAME_REMOTEADMINTS}
+ IPROPNAME_REDIRECTEDDLLSUPPORT = TEXT('RedirectedDllSupport');
+ {$EXTERNALSYM IPROPNAME_REDIRECTEDDLLSUPPORT}
+ IPROPNAME_NTPRODUCTTYPE = TEXT('MsiNTProductType');
+ {$EXTERNALSYM IPROPNAME_NTPRODUCTTYPE}
+ IPROPNAME_NTSUITEBACKOFFICE = TEXT('MsiNTSuiteBackOffice');
+ {$EXTERNALSYM IPROPNAME_NTSUITEBACKOFFICE}
+ IPROPNAME_NTSUITEDATACENTER = TEXT('MsiNTSuiteDataCenter');
+ {$EXTERNALSYM IPROPNAME_NTSUITEDATACENTER}
+ IPROPNAME_NTSUITEENTERPRISE = TEXT('MsiNTSuiteEnterprise');
+ {$EXTERNALSYM IPROPNAME_NTSUITEENTERPRISE}
+ IPROPNAME_NTSUITESMALLBUSINESS = TEXT('MsiNTSuiteSmallBusiness');
+ {$EXTERNALSYM IPROPNAME_NTSUITESMALLBUSINESS}
+ IPROPNAME_NTSUITESMALLBUSINESSRESTRICTED = TEXT('MsiNTSuiteSmallBusinessRestricted');
+ {$EXTERNALSYM IPROPNAME_NTSUITESMALLBUSINESSRESTRICTED}
+ IPROPNAME_NTSUITEPERSONAL = TEXT('MsiNTSuitePersonal');
+ {$EXTERNALSYM IPROPNAME_NTSUITEPERSONAL}
+ IPROPNAME_NTSUITEWEBSERVER = TEXT('MsiNTSuiteWebServer');
+ {$EXTERNALSYM IPROPNAME_NTSUITEWEBSERVER}
+ IPROPNAME_NETASSEMBLYSUPPORT = TEXT('MsiNetAssemblySupport');
+ {$EXTERNALSYM IPROPNAME_NETASSEMBLYSUPPORT}
+ IPROPNAME_WIN32ASSEMBLYSUPPORT = TEXT('MsiWin32AssemblySupport');
+ {$EXTERNALSYM IPROPNAME_WIN32ASSEMBLYSUPPORT}
+
+// User properties: set by installer at initialization
+
+ IPROPNAME_LOGONUSER = TEXT('LogonUser');
+ {$EXTERNALSYM IPROPNAME_LOGONUSER}
+ IPROPNAME_USERSID = TEXT('UserSID');
+ {$EXTERNALSYM IPROPNAME_USERSID}
+ IPROPNAME_ADMINUSER = TEXT('AdminUser');
+ {$EXTERNALSYM IPROPNAME_ADMINUSER}
+ IPROPNAME_USERLANGUAGEID = TEXT('UserLanguageID');
+ {$EXTERNALSYM IPROPNAME_USERLANGUAGEID}
+ IPROPNAME_PRIVILEGED = TEXT('Privileged');
+ {$EXTERNALSYM IPROPNAME_PRIVILEGED}
+
+// System folder properties: set by installer at initialization
+
+ IPROPNAME_WINDOWS_FOLDER = TEXT('WindowsFolder');
+ {$EXTERNALSYM IPROPNAME_WINDOWS_FOLDER}
+ IPROPNAME_SYSTEM_FOLDER = TEXT('SystemFolder');
+ {$EXTERNALSYM IPROPNAME_SYSTEM_FOLDER}
+ IPROPNAME_SYSTEM16_FOLDER = TEXT('System16Folder');
+ {$EXTERNALSYM IPROPNAME_SYSTEM16_FOLDER}
+ IPROPNAME_WINDOWS_VOLUME = TEXT('WindowsVolume');
+ {$EXTERNALSYM IPROPNAME_WINDOWS_VOLUME}
+ IPROPNAME_TEMP_FOLDER = TEXT('TempFolder');
+ {$EXTERNALSYM IPROPNAME_TEMP_FOLDER}
+ IPROPNAME_PROGRAMFILES_FOLDER = TEXT('ProgramFilesFolder');
+ {$EXTERNALSYM IPROPNAME_PROGRAMFILES_FOLDER}
+ IPROPNAME_COMMONFILES_FOLDER = TEXT('CommonFilesFolder');
+ {$EXTERNALSYM IPROPNAME_COMMONFILES_FOLDER}
+ IPROPNAME_SYSTEM64_FOLDER = TEXT('System64Folder');
+ {$EXTERNALSYM IPROPNAME_SYSTEM64_FOLDER}
+ IPROPNAME_PROGRAMFILES64_FOLDER = TEXT('ProgramFiles64Folder');
+ {$EXTERNALSYM IPROPNAME_PROGRAMFILES64_FOLDER}
+ IPROPNAME_COMMONFILES64_FOLDER = TEXT('CommonFiles64Folder');
+ {$EXTERNALSYM IPROPNAME_COMMONFILES64_FOLDER}
+ IPROPNAME_STARTMENU_FOLDER = TEXT('StartMenuFolder');
+ {$EXTERNALSYM IPROPNAME_STARTMENU_FOLDER}
+ IPROPNAME_PROGRAMMENU_FOLDER = TEXT('ProgramMenuFolder');
+ {$EXTERNALSYM IPROPNAME_PROGRAMMENU_FOLDER}
+ IPROPNAME_STARTUP_FOLDER = TEXT('StartupFolder');
+ {$EXTERNALSYM IPROPNAME_STARTUP_FOLDER}
+ IPROPNAME_NETHOOD_FOLDER = TEXT('NetHoodFolder');
+ {$EXTERNALSYM IPROPNAME_NETHOOD_FOLDER}
+ IPROPNAME_PERSONAL_FOLDER = TEXT('PersonalFolder');
+ {$EXTERNALSYM IPROPNAME_PERSONAL_FOLDER}
+ IPROPNAME_SENDTO_FOLDER = TEXT('SendToFolder');
+ {$EXTERNALSYM IPROPNAME_SENDTO_FOLDER}
+ IPROPNAME_DESKTOP_FOLDER = TEXT('DesktopFolder');
+ {$EXTERNALSYM IPROPNAME_DESKTOP_FOLDER}
+ IPROPNAME_TEMPLATE_FOLDER = TEXT('TemplateFolder');
+ {$EXTERNALSYM IPROPNAME_TEMPLATE_FOLDER}
+ IPROPNAME_FONTS_FOLDER = TEXT('FontsFolder');
+ {$EXTERNALSYM IPROPNAME_FONTS_FOLDER}
+ IPROPNAME_FAVORITES_FOLDER = TEXT('FavoritesFolder');
+ {$EXTERNALSYM IPROPNAME_FAVORITES_FOLDER}
+ IPROPNAME_RECENT_FOLDER = TEXT('RecentFolder');
+ {$EXTERNALSYM IPROPNAME_RECENT_FOLDER}
+ IPROPNAME_APPDATA_FOLDER = TEXT('AppDataFolder');
+ {$EXTERNALSYM IPROPNAME_APPDATA_FOLDER}
+ IPROPNAME_PRINTHOOD_FOLDER = TEXT('PrintHoodFolder');
+ {$EXTERNALSYM IPROPNAME_PRINTHOOD_FOLDER}
+ IPROPNAME_ADMINTOOLS_FOLDER = TEXT('AdminToolsFolder');
+ {$EXTERNALSYM IPROPNAME_ADMINTOOLS_FOLDER}
+ IPROPNAME_COMMONAPPDATA_FOLDER = TEXT('CommonAppDataFolder');
+ {$EXTERNALSYM IPROPNAME_COMMONAPPDATA_FOLDER}
+ IPROPNAME_LOCALAPPDATA_FOLDER = TEXT('LocalAppDataFolder');
+ {$EXTERNALSYM IPROPNAME_LOCALAPPDATA_FOLDER}
+ IPROPNAME_MYPICTURES_FOLDER = TEXT('MyPicturesFolder');
+ {$EXTERNALSYM IPROPNAME_MYPICTURES_FOLDER}
+
+// Feature/Component installation properties: set on command-line
+
+ IPROPNAME_FEATUREADDLOCAL = TEXT('ADDLOCAL');
+ {$EXTERNALSYM IPROPNAME_FEATUREADDLOCAL}
+ IPROPNAME_FEATUREADDSOURCE = TEXT('ADDSOURCE');
+ {$EXTERNALSYM IPROPNAME_FEATUREADDSOURCE}
+ IPROPNAME_FEATUREADDDEFAULT = TEXT('ADDDEFAULT');
+ {$EXTERNALSYM IPROPNAME_FEATUREADDDEFAULT}
+ IPROPNAME_FEATUREREMOVE = TEXT('REMOVE');
+ {$EXTERNALSYM IPROPNAME_FEATUREREMOVE}
+ IPROPNAME_FEATUREADVERTISE = TEXT('ADVERTISE');
+ {$EXTERNALSYM IPROPNAME_FEATUREADVERTISE}
+ IPROPVALUE_FEATURE_ALL = TEXT('ALL');
+ {$EXTERNALSYM IPROPVALUE_FEATURE_ALL}
+
+ IPROPNAME_COMPONENTADDLOCAL = TEXT('COMPADDLOCAL');
+ {$EXTERNALSYM IPROPNAME_COMPONENTADDLOCAL}
+ IPROPNAME_COMPONENTADDSOURCE = TEXT('COMPADDSOURCE');
+ {$EXTERNALSYM IPROPNAME_COMPONENTADDSOURCE}
+ IPROPNAME_COMPONENTADDDEFAULT = TEXT('COMPADDDEFAULT');
+ {$EXTERNALSYM IPROPNAME_COMPONENTADDDEFAULT}
+
+ IPROPNAME_FILEADDLOCAL = TEXT('FILEADDLOCAL');
+ {$EXTERNALSYM IPROPNAME_FILEADDLOCAL}
+ IPROPNAME_FILEADDSOURCE = TEXT('FILEADDSOURCE');
+ {$EXTERNALSYM IPROPNAME_FILEADDSOURCE}
+ IPROPNAME_FILEADDDEFAULT = TEXT('FILEADDDEFAULT');
+ {$EXTERNALSYM IPROPNAME_FILEADDDEFAULT}
+
+ IPROPNAME_REINSTALL = TEXT('REINSTALL');
+ {$EXTERNALSYM IPROPNAME_REINSTALL}
+ IPROPNAME_REINSTALLMODE = TEXT('REINSTALLMODE');
+ {$EXTERNALSYM IPROPNAME_REINSTALLMODE}
+ IPROPNAME_PROMPTROLLBACKCOST = TEXT('PROMPTROLLBACKCOST');
+ {$EXTERNALSYM IPROPNAME_PROMPTROLLBACKCOST}
+ IPROPVALUE_RBCOST_PROMPT = TEXT('P');
+ {$EXTERNALSYM IPROPVALUE_RBCOST_PROMPT}
+ IPROPVALUE_RBCOST_SILENT = TEXT('D');
+ {$EXTERNALSYM IPROPVALUE_RBCOST_SILENT}
+ IPROPVALUE_RBCOST_FAIL = TEXT('F');
+ {$EXTERNALSYM IPROPVALUE_RBCOST_FAIL}
+
+// Property for custom actions to communicate
+
+ IPROPNAME_CUSTOMACTIONDATA = TEXT('CustomActionData');
+ {$EXTERNALSYM IPROPNAME_CUSTOMACTIONDATA}
+
+//------------------------------------------------------------------------------
+// TOP-LEVEL ACTION NAMES
+//------------------------------------------------------------------------------
+
+ IACTIONNAME_INSTALL = TEXT('INSTALL');
+ {$EXTERNALSYM IACTIONNAME_INSTALL}
+ IACTIONNAME_ADVERTISE = TEXT('ADVERTISE');
+ {$EXTERNALSYM IACTIONNAME_ADVERTISE}
+ IACTIONNAME_ADMIN = TEXT('ADMIN');
+ {$EXTERNALSYM IACTIONNAME_ADMIN}
+ IACTIONNAME_SEQUENCE = TEXT('SEQUENCE');
+ {$EXTERNALSYM IACTIONNAME_SEQUENCE}
+ IACTIONNAME_COLLECTUSERINFO = TEXT('CollectUserInfo');
+ {$EXTERNALSYM IACTIONNAME_COLLECTUSERINFO}
+ IACTIONNAME_FIRSTRUN = TEXT('FirstRun');
+ {$EXTERNALSYM IACTIONNAME_FIRSTRUN}
+
+//------------------------------------------------------------------------------
+// SummaryInformation property stream property IDs
+//------------------------------------------------------------------------------
+
+// standard property definitions, from OLE2 documentation
+
+ PID_DICTIONARY = 0; // integer count + array of entries
+ {$EXTERNALSYM PID_DICTIONARY}
+ PID_CODEPAGE = 1; // short integer
+ {$EXTERNALSYM PID_CODEPAGE}
+ PID_TITLE = 2; // string
+ {$EXTERNALSYM PID_TITLE}
+ PID_SUBJECT = 3; // string
+ {$EXTERNALSYM PID_SUBJECT}
+ PID_AUTHOR = 4; // string
+ {$EXTERNALSYM PID_AUTHOR}
+ PID_KEYWORDS = 5; // string
+ {$EXTERNALSYM PID_KEYWORDS}
+ PID_COMMENTS = 6; // string
+ {$EXTERNALSYM PID_COMMENTS}
+ PID_TEMPLATE = 7; // string
+ {$EXTERNALSYM PID_TEMPLATE}
+ PID_LASTAUTHOR = 8; // string
+ {$EXTERNALSYM PID_LASTAUTHOR}
+ PID_REVNUMBER = 9; // string
+ {$EXTERNALSYM PID_REVNUMBER}
+ PID_EDITTIME = 10; // datatime
+ {$EXTERNALSYM PID_EDITTIME}
+ PID_LASTPRINTED = 11; // datetime
+ {$EXTERNALSYM PID_LASTPRINTED}
+ PID_CREATE_DTM = 12; // datetime
+ {$EXTERNALSYM PID_CREATE_DTM}
+ PID_LASTSAVE_DTM = 13; // datetime
+ {$EXTERNALSYM PID_LASTSAVE_DTM}
+ PID_PAGECOUNT = 14; // integer
+ {$EXTERNALSYM PID_PAGECOUNT}
+ PID_WORDCOUNT = 15; // integer
+ {$EXTERNALSYM PID_WORDCOUNT}
+ PID_CHARCOUNT = 16; // integer
+ {$EXTERNALSYM PID_CHARCOUNT}
+ PID_THUMBNAIL = 17; // clipboard format + metafile/bitmap (not supported)
+ {$EXTERNALSYM PID_THUMBNAIL}
+ PID_APPNAME = 18; // string
+ {$EXTERNALSYM PID_APPNAME}
+ PID_SECURITY = 19; // integer
+ {$EXTERNALSYM PID_SECURITY}
+
+// PIDs given specific meanings for Installer
+
+ PID_MSIVERSION = PID_PAGECOUNT; // integer, Installer version number (major*100+minor)
+ {$EXTERNALSYM PID_MSIVERSION}
+ PID_MSISOURCE = PID_WORDCOUNT; // integer, type of file image, short/long, media/tree
+ {$EXTERNALSYM PID_MSISOURCE}
+ PID_MSIRESTRICT = PID_CHARCOUNT; // integer, transform restrictions
+ {$EXTERNALSYM PID_MSIRESTRICT}
+
+//------------------------------------------------------------------------------
+// INSTALLER DATABASE INTEGER COLUMN DEFINITIONS
+//------------------------------------------------------------------------------
+
+// BBControl.Attributes
+// Control.Attributes
+
+type
+ msidbControlAttributes = DWORD;
+ {$EXTERNALSYM msidbControlAttributes}
+
+const
+ msidbControlAttributesVisible = $00000001;
+ {$EXTERNALSYM msidbControlAttributesVisible}
+ msidbControlAttributesEnabled = $00000002;
+ {$EXTERNALSYM msidbControlAttributesEnabled}
+ msidbControlAttributesSunken = $00000004;
+ {$EXTERNALSYM msidbControlAttributesSunken}
+ msidbControlAttributesIndirect = $00000008;
+ {$EXTERNALSYM msidbControlAttributesIndirect}
+ msidbControlAttributesInteger = $00000010;
+ {$EXTERNALSYM msidbControlAttributesInteger}
+ msidbControlAttributesRTLRO = $00000020;
+ {$EXTERNALSYM msidbControlAttributesRTLRO}
+ msidbControlAttributesRightAligned = $00000040;
+ {$EXTERNALSYM msidbControlAttributesRightAligned}
+ msidbControlAttributesLeftScroll = $00000080;
+ {$EXTERNALSYM msidbControlAttributesLeftScroll}
+ msidbControlAttributesBiDi = msidbControlAttributesRTLRO or
+ msidbControlAttributesRightAligned or msidbControlAttributesLeftScroll;
+ {$EXTERNALSYM msidbControlAttributesBiDi}
+
+ // Text controls
+
+ msidbControlAttributesTransparent = $00010000;
+ {$EXTERNALSYM msidbControlAttributesTransparent}
+ msidbControlAttributesNoPrefix = $00020000;
+ {$EXTERNALSYM msidbControlAttributesNoPrefix}
+ msidbControlAttributesNoWrap = $00040000;
+ {$EXTERNALSYM msidbControlAttributesNoWrap}
+ msidbControlAttributesFormatSize = $00080000;
+ {$EXTERNALSYM msidbControlAttributesFormatSize}
+ msidbControlAttributesUsersLanguage = $00100000;
+ {$EXTERNALSYM msidbControlAttributesUsersLanguage}
+
+ // Edit controls
+
+ msidbControlAttributesMultiline = $00010000;
+ {$EXTERNALSYM msidbControlAttributesMultiline}
+ msidbControlAttributesPasswordInput = $00200000;
+ {$EXTERNALSYM msidbControlAttributesPasswordInput}
+
+ // ProgressBar controls
+
+ msidbControlAttributesProgress95 = $00010000;
+ {$EXTERNALSYM msidbControlAttributesProgress95}
+
+ // VolumeSelectCombo and DirectoryCombo controls
+
+ msidbControlAttributesRemovableVolume = $00010000;
+ {$EXTERNALSYM msidbControlAttributesRemovableVolume}
+ msidbControlAttributesFixedVolume = $00020000;
+ {$EXTERNALSYM msidbControlAttributesFixedVolume}
+ msidbControlAttributesRemoteVolume = $00040000;
+ {$EXTERNALSYM msidbControlAttributesRemoteVolume}
+ msidbControlAttributesCDROMVolume = $00080000;
+ {$EXTERNALSYM msidbControlAttributesCDROMVolume}
+ msidbControlAttributesRAMDiskVolume = $00100000;
+ {$EXTERNALSYM msidbControlAttributesRAMDiskVolume}
+ msidbControlAttributesFloppyVolume = $00200000;
+ {$EXTERNALSYM msidbControlAttributesFloppyVolume}
+
+ // VolumeCostList controls
+
+ msidbControlShowRollbackCost = $00400000;
+ {$EXTERNALSYM msidbControlShowRollbackCost}
+
+ // ListBox and ComboBox controls
+
+ msidbControlAttributesSorted = $00010000;
+ {$EXTERNALSYM msidbControlAttributesSorted}
+ msidbControlAttributesComboList = $00020000;
+ {$EXTERNALSYM msidbControlAttributesComboList}
+
+ // picture button controls
+
+ msidbControlAttributesImageHandle = $00010000;
+ {$EXTERNALSYM msidbControlAttributesImageHandle}
+ msidbControlAttributesPushLike = $00020000;
+ {$EXTERNALSYM msidbControlAttributesPushLike}
+ msidbControlAttributesBitmap = $00040000;
+ {$EXTERNALSYM msidbControlAttributesBitmap}
+ msidbControlAttributesIcon = $00080000;
+ {$EXTERNALSYM msidbControlAttributesIcon}
+ msidbControlAttributesFixedSize = $00100000;
+ {$EXTERNALSYM msidbControlAttributesFixedSize}
+ msidbControlAttributesIconSize16 = $00200000;
+ {$EXTERNALSYM msidbControlAttributesIconSize16}
+ msidbControlAttributesIconSize32 = $00400000;
+ {$EXTERNALSYM msidbControlAttributesIconSize32}
+ msidbControlAttributesIconSize48 = $00600000;
+ {$EXTERNALSYM msidbControlAttributesIconSize48}
+
+ // RadioButton controls
+
+ msidbControlAttributesHasBorder = $01000000;
+ {$EXTERNALSYM msidbControlAttributesHasBorder}
+
+// CompLocator.Type
+// IniLocator.Type
+// RegLocator.Type
+
+type
+ msidbLocatorType = DWORD;
+ {$EXTERNALSYM msidbLocatorType}
+
+const
+ msidbLocatorTypeDirectory = $00000000;
+ {$EXTERNALSYM msidbLocatorTypeDirectory}
+ msidbLocatorTypeFileName = $00000001;
+ {$EXTERNALSYM msidbLocatorTypeFileName}
+ msidbLocatorTypeRawValue = $00000002;
+ {$EXTERNALSYM msidbLocatorTypeRawValue}
+ msidbLocatorType64bit = $00000010;
+ {$EXTERNALSYM msidbLocatorType64bit}
+
+// Component.Attributes
+
+type
+ msidbComponentAttributes = DWORD;
+ {$EXTERNALSYM msidbComponentAttributes}
+
+const
+ msidbComponentAttributesLocalOnly = $00000000;
+ {$EXTERNALSYM msidbComponentAttributesLocalOnly}
+ msidbComponentAttributesSourceOnly = $00000001;
+ {$EXTERNALSYM msidbComponentAttributesSourceOnly}
+ msidbComponentAttributesOptional = $00000002; // local or source
+ {$EXTERNALSYM msidbComponentAttributesOptional}
+ msidbComponentAttributesRegistryKeyPath = $00000004; // KeyPath is key to Registry table
+ {$EXTERNALSYM msidbComponentAttributesRegistryKeyPath}
+ msidbComponentAttributesSharedDllRefCount = $00000008; // increment SharedDll count
+ {$EXTERNALSYM msidbComponentAttributesSharedDllRefCount}
+ msidbComponentAttributesPermanent = $00000010; // never uninstall component
+ {$EXTERNALSYM msidbComponentAttributesPermanent}
+ msidbComponentAttributesODBCDataSource = $00000020; // KeyFile is key to ODBCDataSource table
+ {$EXTERNALSYM msidbComponentAttributesODBCDataSource}
+ msidbComponentAttributesTransitive = $00000040; // Can transition to/from installed/uninstalled based on changing conditional
+ {$EXTERNALSYM msidbComponentAttributesTransitive}
+ msidbComponentAttributesNeverOverwrite = $00000080; // dont stomp over existing component if key path exists (file/ regkey)
+ {$EXTERNALSYM msidbComponentAttributesNeverOverwrite}
+ msidbComponentAttributes64bit = $00000100; // designates a 64-bit component; 32-bit if missing.
+ {$EXTERNALSYM msidbComponentAttributes64bit}
+
+// Assembly.Attributes
+
+type
+ msidbAssemblyAttributes = DWORD;
+ {$EXTERNALSYM msidbAssemblyAttributes}
+
+const
+ msidbAssemblyAttributesURT = $00000000;
+ {$EXTERNALSYM msidbAssemblyAttributesURT}
+ msidbAssemblyAttributesWin32 = $00000001;
+ {$EXTERNALSYM msidbAssemblyAttributesWin32}
+
+// CustomAction.Type
+
+type
+ msidbCustomActionType = DWORD;
+ {$EXTERNALSYM msidbCustomActionType}
+
+const
+
+ // executable types
+
+ msidbCustomActionTypeDll = $00000001; // Target = entry point name
+ {$EXTERNALSYM msidbCustomActionTypeDll}
+ msidbCustomActionTypeExe = $00000002; // Target = command line args
+ {$EXTERNALSYM msidbCustomActionTypeExe}
+ msidbCustomActionTypeTextData = $00000003; // Target = text string to be formatted and set into property
+ {$EXTERNALSYM msidbCustomActionTypeTextData}
+ msidbCustomActionTypeJScript = $00000005; // Target = entry point name, null if none to call
+ {$EXTERNALSYM msidbCustomActionTypeJScript}
+ msidbCustomActionTypeVBScript = $00000006; // Target = entry point name, null if none to call
+ {$EXTERNALSYM msidbCustomActionTypeVBScript}
+ msidbCustomActionTypeInstall = $00000007; // Target = property list for nested engine initialization
+ {$EXTERNALSYM msidbCustomActionTypeInstall}
+
+ // source of code
+
+ msidbCustomActionTypeBinaryData = $00000000; // Source = Binary.Name, data stored in stream
+ {$EXTERNALSYM msidbCustomActionTypeBinaryData}
+ msidbCustomActionTypeSourceFile = $00000010; // Source = File.File, file part of installation
+ {$EXTERNALSYM msidbCustomActionTypeSourceFile}
+ msidbCustomActionTypeDirectory = $00000020; // Source = Directory.Directory, folder containing existing file
+ {$EXTERNALSYM msidbCustomActionTypeDirectory}
+ msidbCustomActionTypeProperty = $00000030; // Source = Property.Property, full path to executable
+ {$EXTERNALSYM msidbCustomActionTypeProperty}
+
+ // return processing // default is syncronous execution, process return code
+
+ msidbCustomActionTypeContinue = $00000040; // ignore action return status, continue running
+ {$EXTERNALSYM msidbCustomActionTypeContinue}
+ msidbCustomActionTypeAsync = $00000080; // run asynchronously
+ {$EXTERNALSYM msidbCustomActionTypeAsync}
+
+ // execution scheduling flags // default is execute whenever sequenced
+
+ msidbCustomActionTypeFirstSequence = $00000100; // skip if UI sequence already run
+ {$EXTERNALSYM msidbCustomActionTypeFirstSequence}
+ msidbCustomActionTypeOncePerProcess = $00000200; // skip if UI sequence already run in same process
+ {$EXTERNALSYM msidbCustomActionTypeOncePerProcess}
+ msidbCustomActionTypeClientRepeat = $00000300; // run on client only if UI already run on client
+ {$EXTERNALSYM msidbCustomActionTypeClientRepeat}
+ msidbCustomActionTypeInScript = $00000400; // queue for execution within script
+ {$EXTERNALSYM msidbCustomActionTypeInScript}
+ msidbCustomActionTypeRollback = $00000100; // in conjunction with InScript: queue in Rollback script
+ {$EXTERNALSYM msidbCustomActionTypeRollback}
+ msidbCustomActionTypeCommit = $00000200; // in conjunction with InScript: run Commit ops from script on success
+ {$EXTERNALSYM msidbCustomActionTypeCommit}
+
+ // security context flag, default to impersonate as user, valid only if InScript
+
+ msidbCustomActionTypeNoImpersonate = $00000800; // no impersonation, run in system context
+ {$EXTERNALSYM msidbCustomActionTypeNoImpersonate}
+
+//#if (_WIN32_MSI >= 150)
+ msidbCustomActionTypeTSAware = $00004000; // impersonate for per-machine installs on TS machines
+ {$EXTERNALSYM msidbCustomActionTypeTSAware}
+//#endif // (_WIN32_MSI >= 150)
+
+ // script requires 64bit process
+ msidbCustomActionType64BitScript = $00001000; // script should run in 64bit process
+ {$EXTERNALSYM msidbCustomActionType64BitScript}
+
+ // don't record the contents of the Target field in the log file.
+ msidbCustomActionTypeHideTarget = $00002000;
+ {$EXTERNALSYM msidbCustomActionTypeHideTarget}
+
+// Dialog.Attributes
+
+type
+ msidbDialogAttributes = DWORD;
+ {$EXTERNALSYM msidbDialogAttributes}
+
+const
+ msidbDialogAttributesVisible = $00000001;
+ {$EXTERNALSYM msidbDialogAttributesVisible}
+ msidbDialogAttributesModal = $00000002;
+ {$EXTERNALSYM msidbDialogAttributesModal}
+ msidbDialogAttributesMinimize = $00000004;
+ {$EXTERNALSYM msidbDialogAttributesMinimize}
+ msidbDialogAttributesSysModal = $00000008;
+ {$EXTERNALSYM msidbDialogAttributesSysModal}
+ msidbDialogAttributesKeepModeless = $00000010;
+ {$EXTERNALSYM msidbDialogAttributesKeepModeless}
+ msidbDialogAttributesTrackDiskSpace = $00000020;
+ {$EXTERNALSYM msidbDialogAttributesTrackDiskSpace}
+ msidbDialogAttributesUseCustomPalette = $00000040;
+ {$EXTERNALSYM msidbDialogAttributesUseCustomPalette}
+ msidbDialogAttributesRTLRO = $00000080;
+ {$EXTERNALSYM msidbDialogAttributesRTLRO}
+ msidbDialogAttributesRightAligned = $00000100;
+ {$EXTERNALSYM msidbDialogAttributesRightAligned}
+ msidbDialogAttributesLeftScroll = $00000200;
+ {$EXTERNALSYM msidbDialogAttributesLeftScroll}
+ msidbDialogAttributesBiDi = msidbDialogAttributesRTLRO or
+ msidbDialogAttributesRightAligned or msidbDialogAttributesLeftScroll;
+ {$EXTERNALSYM msidbDialogAttributesBiDi}
+ msidbDialogAttributesError = $00010000;
+ {$EXTERNALSYM msidbDialogAttributesError}
+
+// Feature.Attributes
+
+type
+ msidbFeatureAttributes = DWORD;
+ {$EXTERNALSYM msidbFeatureAttributes}
+
+const
+ msidbFeatureAttributesFavorLocal = $00000000;
+ {$EXTERNALSYM msidbFeatureAttributesFavorLocal}
+ msidbFeatureAttributesFavorSource = $00000001;
+ {$EXTERNALSYM msidbFeatureAttributesFavorSource}
+ msidbFeatureAttributesFollowParent = $00000002;
+ {$EXTERNALSYM msidbFeatureAttributesFollowParent}
+ msidbFeatureAttributesFavorAdvertise = $00000004;
+ {$EXTERNALSYM msidbFeatureAttributesFavorAdvertise}
+ msidbFeatureAttributesDisallowAdvertise = $00000008;
+ {$EXTERNALSYM msidbFeatureAttributesDisallowAdvertise}
+ msidbFeatureAttributesUIDisallowAbsent = $00000010;
+ {$EXTERNALSYM msidbFeatureAttributesUIDisallowAbsent}
+ msidbFeatureAttributesNoUnsupportedAdvertise = $00000020;
+ {$EXTERNALSYM msidbFeatureAttributesNoUnsupportedAdvertise}
+
+// File.Attributes
+
+type
+ msidbFileAttributes = DWORD;
+ {$EXTERNALSYM msidbFileAttributes}
+
+const
+ msidbFileAttributesReadOnly = $00000001;
+ {$EXTERNALSYM msidbFileAttributesReadOnly}
+ msidbFileAttributesHidden = $00000002;
+ {$EXTERNALSYM msidbFileAttributesHidden}
+ msidbFileAttributesSystem = $00000004;
+ {$EXTERNALSYM msidbFileAttributesSystem}
+ msidbFileAttributesReserved0 = $00000008; // Internal use only - must be 0
+ {$EXTERNALSYM msidbFileAttributesReserved0}
+ msidbFileAttributesReserved1 = $00000040; // Internal use only - must be 0
+ {$EXTERNALSYM msidbFileAttributesReserved1}
+ msidbFileAttributesReserved2 = $00000080; // Internal use only - must be 0
+ {$EXTERNALSYM msidbFileAttributesReserved2}
+ msidbFileAttributesReserved3 = $00000100; // Internal use only - must be 0
+ {$EXTERNALSYM msidbFileAttributesReserved3}
+ msidbFileAttributesVital = $00000200;
+ {$EXTERNALSYM msidbFileAttributesVital}
+ msidbFileAttributesChecksum = $00000400;
+ {$EXTERNALSYM msidbFileAttributesChecksum}
+ msidbFileAttributesPatchAdded = $00001000; // Internal use only - set by patches
+ {$EXTERNALSYM msidbFileAttributesPatchAdded}
+ msidbFileAttributesNoncompressed = $00002000;
+ {$EXTERNALSYM msidbFileAttributesNoncompressed}
+ msidbFileAttributesCompressed = $00004000;
+ {$EXTERNALSYM msidbFileAttributesCompressed}
+ msidbFileAttributesReserved4 = $00008000; // Internal use only - must be 0
+ {$EXTERNALSYM msidbFileAttributesReserved4}
+
+// IniFile.Action
+// RemoveIniFile.Action
+
+type
+ msidbIniFileAction = DWORD;
+ {$EXTERNALSYM msidbIniFileAction}
+
+const
+ msidbIniFileActionAddLine = $00000000;
+ {$EXTERNALSYM msidbIniFileActionAddLine}
+ msidbIniFileActionCreateLine = $00000001;
+ {$EXTERNALSYM msidbIniFileActionCreateLine}
+ msidbIniFileActionRemoveLine = $00000002;
+ {$EXTERNALSYM msidbIniFileActionRemoveLine}
+ msidbIniFileActionAddTag = $00000003;
+ {$EXTERNALSYM msidbIniFileActionAddTag}
+ msidbIniFileActionRemoveTag = $00000004;
+ {$EXTERNALSYM msidbIniFileActionRemoveTag}
+
+// MoveFile.Options
+
+type
+ msidbMoveFileOptions = DWORD;
+ {$EXTERNALSYM msidbMoveFileOptions}
+
+const
+ msidbMoveFileOptionsMove = $00000001;
+ {$EXTERNALSYM msidbMoveFileOptionsMove}
+
+// ODBCDataSource.Registration
+
+type
+ msidbODBCDataSourceRegistration = DWORD;
+ {$EXTERNALSYM msidbODBCDataSourceRegistration}
+
+const
+ msidbODBCDataSourceRegistrationPerMachine = $00000000;
+ {$EXTERNALSYM msidbODBCDataSourceRegistrationPerMachine}
+ msidbODBCDataSourceRegistrationPerUser = $00000001;
+ {$EXTERNALSYM msidbODBCDataSourceRegistrationPerUser}
+
+// Class.Attributes
+
+type
+ msidbClassAttributes = DWORD;
+ {$EXTERNALSYM msidbClassAttributes}
+
+const
+ msidbClassAttributesRelativePath = $00000001;
+ {$EXTERNALSYM msidbClassAttributesRelativePath}
+
+// Patch.Attributes
+
+type
+ msidbPatchAttributes = DWORD;
+ {$EXTERNALSYM msidbPatchAttributes}
+
+const
+ msidbPatchAttributesNonVital = $00000001;
+ {$EXTERNALSYM msidbPatchAttributesNonVital}
+
+// Registry.Root
+// RegLocator.Root
+// RemoveRegistry.Root
+
+type
+ msidbRegistryRoot = DWORD;
+ {$EXTERNALSYM msidbRegistryRoot}
+
+const
+ msidbRegistryRootClassesRoot = 0;
+ {$EXTERNALSYM msidbRegistryRootClassesRoot}
+ msidbRegistryRootCurrentUser = 1;
+ {$EXTERNALSYM msidbRegistryRootCurrentUser}
+ msidbRegistryRootLocalMachine = 2;
+ {$EXTERNALSYM msidbRegistryRootLocalMachine}
+ msidbRegistryRootUsers = 3;
+ {$EXTERNALSYM msidbRegistryRootUsers}
+
+// RemoveFile.InstallMode
+
+type
+ msidbRemoveFileInstallMode = DWORD;
+ {$EXTERNALSYM msidbRemoveFileInstallMode}
+
+const
+ msidbRemoveFileInstallModeOnInstall = $00000001;
+ {$EXTERNALSYM msidbRemoveFileInstallModeOnInstall}
+ msidbRemoveFileInstallModeOnRemove = $00000002;
+ {$EXTERNALSYM msidbRemoveFileInstallModeOnRemove}
+ msidbRemoveFileInstallModeOnBoth = $00000003;
+ {$EXTERNALSYM msidbRemoveFileInstallModeOnBoth}
+
+// ServiceControl.Event
+
+type
+ msidbServiceControlEvent = DWORD;
+ {$EXTERNALSYM msidbServiceControlEvent}
+
+const
+ msidbServiceControlEventStart = $00000001;
+ {$EXTERNALSYM msidbServiceControlEventStart}
+ msidbServiceControlEventStop = $00000002;
+ {$EXTERNALSYM msidbServiceControlEventStop}
+ msidbServiceControlEventDelete = $00000008;
+ {$EXTERNALSYM msidbServiceControlEventDelete}
+ msidbServiceControlEventUninstallStart = $00000010;
+ {$EXTERNALSYM msidbServiceControlEventUninstallStart}
+ msidbServiceControlEventUninstallStop = $00000020;
+ {$EXTERNALSYM msidbServiceControlEventUninstallStop}
+ msidbServiceControlEventUninstallDelete = $00000080;
+ {$EXTERNALSYM msidbServiceControlEventUninstallDelete}
+
+// ServiceInstall.ErrorControl
+
+type
+ msidbServiceInstallErrorControl = DWORD;
+ {$EXTERNALSYM msidbServiceInstallErrorControl}
+
+const
+ msidbServiceInstallErrorControlVital = $00008000;
+ {$EXTERNALSYM msidbServiceInstallErrorControlVital}
+
+// TextStyle.StyleBits
+
+type
+ msidbTextStyleStyleBits = DWORD;
+ {$EXTERNALSYM msidbTextStyleStyleBits}
+
+const
+ msidbTextStyleStyleBitsBold = $00000001;
+ {$EXTERNALSYM msidbTextStyleStyleBitsBold}
+ msidbTextStyleStyleBitsItalic = $00000002;
+ {$EXTERNALSYM msidbTextStyleStyleBitsItalic}
+ msidbTextStyleStyleBitsUnderline = $00000004;
+ {$EXTERNALSYM msidbTextStyleStyleBitsUnderline}
+ msidbTextStyleStyleBitsStrike = $00000008;
+ {$EXTERNALSYM msidbTextStyleStyleBitsStrike}
+
+// Upgrade.Attributes
+
+type
+ msidbUpgradeAttributes = DWORD;
+ {$EXTERNALSYM msidbUpgradeAttributes}
+
+const
+ msidbUpgradeAttributesMigrateFeatures = $00000001;
+ {$EXTERNALSYM msidbUpgradeAttributesMigrateFeatures}
+ msidbUpgradeAttributesOnlyDetect = $00000002;
+ {$EXTERNALSYM msidbUpgradeAttributesOnlyDetect}
+ msidbUpgradeAttributesIgnoreRemoveFailure = $00000004;
+ {$EXTERNALSYM msidbUpgradeAttributesIgnoreRemoveFailure}
+ msidbUpgradeAttributesVersionMinInclusive = $00000100;
+ {$EXTERNALSYM msidbUpgradeAttributesVersionMinInclusive}
+ msidbUpgradeAttributesVersionMaxInclusive = $00000200;
+ {$EXTERNALSYM msidbUpgradeAttributesVersionMaxInclusive}
+ msidbUpgradeAttributesLanguagesExclusive = $00000400;
+ {$EXTERNALSYM msidbUpgradeAttributesLanguagesExclusive}
+
+//------------------------------------------------------------------------------
+// SUMMARY INFORMATION PROPERTY DEFINITIONS
+//------------------------------------------------------------------------------
+
+type
+ msidbSumInfoSourceType = DWORD;
+ {$EXTERNALSYM msidbSumInfoSourceType}
+
+const
+ msidbSumInfoSourceTypeSFN = $00000001; // source uses short filenames
+ {$EXTERNALSYM msidbSumInfoSourceTypeSFN}
+ msidbSumInfoSourceTypeCompressed = $00000002; // source is compressed
+ {$EXTERNALSYM msidbSumInfoSourceTypeCompressed}
+ msidbSumInfoSourceTypeAdminImage = $00000004; // source is an admin image
+ {$EXTERNALSYM msidbSumInfoSourceTypeAdminImage}
+
+implementation
+
+end.
diff --git a/packages/extra/winunits/jwamsiquery.pas b/packages/extra/winunits/jwamsiquery.pas
index 5bb7b3540f..fddae985fe 100644
--- a/packages/extra/winunits/jwamsiquery.pas
+++ b/packages/extra/winunits/jwamsiquery.pas
@@ -1,2956 +1,2956 @@
-{******************************************************************************}
-{ }
-{ Windows Installer API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: msiquery.h, released June 2000. The original Pascal }
-{ code is: MsiQuery.pas, released June 2001. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwamsiquery.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaMsiQuery;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "msiquery.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaMsi, JwaWinBase, JwaWinType;
-
-(*****************************************************************************\
-* *
-* MsiQuery.h - Interface to running installer for custom actions and tools *
-* *
-* Version 1.0 - 1.2 *
-* *
-* NOTES: All buffers sizes are TCHAR count, null included only on input *
-* Return argument pointers may be null if not interested in value *
-* Returned handles of all types must be closed: MsiCloseHandle(h) *
-* Functions with UINT return type return a system error code *
-* Designated functions will set or clear the last error record, *
-* which is then accessible with MsiGetLastErrorRecord. However, *
-* the following argument errors do not register an error record: *
-* ERROR_INVALID_HANDLE, ERROR_INVALID_PARAMETER, ERROR_MORE_DATA. *
-* *
-* Copyright (c) 1999-2000, Microsoft Corp. All rights reserved. *
-* *
-\*****************************************************************************)
-
-const
- MSI_NULL_INTEGER = DWORD($80000000); // integer value reserved for null
- {$EXTERNALSYM MSI_NULL_INTEGER}
-
-// MsiOpenDatabase persist predefine values, otherwise output database path is used
-
- MSIDBOPEN_READONLY = LPCTSTR(0); // database open read-only, no persistent changes
- {$EXTERNALSYM MSIDBOPEN_READONLY}
- MSIDBOPEN_TRANSACT = LPCTSTR(1); // database read/write in transaction mode
- {$EXTERNALSYM MSIDBOPEN_TRANSACT}
- MSIDBOPEN_DIRECT = LPCTSTR(2); // database direct read/write without transaction
- {$EXTERNALSYM MSIDBOPEN_DIRECT}
- MSIDBOPEN_CREATE = LPCTSTR(3); // create new database, transact mode read/write
- {$EXTERNALSYM MSIDBOPEN_CREATE}
- MSIDBOPEN_CREATEDIRECT = LPCTSTR(4); // create new database, direct mode read/write
- {$EXTERNALSYM MSIDBOPEN_CREATEDIRECT}
-
- MSIDBOPEN_PATCHFILE = 32 div SizeOf(TCHAR); // add flag to indicate patch file
-
- MSIDBSTATE_ERROR = DWORD(-1); // invalid database handle
- {$EXTERNALSYM MSIDBSTATE_ERROR}
- MSIDBSTATE_READ = 0; // database open read-only, no persistent changes
- {$EXTERNALSYM MSIDBSTATE_READ}
- MSIDBSTATE_WRITE = 1; // database readable and updatable
- {$EXTERNALSYM MSIDBSTATE_WRITE}
-
-type
- MSIDBSTATE = DWORD;
- {$EXTERNALSYM MSIDBSTATE}
- TMsiDbState = MSIDBSTATE;
-
-const
- MSIMODIFY_SEEK = DWORD(-1); // reposition to current record primary key
- {$EXTERNALSYM MSIMODIFY_SEEK}
- MSIMODIFY_REFRESH = 0; // refetch current record data
- {$EXTERNALSYM MSIMODIFY_REFRESH}
- MSIMODIFY_INSERT = 1; // insert new record, fails if matching key exists
- {$EXTERNALSYM MSIMODIFY_INSERT}
- MSIMODIFY_UPDATE = 2; // update existing non-key data of fetched record
- {$EXTERNALSYM MSIMODIFY_UPDATE}
- MSIMODIFY_ASSIGN = 3; // insert record, replacing any existing record
- {$EXTERNALSYM MSIMODIFY_ASSIGN}
- MSIMODIFY_REPLACE = 4; // update record, delete old if primary key edit
- {$EXTERNALSYM MSIMODIFY_REPLACE}
- MSIMODIFY_MERGE = 5; // fails if record with duplicate key not identical
- {$EXTERNALSYM MSIMODIFY_MERGE}
- MSIMODIFY_DELETE = 6; // remove row referenced by this record from table
- {$EXTERNALSYM MSIMODIFY_DELETE}
- MSIMODIFY_INSERT_TEMPORARY = 7; // insert a temporary record
- {$EXTERNALSYM MSIMODIFY_INSERT_TEMPORARY}
- MSIMODIFY_VALIDATE = 8; // validate a fetched record
- {$EXTERNALSYM MSIMODIFY_VALIDATE}
- MSIMODIFY_VALIDATE_NEW = 9; // validate a new record
- {$EXTERNALSYM MSIMODIFY_VALIDATE_NEW}
- MSIMODIFY_VALIDATE_FIELD = 10; // validate field(s) of an incomplete record
- {$EXTERNALSYM MSIMODIFY_VALIDATE_FIELD}
- MSIMODIFY_VALIDATE_DELETE = 11; // validate before deleting record
- {$EXTERNALSYM MSIMODIFY_VALIDATE_DELETE}
-
-type
- MSIMODIFY = DWORD;
- {$EXTERNALSYM MSIMODIFY}
- TMsiModify = MSIMODIFY;
-
-const
- MSICOLINFO_NAMES = 0; // return column names
- {$EXTERNALSYM MSICOLINFO_NAMES}
- MSICOLINFO_TYPES = 1; // return column definitions, datatype code followed by width
- {$EXTERNALSYM MSICOLINFO_TYPES}
-
-type
- MSICOLINFO = DWORD;
- {$EXTERNALSYM MSICOLINFO}
- TMsiColInfo = MSICOLINFO;
-
-const
- MSICONDITION_FALSE = 0; // expression evaluates to False
- {$EXTERNALSYM MSICONDITION_FALSE}
- MSICONDITION_TRUE = 1; // expression evaluates to True
- {$EXTERNALSYM MSICONDITION_TRUE}
- MSICONDITION_NONE = 2; // no expression present
- {$EXTERNALSYM MSICONDITION_NONE}
- MSICONDITION_ERROR = 3; // syntax error in expression
- {$EXTERNALSYM MSICONDITION_ERROR}
-
-type
- MSICONDITION = DWORD;
- {$EXTERNALSYM MSICONDITION}
- TMsiCondition = MSICONDITION;
-
-const
- MSICOSTTREE_SELFONLY = 0;
- {$EXTERNALSYM MSICOSTTREE_SELFONLY}
- MSICOSTTREE_CHILDREN = 1;
- {$EXTERNALSYM MSICOSTTREE_CHILDREN}
- MSICOSTTREE_PARENTS = 2;
- {$EXTERNALSYM MSICOSTTREE_PARENTS}
- MSICOSTTREE_RESERVED = 3; // Reserved for future use
- {$EXTERNALSYM MSICOSTTREE_RESERVED}
-
-type
- MSICOSTTREE = DWORD;
- {$EXTERNALSYM MSICOSTTREE}
- TMsiCostTree = MSICOSTTREE;
-
-const
- MSIDBERROR_INVALIDARG = DWORD(-3); // invalid argument
- {$EXTERNALSYM MSIDBERROR_INVALIDARG}
- MSIDBERROR_MOREDATA = DWORD(-2); // buffer too small
- {$EXTERNALSYM MSIDBERROR_MOREDATA}
- MSIDBERROR_FUNCTIONERROR = DWORD(-1); // function error
- {$EXTERNALSYM MSIDBERROR_FUNCTIONERROR}
- MSIDBERROR_NOERROR = 0; // no error
- {$EXTERNALSYM MSIDBERROR_NOERROR}
- MSIDBERROR_DUPLICATEKEY = 1; // new record duplicates primary keys of existing record in table
- {$EXTERNALSYM MSIDBERROR_DUPLICATEKEY}
- MSIDBERROR_REQUIRED = 2; // non-nullable column, no null values allowed
- {$EXTERNALSYM MSIDBERROR_REQUIRED}
- MSIDBERROR_BADLINK = 3; // corresponding record in foreign table not found
- {$EXTERNALSYM MSIDBERROR_BADLINK}
- MSIDBERROR_OVERFLOW = 4; // data greater than maximum value allowed
- {$EXTERNALSYM MSIDBERROR_OVERFLOW}
- MSIDBERROR_UNDERFLOW = 5; // data less than minimum value allowed
- {$EXTERNALSYM MSIDBERROR_UNDERFLOW}
- MSIDBERROR_NOTINSET = 6; // data not a member of the values permitted in the set
- {$EXTERNALSYM MSIDBERROR_NOTINSET}
- MSIDBERROR_BADVERSION = 7; // invalid version string
- {$EXTERNALSYM MSIDBERROR_BADVERSION}
- MSIDBERROR_BADCASE = 8; // invalid case, must be all upper-case or all lower-case
- {$EXTERNALSYM MSIDBERROR_BADCASE}
- MSIDBERROR_BADGUID = 9; // invalid GUID
- {$EXTERNALSYM MSIDBERROR_BADGUID}
- MSIDBERROR_BADWILDCARD = 10; // invalid wildcardfilename or use of wildcards
- {$EXTERNALSYM MSIDBERROR_BADWILDCARD}
- MSIDBERROR_BADIDENTIFIER = 11; // bad identifier
- {$EXTERNALSYM MSIDBERROR_BADIDENTIFIER}
- MSIDBERROR_BADLANGUAGE = 12; // bad language Id(s)
- {$EXTERNALSYM MSIDBERROR_BADLANGUAGE}
- MSIDBERROR_BADFILENAME = 13; // bad filename
- {$EXTERNALSYM MSIDBERROR_BADFILENAME}
- MSIDBERROR_BADPATH = 14; // bad path
- {$EXTERNALSYM MSIDBERROR_BADPATH}
- MSIDBERROR_BADCONDITION = 15; // bad conditional statement
- {$EXTERNALSYM MSIDBERROR_BADCONDITION}
- MSIDBERROR_BADFORMATTED = 16; // bad format string
- {$EXTERNALSYM MSIDBERROR_BADFORMATTED}
- MSIDBERROR_BADTEMPLATE = 17; // bad template string
- {$EXTERNALSYM MSIDBERROR_BADTEMPLATE}
- MSIDBERROR_BADDEFAULTDIR = 18; // bad string in DefaultDir column of Directory table
- {$EXTERNALSYM MSIDBERROR_BADDEFAULTDIR}
- MSIDBERROR_BADREGPATH = 19; // bad registry path string
- {$EXTERNALSYM MSIDBERROR_BADREGPATH}
- MSIDBERROR_BADCUSTOMSOURCE = 20; // bad string in CustomSource column of CustomAction table
- {$EXTERNALSYM MSIDBERROR_BADCUSTOMSOURCE}
- MSIDBERROR_BADPROPERTY = 21; // bad property string
- {$EXTERNALSYM MSIDBERROR_BADPROPERTY}
- MSIDBERROR_MISSINGDATA = 22; // _Validation table missing reference to column
- {$EXTERNALSYM MSIDBERROR_MISSINGDATA}
- MSIDBERROR_BADCATEGORY = 23; // Category column of _Validation table for column is invalid
- {$EXTERNALSYM MSIDBERROR_BADCATEGORY}
- MSIDBERROR_BADKEYTABLE = 24; // table in KeyTable column of _Validation table could not be found/loaded
- {$EXTERNALSYM MSIDBERROR_BADKEYTABLE}
- MSIDBERROR_BADMAXMINVALUES = 25; // value in MaxValue column of _Validation table is less than value in MinValue column
- {$EXTERNALSYM MSIDBERROR_BADMAXMINVALUES}
- MSIDBERROR_BADCABINET = 26; // bad cabinet name
- {$EXTERNALSYM MSIDBERROR_BADCABINET}
- MSIDBERROR_BADSHORTCUT = 27; // bad shortcut target
- {$EXTERNALSYM MSIDBERROR_BADSHORTCUT}
- MSIDBERROR_STRINGOVERFLOW = 28; // string overflow (greater than length allowed in column def)
- {$EXTERNALSYM MSIDBERROR_STRINGOVERFLOW}
- MSIDBERROR_BADLOCALIZEATTRIB = 29; // invalid localization attribute (primary keys cannot be localized)
- {$EXTERNALSYM MSIDBERROR_BADLOCALIZEATTRIB}
-
-type
- MSIDBERROR = DWORD;
- {$EXTERNALSYM MSIDBERROR}
- TMsiDbError = MSIDBERROR;
-
-const
- MSIRUNMODE_ADMIN = 0; // admin mode install, else product install
- {$EXTERNALSYM MSIRUNMODE_ADMIN}
- MSIRUNMODE_ADVERTISE = 1; // installing advertisements, else installing or updating product
- {$EXTERNALSYM MSIRUNMODE_ADVERTISE}
- MSIRUNMODE_MAINTENANCE = 2; // modifying an existing installation, else new installation
- {$EXTERNALSYM MSIRUNMODE_MAINTENANCE}
- MSIRUNMODE_ROLLBACKENABLED = 3; // rollback is enabled
- {$EXTERNALSYM MSIRUNMODE_ROLLBACKENABLED}
- MSIRUNMODE_LOGENABLED = 4; // log file active, enabled prior to install session
- {$EXTERNALSYM MSIRUNMODE_LOGENABLED}
- MSIRUNMODE_OPERATIONS = 5; // spooling execute operations, else in determination phase
- {$EXTERNALSYM MSIRUNMODE_OPERATIONS}
- MSIRUNMODE_REBOOTATEND = 6; // reboot needed after successful installation (settable)
- {$EXTERNALSYM MSIRUNMODE_REBOOTATEND}
- MSIRUNMODE_REBOOTNOW = 7; // reboot needed to continue installation (settable)
- {$EXTERNALSYM MSIRUNMODE_REBOOTNOW}
- MSIRUNMODE_CABINET = 8; // installing files from cabinets and files using Media table
- {$EXTERNALSYM MSIRUNMODE_CABINET}
- MSIRUNMODE_SOURCESHORTNAMES= 9; // source LongFileNames suppressed via PID_MSISOURCE summary property
- {$EXTERNALSYM MSIRUNMODE_SOURCESHORTNAMES}
- MSIRUNMODE_TARGETSHORTNAMES= 10; // target LongFileNames suppressed via SHORTFILENAMES property
- {$EXTERNALSYM MSIRUNMODE_TARGETSHORTNAMES}
- MSIRUNMODE_RESERVED11 = 11; // future use
- {$EXTERNALSYM MSIRUNMODE_RESERVED11}
- MSIRUNMODE_WINDOWS9X = 12; // operating systems is Windows9?, else Windows NT
- {$EXTERNALSYM MSIRUNMODE_WINDOWS9X}
- MSIRUNMODE_ZAWENABLED = 13; // operating system supports demand installation
- {$EXTERNALSYM MSIRUNMODE_ZAWENABLED}
- MSIRUNMODE_RESERVED14 = 14; // future use
- {$EXTERNALSYM MSIRUNMODE_RESERVED14}
- MSIRUNMODE_RESERVED15 = 15; // future use
- {$EXTERNALSYM MSIRUNMODE_RESERVED15}
- MSIRUNMODE_SCHEDULED = 16; // custom action call from install script execution
- {$EXTERNALSYM MSIRUNMODE_SCHEDULED}
- MSIRUNMODE_ROLLBACK = 17; // custom action call from rollback execution script
- {$EXTERNALSYM MSIRUNMODE_ROLLBACK}
- MSIRUNMODE_COMMIT = 18; // custom action call from commit execution script
- {$EXTERNALSYM MSIRUNMODE_COMMIT}
-
-type
- MSIRUNMODE = DWORD;
- {$EXTERNALSYM MSIRUNMODE}
- TMsiRunMode = MSIRUNMODE;
-
-const
- INSTALLMESSAGE_TYPEMASK = DWORD($FF000000); // mask for type code
- {$EXTERNALSYM INSTALLMESSAGE_TYPEMASK}
-
-// Note: INSTALLMESSAGE_ERROR, INSTALLMESSAGE_WARNING, INSTALLMESSAGE_USER are to or'd
-// with a message box style to indicate the buttons to display and return:
-// MB_OK,MB_OKCANCEL,MB_ABORTRETRYIGNORE,MB_YESNOCANCEL,MB_YESNO,MB_RETRYCANCEL
-// the default button (MB_DEFBUTTON1 is normal default):
-// MB_DEFBUTTON1, MB_DEFBUTTON2, MB_DEFBUTTON3
-// and optionally an icon style:
-// MB_ICONERROR, MB_ICONQUESTION, MB_ICONWARNING, MB_ICONINFORMATION
-
-const
- MSITRANSFORM_ERROR_ADDEXISTINGROW = $00000001;
- {$EXTERNALSYM MSITRANSFORM_ERROR_ADDEXISTINGROW}
- MSITRANSFORM_ERROR_DELMISSINGROW = $00000002;
- {$EXTERNALSYM MSITRANSFORM_ERROR_DELMISSINGROW}
- MSITRANSFORM_ERROR_ADDEXISTINGTABLE = $00000004;
- {$EXTERNALSYM MSITRANSFORM_ERROR_ADDEXISTINGTABLE}
- MSITRANSFORM_ERROR_DELMISSINGTABLE = $00000008;
- {$EXTERNALSYM MSITRANSFORM_ERROR_DELMISSINGTABLE}
- MSITRANSFORM_ERROR_UPDATEMISSINGROW = $00000010;
- {$EXTERNALSYM MSITRANSFORM_ERROR_UPDATEMISSINGROW}
- MSITRANSFORM_ERROR_CHANGECODEPAGE = $00000020;
- {$EXTERNALSYM MSITRANSFORM_ERROR_CHANGECODEPAGE}
- MSITRANSFORM_ERROR_VIEWTRANSFORM = $00000100;
- {$EXTERNALSYM MSITRANSFORM_ERROR_VIEWTRANSFORM}
-
-type
- MSITRANSFORM_ERROR = DWORD;
- {$EXTERNALSYM MSITRANSFORM_ERROR}
- TMsiTransformError = MSITRANSFORM_ERROR;
-
-const
- MSITRANSFORM_VALIDATE_LANGUAGE = $00000001;
- {$EXTERNALSYM MSITRANSFORM_VALIDATE_LANGUAGE}
- MSITRANSFORM_VALIDATE_PRODUCT = $00000002;
- {$EXTERNALSYM MSITRANSFORM_VALIDATE_PRODUCT}
- MSITRANSFORM_VALIDATE_PLATFORM = $00000004;
- {$EXTERNALSYM MSITRANSFORM_VALIDATE_PLATFORM}
- MSITRANSFORM_VALIDATE_MAJORVERSION = $00000008;
- {$EXTERNALSYM MSITRANSFORM_VALIDATE_MAJORVERSION}
- MSITRANSFORM_VALIDATE_MINORVERSION = $00000010;
- {$EXTERNALSYM MSITRANSFORM_VALIDATE_MINORVERSION}
- MSITRANSFORM_VALIDATE_UPDATEVERSION = $00000020;
- {$EXTERNALSYM MSITRANSFORM_VALIDATE_UPDATEVERSION}
- MSITRANSFORM_VALIDATE_NEWLESSBASEVERSION = $00000040;
- {$EXTERNALSYM MSITRANSFORM_VALIDATE_NEWLESSBASEVERSION}
- MSITRANSFORM_VALIDATE_NEWLESSEQUALBASEVERSION = $00000080;
- {$EXTERNALSYM MSITRANSFORM_VALIDATE_NEWLESSEQUALBASEVERSION}
- MSITRANSFORM_VALIDATE_NEWEQUALBASEVERSION = $00000100;
- {$EXTERNALSYM MSITRANSFORM_VALIDATE_NEWEQUALBASEVERSION}
- MSITRANSFORM_VALIDATE_NEWGREATEREQUALBASEVERSION = $00000200;
- {$EXTERNALSYM MSITRANSFORM_VALIDATE_NEWGREATEREQUALBASEVERSION}
- MSITRANSFORM_VALIDATE_NEWGREATERBASEVERSION = $00000400;
- {$EXTERNALSYM MSITRANSFORM_VALIDATE_NEWGREATERBASEVERSION}
- MSITRANSFORM_VALIDATE_UPGRADECODE = $00000800;
- {$EXTERNALSYM MSITRANSFORM_VALIDATE_UPGRADECODE}
-
-type
- MSITRANSFORM_VALIDATE = DWORD;
- {$EXTERNALSYM MSITRANSFORM_VALIDATE}
- TMsiTransformValidate = MSITRANSFORM_VALIDATE;
-
-// -----------------------------------------------------------------------------
-// Installer database access functions
-// -----------------------------------------------------------------------------
-
-// Prepare a database query, creating a view object
-// Returns ERROR_SUCCESS if successful, and the view handle is returned,
-// else ERROR_INVALID_HANDLE, ERROR_INVALID_HANDLE_STATE, ERROR_BAD_QUERY_SYNTAX, ERROR_GEN_FAILURE
-// Execution of this function sets the error record, accessible via MsiGetLastErrorRecord
-
-function MsiDatabaseOpenViewA(hDatabase: MSIHANDLE; szQuery: LPCSTR; var phView: MSIHANDLE): UINT; stdcall;
-{$EXTERNALSYM MsiDatabaseOpenViewA}
-function MsiDatabaseOpenViewW(hDatabase: MSIHANDLE; szQuery: LPCWSTR; var phView: MSIHANDLE): UINT; stdcall;
-{$EXTERNALSYM MsiDatabaseOpenViewW}
-function MsiDatabaseOpenView(hDatabase: MSIHANDLE; szQuery: LPCTSTR; var phView: MSIHANDLE): UINT; stdcall;
-{$EXTERNALSYM MsiDatabaseOpenView}
-
-// Returns the MSIDBERROR enum and name of the column corresponding to the error
-// Similar to a GetLastError function, but for the view. NOT the same as MsiGetLastErrorRecord
-// Returns errors of MsiViewModify.
-
-function MsiViewGetErrorA(hView: MSIHANDLE; szColumnNameBuffer: LPSTR;
- var pcchBuf: DWORD): MSIDBERROR; stdcall;
-{$EXTERNALSYM MsiViewGetErrorA}
-function MsiViewGetErrorW(hView: MSIHANDLE; szColumnNameBuffer: LPWSTR;
- var pcchBuf: DWORD): MSIDBERROR; stdcall;
-{$EXTERNALSYM MsiViewGetErrorW}
-function MsiViewGetError(hView: MSIHANDLE; szColumnNameBuffer: LPTSTR;
- var pcchBuf: DWORD): MSIDBERROR; stdcall;
-{$EXTERNALSYM MsiViewGetError}
-
-// Exectute the view query, supplying parameters as required
-// Returns ERROR_SUCCESS, ERROR_INVALID_HANDLE, ERROR_INVALID_HANDLE_STATE, ERROR_GEN_FAILURE
-// Execution of this function sets the error record, accessible via MsiGetLastErrorRecord
-
-function MsiViewExecute(hView: MSIHANDLE; hRecord: MSIHANDLE): UINT; stdcall;
-{$EXTERNALSYM MsiViewExecute}
-
-// Fetch the next sequential record from the view
-// Result is ERROR_SUCCESS if a row is found, and its handle is returned
-// else ERROR_NO_MORE_ITEMS if no records remain, and a null handle is returned
-// else result is error: ERROR_INVALID_HANDLE_STATE, ERROR_INVALID_HANDLE, ERROR_GEN_FAILURE
-
-function MsiViewFetch(hView: MSIHANDLE; var phRecord: MSIHANDLE): UINT; stdcall;
-{$EXTERNALSYM MsiViewFetch}
-
-// Modify a database record, parameters must match types in query columns
-// Returns ERROR_SUCCESS, ERROR_INVALID_HANDLE, ERROR_INVALID_HANDLE_STATE, ERROR_GEN_FAILURE, ERROR_ACCESS_DENIED
-// Execution of this function sets the error record, accessible via MsiGetLastErrorRecord
-
-function MsiViewModify(hView: MSIHANDLE; eModifyMode: MSIMODIFY; hRecord: MSIHANDLE): UINT; stdcall;
-{$EXTERNALSYM MsiViewModify}
-
-// Return the column names or specifications for the current view
-// Returns ERROR_SUCCESS, ERROR_INVALID_HANDLE, ERROR_INVALID_PARAMETER, or ERROR_INVALID_HANDLE_STATE
-
-function MsiViewGetColumnInfo(hView: MSIHANDLE; eColumnInfo: MSICOLINFO;
- var phRecord: MSIHANDLE): UINT; stdcall;
-{$EXTERNALSYM MsiViewGetColumnInfo}
-
-// Release the result set for an executed view, to allow re-execution
-// Only needs to be called if not all records have been fetched
-// Returns ERROR_SUCCESS, ERROR_INVALID_HANDLE, ERROR_INVALID_HANDLE_STATE
-
-function MsiViewClose(hView: MSIHANDLE): UINT; stdcall;
-{$EXTERNALSYM MsiViewClose}
-
-// Return a record containing the names of all primary key columns for a given table
-// Returns an MSIHANDLE for a record containing the name of each column.
-// The field count of the record corresponds to the number of primary key columns.
-// Field [0] of the record contains the table name.
-// Returns ERROR_SUCCESS, ERROR_INVALID_HANDLE, ERROR_INVALID_TABLE
-
-function MsiDatabaseGetPrimaryKeysA(hDatabase: MSIHANDLE; szTableName: LPCSTR;
- var phRecord: MSIHANDLE): UINT; stdcall;
-{$EXTERNALSYM MsiDatabaseGetPrimaryKeysA}
-function MsiDatabaseGetPrimaryKeysW(hDatabase: MSIHANDLE; szTableName: LPCWSTR;
- var phRecord: MSIHANDLE): UINT; stdcall;
-{$EXTERNALSYM MsiDatabaseGetPrimaryKeysW}
-function MsiDatabaseGetPrimaryKeys(hDatabase: MSIHANDLE; szTableName: LPCTSTR;
- var phRecord: MSIHANDLE): UINT; stdcall;
-{$EXTERNALSYM MsiDatabaseGetPrimaryKeys}
-
-// Return an enum defining the state of the table (temporary, unknown, or persistent).
-// Returns MSICONDITION_ERROR, MSICONDITION_FALSE, MSICONDITION_TRUE, MSICONDITION_NONE
-
-function MsiDatabaseIsTablePersistentA(hDatabase: MSIHANDLE; szTableName: LPCSTR): MSICONDITION; stdcall;
-{$EXTERNALSYM MsiDatabaseIsTablePersistentA}
-function MsiDatabaseIsTablePersistentW(hDatabase: MSIHANDLE; szTableName: LPCWSTR): MSICONDITION; stdcall;
-{$EXTERNALSYM MsiDatabaseIsTablePersistentW}
-function MsiDatabaseIsTablePersistent(hDatabase: MSIHANDLE; szTableName: LPCTSTR): MSICONDITION; stdcall;
-{$EXTERNALSYM MsiDatabaseIsTablePersistent}
-
-// --------------------------------------------------------------------------
-// Summary information stream management functions
-// --------------------------------------------------------------------------
-
-// Integer Property IDs: 1, 14, 15, 16, 19
-// DateTime Property IDs: 10, 11, 12, 13
-// Text Property IDs: 2, 3, 4, 5, 6, 7, 8, 9, 18
-// Unsupported Propery IDs: 0 (PID_DICTIONARY), 17 (PID_THUMBNAIL)
-
-// Obtain a handle for the _SummaryInformation stream for an MSI database
-// Execution of this function sets the error record, accessible via MsiGetLastErrorRecord
-
-function MsiGetSummaryInformationA(hDatabase: MSIHANDLE; szDatabasePath: LPCSTR;
- uiUpdateCount: UINT; var phSummaryInfo: MSIHANDLE): UINT; stdcall;
-{$EXTERNALSYM MsiGetSummaryInformationA}
-function MsiGetSummaryInformationW(hDatabase: MSIHANDLE; szDatabasePath: LPCWSTR;
- uiUpdateCount: UINT; var phSummaryInfo: MSIHANDLE): UINT; stdcall;
-{$EXTERNALSYM MsiGetSummaryInformationW}
-function MsiGetSummaryInformation(hDatabase: MSIHANDLE; szDatabasePath: LPCTSTR;
- uiUpdateCount: UINT; var phSummaryInfo: MSIHANDLE): UINT; stdcall;
-{$EXTERNALSYM MsiGetSummaryInformation}
-
-// Obtain the number of existing properties in the SummaryInformation stream
-
-function MsiSummaryInfoGetPropertyCount(hSummaryInfo: MSIHANDLE; var puiPropertyCount: UINT): UINT; stdcall;
-{$EXTERNALSYM MsiSummaryInfoGetPropertyCount}
-
-// Set a single summary information property
-// Returns ERROR_SUCCESS, ERROR_INVALID_HANDLE, ERROR_UNKNOWN_PROPERTY
-
-function MsiSummaryInfoSetPropertyA(hSummaryInfo: MSIHANDLE; uiProperty: UINT;
- uiDataType: UINT; iValue: Integer; const pftValue: FILETIME; szValue: LPCSTR): UINT; stdcall;
-{$EXTERNALSYM MsiSummaryInfoSetPropertyA}
-function MsiSummaryInfoSetPropertyW(hSummaryInfo: MSIHANDLE; uiProperty: UINT;
- uiDataType: UINT; iValue: Integer; const pftValue: FILETIME; szValue: LPCWSTR): UINT; stdcall;
-{$EXTERNALSYM MsiSummaryInfoSetPropertyW}
-function MsiSummaryInfoSetProperty(hSummaryInfo: MSIHANDLE; uiProperty: UINT;
- uiDataType: UINT; iValue: Integer; const pftValue: FILETIME; szValue: LPCTSTR): UINT; stdcall;
-{$EXTERNALSYM MsiSummaryInfoSetProperty}
-
-// Get a single property from the summary information
-// Returns ERROR_SUCCESS, ERROR_INVALID_HANDLE, ERROR_UNKNOWN_PROPERTY
-
-function MsiSummaryInfoGetPropertyA(hSummaryInfo: MSIHANDLE; uiProperty: UINT;
- var puiDataType: UINT; var piValue: Integer; var pftValue: FILETIME; szValueBuf: LPSTR;
- var pcchValueBuf: DWORD): UINT; stdcall;
-{$EXTERNALSYM MsiSummaryInfoGetPropertyA}
-function MsiSummaryInfoGetPropertyW(hSummaryInfo: MSIHANDLE; uiProperty: UINT;
- var puiDataType: UINT; var piValue: Integer; var pftValue: FILETIME; szValueBuf: LPWSTR;
- var pcchValueBuf: DWORD): UINT; stdcall;
-{$EXTERNALSYM MsiSummaryInfoGetPropertyW}
-function MsiSummaryInfoGetProperty(hSummaryInfo: MSIHANDLE; uiProperty: UINT;
- var puiDataType: UINT; var piValue: Integer; var pftValue: FILETIME; szValueBuf: LPTSTR;
- var pcchValueBuf: DWORD): UINT; stdcall;
-{$EXTERNALSYM MsiSummaryInfoGetProperty}
-
-// Write back changed information to summary information stream
-
-function MsiSummaryInfoPersist(hSummaryInfo: MSIHANDLE): UINT; stdcall;
-{$EXTERNALSYM MsiSummaryInfoPersist}
-
-// --------------------------------------------------------------------------
-// Installer database management functions - not used by custom actions
-// --------------------------------------------------------------------------
-
-// Open an installer database, specifying the persistance mode, which is a pointer.
-// Predefined persist values are reserved pointer values, requiring pointer arithmetic.
-// Execution of this function sets the error record, accessible via MsiGetLastErrorRecord
-
-function MsiOpenDatabaseA(szDatabasePath: LPCSTR; szPersist: LPCSTR;
- var phDatabase: MSIHANDLE): UINT; stdcall;
-{$EXTERNALSYM MsiOpenDatabaseA}
-function MsiOpenDatabaseW(szDatabasePath: LPCWSTR; szPersist: LPCWSTR;
- var phDatabase: MSIHANDLE): UINT; stdcall;
-{$EXTERNALSYM MsiOpenDatabaseW}
-function MsiOpenDatabase(szDatabasePath: LPCTSTR; szPersist: LPCTSTR;
- var phDatabase: MSIHANDLE): UINT; stdcall;
-{$EXTERNALSYM MsiOpenDatabase}
-
-// Import an MSI text archive table into an open database
-// Execution of this function sets the error record, accessible via MsiGetLastErrorRecord
-
-function MsiDatabaseImportA(hDatabase: MSIHANDLE; szFolderPath: LPCSTR;
- szFileName: LPCSTR): UINT; stdcall;
-{$EXTERNALSYM MsiDatabaseImportA}
-function MsiDatabaseImportW(hDatabase: MSIHANDLE; szFolderPath: LPCWSTR;
- szFileName: LPCWSTR): UINT; stdcall;
-{$EXTERNALSYM MsiDatabaseImportW}
-function MsiDatabaseImport(hDatabase: MSIHANDLE; szFolderPath: LPCTSTR;
- szFileName: LPCTSTR): UINT; stdcall;
-{$EXTERNALSYM MsiDatabaseImport}
-
-// Export an MSI table from an open database to a text archive file
-// Execution of this function sets the error record, accessible via MsiGetLastErrorRecord
-
-function MsiDatabaseExportA(hDatabase: MSIHANDLE; szTableName: LPCSTR;
- szFolderPath: LPCSTR; szFileName: LPCSTR): UINT; stdcall;
-{$EXTERNALSYM MsiDatabaseExportA}
-function MsiDatabaseExportW(hDatabase: MSIHANDLE; szTableName: LPCWSTR;
- szFolderPath: LPCWSTR; szFileName: LPCWSTR): UINT; stdcall;
-{$EXTERNALSYM MsiDatabaseExportW}
-function MsiDatabaseExport(hDatabase: MSIHANDLE; szTableName: LPCTSTR;
- szFolderPath: LPCTSTR; szFileName: LPCTSTR): UINT; stdcall;
-{$EXTERNALSYM MsiDatabaseExport}
-
-// Merge two database together, allowing duplicate rows
-// Execution of this function sets the error record, accessible via MsiGetLastErrorRecord
-
-function MsiDatabaseMergeA(hDatabase: MSIHANDLE; hDatabaseMerge: MSIHANDLE;
- szTableName: LPCSTR): UINT; stdcall;
-{$EXTERNALSYM MsiDatabaseMergeA}
-function MsiDatabaseMergeW(hDatabase: MSIHANDLE; hDatabaseMerge: MSIHANDLE;
- szTableName: LPCWSTR): UINT; stdcall;
-{$EXTERNALSYM MsiDatabaseMergeW}
-function MsiDatabaseMerge(hDatabase: MSIHANDLE; hDatabaseMerge: MSIHANDLE;
- szTableName: LPCTSTR): UINT; stdcall;
-{$EXTERNALSYM MsiDatabaseMerge}
-
-// Generate a transform file of differences between two databases
-// Execution of this function sets the error record, accessible via MsiGetLastErrorRecord
-
-function MsiDatabaseGenerateTransformA(hDatabase: MSIHANDLE; hDatabaseReference: MSIHANDLE;
- szTransformFile: LPCSTR; iReserved1: Integer; iReserved2: Integer): UINT; stdcall;
-{$EXTERNALSYM MsiDatabaseGenerateTransformA}
-function MsiDatabaseGenerateTransformW(hDatabase: MSIHANDLE; hDatabaseReference: MSIHANDLE;
- szTransformFile: LPCWSTR; iReserved1: Integer; iReserved2: Integer): UINT; stdcall;
-{$EXTERNALSYM MsiDatabaseGenerateTransformW}
-function MsiDatabaseGenerateTransform(hDatabase: MSIHANDLE; hDatabaseReference: MSIHANDLE;
- szTransformFile: LPCTSTR; iReserved1: Integer; iReserved2: Integer): UINT; stdcall;
-{$EXTERNALSYM MsiDatabaseGenerateTransform}
-
-// Apply a transform file containing database difference
-// Execution of this function sets the error record, accessible via MsiGetLastErrorRecord
-
-function MsiDatabaseApplyTransformA(hDatabase: MSIHANDLE; szTransformFile: LPCSTR;
- iErrorConditions: Integer): UINT; stdcall;
-{$EXTERNALSYM MsiDatabaseApplyTransformA}
-function MsiDatabaseApplyTransformW(hDatabase: MSIHANDLE; szTransformFile: LPCWSTR;
- iErrorConditions: Integer): UINT; stdcall;
-{$EXTERNALSYM MsiDatabaseApplyTransformW}
-function MsiDatabaseApplyTransform(hDatabase: MSIHANDLE; szTransformFile: LPCTSTR;
- iErrorConditions: Integer): UINT; stdcall;
-{$EXTERNALSYM MsiDatabaseApplyTransform}
-
-// Create summary information of existing transform to include validation and error conditions
-// Execution of this function sets the error record, accessible via MsiGetLastErrorRecord
-
-function MsiCreateTransformSummaryInfoA(hDatabase: MSIHANDLE; hDatabaseReference: MSIHANDLE;
- szTransformFile: LPCSTR; iErrorConditions: Integer; iValidation: Integer): UINT; stdcall;
-{$EXTERNALSYM MsiCreateTransformSummaryInfoA}
-function MsiCreateTransformSummaryInfoW(hDatabase: MSIHANDLE; hDatabaseReference: MSIHANDLE;
- szTransformFile: LPCWSTR; iErrorConditions: Integer; iValidation: Integer): UINT; stdcall;
-{$EXTERNALSYM MsiCreateTransformSummaryInfoW}
-function MsiCreateTransformSummaryInfo(hDatabase: MSIHANDLE; hDatabaseReference: MSIHANDLE;
- szTransformFile: LPCTSTR; iErrorConditions: Integer; iValidation: Integer): UINT; stdcall;
-{$EXTERNALSYM MsiCreateTransformSummaryInfo}
-
-// Write out all persistent table data, ignored if database opened read-only
-// Execution of this function sets the error record, accessible via MsiGetLastErrorRecord
-
-function MsiDatabaseCommit(hDatabase: MSIHANDLE): UINT; stdcall;
-{$EXTERNALSYM MsiDatabaseCommit}
-
-// Return the update state of a database
-
-function MsiGetDatabaseState(hDatabase: MSIHANDLE): MSIDBSTATE; stdcall;
-{$EXTERNALSYM MsiGetDatabaseState}
-
-// --------------------------------------------------------------------------
-// Record object functions
-// --------------------------------------------------------------------------
-
-// Create a new record object with the requested number of fields
-// Field 0, not included in count, is used for format strings and op codes
-// All fields are initialized to null
-// Returns a handle to the created record, or 0 if memory could not be allocated
-
-function MsiCreateRecord(cParams: UINT): MSIHANDLE; stdcall;
-{$EXTERNALSYM MsiCreateRecord}
-
-// Report whether a record field is NULL
-// Returns TRUE if the field is null or does not exist
-// Returns FALSE if the field contains data, or the handle is invalid
-
-function MsiRecordIsNull(hRecord: MSIHANDLE; iField: UINT): BOOL; stdcall;
-{$EXTERNALSYM MsiRecordIsNull}
-
-// Return the length of a record field
-// Returns 0 if field is NULL or non-existent
-// Returns sizeof(Integer) if integer data
-// Returns character count if string data (not counting null terminator)
-// Returns bytes count if stream data
-
-function MsiRecordDataSize(hRecord: MSIHANDLE; iField: UINT): UINT; stdcall;
-{$EXTERNALSYM MsiRecordDataSize}
-
-// Set a record field to an integer value
-// Returns ERROR_SUCCESS, ERROR_INVALID_HANDLE, ERROR_INVALID_FIELD
-
-function MsiRecordSetInteger(hRecord: MSIHANDLE; iField: UINT; iValue: Integer): UINT; stdcall;
-{$EXTERNALSYM MsiRecordSetInteger}
-
-// Copy a string into the designated field
-// A null string pointer and an empty string both set the field to null
-// Returns ERROR_SUCCESS, ERROR_INVALID_HANDLE, ERROR_INVALID_FIELD
-
-function MsiRecordSetStringA(hRecord: MSIHANDLE; iField: UINT; szValue: LPCSTR): UINT; stdcall;
-{$EXTERNALSYM MsiRecordSetStringA}
-function MsiRecordSetStringW(hRecord: MSIHANDLE; iField: UINT; szValue: LPCWSTR): UINT; stdcall;
-{$EXTERNALSYM MsiRecordSetStringW}
-function MsiRecordSetString(hRecord: MSIHANDLE; iField: UINT; szValue: LPCTSTR): UINT; stdcall;
-{$EXTERNALSYM MsiRecordSetString}
-
-// Return the integer value from a record field
-// Returns the value MSI_NULL_INTEGER if the field is null
-// or if the field is a string that cannot be converted to an integer
-
-function MsiRecordGetInteger(hRecord: MSIHANDLE; iField: UINT): Integer; stdcall;
-{$EXTERNALSYM MsiRecordGetInteger}
-
-// Return the string value of a record field
-// Integer fields will be converted to a string
-// Null and non-existent fields will report a value of 0
-// Fields containing stream data will return ERROR_INVALID_DATATYPE
-// Returns ERROR_SUCCESS, ERROR_MORE_DATA,
-// ERROR_INVALID_HANDLE, ERROR_INVALID_FIELD, ERROR_BAD_ARGUMENTS
-
-function MsiRecordGetStringA(hRecord: MSIHANDLE; iField: UINT; szValueBuf: LPSTR;
- var pcchValueBuf: DWORD): UINT; stdcall;
-{$EXTERNALSYM MsiRecordGetStringA}
-function MsiRecordGetStringW(hRecord: MSIHANDLE; iField: UINT; szValueBuf: LPWSTR;
- var pcchValueBuf: DWORD): UINT; stdcall;
-{$EXTERNALSYM MsiRecordGetStringW}
-function MsiRecordGetString(hRecord: MSIHANDLE; iField: UINT; szValueBuf: LPTSTR;
- var pcchValueBuf: DWORD): UINT; stdcall;
-{$EXTERNALSYM MsiRecordGetString}
-
-// Returns the number of fields allocated in the record
-// Does not count field 0, used for formatting and op codes
-
-function MsiRecordGetFieldCount(hRecord: MSIHANDLE): UINT; stdcall;
-{$EXTERNALSYM MsiRecordGetFieldCount}
-
-// Set a record stream field from a file
-// The contents of the specified file will be read into a stream object
-// The stream will be persisted if the record is inserted into the database
-// Execution of this function sets the error record, accessible via MsiGetLastErrorRecord
-
-function MsiRecordSetStreamA(hRecord: MSIHANDLE; iField: UINT; szFilePath: LPCSTR): UINT; stdcall;
-{$EXTERNALSYM MsiRecordSetStreamA}
-function MsiRecordSetStreamW(hRecord: MSIHANDLE; iField: UINT; szFilePath: LPCWSTR): UINT; stdcall;
-{$EXTERNALSYM MsiRecordSetStreamW}
-function MsiRecordSetStream(hRecord: MSIHANDLE; iField: UINT; szFilePath: LPCTSTR): UINT; stdcall;
-{$EXTERNALSYM MsiRecordSetStream}
-
-// Read bytes from a record stream field into a buffer
-// Must set the in/out argument to the requested byte count to read
-// The number of bytes transferred is returned through the argument
-// If no more bytes are available, ERROR_SUCCESS is still returned
-
-function MsiRecordReadStream(hRecord: MSIHANDLE; iField: UINT; szDataBuf: PChar;
- var pcbDataBuf: DWORD): UINT; stdcall;
-{$EXTERNALSYM MsiRecordReadStream}
-
-// Clears all data fields in a record to NULL
-
-function MsiRecordClearData(hRecord: MSIHANDLE): UINT; stdcall;
-{$EXTERNALSYM MsiRecordClearData}
-
-// --------------------------------------------------------------------------
-// Functions to access a running installation, called from custom actions
-// The install handle is the single argument passed to custom actions
-// --------------------------------------------------------------------------
-
-// Return a handle to the database currently in use by this installer instance
-
-function MsiGetActiveDatabase(hInstall: MSIHANDLE): MSIHANDLE; stdcall;
-{$EXTERNALSYM MsiGetActiveDatabase}
-
-// Set the value for an installer property
-// If the property is not defined, it will be created
-// If the value is null or an empty string, the property will be removed
-// Returns ERROR_SUCCESS, ERROR_INVALID_HANDLE, ERROR_BAD_ARGUMENTS
-
-function MsiSetPropertyA(hInstall: MSIHANDLE; szName: LPCSTR; szValue: LPCSTR): UINT; stdcall;
-{$EXTERNALSYM MsiSetPropertyA}
-function MsiSetPropertyW(hInstall: MSIHANDLE; szName: LPCWSTR; szValue: LPCWSTR): UINT; stdcall;
-{$EXTERNALSYM MsiSetPropertyW}
-function MsiSetProperty(hInstall: MSIHANDLE; szName: LPCTSTR; szValue: LPCTSTR): UINT; stdcall;
-{$EXTERNALSYM MsiSetProperty}
-
-// Get the value for an installer property
-// If the property is not defined, it is equivalent to a 0-length value, not error
-// Returns ERROR_SUCCESS, ERROR_MORE_DATA, ERROR_INVALID_HANDLE, ERROR_BAD_ARGUMENTS
-
-function MsiGetPropertyA(hInstall: MSIHANDLE; szName: LPCSTR; szValueBuf: LPSTR;
- var pcchValueBuf: DWORD): UINT; stdcall;
-{$EXTERNALSYM MsiGetPropertyA}
-function MsiGetPropertyW(hInstall: MSIHANDLE; szName: LPCWSTR; szValueBuf: LPWSTR;
- var pcchValueBuf: DWORD): UINT; stdcall;
-{$EXTERNALSYM MsiGetPropertyW}
-function MsiGetProperty(hInstall: MSIHANDLE; szName: LPCTSTR; szValueBuf: LPTSTR;
- var pcchValueBuf: DWORD): UINT; stdcall;
-{$EXTERNALSYM MsiGetProperty}
-
-// Return the numeric language for the currently running install
-// Returns 0 if an install not running
-
-function MsiGetLanguage(hInstall: MSIHANDLE): LANGID; stdcall;
-{$EXTERNALSYM MsiGetLanguage}
-
-// Return one of the boolean internal installer states
-// Returns FALSE if the handle is not active or if the mode is not implemented
-
-function MsiGetMode(hInstall: MSIHANDLE; eRunMode: MSIRUNMODE): BOOL; stdcall;
-{$EXTERNALSYM MsiGetMode}
-
-// Set an internal install session boolean mode - Note: most modes are read-only
-// Returns ERROR_SUCCESS if the mode can be set to the desired state
-// Returns ERROR_ACCESS_DENIED if the mode is not settable
-// Returns ERROR_INVALID_HANDLE if the handle is not an active install session
-
-function MsiSetMode(hInstall: MSIHANDLE; eRunMode: MSIRUNMODE; fState: BOOL): UINT; stdcall;
-{$EXTERNALSYM MsiSetMode}
-
-// Format record data using a format string containing field markers and/or properties
-// Record field 0 must contain the format string
-// Other fields must contain data that may be referenced by the format string.
-
-function MsiFormatRecordA(hInstall: MSIHANDLE; hRecord: MSIHANDLE; szResultBuf: LPSTR;
- var pcchResultBuf: DWORD): UINT; stdcall;
-{$EXTERNALSYM MsiFormatRecordA}
-function MsiFormatRecordW(hInstall: MSIHANDLE; hRecord: MSIHANDLE; szResultBuf: LPWSTR;
- var pcchResultBuf: DWORD): UINT; stdcall;
-{$EXTERNALSYM MsiFormatRecordW}
-function MsiFormatRecord(hInstall: MSIHANDLE; hRecord: MSIHANDLE; szResultBuf: LPTSTR;
- var pcchResultBuf: DWORD): UINT; stdcall;
-{$EXTERNALSYM MsiFormatRecord}
-
-// Execute another action, either built-in, custom, or UI wizard
-// Returns ERROR_FUNCTION_NOT_CALLED if action not found
-// Returns ERROR_SUCCESS if action completed succesfully
-// Returns ERROR_INSTALL_USEREXIT if user cancelled during action
-// Returns ERROR_INSTALL_FAILURE if action failed
-// Returns ERROR_INSTALL_SUSPEND if user suspended installation
-// Returns ERROR_MORE_DATA if action wishes to skip remaining actions
-// Returns ERROR_INVALID_HANDLE_STATE if install session not active
-// Returns ERROR_INVALID_DATA if failure calling custom action
-// Returns ERROR_INVALID_HANDLE or ERROR_INVALID_PARAMETER if arguments invalid
-
-function MsiDoActionA(hInstall: MSIHANDLE; szAction: LPCSTR): UINT; stdcall;
-{$EXTERNALSYM MsiDoActionA}
-function MsiDoActionW(hInstall: MSIHANDLE; szAction: LPCWSTR): UINT; stdcall;
-{$EXTERNALSYM MsiDoActionW}
-function MsiDoAction(hInstall: MSIHANDLE; szAction: LPCTSTR): UINT; stdcall;
-{$EXTERNALSYM MsiDoAction}
-
-// Execute another action sequence, as descibed in the specified table
-// Returns the same error codes as MsiDoAction
-
-function MsiSequenceA(hInstall: MSIHANDLE; szTable: LPCSTR; iSequenceMode: Integer): UINT; stdcall;
-{$EXTERNALSYM MsiSequenceA}
-function MsiSequenceW(hInstall: MSIHANDLE; szTable: LPCWSTR; iSequenceMode: Integer): UINT; stdcall;
-{$EXTERNALSYM MsiSequenceW}
-function MsiSequence(hInstall: MSIHANDLE; szTable: LPCTSTR; iSequenceMode: Integer): UINT; stdcall;
-{$EXTERNALSYM MsiSequence}
-
-// Send an error record to the installer for processing.
-// If field 0 (template) is not set, field 1 must be set to the error code,
-// corresponding the the error message in the Error database table,
-// and the message will be formatted using the template from the Error table
-// before passing it to the UI handler for display.
-// Returns Win32 button codes: IDOK IDCANCEL IDABORT IDRETRY IDIGNORE IDYES IDNO
-// or 0 if no action taken, or -1 if invalid argument or handle
-
-function MsiProcessMessage(hInstall: MSIHANDLE; eMessageType: INSTALLMESSAGE;
- hRecord: MSIHANDLE): Integer; stdcall;
-{$EXTERNALSYM MsiProcessMessage}
-
-// Evaluate a conditional expression containing property names and values
-
-function MsiEvaluateConditionA(hInstall: MSIHANDLE; szCondition: LPCSTR): MSICONDITION; stdcall;
-{$EXTERNALSYM MsiEvaluateConditionA}
-function MsiEvaluateConditionW(hInstall: MSIHANDLE; szCondition: LPCWSTR): MSICONDITION; stdcall;
-{$EXTERNALSYM MsiEvaluateConditionW}
-function MsiEvaluateCondition(hInstall: MSIHANDLE; szCondition: LPCTSTR): MSICONDITION; stdcall;
-{$EXTERNALSYM MsiEvaluateCondition}
-
-// Get the installed state and requested action state of a feature
-// Execution of this function sets the error record, accessible via MsiGetLastErrorRecord
-
-function MsiGetFeatureStateA(hInstall: MSIHANDLE; szFeature: LPCSTR;
- var piInstalled: INSTALLSTATE; var piAction: INSTALLSTATE): UINT; stdcall;
-{$EXTERNALSYM MsiGetFeatureStateA}
-function MsiGetFeatureStateW(hInstall: MSIHANDLE; szFeature: LPCWSTR;
- var piInstalled: INSTALLSTATE; var piAction: INSTALLSTATE): UINT; stdcall;
-{$EXTERNALSYM MsiGetFeatureStateW}
-function MsiGetFeatureState(hInstall: MSIHANDLE; szFeature: LPCTSTR;
- var piInstalled: INSTALLSTATE; var piAction: INSTALLSTATE): UINT; stdcall;
-{$EXTERNALSYM MsiGetFeatureState}
-
-// Request a feature to be set to a specified state
-// Execution of this function sets the error record, accessible via MsiGetLastErrorRecord
-
-function MsiSetFeatureStateA(hInstall: MSIHANDLE; szFeature: LPCSTR;
- iState: INSTALLSTATE): UINT; stdcall;
-{$EXTERNALSYM MsiSetFeatureStateA}
-function MsiSetFeatureStateW(hInstall: MSIHANDLE; szFeature: LPCWSTR;
- iState: INSTALLSTATE): UINT; stdcall;
-{$EXTERNALSYM MsiSetFeatureStateW}
-function MsiSetFeatureState(hInstall: MSIHANDLE; szFeature: LPCTSTR;
- iState: INSTALLSTATE): UINT; stdcall;
-{$EXTERNALSYM MsiSetFeatureState}
-
-// Set the attribute bits of a specified feature at runtime.
-// Execution of this function sets the error record, accessible via MsiGetLastErrorRecord
-
-function MsiSetFeatureAttributesA(hInstall: MSIHANDLE; szFeature: LPCSTR;
- dwAttributes: DWORD): UINT; stdcall;
-{$EXTERNALSYM MsiSetFeatureAttributesA}
-function MsiSetFeatureAttributesW(hInstall: MSIHANDLE; szFeature: LPCWSTR;
- dwAttributes: DWORD): UINT; stdcall;
-{$EXTERNALSYM MsiSetFeatureAttributesW}
-function MsiSetFeatureAttributes(hInstall: MSIHANDLE; szFeature: LPCTSTR;
- dwAttributes: DWORD): UINT; stdcall;
-{$EXTERNALSYM MsiSetFeatureAttributes}
-
-// Get the installed state and requested action state of a component
-// Execution of this function sets the error record, accessible via MsiGetLastErrorRecord
-
-function MsiGetComponentStateA(hInstall: MSIHANDLE; szComponent: LPCSTR;
- var piInstalled: INSTALLSTATE; var piAction: INSTALLSTATE): UINT; stdcall;
-{$EXTERNALSYM MsiGetComponentStateA}
-function MsiGetComponentStateW(hInstall: MSIHANDLE; szComponent: LPCWSTR;
- var piInstalled: INSTALLSTATE; var piAction: INSTALLSTATE): UINT; stdcall;
-{$EXTERNALSYM MsiGetComponentStateW}
-function MsiGetComponentState(hInstall: MSIHANDLE; szComponent: LPCTSTR;
- var piInstalled: INSTALLSTATE; var piAction: INSTALLSTATE): UINT; stdcall;
-{$EXTERNALSYM MsiGetComponentState}
-
-// Request a component to be set to a specified state
-// Execution of this function sets the error record, accessible via MsiGetLastErrorRecord
-
-function MsiSetComponentStateA(hInstall: MSIHANDLE; szComponent: LPCSTR;
- iState: INSTALLSTATE): UINT; stdcall;
-{$EXTERNALSYM MsiSetComponentStateA}
-function MsiSetComponentStateW(hInstall: MSIHANDLE; szComponent: LPCWSTR;
- iState: INSTALLSTATE): UINT; stdcall;
-{$EXTERNALSYM MsiSetComponentStateW}
-function MsiSetComponentState(hInstall: MSIHANDLE; szComponent: LPCTSTR;
- iState: INSTALLSTATE): UINT; stdcall;
-{$EXTERNALSYM MsiSetComponentState}
-
-// Return the disk cost for a feature and related features
-// Can specify either current feature state or proposed state
-// Can specify extent of related features to cost
-// Note that adding costs for several features may produce an
-// excessively large cost due to shared components and parents.
-// Execution of this function sets the error record, accessible via MsiGetLastErrorRecord
-
-function MsiGetFeatureCostA(hInstall: MSIHANDLE; szFeature: LPCSTR;
- iCostTree: MSICOSTTREE; iState: INSTALLSTATE; var piCost: Integer): UINT; stdcall;
-{$EXTERNALSYM MsiGetFeatureCostA}
-function MsiGetFeatureCostW(hInstall: MSIHANDLE; szFeature: LPCWSTR;
- iCostTree: MSICOSTTREE; iState: INSTALLSTATE; var piCost: Integer): UINT; stdcall;
-{$EXTERNALSYM MsiGetFeatureCostW}
-function MsiGetFeatureCost(hInstall: MSIHANDLE; szFeature: LPCTSTR;
- iCostTree: MSICOSTTREE; iState: INSTALLSTATE; var piCost: Integer): UINT; stdcall;
-{$EXTERNALSYM MsiGetFeatureCost}
-
-// Enumerates the costs and temporary costs per drives for
-// szComponent. If szComponent is set to NULL, it enumerates
-// the above costs for the engine, per drives.
-//
-// The enumeration is 0-based, i.e. it returns the data for
-// the first drive when called w/ dwIndex set to 0.
-//
-// Can specify either current feature state or proposed state.
-//
-// Execution of this function sets the error record, accessible
-// via MsiGetLastErrorRecord.
-
-function MsiEnumComponentCostsA(hInstall: MSIHANDLE; szComponent: LPCSTR; dwIndex: DWORD; iState: INSTALLSTATE;
- szDriveBuf: LPSTR; var pcchDriveBuf: DWORD; var piCost: INT; piTempCost: INT): UINT; stdcall;
-{$EXTERNALSYM MsiEnumComponentCostsA}
-function MsiEnumComponentCostsW(hInstall: MSIHANDLE; szComponent: LPCWSTR; dwIndex: DWORD; iState: INSTALLSTATE;
- szDriveBuf: LPWSTR; var pcchDriveBuf: DWORD; var piCost: INT; var piTempCost: INT): UINT; stdcall;
-{$EXTERNALSYM MsiEnumComponentCostsW}
-function MsiEnumComponentCosts(hInstall: MSIHANDLE; szComponent: LPCTSTR; dwIndex: DWORD; iState: INSTALLSTATE;
- szDriveBuf: LPTSTR; var pcchDriveBuf: DWORD; var piCost: INT; var piTempCost: INT): UINT; stdcall;
-{$EXTERNALSYM MsiEnumComponentCosts}
-
-// Set the install level for a full product installation (not a feature request)
-// Setting the value to 0 initialized components and features to the default level
-// Execution of this function sets the error record, accessible via MsiGetLastErrorRecord
-
-function MsiSetInstallLevel(hInstall: MSIHANDLE; iInstallLevel: Integer): UINT; stdcall;
-{$EXTERNALSYM MsiSetInstallLevel}
-
-// Get the valid install states for a feature, represented by bit flags
-// For each valid install state, a bit is set of value: (1 << INSTALLSTATE)
-// Execution of this function sets the error record, accessible via MsiGetLastErrorRecord
-
-function MsiGetFeatureValidStatesA(hInstall: MSIHANDLE; szFeature: LPCSTR;
- var dwInstallStates: DWORD): UINT; stdcall;
-{$EXTERNALSYM MsiGetFeatureValidStatesA}
-function MsiGetFeatureValidStatesW(hInstall: MSIHANDLE; szFeature: LPCWSTR;
- var dwInstallStates: DWORD): UINT; stdcall;
-{$EXTERNALSYM MsiGetFeatureValidStatesW}
-function MsiGetFeatureValidStates(hInstall: MSIHANDLE; szFeature: LPCTSTR;
- var dwInstallStates: DWORD): UINT; stdcall;
-{$EXTERNALSYM MsiGetFeatureValidStates}
-
-// Return the full source path for a folder in the Directory table
-// Execution of this function sets the error record, accessible via MsiGetLastErrorRecord
-
-function MsiGetSourcePathA(hInstall: MSIHANDLE; szFolder: LPCSTR; szPathBuf: LPSTR;
- var pcchPathBuf: DWORD): UINT; stdcall;
-{$EXTERNALSYM MsiGetSourcePathA}
-function MsiGetSourcePathW(hInstall: MSIHANDLE; szFolder: LPCWSTR; szPathBuf: LPWSTR;
- var pcchPathBuf: DWORD): UINT; stdcall;
-{$EXTERNALSYM MsiGetSourcePathW}
-function MsiGetSourcePath(hInstall: MSIHANDLE; szFolder: LPCTSTR; szPathBuf: LPTSTR;
- var pcchPathBuf: DWORD): UINT; stdcall;
-{$EXTERNALSYM MsiGetSourcePath}
-
-// Return the full target path for a folder in the Directory table
-// Execution of this function sets the error record, accessible via MsiGetLastErrorRecord
-
-function MsiGetTargetPathA(hInstall: MSIHANDLE; szFolder: LPCSTR;
- szPathBuf: LPSTR; var pcchPathBuf: DWORD): UINT; stdcall;
-{$EXTERNALSYM MsiGetTargetPathA}
-function MsiGetTargetPathW(hInstall: MSIHANDLE; szFolder: LPCWSTR;
- szPathBuf: LPWSTR; var pcchPathBuf: DWORD): UINT; stdcall;
-{$EXTERNALSYM MsiGetTargetPathW}
-function MsiGetTargetPath(hInstall: MSIHANDLE; szFolder: LPCTSTR;
- szPathBuf: LPTSTR; var pcchPathBuf: DWORD): UINT; stdcall;
-{$EXTERNALSYM MsiGetTargetPath}
-
-// Set the full target path for a folder in the Directory table
-// Execution of this function sets the error record, accessible via MsiGetLastErrorRecord
-
-function MsiSetTargetPathA(hInstall: MSIHANDLE; szFolder: LPCSTR;
- szFolderPath: LPCSTR): UINT; stdcall;
-{$EXTERNALSYM MsiSetTargetPathA}
-function MsiSetTargetPathW(hInstall: MSIHANDLE; szFolder: LPCWSTR;
- szFolderPath: LPCWSTR): UINT; stdcall;
-{$EXTERNALSYM MsiSetTargetPathW}
-function MsiSetTargetPath(hInstall: MSIHANDLE; szFolder: LPCTSTR;
- szFolderPath: LPCTSTR): UINT; stdcall;
-{$EXTERNALSYM MsiSetTargetPath}
-
-// Check to see if sufficent disk space is present for the current installation
-// Returns ERROR_SUCCESS, ERROR_DISK_FULL, ERROR_INVALID_HANDLE_STATE, or ERROR_INVALID_HANDLE
-
-function MsiVerifyDiskSpace(hInstall: MSIHANDLE): UINT; stdcall;
-{$EXTERNALSYM MsiVerifyDiskSpace}
-
-// --------------------------------------------------------------------------
-// Functions for rendering UI dialogs from the database representations.
-// Purpose is for product development, not for use during installation.
-// --------------------------------------------------------------------------
-
-// Enable UI in preview mode to facilitate authoring of UI dialogs.
-// The preview mode will end when the handle is closed.
-
-function MsiEnableUIPreview(hDatabase: MSIHANDLE; var phPreview: MSIHANDLE): UINT; stdcall;
-{$EXTERNALSYM MsiEnableUIPreview}
-
-// Display any UI dialog as modeless and inactive.
-// Supplying a null name will remove any current dialog.
-
-function MsiPreviewDialogA(hPreview: MSIHANDLE; szDialogName: LPCSTR): UINT; stdcall;
-{$EXTERNALSYM MsiPreviewDialogA}
-function MsiPreviewDialogW(hPreview: MSIHANDLE; szDialogName: LPCWSTR): UINT; stdcall;
-{$EXTERNALSYM MsiPreviewDialogW}
-function MsiPreviewDialog(hPreview: MSIHANDLE; szDialogName: LPCTSTR): UINT; stdcall;
-{$EXTERNALSYM MsiPreviewDialog}
-
-// Display a billboard within a host control in the displayed dialog.
-// Supplying a null billboard name will remove any billboard displayed.
-
-function MsiPreviewBillboardA(hPreview: MSIHANDLE; szControlName: LPCSTR;
- szBillboard: LPCSTR): UINT; stdcall;
-{$EXTERNALSYM MsiPreviewBillboardA}
-function MsiPreviewBillboardW(hPreview: MSIHANDLE; szControlName: LPCWSTR;
- szBillboard: LPCWSTR): UINT; stdcall;
-{$EXTERNALSYM MsiPreviewBillboardW}
-function MsiPreviewBillboard(hPreview: MSIHANDLE; szControlName: LPCTSTR;
- szBillboard: LPCTSTR): UINT; stdcall;
-{$EXTERNALSYM MsiPreviewBillboard}
-
-// --------------------------------------------------------------------------
-// Error handling not associated with any particular object
-// --------------------------------------------------------------------------
-
-// Return a record handle to the last function that generated an error record
-// Only specified functions will set the error record, or clear it if success
-// Field 1 of the record will contain the internal MSI error code
-// Other fields will contain data specific to the particular error
-// The error record is released internally after this function is executed
-
-function MsiGetLastErrorRecord: MSIHANDLE; stdcall;
-{$EXTERNALSYM MsiGetLastErrorRecord}
-
-implementation
-
-const
- msilib = 'msi.dll';
- {$IFDEF UNICODE}
- AWSuffix = 'W';
- {$ELSE}
- AWSuffix = 'A';
- {$ENDIF UNICODE}
-
-{$IFDEF DYNAMIC_LINK}
-
-var
- _MsiDatabaseOpenViewA: Pointer;
-
-function MsiDatabaseOpenViewA;
-begin
- GetProcedureAddress(_MsiDatabaseOpenViewA, msilib, 'MsiDatabaseOpenViewA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiDatabaseOpenViewA]
- end;
-end;
-
-var
- _MsiDatabaseOpenViewW: Pointer;
-
-function MsiDatabaseOpenViewW;
-begin
- GetProcedureAddress(_MsiDatabaseOpenViewW, msilib, 'MsiDatabaseOpenViewW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiDatabaseOpenViewW]
- end;
-end;
-
-var
- _MsiDatabaseOpenView: Pointer;
-
-function MsiDatabaseOpenView;
-begin
- GetProcedureAddress(_MsiDatabaseOpenView, msilib, 'MsiDatabaseOpenView' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiDatabaseOpenView]
- end;
-end;
-
-var
- _MsiViewGetErrorA: Pointer;
-
-function MsiViewGetErrorA;
-begin
- GetProcedureAddress(_MsiViewGetErrorA, msilib, 'MsiViewGetErrorA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiViewGetErrorA]
- end;
-end;
-
-var
- _MsiViewGetErrorW: Pointer;
-
-function MsiViewGetErrorW;
-begin
- GetProcedureAddress(_MsiViewGetErrorW, msilib, 'MsiViewGetErrorW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiViewGetErrorW]
- end;
-end;
-
-var
- _MsiViewGetError: Pointer;
-
-function MsiViewGetError;
-begin
- GetProcedureAddress(_MsiViewGetError, msilib, 'MsiViewGetError' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiViewGetError]
- end;
-end;
-
-var
- _MsiViewExecute: Pointer;
-
-function MsiViewExecute;
-begin
- GetProcedureAddress(_MsiViewExecute, msilib, 'MsiViewExecute');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiViewExecute]
- end;
-end;
-
-var
- _MsiViewFetch: Pointer;
-
-function MsiViewFetch;
-begin
- GetProcedureAddress(_MsiViewFetch, msilib, 'MsiViewFetch');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiViewFetch]
- end;
-end;
-
-var
- _MsiViewModify: Pointer;
-
-function MsiViewModify;
-begin
- GetProcedureAddress(_MsiViewModify, msilib, 'MsiViewModify');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiViewModify]
- end;
-end;
-
-var
- _MsiViewGetColumnInfo: Pointer;
-
-function MsiViewGetColumnInfo;
-begin
- GetProcedureAddress(_MsiViewGetColumnInfo, msilib, 'MsiViewGetColumnInfo');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiViewGetColumnInfo]
- end;
-end;
-
-var
- _MsiViewClose: Pointer;
-
-function MsiViewClose;
-begin
- GetProcedureAddress(_MsiViewClose, msilib, 'MsiViewClose');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiViewClose]
- end;
-end;
-
-var
- _MsiDatabaseGetPrimaryKeysA: Pointer;
-
-function MsiDatabaseGetPrimaryKeysA;
-begin
- GetProcedureAddress(_MsiDatabaseGetPrimaryKeysA, msilib, 'MsiDatabaseGetPrimaryKeysA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiDatabaseGetPrimaryKeysA]
- end;
-end;
-
-var
- _MsiDatabaseGetPrimaryKeysW: Pointer;
-
-function MsiDatabaseGetPrimaryKeysW;
-begin
- GetProcedureAddress(_MsiDatabaseGetPrimaryKeysW, msilib, 'MsiDatabaseGetPrimaryKeysW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiDatabaseGetPrimaryKeysW]
- end;
-end;
-
-var
- _MsiDatabaseGetPrimaryKeys: Pointer;
-
-function MsiDatabaseGetPrimaryKeys;
-begin
- GetProcedureAddress(_MsiDatabaseGetPrimaryKeys, msilib, 'MsiDatabaseGetPrimaryKeys' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiDatabaseGetPrimaryKeys]
- end;
-end;
-
-var
- _MsiDatabaseIsTablePersistentA: Pointer;
-
-function MsiDatabaseIsTablePersistentA;
-begin
- GetProcedureAddress(_MsiDatabaseIsTablePersistentA, msilib, 'MsiDatabaseIsTablePersistentA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiDatabaseIsTablePersistentA]
- end;
-end;
-
-var
- _MsiDatabaseIsTablePersistentW: Pointer;
-
-function MsiDatabaseIsTablePersistentW;
-begin
- GetProcedureAddress(_MsiDatabaseIsTablePersistentW, msilib, 'MsiDatabaseIsTablePersistentW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiDatabaseIsTablePersistentW]
- end;
-end;
-
-var
- _MsiDatabaseIsTablePersistent: Pointer;
-
-function MsiDatabaseIsTablePersistent;
-begin
- GetProcedureAddress(_MsiDatabaseIsTablePersistent, msilib, 'MsiDatabaseIsTablePersistent' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiDatabaseIsTablePersistent]
- end;
-end;
-
-var
- _MsiGetSummaryInformationA: Pointer;
-
-function MsiGetSummaryInformationA;
-begin
- GetProcedureAddress(_MsiGetSummaryInformationA, msilib, 'MsiGetSummaryInformationA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiGetSummaryInformationA]
- end;
-end;
-
-var
- _MsiGetSummaryInformationW: Pointer;
-
-function MsiGetSummaryInformationW;
-begin
- GetProcedureAddress(_MsiGetSummaryInformationW, msilib, 'MsiGetSummaryInformationW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiGetSummaryInformationW]
- end;
-end;
-
-var
- _MsiGetSummaryInformation: Pointer;
-
-function MsiGetSummaryInformation;
-begin
- GetProcedureAddress(_MsiGetSummaryInformation, msilib, 'MsiGetSummaryInformation' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiGetSummaryInformation]
- end;
-end;
-
-var
- _MsiSummaryInfoGetPropertyCount: Pointer;
-
-function MsiSummaryInfoGetPropertyCount;
-begin
- GetProcedureAddress(_MsiSummaryInfoGetPropertyCount, msilib, 'MsiSummaryInfoGetPropertyCount');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiSummaryInfoGetPropertyCount]
- end;
-end;
-
-var
- _MsiSummaryInfoSetPropertyA: Pointer;
-
-function MsiSummaryInfoSetPropertyA;
-begin
- GetProcedureAddress(_MsiSummaryInfoSetPropertyA, msilib, 'MsiSummaryInfoSetPropertyA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiSummaryInfoSetPropertyA]
- end;
-end;
-
-var
- _MsiSummaryInfoSetPropertyW: Pointer;
-
-function MsiSummaryInfoSetPropertyW;
-begin
- GetProcedureAddress(_MsiSummaryInfoSetPropertyW, msilib, 'MsiSummaryInfoSetPropertyW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiSummaryInfoSetPropertyW]
- end;
-end;
-
-var
- _MsiSummaryInfoSetProperty: Pointer;
-
-function MsiSummaryInfoSetProperty;
-begin
- GetProcedureAddress(_MsiSummaryInfoSetProperty, msilib, 'MsiSummaryInfoSetProperty' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiSummaryInfoSetProperty]
- end;
-end;
-
-var
- _MsiSummaryInfoGetPropertyA: Pointer;
-
-function MsiSummaryInfoGetPropertyA;
-begin
- GetProcedureAddress(_MsiSummaryInfoGetPropertyA, msilib, 'MsiSummaryInfoGetPropertyA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiSummaryInfoGetPropertyA]
- end;
-end;
-
-var
- _MsiSummaryInfoGetPropertyW: Pointer;
-
-function MsiSummaryInfoGetPropertyW;
-begin
- GetProcedureAddress(_MsiSummaryInfoGetPropertyW, msilib, 'MsiSummaryInfoGetPropertyW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiSummaryInfoGetPropertyW]
- end;
-end;
-
-var
- _MsiSummaryInfoGetProperty: Pointer;
-
-function MsiSummaryInfoGetProperty;
-begin
- GetProcedureAddress(_MsiSummaryInfoGetProperty, msilib, 'MsiSummaryInfoGetProperty' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiSummaryInfoGetProperty]
- end;
-end;
-
-var
- _MsiSummaryInfoPersist: Pointer;
-
-function MsiSummaryInfoPersist;
-begin
- GetProcedureAddress(_MsiSummaryInfoPersist, msilib, 'MsiSummaryInfoPersist');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiSummaryInfoPersist]
- end;
-end;
-
-var
- _MsiOpenDatabaseA: Pointer;
-
-function MsiOpenDatabaseA;
-begin
- GetProcedureAddress(_MsiOpenDatabaseA, msilib, 'MsiOpenDatabaseA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiOpenDatabaseA]
- end;
-end;
-
-var
- _MsiOpenDatabaseW: Pointer;
-
-function MsiOpenDatabaseW;
-begin
- GetProcedureAddress(_MsiOpenDatabaseW, msilib, 'MsiOpenDatabaseW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiOpenDatabaseW]
- end;
-end;
-
-var
- _MsiOpenDatabase: Pointer;
-
-function MsiOpenDatabase;
-begin
- GetProcedureAddress(_MsiOpenDatabase, msilib, 'MsiOpenDatabase' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiOpenDatabase]
- end;
-end;
-
-var
- _MsiDatabaseImportA: Pointer;
-
-function MsiDatabaseImportA;
-begin
- GetProcedureAddress(_MsiDatabaseImportA, msilib, 'MsiDatabaseImportA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiDatabaseImportA]
- end;
-end;
-
-var
- _MsiDatabaseImportW: Pointer;
-
-function MsiDatabaseImportW;
-begin
- GetProcedureAddress(_MsiDatabaseImportW, msilib, 'MsiDatabaseImportW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiDatabaseImportW]
- end;
-end;
-
-var
- _MsiDatabaseImport: Pointer;
-
-function MsiDatabaseImport;
-begin
- GetProcedureAddress(_MsiDatabaseImport, msilib, 'MsiDatabaseImport' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiDatabaseImport]
- end;
-end;
-
-var
- _MsiDatabaseExportA: Pointer;
-
-function MsiDatabaseExportA;
-begin
- GetProcedureAddress(_MsiDatabaseExportA, msilib, 'MsiDatabaseExportA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiDatabaseExportA]
- end;
-end;
-
-var
- _MsiDatabaseExportW: Pointer;
-
-function MsiDatabaseExportW;
-begin
- GetProcedureAddress(_MsiDatabaseExportW, msilib, 'MsiDatabaseExportW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiDatabaseExportW]
- end;
-end;
-
-var
- _MsiDatabaseExport: Pointer;
-
-function MsiDatabaseExport;
-begin
- GetProcedureAddress(_MsiDatabaseExport, msilib, 'MsiDatabaseExport' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiDatabaseExport]
- end;
-end;
-
-var
- _MsiDatabaseMergeA: Pointer;
-
-function MsiDatabaseMergeA;
-begin
- GetProcedureAddress(_MsiDatabaseMergeA, msilib, 'MsiDatabaseMergeA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiDatabaseMergeA]
- end;
-end;
-
-var
- _MsiDatabaseMergeW: Pointer;
-
-function MsiDatabaseMergeW;
-begin
- GetProcedureAddress(_MsiDatabaseMergeW, msilib, 'MsiDatabaseMergeW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiDatabaseMergeW]
- end;
-end;
-
-var
- _MsiDatabaseMerge: Pointer;
-
-function MsiDatabaseMerge;
-begin
- GetProcedureAddress(_MsiDatabaseMerge, msilib, 'MsiDatabaseMerge' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiDatabaseMerge]
- end;
-end;
-
-var
- _MsiDatabaseGenerateTransformA: Pointer;
-
-function MsiDatabaseGenerateTransformA;
-begin
- GetProcedureAddress(_MsiDatabaseGenerateTransformA, msilib, 'MsiDatabaseGenerateTransformA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiDatabaseGenerateTransformA]
- end;
-end;
-
-var
- _MsiDatabaseGenerateTransformW: Pointer;
-
-function MsiDatabaseGenerateTransformW;
-begin
- GetProcedureAddress(_MsiDatabaseGenerateTransformW, msilib, 'MsiDatabaseGenerateTransformW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiDatabaseGenerateTransformW]
- end;
-end;
-
-var
- _MsiDatabaseGenerateTransform: Pointer;
-
-function MsiDatabaseGenerateTransform;
-begin
- GetProcedureAddress(_MsiDatabaseGenerateTransform, msilib, 'MsiDatabaseGenerateTransform' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiDatabaseGenerateTransform]
- end;
-end;
-
-var
- _MsiDatabaseApplyTransformA: Pointer;
-
-function MsiDatabaseApplyTransformA;
-begin
- GetProcedureAddress(_MsiDatabaseApplyTransformA, msilib, 'MsiDatabaseApplyTransformA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiDatabaseApplyTransformA]
- end;
-end;
-
-var
- _MsiDatabaseApplyTransformW: Pointer;
-
-function MsiDatabaseApplyTransformW;
-begin
- GetProcedureAddress(_MsiDatabaseApplyTransformW, msilib, 'MsiDatabaseApplyTransformW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiDatabaseApplyTransformW]
- end;
-end;
-
-var
- _MsiDatabaseApplyTransform: Pointer;
-
-function MsiDatabaseApplyTransform;
-begin
- GetProcedureAddress(_MsiDatabaseApplyTransform, msilib, 'MsiDatabaseApplyTransform' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiDatabaseApplyTransform]
- end;
-end;
-
-var
- _MsiCreateTransformSummaryInfoA: Pointer;
-
-function MsiCreateTransformSummaryInfoA;
-begin
- GetProcedureAddress(_MsiCreateTransformSummaryInfoA, msilib, 'MsiCreateTransformSummaryInfoA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiCreateTransformSummaryInfoA]
- end;
-end;
-
-var
- _MsiCreateTransformSummaryInfoW: Pointer;
-
-function MsiCreateTransformSummaryInfoW;
-begin
- GetProcedureAddress(_MsiCreateTransformSummaryInfoW, msilib, 'MsiCreateTransformSummaryInfoW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiCreateTransformSummaryInfoW]
- end;
-end;
-
-var
- _MsiCreateTransformSummaryInfo: Pointer;
-
-function MsiCreateTransformSummaryInfo;
-begin
- GetProcedureAddress(_MsiCreateTransformSummaryInfo, msilib, 'MsiCreateTransformSummaryInfo' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiCreateTransformSummaryInfo]
- end;
-end;
-
-var
- _MsiDatabaseCommit: Pointer;
-
-function MsiDatabaseCommit;
-begin
- GetProcedureAddress(_MsiDatabaseCommit, msilib, 'MsiDatabaseCommit');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiDatabaseCommit]
- end;
-end;
-
-var
- _MsiGetDatabaseState: Pointer;
-
-function MsiGetDatabaseState;
-begin
- GetProcedureAddress(_MsiGetDatabaseState, msilib, 'MsiGetDatabaseState');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiGetDatabaseState]
- end;
-end;
-
-var
- _MsiCreateRecord: Pointer;
-
-function MsiCreateRecord;
-begin
- GetProcedureAddress(_MsiCreateRecord, msilib, 'MsiCreateRecord');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiCreateRecord]
- end;
-end;
-
-var
- _MsiRecordIsNull: Pointer;
-
-function MsiRecordIsNull;
-begin
- GetProcedureAddress(_MsiRecordIsNull, msilib, 'MsiRecordIsNull');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiRecordIsNull]
- end;
-end;
-
-var
- _MsiRecordDataSize: Pointer;
-
-function MsiRecordDataSize;
-begin
- GetProcedureAddress(_MsiRecordDataSize, msilib, 'MsiRecordDataSize');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiRecordDataSize]
- end;
-end;
-
-var
- _MsiRecordSetInteger: Pointer;
-
-function MsiRecordSetInteger;
-begin
- GetProcedureAddress(_MsiRecordSetInteger, msilib, 'MsiRecordSetInteger');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiRecordSetInteger]
- end;
-end;
-
-var
- _MsiRecordSetStringA: Pointer;
-
-function MsiRecordSetStringA;
-begin
- GetProcedureAddress(_MsiRecordSetStringA, msilib, 'MsiRecordSetStringA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiRecordSetStringA]
- end;
-end;
-
-var
- _MsiRecordSetStringW: Pointer;
-
-function MsiRecordSetStringW;
-begin
- GetProcedureAddress(_MsiRecordSetStringW, msilib, 'MsiRecordSetStringW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiRecordSetStringW]
- end;
-end;
-
-var
- _MsiRecordSetString: Pointer;
-
-function MsiRecordSetString;
-begin
- GetProcedureAddress(_MsiRecordSetString, msilib, 'MsiRecordSetString' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiRecordSetString]
- end;
-end;
-
-var
- _MsiRecordGetInteger: Pointer;
-
-function MsiRecordGetInteger;
-begin
- GetProcedureAddress(_MsiRecordGetInteger, msilib, 'MsiRecordGetInteger');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiRecordGetInteger]
- end;
-end;
-
-var
- _MsiRecordGetStringA: Pointer;
-
-function MsiRecordGetStringA;
-begin
- GetProcedureAddress(_MsiRecordGetStringA, msilib, 'MsiRecordGetStringA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiRecordGetStringA]
- end;
-end;
-
-var
- _MsiRecordGetStringW: Pointer;
-
-function MsiRecordGetStringW;
-begin
- GetProcedureAddress(_MsiRecordGetStringW, msilib, 'MsiRecordGetStringW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiRecordGetStringW]
- end;
-end;
-
-var
- _MsiRecordGetString: Pointer;
-
-function MsiRecordGetString;
-begin
- GetProcedureAddress(_MsiRecordGetString, msilib, 'MsiRecordGetString' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiRecordGetString]
- end;
-end;
-
-var
- _MsiRecordGetFieldCount: Pointer;
-
-function MsiRecordGetFieldCount;
-begin
- GetProcedureAddress(_MsiRecordGetFieldCount, msilib, 'MsiRecordGetFieldCount');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiRecordGetFieldCount]
- end;
-end;
-
-var
- _MsiRecordSetStreamA: Pointer;
-
-function MsiRecordSetStreamA;
-begin
- GetProcedureAddress(_MsiRecordSetStreamA, msilib, 'MsiRecordSetStreamA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiRecordSetStreamA]
- end;
-end;
-
-var
- _MsiRecordSetStreamW: Pointer;
-
-function MsiRecordSetStreamW;
-begin
- GetProcedureAddress(_MsiRecordSetStreamW, msilib, 'MsiRecordSetStreamW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiRecordSetStreamW]
- end;
-end;
-
-var
- _MsiRecordSetStream: Pointer;
-
-function MsiRecordSetStream;
-begin
- GetProcedureAddress(_MsiRecordSetStream, msilib, 'MsiRecordSetStream' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiRecordSetStream]
- end;
-end;
-
-var
- _MsiRecordReadStream: Pointer;
-
-function MsiRecordReadStream;
-begin
- GetProcedureAddress(_MsiRecordReadStream, msilib, 'MsiRecordReadStream');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiRecordReadStream]
- end;
-end;
-
-var
- _MsiRecordClearData: Pointer;
-
-function MsiRecordClearData;
-begin
- GetProcedureAddress(_MsiRecordClearData, msilib, 'MsiRecordClearData');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiRecordClearData]
- end;
-end;
-
-var
- _MsiGetActiveDatabase: Pointer;
-
-function MsiGetActiveDatabase;
-begin
- GetProcedureAddress(_MsiGetActiveDatabase, msilib, 'MsiGetActiveDatabase');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiGetActiveDatabase]
- end;
-end;
-
-var
- _MsiSetPropertyA: Pointer;
-
-function MsiSetPropertyA;
-begin
- GetProcedureAddress(_MsiSetPropertyA, msilib, 'MsiSetPropertyA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiSetPropertyA]
- end;
-end;
-
-var
- _MsiSetPropertyW: Pointer;
-
-function MsiSetPropertyW;
-begin
- GetProcedureAddress(_MsiSetPropertyW, msilib, 'MsiSetPropertyW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiSetPropertyW]
- end;
-end;
-
-var
- _MsiSetProperty: Pointer;
-
-function MsiSetProperty;
-begin
- GetProcedureAddress(_MsiSetProperty, msilib, 'MsiSetProperty' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiSetProperty]
- end;
-end;
-
-var
- _MsiGetPropertyA: Pointer;
-
-function MsiGetPropertyA;
-begin
- GetProcedureAddress(_MsiGetPropertyA, msilib, 'MsiGetPropertyA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiGetPropertyA]
- end;
-end;
-
-var
- _MsiGetPropertyW: Pointer;
-
-function MsiGetPropertyW;
-begin
- GetProcedureAddress(_MsiGetPropertyW, msilib, 'MsiGetPropertyW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiGetPropertyW]
- end;
-end;
-
-var
- _MsiGetProperty: Pointer;
-
-function MsiGetProperty;
-begin
- GetProcedureAddress(_MsiGetProperty, msilib, 'MsiGetProperty' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiGetProperty]
- end;
-end;
-
-var
- _MsiGetLanguage: Pointer;
-
-function MsiGetLanguage;
-begin
- GetProcedureAddress(_MsiGetLanguage, msilib, 'MsiGetLanguage');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiGetLanguage]
- end;
-end;
-
-var
- _MsiGetMode: Pointer;
-
-function MsiGetMode;
-begin
- GetProcedureAddress(_MsiGetMode, msilib, 'MsiGetMode');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiGetMode]
- end;
-end;
-
-var
- _MsiSetMode: Pointer;
-
-function MsiSetMode;
-begin
- GetProcedureAddress(_MsiSetMode, msilib, 'MsiSetMode');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiSetMode]
- end;
-end;
-
-var
- _MsiFormatRecordA: Pointer;
-
-function MsiFormatRecordA;
-begin
- GetProcedureAddress(_MsiFormatRecordA, msilib, 'MsiFormatRecordA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiFormatRecordA]
- end;
-end;
-
-var
- _MsiFormatRecordW: Pointer;
-
-function MsiFormatRecordW;
-begin
- GetProcedureAddress(_MsiFormatRecordW, msilib, 'MsiFormatRecordW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiFormatRecordW]
- end;
-end;
-
-var
- _MsiFormatRecord: Pointer;
-
-function MsiFormatRecord;
-begin
- GetProcedureAddress(_MsiFormatRecord, msilib, 'MsiFormatRecord' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiFormatRecord]
- end;
-end;
-
-var
- _MsiDoActionA: Pointer;
-
-function MsiDoActionA;
-begin
- GetProcedureAddress(_MsiDoActionA, msilib, 'MsiDoActionA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiDoActionA]
- end;
-end;
-
-var
- _MsiDoActionW: Pointer;
-
-function MsiDoActionW;
-begin
- GetProcedureAddress(_MsiDoActionW, msilib, 'MsiDoActionW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiDoActionW]
- end;
-end;
-
-var
- _MsiDoAction: Pointer;
-
-function MsiDoAction;
-begin
- GetProcedureAddress(_MsiDoAction, msilib, 'MsiDoAction' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiDoAction]
- end;
-end;
-
-var
- _MsiSequenceA: Pointer;
-
-function MsiSequenceA;
-begin
- GetProcedureAddress(_MsiSequenceA, msilib, 'MsiSequenceA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiSequenceA]
- end;
-end;
-
-var
- _MsiSequenceW: Pointer;
-
-function MsiSequenceW;
-begin
- GetProcedureAddress(_MsiSequenceW, msilib, 'MsiSequenceW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiSequenceW]
- end;
-end;
-
-var
- _MsiSequence: Pointer;
-
-function MsiSequence;
-begin
- GetProcedureAddress(_MsiSequence, msilib, 'MsiSequence' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiSequence]
- end;
-end;
-
-var
- _MsiProcessMessage: Pointer;
-
-function MsiProcessMessage;
-begin
- GetProcedureAddress(_MsiProcessMessage, msilib, 'MsiProcessMessage');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiProcessMessage]
- end;
-end;
-
-var
- _MsiEvaluateConditionA: Pointer;
-
-function MsiEvaluateConditionA;
-begin
- GetProcedureAddress(_MsiEvaluateConditionA, msilib, 'MsiEvaluateConditionA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiEvaluateConditionA]
- end;
-end;
-
-var
- _MsiEvaluateConditionW: Pointer;
-
-function MsiEvaluateConditionW;
-begin
- GetProcedureAddress(_MsiEvaluateConditionW, msilib, 'MsiEvaluateConditionW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiEvaluateConditionW]
- end;
-end;
-
-var
- _MsiEvaluateCondition: Pointer;
-
-function MsiEvaluateCondition;
-begin
- GetProcedureAddress(_MsiEvaluateCondition, msilib, 'MsiEvaluateCondition' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiEvaluateCondition]
- end;
-end;
-
-var
- _MsiGetFeatureStateA: Pointer;
-
-function MsiGetFeatureStateA;
-begin
- GetProcedureAddress(_MsiGetFeatureStateA, msilib, 'MsiGetFeatureStateA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiGetFeatureStateA]
- end;
-end;
-
-var
- _MsiGetFeatureStateW: Pointer;
-
-function MsiGetFeatureStateW;
-begin
- GetProcedureAddress(_MsiGetFeatureStateW, msilib, 'MsiGetFeatureStateW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiGetFeatureStateW]
- end;
-end;
-
-var
- _MsiGetFeatureState: Pointer;
-
-function MsiGetFeatureState;
-begin
- GetProcedureAddress(_MsiGetFeatureState, msilib, 'MsiGetFeatureState' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiGetFeatureState]
- end;
-end;
-
-var
- _MsiSetFeatureStateA: Pointer;
-
-function MsiSetFeatureStateA;
-begin
- GetProcedureAddress(_MsiSetFeatureStateA, msilib, 'MsiSetFeatureStateA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiSetFeatureStateA]
- end;
-end;
-
-var
- _MsiSetFeatureStateW: Pointer;
-
-function MsiSetFeatureStateW;
-begin
- GetProcedureAddress(_MsiSetFeatureStateW, msilib, 'MsiSetFeatureStateW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiSetFeatureStateW]
- end;
-end;
-
-var
- _MsiSetFeatureState: Pointer;
-
-function MsiSetFeatureState;
-begin
- GetProcedureAddress(_MsiSetFeatureState, msilib, 'MsiSetFeatureState' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiSetFeatureState]
- end;
-end;
-
-var
- _MsiSetFeatureAttributesA: Pointer;
-
-function MsiSetFeatureAttributesA;
-begin
- GetProcedureAddress(_MsiSetFeatureAttributesA, msilib, 'MsiSetFeatureAttributesA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiSetFeatureAttributesA]
- end;
-end;
-
-var
- _MsiSetFeatureAttributesW: Pointer;
-
-function MsiSetFeatureAttributesW;
-begin
- GetProcedureAddress(_MsiSetFeatureAttributesW, msilib, 'MsiSetFeatureAttributesW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiSetFeatureAttributesW]
- end;
-end;
-
-var
- _MsiSetFeatureAttributes: Pointer;
-
-function MsiSetFeatureAttributes;
-begin
- GetProcedureAddress(_MsiSetFeatureAttributes, msilib, 'MsiSetFeatureAttributes' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiSetFeatureAttributes]
- end;
-end;
-
-var
- _MsiGetComponentStateA: Pointer;
-
-function MsiGetComponentStateA;
-begin
- GetProcedureAddress(_MsiGetComponentStateA, msilib, 'MsiGetComponentStateA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiGetComponentStateA]
- end;
-end;
-
-var
- _MsiGetComponentStateW: Pointer;
-
-function MsiGetComponentStateW;
-begin
- GetProcedureAddress(_MsiGetComponentStateW, msilib, 'MsiGetComponentStateW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiGetComponentStateW]
- end;
-end;
-
-var
- _MsiGetComponentState: Pointer;
-
-function MsiGetComponentState;
-begin
- GetProcedureAddress(_MsiGetComponentState, msilib, 'MsiGetComponentState' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiGetComponentState]
- end;
-end;
-
-var
- _MsiSetComponentStateA: Pointer;
-
-function MsiSetComponentStateA;
-begin
- GetProcedureAddress(_MsiSetComponentStateA, msilib, 'MsiSetComponentStateA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiSetComponentStateA]
- end;
-end;
-
-var
- _MsiSetComponentStateW: Pointer;
-
-function MsiSetComponentStateW;
-begin
- GetProcedureAddress(_MsiSetComponentStateW, msilib, 'MsiSetComponentStateW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiSetComponentStateW]
- end;
-end;
-
-var
- _MsiSetComponentState: Pointer;
-
-function MsiSetComponentState;
-begin
- GetProcedureAddress(_MsiSetComponentState, msilib, 'MsiSetComponentState' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiSetComponentState]
- end;
-end;
-
-var
- _MsiGetFeatureCostA: Pointer;
-
-function MsiGetFeatureCostA;
-begin
- GetProcedureAddress(_MsiGetFeatureCostA, msilib, 'MsiGetFeatureCostA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiGetFeatureCostA]
- end;
-end;
-
-var
- _MsiGetFeatureCostW: Pointer;
-
-function MsiGetFeatureCostW;
-begin
- GetProcedureAddress(_MsiGetFeatureCostW, msilib, 'MsiGetFeatureCostW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiGetFeatureCostW]
- end;
-end;
-
-var
- _MsiGetFeatureCost: Pointer;
-
-function MsiGetFeatureCost;
-begin
- GetProcedureAddress(_MsiGetFeatureCost, msilib, 'MsiGetFeatureCost' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiGetFeatureCost]
- end;
-end;
-
-var
- _MsiEnumComponentCostsA: Pointer;
-
-function MsiEnumComponentCostsA;
-begin
- GetProcedureAddress(_MsiEnumComponentCostsA, msilib, 'MsiEnumComponentCostsA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiEnumComponentCostsA]
- end;
-end;
-
-var
- _MsiEnumComponentCostsW: Pointer;
-
-function MsiEnumComponentCostsW;
-begin
- GetProcedureAddress(_MsiEnumComponentCostsW, msilib, 'MsiEnumComponentCostsW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiEnumComponentCostsW]
- end;
-end;
-
-var
- _MsiEnumComponentCosts: Pointer;
-
-function MsiEnumComponentCosts;
-begin
- GetProcedureAddress(_MsiEnumComponentCosts, msilib, 'MsiEnumComponentCosts' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiEnumComponentCosts]
- end;
-end;
-
-var
- _MsiSetInstallLevel: Pointer;
-
-function MsiSetInstallLevel;
-begin
- GetProcedureAddress(_MsiSetInstallLevel, msilib, 'MsiSetInstallLevel');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiSetInstallLevel]
- end;
-end;
-
-var
- _MsiGetFeatureValidStatesA: Pointer;
-
-function MsiGetFeatureValidStatesA;
-begin
- GetProcedureAddress(_MsiGetFeatureValidStatesA, msilib, 'MsiGetFeatureValidStatesA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiGetFeatureValidStatesA]
- end;
-end;
-
-var
- _MsiGetFeatureValidStatesW: Pointer;
-
-function MsiGetFeatureValidStatesW;
-begin
- GetProcedureAddress(_MsiGetFeatureValidStatesW, msilib, 'MsiGetFeatureValidStatesW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiGetFeatureValidStatesW]
- end;
-end;
-
-var
- _MsiGetFeatureValidStates: Pointer;
-
-function MsiGetFeatureValidStates;
-begin
- GetProcedureAddress(_MsiGetFeatureValidStates, msilib, 'MsiGetFeatureValidStates' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiGetFeatureValidStates]
- end;
-end;
-
-var
- _MsiGetSourcePathA: Pointer;
-
-function MsiGetSourcePathA;
-begin
- GetProcedureAddress(_MsiGetSourcePathA, msilib, 'MsiGetSourcePathA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiGetSourcePathA]
- end;
-end;
-
-var
- _MsiGetSourcePathW: Pointer;
-
-function MsiGetSourcePathW;
-begin
- GetProcedureAddress(_MsiGetSourcePathW, msilib, 'MsiGetSourcePathW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiGetSourcePathW]
- end;
-end;
-
-var
- _MsiGetSourcePath: Pointer;
-
-function MsiGetSourcePath;
-begin
- GetProcedureAddress(_MsiGetSourcePath, msilib, 'MsiGetSourcePath' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiGetSourcePath]
- end;
-end;
-
-var
- _MsiGetTargetPathA: Pointer;
-
-function MsiGetTargetPathA;
-begin
- GetProcedureAddress(_MsiGetTargetPathA, msilib, 'MsiGetTargetPathA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiGetTargetPathA]
- end;
-end;
-
-var
- _MsiGetTargetPathW: Pointer;
-
-function MsiGetTargetPathW;
-begin
- GetProcedureAddress(_MsiGetTargetPathW, msilib, 'MsiGetTargetPathW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiGetTargetPathW]
- end;
-end;
-
-var
- _MsiGetTargetPath: Pointer;
-
-function MsiGetTargetPath;
-begin
- GetProcedureAddress(_MsiGetTargetPath, msilib, 'MsiGetTargetPath' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiGetTargetPath]
- end;
-end;
-
-var
- _MsiSetTargetPathA: Pointer;
-
-function MsiSetTargetPathA;
-begin
- GetProcedureAddress(_MsiSetTargetPathA, msilib, 'MsiSetTargetPathA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiSetTargetPathA]
- end;
-end;
-
-var
- _MsiSetTargetPathW: Pointer;
-
-function MsiSetTargetPathW;
-begin
- GetProcedureAddress(_MsiSetTargetPathW, msilib, 'MsiSetTargetPathW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiSetTargetPathW]
- end;
-end;
-
-var
- _MsiSetTargetPath: Pointer;
-
-function MsiSetTargetPath;
-begin
- GetProcedureAddress(_MsiSetTargetPath, msilib, 'MsiSetTargetPath' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiSetTargetPath]
- end;
-end;
-
-var
- _MsiVerifyDiskSpace: Pointer;
-
-function MsiVerifyDiskSpace;
-begin
- GetProcedureAddress(_MsiVerifyDiskSpace, msilib, 'MsiVerifyDiskSpace');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiVerifyDiskSpace]
- end;
-end;
-
-var
- _MsiEnableUIPreview: Pointer;
-
-function MsiEnableUIPreview;
-begin
- GetProcedureAddress(_MsiEnableUIPreview, msilib, 'MsiEnableUIPreview');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiEnableUIPreview]
- end;
-end;
-
-var
- _MsiPreviewDialogA: Pointer;
-
-function MsiPreviewDialogA;
-begin
- GetProcedureAddress(_MsiPreviewDialogA, msilib, 'MsiPreviewDialogA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiPreviewDialogA]
- end;
-end;
-
-var
- _MsiPreviewDialogW: Pointer;
-
-function MsiPreviewDialogW;
-begin
- GetProcedureAddress(_MsiPreviewDialogW, msilib, 'MsiPreviewDialogW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiPreviewDialogW]
- end;
-end;
-
-var
- _MsiPreviewDialog: Pointer;
-
-function MsiPreviewDialog;
-begin
- GetProcedureAddress(_MsiPreviewDialog, msilib, 'MsiPreviewDialog' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiPreviewDialog]
- end;
-end;
-
-var
- _MsiPreviewBillboardA: Pointer;
-
-function MsiPreviewBillboardA;
-begin
- GetProcedureAddress(_MsiPreviewBillboardA, msilib, 'MsiPreviewBillboardA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiPreviewBillboardA]
- end;
-end;
-
-var
- _MsiPreviewBillboardW: Pointer;
-
-function MsiPreviewBillboardW;
-begin
- GetProcedureAddress(_MsiPreviewBillboardW, msilib, 'MsiPreviewBillboardW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiPreviewBillboardW]
- end;
-end;
-
-var
- _MsiPreviewBillboard: Pointer;
-
-function MsiPreviewBillboard;
-begin
- GetProcedureAddress(_MsiPreviewBillboard, msilib, 'MsiPreviewBillboard' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiPreviewBillboard]
- end;
-end;
-
-var
- _MsiGetLastErrorRecord: Pointer;
-
-function MsiGetLastErrorRecord;
-begin
- GetProcedureAddress(_MsiGetLastErrorRecord, msilib, 'MsiGetLastErrorRecord');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsiGetLastErrorRecord]
- end;
-end;
-
-{$ELSE}
-
-function MsiDatabaseOpenViewA; external msilib name 'MsiDatabaseOpenViewA';
-function MsiDatabaseOpenViewW; external msilib name 'MsiDatabaseOpenViewW';
-function MsiDatabaseOpenView; external msilib name 'MsiDatabaseOpenView' + AWSuffix;
-function MsiViewGetErrorA; external msilib name 'MsiViewGetErrorA';
-function MsiViewGetErrorW; external msilib name 'MsiViewGetErrorW';
-function MsiViewGetError; external msilib name 'MsiViewGetError' + AWSuffix;
-function MsiViewExecute; external msilib name 'MsiViewExecute';
-function MsiViewFetch; external msilib name 'MsiViewFetch';
-function MsiViewModify; external msilib name 'MsiViewModify';
-function MsiViewGetColumnInfo; external msilib name 'MsiViewGetColumnInfo';
-function MsiViewClose; external msilib name 'MsiViewClose';
-function MsiDatabaseGetPrimaryKeysA; external msilib name 'MsiDatabaseGetPrimaryKeysA';
-function MsiDatabaseGetPrimaryKeysW; external msilib name 'MsiDatabaseGetPrimaryKeysW';
-function MsiDatabaseGetPrimaryKeys; external msilib name 'MsiDatabaseGetPrimaryKeys' + AWSuffix;
-function MsiDatabaseIsTablePersistentA; external msilib name 'MsiDatabaseIsTablePersistentA';
-function MsiDatabaseIsTablePersistentW; external msilib name 'MsiDatabaseIsTablePersistentW';
-function MsiDatabaseIsTablePersistent; external msilib name 'MsiDatabaseIsTablePersistent' + AWSuffix;
-function MsiGetSummaryInformationA; external msilib name 'MsiGetSummaryInformationA';
-function MsiGetSummaryInformationW; external msilib name 'MsiGetSummaryInformationW';
-function MsiGetSummaryInformation; external msilib name 'MsiGetSummaryInformation' + AWSuffix;
-function MsiSummaryInfoGetPropertyCount; external msilib name 'MsiSummaryInfoGetPropertyCount';
-function MsiSummaryInfoSetPropertyA; external msilib name 'MsiSummaryInfoSetPropertyA';
-function MsiSummaryInfoSetPropertyW; external msilib name 'MsiSummaryInfoSetPropertyW';
-function MsiSummaryInfoSetProperty; external msilib name 'MsiSummaryInfoSetProperty' + AWSuffix;
-function MsiSummaryInfoGetPropertyA; external msilib name 'MsiSummaryInfoGetPropertyA';
-function MsiSummaryInfoGetPropertyW; external msilib name 'MsiSummaryInfoGetPropertyW';
-function MsiSummaryInfoGetProperty; external msilib name 'MsiSummaryInfoGetProperty' + AWSuffix;
-function MsiSummaryInfoPersist; external msilib name 'MsiSummaryInfoPersist';
-function MsiOpenDatabaseA; external msilib name 'MsiOpenDatabaseA';
-function MsiOpenDatabaseW; external msilib name 'MsiOpenDatabaseW';
-function MsiOpenDatabase; external msilib name 'MsiOpenDatabase' + AWSuffix;
-function MsiDatabaseImportA; external msilib name 'MsiDatabaseImportA';
-function MsiDatabaseImportW; external msilib name 'MsiDatabaseImportW';
-function MsiDatabaseImport; external msilib name 'MsiDatabaseImport' + AWSuffix;
-function MsiDatabaseExportA; external msilib name 'MsiDatabaseExportA';
-function MsiDatabaseExportW; external msilib name 'MsiDatabaseExportW';
-function MsiDatabaseExport; external msilib name 'MsiDatabaseExport' + AWSuffix;
-function MsiDatabaseMergeA; external msilib name 'MsiDatabaseMergeA';
-function MsiDatabaseMergeW; external msilib name 'MsiDatabaseMergeW';
-function MsiDatabaseMerge; external msilib name 'MsiDatabaseMerge' + AWSuffix;
-function MsiDatabaseGenerateTransformA; external msilib name 'MsiDatabaseGenerateTransformA';
-function MsiDatabaseGenerateTransformW; external msilib name 'MsiDatabaseGenerateTransformW';
-function MsiDatabaseGenerateTransform; external msilib name 'MsiDatabaseGenerateTransform' + AWSuffix;
-function MsiDatabaseApplyTransformA; external msilib name 'MsiDatabaseApplyTransformA';
-function MsiDatabaseApplyTransformW; external msilib name 'MsiDatabaseApplyTransformW';
-function MsiDatabaseApplyTransform; external msilib name 'MsiDatabaseApplyTransform' + AWSuffix;
-function MsiCreateTransformSummaryInfoA; external msilib name 'MsiCreateTransformSummaryInfoA';
-function MsiCreateTransformSummaryInfoW; external msilib name 'MsiCreateTransformSummaryInfoW';
-function MsiCreateTransformSummaryInfo; external msilib name 'MsiCreateTransformSummaryInfo' + AWSuffix;
-function MsiDatabaseCommit; external msilib name 'MsiDatabaseCommit';
-function MsiGetDatabaseState; external msilib name 'MsiGetDatabaseState';
-function MsiCreateRecord; external msilib name 'MsiCreateRecord';
-function MsiRecordIsNull; external msilib name 'MsiRecordIsNull';
-function MsiRecordDataSize; external msilib name 'MsiRecordDataSize';
-function MsiRecordSetInteger; external msilib name 'MsiRecordSetInteger';
-function MsiRecordSetStringA; external msilib name 'MsiRecordSetStringA';
-function MsiRecordSetStringW; external msilib name 'MsiRecordSetStringW';
-function MsiRecordSetString; external msilib name 'MsiRecordSetString' + AWSuffix;
-function MsiRecordGetInteger; external msilib name 'MsiRecordGetInteger';
-function MsiRecordGetStringA; external msilib name 'MsiRecordGetStringA';
-function MsiRecordGetStringW; external msilib name 'MsiRecordGetStringW';
-function MsiRecordGetString; external msilib name 'MsiRecordGetString' + AWSuffix;
-function MsiRecordGetFieldCount; external msilib name 'MsiRecordGetFieldCount';
-function MsiRecordSetStreamA; external msilib name 'MsiRecordSetStreamA';
-function MsiRecordSetStreamW; external msilib name 'MsiRecordSetStreamW';
-function MsiRecordSetStream; external msilib name 'MsiRecordSetStream' + AWSuffix;
-function MsiRecordReadStream; external msilib name 'MsiRecordReadStream';
-function MsiRecordClearData; external msilib name 'MsiRecordClearData';
-function MsiGetActiveDatabase; external msilib name 'MsiGetActiveDatabase';
-function MsiSetPropertyA; external msilib name 'MsiSetPropertyA';
-function MsiSetPropertyW; external msilib name 'MsiSetPropertyW';
-function MsiSetProperty; external msilib name 'MsiSetProperty' + AWSuffix;
-function MsiGetPropertyA; external msilib name 'MsiGetPropertyA';
-function MsiGetPropertyW; external msilib name 'MsiGetPropertyW';
-function MsiGetProperty; external msilib name 'MsiGetProperty' + AWSuffix;
-function MsiGetLanguage; external msilib name 'MsiGetLanguage';
-function MsiGetMode; external msilib name 'MsiGetMode';
-function MsiSetMode; external msilib name 'MsiSetMode';
-function MsiFormatRecordA; external msilib name 'MsiFormatRecordA';
-function MsiFormatRecordW; external msilib name 'MsiFormatRecordW';
-function MsiFormatRecord; external msilib name 'MsiFormatRecord' + AWSuffix;
-function MsiDoActionA; external msilib name 'MsiDoActionA';
-function MsiDoActionW; external msilib name 'MsiDoActionW';
-function MsiDoAction; external msilib name 'MsiDoAction' + AWSuffix;
-function MsiSequenceA; external msilib name 'MsiSequenceA';
-function MsiSequenceW; external msilib name 'MsiSequenceW';
-function MsiSequence; external msilib name 'MsiSequence' + AWSuffix;
-function MsiProcessMessage; external msilib name 'MsiProcessMessage';
-function MsiEvaluateConditionA; external msilib name 'MsiEvaluateConditionA';
-function MsiEvaluateConditionW; external msilib name 'MsiEvaluateConditionW';
-function MsiEvaluateCondition; external msilib name 'MsiEvaluateCondition' + AWSuffix;
-function MsiGetFeatureStateA; external msilib name 'MsiGetFeatureStateA';
-function MsiGetFeatureStateW; external msilib name 'MsiGetFeatureStateW';
-function MsiGetFeatureState; external msilib name 'MsiGetFeatureState' + AWSuffix;
-function MsiSetFeatureStateA; external msilib name 'MsiSetFeatureStateA';
-function MsiSetFeatureStateW; external msilib name 'MsiSetFeatureStateW';
-function MsiSetFeatureState; external msilib name 'MsiSetFeatureState' + AWSuffix;
-function MsiSetFeatureAttributesA; external msilib name 'MsiSetFeatureAttributesA';
-function MsiSetFeatureAttributesW; external msilib name 'MsiSetFeatureAttributesW';
-function MsiSetFeatureAttributes; external msilib name 'MsiSetFeatureAttributes' + AWSuffix;
-function MsiGetComponentStateA; external msilib name 'MsiGetComponentStateA';
-function MsiGetComponentStateW; external msilib name 'MsiGetComponentStateW';
-function MsiGetComponentState; external msilib name 'MsiGetComponentState' + AWSuffix;
-function MsiSetComponentStateA; external msilib name 'MsiSetComponentStateA';
-function MsiSetComponentStateW; external msilib name 'MsiSetComponentStateW';
-function MsiSetComponentState; external msilib name 'MsiSetComponentState' + AWSuffix;
-function MsiGetFeatureCostA; external msilib name 'MsiGetFeatureCostA';
-function MsiGetFeatureCostW; external msilib name 'MsiGetFeatureCostW';
-function MsiGetFeatureCost; external msilib name 'MsiGetFeatureCost' + AWSuffix;
-function MsiEnumComponentCostsA; external msilib name 'MsiEnumComponentCostsA';
-function MsiEnumComponentCostsW; external msilib name 'MsiEnumComponentCostsW';
-function MsiEnumComponentCosts; external msilib name 'MsiEnumComponentCosts' + AWSuffix;
-function MsiSetInstallLevel; external msilib name 'MsiSetInstallLevel';
-function MsiGetFeatureValidStatesA; external msilib name 'MsiGetFeatureValidStatesA';
-function MsiGetFeatureValidStatesW; external msilib name 'MsiGetFeatureValidStatesW';
-function MsiGetFeatureValidStates; external msilib name 'MsiGetFeatureValidStates' + AWSuffix;
-function MsiGetSourcePathA; external msilib name 'MsiGetSourcePathA';
-function MsiGetSourcePathW; external msilib name 'MsiGetSourcePathW';
-function MsiGetSourcePath; external msilib name 'MsiGetSourcePath' + AWSuffix;
-function MsiGetTargetPathA; external msilib name 'MsiGetTargetPathA';
-function MsiGetTargetPathW; external msilib name 'MsiGetTargetPathW';
-function MsiGetTargetPath; external msilib name 'MsiGetTargetPath' + AWSuffix;
-function MsiSetTargetPathA; external msilib name 'MsiSetTargetPathA';
-function MsiSetTargetPathW; external msilib name 'MsiSetTargetPathW';
-function MsiSetTargetPath; external msilib name 'MsiSetTargetPath' + AWSuffix;
-function MsiVerifyDiskSpace; external msilib name 'MsiVerifyDiskSpace';
-function MsiEnableUIPreview; external msilib name 'MsiEnableUIPreview';
-function MsiPreviewDialogA; external msilib name 'MsiPreviewDialogA';
-function MsiPreviewDialogW; external msilib name 'MsiPreviewDialogW';
-function MsiPreviewDialog; external msilib name 'MsiPreviewDialog' + AWSuffix;
-function MsiPreviewBillboardA; external msilib name 'MsiPreviewBillboardA';
-function MsiPreviewBillboardW; external msilib name 'MsiPreviewBillboardW';
-function MsiPreviewBillboard; external msilib name 'MsiPreviewBillboard' + AWSuffix;
-function MsiGetLastErrorRecord; external msilib name 'MsiGetLastErrorRecord';
-
-{$ENDIF DYNAMIC_LINK}
-
-end.
+{******************************************************************************}
+{ }
+{ Windows Installer API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: msiquery.h, released June 2000. The original Pascal }
+{ code is: MsiQuery.pas, released June 2001. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwamsiquery.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaMsiQuery;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "msiquery.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaMsi, JwaWinBase, JwaWinType;
+
+(*****************************************************************************\
+* *
+* MsiQuery.h - Interface to running installer for custom actions and tools *
+* *
+* Version 1.0 - 1.2 *
+* *
+* NOTES: All buffers sizes are TCHAR count, null included only on input *
+* Return argument pointers may be null if not interested in value *
+* Returned handles of all types must be closed: MsiCloseHandle(h) *
+* Functions with UINT return type return a system error code *
+* Designated functions will set or clear the last error record, *
+* which is then accessible with MsiGetLastErrorRecord. However, *
+* the following argument errors do not register an error record: *
+* ERROR_INVALID_HANDLE, ERROR_INVALID_PARAMETER, ERROR_MORE_DATA. *
+* *
+* Copyright (c) 1999-2000, Microsoft Corp. All rights reserved. *
+* *
+\*****************************************************************************)
+
+const
+ MSI_NULL_INTEGER = DWORD($80000000); // integer value reserved for null
+ {$EXTERNALSYM MSI_NULL_INTEGER}
+
+// MsiOpenDatabase persist predefine values, otherwise output database path is used
+
+ MSIDBOPEN_READONLY = LPCTSTR(0); // database open read-only, no persistent changes
+ {$EXTERNALSYM MSIDBOPEN_READONLY}
+ MSIDBOPEN_TRANSACT = LPCTSTR(1); // database read/write in transaction mode
+ {$EXTERNALSYM MSIDBOPEN_TRANSACT}
+ MSIDBOPEN_DIRECT = LPCTSTR(2); // database direct read/write without transaction
+ {$EXTERNALSYM MSIDBOPEN_DIRECT}
+ MSIDBOPEN_CREATE = LPCTSTR(3); // create new database, transact mode read/write
+ {$EXTERNALSYM MSIDBOPEN_CREATE}
+ MSIDBOPEN_CREATEDIRECT = LPCTSTR(4); // create new database, direct mode read/write
+ {$EXTERNALSYM MSIDBOPEN_CREATEDIRECT}
+
+ MSIDBOPEN_PATCHFILE = 32 div SizeOf(TCHAR); // add flag to indicate patch file
+
+ MSIDBSTATE_ERROR = DWORD(-1); // invalid database handle
+ {$EXTERNALSYM MSIDBSTATE_ERROR}
+ MSIDBSTATE_READ = 0; // database open read-only, no persistent changes
+ {$EXTERNALSYM MSIDBSTATE_READ}
+ MSIDBSTATE_WRITE = 1; // database readable and updatable
+ {$EXTERNALSYM MSIDBSTATE_WRITE}
+
+type
+ MSIDBSTATE = DWORD;
+ {$EXTERNALSYM MSIDBSTATE}
+ TMsiDbState = MSIDBSTATE;
+
+const
+ MSIMODIFY_SEEK = DWORD(-1); // reposition to current record primary key
+ {$EXTERNALSYM MSIMODIFY_SEEK}
+ MSIMODIFY_REFRESH = 0; // refetch current record data
+ {$EXTERNALSYM MSIMODIFY_REFRESH}
+ MSIMODIFY_INSERT = 1; // insert new record, fails if matching key exists
+ {$EXTERNALSYM MSIMODIFY_INSERT}
+ MSIMODIFY_UPDATE = 2; // update existing non-key data of fetched record
+ {$EXTERNALSYM MSIMODIFY_UPDATE}
+ MSIMODIFY_ASSIGN = 3; // insert record, replacing any existing record
+ {$EXTERNALSYM MSIMODIFY_ASSIGN}
+ MSIMODIFY_REPLACE = 4; // update record, delete old if primary key edit
+ {$EXTERNALSYM MSIMODIFY_REPLACE}
+ MSIMODIFY_MERGE = 5; // fails if record with duplicate key not identical
+ {$EXTERNALSYM MSIMODIFY_MERGE}
+ MSIMODIFY_DELETE = 6; // remove row referenced by this record from table
+ {$EXTERNALSYM MSIMODIFY_DELETE}
+ MSIMODIFY_INSERT_TEMPORARY = 7; // insert a temporary record
+ {$EXTERNALSYM MSIMODIFY_INSERT_TEMPORARY}
+ MSIMODIFY_VALIDATE = 8; // validate a fetched record
+ {$EXTERNALSYM MSIMODIFY_VALIDATE}
+ MSIMODIFY_VALIDATE_NEW = 9; // validate a new record
+ {$EXTERNALSYM MSIMODIFY_VALIDATE_NEW}
+ MSIMODIFY_VALIDATE_FIELD = 10; // validate field(s) of an incomplete record
+ {$EXTERNALSYM MSIMODIFY_VALIDATE_FIELD}
+ MSIMODIFY_VALIDATE_DELETE = 11; // validate before deleting record
+ {$EXTERNALSYM MSIMODIFY_VALIDATE_DELETE}
+
+type
+ MSIMODIFY = DWORD;
+ {$EXTERNALSYM MSIMODIFY}
+ TMsiModify = MSIMODIFY;
+
+const
+ MSICOLINFO_NAMES = 0; // return column names
+ {$EXTERNALSYM MSICOLINFO_NAMES}
+ MSICOLINFO_TYPES = 1; // return column definitions, datatype code followed by width
+ {$EXTERNALSYM MSICOLINFO_TYPES}
+
+type
+ MSICOLINFO = DWORD;
+ {$EXTERNALSYM MSICOLINFO}
+ TMsiColInfo = MSICOLINFO;
+
+const
+ MSICONDITION_FALSE = 0; // expression evaluates to False
+ {$EXTERNALSYM MSICONDITION_FALSE}
+ MSICONDITION_TRUE = 1; // expression evaluates to True
+ {$EXTERNALSYM MSICONDITION_TRUE}
+ MSICONDITION_NONE = 2; // no expression present
+ {$EXTERNALSYM MSICONDITION_NONE}
+ MSICONDITION_ERROR = 3; // syntax error in expression
+ {$EXTERNALSYM MSICONDITION_ERROR}
+
+type
+ MSICONDITION = DWORD;
+ {$EXTERNALSYM MSICONDITION}
+ TMsiCondition = MSICONDITION;
+
+const
+ MSICOSTTREE_SELFONLY = 0;
+ {$EXTERNALSYM MSICOSTTREE_SELFONLY}
+ MSICOSTTREE_CHILDREN = 1;
+ {$EXTERNALSYM MSICOSTTREE_CHILDREN}
+ MSICOSTTREE_PARENTS = 2;
+ {$EXTERNALSYM MSICOSTTREE_PARENTS}
+ MSICOSTTREE_RESERVED = 3; // Reserved for future use
+ {$EXTERNALSYM MSICOSTTREE_RESERVED}
+
+type
+ MSICOSTTREE = DWORD;
+ {$EXTERNALSYM MSICOSTTREE}
+ TMsiCostTree = MSICOSTTREE;
+
+const
+ MSIDBERROR_INVALIDARG = DWORD(-3); // invalid argument
+ {$EXTERNALSYM MSIDBERROR_INVALIDARG}
+ MSIDBERROR_MOREDATA = DWORD(-2); // buffer too small
+ {$EXTERNALSYM MSIDBERROR_MOREDATA}
+ MSIDBERROR_FUNCTIONERROR = DWORD(-1); // function error
+ {$EXTERNALSYM MSIDBERROR_FUNCTIONERROR}
+ MSIDBERROR_NOERROR = 0; // no error
+ {$EXTERNALSYM MSIDBERROR_NOERROR}
+ MSIDBERROR_DUPLICATEKEY = 1; // new record duplicates primary keys of existing record in table
+ {$EXTERNALSYM MSIDBERROR_DUPLICATEKEY}
+ MSIDBERROR_REQUIRED = 2; // non-nullable column, no null values allowed
+ {$EXTERNALSYM MSIDBERROR_REQUIRED}
+ MSIDBERROR_BADLINK = 3; // corresponding record in foreign table not found
+ {$EXTERNALSYM MSIDBERROR_BADLINK}
+ MSIDBERROR_OVERFLOW = 4; // data greater than maximum value allowed
+ {$EXTERNALSYM MSIDBERROR_OVERFLOW}
+ MSIDBERROR_UNDERFLOW = 5; // data less than minimum value allowed
+ {$EXTERNALSYM MSIDBERROR_UNDERFLOW}
+ MSIDBERROR_NOTINSET = 6; // data not a member of the values permitted in the set
+ {$EXTERNALSYM MSIDBERROR_NOTINSET}
+ MSIDBERROR_BADVERSION = 7; // invalid version string
+ {$EXTERNALSYM MSIDBERROR_BADVERSION}
+ MSIDBERROR_BADCASE = 8; // invalid case, must be all upper-case or all lower-case
+ {$EXTERNALSYM MSIDBERROR_BADCASE}
+ MSIDBERROR_BADGUID = 9; // invalid GUID
+ {$EXTERNALSYM MSIDBERROR_BADGUID}
+ MSIDBERROR_BADWILDCARD = 10; // invalid wildcardfilename or use of wildcards
+ {$EXTERNALSYM MSIDBERROR_BADWILDCARD}
+ MSIDBERROR_BADIDENTIFIER = 11; // bad identifier
+ {$EXTERNALSYM MSIDBERROR_BADIDENTIFIER}
+ MSIDBERROR_BADLANGUAGE = 12; // bad language Id(s)
+ {$EXTERNALSYM MSIDBERROR_BADLANGUAGE}
+ MSIDBERROR_BADFILENAME = 13; // bad filename
+ {$EXTERNALSYM MSIDBERROR_BADFILENAME}
+ MSIDBERROR_BADPATH = 14; // bad path
+ {$EXTERNALSYM MSIDBERROR_BADPATH}
+ MSIDBERROR_BADCONDITION = 15; // bad conditional statement
+ {$EXTERNALSYM MSIDBERROR_BADCONDITION}
+ MSIDBERROR_BADFORMATTED = 16; // bad format string
+ {$EXTERNALSYM MSIDBERROR_BADFORMATTED}
+ MSIDBERROR_BADTEMPLATE = 17; // bad template string
+ {$EXTERNALSYM MSIDBERROR_BADTEMPLATE}
+ MSIDBERROR_BADDEFAULTDIR = 18; // bad string in DefaultDir column of Directory table
+ {$EXTERNALSYM MSIDBERROR_BADDEFAULTDIR}
+ MSIDBERROR_BADREGPATH = 19; // bad registry path string
+ {$EXTERNALSYM MSIDBERROR_BADREGPATH}
+ MSIDBERROR_BADCUSTOMSOURCE = 20; // bad string in CustomSource column of CustomAction table
+ {$EXTERNALSYM MSIDBERROR_BADCUSTOMSOURCE}
+ MSIDBERROR_BADPROPERTY = 21; // bad property string
+ {$EXTERNALSYM MSIDBERROR_BADPROPERTY}
+ MSIDBERROR_MISSINGDATA = 22; // _Validation table missing reference to column
+ {$EXTERNALSYM MSIDBERROR_MISSINGDATA}
+ MSIDBERROR_BADCATEGORY = 23; // Category column of _Validation table for column is invalid
+ {$EXTERNALSYM MSIDBERROR_BADCATEGORY}
+ MSIDBERROR_BADKEYTABLE = 24; // table in KeyTable column of _Validation table could not be found/loaded
+ {$EXTERNALSYM MSIDBERROR_BADKEYTABLE}
+ MSIDBERROR_BADMAXMINVALUES = 25; // value in MaxValue column of _Validation table is less than value in MinValue column
+ {$EXTERNALSYM MSIDBERROR_BADMAXMINVALUES}
+ MSIDBERROR_BADCABINET = 26; // bad cabinet name
+ {$EXTERNALSYM MSIDBERROR_BADCABINET}
+ MSIDBERROR_BADSHORTCUT = 27; // bad shortcut target
+ {$EXTERNALSYM MSIDBERROR_BADSHORTCUT}
+ MSIDBERROR_STRINGOVERFLOW = 28; // string overflow (greater than length allowed in column def)
+ {$EXTERNALSYM MSIDBERROR_STRINGOVERFLOW}
+ MSIDBERROR_BADLOCALIZEATTRIB = 29; // invalid localization attribute (primary keys cannot be localized)
+ {$EXTERNALSYM MSIDBERROR_BADLOCALIZEATTRIB}
+
+type
+ MSIDBERROR = DWORD;
+ {$EXTERNALSYM MSIDBERROR}
+ TMsiDbError = MSIDBERROR;
+
+const
+ MSIRUNMODE_ADMIN = 0; // admin mode install, else product install
+ {$EXTERNALSYM MSIRUNMODE_ADMIN}
+ MSIRUNMODE_ADVERTISE = 1; // installing advertisements, else installing or updating product
+ {$EXTERNALSYM MSIRUNMODE_ADVERTISE}
+ MSIRUNMODE_MAINTENANCE = 2; // modifying an existing installation, else new installation
+ {$EXTERNALSYM MSIRUNMODE_MAINTENANCE}
+ MSIRUNMODE_ROLLBACKENABLED = 3; // rollback is enabled
+ {$EXTERNALSYM MSIRUNMODE_ROLLBACKENABLED}
+ MSIRUNMODE_LOGENABLED = 4; // log file active, enabled prior to install session
+ {$EXTERNALSYM MSIRUNMODE_LOGENABLED}
+ MSIRUNMODE_OPERATIONS = 5; // spooling execute operations, else in determination phase
+ {$EXTERNALSYM MSIRUNMODE_OPERATIONS}
+ MSIRUNMODE_REBOOTATEND = 6; // reboot needed after successful installation (settable)
+ {$EXTERNALSYM MSIRUNMODE_REBOOTATEND}
+ MSIRUNMODE_REBOOTNOW = 7; // reboot needed to continue installation (settable)
+ {$EXTERNALSYM MSIRUNMODE_REBOOTNOW}
+ MSIRUNMODE_CABINET = 8; // installing files from cabinets and files using Media table
+ {$EXTERNALSYM MSIRUNMODE_CABINET}
+ MSIRUNMODE_SOURCESHORTNAMES= 9; // source LongFileNames suppressed via PID_MSISOURCE summary property
+ {$EXTERNALSYM MSIRUNMODE_SOURCESHORTNAMES}
+ MSIRUNMODE_TARGETSHORTNAMES= 10; // target LongFileNames suppressed via SHORTFILENAMES property
+ {$EXTERNALSYM MSIRUNMODE_TARGETSHORTNAMES}
+ MSIRUNMODE_RESERVED11 = 11; // future use
+ {$EXTERNALSYM MSIRUNMODE_RESERVED11}
+ MSIRUNMODE_WINDOWS9X = 12; // operating systems is Windows9?, else Windows NT
+ {$EXTERNALSYM MSIRUNMODE_WINDOWS9X}
+ MSIRUNMODE_ZAWENABLED = 13; // operating system supports demand installation
+ {$EXTERNALSYM MSIRUNMODE_ZAWENABLED}
+ MSIRUNMODE_RESERVED14 = 14; // future use
+ {$EXTERNALSYM MSIRUNMODE_RESERVED14}
+ MSIRUNMODE_RESERVED15 = 15; // future use
+ {$EXTERNALSYM MSIRUNMODE_RESERVED15}
+ MSIRUNMODE_SCHEDULED = 16; // custom action call from install script execution
+ {$EXTERNALSYM MSIRUNMODE_SCHEDULED}
+ MSIRUNMODE_ROLLBACK = 17; // custom action call from rollback execution script
+ {$EXTERNALSYM MSIRUNMODE_ROLLBACK}
+ MSIRUNMODE_COMMIT = 18; // custom action call from commit execution script
+ {$EXTERNALSYM MSIRUNMODE_COMMIT}
+
+type
+ MSIRUNMODE = DWORD;
+ {$EXTERNALSYM MSIRUNMODE}
+ TMsiRunMode = MSIRUNMODE;
+
+const
+ INSTALLMESSAGE_TYPEMASK = DWORD($FF000000); // mask for type code
+ {$EXTERNALSYM INSTALLMESSAGE_TYPEMASK}
+
+// Note: INSTALLMESSAGE_ERROR, INSTALLMESSAGE_WARNING, INSTALLMESSAGE_USER are to or'd
+// with a message box style to indicate the buttons to display and return:
+// MB_OK,MB_OKCANCEL,MB_ABORTRETRYIGNORE,MB_YESNOCANCEL,MB_YESNO,MB_RETRYCANCEL
+// the default button (MB_DEFBUTTON1 is normal default):
+// MB_DEFBUTTON1, MB_DEFBUTTON2, MB_DEFBUTTON3
+// and optionally an icon style:
+// MB_ICONERROR, MB_ICONQUESTION, MB_ICONWARNING, MB_ICONINFORMATION
+
+const
+ MSITRANSFORM_ERROR_ADDEXISTINGROW = $00000001;
+ {$EXTERNALSYM MSITRANSFORM_ERROR_ADDEXISTINGROW}
+ MSITRANSFORM_ERROR_DELMISSINGROW = $00000002;
+ {$EXTERNALSYM MSITRANSFORM_ERROR_DELMISSINGROW}
+ MSITRANSFORM_ERROR_ADDEXISTINGTABLE = $00000004;
+ {$EXTERNALSYM MSITRANSFORM_ERROR_ADDEXISTINGTABLE}
+ MSITRANSFORM_ERROR_DELMISSINGTABLE = $00000008;
+ {$EXTERNALSYM MSITRANSFORM_ERROR_DELMISSINGTABLE}
+ MSITRANSFORM_ERROR_UPDATEMISSINGROW = $00000010;
+ {$EXTERNALSYM MSITRANSFORM_ERROR_UPDATEMISSINGROW}
+ MSITRANSFORM_ERROR_CHANGECODEPAGE = $00000020;
+ {$EXTERNALSYM MSITRANSFORM_ERROR_CHANGECODEPAGE}
+ MSITRANSFORM_ERROR_VIEWTRANSFORM = $00000100;
+ {$EXTERNALSYM MSITRANSFORM_ERROR_VIEWTRANSFORM}
+
+type
+ MSITRANSFORM_ERROR = DWORD;
+ {$EXTERNALSYM MSITRANSFORM_ERROR}
+ TMsiTransformError = MSITRANSFORM_ERROR;
+
+const
+ MSITRANSFORM_VALIDATE_LANGUAGE = $00000001;
+ {$EXTERNALSYM MSITRANSFORM_VALIDATE_LANGUAGE}
+ MSITRANSFORM_VALIDATE_PRODUCT = $00000002;
+ {$EXTERNALSYM MSITRANSFORM_VALIDATE_PRODUCT}
+ MSITRANSFORM_VALIDATE_PLATFORM = $00000004;
+ {$EXTERNALSYM MSITRANSFORM_VALIDATE_PLATFORM}
+ MSITRANSFORM_VALIDATE_MAJORVERSION = $00000008;
+ {$EXTERNALSYM MSITRANSFORM_VALIDATE_MAJORVERSION}
+ MSITRANSFORM_VALIDATE_MINORVERSION = $00000010;
+ {$EXTERNALSYM MSITRANSFORM_VALIDATE_MINORVERSION}
+ MSITRANSFORM_VALIDATE_UPDATEVERSION = $00000020;
+ {$EXTERNALSYM MSITRANSFORM_VALIDATE_UPDATEVERSION}
+ MSITRANSFORM_VALIDATE_NEWLESSBASEVERSION = $00000040;
+ {$EXTERNALSYM MSITRANSFORM_VALIDATE_NEWLESSBASEVERSION}
+ MSITRANSFORM_VALIDATE_NEWLESSEQUALBASEVERSION = $00000080;
+ {$EXTERNALSYM MSITRANSFORM_VALIDATE_NEWLESSEQUALBASEVERSION}
+ MSITRANSFORM_VALIDATE_NEWEQUALBASEVERSION = $00000100;
+ {$EXTERNALSYM MSITRANSFORM_VALIDATE_NEWEQUALBASEVERSION}
+ MSITRANSFORM_VALIDATE_NEWGREATEREQUALBASEVERSION = $00000200;
+ {$EXTERNALSYM MSITRANSFORM_VALIDATE_NEWGREATEREQUALBASEVERSION}
+ MSITRANSFORM_VALIDATE_NEWGREATERBASEVERSION = $00000400;
+ {$EXTERNALSYM MSITRANSFORM_VALIDATE_NEWGREATERBASEVERSION}
+ MSITRANSFORM_VALIDATE_UPGRADECODE = $00000800;
+ {$EXTERNALSYM MSITRANSFORM_VALIDATE_UPGRADECODE}
+
+type
+ MSITRANSFORM_VALIDATE = DWORD;
+ {$EXTERNALSYM MSITRANSFORM_VALIDATE}
+ TMsiTransformValidate = MSITRANSFORM_VALIDATE;
+
+// -----------------------------------------------------------------------------
+// Installer database access functions
+// -----------------------------------------------------------------------------
+
+// Prepare a database query, creating a view object
+// Returns ERROR_SUCCESS if successful, and the view handle is returned,
+// else ERROR_INVALID_HANDLE, ERROR_INVALID_HANDLE_STATE, ERROR_BAD_QUERY_SYNTAX, ERROR_GEN_FAILURE
+// Execution of this function sets the error record, accessible via MsiGetLastErrorRecord
+
+function MsiDatabaseOpenViewA(hDatabase: MSIHANDLE; szQuery: LPCSTR; var phView: MSIHANDLE): UINT; stdcall;
+{$EXTERNALSYM MsiDatabaseOpenViewA}
+function MsiDatabaseOpenViewW(hDatabase: MSIHANDLE; szQuery: LPCWSTR; var phView: MSIHANDLE): UINT; stdcall;
+{$EXTERNALSYM MsiDatabaseOpenViewW}
+function MsiDatabaseOpenView(hDatabase: MSIHANDLE; szQuery: LPCTSTR; var phView: MSIHANDLE): UINT; stdcall;
+{$EXTERNALSYM MsiDatabaseOpenView}
+
+// Returns the MSIDBERROR enum and name of the column corresponding to the error
+// Similar to a GetLastError function, but for the view. NOT the same as MsiGetLastErrorRecord
+// Returns errors of MsiViewModify.
+
+function MsiViewGetErrorA(hView: MSIHANDLE; szColumnNameBuffer: LPSTR;
+ var pcchBuf: DWORD): MSIDBERROR; stdcall;
+{$EXTERNALSYM MsiViewGetErrorA}
+function MsiViewGetErrorW(hView: MSIHANDLE; szColumnNameBuffer: LPWSTR;
+ var pcchBuf: DWORD): MSIDBERROR; stdcall;
+{$EXTERNALSYM MsiViewGetErrorW}
+function MsiViewGetError(hView: MSIHANDLE; szColumnNameBuffer: LPTSTR;
+ var pcchBuf: DWORD): MSIDBERROR; stdcall;
+{$EXTERNALSYM MsiViewGetError}
+
+// Exectute the view query, supplying parameters as required
+// Returns ERROR_SUCCESS, ERROR_INVALID_HANDLE, ERROR_INVALID_HANDLE_STATE, ERROR_GEN_FAILURE
+// Execution of this function sets the error record, accessible via MsiGetLastErrorRecord
+
+function MsiViewExecute(hView: MSIHANDLE; hRecord: MSIHANDLE): UINT; stdcall;
+{$EXTERNALSYM MsiViewExecute}
+
+// Fetch the next sequential record from the view
+// Result is ERROR_SUCCESS if a row is found, and its handle is returned
+// else ERROR_NO_MORE_ITEMS if no records remain, and a null handle is returned
+// else result is error: ERROR_INVALID_HANDLE_STATE, ERROR_INVALID_HANDLE, ERROR_GEN_FAILURE
+
+function MsiViewFetch(hView: MSIHANDLE; var phRecord: MSIHANDLE): UINT; stdcall;
+{$EXTERNALSYM MsiViewFetch}
+
+// Modify a database record, parameters must match types in query columns
+// Returns ERROR_SUCCESS, ERROR_INVALID_HANDLE, ERROR_INVALID_HANDLE_STATE, ERROR_GEN_FAILURE, ERROR_ACCESS_DENIED
+// Execution of this function sets the error record, accessible via MsiGetLastErrorRecord
+
+function MsiViewModify(hView: MSIHANDLE; eModifyMode: MSIMODIFY; hRecord: MSIHANDLE): UINT; stdcall;
+{$EXTERNALSYM MsiViewModify}
+
+// Return the column names or specifications for the current view
+// Returns ERROR_SUCCESS, ERROR_INVALID_HANDLE, ERROR_INVALID_PARAMETER, or ERROR_INVALID_HANDLE_STATE
+
+function MsiViewGetColumnInfo(hView: MSIHANDLE; eColumnInfo: MSICOLINFO;
+ var phRecord: MSIHANDLE): UINT; stdcall;
+{$EXTERNALSYM MsiViewGetColumnInfo}
+
+// Release the result set for an executed view, to allow re-execution
+// Only needs to be called if not all records have been fetched
+// Returns ERROR_SUCCESS, ERROR_INVALID_HANDLE, ERROR_INVALID_HANDLE_STATE
+
+function MsiViewClose(hView: MSIHANDLE): UINT; stdcall;
+{$EXTERNALSYM MsiViewClose}
+
+// Return a record containing the names of all primary key columns for a given table
+// Returns an MSIHANDLE for a record containing the name of each column.
+// The field count of the record corresponds to the number of primary key columns.
+// Field [0] of the record contains the table name.
+// Returns ERROR_SUCCESS, ERROR_INVALID_HANDLE, ERROR_INVALID_TABLE
+
+function MsiDatabaseGetPrimaryKeysA(hDatabase: MSIHANDLE; szTableName: LPCSTR;
+ var phRecord: MSIHANDLE): UINT; stdcall;
+{$EXTERNALSYM MsiDatabaseGetPrimaryKeysA}
+function MsiDatabaseGetPrimaryKeysW(hDatabase: MSIHANDLE; szTableName: LPCWSTR;
+ var phRecord: MSIHANDLE): UINT; stdcall;
+{$EXTERNALSYM MsiDatabaseGetPrimaryKeysW}
+function MsiDatabaseGetPrimaryKeys(hDatabase: MSIHANDLE; szTableName: LPCTSTR;
+ var phRecord: MSIHANDLE): UINT; stdcall;
+{$EXTERNALSYM MsiDatabaseGetPrimaryKeys}
+
+// Return an enum defining the state of the table (temporary, unknown, or persistent).
+// Returns MSICONDITION_ERROR, MSICONDITION_FALSE, MSICONDITION_TRUE, MSICONDITION_NONE
+
+function MsiDatabaseIsTablePersistentA(hDatabase: MSIHANDLE; szTableName: LPCSTR): MSICONDITION; stdcall;
+{$EXTERNALSYM MsiDatabaseIsTablePersistentA}
+function MsiDatabaseIsTablePersistentW(hDatabase: MSIHANDLE; szTableName: LPCWSTR): MSICONDITION; stdcall;
+{$EXTERNALSYM MsiDatabaseIsTablePersistentW}
+function MsiDatabaseIsTablePersistent(hDatabase: MSIHANDLE; szTableName: LPCTSTR): MSICONDITION; stdcall;
+{$EXTERNALSYM MsiDatabaseIsTablePersistent}
+
+// --------------------------------------------------------------------------
+// Summary information stream management functions
+// --------------------------------------------------------------------------
+
+// Integer Property IDs: 1, 14, 15, 16, 19
+// DateTime Property IDs: 10, 11, 12, 13
+// Text Property IDs: 2, 3, 4, 5, 6, 7, 8, 9, 18
+// Unsupported Propery IDs: 0 (PID_DICTIONARY), 17 (PID_THUMBNAIL)
+
+// Obtain a handle for the _SummaryInformation stream for an MSI database
+// Execution of this function sets the error record, accessible via MsiGetLastErrorRecord
+
+function MsiGetSummaryInformationA(hDatabase: MSIHANDLE; szDatabasePath: LPCSTR;
+ uiUpdateCount: UINT; var phSummaryInfo: MSIHANDLE): UINT; stdcall;
+{$EXTERNALSYM MsiGetSummaryInformationA}
+function MsiGetSummaryInformationW(hDatabase: MSIHANDLE; szDatabasePath: LPCWSTR;
+ uiUpdateCount: UINT; var phSummaryInfo: MSIHANDLE): UINT; stdcall;
+{$EXTERNALSYM MsiGetSummaryInformationW}
+function MsiGetSummaryInformation(hDatabase: MSIHANDLE; szDatabasePath: LPCTSTR;
+ uiUpdateCount: UINT; var phSummaryInfo: MSIHANDLE): UINT; stdcall;
+{$EXTERNALSYM MsiGetSummaryInformation}
+
+// Obtain the number of existing properties in the SummaryInformation stream
+
+function MsiSummaryInfoGetPropertyCount(hSummaryInfo: MSIHANDLE; var puiPropertyCount: UINT): UINT; stdcall;
+{$EXTERNALSYM MsiSummaryInfoGetPropertyCount}
+
+// Set a single summary information property
+// Returns ERROR_SUCCESS, ERROR_INVALID_HANDLE, ERROR_UNKNOWN_PROPERTY
+
+function MsiSummaryInfoSetPropertyA(hSummaryInfo: MSIHANDLE; uiProperty: UINT;
+ uiDataType: UINT; iValue: Integer; const pftValue: FILETIME; szValue: LPCSTR): UINT; stdcall;
+{$EXTERNALSYM MsiSummaryInfoSetPropertyA}
+function MsiSummaryInfoSetPropertyW(hSummaryInfo: MSIHANDLE; uiProperty: UINT;
+ uiDataType: UINT; iValue: Integer; const pftValue: FILETIME; szValue: LPCWSTR): UINT; stdcall;
+{$EXTERNALSYM MsiSummaryInfoSetPropertyW}
+function MsiSummaryInfoSetProperty(hSummaryInfo: MSIHANDLE; uiProperty: UINT;
+ uiDataType: UINT; iValue: Integer; const pftValue: FILETIME; szValue: LPCTSTR): UINT; stdcall;
+{$EXTERNALSYM MsiSummaryInfoSetProperty}
+
+// Get a single property from the summary information
+// Returns ERROR_SUCCESS, ERROR_INVALID_HANDLE, ERROR_UNKNOWN_PROPERTY
+
+function MsiSummaryInfoGetPropertyA(hSummaryInfo: MSIHANDLE; uiProperty: UINT;
+ var puiDataType: UINT; var piValue: Integer; var pftValue: FILETIME; szValueBuf: LPSTR;
+ var pcchValueBuf: DWORD): UINT; stdcall;
+{$EXTERNALSYM MsiSummaryInfoGetPropertyA}
+function MsiSummaryInfoGetPropertyW(hSummaryInfo: MSIHANDLE; uiProperty: UINT;
+ var puiDataType: UINT; var piValue: Integer; var pftValue: FILETIME; szValueBuf: LPWSTR;
+ var pcchValueBuf: DWORD): UINT; stdcall;
+{$EXTERNALSYM MsiSummaryInfoGetPropertyW}
+function MsiSummaryInfoGetProperty(hSummaryInfo: MSIHANDLE; uiProperty: UINT;
+ var puiDataType: UINT; var piValue: Integer; var pftValue: FILETIME; szValueBuf: LPTSTR;
+ var pcchValueBuf: DWORD): UINT; stdcall;
+{$EXTERNALSYM MsiSummaryInfoGetProperty}
+
+// Write back changed information to summary information stream
+
+function MsiSummaryInfoPersist(hSummaryInfo: MSIHANDLE): UINT; stdcall;
+{$EXTERNALSYM MsiSummaryInfoPersist}
+
+// --------------------------------------------------------------------------
+// Installer database management functions - not used by custom actions
+// --------------------------------------------------------------------------
+
+// Open an installer database, specifying the persistance mode, which is a pointer.
+// Predefined persist values are reserved pointer values, requiring pointer arithmetic.
+// Execution of this function sets the error record, accessible via MsiGetLastErrorRecord
+
+function MsiOpenDatabaseA(szDatabasePath: LPCSTR; szPersist: LPCSTR;
+ var phDatabase: MSIHANDLE): UINT; stdcall;
+{$EXTERNALSYM MsiOpenDatabaseA}
+function MsiOpenDatabaseW(szDatabasePath: LPCWSTR; szPersist: LPCWSTR;
+ var phDatabase: MSIHANDLE): UINT; stdcall;
+{$EXTERNALSYM MsiOpenDatabaseW}
+function MsiOpenDatabase(szDatabasePath: LPCTSTR; szPersist: LPCTSTR;
+ var phDatabase: MSIHANDLE): UINT; stdcall;
+{$EXTERNALSYM MsiOpenDatabase}
+
+// Import an MSI text archive table into an open database
+// Execution of this function sets the error record, accessible via MsiGetLastErrorRecord
+
+function MsiDatabaseImportA(hDatabase: MSIHANDLE; szFolderPath: LPCSTR;
+ szFileName: LPCSTR): UINT; stdcall;
+{$EXTERNALSYM MsiDatabaseImportA}
+function MsiDatabaseImportW(hDatabase: MSIHANDLE; szFolderPath: LPCWSTR;
+ szFileName: LPCWSTR): UINT; stdcall;
+{$EXTERNALSYM MsiDatabaseImportW}
+function MsiDatabaseImport(hDatabase: MSIHANDLE; szFolderPath: LPCTSTR;
+ szFileName: LPCTSTR): UINT; stdcall;
+{$EXTERNALSYM MsiDatabaseImport}
+
+// Export an MSI table from an open database to a text archive file
+// Execution of this function sets the error record, accessible via MsiGetLastErrorRecord
+
+function MsiDatabaseExportA(hDatabase: MSIHANDLE; szTableName: LPCSTR;
+ szFolderPath: LPCSTR; szFileName: LPCSTR): UINT; stdcall;
+{$EXTERNALSYM MsiDatabaseExportA}
+function MsiDatabaseExportW(hDatabase: MSIHANDLE; szTableName: LPCWSTR;
+ szFolderPath: LPCWSTR; szFileName: LPCWSTR): UINT; stdcall;
+{$EXTERNALSYM MsiDatabaseExportW}
+function MsiDatabaseExport(hDatabase: MSIHANDLE; szTableName: LPCTSTR;
+ szFolderPath: LPCTSTR; szFileName: LPCTSTR): UINT; stdcall;
+{$EXTERNALSYM MsiDatabaseExport}
+
+// Merge two database together, allowing duplicate rows
+// Execution of this function sets the error record, accessible via MsiGetLastErrorRecord
+
+function MsiDatabaseMergeA(hDatabase: MSIHANDLE; hDatabaseMerge: MSIHANDLE;
+ szTableName: LPCSTR): UINT; stdcall;
+{$EXTERNALSYM MsiDatabaseMergeA}
+function MsiDatabaseMergeW(hDatabase: MSIHANDLE; hDatabaseMerge: MSIHANDLE;
+ szTableName: LPCWSTR): UINT; stdcall;
+{$EXTERNALSYM MsiDatabaseMergeW}
+function MsiDatabaseMerge(hDatabase: MSIHANDLE; hDatabaseMerge: MSIHANDLE;
+ szTableName: LPCTSTR): UINT; stdcall;
+{$EXTERNALSYM MsiDatabaseMerge}
+
+// Generate a transform file of differences between two databases
+// Execution of this function sets the error record, accessible via MsiGetLastErrorRecord
+
+function MsiDatabaseGenerateTransformA(hDatabase: MSIHANDLE; hDatabaseReference: MSIHANDLE;
+ szTransformFile: LPCSTR; iReserved1: Integer; iReserved2: Integer): UINT; stdcall;
+{$EXTERNALSYM MsiDatabaseGenerateTransformA}
+function MsiDatabaseGenerateTransformW(hDatabase: MSIHANDLE; hDatabaseReference: MSIHANDLE;
+ szTransformFile: LPCWSTR; iReserved1: Integer; iReserved2: Integer): UINT; stdcall;
+{$EXTERNALSYM MsiDatabaseGenerateTransformW}
+function MsiDatabaseGenerateTransform(hDatabase: MSIHANDLE; hDatabaseReference: MSIHANDLE;
+ szTransformFile: LPCTSTR; iReserved1: Integer; iReserved2: Integer): UINT; stdcall;
+{$EXTERNALSYM MsiDatabaseGenerateTransform}
+
+// Apply a transform file containing database difference
+// Execution of this function sets the error record, accessible via MsiGetLastErrorRecord
+
+function MsiDatabaseApplyTransformA(hDatabase: MSIHANDLE; szTransformFile: LPCSTR;
+ iErrorConditions: Integer): UINT; stdcall;
+{$EXTERNALSYM MsiDatabaseApplyTransformA}
+function MsiDatabaseApplyTransformW(hDatabase: MSIHANDLE; szTransformFile: LPCWSTR;
+ iErrorConditions: Integer): UINT; stdcall;
+{$EXTERNALSYM MsiDatabaseApplyTransformW}
+function MsiDatabaseApplyTransform(hDatabase: MSIHANDLE; szTransformFile: LPCTSTR;
+ iErrorConditions: Integer): UINT; stdcall;
+{$EXTERNALSYM MsiDatabaseApplyTransform}
+
+// Create summary information of existing transform to include validation and error conditions
+// Execution of this function sets the error record, accessible via MsiGetLastErrorRecord
+
+function MsiCreateTransformSummaryInfoA(hDatabase: MSIHANDLE; hDatabaseReference: MSIHANDLE;
+ szTransformFile: LPCSTR; iErrorConditions: Integer; iValidation: Integer): UINT; stdcall;
+{$EXTERNALSYM MsiCreateTransformSummaryInfoA}
+function MsiCreateTransformSummaryInfoW(hDatabase: MSIHANDLE; hDatabaseReference: MSIHANDLE;
+ szTransformFile: LPCWSTR; iErrorConditions: Integer; iValidation: Integer): UINT; stdcall;
+{$EXTERNALSYM MsiCreateTransformSummaryInfoW}
+function MsiCreateTransformSummaryInfo(hDatabase: MSIHANDLE; hDatabaseReference: MSIHANDLE;
+ szTransformFile: LPCTSTR; iErrorConditions: Integer; iValidation: Integer): UINT; stdcall;
+{$EXTERNALSYM MsiCreateTransformSummaryInfo}
+
+// Write out all persistent table data, ignored if database opened read-only
+// Execution of this function sets the error record, accessible via MsiGetLastErrorRecord
+
+function MsiDatabaseCommit(hDatabase: MSIHANDLE): UINT; stdcall;
+{$EXTERNALSYM MsiDatabaseCommit}
+
+// Return the update state of a database
+
+function MsiGetDatabaseState(hDatabase: MSIHANDLE): MSIDBSTATE; stdcall;
+{$EXTERNALSYM MsiGetDatabaseState}
+
+// --------------------------------------------------------------------------
+// Record object functions
+// --------------------------------------------------------------------------
+
+// Create a new record object with the requested number of fields
+// Field 0, not included in count, is used for format strings and op codes
+// All fields are initialized to null
+// Returns a handle to the created record, or 0 if memory could not be allocated
+
+function MsiCreateRecord(cParams: UINT): MSIHANDLE; stdcall;
+{$EXTERNALSYM MsiCreateRecord}
+
+// Report whether a record field is NULL
+// Returns TRUE if the field is null or does not exist
+// Returns FALSE if the field contains data, or the handle is invalid
+
+function MsiRecordIsNull(hRecord: MSIHANDLE; iField: UINT): BOOL; stdcall;
+{$EXTERNALSYM MsiRecordIsNull}
+
+// Return the length of a record field
+// Returns 0 if field is NULL or non-existent
+// Returns sizeof(Integer) if integer data
+// Returns character count if string data (not counting null terminator)
+// Returns bytes count if stream data
+
+function MsiRecordDataSize(hRecord: MSIHANDLE; iField: UINT): UINT; stdcall;
+{$EXTERNALSYM MsiRecordDataSize}
+
+// Set a record field to an integer value
+// Returns ERROR_SUCCESS, ERROR_INVALID_HANDLE, ERROR_INVALID_FIELD
+
+function MsiRecordSetInteger(hRecord: MSIHANDLE; iField: UINT; iValue: Integer): UINT; stdcall;
+{$EXTERNALSYM MsiRecordSetInteger}
+
+// Copy a string into the designated field
+// A null string pointer and an empty string both set the field to null
+// Returns ERROR_SUCCESS, ERROR_INVALID_HANDLE, ERROR_INVALID_FIELD
+
+function MsiRecordSetStringA(hRecord: MSIHANDLE; iField: UINT; szValue: LPCSTR): UINT; stdcall;
+{$EXTERNALSYM MsiRecordSetStringA}
+function MsiRecordSetStringW(hRecord: MSIHANDLE; iField: UINT; szValue: LPCWSTR): UINT; stdcall;
+{$EXTERNALSYM MsiRecordSetStringW}
+function MsiRecordSetString(hRecord: MSIHANDLE; iField: UINT; szValue: LPCTSTR): UINT; stdcall;
+{$EXTERNALSYM MsiRecordSetString}
+
+// Return the integer value from a record field
+// Returns the value MSI_NULL_INTEGER if the field is null
+// or if the field is a string that cannot be converted to an integer
+
+function MsiRecordGetInteger(hRecord: MSIHANDLE; iField: UINT): Integer; stdcall;
+{$EXTERNALSYM MsiRecordGetInteger}
+
+// Return the string value of a record field
+// Integer fields will be converted to a string
+// Null and non-existent fields will report a value of 0
+// Fields containing stream data will return ERROR_INVALID_DATATYPE
+// Returns ERROR_SUCCESS, ERROR_MORE_DATA,
+// ERROR_INVALID_HANDLE, ERROR_INVALID_FIELD, ERROR_BAD_ARGUMENTS
+
+function MsiRecordGetStringA(hRecord: MSIHANDLE; iField: UINT; szValueBuf: LPSTR;
+ var pcchValueBuf: DWORD): UINT; stdcall;
+{$EXTERNALSYM MsiRecordGetStringA}
+function MsiRecordGetStringW(hRecord: MSIHANDLE; iField: UINT; szValueBuf: LPWSTR;
+ var pcchValueBuf: DWORD): UINT; stdcall;
+{$EXTERNALSYM MsiRecordGetStringW}
+function MsiRecordGetString(hRecord: MSIHANDLE; iField: UINT; szValueBuf: LPTSTR;
+ var pcchValueBuf: DWORD): UINT; stdcall;
+{$EXTERNALSYM MsiRecordGetString}
+
+// Returns the number of fields allocated in the record
+// Does not count field 0, used for formatting and op codes
+
+function MsiRecordGetFieldCount(hRecord: MSIHANDLE): UINT; stdcall;
+{$EXTERNALSYM MsiRecordGetFieldCount}
+
+// Set a record stream field from a file
+// The contents of the specified file will be read into a stream object
+// The stream will be persisted if the record is inserted into the database
+// Execution of this function sets the error record, accessible via MsiGetLastErrorRecord
+
+function MsiRecordSetStreamA(hRecord: MSIHANDLE; iField: UINT; szFilePath: LPCSTR): UINT; stdcall;
+{$EXTERNALSYM MsiRecordSetStreamA}
+function MsiRecordSetStreamW(hRecord: MSIHANDLE; iField: UINT; szFilePath: LPCWSTR): UINT; stdcall;
+{$EXTERNALSYM MsiRecordSetStreamW}
+function MsiRecordSetStream(hRecord: MSIHANDLE; iField: UINT; szFilePath: LPCTSTR): UINT; stdcall;
+{$EXTERNALSYM MsiRecordSetStream}
+
+// Read bytes from a record stream field into a buffer
+// Must set the in/out argument to the requested byte count to read
+// The number of bytes transferred is returned through the argument
+// If no more bytes are available, ERROR_SUCCESS is still returned
+
+function MsiRecordReadStream(hRecord: MSIHANDLE; iField: UINT; szDataBuf: PChar;
+ var pcbDataBuf: DWORD): UINT; stdcall;
+{$EXTERNALSYM MsiRecordReadStream}
+
+// Clears all data fields in a record to NULL
+
+function MsiRecordClearData(hRecord: MSIHANDLE): UINT; stdcall;
+{$EXTERNALSYM MsiRecordClearData}
+
+// --------------------------------------------------------------------------
+// Functions to access a running installation, called from custom actions
+// The install handle is the single argument passed to custom actions
+// --------------------------------------------------------------------------
+
+// Return a handle to the database currently in use by this installer instance
+
+function MsiGetActiveDatabase(hInstall: MSIHANDLE): MSIHANDLE; stdcall;
+{$EXTERNALSYM MsiGetActiveDatabase}
+
+// Set the value for an installer property
+// If the property is not defined, it will be created
+// If the value is null or an empty string, the property will be removed
+// Returns ERROR_SUCCESS, ERROR_INVALID_HANDLE, ERROR_BAD_ARGUMENTS
+
+function MsiSetPropertyA(hInstall: MSIHANDLE; szName: LPCSTR; szValue: LPCSTR): UINT; stdcall;
+{$EXTERNALSYM MsiSetPropertyA}
+function MsiSetPropertyW(hInstall: MSIHANDLE; szName: LPCWSTR; szValue: LPCWSTR): UINT; stdcall;
+{$EXTERNALSYM MsiSetPropertyW}
+function MsiSetProperty(hInstall: MSIHANDLE; szName: LPCTSTR; szValue: LPCTSTR): UINT; stdcall;
+{$EXTERNALSYM MsiSetProperty}
+
+// Get the value for an installer property
+// If the property is not defined, it is equivalent to a 0-length value, not error
+// Returns ERROR_SUCCESS, ERROR_MORE_DATA, ERROR_INVALID_HANDLE, ERROR_BAD_ARGUMENTS
+
+function MsiGetPropertyA(hInstall: MSIHANDLE; szName: LPCSTR; szValueBuf: LPSTR;
+ var pcchValueBuf: DWORD): UINT; stdcall;
+{$EXTERNALSYM MsiGetPropertyA}
+function MsiGetPropertyW(hInstall: MSIHANDLE; szName: LPCWSTR; szValueBuf: LPWSTR;
+ var pcchValueBuf: DWORD): UINT; stdcall;
+{$EXTERNALSYM MsiGetPropertyW}
+function MsiGetProperty(hInstall: MSIHANDLE; szName: LPCTSTR; szValueBuf: LPTSTR;
+ var pcchValueBuf: DWORD): UINT; stdcall;
+{$EXTERNALSYM MsiGetProperty}
+
+// Return the numeric language for the currently running install
+// Returns 0 if an install not running
+
+function MsiGetLanguage(hInstall: MSIHANDLE): LANGID; stdcall;
+{$EXTERNALSYM MsiGetLanguage}
+
+// Return one of the boolean internal installer states
+// Returns FALSE if the handle is not active or if the mode is not implemented
+
+function MsiGetMode(hInstall: MSIHANDLE; eRunMode: MSIRUNMODE): BOOL; stdcall;
+{$EXTERNALSYM MsiGetMode}
+
+// Set an internal install session boolean mode - Note: most modes are read-only
+// Returns ERROR_SUCCESS if the mode can be set to the desired state
+// Returns ERROR_ACCESS_DENIED if the mode is not settable
+// Returns ERROR_INVALID_HANDLE if the handle is not an active install session
+
+function MsiSetMode(hInstall: MSIHANDLE; eRunMode: MSIRUNMODE; fState: BOOL): UINT; stdcall;
+{$EXTERNALSYM MsiSetMode}
+
+// Format record data using a format string containing field markers and/or properties
+// Record field 0 must contain the format string
+// Other fields must contain data that may be referenced by the format string.
+
+function MsiFormatRecordA(hInstall: MSIHANDLE; hRecord: MSIHANDLE; szResultBuf: LPSTR;
+ var pcchResultBuf: DWORD): UINT; stdcall;
+{$EXTERNALSYM MsiFormatRecordA}
+function MsiFormatRecordW(hInstall: MSIHANDLE; hRecord: MSIHANDLE; szResultBuf: LPWSTR;
+ var pcchResultBuf: DWORD): UINT; stdcall;
+{$EXTERNALSYM MsiFormatRecordW}
+function MsiFormatRecord(hInstall: MSIHANDLE; hRecord: MSIHANDLE; szResultBuf: LPTSTR;
+ var pcchResultBuf: DWORD): UINT; stdcall;
+{$EXTERNALSYM MsiFormatRecord}
+
+// Execute another action, either built-in, custom, or UI wizard
+// Returns ERROR_FUNCTION_NOT_CALLED if action not found
+// Returns ERROR_SUCCESS if action completed succesfully
+// Returns ERROR_INSTALL_USEREXIT if user cancelled during action
+// Returns ERROR_INSTALL_FAILURE if action failed
+// Returns ERROR_INSTALL_SUSPEND if user suspended installation
+// Returns ERROR_MORE_DATA if action wishes to skip remaining actions
+// Returns ERROR_INVALID_HANDLE_STATE if install session not active
+// Returns ERROR_INVALID_DATA if failure calling custom action
+// Returns ERROR_INVALID_HANDLE or ERROR_INVALID_PARAMETER if arguments invalid
+
+function MsiDoActionA(hInstall: MSIHANDLE; szAction: LPCSTR): UINT; stdcall;
+{$EXTERNALSYM MsiDoActionA}
+function MsiDoActionW(hInstall: MSIHANDLE; szAction: LPCWSTR): UINT; stdcall;
+{$EXTERNALSYM MsiDoActionW}
+function MsiDoAction(hInstall: MSIHANDLE; szAction: LPCTSTR): UINT; stdcall;
+{$EXTERNALSYM MsiDoAction}
+
+// Execute another action sequence, as descibed in the specified table
+// Returns the same error codes as MsiDoAction
+
+function MsiSequenceA(hInstall: MSIHANDLE; szTable: LPCSTR; iSequenceMode: Integer): UINT; stdcall;
+{$EXTERNALSYM MsiSequenceA}
+function MsiSequenceW(hInstall: MSIHANDLE; szTable: LPCWSTR; iSequenceMode: Integer): UINT; stdcall;
+{$EXTERNALSYM MsiSequenceW}
+function MsiSequence(hInstall: MSIHANDLE; szTable: LPCTSTR; iSequenceMode: Integer): UINT; stdcall;
+{$EXTERNALSYM MsiSequence}
+
+// Send an error record to the installer for processing.
+// If field 0 (template) is not set, field 1 must be set to the error code,
+// corresponding the the error message in the Error database table,
+// and the message will be formatted using the template from the Error table
+// before passing it to the UI handler for display.
+// Returns Win32 button codes: IDOK IDCANCEL IDABORT IDRETRY IDIGNORE IDYES IDNO
+// or 0 if no action taken, or -1 if invalid argument or handle
+
+function MsiProcessMessage(hInstall: MSIHANDLE; eMessageType: INSTALLMESSAGE;
+ hRecord: MSIHANDLE): Integer; stdcall;
+{$EXTERNALSYM MsiProcessMessage}
+
+// Evaluate a conditional expression containing property names and values
+
+function MsiEvaluateConditionA(hInstall: MSIHANDLE; szCondition: LPCSTR): MSICONDITION; stdcall;
+{$EXTERNALSYM MsiEvaluateConditionA}
+function MsiEvaluateConditionW(hInstall: MSIHANDLE; szCondition: LPCWSTR): MSICONDITION; stdcall;
+{$EXTERNALSYM MsiEvaluateConditionW}
+function MsiEvaluateCondition(hInstall: MSIHANDLE; szCondition: LPCTSTR): MSICONDITION; stdcall;
+{$EXTERNALSYM MsiEvaluateCondition}
+
+// Get the installed state and requested action state of a feature
+// Execution of this function sets the error record, accessible via MsiGetLastErrorRecord
+
+function MsiGetFeatureStateA(hInstall: MSIHANDLE; szFeature: LPCSTR;
+ var piInstalled: INSTALLSTATE; var piAction: INSTALLSTATE): UINT; stdcall;
+{$EXTERNALSYM MsiGetFeatureStateA}
+function MsiGetFeatureStateW(hInstall: MSIHANDLE; szFeature: LPCWSTR;
+ var piInstalled: INSTALLSTATE; var piAction: INSTALLSTATE): UINT; stdcall;
+{$EXTERNALSYM MsiGetFeatureStateW}
+function MsiGetFeatureState(hInstall: MSIHANDLE; szFeature: LPCTSTR;
+ var piInstalled: INSTALLSTATE; var piAction: INSTALLSTATE): UINT; stdcall;
+{$EXTERNALSYM MsiGetFeatureState}
+
+// Request a feature to be set to a specified state
+// Execution of this function sets the error record, accessible via MsiGetLastErrorRecord
+
+function MsiSetFeatureStateA(hInstall: MSIHANDLE; szFeature: LPCSTR;
+ iState: INSTALLSTATE): UINT; stdcall;
+{$EXTERNALSYM MsiSetFeatureStateA}
+function MsiSetFeatureStateW(hInstall: MSIHANDLE; szFeature: LPCWSTR;
+ iState: INSTALLSTATE): UINT; stdcall;
+{$EXTERNALSYM MsiSetFeatureStateW}
+function MsiSetFeatureState(hInstall: MSIHANDLE; szFeature: LPCTSTR;
+ iState: INSTALLSTATE): UINT; stdcall;
+{$EXTERNALSYM MsiSetFeatureState}
+
+// Set the attribute bits of a specified feature at runtime.
+// Execution of this function sets the error record, accessible via MsiGetLastErrorRecord
+
+function MsiSetFeatureAttributesA(hInstall: MSIHANDLE; szFeature: LPCSTR;
+ dwAttributes: DWORD): UINT; stdcall;
+{$EXTERNALSYM MsiSetFeatureAttributesA}
+function MsiSetFeatureAttributesW(hInstall: MSIHANDLE; szFeature: LPCWSTR;
+ dwAttributes: DWORD): UINT; stdcall;
+{$EXTERNALSYM MsiSetFeatureAttributesW}
+function MsiSetFeatureAttributes(hInstall: MSIHANDLE; szFeature: LPCTSTR;
+ dwAttributes: DWORD): UINT; stdcall;
+{$EXTERNALSYM MsiSetFeatureAttributes}
+
+// Get the installed state and requested action state of a component
+// Execution of this function sets the error record, accessible via MsiGetLastErrorRecord
+
+function MsiGetComponentStateA(hInstall: MSIHANDLE; szComponent: LPCSTR;
+ var piInstalled: INSTALLSTATE; var piAction: INSTALLSTATE): UINT; stdcall;
+{$EXTERNALSYM MsiGetComponentStateA}
+function MsiGetComponentStateW(hInstall: MSIHANDLE; szComponent: LPCWSTR;
+ var piInstalled: INSTALLSTATE; var piAction: INSTALLSTATE): UINT; stdcall;
+{$EXTERNALSYM MsiGetComponentStateW}
+function MsiGetComponentState(hInstall: MSIHANDLE; szComponent: LPCTSTR;
+ var piInstalled: INSTALLSTATE; var piAction: INSTALLSTATE): UINT; stdcall;
+{$EXTERNALSYM MsiGetComponentState}
+
+// Request a component to be set to a specified state
+// Execution of this function sets the error record, accessible via MsiGetLastErrorRecord
+
+function MsiSetComponentStateA(hInstall: MSIHANDLE; szComponent: LPCSTR;
+ iState: INSTALLSTATE): UINT; stdcall;
+{$EXTERNALSYM MsiSetComponentStateA}
+function MsiSetComponentStateW(hInstall: MSIHANDLE; szComponent: LPCWSTR;
+ iState: INSTALLSTATE): UINT; stdcall;
+{$EXTERNALSYM MsiSetComponentStateW}
+function MsiSetComponentState(hInstall: MSIHANDLE; szComponent: LPCTSTR;
+ iState: INSTALLSTATE): UINT; stdcall;
+{$EXTERNALSYM MsiSetComponentState}
+
+// Return the disk cost for a feature and related features
+// Can specify either current feature state or proposed state
+// Can specify extent of related features to cost
+// Note that adding costs for several features may produce an
+// excessively large cost due to shared components and parents.
+// Execution of this function sets the error record, accessible via MsiGetLastErrorRecord
+
+function MsiGetFeatureCostA(hInstall: MSIHANDLE; szFeature: LPCSTR;
+ iCostTree: MSICOSTTREE; iState: INSTALLSTATE; var piCost: Integer): UINT; stdcall;
+{$EXTERNALSYM MsiGetFeatureCostA}
+function MsiGetFeatureCostW(hInstall: MSIHANDLE; szFeature: LPCWSTR;
+ iCostTree: MSICOSTTREE; iState: INSTALLSTATE; var piCost: Integer): UINT; stdcall;
+{$EXTERNALSYM MsiGetFeatureCostW}
+function MsiGetFeatureCost(hInstall: MSIHANDLE; szFeature: LPCTSTR;
+ iCostTree: MSICOSTTREE; iState: INSTALLSTATE; var piCost: Integer): UINT; stdcall;
+{$EXTERNALSYM MsiGetFeatureCost}
+
+// Enumerates the costs and temporary costs per drives for
+// szComponent. If szComponent is set to NULL, it enumerates
+// the above costs for the engine, per drives.
+//
+// The enumeration is 0-based, i.e. it returns the data for
+// the first drive when called w/ dwIndex set to 0.
+//
+// Can specify either current feature state or proposed state.
+//
+// Execution of this function sets the error record, accessible
+// via MsiGetLastErrorRecord.
+
+function MsiEnumComponentCostsA(hInstall: MSIHANDLE; szComponent: LPCSTR; dwIndex: DWORD; iState: INSTALLSTATE;
+ szDriveBuf: LPSTR; var pcchDriveBuf: DWORD; var piCost: INT; piTempCost: INT): UINT; stdcall;
+{$EXTERNALSYM MsiEnumComponentCostsA}
+function MsiEnumComponentCostsW(hInstall: MSIHANDLE; szComponent: LPCWSTR; dwIndex: DWORD; iState: INSTALLSTATE;
+ szDriveBuf: LPWSTR; var pcchDriveBuf: DWORD; var piCost: INT; var piTempCost: INT): UINT; stdcall;
+{$EXTERNALSYM MsiEnumComponentCostsW}
+function MsiEnumComponentCosts(hInstall: MSIHANDLE; szComponent: LPCTSTR; dwIndex: DWORD; iState: INSTALLSTATE;
+ szDriveBuf: LPTSTR; var pcchDriveBuf: DWORD; var piCost: INT; var piTempCost: INT): UINT; stdcall;
+{$EXTERNALSYM MsiEnumComponentCosts}
+
+// Set the install level for a full product installation (not a feature request)
+// Setting the value to 0 initialized components and features to the default level
+// Execution of this function sets the error record, accessible via MsiGetLastErrorRecord
+
+function MsiSetInstallLevel(hInstall: MSIHANDLE; iInstallLevel: Integer): UINT; stdcall;
+{$EXTERNALSYM MsiSetInstallLevel}
+
+// Get the valid install states for a feature, represented by bit flags
+// For each valid install state, a bit is set of value: (1 << INSTALLSTATE)
+// Execution of this function sets the error record, accessible via MsiGetLastErrorRecord
+
+function MsiGetFeatureValidStatesA(hInstall: MSIHANDLE; szFeature: LPCSTR;
+ var dwInstallStates: DWORD): UINT; stdcall;
+{$EXTERNALSYM MsiGetFeatureValidStatesA}
+function MsiGetFeatureValidStatesW(hInstall: MSIHANDLE; szFeature: LPCWSTR;
+ var dwInstallStates: DWORD): UINT; stdcall;
+{$EXTERNALSYM MsiGetFeatureValidStatesW}
+function MsiGetFeatureValidStates(hInstall: MSIHANDLE; szFeature: LPCTSTR;
+ var dwInstallStates: DWORD): UINT; stdcall;
+{$EXTERNALSYM MsiGetFeatureValidStates}
+
+// Return the full source path for a folder in the Directory table
+// Execution of this function sets the error record, accessible via MsiGetLastErrorRecord
+
+function MsiGetSourcePathA(hInstall: MSIHANDLE; szFolder: LPCSTR; szPathBuf: LPSTR;
+ var pcchPathBuf: DWORD): UINT; stdcall;
+{$EXTERNALSYM MsiGetSourcePathA}
+function MsiGetSourcePathW(hInstall: MSIHANDLE; szFolder: LPCWSTR; szPathBuf: LPWSTR;
+ var pcchPathBuf: DWORD): UINT; stdcall;
+{$EXTERNALSYM MsiGetSourcePathW}
+function MsiGetSourcePath(hInstall: MSIHANDLE; szFolder: LPCTSTR; szPathBuf: LPTSTR;
+ var pcchPathBuf: DWORD): UINT; stdcall;
+{$EXTERNALSYM MsiGetSourcePath}
+
+// Return the full target path for a folder in the Directory table
+// Execution of this function sets the error record, accessible via MsiGetLastErrorRecord
+
+function MsiGetTargetPathA(hInstall: MSIHANDLE; szFolder: LPCSTR;
+ szPathBuf: LPSTR; var pcchPathBuf: DWORD): UINT; stdcall;
+{$EXTERNALSYM MsiGetTargetPathA}
+function MsiGetTargetPathW(hInstall: MSIHANDLE; szFolder: LPCWSTR;
+ szPathBuf: LPWSTR; var pcchPathBuf: DWORD): UINT; stdcall;
+{$EXTERNALSYM MsiGetTargetPathW}
+function MsiGetTargetPath(hInstall: MSIHANDLE; szFolder: LPCTSTR;
+ szPathBuf: LPTSTR; var pcchPathBuf: DWORD): UINT; stdcall;
+{$EXTERNALSYM MsiGetTargetPath}
+
+// Set the full target path for a folder in the Directory table
+// Execution of this function sets the error record, accessible via MsiGetLastErrorRecord
+
+function MsiSetTargetPathA(hInstall: MSIHANDLE; szFolder: LPCSTR;
+ szFolderPath: LPCSTR): UINT; stdcall;
+{$EXTERNALSYM MsiSetTargetPathA}
+function MsiSetTargetPathW(hInstall: MSIHANDLE; szFolder: LPCWSTR;
+ szFolderPath: LPCWSTR): UINT; stdcall;
+{$EXTERNALSYM MsiSetTargetPathW}
+function MsiSetTargetPath(hInstall: MSIHANDLE; szFolder: LPCTSTR;
+ szFolderPath: LPCTSTR): UINT; stdcall;
+{$EXTERNALSYM MsiSetTargetPath}
+
+// Check to see if sufficent disk space is present for the current installation
+// Returns ERROR_SUCCESS, ERROR_DISK_FULL, ERROR_INVALID_HANDLE_STATE, or ERROR_INVALID_HANDLE
+
+function MsiVerifyDiskSpace(hInstall: MSIHANDLE): UINT; stdcall;
+{$EXTERNALSYM MsiVerifyDiskSpace}
+
+// --------------------------------------------------------------------------
+// Functions for rendering UI dialogs from the database representations.
+// Purpose is for product development, not for use during installation.
+// --------------------------------------------------------------------------
+
+// Enable UI in preview mode to facilitate authoring of UI dialogs.
+// The preview mode will end when the handle is closed.
+
+function MsiEnableUIPreview(hDatabase: MSIHANDLE; var phPreview: MSIHANDLE): UINT; stdcall;
+{$EXTERNALSYM MsiEnableUIPreview}
+
+// Display any UI dialog as modeless and inactive.
+// Supplying a null name will remove any current dialog.
+
+function MsiPreviewDialogA(hPreview: MSIHANDLE; szDialogName: LPCSTR): UINT; stdcall;
+{$EXTERNALSYM MsiPreviewDialogA}
+function MsiPreviewDialogW(hPreview: MSIHANDLE; szDialogName: LPCWSTR): UINT; stdcall;
+{$EXTERNALSYM MsiPreviewDialogW}
+function MsiPreviewDialog(hPreview: MSIHANDLE; szDialogName: LPCTSTR): UINT; stdcall;
+{$EXTERNALSYM MsiPreviewDialog}
+
+// Display a billboard within a host control in the displayed dialog.
+// Supplying a null billboard name will remove any billboard displayed.
+
+function MsiPreviewBillboardA(hPreview: MSIHANDLE; szControlName: LPCSTR;
+ szBillboard: LPCSTR): UINT; stdcall;
+{$EXTERNALSYM MsiPreviewBillboardA}
+function MsiPreviewBillboardW(hPreview: MSIHANDLE; szControlName: LPCWSTR;
+ szBillboard: LPCWSTR): UINT; stdcall;
+{$EXTERNALSYM MsiPreviewBillboardW}
+function MsiPreviewBillboard(hPreview: MSIHANDLE; szControlName: LPCTSTR;
+ szBillboard: LPCTSTR): UINT; stdcall;
+{$EXTERNALSYM MsiPreviewBillboard}
+
+// --------------------------------------------------------------------------
+// Error handling not associated with any particular object
+// --------------------------------------------------------------------------
+
+// Return a record handle to the last function that generated an error record
+// Only specified functions will set the error record, or clear it if success
+// Field 1 of the record will contain the internal MSI error code
+// Other fields will contain data specific to the particular error
+// The error record is released internally after this function is executed
+
+function MsiGetLastErrorRecord: MSIHANDLE; stdcall;
+{$EXTERNALSYM MsiGetLastErrorRecord}
+
+implementation
+
+const
+ msilib = 'msi.dll';
+ {$IFDEF UNICODE}
+ AWSuffix = 'W';
+ {$ELSE}
+ AWSuffix = 'A';
+ {$ENDIF UNICODE}
+
+{$IFDEF DYNAMIC_LINK}
+
+var
+ _MsiDatabaseOpenViewA: Pointer;
+
+function MsiDatabaseOpenViewA;
+begin
+ GetProcedureAddress(_MsiDatabaseOpenViewA, msilib, 'MsiDatabaseOpenViewA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiDatabaseOpenViewA]
+ end;
+end;
+
+var
+ _MsiDatabaseOpenViewW: Pointer;
+
+function MsiDatabaseOpenViewW;
+begin
+ GetProcedureAddress(_MsiDatabaseOpenViewW, msilib, 'MsiDatabaseOpenViewW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiDatabaseOpenViewW]
+ end;
+end;
+
+var
+ _MsiDatabaseOpenView: Pointer;
+
+function MsiDatabaseOpenView;
+begin
+ GetProcedureAddress(_MsiDatabaseOpenView, msilib, 'MsiDatabaseOpenView' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiDatabaseOpenView]
+ end;
+end;
+
+var
+ _MsiViewGetErrorA: Pointer;
+
+function MsiViewGetErrorA;
+begin
+ GetProcedureAddress(_MsiViewGetErrorA, msilib, 'MsiViewGetErrorA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiViewGetErrorA]
+ end;
+end;
+
+var
+ _MsiViewGetErrorW: Pointer;
+
+function MsiViewGetErrorW;
+begin
+ GetProcedureAddress(_MsiViewGetErrorW, msilib, 'MsiViewGetErrorW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiViewGetErrorW]
+ end;
+end;
+
+var
+ _MsiViewGetError: Pointer;
+
+function MsiViewGetError;
+begin
+ GetProcedureAddress(_MsiViewGetError, msilib, 'MsiViewGetError' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiViewGetError]
+ end;
+end;
+
+var
+ _MsiViewExecute: Pointer;
+
+function MsiViewExecute;
+begin
+ GetProcedureAddress(_MsiViewExecute, msilib, 'MsiViewExecute');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiViewExecute]
+ end;
+end;
+
+var
+ _MsiViewFetch: Pointer;
+
+function MsiViewFetch;
+begin
+ GetProcedureAddress(_MsiViewFetch, msilib, 'MsiViewFetch');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiViewFetch]
+ end;
+end;
+
+var
+ _MsiViewModify: Pointer;
+
+function MsiViewModify;
+begin
+ GetProcedureAddress(_MsiViewModify, msilib, 'MsiViewModify');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiViewModify]
+ end;
+end;
+
+var
+ _MsiViewGetColumnInfo: Pointer;
+
+function MsiViewGetColumnInfo;
+begin
+ GetProcedureAddress(_MsiViewGetColumnInfo, msilib, 'MsiViewGetColumnInfo');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiViewGetColumnInfo]
+ end;
+end;
+
+var
+ _MsiViewClose: Pointer;
+
+function MsiViewClose;
+begin
+ GetProcedureAddress(_MsiViewClose, msilib, 'MsiViewClose');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiViewClose]
+ end;
+end;
+
+var
+ _MsiDatabaseGetPrimaryKeysA: Pointer;
+
+function MsiDatabaseGetPrimaryKeysA;
+begin
+ GetProcedureAddress(_MsiDatabaseGetPrimaryKeysA, msilib, 'MsiDatabaseGetPrimaryKeysA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiDatabaseGetPrimaryKeysA]
+ end;
+end;
+
+var
+ _MsiDatabaseGetPrimaryKeysW: Pointer;
+
+function MsiDatabaseGetPrimaryKeysW;
+begin
+ GetProcedureAddress(_MsiDatabaseGetPrimaryKeysW, msilib, 'MsiDatabaseGetPrimaryKeysW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiDatabaseGetPrimaryKeysW]
+ end;
+end;
+
+var
+ _MsiDatabaseGetPrimaryKeys: Pointer;
+
+function MsiDatabaseGetPrimaryKeys;
+begin
+ GetProcedureAddress(_MsiDatabaseGetPrimaryKeys, msilib, 'MsiDatabaseGetPrimaryKeys' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiDatabaseGetPrimaryKeys]
+ end;
+end;
+
+var
+ _MsiDatabaseIsTablePersistentA: Pointer;
+
+function MsiDatabaseIsTablePersistentA;
+begin
+ GetProcedureAddress(_MsiDatabaseIsTablePersistentA, msilib, 'MsiDatabaseIsTablePersistentA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiDatabaseIsTablePersistentA]
+ end;
+end;
+
+var
+ _MsiDatabaseIsTablePersistentW: Pointer;
+
+function MsiDatabaseIsTablePersistentW;
+begin
+ GetProcedureAddress(_MsiDatabaseIsTablePersistentW, msilib, 'MsiDatabaseIsTablePersistentW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiDatabaseIsTablePersistentW]
+ end;
+end;
+
+var
+ _MsiDatabaseIsTablePersistent: Pointer;
+
+function MsiDatabaseIsTablePersistent;
+begin
+ GetProcedureAddress(_MsiDatabaseIsTablePersistent, msilib, 'MsiDatabaseIsTablePersistent' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiDatabaseIsTablePersistent]
+ end;
+end;
+
+var
+ _MsiGetSummaryInformationA: Pointer;
+
+function MsiGetSummaryInformationA;
+begin
+ GetProcedureAddress(_MsiGetSummaryInformationA, msilib, 'MsiGetSummaryInformationA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiGetSummaryInformationA]
+ end;
+end;
+
+var
+ _MsiGetSummaryInformationW: Pointer;
+
+function MsiGetSummaryInformationW;
+begin
+ GetProcedureAddress(_MsiGetSummaryInformationW, msilib, 'MsiGetSummaryInformationW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiGetSummaryInformationW]
+ end;
+end;
+
+var
+ _MsiGetSummaryInformation: Pointer;
+
+function MsiGetSummaryInformation;
+begin
+ GetProcedureAddress(_MsiGetSummaryInformation, msilib, 'MsiGetSummaryInformation' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiGetSummaryInformation]
+ end;
+end;
+
+var
+ _MsiSummaryInfoGetPropertyCount: Pointer;
+
+function MsiSummaryInfoGetPropertyCount;
+begin
+ GetProcedureAddress(_MsiSummaryInfoGetPropertyCount, msilib, 'MsiSummaryInfoGetPropertyCount');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiSummaryInfoGetPropertyCount]
+ end;
+end;
+
+var
+ _MsiSummaryInfoSetPropertyA: Pointer;
+
+function MsiSummaryInfoSetPropertyA;
+begin
+ GetProcedureAddress(_MsiSummaryInfoSetPropertyA, msilib, 'MsiSummaryInfoSetPropertyA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiSummaryInfoSetPropertyA]
+ end;
+end;
+
+var
+ _MsiSummaryInfoSetPropertyW: Pointer;
+
+function MsiSummaryInfoSetPropertyW;
+begin
+ GetProcedureAddress(_MsiSummaryInfoSetPropertyW, msilib, 'MsiSummaryInfoSetPropertyW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiSummaryInfoSetPropertyW]
+ end;
+end;
+
+var
+ _MsiSummaryInfoSetProperty: Pointer;
+
+function MsiSummaryInfoSetProperty;
+begin
+ GetProcedureAddress(_MsiSummaryInfoSetProperty, msilib, 'MsiSummaryInfoSetProperty' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiSummaryInfoSetProperty]
+ end;
+end;
+
+var
+ _MsiSummaryInfoGetPropertyA: Pointer;
+
+function MsiSummaryInfoGetPropertyA;
+begin
+ GetProcedureAddress(_MsiSummaryInfoGetPropertyA, msilib, 'MsiSummaryInfoGetPropertyA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiSummaryInfoGetPropertyA]
+ end;
+end;
+
+var
+ _MsiSummaryInfoGetPropertyW: Pointer;
+
+function MsiSummaryInfoGetPropertyW;
+begin
+ GetProcedureAddress(_MsiSummaryInfoGetPropertyW, msilib, 'MsiSummaryInfoGetPropertyW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiSummaryInfoGetPropertyW]
+ end;
+end;
+
+var
+ _MsiSummaryInfoGetProperty: Pointer;
+
+function MsiSummaryInfoGetProperty;
+begin
+ GetProcedureAddress(_MsiSummaryInfoGetProperty, msilib, 'MsiSummaryInfoGetProperty' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiSummaryInfoGetProperty]
+ end;
+end;
+
+var
+ _MsiSummaryInfoPersist: Pointer;
+
+function MsiSummaryInfoPersist;
+begin
+ GetProcedureAddress(_MsiSummaryInfoPersist, msilib, 'MsiSummaryInfoPersist');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiSummaryInfoPersist]
+ end;
+end;
+
+var
+ _MsiOpenDatabaseA: Pointer;
+
+function MsiOpenDatabaseA;
+begin
+ GetProcedureAddress(_MsiOpenDatabaseA, msilib, 'MsiOpenDatabaseA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiOpenDatabaseA]
+ end;
+end;
+
+var
+ _MsiOpenDatabaseW: Pointer;
+
+function MsiOpenDatabaseW;
+begin
+ GetProcedureAddress(_MsiOpenDatabaseW, msilib, 'MsiOpenDatabaseW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiOpenDatabaseW]
+ end;
+end;
+
+var
+ _MsiOpenDatabase: Pointer;
+
+function MsiOpenDatabase;
+begin
+ GetProcedureAddress(_MsiOpenDatabase, msilib, 'MsiOpenDatabase' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiOpenDatabase]
+ end;
+end;
+
+var
+ _MsiDatabaseImportA: Pointer;
+
+function MsiDatabaseImportA;
+begin
+ GetProcedureAddress(_MsiDatabaseImportA, msilib, 'MsiDatabaseImportA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiDatabaseImportA]
+ end;
+end;
+
+var
+ _MsiDatabaseImportW: Pointer;
+
+function MsiDatabaseImportW;
+begin
+ GetProcedureAddress(_MsiDatabaseImportW, msilib, 'MsiDatabaseImportW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiDatabaseImportW]
+ end;
+end;
+
+var
+ _MsiDatabaseImport: Pointer;
+
+function MsiDatabaseImport;
+begin
+ GetProcedureAddress(_MsiDatabaseImport, msilib, 'MsiDatabaseImport' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiDatabaseImport]
+ end;
+end;
+
+var
+ _MsiDatabaseExportA: Pointer;
+
+function MsiDatabaseExportA;
+begin
+ GetProcedureAddress(_MsiDatabaseExportA, msilib, 'MsiDatabaseExportA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiDatabaseExportA]
+ end;
+end;
+
+var
+ _MsiDatabaseExportW: Pointer;
+
+function MsiDatabaseExportW;
+begin
+ GetProcedureAddress(_MsiDatabaseExportW, msilib, 'MsiDatabaseExportW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiDatabaseExportW]
+ end;
+end;
+
+var
+ _MsiDatabaseExport: Pointer;
+
+function MsiDatabaseExport;
+begin
+ GetProcedureAddress(_MsiDatabaseExport, msilib, 'MsiDatabaseExport' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiDatabaseExport]
+ end;
+end;
+
+var
+ _MsiDatabaseMergeA: Pointer;
+
+function MsiDatabaseMergeA;
+begin
+ GetProcedureAddress(_MsiDatabaseMergeA, msilib, 'MsiDatabaseMergeA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiDatabaseMergeA]
+ end;
+end;
+
+var
+ _MsiDatabaseMergeW: Pointer;
+
+function MsiDatabaseMergeW;
+begin
+ GetProcedureAddress(_MsiDatabaseMergeW, msilib, 'MsiDatabaseMergeW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiDatabaseMergeW]
+ end;
+end;
+
+var
+ _MsiDatabaseMerge: Pointer;
+
+function MsiDatabaseMerge;
+begin
+ GetProcedureAddress(_MsiDatabaseMerge, msilib, 'MsiDatabaseMerge' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiDatabaseMerge]
+ end;
+end;
+
+var
+ _MsiDatabaseGenerateTransformA: Pointer;
+
+function MsiDatabaseGenerateTransformA;
+begin
+ GetProcedureAddress(_MsiDatabaseGenerateTransformA, msilib, 'MsiDatabaseGenerateTransformA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiDatabaseGenerateTransformA]
+ end;
+end;
+
+var
+ _MsiDatabaseGenerateTransformW: Pointer;
+
+function MsiDatabaseGenerateTransformW;
+begin
+ GetProcedureAddress(_MsiDatabaseGenerateTransformW, msilib, 'MsiDatabaseGenerateTransformW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiDatabaseGenerateTransformW]
+ end;
+end;
+
+var
+ _MsiDatabaseGenerateTransform: Pointer;
+
+function MsiDatabaseGenerateTransform;
+begin
+ GetProcedureAddress(_MsiDatabaseGenerateTransform, msilib, 'MsiDatabaseGenerateTransform' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiDatabaseGenerateTransform]
+ end;
+end;
+
+var
+ _MsiDatabaseApplyTransformA: Pointer;
+
+function MsiDatabaseApplyTransformA;
+begin
+ GetProcedureAddress(_MsiDatabaseApplyTransformA, msilib, 'MsiDatabaseApplyTransformA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiDatabaseApplyTransformA]
+ end;
+end;
+
+var
+ _MsiDatabaseApplyTransformW: Pointer;
+
+function MsiDatabaseApplyTransformW;
+begin
+ GetProcedureAddress(_MsiDatabaseApplyTransformW, msilib, 'MsiDatabaseApplyTransformW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiDatabaseApplyTransformW]
+ end;
+end;
+
+var
+ _MsiDatabaseApplyTransform: Pointer;
+
+function MsiDatabaseApplyTransform;
+begin
+ GetProcedureAddress(_MsiDatabaseApplyTransform, msilib, 'MsiDatabaseApplyTransform' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiDatabaseApplyTransform]
+ end;
+end;
+
+var
+ _MsiCreateTransformSummaryInfoA: Pointer;
+
+function MsiCreateTransformSummaryInfoA;
+begin
+ GetProcedureAddress(_MsiCreateTransformSummaryInfoA, msilib, 'MsiCreateTransformSummaryInfoA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiCreateTransformSummaryInfoA]
+ end;
+end;
+
+var
+ _MsiCreateTransformSummaryInfoW: Pointer;
+
+function MsiCreateTransformSummaryInfoW;
+begin
+ GetProcedureAddress(_MsiCreateTransformSummaryInfoW, msilib, 'MsiCreateTransformSummaryInfoW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiCreateTransformSummaryInfoW]
+ end;
+end;
+
+var
+ _MsiCreateTransformSummaryInfo: Pointer;
+
+function MsiCreateTransformSummaryInfo;
+begin
+ GetProcedureAddress(_MsiCreateTransformSummaryInfo, msilib, 'MsiCreateTransformSummaryInfo' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiCreateTransformSummaryInfo]
+ end;
+end;
+
+var
+ _MsiDatabaseCommit: Pointer;
+
+function MsiDatabaseCommit;
+begin
+ GetProcedureAddress(_MsiDatabaseCommit, msilib, 'MsiDatabaseCommit');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiDatabaseCommit]
+ end;
+end;
+
+var
+ _MsiGetDatabaseState: Pointer;
+
+function MsiGetDatabaseState;
+begin
+ GetProcedureAddress(_MsiGetDatabaseState, msilib, 'MsiGetDatabaseState');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiGetDatabaseState]
+ end;
+end;
+
+var
+ _MsiCreateRecord: Pointer;
+
+function MsiCreateRecord;
+begin
+ GetProcedureAddress(_MsiCreateRecord, msilib, 'MsiCreateRecord');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiCreateRecord]
+ end;
+end;
+
+var
+ _MsiRecordIsNull: Pointer;
+
+function MsiRecordIsNull;
+begin
+ GetProcedureAddress(_MsiRecordIsNull, msilib, 'MsiRecordIsNull');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiRecordIsNull]
+ end;
+end;
+
+var
+ _MsiRecordDataSize: Pointer;
+
+function MsiRecordDataSize;
+begin
+ GetProcedureAddress(_MsiRecordDataSize, msilib, 'MsiRecordDataSize');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiRecordDataSize]
+ end;
+end;
+
+var
+ _MsiRecordSetInteger: Pointer;
+
+function MsiRecordSetInteger;
+begin
+ GetProcedureAddress(_MsiRecordSetInteger, msilib, 'MsiRecordSetInteger');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiRecordSetInteger]
+ end;
+end;
+
+var
+ _MsiRecordSetStringA: Pointer;
+
+function MsiRecordSetStringA;
+begin
+ GetProcedureAddress(_MsiRecordSetStringA, msilib, 'MsiRecordSetStringA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiRecordSetStringA]
+ end;
+end;
+
+var
+ _MsiRecordSetStringW: Pointer;
+
+function MsiRecordSetStringW;
+begin
+ GetProcedureAddress(_MsiRecordSetStringW, msilib, 'MsiRecordSetStringW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiRecordSetStringW]
+ end;
+end;
+
+var
+ _MsiRecordSetString: Pointer;
+
+function MsiRecordSetString;
+begin
+ GetProcedureAddress(_MsiRecordSetString, msilib, 'MsiRecordSetString' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiRecordSetString]
+ end;
+end;
+
+var
+ _MsiRecordGetInteger: Pointer;
+
+function MsiRecordGetInteger;
+begin
+ GetProcedureAddress(_MsiRecordGetInteger, msilib, 'MsiRecordGetInteger');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiRecordGetInteger]
+ end;
+end;
+
+var
+ _MsiRecordGetStringA: Pointer;
+
+function MsiRecordGetStringA;
+begin
+ GetProcedureAddress(_MsiRecordGetStringA, msilib, 'MsiRecordGetStringA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiRecordGetStringA]
+ end;
+end;
+
+var
+ _MsiRecordGetStringW: Pointer;
+
+function MsiRecordGetStringW;
+begin
+ GetProcedureAddress(_MsiRecordGetStringW, msilib, 'MsiRecordGetStringW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiRecordGetStringW]
+ end;
+end;
+
+var
+ _MsiRecordGetString: Pointer;
+
+function MsiRecordGetString;
+begin
+ GetProcedureAddress(_MsiRecordGetString, msilib, 'MsiRecordGetString' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiRecordGetString]
+ end;
+end;
+
+var
+ _MsiRecordGetFieldCount: Pointer;
+
+function MsiRecordGetFieldCount;
+begin
+ GetProcedureAddress(_MsiRecordGetFieldCount, msilib, 'MsiRecordGetFieldCount');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiRecordGetFieldCount]
+ end;
+end;
+
+var
+ _MsiRecordSetStreamA: Pointer;
+
+function MsiRecordSetStreamA;
+begin
+ GetProcedureAddress(_MsiRecordSetStreamA, msilib, 'MsiRecordSetStreamA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiRecordSetStreamA]
+ end;
+end;
+
+var
+ _MsiRecordSetStreamW: Pointer;
+
+function MsiRecordSetStreamW;
+begin
+ GetProcedureAddress(_MsiRecordSetStreamW, msilib, 'MsiRecordSetStreamW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiRecordSetStreamW]
+ end;
+end;
+
+var
+ _MsiRecordSetStream: Pointer;
+
+function MsiRecordSetStream;
+begin
+ GetProcedureAddress(_MsiRecordSetStream, msilib, 'MsiRecordSetStream' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiRecordSetStream]
+ end;
+end;
+
+var
+ _MsiRecordReadStream: Pointer;
+
+function MsiRecordReadStream;
+begin
+ GetProcedureAddress(_MsiRecordReadStream, msilib, 'MsiRecordReadStream');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiRecordReadStream]
+ end;
+end;
+
+var
+ _MsiRecordClearData: Pointer;
+
+function MsiRecordClearData;
+begin
+ GetProcedureAddress(_MsiRecordClearData, msilib, 'MsiRecordClearData');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiRecordClearData]
+ end;
+end;
+
+var
+ _MsiGetActiveDatabase: Pointer;
+
+function MsiGetActiveDatabase;
+begin
+ GetProcedureAddress(_MsiGetActiveDatabase, msilib, 'MsiGetActiveDatabase');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiGetActiveDatabase]
+ end;
+end;
+
+var
+ _MsiSetPropertyA: Pointer;
+
+function MsiSetPropertyA;
+begin
+ GetProcedureAddress(_MsiSetPropertyA, msilib, 'MsiSetPropertyA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiSetPropertyA]
+ end;
+end;
+
+var
+ _MsiSetPropertyW: Pointer;
+
+function MsiSetPropertyW;
+begin
+ GetProcedureAddress(_MsiSetPropertyW, msilib, 'MsiSetPropertyW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiSetPropertyW]
+ end;
+end;
+
+var
+ _MsiSetProperty: Pointer;
+
+function MsiSetProperty;
+begin
+ GetProcedureAddress(_MsiSetProperty, msilib, 'MsiSetProperty' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiSetProperty]
+ end;
+end;
+
+var
+ _MsiGetPropertyA: Pointer;
+
+function MsiGetPropertyA;
+begin
+ GetProcedureAddress(_MsiGetPropertyA, msilib, 'MsiGetPropertyA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiGetPropertyA]
+ end;
+end;
+
+var
+ _MsiGetPropertyW: Pointer;
+
+function MsiGetPropertyW;
+begin
+ GetProcedureAddress(_MsiGetPropertyW, msilib, 'MsiGetPropertyW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiGetPropertyW]
+ end;
+end;
+
+var
+ _MsiGetProperty: Pointer;
+
+function MsiGetProperty;
+begin
+ GetProcedureAddress(_MsiGetProperty, msilib, 'MsiGetProperty' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiGetProperty]
+ end;
+end;
+
+var
+ _MsiGetLanguage: Pointer;
+
+function MsiGetLanguage;
+begin
+ GetProcedureAddress(_MsiGetLanguage, msilib, 'MsiGetLanguage');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiGetLanguage]
+ end;
+end;
+
+var
+ _MsiGetMode: Pointer;
+
+function MsiGetMode;
+begin
+ GetProcedureAddress(_MsiGetMode, msilib, 'MsiGetMode');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiGetMode]
+ end;
+end;
+
+var
+ _MsiSetMode: Pointer;
+
+function MsiSetMode;
+begin
+ GetProcedureAddress(_MsiSetMode, msilib, 'MsiSetMode');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiSetMode]
+ end;
+end;
+
+var
+ _MsiFormatRecordA: Pointer;
+
+function MsiFormatRecordA;
+begin
+ GetProcedureAddress(_MsiFormatRecordA, msilib, 'MsiFormatRecordA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiFormatRecordA]
+ end;
+end;
+
+var
+ _MsiFormatRecordW: Pointer;
+
+function MsiFormatRecordW;
+begin
+ GetProcedureAddress(_MsiFormatRecordW, msilib, 'MsiFormatRecordW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiFormatRecordW]
+ end;
+end;
+
+var
+ _MsiFormatRecord: Pointer;
+
+function MsiFormatRecord;
+begin
+ GetProcedureAddress(_MsiFormatRecord, msilib, 'MsiFormatRecord' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiFormatRecord]
+ end;
+end;
+
+var
+ _MsiDoActionA: Pointer;
+
+function MsiDoActionA;
+begin
+ GetProcedureAddress(_MsiDoActionA, msilib, 'MsiDoActionA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiDoActionA]
+ end;
+end;
+
+var
+ _MsiDoActionW: Pointer;
+
+function MsiDoActionW;
+begin
+ GetProcedureAddress(_MsiDoActionW, msilib, 'MsiDoActionW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiDoActionW]
+ end;
+end;
+
+var
+ _MsiDoAction: Pointer;
+
+function MsiDoAction;
+begin
+ GetProcedureAddress(_MsiDoAction, msilib, 'MsiDoAction' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiDoAction]
+ end;
+end;
+
+var
+ _MsiSequenceA: Pointer;
+
+function MsiSequenceA;
+begin
+ GetProcedureAddress(_MsiSequenceA, msilib, 'MsiSequenceA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiSequenceA]
+ end;
+end;
+
+var
+ _MsiSequenceW: Pointer;
+
+function MsiSequenceW;
+begin
+ GetProcedureAddress(_MsiSequenceW, msilib, 'MsiSequenceW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiSequenceW]
+ end;
+end;
+
+var
+ _MsiSequence: Pointer;
+
+function MsiSequence;
+begin
+ GetProcedureAddress(_MsiSequence, msilib, 'MsiSequence' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiSequence]
+ end;
+end;
+
+var
+ _MsiProcessMessage: Pointer;
+
+function MsiProcessMessage;
+begin
+ GetProcedureAddress(_MsiProcessMessage, msilib, 'MsiProcessMessage');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiProcessMessage]
+ end;
+end;
+
+var
+ _MsiEvaluateConditionA: Pointer;
+
+function MsiEvaluateConditionA;
+begin
+ GetProcedureAddress(_MsiEvaluateConditionA, msilib, 'MsiEvaluateConditionA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiEvaluateConditionA]
+ end;
+end;
+
+var
+ _MsiEvaluateConditionW: Pointer;
+
+function MsiEvaluateConditionW;
+begin
+ GetProcedureAddress(_MsiEvaluateConditionW, msilib, 'MsiEvaluateConditionW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiEvaluateConditionW]
+ end;
+end;
+
+var
+ _MsiEvaluateCondition: Pointer;
+
+function MsiEvaluateCondition;
+begin
+ GetProcedureAddress(_MsiEvaluateCondition, msilib, 'MsiEvaluateCondition' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiEvaluateCondition]
+ end;
+end;
+
+var
+ _MsiGetFeatureStateA: Pointer;
+
+function MsiGetFeatureStateA;
+begin
+ GetProcedureAddress(_MsiGetFeatureStateA, msilib, 'MsiGetFeatureStateA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiGetFeatureStateA]
+ end;
+end;
+
+var
+ _MsiGetFeatureStateW: Pointer;
+
+function MsiGetFeatureStateW;
+begin
+ GetProcedureAddress(_MsiGetFeatureStateW, msilib, 'MsiGetFeatureStateW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiGetFeatureStateW]
+ end;
+end;
+
+var
+ _MsiGetFeatureState: Pointer;
+
+function MsiGetFeatureState;
+begin
+ GetProcedureAddress(_MsiGetFeatureState, msilib, 'MsiGetFeatureState' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiGetFeatureState]
+ end;
+end;
+
+var
+ _MsiSetFeatureStateA: Pointer;
+
+function MsiSetFeatureStateA;
+begin
+ GetProcedureAddress(_MsiSetFeatureStateA, msilib, 'MsiSetFeatureStateA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiSetFeatureStateA]
+ end;
+end;
+
+var
+ _MsiSetFeatureStateW: Pointer;
+
+function MsiSetFeatureStateW;
+begin
+ GetProcedureAddress(_MsiSetFeatureStateW, msilib, 'MsiSetFeatureStateW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiSetFeatureStateW]
+ end;
+end;
+
+var
+ _MsiSetFeatureState: Pointer;
+
+function MsiSetFeatureState;
+begin
+ GetProcedureAddress(_MsiSetFeatureState, msilib, 'MsiSetFeatureState' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiSetFeatureState]
+ end;
+end;
+
+var
+ _MsiSetFeatureAttributesA: Pointer;
+
+function MsiSetFeatureAttributesA;
+begin
+ GetProcedureAddress(_MsiSetFeatureAttributesA, msilib, 'MsiSetFeatureAttributesA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiSetFeatureAttributesA]
+ end;
+end;
+
+var
+ _MsiSetFeatureAttributesW: Pointer;
+
+function MsiSetFeatureAttributesW;
+begin
+ GetProcedureAddress(_MsiSetFeatureAttributesW, msilib, 'MsiSetFeatureAttributesW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiSetFeatureAttributesW]
+ end;
+end;
+
+var
+ _MsiSetFeatureAttributes: Pointer;
+
+function MsiSetFeatureAttributes;
+begin
+ GetProcedureAddress(_MsiSetFeatureAttributes, msilib, 'MsiSetFeatureAttributes' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiSetFeatureAttributes]
+ end;
+end;
+
+var
+ _MsiGetComponentStateA: Pointer;
+
+function MsiGetComponentStateA;
+begin
+ GetProcedureAddress(_MsiGetComponentStateA, msilib, 'MsiGetComponentStateA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiGetComponentStateA]
+ end;
+end;
+
+var
+ _MsiGetComponentStateW: Pointer;
+
+function MsiGetComponentStateW;
+begin
+ GetProcedureAddress(_MsiGetComponentStateW, msilib, 'MsiGetComponentStateW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiGetComponentStateW]
+ end;
+end;
+
+var
+ _MsiGetComponentState: Pointer;
+
+function MsiGetComponentState;
+begin
+ GetProcedureAddress(_MsiGetComponentState, msilib, 'MsiGetComponentState' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiGetComponentState]
+ end;
+end;
+
+var
+ _MsiSetComponentStateA: Pointer;
+
+function MsiSetComponentStateA;
+begin
+ GetProcedureAddress(_MsiSetComponentStateA, msilib, 'MsiSetComponentStateA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiSetComponentStateA]
+ end;
+end;
+
+var
+ _MsiSetComponentStateW: Pointer;
+
+function MsiSetComponentStateW;
+begin
+ GetProcedureAddress(_MsiSetComponentStateW, msilib, 'MsiSetComponentStateW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiSetComponentStateW]
+ end;
+end;
+
+var
+ _MsiSetComponentState: Pointer;
+
+function MsiSetComponentState;
+begin
+ GetProcedureAddress(_MsiSetComponentState, msilib, 'MsiSetComponentState' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiSetComponentState]
+ end;
+end;
+
+var
+ _MsiGetFeatureCostA: Pointer;
+
+function MsiGetFeatureCostA;
+begin
+ GetProcedureAddress(_MsiGetFeatureCostA, msilib, 'MsiGetFeatureCostA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiGetFeatureCostA]
+ end;
+end;
+
+var
+ _MsiGetFeatureCostW: Pointer;
+
+function MsiGetFeatureCostW;
+begin
+ GetProcedureAddress(_MsiGetFeatureCostW, msilib, 'MsiGetFeatureCostW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiGetFeatureCostW]
+ end;
+end;
+
+var
+ _MsiGetFeatureCost: Pointer;
+
+function MsiGetFeatureCost;
+begin
+ GetProcedureAddress(_MsiGetFeatureCost, msilib, 'MsiGetFeatureCost' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiGetFeatureCost]
+ end;
+end;
+
+var
+ _MsiEnumComponentCostsA: Pointer;
+
+function MsiEnumComponentCostsA;
+begin
+ GetProcedureAddress(_MsiEnumComponentCostsA, msilib, 'MsiEnumComponentCostsA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiEnumComponentCostsA]
+ end;
+end;
+
+var
+ _MsiEnumComponentCostsW: Pointer;
+
+function MsiEnumComponentCostsW;
+begin
+ GetProcedureAddress(_MsiEnumComponentCostsW, msilib, 'MsiEnumComponentCostsW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiEnumComponentCostsW]
+ end;
+end;
+
+var
+ _MsiEnumComponentCosts: Pointer;
+
+function MsiEnumComponentCosts;
+begin
+ GetProcedureAddress(_MsiEnumComponentCosts, msilib, 'MsiEnumComponentCosts' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiEnumComponentCosts]
+ end;
+end;
+
+var
+ _MsiSetInstallLevel: Pointer;
+
+function MsiSetInstallLevel;
+begin
+ GetProcedureAddress(_MsiSetInstallLevel, msilib, 'MsiSetInstallLevel');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiSetInstallLevel]
+ end;
+end;
+
+var
+ _MsiGetFeatureValidStatesA: Pointer;
+
+function MsiGetFeatureValidStatesA;
+begin
+ GetProcedureAddress(_MsiGetFeatureValidStatesA, msilib, 'MsiGetFeatureValidStatesA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiGetFeatureValidStatesA]
+ end;
+end;
+
+var
+ _MsiGetFeatureValidStatesW: Pointer;
+
+function MsiGetFeatureValidStatesW;
+begin
+ GetProcedureAddress(_MsiGetFeatureValidStatesW, msilib, 'MsiGetFeatureValidStatesW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiGetFeatureValidStatesW]
+ end;
+end;
+
+var
+ _MsiGetFeatureValidStates: Pointer;
+
+function MsiGetFeatureValidStates;
+begin
+ GetProcedureAddress(_MsiGetFeatureValidStates, msilib, 'MsiGetFeatureValidStates' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiGetFeatureValidStates]
+ end;
+end;
+
+var
+ _MsiGetSourcePathA: Pointer;
+
+function MsiGetSourcePathA;
+begin
+ GetProcedureAddress(_MsiGetSourcePathA, msilib, 'MsiGetSourcePathA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiGetSourcePathA]
+ end;
+end;
+
+var
+ _MsiGetSourcePathW: Pointer;
+
+function MsiGetSourcePathW;
+begin
+ GetProcedureAddress(_MsiGetSourcePathW, msilib, 'MsiGetSourcePathW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiGetSourcePathW]
+ end;
+end;
+
+var
+ _MsiGetSourcePath: Pointer;
+
+function MsiGetSourcePath;
+begin
+ GetProcedureAddress(_MsiGetSourcePath, msilib, 'MsiGetSourcePath' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiGetSourcePath]
+ end;
+end;
+
+var
+ _MsiGetTargetPathA: Pointer;
+
+function MsiGetTargetPathA;
+begin
+ GetProcedureAddress(_MsiGetTargetPathA, msilib, 'MsiGetTargetPathA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiGetTargetPathA]
+ end;
+end;
+
+var
+ _MsiGetTargetPathW: Pointer;
+
+function MsiGetTargetPathW;
+begin
+ GetProcedureAddress(_MsiGetTargetPathW, msilib, 'MsiGetTargetPathW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiGetTargetPathW]
+ end;
+end;
+
+var
+ _MsiGetTargetPath: Pointer;
+
+function MsiGetTargetPath;
+begin
+ GetProcedureAddress(_MsiGetTargetPath, msilib, 'MsiGetTargetPath' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiGetTargetPath]
+ end;
+end;
+
+var
+ _MsiSetTargetPathA: Pointer;
+
+function MsiSetTargetPathA;
+begin
+ GetProcedureAddress(_MsiSetTargetPathA, msilib, 'MsiSetTargetPathA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiSetTargetPathA]
+ end;
+end;
+
+var
+ _MsiSetTargetPathW: Pointer;
+
+function MsiSetTargetPathW;
+begin
+ GetProcedureAddress(_MsiSetTargetPathW, msilib, 'MsiSetTargetPathW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiSetTargetPathW]
+ end;
+end;
+
+var
+ _MsiSetTargetPath: Pointer;
+
+function MsiSetTargetPath;
+begin
+ GetProcedureAddress(_MsiSetTargetPath, msilib, 'MsiSetTargetPath' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiSetTargetPath]
+ end;
+end;
+
+var
+ _MsiVerifyDiskSpace: Pointer;
+
+function MsiVerifyDiskSpace;
+begin
+ GetProcedureAddress(_MsiVerifyDiskSpace, msilib, 'MsiVerifyDiskSpace');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiVerifyDiskSpace]
+ end;
+end;
+
+var
+ _MsiEnableUIPreview: Pointer;
+
+function MsiEnableUIPreview;
+begin
+ GetProcedureAddress(_MsiEnableUIPreview, msilib, 'MsiEnableUIPreview');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiEnableUIPreview]
+ end;
+end;
+
+var
+ _MsiPreviewDialogA: Pointer;
+
+function MsiPreviewDialogA;
+begin
+ GetProcedureAddress(_MsiPreviewDialogA, msilib, 'MsiPreviewDialogA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiPreviewDialogA]
+ end;
+end;
+
+var
+ _MsiPreviewDialogW: Pointer;
+
+function MsiPreviewDialogW;
+begin
+ GetProcedureAddress(_MsiPreviewDialogW, msilib, 'MsiPreviewDialogW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiPreviewDialogW]
+ end;
+end;
+
+var
+ _MsiPreviewDialog: Pointer;
+
+function MsiPreviewDialog;
+begin
+ GetProcedureAddress(_MsiPreviewDialog, msilib, 'MsiPreviewDialog' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiPreviewDialog]
+ end;
+end;
+
+var
+ _MsiPreviewBillboardA: Pointer;
+
+function MsiPreviewBillboardA;
+begin
+ GetProcedureAddress(_MsiPreviewBillboardA, msilib, 'MsiPreviewBillboardA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiPreviewBillboardA]
+ end;
+end;
+
+var
+ _MsiPreviewBillboardW: Pointer;
+
+function MsiPreviewBillboardW;
+begin
+ GetProcedureAddress(_MsiPreviewBillboardW, msilib, 'MsiPreviewBillboardW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiPreviewBillboardW]
+ end;
+end;
+
+var
+ _MsiPreviewBillboard: Pointer;
+
+function MsiPreviewBillboard;
+begin
+ GetProcedureAddress(_MsiPreviewBillboard, msilib, 'MsiPreviewBillboard' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiPreviewBillboard]
+ end;
+end;
+
+var
+ _MsiGetLastErrorRecord: Pointer;
+
+function MsiGetLastErrorRecord;
+begin
+ GetProcedureAddress(_MsiGetLastErrorRecord, msilib, 'MsiGetLastErrorRecord');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsiGetLastErrorRecord]
+ end;
+end;
+
+{$ELSE}
+
+function MsiDatabaseOpenViewA; external msilib name 'MsiDatabaseOpenViewA';
+function MsiDatabaseOpenViewW; external msilib name 'MsiDatabaseOpenViewW';
+function MsiDatabaseOpenView; external msilib name 'MsiDatabaseOpenView' + AWSuffix;
+function MsiViewGetErrorA; external msilib name 'MsiViewGetErrorA';
+function MsiViewGetErrorW; external msilib name 'MsiViewGetErrorW';
+function MsiViewGetError; external msilib name 'MsiViewGetError' + AWSuffix;
+function MsiViewExecute; external msilib name 'MsiViewExecute';
+function MsiViewFetch; external msilib name 'MsiViewFetch';
+function MsiViewModify; external msilib name 'MsiViewModify';
+function MsiViewGetColumnInfo; external msilib name 'MsiViewGetColumnInfo';
+function MsiViewClose; external msilib name 'MsiViewClose';
+function MsiDatabaseGetPrimaryKeysA; external msilib name 'MsiDatabaseGetPrimaryKeysA';
+function MsiDatabaseGetPrimaryKeysW; external msilib name 'MsiDatabaseGetPrimaryKeysW';
+function MsiDatabaseGetPrimaryKeys; external msilib name 'MsiDatabaseGetPrimaryKeys' + AWSuffix;
+function MsiDatabaseIsTablePersistentA; external msilib name 'MsiDatabaseIsTablePersistentA';
+function MsiDatabaseIsTablePersistentW; external msilib name 'MsiDatabaseIsTablePersistentW';
+function MsiDatabaseIsTablePersistent; external msilib name 'MsiDatabaseIsTablePersistent' + AWSuffix;
+function MsiGetSummaryInformationA; external msilib name 'MsiGetSummaryInformationA';
+function MsiGetSummaryInformationW; external msilib name 'MsiGetSummaryInformationW';
+function MsiGetSummaryInformation; external msilib name 'MsiGetSummaryInformation' + AWSuffix;
+function MsiSummaryInfoGetPropertyCount; external msilib name 'MsiSummaryInfoGetPropertyCount';
+function MsiSummaryInfoSetPropertyA; external msilib name 'MsiSummaryInfoSetPropertyA';
+function MsiSummaryInfoSetPropertyW; external msilib name 'MsiSummaryInfoSetPropertyW';
+function MsiSummaryInfoSetProperty; external msilib name 'MsiSummaryInfoSetProperty' + AWSuffix;
+function MsiSummaryInfoGetPropertyA; external msilib name 'MsiSummaryInfoGetPropertyA';
+function MsiSummaryInfoGetPropertyW; external msilib name 'MsiSummaryInfoGetPropertyW';
+function MsiSummaryInfoGetProperty; external msilib name 'MsiSummaryInfoGetProperty' + AWSuffix;
+function MsiSummaryInfoPersist; external msilib name 'MsiSummaryInfoPersist';
+function MsiOpenDatabaseA; external msilib name 'MsiOpenDatabaseA';
+function MsiOpenDatabaseW; external msilib name 'MsiOpenDatabaseW';
+function MsiOpenDatabase; external msilib name 'MsiOpenDatabase' + AWSuffix;
+function MsiDatabaseImportA; external msilib name 'MsiDatabaseImportA';
+function MsiDatabaseImportW; external msilib name 'MsiDatabaseImportW';
+function MsiDatabaseImport; external msilib name 'MsiDatabaseImport' + AWSuffix;
+function MsiDatabaseExportA; external msilib name 'MsiDatabaseExportA';
+function MsiDatabaseExportW; external msilib name 'MsiDatabaseExportW';
+function MsiDatabaseExport; external msilib name 'MsiDatabaseExport' + AWSuffix;
+function MsiDatabaseMergeA; external msilib name 'MsiDatabaseMergeA';
+function MsiDatabaseMergeW; external msilib name 'MsiDatabaseMergeW';
+function MsiDatabaseMerge; external msilib name 'MsiDatabaseMerge' + AWSuffix;
+function MsiDatabaseGenerateTransformA; external msilib name 'MsiDatabaseGenerateTransformA';
+function MsiDatabaseGenerateTransformW; external msilib name 'MsiDatabaseGenerateTransformW';
+function MsiDatabaseGenerateTransform; external msilib name 'MsiDatabaseGenerateTransform' + AWSuffix;
+function MsiDatabaseApplyTransformA; external msilib name 'MsiDatabaseApplyTransformA';
+function MsiDatabaseApplyTransformW; external msilib name 'MsiDatabaseApplyTransformW';
+function MsiDatabaseApplyTransform; external msilib name 'MsiDatabaseApplyTransform' + AWSuffix;
+function MsiCreateTransformSummaryInfoA; external msilib name 'MsiCreateTransformSummaryInfoA';
+function MsiCreateTransformSummaryInfoW; external msilib name 'MsiCreateTransformSummaryInfoW';
+function MsiCreateTransformSummaryInfo; external msilib name 'MsiCreateTransformSummaryInfo' + AWSuffix;
+function MsiDatabaseCommit; external msilib name 'MsiDatabaseCommit';
+function MsiGetDatabaseState; external msilib name 'MsiGetDatabaseState';
+function MsiCreateRecord; external msilib name 'MsiCreateRecord';
+function MsiRecordIsNull; external msilib name 'MsiRecordIsNull';
+function MsiRecordDataSize; external msilib name 'MsiRecordDataSize';
+function MsiRecordSetInteger; external msilib name 'MsiRecordSetInteger';
+function MsiRecordSetStringA; external msilib name 'MsiRecordSetStringA';
+function MsiRecordSetStringW; external msilib name 'MsiRecordSetStringW';
+function MsiRecordSetString; external msilib name 'MsiRecordSetString' + AWSuffix;
+function MsiRecordGetInteger; external msilib name 'MsiRecordGetInteger';
+function MsiRecordGetStringA; external msilib name 'MsiRecordGetStringA';
+function MsiRecordGetStringW; external msilib name 'MsiRecordGetStringW';
+function MsiRecordGetString; external msilib name 'MsiRecordGetString' + AWSuffix;
+function MsiRecordGetFieldCount; external msilib name 'MsiRecordGetFieldCount';
+function MsiRecordSetStreamA; external msilib name 'MsiRecordSetStreamA';
+function MsiRecordSetStreamW; external msilib name 'MsiRecordSetStreamW';
+function MsiRecordSetStream; external msilib name 'MsiRecordSetStream' + AWSuffix;
+function MsiRecordReadStream; external msilib name 'MsiRecordReadStream';
+function MsiRecordClearData; external msilib name 'MsiRecordClearData';
+function MsiGetActiveDatabase; external msilib name 'MsiGetActiveDatabase';
+function MsiSetPropertyA; external msilib name 'MsiSetPropertyA';
+function MsiSetPropertyW; external msilib name 'MsiSetPropertyW';
+function MsiSetProperty; external msilib name 'MsiSetProperty' + AWSuffix;
+function MsiGetPropertyA; external msilib name 'MsiGetPropertyA';
+function MsiGetPropertyW; external msilib name 'MsiGetPropertyW';
+function MsiGetProperty; external msilib name 'MsiGetProperty' + AWSuffix;
+function MsiGetLanguage; external msilib name 'MsiGetLanguage';
+function MsiGetMode; external msilib name 'MsiGetMode';
+function MsiSetMode; external msilib name 'MsiSetMode';
+function MsiFormatRecordA; external msilib name 'MsiFormatRecordA';
+function MsiFormatRecordW; external msilib name 'MsiFormatRecordW';
+function MsiFormatRecord; external msilib name 'MsiFormatRecord' + AWSuffix;
+function MsiDoActionA; external msilib name 'MsiDoActionA';
+function MsiDoActionW; external msilib name 'MsiDoActionW';
+function MsiDoAction; external msilib name 'MsiDoAction' + AWSuffix;
+function MsiSequenceA; external msilib name 'MsiSequenceA';
+function MsiSequenceW; external msilib name 'MsiSequenceW';
+function MsiSequence; external msilib name 'MsiSequence' + AWSuffix;
+function MsiProcessMessage; external msilib name 'MsiProcessMessage';
+function MsiEvaluateConditionA; external msilib name 'MsiEvaluateConditionA';
+function MsiEvaluateConditionW; external msilib name 'MsiEvaluateConditionW';
+function MsiEvaluateCondition; external msilib name 'MsiEvaluateCondition' + AWSuffix;
+function MsiGetFeatureStateA; external msilib name 'MsiGetFeatureStateA';
+function MsiGetFeatureStateW; external msilib name 'MsiGetFeatureStateW';
+function MsiGetFeatureState; external msilib name 'MsiGetFeatureState' + AWSuffix;
+function MsiSetFeatureStateA; external msilib name 'MsiSetFeatureStateA';
+function MsiSetFeatureStateW; external msilib name 'MsiSetFeatureStateW';
+function MsiSetFeatureState; external msilib name 'MsiSetFeatureState' + AWSuffix;
+function MsiSetFeatureAttributesA; external msilib name 'MsiSetFeatureAttributesA';
+function MsiSetFeatureAttributesW; external msilib name 'MsiSetFeatureAttributesW';
+function MsiSetFeatureAttributes; external msilib name 'MsiSetFeatureAttributes' + AWSuffix;
+function MsiGetComponentStateA; external msilib name 'MsiGetComponentStateA';
+function MsiGetComponentStateW; external msilib name 'MsiGetComponentStateW';
+function MsiGetComponentState; external msilib name 'MsiGetComponentState' + AWSuffix;
+function MsiSetComponentStateA; external msilib name 'MsiSetComponentStateA';
+function MsiSetComponentStateW; external msilib name 'MsiSetComponentStateW';
+function MsiSetComponentState; external msilib name 'MsiSetComponentState' + AWSuffix;
+function MsiGetFeatureCostA; external msilib name 'MsiGetFeatureCostA';
+function MsiGetFeatureCostW; external msilib name 'MsiGetFeatureCostW';
+function MsiGetFeatureCost; external msilib name 'MsiGetFeatureCost' + AWSuffix;
+function MsiEnumComponentCostsA; external msilib name 'MsiEnumComponentCostsA';
+function MsiEnumComponentCostsW; external msilib name 'MsiEnumComponentCostsW';
+function MsiEnumComponentCosts; external msilib name 'MsiEnumComponentCosts' + AWSuffix;
+function MsiSetInstallLevel; external msilib name 'MsiSetInstallLevel';
+function MsiGetFeatureValidStatesA; external msilib name 'MsiGetFeatureValidStatesA';
+function MsiGetFeatureValidStatesW; external msilib name 'MsiGetFeatureValidStatesW';
+function MsiGetFeatureValidStates; external msilib name 'MsiGetFeatureValidStates' + AWSuffix;
+function MsiGetSourcePathA; external msilib name 'MsiGetSourcePathA';
+function MsiGetSourcePathW; external msilib name 'MsiGetSourcePathW';
+function MsiGetSourcePath; external msilib name 'MsiGetSourcePath' + AWSuffix;
+function MsiGetTargetPathA; external msilib name 'MsiGetTargetPathA';
+function MsiGetTargetPathW; external msilib name 'MsiGetTargetPathW';
+function MsiGetTargetPath; external msilib name 'MsiGetTargetPath' + AWSuffix;
+function MsiSetTargetPathA; external msilib name 'MsiSetTargetPathA';
+function MsiSetTargetPathW; external msilib name 'MsiSetTargetPathW';
+function MsiSetTargetPath; external msilib name 'MsiSetTargetPath' + AWSuffix;
+function MsiVerifyDiskSpace; external msilib name 'MsiVerifyDiskSpace';
+function MsiEnableUIPreview; external msilib name 'MsiEnableUIPreview';
+function MsiPreviewDialogA; external msilib name 'MsiPreviewDialogA';
+function MsiPreviewDialogW; external msilib name 'MsiPreviewDialogW';
+function MsiPreviewDialog; external msilib name 'MsiPreviewDialog' + AWSuffix;
+function MsiPreviewBillboardA; external msilib name 'MsiPreviewBillboardA';
+function MsiPreviewBillboardW; external msilib name 'MsiPreviewBillboardW';
+function MsiPreviewBillboard; external msilib name 'MsiPreviewBillboard' + AWSuffix;
+function MsiGetLastErrorRecord; external msilib name 'MsiGetLastErrorRecord';
+
+{$ENDIF DYNAMIC_LINK}
+
+end.
diff --git a/packages/extra/winunits/jwamstask.pas b/packages/extra/winunits/jwamstask.pas
index 9f5a4a4a7a..84440d360d 100644
--- a/packages/extra/winunits/jwamstask.pas
+++ b/packages/extra/winunits/jwamstask.pas
@@ -1,408 +1,408 @@
-{******************************************************************************}
-{ }
-{ Microsoft Task Scheduler API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: mstask.h, released August 2001. The original Pascal }
-{ code is: MsTask.pas, released October 2001. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Contributor(s): Sunish Issac (sunish att nettaxi dott com) }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwamstask.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaMsTask;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "mstask.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaWinBase, JwaWinType, JwaPrSht;
-
-const
- TASK_SUNDAY = $1;
- {$EXTERNALSYM TASK_SUNDAY}
- TASK_MONDAY = $2;
- {$EXTERNALSYM TASK_MONDAY}
- TASK_TUESDAY = $4;
- {$EXTERNALSYM TASK_TUESDAY}
- TASK_WEDNESDAY = $8;
- {$EXTERNALSYM TASK_WEDNESDAY}
- TASK_THURSDAY = $10;
- {$EXTERNALSYM TASK_THURSDAY}
- TASK_FRIDAY = $20;
- {$EXTERNALSYM TASK_FRIDAY}
- TASK_SATURDAY = $40;
- {$EXTERNALSYM TASK_SATURDAY}
- TASK_FIRST_WEEK = 1;
- {$EXTERNALSYM TASK_FIRST_WEEK}
- TASK_SECOND_WEEK = 2;
- {$EXTERNALSYM TASK_SECOND_WEEK}
- TASK_THIRD_WEEK = 3;
- {$EXTERNALSYM TASK_THIRD_WEEK}
- TASK_FOURTH_WEEK = 4;
- {$EXTERNALSYM TASK_FOURTH_WEEK}
- TASK_LAST_WEEK = 5;
- {$EXTERNALSYM TASK_LAST_WEEK}
- TASK_JANUARY = $1;
- {$EXTERNALSYM TASK_JANUARY}
- TASK_FEBRUARY = $2;
- {$EXTERNALSYM TASK_FEBRUARY}
- TASK_MARCH = $4;
- {$EXTERNALSYM TASK_MARCH}
- TASK_APRIL = $8;
- {$EXTERNALSYM TASK_APRIL}
- TASK_MAY = $10;
- {$EXTERNALSYM TASK_MAY}
- TASK_JUNE = $20;
- {$EXTERNALSYM TASK_JUNE}
- TASK_JULY = $40;
- {$EXTERNALSYM TASK_JULY}
- TASK_AUGUST = $80;
- {$EXTERNALSYM TASK_AUGUST}
- TASK_SEPTEMBER = $100;
- {$EXTERNALSYM TASK_SEPTEMBER}
- TASK_OCTOBER = $200;
- {$EXTERNALSYM TASK_OCTOBER}
- TASK_NOVEMBER = $400;
- {$EXTERNALSYM TASK_NOVEMBER}
- TASK_DECEMBER = $800;
- {$EXTERNALSYM TASK_DECEMBER}
-
- TASK_FLAG_INTERACTIVE = $1;
- {$EXTERNALSYM TASK_FLAG_INTERACTIVE}
- TASK_FLAG_DELETE_WHEN_DONE = $2;
- {$EXTERNALSYM TASK_FLAG_DELETE_WHEN_DONE}
- TASK_FLAG_DISABLED = $4;
- {$EXTERNALSYM TASK_FLAG_DISABLED}
- TASK_FLAG_START_ONLY_IF_IDLE = $10;
- {$EXTERNALSYM TASK_FLAG_START_ONLY_IF_IDLE}
- TASK_FLAG_KILL_ON_IDLE_END = $20;
- {$EXTERNALSYM TASK_FLAG_KILL_ON_IDLE_END}
- TASK_FLAG_DONT_START_IF_ON_BATTERIES = $40;
- {$EXTERNALSYM TASK_FLAG_DONT_START_IF_ON_BATTERIES}
- TASK_FLAG_KILL_IF_GOING_ON_BATTERIES = $80;
- {$EXTERNALSYM TASK_FLAG_KILL_IF_GOING_ON_BATTERIES}
- TASK_FLAG_RUN_ONLY_IF_DOCKED = $100;
- {$EXTERNALSYM TASK_FLAG_RUN_ONLY_IF_DOCKED}
- TASK_FLAG_HIDDEN = $200;
- {$EXTERNALSYM TASK_FLAG_HIDDEN}
- TASK_FLAG_RUN_IF_CONNECTED_TO_INTERNET = $400;
- {$EXTERNALSYM TASK_FLAG_RUN_IF_CONNECTED_TO_INTERNET}
- TASK_FLAG_RESTART_ON_IDLE_RESUME = $800;
- {$EXTERNALSYM TASK_FLAG_RESTART_ON_IDLE_RESUME}
- TASK_FLAG_SYSTEM_REQUIRED = $1000;
- {$EXTERNALSYM TASK_FLAG_SYSTEM_REQUIRED}
- TASK_FLAG_RUN_ONLY_IF_LOGGED_ON = $2000;
- {$EXTERNALSYM TASK_FLAG_RUN_ONLY_IF_LOGGED_ON}
-
- TASK_TRIGGER_FLAG_HAS_END_DATE = $1;
- {$EXTERNALSYM TASK_TRIGGER_FLAG_HAS_END_DATE}
- TASK_TRIGGER_FLAG_KILL_AT_DURATION_END = $2;
- {$EXTERNALSYM TASK_TRIGGER_FLAG_KILL_AT_DURATION_END}
- TASK_TRIGGER_FLAG_DISABLED = $4;
- {$EXTERNALSYM TASK_TRIGGER_FLAG_DISABLED}
-
- TASK_MAX_RUN_TIMES = 1440;
- {$EXTERNALSYM TASK_MAX_RUN_TIMES}
-
-type
- PTaskTriggerType = ^TTaskTriggerType;
- _TASK_TRIGGER_TYPE = (
- TASK_TIME_TRIGGER_ONCE,
- TASK_TIME_TRIGGER_DAILY,
- TASK_TIME_TRIGGER_WEEKLY,
- TASK_TIME_TRIGGER_MONTHLYDATE,
- TASK_TIME_TRIGGER_MONTHLYDOW,
- TASK_EVENT_TRIGGER_ON_IDLE,
- TASK_EVENT_TRIGGER_AT_SYSTEMSTART,
- TASK_EVENT_TRIGGER_AT_LOGON);
- TASK_TRIGGER_TYPE = _TASK_TRIGGER_TYPE;
- {$EXTERNALSYM TASK_TRIGGER_TYPE}
- {$EXTERNALSYM _TASK_TRIGGER_TYPE}
- PTASK_TRIGGER_TYPE = ^_TASK_TRIGGER_TYPE;
- {$EXTERNALSYM PTASK_TRIGGER_TYPE}
- TTaskTriggerType = _TASK_TRIGGER_TYPE;
-
- PDaily = ^TDaily;
- _DAILY = record
- DaysInterval: WORD;
- end;
- {$EXTERNALSYM _DAILY}
- TDaily = _DAILY;
-
- PWeekly = ^TWeekly;
- _WEEKLY = record
- WeeksInterval: WORD;
- rgfDaysOfTheWeek: WORD;
- end;
- {$EXTERNALSYM _WEEKLY}
- TWeekly = _WEEKLY;
-
- PMonthlyDate = ^TMonthlyDate;
- _MONTHLYDATE = record
- rgfDays: DWORD;
- rgfMonths: WORD;
- end;
- {$EXTERNALSYM _MONTHLYDATE}
- TMonthlyDate = _MONTHLYDATE;
-
- PMonthlyDow = ^TMonthlyDow;
- _MONTHLYDOW = record
- wWhichWeek: WORD;
- rgfDaysOfTheWeek: WORD;
- rgfMonths: WORD;
- end;
- {$EXTERNALSYM _MONTHLYDOW}
- TMonthlyDow = _MONTHLYDOW;
-
- PTriggerTypeUnion = ^TTriggerTypeUnion;
- _TRIGGER_TYPE_UNION = record
- case Integer of
- 0: (Daily: TDaily);
- 1: (Weekly: TWeekly);
- 2: (MonthlyDate: TMonthlyDate);
- 3: (MonthlyDOW: TMonthlyDow);
- end;
- {$EXTERNALSYM _TRIGGER_TYPE_UNION}
- TRIGGER_TYPE_UNION = _TRIGGER_TYPE_UNION;
- {$EXTERNALSYM TRIGGER_TYPE_UNION}
- TTriggerTypeUnion = _TRIGGER_TYPE_UNION;
-
- PTaskTrigger = ^TTaskTrigger;
- _TASK_TRIGGER = record
- cbTriggerSize: WORD;
- Reserved1: WORD;
- wBeginYear: WORD;
- wBeginMonth: WORD;
- wBeginDay: WORD;
- wEndYear: WORD;
- wEndMonth: WORD;
- wEndDay: WORD;
- wStartHour: WORD;
- wStartMinute: WORD;
- MinutesDuration: DWORD;
- MinutesInterval: DWORD;
- rgFlags: DWORD;
- TriggerType: TTaskTriggerType;
- Type_: TTriggerTypeUnion;
- Reserved2: WORD;
- wRandomMinutesInterval: WORD;
- end;
- {$EXTERNALSYM _TASK_TRIGGER}
- TASK_TRIGGER = _TASK_TRIGGER;
- {$EXTERNALSYM TASK_TRIGGER}
- PTASK_TRIGGER = ^TASK_TRIGGER;
- {$EXTERNALSYM PTASK_TRIGGER}
- TTaskTrigger = _TASK_TRIGGER;
-
-const
- IID_ITaskTrigger: TGUID = '{148BD52B-A2AB-11CE-B11F-00AA00530503}';
- {$EXTERNALSYM IID_ITaskTrigger}
-
-// interface ITaskTrigger
-
-type
- ITaskTrigger = interface (IUnknown)
- ['{148BD52B-A2AB-11CE-B11F-00AA00530503}']
- function SetTrigger(const pTrigger: PTaskTrigger): HRESULT; stdcall;
- function GetTrigger(pTrigger: PTaskTrigger): HRESULT; stdcall;
- function GetTriggerString(var ppwszTrigger: LPWSTR): HRESULT; stdcall;
- end;
- {$EXTERNALSYM ITaskTrigger}
-
-const
- IID_IScheduledWorkItem: TGUID = '{A6B952F0-A4B1-11D0-997D-00AA006887EC}';
- {$EXTERNALSYM IID_IScheduledWorkItem}
-
-// interface IScheduledWorkItem
-
-type
- IScheduledWorkItem = interface (IUnknown)
- ['{A6B952F0-A4B1-11D0-997D-00AA006887EC}']
- function CreateTrigger(out piNewTrigger: Word; out ppTrigger: ITaskTrigger): HRESULT; stdcall;
- function DeleteTrigger(iTrigger: Word): HRESULT; stdcall;
- function GetTriggerCount(out pwCount: Word): HRESULT; stdcall;
- function GetTrigger(iTrigger: Word; var ppTrigger: ITaskTrigger): HRESULT; stdcall;
- function GetTriggerString(iTrigger: Word; out ppwszTrigger: PWideChar): HRESULT; stdcall;
- function GetRunTimes(const pstBegin: LPSYSTEMTIME; const pstEnd: LPSYSTEMTIME;
- var pCount: Word; out rgstTaskTimes: LPSYSTEMTIME): HRESULT; stdcall;
- function GetNextRunTime(var pstNextRun: SYSTEMTIME): HRESULT; stdcall;
- function SetIdleWait(wIdleMinutes: Word; wDeadlineMinutes: Word): HRESULT; stdcall;
- function GetIdleWait(out pwIdleMinutes: Word; out pwDeadlineMinutes: Word): HRESULT; stdcall;
- function Run: HRESULT; stdcall;
- function Terminate: HRESULT; stdcall;
- function EditWorkItem(hParent: HWND; dwReserved: DWORD): HRESULT; stdcall;
- function GetMostRecentRunTime(out pstLastRun: TSystemTime): HRESULT; stdcall;
- function GetStatus(out phrStatus: HRESULT): HRESULT stdcall;
- function GetExitCode(out pdwExitCode: DWORD): HRESULT stdcall;
- function SetComment(pwszComment: LPCWSTR): HRESULT stdcall;
- function GetComment(out ppwszComment: LPWSTR): HRESULT stdcall;
- function SetCreator(pwszCreator: LPCWSTR): HRESULT; stdcall;
- function GetCreator(out ppwszCreator: LPWSTR): HRESULT; stdcall;
- function SetWorkItemData(cbData: Word; var rgbData: Byte): HRESULT; stdcall;
- function GetWorkItemData(out pcbData: Word; out prgbData: Byte): HRESULT; stdcall;
- function SetErrorRetryCount(wRetryCount: Word): HRESULT; stdcall;
- function GetErrorRetryCount(out pwRetryCount: Word): HRESULT; stdcall;
- function SetErrorRetryInterval(wRetryInterval: Word): HRESULT; stdcall;
- function GetErrorRetryInterval(out pwRetryInterval: Word): HRESULT; stdcall;
- function SetFlags(dwFlags: DWORD): HRESULT; stdcall;
- function GetFlags(out pdwFlags: DWORD): HRESULT; stdcall;
- function SetAccountInformation(pwszAccountName: LPCWSTR; pwszPassword: LPCWSTR): HRESULT; stdcall;
- function GetAccountInformation(out ppwszAccountName: LPWSTR): HRESULT; stdcall;
- end;
- {$EXTERNALSYM IScheduledWorkItem}
-
-const
- IID_ITask: TGUID = '{148BD524-A2AB-11CE-B11F-00AA00530503}';
- {$EXTERNALSYM IID_ITask}
-
-// interface ITask
-
-type
- ITask = interface (IScheduledWorkItem)
- ['{148BD524-A2AB-11CE-B11F-00AA00530503}']
- function SetApplicationName(pwszApplicationName: LPCWSTR): HRESULT; stdcall;
- function GetApplicationName(out ppwszApplicationName: LPWSTR): HRESULT; stdcall;
- function SetParameters(pwszParameters: LPCWSTR): HRESULT; stdcall;
- function GetParameters(out ppwszParameters: LPWSTR): HRESULT; stdcall;
- function SetWorkingDirectory(pwszWorkingDirectory: LPCWSTR): HRESULT; stdcall;
- function GetWorkingDirectory(out ppwszWorkingDirectory: LPWSTR): HRESULT; stdcall;
- function SetPriority(dwPriority: DWORD): HRESULT; stdcall;
- function GetPriority(out pdwPriority: DWORD): HRESULT; stdcall;
- function SetTaskFlags(dwFlags: DWORD): HRESULT; stdcall;
- function GetTaskFlags(out pdwFlags: DWORD): HRESULT; stdcall;
- function SetMaxRunTime(dwMaxRunTimeMS: DWORD): HRESULT; stdcall;
- function GetMaxRunTime(out pdwMaxRunTimeMS: DWORD): HRESULT; stdcall;
- end;
- {$EXTERNALSYM ITask}
-
-const
- IID_IEnumWorkItems: TGUID = '{148BD528-A2AB-11CE-B11F-00AA00530503}';
- {$EXTERNALSYM IID_IEnumWorkItems}
-
-// interface IEnumWorkItems
-
-type
- IEnumWorkItems = interface (IUnknown)
- ['{148BD528-A2AB-11CE-B11F-00AA00530503}']
- function Next(celt: ULONG; out rgpwszNames: LPLPWSTR; out pceltFetched: ULONG): HRESULT; stdcall;
- function Skip(celt: ULONG): HRESULT; stdcall;
- function Reset: HRESULT; stdcall;
- function Clone(out ppEnumWorkItems: IEnumWorkItems): HRESULT; stdcall;
- end;
- {$EXTERNALSYM IEnumWorkItems}
-
-const
- IID_ITaskScheduler: TGUID = '{148BD527-A2AB-11CE-B11F-00AA00530503}';
- {$EXTERNALSYM IID_ITaskScheduler}
-
-// interface ITaskScheduler
-
-type
- ITaskScheduler = interface (IUnknown)
- ['{148BD527-A2AB-11CE-B11F-00AA00530503}']
- function SetTargetComputer(pwszComputer: LPCWSTR): HRESULT; stdcall;
- function GetTargetComputer(out ppwszComputer: LPWSTR): HRESULT; stdcall;
- function Enum(out ppEnumWorkItems: IEnumWorkItems): HRESULT; stdcall;
- function Activate(pwszName: PWideChar; var riid: TGUID; out ppUnk: IUnknown): HRESULT; stdcall;
- function Delete(pwszName: LPCWSTR): HRESULT; stdcall;
- function NewWorkItem(pwszTaskName: PWideChar; var rclsid: TGUID; var riid: TGUID; out ppUnk: IUnknown): HRESULT; stdcall;
- function AddWorkItem(pwszTaskName: LPCWSTR; var pWorkItem: IScheduledWorkItem): HRESULT; stdcall;
- function IsOfType(pwszName: LPCWSTR; var riid: TGUID): HRESULT; stdcall;
- end;
- {$EXTERNALSYM ITaskScheduler}
-
-const
- CLSID_CTask: TGuid = '{148BD520-A2AB-11CE-B11F-00AA00530503}';
- {$EXTERNALSYM CLSID_CTask}
-
- CLSID_CTaskScheduler: TGuid = '{148BD52A-A2AB-11CE-B11F-00AA00530503}';
- {$EXTERNALSYM CLSID_CTaskScheduler}
-
-type
- PTaskPage = ^TTaskPage;
- _TASKPAGE = (
- TASKPAGE_TASK,
- TASKPAGE_SCHEDULE,
- TASKPAGE_SETTINGS);
- {$EXTERNALSYM _TASKPAGE}
- TASKPAGE = _TASKPAGE;
- {$EXTERNALSYM TASKPAGE}
- TTaskPage = _TASKPAGE;
-
-const
- IID_IProvideTaskPage: TGuid = '{4086658a-cbbb-11cf-b604-00c04fd8d565}';
- {$EXTERNALSYM IID_IProvideTaskPage}
-
-// interface IProvideTaskPage
-
-type
- IProvideTaskPage = interface (IUnknown)
- ['{4086658A-CBBB-11CF-B604-00C04FD8D565}']
- function GetPage(tpType: TTaskPage; fPersistChanges: BOOL; var phPage: HPropSheetPage): HRESULT; stdcall;
- end;
- {$EXTERNALSYM IProvideTaskPage}
-
-const
- ISchedulingAgent = ITaskScheduler;
- {$EXTERNALSYM ISchedulingAgent}
- IEnumTasks = IEnumWorkItems;
- {$EXTERNALSYM IEnumTasks}
- //IID_ISchedulingAgent = IID_ITaskScheduler;
- IID_ISchedulingAgent: TGUID = '{148BD527-A2AB-11CE-B11F-00AA00530503}';
- {$EXTERNALSYM IID_ISchedulingAgent}
- //CLSID_CSchedulingAgent = CLSID_CTaskScheduler;
- CLSID_CSchedulingAgent: TGuid = '{148BD52A-A2AB-11CE-B11F-00AA00530503}';
- {$EXTERNALSYM CLSID_CSchedulingAgent}
-
-//added to use save option without ole2 - not there in original source of mstask.h
-
- {$EXTERNALSYM IID_IPersistFile}
- IID_IPersistFile: TGUID = (
- D1: $0000010B; D2: $0000; D3: $0000; D4: ($C0, $00, $00, $00, $00, $00, $00, $46));
-
-implementation
-
-end.
-
+{******************************************************************************}
+{ }
+{ Microsoft Task Scheduler API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: mstask.h, released August 2001. The original Pascal }
+{ code is: MsTask.pas, released October 2001. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Contributor(s): Sunish Issac (sunish att nettaxi dott com) }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwamstask.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaMsTask;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "mstask.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaWinBase, JwaWinType, JwaPrSht;
+
+const
+ TASK_SUNDAY = $1;
+ {$EXTERNALSYM TASK_SUNDAY}
+ TASK_MONDAY = $2;
+ {$EXTERNALSYM TASK_MONDAY}
+ TASK_TUESDAY = $4;
+ {$EXTERNALSYM TASK_TUESDAY}
+ TASK_WEDNESDAY = $8;
+ {$EXTERNALSYM TASK_WEDNESDAY}
+ TASK_THURSDAY = $10;
+ {$EXTERNALSYM TASK_THURSDAY}
+ TASK_FRIDAY = $20;
+ {$EXTERNALSYM TASK_FRIDAY}
+ TASK_SATURDAY = $40;
+ {$EXTERNALSYM TASK_SATURDAY}
+ TASK_FIRST_WEEK = 1;
+ {$EXTERNALSYM TASK_FIRST_WEEK}
+ TASK_SECOND_WEEK = 2;
+ {$EXTERNALSYM TASK_SECOND_WEEK}
+ TASK_THIRD_WEEK = 3;
+ {$EXTERNALSYM TASK_THIRD_WEEK}
+ TASK_FOURTH_WEEK = 4;
+ {$EXTERNALSYM TASK_FOURTH_WEEK}
+ TASK_LAST_WEEK = 5;
+ {$EXTERNALSYM TASK_LAST_WEEK}
+ TASK_JANUARY = $1;
+ {$EXTERNALSYM TASK_JANUARY}
+ TASK_FEBRUARY = $2;
+ {$EXTERNALSYM TASK_FEBRUARY}
+ TASK_MARCH = $4;
+ {$EXTERNALSYM TASK_MARCH}
+ TASK_APRIL = $8;
+ {$EXTERNALSYM TASK_APRIL}
+ TASK_MAY = $10;
+ {$EXTERNALSYM TASK_MAY}
+ TASK_JUNE = $20;
+ {$EXTERNALSYM TASK_JUNE}
+ TASK_JULY = $40;
+ {$EXTERNALSYM TASK_JULY}
+ TASK_AUGUST = $80;
+ {$EXTERNALSYM TASK_AUGUST}
+ TASK_SEPTEMBER = $100;
+ {$EXTERNALSYM TASK_SEPTEMBER}
+ TASK_OCTOBER = $200;
+ {$EXTERNALSYM TASK_OCTOBER}
+ TASK_NOVEMBER = $400;
+ {$EXTERNALSYM TASK_NOVEMBER}
+ TASK_DECEMBER = $800;
+ {$EXTERNALSYM TASK_DECEMBER}
+
+ TASK_FLAG_INTERACTIVE = $1;
+ {$EXTERNALSYM TASK_FLAG_INTERACTIVE}
+ TASK_FLAG_DELETE_WHEN_DONE = $2;
+ {$EXTERNALSYM TASK_FLAG_DELETE_WHEN_DONE}
+ TASK_FLAG_DISABLED = $4;
+ {$EXTERNALSYM TASK_FLAG_DISABLED}
+ TASK_FLAG_START_ONLY_IF_IDLE = $10;
+ {$EXTERNALSYM TASK_FLAG_START_ONLY_IF_IDLE}
+ TASK_FLAG_KILL_ON_IDLE_END = $20;
+ {$EXTERNALSYM TASK_FLAG_KILL_ON_IDLE_END}
+ TASK_FLAG_DONT_START_IF_ON_BATTERIES = $40;
+ {$EXTERNALSYM TASK_FLAG_DONT_START_IF_ON_BATTERIES}
+ TASK_FLAG_KILL_IF_GOING_ON_BATTERIES = $80;
+ {$EXTERNALSYM TASK_FLAG_KILL_IF_GOING_ON_BATTERIES}
+ TASK_FLAG_RUN_ONLY_IF_DOCKED = $100;
+ {$EXTERNALSYM TASK_FLAG_RUN_ONLY_IF_DOCKED}
+ TASK_FLAG_HIDDEN = $200;
+ {$EXTERNALSYM TASK_FLAG_HIDDEN}
+ TASK_FLAG_RUN_IF_CONNECTED_TO_INTERNET = $400;
+ {$EXTERNALSYM TASK_FLAG_RUN_IF_CONNECTED_TO_INTERNET}
+ TASK_FLAG_RESTART_ON_IDLE_RESUME = $800;
+ {$EXTERNALSYM TASK_FLAG_RESTART_ON_IDLE_RESUME}
+ TASK_FLAG_SYSTEM_REQUIRED = $1000;
+ {$EXTERNALSYM TASK_FLAG_SYSTEM_REQUIRED}
+ TASK_FLAG_RUN_ONLY_IF_LOGGED_ON = $2000;
+ {$EXTERNALSYM TASK_FLAG_RUN_ONLY_IF_LOGGED_ON}
+
+ TASK_TRIGGER_FLAG_HAS_END_DATE = $1;
+ {$EXTERNALSYM TASK_TRIGGER_FLAG_HAS_END_DATE}
+ TASK_TRIGGER_FLAG_KILL_AT_DURATION_END = $2;
+ {$EXTERNALSYM TASK_TRIGGER_FLAG_KILL_AT_DURATION_END}
+ TASK_TRIGGER_FLAG_DISABLED = $4;
+ {$EXTERNALSYM TASK_TRIGGER_FLAG_DISABLED}
+
+ TASK_MAX_RUN_TIMES = 1440;
+ {$EXTERNALSYM TASK_MAX_RUN_TIMES}
+
+type
+ PTaskTriggerType = ^TTaskTriggerType;
+ _TASK_TRIGGER_TYPE = (
+ TASK_TIME_TRIGGER_ONCE,
+ TASK_TIME_TRIGGER_DAILY,
+ TASK_TIME_TRIGGER_WEEKLY,
+ TASK_TIME_TRIGGER_MONTHLYDATE,
+ TASK_TIME_TRIGGER_MONTHLYDOW,
+ TASK_EVENT_TRIGGER_ON_IDLE,
+ TASK_EVENT_TRIGGER_AT_SYSTEMSTART,
+ TASK_EVENT_TRIGGER_AT_LOGON);
+ TASK_TRIGGER_TYPE = _TASK_TRIGGER_TYPE;
+ {$EXTERNALSYM TASK_TRIGGER_TYPE}
+ {$EXTERNALSYM _TASK_TRIGGER_TYPE}
+ PTASK_TRIGGER_TYPE = ^_TASK_TRIGGER_TYPE;
+ {$EXTERNALSYM PTASK_TRIGGER_TYPE}
+ TTaskTriggerType = _TASK_TRIGGER_TYPE;
+
+ PDaily = ^TDaily;
+ _DAILY = record
+ DaysInterval: WORD;
+ end;
+ {$EXTERNALSYM _DAILY}
+ TDaily = _DAILY;
+
+ PWeekly = ^TWeekly;
+ _WEEKLY = record
+ WeeksInterval: WORD;
+ rgfDaysOfTheWeek: WORD;
+ end;
+ {$EXTERNALSYM _WEEKLY}
+ TWeekly = _WEEKLY;
+
+ PMonthlyDate = ^TMonthlyDate;
+ _MONTHLYDATE = record
+ rgfDays: DWORD;
+ rgfMonths: WORD;
+ end;
+ {$EXTERNALSYM _MONTHLYDATE}
+ TMonthlyDate = _MONTHLYDATE;
+
+ PMonthlyDow = ^TMonthlyDow;
+ _MONTHLYDOW = record
+ wWhichWeek: WORD;
+ rgfDaysOfTheWeek: WORD;
+ rgfMonths: WORD;
+ end;
+ {$EXTERNALSYM _MONTHLYDOW}
+ TMonthlyDow = _MONTHLYDOW;
+
+ PTriggerTypeUnion = ^TTriggerTypeUnion;
+ _TRIGGER_TYPE_UNION = record
+ case Integer of
+ 0: (Daily: TDaily);
+ 1: (Weekly: TWeekly);
+ 2: (MonthlyDate: TMonthlyDate);
+ 3: (MonthlyDOW: TMonthlyDow);
+ end;
+ {$EXTERNALSYM _TRIGGER_TYPE_UNION}
+ TRIGGER_TYPE_UNION = _TRIGGER_TYPE_UNION;
+ {$EXTERNALSYM TRIGGER_TYPE_UNION}
+ TTriggerTypeUnion = _TRIGGER_TYPE_UNION;
+
+ PTaskTrigger = ^TTaskTrigger;
+ _TASK_TRIGGER = record
+ cbTriggerSize: WORD;
+ Reserved1: WORD;
+ wBeginYear: WORD;
+ wBeginMonth: WORD;
+ wBeginDay: WORD;
+ wEndYear: WORD;
+ wEndMonth: WORD;
+ wEndDay: WORD;
+ wStartHour: WORD;
+ wStartMinute: WORD;
+ MinutesDuration: DWORD;
+ MinutesInterval: DWORD;
+ rgFlags: DWORD;
+ TriggerType: TTaskTriggerType;
+ Type_: TTriggerTypeUnion;
+ Reserved2: WORD;
+ wRandomMinutesInterval: WORD;
+ end;
+ {$EXTERNALSYM _TASK_TRIGGER}
+ TASK_TRIGGER = _TASK_TRIGGER;
+ {$EXTERNALSYM TASK_TRIGGER}
+ PTASK_TRIGGER = ^TASK_TRIGGER;
+ {$EXTERNALSYM PTASK_TRIGGER}
+ TTaskTrigger = _TASK_TRIGGER;
+
+const
+ IID_ITaskTrigger: TGUID = '{148BD52B-A2AB-11CE-B11F-00AA00530503}';
+ {$EXTERNALSYM IID_ITaskTrigger}
+
+// interface ITaskTrigger
+
+type
+ ITaskTrigger = interface (IUnknown)
+ ['{148BD52B-A2AB-11CE-B11F-00AA00530503}']
+ function SetTrigger(const pTrigger: PTaskTrigger): HRESULT; stdcall;
+ function GetTrigger(pTrigger: PTaskTrigger): HRESULT; stdcall;
+ function GetTriggerString(var ppwszTrigger: LPWSTR): HRESULT; stdcall;
+ end;
+ {$EXTERNALSYM ITaskTrigger}
+
+const
+ IID_IScheduledWorkItem: TGUID = '{A6B952F0-A4B1-11D0-997D-00AA006887EC}';
+ {$EXTERNALSYM IID_IScheduledWorkItem}
+
+// interface IScheduledWorkItem
+
+type
+ IScheduledWorkItem = interface (IUnknown)
+ ['{A6B952F0-A4B1-11D0-997D-00AA006887EC}']
+ function CreateTrigger(out piNewTrigger: Word; out ppTrigger: ITaskTrigger): HRESULT; stdcall;
+ function DeleteTrigger(iTrigger: Word): HRESULT; stdcall;
+ function GetTriggerCount(out pwCount: Word): HRESULT; stdcall;
+ function GetTrigger(iTrigger: Word; var ppTrigger: ITaskTrigger): HRESULT; stdcall;
+ function GetTriggerString(iTrigger: Word; out ppwszTrigger: PWideChar): HRESULT; stdcall;
+ function GetRunTimes(const pstBegin: LPSYSTEMTIME; const pstEnd: LPSYSTEMTIME;
+ var pCount: Word; out rgstTaskTimes: LPSYSTEMTIME): HRESULT; stdcall;
+ function GetNextRunTime(var pstNextRun: SYSTEMTIME): HRESULT; stdcall;
+ function SetIdleWait(wIdleMinutes: Word; wDeadlineMinutes: Word): HRESULT; stdcall;
+ function GetIdleWait(out pwIdleMinutes: Word; out pwDeadlineMinutes: Word): HRESULT; stdcall;
+ function Run: HRESULT; stdcall;
+ function Terminate: HRESULT; stdcall;
+ function EditWorkItem(hParent: HWND; dwReserved: DWORD): HRESULT; stdcall;
+ function GetMostRecentRunTime(out pstLastRun: TSystemTime): HRESULT; stdcall;
+ function GetStatus(out phrStatus: HRESULT): HRESULT stdcall;
+ function GetExitCode(out pdwExitCode: DWORD): HRESULT stdcall;
+ function SetComment(pwszComment: LPCWSTR): HRESULT stdcall;
+ function GetComment(out ppwszComment: LPWSTR): HRESULT stdcall;
+ function SetCreator(pwszCreator: LPCWSTR): HRESULT; stdcall;
+ function GetCreator(out ppwszCreator: LPWSTR): HRESULT; stdcall;
+ function SetWorkItemData(cbData: Word; var rgbData: Byte): HRESULT; stdcall;
+ function GetWorkItemData(out pcbData: Word; out prgbData: Byte): HRESULT; stdcall;
+ function SetErrorRetryCount(wRetryCount: Word): HRESULT; stdcall;
+ function GetErrorRetryCount(out pwRetryCount: Word): HRESULT; stdcall;
+ function SetErrorRetryInterval(wRetryInterval: Word): HRESULT; stdcall;
+ function GetErrorRetryInterval(out pwRetryInterval: Word): HRESULT; stdcall;
+ function SetFlags(dwFlags: DWORD): HRESULT; stdcall;
+ function GetFlags(out pdwFlags: DWORD): HRESULT; stdcall;
+ function SetAccountInformation(pwszAccountName: LPCWSTR; pwszPassword: LPCWSTR): HRESULT; stdcall;
+ function GetAccountInformation(out ppwszAccountName: LPWSTR): HRESULT; stdcall;
+ end;
+ {$EXTERNALSYM IScheduledWorkItem}
+
+const
+ IID_ITask: TGUID = '{148BD524-A2AB-11CE-B11F-00AA00530503}';
+ {$EXTERNALSYM IID_ITask}
+
+// interface ITask
+
+type
+ ITask = interface (IScheduledWorkItem)
+ ['{148BD524-A2AB-11CE-B11F-00AA00530503}']
+ function SetApplicationName(pwszApplicationName: LPCWSTR): HRESULT; stdcall;
+ function GetApplicationName(out ppwszApplicationName: LPWSTR): HRESULT; stdcall;
+ function SetParameters(pwszParameters: LPCWSTR): HRESULT; stdcall;
+ function GetParameters(out ppwszParameters: LPWSTR): HRESULT; stdcall;
+ function SetWorkingDirectory(pwszWorkingDirectory: LPCWSTR): HRESULT; stdcall;
+ function GetWorkingDirectory(out ppwszWorkingDirectory: LPWSTR): HRESULT; stdcall;
+ function SetPriority(dwPriority: DWORD): HRESULT; stdcall;
+ function GetPriority(out pdwPriority: DWORD): HRESULT; stdcall;
+ function SetTaskFlags(dwFlags: DWORD): HRESULT; stdcall;
+ function GetTaskFlags(out pdwFlags: DWORD): HRESULT; stdcall;
+ function SetMaxRunTime(dwMaxRunTimeMS: DWORD): HRESULT; stdcall;
+ function GetMaxRunTime(out pdwMaxRunTimeMS: DWORD): HRESULT; stdcall;
+ end;
+ {$EXTERNALSYM ITask}
+
+const
+ IID_IEnumWorkItems: TGUID = '{148BD528-A2AB-11CE-B11F-00AA00530503}';
+ {$EXTERNALSYM IID_IEnumWorkItems}
+
+// interface IEnumWorkItems
+
+type
+ IEnumWorkItems = interface (IUnknown)
+ ['{148BD528-A2AB-11CE-B11F-00AA00530503}']
+ function Next(celt: ULONG; out rgpwszNames: LPLPWSTR; out pceltFetched: ULONG): HRESULT; stdcall;
+ function Skip(celt: ULONG): HRESULT; stdcall;
+ function Reset: HRESULT; stdcall;
+ function Clone(out ppEnumWorkItems: IEnumWorkItems): HRESULT; stdcall;
+ end;
+ {$EXTERNALSYM IEnumWorkItems}
+
+const
+ IID_ITaskScheduler: TGUID = '{148BD527-A2AB-11CE-B11F-00AA00530503}';
+ {$EXTERNALSYM IID_ITaskScheduler}
+
+// interface ITaskScheduler
+
+type
+ ITaskScheduler = interface (IUnknown)
+ ['{148BD527-A2AB-11CE-B11F-00AA00530503}']
+ function SetTargetComputer(pwszComputer: LPCWSTR): HRESULT; stdcall;
+ function GetTargetComputer(out ppwszComputer: LPWSTR): HRESULT; stdcall;
+ function Enum(out ppEnumWorkItems: IEnumWorkItems): HRESULT; stdcall;
+ function Activate(pwszName: PWideChar; var riid: TGUID; out ppUnk: IUnknown): HRESULT; stdcall;
+ function Delete(pwszName: LPCWSTR): HRESULT; stdcall;
+ function NewWorkItem(pwszTaskName: PWideChar; var rclsid: TGUID; var riid: TGUID; out ppUnk: IUnknown): HRESULT; stdcall;
+ function AddWorkItem(pwszTaskName: LPCWSTR; var pWorkItem: IScheduledWorkItem): HRESULT; stdcall;
+ function IsOfType(pwszName: LPCWSTR; var riid: TGUID): HRESULT; stdcall;
+ end;
+ {$EXTERNALSYM ITaskScheduler}
+
+const
+ CLSID_CTask: TGuid = '{148BD520-A2AB-11CE-B11F-00AA00530503}';
+ {$EXTERNALSYM CLSID_CTask}
+
+ CLSID_CTaskScheduler: TGuid = '{148BD52A-A2AB-11CE-B11F-00AA00530503}';
+ {$EXTERNALSYM CLSID_CTaskScheduler}
+
+type
+ PTaskPage = ^TTaskPage;
+ _TASKPAGE = (
+ TASKPAGE_TASK,
+ TASKPAGE_SCHEDULE,
+ TASKPAGE_SETTINGS);
+ {$EXTERNALSYM _TASKPAGE}
+ TASKPAGE = _TASKPAGE;
+ {$EXTERNALSYM TASKPAGE}
+ TTaskPage = _TASKPAGE;
+
+const
+ IID_IProvideTaskPage: TGuid = '{4086658a-cbbb-11cf-b604-00c04fd8d565}';
+ {$EXTERNALSYM IID_IProvideTaskPage}
+
+// interface IProvideTaskPage
+
+type
+ IProvideTaskPage = interface (IUnknown)
+ ['{4086658A-CBBB-11CF-B604-00C04FD8D565}']
+ function GetPage(tpType: TTaskPage; fPersistChanges: BOOL; var phPage: HPropSheetPage): HRESULT; stdcall;
+ end;
+ {$EXTERNALSYM IProvideTaskPage}
+
+const
+ ISchedulingAgent = ITaskScheduler;
+ {$EXTERNALSYM ISchedulingAgent}
+ IEnumTasks = IEnumWorkItems;
+ {$EXTERNALSYM IEnumTasks}
+ //IID_ISchedulingAgent = IID_ITaskScheduler;
+ IID_ISchedulingAgent: TGUID = '{148BD527-A2AB-11CE-B11F-00AA00530503}';
+ {$EXTERNALSYM IID_ISchedulingAgent}
+ //CLSID_CSchedulingAgent = CLSID_CTaskScheduler;
+ CLSID_CSchedulingAgent: TGuid = '{148BD52A-A2AB-11CE-B11F-00AA00530503}';
+ {$EXTERNALSYM CLSID_CSchedulingAgent}
+
+//added to use save option without ole2 - not there in original source of mstask.h
+
+ {$EXTERNALSYM IID_IPersistFile}
+ IID_IPersistFile: TGUID = (
+ D1: $0000010B; D2: $0000; D3: $0000; D4: ($C0, $00, $00, $00, $00, $00, $00, $46));
+
+implementation
+
+end.
+
diff --git a/packages/extra/winunits/jwamstcpip.pas b/packages/extra/winunits/jwamstcpip.pas
index e343794a58..ebfb77d26c 100644
--- a/packages/extra/winunits/jwamstcpip.pas
+++ b/packages/extra/winunits/jwamstcpip.pas
@@ -1,109 +1,109 @@
-{******************************************************************************}
-{ }
-{ Winsock2 TCP/IP IOCTL API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: mstcpip.h, released August 2001. The original Pascal }
-{ code is: MSTcpIp.pas, released December 2000. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwamstcpip.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaMSTcpIP;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "mstcpip.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaWinSock2;
-
-// Argument structure for SIO_KEEPALIVE_VALS
-
-type
- tcp_keepalive = record
- onoff: u_long;
- keepalivetime: u_long;
- keepaliveinterval: u_long;
- end;
- {$EXTERNALSYM tcp_keepalive}
- TTCPKeepAlive = tcp_keepalive;
- PTCPKeepAlive = ^TTCPKeepAlive;
-
-// New WSAIoctl Options
-
-const
- SIO_RCVALL = IOC_IN or IOC_VENDOR or 1;
- {$EXTERNALSYM SIO_RCVALL}
- SIO_RCVALL_MCAST = IOC_IN or IOC_VENDOR or 2;
- {$EXTERNALSYM SIO_RCVALL_MCAST}
- SIO_RCVALL_IGMPMCAST = IOC_IN or IOC_VENDOR or 3;
- {$EXTERNALSYM SIO_RCVALL_IGMPMCAST}
- SIO_KEEPALIVE_VALS = IOC_IN or IOC_VENDOR or 4;
- {$EXTERNALSYM SIO_KEEPALIVE_VALS}
- SIO_ABSORB_RTRALERT = IOC_IN or IOC_VENDOR or 5;
- {$EXTERNALSYM SIO_ABSORB_RTRALERT}
- SIO_UCAST_IF = IOC_IN or IOC_VENDOR or 6;
- {$EXTERNALSYM SIO_UCAST_IF}
- SIO_LIMIT_BROADCASTS = IOC_IN or IOC_VENDOR or 7;
- {$EXTERNALSYM SIO_LIMIT_BROADCASTS}
- SIO_INDEX_BIND = IOC_IN or IOC_VENDOR or 8;
- {$EXTERNALSYM SIO_INDEX_BIND}
- SIO_INDEX_MCASTIF = IOC_IN or IOC_VENDOR or 9;
- {$EXTERNALSYM SIO_INDEX_MCASTIF}
- SIO_INDEX_ADD_MCAST = IOC_IN or IOC_VENDOR or 10;
- {$EXTERNALSYM SIO_INDEX_ADD_MCAST}
- SIO_INDEX_DEL_MCAST = IOC_IN or IOC_VENDOR or 11;
- {$EXTERNALSYM SIO_INDEX_DEL_MCAST}
-
-// Values for use with SIO_RCVALL* options
-
- RCVALL_OFF = 0;
- {$EXTERNALSYM RCVALL_OFF}
- RCVALL_ON = 1;
- {$EXTERNALSYM RCVALL_ON}
- RCVALL_SOCKETLEVELONLY = 2;
- {$EXTERNALSYM RCVALL_SOCKETLEVELONLY}
-
-implementation
-
-end.
+{******************************************************************************}
+{ }
+{ Winsock2 TCP/IP IOCTL API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: mstcpip.h, released August 2001. The original Pascal }
+{ code is: MSTcpIp.pas, released December 2000. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwamstcpip.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaMSTcpIP;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "mstcpip.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaWinSock2;
+
+// Argument structure for SIO_KEEPALIVE_VALS
+
+type
+ tcp_keepalive = record
+ onoff: u_long;
+ keepalivetime: u_long;
+ keepaliveinterval: u_long;
+ end;
+ {$EXTERNALSYM tcp_keepalive}
+ TTCPKeepAlive = tcp_keepalive;
+ PTCPKeepAlive = ^TTCPKeepAlive;
+
+// New WSAIoctl Options
+
+const
+ SIO_RCVALL = IOC_IN or IOC_VENDOR or 1;
+ {$EXTERNALSYM SIO_RCVALL}
+ SIO_RCVALL_MCAST = IOC_IN or IOC_VENDOR or 2;
+ {$EXTERNALSYM SIO_RCVALL_MCAST}
+ SIO_RCVALL_IGMPMCAST = IOC_IN or IOC_VENDOR or 3;
+ {$EXTERNALSYM SIO_RCVALL_IGMPMCAST}
+ SIO_KEEPALIVE_VALS = IOC_IN or IOC_VENDOR or 4;
+ {$EXTERNALSYM SIO_KEEPALIVE_VALS}
+ SIO_ABSORB_RTRALERT = IOC_IN or IOC_VENDOR or 5;
+ {$EXTERNALSYM SIO_ABSORB_RTRALERT}
+ SIO_UCAST_IF = IOC_IN or IOC_VENDOR or 6;
+ {$EXTERNALSYM SIO_UCAST_IF}
+ SIO_LIMIT_BROADCASTS = IOC_IN or IOC_VENDOR or 7;
+ {$EXTERNALSYM SIO_LIMIT_BROADCASTS}
+ SIO_INDEX_BIND = IOC_IN or IOC_VENDOR or 8;
+ {$EXTERNALSYM SIO_INDEX_BIND}
+ SIO_INDEX_MCASTIF = IOC_IN or IOC_VENDOR or 9;
+ {$EXTERNALSYM SIO_INDEX_MCASTIF}
+ SIO_INDEX_ADD_MCAST = IOC_IN or IOC_VENDOR or 10;
+ {$EXTERNALSYM SIO_INDEX_ADD_MCAST}
+ SIO_INDEX_DEL_MCAST = IOC_IN or IOC_VENDOR or 11;
+ {$EXTERNALSYM SIO_INDEX_DEL_MCAST}
+
+// Values for use with SIO_RCVALL* options
+
+ RCVALL_OFF = 0;
+ {$EXTERNALSYM RCVALL_OFF}
+ RCVALL_ON = 1;
+ {$EXTERNALSYM RCVALL_ON}
+ RCVALL_SOCKETLEVELONLY = 2;
+ {$EXTERNALSYM RCVALL_SOCKETLEVELONLY}
+
+implementation
+
+end.
diff --git a/packages/extra/winunits/jwamswsock.pas b/packages/extra/winunits/jwamswsock.pas
index 2f109fb75f..0916de1e94 100644
--- a/packages/extra/winunits/jwamswsock.pas
+++ b/packages/extra/winunits/jwamswsock.pas
@@ -1,646 +1,646 @@
-{******************************************************************************}
-{ }
-{ Winsock2 Options and Extensions API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: mswsock.h, released June 2000. The original Pascal }
-{ code is: MSWSock.pas, released December 2000. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwamswsock.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaMSWSock;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "mswsock.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaWinType, JwaWinBase, JwaWinSock2;
-
-//
-// Options for connect and disconnect data and options. Used only by
-// non-TCP/IP transports such as DECNet, OSI TP4, etc.
-//
-
-const
- SO_CONNDATA = $7000;
- {$EXTERNALSYM SO_CONNDATA}
- SO_CONNOPT = $7001;
- {$EXTERNALSYM SO_CONNOPT}
- SO_DISCDATA = $7002;
- {$EXTERNALSYM SO_DISCDATA}
- SO_DISCOPT = $7003;
- {$EXTERNALSYM SO_DISCOPT}
- SO_CONNDATALEN = $7004;
- {$EXTERNALSYM SO_CONNDATALEN}
- SO_CONNOPTLEN = $7005;
- {$EXTERNALSYM SO_CONNOPTLEN}
- SO_DISCDATALEN = $7006;
- {$EXTERNALSYM SO_DISCDATALEN}
- SO_DISCOPTLEN = $7007;
- {$EXTERNALSYM SO_DISCOPTLEN}
-
-//
-// Option for opening sockets for synchronous access.
-//
-
-const
- SO_OPENTYPE = $7008;
- {$EXTERNALSYM SO_OPENTYPE}
-
- SO_SYNCHRONOUS_ALERT = $10;
- {$EXTERNALSYM SO_SYNCHRONOUS_ALERT}
- SO_SYNCHRONOUS_NONALERT = $20;
- {$EXTERNALSYM SO_SYNCHRONOUS_NONALERT}
-
-//
-// Other NT-specific options.
-//
-
-const
- SO_MAXDG = $7009;
- {$EXTERNALSYM SO_MAXDG}
- SO_MAXPATHDG = $700A;
- {$EXTERNALSYM SO_MAXPATHDG}
- SO_UPDATE_ACCEPT_CONTEXT = $700B;
- {$EXTERNALSYM SO_UPDATE_ACCEPT_CONTEXT}
- SO_CONNECT_TIME = $700C;
- {$EXTERNALSYM SO_CONNECT_TIME}
- SO_UPDATE_CONNECT_CONTEXT = $7010;
- {$EXTERNALSYM SO_UPDATE_CONNECT_CONTEXT}
-
-//
-// TCP options.
-//
-
-const
- TCP_BSDURGENT = $7000;
- {$EXTERNALSYM TCP_BSDURGENT}
-
-//
-// MS Transport Provider IOCTL to control
-// reporting PORT_UNREACHABLE messages
-// on UDP sockets via recv/WSARecv/etc.
-// Path TRUE in input buffer to enable (default if supported),
-// FALSE to disable.
-//
-
- SIO_UDP_CONNRESET = IOC_IN or IOC_VENDOR or 12;
- {$EXTERNALSYM SIO_UDP_CONNRESET}
-
-//
-// Microsoft extended APIs.
-//
-
-function WSARecvEx(s: TSocket; buf: PChar; len: Integer; var flags: Integer): Integer; stdcall;
-{$EXTERNALSYM WSARecvEx}
-
-type
- _TRANSMIT_FILE_BUFFERS = record
- Head: LPVOID;
- HeadLength: DWORD;
- Tail: LPVOID;
- TailLength: DWORD;
- end;
- {$EXTERNALSYM _TRANSMIT_FILE_BUFFERS}
- TRANSMIT_FILE_BUFFERS = _TRANSMIT_FILE_BUFFERS;
- {$EXTERNALSYM TRANSMIT_FILE_BUFFERS}
- PTRANSMIT_FILE_BUFFERS = ^TRANSMIT_FILE_BUFFERS;
- {$EXTERNALSYM PTRANSMIT_FILE_BUFFERS}
- LPTRANSMIT_FILE_BUFFERS = ^TRANSMIT_FILE_BUFFERS;
- {$EXTERNALSYM LPTRANSMIT_FILE_BUFFERS}
- TTransmitFileBuffers = TRANSMIT_FILE_BUFFERS;
- PTransmitFileBuffers = LPTRANSMIT_FILE_BUFFERS;
-
-const
- TF_DISCONNECT = $01;
- {$EXTERNALSYM TF_DISCONNECT}
- TF_REUSE_SOCKET = $02;
- {$EXTERNALSYM TF_REUSE_SOCKET}
- TF_WRITE_BEHIND = $04;
- {$EXTERNALSYM TF_WRITE_BEHIND}
- TF_USE_DEFAULT_WORKER = $00;
- {$EXTERNALSYM TF_USE_DEFAULT_WORKER}
- TF_USE_SYSTEM_THREAD = $10;
- {$EXTERNALSYM TF_USE_SYSTEM_THREAD}
- TF_USE_KERNEL_APC = $20;
- {$EXTERNALSYM TF_USE_KERNEL_APC}
-
-function TransmitFile(hSocket: TSocket; hFile: HANDLE; nNumberOfBytesToWrite,
- nNumberOfBytesPerSend: DWORD; lpOverlapped: POVERLAPPED;
- lpTransmitBuffers: LPTRANSMIT_FILE_BUFFERS; dwReserved: DWORD): BOOL; stdcall;
-{$EXTERNALSYM TransmitFile}
-
-function AcceptEx(sListenSocket, sAcceptSocket: TSocket; lpOutputBuffer: LPVOID;
- dwReceiveDataLength, dwLocalAddressLength, dwRemoteAddressLength: DWORD;
- var lpdwBytesReceived: DWORD; lpOverlapped: POVERLAPPED): BOOL; stdcall;
-{$EXTERNALSYM AcceptEx}
-
-procedure GetAcceptExSockaddrs(lpOutputBuffer: LPVOID; dwReceiveDataLength,
- dwLocalAddressLength, dwRemoteAddressLength: DWORD; var LocalSockaddr: LPSOCKADDR;
- var LocalSockaddrLength: Integer; var RemoteSockaddr: LPSOCKADDR;
- var RemoteSockaddrLength: Integer); stdcall;
-{$EXTERNALSYM GetAcceptExSockaddrs}
-
-//
-// "QueryInterface" versions of the above APIs.
-//
-
-type
- LPFN_TRANSMITFILE = function(hSocket: TSocket; hFile: HANDLE; nNumberOfBytesToWrite,
- nNumberOfBytesPerSend: DWORD; lpOverlapped: POVERLAPPED;
- lpTransmitBuffers: LPTRANSMIT_FILE_BUFFERS; dwReserved: DWORD): BOOL; stdcall;
- {$EXTERNALSYM LPFN_TRANSMITFILE}
- TFnTransmitFile = LPFN_TRANSMITFILE;
-
-const
- WSAID_TRANSMITFILE: TGUID = (
- D1:$b5367df0; D2:$cbac; D3:$11cf; D4:($95, $ca, $00, $80, $5f, $48, $a1, $92));
- {$EXTERNALSYM WSAID_TRANSMITFILE}
-
-type
- LPFN_ACCEPTEX = function(sListenSocket, sAcceptSocket: TSocket; lpOutputBuffer: LPVOID;
- dwReceiveDataLength, dwLocalAddressLength, dwRemoteAddressLength: DWORD;
- var lpdwBytesReceived: DWORD; lpOverlapped: POVERLAPPED): BOOL; stdcall;
- {$EXTERNALSYM LPFN_ACCEPTEX}
- TFnAcceptEx = LPFN_ACCEPTEX;
-
-const
- WSAID_ACCEPTEX: TGUID = (
- D1:$b5367df1; D2:$cbac; D3:$11cf; D4:($95, $ca, $00, $80, $5f, $48, $a1, $92));
- {$EXTERNALSYM WSAID_ACCEPTEX}
-
-type
- LPFN_GETACCEPTEXSOCKADDRS = procedure(lpOutputBuffer: LPVOID; dwReceiveDataLength,
- dwLocalAddressLength, dwRemoteAddressLength: DWORD; var LocalSockaddr: LPSOCKADDR;
- var LocalSockaddrLength: Integer; var RemoteSockaddr: LPSOCKADDR;
- var RemoteSockaddrLength: Integer); stdcall;
- {$EXTERNALSYM LPFN_GETACCEPTEXSOCKADDRS}
- TFnGetAcceptExSockAddrs = LPFN_GETACCEPTEXSOCKADDRS;
-
-const
- WSAID_GETACCEPTEXSOCKADDRS: TGUID = (
- D1: $b5367df2; D2:$cbac; D3:$11cf; D4:($95, $ca, $00, $80, $5f, $48, $a1, $92));
- {$EXTERNALSYM WSAID_GETACCEPTEXSOCKADDRS}
-
- TP_ELEMENT_MEMORY = 1;
- {$EXTERNALSYM TP_ELEMENT_MEMORY}
- TP_ELEMENT_FILE = 2;
- {$EXTERNALSYM TP_ELEMENT_FILE}
- TP_ELEMENT_EOP = 4;
- {$EXTERNALSYM TP_ELEMENT_EOP}
-
-type
- _TRANSMIT_PACKETS_ELEMENT = record
- dwElFlags: ULONG;
- cLength: ULONG;
- case Integer of
- 0: (
- nFileOffset: LARGE_INTEGER;
- hFile: HANDLE);
- 1: (
- pBuffer: LPVOID);
- end;
- {$EXTERNALSYM _TRANSMIT_PACKETS_ELEMENT}
- TRANSMIT_PACKETS_ELEMENT = _TRANSMIT_PACKETS_ELEMENT;
- {$EXTERNALSYM TRANSMIT_PACKETS_ELEMENT}
- PTRANSMIT_PACKETS_ELEMENT = ^TRANSMIT_PACKETS_ELEMENT;
- {$EXTERNALSYM PTRANSMIT_PACKETS_ELEMENT}
- LPTRANSMIT_PACKETS_ELEMENT = ^TRANSMIT_PACKETS_ELEMENT;
- {$EXTERNALSYM LPTRANSMIT_PACKETS_ELEMENT}
- TTransmitPacketElement = TRANSMIT_PACKETS_ELEMENT;
- PTransmitPacketElement = PTRANSMIT_PACKETS_ELEMENT;
-
-const
- TP_DISCONNECT = TF_DISCONNECT;
- {$EXTERNALSYM TP_DISCONNECT}
- TP_REUSE_SOCKET = TF_REUSE_SOCKET;
- {$EXTERNALSYM TP_REUSE_SOCKET}
- TP_USE_DEFAULT_WORKER = TF_USE_DEFAULT_WORKER;
- {$EXTERNALSYM TP_USE_DEFAULT_WORKER}
- TP_USE_SYSTEM_THREAD = TF_USE_SYSTEM_THREAD;
- {$EXTERNALSYM TP_USE_SYSTEM_THREAD}
- TP_USE_KERNEL_APC = TF_USE_KERNEL_APC;
- {$EXTERNALSYM TP_USE_KERNEL_APC}
-
-type
- LPFN_TRANSMITPACKETS = function(Socket: TSocket; lpPacketArray: LPTRANSMIT_PACKETS_ELEMENT; ElementCount: DWORD;
- nSendSize: DWORD; lpOverlapped: LPOVERLAPPED; dwFlags: DWORD): BOOL; stdcall;
- {$EXTERNALSYM LPFN_TRANSMITPACKETS}
-
-const
- WSAID_TRANSMITPACKETS: TGUID = (
- D1: $d9689da0; D2:$1f90; D3:$11d3; D4:($99, $71, $00, $c0, $4f, $68, $c8, $76));
- {$EXTERNALSYM WSAID_TRANSMITPACKETS}
-
-type
- LPFN_CONNECTEX = function(s: TSocket; name: PSockAddr; namelen: Integer; lpSendBuffer: PVOID; dwSendDataLength: DWORD;
- lpdwBytesSent: LPDWORD; lpOverlapped: LPOVERLAPPED): BOOL; stdcall;
- {$EXTERNALSYM LPFN_CONNECTEX}
-
-const
- WSAID_CONNECTEX: TGUID = (
- D1: $25a207b9; D2:$ddf3; D3:$4660; D4:($8e, $e9, $76, $e5, $8c, $74, $06, $3e));
- {$EXTERNALSYM WSAID_CONNECTEX}
-
-type
- LPFN_DISCONNECTEX = function(s: TSocket; lpOverlapped: LPOVERLAPPED; dwFlags: DWORD; dwReserved: DWORD): BOOL; stdcall;
- {$EXTERNALSYM LPFN_DISCONNECTEX}
-
-const
- WSAID_DISCONNECTEX: TGUID = (
- D1: $7fda2e11; D2:$8630; D3:$436f; D4:($a0, $31, $f5, $36, $a6, $ee, $c1, $57));
- {$EXTERNALSYM WSAID_DISCONNECTEX}
-
- DE_REUSE_SOCKET = TF_REUSE_SOCKET;
- {$EXTERNALSYM DE_REUSE_SOCKET}
-
-//
-// Network-location awareness -- Name registration values for use
-// with WSASetService and other structures.
-//
-
-// {6642243A-3BA8-4aa6-BAA5-2E0BD71FDD83}
-
- NLA_NAMESPACE_GUID: TGUID = (
- D1: $6642243a; D2:$3ba8; D3:$4aa6; D4:($ba, $a5, $2e, $0b, $d7, $1f, $dd, $83));
- {$EXTERNALSYM NLA_NAMESPACE_GUID}
-
-// {6642243A-3BA8-4aa6-BAA5-2E0BD71FDD83}
-
- NLA_SERVICE_CLASS_GUID: TGUID = (
- D1: $37e515; D2:$b5c9; D3:$4a43; D4:($ba, $da, $8b, $48, $a8, $7a, $d2, $39));
- {$EXTERNALSYM NLA_SERVICE_CLASS_GUID}
-
- NLA_ALLUSERS_NETWORK = $00000001;
- {$EXTERNALSYM NLA_ALLUSERS_NETWORK}
- NLA_FRIENDLY_NAME = $00000002;
- {$EXTERNALSYM NLA_FRIENDLY_NAME}
-
-type
- _NLA_BLOB_DATA_TYPE = (
- NLA_RAW_DATA,
- NLA_INTERFACE,
- NLA_802_1X_LOCATION,
- NLA_CONNECTIVITY,
- NLA_ICS);
- {$EXTERNALSYM _NLA_BLOB_DATA_TYPE}
- NLA_BLOB_DATA_TYPE = _NLA_BLOB_DATA_TYPE;
- {$EXTERNALSYM NLA_BLOB_DATA_TYPE}
- PNLA_BLOB_DATA_TYPE = ^NLA_BLOB_DATA_TYPE;
- {$EXTERNALSYM PNLA_BLOB_DATA_TYPE}
- TNlaBlobDataType = NLA_BLOB_DATA_TYPE;
- PNlaBlobDataType = PNLA_BLOB_DATA_TYPE;
-
- _NLA_CONNECTIVITY_TYPE = (
- NLA_NETWORK_AD_HOC,
- NLA_NETWORK_MANAGED,
- NLA_NETWORK_UNMANAGED,
- NLA_NETWORK_UNKNOWN);
- {$EXTERNALSYM _NLA_CONNECTIVITY_TYPE}
- NLA_CONNECTIVITY_TYPE = _NLA_CONNECTIVITY_TYPE;
- {$EXTERNALSYM NLA_CONNECTIVITY_TYPE}
- PNLA_CONNECTIVITY_TYPE = ^NLA_CONNECTIVITY_TYPE;
- {$EXTERNALSYM PNLA_CONNECTIVITY_TYPE}
- TNlaConnectivityType = NLA_CONNECTIVITY_TYPE;
- PNlaConnectivityType = PNLA_CONNECTIVITY_TYPE;
-
- _NLA_INTERNET = (
- NLA_INTERNET_UNKNOWN,
- NLA_INTERNET_NO,
- NLA_INTERNET_YES);
- {$EXTERNALSYM _NLA_INTERNET}
- NLA_INTERNET = _NLA_INTERNET;
- {$EXTERNALSYM NLA_INTERNET}
- PNLA_INTERNET = ^NLA_INTERNET;
- {$EXTERNALSYM PNLA_INTERNET}
- TNlaInternet = NLA_INTERNET;
- PNlaInternet = PNLA_INTERNET;
-
- _NLA_BLOB = record
- header: record
- type_: NLA_BLOB_DATA_TYPE;
- dwSize: DWORD;
- nextOffset: DWORD;
- end;
- case Integer of
- 0: (
- // header.type -> NLA_RAW_DATA
- rawData: array [0..0] of CHAR);
- 1: (
- // header.type -> NLA_INTERFACE
- dwType: DWORD;
- dwSpeed: DWORD;
- adapterName: array [0..0] of CHAR);
- 2: (
- // header.type -> NLA_802_1X_LOCATION
- information: array [0..0] of CHAR);
- 3: (
- // header.type -> NLA_CONNECTIVITY
- type_: NLA_CONNECTIVITY_TYPE;
- internet: NLA_INTERNET);
- 4: (
- // header.type -> NLA_ICS
- remote: record
- speed: DWORD;
- type_: DWORD;
- state: DWORD;
- machineName: array [0..255] of WCHAR;
- sharedAdapterName: array [0..255] of WCHAR;
- end);
- end;
- {$EXTERNALSYM _NLA_BLOB}
- NLA_BLOB = _NLA_BLOB;
- {$EXTERNALSYM NLA_BLOB}
- PNLA_BLOB = ^NLA_BLOB;
- {$EXTERNALSYM PNLA_BLOB}
- LPNLA_BLOB = ^NLA_BLOB;
- {$EXTERNALSYM LPNLA_BLOB}
- TNlaBlob = NLA_BLOB;
- PNlaBlob = PNLA_BLOB;
-
- _WSAMSG = record
- name: LPSOCKADDR; // Remote address
- namelen: INT; // Remote address length
- lpBuffers: LPWSABUF; // Data buffer array
- dwBufferCount: DWORD; // Number of elements in the array
- Control: WSABUF; // Control buffer
- dwFlags: DWORD; // Flags
- end;
- {$EXTERNALSYM _WSAMSG}
- WSAMSG = _WSAMSG;
- {$EXTERNALSYM WSAMSG}
- PWSAMSG = ^WSAMSG;
- {$EXTERNALSYM PWSAMSG}
- LPWSAMSG = ^WSAMSG;
- {$EXTERNALSYM LPWSAMSG}
- TWsaMsg = WSAMSG;
-
-//
-// Layout of ancillary data objects in the control buffer
-//
-
- _WSACMSGHDR = record
- cmsg_len: SIZE_T;
- cmsg_level: INT;
- cmsg_type: INT;
- // followed by UCHAR cmsg_data[]
- end;
- {$EXTERNALSYM _WSACMSGHDR}
- WSACMSGHDR = _WSACMSGHDR;
- {$EXTERNALSYM WSACMSGHDR}
- PWSACMSGHDR = ^WSACMSGHDR;
- {$EXTERNALSYM PWSACMSGHDR}
- LPWSACMSGHDR = ^WSACMSGHDR;
- {$EXTERNALSYM LPWSACMSGHDR}
- TWsaCMsgHdr = WSACMSGHDR;
-
-//
-// Alignment macros for header and data members of
-// the control buffer.
-//
-
-{ TODO
-#define WSA_CMSGHDR_ALIGN(length) \
- ( ((length) + TYPE_ALIGNMENT(WSACMSGHDR)-1) & \
- (~(TYPE_ALIGNMENT(WSACMSGHDR)-1)) ) \
-
-#define WSA_CMSGDATA_ALIGN(length) \
- ( ((length) + MAX_NATURAL_ALIGNMENT-1) & \
- (~(MAX_NATURAL_ALIGNMENT-1)) )
-}
-
-//
-// WSA_CMSG_FIRSTHDR
-//
-// Returns a pointer to the first ancillary data object,
-// or a null pointer if there is no ancillary data in the
-// control buffer of the WSAMSG structure.
-//
-// LPCMSGHDR
-// WSA_CMSG_FIRSTHDR (
-// LPWSAMSG msg
-// );
-//
-
-(* TODO
-#define WSA_CMSG_FIRSTHDR(msg) \
- ( ((msg)->Control.len >= sizeof(WSACMSGHDR)) \
- ? (LPWSACMSGHDR)(msg)->Control.buf \
- : (LPWSACMSGHDR)NULL )
-*)
-
-//
-// WSA_CMSG_NXTHDR
-//
-// Returns a pointer to the next ancillary data object,
-// or a null if there are no more data objects.
-//
-// LPCMSGHDR
-// WSA_CMSG_NEXTHDR (
-// LPWSAMSG msg,
-// LPWSACMSGHDR cmsg
-// );
-//
-
-{ TODO
-#define WSA_CMSG_NXTHDR(msg, cmsg) \
- ( ((cmsg) == NULL) \
- ? WSA_CMSG_FIRSTHDR(msg) \
- : ( ( ((u_char *)(cmsg) + \
- WSA_CMSGHDR_ALIGN((cmsg)->cmsg_len) + \
- sizeof(WSACMSGHDR) ) > \
- (u_char *)((msg)->Control.buf) + \
- (msg)->Control.len ) \
- ? (LPWSACMSGHDR)NULL \
- : (LPWSACMSGHDR)((u_char *)(cmsg) + \
- WSA_CMSGHDR_ALIGN((cmsg)->cmsg_len)) ) )
-}
-
-//
-// WSA_CMSG_DATA
-//
-// Returns a pointer to the first byte of data (what is referred
-// to as the cmsg_data member though it is not defined in
-// the structure).
-//
-// u_char *
-// WSA_CMSG_DATA (
-// LPWSACMSGHDR pcmsg
-// );
-//
-
-{ TODO
-#define WSA_CMSG_DATA(cmsg) \
- ( (u_char *)(cmsg) + WSA_CMSGDATA_ALIGN(sizeof(WSACMSGHDR)) )
-}
-
-//
-// WSA_CMSG_SPACE
-//
-// Returns total size of an ancillary data object given
-// the amount of data. Used to allocate the correct amount
-// of space.
-//
-// SIZE_T
-// WSA_CMSG_SPACE (
-// SIZE_T length
-// );
-//
-
-{ TODO
-#define WSA_CMSG_SPACE(length) \
- (WSA_CMSGDATA_ALIGN(sizeof(WSACMSGHDR) + WSA_CMSGHDR_ALIGN(length)))
-}
-
-//
-// WSA_CMSG_LEN
-//
-// Returns the value to store in cmsg_len given the amount of data.
-//
-// SIZE_T
-// WSA_CMSG_LEN (
-// SIZE_T length
-// );
-//
-
-{ TODO
-#define WSA_CMSG_LEN(length) \
- (WSA_CMSGDATA_ALIGN(sizeof(WSACMSGHDR)) + length)
-}
-
-//
-// Definition for flags member of the WSAMSG structure
-// This is in addition to other MSG_xxx flags defined
-// for recv/recvfrom/send/sendto.
-//
-
-const
- MSG_TRUNC = $0100;
- {$EXTERNALSYM MSG_TRUNC}
- MSG_CTRUNC = $0200;
- {$EXTERNALSYM MSG_CTRUNC}
- MSG_BCAST = $0400;
- {$EXTERNALSYM MSG_BCAST}
- MSG_MCAST = $0800;
- {$EXTERNALSYM MSG_MCAST}
-
-type
- LPFN_WSARECVMSG = function(s: TSocket; lpMsg: LPWSAMSG; lpdwNumberOfBytesRecvd: LPDWORD; lpOverlapped: LPWSAOVERLAPPED;
- lpCompletionRoutine: LPWSAOVERLAPPED_COMPLETION_ROUTINE): INT; stdcall;
- {$EXTERNALSYM LPFN_WSARECVMSG}
-
-const
- WSAID_WSARECVMSG: TGUID = (
- D1: $f689d7c8; D2:$6f1f; D3:$436b; D4:($8a, $53, $e5, $4f, $e3, $51, $c3, $22));
- {$EXTERNALSYM WSAID_WSARECVMSG}
-
-implementation
-
-const
- mswsocklib = 'mswsock.dll';
-
-{$IFDEF DYNAMIC_LINK}
-
-var
- _WSARecvEx: Pointer;
-
-function WSARecvEx;
-begin
- GetProcedureAddress(_WSARecvEx, mswsocklib, 'WSARecvEx');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WSARecvEx]
- end;
-end;
-
-var
- _TransmitFile: Pointer;
-
-function TransmitFile;
-begin
- GetProcedureAddress(_TransmitFile, mswsocklib, 'TransmitFile');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_TransmitFile]
- end;
-end;
-
-var
- _AcceptEx: Pointer;
-
-function AcceptEx;
-begin
- GetProcedureAddress(_AcceptEx, mswsocklib, 'AcceptEx');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_AcceptEx]
- end;
-end;
-
-var
- _GetAcceptExSockaddrs: Pointer;
-
-procedure GetAcceptExSockaddrs;
-begin
- GetProcedureAddress(_GetAcceptExSockaddrs, mswsocklib, 'GetAcceptExSockaddrs');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetAcceptExSockaddrs]
- end;
-end;
-
-{$ELSE}
-
-function WSARecvEx; external mswsocklib name 'WSARecvEx';
-function TransmitFile; external mswsocklib name 'TransmitFile';
-function AcceptEx; external mswsocklib name 'AcceptEx';
-procedure GetAcceptExSockaddrs; external mswsocklib name 'GetAcceptExSockaddrs';
-
-{$ENDIF DYNAMIC_LINK}
-
-end.
+{******************************************************************************}
+{ }
+{ Winsock2 Options and Extensions API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: mswsock.h, released June 2000. The original Pascal }
+{ code is: MSWSock.pas, released December 2000. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwamswsock.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaMSWSock;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "mswsock.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaWinType, JwaWinBase, JwaWinSock2;
+
+//
+// Options for connect and disconnect data and options. Used only by
+// non-TCP/IP transports such as DECNet, OSI TP4, etc.
+//
+
+const
+ SO_CONNDATA = $7000;
+ {$EXTERNALSYM SO_CONNDATA}
+ SO_CONNOPT = $7001;
+ {$EXTERNALSYM SO_CONNOPT}
+ SO_DISCDATA = $7002;
+ {$EXTERNALSYM SO_DISCDATA}
+ SO_DISCOPT = $7003;
+ {$EXTERNALSYM SO_DISCOPT}
+ SO_CONNDATALEN = $7004;
+ {$EXTERNALSYM SO_CONNDATALEN}
+ SO_CONNOPTLEN = $7005;
+ {$EXTERNALSYM SO_CONNOPTLEN}
+ SO_DISCDATALEN = $7006;
+ {$EXTERNALSYM SO_DISCDATALEN}
+ SO_DISCOPTLEN = $7007;
+ {$EXTERNALSYM SO_DISCOPTLEN}
+
+//
+// Option for opening sockets for synchronous access.
+//
+
+const
+ SO_OPENTYPE = $7008;
+ {$EXTERNALSYM SO_OPENTYPE}
+
+ SO_SYNCHRONOUS_ALERT = $10;
+ {$EXTERNALSYM SO_SYNCHRONOUS_ALERT}
+ SO_SYNCHRONOUS_NONALERT = $20;
+ {$EXTERNALSYM SO_SYNCHRONOUS_NONALERT}
+
+//
+// Other NT-specific options.
+//
+
+const
+ SO_MAXDG = $7009;
+ {$EXTERNALSYM SO_MAXDG}
+ SO_MAXPATHDG = $700A;
+ {$EXTERNALSYM SO_MAXPATHDG}
+ SO_UPDATE_ACCEPT_CONTEXT = $700B;
+ {$EXTERNALSYM SO_UPDATE_ACCEPT_CONTEXT}
+ SO_CONNECT_TIME = $700C;
+ {$EXTERNALSYM SO_CONNECT_TIME}
+ SO_UPDATE_CONNECT_CONTEXT = $7010;
+ {$EXTERNALSYM SO_UPDATE_CONNECT_CONTEXT}
+
+//
+// TCP options.
+//
+
+const
+ TCP_BSDURGENT = $7000;
+ {$EXTERNALSYM TCP_BSDURGENT}
+
+//
+// MS Transport Provider IOCTL to control
+// reporting PORT_UNREACHABLE messages
+// on UDP sockets via recv/WSARecv/etc.
+// Path TRUE in input buffer to enable (default if supported),
+// FALSE to disable.
+//
+
+ SIO_UDP_CONNRESET = IOC_IN or IOC_VENDOR or 12;
+ {$EXTERNALSYM SIO_UDP_CONNRESET}
+
+//
+// Microsoft extended APIs.
+//
+
+function WSARecvEx(s: TSocket; buf: PChar; len: Integer; var flags: Integer): Integer; stdcall;
+{$EXTERNALSYM WSARecvEx}
+
+type
+ _TRANSMIT_FILE_BUFFERS = record
+ Head: LPVOID;
+ HeadLength: DWORD;
+ Tail: LPVOID;
+ TailLength: DWORD;
+ end;
+ {$EXTERNALSYM _TRANSMIT_FILE_BUFFERS}
+ TRANSMIT_FILE_BUFFERS = _TRANSMIT_FILE_BUFFERS;
+ {$EXTERNALSYM TRANSMIT_FILE_BUFFERS}
+ PTRANSMIT_FILE_BUFFERS = ^TRANSMIT_FILE_BUFFERS;
+ {$EXTERNALSYM PTRANSMIT_FILE_BUFFERS}
+ LPTRANSMIT_FILE_BUFFERS = ^TRANSMIT_FILE_BUFFERS;
+ {$EXTERNALSYM LPTRANSMIT_FILE_BUFFERS}
+ TTransmitFileBuffers = TRANSMIT_FILE_BUFFERS;
+ PTransmitFileBuffers = LPTRANSMIT_FILE_BUFFERS;
+
+const
+ TF_DISCONNECT = $01;
+ {$EXTERNALSYM TF_DISCONNECT}
+ TF_REUSE_SOCKET = $02;
+ {$EXTERNALSYM TF_REUSE_SOCKET}
+ TF_WRITE_BEHIND = $04;
+ {$EXTERNALSYM TF_WRITE_BEHIND}
+ TF_USE_DEFAULT_WORKER = $00;
+ {$EXTERNALSYM TF_USE_DEFAULT_WORKER}
+ TF_USE_SYSTEM_THREAD = $10;
+ {$EXTERNALSYM TF_USE_SYSTEM_THREAD}
+ TF_USE_KERNEL_APC = $20;
+ {$EXTERNALSYM TF_USE_KERNEL_APC}
+
+function TransmitFile(hSocket: TSocket; hFile: HANDLE; nNumberOfBytesToWrite,
+ nNumberOfBytesPerSend: DWORD; lpOverlapped: POVERLAPPED;
+ lpTransmitBuffers: LPTRANSMIT_FILE_BUFFERS; dwReserved: DWORD): BOOL; stdcall;
+{$EXTERNALSYM TransmitFile}
+
+function AcceptEx(sListenSocket, sAcceptSocket: TSocket; lpOutputBuffer: LPVOID;
+ dwReceiveDataLength, dwLocalAddressLength, dwRemoteAddressLength: DWORD;
+ var lpdwBytesReceived: DWORD; lpOverlapped: POVERLAPPED): BOOL; stdcall;
+{$EXTERNALSYM AcceptEx}
+
+procedure GetAcceptExSockaddrs(lpOutputBuffer: LPVOID; dwReceiveDataLength,
+ dwLocalAddressLength, dwRemoteAddressLength: DWORD; var LocalSockaddr: LPSOCKADDR;
+ var LocalSockaddrLength: Integer; var RemoteSockaddr: LPSOCKADDR;
+ var RemoteSockaddrLength: Integer); stdcall;
+{$EXTERNALSYM GetAcceptExSockaddrs}
+
+//
+// "QueryInterface" versions of the above APIs.
+//
+
+type
+ LPFN_TRANSMITFILE = function(hSocket: TSocket; hFile: HANDLE; nNumberOfBytesToWrite,
+ nNumberOfBytesPerSend: DWORD; lpOverlapped: POVERLAPPED;
+ lpTransmitBuffers: LPTRANSMIT_FILE_BUFFERS; dwReserved: DWORD): BOOL; stdcall;
+ {$EXTERNALSYM LPFN_TRANSMITFILE}
+ TFnTransmitFile = LPFN_TRANSMITFILE;
+
+const
+ WSAID_TRANSMITFILE: TGUID = (
+ D1:$b5367df0; D2:$cbac; D3:$11cf; D4:($95, $ca, $00, $80, $5f, $48, $a1, $92));
+ {$EXTERNALSYM WSAID_TRANSMITFILE}
+
+type
+ LPFN_ACCEPTEX = function(sListenSocket, sAcceptSocket: TSocket; lpOutputBuffer: LPVOID;
+ dwReceiveDataLength, dwLocalAddressLength, dwRemoteAddressLength: DWORD;
+ var lpdwBytesReceived: DWORD; lpOverlapped: POVERLAPPED): BOOL; stdcall;
+ {$EXTERNALSYM LPFN_ACCEPTEX}
+ TFnAcceptEx = LPFN_ACCEPTEX;
+
+const
+ WSAID_ACCEPTEX: TGUID = (
+ D1:$b5367df1; D2:$cbac; D3:$11cf; D4:($95, $ca, $00, $80, $5f, $48, $a1, $92));
+ {$EXTERNALSYM WSAID_ACCEPTEX}
+
+type
+ LPFN_GETACCEPTEXSOCKADDRS = procedure(lpOutputBuffer: LPVOID; dwReceiveDataLength,
+ dwLocalAddressLength, dwRemoteAddressLength: DWORD; var LocalSockaddr: LPSOCKADDR;
+ var LocalSockaddrLength: Integer; var RemoteSockaddr: LPSOCKADDR;
+ var RemoteSockaddrLength: Integer); stdcall;
+ {$EXTERNALSYM LPFN_GETACCEPTEXSOCKADDRS}
+ TFnGetAcceptExSockAddrs = LPFN_GETACCEPTEXSOCKADDRS;
+
+const
+ WSAID_GETACCEPTEXSOCKADDRS: TGUID = (
+ D1: $b5367df2; D2:$cbac; D3:$11cf; D4:($95, $ca, $00, $80, $5f, $48, $a1, $92));
+ {$EXTERNALSYM WSAID_GETACCEPTEXSOCKADDRS}
+
+ TP_ELEMENT_MEMORY = 1;
+ {$EXTERNALSYM TP_ELEMENT_MEMORY}
+ TP_ELEMENT_FILE = 2;
+ {$EXTERNALSYM TP_ELEMENT_FILE}
+ TP_ELEMENT_EOP = 4;
+ {$EXTERNALSYM TP_ELEMENT_EOP}
+
+type
+ _TRANSMIT_PACKETS_ELEMENT = record
+ dwElFlags: ULONG;
+ cLength: ULONG;
+ case Integer of
+ 0: (
+ nFileOffset: LARGE_INTEGER;
+ hFile: HANDLE);
+ 1: (
+ pBuffer: LPVOID);
+ end;
+ {$EXTERNALSYM _TRANSMIT_PACKETS_ELEMENT}
+ TRANSMIT_PACKETS_ELEMENT = _TRANSMIT_PACKETS_ELEMENT;
+ {$EXTERNALSYM TRANSMIT_PACKETS_ELEMENT}
+ PTRANSMIT_PACKETS_ELEMENT = ^TRANSMIT_PACKETS_ELEMENT;
+ {$EXTERNALSYM PTRANSMIT_PACKETS_ELEMENT}
+ LPTRANSMIT_PACKETS_ELEMENT = ^TRANSMIT_PACKETS_ELEMENT;
+ {$EXTERNALSYM LPTRANSMIT_PACKETS_ELEMENT}
+ TTransmitPacketElement = TRANSMIT_PACKETS_ELEMENT;
+ PTransmitPacketElement = PTRANSMIT_PACKETS_ELEMENT;
+
+const
+ TP_DISCONNECT = TF_DISCONNECT;
+ {$EXTERNALSYM TP_DISCONNECT}
+ TP_REUSE_SOCKET = TF_REUSE_SOCKET;
+ {$EXTERNALSYM TP_REUSE_SOCKET}
+ TP_USE_DEFAULT_WORKER = TF_USE_DEFAULT_WORKER;
+ {$EXTERNALSYM TP_USE_DEFAULT_WORKER}
+ TP_USE_SYSTEM_THREAD = TF_USE_SYSTEM_THREAD;
+ {$EXTERNALSYM TP_USE_SYSTEM_THREAD}
+ TP_USE_KERNEL_APC = TF_USE_KERNEL_APC;
+ {$EXTERNALSYM TP_USE_KERNEL_APC}
+
+type
+ LPFN_TRANSMITPACKETS = function(Socket: TSocket; lpPacketArray: LPTRANSMIT_PACKETS_ELEMENT; ElementCount: DWORD;
+ nSendSize: DWORD; lpOverlapped: LPOVERLAPPED; dwFlags: DWORD): BOOL; stdcall;
+ {$EXTERNALSYM LPFN_TRANSMITPACKETS}
+
+const
+ WSAID_TRANSMITPACKETS: TGUID = (
+ D1: $d9689da0; D2:$1f90; D3:$11d3; D4:($99, $71, $00, $c0, $4f, $68, $c8, $76));
+ {$EXTERNALSYM WSAID_TRANSMITPACKETS}
+
+type
+ LPFN_CONNECTEX = function(s: TSocket; name: PSockAddr; namelen: Integer; lpSendBuffer: PVOID; dwSendDataLength: DWORD;
+ lpdwBytesSent: LPDWORD; lpOverlapped: LPOVERLAPPED): BOOL; stdcall;
+ {$EXTERNALSYM LPFN_CONNECTEX}
+
+const
+ WSAID_CONNECTEX: TGUID = (
+ D1: $25a207b9; D2:$ddf3; D3:$4660; D4:($8e, $e9, $76, $e5, $8c, $74, $06, $3e));
+ {$EXTERNALSYM WSAID_CONNECTEX}
+
+type
+ LPFN_DISCONNECTEX = function(s: TSocket; lpOverlapped: LPOVERLAPPED; dwFlags: DWORD; dwReserved: DWORD): BOOL; stdcall;
+ {$EXTERNALSYM LPFN_DISCONNECTEX}
+
+const
+ WSAID_DISCONNECTEX: TGUID = (
+ D1: $7fda2e11; D2:$8630; D3:$436f; D4:($a0, $31, $f5, $36, $a6, $ee, $c1, $57));
+ {$EXTERNALSYM WSAID_DISCONNECTEX}
+
+ DE_REUSE_SOCKET = TF_REUSE_SOCKET;
+ {$EXTERNALSYM DE_REUSE_SOCKET}
+
+//
+// Network-location awareness -- Name registration values for use
+// with WSASetService and other structures.
+//
+
+// {6642243A-3BA8-4aa6-BAA5-2E0BD71FDD83}
+
+ NLA_NAMESPACE_GUID: TGUID = (
+ D1: $6642243a; D2:$3ba8; D3:$4aa6; D4:($ba, $a5, $2e, $0b, $d7, $1f, $dd, $83));
+ {$EXTERNALSYM NLA_NAMESPACE_GUID}
+
+// {6642243A-3BA8-4aa6-BAA5-2E0BD71FDD83}
+
+ NLA_SERVICE_CLASS_GUID: TGUID = (
+ D1: $37e515; D2:$b5c9; D3:$4a43; D4:($ba, $da, $8b, $48, $a8, $7a, $d2, $39));
+ {$EXTERNALSYM NLA_SERVICE_CLASS_GUID}
+
+ NLA_ALLUSERS_NETWORK = $00000001;
+ {$EXTERNALSYM NLA_ALLUSERS_NETWORK}
+ NLA_FRIENDLY_NAME = $00000002;
+ {$EXTERNALSYM NLA_FRIENDLY_NAME}
+
+type
+ _NLA_BLOB_DATA_TYPE = (
+ NLA_RAW_DATA,
+ NLA_INTERFACE,
+ NLA_802_1X_LOCATION,
+ NLA_CONNECTIVITY,
+ NLA_ICS);
+ {$EXTERNALSYM _NLA_BLOB_DATA_TYPE}
+ NLA_BLOB_DATA_TYPE = _NLA_BLOB_DATA_TYPE;
+ {$EXTERNALSYM NLA_BLOB_DATA_TYPE}
+ PNLA_BLOB_DATA_TYPE = ^NLA_BLOB_DATA_TYPE;
+ {$EXTERNALSYM PNLA_BLOB_DATA_TYPE}
+ TNlaBlobDataType = NLA_BLOB_DATA_TYPE;
+ PNlaBlobDataType = PNLA_BLOB_DATA_TYPE;
+
+ _NLA_CONNECTIVITY_TYPE = (
+ NLA_NETWORK_AD_HOC,
+ NLA_NETWORK_MANAGED,
+ NLA_NETWORK_UNMANAGED,
+ NLA_NETWORK_UNKNOWN);
+ {$EXTERNALSYM _NLA_CONNECTIVITY_TYPE}
+ NLA_CONNECTIVITY_TYPE = _NLA_CONNECTIVITY_TYPE;
+ {$EXTERNALSYM NLA_CONNECTIVITY_TYPE}
+ PNLA_CONNECTIVITY_TYPE = ^NLA_CONNECTIVITY_TYPE;
+ {$EXTERNALSYM PNLA_CONNECTIVITY_TYPE}
+ TNlaConnectivityType = NLA_CONNECTIVITY_TYPE;
+ PNlaConnectivityType = PNLA_CONNECTIVITY_TYPE;
+
+ _NLA_INTERNET = (
+ NLA_INTERNET_UNKNOWN,
+ NLA_INTERNET_NO,
+ NLA_INTERNET_YES);
+ {$EXTERNALSYM _NLA_INTERNET}
+ NLA_INTERNET = _NLA_INTERNET;
+ {$EXTERNALSYM NLA_INTERNET}
+ PNLA_INTERNET = ^NLA_INTERNET;
+ {$EXTERNALSYM PNLA_INTERNET}
+ TNlaInternet = NLA_INTERNET;
+ PNlaInternet = PNLA_INTERNET;
+
+ _NLA_BLOB = record
+ header: record
+ type_: NLA_BLOB_DATA_TYPE;
+ dwSize: DWORD;
+ nextOffset: DWORD;
+ end;
+ case Integer of
+ 0: (
+ // header.type -> NLA_RAW_DATA
+ rawData: array [0..0] of CHAR);
+ 1: (
+ // header.type -> NLA_INTERFACE
+ dwType: DWORD;
+ dwSpeed: DWORD;
+ adapterName: array [0..0] of CHAR);
+ 2: (
+ // header.type -> NLA_802_1X_LOCATION
+ information: array [0..0] of CHAR);
+ 3: (
+ // header.type -> NLA_CONNECTIVITY
+ type_: NLA_CONNECTIVITY_TYPE;
+ internet: NLA_INTERNET);
+ 4: (
+ // header.type -> NLA_ICS
+ remote: record
+ speed: DWORD;
+ type_: DWORD;
+ state: DWORD;
+ machineName: array [0..255] of WCHAR;
+ sharedAdapterName: array [0..255] of WCHAR;
+ end);
+ end;
+ {$EXTERNALSYM _NLA_BLOB}
+ NLA_BLOB = _NLA_BLOB;
+ {$EXTERNALSYM NLA_BLOB}
+ PNLA_BLOB = ^NLA_BLOB;
+ {$EXTERNALSYM PNLA_BLOB}
+ LPNLA_BLOB = ^NLA_BLOB;
+ {$EXTERNALSYM LPNLA_BLOB}
+ TNlaBlob = NLA_BLOB;
+ PNlaBlob = PNLA_BLOB;
+
+ _WSAMSG = record
+ name: LPSOCKADDR; // Remote address
+ namelen: INT; // Remote address length
+ lpBuffers: LPWSABUF; // Data buffer array
+ dwBufferCount: DWORD; // Number of elements in the array
+ Control: WSABUF; // Control buffer
+ dwFlags: DWORD; // Flags
+ end;
+ {$EXTERNALSYM _WSAMSG}
+ WSAMSG = _WSAMSG;
+ {$EXTERNALSYM WSAMSG}
+ PWSAMSG = ^WSAMSG;
+ {$EXTERNALSYM PWSAMSG}
+ LPWSAMSG = ^WSAMSG;
+ {$EXTERNALSYM LPWSAMSG}
+ TWsaMsg = WSAMSG;
+
+//
+// Layout of ancillary data objects in the control buffer
+//
+
+ _WSACMSGHDR = record
+ cmsg_len: SIZE_T;
+ cmsg_level: INT;
+ cmsg_type: INT;
+ // followed by UCHAR cmsg_data[]
+ end;
+ {$EXTERNALSYM _WSACMSGHDR}
+ WSACMSGHDR = _WSACMSGHDR;
+ {$EXTERNALSYM WSACMSGHDR}
+ PWSACMSGHDR = ^WSACMSGHDR;
+ {$EXTERNALSYM PWSACMSGHDR}
+ LPWSACMSGHDR = ^WSACMSGHDR;
+ {$EXTERNALSYM LPWSACMSGHDR}
+ TWsaCMsgHdr = WSACMSGHDR;
+
+//
+// Alignment macros for header and data members of
+// the control buffer.
+//
+
+{ TODO
+#define WSA_CMSGHDR_ALIGN(length) \
+ ( ((length) + TYPE_ALIGNMENT(WSACMSGHDR)-1) & \
+ (~(TYPE_ALIGNMENT(WSACMSGHDR)-1)) ) \
+
+#define WSA_CMSGDATA_ALIGN(length) \
+ ( ((length) + MAX_NATURAL_ALIGNMENT-1) & \
+ (~(MAX_NATURAL_ALIGNMENT-1)) )
+}
+
+//
+// WSA_CMSG_FIRSTHDR
+//
+// Returns a pointer to the first ancillary data object,
+// or a null pointer if there is no ancillary data in the
+// control buffer of the WSAMSG structure.
+//
+// LPCMSGHDR
+// WSA_CMSG_FIRSTHDR (
+// LPWSAMSG msg
+// );
+//
+
+(* TODO
+#define WSA_CMSG_FIRSTHDR(msg) \
+ ( ((msg)->Control.len >= sizeof(WSACMSGHDR)) \
+ ? (LPWSACMSGHDR)(msg)->Control.buf \
+ : (LPWSACMSGHDR)NULL )
+*)
+
+//
+// WSA_CMSG_NXTHDR
+//
+// Returns a pointer to the next ancillary data object,
+// or a null if there are no more data objects.
+//
+// LPCMSGHDR
+// WSA_CMSG_NEXTHDR (
+// LPWSAMSG msg,
+// LPWSACMSGHDR cmsg
+// );
+//
+
+{ TODO
+#define WSA_CMSG_NXTHDR(msg, cmsg) \
+ ( ((cmsg) == NULL) \
+ ? WSA_CMSG_FIRSTHDR(msg) \
+ : ( ( ((u_char *)(cmsg) + \
+ WSA_CMSGHDR_ALIGN((cmsg)->cmsg_len) + \
+ sizeof(WSACMSGHDR) ) > \
+ (u_char *)((msg)->Control.buf) + \
+ (msg)->Control.len ) \
+ ? (LPWSACMSGHDR)NULL \
+ : (LPWSACMSGHDR)((u_char *)(cmsg) + \
+ WSA_CMSGHDR_ALIGN((cmsg)->cmsg_len)) ) )
+}
+
+//
+// WSA_CMSG_DATA
+//
+// Returns a pointer to the first byte of data (what is referred
+// to as the cmsg_data member though it is not defined in
+// the structure).
+//
+// u_char *
+// WSA_CMSG_DATA (
+// LPWSACMSGHDR pcmsg
+// );
+//
+
+{ TODO
+#define WSA_CMSG_DATA(cmsg) \
+ ( (u_char *)(cmsg) + WSA_CMSGDATA_ALIGN(sizeof(WSACMSGHDR)) )
+}
+
+//
+// WSA_CMSG_SPACE
+//
+// Returns total size of an ancillary data object given
+// the amount of data. Used to allocate the correct amount
+// of space.
+//
+// SIZE_T
+// WSA_CMSG_SPACE (
+// SIZE_T length
+// );
+//
+
+{ TODO
+#define WSA_CMSG_SPACE(length) \
+ (WSA_CMSGDATA_ALIGN(sizeof(WSACMSGHDR) + WSA_CMSGHDR_ALIGN(length)))
+}
+
+//
+// WSA_CMSG_LEN
+//
+// Returns the value to store in cmsg_len given the amount of data.
+//
+// SIZE_T
+// WSA_CMSG_LEN (
+// SIZE_T length
+// );
+//
+
+{ TODO
+#define WSA_CMSG_LEN(length) \
+ (WSA_CMSGDATA_ALIGN(sizeof(WSACMSGHDR)) + length)
+}
+
+//
+// Definition for flags member of the WSAMSG structure
+// This is in addition to other MSG_xxx flags defined
+// for recv/recvfrom/send/sendto.
+//
+
+const
+ MSG_TRUNC = $0100;
+ {$EXTERNALSYM MSG_TRUNC}
+ MSG_CTRUNC = $0200;
+ {$EXTERNALSYM MSG_CTRUNC}
+ MSG_BCAST = $0400;
+ {$EXTERNALSYM MSG_BCAST}
+ MSG_MCAST = $0800;
+ {$EXTERNALSYM MSG_MCAST}
+
+type
+ LPFN_WSARECVMSG = function(s: TSocket; lpMsg: LPWSAMSG; lpdwNumberOfBytesRecvd: LPDWORD; lpOverlapped: LPWSAOVERLAPPED;
+ lpCompletionRoutine: LPWSAOVERLAPPED_COMPLETION_ROUTINE): INT; stdcall;
+ {$EXTERNALSYM LPFN_WSARECVMSG}
+
+const
+ WSAID_WSARECVMSG: TGUID = (
+ D1: $f689d7c8; D2:$6f1f; D3:$436b; D4:($8a, $53, $e5, $4f, $e3, $51, $c3, $22));
+ {$EXTERNALSYM WSAID_WSARECVMSG}
+
+implementation
+
+const
+ mswsocklib = 'mswsock.dll';
+
+{$IFDEF DYNAMIC_LINK}
+
+var
+ _WSARecvEx: Pointer;
+
+function WSARecvEx;
+begin
+ GetProcedureAddress(_WSARecvEx, mswsocklib, 'WSARecvEx');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WSARecvEx]
+ end;
+end;
+
+var
+ _TransmitFile: Pointer;
+
+function TransmitFile;
+begin
+ GetProcedureAddress(_TransmitFile, mswsocklib, 'TransmitFile');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_TransmitFile]
+ end;
+end;
+
+var
+ _AcceptEx: Pointer;
+
+function AcceptEx;
+begin
+ GetProcedureAddress(_AcceptEx, mswsocklib, 'AcceptEx');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_AcceptEx]
+ end;
+end;
+
+var
+ _GetAcceptExSockaddrs: Pointer;
+
+procedure GetAcceptExSockaddrs;
+begin
+ GetProcedureAddress(_GetAcceptExSockaddrs, mswsocklib, 'GetAcceptExSockaddrs');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetAcceptExSockaddrs]
+ end;
+end;
+
+{$ELSE}
+
+function WSARecvEx; external mswsocklib name 'WSARecvEx';
+function TransmitFile; external mswsocklib name 'TransmitFile';
+function AcceptEx; external mswsocklib name 'AcceptEx';
+procedure GetAcceptExSockaddrs; external mswsocklib name 'GetAcceptExSockaddrs';
+
+{$ENDIF DYNAMIC_LINK}
+
+end.
diff --git a/packages/extra/winunits/jwanative.pas b/packages/extra/winunits/jwanative.pas
index 5dc39d4943..7ed0f40d14 100644
--- a/packages/extra/winunits/jwanative.pas
+++ b/packages/extra/winunits/jwanative.pas
@@ -1,2993 +1,2993 @@
-// Interface unit for the Windows NT Native API
-// Copyright (C) 1999, 2000 Marcel van Brakel
-
-// $Id: jwanative.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaNative;
-
-interface
-
-uses
- JwaWinBase, JwaWinNT, JwaWinType;
-
-{$WEAKPACKAGEUNIT}
-{$I jediapilib.inc}
-
-const
- ntdll = 'ntdll.dll';
-
-//------------------------------------------------------------------------------
-
-// Temporaries from NTDDK.H to be removed when fully converted.
-
-type
- _CLIENT_ID = record
- UniqueProcess: HANDLE;
- UniqueThread: HANDLE;
- end;
- CLIENT_ID = _CLIENT_ID;
- PCLIENT_ID = ^CLIENT_ID;
- TClientID = CLIENT_ID;
- PClientID = ^TClientID;
-
- KPRIORITY = LONG;
-
- _KWAIT_REASON = (
- Executive,
- FreePage,
- PageIn,
- PoolAllocation,
- DelayExecution,
- Suspended,
- UserRequest,
- WrExecutive,
- WrFreePage,
- WrPageIn,
- WrPoolAllocation,
- WrDelayExecution,
- WrSuspended,
- WrUserRequest,
- WrEventPair,
- WrQueue,
- WrLpcReceive,
- WrLpcReply,
- WrVirtualMemory,
- WrPageOut,
- WrRendezvous,
- Spare2,
- Spare3,
- Spare4,
- Spare5,
- Spare6,
- WrKernel,
- MaximumWaitReason);
- KWAIT_REASON = _KWAIT_REASON;
-
- _VM_COUNTERS = record
- PeakVirtualSize: SIZE_T;
- VirtualSize: SIZE_T;
- PageFaultCount: ULONG;
- PeakWorkingSetSize: SIZE_T;
- WorkingSetSize: SIZE_T;
- QuotaPeakPagedPoolUsage: SIZE_T;
- QuotaPagedPoolUsage: SIZE_T;
- QuotaPeakNonPagedPoolUsage: SIZE_T;
- QuotaNonPagedPoolUsage: SIZE_T;
- PagefileUsage: SIZE_T;
- PeakPagefileUsage: SIZE_T;
- end;
- VM_COUNTERS = _VM_COUNTERS;
- PVM_COUNTERS = ^VM_COUNTERS;
-
-const
- NonPagedPool = 0;
- PagedPool = 1;
- NonPagedPoolMustSucceed = 2;
- DontUseThisType = 3;
- NonPagedPoolCacheAligned = 4;
- PagedPoolCacheAligned = 5;
- NonPagedPoolCacheAlignedMustS = 6;
- MaxPoolType = 7;
- NonPagedPoolSession = 32;
- PagedPoolSession = NonPagedPoolSession + 1;
- NonPagedPoolMustSucceedSession = PagedPoolSession + 1;
- DontUseThisTypeSession = NonPagedPoolMustSucceedSession + 1;
- NonPagedPoolCacheAlignedSession = DontUseThisTypeSession + 1;
- PagedPoolCacheAlignedSession = NonPagedPoolCacheAlignedSession + 1;
- NonPagedPoolCacheAlignedMustSSession = PagedPoolCacheAlignedSession + 1;
-
-type
- POOL_TYPE = NonPagedPool..NonPagedPoolCacheAlignedMustSSession;
-
- _IO_STATUS_BLOCK = record
- //union {
- Status: NTSTATUS;
- // PVOID Pointer;
- //}
- Information: ULONG_PTR;
- end;
- IO_STATUS_BLOCK = _IO_STATUS_BLOCK;
- PIO_STATUS_BLOCK = ^IO_STATUS_BLOCK;
-
-const
- ViewShare = 1;
- ViewUnmap = 2;
-
-type
- SECTION_INHERIT = ViewShare..ViewUnmap;
-
- _THREADINFOCLASS = (
- ThreadBasicInformation,
- ThreadTimes,
- ThreadPriority,
- ThreadBasePriority,
- ThreadAffinityMask,
- ThreadImpersonationToken,
- ThreadDescriptorTableEntry,
- ThreadEnableAlignmentFaultFixup,
- ThreadEventPair_Reusable,
- ThreadQuerySetWin32StartAddress,
- ThreadZeroTlsCell,
- ThreadPerformanceCount,
- ThreadAmILastThread,
- ThreadIdealProcessor,
- ThreadPriorityBoost,
- ThreadSetTlsArrayAddress,
- ThreadIsIoPending,
- ThreadHideFromDebugger,
- MaxThreadInfoClass);
- THREADINFOCLASS = _THREADINFOCLASS;
-
- KAFFINITY = ULONG;
- PKAFFINITY = ^KAFFINITY;
-
- PKNORMAL_ROUTINE = procedure(NormalContext, SystemArgument1, SystemArgument2: PVOID); stdcall;
-
- _PROCESSINFOCLASS = (
- ProcessBasicInformation,
- ProcessQuotaLimits,
- ProcessIoCounters,
- ProcessVmCounters,
- ProcessTimes,
- ProcessBasePriority,
- ProcessRaisePriority,
- ProcessDebugPort,
- ProcessExceptionPort,
- ProcessAccessToken,
- ProcessLdtInformation,
- ProcessLdtSize,
- ProcessDefaultHardErrorMode,
- ProcessIoPortHandlers, // Note: this is kernel mode only
- ProcessPooledUsageAndLimits,
- ProcessWorkingSetWatch,
- ProcessUserModeIOPL,
- ProcessEnableAlignmentFaultFixup,
- ProcessPriorityClass,
- ProcessWx86Information,
- ProcessHandleCount,
- ProcessAffinityMask,
- ProcessPriorityBoost,
- ProcessDeviceMap,
- ProcessSessionInformation,
- ProcessForegroundInformation,
- ProcessWow64Information,
- MaxProcessInfoClass);
- PROCESSINFOCLASS = _PROCESSINFOCLASS;
-
- _KPROFILE_SOURCE = (
- ProfileTime,
- ProfileAlignmentFixup,
- ProfileTotalIssues,
- ProfilePipelineDry,
- ProfileLoadInstructions,
- ProfilePipelineFrozen,
- ProfileBranchInstructions,
- ProfileTotalNonissues,
- ProfileDcacheMisses,
- ProfileIcacheMisses,
- ProfileCacheMisses,
- ProfileBranchMispredictions,
- ProfileStoreInstructions,
- ProfileFpInstructions,
- ProfileIntegerInstructions,
- Profile2Issue,
- Profile3Issue,
- Profile4Issue,
- ProfileSpecialInstructions,
- ProfileTotalCycles,
- ProfileIcacheIssues,
- ProfileDcacheAccesses,
- ProfileMemoryBarrierCycles,
- ProfileLoadLinkedIssues,
- ProfileMaximum);
- KPROFILE_SOURCE = _KPROFILE_SOURCE;
-
- PIO_APC_ROUTINE = procedure(ApcContext: PVOID; IoStatusBlock: PIO_STATUS_BLOCK; Reserved: ULONG); stdcall;
-
- _FILE_FULL_EA_INFORMATION = record
- NextEntryOffset: ULONG;
- Flags: UCHAR;
- EaNameLength: UCHAR;
- EaValueLength: USHORT;
- EaName: array [0..0] of CHAR;
- end;
- FILE_FULL_EA_INFORMATION = _FILE_FULL_EA_INFORMATION;
- PFILE_FULL_EA_INFORMATION = ^FILE_FULL_EA_INFORMATION;
-
- _FSINFOCLASS = (
- FileFsFiller0,
- FileFsVolumeInformation, // 1
- FileFsLabelInformation, // 2
- FileFsSizeInformation, // 3
- FileFsDeviceInformation, // 4
- FileFsAttributeInformation, // 5
- FileFsControlInformation, // 6
- FileFsFullSizeInformation, // 7
- FileFsObjectIdInformation, // 8
- FileFsMaximumInformation);
- FS_INFORMATION_CLASS = _FSINFOCLASS;
- PFS_INFORMATION_CLASS = ^FS_INFORMATION_CLASS;
-
- UUID = GUID;
-
- _FILE_BASIC_INFORMATION = record
- CreationTime: LARGE_INTEGER;
- LastAccessTime: LARGE_INTEGER;
- LastWriteTime: LARGE_INTEGER;
- ChangeTime: LARGE_INTEGER;
- FileAttributes: ULONG;
- end;
- FILE_BASIC_INFORMATION = _FILE_BASIC_INFORMATION;
- PFILE_BASIC_INFORMATION = ^FILE_BASIC_INFORMATION;
-
- _FILE_NETWORK_OPEN_INFORMATION = record
- CreationTime: LARGE_INTEGER;
- LastAccessTime: LARGE_INTEGER;
- LastWriteTime: LARGE_INTEGER;
- ChangeTime: LARGE_INTEGER;
- AllocationSize: LARGE_INTEGER;
- EndOfFile: LARGE_INTEGER;
- FileAttributes: ULONG;
- end;
- FILE_NETWORK_OPEN_INFORMATION = _FILE_NETWORK_OPEN_INFORMATION;
- PFILE_NETWORK_OPEN_INFORMATION = ^FILE_NETWORK_OPEN_INFORMATION;
-
- _FILE_INFORMATION_CLASS = (
- FileFiller0,
- FileDirectoryInformation, // 1
- FileFullDirectoryInformation, // 2
- FileBothDirectoryInformation, // 3
- FileBasicInformation, // 4 wdm
- FileStandardInformation, // 5 wdm
- FileInternalInformation, // 6
- FileEaInformation, // 7
- FileAccessInformation, // 8
- FileNameInformation, // 9
- FileRenameInformation, // 10
- FileLinkInformation, // 11
- FileNamesInformation, // 12
- FileDispositionInformation, // 13
- FilePositionInformation, // 14 wdm
- FileFullEaInformation, // 15
- FileModeInformation, // 16
- FileAlignmentInformation, // 17
- FileAllInformation, // 18
- FileAllocationInformation, // 19
- FileEndOfFileInformation, // 20 wdm
- FileAlternateNameInformation, // 21
- FileStreamInformation, // 22
- FilePipeInformation, // 23
- FilePipeLocalInformation, // 24
- FilePipeRemoteInformation, // 25
- FileMailslotQueryInformation, // 26
- FileMailslotSetInformation, // 27
- FileCompressionInformation, // 28
- FileObjectIdInformation, // 29
- FileCompletionInformation, // 30
- FileMoveClusterInformation, // 31
- FileQuotaInformation, // 32
- FileReparsePointInformation, // 33
- FileNetworkOpenInformation, // 34
- FileAttributeTagInformation, // 35
- FileTrackingInformation, // 36
- FileMaximumInformation);
- FILE_INFORMATION_CLASS = _FILE_INFORMATION_CLASS;
- PFILE_INFORMATION_CLASS = ^FILE_INFORMATION_CLASS;
-
- _FILE_STANDARD_INFORMATION = record
- AllocationSize: LARGE_INTEGER;
- EndOfFile: LARGE_INTEGER;
- NumberOfLinks: ULONG;
- DeletePending: ByteBool;
- Directory: ByteBool;
- end;
- FILE_STANDARD_INFORMATION = _FILE_STANDARD_INFORMATION;
- PFILE_STANDARD_INFORMATION = ^FILE_STANDARD_INFORMATION;
-
- _FILE_POSITION_INFORMATION = record
- CurrentByteOffset: LARGE_INTEGER;
- end;
- FILE_POSITION_INFORMATION = _FILE_POSITION_INFORMATION;
- PFILE_POSITION_INFORMATION = ^FILE_POSITION_INFORMATION;
-
- _FILE_ALIGNMENT_INFORMATION = record
- AlignmentRequirement: ULONG;
- end;
- FILE_ALIGNMENT_INFORMATION = _FILE_ALIGNMENT_INFORMATION;
- PFILE_ALIGNMENT_INFORMATION = ^FILE_ALIGNMENT_INFORMATION;
-
- _KEY_SET_INFORMATION_CLASS = (KeyWriteTimeInformation);
- KEY_SET_INFORMATION_CLASS = _KEY_SET_INFORMATION_CLASS;
-
- _KEY_INFORMATION_CLASS = (
- KeyBasicInformation,
- KeyNodeInformation,
- KeyFullInformation,
- KeyNameInformation);
- KEY_INFORMATION_CLASS = _KEY_INFORMATION_CLASS;
-
- _KEY_VALUE_INFORMATION_CLASS = (
- KeyValueBasicInformation,
- KeyValueFullInformation,
- KeyValuePartialInformation,
- KeyValueFullInformationAlign64,
- KeyValuePartialInformationAlign64);
- KEY_VALUE_INFORMATION_CLASS = _KEY_VALUE_INFORMATION_CLASS;
-
- _KEY_VALUE_ENTRY = record
- ValueName: PUNICODE_STRING;
- DataLength: ULONG;
- DataOffset: ULONG;
- Type_: ULONG;
- end;
- KEY_VALUE_ENTRY = _KEY_VALUE_ENTRY;
- PKEY_VALUE_ENTRY = ^KEY_VALUE_ENTRY;
-
- _DEVICE_POWER_STATE = (
- PowerDeviceUnspecified,
- PowerDeviceD0,
- PowerDeviceD1,
- PowerDeviceD2,
- PowerDeviceD3,
- PowerDeviceMaximum);
- DEVICE_POWER_STATE = _DEVICE_POWER_STATE;
- PDEVICE_POWER_STATE = ^DEVICE_POWER_STATE;
-
- POWER_ACTION =(
- PowerActionNone,
- PowerActionReserved,
- PowerActionSleep,
- PowerActionHibernate,
- PowerActionShutdown,
- PowerActionShutdownReset,
- PowerActionShutdownOff,
- PowerActionWarmEject);
- PPOWER_ACTION = ^POWER_ACTION;
-
- _SYSTEM_POWER_STATE = (
- PowerSystemUnspecified,
- PowerSystemWorking,
- PowerSystemSleeping1,
- PowerSystemSleeping2,
- PowerSystemSleeping3,
- PowerSystemHibernate,
- PowerSystemShutdown,
- PowerSystemMaximum);
- SYSTEM_POWER_STATE = _SYSTEM_POWER_STATE;
- PSYSTEM_POWER_STATE = ^SYSTEM_POWER_STATE;
-
- POWER_INFORMATION_LEVEL = (
- SystemPowerPolicyAc,
- SystemPowerPolicyDc,
- VerifySystemPolicyAc,
- VerifySystemPolicyDc,
- SystemPowerCapabilities,
- SystemBatteryState,
- SystemPowerStateHandler,
- ProcessorStateHandler,
- SystemPowerPolicyCurrent,
- AdministratorPowerPolicy,
- SystemReserveHiberFile,
- ProcessorInformation,
- SystemPowerInformation);
-
- _RTL_RANGE = record
-
- //
- // The start of the range
- //
- Start: ULONGLONG; // Read only
-
- //
- // The end of the range
- //
- End_: ULONGLONG; // Read only
-
- //
- // Data the user passed in when they created the range
- //
- UserData: PVOID; // Read/Write
-
- //
- // The owner of the range
- //
- Owner: PVOID; // Read/Write
-
- //
- // User defined flags the user specified when they created the range
- //
- Attributes: UCHAR; // Read/Write
-
- //
- // Flags (RTL_RANGE_*)
- //
- Flags: UCHAR; // Read only
- end;
- RTL_RANGE = _RTL_RANGE;
- PRTL_RANGE = ^RTL_RANGE;
-
-const
- RTL_RANGE_SHARED = $01;
- RTL_RANGE_CONFLICT = $02;
-
-type
- _RTL_RANGE_LIST = record
-
- //
- // The list of ranges
- //
- ListHead: LIST_ENTRY;
-
- //
- // These always come in useful
- //
- Flags: ULONG; // use RANGE_LIST_FLAG_*
-
- //
- // The number of entries in the list
- //
- Count: ULONG;
-
- //
- // Every time an add/delete operation is performed on the list this is
- // incremented. It is checked during iteration to ensure that the list
- // hasn't changed between GetFirst/GetNext or GetNext/GetNext calls
- //
- Stamp: ULONG;
- end;
- RTL_RANGE_LIST = _RTL_RANGE_LIST;
- PRTL_RANGE_LIST = ^RTL_RANGE_LIST;
-
- _RANGE_LIST_ITERATOR = record
- RangeListHead: PLIST_ENTRY;
- MergedHead: PLIST_ENTRY;
- Current: PVOID;
- Stamp: ULONG;
- end;
- RTL_RANGE_LIST_ITERATOR = _RANGE_LIST_ITERATOR;
- PRTL_RANGE_LIST_ITERATOR = ^RTL_RANGE_LIST_ITERATOR;
-
-// End of NTDDK.H
-
-//==============================================================================
-// NT System Services
-//==============================================================================
-
-type
- _SYSTEM_INFORMATION_CLASS = (
- SystemBasicInformation,
- SystemProcessorInformation,
- SystemPerformanceInformation,
- SystemTimeOfDayInformation,
- SystemNotImplemented1,
- SystemProcessesAndThreadsInformation,
- SystemCallCounts,
- SystemConfigurationInformation,
- SystemProcessorTimes,
- SystemGlobalFlag,
- SystemNotImplemented2,
- SystemModuleInformation,
- SystemLockInformation,
- SystemNotImplemented3,
- SystemNotImplemented4,
- SystemNotImplemented5,
- SystemHandleInformation,
- SystemObjectInformation,
- SystemPagefileInformation,
- SystemInstructionEmulationCounts,
- SystemInvalidInfoClass1,
- SystemCacheInformation,
- SystemPoolTagInformation,
- SystemProcessorStatistics,
- SystemDpcInformation,
- SystemNotImplemented6,
- SystemLoadImage,
- SystemUnloadImage,
- SystemTimeAdjustment,
- SystemNotImplemented7,
- SystemNotImplemented8,
- SystemNotImplemented9,
- SystemCrashDumpInformation,
- SystemExceptionInformation,
- SystemCrashDumpStateInformation,
- SystemKernelDebuggerInformation,
- SystemContextSwitchInformation,
- SystemRegistryQuotaInformation,
- SystemLoadAndCallImage,
- SystemPrioritySeparation,
- SystemNotImplemented10,
- SystemNotImplemented11,
- SystemInvalidInfoClass2,
- SystemInvalidInfoClass3,
- SystemTimeZoneInformation,
- SystemLookasideInformation,
- SystemSetTimeSlipEvent,
- SystemCreateSession,
- SystemDeleteSession,
- SystemInvalidInfoClass4,
- SystemRangeStartInformation,
- SystemVerifierInformation,
- SystemAddVerifier,
- SystemSessionProcessesInformation);
- SYSTEM_INFORMATION_CLASS = _SYSTEM_INFORMATION_CLASS;
-
-function NtQuerySystemInformation(SystemInformationClass: SYSTEM_INFORMATION_CLASS; SystemInformation: PVOID; SystemInformationLength: ULONG; ReturnLength: PULONG): NTSTATUS; stdcall; external ntdll name 'NtQuerySystemInformation';
-function NtSetSystemInformation(SystemInformationClass: SYSTEM_INFORMATION_CLASS; SystemInformation: PVOID; SystemInformationLength: ULONG): NTSTATUS; stdcall; external ntdll name 'NtSetSystemInformation';
-
-type
- _SYSTEM_BASIC_INFORMATION = record // Information Class 0
- Unknown: ULONG;
- MaximumIncrement: ULONG;
- PhysicalPageSize: ULONG;
- NumberOfPhysicalPages: ULONG;
- LowestPhysicalPage: ULONG;
- HighestPhysicalPage: ULONG;
- AllocationGranularity: ULONG;
- LowestUserAddress: ULONG;
- HighestUserAddress: ULONG;
- ActiveProcessors: ULONG;
- NumberProcessors: UCHAR;
- end;
- SYSTEM_BASIC_INFORMATION = _SYSTEM_BASIC_INFORMATION;
- PSYSTEM_BASIC_INFORMATION = ^SYSTEM_BASIC_INFORMATION;
-
- _SYSTEM_PROCESSOR_INFORMATION = record // Information Class 1
- ProcessorArchitecture: USHORT;
- ProcessorLevel: USHORT;
- ProcessorRevision: USHORT;
- Unknown: USHORT;
- FeatureBits: ULONG;
- end;
- SYSTEM_PROCESSOR_INFORMATION = _SYSTEM_PROCESSOR_INFORMATION;
- PSYSTEM_PROCESSOR_INFORMATION = ^SYSTEM_PROCESSOR_INFORMATION;
-
- _SYSTEM_PERFORMANCE_INFORMATION = record // Information Class 2
- IdleTime: LARGE_INTEGER;
- ReadTransferCount: LARGE_INTEGER;
- WriteTransferCount: LARGE_INTEGER;
- OtherTransferCount: LARGE_INTEGER;
- ReadOperationCount: ULONG;
- WriteOperationCount: ULONG;
- OtherOperationCount: ULONG;
- AvailablePages: ULONG;
- TotalCommittedPages: ULONG;
- TotalCommitLimit: ULONG;
- PeakCommitment: ULONG;
- PageFaults: ULONG;
- WriteCopyFaults: ULONG;
- TransistionFaults: ULONG;
- Reserved1: ULONG;
- DemandZeroFaults: ULONG;
- PagesRead: ULONG;
- PageReadIos: ULONG;
- Reserved2: array [0..1] of ULONG;
- PagefilePagesWritten: ULONG;
- PagefilePageWriteIos: ULONG;
- MappedFilePagesWritten: ULONG;
- MappedFilePageWriteIos: ULONG;
- PagedPoolUsage: ULONG;
- NonPagedPoolUsage: ULONG;
- PagedPoolAllocs: ULONG;
- PagedPoolFrees: ULONG;
- NonPagedPoolAllocs: ULONG;
- NonPagedPoolFrees: ULONG;
- TotalFreeSystemPtes: ULONG;
- SystemCodePage: ULONG;
- TotalSystemDriverPages: ULONG;
- TotalSystemCodePages: ULONG;
- SmallNonPagedLookasideListAllocateHits: ULONG;
- SmallPagedLookasideListAllocateHits: ULONG;
- Reserved3: ULONG;
- MmSystemCachePage: ULONG;
- PagedPoolPage: ULONG;
- SystemDriverPage: ULONG;
- FastReadNoWait: ULONG;
- FastReadWait: ULONG;
- FastReadResourceMiss: ULONG;
- FastReadNotPossible: ULONG;
- FastMdlReadNoWait: ULONG;
- FastMdlReadWait: ULONG;
- FastMdlReadResourceMiss: ULONG;
- FastMdlReadNotPossible: ULONG;
- MapDataNoWait: ULONG;
- MapDataWait: ULONG;
- MapDataNoWaitMiss: ULONG;
- MapDataWaitMiss: ULONG;
- PinMappedDataCount: ULONG;
- PinReadNoWait: ULONG;
- PinReadWait: ULONG;
- PinReadNoWaitMiss: ULONG;
- PinReadWaitMiss: ULONG;
- CopyReadNoWait: ULONG;
- CopyReadWait: ULONG;
- CopyReadNoWaitMiss: ULONG;
- CopyReadWaitMiss: ULONG;
- MdlReadNoWait: ULONG;
- MdlReadWait: ULONG;
- MdlReadNoWaitMiss: ULONG;
- MdlReadWaitMiss: ULONG;
- ReadAheadIos: ULONG;
- LazyWriteIos: ULONG;
- LazyWritePages: ULONG;
- DataFlushes: ULONG;
- DataPages: ULONG;
- ContextSwitches: ULONG;
- FirstLevelTbFills: ULONG;
- SecondLevelTbFills: ULONG;
- SystemCalls: ULONG;
- end;
- SYSTEM_PERFORMANCE_INFORMATION = _SYSTEM_PERFORMANCE_INFORMATION;
- PSYSTEM_PERFORMANCE_INFORMATION = ^SYSTEM_PERFORMANCE_INFORMATION;
-
- _SYSTEM_TIME_OF_DAY_INFORMATION = record // Information Class 3
- BootTime: LARGE_INTEGER;
- CurrentTime: LARGE_INTEGER;
- TimeZoneBias: LARGE_INTEGER;
- CurrentTimeZoneId: ULONG;
- end;
- SYSTEM_TIME_OF_DAY_INFORMATION = _SYSTEM_TIME_OF_DAY_INFORMATION;
- PSYSTEM_TIME_OF_DAY_INFORMATION = ^SYSTEM_TIME_OF_DAY_INFORMATION;
-
- _IO_COUNTERSEX = record
- ReadOperationCount: LARGE_INTEGER;
- WriteOperationCount: LARGE_INTEGER;
- OtherOperationCount: LARGE_INTEGER;
- ReadTransferCount: LARGE_INTEGER;
- WriteTransferCount: LARGE_INTEGER;
- OtherTransferCount: LARGE_INTEGER;
- end;
- IO_COUNTERSEX = _IO_COUNTERSEX;
- PIO_COUNTERSEX = ^IO_COUNTERSEX;
-
- THREAD_STATE = (
- StateInitialized,
- StateReady,
- StateRunning,
- StateStandby,
- StateTerminated,
- StateWait,
- StateTransition,
- StateUnknown);
-
- _SYSTEM_THREADS = record
- KernelTime: LARGE_INTEGER;
- UserTime: LARGE_INTEGER;
- CreateTime: LARGE_INTEGER;
- WaitTime: ULONG;
- StartAddress: PVOID;
- ClientId: CLIENT_ID;
- Priority: KPRIORITY;
- BasePriority: KPRIORITY;
- ContextSwitchCount: ULONG;
- State: THREAD_STATE;
- WaitReason: KWAIT_REASON;
- end;
- SYSTEM_THREADS = _SYSTEM_THREADS;
- PSYSTEM_THREADS = ^SYSTEM_THREADS;
- TSystemThreads = SYSTEM_THREADS;
- PSystemThreads = PSYSTEM_THREADS;
-
- _SYSTEM_PROCESSES = record // Information Class 5
- NextEntryDelta: ULONG;
- ThreadCount: ULONG;
- Reserved1: array [0..5] of ULONG;
- CreateTime: LARGE_INTEGER;
- UserTime: LARGE_INTEGER;
- KernelTime: LARGE_INTEGER;
- ProcessName: UNICODE_STRING;
- BasePriority: KPRIORITY;
- ProcessId: ULONG;
- InheritedFromProcessId: ULONG;
- HandleCount: ULONG;
- // next two were Reserved2: array [0..1] of ULONG; thanks to Nico Bendlin
- SessionId: ULONG;
- Reserved2: ULONG;
- VmCounters: VM_COUNTERS;
- PrivatePageCount : ULONG;
- IoCounters: IO_COUNTERSEX; // Windows 2000 only
- Threads: array [0..0] of SYSTEM_THREADS;
- end;
- SYSTEM_PROCESSES = _SYSTEM_PROCESSES;
- PSYSTEM_PROCESSES = ^SYSTEM_PROCESSES;
- TSystemProcesses = SYSTEM_PROCESSES;
- PSystemProcesses = PSYSTEM_PROCESSES;
-
- _SYSTEM_CALLS_INFORMATION = record // Information Class 6
- Size: ULONG;
- NumberOfDescriptorTables: ULONG;
- NumberOfRoutinesInTable: array [0..0] of ULONG;
- // ULONG CallCounts[];
- end;
- SYSTEM_CALLS_INFORMATION = _SYSTEM_CALLS_INFORMATION;
- PSYSTEM_CALLS_INFORMATION = ^SYSTEM_CALLS_INFORMATION;
-
- _SYSTEM_CONFIGURATION_INFORMATION = record // Information Class 7
- DiskCount: ULONG;
- FloppyCount: ULONG;
- CdRomCount: ULONG;
- TapeCount: ULONG;
- SerialCount: ULONG;
- ParallelCount: ULONG;
- end;
- SYSTEM_CONFIGURATION_INFORMATION = _SYSTEM_CONFIGURATION_INFORMATION;
- PSYSTEM_CONFIGURATION_INFORMATION = ^SYSTEM_CONFIGURATION_INFORMATION;
-
- _SYSTEM_PROCESSOR_TIMES = record // Information Class 8
- IdleTime: LARGE_INTEGER;
- KernelTime: LARGE_INTEGER;
- UserTime: LARGE_INTEGER;
- DpcTime: LARGE_INTEGER;
- InterruptTime: LARGE_INTEGER;
- InterruptCount: ULONG;
- end;
- SYSTEM_PROCESSOR_TIMES = _SYSTEM_PROCESSOR_TIMES;
- PSYSTEM_PROCESSOR_TIMES = ^SYSTEM_PROCESSOR_TIMES;
-
- _SYSTEM_GLOBAL_FLAG = record // Information Class 9
- GlobalFlag: ULONG;
- end;
- SYSTEM_GLOBAL_FLAG = _SYSTEM_GLOBAL_FLAG;
- PSYSTEM_GLOBAL_FLAG = ^SYSTEM_GLOBAL_FLAG;
-
- _SYSTEM_MODULE_INFORMATION = record // Information Class 11
- Reserved: array [0..1] of ULONG;
- Base: PVOID;
- Size: ULONG;
- Flags: ULONG;
- Index: USHORT;
- Unknown: USHORT;
- LoadCount: USHORT;
- ModuleNameOffset: USHORT;
- ImageName: array [0..255] of CHAR;
- end;
- SYSTEM_MODULE_INFORMATION = _SYSTEM_MODULE_INFORMATION;
- PSYSTEM_MODULE_INFORMATION = ^SYSTEM_MODULE_INFORMATION;
- TSystemModuleInformation = SYSTEM_MODULE_INFORMATION;
- PSystemModuleInformation = PSYSTEM_MODULE_INFORMATION;
-
- _SYSTEM_LOCK_INFORMATION = record // Information Class 12
- Address: PVOID;
- Type_: USHORT;
- Reserved1: USHORT;
- ExclusiveOwnerThreadId: ULONG;
- ActiveCount: ULONG;
- ContentionCount: ULONG;
- Reserved2: array [0..1] of ULONG;
- NumberOfSharedWaiters: ULONG;
- NumberOfExclusiveWaiters: ULONG;
- end;
- SYSTEM_LOCK_INFORMATION = _SYSTEM_LOCK_INFORMATION;
- PSYSTEM_LOCK_INFORMATION = ^SYSTEM_LOCK_INFORMATION;
-
- _SYSTEM_HANDLE_INFORMATION = record // Information Class 16
- ProcessId: ULONG;
- ObjectTypeNumber: UCHAR;
- Flags: UCHAR; // 0x01 = PROTECT_FROM_CLOSE, 0x02 = INHERIT
- Handle: USHORT;
- Object_: PVOID;
- GrantedAccess: ACCESS_MASK;
- end;
- SYSTEM_HANDLE_INFORMATION = _SYSTEM_HANDLE_INFORMATION;
- PSYSTEM_HANDLE_INFORMATION = ^SYSTEM_HANDLE_INFORMATION;
-
- _SYSTEM_OBJECT_TYPE_INFORMATION = record // Information Class 17
- NextEntryOffset: ULONG;
- ObjectCount: ULONG;
- HandleCount: ULONG;
- TypeNumber: ULONG;
- InvalidAttributes: ULONG;
- GenericMapping: GENERIC_MAPPING;
- ValidAccessMask: ACCESS_MASK;
- PoolType: POOL_TYPE;
- Unknown: UCHAR;
- Name: UNICODE_STRING;
- end;
- SYSTEM_OBJECT_TYPE_INFORMATION = _SYSTEM_OBJECT_TYPE_INFORMATION;
- PSYSTEM_OBJECT_TYPE_INFORMATION = ^SYSTEM_OBJECT_TYPE_INFORMATION;
-
- _SYSTEM_OBJECT_INFORMATION = record
- NextEntryOffset: ULONG;
- Object_: PVOID;
- CreatorProcessId: ULONG;
- Unknown: USHORT;
- Flags: USHORT;
- PointerCount: ULONG;
- HandleCount: ULONG;
- PagedPoolUsage: ULONG;
- NonPagedPoolUsage: ULONG;
- ExclusiveProcessId: ULONG;
- SecurityDescriptor: PSECURITY_DESCRIPTOR;
- Name: UNICODE_STRING;
- end;
- SYSTEM_OBJECT_INFORMATION = _SYSTEM_OBJECT_INFORMATION;
- PSYSTEM_OBJECT_INFORMATION = ^SYSTEM_OBJECT_INFORMATION;
-
- _SYSTEM_PAGEFILE_INFORMATION = record // Information Class 18
- NextEntryOffset: ULONG;
- CurrentSize: ULONG;
- TotalUsed: ULONG;
- PeakUsed: ULONG;
- FileName: UNICODE_STRING;
- end;
- SYSTEM_PAGEFILE_INFORMATION = _SYSTEM_PAGEFILE_INFORMATION;
- PSYSTEM_PAGEFILE_INFORMATION = ^SYSTEM_PAGEFILE_INFORMATION;
- TSystemPageFileInformation = SYSTEM_PAGEFILE_INFORMATION;
- PSystemPageFileInformation = PSYSTEM_PAGEFILE_INFORMATION;
-
- _SYSTEM_INSTRUCTION_EMULATION_INFORMATION = record // Info Class 19
- GenericInvalidOpcode: ULONG;
- TwoByteOpcode: ULONG;
- ESprefix: ULONG;
- CSprefix: ULONG;
- SSprefix: ULONG;
- DSprefix: ULONG;
- FSPrefix: ULONG;
- GSprefix: ULONG;
- OPER32prefix: ULONG;
- ADDR32prefix: ULONG;
- INSB: ULONG;
- INSW: ULONG;
- OUTSB: ULONG;
- OUTSW: ULONG;
- PUSHFD: ULONG;
- POPFD: ULONG;
- INTnn: ULONG;
- INTO: ULONG;
- IRETD: ULONG;
- FloatingPointOpcode: ULONG;
- INBimm: ULONG;
- INWimm: ULONG;
- OUTBimm: ULONG;
- OUTWimm: ULONG;
- INB: ULONG;
- INW: ULONG;
- OUTB: ULONG;
- OUTW: ULONG;
- LOCKprefix: ULONG;
- REPNEprefix: ULONG;
- REPprefix: ULONG;
- CLI: ULONG;
- STI: ULONG;
- HLT: ULONG;
- end;
- SYSTEM_INSTRUCTION_EMULATION_INFORMATION = _SYSTEM_INSTRUCTION_EMULATION_INFORMATION;
- PSYSTEM_INSTRUCTION_EMULATION_INFORMATION = ^SYSTEM_INSTRUCTION_EMULATION_INFORMATION;
-
- _SYSTEM_CACHE_INFORMATION = record // Information Class 21
- SystemCacheWsSize: ULONG;
- SystemCacheWsPeakSize: ULONG;
- SystemCacheWsFaults: ULONG;
- SystemCacheWsMinimum: ULONG;
- SystemCacheWsMaximum: ULONG;
- TransitionSharedPages: ULONG;
- TransitionSharedPagesPeak: ULONG;
- Reserved: array [0..1] of ULONG;
- end;
- SYSTEM_CACHE_INFORMATION = _SYSTEM_CACHE_INFORMATION;
- PSYSTEM_CACHE_INFORMATION = ^SYSTEM_CACHE_INFORMATION;
-
- _SYSTEM_POOL_TAG_INFORMATION = record // Information Class 22
- Tag: array [0..3] of CHAR;
- PagedPoolAllocs: ULONG;
- PagedPoolFrees: ULONG;
- PagedPoolUsage: ULONG;
- NonPagedPoolAllocs: ULONG;
- NonPagedPoolFrees: ULONG;
- NonPagedPoolUsage: ULONG;
- end;
- SYSTEM_POOL_TAG_INFORMATION = _SYSTEM_POOL_TAG_INFORMATION;
- PSYSTEM_POOL_TAG_INFORMATION = ^SYSTEM_POOL_TAG_INFORMATION;
-
- _SYSTEM_PROCESSOR_STATISTICS = record // Information Class 23
- ContextSwitches: ULONG;
- DpcCount: ULONG;
- DpcRequestRate: ULONG;
- TimeIncrement: ULONG;
- DpcBypassCount: ULONG;
- ApcBypassCount: ULONG;
- end;
- SYSTEM_PROCESSOR_STATISTICS = _SYSTEM_PROCESSOR_STATISTICS;
- PSYSTEM_PROCESSOR_STATISTICS = ^SYSTEM_PROCESSOR_STATISTICS;
-
- _SYSTEM_DPC_INFORMATION = record // Information Class 24
- Reserved: ULONG;
- MaximumDpcQueueDepth: ULONG;
- MinimumDpcRate: ULONG;
- AdjustDpcThreshold: ULONG;
- IdealDpcRate: ULONG;
- end;
- SYSTEM_DPC_INFORMATION = _SYSTEM_DPC_INFORMATION;
- PSYSTEM_DPC_INFORMATION = ^SYSTEM_DPC_INFORMATION;
-
- _SYSTEM_LOAD_IMAGE = record // Information Class 26
- ModuleName: UNICODE_STRING;
- ModuleBase: PVOID;
- Unknown: PVOID;
- EntryPoint: PVOID;
- ExportDirectory: PVOID;
- end;
- SYSTEM_LOAD_IMAGE = _SYSTEM_LOAD_IMAGE;
- PSYSTEM_LOAD_IMAGE = ^SYSTEM_LOAD_IMAGE;
-
- _SYSTEM_UNLOAD_IMAGE = record // Information Class 27
- ModuleBase: PVOID;
- end;
- SYSTEM_UNLOAD_IMAGE = _SYSTEM_UNLOAD_IMAGE;
- PSYSTEM_UNLOAD_IMAGE = ^SYSTEM_UNLOAD_IMAGE;
-
- _SYSTEM_QUERY_TIME_ADJUSTMENT = record // Information Class 28
- TimeAdjustment: ULONG;
- MaximumIncrement: ULONG;
- TimeSynchronization: ByteBool;
- end;
- SYSTEM_QUERY_TIME_ADJUSTMENT = _SYSTEM_QUERY_TIME_ADJUSTMENT;
- PSYSTEM_QUERY_TIME_ADJUSTMENT = ^SYSTEM_QUERY_TIME_ADJUSTMENT;
-
- _SYSTEM_SET_TIME_ADJUSTMENT = record // Information Class 28
- TimeAdjustment: ULONG;
- TimeSynchronization: ByteBool;
- end;
- SYSTEM_SET_TIME_ADJUSTMENT = _SYSTEM_SET_TIME_ADJUSTMENT;
- PSYSTEM_SET_TIME_ADJUSTMENT = ^SYSTEM_SET_TIME_ADJUSTMENT;
-
- _SYSTEM_CRASH_DUMP_INFORMATION = record // Information Class 32
- CrashDumpSectionHandle: HANDLE;
- Unknown: HANDLE; // Windows 2000 only
- end;
- SYSTEM_CRASH_DUMP_INFORMATION = _SYSTEM_CRASH_DUMP_INFORMATION;
- PSYSTEM_CRASH_DUMP_INFORMATION = ^SYSTEM_CRASH_DUMP_INFORMATION;
-
- _SYSTEM_EXCEPTION_INFORMATION = record // Information Class 33
- AlignmentFixupCount: ULONG;
- ExceptionDispatchCount: ULONG;
- FloatingEmulationCount: ULONG;
- Reserved: ULONG;
- end;
- SYSTEM_EXCEPTION_INFORMATION = _SYSTEM_EXCEPTION_INFORMATION;
- PSYSTEM_EXCEPTION_INFORMATION = ^SYSTEM_EXCEPTION_INFORMATION;
-
- _SYSTEM_CRASH_STATE_INFORMATION = record // Information Class 34
- ValidCrashDump: ULONG;
- Unknown: ULONG; // Windows 2000 only
- end;
- SYSTEM_CRASH_STATE_INFORMATION = _SYSTEM_CRASH_STATE_INFORMATION;
- PSYSTEM_CRASH_STATE_INFORMATION = ^SYSTEM_CRASH_STATE_INFORMATION;
-
- _SYSTEM_KERNEL_DEBUGGER_INFORMATION = record // Information Class 35
- DebuggerEnabled: ByteBool;
- DebuggerNotPresent: ByteBool;
- end;
- SYSTEM_KERNEL_DEBUGGER_INFORMATION = _SYSTEM_KERNEL_DEBUGGER_INFORMATION;
- PSYSTEM_KERNEL_DEBUGGER_INFORMATION = ^SYSTEM_KERNEL_DEBUGGER_INFORMATION;
-
- _SYSTEM_CONTEXT_SWITCH_INFORMATION = record // Information Class 36
- ContextSwitches: ULONG;
- ContextSwitchCounters: array [0..10] of ULONG;
- end;
- SYSTEM_CONTEXT_SWITCH_INFORMATION = _SYSTEM_CONTEXT_SWITCH_INFORMATION;
- PSYSTEM_CONTEXT_SWITCH_INFORMATION = ^SYSTEM_CONTEXT_SWITCH_INFORMATION;
-
- _SYSTEM_REGISTRY_QUOTA_INFORMATION = record // Information Class 37
- RegistryQuota: ULONG;
- RegistryQuotaInUse: ULONG;
- PagedPoolSize: ULONG;
- end;
- SYSTEM_REGISTRY_QUOTA_INFORMATION = _SYSTEM_REGISTRY_QUOTA_INFORMATION;
- PSYSTEM_REGISTRY_QUOTA_INFORMATION = ^SYSTEM_REGISTRY_QUOTA_INFORMATION;
-
- _SYSTEM_LOAD_AND_CALL_IMAGE = record // Information Class 38
- ModuleName: UNICODE_STRING;
- end;
- SYSTEM_LOAD_AND_CALL_IMAGE = _SYSTEM_LOAD_AND_CALL_IMAGE;
- PSYSTEM_LOAD_AND_CALL_IMAGE = ^SYSTEM_LOAD_AND_CALL_IMAGE;
-
- _SYSTEM_PRIORITY_SEPARATION = record // Information Class 39
- PrioritySeparation: ULONG;
- end;
- SYSTEM_PRIORITY_SEPARATION = _SYSTEM_PRIORITY_SEPARATION;
- PSYSTEM_PRIORITY_SEPARATION = ^SYSTEM_PRIORITY_SEPARATION;
-
- _SYSTEM_TIME_ZONE_INFORMATION = record // Information Class 44
- Bias: LONG;
- StandardName: array [0..31] of WCHAR;
- StandardDate: SYSTEMTIME;
- StandardBias: LONG;
- DaylightName: array [0..31] of WCHAR;
- DaylightDate: SYSTEMTIME;
- DaylightBias: LONG;
- end;
- SYSTEM_TIME_ZONE_INFORMATION = _SYSTEM_TIME_ZONE_INFORMATION;
- PSYSTEM_TIME_ZONE_INFORMATION = ^SYSTEM_TIME_ZONE_INFORMATION;
-
- _SYSTEM_LOOKASIDE_INFORMATION = record // Information Class 45
- Depth: USHORT;
- MaximumDepth: USHORT;
- TotalAllocates: ULONG;
- AllocateMisses: ULONG;
- TotalFrees: ULONG;
- FreeMisses: ULONG;
- Type_: POOL_TYPE;
- Tag: ULONG;
- Size: ULONG;
- end;
- SYSTEM_LOOKASIDE_INFORMATION = _SYSTEM_LOOKASIDE_INFORMATION;
- PSYSTEM_LOOKASIDE_INFORMATION = ^SYSTEM_LOOKASIDE_INFORMATION;
-
- _SYSTEM_SET_TIME_SLIP_EVENT = record // Information Class 46
- TimeSlipEvent: HANDLE;
- end;
- SYSTEM_SET_TIME_SLIP_EVENT = _SYSTEM_SET_TIME_SLIP_EVENT;
- PSYSTEM_SET_TIME_SLIP_EVENT = ^SYSTEM_SET_TIME_SLIP_EVENT;
-
- _SYSTEM_CREATE_SESSION = record // Information Class 47
- Session: ULONG;
- end;
- SYSTEM_CREATE_SESSION = _SYSTEM_CREATE_SESSION;
- PSYSTEM_CREATE_SESSION = ^SYSTEM_CREATE_SESSION;
-
- _SYSTEM_DELETE_SESSION = record // Information Class 48
- Session: ULONG;
- end;
- SYSTEM_DELETE_SESSION = _SYSTEM_DELETE_SESSION;
- PSYSTEM_DELETE_SESSION = ^SYSTEM_DELETE_SESSION;
-
- _SYSTEM_RANGE_START_INFORMATION = record // Information Class 50
- SystemRangeStart: PVOID;
- end;
- SYSTEM_RANGE_START_INFORMATION = _SYSTEM_RANGE_START_INFORMATION;
- PSYSTEM_RANGE_START_INFORMATION = ^SYSTEM_RANGE_START_INFORMATION;
-
- _SYSTEM_POOL_BLOCK = record
- Allocated: ByteBool;
- Unknown: USHORT;
- Size: ULONG;
- Tag: array [0..3] of CHAR;
- end;
- SYSTEM_POOL_BLOCK = _SYSTEM_POOL_BLOCK;
- PSYSTEM_POOL_BLOCK = ^SYSTEM_POOL_BLOCK;
-
- _SYSTEM_POOL_BLOCKS_INFORMATION = record // Info Classes 14 and 15
- PoolSize: ULONG;
- PoolBase: PVOID;
- Unknown: USHORT;
- NumberOfBlocks: ULONG;
- PoolBlocks: array [0..0] of SYSTEM_POOL_BLOCK;
- end;
- SYSTEM_POOL_BLOCKS_INFORMATION = _SYSTEM_POOL_BLOCKS_INFORMATION;
- PSYSTEM_POOL_BLOCKS_INFORMATION = ^SYSTEM_POOL_BLOCKS_INFORMATION;
-
- _SYSTEM_MEMORY_USAGE = record
- Name: PVOID;
- Valid: USHORT;
- Standby: USHORT;
- Modified: USHORT;
- PageTables: USHORT;
- end;
- SYSTEM_MEMORY_USAGE = _SYSTEM_MEMORY_USAGE;
- PSYSTEM_MEMORY_USAGE = ^SYSTEM_MEMORY_USAGE;
-
- _SYSTEM_MEMORY_USAGE_INFORMATION = record // Info Classes 25 and 29
- Reserved: ULONG;
- EndOfData: PVOID;
- MemoryUsage: array [0..0] of SYSTEM_MEMORY_USAGE;
- end;
- SYSTEM_MEMORY_USAGE_INFORMATION = _SYSTEM_MEMORY_USAGE_INFORMATION;
- PSYSTEM_MEMORY_USAGE_INFORMATION = ^SYSTEM_MEMORY_USAGE_INFORMATION;
-
-
-function NtQuerySystemEnvironmentValue(Name: PUNICODE_STRING; Value: PVOID; ValueLength: ULONG; ReturnLength: PULONG): NTSTATUS; stdcall; external ntdll name 'NtQuerySystemEnvironmentValue';
-function NtSetSystemEnvironmentValue(Name: PUNICODE_STRING; Value: PUNICODE_STRING): NTSTATUS; stdcall;external ntdll name 'NtSetSystemEnvironmentValue';
-
-type
- _SHUTDOWN_ACTION = (
- ShutdownNoReboot,
- ShutdownReboot,
- ShutdownPowerOff);
- SHUTDOWN_ACTION = _SHUTDOWN_ACTION;
-
-function NtShutdownSystem(Action: SHUTDOWN_ACTION): NTSTATUS; stdcall;external ntdll name 'NtShutdownSystem';
-
-type
- _DEBUG_CONTROL_CODE = (
- DebugFiller0,
- DebugGetTraceInformation,
- DebugSetInternalBreakpoint,
- DebugSetSpecialCall,
- DebugClearSpecialCalls,
- DebugQuerySpecialCalls,
- DebugDbgBreakPoint);
- DEBUG_CONTROL_CODE = _DEBUG_CONTROL_CODE;
-
-function NtSystemDebugControl(ControlCode: DEBUG_CONTROL_CODE; InputBuffer: PVOID; InputBufferLength: ULONG; OutputBuffer: PVOID; OutputBufferLength: ULONG; ReturnLength: PULONG): NTSTATUS; stdcall;external ntdll name 'NtSystemDebugControl';
-
-type
- _OBJECT_INFORMATION_CLASS = (
- ObjectBasicInformation,
- ObjectNameInformation,
- ObjectTypeInformation,
- ObjectAllTypesInformation,
- ObjectHandleInformation);
- OBJECT_INFORMATION_CLASS = _OBJECT_INFORMATION_CLASS;
-
-function NtQueryObject(ObjectHandle: HANDLE; ObjectInformationClass: OBJECT_INFORMATION_CLASS; ObjectInformation: PVOID; ObjectInformationLength: ULONG; ReturnLength: PULONG): NTSTATUS; stdcall; external ntdll name 'NtQueryObject';
-function NtSetInformationObject(ObjectHandle: HANDLE; ObjectInformationClass: OBJECT_INFORMATION_CLASS; ObjectInformation: PVOID; ObjectInformationLength: ULONG): NTSTATUS; stdcall; external ntdll name 'NtSetInformationObject';
-
-type
- _OBJECT_BASIC_INFORMATION = record // Information Class 0
- Attributes: ULONG;
- GrantedAccess: ACCESS_MASK;
- HandleCount: ULONG;
- PointerCount: ULONG;
- PagedPoolUsage: ULONG;
- NonPagedPoolUsage: ULONG;
- Reserved: array [0..2] of ULONG;
- NameInformationLength: ULONG;
- TypeInformationLength: ULONG;
- SecurityDescriptorLength: ULONG;
- CreateTime: LARGE_INTEGER;
- end;
- OBJECT_BASIC_INFORMATION = _OBJECT_BASIC_INFORMATION;
- POBJECT_BASIC_INFORMATION = ^OBJECT_BASIC_INFORMATION;
-
- _OBJECT_TYPE_INFORMATION = record // Information Class 2
- Name: UNICODE_STRING;
- ObjectCount: ULONG;
- HandleCount: ULONG;
- Reserved1: array [0..3] of ULONG;
- PeakObjectCount: ULONG;
- PeakHandleCount: ULONG;
- Reserved2: array [0..3] of ULONG;
- InvalidAttributes: ULONG;
- GenericMapping: GENERIC_MAPPING;
- ValidAccess: ULONG;
- Unknown: UCHAR;
- MaintainHandleDatabase: ByteBool;
- Reserved3: array [0..1] of UCHAR;
- PoolType: POOL_TYPE;
- PagedPoolUsage: ULONG;
- NonPagedPoolUsage: ULONG;
- end;
- OBJECT_TYPE_INFORMATION = _OBJECT_TYPE_INFORMATION;
- POBJECT_TYPE_INFORMATION = ^OBJECT_TYPE_INFORMATION;
-
- _OBJECT_ALL_TYPES_INFORMATION = record // Information Class 3
- NumberOfTypes: ULONG;
- TypeInformation: OBJECT_TYPE_INFORMATION;
- end;
- OBJECT_ALL_TYPES_INFORMATION = _OBJECT_ALL_TYPES_INFORMATION;
- POBJECT_ALL_TYPES_INFORMATION = ^OBJECT_ALL_TYPES_INFORMATION;
-
- _OBJECT_HANDLE_ATTRIBUTE_INFORMATION = record // Information Class 4
- Inherit: ByteBool;
- ProtectFromClose: ByteBool;
- end;
- OBJECT_HANDLE_ATTRIBUTE_INFORMATION = _OBJECT_HANDLE_ATTRIBUTE_INFORMATION;
- POBJECT_HANDLE_ATTRIBUTE_INFORMATION = ^OBJECT_HANDLE_ATTRIBUTE_INFORMATION;
-
-function NtDuplicateObject(SourceProcessHandle: HANDLE; SourceHandle: HANDLE; TargetProcessHandle: HANDLE; TargetHandle: PHANDLE; DesiredAccess: ACCESS_MASK; Attributes: ULONG; Options: ULONG): NTSTATUS; stdcall; external ntdll name 'NtDuplicateObject';
-function NtMakeTemporaryObject(Handle: HANDLE): NTSTATUS; stdcall; external ntdll name 'NtMakeTemporaryObject';
-function NtClose(Handle: HANDLE): NTSTATUS; stdcall; external ntdll name 'NtClose';
-function NtQuerySecurityObject(Handle: HANDLE; RequestedInformation: SECURITY_INFORMATION; SecurityDescriptor: PSECURITY_DESCRIPTOR; SecurityDescriptorLength: ULONG; ReturnLength: PULONG): NTSTATUS; stdcall; external ntdll name 'NtQuerySecurityObject';
-function NtSetSecurityObject(Handle: HANDLE; SecurityInformation: SECURITY_INFORMATION; SecurityDescriptor: PSECURITY_DESCRIPTOR): NTSTATUS; stdcall; external ntdll name 'NtSetSecurityObject';
-function NtCreateDirectoryObject(DirectoryHandle: PHANDLE; DesiredAccess: ACCESS_MASK; ObjectAttributes: POBJECT_ATTRIBUTES): NTSTATUS; stdcall; external ntdll name 'NtCreateDirectoryObject';
-function NtOpenDirectoryObject(DirectoryHandle: PHANDLE; DesiredAccess: ACCESS_MASK; ObjectAttributes: POBJECT_ATTRIBUTES): NTSTATUS; stdcall; external ntdll name 'NtOpenDirectoryObject';
-function NtQueryDirectoryObject(DirectoryHandle: HANDLE; Buffer: PVOID; BufferLength: ULONG; ReturnSingleEntry: ByteBool; RestartScan: ByteBool; Context: PULONG; ReturnLength: PULONG): NTSTATUS; stdcall; external ntdll name 'NtQueryDirectoryObject';
-
-type
- _DIRECTORY_BASIC_INFORMATION = record
- ObjectName: UNICODE_STRING;
- ObjectTypeName: UNICODE_STRING;
- end;
- DIRECTORY_BASIC_INFORMATION = _DIRECTORY_BASIC_INFORMATION;
- PDIRECTORY_BASIC_INFORMATION = ^DIRECTORY_BASIC_INFORMATION;
-
-function NtCreateSymbolicLinkObject(SymbolicLinkHandle: PHANDLE; DesiredAccess: ACCESS_MASK; ObjectAttributes: POBJECT_ATTRIBUTES; TargetName: PUNICODE_STRING): NTSTATUS; stdcall; external ntdll name 'NtCreateSymbolicLinkObject';
-function NtOpenSymbolicLinkObject(SymbolicLinkHandle: PHANDLE; DesiredAccess: ACCESS_MASK; ObjectAttributes: POBJECT_ATTRIBUTES): NTSTATUS; stdcall; external ntdll name 'NtOpenSymbolicLinkObject';
-function NtQuerySymbolicLinkObject(SymbolicLinkHandle: HANDLE; TargetName: PUNICODE_STRING; ReturnLength: PULONG): NTSTATUS; stdcall; external ntdll name 'NtQuerySymbolicLinkObject';
-function NtAllocateVirtualMemory(ProcessHandle: HANDLE; BaseAddress: PPVOID; ZeroBits: ULONG; AllocationSize: PULONG; AllocationType: ULONG; Protect: ULONG): NTSTATUS; stdcall; external ntdll name 'NtAllocateVirtualMemory';
-function NtFreeVirtualMemory(ProcessHandle: HANDLE; BaseAddress: PPVOID; FreeSize: PULONG; FreeType: ULONG): NTSTATUS; stdcall; external ntdll name 'NtFreeVirtualMemory';
-
-type
- _MEMORY_INFORMATION_CLASS = (
- MemoryBasicInformation,
- MemoryWorkingSetList,
- MemorySectionName,
- MemoryBasicVlmInformation);
- MEMORY_INFORMATION_CLASS = _MEMORY_INFORMATION_CLASS;
-
-function NtQueryVirtualMemory(ProcessHandle: HANDLE; BaseAddress: PVOID; MemoryInformationClass: MEMORY_INFORMATION_CLASS; MemoryInformation: PVOID; MemoryInformationLength: ULONG; ReturnLength: PULONG): NTSTATUS; stdcall; external ntdll name 'NtQueryVirtualMemory';
-
-type
- _MEMORY_BASIC_INFORMATION = record // Information Class 0
- BaseAddress: PVOID;
- AllocationBase: PVOID;
- AllocationProtect: ULONG;
- RegionSize: ULONG;
- State: ULONG;
- Protect: ULONG;
- Type_: ULONG;
- end;
- MEMORY_BASIC_INFORMATION = _MEMORY_BASIC_INFORMATION;
- PMEMORY_BASIC_INFORMATION = ^MEMORY_BASIC_INFORMATION;
-
- _MEMORY_WORKING_SET_LIST = record // Information Class 1
- NumberOfPages: ULONG;
- WorkingSetList: array [0..0] of ULONG;
- end;
- MEMORY_WORKING_SET_LIST = _MEMORY_WORKING_SET_LIST;
- PMEMORY_WORKING_SET_LIST = ^MEMORY_WORKING_SET_LIST;
-
- _MEMORY_SECTION_NAME = record // Information Class 2
- SectionFileName: UNICODE_STRING;
- end;
- MEMORY_SECTION_NAME = _MEMORY_SECTION_NAME;
- PMEMORY_SECTION_NAME = ^MEMORY_SECTION_NAME;
-
-function NtLockVirtualMemory(ProcessHandle: HANDLE; BaseAddress: PPVOID; LockSize: PULONG; LockType: ULONG): NTSTATUS; stdcall; external ntdll name 'NtLockVirtualMemory';
-function NtUnlockVirtualMemory(ProcessHandle: HANDLE; BaseAddress: PPVOID; LockSize: PULONG; LockType: ULONG): NTSTATUS; stdcall; external ntdll name 'NtUnlockVirtualMemory';
-function NtReadVirtualMemory(ProcessHandle: HANDLE; BaseAddress: PVOID; Buffer: PVOID; BufferLength: ULONG; ReturnLength: PULONG): NTSTATUS; stdcall; external ntdll name 'NtReadVirtualMemory';
-function NtWriteVirtualMemory(ProcessHandle: HANDLE; BaseAddress: PVOID; Buffer: PVOID; BufferLength: ULONG; ReturnLength: PULONG): NTSTATUS; stdcall; external ntdll name 'NtWriteVirtualMemory';
-function NtProtectVirtualMemory(ProcessHandle: HANDLE; BaseAddress: PPVOID; ProtectSize: PULONG; NewProtect: ULONG; OldProtect: PULONG): NTSTATUS; stdcall; external ntdll name 'NtProtectVirtualMemory';
-function NtFlushVirtualMemory(ProcessHandle: HANDLE; BaseAddress: PPVOID; FlushSize: PULONG; IoStatusBlock: PIO_STATUS_BLOCK): NTSTATUS; stdcall; external ntdll name 'NtFlushVirtualMemory';
-function NtAllocateUserPhysicalPages(ProcessHandle: HANDLE; NumberOfPages: PULONG; PageFrameNumbers: PULONG): NTSTATUS; stdcall; external ntdll name 'NtAllocateUserPhysicalPages';
-function NtFreeUserPhysicalPages(ProcessHandle: HANDLE; NumberOfPages: PULONG; PageFrameNumbers: PULONG): NTSTATUS; stdcall; external ntdll name 'NtFreeUserPhysicalPages';
-function NtMapUserPhysicalPages(BaseAddress: PVOID; NumberOfPages: PULONG; PageFrameNumbers: PULONG): NTSTATUS; stdcall; external ntdll name 'NtMapUserPhysicalPages';
-function NtMapUserPhysicalPagesScatter(BaseAddresses: PPVOID; NumberOfPages: PULONG; PageFrameNumbers: PULONG): NTSTATUS; stdcall; external ntdll name 'NtMapUserPhysicalPagesScatter';
-function NtGetWriteWatch(ProcessHandle: HANDLE; Flags: ULONG; BaseAddress: PVOID; RegionSize: ULONG; Buffer: PULONG; BufferEntries: PULONG; Granularity: PULONG): NTSTATUS; stdcall; external ntdll name 'NtGetWriteWatch';
-function NtResetWriteWatch(ProcessHandle: HANDLE; BaseAddress: PVOID; RegionSize: ULONG): NTSTATUS; stdcall; external ntdll name 'NtResetWriteWatch';
-function NtCreateSection(SectionHandle: PHANDLE; DesiredAccess: ACCESS_MASK; ObjectAttributes: POBJECT_ATTRIBUTES; SectionSize: PLARGE_INTEGER; Protect: ULONG; Attributes: ULONG; FileHandle: HANDLE): NTSTATUS; stdcall; external ntdll name 'NtCreateSection';
-function NtOpenSection(SectionHandle: PHANDLE; DesiredAccess: ACCESS_MASK; ObjectAttributes: POBJECT_ATTRIBUTES): NTSTATUS; stdcall; external ntdll name 'NtOpenSection';
-
-type
- _SECTION_INFORMATION_CLASS = (
- SectionBasicInformation,
- SectionImageInformation);
- SECTION_INFORMATION_CLASS = _SECTION_INFORMATION_CLASS;
-
-function NtQuerySection(SectionHandle: HANDLE; SectionInformationClass: SECTION_INFORMATION_CLASS; SectionInformation: PVOID; SectionInformationLength: ULONG; ResultLength: PULONG): NTSTATUS; stdcall; external ntdll name 'NtQuerySection';
-
-type
- _SECTION_BASIC_INFORMATION = record // Information Class 0
- BaseAddress: PVOID;
- Attributes: ULONG;
- Size: LARGE_INTEGER;
- end;
- SECTION_BASIC_INFORMATION = _SECTION_BASIC_INFORMATION;
- PSECTION_BASIC_INFORMATION = ^SECTION_BASIC_INFORMATION;
-
- _SECTION_IMAGE_INFORMATION = record // Information Class 1
- EntryPoint: PVOID;
- Unknown1: ULONG;
- StackReserve: ULONG;
- StackCommit: ULONG;
- Subsystem: ULONG;
- MinorSubsystemVersion: USHORT;
- MajorSubsystemVersion: USHORT;
- Unknown2: ULONG;
- Characteristics: ULONG;
- ImageNumber: USHORT;
- Executable: ByteBool;
- Unknown3: UCHAR;
- Unknown4: array [0..2] of ULONG;
- end;
- SECTION_IMAGE_INFORMATION = _SECTION_IMAGE_INFORMATION;
- PSECTION_IMAGE_INFORMATION = ^SECTION_IMAGE_INFORMATION;
-
-function NtExtendSection(SectionHandle: HANDLE; SectionSize: PLARGE_INTEGER): NTSTATUS; stdcall; external ntdll name 'NtExtendSection';
-function NtMapViewOfSection(SectionHandle: HANDLE; ProcessHandle: HANDLE; BaseAddress: PPVOID; ZeroBits: ULONG; CommitSize: ULONG; SectionOffset: PLARGE_INTEGER; ViewSize: PULONG; InheritDisposition: SECTION_INHERIT; AllocationType: ULONG; Protect: ULONG): NTSTATUS; stdcall; external ntdll name 'NtMapViewOfSection';
-function NtUnmapViewOfSection(ProcessHandle: HANDLE; BaseAddress: PVOID): NTSTATUS; stdcall; external ntdll name 'NtUnmapViewOfSection';
-function NtAreMappedFilesTheSame(Address1: PVOID; Address2: PVOID): NTSTATUS; stdcall; external ntdll name 'NtAreMappedFilesTheSame';
-
-type
- _USER_STACK = record
- FixedStackBase: PVOID;
- FixedStackLimit: PVOID;
- ExpandableStackBase: PVOID;
- ExpandableStackLimit: PVOID;
- ExpandableStackBottom: PVOID;
- end;
- USER_STACK = _USER_STACK;
- PUSER_STACK = ^USER_STACK;
-
-function NtCreateThread(ThreadHandle: PHANDLE; DesiredAccess: ACCESS_MASK; ObjectAttributes: POBJECT_ATTRIBUTES; ProcessHandle: HANDLE; ClientId: PCLIENT_ID; ThreadContext: PCONTEXT; UserStack: PUSER_STACK; CreateSuspended: ByteBool): NTSTATUS; stdcall; external ntdll name 'NtCreateThread';
-function NtOpenThread(ThreadHandle: PHANDLE; DesiredAccess: ACCESS_MASK; ObjectAttributes: POBJECT_ATTRIBUTES; ClientId: PCLIENT_ID): NTSTATUS; stdcall; external ntdll name 'NtOpenThread';
-function NtTerminateThread(ThreadHandle: HANDLE; ExitStatus: NTSTATUS): NTSTATUS; stdcall; external ntdll name 'NtTerminateThread';
-function NtQueryInformationThread(ThreadHandle: HANDLE; ThreadInformationClass: THREADINFOCLASS; ThreadInformation: PVOID; ThreadInformationLength: ULONG; ReturnLength: PULONG): NTSTATUS; stdcall; external ntdll name 'NtQueryInformationThread';
-function NtSetInformationThread(ThreadHandle: HANDLE; ThreadInformationClass: THREADINFOCLASS; ThreadInformation: PVOID; ThreadInformationLength: ULONG): NTSTATUS; stdcall; external ntdll name 'NtSetInformationThread';
-
-type
- _THREAD_BASIC_INFORMATION = record // Information Class 0
- ExitStatus: NTSTATUS;
- TebBaseAddress: PNT_TIB;
- ClientId: CLIENT_ID;
- AffinityMask: KAFFINITY;
- Priority: KPRIORITY;
- BasePriority: KPRIORITY;
- end;
- THREAD_BASIC_INFORMATION = _THREAD_BASIC_INFORMATION;
- PTHREAD_BASIC_INFORMATION = ^THREAD_BASIC_INFORMATION;
-
-function NtSuspendThread(ThreadHandle: HANDLE; PreviousSuspendCount: PULONG): NTSTATUS; stdcall; external ntdll name 'NtSuspendThread';
-function NtResumeThread(ThreadHandle: HANDLE; PreviousSuspendCount: PULONG): NTSTATUS; stdcall; external ntdll name 'NtResumeThread';
-function NtGetContextThread(ThreadHandle: HANDLE; Context: PCONTEXT): NTSTATUS; stdcall; external ntdll name 'NtGetContextThread';
-function NtSetContextThread(ThreadHandle: HANDLE; Context: PCONTEXT): NTSTATUS; stdcall; external ntdll name 'NtSetContextThread';
-function NtQueueApcThread(ThreadHandle: HANDLE; ApcRoutine: PKNORMAL_ROUTINE; ApcContext: PVOID; Argument1: PVOID; Argument2: PVOID): NTSTATUS; stdcall; external ntdll name 'NtQueueApcThread';
-function NtTestAlert: NTSTATUS; stdcall; external ntdll name 'NtTestAlert';
-function NtAlertThread(ThreadHandle: HANDLE): NTSTATUS; stdcall; external ntdll name 'NtAlertThread';
-function NtAlertResumeThread(ThreadHandle: HANDLE; PreviousSuspendCount: PULONG): NTSTATUS; stdcall; external ntdll name 'NtAlertResumeThread';
-function NtRegisterThreadTerminatePort(PortHandle: HANDLE): NTSTATUS; stdcall; external ntdll name 'NtRegisterThreadTerminatePort';
-function NtImpersonateThread(ThreadHandle: HANDLE; TargetThreadHandle: HANDLE; SecurityQos: PSECURITY_QUALITY_OF_SERVICE): NTSTATUS; stdcall; external ntdll name 'NtImpersonateThread';
-function NtImpersonateAnonymousToken(ThreadHandle: HANDLE): NTSTATUS; stdcall; external ntdll name 'NtImpersonateAnonymousToken';
-function NtCreateProcess(ProcessHandle: PHANDLE; DesiredAccess: ACCESS_MASK; ObjectAttributes: POBJECT_ATTRIBUTES; InheritFromProcessHandle: HANDLE; InheritHandles: ByteBool; SectionHandle: HANDLE; DebugPort: HANDLE; ExceptionPort: HANDLE): NTSTATUS; stdcall; external ntdll name 'NtCreateProcess';
-function NtOpenProcess(ProcessHandle: PHANDLE; DesiredAccess: ACCESS_MASK; ObjectAttributes: POBJECT_ATTRIBUTES; ClientId: PCLIENT_ID): NTSTATUS; stdcall; external ntdll name 'NtOpenProcess';
-function NtTerminateProcess(ProcessHandle: HANDLE; ExitStatus: NTSTATUS): NTSTATUS; stdcall; external ntdll name 'NtTerminateProcess';
-function NtQueryInformationProcess(ProcessHandle: HANDLE; ProcessInformationClass: PROCESSINFOCLASS; ProcessInformation: PVOID; ProcessInformationLength: ULONG; ReturnLength: PULONG): NTSTATUS; stdcall; external ntdll name 'NtQueryInformationProcess';
-function NtSetInformationProcess(ProcessHandle: HANDLE; ProcessInformationClass: PROCESSINFOCLASS; ProcessInformation: PVOID; ProcessInformationLength: ULONG): NTSTATUS; stdcall; external ntdll name 'NtSetInformationProcess';
-
-type
- _PROCESS_PRIORITY_CLASS = record // Information Class 18
- Foreground: ByteBool;
- PriorityClass: UCHAR;
- end;
- PROCESS_PRIORITY_CLASS = _PROCESS_PRIORITY_CLASS;
- PPROCESS_PRIORITY_CLASS = ^PROCESS_PRIORITY_CLASS;
-
- _PROCESS_PARAMETERS = record
- AllocationSize: ULONG;
- Size: ULONG;
- Flags: ULONG;
- Zero: ULONG;
- Console: LONG;
- ProcessGroup: ULONG;
- hStdInput: HANDLE;
- hStdOutput: HANDLE;
- hStdError: HANDLE;
- CurrentDirectoryName: UNICODE_STRING;
- CurrentDirectoryHandle: HANDLE;
- DllPath: UNICODE_STRING;
- ImageFile: UNICODE_STRING;
- CommandLine: UNICODE_STRING;
- Environment: PWSTR;
- dwX: ULONG;
- dwY: ULONG;
- dwXSize: ULONG;
- dwYSize: ULONG;
- dwXCountChars: ULONG;
- dwYCountChars: ULONG;
- dwFillAttribute: ULONG;
- dwFlags: ULONG;
- wShowWindow: ULONG;
- WindowTitle: UNICODE_STRING;
- Desktop: UNICODE_STRING;
- Reserved: UNICODE_STRING;
- Reserved2: UNICODE_STRING;
- end;
- PROCESS_PARAMETERS = _PROCESS_PARAMETERS;
- PPROCESS_PARAMETERS = ^PROCESS_PARAMETERS;
- PPPROCESS_PARAMETERS = ^PPROCESS_PARAMETERS;
-
-function RtlCreateProcessParameters(ProcessParameters: PPPROCESS_PARAMETERS; ImageFile: PUNICODE_STRING; DllPath: PUNICODE_STRING; CurrentDirectory: PUNICODE_STRING; CommandLine: PUNICODE_STRING; CreationFlags: ULONG; WindowTitle: PUNICODE_STRING; Desktop: PUNICODE_STRING; Reserved: PUNICODE_STRING; Reserved2: PUNICODE_STRING): NTSTATUS; stdcall; external ntdll name 'RtlCreateProcessParameters';
-function RtlDestroyProcessParameters(ProcessParameters: PPROCESS_PARAMETERS): NTSTATUS; stdcall; external ntdll name 'RtlDestroyProcessParameters';
-
-type
- _DEBUG_BUFFER = record
- SectionHandle: HANDLE;
- SectionBase: PVOID;
- RemoteSectionBase: PVOID;
- SectionBaseDelta: ULONG;
- EventPairHandle: HANDLE;
- Unknown: array [0..1] of ULONG;
- RemoteThreadHandle: HANDLE;
- InfoClassMask: ULONG;
- SizeOfInfo: ULONG;
- AllocatedSize: ULONG;
- SectionSize: ULONG;
- ModuleInformation: PVOID;
- BackTraceInformation: PVOID;
- HeapInformation: PVOID;
- LockInformation: PVOID;
- Reserved: array [0..7] of PVOID;
- end;
- DEBUG_BUFFER = _DEBUG_BUFFER;
- PDEBUG_BUFFER = ^DEBUG_BUFFER;
-
-const
- PDI_MODULES = $01;
- PDI_BACKTRACE = $02;
- PDI_HEAPS = $04;
- PDI_HEAP_TAGS = $08;
- PDI_HEAP_BLOCKS = $10;
- PDI_LOCKS = $20;
-
-type
- _DEBUG_MODULE_INFORMATION = record // c.f. SYSTEM_MODULE_INFORMATION
- Reserved: array [0..1] of ULONG;
- Base: ULONG;
- Size: ULONG;
- Flags: ULONG;
- Index: USHORT;
- Unknown: USHORT;
- LoadCount: USHORT;
- ModuleNameOffset: USHORT;
- ImageName: array [0..255] of CHAR;
- end;
- DEBUG_MODULE_INFORMATION = _DEBUG_MODULE_INFORMATION;
- PDEBUG_MODULE_INFORMATION = ^DEBUG_MODULE_INFORMATION;
-
- _DEBUG_HEAP_INFORMATION = record
- Base: ULONG;
- Flags: ULONG;
- Granularity: USHORT;
- Unknown: USHORT;
- Allocated: ULONG;
- Committed: ULONG;
- TagCount: ULONG;
- BlockCount: ULONG;
- Reserved: array [0..6] of ULONG;
- Tags: PVOID;
- Blocks: PVOID;
- end;
- DEBUG_HEAP_INFORMATION = _DEBUG_HEAP_INFORMATION;
- PDEBUG_HEAP_INFORMATION = ^DEBUG_HEAP_INFORMATION;
-
- _DEBUG_LOCK_INFORMATION = record // c.f. SYSTEM_LOCK_INFORMATION
- Address: PVOID;
- Type_: USHORT;
- CreatorBackTraceIndex: USHORT;
- OwnerThreadId: ULONG;
- ActiveCount: ULONG;
- ContentionCount: ULONG;
- EntryCount: ULONG;
- RecursionCount: ULONG;
- NumberOfSharedWaiters: ULONG;
- NumberOfExclusiveWaiters: ULONG;
- end;
- DEBUG_LOCK_INFORMATION = _DEBUG_LOCK_INFORMATION;
- PDEBUG_LOCK_INFORMATION = ^DEBUG_LOCK_INFORMATION;
-
-function RtlCreateQueryDebugBuffer(Size: ULONG; EventPair: ByteBool): PDEBUG_BUFFER; stdcall; external ntdll name 'RtlCreateQueryDebugBuffer';
-function RtlQueryProcessDebugInformation(ProcessId: ULONG; DebugInfoClassMask: ULONG; DebugBuffer: PDEBUG_BUFFER): NTSTATUS; stdcall; external ntdll name 'RtlQueryProcessDebugInformation';
-function RtlDestroyQueryDebugBuffer(DebugBuffer: PDEBUG_BUFFER): NTSTATUS; stdcall; external ntdll name 'RtlDestroyQueryDebugBuffer';
-function NtCreateJobObject(JobHandle: PHANDLE; DesiredAccess: ACCESS_MASK; ObjectAttributes: POBJECT_ATTRIBUTES): NTSTATUS; stdcall; external ntdll name 'NtCreateJobObject';
-function NtOpenJobObject(JobHandle: PHANDLE; DesiredAccess: ACCESS_MASK; ObjectAttributes: POBJECT_ATTRIBUTES): NTSTATUS; stdcall; external ntdll name 'NtOpenJobObject';
-function NtTerminateJobObject(JobHandle: HANDLE; ExitStatus: NTSTATUS): NTSTATUS; stdcall; external ntdll name 'NtTerminateJobObject';
-function NtAssignProcessToJobObject(JobHandle: HANDLE; ProcessHandle: HANDLE): NTSTATUS; stdcall; external ntdll name 'NtAssignProcessToJobObject';
-function NtQueryInformationJobObject(JobHandle: HANDLE; JobInformationClass: JOBOBJECTINFOCLASS; JobInformation: PVOID; JobInformationLength: ULONG; ReturnLength: PULONG): NTSTATUS; stdcall; external ntdll name 'NtQueryInformationJobObject';
-function NtSetInformationJobObject(JobHandle: HANDLE; JobInformationClass: JOBOBJECTINFOCLASS; JobInformation: PVOID; JobInformationLength: ULONG): NTSTATUS; stdcall; external ntdll name 'NtSetInformationJobObject';
-function NtCreateToken(TokenHandle: PHANDLE; DesiredAccess: ACCESS_MASK; ObjectAttributes: POBJECT_ATTRIBUTES; Type_: TOKEN_TYPE; AuthenticationId: PLUID; ExpirationTime: PLARGE_INTEGER; User: PTOKEN_USER; Groups: PTOKEN_GROUPS; Privileges: PTOKEN_PRIVILEGES; Owner: PTOKEN_OWNER; PrimaryGroup: PTOKEN_PRIMARY_GROUP; DefaultDacl: PTOKEN_DEFAULT_DACL; Source: PTOKEN_SOURCE): NTSTATUS; stdcall; external ntdll name 'NtCreateToken';
-function NtOpenProcessToken(ProcessHandle: HANDLE; DesiredAccess: ACCESS_MASK; TokenHandle: PHANDLE): NTSTATUS; stdcall; external ntdll name 'NtOpenProcessToken';
-function NtOpenThreadToken(ThreadHandle: HANDLE; DesiredAccess: ACCESS_MASK; OpenAsSelf: ByteBool; TokenHandle: PHANDLE): NTSTATUS; stdcall; external ntdll name 'NtOpenThreadToken';
-function NtDuplicateToken(ExistingTokenHandle: HANDLE; DesiredAccess: ACCESS_MASK; ObjectAttributes: POBJECT_ATTRIBUTES; EffectiveOnly: ByteBool; TokenType: TOKEN_TYPE; NewTokenHandle: PHANDLE): NTSTATUS; stdcall; external ntdll name 'NtDuplicateToken';
-function NtFilterToken(ExistingTokenHandle: HANDLE; Flags: ULONG; SidsToDisable: PTOKEN_GROUPS; PrivilegesToDelete: PTOKEN_PRIVILEGES; SidsToRestricted: PTOKEN_GROUPS; NewTokenHandle: PHANDLE): NTSTATUS; stdcall; external ntdll name 'NtFilterToken';
-function NtAdjustPrivilegesToken(TokenHandle: HANDLE; DisableAllPrivileges: ByteBool; NewState: PTOKEN_PRIVILEGES; BufferLength: ULONG; PreviousState: PTOKEN_PRIVILEGES; ReturnLength: PULONG): NTSTATUS; stdcall; external ntdll name 'NtAdjustPrivilegesToken';
-function NtAdjustGroupsToken(TokenHandle: HANDLE; ResetToDefault: ByteBool; NewState: PTOKEN_GROUPS; BufferLength: ULONG; PreviousState: PTOKEN_GROUPS; ReturnLength: PULONG): NTSTATUS; stdcall; external ntdll name 'NtAdjustGroupsToken';
-function NtQueryInformationToken(TokenHandle: HANDLE; TokenInformationClass: TOKEN_INFORMATION_CLASS; TokenInformation: PVOID; TokenInformationLength: ULONG; ReturnLength: PULONG): NTSTATUS; stdcall; external ntdll name 'NtQueryInformationToken';
-function NtSetInformationToken(TokenHandle: HANDLE; TokenInformationClass: TOKEN_INFORMATION_CLASS; TokenInformation: PVOID; TokenInformationLength: ULONG): NTSTATUS; stdcall; external ntdll name 'NtSetInformationToken';
-function NtWaitForSingleObject(Handle: HANDLE; Alertable: ByteBool; Timeout: PLARGE_INTEGER): NTSTATUS; stdcall; external ntdll name 'NtWaitForSingleObject';
-function NtSignalAndWaitForSingleObject(HandleToSignal: HANDLE; HandleToWait: HANDLE; Alertable: ByteBool; Timeout: PLARGE_INTEGER): NTSTATUS; stdcall; external ntdll name 'NtSignalAndWaitForSingleObject';
-function NtWaitForMultipleObjects(HandleCount: ULONG; Handles: PHANDLE; WaitType: WAIT_TYPE; Alertable: ByteBool; Timeout: PLARGE_INTEGER): NTSTATUS; stdcall; external ntdll name 'NtWaitForMultipleObjects';
-function NtCreateTimer(TimerHandle: PHANDLE; DesiredAccess: ACCESS_MASK; ObjectAttributes: POBJECT_ATTRIBUTES; TimerType: TIMER_TYPE): NTSTATUS; stdcall; external ntdll name 'NtCreateTimer';
-function NtOpenTimer(TimerHandle: PHANDLE; DesiredAccess: ACCESS_MASK; ObjectAttributes: POBJECT_ATTRIBUTES): NTSTATUS; stdcall; external ntdll name 'NtOpenTimer';
-function NtCancelTimer(TimerHandle: HANDLE; PreviousState: PBOOLEAN): NTSTATUS; stdcall; external ntdll name 'NtCancelTimer';
-
-type
- PTIMER_APC_ROUTINE = procedure(TimerContext: PVOID; TimerLowValue: ULONG; TimerHighValue: LONG); stdcall;
-
-function NtSetTimer(TimerHandle: HANDLE; DueTime: PLARGE_INTEGER; TimerApcRoutine: PTIMER_APC_ROUTINE; TimerContext: PVOID; Resume: ByteBool; Period: LONG; PreviousState: PBOOLEAN): NTSTATUS; stdcall; external ntdll name 'NtSetTimer';
-
-type
- _TIMER_INFORMATION_CLASS = (TimerBasicInformation);
- TIMER_INFORMATION_CLASS = _TIMER_INFORMATION_CLASS;
-
-function NtQueryTimer(TimerHandle: HANDLE; TimerInformationClass: TIMER_INFORMATION_CLASS; TimerInformation: PVOID; TimerInformationLength: ULONG; ResultLength: PULONG): NTSTATUS; stdcall; external ntdll name 'NtQueryTimer';
-
-type
- _TIMER_BASIC_INFORMATION = record
- TimeRemaining: LARGE_INTEGER;
- SignalState: ByteBool;
- end;
- TIMER_BASIC_INFORMATION = _TIMER_BASIC_INFORMATION;
- PTIMER_BASIC_INFORMATION = ^TIMER_BASIC_INFORMATION;
-
-function NtCreateEvent(EventHandle: PHANDLE; DesiredAccess: ACCESS_MASK; ObjectAttributes: POBJECT_ATTRIBUTES; EventType: EVENT_TYPE; InitialState: ByteBool): NTSTATUS; stdcall; external ntdll name 'NtCreateEvent';
-function NtOpenEvent(EventHandle: PHANDLE; DesiredAccess: ACCESS_MASK; ObjectAttributes: POBJECT_ATTRIBUTES): NTSTATUS; stdcall; external ntdll name 'NtOpenEvent';
-function NtSetEvent(EventHandle: HANDLE; PreviousState: PULONG): NTSTATUS; stdcall; external ntdll name 'NtSetEvent';
-function NtPulseEvent(EventHandle: HANDLE; PreviousState: PULONG): NTSTATUS; stdcall; external ntdll name 'NtPulseEvent';
-function NtResetEvent(EventHandle: HANDLE; PreviousState: PULONG): NTSTATUS; stdcall; external ntdll name 'NtResetEvent';
-function NtClearEvent(EventHandle: HANDLE): NTSTATUS; stdcall; external ntdll name 'NtClearEvent';
-
-type
- _EVENT_INFORMATION_CLASS = (EventBasicInformation);
- EVENT_INFORMATION_CLASS = _EVENT_INFORMATION_CLASS;
-
-function NtQueryEvent(EventHandle: HANDLE; EventInformationClass: EVENT_INFORMATION_CLASS; EventInformation: PVOID; EventInformationLength: ULONG; ResultLength: PULONG): NTSTATUS; stdcall; external ntdll name 'NtQueryEvent';
-
-type
- _EVENT_BASIC_INFORMATION = record
- EventType: EVENT_TYPE;
- SignalState: LONG;
- end;
- EVENT_BASIC_INFORMATION = _EVENT_BASIC_INFORMATION;
- PEVENT_BASIC_INFORMATION = ^EVENT_BASIC_INFORMATION;
-
-function NtCreateSemaphore(SemaphoreHandle: PHANDLE; DesiredAccess: ACCESS_MASK; ObjectAttributes: POBJECT_ATTRIBUTES; InitialCount: LONG; MaximumCount: LONG): NTSTATUS; stdcall; external ntdll name 'NtCreateSemaphore';
-function NtOpenSemaphore(SemaphoreHandle: PHANDLE; DesiredAccess: ACCESS_MASK; ObjectAttributes: POBJECT_ATTRIBUTES): NTSTATUS; stdcall; external ntdll name 'NtOpenSemaphore';
-function NtReleaseSemaphore(SemaphoreHandle: HANDLE; ReleaseCount: LONG; PreviousCount: PLONG): NTSTATUS; stdcall; external ntdll name 'NtReleaseSemaphore';
-
-type
- _SEMAPHORE_INFORMATION_CLASS = (SemaphoreBasicInformation);
- SEMAPHORE_INFORMATION_CLASS = _SEMAPHORE_INFORMATION_CLASS;
-
-function NtQuerySemaphore(SemaphoreHandle: HANDLE; SemaphoreInformationClass: SEMAPHORE_INFORMATION_CLASS; SemaphoreInformation: PVOID; SemaphoreInformationLength: ULONG; ResultLength: PULONG): NTSTATUS; stdcall; external ntdll name 'NtQuerySemaphore';
-
-type
- _SEMAPHORE_BASIC_INFORMATION = record
- CurrentCount: LONG;
- MaximumCount: LONG;
- end;
- SEMAPHORE_BASIC_INFORMATION = _SEMAPHORE_BASIC_INFORMATION;
- PSEMAPHORE_BASIC_INFORMATION = ^SEMAPHORE_BASIC_INFORMATION;
-
-function NtCreateMutant(MutantHandle: PHANDLE; DesiredAccess: ACCESS_MASK; ObjectAttributes: POBJECT_ATTRIBUTES; InitialOwner: ByteBool): NTSTATUS; stdcall; external ntdll name 'NtCreateMutant';
-function NtOpenMutant(MutantHandle: PHANDLE; DesiredAccess: ACCESS_MASK; ObjectAttributes: POBJECT_ATTRIBUTES): NTSTATUS; stdcall; external ntdll name 'NtOpenMutant';
-function NtReleaseMutant(MutantHandle: HANDLE; PreviousState: PULONG): NTSTATUS; stdcall; external ntdll name 'NtReleaseMutant';
-
-type
- _MUTANT_INFORMATION_CLASS = (MutantBasicInformation);
- MUTANT_INFORMATION_CLASS = _MUTANT_INFORMATION_CLASS;
-
-function NtQueryMutant(MutantHandle: HANDLE; MutantInformationClass: MUTANT_INFORMATION_CLASS; MutantInformation: PVOID; MutantInformationLength: ULONG; ResultLength: PULONG): NTSTATUS; stdcall; external ntdll name 'NtQueryMutant';
-
-type
- _MUTANT_BASIC_INFORMATION = record
- SignalState: LONG;
- Owned: ByteBool;
- Abandoned: ByteBool;
- end;
- MUTANT_BASIC_INFORMATION = _MUTANT_BASIC_INFORMATION;
- PMUTANT_BASIC_INFORMATION = ^MUTANT_BASIC_INFORMATION;
-
-function NtCreateIoCompletion(IoCompletionHandle: PHANDLE; DesiredAccess: ACCESS_MASK; ObjectAttributes: POBJECT_ATTRIBUTES; NumberOfConcurrentThreads: ULONG): NTSTATUS; stdcall; external ntdll name 'NtCreateIoCompletion';
-function NtOpenIoCompletion(IoCompletionHandle: PHANDLE; DesiredAccess: ACCESS_MASK; ObjectAttributes: POBJECT_ATTRIBUTES): NTSTATUS; stdcall; external ntdll name 'NtOpenIoCompletion';
-function NtSetIoCompletion(IoCompletionHandle: HANDLE; CompletionKey: ULONG; CompletionValue: ULONG; Status: NTSTATUS; Information: ULONG): NTSTATUS; stdcall; external ntdll name 'NtSetIoCompletion';
-function NtRemoveIoCompletion(IoCompletionHandle: HANDLE; CompletionKey: PULONG; CompletionValue: PULONG; IoStatusBlock: PIO_STATUS_BLOCK; Timeout: PLARGE_INTEGER): NTSTATUS; stdcall; external ntdll name 'NtRemoveIoCompletion';
-
-type
- _IO_COMPLETION_INFORMATION_CLASS = (IoCompletionBasicInformation);
- IO_COMPLETION_INFORMATION_CLASS = _IO_COMPLETION_INFORMATION_CLASS;
-
-function NtQueryIoCompletion(IoCompletionHandle: HANDLE; IoCompletionInformationClass: IO_COMPLETION_INFORMATION_CLASS; IoCompletionInformation: PVOID; IoCompletionInformationLength: ULONG; ResultLength: PULONG): NTSTATUS; stdcall; external ntdll name 'NtQueryIoCompletion';
-
-type
- _IO_COMPLETION_BASIC_INFORMATION = record
- SignalState: LONG;
- end;
- IO_COMPLETION_BASIC_INFORMATION = _IO_COMPLETION_BASIC_INFORMATION;
- PIO_COMPLETION_BASIC_INFORMATION = ^IO_COMPLETION_BASIC_INFORMATION;
-
-function NtCreateEventPair(EventPairHandle: PHANDLE; DesiredAccess: ACCESS_MASK; ObjectAttributes: POBJECT_ATTRIBUTES): NTSTATUS; stdcall; external ntdll name 'NtCreateEventPair';
-function NtOpenEventPair(EventPairHandle: PHANDLE; DesiredAccess: ACCESS_MASK; ObjectAttributes: POBJECT_ATTRIBUTES): NTSTATUS; stdcall; external ntdll name 'NtOpenEventPair';
-function NtWaitLowEventPair(EventPairHandle: HANDLE): NTSTATUS; stdcall; external ntdll name 'NtWaitLowEventPair';
-function NtWaitHighEventPair(EventPairHandle: HANDLE): NTSTATUS; stdcall; external ntdll name 'NtWaitHighEventPair';
-function NtSetLowWaitHighEventPair(EventPairHandle: HANDLE): NTSTATUS; stdcall; external ntdll name 'NtSetLowWaitHighEventPair';
-function NtSetHighWaitLowEventPair(EventPairHandle: HANDLE): NTSTATUS; stdcall; external ntdll name 'NtSetHighWaitLowEventPair';
-function NtSetLowEventPair(EventPairHandle: HANDLE): NTSTATUS; stdcall; external ntdll name 'NtSetLowEventPair';
-function NtSetHighEventPair(EventPairHandle: HANDLE): NTSTATUS; stdcall; external ntdll name 'NtSetHighEventPair';
-function NtQuerySystemTime(CurrentTime: PLARGE_INTEGER): NTSTATUS; stdcall; external ntdll name 'NtQuerySystemTime';
-function NtSetSystemTime(NewTime: PLARGE_INTEGER; OldTime: PLARGE_INTEGER): NTSTATUS; stdcall; external ntdll name 'NtSetSystemTime';
-function NtQueryPerformanceCounter(PerformanceCount: PLARGE_INTEGER; PerformanceFrequency: PLARGE_INTEGER): NTSTATUS; stdcall; external ntdll name 'NtQueryPerformanceCounter';
-function NtSetTimerResolution(RequestedResolution: ULONG; Set_: ByteBool; ActualResolution: PULONG): NTSTATUS; stdcall; external ntdll name 'NtSetTimerResolution';
-function NtQueryTimerResolution(CoarsestResolution: PULONG; FinestResolution: PULONG; ActualResolution: PULONG): NTSTATUS; stdcall; external ntdll name 'NtQueryTimerResolution';
-function NtDelayExecution(Alertable: ByteBool; Interval: PLARGE_INTEGER): NTSTATUS; stdcall; external ntdll name 'NtDelayExecution';
-function NtYieldExecution: NTSTATUS; stdcall; external ntdll name 'NtYieldExecution';
-function NtGetTickCount: ULONG; stdcall; external ntdll name 'NtGetTickCount';
-function NtCreateProfile(ProfileHandle: PHANDLE; ProcessHandle: HANDLE; Base: PVOID; Size: ULONG; BucketShift: ULONG; Buffer: PULONG; BufferLength: ULONG; Source: KPROFILE_SOURCE; ProcessorMask: ULONG): NTSTATUS; stdcall; external ntdll name 'NtCreateProfile';
-function NtSetIntervalProfile(Interval: ULONG; Source: KPROFILE_SOURCE): NTSTATUS; stdcall; external ntdll name 'NtSetIntervalProfile';
-function NtQueryIntervalProfile(Source: KPROFILE_SOURCE; Interval: PULONG): NTSTATUS; stdcall; external ntdll name 'NtQueryIntervalProfile';
-function NtStartProfile(ProfileHandle: HANDLE): NTSTATUS; stdcall; external ntdll name 'NtStartProfile';
-function NtStopProfile(ProfileHandle: HANDLE): NTSTATUS; stdcall; external ntdll name 'NtStopProfile';
-
-type
- _PORT_MESSAGE = record
- DataSize: USHORT;
- MessageSize: USHORT;
- MessageType: USHORT;
- VirtualRangesOffset: USHORT;
- ClientId: CLIENT_ID;
- MessageId: ULONG;
- SectionSize: ULONG;
- // UCHAR Data[];
- end;
- PORT_MESSAGE = _PORT_MESSAGE;
- PPORT_MESSAGE = ^PORT_MESSAGE;
-
- _LPC_TYPE = (
- LPC_NEW_MESSAGE, // A new message
- LPC_REQUEST, // A request message
- LPC_REPLY, // A reply to a request message
- LPC_DATAGRAM, //
- LPC_LOST_REPLY, //
- LPC_PORT_CLOSED, // Sent when port is deleted
- LPC_CLIENT_DIED, // Messages to thread termination ports
- LPC_EXCEPTION, // Messages to thread exception port
- LPC_DEBUG_EVENT, // Messages to thread debug port
- LPC_ERROR_EVENT, // Used by ZwRaiseHardError
- LPC_CONNECTION_REQUEST); // Used by ZwConnectPort
- LPC_TYPE = _LPC_TYPE;
-
- _PORT_SECTION_WRITE = record
- Length: ULONG;
- SectionHandle: HANDLE;
- SectionOffset: ULONG;
- ViewSize: ULONG;
- ViewBase: PVOID;
- TargetViewBase: PVOID;
- end;
- PORT_SECTION_WRITE = _PORT_SECTION_WRITE;
- PPORT_SECTION_WRITE = ^PORT_SECTION_WRITE;
-
- _PORT_SECTION_READ = record
- Length: ULONG;
- ViewSize: ULONG;
- ViewBase: ULONG;
- end;
- PORT_SECTION_READ = _PORT_SECTION_READ;
- PPORT_SECTION_READ = ^PORT_SECTION_READ;
-
-function NtCreatePort(PortHandle: PHANDLE; ObjectAttributes: POBJECT_ATTRIBUTES; MaxDataSize: ULONG; MaxMessageSize: ULONG; Reserved: ULONG): NTSTATUS; stdcall; external ntdll name 'NtCreatePort';
-function NtCreateWaitablePort(PortHandle: PHANDLE; ObjectAttributes: POBJECT_ATTRIBUTES; MaxDataSize: ULONG; MaxMessageSize: ULONG; Reserved: ULONG): NTSTATUS; stdcall; external ntdll name 'NtCreateWaitablePort';
-function NtConnectPort(PortHandle: PHANDLE; PortName: PUNICODE_STRING; SecurityQos: PSECURITY_QUALITY_OF_SERVICE; WriteSection: PPORT_SECTION_WRITE; ReadSection: PPORT_SECTION_READ; MaxMessageSize: PULONG; ConnectData: PVOID; ConnectDataLength: PULONG): NTSTATUS; stdcall; external ntdll name 'NtConnectPort';
-function NtSecureConnectPort(PortHandle: PHANDLE; PortName: PUNICODE_STRING; SecurityQos: PSECURITY_QUALITY_OF_SERVICE; WriteSection: PPORT_SECTION_WRITE; ServerSid: PSID; ReadSection: PPORT_SECTION_READ; MaxMessageSize: PULONG; ConnectData: PVOID; ConnectDataLength: PULONG): NTSTATUS; stdcall; external ntdll name 'NtSecureConnectPort';
-function NtListenPort(PortHandle: HANDLE; Message: PPORT_MESSAGE): NTSTATUS; stdcall; external ntdll name 'NtListenPort';
-function NtAcceptConnectPort(PortHandle: PHANDLE; PortIdentifier: ULONG; Message: PPORT_MESSAGE; Accept: ByteBool; WriteSection: PPORT_SECTION_WRITE; ReadSection: PPORT_SECTION_READ): NTSTATUS; stdcall; external ntdll name 'NtAcceptConnectPort';
-function NtCompleteConnectPort(PortHandle: HANDLE): NTSTATUS; stdcall; external ntdll name 'NtCompleteConnectPort';
-function NtRequestPort(PortHandle: HANDLE; RequestMessage: PPORT_MESSAGE): NTSTATUS; stdcall; external ntdll name 'NtRequestPort';
-function NtRequestWaitReplyPort(PortHandle: HANDLE; RequestMessage: PPORT_MESSAGE; ReplyMessage: PPORT_MESSAGE): NTSTATUS; stdcall; external ntdll name 'NtRequestWaitReplyPort';
-function NtReplyPort(PortHandle: HANDLE; ReplyMessage: PPORT_MESSAGE): NTSTATUS; stdcall; external ntdll name 'NtReplyPort';
-function NtReplyWaitReplyPort(PortHandle: HANDLE; ReplyMessage: PPORT_MESSAGE): NTSTATUS; stdcall; external ntdll name 'NtReplyWaitReplyPort';
-function NtReplyWaitReceivePort(PortHandle: HANDLE; PortIdentifier: PULONG; ReplyMessage: PPORT_MESSAGE; Message: PPORT_MESSAGE): NTSTATUS; stdcall; external ntdll name 'NtReplyWaitReceivePort';
-function NtReplyWaitReceivePortEx(PortHandle: HANDLE; PortIdentifier: PULONG; ReplyMessage: PPORT_MESSAGE; Message: PPORT_MESSAGE; Timeout: PLARGE_INTEGER): NTSTATUS; stdcall; external ntdll name 'NtReplyWaitReceivePortEx';
-function NtReadRequestData(PortHandle: HANDLE; Message: PPORT_MESSAGE; Index: ULONG; Buffer: PVOID; BufferLength: ULONG; ReturnLength: PULONG): NTSTATUS; stdcall; external ntdll name 'NtReadRequestData';
-function NtWriteRequestData(PortHandle: HANDLE; Message: PPORT_MESSAGE; Index: ULONG; Buffer: PVOID; BufferLength: ULONG; ReturnLength: PULONG): NTSTATUS; stdcall; external ntdll name 'NtWriteRequestData';
-
-type
- _PORT_INFORMATION_CLASS = (PortBasicInformation);
- PORT_INFORMATION_CLASS = _PORT_INFORMATION_CLASS;
-
-function NtQueryInformationPort(PortHandle: HANDLE; PortInformationClass: PORT_INFORMATION_CLASS; PortInformation: PVOID; PortInformationLength: ULONG; ReturnLength: PULONG): NTSTATUS; stdcall; external ntdll name 'NtQueryInformationPort';
-
-type
- _PORT_BASIC_INFORMATION = record
- end;
- PORT_BASIC_INFORMATION = _PORT_BASIC_INFORMATION;
- PPORT_BASIC_INFORMATION = ^PORT_BASIC_INFORMATION;
-
-function NtImpersonateClientOfPort(PortHandle: HANDLE; Message: PPORT_MESSAGE): NTSTATUS; stdcall; external ntdll name 'NtImpersonateClientOfPort';
-function NtCreateFile(FileHandle: PHANDLE; DesiredAccess: ACCESS_MASK; ObjectAttributes: POBJECT_ATTRIBUTES; IoStatusBlock: PIO_STATUS_BLOCK; AllocationSize: PLARGE_INTEGER; FileAttributes: ULONG; ShareAccess: ULONG; CreateDisposition: ULONG; CreateOptions: ULONG; EaBuffer: PVOID; EaLength: ULONG): NTSTATUS; stdcall; external ntdll name 'NtCreateFile';
-function NtOpenFile(FileHandle: PHANDLE; DesiredAccess: ACCESS_MASK; ObjectAttributes: POBJECT_ATTRIBUTES; IoStatusBlock: PIO_STATUS_BLOCK; ShareAccess: ULONG; OpenOptions: ULONG): NTSTATUS; stdcall; external ntdll name 'NtOpenFile';
-function NtDeleteFile(ObjectAttributes: POBJECT_ATTRIBUTES): NTSTATUS; stdcall; external ntdll name 'NtDeleteFile';
-function NtFlushBuffersFile(FileHandle: HANDLE; IoStatusBlock: PIO_STATUS_BLOCK): NTSTATUS; stdcall; external ntdll name 'NtFlushBuffersFile';
-function NtCancelIoFile(FileHandle: HANDLE; IoStatusBlock: PIO_STATUS_BLOCK): NTSTATUS; stdcall; external ntdll name 'NtCancelIoFile';
-function NtReadFile(FileHandle: HANDLE; Event: HANDLE; ApcRoutine: PIO_APC_ROUTINE; ApcContext: PVOID; IoStatusBlock: PIO_STATUS_BLOCK; Buffer: PVOID; Length: ULONG; ByteOffset: PLARGE_INTEGER; Key: PULONG): NTSTATUS; stdcall; external ntdll name 'NtReadFile';
-function NtWriteFile(FileHandle: HANDLE; Event: HANDLE; ApcRoutine: PIO_APC_ROUTINE; ApcContext: PVOID; IoStatusBlock: PIO_STATUS_BLOCK; Buffer: PVOID; Length: ULONG; ByteOffset: PLARGE_INTEGER; Key: PULONG): NTSTATUS; stdcall; external ntdll name 'NtWriteFile';
-function NtReadFileScatter(FileHandle: HANDLE; Event: HANDLE; ApcRoutine: PIO_APC_ROUTINE; ApcContext: PVOID; IoStatusBlock: PIO_STATUS_BLOCK; Buffer: PFILE_SEGMENT_ELEMENT; Length: ULONG; ByteOffset: PLARGE_INTEGER; Key: PULONG): NTSTATUS; stdcall; external ntdll name 'NtReadFileScatter';
-function NtWriteFileGather(FileHandle: HANDLE; Event: HANDLE; ApcRoutine: PIO_APC_ROUTINE; ApcContext: PVOID; IoStatusBlock: PIO_STATUS_BLOCK; Buffer: PFILE_SEGMENT_ELEMENT; Length: ULONG; ByteOffset: PLARGE_INTEGER; Key: PULONG): NTSTATUS; stdcall; external ntdll name 'NtWriteFileGather';
-function NtLockFile(FileHandle: HANDLE; Event: HANDLE; ApcRoutine: PIO_APC_ROUTINE; ApcContext: PVOID; IoStatusBlock: PIO_STATUS_BLOCK; LockOffset: PULARGE_INTEGER; LockLength: PULARGE_INTEGER; Key: ULONG; FailImmediately: ByteBool; ExclusiveLock: ByteBool): NTSTATUS; stdcall; external ntdll name 'NtLockFile';
-function NtUnlockFile(FileHandle: HANDLE; IoStatusBlock: PIO_STATUS_BLOCK; LockOffset: PULARGE_INTEGER; LockLength: PULARGE_INTEGER; Key: ULONG): NTSTATUS; stdcall; external ntdll name 'NtUnlockFile';
-function NtDeviceIoControlFile(FileHandle: HANDLE; Event: HANDLE; ApcRoutine: PIO_APC_ROUTINE; ApcContext: PVOID; IoStatusBlock: PIO_STATUS_BLOCK; IoControlCode: ULONG; InputBuffer: PVOID; InputBufferLength: ULONG; OutputBuffer: PVOID; OutputBufferLength: ULONG): NTSTATUS; stdcall; external ntdll name 'NtDeviceIoControlFile';
-function NtFsControlFile(FileHandle: HANDLE; Event: HANDLE; ApcRoutine: PIO_APC_ROUTINE; ApcContext: PVOID; IoStatusBlock: PIO_STATUS_BLOCK; FsControlCode: ULONG; InputBuffer: PVOID; InputBufferLength: ULONG; OutputBuffer: PVOID; OutputBufferLength: ULONG): NTSTATUS; stdcall; external ntdll name 'NtFsControlFile';
-function NtNotifyChangeDirectoryFile(FileHandle: HANDLE; Event: HANDLE; ApcRoutine: PIO_APC_ROUTINE; ApcContext: PVOID; IoStatusBlock: PIO_STATUS_BLOCK; Buffer: PFILE_NOTIFY_INFORMATION; BufferLength: ULONG; NotifyFilter: ULONG; WatchSubtree: ByteBool): NTSTATUS; stdcall; external ntdll name 'NtNotifyChangeDirectoryFile';
-
-type
- _FILE_GET_EA_INFORMATION = record
- NextEntryOffset: ULONG;
- EaNameLength: UCHAR;
- EaName: array [0..0] of CHAR;
- end;
- FILE_GET_EA_INFORMATION = _FILE_GET_EA_INFORMATION;
- PFILE_GET_EA_INFORMATION = ^FILE_GET_EA_INFORMATION;
-
-function NtQueryEaFile(FileHandle: HANDLE; IoStatusBlock: PIO_STATUS_BLOCK; Buffer: PFILE_FULL_EA_INFORMATION; BufferLength: ULONG; ReturnSingleEntry: ByteBool; EaList: PFILE_GET_EA_INFORMATION; EaListLength: ULONG; EaIndex: PULONG; RestartScan: ByteBool): NTSTATUS; stdcall; external ntdll name 'NtQueryEaFile';
-function NtSetEaFile(FileHandle: HANDLE; IoStatusBlock: PIO_STATUS_BLOCK; Buffer: PFILE_FULL_EA_INFORMATION; BufferLength: ULONG): NTSTATUS; stdcall; external ntdll name 'NtSetEaFile';
-function NtCreateNamedPipeFile(FileHandle: PHANDLE; DesiredAccess: ACCESS_MASK; ObjectAttributes: POBJECT_ATTRIBUTES; IoStatusBlock: PIO_STATUS_BLOCK; ShareAccess: ULONG; CreateDisposition: ULONG; CreateOptions: ULONG; TypeMessage: ByteBool; ReadmodeMessage: ByteBool; Nonblocking: ByteBool; MaxInstances: ULONG; InBufferSize: ULONG; OutBufferSize: ULONG; DefaultTimeout: PLARGE_INTEGER): NTSTATUS; stdcall; external ntdll name 'NtCreateNamedPipeFile';
-function NtCreateMailslotFile(FileHandle: PHANDLE; DesiredAccess: ACCESS_MASK; ObjectAttributes: POBJECT_ATTRIBUTES; IoStatusBlock: PIO_STATUS_BLOCK; CreateOptions: ULONG; Unknown: ULONG; MaxMessageSize: ULONG; ReadTimeout: PLARGE_INTEGER): NTSTATUS; stdcall; external ntdll name 'NtCreateMailslotFile';
-function NtQueryVolumeInformationFile(FileHandle: HANDLE; IoStatusBlock: PIO_STATUS_BLOCK; VolumeInformation: PVOID; VolumeInformationLength: ULONG; VolumeInformationClass: FS_INFORMATION_CLASS): NTSTATUS; stdcall; external ntdll name 'NtQueryVolumeInformationFile';
-function NtSetVolumeInformationFile(FileHandle: HANDLE; IoStatusBlock: PIO_STATUS_BLOCK; Buffer: PVOID; BufferLength: ULONG; VolumeInformationClass: FS_INFORMATION_CLASS): NTSTATUS; stdcall; external ntdll name 'NtSetVolumeInformationFile';
-
-type
- _FILE_FS_VOLUME_INFORMATION = record
- VolumeCreationTime: LARGE_INTEGER;
- VolumeSerialNumber: ULONG;
- VolumeLabelLength: ULONG;
- Unknown: UCHAR;
- VolumeLabel: array [0..0] of WCHAR;
- end;
- FILE_FS_VOLUME_INFORMATION = _FILE_FS_VOLUME_INFORMATION;
- PFILE_FS_VOLUME_INFORMATION = ^FILE_FS_VOLUME_INFORMATION;
-
- _FILE_FS_LABEL_INFORMATION = record
- VolumeLabelLength: ULONG;
- VolumeLabel: WCHAR;
- end;
- FILE_FS_LABEL_INFORMATION = _FILE_FS_LABEL_INFORMATION;
- PFILE_FS_LABEL_INFORMATION = ^FILE_FS_LABEL_INFORMATION;
-
- _FILE_FS_SIZE_INFORMATION = record
- TotalAllocationUnits: LARGE_INTEGER;
- AvailableAllocationUnits: LARGE_INTEGER;
- SectorsPerAllocationUnit: ULONG;
- BytesPerSector: ULONG;
- end;
- FILE_FS_SIZE_INFORMATION = _FILE_FS_SIZE_INFORMATION;
- PFILE_FS_SIZE_INFORMATION = ^FILE_FS_SIZE_INFORMATION;
-
- _FILE_FS_ATTRIBUTE_INFORMATION = record
- FileSystemFlags: ULONG;
- MaximumComponentNameLength: ULONG;
- FileSystemNameLength: ULONG;
- FileSystemName: array [0..0] of WCHAR
- end;
- FILE_FS_ATTRIBUTE_INFORMATION = _FILE_FS_ATTRIBUTE_INFORMATION;
- PFILE_FS_ATTRIBUTE_INFORMATION = ^FILE_FS_ATTRIBUTE_INFORMATION;
-
- _FILE_FS_CONTROL_INFORMATION = record
- Reserved: array [0..2] of LARGE_INTEGER;
- DefaultQuotaThreshold: LARGE_INTEGER;
- DefaultQuotaLimit: LARGE_INTEGER;
- QuotaFlags: ULONG;
- end;
- FILE_FS_CONTROL_INFORMATION = _FILE_FS_CONTROL_INFORMATION;
- PFILE_FS_CONTROL_INFORMATION = ^FILE_FS_CONTROL_INFORMATION;
-
- _FILE_FS_FULL_SIZE_INFORMATION = record
- TotalQuotaAllocationUnits: LARGE_INTEGER;
- AvailableQuotaAllocationUnits: LARGE_INTEGER;
- AvailableAllocationUnits: LARGE_INTEGER;
- SectorsPerAllocationUnit: ULONG;
- BytesPerSector: ULONG;
- end;
- FILE_FS_FULL_SIZE_INFORMATION = _FILE_FS_FULL_SIZE_INFORMATION;
- PFILE_FS_FULL_SIZE_INFORMATION = ^FILE_FS_FULL_SIZE_INFORMATION;
-
- _FILE_FS_OBJECT_ID_INFORMATION = record
- VolumeObjectId: UUID;
- VolumeObjectIdExtendedInfo: array [0..11] of ULONG;
- end;
- FILE_FS_OBJECT_ID_INFORMATION = _FILE_FS_OBJECT_ID_INFORMATION;
- PFILE_FS_OBJECT_ID_INFORMATION = ^FILE_FS_OBJECT_ID_INFORMATION;
-
- _FILE_USER_QUOTA_INFORMATION = record
- NextEntryOffset: ULONG;
- SidLength: ULONG;
- ChangeTime: LARGE_INTEGER;
- QuotaUsed: LARGE_INTEGER;
- QuotaThreshold: LARGE_INTEGER;
- QuotaLimit: LARGE_INTEGER;
- Sid: array [0..0] of SID;
- end;
- FILE_USER_QUOTA_INFORMATION = _FILE_USER_QUOTA_INFORMATION;
- PFILE_USER_QUOTA_INFORMATION = ^FILE_USER_QUOTA_INFORMATION;
-
- _FILE_QUOTA_LIST_INFORMATION = record
- NextEntryOffset: ULONG;
- SidLength: ULONG;
- Sid: array [0..0] of SID;
- end;
- FILE_QUOTA_LIST_INFORMATION = _FILE_QUOTA_LIST_INFORMATION;
- PFILE_QUOTA_LIST_INFORMATION = ^FILE_QUOTA_LIST_INFORMATION;
-
-function NtQueryQuotaInformationFile(FileHandle: HANDLE; IoStatusBlock: PIO_STATUS_BLOCK; Buffer: PFILE_USER_QUOTA_INFORMATION; BufferLength: ULONG; ReturnSingleEntry: ByteBool; QuotaList: PFILE_QUOTA_LIST_INFORMATION; QuotaListLength: ULONG; ResumeSid: PSID; RestartScan: ByteBool): NTSTATUS; stdcall; external ntdll name 'NtQueryQuotaInformationFile';
-function NtSetQuotaInformationFile(FileHandle: HANDLE; IoStatusBlock: PIO_STATUS_BLOCK; Buffer: PFILE_USER_QUOTA_INFORMATION; BufferLength: ULONG): NTSTATUS; stdcall; external ntdll name 'NtSetQuotaInformationFile';
-function NtQueryAttributesFile(ObjectAttributes: POBJECT_ATTRIBUTES; FileInformation: PFILE_BASIC_INFORMATION): NTSTATUS; stdcall; external ntdll name 'NtQueryAttributesFile';
-function NtQueryFullAttributesFile(ObjectAttributes: POBJECT_ATTRIBUTES; FileInformation: PFILE_NETWORK_OPEN_INFORMATION): NTSTATUS; stdcall; external ntdll name 'NtQueryFullAttributesFile';
-function NtQueryInformationFile(FileHandle: HANDLE; IoStatusBlock: PIO_STATUS_BLOCK; FileInformation: PVOID; FileInformationLength: ULONG; FileInformationClass: FILE_INFORMATION_CLASS): NTSTATUS; stdcall; external ntdll name 'NtQueryInformationFile';
-function NtSetInformationFile(FileHandle: HANDLE; IoStatusBlock: PIO_STATUS_BLOCK; FileInformation: PVOID; FileInformationLength: ULONG; FileInformationClass: FILE_INFORMATION_CLASS): NTSTATUS; stdcall; external ntdll name 'NtSetInformationFile';
-function NtQueryDirectoryFile(FileHandle: HANDLE; Event: HANDLE; ApcRoutine: PIO_APC_ROUTINE; ApcContext: PVOID; IoStatusBlock: PIO_STATUS_BLOCK; FileInformation: PVOID; FileInformationLength: ULONG; FileInformationClass: FILE_INFORMATION_CLASS; ReturnSingleEntry: ByteBool; FileName: PUNICODE_STRING; RestartScan: ByteBool): NTSTATUS; stdcall; external ntdll name 'NtQueryDirectoryFile';
-
-type
- _FILE_DIRECTORY_INFORMATION = record // Information Class 1
- NextEntryOffset: ULONG;
- Unknown: ULONG;
- CreationTime: LARGE_INTEGER;
- LastAccessTime: LARGE_INTEGER;
- LastWriteTime: LARGE_INTEGER;
- ChangeTime: LARGE_INTEGER;
- EndOfFile: LARGE_INTEGER;
- AllocationSize: LARGE_INTEGER;
- FileAttributes: ULONG;
- FileNameLength: ULONG;
- FileName: array [0..0] of WCHAR
- end;
- FILE_DIRECTORY_INFORMATION = _FILE_DIRECTORY_INFORMATION;
- PFILE_DIRECTORY_INFORMATION = ^FILE_DIRECTORY_INFORMATION;
-
- _FILE_FULL_DIRECTORY_INFORMATION = record // Information Class 2
- NextEntryOffset: ULONG;
- Unknown: ULONG;
- CreationTime: LARGE_INTEGER;
- LastAccessTime: LARGE_INTEGER;
- LastWriteTime: LARGE_INTEGER;
- ChangeTime: LARGE_INTEGER;
- EndOfFile: LARGE_INTEGER;
- AllocationSize: LARGE_INTEGER;
- FileAttributes: ULONG;
- FileNameLength: ULONG;
- EaInformationLength: ULONG;
- FileName: array [0..0] of WCHAR
- end;
- FILE_FULL_DIRECTORY_INFORMATION = _FILE_FULL_DIRECTORY_INFORMATION;
- PFILE_FULL_DIRECTORY_INFORMATION = ^FILE_FULL_DIRECTORY_INFORMATION;
-
- _FILE_BOTH_DIRECTORY_INFORMATION = record // Information Class 3
- NextEntryOffset: ULONG;
- Unknown: ULONG;
- CreationTime: LARGE_INTEGER;
- LastAccessTime: LARGE_INTEGER;
- LastWriteTime: LARGE_INTEGER;
- ChangeTime: LARGE_INTEGER;
- EndOfFile: LARGE_INTEGER;
- AllocationSize: LARGE_INTEGER;
- FileAttributes: ULONG;
- FileNameLength: ULONG;
- EaInformationLength: ULONG;
- AlternateNameLength: UCHAR;
- AlternateName: array [0..11] of WCHAR;
- FileName: array [0..0] of WCHAR;
- end;
- FILE_BOTH_DIRECTORY_INFORMATION = _FILE_BOTH_DIRECTORY_INFORMATION;
- PFILE_BOTH_DIRECTORY_INFORMATION = ^FILE_BOTH_DIRECTORY_INFORMATION;
-
- _FILE_INTERNAL_INFORMATION = record // Information Class 6
- FileId: LARGE_INTEGER;
- end;
- FILE_INTERNAL_INFORMATION = _FILE_INTERNAL_INFORMATION;
- PFILE_INTERNAL_INFORMATION = ^FILE_INTERNAL_INFORMATION;
-
- _FILE_EA_INFORMATION = record // Information Class 7
- EaInformationLength: ULONG;
- end;
- FILE_EA_INFORMATION = _FILE_EA_INFORMATION;
- PFILE_EA_INFORMATION = ^FILE_EA_INFORMATION;
-
- _FILE_ACCESS_INFORMATION = record // Information Class 8
- GrantedAccess: ACCESS_MASK;
- end;
- FILE_ACCESS_INFORMATION = _FILE_ACCESS_INFORMATION;
- PFILE_ACCESS_INFORMATION = ^FILE_ACCESS_INFORMATION;
-
- _FILE_NAME_INFORMATION = record // Information Classes 9 and 21
- FileNameLength: ULONG;
- FileName: array [0..0] of WCHAR;
- end;
- FILE_NAME_INFORMATION = _FILE_NAME_INFORMATION;
- PFILE_NAME_INFORMATION = ^FILE_NAME_INFORMATION;
- FILE_ALTERNATE_NAME_INFORMATION = _FILE_NAME_INFORMATION;
- PFILE_ALTERNATE_NAME_INFORMATION = ^FILE_ALTERNATE_NAME_INFORMATION;
-
- _FILE_LINK_RENAME_INFORMATION = record // Info Classes 10 and 11
- ReplaceIfExists: ByteBool;
- RootDirectory: HANDLE;
- FileNameLength: ULONG;
- FileName: array [0..0] of WCHAR;
- end;
- FILE_LINK_INFORMATION = _FILE_LINK_RENAME_INFORMATION;
- PFILE_LINK_INFORMATION = ^FILE_LINK_INFORMATION;
- FILE_RENAME_INFORMATION = _FILE_LINK_RENAME_INFORMATION;
- PFILE_RENAME_INFORMATION= ^FILE_RENAME_INFORMATION;
-
- _FILE_NAMES_INFORMATION = record // Information Class 12
- NextEntryOffset: ULONG;
- Unknown: ULONG;
- FileNameLength: ULONG;
- FileName: array [0..0] of WCHAR;
- end;
- FILE_NAMES_INFORMATION = _FILE_NAMES_INFORMATION;
- PFILE_NAMES_INFORMATION = ^FILE_NAMES_INFORMATION;
-
- _FILE_MODE_INFORMATION = record // Information Class 16
- Mode: ULONG;
- end;
- FILE_MODE_INFORMATION = _FILE_MODE_INFORMATION;
- PFILE_MODE_INFORMATION = ^FILE_MODE_INFORMATION;
-
- _FILE_ALL_INFORMATION = record // Information Class 18
- BasicInformation: FILE_BASIC_INFORMATION;
- StandardInformation: FILE_STANDARD_INFORMATION;
- InternalInformation: FILE_INTERNAL_INFORMATION;
- EaInformation: FILE_EA_INFORMATION;
- AccessInformation: FILE_ACCESS_INFORMATION;
- PositionInformation: FILE_POSITION_INFORMATION;
- ModeInformation: FILE_MODE_INFORMATION;
- AlignmentInformation: FILE_ALIGNMENT_INFORMATION;
- NameInformation: FILE_NAME_INFORMATION;
- end;
- FILE_ALL_INFORMATION = _FILE_ALL_INFORMATION;
- PFILE_ALL_INFORMATION = ^FILE_ALL_INFORMATION;
-
- _FILE_ALLOCATION_INFORMATION = record // Information Class 19
- AllocationSize: LARGE_INTEGER;
- end;
- FILE_ALLOCATION_INFORMATION = _FILE_ALLOCATION_INFORMATION;
- PFILE_ALLOCATION_INFORMATION = ^FILE_ALLOCATION_INFORMATION;
-
- _FILE_STREAM_INFORMATION = record // Information Class 22
- NextEntryOffset: ULONG;
- StreamNameLength: ULONG;
- EndOfStream: LARGE_INTEGER;
- AllocationSize: LARGE_INTEGER;
- StreamName: array [0..0] of WCHAR;
- end;
- FILE_STREAM_INFORMATION = _FILE_STREAM_INFORMATION;
- PFILE_STREAM_INFORMATION = ^FILE_STREAM_INFORMATION;
-
- _FILE_PIPE_INFORMATION = record // Information Class 23
- ReadModeMessage: ULONG;
- WaitModeBlocking: ULONG;
- end;
- FILE_PIPE_INFORMATION = _FILE_PIPE_INFORMATION;
- PFILE_PIPE_INFORMATION = ^FILE_PIPE_INFORMATION;
-
- _FILE_PIPE_LOCAL_INFORMATION = record // Information Class 24
- MessageType: ULONG;
- Unknown1: ULONG;
- MaxInstances: ULONG;
- CurInstances: ULONG;
- InBufferSize: ULONG;
- Unknown2: ULONG;
- OutBufferSize: ULONG;
- Unknown3: array [0..1] of ULONG;
- ServerEnd: ULONG;
- end;
- FILE_PIPE_LOCAL_INFORMATION = _FILE_PIPE_LOCAL_INFORMATION;
- PFILE_PIPE_LOCAL_INFORMATION = ^FILE_PIPE_LOCAL_INFORMATION;
-
- _FILE_PIPE_REMOTE_INFORMATION = record // Information Class 25
- CollectDataTimeout: LARGE_INTEGER;
- MaxCollectionCount: ULONG;
- end;
- FILE_PIPE_REMOTE_INFORMATION = _FILE_PIPE_REMOTE_INFORMATION;
- PFILE_PIPE_REMOTE_INFORMATION = ^FILE_PIPE_REMOTE_INFORMATION;
-
- _FILE_MAILSLOT_QUERY_INFORMATION = record // Information Class 26
- MaxMessageSize: ULONG;
- Unknown: ULONG;
- NextSize: ULONG;
- MessageCount: ULONG;
- ReadTimeout: LARGE_INTEGER;
- end;
- FILE_MAILSLOT_QUERY_INFORMATION = _FILE_MAILSLOT_QUERY_INFORMATION;
- PFILE_MAILSLOT_QUERY_INFORMATION = ^FILE_MAILSLOT_QUERY_INFORMATION;
-
- _FILE_MAILSLOT_SET_INFORMATION = record // Information Class 27
- ReadTimeout: LARGE_INTEGER;
- end;
- FILE_MAILSLOT_SET_INFORMATION = _FILE_MAILSLOT_SET_INFORMATION;
- PFILE_MAILSLOT_SET_INFORMATION = ^FILE_MAILSLOT_SET_INFORMATION;
-
- _FILE_COMPRESSION_INFORMATION = record // Information Class 28
- CompressedSize: LARGE_INTEGER;
- CompressionFormat: USHORT;
- CompressionUnitShift: UCHAR;
- Unknown: UCHAR;
- ClusterSizeShift: UCHAR;
- end;
- FILE_COMPRESSION_INFORMATION = _FILE_COMPRESSION_INFORMATION;
- PFILE_COMPRESSION_INFORMATION = ^FILE_COMPRESSION_INFORMATION;
-
- _FILE_COMPLETION_INFORMATION = record // Information Class 30
- IoCompletionHandle: HANDLE;
- CompletionKey: ULONG;
- end;
- FILE_COMPLETION_INFORMATION = _FILE_COMPLETION_INFORMATION;
- PFILE_COMPLETION_INFORMATION = ^FILE_COMPLETION_INFORMATION;
-
-function NtCreateKey(KeyHandle: PHANDLE; DesiredAccess: ACCESS_MASK; ObjectAttributes: POBJECT_ATTRIBUTES; TitleIndex: ULONG; Class_: PUNICODE_STRING; CreateOptions: ULONG; Disposition: PULONG): NTSTATUS; stdcall; external ntdll name 'NtCreateKey';
-function NtOpenKey(KeyHandle: PHANDLE; DesiredAccess: ACCESS_MASK; ObjectAttributes: POBJECT_ATTRIBUTES): NTSTATUS; stdcall; external ntdll name 'NtOpenKey';
-function NtDeleteKey(KeyHandle: HANDLE): NTSTATUS; stdcall; external ntdll name 'NtDeleteKey';
-function NtFlushKey(KeyHandle: HANDLE): NTSTATUS; stdcall; external ntdll name 'NtFlushKey';
-function NtSaveKey(KeyHandle: HANDLE; FileHandle: HANDLE): NTSTATUS; stdcall; external ntdll name 'NtSaveKey';
-function NtSaveMergedKeys(KeyHandle1: HANDLE; KeyHandle2: HANDLE; FileHandle: HANDLE): NTSTATUS; stdcall; external ntdll name 'NtSaveMergedKeys';
-function NtRestoreKey(KeyHandle: HANDLE; FileHandle: HANDLE; Flags: ULONG): NTSTATUS; stdcall; external ntdll name 'NtRestoreKey';
-function NtLoadKey(KeyObjectAttributes: POBJECT_ATTRIBUTES; FileObjectAttributes: POBJECT_ATTRIBUTES): NTSTATUS; stdcall; external ntdll name 'NtLoadKey';
-function NtLoadKey2(KeyObjectAttributes: POBJECT_ATTRIBUTES; FileObjectAttributes: POBJECT_ATTRIBUTES; Flags: ULONG): NTSTATUS; stdcall; external ntdll name 'NtLoadKey2';
-function NtUnloadKey(KeyObjectAttributes: POBJECT_ATTRIBUTES): NTSTATUS; stdcall; external ntdll name 'NtUnloadKey';
-function NtReplaceKey(NewFileObjectAttributes: POBJECT_ATTRIBUTES; KeyHandle: HANDLE; OldFileObjectAttributes: POBJECT_ATTRIBUTES): NTSTATUS; stdcall; external ntdll name 'NtReplaceKey';
-function NtSetInformationKey(KeyHandle: HANDLE; KeyInformationClass: KEY_SET_INFORMATION_CLASS; KeyInformation: PVOID; KeyInformationLength: ULONG): NTSTATUS; stdcall; external ntdll name 'NtSetInformationKey';
-function NtQueryKey(KeyHandle: HANDLE; KeyInformationClass: KEY_INFORMATION_CLASS; KeyInformation: PVOID; KeyInformationLength: ULONG; ResultLength: PULONG): NTSTATUS; stdcall; external ntdll name 'NtQueryKey';
-function NtEnumerateKey(KeyHandle: HANDLE; Index: ULONG; KeyInformationClass: KEY_INFORMATION_CLASS; KeyInformation: PVOID; KeyInformationLength: ULONG; ResultLength: PULONG): NTSTATUS; stdcall; external ntdll name 'NtEnumerateKey';
-function NtNotifyChangeKey(KeyHandle: HANDLE; EventHandle: HANDLE; ApcRoutine: PIO_APC_ROUTINE; ApcContext: PVOID; IoStatusBlock: PIO_STATUS_BLOCK; NotifyFilter: ULONG; WatchSubtree: ByteBool; Buffer: PVOID; BufferLength: ULONG; Asynchronous: ByteBool): NTSTATUS; stdcall; external ntdll name 'NtNotifyChangeKey';
-function NtNotifyChangeMultipleKeys(KeyHandle: HANDLE; Flags: ULONG; KeyObjectAttributes: POBJECT_ATTRIBUTES; EventHandle: HANDLE; ApcRoutine: PIO_APC_ROUTINE; ApcContext: PVOID; IoStatusBlock: PIO_STATUS_BLOCK; NotifyFilter: ULONG; WatchSubtree: ByteBool; Buffer: PVOID; BufferLength: ULONG; Asynchronous: ByteBool): NTSTATUS; stdcall; external ntdll name 'NtNotifyChangeMultipleKeys';
-function NtDeleteValueKey(KeyHandle: HANDLE; ValueName: PUNICODE_STRING): NTSTATUS; stdcall; external ntdll name 'NtDeleteValueKey';
-function NtSetValueKey(KeyHandle: HANDLE; ValueName: PUNICODE_STRING; TitleIndex: ULONG; Type_: ULONG; Data: PVOID; DataSize: ULONG): NTSTATUS; stdcall; external ntdll name 'NtSetValueKey';
-function NtQueryValueKey(KeyHandle: HANDLE; ValueName: PUNICODE_STRING; KeyValueInformationClass: KEY_VALUE_INFORMATION_CLASS; KeyValueInformation: PVOID; KeyValueInformationLength: ULONG; ResultLength: PULONG): NTSTATUS; stdcall; external ntdll name 'NtQueryValueKey';
-function NtEnumerateValueKey(KeyHandle: HANDLE; Index: ULONG; KeyValueInformationClass: KEY_VALUE_INFORMATION_CLASS; KeyValueInformation: PVOID; KeyValueInformationLength: ULONG; ResultLength: PULONG): NTSTATUS; stdcall; external ntdll name 'NtEnumerateValueKey';
-function NtQueryMultipleValueKey(KeyHandle: HANDLE; ValueList: PKEY_VALUE_ENTRY; NumberOfValues: ULONG; Buffer: PVOID; Length: PULONG; ReturnLength: PULONG): NTSTATUS; stdcall; external ntdll name 'NtQueryMultipleValueKey';
-function NtPrivilegeCheck(TokenHandle: HANDLE; RequiredPrivileges: PPRIVILEGE_SET; Result: PBOOLEAN): NTSTATUS; stdcall; external ntdll name 'NtPrivilegeCheck';
-function NtPrivilegeObjectAuditAlarm(SubsystemName: PUNICODE_STRING; HandleId: PVOID; TokenHandle: HANDLE; DesiredAccess: ACCESS_MASK; Privileges: PPRIVILEGE_SET; AccessGranted: ByteBool): NTSTATUS; stdcall; external ntdll name 'NtPrivilegeObjectAuditAlarm';
-function NtPrivilegedServiceAuditAlarm(SubsystemName: PUNICODE_STRING; ServiceName: PUNICODE_STRING; TokenHandle: HANDLE; Privileges: PPRIVILEGE_SET; AccessGranted: ByteBool): NTSTATUS; stdcall; external ntdll name 'NtPrivilegedServiceAuditAlarm';
-function NtAccessCheck(SecurityDescriptor: PSECURITY_DESCRIPTOR; TokenHandle: HANDLE; DesiredAccess: ACCESS_MASK; GenericMapping: PGENERIC_MAPPING; PrivilegeSet: PPRIVILEGE_SET; PrivilegeSetLength: PULONG; GrantedAccess: PACCESS_MASK; AccessStatus: PBOOLEAN): NTSTATUS; stdcall; external ntdll name 'NtAccessCheck';
-function NtAccessCheckAndAuditAlarm(SubsystemName: PUNICODE_STRING; HandleId: PVOID; ObjectTypeName: PUNICODE_STRING; ObjectName: PUNICODE_STRING; SecurityDescriptor: PSECURITY_DESCRIPTOR; DesiredAccess: ACCESS_MASK; GenericMapping: PGENERIC_MAPPING; ObjectCreation: ByteBool; GrantedAccess: PACCESS_MASK; AccessStatus: PBOOLEAN; GenerateOnClose: PBOOLEAN): NTSTATUS; stdcall; external ntdll name 'NtAccessCheckAndAuditAlarm';
-function NtAccessCheckByType(SecurityDescriptor: PSECURITY_DESCRIPTOR; PrincipalSelfSid: PSID; TokenHandle: HANDLE; DesiredAccess: ULONG; ObjectTypeList: POBJECT_TYPE_LIST; ObjectTypeListLength: ULONG; GenericMapping: PGENERIC_MAPPING; PrivilegeSet: PPRIVILEGE_SET; PrivilegeSetLength: PULONG; GrantedAccess: PACCESS_MASK; AccessStatus: PULONG): NTSTATUS; stdcall; external ntdll name 'NtAccessCheckByType';
-function NtAccessCheckByTypeAndAuditAlarm(SubsystemName: PUNICODE_STRING; HandleId: PVOID; ObjectTypeName: PUNICODE_STRING; ObjectName: PUNICODE_STRING; SecurityDescriptor: PSECURITY_DESCRIPTOR; PrincipalSelfSid: PSID; DesiredAccess: ACCESS_MASK; AuditType: AUDIT_EVENT_TYPE; Flags: ULONG; ObjectTypeList: POBJECT_TYPE_LIST; ObjectTypeListLength: ULONG; GenericMapping: PGENERIC_MAPPING; ObjectCreation: ByteBool; GrantedAccess: PACCESS_MASK; AccessStatus: PULONG; GenerateOnClose: PBOOLEAN): NTSTATUS; stdcall; external ntdll name 'NtAccessCheckByTypeAndAuditAlarm';
-function NtAccessCheckByTypeResultList(SecurityDescriptor: PSECURITY_DESCRIPTOR; PrincipalSelfSid: PSID; TokenHandle: HANDLE; DesiredAccess: ACCESS_MASK; ObjectTypeList: POBJECT_TYPE_LIST; ObjectTypeListLength: ULONG; GenericMapping: PGENERIC_MAPPING; PrivilegeSet: PPRIVILEGE_SET; PrivilegeSetLength: PULONG; GrantedAccessList: PACCESS_MASK; AccessStatusList: PULONG): NTSTATUS; stdcall; external ntdll name 'NtAccessCheckByTypeResultList';
-function NtAccessCheckByTypeResultListAndAuditAlarm(SubsystemName: PUNICODE_STRING; HandleId: PVOID; ObjectTypeName: PUNICODE_STRING; ObjectName: PUNICODE_STRING; SecurityDescriptor: PSECURITY_DESCRIPTOR; PrincipalSelfSid: PSID; DesiredAccess: ACCESS_MASK; AuditType: AUDIT_EVENT_TYPE; Flags: ULONG; ObjectTypeList: POBJECT_TYPE_LIST; ObjectTypeListLength: ULONG; GenericMapping: PGENERIC_MAPPING; ObjectCreation: ByteBool; GrantedAccessList: PACCESS_MASK; AccessStatusList: PULONG; GenerateOnClose: PULONG): NTSTATUS; stdcall; external ntdll name 'NtAccessCheckByTypeResultListAndAuditAlarm';
-function NtAccessCheckByTypeResultListAndAuditAlarmByHandle(SubsystemName: PUNICODE_STRING; HandleId: PVOID; TokenHandle: HANDLE; ObjectTypeName: PUNICODE_STRING; ObjectName: PUNICODE_STRING; SecurityDescriptor: PSECURITY_DESCRIPTOR; PrincipalSelfSid: PSID; DesiredAccess: ACCESS_MASK; AuditType: AUDIT_EVENT_TYPE; Flags: ULONG; ObjectTypeList: POBJECT_TYPE_LIST; ObjectTypeListLength: ULONG; GenericMapping: PGENERIC_MAPPING; ObjectCreation: ByteBool; GrantedAccessList: PACCESS_MASK; AccessStatusList: PULONG; GenerateOnClose: PULONG): NTSTATUS; stdcall; external ntdll name 'NtAccessCheckByTypeResultListAndAuditAlarmByHandle';
-function NtOpenObjectAuditAlarm(SubsystemName: PUNICODE_STRING; HandleId: PPVOID; ObjectTypeName: PUNICODE_STRING; ObjectName: PUNICODE_STRING; SecurityDescriptor: PSECURITY_DESCRIPTOR; TokenHandle: HANDLE; DesiredAccess: ACCESS_MASK; GrantedAccess: ACCESS_MASK; Privileges: PPRIVILEGE_SET; ObjectCreation: ByteBool; AccessGranted: ByteBool; GenerateOnClose: PBOOLEAN): NTSTATUS; stdcall; external ntdll name 'NtOpenObjectAuditAlarm';
-function NtCloseObjectAuditAlarm(SubsystemName: PUNICODE_STRING; HandleId: PVOID; GenerateOnClose: ByteBool): NTSTATUS; stdcall; external ntdll name 'NtCloseObjectAuditAlarm';
-function NtDeleteObjectAuditAlarm(SubsystemName: PUNICODE_STRING; HandleId: PVOID; GenerateOnClose: ByteBool): NTSTATUS; stdcall; external ntdll name 'NtDeleteObjectAuditAlarm';
-function NtRequestWakeupLatency(Latency: LATENCY_TIME): NTSTATUS; stdcall; external ntdll name 'NtRequestWakeupLatency';
-function NtRequestDeviceWakeup(DeviceHandle: HANDLE): NTSTATUS; stdcall; external ntdll name 'NtRequestDeviceWakeup';
-function NtCancelDeviceWakeupRequest(DeviceHandle: HANDLE): NTSTATUS; stdcall; external ntdll name 'NtCancelDeviceWakeupRequest';
-function NtIsSystemResumeAutomatic: ByteBool; stdcall; external ntdll name 'NtIsSystemResumeAutomatic';
-
-type
- PEXECUTION_STATE = ^EXECUTION_STATE;
-
-function NtSetThreadExecutionState(ExecutionState: EXECUTION_STATE; PreviousExecutionState: PEXECUTION_STATE): NTSTATUS; stdcall; external ntdll name 'NtSetThreadExecutionState';
-function NtGetDevicePowerState(DeviceHandle: HANDLE; DevicePowerState: PDEVICE_POWER_STATE): NTSTATUS; stdcall; external ntdll name 'NtGetDevicePowerState';
-function NtSetSystemPowerState(SystemAction: POWER_ACTION; MinSystemState: SYSTEM_POWER_STATE; Flags: ULONG): NTSTATUS; stdcall; external ntdll name 'NtSetSystemPowerState';
-function NtInitiatePowerAction(SystemAction: POWER_ACTION; MinSystemState: SYSTEM_POWER_STATE; Flags: ULONG; Asynchronous: ByteBool): NTSTATUS; stdcall; external ntdll name 'NtInitiatePowerAction';
-function NtPowerInformation(PowerInformationLevel: POWER_INFORMATION_LEVEL; InputBuffer: PVOID; InputBufferLength: ULONG; OutputBuffer: PVOID; OutputBufferLength: ULONG): NTSTATUS; stdcall; external ntdll name 'NtPowerInformation';
-function NtGetPlugPlayEvent(Reserved1: ULONG; Reserved2: ULONG; Buffer: PVOID; BufferLength: ULONG): NTSTATUS; stdcall; external ntdll name 'NtGetPlugPlayEvent';
-function NtRaiseException(ExceptionRecord: PEXCEPTION_RECORD; Context: PCONTEXT; SearchFrames: ByteBool): NTSTATUS; stdcall; external ntdll name 'NtRaiseException';
-function NtContinue(Context: PCONTEXT; TestAlert: ByteBool): NTSTATUS; stdcall; external ntdll name 'NtContinue';
-
-// TODO NOT EXPORTED FROM NTDLL
-//function ZwW32Call(RoutineIndex: ULONG; Argument: PVOID; ArgumentLength: ULONG; Result: PPVOID; ResultLength: PULONG): NTSTATUS; stdcall; external ntdll name 'ZwW32Call';
-
-function NtCallbackReturn(Result: PVOID; ResultLength: ULONG; Status: NTSTATUS): NTSTATUS; stdcall; external ntdll name 'NtCallbackReturn';
-
-// TODO NOT EXPORTED FROM NTDLL
-//function ZwSetLowWaitHighThread: NTSTATUS; stdcall; external ntdll name 'ZwSetLowWaitHighThread';
-//function ZwSetHighWaitLowThread: NTSTATUS; stdcall; external ntdll name 'ZwSetHighWaitLowThread';
-
-function NtLoadDriver(DriverServiceName: PUNICODE_STRING): NTSTATUS; stdcall; external ntdll name 'NtLoadDriver';
-function NtUnloadDriver(DriverServiceName: PUNICODE_STRING): NTSTATUS; stdcall; external ntdll name 'NtUnloadDriver';
-function NtFlushInstructionCache(ProcessHandle: HANDLE; BaseAddress: PVOID; FlushSize: ULONG): NTSTATUS; stdcall; external ntdll name 'NtFlushInstructionCache';
-function NtFlushWriteBuffer: NTSTATUS; stdcall; external ntdll name 'NtFlushWriteBuffer';
-function NtQueryDefaultLocale(ThreadOrSystem: ByteBool; Locale: PLCID): NTSTATUS; stdcall; external ntdll name 'NtQueryDefaultLocale';
-function NtSetDefaultLocale(ThreadOrSystem: ByteBool; Locale: LCID): NTSTATUS; stdcall; external ntdll name 'NtSetDefaultLocale';
-
-type
- PLANGID = ^LANGID;
-
-function NtQueryDefaultUILanguage(LanguageId: PLANGID): NTSTATUS; stdcall; external ntdll name 'NtQueryDefaultUILanguage';
-function NtSetDefaultUILanguage(LanguageId: LANGID): NTSTATUS; stdcall; external ntdll name 'NtSetDefaultUILanguage';
-function NtQueryInstallUILanguage(LanguageId: PLANGID): NTSTATUS; stdcall; external ntdll name 'NtQueryInstallUILanguage';
-function NtAllocateLocallyUniqueId(Luid: PLUID): NTSTATUS; stdcall; external ntdll name 'NtAllocateLocallyUniqueId';
-function NtAllocateUuids(UuidLastTimeAllocated: PLARGE_INTEGER; UuidDeltaTime: PULONG; UuidSequenceNumber: PULONG; UuidSeed: PUCHAR): NTSTATUS; stdcall; external ntdll name 'NtAllocateUuids';
-function NtSetUuidSeed(UuidSeed: PUCHAR): NTSTATUS; stdcall; external ntdll name 'NtSetUuidSeed';
-function NtRaiseHardError(Status: NTSTATUS; NumberOfArguments: ULONG; StringArgumentsMask: ULONG; Arguments: PULONG; MessageBoxType: ULONG; MessageBoxResult: PULONG): NTSTATUS; stdcall; external ntdll name 'NtRaiseHardError';
-function NtSetDefaultHardErrorPort(PortHandle: HANDLE): NTSTATUS; stdcall; external ntdll name 'NtSetDefaultHardErrorPort';
-function NtDisplayString(Str: PUNICODE_STRING): NTSTATUS; stdcall; external ntdll name 'NtDisplayString';
-function NtCreatePagingFile(FileName: PUNICODE_STRING; InitialSize: PULARGE_INTEGER; MaximumSize: PULARGE_INTEGER; Reserved: ULONG): NTSTATUS; stdcall; external ntdll name 'NtCreatePagingFile';
-function NtAddAtom(Str: PWSTR; StringLength: ULONG; Atom: PUSHORT): NTSTATUS; stdcall; external ntdll name 'NtAddAtom';
-function NtFindAtom(Str: PWSTR; StringLength: ULONG; Atom: PUSHORT): NTSTATUS; stdcall; external ntdll name 'NtFindAtom';
-function NtDeleteAtom(Atom: USHORT): NTSTATUS; stdcall; external ntdll name 'NtDeleteAtom';
-
-type
- _ATOM_INFORMATION_CLASS = (AtomBasicInformation, AtomListInformation);
- ATOM_INFORMATION_CLASS = _ATOM_INFORMATION_CLASS;
-
-function NtQueryInformationAtom(Atom: USHORT; AtomInformationClass: ATOM_INFORMATION_CLASS; AtomInformation: PVOID; AtomInformationLength: ULONG; ReturnLength: PULONG): NTSTATUS; stdcall; external ntdll name 'NtQueryInformationAtom';
-
-type
- _ATOM_BASIC_INFORMATION = record
- ReferenceCount: USHORT;
- Pinned: USHORT;
- NameLength: USHORT;
- Name: array [0..0] of WCHAR;
- end;
- ATOM_BASIC_INFORMATION = _ATOM_BASIC_INFORMATION;
- PATOM_BASIC_INFORMATION = ^ATOM_BASIC_INFORMATION;
-
- _ATOM_LIST_INFORMATION = record
- NumberOfAtoms: ULONG;
- Atoms: array [0..0] of ATOM;
- end;
- ATOM_LIST_INFORMATION = _ATOM_LIST_INFORMATION;
- PATOM_LIST_INFORMATION = ^ATOM_LIST_INFORMATION;
-
-function NtSetLdtEntries(Selector1: ULONG; LdtEntry1: LDT_ENTRY; Selector2: ULONG; LdtEntry2: LDT_ENTRY): NTSTATUS; stdcall; external ntdll name 'NtSetLdtEntries';
-function NtVdmControl(ControlCode: ULONG; ControlData: PVOID): NTSTATUS; stdcall; external ntdll name 'NtVdmControl';
-
-//==============================================================================
-// NTFS on disk structure structures
-//==============================================================================
-
-type
- _NTFS_RECORD_HEADER = record
- Type_: ULONG;
- UsaOffset: USHORT;
- UsaCount: USHORT;
- Usn: USN;
- end;
- NTFS_RECORD_HEADER = _NTFS_RECORD_HEADER;
- PNTFS_RECORD_HEADER = ^NTFS_RECORD_HEADER;
-
- _FILE_RECORD_HEADER = record
- Ntfs: NTFS_RECORD_HEADER;
- SequenceNumber: USHORT;
- LinkCount: USHORT;
- AttributesOffset: USHORT;
- Flags: USHORT; // 0x0001 = InUse, 0x0002 = Directory
- BytesInUse: ULONG;
- BytesAllocated: ULONG;
- BaseFileRecord: ULONGLONG;
- NextAttributeNumber: USHORT;
- end;
- FILE_RECORD_HEADER = _FILE_RECORD_HEADER;
- PFILE_RECORD_HEADER = ^FILE_RECORD_HEADER;
-
-const
- AttributeStandardInformation = $10;
- AttributeAttributeList = $20;
- AttributeFileName = $30;
- AttributeObjectId = $40;
- AttributeSecurityDescriptor = $50;
- AttributeVolumeName = $60;
- AttributeVolumeInformation = $70;
- AttributeData = $80;
- AttributeIndexRoot = $90;
- AttributeIndexAllocation = $A0;
- AttributeBitmap = $B0;
- AttributeReparsePoint = $C0;
- AttributeEAInformation = $D0;
- AttributeEA = $E0;
- AttributePropertySet = $F0;
- AttributeLoggedUtilityStream = $100;
-
-type
- ATTRIBUTE_TYPE = AttributeStandardInformation..AttributeLoggedUtilityStream;
- PATTRIBUTE_TYPE = ^ATTRIBUTE_TYPE;
-
- _ATTRIBUTE = record
- AttributeType: ATTRIBUTE_TYPE;
- Length: ULONG;
- Nonresident: ByteBool;
- NameLength: UCHAR;
- NameOffset: USHORT;
- Flags: USHORT; // 0x0001 = Compressed
- AttributeNumber: USHORT;
- end;
- ATTRIBUTE = _ATTRIBUTE;
- PATTRIBUTE = ^ATTRIBUTE;
-
- _RESIDENT_ATTRIBUTE = record
- Attribute: ATTRIBUTE;
- ValueLength: ULONG;
- ValueOffset: USHORT;
- Flags: USHORT; // 0x0001 = Indexed
- end;
- RESIDENT_ATTRIBUTE = _RESIDENT_ATTRIBUTE;
- PRESIDENT_ATTRIBUTE = ^RESIDENT_ATTRIBUTE;
-
- _NONRESIDENT_ATTRIBUTE = record
- Attribute: ATTRIBUTE;
- LowVcn: ULONGLONG;
- HighVcn: ULONGLONG;
- RunArrayOffset: USHORT;
- CompressionUnit: UCHAR;
- AlignmentOrReserved: array [0..4] of UCHAR;
- AllocatedSize: ULONGLONG;
- DataSize: ULONGLONG;
- InitializedSize: ULONGLONG;
- CompressedSize: ULONGLONG; // Only when compressed
- end;
- NONRESIDENT_ATTRIBUTE = _NONRESIDENT_ATTRIBUTE;
- PNONRESIDENT_ATTRIBUTE = ^NONRESIDENT_ATTRIBUTE;
-
- _STANDARD_INFORMATION = record
- CreationTime: ULONGLONG;
- ChangeTime: ULONGLONG;
- LastWriteTime: ULONGLONG;
- LastAccessTime: ULONGLONG;
- FileAttributes: ULONG;
- AlignmentOrReservedOrUnknown: array [0..2] of ULONG;
- QuotaId: ULONG; // NTFS 3.0 only
- SecurityId: ULONG; // NTFS 3.0 only
- QuotaCharge: ULONGLONG; // NTFS 3.0 only
- Usn: USN; // NTFS 3.0 only
- end;
- STANDARD_INFORMATION = _STANDARD_INFORMATION;
- PSTANDARD_INFORMATION = ^STANDARD_INFORMATION;
-
- _ATTRIBUTE_LIST = record
- AttributeType: ATTRIBUTE_TYPE;
- Length: USHORT;
- NameLength: UCHAR;
- NameOffset: UCHAR;
- LowVcn: ULONGLONG;
- FileReferenceNumber: ULONGLONG;
- AttributeNumber: USHORT;
- AlignmentOrReserved: array [0..2] of USHORT;
- end;
- ATTRIBUTE_LIST = _ATTRIBUTE_LIST;
- PATTRIBUTE_LIST = ^ATTRIBUTE_LIST;
-
- _FILENAME_ATTRIBUTE = record
- DirectoryFileReferenceNumber: ULONGLONG;
- CreationTime: ULONGLONG; // Saved when filename last changed
- ChangeTime: ULONGLONG; // ditto
- LastWriteTime: ULONGLONG; // ditto
- LastAccessTime: ULONGLONG; // ditto
- AllocatedSize: ULONGLONG; // ditto
- DataSize: ULONGLONG; // ditto
- FileAttributes: ULONG; // ditto
- AlignmentOrReserved: ULONG;
- NameLength: UCHAR;
- NameType: UCHAR; // 0x01 = Long, 0x02 = Short
- Name: array [0..0] of UCHAR;
- end;
- FILENAME_ATTRIBUTE = _FILENAME_ATTRIBUTE;
- PFILENAME_ATTRIBUTE = ^FILENAME_ATTRIBUTE;
-
- _OBJECTID_ATTRIBUTE = record
- ObjectId: GUID;
- case Integer of
- 0: (
- BirthVolumeId: GUID;
- BirthObjectId: GUID;
- DomainId: GUID);
- 1: (
- ExtendedInfo: array [0..47] of UCHAR);
- end;
- OBJECTID_ATTRIBUTE = _OBJECTID_ATTRIBUTE;
- POBJECTID_ATTRIBUTE = ^OBJECTID_ATTRIBUTE;
-
- _VOLUME_INFORMATION = record
- Unknown: array [0..1] of ULONG;
- MajorVersion: UCHAR;
- MinorVersion: UCHAR;
- Flags: USHORT;
- end;
- VOLUME_INFORMATION = _VOLUME_INFORMATION;
- PVOLUME_INFORMATION = ^VOLUME_INFORMATION;
-
- _DIRECTORY_INDEX = record
- EntriesOffset: ULONG;
- IndexBlockLength: ULONG;
- AllocatedSize: ULONG;
- Flags: ULONG; // 0x00 = Small directory, 0x01 = Large directory
- end;
- DIRECTORY_INDEX = _DIRECTORY_INDEX;
- PDIRECTORY_INDEX = ^DIRECTORY_INDEX;
-
- _DIRECTORY_ENTRY = record
- FileReferenceNumber: ULONGLONG;
- Length: USHORT;
- AttributeLength: USHORT;
- Flags: ULONG; // 0x01 = Has trailing VCN, 0x02 = Last entry
- // FILENAME_ATTRIBUTE Name;
- // ULONGLONG Vcn; // VCN in IndexAllocation of earlier entries
- end;
- DIRECTORY_ENTRY = _DIRECTORY_ENTRY;
- PDIRECTORY_ENTRY = ^DIRECTORY_ENTRY;
-
- _INDEX_ROOT = record
- Type_: ATTRIBUTE_TYPE;
- CollationRule: ULONG;
- BytesPerIndexBlock: ULONG;
- ClustersPerIndexBlock: ULONG;
- DirectoryIndex: DIRECTORY_INDEX;
- end;
- INDEX_ROOT = _INDEX_ROOT;
- PINDEX_ROOT = ^INDEX_ROOT;
-
- _INDEX_BLOCK_HEADER = record
- Ntfs: NTFS_RECORD_HEADER;
- IndexBlockVcn: ULONGLONG;
- DirectoryIndex: DIRECTORY_INDEX;
- end;
- INDEX_BLOCK_HEADER = _INDEX_BLOCK_HEADER;
- PINDEX_BLOCK_HEADER = ^INDEX_BLOCK_HEADER;
-
- _REPARSE_POINT = record
- ReparseTag: ULONG;
- ReparseDataLength: USHORT;
- Reserved: USHORT;
- ReparseData: array [0..0] of UCHAR;
- end;
- REPARSE_POINT = _REPARSE_POINT;
- PREPARSE_POINT = ^REPARSE_POINT;
-
- _EA_INFORMATION = record
- EaLength: ULONG;
- EaQueryLength: ULONG;
- end;
- EA_INFORMATION = _EA_INFORMATION;
- PEA_INFORMATION = ^EA_INFORMATION;
-
- _EA_ATTRIBUTE = record
- NextEntryOffset: ULONG;
- Flags: UCHAR;
- EaNameLength: UCHAR;
- EaValueLength: USHORT;
- EaName: array [0..0] of CHAR;
- // UCHAR EaData[];
- end;
- EA_ATTRIBUTE = _EA_ATTRIBUTE;
- PEA_ATTRIBUTE = ^EA_ATTRIBUTE;
-
- _ATTRIBUTE_DEFINITION = record
- AttributeName: array [0..63] of WCHAR;
- AttributeNumber: ULONG;
- Unknown: array [0..1] of ULONG;
- Flags: ULONG;
- MinimumSize: ULONGLONG;
- MaximumSize: ULONGLONG;
- end;
- ATTRIBUTE_DEFINITION = _ATTRIBUTE_DEFINITION;
- PATTRIBUTE_DEFINITION = ^ATTRIBUTE_DEFINITION;
-
- _BOOT_BLOCK = record
- Jump: array [0..2] of UCHAR;
- Format: array [0..7] of UCHAR;
- BytesPerSector: USHORT;
- SectorsPerCluster: UCHAR;
- BootSectors: USHORT;
- Mbz1: UCHAR;
- Mbz2: USHORT;
- Reserved1: USHORT;
- MediaType: UCHAR;
- Mbz3: USHORT;
- SectorsPerTrack: USHORT;
- NumberOfHeads: USHORT;
- PartitionOffset: ULONG;
- Reserved2: array [0..1] of ULONG;
- TotalSectors: ULONGLONG;
- MftStartLcn: ULONGLONG;
- Mft2StartLcn: ULONGLONG;
- ClustersPerFileRecord: ULONG;
- ClustersPerIndexBlock: ULONG;
- VolumeSerialNumber: ULONGLONG;
- Code: array [0..$1AD] of UCHAR;
- BootSignature: USHORT;
- end;
- BOOT_BLOCK = _BOOT_BLOCK;
- PBOOT_BLOCK = ^BOOT_BLOCK;
-
-//==============================================================================
-// Loader API
-//==============================================================================
-
-function LdrDisableThreadCalloutsForDll(hModule: HANDLE): NTSTATUS; stdcall; external ntdll name 'LdrDisableThreadCalloutsForDll';
-function LdrGetDllHandle(pwPath: PWORD; pReserved: PVOID; pusPath: PUNICODE_STRING; phModule: PHANDLE): NTSTATUS; stdcall; external ntdll name 'LdrGetDllHandle';
-function LdrGetProcedureAddress(hModule: HANDLE; dOrdinal: DWORD; psName: PSTRING; ppProcedure: PPVOID): NTSTATUS; stdcall; external ntdll name 'LdrGetProcedureAddress';
-function LdrLoadDll(pwPath: PWORD; pdFlags: PDWORD; pusPath: PUNICODE_STRING; phModule: PHANDLE): NTSTATUS; stdcall; external ntdll name 'LdrLoadDll';
-function LdrQueryProcessModuleInformation(psmi: PSYSTEM_MODULE_INFORMATION; dSize: DWORD; pdSize: PDWORD): NTSTATUS; stdcall; external ntdll name 'LdrQueryProcessModuleInformation';
-function LdrQueryImageFileExecutionOptions (pusImagePath: PUNICODE_STRING; pwOptionName: PWORD; dRequestedType: DWORD; pData: PVOID; dSize: DWORD; pdSize: PDWORD): NTSTATUS; stdcall; external ntdll name 'LdrQueryImageFileExecutionOptions ';
-function LdrUnloadDll(hModule: HANDLE): NTSTATUS; stdcall; external ntdll name 'LdrUnloadDll';
-
-//LdrAccessResource
-//LdrAlternateResourcesEnabled
-//LdrEnumResources
-//LdrFindEntryForAddress
-//LdrFindResourceDirectory_U
-//LdrFindResource_U
-//LdrFlushAlternateResourceModules
-//LdrInitializeThunk
-//LdrLoadAlternateResourceModule
-//LdrProcessRelocationBlock
-//LdrShutdownProcess
-//LdrShutdownThread
-//LdrUnloadAlternateResourceModule
-//LdrVerifyImageMatchesChecksum
-
-//==============================================================================
-// CSR
-//==============================================================================
-
-//CsrAllocateCaptureBuffer
-//CsrAllocateMessagePointer
-//CsrCaptureMessageBuffer
-//CsrCaptureMessageString
-//CsrCaptureTimeout
-//CsrClientCallServer
-//CsrClientConnectToServer
-//CsrFreeCaptureBuffer
-//CsrIdentifyAlertableThread
-//CsrNewThread
-//CsrProbeForRead
-//CsrProbeForWrite
-//CsrSetPriorityClass
-
-//==============================================================================
-// Debug
-//==============================================================================
-
-//DbgPrompt
-//DbgSsHandleKmApiMsg
-//DbgSsInitialize
-//DbgUiConnectToDbg
-//DbgUiContinue
-//DbgUiWaitStateChange
-//DbgUserBreakPoint
-
-//
-// Define kernel debugger print prototypes and macros.
-//
-// N.B. The following function cannot be directly imported because there are
-// a few places in the source tree where this function is redefined.
-//
-
-//procedure DbgBreakPoint;
-//procedure DbgBreakPointWithStatus(Status: ULONG); stdcall; external ntdll name 'DbgBreakPointWithStatus';
-
-const
- DBG_STATUS_CONTROL_C = 1;
- DBG_STATUS_SYSRQ = 2;
- DBG_STATUS_BUGCHECK_FIRST = 3;
- DBG_STATUS_BUGCHECK_SECOND = 4;
- DBG_STATUS_FATAL = 5;
- DBG_STATUS_DEBUG_CONTROL = 6;
-
-//function DbgPrint(Format: PCH; ...): ULONG; cdecl;
-//function DbgPrintReturnControlC(Format: PCH; ...): ULONG; cdecl;
-
-//==============================================================================
-// Runtime Library
-//==============================================================================
-
-const
- RTL_RANGE_LIST_ADD_IF_CONFLICT = $00000001;
- RTL_RANGE_LIST_ADD_SHARED = $00000002;
-
-const
- RTL_RANGE_LIST_SHARED_OK = $00000001;
- RTL_RANGE_LIST_NULL_CONFLICT_OK = $00000002;
-
-type
- PRTL_CONFLICT_RANGE_CALLBACK = function(Context: PVOID; Range: PRTL_RANGE): ByteBool; stdcall;
-
-type
- _OSVERSIONINFOW = record
- dwOSVersionInfoSize: ULONG;
- dwMajorVersion: ULONG;
- dwMinorVersion: ULONG;
- dwBuildNumber: ULONG;
- dwPlatformId: ULONG;
- szCSDVersion: array [0..127] of WCHAR; // Maintenance string for PSS usage
- end;
- OSVERSIONINFOW = _OSVERSIONINFOW;
- POSVERSIONINFOW = ^OSVERSIONINFOW;
- LPOSVERSIONINFOW = ^OSVERSIONINFOW;
- RTL_OSVERSIONINFOW = OSVERSIONINFOW;
- PRTL_OSVERSIONINFOW = ^OSVERSIONINFOW;
-
- OSVERSIONINFO = OSVERSIONINFOW;
- POSVERSIONINFO = POSVERSIONINFOW;
- LPOSVERSIONINFO = LPOSVERSIONINFOW;
-
-const
- VER_PLATFORM_WIN32s = 0;
- VER_PLATFORM_WIN32_WINDOWS = 1;
- VER_PLATFORM_WIN32_NT = 2;
-
-type
- _RTL_BITMAP = record
- SizeOfBitMap: ULONG; // Number of bits in bit map
- Buffer: PULONG; // Pointer to the bit map itself
- end;
- RTL_BITMAP = _RTL_BITMAP;
- PRTL_BITMAP = ^RTL_BITMAP;
-
-const
- RTL_REGISTRY_ABSOLUTE = 0; // Path is a full path
- RTL_REGISTRY_SERVICES = 1; // \Registry\Machine\System\CurrentControlSet\Services
- RTL_REGISTRY_CONTROL = 2; // \Registry\Machine\System\CurrentControlSet\Control
- RTL_REGISTRY_WINDOWS_NT = 3; // \Registry\Machine\Software\Microsoft\Windows NT\CurrentVersion
- RTL_REGISTRY_DEVICEMAP = 4; // \Registry\Machine\Hardware\DeviceMap
- RTL_REGISTRY_USER = 5; // \Registry\User\CurrentUser
- RTL_REGISTRY_MAXIMUM = 6;
- RTL_REGISTRY_HANDLE = $40000000; // Low order bits are registry handle
- RTL_REGISTRY_OPTIONAL = $80000000; // Indicates the key node is optional
-
-type
- _TIME_FIELDS = record
- Year: CSHORT; // range [1601...]
- Month: CSHORT; // range [1..12]
- Day: CSHORT; // range [1..31]
- Hour: CSHORT; // range [0..23]
- Minute: CSHORT; // range [0..59]
- Second: CSHORT; // range [0..59]
- Milliseconds: CSHORT; // range [0..999]
- Weekday: CSHORT; // range [0..6] == [Sunday..Saturday]
- end;
- TIME_FIELDS = _TIME_FIELDS;
- PTIME_FIELDS = ^TIME_FIELDS;
-
-type
- _OSVERSIONINFOEXW =record
- dwOSVersionInfoSize: ULONG;
- dwMajorVersion: ULONG;
- dwMinorVersion: ULONG;
- dwBuildNumber: ULONG;
- dwPlatformId: ULONG;
- szCSDVersion: array [0..127] of WCHAR; // Maintenance string for PSS usage
- wServicePackMajor: USHORT;
- wServicePackMinor: USHORT;
- wSuiteMask: USHORT;
- wProductType: UCHAR;
- wReserved: UCHAR;
- end;
- OSVERSIONINFOEXW = _OSVERSIONINFOEXW;
- POSVERSIONINFOEXW = ^OSVERSIONINFOEXW;
- LPOSVERSIONINFOEXW = ^OSVERSIONINFOEXW;
- RTL_OSVERSIONINFOEXW = OSVERSIONINFOEXW;
- PRTL_OSVERSIONINFOEXW = ^OSVERSIONINFOEXW;
-
- OSVERSIONINFOEX = OSVERSIONINFOEXW;
- POSVERSIONINFOEX = POSVERSIONINFOEXW;
- LPOSVERSIONINFOEX = LPOSVERSIONINFOEXW;
-
-//
-// RtlVerifyVersionInfo() conditions
-//
-
-const
- VER_EQUAL = 1;
- VER_GREATER = 2;
- VER_GREATER_EQUAL = 3;
- VER_LESS = 4;
- VER_LESS_EQUAL = 5;
- VER_AND = 6;
- VER_OR = 7;
-
- VER_CONDITION_MASK = 7;
- VER_NUM_BITS_PER_CONDITION_MASK = 3;
-
-//
-// RtlVerifyVersionInfo() type mask bits
-//
-
- VER_MINORVERSION = $0000001;
- VER_MAJORVERSION = $0000002;
- VER_BUILDNUMBER = $0000004;
- VER_PLATFORMID = $0000008;
- VER_SERVICEPACKMINOR = $0000010;
- VER_SERVICEPACKMAJOR = $0000020;
- VER_SUITENAME = $0000040;
- VER_PRODUCT_TYPE = $0000080;
-
-//
-// RtlVerifyVersionInfo() os product type values
-//
-
- VER_NT_WORKSTATION = $0000001;
- VER_NT_DOMAIN_CONTROLLER = $0000002;
- VER_NT_SERVER = $0000003;
-
-type
- PRTL_QUERY_REGISTRY_ROUTINE = function(ValueName: PWSTR; ValueType: ULONG;
- ValueData: PVOID; ValueLength: ULONG; Context, EntryContext: PVOID): NTSTATUS; stdcall;
-
- _RTL_QUERY_REGISTRY_TABLE = record
- QueryRoutine: PRTL_QUERY_REGISTRY_ROUTINE;
- Flags: ULONG;
- Name: PWSTR;
- EntryContext: PVOID;
- DefaultType: ULONG;
- DefaultData: PVOID;
- DefaultLength: ULONG;
- end;
- RTL_QUERY_REGISTRY_TABLE = _RTL_QUERY_REGISTRY_TABLE;
- PRTL_QUERY_REGISTRY_TABLE = ^RTL_QUERY_REGISTRY_TABLE;
-
- REFGUID = ^GUID;
-
-function RtlAddRange(RangeList: PRTL_RANGE_LIST; Start, End_: ULONGLONG; Attributes: UCHAR; Flags: ULONG; UserData, Owner: PVOID): NTSTATUS; stdcall; external ntdll name 'RtlAddRange'; external;
-function RtlAnsiStringToUnicodeString(DestinationString: PUNICODE_STRING; SourceString: PANSI_STRING; AllocateDestinationString: ByteBool): NTSTATUS; stdcall; external ntdll name 'RtlAnsiStringToUnicodeString'; external;
-function RtlAppendUnicodeStringToString(Destination, Source: PUNICODE_STRING): NTSTATUS; stdcall; external ntdll name 'RtlAppendUnicodeStringToString'; external;
-function RtlAppendUnicodeToString(Destination: PUNICODE_STRING; Source: LPCWSTR): NTSTATUS; stdcall; external ntdll name 'RtlAppendUnicodeToString';
-function RtlAreBitsClear(BitMapHeader: PRTL_BITMAP; StartingIndex, Length: ULONG): ByteBool; stdcall; external ntdll name 'RtlAreBitsClear';
-function RtlAreBitsSet(BitMapHeader: PRTL_BITMAP; StartingIndex, Length: ULONG): ByteBool; stdcall; external ntdll name 'RtlAreBitsSet';
-procedure RtlAssert(FailedAssertion, FileName: PVOID; LineNumber: ULONG; Message: PCHAR); stdcall; external ntdll name 'RtlAssert';
-function RtlCharToInteger(Str: PCSZ; Base: ULONG; Value: PULONG): NTSTATUS; stdcall; external ntdll name 'RtlCharToInteger';
-function RtlCheckRegistryKey(RelativeTo: ULONG; Path: PWSTR): NTSTATUS; stdcall; external ntdll name 'RtlCheckRegistryKey';
-procedure RtlClearAllBits(BitMapHeader: PRTL_BITMAP); stdcall; external ntdll name 'RtlClearAllBits';
-procedure RtlClearBits(BitMapHeader: PRTL_BITMAP; StartingIndex, NumberToClear: ULONG); stdcall; external ntdll name 'RtlClearBits';
-function RtlCompareMemory(Source1, Source2: LPVOID; Length: SIZE_T): SIZE_T; stdcall; external ntdll name 'RtlCompareMemory';
-function RtlCompareString(String1, String2: PSTRING; CaseInSensitive: ByteBool): LONG; stdcall; external ntdll name 'RtlCompareString';
-function RtlCompareUnicodeString(String1, String2: PUNICODE_STRING; CaseInSensitive: ByteBool): LONG; stdcall; external ntdll name 'RtlCompareUnicodeString';
-function RtlConvertLongToLargeInteger(SignedInteger: LONG): LARGE_INTEGER; stdcall; external ntdll name 'RtlConvertLongToLargeInteger';
-function RtlConvertUlongToLargeInteger(UnsignedInteger: ULONG): LARGE_INTEGER; stdcall; external ntdll name 'RtlConvertUlongToLargeInteger';
-function RtlCopyRangeList(CopyRangeList: PRTL_RANGE_LIST; RangeList: PRTL_RANGE_LIST): NTSTATUS; stdcall; external ntdll name 'RtlCopyRangeList';
-procedure RtlCopyString(DestinationString, SourceString: PSTRING); stdcall; external ntdll name 'RtlCopyString';
-procedure RtlCopyUnicodeString(DestinationString, SourceString: PUNICODE_STRING); stdcall; external ntdll name 'RtlCopyUnicodeString';
-function RtlCreateRegistryKey(RelativeTo: ULONG; Path: PWSTR): NTSTATUS; stdcall; external ntdll name 'RtlCreateRegistryKey';
-function RtlCreateSecurityDescriptor(SecurityDescriptor: PSECURITY_DESCRIPTOR; Revision: ULONG): NTSTATUS; stdcall; external ntdll name 'RtlCreateSecurityDescriptor';
-function RtlDeleteOwnersRanges(RangeList: PRTL_RANGE_LIST; Owner: PVOID): NTSTATUS; stdcall; external ntdll name 'RtlDeleteOwnersRanges';
-function RtlDeleteRange(RangeList: PRTL_RANGE_LIST; Start, End_: ULONGLONG; Owner: PVOID): NTSTATUS; stdcall; external ntdll name 'RtlDeleteRange';
-function RtlDeleteRegistryValue(RelativeTo: ULONG; Path, ValueName: LPCWSTR): NTSTATUS; stdcall; external ntdll name 'RtlDeleteRegistryValue';
-function RtlEqualString(String1, String2: PSTRING; CaseInSensitive: ByteBool): ByteBool; stdcall; external ntdll name 'RtlEqualString';
-function RtlEqualUnicodeString(String1, String2: PUNICODE_STRING; CaseInSensitive: ByteBool): ByteBool; stdcall; external ntdll name 'RtlEqualUnicodeString';
-function RtlExtendedIntegerMultiply(Multiplicand: LARGE_INTEGER; Multiplier: LONG): LARGE_INTEGER; stdcall; external ntdll name 'RtlExtendedIntegerMultiply';
-function RtlExtendedLargeIntegerDivide(Dividend: LARGE_INTEGER; Divisor: ULONG; Remainder: PULONG): LARGE_INTEGER; stdcall; external ntdll name 'RtlExtendedLargeIntegerDivide';
-function RtlExtendedMagicDivide(Dividend, MagicDivisor: LARGE_INTEGER; ShiftCount: CCHAR): LARGE_INTEGER; stdcall; external ntdll name 'RtlExtendedMagicDivide';
-procedure RtlFillMemory(Destination: LPVOID; Length: SIZE_T; Fill: UCHAR); stdcall; external ntdll name 'RtlFillMemory';
-function RtlFindClearBits(BitMapHeader: PRTL_BITMAP; NumberToFind, HintIndex: ULONG): ULONG; stdcall; external ntdll name 'RtlFindClearBits';
-function RtlFindClearBitsAndSet(BitMapHeader: PRTL_BITMAP; NumberToFind, HintIndex: ULONG): ULONG; stdcall; external ntdll name 'RtlFindClearBitsAndSet';
-function RtlFindLastBackwardRunClear(BitMapHeader: PRTL_BITMAP; FromIndex: ULONG; StartingRunIndex: PULONG): ULONG; stdcall; external ntdll name 'RtlFindLastBackwardRunClear';
-function RtlFindLeastSignificantBit(Set_: ULONGLONG): CCHAR; stdcall; external ntdll name 'RtlFindLeastSignificantBit';
-function RtlFindLongestRunClear(BitMapHeader: PRTL_BITMAP; StartingIndex: PULONG): ULONG; stdcall; external ntdll name 'RtlFindLongestRunClear';
-function RtlFindMostSignificantBit(Set_: ULONGLONG): CCHAR; stdcall; external ntdll name 'RtlFindMostSignificantBit';
-function RtlFindNextForwardRunClear(BitMapHeader: PRTL_BITMAP; FromIndex: ULONG; StartingRunIndex: PULONG): ULONG; stdcall; external ntdll name 'RtlFindNextForwardRunClear';
-function RtlFindRange(RangeList: PRTL_RANGE_LIST; Minimum, Maximum: ULONGLONG; Length, Alignment, Flags: ULONG; AttributeAvailableMask: UCHAR; Context: PVOID; Callback: PRTL_CONFLICT_RANGE_CALLBACK; Start: PULONGLONG): NTSTATUS; stdcall; external ntdll name 'RtlFindRange';
-function RtlFindSetBits(BitMapHeader: PRTL_BITMAP; NumberToFind, HintIndex: ULONG): ULONG; stdcall; external ntdll name 'RtlFindSetBits';
-function RtlFindSetBitsAndClear(BitMapHeader: PRTL_BITMAP; NumberToFind, HintIndex: ULONG): ULONG; stdcall; external ntdll name 'RtlFindSetBitsAndClear';
-procedure RtlFreeAnsiString(AnsiString: PANSI_STRING); stdcall; external ntdll name 'RtlFreeAnsiString';
-procedure RtlFreeRangeList(RangeList: PRTL_RANGE_LIST); stdcall; external ntdll name 'RtlFreeRangeList';
-procedure RtlFreeUnicodeString(UnicodeString: PUNICODE_STRING); stdcall; external ntdll name 'RtlFreeUnicodeString';
-function RtlGUIDFromString(GuidString: PUNICODE_STRING; Guid: LPGUID): NTSTATUS; stdcall; external ntdll name 'RtlGUIDFromString';
-procedure RtlGetCallersAddress(CallersAddress, CallersCaller: PPVOID); stdcall; external ntdll name 'RtlGetCallersAddress';
-function RtlGetFirstRange(RangeList: PRTL_RANGE_LIST; Iterator: PRTL_RANGE_LIST_ITERATOR; var Range: PRTL_RANGE): NTSTATUS; stdcall; external ntdll name 'RtlGetFirstRange';
-function RtlGetNextRange(Iterator: PRTL_RANGE_LIST_ITERATOR; var Range: PRTL_RANGE; MoveForwards: ByteBool): NTSTATUS; stdcall; external ntdll name 'RtlGetNextRange';
-function RtlGetVersion(lpVersionInformation: PRTL_OSVERSIONINFOW): NTSTATUS; stdcall; external ntdll name 'RtlGetVersion';
-procedure RtlInitAnsiString(DestinationString: PANSI_STRING; SourceString: PCSZ); stdcall; external ntdll name 'RtlInitAnsiString';
-procedure RtlInitString(DestinationString: PSTRING; SourceString: PCSZ); stdcall; external ntdll name 'RtlInitString';
-procedure RtlInitUnicodeString(DestinationString: PUNICODE_STRING; SourceString: LPCWSTR); stdcall; external ntdll name 'RtlInitUnicodeString';
-procedure RtlInitializeBitMap(BitMapHeader: PRTL_BITMAP; BitMapBuffer: PULONG; SizeOfBitMap: ULONG); stdcall; external ntdll name 'RtlInitializeBitMap';
-procedure RtlInitializeRangeList(RangeList: PRTL_RANGE_LIST); stdcall; external ntdll name 'RtlInitializeRangeList';
-function RtlInt64ToUnicodeString(Value: ULONGLONG; Base: ULONG; Str: PUNICODE_STRING): NTSTATUS; stdcall; external ntdll name 'RtlInt64ToUnicodeString';
-function RtlIntegerToUnicodeString(Value, Base: ULONG; Str: PUNICODE_STRING): NTSTATUS; stdcall; external ntdll name 'RtlIntegerToUnicodeString';
-function RtlInvertRangeList(InvertedRangeList: PRTL_RANGE_LIST; RangeList: PRTL_RANGE_LIST): NTSTATUS; stdcall; external ntdll name 'RtlInvertRangeList';
-function RtlIsRangeAvailable(RangeList: PRTL_RANGE_LIST; Start, End_: ULONGLONG; Flags: ULONG; AttributeAvailableMask: UCHAR; Context: PVOID; Callback: PRTL_CONFLICT_RANGE_CALLBACK; Available: PBOOLEAN): NTSTATUS; stdcall; external ntdll name 'RtlIsRangeAvailable';
-function RtlLargeIntegerArithmeticShift(LargeInteger: LARGE_INTEGER; ShiftCount: CCHAR): LARGE_INTEGER; stdcall; external ntdll name 'RtlLargeIntegerArithmeticShift';
-function RtlLargeIntegerDivide(Dividend, Divisor: LARGE_INTEGER; Remainder: PLARGE_INTEGER): LARGE_INTEGER; stdcall; external ntdll name 'RtlLargeIntegerDivide';
-function RtlLargeIntegerShiftLeft(LargeInteger: LARGE_INTEGER; ShiftCount: CCHAR): LARGE_INTEGER; stdcall; external ntdll name 'RtlLargeIntegerShiftLeft';
-function RtlLargeIntegerShiftRight(LargeInteger: LARGE_INTEGER; ShiftCount: CCHAR): LARGE_INTEGER; stdcall; external ntdll name 'RtlLargeIntegerShiftRight';
-function RtlLengthSecurityDescriptor(SecurityDescriptor: PSECURITY_DESCRIPTOR): ULONG; stdcall; external ntdll name 'RtlLengthSecurityDescriptor';
-procedure RtlMapGenericMask(AccessMask: PACCESS_MASK; GenericMapping: PGENERIC_MAPPING); stdcall; external ntdll name 'RtlMapGenericMask';
-function RtlMergeRangeLists(MergedRangeList: PRTL_RANGE_LIST; RangeList1, RangeList2: PRTL_RANGE_LIST; Flags: ULONG): NTSTATUS; stdcall; external ntdll name 'RtlMergeRangeLists';
-procedure RtlMoveMemory(Destination, Source: LPVOID; Length: SIZE_T); stdcall; external ntdll name 'RtlMoveMemory';
-function RtlNumberOfClearBits(BitMapHeader: PRTL_BITMAP): ULONG; stdcall; external ntdll name 'RtlNumberOfClearBits';
-function RtlNumberOfSetBits(BitMapHeader: PRTL_BITMAP): ULONG; stdcall; external ntdll name 'RtlNumberOfSetBits';
-function RtlPrefixUnicodeString(String1, String2: PUNICODE_STRING; CaseInSensitive: ByteBool): ByteBool; stdcall; external ntdll name 'RtlPrefixUnicodeString';
-function RtlQueryRegistryValues(RelativeTo: ULONG; Path: LPCWSTR; QueryTable: PRTL_QUERY_REGISTRY_TABLE; Context, Environment: PVOID): NTSTATUS; stdcall; external ntdll name 'RtlQueryRegistryValues';
-procedure RtlSetAllBits(BitMapHeader: PRTL_BITMAP); stdcall; external ntdll name 'RtlSetAllBits';
-procedure RtlSetBits(BitMapHeader: PRTL_BITMAP; StartingIndex, NumberToSet: ULONG); stdcall; external ntdll name 'RtlSetBits';
-function RtlSetDaclSecurityDescriptor(SecurityDescriptor: PSECURITY_DESCRIPTOR; DaclPresent: ByteBool; Dacl: PACL; DaclDefaulted: ByteBool): NTSTATUS; stdcall; external ntdll name 'RtlSetDaclSecurityDescriptor';
-function RtlStringFromGUID(Guid: REFGUID; GuidString: PUNICODE_STRING): NTSTATUS; stdcall; external ntdll name 'RtlStringFromGUID';
-function RtlTimeFieldsToTime(TimeFields: PTIME_FIELDS; Time: PLARGE_INTEGER): ByteBool; stdcall; external ntdll name 'RtlTimeFieldsToTime';
-procedure RtlTimeToTimeFields(Time: PLARGE_INTEGER; TimeFields: PTIME_FIELDS); stdcall; external ntdll name 'RtlTimeToTimeFields';
-function RtlUnicodeStringToAnsiString(DestinationString: PANSI_STRING; SourceString: PUNICODE_STRING; AllocateDestinationString: ByteBool): NTSTATUS; stdcall; external ntdll name 'RtlUnicodeStringToAnsiString';
-function RtlUnicodeStringToInteger(Str: PUNICODE_STRING; Base: ULONG; Value: PULONG): NTSTATUS; stdcall; external ntdll name 'RtlUnicodeStringToInteger';
-function RtlUpcaseUnicodeChar(SourceCharacter: WCHAR): WCHAR; stdcall; external ntdll name 'RtlUpcaseUnicodeChar';
-function RtlUpcaseUnicodeString(DestinationString: PUNICODE_STRING; SourceString: PCUNICODE_STRING; AllocateDestinationString: ByteBool): NTSTATUS; stdcall; external ntdll name 'RtlUpcaseUnicodeString';
-function RtlUpperChar(Character: CHAR): CHAR; stdcall; external ntdll name 'RtlUpperChar';
-procedure RtlUpperString(DestinationString, SourceString: PSTRING); stdcall; external ntdll name 'RtlUpperString';
-function RtlValidRelativeSecurityDescriptor(SecurityDescriptorInput: PSECURITY_DESCRIPTOR; SecurityDescriptorLength: ULONG; RequiredInformation: SECURITY_INFORMATION): ByteBool; stdcall; external ntdll name 'RtlValidRelativeSecurityDescriptor';
-function RtlValidSecurityDescriptor(SecurityDescriptor: PSECURITY_DESCRIPTOR): ByteBool; stdcall; external ntdll name 'RtlValidSecurityDescriptor';
-function RtlVerifyVersionInfo(VersionInfo: PRTL_OSVERSIONINFOEXW; TypeMask: ULONG; ConditionMask: ULONGLONG): NTSTATUS; stdcall; external ntdll name 'RtlVerifyVersionInfo';
-function RtlWriteRegistryValue(RelativeTo: ULONG; Path: LPCWSTR; ValueName: LPCWSTR; ValueType: ULONG; ValueData: PVOID; ValueLength: ULONG): NTSTATUS; stdcall; external ntdll name 'RtlWriteRegistryValue';
-procedure RtlZeroMemory(Destination: LPVOID; Length: SIZE_T); stdcall; external ntdll name 'RtlZeroMemory';
-function RtlxAnsiStringToUnicodeSize(AnsiString: PANSI_STRING): ULONG; stdcall; external ntdll name 'RtlxAnsiStringToUnicodeSize';
-
-implementation
-
-
-{ some 300 other RTL functions exported from ntdll but for which i don't have
- a prototype yet. also interesting is ntoskrnl.exe
-RtlAbortRXact
-RtlAbsoluteToSelfRelativeSD
-RtlAcquirePebLock
-RtlAcquireResourceExclusive
-RtlAcquireResourceShared
-RtlAddAccessAllowedAce
-RtlAddAccessAllowedAceEx
-RtlAddAccessAllowedObjectAce
-RtlAddAccessDeniedAce
-RtlAddAccessDeniedAceEx
-RtlAddAccessDeniedObjectAce
-RtlAddAce
-RtlAddActionToRXact
-RtlAddAtomToAtomTable
-RtlAddAttributeActionToRXact
-RtlAddAuditAccessAce
-RtlAddAuditAccessAceEx
-RtlAddAuditAccessObjectAce
-RtlAddCompoundAce
-RtlAdjustPrivilege
-RtlAllocateAndInitializeSid
-RtlAllocateHandle
-RtlAllocateHeap
-RtlAnsiCharToUnicodeChar
-RtlAnsiStringToUnicodeSize
-RtlAppendAsciizToString
-RtlAppendStringToString
-RtlApplyRXact
-RtlApplyRXactNoFlush
-RtlAreAllAccessesGranted
-RtlAreAnyAccessesGranted
-RtlCallbackLpcClient
-RtlCancelTimer
-RtlCaptureStackBackTrace
-RtlCheckForOrphanedCriticalSections
-RtlCompactHeap
-RtlCompareMemoryUlong
-RtlCompressBuffer
-RtlConsoleMultiByteToUnicodeN
-RtlConvertExclusiveToShared
-RtlConvertPropertyToVariant
-RtlConvertSharedToExclusive
-RtlConvertSidToUnicodeString
-RtlConvertToAutoInheritSecurityObject
-RtlConvertUiListToApiList
-RtlConvertVariantToProperty
-RtlCopyLuid
-RtlCopyLuidAndAttributesArray
-RtlCopySecurityDescriptor
-RtlCopySid
-RtlCopySidAndAttributesArray
-RtlCreateAcl
-RtlCreateAndSetSD
-RtlCreateAtomTable
-RtlCreateEnvironment
-RtlCreateHeap
-RtlCreateLpcServer
-RtlCreateProcessParameters
-RtlCreateQueryDebugBuffer
-RtlCreateTagHeap
-RtlCreateTimer
-RtlCreateTimerQueue
-RtlCreateUnicodeString
-RtlCreateUnicodeStringFromAsciiz
-RtlCreateUserProcess
-RtlCreateUserSecurityObject
-RtlCreateUserThread
-RtlCustomCPToUnicodeN
-RtlCutoverTimeToSystemTime
-RtlDeNormalizeProcessParams
-RtlDebugPrintTimes
-RtlDecompressBuffer
-RtlDecompressFragment
-RtlDefaultNpAcl
-RtlDelete
-RtlDeleteAce
-RtlDeleteAtomFromAtomTable
-RtlDeleteCriticalSection
-RtlDeleteElementGenericTable
-RtlDeleteNoSplay
-RtlDeleteResource
-RtlDeleteSecurityObject
-RtlDeleteTimer
-RtlDeleteTimerQueue
-RtlDeleteTimerQueueEx
-RtlDeregisterWait
-RtlDeregisterWaitEx
-RtlDestroyAtomTable
-RtlDestroyEnvironment
-RtlDestroyHandleTable
-RtlDestroyHeap
-RtlDestroyProcessParameters
-RtlDestroyQueryDebugBuffer
-RtlDetermineDosPathNameType_U
-RtlDnsHostNameToComputerName
-RtlDoesFileExists_U
-RtlDosPathNameToNtPathName_U
-RtlDosSearchPath_U
-RtlDowncaseUnicodeString
-RtlDumpResource
-RtlEmptyAtomTable
-RtlEnableEarlyCriticalSectionEventCreation
-RtlEnlargedIntegerMultiply
-RtlEnlargedUnsignedDivide
-RtlEnlargedUnsignedMultiply
-RtlEnterCriticalSection
-RtlEnumProcessHeaps
-RtlEnumerateGenericTable
-RtlEnumerateGenericTableWithoutSplaying
-RtlEqualComputerName
-RtlEqualDomainName
-RtlEqualLuid
-RtlEqualPrefixSid
-RtlEqualSid
-RtlEraseUnicodeString
-RtlExpandEnvironmentStrings_U
-RtlExtendHeap
-RtlFillMemoryUlong
-RtlFindMessage
-RtlFirstFreeAce
-RtlFormatCurrentUserKeyPath
-RtlFormatMessage
-RtlFreeHandle
-RtlFreeHeap
-RtlFreeOemString
-RtlFreeSid
-RtlFreeUserThreadStack
-RtlGenerate8dot3Name
-RtlGetAce
-RtlGetCompressionWorkSpaceSize
-RtlGetControlSecurityDescriptor
-RtlGetCurrentDirectory_U
-RtlGetDaclSecurityDescriptor
-RtlGetElementGenericTable
-RtlGetFullPathName_U
-RtlGetGroupSecurityDescriptor
-RtlGetLongestNtPathLength
-RtlGetNtGlobalFlags
-RtlGetNtProductType
-RtlGetOwnerSecurityDescriptor
-RtlGetProcessHeaps
-RtlGetSaclSecurityDescriptor
-RtlGetSecurityDescriptorRMControl
-RtlGetUserInfoHeap
-RtlIdentifierAuthoritySid
-RtlImageDirectoryEntryToData
-RtlImageNtHeader
-RtlImageRvaToSection
-RtlImageRvaToVa
-RtlImpersonateLpcClient
-RtlImpersonateSelf
-RtlInitCodePageTable
-RtlInitNlsTables
-RtlInitializeAtomPackage
-RtlInitializeContext
-RtlInitializeCriticalSection
-RtlInitializeCriticalSectionAndSpinCount
-RtlInitializeGenericTable
-RtlInitializeHandleTable
-RtlInitializeRXact
-RtlInitializeResource
-RtlInitializeSid
-RtlInsertElementGenericTable
-RtlIntegerToChar
-RtlIsDosDeviceName_U
-RtlIsGenericTableEmpty
-RtlIsNameLegalDOS8Dot3
-RtlIsTextUnicode
-RtlIsValidHandle
-RtlIsValidIndexHandle
-RtlLargeIntegerAdd
-RtlLargeIntegerNegate
-RtlLargeIntegerSubtract
-RtlLargeIntegerToChar
-RtlLeaveCriticalSection
-RtlLengthRequiredSid
-RtlLengthSid
-RtlLocalTimeToSystemTime
-RtlLockHeap
-RtlLookupAtomInAtomTable
-RtlLookupElementGenericTable
-RtlMakeSelfRelativeSD
-RtlMultiByteToUnicodeN
-RtlMultiByteToUnicodeSize
-RtlNewInstanceSecurityObject
-RtlNewSecurityGrantedAccess
-RtlNewSecurityObject
-RtlNewSecurityObjectEx
-RtlNormalizeProcessParams
-RtlNtStatusToDosError
-RtlNumberGenericTableElements
-RtlOemStringToUnicodeSize
-RtlOemStringToUnicodeString
-RtlOemToUnicodeN
-RtlOpenCurrentUser
-RtlPcToFileHeader
-RtlPinAtomInAtomTable
-RtlPrefixString
-RtlProtectHeap
-RtlQueryAtomInAtomTable
-RtlQueryEnvironmentVariable_U
-RtlQueryInformationAcl
-RtlQueryProcessBackTraceInformation
-RtlQueryProcessDebugInformation
-RtlQueryProcessHeapInformation
-RtlQueryProcessLockInformation
-RtlQuerySecurityObject
-RtlQueryTagHeap
-RtlQueryTimeZoneInformation
-RtlQueueWorkItem
-RtlRaiseException
-RtlRaiseStatus
-RtlRandom
-RtlReAllocateHeap
-RtlRealPredecessor
-RtlRealSuccessor
-RtlRegisterWait
-RtlReleasePebLock
-RtlReleaseResource
-RtlRemoteCall
-RtlResetRtlTranslations
-RtlRunDecodeUnicodeString
-RtlRunEncodeUnicodeString
-RtlSecondsSince1970ToTime
-RtlSecondsSince1980ToTime
-RtlSelfRelativeToAbsoluteSD
-RtlSelfRelativeToAbsoluteSD2
-RtlSetAttributesSecurityDescriptor
-RtlSetControlSecurityDescriptor
-RtlSetCriticalSectionSpinCount
-RtlSetCurrentDirectory_U
-RtlSetCurrentEnvironment
-RtlSetEnvironmentVariable
-RtlSetGroupSecurityDescriptor
-RtlSetInformationAcl
-RtlSetIoCompletionCallback
-RtlSetOwnerSecurityDescriptor
-RtlSetSaclSecurityDescriptor
-RtlSetSecurityDescriptorRMControl
-RtlSetSecurityObject
-RtlSetSecurityObjectEx
-RtlSetThreadPoolStartFunc
-RtlSetTimeZoneInformation
-RtlSetTimer
-RtlSetUnicodeCallouts
-RtlSetUserFlagsHeap
-RtlSetUserValueHeap
-RtlShutdownLpcServer
-RtlSizeHeap
-RtlSplay
-RtlStartRXact
-RtlSubAuthorityCountSid
-RtlSubAuthoritySid
-RtlSubtreePredecessor
-RtlSubtreeSuccessor
-RtlSystemTimeToLocalTime
-RtlTimeToElapsedTimeFields
-RtlTimeToSecondsSince1970
-RtlTimeToSecondsSince1980
-RtlTryEnterCriticalSection
-//ULONG FASTCALL RtlUlongByteSwap(IN ULONG Source);
-//ULONGLONG FASTCALL RtlUlonglongByteSwap(IN ULONGLONG Source);
-RtlUnicodeStringToAnsiSize
-RtlUnicodeStringToCountedOemString
-RtlUnicodeStringToOemSize
-RtlUnicodeStringToOemString
-RtlUnicodeToCustomCPN
-RtlUnicodeToMultiByteN
-RtlUnicodeToMultiByteSize
-RtlUnicodeToOemN
-RtlUniform
-RtlUnlockHeap
-RtlUnwind
-RtlUpcaseUnicodeStringToAnsiString
-RtlUpcaseUnicodeStringToCountedOemString
-RtlUpcaseUnicodeStringToOemString
-RtlUpcaseUnicodeToCustomCPN
-RtlUpcaseUnicodeToMultiByteN
-RtlUpcaseUnicodeToOemN
-RtlUpdateTimer
-RtlUsageHeap
-//USHORT FASTCALL RtlUshortByteSwap(IN USHORT Source);
-RtlValidAcl
-RtlValidSid
-RtlValidateHeap
-RtlValidateProcessHeaps
-RtlWalkFrameChain
-RtlWalkHeap
-RtlZeroHeap
-RtlpNtCreateKey
-RtlpNtEnumerateSubKey
-RtlpNtMakeTemporaryKey
-RtlpNtOpenKey
-RtlpNtQueryValueKey
-RtlpNtSetValueKey
-RtlpUnWaitCriticalSection
-RtlpWaitForCriticalSection
-RtlxOemStringToUnicodeSize
-RtlxUnicodeStringToAnsiSize
-RtlxUnicodeStringToOemSize
-}
-end.
+// Interface unit for the Windows NT Native API
+// Copyright (C) 1999, 2000 Marcel van Brakel
+
+// $Id: jwanative.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaNative;
+
+interface
+
+uses
+ JwaWinBase, JwaWinNT, JwaWinType;
+
+{$WEAKPACKAGEUNIT}
+{$I jediapilib.inc}
+
+const
+ ntdll = 'ntdll.dll';
+
+//------------------------------------------------------------------------------
+
+// Temporaries from NTDDK.H to be removed when fully converted.
+
+type
+ _CLIENT_ID = record
+ UniqueProcess: HANDLE;
+ UniqueThread: HANDLE;
+ end;
+ CLIENT_ID = _CLIENT_ID;
+ PCLIENT_ID = ^CLIENT_ID;
+ TClientID = CLIENT_ID;
+ PClientID = ^TClientID;
+
+ KPRIORITY = LONG;
+
+ _KWAIT_REASON = (
+ Executive,
+ FreePage,
+ PageIn,
+ PoolAllocation,
+ DelayExecution,
+ Suspended,
+ UserRequest,
+ WrExecutive,
+ WrFreePage,
+ WrPageIn,
+ WrPoolAllocation,
+ WrDelayExecution,
+ WrSuspended,
+ WrUserRequest,
+ WrEventPair,
+ WrQueue,
+ WrLpcReceive,
+ WrLpcReply,
+ WrVirtualMemory,
+ WrPageOut,
+ WrRendezvous,
+ Spare2,
+ Spare3,
+ Spare4,
+ Spare5,
+ Spare6,
+ WrKernel,
+ MaximumWaitReason);
+ KWAIT_REASON = _KWAIT_REASON;
+
+ _VM_COUNTERS = record
+ PeakVirtualSize: SIZE_T;
+ VirtualSize: SIZE_T;
+ PageFaultCount: ULONG;
+ PeakWorkingSetSize: SIZE_T;
+ WorkingSetSize: SIZE_T;
+ QuotaPeakPagedPoolUsage: SIZE_T;
+ QuotaPagedPoolUsage: SIZE_T;
+ QuotaPeakNonPagedPoolUsage: SIZE_T;
+ QuotaNonPagedPoolUsage: SIZE_T;
+ PagefileUsage: SIZE_T;
+ PeakPagefileUsage: SIZE_T;
+ end;
+ VM_COUNTERS = _VM_COUNTERS;
+ PVM_COUNTERS = ^VM_COUNTERS;
+
+const
+ NonPagedPool = 0;
+ PagedPool = 1;
+ NonPagedPoolMustSucceed = 2;
+ DontUseThisType = 3;
+ NonPagedPoolCacheAligned = 4;
+ PagedPoolCacheAligned = 5;
+ NonPagedPoolCacheAlignedMustS = 6;
+ MaxPoolType = 7;
+ NonPagedPoolSession = 32;
+ PagedPoolSession = NonPagedPoolSession + 1;
+ NonPagedPoolMustSucceedSession = PagedPoolSession + 1;
+ DontUseThisTypeSession = NonPagedPoolMustSucceedSession + 1;
+ NonPagedPoolCacheAlignedSession = DontUseThisTypeSession + 1;
+ PagedPoolCacheAlignedSession = NonPagedPoolCacheAlignedSession + 1;
+ NonPagedPoolCacheAlignedMustSSession = PagedPoolCacheAlignedSession + 1;
+
+type
+ POOL_TYPE = NonPagedPool..NonPagedPoolCacheAlignedMustSSession;
+
+ _IO_STATUS_BLOCK = record
+ //union {
+ Status: NTSTATUS;
+ // PVOID Pointer;
+ //}
+ Information: ULONG_PTR;
+ end;
+ IO_STATUS_BLOCK = _IO_STATUS_BLOCK;
+ PIO_STATUS_BLOCK = ^IO_STATUS_BLOCK;
+
+const
+ ViewShare = 1;
+ ViewUnmap = 2;
+
+type
+ SECTION_INHERIT = ViewShare..ViewUnmap;
+
+ _THREADINFOCLASS = (
+ ThreadBasicInformation,
+ ThreadTimes,
+ ThreadPriority,
+ ThreadBasePriority,
+ ThreadAffinityMask,
+ ThreadImpersonationToken,
+ ThreadDescriptorTableEntry,
+ ThreadEnableAlignmentFaultFixup,
+ ThreadEventPair_Reusable,
+ ThreadQuerySetWin32StartAddress,
+ ThreadZeroTlsCell,
+ ThreadPerformanceCount,
+ ThreadAmILastThread,
+ ThreadIdealProcessor,
+ ThreadPriorityBoost,
+ ThreadSetTlsArrayAddress,
+ ThreadIsIoPending,
+ ThreadHideFromDebugger,
+ MaxThreadInfoClass);
+ THREADINFOCLASS = _THREADINFOCLASS;
+
+ KAFFINITY = ULONG;
+ PKAFFINITY = ^KAFFINITY;
+
+ PKNORMAL_ROUTINE = procedure(NormalContext, SystemArgument1, SystemArgument2: PVOID); stdcall;
+
+ _PROCESSINFOCLASS = (
+ ProcessBasicInformation,
+ ProcessQuotaLimits,
+ ProcessIoCounters,
+ ProcessVmCounters,
+ ProcessTimes,
+ ProcessBasePriority,
+ ProcessRaisePriority,
+ ProcessDebugPort,
+ ProcessExceptionPort,
+ ProcessAccessToken,
+ ProcessLdtInformation,
+ ProcessLdtSize,
+ ProcessDefaultHardErrorMode,
+ ProcessIoPortHandlers, // Note: this is kernel mode only
+ ProcessPooledUsageAndLimits,
+ ProcessWorkingSetWatch,
+ ProcessUserModeIOPL,
+ ProcessEnableAlignmentFaultFixup,
+ ProcessPriorityClass,
+ ProcessWx86Information,
+ ProcessHandleCount,
+ ProcessAffinityMask,
+ ProcessPriorityBoost,
+ ProcessDeviceMap,
+ ProcessSessionInformation,
+ ProcessForegroundInformation,
+ ProcessWow64Information,
+ MaxProcessInfoClass);
+ PROCESSINFOCLASS = _PROCESSINFOCLASS;
+
+ _KPROFILE_SOURCE = (
+ ProfileTime,
+ ProfileAlignmentFixup,
+ ProfileTotalIssues,
+ ProfilePipelineDry,
+ ProfileLoadInstructions,
+ ProfilePipelineFrozen,
+ ProfileBranchInstructions,
+ ProfileTotalNonissues,
+ ProfileDcacheMisses,
+ ProfileIcacheMisses,
+ ProfileCacheMisses,
+ ProfileBranchMispredictions,
+ ProfileStoreInstructions,
+ ProfileFpInstructions,
+ ProfileIntegerInstructions,
+ Profile2Issue,
+ Profile3Issue,
+ Profile4Issue,
+ ProfileSpecialInstructions,
+ ProfileTotalCycles,
+ ProfileIcacheIssues,
+ ProfileDcacheAccesses,
+ ProfileMemoryBarrierCycles,
+ ProfileLoadLinkedIssues,
+ ProfileMaximum);
+ KPROFILE_SOURCE = _KPROFILE_SOURCE;
+
+ PIO_APC_ROUTINE = procedure(ApcContext: PVOID; IoStatusBlock: PIO_STATUS_BLOCK; Reserved: ULONG); stdcall;
+
+ _FILE_FULL_EA_INFORMATION = record
+ NextEntryOffset: ULONG;
+ Flags: UCHAR;
+ EaNameLength: UCHAR;
+ EaValueLength: USHORT;
+ EaName: array [0..0] of CHAR;
+ end;
+ FILE_FULL_EA_INFORMATION = _FILE_FULL_EA_INFORMATION;
+ PFILE_FULL_EA_INFORMATION = ^FILE_FULL_EA_INFORMATION;
+
+ _FSINFOCLASS = (
+ FileFsFiller0,
+ FileFsVolumeInformation, // 1
+ FileFsLabelInformation, // 2
+ FileFsSizeInformation, // 3
+ FileFsDeviceInformation, // 4
+ FileFsAttributeInformation, // 5
+ FileFsControlInformation, // 6
+ FileFsFullSizeInformation, // 7
+ FileFsObjectIdInformation, // 8
+ FileFsMaximumInformation);
+ FS_INFORMATION_CLASS = _FSINFOCLASS;
+ PFS_INFORMATION_CLASS = ^FS_INFORMATION_CLASS;
+
+ UUID = GUID;
+
+ _FILE_BASIC_INFORMATION = record
+ CreationTime: LARGE_INTEGER;
+ LastAccessTime: LARGE_INTEGER;
+ LastWriteTime: LARGE_INTEGER;
+ ChangeTime: LARGE_INTEGER;
+ FileAttributes: ULONG;
+ end;
+ FILE_BASIC_INFORMATION = _FILE_BASIC_INFORMATION;
+ PFILE_BASIC_INFORMATION = ^FILE_BASIC_INFORMATION;
+
+ _FILE_NETWORK_OPEN_INFORMATION = record
+ CreationTime: LARGE_INTEGER;
+ LastAccessTime: LARGE_INTEGER;
+ LastWriteTime: LARGE_INTEGER;
+ ChangeTime: LARGE_INTEGER;
+ AllocationSize: LARGE_INTEGER;
+ EndOfFile: LARGE_INTEGER;
+ FileAttributes: ULONG;
+ end;
+ FILE_NETWORK_OPEN_INFORMATION = _FILE_NETWORK_OPEN_INFORMATION;
+ PFILE_NETWORK_OPEN_INFORMATION = ^FILE_NETWORK_OPEN_INFORMATION;
+
+ _FILE_INFORMATION_CLASS = (
+ FileFiller0,
+ FileDirectoryInformation, // 1
+ FileFullDirectoryInformation, // 2
+ FileBothDirectoryInformation, // 3
+ FileBasicInformation, // 4 wdm
+ FileStandardInformation, // 5 wdm
+ FileInternalInformation, // 6
+ FileEaInformation, // 7
+ FileAccessInformation, // 8
+ FileNameInformation, // 9
+ FileRenameInformation, // 10
+ FileLinkInformation, // 11
+ FileNamesInformation, // 12
+ FileDispositionInformation, // 13
+ FilePositionInformation, // 14 wdm
+ FileFullEaInformation, // 15
+ FileModeInformation, // 16
+ FileAlignmentInformation, // 17
+ FileAllInformation, // 18
+ FileAllocationInformation, // 19
+ FileEndOfFileInformation, // 20 wdm
+ FileAlternateNameInformation, // 21
+ FileStreamInformation, // 22
+ FilePipeInformation, // 23
+ FilePipeLocalInformation, // 24
+ FilePipeRemoteInformation, // 25
+ FileMailslotQueryInformation, // 26
+ FileMailslotSetInformation, // 27
+ FileCompressionInformation, // 28
+ FileObjectIdInformation, // 29
+ FileCompletionInformation, // 30
+ FileMoveClusterInformation, // 31
+ FileQuotaInformation, // 32
+ FileReparsePointInformation, // 33
+ FileNetworkOpenInformation, // 34
+ FileAttributeTagInformation, // 35
+ FileTrackingInformation, // 36
+ FileMaximumInformation);
+ FILE_INFORMATION_CLASS = _FILE_INFORMATION_CLASS;
+ PFILE_INFORMATION_CLASS = ^FILE_INFORMATION_CLASS;
+
+ _FILE_STANDARD_INFORMATION = record
+ AllocationSize: LARGE_INTEGER;
+ EndOfFile: LARGE_INTEGER;
+ NumberOfLinks: ULONG;
+ DeletePending: ByteBool;
+ Directory: ByteBool;
+ end;
+ FILE_STANDARD_INFORMATION = _FILE_STANDARD_INFORMATION;
+ PFILE_STANDARD_INFORMATION = ^FILE_STANDARD_INFORMATION;
+
+ _FILE_POSITION_INFORMATION = record
+ CurrentByteOffset: LARGE_INTEGER;
+ end;
+ FILE_POSITION_INFORMATION = _FILE_POSITION_INFORMATION;
+ PFILE_POSITION_INFORMATION = ^FILE_POSITION_INFORMATION;
+
+ _FILE_ALIGNMENT_INFORMATION = record
+ AlignmentRequirement: ULONG;
+ end;
+ FILE_ALIGNMENT_INFORMATION = _FILE_ALIGNMENT_INFORMATION;
+ PFILE_ALIGNMENT_INFORMATION = ^FILE_ALIGNMENT_INFORMATION;
+
+ _KEY_SET_INFORMATION_CLASS = (KeyWriteTimeInformation);
+ KEY_SET_INFORMATION_CLASS = _KEY_SET_INFORMATION_CLASS;
+
+ _KEY_INFORMATION_CLASS = (
+ KeyBasicInformation,
+ KeyNodeInformation,
+ KeyFullInformation,
+ KeyNameInformation);
+ KEY_INFORMATION_CLASS = _KEY_INFORMATION_CLASS;
+
+ _KEY_VALUE_INFORMATION_CLASS = (
+ KeyValueBasicInformation,
+ KeyValueFullInformation,
+ KeyValuePartialInformation,
+ KeyValueFullInformationAlign64,
+ KeyValuePartialInformationAlign64);
+ KEY_VALUE_INFORMATION_CLASS = _KEY_VALUE_INFORMATION_CLASS;
+
+ _KEY_VALUE_ENTRY = record
+ ValueName: PUNICODE_STRING;
+ DataLength: ULONG;
+ DataOffset: ULONG;
+ Type_: ULONG;
+ end;
+ KEY_VALUE_ENTRY = _KEY_VALUE_ENTRY;
+ PKEY_VALUE_ENTRY = ^KEY_VALUE_ENTRY;
+
+ _DEVICE_POWER_STATE = (
+ PowerDeviceUnspecified,
+ PowerDeviceD0,
+ PowerDeviceD1,
+ PowerDeviceD2,
+ PowerDeviceD3,
+ PowerDeviceMaximum);
+ DEVICE_POWER_STATE = _DEVICE_POWER_STATE;
+ PDEVICE_POWER_STATE = ^DEVICE_POWER_STATE;
+
+ POWER_ACTION =(
+ PowerActionNone,
+ PowerActionReserved,
+ PowerActionSleep,
+ PowerActionHibernate,
+ PowerActionShutdown,
+ PowerActionShutdownReset,
+ PowerActionShutdownOff,
+ PowerActionWarmEject);
+ PPOWER_ACTION = ^POWER_ACTION;
+
+ _SYSTEM_POWER_STATE = (
+ PowerSystemUnspecified,
+ PowerSystemWorking,
+ PowerSystemSleeping1,
+ PowerSystemSleeping2,
+ PowerSystemSleeping3,
+ PowerSystemHibernate,
+ PowerSystemShutdown,
+ PowerSystemMaximum);
+ SYSTEM_POWER_STATE = _SYSTEM_POWER_STATE;
+ PSYSTEM_POWER_STATE = ^SYSTEM_POWER_STATE;
+
+ POWER_INFORMATION_LEVEL = (
+ SystemPowerPolicyAc,
+ SystemPowerPolicyDc,
+ VerifySystemPolicyAc,
+ VerifySystemPolicyDc,
+ SystemPowerCapabilities,
+ SystemBatteryState,
+ SystemPowerStateHandler,
+ ProcessorStateHandler,
+ SystemPowerPolicyCurrent,
+ AdministratorPowerPolicy,
+ SystemReserveHiberFile,
+ ProcessorInformation,
+ SystemPowerInformation);
+
+ _RTL_RANGE = record
+
+ //
+ // The start of the range
+ //
+ Start: ULONGLONG; // Read only
+
+ //
+ // The end of the range
+ //
+ End_: ULONGLONG; // Read only
+
+ //
+ // Data the user passed in when they created the range
+ //
+ UserData: PVOID; // Read/Write
+
+ //
+ // The owner of the range
+ //
+ Owner: PVOID; // Read/Write
+
+ //
+ // User defined flags the user specified when they created the range
+ //
+ Attributes: UCHAR; // Read/Write
+
+ //
+ // Flags (RTL_RANGE_*)
+ //
+ Flags: UCHAR; // Read only
+ end;
+ RTL_RANGE = _RTL_RANGE;
+ PRTL_RANGE = ^RTL_RANGE;
+
+const
+ RTL_RANGE_SHARED = $01;
+ RTL_RANGE_CONFLICT = $02;
+
+type
+ _RTL_RANGE_LIST = record
+
+ //
+ // The list of ranges
+ //
+ ListHead: LIST_ENTRY;
+
+ //
+ // These always come in useful
+ //
+ Flags: ULONG; // use RANGE_LIST_FLAG_*
+
+ //
+ // The number of entries in the list
+ //
+ Count: ULONG;
+
+ //
+ // Every time an add/delete operation is performed on the list this is
+ // incremented. It is checked during iteration to ensure that the list
+ // hasn't changed between GetFirst/GetNext or GetNext/GetNext calls
+ //
+ Stamp: ULONG;
+ end;
+ RTL_RANGE_LIST = _RTL_RANGE_LIST;
+ PRTL_RANGE_LIST = ^RTL_RANGE_LIST;
+
+ _RANGE_LIST_ITERATOR = record
+ RangeListHead: PLIST_ENTRY;
+ MergedHead: PLIST_ENTRY;
+ Current: PVOID;
+ Stamp: ULONG;
+ end;
+ RTL_RANGE_LIST_ITERATOR = _RANGE_LIST_ITERATOR;
+ PRTL_RANGE_LIST_ITERATOR = ^RTL_RANGE_LIST_ITERATOR;
+
+// End of NTDDK.H
+
+//==============================================================================
+// NT System Services
+//==============================================================================
+
+type
+ _SYSTEM_INFORMATION_CLASS = (
+ SystemBasicInformation,
+ SystemProcessorInformation,
+ SystemPerformanceInformation,
+ SystemTimeOfDayInformation,
+ SystemNotImplemented1,
+ SystemProcessesAndThreadsInformation,
+ SystemCallCounts,
+ SystemConfigurationInformation,
+ SystemProcessorTimes,
+ SystemGlobalFlag,
+ SystemNotImplemented2,
+ SystemModuleInformation,
+ SystemLockInformation,
+ SystemNotImplemented3,
+ SystemNotImplemented4,
+ SystemNotImplemented5,
+ SystemHandleInformation,
+ SystemObjectInformation,
+ SystemPagefileInformation,
+ SystemInstructionEmulationCounts,
+ SystemInvalidInfoClass1,
+ SystemCacheInformation,
+ SystemPoolTagInformation,
+ SystemProcessorStatistics,
+ SystemDpcInformation,
+ SystemNotImplemented6,
+ SystemLoadImage,
+ SystemUnloadImage,
+ SystemTimeAdjustment,
+ SystemNotImplemented7,
+ SystemNotImplemented8,
+ SystemNotImplemented9,
+ SystemCrashDumpInformation,
+ SystemExceptionInformation,
+ SystemCrashDumpStateInformation,
+ SystemKernelDebuggerInformation,
+ SystemContextSwitchInformation,
+ SystemRegistryQuotaInformation,
+ SystemLoadAndCallImage,
+ SystemPrioritySeparation,
+ SystemNotImplemented10,
+ SystemNotImplemented11,
+ SystemInvalidInfoClass2,
+ SystemInvalidInfoClass3,
+ SystemTimeZoneInformation,
+ SystemLookasideInformation,
+ SystemSetTimeSlipEvent,
+ SystemCreateSession,
+ SystemDeleteSession,
+ SystemInvalidInfoClass4,
+ SystemRangeStartInformation,
+ SystemVerifierInformation,
+ SystemAddVerifier,
+ SystemSessionProcessesInformation);
+ SYSTEM_INFORMATION_CLASS = _SYSTEM_INFORMATION_CLASS;
+
+function NtQuerySystemInformation(SystemInformationClass: SYSTEM_INFORMATION_CLASS; SystemInformation: PVOID; SystemInformationLength: ULONG; ReturnLength: PULONG): NTSTATUS; stdcall; external ntdll name 'NtQuerySystemInformation';
+function NtSetSystemInformation(SystemInformationClass: SYSTEM_INFORMATION_CLASS; SystemInformation: PVOID; SystemInformationLength: ULONG): NTSTATUS; stdcall; external ntdll name 'NtSetSystemInformation';
+
+type
+ _SYSTEM_BASIC_INFORMATION = record // Information Class 0
+ Unknown: ULONG;
+ MaximumIncrement: ULONG;
+ PhysicalPageSize: ULONG;
+ NumberOfPhysicalPages: ULONG;
+ LowestPhysicalPage: ULONG;
+ HighestPhysicalPage: ULONG;
+ AllocationGranularity: ULONG;
+ LowestUserAddress: ULONG;
+ HighestUserAddress: ULONG;
+ ActiveProcessors: ULONG;
+ NumberProcessors: UCHAR;
+ end;
+ SYSTEM_BASIC_INFORMATION = _SYSTEM_BASIC_INFORMATION;
+ PSYSTEM_BASIC_INFORMATION = ^SYSTEM_BASIC_INFORMATION;
+
+ _SYSTEM_PROCESSOR_INFORMATION = record // Information Class 1
+ ProcessorArchitecture: USHORT;
+ ProcessorLevel: USHORT;
+ ProcessorRevision: USHORT;
+ Unknown: USHORT;
+ FeatureBits: ULONG;
+ end;
+ SYSTEM_PROCESSOR_INFORMATION = _SYSTEM_PROCESSOR_INFORMATION;
+ PSYSTEM_PROCESSOR_INFORMATION = ^SYSTEM_PROCESSOR_INFORMATION;
+
+ _SYSTEM_PERFORMANCE_INFORMATION = record // Information Class 2
+ IdleTime: LARGE_INTEGER;
+ ReadTransferCount: LARGE_INTEGER;
+ WriteTransferCount: LARGE_INTEGER;
+ OtherTransferCount: LARGE_INTEGER;
+ ReadOperationCount: ULONG;
+ WriteOperationCount: ULONG;
+ OtherOperationCount: ULONG;
+ AvailablePages: ULONG;
+ TotalCommittedPages: ULONG;
+ TotalCommitLimit: ULONG;
+ PeakCommitment: ULONG;
+ PageFaults: ULONG;
+ WriteCopyFaults: ULONG;
+ TransistionFaults: ULONG;
+ Reserved1: ULONG;
+ DemandZeroFaults: ULONG;
+ PagesRead: ULONG;
+ PageReadIos: ULONG;
+ Reserved2: array [0..1] of ULONG;
+ PagefilePagesWritten: ULONG;
+ PagefilePageWriteIos: ULONG;
+ MappedFilePagesWritten: ULONG;
+ MappedFilePageWriteIos: ULONG;
+ PagedPoolUsage: ULONG;
+ NonPagedPoolUsage: ULONG;
+ PagedPoolAllocs: ULONG;
+ PagedPoolFrees: ULONG;
+ NonPagedPoolAllocs: ULONG;
+ NonPagedPoolFrees: ULONG;
+ TotalFreeSystemPtes: ULONG;
+ SystemCodePage: ULONG;
+ TotalSystemDriverPages: ULONG;
+ TotalSystemCodePages: ULONG;
+ SmallNonPagedLookasideListAllocateHits: ULONG;
+ SmallPagedLookasideListAllocateHits: ULONG;
+ Reserved3: ULONG;
+ MmSystemCachePage: ULONG;
+ PagedPoolPage: ULONG;
+ SystemDriverPage: ULONG;
+ FastReadNoWait: ULONG;
+ FastReadWait: ULONG;
+ FastReadResourceMiss: ULONG;
+ FastReadNotPossible: ULONG;
+ FastMdlReadNoWait: ULONG;
+ FastMdlReadWait: ULONG;
+ FastMdlReadResourceMiss: ULONG;
+ FastMdlReadNotPossible: ULONG;
+ MapDataNoWait: ULONG;
+ MapDataWait: ULONG;
+ MapDataNoWaitMiss: ULONG;
+ MapDataWaitMiss: ULONG;
+ PinMappedDataCount: ULONG;
+ PinReadNoWait: ULONG;
+ PinReadWait: ULONG;
+ PinReadNoWaitMiss: ULONG;
+ PinReadWaitMiss: ULONG;
+ CopyReadNoWait: ULONG;
+ CopyReadWait: ULONG;
+ CopyReadNoWaitMiss: ULONG;
+ CopyReadWaitMiss: ULONG;
+ MdlReadNoWait: ULONG;
+ MdlReadWait: ULONG;
+ MdlReadNoWaitMiss: ULONG;
+ MdlReadWaitMiss: ULONG;
+ ReadAheadIos: ULONG;
+ LazyWriteIos: ULONG;
+ LazyWritePages: ULONG;
+ DataFlushes: ULONG;
+ DataPages: ULONG;
+ ContextSwitches: ULONG;
+ FirstLevelTbFills: ULONG;
+ SecondLevelTbFills: ULONG;
+ SystemCalls: ULONG;
+ end;
+ SYSTEM_PERFORMANCE_INFORMATION = _SYSTEM_PERFORMANCE_INFORMATION;
+ PSYSTEM_PERFORMANCE_INFORMATION = ^SYSTEM_PERFORMANCE_INFORMATION;
+
+ _SYSTEM_TIME_OF_DAY_INFORMATION = record // Information Class 3
+ BootTime: LARGE_INTEGER;
+ CurrentTime: LARGE_INTEGER;
+ TimeZoneBias: LARGE_INTEGER;
+ CurrentTimeZoneId: ULONG;
+ end;
+ SYSTEM_TIME_OF_DAY_INFORMATION = _SYSTEM_TIME_OF_DAY_INFORMATION;
+ PSYSTEM_TIME_OF_DAY_INFORMATION = ^SYSTEM_TIME_OF_DAY_INFORMATION;
+
+ _IO_COUNTERSEX = record
+ ReadOperationCount: LARGE_INTEGER;
+ WriteOperationCount: LARGE_INTEGER;
+ OtherOperationCount: LARGE_INTEGER;
+ ReadTransferCount: LARGE_INTEGER;
+ WriteTransferCount: LARGE_INTEGER;
+ OtherTransferCount: LARGE_INTEGER;
+ end;
+ IO_COUNTERSEX = _IO_COUNTERSEX;
+ PIO_COUNTERSEX = ^IO_COUNTERSEX;
+
+ THREAD_STATE = (
+ StateInitialized,
+ StateReady,
+ StateRunning,
+ StateStandby,
+ StateTerminated,
+ StateWait,
+ StateTransition,
+ StateUnknown);
+
+ _SYSTEM_THREADS = record
+ KernelTime: LARGE_INTEGER;
+ UserTime: LARGE_INTEGER;
+ CreateTime: LARGE_INTEGER;
+ WaitTime: ULONG;
+ StartAddress: PVOID;
+ ClientId: CLIENT_ID;
+ Priority: KPRIORITY;
+ BasePriority: KPRIORITY;
+ ContextSwitchCount: ULONG;
+ State: THREAD_STATE;
+ WaitReason: KWAIT_REASON;
+ end;
+ SYSTEM_THREADS = _SYSTEM_THREADS;
+ PSYSTEM_THREADS = ^SYSTEM_THREADS;
+ TSystemThreads = SYSTEM_THREADS;
+ PSystemThreads = PSYSTEM_THREADS;
+
+ _SYSTEM_PROCESSES = record // Information Class 5
+ NextEntryDelta: ULONG;
+ ThreadCount: ULONG;
+ Reserved1: array [0..5] of ULONG;
+ CreateTime: LARGE_INTEGER;
+ UserTime: LARGE_INTEGER;
+ KernelTime: LARGE_INTEGER;
+ ProcessName: UNICODE_STRING;
+ BasePriority: KPRIORITY;
+ ProcessId: ULONG;
+ InheritedFromProcessId: ULONG;
+ HandleCount: ULONG;
+ // next two were Reserved2: array [0..1] of ULONG; thanks to Nico Bendlin
+ SessionId: ULONG;
+ Reserved2: ULONG;
+ VmCounters: VM_COUNTERS;
+ PrivatePageCount : ULONG;
+ IoCounters: IO_COUNTERSEX; // Windows 2000 only
+ Threads: array [0..0] of SYSTEM_THREADS;
+ end;
+ SYSTEM_PROCESSES = _SYSTEM_PROCESSES;
+ PSYSTEM_PROCESSES = ^SYSTEM_PROCESSES;
+ TSystemProcesses = SYSTEM_PROCESSES;
+ PSystemProcesses = PSYSTEM_PROCESSES;
+
+ _SYSTEM_CALLS_INFORMATION = record // Information Class 6
+ Size: ULONG;
+ NumberOfDescriptorTables: ULONG;
+ NumberOfRoutinesInTable: array [0..0] of ULONG;
+ // ULONG CallCounts[];
+ end;
+ SYSTEM_CALLS_INFORMATION = _SYSTEM_CALLS_INFORMATION;
+ PSYSTEM_CALLS_INFORMATION = ^SYSTEM_CALLS_INFORMATION;
+
+ _SYSTEM_CONFIGURATION_INFORMATION = record // Information Class 7
+ DiskCount: ULONG;
+ FloppyCount: ULONG;
+ CdRomCount: ULONG;
+ TapeCount: ULONG;
+ SerialCount: ULONG;
+ ParallelCount: ULONG;
+ end;
+ SYSTEM_CONFIGURATION_INFORMATION = _SYSTEM_CONFIGURATION_INFORMATION;
+ PSYSTEM_CONFIGURATION_INFORMATION = ^SYSTEM_CONFIGURATION_INFORMATION;
+
+ _SYSTEM_PROCESSOR_TIMES = record // Information Class 8
+ IdleTime: LARGE_INTEGER;
+ KernelTime: LARGE_INTEGER;
+ UserTime: LARGE_INTEGER;
+ DpcTime: LARGE_INTEGER;
+ InterruptTime: LARGE_INTEGER;
+ InterruptCount: ULONG;
+ end;
+ SYSTEM_PROCESSOR_TIMES = _SYSTEM_PROCESSOR_TIMES;
+ PSYSTEM_PROCESSOR_TIMES = ^SYSTEM_PROCESSOR_TIMES;
+
+ _SYSTEM_GLOBAL_FLAG = record // Information Class 9
+ GlobalFlag: ULONG;
+ end;
+ SYSTEM_GLOBAL_FLAG = _SYSTEM_GLOBAL_FLAG;
+ PSYSTEM_GLOBAL_FLAG = ^SYSTEM_GLOBAL_FLAG;
+
+ _SYSTEM_MODULE_INFORMATION = record // Information Class 11
+ Reserved: array [0..1] of ULONG;
+ Base: PVOID;
+ Size: ULONG;
+ Flags: ULONG;
+ Index: USHORT;
+ Unknown: USHORT;
+ LoadCount: USHORT;
+ ModuleNameOffset: USHORT;
+ ImageName: array [0..255] of CHAR;
+ end;
+ SYSTEM_MODULE_INFORMATION = _SYSTEM_MODULE_INFORMATION;
+ PSYSTEM_MODULE_INFORMATION = ^SYSTEM_MODULE_INFORMATION;
+ TSystemModuleInformation = SYSTEM_MODULE_INFORMATION;
+ PSystemModuleInformation = PSYSTEM_MODULE_INFORMATION;
+
+ _SYSTEM_LOCK_INFORMATION = record // Information Class 12
+ Address: PVOID;
+ Type_: USHORT;
+ Reserved1: USHORT;
+ ExclusiveOwnerThreadId: ULONG;
+ ActiveCount: ULONG;
+ ContentionCount: ULONG;
+ Reserved2: array [0..1] of ULONG;
+ NumberOfSharedWaiters: ULONG;
+ NumberOfExclusiveWaiters: ULONG;
+ end;
+ SYSTEM_LOCK_INFORMATION = _SYSTEM_LOCK_INFORMATION;
+ PSYSTEM_LOCK_INFORMATION = ^SYSTEM_LOCK_INFORMATION;
+
+ _SYSTEM_HANDLE_INFORMATION = record // Information Class 16
+ ProcessId: ULONG;
+ ObjectTypeNumber: UCHAR;
+ Flags: UCHAR; // 0x01 = PROTECT_FROM_CLOSE, 0x02 = INHERIT
+ Handle: USHORT;
+ Object_: PVOID;
+ GrantedAccess: ACCESS_MASK;
+ end;
+ SYSTEM_HANDLE_INFORMATION = _SYSTEM_HANDLE_INFORMATION;
+ PSYSTEM_HANDLE_INFORMATION = ^SYSTEM_HANDLE_INFORMATION;
+
+ _SYSTEM_OBJECT_TYPE_INFORMATION = record // Information Class 17
+ NextEntryOffset: ULONG;
+ ObjectCount: ULONG;
+ HandleCount: ULONG;
+ TypeNumber: ULONG;
+ InvalidAttributes: ULONG;
+ GenericMapping: GENERIC_MAPPING;
+ ValidAccessMask: ACCESS_MASK;
+ PoolType: POOL_TYPE;
+ Unknown: UCHAR;
+ Name: UNICODE_STRING;
+ end;
+ SYSTEM_OBJECT_TYPE_INFORMATION = _SYSTEM_OBJECT_TYPE_INFORMATION;
+ PSYSTEM_OBJECT_TYPE_INFORMATION = ^SYSTEM_OBJECT_TYPE_INFORMATION;
+
+ _SYSTEM_OBJECT_INFORMATION = record
+ NextEntryOffset: ULONG;
+ Object_: PVOID;
+ CreatorProcessId: ULONG;
+ Unknown: USHORT;
+ Flags: USHORT;
+ PointerCount: ULONG;
+ HandleCount: ULONG;
+ PagedPoolUsage: ULONG;
+ NonPagedPoolUsage: ULONG;
+ ExclusiveProcessId: ULONG;
+ SecurityDescriptor: PSECURITY_DESCRIPTOR;
+ Name: UNICODE_STRING;
+ end;
+ SYSTEM_OBJECT_INFORMATION = _SYSTEM_OBJECT_INFORMATION;
+ PSYSTEM_OBJECT_INFORMATION = ^SYSTEM_OBJECT_INFORMATION;
+
+ _SYSTEM_PAGEFILE_INFORMATION = record // Information Class 18
+ NextEntryOffset: ULONG;
+ CurrentSize: ULONG;
+ TotalUsed: ULONG;
+ PeakUsed: ULONG;
+ FileName: UNICODE_STRING;
+ end;
+ SYSTEM_PAGEFILE_INFORMATION = _SYSTEM_PAGEFILE_INFORMATION;
+ PSYSTEM_PAGEFILE_INFORMATION = ^SYSTEM_PAGEFILE_INFORMATION;
+ TSystemPageFileInformation = SYSTEM_PAGEFILE_INFORMATION;
+ PSystemPageFileInformation = PSYSTEM_PAGEFILE_INFORMATION;
+
+ _SYSTEM_INSTRUCTION_EMULATION_INFORMATION = record // Info Class 19
+ GenericInvalidOpcode: ULONG;
+ TwoByteOpcode: ULONG;
+ ESprefix: ULONG;
+ CSprefix: ULONG;
+ SSprefix: ULONG;
+ DSprefix: ULONG;
+ FSPrefix: ULONG;
+ GSprefix: ULONG;
+ OPER32prefix: ULONG;
+ ADDR32prefix: ULONG;
+ INSB: ULONG;
+ INSW: ULONG;
+ OUTSB: ULONG;
+ OUTSW: ULONG;
+ PUSHFD: ULONG;
+ POPFD: ULONG;
+ INTnn: ULONG;
+ INTO: ULONG;
+ IRETD: ULONG;
+ FloatingPointOpcode: ULONG;
+ INBimm: ULONG;
+ INWimm: ULONG;
+ OUTBimm: ULONG;
+ OUTWimm: ULONG;
+ INB: ULONG;
+ INW: ULONG;
+ OUTB: ULONG;
+ OUTW: ULONG;
+ LOCKprefix: ULONG;
+ REPNEprefix: ULONG;
+ REPprefix: ULONG;
+ CLI: ULONG;
+ STI: ULONG;
+ HLT: ULONG;
+ end;
+ SYSTEM_INSTRUCTION_EMULATION_INFORMATION = _SYSTEM_INSTRUCTION_EMULATION_INFORMATION;
+ PSYSTEM_INSTRUCTION_EMULATION_INFORMATION = ^SYSTEM_INSTRUCTION_EMULATION_INFORMATION;
+
+ _SYSTEM_CACHE_INFORMATION = record // Information Class 21
+ SystemCacheWsSize: ULONG;
+ SystemCacheWsPeakSize: ULONG;
+ SystemCacheWsFaults: ULONG;
+ SystemCacheWsMinimum: ULONG;
+ SystemCacheWsMaximum: ULONG;
+ TransitionSharedPages: ULONG;
+ TransitionSharedPagesPeak: ULONG;
+ Reserved: array [0..1] of ULONG;
+ end;
+ SYSTEM_CACHE_INFORMATION = _SYSTEM_CACHE_INFORMATION;
+ PSYSTEM_CACHE_INFORMATION = ^SYSTEM_CACHE_INFORMATION;
+
+ _SYSTEM_POOL_TAG_INFORMATION = record // Information Class 22
+ Tag: array [0..3] of CHAR;
+ PagedPoolAllocs: ULONG;
+ PagedPoolFrees: ULONG;
+ PagedPoolUsage: ULONG;
+ NonPagedPoolAllocs: ULONG;
+ NonPagedPoolFrees: ULONG;
+ NonPagedPoolUsage: ULONG;
+ end;
+ SYSTEM_POOL_TAG_INFORMATION = _SYSTEM_POOL_TAG_INFORMATION;
+ PSYSTEM_POOL_TAG_INFORMATION = ^SYSTEM_POOL_TAG_INFORMATION;
+
+ _SYSTEM_PROCESSOR_STATISTICS = record // Information Class 23
+ ContextSwitches: ULONG;
+ DpcCount: ULONG;
+ DpcRequestRate: ULONG;
+ TimeIncrement: ULONG;
+ DpcBypassCount: ULONG;
+ ApcBypassCount: ULONG;
+ end;
+ SYSTEM_PROCESSOR_STATISTICS = _SYSTEM_PROCESSOR_STATISTICS;
+ PSYSTEM_PROCESSOR_STATISTICS = ^SYSTEM_PROCESSOR_STATISTICS;
+
+ _SYSTEM_DPC_INFORMATION = record // Information Class 24
+ Reserved: ULONG;
+ MaximumDpcQueueDepth: ULONG;
+ MinimumDpcRate: ULONG;
+ AdjustDpcThreshold: ULONG;
+ IdealDpcRate: ULONG;
+ end;
+ SYSTEM_DPC_INFORMATION = _SYSTEM_DPC_INFORMATION;
+ PSYSTEM_DPC_INFORMATION = ^SYSTEM_DPC_INFORMATION;
+
+ _SYSTEM_LOAD_IMAGE = record // Information Class 26
+ ModuleName: UNICODE_STRING;
+ ModuleBase: PVOID;
+ Unknown: PVOID;
+ EntryPoint: PVOID;
+ ExportDirectory: PVOID;
+ end;
+ SYSTEM_LOAD_IMAGE = _SYSTEM_LOAD_IMAGE;
+ PSYSTEM_LOAD_IMAGE = ^SYSTEM_LOAD_IMAGE;
+
+ _SYSTEM_UNLOAD_IMAGE = record // Information Class 27
+ ModuleBase: PVOID;
+ end;
+ SYSTEM_UNLOAD_IMAGE = _SYSTEM_UNLOAD_IMAGE;
+ PSYSTEM_UNLOAD_IMAGE = ^SYSTEM_UNLOAD_IMAGE;
+
+ _SYSTEM_QUERY_TIME_ADJUSTMENT = record // Information Class 28
+ TimeAdjustment: ULONG;
+ MaximumIncrement: ULONG;
+ TimeSynchronization: ByteBool;
+ end;
+ SYSTEM_QUERY_TIME_ADJUSTMENT = _SYSTEM_QUERY_TIME_ADJUSTMENT;
+ PSYSTEM_QUERY_TIME_ADJUSTMENT = ^SYSTEM_QUERY_TIME_ADJUSTMENT;
+
+ _SYSTEM_SET_TIME_ADJUSTMENT = record // Information Class 28
+ TimeAdjustment: ULONG;
+ TimeSynchronization: ByteBool;
+ end;
+ SYSTEM_SET_TIME_ADJUSTMENT = _SYSTEM_SET_TIME_ADJUSTMENT;
+ PSYSTEM_SET_TIME_ADJUSTMENT = ^SYSTEM_SET_TIME_ADJUSTMENT;
+
+ _SYSTEM_CRASH_DUMP_INFORMATION = record // Information Class 32
+ CrashDumpSectionHandle: HANDLE;
+ Unknown: HANDLE; // Windows 2000 only
+ end;
+ SYSTEM_CRASH_DUMP_INFORMATION = _SYSTEM_CRASH_DUMP_INFORMATION;
+ PSYSTEM_CRASH_DUMP_INFORMATION = ^SYSTEM_CRASH_DUMP_INFORMATION;
+
+ _SYSTEM_EXCEPTION_INFORMATION = record // Information Class 33
+ AlignmentFixupCount: ULONG;
+ ExceptionDispatchCount: ULONG;
+ FloatingEmulationCount: ULONG;
+ Reserved: ULONG;
+ end;
+ SYSTEM_EXCEPTION_INFORMATION = _SYSTEM_EXCEPTION_INFORMATION;
+ PSYSTEM_EXCEPTION_INFORMATION = ^SYSTEM_EXCEPTION_INFORMATION;
+
+ _SYSTEM_CRASH_STATE_INFORMATION = record // Information Class 34
+ ValidCrashDump: ULONG;
+ Unknown: ULONG; // Windows 2000 only
+ end;
+ SYSTEM_CRASH_STATE_INFORMATION = _SYSTEM_CRASH_STATE_INFORMATION;
+ PSYSTEM_CRASH_STATE_INFORMATION = ^SYSTEM_CRASH_STATE_INFORMATION;
+
+ _SYSTEM_KERNEL_DEBUGGER_INFORMATION = record // Information Class 35
+ DebuggerEnabled: ByteBool;
+ DebuggerNotPresent: ByteBool;
+ end;
+ SYSTEM_KERNEL_DEBUGGER_INFORMATION = _SYSTEM_KERNEL_DEBUGGER_INFORMATION;
+ PSYSTEM_KERNEL_DEBUGGER_INFORMATION = ^SYSTEM_KERNEL_DEBUGGER_INFORMATION;
+
+ _SYSTEM_CONTEXT_SWITCH_INFORMATION = record // Information Class 36
+ ContextSwitches: ULONG;
+ ContextSwitchCounters: array [0..10] of ULONG;
+ end;
+ SYSTEM_CONTEXT_SWITCH_INFORMATION = _SYSTEM_CONTEXT_SWITCH_INFORMATION;
+ PSYSTEM_CONTEXT_SWITCH_INFORMATION = ^SYSTEM_CONTEXT_SWITCH_INFORMATION;
+
+ _SYSTEM_REGISTRY_QUOTA_INFORMATION = record // Information Class 37
+ RegistryQuota: ULONG;
+ RegistryQuotaInUse: ULONG;
+ PagedPoolSize: ULONG;
+ end;
+ SYSTEM_REGISTRY_QUOTA_INFORMATION = _SYSTEM_REGISTRY_QUOTA_INFORMATION;
+ PSYSTEM_REGISTRY_QUOTA_INFORMATION = ^SYSTEM_REGISTRY_QUOTA_INFORMATION;
+
+ _SYSTEM_LOAD_AND_CALL_IMAGE = record // Information Class 38
+ ModuleName: UNICODE_STRING;
+ end;
+ SYSTEM_LOAD_AND_CALL_IMAGE = _SYSTEM_LOAD_AND_CALL_IMAGE;
+ PSYSTEM_LOAD_AND_CALL_IMAGE = ^SYSTEM_LOAD_AND_CALL_IMAGE;
+
+ _SYSTEM_PRIORITY_SEPARATION = record // Information Class 39
+ PrioritySeparation: ULONG;
+ end;
+ SYSTEM_PRIORITY_SEPARATION = _SYSTEM_PRIORITY_SEPARATION;
+ PSYSTEM_PRIORITY_SEPARATION = ^SYSTEM_PRIORITY_SEPARATION;
+
+ _SYSTEM_TIME_ZONE_INFORMATION = record // Information Class 44
+ Bias: LONG;
+ StandardName: array [0..31] of WCHAR;
+ StandardDate: SYSTEMTIME;
+ StandardBias: LONG;
+ DaylightName: array [0..31] of WCHAR;
+ DaylightDate: SYSTEMTIME;
+ DaylightBias: LONG;
+ end;
+ SYSTEM_TIME_ZONE_INFORMATION = _SYSTEM_TIME_ZONE_INFORMATION;
+ PSYSTEM_TIME_ZONE_INFORMATION = ^SYSTEM_TIME_ZONE_INFORMATION;
+
+ _SYSTEM_LOOKASIDE_INFORMATION = record // Information Class 45
+ Depth: USHORT;
+ MaximumDepth: USHORT;
+ TotalAllocates: ULONG;
+ AllocateMisses: ULONG;
+ TotalFrees: ULONG;
+ FreeMisses: ULONG;
+ Type_: POOL_TYPE;
+ Tag: ULONG;
+ Size: ULONG;
+ end;
+ SYSTEM_LOOKASIDE_INFORMATION = _SYSTEM_LOOKASIDE_INFORMATION;
+ PSYSTEM_LOOKASIDE_INFORMATION = ^SYSTEM_LOOKASIDE_INFORMATION;
+
+ _SYSTEM_SET_TIME_SLIP_EVENT = record // Information Class 46
+ TimeSlipEvent: HANDLE;
+ end;
+ SYSTEM_SET_TIME_SLIP_EVENT = _SYSTEM_SET_TIME_SLIP_EVENT;
+ PSYSTEM_SET_TIME_SLIP_EVENT = ^SYSTEM_SET_TIME_SLIP_EVENT;
+
+ _SYSTEM_CREATE_SESSION = record // Information Class 47
+ Session: ULONG;
+ end;
+ SYSTEM_CREATE_SESSION = _SYSTEM_CREATE_SESSION;
+ PSYSTEM_CREATE_SESSION = ^SYSTEM_CREATE_SESSION;
+
+ _SYSTEM_DELETE_SESSION = record // Information Class 48
+ Session: ULONG;
+ end;
+ SYSTEM_DELETE_SESSION = _SYSTEM_DELETE_SESSION;
+ PSYSTEM_DELETE_SESSION = ^SYSTEM_DELETE_SESSION;
+
+ _SYSTEM_RANGE_START_INFORMATION = record // Information Class 50
+ SystemRangeStart: PVOID;
+ end;
+ SYSTEM_RANGE_START_INFORMATION = _SYSTEM_RANGE_START_INFORMATION;
+ PSYSTEM_RANGE_START_INFORMATION = ^SYSTEM_RANGE_START_INFORMATION;
+
+ _SYSTEM_POOL_BLOCK = record
+ Allocated: ByteBool;
+ Unknown: USHORT;
+ Size: ULONG;
+ Tag: array [0..3] of CHAR;
+ end;
+ SYSTEM_POOL_BLOCK = _SYSTEM_POOL_BLOCK;
+ PSYSTEM_POOL_BLOCK = ^SYSTEM_POOL_BLOCK;
+
+ _SYSTEM_POOL_BLOCKS_INFORMATION = record // Info Classes 14 and 15
+ PoolSize: ULONG;
+ PoolBase: PVOID;
+ Unknown: USHORT;
+ NumberOfBlocks: ULONG;
+ PoolBlocks: array [0..0] of SYSTEM_POOL_BLOCK;
+ end;
+ SYSTEM_POOL_BLOCKS_INFORMATION = _SYSTEM_POOL_BLOCKS_INFORMATION;
+ PSYSTEM_POOL_BLOCKS_INFORMATION = ^SYSTEM_POOL_BLOCKS_INFORMATION;
+
+ _SYSTEM_MEMORY_USAGE = record
+ Name: PVOID;
+ Valid: USHORT;
+ Standby: USHORT;
+ Modified: USHORT;
+ PageTables: USHORT;
+ end;
+ SYSTEM_MEMORY_USAGE = _SYSTEM_MEMORY_USAGE;
+ PSYSTEM_MEMORY_USAGE = ^SYSTEM_MEMORY_USAGE;
+
+ _SYSTEM_MEMORY_USAGE_INFORMATION = record // Info Classes 25 and 29
+ Reserved: ULONG;
+ EndOfData: PVOID;
+ MemoryUsage: array [0..0] of SYSTEM_MEMORY_USAGE;
+ end;
+ SYSTEM_MEMORY_USAGE_INFORMATION = _SYSTEM_MEMORY_USAGE_INFORMATION;
+ PSYSTEM_MEMORY_USAGE_INFORMATION = ^SYSTEM_MEMORY_USAGE_INFORMATION;
+
+
+function NtQuerySystemEnvironmentValue(Name: PUNICODE_STRING; Value: PVOID; ValueLength: ULONG; ReturnLength: PULONG): NTSTATUS; stdcall; external ntdll name 'NtQuerySystemEnvironmentValue';
+function NtSetSystemEnvironmentValue(Name: PUNICODE_STRING; Value: PUNICODE_STRING): NTSTATUS; stdcall;external ntdll name 'NtSetSystemEnvironmentValue';
+
+type
+ _SHUTDOWN_ACTION = (
+ ShutdownNoReboot,
+ ShutdownReboot,
+ ShutdownPowerOff);
+ SHUTDOWN_ACTION = _SHUTDOWN_ACTION;
+
+function NtShutdownSystem(Action: SHUTDOWN_ACTION): NTSTATUS; stdcall;external ntdll name 'NtShutdownSystem';
+
+type
+ _DEBUG_CONTROL_CODE = (
+ DebugFiller0,
+ DebugGetTraceInformation,
+ DebugSetInternalBreakpoint,
+ DebugSetSpecialCall,
+ DebugClearSpecialCalls,
+ DebugQuerySpecialCalls,
+ DebugDbgBreakPoint);
+ DEBUG_CONTROL_CODE = _DEBUG_CONTROL_CODE;
+
+function NtSystemDebugControl(ControlCode: DEBUG_CONTROL_CODE; InputBuffer: PVOID; InputBufferLength: ULONG; OutputBuffer: PVOID; OutputBufferLength: ULONG; ReturnLength: PULONG): NTSTATUS; stdcall;external ntdll name 'NtSystemDebugControl';
+
+type
+ _OBJECT_INFORMATION_CLASS = (
+ ObjectBasicInformation,
+ ObjectNameInformation,
+ ObjectTypeInformation,
+ ObjectAllTypesInformation,
+ ObjectHandleInformation);
+ OBJECT_INFORMATION_CLASS = _OBJECT_INFORMATION_CLASS;
+
+function NtQueryObject(ObjectHandle: HANDLE; ObjectInformationClass: OBJECT_INFORMATION_CLASS; ObjectInformation: PVOID; ObjectInformationLength: ULONG; ReturnLength: PULONG): NTSTATUS; stdcall; external ntdll name 'NtQueryObject';
+function NtSetInformationObject(ObjectHandle: HANDLE; ObjectInformationClass: OBJECT_INFORMATION_CLASS; ObjectInformation: PVOID; ObjectInformationLength: ULONG): NTSTATUS; stdcall; external ntdll name 'NtSetInformationObject';
+
+type
+ _OBJECT_BASIC_INFORMATION = record // Information Class 0
+ Attributes: ULONG;
+ GrantedAccess: ACCESS_MASK;
+ HandleCount: ULONG;
+ PointerCount: ULONG;
+ PagedPoolUsage: ULONG;
+ NonPagedPoolUsage: ULONG;
+ Reserved: array [0..2] of ULONG;
+ NameInformationLength: ULONG;
+ TypeInformationLength: ULONG;
+ SecurityDescriptorLength: ULONG;
+ CreateTime: LARGE_INTEGER;
+ end;
+ OBJECT_BASIC_INFORMATION = _OBJECT_BASIC_INFORMATION;
+ POBJECT_BASIC_INFORMATION = ^OBJECT_BASIC_INFORMATION;
+
+ _OBJECT_TYPE_INFORMATION = record // Information Class 2
+ Name: UNICODE_STRING;
+ ObjectCount: ULONG;
+ HandleCount: ULONG;
+ Reserved1: array [0..3] of ULONG;
+ PeakObjectCount: ULONG;
+ PeakHandleCount: ULONG;
+ Reserved2: array [0..3] of ULONG;
+ InvalidAttributes: ULONG;
+ GenericMapping: GENERIC_MAPPING;
+ ValidAccess: ULONG;
+ Unknown: UCHAR;
+ MaintainHandleDatabase: ByteBool;
+ Reserved3: array [0..1] of UCHAR;
+ PoolType: POOL_TYPE;
+ PagedPoolUsage: ULONG;
+ NonPagedPoolUsage: ULONG;
+ end;
+ OBJECT_TYPE_INFORMATION = _OBJECT_TYPE_INFORMATION;
+ POBJECT_TYPE_INFORMATION = ^OBJECT_TYPE_INFORMATION;
+
+ _OBJECT_ALL_TYPES_INFORMATION = record // Information Class 3
+ NumberOfTypes: ULONG;
+ TypeInformation: OBJECT_TYPE_INFORMATION;
+ end;
+ OBJECT_ALL_TYPES_INFORMATION = _OBJECT_ALL_TYPES_INFORMATION;
+ POBJECT_ALL_TYPES_INFORMATION = ^OBJECT_ALL_TYPES_INFORMATION;
+
+ _OBJECT_HANDLE_ATTRIBUTE_INFORMATION = record // Information Class 4
+ Inherit: ByteBool;
+ ProtectFromClose: ByteBool;
+ end;
+ OBJECT_HANDLE_ATTRIBUTE_INFORMATION = _OBJECT_HANDLE_ATTRIBUTE_INFORMATION;
+ POBJECT_HANDLE_ATTRIBUTE_INFORMATION = ^OBJECT_HANDLE_ATTRIBUTE_INFORMATION;
+
+function NtDuplicateObject(SourceProcessHandle: HANDLE; SourceHandle: HANDLE; TargetProcessHandle: HANDLE; TargetHandle: PHANDLE; DesiredAccess: ACCESS_MASK; Attributes: ULONG; Options: ULONG): NTSTATUS; stdcall; external ntdll name 'NtDuplicateObject';
+function NtMakeTemporaryObject(Handle: HANDLE): NTSTATUS; stdcall; external ntdll name 'NtMakeTemporaryObject';
+function NtClose(Handle: HANDLE): NTSTATUS; stdcall; external ntdll name 'NtClose';
+function NtQuerySecurityObject(Handle: HANDLE; RequestedInformation: SECURITY_INFORMATION; SecurityDescriptor: PSECURITY_DESCRIPTOR; SecurityDescriptorLength: ULONG; ReturnLength: PULONG): NTSTATUS; stdcall; external ntdll name 'NtQuerySecurityObject';
+function NtSetSecurityObject(Handle: HANDLE; SecurityInformation: SECURITY_INFORMATION; SecurityDescriptor: PSECURITY_DESCRIPTOR): NTSTATUS; stdcall; external ntdll name 'NtSetSecurityObject';
+function NtCreateDirectoryObject(DirectoryHandle: PHANDLE; DesiredAccess: ACCESS_MASK; ObjectAttributes: POBJECT_ATTRIBUTES): NTSTATUS; stdcall; external ntdll name 'NtCreateDirectoryObject';
+function NtOpenDirectoryObject(DirectoryHandle: PHANDLE; DesiredAccess: ACCESS_MASK; ObjectAttributes: POBJECT_ATTRIBUTES): NTSTATUS; stdcall; external ntdll name 'NtOpenDirectoryObject';
+function NtQueryDirectoryObject(DirectoryHandle: HANDLE; Buffer: PVOID; BufferLength: ULONG; ReturnSingleEntry: ByteBool; RestartScan: ByteBool; Context: PULONG; ReturnLength: PULONG): NTSTATUS; stdcall; external ntdll name 'NtQueryDirectoryObject';
+
+type
+ _DIRECTORY_BASIC_INFORMATION = record
+ ObjectName: UNICODE_STRING;
+ ObjectTypeName: UNICODE_STRING;
+ end;
+ DIRECTORY_BASIC_INFORMATION = _DIRECTORY_BASIC_INFORMATION;
+ PDIRECTORY_BASIC_INFORMATION = ^DIRECTORY_BASIC_INFORMATION;
+
+function NtCreateSymbolicLinkObject(SymbolicLinkHandle: PHANDLE; DesiredAccess: ACCESS_MASK; ObjectAttributes: POBJECT_ATTRIBUTES; TargetName: PUNICODE_STRING): NTSTATUS; stdcall; external ntdll name 'NtCreateSymbolicLinkObject';
+function NtOpenSymbolicLinkObject(SymbolicLinkHandle: PHANDLE; DesiredAccess: ACCESS_MASK; ObjectAttributes: POBJECT_ATTRIBUTES): NTSTATUS; stdcall; external ntdll name 'NtOpenSymbolicLinkObject';
+function NtQuerySymbolicLinkObject(SymbolicLinkHandle: HANDLE; TargetName: PUNICODE_STRING; ReturnLength: PULONG): NTSTATUS; stdcall; external ntdll name 'NtQuerySymbolicLinkObject';
+function NtAllocateVirtualMemory(ProcessHandle: HANDLE; BaseAddress: PPVOID; ZeroBits: ULONG; AllocationSize: PULONG; AllocationType: ULONG; Protect: ULONG): NTSTATUS; stdcall; external ntdll name 'NtAllocateVirtualMemory';
+function NtFreeVirtualMemory(ProcessHandle: HANDLE; BaseAddress: PPVOID; FreeSize: PULONG; FreeType: ULONG): NTSTATUS; stdcall; external ntdll name 'NtFreeVirtualMemory';
+
+type
+ _MEMORY_INFORMATION_CLASS = (
+ MemoryBasicInformation,
+ MemoryWorkingSetList,
+ MemorySectionName,
+ MemoryBasicVlmInformation);
+ MEMORY_INFORMATION_CLASS = _MEMORY_INFORMATION_CLASS;
+
+function NtQueryVirtualMemory(ProcessHandle: HANDLE; BaseAddress: PVOID; MemoryInformationClass: MEMORY_INFORMATION_CLASS; MemoryInformation: PVOID; MemoryInformationLength: ULONG; ReturnLength: PULONG): NTSTATUS; stdcall; external ntdll name 'NtQueryVirtualMemory';
+
+type
+ _MEMORY_BASIC_INFORMATION = record // Information Class 0
+ BaseAddress: PVOID;
+ AllocationBase: PVOID;
+ AllocationProtect: ULONG;
+ RegionSize: ULONG;
+ State: ULONG;
+ Protect: ULONG;
+ Type_: ULONG;
+ end;
+ MEMORY_BASIC_INFORMATION = _MEMORY_BASIC_INFORMATION;
+ PMEMORY_BASIC_INFORMATION = ^MEMORY_BASIC_INFORMATION;
+
+ _MEMORY_WORKING_SET_LIST = record // Information Class 1
+ NumberOfPages: ULONG;
+ WorkingSetList: array [0..0] of ULONG;
+ end;
+ MEMORY_WORKING_SET_LIST = _MEMORY_WORKING_SET_LIST;
+ PMEMORY_WORKING_SET_LIST = ^MEMORY_WORKING_SET_LIST;
+
+ _MEMORY_SECTION_NAME = record // Information Class 2
+ SectionFileName: UNICODE_STRING;
+ end;
+ MEMORY_SECTION_NAME = _MEMORY_SECTION_NAME;
+ PMEMORY_SECTION_NAME = ^MEMORY_SECTION_NAME;
+
+function NtLockVirtualMemory(ProcessHandle: HANDLE; BaseAddress: PPVOID; LockSize: PULONG; LockType: ULONG): NTSTATUS; stdcall; external ntdll name 'NtLockVirtualMemory';
+function NtUnlockVirtualMemory(ProcessHandle: HANDLE; BaseAddress: PPVOID; LockSize: PULONG; LockType: ULONG): NTSTATUS; stdcall; external ntdll name 'NtUnlockVirtualMemory';
+function NtReadVirtualMemory(ProcessHandle: HANDLE; BaseAddress: PVOID; Buffer: PVOID; BufferLength: ULONG; ReturnLength: PULONG): NTSTATUS; stdcall; external ntdll name 'NtReadVirtualMemory';
+function NtWriteVirtualMemory(ProcessHandle: HANDLE; BaseAddress: PVOID; Buffer: PVOID; BufferLength: ULONG; ReturnLength: PULONG): NTSTATUS; stdcall; external ntdll name 'NtWriteVirtualMemory';
+function NtProtectVirtualMemory(ProcessHandle: HANDLE; BaseAddress: PPVOID; ProtectSize: PULONG; NewProtect: ULONG; OldProtect: PULONG): NTSTATUS; stdcall; external ntdll name 'NtProtectVirtualMemory';
+function NtFlushVirtualMemory(ProcessHandle: HANDLE; BaseAddress: PPVOID; FlushSize: PULONG; IoStatusBlock: PIO_STATUS_BLOCK): NTSTATUS; stdcall; external ntdll name 'NtFlushVirtualMemory';
+function NtAllocateUserPhysicalPages(ProcessHandle: HANDLE; NumberOfPages: PULONG; PageFrameNumbers: PULONG): NTSTATUS; stdcall; external ntdll name 'NtAllocateUserPhysicalPages';
+function NtFreeUserPhysicalPages(ProcessHandle: HANDLE; NumberOfPages: PULONG; PageFrameNumbers: PULONG): NTSTATUS; stdcall; external ntdll name 'NtFreeUserPhysicalPages';
+function NtMapUserPhysicalPages(BaseAddress: PVOID; NumberOfPages: PULONG; PageFrameNumbers: PULONG): NTSTATUS; stdcall; external ntdll name 'NtMapUserPhysicalPages';
+function NtMapUserPhysicalPagesScatter(BaseAddresses: PPVOID; NumberOfPages: PULONG; PageFrameNumbers: PULONG): NTSTATUS; stdcall; external ntdll name 'NtMapUserPhysicalPagesScatter';
+function NtGetWriteWatch(ProcessHandle: HANDLE; Flags: ULONG; BaseAddress: PVOID; RegionSize: ULONG; Buffer: PULONG; BufferEntries: PULONG; Granularity: PULONG): NTSTATUS; stdcall; external ntdll name 'NtGetWriteWatch';
+function NtResetWriteWatch(ProcessHandle: HANDLE; BaseAddress: PVOID; RegionSize: ULONG): NTSTATUS; stdcall; external ntdll name 'NtResetWriteWatch';
+function NtCreateSection(SectionHandle: PHANDLE; DesiredAccess: ACCESS_MASK; ObjectAttributes: POBJECT_ATTRIBUTES; SectionSize: PLARGE_INTEGER; Protect: ULONG; Attributes: ULONG; FileHandle: HANDLE): NTSTATUS; stdcall; external ntdll name 'NtCreateSection';
+function NtOpenSection(SectionHandle: PHANDLE; DesiredAccess: ACCESS_MASK; ObjectAttributes: POBJECT_ATTRIBUTES): NTSTATUS; stdcall; external ntdll name 'NtOpenSection';
+
+type
+ _SECTION_INFORMATION_CLASS = (
+ SectionBasicInformation,
+ SectionImageInformation);
+ SECTION_INFORMATION_CLASS = _SECTION_INFORMATION_CLASS;
+
+function NtQuerySection(SectionHandle: HANDLE; SectionInformationClass: SECTION_INFORMATION_CLASS; SectionInformation: PVOID; SectionInformationLength: ULONG; ResultLength: PULONG): NTSTATUS; stdcall; external ntdll name 'NtQuerySection';
+
+type
+ _SECTION_BASIC_INFORMATION = record // Information Class 0
+ BaseAddress: PVOID;
+ Attributes: ULONG;
+ Size: LARGE_INTEGER;
+ end;
+ SECTION_BASIC_INFORMATION = _SECTION_BASIC_INFORMATION;
+ PSECTION_BASIC_INFORMATION = ^SECTION_BASIC_INFORMATION;
+
+ _SECTION_IMAGE_INFORMATION = record // Information Class 1
+ EntryPoint: PVOID;
+ Unknown1: ULONG;
+ StackReserve: ULONG;
+ StackCommit: ULONG;
+ Subsystem: ULONG;
+ MinorSubsystemVersion: USHORT;
+ MajorSubsystemVersion: USHORT;
+ Unknown2: ULONG;
+ Characteristics: ULONG;
+ ImageNumber: USHORT;
+ Executable: ByteBool;
+ Unknown3: UCHAR;
+ Unknown4: array [0..2] of ULONG;
+ end;
+ SECTION_IMAGE_INFORMATION = _SECTION_IMAGE_INFORMATION;
+ PSECTION_IMAGE_INFORMATION = ^SECTION_IMAGE_INFORMATION;
+
+function NtExtendSection(SectionHandle: HANDLE; SectionSize: PLARGE_INTEGER): NTSTATUS; stdcall; external ntdll name 'NtExtendSection';
+function NtMapViewOfSection(SectionHandle: HANDLE; ProcessHandle: HANDLE; BaseAddress: PPVOID; ZeroBits: ULONG; CommitSize: ULONG; SectionOffset: PLARGE_INTEGER; ViewSize: PULONG; InheritDisposition: SECTION_INHERIT; AllocationType: ULONG; Protect: ULONG): NTSTATUS; stdcall; external ntdll name 'NtMapViewOfSection';
+function NtUnmapViewOfSection(ProcessHandle: HANDLE; BaseAddress: PVOID): NTSTATUS; stdcall; external ntdll name 'NtUnmapViewOfSection';
+function NtAreMappedFilesTheSame(Address1: PVOID; Address2: PVOID): NTSTATUS; stdcall; external ntdll name 'NtAreMappedFilesTheSame';
+
+type
+ _USER_STACK = record
+ FixedStackBase: PVOID;
+ FixedStackLimit: PVOID;
+ ExpandableStackBase: PVOID;
+ ExpandableStackLimit: PVOID;
+ ExpandableStackBottom: PVOID;
+ end;
+ USER_STACK = _USER_STACK;
+ PUSER_STACK = ^USER_STACK;
+
+function NtCreateThread(ThreadHandle: PHANDLE; DesiredAccess: ACCESS_MASK; ObjectAttributes: POBJECT_ATTRIBUTES; ProcessHandle: HANDLE; ClientId: PCLIENT_ID; ThreadContext: PCONTEXT; UserStack: PUSER_STACK; CreateSuspended: ByteBool): NTSTATUS; stdcall; external ntdll name 'NtCreateThread';
+function NtOpenThread(ThreadHandle: PHANDLE; DesiredAccess: ACCESS_MASK; ObjectAttributes: POBJECT_ATTRIBUTES; ClientId: PCLIENT_ID): NTSTATUS; stdcall; external ntdll name 'NtOpenThread';
+function NtTerminateThread(ThreadHandle: HANDLE; ExitStatus: NTSTATUS): NTSTATUS; stdcall; external ntdll name 'NtTerminateThread';
+function NtQueryInformationThread(ThreadHandle: HANDLE; ThreadInformationClass: THREADINFOCLASS; ThreadInformation: PVOID; ThreadInformationLength: ULONG; ReturnLength: PULONG): NTSTATUS; stdcall; external ntdll name 'NtQueryInformationThread';
+function NtSetInformationThread(ThreadHandle: HANDLE; ThreadInformationClass: THREADINFOCLASS; ThreadInformation: PVOID; ThreadInformationLength: ULONG): NTSTATUS; stdcall; external ntdll name 'NtSetInformationThread';
+
+type
+ _THREAD_BASIC_INFORMATION = record // Information Class 0
+ ExitStatus: NTSTATUS;
+ TebBaseAddress: PNT_TIB;
+ ClientId: CLIENT_ID;
+ AffinityMask: KAFFINITY;
+ Priority: KPRIORITY;
+ BasePriority: KPRIORITY;
+ end;
+ THREAD_BASIC_INFORMATION = _THREAD_BASIC_INFORMATION;
+ PTHREAD_BASIC_INFORMATION = ^THREAD_BASIC_INFORMATION;
+
+function NtSuspendThread(ThreadHandle: HANDLE; PreviousSuspendCount: PULONG): NTSTATUS; stdcall; external ntdll name 'NtSuspendThread';
+function NtResumeThread(ThreadHandle: HANDLE; PreviousSuspendCount: PULONG): NTSTATUS; stdcall; external ntdll name 'NtResumeThread';
+function NtGetContextThread(ThreadHandle: HANDLE; Context: PCONTEXT): NTSTATUS; stdcall; external ntdll name 'NtGetContextThread';
+function NtSetContextThread(ThreadHandle: HANDLE; Context: PCONTEXT): NTSTATUS; stdcall; external ntdll name 'NtSetContextThread';
+function NtQueueApcThread(ThreadHandle: HANDLE; ApcRoutine: PKNORMAL_ROUTINE; ApcContext: PVOID; Argument1: PVOID; Argument2: PVOID): NTSTATUS; stdcall; external ntdll name 'NtQueueApcThread';
+function NtTestAlert: NTSTATUS; stdcall; external ntdll name 'NtTestAlert';
+function NtAlertThread(ThreadHandle: HANDLE): NTSTATUS; stdcall; external ntdll name 'NtAlertThread';
+function NtAlertResumeThread(ThreadHandle: HANDLE; PreviousSuspendCount: PULONG): NTSTATUS; stdcall; external ntdll name 'NtAlertResumeThread';
+function NtRegisterThreadTerminatePort(PortHandle: HANDLE): NTSTATUS; stdcall; external ntdll name 'NtRegisterThreadTerminatePort';
+function NtImpersonateThread(ThreadHandle: HANDLE; TargetThreadHandle: HANDLE; SecurityQos: PSECURITY_QUALITY_OF_SERVICE): NTSTATUS; stdcall; external ntdll name 'NtImpersonateThread';
+function NtImpersonateAnonymousToken(ThreadHandle: HANDLE): NTSTATUS; stdcall; external ntdll name 'NtImpersonateAnonymousToken';
+function NtCreateProcess(ProcessHandle: PHANDLE; DesiredAccess: ACCESS_MASK; ObjectAttributes: POBJECT_ATTRIBUTES; InheritFromProcessHandle: HANDLE; InheritHandles: ByteBool; SectionHandle: HANDLE; DebugPort: HANDLE; ExceptionPort: HANDLE): NTSTATUS; stdcall; external ntdll name 'NtCreateProcess';
+function NtOpenProcess(ProcessHandle: PHANDLE; DesiredAccess: ACCESS_MASK; ObjectAttributes: POBJECT_ATTRIBUTES; ClientId: PCLIENT_ID): NTSTATUS; stdcall; external ntdll name 'NtOpenProcess';
+function NtTerminateProcess(ProcessHandle: HANDLE; ExitStatus: NTSTATUS): NTSTATUS; stdcall; external ntdll name 'NtTerminateProcess';
+function NtQueryInformationProcess(ProcessHandle: HANDLE; ProcessInformationClass: PROCESSINFOCLASS; ProcessInformation: PVOID; ProcessInformationLength: ULONG; ReturnLength: PULONG): NTSTATUS; stdcall; external ntdll name 'NtQueryInformationProcess';
+function NtSetInformationProcess(ProcessHandle: HANDLE; ProcessInformationClass: PROCESSINFOCLASS; ProcessInformation: PVOID; ProcessInformationLength: ULONG): NTSTATUS; stdcall; external ntdll name 'NtSetInformationProcess';
+
+type
+ _PROCESS_PRIORITY_CLASS = record // Information Class 18
+ Foreground: ByteBool;
+ PriorityClass: UCHAR;
+ end;
+ PROCESS_PRIORITY_CLASS = _PROCESS_PRIORITY_CLASS;
+ PPROCESS_PRIORITY_CLASS = ^PROCESS_PRIORITY_CLASS;
+
+ _PROCESS_PARAMETERS = record
+ AllocationSize: ULONG;
+ Size: ULONG;
+ Flags: ULONG;
+ Zero: ULONG;
+ Console: LONG;
+ ProcessGroup: ULONG;
+ hStdInput: HANDLE;
+ hStdOutput: HANDLE;
+ hStdError: HANDLE;
+ CurrentDirectoryName: UNICODE_STRING;
+ CurrentDirectoryHandle: HANDLE;
+ DllPath: UNICODE_STRING;
+ ImageFile: UNICODE_STRING;
+ CommandLine: UNICODE_STRING;
+ Environment: PWSTR;
+ dwX: ULONG;
+ dwY: ULONG;
+ dwXSize: ULONG;
+ dwYSize: ULONG;
+ dwXCountChars: ULONG;
+ dwYCountChars: ULONG;
+ dwFillAttribute: ULONG;
+ dwFlags: ULONG;
+ wShowWindow: ULONG;
+ WindowTitle: UNICODE_STRING;
+ Desktop: UNICODE_STRING;
+ Reserved: UNICODE_STRING;
+ Reserved2: UNICODE_STRING;
+ end;
+ PROCESS_PARAMETERS = _PROCESS_PARAMETERS;
+ PPROCESS_PARAMETERS = ^PROCESS_PARAMETERS;
+ PPPROCESS_PARAMETERS = ^PPROCESS_PARAMETERS;
+
+function RtlCreateProcessParameters(ProcessParameters: PPPROCESS_PARAMETERS; ImageFile: PUNICODE_STRING; DllPath: PUNICODE_STRING; CurrentDirectory: PUNICODE_STRING; CommandLine: PUNICODE_STRING; CreationFlags: ULONG; WindowTitle: PUNICODE_STRING; Desktop: PUNICODE_STRING; Reserved: PUNICODE_STRING; Reserved2: PUNICODE_STRING): NTSTATUS; stdcall; external ntdll name 'RtlCreateProcessParameters';
+function RtlDestroyProcessParameters(ProcessParameters: PPROCESS_PARAMETERS): NTSTATUS; stdcall; external ntdll name 'RtlDestroyProcessParameters';
+
+type
+ _DEBUG_BUFFER = record
+ SectionHandle: HANDLE;
+ SectionBase: PVOID;
+ RemoteSectionBase: PVOID;
+ SectionBaseDelta: ULONG;
+ EventPairHandle: HANDLE;
+ Unknown: array [0..1] of ULONG;
+ RemoteThreadHandle: HANDLE;
+ InfoClassMask: ULONG;
+ SizeOfInfo: ULONG;
+ AllocatedSize: ULONG;
+ SectionSize: ULONG;
+ ModuleInformation: PVOID;
+ BackTraceInformation: PVOID;
+ HeapInformation: PVOID;
+ LockInformation: PVOID;
+ Reserved: array [0..7] of PVOID;
+ end;
+ DEBUG_BUFFER = _DEBUG_BUFFER;
+ PDEBUG_BUFFER = ^DEBUG_BUFFER;
+
+const
+ PDI_MODULES = $01;
+ PDI_BACKTRACE = $02;
+ PDI_HEAPS = $04;
+ PDI_HEAP_TAGS = $08;
+ PDI_HEAP_BLOCKS = $10;
+ PDI_LOCKS = $20;
+
+type
+ _DEBUG_MODULE_INFORMATION = record // c.f. SYSTEM_MODULE_INFORMATION
+ Reserved: array [0..1] of ULONG;
+ Base: ULONG;
+ Size: ULONG;
+ Flags: ULONG;
+ Index: USHORT;
+ Unknown: USHORT;
+ LoadCount: USHORT;
+ ModuleNameOffset: USHORT;
+ ImageName: array [0..255] of CHAR;
+ end;
+ DEBUG_MODULE_INFORMATION = _DEBUG_MODULE_INFORMATION;
+ PDEBUG_MODULE_INFORMATION = ^DEBUG_MODULE_INFORMATION;
+
+ _DEBUG_HEAP_INFORMATION = record
+ Base: ULONG;
+ Flags: ULONG;
+ Granularity: USHORT;
+ Unknown: USHORT;
+ Allocated: ULONG;
+ Committed: ULONG;
+ TagCount: ULONG;
+ BlockCount: ULONG;
+ Reserved: array [0..6] of ULONG;
+ Tags: PVOID;
+ Blocks: PVOID;
+ end;
+ DEBUG_HEAP_INFORMATION = _DEBUG_HEAP_INFORMATION;
+ PDEBUG_HEAP_INFORMATION = ^DEBUG_HEAP_INFORMATION;
+
+ _DEBUG_LOCK_INFORMATION = record // c.f. SYSTEM_LOCK_INFORMATION
+ Address: PVOID;
+ Type_: USHORT;
+ CreatorBackTraceIndex: USHORT;
+ OwnerThreadId: ULONG;
+ ActiveCount: ULONG;
+ ContentionCount: ULONG;
+ EntryCount: ULONG;
+ RecursionCount: ULONG;
+ NumberOfSharedWaiters: ULONG;
+ NumberOfExclusiveWaiters: ULONG;
+ end;
+ DEBUG_LOCK_INFORMATION = _DEBUG_LOCK_INFORMATION;
+ PDEBUG_LOCK_INFORMATION = ^DEBUG_LOCK_INFORMATION;
+
+function RtlCreateQueryDebugBuffer(Size: ULONG; EventPair: ByteBool): PDEBUG_BUFFER; stdcall; external ntdll name 'RtlCreateQueryDebugBuffer';
+function RtlQueryProcessDebugInformation(ProcessId: ULONG; DebugInfoClassMask: ULONG; DebugBuffer: PDEBUG_BUFFER): NTSTATUS; stdcall; external ntdll name 'RtlQueryProcessDebugInformation';
+function RtlDestroyQueryDebugBuffer(DebugBuffer: PDEBUG_BUFFER): NTSTATUS; stdcall; external ntdll name 'RtlDestroyQueryDebugBuffer';
+function NtCreateJobObject(JobHandle: PHANDLE; DesiredAccess: ACCESS_MASK; ObjectAttributes: POBJECT_ATTRIBUTES): NTSTATUS; stdcall; external ntdll name 'NtCreateJobObject';
+function NtOpenJobObject(JobHandle: PHANDLE; DesiredAccess: ACCESS_MASK; ObjectAttributes: POBJECT_ATTRIBUTES): NTSTATUS; stdcall; external ntdll name 'NtOpenJobObject';
+function NtTerminateJobObject(JobHandle: HANDLE; ExitStatus: NTSTATUS): NTSTATUS; stdcall; external ntdll name 'NtTerminateJobObject';
+function NtAssignProcessToJobObject(JobHandle: HANDLE; ProcessHandle: HANDLE): NTSTATUS; stdcall; external ntdll name 'NtAssignProcessToJobObject';
+function NtQueryInformationJobObject(JobHandle: HANDLE; JobInformationClass: JOBOBJECTINFOCLASS; JobInformation: PVOID; JobInformationLength: ULONG; ReturnLength: PULONG): NTSTATUS; stdcall; external ntdll name 'NtQueryInformationJobObject';
+function NtSetInformationJobObject(JobHandle: HANDLE; JobInformationClass: JOBOBJECTINFOCLASS; JobInformation: PVOID; JobInformationLength: ULONG): NTSTATUS; stdcall; external ntdll name 'NtSetInformationJobObject';
+function NtCreateToken(TokenHandle: PHANDLE; DesiredAccess: ACCESS_MASK; ObjectAttributes: POBJECT_ATTRIBUTES; Type_: TOKEN_TYPE; AuthenticationId: PLUID; ExpirationTime: PLARGE_INTEGER; User: PTOKEN_USER; Groups: PTOKEN_GROUPS; Privileges: PTOKEN_PRIVILEGES; Owner: PTOKEN_OWNER; PrimaryGroup: PTOKEN_PRIMARY_GROUP; DefaultDacl: PTOKEN_DEFAULT_DACL; Source: PTOKEN_SOURCE): NTSTATUS; stdcall; external ntdll name 'NtCreateToken';
+function NtOpenProcessToken(ProcessHandle: HANDLE; DesiredAccess: ACCESS_MASK; TokenHandle: PHANDLE): NTSTATUS; stdcall; external ntdll name 'NtOpenProcessToken';
+function NtOpenThreadToken(ThreadHandle: HANDLE; DesiredAccess: ACCESS_MASK; OpenAsSelf: ByteBool; TokenHandle: PHANDLE): NTSTATUS; stdcall; external ntdll name 'NtOpenThreadToken';
+function NtDuplicateToken(ExistingTokenHandle: HANDLE; DesiredAccess: ACCESS_MASK; ObjectAttributes: POBJECT_ATTRIBUTES; EffectiveOnly: ByteBool; TokenType: TOKEN_TYPE; NewTokenHandle: PHANDLE): NTSTATUS; stdcall; external ntdll name 'NtDuplicateToken';
+function NtFilterToken(ExistingTokenHandle: HANDLE; Flags: ULONG; SidsToDisable: PTOKEN_GROUPS; PrivilegesToDelete: PTOKEN_PRIVILEGES; SidsToRestricted: PTOKEN_GROUPS; NewTokenHandle: PHANDLE): NTSTATUS; stdcall; external ntdll name 'NtFilterToken';
+function NtAdjustPrivilegesToken(TokenHandle: HANDLE; DisableAllPrivileges: ByteBool; NewState: PTOKEN_PRIVILEGES; BufferLength: ULONG; PreviousState: PTOKEN_PRIVILEGES; ReturnLength: PULONG): NTSTATUS; stdcall; external ntdll name 'NtAdjustPrivilegesToken';
+function NtAdjustGroupsToken(TokenHandle: HANDLE; ResetToDefault: ByteBool; NewState: PTOKEN_GROUPS; BufferLength: ULONG; PreviousState: PTOKEN_GROUPS; ReturnLength: PULONG): NTSTATUS; stdcall; external ntdll name 'NtAdjustGroupsToken';
+function NtQueryInformationToken(TokenHandle: HANDLE; TokenInformationClass: TOKEN_INFORMATION_CLASS; TokenInformation: PVOID; TokenInformationLength: ULONG; ReturnLength: PULONG): NTSTATUS; stdcall; external ntdll name 'NtQueryInformationToken';
+function NtSetInformationToken(TokenHandle: HANDLE; TokenInformationClass: TOKEN_INFORMATION_CLASS; TokenInformation: PVOID; TokenInformationLength: ULONG): NTSTATUS; stdcall; external ntdll name 'NtSetInformationToken';
+function NtWaitForSingleObject(Handle: HANDLE; Alertable: ByteBool; Timeout: PLARGE_INTEGER): NTSTATUS; stdcall; external ntdll name 'NtWaitForSingleObject';
+function NtSignalAndWaitForSingleObject(HandleToSignal: HANDLE; HandleToWait: HANDLE; Alertable: ByteBool; Timeout: PLARGE_INTEGER): NTSTATUS; stdcall; external ntdll name 'NtSignalAndWaitForSingleObject';
+function NtWaitForMultipleObjects(HandleCount: ULONG; Handles: PHANDLE; WaitType: WAIT_TYPE; Alertable: ByteBool; Timeout: PLARGE_INTEGER): NTSTATUS; stdcall; external ntdll name 'NtWaitForMultipleObjects';
+function NtCreateTimer(TimerHandle: PHANDLE; DesiredAccess: ACCESS_MASK; ObjectAttributes: POBJECT_ATTRIBUTES; TimerType: TIMER_TYPE): NTSTATUS; stdcall; external ntdll name 'NtCreateTimer';
+function NtOpenTimer(TimerHandle: PHANDLE; DesiredAccess: ACCESS_MASK; ObjectAttributes: POBJECT_ATTRIBUTES): NTSTATUS; stdcall; external ntdll name 'NtOpenTimer';
+function NtCancelTimer(TimerHandle: HANDLE; PreviousState: PBOOLEAN): NTSTATUS; stdcall; external ntdll name 'NtCancelTimer';
+
+type
+ PTIMER_APC_ROUTINE = procedure(TimerContext: PVOID; TimerLowValue: ULONG; TimerHighValue: LONG); stdcall;
+
+function NtSetTimer(TimerHandle: HANDLE; DueTime: PLARGE_INTEGER; TimerApcRoutine: PTIMER_APC_ROUTINE; TimerContext: PVOID; Resume: ByteBool; Period: LONG; PreviousState: PBOOLEAN): NTSTATUS; stdcall; external ntdll name 'NtSetTimer';
+
+type
+ _TIMER_INFORMATION_CLASS = (TimerBasicInformation);
+ TIMER_INFORMATION_CLASS = _TIMER_INFORMATION_CLASS;
+
+function NtQueryTimer(TimerHandle: HANDLE; TimerInformationClass: TIMER_INFORMATION_CLASS; TimerInformation: PVOID; TimerInformationLength: ULONG; ResultLength: PULONG): NTSTATUS; stdcall; external ntdll name 'NtQueryTimer';
+
+type
+ _TIMER_BASIC_INFORMATION = record
+ TimeRemaining: LARGE_INTEGER;
+ SignalState: ByteBool;
+ end;
+ TIMER_BASIC_INFORMATION = _TIMER_BASIC_INFORMATION;
+ PTIMER_BASIC_INFORMATION = ^TIMER_BASIC_INFORMATION;
+
+function NtCreateEvent(EventHandle: PHANDLE; DesiredAccess: ACCESS_MASK; ObjectAttributes: POBJECT_ATTRIBUTES; EventType: EVENT_TYPE; InitialState: ByteBool): NTSTATUS; stdcall; external ntdll name 'NtCreateEvent';
+function NtOpenEvent(EventHandle: PHANDLE; DesiredAccess: ACCESS_MASK; ObjectAttributes: POBJECT_ATTRIBUTES): NTSTATUS; stdcall; external ntdll name 'NtOpenEvent';
+function NtSetEvent(EventHandle: HANDLE; PreviousState: PULONG): NTSTATUS; stdcall; external ntdll name 'NtSetEvent';
+function NtPulseEvent(EventHandle: HANDLE; PreviousState: PULONG): NTSTATUS; stdcall; external ntdll name 'NtPulseEvent';
+function NtResetEvent(EventHandle: HANDLE; PreviousState: PULONG): NTSTATUS; stdcall; external ntdll name 'NtResetEvent';
+function NtClearEvent(EventHandle: HANDLE): NTSTATUS; stdcall; external ntdll name 'NtClearEvent';
+
+type
+ _EVENT_INFORMATION_CLASS = (EventBasicInformation);
+ EVENT_INFORMATION_CLASS = _EVENT_INFORMATION_CLASS;
+
+function NtQueryEvent(EventHandle: HANDLE; EventInformationClass: EVENT_INFORMATION_CLASS; EventInformation: PVOID; EventInformationLength: ULONG; ResultLength: PULONG): NTSTATUS; stdcall; external ntdll name 'NtQueryEvent';
+
+type
+ _EVENT_BASIC_INFORMATION = record
+ EventType: EVENT_TYPE;
+ SignalState: LONG;
+ end;
+ EVENT_BASIC_INFORMATION = _EVENT_BASIC_INFORMATION;
+ PEVENT_BASIC_INFORMATION = ^EVENT_BASIC_INFORMATION;
+
+function NtCreateSemaphore(SemaphoreHandle: PHANDLE; DesiredAccess: ACCESS_MASK; ObjectAttributes: POBJECT_ATTRIBUTES; InitialCount: LONG; MaximumCount: LONG): NTSTATUS; stdcall; external ntdll name 'NtCreateSemaphore';
+function NtOpenSemaphore(SemaphoreHandle: PHANDLE; DesiredAccess: ACCESS_MASK; ObjectAttributes: POBJECT_ATTRIBUTES): NTSTATUS; stdcall; external ntdll name 'NtOpenSemaphore';
+function NtReleaseSemaphore(SemaphoreHandle: HANDLE; ReleaseCount: LONG; PreviousCount: PLONG): NTSTATUS; stdcall; external ntdll name 'NtReleaseSemaphore';
+
+type
+ _SEMAPHORE_INFORMATION_CLASS = (SemaphoreBasicInformation);
+ SEMAPHORE_INFORMATION_CLASS = _SEMAPHORE_INFORMATION_CLASS;
+
+function NtQuerySemaphore(SemaphoreHandle: HANDLE; SemaphoreInformationClass: SEMAPHORE_INFORMATION_CLASS; SemaphoreInformation: PVOID; SemaphoreInformationLength: ULONG; ResultLength: PULONG): NTSTATUS; stdcall; external ntdll name 'NtQuerySemaphore';
+
+type
+ _SEMAPHORE_BASIC_INFORMATION = record
+ CurrentCount: LONG;
+ MaximumCount: LONG;
+ end;
+ SEMAPHORE_BASIC_INFORMATION = _SEMAPHORE_BASIC_INFORMATION;
+ PSEMAPHORE_BASIC_INFORMATION = ^SEMAPHORE_BASIC_INFORMATION;
+
+function NtCreateMutant(MutantHandle: PHANDLE; DesiredAccess: ACCESS_MASK; ObjectAttributes: POBJECT_ATTRIBUTES; InitialOwner: ByteBool): NTSTATUS; stdcall; external ntdll name 'NtCreateMutant';
+function NtOpenMutant(MutantHandle: PHANDLE; DesiredAccess: ACCESS_MASK; ObjectAttributes: POBJECT_ATTRIBUTES): NTSTATUS; stdcall; external ntdll name 'NtOpenMutant';
+function NtReleaseMutant(MutantHandle: HANDLE; PreviousState: PULONG): NTSTATUS; stdcall; external ntdll name 'NtReleaseMutant';
+
+type
+ _MUTANT_INFORMATION_CLASS = (MutantBasicInformation);
+ MUTANT_INFORMATION_CLASS = _MUTANT_INFORMATION_CLASS;
+
+function NtQueryMutant(MutantHandle: HANDLE; MutantInformationClass: MUTANT_INFORMATION_CLASS; MutantInformation: PVOID; MutantInformationLength: ULONG; ResultLength: PULONG): NTSTATUS; stdcall; external ntdll name 'NtQueryMutant';
+
+type
+ _MUTANT_BASIC_INFORMATION = record
+ SignalState: LONG;
+ Owned: ByteBool;
+ Abandoned: ByteBool;
+ end;
+ MUTANT_BASIC_INFORMATION = _MUTANT_BASIC_INFORMATION;
+ PMUTANT_BASIC_INFORMATION = ^MUTANT_BASIC_INFORMATION;
+
+function NtCreateIoCompletion(IoCompletionHandle: PHANDLE; DesiredAccess: ACCESS_MASK; ObjectAttributes: POBJECT_ATTRIBUTES; NumberOfConcurrentThreads: ULONG): NTSTATUS; stdcall; external ntdll name 'NtCreateIoCompletion';
+function NtOpenIoCompletion(IoCompletionHandle: PHANDLE; DesiredAccess: ACCESS_MASK; ObjectAttributes: POBJECT_ATTRIBUTES): NTSTATUS; stdcall; external ntdll name 'NtOpenIoCompletion';
+function NtSetIoCompletion(IoCompletionHandle: HANDLE; CompletionKey: ULONG; CompletionValue: ULONG; Status: NTSTATUS; Information: ULONG): NTSTATUS; stdcall; external ntdll name 'NtSetIoCompletion';
+function NtRemoveIoCompletion(IoCompletionHandle: HANDLE; CompletionKey: PULONG; CompletionValue: PULONG; IoStatusBlock: PIO_STATUS_BLOCK; Timeout: PLARGE_INTEGER): NTSTATUS; stdcall; external ntdll name 'NtRemoveIoCompletion';
+
+type
+ _IO_COMPLETION_INFORMATION_CLASS = (IoCompletionBasicInformation);
+ IO_COMPLETION_INFORMATION_CLASS = _IO_COMPLETION_INFORMATION_CLASS;
+
+function NtQueryIoCompletion(IoCompletionHandle: HANDLE; IoCompletionInformationClass: IO_COMPLETION_INFORMATION_CLASS; IoCompletionInformation: PVOID; IoCompletionInformationLength: ULONG; ResultLength: PULONG): NTSTATUS; stdcall; external ntdll name 'NtQueryIoCompletion';
+
+type
+ _IO_COMPLETION_BASIC_INFORMATION = record
+ SignalState: LONG;
+ end;
+ IO_COMPLETION_BASIC_INFORMATION = _IO_COMPLETION_BASIC_INFORMATION;
+ PIO_COMPLETION_BASIC_INFORMATION = ^IO_COMPLETION_BASIC_INFORMATION;
+
+function NtCreateEventPair(EventPairHandle: PHANDLE; DesiredAccess: ACCESS_MASK; ObjectAttributes: POBJECT_ATTRIBUTES): NTSTATUS; stdcall; external ntdll name 'NtCreateEventPair';
+function NtOpenEventPair(EventPairHandle: PHANDLE; DesiredAccess: ACCESS_MASK; ObjectAttributes: POBJECT_ATTRIBUTES): NTSTATUS; stdcall; external ntdll name 'NtOpenEventPair';
+function NtWaitLowEventPair(EventPairHandle: HANDLE): NTSTATUS; stdcall; external ntdll name 'NtWaitLowEventPair';
+function NtWaitHighEventPair(EventPairHandle: HANDLE): NTSTATUS; stdcall; external ntdll name 'NtWaitHighEventPair';
+function NtSetLowWaitHighEventPair(EventPairHandle: HANDLE): NTSTATUS; stdcall; external ntdll name 'NtSetLowWaitHighEventPair';
+function NtSetHighWaitLowEventPair(EventPairHandle: HANDLE): NTSTATUS; stdcall; external ntdll name 'NtSetHighWaitLowEventPair';
+function NtSetLowEventPair(EventPairHandle: HANDLE): NTSTATUS; stdcall; external ntdll name 'NtSetLowEventPair';
+function NtSetHighEventPair(EventPairHandle: HANDLE): NTSTATUS; stdcall; external ntdll name 'NtSetHighEventPair';
+function NtQuerySystemTime(CurrentTime: PLARGE_INTEGER): NTSTATUS; stdcall; external ntdll name 'NtQuerySystemTime';
+function NtSetSystemTime(NewTime: PLARGE_INTEGER; OldTime: PLARGE_INTEGER): NTSTATUS; stdcall; external ntdll name 'NtSetSystemTime';
+function NtQueryPerformanceCounter(PerformanceCount: PLARGE_INTEGER; PerformanceFrequency: PLARGE_INTEGER): NTSTATUS; stdcall; external ntdll name 'NtQueryPerformanceCounter';
+function NtSetTimerResolution(RequestedResolution: ULONG; Set_: ByteBool; ActualResolution: PULONG): NTSTATUS; stdcall; external ntdll name 'NtSetTimerResolution';
+function NtQueryTimerResolution(CoarsestResolution: PULONG; FinestResolution: PULONG; ActualResolution: PULONG): NTSTATUS; stdcall; external ntdll name 'NtQueryTimerResolution';
+function NtDelayExecution(Alertable: ByteBool; Interval: PLARGE_INTEGER): NTSTATUS; stdcall; external ntdll name 'NtDelayExecution';
+function NtYieldExecution: NTSTATUS; stdcall; external ntdll name 'NtYieldExecution';
+function NtGetTickCount: ULONG; stdcall; external ntdll name 'NtGetTickCount';
+function NtCreateProfile(ProfileHandle: PHANDLE; ProcessHandle: HANDLE; Base: PVOID; Size: ULONG; BucketShift: ULONG; Buffer: PULONG; BufferLength: ULONG; Source: KPROFILE_SOURCE; ProcessorMask: ULONG): NTSTATUS; stdcall; external ntdll name 'NtCreateProfile';
+function NtSetIntervalProfile(Interval: ULONG; Source: KPROFILE_SOURCE): NTSTATUS; stdcall; external ntdll name 'NtSetIntervalProfile';
+function NtQueryIntervalProfile(Source: KPROFILE_SOURCE; Interval: PULONG): NTSTATUS; stdcall; external ntdll name 'NtQueryIntervalProfile';
+function NtStartProfile(ProfileHandle: HANDLE): NTSTATUS; stdcall; external ntdll name 'NtStartProfile';
+function NtStopProfile(ProfileHandle: HANDLE): NTSTATUS; stdcall; external ntdll name 'NtStopProfile';
+
+type
+ _PORT_MESSAGE = record
+ DataSize: USHORT;
+ MessageSize: USHORT;
+ MessageType: USHORT;
+ VirtualRangesOffset: USHORT;
+ ClientId: CLIENT_ID;
+ MessageId: ULONG;
+ SectionSize: ULONG;
+ // UCHAR Data[];
+ end;
+ PORT_MESSAGE = _PORT_MESSAGE;
+ PPORT_MESSAGE = ^PORT_MESSAGE;
+
+ _LPC_TYPE = (
+ LPC_NEW_MESSAGE, // A new message
+ LPC_REQUEST, // A request message
+ LPC_REPLY, // A reply to a request message
+ LPC_DATAGRAM, //
+ LPC_LOST_REPLY, //
+ LPC_PORT_CLOSED, // Sent when port is deleted
+ LPC_CLIENT_DIED, // Messages to thread termination ports
+ LPC_EXCEPTION, // Messages to thread exception port
+ LPC_DEBUG_EVENT, // Messages to thread debug port
+ LPC_ERROR_EVENT, // Used by ZwRaiseHardError
+ LPC_CONNECTION_REQUEST); // Used by ZwConnectPort
+ LPC_TYPE = _LPC_TYPE;
+
+ _PORT_SECTION_WRITE = record
+ Length: ULONG;
+ SectionHandle: HANDLE;
+ SectionOffset: ULONG;
+ ViewSize: ULONG;
+ ViewBase: PVOID;
+ TargetViewBase: PVOID;
+ end;
+ PORT_SECTION_WRITE = _PORT_SECTION_WRITE;
+ PPORT_SECTION_WRITE = ^PORT_SECTION_WRITE;
+
+ _PORT_SECTION_READ = record
+ Length: ULONG;
+ ViewSize: ULONG;
+ ViewBase: ULONG;
+ end;
+ PORT_SECTION_READ = _PORT_SECTION_READ;
+ PPORT_SECTION_READ = ^PORT_SECTION_READ;
+
+function NtCreatePort(PortHandle: PHANDLE; ObjectAttributes: POBJECT_ATTRIBUTES; MaxDataSize: ULONG; MaxMessageSize: ULONG; Reserved: ULONG): NTSTATUS; stdcall; external ntdll name 'NtCreatePort';
+function NtCreateWaitablePort(PortHandle: PHANDLE; ObjectAttributes: POBJECT_ATTRIBUTES; MaxDataSize: ULONG; MaxMessageSize: ULONG; Reserved: ULONG): NTSTATUS; stdcall; external ntdll name 'NtCreateWaitablePort';
+function NtConnectPort(PortHandle: PHANDLE; PortName: PUNICODE_STRING; SecurityQos: PSECURITY_QUALITY_OF_SERVICE; WriteSection: PPORT_SECTION_WRITE; ReadSection: PPORT_SECTION_READ; MaxMessageSize: PULONG; ConnectData: PVOID; ConnectDataLength: PULONG): NTSTATUS; stdcall; external ntdll name 'NtConnectPort';
+function NtSecureConnectPort(PortHandle: PHANDLE; PortName: PUNICODE_STRING; SecurityQos: PSECURITY_QUALITY_OF_SERVICE; WriteSection: PPORT_SECTION_WRITE; ServerSid: PSID; ReadSection: PPORT_SECTION_READ; MaxMessageSize: PULONG; ConnectData: PVOID; ConnectDataLength: PULONG): NTSTATUS; stdcall; external ntdll name 'NtSecureConnectPort';
+function NtListenPort(PortHandle: HANDLE; Message: PPORT_MESSAGE): NTSTATUS; stdcall; external ntdll name 'NtListenPort';
+function NtAcceptConnectPort(PortHandle: PHANDLE; PortIdentifier: ULONG; Message: PPORT_MESSAGE; Accept: ByteBool; WriteSection: PPORT_SECTION_WRITE; ReadSection: PPORT_SECTION_READ): NTSTATUS; stdcall; external ntdll name 'NtAcceptConnectPort';
+function NtCompleteConnectPort(PortHandle: HANDLE): NTSTATUS; stdcall; external ntdll name 'NtCompleteConnectPort';
+function NtRequestPort(PortHandle: HANDLE; RequestMessage: PPORT_MESSAGE): NTSTATUS; stdcall; external ntdll name 'NtRequestPort';
+function NtRequestWaitReplyPort(PortHandle: HANDLE; RequestMessage: PPORT_MESSAGE; ReplyMessage: PPORT_MESSAGE): NTSTATUS; stdcall; external ntdll name 'NtRequestWaitReplyPort';
+function NtReplyPort(PortHandle: HANDLE; ReplyMessage: PPORT_MESSAGE): NTSTATUS; stdcall; external ntdll name 'NtReplyPort';
+function NtReplyWaitReplyPort(PortHandle: HANDLE; ReplyMessage: PPORT_MESSAGE): NTSTATUS; stdcall; external ntdll name 'NtReplyWaitReplyPort';
+function NtReplyWaitReceivePort(PortHandle: HANDLE; PortIdentifier: PULONG; ReplyMessage: PPORT_MESSAGE; Message: PPORT_MESSAGE): NTSTATUS; stdcall; external ntdll name 'NtReplyWaitReceivePort';
+function NtReplyWaitReceivePortEx(PortHandle: HANDLE; PortIdentifier: PULONG; ReplyMessage: PPORT_MESSAGE; Message: PPORT_MESSAGE; Timeout: PLARGE_INTEGER): NTSTATUS; stdcall; external ntdll name 'NtReplyWaitReceivePortEx';
+function NtReadRequestData(PortHandle: HANDLE; Message: PPORT_MESSAGE; Index: ULONG; Buffer: PVOID; BufferLength: ULONG; ReturnLength: PULONG): NTSTATUS; stdcall; external ntdll name 'NtReadRequestData';
+function NtWriteRequestData(PortHandle: HANDLE; Message: PPORT_MESSAGE; Index: ULONG; Buffer: PVOID; BufferLength: ULONG; ReturnLength: PULONG): NTSTATUS; stdcall; external ntdll name 'NtWriteRequestData';
+
+type
+ _PORT_INFORMATION_CLASS = (PortBasicInformation);
+ PORT_INFORMATION_CLASS = _PORT_INFORMATION_CLASS;
+
+function NtQueryInformationPort(PortHandle: HANDLE; PortInformationClass: PORT_INFORMATION_CLASS; PortInformation: PVOID; PortInformationLength: ULONG; ReturnLength: PULONG): NTSTATUS; stdcall; external ntdll name 'NtQueryInformationPort';
+
+type
+ _PORT_BASIC_INFORMATION = record
+ end;
+ PORT_BASIC_INFORMATION = _PORT_BASIC_INFORMATION;
+ PPORT_BASIC_INFORMATION = ^PORT_BASIC_INFORMATION;
+
+function NtImpersonateClientOfPort(PortHandle: HANDLE; Message: PPORT_MESSAGE): NTSTATUS; stdcall; external ntdll name 'NtImpersonateClientOfPort';
+function NtCreateFile(FileHandle: PHANDLE; DesiredAccess: ACCESS_MASK; ObjectAttributes: POBJECT_ATTRIBUTES; IoStatusBlock: PIO_STATUS_BLOCK; AllocationSize: PLARGE_INTEGER; FileAttributes: ULONG; ShareAccess: ULONG; CreateDisposition: ULONG; CreateOptions: ULONG; EaBuffer: PVOID; EaLength: ULONG): NTSTATUS; stdcall; external ntdll name 'NtCreateFile';
+function NtOpenFile(FileHandle: PHANDLE; DesiredAccess: ACCESS_MASK; ObjectAttributes: POBJECT_ATTRIBUTES; IoStatusBlock: PIO_STATUS_BLOCK; ShareAccess: ULONG; OpenOptions: ULONG): NTSTATUS; stdcall; external ntdll name 'NtOpenFile';
+function NtDeleteFile(ObjectAttributes: POBJECT_ATTRIBUTES): NTSTATUS; stdcall; external ntdll name 'NtDeleteFile';
+function NtFlushBuffersFile(FileHandle: HANDLE; IoStatusBlock: PIO_STATUS_BLOCK): NTSTATUS; stdcall; external ntdll name 'NtFlushBuffersFile';
+function NtCancelIoFile(FileHandle: HANDLE; IoStatusBlock: PIO_STATUS_BLOCK): NTSTATUS; stdcall; external ntdll name 'NtCancelIoFile';
+function NtReadFile(FileHandle: HANDLE; Event: HANDLE; ApcRoutine: PIO_APC_ROUTINE; ApcContext: PVOID; IoStatusBlock: PIO_STATUS_BLOCK; Buffer: PVOID; Length: ULONG; ByteOffset: PLARGE_INTEGER; Key: PULONG): NTSTATUS; stdcall; external ntdll name 'NtReadFile';
+function NtWriteFile(FileHandle: HANDLE; Event: HANDLE; ApcRoutine: PIO_APC_ROUTINE; ApcContext: PVOID; IoStatusBlock: PIO_STATUS_BLOCK; Buffer: PVOID; Length: ULONG; ByteOffset: PLARGE_INTEGER; Key: PULONG): NTSTATUS; stdcall; external ntdll name 'NtWriteFile';
+function NtReadFileScatter(FileHandle: HANDLE; Event: HANDLE; ApcRoutine: PIO_APC_ROUTINE; ApcContext: PVOID; IoStatusBlock: PIO_STATUS_BLOCK; Buffer: PFILE_SEGMENT_ELEMENT; Length: ULONG; ByteOffset: PLARGE_INTEGER; Key: PULONG): NTSTATUS; stdcall; external ntdll name 'NtReadFileScatter';
+function NtWriteFileGather(FileHandle: HANDLE; Event: HANDLE; ApcRoutine: PIO_APC_ROUTINE; ApcContext: PVOID; IoStatusBlock: PIO_STATUS_BLOCK; Buffer: PFILE_SEGMENT_ELEMENT; Length: ULONG; ByteOffset: PLARGE_INTEGER; Key: PULONG): NTSTATUS; stdcall; external ntdll name 'NtWriteFileGather';
+function NtLockFile(FileHandle: HANDLE; Event: HANDLE; ApcRoutine: PIO_APC_ROUTINE; ApcContext: PVOID; IoStatusBlock: PIO_STATUS_BLOCK; LockOffset: PULARGE_INTEGER; LockLength: PULARGE_INTEGER; Key: ULONG; FailImmediately: ByteBool; ExclusiveLock: ByteBool): NTSTATUS; stdcall; external ntdll name 'NtLockFile';
+function NtUnlockFile(FileHandle: HANDLE; IoStatusBlock: PIO_STATUS_BLOCK; LockOffset: PULARGE_INTEGER; LockLength: PULARGE_INTEGER; Key: ULONG): NTSTATUS; stdcall; external ntdll name 'NtUnlockFile';
+function NtDeviceIoControlFile(FileHandle: HANDLE; Event: HANDLE; ApcRoutine: PIO_APC_ROUTINE; ApcContext: PVOID; IoStatusBlock: PIO_STATUS_BLOCK; IoControlCode: ULONG; InputBuffer: PVOID; InputBufferLength: ULONG; OutputBuffer: PVOID; OutputBufferLength: ULONG): NTSTATUS; stdcall; external ntdll name 'NtDeviceIoControlFile';
+function NtFsControlFile(FileHandle: HANDLE; Event: HANDLE; ApcRoutine: PIO_APC_ROUTINE; ApcContext: PVOID; IoStatusBlock: PIO_STATUS_BLOCK; FsControlCode: ULONG; InputBuffer: PVOID; InputBufferLength: ULONG; OutputBuffer: PVOID; OutputBufferLength: ULONG): NTSTATUS; stdcall; external ntdll name 'NtFsControlFile';
+function NtNotifyChangeDirectoryFile(FileHandle: HANDLE; Event: HANDLE; ApcRoutine: PIO_APC_ROUTINE; ApcContext: PVOID; IoStatusBlock: PIO_STATUS_BLOCK; Buffer: PFILE_NOTIFY_INFORMATION; BufferLength: ULONG; NotifyFilter: ULONG; WatchSubtree: ByteBool): NTSTATUS; stdcall; external ntdll name 'NtNotifyChangeDirectoryFile';
+
+type
+ _FILE_GET_EA_INFORMATION = record
+ NextEntryOffset: ULONG;
+ EaNameLength: UCHAR;
+ EaName: array [0..0] of CHAR;
+ end;
+ FILE_GET_EA_INFORMATION = _FILE_GET_EA_INFORMATION;
+ PFILE_GET_EA_INFORMATION = ^FILE_GET_EA_INFORMATION;
+
+function NtQueryEaFile(FileHandle: HANDLE; IoStatusBlock: PIO_STATUS_BLOCK; Buffer: PFILE_FULL_EA_INFORMATION; BufferLength: ULONG; ReturnSingleEntry: ByteBool; EaList: PFILE_GET_EA_INFORMATION; EaListLength: ULONG; EaIndex: PULONG; RestartScan: ByteBool): NTSTATUS; stdcall; external ntdll name 'NtQueryEaFile';
+function NtSetEaFile(FileHandle: HANDLE; IoStatusBlock: PIO_STATUS_BLOCK; Buffer: PFILE_FULL_EA_INFORMATION; BufferLength: ULONG): NTSTATUS; stdcall; external ntdll name 'NtSetEaFile';
+function NtCreateNamedPipeFile(FileHandle: PHANDLE; DesiredAccess: ACCESS_MASK; ObjectAttributes: POBJECT_ATTRIBUTES; IoStatusBlock: PIO_STATUS_BLOCK; ShareAccess: ULONG; CreateDisposition: ULONG; CreateOptions: ULONG; TypeMessage: ByteBool; ReadmodeMessage: ByteBool; Nonblocking: ByteBool; MaxInstances: ULONG; InBufferSize: ULONG; OutBufferSize: ULONG; DefaultTimeout: PLARGE_INTEGER): NTSTATUS; stdcall; external ntdll name 'NtCreateNamedPipeFile';
+function NtCreateMailslotFile(FileHandle: PHANDLE; DesiredAccess: ACCESS_MASK; ObjectAttributes: POBJECT_ATTRIBUTES; IoStatusBlock: PIO_STATUS_BLOCK; CreateOptions: ULONG; Unknown: ULONG; MaxMessageSize: ULONG; ReadTimeout: PLARGE_INTEGER): NTSTATUS; stdcall; external ntdll name 'NtCreateMailslotFile';
+function NtQueryVolumeInformationFile(FileHandle: HANDLE; IoStatusBlock: PIO_STATUS_BLOCK; VolumeInformation: PVOID; VolumeInformationLength: ULONG; VolumeInformationClass: FS_INFORMATION_CLASS): NTSTATUS; stdcall; external ntdll name 'NtQueryVolumeInformationFile';
+function NtSetVolumeInformationFile(FileHandle: HANDLE; IoStatusBlock: PIO_STATUS_BLOCK; Buffer: PVOID; BufferLength: ULONG; VolumeInformationClass: FS_INFORMATION_CLASS): NTSTATUS; stdcall; external ntdll name 'NtSetVolumeInformationFile';
+
+type
+ _FILE_FS_VOLUME_INFORMATION = record
+ VolumeCreationTime: LARGE_INTEGER;
+ VolumeSerialNumber: ULONG;
+ VolumeLabelLength: ULONG;
+ Unknown: UCHAR;
+ VolumeLabel: array [0..0] of WCHAR;
+ end;
+ FILE_FS_VOLUME_INFORMATION = _FILE_FS_VOLUME_INFORMATION;
+ PFILE_FS_VOLUME_INFORMATION = ^FILE_FS_VOLUME_INFORMATION;
+
+ _FILE_FS_LABEL_INFORMATION = record
+ VolumeLabelLength: ULONG;
+ VolumeLabel: WCHAR;
+ end;
+ FILE_FS_LABEL_INFORMATION = _FILE_FS_LABEL_INFORMATION;
+ PFILE_FS_LABEL_INFORMATION = ^FILE_FS_LABEL_INFORMATION;
+
+ _FILE_FS_SIZE_INFORMATION = record
+ TotalAllocationUnits: LARGE_INTEGER;
+ AvailableAllocationUnits: LARGE_INTEGER;
+ SectorsPerAllocationUnit: ULONG;
+ BytesPerSector: ULONG;
+ end;
+ FILE_FS_SIZE_INFORMATION = _FILE_FS_SIZE_INFORMATION;
+ PFILE_FS_SIZE_INFORMATION = ^FILE_FS_SIZE_INFORMATION;
+
+ _FILE_FS_ATTRIBUTE_INFORMATION = record
+ FileSystemFlags: ULONG;
+ MaximumComponentNameLength: ULONG;
+ FileSystemNameLength: ULONG;
+ FileSystemName: array [0..0] of WCHAR
+ end;
+ FILE_FS_ATTRIBUTE_INFORMATION = _FILE_FS_ATTRIBUTE_INFORMATION;
+ PFILE_FS_ATTRIBUTE_INFORMATION = ^FILE_FS_ATTRIBUTE_INFORMATION;
+
+ _FILE_FS_CONTROL_INFORMATION = record
+ Reserved: array [0..2] of LARGE_INTEGER;
+ DefaultQuotaThreshold: LARGE_INTEGER;
+ DefaultQuotaLimit: LARGE_INTEGER;
+ QuotaFlags: ULONG;
+ end;
+ FILE_FS_CONTROL_INFORMATION = _FILE_FS_CONTROL_INFORMATION;
+ PFILE_FS_CONTROL_INFORMATION = ^FILE_FS_CONTROL_INFORMATION;
+
+ _FILE_FS_FULL_SIZE_INFORMATION = record
+ TotalQuotaAllocationUnits: LARGE_INTEGER;
+ AvailableQuotaAllocationUnits: LARGE_INTEGER;
+ AvailableAllocationUnits: LARGE_INTEGER;
+ SectorsPerAllocationUnit: ULONG;
+ BytesPerSector: ULONG;
+ end;
+ FILE_FS_FULL_SIZE_INFORMATION = _FILE_FS_FULL_SIZE_INFORMATION;
+ PFILE_FS_FULL_SIZE_INFORMATION = ^FILE_FS_FULL_SIZE_INFORMATION;
+
+ _FILE_FS_OBJECT_ID_INFORMATION = record
+ VolumeObjectId: UUID;
+ VolumeObjectIdExtendedInfo: array [0..11] of ULONG;
+ end;
+ FILE_FS_OBJECT_ID_INFORMATION = _FILE_FS_OBJECT_ID_INFORMATION;
+ PFILE_FS_OBJECT_ID_INFORMATION = ^FILE_FS_OBJECT_ID_INFORMATION;
+
+ _FILE_USER_QUOTA_INFORMATION = record
+ NextEntryOffset: ULONG;
+ SidLength: ULONG;
+ ChangeTime: LARGE_INTEGER;
+ QuotaUsed: LARGE_INTEGER;
+ QuotaThreshold: LARGE_INTEGER;
+ QuotaLimit: LARGE_INTEGER;
+ Sid: array [0..0] of SID;
+ end;
+ FILE_USER_QUOTA_INFORMATION = _FILE_USER_QUOTA_INFORMATION;
+ PFILE_USER_QUOTA_INFORMATION = ^FILE_USER_QUOTA_INFORMATION;
+
+ _FILE_QUOTA_LIST_INFORMATION = record
+ NextEntryOffset: ULONG;
+ SidLength: ULONG;
+ Sid: array [0..0] of SID;
+ end;
+ FILE_QUOTA_LIST_INFORMATION = _FILE_QUOTA_LIST_INFORMATION;
+ PFILE_QUOTA_LIST_INFORMATION = ^FILE_QUOTA_LIST_INFORMATION;
+
+function NtQueryQuotaInformationFile(FileHandle: HANDLE; IoStatusBlock: PIO_STATUS_BLOCK; Buffer: PFILE_USER_QUOTA_INFORMATION; BufferLength: ULONG; ReturnSingleEntry: ByteBool; QuotaList: PFILE_QUOTA_LIST_INFORMATION; QuotaListLength: ULONG; ResumeSid: PSID; RestartScan: ByteBool): NTSTATUS; stdcall; external ntdll name 'NtQueryQuotaInformationFile';
+function NtSetQuotaInformationFile(FileHandle: HANDLE; IoStatusBlock: PIO_STATUS_BLOCK; Buffer: PFILE_USER_QUOTA_INFORMATION; BufferLength: ULONG): NTSTATUS; stdcall; external ntdll name 'NtSetQuotaInformationFile';
+function NtQueryAttributesFile(ObjectAttributes: POBJECT_ATTRIBUTES; FileInformation: PFILE_BASIC_INFORMATION): NTSTATUS; stdcall; external ntdll name 'NtQueryAttributesFile';
+function NtQueryFullAttributesFile(ObjectAttributes: POBJECT_ATTRIBUTES; FileInformation: PFILE_NETWORK_OPEN_INFORMATION): NTSTATUS; stdcall; external ntdll name 'NtQueryFullAttributesFile';
+function NtQueryInformationFile(FileHandle: HANDLE; IoStatusBlock: PIO_STATUS_BLOCK; FileInformation: PVOID; FileInformationLength: ULONG; FileInformationClass: FILE_INFORMATION_CLASS): NTSTATUS; stdcall; external ntdll name 'NtQueryInformationFile';
+function NtSetInformationFile(FileHandle: HANDLE; IoStatusBlock: PIO_STATUS_BLOCK; FileInformation: PVOID; FileInformationLength: ULONG; FileInformationClass: FILE_INFORMATION_CLASS): NTSTATUS; stdcall; external ntdll name 'NtSetInformationFile';
+function NtQueryDirectoryFile(FileHandle: HANDLE; Event: HANDLE; ApcRoutine: PIO_APC_ROUTINE; ApcContext: PVOID; IoStatusBlock: PIO_STATUS_BLOCK; FileInformation: PVOID; FileInformationLength: ULONG; FileInformationClass: FILE_INFORMATION_CLASS; ReturnSingleEntry: ByteBool; FileName: PUNICODE_STRING; RestartScan: ByteBool): NTSTATUS; stdcall; external ntdll name 'NtQueryDirectoryFile';
+
+type
+ _FILE_DIRECTORY_INFORMATION = record // Information Class 1
+ NextEntryOffset: ULONG;
+ Unknown: ULONG;
+ CreationTime: LARGE_INTEGER;
+ LastAccessTime: LARGE_INTEGER;
+ LastWriteTime: LARGE_INTEGER;
+ ChangeTime: LARGE_INTEGER;
+ EndOfFile: LARGE_INTEGER;
+ AllocationSize: LARGE_INTEGER;
+ FileAttributes: ULONG;
+ FileNameLength: ULONG;
+ FileName: array [0..0] of WCHAR
+ end;
+ FILE_DIRECTORY_INFORMATION = _FILE_DIRECTORY_INFORMATION;
+ PFILE_DIRECTORY_INFORMATION = ^FILE_DIRECTORY_INFORMATION;
+
+ _FILE_FULL_DIRECTORY_INFORMATION = record // Information Class 2
+ NextEntryOffset: ULONG;
+ Unknown: ULONG;
+ CreationTime: LARGE_INTEGER;
+ LastAccessTime: LARGE_INTEGER;
+ LastWriteTime: LARGE_INTEGER;
+ ChangeTime: LARGE_INTEGER;
+ EndOfFile: LARGE_INTEGER;
+ AllocationSize: LARGE_INTEGER;
+ FileAttributes: ULONG;
+ FileNameLength: ULONG;
+ EaInformationLength: ULONG;
+ FileName: array [0..0] of WCHAR
+ end;
+ FILE_FULL_DIRECTORY_INFORMATION = _FILE_FULL_DIRECTORY_INFORMATION;
+ PFILE_FULL_DIRECTORY_INFORMATION = ^FILE_FULL_DIRECTORY_INFORMATION;
+
+ _FILE_BOTH_DIRECTORY_INFORMATION = record // Information Class 3
+ NextEntryOffset: ULONG;
+ Unknown: ULONG;
+ CreationTime: LARGE_INTEGER;
+ LastAccessTime: LARGE_INTEGER;
+ LastWriteTime: LARGE_INTEGER;
+ ChangeTime: LARGE_INTEGER;
+ EndOfFile: LARGE_INTEGER;
+ AllocationSize: LARGE_INTEGER;
+ FileAttributes: ULONG;
+ FileNameLength: ULONG;
+ EaInformationLength: ULONG;
+ AlternateNameLength: UCHAR;
+ AlternateName: array [0..11] of WCHAR;
+ FileName: array [0..0] of WCHAR;
+ end;
+ FILE_BOTH_DIRECTORY_INFORMATION = _FILE_BOTH_DIRECTORY_INFORMATION;
+ PFILE_BOTH_DIRECTORY_INFORMATION = ^FILE_BOTH_DIRECTORY_INFORMATION;
+
+ _FILE_INTERNAL_INFORMATION = record // Information Class 6
+ FileId: LARGE_INTEGER;
+ end;
+ FILE_INTERNAL_INFORMATION = _FILE_INTERNAL_INFORMATION;
+ PFILE_INTERNAL_INFORMATION = ^FILE_INTERNAL_INFORMATION;
+
+ _FILE_EA_INFORMATION = record // Information Class 7
+ EaInformationLength: ULONG;
+ end;
+ FILE_EA_INFORMATION = _FILE_EA_INFORMATION;
+ PFILE_EA_INFORMATION = ^FILE_EA_INFORMATION;
+
+ _FILE_ACCESS_INFORMATION = record // Information Class 8
+ GrantedAccess: ACCESS_MASK;
+ end;
+ FILE_ACCESS_INFORMATION = _FILE_ACCESS_INFORMATION;
+ PFILE_ACCESS_INFORMATION = ^FILE_ACCESS_INFORMATION;
+
+ _FILE_NAME_INFORMATION = record // Information Classes 9 and 21
+ FileNameLength: ULONG;
+ FileName: array [0..0] of WCHAR;
+ end;
+ FILE_NAME_INFORMATION = _FILE_NAME_INFORMATION;
+ PFILE_NAME_INFORMATION = ^FILE_NAME_INFORMATION;
+ FILE_ALTERNATE_NAME_INFORMATION = _FILE_NAME_INFORMATION;
+ PFILE_ALTERNATE_NAME_INFORMATION = ^FILE_ALTERNATE_NAME_INFORMATION;
+
+ _FILE_LINK_RENAME_INFORMATION = record // Info Classes 10 and 11
+ ReplaceIfExists: ByteBool;
+ RootDirectory: HANDLE;
+ FileNameLength: ULONG;
+ FileName: array [0..0] of WCHAR;
+ end;
+ FILE_LINK_INFORMATION = _FILE_LINK_RENAME_INFORMATION;
+ PFILE_LINK_INFORMATION = ^FILE_LINK_INFORMATION;
+ FILE_RENAME_INFORMATION = _FILE_LINK_RENAME_INFORMATION;
+ PFILE_RENAME_INFORMATION= ^FILE_RENAME_INFORMATION;
+
+ _FILE_NAMES_INFORMATION = record // Information Class 12
+ NextEntryOffset: ULONG;
+ Unknown: ULONG;
+ FileNameLength: ULONG;
+ FileName: array [0..0] of WCHAR;
+ end;
+ FILE_NAMES_INFORMATION = _FILE_NAMES_INFORMATION;
+ PFILE_NAMES_INFORMATION = ^FILE_NAMES_INFORMATION;
+
+ _FILE_MODE_INFORMATION = record // Information Class 16
+ Mode: ULONG;
+ end;
+ FILE_MODE_INFORMATION = _FILE_MODE_INFORMATION;
+ PFILE_MODE_INFORMATION = ^FILE_MODE_INFORMATION;
+
+ _FILE_ALL_INFORMATION = record // Information Class 18
+ BasicInformation: FILE_BASIC_INFORMATION;
+ StandardInformation: FILE_STANDARD_INFORMATION;
+ InternalInformation: FILE_INTERNAL_INFORMATION;
+ EaInformation: FILE_EA_INFORMATION;
+ AccessInformation: FILE_ACCESS_INFORMATION;
+ PositionInformation: FILE_POSITION_INFORMATION;
+ ModeInformation: FILE_MODE_INFORMATION;
+ AlignmentInformation: FILE_ALIGNMENT_INFORMATION;
+ NameInformation: FILE_NAME_INFORMATION;
+ end;
+ FILE_ALL_INFORMATION = _FILE_ALL_INFORMATION;
+ PFILE_ALL_INFORMATION = ^FILE_ALL_INFORMATION;
+
+ _FILE_ALLOCATION_INFORMATION = record // Information Class 19
+ AllocationSize: LARGE_INTEGER;
+ end;
+ FILE_ALLOCATION_INFORMATION = _FILE_ALLOCATION_INFORMATION;
+ PFILE_ALLOCATION_INFORMATION = ^FILE_ALLOCATION_INFORMATION;
+
+ _FILE_STREAM_INFORMATION = record // Information Class 22
+ NextEntryOffset: ULONG;
+ StreamNameLength: ULONG;
+ EndOfStream: LARGE_INTEGER;
+ AllocationSize: LARGE_INTEGER;
+ StreamName: array [0..0] of WCHAR;
+ end;
+ FILE_STREAM_INFORMATION = _FILE_STREAM_INFORMATION;
+ PFILE_STREAM_INFORMATION = ^FILE_STREAM_INFORMATION;
+
+ _FILE_PIPE_INFORMATION = record // Information Class 23
+ ReadModeMessage: ULONG;
+ WaitModeBlocking: ULONG;
+ end;
+ FILE_PIPE_INFORMATION = _FILE_PIPE_INFORMATION;
+ PFILE_PIPE_INFORMATION = ^FILE_PIPE_INFORMATION;
+
+ _FILE_PIPE_LOCAL_INFORMATION = record // Information Class 24
+ MessageType: ULONG;
+ Unknown1: ULONG;
+ MaxInstances: ULONG;
+ CurInstances: ULONG;
+ InBufferSize: ULONG;
+ Unknown2: ULONG;
+ OutBufferSize: ULONG;
+ Unknown3: array [0..1] of ULONG;
+ ServerEnd: ULONG;
+ end;
+ FILE_PIPE_LOCAL_INFORMATION = _FILE_PIPE_LOCAL_INFORMATION;
+ PFILE_PIPE_LOCAL_INFORMATION = ^FILE_PIPE_LOCAL_INFORMATION;
+
+ _FILE_PIPE_REMOTE_INFORMATION = record // Information Class 25
+ CollectDataTimeout: LARGE_INTEGER;
+ MaxCollectionCount: ULONG;
+ end;
+ FILE_PIPE_REMOTE_INFORMATION = _FILE_PIPE_REMOTE_INFORMATION;
+ PFILE_PIPE_REMOTE_INFORMATION = ^FILE_PIPE_REMOTE_INFORMATION;
+
+ _FILE_MAILSLOT_QUERY_INFORMATION = record // Information Class 26
+ MaxMessageSize: ULONG;
+ Unknown: ULONG;
+ NextSize: ULONG;
+ MessageCount: ULONG;
+ ReadTimeout: LARGE_INTEGER;
+ end;
+ FILE_MAILSLOT_QUERY_INFORMATION = _FILE_MAILSLOT_QUERY_INFORMATION;
+ PFILE_MAILSLOT_QUERY_INFORMATION = ^FILE_MAILSLOT_QUERY_INFORMATION;
+
+ _FILE_MAILSLOT_SET_INFORMATION = record // Information Class 27
+ ReadTimeout: LARGE_INTEGER;
+ end;
+ FILE_MAILSLOT_SET_INFORMATION = _FILE_MAILSLOT_SET_INFORMATION;
+ PFILE_MAILSLOT_SET_INFORMATION = ^FILE_MAILSLOT_SET_INFORMATION;
+
+ _FILE_COMPRESSION_INFORMATION = record // Information Class 28
+ CompressedSize: LARGE_INTEGER;
+ CompressionFormat: USHORT;
+ CompressionUnitShift: UCHAR;
+ Unknown: UCHAR;
+ ClusterSizeShift: UCHAR;
+ end;
+ FILE_COMPRESSION_INFORMATION = _FILE_COMPRESSION_INFORMATION;
+ PFILE_COMPRESSION_INFORMATION = ^FILE_COMPRESSION_INFORMATION;
+
+ _FILE_COMPLETION_INFORMATION = record // Information Class 30
+ IoCompletionHandle: HANDLE;
+ CompletionKey: ULONG;
+ end;
+ FILE_COMPLETION_INFORMATION = _FILE_COMPLETION_INFORMATION;
+ PFILE_COMPLETION_INFORMATION = ^FILE_COMPLETION_INFORMATION;
+
+function NtCreateKey(KeyHandle: PHANDLE; DesiredAccess: ACCESS_MASK; ObjectAttributes: POBJECT_ATTRIBUTES; TitleIndex: ULONG; Class_: PUNICODE_STRING; CreateOptions: ULONG; Disposition: PULONG): NTSTATUS; stdcall; external ntdll name 'NtCreateKey';
+function NtOpenKey(KeyHandle: PHANDLE; DesiredAccess: ACCESS_MASK; ObjectAttributes: POBJECT_ATTRIBUTES): NTSTATUS; stdcall; external ntdll name 'NtOpenKey';
+function NtDeleteKey(KeyHandle: HANDLE): NTSTATUS; stdcall; external ntdll name 'NtDeleteKey';
+function NtFlushKey(KeyHandle: HANDLE): NTSTATUS; stdcall; external ntdll name 'NtFlushKey';
+function NtSaveKey(KeyHandle: HANDLE; FileHandle: HANDLE): NTSTATUS; stdcall; external ntdll name 'NtSaveKey';
+function NtSaveMergedKeys(KeyHandle1: HANDLE; KeyHandle2: HANDLE; FileHandle: HANDLE): NTSTATUS; stdcall; external ntdll name 'NtSaveMergedKeys';
+function NtRestoreKey(KeyHandle: HANDLE; FileHandle: HANDLE; Flags: ULONG): NTSTATUS; stdcall; external ntdll name 'NtRestoreKey';
+function NtLoadKey(KeyObjectAttributes: POBJECT_ATTRIBUTES; FileObjectAttributes: POBJECT_ATTRIBUTES): NTSTATUS; stdcall; external ntdll name 'NtLoadKey';
+function NtLoadKey2(KeyObjectAttributes: POBJECT_ATTRIBUTES; FileObjectAttributes: POBJECT_ATTRIBUTES; Flags: ULONG): NTSTATUS; stdcall; external ntdll name 'NtLoadKey2';
+function NtUnloadKey(KeyObjectAttributes: POBJECT_ATTRIBUTES): NTSTATUS; stdcall; external ntdll name 'NtUnloadKey';
+function NtReplaceKey(NewFileObjectAttributes: POBJECT_ATTRIBUTES; KeyHandle: HANDLE; OldFileObjectAttributes: POBJECT_ATTRIBUTES): NTSTATUS; stdcall; external ntdll name 'NtReplaceKey';
+function NtSetInformationKey(KeyHandle: HANDLE; KeyInformationClass: KEY_SET_INFORMATION_CLASS; KeyInformation: PVOID; KeyInformationLength: ULONG): NTSTATUS; stdcall; external ntdll name 'NtSetInformationKey';
+function NtQueryKey(KeyHandle: HANDLE; KeyInformationClass: KEY_INFORMATION_CLASS; KeyInformation: PVOID; KeyInformationLength: ULONG; ResultLength: PULONG): NTSTATUS; stdcall; external ntdll name 'NtQueryKey';
+function NtEnumerateKey(KeyHandle: HANDLE; Index: ULONG; KeyInformationClass: KEY_INFORMATION_CLASS; KeyInformation: PVOID; KeyInformationLength: ULONG; ResultLength: PULONG): NTSTATUS; stdcall; external ntdll name 'NtEnumerateKey';
+function NtNotifyChangeKey(KeyHandle: HANDLE; EventHandle: HANDLE; ApcRoutine: PIO_APC_ROUTINE; ApcContext: PVOID; IoStatusBlock: PIO_STATUS_BLOCK; NotifyFilter: ULONG; WatchSubtree: ByteBool; Buffer: PVOID; BufferLength: ULONG; Asynchronous: ByteBool): NTSTATUS; stdcall; external ntdll name 'NtNotifyChangeKey';
+function NtNotifyChangeMultipleKeys(KeyHandle: HANDLE; Flags: ULONG; KeyObjectAttributes: POBJECT_ATTRIBUTES; EventHandle: HANDLE; ApcRoutine: PIO_APC_ROUTINE; ApcContext: PVOID; IoStatusBlock: PIO_STATUS_BLOCK; NotifyFilter: ULONG; WatchSubtree: ByteBool; Buffer: PVOID; BufferLength: ULONG; Asynchronous: ByteBool): NTSTATUS; stdcall; external ntdll name 'NtNotifyChangeMultipleKeys';
+function NtDeleteValueKey(KeyHandle: HANDLE; ValueName: PUNICODE_STRING): NTSTATUS; stdcall; external ntdll name 'NtDeleteValueKey';
+function NtSetValueKey(KeyHandle: HANDLE; ValueName: PUNICODE_STRING; TitleIndex: ULONG; Type_: ULONG; Data: PVOID; DataSize: ULONG): NTSTATUS; stdcall; external ntdll name 'NtSetValueKey';
+function NtQueryValueKey(KeyHandle: HANDLE; ValueName: PUNICODE_STRING; KeyValueInformationClass: KEY_VALUE_INFORMATION_CLASS; KeyValueInformation: PVOID; KeyValueInformationLength: ULONG; ResultLength: PULONG): NTSTATUS; stdcall; external ntdll name 'NtQueryValueKey';
+function NtEnumerateValueKey(KeyHandle: HANDLE; Index: ULONG; KeyValueInformationClass: KEY_VALUE_INFORMATION_CLASS; KeyValueInformation: PVOID; KeyValueInformationLength: ULONG; ResultLength: PULONG): NTSTATUS; stdcall; external ntdll name 'NtEnumerateValueKey';
+function NtQueryMultipleValueKey(KeyHandle: HANDLE; ValueList: PKEY_VALUE_ENTRY; NumberOfValues: ULONG; Buffer: PVOID; Length: PULONG; ReturnLength: PULONG): NTSTATUS; stdcall; external ntdll name 'NtQueryMultipleValueKey';
+function NtPrivilegeCheck(TokenHandle: HANDLE; RequiredPrivileges: PPRIVILEGE_SET; Result: PBOOLEAN): NTSTATUS; stdcall; external ntdll name 'NtPrivilegeCheck';
+function NtPrivilegeObjectAuditAlarm(SubsystemName: PUNICODE_STRING; HandleId: PVOID; TokenHandle: HANDLE; DesiredAccess: ACCESS_MASK; Privileges: PPRIVILEGE_SET; AccessGranted: ByteBool): NTSTATUS; stdcall; external ntdll name 'NtPrivilegeObjectAuditAlarm';
+function NtPrivilegedServiceAuditAlarm(SubsystemName: PUNICODE_STRING; ServiceName: PUNICODE_STRING; TokenHandle: HANDLE; Privileges: PPRIVILEGE_SET; AccessGranted: ByteBool): NTSTATUS; stdcall; external ntdll name 'NtPrivilegedServiceAuditAlarm';
+function NtAccessCheck(SecurityDescriptor: PSECURITY_DESCRIPTOR; TokenHandle: HANDLE; DesiredAccess: ACCESS_MASK; GenericMapping: PGENERIC_MAPPING; PrivilegeSet: PPRIVILEGE_SET; PrivilegeSetLength: PULONG; GrantedAccess: PACCESS_MASK; AccessStatus: PBOOLEAN): NTSTATUS; stdcall; external ntdll name 'NtAccessCheck';
+function NtAccessCheckAndAuditAlarm(SubsystemName: PUNICODE_STRING; HandleId: PVOID; ObjectTypeName: PUNICODE_STRING; ObjectName: PUNICODE_STRING; SecurityDescriptor: PSECURITY_DESCRIPTOR; DesiredAccess: ACCESS_MASK; GenericMapping: PGENERIC_MAPPING; ObjectCreation: ByteBool; GrantedAccess: PACCESS_MASK; AccessStatus: PBOOLEAN; GenerateOnClose: PBOOLEAN): NTSTATUS; stdcall; external ntdll name 'NtAccessCheckAndAuditAlarm';
+function NtAccessCheckByType(SecurityDescriptor: PSECURITY_DESCRIPTOR; PrincipalSelfSid: PSID; TokenHandle: HANDLE; DesiredAccess: ULONG; ObjectTypeList: POBJECT_TYPE_LIST; ObjectTypeListLength: ULONG; GenericMapping: PGENERIC_MAPPING; PrivilegeSet: PPRIVILEGE_SET; PrivilegeSetLength: PULONG; GrantedAccess: PACCESS_MASK; AccessStatus: PULONG): NTSTATUS; stdcall; external ntdll name 'NtAccessCheckByType';
+function NtAccessCheckByTypeAndAuditAlarm(SubsystemName: PUNICODE_STRING; HandleId: PVOID; ObjectTypeName: PUNICODE_STRING; ObjectName: PUNICODE_STRING; SecurityDescriptor: PSECURITY_DESCRIPTOR; PrincipalSelfSid: PSID; DesiredAccess: ACCESS_MASK; AuditType: AUDIT_EVENT_TYPE; Flags: ULONG; ObjectTypeList: POBJECT_TYPE_LIST; ObjectTypeListLength: ULONG; GenericMapping: PGENERIC_MAPPING; ObjectCreation: ByteBool; GrantedAccess: PACCESS_MASK; AccessStatus: PULONG; GenerateOnClose: PBOOLEAN): NTSTATUS; stdcall; external ntdll name 'NtAccessCheckByTypeAndAuditAlarm';
+function NtAccessCheckByTypeResultList(SecurityDescriptor: PSECURITY_DESCRIPTOR; PrincipalSelfSid: PSID; TokenHandle: HANDLE; DesiredAccess: ACCESS_MASK; ObjectTypeList: POBJECT_TYPE_LIST; ObjectTypeListLength: ULONG; GenericMapping: PGENERIC_MAPPING; PrivilegeSet: PPRIVILEGE_SET; PrivilegeSetLength: PULONG; GrantedAccessList: PACCESS_MASK; AccessStatusList: PULONG): NTSTATUS; stdcall; external ntdll name 'NtAccessCheckByTypeResultList';
+function NtAccessCheckByTypeResultListAndAuditAlarm(SubsystemName: PUNICODE_STRING; HandleId: PVOID; ObjectTypeName: PUNICODE_STRING; ObjectName: PUNICODE_STRING; SecurityDescriptor: PSECURITY_DESCRIPTOR; PrincipalSelfSid: PSID; DesiredAccess: ACCESS_MASK; AuditType: AUDIT_EVENT_TYPE; Flags: ULONG; ObjectTypeList: POBJECT_TYPE_LIST; ObjectTypeListLength: ULONG; GenericMapping: PGENERIC_MAPPING; ObjectCreation: ByteBool; GrantedAccessList: PACCESS_MASK; AccessStatusList: PULONG; GenerateOnClose: PULONG): NTSTATUS; stdcall; external ntdll name 'NtAccessCheckByTypeResultListAndAuditAlarm';
+function NtAccessCheckByTypeResultListAndAuditAlarmByHandle(SubsystemName: PUNICODE_STRING; HandleId: PVOID; TokenHandle: HANDLE; ObjectTypeName: PUNICODE_STRING; ObjectName: PUNICODE_STRING; SecurityDescriptor: PSECURITY_DESCRIPTOR; PrincipalSelfSid: PSID; DesiredAccess: ACCESS_MASK; AuditType: AUDIT_EVENT_TYPE; Flags: ULONG; ObjectTypeList: POBJECT_TYPE_LIST; ObjectTypeListLength: ULONG; GenericMapping: PGENERIC_MAPPING; ObjectCreation: ByteBool; GrantedAccessList: PACCESS_MASK; AccessStatusList: PULONG; GenerateOnClose: PULONG): NTSTATUS; stdcall; external ntdll name 'NtAccessCheckByTypeResultListAndAuditAlarmByHandle';
+function NtOpenObjectAuditAlarm(SubsystemName: PUNICODE_STRING; HandleId: PPVOID; ObjectTypeName: PUNICODE_STRING; ObjectName: PUNICODE_STRING; SecurityDescriptor: PSECURITY_DESCRIPTOR; TokenHandle: HANDLE; DesiredAccess: ACCESS_MASK; GrantedAccess: ACCESS_MASK; Privileges: PPRIVILEGE_SET; ObjectCreation: ByteBool; AccessGranted: ByteBool; GenerateOnClose: PBOOLEAN): NTSTATUS; stdcall; external ntdll name 'NtOpenObjectAuditAlarm';
+function NtCloseObjectAuditAlarm(SubsystemName: PUNICODE_STRING; HandleId: PVOID; GenerateOnClose: ByteBool): NTSTATUS; stdcall; external ntdll name 'NtCloseObjectAuditAlarm';
+function NtDeleteObjectAuditAlarm(SubsystemName: PUNICODE_STRING; HandleId: PVOID; GenerateOnClose: ByteBool): NTSTATUS; stdcall; external ntdll name 'NtDeleteObjectAuditAlarm';
+function NtRequestWakeupLatency(Latency: LATENCY_TIME): NTSTATUS; stdcall; external ntdll name 'NtRequestWakeupLatency';
+function NtRequestDeviceWakeup(DeviceHandle: HANDLE): NTSTATUS; stdcall; external ntdll name 'NtRequestDeviceWakeup';
+function NtCancelDeviceWakeupRequest(DeviceHandle: HANDLE): NTSTATUS; stdcall; external ntdll name 'NtCancelDeviceWakeupRequest';
+function NtIsSystemResumeAutomatic: ByteBool; stdcall; external ntdll name 'NtIsSystemResumeAutomatic';
+
+type
+ PEXECUTION_STATE = ^EXECUTION_STATE;
+
+function NtSetThreadExecutionState(ExecutionState: EXECUTION_STATE; PreviousExecutionState: PEXECUTION_STATE): NTSTATUS; stdcall; external ntdll name 'NtSetThreadExecutionState';
+function NtGetDevicePowerState(DeviceHandle: HANDLE; DevicePowerState: PDEVICE_POWER_STATE): NTSTATUS; stdcall; external ntdll name 'NtGetDevicePowerState';
+function NtSetSystemPowerState(SystemAction: POWER_ACTION; MinSystemState: SYSTEM_POWER_STATE; Flags: ULONG): NTSTATUS; stdcall; external ntdll name 'NtSetSystemPowerState';
+function NtInitiatePowerAction(SystemAction: POWER_ACTION; MinSystemState: SYSTEM_POWER_STATE; Flags: ULONG; Asynchronous: ByteBool): NTSTATUS; stdcall; external ntdll name 'NtInitiatePowerAction';
+function NtPowerInformation(PowerInformationLevel: POWER_INFORMATION_LEVEL; InputBuffer: PVOID; InputBufferLength: ULONG; OutputBuffer: PVOID; OutputBufferLength: ULONG): NTSTATUS; stdcall; external ntdll name 'NtPowerInformation';
+function NtGetPlugPlayEvent(Reserved1: ULONG; Reserved2: ULONG; Buffer: PVOID; BufferLength: ULONG): NTSTATUS; stdcall; external ntdll name 'NtGetPlugPlayEvent';
+function NtRaiseException(ExceptionRecord: PEXCEPTION_RECORD; Context: PCONTEXT; SearchFrames: ByteBool): NTSTATUS; stdcall; external ntdll name 'NtRaiseException';
+function NtContinue(Context: PCONTEXT; TestAlert: ByteBool): NTSTATUS; stdcall; external ntdll name 'NtContinue';
+
+// TODO NOT EXPORTED FROM NTDLL
+//function ZwW32Call(RoutineIndex: ULONG; Argument: PVOID; ArgumentLength: ULONG; Result: PPVOID; ResultLength: PULONG): NTSTATUS; stdcall; external ntdll name 'ZwW32Call';
+
+function NtCallbackReturn(Result: PVOID; ResultLength: ULONG; Status: NTSTATUS): NTSTATUS; stdcall; external ntdll name 'NtCallbackReturn';
+
+// TODO NOT EXPORTED FROM NTDLL
+//function ZwSetLowWaitHighThread: NTSTATUS; stdcall; external ntdll name 'ZwSetLowWaitHighThread';
+//function ZwSetHighWaitLowThread: NTSTATUS; stdcall; external ntdll name 'ZwSetHighWaitLowThread';
+
+function NtLoadDriver(DriverServiceName: PUNICODE_STRING): NTSTATUS; stdcall; external ntdll name 'NtLoadDriver';
+function NtUnloadDriver(DriverServiceName: PUNICODE_STRING): NTSTATUS; stdcall; external ntdll name 'NtUnloadDriver';
+function NtFlushInstructionCache(ProcessHandle: HANDLE; BaseAddress: PVOID; FlushSize: ULONG): NTSTATUS; stdcall; external ntdll name 'NtFlushInstructionCache';
+function NtFlushWriteBuffer: NTSTATUS; stdcall; external ntdll name 'NtFlushWriteBuffer';
+function NtQueryDefaultLocale(ThreadOrSystem: ByteBool; Locale: PLCID): NTSTATUS; stdcall; external ntdll name 'NtQueryDefaultLocale';
+function NtSetDefaultLocale(ThreadOrSystem: ByteBool; Locale: LCID): NTSTATUS; stdcall; external ntdll name 'NtSetDefaultLocale';
+
+type
+ PLANGID = ^LANGID;
+
+function NtQueryDefaultUILanguage(LanguageId: PLANGID): NTSTATUS; stdcall; external ntdll name 'NtQueryDefaultUILanguage';
+function NtSetDefaultUILanguage(LanguageId: LANGID): NTSTATUS; stdcall; external ntdll name 'NtSetDefaultUILanguage';
+function NtQueryInstallUILanguage(LanguageId: PLANGID): NTSTATUS; stdcall; external ntdll name 'NtQueryInstallUILanguage';
+function NtAllocateLocallyUniqueId(Luid: PLUID): NTSTATUS; stdcall; external ntdll name 'NtAllocateLocallyUniqueId';
+function NtAllocateUuids(UuidLastTimeAllocated: PLARGE_INTEGER; UuidDeltaTime: PULONG; UuidSequenceNumber: PULONG; UuidSeed: PUCHAR): NTSTATUS; stdcall; external ntdll name 'NtAllocateUuids';
+function NtSetUuidSeed(UuidSeed: PUCHAR): NTSTATUS; stdcall; external ntdll name 'NtSetUuidSeed';
+function NtRaiseHardError(Status: NTSTATUS; NumberOfArguments: ULONG; StringArgumentsMask: ULONG; Arguments: PULONG; MessageBoxType: ULONG; MessageBoxResult: PULONG): NTSTATUS; stdcall; external ntdll name 'NtRaiseHardError';
+function NtSetDefaultHardErrorPort(PortHandle: HANDLE): NTSTATUS; stdcall; external ntdll name 'NtSetDefaultHardErrorPort';
+function NtDisplayString(Str: PUNICODE_STRING): NTSTATUS; stdcall; external ntdll name 'NtDisplayString';
+function NtCreatePagingFile(FileName: PUNICODE_STRING; InitialSize: PULARGE_INTEGER; MaximumSize: PULARGE_INTEGER; Reserved: ULONG): NTSTATUS; stdcall; external ntdll name 'NtCreatePagingFile';
+function NtAddAtom(Str: PWSTR; StringLength: ULONG; Atom: PUSHORT): NTSTATUS; stdcall; external ntdll name 'NtAddAtom';
+function NtFindAtom(Str: PWSTR; StringLength: ULONG; Atom: PUSHORT): NTSTATUS; stdcall; external ntdll name 'NtFindAtom';
+function NtDeleteAtom(Atom: USHORT): NTSTATUS; stdcall; external ntdll name 'NtDeleteAtom';
+
+type
+ _ATOM_INFORMATION_CLASS = (AtomBasicInformation, AtomListInformation);
+ ATOM_INFORMATION_CLASS = _ATOM_INFORMATION_CLASS;
+
+function NtQueryInformationAtom(Atom: USHORT; AtomInformationClass: ATOM_INFORMATION_CLASS; AtomInformation: PVOID; AtomInformationLength: ULONG; ReturnLength: PULONG): NTSTATUS; stdcall; external ntdll name 'NtQueryInformationAtom';
+
+type
+ _ATOM_BASIC_INFORMATION = record
+ ReferenceCount: USHORT;
+ Pinned: USHORT;
+ NameLength: USHORT;
+ Name: array [0..0] of WCHAR;
+ end;
+ ATOM_BASIC_INFORMATION = _ATOM_BASIC_INFORMATION;
+ PATOM_BASIC_INFORMATION = ^ATOM_BASIC_INFORMATION;
+
+ _ATOM_LIST_INFORMATION = record
+ NumberOfAtoms: ULONG;
+ Atoms: array [0..0] of ATOM;
+ end;
+ ATOM_LIST_INFORMATION = _ATOM_LIST_INFORMATION;
+ PATOM_LIST_INFORMATION = ^ATOM_LIST_INFORMATION;
+
+function NtSetLdtEntries(Selector1: ULONG; LdtEntry1: LDT_ENTRY; Selector2: ULONG; LdtEntry2: LDT_ENTRY): NTSTATUS; stdcall; external ntdll name 'NtSetLdtEntries';
+function NtVdmControl(ControlCode: ULONG; ControlData: PVOID): NTSTATUS; stdcall; external ntdll name 'NtVdmControl';
+
+//==============================================================================
+// NTFS on disk structure structures
+//==============================================================================
+
+type
+ _NTFS_RECORD_HEADER = record
+ Type_: ULONG;
+ UsaOffset: USHORT;
+ UsaCount: USHORT;
+ Usn: USN;
+ end;
+ NTFS_RECORD_HEADER = _NTFS_RECORD_HEADER;
+ PNTFS_RECORD_HEADER = ^NTFS_RECORD_HEADER;
+
+ _FILE_RECORD_HEADER = record
+ Ntfs: NTFS_RECORD_HEADER;
+ SequenceNumber: USHORT;
+ LinkCount: USHORT;
+ AttributesOffset: USHORT;
+ Flags: USHORT; // 0x0001 = InUse, 0x0002 = Directory
+ BytesInUse: ULONG;
+ BytesAllocated: ULONG;
+ BaseFileRecord: ULONGLONG;
+ NextAttributeNumber: USHORT;
+ end;
+ FILE_RECORD_HEADER = _FILE_RECORD_HEADER;
+ PFILE_RECORD_HEADER = ^FILE_RECORD_HEADER;
+
+const
+ AttributeStandardInformation = $10;
+ AttributeAttributeList = $20;
+ AttributeFileName = $30;
+ AttributeObjectId = $40;
+ AttributeSecurityDescriptor = $50;
+ AttributeVolumeName = $60;
+ AttributeVolumeInformation = $70;
+ AttributeData = $80;
+ AttributeIndexRoot = $90;
+ AttributeIndexAllocation = $A0;
+ AttributeBitmap = $B0;
+ AttributeReparsePoint = $C0;
+ AttributeEAInformation = $D0;
+ AttributeEA = $E0;
+ AttributePropertySet = $F0;
+ AttributeLoggedUtilityStream = $100;
+
+type
+ ATTRIBUTE_TYPE = AttributeStandardInformation..AttributeLoggedUtilityStream;
+ PATTRIBUTE_TYPE = ^ATTRIBUTE_TYPE;
+
+ _ATTRIBUTE = record
+ AttributeType: ATTRIBUTE_TYPE;
+ Length: ULONG;
+ Nonresident: ByteBool;
+ NameLength: UCHAR;
+ NameOffset: USHORT;
+ Flags: USHORT; // 0x0001 = Compressed
+ AttributeNumber: USHORT;
+ end;
+ ATTRIBUTE = _ATTRIBUTE;
+ PATTRIBUTE = ^ATTRIBUTE;
+
+ _RESIDENT_ATTRIBUTE = record
+ Attribute: ATTRIBUTE;
+ ValueLength: ULONG;
+ ValueOffset: USHORT;
+ Flags: USHORT; // 0x0001 = Indexed
+ end;
+ RESIDENT_ATTRIBUTE = _RESIDENT_ATTRIBUTE;
+ PRESIDENT_ATTRIBUTE = ^RESIDENT_ATTRIBUTE;
+
+ _NONRESIDENT_ATTRIBUTE = record
+ Attribute: ATTRIBUTE;
+ LowVcn: ULONGLONG;
+ HighVcn: ULONGLONG;
+ RunArrayOffset: USHORT;
+ CompressionUnit: UCHAR;
+ AlignmentOrReserved: array [0..4] of UCHAR;
+ AllocatedSize: ULONGLONG;
+ DataSize: ULONGLONG;
+ InitializedSize: ULONGLONG;
+ CompressedSize: ULONGLONG; // Only when compressed
+ end;
+ NONRESIDENT_ATTRIBUTE = _NONRESIDENT_ATTRIBUTE;
+ PNONRESIDENT_ATTRIBUTE = ^NONRESIDENT_ATTRIBUTE;
+
+ _STANDARD_INFORMATION = record
+ CreationTime: ULONGLONG;
+ ChangeTime: ULONGLONG;
+ LastWriteTime: ULONGLONG;
+ LastAccessTime: ULONGLONG;
+ FileAttributes: ULONG;
+ AlignmentOrReservedOrUnknown: array [0..2] of ULONG;
+ QuotaId: ULONG; // NTFS 3.0 only
+ SecurityId: ULONG; // NTFS 3.0 only
+ QuotaCharge: ULONGLONG; // NTFS 3.0 only
+ Usn: USN; // NTFS 3.0 only
+ end;
+ STANDARD_INFORMATION = _STANDARD_INFORMATION;
+ PSTANDARD_INFORMATION = ^STANDARD_INFORMATION;
+
+ _ATTRIBUTE_LIST = record
+ AttributeType: ATTRIBUTE_TYPE;
+ Length: USHORT;
+ NameLength: UCHAR;
+ NameOffset: UCHAR;
+ LowVcn: ULONGLONG;
+ FileReferenceNumber: ULONGLONG;
+ AttributeNumber: USHORT;
+ AlignmentOrReserved: array [0..2] of USHORT;
+ end;
+ ATTRIBUTE_LIST = _ATTRIBUTE_LIST;
+ PATTRIBUTE_LIST = ^ATTRIBUTE_LIST;
+
+ _FILENAME_ATTRIBUTE = record
+ DirectoryFileReferenceNumber: ULONGLONG;
+ CreationTime: ULONGLONG; // Saved when filename last changed
+ ChangeTime: ULONGLONG; // ditto
+ LastWriteTime: ULONGLONG; // ditto
+ LastAccessTime: ULONGLONG; // ditto
+ AllocatedSize: ULONGLONG; // ditto
+ DataSize: ULONGLONG; // ditto
+ FileAttributes: ULONG; // ditto
+ AlignmentOrReserved: ULONG;
+ NameLength: UCHAR;
+ NameType: UCHAR; // 0x01 = Long, 0x02 = Short
+ Name: array [0..0] of UCHAR;
+ end;
+ FILENAME_ATTRIBUTE = _FILENAME_ATTRIBUTE;
+ PFILENAME_ATTRIBUTE = ^FILENAME_ATTRIBUTE;
+
+ _OBJECTID_ATTRIBUTE = record
+ ObjectId: GUID;
+ case Integer of
+ 0: (
+ BirthVolumeId: GUID;
+ BirthObjectId: GUID;
+ DomainId: GUID);
+ 1: (
+ ExtendedInfo: array [0..47] of UCHAR);
+ end;
+ OBJECTID_ATTRIBUTE = _OBJECTID_ATTRIBUTE;
+ POBJECTID_ATTRIBUTE = ^OBJECTID_ATTRIBUTE;
+
+ _VOLUME_INFORMATION = record
+ Unknown: array [0..1] of ULONG;
+ MajorVersion: UCHAR;
+ MinorVersion: UCHAR;
+ Flags: USHORT;
+ end;
+ VOLUME_INFORMATION = _VOLUME_INFORMATION;
+ PVOLUME_INFORMATION = ^VOLUME_INFORMATION;
+
+ _DIRECTORY_INDEX = record
+ EntriesOffset: ULONG;
+ IndexBlockLength: ULONG;
+ AllocatedSize: ULONG;
+ Flags: ULONG; // 0x00 = Small directory, 0x01 = Large directory
+ end;
+ DIRECTORY_INDEX = _DIRECTORY_INDEX;
+ PDIRECTORY_INDEX = ^DIRECTORY_INDEX;
+
+ _DIRECTORY_ENTRY = record
+ FileReferenceNumber: ULONGLONG;
+ Length: USHORT;
+ AttributeLength: USHORT;
+ Flags: ULONG; // 0x01 = Has trailing VCN, 0x02 = Last entry
+ // FILENAME_ATTRIBUTE Name;
+ // ULONGLONG Vcn; // VCN in IndexAllocation of earlier entries
+ end;
+ DIRECTORY_ENTRY = _DIRECTORY_ENTRY;
+ PDIRECTORY_ENTRY = ^DIRECTORY_ENTRY;
+
+ _INDEX_ROOT = record
+ Type_: ATTRIBUTE_TYPE;
+ CollationRule: ULONG;
+ BytesPerIndexBlock: ULONG;
+ ClustersPerIndexBlock: ULONG;
+ DirectoryIndex: DIRECTORY_INDEX;
+ end;
+ INDEX_ROOT = _INDEX_ROOT;
+ PINDEX_ROOT = ^INDEX_ROOT;
+
+ _INDEX_BLOCK_HEADER = record
+ Ntfs: NTFS_RECORD_HEADER;
+ IndexBlockVcn: ULONGLONG;
+ DirectoryIndex: DIRECTORY_INDEX;
+ end;
+ INDEX_BLOCK_HEADER = _INDEX_BLOCK_HEADER;
+ PINDEX_BLOCK_HEADER = ^INDEX_BLOCK_HEADER;
+
+ _REPARSE_POINT = record
+ ReparseTag: ULONG;
+ ReparseDataLength: USHORT;
+ Reserved: USHORT;
+ ReparseData: array [0..0] of UCHAR;
+ end;
+ REPARSE_POINT = _REPARSE_POINT;
+ PREPARSE_POINT = ^REPARSE_POINT;
+
+ _EA_INFORMATION = record
+ EaLength: ULONG;
+ EaQueryLength: ULONG;
+ end;
+ EA_INFORMATION = _EA_INFORMATION;
+ PEA_INFORMATION = ^EA_INFORMATION;
+
+ _EA_ATTRIBUTE = record
+ NextEntryOffset: ULONG;
+ Flags: UCHAR;
+ EaNameLength: UCHAR;
+ EaValueLength: USHORT;
+ EaName: array [0..0] of CHAR;
+ // UCHAR EaData[];
+ end;
+ EA_ATTRIBUTE = _EA_ATTRIBUTE;
+ PEA_ATTRIBUTE = ^EA_ATTRIBUTE;
+
+ _ATTRIBUTE_DEFINITION = record
+ AttributeName: array [0..63] of WCHAR;
+ AttributeNumber: ULONG;
+ Unknown: array [0..1] of ULONG;
+ Flags: ULONG;
+ MinimumSize: ULONGLONG;
+ MaximumSize: ULONGLONG;
+ end;
+ ATTRIBUTE_DEFINITION = _ATTRIBUTE_DEFINITION;
+ PATTRIBUTE_DEFINITION = ^ATTRIBUTE_DEFINITION;
+
+ _BOOT_BLOCK = record
+ Jump: array [0..2] of UCHAR;
+ Format: array [0..7] of UCHAR;
+ BytesPerSector: USHORT;
+ SectorsPerCluster: UCHAR;
+ BootSectors: USHORT;
+ Mbz1: UCHAR;
+ Mbz2: USHORT;
+ Reserved1: USHORT;
+ MediaType: UCHAR;
+ Mbz3: USHORT;
+ SectorsPerTrack: USHORT;
+ NumberOfHeads: USHORT;
+ PartitionOffset: ULONG;
+ Reserved2: array [0..1] of ULONG;
+ TotalSectors: ULONGLONG;
+ MftStartLcn: ULONGLONG;
+ Mft2StartLcn: ULONGLONG;
+ ClustersPerFileRecord: ULONG;
+ ClustersPerIndexBlock: ULONG;
+ VolumeSerialNumber: ULONGLONG;
+ Code: array [0..$1AD] of UCHAR;
+ BootSignature: USHORT;
+ end;
+ BOOT_BLOCK = _BOOT_BLOCK;
+ PBOOT_BLOCK = ^BOOT_BLOCK;
+
+//==============================================================================
+// Loader API
+//==============================================================================
+
+function LdrDisableThreadCalloutsForDll(hModule: HANDLE): NTSTATUS; stdcall; external ntdll name 'LdrDisableThreadCalloutsForDll';
+function LdrGetDllHandle(pwPath: PWORD; pReserved: PVOID; pusPath: PUNICODE_STRING; phModule: PHANDLE): NTSTATUS; stdcall; external ntdll name 'LdrGetDllHandle';
+function LdrGetProcedureAddress(hModule: HANDLE; dOrdinal: DWORD; psName: PSTRING; ppProcedure: PPVOID): NTSTATUS; stdcall; external ntdll name 'LdrGetProcedureAddress';
+function LdrLoadDll(pwPath: PWORD; pdFlags: PDWORD; pusPath: PUNICODE_STRING; phModule: PHANDLE): NTSTATUS; stdcall; external ntdll name 'LdrLoadDll';
+function LdrQueryProcessModuleInformation(psmi: PSYSTEM_MODULE_INFORMATION; dSize: DWORD; pdSize: PDWORD): NTSTATUS; stdcall; external ntdll name 'LdrQueryProcessModuleInformation';
+function LdrQueryImageFileExecutionOptions (pusImagePath: PUNICODE_STRING; pwOptionName: PWORD; dRequestedType: DWORD; pData: PVOID; dSize: DWORD; pdSize: PDWORD): NTSTATUS; stdcall; external ntdll name 'LdrQueryImageFileExecutionOptions ';
+function LdrUnloadDll(hModule: HANDLE): NTSTATUS; stdcall; external ntdll name 'LdrUnloadDll';
+
+//LdrAccessResource
+//LdrAlternateResourcesEnabled
+//LdrEnumResources
+//LdrFindEntryForAddress
+//LdrFindResourceDirectory_U
+//LdrFindResource_U
+//LdrFlushAlternateResourceModules
+//LdrInitializeThunk
+//LdrLoadAlternateResourceModule
+//LdrProcessRelocationBlock
+//LdrShutdownProcess
+//LdrShutdownThread
+//LdrUnloadAlternateResourceModule
+//LdrVerifyImageMatchesChecksum
+
+//==============================================================================
+// CSR
+//==============================================================================
+
+//CsrAllocateCaptureBuffer
+//CsrAllocateMessagePointer
+//CsrCaptureMessageBuffer
+//CsrCaptureMessageString
+//CsrCaptureTimeout
+//CsrClientCallServer
+//CsrClientConnectToServer
+//CsrFreeCaptureBuffer
+//CsrIdentifyAlertableThread
+//CsrNewThread
+//CsrProbeForRead
+//CsrProbeForWrite
+//CsrSetPriorityClass
+
+//==============================================================================
+// Debug
+//==============================================================================
+
+//DbgPrompt
+//DbgSsHandleKmApiMsg
+//DbgSsInitialize
+//DbgUiConnectToDbg
+//DbgUiContinue
+//DbgUiWaitStateChange
+//DbgUserBreakPoint
+
+//
+// Define kernel debugger print prototypes and macros.
+//
+// N.B. The following function cannot be directly imported because there are
+// a few places in the source tree where this function is redefined.
+//
+
+//procedure DbgBreakPoint;
+//procedure DbgBreakPointWithStatus(Status: ULONG); stdcall; external ntdll name 'DbgBreakPointWithStatus';
+
+const
+ DBG_STATUS_CONTROL_C = 1;
+ DBG_STATUS_SYSRQ = 2;
+ DBG_STATUS_BUGCHECK_FIRST = 3;
+ DBG_STATUS_BUGCHECK_SECOND = 4;
+ DBG_STATUS_FATAL = 5;
+ DBG_STATUS_DEBUG_CONTROL = 6;
+
+//function DbgPrint(Format: PCH; ...): ULONG; cdecl;
+//function DbgPrintReturnControlC(Format: PCH; ...): ULONG; cdecl;
+
+//==============================================================================
+// Runtime Library
+//==============================================================================
+
+const
+ RTL_RANGE_LIST_ADD_IF_CONFLICT = $00000001;
+ RTL_RANGE_LIST_ADD_SHARED = $00000002;
+
+const
+ RTL_RANGE_LIST_SHARED_OK = $00000001;
+ RTL_RANGE_LIST_NULL_CONFLICT_OK = $00000002;
+
+type
+ PRTL_CONFLICT_RANGE_CALLBACK = function(Context: PVOID; Range: PRTL_RANGE): ByteBool; stdcall;
+
+type
+ _OSVERSIONINFOW = record
+ dwOSVersionInfoSize: ULONG;
+ dwMajorVersion: ULONG;
+ dwMinorVersion: ULONG;
+ dwBuildNumber: ULONG;
+ dwPlatformId: ULONG;
+ szCSDVersion: array [0..127] of WCHAR; // Maintenance string for PSS usage
+ end;
+ OSVERSIONINFOW = _OSVERSIONINFOW;
+ POSVERSIONINFOW = ^OSVERSIONINFOW;
+ LPOSVERSIONINFOW = ^OSVERSIONINFOW;
+ RTL_OSVERSIONINFOW = OSVERSIONINFOW;
+ PRTL_OSVERSIONINFOW = ^OSVERSIONINFOW;
+
+ OSVERSIONINFO = OSVERSIONINFOW;
+ POSVERSIONINFO = POSVERSIONINFOW;
+ LPOSVERSIONINFO = LPOSVERSIONINFOW;
+
+const
+ VER_PLATFORM_WIN32s = 0;
+ VER_PLATFORM_WIN32_WINDOWS = 1;
+ VER_PLATFORM_WIN32_NT = 2;
+
+type
+ _RTL_BITMAP = record
+ SizeOfBitMap: ULONG; // Number of bits in bit map
+ Buffer: PULONG; // Pointer to the bit map itself
+ end;
+ RTL_BITMAP = _RTL_BITMAP;
+ PRTL_BITMAP = ^RTL_BITMAP;
+
+const
+ RTL_REGISTRY_ABSOLUTE = 0; // Path is a full path
+ RTL_REGISTRY_SERVICES = 1; // \Registry\Machine\System\CurrentControlSet\Services
+ RTL_REGISTRY_CONTROL = 2; // \Registry\Machine\System\CurrentControlSet\Control
+ RTL_REGISTRY_WINDOWS_NT = 3; // \Registry\Machine\Software\Microsoft\Windows NT\CurrentVersion
+ RTL_REGISTRY_DEVICEMAP = 4; // \Registry\Machine\Hardware\DeviceMap
+ RTL_REGISTRY_USER = 5; // \Registry\User\CurrentUser
+ RTL_REGISTRY_MAXIMUM = 6;
+ RTL_REGISTRY_HANDLE = $40000000; // Low order bits are registry handle
+ RTL_REGISTRY_OPTIONAL = $80000000; // Indicates the key node is optional
+
+type
+ _TIME_FIELDS = record
+ Year: CSHORT; // range [1601...]
+ Month: CSHORT; // range [1..12]
+ Day: CSHORT; // range [1..31]
+ Hour: CSHORT; // range [0..23]
+ Minute: CSHORT; // range [0..59]
+ Second: CSHORT; // range [0..59]
+ Milliseconds: CSHORT; // range [0..999]
+ Weekday: CSHORT; // range [0..6] == [Sunday..Saturday]
+ end;
+ TIME_FIELDS = _TIME_FIELDS;
+ PTIME_FIELDS = ^TIME_FIELDS;
+
+type
+ _OSVERSIONINFOEXW =record
+ dwOSVersionInfoSize: ULONG;
+ dwMajorVersion: ULONG;
+ dwMinorVersion: ULONG;
+ dwBuildNumber: ULONG;
+ dwPlatformId: ULONG;
+ szCSDVersion: array [0..127] of WCHAR; // Maintenance string for PSS usage
+ wServicePackMajor: USHORT;
+ wServicePackMinor: USHORT;
+ wSuiteMask: USHORT;
+ wProductType: UCHAR;
+ wReserved: UCHAR;
+ end;
+ OSVERSIONINFOEXW = _OSVERSIONINFOEXW;
+ POSVERSIONINFOEXW = ^OSVERSIONINFOEXW;
+ LPOSVERSIONINFOEXW = ^OSVERSIONINFOEXW;
+ RTL_OSVERSIONINFOEXW = OSVERSIONINFOEXW;
+ PRTL_OSVERSIONINFOEXW = ^OSVERSIONINFOEXW;
+
+ OSVERSIONINFOEX = OSVERSIONINFOEXW;
+ POSVERSIONINFOEX = POSVERSIONINFOEXW;
+ LPOSVERSIONINFOEX = LPOSVERSIONINFOEXW;
+
+//
+// RtlVerifyVersionInfo() conditions
+//
+
+const
+ VER_EQUAL = 1;
+ VER_GREATER = 2;
+ VER_GREATER_EQUAL = 3;
+ VER_LESS = 4;
+ VER_LESS_EQUAL = 5;
+ VER_AND = 6;
+ VER_OR = 7;
+
+ VER_CONDITION_MASK = 7;
+ VER_NUM_BITS_PER_CONDITION_MASK = 3;
+
+//
+// RtlVerifyVersionInfo() type mask bits
+//
+
+ VER_MINORVERSION = $0000001;
+ VER_MAJORVERSION = $0000002;
+ VER_BUILDNUMBER = $0000004;
+ VER_PLATFORMID = $0000008;
+ VER_SERVICEPACKMINOR = $0000010;
+ VER_SERVICEPACKMAJOR = $0000020;
+ VER_SUITENAME = $0000040;
+ VER_PRODUCT_TYPE = $0000080;
+
+//
+// RtlVerifyVersionInfo() os product type values
+//
+
+ VER_NT_WORKSTATION = $0000001;
+ VER_NT_DOMAIN_CONTROLLER = $0000002;
+ VER_NT_SERVER = $0000003;
+
+type
+ PRTL_QUERY_REGISTRY_ROUTINE = function(ValueName: PWSTR; ValueType: ULONG;
+ ValueData: PVOID; ValueLength: ULONG; Context, EntryContext: PVOID): NTSTATUS; stdcall;
+
+ _RTL_QUERY_REGISTRY_TABLE = record
+ QueryRoutine: PRTL_QUERY_REGISTRY_ROUTINE;
+ Flags: ULONG;
+ Name: PWSTR;
+ EntryContext: PVOID;
+ DefaultType: ULONG;
+ DefaultData: PVOID;
+ DefaultLength: ULONG;
+ end;
+ RTL_QUERY_REGISTRY_TABLE = _RTL_QUERY_REGISTRY_TABLE;
+ PRTL_QUERY_REGISTRY_TABLE = ^RTL_QUERY_REGISTRY_TABLE;
+
+ REFGUID = ^GUID;
+
+function RtlAddRange(RangeList: PRTL_RANGE_LIST; Start, End_: ULONGLONG; Attributes: UCHAR; Flags: ULONG; UserData, Owner: PVOID): NTSTATUS; stdcall; external ntdll name 'RtlAddRange'; external;
+function RtlAnsiStringToUnicodeString(DestinationString: PUNICODE_STRING; SourceString: PANSI_STRING; AllocateDestinationString: ByteBool): NTSTATUS; stdcall; external ntdll name 'RtlAnsiStringToUnicodeString'; external;
+function RtlAppendUnicodeStringToString(Destination, Source: PUNICODE_STRING): NTSTATUS; stdcall; external ntdll name 'RtlAppendUnicodeStringToString'; external;
+function RtlAppendUnicodeToString(Destination: PUNICODE_STRING; Source: LPCWSTR): NTSTATUS; stdcall; external ntdll name 'RtlAppendUnicodeToString';
+function RtlAreBitsClear(BitMapHeader: PRTL_BITMAP; StartingIndex, Length: ULONG): ByteBool; stdcall; external ntdll name 'RtlAreBitsClear';
+function RtlAreBitsSet(BitMapHeader: PRTL_BITMAP; StartingIndex, Length: ULONG): ByteBool; stdcall; external ntdll name 'RtlAreBitsSet';
+procedure RtlAssert(FailedAssertion, FileName: PVOID; LineNumber: ULONG; Message: PCHAR); stdcall; external ntdll name 'RtlAssert';
+function RtlCharToInteger(Str: PCSZ; Base: ULONG; Value: PULONG): NTSTATUS; stdcall; external ntdll name 'RtlCharToInteger';
+function RtlCheckRegistryKey(RelativeTo: ULONG; Path: PWSTR): NTSTATUS; stdcall; external ntdll name 'RtlCheckRegistryKey';
+procedure RtlClearAllBits(BitMapHeader: PRTL_BITMAP); stdcall; external ntdll name 'RtlClearAllBits';
+procedure RtlClearBits(BitMapHeader: PRTL_BITMAP; StartingIndex, NumberToClear: ULONG); stdcall; external ntdll name 'RtlClearBits';
+function RtlCompareMemory(Source1, Source2: LPVOID; Length: SIZE_T): SIZE_T; stdcall; external ntdll name 'RtlCompareMemory';
+function RtlCompareString(String1, String2: PSTRING; CaseInSensitive: ByteBool): LONG; stdcall; external ntdll name 'RtlCompareString';
+function RtlCompareUnicodeString(String1, String2: PUNICODE_STRING; CaseInSensitive: ByteBool): LONG; stdcall; external ntdll name 'RtlCompareUnicodeString';
+function RtlConvertLongToLargeInteger(SignedInteger: LONG): LARGE_INTEGER; stdcall; external ntdll name 'RtlConvertLongToLargeInteger';
+function RtlConvertUlongToLargeInteger(UnsignedInteger: ULONG): LARGE_INTEGER; stdcall; external ntdll name 'RtlConvertUlongToLargeInteger';
+function RtlCopyRangeList(CopyRangeList: PRTL_RANGE_LIST; RangeList: PRTL_RANGE_LIST): NTSTATUS; stdcall; external ntdll name 'RtlCopyRangeList';
+procedure RtlCopyString(DestinationString, SourceString: PSTRING); stdcall; external ntdll name 'RtlCopyString';
+procedure RtlCopyUnicodeString(DestinationString, SourceString: PUNICODE_STRING); stdcall; external ntdll name 'RtlCopyUnicodeString';
+function RtlCreateRegistryKey(RelativeTo: ULONG; Path: PWSTR): NTSTATUS; stdcall; external ntdll name 'RtlCreateRegistryKey';
+function RtlCreateSecurityDescriptor(SecurityDescriptor: PSECURITY_DESCRIPTOR; Revision: ULONG): NTSTATUS; stdcall; external ntdll name 'RtlCreateSecurityDescriptor';
+function RtlDeleteOwnersRanges(RangeList: PRTL_RANGE_LIST; Owner: PVOID): NTSTATUS; stdcall; external ntdll name 'RtlDeleteOwnersRanges';
+function RtlDeleteRange(RangeList: PRTL_RANGE_LIST; Start, End_: ULONGLONG; Owner: PVOID): NTSTATUS; stdcall; external ntdll name 'RtlDeleteRange';
+function RtlDeleteRegistryValue(RelativeTo: ULONG; Path, ValueName: LPCWSTR): NTSTATUS; stdcall; external ntdll name 'RtlDeleteRegistryValue';
+function RtlEqualString(String1, String2: PSTRING; CaseInSensitive: ByteBool): ByteBool; stdcall; external ntdll name 'RtlEqualString';
+function RtlEqualUnicodeString(String1, String2: PUNICODE_STRING; CaseInSensitive: ByteBool): ByteBool; stdcall; external ntdll name 'RtlEqualUnicodeString';
+function RtlExtendedIntegerMultiply(Multiplicand: LARGE_INTEGER; Multiplier: LONG): LARGE_INTEGER; stdcall; external ntdll name 'RtlExtendedIntegerMultiply';
+function RtlExtendedLargeIntegerDivide(Dividend: LARGE_INTEGER; Divisor: ULONG; Remainder: PULONG): LARGE_INTEGER; stdcall; external ntdll name 'RtlExtendedLargeIntegerDivide';
+function RtlExtendedMagicDivide(Dividend, MagicDivisor: LARGE_INTEGER; ShiftCount: CCHAR): LARGE_INTEGER; stdcall; external ntdll name 'RtlExtendedMagicDivide';
+procedure RtlFillMemory(Destination: LPVOID; Length: SIZE_T; Fill: UCHAR); stdcall; external ntdll name 'RtlFillMemory';
+function RtlFindClearBits(BitMapHeader: PRTL_BITMAP; NumberToFind, HintIndex: ULONG): ULONG; stdcall; external ntdll name 'RtlFindClearBits';
+function RtlFindClearBitsAndSet(BitMapHeader: PRTL_BITMAP; NumberToFind, HintIndex: ULONG): ULONG; stdcall; external ntdll name 'RtlFindClearBitsAndSet';
+function RtlFindLastBackwardRunClear(BitMapHeader: PRTL_BITMAP; FromIndex: ULONG; StartingRunIndex: PULONG): ULONG; stdcall; external ntdll name 'RtlFindLastBackwardRunClear';
+function RtlFindLeastSignificantBit(Set_: ULONGLONG): CCHAR; stdcall; external ntdll name 'RtlFindLeastSignificantBit';
+function RtlFindLongestRunClear(BitMapHeader: PRTL_BITMAP; StartingIndex: PULONG): ULONG; stdcall; external ntdll name 'RtlFindLongestRunClear';
+function RtlFindMostSignificantBit(Set_: ULONGLONG): CCHAR; stdcall; external ntdll name 'RtlFindMostSignificantBit';
+function RtlFindNextForwardRunClear(BitMapHeader: PRTL_BITMAP; FromIndex: ULONG; StartingRunIndex: PULONG): ULONG; stdcall; external ntdll name 'RtlFindNextForwardRunClear';
+function RtlFindRange(RangeList: PRTL_RANGE_LIST; Minimum, Maximum: ULONGLONG; Length, Alignment, Flags: ULONG; AttributeAvailableMask: UCHAR; Context: PVOID; Callback: PRTL_CONFLICT_RANGE_CALLBACK; Start: PULONGLONG): NTSTATUS; stdcall; external ntdll name 'RtlFindRange';
+function RtlFindSetBits(BitMapHeader: PRTL_BITMAP; NumberToFind, HintIndex: ULONG): ULONG; stdcall; external ntdll name 'RtlFindSetBits';
+function RtlFindSetBitsAndClear(BitMapHeader: PRTL_BITMAP; NumberToFind, HintIndex: ULONG): ULONG; stdcall; external ntdll name 'RtlFindSetBitsAndClear';
+procedure RtlFreeAnsiString(AnsiString: PANSI_STRING); stdcall; external ntdll name 'RtlFreeAnsiString';
+procedure RtlFreeRangeList(RangeList: PRTL_RANGE_LIST); stdcall; external ntdll name 'RtlFreeRangeList';
+procedure RtlFreeUnicodeString(UnicodeString: PUNICODE_STRING); stdcall; external ntdll name 'RtlFreeUnicodeString';
+function RtlGUIDFromString(GuidString: PUNICODE_STRING; Guid: LPGUID): NTSTATUS; stdcall; external ntdll name 'RtlGUIDFromString';
+procedure RtlGetCallersAddress(CallersAddress, CallersCaller: PPVOID); stdcall; external ntdll name 'RtlGetCallersAddress';
+function RtlGetFirstRange(RangeList: PRTL_RANGE_LIST; Iterator: PRTL_RANGE_LIST_ITERATOR; var Range: PRTL_RANGE): NTSTATUS; stdcall; external ntdll name 'RtlGetFirstRange';
+function RtlGetNextRange(Iterator: PRTL_RANGE_LIST_ITERATOR; var Range: PRTL_RANGE; MoveForwards: ByteBool): NTSTATUS; stdcall; external ntdll name 'RtlGetNextRange';
+function RtlGetVersion(lpVersionInformation: PRTL_OSVERSIONINFOW): NTSTATUS; stdcall; external ntdll name 'RtlGetVersion';
+procedure RtlInitAnsiString(DestinationString: PANSI_STRING; SourceString: PCSZ); stdcall; external ntdll name 'RtlInitAnsiString';
+procedure RtlInitString(DestinationString: PSTRING; SourceString: PCSZ); stdcall; external ntdll name 'RtlInitString';
+procedure RtlInitUnicodeString(DestinationString: PUNICODE_STRING; SourceString: LPCWSTR); stdcall; external ntdll name 'RtlInitUnicodeString';
+procedure RtlInitializeBitMap(BitMapHeader: PRTL_BITMAP; BitMapBuffer: PULONG; SizeOfBitMap: ULONG); stdcall; external ntdll name 'RtlInitializeBitMap';
+procedure RtlInitializeRangeList(RangeList: PRTL_RANGE_LIST); stdcall; external ntdll name 'RtlInitializeRangeList';
+function RtlInt64ToUnicodeString(Value: ULONGLONG; Base: ULONG; Str: PUNICODE_STRING): NTSTATUS; stdcall; external ntdll name 'RtlInt64ToUnicodeString';
+function RtlIntegerToUnicodeString(Value, Base: ULONG; Str: PUNICODE_STRING): NTSTATUS; stdcall; external ntdll name 'RtlIntegerToUnicodeString';
+function RtlInvertRangeList(InvertedRangeList: PRTL_RANGE_LIST; RangeList: PRTL_RANGE_LIST): NTSTATUS; stdcall; external ntdll name 'RtlInvertRangeList';
+function RtlIsRangeAvailable(RangeList: PRTL_RANGE_LIST; Start, End_: ULONGLONG; Flags: ULONG; AttributeAvailableMask: UCHAR; Context: PVOID; Callback: PRTL_CONFLICT_RANGE_CALLBACK; Available: PBOOLEAN): NTSTATUS; stdcall; external ntdll name 'RtlIsRangeAvailable';
+function RtlLargeIntegerArithmeticShift(LargeInteger: LARGE_INTEGER; ShiftCount: CCHAR): LARGE_INTEGER; stdcall; external ntdll name 'RtlLargeIntegerArithmeticShift';
+function RtlLargeIntegerDivide(Dividend, Divisor: LARGE_INTEGER; Remainder: PLARGE_INTEGER): LARGE_INTEGER; stdcall; external ntdll name 'RtlLargeIntegerDivide';
+function RtlLargeIntegerShiftLeft(LargeInteger: LARGE_INTEGER; ShiftCount: CCHAR): LARGE_INTEGER; stdcall; external ntdll name 'RtlLargeIntegerShiftLeft';
+function RtlLargeIntegerShiftRight(LargeInteger: LARGE_INTEGER; ShiftCount: CCHAR): LARGE_INTEGER; stdcall; external ntdll name 'RtlLargeIntegerShiftRight';
+function RtlLengthSecurityDescriptor(SecurityDescriptor: PSECURITY_DESCRIPTOR): ULONG; stdcall; external ntdll name 'RtlLengthSecurityDescriptor';
+procedure RtlMapGenericMask(AccessMask: PACCESS_MASK; GenericMapping: PGENERIC_MAPPING); stdcall; external ntdll name 'RtlMapGenericMask';
+function RtlMergeRangeLists(MergedRangeList: PRTL_RANGE_LIST; RangeList1, RangeList2: PRTL_RANGE_LIST; Flags: ULONG): NTSTATUS; stdcall; external ntdll name 'RtlMergeRangeLists';
+procedure RtlMoveMemory(Destination, Source: LPVOID; Length: SIZE_T); stdcall; external ntdll name 'RtlMoveMemory';
+function RtlNumberOfClearBits(BitMapHeader: PRTL_BITMAP): ULONG; stdcall; external ntdll name 'RtlNumberOfClearBits';
+function RtlNumberOfSetBits(BitMapHeader: PRTL_BITMAP): ULONG; stdcall; external ntdll name 'RtlNumberOfSetBits';
+function RtlPrefixUnicodeString(String1, String2: PUNICODE_STRING; CaseInSensitive: ByteBool): ByteBool; stdcall; external ntdll name 'RtlPrefixUnicodeString';
+function RtlQueryRegistryValues(RelativeTo: ULONG; Path: LPCWSTR; QueryTable: PRTL_QUERY_REGISTRY_TABLE; Context, Environment: PVOID): NTSTATUS; stdcall; external ntdll name 'RtlQueryRegistryValues';
+procedure RtlSetAllBits(BitMapHeader: PRTL_BITMAP); stdcall; external ntdll name 'RtlSetAllBits';
+procedure RtlSetBits(BitMapHeader: PRTL_BITMAP; StartingIndex, NumberToSet: ULONG); stdcall; external ntdll name 'RtlSetBits';
+function RtlSetDaclSecurityDescriptor(SecurityDescriptor: PSECURITY_DESCRIPTOR; DaclPresent: ByteBool; Dacl: PACL; DaclDefaulted: ByteBool): NTSTATUS; stdcall; external ntdll name 'RtlSetDaclSecurityDescriptor';
+function RtlStringFromGUID(Guid: REFGUID; GuidString: PUNICODE_STRING): NTSTATUS; stdcall; external ntdll name 'RtlStringFromGUID';
+function RtlTimeFieldsToTime(TimeFields: PTIME_FIELDS; Time: PLARGE_INTEGER): ByteBool; stdcall; external ntdll name 'RtlTimeFieldsToTime';
+procedure RtlTimeToTimeFields(Time: PLARGE_INTEGER; TimeFields: PTIME_FIELDS); stdcall; external ntdll name 'RtlTimeToTimeFields';
+function RtlUnicodeStringToAnsiString(DestinationString: PANSI_STRING; SourceString: PUNICODE_STRING; AllocateDestinationString: ByteBool): NTSTATUS; stdcall; external ntdll name 'RtlUnicodeStringToAnsiString';
+function RtlUnicodeStringToInteger(Str: PUNICODE_STRING; Base: ULONG; Value: PULONG): NTSTATUS; stdcall; external ntdll name 'RtlUnicodeStringToInteger';
+function RtlUpcaseUnicodeChar(SourceCharacter: WCHAR): WCHAR; stdcall; external ntdll name 'RtlUpcaseUnicodeChar';
+function RtlUpcaseUnicodeString(DestinationString: PUNICODE_STRING; SourceString: PCUNICODE_STRING; AllocateDestinationString: ByteBool): NTSTATUS; stdcall; external ntdll name 'RtlUpcaseUnicodeString';
+function RtlUpperChar(Character: CHAR): CHAR; stdcall; external ntdll name 'RtlUpperChar';
+procedure RtlUpperString(DestinationString, SourceString: PSTRING); stdcall; external ntdll name 'RtlUpperString';
+function RtlValidRelativeSecurityDescriptor(SecurityDescriptorInput: PSECURITY_DESCRIPTOR; SecurityDescriptorLength: ULONG; RequiredInformation: SECURITY_INFORMATION): ByteBool; stdcall; external ntdll name 'RtlValidRelativeSecurityDescriptor';
+function RtlValidSecurityDescriptor(SecurityDescriptor: PSECURITY_DESCRIPTOR): ByteBool; stdcall; external ntdll name 'RtlValidSecurityDescriptor';
+function RtlVerifyVersionInfo(VersionInfo: PRTL_OSVERSIONINFOEXW; TypeMask: ULONG; ConditionMask: ULONGLONG): NTSTATUS; stdcall; external ntdll name 'RtlVerifyVersionInfo';
+function RtlWriteRegistryValue(RelativeTo: ULONG; Path: LPCWSTR; ValueName: LPCWSTR; ValueType: ULONG; ValueData: PVOID; ValueLength: ULONG): NTSTATUS; stdcall; external ntdll name 'RtlWriteRegistryValue';
+procedure RtlZeroMemory(Destination: LPVOID; Length: SIZE_T); stdcall; external ntdll name 'RtlZeroMemory';
+function RtlxAnsiStringToUnicodeSize(AnsiString: PANSI_STRING): ULONG; stdcall; external ntdll name 'RtlxAnsiStringToUnicodeSize';
+
+implementation
+
+
+{ some 300 other RTL functions exported from ntdll but for which i don't have
+ a prototype yet. also interesting is ntoskrnl.exe
+RtlAbortRXact
+RtlAbsoluteToSelfRelativeSD
+RtlAcquirePebLock
+RtlAcquireResourceExclusive
+RtlAcquireResourceShared
+RtlAddAccessAllowedAce
+RtlAddAccessAllowedAceEx
+RtlAddAccessAllowedObjectAce
+RtlAddAccessDeniedAce
+RtlAddAccessDeniedAceEx
+RtlAddAccessDeniedObjectAce
+RtlAddAce
+RtlAddActionToRXact
+RtlAddAtomToAtomTable
+RtlAddAttributeActionToRXact
+RtlAddAuditAccessAce
+RtlAddAuditAccessAceEx
+RtlAddAuditAccessObjectAce
+RtlAddCompoundAce
+RtlAdjustPrivilege
+RtlAllocateAndInitializeSid
+RtlAllocateHandle
+RtlAllocateHeap
+RtlAnsiCharToUnicodeChar
+RtlAnsiStringToUnicodeSize
+RtlAppendAsciizToString
+RtlAppendStringToString
+RtlApplyRXact
+RtlApplyRXactNoFlush
+RtlAreAllAccessesGranted
+RtlAreAnyAccessesGranted
+RtlCallbackLpcClient
+RtlCancelTimer
+RtlCaptureStackBackTrace
+RtlCheckForOrphanedCriticalSections
+RtlCompactHeap
+RtlCompareMemoryUlong
+RtlCompressBuffer
+RtlConsoleMultiByteToUnicodeN
+RtlConvertExclusiveToShared
+RtlConvertPropertyToVariant
+RtlConvertSharedToExclusive
+RtlConvertSidToUnicodeString
+RtlConvertToAutoInheritSecurityObject
+RtlConvertUiListToApiList
+RtlConvertVariantToProperty
+RtlCopyLuid
+RtlCopyLuidAndAttributesArray
+RtlCopySecurityDescriptor
+RtlCopySid
+RtlCopySidAndAttributesArray
+RtlCreateAcl
+RtlCreateAndSetSD
+RtlCreateAtomTable
+RtlCreateEnvironment
+RtlCreateHeap
+RtlCreateLpcServer
+RtlCreateProcessParameters
+RtlCreateQueryDebugBuffer
+RtlCreateTagHeap
+RtlCreateTimer
+RtlCreateTimerQueue
+RtlCreateUnicodeString
+RtlCreateUnicodeStringFromAsciiz
+RtlCreateUserProcess
+RtlCreateUserSecurityObject
+RtlCreateUserThread
+RtlCustomCPToUnicodeN
+RtlCutoverTimeToSystemTime
+RtlDeNormalizeProcessParams
+RtlDebugPrintTimes
+RtlDecompressBuffer
+RtlDecompressFragment
+RtlDefaultNpAcl
+RtlDelete
+RtlDeleteAce
+RtlDeleteAtomFromAtomTable
+RtlDeleteCriticalSection
+RtlDeleteElementGenericTable
+RtlDeleteNoSplay
+RtlDeleteResource
+RtlDeleteSecurityObject
+RtlDeleteTimer
+RtlDeleteTimerQueue
+RtlDeleteTimerQueueEx
+RtlDeregisterWait
+RtlDeregisterWaitEx
+RtlDestroyAtomTable
+RtlDestroyEnvironment
+RtlDestroyHandleTable
+RtlDestroyHeap
+RtlDestroyProcessParameters
+RtlDestroyQueryDebugBuffer
+RtlDetermineDosPathNameType_U
+RtlDnsHostNameToComputerName
+RtlDoesFileExists_U
+RtlDosPathNameToNtPathName_U
+RtlDosSearchPath_U
+RtlDowncaseUnicodeString
+RtlDumpResource
+RtlEmptyAtomTable
+RtlEnableEarlyCriticalSectionEventCreation
+RtlEnlargedIntegerMultiply
+RtlEnlargedUnsignedDivide
+RtlEnlargedUnsignedMultiply
+RtlEnterCriticalSection
+RtlEnumProcessHeaps
+RtlEnumerateGenericTable
+RtlEnumerateGenericTableWithoutSplaying
+RtlEqualComputerName
+RtlEqualDomainName
+RtlEqualLuid
+RtlEqualPrefixSid
+RtlEqualSid
+RtlEraseUnicodeString
+RtlExpandEnvironmentStrings_U
+RtlExtendHeap
+RtlFillMemoryUlong
+RtlFindMessage
+RtlFirstFreeAce
+RtlFormatCurrentUserKeyPath
+RtlFormatMessage
+RtlFreeHandle
+RtlFreeHeap
+RtlFreeOemString
+RtlFreeSid
+RtlFreeUserThreadStack
+RtlGenerate8dot3Name
+RtlGetAce
+RtlGetCompressionWorkSpaceSize
+RtlGetControlSecurityDescriptor
+RtlGetCurrentDirectory_U
+RtlGetDaclSecurityDescriptor
+RtlGetElementGenericTable
+RtlGetFullPathName_U
+RtlGetGroupSecurityDescriptor
+RtlGetLongestNtPathLength
+RtlGetNtGlobalFlags
+RtlGetNtProductType
+RtlGetOwnerSecurityDescriptor
+RtlGetProcessHeaps
+RtlGetSaclSecurityDescriptor
+RtlGetSecurityDescriptorRMControl
+RtlGetUserInfoHeap
+RtlIdentifierAuthoritySid
+RtlImageDirectoryEntryToData
+RtlImageNtHeader
+RtlImageRvaToSection
+RtlImageRvaToVa
+RtlImpersonateLpcClient
+RtlImpersonateSelf
+RtlInitCodePageTable
+RtlInitNlsTables
+RtlInitializeAtomPackage
+RtlInitializeContext
+RtlInitializeCriticalSection
+RtlInitializeCriticalSectionAndSpinCount
+RtlInitializeGenericTable
+RtlInitializeHandleTable
+RtlInitializeRXact
+RtlInitializeResource
+RtlInitializeSid
+RtlInsertElementGenericTable
+RtlIntegerToChar
+RtlIsDosDeviceName_U
+RtlIsGenericTableEmpty
+RtlIsNameLegalDOS8Dot3
+RtlIsTextUnicode
+RtlIsValidHandle
+RtlIsValidIndexHandle
+RtlLargeIntegerAdd
+RtlLargeIntegerNegate
+RtlLargeIntegerSubtract
+RtlLargeIntegerToChar
+RtlLeaveCriticalSection
+RtlLengthRequiredSid
+RtlLengthSid
+RtlLocalTimeToSystemTime
+RtlLockHeap
+RtlLookupAtomInAtomTable
+RtlLookupElementGenericTable
+RtlMakeSelfRelativeSD
+RtlMultiByteToUnicodeN
+RtlMultiByteToUnicodeSize
+RtlNewInstanceSecurityObject
+RtlNewSecurityGrantedAccess
+RtlNewSecurityObject
+RtlNewSecurityObjectEx
+RtlNormalizeProcessParams
+RtlNtStatusToDosError
+RtlNumberGenericTableElements
+RtlOemStringToUnicodeSize
+RtlOemStringToUnicodeString
+RtlOemToUnicodeN
+RtlOpenCurrentUser
+RtlPcToFileHeader
+RtlPinAtomInAtomTable
+RtlPrefixString
+RtlProtectHeap
+RtlQueryAtomInAtomTable
+RtlQueryEnvironmentVariable_U
+RtlQueryInformationAcl
+RtlQueryProcessBackTraceInformation
+RtlQueryProcessDebugInformation
+RtlQueryProcessHeapInformation
+RtlQueryProcessLockInformation
+RtlQuerySecurityObject
+RtlQueryTagHeap
+RtlQueryTimeZoneInformation
+RtlQueueWorkItem
+RtlRaiseException
+RtlRaiseStatus
+RtlRandom
+RtlReAllocateHeap
+RtlRealPredecessor
+RtlRealSuccessor
+RtlRegisterWait
+RtlReleasePebLock
+RtlReleaseResource
+RtlRemoteCall
+RtlResetRtlTranslations
+RtlRunDecodeUnicodeString
+RtlRunEncodeUnicodeString
+RtlSecondsSince1970ToTime
+RtlSecondsSince1980ToTime
+RtlSelfRelativeToAbsoluteSD
+RtlSelfRelativeToAbsoluteSD2
+RtlSetAttributesSecurityDescriptor
+RtlSetControlSecurityDescriptor
+RtlSetCriticalSectionSpinCount
+RtlSetCurrentDirectory_U
+RtlSetCurrentEnvironment
+RtlSetEnvironmentVariable
+RtlSetGroupSecurityDescriptor
+RtlSetInformationAcl
+RtlSetIoCompletionCallback
+RtlSetOwnerSecurityDescriptor
+RtlSetSaclSecurityDescriptor
+RtlSetSecurityDescriptorRMControl
+RtlSetSecurityObject
+RtlSetSecurityObjectEx
+RtlSetThreadPoolStartFunc
+RtlSetTimeZoneInformation
+RtlSetTimer
+RtlSetUnicodeCallouts
+RtlSetUserFlagsHeap
+RtlSetUserValueHeap
+RtlShutdownLpcServer
+RtlSizeHeap
+RtlSplay
+RtlStartRXact
+RtlSubAuthorityCountSid
+RtlSubAuthoritySid
+RtlSubtreePredecessor
+RtlSubtreeSuccessor
+RtlSystemTimeToLocalTime
+RtlTimeToElapsedTimeFields
+RtlTimeToSecondsSince1970
+RtlTimeToSecondsSince1980
+RtlTryEnterCriticalSection
+//ULONG FASTCALL RtlUlongByteSwap(IN ULONG Source);
+//ULONGLONG FASTCALL RtlUlonglongByteSwap(IN ULONGLONG Source);
+RtlUnicodeStringToAnsiSize
+RtlUnicodeStringToCountedOemString
+RtlUnicodeStringToOemSize
+RtlUnicodeStringToOemString
+RtlUnicodeToCustomCPN
+RtlUnicodeToMultiByteN
+RtlUnicodeToMultiByteSize
+RtlUnicodeToOemN
+RtlUniform
+RtlUnlockHeap
+RtlUnwind
+RtlUpcaseUnicodeStringToAnsiString
+RtlUpcaseUnicodeStringToCountedOemString
+RtlUpcaseUnicodeStringToOemString
+RtlUpcaseUnicodeToCustomCPN
+RtlUpcaseUnicodeToMultiByteN
+RtlUpcaseUnicodeToOemN
+RtlUpdateTimer
+RtlUsageHeap
+//USHORT FASTCALL RtlUshortByteSwap(IN USHORT Source);
+RtlValidAcl
+RtlValidSid
+RtlValidateHeap
+RtlValidateProcessHeaps
+RtlWalkFrameChain
+RtlWalkHeap
+RtlZeroHeap
+RtlpNtCreateKey
+RtlpNtEnumerateSubKey
+RtlpNtMakeTemporaryKey
+RtlpNtOpenKey
+RtlpNtQueryValueKey
+RtlpNtSetValueKey
+RtlpUnWaitCriticalSection
+RtlpWaitForCriticalSection
+RtlxOemStringToUnicodeSize
+RtlxUnicodeStringToAnsiSize
+RtlxUnicodeStringToOemSize
+}
+end.
diff --git a/packages/extra/winunits/jwanb30.pas b/packages/extra/winunits/jwanb30.pas
index d0139e4a9f..4fdc61ce1c 100644
--- a/packages/extra/winunits/jwanb30.pas
+++ b/packages/extra/winunits/jwanb30.pas
@@ -1,515 +1,515 @@
-{******************************************************************************}
-{ }
-{ Portable Netbios 3.0 API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: Nb30.h, released June 2000. The original Pascal }
-{ code is: JwaN30.pas, released December 2000. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwanb30.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaNb30;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "Nb30.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaWinType;
-
-(****************************************************************
- * *
- * Data structure templates *
- * *
- ****************************************************************)
-
-const
- NCBNAMSZ = 16; // absolute length of a net name
- {$EXTERNALSYM NCBNAMSZ}
- MAX_LANA = 254; // lana's in range 0 to MAX_LANA inclusive
- {$EXTERNALSYM MAX_LANA}
-
-//
-// Network Control Block
-//
-
-type
- PNCB = ^NCB;
-
- TNcbPost = procedure(P: PNCB); stdcall;
-
- _NCB = record
- ncb_command: UCHAR; // command code
- ncb_retcode: UCHAR; // return code
- ncb_lsn: UCHAR; // local session number
- ncb_num: UCHAR; // number of our network name
- ncb_buffer: PChar; // address of message buffer
- ncb_length: Word; // size of message buffer
- ncb_callname: array [0..NCBNAMSZ - 1] of Char; // blank-padded name of remote
- ncb_name: array [0..NCBNAMSZ - 1] of Char; // our blank-padded netname
- ncb_rto: UCHAR; // rcv timeout/retry count
- ncb_sto: UCHAR; // send timeout/sys timeout
- ncb_post: TNcbPost; // POST routine address
- ncb_lana_num: UCHAR; // lana (adapter) number
- ncb_cmd_cplt: UCHAR; // 0xff => commmand pending
- {$IFDEF _WIN64}
- ncb_reserve: array [0..17] of Char; // reserved, used by BIOS
- {$ELSE}
- ncb_reserve: array [0..9] of Char; // reserved, used by BIOS
- {$ENDIF _WIN64}
- ncb_event: HANDLE; // HANDLE to Win32 event which
- // will be set to the signalled
- // state when an ASYNCH command
- // completes
- end;
- {$EXTERNALSYM _NCB}
- NCB = _NCB;
- {$EXTERNALSYM NCB}
- TNcb = NCB;
-
-//
-// Structure returned to the NCB command NCBASTAT is ADAPTER_STATUS followed
-// by an array of NAME_BUFFER structures.
-//
-
- _ADAPTER_STATUS = record
- adapter_address: array [0..5] of UCHAR;
- rev_major: UCHAR;
- reserved0: UCHAR;
- adapter_type: UCHAR;
- rev_minor: UCHAR;
- duration: WORD;
- frmr_recv: WORD;
- frmr_xmit: WORD;
- iframe_recv_err: WORD;
- xmit_aborts: WORD;
- xmit_success: DWORD;
- recv_success: DWORD;
- iframe_xmit_err: WORD;
- recv_buff_unavail: WORD;
- t1_timeouts: WORD;
- ti_timeouts: WORD;
- reserved1: DWORD;
- free_ncbs: WORD;
- max_cfg_ncbs: WORD;
- max_ncbs: WORD;
- xmit_buf_unavail: WORD;
- max_dgram_size: WORD;
- pending_sess: WORD;
- max_cfg_sess: WORD;
- max_sess: WORD;
- max_sess_pkt_size: WORD;
- name_count: WORD;
- end;
- {$EXTERNALSYM _ADAPTER_STATUS}
- ADAPTER_STATUS = _ADAPTER_STATUS;
- {$EXTERNALSYM ADAPTER_STATUS}
- PADAPTER_STATUS = ^ADAPTER_STATUS;
- {$EXTERNALSYM PADAPTER_STATUS}
- TAdapterStatus = ADAPTER_STATUS;
- PAdapterStatus = PADAPTER_STATUS;
-
- _NAME_BUFFER = record
- name: array [0..NCBNAMSZ - 1] of Char;
- name_num: UCHAR;
- name_flags: UCHAR;
- end;
- {$EXTERNALSYM _NAME_BUFFER}
- NAME_BUFFER = _NAME_BUFFER;
- {$EXTERNALSYM NAME_BUFFER}
- PNAME_BUFFER = ^NAME_BUFFER;
- {$EXTERNALSYM PNAME_BUFFER}
- TNameBuffer = NAME_BUFFER;
- PNameBuffer = PNAME_BUFFER;
-
-// values for name_flags bits.
-
-const
- NAME_FLAGS_MASK = $87;
- {$EXTERNALSYM NAME_FLAGS_MASK}
-
- GROUP_NAME = $80;
- {$EXTERNALSYM GROUP_NAME}
- UNIQUE_NAME = $00;
- {$EXTERNALSYM UNIQUE_NAME}
-
- REGISTERING = $00;
- {$EXTERNALSYM REGISTERING}
- REGISTERED = $04;
- {$EXTERNALSYM REGISTERED}
- DEREGISTERED = $05;
- {$EXTERNALSYM DEREGISTERED}
- DUPLICATE = $06;
- {$EXTERNALSYM DUPLICATE}
- DUPLICATE_DEREG = $07;
- {$EXTERNALSYM DUPLICATE_DEREG}
-
-//
-// Structure returned to the NCB command NCBSSTAT is SESSION_HEADER followed
-// by an array of SESSION_BUFFER structures. If the NCB_NAME starts with an
-// asterisk then an array of these structures is returned containing the
-// status for all names.
-//
-
-type
- _SESSION_HEADER = record
- sess_name: UCHAR;
- num_sess: UCHAR;
- rcv_dg_outstanding: UCHAR;
- rcv_any_outstanding: UCHAR;
- end;
- {$EXTERNALSYM _SESSION_HEADER}
- SESSION_HEADER = _SESSION_HEADER;
- {$EXTERNALSYM SESSION_HEADER}
- PSESSION_HEADER = ^SESSION_HEADER;
- {$EXTERNALSYM PSESSION_HEADER}
- TSessionHeader = SESSION_HEADER;
- PSessionHeader = PSESSION_HEADER;
-
- _SESSION_BUFFER = record
- lsn: UCHAR;
- state: UCHAR;
- local_name: array [0..NCBNAMSZ - 1] of UCHAR;
- remote_name: array [0..NCBNAMSZ - 1] of UCHAR;
- rcvs_outstanding: UCHAR;
- sends_outstanding: UCHAR;
- end;
- {$EXTERNALSYM _SESSION_BUFFER}
- SESSION_BUFFER = _SESSION_BUFFER;
- {$EXTERNALSYM SESSION_BUFFER}
- PSESSION_BUFFER = ^SESSION_BUFFER;
- {$EXTERNALSYM PSESSION_BUFFER}
- TSessionBuffer = SESSION_BUFFER;
- PSessionBuffer = PSESSION_BUFFER;
-
-// Values for state
-
-const
- LISTEN_OUTSTANDING = $01;
- {$EXTERNALSYM LISTEN_OUTSTANDING}
- CALL_PENDING = $02;
- {$EXTERNALSYM CALL_PENDING}
- SESSION_ESTABLISHED = $03;
- {$EXTERNALSYM SESSION_ESTABLISHED}
- HANGUP_PENDING = $04;
- {$EXTERNALSYM HANGUP_PENDING}
- HANGUP_COMPLETE = $05;
- {$EXTERNALSYM HANGUP_COMPLETE}
- SESSION_ABORTED = $06;
- {$EXTERNALSYM SESSION_ABORTED}
-
-//
-// Structure returned to the NCB command NCBENUM.
-//
-// On a system containing lana's 0, 2 and 3, a structure with
-// length =3, lana[0]=0, lana[1]=2 and lana[2]=3 will be returned.
-//
-
-type
- _LANA_ENUM = record
- length: UCHAR; // Number of valid entries in lana[]
- lana: array [0..MAX_LANA] of UCHAR;
- end;
- {$EXTERNALSYM _LANA_ENUM}
- LANA_ENUM = _LANA_ENUM;
- {$EXTERNALSYM LANA_ENUM}
- PLANA_ENUM = ^LANA_ENUM;
- {$EXTERNALSYM PLANA_ENUM}
- TLanaEnum = LANA_ENUM;
- PLanaEnum = PLANA_ENUM;
-
-//
-// Structure returned to the NCB command NCBFINDNAME is FIND_NAME_HEADER followed
-// by an array of FIND_NAME_BUFFER structures.
-//
-
-type
- _FIND_NAME_HEADER = record
- node_count: WORD;
- reserved: UCHAR;
- unique_group: UCHAR;
- end;
- {$EXTERNALSYM _FIND_NAME_HEADER}
- FIND_NAME_HEADER = _FIND_NAME_HEADER;
- {$EXTERNALSYM FIND_NAME_HEADER}
- PFIND_NAME_HEADER = ^FIND_NAME_HEADER;
- {$EXTERNALSYM PFIND_NAME_HEADER}
- TFindNameHeader = FIND_NAME_HEADER;
- PFindNameHeader = PFIND_NAME_HEADER;
-
- _FIND_NAME_BUFFER = record
- length: UCHAR;
- access_control: UCHAR;
- frame_control: UCHAR;
- destination_addr: array [0..5] of UCHAR;
- source_addr: array [0..5] of UCHAR;
- routing_info: array [0..17] of UCHAR;
- end;
- {$EXTERNALSYM _FIND_NAME_BUFFER}
- FIND_NAME_BUFFER = _FIND_NAME_BUFFER;
- {$EXTERNALSYM FIND_NAME_BUFFER}
- PFIND_NAME_BUFFER = ^FIND_NAME_BUFFER;
- {$EXTERNALSYM PFIND_NAME_BUFFER}
- TFindNameBuffer = FIND_NAME_BUFFER;
- PFindNameBuffer = PFIND_NAME_BUFFER;
-
-//
-// Structure provided with NCBACTION. The purpose of NCBACTION is to provide
-// transport specific extensions to netbios.
-//
-
- _ACTION_HEADER = record
- transport_id: ULONG;
- action_code: USHORT;
- reserved: USHORT;
- end;
- {$EXTERNALSYM _ACTION_HEADER}
- ACTION_HEADER = _ACTION_HEADER;
- {$EXTERNALSYM ACTION_HEADER}
- PACTION_HEADER = ^ACTION_HEADER;
- {$EXTERNALSYM PACTION_HEADER}
- TActionHeader = ACTION_HEADER;
- PActionHeader = PACTION_HEADER;
-
-// Values for transport_id
-
-const
- ALL_TRANSPORTS = 'M'#0#0#0;
- {$EXTERNALSYM ALL_TRANSPORTS}
- MS_NBF = 'MNBF';
- {$EXTERNALSYM MS_NBF}
-
-(****************************************************************
- * *
- * Special values and constants *
- * *
- ****************************************************************)
-
-//
-// NCB Command codes
-//
-
-const
- NCBCALL = $10; // NCB CALL
- {$EXTERNALSYM NCBCALL}
- NCBLISTEN = $11; // NCB LISTEN
- {$EXTERNALSYM NCBLISTEN}
- NCBHANGUP = $12; // NCB HANG UP
- {$EXTERNALSYM NCBHANGUP}
- NCBSEND = $14; // NCB SEND
- {$EXTERNALSYM NCBSEND}
- NCBRECV = $15; // NCB RECEIVE
- {$EXTERNALSYM NCBRECV}
- NCBRECVANY = $16; // NCB RECEIVE ANY
- {$EXTERNALSYM NCBRECVANY}
- NCBCHAINSEND = $17; // NCB CHAIN SEND
- {$EXTERNALSYM NCBCHAINSEND}
- NCBDGSEND = $20; // NCB SEND DATAGRAM
- {$EXTERNALSYM NCBDGSEND}
- NCBDGRECV = $21; // NCB RECEIVE DATAGRAM
- {$EXTERNALSYM NCBDGRECV}
- NCBDGSENDBC = $22; // NCB SEND BROADCAST DATAGRAM
- {$EXTERNALSYM NCBDGSENDBC}
- NCBDGRECVBC = $23; // NCB RECEIVE BROADCAST DATAGRAM
- {$EXTERNALSYM NCBDGRECVBC}
- NCBADDNAME = $30; // NCB ADD NAME
- {$EXTERNALSYM NCBADDNAME}
- NCBDELNAME = $31; // NCB DELETE NAME
- {$EXTERNALSYM NCBDELNAME}
- NCBRESET = $32; // NCB RESET
- {$EXTERNALSYM NCBRESET}
- NCBASTAT = $33; // NCB ADAPTER STATUS
- {$EXTERNALSYM NCBASTAT}
- NCBSSTAT = $34; // NCB SESSION STATUS
- {$EXTERNALSYM NCBSSTAT}
- NCBCANCEL = $35; // NCB CANCEL
- {$EXTERNALSYM NCBCANCEL}
- NCBADDGRNAME = $36; // NCB ADD GROUP NAME
- {$EXTERNALSYM NCBADDGRNAME}
- NCBENUM = $37; // NCB ENUMERATE LANA NUMBERS
- {$EXTERNALSYM NCBENUM}
- NCBUNLINK = $70; // NCB UNLINK
- {$EXTERNALSYM NCBUNLINK}
- NCBSENDNA = $71; // NCB SEND NO ACK
- {$EXTERNALSYM NCBSENDNA}
- NCBCHAINSENDNA = $72; // NCB CHAIN SEND NO ACK
- {$EXTERNALSYM NCBCHAINSENDNA}
- NCBLANSTALERT = $73; // NCB LAN STATUS ALERT
- {$EXTERNALSYM NCBLANSTALERT}
- NCBACTION = $77; // NCB ACTION
- {$EXTERNALSYM NCBACTION}
- NCBFINDNAME = $78; // NCB FIND NAME
- {$EXTERNALSYM NCBFINDNAME}
- NCBTRACE = $79; // NCB TRACE
- {$EXTERNALSYM NCBTRACE}
-
- ASYNCH = $80; // high bit set == asynchronous
- {$EXTERNALSYM ASYNCH}
-
-//
-// NCB Return codes
-//
-
- NRC_GOODRET = $00; // good return also returned when ASYNCH request accepted
- {$EXTERNALSYM NRC_GOODRET}
- NRC_BUFLEN = $01; // illegal buffer length
- {$EXTERNALSYM NRC_BUFLEN}
- NRC_ILLCMD = $03; // illegal command
- {$EXTERNALSYM NRC_ILLCMD}
- NRC_CMDTMO = $05; // command timed out
- {$EXTERNALSYM NRC_CMDTMO}
- NRC_INCOMP = $06; // message incomplete, issue another command
- {$EXTERNALSYM NRC_INCOMP}
- NRC_BADDR = $07; // illegal buffer address
- {$EXTERNALSYM NRC_BADDR}
- NRC_SNUMOUT = $08; // session number out of range
- {$EXTERNALSYM NRC_SNUMOUT}
- NRC_NORES = $09; // no resource available
- {$EXTERNALSYM NRC_NORES}
- NRC_SCLOSED = $0a; // session closed
- {$EXTERNALSYM NRC_SCLOSED}
- NRC_CMDCAN = $0b; // command cancelled
- {$EXTERNALSYM NRC_CMDCAN}
- NRC_DUPNAME = $0d; // duplicate name
- {$EXTERNALSYM NRC_DUPNAME}
- NRC_NAMTFUL = $0e; // name table full
- {$EXTERNALSYM NRC_NAMTFUL}
- NRC_ACTSES = $0f; // no deletions, name has active sessions
- {$EXTERNALSYM NRC_ACTSES}
- NRC_LOCTFUL = $11; // local session table full
- {$EXTERNALSYM NRC_LOCTFUL}
- NRC_REMTFUL = $12; // remote session table full
- {$EXTERNALSYM NRC_REMTFUL}
- NRC_ILLNN = $13; // illegal name number
- {$EXTERNALSYM NRC_ILLNN}
- NRC_NOCALL = $14; // no callname
- {$EXTERNALSYM NRC_NOCALL}
- NRC_NOWILD = $15; // cannot put * in NCB_NAME
- {$EXTERNALSYM NRC_NOWILD}
- NRC_INUSE = $16; // name in use on remote adapter
- {$EXTERNALSYM NRC_INUSE}
- NRC_NAMERR = $17; // name deleted
- {$EXTERNALSYM NRC_NAMERR}
- NRC_SABORT = $18; // session ended abnormally
- {$EXTERNALSYM NRC_SABORT}
- NRC_NAMCONF = $19; // name conflict detected
- {$EXTERNALSYM NRC_NAMCONF}
- NRC_IFBUSY = $21; // interface busy, IRET before retrying
- {$EXTERNALSYM NRC_IFBUSY}
- NRC_TOOMANY = $22; // too many commands outstanding, retry later
- {$EXTERNALSYM NRC_TOOMANY}
- NRC_BRIDGE = $23; // ncb_lana_num field invalid
- {$EXTERNALSYM NRC_BRIDGE}
- NRC_CANOCCR = $24; // command completed while cancel occurring
- {$EXTERNALSYM NRC_CANOCCR}
- NRC_CANCEL = $26; // command not valid to cancel
- {$EXTERNALSYM NRC_CANCEL}
- NRC_DUPENV = $30; // name defined by anther local process
- {$EXTERNALSYM NRC_DUPENV}
- NRC_ENVNOTDEF = $34; // environment undefined. RESET required
- {$EXTERNALSYM NRC_ENVNOTDEF}
- NRC_OSRESNOTAV = $35; // required OS resources exhausted
- {$EXTERNALSYM NRC_OSRESNOTAV}
- NRC_MAXAPPS = $36; // max number of applications exceeded
- {$EXTERNALSYM NRC_MAXAPPS}
- NRC_NOSAPS = $37; // no saps available for netbios
- {$EXTERNALSYM NRC_NOSAPS}
- NRC_NORESOURCES = $38; // requested resources are not available
- {$EXTERNALSYM NRC_NORESOURCES}
- NRC_INVADDRESS = $39; // invalid ncb address or length > segment
- {$EXTERNALSYM NRC_INVADDRESS}
- NRC_INVDDID = $3B; // invalid NCB DDID
- {$EXTERNALSYM NRC_INVDDID}
- NRC_LOCKFAIL = $3C; // lock of user area failed
- {$EXTERNALSYM NRC_LOCKFAIL}
- NRC_OPENERR = $3f; // NETBIOS not loaded
- {$EXTERNALSYM NRC_OPENERR}
- NRC_SYSTEM = $40; // system error
- {$EXTERNALSYM NRC_SYSTEM}
-
- NRC_PENDING = $ff; // asynchronous command is not yet finished
- {$EXTERNALSYM NRC_PENDING}
-
-(****************************************************************
- * *
- * main user entry point for NetBIOS 3.0 *
- * *
- * Usage: result = Netbios( pncb ); *
- ****************************************************************)
-
-function Netbios(pncb: PNCB): UCHAR; stdcall;
-{$EXTERNALSYM Netbios}
-
-(****************************************************************
- * *
- * Prefix for callback routines *
- * *
- * Usage in a declaration: NCB_POST MyPostRoutine( PNCB pncb ); *
- ****************************************************************)
-
-// #define NCB_POST void CALLBACK
-
-implementation
-
-{$IFDEF DYNAMIC_LINK}
-
-var
- _Netbios: Pointer;
-
-function Netbios;
-begin
- GetProcedureAddress(_Netbios, 'netapi32.dll', 'Netbios');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_Netbios]
- end;
-end;
-
-{$ELSE}
-
-function Netbios; external 'netapi32.dll' name 'Netbios';
-
-{$ENDIF DYNAMIC_LINK}
-
-end.
+{******************************************************************************}
+{ }
+{ Portable Netbios 3.0 API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: Nb30.h, released June 2000. The original Pascal }
+{ code is: JwaN30.pas, released December 2000. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwanb30.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaNb30;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "Nb30.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaWinType;
+
+(****************************************************************
+ * *
+ * Data structure templates *
+ * *
+ ****************************************************************)
+
+const
+ NCBNAMSZ = 16; // absolute length of a net name
+ {$EXTERNALSYM NCBNAMSZ}
+ MAX_LANA = 254; // lana's in range 0 to MAX_LANA inclusive
+ {$EXTERNALSYM MAX_LANA}
+
+//
+// Network Control Block
+//
+
+type
+ PNCB = ^NCB;
+
+ TNcbPost = procedure(P: PNCB); stdcall;
+
+ _NCB = record
+ ncb_command: UCHAR; // command code
+ ncb_retcode: UCHAR; // return code
+ ncb_lsn: UCHAR; // local session number
+ ncb_num: UCHAR; // number of our network name
+ ncb_buffer: PChar; // address of message buffer
+ ncb_length: Word; // size of message buffer
+ ncb_callname: array [0..NCBNAMSZ - 1] of Char; // blank-padded name of remote
+ ncb_name: array [0..NCBNAMSZ - 1] of Char; // our blank-padded netname
+ ncb_rto: UCHAR; // rcv timeout/retry count
+ ncb_sto: UCHAR; // send timeout/sys timeout
+ ncb_post: TNcbPost; // POST routine address
+ ncb_lana_num: UCHAR; // lana (adapter) number
+ ncb_cmd_cplt: UCHAR; // 0xff => commmand pending
+ {$IFDEF _WIN64}
+ ncb_reserve: array [0..17] of Char; // reserved, used by BIOS
+ {$ELSE}
+ ncb_reserve: array [0..9] of Char; // reserved, used by BIOS
+ {$ENDIF _WIN64}
+ ncb_event: HANDLE; // HANDLE to Win32 event which
+ // will be set to the signalled
+ // state when an ASYNCH command
+ // completes
+ end;
+ {$EXTERNALSYM _NCB}
+ NCB = _NCB;
+ {$EXTERNALSYM NCB}
+ TNcb = NCB;
+
+//
+// Structure returned to the NCB command NCBASTAT is ADAPTER_STATUS followed
+// by an array of NAME_BUFFER structures.
+//
+
+ _ADAPTER_STATUS = record
+ adapter_address: array [0..5] of UCHAR;
+ rev_major: UCHAR;
+ reserved0: UCHAR;
+ adapter_type: UCHAR;
+ rev_minor: UCHAR;
+ duration: WORD;
+ frmr_recv: WORD;
+ frmr_xmit: WORD;
+ iframe_recv_err: WORD;
+ xmit_aborts: WORD;
+ xmit_success: DWORD;
+ recv_success: DWORD;
+ iframe_xmit_err: WORD;
+ recv_buff_unavail: WORD;
+ t1_timeouts: WORD;
+ ti_timeouts: WORD;
+ reserved1: DWORD;
+ free_ncbs: WORD;
+ max_cfg_ncbs: WORD;
+ max_ncbs: WORD;
+ xmit_buf_unavail: WORD;
+ max_dgram_size: WORD;
+ pending_sess: WORD;
+ max_cfg_sess: WORD;
+ max_sess: WORD;
+ max_sess_pkt_size: WORD;
+ name_count: WORD;
+ end;
+ {$EXTERNALSYM _ADAPTER_STATUS}
+ ADAPTER_STATUS = _ADAPTER_STATUS;
+ {$EXTERNALSYM ADAPTER_STATUS}
+ PADAPTER_STATUS = ^ADAPTER_STATUS;
+ {$EXTERNALSYM PADAPTER_STATUS}
+ TAdapterStatus = ADAPTER_STATUS;
+ PAdapterStatus = PADAPTER_STATUS;
+
+ _NAME_BUFFER = record
+ name: array [0..NCBNAMSZ - 1] of Char;
+ name_num: UCHAR;
+ name_flags: UCHAR;
+ end;
+ {$EXTERNALSYM _NAME_BUFFER}
+ NAME_BUFFER = _NAME_BUFFER;
+ {$EXTERNALSYM NAME_BUFFER}
+ PNAME_BUFFER = ^NAME_BUFFER;
+ {$EXTERNALSYM PNAME_BUFFER}
+ TNameBuffer = NAME_BUFFER;
+ PNameBuffer = PNAME_BUFFER;
+
+// values for name_flags bits.
+
+const
+ NAME_FLAGS_MASK = $87;
+ {$EXTERNALSYM NAME_FLAGS_MASK}
+
+ GROUP_NAME = $80;
+ {$EXTERNALSYM GROUP_NAME}
+ UNIQUE_NAME = $00;
+ {$EXTERNALSYM UNIQUE_NAME}
+
+ REGISTERING = $00;
+ {$EXTERNALSYM REGISTERING}
+ REGISTERED = $04;
+ {$EXTERNALSYM REGISTERED}
+ DEREGISTERED = $05;
+ {$EXTERNALSYM DEREGISTERED}
+ DUPLICATE = $06;
+ {$EXTERNALSYM DUPLICATE}
+ DUPLICATE_DEREG = $07;
+ {$EXTERNALSYM DUPLICATE_DEREG}
+
+//
+// Structure returned to the NCB command NCBSSTAT is SESSION_HEADER followed
+// by an array of SESSION_BUFFER structures. If the NCB_NAME starts with an
+// asterisk then an array of these structures is returned containing the
+// status for all names.
+//
+
+type
+ _SESSION_HEADER = record
+ sess_name: UCHAR;
+ num_sess: UCHAR;
+ rcv_dg_outstanding: UCHAR;
+ rcv_any_outstanding: UCHAR;
+ end;
+ {$EXTERNALSYM _SESSION_HEADER}
+ SESSION_HEADER = _SESSION_HEADER;
+ {$EXTERNALSYM SESSION_HEADER}
+ PSESSION_HEADER = ^SESSION_HEADER;
+ {$EXTERNALSYM PSESSION_HEADER}
+ TSessionHeader = SESSION_HEADER;
+ PSessionHeader = PSESSION_HEADER;
+
+ _SESSION_BUFFER = record
+ lsn: UCHAR;
+ state: UCHAR;
+ local_name: array [0..NCBNAMSZ - 1] of UCHAR;
+ remote_name: array [0..NCBNAMSZ - 1] of UCHAR;
+ rcvs_outstanding: UCHAR;
+ sends_outstanding: UCHAR;
+ end;
+ {$EXTERNALSYM _SESSION_BUFFER}
+ SESSION_BUFFER = _SESSION_BUFFER;
+ {$EXTERNALSYM SESSION_BUFFER}
+ PSESSION_BUFFER = ^SESSION_BUFFER;
+ {$EXTERNALSYM PSESSION_BUFFER}
+ TSessionBuffer = SESSION_BUFFER;
+ PSessionBuffer = PSESSION_BUFFER;
+
+// Values for state
+
+const
+ LISTEN_OUTSTANDING = $01;
+ {$EXTERNALSYM LISTEN_OUTSTANDING}
+ CALL_PENDING = $02;
+ {$EXTERNALSYM CALL_PENDING}
+ SESSION_ESTABLISHED = $03;
+ {$EXTERNALSYM SESSION_ESTABLISHED}
+ HANGUP_PENDING = $04;
+ {$EXTERNALSYM HANGUP_PENDING}
+ HANGUP_COMPLETE = $05;
+ {$EXTERNALSYM HANGUP_COMPLETE}
+ SESSION_ABORTED = $06;
+ {$EXTERNALSYM SESSION_ABORTED}
+
+//
+// Structure returned to the NCB command NCBENUM.
+//
+// On a system containing lana's 0, 2 and 3, a structure with
+// length =3, lana[0]=0, lana[1]=2 and lana[2]=3 will be returned.
+//
+
+type
+ _LANA_ENUM = record
+ length: UCHAR; // Number of valid entries in lana[]
+ lana: array [0..MAX_LANA] of UCHAR;
+ end;
+ {$EXTERNALSYM _LANA_ENUM}
+ LANA_ENUM = _LANA_ENUM;
+ {$EXTERNALSYM LANA_ENUM}
+ PLANA_ENUM = ^LANA_ENUM;
+ {$EXTERNALSYM PLANA_ENUM}
+ TLanaEnum = LANA_ENUM;
+ PLanaEnum = PLANA_ENUM;
+
+//
+// Structure returned to the NCB command NCBFINDNAME is FIND_NAME_HEADER followed
+// by an array of FIND_NAME_BUFFER structures.
+//
+
+type
+ _FIND_NAME_HEADER = record
+ node_count: WORD;
+ reserved: UCHAR;
+ unique_group: UCHAR;
+ end;
+ {$EXTERNALSYM _FIND_NAME_HEADER}
+ FIND_NAME_HEADER = _FIND_NAME_HEADER;
+ {$EXTERNALSYM FIND_NAME_HEADER}
+ PFIND_NAME_HEADER = ^FIND_NAME_HEADER;
+ {$EXTERNALSYM PFIND_NAME_HEADER}
+ TFindNameHeader = FIND_NAME_HEADER;
+ PFindNameHeader = PFIND_NAME_HEADER;
+
+ _FIND_NAME_BUFFER = record
+ length: UCHAR;
+ access_control: UCHAR;
+ frame_control: UCHAR;
+ destination_addr: array [0..5] of UCHAR;
+ source_addr: array [0..5] of UCHAR;
+ routing_info: array [0..17] of UCHAR;
+ end;
+ {$EXTERNALSYM _FIND_NAME_BUFFER}
+ FIND_NAME_BUFFER = _FIND_NAME_BUFFER;
+ {$EXTERNALSYM FIND_NAME_BUFFER}
+ PFIND_NAME_BUFFER = ^FIND_NAME_BUFFER;
+ {$EXTERNALSYM PFIND_NAME_BUFFER}
+ TFindNameBuffer = FIND_NAME_BUFFER;
+ PFindNameBuffer = PFIND_NAME_BUFFER;
+
+//
+// Structure provided with NCBACTION. The purpose of NCBACTION is to provide
+// transport specific extensions to netbios.
+//
+
+ _ACTION_HEADER = record
+ transport_id: ULONG;
+ action_code: USHORT;
+ reserved: USHORT;
+ end;
+ {$EXTERNALSYM _ACTION_HEADER}
+ ACTION_HEADER = _ACTION_HEADER;
+ {$EXTERNALSYM ACTION_HEADER}
+ PACTION_HEADER = ^ACTION_HEADER;
+ {$EXTERNALSYM PACTION_HEADER}
+ TActionHeader = ACTION_HEADER;
+ PActionHeader = PACTION_HEADER;
+
+// Values for transport_id
+
+const
+ ALL_TRANSPORTS = 'M'#0#0#0;
+ {$EXTERNALSYM ALL_TRANSPORTS}
+ MS_NBF = 'MNBF';
+ {$EXTERNALSYM MS_NBF}
+
+(****************************************************************
+ * *
+ * Special values and constants *
+ * *
+ ****************************************************************)
+
+//
+// NCB Command codes
+//
+
+const
+ NCBCALL = $10; // NCB CALL
+ {$EXTERNALSYM NCBCALL}
+ NCBLISTEN = $11; // NCB LISTEN
+ {$EXTERNALSYM NCBLISTEN}
+ NCBHANGUP = $12; // NCB HANG UP
+ {$EXTERNALSYM NCBHANGUP}
+ NCBSEND = $14; // NCB SEND
+ {$EXTERNALSYM NCBSEND}
+ NCBRECV = $15; // NCB RECEIVE
+ {$EXTERNALSYM NCBRECV}
+ NCBRECVANY = $16; // NCB RECEIVE ANY
+ {$EXTERNALSYM NCBRECVANY}
+ NCBCHAINSEND = $17; // NCB CHAIN SEND
+ {$EXTERNALSYM NCBCHAINSEND}
+ NCBDGSEND = $20; // NCB SEND DATAGRAM
+ {$EXTERNALSYM NCBDGSEND}
+ NCBDGRECV = $21; // NCB RECEIVE DATAGRAM
+ {$EXTERNALSYM NCBDGRECV}
+ NCBDGSENDBC = $22; // NCB SEND BROADCAST DATAGRAM
+ {$EXTERNALSYM NCBDGSENDBC}
+ NCBDGRECVBC = $23; // NCB RECEIVE BROADCAST DATAGRAM
+ {$EXTERNALSYM NCBDGRECVBC}
+ NCBADDNAME = $30; // NCB ADD NAME
+ {$EXTERNALSYM NCBADDNAME}
+ NCBDELNAME = $31; // NCB DELETE NAME
+ {$EXTERNALSYM NCBDELNAME}
+ NCBRESET = $32; // NCB RESET
+ {$EXTERNALSYM NCBRESET}
+ NCBASTAT = $33; // NCB ADAPTER STATUS
+ {$EXTERNALSYM NCBASTAT}
+ NCBSSTAT = $34; // NCB SESSION STATUS
+ {$EXTERNALSYM NCBSSTAT}
+ NCBCANCEL = $35; // NCB CANCEL
+ {$EXTERNALSYM NCBCANCEL}
+ NCBADDGRNAME = $36; // NCB ADD GROUP NAME
+ {$EXTERNALSYM NCBADDGRNAME}
+ NCBENUM = $37; // NCB ENUMERATE LANA NUMBERS
+ {$EXTERNALSYM NCBENUM}
+ NCBUNLINK = $70; // NCB UNLINK
+ {$EXTERNALSYM NCBUNLINK}
+ NCBSENDNA = $71; // NCB SEND NO ACK
+ {$EXTERNALSYM NCBSENDNA}
+ NCBCHAINSENDNA = $72; // NCB CHAIN SEND NO ACK
+ {$EXTERNALSYM NCBCHAINSENDNA}
+ NCBLANSTALERT = $73; // NCB LAN STATUS ALERT
+ {$EXTERNALSYM NCBLANSTALERT}
+ NCBACTION = $77; // NCB ACTION
+ {$EXTERNALSYM NCBACTION}
+ NCBFINDNAME = $78; // NCB FIND NAME
+ {$EXTERNALSYM NCBFINDNAME}
+ NCBTRACE = $79; // NCB TRACE
+ {$EXTERNALSYM NCBTRACE}
+
+ ASYNCH = $80; // high bit set == asynchronous
+ {$EXTERNALSYM ASYNCH}
+
+//
+// NCB Return codes
+//
+
+ NRC_GOODRET = $00; // good return also returned when ASYNCH request accepted
+ {$EXTERNALSYM NRC_GOODRET}
+ NRC_BUFLEN = $01; // illegal buffer length
+ {$EXTERNALSYM NRC_BUFLEN}
+ NRC_ILLCMD = $03; // illegal command
+ {$EXTERNALSYM NRC_ILLCMD}
+ NRC_CMDTMO = $05; // command timed out
+ {$EXTERNALSYM NRC_CMDTMO}
+ NRC_INCOMP = $06; // message incomplete, issue another command
+ {$EXTERNALSYM NRC_INCOMP}
+ NRC_BADDR = $07; // illegal buffer address
+ {$EXTERNALSYM NRC_BADDR}
+ NRC_SNUMOUT = $08; // session number out of range
+ {$EXTERNALSYM NRC_SNUMOUT}
+ NRC_NORES = $09; // no resource available
+ {$EXTERNALSYM NRC_NORES}
+ NRC_SCLOSED = $0a; // session closed
+ {$EXTERNALSYM NRC_SCLOSED}
+ NRC_CMDCAN = $0b; // command cancelled
+ {$EXTERNALSYM NRC_CMDCAN}
+ NRC_DUPNAME = $0d; // duplicate name
+ {$EXTERNALSYM NRC_DUPNAME}
+ NRC_NAMTFUL = $0e; // name table full
+ {$EXTERNALSYM NRC_NAMTFUL}
+ NRC_ACTSES = $0f; // no deletions, name has active sessions
+ {$EXTERNALSYM NRC_ACTSES}
+ NRC_LOCTFUL = $11; // local session table full
+ {$EXTERNALSYM NRC_LOCTFUL}
+ NRC_REMTFUL = $12; // remote session table full
+ {$EXTERNALSYM NRC_REMTFUL}
+ NRC_ILLNN = $13; // illegal name number
+ {$EXTERNALSYM NRC_ILLNN}
+ NRC_NOCALL = $14; // no callname
+ {$EXTERNALSYM NRC_NOCALL}
+ NRC_NOWILD = $15; // cannot put * in NCB_NAME
+ {$EXTERNALSYM NRC_NOWILD}
+ NRC_INUSE = $16; // name in use on remote adapter
+ {$EXTERNALSYM NRC_INUSE}
+ NRC_NAMERR = $17; // name deleted
+ {$EXTERNALSYM NRC_NAMERR}
+ NRC_SABORT = $18; // session ended abnormally
+ {$EXTERNALSYM NRC_SABORT}
+ NRC_NAMCONF = $19; // name conflict detected
+ {$EXTERNALSYM NRC_NAMCONF}
+ NRC_IFBUSY = $21; // interface busy, IRET before retrying
+ {$EXTERNALSYM NRC_IFBUSY}
+ NRC_TOOMANY = $22; // too many commands outstanding, retry later
+ {$EXTERNALSYM NRC_TOOMANY}
+ NRC_BRIDGE = $23; // ncb_lana_num field invalid
+ {$EXTERNALSYM NRC_BRIDGE}
+ NRC_CANOCCR = $24; // command completed while cancel occurring
+ {$EXTERNALSYM NRC_CANOCCR}
+ NRC_CANCEL = $26; // command not valid to cancel
+ {$EXTERNALSYM NRC_CANCEL}
+ NRC_DUPENV = $30; // name defined by anther local process
+ {$EXTERNALSYM NRC_DUPENV}
+ NRC_ENVNOTDEF = $34; // environment undefined. RESET required
+ {$EXTERNALSYM NRC_ENVNOTDEF}
+ NRC_OSRESNOTAV = $35; // required OS resources exhausted
+ {$EXTERNALSYM NRC_OSRESNOTAV}
+ NRC_MAXAPPS = $36; // max number of applications exceeded
+ {$EXTERNALSYM NRC_MAXAPPS}
+ NRC_NOSAPS = $37; // no saps available for netbios
+ {$EXTERNALSYM NRC_NOSAPS}
+ NRC_NORESOURCES = $38; // requested resources are not available
+ {$EXTERNALSYM NRC_NORESOURCES}
+ NRC_INVADDRESS = $39; // invalid ncb address or length > segment
+ {$EXTERNALSYM NRC_INVADDRESS}
+ NRC_INVDDID = $3B; // invalid NCB DDID
+ {$EXTERNALSYM NRC_INVDDID}
+ NRC_LOCKFAIL = $3C; // lock of user area failed
+ {$EXTERNALSYM NRC_LOCKFAIL}
+ NRC_OPENERR = $3f; // NETBIOS not loaded
+ {$EXTERNALSYM NRC_OPENERR}
+ NRC_SYSTEM = $40; // system error
+ {$EXTERNALSYM NRC_SYSTEM}
+
+ NRC_PENDING = $ff; // asynchronous command is not yet finished
+ {$EXTERNALSYM NRC_PENDING}
+
+(****************************************************************
+ * *
+ * main user entry point for NetBIOS 3.0 *
+ * *
+ * Usage: result = Netbios( pncb ); *
+ ****************************************************************)
+
+function Netbios(pncb: PNCB): UCHAR; stdcall;
+{$EXTERNALSYM Netbios}
+
+(****************************************************************
+ * *
+ * Prefix for callback routines *
+ * *
+ * Usage in a declaration: NCB_POST MyPostRoutine( PNCB pncb ); *
+ ****************************************************************)
+
+// #define NCB_POST void CALLBACK
+
+implementation
+
+{$IFDEF DYNAMIC_LINK}
+
+var
+ _Netbios: Pointer;
+
+function Netbios;
+begin
+ GetProcedureAddress(_Netbios, 'netapi32.dll', 'Netbios');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_Netbios]
+ end;
+end;
+
+{$ELSE}
+
+function Netbios; external 'netapi32.dll' name 'Netbios';
+
+{$ENDIF DYNAMIC_LINK}
+
+end.
diff --git a/packages/extra/winunits/jwanetsh.pas b/packages/extra/winunits/jwanetsh.pas
index 888e564ecc..782e2df0e9 100644
--- a/packages/extra/winunits/jwanetsh.pas
+++ b/packages/extra/winunits/jwanetsh.pas
@@ -1,531 +1,531 @@
-{******************************************************************************}
-{ }
-{ Net Shell API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: netsh.h, released August 2001. The original Pascal }
-{ code is: NetSh.pas, released December 2001. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwanetsh.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaNetSh;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "netsh.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaWinNT, JwaWinType;
-
-// This file contains definitions which are needed by all NetSh helper DLLs.
-
-//
-// Error codes
-//
-
-const
- NETSH_ERROR_BASE = 15000;
- {$EXTERNALSYM NETSH_ERROR_BASE}
- ERROR_NO_ENTRIES = NETSH_ERROR_BASE + 0;
- {$EXTERNALSYM ERROR_NO_ENTRIES}
- ERROR_INVALID_SYNTAX = NETSH_ERROR_BASE + 1;
- {$EXTERNALSYM ERROR_INVALID_SYNTAX}
- ERROR_PROTOCOL_NOT_IN_TRANSPORT = NETSH_ERROR_BASE + 2;
- {$EXTERNALSYM ERROR_PROTOCOL_NOT_IN_TRANSPORT}
- ERROR_NO_CHANGE = NETSH_ERROR_BASE + 3;
- {$EXTERNALSYM ERROR_NO_CHANGE}
- ERROR_CMD_NOT_FOUND = NETSH_ERROR_BASE + 4;
- {$EXTERNALSYM ERROR_CMD_NOT_FOUND}
- ERROR_ENTRY_PT_NOT_FOUND = NETSH_ERROR_BASE + 5;
- {$EXTERNALSYM ERROR_ENTRY_PT_NOT_FOUND}
- ERROR_DLL_LOAD_FAILED = NETSH_ERROR_BASE + 6;
- {$EXTERNALSYM ERROR_DLL_LOAD_FAILED}
- ERROR_INIT_DISPLAY = NETSH_ERROR_BASE + 7;
- {$EXTERNALSYM ERROR_INIT_DISPLAY}
- ERROR_TAG_ALREADY_PRESENT = NETSH_ERROR_BASE + 8;
- {$EXTERNALSYM ERROR_TAG_ALREADY_PRESENT}
- ERROR_INVALID_OPTION_TAG = NETSH_ERROR_BASE + 9;
- {$EXTERNALSYM ERROR_INVALID_OPTION_TAG}
- ERROR_NO_TAG = NETSH_ERROR_BASE + 10;
- {$EXTERNALSYM ERROR_NO_TAG}
- ERROR_MISSING_OPTION = NETSH_ERROR_BASE + 11;
- {$EXTERNALSYM ERROR_MISSING_OPTION}
- ERROR_TRANSPORT_NOT_PRESENT = NETSH_ERROR_BASE + 12;
- {$EXTERNALSYM ERROR_TRANSPORT_NOT_PRESENT}
- ERROR_SHOW_USAGE = NETSH_ERROR_BASE + 13;
- {$EXTERNALSYM ERROR_SHOW_USAGE}
- ERROR_INVALID_OPTION_VALUE = NETSH_ERROR_BASE + 14;
- {$EXTERNALSYM ERROR_INVALID_OPTION_VALUE}
- ERROR_OKAY = NETSH_ERROR_BASE + 15;
- {$EXTERNALSYM ERROR_OKAY}
- ERROR_CONTINUE_IN_PARENT_CONTEXT = NETSH_ERROR_BASE + 16;
- {$EXTERNALSYM ERROR_CONTINUE_IN_PARENT_CONTEXT}
- ERROR_SUPPRESS_OUTPUT = NETSH_ERROR_BASE + 17;
- {$EXTERNALSYM ERROR_SUPPRESS_OUTPUT}
- ERROR_HELPER_ALREADY_REGISTERED = NETSH_ERROR_BASE + 18;
- {$EXTERNALSYM ERROR_HELPER_ALREADY_REGISTERED}
- ERROR_CONTEXT_ALREADY_REGISTERED = NETSH_ERROR_BASE + 19;
- {$EXTERNALSYM ERROR_CONTEXT_ALREADY_REGISTERED}
- NETSH_ERROR_END = ERROR_CONTEXT_ALREADY_REGISTERED;
- {$EXTERNALSYM NETSH_ERROR_END}
-
-// Flags
-
-type
- NS_CMD_FLAGS = DWORD;
- {$EXTERNALSYM NS_CMD_FLAGS}
- TNsCmdFlags = NS_CMD_FLAGS;
-
-const
- CMD_FLAG_PRIVATE = $01; // not valid in sub-contexts
- {$EXTERNALSYM CMD_FLAG_PRIVATE}
- CMD_FLAG_INTERACTIVE = $02; // not valid from outside netsh
- {$EXTERNALSYM CMD_FLAG_INTERACTIVE}
- CMD_FLAG_LOCAL = $08; // not valid from a remote machine
- {$EXTERNALSYM CMD_FLAG_LOCAL}
- CMD_FLAG_ONLINE = $10; // not valid in offline/non-commit mode
- {$EXTERNALSYM CMD_FLAG_ONLINE}
- CMD_FLAG_HIDDEN = $20; // hide from help but allow execution
- {$EXTERNALSYM CMD_FLAG_HIDDEN}
- CMD_FLAG_LIMIT_MASK = $ffff;
- {$EXTERNALSYM CMD_FLAG_LIMIT_MASK}
- CMD_FLAG_PRIORITY = DWORD($80000000); // ulPriority field is used
- {$EXTERNALSYM CMD_FLAG_PRIORITY}
-
-type
- NS_REQS = (
- NS_REQ_ZERO,
- NS_REQ_PRESENT,
- NS_REQ_ALLOW_MULTIPLE,
- NS_REQ_ONE_OR_MORE);
- {$EXTERNALSYM NS_REQS}
- TNsReqs = NS_REQS;
-
- NS_EVENTS = DWORD;
- {$EXTERNALSYM NS_EVENTS}
- TNsEvents = NS_EVENTS;
-
-const
- NS_EVENT_LOOP = $00010000;
- {$EXTERNALSYM NS_EVENT_LOOP}
- NS_EVENT_LAST_N = $00000001;
- {$EXTERNALSYM NS_EVENT_LAST_N}
- NS_EVENT_LAST_SECS = $00000002;
- {$EXTERNALSYM NS_EVENT_LAST_SECS}
- NS_EVENT_FROM_N = $00000004;
- {$EXTERNALSYM NS_EVENT_FROM_N}
- NS_EVENT_FROM_START = $00000008;
- {$EXTERNALSYM NS_EVENT_FROM_START}
-
-type
- NS_MODE_CHANGE = (
- NETSH_COMMIT,
- NETSH_UNCOMMIT,
- NETSH_FLUSH,
- NETSH_COMMIT_STATE,
- NETSH_SAVE);
- {$EXTERNALSYM NS_MODE_CHANGE}
- TNsModeChange = NS_MODE_CHANGE;
-
-const
- NS_GET_EVENT_IDS_FN_NAME = 'GetEventIds';
- {$EXTERNALSYM NS_GET_EVENT_IDS_FN_NAME}
-
-// todo where is MAX_DLL_NAME
-// MAX_NAME_LEN = MAX_DLL_NAME;
-// {$EXTERNALSYM MAX_NAME_LEN}
-
- NETSH_VERSION_50 = $0005000;
- {$EXTERNALSYM NETSH_VERSION_50}
-
- NETSH_ARG_DELIMITER = WideString('=');
- {$EXTERNALSYM NETSH_ARG_DELIMITER}
- NETSH_CMD_DELIMITER = WideString(' ');
- {$EXTERNALSYM NETSH_CMD_DELIMITER}
-
- NETSH_MAX_TOKEN_LENGTH = 64;
- {$EXTERNALSYM NETSH_MAX_TOKEN_LENGTH}
- NETSH_MAX_CMD_TOKEN_LENGTH = 128;
- {$EXTERNALSYM NETSH_MAX_CMD_TOKEN_LENGTH}
-
- NETSH_ROOT_GUID: TGUID = (
- D1: 0; D2: 0; D3: 0; D4: (0, 0, 0, 0, 0, 0, 0, 0));
- {$EXTERNALSYM NETSH_ROOT_GUID}
-
- DEFAULT_CONTEXT_PRIORITY = 100;
- {$EXTERNALSYM DEFAULT_CONTEXT_PRIORITY}
-
-type
- PTOKEN_VALUE = ^TOKEN_VALUE;
- {$EXTERNALSYM PTOKEN_VALUE}
- _TOKEN_VALUE = record
- pwszToken: LPCWSTR; // literal token string
- dwValue: DWORD; // ID of info string
- end;
- {$EXTERNALSYM _TOKEN_VALUE}
- TOKEN_VALUE = _TOKEN_VALUE;
- {$EXTERNALSYM TOKEN_VALUE}
- TTokenValue = TOKEN_VALUE;
- PTokenValue = PTOKEN_VALUE;
-
-// Macros
-
-(* TODO
-#define CREATE_CMD_ENTRY(t,f) {CMD_##t, f, HLP_##t, HLP_##t##_EX, CMD_FLAG_PRIVATE, NULL}
-#define CREATE_CMD_ENTRY_EX(t,f,i) {CMD_##t, f, HLP_##t, HLP_##t##_EX, i, NULL}
-#define CREATE_CMD_ENTRY_EX_VER(t,f,i,v) {CMD_##t, f, HLP_##t, HLP_##t##_EX, i, v}
-
-#define CREATE_CMD_GROUP_ENTRY(t,s) {CMD_##t, HLP_##t, sizeof(s)/sizeof(CMD_ENTRY), 0, s, NULL }
-#define CREATE_CMD_GROUP_ENTRY_EX(t,s,i) {CMD_##t, HLP_##t, sizeof(s)/sizeof(CMD_ENTRY), i, s, NULL }
-#define CREATE_CMD_GROUP_ENTRY_EX_VER(t,s,i,v) {CMD_##t, HLP_##t, sizeof(s)/sizeof(CMD_ENTRY), i, s, v }
-
-#define NUM_TOKENS_IN_TABLE(TokenArray) sizeof(TokenArray)/sizeof(TOKEN_VALUE)
-#define NUM_TAGS_IN_TABLE(TagsArray) sizeof(TagsArray)/sizeof(TAG_TYPE)
-*)
-
-// Callbacks
-
-type
- NS_CONTEXT_COMMIT_FN = function(dwAction: DWORD): DWORD; stdcall;
- {$EXTERNALSYM NS_CONTEXT_COMMIT_FN}
- PNS_CONTEXT_COMMIT_FN = ^NS_CONTEXT_COMMIT_FN;
- {$EXTERNALSYM PNS_CONTEXT_COMMIT_FN}
- TNsContextCommitFn = NS_CONTEXT_COMMIT_FN;
- PNsContextCommitFn = PNS_CONTEXT_COMMIT_FN;
-
- NS_CONTEXT_CONNECT_FN = function(pwszMachine: LPCWSTR): DWORD; stdcall;
- {$EXTERNALSYM NS_CONTEXT_CONNECT_FN}
- PNS_CONTEXT_CONNECT_FN = ^NS_CONTEXT_CONNECT_FN;
- {$EXTERNALSYM PNS_CONTEXT_CONNECT_FN}
- TNsContextConnextFn = NS_CONTEXT_CONNECT_FN;
- PNsContextConnextFn = PNS_CONTEXT_CONNECT_FN;
-
- NS_CONTEXT_DUMP_FN = function(pwszRouter: LPCWSTR; var ppwcArguments: LPWSTR; dwArgCount: DWORD; pvData: LPCVOID): DWORD; stdcall;
- {$EXTERNALSYM NS_CONTEXT_DUMP_FN}
- PNS_CONTEXT_DUMP_FN = ^NS_CONTEXT_DUMP_FN;
- {$EXTERNALSYM PNS_CONTEXT_DUMP_FN}
- TNsContextDumpFn = NS_CONTEXT_DUMP_FN;
- PNsContextDumpFn = PNS_CONTEXT_DUMP_FN;
-
- NS_DLL_STOP_FN = function(dwReserved: DWORD): DWORD; stdcall;
- {$EXTERNALSYM NS_DLL_STOP_FN}
- PNS_DLL_STOP_FN = ^NS_DLL_STOP_FN;
- {$EXTERNALSYM PNS_DLL_STOP_FN}
- TNsDllStopFn = NS_DLL_STOP_FN;
- PNsDllStopFn = PNS_DLL_STOP_FN;
-
- NS_HELPER_START_FN = function(const pguidParent: TGUID; dwVersion: DWORD): DWORD; stdcall;
- {$EXTERNALSYM NS_HELPER_START_FN}
- PNS_HELPER_START_FN = NS_HELPER_START_FN;
- {$EXTERNALSYM PNS_HELPER_START_FN}
- TNsHelperStartFn = NS_HELPER_START_FN;
- PNsHelperStartFn = PNS_HELPER_START_FN;
-
- NS_HELPER_STOP_FN = function(dwReserved: DWORD): DWORD; stdcall;
- {$EXTERNALSYM NS_HELPER_STOP_FN}
- PNS_HELPER_STOP_FN = ^NS_HELPER_STOP_FN;
- {$EXTERNALSYM PNS_HELPER_STOP_FN}
- TNsHelperStopFn = NS_HELPER_STOP_FN;
- PNsHelperStopFn = PNS_HELPER_STOP_FN;
-
- FN_HANDLE_CMD = function(pwszMachine: LPCWSTR; var ppwcArguments: LPWSTR; dwCurrentIndex, dwArgCount,
- dwFlags: DWORD; pvData: LPCVOID; var pbDone: BOOL): DWORD; stdcall;
- {$EXTERNALSYM FN_HANDLE_CMD}
- PFN_HANDLE_CMD = ^FN_HANDLE_CMD;
- {$EXTERNALSYM PFN_HANDLE_CMD}
- TFnHandleCmd = FN_HANDLE_CMD;
- PFnHandleCmd = PFN_HANDLE_CMD;
-
- NS_OSVERSIONCHECK = function(CIMOSType, CIMOSProductSuite: UINT; CIMOSVersion, CIMOSBuildNumber, CIMServicePackMajorVersion,
- CIMServicePackMinorVersion: LPCWSTR; CIMProcessorArchitecture: UINT; dwReserved: DWORD): BOOL; stdcall;
- {$EXTERNALSYM NS_OSVERSIONCHECK}
- PNS_OSVERSIONCHECK = ^NS_OSVERSIONCHECK;
- {$EXTERNALSYM PNS_OSVERSIONCHECK}
- TNsOSVersionCheck = NS_OSVERSIONCHECK;
- PNsOSVersionCheck = PNS_OSVERSIONCHECK;
-
-// Structures
-
- _NS_HELPER_ATTRIBUTES = record
- Union: record
- case Integer of
- 0: (
- dwVersion: DWORD;
- dwReserved: DWORD);
- 1: (
- _ullAlign: ULONGLONG);
- end;
- guidHelper: TGUID; // GUID associated with the helper
- pfnStart: PNS_HELPER_START_FN; // Function to start this helper
- pfnStop: PNS_HELPER_STOP_FN; // Function to stop this helper
- end;
- {$EXTERNALSYM _NS_HELPER_ATTRIBUTES}
- NS_HELPER_ATTRIBUTES = _NS_HELPER_ATTRIBUTES;
- {$EXTERNALSYM NS_HELPER_ATTRIBUTES}
- PNS_HELPER_ATTRIBUTES = ^NS_HELPER_ATTRIBUTES;
- {$EXTERNALSYM PNS_HELPER_ATTRIBUTES}
- TNsHelperAttributes = NS_HELPER_ATTRIBUTES;
- PNsHelperAttributes = PNS_HELPER_ATTRIBUTES;
-
- PCMD_ENTRY = ^CMD_ENTRY;
- {$EXTERNALSYM PCMD_ENTRY}
- _CMD_ENTRY = record
- pwszCmdToken: LPCWSTR; // The token for the command
- pfnCmdHandler: PFN_HANDLE_CMD; // The function which handles this command
- dwShortCmdHelpToken: DWORD; // The short help message
- dwCmdHlpToken: DWORD; // The message to display if the only thing after the command is a help token (HELP, /?, -?, ?)
- dwFlags: DWORD; // Flags (see CMD_FLAGS_xxx above)
- pOsVersionCheck: PNS_OSVERSIONCHECK; // Check for the version of the OS this command can run against
- end;
- {$EXTERNALSYM _CMD_ENTRY}
- CMD_ENTRY = _CMD_ENTRY;
- {$EXTERNALSYM CMD_ENTRY}
- TCmdEntry = CMD_ENTRY;
- PCmdEntry = PCMD_ENTRY;
-
- PCMD_GROUP_ENTRY = ^CMD_GROUP_ENTRY;
- {$EXTERNALSYM PCMD_GROUP_ENTRY}
- _CMD_GROUP_ENTRY = record
- pwszCmdGroupToken: LPCWSTR; // The token for the command verb
- dwShortCmdHelpToken: DWORD; // The message to display in a command listing.
- ulCmdGroupSize: ULONG; // The number of entries in the cmd table
- dwFlags: DWORD; // Flags (see CMD_FLAG_xxx)
- pCmdGroup: PCMD_ENTRY; // The command table
- pOsVersionCheck: PNS_OSVERSIONCHECK; // Check for the version of the OS this command can run against
- end;
- {$EXTERNALSYM _CMD_GROUP_ENTRY}
- CMD_GROUP_ENTRY = _CMD_GROUP_ENTRY;
- {$EXTERNALSYM CMD_GROUP_ENTRY}
- TCmdGroupEntry = CMD_GROUP_ENTRY;
- PCmdGroupEntry = PCMD_GROUP_ENTRY;
-
- _NS_CONTEXT_ATTRIBUTES = record
- Union: record
- case Integer of
- 0: (
- dwVersion: DWORD;
- dwReserved: DWORD);
- 1: (
- _ullAlign: ULONGLONG);
- end;
- pwszContext: LPWSTR; // Name of the context
- guidHelper: TGUID; // GUID of the helper servicing this context
- dwFlags: DWORD; // Flags limiting when context is available. (See CMD_FLAG_xxx)
- ulPriority: ULONG; // Priority field is only relevant if CMD_FLAG_PRIORITY is set in dwFlags
- ulNumTopCmds: ULONG; // Number of top-level commands
- pTopCmds: PCMD_ENTRY; // Array of top-level commands
- ulNumGroups: ULONG; // Number of command groups
- pCmdGroups: PCMD_GROUP_ENTRY; // Array of command groups
-
- pfnCommitFn: PNS_CONTEXT_COMMIT_FN;
- pfnDumpFn: PNS_CONTEXT_DUMP_FN;
- pfnConnectFn: PNS_CONTEXT_CONNECT_FN;
- pReserved: PVOID;
- pfnOsVersionCheck: PNS_OSVERSIONCHECK;
- end;
- {$EXTERNALSYM _NS_CONTEXT_ATTRIBUTES}
- NS_CONTEXT_ATTRIBUTES = _NS_CONTEXT_ATTRIBUTES;
- {$EXTERNALSYM NS_CONTEXT_ATTRIBUTES}
- PNS_CONTEXT_ATTRIBUTES = ^NS_CONTEXT_ATTRIBUTES;
- {$EXTERNALSYM PNS_CONTEXT_ATTRIBUTES}
- TNsContextAttributes = NS_CONTEXT_ATTRIBUTES;
- PNsContextAttributes = PNS_CONTEXT_ATTRIBUTES;
-
- PCNS_CONTEXT_ATTRIBUTES = ^_NS_CONTEXT_ATTRIBUTES;
- {$EXTERNALSYM PCNS_CONTEXT_ATTRIBUTES}
-
- PTAG_TYPE = ^TAG_TYPE;
- {$EXTERNALSYM PTAG_TYPE}
- _TAG_TYPE = record
- pwszTag: LPCWSTR; // tag string
- dwRequired: DWORD; // required or not
- bPresent: BOOL; // present or not
- end;
- {$EXTERNALSYM _TAG_TYPE}
- TAG_TYPE = _TAG_TYPE;
- {$EXTERNALSYM TAG_TYPE}
- TTagType = TAG_TYPE;
- PTagType = PTAG_TYPE;
-
-type
- NS_DLL_INIT_FN = function(dwNetshVersion: DWORD; pReserved: PVOID): DWORD; stdcall;
- {$EXTERNALSYM NS_DLL_INIT_FN}
- PNS_DLL_INIT_FN = ^NS_DLL_INIT_FN;
- {$EXTERNALSYM PNS_DLL_INIT_FN}
- TNdDllInitFn = NS_DLL_INIT_FN;
- PNdDllInitFn = PNS_DLL_INIT_FN;
-
-// Exports
-
-function GetHostMachineInfo(var puiCIMOSType, puiCIMOSProductSuite: UINT; pszCIMOSVersion, pszCIMOSBuildNumber,
- pszCIMServicePackMajorVersion, pszCIMServicePackMinorVersion: LPWSTR; var puiCIMProcessorArchitecture: UINT): DWORD; stdcall;
-{$EXTERNALSYM GetHostMachineInfo}
-function MatchEnumTag(hModule: HANDLE; pwcArg: LPCWSTR; dwNumArg: DWORD; pEnumTable: PTOKEN_VALUE; pdwValue: PDWORD): DWORD; stdcall;
-{$EXTERNALSYM MatchEnumTag}
-function MatchToken(pwszUserToken, pwszCmdToken: LPCWSTR): BOOL; stdcall;
-{$EXTERNALSYM MatchToken}
-function PreprocessCommand(hModule: HANDLE; var ppwcArguments: LPWSTR; dwCurrentIndex, dwArgCount: DWORD; pttTags: PTAG_TYPE;
- dwTagCount, dwMinArgs, dwMaxArgs: DWORD; var pdwTagType: DWORD): DWORD; stdcall;
-{$EXTERNALSYM PreprocessCommand}
-
-(* TODO
-DWORD PrintError(
- IN HANDLE hModule, OPTIONAL
- IN DWORD dwErrId,
- ...
- );
-
-DWORD PrintMessageFromModule(
- IN HANDLE hModule,
- IN DWORD dwMsgId,
- ...
- );
-
-DWORD PrintMessage(
- IN LPCWSTR pwszFormat,
- ...
- );
-*)
-
-function RegisterContext(pChildContext: PNS_CONTEXT_ATTRIBUTES): DWORD; stdcall;
-{$EXTERNALSYM RegisterContext}
-function RegisterHelper(const pguidParentContext: TGUID; pfnRegisterSubContext: PNS_HELPER_ATTRIBUTES): DWORD; stdcall;
-{$EXTERNALSYM RegisterHelper}
-
-implementation
-
-const
- netsh = 'netsh.exe';
-
-{$IFDEF DYNAMIC_LINK}
-
-var
- _GetHostMachineInfo: Pointer;
-
-function GetHostMachineInfo;
-begin
- GetProcedureAddress(_GetHostMachineInfo, netsh, 'GetHostMachineInfo');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetHostMachineInfo]
- end;
-end;
-
-var
- _MatchEnumTag: Pointer;
-
-function MatchEnumTag;
-begin
- GetProcedureAddress(_MatchEnumTag, netsh, 'MatchEnumTag');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MatchEnumTag]
- end;
-end;
-
-var
- _MatchToken: Pointer;
-
-function MatchToken;
-begin
- GetProcedureAddress(_MatchToken, netsh, 'MatchToken');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MatchToken]
- end;
-end;
-
-var
- _PreprocessCommand: Pointer;
-
-function PreprocessCommand;
-begin
- GetProcedureAddress(_PreprocessCommand, netsh, 'PreprocessCommand');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PreprocessCommand]
- end;
-end;
-
-var
- _RegisterContext: Pointer;
-
-function RegisterContext;
-begin
- GetProcedureAddress(_RegisterContext, netsh, 'RegisterContext');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RegisterContext]
- end;
-end;
-
-var
- _RegisterHelper: Pointer;
-
-function RegisterHelper;
-begin
- GetProcedureAddress(_RegisterHelper, netsh, 'RegisterHelper');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RegisterHelper]
- end;
-end;
-
-{$ELSE}
-
-function GetHostMachineInfo; external netsh name 'GetHostMachineInfo';
-function MatchEnumTag; external netsh name 'MatchEnumTag';
-function MatchToken; external netsh name 'MatchToken';
-function PreprocessCommand; external netsh name 'PreprocessCommand';
-function RegisterContext; external netsh name 'RegisterContext';
-function RegisterHelper; external netsh name 'RegisterHelper';
-
-{$ENDIF DYNAMIC_LINK}
-
-end.
+{******************************************************************************}
+{ }
+{ Net Shell API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: netsh.h, released August 2001. The original Pascal }
+{ code is: NetSh.pas, released December 2001. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwanetsh.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaNetSh;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "netsh.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaWinNT, JwaWinType;
+
+// This file contains definitions which are needed by all NetSh helper DLLs.
+
+//
+// Error codes
+//
+
+const
+ NETSH_ERROR_BASE = 15000;
+ {$EXTERNALSYM NETSH_ERROR_BASE}
+ ERROR_NO_ENTRIES = NETSH_ERROR_BASE + 0;
+ {$EXTERNALSYM ERROR_NO_ENTRIES}
+ ERROR_INVALID_SYNTAX = NETSH_ERROR_BASE + 1;
+ {$EXTERNALSYM ERROR_INVALID_SYNTAX}
+ ERROR_PROTOCOL_NOT_IN_TRANSPORT = NETSH_ERROR_BASE + 2;
+ {$EXTERNALSYM ERROR_PROTOCOL_NOT_IN_TRANSPORT}
+ ERROR_NO_CHANGE = NETSH_ERROR_BASE + 3;
+ {$EXTERNALSYM ERROR_NO_CHANGE}
+ ERROR_CMD_NOT_FOUND = NETSH_ERROR_BASE + 4;
+ {$EXTERNALSYM ERROR_CMD_NOT_FOUND}
+ ERROR_ENTRY_PT_NOT_FOUND = NETSH_ERROR_BASE + 5;
+ {$EXTERNALSYM ERROR_ENTRY_PT_NOT_FOUND}
+ ERROR_DLL_LOAD_FAILED = NETSH_ERROR_BASE + 6;
+ {$EXTERNALSYM ERROR_DLL_LOAD_FAILED}
+ ERROR_INIT_DISPLAY = NETSH_ERROR_BASE + 7;
+ {$EXTERNALSYM ERROR_INIT_DISPLAY}
+ ERROR_TAG_ALREADY_PRESENT = NETSH_ERROR_BASE + 8;
+ {$EXTERNALSYM ERROR_TAG_ALREADY_PRESENT}
+ ERROR_INVALID_OPTION_TAG = NETSH_ERROR_BASE + 9;
+ {$EXTERNALSYM ERROR_INVALID_OPTION_TAG}
+ ERROR_NO_TAG = NETSH_ERROR_BASE + 10;
+ {$EXTERNALSYM ERROR_NO_TAG}
+ ERROR_MISSING_OPTION = NETSH_ERROR_BASE + 11;
+ {$EXTERNALSYM ERROR_MISSING_OPTION}
+ ERROR_TRANSPORT_NOT_PRESENT = NETSH_ERROR_BASE + 12;
+ {$EXTERNALSYM ERROR_TRANSPORT_NOT_PRESENT}
+ ERROR_SHOW_USAGE = NETSH_ERROR_BASE + 13;
+ {$EXTERNALSYM ERROR_SHOW_USAGE}
+ ERROR_INVALID_OPTION_VALUE = NETSH_ERROR_BASE + 14;
+ {$EXTERNALSYM ERROR_INVALID_OPTION_VALUE}
+ ERROR_OKAY = NETSH_ERROR_BASE + 15;
+ {$EXTERNALSYM ERROR_OKAY}
+ ERROR_CONTINUE_IN_PARENT_CONTEXT = NETSH_ERROR_BASE + 16;
+ {$EXTERNALSYM ERROR_CONTINUE_IN_PARENT_CONTEXT}
+ ERROR_SUPPRESS_OUTPUT = NETSH_ERROR_BASE + 17;
+ {$EXTERNALSYM ERROR_SUPPRESS_OUTPUT}
+ ERROR_HELPER_ALREADY_REGISTERED = NETSH_ERROR_BASE + 18;
+ {$EXTERNALSYM ERROR_HELPER_ALREADY_REGISTERED}
+ ERROR_CONTEXT_ALREADY_REGISTERED = NETSH_ERROR_BASE + 19;
+ {$EXTERNALSYM ERROR_CONTEXT_ALREADY_REGISTERED}
+ NETSH_ERROR_END = ERROR_CONTEXT_ALREADY_REGISTERED;
+ {$EXTERNALSYM NETSH_ERROR_END}
+
+// Flags
+
+type
+ NS_CMD_FLAGS = DWORD;
+ {$EXTERNALSYM NS_CMD_FLAGS}
+ TNsCmdFlags = NS_CMD_FLAGS;
+
+const
+ CMD_FLAG_PRIVATE = $01; // not valid in sub-contexts
+ {$EXTERNALSYM CMD_FLAG_PRIVATE}
+ CMD_FLAG_INTERACTIVE = $02; // not valid from outside netsh
+ {$EXTERNALSYM CMD_FLAG_INTERACTIVE}
+ CMD_FLAG_LOCAL = $08; // not valid from a remote machine
+ {$EXTERNALSYM CMD_FLAG_LOCAL}
+ CMD_FLAG_ONLINE = $10; // not valid in offline/non-commit mode
+ {$EXTERNALSYM CMD_FLAG_ONLINE}
+ CMD_FLAG_HIDDEN = $20; // hide from help but allow execution
+ {$EXTERNALSYM CMD_FLAG_HIDDEN}
+ CMD_FLAG_LIMIT_MASK = $ffff;
+ {$EXTERNALSYM CMD_FLAG_LIMIT_MASK}
+ CMD_FLAG_PRIORITY = DWORD($80000000); // ulPriority field is used
+ {$EXTERNALSYM CMD_FLAG_PRIORITY}
+
+type
+ NS_REQS = (
+ NS_REQ_ZERO,
+ NS_REQ_PRESENT,
+ NS_REQ_ALLOW_MULTIPLE,
+ NS_REQ_ONE_OR_MORE);
+ {$EXTERNALSYM NS_REQS}
+ TNsReqs = NS_REQS;
+
+ NS_EVENTS = DWORD;
+ {$EXTERNALSYM NS_EVENTS}
+ TNsEvents = NS_EVENTS;
+
+const
+ NS_EVENT_LOOP = $00010000;
+ {$EXTERNALSYM NS_EVENT_LOOP}
+ NS_EVENT_LAST_N = $00000001;
+ {$EXTERNALSYM NS_EVENT_LAST_N}
+ NS_EVENT_LAST_SECS = $00000002;
+ {$EXTERNALSYM NS_EVENT_LAST_SECS}
+ NS_EVENT_FROM_N = $00000004;
+ {$EXTERNALSYM NS_EVENT_FROM_N}
+ NS_EVENT_FROM_START = $00000008;
+ {$EXTERNALSYM NS_EVENT_FROM_START}
+
+type
+ NS_MODE_CHANGE = (
+ NETSH_COMMIT,
+ NETSH_UNCOMMIT,
+ NETSH_FLUSH,
+ NETSH_COMMIT_STATE,
+ NETSH_SAVE);
+ {$EXTERNALSYM NS_MODE_CHANGE}
+ TNsModeChange = NS_MODE_CHANGE;
+
+const
+ NS_GET_EVENT_IDS_FN_NAME = 'GetEventIds';
+ {$EXTERNALSYM NS_GET_EVENT_IDS_FN_NAME}
+
+// todo where is MAX_DLL_NAME
+// MAX_NAME_LEN = MAX_DLL_NAME;
+// {$EXTERNALSYM MAX_NAME_LEN}
+
+ NETSH_VERSION_50 = $0005000;
+ {$EXTERNALSYM NETSH_VERSION_50}
+
+ NETSH_ARG_DELIMITER = WideString('=');
+ {$EXTERNALSYM NETSH_ARG_DELIMITER}
+ NETSH_CMD_DELIMITER = WideString(' ');
+ {$EXTERNALSYM NETSH_CMD_DELIMITER}
+
+ NETSH_MAX_TOKEN_LENGTH = 64;
+ {$EXTERNALSYM NETSH_MAX_TOKEN_LENGTH}
+ NETSH_MAX_CMD_TOKEN_LENGTH = 128;
+ {$EXTERNALSYM NETSH_MAX_CMD_TOKEN_LENGTH}
+
+ NETSH_ROOT_GUID: TGUID = (
+ D1: 0; D2: 0; D3: 0; D4: (0, 0, 0, 0, 0, 0, 0, 0));
+ {$EXTERNALSYM NETSH_ROOT_GUID}
+
+ DEFAULT_CONTEXT_PRIORITY = 100;
+ {$EXTERNALSYM DEFAULT_CONTEXT_PRIORITY}
+
+type
+ PTOKEN_VALUE = ^TOKEN_VALUE;
+ {$EXTERNALSYM PTOKEN_VALUE}
+ _TOKEN_VALUE = record
+ pwszToken: LPCWSTR; // literal token string
+ dwValue: DWORD; // ID of info string
+ end;
+ {$EXTERNALSYM _TOKEN_VALUE}
+ TOKEN_VALUE = _TOKEN_VALUE;
+ {$EXTERNALSYM TOKEN_VALUE}
+ TTokenValue = TOKEN_VALUE;
+ PTokenValue = PTOKEN_VALUE;
+
+// Macros
+
+(* TODO
+#define CREATE_CMD_ENTRY(t,f) {CMD_##t, f, HLP_##t, HLP_##t##_EX, CMD_FLAG_PRIVATE, NULL}
+#define CREATE_CMD_ENTRY_EX(t,f,i) {CMD_##t, f, HLP_##t, HLP_##t##_EX, i, NULL}
+#define CREATE_CMD_ENTRY_EX_VER(t,f,i,v) {CMD_##t, f, HLP_##t, HLP_##t##_EX, i, v}
+
+#define CREATE_CMD_GROUP_ENTRY(t,s) {CMD_##t, HLP_##t, sizeof(s)/sizeof(CMD_ENTRY), 0, s, NULL }
+#define CREATE_CMD_GROUP_ENTRY_EX(t,s,i) {CMD_##t, HLP_##t, sizeof(s)/sizeof(CMD_ENTRY), i, s, NULL }
+#define CREATE_CMD_GROUP_ENTRY_EX_VER(t,s,i,v) {CMD_##t, HLP_##t, sizeof(s)/sizeof(CMD_ENTRY), i, s, v }
+
+#define NUM_TOKENS_IN_TABLE(TokenArray) sizeof(TokenArray)/sizeof(TOKEN_VALUE)
+#define NUM_TAGS_IN_TABLE(TagsArray) sizeof(TagsArray)/sizeof(TAG_TYPE)
+*)
+
+// Callbacks
+
+type
+ NS_CONTEXT_COMMIT_FN = function(dwAction: DWORD): DWORD; stdcall;
+ {$EXTERNALSYM NS_CONTEXT_COMMIT_FN}
+ PNS_CONTEXT_COMMIT_FN = ^NS_CONTEXT_COMMIT_FN;
+ {$EXTERNALSYM PNS_CONTEXT_COMMIT_FN}
+ TNsContextCommitFn = NS_CONTEXT_COMMIT_FN;
+ PNsContextCommitFn = PNS_CONTEXT_COMMIT_FN;
+
+ NS_CONTEXT_CONNECT_FN = function(pwszMachine: LPCWSTR): DWORD; stdcall;
+ {$EXTERNALSYM NS_CONTEXT_CONNECT_FN}
+ PNS_CONTEXT_CONNECT_FN = ^NS_CONTEXT_CONNECT_FN;
+ {$EXTERNALSYM PNS_CONTEXT_CONNECT_FN}
+ TNsContextConnextFn = NS_CONTEXT_CONNECT_FN;
+ PNsContextConnextFn = PNS_CONTEXT_CONNECT_FN;
+
+ NS_CONTEXT_DUMP_FN = function(pwszRouter: LPCWSTR; var ppwcArguments: LPWSTR; dwArgCount: DWORD; pvData: LPCVOID): DWORD; stdcall;
+ {$EXTERNALSYM NS_CONTEXT_DUMP_FN}
+ PNS_CONTEXT_DUMP_FN = ^NS_CONTEXT_DUMP_FN;
+ {$EXTERNALSYM PNS_CONTEXT_DUMP_FN}
+ TNsContextDumpFn = NS_CONTEXT_DUMP_FN;
+ PNsContextDumpFn = PNS_CONTEXT_DUMP_FN;
+
+ NS_DLL_STOP_FN = function(dwReserved: DWORD): DWORD; stdcall;
+ {$EXTERNALSYM NS_DLL_STOP_FN}
+ PNS_DLL_STOP_FN = ^NS_DLL_STOP_FN;
+ {$EXTERNALSYM PNS_DLL_STOP_FN}
+ TNsDllStopFn = NS_DLL_STOP_FN;
+ PNsDllStopFn = PNS_DLL_STOP_FN;
+
+ NS_HELPER_START_FN = function(const pguidParent: TGUID; dwVersion: DWORD): DWORD; stdcall;
+ {$EXTERNALSYM NS_HELPER_START_FN}
+ PNS_HELPER_START_FN = NS_HELPER_START_FN;
+ {$EXTERNALSYM PNS_HELPER_START_FN}
+ TNsHelperStartFn = NS_HELPER_START_FN;
+ PNsHelperStartFn = PNS_HELPER_START_FN;
+
+ NS_HELPER_STOP_FN = function(dwReserved: DWORD): DWORD; stdcall;
+ {$EXTERNALSYM NS_HELPER_STOP_FN}
+ PNS_HELPER_STOP_FN = ^NS_HELPER_STOP_FN;
+ {$EXTERNALSYM PNS_HELPER_STOP_FN}
+ TNsHelperStopFn = NS_HELPER_STOP_FN;
+ PNsHelperStopFn = PNS_HELPER_STOP_FN;
+
+ FN_HANDLE_CMD = function(pwszMachine: LPCWSTR; var ppwcArguments: LPWSTR; dwCurrentIndex, dwArgCount,
+ dwFlags: DWORD; pvData: LPCVOID; var pbDone: BOOL): DWORD; stdcall;
+ {$EXTERNALSYM FN_HANDLE_CMD}
+ PFN_HANDLE_CMD = ^FN_HANDLE_CMD;
+ {$EXTERNALSYM PFN_HANDLE_CMD}
+ TFnHandleCmd = FN_HANDLE_CMD;
+ PFnHandleCmd = PFN_HANDLE_CMD;
+
+ NS_OSVERSIONCHECK = function(CIMOSType, CIMOSProductSuite: UINT; CIMOSVersion, CIMOSBuildNumber, CIMServicePackMajorVersion,
+ CIMServicePackMinorVersion: LPCWSTR; CIMProcessorArchitecture: UINT; dwReserved: DWORD): BOOL; stdcall;
+ {$EXTERNALSYM NS_OSVERSIONCHECK}
+ PNS_OSVERSIONCHECK = ^NS_OSVERSIONCHECK;
+ {$EXTERNALSYM PNS_OSVERSIONCHECK}
+ TNsOSVersionCheck = NS_OSVERSIONCHECK;
+ PNsOSVersionCheck = PNS_OSVERSIONCHECK;
+
+// Structures
+
+ _NS_HELPER_ATTRIBUTES = record
+ Union: record
+ case Integer of
+ 0: (
+ dwVersion: DWORD;
+ dwReserved: DWORD);
+ 1: (
+ _ullAlign: ULONGLONG);
+ end;
+ guidHelper: TGUID; // GUID associated with the helper
+ pfnStart: PNS_HELPER_START_FN; // Function to start this helper
+ pfnStop: PNS_HELPER_STOP_FN; // Function to stop this helper
+ end;
+ {$EXTERNALSYM _NS_HELPER_ATTRIBUTES}
+ NS_HELPER_ATTRIBUTES = _NS_HELPER_ATTRIBUTES;
+ {$EXTERNALSYM NS_HELPER_ATTRIBUTES}
+ PNS_HELPER_ATTRIBUTES = ^NS_HELPER_ATTRIBUTES;
+ {$EXTERNALSYM PNS_HELPER_ATTRIBUTES}
+ TNsHelperAttributes = NS_HELPER_ATTRIBUTES;
+ PNsHelperAttributes = PNS_HELPER_ATTRIBUTES;
+
+ PCMD_ENTRY = ^CMD_ENTRY;
+ {$EXTERNALSYM PCMD_ENTRY}
+ _CMD_ENTRY = record
+ pwszCmdToken: LPCWSTR; // The token for the command
+ pfnCmdHandler: PFN_HANDLE_CMD; // The function which handles this command
+ dwShortCmdHelpToken: DWORD; // The short help message
+ dwCmdHlpToken: DWORD; // The message to display if the only thing after the command is a help token (HELP, /?, -?, ?)
+ dwFlags: DWORD; // Flags (see CMD_FLAGS_xxx above)
+ pOsVersionCheck: PNS_OSVERSIONCHECK; // Check for the version of the OS this command can run against
+ end;
+ {$EXTERNALSYM _CMD_ENTRY}
+ CMD_ENTRY = _CMD_ENTRY;
+ {$EXTERNALSYM CMD_ENTRY}
+ TCmdEntry = CMD_ENTRY;
+ PCmdEntry = PCMD_ENTRY;
+
+ PCMD_GROUP_ENTRY = ^CMD_GROUP_ENTRY;
+ {$EXTERNALSYM PCMD_GROUP_ENTRY}
+ _CMD_GROUP_ENTRY = record
+ pwszCmdGroupToken: LPCWSTR; // The token for the command verb
+ dwShortCmdHelpToken: DWORD; // The message to display in a command listing.
+ ulCmdGroupSize: ULONG; // The number of entries in the cmd table
+ dwFlags: DWORD; // Flags (see CMD_FLAG_xxx)
+ pCmdGroup: PCMD_ENTRY; // The command table
+ pOsVersionCheck: PNS_OSVERSIONCHECK; // Check for the version of the OS this command can run against
+ end;
+ {$EXTERNALSYM _CMD_GROUP_ENTRY}
+ CMD_GROUP_ENTRY = _CMD_GROUP_ENTRY;
+ {$EXTERNALSYM CMD_GROUP_ENTRY}
+ TCmdGroupEntry = CMD_GROUP_ENTRY;
+ PCmdGroupEntry = PCMD_GROUP_ENTRY;
+
+ _NS_CONTEXT_ATTRIBUTES = record
+ Union: record
+ case Integer of
+ 0: (
+ dwVersion: DWORD;
+ dwReserved: DWORD);
+ 1: (
+ _ullAlign: ULONGLONG);
+ end;
+ pwszContext: LPWSTR; // Name of the context
+ guidHelper: TGUID; // GUID of the helper servicing this context
+ dwFlags: DWORD; // Flags limiting when context is available. (See CMD_FLAG_xxx)
+ ulPriority: ULONG; // Priority field is only relevant if CMD_FLAG_PRIORITY is set in dwFlags
+ ulNumTopCmds: ULONG; // Number of top-level commands
+ pTopCmds: PCMD_ENTRY; // Array of top-level commands
+ ulNumGroups: ULONG; // Number of command groups
+ pCmdGroups: PCMD_GROUP_ENTRY; // Array of command groups
+
+ pfnCommitFn: PNS_CONTEXT_COMMIT_FN;
+ pfnDumpFn: PNS_CONTEXT_DUMP_FN;
+ pfnConnectFn: PNS_CONTEXT_CONNECT_FN;
+ pReserved: PVOID;
+ pfnOsVersionCheck: PNS_OSVERSIONCHECK;
+ end;
+ {$EXTERNALSYM _NS_CONTEXT_ATTRIBUTES}
+ NS_CONTEXT_ATTRIBUTES = _NS_CONTEXT_ATTRIBUTES;
+ {$EXTERNALSYM NS_CONTEXT_ATTRIBUTES}
+ PNS_CONTEXT_ATTRIBUTES = ^NS_CONTEXT_ATTRIBUTES;
+ {$EXTERNALSYM PNS_CONTEXT_ATTRIBUTES}
+ TNsContextAttributes = NS_CONTEXT_ATTRIBUTES;
+ PNsContextAttributes = PNS_CONTEXT_ATTRIBUTES;
+
+ PCNS_CONTEXT_ATTRIBUTES = ^_NS_CONTEXT_ATTRIBUTES;
+ {$EXTERNALSYM PCNS_CONTEXT_ATTRIBUTES}
+
+ PTAG_TYPE = ^TAG_TYPE;
+ {$EXTERNALSYM PTAG_TYPE}
+ _TAG_TYPE = record
+ pwszTag: LPCWSTR; // tag string
+ dwRequired: DWORD; // required or not
+ bPresent: BOOL; // present or not
+ end;
+ {$EXTERNALSYM _TAG_TYPE}
+ TAG_TYPE = _TAG_TYPE;
+ {$EXTERNALSYM TAG_TYPE}
+ TTagType = TAG_TYPE;
+ PTagType = PTAG_TYPE;
+
+type
+ NS_DLL_INIT_FN = function(dwNetshVersion: DWORD; pReserved: PVOID): DWORD; stdcall;
+ {$EXTERNALSYM NS_DLL_INIT_FN}
+ PNS_DLL_INIT_FN = ^NS_DLL_INIT_FN;
+ {$EXTERNALSYM PNS_DLL_INIT_FN}
+ TNdDllInitFn = NS_DLL_INIT_FN;
+ PNdDllInitFn = PNS_DLL_INIT_FN;
+
+// Exports
+
+function GetHostMachineInfo(var puiCIMOSType, puiCIMOSProductSuite: UINT; pszCIMOSVersion, pszCIMOSBuildNumber,
+ pszCIMServicePackMajorVersion, pszCIMServicePackMinorVersion: LPWSTR; var puiCIMProcessorArchitecture: UINT): DWORD; stdcall;
+{$EXTERNALSYM GetHostMachineInfo}
+function MatchEnumTag(hModule: HANDLE; pwcArg: LPCWSTR; dwNumArg: DWORD; pEnumTable: PTOKEN_VALUE; pdwValue: PDWORD): DWORD; stdcall;
+{$EXTERNALSYM MatchEnumTag}
+function MatchToken(pwszUserToken, pwszCmdToken: LPCWSTR): BOOL; stdcall;
+{$EXTERNALSYM MatchToken}
+function PreprocessCommand(hModule: HANDLE; var ppwcArguments: LPWSTR; dwCurrentIndex, dwArgCount: DWORD; pttTags: PTAG_TYPE;
+ dwTagCount, dwMinArgs, dwMaxArgs: DWORD; var pdwTagType: DWORD): DWORD; stdcall;
+{$EXTERNALSYM PreprocessCommand}
+
+(* TODO
+DWORD PrintError(
+ IN HANDLE hModule, OPTIONAL
+ IN DWORD dwErrId,
+ ...
+ );
+
+DWORD PrintMessageFromModule(
+ IN HANDLE hModule,
+ IN DWORD dwMsgId,
+ ...
+ );
+
+DWORD PrintMessage(
+ IN LPCWSTR pwszFormat,
+ ...
+ );
+*)
+
+function RegisterContext(pChildContext: PNS_CONTEXT_ATTRIBUTES): DWORD; stdcall;
+{$EXTERNALSYM RegisterContext}
+function RegisterHelper(const pguidParentContext: TGUID; pfnRegisterSubContext: PNS_HELPER_ATTRIBUTES): DWORD; stdcall;
+{$EXTERNALSYM RegisterHelper}
+
+implementation
+
+const
+ netsh = 'netsh.exe';
+
+{$IFDEF DYNAMIC_LINK}
+
+var
+ _GetHostMachineInfo: Pointer;
+
+function GetHostMachineInfo;
+begin
+ GetProcedureAddress(_GetHostMachineInfo, netsh, 'GetHostMachineInfo');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetHostMachineInfo]
+ end;
+end;
+
+var
+ _MatchEnumTag: Pointer;
+
+function MatchEnumTag;
+begin
+ GetProcedureAddress(_MatchEnumTag, netsh, 'MatchEnumTag');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MatchEnumTag]
+ end;
+end;
+
+var
+ _MatchToken: Pointer;
+
+function MatchToken;
+begin
+ GetProcedureAddress(_MatchToken, netsh, 'MatchToken');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MatchToken]
+ end;
+end;
+
+var
+ _PreprocessCommand: Pointer;
+
+function PreprocessCommand;
+begin
+ GetProcedureAddress(_PreprocessCommand, netsh, 'PreprocessCommand');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PreprocessCommand]
+ end;
+end;
+
+var
+ _RegisterContext: Pointer;
+
+function RegisterContext;
+begin
+ GetProcedureAddress(_RegisterContext, netsh, 'RegisterContext');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RegisterContext]
+ end;
+end;
+
+var
+ _RegisterHelper: Pointer;
+
+function RegisterHelper;
+begin
+ GetProcedureAddress(_RegisterHelper, netsh, 'RegisterHelper');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RegisterHelper]
+ end;
+end;
+
+{$ELSE}
+
+function GetHostMachineInfo; external netsh name 'GetHostMachineInfo';
+function MatchEnumTag; external netsh name 'MatchEnumTag';
+function MatchToken; external netsh name 'MatchToken';
+function PreprocessCommand; external netsh name 'PreprocessCommand';
+function RegisterContext; external netsh name 'RegisterContext';
+function RegisterHelper; external netsh name 'RegisterHelper';
+
+{$ENDIF DYNAMIC_LINK}
+
+end.
diff --git a/packages/extra/winunits/jwanspapi.pas b/packages/extra/winunits/jwanspapi.pas
index e0117b7aaa..de6a361045 100644
--- a/packages/extra/winunits/jwanspapi.pas
+++ b/packages/extra/winunits/jwanspapi.pas
@@ -1,1204 +1,1204 @@
-{******************************************************************************}
-{ }
-{ Winsock2 Namespace API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: nspapi.h, released June 2000. The original Pascal }
-{ code is: NspApi.pas, released December 2000. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwanspapi.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaNspAPI;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "nspapi.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaWinType, JwaWinSock2;
-
-//
-// Service categories
-//
-
-const
- SERVICE_RESOURCE = $00000001;
- {$EXTERNALSYM SERVICE_RESOURCE}
- SERVICE_SERVICE = $00000002;
- {$EXTERNALSYM SERVICE_SERVICE}
- SERVICE_LOCAL = $00000004;
- {$EXTERNALSYM SERVICE_LOCAL}
-
-//
-// Operation used when calling SetService()
-//
-
- SERVICE_REGISTER = $00000001;
- {$EXTERNALSYM SERVICE_REGISTER}
- SERVICE_DEREGISTER = $00000002;
- {$EXTERNALSYM SERVICE_DEREGISTER}
- SERVICE_FLUSH = $00000003;
- {$EXTERNALSYM SERVICE_FLUSH}
- SERVICE_ADD_TYPE = $00000004;
- {$EXTERNALSYM SERVICE_ADD_TYPE}
- SERVICE_DELETE_TYPE = $00000005;
- {$EXTERNALSYM SERVICE_DELETE_TYPE}
-
-//
-// Flags that affect the operations above
-//
-
- SERVICE_FLAG_DEFER = $00000001;
- {$EXTERNALSYM SERVICE_FLAG_DEFER}
- SERVICE_FLAG_HARD = $00000002;
- {$EXTERNALSYM SERVICE_FLAG_HARD}
-
-//
-// Used as input to GetService() for setting the dwProps parameter
-//
-
- PROP_COMMENT = $00000001;
- {$EXTERNALSYM PROP_COMMENT}
- PROP_LOCALE = $00000002;
- {$EXTERNALSYM PROP_LOCALE}
- PROP_DISPLAY_HINT = $00000004;
- {$EXTERNALSYM PROP_DISPLAY_HINT}
- PROP_VERSION = $00000008;
- {$EXTERNALSYM PROP_VERSION}
- PROP_START_TIME = $00000010;
- {$EXTERNALSYM PROP_START_TIME}
- PROP_MACHINE = $00000020;
- {$EXTERNALSYM PROP_MACHINE}
- PROP_ADDRESSES = $00000100;
- {$EXTERNALSYM PROP_ADDRESSES}
- PROP_SD = $00000200;
- {$EXTERNALSYM PROP_SD}
- PROP_ALL = DWORD($80000000);
- {$EXTERNALSYM PROP_ALL}
-
-//
-// Flags that describe attributes of Service Addresses
-//
-
- SERVICE_ADDRESS_FLAG_RPC_CN = $00000001;
- {$EXTERNALSYM SERVICE_ADDRESS_FLAG_RPC_CN}
- SERVICE_ADDRESS_FLAG_RPC_DG = $00000002;
- {$EXTERNALSYM SERVICE_ADDRESS_FLAG_RPC_DG}
- SERVICE_ADDRESS_FLAG_RPC_NB = $00000004;
- {$EXTERNALSYM SERVICE_ADDRESS_FLAG_RPC_NB}
-
-//
-// Name Spaces
-//
-
- NS_DEFAULT = 0;
- {$EXTERNALSYM NS_DEFAULT}
-
- NS_SAP = 1;
- {$EXTERNALSYM NS_SAP}
- NS_NDS = 2;
- {$EXTERNALSYM NS_NDS}
- NS_PEER_BROWSE = 3;
- {$EXTERNALSYM NS_PEER_BROWSE}
-
- NS_TCPIP_LOCAL = 10;
- {$EXTERNALSYM NS_TCPIP_LOCAL}
- NS_TCPIP_HOSTS = 11;
- {$EXTERNALSYM NS_TCPIP_HOSTS}
- NS_DNS = 12;
- {$EXTERNALSYM NS_DNS}
- NS_NETBT = 13;
- {$EXTERNALSYM NS_NETBT}
- NS_WINS = 14;
- {$EXTERNALSYM NS_WINS}
-
- NS_NBP = 20;
- {$EXTERNALSYM NS_NBP}
-
- NS_MS = 30;
- {$EXTERNALSYM NS_MS}
- NS_STDA = 31;
- {$EXTERNALSYM NS_STDA}
- NS_NTDS = 32;
- {$EXTERNALSYM NS_NTDS}
-
- NS_X500 = 40;
- {$EXTERNALSYM NS_X500}
- NS_NIS = 41;
- {$EXTERNALSYM NS_NIS}
-
- NS_VNS = 50;
- {$EXTERNALSYM NS_VNS}
-
-//
-// Name space attributes.
-//
-
- NSTYPE_HIERARCHICAL = $00000001;
- {$EXTERNALSYM NSTYPE_HIERARCHICAL}
- NSTYPE_DYNAMIC = $00000002;
- {$EXTERNALSYM NSTYPE_DYNAMIC}
- NSTYPE_ENUMERABLE = $00000004;
- {$EXTERNALSYM NSTYPE_ENUMERABLE}
- NSTYPE_WORKGROUP = $00000008;
- {$EXTERNALSYM NSTYPE_WORKGROUP}
-
-//
-// Transport attributes.
-//
-
- XP_CONNECTIONLESS = $00000001;
- {$EXTERNALSYM XP_CONNECTIONLESS}
- XP_GUARANTEED_DELIVERY = $00000002;
- {$EXTERNALSYM XP_GUARANTEED_DELIVERY}
- XP_GUARANTEED_ORDER = $00000004;
- {$EXTERNALSYM XP_GUARANTEED_ORDER}
- XP_MESSAGE_ORIENTED = $00000008;
- {$EXTERNALSYM XP_MESSAGE_ORIENTED}
- XP_PSEUDO_STREAM = $00000010;
- {$EXTERNALSYM XP_PSEUDO_STREAM}
- XP_GRACEFUL_CLOSE = $00000020;
- {$EXTERNALSYM XP_GRACEFUL_CLOSE}
- XP_EXPEDITED_DATA = $00000040;
- {$EXTERNALSYM XP_EXPEDITED_DATA}
- XP_CONNECT_DATA = $00000080;
- {$EXTERNALSYM XP_CONNECT_DATA}
- XP_DISCONNECT_DATA = $00000100;
- {$EXTERNALSYM XP_DISCONNECT_DATA}
- XP_SUPPORTS_BROADCAST = $00000200;
- {$EXTERNALSYM XP_SUPPORTS_BROADCAST}
- XP_SUPPORTS_MULTICAST = $00000400;
- {$EXTERNALSYM XP_SUPPORTS_MULTICAST}
- XP_BANDWIDTH_ALLOCATION = $00000800;
- {$EXTERNALSYM XP_BANDWIDTH_ALLOCATION}
- XP_FRAGMENTATION = $00001000;
- {$EXTERNALSYM XP_FRAGMENTATION}
- XP_ENCRYPTS = $00002000;
- {$EXTERNALSYM XP_ENCRYPTS}
-
-//
-// Resolution flags for GetAddressByName().
-//
-
- RES_SOFT_SEARCH = $00000001;
- {$EXTERNALSYM RES_SOFT_SEARCH}
- RES_FIND_MULTIPLE = $00000002;
- {$EXTERNALSYM RES_FIND_MULTIPLE}
- RES_SERVICE = $00000004;
- {$EXTERNALSYM RES_SERVICE}
-
-//
-// Well known value names for Service Types
-//
-
- SERVICE_TYPE_VALUE_SAPIDA = 'SapId';
- {$EXTERNALSYM SERVICE_TYPE_VALUE_SAPIDA}
- SERVICE_TYPE_VALUE_SAPIDW = WideString('SapId');
- {$EXTERNALSYM SERVICE_TYPE_VALUE_SAPIDW}
-
- SERVICE_TYPE_VALUE_CONNA = 'ConnectionOriented';
- {$EXTERNALSYM SERVICE_TYPE_VALUE_CONNA}
- SERVICE_TYPE_VALUE_CONNW = WideString('ConnectionOriented');
- {$EXTERNALSYM SERVICE_TYPE_VALUE_CONNW}
-
- SERVICE_TYPE_VALUE_TCPPORTA = 'TcpPort';
- {$EXTERNALSYM SERVICE_TYPE_VALUE_TCPPORTA}
- SERVICE_TYPE_VALUE_TCPPORTW = WideString('TcpPort');
- {$EXTERNALSYM SERVICE_TYPE_VALUE_TCPPORTW}
-
- SERVICE_TYPE_VALUE_UDPPORTA = 'UdpPort';
- {$EXTERNALSYM SERVICE_TYPE_VALUE_UDPPORTA}
- SERVICE_TYPE_VALUE_UDPPORTW = WideString('UdpPort');
- {$EXTERNALSYM SERVICE_TYPE_VALUE_UDPPORTW}
-
- {$IFDEF UNICODE}
- SERVICE_TYPE_VALUE_SAPID = SERVICE_TYPE_VALUE_SAPIDW;
- {$EXTERNALSYM SERVICE_TYPE_VALUE_SAPID}
- SERVICE_TYPE_VALUE_CONN = SERVICE_TYPE_VALUE_CONNW;
- {$EXTERNALSYM SERVICE_TYPE_VALUE_CONN}
- SERVICE_TYPE_VALUE_TCPPORT = SERVICE_TYPE_VALUE_TCPPORTW;
- {$EXTERNALSYM SERVICE_TYPE_VALUE_TCPPORT}
- SERVICE_TYPE_VALUE_UDPPORT = SERVICE_TYPE_VALUE_UDPPORTW;
- {$EXTERNALSYM SERVICE_TYPE_VALUE_UDPPORT}
- {$ELSE}
- SERVICE_TYPE_VALUE_SAPID = SERVICE_TYPE_VALUE_SAPIDA;
- {$EXTERNALSYM SERVICE_TYPE_VALUE_SAPID}
- SERVICE_TYPE_VALUE_CONN = SERVICE_TYPE_VALUE_CONNA;
- {$EXTERNALSYM SERVICE_TYPE_VALUE_CONN}
- SERVICE_TYPE_VALUE_TCPPORT = SERVICE_TYPE_VALUE_TCPPORTA;
- {$EXTERNALSYM SERVICE_TYPE_VALUE_TCPPORT}
- SERVICE_TYPE_VALUE_UDPPORT = SERVICE_TYPE_VALUE_UDPPORTA;
- {$EXTERNALSYM SERVICE_TYPE_VALUE_UDPPORT}
- {$ENDIF UNICODE}
-
-//
-// status flags returned by SetService
-//
-
- SET_SERVICE_PARTIAL_SUCCESS = $00000001;
- {$EXTERNALSYM SET_SERVICE_PARTIAL_SUCCESS}
-
-//
-// Name Space Information
-//
-
-type
- _NS_INFOA = record
- dwNameSpace: DWORD;
- dwNameSpaceFlags: DWORD;
- lpNameSpace: LPSTR;
- end;
- {$EXTERNALSYM _NS_INFOA}
- NS_INFOA = _NS_INFOA;
- {$EXTERNALSYM NS_INFOA}
- PNS_INFOA = ^NS_INFOA;
- {$EXTERNALSYM PNS_INFOA}
- LPNS_INFOA = ^NS_INFOA;
- {$EXTERNALSYM LPNS_INFOA}
- TNsInfoA = NS_INFOA;
- PNsInfoA = LPNS_INFOA;
-
-//
-// Name Space Information
-//
-
- _NS_INFOW = record
- dwNameSpace: DWORD;
- dwNameSpaceFlags: DWORD;
- lpNameSpace: LPWSTR;
- end;
- {$EXTERNALSYM _NS_INFOW}
- NS_INFOW = _NS_INFOW;
- {$EXTERNALSYM NS_INFOW}
- PNS_INFOW = ^NS_INFOW;
- {$EXTERNALSYM PNS_INFOW}
- LPNS_INFOW = ^NS_INFOW;
- {$EXTERNALSYM LPNS_INFOW}
- TNsInfoW = NS_INFOW;
- PNsInfoW = LPNS_INFOW;
-
- {$IFDEF UNICODE}
- NS_INFO = NS_INFOW;
- {$EXTERNALSYM NS_INFO}
- PNS_INFO = PNS_INFOW;
- {$EXTERNALSYM PNS_INFO}
- LPNS_INFO = LPNS_INFOW;
- {$EXTERNALSYM LPNS_INFO}
- TNsInfo = TNsInfoW;
- PNsInfo = PNsInfoW;
- {$ELSE}
- NS_INFO = NS_INFOA;
- {$EXTERNALSYM NS_INFO}
- PNS_INFO = PNS_INFOA;
- {$EXTERNALSYM PNS_INFO}
- LPNS_INFO = LPNS_INFOA;
- {$EXTERNALSYM LPNS_INFO}
- TNsInfo = TNsInfoA;
- PNsInfo = PNsInfoA;
- {$ENDIF UNICODE}
-
-//
-// Service Type Values. The structures are used to define named Service
-// Type specific values. This structure is self relative and has no pointers.
-//
-
- LPSERVICE_TYPE_VALUE = ^SERVICE_TYPE_VALUE;
- {$EXTERNALSYM LPSERVICE_TYPE_VALUE}
- PSERVICE_TYPE_VALUE = ^SERVICE_TYPE_VALUE;
- {$EXTERNALSYM PSERVICE_TYPE_VALUE}
- _SERVICE_TYPE_VALUE = record
- dwNameSpace: DWORD;
- dwValueType: DWORD;
- dwValueSize: DWORD;
- dwValueNameOffset: DWORD;
- dwValueOffset: DWORD;
- end;
- {$EXTERNALSYM _SERVICE_TYPE_VALUE}
- SERVICE_TYPE_VALUE = _SERVICE_TYPE_VALUE;
- {$EXTERNALSYM SERVICE_TYPE_VALUE}
- TServiceTypeValue = SERVICE_TYPE_VALUE;
- PServiceTypeValue = LPSERVICE_TYPE_VALUE;
-
-//
-// An absolute version of above. This structure does contain pointers.
-//
-
- LPSERVICE_TYPE_VALUE_ABSA = ^SERVICE_TYPE_VALUE_ABSA;
- {$EXTERNALSYM LPSERVICE_TYPE_VALUE_ABSA}
- PSERVICE_TYPE_VALUE_ABSA = ^SERVICE_TYPE_VALUE_ABSA;
- {$EXTERNALSYM PSERVICE_TYPE_VALUE_ABSA}
- _SERVICE_TYPE_VALUE_ABSA = record
- dwNameSpace: DWORD;
- dwValueType: DWORD;
- dwValueSize: DWORD;
- lpValueName: LPSTR;
- lpValue: LPVOID;
- end;
- {$EXTERNALSYM _SERVICE_TYPE_VALUE_ABSA}
- SERVICE_TYPE_VALUE_ABSA = _SERVICE_TYPE_VALUE_ABSA;
- {$EXTERNALSYM SERVICE_TYPE_VALUE_ABSA}
- TServiceTypeValueAbsA = SERVICE_TYPE_VALUE_ABSA;
- PServiceTypeValueAbsA = LPSERVICE_TYPE_VALUE_ABSA;
-
-//
-// An absolute version of above. This structure does contain pointers.
-//
-
- LPSERVICE_TYPE_VALUE_ABSW = ^SERVICE_TYPE_VALUE_ABSW;
- {$EXTERNALSYM LPSERVICE_TYPE_VALUE_ABSW}
- PSERVICE_TYPE_VALUE_ABSW = ^SERVICE_TYPE_VALUE_ABSW;
- {$EXTERNALSYM PSERVICE_TYPE_VALUE_ABSW}
- _SERVICE_TYPE_VALUE_ABSW = record
- dwNameSpace: DWORD;
- dwValueType: DWORD;
- dwValueSize: DWORD;
- lpValueName: LPWSTR;
- lpValue: LPVOID;
- end;
- {$EXTERNALSYM _SERVICE_TYPE_VALUE_ABSW}
- SERVICE_TYPE_VALUE_ABSW = _SERVICE_TYPE_VALUE_ABSW;
- {$EXTERNALSYM SERVICE_TYPE_VALUE_ABSW}
- TServiceTypeValueAbsW = SERVICE_TYPE_VALUE_ABSW;
- PServiceTypeValueAbsW = LPSERVICE_TYPE_VALUE_ABSW;
-
- {$IFDEF UNICODE}
- SERVICE_TYPE_VALUE_ABS = SERVICE_TYPE_VALUE_ABSW;
- {$EXTERNALSYM SERVICE_TYPE_VALUE_ABS}
- PSERVICE_TYPE_VALUE_ABS = PSERVICE_TYPE_VALUE_ABSW;
- {$EXTERNALSYM PSERVICE_TYPE_VALUE_ABS}
- LPSERVICE_TYPE_VALUE_ABS = LPSERVICE_TYPE_VALUE_ABSW;
- {$EXTERNALSYM LPSERVICE_TYPE_VALUE_ABS}
- TServiceTypeValueAbs = TServiceTypeValueAbsW;
- PServiceTypeValueAbs = PServiceTypeValueAbsW;
- {$ELSE}
- SERVICE_TYPE_VALUE_ABS = SERVICE_TYPE_VALUE_ABSA;
- {$EXTERNALSYM SERVICE_TYPE_VALUE_ABS}
- PSERVICE_TYPE_VALUE_ABS = PSERVICE_TYPE_VALUE_ABSA;
- {$EXTERNALSYM PSERVICE_TYPE_VALUE_ABS}
- LPSERVICE_TYPE_VALUE_ABS = LPSERVICE_TYPE_VALUE_ABSA;
- {$EXTERNALSYM LPSERVICE_TYPE_VALUE_ABS}
- TServiceTypeValueAbs = TServiceTypeValueAbsA;
- PServiceTypeValueAbs = PServiceTypeValueAbsA;
- {$ENDIF UNICODE}
-
-//
-// Service Type Information. Contains the name of the Service Type and
-// and an array of SERVICE_NS_TYPE_VALUE structures. This structure is self
-// relative and has no pointers in it.
-//
-
- LPSERVICE_TYPE_INFO = ^SERVICE_TYPE_INFO;
- {$EXTERNALSYM LPSERVICE_TYPE_INFO}
- PSERVICE_TYPE_INFO = ^SERVICE_TYPE_INFO;
- {$EXTERNALSYM PSERVICE_TYPE_INFO}
- _SERVICE_TYPE_INFO = record
- dwTypeNameOffset: DWORD;
- dwValueCount: DWORD;
- Values: array [0..0] of SERVICE_TYPE_VALUE;
- end;
- {$EXTERNALSYM _SERVICE_TYPE_INFO}
- SERVICE_TYPE_INFO = _SERVICE_TYPE_INFO;
- {$EXTERNALSYM SERVICE_TYPE_INFO}
- TServiceTypeInfo = SERVICE_TYPE_INFO;
- PServiceTypeInfo = LPSERVICE_TYPE_INFO;
-
- LPSERVICE_TYPE_INFO_ABSA = ^SERVICE_TYPE_INFO_ABSA;
- {$EXTERNALSYM LPSERVICE_TYPE_INFO_ABSA}
- PSERVICE_TYPE_INFO_ABSA = ^SERVICE_TYPE_INFO_ABSA;
- {$EXTERNALSYM PSERVICE_TYPE_INFO_ABSA}
- _SERVICE_TYPE_INFO_ABSA = record
- lpTypeName: LPSTR;
- dwValueCount: DWORD;
- Values: array [0..0] of SERVICE_TYPE_VALUE_ABSA;
- end;
- {$EXTERNALSYM _SERVICE_TYPE_INFO_ABSA}
- SERVICE_TYPE_INFO_ABSA = _SERVICE_TYPE_INFO_ABSA;
- {$EXTERNALSYM SERVICE_TYPE_INFO_ABSA}
- TServiceTypeInfoAbsA = SERVICE_TYPE_INFO_ABSA;
- PServiceTypeInfoAbsA = PSERVICE_TYPE_INFO_ABSA;
-
- LPSERVICE_TYPE_INFO_ABSW = ^SERVICE_TYPE_INFO_ABSW;
- {$EXTERNALSYM LPSERVICE_TYPE_INFO_ABSW}
- PSERVICE_TYPE_INFO_ABSW = ^SERVICE_TYPE_INFO_ABSW;
- {$EXTERNALSYM PSERVICE_TYPE_INFO_ABSW}
- _SERVICE_TYPE_INFO_ABSW = record
- lpTypeName: LPWSTR;
- dwValueCount: DWORD;
- Values: array [0..0] of SERVICE_TYPE_VALUE_ABSW;
- end;
- {$EXTERNALSYM _SERVICE_TYPE_INFO_ABSW}
- SERVICE_TYPE_INFO_ABSW = _SERVICE_TYPE_INFO_ABSW;
- {$EXTERNALSYM SERVICE_TYPE_INFO_ABSW}
- TServiceTypeInfoAbsW = SERVICE_TYPE_INFO_ABSW;
- PServiceTypeInfoAbsW = LPSERVICE_TYPE_INFO_ABSW;
-
- {$IFDEF UNICODE}
- SERVICE_TYPE_INFO_ABS = SERVICE_TYPE_INFO_ABSW;
- {$EXTERNALSYM SERVICE_TYPE_INFO_ABS}
- PSERVICE_TYPE_INFO_ABS = PSERVICE_TYPE_INFO_ABSW;
- {$EXTERNALSYM PSERVICE_TYPE_INFO_ABS}
- LPSERVICE_TYPE_INFO_ABS = LPSERVICE_TYPE_INFO_ABSW;
- {$EXTERNALSYM LPSERVICE_TYPE_INFO_ABS}
- TServiceTypeInfoAbs = TServiceTypeInfoAbsW;
- PServiceTypeInfoAbs = PServiceTypeInfoAbsW;
- {$ELSE}
- SERVICE_TYPE_INFO_ABS = SERVICE_TYPE_INFO_ABSA;
- {$EXTERNALSYM SERVICE_TYPE_INFO_ABS}
- PSERVICE_TYPE_INFO_ABS = PSERVICE_TYPE_INFO_ABSA;
- {$EXTERNALSYM PSERVICE_TYPE_INFO_ABS}
- LPSERVICE_TYPE_INFO_ABS = LPSERVICE_TYPE_INFO_ABSA;
- {$EXTERNALSYM LPSERVICE_TYPE_INFO_ABS}
- TServiceTypeInfoAbs = TServiceTypeInfoAbsA;
- PServiceTypeInfoAbs = PServiceTypeInfoAbsA;
- {$ENDIF UNICODE}
-
-//
-// A Single Address definition.
-//
-
- LPSERVICE_ADDRESS = ^SERVICE_ADDRESS;
- {$EXTERNALSYM LPSERVICE_ADDRESS}
- PSERVICE_ADDRESS = ^SERVICE_ADDRESS;
- {$EXTERNALSYM PSERVICE_ADDRESS}
- _SERVICE_ADDRESS = record
- dwAddressType: DWORD;
- dwAddressFlags: DWORD;
- dwAddressLength: DWORD;
- dwPrincipalLength: DWORD;
- lpAddress: LPBYTE;
- lpPrincipal: LPBYTE;
- end;
- {$EXTERNALSYM _SERVICE_ADDRESS}
- SERVICE_ADDRESS = _SERVICE_ADDRESS;
- {$EXTERNALSYM SERVICE_ADDRESS}
- TServiceAddress = SERVICE_ADDRESS;
- PServiceAddress = LPSERVICE_ADDRESS;
-
-//
-// Addresses used by the service. Contains array of SERVICE_ADDRESS.
-//
-
- LPSERVICE_ADDRESSES = ^SERVICE_ADDRESSES;
- {$EXTERNALSYM LPSERVICE_ADDRESSES}
- PSERVICE_ADDRESSES = ^SERVICE_ADDRESSES;
- {$EXTERNALSYM PSERVICE_ADDRESSES}
- _SERVICE_ADDRESSES = record
- dwAddressCount: DWORD;
- Addresses: array [0..0] of SERVICE_ADDRESS;
- end;
- {$EXTERNALSYM _SERVICE_ADDRESSES}
- SERVICE_ADDRESSES = _SERVICE_ADDRESSES;
- {$EXTERNALSYM SERVICE_ADDRESSES}
- TServiceAddresses = SERVICE_ADDRESSES;
- PServiceAddresses = PSERVICE_ADDRESSES;
-
-//
-// Service Information.
-//
-
- LPSERVICE_INFOA = ^SERVICE_INFOA;
- {$EXTERNALSYM LPSERVICE_INFOA}
- PSERVICE_INFOA = ^SERVICE_INFOA;
- {$EXTERNALSYM PSERVICE_INFOA}
- _SERVICE_INFOA = record
- lpServiceType: PGUID;
- lpServiceName: LPSTR;
- lpComment: LPSTR;
- lpLocale: LPSTR;
- dwDisplayHint: DWORD;
- dwVersion: DWORD;
- dwTime: DWORD;
- lpMachineName: LPSTR;
- lpServiceAddress: LPSERVICE_ADDRESSES;
- ServiceSpecificInfo: BLOB;
- end;
- {$EXTERNALSYM _SERVICE_INFOA}
- SERVICE_INFOA = _SERVICE_INFOA;
- {$EXTERNALSYM SERVICE_INFOA}
- TServiceInfoA = SERVICE_INFOA;
- PServiceInfoA = PSERVICE_INFOA;
-
-//
-// Service Information.
-//
-
- LPSERVICE_INFOW = ^SERVICE_INFOW;
- {$EXTERNALSYM LPSERVICE_INFOW}
- PSERVICE_INFOW = ^SERVICE_INFOW;
- {$EXTERNALSYM PSERVICE_INFOW}
- _SERVICE_INFOW = record
- lpServiceType: PGUID;
- lpServiceName: LPWSTR;
- lpComment: LPWSTR;
- lpLocale: LPWSTR;
- dwDisplayHint: DWORD;
- dwVersion: DWORD;
- dwTime: DWORD;
- lpMachineName: LPWSTR;
- lpServiceAddress: LPSERVICE_ADDRESSES;
- ServiceSpecificInfo: BLOB;
- end;
- {$EXTERNALSYM _SERVICE_INFOW}
- SERVICE_INFOW = _SERVICE_INFOW;
- {$EXTERNALSYM SERVICE_INFOW}
- TServiceInfoW = SERVICE_INFOW;
- PServiceInfoW = PSERVICE_INFOW;
-
- {$IFDEF UNICODE}
- SERVICE_INFO = SERVICE_INFOW;
- {$EXTERNALSYM SERVICE_INFO}
- PSERVICE_INFO = PSERVICE_INFOW;
- {$EXTERNALSYM PSERVICE_INFO}
- LPSERVICE_INFO = LPSERVICE_INFOW;
- {$EXTERNALSYM LPSERVICE_INFO}
- TServiceInfo = TServiceInfoW;
- PServiceInfo = PServiceInfoW;
- {$ELSE}
- SERVICE_INFO = SERVICE_INFOA;
- {$EXTERNALSYM SERVICE_INFO}
- PSERVICE_INFO = PSERVICE_INFOA;
- {$EXTERNALSYM PSERVICE_INFO}
- LPSERVICE_INFO = LPSERVICE_INFOA;
- {$EXTERNALSYM LPSERVICE_INFO}
- TServiceInfo = TServiceInfoA;
- PServiceInfo = PServiceInfoA;
- {$ENDIF UNICODE}
-
-//
-// Name Space & Service Information
-//
-
- LPNS_SERVICE_INFOA = ^NS_SERVICE_INFOA;
- {$EXTERNALSYM LPNS_SERVICE_INFOA}
- PNS_SERVICE_INFOA = ^NS_SERVICE_INFOA;
- {$EXTERNALSYM PNS_SERVICE_INFOA}
- _NS_SERVICE_INFOA = record
- dwNameSpace: DWORD;
- ServiceInfo: SERVICE_INFOA;
- end;
- {$EXTERNALSYM _NS_SERVICE_INFOA}
- NS_SERVICE_INFOA = _NS_SERVICE_INFOA;
- {$EXTERNALSYM NS_SERVICE_INFOA}
- TNsServiceInfoA = NS_SERVICE_INFOA;
- PNsServiceInfoA = LPNS_SERVICE_INFOA;
-
-//
-// Name Space & Service Information
-//
-
- LPNS_SERVICE_INFOW = ^NS_SERVICE_INFOW;
- {$EXTERNALSYM LPNS_SERVICE_INFOW}
- PNS_SERVICE_INFOW = ^NS_SERVICE_INFOW;
- {$EXTERNALSYM PNS_SERVICE_INFOW}
- _NS_SERVICE_INFOW = record
- dwNameSpace: DWORD;
- ServiceInfo: SERVICE_INFOW;
- end;
- {$EXTERNALSYM _NS_SERVICE_INFOW}
- NS_SERVICE_INFOW = _NS_SERVICE_INFOW;
- {$EXTERNALSYM NS_SERVICE_INFOW}
- TNsServiceInfoW = NS_SERVICE_INFOW;
- PNsServiceInfoW = LPNS_SERVICE_INFOW;
-
- {$IFDEF UNICODE}
- NS_SERVICE_INFO = NS_SERVICE_INFOW;
- {$EXTERNALSYM NS_SERVICE_INFO}
- PNS_SERVICE_INFO = PNS_SERVICE_INFOW;
- {$EXTERNALSYM PNS_SERVICE_INFO}
- LPNS_SERVICE_INFO = LPNS_SERVICE_INFOW;
- {$EXTERNALSYM LPNS_SERVICE_INFO}
- TNsServiceInfo = TNsServiceInfoW;
- PNsServiceInfo = PNsServiceInfoW;
- {$ELSE}
- NS_SERVICE_INFO = NS_SERVICE_INFOA;
- {$EXTERNALSYM NS_SERVICE_INFO}
- PNS_SERVICE_INFO = PNS_SERVICE_INFOA;
- {$EXTERNALSYM PNS_SERVICE_INFO}
- LPNS_SERVICE_INFO = LPNS_SERVICE_INFOA;
- {$EXTERNALSYM LPNS_SERVICE_INFO}
- TNsServiceInfo = TNsServiceInfoA;
- PNsServiceInfo = PNsServiceInfoA;
- {$ENDIF UNICODE}
-
-//
-// SockAddr Information
-//
-
- LPSOCKET_ADDRESS = ^SOCKET_ADDRESS;
- {$EXTERNALSYM LPSOCKET_ADDRESS}
- PSOCKET_ADDRESS = ^SOCKET_ADDRESS;
- {$EXTERNALSYM PSOCKET_ADDRESS}
- _SOCKET_ADDRESS = record
- lpSockaddr: LPSOCKADDR;
- iSockaddrLength: Integer;
- end;
- {$EXTERNALSYM _SOCKET_ADDRESS}
- SOCKET_ADDRESS = _SOCKET_ADDRESS;
- {$EXTERNALSYM SOCKET_ADDRESS}
- TSocketAddress = SOCKET_ADDRESS;
- PSocketAddress = PSOCKET_ADDRESS;
-
-//
-// CSAddr Information
-//
-
- LPCSADDR_INFO = ^CSADDR_INFO;
- {$EXTERNALSYM LPCSADDR_INFO}
- PCSADDR_INFO = ^CSADDR_INFO;
- {$EXTERNALSYM PCSADDR_INFO}
- _CSADDR_INFO = record
- LocalAddr: SOCKET_ADDRESS;
- RemoteAddr: SOCKET_ADDRESS;
- iSocketType: Integer;
- iProtocol: Integer;
- end;
- {$EXTERNALSYM _CSADDR_INFO}
- CSADDR_INFO = _CSADDR_INFO;
- {$EXTERNALSYM CSADDR_INFO}
- TCsAddrInfo = CSADDR_INFO;
- PCsAddrInfo = LPCSADDR_INFO;
-
-//
-// Protocol Information
-//
-
- LPPROTOCOL_INFOA = ^PROTOCOL_INFOA;
- {$EXTERNALSYM LPPROTOCOL_INFOA}
- PPROTOCOL_INFOA = ^PROTOCOL_INFOA;
- {$EXTERNALSYM PPROTOCOL_INFOA}
- _PROTOCOL_INFOA = record
- dwServiceFlags: DWORD;
- iAddressFamily: Integer;
- iMaxSockAddr: Integer;
- iMinSockAddr: Integer;
- iSocketType: Integer;
- iProtocol: Integer;
- dwMessageSize: DWORD;
- lpProtocol: LPSTR;
- end;
- {$EXTERNALSYM _PROTOCOL_INFOA}
- PROTOCOL_INFOA = _PROTOCOL_INFOA;
- {$EXTERNALSYM PROTOCOL_INFOA}
- TProtocolInfoA = PROTOCOL_INFOA;
- PProtocolInfoA = LPPROTOCOL_INFOA;
-
-//
-// Protocol Information
-//
-
- LPPROTOCOL_INFOW = ^PROTOCOL_INFOW;
- {$EXTERNALSYM LPPROTOCOL_INFOW}
- PPROTOCOL_INFOW = ^PROTOCOL_INFOW;
- {$EXTERNALSYM PPROTOCOL_INFOW}
- _PROTOCOL_INFOW = record
- dwServiceFlags: DWORD;
- iAddressFamily: Integer;
- iMaxSockAddr: Integer;
- iMinSockAddr: Integer;
- iSocketType: Integer;
- iProtocol: Integer;
- dwMessageSize: DWORD;
- lpProtocol: LPWSTR;
- end;
- {$EXTERNALSYM _PROTOCOL_INFOW}
- PROTOCOL_INFOW = _PROTOCOL_INFOW;
- {$EXTERNALSYM PROTOCOL_INFOW}
- TProtocolInfoW = PROTOCOL_INFOW;
- PProtocolInfoW = LPPROTOCOL_INFOW;
-
- {$IFDEF UNICODE}
- PROTOCOL_INFO = PROTOCOL_INFOW;
- {$EXTERNALSYM PROTOCOL_INFO}
- PPROTOCOL_INFO = PPROTOCOL_INFOW;
- {$EXTERNALSYM PPROTOCOL_INFO}
- LPPROTOCOL_INFO = LPPROTOCOL_INFOW;
- {$EXTERNALSYM LPPROTOCOL_INFO}
- TProtocolInfo = TProtocolInfoW;
- PProtocolInfo = PProtocolInfoW;
- {$ELSE}
- PROTOCOL_INFO = PROTOCOL_INFOA;
- {$EXTERNALSYM PROTOCOL_INFO}
- PPROTOCOL_INFO = PPROTOCOL_INFOA;
- {$EXTERNALSYM PPROTOCOL_INFO}
- LPPROTOCOL_INFO = LPPROTOCOL_INFOA;
- {$EXTERNALSYM LPPROTOCOL_INFO}
- TProtocolInfo = TProtocolInfoA;
- PProtocolInfo = PProtocolInfoA;
- {$ENDIF UNICODE}
-
-//
-// NETRESOURCE2 Structure
-//
-
- LPNETRESOURCE2A = ^NETRESOURCE2A;
- {$EXTERNALSYM LPNETRESOURCE2A}
- PNETRESOURCE2A = ^NETRESOURCE2A;
- {$EXTERNALSYM PNETRESOURCE2A}
- _NETRESOURCE2A = record
- dwScope: DWORD;
- dwType: DWORD;
- dwUsage: DWORD;
- dwDisplayType: DWORD;
- lpLocalName: LPSTR;
- lpRemoteName: LPSTR;
- lpComment: LPSTR;
- ns_info: NS_INFO;
- ServiceType: TGUID;
- dwProtocols: DWORD;
- lpiProtocols: PINT;
- end;
- {$EXTERNALSYM _NETRESOURCE2A}
- NETRESOURCE2A = _NETRESOURCE2A;
- {$EXTERNALSYM NETRESOURCE2A}
- TNetResource2A = NETRESOURCE2A;
-
-//
-// NETRESOURCE2 Structure
-//
-
- LPNETRESOURCE2W = ^NETRESOURCE2W;
- {$EXTERNALSYM LPNETRESOURCE2W}
- PNETRESOURCE2W = ^NETRESOURCE2W;
- {$EXTERNALSYM PNETRESOURCE2W}
- _NETRESOURCE2W = record
- dwScope: DWORD;
- dwType: DWORD;
- dwUsage: DWORD;
- dwDisplayType: DWORD;
- lpLocalName: LPWSTR;
- lpRemoteName: LPWSTR;
- lpComment: LPWSTR;
- ns_info: NS_INFO;
- ServiceType: TGUID;
- dwProtocols: DWORD;
- lpiProtocols: PINT;
- end;
- {$EXTERNALSYM _NETRESOURCE2W}
- NETRESOURCE2W = _NETRESOURCE2W;
- {$EXTERNALSYM NETRESOURCE2W}
- TNetResource2W = NETRESOURCE2W;
-
- {$IFDEF UNICODE}
- NETRESOURCE2 = NETRESOURCE2W;
- {$EXTERNALSYM NETRESOURCE2}
- PNETRESOURCE2 = PNETRESOURCE2W;
- {$EXTERNALSYM PNETRESOURCE2}
- LPNETRESOURCE2 = LPNETRESOURCE2W;
- {$EXTERNALSYM LPNETRESOURCE2}
- TNetResource2 = TNetResource2W;
- {$ELSE}
- NETRESOURCE2 = NETRESOURCE2A;
- {$EXTERNALSYM NETRESOURCE2}
- PNETRESOURCE2 = PNETRESOURCE2A;
- {$EXTERNALSYM PNETRESOURCE2}
- LPNETRESOURCE2 = LPNETRESOURCE2A;
- {$EXTERNALSYM LPNETRESOURCE2}
- TNetResource2 = TNetResource2A;
- {$ENDIF UNICODE}
-
- LPFN_NSPAPI = function: DWORD; stdcall;
- {$EXTERNALSYM LPFN_NSPAPI}
- TFnNspApi = LPFN_NSPAPI;
-
-//
-// Structures for using the service routines asynchronously.
-//
-
-type
- LPSERVICE_CALLBACK_PROC = procedure(lParam: LPARAM; hAsyncTaskHandle: HANDLE); stdcall;
- {$EXTERNALSYM LPSERVICE_CALLBACK_PROC}
- TServiceCallbackProc = LPSERVICE_CALLBACK_PROC;
-
-type
- LPSERVICE_ASYNC_INFO = ^SERVICE_ASYNC_INFO;
- {$EXTERNALSYM LPSERVICE_ASYNC_INFO}
- PSERVICE_ASYNC_INFO = ^SERVICE_ASYNC_INFO;
- {$EXTERNALSYM PSERVICE_ASYNC_INFO}
- _SERVICE_ASYNC_INFO = record
- lpServiceCallbackProc: LPSERVICE_CALLBACK_PROC;
- lParam: LPARAM;
- hAsyncTaskHandle: HANDLE;
- end;
- {$EXTERNALSYM _SERVICE_ASYNC_INFO}
- SERVICE_ASYNC_INFO = _SERVICE_ASYNC_INFO;
- {$EXTERNALSYM SERVICE_ASYNC_INFO}
- TServiceAsyncInfo = SERVICE_ASYNC_INFO;
- PServiceAsyncInfo = LPSERVICE_ASYNC_INFO;
-
-//
-// Public NSP API prototypes.
-//
-
-function EnumProtocolsA(lpiProtocols: PINT; lpProtocolBuffer: LPVOID; lpdwBufferLength: LPDWORD): Integer; stdcall;
-{$EXTERNALSYM EnumProtocolsA}
-function EnumProtocolsW(lpiProtocols: PINT; lpProtocolBuffer: LPVOID; lpdwBufferLength: LPDWORD): Integer; stdcall;
-{$EXTERNALSYM EnumProtocolsW}
-function EnumProtocols(lpiProtocols: PINT; lpProtocolBuffer: LPVOID; lpdwBufferLength: LPDWORD): Integer; stdcall;
-{$EXTERNALSYM EnumProtocols}
-
-function GetAddressByNameA(dwNameSpace: DWORD; const lpServiceType: TGUID;
- lpServiceName: LPSTR; lpiProtocols: PINT; dwResolution: DWORD;
- lpServiceAsyncInfo: LPSERVICE_ASYNC_INFO; lpCsaddrBuffer: LPVOID;
- var lpdwBufferLength: DWORD; lpAliasBuffer: LPSTR; lpdwAliasBufferLength: LPDWORD): Integer; stdcall;
-{$EXTERNALSYM GetAddressByNameA}
-function GetAddressByNameW(dwNameSpace: DWORD; const lpServiceType: TGUID;
- lpServiceName: LPWSTR; lpiProtocols: PINT; dwResolution: DWORD;
- lpServiceAsyncInfo: LPSERVICE_ASYNC_INFO; lpCsaddrBuffer: LPVOID;
- var lpdwBufferLength: DWORD; lpAliasBuffer: LPWSTR; lpdwAliasBufferLength: LPDWORD): Integer; stdcall;
-{$EXTERNALSYM GetAddressByNameW}
-function GetAddressByName(dwNameSpace: DWORD; const lpServiceType: TGUID;
- lpServiceName: LPTSTR; lpiProtocols: PINT; dwResolution: DWORD;
- lpServiceAsyncInfo: LPSERVICE_ASYNC_INFO; lpCsaddrBuffer: LPVOID;
- var lpdwBufferLength: DWORD; lpAliasBuffer: LPTSTR; lpdwAliasBufferLength: LPDWORD): Integer; stdcall;
-{$EXTERNALSYM GetAddressByName}
-
-function GetTypeByNameA(lpServiceName: LPSTR; var lpServiceType: TGUID): Integer; stdcall;
-{$EXTERNALSYM GetTypeByNameA}
-function GetTypeByNameW(lpServiceName: LPWSTR; var lpServiceType: TGUID): Integer; stdcall;
-{$EXTERNALSYM GetTypeByNameW}
-function GetTypeByName(lpServiceName: LPTSTR; var lpServiceType: TGUID): Integer; stdcall;
-{$EXTERNALSYM GetTypeByName}
-
-function GetNameByTypeA(const lpServiceType: TGUID; lpServiceName: LPSTR; dwNameLength: DWORD): Integer; stdcall;
-{$EXTERNALSYM GetNameByTypeA}
-function GetNameByTypeW(const lpServiceType: TGUID; lpServiceName: LPWSTR; dwNameLength: DWORD): Integer; stdcall;
-{$EXTERNALSYM GetNameByTypeW}
-function GetNameByType(const lpServiceType: TGUID; lpServiceName: LPTSTR; dwNameLength: DWORD): Integer; stdcall;
-{$EXTERNALSYM GetNameByType}
-
-function SetServiceA(dwNameSpace, dwOperation, dwFlags: DWORD;
- const lpServiceInfo: SERVICE_INFOA; lpServiceAsyncInfo: LPSERVICE_ASYNC_INFO;
- var lpdwStatusFlags: DWORD): Integer; stdcall;
-{$EXTERNALSYM SetServiceA}
-function SetServiceW(dwNameSpace, dwOperation, dwFlags: DWORD;
- const lpServiceInfo: SERVICE_INFOW; lpServiceAsyncInfo: LPSERVICE_ASYNC_INFO;
- var lpdwStatusFlags: DWORD): Integer; stdcall;
-{$EXTERNALSYM SetServiceW}
-function SetService(dwNameSpace, dwOperation, dwFlags: DWORD;
- const lpServiceInfo: SERVICE_INFO; lpServiceAsyncInfo: LPSERVICE_ASYNC_INFO;
- var lpdwStatusFlags: DWORD): Integer; stdcall;
-{$EXTERNALSYM SetService}
-
-function GetServiceA(dwNameSpace: DWORD; const lpGuid: TGUID; lpServiceName: LPSTR;
- dwProperties: DWORD; lpBuffer: LPVOID; var lpdwBufferSize: DWORD;
- lpServiceAsyncInfo: LPSERVICE_ASYNC_INFO): Integer; stdcall;
-{$EXTERNALSYM GetServiceA}
-function GetServiceW(dwNameSpace: DWORD; const lpGuid: TGUID; lpServiceName: LPWSTR;
- dwProperties: DWORD; lpBuffer: LPVOID; var lpdwBufferSize: DWORD;
- lpServiceAsyncInfo: LPSERVICE_ASYNC_INFO): Integer; stdcall;
-{$EXTERNALSYM GetServiceW}
-function GetService(dwNameSpace: DWORD; const lpGuid: TGUID; lpServiceName: LPTSTR;
- dwProperties: DWORD; lpBuffer: LPVOID; var lpdwBufferSize: DWORD;
- lpServiceAsyncInfo: LPSERVICE_ASYNC_INFO): Integer; stdcall;
-{$EXTERNALSYM GetService}
-
-implementation
-
-const
- nsplib = 'wsock32.dll';
- {$IFDEF UNICODE}
- AWSuffix = 'W';
- {$ELSE}
- AWSuffix = 'A';
- {$ENDIF UNICODE}
-
-{$IFDEF DYNAMIC_LINK}
-
-var
- _EnumProtocolsA: Pointer;
-
-function EnumProtocolsA;
-begin
- GetProcedureAddress(_EnumProtocolsA, nsplib, 'EnumProtocolsA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_EnumProtocolsA]
- end;
-end;
-
-var
- _EnumProtocolsW: Pointer;
-
-function EnumProtocolsW;
-begin
- GetProcedureAddress(_EnumProtocolsW, nsplib, 'EnumProtocolsW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_EnumProtocolsW]
- end;
-end;
-
-var
- _EnumProtocols: Pointer;
-
-function EnumProtocols;
-begin
- GetProcedureAddress(_EnumProtocols, nsplib, 'EnumProtocols' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_EnumProtocols]
- end;
-end;
-
-var
- _GetAddressByNameA: Pointer;
-
-function GetAddressByNameA;
-begin
- GetProcedureAddress(_GetAddressByNameA, nsplib, 'GetAddressByNameA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetAddressByNameA]
- end;
-end;
-
-var
- _GetAddressByNameW: Pointer;
-
-function GetAddressByNameW;
-begin
- GetProcedureAddress(_GetAddressByNameW, nsplib, 'GetAddressByNameW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetAddressByNameW]
- end;
-end;
-
-var
- _GetAddressByName: Pointer;
-
-function GetAddressByName;
-begin
- GetProcedureAddress(_GetAddressByName, nsplib, 'GetAddressByName' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetAddressByName]
- end;
-end;
-
-var
- _GetTypeByNameA: Pointer;
-
-function GetTypeByNameA;
-begin
- GetProcedureAddress(_GetTypeByNameA, nsplib, 'GetTypeByNameA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetTypeByNameA]
- end;
-end;
-
-var
- _GetTypeByNameW: Pointer;
-
-function GetTypeByNameW;
-begin
- GetProcedureAddress(_GetTypeByNameW, nsplib, 'GetTypeByNameW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetTypeByNameW]
- end;
-end;
-
-var
- _GetTypeByName: Pointer;
-
-function GetTypeByName;
-begin
- GetProcedureAddress(_GetTypeByName, nsplib, 'GetTypeByName' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetTypeByName]
- end;
-end;
-
-var
- _GetNameByTypeA: Pointer;
-
-function GetNameByTypeA;
-begin
- GetProcedureAddress(_GetNameByTypeA, nsplib, 'GetNameByTypeA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetNameByTypeA]
- end;
-end;
-
-var
- _GetNameByTypeW: Pointer;
-
-function GetNameByTypeW;
-begin
- GetProcedureAddress(_GetNameByTypeW, nsplib, 'GetNameByTypeW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetNameByTypeW]
- end;
-end;
-
-var
- _GetNameByType: Pointer;
-
-function GetNameByType;
-begin
- GetProcedureAddress(_GetNameByType, nsplib, 'GetNameByType' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetNameByType]
- end;
-end;
-
-var
- _SetServiceA: Pointer;
-
-function SetServiceA;
-begin
- GetProcedureAddress(_SetServiceA, nsplib, 'SetServiceA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetServiceA]
- end;
-end;
-
-var
- _SetServiceW: Pointer;
-
-function SetServiceW;
-begin
- GetProcedureAddress(_SetServiceW, nsplib, 'SetServiceW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetServiceW]
- end;
-end;
-
-var
- _SetService: Pointer;
-
-function SetService;
-begin
- GetProcedureAddress(_SetService, nsplib, 'SetService' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetService]
- end;
-end;
-
-var
- _GetServiceA: Pointer;
-
-function GetServiceA;
-begin
- GetProcedureAddress(_GetServiceA, nsplib, 'GetServiceA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetServiceA]
- end;
-end;
-
-var
- _GetServiceW: Pointer;
-
-function GetServiceW;
-begin
- GetProcedureAddress(_GetServiceW, nsplib, 'GetServiceW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetServiceW]
- end;
-end;
-
-var
- _GetService: Pointer;
-
-function GetService;
-begin
- GetProcedureAddress(_GetService, nsplib, 'GetService' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetService]
- end;
-end;
-
-{$ELSE}
-
-function EnumProtocolsA; external nsplib name 'EnumProtocolsA';
-function EnumProtocolsW; external nsplib name 'EnumProtocolsW';
-function EnumProtocols; external nsplib name 'EnumProtocols' + AWSuffix;
-function GetAddressByNameA; external nsplib name 'GetAddressByNameA';
-function GetAddressByNameW; external nsplib name 'GetAddressByNameW';
-function GetAddressByName; external nsplib name 'GetAddressByName' + AWSuffix;
-function GetTypeByNameA; external nsplib name 'GetTypeByNameA';
-function GetTypeByNameW; external nsplib name 'GetTypeByNameW';
-function GetTypeByName; external nsplib name 'GetTypeByName' + AWSuffix;
-function GetNameByTypeA; external nsplib name 'GetNameByTypeA';
-function GetNameByTypeW; external nsplib name 'GetNameByTypeW';
-function GetNameByType; external nsplib name 'GetNameByType' + AWSuffix;
-function SetServiceA; external nsplib name 'SetServiceA';
-function SetServiceW; external nsplib name 'SetServiceW';
-function SetService; external nsplib name 'SetService' + AWSuffix;
-function GetServiceA; external nsplib name 'GetServiceA';
-function GetServiceW; external nsplib name 'GetServiceW';
-function GetService; external nsplib name 'GetService' + AWSuffix;
-
-{$ENDIF DYNAMIC_LINK}
-
-end.
+{******************************************************************************}
+{ }
+{ Winsock2 Namespace API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: nspapi.h, released June 2000. The original Pascal }
+{ code is: NspApi.pas, released December 2000. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwanspapi.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaNspAPI;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "nspapi.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaWinType, JwaWinSock2;
+
+//
+// Service categories
+//
+
+const
+ SERVICE_RESOURCE = $00000001;
+ {$EXTERNALSYM SERVICE_RESOURCE}
+ SERVICE_SERVICE = $00000002;
+ {$EXTERNALSYM SERVICE_SERVICE}
+ SERVICE_LOCAL = $00000004;
+ {$EXTERNALSYM SERVICE_LOCAL}
+
+//
+// Operation used when calling SetService()
+//
+
+ SERVICE_REGISTER = $00000001;
+ {$EXTERNALSYM SERVICE_REGISTER}
+ SERVICE_DEREGISTER = $00000002;
+ {$EXTERNALSYM SERVICE_DEREGISTER}
+ SERVICE_FLUSH = $00000003;
+ {$EXTERNALSYM SERVICE_FLUSH}
+ SERVICE_ADD_TYPE = $00000004;
+ {$EXTERNALSYM SERVICE_ADD_TYPE}
+ SERVICE_DELETE_TYPE = $00000005;
+ {$EXTERNALSYM SERVICE_DELETE_TYPE}
+
+//
+// Flags that affect the operations above
+//
+
+ SERVICE_FLAG_DEFER = $00000001;
+ {$EXTERNALSYM SERVICE_FLAG_DEFER}
+ SERVICE_FLAG_HARD = $00000002;
+ {$EXTERNALSYM SERVICE_FLAG_HARD}
+
+//
+// Used as input to GetService() for setting the dwProps parameter
+//
+
+ PROP_COMMENT = $00000001;
+ {$EXTERNALSYM PROP_COMMENT}
+ PROP_LOCALE = $00000002;
+ {$EXTERNALSYM PROP_LOCALE}
+ PROP_DISPLAY_HINT = $00000004;
+ {$EXTERNALSYM PROP_DISPLAY_HINT}
+ PROP_VERSION = $00000008;
+ {$EXTERNALSYM PROP_VERSION}
+ PROP_START_TIME = $00000010;
+ {$EXTERNALSYM PROP_START_TIME}
+ PROP_MACHINE = $00000020;
+ {$EXTERNALSYM PROP_MACHINE}
+ PROP_ADDRESSES = $00000100;
+ {$EXTERNALSYM PROP_ADDRESSES}
+ PROP_SD = $00000200;
+ {$EXTERNALSYM PROP_SD}
+ PROP_ALL = DWORD($80000000);
+ {$EXTERNALSYM PROP_ALL}
+
+//
+// Flags that describe attributes of Service Addresses
+//
+
+ SERVICE_ADDRESS_FLAG_RPC_CN = $00000001;
+ {$EXTERNALSYM SERVICE_ADDRESS_FLAG_RPC_CN}
+ SERVICE_ADDRESS_FLAG_RPC_DG = $00000002;
+ {$EXTERNALSYM SERVICE_ADDRESS_FLAG_RPC_DG}
+ SERVICE_ADDRESS_FLAG_RPC_NB = $00000004;
+ {$EXTERNALSYM SERVICE_ADDRESS_FLAG_RPC_NB}
+
+//
+// Name Spaces
+//
+
+ NS_DEFAULT = 0;
+ {$EXTERNALSYM NS_DEFAULT}
+
+ NS_SAP = 1;
+ {$EXTERNALSYM NS_SAP}
+ NS_NDS = 2;
+ {$EXTERNALSYM NS_NDS}
+ NS_PEER_BROWSE = 3;
+ {$EXTERNALSYM NS_PEER_BROWSE}
+
+ NS_TCPIP_LOCAL = 10;
+ {$EXTERNALSYM NS_TCPIP_LOCAL}
+ NS_TCPIP_HOSTS = 11;
+ {$EXTERNALSYM NS_TCPIP_HOSTS}
+ NS_DNS = 12;
+ {$EXTERNALSYM NS_DNS}
+ NS_NETBT = 13;
+ {$EXTERNALSYM NS_NETBT}
+ NS_WINS = 14;
+ {$EXTERNALSYM NS_WINS}
+
+ NS_NBP = 20;
+ {$EXTERNALSYM NS_NBP}
+
+ NS_MS = 30;
+ {$EXTERNALSYM NS_MS}
+ NS_STDA = 31;
+ {$EXTERNALSYM NS_STDA}
+ NS_NTDS = 32;
+ {$EXTERNALSYM NS_NTDS}
+
+ NS_X500 = 40;
+ {$EXTERNALSYM NS_X500}
+ NS_NIS = 41;
+ {$EXTERNALSYM NS_NIS}
+
+ NS_VNS = 50;
+ {$EXTERNALSYM NS_VNS}
+
+//
+// Name space attributes.
+//
+
+ NSTYPE_HIERARCHICAL = $00000001;
+ {$EXTERNALSYM NSTYPE_HIERARCHICAL}
+ NSTYPE_DYNAMIC = $00000002;
+ {$EXTERNALSYM NSTYPE_DYNAMIC}
+ NSTYPE_ENUMERABLE = $00000004;
+ {$EXTERNALSYM NSTYPE_ENUMERABLE}
+ NSTYPE_WORKGROUP = $00000008;
+ {$EXTERNALSYM NSTYPE_WORKGROUP}
+
+//
+// Transport attributes.
+//
+
+ XP_CONNECTIONLESS = $00000001;
+ {$EXTERNALSYM XP_CONNECTIONLESS}
+ XP_GUARANTEED_DELIVERY = $00000002;
+ {$EXTERNALSYM XP_GUARANTEED_DELIVERY}
+ XP_GUARANTEED_ORDER = $00000004;
+ {$EXTERNALSYM XP_GUARANTEED_ORDER}
+ XP_MESSAGE_ORIENTED = $00000008;
+ {$EXTERNALSYM XP_MESSAGE_ORIENTED}
+ XP_PSEUDO_STREAM = $00000010;
+ {$EXTERNALSYM XP_PSEUDO_STREAM}
+ XP_GRACEFUL_CLOSE = $00000020;
+ {$EXTERNALSYM XP_GRACEFUL_CLOSE}
+ XP_EXPEDITED_DATA = $00000040;
+ {$EXTERNALSYM XP_EXPEDITED_DATA}
+ XP_CONNECT_DATA = $00000080;
+ {$EXTERNALSYM XP_CONNECT_DATA}
+ XP_DISCONNECT_DATA = $00000100;
+ {$EXTERNALSYM XP_DISCONNECT_DATA}
+ XP_SUPPORTS_BROADCAST = $00000200;
+ {$EXTERNALSYM XP_SUPPORTS_BROADCAST}
+ XP_SUPPORTS_MULTICAST = $00000400;
+ {$EXTERNALSYM XP_SUPPORTS_MULTICAST}
+ XP_BANDWIDTH_ALLOCATION = $00000800;
+ {$EXTERNALSYM XP_BANDWIDTH_ALLOCATION}
+ XP_FRAGMENTATION = $00001000;
+ {$EXTERNALSYM XP_FRAGMENTATION}
+ XP_ENCRYPTS = $00002000;
+ {$EXTERNALSYM XP_ENCRYPTS}
+
+//
+// Resolution flags for GetAddressByName().
+//
+
+ RES_SOFT_SEARCH = $00000001;
+ {$EXTERNALSYM RES_SOFT_SEARCH}
+ RES_FIND_MULTIPLE = $00000002;
+ {$EXTERNALSYM RES_FIND_MULTIPLE}
+ RES_SERVICE = $00000004;
+ {$EXTERNALSYM RES_SERVICE}
+
+//
+// Well known value names for Service Types
+//
+
+ SERVICE_TYPE_VALUE_SAPIDA = 'SapId';
+ {$EXTERNALSYM SERVICE_TYPE_VALUE_SAPIDA}
+ SERVICE_TYPE_VALUE_SAPIDW = WideString('SapId');
+ {$EXTERNALSYM SERVICE_TYPE_VALUE_SAPIDW}
+
+ SERVICE_TYPE_VALUE_CONNA = 'ConnectionOriented';
+ {$EXTERNALSYM SERVICE_TYPE_VALUE_CONNA}
+ SERVICE_TYPE_VALUE_CONNW = WideString('ConnectionOriented');
+ {$EXTERNALSYM SERVICE_TYPE_VALUE_CONNW}
+
+ SERVICE_TYPE_VALUE_TCPPORTA = 'TcpPort';
+ {$EXTERNALSYM SERVICE_TYPE_VALUE_TCPPORTA}
+ SERVICE_TYPE_VALUE_TCPPORTW = WideString('TcpPort');
+ {$EXTERNALSYM SERVICE_TYPE_VALUE_TCPPORTW}
+
+ SERVICE_TYPE_VALUE_UDPPORTA = 'UdpPort';
+ {$EXTERNALSYM SERVICE_TYPE_VALUE_UDPPORTA}
+ SERVICE_TYPE_VALUE_UDPPORTW = WideString('UdpPort');
+ {$EXTERNALSYM SERVICE_TYPE_VALUE_UDPPORTW}
+
+ {$IFDEF UNICODE}
+ SERVICE_TYPE_VALUE_SAPID = SERVICE_TYPE_VALUE_SAPIDW;
+ {$EXTERNALSYM SERVICE_TYPE_VALUE_SAPID}
+ SERVICE_TYPE_VALUE_CONN = SERVICE_TYPE_VALUE_CONNW;
+ {$EXTERNALSYM SERVICE_TYPE_VALUE_CONN}
+ SERVICE_TYPE_VALUE_TCPPORT = SERVICE_TYPE_VALUE_TCPPORTW;
+ {$EXTERNALSYM SERVICE_TYPE_VALUE_TCPPORT}
+ SERVICE_TYPE_VALUE_UDPPORT = SERVICE_TYPE_VALUE_UDPPORTW;
+ {$EXTERNALSYM SERVICE_TYPE_VALUE_UDPPORT}
+ {$ELSE}
+ SERVICE_TYPE_VALUE_SAPID = SERVICE_TYPE_VALUE_SAPIDA;
+ {$EXTERNALSYM SERVICE_TYPE_VALUE_SAPID}
+ SERVICE_TYPE_VALUE_CONN = SERVICE_TYPE_VALUE_CONNA;
+ {$EXTERNALSYM SERVICE_TYPE_VALUE_CONN}
+ SERVICE_TYPE_VALUE_TCPPORT = SERVICE_TYPE_VALUE_TCPPORTA;
+ {$EXTERNALSYM SERVICE_TYPE_VALUE_TCPPORT}
+ SERVICE_TYPE_VALUE_UDPPORT = SERVICE_TYPE_VALUE_UDPPORTA;
+ {$EXTERNALSYM SERVICE_TYPE_VALUE_UDPPORT}
+ {$ENDIF UNICODE}
+
+//
+// status flags returned by SetService
+//
+
+ SET_SERVICE_PARTIAL_SUCCESS = $00000001;
+ {$EXTERNALSYM SET_SERVICE_PARTIAL_SUCCESS}
+
+//
+// Name Space Information
+//
+
+type
+ _NS_INFOA = record
+ dwNameSpace: DWORD;
+ dwNameSpaceFlags: DWORD;
+ lpNameSpace: LPSTR;
+ end;
+ {$EXTERNALSYM _NS_INFOA}
+ NS_INFOA = _NS_INFOA;
+ {$EXTERNALSYM NS_INFOA}
+ PNS_INFOA = ^NS_INFOA;
+ {$EXTERNALSYM PNS_INFOA}
+ LPNS_INFOA = ^NS_INFOA;
+ {$EXTERNALSYM LPNS_INFOA}
+ TNsInfoA = NS_INFOA;
+ PNsInfoA = LPNS_INFOA;
+
+//
+// Name Space Information
+//
+
+ _NS_INFOW = record
+ dwNameSpace: DWORD;
+ dwNameSpaceFlags: DWORD;
+ lpNameSpace: LPWSTR;
+ end;
+ {$EXTERNALSYM _NS_INFOW}
+ NS_INFOW = _NS_INFOW;
+ {$EXTERNALSYM NS_INFOW}
+ PNS_INFOW = ^NS_INFOW;
+ {$EXTERNALSYM PNS_INFOW}
+ LPNS_INFOW = ^NS_INFOW;
+ {$EXTERNALSYM LPNS_INFOW}
+ TNsInfoW = NS_INFOW;
+ PNsInfoW = LPNS_INFOW;
+
+ {$IFDEF UNICODE}
+ NS_INFO = NS_INFOW;
+ {$EXTERNALSYM NS_INFO}
+ PNS_INFO = PNS_INFOW;
+ {$EXTERNALSYM PNS_INFO}
+ LPNS_INFO = LPNS_INFOW;
+ {$EXTERNALSYM LPNS_INFO}
+ TNsInfo = TNsInfoW;
+ PNsInfo = PNsInfoW;
+ {$ELSE}
+ NS_INFO = NS_INFOA;
+ {$EXTERNALSYM NS_INFO}
+ PNS_INFO = PNS_INFOA;
+ {$EXTERNALSYM PNS_INFO}
+ LPNS_INFO = LPNS_INFOA;
+ {$EXTERNALSYM LPNS_INFO}
+ TNsInfo = TNsInfoA;
+ PNsInfo = PNsInfoA;
+ {$ENDIF UNICODE}
+
+//
+// Service Type Values. The structures are used to define named Service
+// Type specific values. This structure is self relative and has no pointers.
+//
+
+ LPSERVICE_TYPE_VALUE = ^SERVICE_TYPE_VALUE;
+ {$EXTERNALSYM LPSERVICE_TYPE_VALUE}
+ PSERVICE_TYPE_VALUE = ^SERVICE_TYPE_VALUE;
+ {$EXTERNALSYM PSERVICE_TYPE_VALUE}
+ _SERVICE_TYPE_VALUE = record
+ dwNameSpace: DWORD;
+ dwValueType: DWORD;
+ dwValueSize: DWORD;
+ dwValueNameOffset: DWORD;
+ dwValueOffset: DWORD;
+ end;
+ {$EXTERNALSYM _SERVICE_TYPE_VALUE}
+ SERVICE_TYPE_VALUE = _SERVICE_TYPE_VALUE;
+ {$EXTERNALSYM SERVICE_TYPE_VALUE}
+ TServiceTypeValue = SERVICE_TYPE_VALUE;
+ PServiceTypeValue = LPSERVICE_TYPE_VALUE;
+
+//
+// An absolute version of above. This structure does contain pointers.
+//
+
+ LPSERVICE_TYPE_VALUE_ABSA = ^SERVICE_TYPE_VALUE_ABSA;
+ {$EXTERNALSYM LPSERVICE_TYPE_VALUE_ABSA}
+ PSERVICE_TYPE_VALUE_ABSA = ^SERVICE_TYPE_VALUE_ABSA;
+ {$EXTERNALSYM PSERVICE_TYPE_VALUE_ABSA}
+ _SERVICE_TYPE_VALUE_ABSA = record
+ dwNameSpace: DWORD;
+ dwValueType: DWORD;
+ dwValueSize: DWORD;
+ lpValueName: LPSTR;
+ lpValue: LPVOID;
+ end;
+ {$EXTERNALSYM _SERVICE_TYPE_VALUE_ABSA}
+ SERVICE_TYPE_VALUE_ABSA = _SERVICE_TYPE_VALUE_ABSA;
+ {$EXTERNALSYM SERVICE_TYPE_VALUE_ABSA}
+ TServiceTypeValueAbsA = SERVICE_TYPE_VALUE_ABSA;
+ PServiceTypeValueAbsA = LPSERVICE_TYPE_VALUE_ABSA;
+
+//
+// An absolute version of above. This structure does contain pointers.
+//
+
+ LPSERVICE_TYPE_VALUE_ABSW = ^SERVICE_TYPE_VALUE_ABSW;
+ {$EXTERNALSYM LPSERVICE_TYPE_VALUE_ABSW}
+ PSERVICE_TYPE_VALUE_ABSW = ^SERVICE_TYPE_VALUE_ABSW;
+ {$EXTERNALSYM PSERVICE_TYPE_VALUE_ABSW}
+ _SERVICE_TYPE_VALUE_ABSW = record
+ dwNameSpace: DWORD;
+ dwValueType: DWORD;
+ dwValueSize: DWORD;
+ lpValueName: LPWSTR;
+ lpValue: LPVOID;
+ end;
+ {$EXTERNALSYM _SERVICE_TYPE_VALUE_ABSW}
+ SERVICE_TYPE_VALUE_ABSW = _SERVICE_TYPE_VALUE_ABSW;
+ {$EXTERNALSYM SERVICE_TYPE_VALUE_ABSW}
+ TServiceTypeValueAbsW = SERVICE_TYPE_VALUE_ABSW;
+ PServiceTypeValueAbsW = LPSERVICE_TYPE_VALUE_ABSW;
+
+ {$IFDEF UNICODE}
+ SERVICE_TYPE_VALUE_ABS = SERVICE_TYPE_VALUE_ABSW;
+ {$EXTERNALSYM SERVICE_TYPE_VALUE_ABS}
+ PSERVICE_TYPE_VALUE_ABS = PSERVICE_TYPE_VALUE_ABSW;
+ {$EXTERNALSYM PSERVICE_TYPE_VALUE_ABS}
+ LPSERVICE_TYPE_VALUE_ABS = LPSERVICE_TYPE_VALUE_ABSW;
+ {$EXTERNALSYM LPSERVICE_TYPE_VALUE_ABS}
+ TServiceTypeValueAbs = TServiceTypeValueAbsW;
+ PServiceTypeValueAbs = PServiceTypeValueAbsW;
+ {$ELSE}
+ SERVICE_TYPE_VALUE_ABS = SERVICE_TYPE_VALUE_ABSA;
+ {$EXTERNALSYM SERVICE_TYPE_VALUE_ABS}
+ PSERVICE_TYPE_VALUE_ABS = PSERVICE_TYPE_VALUE_ABSA;
+ {$EXTERNALSYM PSERVICE_TYPE_VALUE_ABS}
+ LPSERVICE_TYPE_VALUE_ABS = LPSERVICE_TYPE_VALUE_ABSA;
+ {$EXTERNALSYM LPSERVICE_TYPE_VALUE_ABS}
+ TServiceTypeValueAbs = TServiceTypeValueAbsA;
+ PServiceTypeValueAbs = PServiceTypeValueAbsA;
+ {$ENDIF UNICODE}
+
+//
+// Service Type Information. Contains the name of the Service Type and
+// and an array of SERVICE_NS_TYPE_VALUE structures. This structure is self
+// relative and has no pointers in it.
+//
+
+ LPSERVICE_TYPE_INFO = ^SERVICE_TYPE_INFO;
+ {$EXTERNALSYM LPSERVICE_TYPE_INFO}
+ PSERVICE_TYPE_INFO = ^SERVICE_TYPE_INFO;
+ {$EXTERNALSYM PSERVICE_TYPE_INFO}
+ _SERVICE_TYPE_INFO = record
+ dwTypeNameOffset: DWORD;
+ dwValueCount: DWORD;
+ Values: array [0..0] of SERVICE_TYPE_VALUE;
+ end;
+ {$EXTERNALSYM _SERVICE_TYPE_INFO}
+ SERVICE_TYPE_INFO = _SERVICE_TYPE_INFO;
+ {$EXTERNALSYM SERVICE_TYPE_INFO}
+ TServiceTypeInfo = SERVICE_TYPE_INFO;
+ PServiceTypeInfo = LPSERVICE_TYPE_INFO;
+
+ LPSERVICE_TYPE_INFO_ABSA = ^SERVICE_TYPE_INFO_ABSA;
+ {$EXTERNALSYM LPSERVICE_TYPE_INFO_ABSA}
+ PSERVICE_TYPE_INFO_ABSA = ^SERVICE_TYPE_INFO_ABSA;
+ {$EXTERNALSYM PSERVICE_TYPE_INFO_ABSA}
+ _SERVICE_TYPE_INFO_ABSA = record
+ lpTypeName: LPSTR;
+ dwValueCount: DWORD;
+ Values: array [0..0] of SERVICE_TYPE_VALUE_ABSA;
+ end;
+ {$EXTERNALSYM _SERVICE_TYPE_INFO_ABSA}
+ SERVICE_TYPE_INFO_ABSA = _SERVICE_TYPE_INFO_ABSA;
+ {$EXTERNALSYM SERVICE_TYPE_INFO_ABSA}
+ TServiceTypeInfoAbsA = SERVICE_TYPE_INFO_ABSA;
+ PServiceTypeInfoAbsA = PSERVICE_TYPE_INFO_ABSA;
+
+ LPSERVICE_TYPE_INFO_ABSW = ^SERVICE_TYPE_INFO_ABSW;
+ {$EXTERNALSYM LPSERVICE_TYPE_INFO_ABSW}
+ PSERVICE_TYPE_INFO_ABSW = ^SERVICE_TYPE_INFO_ABSW;
+ {$EXTERNALSYM PSERVICE_TYPE_INFO_ABSW}
+ _SERVICE_TYPE_INFO_ABSW = record
+ lpTypeName: LPWSTR;
+ dwValueCount: DWORD;
+ Values: array [0..0] of SERVICE_TYPE_VALUE_ABSW;
+ end;
+ {$EXTERNALSYM _SERVICE_TYPE_INFO_ABSW}
+ SERVICE_TYPE_INFO_ABSW = _SERVICE_TYPE_INFO_ABSW;
+ {$EXTERNALSYM SERVICE_TYPE_INFO_ABSW}
+ TServiceTypeInfoAbsW = SERVICE_TYPE_INFO_ABSW;
+ PServiceTypeInfoAbsW = LPSERVICE_TYPE_INFO_ABSW;
+
+ {$IFDEF UNICODE}
+ SERVICE_TYPE_INFO_ABS = SERVICE_TYPE_INFO_ABSW;
+ {$EXTERNALSYM SERVICE_TYPE_INFO_ABS}
+ PSERVICE_TYPE_INFO_ABS = PSERVICE_TYPE_INFO_ABSW;
+ {$EXTERNALSYM PSERVICE_TYPE_INFO_ABS}
+ LPSERVICE_TYPE_INFO_ABS = LPSERVICE_TYPE_INFO_ABSW;
+ {$EXTERNALSYM LPSERVICE_TYPE_INFO_ABS}
+ TServiceTypeInfoAbs = TServiceTypeInfoAbsW;
+ PServiceTypeInfoAbs = PServiceTypeInfoAbsW;
+ {$ELSE}
+ SERVICE_TYPE_INFO_ABS = SERVICE_TYPE_INFO_ABSA;
+ {$EXTERNALSYM SERVICE_TYPE_INFO_ABS}
+ PSERVICE_TYPE_INFO_ABS = PSERVICE_TYPE_INFO_ABSA;
+ {$EXTERNALSYM PSERVICE_TYPE_INFO_ABS}
+ LPSERVICE_TYPE_INFO_ABS = LPSERVICE_TYPE_INFO_ABSA;
+ {$EXTERNALSYM LPSERVICE_TYPE_INFO_ABS}
+ TServiceTypeInfoAbs = TServiceTypeInfoAbsA;
+ PServiceTypeInfoAbs = PServiceTypeInfoAbsA;
+ {$ENDIF UNICODE}
+
+//
+// A Single Address definition.
+//
+
+ LPSERVICE_ADDRESS = ^SERVICE_ADDRESS;
+ {$EXTERNALSYM LPSERVICE_ADDRESS}
+ PSERVICE_ADDRESS = ^SERVICE_ADDRESS;
+ {$EXTERNALSYM PSERVICE_ADDRESS}
+ _SERVICE_ADDRESS = record
+ dwAddressType: DWORD;
+ dwAddressFlags: DWORD;
+ dwAddressLength: DWORD;
+ dwPrincipalLength: DWORD;
+ lpAddress: LPBYTE;
+ lpPrincipal: LPBYTE;
+ end;
+ {$EXTERNALSYM _SERVICE_ADDRESS}
+ SERVICE_ADDRESS = _SERVICE_ADDRESS;
+ {$EXTERNALSYM SERVICE_ADDRESS}
+ TServiceAddress = SERVICE_ADDRESS;
+ PServiceAddress = LPSERVICE_ADDRESS;
+
+//
+// Addresses used by the service. Contains array of SERVICE_ADDRESS.
+//
+
+ LPSERVICE_ADDRESSES = ^SERVICE_ADDRESSES;
+ {$EXTERNALSYM LPSERVICE_ADDRESSES}
+ PSERVICE_ADDRESSES = ^SERVICE_ADDRESSES;
+ {$EXTERNALSYM PSERVICE_ADDRESSES}
+ _SERVICE_ADDRESSES = record
+ dwAddressCount: DWORD;
+ Addresses: array [0..0] of SERVICE_ADDRESS;
+ end;
+ {$EXTERNALSYM _SERVICE_ADDRESSES}
+ SERVICE_ADDRESSES = _SERVICE_ADDRESSES;
+ {$EXTERNALSYM SERVICE_ADDRESSES}
+ TServiceAddresses = SERVICE_ADDRESSES;
+ PServiceAddresses = PSERVICE_ADDRESSES;
+
+//
+// Service Information.
+//
+
+ LPSERVICE_INFOA = ^SERVICE_INFOA;
+ {$EXTERNALSYM LPSERVICE_INFOA}
+ PSERVICE_INFOA = ^SERVICE_INFOA;
+ {$EXTERNALSYM PSERVICE_INFOA}
+ _SERVICE_INFOA = record
+ lpServiceType: PGUID;
+ lpServiceName: LPSTR;
+ lpComment: LPSTR;
+ lpLocale: LPSTR;
+ dwDisplayHint: DWORD;
+ dwVersion: DWORD;
+ dwTime: DWORD;
+ lpMachineName: LPSTR;
+ lpServiceAddress: LPSERVICE_ADDRESSES;
+ ServiceSpecificInfo: BLOB;
+ end;
+ {$EXTERNALSYM _SERVICE_INFOA}
+ SERVICE_INFOA = _SERVICE_INFOA;
+ {$EXTERNALSYM SERVICE_INFOA}
+ TServiceInfoA = SERVICE_INFOA;
+ PServiceInfoA = PSERVICE_INFOA;
+
+//
+// Service Information.
+//
+
+ LPSERVICE_INFOW = ^SERVICE_INFOW;
+ {$EXTERNALSYM LPSERVICE_INFOW}
+ PSERVICE_INFOW = ^SERVICE_INFOW;
+ {$EXTERNALSYM PSERVICE_INFOW}
+ _SERVICE_INFOW = record
+ lpServiceType: PGUID;
+ lpServiceName: LPWSTR;
+ lpComment: LPWSTR;
+ lpLocale: LPWSTR;
+ dwDisplayHint: DWORD;
+ dwVersion: DWORD;
+ dwTime: DWORD;
+ lpMachineName: LPWSTR;
+ lpServiceAddress: LPSERVICE_ADDRESSES;
+ ServiceSpecificInfo: BLOB;
+ end;
+ {$EXTERNALSYM _SERVICE_INFOW}
+ SERVICE_INFOW = _SERVICE_INFOW;
+ {$EXTERNALSYM SERVICE_INFOW}
+ TServiceInfoW = SERVICE_INFOW;
+ PServiceInfoW = PSERVICE_INFOW;
+
+ {$IFDEF UNICODE}
+ SERVICE_INFO = SERVICE_INFOW;
+ {$EXTERNALSYM SERVICE_INFO}
+ PSERVICE_INFO = PSERVICE_INFOW;
+ {$EXTERNALSYM PSERVICE_INFO}
+ LPSERVICE_INFO = LPSERVICE_INFOW;
+ {$EXTERNALSYM LPSERVICE_INFO}
+ TServiceInfo = TServiceInfoW;
+ PServiceInfo = PServiceInfoW;
+ {$ELSE}
+ SERVICE_INFO = SERVICE_INFOA;
+ {$EXTERNALSYM SERVICE_INFO}
+ PSERVICE_INFO = PSERVICE_INFOA;
+ {$EXTERNALSYM PSERVICE_INFO}
+ LPSERVICE_INFO = LPSERVICE_INFOA;
+ {$EXTERNALSYM LPSERVICE_INFO}
+ TServiceInfo = TServiceInfoA;
+ PServiceInfo = PServiceInfoA;
+ {$ENDIF UNICODE}
+
+//
+// Name Space & Service Information
+//
+
+ LPNS_SERVICE_INFOA = ^NS_SERVICE_INFOA;
+ {$EXTERNALSYM LPNS_SERVICE_INFOA}
+ PNS_SERVICE_INFOA = ^NS_SERVICE_INFOA;
+ {$EXTERNALSYM PNS_SERVICE_INFOA}
+ _NS_SERVICE_INFOA = record
+ dwNameSpace: DWORD;
+ ServiceInfo: SERVICE_INFOA;
+ end;
+ {$EXTERNALSYM _NS_SERVICE_INFOA}
+ NS_SERVICE_INFOA = _NS_SERVICE_INFOA;
+ {$EXTERNALSYM NS_SERVICE_INFOA}
+ TNsServiceInfoA = NS_SERVICE_INFOA;
+ PNsServiceInfoA = LPNS_SERVICE_INFOA;
+
+//
+// Name Space & Service Information
+//
+
+ LPNS_SERVICE_INFOW = ^NS_SERVICE_INFOW;
+ {$EXTERNALSYM LPNS_SERVICE_INFOW}
+ PNS_SERVICE_INFOW = ^NS_SERVICE_INFOW;
+ {$EXTERNALSYM PNS_SERVICE_INFOW}
+ _NS_SERVICE_INFOW = record
+ dwNameSpace: DWORD;
+ ServiceInfo: SERVICE_INFOW;
+ end;
+ {$EXTERNALSYM _NS_SERVICE_INFOW}
+ NS_SERVICE_INFOW = _NS_SERVICE_INFOW;
+ {$EXTERNALSYM NS_SERVICE_INFOW}
+ TNsServiceInfoW = NS_SERVICE_INFOW;
+ PNsServiceInfoW = LPNS_SERVICE_INFOW;
+
+ {$IFDEF UNICODE}
+ NS_SERVICE_INFO = NS_SERVICE_INFOW;
+ {$EXTERNALSYM NS_SERVICE_INFO}
+ PNS_SERVICE_INFO = PNS_SERVICE_INFOW;
+ {$EXTERNALSYM PNS_SERVICE_INFO}
+ LPNS_SERVICE_INFO = LPNS_SERVICE_INFOW;
+ {$EXTERNALSYM LPNS_SERVICE_INFO}
+ TNsServiceInfo = TNsServiceInfoW;
+ PNsServiceInfo = PNsServiceInfoW;
+ {$ELSE}
+ NS_SERVICE_INFO = NS_SERVICE_INFOA;
+ {$EXTERNALSYM NS_SERVICE_INFO}
+ PNS_SERVICE_INFO = PNS_SERVICE_INFOA;
+ {$EXTERNALSYM PNS_SERVICE_INFO}
+ LPNS_SERVICE_INFO = LPNS_SERVICE_INFOA;
+ {$EXTERNALSYM LPNS_SERVICE_INFO}
+ TNsServiceInfo = TNsServiceInfoA;
+ PNsServiceInfo = PNsServiceInfoA;
+ {$ENDIF UNICODE}
+
+//
+// SockAddr Information
+//
+
+ LPSOCKET_ADDRESS = ^SOCKET_ADDRESS;
+ {$EXTERNALSYM LPSOCKET_ADDRESS}
+ PSOCKET_ADDRESS = ^SOCKET_ADDRESS;
+ {$EXTERNALSYM PSOCKET_ADDRESS}
+ _SOCKET_ADDRESS = record
+ lpSockaddr: LPSOCKADDR;
+ iSockaddrLength: Integer;
+ end;
+ {$EXTERNALSYM _SOCKET_ADDRESS}
+ SOCKET_ADDRESS = _SOCKET_ADDRESS;
+ {$EXTERNALSYM SOCKET_ADDRESS}
+ TSocketAddress = SOCKET_ADDRESS;
+ PSocketAddress = PSOCKET_ADDRESS;
+
+//
+// CSAddr Information
+//
+
+ LPCSADDR_INFO = ^CSADDR_INFO;
+ {$EXTERNALSYM LPCSADDR_INFO}
+ PCSADDR_INFO = ^CSADDR_INFO;
+ {$EXTERNALSYM PCSADDR_INFO}
+ _CSADDR_INFO = record
+ LocalAddr: SOCKET_ADDRESS;
+ RemoteAddr: SOCKET_ADDRESS;
+ iSocketType: Integer;
+ iProtocol: Integer;
+ end;
+ {$EXTERNALSYM _CSADDR_INFO}
+ CSADDR_INFO = _CSADDR_INFO;
+ {$EXTERNALSYM CSADDR_INFO}
+ TCsAddrInfo = CSADDR_INFO;
+ PCsAddrInfo = LPCSADDR_INFO;
+
+//
+// Protocol Information
+//
+
+ LPPROTOCOL_INFOA = ^PROTOCOL_INFOA;
+ {$EXTERNALSYM LPPROTOCOL_INFOA}
+ PPROTOCOL_INFOA = ^PROTOCOL_INFOA;
+ {$EXTERNALSYM PPROTOCOL_INFOA}
+ _PROTOCOL_INFOA = record
+ dwServiceFlags: DWORD;
+ iAddressFamily: Integer;
+ iMaxSockAddr: Integer;
+ iMinSockAddr: Integer;
+ iSocketType: Integer;
+ iProtocol: Integer;
+ dwMessageSize: DWORD;
+ lpProtocol: LPSTR;
+ end;
+ {$EXTERNALSYM _PROTOCOL_INFOA}
+ PROTOCOL_INFOA = _PROTOCOL_INFOA;
+ {$EXTERNALSYM PROTOCOL_INFOA}
+ TProtocolInfoA = PROTOCOL_INFOA;
+ PProtocolInfoA = LPPROTOCOL_INFOA;
+
+//
+// Protocol Information
+//
+
+ LPPROTOCOL_INFOW = ^PROTOCOL_INFOW;
+ {$EXTERNALSYM LPPROTOCOL_INFOW}
+ PPROTOCOL_INFOW = ^PROTOCOL_INFOW;
+ {$EXTERNALSYM PPROTOCOL_INFOW}
+ _PROTOCOL_INFOW = record
+ dwServiceFlags: DWORD;
+ iAddressFamily: Integer;
+ iMaxSockAddr: Integer;
+ iMinSockAddr: Integer;
+ iSocketType: Integer;
+ iProtocol: Integer;
+ dwMessageSize: DWORD;
+ lpProtocol: LPWSTR;
+ end;
+ {$EXTERNALSYM _PROTOCOL_INFOW}
+ PROTOCOL_INFOW = _PROTOCOL_INFOW;
+ {$EXTERNALSYM PROTOCOL_INFOW}
+ TProtocolInfoW = PROTOCOL_INFOW;
+ PProtocolInfoW = LPPROTOCOL_INFOW;
+
+ {$IFDEF UNICODE}
+ PROTOCOL_INFO = PROTOCOL_INFOW;
+ {$EXTERNALSYM PROTOCOL_INFO}
+ PPROTOCOL_INFO = PPROTOCOL_INFOW;
+ {$EXTERNALSYM PPROTOCOL_INFO}
+ LPPROTOCOL_INFO = LPPROTOCOL_INFOW;
+ {$EXTERNALSYM LPPROTOCOL_INFO}
+ TProtocolInfo = TProtocolInfoW;
+ PProtocolInfo = PProtocolInfoW;
+ {$ELSE}
+ PROTOCOL_INFO = PROTOCOL_INFOA;
+ {$EXTERNALSYM PROTOCOL_INFO}
+ PPROTOCOL_INFO = PPROTOCOL_INFOA;
+ {$EXTERNALSYM PPROTOCOL_INFO}
+ LPPROTOCOL_INFO = LPPROTOCOL_INFOA;
+ {$EXTERNALSYM LPPROTOCOL_INFO}
+ TProtocolInfo = TProtocolInfoA;
+ PProtocolInfo = PProtocolInfoA;
+ {$ENDIF UNICODE}
+
+//
+// NETRESOURCE2 Structure
+//
+
+ LPNETRESOURCE2A = ^NETRESOURCE2A;
+ {$EXTERNALSYM LPNETRESOURCE2A}
+ PNETRESOURCE2A = ^NETRESOURCE2A;
+ {$EXTERNALSYM PNETRESOURCE2A}
+ _NETRESOURCE2A = record
+ dwScope: DWORD;
+ dwType: DWORD;
+ dwUsage: DWORD;
+ dwDisplayType: DWORD;
+ lpLocalName: LPSTR;
+ lpRemoteName: LPSTR;
+ lpComment: LPSTR;
+ ns_info: NS_INFO;
+ ServiceType: TGUID;
+ dwProtocols: DWORD;
+ lpiProtocols: PINT;
+ end;
+ {$EXTERNALSYM _NETRESOURCE2A}
+ NETRESOURCE2A = _NETRESOURCE2A;
+ {$EXTERNALSYM NETRESOURCE2A}
+ TNetResource2A = NETRESOURCE2A;
+
+//
+// NETRESOURCE2 Structure
+//
+
+ LPNETRESOURCE2W = ^NETRESOURCE2W;
+ {$EXTERNALSYM LPNETRESOURCE2W}
+ PNETRESOURCE2W = ^NETRESOURCE2W;
+ {$EXTERNALSYM PNETRESOURCE2W}
+ _NETRESOURCE2W = record
+ dwScope: DWORD;
+ dwType: DWORD;
+ dwUsage: DWORD;
+ dwDisplayType: DWORD;
+ lpLocalName: LPWSTR;
+ lpRemoteName: LPWSTR;
+ lpComment: LPWSTR;
+ ns_info: NS_INFO;
+ ServiceType: TGUID;
+ dwProtocols: DWORD;
+ lpiProtocols: PINT;
+ end;
+ {$EXTERNALSYM _NETRESOURCE2W}
+ NETRESOURCE2W = _NETRESOURCE2W;
+ {$EXTERNALSYM NETRESOURCE2W}
+ TNetResource2W = NETRESOURCE2W;
+
+ {$IFDEF UNICODE}
+ NETRESOURCE2 = NETRESOURCE2W;
+ {$EXTERNALSYM NETRESOURCE2}
+ PNETRESOURCE2 = PNETRESOURCE2W;
+ {$EXTERNALSYM PNETRESOURCE2}
+ LPNETRESOURCE2 = LPNETRESOURCE2W;
+ {$EXTERNALSYM LPNETRESOURCE2}
+ TNetResource2 = TNetResource2W;
+ {$ELSE}
+ NETRESOURCE2 = NETRESOURCE2A;
+ {$EXTERNALSYM NETRESOURCE2}
+ PNETRESOURCE2 = PNETRESOURCE2A;
+ {$EXTERNALSYM PNETRESOURCE2}
+ LPNETRESOURCE2 = LPNETRESOURCE2A;
+ {$EXTERNALSYM LPNETRESOURCE2}
+ TNetResource2 = TNetResource2A;
+ {$ENDIF UNICODE}
+
+ LPFN_NSPAPI = function: DWORD; stdcall;
+ {$EXTERNALSYM LPFN_NSPAPI}
+ TFnNspApi = LPFN_NSPAPI;
+
+//
+// Structures for using the service routines asynchronously.
+//
+
+type
+ LPSERVICE_CALLBACK_PROC = procedure(lParam: LPARAM; hAsyncTaskHandle: HANDLE); stdcall;
+ {$EXTERNALSYM LPSERVICE_CALLBACK_PROC}
+ TServiceCallbackProc = LPSERVICE_CALLBACK_PROC;
+
+type
+ LPSERVICE_ASYNC_INFO = ^SERVICE_ASYNC_INFO;
+ {$EXTERNALSYM LPSERVICE_ASYNC_INFO}
+ PSERVICE_ASYNC_INFO = ^SERVICE_ASYNC_INFO;
+ {$EXTERNALSYM PSERVICE_ASYNC_INFO}
+ _SERVICE_ASYNC_INFO = record
+ lpServiceCallbackProc: LPSERVICE_CALLBACK_PROC;
+ lParam: LPARAM;
+ hAsyncTaskHandle: HANDLE;
+ end;
+ {$EXTERNALSYM _SERVICE_ASYNC_INFO}
+ SERVICE_ASYNC_INFO = _SERVICE_ASYNC_INFO;
+ {$EXTERNALSYM SERVICE_ASYNC_INFO}
+ TServiceAsyncInfo = SERVICE_ASYNC_INFO;
+ PServiceAsyncInfo = LPSERVICE_ASYNC_INFO;
+
+//
+// Public NSP API prototypes.
+//
+
+function EnumProtocolsA(lpiProtocols: PINT; lpProtocolBuffer: LPVOID; lpdwBufferLength: LPDWORD): Integer; stdcall;
+{$EXTERNALSYM EnumProtocolsA}
+function EnumProtocolsW(lpiProtocols: PINT; lpProtocolBuffer: LPVOID; lpdwBufferLength: LPDWORD): Integer; stdcall;
+{$EXTERNALSYM EnumProtocolsW}
+function EnumProtocols(lpiProtocols: PINT; lpProtocolBuffer: LPVOID; lpdwBufferLength: LPDWORD): Integer; stdcall;
+{$EXTERNALSYM EnumProtocols}
+
+function GetAddressByNameA(dwNameSpace: DWORD; const lpServiceType: TGUID;
+ lpServiceName: LPSTR; lpiProtocols: PINT; dwResolution: DWORD;
+ lpServiceAsyncInfo: LPSERVICE_ASYNC_INFO; lpCsaddrBuffer: LPVOID;
+ var lpdwBufferLength: DWORD; lpAliasBuffer: LPSTR; lpdwAliasBufferLength: LPDWORD): Integer; stdcall;
+{$EXTERNALSYM GetAddressByNameA}
+function GetAddressByNameW(dwNameSpace: DWORD; const lpServiceType: TGUID;
+ lpServiceName: LPWSTR; lpiProtocols: PINT; dwResolution: DWORD;
+ lpServiceAsyncInfo: LPSERVICE_ASYNC_INFO; lpCsaddrBuffer: LPVOID;
+ var lpdwBufferLength: DWORD; lpAliasBuffer: LPWSTR; lpdwAliasBufferLength: LPDWORD): Integer; stdcall;
+{$EXTERNALSYM GetAddressByNameW}
+function GetAddressByName(dwNameSpace: DWORD; const lpServiceType: TGUID;
+ lpServiceName: LPTSTR; lpiProtocols: PINT; dwResolution: DWORD;
+ lpServiceAsyncInfo: LPSERVICE_ASYNC_INFO; lpCsaddrBuffer: LPVOID;
+ var lpdwBufferLength: DWORD; lpAliasBuffer: LPTSTR; lpdwAliasBufferLength: LPDWORD): Integer; stdcall;
+{$EXTERNALSYM GetAddressByName}
+
+function GetTypeByNameA(lpServiceName: LPSTR; var lpServiceType: TGUID): Integer; stdcall;
+{$EXTERNALSYM GetTypeByNameA}
+function GetTypeByNameW(lpServiceName: LPWSTR; var lpServiceType: TGUID): Integer; stdcall;
+{$EXTERNALSYM GetTypeByNameW}
+function GetTypeByName(lpServiceName: LPTSTR; var lpServiceType: TGUID): Integer; stdcall;
+{$EXTERNALSYM GetTypeByName}
+
+function GetNameByTypeA(const lpServiceType: TGUID; lpServiceName: LPSTR; dwNameLength: DWORD): Integer; stdcall;
+{$EXTERNALSYM GetNameByTypeA}
+function GetNameByTypeW(const lpServiceType: TGUID; lpServiceName: LPWSTR; dwNameLength: DWORD): Integer; stdcall;
+{$EXTERNALSYM GetNameByTypeW}
+function GetNameByType(const lpServiceType: TGUID; lpServiceName: LPTSTR; dwNameLength: DWORD): Integer; stdcall;
+{$EXTERNALSYM GetNameByType}
+
+function SetServiceA(dwNameSpace, dwOperation, dwFlags: DWORD;
+ const lpServiceInfo: SERVICE_INFOA; lpServiceAsyncInfo: LPSERVICE_ASYNC_INFO;
+ var lpdwStatusFlags: DWORD): Integer; stdcall;
+{$EXTERNALSYM SetServiceA}
+function SetServiceW(dwNameSpace, dwOperation, dwFlags: DWORD;
+ const lpServiceInfo: SERVICE_INFOW; lpServiceAsyncInfo: LPSERVICE_ASYNC_INFO;
+ var lpdwStatusFlags: DWORD): Integer; stdcall;
+{$EXTERNALSYM SetServiceW}
+function SetService(dwNameSpace, dwOperation, dwFlags: DWORD;
+ const lpServiceInfo: SERVICE_INFO; lpServiceAsyncInfo: LPSERVICE_ASYNC_INFO;
+ var lpdwStatusFlags: DWORD): Integer; stdcall;
+{$EXTERNALSYM SetService}
+
+function GetServiceA(dwNameSpace: DWORD; const lpGuid: TGUID; lpServiceName: LPSTR;
+ dwProperties: DWORD; lpBuffer: LPVOID; var lpdwBufferSize: DWORD;
+ lpServiceAsyncInfo: LPSERVICE_ASYNC_INFO): Integer; stdcall;
+{$EXTERNALSYM GetServiceA}
+function GetServiceW(dwNameSpace: DWORD; const lpGuid: TGUID; lpServiceName: LPWSTR;
+ dwProperties: DWORD; lpBuffer: LPVOID; var lpdwBufferSize: DWORD;
+ lpServiceAsyncInfo: LPSERVICE_ASYNC_INFO): Integer; stdcall;
+{$EXTERNALSYM GetServiceW}
+function GetService(dwNameSpace: DWORD; const lpGuid: TGUID; lpServiceName: LPTSTR;
+ dwProperties: DWORD; lpBuffer: LPVOID; var lpdwBufferSize: DWORD;
+ lpServiceAsyncInfo: LPSERVICE_ASYNC_INFO): Integer; stdcall;
+{$EXTERNALSYM GetService}
+
+implementation
+
+const
+ nsplib = 'wsock32.dll';
+ {$IFDEF UNICODE}
+ AWSuffix = 'W';
+ {$ELSE}
+ AWSuffix = 'A';
+ {$ENDIF UNICODE}
+
+{$IFDEF DYNAMIC_LINK}
+
+var
+ _EnumProtocolsA: Pointer;
+
+function EnumProtocolsA;
+begin
+ GetProcedureAddress(_EnumProtocolsA, nsplib, 'EnumProtocolsA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_EnumProtocolsA]
+ end;
+end;
+
+var
+ _EnumProtocolsW: Pointer;
+
+function EnumProtocolsW;
+begin
+ GetProcedureAddress(_EnumProtocolsW, nsplib, 'EnumProtocolsW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_EnumProtocolsW]
+ end;
+end;
+
+var
+ _EnumProtocols: Pointer;
+
+function EnumProtocols;
+begin
+ GetProcedureAddress(_EnumProtocols, nsplib, 'EnumProtocols' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_EnumProtocols]
+ end;
+end;
+
+var
+ _GetAddressByNameA: Pointer;
+
+function GetAddressByNameA;
+begin
+ GetProcedureAddress(_GetAddressByNameA, nsplib, 'GetAddressByNameA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetAddressByNameA]
+ end;
+end;
+
+var
+ _GetAddressByNameW: Pointer;
+
+function GetAddressByNameW;
+begin
+ GetProcedureAddress(_GetAddressByNameW, nsplib, 'GetAddressByNameW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetAddressByNameW]
+ end;
+end;
+
+var
+ _GetAddressByName: Pointer;
+
+function GetAddressByName;
+begin
+ GetProcedureAddress(_GetAddressByName, nsplib, 'GetAddressByName' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetAddressByName]
+ end;
+end;
+
+var
+ _GetTypeByNameA: Pointer;
+
+function GetTypeByNameA;
+begin
+ GetProcedureAddress(_GetTypeByNameA, nsplib, 'GetTypeByNameA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetTypeByNameA]
+ end;
+end;
+
+var
+ _GetTypeByNameW: Pointer;
+
+function GetTypeByNameW;
+begin
+ GetProcedureAddress(_GetTypeByNameW, nsplib, 'GetTypeByNameW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetTypeByNameW]
+ end;
+end;
+
+var
+ _GetTypeByName: Pointer;
+
+function GetTypeByName;
+begin
+ GetProcedureAddress(_GetTypeByName, nsplib, 'GetTypeByName' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetTypeByName]
+ end;
+end;
+
+var
+ _GetNameByTypeA: Pointer;
+
+function GetNameByTypeA;
+begin
+ GetProcedureAddress(_GetNameByTypeA, nsplib, 'GetNameByTypeA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetNameByTypeA]
+ end;
+end;
+
+var
+ _GetNameByTypeW: Pointer;
+
+function GetNameByTypeW;
+begin
+ GetProcedureAddress(_GetNameByTypeW, nsplib, 'GetNameByTypeW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetNameByTypeW]
+ end;
+end;
+
+var
+ _GetNameByType: Pointer;
+
+function GetNameByType;
+begin
+ GetProcedureAddress(_GetNameByType, nsplib, 'GetNameByType' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetNameByType]
+ end;
+end;
+
+var
+ _SetServiceA: Pointer;
+
+function SetServiceA;
+begin
+ GetProcedureAddress(_SetServiceA, nsplib, 'SetServiceA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetServiceA]
+ end;
+end;
+
+var
+ _SetServiceW: Pointer;
+
+function SetServiceW;
+begin
+ GetProcedureAddress(_SetServiceW, nsplib, 'SetServiceW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetServiceW]
+ end;
+end;
+
+var
+ _SetService: Pointer;
+
+function SetService;
+begin
+ GetProcedureAddress(_SetService, nsplib, 'SetService' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetService]
+ end;
+end;
+
+var
+ _GetServiceA: Pointer;
+
+function GetServiceA;
+begin
+ GetProcedureAddress(_GetServiceA, nsplib, 'GetServiceA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetServiceA]
+ end;
+end;
+
+var
+ _GetServiceW: Pointer;
+
+function GetServiceW;
+begin
+ GetProcedureAddress(_GetServiceW, nsplib, 'GetServiceW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetServiceW]
+ end;
+end;
+
+var
+ _GetService: Pointer;
+
+function GetService;
+begin
+ GetProcedureAddress(_GetService, nsplib, 'GetService' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetService]
+ end;
+end;
+
+{$ELSE}
+
+function EnumProtocolsA; external nsplib name 'EnumProtocolsA';
+function EnumProtocolsW; external nsplib name 'EnumProtocolsW';
+function EnumProtocols; external nsplib name 'EnumProtocols' + AWSuffix;
+function GetAddressByNameA; external nsplib name 'GetAddressByNameA';
+function GetAddressByNameW; external nsplib name 'GetAddressByNameW';
+function GetAddressByName; external nsplib name 'GetAddressByName' + AWSuffix;
+function GetTypeByNameA; external nsplib name 'GetTypeByNameA';
+function GetTypeByNameW; external nsplib name 'GetTypeByNameW';
+function GetTypeByName; external nsplib name 'GetTypeByName' + AWSuffix;
+function GetNameByTypeA; external nsplib name 'GetNameByTypeA';
+function GetNameByTypeW; external nsplib name 'GetNameByTypeW';
+function GetNameByType; external nsplib name 'GetNameByType' + AWSuffix;
+function SetServiceA; external nsplib name 'SetServiceA';
+function SetServiceW; external nsplib name 'SetServiceW';
+function SetService; external nsplib name 'SetService' + AWSuffix;
+function GetServiceA; external nsplib name 'GetServiceA';
+function GetServiceW; external nsplib name 'GetServiceW';
+function GetService; external nsplib name 'GetService' + AWSuffix;
+
+{$ENDIF DYNAMIC_LINK}
+
+end.
diff --git a/packages/extra/winunits/jwantddpar.pas b/packages/extra/winunits/jwantddpar.pas
index cf67619c53..cb99b385a6 100644
--- a/packages/extra/winunits/jwantddpar.pas
+++ b/packages/extra/winunits/jwantddpar.pas
@@ -1,218 +1,218 @@
-{******************************************************************************}
-{ }
-{ Parallel Port Driver Interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2003 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: ntddpar.h , released June 2000. The original Pascal }
-{ code is: JwaNtDdPar, released December 2003. The initial developer of the }
-{ Pascal code is Pasha Sivtsov (ps4me att mail dott ru). }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwantddpar.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaNtDdPar;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "ntddk.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaWinType, JwaWinIoctl;
-
-const
- // Parallel port device GUIDs
- GUID_DEVINTERFACE_PARALLEL: TGUID = (
- D1:$97F76EF0; D2:$F883; D3:$11D0; D4:($AF,$1F,$00,$00,$F8,$00,$84,$5C));
- {$EXTERNALSYM GUID_DEVINTERFACE_PARALLEL}
- GUID_DEVINTERFACE_PARCLASS: TGUID = (
- D1:$811FC6A5; D2:$F728; D3:$11D0; D4:($A5,$37,$00,$00,$F8,$75,$3E,$D1));
- {$EXTERNALSYM GUID_DEVINTERFACE_PARCLASS}
-
- GUID_PARALLEL_DEVICE: TGUID = (
- D1:$97F76EF0; D2:$F883; D3:$11D0; D4:($AF,$1F,$00,$00,$F8,$00,$84,$5C));
- {$EXTERNALSYM GUID_PARALLEL_DEVICE}
- GUID_PARCLASS_DEVICE: TGUID = (
- D1:$811FC6A5; D2:$F728; D3:$11D0; D4:($A5,$37,$00,$00,$F8,$75,$3E,$D1));
- {$EXTERNALSYM GUID_PARCLASS_DEVICE}
-
- IOCTL_IEEE1284_GET_MODE = (
- (FILE_DEVICE_PARALLEL_PORT shl 16) or (FILE_ANY_ACCESS shl 14) or
- (5 shl 2) or METHOD_BUFFERED);
- {$EXTERNALSYM IOCTL_IEEE1284_GET_MODE}
- IOCTL_IEEE1284_NEGOTIATE = (
- (FILE_DEVICE_PARALLEL_PORT shl 16) or (FILE_ANY_ACCESS shl 14) or
- (6 shl 2) or METHOD_BUFFERED);
- {$EXTERNALSYM IOCTL_IEEE1284_NEGOTIATE}
- IOCTL_PAR_GET_DEFAULT_MODES = (
- (FILE_DEVICE_PARALLEL_PORT shl 16) or (FILE_ANY_ACCESS shl 14) or
- (10 shl 2) or METHOD_BUFFERED);
- {$EXTERNALSYM IOCTL_PAR_GET_DEFAULT_MODES}
- IOCTL_PAR_GET_DEVICE_CAPS = (
- (FILE_DEVICE_PARALLEL_PORT shl 16) or (FILE_ANY_ACCESS shl 14) or
- (9 shl 2) or METHOD_BUFFERED);
- {$EXTERNALSYM IOCTL_PAR_GET_DEVICE_CAPS}
- IOCTL_PAR_IS_PORT_FREE = (
- (FILE_DEVICE_PARALLEL_PORT shl 16) or (FILE_ANY_ACCESS shl 14) or
- (21 shl 2) or METHOD_BUFFERED);
- {$EXTERNALSYM IOCTL_PAR_IS_PORT_FREE}
- IOCTL_PAR_QUERY_DEVICE_ID = (
- (FILE_DEVICE_PARALLEL_PORT shl 16) or (FILE_ANY_ACCESS shl 14) or
- (3 shl 2) or METHOD_BUFFERED);
- {$EXTERNALSYM IOCTL_PAR_QUERY_DEVICE_ID}
- IOCTL_PAR_QUERY_DEVICE_ID_SIZE = (
- (FILE_DEVICE_PARALLEL_PORT shl 16) or (FILE_ANY_ACCESS shl 14) or
- (4 shl 2) or METHOD_BUFFERED);
- {$EXTERNALSYM IOCTL_PAR_QUERY_DEVICE_ID_SIZE}
- IOCTL_PAR_QUERY_INFORMATION = (
- (FILE_DEVICE_PARALLEL_PORT shl 16) or (FILE_ANY_ACCESS shl 14) or
- (1 shl 2) or METHOD_BUFFERED);
- {$EXTERNALSYM IOCTL_PAR_QUERY_INFORMATION}
- IOCTL_PAR_QUERY_LOCATION = (
- (FILE_DEVICE_PARALLEL_PORT shl 16) or (FILE_ANY_ACCESS shl 14) or
- (22 shl 2) or METHOD_BUFFERED);
- {$EXTERNALSYM IOCTL_PAR_QUERY_LOCATION}
- IOCTL_PAR_QUERY_RAW_DEVICE_ID = (
- (FILE_DEVICE_PARALLEL_PORT shl 16) or (FILE_ANY_ACCESS shl 14) or
- (12 shl 2) or METHOD_BUFFERED);
- {$EXTERNALSYM IOCTL_PAR_QUERY_RAW_DEVICE_ID}
- IOCTL_PAR_SET_INFORMATION = (
- (FILE_DEVICE_PARALLEL_PORT shl 16) or (FILE_ANY_ACCESS shl 14) or
- (2 shl 2) or METHOD_BUFFERED);
- {$EXTERNALSYM IOCTL_PAR_SET_INFORMATION}
- IOCTL_PAR_SET_READ_ADDRESS = (
- (FILE_DEVICE_PARALLEL_PORT shl 16) or (FILE_ANY_ACCESS shl 14) or
- (8 shl 2) or METHOD_BUFFERED);
- {$EXTERNALSYM IOCTL_PAR_SET_READ_ADDRESS}
- IOCTL_PAR_SET_WRITE_ADDRESS = (
- (FILE_DEVICE_PARALLEL_PORT shl 16) or (FILE_ANY_ACCESS shl 14) or
- (7 shl 2) or METHOD_BUFFERED);
- {$EXTERNALSYM IOCTL_PAR_SET_WRITE_ADDRESS}
-
-type
- PPAR_DEVICE_ID_SIZE_INFORMATION = ^PAR_DEVICE_ID_SIZE_INFORMATION;
- {$EXTERNALSYM PPAR_DEVICE_ID_SIZE_INFORMATION}
- _PAR_DEVICE_ID_SIZE_INFORMATION = record
- DeviceIdSize: ULONG;
- end;
- {$EXTERNALSYM _PAR_DEVICE_ID_SIZE_INFORMATION}
- PAR_DEVICE_ID_SIZE_INFORMATION = _PAR_DEVICE_ID_SIZE_INFORMATION;
- {$EXTERNALSYM PAR_DEVICE_ID_SIZE_INFORMATION}
- TParDeviceIdSizeInformation = PAR_DEVICE_ID_SIZE_INFORMATION;
- PParDeviceIdSizeInformation = PPAR_DEVICE_ID_SIZE_INFORMATION;
-
-const
- PARALLEL_INIT = $01;
- {$EXTERNALSYM PARALLEL_INIT}
- PARALLEL_AUTOFEED = $02;
- {$EXTERNALSYM PARALLEL_AUTOFEED}
- PARALLEL_PAPER_EMPTY = $04;
- {$EXTERNALSYM PARALLEL_PAPER_EMPTY}
- PARALLEL_OFF_LINE = $08;
- {$EXTERNALSYM PARALLEL_OFF_LINE}
- PARALLEL_POWER_OFF = $10;
- {$EXTERNALSYM PARALLEL_POWER_OFF}
- PARALLEL_NOT_CONNECTED = $20;
- {$EXTERNALSYM PARALLEL_NOT_CONNECTED}
- PARALLEL_BUSY = $40;
- {$EXTERNALSYM PARALLEL_BUSY}
- PARALLEL_SELECTED = $80;
- {$EXTERNALSYM PARALLEL_SELECTED}
-
-type
- PPAR_QUERY_INFORMATION = ^PAR_QUERY_INFORMATION;
- {$EXTERNALSYM PPAR_QUERY_INFORMATION}
- _PAR_QUERY_INFORMATION = record
- Status: UCHAR;
- end;
- {$EXTERNALSYM _PAR_QUERY_INFORMATION}
- PAR_QUERY_INFORMATION = _PAR_QUERY_INFORMATION;
- {$EXTERNALSYM PAR_QUERY_INFORMATION}
- TParQueryInformation = PAR_QUERY_INFORMATION;
- PParQueryInformation = PPAR_QUERY_INFORMATION;
-
- PPAR_SET_INFORMATION = ^PAR_SET_INFORMATION;
- {$EXTERNALSYM PPAR_SET_INFORMATION}
- _PAR_SET_INFORMATION = record
- Init: UCHAR;
- end;
- {$EXTERNALSYM _PAR_SET_INFORMATION}
- PAR_SET_INFORMATION = _PAR_SET_INFORMATION;
- {$EXTERNALSYM PAR_SET_INFORMATION}
- TParSetInformation = PAR_SET_INFORMATION;
- PParSetInformation = PPAR_SET_INFORMATION;
-
- PPARCLASS_NEGOTIATION_MASK = ^PARCLASS_NEGOTIATION_MASK;
- {$EXTERNALSYM PPARCLASS_NEGOTIATION_MASK}
- _PARCLASS_NEGOTIATION_MASK = record
- usReadMask: USHORT;
- usWriteMask: USHORT;
- end;
- {$EXTERNALSYM _PARCLASS_NEGOTIATION_MASK}
- PARCLASS_NEGOTIATION_MASK = _PARCLASS_NEGOTIATION_MASK;
- {$EXTERNALSYM PARCLASS_NEGOTIATION_MASK}
- TParClassNegotiationMask = PARCLASS_NEGOTIATION_MASK;
- PParClassNegotiationMask = PPARCLASS_NEGOTIATION_MASK;
-
-const
- NONE = $0000;
- {$EXTERNALSYM NONE}
- CENTRONICS = $0001;
- {$EXTERNALSYM CENTRONICS}
- IEEE_COMPATIBILITY = $0002;
- {$EXTERNALSYM IEEE_COMPATIBILITY}
- NIBBLE = $0004;
- {$EXTERNALSYM NIBBLE}
- CHANNEL_NIBBLE = $0008;
- {$EXTERNALSYM CHANNEL_NIBBLE}
- BYTE_BIDIR = $0010;
- {$EXTERNALSYM BYTE_BIDIR}
- EPP_HW = $0020;
- {$EXTERNALSYM EPP_HW}
- EPP_SW = $0040;
- {$EXTERNALSYM EPP_SW}
- EPP_ANY = $0060;
- {$EXTERNALSYM EPP_ANY}
- BOUNDED_ECP = $0080;
- {$EXTERNALSYM BOUNDED_ECP}
- ECP_HW_NOIRQ = $0100;
- {$EXTERNALSYM ECP_HW_NOIRQ}
- ECP_HW_IRQ = $0200;
- {$EXTERNALSYM ECP_HW_IRQ}
- ECP_SW = $0400;
- {$EXTERNALSYM ECP_SW}
- ECP_ANY = $0780;
- {$EXTERNALSYM ECP_ANY}
-
-implementation
-
-end.
+{******************************************************************************}
+{ }
+{ Parallel Port Driver Interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2003 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: ntddpar.h , released June 2000. The original Pascal }
+{ code is: JwaNtDdPar, released December 2003. The initial developer of the }
+{ Pascal code is Pasha Sivtsov (ps4me att mail dott ru). }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwantddpar.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaNtDdPar;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "ntddk.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaWinType, JwaWinIoctl;
+
+const
+ // Parallel port device GUIDs
+ GUID_DEVINTERFACE_PARALLEL: TGUID = (
+ D1:$97F76EF0; D2:$F883; D3:$11D0; D4:($AF,$1F,$00,$00,$F8,$00,$84,$5C));
+ {$EXTERNALSYM GUID_DEVINTERFACE_PARALLEL}
+ GUID_DEVINTERFACE_PARCLASS: TGUID = (
+ D1:$811FC6A5; D2:$F728; D3:$11D0; D4:($A5,$37,$00,$00,$F8,$75,$3E,$D1));
+ {$EXTERNALSYM GUID_DEVINTERFACE_PARCLASS}
+
+ GUID_PARALLEL_DEVICE: TGUID = (
+ D1:$97F76EF0; D2:$F883; D3:$11D0; D4:($AF,$1F,$00,$00,$F8,$00,$84,$5C));
+ {$EXTERNALSYM GUID_PARALLEL_DEVICE}
+ GUID_PARCLASS_DEVICE: TGUID = (
+ D1:$811FC6A5; D2:$F728; D3:$11D0; D4:($A5,$37,$00,$00,$F8,$75,$3E,$D1));
+ {$EXTERNALSYM GUID_PARCLASS_DEVICE}
+
+ IOCTL_IEEE1284_GET_MODE = (
+ (FILE_DEVICE_PARALLEL_PORT shl 16) or (FILE_ANY_ACCESS shl 14) or
+ (5 shl 2) or METHOD_BUFFERED);
+ {$EXTERNALSYM IOCTL_IEEE1284_GET_MODE}
+ IOCTL_IEEE1284_NEGOTIATE = (
+ (FILE_DEVICE_PARALLEL_PORT shl 16) or (FILE_ANY_ACCESS shl 14) or
+ (6 shl 2) or METHOD_BUFFERED);
+ {$EXTERNALSYM IOCTL_IEEE1284_NEGOTIATE}
+ IOCTL_PAR_GET_DEFAULT_MODES = (
+ (FILE_DEVICE_PARALLEL_PORT shl 16) or (FILE_ANY_ACCESS shl 14) or
+ (10 shl 2) or METHOD_BUFFERED);
+ {$EXTERNALSYM IOCTL_PAR_GET_DEFAULT_MODES}
+ IOCTL_PAR_GET_DEVICE_CAPS = (
+ (FILE_DEVICE_PARALLEL_PORT shl 16) or (FILE_ANY_ACCESS shl 14) or
+ (9 shl 2) or METHOD_BUFFERED);
+ {$EXTERNALSYM IOCTL_PAR_GET_DEVICE_CAPS}
+ IOCTL_PAR_IS_PORT_FREE = (
+ (FILE_DEVICE_PARALLEL_PORT shl 16) or (FILE_ANY_ACCESS shl 14) or
+ (21 shl 2) or METHOD_BUFFERED);
+ {$EXTERNALSYM IOCTL_PAR_IS_PORT_FREE}
+ IOCTL_PAR_QUERY_DEVICE_ID = (
+ (FILE_DEVICE_PARALLEL_PORT shl 16) or (FILE_ANY_ACCESS shl 14) or
+ (3 shl 2) or METHOD_BUFFERED);
+ {$EXTERNALSYM IOCTL_PAR_QUERY_DEVICE_ID}
+ IOCTL_PAR_QUERY_DEVICE_ID_SIZE = (
+ (FILE_DEVICE_PARALLEL_PORT shl 16) or (FILE_ANY_ACCESS shl 14) or
+ (4 shl 2) or METHOD_BUFFERED);
+ {$EXTERNALSYM IOCTL_PAR_QUERY_DEVICE_ID_SIZE}
+ IOCTL_PAR_QUERY_INFORMATION = (
+ (FILE_DEVICE_PARALLEL_PORT shl 16) or (FILE_ANY_ACCESS shl 14) or
+ (1 shl 2) or METHOD_BUFFERED);
+ {$EXTERNALSYM IOCTL_PAR_QUERY_INFORMATION}
+ IOCTL_PAR_QUERY_LOCATION = (
+ (FILE_DEVICE_PARALLEL_PORT shl 16) or (FILE_ANY_ACCESS shl 14) or
+ (22 shl 2) or METHOD_BUFFERED);
+ {$EXTERNALSYM IOCTL_PAR_QUERY_LOCATION}
+ IOCTL_PAR_QUERY_RAW_DEVICE_ID = (
+ (FILE_DEVICE_PARALLEL_PORT shl 16) or (FILE_ANY_ACCESS shl 14) or
+ (12 shl 2) or METHOD_BUFFERED);
+ {$EXTERNALSYM IOCTL_PAR_QUERY_RAW_DEVICE_ID}
+ IOCTL_PAR_SET_INFORMATION = (
+ (FILE_DEVICE_PARALLEL_PORT shl 16) or (FILE_ANY_ACCESS shl 14) or
+ (2 shl 2) or METHOD_BUFFERED);
+ {$EXTERNALSYM IOCTL_PAR_SET_INFORMATION}
+ IOCTL_PAR_SET_READ_ADDRESS = (
+ (FILE_DEVICE_PARALLEL_PORT shl 16) or (FILE_ANY_ACCESS shl 14) or
+ (8 shl 2) or METHOD_BUFFERED);
+ {$EXTERNALSYM IOCTL_PAR_SET_READ_ADDRESS}
+ IOCTL_PAR_SET_WRITE_ADDRESS = (
+ (FILE_DEVICE_PARALLEL_PORT shl 16) or (FILE_ANY_ACCESS shl 14) or
+ (7 shl 2) or METHOD_BUFFERED);
+ {$EXTERNALSYM IOCTL_PAR_SET_WRITE_ADDRESS}
+
+type
+ PPAR_DEVICE_ID_SIZE_INFORMATION = ^PAR_DEVICE_ID_SIZE_INFORMATION;
+ {$EXTERNALSYM PPAR_DEVICE_ID_SIZE_INFORMATION}
+ _PAR_DEVICE_ID_SIZE_INFORMATION = record
+ DeviceIdSize: ULONG;
+ end;
+ {$EXTERNALSYM _PAR_DEVICE_ID_SIZE_INFORMATION}
+ PAR_DEVICE_ID_SIZE_INFORMATION = _PAR_DEVICE_ID_SIZE_INFORMATION;
+ {$EXTERNALSYM PAR_DEVICE_ID_SIZE_INFORMATION}
+ TParDeviceIdSizeInformation = PAR_DEVICE_ID_SIZE_INFORMATION;
+ PParDeviceIdSizeInformation = PPAR_DEVICE_ID_SIZE_INFORMATION;
+
+const
+ PARALLEL_INIT = $01;
+ {$EXTERNALSYM PARALLEL_INIT}
+ PARALLEL_AUTOFEED = $02;
+ {$EXTERNALSYM PARALLEL_AUTOFEED}
+ PARALLEL_PAPER_EMPTY = $04;
+ {$EXTERNALSYM PARALLEL_PAPER_EMPTY}
+ PARALLEL_OFF_LINE = $08;
+ {$EXTERNALSYM PARALLEL_OFF_LINE}
+ PARALLEL_POWER_OFF = $10;
+ {$EXTERNALSYM PARALLEL_POWER_OFF}
+ PARALLEL_NOT_CONNECTED = $20;
+ {$EXTERNALSYM PARALLEL_NOT_CONNECTED}
+ PARALLEL_BUSY = $40;
+ {$EXTERNALSYM PARALLEL_BUSY}
+ PARALLEL_SELECTED = $80;
+ {$EXTERNALSYM PARALLEL_SELECTED}
+
+type
+ PPAR_QUERY_INFORMATION = ^PAR_QUERY_INFORMATION;
+ {$EXTERNALSYM PPAR_QUERY_INFORMATION}
+ _PAR_QUERY_INFORMATION = record
+ Status: UCHAR;
+ end;
+ {$EXTERNALSYM _PAR_QUERY_INFORMATION}
+ PAR_QUERY_INFORMATION = _PAR_QUERY_INFORMATION;
+ {$EXTERNALSYM PAR_QUERY_INFORMATION}
+ TParQueryInformation = PAR_QUERY_INFORMATION;
+ PParQueryInformation = PPAR_QUERY_INFORMATION;
+
+ PPAR_SET_INFORMATION = ^PAR_SET_INFORMATION;
+ {$EXTERNALSYM PPAR_SET_INFORMATION}
+ _PAR_SET_INFORMATION = record
+ Init: UCHAR;
+ end;
+ {$EXTERNALSYM _PAR_SET_INFORMATION}
+ PAR_SET_INFORMATION = _PAR_SET_INFORMATION;
+ {$EXTERNALSYM PAR_SET_INFORMATION}
+ TParSetInformation = PAR_SET_INFORMATION;
+ PParSetInformation = PPAR_SET_INFORMATION;
+
+ PPARCLASS_NEGOTIATION_MASK = ^PARCLASS_NEGOTIATION_MASK;
+ {$EXTERNALSYM PPARCLASS_NEGOTIATION_MASK}
+ _PARCLASS_NEGOTIATION_MASK = record
+ usReadMask: USHORT;
+ usWriteMask: USHORT;
+ end;
+ {$EXTERNALSYM _PARCLASS_NEGOTIATION_MASK}
+ PARCLASS_NEGOTIATION_MASK = _PARCLASS_NEGOTIATION_MASK;
+ {$EXTERNALSYM PARCLASS_NEGOTIATION_MASK}
+ TParClassNegotiationMask = PARCLASS_NEGOTIATION_MASK;
+ PParClassNegotiationMask = PPARCLASS_NEGOTIATION_MASK;
+
+const
+ NONE = $0000;
+ {$EXTERNALSYM NONE}
+ CENTRONICS = $0001;
+ {$EXTERNALSYM CENTRONICS}
+ IEEE_COMPATIBILITY = $0002;
+ {$EXTERNALSYM IEEE_COMPATIBILITY}
+ NIBBLE = $0004;
+ {$EXTERNALSYM NIBBLE}
+ CHANNEL_NIBBLE = $0008;
+ {$EXTERNALSYM CHANNEL_NIBBLE}
+ BYTE_BIDIR = $0010;
+ {$EXTERNALSYM BYTE_BIDIR}
+ EPP_HW = $0020;
+ {$EXTERNALSYM EPP_HW}
+ EPP_SW = $0040;
+ {$EXTERNALSYM EPP_SW}
+ EPP_ANY = $0060;
+ {$EXTERNALSYM EPP_ANY}
+ BOUNDED_ECP = $0080;
+ {$EXTERNALSYM BOUNDED_ECP}
+ ECP_HW_NOIRQ = $0100;
+ {$EXTERNALSYM ECP_HW_NOIRQ}
+ ECP_HW_IRQ = $0200;
+ {$EXTERNALSYM ECP_HW_IRQ}
+ ECP_SW = $0400;
+ {$EXTERNALSYM ECP_SW}
+ ECP_ANY = $0780;
+ {$EXTERNALSYM ECP_ANY}
+
+implementation
+
+end.
diff --git a/packages/extra/winunits/jwantdsapi.pas b/packages/extra/winunits/jwantdsapi.pas
index 512b3c71ac..a046c3c1bd 100644
--- a/packages/extra/winunits/jwantdsapi.pas
+++ b/packages/extra/winunits/jwantdsapi.pas
@@ -1,5246 +1,5246 @@
-{******************************************************************************}
-{ }
-{ DC and Replication Management API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: ntdsapi.h, released June 2000. The original Pascal }
-{ code is: NtDsApi.pas, released December 2000. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwantdsapi.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaNtDsApi;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "ntdsapi.h"'}
-{$HPPEMIT ''}
-{$HPPEMIT 'typedef PDS_REPSYNCALL_ERRINFOW *PPDS_REPSYNCALL_ERRINFOW'}
-{$HPPEMIT 'typedef PDS_REPSYNCALL_ERRINFOA *PPDS_REPSYNCALL_ERRINFOA'}
-{$HPPEMIT '#ifdef UNICODE'}
-{$HPPEMIT 'typedef PPDS_REPSYNCALL_ERRINFOW PPDS_REPSYNCALL_ERRINFO'}
-{$HPPEMIT '#else'}
-{$HPPEMIT 'typedef PPDS_REPSYNCALL_ERRINFOA PPDS_REPSYNCALL_ERRINFO'}
-{$HPPEMIT '#endif'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaWinBase, JwaWinType, JwaWinNT, JwaWinNLS, JwaRpcDce, JwaSchedule;
-
-//////////////////////////////////////////////////////////////////////////
-// //
-// Data definitions //
-// //
-//////////////////////////////////////////////////////////////////////////
-
-// Following constants define the Active Directory Behavior
-// Version numbers.
-
-const
- DS_BEHAVIOR_WIN2000 = 0;
- {$EXTERNALSYM DS_BEHAVIOR_WIN2000}
- DS_BEHAVIOR_WIN_DOT_NET_WITH_MIXED_DOMAINS = 1;
- {$EXTERNALSYM DS_BEHAVIOR_WIN_DOT_NET_WITH_MIXED_DOMAINS}
- DS_BEHAVIOR_WIN_DOT_NET = 2;
- {$EXTERNALSYM DS_BEHAVIOR_WIN_DOT_NET}
-
- // (MAKELCID(MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), SORT_DEFAULT))
- DS_DEFAULT_LOCALE = DWORD((DWORD(SORT_DEFAULT) shl 16) or ((SUBLANG_ENGLISH_US shl 10) or LANG_ENGLISH));
- {$EXTERNALSYM DS_DEFAULT_LOCALE}
-
- DS_DEFAULT_LOCALE_COMPARE_FLAGS = (NORM_IGNORECASE or NORM_IGNOREKANATYPE or
- NORM_IGNORENONSPACE or NORM_IGNOREWIDTH or SORT_STRINGSORT);
- {$EXTERNALSYM DS_DEFAULT_LOCALE_COMPARE_FLAGS}
-
-// When booted to DS mode, this event is signalled when the DS has completed
-// its initial sync attempts. The period of time between system startup and
-// this event's state being set is indeterminate from the local service's
-// standpoint. In the meantime the contents of the DS should be considered
-// incomplete / out-dated, and the machine will not be advertised as a domain
-// controller to off-machine clients. Other local services that rely on
-// information published in the DS should avoid accessing (or at least
-// relying on) the contents of the DS until this event is set.
-
- DS_SYNCED_EVENT_NAME = 'NTDSInitialSyncsCompleted';
- {$EXTERNALSYM DS_SYNCED_EVENT_NAME}
- DS_SYNCED_EVENT_NAME_W = 'NTDSInitialSyncsCompleted';
- {$EXTERNALSYM DS_SYNCED_EVENT_NAME_W}
-
-// Permissions bits used in security descriptors in the directory.
-
- ACTRL_DS_OPEN = $00000000;
- {$EXTERNALSYM ACTRL_DS_OPEN}
- ACTRL_DS_CREATE_CHILD = $00000001;
- {$EXTERNALSYM ACTRL_DS_CREATE_CHILD}
- ACTRL_DS_DELETE_CHILD = $00000002;
- {$EXTERNALSYM ACTRL_DS_DELETE_CHILD}
- ACTRL_DS_LIST = $00000004;
- {$EXTERNALSYM ACTRL_DS_LIST}
- ACTRL_DS_SELF = $00000008;
- {$EXTERNALSYM ACTRL_DS_SELF}
- ACTRL_DS_READ_PROP = $00000010;
- {$EXTERNALSYM ACTRL_DS_READ_PROP}
- ACTRL_DS_WRITE_PROP = $00000020;
- {$EXTERNALSYM ACTRL_DS_WRITE_PROP}
- ACTRL_DS_DELETE_TREE = $00000040;
- {$EXTERNALSYM ACTRL_DS_DELETE_TREE}
- ACTRL_DS_LIST_OBJECT = $00000080;
- {$EXTERNALSYM ACTRL_DS_LIST_OBJECT}
- ACTRL_DS_CONTROL_ACCESS = $00000100;
- {$EXTERNALSYM ACTRL_DS_CONTROL_ACCESS}
-
-// generic read
-
- DS_GENERIC_READ = STANDARD_RIGHTS_READ or ACTRL_DS_LIST or ACTRL_DS_READ_PROP or
- ACTRL_DS_LIST_OBJECT;
- {$EXTERNALSYM DS_GENERIC_READ}
-
-// generic execute
-
- DS_GENERIC_EXECUTE = STANDARD_RIGHTS_EXECUTE or ACTRL_DS_LIST;
- {$EXTERNALSYM DS_GENERIC_EXECUTE}
-
-// generic right
-
- DS_GENERIC_WRITE = STANDARD_RIGHTS_WRITE or ACTRL_DS_SELF or ACTRL_DS_WRITE_PROP;
- {$EXTERNALSYM DS_GENERIC_WRITE}
-
-// generic all
-
- DS_GENERIC_ALL = STANDARD_RIGHTS_REQUIRED or ACTRL_DS_CREATE_CHILD or
- ACTRL_DS_DELETE_CHILD or ACTRL_DS_DELETE_TREE or ACTRL_DS_READ_PROP or
- ACTRL_DS_WRITE_PROP or ACTRL_DS_LIST or ACTRL_DS_LIST_OBJECT or
- ACTRL_DS_CONTROL_ACCESS or ACTRL_DS_SELF;
- {$EXTERNALSYM DS_GENERIC_ALL}
-
-type
- DS_NAME_FORMAT = (
- // unknown name type
- DS_UNKNOWN_NAME,
-
- // eg: CN=User Name,OU=Users,DC=Example,DC=Microsoft,DC=Com
- DS_FQDN_1779_NAME,
-
- // eg: Exmaple\UserName
- // Domain-only version includes trailing '\\'.
- DS_NT4_ACCOUNT_NAME,
-
- // Probably "User Name" but could be something else. I.e. The
- // display name is not necessarily the defining RDN.
- DS_DISPLAY_NAME,
-
- // obsolete - see #define later
- // DS_DOMAIN_SIMPLE_NAME,
- DS_STUB_4,
-
- // obsolete - see #define later
- // DS_ENTERPRISE_SIMPLE_NAME,
- DS_STUB_5,
-
- // String-ized GUID as returned by IIDFromString().
- // eg: {4fa050f0-f561-11cf-bdd9-00aa003a77b6}
- DS_UNIQUE_ID_NAME,
-
- // eg: example.microsoft.com/software/user name
- // Domain-only version includes trailing '/'.
- DS_CANONICAL_NAME,
-
- // eg: usern@example.microsoft.com
- DS_USER_PRINCIPAL_NAME,
-
- // Same as DS_CANONICAL_NAME except that rightmost '/' is
- // replaced with '\n' - even in domain-only case.
- // eg: example.microsoft.com/software\nuser name
- DS_CANONICAL_NAME_EX,
-
- // eg: www/www.microsoft.com@example.com - generalized service principal
- // names.
- DS_SERVICE_PRINCIPAL_NAME,
-
- // This is the string representation of a SID. Invalid for formatDesired.
- // See sddl.h for SID binary <--> text conversion routines.
- // eg: S-1-5-21-397955417-626881126-188441444-501
- DS_SID_OR_SID_HISTORY_NAME,
-
- // Pseudo-name format so GetUserNameEx can return the DNS domain name to
- // a caller. This level is not supported by the DS APIs.
- DS_DNS_DOMAIN_NAME);
- {$EXTERNALSYM DS_NAME_FORMAT}
- TDsNameFormat = DS_NAME_FORMAT;
-
-// Map old name formats to closest new format so that old code builds
-// against new headers w/o errors and still gets (almost) correct result.
-
-const
- DS_DOMAIN_SIMPLE_NAME = DS_USER_PRINCIPAL_NAME;
- {$EXTERNALSYM DS_DOMAIN_SIMPLE_NAME}
- DS_ENTERPRISE_SIMPLE_NAME = DS_USER_PRINCIPAL_NAME;
- {$EXTERNALSYM DS_ENTERPRISE_SIMPLE_NAME}
-
-type
- DS_NAME_FLAGS = DWORD;
- {$EXTERNALSYM DS_NAME_FLAGS}
- TDsNameFlags = DS_NAME_FLAGS;
-
-const
- DS_NAME_NO_FLAGS = $0;
- {$EXTERNALSYM DS_NAME_NO_FLAGS}
-
- // Perform a syntactical mapping at the client (if possible) without
- // going out on the wire. Returns DS_NAME_ERROR_NO_SYNTACTICAL_MAPPING
- // if a purely syntactical mapping is not possible.
- DS_NAME_FLAG_SYNTACTICAL_ONLY = $1;
- {$EXTERNALSYM DS_NAME_FLAG_SYNTACTICAL_ONLY}
-
- // Force a trip to the DC for evaluation, even if this could be
- // locally cracked syntactically.
- DS_NAME_FLAG_EVAL_AT_DC = $2;
- {$EXTERNALSYM DS_NAME_FLAG_EVAL_AT_DC}
-
- // The call fails if the DC is not a GC
- DS_NAME_FLAG_GCVERIFY = $4;
- {$EXTERNALSYM DS_NAME_FLAG_GCVERIFY}
-
- // Enable cross forest trust referral
- DS_NAME_FLAG_TRUST_REFERRAL = $8;
- {$EXTERNALSYM DS_NAME_FLAG_TRUST_REFERRAL}
-
-type
- DS_NAME_ERROR = (
- DS_NAME_NO_ERROR,
-
- // Generic processing error.
- DS_NAME_ERROR_RESOLVING,
-
- // Couldn't find the name at all - or perhaps caller doesn't have
- // rights to see it.
- DS_NAME_ERROR_NOT_FOUND,
-
- // Input name mapped to more than one output name.
- DS_NAME_ERROR_NOT_UNIQUE,
-
- // Input name found, but not the associated output format.
- // Can happen if object doesn't have all the required attributes.
- DS_NAME_ERROR_NO_MAPPING,
-
- // Unable to resolve entire name, but was able to determine which
- // domain object resides in. Thus DS_NAME_RESULT_ITEM?.pDomain
- // is valid on return.
- DS_NAME_ERROR_DOMAIN_ONLY,
-
- // Unable to perform a purely syntactical mapping at the client
- // without going out on the wire.
- DS_NAME_ERROR_NO_SYNTACTICAL_MAPPING,
-
- // The name is from an external trusted forest.
- DS_NAME_ERROR_TRUST_REFERRAL);
- {$EXTERNALSYM DS_NAME_ERROR}
- TDsNameError = DS_NAME_ERROR;
-
-const
- DS_NAME_LEGAL_FLAGS = DS_NAME_FLAG_SYNTACTICAL_ONLY;
- {$EXTERNALSYM DS_NAME_LEGAL_FLAGS}
-
-type
- DS_SPN_NAME_TYPE = (
-
- // "paulle-nec.ntwksta.ms.com"
- DS_SPN_DNS_HOST,
-
- // "cn=paulle-nec,ou=computers,dc=ntwksta,dc=ms,dc=com"
- DS_SPN_DN_HOST,
-
- // "paulle-nec"
- DS_SPN_NB_HOST,
-
- // "ntdev.ms.com"
- DS_SPN_DOMAIN,
-
- // "ntdev"
- DS_SPN_NB_DOMAIN,
-
- // "cn=anRpcService,cn=RPC Services,cn=system,dc=ms,dc=com"
- // "cn=aWsService,cn=Winsock Services,cn=system,dc=ms,dc=com"
- // "cn=aService,dc=itg,dc=ms,dc=com"
- // "www.ms.com", "ftp.ms.com", "ldap.ms.com"
- // "products.ms.com"
- DS_SPN_SERVICE);
- {$EXTERNALSYM DS_SPN_NAME_TYPE}
- TDsSpnNameType = DS_SPN_NAME_TYPE;
-
- DS_SPN_WRITE_OP = (
- DS_SPN_ADD_SPN_OP, // add SPNs
- DS_SPN_REPLACE_SPN_OP, // set all SPNs
- DS_SPN_DELETE_SPN_OP); // Delete SPNs
- {$EXTERNALSYM DS_SPN_WRITE_OP}
- TDsSpnWriteOp = DS_SPN_WRITE_OP;
-
- PDS_NAME_RESULT_ITEMA = ^DS_NAME_RESULT_ITEMA;
- {$EXTERNALSYM PDS_NAME_RESULT_ITEMA}
- DS_NAME_RESULT_ITEMA = record
- status: DWORD; // DS_NAME_ERROR
- pDomain: LPSTR; // DNS domain
- pName: LPSTR; // name in requested format
- end;
- {$EXTERNALSYM DS_NAME_RESULT_ITEMA}
- TDsNameResultItemA = DS_NAME_RESULT_ITEMA;
- PDsNameResultItemA = PDS_NAME_RESULT_ITEMA;
-
- PDS_NAME_RESULTA = ^DS_NAME_RESULTA;
- {$EXTERNALSYM PDS_NAME_RESULTA}
- DS_NAME_RESULTA = record
- cItems: DWORD; // item count
- rItems: PDS_NAME_RESULT_ITEMA; // item array
- end;
- {$EXTERNALSYM DS_NAME_RESULTA}
- TDsNameResultA = DS_NAME_RESULTA;
- PDsNameResultA = PDS_NAME_RESULTA;
-
- PDS_NAME_RESULT_ITEMW = ^DS_NAME_RESULT_ITEMW;
- {$EXTERNALSYM PDS_NAME_RESULT_ITEMW}
- DS_NAME_RESULT_ITEMW = record
- status: DWORD; // DS_NAME_ERROR
- pDomain: LPWSTR; // DNS domain
- pName: LPWSTR; // name in requested format
- end;
- {$EXTERNALSYM DS_NAME_RESULT_ITEMW}
- TDsNameResultItemW = DS_NAME_RESULT_ITEMW;
- PDsNameResultItemW = PDS_NAME_RESULT_ITEMW;
-
- PDS_NAME_RESULTW = ^DS_NAME_RESULTW;
- {$EXTERNALSYM PDS_NAME_RESULTW}
- DS_NAME_RESULTW = record
- cItems: DWORD; // item count
- rItems: PDS_NAME_RESULT_ITEMW; // item array
- end;
- {$EXTERNALSYM DS_NAME_RESULTW}
- TDsNameResultW = DS_NAME_RESULTW;
- PDsNameResultW = PDS_NAME_RESULTW;
-
- {$IFDEF UNICODE}
- DS_NAME_RESULT = DS_NAME_RESULTW;
- {$EXTERNALSYM DS_NAME_RESULT}
- PDS_NAME_RESULT = PDS_NAME_RESULTW;
- {$EXTERNALSYM PDS_NAME_RESULT}
- DS_NAME_RESULT_ITEM = DS_NAME_RESULT_ITEMW;
- {$EXTERNALSYM DS_NAME_RESULT_ITEM}
- PDS_NAME_RESULT_ITEM = PDS_NAME_RESULT_ITEMW;
- {$EXTERNALSYM PDS_NAME_RESULT_ITEM}
- TDsNameResult = TDsNameResultW;
- PDsNameResult = PDsNameResultW;
- TDsNameResultItem = TDsNameResultItemW;
- PDsNameResultItem = PDsNameResultItemW;
- {$ELSE}
- DS_NAME_RESULT = DS_NAME_RESULTA;
- {$EXTERNALSYM DS_NAME_RESULT}
- PDS_NAME_RESULT = PDS_NAME_RESULTA;
- {$EXTERNALSYM PDS_NAME_RESULT}
- DS_NAME_RESULT_ITEM = DS_NAME_RESULT_ITEMA;
- {$EXTERNALSYM DS_NAME_RESULT_ITEM}
- PDS_NAME_RESULT_ITEM = PDS_NAME_RESULT_ITEMA;
- {$EXTERNALSYM PDS_NAME_RESULT_ITEM}
- TDsNameResult = TDsNameResultA;
- PDsNameResult = PDsNameResultA;
- TDsNameResultItem = TDsNameResultItemA;
- PDsNameResultItem = PDsNameResultItemA;
- {$ENDIF UNICODE}
-
-// Public replication option flags
-
-// ********************
-// DsBindWithSpnEx flags
-// ********************
-// Allow the Bind to use delegate service level, so that you can
-// do ntdsapi operations that require delegation, such as
-// DsAddSidHistory, and DsReplicaSyncAll(). Most operations do
-// not require DELEGATE so this flag should only be specified
-// if you need it, because if you bind to a rogue server with
-// the DELEGATE flag, you'll allow the rogue server to use your
-// credentials to connect back to a non-rogue server and perform
-// operations other than you intended.
-
-const
- NTDSAPI_BIND_ALLOW_DELEGATION = $00000001;
- {$EXTERNALSYM NTDSAPI_BIND_ALLOW_DELEGATION}
-
-// ********************
-// Replica Sync flags
-// These flag values are used both as input to DsReplicaSync and
-// as output from DsReplicaGetInfo, PENDING_OPS, DS_REPL_OPW.ulOptions
-// ********************
-
-// Perform this operation asynchronously.
-// Required when using DS_REPSYNC_ALL_SOURCES
-
-const
- DS_REPSYNC_ASYNCHRONOUS_OPERATION = $00000001;
- {$EXTERNALSYM DS_REPSYNC_ASYNCHRONOUS_OPERATION}
-
-// Writeable replica. Otherwise, read-only.
-
- DS_REPSYNC_WRITEABLE = $00000002;
- {$EXTERNALSYM DS_REPSYNC_WRITEABLE}
-
-// This is a periodic sync request as scheduled by the admin.
-
- DS_REPSYNC_PERIODIC = $00000004;
- {$EXTERNALSYM DS_REPSYNC_PERIODIC}
-
-// Use inter-site messaging
-
- DS_REPSYNC_INTERSITE_MESSAGING = $00000008;
- {$EXTERNALSYM DS_REPSYNC_INTERSITE_MESSAGING}
-
-// Sync from all sources.
-
- DS_REPSYNC_ALL_SOURCES = $00000010;
- {$EXTERNALSYM DS_REPSYNC_ALL_SOURCES}
-
-// Sync starting from scratch (i.e., at the first USN).
-
- DS_REPSYNC_FULL = $00000020;
- {$EXTERNALSYM DS_REPSYNC_FULL}
-
-// This is a notification of an update that was marked urgent.
-
- DS_REPSYNC_URGENT = $00000040;
- {$EXTERNALSYM DS_REPSYNC_URGENT}
-
-// Don't discard this synchronization request, even if a similar
-// sync is pending.
-
- DS_REPSYNC_NO_DISCARD = $00000080;
- {$EXTERNALSYM DS_REPSYNC_NO_DISCARD}
-
-// Sync even if link is currently disabled.
-
- DS_REPSYNC_FORCE = $00000100;
- {$EXTERNALSYM DS_REPSYNC_FORCE}
-
-// Causes the source DSA to check if a reps-to is present for the local DSA
-// (aka the destination). If not, one is added. This ensures that
-// source sends change notifications.
-
- DS_REPSYNC_ADD_REFERENCE = $00000200;
- {$EXTERNALSYM DS_REPSYNC_ADD_REFERENCE}
-
-// A sync from this source has never completed (e.g., a new source).
-
- DS_REPSYNC_NEVER_COMPLETED = $00000400;
- {$EXTERNALSYM DS_REPSYNC_NEVER_COMPLETED}
-
-// When this sync is complete, requests a sync in the opposite direction.
-
- DS_REPSYNC_TWO_WAY = $00000800;
- {$EXTERNALSYM DS_REPSYNC_TWO_WAY}
-
-// Do not request change notifications from this source.
- DS_REPSYNC_NEVER_NOTIFY = $00001000;
- {$EXTERNALSYM DS_REPSYNC_NEVER_NOTIFY}
-
-// Sync the NC from this source when the DSA is started.
- DS_REPSYNC_INITIAL = $00002000;
- {$EXTERNALSYM DS_REPSYNC_INITIAL}
-
-// Use compression when replicating. Saves message size (e.g., network
-// bandwidth) at the expense of extra CPU overhead at both the source and
-// destination servers.
- DS_REPSYNC_USE_COMPRESSION = $00004000;
- {$EXTERNALSYM DS_REPSYNC_USE_COMPRESSION}
-
-// Sync was abandoned for lack of updates
- DS_REPSYNC_ABANDONED = $00008000;
- {$EXTERNALSYM DS_REPSYNC_ABANDONED}
-
-// Initial sync in progress
- DS_REPSYNC_INITIAL_IN_PROGRESS = $00010000;
- {$EXTERNALSYM DS_REPSYNC_INITIAL_IN_PROGRESS}
-
-// Partial Attribute Set sync in progress
- DS_REPSYNC_PARTIAL_ATTRIBUTE_SET = $00020000;
- {$EXTERNALSYM DS_REPSYNC_PARTIAL_ATTRIBUTE_SET}
-
-// Sync is being retried
- DS_REPSYNC_REQUEUE = $00040000;
- {$EXTERNALSYM DS_REPSYNC_REQUEUE}
-
-// Sync is a notification request from a source
- DS_REPSYNC_NOTIFICATION = $00080000;
- {$EXTERNALSYM DS_REPSYNC_NOTIFICATION}
-
-// Sync is a special form which requests to establish contact
-// now and do the rest of the sync later
- DS_REPSYNC_ASYNCHRONOUS_REPLICA = $00100000;
- {$EXTERNALSYM DS_REPSYNC_ASYNCHRONOUS_REPLICA}
-
-// Request critical objects only
- DS_REPSYNC_CRITICAL = $00200000;
- {$EXTERNALSYM DS_REPSYNC_CRITICAL}
-
-// A full synchronization is in progress
- DS_REPSYNC_FULL_IN_PROGRESS = $00400000;
- {$EXTERNALSYM DS_REPSYNC_FULL_IN_PROGRESS}
-
-// Synchronization request was previously preempted
- DS_REPSYNC_PREEMPTED = $00800000;
- {$EXTERNALSYM DS_REPSYNC_PREEMPTED}
-
-// ********************
-// Replica Add flags
-// ********************
-
-// Perform this operation asynchronously.
-
- DS_REPADD_ASYNCHRONOUS_OPERATION = $00000001;
- {$EXTERNALSYM DS_REPADD_ASYNCHRONOUS_OPERATION}
-
-// Create a writeable replica. Otherwise, read-only.
-
- DS_REPADD_WRITEABLE = $00000002;
- {$EXTERNALSYM DS_REPADD_WRITEABLE}
-
-// Sync the NC from this source when the DSA is started.
-
- DS_REPADD_INITIAL = $00000004;
- {$EXTERNALSYM DS_REPADD_INITIAL}
-
-// Sync the NC from this source periodically, as defined by the
-// schedule passed in the preptimesSync argument.
-
- DS_REPADD_PERIODIC = $00000008;
- {$EXTERNALSYM DS_REPADD_PERIODIC}
-
-// Sync from the source DSA via an Intersite Messaging Service (ISM) transport
-// (e.g., SMTP) rather than native DS RPC.
-
- DS_REPADD_INTERSITE_MESSAGING = $00000010;
- {$EXTERNALSYM DS_REPADD_INTERSITE_MESSAGING}
-
-// Don't replicate the NC now -- just save enough state such that we
-// know to replicate it later.
-
- DS_REPADD_ASYNCHRONOUS_REPLICA = $00000020;
- {$EXTERNALSYM DS_REPADD_ASYNCHRONOUS_REPLICA}
-
-// Disable notification-based synchronization for the NC from this source.
-// This is expected to be a temporary state; the similar flag
-// DS_REPADD_NEVER_NOTIFY should be used if the disable is to be more permanent.
-
- DS_REPADD_DISABLE_NOTIFICATION = $00000040;
- {$EXTERNALSYM DS_REPADD_DISABLE_NOTIFICATION}
-
-// Disable periodic synchronization for the NC from this source
-
- DS_REPADD_DISABLE_PERIODIC = $00000080;
- {$EXTERNALSYM DS_REPADD_DISABLE_PERIODIC}
-
-// Use compression when replicating. Saves message size (e.g., network
-// bandwidth) at the expense of extra CPU overhead at both the source and
-// destination servers.
-
- DS_REPADD_USE_COMPRESSION = $00000100;
- {$EXTERNALSYM DS_REPADD_USE_COMPRESSION}
-
-// Do not request change notifications from this source. When this flag is
-// set, the source will not notify the destination when changes occur.
-// Recommended for all intersite replication, which may occur over WAN links.
-// This is expected to be a more or less permanent state; the similar flag
-// DS_REPADD_DISABLE_NOTIFICATION should be used if notifications are to be
-// disabled only temporarily.
-
- DS_REPADD_NEVER_NOTIFY = $00000200;
- {$EXTERNALSYM DS_REPADD_NEVER_NOTIFY}
-
-// When this sync is complete, requests a sync in the opposite direction.
- DS_REPADD_TWO_WAY = $00000400;
- {$EXTERNALSYM DS_REPADD_TWO_WAY}
-
-// Request critical objects only
-// Critical only is only allowed while installing
-// A critical only sync does not bring all objects in the partition. It
-// replicates just the ones necessary for minimal directory operation.
-// A normal, non-critical sync must be performed before the partition
-// can be considered fully synchronized.
- DS_REPADD_CRITICAL = $00000800;
- {$EXTERNALSYM DS_REPADD_CRITICAL}
-
-// ********************
-// Replica Delete flags
-// ********************
-
-// Perform this operation asynchronously.
-
- DS_REPDEL_ASYNCHRONOUS_OPERATION = $00000001;
- {$EXTERNALSYM DS_REPDEL_ASYNCHRONOUS_OPERATION}
-
-// The replica being deleted is writeable.
-
- DS_REPDEL_WRITEABLE = $00000002;
- {$EXTERNALSYM DS_REPDEL_WRITEABLE}
-
-// Replica is a mail-based replica
-
- DS_REPDEL_INTERSITE_MESSAGING = $00000004;
- {$EXTERNALSYM DS_REPDEL_INTERSITE_MESSAGING}
-
-// Ignore any error generated by contacting the source to tell it to scratch
-// this server from its Reps-To for this NC.
-
- DS_REPDEL_IGNORE_ERRORS = $00000008;
- {$EXTERNALSYM DS_REPDEL_IGNORE_ERRORS}
-
-// Do not contact the source telling it to scratch this server from its
-// Rep-To for this NC. Otherwise, if the link is RPC-based, the source will
-// be contacted.
-
- DS_REPDEL_LOCAL_ONLY = $00000010;
- {$EXTERNALSYM DS_REPDEL_LOCAL_ONLY}
-
-// Delete all the objects in the NC
-// "No source" is incompatible with (and rejected for) writeable NCs. This is
-// valid only for read-only NCs, and then only if the NC has no source. This
-// can occur when the NC has been partially deleted (in which case the KCC
-// periodically calls the delete API with the "no source" flag set).
-
- DS_REPDEL_NO_SOURCE = $00000020;
- {$EXTERNALSYM DS_REPDEL_NO_SOURCE}
-
-// Allow deletion of read-only replica even if it sources
-// other read-only replicas.
-
- DS_REPDEL_REF_OK = $00000040;
- {$EXTERNALSYM DS_REPDEL_REF_OK}
-
-// ********************
-// Replica Modify flags
-// ********************
-
-// Perform this operation asynchronously.
-
- DS_REPMOD_ASYNCHRONOUS_OPERATION = $00000001;
- {$EXTERNALSYM DS_REPMOD_ASYNCHRONOUS_OPERATION}
-
-// The replica is writeable.
-
- DS_REPMOD_WRITEABLE = $00000002;
- {$EXTERNALSYM DS_REPMOD_WRITEABLE}
-
-// ********************
-// Replica Modify fields
-// ********************
-
- DS_REPMOD_UPDATE_FLAGS = $00000001;
- {$EXTERNALSYM DS_REPMOD_UPDATE_FLAGS}
- DS_REPMOD_UPDATE_ADDRESS = $00000002;
- {$EXTERNALSYM DS_REPMOD_UPDATE_ADDRESS}
- DS_REPMOD_UPDATE_SCHEDULE = $00000004;
- {$EXTERNALSYM DS_REPMOD_UPDATE_SCHEDULE}
- DS_REPMOD_UPDATE_RESULT = $00000008;
- {$EXTERNALSYM DS_REPMOD_UPDATE_RESULT}
- DS_REPMOD_UPDATE_TRANSPORT = $00000010;
- {$EXTERNALSYM DS_REPMOD_UPDATE_TRANSPORT}
-
-// ********************
-// Update Refs fields
-// ********************
-
-// Perform this operation asynchronously.
-
- DS_REPUPD_ASYNCHRONOUS_OPERATION = $00000001;
- {$EXTERNALSYM DS_REPUPD_ASYNCHRONOUS_OPERATION}
-
-// The replica being deleted is writeable.
-
- DS_REPUPD_WRITEABLE = $00000002;
- {$EXTERNALSYM DS_REPUPD_WRITEABLE}
-
-// Add a reference
-
- DS_REPUPD_ADD_REFERENCE = $00000004;
- {$EXTERNALSYM DS_REPUPD_ADD_REFERENCE}
-
-// Remove a reference
-
- DS_REPUPD_DELETE_REFERENCE = $00000008;
- {$EXTERNALSYM DS_REPUPD_DELETE_REFERENCE}
-
-// ********************
-// NC Related Flags
-// ********************
-//
-// Instance Type bits, specifies flags for NC head creation.
-//
-
- DS_INSTANCETYPE_IS_NC_HEAD = $00000001; // This if what to specify on an object to indicate it's an NC Head.
- {$EXTERNALSYM DS_INSTANCETYPE_IS_NC_HEAD}
- DS_INSTANCETYPE_NC_IS_WRITEABLE = $00000004; // This is to indicate that the NC Head is writeable.
- {$EXTERNALSYM DS_INSTANCETYPE_NC_IS_WRITEABLE}
- DS_INSTANCETYPE_NC_COMING = $00000010; // This is to indicate that this NC is still replicating in objects to this DC, and may not be a complete NC.
- {$EXTERNALSYM DS_INSTANCETYPE_NC_COMING}
- DS_INSTANCETYPE_NC_GOING = $00000020; // This is to indicate that this NC is in the process of being removed from this DC, and may not be a complete NC.
- {$EXTERNALSYM DS_INSTANCETYPE_NC_GOING}
-
-// ********************
-// xxx_OPT_xxx Flags
-// ********************
-
-// These macros define bit flags which can be set in the "options" attribute
-// of objects of the specified object class.
-
-// Bit flags valid for options attribute on NTDS-DSA objects.
-//
-
- NTDSDSA_OPT_IS_GC = 1 shl 0; // DSA is a global catalog
- {$EXTERNALSYM NTDSDSA_OPT_IS_GC}
- NTDSDSA_OPT_DISABLE_INBOUND_REPL = 1 shl 1; // disable inbound replication
- {$EXTERNALSYM NTDSDSA_OPT_DISABLE_INBOUND_REPL}
- NTDSDSA_OPT_DISABLE_OUTBOUND_REPL = 1 shl 2; // disable outbound replication
- {$EXTERNALSYM NTDSDSA_OPT_DISABLE_OUTBOUND_REPL}
- NTDSDSA_OPT_DISABLE_NTDSCONN_XLATE = 1 shl 3; // disable logical conn xlation
- {$EXTERNALSYM NTDSDSA_OPT_DISABLE_NTDSCONN_XLATE}
-
-// Bit flags for options attribute on NTDS-Connection objects.
-//
-// The reasons that two bits are required to control notification are as follows.
-// We must support existing connections with the old behavior and the UI does not
-// create manual connections with the new bit set.
-// The default for existing and manually created connections with bits 2 and 3
-// clear must be the standard prior behavior: notification for intra-site and
-// no notification for inter-site.
-// We need a way to distinguish a old connection which desires the default
-// notification rules, and a new connection for which we desire to explicitly
-// control the notification state as passed down from a site link. Thus we
-// have a new bit to say we are overriding the default, and a new bit to indicate
-// what the overridden default shall be.
-//
-
- NTDSCONN_OPT_IS_GENERATED = 1 shl 0; // object generated by DS, not admin
- {$EXTERNALSYM NTDSCONN_OPT_IS_GENERATED}
- NTDSCONN_OPT_TWOWAY_SYNC = 1 shl 1; // force sync in opposite direction at end of sync
- {$EXTERNALSYM NTDSCONN_OPT_TWOWAY_SYNC}
- NTDSCONN_OPT_OVERRIDE_NOTIFY_DEFAULT = 1 shl 2; // Do not use defaults to determine notification
- {$EXTERNALSYM NTDSCONN_OPT_OVERRIDE_NOTIFY_DEFAULT}
- NTDSCONN_OPT_USE_NOTIFY = 1 shl 3; // Does source notify destination
- {$EXTERNALSYM NTDSCONN_OPT_USE_NOTIFY}
-
-// For intra-site connections, this bit has no meaning.
-// For inter-site connections, this bit means:
-// 0 - Compression of replication data enabled
-// 1 - Compression of replication data disabled
-
- NTDSCONN_OPT_DISABLE_INTERSITE_COMPRESSION = 1 shl 4;
- {$EXTERNALSYM NTDSCONN_OPT_DISABLE_INTERSITE_COMPRESSION}
-
-// For connections whose IS_GENERATED bit is 0, this bit has no effect.
-// For KCC-generated connections, this bit indicates that the schedule attribute
-// is owned by the user and should not be touched by the KCC.
-
- NTDSCONN_OPT_USER_OWNED_SCHEDULE = 1 shl 5;
- {$EXTERNALSYM NTDSCONN_OPT_USER_OWNED_SCHEDULE}
-
-//
-// The high 4 bits of the options attribute are used by NTFRS to assign priority
-// for inbound connections. Bit 31 is used to force FRS to ignore schedule during
-// the initial sync. Bits 30 - 28 are used to specify a priority between 0-7.
-//
-
- FRSCONN_PRIORITY_MASK = $70000000;
- {$EXTERNALSYM FRSCONN_PRIORITY_MASK}
- FRSCONN_MAX_PRIORITY = $8;
- {$EXTERNALSYM FRSCONN_MAX_PRIORITY}
-
- DSCONN_OPT_IGNORE_SCHEDULE_MASK = DWORD($80000000);
- {$EXTERNALSYM DSCONN_OPT_IGNORE_SCHEDULE_MASK}
-
-function NTDSCONN_IGNORE_SCHEDULE(_options_: DWORD): DWORD;
-{$EXTERNALSYM NTDSCONN_IGNORE_SCHEDULE}
-
-function FRSCONN_GET_PRIORITY(_options_: DWORD): DWORD;
-{$EXTERNALSYM FRSCONN_GET_PRIORITY}
-
-// Bit flags for options attribute on NTDS-Site-Settings objects.
-//
-
-const
- NTDSSETTINGS_OPT_IS_AUTO_TOPOLOGY_DISABLED = 1 shl 0; // automatic topology gen disabled
- {$EXTERNALSYM NTDSSETTINGS_OPT_IS_AUTO_TOPOLOGY_DISABLED}
- NTDSSETTINGS_OPT_IS_TOPL_CLEANUP_DISABLED = 1 shl 1; // automatic topology cleanup disabled
- {$EXTERNALSYM NTDSSETTINGS_OPT_IS_TOPL_CLEANUP_DISABLED}
- NTDSSETTINGS_OPT_IS_TOPL_MIN_HOPS_DISABLED = 1 shl 2; // automatic minimum hops topology disabled
- {$EXTERNALSYM NTDSSETTINGS_OPT_IS_TOPL_MIN_HOPS_DISABLED}
- NTDSSETTINGS_OPT_IS_TOPL_DETECT_STALE_DISABLED = 1 shl 3; // automatic stale server detection disabled
- {$EXTERNALSYM NTDSSETTINGS_OPT_IS_TOPL_DETECT_STALE_DISABLED}
- NTDSSETTINGS_OPT_IS_INTER_SITE_AUTO_TOPOLOGY_DISABLED = 1 shl 4; // automatic inter-site topology gen disabled
- {$EXTERNALSYM NTDSSETTINGS_OPT_IS_INTER_SITE_AUTO_TOPOLOGY_DISABLED}
- NTDSSETTINGS_OPT_IS_GROUP_CACHING_ENABLED = 1 shl 5; // group memberships for users enabled
- {$EXTERNALSYM NTDSSETTINGS_OPT_IS_GROUP_CACHING_ENABLED}
- NTDSSETTINGS_OPT_FORCE_KCC_WHISTLER_BEHAVIOR = 1 shl 6; // force KCC to operate in Whistler behavior mode
- {$EXTERNALSYM NTDSSETTINGS_OPT_FORCE_KCC_WHISTLER_BEHAVIOR}
- NTDSSETTINGS_OPT_FORCE_KCC_W2K_ELECTION = 1 shl 7; // force KCC to use the Windows 2000 ISTG election algorithm
- {$EXTERNALSYM NTDSSETTINGS_OPT_FORCE_KCC_W2K_ELECTION}
- NTDSSETTINGS_OPT_IS_RAND_BH_SELECTION_DISABLED = 1 shl 8; // prevent the KCC from randomly picking a bridgehead when creating a connection
- {$EXTERNALSYM NTDSSETTINGS_OPT_IS_RAND_BH_SELECTION_DISABLED}
- NTDSSETTINGS_OPT_IS_SCHEDULE_HASHING_ENABLED = 1 shl 9; // allow the KCC to use hashing when creating a replication schedule
- {$EXTERNALSYM NTDSSETTINGS_OPT_IS_SCHEDULE_HASHING_ENABLED}
-
-// Bit flags for options attribute on Inter-Site-Transport objects
-//
-// Note, the sense of the flag should be such that the default state or
-// behavior corresponds to the flag NOT being present. Put another way, the
-// flag should state the OPPOSITE of the default
-//
-// default: schedules are significant
-
- NTDSTRANSPORT_OPT_IGNORE_SCHEDULES = 1 shl 0; // Schedules disabled
- {$EXTERNALSYM NTDSTRANSPORT_OPT_IGNORE_SCHEDULES}
-
-// default: links transitive (bridges not required)
-
- NTDSTRANSPORT_OPT_BRIDGES_REQUIRED = 1 shl 1; // siteLink bridges are required
- {$EXTERNALSYM NTDSTRANSPORT_OPT_BRIDGES_REQUIRED}
-
-// Bit flags for options attribute on site-Connection objects
-//
-// These are not realized in the DS, but are built up in the KCC
-
- NTDSSITECONN_OPT_USE_NOTIFY = 1 shl 0; // Use notification on this link
- {$EXTERNALSYM NTDSSITECONN_OPT_USE_NOTIFY}
- NTDSSITECONN_OPT_TWOWAY_SYNC = 1 shl 1; // force sync in opposite direction at end of sync
- {$EXTERNALSYM NTDSSITECONN_OPT_TWOWAY_SYNC}
-
-// This bit means:
-// 0 - Compression of replication data across this site connection enabled
-// 1 - Compression of replication data across this site connection disabled
-
- NTDSSITECONN_OPT_DISABLE_COMPRESSION = 1 shl 2;
- {$EXTERNALSYM NTDSSITECONN_OPT_DISABLE_COMPRESSION}
-
-// Bit flags for options attribute on site-Link objects
-// Note that these options are AND-ed along a site-link path
-//
-
- NTDSSITELINK_OPT_USE_NOTIFY = 1 shl 0; // Use notification on this link
- {$EXTERNALSYM NTDSSITELINK_OPT_USE_NOTIFY}
- NTDSSITELINK_OPT_TWOWAY_SYNC = 1 shl 1; // force sync in opposite direction at end of sync
- {$EXTERNALSYM NTDSSITELINK_OPT_TWOWAY_SYNC}
-
-// This bit means:
-// 0 - Compression of replication data across this site link enabled
-// 1 - Compression of replication data across this site link disabled
-
- NTDSSITELINK_OPT_DISABLE_COMPRESSION = 1 shl 2;
- {$EXTERNALSYM NTDSSITELINK_OPT_DISABLE_COMPRESSION}
-
-// ***********************
-// Well Known Object Guids
-// ***********************
-
- GUID_USERS_CONTAINER_A = 'a9d1ca15768811d1aded00c04fd8d5cd';
- {$EXTERNALSYM GUID_USERS_CONTAINER_A}
- GUID_COMPUTRS_CONTAINER_A = 'aa312825768811d1aded00c04fd8d5cd';
- {$EXTERNALSYM GUID_COMPUTRS_CONTAINER_A}
- GUID_SYSTEMS_CONTAINER_A = 'ab1d30f3768811d1aded00c04fd8d5cd';
- {$EXTERNALSYM GUID_SYSTEMS_CONTAINER_A}
- GUID_DOMAIN_CONTROLLERS_CONTAINER_A = 'a361b2ffffd211d1aa4b00c04fd7d83a';
- {$EXTERNALSYM GUID_DOMAIN_CONTROLLERS_CONTAINER_A}
- GUID_INFRASTRUCTURE_CONTAINER_A = '2fbac1870ade11d297c400c04fd8d5cd';
- {$EXTERNALSYM GUID_INFRASTRUCTURE_CONTAINER_A}
- GUID_DELETED_OBJECTS_CONTAINER_A = '18e2ea80684f11d2b9aa00c04f79f805';
- {$EXTERNALSYM GUID_DELETED_OBJECTS_CONTAINER_A}
- GUID_LOSTANDFOUND_CONTAINER_A = 'ab8153b7768811d1aded00c04fd8d5cd';
- {$EXTERNALSYM GUID_LOSTANDFOUND_CONTAINER_A}
- GUID_FOREIGNSECURITYPRINCIPALS_CONTAINER_A = '22b70c67d56e4efb91e9300fca3dc1aa';
- {$EXTERNALSYM GUID_FOREIGNSECURITYPRINCIPALS_CONTAINER_A}
- GUID_PROGRAM_DATA_CONTAINER_A = '09460c08ae1e4a4ea0f64aee7daa1e5a';
- {$EXTERNALSYM GUID_PROGRAM_DATA_CONTAINER_A}
- GUID_MICROSOFT_PROGRAM_DATA_CONTAINER_A = 'f4be92a4c777485e878e9421d53087db';
- {$EXTERNALSYM GUID_MICROSOFT_PROGRAM_DATA_CONTAINER_A}
-
- GUID_USERS_CONTAINER_W = WideString('a9d1ca15768811d1aded00c04fd8d5cd');
- {$EXTERNALSYM GUID_USERS_CONTAINER_W}
- GUID_COMPUTRS_CONTAINER_W = WideString('aa312825768811d1aded00c04fd8d5cd');
- {$EXTERNALSYM GUID_COMPUTRS_CONTAINER_W}
- GUID_SYSTEMS_CONTAINER_W = WideString('ab1d30f3768811d1aded00c04fd8d5cd');
- {$EXTERNALSYM GUID_SYSTEMS_CONTAINER_W}
- GUID_DOMAIN_CONTROLLERS_CONTAINER_W = WideString('a361b2ffffd211d1aa4b00c04fd7d83a');
- {$EXTERNALSYM GUID_DOMAIN_CONTROLLERS_CONTAINER_W}
- GUID_INFRASTRUCTURE_CONTAINER_W = WideString('2fbac1870ade11d297c400c04fd8d5cd');
- {$EXTERNALSYM GUID_INFRASTRUCTURE_CONTAINER_W}
- GUID_DELETED_OBJECTS_CONTAINER_W = WideString('18e2ea80684f11d2b9aa00c04f79f805');
- {$EXTERNALSYM GUID_DELETED_OBJECTS_CONTAINER_W}
- GUID_LOSTANDFOUND_CONTAINER_W = WideString('ab8153b7768811d1aded00c04fd8d5cd');
- {$EXTERNALSYM GUID_LOSTANDFOUND_CONTAINER_W}
- GUID_FOREIGNSECURITYPRINCIPALS_CONTAINER_W = WideString('22b70c67d56e4efb91e9300fca3dc1aa');
- {$EXTERNALSYM GUID_FOREIGNSECURITYPRINCIPALS_CONTAINER_W}
- GUID_PROGRAM_DATA_CONTAINER_W = WideString('09460c08ae1e4a4ea0f64aee7daa1e5a');
- {$EXTERNALSYM GUID_PROGRAM_DATA_CONTAINER_W}
- GUID_MICROSOFT_PROGRAM_DATA_CONTAINER_W = WideString('f4be92a4c777485e878e9421d53087db');
- {$EXTERNALSYM GUID_MICROSOFT_PROGRAM_DATA_CONTAINER_W}
-
- GUID_USERS_CONTAINER_BYTE = '\xa9\xd1\xca\x15\x76\x88\x11\xd1\xad\xed\x00\xc0\x4f\xd8\xd5\xcd';
- {$EXTERNALSYM GUID_USERS_CONTAINER_BYTE}
- GUID_COMPUTRS_CONTAINER_BYTE = '\xaa\x31\x28\x25\x76\x88\x11\xd1\xad\xed\x00\xc0\x4f\xd8\xd5\xcd';
- {$EXTERNALSYM GUID_COMPUTRS_CONTAINER_BYTE}
- GUID_SYSTEMS_CONTAINER_BYTE = '\xab\x1d\x30\xf3\x76\x88\x11\xd1\xad\xed\x00\xc0\x4f\xd8\xd5\xcd';
- {$EXTERNALSYM GUID_SYSTEMS_CONTAINER_BYTE}
- GUID_DOMAIN_CONTROLLERS_CONTAINER_BYTE = '\xa3\x61\xb2\xff\xff\xd2\x11\xd1\xaa\x4b\x00\xc0\x4f\xd7\xd8\x3a';
- {$EXTERNALSYM GUID_DOMAIN_CONTROLLERS_CONTAINER_BYTE}
- GUID_INFRASTRUCTURE_CONTAINER_BYTE = '\x2f\xba\xc1\x87\x0a\xde\x11\xd2\x97\xc4\x00\xc0\x4f\xd8\xd5\xcd';
- {$EXTERNALSYM GUID_INFRASTRUCTURE_CONTAINER_BYTE}
- GUID_DELETED_OBJECTS_CONTAINER_BYTE = '\x18\xe2\xea\x80\x68\x4f\x11\xd2\xb9\xaa\x00\xc0\x4f\x79\xf8\x05';
- {$EXTERNALSYM GUID_DELETED_OBJECTS_CONTAINER_BYTE}
- GUID_LOSTANDFOUND_CONTAINER_BYTE = '\xab\x81\x53\xb7\x76\x88\x11\xd1\xad\xed\x00\xc0\x4f\xd8\xd5\xcd';
- {$EXTERNALSYM GUID_LOSTANDFOUND_CONTAINER_BYTE}
- GUID_FOREIGNSECURITYPRINCIPALS_CONTAINER_BYTE = '\x22\xb7\x0c\x67\xd5\x6e\x4e\xfb\x91\xe9\x30\x0f\xca\x3d\xc1\xaa';
- {$EXTERNALSYM GUID_FOREIGNSECURITYPRINCIPALS_CONTAINER_BYTE}
- GUID_PROGRAM_DATA_CONTAINER_BYTE = '\x09\x46\x0c\x08\xae\x1e\x4a\x4e\xa0\xf6\x4a\xee\x7d\xaa\x1e\x5a';
- {$EXTERNALSYM GUID_PROGRAM_DATA_CONTAINER_BYTE}
- GUID_MICROSOFT_PROGRAM_DATA_CONTAINER_BYTE = '\xf4\xbe\x92\xa4\xc7\x77\x48\x5e\x87\x8e\x94\x21\xd5\x30\x87\xdb';
- {$EXTERNALSYM GUID_MICROSOFT_PROGRAM_DATA_CONTAINER_BYTE}
-
-type
- _DS_MANGLE_FOR = (
- DS_MANGLE_UNKNOWN,
- DS_MANGLE_OBJECT_RDN_FOR_DELETION,
- DS_MANGLE_OBJECT_RDN_FOR_NAME_CONFLICT);
- {$EXTERNALSYM _DS_MANGLE_FOR}
- DS_MANGLE_FOR = _DS_MANGLE_FOR;
- {$EXTERNALSYM DS_MANGLE_FOR}
- TDsMangleFor = DS_MANGLE_FOR;
- PDsMangleFor = ^DS_MANGLE_FOR;
-
-//////////////////////////////////////////////////////////////////////////
-// //
-// Prototypes //
-// //
-//////////////////////////////////////////////////////////////////////////
-
-// DSBind takes two optional input parameters which identify whether the
-// caller found a domain controller themselves via DsGetDcName or whether
-// a domain controller should be found using default parameters.
-// Behavior of the possible combinations are outlined below.
-//
-// DomainControllerName(value), DnsDomainName(NULL)
-//
-// The value for DomainControllerName is assumed to have been
-// obtained via DsGetDcName (i.e. Field with the same name in a
-// DOMAIN_CONTROLLER_INFO struct on return from DsGetDcName call.)
-// The client is bound to the domain controller at this name.
-//
-// Mutual authentication will be performed using an SPN of
-// LDAP/DomainControllerName provided DomainControllerName
-// is not a NETBIOS name or IP address - i.e. it must be a
-// DNS host name.
-//
-// DomainControllerName(value), DnsDomainName(value)
-//
-// DsBind will connect to the server identified by DomainControllerName.
-//
-// Mutual authentication will be performed using an SPN of
-// LDAP/DomainControllerName/DnsDomainName provided neither value
-// is a NETBIOS names or IP address - i.e. they must be
-// valid DNS names.
-//
-// DomainControllerName(NULL), DnsDomainName(NULL)
-//
-// DsBind will attempt to find to a global catalog and fail if one
-// can not be found.
-//
-// Mutual authentication will be performed using an SPN of
-// GC/DnsHostName/ForestName where DnsHostName and ForestName
-// represent the DomainControllerName and DnsForestName fields
-// respectively of the DOMAIN_CONTROLLER_INFO returned by the
-// DsGetDcName call used to find a global catalog.
-//
-// DomainControllerName(NULL), DnsDomainName(value)
-//
-// DsBind will attempt to find a domain controller for the domain
-// identified by DnsDomainName and fail if one can not be found.
-//
-// Mutual authentication will be performed using an SPN of
-// LDAP/DnsHostName/DnsDomainName where DnsDomainName is that
-// provided by the caller and DnsHostName is that returned by
-// DsGetDcName for the domain specified - provided DnsDomainName
-// is a valid DNS domain name - i.e. not a NETBIOS domain name.
-
-function DsBindA(DomainControllerName: LPCSTR; DnsDomainName: LPCSTR;
- var phDS: HANDLE): DWORD; stdcall;
-{$EXTERNALSYM DsBindA}
-function DsBindW(DomainControllerName: LPCWSTR; DnsDomainName: LPCWSTR;
- var phDS: HANDLE): DWORD; stdcall;
-{$EXTERNALSYM DsBindW}
-function DsBind(DomainControllerName: LPCTSTR; DnsDomainName: LPCTSTR;
- var phDS: HANDLE): DWORD; stdcall;
-{$EXTERNALSYM DsBind}
-
-function DsBindWithCredA(DomainControllerName: LPCSTR; DnsDomainName: LPCSTR;
- AuthIdentity: RPC_AUTH_IDENTITY_HANDLE; var phDS: HANDLE): DWORD; stdcall;
-{$EXTERNALSYM DsBindWithCredA}
-function DsBindWithCredW(DomainControllerName: LPCWSTR; DnsDomainName: LPCWSTR;
- AuthIdentity: RPC_AUTH_IDENTITY_HANDLE; var phDS: HANDLE): DWORD; stdcall;
-{$EXTERNALSYM DsBindWithCredW}
-function DsBindWithCred(DomainControllerName: LPCTSTR; DnsDomainName: LPCTSTR;
- AuthIdentity: RPC_AUTH_IDENTITY_HANDLE; var phDS: HANDLE): DWORD; stdcall;
-{$EXTERNALSYM DsBindWithCred}
-
-//
-// DsBindWithSpn{A|W} allows the caller to specify the service principal
-// name (SPN) which will be used for mutual authentication against
-// the destination server. Do not provide an SPN if you are expecting
-// DsBind to find a server for you as SPNs are machine specific and its
-// unlikely the SPN you provide matches the server DsBind finds for you.
-// Providing a NULL ServicePrincipalName argument results in behavior
-// identical to DsBindWithCred{A|W}.
-//
-
-function DsBindWithSpnA(DomainControllerName: LPCSTR; DnsDomainName: LPCSTR;
- AuthIdentity: RPC_AUTH_IDENTITY_HANDLE; ServicePrincipalName: LPCSTR;
- var phDS: HANDLE): DWORD; stdcall;
-{$EXTERNALSYM DsBindWithSpnA}
-function DsBindWithSpnW(DomainControllerName: LPCWSTR; DnsDomainName: LPCWSTR;
- AuthIdentity: RPC_AUTH_IDENTITY_HANDLE; ServicePrincipalName: LPCWSTR;
- var phDS: HANDLE): DWORD; stdcall;
-{$EXTERNALSYM DsBindWithSpnW}
-function DsBindWithSpn(DomainControllerName: LPCTSTR; DnsDomainName: LPCTSTR;
- AuthIdentity: RPC_AUTH_IDENTITY_HANDLE; ServicePrincipalName: LPCTSTR;
- var phDS: HANDLE): DWORD; stdcall;
-{$EXTERNALSYM DsBindWithSpn}
-
-//
-// DsBindWithSpnEx{A|W} allows you all the options of the previous
-// DsBindWithSpn(), plus the added benefit of specifying some optional
-// Binding flags. Currently if you pass NTDSAPI_BIND_ALLOW_DELEGATION,
-// you will get the exact old behaviour. If you can avoid it, you
-// should not specify this flag, see flag above for details.
-//
-
-function DsBindWithSpnExW(DomainControllerName, DnsDomainName: LPCWSTR; AuthIdentity: RPC_AUTH_IDENTITY_HANDLE;
- ServicePrincipalName: LPCWSTR; BindFlags: DWORD; phDS: LPHANDLE): DWORD; stdcall;
-{$EXTERNALSYM DsBindWithSpnExW}
-function DsBindWithSpnExA(DomainControllerName, DnsDomainName: LPCSTR; AuthIdentity: RPC_AUTH_IDENTITY_HANDLE;
- ServicePrincipalName: LPCSTR; BindFlags: DWORD; phDS: LPHANDLE): DWORD; stdcall;
-{$EXTERNALSYM DsBindWithSpnExA}
-function DsBindWithSpnEx(DomainControllerName, DnsDomainName: LPCTSTR; AuthIdentity: RPC_AUTH_IDENTITY_HANDLE;
- ServicePrincipalName: LPCTSTR; BindFlags: DWORD; phDS: LPHANDLE): DWORD; stdcall;
-{$EXTERNALSYM DsBindWithSpnEx}
-
-//
-// DsBindToISTG{A|W} allows the caller to bind to the server which
-// holds the Inter-Site Topology Generator role in the specified site.
-// The site name should be the RDN of a site. If no site is specified,
-// the function will try to bind to the ISTG in a nearby site.
-//
-
-function DsBindToISTGW(SiteName: LPCWSTR; phDS: LPHANDLE): DWORD; stdcall;
-{$EXTERNALSYM DsBindToISTGW}
-function DsBindToISTGA(SiteName: LPCSTR; phDS: LPHANDLE): DWORD; stdcall;
-{$EXTERNALSYM DsBindToISTGA}
-function DsBindToISTG(SiteName: LPCTSTR; phDS: LPHANDLE): DWORD; stdcall;
-{$EXTERNALSYM DsBindToISTG}
-
-//
-// DsBindingSetTimeout allows the caller to specify a timeout value
-// which will be honored by all RPC calls using the specified binding
-// handle. RPC calls which take longer the timeout value are canceled.
-//
-
-function DsBindingSetTimeout(hDS: HANDLE; cTimeoutSecs: ULONG): DWORD; stdcall;
-{$EXTERNALSYM DsBindingSetTimeout}
-
-//
-// DsUnBind
-//
-
-function DsUnBindA(var phDS: HANDLE): DWORD; stdcall;
-{$EXTERNALSYM DsUnBindA}
-function DsUnBindW(var phDS: HANDLE): DWORD; stdcall;
-{$EXTERNALSYM DsUnBindW}
-function DsUnBind(var phDS: HANDLE): DWORD; stdcall;
-{$EXTERNALSYM DsUnBind}
-
-//
-// DsMakePasswordCredentials
-//
-// This function constructs a credential structure which is suitable for input
-// to the DsBindWithCredentials function, or the ldap_open function(winldap.h)
-// The credential must be freed using DsFreeCredential.
-//
-// None of the input parameters may be present indicating a null, default
-// credential. Otherwise the username must be present. If the domain or
-// password are null, they default to empty strings. The domain name may be
-// null when the username is fully qualified, for example UPN format.
-//
-
-function DsMakePasswordCredentialsA(User: LPCSTR; Domain: LPCSTR;
- Password: LPCSTR; var pAuthIdentity: RPC_AUTH_IDENTITY_HANDLE): DWORD; stdcall;
-{$EXTERNALSYM DsMakePasswordCredentialsA}
-function DsMakePasswordCredentialsW(User: LPCWSTR; Domain: LPCWSTR;
- Password: LPCWSTR; var pAuthIdentity: RPC_AUTH_IDENTITY_HANDLE): DWORD; stdcall;
-{$EXTERNALSYM DsMakePasswordCredentialsW}
-function DsMakePasswordCredentials(User: LPCTSTR; Domain: LPCTSTR;
- Password: LPCTSTR; var pAuthIdentity: RPC_AUTH_IDENTITY_HANDLE): DWORD; stdcall;
-{$EXTERNALSYM DsMakePasswordCredentials}
-
-procedure DsFreePasswordCredentialsA(AuthIdentity: RPC_AUTH_IDENTITY_HANDLE); stdcall;
-{$EXTERNALSYM DsFreePasswordCredentialsA}
-procedure DsFreePasswordCredentialsW(AuthIdentity: RPC_AUTH_IDENTITY_HANDLE); stdcall;
-{$EXTERNALSYM DsFreePasswordCredentialsW}
-procedure DsFreePasswordCredentials(AuthIdentity: RPC_AUTH_IDENTITY_HANDLE); stdcall;
-{$EXTERNALSYM DsFreePasswordCredentials}
-
-//
-// DsCrackNames
-//
-
-function DsCrackNamesA(hDS: HANDLE; flags: DS_NAME_FLAGS;
- formatOffered: DS_NAME_FORMAT; formatDesired: DS_NAME_FORMAT; cNames: DWORD;
- rpNames: LPCSTR; var ppResult: PDS_NAME_RESULTA): DWORD; stdcall;
-{$EXTERNALSYM DsCrackNamesA}
-function DsCrackNamesW(hDS: HANDLE; flags: DS_NAME_FLAGS;
- formatOffered: DS_NAME_FORMAT; formatDesired: DS_NAME_FORMAT; cNames: DWORD;
- rpNames: LPCWSTR; var ppResult: PDS_NAME_RESULTW): DWORD; stdcall;
-{$EXTERNALSYM DsCrackNamesW}
-function DsCrackNames(hDS: HANDLE; flags: DS_NAME_FLAGS;
- formatOffered: DS_NAME_FORMAT; formatDesired: DS_NAME_FORMAT; cNames: DWORD;
- rpNames: LPCTSTR; var ppResult: PDS_NAME_RESULT): DWORD; stdcall;
-{$EXTERNALSYM DsCrackNames}
-
-//
-// DsFreeNameResult
-//
-
-procedure DsFreeNameResultA(pResult: PDS_NAME_RESULTA); stdcall;
-{$EXTERNALSYM DsFreeNameResultA}
-procedure DsFreeNameResultW(pResult: PDS_NAME_RESULTW); stdcall;
-{$EXTERNALSYM DsFreeNameResultW}
-procedure DsFreeNameResult(pResult: PDS_NAME_RESULT); stdcall;
-{$EXTERNALSYM DsFreeNameResult}
-
-// ==========================================================
-// DSMakeSpn -- client call to create SPN for a service to which it wants to
-// authenticate.
-// This name is then passed to "pszTargetName" of InitializeSecurityContext().
-//
-// Notes:
-// If the service name is a DNS host name, or canonical DNS service name
-// e.g. "www.ms.com", i.e., caller resolved with gethostbyname, then instance
-// name should be NULL.
-// Realm is host name minus first component, unless it is in the exception list
-//
-// If the service name is NetBIOS machine name, then instance name should be
-// NULL
-// Form must be <domain>\<machine>
-// Realm will be <domain>
-//
-// If the service name is that of a replicated service, where each replica has
-// its own account (e.g., with SRV records) then the caller must supply the
-// instance name then realm name is same as ServiceName
-//
-// If the service name is a DN, then must also supply instance name
-// (DN could be name of service object (incl RPC or Winsock), name of machine
-// account, name of domain object)
-// then realm name is domain part of the DN
-//
-// If the service name is NetBIOS domain name, then must also supply instance
-// name; realm name is domain name
-//
-// If the service is named by an IP address -- then use referring service name
-// as service name
-//
-// ServiceClass - e.g. "http", "ftp", "ldap", GUID
-// ServiceName - DNS or DN; assumes we can compute domain from service name
-// InstanceName OPTIONAL- DNS name of host for instance of service
-// InstancePort - port number for instance (0 if default)
-// Referrer OPTIONAL- DNS name of host that gave this referral
-// pcSpnLength - in -- max length IN CHARACTERS of principal name;
-// out -- actual
-// Length includes terminator
-// pszSPN - server principal name
-//
-// If buffer is not large enough, ERROR_BUFFER_OVERFLOW is returned and the
-// needed length is returned in pcSpnLength.
-//
-//
-
-function DsMakeSpnA(ServiceClass: LPCSTR; ServiceName: LPCSTR;
- InstanceName: LPCSTR; InstancePort: USHORT; Referrer: LPCSTR;
- var pcSpnLength: DWORD; pszSpn: LPSTR): DWORD; stdcall;
-{$EXTERNALSYM DsMakeSpnA}
-function DsMakeSpnW(ServiceClass: LPCWSTR; ServiceName: LPCWSTR;
- InstanceName: LPCWSTR; InstancePort: USHORT; Referrer: LPCWSTR;
- var pcSpnLength: DWORD; pszSpn: LPWSTR): DWORD; stdcall;
-{$EXTERNALSYM DsMakeSpnW}
-function DsMakeSpn(ServiceClass: LPCTSTR; ServiceName: LPCTSTR;
- InstanceName: LPCTSTR; InstancePort: USHORT; Referrer: LPCTSTR;
- var pcSpnLength: DWORD; pszSpn: LPTSTR): DWORD; stdcall;
-{$EXTERNALSYM DsMakeSpn}
-
-// ==========================================================
-// DsGetSPN -- server's call to gets SPNs for a service name by which it is
-// known to clients. N.B.: there may be more than one name by which clients
-// know it the SPNs are then passed to DsAddAccountSpn to register them in
-// the DS
-//
-// IN SpnNameType eType,
-// IN LPCTSTR ServiceClass,
-// kind of service -- "http", "ldap", "ftp", etc.
-// IN LPCTSTR ServiceName OPTIONAL,
-// name of service -- DN or DNS; not needed for host-based
-// IN USHORT InstancePort,
-// port number (0 => default) for instances
-// IN USHORT cInstanceNames,
-// count of extra instance names and ports (0=>use gethostbyname)
-// IN LPCTSTR InstanceNames[] OPTIONAL,
-// extra instance names (not used for host names)
-// IN USHORT InstancePorts[] OPTIONAL,
-// extra instance ports (0 => default)
-// IN OUT PULONG pcSpn, // count of SPNs
-// IN OUT LPTSTR * prpszSPN[]
-// a bunch of SPNs for this service; free with DsFreeSpnArray
-
-function DsGetSpnA(ServiceType: DS_SPN_NAME_TYPE; ServiceClass: LPCSTR;
- ServiceName: LPCSTR; InstancePort: USHORT; cInstanceNames: USHORT;
- pInstanceNames: LPCSTR; pInstancePorts: PUSHORT; var pcSpn: DWORD;
- var prpszSpn: LPSTR): DWORD; stdcall;
-{$EXTERNALSYM DsGetSpnA}
-function DsGetSpnW(ServiceType: DS_SPN_NAME_TYPE; ServiceClass: LPCWSTR;
- ServiceName: LPCWSTR; InstancePort: USHORT; cInstanceNames: USHORT;
- pInstanceNames: LPCWSTR; pInstancePorts: PUSHORT; var pcSpn: DWORD;
- var prpszSpn: LPWSTR): DWORD; stdcall;
-{$EXTERNALSYM DsGetSpnW}
-function DsGetSpn(ServiceType: DS_SPN_NAME_TYPE; ServiceClass: LPCTSTR;
- ServiceName: LPCTSTR; InstancePort: USHORT; cInstanceNames: USHORT;
- pInstanceNames: LPCTSTR; pInstancePorts: PUSHORT; var pcSpn: DWORD;
- var prpszSpn: LPTSTR): DWORD; stdcall;
-{$EXTERNALSYM DsGetSpn}
-
-// ==========================================================
-// DsFreeSpnArray() -- Free array returned by DsGetSpn{A,W}
-
-procedure DsFreeSpnArrayA(cSpn: DWORD; rpszSpn: LPSTR); stdcall;
-{$EXTERNALSYM DsFreeSpnArrayA}
-procedure DsFreeSpnArrayW(cSpn: DWORD; rpszSpn: LPWSTR); stdcall;
-{$EXTERNALSYM DsFreeSpnArrayW}
-procedure DsFreeSpnArray(cSpn: DWORD; rpszSpn: LPTSTR); stdcall;
-{$EXTERNALSYM DsFreeSpnArray}
-
-// ==========================================================
-// DsCrackSpn() -- parse an SPN into the ServiceClass,
-// ServiceName, and InstanceName (and InstancePort) pieces.
-// An SPN is passed in, along with a pointer to the maximum length
-// for each piece and a pointer to a buffer where each piece should go.
-// On exit, the maximum lengths are updated to the actual length for each piece
-// and the buffer contain the appropriate piece. The InstancePort is 0 if not
-// present.
-//
-// DWORD DsCrackSpn(
-// IN LPTSTR pszSPN, // the SPN to parse
-// IN OUT PUSHORT pcServiceClass, // input -- max length of ServiceClass;
-// output -- actual length
-// OUT LPCTSTR ServiceClass, // the ServiceClass part of the SPN
-// IN OUT PUSHORT pcServiceName, // input -- max length of ServiceName;
-// output -- actual length
-// OUT LPCTSTR ServiceName, // the ServiceName part of the SPN
-// IN OUT PUSHORT pcInstance, // input -- max length of ServiceClass;
-// output -- actual length
-// OUT LPCTSTR InstanceName, // the InstanceName part of the SPN
-// OUT PUSHORT InstancePort // instance port
-//
-// Note: lengths are in characters; all string lengths include terminators
-// All arguments except pszSpn are optional.
-//
-
-function DsCrackSpnA(pszSpn: LPCSTR; pcServiceClass: LPDWORD; ServiceClass: LPSTR;
- pcServiceName: LPDWORD; ServiceName: LPSTR; pcInstanceName: LPDWORD;
- InstanceName: LPSTR; pInstancePort: PUSHORT): DWORD; stdcall;
-{$EXTERNALSYM DsCrackSpnA}
-function DsCrackSpnW(pszSpn: LPCWSTR; pcServiceClass: LPDWORD; ServiceClass: LPWSTR;
- pcServiceName: LPDWORD; ServiceName: LPWSTR; pcInstanceName: LPDWORD;
- InstanceName: LPWSTR; pInstancePort: PUSHORT): DWORD; stdcall;
-{$EXTERNALSYM DsCrackSpnW}
-function DsCrackSpn(pszSpn: LPCTSTR; pcServiceClass: LPDWORD; ServiceClass: LPTSTR;
- pcServiceName: LPDWORD; ServiceName: LPTSTR; pcInstanceName: LPDWORD;
- InstanceName: LPTSTR; pInstancePort: PUSHORT): DWORD; stdcall;
-{$EXTERNALSYM DsCrackSpn}
-
-// ==========================================================
-// DsWriteAccountSpn -- set or add SPNs for an account object
-// Usually done by service itself, or perhaps by an admin.
-//
-// This call is RPC'd to the DC where the account object is stored, so it can
-// securely enforce policy on what SPNs are allowed on the account. Direct LDAP
-// writes to the SPN property are not allowed -- all writes must come through
-// this RPC call. (Reads via // LDAP are OK.)
-//
-// The account object can be a machine accout, or a service (user) account.
-//
-// If called by the service to register itself, it can most easily get
-// the names by calling DsGetSpn with each of the names that
-// clients can use to find the service.
-//
-// IN SpnWriteOp eOp, // set, add
-// IN LPCTSTR pszAccount, // DN of account to which to add SPN
-// IN int cSPN, // count of SPNs to add to account
-// IN LPCTSTR rpszSPN[] // SPNs to add to altSecID property
-
-function DsWriteAccountSpnA(hDS: HANDLE; Operation: DS_SPN_WRITE_OP;
- pszAccount: LPCSTR; cSpn: DWORD; rpszSpn: LPCSTR): DWORD; stdcall;
-{$EXTERNALSYM DsWriteAccountSpnA}
-function DsWriteAccountSpnW(hDS: HANDLE; Operation: DS_SPN_WRITE_OP;
- pszAccount: LPCWSTR; cSpn: DWORD; rpszSpn: LPCWSTR): DWORD; stdcall;
-{$EXTERNALSYM DsWriteAccountSpnW}
-function DsWriteAccountSpn(hDS: HANDLE; Operation: DS_SPN_WRITE_OP;
- pszAccount: LPCTSTR; cSpn: DWORD; rpszSpn: LPCTSTR): DWORD; stdcall;
-{$EXTERNALSYM DsWriteAccountSpn}
-
-{++
-
-Routine Description:
-
-Constructs a Service Principal Name suitable to identify the desired server.
-The service class and part of a dns hostname must be supplied.
-
-This routine is a simplified wrapper to DsMakeSpn.
-The ServiceName is made canonical by resolving through DNS.
-Guid-based dns names are not supported.
-
-NOTE:
-This routine is no longer recommended for use. In order to be secure, an SPN
-should be constructed purely on the client without reliance on other services,
-such as DNS, which may be spoofed.
-
-The simplified SPN constructed looks like this:
-
-ServiceClass / ServiceName / ServiceName
-
-The instance name portion (2nd position) is always defaulted. The port and
-referrer fields are not used.
-
-Arguments:
-
- ServiceClass - Class of service, defined by the service, can be any
- string unique to the service
-
- ServiceName - dns hostname, fully qualified or not
- Stringized IP address is also resolved if necessary
-
- pcSpnLength - IN, maximum length of buffer, in chars
- OUT, space utilized, in chars, including terminator
-
- pszSpn - Buffer, atleast of length *pcSpnLength
-
-Return Value:
-
- WINAPI - Win32 error code
-
---}
-
-function DsClientMakeSpnForTargetServerA(ServiceClass: LPCSTR; ServiceName: LPCSTR;
- var pcSpnLength: DWORD; pszSpn: LPSTR): DWORD; stdcall;
-{$EXTERNALSYM DsClientMakeSpnForTargetServerA}
-function DsClientMakeSpnForTargetServerW(ServiceClass: LPCWSTR; ServiceName: LPCWSTR;
- var pcSpnLength: DWORD; pszSpn: LPWSTR): DWORD; stdcall;
-{$EXTERNALSYM DsClientMakeSpnForTargetServerW}
-function DsClientMakeSpnForTargetServer(ServiceClass: LPCTSTR; ServiceName: LPCTSTR;
- var pcSpnLength: DWORD; pszSpn: LPTSTR): DWORD; stdcall;
-{$EXTERNALSYM DsClientMakeSpnForTargetServer}
-
-{++
-outine Description:
-
-Register Service Principal Names for a server application.
-
-This routine does the following:
-1. Enumerates a list of server SPNs using DsGetSpn and the provided class
-2. Determines the domain of the current user context
-3. Determines the DN of the current user context if not supplied
-4. Locates a domain controller
-5. Binds to the domain controller
-6. Uses DsWriteAccountSpn to write the SPNs on the named object DN
-7. Unbinds
-
-Construct server SPNs for this service, and write them to the right object.
-
-If the userObjectDn is specified, the SPN is written to that object.
-
-Otherwise the Dn is defaulted, to the user object, then computer.
-
-Now, bind to the DS, and register the name on the object for the
-user this service is running as. So, if we're running as local
-system, we'll register it on the computer object itself. If we're
-running as a domain user, we'll add the SPN to the user's object.
-
-Arguments:
-
- Operation - What should be done with the values: add, replace or delete
- ServiceClass - Unique string identifying service
- UserObjectDN - Optional, dn of object to write SPN to
-
-Return Value:
-
- WINAPI - Win32 error code
-
---}
-
-function DsServerRegisterSpnA(Operation: DS_SPN_WRITE_OP; ServiceClass: LPCSTR;
- UserObjectDN: LPCSTR): DWORD; stdcall;
-{$EXTERNALSYM DsServerRegisterSpnA}
-function DsServerRegisterSpnW(Operation: DS_SPN_WRITE_OP; ServiceClass: LPCWSTR;
- UserObjectDN: LPCWSTR): DWORD; stdcall;
-{$EXTERNALSYM DsServerRegisterSpnW}
-function DsServerRegisterSpn(Operation: DS_SPN_WRITE_OP; ServiceClass: LPCTSTR;
- UserObjectDN: LPCTSTR): DWORD; stdcall;
-{$EXTERNALSYM DsServerRegisterSpn}
-
-// DsReplicaSync. The server that this call is executing on is called the
-// destination. The destination's naming context will be brought up to date
-// with respect to a source system. The source system is identified by the
-// uuid. The uuid is that of the source system's "NTDS Settings" object.
-// The destination system must already be configured such that the source
-// system is one of the systems from which it recieves replication data
-// ("replication from"). This is usually done automatically by the KCC.
-//
-// PARAMETERS:
-// pNC (DSNAME *)
-// Name of the NC to synchronize.
-// puuidSourceDRA (SZ)
-// objectGuid of DSA with which to synchronize the replica.
-// ulOptions (ULONG)
-// Bitwise OR of zero or more flags
-// RETURNS: WIN32 STATUS
-
-function DsReplicaSyncA(hDS: HANDLE; NameContext: LPCSTR; pUuidDsaSrc: LPUUID;
- Options: ULONG): DWORD; stdcall;
-{$EXTERNALSYM DsReplicaSyncA}
-function DsReplicaSyncW(hDS: HANDLE; NameContext: LPCWSTR; pUuidDsaSrc: LPUUID;
- Options: ULONG): DWORD; stdcall;
-{$EXTERNALSYM DsReplicaSyncW}
-function DsReplicaSync(hDS: HANDLE; NameContext: LPCTSTR; pUuidDsaSrc: LPUUID;
- Options: ULONG): DWORD; stdcall;
-{$EXTERNALSYM DsReplicaSync}
-
-// DsReplicaAdd
-//
-{
-Description:
- This call is executed on the destination. It causes the destination to
- add a "replication from" reference to the indicated source system.
-
-The source server is identified by string name, not uuid as with Sync.
-The DsaSrcAddress parameter is the transport specific address of the source
-DSA, usually its guid-based dns name. The guid in the guid-based dns name is
-the object-guid of that server's ntds-dsa (settings) object.
-
-Arguments:
-
- pNC (IN) - NC for which to add the replica.
-
- pSourceDsaDN (IN) - DN of the source DSA's ntdsDsa object. Required if
- ulOptions includes DS_REPADD_ASYNCHRONOUS_REPLICA; ignored otherwise.
-
- pTransportDN (IN) - DN of the interSiteTransport object representing the
- transport by which to communicate with the source server. Required if
- ulOptions includes INTERSITE_MESSAGING; ignored otherwise.
-
- pszSourceDsaAddress (IN) - Transport-specific address of the source DSA.
-
- pSchedule (IN) - Schedule by which to replicate the NC from this
- source in the future.
-
- ulOptions (IN) - flags
- RETURNS: WIN32 STATUS
-}
-
-function DsReplicaAddA(hDS: HANDLE; NameContext: LPCSTR; SourceDsaDn: LPCSTR;
- TransportDn: LPCSTR; SourceDsaAddress: LPCSTR; pSchedule: PSCHEDULE;
- Options: DWORD): DWORD; stdcall;
-{$EXTERNALSYM DsReplicaAddA}
-function DsReplicaAddW(hDS: HANDLE; NameContext: LPCWSTR; SourceDsaDn: LPCWSTR;
- TransportDn: LPCWSTR; SourceDsaAddress: LPCWSTR; pSchedule: PSCHEDULE;
- Options: DWORD): DWORD; stdcall;
-{$EXTERNALSYM DsReplicaAddW}
-function DsReplicaAdd(hDS: HANDLE; NameContext: LPCTSTR; SourceDsaDn: LPCTSTR;
- TransportDn: LPCTSTR; SourceDsaAddress: LPCTSTR; pSchedule: PSCHEDULE;
- Options: DWORD): DWORD; stdcall;
-{$EXTERNALSYM DsReplicaAdd}
-
-// DsReplicaDel
-//
-// The server that this call is executing on is the destination. The call
-// causes the destination to remove a "replication from" reference to the
-// indicated source server.
-// The source server is identified by string name, not uuid as with Sync.
-// The DsaSrc parameter is the transport specific address of the source DSA,
-// usually its guid-based dns name. The guid in the guid-based dns name is
-// the object-guid of that server's ntds-dsa (settings) object.
-// If you remove an NC from a given destination and specify the "no source"
-// flag, then the entire replica will be removed from the DC.
-//
-// PARAMETERS:
-// pNC (DSNAME *)
-// Name of the NC for which to delete a source.
-// pszSourceDRA (SZ)
-// DSA for which to delete the source.
-// ulOptions (ULONG)
-// Bitwise OR of zero or more flags
-//
-//
-// RETURNS: WIN32 STATUS
-
-function DsReplicaDelA(hDS: HANDLE; NameContext: LPCSTR; DsaSrc: LPCSTR;
- Options: ULONG): DWORD; stdcall;
-{$EXTERNALSYM DsReplicaDelA}
-function DsReplicaDelW(hDS: HANDLE; NameContext: LPCWSTR; DsaSrc: LPCWSTR;
- Options: ULONG): DWORD; stdcall;
-{$EXTERNALSYM DsReplicaDelW}
-function DsReplicaDel(hDS: HANDLE; NameContext: LPCTSTR; DsaSrc: LPCTSTR;
- Options: ULONG): DWORD; stdcall;
-{$EXTERNALSYM DsReplicaDel}
-
-// DsReplicaModify
-//
-//
-// Modify a source for a given naming context
-//
-// The value must already exist.
-//
-// Either the UUID or the address may be used to identify the current value.
-// If a UUID is specified, the UUID will be used for comparison. Otherwise,
-// the address will be used for comparison.
-//
-// PARAMETERS:
-// pNC (DSNAME *)
-// Name of the NC for which the Reps-From should be modified.
-// puuidSourceDRA (UUID *)
-// Guid of the DSA object for the source server. May be NULL if:
-// . ulModifyFields does not include DS_REPMOD_UPDATE_ADDRESS and
-// . pmtxSourceDRA is non-NULL.
-// puuidTransportObj (UUID *)
-// objectGuid of the transport by which replication is to be performed
-// Ignored if ulModifyFields does not include
-// DS_REPMOD_UPDATE_TRANSPORT.
-// pszSourceDRA (SZ)
-// DSA for which the reference should be added or deleted. Ignored if
-// puuidSourceDRA is non-NULL and ulModifyFields does not include
-// DS_REPMOD_UPDATE_ADDRESS.
-// prtSchedule (REPLTIMES *)
-// Periodic replication schedule for this replica. Ignored if
-// ulModifyFields does not include DS_REPMOD_UPDATE_SCHEDULE.
-// ulReplicaFlags (ULONG)
-// Flags to set for this replica. Ignored if ulModifyFields does not
-// include DS_REPMOD_UPDATE_FLAGS.
-// ulModifyFields (ULONG)
-// Fields to update. One or more of the following bit flags:
-// UPDATE_ADDRESS
-// Update the MTX_ADDR associated with the referenced server.
-// UPDATE_SCHEDULE
-// Update the periodic replication schedule associated with
-// the replica.
-// UPDATE_FLAGS
-// Update the flags associated with the replica.
-// UPDATE_TRANSPORT
-// Update the transport associated with the replica.
-// ulOptions (ULONG)
-// Bitwise OR of zero or more of the following:
-// DS_REPMOD_ASYNCHRONOUS_OPERATION
-// Perform this operation asynchronously.
-// RETURNS: WIN32 STATUS
-
-function DsReplicaModifyA(hDS: HANDLE; NameContext: LPCSTR; pUuidSourceDsa: LPUUID;
- TransportDn: LPCSTR; SourceDsaAddress: LPCSTR; pSchedule: PSCHEDULE;
- ReplicaFlags: DWORD; ModifyFields: DWORD; Options: DWORD): DWORD; stdcall;
-{$EXTERNALSYM DsReplicaModifyA}
-function DsReplicaModifyW(hDS: HANDLE; NameContext: LPCWSTR; pUuidSourceDsa: LPUUID;
- TransportDn: LPCWSTR; SourceDsaAddress: LPCWSTR; pSchedule: PSCHEDULE;
- ReplicaFlags: DWORD; ModifyFields: DWORD; Options: DWORD): DWORD; stdcall;
-{$EXTERNALSYM DsReplicaModifyW}
-function DsReplicaModify(hDS: HANDLE; NameContext: LPCTSTR; pUuidSourceDsa: LPUUID;
- TransportDn: LPCTSTR; SourceDsaAddress: LPCTSTR; pSchedule: PSCHEDULE;
- ReplicaFlags: DWORD; ModifyFields: DWORD; Options: DWORD): DWORD; stdcall;
-{$EXTERNALSYM DsReplicaModify}
-
-// DsReplicaUpdateRefs
-//
-// In this case, the RPC is being executed on the "source" of destination-sourc
-// replication relationship. This function tells the source that it no longer
-// supplies replication information to the indicated destination system.
-// Add or remove a target server from the Reps-To property on the given NC.
-// Add/remove a reference given the DSNAME of the corresponding NTDS-DSA
-// object.
-//
-// PARAMETERS:
-// pNC (DSNAME *)
-// Name of the NC for which the Reps-To should be modified.
-// DsaDest (SZ)
-// Network address of DSA for which the reference should be added
-// or deleted.
-// pUuidDsaDest (UUID *)
-// objectGuid of the DSA object for which the reference should be
-// added or deleted.
-// ulOptions (ULONG)
-// Bitwise OR of zero or more of the following:
-// DS_REPUPD_ASYNC_OP
-// Perform this operation asynchronously.
-// DS_REPUPD_ADD_REFERENCE
-// Add the given server to the Reps-To property.
-// DS_REPUPD_DEL_REFERENCE
-// Remove the given server from the Reps-To property.
-// Note that ADD_REF and DEL_REF may be paired to perform
-// "add or update".
-//
-// RETURNS: WIN32 STATUS
-
-function DsReplicaUpdateRefsA(hDS: HANDLE; NameContext: LPCSTR; DsaDest: LPCSTR;
- pUuidDsaDest: LPUUID; Options: ULONG): DWORD; stdcall;
-{$EXTERNALSYM DsReplicaUpdateRefsA}
-function DsReplicaUpdateRefsW(hDS: HANDLE; NameContext: LPCWSTR; DsaDest: LPCWSTR;
- pUuidDsaDest: LPUUID; Options: ULONG): DWORD; stdcall;
-{$EXTERNALSYM DsReplicaUpdateRefsW}
-function DsReplicaUpdateRefs(hDS: HANDLE; NameContext: LPCTSTR; DsaDest: LPCTSTR;
- pUuidDsaDest: LPUUID; Options: ULONG): DWORD; stdcall;
-{$EXTERNALSYM DsReplicaUpdateRefs}
-
-// Friends of DsReplicaSyncAll
-
-type
- DS_REPSYNCALL_ERROR = (
- DS_REPSYNCALL_WIN32_ERROR_CONTACTING_SERVER,
- DS_REPSYNCALL_WIN32_ERROR_REPLICATING,
- DS_REPSYNCALL_SERVER_UNREACHABLE);
- {$EXTERNALSYM DS_REPSYNCALL_ERROR}
- TDsReSynCallError = DS_REPSYNCALL_ERROR;
-
- DS_REPSYNCALL_EVENT = (
- DS_REPSYNCALL_EVENT_ERROR,
- DS_REPSYNCALL_EVENT_SYNC_STARTED,
- DS_REPSYNCALL_EVENT_SYNC_COMPLETED,
- DS_REPSYNCALL_EVENT_FINISHED);
- {$EXTERNALSYM DS_REPSYNCALL_EVENT}
- TDsReSynCallEvent = DS_REPSYNCALL_EVENT;
-
-// Friends of DsReplicaSyncAll
-
- PDS_REPSYNCALL_SYNCA = ^DS_REPSYNCALL_SYNCA;
- {$EXTERNALSYM PDS_REPSYNCALL_SYNCA}
- DS_REPSYNCALL_SYNCA = record
- pszSrcId: LPSTR;
- pszDstId: LPSTR;
- pszNC: LPSTR;
- pguidSrc: LPGUID;
- pguidDst: LPGUID;
- end;
- {$EXTERNALSYM DS_REPSYNCALL_SYNCA}
- TDsRepsyncallSyncA = DS_REPSYNCALL_SYNCA;
- PDsRepsyncallSyncA = PDS_REPSYNCALL_SYNCA;
-
- PDS_REPSYNCALL_SYNCW = ^DS_REPSYNCALL_SYNCW;
- {$EXTERNALSYM PDS_REPSYNCALL_SYNCW}
- DS_REPSYNCALL_SYNCW = record
- pszSrcId: LPWSTR;
- pszDstId: LPWSTR;
- pszNC: LPWSTR;
- pguidSrc: LPGUID;
- pguidDst: LPGUID;
- end;
- {$EXTERNALSYM DS_REPSYNCALL_SYNCW}
- TDsRepsyncallSyncW = DS_REPSYNCALL_SYNCW;
- PDsRepsyncallSyncW = PDS_REPSYNCALL_SYNCW;
-
- PDS_REPSYNCALL_ERRINFOA = ^DS_REPSYNCALL_ERRINFOA;
- {$EXTERNALSYM PDS_REPSYNCALL_ERRINFOA}
- DS_REPSYNCALL_ERRINFOA = record
- pszSvrId: LPSTR;
- error: DS_REPSYNCALL_ERROR;
- dwWin32Err: DWORD;
- pszSrcId: LPSTR;
- end;
- {$EXTERNALSYM DS_REPSYNCALL_ERRINFOA}
- PPDS_REPSYNCALL_ERRINFOA = ^PDS_REPSYNCALL_ERRINFOA;
- {$NODEFINE PPDS_REPSYNCALL_ERRINFOA}
- TDsRepSynCallErrInfoA = DS_REPSYNCALL_ERRINFOA;
- PDsRepSynCallErrInfoA = PDS_REPSYNCALL_ERRINFOA;
-
- PDS_REPSYNCALL_ERRINFOW = ^DS_REPSYNCALL_ERRINFOW;
- {$EXTERNALSYM PDS_REPSYNCALL_ERRINFOW}
- DS_REPSYNCALL_ERRINFOW = record
- pszSvrId: LPWSTR;
- error: DS_REPSYNCALL_ERROR;
- dwWin32Err: DWORD;
- pszSrcId: LPWSTR;
- end;
- {$EXTERNALSYM DS_REPSYNCALL_ERRINFOW}
- PPDS_REPSYNCALL_ERRINFOW = ^PDS_REPSYNCALL_ERRINFOW;
- {$NODEFINE PPDS_REPSYNCALL_ERRINFOW}
- TDsRepSynCallErrInfoW = DS_REPSYNCALL_ERRINFOW;
- PDsRepSynCallErrInfoW = PDS_REPSYNCALL_ERRINFOW;
-
- PDS_REPSYNCALL_UPDATEA = ^DS_REPSYNCALL_UPDATEA;
- {$EXTERNALSYM PDS_REPSYNCALL_UPDATEA}
- DS_REPSYNCALL_UPDATEA = record
- event: DS_REPSYNCALL_EVENT;
- pErrInfo: PDS_REPSYNCALL_ERRINFOA;
- pSync: PDS_REPSYNCALL_SYNCA;
- end;
- {$EXTERNALSYM DS_REPSYNCALL_UPDATEA}
- TDsRepSynCallUpdateA = DS_REPSYNCALL_UPDATEA;
- PDsRepSynCallUpdateA = PDS_REPSYNCALL_UPDATEA;
-
- PDS_REPSYNCALL_UPDATEW = ^DS_REPSYNCALL_UPDATEW;
- {$EXTERNALSYM PDS_REPSYNCALL_UPDATEW}
- DS_REPSYNCALL_UPDATEW = record
- event: DS_REPSYNCALL_EVENT;
- pErrInfo: PDS_REPSYNCALL_ERRINFOW;
- pSync: PDS_REPSYNCALL_SYNCW;
- end;
- {$EXTERNALSYM DS_REPSYNCALL_UPDATEW}
- TDsRepSynCallUpdateW = DS_REPSYNCALL_UPDATEW;
- PDsRepSynCallUpdateW = PDS_REPSYNCALL_UPDATEW;
-
- {$IFDEF UNICODE}
- DS_REPSYNCALL_SYNC = DS_REPSYNCALL_SYNCW;
- {$EXTERNALSYM DS_REPSYNCALL_SYNC}
- DS_REPSYNCALL_ERRINFO = DS_REPSYNCALL_ERRINFOW;
- {$EXTERNALSYM DS_REPSYNCALL_ERRINFO}
- PPDS_REPSYNCALL_ERRINFO = PPDS_REPSYNCALL_ERRINFOW;
- {$NODEFINE PPDS_REPSYNCALL_ERRINFO}
- DS_REPSYNCALL_UPDATE = DS_REPSYNCALL_UPDATEW;
- {$EXTERNALSYM DS_REPSYNCALL_UPDATE}
- PDS_REPSYNCALL_SYNC = PDS_REPSYNCALL_SYNCW;
- {$EXTERNALSYM PDS_REPSYNCALL_SYNC}
- PDS_REPSYNCALL_ERRINFO = PDS_REPSYNCALL_ERRINFOW;
- {$EXTERNALSYM PDS_REPSYNCALL_ERRINFO}
- PDS_REPSYNCALL_UPDATE = PDS_REPSYNCALL_UPDATEW;
- {$EXTERNALSYM PDS_REPSYNCALL_UPDATE}
- TDsRepSynCallSync = TDsRepSynCallSyncW;
- PDsRepSynCallSync = PDsRepSynCallSyncW;
- TDsRepSynCallErrInfo = TDsRepSynCallErrInfoW;
- PDsRepSynCallErrInfo = PDsRepSynCallErrInfoW;
- TDsRepSynCallUpdate = TDsRepSynCallUpdateW;
- PDsRepSynCallUpdate = PDsRepSynCallUpdateW;
- {$ELSE}
- DS_REPSYNCALL_SYNC = DS_REPSYNCALL_SYNCA;
- {$EXTERNALSYM DS_REPSYNCALL_SYNC}
- DS_REPSYNCALL_ERRINFO = DS_REPSYNCALL_ERRINFOA;
- {$EXTERNALSYM DS_REPSYNCALL_ERRINFO}
- PPDS_REPSYNCALL_ERRINFO = PPDS_REPSYNCALL_ERRINFOA;
- {$NODEFINE PPDS_REPSYNCALL_ERRINFO}
- DS_REPSYNCALL_UPDATE = DS_REPSYNCALL_UPDATEA;
- {$EXTERNALSYM DS_REPSYNCALL_UPDATE}
- PDS_REPSYNCALL_SYNC = PDS_REPSYNCALL_SYNCA;
- {$EXTERNALSYM PDS_REPSYNCALL_SYNC}
- PDS_REPSYNCALL_ERRINFO = PDS_REPSYNCALL_ERRINFOA;
- {$EXTERNALSYM PDS_REPSYNCALL_ERRINFO}
- PDS_REPSYNCALL_UPDATE = PDS_REPSYNCALL_UPDATEA;
- {$EXTERNALSYM PDS_REPSYNCALL_UPDATE}
- TDsRepSynCallSync = TDsRepSynCallSyncA;
- PDsRepSynCallSync = PDsRepSynCallSyncA;
- TDsRepSynCallErrInfo = TDsRepSynCallErrInfoA;
- PDsRepSynCallErrInfo = PDsRepSynCallErrInfoA;
- TDsRepSynCallUpdate = TDsRepSynCallUpdateA;
- PDsRepSynCallUpdate = PDsRepSynCallUpdateA;
- {$ENDIF UNICODE}
-
-// **********************
-// Replica SyncAll flags
-// **********************
-
-const
-
-// This option has no effect.
-
- DS_REPSYNCALL_NO_OPTIONS = $00000000;
- {$EXTERNALSYM DS_REPSYNCALL_NO_OPTIONS}
-
-// Ordinarily, if a server cannot be contacted, DsReplicaSyncAll tries to
-// route around it and replicate from as many servers as possible. Enabling
-// this option will cause DsReplicaSyncAll to generate a fatal error if any
-// server cannot be contacted, or if any server is unreachable (due to a
-// disconnected or broken topology.)
-
- DS_REPSYNCALL_ABORT_IF_SERVER_UNAVAILABLE = $00000001;
- {$EXTERNALSYM DS_REPSYNCALL_ABORT_IF_SERVER_UNAVAILABLE}
-
-// This option disables transitive replication; syncs will only be performed
-// with adjacent servers and no DsBind calls will be made.
-
- DS_REPSYNCALL_SYNC_ADJACENT_SERVERS_ONLY = $00000002;
- {$EXTERNALSYM DS_REPSYNCALL_SYNC_ADJACENT_SERVERS_ONLY}
-
-// Ordinarily, when DsReplicaSyncAll encounters a non-fatal error, it returns
-// the GUID DNS of the relevant server(s). Enabling this option causes
-// DsReplicaSyncAll to return the servers' DNs instead.
-
- DS_REPSYNCALL_ID_SERVERS_BY_DN = $00000004;
- {$EXTERNALSYM DS_REPSYNCALL_ID_SERVERS_BY_DN}
-
-// This option disables all syncing. The topology will still be analyzed and
-// unavailable / unreachable servers will still be identified.
-
- DS_REPSYNCALL_DO_NOT_SYNC = $00000008;
- {$EXTERNALSYM DS_REPSYNCALL_DO_NOT_SYNC}
-
-// Ordinarily, DsReplicaSyncAll attempts to bind to all servers before
-// generating the topology. If a server cannot be contacted, DsReplicaSyncAll
-// excludes that server from the topology and tries to route around it. If
-// this option is enabled, checking will be bypassed and DsReplicaSyncAll will
-// assume all servers are responding. This will speed operation of
-// DsReplicaSyncAll, but if some servers are not responding, some transitive
-// replications may be blocked.
-
- DS_REPSYNCALL_SKIP_INITIAL_CHECK = $00000010;
- {$EXTERNALSYM DS_REPSYNCALL_SKIP_INITIAL_CHECK}
-
-// Push mode. Push changes from the home server out to all partners using
-// transitive replication. This reverses the direction of replication, and
-// the order of execution of the replication sets from the usual "pulling"
-// mode of execution.
-
- DS_REPSYNCALL_PUSH_CHANGES_OUTWARD = $00000020;
- {$EXTERNALSYM DS_REPSYNCALL_PUSH_CHANGES_OUTWARD}
-
-// Cross site boundaries. By default, the only servers that are considered are
-// those in the same site as the home system. With this option, all servers in
-// the enterprise, across all sites, are eligible. They must be connected by
-// a synchronous (RPC) transport, however.
-
- DS_REPSYNCALL_CROSS_SITE_BOUNDARIES = $00000040;
- {$EXTERNALSYM DS_REPSYNCALL_CROSS_SITE_BOUNDARIES}
-
-// DsReplicaSyncAll. Syncs the destination server with all other servers
-// in the site.
-//
-// PARAMETERS:
-// hDS (IN) - A DS connection bound to the destination server.
-// pszNameContext (IN) - The naming context to synchronize
-// ulFlags (IN) - Bitwise OR of zero or more flags
-// pFnCallBack (IN, OPTIONAL) - Callback function for message-passing.
-// pCallbackData (IN, OPTIONAL) - A pointer that will be passed to the
-// first argument of the callback function.
-// pErrors (OUT, OPTIONAL) - Pointer to a (PDS_REPSYNCALL_ERRINFO *)
-// object that will hold an array of error structures.
-
-type
- TSynchUpdateProcA = function(pData: LPVOID; pUpdate: PDS_REPSYNCALL_UPDATEA): BOOL; stdcall;
- TSynchUpdateProcW = function(pData: LPVOID; pUpdate: PDS_REPSYNCALL_UPDATEW): BOOL; stdcall;
- {$IFDEF UNICODE}
- TSynchUpdateProc = TSynchUpdateProcW;
- {$ELSE}
- TSynchUpdateProc = TSynchUpdateProcA;
- {$ENDIF UNICODE}
-
-function DsReplicaSyncAllA(hDS: HANDLE; pszNameContext: LPCSTR; ulFlags: ULONG;
- pfnCallBack: TSynchUpdateProcA; pCallbackData: LPVOID;
- pErrors: PPDS_REPSYNCALL_ERRINFOA): DWORD; stdcall;
-{$EXTERNALSYM DsReplicaSyncAllA}
-function DsReplicaSyncAllW(hDS: HANDLE; pszNameContext: LPCWSTR; ulFlags: ULONG;
- pfnCallBackW: TSynchUpdateProcW; pCallbackData: LPVOID;
- pErrors: PPDS_REPSYNCALL_ERRINFOW): DWORD; stdcall;
-{$EXTERNALSYM DsReplicaSyncAllW}
-function DsReplicaSyncAll(hDS: HANDLE; pszNameContext: LPCTSTR; ulFlags: ULONG;
- pfnCallBack: TSynchUpdateProc; pCallbackData: LPVOID;
- pErrors: PPDS_REPSYNCALL_ERRINFO): DWORD; stdcall;
-{$EXTERNALSYM DsReplicaSyncAll}
-
-function DsRemoveDsServerA(hDs: HANDLE; ServerDN: LPSTR; DomainDN: LPSTR;
- fLastDcInDomain: PBOOL; fCommit: BOOL): DWORD; stdcall;
-{$EXTERNALSYM DsRemoveDsServerA}
-function DsRemoveDsServerW(hDs: HANDLE; ServerDN: LPWSTR; DomainDN: LPWSTR;
- fLastDcInDomain: PBOOL; fCommit: BOOL): DWORD; stdcall;
-{$EXTERNALSYM DsRemoveDsServerW}
-function DsRemoveDsServer(hDs: HANDLE; ServerDN: LPTSTR; DomainDN: LPTSTR;
- fLastDcInDomain: PBOOL; fCommit: BOOL): DWORD; stdcall;
-{$EXTERNALSYM DsRemoveDsServer}
-
-function DsRemoveDsDomainA(hDs: HANDLE; DomainDN: LPSTR): DWORD; stdcall;
-{$EXTERNALSYM DsRemoveDsDomainA}
-function DsRemoveDsDomainW(hDs: HANDLE; DomainDN: LPWSTR): DWORD; stdcall;
-{$EXTERNALSYM DsRemoveDsDomainW}
-function DsRemoveDsDomain(hDs: HANDLE; DomainDN: LPTSTR): DWORD; stdcall;
-{$EXTERNALSYM DsRemoveDsDomain}
-
-function DsListSitesA(hDs: HANDLE; var ppSites: PDS_NAME_RESULTA): DWORD; stdcall;
-{$EXTERNALSYM DsListSitesA}
-function DsListSitesW(hDs: HANDLE; var ppSites: PDS_NAME_RESULTW): DWORD; stdcall;
-{$EXTERNALSYM DsListSitesW}
-function DsListSites(hDs: HANDLE; var ppSites: PDS_NAME_RESULT): DWORD; stdcall;
-{$EXTERNALSYM DsListSites}
-
-function DsListServersInSiteA(hDs: HANDLE; site: LPCSTR;
- var ppServers: PDS_NAME_RESULTA): DWORD; stdcall;
-{$EXTERNALSYM DsListServersInSiteA}
-function DsListServersInSiteW(hDs: HANDLE; site: LPCWSTR;
- var ppServers: PDS_NAME_RESULTW): DWORD; stdcall;
-{$EXTERNALSYM DsListServersInSiteW}
-function DsListServersInSite(hDs: HANDLE; site: LPCTSTR;
- var ppServers: PDS_NAME_RESULT): DWORD; stdcall;
-{$EXTERNALSYM DsListServersInSite}
-
-function DsListDomainsInSiteA(hDs: HANDLE; site: LPCSTR;
- var ppDomains: PDS_NAME_RESULTA): DWORD; stdcall;
-{$EXTERNALSYM DsListDomainsInSiteA}
-function DsListDomainsInSiteW(hDs: HANDLE; site: LPCWSTR;
- var ppDomains: PDS_NAME_RESULTW): DWORD; stdcall;
-{$EXTERNALSYM DsListDomainsInSiteW}
-function DsListDomainsInSite(hDs: HANDLE; site: LPCTSTR;
- var ppDomains: PDS_NAME_RESULT): DWORD; stdcall;
-{$EXTERNALSYM DsListDomainsInSite}
-
-function DsListServersForDomainInSiteA(hDs: HANDLE; domain: LPCSTR; site: LPCSTR;
- var ppServers: PDS_NAME_RESULTA): DWORD; stdcall;
-{$EXTERNALSYM DsListServersForDomainInSiteA}
-function DsListServersForDomainInSiteW(hDs: HANDLE; domain: LPCWSTR; site: LPCWSTR;
- var ppServers: PDS_NAME_RESULTW): DWORD; stdcall;
-{$EXTERNALSYM DsListServersForDomainInSiteW}
-function DsListServersForDomainInSite(hDs: HANDLE; domain: LPCTSTR; site: LPCTSTR;
- var ppServers: PDS_NAME_RESULT): DWORD; stdcall;
-{$EXTERNALSYM DsListServersForDomainInSite}
-
-// Define indices for DsListInfoForServer return data. Check status
-// for each field as a given value may not be present.
-
-const
- DS_LIST_DSA_OBJECT_FOR_SERVER = 0;
- {$EXTERNALSYM DS_LIST_DSA_OBJECT_FOR_SERVER}
- DS_LIST_DNS_HOST_NAME_FOR_SERVER = 1;
- {$EXTERNALSYM DS_LIST_DNS_HOST_NAME_FOR_SERVER}
- DS_LIST_ACCOUNT_OBJECT_FOR_SERVER = 2;
- {$EXTERNALSYM DS_LIST_ACCOUNT_OBJECT_FOR_SERVER}
-
-function DsListInfoForServerA(hDs: HANDLE; server: LPCSTR;
- var ppInfo: PDS_NAME_RESULTA): DWORD; stdcall;
-{$EXTERNALSYM DsListInfoForServerA}
-function DsListInfoForServerW(hDs: HANDLE; server: LPCWSTR;
- var ppInfo: PDS_NAME_RESULTW): DWORD; stdcall;
-{$EXTERNALSYM DsListInfoForServerW}
-function DsListInfoForServer(hDs: HANDLE; server: LPCTSTR;
- var ppInfo: PDS_NAME_RESULT): DWORD; stdcall;
-{$EXTERNALSYM DsListInfoForServer}
-
-// Define indices for DsListRoles return data. Check status for
-// each field as a given value may not be present.
-
-const
- DS_ROLE_SCHEMA_OWNER = 0;
- {$EXTERNALSYM DS_ROLE_SCHEMA_OWNER}
- DS_ROLE_DOMAIN_OWNER = 1;
- {$EXTERNALSYM DS_ROLE_DOMAIN_OWNER}
- DS_ROLE_PDC_OWNER = 2;
- {$EXTERNALSYM DS_ROLE_PDC_OWNER}
- DS_ROLE_RID_OWNER = 3;
- {$EXTERNALSYM DS_ROLE_RID_OWNER}
- DS_ROLE_INFRASTRUCTURE_OWNER = 4;
- {$EXTERNALSYM DS_ROLE_INFRASTRUCTURE_OWNER}
-
-function DsListRolesA(hDs: HANDLE; var ppRoles: PDS_NAME_RESULTA): DWORD; stdcall;
-{$EXTERNALSYM DsListRolesA}
-function DsListRolesW(hDs: HANDLE; var ppRoles: PDS_NAME_RESULTW): DWORD; stdcall;
-{$EXTERNALSYM DsListRolesW}
-function DsListRoles(hDs: HANDLE; var ppRoles: PDS_NAME_RESULT): DWORD; stdcall;
-{$EXTERNALSYM DsListRoles}
-
-//
-// DsQuerySitesByCost{A|W} allows the caller to determine the
-// communication cost between the From Site and each of the sites
-// in the list of To Sites. The costs are returned in the rgSiteInfo
-// structure which must be freed with DsQuerySitesFree.
-//
-// The Site Names should all be passed as RDNs. For example, if the
-// site's DN is "CN=Foo,CN=Sites,CN=Configuration,...", the RDN is
-// simply "Foo".
-//
-
-type
- DS_SITE_COST_INFO = record
- errorCode: DWORD;
- cost: DWORD;
- end;
- {$EXTERNALSYM DS_SITE_COST_INFO}
- PDS_SITE_COST_INFO = ^DS_SITE_COST_INFO;
- {$EXTERNALSYM PDS_SITE_COST_INFO}
- TDsSiteCostInfo = DS_SITE_COST_INFO;
- PDsSiteCostInfo = PDS_SITE_COST_INFO;
-
-function DsQuerySitesByCostW(hDS: HANDLE; pwszFromSite: LPWSTR; out rgwszToSites: LPWSTR; cToSites, dwFlags: DWORD;
- out prgSiteInfo: PDS_SITE_COST_INFO): DWORD; stdcall;
-{$EXTERNALSYM DsQuerySitesByCostW}
-function DsQuerySitesByCostA(hDS: HANDLE; pwszFromSite: LPSTR; out rgwszToSites: LPSTR; cToSites, dwFlags: DWORD;
- out prgSiteInfo: PDS_SITE_COST_INFO): DWORD; stdcall;
-{$EXTERNALSYM DsQuerySitesByCostA}
-function DsQuerySitesByCost(hDS: HANDLE; pwszFromSite: LPTSTR; out rgwszToSites: LPTSTR; cToSites, dwFlags: DWORD;
- out prgSiteInfo: PDS_SITE_COST_INFO): DWORD; stdcall;
-{$EXTERNALSYM DsQuerySitesByCost}
-
-//
-// DsQuerySitesByCost will free the site info array returned
-// from DsQuerySitesByCost{A|W}.
-//
-
-procedure DsQuerySitesFree(rgSiteInfo: PDS_SITE_COST_INFO); stdcall;
-{$EXTERNALSYM DsQuerySitesFree}
-
-// Definitions required for DsMapSchemaGuid routines.
-
-const
- DS_SCHEMA_GUID_NOT_FOUND = 0;
- {$EXTERNALSYM DS_SCHEMA_GUID_NOT_FOUND}
- DS_SCHEMA_GUID_ATTR = 1;
- {$EXTERNALSYM DS_SCHEMA_GUID_ATTR}
- DS_SCHEMA_GUID_ATTR_SET = 2;
- {$EXTERNALSYM DS_SCHEMA_GUID_ATTR_SET}
- DS_SCHEMA_GUID_CLASS = 3;
- {$EXTERNALSYM DS_SCHEMA_GUID_CLASS}
- DS_SCHEMA_GUID_CONTROL_RIGHT = 4;
- {$EXTERNALSYM DS_SCHEMA_GUID_CONTROL_RIGHT}
-
-type
- PDS_SCHEMA_GUID_MAPA = ^DS_SCHEMA_GUID_MAPA;
- {$EXTERNALSYM PDS_SCHEMA_GUID_MAPA}
- DS_SCHEMA_GUID_MAPA = record
- guid: GUID; // mapped GUID
- guidType: DWORD; // DS_SCHEMA_GUID_* value
- pName: LPSTR; // might be NULL
- end;
- {$EXTERNALSYM DS_SCHEMA_GUID_MAPA}
- TDsSchemaGuidMapA = DS_SCHEMA_GUID_MAPA;
- PDsSchemaGuidMapA = PDS_SCHEMA_GUID_MAPA;
-
- PDS_SCHEMA_GUID_MAPW = ^DS_SCHEMA_GUID_MAPW;
- {$EXTERNALSYM PDS_SCHEMA_GUID_MAPW}
- DS_SCHEMA_GUID_MAPW = record
- guid: GUID; // mapped GUID
- guidType: DWORD; // DS_SCHEMA_GUID_* value
- pName: LPWSTR; // might be NULL
- end;
- {$EXTERNALSYM DS_SCHEMA_GUID_MAPW}
- TDsSchemaGuidMapW = DS_SCHEMA_GUID_MAPW;
- PDsSchemaGuidMapW = PDS_SCHEMA_GUID_MAPW;
- {$IFDEF UNICODE}
- TDsSchemaGuidMap = DS_SCHEMA_GUID_MAPW;
- PDsSchemaGuidMap = PDS_SCHEMA_GUID_MAPW;
- DS_SCHEMA_GUID_MAP = DS_SCHEMA_GUID_MAPW;
- PDS_SCHEMA_GUID_MAP = PDS_SCHEMA_GUID_MAPW;
- {$ELSE}
- TDsSchemaGuidMap = DS_SCHEMA_GUID_MAPW;
- PDsSchemaGuidMap = PDS_SCHEMA_GUID_MAPW;
- DS_SCHEMA_GUID_MAP = DS_SCHEMA_GUID_MAPA;
- PDS_SCHEMA_GUID_MAP = PDS_SCHEMA_GUID_MAPA;
- {$ENDIF UNICODE}
-
-function DsMapSchemaGuidsA(hDs: HANDLE; cGuids: DWORD; rGuids: PGUID;
- var ppGuidMap: PDS_SCHEMA_GUID_MAPA): DWORD; stdcall;
-{$EXTERNALSYM DsMapSchemaGuidsA}
-function DsMapSchemaGuidsW(hDs: HANDLE; cGuids: DWORD; rGuids: PGUID;
- var ppGuidMap: PDS_SCHEMA_GUID_MAPW): DWORD; stdcall;
-{$EXTERNALSYM DsMapSchemaGuidsW}
-function DsMapSchemaGuids(hDs: HANDLE; cGuids: DWORD; rGuids: PGUID;
- var ppGuidMap: PDS_SCHEMA_GUID_MAP): DWORD; stdcall;
-{$EXTERNALSYM DsMapSchemaGuids}
-
-procedure DsFreeSchemaGuidMapA(pGuidMap: PDS_SCHEMA_GUID_MAPA); stdcall;
-{$EXTERNALSYM DsFreeSchemaGuidMapA}
-procedure DsFreeSchemaGuidMapW(pGuidMap: PDS_SCHEMA_GUID_MAPW); stdcall;
-{$EXTERNALSYM DsFreeSchemaGuidMapW}
-procedure DsFreeSchemaGuidMap(pGuidMap: PDS_SCHEMA_GUID_MAP); stdcall;
-{$EXTERNALSYM DsFreeSchemaGuidMap}
-
-type
- PDS_DOMAIN_CONTROLLER_INFO_1A = ^DS_DOMAIN_CONTROLLER_INFO_1A;
- {$EXTERNALSYM PDS_DOMAIN_CONTROLLER_INFO_1A}
- DS_DOMAIN_CONTROLLER_INFO_1A = record
- NetbiosName: LPSTR; // might be NULL
- DnsHostName: LPSTR; // might be NULL
- SiteName: LPSTR; // might be NULL
- ComputerObjectName: LPSTR; // might be NULL
- ServerObjectName: LPSTR; // might be NULL
- fIsPdc: BOOL;
- fDsEnabled: BOOL;
- end;
- {$EXTERNALSYM DS_DOMAIN_CONTROLLER_INFO_1A}
- TDsDomainControllerInfo1A = DS_DOMAIN_CONTROLLER_INFO_1A;
- PDsDomainControllerInfo1A = PDS_DOMAIN_CONTROLLER_INFO_1A;
-
- PDS_DOMAIN_CONTROLLER_INFO_1W = ^DS_DOMAIN_CONTROLLER_INFO_1W;
- {$EXTERNALSYM PDS_DOMAIN_CONTROLLER_INFO_1W}
- DS_DOMAIN_CONTROLLER_INFO_1W = record
- NetbiosName: LPWSTR; // might be NULL
- DnsHostName: LPWSTR; // might be NULL
- SiteName: LPWSTR; // might be NULL
- ComputerObjectName: LPWSTR; // might be NULL
- ServerObjectName: LPWSTR; // might be NULL
- fIsPdc: BOOL;
- fDsEnabled: BOOL;
- end;
- {$EXTERNALSYM DS_DOMAIN_CONTROLLER_INFO_1W}
- TDsDomainControllerInfo1W = DS_DOMAIN_CONTROLLER_INFO_1W;
- PDsDomainControllerInfo1W = PDS_DOMAIN_CONTROLLER_INFO_1W;
-
- PDS_DOMAIN_CONTROLLER_INFO_2A = ^DS_DOMAIN_CONTROLLER_INFO_2A;
- {$EXTERNALSYM PDS_DOMAIN_CONTROLLER_INFO_2A}
- DS_DOMAIN_CONTROLLER_INFO_2A = record
- NetbiosName: LPSTR; // might be NULL
- DnsHostName: LPSTR; // might be NULL
- SiteName: LPSTR; // might be NULL
- SiteObjectName: LPSTR; // might be NULL
- ComputerObjectName: LPSTR; // might be NULL
- ServerObjectName: LPSTR; // might be NULL
- NtdsDsaObjectName: LPSTR; // might be NULL
- fIsPdc: BOOL;
- fDsEnabled: BOOL;
- fIsGc: BOOL;
- // Valid iff SiteObjectName non-NULL.
- SiteObjectGuid: GUID;
- // Valid iff ComputerObjectName non-NULL.
- ComputerObjectGuid: GUID;
- // Valid iff ServerObjectName non-NULL;
- ServerObjectGuid: GUID;
- // Valid iff fDsEnabled is TRUE.
- NtdsDsaObjectGuid: GUID;
- end;
- {$EXTERNALSYM DS_DOMAIN_CONTROLLER_INFO_2A}
- TDsDomainControllerInfo2A = DS_DOMAIN_CONTROLLER_INFO_2A;
- PDsDomainControllerInfo2A = PDS_DOMAIN_CONTROLLER_INFO_2A;
-
- PDS_DOMAIN_CONTROLLER_INFO_2W = ^DS_DOMAIN_CONTROLLER_INFO_2W;
- {$EXTERNALSYM PDS_DOMAIN_CONTROLLER_INFO_2W}
- DS_DOMAIN_CONTROLLER_INFO_2W = record
- NetbiosName: LPWSTR; // might be NULL
- DnsHostName: LPWSTR; // might be NULL
- SiteName: LPWSTR; // might be NULL
- SiteObjectName: LPWSTR; // might be NULL
- ComputerObjectName: LPWSTR; // might be NULL
- ServerObjectName: LPWSTR; // might be NULL
- NtdsDsaObjectName: LPWSTR; // might be NULL
- fIsPdc: BOOL;
- fDsEnabled: BOOL;
- fIsGc: BOOL;
- // Valid iff SiteObjectName non-NULL.
- SiteObjectGuid: GUID;
- // Valid iff ComputerObjectName non-NULL.
- ComputerObjectGuid: GUID;
- // Valid iff ServerObjectName non-NULL;
- ServerObjectGuid: GUID;
- // Valid iff fDsEnabled is TRUE.
- NtdsDsaObjectGuid: GUID;
- end;
- {$EXTERNALSYM DS_DOMAIN_CONTROLLER_INFO_2W}
- TDsDomainControllerInfo2W = DS_DOMAIN_CONTROLLER_INFO_2W;
- PDsDomainControllerInfo2W = PDS_DOMAIN_CONTROLLER_INFO_2W;
-
- {$IFDEF UNICODE}
- DS_DOMAIN_CONTROLLER_INFO_1 = DS_DOMAIN_CONTROLLER_INFO_1W;
- {$EXTERNALSYM DS_DOMAIN_CONTROLLER_INFO_1}
- DS_DOMAIN_CONTROLLER_INFO_2 = DS_DOMAIN_CONTROLLER_INFO_2W;
- {$EXTERNALSYM DS_DOMAIN_CONTROLLER_INFO_2}
- PDS_DOMAIN_CONTROLLER_INFO_1 = PDS_DOMAIN_CONTROLLER_INFO_1W;
- {$EXTERNALSYM PDS_DOMAIN_CONTROLLER_INFO_1}
- PDS_DOMAIN_CONTROLLER_INFO_2 = PDS_DOMAIN_CONTROLLER_INFO_2W;
- {$EXTERNALSYM PDS_DOMAIN_CONTROLLER_INFO_2}
- TDsDomainControllerInfo1 = TDsDomainControllerInfo1W;
- PDsDomainControllerInfo1 = PDsDomainControllerInfo1W;
- TDsDomainControllerInfo2 = TDsDomainControllerInfo2W;
- PDsDomainControllerInfo2 = PDsDomainControllerInfo2W;
- {$ELSE}
- DS_DOMAIN_CONTROLLER_INFO_1 = DS_DOMAIN_CONTROLLER_INFO_1A;
- {$EXTERNALSYM DS_DOMAIN_CONTROLLER_INFO_1}
- DS_DOMAIN_CONTROLLER_INFO_2 = DS_DOMAIN_CONTROLLER_INFO_2A;
- {$EXTERNALSYM DS_DOMAIN_CONTROLLER_INFO_2}
- PDS_DOMAIN_CONTROLLER_INFO_1 = PDS_DOMAIN_CONTROLLER_INFO_1A;
- {$EXTERNALSYM PDS_DOMAIN_CONTROLLER_INFO_1}
- PDS_DOMAIN_CONTROLLER_INFO_2 = PDS_DOMAIN_CONTROLLER_INFO_2A;
- {$EXTERNALSYM PDS_DOMAIN_CONTROLLER_INFO_2}
- TDsDomainControllerInfo1 = TDsDomainControllerInfo1A;
- PDsDomainControllerInfo1 = PDsDomainControllerInfo1A;
- TDsDomainControllerInfo2 = TDsDomainControllerInfo2A;
- PDsDomainControllerInfo2 = PDsDomainControllerInfo2A;
- {$ENDIF UNICODE}
-
-// The following APIs strictly find domain controller account objects
-// in the DS and return information associated with them. As such, they
-// may return entries which correspond to domain controllers long since
-// decommissioned, etc. and there is no guarantee that there exists a
-// physical domain controller at all. Use DsGetDcName (dsgetdc.h) to find
-// live domain controllers for a domain.
-
-function DsGetDomainControllerInfoA(hDs: HANDLE; DomainName: LPCSTR;
- InfoLevel: DWORD; var pcOut: DWORD; ppInfo: PPVOID): DWORD; stdcall;
-{$EXTERNALSYM DsGetDomainControllerInfoA}
-function DsGetDomainControllerInfoW(hDs: HANDLE; DomainName: LPCWSTR;
- InfoLevel: DWORD; var pcOut: DWORD; ppInfo: PPVOID): DWORD; stdcall;
-{$EXTERNALSYM DsGetDomainControllerInfoW}
-function DsGetDomainControllerInfo(hDs: HANDLE; DomainName: LPCTSTR;
- InfoLevel: DWORD; var pcOut: DWORD; ppInfo: PPVOID): DWORD; stdcall;
-{$EXTERNALSYM DsGetDomainControllerInfo}
-
-procedure DsFreeDomainControllerInfoA(InfoLevel: DWORD; cInfo: DWORD;
- pInfo: PVOID); stdcall;
-{$EXTERNALSYM DsFreeDomainControllerInfoA}
-procedure DsFreeDomainControllerInfoW(InfoLevel: DWORD; cInfo: DWORD;
- pInfo: PVOID); stdcall;
-{$EXTERNALSYM DsFreeDomainControllerInfoW}
-procedure DsFreeDomainControllerInfo(InfoLevel: DWORD; cInfo: DWORD;
- pInfo: PVOID); stdcall;
-{$EXTERNALSYM DsFreeDomainControllerInfo}
-
-type
- // Which task should be run?
-
- DS_KCC_TASKID = (DS_KCC_TASKID_UPDATE_TOPOLOGY);
- {$EXTERNALSYM DS_KCC_TASKID}
- TDsKccTaskId = DS_KCC_TASKID;
-
-// Don't wait for completion of the task; queue it and return.
-
-const
- DS_KCC_FLAG_ASYNC_OP = 1 shl 0;
- {$EXTERNALSYM DS_KCC_FLAG_ASYNC_OP}
-
-// Don't enqueue the task if another queued task will run soon.
-
- DS_KCC_FLAG_DAMPED = 1 shl 1;
- {$EXTERNALSYM DS_KCC_FLAG_DAMPED}
-
-function DsReplicaConsistencyCheck(hDS: HANDLE; TaskID: DS_KCC_TASKID;
- dwFlags: DWORD): DWORD; stdcall;
-{$EXTERNALSYM DsReplicaConsistencyCheck}
-
-function DsReplicaVerifyObjectsW(hDS: HANDLE; NameContext: LPCWSTR; const pUuidDsaSrc: UUID; ulOptions: ULONG): DWORD; stdcall;
-{$EXTERNALSYM DsReplicaVerifyObjectsW}
-function DsReplicaVerifyObjectsA(hDS: HANDLE; NameContext: LPCSTR; const pUuidDsaSrc: UUID; ulOptions: ULONG): DWORD; stdcall;
-{$EXTERNALSYM DsReplicaVerifyObjectsA}
-function DsReplicaVerifyObjects(hDS: HANDLE; NameContext: LPCTSTR; const pUuidDsaSrc: UUID; ulOptions: ULONG): DWORD; stdcall;
-{$EXTERNALSYM DsReplicaVerifyObjects}
-
-// Do not delete objects on DsReplicaVerifyObjects call
-
-const
- DS_EXIST_ADVISORY_MODE = $1;
- {$EXTERNALSYM DS_EXIST_ADVISORY_MODE}
-
-type
- _DS_REPL_INFO_TYPE = (
- DS_REPL_INFO_NEIGHBORS, // returns DS_REPL_NEIGHBORS *
- DS_REPL_INFO_CURSORS_FOR_NC, // returns DS_REPL_CURSORS *
- DS_REPL_INFO_METADATA_FOR_OBJ, // returns DS_REPL_OBJECT_META_DATA *
- DS_REPL_INFO_KCC_DSA_CONNECT_FAILURES, // both return
- DS_REPL_INFO_KCC_DSA_LINK_FAILURES, // DS_REPL_KCC_DSA_FAILURES *
- DS_REPL_INFO_PENDING_OPS, // returns DS_REPL_PENDING_OPS *
-
- ////////////////////////////////////////////////////////////////////////////
- //
- // The following info types are not supported by Windows 2000. Calling
- // DsReplicaGetInfo() with one of the types on a Windows 2000 client or
- // where hDS is bound to a Windows 2000 DC will fail with
- // ERROR_NOT_SUPPORTED.
- //
-
- DS_REPL_INFO_METADATA_FOR_ATTR_VALUE, // returns DS_REPL_ATTR_VALUE_META_DATA *
- DS_REPL_INFO_CURSORS_2_FOR_NC, // returns DS_REPL_CURSORS_2 *
- DS_REPL_INFO_CURSORS_3_FOR_NC, // returns DS_REPL_CURSORS_3 *
- DS_REPL_INFO_METADATA_2_FOR_OBJ, // returns DS_REPL_OBJECT_META_DATA_2 *
- DS_REPL_INFO_METADATA_2_FOR_ATTR_VALUE, // returns DS_REPL_ATTR_VALUE_META_DATA_2 *
-
- // <- insert new DS_REPL_INFO_* types here.
-
- DS_REPL_INFO_TYPE_MAX);
- {$EXTERNALSYM _DS_REPL_INFO_TYPE}
- DS_REPL_INFO_TYPE = _DS_REPL_INFO_TYPE;
- {$EXTERNALSYM DS_REPL_INFO_TYPE}
- TDsReplInfoType = DS_REPL_INFO_TYPE;
-
-// Bit values for flags argument to DsReplicaGetInfo2
-
-const
- DS_REPL_INFO_FLAG_IMPROVE_LINKED_ATTRS = $00000001;
- {$EXTERNALSYM DS_REPL_INFO_FLAG_IMPROVE_LINKED_ATTRS}
-
-// Bit values for the dwReplicaFlags field of the DS_REPL_NEIGHBOR structure.
-
-// Bit values for the dwReplicaFlags field of the DS_REPL_NEIGHBOR structure.
-// Also used for the ulReplicaFlags argument to DsReplicaModify
-
- DS_REPL_NBR_WRITEABLE = $00000010;
- {$EXTERNALSYM DS_REPL_NBR_WRITEABLE}
- DS_REPL_NBR_SYNC_ON_STARTUP = $00000020;
- {$EXTERNALSYM DS_REPL_NBR_SYNC_ON_STARTUP}
- DS_REPL_NBR_DO_SCHEDULED_SYNCS = $00000040;
- {$EXTERNALSYM DS_REPL_NBR_DO_SCHEDULED_SYNCS}
- DS_REPL_NBR_USE_ASYNC_INTERSITE_TRANSPORT = $00000080;
- {$EXTERNALSYM DS_REPL_NBR_USE_ASYNC_INTERSITE_TRANSPORT}
- DS_REPL_NBR_TWO_WAY_SYNC = $00000200;
- {$EXTERNALSYM DS_REPL_NBR_TWO_WAY_SYNC}
- DS_REPL_NBR_RETURN_OBJECT_PARENTS = $00000800;
- {$EXTERNALSYM DS_REPL_NBR_RETURN_OBJECT_PARENTS}
- DS_REPL_NBR_FULL_SYNC_IN_PROGRESS = $00010000;
- {$EXTERNALSYM DS_REPL_NBR_FULL_SYNC_IN_PROGRESS}
- DS_REPL_NBR_FULL_SYNC_NEXT_PACKET = $00020000;
- {$EXTERNALSYM DS_REPL_NBR_FULL_SYNC_NEXT_PACKET}
- DS_REPL_NBR_NEVER_SYNCED = $00200000;
- {$EXTERNALSYM DS_REPL_NBR_NEVER_SYNCED}
- DS_REPL_NBR_PREEMPTED = $01000000;
- {$EXTERNALSYM DS_REPL_NBR_PREEMPTED}
- DS_REPL_NBR_IGNORE_CHANGE_NOTIFICATIONS = $04000000;
- {$EXTERNALSYM DS_REPL_NBR_IGNORE_CHANGE_NOTIFICATIONS}
- DS_REPL_NBR_DISABLE_SCHEDULED_SYNC = $08000000;
- {$EXTERNALSYM DS_REPL_NBR_DISABLE_SCHEDULED_SYNC}
- DS_REPL_NBR_COMPRESS_CHANGES = $10000000;
- {$EXTERNALSYM DS_REPL_NBR_COMPRESS_CHANGES}
- DS_REPL_NBR_NO_CHANGE_NOTIFICATIONS = $20000000;
- {$EXTERNALSYM DS_REPL_NBR_NO_CHANGE_NOTIFICATIONS}
- DS_REPL_NBR_PARTIAL_ATTRIBUTE_SET = $40000000;
- {$EXTERNALSYM DS_REPL_NBR_PARTIAL_ATTRIBUTE_SET}
-
-// This is the mask of replica flags that may be changed on the DsReplicaModify
-// call using the ulReplicaFlags parameter. The other flags are protected
-// system flags. The previous values of the system flags must be read in
-// advance and merged into the ulReplicaFlags parameter unchanged.
-
- DS_REPL_NBR_MODIFIABLE_MASK =
- DS_REPL_NBR_SYNC_ON_STARTUP or
- DS_REPL_NBR_DO_SCHEDULED_SYNCS or
- DS_REPL_NBR_TWO_WAY_SYNC or
- DS_REPL_NBR_IGNORE_CHANGE_NOTIFICATIONS or
- DS_REPL_NBR_DISABLE_SCHEDULED_SYNC or
- DS_REPL_NBR_COMPRESS_CHANGES or
- DS_REPL_NBR_NO_CHANGE_NOTIFICATIONS;
- {$EXTERNALSYM DS_REPL_NBR_MODIFIABLE_MASK}
-
-type
- _DS_REPL_NEIGHBORW = record
- pszNamingContext: LPWSTR;
- pszSourceDsaDN: LPWSTR;
- pszSourceDsaAddress: LPWSTR;
- pszAsyncIntersiteTransportDN: LPWSTR;
- dwReplicaFlags: DWORD;
- dwReserved: DWORD; // alignment
- uuidNamingContextObjGuid: UUID;
- uuidSourceDsaObjGuid: UUID;
- uuidSourceDsaInvocationID: UUID;
- uuidAsyncIntersiteTransportObjGuid: UUID;
- usnLastObjChangeSynced: USN;
- usnAttributeFilter: USN;
- ftimeLastSyncSuccess: FILETIME;
- ftimeLastSyncAttempt: FILETIME;
- dwLastSyncResult: DWORD;
- cNumConsecutiveSyncFailures: DWORD;
- end;
- {$EXTERNALSYM _DS_REPL_NEIGHBORW}
- DS_REPL_NEIGHBORW = _DS_REPL_NEIGHBORW;
- {$EXTERNALSYM DS_REPL_NEIGHBORW}
- TDsReplNeighborW = DS_REPL_NEIGHBORW;
- PDsReplNeighborW = ^DS_REPL_NEIGHBORW;
-
-// Fields can be added only to the end of this structure.
-
- _DS_REPL_NEIGHBORW_BLOB = record
- oszNamingContext: DWORD;
- oszSourceDsaDN: DWORD;
- oszSourceDsaAddress: DWORD;
- oszAsyncIntersiteTransportDN: DWORD;
- dwReplicaFlags: DWORD;
- dwReserved: DWORD;
-
- uuidNamingContextObjGuid: UUID;
- uuidSourceDsaObjGuid: UUID;
- uuidSourceDsaInvocationID: UUID;
- uuidAsyncIntersiteTransportObjGuid: UUID;
-
- usnLastObjChangeSynced: USN;
- usnAttributeFilter: USN;
-
- ftimeLastSyncSuccess: FILETIME;
- ftimeLastSyncAttempt: FILETIME;
-
- dwLastSyncResult: DWORD;
- cNumConsecutiveSyncFailures: DWORD;
- end;
- {$EXTERNALSYM _DS_REPL_NEIGHBORW_BLOB}
- DS_REPL_NEIGHBORW_BLOB = _DS_REPL_NEIGHBORW_BLOB;
- {$EXTERNALSYM DS_REPL_NEIGHBORW_BLOB}
- TDsReplNeighborwBlob = DS_REPL_NEIGHBORW_BLOB;
- PDsReplNeighborwBlob = ^DS_REPL_NEIGHBORW_BLOB;
-
- _DS_REPL_NEIGHBORSW = record
- cNumNeighbors: DWORD;
- dwReserved: DWORD; // alignment
- rgNeighbor: array [0..0] of DS_REPL_NEIGHBORW;
- end;
- {$EXTERNALSYM _DS_REPL_NEIGHBORSW}
- DS_REPL_NEIGHBORSW = _DS_REPL_NEIGHBORSW;
- {$EXTERNALSYM DS_REPL_NEIGHBORSW}
- TDsReplNeighborsW = DS_REPL_NEIGHBORSW;
- PDsReplNeighborsW = ^DS_REPL_NEIGHBORSW;
-
- _DS_REPL_CURSOR = record
- uuidSourceDsaInvocationID: UUID;
- usnAttributeFilter: USN;
- end;
- {$EXTERNALSYM _DS_REPL_CURSOR}
- DS_REPL_CURSOR = _DS_REPL_CURSOR;
- {$EXTERNALSYM DS_REPL_CURSOR}
- TDsReplCursor = DS_REPL_CURSOR;
- PDsReplCursor = ^DS_REPL_CURSOR;
-
- _DS_REPL_CURSOR_2 = record
- uuidSourceDsaInvocationID: UUID;
- usnAttributeFilter: USN;
- ftimeLastSyncSuccess: FILETIME;
- end;
- {$EXTERNALSYM _DS_REPL_CURSOR_2}
- DS_REPL_CURSOR_2 = _DS_REPL_CURSOR_2;
- {$EXTERNALSYM DS_REPL_CURSOR_2}
- TDsReplCursor2 = DS_REPL_CURSOR_2;
- PDsReplCursor2 = ^DS_REPL_CURSOR_2;
-
- _DS_REPL_CURSOR_3W = record
- uuidSourceDsaInvocationID: UUID;
- usnAttributeFilter: USN;
- ftimeLastSyncSuccess: FILETIME;
- pszSourceDsaDN: LPWSTR;
- end;
- {$EXTERNALSYM _DS_REPL_CURSOR_3W}
- DS_REPL_CURSOR_3W = _DS_REPL_CURSOR_3W;
- {$EXTERNALSYM DS_REPL_CURSOR_3W}
- TDsReplCursow3W = DS_REPL_CURSOR_3W;
- PDsReplCursow3W = ^DS_REPL_CURSOR_3W;
-
-// Fields can be added only to the end of this structure.
-
- _DS_REPL_CURSOR_BLOB = record
- uuidSourceDsaInvocationID: UUID;
- usnAttributeFilter: USN;
- ftimeLastSyncSuccess: FILETIME;
- oszSourceDsaDN: DWORD;
- end;
- {$EXTERNALSYM _DS_REPL_CURSOR_BLOB}
- DS_REPL_CURSOR_BLOB = _DS_REPL_CURSOR_BLOB;
- {$EXTERNALSYM DS_REPL_CURSOR_BLOB}
- TDsReplCursorBlob = DS_REPL_CURSOR_BLOB;
- PDsReplCursorBlob = ^DS_REPL_CURSOR_BLOB;
-
- _DS_REPL_CURSORS = record
- cNumCursors: DWORD;
- dwReserved: DWORD; // alignment
- rgCursor: array [0..0] of DS_REPL_CURSOR;
- end;
- {$EXTERNALSYM _DS_REPL_CURSORS}
- DS_REPL_CURSORS = _DS_REPL_CURSORS;
- {$EXTERNALSYM DS_REPL_CURSORS}
- TDsReplCursors = DS_REPL_CURSORS;
- PDsReplCursors = ^DS_REPL_CURSORS;
-
- _DS_REPL_CURSORS_2 = record
- cNumCursors: DWORD;
- dwEnumerationContext: DWORD;
- // keep this 8 byte aligned
- rgCursor: array [0..0] of DS_REPL_CURSOR_2;
- end;
- {$EXTERNALSYM _DS_REPL_CURSORS_2}
- DS_REPL_CURSORS_2 = _DS_REPL_CURSORS_2;
- {$EXTERNALSYM DS_REPL_CURSORS_2}
- TDsReplCursors2 = DS_REPL_CURSORS_2;
- PDsReplCursors2 = ^DS_REPL_CURSORS_2;
-
- _DS_REPL_CURSORS_3W = record
- cNumCursors: DWORD;
- dwEnumerationContext: DWORD;
- // keep this 8 byte aligned
- rgCursor: array [0..0] of DS_REPL_CURSOR_3W;
- end;
- {$EXTERNALSYM _DS_REPL_CURSORS_3W}
- DS_REPL_CURSORS_3W = _DS_REPL_CURSORS_3W;
- {$EXTERNALSYM DS_REPL_CURSORS_3W}
- TDsReplCursors3W = DS_REPL_CURSORS_3W;
- PDsReplCursors3W = ^DS_REPL_CURSORS_3W;
-
- _DS_REPL_ATTR_META_DATA = record
- pszAttributeName: LPWSTR;
- dwVersion: DWORD;
- ftimeLastOriginatingChange: FILETIME;
- uuidLastOriginatingDsaInvocationID: UUID;
- usnOriginatingChange: USN; // in the originating DSA's USN space
- usnLocalChange: USN; // in the local DSA's USN space
- end;
- {$EXTERNALSYM _DS_REPL_ATTR_META_DATA}
- DS_REPL_ATTR_META_DATA = _DS_REPL_ATTR_META_DATA;
- {$EXTERNALSYM DS_REPL_ATTR_META_DATA}
- TDsReplAttrMetaData = DS_REPL_ATTR_META_DATA;
- PDsReplAttrMetaData = ^DS_REPL_ATTR_META_DATA;
-
- _DS_REPL_ATTR_META_DATA_2 = record
- pszAttributeName: LPWSTR;
- dwVersion: DWORD;
- ftimeLastOriginatingChange: FILETIME;
- uuidLastOriginatingDsaInvocationID: UUID;
- usnOriginatingChange: USN; // in the originating DSA's USN space
- usnLocalChange: USN; // in the local DSA's USN space
- pszLastOriginatingDsaDN: LPWSTR;
- end;
- {$EXTERNALSYM _DS_REPL_ATTR_META_DATA_2}
- DS_REPL_ATTR_META_DATA_2 = _DS_REPL_ATTR_META_DATA_2;
- {$EXTERNALSYM DS_REPL_ATTR_META_DATA_2}
- TDsReplAttrMetaData2 = DS_REPL_ATTR_META_DATA_2;
- PDsReplAttrMetaData2 = ^DS_REPL_ATTR_META_DATA_2;
-
-// Fields can be added only to the end of this structure.
-
- _DS_REPL_ATTR_META_DATA_BLOB = record
- oszAttributeName: DWORD;
- dwVersion: DWORD;
- ftimeLastOriginatingChange: FILETIME;
- uuidLastOriginatingDsaInvocationID: UUID;
- usnOriginatingChange: USN; // in the originating DSA's USN space
- usnLocalChange: USN; // in the local DSA's USN space
- oszLastOriginatingDsaDN: DWORD;
- end;
- {$EXTERNALSYM _DS_REPL_ATTR_META_DATA_BLOB}
- DS_REPL_ATTR_META_DATA_BLOB = _DS_REPL_ATTR_META_DATA_BLOB;
- {$EXTERNALSYM DS_REPL_ATTR_META_DATA_BLOB}
- TDsReplAttrMetaDataBlob = DS_REPL_ATTR_META_DATA_BLOB;
- PDsReplAttrMetaDataBlob = ^DS_REPL_ATTR_META_DATA_BLOB;
-
- _DS_REPL_OBJ_META_DATA = record
- cNumEntries: DWORD;
- dwReserved: DWORD; // alignment
- rgMetaData: array [0..0] of DS_REPL_ATTR_META_DATA;
- end;
- {$EXTERNALSYM _DS_REPL_OBJ_META_DATA}
- DS_REPL_OBJ_META_DATA = _DS_REPL_OBJ_META_DATA;
- {$EXTERNALSYM DS_REPL_OBJ_META_DATA}
- TDsReplObjMetaData = DS_REPL_OBJ_META_DATA;
- PDsReplObjMetaData = ^DS_REPL_OBJ_META_DATA;
-
- _DS_REPL_OBJ_META_DATA_2 = record
- cNumEntries: DWORD;
- dwReserved: DWORD; // alignment
- rgMetaData: array [0..0] of DS_REPL_ATTR_META_DATA_2;
- end;
- {$EXTERNALSYM _DS_REPL_OBJ_META_DATA_2}
- DS_REPL_OBJ_META_DATA_2 = _DS_REPL_OBJ_META_DATA_2;
- {$EXTERNALSYM DS_REPL_OBJ_META_DATA_2}
- TDsReplObjMetaData2 = DS_REPL_OBJ_META_DATA_2;
- PDsReplObjMetaData2 = ^DS_REPL_OBJ_META_DATA_2;
-
- _DS_REPL_KCC_DSA_FAILUREW = record
- pszDsaDN: LPWSTR;
- uuidDsaObjGuid: UUID;
- ftimeFirstFailure: FILETIME;
- cNumFailures: DWORD;
- dwLastResult: DWORD; // Win32 error code
- end;
- {$EXTERNALSYM _DS_REPL_KCC_DSA_FAILUREW}
- DS_REPL_KCC_DSA_FAILUREW = _DS_REPL_KCC_DSA_FAILUREW;
- {$EXTERNALSYM DS_REPL_KCC_DSA_FAILUREW}
- TDsReplKccDsaFailureW = DS_REPL_KCC_DSA_FAILUREW;
- PDsReplKccDsaFailureW = ^DS_REPL_KCC_DSA_FAILUREW;
-
-// Fields can be added only to the end of this structure.
-
- _DS_REPL_KCC_DSA_FAILUREW_BLOB = record
- oszDsaDN: DWORD;
- uuidDsaObjGuid: UUID;
- ftimeFirstFailure: FILETIME;
- cNumFailures: DWORD;
- dwLastResult: DWORD; // Win32 error code
- end;
- {$EXTERNALSYM _DS_REPL_KCC_DSA_FAILUREW_BLOB}
- DS_REPL_KCC_DSA_FAILUREW_BLOB = _DS_REPL_KCC_DSA_FAILUREW_BLOB;
- {$EXTERNALSYM DS_REPL_KCC_DSA_FAILUREW_BLOB}
- TDsReplKccDsaFailureWBlob = DS_REPL_KCC_DSA_FAILUREW_BLOB;
- PDsReplKccDsaFailureWBlob = ^DS_REPL_KCC_DSA_FAILUREW_BLOB;
-
- _DS_REPL_KCC_DSA_FAILURESW = record
- cNumEntries: DWORD;
- dwReserved: DWORD; // alignment
- rgDsaFailure: array [0..0] of DS_REPL_KCC_DSA_FAILUREW;
- end;
- {$EXTERNALSYM _DS_REPL_KCC_DSA_FAILURESW}
- DS_REPL_KCC_DSA_FAILURESW = _DS_REPL_KCC_DSA_FAILURESW;
- {$EXTERNALSYM DS_REPL_KCC_DSA_FAILURESW}
- TDsReplKccDsaFailuresW = DS_REPL_KCC_DSA_FAILURESW;
- PDsReplKccDsaFailuresW = ^DS_REPL_KCC_DSA_FAILURESW;
-
- _DS_REPL_OP_TYPE = (
- DS_REPL_OP_TYPE_SYNC,
- DS_REPL_OP_TYPE_ADD,
- DS_REPL_OP_TYPE_DELETE,
- DS_REPL_OP_TYPE_MODIFY,
- DS_REPL_OP_TYPE_UPDATE_REFS);
- {$EXTERNALSYM _DS_REPL_OP_TYPE}
- DS_REPL_OP_TYPE = _DS_REPL_OP_TYPE;
- {$EXTERNALSYM DS_REPL_OP_TYPE}
-
- _DS_REPL_OPW = record
- ftimeEnqueued: FILETIME; // time at which the operation was enqueued
- ulSerialNumber: ULONG; // ID of this sync; unique per machine per boot
- ulPriority: ULONG; // > priority, > urgency
- OpType: DS_REPL_OP_TYPE;
- ulOptions: ULONG; // Zero or more bits specific to OpType; e.g.,
- // DS_REPADD_* for DS_REPL_OP_TYPE_ADD,
- // DS_REPSYNC_* for DS_REPL_OP_TYPE_SYNC, etc.
- pszNamingContext: LPWSTR;
- pszDsaDN: LPWSTR;
- pszDsaAddress: LPWSTR;
- uuidNamingContextObjGuid: UUID;
- uuidDsaObjGuid: UUID;
- end;
- {$EXTERNALSYM _DS_REPL_OPW}
- DS_REPL_OPW = _DS_REPL_OPW;
- {$EXTERNALSYM DS_REPL_OPW}
- TDsReplOpW = DS_REPL_OPW;
- PDsReplOpW = ^DS_REPL_OPW;
-
-// Fields can be added only to the end of this structure.
-
- _DS_REPL_OPW_BLOB = record
- ftimeEnqueued: FILETIME; // time at which the operation was enqueued
- ulSerialNumber: ULONG; // ID of this sync; unique per machine per boot
- ulPriority: ULONG; // > priority, > urgency
- OpType: DS_REPL_OP_TYPE;
-
- ulOptions: ULONG; // Zero or more bits specific to OpType; e.g.,
- // DS_REPADD_* for DS_REPL_OP_TYPE_ADD,
- // DS_REPSYNC_* for DS_REPL_OP_TYPE_SYNC, etc.
- oszNamingContext: DWORD;
- oszDsaDN: DWORD;
- oszDsaAddress: DWORD;
-
- uuidNamingContextObjGuid: UUID;
- uuidDsaObjGuid: UUID;
- end;
- {$EXTERNALSYM _DS_REPL_OPW_BLOB}
- DS_REPL_OPW_BLOB = _DS_REPL_OPW_BLOB;
- {$EXTERNALSYM DS_REPL_OPW_BLOB}
- TDsReplOpwBlob = DS_REPL_OPW_BLOB;
- PDsReplOpwBlob = ^DS_REPL_OPW_BLOB;
-
- _DS_REPL_PENDING_OPSW = record
- ftimeCurrentOpStarted: FILETIME;
- cNumPendingOps: DWORD;
- rgPendingOp: array [0..0] of DS_REPL_OPW;
- end;
- {$EXTERNALSYM _DS_REPL_PENDING_OPSW}
- DS_REPL_PENDING_OPSW = _DS_REPL_PENDING_OPSW;
- {$EXTERNALSYM DS_REPL_PENDING_OPSW}
- TDsReplPendingOpsW = DS_REPL_PENDING_OPSW;
- PDsReplPendingOpsW = ^DS_REPL_PENDING_OPSW;
-
- _DS_REPL_VALUE_META_DATA = record
- pszAttributeName: LPWSTR;
- pszObjectDn: LPWSTR;
- cbData: DWORD;
- pbData: LPBYTE;
- ftimeDeleted: FILETIME;
- ftimeCreated: FILETIME;
- dwVersion: DWORD;
- ftimeLastOriginatingChange: FILETIME;
- uuidLastOriginatingDsaInvocationID: UUID;
- usnOriginatingChange: USN; // in the originating DSA's USN space
- usnLocalChange: USN; // in the local DSA's USN space
- end;
- {$EXTERNALSYM _DS_REPL_VALUE_META_DATA}
- DS_REPL_VALUE_META_DATA = _DS_REPL_VALUE_META_DATA;
- {$EXTERNALSYM DS_REPL_VALUE_META_DATA}
- TDsReplValueMetaData = DS_REPL_VALUE_META_DATA;
- PDsReplValueMetaData = ^DS_REPL_VALUE_META_DATA;
-
- _DS_REPL_VALUE_META_DATA_2 = record
- pszAttributeName: LPWSTR;
- pszObjectDn: LPWSTR;
- cbData: DWORD;
- pbData: LPBYTE;
- ftimeDeleted: FILETIME;
- ftimeCreated: FILETIME;
- dwVersion: DWORD;
- ftimeLastOriginatingChange: FILETIME;
- uuidLastOriginatingDsaInvocationID: UUID;
- usnOriginatingChange: USN; // in the originating DSA's USN space
- usnLocalChange: USN; // in the local DSA's USN space
- pszLastOriginatingDsaDN: LPWSTR;
- end;
- {$EXTERNALSYM _DS_REPL_VALUE_META_DATA_2}
- DS_REPL_VALUE_META_DATA_2 = _DS_REPL_VALUE_META_DATA_2;
- {$EXTERNALSYM DS_REPL_VALUE_META_DATA_2}
- TDsReplValueMetaData2 = DS_REPL_VALUE_META_DATA_2;
- PDsReplValueMetaData2 = ^DS_REPL_VALUE_META_DATA_2;
-
-// Fields can be added only to the end of this structure.
-
- _DS_REPL_VALUE_META_DATA_BLOB = record
- oszAttributeName: DWORD;
- oszObjectDn: DWORD;
- cbData: DWORD;
- obData: DWORD;
- ftimeDeleted: FILETIME;
- ftimeCreated: FILETIME;
- dwVersion: DWORD;
- ftimeLastOriginatingChange: FILETIME;
- uuidLastOriginatingDsaInvocationID: UUID;
- usnOriginatingChange: USN; // in the originating DSA's USN space
- usnLocalChange: USN; // in the local DSA's USN space
- oszLastOriginatingDsaDN: DWORD;
- end;
- {$EXTERNALSYM _DS_REPL_VALUE_META_DATA_BLOB}
- DS_REPL_VALUE_META_DATA_BLOB = _DS_REPL_VALUE_META_DATA_BLOB;
- {$EXTERNALSYM DS_REPL_VALUE_META_DATA_BLOB}
- TDsReplValueMetaDataBlob = DS_REPL_VALUE_META_DATA_BLOB;
- PsReplValueMetaDataBlob = ^DS_REPL_VALUE_META_DATA_BLOB;
-
- _DS_REPL_ATTR_VALUE_META_DATA = record
- cNumEntries: DWORD;
- dwEnumerationContext: DWORD;
- rgMetaData: array [0..0] of DS_REPL_VALUE_META_DATA;
- end;
- {$EXTERNALSYM _DS_REPL_ATTR_VALUE_META_DATA}
- DS_REPL_ATTR_VALUE_META_DATA = _DS_REPL_ATTR_VALUE_META_DATA;
- {$EXTERNALSYM DS_REPL_ATTR_VALUE_META_DATA}
- TDsReplAttrValueMetaData = DS_REPL_ATTR_VALUE_META_DATA;
- PDsReplAttrValueMetaData = ^DS_REPL_ATTR_VALUE_META_DATA;
-
- _DS_REPL_ATTR_VALUE_META_DATA_2 = record
- cNumEntries: DWORD;
- dwEnumerationContext: DWORD;
- rgMetaData: array [0..0] of DS_REPL_VALUE_META_DATA_2;
- end;
- {$EXTERNALSYM _DS_REPL_ATTR_VALUE_META_DATA_2}
- DS_REPL_ATTR_VALUE_META_DATA_2 = _DS_REPL_ATTR_VALUE_META_DATA_2;
- {$EXTERNALSYM DS_REPL_ATTR_VALUE_META_DATA_2}
- TDsReplAttrValueMetaData2 = DS_REPL_ATTR_VALUE_META_DATA_2;
- PDsReplAttrValueMetaData2 = ^DS_REPL_ATTR_VALUE_META_DATA_2;
-
- _DS_REPL_QUEUE_STATISTICSW = record
- ftimeCurrentOpStarted: FILETIME;
- cNumPendingOps: DWORD;
- ftimeOldestSync: FILETIME;
- ftimeOldestAdd: FILETIME;
- ftimeOldestMod: FILETIME;
- ftimeOldestDel: FILETIME;
- ftimeOldestUpdRefs: FILETIME;
- end;
- {$EXTERNALSYM _DS_REPL_QUEUE_STATISTICSW}
- DS_REPL_QUEUE_STATISTICSW = _DS_REPL_QUEUE_STATISTICSW;
- {$EXTERNALSYM DS_REPL_QUEUE_STATISTICSW}
- TDsReplQueueStatisticsW = DS_REPL_QUEUE_STATISTICSW;
- PDsReplQueueStatisticsW = ^DS_REPL_QUEUE_STATISTICSW;
-
-// Fields can be added only to the end of this structure.
-
- DS_REPL_QUEUE_STATISTICSW_BLOB = _DS_REPL_QUEUE_STATISTICSW;
- {$EXTERNALSYM DS_REPL_QUEUE_STATISTICSW_BLOB}
- TDsReplQueueStatisticsWBlob = DS_REPL_QUEUE_STATISTICSW_BLOB;
-
-function DsReplicaGetInfoW(hDS: HANDLE; InfoType: DS_REPL_INFO_TYPE;
- pszObject: LPCWSTR; puuidForSourceDsaObjGuid: LPUUID; ppInfo: PPVOID): DWORD; stdcall;
-{$EXTERNALSYM DsReplicaGetInfoW}
-
-procedure DsReplicaFreeInfo(InfoType: DS_REPL_INFO_TYPE; pInfo: PVOID); stdcall;
-{$EXTERNALSYM DsReplicaFreeInfo}
-
-{$IFDEF UNICODE}
-
-function DsReplicaGetInfo(hDS: HANDLE; InfoType: DS_REPL_INFO_TYPE;
- pszObject: LPCWSTR; puuidForSourceDsaObjGuid: LPUUID; ppInfo: PPVOID): DWORD; stdcall;
-{$EXTERNALSYM DsReplicaGetInfo}
-
-// This API is not supported by Windows 2000 clients or Windows 2000 DCs.
-
-function DsReplicaGetInfo2W(hDS: HANDLE; InfoType: DS_REPL_INFO_TYPE; pszObject: LPCWSTR; const puuidForSourceDsaObjGuid: UUID; pszAttributeName,
- pszValue: LPCWSTR; dwFlags, dwEnumerationContext: DWORD; var ppInfo: LPVOID): DWORD; stdcall;
-{$EXTERNALSYM DsReplicaGetInfo2W}
-
-type
- DS_REPL_NEIGHBOR = DS_REPL_NEIGHBORW;
- {$EXTERNALSYM DS_REPL_NEIGHBOR}
- DS_REPL_NEIGHBORS = DS_REPL_NEIGHBORSW;
- {$EXTERNALSYM DS_REPL_NEIGHBORS}
- DS_REPL_CURSOR_3 = DS_REPL_CURSOR_3W;
- {$EXTERNALSYM DS_REPL_CURSOR_3}
- DS_REPL_CURSORS_3 = DS_REPL_CURSORS_3W;
- {$EXTERNALSYM DS_REPL_CURSORS_3}
- DS_REPL_KCC_DSA_FAILURES = DS_REPL_KCC_DSA_FAILURESW;
- {$EXTERNALSYM DS_REPL_KCC_DSA_FAILURES}
- DS_REPL_KCC_DSA_FAILURE = DS_REPL_KCC_DSA_FAILUREW;
- {$EXTERNALSYM DS_REPL_KCC_DSA_FAILURE}
- DS_REPL_OP = DS_REPL_OPW;
- {$EXTERNALSYM DS_REPL_OP}
- DS_REPL_PENDING_OPS = DS_REPL_PENDING_OPSW;
- {$EXTERNALSYM DS_REPL_PENDING_OPS}
- TDsReplNeighbor = TDsReplNeighborW;
- TDsReplNeighbors = TDsReplNeighborsW;
- TDsReplCursors3 = TDsReplCursors3W;
- TDsReplKccDsaFailures = TDsReplKccDsaFailuresW;
- TDsReplKccDsaFailure = TDsReplKccDsaFailureW;
- TDsReplOp = TDsReplOpW;
- TDsReplPendingOps = TDsReplPendingOpsW;
-{$ELSE}
-// No ANSI equivalents currently supported.
-{$ENDIF UNICODE}
-
-function DsAddSidHistoryA(hDS: HANDLE; Flags: DWORD; SrcDomain: LPCSTR;
- SrcPrincipal: LPCSTR; SrcDomainController: LPCSTR;
- SrcDomainCreds: RPC_AUTH_IDENTITY_HANDLE; DstDomain: LPCSTR;
- DstPrincipal: LPCSTR): DWORD; stdcall;
-{$EXTERNALSYM DsAddSidHistoryA}
-function DsAddSidHistoryW(hDS: HANDLE; Flags: DWORD; SrcDomain: LPCWSTR;
- SrcPrincipal: LPCWSTR; SrcDomainController: LPCWSTR;
- SrcDomainCreds: RPC_AUTH_IDENTITY_HANDLE; DstDomain: LPCWSTR;
- DstPrincipal: LPCWSTR): DWORD; stdcall;
-{$EXTERNALSYM DsAddSidHistoryW}
-function DsAddSidHistory(hDS: HANDLE; Flags: DWORD; SrcDomain: LPCTSTR;
- SrcPrincipal: LPCTSTR; SrcDomainController: LPCTSTR;
- SrcDomainCreds: RPC_AUTH_IDENTITY_HANDLE; DstDomain: LPCTSTR;
- DstPrincipal: LPCTSTR): DWORD; stdcall;
-{$EXTERNALSYM DsAddSidHistory}
-
-// The DsInheritSecurityIdentity API adds the source principal's SID and
-// SID history to the destination principal's SID history and then DELETES
-// THE SOURCE PRINCIPAL. Source and destination principal must be in the
-// same domain.
-
-function DsInheritSecurityIdentityA(hDS: HANDLE; Flags: DWORD;
- SrcPrincipal: LPCSTR; DstPrincipal: LPCSTR): DWORD; stdcall;
-{$EXTERNALSYM DsInheritSecurityIdentityA}
-function DsInheritSecurityIdentityW(hDS: HANDLE; Flags: DWORD;
- SrcPrincipal: LPCWSTR; DstPrincipal: LPCWSTR): DWORD; stdcall;
-{$EXTERNALSYM DsInheritSecurityIdentityW}
-function DsInheritSecurityIdentity(hDS: HANDLE; Flags: DWORD;
- SrcPrincipal: LPCTSTR; DstPrincipal: LPCTSTR): DWORD; stdcall;
-{$EXTERNALSYM DsInheritSecurityIdentity}
-
-{ifndef MIDL_PASS
-/*++
-==========================================================
-NTDSAPI
-DWORD
-WINAPI
-DsQuoteRdnValue(
- IN DWORD cUnquotedRdnValueLength,
- IN LPCTCH psUnquotedRdnValue,
- IN OUT DWORD *pcQuotedRdnValueLength,
- OUT LPTCH psQuotedRdnValue
- )
-++
-
-Description
-
- This client call converts an RDN value into a quoted RDN value if
- the RDN value contains characters that require quotes. The resultant
- RDN can be submitted as part of a DN to the DS using various APIs
- such as LDAP.
-
- No quotes are added if none are needed. In this case, the
- output RDN value will be the same as the input RDN value.
-
- The RDN is quoted in accordance with the specification "Lightweight
- Directory Access Protocol (v3): UTF-8 String Representation of
- Distinguished Names", RFC 2253.
-
- The input and output RDN values are *NOT* NULL terminated.
-
- The changes made by this call can be undone by calling
- DsUnquoteRdnValue().
-
-Arguments:
-
- cUnquotedRdnValueLength - The length of psUnquotedRdnValue in chars.
-
- psUnquotedRdnValue - Unquoted RDN value.
-
- pcQuotedRdnValueeLength - IN, maximum length of psQuotedRdnValue, in chars
- OUT ERROR_SUCCESS, chars utilized in psQuotedRdnValue
- OUT ERROR_BUFFER_OVERFLOW, chars needed in psQuotedRdnValue
-
- psQuotedRdnValue - The resultant and perhaps quoted RDN value
-
-Return Value:
- ERROR_SUCCESS
- If quotes or escapes were needed, then psQuotedRdnValue contains
- the quoted, escaped version of psUnquotedRdnValue. Otherwise,
- psQuotedRdnValue contains a copy of psUnquotedRdnValue. In either
- case, pcQuotedRdnValueLength contains the space utilized, in chars.
-
- ERROR_BUFFER_OVERFLOW
- psQuotedRdnValueLength contains the space needed, in chars,
- to hold psQuotedRdnValue.
-
- ERROR_INVALID_PARAMETER
- Invalid parameter.
-
- ERROR_NOT_ENOUGH_MEMORY
- Allocation error.
-
---}
-
-function DsQuoteRdnValueA(cUnquotedRdnValueLength: DWORD;
- psUnquotedRdnValue: LPCCH; var pcQuotedRdnValueLength: DWORD;
- psQuotedRdnValue: LPCH): DWORD; stdcall;
-{$EXTERNALSYM DsQuoteRdnValueA}
-function DsQuoteRdnValueW(cUnquotedRdnValueLength: DWORD;
- psUnquotedRdnValue: LPCWCH; var pcQuotedRdnValueLength: DWORD;
- psQuotedRdnValue: LPWCH): DWORD; stdcall;
-{$EXTERNALSYM DsQuoteRdnValueW}
-function DsQuoteRdnValue(cUnquotedRdnValueLength: DWORD;
- psUnquotedRdnValue: LPCTCH; var pcQuotedRdnValueLength: DWORD;
- psQuotedRdnValue: LPTCH): DWORD; stdcall;
-{$EXTERNALSYM DsQuoteRdnValue}
-
-{++
-==========================================================
-NTDSAPI
-DWORD
-WINAPI
-DsUnquoteRdnValue(
- IN DWORD cQuotedRdnValueLength,
- IN LPCTCH psQuotedRdnValue,
- IN OUT DWORD *pcUnquotedRdnValueLength,
- OUT LPTCH psUnquotedRdnValue
- )
-
-Description
-
- This client call converts a quoted RDN Value into an unquoted RDN
- Value. The resultant RDN value should *NOT* be submitted as part
- of a DN to the DS using various APIs such as LDAP.
-
- When psQuotedRdnValue is quoted:
- The leading and trailing quote are removed.
-
- Whitespace before the first quote is discarded.
-
- Whitespace trailing the last quote is discarded.
-
- Escapes are removed and the char following the escape is kept.
-
- The following actions are taken when psQuotedRdnValue is unquoted:
-
- Leading whitespace is discarded.
-
- Trailing whitespace is kept.
-
- Escaped non-special chars return an error.
-
- Unescaped special chars return an error.
-
- RDN values beginning with # (ignoring leading whitespace) are
- treated as a stringized BER value and converted accordingly.
-
- Escaped hex digits (\89) are converted into a binary byte (0x89).
-
- Escapes are removed from escaped special chars.
-
- The following actions are always taken:
- Escaped special chars are unescaped.
-
- The input and output RDN values are not NULL terminated.
-
-Arguments:
-
- cQuotedRdnValueLength - The length of psQuotedRdnValue in chars.
-
- psQuotedRdnValue - RDN value that may be quoted and may be escaped.
-
- pcUnquotedRdnValueLength - IN, maximum length of psUnquotedRdnValue, in chars
- OUT ERROR_SUCCESS, chars used in psUnquotedRdnValue
- OUT ERROR_BUFFER_OVERFLOW, chars needed for psUnquotedRdnValue
-
- psUnquotedRdnValue - The resultant unquoted RDN value.
-
-Return Value:
- ERROR_SUCCESS
- psUnquotedRdnValue contains the unquoted and unescaped version
- of psQuotedRdnValue. pcUnquotedRdnValueLength contains the space
- used, in chars.
-
- ERROR_BUFFER_OVERFLOW
- psUnquotedRdnValueLength contains the space needed, in chars,
- to hold psUnquotedRdnValue.
-
- ERROR_INVALID_PARAMETER
- Invalid parameter.
-
- ERROR_NOT_ENOUGH_MEMORY
- Allocation error.
-
---}
-
-function DsUnquoteRdnValueA(cQuotedRdnValueLength: DWORD; psQuotedRdnValue: LPCCH;
- var pcUnquotedRdnValueLength: DWORD; psUnquotedRdnValue: LPCH): DWORD; stdcall;
-{$EXTERNALSYM DsUnquoteRdnValueA}
-function DsUnquoteRdnValueW(cQuotedRdnValueLength: DWORD; psQuotedRdnValue: LPCWCH;
- var pcUnquotedRdnValueLength: DWORD; psUnquotedRdnValue: LPWCH): DWORD; stdcall;
-{$EXTERNALSYM DsUnquoteRdnValueW}
-function DsUnquoteRdnValue(cQuotedRdnValueLength: DWORD; psQuotedRdnValue: LPCTCH;
- var pcUnquotedRdnValueLength: DWORD; psUnquotedRdnValue: LPTCH): DWORD; stdcall;
-{$EXTERNALSYM DsUnquoteRdnValue}
-
-(*++
-==========================================================
-NTDSAPI
-DWORD
-WINAPI
-DsGetRdnW(
- IN OUT LPCWCH *ppDN,
- IN OUT DWORD *pcDN,
- OUT LPCWCH *ppKey,
- OUT DWORD *pcKey,
- OUT LPCWCH *ppVal,
- OUT DWORD *pcVal
- )
-
-Description
-
- This client call accepts a DN with quoted RDNs and returns the address
- and length, in chars, of the key and value for the first RDN in the DN.
- The RDN value returned is still quoted. Use DsUnquoteRdnValue to unquote
- the value for display.
-
- This client call also returns the address and length of the rest of the
- DN. A subsequent call using the returned DN address and length will
- return information about the next RDN.
-
- The following loop processes each RDN in pDN:
- ccDN = wcslen(pDN)
- while (ccDN) {
- error = DsGetRdn(&pDN,
- &ccDN,
- &pKey,
- &ccKey,
- &pVal,
- &ccVal);
- if (error != ERROR_SUCCESS) {
- process error;
- return;
- }
- if (ccKey) {
- process pKey;
- }
- if (ccVal) {
- process pVal;
- }
- }
-
- For example, given the DN "cn=bob,dc=com", the first call to DsGetRdnW
- returns the addresses for ",dc=com", "cn", and "bob" with respective
- lengths of 7, 2, and 3. A subsequent call with ",dc=com" returns "",
- "dc", and "com" with respective lengths 0, 2, and 3.
-
-Arguments:
- ppDN
- IN : *ppDN points to a DN
- OUT: *ppDN points to the rest of the DN following the first RDN
- pcDN
- IN : *pcDN is the count of chars in the input *ppDN, not including
- any terminating NULL
- OUT: *pcDN is the count of chars in the output *ppDN, not including
- any terminating NULL
- ppKey
- OUT: Undefined if *pcKey is 0. Otherwise, *ppKey points to the first
- key in the DN
- pcKey
- OUT: *pcKey is the count of chars in *ppKey.
-
- ppVal
- OUT: Undefined if *pcVal is 0. Otherwise, *ppVal points to the first
- value in the DN
- pcVal
- OUT: *pcVal is the count of chars in *ppVal
-
-Return Value:
- ERROR_SUCCESS
- If *pccDN is not 0, then *ppDN points to the rest of the DN following
- the first RDN. If *pccDN is 0, then *ppDN is undefined.
-
- If *pccKey is not 0, then *ppKey points to the first key in DN. If
- *pccKey is 0, then *ppKey is undefined.
-
- If *pccVal is not 0, then *ppVal points to the first value in DN. If
- *pccVal is 0, then *ppVal is undefined.
-
- ERROR_DS_NAME_UNPARSEABLE
- The first RDN in *ppDN could not be parsed. All output parameters
- are undefined.
-
- Any other error
- All output parameters are undefined.
-
---*)
-
-function DsGetRdnW(var ppDN: LPCWCH; var pcDN: DWORD; var ppKey: LPCWCH; var pcKey: DWORD; var ppVal: LPCWCH; var pcVal: DWORD): DWORD; stdcall;
-{$EXTERNALSYM DsGetRdnW}
-
-(*++
-==========================================================
-
-NTDSAPI
-BOOL
-WINAPI
-DsCrackUnquotedMangledRdnW(
- IN LPCWSTR pszRDN,
- IN DWORD cchRDN,
- OUT OPTIONAL GUID *pGuid,
- OUT OPTIONAL DS_MANGLE_FOR *peDsMangleFor
- );
-
-Description
-
-Determine whether the given RDN is in mangled form. If so, the mangled RDN
-is decoded, and the guid and mangle type are returned.
-
-The RDN should already be in unquoted form. See DsUnquoteRdnValue.
-
-Arguments:
-
- pszRDN (IN) - Character string containing RDN. Termination is optional.
-
- cchRDN (IN) - Length of RDN excluding termination, if any
-
- pGuid (OUT, OPTIONAL) - Pointer to storage to receive decoded guid.
- Only returned if RDN is mangled.
-
- peDsMangleFor (OUT, OPTIONAL) - Pointer to storage to receive mangle type.
- Only returned if RDN is mangled
-
-Return Value:
-
- BOOL - Whether the RDN is mangled or not
-
---*)
-
-function DsCrackUnquotedMangledRdnW(pszRDN: LPCWSTR; cchRDN: DWORD; pGuid: LPGUID; peDsMangleFor: PDsMangleFor): BOOL; stdcall;
-{$EXTERNALSYM DsCrackUnquotedMangledRdnW}
-function DsCrackUnquotedMangledRdnA(pszRDN: LPCSTR; cchRDN: DWORD; pGuid: LPGUID; peDsMangleFor: PDsMangleFor): BOOL; stdcall;
-{$EXTERNALSYM DsCrackUnquotedMangledRdnA}
-function DsCrackUnquotedMangledRdn(pszRDN: LPCTSTR; cchRDN: DWORD; pGuid: LPGUID; peDsMangleFor: PDsMangleFor): BOOL; stdcall;
-{$EXTERNALSYM DsCrackUnquotedMangledRdn}
-
-(*++
-==========================================================
-
-NTDSAPI
-BOOL
-WINAPI
-DsIsMangledRdnValueW(
- LPCWSTR pszRdn,
- DWORD cRdn,
- DS_MANGLE_FOR eDsMangleForDesired
- );
-
-Description
-
- Determine if the given RDN Value is mangled, and of the given type. Note that
- the key portion of an RDN should not be supplied.
-
- The name may be quoted or unquoted. This routine tries to unquote the value. If
- the unquote operation fails, the routine proceeds to attempt the unmangle.
-
- A change was made in the default quoting behavior of DNs returned from the DS
- between Windows 2000 and Windows XP. This routine transparently handles RDNs with
- special characters in either form.
-
- The routine expects the value part of the RDN.
-
- If you have full DN, use DsIsMangledDn() below.
-
- To check for deleted name:
- DsIsMangledRdnValueW( rdn, rdnlen, DS_MANGLE_OBJECT_FOR_DELETION )
- To check for a conflicted name:
- DsIsMangledRdnValueW( rdn, rdnlen, DS_MANGLE_OBJECT_FOR_NAME_CONFLICT )
-
-Arguments:
-
- pszRdn (IN) - RDN value character string. Termination is not required and
- is ignored.
-
- cRdn (IN) - Length of RDN value in characters excluding termination
-
- eDsMangleForDesired (IN) - Type of mangling to check for
-
-Return Value:
-
- BOOL - True if the Rdn is mangled and is of the required type
-
---*)
-
-function DsIsMangledRdnValueW(pszRdn: LPCWSTR; cRdn: DWORD; eDsMangleForDesired: DS_MANGLE_FOR): BOOL; stdcall;
-{$EXTERNALSYM DsIsMangledRdnValueW}
-function DsIsMangledRdnValueA(pszRdn: LPCSTR; cRdn: DWORD; eDsMangleForDesired: DS_MANGLE_FOR): BOOL; stdcall;
-{$EXTERNALSYM DsIsMangledRdnValueA}
-function DsIsMangledRdnValue(pszRdn: LPCTSTR; cRdn: DWORD; eDsMangleForDesired: DS_MANGLE_FOR): BOOL; stdcall;
-{$EXTERNALSYM DsIsMangledRdnValue}
-
-(*++
-==========================================================
-
-NTDSAPI
-BOOL
-WINAPI
-DsIsMangledDnW(
- LPCWSTR pszDn,
- DS_MANGLE_FOR eDsMangleFor
- );
-
-Description
-
- Determine if the first RDN in a quoted DN is a mangled name of given type.
-
- The DN must be suitable for input to DsGetRdn().
-
- To check for deleted name:
- DsIsMangledDnW( dn, DS_MANGLE_OBJECT_FOR_DELETION )
- To check for a conflicted name:
- DsIsMangledDnW( Dn, DS_MANGLE_OBJECT_FOR_NAME_CONFLICT )
-
-Arguments:
-
- pszDn (IN) - Quoted Distinguished Name as returned by DS functions
-
- eDsMangleFor (IN) - Type of mangling to check for
-
-Return Value:
-
- BOOL - True if first RDN is mangled and is of the given mangle type
-
---*)
-
-function DsIsMangledDnA(pszDn: LPCSTR; eDsMangleFor: DS_MANGLE_FOR): BOOL; stdcall;
-{$EXTERNALSYM DsIsMangledDnA}
-function DsIsMangledDnW(pszDn: LPCWSTR; eDsMangleFor: DS_MANGLE_FOR): BOOL; stdcall;
-{$EXTERNALSYM DsIsMangledDnW}
-function DsIsMangledDn(pszDn: LPCTSTR; eDsMangleFor: DS_MANGLE_FOR): BOOL; stdcall;
-{$EXTERNALSYM DsIsMangledDn}
-
-implementation
-
-const
- ntdsapilib = 'ntdsapi.dll';
- {$IFDEF UNICODE}
- AWSuffix = 'W';
- {$ELSE}
- AWSuffix = 'A';
- {$ENDIF UNICODE}
-
-function NTDSCONN_IGNORE_SCHEDULE(_options_: DWORD): DWORD;
-begin
- // todo NTDSCONN_OPT_IGNORE_SCHEDULE_MASK only defined in pre-release version
- Result := (_options_ and DWORD($80000000){NTDSCONN_OPT_IGNORE_SCHEDULE_MASK}) shr 31;
-end;
-
-function FRSCONN_GET_PRIORITY(_options_: DWORD): DWORD;
-begin
- if ((_options_ and FRSCONN_PRIORITY_MASK) shr 28) <> 0 then
- Result := (_options_ and FRSCONN_PRIORITY_MASK) shr 28
- else
- Result := FRSCONN_MAX_PRIORITY;
-end;
-
-{$IFDEF DYNAMIC_LINK}
-
-var
- _DsBindA: Pointer;
-
-function DsBindA;
-begin
- GetProcedureAddress(_DsBindA, ntdsapilib, 'DsBindA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsBindA]
- end;
-end;
-
-var
- _DsBindW: Pointer;
-
-function DsBindW;
-begin
- GetProcedureAddress(_DsBindW, ntdsapilib, 'DsBindW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsBindW]
- end;
-end;
-
-var
- _DsBind: Pointer;
-
-function DsBind;
-begin
- GetProcedureAddress(_DsBind, ntdsapilib, 'DsBind' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsBind]
- end;
-end;
-
-var
- _DsBindWithCredA: Pointer;
-
-function DsBindWithCredA;
-begin
- GetProcedureAddress(_DsBindWithCredA, ntdsapilib, 'DsBindWithCredA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsBindWithCredA]
- end;
-end;
-
-var
- _DsBindWithCredW: Pointer;
-
-function DsBindWithCredW;
-begin
- GetProcedureAddress(_DsBindWithCredW, ntdsapilib, 'DsBindWithCredW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsBindWithCredW]
- end;
-end;
-
-var
- _DsBindWithCred: Pointer;
-
-function DsBindWithCred;
-begin
- GetProcedureAddress(_DsBindWithCred, ntdsapilib, 'DsBindWithCred' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsBindWithCred]
- end;
-end;
-
-var
- _DsBindWithSpnA: Pointer;
-
-function DsBindWithSpnA;
-begin
- GetProcedureAddress(_DsBindWithSpnA, ntdsapilib, 'DsBindWithSpnA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsBindWithSpnA]
- end;
-end;
-
-var
- _DsBindWithSpnW: Pointer;
-
-function DsBindWithSpnW;
-begin
- GetProcedureAddress(_DsBindWithSpnW, ntdsapilib, 'DsBindWithSpnW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsBindWithSpnW]
- end;
-end;
-
-var
- _DsBindWithSpn: Pointer;
-
-function DsBindWithSpn;
-begin
- GetProcedureAddress(_DsBindWithSpn, ntdsapilib, 'DsBindWithSpn' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsBindWithSpn]
- end;
-end;
-
-var
- _DsBindWithSpnExW: Pointer;
-
-function DsBindWithSpnExW;
-begin
- GetProcedureAddress(_DsBindWithSpnExW, ntdsapilib, 'DsBindWithSpnExW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsBindWithSpnExW]
- end;
-end;
-
-var
- _DsBindWithSpnExA: Pointer;
-
-function DsBindWithSpnExA;
-begin
- GetProcedureAddress(_DsBindWithSpnExA, ntdsapilib, 'DsBindWithSpnExA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsBindWithSpnExA]
- end;
-end;
-
-var
- _DsBindWithSpnEx: Pointer;
-
-function DsBindWithSpnEx;
-begin
- GetProcedureAddress(_DsBindWithSpnEx, ntdsapilib, 'DsBindWithSpnEx' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsBindWithSpnEx]
- end;
-end;
-
-var
- _DsBindToISTGW: Pointer;
-
-function DsBindToISTGW;
-begin
- GetProcedureAddress(_DsBindToISTGW, ntdsapilib, 'DsBindToISTGW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsBindToISTGW]
- end;
-end;
-
-var
- _DsBindToISTGA: Pointer;
-
-function DsBindToISTGA;
-begin
- GetProcedureAddress(_DsBindToISTGA, ntdsapilib, 'DsBindToISTGA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsBindToISTGA]
- end;
-end;
-
-var
- _DsBindToISTG: Pointer;
-
-function DsBindToISTG;
-begin
- GetProcedureAddress(_DsBindToISTG, ntdsapilib, 'DsBindToISTG' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsBindToISTG]
- end;
-end;
-
-var
- _DsBindingSetTimeout: Pointer;
-
-function DsBindingSetTimeout;
-begin
- GetProcedureAddress(_DsBindingSetTimeout, ntdsapilib, 'DsBindingSetTimeout');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsBindingSetTimeout]
- end;
-end;
-
-var
- _DsUnBindA: Pointer;
-
-function DsUnBindA;
-begin
- GetProcedureAddress(_DsUnBindA, ntdsapilib, 'DsUnBindA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsUnBindA]
- end;
-end;
-
-var
- _DsUnBindW: Pointer;
-
-function DsUnBindW;
-begin
- GetProcedureAddress(_DsUnBindW, ntdsapilib, 'DsUnBindW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsUnBindW]
- end;
-end;
-
-var
- _DsUnBind: Pointer;
-
-function DsUnBind;
-begin
- GetProcedureAddress(_DsUnBind, ntdsapilib, 'DsUnBind' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsUnBind]
- end;
-end;
-
-var
- _DsMakePasswordCredentialsA: Pointer;
-
-function DsMakePasswordCredentialsA;
-begin
- GetProcedureAddress(_DsMakePasswordCredentialsA, ntdsapilib, 'DsMakePasswordCredentialsA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsMakePasswordCredentialsA]
- end;
-end;
-
-var
- _DsMakePasswordCredentialsW: Pointer;
-
-function DsMakePasswordCredentialsW;
-begin
- GetProcedureAddress(_DsMakePasswordCredentialsW, ntdsapilib, 'DsMakePasswordCredentialsW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsMakePasswordCredentialsW]
- end;
-end;
-
-var
- _DsMakePasswordCredentials: Pointer;
-
-function DsMakePasswordCredentials;
-begin
- GetProcedureAddress(_DsMakePasswordCredentials, ntdsapilib, 'DsMakePasswordCredentials' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsMakePasswordCredentials]
- end;
-end;
-
-var
- _DsFreePasswordCredentials: Pointer;
-
-procedure DsFreePasswordCredentials;
-begin
- GetProcedureAddress(_DsFreePasswordCredentials, ntdsapilib, 'DsFreePasswordCredentials');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsFreePasswordCredentials]
- end;
-end;
-
-var
- _DsFreePasswordCredentialsA: Pointer;
-
-procedure DsFreePasswordCredentialsA;
-begin
- GetProcedureAddress(_DsFreePasswordCredentialsA, ntdsapilib, 'DsFreePasswordCredentials');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsFreePasswordCredentialsA]
- end;
-end;
-
-var
- _DsFreePasswordCredentialsW: Pointer;
-
-procedure DsFreePasswordCredentialsW;
-begin
- GetProcedureAddress(_DsFreePasswordCredentialsW, ntdsapilib, 'DsFreePasswordCredentials');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsFreePasswordCredentialsW]
- end;
-end;
-
-var
- _DsCrackNamesA: Pointer;
-
-function DsCrackNamesA;
-begin
- GetProcedureAddress(_DsCrackNamesA, ntdsapilib, 'DsCrackNamesA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsCrackNamesA]
- end;
-end;
-
-var
- _DsCrackNamesW: Pointer;
-
-function DsCrackNamesW;
-begin
- GetProcedureAddress(_DsCrackNamesW, ntdsapilib, 'DsCrackNamesW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsCrackNamesW]
- end;
-end;
-
-var
- _DsCrackNames: Pointer;
-
-function DsCrackNames;
-begin
- GetProcedureAddress(_DsCrackNames, ntdsapilib, 'DsCrackNames' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsCrackNames]
- end;
-end;
-
-var
- _DsFreeNameResultA: Pointer;
-
-procedure DsFreeNameResultA;
-begin
- GetProcedureAddress(_DsFreeNameResultA, ntdsapilib, 'DsFreeNameResultA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsFreeNameResultA]
- end;
-end;
-
-var
- _DsFreeNameResultW: Pointer;
-
-procedure DsFreeNameResultW;
-begin
- GetProcedureAddress(_DsFreeNameResultW, ntdsapilib, 'DsFreeNameResultW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsFreeNameResultW]
- end;
-end;
-
-var
- _DsFreeNameResult: Pointer;
-
-procedure DsFreeNameResult;
-begin
- GetProcedureAddress(_DsFreeNameResult, ntdsapilib, 'DsFreeNameResult' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsFreeNameResult]
- end;
-end;
-
-var
- _DsMakeSpnA: Pointer;
-
-function DsMakeSpnA;
-begin
- GetProcedureAddress(_DsMakeSpnA, ntdsapilib, 'DsMakeSpnA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsMakeSpnA]
- end;
-end;
-
-var
- _DsMakeSpnW: Pointer;
-
-function DsMakeSpnW;
-begin
- GetProcedureAddress(_DsMakeSpnW, ntdsapilib, 'DsMakeSpnW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsMakeSpnW]
- end;
-end;
-
-var
- _DsMakeSpn: Pointer;
-
-function DsMakeSpn;
-begin
- GetProcedureAddress(_DsMakeSpn, ntdsapilib, 'DsMakeSpn' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsMakeSpn]
- end;
-end;
-
-var
- _DsGetSpnA: Pointer;
-
-function DsGetSpnA;
-begin
- GetProcedureAddress(_DsGetSpnA, ntdsapilib, 'DsGetSpnA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsGetSpnA]
- end;
-end;
-
-var
- _DsGetSpnW: Pointer;
-
-function DsGetSpnW;
-begin
- GetProcedureAddress(_DsGetSpnW, ntdsapilib, 'DsGetSpnW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsGetSpnW]
- end;
-end;
-
-var
- _DsGetSpn: Pointer;
-
-function DsGetSpn;
-begin
- GetProcedureAddress(_DsGetSpn, ntdsapilib, 'DsGetSpn' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsGetSpn]
- end;
-end;
-
-var
- _DsFreeSpnArrayA: Pointer;
-
-procedure DsFreeSpnArrayA;
-begin
- GetProcedureAddress(_DsFreeSpnArrayA, ntdsapilib, 'DsFreeSpnArrayA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsFreeSpnArrayA]
- end;
-end;
-
-var
- _DsFreeSpnArrayW: Pointer;
-
-procedure DsFreeSpnArrayW;
-begin
- GetProcedureAddress(_DsFreeSpnArrayW, ntdsapilib, 'DsFreeSpnArrayW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsFreeSpnArrayW]
- end;
-end;
-
-var
- _DsFreeSpnArray: Pointer;
-
-procedure DsFreeSpnArray;
-begin
- GetProcedureAddress(_DsFreeSpnArray, ntdsapilib, 'DsFreeSpnArray' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsFreeSpnArray]
- end;
-end;
-
-var
- _DsCrackSpnA: Pointer;
-
-function DsCrackSpnA;
-begin
- GetProcedureAddress(_DsCrackSpnA, ntdsapilib, 'DsCrackSpnA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsCrackSpnA]
- end;
-end;
-
-var
- _DsCrackSpnW: Pointer;
-
-function DsCrackSpnW;
-begin
- GetProcedureAddress(_DsCrackSpnW, ntdsapilib, 'DsCrackSpnW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsCrackSpnW]
- end;
-end;
-
-var
- _DsCrackSpn: Pointer;
-
-function DsCrackSpn;
-begin
- GetProcedureAddress(_DsCrackSpn, ntdsapilib, 'DsCrackSpn' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsCrackSpn]
- end;
-end;
-
-var
- _DsWriteAccountSpnA: Pointer;
-
-function DsWriteAccountSpnA;
-begin
- GetProcedureAddress(_DsWriteAccountSpnA, ntdsapilib, 'DsWriteAccountSpnA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsWriteAccountSpnA]
- end;
-end;
-
-var
- _DsWriteAccountSpnW: Pointer;
-
-function DsWriteAccountSpnW;
-begin
- GetProcedureAddress(_DsWriteAccountSpnW, ntdsapilib, 'DsWriteAccountSpnW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsWriteAccountSpnW]
- end;
-end;
-
-var
- _DsWriteAccountSpn: Pointer;
-
-function DsWriteAccountSpn;
-begin
- GetProcedureAddress(_DsWriteAccountSpn, ntdsapilib, 'DsWriteAccountSpn' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsWriteAccountSpn]
- end;
-end;
-
-var
- _DsClientMakeSpnForTargetServerA: Pointer;
-
-function DsClientMakeSpnForTargetServerA;
-begin
- GetProcedureAddress(_DsClientMakeSpnForTargetServerA, ntdsapilib, 'DsClientMakeSpnForTargetServerA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsClientMakeSpnForTargetServerA]
- end;
-end;
-
-var
- _DsClientMakeSpnForTargetServerW: Pointer;
-
-function DsClientMakeSpnForTargetServerW;
-begin
- GetProcedureAddress(_DsClientMakeSpnForTargetServerW, ntdsapilib, 'DsClientMakeSpnForTargetServerW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsClientMakeSpnForTargetServerW]
- end;
-end;
-
-var
- _DsClientMakeSpnForTargetServer: Pointer;
-
-function DsClientMakeSpnForTargetServer;
-begin
- GetProcedureAddress(_DsClientMakeSpnForTargetServer, ntdsapilib, 'DsClientMakeSpnForTargetServer' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsClientMakeSpnForTargetServer]
- end;
-end;
-
-var
- _DsServerRegisterSpnA: Pointer;
-
-function DsServerRegisterSpnA;
-begin
- GetProcedureAddress(_DsServerRegisterSpnA, ntdsapilib, 'DsServerRegisterSpnA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsServerRegisterSpnA]
- end;
-end;
-
-var
- _DsServerRegisterSpnW: Pointer;
-
-function DsServerRegisterSpnW;
-begin
- GetProcedureAddress(_DsServerRegisterSpnW, ntdsapilib, 'DsServerRegisterSpnW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsServerRegisterSpnW]
- end;
-end;
-
-var
- _DsServerRegisterSpn: Pointer;
-
-function DsServerRegisterSpn;
-begin
- GetProcedureAddress(_DsServerRegisterSpn, ntdsapilib, 'DsServerRegisterSpn' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsServerRegisterSpn]
- end;
-end;
-
-var
- _DsReplicaSyncA: Pointer;
-
-function DsReplicaSyncA;
-begin
- GetProcedureAddress(_DsReplicaSyncA, ntdsapilib, 'DsReplicaSyncA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsReplicaSyncA]
- end;
-end;
-
-var
- _DsReplicaSyncW: Pointer;
-
-function DsReplicaSyncW;
-begin
- GetProcedureAddress(_DsReplicaSyncW, ntdsapilib, 'DsReplicaSyncW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsReplicaSyncW]
- end;
-end;
-
-var
- _DsReplicaSync: Pointer;
-
-function DsReplicaSync;
-begin
- GetProcedureAddress(_DsReplicaSync, ntdsapilib, 'DsReplicaSync' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsReplicaSync]
- end;
-end;
-
-var
- _DsReplicaAddA: Pointer;
-
-function DsReplicaAddA;
-begin
- GetProcedureAddress(_DsReplicaAddA, ntdsapilib, 'DsReplicaAddA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsReplicaAddA]
- end;
-end;
-
-var
- _DsReplicaAddW: Pointer;
-
-function DsReplicaAddW;
-begin
- GetProcedureAddress(_DsReplicaAddW, ntdsapilib, 'DsReplicaAddW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsReplicaAddW]
- end;
-end;
-
-var
- _DsReplicaAdd: Pointer;
-
-function DsReplicaAdd;
-begin
- GetProcedureAddress(_DsReplicaAdd, ntdsapilib, 'DsReplicaAdd' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsReplicaAdd]
- end;
-end;
-
-var
- _DsReplicaDelA: Pointer;
-
-function DsReplicaDelA;
-begin
- GetProcedureAddress(_DsReplicaDelA, ntdsapilib, 'DsReplicaDelA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsReplicaDelA]
- end;
-end;
-
-var
- _DsReplicaDelW: Pointer;
-
-function DsReplicaDelW;
-begin
- GetProcedureAddress(_DsReplicaDelW, ntdsapilib, 'DsReplicaDelW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsReplicaDelW]
- end;
-end;
-
-var
- _DsReplicaDel: Pointer;
-
-function DsReplicaDel;
-begin
- GetProcedureAddress(_DsReplicaDel, ntdsapilib, 'DsReplicaDel' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsReplicaDel]
- end;
-end;
-
-var
- _DsReplicaModifyA: Pointer;
-
-function DsReplicaModifyA;
-begin
- GetProcedureAddress(_DsReplicaModifyA, ntdsapilib, 'DsReplicaModifyA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsReplicaModifyA]
- end;
-end;
-
-var
- _DsReplicaModifyW: Pointer;
-
-function DsReplicaModifyW;
-begin
- GetProcedureAddress(_DsReplicaModifyW, ntdsapilib, 'DsReplicaModifyW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsReplicaModifyW]
- end;
-end;
-
-var
- _DsReplicaModify: Pointer;
-
-function DsReplicaModify;
-begin
- GetProcedureAddress(_DsReplicaModify, ntdsapilib, 'DsReplicaModify' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsReplicaModify]
- end;
-end;
-
-var
- _DsReplicaUpdateRefsA: Pointer;
-
-function DsReplicaUpdateRefsA;
-begin
- GetProcedureAddress(_DsReplicaUpdateRefsA, ntdsapilib, 'DsReplicaUpdateRefsA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsReplicaUpdateRefsA]
- end;
-end;
-
-var
- _DsReplicaUpdateRefsW: Pointer;
-
-function DsReplicaUpdateRefsW;
-begin
- GetProcedureAddress(_DsReplicaUpdateRefsW, ntdsapilib, 'DsReplicaUpdateRefsW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsReplicaUpdateRefsW]
- end;
-end;
-
-var
- _DsReplicaUpdateRefs: Pointer;
-
-function DsReplicaUpdateRefs;
-begin
- GetProcedureAddress(_DsReplicaUpdateRefs, ntdsapilib, 'DsReplicaUpdateRefs' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsReplicaUpdateRefs]
- end;
-end;
-
-var
- _DsReplicaSyncAllA: Pointer;
-
-function DsReplicaSyncAllA;
-begin
- GetProcedureAddress(_DsReplicaSyncAllA, ntdsapilib, 'DsReplicaSyncAllA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsReplicaSyncAllA]
- end;
-end;
-
-var
- _DsReplicaSyncAllW: Pointer;
-
-function DsReplicaSyncAllW;
-begin
- GetProcedureAddress(_DsReplicaSyncAllW, ntdsapilib, 'DsReplicaSyncAllW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsReplicaSyncAllW]
- end;
-end;
-
-var
- _DsReplicaSyncAll: Pointer;
-
-function DsReplicaSyncAll;
-begin
- GetProcedureAddress(_DsReplicaSyncAll, ntdsapilib, 'DsReplicaSyncAll' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsReplicaSyncAll]
- end;
-end;
-
-var
- _DsRemoveDsServerA: Pointer;
-
-function DsRemoveDsServerA;
-begin
- GetProcedureAddress(_DsRemoveDsServerA, ntdsapilib, 'DsRemoveDsServerA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsRemoveDsServerA]
- end;
-end;
-
-var
- _DsRemoveDsServerW: Pointer;
-
-function DsRemoveDsServerW;
-begin
- GetProcedureAddress(_DsRemoveDsServerW, ntdsapilib, 'DsRemoveDsServerW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsRemoveDsServerW]
- end;
-end;
-
-var
- _DsRemoveDsServer: Pointer;
-
-function DsRemoveDsServer;
-begin
- GetProcedureAddress(_DsRemoveDsServer, ntdsapilib, 'DsRemoveDsServer' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsRemoveDsServer]
- end;
-end;
-
-var
- _DsRemoveDsDomainA: Pointer;
-
-function DsRemoveDsDomainA;
-begin
- GetProcedureAddress(_DsRemoveDsDomainA, ntdsapilib, 'DsRemoveDsDomainA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsRemoveDsDomainA]
- end;
-end;
-
-var
- _DsRemoveDsDomainW: Pointer;
-
-function DsRemoveDsDomainW;
-begin
- GetProcedureAddress(_DsRemoveDsDomainW, ntdsapilib, 'DsRemoveDsDomainW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsRemoveDsDomainW]
- end;
-end;
-
-var
- _DsRemoveDsDomain: Pointer;
-
-function DsRemoveDsDomain;
-begin
- GetProcedureAddress(_DsRemoveDsDomain, ntdsapilib, 'DsRemoveDsDomain' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsRemoveDsDomain]
- end;
-end;
-
-var
- _DsListSitesA: Pointer;
-
-function DsListSitesA;
-begin
- GetProcedureAddress(_DsListSitesA, ntdsapilib, 'DsListSitesA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsListSitesA]
- end;
-end;
-
-var
- _DsListSitesW: Pointer;
-
-function DsListSitesW;
-begin
- GetProcedureAddress(_DsListSitesW, ntdsapilib, 'DsListSitesW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsListSitesW]
- end;
-end;
-
-var
- _DsListSites: Pointer;
-
-function DsListSites;
-begin
- GetProcedureAddress(_DsListSites, ntdsapilib, 'DsListSites' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsListSites]
- end;
-end;
-
-var
- _DsListServersInSiteA: Pointer;
-
-function DsListServersInSiteA;
-begin
- GetProcedureAddress(_DsListServersInSiteA, ntdsapilib, 'DsListServersInSiteA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsListServersInSiteA]
- end;
-end;
-
-var
- _DsListServersInSiteW: Pointer;
-
-function DsListServersInSiteW;
-begin
- GetProcedureAddress(_DsListServersInSiteW, ntdsapilib, 'DsListServersInSiteW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsListServersInSiteW]
- end;
-end;
-
-var
- _DsListServersInSite: Pointer;
-
-function DsListServersInSite;
-begin
- GetProcedureAddress(_DsListServersInSite, ntdsapilib, 'DsListServersInSite' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsListServersInSite]
- end;
-end;
-
-var
- _DsListDomainsInSiteA: Pointer;
-
-function DsListDomainsInSiteA;
-begin
- GetProcedureAddress(_DsListDomainsInSiteA, ntdsapilib, 'DsListDomainsInSiteA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsListDomainsInSiteA]
- end;
-end;
-
-var
- _DsListDomainsInSiteW: Pointer;
-
-function DsListDomainsInSiteW;
-begin
- GetProcedureAddress(_DsListDomainsInSiteW, ntdsapilib, 'DsListDomainsInSiteW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsListDomainsInSiteW]
- end;
-end;
-
-var
- _DsListDomainsInSite: Pointer;
-
-function DsListDomainsInSite;
-begin
- GetProcedureAddress(_DsListDomainsInSite, ntdsapilib, 'DsListDomainsInSite' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsListDomainsInSite]
- end;
-end;
-
-var
- _DsListServersForDomainInSiteA: Pointer;
-
-function DsListServersForDomainInSiteA;
-begin
- GetProcedureAddress(_DsListServersForDomainInSiteA, ntdsapilib, 'DsListServersForDomainInSiteA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsListServersForDomainInSiteA]
- end;
-end;
-
-var
- _DsListServersForDomainInSiteW: Pointer;
-
-function DsListServersForDomainInSiteW;
-begin
- GetProcedureAddress(_DsListServersForDomainInSiteW, ntdsapilib, 'DsListServersForDomainInSiteW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsListServersForDomainInSiteW]
- end;
-end;
-
-var
- _DsListServersForDomainInSite: Pointer;
-
-function DsListServersForDomainInSite;
-begin
- GetProcedureAddress(_DsListServersForDomainInSite, ntdsapilib, 'DsListServersForDomainInSite' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsListServersForDomainInSite]
- end;
-end;
-
-var
- _DsListInfoForServerA: Pointer;
-
-function DsListInfoForServerA;
-begin
- GetProcedureAddress(_DsListInfoForServerA, ntdsapilib, 'DsListInfoForServerA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsListInfoForServerA]
- end;
-end;
-
-var
- _DsListInfoForServerW: Pointer;
-
-function DsListInfoForServerW;
-begin
- GetProcedureAddress(_DsListInfoForServerW, ntdsapilib, 'DsListInfoForServerW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsListInfoForServerW]
- end;
-end;
-
-var
- _DsListInfoForServer: Pointer;
-
-function DsListInfoForServer;
-begin
- GetProcedureAddress(_DsListInfoForServer, ntdsapilib, 'DsListInfoForServer' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsListInfoForServer]
- end;
-end;
-
-var
- _DsListRolesA: Pointer;
-
-function DsListRolesA;
-begin
- GetProcedureAddress(_DsListRolesA, ntdsapilib, 'DsListRolesA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsListRolesA]
- end;
-end;
-
-var
- _DsListRolesW: Pointer;
-
-function DsListRolesW;
-begin
- GetProcedureAddress(_DsListRolesW, ntdsapilib, 'DsListRolesW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsListRolesW]
- end;
-end;
-
-var
- _DsListRoles: Pointer;
-
-function DsListRoles;
-begin
- GetProcedureAddress(_DsListRoles, ntdsapilib, 'DsListRoles' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsListRoles]
- end;
-end;
-
-var
- _DsQuerySitesByCostW: Pointer;
-
-function DsQuerySitesByCostW;
-begin
- GetProcedureAddress(_DsQuerySitesByCostW, ntdsapilib, 'DsQuerySitesByCostW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsQuerySitesByCostW]
- end;
-end;
-
-var
- _DsQuerySitesByCostA: Pointer;
-
-function DsQuerySitesByCostA;
-begin
- GetProcedureAddress(_DsQuerySitesByCostA, ntdsapilib, 'DsQuerySitesByCostA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsQuerySitesByCostA]
- end;
-end;
-
-var
- _DsQuerySitesByCost: Pointer;
-
-function DsQuerySitesByCost;
-begin
- GetProcedureAddress(_DsQuerySitesByCost, ntdsapilib, 'DsQuerySitesByCost' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsQuerySitesByCost]
- end;
-end;
-
-var
- _DsQuerySitesFree: Pointer;
-
-procedure DsQuerySitesFree;
-begin
- GetProcedureAddress(_DsQuerySitesFree, ntdsapilib, 'DsQuerySitesFree');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsQuerySitesFree]
- end;
-end;
-
-var
- _DsMapSchemaGuidsA: Pointer;
-
-function DsMapSchemaGuidsA;
-begin
- GetProcedureAddress(_DsMapSchemaGuidsA, ntdsapilib, 'DsMapSchemaGuidsA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsMapSchemaGuidsA]
- end;
-end;
-
-var
- _DsMapSchemaGuidsW: Pointer;
-
-function DsMapSchemaGuidsW;
-begin
- GetProcedureAddress(_DsMapSchemaGuidsW, ntdsapilib, 'DsMapSchemaGuidsW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsMapSchemaGuidsW]
- end;
-end;
-
-var
- _DsFreeSchemaGuidMapA: Pointer;
-
-procedure DsFreeSchemaGuidMapA;
-begin
- GetProcedureAddress(_DsFreeSchemaGuidMapA, ntdsapilib, 'DsFreeSchemaGuidMapA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsFreeSchemaGuidMapA]
- end;
-end;
-
-var
- _DsFreeSchemaGuidMapW: Pointer;
-
-procedure DsFreeSchemaGuidMapW;
-begin
- GetProcedureAddress(_DsFreeSchemaGuidMapW, ntdsapilib, 'DsFreeSchemaGuidMapW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsFreeSchemaGuidMapW]
- end;
-end;
-
-var
- _DsMapSchemaGuids: Pointer;
-
-function DsMapSchemaGuids;
-begin
- GetProcedureAddress(_DsMapSchemaGuids, ntdsapilib, 'DsMapSchemaGuids' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsMapSchemaGuids]
- end;
-end;
-
-var
- _DsFreeSchemaGuidMap: Pointer;
-
-procedure DsFreeSchemaGuidMap;
-begin
- GetProcedureAddress(_DsFreeSchemaGuidMap, ntdsapilib, 'DsFreeSchemaGuidMap' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsFreeSchemaGuidMap]
- end;
-end;
-
-var
- _DsGetDomainControllerInfoA: Pointer;
-
-function DsGetDomainControllerInfoA;
-begin
- GetProcedureAddress(_DsGetDomainControllerInfoA, ntdsapilib, 'DsGetDomainControllerInfoA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsGetDomainControllerInfoA]
- end;
-end;
-
-var
- _DsGetDomainControllerInfoW: Pointer;
-
-function DsGetDomainControllerInfoW;
-begin
- GetProcedureAddress(_DsGetDomainControllerInfoW, ntdsapilib, 'DsGetDomainControllerInfoW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsGetDomainControllerInfoW]
- end;
-end;
-
-var
- _DsGetDomainControllerInfo: Pointer;
-
-function DsGetDomainControllerInfo;
-begin
- GetProcedureAddress(_DsGetDomainControllerInfo, ntdsapilib, 'DsGetDomainControllerInfo' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsGetDomainControllerInfo]
- end;
-end;
-
-var
- _DsFreeDomainControllerInfoA: Pointer;
-
-procedure DsFreeDomainControllerInfoA;
-begin
- GetProcedureAddress(_DsFreeDomainControllerInfoA, ntdsapilib, 'DsFreeDomainControllerInfoA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsFreeDomainControllerInfoA]
- end;
-end;
-
-var
- _DsFreeDomainControllerInfoW: Pointer;
-
-procedure DsFreeDomainControllerInfoW;
-begin
- GetProcedureAddress(_DsFreeDomainControllerInfoW, ntdsapilib, 'DsFreeDomainControllerInfoW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsFreeDomainControllerInfoW]
- end;
-end;
-
-var
- _DsFreeDomainControllerInfo: Pointer;
-
-procedure DsFreeDomainControllerInfo;
-begin
- GetProcedureAddress(_DsFreeDomainControllerInfo, ntdsapilib, 'DsFreeDomainControllerInfo' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsFreeDomainControllerInfo]
- end;
-end;
-
-var
- _DsReplicaConsistencyCheck: Pointer;
-
-function DsReplicaConsistencyCheck;
-begin
- GetProcedureAddress(_DsReplicaConsistencyCheck, ntdsapilib, 'DsReplicaConsistencyCheck');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsReplicaConsistencyCheck]
- end;
-end;
-
-var
- _DsReplicaVerifyObjectsW: Pointer;
-
-function DsReplicaVerifyObjectsW;
-begin
- GetProcedureAddress(_DsReplicaVerifyObjectsW, ntdsapilib, 'DsReplicaVerifyObjectsW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsReplicaVerifyObjectsW]
- end;
-end;
-
-var
- _DsReplicaVerifyObjectsA: Pointer;
-
-function DsReplicaVerifyObjectsA;
-begin
- GetProcedureAddress(_DsReplicaVerifyObjectsA, ntdsapilib, 'DsReplicaVerifyObjectsA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsReplicaVerifyObjectsA]
- end;
-end;
-
-var
- _DsReplicaVerifyObjects: Pointer;
-
-function DsReplicaVerifyObjects;
-begin
- GetProcedureAddress(_DsReplicaVerifyObjects, ntdsapilib, 'DsReplicaVerifyObjects' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsReplicaVerifyObjects]
- end;
-end;
-
-var
- _DsReplicaGetInfoW: Pointer;
-
-function DsReplicaGetInfoW;
-begin
- GetProcedureAddress(_DsReplicaGetInfoW, ntdsapilib, 'DsReplicaGetInfoW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsReplicaGetInfoW]
- end;
-end;
-
-var
- _DsReplicaFreeInfo: Pointer;
-
-procedure DsReplicaFreeInfo;
-begin
- GetProcedureAddress(_DsReplicaFreeInfo, ntdsapilib, 'DsReplicaFreeInfo');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsReplicaFreeInfo]
- end;
-end;
-
-{$IFDEF UNICODE}
-
-var
- _DsReplicaGetInfo: Pointer;
-
-function DsReplicaGetInfo;
-begin
- GetProcedureAddress(_DsReplicaGetInfo, ntdsapilib, 'DsReplicaGetInfoW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsReplicaGetInfo]
- end;
-end;
-
-var
- _DsReplicaGetInfo2W: Pointer;
-
-function DsReplicaGetInfo2W;
-begin
- GetProcedureAddress(_DsReplicaGetInfo2W, ntdsapilib, 'DsReplicaGetInfo2W');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsReplicaGetInfo2W]
- end;
-end;
-
-{$ENDIF UNICODE}
-
-var
- _DsAddSidHistoryA: Pointer;
-
-function DsAddSidHistoryA;
-begin
- GetProcedureAddress(_DsAddSidHistoryA, ntdsapilib, 'DsAddSidHistoryA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsAddSidHistoryA]
- end;
-end;
-
-var
- _DsAddSidHistoryW: Pointer;
-
-function DsAddSidHistoryW;
-begin
- GetProcedureAddress(_DsAddSidHistoryW, ntdsapilib, 'DsAddSidHistoryW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsAddSidHistoryW]
- end;
-end;
-
-var
- _DsAddSidHistory: Pointer;
-
-function DsAddSidHistory;
-begin
- GetProcedureAddress(_DsAddSidHistory, ntdsapilib, 'DsAddSidHistory' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsAddSidHistory]
- end;
-end;
-
-var
- _DsInheritSecurityIdentityA: Pointer;
-
-function DsInheritSecurityIdentityA;
-begin
- GetProcedureAddress(_DsInheritSecurityIdentityA, ntdsapilib, 'DsInheritSecurityIdentityA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsInheritSecurityIdentityA]
- end;
-end;
-
-var
- _DsInheritSecurityIdentityW: Pointer;
-
-function DsInheritSecurityIdentityW;
-begin
- GetProcedureAddress(_DsInheritSecurityIdentityW, ntdsapilib, 'DsInheritSecurityIdentityW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsInheritSecurityIdentityW]
- end;
-end;
-
-var
- _DsInheritSecurityIdentity: Pointer;
-
-function DsInheritSecurityIdentity;
-begin
- GetProcedureAddress(_DsInheritSecurityIdentity, ntdsapilib, 'DsInheritSecurityIdentity' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsInheritSecurityIdentity]
- end;
-end;
-
-var
- _DsQuoteRdnValueA: Pointer;
-
-function DsQuoteRdnValueA;
-begin
- GetProcedureAddress(_DsQuoteRdnValueA, ntdsapilib, 'DsQuoteRdnValueA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsQuoteRdnValueA]
- end;
-end;
-
-var
- _DsQuoteRdnValueW: Pointer;
-
-function DsQuoteRdnValueW;
-begin
- GetProcedureAddress(_DsQuoteRdnValueW, ntdsapilib, 'DsQuoteRdnValueW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsQuoteRdnValueW]
- end;
-end;
-
-var
- _DsQuoteRdnValue: Pointer;
-
-function DsQuoteRdnValue;
-begin
- GetProcedureAddress(_DsQuoteRdnValue, ntdsapilib, 'DsQuoteRdnValue' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsQuoteRdnValue]
- end;
-end;
-
-var
- _DsUnquoteRdnValueA: Pointer;
-
-function DsUnquoteRdnValueA;
-begin
- GetProcedureAddress(_DsUnquoteRdnValueA, ntdsapilib, 'DsUnquoteRdnValueA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsUnquoteRdnValueA]
- end;
-end;
-
-var
- _DsUnquoteRdnValueW: Pointer;
-
-function DsUnquoteRdnValueW;
-begin
- GetProcedureAddress(_DsUnquoteRdnValueW, ntdsapilib, 'DsUnquoteRdnValueW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsUnquoteRdnValueW]
- end;
-end;
-
-var
- _DsUnquoteRdnValue: Pointer;
-
-function DsUnquoteRdnValue;
-begin
- GetProcedureAddress(_DsUnquoteRdnValue, ntdsapilib, 'DsUnquoteRdnValue' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsUnquoteRdnValue]
- end;
-end;
-
-var
- _DsGetRdnW: Pointer;
-
-function DsGetRdnW;
-begin
- GetProcedureAddress(_DsGetRdnW, ntdsapilib, 'DsGetRdnW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsGetRdnW]
- end;
-end;
-
-var
- _DsCrackUnquotedMangledRdnW: Pointer;
-
-function DsCrackUnquotedMangledRdnW;
-begin
- GetProcedureAddress(_DsCrackUnquotedMangledRdnW, ntdsapilib, 'DsCrackUnquotedMangledRdnW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsCrackUnquotedMangledRdnW]
- end;
-end;
-
-var
- _DsCrackUnquotedMangledRdnA: Pointer;
-
-function DsCrackUnquotedMangledRdnA;
-begin
- GetProcedureAddress(_DsCrackUnquotedMangledRdnA, ntdsapilib, 'DsCrackUnquotedMangledRdnA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsCrackUnquotedMangledRdnA]
- end;
-end;
-
-var
- _DsCrackUnquotedMangledRdn: Pointer;
-
-function DsCrackUnquotedMangledRdn;
-begin
- GetProcedureAddress(_DsCrackUnquotedMangledRdn, ntdsapilib, 'DsCrackUnquotedMangledRdn' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsCrackUnquotedMangledRdn]
- end;
-end;
-
-var
- _DsIsMangledRdnValueW: Pointer;
-
-function DsIsMangledRdnValueW;
-begin
- GetProcedureAddress(_DsIsMangledRdnValueW, ntdsapilib, 'DsIsMangledRdnValueW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsIsMangledRdnValueW]
- end;
-end;
-
-var
- _DsIsMangledRdnValueA: Pointer;
-
-function DsIsMangledRdnValueA;
-begin
- GetProcedureAddress(_DsIsMangledRdnValueA, ntdsapilib, 'DsIsMangledRdnValueA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsIsMangledRdnValueA]
- end;
-end;
-
-var
- _DsIsMangledRdnValue: Pointer;
-
-function DsIsMangledRdnValue;
-begin
- GetProcedureAddress(_DsIsMangledRdnValue, ntdsapilib, 'DsIsMangledRdnValue' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsIsMangledRdnValue]
- end;
-end;
-
-var
- _DsIsMangledDnA: Pointer;
-
-function DsIsMangledDnA;
-begin
- GetProcedureAddress(_DsIsMangledDnA, ntdsapilib, 'DsIsMangledDnA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsIsMangledDnA]
- end;
-end;
-
-var
- _DsIsMangledDnW: Pointer;
-
-function DsIsMangledDnW;
-begin
- GetProcedureAddress(_DsIsMangledDnW, ntdsapilib, 'DsIsMangledDnW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsIsMangledDnW]
- end;
-end;
-
-var
- _DsIsMangledDn: Pointer;
-
-function DsIsMangledDn;
-begin
- GetProcedureAddress(_DsIsMangledDn, ntdsapilib, 'DsIsMangledDn' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsIsMangledDn]
- end;
-end;
-
-{$ELSE}
-
-function DsBindA; external ntdsapilib name 'DsBindA';
-function DsBindW; external ntdsapilib name 'DsBindW';
-function DsBind; external ntdsapilib name 'DsBind' + AWSuffix;
-function DsBindWithCredA; external ntdsapilib name 'DsBindWithCredA';
-function DsBindWithCredW; external ntdsapilib name 'DsBindWithCredW';
-function DsBindWithCred; external ntdsapilib name 'DsBindWithCred' + AWSuffix;
-function DsBindWithSpnA; external ntdsapilib name 'DsBindWithSpnA';
-function DsBindWithSpnW; external ntdsapilib name 'DsBindWithSpnW';
-function DsBindWithSpn; external ntdsapilib name 'DsBindWithSpn' + AWSuffix;
-function DsBindWithSpnExW; external ntdsapilib name 'DsBindWithSpnExW';
-function DsBindWithSpnExA; external ntdsapilib name 'DsBindWithSpnExA';
-function DsBindWithSpnEx; external ntdsapilib name 'DsBindWithSpnEx' + AWSuffix;
-function DsBindToISTGW; external ntdsapilib name 'DsBindToISTGW';
-function DsBindToISTGA; external ntdsapilib name 'DsBindToISTGA';
-function DsBindToISTG; external ntdsapilib name 'DsBindToISTG' + AWSuffix;
-function DsBindingSetTimeout; external ntdsapilib name 'DsBindingSetTimeout';
-function DsUnBindA; external ntdsapilib name 'DsUnBindA';
-function DsUnBindW; external ntdsapilib name 'DsUnBindW';
-function DsUnBind; external ntdsapilib name 'DsUnBind' + AWSuffix;
-function DsMakePasswordCredentialsA; external ntdsapilib name 'DsMakePasswordCredentialsA';
-function DsMakePasswordCredentialsW; external ntdsapilib name 'DsMakePasswordCredentialsW';
-function DsMakePasswordCredentials; external ntdsapilib name 'DsMakePasswordCredentials' + AWSuffix;
-procedure DsFreePasswordCredentials; external ntdsapilib name 'DsFreePasswordCredentials';
-procedure DsFreePasswordCredentialsA; external ntdsapilib name 'DsFreePasswordCredentials';
-procedure DsFreePasswordCredentialsW; external ntdsapilib name 'DsFreePasswordCredentials';
-function DsCrackNamesA; external ntdsapilib name 'DsCrackNamesA';
-function DsCrackNamesW; external ntdsapilib name 'DsCrackNamesW';
-function DsCrackNames; external ntdsapilib name 'DsCrackNames' + AWSuffix;
-procedure DsFreeNameResultA; external ntdsapilib name 'DsFreeNameResultA';
-procedure DsFreeNameResultW; external ntdsapilib name 'DsFreeNameResultW';
-procedure DsFreeNameResult; external ntdsapilib name 'DsFreeNameResult' + AWSuffix;
-function DsMakeSpnA; external ntdsapilib name 'DsMakeSpnA';
-function DsMakeSpnW; external ntdsapilib name 'DsMakeSpnW';
-function DsMakeSpn; external ntdsapilib name 'DsMakeSpn' + AWSuffix;
-function DsGetSpnA; external ntdsapilib name 'DsGetSpnA';
-function DsGetSpnW; external ntdsapilib name 'DsGetSpnW';
-function DsGetSpn; external ntdsapilib name 'DsGetSpn' + AWSuffix;
-procedure DsFreeSpnArrayA; external ntdsapilib name 'DsFreeSpnArrayA';
-procedure DsFreeSpnArrayW; external ntdsapilib name 'DsFreeSpnArrayW';
-procedure DsFreeSpnArray; external ntdsapilib name 'DsFreeSpnArray' + AWSuffix;
-function DsCrackSpnA; external ntdsapilib name 'DsCrackSpnA';
-function DsCrackSpnW; external ntdsapilib name 'DsCrackSpnW';
-function DsCrackSpn; external ntdsapilib name 'DsCrackSpn' + AWSuffix;
-function DsWriteAccountSpnA; external ntdsapilib name 'DsWriteAccountSpnA';
-function DsWriteAccountSpnW; external ntdsapilib name 'DsWriteAccountSpnW';
-function DsWriteAccountSpn; external ntdsapilib name 'DsWriteAccountSpn' + AWSuffix;
-function DsClientMakeSpnForTargetServerA; external ntdsapilib name 'DsClientMakeSpnForTargetServerA';
-function DsClientMakeSpnForTargetServerW; external ntdsapilib name 'DsClientMakeSpnForTargetServerW';
-function DsClientMakeSpnForTargetServer; external ntdsapilib name 'DsClientMakeSpnForTargetServer' + AWSuffix;
-function DsServerRegisterSpnA; external ntdsapilib name 'DsServerRegisterSpnA';
-function DsServerRegisterSpnW; external ntdsapilib name 'DsServerRegisterSpnW';
-function DsServerRegisterSpn; external ntdsapilib name 'DsServerRegisterSpn' + AWSuffix;
-function DsReplicaSyncA; external ntdsapilib name 'DsReplicaSyncA';
-function DsReplicaSyncW; external ntdsapilib name 'DsReplicaSyncW';
-function DsReplicaSync; external ntdsapilib name 'DsReplicaSync' + AWSuffix;
-function DsReplicaAddA; external ntdsapilib name 'DsReplicaAddA';
-function DsReplicaAddW; external ntdsapilib name 'DsReplicaAddW';
-function DsReplicaAdd; external ntdsapilib name 'DsReplicaAdd' + AWSuffix;
-function DsReplicaDelA; external ntdsapilib name 'DsReplicaDelA';
-function DsReplicaDelW; external ntdsapilib name 'DsReplicaDelW';
-function DsReplicaDel; external ntdsapilib name 'DsReplicaDel' + AWSuffix;
-function DsReplicaModifyA; external ntdsapilib name 'DsReplicaModifyA';
-function DsReplicaModifyW; external ntdsapilib name 'DsReplicaModifyW';
-function DsReplicaModify; external ntdsapilib name 'DsReplicaModify' + AWSuffix;
-function DsReplicaUpdateRefsA; external ntdsapilib name 'DsReplicaUpdateRefsA';
-function DsReplicaUpdateRefsW; external ntdsapilib name 'DsReplicaUpdateRefsW';
-function DsReplicaUpdateRefs; external ntdsapilib name 'DsReplicaUpdateRefs' + AWSuffix;
-function DsReplicaSyncAllA; external ntdsapilib name 'DsReplicaSyncAllA';
-function DsReplicaSyncAllW; external ntdsapilib name 'DsReplicaSyncAllW';
-function DsReplicaSyncAll; external ntdsapilib name 'DsReplicaSyncAll' + AWSuffix;
-function DsRemoveDsServerA; external ntdsapilib name 'DsRemoveDsServerA';
-function DsRemoveDsServerW; external ntdsapilib name 'DsRemoveDsServerW';
-function DsRemoveDsServer; external ntdsapilib name 'DsRemoveDsServer' + AWSuffix;
-function DsRemoveDsDomainA; external ntdsapilib name 'DsRemoveDsDomainA';
-function DsRemoveDsDomainW; external ntdsapilib name 'DsRemoveDsDomainW';
-function DsRemoveDsDomain; external ntdsapilib name 'DsRemoveDsDomain' + AWSuffix;
-function DsListSitesA; external ntdsapilib name 'DsListSitesA';
-function DsListSitesW; external ntdsapilib name 'DsListSitesW';
-function DsListSites; external ntdsapilib name 'DsListSites' + AWSuffix;
-function DsListServersInSiteA; external ntdsapilib name 'DsListServersInSiteA';
-function DsListServersInSiteW; external ntdsapilib name 'DsListServersInSiteW';
-function DsListServersInSite; external ntdsapilib name 'DsListServersInSite' + AWSuffix;
-function DsListDomainsInSiteA; external ntdsapilib name 'DsListDomainsInSiteA';
-function DsListDomainsInSiteW; external ntdsapilib name 'DsListDomainsInSiteW';
-function DsListDomainsInSite; external ntdsapilib name 'DsListDomainsInSite' + AWSuffix;
-function DsListServersForDomainInSiteA; external ntdsapilib name 'DsListServersForDomainInSiteA';
-function DsListServersForDomainInSiteW; external ntdsapilib name 'DsListServersForDomainInSiteW';
-function DsListServersForDomainInSite; external ntdsapilib name 'DsListServersForDomainInSite' + AWSuffix;
-function DsListInfoForServerA; external ntdsapilib name 'DsListInfoForServerA';
-function DsListInfoForServerW; external ntdsapilib name 'DsListInfoForServerW';
-function DsListInfoForServer; external ntdsapilib name 'DsListInfoForServer' + AWSuffix;
-function DsListRolesA; external ntdsapilib name 'DsListRolesA';
-function DsListRolesW; external ntdsapilib name 'DsListRolesW';
-function DsListRoles; external ntdsapilib name 'DsListRoles' + AWSuffix;
-function DsQuerySitesByCostW; external ntdsapilib name 'DsQuerySitesByCostW';
-function DsQuerySitesByCostA; external ntdsapilib name 'DsQuerySitesByCostA';
-function DsQuerySitesByCost; external ntdsapilib name 'DsQuerySitesByCost' + AWSuffix;
-procedure DsQuerySitesFree; external ntdsapilib name 'DsQuerySitesFree';
-function DsMapSchemaGuidsA; external ntdsapilib name 'DsMapSchemaGuidsA';
-function DsMapSchemaGuidsW; external ntdsapilib name 'DsMapSchemaGuidsW';
-procedure DsFreeSchemaGuidMapA; external ntdsapilib name 'DsFreeSchemaGuidMapA';
-procedure DsFreeSchemaGuidMapW; external ntdsapilib name 'DsFreeSchemaGuidMapW';
-function DsMapSchemaGuids; external ntdsapilib name 'DsMapSchemaGuids' + AWSuffix;
-procedure DsFreeSchemaGuidMap; external ntdsapilib name 'DsFreeSchemaGuidMap' + AWSuffix;
-function DsGetDomainControllerInfoA; external ntdsapilib name 'DsGetDomainControllerInfoA';
-function DsGetDomainControllerInfoW; external ntdsapilib name 'DsGetDomainControllerInfoW';
-function DsGetDomainControllerInfo; external ntdsapilib name 'DsGetDomainControllerInfo' + AWSuffix;
-procedure DsFreeDomainControllerInfoA; external ntdsapilib name 'DsFreeDomainControllerInfoA';
-procedure DsFreeDomainControllerInfoW; external ntdsapilib name 'DsFreeDomainControllerInfoW';
-procedure DsFreeDomainControllerInfo; external ntdsapilib name 'DsFreeDomainControllerInfo' + AWSuffix;
-function DsReplicaConsistencyCheck; external ntdsapilib name 'DsReplicaConsistencyCheck';
-function DsReplicaVerifyObjectsW; external ntdsapilib name 'DsReplicaVerifyObjectsW';
-function DsReplicaVerifyObjectsA; external ntdsapilib name 'DsReplicaVerifyObjectsA';
-function DsReplicaVerifyObjects; external ntdsapilib name 'DsReplicaVerifyObjects' + AWSuffix;
-function DsReplicaGetInfoW; external ntdsapilib name 'DsReplicaGetInfoW';
-procedure DsReplicaFreeInfo; external ntdsapilib name 'DsReplicaFreeInfo';
-{$IFDEF UNICODE}
-function DsReplicaGetInfo; external ntdsapilib name 'DsReplicaGetInfoW';
-function DsReplicaGetInfo2W; external ntdsapilib name 'DsReplicaGetInfo2W';
-{$ENDIF UNICODE}
-function DsAddSidHistoryA; external ntdsapilib name 'DsAddSidHistoryA';
-function DsAddSidHistoryW; external ntdsapilib name 'DsAddSidHistoryW';
-function DsAddSidHistory; external ntdsapilib name 'DsAddSidHistory' + AWSuffix;
-function DsInheritSecurityIdentityA; external ntdsapilib name 'DsInheritSecurityIdentityA';
-function DsInheritSecurityIdentityW; external ntdsapilib name 'DsInheritSecurityIdentityW';
-function DsInheritSecurityIdentity; external ntdsapilib name 'DsInheritSecurityIdentity' + AWSuffix;
-function DsQuoteRdnValueA; external ntdsapilib name 'DsQuoteRdnValueA';
-function DsQuoteRdnValueW; external ntdsapilib name 'DsQuoteRdnValueW';
-function DsQuoteRdnValue; external ntdsapilib name 'DsQuoteRdnValue' + AWSuffix;
-function DsUnquoteRdnValueA; external ntdsapilib name 'DsUnquoteRdnValueA';
-function DsUnquoteRdnValueW; external ntdsapilib name 'DsUnquoteRdnValueW';
-function DsUnquoteRdnValue; external ntdsapilib name 'DsUnquoteRdnValue' + AWSuffix;
-function DsGetRdnW; external ntdsapilib name 'DsGetRdnW';
-function DsCrackUnquotedMangledRdnW; external ntdsapilib name 'DsCrackUnquotedMangledRdnW';
-function DsCrackUnquotedMangledRdnA; external ntdsapilib name 'DsCrackUnquotedMangledRdnA';
-function DsCrackUnquotedMangledRdn; external ntdsapilib name 'DsCrackUnquotedMangledRdn' + AWSuffix;
-function DsIsMangledRdnValueW; external ntdsapilib name 'DsIsMangledRdnValueW';
-function DsIsMangledRdnValueA; external ntdsapilib name 'DsIsMangledRdnValueA';
-function DsIsMangledRdnValue; external ntdsapilib name 'DsIsMangledRdnValue' + AWSuffix;
-function DsIsMangledDnA; external ntdsapilib name 'DsIsMangledDnA';
-function DsIsMangledDnW; external ntdsapilib name 'DsIsMangledDnW';
-function DsIsMangledDn; external ntdsapilib name 'DsIsMangledDn' + AWSuffix;
-
-{$ENDIF DYNAMIC_LINK}
-
-end.
+{******************************************************************************}
+{ }
+{ DC and Replication Management API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: ntdsapi.h, released June 2000. The original Pascal }
+{ code is: NtDsApi.pas, released December 2000. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwantdsapi.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaNtDsApi;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "ntdsapi.h"'}
+{$HPPEMIT ''}
+{$HPPEMIT 'typedef PDS_REPSYNCALL_ERRINFOW *PPDS_REPSYNCALL_ERRINFOW'}
+{$HPPEMIT 'typedef PDS_REPSYNCALL_ERRINFOA *PPDS_REPSYNCALL_ERRINFOA'}
+{$HPPEMIT '#ifdef UNICODE'}
+{$HPPEMIT 'typedef PPDS_REPSYNCALL_ERRINFOW PPDS_REPSYNCALL_ERRINFO'}
+{$HPPEMIT '#else'}
+{$HPPEMIT 'typedef PPDS_REPSYNCALL_ERRINFOA PPDS_REPSYNCALL_ERRINFO'}
+{$HPPEMIT '#endif'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaWinBase, JwaWinType, JwaWinNT, JwaWinNLS, JwaRpcDce, JwaSchedule;
+
+//////////////////////////////////////////////////////////////////////////
+// //
+// Data definitions //
+// //
+//////////////////////////////////////////////////////////////////////////
+
+// Following constants define the Active Directory Behavior
+// Version numbers.
+
+const
+ DS_BEHAVIOR_WIN2000 = 0;
+ {$EXTERNALSYM DS_BEHAVIOR_WIN2000}
+ DS_BEHAVIOR_WIN_DOT_NET_WITH_MIXED_DOMAINS = 1;
+ {$EXTERNALSYM DS_BEHAVIOR_WIN_DOT_NET_WITH_MIXED_DOMAINS}
+ DS_BEHAVIOR_WIN_DOT_NET = 2;
+ {$EXTERNALSYM DS_BEHAVIOR_WIN_DOT_NET}
+
+ // (MAKELCID(MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), SORT_DEFAULT))
+ DS_DEFAULT_LOCALE = DWORD((DWORD(SORT_DEFAULT) shl 16) or ((SUBLANG_ENGLISH_US shl 10) or LANG_ENGLISH));
+ {$EXTERNALSYM DS_DEFAULT_LOCALE}
+
+ DS_DEFAULT_LOCALE_COMPARE_FLAGS = (NORM_IGNORECASE or NORM_IGNOREKANATYPE or
+ NORM_IGNORENONSPACE or NORM_IGNOREWIDTH or SORT_STRINGSORT);
+ {$EXTERNALSYM DS_DEFAULT_LOCALE_COMPARE_FLAGS}
+
+// When booted to DS mode, this event is signalled when the DS has completed
+// its initial sync attempts. The period of time between system startup and
+// this event's state being set is indeterminate from the local service's
+// standpoint. In the meantime the contents of the DS should be considered
+// incomplete / out-dated, and the machine will not be advertised as a domain
+// controller to off-machine clients. Other local services that rely on
+// information published in the DS should avoid accessing (or at least
+// relying on) the contents of the DS until this event is set.
+
+ DS_SYNCED_EVENT_NAME = 'NTDSInitialSyncsCompleted';
+ {$EXTERNALSYM DS_SYNCED_EVENT_NAME}
+ DS_SYNCED_EVENT_NAME_W = 'NTDSInitialSyncsCompleted';
+ {$EXTERNALSYM DS_SYNCED_EVENT_NAME_W}
+
+// Permissions bits used in security descriptors in the directory.
+
+ ACTRL_DS_OPEN = $00000000;
+ {$EXTERNALSYM ACTRL_DS_OPEN}
+ ACTRL_DS_CREATE_CHILD = $00000001;
+ {$EXTERNALSYM ACTRL_DS_CREATE_CHILD}
+ ACTRL_DS_DELETE_CHILD = $00000002;
+ {$EXTERNALSYM ACTRL_DS_DELETE_CHILD}
+ ACTRL_DS_LIST = $00000004;
+ {$EXTERNALSYM ACTRL_DS_LIST}
+ ACTRL_DS_SELF = $00000008;
+ {$EXTERNALSYM ACTRL_DS_SELF}
+ ACTRL_DS_READ_PROP = $00000010;
+ {$EXTERNALSYM ACTRL_DS_READ_PROP}
+ ACTRL_DS_WRITE_PROP = $00000020;
+ {$EXTERNALSYM ACTRL_DS_WRITE_PROP}
+ ACTRL_DS_DELETE_TREE = $00000040;
+ {$EXTERNALSYM ACTRL_DS_DELETE_TREE}
+ ACTRL_DS_LIST_OBJECT = $00000080;
+ {$EXTERNALSYM ACTRL_DS_LIST_OBJECT}
+ ACTRL_DS_CONTROL_ACCESS = $00000100;
+ {$EXTERNALSYM ACTRL_DS_CONTROL_ACCESS}
+
+// generic read
+
+ DS_GENERIC_READ = STANDARD_RIGHTS_READ or ACTRL_DS_LIST or ACTRL_DS_READ_PROP or
+ ACTRL_DS_LIST_OBJECT;
+ {$EXTERNALSYM DS_GENERIC_READ}
+
+// generic execute
+
+ DS_GENERIC_EXECUTE = STANDARD_RIGHTS_EXECUTE or ACTRL_DS_LIST;
+ {$EXTERNALSYM DS_GENERIC_EXECUTE}
+
+// generic right
+
+ DS_GENERIC_WRITE = STANDARD_RIGHTS_WRITE or ACTRL_DS_SELF or ACTRL_DS_WRITE_PROP;
+ {$EXTERNALSYM DS_GENERIC_WRITE}
+
+// generic all
+
+ DS_GENERIC_ALL = STANDARD_RIGHTS_REQUIRED or ACTRL_DS_CREATE_CHILD or
+ ACTRL_DS_DELETE_CHILD or ACTRL_DS_DELETE_TREE or ACTRL_DS_READ_PROP or
+ ACTRL_DS_WRITE_PROP or ACTRL_DS_LIST or ACTRL_DS_LIST_OBJECT or
+ ACTRL_DS_CONTROL_ACCESS or ACTRL_DS_SELF;
+ {$EXTERNALSYM DS_GENERIC_ALL}
+
+type
+ DS_NAME_FORMAT = (
+ // unknown name type
+ DS_UNKNOWN_NAME,
+
+ // eg: CN=User Name,OU=Users,DC=Example,DC=Microsoft,DC=Com
+ DS_FQDN_1779_NAME,
+
+ // eg: Exmaple\UserName
+ // Domain-only version includes trailing '\\'.
+ DS_NT4_ACCOUNT_NAME,
+
+ // Probably "User Name" but could be something else. I.e. The
+ // display name is not necessarily the defining RDN.
+ DS_DISPLAY_NAME,
+
+ // obsolete - see #define later
+ // DS_DOMAIN_SIMPLE_NAME,
+ DS_STUB_4,
+
+ // obsolete - see #define later
+ // DS_ENTERPRISE_SIMPLE_NAME,
+ DS_STUB_5,
+
+ // String-ized GUID as returned by IIDFromString().
+ // eg: {4fa050f0-f561-11cf-bdd9-00aa003a77b6}
+ DS_UNIQUE_ID_NAME,
+
+ // eg: example.microsoft.com/software/user name
+ // Domain-only version includes trailing '/'.
+ DS_CANONICAL_NAME,
+
+ // eg: usern@example.microsoft.com
+ DS_USER_PRINCIPAL_NAME,
+
+ // Same as DS_CANONICAL_NAME except that rightmost '/' is
+ // replaced with '\n' - even in domain-only case.
+ // eg: example.microsoft.com/software\nuser name
+ DS_CANONICAL_NAME_EX,
+
+ // eg: www/www.microsoft.com@example.com - generalized service principal
+ // names.
+ DS_SERVICE_PRINCIPAL_NAME,
+
+ // This is the string representation of a SID. Invalid for formatDesired.
+ // See sddl.h for SID binary <--> text conversion routines.
+ // eg: S-1-5-21-397955417-626881126-188441444-501
+ DS_SID_OR_SID_HISTORY_NAME,
+
+ // Pseudo-name format so GetUserNameEx can return the DNS domain name to
+ // a caller. This level is not supported by the DS APIs.
+ DS_DNS_DOMAIN_NAME);
+ {$EXTERNALSYM DS_NAME_FORMAT}
+ TDsNameFormat = DS_NAME_FORMAT;
+
+// Map old name formats to closest new format so that old code builds
+// against new headers w/o errors and still gets (almost) correct result.
+
+const
+ DS_DOMAIN_SIMPLE_NAME = DS_USER_PRINCIPAL_NAME;
+ {$EXTERNALSYM DS_DOMAIN_SIMPLE_NAME}
+ DS_ENTERPRISE_SIMPLE_NAME = DS_USER_PRINCIPAL_NAME;
+ {$EXTERNALSYM DS_ENTERPRISE_SIMPLE_NAME}
+
+type
+ DS_NAME_FLAGS = DWORD;
+ {$EXTERNALSYM DS_NAME_FLAGS}
+ TDsNameFlags = DS_NAME_FLAGS;
+
+const
+ DS_NAME_NO_FLAGS = $0;
+ {$EXTERNALSYM DS_NAME_NO_FLAGS}
+
+ // Perform a syntactical mapping at the client (if possible) without
+ // going out on the wire. Returns DS_NAME_ERROR_NO_SYNTACTICAL_MAPPING
+ // if a purely syntactical mapping is not possible.
+ DS_NAME_FLAG_SYNTACTICAL_ONLY = $1;
+ {$EXTERNALSYM DS_NAME_FLAG_SYNTACTICAL_ONLY}
+
+ // Force a trip to the DC for evaluation, even if this could be
+ // locally cracked syntactically.
+ DS_NAME_FLAG_EVAL_AT_DC = $2;
+ {$EXTERNALSYM DS_NAME_FLAG_EVAL_AT_DC}
+
+ // The call fails if the DC is not a GC
+ DS_NAME_FLAG_GCVERIFY = $4;
+ {$EXTERNALSYM DS_NAME_FLAG_GCVERIFY}
+
+ // Enable cross forest trust referral
+ DS_NAME_FLAG_TRUST_REFERRAL = $8;
+ {$EXTERNALSYM DS_NAME_FLAG_TRUST_REFERRAL}
+
+type
+ DS_NAME_ERROR = (
+ DS_NAME_NO_ERROR,
+
+ // Generic processing error.
+ DS_NAME_ERROR_RESOLVING,
+
+ // Couldn't find the name at all - or perhaps caller doesn't have
+ // rights to see it.
+ DS_NAME_ERROR_NOT_FOUND,
+
+ // Input name mapped to more than one output name.
+ DS_NAME_ERROR_NOT_UNIQUE,
+
+ // Input name found, but not the associated output format.
+ // Can happen if object doesn't have all the required attributes.
+ DS_NAME_ERROR_NO_MAPPING,
+
+ // Unable to resolve entire name, but was able to determine which
+ // domain object resides in. Thus DS_NAME_RESULT_ITEM?.pDomain
+ // is valid on return.
+ DS_NAME_ERROR_DOMAIN_ONLY,
+
+ // Unable to perform a purely syntactical mapping at the client
+ // without going out on the wire.
+ DS_NAME_ERROR_NO_SYNTACTICAL_MAPPING,
+
+ // The name is from an external trusted forest.
+ DS_NAME_ERROR_TRUST_REFERRAL);
+ {$EXTERNALSYM DS_NAME_ERROR}
+ TDsNameError = DS_NAME_ERROR;
+
+const
+ DS_NAME_LEGAL_FLAGS = DS_NAME_FLAG_SYNTACTICAL_ONLY;
+ {$EXTERNALSYM DS_NAME_LEGAL_FLAGS}
+
+type
+ DS_SPN_NAME_TYPE = (
+
+ // "paulle-nec.ntwksta.ms.com"
+ DS_SPN_DNS_HOST,
+
+ // "cn=paulle-nec,ou=computers,dc=ntwksta,dc=ms,dc=com"
+ DS_SPN_DN_HOST,
+
+ // "paulle-nec"
+ DS_SPN_NB_HOST,
+
+ // "ntdev.ms.com"
+ DS_SPN_DOMAIN,
+
+ // "ntdev"
+ DS_SPN_NB_DOMAIN,
+
+ // "cn=anRpcService,cn=RPC Services,cn=system,dc=ms,dc=com"
+ // "cn=aWsService,cn=Winsock Services,cn=system,dc=ms,dc=com"
+ // "cn=aService,dc=itg,dc=ms,dc=com"
+ // "www.ms.com", "ftp.ms.com", "ldap.ms.com"
+ // "products.ms.com"
+ DS_SPN_SERVICE);
+ {$EXTERNALSYM DS_SPN_NAME_TYPE}
+ TDsSpnNameType = DS_SPN_NAME_TYPE;
+
+ DS_SPN_WRITE_OP = (
+ DS_SPN_ADD_SPN_OP, // add SPNs
+ DS_SPN_REPLACE_SPN_OP, // set all SPNs
+ DS_SPN_DELETE_SPN_OP); // Delete SPNs
+ {$EXTERNALSYM DS_SPN_WRITE_OP}
+ TDsSpnWriteOp = DS_SPN_WRITE_OP;
+
+ PDS_NAME_RESULT_ITEMA = ^DS_NAME_RESULT_ITEMA;
+ {$EXTERNALSYM PDS_NAME_RESULT_ITEMA}
+ DS_NAME_RESULT_ITEMA = record
+ status: DWORD; // DS_NAME_ERROR
+ pDomain: LPSTR; // DNS domain
+ pName: LPSTR; // name in requested format
+ end;
+ {$EXTERNALSYM DS_NAME_RESULT_ITEMA}
+ TDsNameResultItemA = DS_NAME_RESULT_ITEMA;
+ PDsNameResultItemA = PDS_NAME_RESULT_ITEMA;
+
+ PDS_NAME_RESULTA = ^DS_NAME_RESULTA;
+ {$EXTERNALSYM PDS_NAME_RESULTA}
+ DS_NAME_RESULTA = record
+ cItems: DWORD; // item count
+ rItems: PDS_NAME_RESULT_ITEMA; // item array
+ end;
+ {$EXTERNALSYM DS_NAME_RESULTA}
+ TDsNameResultA = DS_NAME_RESULTA;
+ PDsNameResultA = PDS_NAME_RESULTA;
+
+ PDS_NAME_RESULT_ITEMW = ^DS_NAME_RESULT_ITEMW;
+ {$EXTERNALSYM PDS_NAME_RESULT_ITEMW}
+ DS_NAME_RESULT_ITEMW = record
+ status: DWORD; // DS_NAME_ERROR
+ pDomain: LPWSTR; // DNS domain
+ pName: LPWSTR; // name in requested format
+ end;
+ {$EXTERNALSYM DS_NAME_RESULT_ITEMW}
+ TDsNameResultItemW = DS_NAME_RESULT_ITEMW;
+ PDsNameResultItemW = PDS_NAME_RESULT_ITEMW;
+
+ PDS_NAME_RESULTW = ^DS_NAME_RESULTW;
+ {$EXTERNALSYM PDS_NAME_RESULTW}
+ DS_NAME_RESULTW = record
+ cItems: DWORD; // item count
+ rItems: PDS_NAME_RESULT_ITEMW; // item array
+ end;
+ {$EXTERNALSYM DS_NAME_RESULTW}
+ TDsNameResultW = DS_NAME_RESULTW;
+ PDsNameResultW = PDS_NAME_RESULTW;
+
+ {$IFDEF UNICODE}
+ DS_NAME_RESULT = DS_NAME_RESULTW;
+ {$EXTERNALSYM DS_NAME_RESULT}
+ PDS_NAME_RESULT = PDS_NAME_RESULTW;
+ {$EXTERNALSYM PDS_NAME_RESULT}
+ DS_NAME_RESULT_ITEM = DS_NAME_RESULT_ITEMW;
+ {$EXTERNALSYM DS_NAME_RESULT_ITEM}
+ PDS_NAME_RESULT_ITEM = PDS_NAME_RESULT_ITEMW;
+ {$EXTERNALSYM PDS_NAME_RESULT_ITEM}
+ TDsNameResult = TDsNameResultW;
+ PDsNameResult = PDsNameResultW;
+ TDsNameResultItem = TDsNameResultItemW;
+ PDsNameResultItem = PDsNameResultItemW;
+ {$ELSE}
+ DS_NAME_RESULT = DS_NAME_RESULTA;
+ {$EXTERNALSYM DS_NAME_RESULT}
+ PDS_NAME_RESULT = PDS_NAME_RESULTA;
+ {$EXTERNALSYM PDS_NAME_RESULT}
+ DS_NAME_RESULT_ITEM = DS_NAME_RESULT_ITEMA;
+ {$EXTERNALSYM DS_NAME_RESULT_ITEM}
+ PDS_NAME_RESULT_ITEM = PDS_NAME_RESULT_ITEMA;
+ {$EXTERNALSYM PDS_NAME_RESULT_ITEM}
+ TDsNameResult = TDsNameResultA;
+ PDsNameResult = PDsNameResultA;
+ TDsNameResultItem = TDsNameResultItemA;
+ PDsNameResultItem = PDsNameResultItemA;
+ {$ENDIF UNICODE}
+
+// Public replication option flags
+
+// ********************
+// DsBindWithSpnEx flags
+// ********************
+// Allow the Bind to use delegate service level, so that you can
+// do ntdsapi operations that require delegation, such as
+// DsAddSidHistory, and DsReplicaSyncAll(). Most operations do
+// not require DELEGATE so this flag should only be specified
+// if you need it, because if you bind to a rogue server with
+// the DELEGATE flag, you'll allow the rogue server to use your
+// credentials to connect back to a non-rogue server and perform
+// operations other than you intended.
+
+const
+ NTDSAPI_BIND_ALLOW_DELEGATION = $00000001;
+ {$EXTERNALSYM NTDSAPI_BIND_ALLOW_DELEGATION}
+
+// ********************
+// Replica Sync flags
+// These flag values are used both as input to DsReplicaSync and
+// as output from DsReplicaGetInfo, PENDING_OPS, DS_REPL_OPW.ulOptions
+// ********************
+
+// Perform this operation asynchronously.
+// Required when using DS_REPSYNC_ALL_SOURCES
+
+const
+ DS_REPSYNC_ASYNCHRONOUS_OPERATION = $00000001;
+ {$EXTERNALSYM DS_REPSYNC_ASYNCHRONOUS_OPERATION}
+
+// Writeable replica. Otherwise, read-only.
+
+ DS_REPSYNC_WRITEABLE = $00000002;
+ {$EXTERNALSYM DS_REPSYNC_WRITEABLE}
+
+// This is a periodic sync request as scheduled by the admin.
+
+ DS_REPSYNC_PERIODIC = $00000004;
+ {$EXTERNALSYM DS_REPSYNC_PERIODIC}
+
+// Use inter-site messaging
+
+ DS_REPSYNC_INTERSITE_MESSAGING = $00000008;
+ {$EXTERNALSYM DS_REPSYNC_INTERSITE_MESSAGING}
+
+// Sync from all sources.
+
+ DS_REPSYNC_ALL_SOURCES = $00000010;
+ {$EXTERNALSYM DS_REPSYNC_ALL_SOURCES}
+
+// Sync starting from scratch (i.e., at the first USN).
+
+ DS_REPSYNC_FULL = $00000020;
+ {$EXTERNALSYM DS_REPSYNC_FULL}
+
+// This is a notification of an update that was marked urgent.
+
+ DS_REPSYNC_URGENT = $00000040;
+ {$EXTERNALSYM DS_REPSYNC_URGENT}
+
+// Don't discard this synchronization request, even if a similar
+// sync is pending.
+
+ DS_REPSYNC_NO_DISCARD = $00000080;
+ {$EXTERNALSYM DS_REPSYNC_NO_DISCARD}
+
+// Sync even if link is currently disabled.
+
+ DS_REPSYNC_FORCE = $00000100;
+ {$EXTERNALSYM DS_REPSYNC_FORCE}
+
+// Causes the source DSA to check if a reps-to is present for the local DSA
+// (aka the destination). If not, one is added. This ensures that
+// source sends change notifications.
+
+ DS_REPSYNC_ADD_REFERENCE = $00000200;
+ {$EXTERNALSYM DS_REPSYNC_ADD_REFERENCE}
+
+// A sync from this source has never completed (e.g., a new source).
+
+ DS_REPSYNC_NEVER_COMPLETED = $00000400;
+ {$EXTERNALSYM DS_REPSYNC_NEVER_COMPLETED}
+
+// When this sync is complete, requests a sync in the opposite direction.
+
+ DS_REPSYNC_TWO_WAY = $00000800;
+ {$EXTERNALSYM DS_REPSYNC_TWO_WAY}
+
+// Do not request change notifications from this source.
+ DS_REPSYNC_NEVER_NOTIFY = $00001000;
+ {$EXTERNALSYM DS_REPSYNC_NEVER_NOTIFY}
+
+// Sync the NC from this source when the DSA is started.
+ DS_REPSYNC_INITIAL = $00002000;
+ {$EXTERNALSYM DS_REPSYNC_INITIAL}
+
+// Use compression when replicating. Saves message size (e.g., network
+// bandwidth) at the expense of extra CPU overhead at both the source and
+// destination servers.
+ DS_REPSYNC_USE_COMPRESSION = $00004000;
+ {$EXTERNALSYM DS_REPSYNC_USE_COMPRESSION}
+
+// Sync was abandoned for lack of updates
+ DS_REPSYNC_ABANDONED = $00008000;
+ {$EXTERNALSYM DS_REPSYNC_ABANDONED}
+
+// Initial sync in progress
+ DS_REPSYNC_INITIAL_IN_PROGRESS = $00010000;
+ {$EXTERNALSYM DS_REPSYNC_INITIAL_IN_PROGRESS}
+
+// Partial Attribute Set sync in progress
+ DS_REPSYNC_PARTIAL_ATTRIBUTE_SET = $00020000;
+ {$EXTERNALSYM DS_REPSYNC_PARTIAL_ATTRIBUTE_SET}
+
+// Sync is being retried
+ DS_REPSYNC_REQUEUE = $00040000;
+ {$EXTERNALSYM DS_REPSYNC_REQUEUE}
+
+// Sync is a notification request from a source
+ DS_REPSYNC_NOTIFICATION = $00080000;
+ {$EXTERNALSYM DS_REPSYNC_NOTIFICATION}
+
+// Sync is a special form which requests to establish contact
+// now and do the rest of the sync later
+ DS_REPSYNC_ASYNCHRONOUS_REPLICA = $00100000;
+ {$EXTERNALSYM DS_REPSYNC_ASYNCHRONOUS_REPLICA}
+
+// Request critical objects only
+ DS_REPSYNC_CRITICAL = $00200000;
+ {$EXTERNALSYM DS_REPSYNC_CRITICAL}
+
+// A full synchronization is in progress
+ DS_REPSYNC_FULL_IN_PROGRESS = $00400000;
+ {$EXTERNALSYM DS_REPSYNC_FULL_IN_PROGRESS}
+
+// Synchronization request was previously preempted
+ DS_REPSYNC_PREEMPTED = $00800000;
+ {$EXTERNALSYM DS_REPSYNC_PREEMPTED}
+
+// ********************
+// Replica Add flags
+// ********************
+
+// Perform this operation asynchronously.
+
+ DS_REPADD_ASYNCHRONOUS_OPERATION = $00000001;
+ {$EXTERNALSYM DS_REPADD_ASYNCHRONOUS_OPERATION}
+
+// Create a writeable replica. Otherwise, read-only.
+
+ DS_REPADD_WRITEABLE = $00000002;
+ {$EXTERNALSYM DS_REPADD_WRITEABLE}
+
+// Sync the NC from this source when the DSA is started.
+
+ DS_REPADD_INITIAL = $00000004;
+ {$EXTERNALSYM DS_REPADD_INITIAL}
+
+// Sync the NC from this source periodically, as defined by the
+// schedule passed in the preptimesSync argument.
+
+ DS_REPADD_PERIODIC = $00000008;
+ {$EXTERNALSYM DS_REPADD_PERIODIC}
+
+// Sync from the source DSA via an Intersite Messaging Service (ISM) transport
+// (e.g., SMTP) rather than native DS RPC.
+
+ DS_REPADD_INTERSITE_MESSAGING = $00000010;
+ {$EXTERNALSYM DS_REPADD_INTERSITE_MESSAGING}
+
+// Don't replicate the NC now -- just save enough state such that we
+// know to replicate it later.
+
+ DS_REPADD_ASYNCHRONOUS_REPLICA = $00000020;
+ {$EXTERNALSYM DS_REPADD_ASYNCHRONOUS_REPLICA}
+
+// Disable notification-based synchronization for the NC from this source.
+// This is expected to be a temporary state; the similar flag
+// DS_REPADD_NEVER_NOTIFY should be used if the disable is to be more permanent.
+
+ DS_REPADD_DISABLE_NOTIFICATION = $00000040;
+ {$EXTERNALSYM DS_REPADD_DISABLE_NOTIFICATION}
+
+// Disable periodic synchronization for the NC from this source
+
+ DS_REPADD_DISABLE_PERIODIC = $00000080;
+ {$EXTERNALSYM DS_REPADD_DISABLE_PERIODIC}
+
+// Use compression when replicating. Saves message size (e.g., network
+// bandwidth) at the expense of extra CPU overhead at both the source and
+// destination servers.
+
+ DS_REPADD_USE_COMPRESSION = $00000100;
+ {$EXTERNALSYM DS_REPADD_USE_COMPRESSION}
+
+// Do not request change notifications from this source. When this flag is
+// set, the source will not notify the destination when changes occur.
+// Recommended for all intersite replication, which may occur over WAN links.
+// This is expected to be a more or less permanent state; the similar flag
+// DS_REPADD_DISABLE_NOTIFICATION should be used if notifications are to be
+// disabled only temporarily.
+
+ DS_REPADD_NEVER_NOTIFY = $00000200;
+ {$EXTERNALSYM DS_REPADD_NEVER_NOTIFY}
+
+// When this sync is complete, requests a sync in the opposite direction.
+ DS_REPADD_TWO_WAY = $00000400;
+ {$EXTERNALSYM DS_REPADD_TWO_WAY}
+
+// Request critical objects only
+// Critical only is only allowed while installing
+// A critical only sync does not bring all objects in the partition. It
+// replicates just the ones necessary for minimal directory operation.
+// A normal, non-critical sync must be performed before the partition
+// can be considered fully synchronized.
+ DS_REPADD_CRITICAL = $00000800;
+ {$EXTERNALSYM DS_REPADD_CRITICAL}
+
+// ********************
+// Replica Delete flags
+// ********************
+
+// Perform this operation asynchronously.
+
+ DS_REPDEL_ASYNCHRONOUS_OPERATION = $00000001;
+ {$EXTERNALSYM DS_REPDEL_ASYNCHRONOUS_OPERATION}
+
+// The replica being deleted is writeable.
+
+ DS_REPDEL_WRITEABLE = $00000002;
+ {$EXTERNALSYM DS_REPDEL_WRITEABLE}
+
+// Replica is a mail-based replica
+
+ DS_REPDEL_INTERSITE_MESSAGING = $00000004;
+ {$EXTERNALSYM DS_REPDEL_INTERSITE_MESSAGING}
+
+// Ignore any error generated by contacting the source to tell it to scratch
+// this server from its Reps-To for this NC.
+
+ DS_REPDEL_IGNORE_ERRORS = $00000008;
+ {$EXTERNALSYM DS_REPDEL_IGNORE_ERRORS}
+
+// Do not contact the source telling it to scratch this server from its
+// Rep-To for this NC. Otherwise, if the link is RPC-based, the source will
+// be contacted.
+
+ DS_REPDEL_LOCAL_ONLY = $00000010;
+ {$EXTERNALSYM DS_REPDEL_LOCAL_ONLY}
+
+// Delete all the objects in the NC
+// "No source" is incompatible with (and rejected for) writeable NCs. This is
+// valid only for read-only NCs, and then only if the NC has no source. This
+// can occur when the NC has been partially deleted (in which case the KCC
+// periodically calls the delete API with the "no source" flag set).
+
+ DS_REPDEL_NO_SOURCE = $00000020;
+ {$EXTERNALSYM DS_REPDEL_NO_SOURCE}
+
+// Allow deletion of read-only replica even if it sources
+// other read-only replicas.
+
+ DS_REPDEL_REF_OK = $00000040;
+ {$EXTERNALSYM DS_REPDEL_REF_OK}
+
+// ********************
+// Replica Modify flags
+// ********************
+
+// Perform this operation asynchronously.
+
+ DS_REPMOD_ASYNCHRONOUS_OPERATION = $00000001;
+ {$EXTERNALSYM DS_REPMOD_ASYNCHRONOUS_OPERATION}
+
+// The replica is writeable.
+
+ DS_REPMOD_WRITEABLE = $00000002;
+ {$EXTERNALSYM DS_REPMOD_WRITEABLE}
+
+// ********************
+// Replica Modify fields
+// ********************
+
+ DS_REPMOD_UPDATE_FLAGS = $00000001;
+ {$EXTERNALSYM DS_REPMOD_UPDATE_FLAGS}
+ DS_REPMOD_UPDATE_ADDRESS = $00000002;
+ {$EXTERNALSYM DS_REPMOD_UPDATE_ADDRESS}
+ DS_REPMOD_UPDATE_SCHEDULE = $00000004;
+ {$EXTERNALSYM DS_REPMOD_UPDATE_SCHEDULE}
+ DS_REPMOD_UPDATE_RESULT = $00000008;
+ {$EXTERNALSYM DS_REPMOD_UPDATE_RESULT}
+ DS_REPMOD_UPDATE_TRANSPORT = $00000010;
+ {$EXTERNALSYM DS_REPMOD_UPDATE_TRANSPORT}
+
+// ********************
+// Update Refs fields
+// ********************
+
+// Perform this operation asynchronously.
+
+ DS_REPUPD_ASYNCHRONOUS_OPERATION = $00000001;
+ {$EXTERNALSYM DS_REPUPD_ASYNCHRONOUS_OPERATION}
+
+// The replica being deleted is writeable.
+
+ DS_REPUPD_WRITEABLE = $00000002;
+ {$EXTERNALSYM DS_REPUPD_WRITEABLE}
+
+// Add a reference
+
+ DS_REPUPD_ADD_REFERENCE = $00000004;
+ {$EXTERNALSYM DS_REPUPD_ADD_REFERENCE}
+
+// Remove a reference
+
+ DS_REPUPD_DELETE_REFERENCE = $00000008;
+ {$EXTERNALSYM DS_REPUPD_DELETE_REFERENCE}
+
+// ********************
+// NC Related Flags
+// ********************
+//
+// Instance Type bits, specifies flags for NC head creation.
+//
+
+ DS_INSTANCETYPE_IS_NC_HEAD = $00000001; // This if what to specify on an object to indicate it's an NC Head.
+ {$EXTERNALSYM DS_INSTANCETYPE_IS_NC_HEAD}
+ DS_INSTANCETYPE_NC_IS_WRITEABLE = $00000004; // This is to indicate that the NC Head is writeable.
+ {$EXTERNALSYM DS_INSTANCETYPE_NC_IS_WRITEABLE}
+ DS_INSTANCETYPE_NC_COMING = $00000010; // This is to indicate that this NC is still replicating in objects to this DC, and may not be a complete NC.
+ {$EXTERNALSYM DS_INSTANCETYPE_NC_COMING}
+ DS_INSTANCETYPE_NC_GOING = $00000020; // This is to indicate that this NC is in the process of being removed from this DC, and may not be a complete NC.
+ {$EXTERNALSYM DS_INSTANCETYPE_NC_GOING}
+
+// ********************
+// xxx_OPT_xxx Flags
+// ********************
+
+// These macros define bit flags which can be set in the "options" attribute
+// of objects of the specified object class.
+
+// Bit flags valid for options attribute on NTDS-DSA objects.
+//
+
+ NTDSDSA_OPT_IS_GC = 1 shl 0; // DSA is a global catalog
+ {$EXTERNALSYM NTDSDSA_OPT_IS_GC}
+ NTDSDSA_OPT_DISABLE_INBOUND_REPL = 1 shl 1; // disable inbound replication
+ {$EXTERNALSYM NTDSDSA_OPT_DISABLE_INBOUND_REPL}
+ NTDSDSA_OPT_DISABLE_OUTBOUND_REPL = 1 shl 2; // disable outbound replication
+ {$EXTERNALSYM NTDSDSA_OPT_DISABLE_OUTBOUND_REPL}
+ NTDSDSA_OPT_DISABLE_NTDSCONN_XLATE = 1 shl 3; // disable logical conn xlation
+ {$EXTERNALSYM NTDSDSA_OPT_DISABLE_NTDSCONN_XLATE}
+
+// Bit flags for options attribute on NTDS-Connection objects.
+//
+// The reasons that two bits are required to control notification are as follows.
+// We must support existing connections with the old behavior and the UI does not
+// create manual connections with the new bit set.
+// The default for existing and manually created connections with bits 2 and 3
+// clear must be the standard prior behavior: notification for intra-site and
+// no notification for inter-site.
+// We need a way to distinguish a old connection which desires the default
+// notification rules, and a new connection for which we desire to explicitly
+// control the notification state as passed down from a site link. Thus we
+// have a new bit to say we are overriding the default, and a new bit to indicate
+// what the overridden default shall be.
+//
+
+ NTDSCONN_OPT_IS_GENERATED = 1 shl 0; // object generated by DS, not admin
+ {$EXTERNALSYM NTDSCONN_OPT_IS_GENERATED}
+ NTDSCONN_OPT_TWOWAY_SYNC = 1 shl 1; // force sync in opposite direction at end of sync
+ {$EXTERNALSYM NTDSCONN_OPT_TWOWAY_SYNC}
+ NTDSCONN_OPT_OVERRIDE_NOTIFY_DEFAULT = 1 shl 2; // Do not use defaults to determine notification
+ {$EXTERNALSYM NTDSCONN_OPT_OVERRIDE_NOTIFY_DEFAULT}
+ NTDSCONN_OPT_USE_NOTIFY = 1 shl 3; // Does source notify destination
+ {$EXTERNALSYM NTDSCONN_OPT_USE_NOTIFY}
+
+// For intra-site connections, this bit has no meaning.
+// For inter-site connections, this bit means:
+// 0 - Compression of replication data enabled
+// 1 - Compression of replication data disabled
+
+ NTDSCONN_OPT_DISABLE_INTERSITE_COMPRESSION = 1 shl 4;
+ {$EXTERNALSYM NTDSCONN_OPT_DISABLE_INTERSITE_COMPRESSION}
+
+// For connections whose IS_GENERATED bit is 0, this bit has no effect.
+// For KCC-generated connections, this bit indicates that the schedule attribute
+// is owned by the user and should not be touched by the KCC.
+
+ NTDSCONN_OPT_USER_OWNED_SCHEDULE = 1 shl 5;
+ {$EXTERNALSYM NTDSCONN_OPT_USER_OWNED_SCHEDULE}
+
+//
+// The high 4 bits of the options attribute are used by NTFRS to assign priority
+// for inbound connections. Bit 31 is used to force FRS to ignore schedule during
+// the initial sync. Bits 30 - 28 are used to specify a priority between 0-7.
+//
+
+ FRSCONN_PRIORITY_MASK = $70000000;
+ {$EXTERNALSYM FRSCONN_PRIORITY_MASK}
+ FRSCONN_MAX_PRIORITY = $8;
+ {$EXTERNALSYM FRSCONN_MAX_PRIORITY}
+
+ DSCONN_OPT_IGNORE_SCHEDULE_MASK = DWORD($80000000);
+ {$EXTERNALSYM DSCONN_OPT_IGNORE_SCHEDULE_MASK}
+
+function NTDSCONN_IGNORE_SCHEDULE(_options_: DWORD): DWORD;
+{$EXTERNALSYM NTDSCONN_IGNORE_SCHEDULE}
+
+function FRSCONN_GET_PRIORITY(_options_: DWORD): DWORD;
+{$EXTERNALSYM FRSCONN_GET_PRIORITY}
+
+// Bit flags for options attribute on NTDS-Site-Settings objects.
+//
+
+const
+ NTDSSETTINGS_OPT_IS_AUTO_TOPOLOGY_DISABLED = 1 shl 0; // automatic topology gen disabled
+ {$EXTERNALSYM NTDSSETTINGS_OPT_IS_AUTO_TOPOLOGY_DISABLED}
+ NTDSSETTINGS_OPT_IS_TOPL_CLEANUP_DISABLED = 1 shl 1; // automatic topology cleanup disabled
+ {$EXTERNALSYM NTDSSETTINGS_OPT_IS_TOPL_CLEANUP_DISABLED}
+ NTDSSETTINGS_OPT_IS_TOPL_MIN_HOPS_DISABLED = 1 shl 2; // automatic minimum hops topology disabled
+ {$EXTERNALSYM NTDSSETTINGS_OPT_IS_TOPL_MIN_HOPS_DISABLED}
+ NTDSSETTINGS_OPT_IS_TOPL_DETECT_STALE_DISABLED = 1 shl 3; // automatic stale server detection disabled
+ {$EXTERNALSYM NTDSSETTINGS_OPT_IS_TOPL_DETECT_STALE_DISABLED}
+ NTDSSETTINGS_OPT_IS_INTER_SITE_AUTO_TOPOLOGY_DISABLED = 1 shl 4; // automatic inter-site topology gen disabled
+ {$EXTERNALSYM NTDSSETTINGS_OPT_IS_INTER_SITE_AUTO_TOPOLOGY_DISABLED}
+ NTDSSETTINGS_OPT_IS_GROUP_CACHING_ENABLED = 1 shl 5; // group memberships for users enabled
+ {$EXTERNALSYM NTDSSETTINGS_OPT_IS_GROUP_CACHING_ENABLED}
+ NTDSSETTINGS_OPT_FORCE_KCC_WHISTLER_BEHAVIOR = 1 shl 6; // force KCC to operate in Whistler behavior mode
+ {$EXTERNALSYM NTDSSETTINGS_OPT_FORCE_KCC_WHISTLER_BEHAVIOR}
+ NTDSSETTINGS_OPT_FORCE_KCC_W2K_ELECTION = 1 shl 7; // force KCC to use the Windows 2000 ISTG election algorithm
+ {$EXTERNALSYM NTDSSETTINGS_OPT_FORCE_KCC_W2K_ELECTION}
+ NTDSSETTINGS_OPT_IS_RAND_BH_SELECTION_DISABLED = 1 shl 8; // prevent the KCC from randomly picking a bridgehead when creating a connection
+ {$EXTERNALSYM NTDSSETTINGS_OPT_IS_RAND_BH_SELECTION_DISABLED}
+ NTDSSETTINGS_OPT_IS_SCHEDULE_HASHING_ENABLED = 1 shl 9; // allow the KCC to use hashing when creating a replication schedule
+ {$EXTERNALSYM NTDSSETTINGS_OPT_IS_SCHEDULE_HASHING_ENABLED}
+
+// Bit flags for options attribute on Inter-Site-Transport objects
+//
+// Note, the sense of the flag should be such that the default state or
+// behavior corresponds to the flag NOT being present. Put another way, the
+// flag should state the OPPOSITE of the default
+//
+// default: schedules are significant
+
+ NTDSTRANSPORT_OPT_IGNORE_SCHEDULES = 1 shl 0; // Schedules disabled
+ {$EXTERNALSYM NTDSTRANSPORT_OPT_IGNORE_SCHEDULES}
+
+// default: links transitive (bridges not required)
+
+ NTDSTRANSPORT_OPT_BRIDGES_REQUIRED = 1 shl 1; // siteLink bridges are required
+ {$EXTERNALSYM NTDSTRANSPORT_OPT_BRIDGES_REQUIRED}
+
+// Bit flags for options attribute on site-Connection objects
+//
+// These are not realized in the DS, but are built up in the KCC
+
+ NTDSSITECONN_OPT_USE_NOTIFY = 1 shl 0; // Use notification on this link
+ {$EXTERNALSYM NTDSSITECONN_OPT_USE_NOTIFY}
+ NTDSSITECONN_OPT_TWOWAY_SYNC = 1 shl 1; // force sync in opposite direction at end of sync
+ {$EXTERNALSYM NTDSSITECONN_OPT_TWOWAY_SYNC}
+
+// This bit means:
+// 0 - Compression of replication data across this site connection enabled
+// 1 - Compression of replication data across this site connection disabled
+
+ NTDSSITECONN_OPT_DISABLE_COMPRESSION = 1 shl 2;
+ {$EXTERNALSYM NTDSSITECONN_OPT_DISABLE_COMPRESSION}
+
+// Bit flags for options attribute on site-Link objects
+// Note that these options are AND-ed along a site-link path
+//
+
+ NTDSSITELINK_OPT_USE_NOTIFY = 1 shl 0; // Use notification on this link
+ {$EXTERNALSYM NTDSSITELINK_OPT_USE_NOTIFY}
+ NTDSSITELINK_OPT_TWOWAY_SYNC = 1 shl 1; // force sync in opposite direction at end of sync
+ {$EXTERNALSYM NTDSSITELINK_OPT_TWOWAY_SYNC}
+
+// This bit means:
+// 0 - Compression of replication data across this site link enabled
+// 1 - Compression of replication data across this site link disabled
+
+ NTDSSITELINK_OPT_DISABLE_COMPRESSION = 1 shl 2;
+ {$EXTERNALSYM NTDSSITELINK_OPT_DISABLE_COMPRESSION}
+
+// ***********************
+// Well Known Object Guids
+// ***********************
+
+ GUID_USERS_CONTAINER_A = 'a9d1ca15768811d1aded00c04fd8d5cd';
+ {$EXTERNALSYM GUID_USERS_CONTAINER_A}
+ GUID_COMPUTRS_CONTAINER_A = 'aa312825768811d1aded00c04fd8d5cd';
+ {$EXTERNALSYM GUID_COMPUTRS_CONTAINER_A}
+ GUID_SYSTEMS_CONTAINER_A = 'ab1d30f3768811d1aded00c04fd8d5cd';
+ {$EXTERNALSYM GUID_SYSTEMS_CONTAINER_A}
+ GUID_DOMAIN_CONTROLLERS_CONTAINER_A = 'a361b2ffffd211d1aa4b00c04fd7d83a';
+ {$EXTERNALSYM GUID_DOMAIN_CONTROLLERS_CONTAINER_A}
+ GUID_INFRASTRUCTURE_CONTAINER_A = '2fbac1870ade11d297c400c04fd8d5cd';
+ {$EXTERNALSYM GUID_INFRASTRUCTURE_CONTAINER_A}
+ GUID_DELETED_OBJECTS_CONTAINER_A = '18e2ea80684f11d2b9aa00c04f79f805';
+ {$EXTERNALSYM GUID_DELETED_OBJECTS_CONTAINER_A}
+ GUID_LOSTANDFOUND_CONTAINER_A = 'ab8153b7768811d1aded00c04fd8d5cd';
+ {$EXTERNALSYM GUID_LOSTANDFOUND_CONTAINER_A}
+ GUID_FOREIGNSECURITYPRINCIPALS_CONTAINER_A = '22b70c67d56e4efb91e9300fca3dc1aa';
+ {$EXTERNALSYM GUID_FOREIGNSECURITYPRINCIPALS_CONTAINER_A}
+ GUID_PROGRAM_DATA_CONTAINER_A = '09460c08ae1e4a4ea0f64aee7daa1e5a';
+ {$EXTERNALSYM GUID_PROGRAM_DATA_CONTAINER_A}
+ GUID_MICROSOFT_PROGRAM_DATA_CONTAINER_A = 'f4be92a4c777485e878e9421d53087db';
+ {$EXTERNALSYM GUID_MICROSOFT_PROGRAM_DATA_CONTAINER_A}
+
+ GUID_USERS_CONTAINER_W = WideString('a9d1ca15768811d1aded00c04fd8d5cd');
+ {$EXTERNALSYM GUID_USERS_CONTAINER_W}
+ GUID_COMPUTRS_CONTAINER_W = WideString('aa312825768811d1aded00c04fd8d5cd');
+ {$EXTERNALSYM GUID_COMPUTRS_CONTAINER_W}
+ GUID_SYSTEMS_CONTAINER_W = WideString('ab1d30f3768811d1aded00c04fd8d5cd');
+ {$EXTERNALSYM GUID_SYSTEMS_CONTAINER_W}
+ GUID_DOMAIN_CONTROLLERS_CONTAINER_W = WideString('a361b2ffffd211d1aa4b00c04fd7d83a');
+ {$EXTERNALSYM GUID_DOMAIN_CONTROLLERS_CONTAINER_W}
+ GUID_INFRASTRUCTURE_CONTAINER_W = WideString('2fbac1870ade11d297c400c04fd8d5cd');
+ {$EXTERNALSYM GUID_INFRASTRUCTURE_CONTAINER_W}
+ GUID_DELETED_OBJECTS_CONTAINER_W = WideString('18e2ea80684f11d2b9aa00c04f79f805');
+ {$EXTERNALSYM GUID_DELETED_OBJECTS_CONTAINER_W}
+ GUID_LOSTANDFOUND_CONTAINER_W = WideString('ab8153b7768811d1aded00c04fd8d5cd');
+ {$EXTERNALSYM GUID_LOSTANDFOUND_CONTAINER_W}
+ GUID_FOREIGNSECURITYPRINCIPALS_CONTAINER_W = WideString('22b70c67d56e4efb91e9300fca3dc1aa');
+ {$EXTERNALSYM GUID_FOREIGNSECURITYPRINCIPALS_CONTAINER_W}
+ GUID_PROGRAM_DATA_CONTAINER_W = WideString('09460c08ae1e4a4ea0f64aee7daa1e5a');
+ {$EXTERNALSYM GUID_PROGRAM_DATA_CONTAINER_W}
+ GUID_MICROSOFT_PROGRAM_DATA_CONTAINER_W = WideString('f4be92a4c777485e878e9421d53087db');
+ {$EXTERNALSYM GUID_MICROSOFT_PROGRAM_DATA_CONTAINER_W}
+
+ GUID_USERS_CONTAINER_BYTE = '\xa9\xd1\xca\x15\x76\x88\x11\xd1\xad\xed\x00\xc0\x4f\xd8\xd5\xcd';
+ {$EXTERNALSYM GUID_USERS_CONTAINER_BYTE}
+ GUID_COMPUTRS_CONTAINER_BYTE = '\xaa\x31\x28\x25\x76\x88\x11\xd1\xad\xed\x00\xc0\x4f\xd8\xd5\xcd';
+ {$EXTERNALSYM GUID_COMPUTRS_CONTAINER_BYTE}
+ GUID_SYSTEMS_CONTAINER_BYTE = '\xab\x1d\x30\xf3\x76\x88\x11\xd1\xad\xed\x00\xc0\x4f\xd8\xd5\xcd';
+ {$EXTERNALSYM GUID_SYSTEMS_CONTAINER_BYTE}
+ GUID_DOMAIN_CONTROLLERS_CONTAINER_BYTE = '\xa3\x61\xb2\xff\xff\xd2\x11\xd1\xaa\x4b\x00\xc0\x4f\xd7\xd8\x3a';
+ {$EXTERNALSYM GUID_DOMAIN_CONTROLLERS_CONTAINER_BYTE}
+ GUID_INFRASTRUCTURE_CONTAINER_BYTE = '\x2f\xba\xc1\x87\x0a\xde\x11\xd2\x97\xc4\x00\xc0\x4f\xd8\xd5\xcd';
+ {$EXTERNALSYM GUID_INFRASTRUCTURE_CONTAINER_BYTE}
+ GUID_DELETED_OBJECTS_CONTAINER_BYTE = '\x18\xe2\xea\x80\x68\x4f\x11\xd2\xb9\xaa\x00\xc0\x4f\x79\xf8\x05';
+ {$EXTERNALSYM GUID_DELETED_OBJECTS_CONTAINER_BYTE}
+ GUID_LOSTANDFOUND_CONTAINER_BYTE = '\xab\x81\x53\xb7\x76\x88\x11\xd1\xad\xed\x00\xc0\x4f\xd8\xd5\xcd';
+ {$EXTERNALSYM GUID_LOSTANDFOUND_CONTAINER_BYTE}
+ GUID_FOREIGNSECURITYPRINCIPALS_CONTAINER_BYTE = '\x22\xb7\x0c\x67\xd5\x6e\x4e\xfb\x91\xe9\x30\x0f\xca\x3d\xc1\xaa';
+ {$EXTERNALSYM GUID_FOREIGNSECURITYPRINCIPALS_CONTAINER_BYTE}
+ GUID_PROGRAM_DATA_CONTAINER_BYTE = '\x09\x46\x0c\x08\xae\x1e\x4a\x4e\xa0\xf6\x4a\xee\x7d\xaa\x1e\x5a';
+ {$EXTERNALSYM GUID_PROGRAM_DATA_CONTAINER_BYTE}
+ GUID_MICROSOFT_PROGRAM_DATA_CONTAINER_BYTE = '\xf4\xbe\x92\xa4\xc7\x77\x48\x5e\x87\x8e\x94\x21\xd5\x30\x87\xdb';
+ {$EXTERNALSYM GUID_MICROSOFT_PROGRAM_DATA_CONTAINER_BYTE}
+
+type
+ _DS_MANGLE_FOR = (
+ DS_MANGLE_UNKNOWN,
+ DS_MANGLE_OBJECT_RDN_FOR_DELETION,
+ DS_MANGLE_OBJECT_RDN_FOR_NAME_CONFLICT);
+ {$EXTERNALSYM _DS_MANGLE_FOR}
+ DS_MANGLE_FOR = _DS_MANGLE_FOR;
+ {$EXTERNALSYM DS_MANGLE_FOR}
+ TDsMangleFor = DS_MANGLE_FOR;
+ PDsMangleFor = ^DS_MANGLE_FOR;
+
+//////////////////////////////////////////////////////////////////////////
+// //
+// Prototypes //
+// //
+//////////////////////////////////////////////////////////////////////////
+
+// DSBind takes two optional input parameters which identify whether the
+// caller found a domain controller themselves via DsGetDcName or whether
+// a domain controller should be found using default parameters.
+// Behavior of the possible combinations are outlined below.
+//
+// DomainControllerName(value), DnsDomainName(NULL)
+//
+// The value for DomainControllerName is assumed to have been
+// obtained via DsGetDcName (i.e. Field with the same name in a
+// DOMAIN_CONTROLLER_INFO struct on return from DsGetDcName call.)
+// The client is bound to the domain controller at this name.
+//
+// Mutual authentication will be performed using an SPN of
+// LDAP/DomainControllerName provided DomainControllerName
+// is not a NETBIOS name or IP address - i.e. it must be a
+// DNS host name.
+//
+// DomainControllerName(value), DnsDomainName(value)
+//
+// DsBind will connect to the server identified by DomainControllerName.
+//
+// Mutual authentication will be performed using an SPN of
+// LDAP/DomainControllerName/DnsDomainName provided neither value
+// is a NETBIOS names or IP address - i.e. they must be
+// valid DNS names.
+//
+// DomainControllerName(NULL), DnsDomainName(NULL)
+//
+// DsBind will attempt to find to a global catalog and fail if one
+// can not be found.
+//
+// Mutual authentication will be performed using an SPN of
+// GC/DnsHostName/ForestName where DnsHostName and ForestName
+// represent the DomainControllerName and DnsForestName fields
+// respectively of the DOMAIN_CONTROLLER_INFO returned by the
+// DsGetDcName call used to find a global catalog.
+//
+// DomainControllerName(NULL), DnsDomainName(value)
+//
+// DsBind will attempt to find a domain controller for the domain
+// identified by DnsDomainName and fail if one can not be found.
+//
+// Mutual authentication will be performed using an SPN of
+// LDAP/DnsHostName/DnsDomainName where DnsDomainName is that
+// provided by the caller and DnsHostName is that returned by
+// DsGetDcName for the domain specified - provided DnsDomainName
+// is a valid DNS domain name - i.e. not a NETBIOS domain name.
+
+function DsBindA(DomainControllerName: LPCSTR; DnsDomainName: LPCSTR;
+ var phDS: HANDLE): DWORD; stdcall;
+{$EXTERNALSYM DsBindA}
+function DsBindW(DomainControllerName: LPCWSTR; DnsDomainName: LPCWSTR;
+ var phDS: HANDLE): DWORD; stdcall;
+{$EXTERNALSYM DsBindW}
+function DsBind(DomainControllerName: LPCTSTR; DnsDomainName: LPCTSTR;
+ var phDS: HANDLE): DWORD; stdcall;
+{$EXTERNALSYM DsBind}
+
+function DsBindWithCredA(DomainControllerName: LPCSTR; DnsDomainName: LPCSTR;
+ AuthIdentity: RPC_AUTH_IDENTITY_HANDLE; var phDS: HANDLE): DWORD; stdcall;
+{$EXTERNALSYM DsBindWithCredA}
+function DsBindWithCredW(DomainControllerName: LPCWSTR; DnsDomainName: LPCWSTR;
+ AuthIdentity: RPC_AUTH_IDENTITY_HANDLE; var phDS: HANDLE): DWORD; stdcall;
+{$EXTERNALSYM DsBindWithCredW}
+function DsBindWithCred(DomainControllerName: LPCTSTR; DnsDomainName: LPCTSTR;
+ AuthIdentity: RPC_AUTH_IDENTITY_HANDLE; var phDS: HANDLE): DWORD; stdcall;
+{$EXTERNALSYM DsBindWithCred}
+
+//
+// DsBindWithSpn{A|W} allows the caller to specify the service principal
+// name (SPN) which will be used for mutual authentication against
+// the destination server. Do not provide an SPN if you are expecting
+// DsBind to find a server for you as SPNs are machine specific and its
+// unlikely the SPN you provide matches the server DsBind finds for you.
+// Providing a NULL ServicePrincipalName argument results in behavior
+// identical to DsBindWithCred{A|W}.
+//
+
+function DsBindWithSpnA(DomainControllerName: LPCSTR; DnsDomainName: LPCSTR;
+ AuthIdentity: RPC_AUTH_IDENTITY_HANDLE; ServicePrincipalName: LPCSTR;
+ var phDS: HANDLE): DWORD; stdcall;
+{$EXTERNALSYM DsBindWithSpnA}
+function DsBindWithSpnW(DomainControllerName: LPCWSTR; DnsDomainName: LPCWSTR;
+ AuthIdentity: RPC_AUTH_IDENTITY_HANDLE; ServicePrincipalName: LPCWSTR;
+ var phDS: HANDLE): DWORD; stdcall;
+{$EXTERNALSYM DsBindWithSpnW}
+function DsBindWithSpn(DomainControllerName: LPCTSTR; DnsDomainName: LPCTSTR;
+ AuthIdentity: RPC_AUTH_IDENTITY_HANDLE; ServicePrincipalName: LPCTSTR;
+ var phDS: HANDLE): DWORD; stdcall;
+{$EXTERNALSYM DsBindWithSpn}
+
+//
+// DsBindWithSpnEx{A|W} allows you all the options of the previous
+// DsBindWithSpn(), plus the added benefit of specifying some optional
+// Binding flags. Currently if you pass NTDSAPI_BIND_ALLOW_DELEGATION,
+// you will get the exact old behaviour. If you can avoid it, you
+// should not specify this flag, see flag above for details.
+//
+
+function DsBindWithSpnExW(DomainControllerName, DnsDomainName: LPCWSTR; AuthIdentity: RPC_AUTH_IDENTITY_HANDLE;
+ ServicePrincipalName: LPCWSTR; BindFlags: DWORD; phDS: LPHANDLE): DWORD; stdcall;
+{$EXTERNALSYM DsBindWithSpnExW}
+function DsBindWithSpnExA(DomainControllerName, DnsDomainName: LPCSTR; AuthIdentity: RPC_AUTH_IDENTITY_HANDLE;
+ ServicePrincipalName: LPCSTR; BindFlags: DWORD; phDS: LPHANDLE): DWORD; stdcall;
+{$EXTERNALSYM DsBindWithSpnExA}
+function DsBindWithSpnEx(DomainControllerName, DnsDomainName: LPCTSTR; AuthIdentity: RPC_AUTH_IDENTITY_HANDLE;
+ ServicePrincipalName: LPCTSTR; BindFlags: DWORD; phDS: LPHANDLE): DWORD; stdcall;
+{$EXTERNALSYM DsBindWithSpnEx}
+
+//
+// DsBindToISTG{A|W} allows the caller to bind to the server which
+// holds the Inter-Site Topology Generator role in the specified site.
+// The site name should be the RDN of a site. If no site is specified,
+// the function will try to bind to the ISTG in a nearby site.
+//
+
+function DsBindToISTGW(SiteName: LPCWSTR; phDS: LPHANDLE): DWORD; stdcall;
+{$EXTERNALSYM DsBindToISTGW}
+function DsBindToISTGA(SiteName: LPCSTR; phDS: LPHANDLE): DWORD; stdcall;
+{$EXTERNALSYM DsBindToISTGA}
+function DsBindToISTG(SiteName: LPCTSTR; phDS: LPHANDLE): DWORD; stdcall;
+{$EXTERNALSYM DsBindToISTG}
+
+//
+// DsBindingSetTimeout allows the caller to specify a timeout value
+// which will be honored by all RPC calls using the specified binding
+// handle. RPC calls which take longer the timeout value are canceled.
+//
+
+function DsBindingSetTimeout(hDS: HANDLE; cTimeoutSecs: ULONG): DWORD; stdcall;
+{$EXTERNALSYM DsBindingSetTimeout}
+
+//
+// DsUnBind
+//
+
+function DsUnBindA(var phDS: HANDLE): DWORD; stdcall;
+{$EXTERNALSYM DsUnBindA}
+function DsUnBindW(var phDS: HANDLE): DWORD; stdcall;
+{$EXTERNALSYM DsUnBindW}
+function DsUnBind(var phDS: HANDLE): DWORD; stdcall;
+{$EXTERNALSYM DsUnBind}
+
+//
+// DsMakePasswordCredentials
+//
+// This function constructs a credential structure which is suitable for input
+// to the DsBindWithCredentials function, or the ldap_open function(winldap.h)
+// The credential must be freed using DsFreeCredential.
+//
+// None of the input parameters may be present indicating a null, default
+// credential. Otherwise the username must be present. If the domain or
+// password are null, they default to empty strings. The domain name may be
+// null when the username is fully qualified, for example UPN format.
+//
+
+function DsMakePasswordCredentialsA(User: LPCSTR; Domain: LPCSTR;
+ Password: LPCSTR; var pAuthIdentity: RPC_AUTH_IDENTITY_HANDLE): DWORD; stdcall;
+{$EXTERNALSYM DsMakePasswordCredentialsA}
+function DsMakePasswordCredentialsW(User: LPCWSTR; Domain: LPCWSTR;
+ Password: LPCWSTR; var pAuthIdentity: RPC_AUTH_IDENTITY_HANDLE): DWORD; stdcall;
+{$EXTERNALSYM DsMakePasswordCredentialsW}
+function DsMakePasswordCredentials(User: LPCTSTR; Domain: LPCTSTR;
+ Password: LPCTSTR; var pAuthIdentity: RPC_AUTH_IDENTITY_HANDLE): DWORD; stdcall;
+{$EXTERNALSYM DsMakePasswordCredentials}
+
+procedure DsFreePasswordCredentialsA(AuthIdentity: RPC_AUTH_IDENTITY_HANDLE); stdcall;
+{$EXTERNALSYM DsFreePasswordCredentialsA}
+procedure DsFreePasswordCredentialsW(AuthIdentity: RPC_AUTH_IDENTITY_HANDLE); stdcall;
+{$EXTERNALSYM DsFreePasswordCredentialsW}
+procedure DsFreePasswordCredentials(AuthIdentity: RPC_AUTH_IDENTITY_HANDLE); stdcall;
+{$EXTERNALSYM DsFreePasswordCredentials}
+
+//
+// DsCrackNames
+//
+
+function DsCrackNamesA(hDS: HANDLE; flags: DS_NAME_FLAGS;
+ formatOffered: DS_NAME_FORMAT; formatDesired: DS_NAME_FORMAT; cNames: DWORD;
+ rpNames: LPCSTR; var ppResult: PDS_NAME_RESULTA): DWORD; stdcall;
+{$EXTERNALSYM DsCrackNamesA}
+function DsCrackNamesW(hDS: HANDLE; flags: DS_NAME_FLAGS;
+ formatOffered: DS_NAME_FORMAT; formatDesired: DS_NAME_FORMAT; cNames: DWORD;
+ rpNames: LPCWSTR; var ppResult: PDS_NAME_RESULTW): DWORD; stdcall;
+{$EXTERNALSYM DsCrackNamesW}
+function DsCrackNames(hDS: HANDLE; flags: DS_NAME_FLAGS;
+ formatOffered: DS_NAME_FORMAT; formatDesired: DS_NAME_FORMAT; cNames: DWORD;
+ rpNames: LPCTSTR; var ppResult: PDS_NAME_RESULT): DWORD; stdcall;
+{$EXTERNALSYM DsCrackNames}
+
+//
+// DsFreeNameResult
+//
+
+procedure DsFreeNameResultA(pResult: PDS_NAME_RESULTA); stdcall;
+{$EXTERNALSYM DsFreeNameResultA}
+procedure DsFreeNameResultW(pResult: PDS_NAME_RESULTW); stdcall;
+{$EXTERNALSYM DsFreeNameResultW}
+procedure DsFreeNameResult(pResult: PDS_NAME_RESULT); stdcall;
+{$EXTERNALSYM DsFreeNameResult}
+
+// ==========================================================
+// DSMakeSpn -- client call to create SPN for a service to which it wants to
+// authenticate.
+// This name is then passed to "pszTargetName" of InitializeSecurityContext().
+//
+// Notes:
+// If the service name is a DNS host name, or canonical DNS service name
+// e.g. "www.ms.com", i.e., caller resolved with gethostbyname, then instance
+// name should be NULL.
+// Realm is host name minus first component, unless it is in the exception list
+//
+// If the service name is NetBIOS machine name, then instance name should be
+// NULL
+// Form must be <domain>\<machine>
+// Realm will be <domain>
+//
+// If the service name is that of a replicated service, where each replica has
+// its own account (e.g., with SRV records) then the caller must supply the
+// instance name then realm name is same as ServiceName
+//
+// If the service name is a DN, then must also supply instance name
+// (DN could be name of service object (incl RPC or Winsock), name of machine
+// account, name of domain object)
+// then realm name is domain part of the DN
+//
+// If the service name is NetBIOS domain name, then must also supply instance
+// name; realm name is domain name
+//
+// If the service is named by an IP address -- then use referring service name
+// as service name
+//
+// ServiceClass - e.g. "http", "ftp", "ldap", GUID
+// ServiceName - DNS or DN; assumes we can compute domain from service name
+// InstanceName OPTIONAL- DNS name of host for instance of service
+// InstancePort - port number for instance (0 if default)
+// Referrer OPTIONAL- DNS name of host that gave this referral
+// pcSpnLength - in -- max length IN CHARACTERS of principal name;
+// out -- actual
+// Length includes terminator
+// pszSPN - server principal name
+//
+// If buffer is not large enough, ERROR_BUFFER_OVERFLOW is returned and the
+// needed length is returned in pcSpnLength.
+//
+//
+
+function DsMakeSpnA(ServiceClass: LPCSTR; ServiceName: LPCSTR;
+ InstanceName: LPCSTR; InstancePort: USHORT; Referrer: LPCSTR;
+ var pcSpnLength: DWORD; pszSpn: LPSTR): DWORD; stdcall;
+{$EXTERNALSYM DsMakeSpnA}
+function DsMakeSpnW(ServiceClass: LPCWSTR; ServiceName: LPCWSTR;
+ InstanceName: LPCWSTR; InstancePort: USHORT; Referrer: LPCWSTR;
+ var pcSpnLength: DWORD; pszSpn: LPWSTR): DWORD; stdcall;
+{$EXTERNALSYM DsMakeSpnW}
+function DsMakeSpn(ServiceClass: LPCTSTR; ServiceName: LPCTSTR;
+ InstanceName: LPCTSTR; InstancePort: USHORT; Referrer: LPCTSTR;
+ var pcSpnLength: DWORD; pszSpn: LPTSTR): DWORD; stdcall;
+{$EXTERNALSYM DsMakeSpn}
+
+// ==========================================================
+// DsGetSPN -- server's call to gets SPNs for a service name by which it is
+// known to clients. N.B.: there may be more than one name by which clients
+// know it the SPNs are then passed to DsAddAccountSpn to register them in
+// the DS
+//
+// IN SpnNameType eType,
+// IN LPCTSTR ServiceClass,
+// kind of service -- "http", "ldap", "ftp", etc.
+// IN LPCTSTR ServiceName OPTIONAL,
+// name of service -- DN or DNS; not needed for host-based
+// IN USHORT InstancePort,
+// port number (0 => default) for instances
+// IN USHORT cInstanceNames,
+// count of extra instance names and ports (0=>use gethostbyname)
+// IN LPCTSTR InstanceNames[] OPTIONAL,
+// extra instance names (not used for host names)
+// IN USHORT InstancePorts[] OPTIONAL,
+// extra instance ports (0 => default)
+// IN OUT PULONG pcSpn, // count of SPNs
+// IN OUT LPTSTR * prpszSPN[]
+// a bunch of SPNs for this service; free with DsFreeSpnArray
+
+function DsGetSpnA(ServiceType: DS_SPN_NAME_TYPE; ServiceClass: LPCSTR;
+ ServiceName: LPCSTR; InstancePort: USHORT; cInstanceNames: USHORT;
+ pInstanceNames: LPCSTR; pInstancePorts: PUSHORT; var pcSpn: DWORD;
+ var prpszSpn: LPSTR): DWORD; stdcall;
+{$EXTERNALSYM DsGetSpnA}
+function DsGetSpnW(ServiceType: DS_SPN_NAME_TYPE; ServiceClass: LPCWSTR;
+ ServiceName: LPCWSTR; InstancePort: USHORT; cInstanceNames: USHORT;
+ pInstanceNames: LPCWSTR; pInstancePorts: PUSHORT; var pcSpn: DWORD;
+ var prpszSpn: LPWSTR): DWORD; stdcall;
+{$EXTERNALSYM DsGetSpnW}
+function DsGetSpn(ServiceType: DS_SPN_NAME_TYPE; ServiceClass: LPCTSTR;
+ ServiceName: LPCTSTR; InstancePort: USHORT; cInstanceNames: USHORT;
+ pInstanceNames: LPCTSTR; pInstancePorts: PUSHORT; var pcSpn: DWORD;
+ var prpszSpn: LPTSTR): DWORD; stdcall;
+{$EXTERNALSYM DsGetSpn}
+
+// ==========================================================
+// DsFreeSpnArray() -- Free array returned by DsGetSpn{A,W}
+
+procedure DsFreeSpnArrayA(cSpn: DWORD; rpszSpn: LPSTR); stdcall;
+{$EXTERNALSYM DsFreeSpnArrayA}
+procedure DsFreeSpnArrayW(cSpn: DWORD; rpszSpn: LPWSTR); stdcall;
+{$EXTERNALSYM DsFreeSpnArrayW}
+procedure DsFreeSpnArray(cSpn: DWORD; rpszSpn: LPTSTR); stdcall;
+{$EXTERNALSYM DsFreeSpnArray}
+
+// ==========================================================
+// DsCrackSpn() -- parse an SPN into the ServiceClass,
+// ServiceName, and InstanceName (and InstancePort) pieces.
+// An SPN is passed in, along with a pointer to the maximum length
+// for each piece and a pointer to a buffer where each piece should go.
+// On exit, the maximum lengths are updated to the actual length for each piece
+// and the buffer contain the appropriate piece. The InstancePort is 0 if not
+// present.
+//
+// DWORD DsCrackSpn(
+// IN LPTSTR pszSPN, // the SPN to parse
+// IN OUT PUSHORT pcServiceClass, // input -- max length of ServiceClass;
+// output -- actual length
+// OUT LPCTSTR ServiceClass, // the ServiceClass part of the SPN
+// IN OUT PUSHORT pcServiceName, // input -- max length of ServiceName;
+// output -- actual length
+// OUT LPCTSTR ServiceName, // the ServiceName part of the SPN
+// IN OUT PUSHORT pcInstance, // input -- max length of ServiceClass;
+// output -- actual length
+// OUT LPCTSTR InstanceName, // the InstanceName part of the SPN
+// OUT PUSHORT InstancePort // instance port
+//
+// Note: lengths are in characters; all string lengths include terminators
+// All arguments except pszSpn are optional.
+//
+
+function DsCrackSpnA(pszSpn: LPCSTR; pcServiceClass: LPDWORD; ServiceClass: LPSTR;
+ pcServiceName: LPDWORD; ServiceName: LPSTR; pcInstanceName: LPDWORD;
+ InstanceName: LPSTR; pInstancePort: PUSHORT): DWORD; stdcall;
+{$EXTERNALSYM DsCrackSpnA}
+function DsCrackSpnW(pszSpn: LPCWSTR; pcServiceClass: LPDWORD; ServiceClass: LPWSTR;
+ pcServiceName: LPDWORD; ServiceName: LPWSTR; pcInstanceName: LPDWORD;
+ InstanceName: LPWSTR; pInstancePort: PUSHORT): DWORD; stdcall;
+{$EXTERNALSYM DsCrackSpnW}
+function DsCrackSpn(pszSpn: LPCTSTR; pcServiceClass: LPDWORD; ServiceClass: LPTSTR;
+ pcServiceName: LPDWORD; ServiceName: LPTSTR; pcInstanceName: LPDWORD;
+ InstanceName: LPTSTR; pInstancePort: PUSHORT): DWORD; stdcall;
+{$EXTERNALSYM DsCrackSpn}
+
+// ==========================================================
+// DsWriteAccountSpn -- set or add SPNs for an account object
+// Usually done by service itself, or perhaps by an admin.
+//
+// This call is RPC'd to the DC where the account object is stored, so it can
+// securely enforce policy on what SPNs are allowed on the account. Direct LDAP
+// writes to the SPN property are not allowed -- all writes must come through
+// this RPC call. (Reads via // LDAP are OK.)
+//
+// The account object can be a machine accout, or a service (user) account.
+//
+// If called by the service to register itself, it can most easily get
+// the names by calling DsGetSpn with each of the names that
+// clients can use to find the service.
+//
+// IN SpnWriteOp eOp, // set, add
+// IN LPCTSTR pszAccount, // DN of account to which to add SPN
+// IN int cSPN, // count of SPNs to add to account
+// IN LPCTSTR rpszSPN[] // SPNs to add to altSecID property
+
+function DsWriteAccountSpnA(hDS: HANDLE; Operation: DS_SPN_WRITE_OP;
+ pszAccount: LPCSTR; cSpn: DWORD; rpszSpn: LPCSTR): DWORD; stdcall;
+{$EXTERNALSYM DsWriteAccountSpnA}
+function DsWriteAccountSpnW(hDS: HANDLE; Operation: DS_SPN_WRITE_OP;
+ pszAccount: LPCWSTR; cSpn: DWORD; rpszSpn: LPCWSTR): DWORD; stdcall;
+{$EXTERNALSYM DsWriteAccountSpnW}
+function DsWriteAccountSpn(hDS: HANDLE; Operation: DS_SPN_WRITE_OP;
+ pszAccount: LPCTSTR; cSpn: DWORD; rpszSpn: LPCTSTR): DWORD; stdcall;
+{$EXTERNALSYM DsWriteAccountSpn}
+
+{++
+
+Routine Description:
+
+Constructs a Service Principal Name suitable to identify the desired server.
+The service class and part of a dns hostname must be supplied.
+
+This routine is a simplified wrapper to DsMakeSpn.
+The ServiceName is made canonical by resolving through DNS.
+Guid-based dns names are not supported.
+
+NOTE:
+This routine is no longer recommended for use. In order to be secure, an SPN
+should be constructed purely on the client without reliance on other services,
+such as DNS, which may be spoofed.
+
+The simplified SPN constructed looks like this:
+
+ServiceClass / ServiceName / ServiceName
+
+The instance name portion (2nd position) is always defaulted. The port and
+referrer fields are not used.
+
+Arguments:
+
+ ServiceClass - Class of service, defined by the service, can be any
+ string unique to the service
+
+ ServiceName - dns hostname, fully qualified or not
+ Stringized IP address is also resolved if necessary
+
+ pcSpnLength - IN, maximum length of buffer, in chars
+ OUT, space utilized, in chars, including terminator
+
+ pszSpn - Buffer, atleast of length *pcSpnLength
+
+Return Value:
+
+ WINAPI - Win32 error code
+
+--}
+
+function DsClientMakeSpnForTargetServerA(ServiceClass: LPCSTR; ServiceName: LPCSTR;
+ var pcSpnLength: DWORD; pszSpn: LPSTR): DWORD; stdcall;
+{$EXTERNALSYM DsClientMakeSpnForTargetServerA}
+function DsClientMakeSpnForTargetServerW(ServiceClass: LPCWSTR; ServiceName: LPCWSTR;
+ var pcSpnLength: DWORD; pszSpn: LPWSTR): DWORD; stdcall;
+{$EXTERNALSYM DsClientMakeSpnForTargetServerW}
+function DsClientMakeSpnForTargetServer(ServiceClass: LPCTSTR; ServiceName: LPCTSTR;
+ var pcSpnLength: DWORD; pszSpn: LPTSTR): DWORD; stdcall;
+{$EXTERNALSYM DsClientMakeSpnForTargetServer}
+
+{++
+outine Description:
+
+Register Service Principal Names for a server application.
+
+This routine does the following:
+1. Enumerates a list of server SPNs using DsGetSpn and the provided class
+2. Determines the domain of the current user context
+3. Determines the DN of the current user context if not supplied
+4. Locates a domain controller
+5. Binds to the domain controller
+6. Uses DsWriteAccountSpn to write the SPNs on the named object DN
+7. Unbinds
+
+Construct server SPNs for this service, and write them to the right object.
+
+If the userObjectDn is specified, the SPN is written to that object.
+
+Otherwise the Dn is defaulted, to the user object, then computer.
+
+Now, bind to the DS, and register the name on the object for the
+user this service is running as. So, if we're running as local
+system, we'll register it on the computer object itself. If we're
+running as a domain user, we'll add the SPN to the user's object.
+
+Arguments:
+
+ Operation - What should be done with the values: add, replace or delete
+ ServiceClass - Unique string identifying service
+ UserObjectDN - Optional, dn of object to write SPN to
+
+Return Value:
+
+ WINAPI - Win32 error code
+
+--}
+
+function DsServerRegisterSpnA(Operation: DS_SPN_WRITE_OP; ServiceClass: LPCSTR;
+ UserObjectDN: LPCSTR): DWORD; stdcall;
+{$EXTERNALSYM DsServerRegisterSpnA}
+function DsServerRegisterSpnW(Operation: DS_SPN_WRITE_OP; ServiceClass: LPCWSTR;
+ UserObjectDN: LPCWSTR): DWORD; stdcall;
+{$EXTERNALSYM DsServerRegisterSpnW}
+function DsServerRegisterSpn(Operation: DS_SPN_WRITE_OP; ServiceClass: LPCTSTR;
+ UserObjectDN: LPCTSTR): DWORD; stdcall;
+{$EXTERNALSYM DsServerRegisterSpn}
+
+// DsReplicaSync. The server that this call is executing on is called the
+// destination. The destination's naming context will be brought up to date
+// with respect to a source system. The source system is identified by the
+// uuid. The uuid is that of the source system's "NTDS Settings" object.
+// The destination system must already be configured such that the source
+// system is one of the systems from which it recieves replication data
+// ("replication from"). This is usually done automatically by the KCC.
+//
+// PARAMETERS:
+// pNC (DSNAME *)
+// Name of the NC to synchronize.
+// puuidSourceDRA (SZ)
+// objectGuid of DSA with which to synchronize the replica.
+// ulOptions (ULONG)
+// Bitwise OR of zero or more flags
+// RETURNS: WIN32 STATUS
+
+function DsReplicaSyncA(hDS: HANDLE; NameContext: LPCSTR; pUuidDsaSrc: LPUUID;
+ Options: ULONG): DWORD; stdcall;
+{$EXTERNALSYM DsReplicaSyncA}
+function DsReplicaSyncW(hDS: HANDLE; NameContext: LPCWSTR; pUuidDsaSrc: LPUUID;
+ Options: ULONG): DWORD; stdcall;
+{$EXTERNALSYM DsReplicaSyncW}
+function DsReplicaSync(hDS: HANDLE; NameContext: LPCTSTR; pUuidDsaSrc: LPUUID;
+ Options: ULONG): DWORD; stdcall;
+{$EXTERNALSYM DsReplicaSync}
+
+// DsReplicaAdd
+//
+{
+Description:
+ This call is executed on the destination. It causes the destination to
+ add a "replication from" reference to the indicated source system.
+
+The source server is identified by string name, not uuid as with Sync.
+The DsaSrcAddress parameter is the transport specific address of the source
+DSA, usually its guid-based dns name. The guid in the guid-based dns name is
+the object-guid of that server's ntds-dsa (settings) object.
+
+Arguments:
+
+ pNC (IN) - NC for which to add the replica.
+
+ pSourceDsaDN (IN) - DN of the source DSA's ntdsDsa object. Required if
+ ulOptions includes DS_REPADD_ASYNCHRONOUS_REPLICA; ignored otherwise.
+
+ pTransportDN (IN) - DN of the interSiteTransport object representing the
+ transport by which to communicate with the source server. Required if
+ ulOptions includes INTERSITE_MESSAGING; ignored otherwise.
+
+ pszSourceDsaAddress (IN) - Transport-specific address of the source DSA.
+
+ pSchedule (IN) - Schedule by which to replicate the NC from this
+ source in the future.
+
+ ulOptions (IN) - flags
+ RETURNS: WIN32 STATUS
+}
+
+function DsReplicaAddA(hDS: HANDLE; NameContext: LPCSTR; SourceDsaDn: LPCSTR;
+ TransportDn: LPCSTR; SourceDsaAddress: LPCSTR; pSchedule: PSCHEDULE;
+ Options: DWORD): DWORD; stdcall;
+{$EXTERNALSYM DsReplicaAddA}
+function DsReplicaAddW(hDS: HANDLE; NameContext: LPCWSTR; SourceDsaDn: LPCWSTR;
+ TransportDn: LPCWSTR; SourceDsaAddress: LPCWSTR; pSchedule: PSCHEDULE;
+ Options: DWORD): DWORD; stdcall;
+{$EXTERNALSYM DsReplicaAddW}
+function DsReplicaAdd(hDS: HANDLE; NameContext: LPCTSTR; SourceDsaDn: LPCTSTR;
+ TransportDn: LPCTSTR; SourceDsaAddress: LPCTSTR; pSchedule: PSCHEDULE;
+ Options: DWORD): DWORD; stdcall;
+{$EXTERNALSYM DsReplicaAdd}
+
+// DsReplicaDel
+//
+// The server that this call is executing on is the destination. The call
+// causes the destination to remove a "replication from" reference to the
+// indicated source server.
+// The source server is identified by string name, not uuid as with Sync.
+// The DsaSrc parameter is the transport specific address of the source DSA,
+// usually its guid-based dns name. The guid in the guid-based dns name is
+// the object-guid of that server's ntds-dsa (settings) object.
+// If you remove an NC from a given destination and specify the "no source"
+// flag, then the entire replica will be removed from the DC.
+//
+// PARAMETERS:
+// pNC (DSNAME *)
+// Name of the NC for which to delete a source.
+// pszSourceDRA (SZ)
+// DSA for which to delete the source.
+// ulOptions (ULONG)
+// Bitwise OR of zero or more flags
+//
+//
+// RETURNS: WIN32 STATUS
+
+function DsReplicaDelA(hDS: HANDLE; NameContext: LPCSTR; DsaSrc: LPCSTR;
+ Options: ULONG): DWORD; stdcall;
+{$EXTERNALSYM DsReplicaDelA}
+function DsReplicaDelW(hDS: HANDLE; NameContext: LPCWSTR; DsaSrc: LPCWSTR;
+ Options: ULONG): DWORD; stdcall;
+{$EXTERNALSYM DsReplicaDelW}
+function DsReplicaDel(hDS: HANDLE; NameContext: LPCTSTR; DsaSrc: LPCTSTR;
+ Options: ULONG): DWORD; stdcall;
+{$EXTERNALSYM DsReplicaDel}
+
+// DsReplicaModify
+//
+//
+// Modify a source for a given naming context
+//
+// The value must already exist.
+//
+// Either the UUID or the address may be used to identify the current value.
+// If a UUID is specified, the UUID will be used for comparison. Otherwise,
+// the address will be used for comparison.
+//
+// PARAMETERS:
+// pNC (DSNAME *)
+// Name of the NC for which the Reps-From should be modified.
+// puuidSourceDRA (UUID *)
+// Guid of the DSA object for the source server. May be NULL if:
+// . ulModifyFields does not include DS_REPMOD_UPDATE_ADDRESS and
+// . pmtxSourceDRA is non-NULL.
+// puuidTransportObj (UUID *)
+// objectGuid of the transport by which replication is to be performed
+// Ignored if ulModifyFields does not include
+// DS_REPMOD_UPDATE_TRANSPORT.
+// pszSourceDRA (SZ)
+// DSA for which the reference should be added or deleted. Ignored if
+// puuidSourceDRA is non-NULL and ulModifyFields does not include
+// DS_REPMOD_UPDATE_ADDRESS.
+// prtSchedule (REPLTIMES *)
+// Periodic replication schedule for this replica. Ignored if
+// ulModifyFields does not include DS_REPMOD_UPDATE_SCHEDULE.
+// ulReplicaFlags (ULONG)
+// Flags to set for this replica. Ignored if ulModifyFields does not
+// include DS_REPMOD_UPDATE_FLAGS.
+// ulModifyFields (ULONG)
+// Fields to update. One or more of the following bit flags:
+// UPDATE_ADDRESS
+// Update the MTX_ADDR associated with the referenced server.
+// UPDATE_SCHEDULE
+// Update the periodic replication schedule associated with
+// the replica.
+// UPDATE_FLAGS
+// Update the flags associated with the replica.
+// UPDATE_TRANSPORT
+// Update the transport associated with the replica.
+// ulOptions (ULONG)
+// Bitwise OR of zero or more of the following:
+// DS_REPMOD_ASYNCHRONOUS_OPERATION
+// Perform this operation asynchronously.
+// RETURNS: WIN32 STATUS
+
+function DsReplicaModifyA(hDS: HANDLE; NameContext: LPCSTR; pUuidSourceDsa: LPUUID;
+ TransportDn: LPCSTR; SourceDsaAddress: LPCSTR; pSchedule: PSCHEDULE;
+ ReplicaFlags: DWORD; ModifyFields: DWORD; Options: DWORD): DWORD; stdcall;
+{$EXTERNALSYM DsReplicaModifyA}
+function DsReplicaModifyW(hDS: HANDLE; NameContext: LPCWSTR; pUuidSourceDsa: LPUUID;
+ TransportDn: LPCWSTR; SourceDsaAddress: LPCWSTR; pSchedule: PSCHEDULE;
+ ReplicaFlags: DWORD; ModifyFields: DWORD; Options: DWORD): DWORD; stdcall;
+{$EXTERNALSYM DsReplicaModifyW}
+function DsReplicaModify(hDS: HANDLE; NameContext: LPCTSTR; pUuidSourceDsa: LPUUID;
+ TransportDn: LPCTSTR; SourceDsaAddress: LPCTSTR; pSchedule: PSCHEDULE;
+ ReplicaFlags: DWORD; ModifyFields: DWORD; Options: DWORD): DWORD; stdcall;
+{$EXTERNALSYM DsReplicaModify}
+
+// DsReplicaUpdateRefs
+//
+// In this case, the RPC is being executed on the "source" of destination-sourc
+// replication relationship. This function tells the source that it no longer
+// supplies replication information to the indicated destination system.
+// Add or remove a target server from the Reps-To property on the given NC.
+// Add/remove a reference given the DSNAME of the corresponding NTDS-DSA
+// object.
+//
+// PARAMETERS:
+// pNC (DSNAME *)
+// Name of the NC for which the Reps-To should be modified.
+// DsaDest (SZ)
+// Network address of DSA for which the reference should be added
+// or deleted.
+// pUuidDsaDest (UUID *)
+// objectGuid of the DSA object for which the reference should be
+// added or deleted.
+// ulOptions (ULONG)
+// Bitwise OR of zero or more of the following:
+// DS_REPUPD_ASYNC_OP
+// Perform this operation asynchronously.
+// DS_REPUPD_ADD_REFERENCE
+// Add the given server to the Reps-To property.
+// DS_REPUPD_DEL_REFERENCE
+// Remove the given server from the Reps-To property.
+// Note that ADD_REF and DEL_REF may be paired to perform
+// "add or update".
+//
+// RETURNS: WIN32 STATUS
+
+function DsReplicaUpdateRefsA(hDS: HANDLE; NameContext: LPCSTR; DsaDest: LPCSTR;
+ pUuidDsaDest: LPUUID; Options: ULONG): DWORD; stdcall;
+{$EXTERNALSYM DsReplicaUpdateRefsA}
+function DsReplicaUpdateRefsW(hDS: HANDLE; NameContext: LPCWSTR; DsaDest: LPCWSTR;
+ pUuidDsaDest: LPUUID; Options: ULONG): DWORD; stdcall;
+{$EXTERNALSYM DsReplicaUpdateRefsW}
+function DsReplicaUpdateRefs(hDS: HANDLE; NameContext: LPCTSTR; DsaDest: LPCTSTR;
+ pUuidDsaDest: LPUUID; Options: ULONG): DWORD; stdcall;
+{$EXTERNALSYM DsReplicaUpdateRefs}
+
+// Friends of DsReplicaSyncAll
+
+type
+ DS_REPSYNCALL_ERROR = (
+ DS_REPSYNCALL_WIN32_ERROR_CONTACTING_SERVER,
+ DS_REPSYNCALL_WIN32_ERROR_REPLICATING,
+ DS_REPSYNCALL_SERVER_UNREACHABLE);
+ {$EXTERNALSYM DS_REPSYNCALL_ERROR}
+ TDsReSynCallError = DS_REPSYNCALL_ERROR;
+
+ DS_REPSYNCALL_EVENT = (
+ DS_REPSYNCALL_EVENT_ERROR,
+ DS_REPSYNCALL_EVENT_SYNC_STARTED,
+ DS_REPSYNCALL_EVENT_SYNC_COMPLETED,
+ DS_REPSYNCALL_EVENT_FINISHED);
+ {$EXTERNALSYM DS_REPSYNCALL_EVENT}
+ TDsReSynCallEvent = DS_REPSYNCALL_EVENT;
+
+// Friends of DsReplicaSyncAll
+
+ PDS_REPSYNCALL_SYNCA = ^DS_REPSYNCALL_SYNCA;
+ {$EXTERNALSYM PDS_REPSYNCALL_SYNCA}
+ DS_REPSYNCALL_SYNCA = record
+ pszSrcId: LPSTR;
+ pszDstId: LPSTR;
+ pszNC: LPSTR;
+ pguidSrc: LPGUID;
+ pguidDst: LPGUID;
+ end;
+ {$EXTERNALSYM DS_REPSYNCALL_SYNCA}
+ TDsRepsyncallSyncA = DS_REPSYNCALL_SYNCA;
+ PDsRepsyncallSyncA = PDS_REPSYNCALL_SYNCA;
+
+ PDS_REPSYNCALL_SYNCW = ^DS_REPSYNCALL_SYNCW;
+ {$EXTERNALSYM PDS_REPSYNCALL_SYNCW}
+ DS_REPSYNCALL_SYNCW = record
+ pszSrcId: LPWSTR;
+ pszDstId: LPWSTR;
+ pszNC: LPWSTR;
+ pguidSrc: LPGUID;
+ pguidDst: LPGUID;
+ end;
+ {$EXTERNALSYM DS_REPSYNCALL_SYNCW}
+ TDsRepsyncallSyncW = DS_REPSYNCALL_SYNCW;
+ PDsRepsyncallSyncW = PDS_REPSYNCALL_SYNCW;
+
+ PDS_REPSYNCALL_ERRINFOA = ^DS_REPSYNCALL_ERRINFOA;
+ {$EXTERNALSYM PDS_REPSYNCALL_ERRINFOA}
+ DS_REPSYNCALL_ERRINFOA = record
+ pszSvrId: LPSTR;
+ error: DS_REPSYNCALL_ERROR;
+ dwWin32Err: DWORD;
+ pszSrcId: LPSTR;
+ end;
+ {$EXTERNALSYM DS_REPSYNCALL_ERRINFOA}
+ PPDS_REPSYNCALL_ERRINFOA = ^PDS_REPSYNCALL_ERRINFOA;
+ {$NODEFINE PPDS_REPSYNCALL_ERRINFOA}
+ TDsRepSynCallErrInfoA = DS_REPSYNCALL_ERRINFOA;
+ PDsRepSynCallErrInfoA = PDS_REPSYNCALL_ERRINFOA;
+
+ PDS_REPSYNCALL_ERRINFOW = ^DS_REPSYNCALL_ERRINFOW;
+ {$EXTERNALSYM PDS_REPSYNCALL_ERRINFOW}
+ DS_REPSYNCALL_ERRINFOW = record
+ pszSvrId: LPWSTR;
+ error: DS_REPSYNCALL_ERROR;
+ dwWin32Err: DWORD;
+ pszSrcId: LPWSTR;
+ end;
+ {$EXTERNALSYM DS_REPSYNCALL_ERRINFOW}
+ PPDS_REPSYNCALL_ERRINFOW = ^PDS_REPSYNCALL_ERRINFOW;
+ {$NODEFINE PPDS_REPSYNCALL_ERRINFOW}
+ TDsRepSynCallErrInfoW = DS_REPSYNCALL_ERRINFOW;
+ PDsRepSynCallErrInfoW = PDS_REPSYNCALL_ERRINFOW;
+
+ PDS_REPSYNCALL_UPDATEA = ^DS_REPSYNCALL_UPDATEA;
+ {$EXTERNALSYM PDS_REPSYNCALL_UPDATEA}
+ DS_REPSYNCALL_UPDATEA = record
+ event: DS_REPSYNCALL_EVENT;
+ pErrInfo: PDS_REPSYNCALL_ERRINFOA;
+ pSync: PDS_REPSYNCALL_SYNCA;
+ end;
+ {$EXTERNALSYM DS_REPSYNCALL_UPDATEA}
+ TDsRepSynCallUpdateA = DS_REPSYNCALL_UPDATEA;
+ PDsRepSynCallUpdateA = PDS_REPSYNCALL_UPDATEA;
+
+ PDS_REPSYNCALL_UPDATEW = ^DS_REPSYNCALL_UPDATEW;
+ {$EXTERNALSYM PDS_REPSYNCALL_UPDATEW}
+ DS_REPSYNCALL_UPDATEW = record
+ event: DS_REPSYNCALL_EVENT;
+ pErrInfo: PDS_REPSYNCALL_ERRINFOW;
+ pSync: PDS_REPSYNCALL_SYNCW;
+ end;
+ {$EXTERNALSYM DS_REPSYNCALL_UPDATEW}
+ TDsRepSynCallUpdateW = DS_REPSYNCALL_UPDATEW;
+ PDsRepSynCallUpdateW = PDS_REPSYNCALL_UPDATEW;
+
+ {$IFDEF UNICODE}
+ DS_REPSYNCALL_SYNC = DS_REPSYNCALL_SYNCW;
+ {$EXTERNALSYM DS_REPSYNCALL_SYNC}
+ DS_REPSYNCALL_ERRINFO = DS_REPSYNCALL_ERRINFOW;
+ {$EXTERNALSYM DS_REPSYNCALL_ERRINFO}
+ PPDS_REPSYNCALL_ERRINFO = PPDS_REPSYNCALL_ERRINFOW;
+ {$NODEFINE PPDS_REPSYNCALL_ERRINFO}
+ DS_REPSYNCALL_UPDATE = DS_REPSYNCALL_UPDATEW;
+ {$EXTERNALSYM DS_REPSYNCALL_UPDATE}
+ PDS_REPSYNCALL_SYNC = PDS_REPSYNCALL_SYNCW;
+ {$EXTERNALSYM PDS_REPSYNCALL_SYNC}
+ PDS_REPSYNCALL_ERRINFO = PDS_REPSYNCALL_ERRINFOW;
+ {$EXTERNALSYM PDS_REPSYNCALL_ERRINFO}
+ PDS_REPSYNCALL_UPDATE = PDS_REPSYNCALL_UPDATEW;
+ {$EXTERNALSYM PDS_REPSYNCALL_UPDATE}
+ TDsRepSynCallSync = TDsRepSynCallSyncW;
+ PDsRepSynCallSync = PDsRepSynCallSyncW;
+ TDsRepSynCallErrInfo = TDsRepSynCallErrInfoW;
+ PDsRepSynCallErrInfo = PDsRepSynCallErrInfoW;
+ TDsRepSynCallUpdate = TDsRepSynCallUpdateW;
+ PDsRepSynCallUpdate = PDsRepSynCallUpdateW;
+ {$ELSE}
+ DS_REPSYNCALL_SYNC = DS_REPSYNCALL_SYNCA;
+ {$EXTERNALSYM DS_REPSYNCALL_SYNC}
+ DS_REPSYNCALL_ERRINFO = DS_REPSYNCALL_ERRINFOA;
+ {$EXTERNALSYM DS_REPSYNCALL_ERRINFO}
+ PPDS_REPSYNCALL_ERRINFO = PPDS_REPSYNCALL_ERRINFOA;
+ {$NODEFINE PPDS_REPSYNCALL_ERRINFO}
+ DS_REPSYNCALL_UPDATE = DS_REPSYNCALL_UPDATEA;
+ {$EXTERNALSYM DS_REPSYNCALL_UPDATE}
+ PDS_REPSYNCALL_SYNC = PDS_REPSYNCALL_SYNCA;
+ {$EXTERNALSYM PDS_REPSYNCALL_SYNC}
+ PDS_REPSYNCALL_ERRINFO = PDS_REPSYNCALL_ERRINFOA;
+ {$EXTERNALSYM PDS_REPSYNCALL_ERRINFO}
+ PDS_REPSYNCALL_UPDATE = PDS_REPSYNCALL_UPDATEA;
+ {$EXTERNALSYM PDS_REPSYNCALL_UPDATE}
+ TDsRepSynCallSync = TDsRepSynCallSyncA;
+ PDsRepSynCallSync = PDsRepSynCallSyncA;
+ TDsRepSynCallErrInfo = TDsRepSynCallErrInfoA;
+ PDsRepSynCallErrInfo = PDsRepSynCallErrInfoA;
+ TDsRepSynCallUpdate = TDsRepSynCallUpdateA;
+ PDsRepSynCallUpdate = PDsRepSynCallUpdateA;
+ {$ENDIF UNICODE}
+
+// **********************
+// Replica SyncAll flags
+// **********************
+
+const
+
+// This option has no effect.
+
+ DS_REPSYNCALL_NO_OPTIONS = $00000000;
+ {$EXTERNALSYM DS_REPSYNCALL_NO_OPTIONS}
+
+// Ordinarily, if a server cannot be contacted, DsReplicaSyncAll tries to
+// route around it and replicate from as many servers as possible. Enabling
+// this option will cause DsReplicaSyncAll to generate a fatal error if any
+// server cannot be contacted, or if any server is unreachable (due to a
+// disconnected or broken topology.)
+
+ DS_REPSYNCALL_ABORT_IF_SERVER_UNAVAILABLE = $00000001;
+ {$EXTERNALSYM DS_REPSYNCALL_ABORT_IF_SERVER_UNAVAILABLE}
+
+// This option disables transitive replication; syncs will only be performed
+// with adjacent servers and no DsBind calls will be made.
+
+ DS_REPSYNCALL_SYNC_ADJACENT_SERVERS_ONLY = $00000002;
+ {$EXTERNALSYM DS_REPSYNCALL_SYNC_ADJACENT_SERVERS_ONLY}
+
+// Ordinarily, when DsReplicaSyncAll encounters a non-fatal error, it returns
+// the GUID DNS of the relevant server(s). Enabling this option causes
+// DsReplicaSyncAll to return the servers' DNs instead.
+
+ DS_REPSYNCALL_ID_SERVERS_BY_DN = $00000004;
+ {$EXTERNALSYM DS_REPSYNCALL_ID_SERVERS_BY_DN}
+
+// This option disables all syncing. The topology will still be analyzed and
+// unavailable / unreachable servers will still be identified.
+
+ DS_REPSYNCALL_DO_NOT_SYNC = $00000008;
+ {$EXTERNALSYM DS_REPSYNCALL_DO_NOT_SYNC}
+
+// Ordinarily, DsReplicaSyncAll attempts to bind to all servers before
+// generating the topology. If a server cannot be contacted, DsReplicaSyncAll
+// excludes that server from the topology and tries to route around it. If
+// this option is enabled, checking will be bypassed and DsReplicaSyncAll will
+// assume all servers are responding. This will speed operation of
+// DsReplicaSyncAll, but if some servers are not responding, some transitive
+// replications may be blocked.
+
+ DS_REPSYNCALL_SKIP_INITIAL_CHECK = $00000010;
+ {$EXTERNALSYM DS_REPSYNCALL_SKIP_INITIAL_CHECK}
+
+// Push mode. Push changes from the home server out to all partners using
+// transitive replication. This reverses the direction of replication, and
+// the order of execution of the replication sets from the usual "pulling"
+// mode of execution.
+
+ DS_REPSYNCALL_PUSH_CHANGES_OUTWARD = $00000020;
+ {$EXTERNALSYM DS_REPSYNCALL_PUSH_CHANGES_OUTWARD}
+
+// Cross site boundaries. By default, the only servers that are considered are
+// those in the same site as the home system. With this option, all servers in
+// the enterprise, across all sites, are eligible. They must be connected by
+// a synchronous (RPC) transport, however.
+
+ DS_REPSYNCALL_CROSS_SITE_BOUNDARIES = $00000040;
+ {$EXTERNALSYM DS_REPSYNCALL_CROSS_SITE_BOUNDARIES}
+
+// DsReplicaSyncAll. Syncs the destination server with all other servers
+// in the site.
+//
+// PARAMETERS:
+// hDS (IN) - A DS connection bound to the destination server.
+// pszNameContext (IN) - The naming context to synchronize
+// ulFlags (IN) - Bitwise OR of zero or more flags
+// pFnCallBack (IN, OPTIONAL) - Callback function for message-passing.
+// pCallbackData (IN, OPTIONAL) - A pointer that will be passed to the
+// first argument of the callback function.
+// pErrors (OUT, OPTIONAL) - Pointer to a (PDS_REPSYNCALL_ERRINFO *)
+// object that will hold an array of error structures.
+
+type
+ TSynchUpdateProcA = function(pData: LPVOID; pUpdate: PDS_REPSYNCALL_UPDATEA): BOOL; stdcall;
+ TSynchUpdateProcW = function(pData: LPVOID; pUpdate: PDS_REPSYNCALL_UPDATEW): BOOL; stdcall;
+ {$IFDEF UNICODE}
+ TSynchUpdateProc = TSynchUpdateProcW;
+ {$ELSE}
+ TSynchUpdateProc = TSynchUpdateProcA;
+ {$ENDIF UNICODE}
+
+function DsReplicaSyncAllA(hDS: HANDLE; pszNameContext: LPCSTR; ulFlags: ULONG;
+ pfnCallBack: TSynchUpdateProcA; pCallbackData: LPVOID;
+ pErrors: PPDS_REPSYNCALL_ERRINFOA): DWORD; stdcall;
+{$EXTERNALSYM DsReplicaSyncAllA}
+function DsReplicaSyncAllW(hDS: HANDLE; pszNameContext: LPCWSTR; ulFlags: ULONG;
+ pfnCallBackW: TSynchUpdateProcW; pCallbackData: LPVOID;
+ pErrors: PPDS_REPSYNCALL_ERRINFOW): DWORD; stdcall;
+{$EXTERNALSYM DsReplicaSyncAllW}
+function DsReplicaSyncAll(hDS: HANDLE; pszNameContext: LPCTSTR; ulFlags: ULONG;
+ pfnCallBack: TSynchUpdateProc; pCallbackData: LPVOID;
+ pErrors: PPDS_REPSYNCALL_ERRINFO): DWORD; stdcall;
+{$EXTERNALSYM DsReplicaSyncAll}
+
+function DsRemoveDsServerA(hDs: HANDLE; ServerDN: LPSTR; DomainDN: LPSTR;
+ fLastDcInDomain: PBOOL; fCommit: BOOL): DWORD; stdcall;
+{$EXTERNALSYM DsRemoveDsServerA}
+function DsRemoveDsServerW(hDs: HANDLE; ServerDN: LPWSTR; DomainDN: LPWSTR;
+ fLastDcInDomain: PBOOL; fCommit: BOOL): DWORD; stdcall;
+{$EXTERNALSYM DsRemoveDsServerW}
+function DsRemoveDsServer(hDs: HANDLE; ServerDN: LPTSTR; DomainDN: LPTSTR;
+ fLastDcInDomain: PBOOL; fCommit: BOOL): DWORD; stdcall;
+{$EXTERNALSYM DsRemoveDsServer}
+
+function DsRemoveDsDomainA(hDs: HANDLE; DomainDN: LPSTR): DWORD; stdcall;
+{$EXTERNALSYM DsRemoveDsDomainA}
+function DsRemoveDsDomainW(hDs: HANDLE; DomainDN: LPWSTR): DWORD; stdcall;
+{$EXTERNALSYM DsRemoveDsDomainW}
+function DsRemoveDsDomain(hDs: HANDLE; DomainDN: LPTSTR): DWORD; stdcall;
+{$EXTERNALSYM DsRemoveDsDomain}
+
+function DsListSitesA(hDs: HANDLE; var ppSites: PDS_NAME_RESULTA): DWORD; stdcall;
+{$EXTERNALSYM DsListSitesA}
+function DsListSitesW(hDs: HANDLE; var ppSites: PDS_NAME_RESULTW): DWORD; stdcall;
+{$EXTERNALSYM DsListSitesW}
+function DsListSites(hDs: HANDLE; var ppSites: PDS_NAME_RESULT): DWORD; stdcall;
+{$EXTERNALSYM DsListSites}
+
+function DsListServersInSiteA(hDs: HANDLE; site: LPCSTR;
+ var ppServers: PDS_NAME_RESULTA): DWORD; stdcall;
+{$EXTERNALSYM DsListServersInSiteA}
+function DsListServersInSiteW(hDs: HANDLE; site: LPCWSTR;
+ var ppServers: PDS_NAME_RESULTW): DWORD; stdcall;
+{$EXTERNALSYM DsListServersInSiteW}
+function DsListServersInSite(hDs: HANDLE; site: LPCTSTR;
+ var ppServers: PDS_NAME_RESULT): DWORD; stdcall;
+{$EXTERNALSYM DsListServersInSite}
+
+function DsListDomainsInSiteA(hDs: HANDLE; site: LPCSTR;
+ var ppDomains: PDS_NAME_RESULTA): DWORD; stdcall;
+{$EXTERNALSYM DsListDomainsInSiteA}
+function DsListDomainsInSiteW(hDs: HANDLE; site: LPCWSTR;
+ var ppDomains: PDS_NAME_RESULTW): DWORD; stdcall;
+{$EXTERNALSYM DsListDomainsInSiteW}
+function DsListDomainsInSite(hDs: HANDLE; site: LPCTSTR;
+ var ppDomains: PDS_NAME_RESULT): DWORD; stdcall;
+{$EXTERNALSYM DsListDomainsInSite}
+
+function DsListServersForDomainInSiteA(hDs: HANDLE; domain: LPCSTR; site: LPCSTR;
+ var ppServers: PDS_NAME_RESULTA): DWORD; stdcall;
+{$EXTERNALSYM DsListServersForDomainInSiteA}
+function DsListServersForDomainInSiteW(hDs: HANDLE; domain: LPCWSTR; site: LPCWSTR;
+ var ppServers: PDS_NAME_RESULTW): DWORD; stdcall;
+{$EXTERNALSYM DsListServersForDomainInSiteW}
+function DsListServersForDomainInSite(hDs: HANDLE; domain: LPCTSTR; site: LPCTSTR;
+ var ppServers: PDS_NAME_RESULT): DWORD; stdcall;
+{$EXTERNALSYM DsListServersForDomainInSite}
+
+// Define indices for DsListInfoForServer return data. Check status
+// for each field as a given value may not be present.
+
+const
+ DS_LIST_DSA_OBJECT_FOR_SERVER = 0;
+ {$EXTERNALSYM DS_LIST_DSA_OBJECT_FOR_SERVER}
+ DS_LIST_DNS_HOST_NAME_FOR_SERVER = 1;
+ {$EXTERNALSYM DS_LIST_DNS_HOST_NAME_FOR_SERVER}
+ DS_LIST_ACCOUNT_OBJECT_FOR_SERVER = 2;
+ {$EXTERNALSYM DS_LIST_ACCOUNT_OBJECT_FOR_SERVER}
+
+function DsListInfoForServerA(hDs: HANDLE; server: LPCSTR;
+ var ppInfo: PDS_NAME_RESULTA): DWORD; stdcall;
+{$EXTERNALSYM DsListInfoForServerA}
+function DsListInfoForServerW(hDs: HANDLE; server: LPCWSTR;
+ var ppInfo: PDS_NAME_RESULTW): DWORD; stdcall;
+{$EXTERNALSYM DsListInfoForServerW}
+function DsListInfoForServer(hDs: HANDLE; server: LPCTSTR;
+ var ppInfo: PDS_NAME_RESULT): DWORD; stdcall;
+{$EXTERNALSYM DsListInfoForServer}
+
+// Define indices for DsListRoles return data. Check status for
+// each field as a given value may not be present.
+
+const
+ DS_ROLE_SCHEMA_OWNER = 0;
+ {$EXTERNALSYM DS_ROLE_SCHEMA_OWNER}
+ DS_ROLE_DOMAIN_OWNER = 1;
+ {$EXTERNALSYM DS_ROLE_DOMAIN_OWNER}
+ DS_ROLE_PDC_OWNER = 2;
+ {$EXTERNALSYM DS_ROLE_PDC_OWNER}
+ DS_ROLE_RID_OWNER = 3;
+ {$EXTERNALSYM DS_ROLE_RID_OWNER}
+ DS_ROLE_INFRASTRUCTURE_OWNER = 4;
+ {$EXTERNALSYM DS_ROLE_INFRASTRUCTURE_OWNER}
+
+function DsListRolesA(hDs: HANDLE; var ppRoles: PDS_NAME_RESULTA): DWORD; stdcall;
+{$EXTERNALSYM DsListRolesA}
+function DsListRolesW(hDs: HANDLE; var ppRoles: PDS_NAME_RESULTW): DWORD; stdcall;
+{$EXTERNALSYM DsListRolesW}
+function DsListRoles(hDs: HANDLE; var ppRoles: PDS_NAME_RESULT): DWORD; stdcall;
+{$EXTERNALSYM DsListRoles}
+
+//
+// DsQuerySitesByCost{A|W} allows the caller to determine the
+// communication cost between the From Site and each of the sites
+// in the list of To Sites. The costs are returned in the rgSiteInfo
+// structure which must be freed with DsQuerySitesFree.
+//
+// The Site Names should all be passed as RDNs. For example, if the
+// site's DN is "CN=Foo,CN=Sites,CN=Configuration,...", the RDN is
+// simply "Foo".
+//
+
+type
+ DS_SITE_COST_INFO = record
+ errorCode: DWORD;
+ cost: DWORD;
+ end;
+ {$EXTERNALSYM DS_SITE_COST_INFO}
+ PDS_SITE_COST_INFO = ^DS_SITE_COST_INFO;
+ {$EXTERNALSYM PDS_SITE_COST_INFO}
+ TDsSiteCostInfo = DS_SITE_COST_INFO;
+ PDsSiteCostInfo = PDS_SITE_COST_INFO;
+
+function DsQuerySitesByCostW(hDS: HANDLE; pwszFromSite: LPWSTR; out rgwszToSites: LPWSTR; cToSites, dwFlags: DWORD;
+ out prgSiteInfo: PDS_SITE_COST_INFO): DWORD; stdcall;
+{$EXTERNALSYM DsQuerySitesByCostW}
+function DsQuerySitesByCostA(hDS: HANDLE; pwszFromSite: LPSTR; out rgwszToSites: LPSTR; cToSites, dwFlags: DWORD;
+ out prgSiteInfo: PDS_SITE_COST_INFO): DWORD; stdcall;
+{$EXTERNALSYM DsQuerySitesByCostA}
+function DsQuerySitesByCost(hDS: HANDLE; pwszFromSite: LPTSTR; out rgwszToSites: LPTSTR; cToSites, dwFlags: DWORD;
+ out prgSiteInfo: PDS_SITE_COST_INFO): DWORD; stdcall;
+{$EXTERNALSYM DsQuerySitesByCost}
+
+//
+// DsQuerySitesByCost will free the site info array returned
+// from DsQuerySitesByCost{A|W}.
+//
+
+procedure DsQuerySitesFree(rgSiteInfo: PDS_SITE_COST_INFO); stdcall;
+{$EXTERNALSYM DsQuerySitesFree}
+
+// Definitions required for DsMapSchemaGuid routines.
+
+const
+ DS_SCHEMA_GUID_NOT_FOUND = 0;
+ {$EXTERNALSYM DS_SCHEMA_GUID_NOT_FOUND}
+ DS_SCHEMA_GUID_ATTR = 1;
+ {$EXTERNALSYM DS_SCHEMA_GUID_ATTR}
+ DS_SCHEMA_GUID_ATTR_SET = 2;
+ {$EXTERNALSYM DS_SCHEMA_GUID_ATTR_SET}
+ DS_SCHEMA_GUID_CLASS = 3;
+ {$EXTERNALSYM DS_SCHEMA_GUID_CLASS}
+ DS_SCHEMA_GUID_CONTROL_RIGHT = 4;
+ {$EXTERNALSYM DS_SCHEMA_GUID_CONTROL_RIGHT}
+
+type
+ PDS_SCHEMA_GUID_MAPA = ^DS_SCHEMA_GUID_MAPA;
+ {$EXTERNALSYM PDS_SCHEMA_GUID_MAPA}
+ DS_SCHEMA_GUID_MAPA = record
+ guid: GUID; // mapped GUID
+ guidType: DWORD; // DS_SCHEMA_GUID_* value
+ pName: LPSTR; // might be NULL
+ end;
+ {$EXTERNALSYM DS_SCHEMA_GUID_MAPA}
+ TDsSchemaGuidMapA = DS_SCHEMA_GUID_MAPA;
+ PDsSchemaGuidMapA = PDS_SCHEMA_GUID_MAPA;
+
+ PDS_SCHEMA_GUID_MAPW = ^DS_SCHEMA_GUID_MAPW;
+ {$EXTERNALSYM PDS_SCHEMA_GUID_MAPW}
+ DS_SCHEMA_GUID_MAPW = record
+ guid: GUID; // mapped GUID
+ guidType: DWORD; // DS_SCHEMA_GUID_* value
+ pName: LPWSTR; // might be NULL
+ end;
+ {$EXTERNALSYM DS_SCHEMA_GUID_MAPW}
+ TDsSchemaGuidMapW = DS_SCHEMA_GUID_MAPW;
+ PDsSchemaGuidMapW = PDS_SCHEMA_GUID_MAPW;
+ {$IFDEF UNICODE}
+ TDsSchemaGuidMap = DS_SCHEMA_GUID_MAPW;
+ PDsSchemaGuidMap = PDS_SCHEMA_GUID_MAPW;
+ DS_SCHEMA_GUID_MAP = DS_SCHEMA_GUID_MAPW;
+ PDS_SCHEMA_GUID_MAP = PDS_SCHEMA_GUID_MAPW;
+ {$ELSE}
+ TDsSchemaGuidMap = DS_SCHEMA_GUID_MAPW;
+ PDsSchemaGuidMap = PDS_SCHEMA_GUID_MAPW;
+ DS_SCHEMA_GUID_MAP = DS_SCHEMA_GUID_MAPA;
+ PDS_SCHEMA_GUID_MAP = PDS_SCHEMA_GUID_MAPA;
+ {$ENDIF UNICODE}
+
+function DsMapSchemaGuidsA(hDs: HANDLE; cGuids: DWORD; rGuids: PGUID;
+ var ppGuidMap: PDS_SCHEMA_GUID_MAPA): DWORD; stdcall;
+{$EXTERNALSYM DsMapSchemaGuidsA}
+function DsMapSchemaGuidsW(hDs: HANDLE; cGuids: DWORD; rGuids: PGUID;
+ var ppGuidMap: PDS_SCHEMA_GUID_MAPW): DWORD; stdcall;
+{$EXTERNALSYM DsMapSchemaGuidsW}
+function DsMapSchemaGuids(hDs: HANDLE; cGuids: DWORD; rGuids: PGUID;
+ var ppGuidMap: PDS_SCHEMA_GUID_MAP): DWORD; stdcall;
+{$EXTERNALSYM DsMapSchemaGuids}
+
+procedure DsFreeSchemaGuidMapA(pGuidMap: PDS_SCHEMA_GUID_MAPA); stdcall;
+{$EXTERNALSYM DsFreeSchemaGuidMapA}
+procedure DsFreeSchemaGuidMapW(pGuidMap: PDS_SCHEMA_GUID_MAPW); stdcall;
+{$EXTERNALSYM DsFreeSchemaGuidMapW}
+procedure DsFreeSchemaGuidMap(pGuidMap: PDS_SCHEMA_GUID_MAP); stdcall;
+{$EXTERNALSYM DsFreeSchemaGuidMap}
+
+type
+ PDS_DOMAIN_CONTROLLER_INFO_1A = ^DS_DOMAIN_CONTROLLER_INFO_1A;
+ {$EXTERNALSYM PDS_DOMAIN_CONTROLLER_INFO_1A}
+ DS_DOMAIN_CONTROLLER_INFO_1A = record
+ NetbiosName: LPSTR; // might be NULL
+ DnsHostName: LPSTR; // might be NULL
+ SiteName: LPSTR; // might be NULL
+ ComputerObjectName: LPSTR; // might be NULL
+ ServerObjectName: LPSTR; // might be NULL
+ fIsPdc: BOOL;
+ fDsEnabled: BOOL;
+ end;
+ {$EXTERNALSYM DS_DOMAIN_CONTROLLER_INFO_1A}
+ TDsDomainControllerInfo1A = DS_DOMAIN_CONTROLLER_INFO_1A;
+ PDsDomainControllerInfo1A = PDS_DOMAIN_CONTROLLER_INFO_1A;
+
+ PDS_DOMAIN_CONTROLLER_INFO_1W = ^DS_DOMAIN_CONTROLLER_INFO_1W;
+ {$EXTERNALSYM PDS_DOMAIN_CONTROLLER_INFO_1W}
+ DS_DOMAIN_CONTROLLER_INFO_1W = record
+ NetbiosName: LPWSTR; // might be NULL
+ DnsHostName: LPWSTR; // might be NULL
+ SiteName: LPWSTR; // might be NULL
+ ComputerObjectName: LPWSTR; // might be NULL
+ ServerObjectName: LPWSTR; // might be NULL
+ fIsPdc: BOOL;
+ fDsEnabled: BOOL;
+ end;
+ {$EXTERNALSYM DS_DOMAIN_CONTROLLER_INFO_1W}
+ TDsDomainControllerInfo1W = DS_DOMAIN_CONTROLLER_INFO_1W;
+ PDsDomainControllerInfo1W = PDS_DOMAIN_CONTROLLER_INFO_1W;
+
+ PDS_DOMAIN_CONTROLLER_INFO_2A = ^DS_DOMAIN_CONTROLLER_INFO_2A;
+ {$EXTERNALSYM PDS_DOMAIN_CONTROLLER_INFO_2A}
+ DS_DOMAIN_CONTROLLER_INFO_2A = record
+ NetbiosName: LPSTR; // might be NULL
+ DnsHostName: LPSTR; // might be NULL
+ SiteName: LPSTR; // might be NULL
+ SiteObjectName: LPSTR; // might be NULL
+ ComputerObjectName: LPSTR; // might be NULL
+ ServerObjectName: LPSTR; // might be NULL
+ NtdsDsaObjectName: LPSTR; // might be NULL
+ fIsPdc: BOOL;
+ fDsEnabled: BOOL;
+ fIsGc: BOOL;
+ // Valid iff SiteObjectName non-NULL.
+ SiteObjectGuid: GUID;
+ // Valid iff ComputerObjectName non-NULL.
+ ComputerObjectGuid: GUID;
+ // Valid iff ServerObjectName non-NULL;
+ ServerObjectGuid: GUID;
+ // Valid iff fDsEnabled is TRUE.
+ NtdsDsaObjectGuid: GUID;
+ end;
+ {$EXTERNALSYM DS_DOMAIN_CONTROLLER_INFO_2A}
+ TDsDomainControllerInfo2A = DS_DOMAIN_CONTROLLER_INFO_2A;
+ PDsDomainControllerInfo2A = PDS_DOMAIN_CONTROLLER_INFO_2A;
+
+ PDS_DOMAIN_CONTROLLER_INFO_2W = ^DS_DOMAIN_CONTROLLER_INFO_2W;
+ {$EXTERNALSYM PDS_DOMAIN_CONTROLLER_INFO_2W}
+ DS_DOMAIN_CONTROLLER_INFO_2W = record
+ NetbiosName: LPWSTR; // might be NULL
+ DnsHostName: LPWSTR; // might be NULL
+ SiteName: LPWSTR; // might be NULL
+ SiteObjectName: LPWSTR; // might be NULL
+ ComputerObjectName: LPWSTR; // might be NULL
+ ServerObjectName: LPWSTR; // might be NULL
+ NtdsDsaObjectName: LPWSTR; // might be NULL
+ fIsPdc: BOOL;
+ fDsEnabled: BOOL;
+ fIsGc: BOOL;
+ // Valid iff SiteObjectName non-NULL.
+ SiteObjectGuid: GUID;
+ // Valid iff ComputerObjectName non-NULL.
+ ComputerObjectGuid: GUID;
+ // Valid iff ServerObjectName non-NULL;
+ ServerObjectGuid: GUID;
+ // Valid iff fDsEnabled is TRUE.
+ NtdsDsaObjectGuid: GUID;
+ end;
+ {$EXTERNALSYM DS_DOMAIN_CONTROLLER_INFO_2W}
+ TDsDomainControllerInfo2W = DS_DOMAIN_CONTROLLER_INFO_2W;
+ PDsDomainControllerInfo2W = PDS_DOMAIN_CONTROLLER_INFO_2W;
+
+ {$IFDEF UNICODE}
+ DS_DOMAIN_CONTROLLER_INFO_1 = DS_DOMAIN_CONTROLLER_INFO_1W;
+ {$EXTERNALSYM DS_DOMAIN_CONTROLLER_INFO_1}
+ DS_DOMAIN_CONTROLLER_INFO_2 = DS_DOMAIN_CONTROLLER_INFO_2W;
+ {$EXTERNALSYM DS_DOMAIN_CONTROLLER_INFO_2}
+ PDS_DOMAIN_CONTROLLER_INFO_1 = PDS_DOMAIN_CONTROLLER_INFO_1W;
+ {$EXTERNALSYM PDS_DOMAIN_CONTROLLER_INFO_1}
+ PDS_DOMAIN_CONTROLLER_INFO_2 = PDS_DOMAIN_CONTROLLER_INFO_2W;
+ {$EXTERNALSYM PDS_DOMAIN_CONTROLLER_INFO_2}
+ TDsDomainControllerInfo1 = TDsDomainControllerInfo1W;
+ PDsDomainControllerInfo1 = PDsDomainControllerInfo1W;
+ TDsDomainControllerInfo2 = TDsDomainControllerInfo2W;
+ PDsDomainControllerInfo2 = PDsDomainControllerInfo2W;
+ {$ELSE}
+ DS_DOMAIN_CONTROLLER_INFO_1 = DS_DOMAIN_CONTROLLER_INFO_1A;
+ {$EXTERNALSYM DS_DOMAIN_CONTROLLER_INFO_1}
+ DS_DOMAIN_CONTROLLER_INFO_2 = DS_DOMAIN_CONTROLLER_INFO_2A;
+ {$EXTERNALSYM DS_DOMAIN_CONTROLLER_INFO_2}
+ PDS_DOMAIN_CONTROLLER_INFO_1 = PDS_DOMAIN_CONTROLLER_INFO_1A;
+ {$EXTERNALSYM PDS_DOMAIN_CONTROLLER_INFO_1}
+ PDS_DOMAIN_CONTROLLER_INFO_2 = PDS_DOMAIN_CONTROLLER_INFO_2A;
+ {$EXTERNALSYM PDS_DOMAIN_CONTROLLER_INFO_2}
+ TDsDomainControllerInfo1 = TDsDomainControllerInfo1A;
+ PDsDomainControllerInfo1 = PDsDomainControllerInfo1A;
+ TDsDomainControllerInfo2 = TDsDomainControllerInfo2A;
+ PDsDomainControllerInfo2 = PDsDomainControllerInfo2A;
+ {$ENDIF UNICODE}
+
+// The following APIs strictly find domain controller account objects
+// in the DS and return information associated with them. As such, they
+// may return entries which correspond to domain controllers long since
+// decommissioned, etc. and there is no guarantee that there exists a
+// physical domain controller at all. Use DsGetDcName (dsgetdc.h) to find
+// live domain controllers for a domain.
+
+function DsGetDomainControllerInfoA(hDs: HANDLE; DomainName: LPCSTR;
+ InfoLevel: DWORD; var pcOut: DWORD; ppInfo: PPVOID): DWORD; stdcall;
+{$EXTERNALSYM DsGetDomainControllerInfoA}
+function DsGetDomainControllerInfoW(hDs: HANDLE; DomainName: LPCWSTR;
+ InfoLevel: DWORD; var pcOut: DWORD; ppInfo: PPVOID): DWORD; stdcall;
+{$EXTERNALSYM DsGetDomainControllerInfoW}
+function DsGetDomainControllerInfo(hDs: HANDLE; DomainName: LPCTSTR;
+ InfoLevel: DWORD; var pcOut: DWORD; ppInfo: PPVOID): DWORD; stdcall;
+{$EXTERNALSYM DsGetDomainControllerInfo}
+
+procedure DsFreeDomainControllerInfoA(InfoLevel: DWORD; cInfo: DWORD;
+ pInfo: PVOID); stdcall;
+{$EXTERNALSYM DsFreeDomainControllerInfoA}
+procedure DsFreeDomainControllerInfoW(InfoLevel: DWORD; cInfo: DWORD;
+ pInfo: PVOID); stdcall;
+{$EXTERNALSYM DsFreeDomainControllerInfoW}
+procedure DsFreeDomainControllerInfo(InfoLevel: DWORD; cInfo: DWORD;
+ pInfo: PVOID); stdcall;
+{$EXTERNALSYM DsFreeDomainControllerInfo}
+
+type
+ // Which task should be run?
+
+ DS_KCC_TASKID = (DS_KCC_TASKID_UPDATE_TOPOLOGY);
+ {$EXTERNALSYM DS_KCC_TASKID}
+ TDsKccTaskId = DS_KCC_TASKID;
+
+// Don't wait for completion of the task; queue it and return.
+
+const
+ DS_KCC_FLAG_ASYNC_OP = 1 shl 0;
+ {$EXTERNALSYM DS_KCC_FLAG_ASYNC_OP}
+
+// Don't enqueue the task if another queued task will run soon.
+
+ DS_KCC_FLAG_DAMPED = 1 shl 1;
+ {$EXTERNALSYM DS_KCC_FLAG_DAMPED}
+
+function DsReplicaConsistencyCheck(hDS: HANDLE; TaskID: DS_KCC_TASKID;
+ dwFlags: DWORD): DWORD; stdcall;
+{$EXTERNALSYM DsReplicaConsistencyCheck}
+
+function DsReplicaVerifyObjectsW(hDS: HANDLE; NameContext: LPCWSTR; const pUuidDsaSrc: UUID; ulOptions: ULONG): DWORD; stdcall;
+{$EXTERNALSYM DsReplicaVerifyObjectsW}
+function DsReplicaVerifyObjectsA(hDS: HANDLE; NameContext: LPCSTR; const pUuidDsaSrc: UUID; ulOptions: ULONG): DWORD; stdcall;
+{$EXTERNALSYM DsReplicaVerifyObjectsA}
+function DsReplicaVerifyObjects(hDS: HANDLE; NameContext: LPCTSTR; const pUuidDsaSrc: UUID; ulOptions: ULONG): DWORD; stdcall;
+{$EXTERNALSYM DsReplicaVerifyObjects}
+
+// Do not delete objects on DsReplicaVerifyObjects call
+
+const
+ DS_EXIST_ADVISORY_MODE = $1;
+ {$EXTERNALSYM DS_EXIST_ADVISORY_MODE}
+
+type
+ _DS_REPL_INFO_TYPE = (
+ DS_REPL_INFO_NEIGHBORS, // returns DS_REPL_NEIGHBORS *
+ DS_REPL_INFO_CURSORS_FOR_NC, // returns DS_REPL_CURSORS *
+ DS_REPL_INFO_METADATA_FOR_OBJ, // returns DS_REPL_OBJECT_META_DATA *
+ DS_REPL_INFO_KCC_DSA_CONNECT_FAILURES, // both return
+ DS_REPL_INFO_KCC_DSA_LINK_FAILURES, // DS_REPL_KCC_DSA_FAILURES *
+ DS_REPL_INFO_PENDING_OPS, // returns DS_REPL_PENDING_OPS *
+
+ ////////////////////////////////////////////////////////////////////////////
+ //
+ // The following info types are not supported by Windows 2000. Calling
+ // DsReplicaGetInfo() with one of the types on a Windows 2000 client or
+ // where hDS is bound to a Windows 2000 DC will fail with
+ // ERROR_NOT_SUPPORTED.
+ //
+
+ DS_REPL_INFO_METADATA_FOR_ATTR_VALUE, // returns DS_REPL_ATTR_VALUE_META_DATA *
+ DS_REPL_INFO_CURSORS_2_FOR_NC, // returns DS_REPL_CURSORS_2 *
+ DS_REPL_INFO_CURSORS_3_FOR_NC, // returns DS_REPL_CURSORS_3 *
+ DS_REPL_INFO_METADATA_2_FOR_OBJ, // returns DS_REPL_OBJECT_META_DATA_2 *
+ DS_REPL_INFO_METADATA_2_FOR_ATTR_VALUE, // returns DS_REPL_ATTR_VALUE_META_DATA_2 *
+
+ // <- insert new DS_REPL_INFO_* types here.
+
+ DS_REPL_INFO_TYPE_MAX);
+ {$EXTERNALSYM _DS_REPL_INFO_TYPE}
+ DS_REPL_INFO_TYPE = _DS_REPL_INFO_TYPE;
+ {$EXTERNALSYM DS_REPL_INFO_TYPE}
+ TDsReplInfoType = DS_REPL_INFO_TYPE;
+
+// Bit values for flags argument to DsReplicaGetInfo2
+
+const
+ DS_REPL_INFO_FLAG_IMPROVE_LINKED_ATTRS = $00000001;
+ {$EXTERNALSYM DS_REPL_INFO_FLAG_IMPROVE_LINKED_ATTRS}
+
+// Bit values for the dwReplicaFlags field of the DS_REPL_NEIGHBOR structure.
+
+// Bit values for the dwReplicaFlags field of the DS_REPL_NEIGHBOR structure.
+// Also used for the ulReplicaFlags argument to DsReplicaModify
+
+ DS_REPL_NBR_WRITEABLE = $00000010;
+ {$EXTERNALSYM DS_REPL_NBR_WRITEABLE}
+ DS_REPL_NBR_SYNC_ON_STARTUP = $00000020;
+ {$EXTERNALSYM DS_REPL_NBR_SYNC_ON_STARTUP}
+ DS_REPL_NBR_DO_SCHEDULED_SYNCS = $00000040;
+ {$EXTERNALSYM DS_REPL_NBR_DO_SCHEDULED_SYNCS}
+ DS_REPL_NBR_USE_ASYNC_INTERSITE_TRANSPORT = $00000080;
+ {$EXTERNALSYM DS_REPL_NBR_USE_ASYNC_INTERSITE_TRANSPORT}
+ DS_REPL_NBR_TWO_WAY_SYNC = $00000200;
+ {$EXTERNALSYM DS_REPL_NBR_TWO_WAY_SYNC}
+ DS_REPL_NBR_RETURN_OBJECT_PARENTS = $00000800;
+ {$EXTERNALSYM DS_REPL_NBR_RETURN_OBJECT_PARENTS}
+ DS_REPL_NBR_FULL_SYNC_IN_PROGRESS = $00010000;
+ {$EXTERNALSYM DS_REPL_NBR_FULL_SYNC_IN_PROGRESS}
+ DS_REPL_NBR_FULL_SYNC_NEXT_PACKET = $00020000;
+ {$EXTERNALSYM DS_REPL_NBR_FULL_SYNC_NEXT_PACKET}
+ DS_REPL_NBR_NEVER_SYNCED = $00200000;
+ {$EXTERNALSYM DS_REPL_NBR_NEVER_SYNCED}
+ DS_REPL_NBR_PREEMPTED = $01000000;
+ {$EXTERNALSYM DS_REPL_NBR_PREEMPTED}
+ DS_REPL_NBR_IGNORE_CHANGE_NOTIFICATIONS = $04000000;
+ {$EXTERNALSYM DS_REPL_NBR_IGNORE_CHANGE_NOTIFICATIONS}
+ DS_REPL_NBR_DISABLE_SCHEDULED_SYNC = $08000000;
+ {$EXTERNALSYM DS_REPL_NBR_DISABLE_SCHEDULED_SYNC}
+ DS_REPL_NBR_COMPRESS_CHANGES = $10000000;
+ {$EXTERNALSYM DS_REPL_NBR_COMPRESS_CHANGES}
+ DS_REPL_NBR_NO_CHANGE_NOTIFICATIONS = $20000000;
+ {$EXTERNALSYM DS_REPL_NBR_NO_CHANGE_NOTIFICATIONS}
+ DS_REPL_NBR_PARTIAL_ATTRIBUTE_SET = $40000000;
+ {$EXTERNALSYM DS_REPL_NBR_PARTIAL_ATTRIBUTE_SET}
+
+// This is the mask of replica flags that may be changed on the DsReplicaModify
+// call using the ulReplicaFlags parameter. The other flags are protected
+// system flags. The previous values of the system flags must be read in
+// advance and merged into the ulReplicaFlags parameter unchanged.
+
+ DS_REPL_NBR_MODIFIABLE_MASK =
+ DS_REPL_NBR_SYNC_ON_STARTUP or
+ DS_REPL_NBR_DO_SCHEDULED_SYNCS or
+ DS_REPL_NBR_TWO_WAY_SYNC or
+ DS_REPL_NBR_IGNORE_CHANGE_NOTIFICATIONS or
+ DS_REPL_NBR_DISABLE_SCHEDULED_SYNC or
+ DS_REPL_NBR_COMPRESS_CHANGES or
+ DS_REPL_NBR_NO_CHANGE_NOTIFICATIONS;
+ {$EXTERNALSYM DS_REPL_NBR_MODIFIABLE_MASK}
+
+type
+ _DS_REPL_NEIGHBORW = record
+ pszNamingContext: LPWSTR;
+ pszSourceDsaDN: LPWSTR;
+ pszSourceDsaAddress: LPWSTR;
+ pszAsyncIntersiteTransportDN: LPWSTR;
+ dwReplicaFlags: DWORD;
+ dwReserved: DWORD; // alignment
+ uuidNamingContextObjGuid: UUID;
+ uuidSourceDsaObjGuid: UUID;
+ uuidSourceDsaInvocationID: UUID;
+ uuidAsyncIntersiteTransportObjGuid: UUID;
+ usnLastObjChangeSynced: USN;
+ usnAttributeFilter: USN;
+ ftimeLastSyncSuccess: FILETIME;
+ ftimeLastSyncAttempt: FILETIME;
+ dwLastSyncResult: DWORD;
+ cNumConsecutiveSyncFailures: DWORD;
+ end;
+ {$EXTERNALSYM _DS_REPL_NEIGHBORW}
+ DS_REPL_NEIGHBORW = _DS_REPL_NEIGHBORW;
+ {$EXTERNALSYM DS_REPL_NEIGHBORW}
+ TDsReplNeighborW = DS_REPL_NEIGHBORW;
+ PDsReplNeighborW = ^DS_REPL_NEIGHBORW;
+
+// Fields can be added only to the end of this structure.
+
+ _DS_REPL_NEIGHBORW_BLOB = record
+ oszNamingContext: DWORD;
+ oszSourceDsaDN: DWORD;
+ oszSourceDsaAddress: DWORD;
+ oszAsyncIntersiteTransportDN: DWORD;
+ dwReplicaFlags: DWORD;
+ dwReserved: DWORD;
+
+ uuidNamingContextObjGuid: UUID;
+ uuidSourceDsaObjGuid: UUID;
+ uuidSourceDsaInvocationID: UUID;
+ uuidAsyncIntersiteTransportObjGuid: UUID;
+
+ usnLastObjChangeSynced: USN;
+ usnAttributeFilter: USN;
+
+ ftimeLastSyncSuccess: FILETIME;
+ ftimeLastSyncAttempt: FILETIME;
+
+ dwLastSyncResult: DWORD;
+ cNumConsecutiveSyncFailures: DWORD;
+ end;
+ {$EXTERNALSYM _DS_REPL_NEIGHBORW_BLOB}
+ DS_REPL_NEIGHBORW_BLOB = _DS_REPL_NEIGHBORW_BLOB;
+ {$EXTERNALSYM DS_REPL_NEIGHBORW_BLOB}
+ TDsReplNeighborwBlob = DS_REPL_NEIGHBORW_BLOB;
+ PDsReplNeighborwBlob = ^DS_REPL_NEIGHBORW_BLOB;
+
+ _DS_REPL_NEIGHBORSW = record
+ cNumNeighbors: DWORD;
+ dwReserved: DWORD; // alignment
+ rgNeighbor: array [0..0] of DS_REPL_NEIGHBORW;
+ end;
+ {$EXTERNALSYM _DS_REPL_NEIGHBORSW}
+ DS_REPL_NEIGHBORSW = _DS_REPL_NEIGHBORSW;
+ {$EXTERNALSYM DS_REPL_NEIGHBORSW}
+ TDsReplNeighborsW = DS_REPL_NEIGHBORSW;
+ PDsReplNeighborsW = ^DS_REPL_NEIGHBORSW;
+
+ _DS_REPL_CURSOR = record
+ uuidSourceDsaInvocationID: UUID;
+ usnAttributeFilter: USN;
+ end;
+ {$EXTERNALSYM _DS_REPL_CURSOR}
+ DS_REPL_CURSOR = _DS_REPL_CURSOR;
+ {$EXTERNALSYM DS_REPL_CURSOR}
+ TDsReplCursor = DS_REPL_CURSOR;
+ PDsReplCursor = ^DS_REPL_CURSOR;
+
+ _DS_REPL_CURSOR_2 = record
+ uuidSourceDsaInvocationID: UUID;
+ usnAttributeFilter: USN;
+ ftimeLastSyncSuccess: FILETIME;
+ end;
+ {$EXTERNALSYM _DS_REPL_CURSOR_2}
+ DS_REPL_CURSOR_2 = _DS_REPL_CURSOR_2;
+ {$EXTERNALSYM DS_REPL_CURSOR_2}
+ TDsReplCursor2 = DS_REPL_CURSOR_2;
+ PDsReplCursor2 = ^DS_REPL_CURSOR_2;
+
+ _DS_REPL_CURSOR_3W = record
+ uuidSourceDsaInvocationID: UUID;
+ usnAttributeFilter: USN;
+ ftimeLastSyncSuccess: FILETIME;
+ pszSourceDsaDN: LPWSTR;
+ end;
+ {$EXTERNALSYM _DS_REPL_CURSOR_3W}
+ DS_REPL_CURSOR_3W = _DS_REPL_CURSOR_3W;
+ {$EXTERNALSYM DS_REPL_CURSOR_3W}
+ TDsReplCursow3W = DS_REPL_CURSOR_3W;
+ PDsReplCursow3W = ^DS_REPL_CURSOR_3W;
+
+// Fields can be added only to the end of this structure.
+
+ _DS_REPL_CURSOR_BLOB = record
+ uuidSourceDsaInvocationID: UUID;
+ usnAttributeFilter: USN;
+ ftimeLastSyncSuccess: FILETIME;
+ oszSourceDsaDN: DWORD;
+ end;
+ {$EXTERNALSYM _DS_REPL_CURSOR_BLOB}
+ DS_REPL_CURSOR_BLOB = _DS_REPL_CURSOR_BLOB;
+ {$EXTERNALSYM DS_REPL_CURSOR_BLOB}
+ TDsReplCursorBlob = DS_REPL_CURSOR_BLOB;
+ PDsReplCursorBlob = ^DS_REPL_CURSOR_BLOB;
+
+ _DS_REPL_CURSORS = record
+ cNumCursors: DWORD;
+ dwReserved: DWORD; // alignment
+ rgCursor: array [0..0] of DS_REPL_CURSOR;
+ end;
+ {$EXTERNALSYM _DS_REPL_CURSORS}
+ DS_REPL_CURSORS = _DS_REPL_CURSORS;
+ {$EXTERNALSYM DS_REPL_CURSORS}
+ TDsReplCursors = DS_REPL_CURSORS;
+ PDsReplCursors = ^DS_REPL_CURSORS;
+
+ _DS_REPL_CURSORS_2 = record
+ cNumCursors: DWORD;
+ dwEnumerationContext: DWORD;
+ // keep this 8 byte aligned
+ rgCursor: array [0..0] of DS_REPL_CURSOR_2;
+ end;
+ {$EXTERNALSYM _DS_REPL_CURSORS_2}
+ DS_REPL_CURSORS_2 = _DS_REPL_CURSORS_2;
+ {$EXTERNALSYM DS_REPL_CURSORS_2}
+ TDsReplCursors2 = DS_REPL_CURSORS_2;
+ PDsReplCursors2 = ^DS_REPL_CURSORS_2;
+
+ _DS_REPL_CURSORS_3W = record
+ cNumCursors: DWORD;
+ dwEnumerationContext: DWORD;
+ // keep this 8 byte aligned
+ rgCursor: array [0..0] of DS_REPL_CURSOR_3W;
+ end;
+ {$EXTERNALSYM _DS_REPL_CURSORS_3W}
+ DS_REPL_CURSORS_3W = _DS_REPL_CURSORS_3W;
+ {$EXTERNALSYM DS_REPL_CURSORS_3W}
+ TDsReplCursors3W = DS_REPL_CURSORS_3W;
+ PDsReplCursors3W = ^DS_REPL_CURSORS_3W;
+
+ _DS_REPL_ATTR_META_DATA = record
+ pszAttributeName: LPWSTR;
+ dwVersion: DWORD;
+ ftimeLastOriginatingChange: FILETIME;
+ uuidLastOriginatingDsaInvocationID: UUID;
+ usnOriginatingChange: USN; // in the originating DSA's USN space
+ usnLocalChange: USN; // in the local DSA's USN space
+ end;
+ {$EXTERNALSYM _DS_REPL_ATTR_META_DATA}
+ DS_REPL_ATTR_META_DATA = _DS_REPL_ATTR_META_DATA;
+ {$EXTERNALSYM DS_REPL_ATTR_META_DATA}
+ TDsReplAttrMetaData = DS_REPL_ATTR_META_DATA;
+ PDsReplAttrMetaData = ^DS_REPL_ATTR_META_DATA;
+
+ _DS_REPL_ATTR_META_DATA_2 = record
+ pszAttributeName: LPWSTR;
+ dwVersion: DWORD;
+ ftimeLastOriginatingChange: FILETIME;
+ uuidLastOriginatingDsaInvocationID: UUID;
+ usnOriginatingChange: USN; // in the originating DSA's USN space
+ usnLocalChange: USN; // in the local DSA's USN space
+ pszLastOriginatingDsaDN: LPWSTR;
+ end;
+ {$EXTERNALSYM _DS_REPL_ATTR_META_DATA_2}
+ DS_REPL_ATTR_META_DATA_2 = _DS_REPL_ATTR_META_DATA_2;
+ {$EXTERNALSYM DS_REPL_ATTR_META_DATA_2}
+ TDsReplAttrMetaData2 = DS_REPL_ATTR_META_DATA_2;
+ PDsReplAttrMetaData2 = ^DS_REPL_ATTR_META_DATA_2;
+
+// Fields can be added only to the end of this structure.
+
+ _DS_REPL_ATTR_META_DATA_BLOB = record
+ oszAttributeName: DWORD;
+ dwVersion: DWORD;
+ ftimeLastOriginatingChange: FILETIME;
+ uuidLastOriginatingDsaInvocationID: UUID;
+ usnOriginatingChange: USN; // in the originating DSA's USN space
+ usnLocalChange: USN; // in the local DSA's USN space
+ oszLastOriginatingDsaDN: DWORD;
+ end;
+ {$EXTERNALSYM _DS_REPL_ATTR_META_DATA_BLOB}
+ DS_REPL_ATTR_META_DATA_BLOB = _DS_REPL_ATTR_META_DATA_BLOB;
+ {$EXTERNALSYM DS_REPL_ATTR_META_DATA_BLOB}
+ TDsReplAttrMetaDataBlob = DS_REPL_ATTR_META_DATA_BLOB;
+ PDsReplAttrMetaDataBlob = ^DS_REPL_ATTR_META_DATA_BLOB;
+
+ _DS_REPL_OBJ_META_DATA = record
+ cNumEntries: DWORD;
+ dwReserved: DWORD; // alignment
+ rgMetaData: array [0..0] of DS_REPL_ATTR_META_DATA;
+ end;
+ {$EXTERNALSYM _DS_REPL_OBJ_META_DATA}
+ DS_REPL_OBJ_META_DATA = _DS_REPL_OBJ_META_DATA;
+ {$EXTERNALSYM DS_REPL_OBJ_META_DATA}
+ TDsReplObjMetaData = DS_REPL_OBJ_META_DATA;
+ PDsReplObjMetaData = ^DS_REPL_OBJ_META_DATA;
+
+ _DS_REPL_OBJ_META_DATA_2 = record
+ cNumEntries: DWORD;
+ dwReserved: DWORD; // alignment
+ rgMetaData: array [0..0] of DS_REPL_ATTR_META_DATA_2;
+ end;
+ {$EXTERNALSYM _DS_REPL_OBJ_META_DATA_2}
+ DS_REPL_OBJ_META_DATA_2 = _DS_REPL_OBJ_META_DATA_2;
+ {$EXTERNALSYM DS_REPL_OBJ_META_DATA_2}
+ TDsReplObjMetaData2 = DS_REPL_OBJ_META_DATA_2;
+ PDsReplObjMetaData2 = ^DS_REPL_OBJ_META_DATA_2;
+
+ _DS_REPL_KCC_DSA_FAILUREW = record
+ pszDsaDN: LPWSTR;
+ uuidDsaObjGuid: UUID;
+ ftimeFirstFailure: FILETIME;
+ cNumFailures: DWORD;
+ dwLastResult: DWORD; // Win32 error code
+ end;
+ {$EXTERNALSYM _DS_REPL_KCC_DSA_FAILUREW}
+ DS_REPL_KCC_DSA_FAILUREW = _DS_REPL_KCC_DSA_FAILUREW;
+ {$EXTERNALSYM DS_REPL_KCC_DSA_FAILUREW}
+ TDsReplKccDsaFailureW = DS_REPL_KCC_DSA_FAILUREW;
+ PDsReplKccDsaFailureW = ^DS_REPL_KCC_DSA_FAILUREW;
+
+// Fields can be added only to the end of this structure.
+
+ _DS_REPL_KCC_DSA_FAILUREW_BLOB = record
+ oszDsaDN: DWORD;
+ uuidDsaObjGuid: UUID;
+ ftimeFirstFailure: FILETIME;
+ cNumFailures: DWORD;
+ dwLastResult: DWORD; // Win32 error code
+ end;
+ {$EXTERNALSYM _DS_REPL_KCC_DSA_FAILUREW_BLOB}
+ DS_REPL_KCC_DSA_FAILUREW_BLOB = _DS_REPL_KCC_DSA_FAILUREW_BLOB;
+ {$EXTERNALSYM DS_REPL_KCC_DSA_FAILUREW_BLOB}
+ TDsReplKccDsaFailureWBlob = DS_REPL_KCC_DSA_FAILUREW_BLOB;
+ PDsReplKccDsaFailureWBlob = ^DS_REPL_KCC_DSA_FAILUREW_BLOB;
+
+ _DS_REPL_KCC_DSA_FAILURESW = record
+ cNumEntries: DWORD;
+ dwReserved: DWORD; // alignment
+ rgDsaFailure: array [0..0] of DS_REPL_KCC_DSA_FAILUREW;
+ end;
+ {$EXTERNALSYM _DS_REPL_KCC_DSA_FAILURESW}
+ DS_REPL_KCC_DSA_FAILURESW = _DS_REPL_KCC_DSA_FAILURESW;
+ {$EXTERNALSYM DS_REPL_KCC_DSA_FAILURESW}
+ TDsReplKccDsaFailuresW = DS_REPL_KCC_DSA_FAILURESW;
+ PDsReplKccDsaFailuresW = ^DS_REPL_KCC_DSA_FAILURESW;
+
+ _DS_REPL_OP_TYPE = (
+ DS_REPL_OP_TYPE_SYNC,
+ DS_REPL_OP_TYPE_ADD,
+ DS_REPL_OP_TYPE_DELETE,
+ DS_REPL_OP_TYPE_MODIFY,
+ DS_REPL_OP_TYPE_UPDATE_REFS);
+ {$EXTERNALSYM _DS_REPL_OP_TYPE}
+ DS_REPL_OP_TYPE = _DS_REPL_OP_TYPE;
+ {$EXTERNALSYM DS_REPL_OP_TYPE}
+
+ _DS_REPL_OPW = record
+ ftimeEnqueued: FILETIME; // time at which the operation was enqueued
+ ulSerialNumber: ULONG; // ID of this sync; unique per machine per boot
+ ulPriority: ULONG; // > priority, > urgency
+ OpType: DS_REPL_OP_TYPE;
+ ulOptions: ULONG; // Zero or more bits specific to OpType; e.g.,
+ // DS_REPADD_* for DS_REPL_OP_TYPE_ADD,
+ // DS_REPSYNC_* for DS_REPL_OP_TYPE_SYNC, etc.
+ pszNamingContext: LPWSTR;
+ pszDsaDN: LPWSTR;
+ pszDsaAddress: LPWSTR;
+ uuidNamingContextObjGuid: UUID;
+ uuidDsaObjGuid: UUID;
+ end;
+ {$EXTERNALSYM _DS_REPL_OPW}
+ DS_REPL_OPW = _DS_REPL_OPW;
+ {$EXTERNALSYM DS_REPL_OPW}
+ TDsReplOpW = DS_REPL_OPW;
+ PDsReplOpW = ^DS_REPL_OPW;
+
+// Fields can be added only to the end of this structure.
+
+ _DS_REPL_OPW_BLOB = record
+ ftimeEnqueued: FILETIME; // time at which the operation was enqueued
+ ulSerialNumber: ULONG; // ID of this sync; unique per machine per boot
+ ulPriority: ULONG; // > priority, > urgency
+ OpType: DS_REPL_OP_TYPE;
+
+ ulOptions: ULONG; // Zero or more bits specific to OpType; e.g.,
+ // DS_REPADD_* for DS_REPL_OP_TYPE_ADD,
+ // DS_REPSYNC_* for DS_REPL_OP_TYPE_SYNC, etc.
+ oszNamingContext: DWORD;
+ oszDsaDN: DWORD;
+ oszDsaAddress: DWORD;
+
+ uuidNamingContextObjGuid: UUID;
+ uuidDsaObjGuid: UUID;
+ end;
+ {$EXTERNALSYM _DS_REPL_OPW_BLOB}
+ DS_REPL_OPW_BLOB = _DS_REPL_OPW_BLOB;
+ {$EXTERNALSYM DS_REPL_OPW_BLOB}
+ TDsReplOpwBlob = DS_REPL_OPW_BLOB;
+ PDsReplOpwBlob = ^DS_REPL_OPW_BLOB;
+
+ _DS_REPL_PENDING_OPSW = record
+ ftimeCurrentOpStarted: FILETIME;
+ cNumPendingOps: DWORD;
+ rgPendingOp: array [0..0] of DS_REPL_OPW;
+ end;
+ {$EXTERNALSYM _DS_REPL_PENDING_OPSW}
+ DS_REPL_PENDING_OPSW = _DS_REPL_PENDING_OPSW;
+ {$EXTERNALSYM DS_REPL_PENDING_OPSW}
+ TDsReplPendingOpsW = DS_REPL_PENDING_OPSW;
+ PDsReplPendingOpsW = ^DS_REPL_PENDING_OPSW;
+
+ _DS_REPL_VALUE_META_DATA = record
+ pszAttributeName: LPWSTR;
+ pszObjectDn: LPWSTR;
+ cbData: DWORD;
+ pbData: LPBYTE;
+ ftimeDeleted: FILETIME;
+ ftimeCreated: FILETIME;
+ dwVersion: DWORD;
+ ftimeLastOriginatingChange: FILETIME;
+ uuidLastOriginatingDsaInvocationID: UUID;
+ usnOriginatingChange: USN; // in the originating DSA's USN space
+ usnLocalChange: USN; // in the local DSA's USN space
+ end;
+ {$EXTERNALSYM _DS_REPL_VALUE_META_DATA}
+ DS_REPL_VALUE_META_DATA = _DS_REPL_VALUE_META_DATA;
+ {$EXTERNALSYM DS_REPL_VALUE_META_DATA}
+ TDsReplValueMetaData = DS_REPL_VALUE_META_DATA;
+ PDsReplValueMetaData = ^DS_REPL_VALUE_META_DATA;
+
+ _DS_REPL_VALUE_META_DATA_2 = record
+ pszAttributeName: LPWSTR;
+ pszObjectDn: LPWSTR;
+ cbData: DWORD;
+ pbData: LPBYTE;
+ ftimeDeleted: FILETIME;
+ ftimeCreated: FILETIME;
+ dwVersion: DWORD;
+ ftimeLastOriginatingChange: FILETIME;
+ uuidLastOriginatingDsaInvocationID: UUID;
+ usnOriginatingChange: USN; // in the originating DSA's USN space
+ usnLocalChange: USN; // in the local DSA's USN space
+ pszLastOriginatingDsaDN: LPWSTR;
+ end;
+ {$EXTERNALSYM _DS_REPL_VALUE_META_DATA_2}
+ DS_REPL_VALUE_META_DATA_2 = _DS_REPL_VALUE_META_DATA_2;
+ {$EXTERNALSYM DS_REPL_VALUE_META_DATA_2}
+ TDsReplValueMetaData2 = DS_REPL_VALUE_META_DATA_2;
+ PDsReplValueMetaData2 = ^DS_REPL_VALUE_META_DATA_2;
+
+// Fields can be added only to the end of this structure.
+
+ _DS_REPL_VALUE_META_DATA_BLOB = record
+ oszAttributeName: DWORD;
+ oszObjectDn: DWORD;
+ cbData: DWORD;
+ obData: DWORD;
+ ftimeDeleted: FILETIME;
+ ftimeCreated: FILETIME;
+ dwVersion: DWORD;
+ ftimeLastOriginatingChange: FILETIME;
+ uuidLastOriginatingDsaInvocationID: UUID;
+ usnOriginatingChange: USN; // in the originating DSA's USN space
+ usnLocalChange: USN; // in the local DSA's USN space
+ oszLastOriginatingDsaDN: DWORD;
+ end;
+ {$EXTERNALSYM _DS_REPL_VALUE_META_DATA_BLOB}
+ DS_REPL_VALUE_META_DATA_BLOB = _DS_REPL_VALUE_META_DATA_BLOB;
+ {$EXTERNALSYM DS_REPL_VALUE_META_DATA_BLOB}
+ TDsReplValueMetaDataBlob = DS_REPL_VALUE_META_DATA_BLOB;
+ PsReplValueMetaDataBlob = ^DS_REPL_VALUE_META_DATA_BLOB;
+
+ _DS_REPL_ATTR_VALUE_META_DATA = record
+ cNumEntries: DWORD;
+ dwEnumerationContext: DWORD;
+ rgMetaData: array [0..0] of DS_REPL_VALUE_META_DATA;
+ end;
+ {$EXTERNALSYM _DS_REPL_ATTR_VALUE_META_DATA}
+ DS_REPL_ATTR_VALUE_META_DATA = _DS_REPL_ATTR_VALUE_META_DATA;
+ {$EXTERNALSYM DS_REPL_ATTR_VALUE_META_DATA}
+ TDsReplAttrValueMetaData = DS_REPL_ATTR_VALUE_META_DATA;
+ PDsReplAttrValueMetaData = ^DS_REPL_ATTR_VALUE_META_DATA;
+
+ _DS_REPL_ATTR_VALUE_META_DATA_2 = record
+ cNumEntries: DWORD;
+ dwEnumerationContext: DWORD;
+ rgMetaData: array [0..0] of DS_REPL_VALUE_META_DATA_2;
+ end;
+ {$EXTERNALSYM _DS_REPL_ATTR_VALUE_META_DATA_2}
+ DS_REPL_ATTR_VALUE_META_DATA_2 = _DS_REPL_ATTR_VALUE_META_DATA_2;
+ {$EXTERNALSYM DS_REPL_ATTR_VALUE_META_DATA_2}
+ TDsReplAttrValueMetaData2 = DS_REPL_ATTR_VALUE_META_DATA_2;
+ PDsReplAttrValueMetaData2 = ^DS_REPL_ATTR_VALUE_META_DATA_2;
+
+ _DS_REPL_QUEUE_STATISTICSW = record
+ ftimeCurrentOpStarted: FILETIME;
+ cNumPendingOps: DWORD;
+ ftimeOldestSync: FILETIME;
+ ftimeOldestAdd: FILETIME;
+ ftimeOldestMod: FILETIME;
+ ftimeOldestDel: FILETIME;
+ ftimeOldestUpdRefs: FILETIME;
+ end;
+ {$EXTERNALSYM _DS_REPL_QUEUE_STATISTICSW}
+ DS_REPL_QUEUE_STATISTICSW = _DS_REPL_QUEUE_STATISTICSW;
+ {$EXTERNALSYM DS_REPL_QUEUE_STATISTICSW}
+ TDsReplQueueStatisticsW = DS_REPL_QUEUE_STATISTICSW;
+ PDsReplQueueStatisticsW = ^DS_REPL_QUEUE_STATISTICSW;
+
+// Fields can be added only to the end of this structure.
+
+ DS_REPL_QUEUE_STATISTICSW_BLOB = _DS_REPL_QUEUE_STATISTICSW;
+ {$EXTERNALSYM DS_REPL_QUEUE_STATISTICSW_BLOB}
+ TDsReplQueueStatisticsWBlob = DS_REPL_QUEUE_STATISTICSW_BLOB;
+
+function DsReplicaGetInfoW(hDS: HANDLE; InfoType: DS_REPL_INFO_TYPE;
+ pszObject: LPCWSTR; puuidForSourceDsaObjGuid: LPUUID; ppInfo: PPVOID): DWORD; stdcall;
+{$EXTERNALSYM DsReplicaGetInfoW}
+
+procedure DsReplicaFreeInfo(InfoType: DS_REPL_INFO_TYPE; pInfo: PVOID); stdcall;
+{$EXTERNALSYM DsReplicaFreeInfo}
+
+{$IFDEF UNICODE}
+
+function DsReplicaGetInfo(hDS: HANDLE; InfoType: DS_REPL_INFO_TYPE;
+ pszObject: LPCWSTR; puuidForSourceDsaObjGuid: LPUUID; ppInfo: PPVOID): DWORD; stdcall;
+{$EXTERNALSYM DsReplicaGetInfo}
+
+// This API is not supported by Windows 2000 clients or Windows 2000 DCs.
+
+function DsReplicaGetInfo2W(hDS: HANDLE; InfoType: DS_REPL_INFO_TYPE; pszObject: LPCWSTR; const puuidForSourceDsaObjGuid: UUID; pszAttributeName,
+ pszValue: LPCWSTR; dwFlags, dwEnumerationContext: DWORD; var ppInfo: LPVOID): DWORD; stdcall;
+{$EXTERNALSYM DsReplicaGetInfo2W}
+
+type
+ DS_REPL_NEIGHBOR = DS_REPL_NEIGHBORW;
+ {$EXTERNALSYM DS_REPL_NEIGHBOR}
+ DS_REPL_NEIGHBORS = DS_REPL_NEIGHBORSW;
+ {$EXTERNALSYM DS_REPL_NEIGHBORS}
+ DS_REPL_CURSOR_3 = DS_REPL_CURSOR_3W;
+ {$EXTERNALSYM DS_REPL_CURSOR_3}
+ DS_REPL_CURSORS_3 = DS_REPL_CURSORS_3W;
+ {$EXTERNALSYM DS_REPL_CURSORS_3}
+ DS_REPL_KCC_DSA_FAILURES = DS_REPL_KCC_DSA_FAILURESW;
+ {$EXTERNALSYM DS_REPL_KCC_DSA_FAILURES}
+ DS_REPL_KCC_DSA_FAILURE = DS_REPL_KCC_DSA_FAILUREW;
+ {$EXTERNALSYM DS_REPL_KCC_DSA_FAILURE}
+ DS_REPL_OP = DS_REPL_OPW;
+ {$EXTERNALSYM DS_REPL_OP}
+ DS_REPL_PENDING_OPS = DS_REPL_PENDING_OPSW;
+ {$EXTERNALSYM DS_REPL_PENDING_OPS}
+ TDsReplNeighbor = TDsReplNeighborW;
+ TDsReplNeighbors = TDsReplNeighborsW;
+ TDsReplCursors3 = TDsReplCursors3W;
+ TDsReplKccDsaFailures = TDsReplKccDsaFailuresW;
+ TDsReplKccDsaFailure = TDsReplKccDsaFailureW;
+ TDsReplOp = TDsReplOpW;
+ TDsReplPendingOps = TDsReplPendingOpsW;
+{$ELSE}
+// No ANSI equivalents currently supported.
+{$ENDIF UNICODE}
+
+function DsAddSidHistoryA(hDS: HANDLE; Flags: DWORD; SrcDomain: LPCSTR;
+ SrcPrincipal: LPCSTR; SrcDomainController: LPCSTR;
+ SrcDomainCreds: RPC_AUTH_IDENTITY_HANDLE; DstDomain: LPCSTR;
+ DstPrincipal: LPCSTR): DWORD; stdcall;
+{$EXTERNALSYM DsAddSidHistoryA}
+function DsAddSidHistoryW(hDS: HANDLE; Flags: DWORD; SrcDomain: LPCWSTR;
+ SrcPrincipal: LPCWSTR; SrcDomainController: LPCWSTR;
+ SrcDomainCreds: RPC_AUTH_IDENTITY_HANDLE; DstDomain: LPCWSTR;
+ DstPrincipal: LPCWSTR): DWORD; stdcall;
+{$EXTERNALSYM DsAddSidHistoryW}
+function DsAddSidHistory(hDS: HANDLE; Flags: DWORD; SrcDomain: LPCTSTR;
+ SrcPrincipal: LPCTSTR; SrcDomainController: LPCTSTR;
+ SrcDomainCreds: RPC_AUTH_IDENTITY_HANDLE; DstDomain: LPCTSTR;
+ DstPrincipal: LPCTSTR): DWORD; stdcall;
+{$EXTERNALSYM DsAddSidHistory}
+
+// The DsInheritSecurityIdentity API adds the source principal's SID and
+// SID history to the destination principal's SID history and then DELETES
+// THE SOURCE PRINCIPAL. Source and destination principal must be in the
+// same domain.
+
+function DsInheritSecurityIdentityA(hDS: HANDLE; Flags: DWORD;
+ SrcPrincipal: LPCSTR; DstPrincipal: LPCSTR): DWORD; stdcall;
+{$EXTERNALSYM DsInheritSecurityIdentityA}
+function DsInheritSecurityIdentityW(hDS: HANDLE; Flags: DWORD;
+ SrcPrincipal: LPCWSTR; DstPrincipal: LPCWSTR): DWORD; stdcall;
+{$EXTERNALSYM DsInheritSecurityIdentityW}
+function DsInheritSecurityIdentity(hDS: HANDLE; Flags: DWORD;
+ SrcPrincipal: LPCTSTR; DstPrincipal: LPCTSTR): DWORD; stdcall;
+{$EXTERNALSYM DsInheritSecurityIdentity}
+
+{ifndef MIDL_PASS
+/*++
+==========================================================
+NTDSAPI
+DWORD
+WINAPI
+DsQuoteRdnValue(
+ IN DWORD cUnquotedRdnValueLength,
+ IN LPCTCH psUnquotedRdnValue,
+ IN OUT DWORD *pcQuotedRdnValueLength,
+ OUT LPTCH psQuotedRdnValue
+ )
+++
+
+Description
+
+ This client call converts an RDN value into a quoted RDN value if
+ the RDN value contains characters that require quotes. The resultant
+ RDN can be submitted as part of a DN to the DS using various APIs
+ such as LDAP.
+
+ No quotes are added if none are needed. In this case, the
+ output RDN value will be the same as the input RDN value.
+
+ The RDN is quoted in accordance with the specification "Lightweight
+ Directory Access Protocol (v3): UTF-8 String Representation of
+ Distinguished Names", RFC 2253.
+
+ The input and output RDN values are *NOT* NULL terminated.
+
+ The changes made by this call can be undone by calling
+ DsUnquoteRdnValue().
+
+Arguments:
+
+ cUnquotedRdnValueLength - The length of psUnquotedRdnValue in chars.
+
+ psUnquotedRdnValue - Unquoted RDN value.
+
+ pcQuotedRdnValueeLength - IN, maximum length of psQuotedRdnValue, in chars
+ OUT ERROR_SUCCESS, chars utilized in psQuotedRdnValue
+ OUT ERROR_BUFFER_OVERFLOW, chars needed in psQuotedRdnValue
+
+ psQuotedRdnValue - The resultant and perhaps quoted RDN value
+
+Return Value:
+ ERROR_SUCCESS
+ If quotes or escapes were needed, then psQuotedRdnValue contains
+ the quoted, escaped version of psUnquotedRdnValue. Otherwise,
+ psQuotedRdnValue contains a copy of psUnquotedRdnValue. In either
+ case, pcQuotedRdnValueLength contains the space utilized, in chars.
+
+ ERROR_BUFFER_OVERFLOW
+ psQuotedRdnValueLength contains the space needed, in chars,
+ to hold psQuotedRdnValue.
+
+ ERROR_INVALID_PARAMETER
+ Invalid parameter.
+
+ ERROR_NOT_ENOUGH_MEMORY
+ Allocation error.
+
+--}
+
+function DsQuoteRdnValueA(cUnquotedRdnValueLength: DWORD;
+ psUnquotedRdnValue: LPCCH; var pcQuotedRdnValueLength: DWORD;
+ psQuotedRdnValue: LPCH): DWORD; stdcall;
+{$EXTERNALSYM DsQuoteRdnValueA}
+function DsQuoteRdnValueW(cUnquotedRdnValueLength: DWORD;
+ psUnquotedRdnValue: LPCWCH; var pcQuotedRdnValueLength: DWORD;
+ psQuotedRdnValue: LPWCH): DWORD; stdcall;
+{$EXTERNALSYM DsQuoteRdnValueW}
+function DsQuoteRdnValue(cUnquotedRdnValueLength: DWORD;
+ psUnquotedRdnValue: LPCTCH; var pcQuotedRdnValueLength: DWORD;
+ psQuotedRdnValue: LPTCH): DWORD; stdcall;
+{$EXTERNALSYM DsQuoteRdnValue}
+
+{++
+==========================================================
+NTDSAPI
+DWORD
+WINAPI
+DsUnquoteRdnValue(
+ IN DWORD cQuotedRdnValueLength,
+ IN LPCTCH psQuotedRdnValue,
+ IN OUT DWORD *pcUnquotedRdnValueLength,
+ OUT LPTCH psUnquotedRdnValue
+ )
+
+Description
+
+ This client call converts a quoted RDN Value into an unquoted RDN
+ Value. The resultant RDN value should *NOT* be submitted as part
+ of a DN to the DS using various APIs such as LDAP.
+
+ When psQuotedRdnValue is quoted:
+ The leading and trailing quote are removed.
+
+ Whitespace before the first quote is discarded.
+
+ Whitespace trailing the last quote is discarded.
+
+ Escapes are removed and the char following the escape is kept.
+
+ The following actions are taken when psQuotedRdnValue is unquoted:
+
+ Leading whitespace is discarded.
+
+ Trailing whitespace is kept.
+
+ Escaped non-special chars return an error.
+
+ Unescaped special chars return an error.
+
+ RDN values beginning with # (ignoring leading whitespace) are
+ treated as a stringized BER value and converted accordingly.
+
+ Escaped hex digits (\89) are converted into a binary byte (0x89).
+
+ Escapes are removed from escaped special chars.
+
+ The following actions are always taken:
+ Escaped special chars are unescaped.
+
+ The input and output RDN values are not NULL terminated.
+
+Arguments:
+
+ cQuotedRdnValueLength - The length of psQuotedRdnValue in chars.
+
+ psQuotedRdnValue - RDN value that may be quoted and may be escaped.
+
+ pcUnquotedRdnValueLength - IN, maximum length of psUnquotedRdnValue, in chars
+ OUT ERROR_SUCCESS, chars used in psUnquotedRdnValue
+ OUT ERROR_BUFFER_OVERFLOW, chars needed for psUnquotedRdnValue
+
+ psUnquotedRdnValue - The resultant unquoted RDN value.
+
+Return Value:
+ ERROR_SUCCESS
+ psUnquotedRdnValue contains the unquoted and unescaped version
+ of psQuotedRdnValue. pcUnquotedRdnValueLength contains the space
+ used, in chars.
+
+ ERROR_BUFFER_OVERFLOW
+ psUnquotedRdnValueLength contains the space needed, in chars,
+ to hold psUnquotedRdnValue.
+
+ ERROR_INVALID_PARAMETER
+ Invalid parameter.
+
+ ERROR_NOT_ENOUGH_MEMORY
+ Allocation error.
+
+--}
+
+function DsUnquoteRdnValueA(cQuotedRdnValueLength: DWORD; psQuotedRdnValue: LPCCH;
+ var pcUnquotedRdnValueLength: DWORD; psUnquotedRdnValue: LPCH): DWORD; stdcall;
+{$EXTERNALSYM DsUnquoteRdnValueA}
+function DsUnquoteRdnValueW(cQuotedRdnValueLength: DWORD; psQuotedRdnValue: LPCWCH;
+ var pcUnquotedRdnValueLength: DWORD; psUnquotedRdnValue: LPWCH): DWORD; stdcall;
+{$EXTERNALSYM DsUnquoteRdnValueW}
+function DsUnquoteRdnValue(cQuotedRdnValueLength: DWORD; psQuotedRdnValue: LPCTCH;
+ var pcUnquotedRdnValueLength: DWORD; psUnquotedRdnValue: LPTCH): DWORD; stdcall;
+{$EXTERNALSYM DsUnquoteRdnValue}
+
+(*++
+==========================================================
+NTDSAPI
+DWORD
+WINAPI
+DsGetRdnW(
+ IN OUT LPCWCH *ppDN,
+ IN OUT DWORD *pcDN,
+ OUT LPCWCH *ppKey,
+ OUT DWORD *pcKey,
+ OUT LPCWCH *ppVal,
+ OUT DWORD *pcVal
+ )
+
+Description
+
+ This client call accepts a DN with quoted RDNs and returns the address
+ and length, in chars, of the key and value for the first RDN in the DN.
+ The RDN value returned is still quoted. Use DsUnquoteRdnValue to unquote
+ the value for display.
+
+ This client call also returns the address and length of the rest of the
+ DN. A subsequent call using the returned DN address and length will
+ return information about the next RDN.
+
+ The following loop processes each RDN in pDN:
+ ccDN = wcslen(pDN)
+ while (ccDN) {
+ error = DsGetRdn(&pDN,
+ &ccDN,
+ &pKey,
+ &ccKey,
+ &pVal,
+ &ccVal);
+ if (error != ERROR_SUCCESS) {
+ process error;
+ return;
+ }
+ if (ccKey) {
+ process pKey;
+ }
+ if (ccVal) {
+ process pVal;
+ }
+ }
+
+ For example, given the DN "cn=bob,dc=com", the first call to DsGetRdnW
+ returns the addresses for ",dc=com", "cn", and "bob" with respective
+ lengths of 7, 2, and 3. A subsequent call with ",dc=com" returns "",
+ "dc", and "com" with respective lengths 0, 2, and 3.
+
+Arguments:
+ ppDN
+ IN : *ppDN points to a DN
+ OUT: *ppDN points to the rest of the DN following the first RDN
+ pcDN
+ IN : *pcDN is the count of chars in the input *ppDN, not including
+ any terminating NULL
+ OUT: *pcDN is the count of chars in the output *ppDN, not including
+ any terminating NULL
+ ppKey
+ OUT: Undefined if *pcKey is 0. Otherwise, *ppKey points to the first
+ key in the DN
+ pcKey
+ OUT: *pcKey is the count of chars in *ppKey.
+
+ ppVal
+ OUT: Undefined if *pcVal is 0. Otherwise, *ppVal points to the first
+ value in the DN
+ pcVal
+ OUT: *pcVal is the count of chars in *ppVal
+
+Return Value:
+ ERROR_SUCCESS
+ If *pccDN is not 0, then *ppDN points to the rest of the DN following
+ the first RDN. If *pccDN is 0, then *ppDN is undefined.
+
+ If *pccKey is not 0, then *ppKey points to the first key in DN. If
+ *pccKey is 0, then *ppKey is undefined.
+
+ If *pccVal is not 0, then *ppVal points to the first value in DN. If
+ *pccVal is 0, then *ppVal is undefined.
+
+ ERROR_DS_NAME_UNPARSEABLE
+ The first RDN in *ppDN could not be parsed. All output parameters
+ are undefined.
+
+ Any other error
+ All output parameters are undefined.
+
+--*)
+
+function DsGetRdnW(var ppDN: LPCWCH; var pcDN: DWORD; var ppKey: LPCWCH; var pcKey: DWORD; var ppVal: LPCWCH; var pcVal: DWORD): DWORD; stdcall;
+{$EXTERNALSYM DsGetRdnW}
+
+(*++
+==========================================================
+
+NTDSAPI
+BOOL
+WINAPI
+DsCrackUnquotedMangledRdnW(
+ IN LPCWSTR pszRDN,
+ IN DWORD cchRDN,
+ OUT OPTIONAL GUID *pGuid,
+ OUT OPTIONAL DS_MANGLE_FOR *peDsMangleFor
+ );
+
+Description
+
+Determine whether the given RDN is in mangled form. If so, the mangled RDN
+is decoded, and the guid and mangle type are returned.
+
+The RDN should already be in unquoted form. See DsUnquoteRdnValue.
+
+Arguments:
+
+ pszRDN (IN) - Character string containing RDN. Termination is optional.
+
+ cchRDN (IN) - Length of RDN excluding termination, if any
+
+ pGuid (OUT, OPTIONAL) - Pointer to storage to receive decoded guid.
+ Only returned if RDN is mangled.
+
+ peDsMangleFor (OUT, OPTIONAL) - Pointer to storage to receive mangle type.
+ Only returned if RDN is mangled
+
+Return Value:
+
+ BOOL - Whether the RDN is mangled or not
+
+--*)
+
+function DsCrackUnquotedMangledRdnW(pszRDN: LPCWSTR; cchRDN: DWORD; pGuid: LPGUID; peDsMangleFor: PDsMangleFor): BOOL; stdcall;
+{$EXTERNALSYM DsCrackUnquotedMangledRdnW}
+function DsCrackUnquotedMangledRdnA(pszRDN: LPCSTR; cchRDN: DWORD; pGuid: LPGUID; peDsMangleFor: PDsMangleFor): BOOL; stdcall;
+{$EXTERNALSYM DsCrackUnquotedMangledRdnA}
+function DsCrackUnquotedMangledRdn(pszRDN: LPCTSTR; cchRDN: DWORD; pGuid: LPGUID; peDsMangleFor: PDsMangleFor): BOOL; stdcall;
+{$EXTERNALSYM DsCrackUnquotedMangledRdn}
+
+(*++
+==========================================================
+
+NTDSAPI
+BOOL
+WINAPI
+DsIsMangledRdnValueW(
+ LPCWSTR pszRdn,
+ DWORD cRdn,
+ DS_MANGLE_FOR eDsMangleForDesired
+ );
+
+Description
+
+ Determine if the given RDN Value is mangled, and of the given type. Note that
+ the key portion of an RDN should not be supplied.
+
+ The name may be quoted or unquoted. This routine tries to unquote the value. If
+ the unquote operation fails, the routine proceeds to attempt the unmangle.
+
+ A change was made in the default quoting behavior of DNs returned from the DS
+ between Windows 2000 and Windows XP. This routine transparently handles RDNs with
+ special characters in either form.
+
+ The routine expects the value part of the RDN.
+
+ If you have full DN, use DsIsMangledDn() below.
+
+ To check for deleted name:
+ DsIsMangledRdnValueW( rdn, rdnlen, DS_MANGLE_OBJECT_FOR_DELETION )
+ To check for a conflicted name:
+ DsIsMangledRdnValueW( rdn, rdnlen, DS_MANGLE_OBJECT_FOR_NAME_CONFLICT )
+
+Arguments:
+
+ pszRdn (IN) - RDN value character string. Termination is not required and
+ is ignored.
+
+ cRdn (IN) - Length of RDN value in characters excluding termination
+
+ eDsMangleForDesired (IN) - Type of mangling to check for
+
+Return Value:
+
+ BOOL - True if the Rdn is mangled and is of the required type
+
+--*)
+
+function DsIsMangledRdnValueW(pszRdn: LPCWSTR; cRdn: DWORD; eDsMangleForDesired: DS_MANGLE_FOR): BOOL; stdcall;
+{$EXTERNALSYM DsIsMangledRdnValueW}
+function DsIsMangledRdnValueA(pszRdn: LPCSTR; cRdn: DWORD; eDsMangleForDesired: DS_MANGLE_FOR): BOOL; stdcall;
+{$EXTERNALSYM DsIsMangledRdnValueA}
+function DsIsMangledRdnValue(pszRdn: LPCTSTR; cRdn: DWORD; eDsMangleForDesired: DS_MANGLE_FOR): BOOL; stdcall;
+{$EXTERNALSYM DsIsMangledRdnValue}
+
+(*++
+==========================================================
+
+NTDSAPI
+BOOL
+WINAPI
+DsIsMangledDnW(
+ LPCWSTR pszDn,
+ DS_MANGLE_FOR eDsMangleFor
+ );
+
+Description
+
+ Determine if the first RDN in a quoted DN is a mangled name of given type.
+
+ The DN must be suitable for input to DsGetRdn().
+
+ To check for deleted name:
+ DsIsMangledDnW( dn, DS_MANGLE_OBJECT_FOR_DELETION )
+ To check for a conflicted name:
+ DsIsMangledDnW( Dn, DS_MANGLE_OBJECT_FOR_NAME_CONFLICT )
+
+Arguments:
+
+ pszDn (IN) - Quoted Distinguished Name as returned by DS functions
+
+ eDsMangleFor (IN) - Type of mangling to check for
+
+Return Value:
+
+ BOOL - True if first RDN is mangled and is of the given mangle type
+
+--*)
+
+function DsIsMangledDnA(pszDn: LPCSTR; eDsMangleFor: DS_MANGLE_FOR): BOOL; stdcall;
+{$EXTERNALSYM DsIsMangledDnA}
+function DsIsMangledDnW(pszDn: LPCWSTR; eDsMangleFor: DS_MANGLE_FOR): BOOL; stdcall;
+{$EXTERNALSYM DsIsMangledDnW}
+function DsIsMangledDn(pszDn: LPCTSTR; eDsMangleFor: DS_MANGLE_FOR): BOOL; stdcall;
+{$EXTERNALSYM DsIsMangledDn}
+
+implementation
+
+const
+ ntdsapilib = 'ntdsapi.dll';
+ {$IFDEF UNICODE}
+ AWSuffix = 'W';
+ {$ELSE}
+ AWSuffix = 'A';
+ {$ENDIF UNICODE}
+
+function NTDSCONN_IGNORE_SCHEDULE(_options_: DWORD): DWORD;
+begin
+ // todo NTDSCONN_OPT_IGNORE_SCHEDULE_MASK only defined in pre-release version
+ Result := (_options_ and DWORD($80000000){NTDSCONN_OPT_IGNORE_SCHEDULE_MASK}) shr 31;
+end;
+
+function FRSCONN_GET_PRIORITY(_options_: DWORD): DWORD;
+begin
+ if ((_options_ and FRSCONN_PRIORITY_MASK) shr 28) <> 0 then
+ Result := (_options_ and FRSCONN_PRIORITY_MASK) shr 28
+ else
+ Result := FRSCONN_MAX_PRIORITY;
+end;
+
+{$IFDEF DYNAMIC_LINK}
+
+var
+ _DsBindA: Pointer;
+
+function DsBindA;
+begin
+ GetProcedureAddress(_DsBindA, ntdsapilib, 'DsBindA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsBindA]
+ end;
+end;
+
+var
+ _DsBindW: Pointer;
+
+function DsBindW;
+begin
+ GetProcedureAddress(_DsBindW, ntdsapilib, 'DsBindW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsBindW]
+ end;
+end;
+
+var
+ _DsBind: Pointer;
+
+function DsBind;
+begin
+ GetProcedureAddress(_DsBind, ntdsapilib, 'DsBind' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsBind]
+ end;
+end;
+
+var
+ _DsBindWithCredA: Pointer;
+
+function DsBindWithCredA;
+begin
+ GetProcedureAddress(_DsBindWithCredA, ntdsapilib, 'DsBindWithCredA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsBindWithCredA]
+ end;
+end;
+
+var
+ _DsBindWithCredW: Pointer;
+
+function DsBindWithCredW;
+begin
+ GetProcedureAddress(_DsBindWithCredW, ntdsapilib, 'DsBindWithCredW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsBindWithCredW]
+ end;
+end;
+
+var
+ _DsBindWithCred: Pointer;
+
+function DsBindWithCred;
+begin
+ GetProcedureAddress(_DsBindWithCred, ntdsapilib, 'DsBindWithCred' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsBindWithCred]
+ end;
+end;
+
+var
+ _DsBindWithSpnA: Pointer;
+
+function DsBindWithSpnA;
+begin
+ GetProcedureAddress(_DsBindWithSpnA, ntdsapilib, 'DsBindWithSpnA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsBindWithSpnA]
+ end;
+end;
+
+var
+ _DsBindWithSpnW: Pointer;
+
+function DsBindWithSpnW;
+begin
+ GetProcedureAddress(_DsBindWithSpnW, ntdsapilib, 'DsBindWithSpnW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsBindWithSpnW]
+ end;
+end;
+
+var
+ _DsBindWithSpn: Pointer;
+
+function DsBindWithSpn;
+begin
+ GetProcedureAddress(_DsBindWithSpn, ntdsapilib, 'DsBindWithSpn' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsBindWithSpn]
+ end;
+end;
+
+var
+ _DsBindWithSpnExW: Pointer;
+
+function DsBindWithSpnExW;
+begin
+ GetProcedureAddress(_DsBindWithSpnExW, ntdsapilib, 'DsBindWithSpnExW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsBindWithSpnExW]
+ end;
+end;
+
+var
+ _DsBindWithSpnExA: Pointer;
+
+function DsBindWithSpnExA;
+begin
+ GetProcedureAddress(_DsBindWithSpnExA, ntdsapilib, 'DsBindWithSpnExA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsBindWithSpnExA]
+ end;
+end;
+
+var
+ _DsBindWithSpnEx: Pointer;
+
+function DsBindWithSpnEx;
+begin
+ GetProcedureAddress(_DsBindWithSpnEx, ntdsapilib, 'DsBindWithSpnEx' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsBindWithSpnEx]
+ end;
+end;
+
+var
+ _DsBindToISTGW: Pointer;
+
+function DsBindToISTGW;
+begin
+ GetProcedureAddress(_DsBindToISTGW, ntdsapilib, 'DsBindToISTGW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsBindToISTGW]
+ end;
+end;
+
+var
+ _DsBindToISTGA: Pointer;
+
+function DsBindToISTGA;
+begin
+ GetProcedureAddress(_DsBindToISTGA, ntdsapilib, 'DsBindToISTGA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsBindToISTGA]
+ end;
+end;
+
+var
+ _DsBindToISTG: Pointer;
+
+function DsBindToISTG;
+begin
+ GetProcedureAddress(_DsBindToISTG, ntdsapilib, 'DsBindToISTG' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsBindToISTG]
+ end;
+end;
+
+var
+ _DsBindingSetTimeout: Pointer;
+
+function DsBindingSetTimeout;
+begin
+ GetProcedureAddress(_DsBindingSetTimeout, ntdsapilib, 'DsBindingSetTimeout');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsBindingSetTimeout]
+ end;
+end;
+
+var
+ _DsUnBindA: Pointer;
+
+function DsUnBindA;
+begin
+ GetProcedureAddress(_DsUnBindA, ntdsapilib, 'DsUnBindA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsUnBindA]
+ end;
+end;
+
+var
+ _DsUnBindW: Pointer;
+
+function DsUnBindW;
+begin
+ GetProcedureAddress(_DsUnBindW, ntdsapilib, 'DsUnBindW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsUnBindW]
+ end;
+end;
+
+var
+ _DsUnBind: Pointer;
+
+function DsUnBind;
+begin
+ GetProcedureAddress(_DsUnBind, ntdsapilib, 'DsUnBind' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsUnBind]
+ end;
+end;
+
+var
+ _DsMakePasswordCredentialsA: Pointer;
+
+function DsMakePasswordCredentialsA;
+begin
+ GetProcedureAddress(_DsMakePasswordCredentialsA, ntdsapilib, 'DsMakePasswordCredentialsA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsMakePasswordCredentialsA]
+ end;
+end;
+
+var
+ _DsMakePasswordCredentialsW: Pointer;
+
+function DsMakePasswordCredentialsW;
+begin
+ GetProcedureAddress(_DsMakePasswordCredentialsW, ntdsapilib, 'DsMakePasswordCredentialsW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsMakePasswordCredentialsW]
+ end;
+end;
+
+var
+ _DsMakePasswordCredentials: Pointer;
+
+function DsMakePasswordCredentials;
+begin
+ GetProcedureAddress(_DsMakePasswordCredentials, ntdsapilib, 'DsMakePasswordCredentials' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsMakePasswordCredentials]
+ end;
+end;
+
+var
+ _DsFreePasswordCredentials: Pointer;
+
+procedure DsFreePasswordCredentials;
+begin
+ GetProcedureAddress(_DsFreePasswordCredentials, ntdsapilib, 'DsFreePasswordCredentials');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsFreePasswordCredentials]
+ end;
+end;
+
+var
+ _DsFreePasswordCredentialsA: Pointer;
+
+procedure DsFreePasswordCredentialsA;
+begin
+ GetProcedureAddress(_DsFreePasswordCredentialsA, ntdsapilib, 'DsFreePasswordCredentials');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsFreePasswordCredentialsA]
+ end;
+end;
+
+var
+ _DsFreePasswordCredentialsW: Pointer;
+
+procedure DsFreePasswordCredentialsW;
+begin
+ GetProcedureAddress(_DsFreePasswordCredentialsW, ntdsapilib, 'DsFreePasswordCredentials');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsFreePasswordCredentialsW]
+ end;
+end;
+
+var
+ _DsCrackNamesA: Pointer;
+
+function DsCrackNamesA;
+begin
+ GetProcedureAddress(_DsCrackNamesA, ntdsapilib, 'DsCrackNamesA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsCrackNamesA]
+ end;
+end;
+
+var
+ _DsCrackNamesW: Pointer;
+
+function DsCrackNamesW;
+begin
+ GetProcedureAddress(_DsCrackNamesW, ntdsapilib, 'DsCrackNamesW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsCrackNamesW]
+ end;
+end;
+
+var
+ _DsCrackNames: Pointer;
+
+function DsCrackNames;
+begin
+ GetProcedureAddress(_DsCrackNames, ntdsapilib, 'DsCrackNames' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsCrackNames]
+ end;
+end;
+
+var
+ _DsFreeNameResultA: Pointer;
+
+procedure DsFreeNameResultA;
+begin
+ GetProcedureAddress(_DsFreeNameResultA, ntdsapilib, 'DsFreeNameResultA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsFreeNameResultA]
+ end;
+end;
+
+var
+ _DsFreeNameResultW: Pointer;
+
+procedure DsFreeNameResultW;
+begin
+ GetProcedureAddress(_DsFreeNameResultW, ntdsapilib, 'DsFreeNameResultW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsFreeNameResultW]
+ end;
+end;
+
+var
+ _DsFreeNameResult: Pointer;
+
+procedure DsFreeNameResult;
+begin
+ GetProcedureAddress(_DsFreeNameResult, ntdsapilib, 'DsFreeNameResult' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsFreeNameResult]
+ end;
+end;
+
+var
+ _DsMakeSpnA: Pointer;
+
+function DsMakeSpnA;
+begin
+ GetProcedureAddress(_DsMakeSpnA, ntdsapilib, 'DsMakeSpnA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsMakeSpnA]
+ end;
+end;
+
+var
+ _DsMakeSpnW: Pointer;
+
+function DsMakeSpnW;
+begin
+ GetProcedureAddress(_DsMakeSpnW, ntdsapilib, 'DsMakeSpnW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsMakeSpnW]
+ end;
+end;
+
+var
+ _DsMakeSpn: Pointer;
+
+function DsMakeSpn;
+begin
+ GetProcedureAddress(_DsMakeSpn, ntdsapilib, 'DsMakeSpn' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsMakeSpn]
+ end;
+end;
+
+var
+ _DsGetSpnA: Pointer;
+
+function DsGetSpnA;
+begin
+ GetProcedureAddress(_DsGetSpnA, ntdsapilib, 'DsGetSpnA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsGetSpnA]
+ end;
+end;
+
+var
+ _DsGetSpnW: Pointer;
+
+function DsGetSpnW;
+begin
+ GetProcedureAddress(_DsGetSpnW, ntdsapilib, 'DsGetSpnW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsGetSpnW]
+ end;
+end;
+
+var
+ _DsGetSpn: Pointer;
+
+function DsGetSpn;
+begin
+ GetProcedureAddress(_DsGetSpn, ntdsapilib, 'DsGetSpn' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsGetSpn]
+ end;
+end;
+
+var
+ _DsFreeSpnArrayA: Pointer;
+
+procedure DsFreeSpnArrayA;
+begin
+ GetProcedureAddress(_DsFreeSpnArrayA, ntdsapilib, 'DsFreeSpnArrayA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsFreeSpnArrayA]
+ end;
+end;
+
+var
+ _DsFreeSpnArrayW: Pointer;
+
+procedure DsFreeSpnArrayW;
+begin
+ GetProcedureAddress(_DsFreeSpnArrayW, ntdsapilib, 'DsFreeSpnArrayW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsFreeSpnArrayW]
+ end;
+end;
+
+var
+ _DsFreeSpnArray: Pointer;
+
+procedure DsFreeSpnArray;
+begin
+ GetProcedureAddress(_DsFreeSpnArray, ntdsapilib, 'DsFreeSpnArray' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsFreeSpnArray]
+ end;
+end;
+
+var
+ _DsCrackSpnA: Pointer;
+
+function DsCrackSpnA;
+begin
+ GetProcedureAddress(_DsCrackSpnA, ntdsapilib, 'DsCrackSpnA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsCrackSpnA]
+ end;
+end;
+
+var
+ _DsCrackSpnW: Pointer;
+
+function DsCrackSpnW;
+begin
+ GetProcedureAddress(_DsCrackSpnW, ntdsapilib, 'DsCrackSpnW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsCrackSpnW]
+ end;
+end;
+
+var
+ _DsCrackSpn: Pointer;
+
+function DsCrackSpn;
+begin
+ GetProcedureAddress(_DsCrackSpn, ntdsapilib, 'DsCrackSpn' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsCrackSpn]
+ end;
+end;
+
+var
+ _DsWriteAccountSpnA: Pointer;
+
+function DsWriteAccountSpnA;
+begin
+ GetProcedureAddress(_DsWriteAccountSpnA, ntdsapilib, 'DsWriteAccountSpnA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsWriteAccountSpnA]
+ end;
+end;
+
+var
+ _DsWriteAccountSpnW: Pointer;
+
+function DsWriteAccountSpnW;
+begin
+ GetProcedureAddress(_DsWriteAccountSpnW, ntdsapilib, 'DsWriteAccountSpnW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsWriteAccountSpnW]
+ end;
+end;
+
+var
+ _DsWriteAccountSpn: Pointer;
+
+function DsWriteAccountSpn;
+begin
+ GetProcedureAddress(_DsWriteAccountSpn, ntdsapilib, 'DsWriteAccountSpn' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsWriteAccountSpn]
+ end;
+end;
+
+var
+ _DsClientMakeSpnForTargetServerA: Pointer;
+
+function DsClientMakeSpnForTargetServerA;
+begin
+ GetProcedureAddress(_DsClientMakeSpnForTargetServerA, ntdsapilib, 'DsClientMakeSpnForTargetServerA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsClientMakeSpnForTargetServerA]
+ end;
+end;
+
+var
+ _DsClientMakeSpnForTargetServerW: Pointer;
+
+function DsClientMakeSpnForTargetServerW;
+begin
+ GetProcedureAddress(_DsClientMakeSpnForTargetServerW, ntdsapilib, 'DsClientMakeSpnForTargetServerW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsClientMakeSpnForTargetServerW]
+ end;
+end;
+
+var
+ _DsClientMakeSpnForTargetServer: Pointer;
+
+function DsClientMakeSpnForTargetServer;
+begin
+ GetProcedureAddress(_DsClientMakeSpnForTargetServer, ntdsapilib, 'DsClientMakeSpnForTargetServer' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsClientMakeSpnForTargetServer]
+ end;
+end;
+
+var
+ _DsServerRegisterSpnA: Pointer;
+
+function DsServerRegisterSpnA;
+begin
+ GetProcedureAddress(_DsServerRegisterSpnA, ntdsapilib, 'DsServerRegisterSpnA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsServerRegisterSpnA]
+ end;
+end;
+
+var
+ _DsServerRegisterSpnW: Pointer;
+
+function DsServerRegisterSpnW;
+begin
+ GetProcedureAddress(_DsServerRegisterSpnW, ntdsapilib, 'DsServerRegisterSpnW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsServerRegisterSpnW]
+ end;
+end;
+
+var
+ _DsServerRegisterSpn: Pointer;
+
+function DsServerRegisterSpn;
+begin
+ GetProcedureAddress(_DsServerRegisterSpn, ntdsapilib, 'DsServerRegisterSpn' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsServerRegisterSpn]
+ end;
+end;
+
+var
+ _DsReplicaSyncA: Pointer;
+
+function DsReplicaSyncA;
+begin
+ GetProcedureAddress(_DsReplicaSyncA, ntdsapilib, 'DsReplicaSyncA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsReplicaSyncA]
+ end;
+end;
+
+var
+ _DsReplicaSyncW: Pointer;
+
+function DsReplicaSyncW;
+begin
+ GetProcedureAddress(_DsReplicaSyncW, ntdsapilib, 'DsReplicaSyncW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsReplicaSyncW]
+ end;
+end;
+
+var
+ _DsReplicaSync: Pointer;
+
+function DsReplicaSync;
+begin
+ GetProcedureAddress(_DsReplicaSync, ntdsapilib, 'DsReplicaSync' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsReplicaSync]
+ end;
+end;
+
+var
+ _DsReplicaAddA: Pointer;
+
+function DsReplicaAddA;
+begin
+ GetProcedureAddress(_DsReplicaAddA, ntdsapilib, 'DsReplicaAddA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsReplicaAddA]
+ end;
+end;
+
+var
+ _DsReplicaAddW: Pointer;
+
+function DsReplicaAddW;
+begin
+ GetProcedureAddress(_DsReplicaAddW, ntdsapilib, 'DsReplicaAddW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsReplicaAddW]
+ end;
+end;
+
+var
+ _DsReplicaAdd: Pointer;
+
+function DsReplicaAdd;
+begin
+ GetProcedureAddress(_DsReplicaAdd, ntdsapilib, 'DsReplicaAdd' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsReplicaAdd]
+ end;
+end;
+
+var
+ _DsReplicaDelA: Pointer;
+
+function DsReplicaDelA;
+begin
+ GetProcedureAddress(_DsReplicaDelA, ntdsapilib, 'DsReplicaDelA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsReplicaDelA]
+ end;
+end;
+
+var
+ _DsReplicaDelW: Pointer;
+
+function DsReplicaDelW;
+begin
+ GetProcedureAddress(_DsReplicaDelW, ntdsapilib, 'DsReplicaDelW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsReplicaDelW]
+ end;
+end;
+
+var
+ _DsReplicaDel: Pointer;
+
+function DsReplicaDel;
+begin
+ GetProcedureAddress(_DsReplicaDel, ntdsapilib, 'DsReplicaDel' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsReplicaDel]
+ end;
+end;
+
+var
+ _DsReplicaModifyA: Pointer;
+
+function DsReplicaModifyA;
+begin
+ GetProcedureAddress(_DsReplicaModifyA, ntdsapilib, 'DsReplicaModifyA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsReplicaModifyA]
+ end;
+end;
+
+var
+ _DsReplicaModifyW: Pointer;
+
+function DsReplicaModifyW;
+begin
+ GetProcedureAddress(_DsReplicaModifyW, ntdsapilib, 'DsReplicaModifyW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsReplicaModifyW]
+ end;
+end;
+
+var
+ _DsReplicaModify: Pointer;
+
+function DsReplicaModify;
+begin
+ GetProcedureAddress(_DsReplicaModify, ntdsapilib, 'DsReplicaModify' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsReplicaModify]
+ end;
+end;
+
+var
+ _DsReplicaUpdateRefsA: Pointer;
+
+function DsReplicaUpdateRefsA;
+begin
+ GetProcedureAddress(_DsReplicaUpdateRefsA, ntdsapilib, 'DsReplicaUpdateRefsA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsReplicaUpdateRefsA]
+ end;
+end;
+
+var
+ _DsReplicaUpdateRefsW: Pointer;
+
+function DsReplicaUpdateRefsW;
+begin
+ GetProcedureAddress(_DsReplicaUpdateRefsW, ntdsapilib, 'DsReplicaUpdateRefsW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsReplicaUpdateRefsW]
+ end;
+end;
+
+var
+ _DsReplicaUpdateRefs: Pointer;
+
+function DsReplicaUpdateRefs;
+begin
+ GetProcedureAddress(_DsReplicaUpdateRefs, ntdsapilib, 'DsReplicaUpdateRefs' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsReplicaUpdateRefs]
+ end;
+end;
+
+var
+ _DsReplicaSyncAllA: Pointer;
+
+function DsReplicaSyncAllA;
+begin
+ GetProcedureAddress(_DsReplicaSyncAllA, ntdsapilib, 'DsReplicaSyncAllA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsReplicaSyncAllA]
+ end;
+end;
+
+var
+ _DsReplicaSyncAllW: Pointer;
+
+function DsReplicaSyncAllW;
+begin
+ GetProcedureAddress(_DsReplicaSyncAllW, ntdsapilib, 'DsReplicaSyncAllW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsReplicaSyncAllW]
+ end;
+end;
+
+var
+ _DsReplicaSyncAll: Pointer;
+
+function DsReplicaSyncAll;
+begin
+ GetProcedureAddress(_DsReplicaSyncAll, ntdsapilib, 'DsReplicaSyncAll' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsReplicaSyncAll]
+ end;
+end;
+
+var
+ _DsRemoveDsServerA: Pointer;
+
+function DsRemoveDsServerA;
+begin
+ GetProcedureAddress(_DsRemoveDsServerA, ntdsapilib, 'DsRemoveDsServerA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsRemoveDsServerA]
+ end;
+end;
+
+var
+ _DsRemoveDsServerW: Pointer;
+
+function DsRemoveDsServerW;
+begin
+ GetProcedureAddress(_DsRemoveDsServerW, ntdsapilib, 'DsRemoveDsServerW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsRemoveDsServerW]
+ end;
+end;
+
+var
+ _DsRemoveDsServer: Pointer;
+
+function DsRemoveDsServer;
+begin
+ GetProcedureAddress(_DsRemoveDsServer, ntdsapilib, 'DsRemoveDsServer' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsRemoveDsServer]
+ end;
+end;
+
+var
+ _DsRemoveDsDomainA: Pointer;
+
+function DsRemoveDsDomainA;
+begin
+ GetProcedureAddress(_DsRemoveDsDomainA, ntdsapilib, 'DsRemoveDsDomainA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsRemoveDsDomainA]
+ end;
+end;
+
+var
+ _DsRemoveDsDomainW: Pointer;
+
+function DsRemoveDsDomainW;
+begin
+ GetProcedureAddress(_DsRemoveDsDomainW, ntdsapilib, 'DsRemoveDsDomainW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsRemoveDsDomainW]
+ end;
+end;
+
+var
+ _DsRemoveDsDomain: Pointer;
+
+function DsRemoveDsDomain;
+begin
+ GetProcedureAddress(_DsRemoveDsDomain, ntdsapilib, 'DsRemoveDsDomain' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsRemoveDsDomain]
+ end;
+end;
+
+var
+ _DsListSitesA: Pointer;
+
+function DsListSitesA;
+begin
+ GetProcedureAddress(_DsListSitesA, ntdsapilib, 'DsListSitesA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsListSitesA]
+ end;
+end;
+
+var
+ _DsListSitesW: Pointer;
+
+function DsListSitesW;
+begin
+ GetProcedureAddress(_DsListSitesW, ntdsapilib, 'DsListSitesW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsListSitesW]
+ end;
+end;
+
+var
+ _DsListSites: Pointer;
+
+function DsListSites;
+begin
+ GetProcedureAddress(_DsListSites, ntdsapilib, 'DsListSites' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsListSites]
+ end;
+end;
+
+var
+ _DsListServersInSiteA: Pointer;
+
+function DsListServersInSiteA;
+begin
+ GetProcedureAddress(_DsListServersInSiteA, ntdsapilib, 'DsListServersInSiteA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsListServersInSiteA]
+ end;
+end;
+
+var
+ _DsListServersInSiteW: Pointer;
+
+function DsListServersInSiteW;
+begin
+ GetProcedureAddress(_DsListServersInSiteW, ntdsapilib, 'DsListServersInSiteW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsListServersInSiteW]
+ end;
+end;
+
+var
+ _DsListServersInSite: Pointer;
+
+function DsListServersInSite;
+begin
+ GetProcedureAddress(_DsListServersInSite, ntdsapilib, 'DsListServersInSite' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsListServersInSite]
+ end;
+end;
+
+var
+ _DsListDomainsInSiteA: Pointer;
+
+function DsListDomainsInSiteA;
+begin
+ GetProcedureAddress(_DsListDomainsInSiteA, ntdsapilib, 'DsListDomainsInSiteA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsListDomainsInSiteA]
+ end;
+end;
+
+var
+ _DsListDomainsInSiteW: Pointer;
+
+function DsListDomainsInSiteW;
+begin
+ GetProcedureAddress(_DsListDomainsInSiteW, ntdsapilib, 'DsListDomainsInSiteW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsListDomainsInSiteW]
+ end;
+end;
+
+var
+ _DsListDomainsInSite: Pointer;
+
+function DsListDomainsInSite;
+begin
+ GetProcedureAddress(_DsListDomainsInSite, ntdsapilib, 'DsListDomainsInSite' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsListDomainsInSite]
+ end;
+end;
+
+var
+ _DsListServersForDomainInSiteA: Pointer;
+
+function DsListServersForDomainInSiteA;
+begin
+ GetProcedureAddress(_DsListServersForDomainInSiteA, ntdsapilib, 'DsListServersForDomainInSiteA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsListServersForDomainInSiteA]
+ end;
+end;
+
+var
+ _DsListServersForDomainInSiteW: Pointer;
+
+function DsListServersForDomainInSiteW;
+begin
+ GetProcedureAddress(_DsListServersForDomainInSiteW, ntdsapilib, 'DsListServersForDomainInSiteW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsListServersForDomainInSiteW]
+ end;
+end;
+
+var
+ _DsListServersForDomainInSite: Pointer;
+
+function DsListServersForDomainInSite;
+begin
+ GetProcedureAddress(_DsListServersForDomainInSite, ntdsapilib, 'DsListServersForDomainInSite' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsListServersForDomainInSite]
+ end;
+end;
+
+var
+ _DsListInfoForServerA: Pointer;
+
+function DsListInfoForServerA;
+begin
+ GetProcedureAddress(_DsListInfoForServerA, ntdsapilib, 'DsListInfoForServerA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsListInfoForServerA]
+ end;
+end;
+
+var
+ _DsListInfoForServerW: Pointer;
+
+function DsListInfoForServerW;
+begin
+ GetProcedureAddress(_DsListInfoForServerW, ntdsapilib, 'DsListInfoForServerW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsListInfoForServerW]
+ end;
+end;
+
+var
+ _DsListInfoForServer: Pointer;
+
+function DsListInfoForServer;
+begin
+ GetProcedureAddress(_DsListInfoForServer, ntdsapilib, 'DsListInfoForServer' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsListInfoForServer]
+ end;
+end;
+
+var
+ _DsListRolesA: Pointer;
+
+function DsListRolesA;
+begin
+ GetProcedureAddress(_DsListRolesA, ntdsapilib, 'DsListRolesA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsListRolesA]
+ end;
+end;
+
+var
+ _DsListRolesW: Pointer;
+
+function DsListRolesW;
+begin
+ GetProcedureAddress(_DsListRolesW, ntdsapilib, 'DsListRolesW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsListRolesW]
+ end;
+end;
+
+var
+ _DsListRoles: Pointer;
+
+function DsListRoles;
+begin
+ GetProcedureAddress(_DsListRoles, ntdsapilib, 'DsListRoles' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsListRoles]
+ end;
+end;
+
+var
+ _DsQuerySitesByCostW: Pointer;
+
+function DsQuerySitesByCostW;
+begin
+ GetProcedureAddress(_DsQuerySitesByCostW, ntdsapilib, 'DsQuerySitesByCostW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsQuerySitesByCostW]
+ end;
+end;
+
+var
+ _DsQuerySitesByCostA: Pointer;
+
+function DsQuerySitesByCostA;
+begin
+ GetProcedureAddress(_DsQuerySitesByCostA, ntdsapilib, 'DsQuerySitesByCostA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsQuerySitesByCostA]
+ end;
+end;
+
+var
+ _DsQuerySitesByCost: Pointer;
+
+function DsQuerySitesByCost;
+begin
+ GetProcedureAddress(_DsQuerySitesByCost, ntdsapilib, 'DsQuerySitesByCost' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsQuerySitesByCost]
+ end;
+end;
+
+var
+ _DsQuerySitesFree: Pointer;
+
+procedure DsQuerySitesFree;
+begin
+ GetProcedureAddress(_DsQuerySitesFree, ntdsapilib, 'DsQuerySitesFree');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsQuerySitesFree]
+ end;
+end;
+
+var
+ _DsMapSchemaGuidsA: Pointer;
+
+function DsMapSchemaGuidsA;
+begin
+ GetProcedureAddress(_DsMapSchemaGuidsA, ntdsapilib, 'DsMapSchemaGuidsA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsMapSchemaGuidsA]
+ end;
+end;
+
+var
+ _DsMapSchemaGuidsW: Pointer;
+
+function DsMapSchemaGuidsW;
+begin
+ GetProcedureAddress(_DsMapSchemaGuidsW, ntdsapilib, 'DsMapSchemaGuidsW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsMapSchemaGuidsW]
+ end;
+end;
+
+var
+ _DsFreeSchemaGuidMapA: Pointer;
+
+procedure DsFreeSchemaGuidMapA;
+begin
+ GetProcedureAddress(_DsFreeSchemaGuidMapA, ntdsapilib, 'DsFreeSchemaGuidMapA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsFreeSchemaGuidMapA]
+ end;
+end;
+
+var
+ _DsFreeSchemaGuidMapW: Pointer;
+
+procedure DsFreeSchemaGuidMapW;
+begin
+ GetProcedureAddress(_DsFreeSchemaGuidMapW, ntdsapilib, 'DsFreeSchemaGuidMapW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsFreeSchemaGuidMapW]
+ end;
+end;
+
+var
+ _DsMapSchemaGuids: Pointer;
+
+function DsMapSchemaGuids;
+begin
+ GetProcedureAddress(_DsMapSchemaGuids, ntdsapilib, 'DsMapSchemaGuids' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsMapSchemaGuids]
+ end;
+end;
+
+var
+ _DsFreeSchemaGuidMap: Pointer;
+
+procedure DsFreeSchemaGuidMap;
+begin
+ GetProcedureAddress(_DsFreeSchemaGuidMap, ntdsapilib, 'DsFreeSchemaGuidMap' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsFreeSchemaGuidMap]
+ end;
+end;
+
+var
+ _DsGetDomainControllerInfoA: Pointer;
+
+function DsGetDomainControllerInfoA;
+begin
+ GetProcedureAddress(_DsGetDomainControllerInfoA, ntdsapilib, 'DsGetDomainControllerInfoA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsGetDomainControllerInfoA]
+ end;
+end;
+
+var
+ _DsGetDomainControllerInfoW: Pointer;
+
+function DsGetDomainControllerInfoW;
+begin
+ GetProcedureAddress(_DsGetDomainControllerInfoW, ntdsapilib, 'DsGetDomainControllerInfoW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsGetDomainControllerInfoW]
+ end;
+end;
+
+var
+ _DsGetDomainControllerInfo: Pointer;
+
+function DsGetDomainControllerInfo;
+begin
+ GetProcedureAddress(_DsGetDomainControllerInfo, ntdsapilib, 'DsGetDomainControllerInfo' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsGetDomainControllerInfo]
+ end;
+end;
+
+var
+ _DsFreeDomainControllerInfoA: Pointer;
+
+procedure DsFreeDomainControllerInfoA;
+begin
+ GetProcedureAddress(_DsFreeDomainControllerInfoA, ntdsapilib, 'DsFreeDomainControllerInfoA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsFreeDomainControllerInfoA]
+ end;
+end;
+
+var
+ _DsFreeDomainControllerInfoW: Pointer;
+
+procedure DsFreeDomainControllerInfoW;
+begin
+ GetProcedureAddress(_DsFreeDomainControllerInfoW, ntdsapilib, 'DsFreeDomainControllerInfoW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsFreeDomainControllerInfoW]
+ end;
+end;
+
+var
+ _DsFreeDomainControllerInfo: Pointer;
+
+procedure DsFreeDomainControllerInfo;
+begin
+ GetProcedureAddress(_DsFreeDomainControllerInfo, ntdsapilib, 'DsFreeDomainControllerInfo' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsFreeDomainControllerInfo]
+ end;
+end;
+
+var
+ _DsReplicaConsistencyCheck: Pointer;
+
+function DsReplicaConsistencyCheck;
+begin
+ GetProcedureAddress(_DsReplicaConsistencyCheck, ntdsapilib, 'DsReplicaConsistencyCheck');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsReplicaConsistencyCheck]
+ end;
+end;
+
+var
+ _DsReplicaVerifyObjectsW: Pointer;
+
+function DsReplicaVerifyObjectsW;
+begin
+ GetProcedureAddress(_DsReplicaVerifyObjectsW, ntdsapilib, 'DsReplicaVerifyObjectsW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsReplicaVerifyObjectsW]
+ end;
+end;
+
+var
+ _DsReplicaVerifyObjectsA: Pointer;
+
+function DsReplicaVerifyObjectsA;
+begin
+ GetProcedureAddress(_DsReplicaVerifyObjectsA, ntdsapilib, 'DsReplicaVerifyObjectsA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsReplicaVerifyObjectsA]
+ end;
+end;
+
+var
+ _DsReplicaVerifyObjects: Pointer;
+
+function DsReplicaVerifyObjects;
+begin
+ GetProcedureAddress(_DsReplicaVerifyObjects, ntdsapilib, 'DsReplicaVerifyObjects' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsReplicaVerifyObjects]
+ end;
+end;
+
+var
+ _DsReplicaGetInfoW: Pointer;
+
+function DsReplicaGetInfoW;
+begin
+ GetProcedureAddress(_DsReplicaGetInfoW, ntdsapilib, 'DsReplicaGetInfoW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsReplicaGetInfoW]
+ end;
+end;
+
+var
+ _DsReplicaFreeInfo: Pointer;
+
+procedure DsReplicaFreeInfo;
+begin
+ GetProcedureAddress(_DsReplicaFreeInfo, ntdsapilib, 'DsReplicaFreeInfo');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsReplicaFreeInfo]
+ end;
+end;
+
+{$IFDEF UNICODE}
+
+var
+ _DsReplicaGetInfo: Pointer;
+
+function DsReplicaGetInfo;
+begin
+ GetProcedureAddress(_DsReplicaGetInfo, ntdsapilib, 'DsReplicaGetInfoW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsReplicaGetInfo]
+ end;
+end;
+
+var
+ _DsReplicaGetInfo2W: Pointer;
+
+function DsReplicaGetInfo2W;
+begin
+ GetProcedureAddress(_DsReplicaGetInfo2W, ntdsapilib, 'DsReplicaGetInfo2W');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsReplicaGetInfo2W]
+ end;
+end;
+
+{$ENDIF UNICODE}
+
+var
+ _DsAddSidHistoryA: Pointer;
+
+function DsAddSidHistoryA;
+begin
+ GetProcedureAddress(_DsAddSidHistoryA, ntdsapilib, 'DsAddSidHistoryA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsAddSidHistoryA]
+ end;
+end;
+
+var
+ _DsAddSidHistoryW: Pointer;
+
+function DsAddSidHistoryW;
+begin
+ GetProcedureAddress(_DsAddSidHistoryW, ntdsapilib, 'DsAddSidHistoryW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsAddSidHistoryW]
+ end;
+end;
+
+var
+ _DsAddSidHistory: Pointer;
+
+function DsAddSidHistory;
+begin
+ GetProcedureAddress(_DsAddSidHistory, ntdsapilib, 'DsAddSidHistory' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsAddSidHistory]
+ end;
+end;
+
+var
+ _DsInheritSecurityIdentityA: Pointer;
+
+function DsInheritSecurityIdentityA;
+begin
+ GetProcedureAddress(_DsInheritSecurityIdentityA, ntdsapilib, 'DsInheritSecurityIdentityA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsInheritSecurityIdentityA]
+ end;
+end;
+
+var
+ _DsInheritSecurityIdentityW: Pointer;
+
+function DsInheritSecurityIdentityW;
+begin
+ GetProcedureAddress(_DsInheritSecurityIdentityW, ntdsapilib, 'DsInheritSecurityIdentityW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsInheritSecurityIdentityW]
+ end;
+end;
+
+var
+ _DsInheritSecurityIdentity: Pointer;
+
+function DsInheritSecurityIdentity;
+begin
+ GetProcedureAddress(_DsInheritSecurityIdentity, ntdsapilib, 'DsInheritSecurityIdentity' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsInheritSecurityIdentity]
+ end;
+end;
+
+var
+ _DsQuoteRdnValueA: Pointer;
+
+function DsQuoteRdnValueA;
+begin
+ GetProcedureAddress(_DsQuoteRdnValueA, ntdsapilib, 'DsQuoteRdnValueA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsQuoteRdnValueA]
+ end;
+end;
+
+var
+ _DsQuoteRdnValueW: Pointer;
+
+function DsQuoteRdnValueW;
+begin
+ GetProcedureAddress(_DsQuoteRdnValueW, ntdsapilib, 'DsQuoteRdnValueW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsQuoteRdnValueW]
+ end;
+end;
+
+var
+ _DsQuoteRdnValue: Pointer;
+
+function DsQuoteRdnValue;
+begin
+ GetProcedureAddress(_DsQuoteRdnValue, ntdsapilib, 'DsQuoteRdnValue' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsQuoteRdnValue]
+ end;
+end;
+
+var
+ _DsUnquoteRdnValueA: Pointer;
+
+function DsUnquoteRdnValueA;
+begin
+ GetProcedureAddress(_DsUnquoteRdnValueA, ntdsapilib, 'DsUnquoteRdnValueA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsUnquoteRdnValueA]
+ end;
+end;
+
+var
+ _DsUnquoteRdnValueW: Pointer;
+
+function DsUnquoteRdnValueW;
+begin
+ GetProcedureAddress(_DsUnquoteRdnValueW, ntdsapilib, 'DsUnquoteRdnValueW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsUnquoteRdnValueW]
+ end;
+end;
+
+var
+ _DsUnquoteRdnValue: Pointer;
+
+function DsUnquoteRdnValue;
+begin
+ GetProcedureAddress(_DsUnquoteRdnValue, ntdsapilib, 'DsUnquoteRdnValue' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsUnquoteRdnValue]
+ end;
+end;
+
+var
+ _DsGetRdnW: Pointer;
+
+function DsGetRdnW;
+begin
+ GetProcedureAddress(_DsGetRdnW, ntdsapilib, 'DsGetRdnW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsGetRdnW]
+ end;
+end;
+
+var
+ _DsCrackUnquotedMangledRdnW: Pointer;
+
+function DsCrackUnquotedMangledRdnW;
+begin
+ GetProcedureAddress(_DsCrackUnquotedMangledRdnW, ntdsapilib, 'DsCrackUnquotedMangledRdnW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsCrackUnquotedMangledRdnW]
+ end;
+end;
+
+var
+ _DsCrackUnquotedMangledRdnA: Pointer;
+
+function DsCrackUnquotedMangledRdnA;
+begin
+ GetProcedureAddress(_DsCrackUnquotedMangledRdnA, ntdsapilib, 'DsCrackUnquotedMangledRdnA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsCrackUnquotedMangledRdnA]
+ end;
+end;
+
+var
+ _DsCrackUnquotedMangledRdn: Pointer;
+
+function DsCrackUnquotedMangledRdn;
+begin
+ GetProcedureAddress(_DsCrackUnquotedMangledRdn, ntdsapilib, 'DsCrackUnquotedMangledRdn' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsCrackUnquotedMangledRdn]
+ end;
+end;
+
+var
+ _DsIsMangledRdnValueW: Pointer;
+
+function DsIsMangledRdnValueW;
+begin
+ GetProcedureAddress(_DsIsMangledRdnValueW, ntdsapilib, 'DsIsMangledRdnValueW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsIsMangledRdnValueW]
+ end;
+end;
+
+var
+ _DsIsMangledRdnValueA: Pointer;
+
+function DsIsMangledRdnValueA;
+begin
+ GetProcedureAddress(_DsIsMangledRdnValueA, ntdsapilib, 'DsIsMangledRdnValueA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsIsMangledRdnValueA]
+ end;
+end;
+
+var
+ _DsIsMangledRdnValue: Pointer;
+
+function DsIsMangledRdnValue;
+begin
+ GetProcedureAddress(_DsIsMangledRdnValue, ntdsapilib, 'DsIsMangledRdnValue' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsIsMangledRdnValue]
+ end;
+end;
+
+var
+ _DsIsMangledDnA: Pointer;
+
+function DsIsMangledDnA;
+begin
+ GetProcedureAddress(_DsIsMangledDnA, ntdsapilib, 'DsIsMangledDnA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsIsMangledDnA]
+ end;
+end;
+
+var
+ _DsIsMangledDnW: Pointer;
+
+function DsIsMangledDnW;
+begin
+ GetProcedureAddress(_DsIsMangledDnW, ntdsapilib, 'DsIsMangledDnW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsIsMangledDnW]
+ end;
+end;
+
+var
+ _DsIsMangledDn: Pointer;
+
+function DsIsMangledDn;
+begin
+ GetProcedureAddress(_DsIsMangledDn, ntdsapilib, 'DsIsMangledDn' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsIsMangledDn]
+ end;
+end;
+
+{$ELSE}
+
+function DsBindA; external ntdsapilib name 'DsBindA';
+function DsBindW; external ntdsapilib name 'DsBindW';
+function DsBind; external ntdsapilib name 'DsBind' + AWSuffix;
+function DsBindWithCredA; external ntdsapilib name 'DsBindWithCredA';
+function DsBindWithCredW; external ntdsapilib name 'DsBindWithCredW';
+function DsBindWithCred; external ntdsapilib name 'DsBindWithCred' + AWSuffix;
+function DsBindWithSpnA; external ntdsapilib name 'DsBindWithSpnA';
+function DsBindWithSpnW; external ntdsapilib name 'DsBindWithSpnW';
+function DsBindWithSpn; external ntdsapilib name 'DsBindWithSpn' + AWSuffix;
+function DsBindWithSpnExW; external ntdsapilib name 'DsBindWithSpnExW';
+function DsBindWithSpnExA; external ntdsapilib name 'DsBindWithSpnExA';
+function DsBindWithSpnEx; external ntdsapilib name 'DsBindWithSpnEx' + AWSuffix;
+function DsBindToISTGW; external ntdsapilib name 'DsBindToISTGW';
+function DsBindToISTGA; external ntdsapilib name 'DsBindToISTGA';
+function DsBindToISTG; external ntdsapilib name 'DsBindToISTG' + AWSuffix;
+function DsBindingSetTimeout; external ntdsapilib name 'DsBindingSetTimeout';
+function DsUnBindA; external ntdsapilib name 'DsUnBindA';
+function DsUnBindW; external ntdsapilib name 'DsUnBindW';
+function DsUnBind; external ntdsapilib name 'DsUnBind' + AWSuffix;
+function DsMakePasswordCredentialsA; external ntdsapilib name 'DsMakePasswordCredentialsA';
+function DsMakePasswordCredentialsW; external ntdsapilib name 'DsMakePasswordCredentialsW';
+function DsMakePasswordCredentials; external ntdsapilib name 'DsMakePasswordCredentials' + AWSuffix;
+procedure DsFreePasswordCredentials; external ntdsapilib name 'DsFreePasswordCredentials';
+procedure DsFreePasswordCredentialsA; external ntdsapilib name 'DsFreePasswordCredentials';
+procedure DsFreePasswordCredentialsW; external ntdsapilib name 'DsFreePasswordCredentials';
+function DsCrackNamesA; external ntdsapilib name 'DsCrackNamesA';
+function DsCrackNamesW; external ntdsapilib name 'DsCrackNamesW';
+function DsCrackNames; external ntdsapilib name 'DsCrackNames' + AWSuffix;
+procedure DsFreeNameResultA; external ntdsapilib name 'DsFreeNameResultA';
+procedure DsFreeNameResultW; external ntdsapilib name 'DsFreeNameResultW';
+procedure DsFreeNameResult; external ntdsapilib name 'DsFreeNameResult' + AWSuffix;
+function DsMakeSpnA; external ntdsapilib name 'DsMakeSpnA';
+function DsMakeSpnW; external ntdsapilib name 'DsMakeSpnW';
+function DsMakeSpn; external ntdsapilib name 'DsMakeSpn' + AWSuffix;
+function DsGetSpnA; external ntdsapilib name 'DsGetSpnA';
+function DsGetSpnW; external ntdsapilib name 'DsGetSpnW';
+function DsGetSpn; external ntdsapilib name 'DsGetSpn' + AWSuffix;
+procedure DsFreeSpnArrayA; external ntdsapilib name 'DsFreeSpnArrayA';
+procedure DsFreeSpnArrayW; external ntdsapilib name 'DsFreeSpnArrayW';
+procedure DsFreeSpnArray; external ntdsapilib name 'DsFreeSpnArray' + AWSuffix;
+function DsCrackSpnA; external ntdsapilib name 'DsCrackSpnA';
+function DsCrackSpnW; external ntdsapilib name 'DsCrackSpnW';
+function DsCrackSpn; external ntdsapilib name 'DsCrackSpn' + AWSuffix;
+function DsWriteAccountSpnA; external ntdsapilib name 'DsWriteAccountSpnA';
+function DsWriteAccountSpnW; external ntdsapilib name 'DsWriteAccountSpnW';
+function DsWriteAccountSpn; external ntdsapilib name 'DsWriteAccountSpn' + AWSuffix;
+function DsClientMakeSpnForTargetServerA; external ntdsapilib name 'DsClientMakeSpnForTargetServerA';
+function DsClientMakeSpnForTargetServerW; external ntdsapilib name 'DsClientMakeSpnForTargetServerW';
+function DsClientMakeSpnForTargetServer; external ntdsapilib name 'DsClientMakeSpnForTargetServer' + AWSuffix;
+function DsServerRegisterSpnA; external ntdsapilib name 'DsServerRegisterSpnA';
+function DsServerRegisterSpnW; external ntdsapilib name 'DsServerRegisterSpnW';
+function DsServerRegisterSpn; external ntdsapilib name 'DsServerRegisterSpn' + AWSuffix;
+function DsReplicaSyncA; external ntdsapilib name 'DsReplicaSyncA';
+function DsReplicaSyncW; external ntdsapilib name 'DsReplicaSyncW';
+function DsReplicaSync; external ntdsapilib name 'DsReplicaSync' + AWSuffix;
+function DsReplicaAddA; external ntdsapilib name 'DsReplicaAddA';
+function DsReplicaAddW; external ntdsapilib name 'DsReplicaAddW';
+function DsReplicaAdd; external ntdsapilib name 'DsReplicaAdd' + AWSuffix;
+function DsReplicaDelA; external ntdsapilib name 'DsReplicaDelA';
+function DsReplicaDelW; external ntdsapilib name 'DsReplicaDelW';
+function DsReplicaDel; external ntdsapilib name 'DsReplicaDel' + AWSuffix;
+function DsReplicaModifyA; external ntdsapilib name 'DsReplicaModifyA';
+function DsReplicaModifyW; external ntdsapilib name 'DsReplicaModifyW';
+function DsReplicaModify; external ntdsapilib name 'DsReplicaModify' + AWSuffix;
+function DsReplicaUpdateRefsA; external ntdsapilib name 'DsReplicaUpdateRefsA';
+function DsReplicaUpdateRefsW; external ntdsapilib name 'DsReplicaUpdateRefsW';
+function DsReplicaUpdateRefs; external ntdsapilib name 'DsReplicaUpdateRefs' + AWSuffix;
+function DsReplicaSyncAllA; external ntdsapilib name 'DsReplicaSyncAllA';
+function DsReplicaSyncAllW; external ntdsapilib name 'DsReplicaSyncAllW';
+function DsReplicaSyncAll; external ntdsapilib name 'DsReplicaSyncAll' + AWSuffix;
+function DsRemoveDsServerA; external ntdsapilib name 'DsRemoveDsServerA';
+function DsRemoveDsServerW; external ntdsapilib name 'DsRemoveDsServerW';
+function DsRemoveDsServer; external ntdsapilib name 'DsRemoveDsServer' + AWSuffix;
+function DsRemoveDsDomainA; external ntdsapilib name 'DsRemoveDsDomainA';
+function DsRemoveDsDomainW; external ntdsapilib name 'DsRemoveDsDomainW';
+function DsRemoveDsDomain; external ntdsapilib name 'DsRemoveDsDomain' + AWSuffix;
+function DsListSitesA; external ntdsapilib name 'DsListSitesA';
+function DsListSitesW; external ntdsapilib name 'DsListSitesW';
+function DsListSites; external ntdsapilib name 'DsListSites' + AWSuffix;
+function DsListServersInSiteA; external ntdsapilib name 'DsListServersInSiteA';
+function DsListServersInSiteW; external ntdsapilib name 'DsListServersInSiteW';
+function DsListServersInSite; external ntdsapilib name 'DsListServersInSite' + AWSuffix;
+function DsListDomainsInSiteA; external ntdsapilib name 'DsListDomainsInSiteA';
+function DsListDomainsInSiteW; external ntdsapilib name 'DsListDomainsInSiteW';
+function DsListDomainsInSite; external ntdsapilib name 'DsListDomainsInSite' + AWSuffix;
+function DsListServersForDomainInSiteA; external ntdsapilib name 'DsListServersForDomainInSiteA';
+function DsListServersForDomainInSiteW; external ntdsapilib name 'DsListServersForDomainInSiteW';
+function DsListServersForDomainInSite; external ntdsapilib name 'DsListServersForDomainInSite' + AWSuffix;
+function DsListInfoForServerA; external ntdsapilib name 'DsListInfoForServerA';
+function DsListInfoForServerW; external ntdsapilib name 'DsListInfoForServerW';
+function DsListInfoForServer; external ntdsapilib name 'DsListInfoForServer' + AWSuffix;
+function DsListRolesA; external ntdsapilib name 'DsListRolesA';
+function DsListRolesW; external ntdsapilib name 'DsListRolesW';
+function DsListRoles; external ntdsapilib name 'DsListRoles' + AWSuffix;
+function DsQuerySitesByCostW; external ntdsapilib name 'DsQuerySitesByCostW';
+function DsQuerySitesByCostA; external ntdsapilib name 'DsQuerySitesByCostA';
+function DsQuerySitesByCost; external ntdsapilib name 'DsQuerySitesByCost' + AWSuffix;
+procedure DsQuerySitesFree; external ntdsapilib name 'DsQuerySitesFree';
+function DsMapSchemaGuidsA; external ntdsapilib name 'DsMapSchemaGuidsA';
+function DsMapSchemaGuidsW; external ntdsapilib name 'DsMapSchemaGuidsW';
+procedure DsFreeSchemaGuidMapA; external ntdsapilib name 'DsFreeSchemaGuidMapA';
+procedure DsFreeSchemaGuidMapW; external ntdsapilib name 'DsFreeSchemaGuidMapW';
+function DsMapSchemaGuids; external ntdsapilib name 'DsMapSchemaGuids' + AWSuffix;
+procedure DsFreeSchemaGuidMap; external ntdsapilib name 'DsFreeSchemaGuidMap' + AWSuffix;
+function DsGetDomainControllerInfoA; external ntdsapilib name 'DsGetDomainControllerInfoA';
+function DsGetDomainControllerInfoW; external ntdsapilib name 'DsGetDomainControllerInfoW';
+function DsGetDomainControllerInfo; external ntdsapilib name 'DsGetDomainControllerInfo' + AWSuffix;
+procedure DsFreeDomainControllerInfoA; external ntdsapilib name 'DsFreeDomainControllerInfoA';
+procedure DsFreeDomainControllerInfoW; external ntdsapilib name 'DsFreeDomainControllerInfoW';
+procedure DsFreeDomainControllerInfo; external ntdsapilib name 'DsFreeDomainControllerInfo' + AWSuffix;
+function DsReplicaConsistencyCheck; external ntdsapilib name 'DsReplicaConsistencyCheck';
+function DsReplicaVerifyObjectsW; external ntdsapilib name 'DsReplicaVerifyObjectsW';
+function DsReplicaVerifyObjectsA; external ntdsapilib name 'DsReplicaVerifyObjectsA';
+function DsReplicaVerifyObjects; external ntdsapilib name 'DsReplicaVerifyObjects' + AWSuffix;
+function DsReplicaGetInfoW; external ntdsapilib name 'DsReplicaGetInfoW';
+procedure DsReplicaFreeInfo; external ntdsapilib name 'DsReplicaFreeInfo';
+{$IFDEF UNICODE}
+function DsReplicaGetInfo; external ntdsapilib name 'DsReplicaGetInfoW';
+function DsReplicaGetInfo2W; external ntdsapilib name 'DsReplicaGetInfo2W';
+{$ENDIF UNICODE}
+function DsAddSidHistoryA; external ntdsapilib name 'DsAddSidHistoryA';
+function DsAddSidHistoryW; external ntdsapilib name 'DsAddSidHistoryW';
+function DsAddSidHistory; external ntdsapilib name 'DsAddSidHistory' + AWSuffix;
+function DsInheritSecurityIdentityA; external ntdsapilib name 'DsInheritSecurityIdentityA';
+function DsInheritSecurityIdentityW; external ntdsapilib name 'DsInheritSecurityIdentityW';
+function DsInheritSecurityIdentity; external ntdsapilib name 'DsInheritSecurityIdentity' + AWSuffix;
+function DsQuoteRdnValueA; external ntdsapilib name 'DsQuoteRdnValueA';
+function DsQuoteRdnValueW; external ntdsapilib name 'DsQuoteRdnValueW';
+function DsQuoteRdnValue; external ntdsapilib name 'DsQuoteRdnValue' + AWSuffix;
+function DsUnquoteRdnValueA; external ntdsapilib name 'DsUnquoteRdnValueA';
+function DsUnquoteRdnValueW; external ntdsapilib name 'DsUnquoteRdnValueW';
+function DsUnquoteRdnValue; external ntdsapilib name 'DsUnquoteRdnValue' + AWSuffix;
+function DsGetRdnW; external ntdsapilib name 'DsGetRdnW';
+function DsCrackUnquotedMangledRdnW; external ntdsapilib name 'DsCrackUnquotedMangledRdnW';
+function DsCrackUnquotedMangledRdnA; external ntdsapilib name 'DsCrackUnquotedMangledRdnA';
+function DsCrackUnquotedMangledRdn; external ntdsapilib name 'DsCrackUnquotedMangledRdn' + AWSuffix;
+function DsIsMangledRdnValueW; external ntdsapilib name 'DsIsMangledRdnValueW';
+function DsIsMangledRdnValueA; external ntdsapilib name 'DsIsMangledRdnValueA';
+function DsIsMangledRdnValue; external ntdsapilib name 'DsIsMangledRdnValue' + AWSuffix;
+function DsIsMangledDnA; external ntdsapilib name 'DsIsMangledDnA';
+function DsIsMangledDnW; external ntdsapilib name 'DsIsMangledDnW';
+function DsIsMangledDn; external ntdsapilib name 'DsIsMangledDn' + AWSuffix;
+
+{$ENDIF DYNAMIC_LINK}
+
+end.
diff --git a/packages/extra/winunits/jwantdsbcli.pas b/packages/extra/winunits/jwantdsbcli.pas
index febc93547c..22a5d6dba0 100644
--- a/packages/extra/winunits/jwantdsbcli.pas
+++ b/packages/extra/winunits/jwantdsbcli.pas
@@ -1,1164 +1,1164 @@
-{******************************************************************************}
-{ }
-{ Directory Backup and Restore API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: ntdsbcli.h, released June 2000. The original Pascal }
-{ code is: NtDsbCli.pas, released December 2000. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwantdsbcli.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaNtDsbCli;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include ":ntdsbcli.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaWinType;
-
-const
- g_wszBackupAnnotation = 'NTDS Backup Interface';
- {$EXTERNALSYM g_wszBackupAnnotation}
- g_aszBackupAnnotation = 'NTDS Backup Interface';
- {$EXTERNALSYM g_aszBackupAnnotation}
-
- g_wszRestoreAnnotation = 'NTDS Restore Interface';
- {$EXTERNALSYM g_wszRestoreAnnotation}
- g_aszRestoreAnnotation = 'NTDS Restore Interface';
- {$EXTERNALSYM g_aszRestoreAnnotation}
-
- {$IFDEF UNICODE}
- g_szBackupAnnotation = g_wszBackupAnnotation;
- {$EXTERNALSYM g_szBackupAnnotation}
- g_szRestoreAnnotation = g_wszRestoreAnnotation;
- {$EXTERNALSYM g_szRestoreAnnotation}
- {$ELSE}
- g_szBackupAnnotation = g_aszBackupAnnotation;
- {$EXTERNALSYM g_szBackupAnnotation}
- g_szRestoreAnnotation = g_aszRestoreAnnotation;
- {$EXTERNALSYM g_szRestoreAnnotation}
- {$ENDIF UNICODE}
-
-// Type of Backup passed to DsBackupPrepare()
-// BACKUP_TYPE_FULL: Requesting backup of the complete DS (DIT, Log files, and Patch files)
-// BACKUP_TYPE_LOGS_ONLY: Requesting backup of only the log files
-// BACKUP_TYPE_INCREMENTAL: Requesting incremental backup i.e. backing up only changes that happened since last backup
-
- BACKUP_TYPE_FULL = $01;
- {$EXTERNALSYM BACKUP_TYPE_FULL}
- BACKUP_TYPE_LOGS_ONLY = $02;
- {$EXTERNALSYM BACKUP_TYPE_LOGS_ONLY}
- BACKUP_TYPE_INCREMENTAL = $04; // not supported in product1
- {$EXTERNALSYM BACKUP_TYPE_INCREMENTAL}
-
-// Type of Restore passed to DsRestorePrepare()
-// RESTORE_TYPE_AUTHORATATIVE: The restored version wins throughout the enterprise
-// RESTORE_TYPE_ONLINE: Restoration is done when NTDS is online.
-// RESTORE_TYPE_CATCHUP: The restored version is reconciled through the standard reconciliation logic so that the
-// restored DIT can catchup with the rest of the enterprise.
-
- RESTORE_TYPE_AUTHORATATIVE = $01;
- {$EXTERNALSYM RESTORE_TYPE_AUTHORATATIVE}
- RESTORE_TYPE_ONLINE = $02; // not supported in product1
- {$EXTERNALSYM RESTORE_TYPE_ONLINE}
- RESTORE_TYPE_CATCHUP = $04; // this is the default restore mode
- {$EXTERNALSYM RESTORE_TYPE_CATCHUP}
-
-// Setting the current log # to this value would disable incremental/differential backup
-
- BACKUP_DISABLE_INCREMENTAL = DWORD($ffffffff);
- {$EXTERNALSYM BACKUP_DISABLE_INCREMENTAL}
-
-// BFT is the bit flag used to represent file types (directory/dit/logfile/etc.)
-// We keep them as a character so that we can append/prepend them to the actual file
-// path. The code in the Backup API's rely on the fact that values 0-256 in 8 bit ascii
-// map to the values 0-256 in unicode.
-
-type
- {$IFDEF UNICODE}
- BFT = WCHAR;
- {$EXTERNALSYM BFT}
- {$ELSE}
- BFT = Char;
- {$EXTERNALSYM BFT}
- {$ENDIF UNICODE}
-
-// Bit flags:
-// BFT_DIRECTORY - indicates path specified is a directory
-// BFT_DATABASE_DIRECTORY - indicates that file goes into database directory
-// BFT_LOG_DIRECTORY - indicates that the file goes into log directory
-
-const
- BFT_DIRECTORY = $80;
- {$EXTERNALSYM BFT_DIRECTORY}
- BFT_DATABASE_DIRECTORY = $40;
- {$EXTERNALSYM BFT_DATABASE_DIRECTORY}
- BFT_LOG_DIRECTORY = $20;
- {$EXTERNALSYM BFT_LOG_DIRECTORY}
-
-// Following combinations are defined for easy use of the filetype and the directory into
-// into which it goes
-
- BFT_LOG = BFT($01 or BFT_LOG_DIRECTORY);
- BFT_LOG_DIR = BFT($02 or BFT_DIRECTORY);
- BFT_CHECKPOINT_DIR = BFT($03 or BFT_DIRECTORY);
- BFT_NTDS_DATABASE = BFT($04 or BFT_DATABASE_DIRECTORY);
- BFT_PATCH_FILE = BFT($05 or BFT_LOG_DIRECTORY);
- BFT_UNKNOWN = BFT($0F);
-
-// #include <ntdsbmsg.h>
-
-// Backup Context Handle
-
-type
- HBC = Pointer;
- {$EXTERNALSYM HBC}
-
- PEDB_RSTMAPA = ^EDB_RSTMAPA;
- {$EXTERNALSYM PEDB_RSTMAPA}
- tagEDB_RSTMAPA = record
- szDatabaseName: PChar;
- szNewDtabaseName: PChar;
- end;
- {$EXTERNALSYM tagEDB_RSTMAPA}
- EDB_RSTMAPA = tagEDB_RSTMAPA;
- {$EXTERNALSYM EDB_RSTMAPA}
- TEdbRstMapA = EDB_RSTMAPA;
- PEdbRstMapA = PEDB_RSTMAPA;
-
-// required for NTDS unicode support.
-// UNDONE: NYI
-
- PEDB_RSTMAPW = ^EDB_RSTMAPW;
- {$EXTERNALSYM PEDB_RSTMAPW}
- tagEDB_RSTMAPW = record
- wszDatabaseName: PWCHAR;
- wszNewDatabaseName: PWCHAR;
- end;
- {$EXTERNALSYM tagEDB_RSTMAPW}
- EDB_RSTMAPW = tagEDB_RSTMAPW;
- {$EXTERNALSYM EDB_RSTMAPW}
- TEdbRstMapW = EDB_RSTMAPW;
- PEdbRstMapW = PEDB_RSTMAPW;
-
- {$IFDEF UNICODE}
- EDB_RSTMAP = EDB_RSTMAPW;
- {$EXTERNALSYM EDB_RSTMAP}
- PEDB_RSTMAP = PEDB_RSTMAPW;
- {$EXTERNALSYM PEDB_RSTMAP}
- TEdbRstMap = TEdbRstMapW;
- PEdbRstMap = PEdbRstMapW;
- {$ELSE}
- EDB_RSTMAP = EDB_RSTMAPA;
- {$EXTERNALSYM EDB_RSTMAP}
- PEDB_RSTMAP = PEDB_RSTMAPA;
- {$EXTERNALSYM PEDB_RSTMAP}
- TEdbRstMap = TEdbRstMapA;
- PEdbRstMap = PEdbRstMapA;
- {$ENDIF UNICODE}
-
-{*************************************************************************************
-Routine Description:
-
- DsIsNTDSOnline
- Checks to see if the NTDS is Online on the given server. This call is
- guaranteed to return quickly.
-
- Arguments:
- [in] szServerName - UNC name of the server to check
- [out] pfNTDSOnline - pointer to receive the bool result (TRUE if NTDS is
- online; FALSE, otherwise)
-
-Return Value:
-
- ERROR_SUCCESS if the call executed successfully;
- Failure code otherwise.
-**************************************************************************************}
-
-function DsIsNTDSOnlineA(szServerName: LPCSTR; var pfNTDSOnline: BOOL): HRESULT; stdcall;
-{$EXTERNALSYM DsIsNTDSOnlineA}
-function DsIsNTDSOnlineW(szServerName: LPCWSTR; var pfNTDSOnline: BOOL): HRESULT; stdcall;
-{$EXTERNALSYM DsIsNTDSOnlineW}
-function DsIsNTDSOnline(szServerName: LPCTSTR; var pfNTDSOnline: BOOL): HRESULT; stdcall;
-{$EXTERNALSYM DsIsNTDSOnline}
-
-{*************************************************************************************
-Routine Description:
-
- DsBackupPrepare
- Prepares the DS for the online backup and returns a Backup Context Handle
- which should be used in the subsequent calls to other backup functions.
-
- Arguments:
- [in] szBackupServer - UNC name of the server to be prepared for online backup
- [in] grbit - flag to be passed to jet while backing up dbs
- [in] btFlag - BACKUP_TYPE_FULL or BACKUP_TYPE_LOGS_ONLY
- [out] ppvExpiryToken - pointer that will receive the pointer to the
- Expiry Token associated with this backup; Client should save
- this token and send it back through DsRestorePrepare() when
- attempting a restore; allocated memory should be freed using
- DsBackupFree() API by the caller when it is no longer needed.
- [out] pcbExpiryTokenSize - pointer to receive the size of the expiry token
- returned.
- [out] phbc - pointer that will receive the backup context handle
-
-Return Value:
-
- One of the standard HRESULT success codes;
- Failure code otherwise.
-**************************************************************************************}
-
-function DsBackupPrepareA(szBackupServer: LPCSTR; grbit: ULONG; btFlag: ULONG;
- var ppvExpiryToken: PVOID; var pcbExpiryTokenSize: DWORD; var phbc: HBC): HRESULT; stdcall;
-{$EXTERNALSYM DsBackupPrepareA}
-function DsBackupPrepareW(szBackupServer: LPCWSTR; grbit: ULONG; btFlag: ULONG;
- var ppvExpiryToken: PVOID; var pcbExpiryTokenSize: DWORD; var phbc: HBC): HRESULT; stdcall;
-{$EXTERNALSYM DsBackupPrepareW}
-function DsBackupPrepare(szBackupServer: LPCTSTR; grbit: ULONG; btFlag: ULONG;
- var ppvExpiryToken: PVOID; var pcbExpiryTokenSize: DWORD; var phbc: HBC): HRESULT; stdcall;
-{$EXTERNALSYM DsBackupPrepare}
-
-{*************************************************************************************
-Routine Description:
-
- DsBackupGetDatabaseNames
- Gives the list of data bases that need to be backed up for the given
- backup context
-
- Arguments:
- [in] hbc - backup context handle
- [out] pszAttachmentInfo - pointer that will receive the pointer to the attachment
- info; allocated memory should be freed using DsBackupFree() API by the
- caller when it is no longer needed; Attachment info is an array of
- null-terminated filenames and and the list is terminated by two-nulls.
- [out] pcbSize - will receive the number of bytes returned
-Return Value:
-
- One of the standard HRESULT success codes;
- Failure code otherwise.
-**************************************************************************************}
-
-function DsBackupGetDatabaseNamesA(hbc: HBC; var pszAttachmentInfo: LPSTR;
- var pcbSize: DWORD): HRESULT; stdcall;
-{$EXTERNALSYM DsBackupGetDatabaseNamesA}
-function DsBackupGetDatabaseNamesW(hbc: HBC; var pszAttachmentInfo: LPWSTR;
- var pcbSize: DWORD): HRESULT; stdcall;
-{$EXTERNALSYM DsBackupGetDatabaseNamesW}
-function DsBackupGetDatabaseNames(hbc: HBC; var pszAttachmentInfo: LPTSTR;
- var pcbSize: DWORD): HRESULT; stdcall;
-{$EXTERNALSYM DsBackupGetDatabaseNames}
-
-{*************************************************************************************
-Routine Description:
-
- DsBackupOpenFile
- Opens the given attachment for read.
-
- Arguments:
- [in] hbc - backup context handle
- [in] szAttachmentName - name of the attachment to be opened for read
- [in] cbReadHintSize - suggested size in bytes that might be used during the
- subsequent reads on this attachement
- [out] pliFileSize - pointer to a large integer that would receive the size in
- bytes of the given attachment
-Return Value:
-
- One of the standard HRESULT success codes;
- Failure code otherwise.
-**************************************************************************************}
-
-function DsBackupOpenFileA(hbc: HBC; szAttachmentName: LPCSTR; cbReadHintSize: DWORD;
- var pliFileSize: LARGE_INTEGER): HRESULT; stdcall;
-{$EXTERNALSYM DsBackupOpenFileA}
-function DsBackupOpenFileW(hbc: HBC; szAttachmentName: LPCWSTR; cbReadHintSize: DWORD;
- var pliFileSize: LARGE_INTEGER): HRESULT; stdcall;
-{$EXTERNALSYM DsBackupOpenFileW}
-function DsBackupOpenFile(hbc: HBC; szAttachmentName: LPCTSTR; cbReadHintSize: DWORD;
- var pliFileSize: LARGE_INTEGER): HRESULT; stdcall;
-{$EXTERNALSYM DsBackupOpenFile}
-
-{*************************************************************************************
-Routine Description:
-
- DsBackupRead
- Reads the currently open attachment bytes into the given buffer. The client
- application is expected to call this function repeatedly until it gets the
- entire file (the application would have received the file size through the
- DsBackupOpenFile() call before.
-
- Arguments:
- [in] hbc - backup context handle
- [in] pvBuffer - pointer to the buffer that would receive the read data.
- [in] cbBuffer - specifies the size of the above buffer
- [out] pcbRead - pointer to receive the actual number of bytes read.
-Return Value:
-
- One of the standard HRESULT success codes;
- Failure code otherwise.
-**************************************************************************************}
-
-function DsBackupRead(hbc: HBC; pvBuffer: PVOID; cbBuffer: DWORD; var pcbRead: DWORD): HRESULT; stdcall;
-{$EXTERNALSYM DsBackupRead}
-
-{*************************************************************************************
-Routine Description:
-
- DsBackupClose
- To be called by the application after it completes reading all the data in
- the currently opened attachement.
-
- Arguments:
- [in] hbc - backup context handle
-Return Value:
-
- One of the standard HRESULT success codes;
- Failure code otherwise.
-**************************************************************************************}
-
-function DsBackupClose(hbc: HBC): HRESULT; stdcall;
-{$EXTERNALSYM DsBackupClose}
-
-{*************************************************************************************
-Routine Description:
-
- DsBackupGetBackupLogs
- Gives the list of log files that need to be backed up for the given
- backup context
-
- Arguments:
- [in] hbc - backup context handle
- [out] pszBackupLogFiles - pointer that will receive the pointer to the list of
- log files; allocated memory should be freed using DsBackupFree() API by the
- caller when it is no longer needed; Log files are returned in an array of
- null-terminated filenames and and the list is terminated by two-nulls.
- [out] pcbSize - will receive the number of bytes returned
-Return Value:
-
- One of the standard HRESULT success codes;
- Failure code otherwise.
-**************************************************************************************}
-
-function DsBackupGetBackupLogsA(hbc: HBC; var pszBackupLogFiles: LPSTR;
- var pcbSize: DWORD): HRESULT; stdcall;
-{$EXTERNALSYM DsBackupGetBackupLogsA}
-function DsBackupGetBackupLogsW(hbc: HBC; var pszBackupLogFiles: LPWSTR;
- var pcbSize: DWORD): HRESULT; stdcall;
-{$EXTERNALSYM DsBackupGetBackupLogsW}
-function DsBackupGetBackupLogs(hbc: HBC; var pszBackupLogFiles: LPTSTR;
- var pcbSize: DWORD): HRESULT; stdcall;
-{$EXTERNALSYM DsBackupGetBackupLogs}
-
-{*************************************************************************************
-Routine Description:
-
- DsBackupTruncateLogs
- Called to truncate the already read backup logs.
-
- Arguments:
- [in] hbc - backup context handle
-Return Value:
-
- One of the standard HRESULT success codes;
- Failure code otherwise.
-**************************************************************************************}
-
-function DsBackupTruncateLogs(hbc: HBC): HRESULT; stdcall;
-{$EXTERNALSYM DsBackupTruncateLogs}
-
-{*************************************************************************************
-Routine Description:
-
- DsBackupEnd
- Called to end the current backup session.
-
- Arguments:
- [in] hbc - backup context handle of the backup session
-Return Value:
-
- One of the standard HRESULT success codes;
- Failure code otherwise.
-**************************************************************************************}
-
-function DsBackupEnd(hbc: HBC): HRESULT; stdcall;
-{$EXTERNALSYM DsBackupEnd}
-
-{*************************************************************************************
-Routine Description:
-
- DsBackupFree
- Should be used by the application to free any buffer allocated by the
- NTDSBCLI dll.
-
- Arguments:
- [in] pvBuffer - pointer to the buffer that is to be freed.
-
- Return Value:
- None.
-**************************************************************************************}
-
-procedure DsBackupFree(pvBuffer: PVOID); stdcall;
-{$EXTERNALSYM DsBackupFree}
-
-{*************************************************************************************
-Routine Description:
-
- DsRestoreGetDatabaseLocations
- Called both at backup time as well at restoration time to get the data base
- locations for different types of files.
-
- Arguments:
- [in] hbc - backup context handle which would have been obtained through
- DsBackupPrepare() in the backup case and through DsRestorePrepare()
- in the restore case.
- [out] pszDatabaseLocationList - pointer that will receive the pointer to the list of
- database locations; allocated memory should be freed using DsBackupFree() API by the
- caller when it is no longer needed; locations are returned in an array of
- null-terminated names and and the list is terminated by two-nulls.
- The first character of each name is the BFT character that indicates the type
- of the file and the rest of the name tells gives the path into which that
- particular type of file should be restored.
- [out] pcbSize - will receive the number of bytes returned
-Return Value:
-
- One of the standard HRESULT success codes;
- Failure code otherwise.
-**************************************************************************************}
-
-function DsRestoreGetDatabaseLocationsA(hbc: HBC; var pszDatabaseLocationList: LPSTR;
- var pcbSize: DWORD): HRESULT; stdcall;
-{$EXTERNALSYM DsRestoreGetDatabaseLocationsA}
-function DsRestoreGetDatabaseLocationsW(hbc: HBC; var pszDatabaseLocationList: LPWSTR;
- var pcbSize: DWORD): HRESULT; stdcall;
-{$EXTERNALSYM DsRestoreGetDatabaseLocationsW}
-function DsRestoreGetDatabaseLocations(hbc: HBC; var pszDatabaseLocationList: LPTSTR;
- var pcbSize: DWORD): HRESULT; stdcall;
-{$EXTERNALSYM DsRestoreGetDatabaseLocations}
-
-{*************************************************************************************
-Routine Description:
-
- DsRestorePrepare
- Called to indicate beginning of a restore session.
-
- Arguments:
- [in] szServerName - UNC name of the server into which the restore operation is
- going to be performed.
- [in] rtFlag - Or'ed combination of RESTORE_TYPE_* flags; 0 if no special flags
- are to be specified
- [in] pvExpiryToken - pointer to the expiry token associated with this
- backup. The client would have received this when they backed up the DS.
- [in] cbExpiryTokenSize - size of the expiry token.
- [out] phbc - pointer to receive the backup context handle which is to be passed
- to the subsequent restore APIs
-
-Return Value:
-
- One of the standard HRESULT success codes;
- Failure code otherwise.
-**************************************************************************************}
-
-function DsRestorePrepareA(szServerName: LPCSTR; rtFlag: ULONG; pvExpiryToken: PVOID;
- cbExpiryTokenSize: DWORD; var phbc: HBC): HRESULT; stdcall;
-{$EXTERNALSYM DsRestorePrepareA}
-function DsRestorePrepareW(szServerName: LPCWSTR; rtFlag: ULONG; pvExpiryToken: PVOID;
- cbExpiryTokenSize: DWORD; var phbc: HBC): HRESULT; stdcall;
-{$EXTERNALSYM DsRestorePrepareW}
-function DsRestorePrepare(szServerName: LPCTSTR; rtFlag: ULONG; pvExpiryToken: PVOID;
- cbExpiryTokenSize: DWORD; var phbc: HBC): HRESULT; stdcall;
-{$EXTERNALSYM DsRestorePrepare}
-
-{*************************************************************************************
-Routine Description:
-
- DsRestoreRegister
- This will register a restore operation. It will interlock all sbsequent restore
- operations, and will prevent the restore target from starting until the call
- to DsRestoreRegisterComplete() is made.
-
- Arguments:
- [in] hbc - backup context handle for the restore session.
- [in] szCheckPointFilePath - path where the check point files are restored
- [in] szLogPath - path where the log files are restored
- [in] rgrstmap - restore map
- [in] crstmap - tells if ther is a new restore map
- [in] szBackupLogPath - path where the backup logs are located
- [in] genLow - Lowest log# that was restored in this restore session
- [in] genHigh - Highest log# that was restored in this restore session
-
- Return Value:
-
- One of the standard HRESULT success codes;
- Failure code otherwise.
-**************************************************************************************}
-
-function DsRestoreRegisterA(hbc: HBC; szCheckPointFilePath, szLogPath: LPCSTR;
- rgrstmap: PEDB_RSTMAPA; crstmap: LONG; szBackupLogPath: LPCSTR; genLow, genHigh: ULONG): HRESULT; stdcall;
-{$EXTERNALSYM DsRestoreRegisterA}
-function DsRestoreRegisterW(hbc: HBC; szCheckPointFilePath, szLogPath: LPCWSTR;
- rgrstmap: PEDB_RSTMAPW; crstmap: LONG; szBackupLogPath: LPCWSTR; genLow, genHigh: ULONG): HRESULT; stdcall;
-{$EXTERNALSYM DsRestoreRegisterW}
-function DsRestoreRegister(hbc: HBC; szCheckPointFilePath, szLogPath: LPCTSTR;
- rgrstmap: PEDB_RSTMAP; crstmap: LONG; szBackupLogPath: LPCTSTR; genLow, genHigh: ULONG): HRESULT; stdcall;
-{$EXTERNALSYM DsRestoreRegister}
-
-{*************************************************************************************
-Routine Description:
-
- DsRestoreRegisterComplete
- Called to indicate that a previously registered restore is complete.
-
- Arguments:
- [in] hbc - backup context handle
- [in] hrRestoreState - success code if the restore was successful
-Return Value:
-
- One of the standard HRESULT success codes;
- Failure code otherwise.
-**************************************************************************************}
-
-function DsRestoreRegisterComplete(hbc: HBC; hrRestoreState: HRESULT): HRESULT; stdcall;
-{$EXTERNALSYM DsRestoreRegisterComplete}
-
-{*************************************************************************************
-Routine Description:
-
- DsRestoreEnd
- Called to end a restore session
-
- Arguments:
- [in] hbc - backup context handle
-Return Value:
-
- One of the standard HRESULT success codes;
- Failure code otherwise.
-**************************************************************************************}
-
-function DsRestoreEnd(hbc: HBC): HRESULT; stdcall;
-{$EXTERNALSYM DsRestoreEnd}
-
-{*************************************************************************************
-Routine Description:
-
- DsSetCurrentBackupLog
- Called to set the current backup log number after a successful restore
-
- Arguments:
- [in] szServerName - UNC name of the server for which the current backup log has
- to be set
- [in] dwCurrentLog - current log number
-Return Value:
-
- One of the standard HRESULT success codes;
- Failure code otherwise.
-**************************************************************************************}
-
-function DsSetCurrentBackupLogA(szServerName: LPCSTR; dwCurrentLog: DWORD): HRESULT; stdcall;
-{$EXTERNALSYM DsSetCurrentBackupLogA}
-function DsSetCurrentBackupLogW(szServerName: LPCWSTR; dwCurrentLog: DWORD): HRESULT; stdcall;
-{$EXTERNALSYM DsSetCurrentBackupLogW}
-function DsSetCurrentBackupLog(szServerName: LPCTSTR; dwCurrentLog: DWORD): HRESULT; stdcall;
-{$EXTERNALSYM DsSetCurrentBackupLog}
-
-{*************************************************************************************
-Routine Description:
-
- DsSetAuthIdentity
- Used to set the security context under which the client APIs are to be
- called. If this function is not called, security context of the current
- process is assumed.
-
- Arguments:
- [in] szUserName - name of the user
- [in] szDomainName - name of the domain the user belongs to
- [in] szPassword - password of the user in the specified domain
-
-Return Value:
-
- One of the standard HRESULT success codes;
- Failure code otherwise.
-**************************************************************************************}
-
-function DsSetAuthIdentityA(szUserName, szDomainName, szPassword: LPCSTR): HRESULT; stdcall;
-{$EXTERNALSYM DsSetAuthIdentityA}
-function DsSetAuthIdentityW(szUserName, szDomainName, szPassword: LPCWSTR): HRESULT; stdcall;
-{$EXTERNALSYM DsSetAuthIdentityW}
-function DsSetAuthIdentity(szUserName, szDomainName, szPassword: LPCTSTR): HRESULT; stdcall;
-{$EXTERNALSYM DsSetAuthIdentity}
-
-implementation
-
-const
- ntdsbclilib = 'ntdsbclilib.dll';
- {$IFDEF UNICODE}
- AWSuffix = 'W';
- {$ELSE}
- AWSuffix = 'A';
- {$ENDIF UNICODE}
-
-{$IFDEF DYNAMIC_LINK}
-
-var
- _DsIsNTDSOnlineA: Pointer;
-
-function DsIsNTDSOnlineA;
-begin
- GetProcedureAddress(_DsIsNTDSOnlineA, ntdsbclilib, 'DsIsNTDSOnlineA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsIsNTDSOnlineA]
- end;
-end;
-
-var
- _DsIsNTDSOnlineW: Pointer;
-
-function DsIsNTDSOnlineW;
-begin
- GetProcedureAddress(_DsIsNTDSOnlineW, ntdsbclilib, 'DsIsNTDSOnlineW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsIsNTDSOnlineW]
- end;
-end;
-
-var
- _DsIsNTDSOnline: Pointer;
-
-function DsIsNTDSOnline;
-begin
- GetProcedureAddress(_DsIsNTDSOnline, ntdsbclilib, 'DsIsNTDSOnline' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsIsNTDSOnline]
- end;
-end;
-
-var
- _DsBackupPrepareA: Pointer;
-
-function DsBackupPrepareA;
-begin
- GetProcedureAddress(_DsBackupPrepareA, ntdsbclilib, 'DsBackupPrepareA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsBackupPrepareA]
- end;
-end;
-
-var
- _DsBackupPrepareW: Pointer;
-
-function DsBackupPrepareW;
-begin
- GetProcedureAddress(_DsBackupPrepareW, ntdsbclilib, 'DsBackupPrepareW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsBackupPrepareW]
- end;
-end;
-
-var
- _DsBackupPrepare: Pointer;
-
-function DsBackupPrepare;
-begin
- GetProcedureAddress(_DsBackupPrepare, ntdsbclilib, 'DsBackupPrepare' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsBackupPrepare]
- end;
-end;
-
-var
- _DsBackupGetDatabaseNamesA: Pointer;
-
-function DsBackupGetDatabaseNamesA;
-begin
- GetProcedureAddress(_DsBackupGetDatabaseNamesA, ntdsbclilib, 'DsBackupGetDatabaseNamesA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsBackupGetDatabaseNamesA]
- end;
-end;
-
-var
- _DsBackupGetDatabaseNamesW: Pointer;
-
-function DsBackupGetDatabaseNamesW;
-begin
- GetProcedureAddress(_DsBackupGetDatabaseNamesW, ntdsbclilib, 'DsBackupGetDatabaseNamesW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsBackupGetDatabaseNamesW]
- end;
-end;
-
-var
- _DsBackupGetDatabaseNames: Pointer;
-
-function DsBackupGetDatabaseNames;
-begin
- GetProcedureAddress(_DsBackupGetDatabaseNames, ntdsbclilib, 'DsBackupGetDatabaseNames' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsBackupGetDatabaseNames]
- end;
-end;
-
-var
- _DsBackupOpenFileA: Pointer;
-
-function DsBackupOpenFileA;
-begin
- GetProcedureAddress(_DsBackupOpenFileA, ntdsbclilib, 'DsBackupOpenFileA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsBackupOpenFileA]
- end;
-end;
-
-var
- _DsBackupOpenFileW: Pointer;
-
-function DsBackupOpenFileW;
-begin
- GetProcedureAddress(_DsBackupOpenFileW, ntdsbclilib, 'DsBackupOpenFileW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsBackupOpenFileW]
- end;
-end;
-
-var
- _DsBackupOpenFile: Pointer;
-
-function DsBackupOpenFile;
-begin
- GetProcedureAddress(_DsBackupOpenFile, ntdsbclilib, 'DsBackupOpenFile' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsBackupOpenFile]
- end;
-end;
-
-var
- _DsBackupRead: Pointer;
-
-function DsBackupRead;
-begin
- GetProcedureAddress(_DsBackupRead, ntdsbclilib, 'DsBackupRead');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsBackupRead]
- end;
-end;
-
-var
- _DsBackupClose: Pointer;
-
-function DsBackupClose;
-begin
- GetProcedureAddress(_DsBackupClose, ntdsbclilib, 'DsBackupClose');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsBackupClose]
- end;
-end;
-
-var
- _DsBackupGetBackupLogsA: Pointer;
-
-function DsBackupGetBackupLogsA;
-begin
- GetProcedureAddress(_DsBackupGetBackupLogsA, ntdsbclilib, 'DsBackupGetBackupLogsA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsBackupGetBackupLogsA]
- end;
-end;
-
-var
- _DsBackupGetBackupLogsW: Pointer;
-
-function DsBackupGetBackupLogsW;
-begin
- GetProcedureAddress(_DsBackupGetBackupLogsW, ntdsbclilib, 'DsBackupGetBackupLogsW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsBackupGetBackupLogsW]
- end;
-end;
-
-var
- _DsBackupGetBackupLogs: Pointer;
-
-function DsBackupGetBackupLogs;
-begin
- GetProcedureAddress(_DsBackupGetBackupLogs, ntdsbclilib, 'DsBackupGetBackupLogs' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsBackupGetBackupLogs]
- end;
-end;
-
-var
- _DsBackupTruncateLogs: Pointer;
-
-function DsBackupTruncateLogs;
-begin
- GetProcedureAddress(_DsBackupTruncateLogs, ntdsbclilib, 'DsBackupTruncateLogs');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsBackupTruncateLogs]
- end;
-end;
-
-var
- _DsBackupEnd: Pointer;
-
-function DsBackupEnd;
-begin
- GetProcedureAddress(_DsBackupEnd, ntdsbclilib, 'DsBackupEnd');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsBackupEnd]
- end;
-end;
-
-var
- _DsBackupFree: Pointer;
-
-procedure DsBackupFree;
-begin
- GetProcedureAddress(_DsBackupFree, ntdsbclilib, 'DsBackupFree');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsBackupFree]
- end;
-end;
-
-var
- _DsRestoreGetDatabaseLocationsA: Pointer;
-
-function DsRestoreGetDatabaseLocationsA;
-begin
- GetProcedureAddress(_DsRestoreGetDatabaseLocationsA, ntdsbclilib, 'DsRestoreGetDatabaseLocationsA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsRestoreGetDatabaseLocationsA]
- end;
-end;
-
-var
- _DsRestoreGetDatabaseLocationsW: Pointer;
-
-function DsRestoreGetDatabaseLocationsW;
-begin
- GetProcedureAddress(_DsRestoreGetDatabaseLocationsW, ntdsbclilib, 'DsRestoreGetDatabaseLocationsW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsRestoreGetDatabaseLocationsW]
- end;
-end;
-
-var
- _DsRestoreGetDatabaseLocations: Pointer;
-
-function DsRestoreGetDatabaseLocations;
-begin
- GetProcedureAddress(_DsRestoreGetDatabaseLocations, ntdsbclilib, 'DsRestoreGetDatabaseLocations' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsRestoreGetDatabaseLocations]
- end;
-end;
-
-var
- _DsRestorePrepareA: Pointer;
-
-function DsRestorePrepareA;
-begin
- GetProcedureAddress(_DsRestorePrepareA, ntdsbclilib, 'DsRestorePrepareA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsRestorePrepareA]
- end;
-end;
-
-var
- _DsRestorePrepareW: Pointer;
-
-function DsRestorePrepareW;
-begin
- GetProcedureAddress(_DsRestorePrepareW, ntdsbclilib, 'DsRestorePrepareW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsRestorePrepareW]
- end;
-end;
-
-var
- _DsRestorePrepare: Pointer;
-
-function DsRestorePrepare;
-begin
- GetProcedureAddress(_DsRestorePrepare, ntdsbclilib, 'DsRestorePrepare' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsRestorePrepare]
- end;
-end;
-
-var
- _DsRestoreRegisterA: Pointer;
-
-function DsRestoreRegisterA;
-begin
- GetProcedureAddress(_DsRestoreRegisterA, ntdsbclilib, 'DsRestoreRegisterA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsRestoreRegisterA]
- end;
-end;
-
-var
- _DsRestoreRegisterW: Pointer;
-
-function DsRestoreRegisterW;
-begin
- GetProcedureAddress(_DsRestoreRegisterW, ntdsbclilib, 'DsRestoreRegisterW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsRestoreRegisterW]
- end;
-end;
-
-var
- _DsRestoreRegister: Pointer;
-
-function DsRestoreRegister;
-begin
- GetProcedureAddress(_DsRestoreRegister, ntdsbclilib, 'DsRestoreRegister' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsRestoreRegister]
- end;
-end;
-
-var
- _DsRestoreRegisterComplete: Pointer;
-
-function DsRestoreRegisterComplete;
-begin
- GetProcedureAddress(_DsRestoreRegisterComplete, ntdsbclilib, 'DsRestoreRegisterComplete');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsRestoreRegisterComplete]
- end;
-end;
-
-var
- _DsRestoreEnd: Pointer;
-
-function DsRestoreEnd;
-begin
- GetProcedureAddress(_DsRestoreEnd, ntdsbclilib, 'DsRestoreEnd');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsRestoreEnd]
- end;
-end;
-
-var
- _DsSetCurrentBackupLogA: Pointer;
-
-function DsSetCurrentBackupLogA;
-begin
- GetProcedureAddress(_DsSetCurrentBackupLogA, ntdsbclilib, 'DsSetCurrentBackupLogA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsSetCurrentBackupLogA]
- end;
-end;
-
-var
- _DsSetCurrentBackupLogW: Pointer;
-
-function DsSetCurrentBackupLogW;
-begin
- GetProcedureAddress(_DsSetCurrentBackupLogW, ntdsbclilib, 'DsSetCurrentBackupLogW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsSetCurrentBackupLogW]
- end;
-end;
-
-var
- _DsSetCurrentBackupLog: Pointer;
-
-function DsSetCurrentBackupLog;
-begin
- GetProcedureAddress(_DsSetCurrentBackupLog, ntdsbclilib, 'DsSetCurrentBackupLog' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsSetCurrentBackupLog]
- end;
-end;
-
-var
- _DsSetAuthIdentityA: Pointer;
-
-function DsSetAuthIdentityA;
-begin
- GetProcedureAddress(_DsSetAuthIdentityA, ntdsbclilib, 'DsSetAuthIdentityA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsSetAuthIdentityA]
- end;
-end;
-
-var
- _DsSetAuthIdentityW: Pointer;
-
-function DsSetAuthIdentityW;
-begin
- GetProcedureAddress(_DsSetAuthIdentityW, ntdsbclilib, 'DsSetAuthIdentityW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsSetAuthIdentityW]
- end;
-end;
-
-var
- _DsSetAuthIdentity: Pointer;
-
-function DsSetAuthIdentity;
-begin
- GetProcedureAddress(_DsSetAuthIdentity, ntdsbclilib, 'DsSetAuthIdentity' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DsSetAuthIdentity]
- end;
-end;
-
-{$ELSE}
-
-function DsIsNTDSOnlineA; external ntdsbclilib name 'DsIsNTDSOnlineA';
-function DsIsNTDSOnlineW; external ntdsbclilib name 'DsIsNTDSOnlineW';
-function DsIsNTDSOnline; external ntdsbclilib name 'DsIsNTDSOnline' + AWSuffix;
-function DsBackupPrepareA; external ntdsbclilib name 'DsBackupPrepareA';
-function DsBackupPrepareW; external ntdsbclilib name 'DsBackupPrepareW';
-function DsBackupPrepare; external ntdsbclilib name 'DsBackupPrepare' + AWSuffix;
-function DsBackupGetDatabaseNamesA; external ntdsbclilib name 'DsBackupGetDatabaseNamesA';
-function DsBackupGetDatabaseNamesW; external ntdsbclilib name 'DsBackupGetDatabaseNamesW';
-function DsBackupGetDatabaseNames; external ntdsbclilib name 'DsBackupGetDatabaseNames' + AWSuffix;
-function DsBackupOpenFileA; external ntdsbclilib name 'DsBackupOpenFileA';
-function DsBackupOpenFileW; external ntdsbclilib name 'DsBackupOpenFileW';
-function DsBackupOpenFile; external ntdsbclilib name 'DsBackupOpenFile' + AWSuffix;
-function DsBackupRead; external ntdsbclilib name 'DsBackupRead';
-function DsBackupClose; external ntdsbclilib name 'DsBackupClose';
-function DsBackupGetBackupLogsA; external ntdsbclilib name 'DsBackupGetBackupLogsA';
-function DsBackupGetBackupLogsW; external ntdsbclilib name 'DsBackupGetBackupLogsW';
-function DsBackupGetBackupLogs; external ntdsbclilib name 'DsBackupGetBackupLogs' + AWSuffix;
-function DsBackupTruncateLogs; external ntdsbclilib name 'DsBackupTruncateLogs';
-function DsBackupEnd; external ntdsbclilib name 'DsBackupEnd';
-procedure DsBackupFree; external ntdsbclilib name 'DsBackupFree';
-function DsRestoreGetDatabaseLocationsA; external ntdsbclilib name 'DsRestoreGetDatabaseLocationsA';
-function DsRestoreGetDatabaseLocationsW; external ntdsbclilib name 'DsRestoreGetDatabaseLocationsW';
-function DsRestoreGetDatabaseLocations; external ntdsbclilib name 'DsRestoreGetDatabaseLocations' + AWSuffix;
-function DsRestorePrepareA; external ntdsbclilib name 'DsRestorePrepareA';
-function DsRestorePrepareW; external ntdsbclilib name 'DsRestorePrepareW';
-function DsRestorePrepare; external ntdsbclilib name 'DsRestorePrepare' + AWSuffix;
-function DsRestoreRegisterA; external ntdsbclilib name 'DsRestoreRegisterA';
-function DsRestoreRegisterW; external ntdsbclilib name 'DsRestoreRegisterW';
-function DsRestoreRegister; external ntdsbclilib name 'DsRestoreRegister' + AWSuffix;
-function DsRestoreRegisterComplete; external ntdsbclilib name 'DsRestoreRegisterComplete';
-function DsRestoreEnd; external ntdsbclilib name 'DsRestoreEnd';
-function DsSetCurrentBackupLogA; external ntdsbclilib name 'DsSetCurrentBackupLogA';
-function DsSetCurrentBackupLogW; external ntdsbclilib name 'DsSetCurrentBackupLogW';
-function DsSetCurrentBackupLog; external ntdsbclilib name 'DsSetCurrentBackupLog' + AWSuffix;
-function DsSetAuthIdentityA; external ntdsbclilib name 'DsSetAuthIdentityA';
-function DsSetAuthIdentityW; external ntdsbclilib name 'DsSetAuthIdentityW';
-function DsSetAuthIdentity; external ntdsbclilib name 'DsSetAuthIdentity' + AWSuffix;
-
-{$ENDIF DYNAMIC_LINK}
-
-end.
+{******************************************************************************}
+{ }
+{ Directory Backup and Restore API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: ntdsbcli.h, released June 2000. The original Pascal }
+{ code is: NtDsbCli.pas, released December 2000. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwantdsbcli.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaNtDsbCli;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include ":ntdsbcli.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaWinType;
+
+const
+ g_wszBackupAnnotation = 'NTDS Backup Interface';
+ {$EXTERNALSYM g_wszBackupAnnotation}
+ g_aszBackupAnnotation = 'NTDS Backup Interface';
+ {$EXTERNALSYM g_aszBackupAnnotation}
+
+ g_wszRestoreAnnotation = 'NTDS Restore Interface';
+ {$EXTERNALSYM g_wszRestoreAnnotation}
+ g_aszRestoreAnnotation = 'NTDS Restore Interface';
+ {$EXTERNALSYM g_aszRestoreAnnotation}
+
+ {$IFDEF UNICODE}
+ g_szBackupAnnotation = g_wszBackupAnnotation;
+ {$EXTERNALSYM g_szBackupAnnotation}
+ g_szRestoreAnnotation = g_wszRestoreAnnotation;
+ {$EXTERNALSYM g_szRestoreAnnotation}
+ {$ELSE}
+ g_szBackupAnnotation = g_aszBackupAnnotation;
+ {$EXTERNALSYM g_szBackupAnnotation}
+ g_szRestoreAnnotation = g_aszRestoreAnnotation;
+ {$EXTERNALSYM g_szRestoreAnnotation}
+ {$ENDIF UNICODE}
+
+// Type of Backup passed to DsBackupPrepare()
+// BACKUP_TYPE_FULL: Requesting backup of the complete DS (DIT, Log files, and Patch files)
+// BACKUP_TYPE_LOGS_ONLY: Requesting backup of only the log files
+// BACKUP_TYPE_INCREMENTAL: Requesting incremental backup i.e. backing up only changes that happened since last backup
+
+ BACKUP_TYPE_FULL = $01;
+ {$EXTERNALSYM BACKUP_TYPE_FULL}
+ BACKUP_TYPE_LOGS_ONLY = $02;
+ {$EXTERNALSYM BACKUP_TYPE_LOGS_ONLY}
+ BACKUP_TYPE_INCREMENTAL = $04; // not supported in product1
+ {$EXTERNALSYM BACKUP_TYPE_INCREMENTAL}
+
+// Type of Restore passed to DsRestorePrepare()
+// RESTORE_TYPE_AUTHORATATIVE: The restored version wins throughout the enterprise
+// RESTORE_TYPE_ONLINE: Restoration is done when NTDS is online.
+// RESTORE_TYPE_CATCHUP: The restored version is reconciled through the standard reconciliation logic so that the
+// restored DIT can catchup with the rest of the enterprise.
+
+ RESTORE_TYPE_AUTHORATATIVE = $01;
+ {$EXTERNALSYM RESTORE_TYPE_AUTHORATATIVE}
+ RESTORE_TYPE_ONLINE = $02; // not supported in product1
+ {$EXTERNALSYM RESTORE_TYPE_ONLINE}
+ RESTORE_TYPE_CATCHUP = $04; // this is the default restore mode
+ {$EXTERNALSYM RESTORE_TYPE_CATCHUP}
+
+// Setting the current log # to this value would disable incremental/differential backup
+
+ BACKUP_DISABLE_INCREMENTAL = DWORD($ffffffff);
+ {$EXTERNALSYM BACKUP_DISABLE_INCREMENTAL}
+
+// BFT is the bit flag used to represent file types (directory/dit/logfile/etc.)
+// We keep them as a character so that we can append/prepend them to the actual file
+// path. The code in the Backup API's rely on the fact that values 0-256 in 8 bit ascii
+// map to the values 0-256 in unicode.
+
+type
+ {$IFDEF UNICODE}
+ BFT = WCHAR;
+ {$EXTERNALSYM BFT}
+ {$ELSE}
+ BFT = Char;
+ {$EXTERNALSYM BFT}
+ {$ENDIF UNICODE}
+
+// Bit flags:
+// BFT_DIRECTORY - indicates path specified is a directory
+// BFT_DATABASE_DIRECTORY - indicates that file goes into database directory
+// BFT_LOG_DIRECTORY - indicates that the file goes into log directory
+
+const
+ BFT_DIRECTORY = $80;
+ {$EXTERNALSYM BFT_DIRECTORY}
+ BFT_DATABASE_DIRECTORY = $40;
+ {$EXTERNALSYM BFT_DATABASE_DIRECTORY}
+ BFT_LOG_DIRECTORY = $20;
+ {$EXTERNALSYM BFT_LOG_DIRECTORY}
+
+// Following combinations are defined for easy use of the filetype and the directory into
+// into which it goes
+
+ BFT_LOG = BFT($01 or BFT_LOG_DIRECTORY);
+ BFT_LOG_DIR = BFT($02 or BFT_DIRECTORY);
+ BFT_CHECKPOINT_DIR = BFT($03 or BFT_DIRECTORY);
+ BFT_NTDS_DATABASE = BFT($04 or BFT_DATABASE_DIRECTORY);
+ BFT_PATCH_FILE = BFT($05 or BFT_LOG_DIRECTORY);
+ BFT_UNKNOWN = BFT($0F);
+
+// #include <ntdsbmsg.h>
+
+// Backup Context Handle
+
+type
+ HBC = Pointer;
+ {$EXTERNALSYM HBC}
+
+ PEDB_RSTMAPA = ^EDB_RSTMAPA;
+ {$EXTERNALSYM PEDB_RSTMAPA}
+ tagEDB_RSTMAPA = record
+ szDatabaseName: PChar;
+ szNewDtabaseName: PChar;
+ end;
+ {$EXTERNALSYM tagEDB_RSTMAPA}
+ EDB_RSTMAPA = tagEDB_RSTMAPA;
+ {$EXTERNALSYM EDB_RSTMAPA}
+ TEdbRstMapA = EDB_RSTMAPA;
+ PEdbRstMapA = PEDB_RSTMAPA;
+
+// required for NTDS unicode support.
+// UNDONE: NYI
+
+ PEDB_RSTMAPW = ^EDB_RSTMAPW;
+ {$EXTERNALSYM PEDB_RSTMAPW}
+ tagEDB_RSTMAPW = record
+ wszDatabaseName: PWCHAR;
+ wszNewDatabaseName: PWCHAR;
+ end;
+ {$EXTERNALSYM tagEDB_RSTMAPW}
+ EDB_RSTMAPW = tagEDB_RSTMAPW;
+ {$EXTERNALSYM EDB_RSTMAPW}
+ TEdbRstMapW = EDB_RSTMAPW;
+ PEdbRstMapW = PEDB_RSTMAPW;
+
+ {$IFDEF UNICODE}
+ EDB_RSTMAP = EDB_RSTMAPW;
+ {$EXTERNALSYM EDB_RSTMAP}
+ PEDB_RSTMAP = PEDB_RSTMAPW;
+ {$EXTERNALSYM PEDB_RSTMAP}
+ TEdbRstMap = TEdbRstMapW;
+ PEdbRstMap = PEdbRstMapW;
+ {$ELSE}
+ EDB_RSTMAP = EDB_RSTMAPA;
+ {$EXTERNALSYM EDB_RSTMAP}
+ PEDB_RSTMAP = PEDB_RSTMAPA;
+ {$EXTERNALSYM PEDB_RSTMAP}
+ TEdbRstMap = TEdbRstMapA;
+ PEdbRstMap = PEdbRstMapA;
+ {$ENDIF UNICODE}
+
+{*************************************************************************************
+Routine Description:
+
+ DsIsNTDSOnline
+ Checks to see if the NTDS is Online on the given server. This call is
+ guaranteed to return quickly.
+
+ Arguments:
+ [in] szServerName - UNC name of the server to check
+ [out] pfNTDSOnline - pointer to receive the bool result (TRUE if NTDS is
+ online; FALSE, otherwise)
+
+Return Value:
+
+ ERROR_SUCCESS if the call executed successfully;
+ Failure code otherwise.
+**************************************************************************************}
+
+function DsIsNTDSOnlineA(szServerName: LPCSTR; var pfNTDSOnline: BOOL): HRESULT; stdcall;
+{$EXTERNALSYM DsIsNTDSOnlineA}
+function DsIsNTDSOnlineW(szServerName: LPCWSTR; var pfNTDSOnline: BOOL): HRESULT; stdcall;
+{$EXTERNALSYM DsIsNTDSOnlineW}
+function DsIsNTDSOnline(szServerName: LPCTSTR; var pfNTDSOnline: BOOL): HRESULT; stdcall;
+{$EXTERNALSYM DsIsNTDSOnline}
+
+{*************************************************************************************
+Routine Description:
+
+ DsBackupPrepare
+ Prepares the DS for the online backup and returns a Backup Context Handle
+ which should be used in the subsequent calls to other backup functions.
+
+ Arguments:
+ [in] szBackupServer - UNC name of the server to be prepared for online backup
+ [in] grbit - flag to be passed to jet while backing up dbs
+ [in] btFlag - BACKUP_TYPE_FULL or BACKUP_TYPE_LOGS_ONLY
+ [out] ppvExpiryToken - pointer that will receive the pointer to the
+ Expiry Token associated with this backup; Client should save
+ this token and send it back through DsRestorePrepare() when
+ attempting a restore; allocated memory should be freed using
+ DsBackupFree() API by the caller when it is no longer needed.
+ [out] pcbExpiryTokenSize - pointer to receive the size of the expiry token
+ returned.
+ [out] phbc - pointer that will receive the backup context handle
+
+Return Value:
+
+ One of the standard HRESULT success codes;
+ Failure code otherwise.
+**************************************************************************************}
+
+function DsBackupPrepareA(szBackupServer: LPCSTR; grbit: ULONG; btFlag: ULONG;
+ var ppvExpiryToken: PVOID; var pcbExpiryTokenSize: DWORD; var phbc: HBC): HRESULT; stdcall;
+{$EXTERNALSYM DsBackupPrepareA}
+function DsBackupPrepareW(szBackupServer: LPCWSTR; grbit: ULONG; btFlag: ULONG;
+ var ppvExpiryToken: PVOID; var pcbExpiryTokenSize: DWORD; var phbc: HBC): HRESULT; stdcall;
+{$EXTERNALSYM DsBackupPrepareW}
+function DsBackupPrepare(szBackupServer: LPCTSTR; grbit: ULONG; btFlag: ULONG;
+ var ppvExpiryToken: PVOID; var pcbExpiryTokenSize: DWORD; var phbc: HBC): HRESULT; stdcall;
+{$EXTERNALSYM DsBackupPrepare}
+
+{*************************************************************************************
+Routine Description:
+
+ DsBackupGetDatabaseNames
+ Gives the list of data bases that need to be backed up for the given
+ backup context
+
+ Arguments:
+ [in] hbc - backup context handle
+ [out] pszAttachmentInfo - pointer that will receive the pointer to the attachment
+ info; allocated memory should be freed using DsBackupFree() API by the
+ caller when it is no longer needed; Attachment info is an array of
+ null-terminated filenames and and the list is terminated by two-nulls.
+ [out] pcbSize - will receive the number of bytes returned
+Return Value:
+
+ One of the standard HRESULT success codes;
+ Failure code otherwise.
+**************************************************************************************}
+
+function DsBackupGetDatabaseNamesA(hbc: HBC; var pszAttachmentInfo: LPSTR;
+ var pcbSize: DWORD): HRESULT; stdcall;
+{$EXTERNALSYM DsBackupGetDatabaseNamesA}
+function DsBackupGetDatabaseNamesW(hbc: HBC; var pszAttachmentInfo: LPWSTR;
+ var pcbSize: DWORD): HRESULT; stdcall;
+{$EXTERNALSYM DsBackupGetDatabaseNamesW}
+function DsBackupGetDatabaseNames(hbc: HBC; var pszAttachmentInfo: LPTSTR;
+ var pcbSize: DWORD): HRESULT; stdcall;
+{$EXTERNALSYM DsBackupGetDatabaseNames}
+
+{*************************************************************************************
+Routine Description:
+
+ DsBackupOpenFile
+ Opens the given attachment for read.
+
+ Arguments:
+ [in] hbc - backup context handle
+ [in] szAttachmentName - name of the attachment to be opened for read
+ [in] cbReadHintSize - suggested size in bytes that might be used during the
+ subsequent reads on this attachement
+ [out] pliFileSize - pointer to a large integer that would receive the size in
+ bytes of the given attachment
+Return Value:
+
+ One of the standard HRESULT success codes;
+ Failure code otherwise.
+**************************************************************************************}
+
+function DsBackupOpenFileA(hbc: HBC; szAttachmentName: LPCSTR; cbReadHintSize: DWORD;
+ var pliFileSize: LARGE_INTEGER): HRESULT; stdcall;
+{$EXTERNALSYM DsBackupOpenFileA}
+function DsBackupOpenFileW(hbc: HBC; szAttachmentName: LPCWSTR; cbReadHintSize: DWORD;
+ var pliFileSize: LARGE_INTEGER): HRESULT; stdcall;
+{$EXTERNALSYM DsBackupOpenFileW}
+function DsBackupOpenFile(hbc: HBC; szAttachmentName: LPCTSTR; cbReadHintSize: DWORD;
+ var pliFileSize: LARGE_INTEGER): HRESULT; stdcall;
+{$EXTERNALSYM DsBackupOpenFile}
+
+{*************************************************************************************
+Routine Description:
+
+ DsBackupRead
+ Reads the currently open attachment bytes into the given buffer. The client
+ application is expected to call this function repeatedly until it gets the
+ entire file (the application would have received the file size through the
+ DsBackupOpenFile() call before.
+
+ Arguments:
+ [in] hbc - backup context handle
+ [in] pvBuffer - pointer to the buffer that would receive the read data.
+ [in] cbBuffer - specifies the size of the above buffer
+ [out] pcbRead - pointer to receive the actual number of bytes read.
+Return Value:
+
+ One of the standard HRESULT success codes;
+ Failure code otherwise.
+**************************************************************************************}
+
+function DsBackupRead(hbc: HBC; pvBuffer: PVOID; cbBuffer: DWORD; var pcbRead: DWORD): HRESULT; stdcall;
+{$EXTERNALSYM DsBackupRead}
+
+{*************************************************************************************
+Routine Description:
+
+ DsBackupClose
+ To be called by the application after it completes reading all the data in
+ the currently opened attachement.
+
+ Arguments:
+ [in] hbc - backup context handle
+Return Value:
+
+ One of the standard HRESULT success codes;
+ Failure code otherwise.
+**************************************************************************************}
+
+function DsBackupClose(hbc: HBC): HRESULT; stdcall;
+{$EXTERNALSYM DsBackupClose}
+
+{*************************************************************************************
+Routine Description:
+
+ DsBackupGetBackupLogs
+ Gives the list of log files that need to be backed up for the given
+ backup context
+
+ Arguments:
+ [in] hbc - backup context handle
+ [out] pszBackupLogFiles - pointer that will receive the pointer to the list of
+ log files; allocated memory should be freed using DsBackupFree() API by the
+ caller when it is no longer needed; Log files are returned in an array of
+ null-terminated filenames and and the list is terminated by two-nulls.
+ [out] pcbSize - will receive the number of bytes returned
+Return Value:
+
+ One of the standard HRESULT success codes;
+ Failure code otherwise.
+**************************************************************************************}
+
+function DsBackupGetBackupLogsA(hbc: HBC; var pszBackupLogFiles: LPSTR;
+ var pcbSize: DWORD): HRESULT; stdcall;
+{$EXTERNALSYM DsBackupGetBackupLogsA}
+function DsBackupGetBackupLogsW(hbc: HBC; var pszBackupLogFiles: LPWSTR;
+ var pcbSize: DWORD): HRESULT; stdcall;
+{$EXTERNALSYM DsBackupGetBackupLogsW}
+function DsBackupGetBackupLogs(hbc: HBC; var pszBackupLogFiles: LPTSTR;
+ var pcbSize: DWORD): HRESULT; stdcall;
+{$EXTERNALSYM DsBackupGetBackupLogs}
+
+{*************************************************************************************
+Routine Description:
+
+ DsBackupTruncateLogs
+ Called to truncate the already read backup logs.
+
+ Arguments:
+ [in] hbc - backup context handle
+Return Value:
+
+ One of the standard HRESULT success codes;
+ Failure code otherwise.
+**************************************************************************************}
+
+function DsBackupTruncateLogs(hbc: HBC): HRESULT; stdcall;
+{$EXTERNALSYM DsBackupTruncateLogs}
+
+{*************************************************************************************
+Routine Description:
+
+ DsBackupEnd
+ Called to end the current backup session.
+
+ Arguments:
+ [in] hbc - backup context handle of the backup session
+Return Value:
+
+ One of the standard HRESULT success codes;
+ Failure code otherwise.
+**************************************************************************************}
+
+function DsBackupEnd(hbc: HBC): HRESULT; stdcall;
+{$EXTERNALSYM DsBackupEnd}
+
+{*************************************************************************************
+Routine Description:
+
+ DsBackupFree
+ Should be used by the application to free any buffer allocated by the
+ NTDSBCLI dll.
+
+ Arguments:
+ [in] pvBuffer - pointer to the buffer that is to be freed.
+
+ Return Value:
+ None.
+**************************************************************************************}
+
+procedure DsBackupFree(pvBuffer: PVOID); stdcall;
+{$EXTERNALSYM DsBackupFree}
+
+{*************************************************************************************
+Routine Description:
+
+ DsRestoreGetDatabaseLocations
+ Called both at backup time as well at restoration time to get the data base
+ locations for different types of files.
+
+ Arguments:
+ [in] hbc - backup context handle which would have been obtained through
+ DsBackupPrepare() in the backup case and through DsRestorePrepare()
+ in the restore case.
+ [out] pszDatabaseLocationList - pointer that will receive the pointer to the list of
+ database locations; allocated memory should be freed using DsBackupFree() API by the
+ caller when it is no longer needed; locations are returned in an array of
+ null-terminated names and and the list is terminated by two-nulls.
+ The first character of each name is the BFT character that indicates the type
+ of the file and the rest of the name tells gives the path into which that
+ particular type of file should be restored.
+ [out] pcbSize - will receive the number of bytes returned
+Return Value:
+
+ One of the standard HRESULT success codes;
+ Failure code otherwise.
+**************************************************************************************}
+
+function DsRestoreGetDatabaseLocationsA(hbc: HBC; var pszDatabaseLocationList: LPSTR;
+ var pcbSize: DWORD): HRESULT; stdcall;
+{$EXTERNALSYM DsRestoreGetDatabaseLocationsA}
+function DsRestoreGetDatabaseLocationsW(hbc: HBC; var pszDatabaseLocationList: LPWSTR;
+ var pcbSize: DWORD): HRESULT; stdcall;
+{$EXTERNALSYM DsRestoreGetDatabaseLocationsW}
+function DsRestoreGetDatabaseLocations(hbc: HBC; var pszDatabaseLocationList: LPTSTR;
+ var pcbSize: DWORD): HRESULT; stdcall;
+{$EXTERNALSYM DsRestoreGetDatabaseLocations}
+
+{*************************************************************************************
+Routine Description:
+
+ DsRestorePrepare
+ Called to indicate beginning of a restore session.
+
+ Arguments:
+ [in] szServerName - UNC name of the server into which the restore operation is
+ going to be performed.
+ [in] rtFlag - Or'ed combination of RESTORE_TYPE_* flags; 0 if no special flags
+ are to be specified
+ [in] pvExpiryToken - pointer to the expiry token associated with this
+ backup. The client would have received this when they backed up the DS.
+ [in] cbExpiryTokenSize - size of the expiry token.
+ [out] phbc - pointer to receive the backup context handle which is to be passed
+ to the subsequent restore APIs
+
+Return Value:
+
+ One of the standard HRESULT success codes;
+ Failure code otherwise.
+**************************************************************************************}
+
+function DsRestorePrepareA(szServerName: LPCSTR; rtFlag: ULONG; pvExpiryToken: PVOID;
+ cbExpiryTokenSize: DWORD; var phbc: HBC): HRESULT; stdcall;
+{$EXTERNALSYM DsRestorePrepareA}
+function DsRestorePrepareW(szServerName: LPCWSTR; rtFlag: ULONG; pvExpiryToken: PVOID;
+ cbExpiryTokenSize: DWORD; var phbc: HBC): HRESULT; stdcall;
+{$EXTERNALSYM DsRestorePrepareW}
+function DsRestorePrepare(szServerName: LPCTSTR; rtFlag: ULONG; pvExpiryToken: PVOID;
+ cbExpiryTokenSize: DWORD; var phbc: HBC): HRESULT; stdcall;
+{$EXTERNALSYM DsRestorePrepare}
+
+{*************************************************************************************
+Routine Description:
+
+ DsRestoreRegister
+ This will register a restore operation. It will interlock all sbsequent restore
+ operations, and will prevent the restore target from starting until the call
+ to DsRestoreRegisterComplete() is made.
+
+ Arguments:
+ [in] hbc - backup context handle for the restore session.
+ [in] szCheckPointFilePath - path where the check point files are restored
+ [in] szLogPath - path where the log files are restored
+ [in] rgrstmap - restore map
+ [in] crstmap - tells if ther is a new restore map
+ [in] szBackupLogPath - path where the backup logs are located
+ [in] genLow - Lowest log# that was restored in this restore session
+ [in] genHigh - Highest log# that was restored in this restore session
+
+ Return Value:
+
+ One of the standard HRESULT success codes;
+ Failure code otherwise.
+**************************************************************************************}
+
+function DsRestoreRegisterA(hbc: HBC; szCheckPointFilePath, szLogPath: LPCSTR;
+ rgrstmap: PEDB_RSTMAPA; crstmap: LONG; szBackupLogPath: LPCSTR; genLow, genHigh: ULONG): HRESULT; stdcall;
+{$EXTERNALSYM DsRestoreRegisterA}
+function DsRestoreRegisterW(hbc: HBC; szCheckPointFilePath, szLogPath: LPCWSTR;
+ rgrstmap: PEDB_RSTMAPW; crstmap: LONG; szBackupLogPath: LPCWSTR; genLow, genHigh: ULONG): HRESULT; stdcall;
+{$EXTERNALSYM DsRestoreRegisterW}
+function DsRestoreRegister(hbc: HBC; szCheckPointFilePath, szLogPath: LPCTSTR;
+ rgrstmap: PEDB_RSTMAP; crstmap: LONG; szBackupLogPath: LPCTSTR; genLow, genHigh: ULONG): HRESULT; stdcall;
+{$EXTERNALSYM DsRestoreRegister}
+
+{*************************************************************************************
+Routine Description:
+
+ DsRestoreRegisterComplete
+ Called to indicate that a previously registered restore is complete.
+
+ Arguments:
+ [in] hbc - backup context handle
+ [in] hrRestoreState - success code if the restore was successful
+Return Value:
+
+ One of the standard HRESULT success codes;
+ Failure code otherwise.
+**************************************************************************************}
+
+function DsRestoreRegisterComplete(hbc: HBC; hrRestoreState: HRESULT): HRESULT; stdcall;
+{$EXTERNALSYM DsRestoreRegisterComplete}
+
+{*************************************************************************************
+Routine Description:
+
+ DsRestoreEnd
+ Called to end a restore session
+
+ Arguments:
+ [in] hbc - backup context handle
+Return Value:
+
+ One of the standard HRESULT success codes;
+ Failure code otherwise.
+**************************************************************************************}
+
+function DsRestoreEnd(hbc: HBC): HRESULT; stdcall;
+{$EXTERNALSYM DsRestoreEnd}
+
+{*************************************************************************************
+Routine Description:
+
+ DsSetCurrentBackupLog
+ Called to set the current backup log number after a successful restore
+
+ Arguments:
+ [in] szServerName - UNC name of the server for which the current backup log has
+ to be set
+ [in] dwCurrentLog - current log number
+Return Value:
+
+ One of the standard HRESULT success codes;
+ Failure code otherwise.
+**************************************************************************************}
+
+function DsSetCurrentBackupLogA(szServerName: LPCSTR; dwCurrentLog: DWORD): HRESULT; stdcall;
+{$EXTERNALSYM DsSetCurrentBackupLogA}
+function DsSetCurrentBackupLogW(szServerName: LPCWSTR; dwCurrentLog: DWORD): HRESULT; stdcall;
+{$EXTERNALSYM DsSetCurrentBackupLogW}
+function DsSetCurrentBackupLog(szServerName: LPCTSTR; dwCurrentLog: DWORD): HRESULT; stdcall;
+{$EXTERNALSYM DsSetCurrentBackupLog}
+
+{*************************************************************************************
+Routine Description:
+
+ DsSetAuthIdentity
+ Used to set the security context under which the client APIs are to be
+ called. If this function is not called, security context of the current
+ process is assumed.
+
+ Arguments:
+ [in] szUserName - name of the user
+ [in] szDomainName - name of the domain the user belongs to
+ [in] szPassword - password of the user in the specified domain
+
+Return Value:
+
+ One of the standard HRESULT success codes;
+ Failure code otherwise.
+**************************************************************************************}
+
+function DsSetAuthIdentityA(szUserName, szDomainName, szPassword: LPCSTR): HRESULT; stdcall;
+{$EXTERNALSYM DsSetAuthIdentityA}
+function DsSetAuthIdentityW(szUserName, szDomainName, szPassword: LPCWSTR): HRESULT; stdcall;
+{$EXTERNALSYM DsSetAuthIdentityW}
+function DsSetAuthIdentity(szUserName, szDomainName, szPassword: LPCTSTR): HRESULT; stdcall;
+{$EXTERNALSYM DsSetAuthIdentity}
+
+implementation
+
+const
+ ntdsbclilib = 'ntdsbclilib.dll';
+ {$IFDEF UNICODE}
+ AWSuffix = 'W';
+ {$ELSE}
+ AWSuffix = 'A';
+ {$ENDIF UNICODE}
+
+{$IFDEF DYNAMIC_LINK}
+
+var
+ _DsIsNTDSOnlineA: Pointer;
+
+function DsIsNTDSOnlineA;
+begin
+ GetProcedureAddress(_DsIsNTDSOnlineA, ntdsbclilib, 'DsIsNTDSOnlineA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsIsNTDSOnlineA]
+ end;
+end;
+
+var
+ _DsIsNTDSOnlineW: Pointer;
+
+function DsIsNTDSOnlineW;
+begin
+ GetProcedureAddress(_DsIsNTDSOnlineW, ntdsbclilib, 'DsIsNTDSOnlineW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsIsNTDSOnlineW]
+ end;
+end;
+
+var
+ _DsIsNTDSOnline: Pointer;
+
+function DsIsNTDSOnline;
+begin
+ GetProcedureAddress(_DsIsNTDSOnline, ntdsbclilib, 'DsIsNTDSOnline' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsIsNTDSOnline]
+ end;
+end;
+
+var
+ _DsBackupPrepareA: Pointer;
+
+function DsBackupPrepareA;
+begin
+ GetProcedureAddress(_DsBackupPrepareA, ntdsbclilib, 'DsBackupPrepareA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsBackupPrepareA]
+ end;
+end;
+
+var
+ _DsBackupPrepareW: Pointer;
+
+function DsBackupPrepareW;
+begin
+ GetProcedureAddress(_DsBackupPrepareW, ntdsbclilib, 'DsBackupPrepareW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsBackupPrepareW]
+ end;
+end;
+
+var
+ _DsBackupPrepare: Pointer;
+
+function DsBackupPrepare;
+begin
+ GetProcedureAddress(_DsBackupPrepare, ntdsbclilib, 'DsBackupPrepare' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsBackupPrepare]
+ end;
+end;
+
+var
+ _DsBackupGetDatabaseNamesA: Pointer;
+
+function DsBackupGetDatabaseNamesA;
+begin
+ GetProcedureAddress(_DsBackupGetDatabaseNamesA, ntdsbclilib, 'DsBackupGetDatabaseNamesA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsBackupGetDatabaseNamesA]
+ end;
+end;
+
+var
+ _DsBackupGetDatabaseNamesW: Pointer;
+
+function DsBackupGetDatabaseNamesW;
+begin
+ GetProcedureAddress(_DsBackupGetDatabaseNamesW, ntdsbclilib, 'DsBackupGetDatabaseNamesW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsBackupGetDatabaseNamesW]
+ end;
+end;
+
+var
+ _DsBackupGetDatabaseNames: Pointer;
+
+function DsBackupGetDatabaseNames;
+begin
+ GetProcedureAddress(_DsBackupGetDatabaseNames, ntdsbclilib, 'DsBackupGetDatabaseNames' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsBackupGetDatabaseNames]
+ end;
+end;
+
+var
+ _DsBackupOpenFileA: Pointer;
+
+function DsBackupOpenFileA;
+begin
+ GetProcedureAddress(_DsBackupOpenFileA, ntdsbclilib, 'DsBackupOpenFileA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsBackupOpenFileA]
+ end;
+end;
+
+var
+ _DsBackupOpenFileW: Pointer;
+
+function DsBackupOpenFileW;
+begin
+ GetProcedureAddress(_DsBackupOpenFileW, ntdsbclilib, 'DsBackupOpenFileW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsBackupOpenFileW]
+ end;
+end;
+
+var
+ _DsBackupOpenFile: Pointer;
+
+function DsBackupOpenFile;
+begin
+ GetProcedureAddress(_DsBackupOpenFile, ntdsbclilib, 'DsBackupOpenFile' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsBackupOpenFile]
+ end;
+end;
+
+var
+ _DsBackupRead: Pointer;
+
+function DsBackupRead;
+begin
+ GetProcedureAddress(_DsBackupRead, ntdsbclilib, 'DsBackupRead');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsBackupRead]
+ end;
+end;
+
+var
+ _DsBackupClose: Pointer;
+
+function DsBackupClose;
+begin
+ GetProcedureAddress(_DsBackupClose, ntdsbclilib, 'DsBackupClose');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsBackupClose]
+ end;
+end;
+
+var
+ _DsBackupGetBackupLogsA: Pointer;
+
+function DsBackupGetBackupLogsA;
+begin
+ GetProcedureAddress(_DsBackupGetBackupLogsA, ntdsbclilib, 'DsBackupGetBackupLogsA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsBackupGetBackupLogsA]
+ end;
+end;
+
+var
+ _DsBackupGetBackupLogsW: Pointer;
+
+function DsBackupGetBackupLogsW;
+begin
+ GetProcedureAddress(_DsBackupGetBackupLogsW, ntdsbclilib, 'DsBackupGetBackupLogsW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsBackupGetBackupLogsW]
+ end;
+end;
+
+var
+ _DsBackupGetBackupLogs: Pointer;
+
+function DsBackupGetBackupLogs;
+begin
+ GetProcedureAddress(_DsBackupGetBackupLogs, ntdsbclilib, 'DsBackupGetBackupLogs' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsBackupGetBackupLogs]
+ end;
+end;
+
+var
+ _DsBackupTruncateLogs: Pointer;
+
+function DsBackupTruncateLogs;
+begin
+ GetProcedureAddress(_DsBackupTruncateLogs, ntdsbclilib, 'DsBackupTruncateLogs');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsBackupTruncateLogs]
+ end;
+end;
+
+var
+ _DsBackupEnd: Pointer;
+
+function DsBackupEnd;
+begin
+ GetProcedureAddress(_DsBackupEnd, ntdsbclilib, 'DsBackupEnd');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsBackupEnd]
+ end;
+end;
+
+var
+ _DsBackupFree: Pointer;
+
+procedure DsBackupFree;
+begin
+ GetProcedureAddress(_DsBackupFree, ntdsbclilib, 'DsBackupFree');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsBackupFree]
+ end;
+end;
+
+var
+ _DsRestoreGetDatabaseLocationsA: Pointer;
+
+function DsRestoreGetDatabaseLocationsA;
+begin
+ GetProcedureAddress(_DsRestoreGetDatabaseLocationsA, ntdsbclilib, 'DsRestoreGetDatabaseLocationsA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsRestoreGetDatabaseLocationsA]
+ end;
+end;
+
+var
+ _DsRestoreGetDatabaseLocationsW: Pointer;
+
+function DsRestoreGetDatabaseLocationsW;
+begin
+ GetProcedureAddress(_DsRestoreGetDatabaseLocationsW, ntdsbclilib, 'DsRestoreGetDatabaseLocationsW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsRestoreGetDatabaseLocationsW]
+ end;
+end;
+
+var
+ _DsRestoreGetDatabaseLocations: Pointer;
+
+function DsRestoreGetDatabaseLocations;
+begin
+ GetProcedureAddress(_DsRestoreGetDatabaseLocations, ntdsbclilib, 'DsRestoreGetDatabaseLocations' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsRestoreGetDatabaseLocations]
+ end;
+end;
+
+var
+ _DsRestorePrepareA: Pointer;
+
+function DsRestorePrepareA;
+begin
+ GetProcedureAddress(_DsRestorePrepareA, ntdsbclilib, 'DsRestorePrepareA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsRestorePrepareA]
+ end;
+end;
+
+var
+ _DsRestorePrepareW: Pointer;
+
+function DsRestorePrepareW;
+begin
+ GetProcedureAddress(_DsRestorePrepareW, ntdsbclilib, 'DsRestorePrepareW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsRestorePrepareW]
+ end;
+end;
+
+var
+ _DsRestorePrepare: Pointer;
+
+function DsRestorePrepare;
+begin
+ GetProcedureAddress(_DsRestorePrepare, ntdsbclilib, 'DsRestorePrepare' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsRestorePrepare]
+ end;
+end;
+
+var
+ _DsRestoreRegisterA: Pointer;
+
+function DsRestoreRegisterA;
+begin
+ GetProcedureAddress(_DsRestoreRegisterA, ntdsbclilib, 'DsRestoreRegisterA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsRestoreRegisterA]
+ end;
+end;
+
+var
+ _DsRestoreRegisterW: Pointer;
+
+function DsRestoreRegisterW;
+begin
+ GetProcedureAddress(_DsRestoreRegisterW, ntdsbclilib, 'DsRestoreRegisterW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsRestoreRegisterW]
+ end;
+end;
+
+var
+ _DsRestoreRegister: Pointer;
+
+function DsRestoreRegister;
+begin
+ GetProcedureAddress(_DsRestoreRegister, ntdsbclilib, 'DsRestoreRegister' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsRestoreRegister]
+ end;
+end;
+
+var
+ _DsRestoreRegisterComplete: Pointer;
+
+function DsRestoreRegisterComplete;
+begin
+ GetProcedureAddress(_DsRestoreRegisterComplete, ntdsbclilib, 'DsRestoreRegisterComplete');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsRestoreRegisterComplete]
+ end;
+end;
+
+var
+ _DsRestoreEnd: Pointer;
+
+function DsRestoreEnd;
+begin
+ GetProcedureAddress(_DsRestoreEnd, ntdsbclilib, 'DsRestoreEnd');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsRestoreEnd]
+ end;
+end;
+
+var
+ _DsSetCurrentBackupLogA: Pointer;
+
+function DsSetCurrentBackupLogA;
+begin
+ GetProcedureAddress(_DsSetCurrentBackupLogA, ntdsbclilib, 'DsSetCurrentBackupLogA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsSetCurrentBackupLogA]
+ end;
+end;
+
+var
+ _DsSetCurrentBackupLogW: Pointer;
+
+function DsSetCurrentBackupLogW;
+begin
+ GetProcedureAddress(_DsSetCurrentBackupLogW, ntdsbclilib, 'DsSetCurrentBackupLogW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsSetCurrentBackupLogW]
+ end;
+end;
+
+var
+ _DsSetCurrentBackupLog: Pointer;
+
+function DsSetCurrentBackupLog;
+begin
+ GetProcedureAddress(_DsSetCurrentBackupLog, ntdsbclilib, 'DsSetCurrentBackupLog' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsSetCurrentBackupLog]
+ end;
+end;
+
+var
+ _DsSetAuthIdentityA: Pointer;
+
+function DsSetAuthIdentityA;
+begin
+ GetProcedureAddress(_DsSetAuthIdentityA, ntdsbclilib, 'DsSetAuthIdentityA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsSetAuthIdentityA]
+ end;
+end;
+
+var
+ _DsSetAuthIdentityW: Pointer;
+
+function DsSetAuthIdentityW;
+begin
+ GetProcedureAddress(_DsSetAuthIdentityW, ntdsbclilib, 'DsSetAuthIdentityW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsSetAuthIdentityW]
+ end;
+end;
+
+var
+ _DsSetAuthIdentity: Pointer;
+
+function DsSetAuthIdentity;
+begin
+ GetProcedureAddress(_DsSetAuthIdentity, ntdsbclilib, 'DsSetAuthIdentity' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DsSetAuthIdentity]
+ end;
+end;
+
+{$ELSE}
+
+function DsIsNTDSOnlineA; external ntdsbclilib name 'DsIsNTDSOnlineA';
+function DsIsNTDSOnlineW; external ntdsbclilib name 'DsIsNTDSOnlineW';
+function DsIsNTDSOnline; external ntdsbclilib name 'DsIsNTDSOnline' + AWSuffix;
+function DsBackupPrepareA; external ntdsbclilib name 'DsBackupPrepareA';
+function DsBackupPrepareW; external ntdsbclilib name 'DsBackupPrepareW';
+function DsBackupPrepare; external ntdsbclilib name 'DsBackupPrepare' + AWSuffix;
+function DsBackupGetDatabaseNamesA; external ntdsbclilib name 'DsBackupGetDatabaseNamesA';
+function DsBackupGetDatabaseNamesW; external ntdsbclilib name 'DsBackupGetDatabaseNamesW';
+function DsBackupGetDatabaseNames; external ntdsbclilib name 'DsBackupGetDatabaseNames' + AWSuffix;
+function DsBackupOpenFileA; external ntdsbclilib name 'DsBackupOpenFileA';
+function DsBackupOpenFileW; external ntdsbclilib name 'DsBackupOpenFileW';
+function DsBackupOpenFile; external ntdsbclilib name 'DsBackupOpenFile' + AWSuffix;
+function DsBackupRead; external ntdsbclilib name 'DsBackupRead';
+function DsBackupClose; external ntdsbclilib name 'DsBackupClose';
+function DsBackupGetBackupLogsA; external ntdsbclilib name 'DsBackupGetBackupLogsA';
+function DsBackupGetBackupLogsW; external ntdsbclilib name 'DsBackupGetBackupLogsW';
+function DsBackupGetBackupLogs; external ntdsbclilib name 'DsBackupGetBackupLogs' + AWSuffix;
+function DsBackupTruncateLogs; external ntdsbclilib name 'DsBackupTruncateLogs';
+function DsBackupEnd; external ntdsbclilib name 'DsBackupEnd';
+procedure DsBackupFree; external ntdsbclilib name 'DsBackupFree';
+function DsRestoreGetDatabaseLocationsA; external ntdsbclilib name 'DsRestoreGetDatabaseLocationsA';
+function DsRestoreGetDatabaseLocationsW; external ntdsbclilib name 'DsRestoreGetDatabaseLocationsW';
+function DsRestoreGetDatabaseLocations; external ntdsbclilib name 'DsRestoreGetDatabaseLocations' + AWSuffix;
+function DsRestorePrepareA; external ntdsbclilib name 'DsRestorePrepareA';
+function DsRestorePrepareW; external ntdsbclilib name 'DsRestorePrepareW';
+function DsRestorePrepare; external ntdsbclilib name 'DsRestorePrepare' + AWSuffix;
+function DsRestoreRegisterA; external ntdsbclilib name 'DsRestoreRegisterA';
+function DsRestoreRegisterW; external ntdsbclilib name 'DsRestoreRegisterW';
+function DsRestoreRegister; external ntdsbclilib name 'DsRestoreRegister' + AWSuffix;
+function DsRestoreRegisterComplete; external ntdsbclilib name 'DsRestoreRegisterComplete';
+function DsRestoreEnd; external ntdsbclilib name 'DsRestoreEnd';
+function DsSetCurrentBackupLogA; external ntdsbclilib name 'DsSetCurrentBackupLogA';
+function DsSetCurrentBackupLogW; external ntdsbclilib name 'DsSetCurrentBackupLogW';
+function DsSetCurrentBackupLog; external ntdsbclilib name 'DsSetCurrentBackupLog' + AWSuffix;
+function DsSetAuthIdentityA; external ntdsbclilib name 'DsSetAuthIdentityA';
+function DsSetAuthIdentityW; external ntdsbclilib name 'DsSetAuthIdentityW';
+function DsSetAuthIdentity; external ntdsbclilib name 'DsSetAuthIdentity' + AWSuffix;
+
+{$ENDIF DYNAMIC_LINK}
+
+end.
diff --git a/packages/extra/winunits/jwantdsbmsg.pas b/packages/extra/winunits/jwantdsbmsg.pas
index 592a98de6d..dc9f2a8142 100644
--- a/packages/extra/winunits/jwantdsbmsg.pas
+++ b/packages/extra/winunits/jwantdsbmsg.pas
@@ -1,2013 +1,2013 @@
-{******************************************************************************}
-{ }
-{ DS Backup/Restore Error Codes API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: ntdsbmsg.h, released June 2000. The original Pascal }
-{ code is: NtDsBMsg.pas, released December 2000. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwantdsbmsg.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaNtDsBMsg;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "NtDsBMsg.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaWinError, JwaWinType;
-
-//
-// Windows NT Directory Service Backup/Restore API error codes
-// Copyright (C) 1996-1999, Microsoft Corporation
-//
-
-//
-// SUCCESS
-//
-//
-// Values are 32 bit values layed out as follows:
-//
-// 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1
-// 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
-// +---+-+-+-----------------------+-------------------------------+
-// |Sev|C|R| Facility | Code |
-// +---+-+-+-----------------------+-------------------------------+
-//
-// where
-//
-// Sev - is the severity code
-//
-// 00 - Success
-// 01 - Informational
-// 10 - Warning
-// 11 - Error
-//
-// C - is the Customer code flag
-//
-// R - is a reserved bit
-//
-// Facility - is the facility code
-//
-// Code - is the facility's status code
-//
-//
-// Define the facility codes
-//
-
-const
- FACILITY_SYSTEM = $0;
- {$EXTERNALSYM FACILITY_SYSTEM}
- FACILITY_NTDSB = $800;
- {$EXTERNALSYM FACILITY_NTDSB}
- FACILITY_BACKUP = $7FF;
- {$EXTERNALSYM FACILITY_BACKUP}
-
-//
-// Define the severity codes
-//
-
- STATUS_SEVERITY_WARNING = $2;
- {$EXTERNALSYM STATUS_SEVERITY_WARNING}
- STATUS_SEVERITY_SUCCESS = $0;
- {$EXTERNALSYM STATUS_SEVERITY_SUCCESS}
- STATUS_SEVERITY_INFORMATIONAL = $1;
- {$EXTERNALSYM STATUS_SEVERITY_INFORMATIONAL}
- STATUS_SEVERITY_ERROR = $3;
- {$EXTERNALSYM STATUS_SEVERITY_ERROR}
-
-//
-// MessageId: hrNone
-//
-// MessageText:
-//
-// The operation was successful
-//
- hrNone = HRESULT($00000000);
- {$EXTERNALSYM hrNone}
-
-//
-// ERRORS
-//
-//
-// MessageId: hrNyi
-//
-// MessageText:
-//
-// The function is not yet implemented
-//
- hrNyi = HRESULT($C0000001);
- {$EXTERNALSYM hrNyi}
-
-//
-// Backup errors
-//
-//
-// MessageId: hrInvalidParam
-//
-// MessageText:
-//
-// The parameter is not valid.
-//
- hrInvalidParam = HRESULT($C7FF0001);
- {$EXTERNALSYM hrInvalidParam}
-
-//
-// MessageId: hrError
-//
-// MessageText:
-//
-// An internal error has occurred.
-//
- hrError = HRESULT($C7FF0002);
- {$EXTERNALSYM hrError}
-
-//
-// MessageId: hrInvalidHandle
-//
-// MessageText:
-//
-// The handle is not valid.
-//
- hrInvalidHandle = HRESULT($C7FF0003);
- {$EXTERNALSYM hrInvalidHandle}
-
-//
-// MessageId: hrRestoreInProgress
-//
-// MessageText:
-//
-// The Restore process is already in progress.
-//
- hrRestoreInProgress = HRESULT($C7FF0004);
- {$EXTERNALSYM hrRestoreInProgress}
-
-//
-// MessageId: hrAlreadyOpen
-//
-// MessageText:
-//
-// The file specified is already open.
-//
- hrAlreadyOpen = HRESULT($C7FF0005);
- {$EXTERNALSYM hrAlreadyOpen}
-
-//
-// MessageId: hrInvalidRecips
-//
-// MessageText:
-//
-// The recipients are invalid.
-//
- hrInvalidRecips = HRESULT($C7FF0006);
- {$EXTERNALSYM hrInvalidRecips}
-
-//
-// MessageId: hrCouldNotConnect
-//
-// MessageText:
-//
-// Unable to perform the backup. Either you are not connected to the specified backup server
-// or the service you are trying to backup is not running.
-//
- hrCouldNotConnect = HRESULT($C7FF0007);
- {$EXTERNALSYM hrCouldNotConnect}
-
-//
-// MessageId: hrRestoreMapExists
-//
-// MessageText:
-//
-// A restore map already exists for the specified component. You can only specify
-// a restore map when performing a full restore.
-//
- hrRestoreMapExists = HRESULT($C7FF0008);
- {$EXTERNALSYM hrRestoreMapExists}
-
-//
-// MessageId: hrIncrementalBackupDisabled
-//
-// MessageText:
-//
-// Another application has modified the specified Windows NT Directory Service database such that any
-// subsequent backups will fail. You must perform a full backup to fix this problem.
-//
- hrIncrementalBackupDisabled = HRESULT($C7FF0009);
- {$EXTERNALSYM hrIncrementalBackupDisabled}
-
-//
-// MessageId: hrLogFileNotFound
-//
-// MessageText:
-//
-// Unable to perform an incremental backup because a required Windows NT Directory Service database log file could not be found.
-//
- hrLogFileNotFound = HRESULT($C7FF000A);
- {$EXTERNALSYM hrLogFileNotFound}
-
-//
-// MessageId: hrCircularLogging
-//
-// MessageText:
-//
-// The Windows NT Directory Service component specified is configured to use circular database logs.
-// It cannot be backed up without a full backup.
-//
- hrCircularLogging = HRESULT($C7FF000B);
- {$EXTERNALSYM hrCircularLogging}
-
-//
-// MessageId: hrNoFullRestore
-//
-// MessageText:
-//
-// The databases have not been restored to this machine. You cannot restore an incremental backup
-// until a full backup has been restored.
-//
- hrNoFullRestore = HRESULT($C7FF000C);
- {$EXTERNALSYM hrNoFullRestore}
-
-//
-// MessageId: hrCommunicationError
-//
-// MessageText:
-//
-// A communications error occurred while attempting to perform a local backup.
-//
- hrCommunicationError = HRESULT($C7FF000D);
- {$EXTERNALSYM hrCommunicationError}
-
-//
-// MessageId: hrFullBackupNotTaken
-//
-// MessageText:
-//
-// You must perform a full backup before you can perform an incremental backup.
-//
- hrFullBackupNotTaken = HRESULT($C7FF000E);
- {$EXTERNALSYM hrFullBackupNotTaken}
-
-//
-// MessageId: hrMissingExpiryToken
-//
-// MessageText:
-//
-// Expiry token is missing. Cannot restore without knowing the expiry information.
-//
- hrMissingExpiryToken = HRESULT($C7FF000F);
- {$EXTERNALSYM hrMissingExpiryToken}
-
-//
-// MessageId: hrUnknownExpiryTokenFormat
-//
-// MessageText:
-//
-// Expiry token is in unrecognizable format.
-//
- hrUnknownExpiryTokenFormat = HRESULT($C7FF0010);
- {$EXTERNALSYM hrUnknownExpiryTokenFormat}
-
-//
-// MessageId: hrContentsExpired
-//
-// MessageText:
-//
-// DS Contents in the backup copy are out of date. Try restoring with a more recent copy.
-//
- hrContentsExpired = HRESULT($C7FF0011);
- {$EXTERNALSYM hrContentsExpired}
-
- hrAlreadyListening = HRESULT(RPC_S_ALREADY_LISTENING);
- {$EXTERNALSYM hrAlreadyListening}
-
-//
-// ERRORS
-//
-//
-// SYSTEM errors
-//
-//
-// MessageId: hrFileClose
-//
-// MessageText:
-//
-// Unable to close the DOS file
-//
- hrFileClose = HRESULT($C8000066);
- {$EXTERNALSYM hrFileClose}
-
-//
-// MessageId: hrOutOfThreads
-//
-// MessageText:
-//
-// Unable to start a thread because there are none available.
-//
- hrOutOfThreads = HRESULT($C8000067);
- {$EXTERNALSYM hrOutOfThreads}
-
-//
-// MessageId: hrTooManyIO
-//
-// MessageText:
-//
-// The system is busy because there are too many I/Os.
-//
- hrTooManyIO = HRESULT($C8000069);
- {$EXTERNALSYM hrTooManyIO}
-
-//
-// BUFFER MANAGER errors
-//
-//
-// MessageId: hrBFNotSynchronous
-//
-// MessageText:
-//
-// The buffer page has been evicted.
-//
- hrBFNotSynchronous = HRESULT($880000C8);
- {$EXTERNALSYM hrBFNotSynchronous}
-
-//
-// MessageId: hrBFPageNotFound
-//
-// MessageText:
-//
-// Unable to find the page.
-//
- hrBFPageNotFound = HRESULT($880000C9);
- {$EXTERNALSYM hrBFPageNotFound}
-
-//
-// MessageId: hrBFInUse
-//
-// MessageText:
-//
-// Unable to abandon the buffer.
-//
- hrBFInUse = HRESULT($C80000CA);
- {$EXTERNALSYM hrBFInUse}
-
-//
-// DIRECTORY MANAGER errors
-//
-//
-// MessageId: hrPMRecDeleted
-//
-// MessageText:
-//
-// The record has been deleted.
-//
- hrPMRecDeleted = HRESULT($C800012E);
- {$EXTERNALSYM hrPMRecDeleted}
-
-//
-// MessageId: hrRemainingVersions
-//
-// MessageText:
-//
-// There is idle work remaining.
-//
- hrRemainingVersions = HRESULT($88000141);
- {$EXTERNALSYM hrRemainingVersions}
-
-//
-// RECORD MANAGER errors
-//
-//
-// MessageId: hrFLDKeyTooBig
-//
-// MessageText:
-//
-// The key was truncated because it exceeded the maximum length.
-//
- hrFLDKeyTooBig = HRESULT($88000190);
- {$EXTERNALSYM hrFLDKeyTooBig}
-
-//
-// MessageId: hrFLDTooManySegments
-//
-// MessageText:
-//
-// There are too many key segments.
-//
- hrFLDTooManySegments = HRESULT($C8000191);
- {$EXTERNALSYM hrFLDTooManySegments}
-
-//
-// MessageId: hrFLDNullKey
-//
-// MessageText:
-//
-// The key is NULL.
-//
- hrFLDNullKey = HRESULT($88000192);
- {$EXTERNALSYM hrFLDNullKey}
-
-//
-// LOGGING/RECOVERY errors
-//
-//
-// MessageId: hrLogFileCorrupt
-//
-// MessageText:
-//
-// The log file is damaged.
-//
- hrLogFileCorrupt = HRESULT($C80001F5);
- {$EXTERNALSYM hrLogFileCorrupt}
-
-//
-// MessageId: hrNoBackupDirectory
-//
-// MessageText:
-//
-// No backup directory was given.
-//
- hrNoBackupDirectory = HRESULT($C80001F7);
- {$EXTERNALSYM hrNoBackupDirectory}
-
-//
-// MessageId: hrBackupDirectoryNotEmpty
-//
-// MessageText:
-//
-// The backup directory is not empty.
-//
- hrBackupDirectoryNotEmpty = HRESULT($C80001F8);
- {$EXTERNALSYM hrBackupDirectoryNotEmpty}
-
-//
-// MessageId: hrBackupInProgress
-//
-// MessageText:
-//
-// Backup is already active.
-//
- hrBackupInProgress = HRESULT($C80001F9);
- {$EXTERNALSYM hrBackupInProgress}
-
-//
-// MessageId: hrMissingPreviousLogFile
-//
-// MessageText:
-//
-// A log file for the checkpoint is missing.
-//
- hrMissingPreviousLogFile = HRESULT($C80001FD);
- {$EXTERNALSYM hrMissingPreviousLogFile}
-
-//
-// MessageId: hrLogWriteFail
-//
-// MessageText:
-//
-// Unable to write to the log file.
-//
- hrLogWriteFail = HRESULT($C80001FE);
- {$EXTERNALSYM hrLogWriteFail}
-
-//
-// MessageId: hrBadLogVersion
-//
-// MessageText:
-//
-// The version of the log file is not compatible with the version of the Windows NT Directory Service database (NTDS).
-//
- hrBadLogVersion = HRESULT($C8000202);
- {$EXTERNALSYM hrBadLogVersion}
-
-//
-// MessageId: hrInvalidLogSequence
-//
-// MessageText:
-//
-// The time stamp in the next log does not match what was expected.
-//
- hrInvalidLogSequence = HRESULT($C8000203);
- {$EXTERNALSYM hrInvalidLogSequence}
-
-//
-// MessageId: hrLoggingDisabled
-//
-// MessageText:
-//
-// The log is not active.
-//
- hrLoggingDisabled = HRESULT($C8000204);
- {$EXTERNALSYM hrLoggingDisabled}
-
-//
-// MessageId: hrLogBufferTooSmall
-//
-// MessageText:
-//
-// The log buffer is too small to be recovered.
-//
- hrLogBufferTooSmall = HRESULT($C8000205);
- {$EXTERNALSYM hrLogBufferTooSmall}
-
-//
-// MessageId: hrLogSequenceEnd
-//
-// MessageText:
-//
-// The maximum number of log files has been exceeded.
-//
- hrLogSequenceEnd = HRESULT($C8000207);
- {$EXTERNALSYM hrLogSequenceEnd}
-
-//
-// MessageId: hrNoBackup
-//
-// MessageText:
-//
-// There is no backup in progress.
-//
- hrNoBackup = HRESULT($C8000208);
- {$EXTERNALSYM hrNoBackup}
-
-//
-// MessageId: hrInvalidBackupSequence
-//
-// MessageText:
-//
-// The backup call is out of sequence.
-//
- hrInvalidBackupSequence = HRESULT($C8000209);
- {$EXTERNALSYM hrInvalidBackupSequence}
-
-//
-// MessageId: hrBackupNotAllowedYet
-//
-// MessageText:
-//
-// Unable to perform a backup now.
-//
- hrBackupNotAllowedYet = HRESULT($C800020B);
- {$EXTERNALSYM hrBackupNotAllowedYet}
-
-//
-// MessageId: hrDeleteBackupFileFail
-//
-// MessageText:
-//
-// Unable to delete the backup file.
-//
- hrDeleteBackupFileFail = HRESULT($C800020C);
- {$EXTERNALSYM hrDeleteBackupFileFail}
-
-//
-// MessageId: hrMakeBackupDirectoryFail
-//
-// MessageText:
-//
-// Unable to make a backup temporary directory.
-//
- hrMakeBackupDirectoryFail = HRESULT($C800020D);
- {$EXTERNALSYM hrMakeBackupDirectoryFail}
-
-//
-// MessageId: hrInvalidBackup
-//
-// MessageText:
-//
-// An incremental backup cannot be performed when circular logging is enabled.
-//
- hrInvalidBackup = HRESULT($C800020E);
- {$EXTERNALSYM hrInvalidBackup}
-
-//
-// MessageId: hrRecoveredWithErrors
-//
-// MessageText:
-//
-// Errors were encountered during the repair process.
-//
- hrRecoveredWithErrors = HRESULT($C800020F);
- {$EXTERNALSYM hrRecoveredWithErrors}
-
-//
-// MessageId: hrMissingLogFile
-//
-// MessageText:
-//
-// The current log file is missing.
-//
- hrMissingLogFile = HRESULT($C8000210);
- {$EXTERNALSYM hrMissingLogFile}
-
-//
-// MessageId: hrLogDiskFull
-//
-// MessageText:
-//
-// The log disk is full.
-//
- hrLogDiskFull = HRESULT($C8000211);
- {$EXTERNALSYM hrLogDiskFull}
-
-//
-// MessageId: hrBadLogSignature
-//
-// MessageText:
-//
-// A log file is damaged.
-//
- hrBadLogSignature = HRESULT($C8000212);
- {$EXTERNALSYM hrBadLogSignature}
-
-//
-// MessageId: hrBadDbSignature
-//
-// MessageText:
-//
-// A database file is damaged.
-//
- hrBadDbSignature = HRESULT($C8000213);
- {$EXTERNALSYM hrBadDbSignature}
-
-//
-// MessageId: hrBadCheckpointSignature
-//
-// MessageText:
-//
-// A checkpoint file is damaged.
-//
- hrBadCheckpointSignature = HRESULT($C8000214);
- {$EXTERNALSYM hrBadCheckpointSignature}
-
-//
-// MessageId: hrCheckpointCorrupt
-//
-// MessageText:
-//
-// A checkpoint file either could not be found or is damaged.
-//
- hrCheckpointCorrupt = HRESULT($C8000215);
- {$EXTERNALSYM hrCheckpointCorrupt}
-
-//
-// MessageId: hrDatabaseInconsistent
-//
-// MessageText:
-//
-// The database is damaged.
-//
- hrDatabaseInconsistent = HRESULT($C8000226);
- {$EXTERNALSYM hrDatabaseInconsistent}
-
-//
-// MessageId: hrConsistentTimeMismatch
-//
-// MessageText:
-//
-// There is a mismatch in the database's last consistent time.
-//
- hrConsistentTimeMismatch = HRESULT($C8000227);
- {$EXTERNALSYM hrConsistentTimeMismatch}
-
-//
-// MessageId: hrPatchFileMismatch
-//
-// MessageText:
-//
-// The patch file is not generated from this backup.
-//
- hrPatchFileMismatch = HRESULT($C8000228);
- {$EXTERNALSYM hrPatchFileMismatch}
-
-//
-// MessageId: hrRestoreLogTooLow
-//
-// MessageText:
-//
-// The starting log number is too low for the restore.
-//
- hrRestoreLogTooLow = HRESULT($C8000229);
- {$EXTERNALSYM hrRestoreLogTooLow}
-
-//
-// MessageId: hrRestoreLogTooHigh
-//
-// MessageText:
-//
-// The starting log number is too high for the restore.
-//
- hrRestoreLogTooHigh = HRESULT($C800022A);
- {$EXTERNALSYM hrRestoreLogTooHigh}
-
-//
-// MessageId: hrGivenLogFileHasBadSignature
-//
-// MessageText:
-//
-// The log file downloaded from the tape is damaged.
-//
- hrGivenLogFileHasBadSignature = HRESULT($C800022B);
- {$EXTERNALSYM hrGivenLogFileHasBadSignature}
-
-//
-// MessageId: hrGivenLogFileIsNotContiguous
-//
-// MessageText:
-//
-// Unable to find a mandatory log file after the tape was downloaded.
-//
- hrGivenLogFileIsNotContiguous = HRESULT($C800022C);
- {$EXTERNALSYM hrGivenLogFileIsNotContiguous}
-
-//
-// MessageId: hrMissingRestoreLogFiles
-//
-// MessageText:
-//
-// The data is not fully restored because some log files are missing.
-//
- hrMissingRestoreLogFiles = HRESULT($C800022D);
- {$EXTERNALSYM hrMissingRestoreLogFiles}
-
-//
-// MessageId: hrExistingLogFileHasBadSignature
-//
-// MessageText:
-//
-// The log file in the log file path is damaged.
-//
- hrExistingLogFileHasBadSignature = HRESULT($8800022E);
- {$EXTERNALSYM hrExistingLogFileHasBadSignature}
-
-//
-// MessageId: hrExistingLogFileIsNotContiguous
-//
-// MessageText:
-//
-// Unable to find a mandatory log file in the log file path.
-//
- hrExistingLogFileIsNotContiguous = HRESULT($8800022F);
- {$EXTERNALSYM hrExistingLogFileIsNotContiguous}
-
-//
-// MessageId: hrMissingFullBackup
-//
-// MessageText:
-//
-// The database missed a previous full backup before the incremental backup.
-//
- hrMissingFullBackup = HRESULT($C8000230);
- {$EXTERNALSYM hrMissingFullBackup}
-
-//
-// MessageId: hrBadBackupDatabaseSize
-//
-// MessageText:
-//
-// The backup database size must be a multiple of 4K (4096 bytes).
-//
- hrBadBackupDatabaseSize = HRESULT($C8000231);
- {$EXTERNALSYM hrBadBackupDatabaseSize}
-
-//
-// MessageId: hrTermInProgress
-//
-// MessageText:
-//
-// The database is being shut down.
-//
- hrTermInProgress = HRESULT($C80003E8);
- {$EXTERNALSYM hrTermInProgress}
-
-//
-// MessageId: hrFeatureNotAvailable
-//
-// MessageText:
-//
-// The feature is not available.
-//
- hrFeatureNotAvailable = HRESULT($C80003E9);
- {$EXTERNALSYM hrFeatureNotAvailable}
-
-//
-// MessageId: hrInvalidName
-//
-// MessageText:
-//
-// The name is not valid.
-//
- hrInvalidName = HRESULT($C80003EA);
- {$EXTERNALSYM hrInvalidName}
-
-//
-// MessageId: hrInvalidParameter
-//
-// MessageText:
-//
-// The parameter is not valid.
-//
- hrInvalidParameter = HRESULT($C80003EB);
- {$EXTERNALSYM hrInvalidParameter}
-
-//
-// MessageId: hrColumnNull
-//
-// MessageText:
-//
-// The value of the column is null.
-//
- hrColumnNull = HRESULT($880003EC);
- {$EXTERNALSYM hrColumnNull}
-
-//
-// MessageId: hrBufferTruncated
-//
-// MessageText:
-//
-// The buffer is too small for data.
-//
- hrBufferTruncated = HRESULT($880003EE);
- {$EXTERNALSYM hrBufferTruncated}
-
-//
-// MessageId: hrDatabaseAttached
-//
-// MessageText:
-//
-// The database is already attached.
-//
- hrDatabaseAttached = HRESULT($880003EF);
- {$EXTERNALSYM hrDatabaseAttached}
-
-//
-// MessageId: hrInvalidDatabaseId
-//
-// MessageText:
-//
-// The database ID is not valid.
-//
- hrInvalidDatabaseId = HRESULT($C80003F2);
- {$EXTERNALSYM hrInvalidDatabaseId}
-
-//
-// MessageId: hrOutOfMemory
-//
-// MessageText:
-//
-// The computer is out of memory.
-//
- hrOutOfMemory = HRESULT($C80003F3);
- {$EXTERNALSYM hrOutOfMemory}
-
-//
-// MessageId: hrOutOfDatabaseSpace
-//
-// MessageText:
-//
-// The database has reached the maximum size of 16 GB.
-//
- hrOutOfDatabaseSpace = HRESULT($C80003F4);
- {$EXTERNALSYM hrOutOfDatabaseSpace}
-
-//
-// MessageId: hrOutOfCursors
-//
-// MessageText:
-//
-// Out of table cursors.
-//
- hrOutOfCursors = HRESULT($C80003F5);
- {$EXTERNALSYM hrOutOfCursors}
-
-//
-// MessageId: hrOutOfBuffers
-//
-// MessageText:
-//
-// Out of database page buffers.
-//
- hrOutOfBuffers = HRESULT($C80003F6);
- {$EXTERNALSYM hrOutOfBuffers}
-
-//
-// MessageId: hrTooManyIndexes
-//
-// MessageText:
-//
-// There are too many indexes.
-//
- hrTooManyIndexes = HRESULT($C80003F7);
- {$EXTERNALSYM hrTooManyIndexes}
-
-//
-// MessageId: hrTooManyKeys
-//
-// MessageText:
-//
-// There are too many columns in an index.
-//
- hrTooManyKeys = HRESULT($C80003F8);
- {$EXTERNALSYM hrTooManyKeys}
-
-//
-// MessageId: hrRecordDeleted
-//
-// MessageText:
-//
-// The record has been deleted.
-//
- hrRecordDeleted = HRESULT($C80003F9);
- {$EXTERNALSYM hrRecordDeleted}
-
-//
-// MessageId: hrReadVerifyFailure
-//
-// MessageText:
-//
-// A read verification error occurred.
-//
- hrReadVerifyFailure = HRESULT($C80003FA);
- {$EXTERNALSYM hrReadVerifyFailure}
-
-//
-// MessageId: hrOutOfFileHandles
-//
-// MessageText:
-//
-// Out of file handles.
-//
- hrOutOfFileHandles = HRESULT($C80003FC);
- {$EXTERNALSYM hrOutOfFileHandles}
-
-//
-// MessageId: hrDiskIO
-//
-// MessageText:
-//
-// A disk I/O error occurred.
-//
- hrDiskIO = HRESULT($C80003FE);
- {$EXTERNALSYM hrDiskIO}
-
-//
-// MessageId: hrInvalidPath
-//
-// MessageText:
-//
-// The path to the file is not valid.
-//
- hrInvalidPath = HRESULT($C80003FF);
- {$EXTERNALSYM hrInvalidPath}
-
-//
-// MessageId: hrRecordTooBig
-//
-// MessageText:
-//
-// The record has exceeded the maximum size.
-//
- hrRecordTooBig = HRESULT($C8000402);
- {$EXTERNALSYM hrRecordTooBig}
-
-//
-// MessageId: hrTooManyOpenDatabases
-//
-// MessageText:
-//
-// There are too many open databases.
-//
- hrTooManyOpenDatabases = HRESULT($C8000403);
- {$EXTERNALSYM hrTooManyOpenDatabases}
-
-//
-// MessageId: hrInvalidDatabase
-//
-// MessageText:
-//
-// The file is not a database file.
-//
- hrInvalidDatabase = HRESULT($C8000404);
- {$EXTERNALSYM hrInvalidDatabase}
-
-//
-// MessageId: hrNotInitialized
-//
-// MessageText:
-//
-// The database was not yet called.
-//
- hrNotInitialized = HRESULT($C8000405);
- {$EXTERNALSYM hrNotInitialized}
-
-//
-// MessageId: hrAlreadyInitialized
-//
-// MessageText:
-//
-// The database was already called.
-//
- hrAlreadyInitialized = HRESULT($C8000406);
- {$EXTERNALSYM hrAlreadyInitialized}
-
-//
-// MessageId: hrFileAccessDenied
-//
-// MessageText:
-//
-// Unable to access the file.
-//
- hrFileAccessDenied = HRESULT($C8000408);
- {$EXTERNALSYM hrFileAccessDenied}
-
-//
-// MessageId: hrBufferTooSmall
-//
-// MessageText:
-//
-// The buffer is too small.
-//
- hrBufferTooSmall = HRESULT($C800040E);
- {$EXTERNALSYM hrBufferTooSmall}
-
-//
-// MessageId: hrSeekNotEqual
-//
-// MessageText:
-//
-// Either SeekLE or SeekGE did not find an exact match.
-//
- hrSeekNotEqual = HRESULT($8800040F);
- {$EXTERNALSYM hrSeekNotEqual}
-
-//
-// MessageId: hrTooManyColumns
-//
-// MessageText:
-//
-// There are too many columns defined.
-//
- hrTooManyColumns = HRESULT($C8000410);
- {$EXTERNALSYM hrTooManyColumns}
-
-//
-// MessageId: hrContainerNotEmpty
-//
-// MessageText:
-//
-// The container is not empty.
-//
- hrContainerNotEmpty = HRESULT($C8000413);
- {$EXTERNALSYM hrContainerNotEmpty}
-
-//
-// MessageId: hrInvalidFilename
-//
-// MessageText:
-//
-// The filename is not valid.
-//
- hrInvalidFilename = HRESULT($C8000414);
- {$EXTERNALSYM hrInvalidFilename}
-
-//
-// MessageId: hrInvalidBookmark
-//
-// MessageText:
-//
-// The bookmark is not valid.
-//
- hrInvalidBookmark = HRESULT($C8000415);
- {$EXTERNALSYM hrInvalidBookmark}
-
-//
-// MessageId: hrColumnInUse
-//
-// MessageText:
-//
-// The column is used in an index.
-//
- hrColumnInUse = HRESULT($C8000416);
- {$EXTERNALSYM hrColumnInUse}
-
-//
-// MessageId: hrInvalidBufferSize
-//
-// MessageText:
-//
-// The data buffer does not match the column size.
-//
- hrInvalidBufferSize = HRESULT($C8000417);
- {$EXTERNALSYM hrInvalidBufferSize}
-
-//
-// MessageId: hrColumnNotUpdatable
-//
-// MessageText:
-//
-// Unable to set the column value.
-//
- hrColumnNotUpdatable = HRESULT($C8000418);
- {$EXTERNALSYM hrColumnNotUpdatable}
-
-//
-// MessageId: hrIndexInUse
-//
-// MessageText:
-//
-// The index is in use.
-//
- hrIndexInUse = HRESULT($C800041B);
- {$EXTERNALSYM hrIndexInUse}
-
-//
-// MessageId: hrNullKeyDisallowed
-//
-// MessageText:
-//
-// Null keys are not allowed on an index.
-//
- hrNullKeyDisallowed = HRESULT($C800041D);
- {$EXTERNALSYM hrNullKeyDisallowed}
-
-//
-// MessageId: hrNotInTransaction
-//
-// MessageText:
-//
-// The operation must be within a transaction.
-//
- hrNotInTransaction = HRESULT($C800041E);
- {$EXTERNALSYM hrNotInTransaction}
-
-//
-// MessageId: hrNoIdleActivity
-//
-// MessageText:
-//
-// No idle activity occurred.
-//
- hrNoIdleActivity = HRESULT($88000422);
- {$EXTERNALSYM hrNoIdleActivity}
-
-//
-// MessageId: hrTooManyActiveUsers
-//
-// MessageText:
-//
-// There are too many active database users.
-//
- hrTooManyActiveUsers = HRESULT($C8000423);
- {$EXTERNALSYM hrTooManyActiveUsers}
-
-//
-// MessageId: hrInvalidCountry
-//
-// MessageText:
-//
-// The country code is either not known or is not valid.
-//
- hrInvalidCountry = HRESULT($C8000425);
- {$EXTERNALSYM hrInvalidCountry}
-
-//
-// MessageId: hrInvalidLanguageId
-//
-// MessageText:
-//
-// The language ID is either not known or is not valid.
-//
- hrInvalidLanguageId = HRESULT($C8000426);
- {$EXTERNALSYM hrInvalidLanguageId}
-
-//
-// MessageId: hrInvalidCodePage
-//
-// MessageText:
-//
-// The code page is either not known or is not valid.
-//
- hrInvalidCodePage = HRESULT($C8000427);
- {$EXTERNALSYM hrInvalidCodePage}
-
-//
-// MessageId: hrNoWriteLock
-//
-// MessageText:
-//
-// There is no write lock at transaction level 0.
-//
- hrNoWriteLock = HRESULT($8800042B);
- {$EXTERNALSYM hrNoWriteLock}
-
-//
-// MessageId: hrColumnSetNull
-//
-// MessageText:
-//
-// The column value is set to null.
-//
- hrColumnSetNull = HRESULT($8800042C);
- {$EXTERNALSYM hrColumnSetNull}
-
-//
-// MessageId: hrVersionStoreOutOfMemory
-//
-// MessageText:
-//
-// lMaxVerPages exceeded (XJET only)
-//
- hrVersionStoreOutOfMemory = HRESULT($C800042D);
- {$EXTERNALSYM hrVersionStoreOutOfMemory}
-
-//
-// MessageId: hrCurrencyStackOutOfMemory
-//
-// MessageText:
-//
-// Out of cursors.
-//
- hrCurrencyStackOutOfMemory = HRESULT($C800042E);
- {$EXTERNALSYM hrCurrencyStackOutOfMemory}
-
-//
-// MessageId: hrOutOfSessions
-//
-// MessageText:
-//
-// Out of sessions.
-//
- hrOutOfSessions = HRESULT($C800044D);
- {$EXTERNALSYM hrOutOfSessions}
-
-//
-// MessageId: hrWriteConflict
-//
-// MessageText:
-//
-// The write lock failed due to an outstanding write lock.
-//
- hrWriteConflict = HRESULT($C800044E);
- {$EXTERNALSYM hrWriteConflict}
-
-//
-// MessageId: hrTransTooDeep
-//
-// MessageText:
-//
-// The transactions are nested too deeply.
-//
- hrTransTooDeep = HRESULT($C800044F);
- {$EXTERNALSYM hrTransTooDeep}
-
-//
-// MessageId: hrInvalidSesid
-//
-// MessageText:
-//
-// The session handle is not valid.
-//
- hrInvalidSesid = HRESULT($C8000450);
- {$EXTERNALSYM hrInvalidSesid}
-
-//
-// MessageId: hrSessionWriteConflict
-//
-// MessageText:
-//
-// Another session has a private version of the page.
-//
- hrSessionWriteConflict = HRESULT($C8000453);
- {$EXTERNALSYM hrSessionWriteConflict}
-
-//
-// MessageId: hrInTransaction
-//
-// MessageText:
-//
-// The operation is not allowed within a transaction.
-//
- hrInTransaction = HRESULT($C8000454);
- {$EXTERNALSYM hrInTransaction}
-
-//
-// MessageId: hrDatabaseDuplicate
-//
-// MessageText:
-//
-// The database already exists.
-//
- hrDatabaseDuplicate = HRESULT($C80004B1);
- {$EXTERNALSYM hrDatabaseDuplicate}
-
-//
-// MessageId: hrDatabaseInUse
-//
-// MessageText:
-//
-// The database is in use.
-//
- hrDatabaseInUse = HRESULT($C80004B2);
- {$EXTERNALSYM hrDatabaseInUse}
-
-//
-// MessageId: hrDatabaseNotFound
-//
-// MessageText:
-//
-// The database does not exist.
-//
- hrDatabaseNotFound = HRESULT($C80004B3);
- {$EXTERNALSYM hrDatabaseNotFound}
-
-//
-// MessageId: hrDatabaseInvalidName
-//
-// MessageText:
-//
-// The database name is not valid.
-//
- hrDatabaseInvalidName = HRESULT($C80004B4);
- {$EXTERNALSYM hrDatabaseInvalidName}
-
-//
-// MessageId: hrDatabaseInvalidPages
-//
-// MessageText:
-//
-// The number of pages is not valid.
-//
- hrDatabaseInvalidPages = HRESULT($C80004B5);
- {$EXTERNALSYM hrDatabaseInvalidPages}
-
-//
-// MessageId: hrDatabaseCorrupted
-//
-// MessageText:
-//
-// The database file is either damaged or cannot be found.
-//
- hrDatabaseCorrupted = HRESULT($C80004B6);
- {$EXTERNALSYM hrDatabaseCorrupted}
-
-//
-// MessageId: hrDatabaseLocked
-//
-// MessageText:
-//
-// The database is locked.
-//
- hrDatabaseLocked = HRESULT($C80004B7);
- {$EXTERNALSYM hrDatabaseLocked}
-
-//
-// MessageId: hrTableEmpty
-//
-// MessageText:
-//
-// An empty table was opened.
-//
- hrTableEmpty = HRESULT($88000515);
- {$EXTERNALSYM hrTableEmpty}
-
-//
-// MessageId: hrTableLocked
-//
-// MessageText:
-//
-// The table is locked.
-//
- hrTableLocked = HRESULT($C8000516);
- {$EXTERNALSYM hrTableLocked}
-
-//
-// MessageId: hrTableDuplicate
-//
-// MessageText:
-//
-// The table already exists.
-//
- hrTableDuplicate = HRESULT($C8000517);
- {$EXTERNALSYM hrTableDuplicate}
-
-//
-// MessageId: hrTableInUse
-//
-// MessageText:
-//
-// Unable to lock the table because it is already in use.
-//
- hrTableInUse = HRESULT($C8000518);
- {$EXTERNALSYM hrTableInUse}
-
-//
-// MessageId: hrObjectNotFound
-//
-// MessageText:
-//
-// The table or object does not exist.
-//
- hrObjectNotFound = HRESULT($C8000519);
- {$EXTERNALSYM hrObjectNotFound}
-
-//
-// MessageId: hrCannotRename
-//
-// MessageText:
-//
-// Unable to rename the temporary file.
-//
- hrCannotRename = HRESULT($C800051A);
- {$EXTERNALSYM hrCannotRename}
-
-//
-// MessageId: hrDensityInvalid
-//
-// MessageText:
-//
-// The file/index density is not valid.
-//
- hrDensityInvalid = HRESULT($C800051B);
- {$EXTERNALSYM hrDensityInvalid}
-
-//
-// MessageId: hrTableNotEmpty
-//
-// MessageText:
-//
-// Unable to define the clustered index.
-//
- hrTableNotEmpty = HRESULT($C800051C);
- {$EXTERNALSYM hrTableNotEmpty}
-
-//
-// MessageId: hrInvalidTableId
-//
-// MessageText:
-//
-// The table ID is not valid.
-//
- hrInvalidTableId = HRESULT($C800051E);
- {$EXTERNALSYM hrInvalidTableId}
-
-//
-// MessageId: hrTooManyOpenTables
-//
-// MessageText:
-//
-// Unable to open any more tables.
-//
- hrTooManyOpenTables = HRESULT($C800051F);
- {$EXTERNALSYM hrTooManyOpenTables}
-
-//
-// MessageId: hrIllegalOperation
-//
-// MessageText:
-//
-// The operation is not supported on tables.
-//
- hrIllegalOperation = HRESULT($C8000520);
- {$EXTERNALSYM hrIllegalOperation}
-
-//
-// MessageId: hrObjectDuplicate
-//
-// MessageText:
-//
-// The table or object name is already being used.
-//
- hrObjectDuplicate = HRESULT($C8000522);
- {$EXTERNALSYM hrObjectDuplicate}
-
-//
-// MessageId: hrInvalidObject
-//
-// MessageText:
-//
-// The object is not valid for operation.
-//
- hrInvalidObject = HRESULT($C8000524);
- {$EXTERNALSYM hrInvalidObject}
-
-//
-// MessageId: hrIndexCantBuild
-//
-// MessageText:
-//
-// Unable to build a clustered index.
-//
- hrIndexCantBuild = HRESULT($C8000579);
- {$EXTERNALSYM hrIndexCantBuild}
-
-//
-// MessageId: hrIndexHasPrimary
-//
-// MessageText:
-//
-// The primary index is already defined.
-//
- hrIndexHasPrimary = HRESULT($C800057A);
- {$EXTERNALSYM hrIndexHasPrimary}
-
-//
-// MessageId: hrIndexDuplicate
-//
-// MessageText:
-//
-// The index is already defined.
-//
- hrIndexDuplicate = HRESULT($C800057B);
- {$EXTERNALSYM hrIndexDuplicate}
-
-//
-// MessageId: hrIndexNotFound
-//
-// MessageText:
-//
-// The index does not exist.
-//
- hrIndexNotFound = HRESULT($C800057C);
- {$EXTERNALSYM hrIndexNotFound}
-
-//
-// MessageId: hrIndexMustStay
-//
-// MessageText:
-//
-// Unable to delete a clustered index.
-//
- hrIndexMustStay = HRESULT($C800057D);
- {$EXTERNALSYM hrIndexMustStay}
-
-//
-// MessageId: hrIndexInvalidDef
-//
-// MessageText:
-//
-// The index definition is illegal.
-//
- hrIndexInvalidDef = HRESULT($C800057E);
- {$EXTERNALSYM hrIndexInvalidDef}
-
-//
-// MessageId: hrIndexHasClustered
-//
-// MessageText:
-//
-// The clustered index is already defined.
-//
- hrIndexHasClustered = HRESULT($C8000580);
- {$EXTERNALSYM hrIndexHasClustered}
-
-//
-// MessageId: hrCreateIndexFailed
-//
-// MessageText:
-//
-// Unable to create the index because an error occurred while creating a table.
-//
- hrCreateIndexFailed = HRESULT($88000581);
- {$EXTERNALSYM hrCreateIndexFailed}
-
-//
-// MessageId: hrTooManyOpenIndexes
-//
-// MessageText:
-//
-// Out of index description blocks.
-//
- hrTooManyOpenIndexes = HRESULT($C8000582);
- {$EXTERNALSYM hrTooManyOpenIndexes}
-
-//
-// MessageId: hrColumnLong
-//
-// MessageText:
-//
-// The column value is too long.
-//
- hrColumnLong = HRESULT($C80005DD);
- {$EXTERNALSYM hrColumnLong}
-
-//
-// MessageId: hrColumnDoesNotFit
-//
-// MessageText:
-//
-// The field will not fit in the record.
-//
- hrColumnDoesNotFit = HRESULT($C80005DF);
- {$EXTERNALSYM hrColumnDoesNotFit}
-
-//
-// MessageId: hrNullInvalid
-//
-// MessageText:
-//
-// The value cannot be null.
-//
- hrNullInvalid = HRESULT($C80005E0);
- {$EXTERNALSYM hrNullInvalid}
-
-//
-// MessageId: hrColumnIndexed
-//
-// MessageText:
-//
-// Unable to delete because the column is indexed.
-//
- hrColumnIndexed = HRESULT($C80005E1);
- {$EXTERNALSYM hrColumnIndexed}
-
-//
-// MessageId: hrColumnTooBig
-//
-// MessageText:
-//
-// The length of the field exceeds the maximum length.
-//
- hrColumnTooBig = HRESULT($C80005E2);
- {$EXTERNALSYM hrColumnTooBig}
-
-//
-// MessageId: hrColumnNotFound
-//
-// MessageText:
-//
-// Unable to find the column.
-//
- hrColumnNotFound = HRESULT($C80005E3);
- {$EXTERNALSYM hrColumnNotFound}
-
-//
-// MessageId: hrColumnDuplicate
-//
-// MessageText:
-//
-// The field is already defined.
-//
- hrColumnDuplicate = HRESULT($C80005E4);
- {$EXTERNALSYM hrColumnDuplicate}
-
-//
-// MessageId: hrColumn2ndSysMaint
-//
-// MessageText:
-//
-// Only one auto-increment or version column is allowed per table.
-//
- hrColumn2ndSysMaint = HRESULT($C80005E6);
- {$EXTERNALSYM hrColumn2ndSysMaint}
-
-//
-// MessageId: hrInvalidColumnType
-//
-// MessageText:
-//
-// The column data type is not valid.
-//
- hrInvalidColumnType = HRESULT($C80005E7);
- {$EXTERNALSYM hrInvalidColumnType}
-
-//
-// MessageId: hrColumnMaxTruncated
-//
-// MessageText:
-//
-// The column was truncated because it exceeded the maximum length.
-//
- hrColumnMaxTruncated = HRESULT($880005E8);
- {$EXTERNALSYM hrColumnMaxTruncated}
-
-//
-// MessageId: hrColumnCannotIndex
-//
-// MessageText:
-//
-// Unable to index a long value column.
-//
- hrColumnCannotIndex = HRESULT($C80005E9);
- {$EXTERNALSYM hrColumnCannotIndex}
-
-//
-// MessageId: hrTaggedNotNULL
-//
-// MessageText:
-//
-// Tagged columns cannot be null.
-//
- hrTaggedNotNULL = HRESULT($C80005EA);
- {$EXTERNALSYM hrTaggedNotNULL}
-
-//
-// MessageId: hrNoCurrentIndex
-//
-// MessageText:
-//
-// The entry is not valid without a current index.
-//
- hrNoCurrentIndex = HRESULT($C80005EB);
- {$EXTERNALSYM hrNoCurrentIndex}
-
-//
-// MessageId: hrKeyIsMade
-//
-// MessageText:
-//
-// The key is completely made.
-//
- hrKeyIsMade = HRESULT($C80005EC);
- {$EXTERNALSYM hrKeyIsMade}
-
-//
-// MessageId: hrBadColumnId
-//
-// MessageText:
-//
-// The column ID is not correct.
-//
- hrBadColumnId = HRESULT($C80005ED);
- {$EXTERNALSYM hrBadColumnId}
-
-//
-// MessageId: hrBadItagSequence
-//
-// MessageText:
-//
-// There is a bad instance identifier for a multivalued column.
-//
- hrBadItagSequence = HRESULT($C80005EE);
- {$EXTERNALSYM hrBadItagSequence}
-
-//
-// MessageId: hrCannotBeTagged
-//
-// MessageText:
-//
-// AutoIncrement and Version cannot be multivalued.
-//
- hrCannotBeTagged = HRESULT($C80005F1);
- {$EXTERNALSYM hrCannotBeTagged}
-
-//
-// MessageId: hrRecordNotFound
-//
-// MessageText:
-//
-// Unable to find the key.
-//
- hrRecordNotFound = HRESULT($C8000641);
- {$EXTERNALSYM hrRecordNotFound}
-
-//
-// MessageId: hrNoCurrentRecord
-//
-// MessageText:
-//
-// The currency is not on a record.
-//
- hrNoCurrentRecord = HRESULT($C8000643);
- {$EXTERNALSYM hrNoCurrentRecord}
-
-//
-// MessageId: hrRecordClusteredChanged
-//
-// MessageText:
-//
-// A clustered key cannot be changed.
-//
- hrRecordClusteredChanged = HRESULT($C8000644);
- {$EXTERNALSYM hrRecordClusteredChanged}
-
-//
-// MessageId: hrKeyDuplicate
-//
-// MessageText:
-//
-// The key already exists.
-//
- hrKeyDuplicate = HRESULT($C8000645);
- {$EXTERNALSYM hrKeyDuplicate}
-
-//
-// MessageId: hrAlreadyPrepared
-//
-// MessageText:
-//
-// The current entry has already been copied or cleared.
-//
- hrAlreadyPrepared = HRESULT($C8000647);
- {$EXTERNALSYM hrAlreadyPrepared}
-
-//
-// MessageId: hrKeyNotMade
-//
-// MessageText:
-//
-// No key was made.
-//
- hrKeyNotMade = HRESULT($C8000648);
- {$EXTERNALSYM hrKeyNotMade}
-
-//
-// MessageId: hrUpdateNotPrepared
-//
-// MessageText:
-//
-// Update was not prepared.
-//
- hrUpdateNotPrepared = HRESULT($C8000649);
- {$EXTERNALSYM hrUpdateNotPrepared}
-
-//
-// MessageId: hrwrnDataHasChanged
-//
-// MessageText:
-//
-// Data has changed.
-//
- hrwrnDataHasChanged = HRESULT($8800064A);
- {$EXTERNALSYM hrwrnDataHasChanged}
-
-//
-// MessageId: hrerrDataHasChanged
-//
-// MessageText:
-//
-// The operation was abandoned because data has changed.
-//
- hrerrDataHasChanged = HRESULT($C800064B);
- {$EXTERNALSYM hrerrDataHasChanged}
-
-//
-// MessageId: hrKeyChanged
-//
-// MessageText:
-//
-// Moved to a new key.
-//
- hrKeyChanged = HRESULT($88000652);
- {$EXTERNALSYM hrKeyChanged}
-
-//
-// MessageId: hrTooManySorts
-//
-// MessageText:
-//
-// There are too many sort processes.
-//
- hrTooManySorts = HRESULT($C80006A5);
- {$EXTERNALSYM hrTooManySorts}
-
-//
-// MessageId: hrInvalidOnSort
-//
-// MessageText:
-//
-// An operation that is not valid occurred in the sort.
-//
- hrInvalidOnSort = HRESULT($C80006A6);
- {$EXTERNALSYM hrInvalidOnSort}
-
-//
-// MessageId: hrTempFileOpenError
-//
-// MessageText:
-//
-// Unable to open the temporary file.
-//
- hrTempFileOpenError = HRESULT($C800070B);
- {$EXTERNALSYM hrTempFileOpenError}
-
-//
-// MessageId: hrTooManyAttachedDatabases
-//
-// MessageText:
-//
-// There are too many databases open.
-//
- hrTooManyAttachedDatabases = HRESULT($C800070D);
- {$EXTERNALSYM hrTooManyAttachedDatabases}
-
-//
-// MessageId: hrDiskFull
-//
-// MessageText:
-//
-// The disk is full.
-//
- hrDiskFull = HRESULT($C8000710);
- {$EXTERNALSYM hrDiskFull}
-
-//
-// MessageId: hrPermissionDenied
-//
-// MessageText:
-//
-// Permission is denied.
-//
- hrPermissionDenied = HRESULT($C8000711);
- {$EXTERNALSYM hrPermissionDenied}
-
-//
-// MessageId: hrFileNotFound
-//
-// MessageText:
-//
-// Unable to find the file.
-//
- hrFileNotFound = HRESULT($C8000713);
- {$EXTERNALSYM hrFileNotFound}
-
-//
-// MessageId: hrFileOpenReadOnly
-//
-// MessageText:
-//
-// The database file is read only.
-//
- hrFileOpenReadOnly = HRESULT($88000715);
- {$EXTERNALSYM hrFileOpenReadOnly}
-
-//
-// MessageId: hrAfterInitialization
-//
-// MessageText:
-//
-// Unable to restore after initialization.
-//
- hrAfterInitialization = HRESULT($C800073A);
- {$EXTERNALSYM hrAfterInitialization}
-
-//
-// MessageId: hrLogCorrupted
-//
-// MessageText:
-//
-// The database log files are damaged.
-//
- hrLogCorrupted = HRESULT($C800073C);
- {$EXTERNALSYM hrLogCorrupted}
-
-//
-// MessageId: hrInvalidOperation
-//
-// MessageText:
-//
-// The operation is not valid.
-//
- hrInvalidOperation = HRESULT($C8000772);
- {$EXTERNALSYM hrInvalidOperation}
-
-//
-// MessageId: hrAccessDenied
-//
-// MessageText:
-//
-// Access is denied.
-//
- hrAccessDenied = HRESULT($C8000773);
- {$EXTERNALSYM hrAccessDenied}
-
-implementation
-
-end.
+{******************************************************************************}
+{ }
+{ DS Backup/Restore Error Codes API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: ntdsbmsg.h, released June 2000. The original Pascal }
+{ code is: NtDsBMsg.pas, released December 2000. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwantdsbmsg.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaNtDsBMsg;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "NtDsBMsg.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaWinError, JwaWinType;
+
+//
+// Windows NT Directory Service Backup/Restore API error codes
+// Copyright (C) 1996-1999, Microsoft Corporation
+//
+
+//
+// SUCCESS
+//
+//
+// Values are 32 bit values layed out as follows:
+//
+// 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1
+// 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
+// +---+-+-+-----------------------+-------------------------------+
+// |Sev|C|R| Facility | Code |
+// +---+-+-+-----------------------+-------------------------------+
+//
+// where
+//
+// Sev - is the severity code
+//
+// 00 - Success
+// 01 - Informational
+// 10 - Warning
+// 11 - Error
+//
+// C - is the Customer code flag
+//
+// R - is a reserved bit
+//
+// Facility - is the facility code
+//
+// Code - is the facility's status code
+//
+//
+// Define the facility codes
+//
+
+const
+ FACILITY_SYSTEM = $0;
+ {$EXTERNALSYM FACILITY_SYSTEM}
+ FACILITY_NTDSB = $800;
+ {$EXTERNALSYM FACILITY_NTDSB}
+ FACILITY_BACKUP = $7FF;
+ {$EXTERNALSYM FACILITY_BACKUP}
+
+//
+// Define the severity codes
+//
+
+ STATUS_SEVERITY_WARNING = $2;
+ {$EXTERNALSYM STATUS_SEVERITY_WARNING}
+ STATUS_SEVERITY_SUCCESS = $0;
+ {$EXTERNALSYM STATUS_SEVERITY_SUCCESS}
+ STATUS_SEVERITY_INFORMATIONAL = $1;
+ {$EXTERNALSYM STATUS_SEVERITY_INFORMATIONAL}
+ STATUS_SEVERITY_ERROR = $3;
+ {$EXTERNALSYM STATUS_SEVERITY_ERROR}
+
+//
+// MessageId: hrNone
+//
+// MessageText:
+//
+// The operation was successful
+//
+ hrNone = HRESULT($00000000);
+ {$EXTERNALSYM hrNone}
+
+//
+// ERRORS
+//
+//
+// MessageId: hrNyi
+//
+// MessageText:
+//
+// The function is not yet implemented
+//
+ hrNyi = HRESULT($C0000001);
+ {$EXTERNALSYM hrNyi}
+
+//
+// Backup errors
+//
+//
+// MessageId: hrInvalidParam
+//
+// MessageText:
+//
+// The parameter is not valid.
+//
+ hrInvalidParam = HRESULT($C7FF0001);
+ {$EXTERNALSYM hrInvalidParam}
+
+//
+// MessageId: hrError
+//
+// MessageText:
+//
+// An internal error has occurred.
+//
+ hrError = HRESULT($C7FF0002);
+ {$EXTERNALSYM hrError}
+
+//
+// MessageId: hrInvalidHandle
+//
+// MessageText:
+//
+// The handle is not valid.
+//
+ hrInvalidHandle = HRESULT($C7FF0003);
+ {$EXTERNALSYM hrInvalidHandle}
+
+//
+// MessageId: hrRestoreInProgress
+//
+// MessageText:
+//
+// The Restore process is already in progress.
+//
+ hrRestoreInProgress = HRESULT($C7FF0004);
+ {$EXTERNALSYM hrRestoreInProgress}
+
+//
+// MessageId: hrAlreadyOpen
+//
+// MessageText:
+//
+// The file specified is already open.
+//
+ hrAlreadyOpen = HRESULT($C7FF0005);
+ {$EXTERNALSYM hrAlreadyOpen}
+
+//
+// MessageId: hrInvalidRecips
+//
+// MessageText:
+//
+// The recipients are invalid.
+//
+ hrInvalidRecips = HRESULT($C7FF0006);
+ {$EXTERNALSYM hrInvalidRecips}
+
+//
+// MessageId: hrCouldNotConnect
+//
+// MessageText:
+//
+// Unable to perform the backup. Either you are not connected to the specified backup server
+// or the service you are trying to backup is not running.
+//
+ hrCouldNotConnect = HRESULT($C7FF0007);
+ {$EXTERNALSYM hrCouldNotConnect}
+
+//
+// MessageId: hrRestoreMapExists
+//
+// MessageText:
+//
+// A restore map already exists for the specified component. You can only specify
+// a restore map when performing a full restore.
+//
+ hrRestoreMapExists = HRESULT($C7FF0008);
+ {$EXTERNALSYM hrRestoreMapExists}
+
+//
+// MessageId: hrIncrementalBackupDisabled
+//
+// MessageText:
+//
+// Another application has modified the specified Windows NT Directory Service database such that any
+// subsequent backups will fail. You must perform a full backup to fix this problem.
+//
+ hrIncrementalBackupDisabled = HRESULT($C7FF0009);
+ {$EXTERNALSYM hrIncrementalBackupDisabled}
+
+//
+// MessageId: hrLogFileNotFound
+//
+// MessageText:
+//
+// Unable to perform an incremental backup because a required Windows NT Directory Service database log file could not be found.
+//
+ hrLogFileNotFound = HRESULT($C7FF000A);
+ {$EXTERNALSYM hrLogFileNotFound}
+
+//
+// MessageId: hrCircularLogging
+//
+// MessageText:
+//
+// The Windows NT Directory Service component specified is configured to use circular database logs.
+// It cannot be backed up without a full backup.
+//
+ hrCircularLogging = HRESULT($C7FF000B);
+ {$EXTERNALSYM hrCircularLogging}
+
+//
+// MessageId: hrNoFullRestore
+//
+// MessageText:
+//
+// The databases have not been restored to this machine. You cannot restore an incremental backup
+// until a full backup has been restored.
+//
+ hrNoFullRestore = HRESULT($C7FF000C);
+ {$EXTERNALSYM hrNoFullRestore}
+
+//
+// MessageId: hrCommunicationError
+//
+// MessageText:
+//
+// A communications error occurred while attempting to perform a local backup.
+//
+ hrCommunicationError = HRESULT($C7FF000D);
+ {$EXTERNALSYM hrCommunicationError}
+
+//
+// MessageId: hrFullBackupNotTaken
+//
+// MessageText:
+//
+// You must perform a full backup before you can perform an incremental backup.
+//
+ hrFullBackupNotTaken = HRESULT($C7FF000E);
+ {$EXTERNALSYM hrFullBackupNotTaken}
+
+//
+// MessageId: hrMissingExpiryToken
+//
+// MessageText:
+//
+// Expiry token is missing. Cannot restore without knowing the expiry information.
+//
+ hrMissingExpiryToken = HRESULT($C7FF000F);
+ {$EXTERNALSYM hrMissingExpiryToken}
+
+//
+// MessageId: hrUnknownExpiryTokenFormat
+//
+// MessageText:
+//
+// Expiry token is in unrecognizable format.
+//
+ hrUnknownExpiryTokenFormat = HRESULT($C7FF0010);
+ {$EXTERNALSYM hrUnknownExpiryTokenFormat}
+
+//
+// MessageId: hrContentsExpired
+//
+// MessageText:
+//
+// DS Contents in the backup copy are out of date. Try restoring with a more recent copy.
+//
+ hrContentsExpired = HRESULT($C7FF0011);
+ {$EXTERNALSYM hrContentsExpired}
+
+ hrAlreadyListening = HRESULT(RPC_S_ALREADY_LISTENING);
+ {$EXTERNALSYM hrAlreadyListening}
+
+//
+// ERRORS
+//
+//
+// SYSTEM errors
+//
+//
+// MessageId: hrFileClose
+//
+// MessageText:
+//
+// Unable to close the DOS file
+//
+ hrFileClose = HRESULT($C8000066);
+ {$EXTERNALSYM hrFileClose}
+
+//
+// MessageId: hrOutOfThreads
+//
+// MessageText:
+//
+// Unable to start a thread because there are none available.
+//
+ hrOutOfThreads = HRESULT($C8000067);
+ {$EXTERNALSYM hrOutOfThreads}
+
+//
+// MessageId: hrTooManyIO
+//
+// MessageText:
+//
+// The system is busy because there are too many I/Os.
+//
+ hrTooManyIO = HRESULT($C8000069);
+ {$EXTERNALSYM hrTooManyIO}
+
+//
+// BUFFER MANAGER errors
+//
+//
+// MessageId: hrBFNotSynchronous
+//
+// MessageText:
+//
+// The buffer page has been evicted.
+//
+ hrBFNotSynchronous = HRESULT($880000C8);
+ {$EXTERNALSYM hrBFNotSynchronous}
+
+//
+// MessageId: hrBFPageNotFound
+//
+// MessageText:
+//
+// Unable to find the page.
+//
+ hrBFPageNotFound = HRESULT($880000C9);
+ {$EXTERNALSYM hrBFPageNotFound}
+
+//
+// MessageId: hrBFInUse
+//
+// MessageText:
+//
+// Unable to abandon the buffer.
+//
+ hrBFInUse = HRESULT($C80000CA);
+ {$EXTERNALSYM hrBFInUse}
+
+//
+// DIRECTORY MANAGER errors
+//
+//
+// MessageId: hrPMRecDeleted
+//
+// MessageText:
+//
+// The record has been deleted.
+//
+ hrPMRecDeleted = HRESULT($C800012E);
+ {$EXTERNALSYM hrPMRecDeleted}
+
+//
+// MessageId: hrRemainingVersions
+//
+// MessageText:
+//
+// There is idle work remaining.
+//
+ hrRemainingVersions = HRESULT($88000141);
+ {$EXTERNALSYM hrRemainingVersions}
+
+//
+// RECORD MANAGER errors
+//
+//
+// MessageId: hrFLDKeyTooBig
+//
+// MessageText:
+//
+// The key was truncated because it exceeded the maximum length.
+//
+ hrFLDKeyTooBig = HRESULT($88000190);
+ {$EXTERNALSYM hrFLDKeyTooBig}
+
+//
+// MessageId: hrFLDTooManySegments
+//
+// MessageText:
+//
+// There are too many key segments.
+//
+ hrFLDTooManySegments = HRESULT($C8000191);
+ {$EXTERNALSYM hrFLDTooManySegments}
+
+//
+// MessageId: hrFLDNullKey
+//
+// MessageText:
+//
+// The key is NULL.
+//
+ hrFLDNullKey = HRESULT($88000192);
+ {$EXTERNALSYM hrFLDNullKey}
+
+//
+// LOGGING/RECOVERY errors
+//
+//
+// MessageId: hrLogFileCorrupt
+//
+// MessageText:
+//
+// The log file is damaged.
+//
+ hrLogFileCorrupt = HRESULT($C80001F5);
+ {$EXTERNALSYM hrLogFileCorrupt}
+
+//
+// MessageId: hrNoBackupDirectory
+//
+// MessageText:
+//
+// No backup directory was given.
+//
+ hrNoBackupDirectory = HRESULT($C80001F7);
+ {$EXTERNALSYM hrNoBackupDirectory}
+
+//
+// MessageId: hrBackupDirectoryNotEmpty
+//
+// MessageText:
+//
+// The backup directory is not empty.
+//
+ hrBackupDirectoryNotEmpty = HRESULT($C80001F8);
+ {$EXTERNALSYM hrBackupDirectoryNotEmpty}
+
+//
+// MessageId: hrBackupInProgress
+//
+// MessageText:
+//
+// Backup is already active.
+//
+ hrBackupInProgress = HRESULT($C80001F9);
+ {$EXTERNALSYM hrBackupInProgress}
+
+//
+// MessageId: hrMissingPreviousLogFile
+//
+// MessageText:
+//
+// A log file for the checkpoint is missing.
+//
+ hrMissingPreviousLogFile = HRESULT($C80001FD);
+ {$EXTERNALSYM hrMissingPreviousLogFile}
+
+//
+// MessageId: hrLogWriteFail
+//
+// MessageText:
+//
+// Unable to write to the log file.
+//
+ hrLogWriteFail = HRESULT($C80001FE);
+ {$EXTERNALSYM hrLogWriteFail}
+
+//
+// MessageId: hrBadLogVersion
+//
+// MessageText:
+//
+// The version of the log file is not compatible with the version of the Windows NT Directory Service database (NTDS).
+//
+ hrBadLogVersion = HRESULT($C8000202);
+ {$EXTERNALSYM hrBadLogVersion}
+
+//
+// MessageId: hrInvalidLogSequence
+//
+// MessageText:
+//
+// The time stamp in the next log does not match what was expected.
+//
+ hrInvalidLogSequence = HRESULT($C8000203);
+ {$EXTERNALSYM hrInvalidLogSequence}
+
+//
+// MessageId: hrLoggingDisabled
+//
+// MessageText:
+//
+// The log is not active.
+//
+ hrLoggingDisabled = HRESULT($C8000204);
+ {$EXTERNALSYM hrLoggingDisabled}
+
+//
+// MessageId: hrLogBufferTooSmall
+//
+// MessageText:
+//
+// The log buffer is too small to be recovered.
+//
+ hrLogBufferTooSmall = HRESULT($C8000205);
+ {$EXTERNALSYM hrLogBufferTooSmall}
+
+//
+// MessageId: hrLogSequenceEnd
+//
+// MessageText:
+//
+// The maximum number of log files has been exceeded.
+//
+ hrLogSequenceEnd = HRESULT($C8000207);
+ {$EXTERNALSYM hrLogSequenceEnd}
+
+//
+// MessageId: hrNoBackup
+//
+// MessageText:
+//
+// There is no backup in progress.
+//
+ hrNoBackup = HRESULT($C8000208);
+ {$EXTERNALSYM hrNoBackup}
+
+//
+// MessageId: hrInvalidBackupSequence
+//
+// MessageText:
+//
+// The backup call is out of sequence.
+//
+ hrInvalidBackupSequence = HRESULT($C8000209);
+ {$EXTERNALSYM hrInvalidBackupSequence}
+
+//
+// MessageId: hrBackupNotAllowedYet
+//
+// MessageText:
+//
+// Unable to perform a backup now.
+//
+ hrBackupNotAllowedYet = HRESULT($C800020B);
+ {$EXTERNALSYM hrBackupNotAllowedYet}
+
+//
+// MessageId: hrDeleteBackupFileFail
+//
+// MessageText:
+//
+// Unable to delete the backup file.
+//
+ hrDeleteBackupFileFail = HRESULT($C800020C);
+ {$EXTERNALSYM hrDeleteBackupFileFail}
+
+//
+// MessageId: hrMakeBackupDirectoryFail
+//
+// MessageText:
+//
+// Unable to make a backup temporary directory.
+//
+ hrMakeBackupDirectoryFail = HRESULT($C800020D);
+ {$EXTERNALSYM hrMakeBackupDirectoryFail}
+
+//
+// MessageId: hrInvalidBackup
+//
+// MessageText:
+//
+// An incremental backup cannot be performed when circular logging is enabled.
+//
+ hrInvalidBackup = HRESULT($C800020E);
+ {$EXTERNALSYM hrInvalidBackup}
+
+//
+// MessageId: hrRecoveredWithErrors
+//
+// MessageText:
+//
+// Errors were encountered during the repair process.
+//
+ hrRecoveredWithErrors = HRESULT($C800020F);
+ {$EXTERNALSYM hrRecoveredWithErrors}
+
+//
+// MessageId: hrMissingLogFile
+//
+// MessageText:
+//
+// The current log file is missing.
+//
+ hrMissingLogFile = HRESULT($C8000210);
+ {$EXTERNALSYM hrMissingLogFile}
+
+//
+// MessageId: hrLogDiskFull
+//
+// MessageText:
+//
+// The log disk is full.
+//
+ hrLogDiskFull = HRESULT($C8000211);
+ {$EXTERNALSYM hrLogDiskFull}
+
+//
+// MessageId: hrBadLogSignature
+//
+// MessageText:
+//
+// A log file is damaged.
+//
+ hrBadLogSignature = HRESULT($C8000212);
+ {$EXTERNALSYM hrBadLogSignature}
+
+//
+// MessageId: hrBadDbSignature
+//
+// MessageText:
+//
+// A database file is damaged.
+//
+ hrBadDbSignature = HRESULT($C8000213);
+ {$EXTERNALSYM hrBadDbSignature}
+
+//
+// MessageId: hrBadCheckpointSignature
+//
+// MessageText:
+//
+// A checkpoint file is damaged.
+//
+ hrBadCheckpointSignature = HRESULT($C8000214);
+ {$EXTERNALSYM hrBadCheckpointSignature}
+
+//
+// MessageId: hrCheckpointCorrupt
+//
+// MessageText:
+//
+// A checkpoint file either could not be found or is damaged.
+//
+ hrCheckpointCorrupt = HRESULT($C8000215);
+ {$EXTERNALSYM hrCheckpointCorrupt}
+
+//
+// MessageId: hrDatabaseInconsistent
+//
+// MessageText:
+//
+// The database is damaged.
+//
+ hrDatabaseInconsistent = HRESULT($C8000226);
+ {$EXTERNALSYM hrDatabaseInconsistent}
+
+//
+// MessageId: hrConsistentTimeMismatch
+//
+// MessageText:
+//
+// There is a mismatch in the database's last consistent time.
+//
+ hrConsistentTimeMismatch = HRESULT($C8000227);
+ {$EXTERNALSYM hrConsistentTimeMismatch}
+
+//
+// MessageId: hrPatchFileMismatch
+//
+// MessageText:
+//
+// The patch file is not generated from this backup.
+//
+ hrPatchFileMismatch = HRESULT($C8000228);
+ {$EXTERNALSYM hrPatchFileMismatch}
+
+//
+// MessageId: hrRestoreLogTooLow
+//
+// MessageText:
+//
+// The starting log number is too low for the restore.
+//
+ hrRestoreLogTooLow = HRESULT($C8000229);
+ {$EXTERNALSYM hrRestoreLogTooLow}
+
+//
+// MessageId: hrRestoreLogTooHigh
+//
+// MessageText:
+//
+// The starting log number is too high for the restore.
+//
+ hrRestoreLogTooHigh = HRESULT($C800022A);
+ {$EXTERNALSYM hrRestoreLogTooHigh}
+
+//
+// MessageId: hrGivenLogFileHasBadSignature
+//
+// MessageText:
+//
+// The log file downloaded from the tape is damaged.
+//
+ hrGivenLogFileHasBadSignature = HRESULT($C800022B);
+ {$EXTERNALSYM hrGivenLogFileHasBadSignature}
+
+//
+// MessageId: hrGivenLogFileIsNotContiguous
+//
+// MessageText:
+//
+// Unable to find a mandatory log file after the tape was downloaded.
+//
+ hrGivenLogFileIsNotContiguous = HRESULT($C800022C);
+ {$EXTERNALSYM hrGivenLogFileIsNotContiguous}
+
+//
+// MessageId: hrMissingRestoreLogFiles
+//
+// MessageText:
+//
+// The data is not fully restored because some log files are missing.
+//
+ hrMissingRestoreLogFiles = HRESULT($C800022D);
+ {$EXTERNALSYM hrMissingRestoreLogFiles}
+
+//
+// MessageId: hrExistingLogFileHasBadSignature
+//
+// MessageText:
+//
+// The log file in the log file path is damaged.
+//
+ hrExistingLogFileHasBadSignature = HRESULT($8800022E);
+ {$EXTERNALSYM hrExistingLogFileHasBadSignature}
+
+//
+// MessageId: hrExistingLogFileIsNotContiguous
+//
+// MessageText:
+//
+// Unable to find a mandatory log file in the log file path.
+//
+ hrExistingLogFileIsNotContiguous = HRESULT($8800022F);
+ {$EXTERNALSYM hrExistingLogFileIsNotContiguous}
+
+//
+// MessageId: hrMissingFullBackup
+//
+// MessageText:
+//
+// The database missed a previous full backup before the incremental backup.
+//
+ hrMissingFullBackup = HRESULT($C8000230);
+ {$EXTERNALSYM hrMissingFullBackup}
+
+//
+// MessageId: hrBadBackupDatabaseSize
+//
+// MessageText:
+//
+// The backup database size must be a multiple of 4K (4096 bytes).
+//
+ hrBadBackupDatabaseSize = HRESULT($C8000231);
+ {$EXTERNALSYM hrBadBackupDatabaseSize}
+
+//
+// MessageId: hrTermInProgress
+//
+// MessageText:
+//
+// The database is being shut down.
+//
+ hrTermInProgress = HRESULT($C80003E8);
+ {$EXTERNALSYM hrTermInProgress}
+
+//
+// MessageId: hrFeatureNotAvailable
+//
+// MessageText:
+//
+// The feature is not available.
+//
+ hrFeatureNotAvailable = HRESULT($C80003E9);
+ {$EXTERNALSYM hrFeatureNotAvailable}
+
+//
+// MessageId: hrInvalidName
+//
+// MessageText:
+//
+// The name is not valid.
+//
+ hrInvalidName = HRESULT($C80003EA);
+ {$EXTERNALSYM hrInvalidName}
+
+//
+// MessageId: hrInvalidParameter
+//
+// MessageText:
+//
+// The parameter is not valid.
+//
+ hrInvalidParameter = HRESULT($C80003EB);
+ {$EXTERNALSYM hrInvalidParameter}
+
+//
+// MessageId: hrColumnNull
+//
+// MessageText:
+//
+// The value of the column is null.
+//
+ hrColumnNull = HRESULT($880003EC);
+ {$EXTERNALSYM hrColumnNull}
+
+//
+// MessageId: hrBufferTruncated
+//
+// MessageText:
+//
+// The buffer is too small for data.
+//
+ hrBufferTruncated = HRESULT($880003EE);
+ {$EXTERNALSYM hrBufferTruncated}
+
+//
+// MessageId: hrDatabaseAttached
+//
+// MessageText:
+//
+// The database is already attached.
+//
+ hrDatabaseAttached = HRESULT($880003EF);
+ {$EXTERNALSYM hrDatabaseAttached}
+
+//
+// MessageId: hrInvalidDatabaseId
+//
+// MessageText:
+//
+// The database ID is not valid.
+//
+ hrInvalidDatabaseId = HRESULT($C80003F2);
+ {$EXTERNALSYM hrInvalidDatabaseId}
+
+//
+// MessageId: hrOutOfMemory
+//
+// MessageText:
+//
+// The computer is out of memory.
+//
+ hrOutOfMemory = HRESULT($C80003F3);
+ {$EXTERNALSYM hrOutOfMemory}
+
+//
+// MessageId: hrOutOfDatabaseSpace
+//
+// MessageText:
+//
+// The database has reached the maximum size of 16 GB.
+//
+ hrOutOfDatabaseSpace = HRESULT($C80003F4);
+ {$EXTERNALSYM hrOutOfDatabaseSpace}
+
+//
+// MessageId: hrOutOfCursors
+//
+// MessageText:
+//
+// Out of table cursors.
+//
+ hrOutOfCursors = HRESULT($C80003F5);
+ {$EXTERNALSYM hrOutOfCursors}
+
+//
+// MessageId: hrOutOfBuffers
+//
+// MessageText:
+//
+// Out of database page buffers.
+//
+ hrOutOfBuffers = HRESULT($C80003F6);
+ {$EXTERNALSYM hrOutOfBuffers}
+
+//
+// MessageId: hrTooManyIndexes
+//
+// MessageText:
+//
+// There are too many indexes.
+//
+ hrTooManyIndexes = HRESULT($C80003F7);
+ {$EXTERNALSYM hrTooManyIndexes}
+
+//
+// MessageId: hrTooManyKeys
+//
+// MessageText:
+//
+// There are too many columns in an index.
+//
+ hrTooManyKeys = HRESULT($C80003F8);
+ {$EXTERNALSYM hrTooManyKeys}
+
+//
+// MessageId: hrRecordDeleted
+//
+// MessageText:
+//
+// The record has been deleted.
+//
+ hrRecordDeleted = HRESULT($C80003F9);
+ {$EXTERNALSYM hrRecordDeleted}
+
+//
+// MessageId: hrReadVerifyFailure
+//
+// MessageText:
+//
+// A read verification error occurred.
+//
+ hrReadVerifyFailure = HRESULT($C80003FA);
+ {$EXTERNALSYM hrReadVerifyFailure}
+
+//
+// MessageId: hrOutOfFileHandles
+//
+// MessageText:
+//
+// Out of file handles.
+//
+ hrOutOfFileHandles = HRESULT($C80003FC);
+ {$EXTERNALSYM hrOutOfFileHandles}
+
+//
+// MessageId: hrDiskIO
+//
+// MessageText:
+//
+// A disk I/O error occurred.
+//
+ hrDiskIO = HRESULT($C80003FE);
+ {$EXTERNALSYM hrDiskIO}
+
+//
+// MessageId: hrInvalidPath
+//
+// MessageText:
+//
+// The path to the file is not valid.
+//
+ hrInvalidPath = HRESULT($C80003FF);
+ {$EXTERNALSYM hrInvalidPath}
+
+//
+// MessageId: hrRecordTooBig
+//
+// MessageText:
+//
+// The record has exceeded the maximum size.
+//
+ hrRecordTooBig = HRESULT($C8000402);
+ {$EXTERNALSYM hrRecordTooBig}
+
+//
+// MessageId: hrTooManyOpenDatabases
+//
+// MessageText:
+//
+// There are too many open databases.
+//
+ hrTooManyOpenDatabases = HRESULT($C8000403);
+ {$EXTERNALSYM hrTooManyOpenDatabases}
+
+//
+// MessageId: hrInvalidDatabase
+//
+// MessageText:
+//
+// The file is not a database file.
+//
+ hrInvalidDatabase = HRESULT($C8000404);
+ {$EXTERNALSYM hrInvalidDatabase}
+
+//
+// MessageId: hrNotInitialized
+//
+// MessageText:
+//
+// The database was not yet called.
+//
+ hrNotInitialized = HRESULT($C8000405);
+ {$EXTERNALSYM hrNotInitialized}
+
+//
+// MessageId: hrAlreadyInitialized
+//
+// MessageText:
+//
+// The database was already called.
+//
+ hrAlreadyInitialized = HRESULT($C8000406);
+ {$EXTERNALSYM hrAlreadyInitialized}
+
+//
+// MessageId: hrFileAccessDenied
+//
+// MessageText:
+//
+// Unable to access the file.
+//
+ hrFileAccessDenied = HRESULT($C8000408);
+ {$EXTERNALSYM hrFileAccessDenied}
+
+//
+// MessageId: hrBufferTooSmall
+//
+// MessageText:
+//
+// The buffer is too small.
+//
+ hrBufferTooSmall = HRESULT($C800040E);
+ {$EXTERNALSYM hrBufferTooSmall}
+
+//
+// MessageId: hrSeekNotEqual
+//
+// MessageText:
+//
+// Either SeekLE or SeekGE did not find an exact match.
+//
+ hrSeekNotEqual = HRESULT($8800040F);
+ {$EXTERNALSYM hrSeekNotEqual}
+
+//
+// MessageId: hrTooManyColumns
+//
+// MessageText:
+//
+// There are too many columns defined.
+//
+ hrTooManyColumns = HRESULT($C8000410);
+ {$EXTERNALSYM hrTooManyColumns}
+
+//
+// MessageId: hrContainerNotEmpty
+//
+// MessageText:
+//
+// The container is not empty.
+//
+ hrContainerNotEmpty = HRESULT($C8000413);
+ {$EXTERNALSYM hrContainerNotEmpty}
+
+//
+// MessageId: hrInvalidFilename
+//
+// MessageText:
+//
+// The filename is not valid.
+//
+ hrInvalidFilename = HRESULT($C8000414);
+ {$EXTERNALSYM hrInvalidFilename}
+
+//
+// MessageId: hrInvalidBookmark
+//
+// MessageText:
+//
+// The bookmark is not valid.
+//
+ hrInvalidBookmark = HRESULT($C8000415);
+ {$EXTERNALSYM hrInvalidBookmark}
+
+//
+// MessageId: hrColumnInUse
+//
+// MessageText:
+//
+// The column is used in an index.
+//
+ hrColumnInUse = HRESULT($C8000416);
+ {$EXTERNALSYM hrColumnInUse}
+
+//
+// MessageId: hrInvalidBufferSize
+//
+// MessageText:
+//
+// The data buffer does not match the column size.
+//
+ hrInvalidBufferSize = HRESULT($C8000417);
+ {$EXTERNALSYM hrInvalidBufferSize}
+
+//
+// MessageId: hrColumnNotUpdatable
+//
+// MessageText:
+//
+// Unable to set the column value.
+//
+ hrColumnNotUpdatable = HRESULT($C8000418);
+ {$EXTERNALSYM hrColumnNotUpdatable}
+
+//
+// MessageId: hrIndexInUse
+//
+// MessageText:
+//
+// The index is in use.
+//
+ hrIndexInUse = HRESULT($C800041B);
+ {$EXTERNALSYM hrIndexInUse}
+
+//
+// MessageId: hrNullKeyDisallowed
+//
+// MessageText:
+//
+// Null keys are not allowed on an index.
+//
+ hrNullKeyDisallowed = HRESULT($C800041D);
+ {$EXTERNALSYM hrNullKeyDisallowed}
+
+//
+// MessageId: hrNotInTransaction
+//
+// MessageText:
+//
+// The operation must be within a transaction.
+//
+ hrNotInTransaction = HRESULT($C800041E);
+ {$EXTERNALSYM hrNotInTransaction}
+
+//
+// MessageId: hrNoIdleActivity
+//
+// MessageText:
+//
+// No idle activity occurred.
+//
+ hrNoIdleActivity = HRESULT($88000422);
+ {$EXTERNALSYM hrNoIdleActivity}
+
+//
+// MessageId: hrTooManyActiveUsers
+//
+// MessageText:
+//
+// There are too many active database users.
+//
+ hrTooManyActiveUsers = HRESULT($C8000423);
+ {$EXTERNALSYM hrTooManyActiveUsers}
+
+//
+// MessageId: hrInvalidCountry
+//
+// MessageText:
+//
+// The country code is either not known or is not valid.
+//
+ hrInvalidCountry = HRESULT($C8000425);
+ {$EXTERNALSYM hrInvalidCountry}
+
+//
+// MessageId: hrInvalidLanguageId
+//
+// MessageText:
+//
+// The language ID is either not known or is not valid.
+//
+ hrInvalidLanguageId = HRESULT($C8000426);
+ {$EXTERNALSYM hrInvalidLanguageId}
+
+//
+// MessageId: hrInvalidCodePage
+//
+// MessageText:
+//
+// The code page is either not known or is not valid.
+//
+ hrInvalidCodePage = HRESULT($C8000427);
+ {$EXTERNALSYM hrInvalidCodePage}
+
+//
+// MessageId: hrNoWriteLock
+//
+// MessageText:
+//
+// There is no write lock at transaction level 0.
+//
+ hrNoWriteLock = HRESULT($8800042B);
+ {$EXTERNALSYM hrNoWriteLock}
+
+//
+// MessageId: hrColumnSetNull
+//
+// MessageText:
+//
+// The column value is set to null.
+//
+ hrColumnSetNull = HRESULT($8800042C);
+ {$EXTERNALSYM hrColumnSetNull}
+
+//
+// MessageId: hrVersionStoreOutOfMemory
+//
+// MessageText:
+//
+// lMaxVerPages exceeded (XJET only)
+//
+ hrVersionStoreOutOfMemory = HRESULT($C800042D);
+ {$EXTERNALSYM hrVersionStoreOutOfMemory}
+
+//
+// MessageId: hrCurrencyStackOutOfMemory
+//
+// MessageText:
+//
+// Out of cursors.
+//
+ hrCurrencyStackOutOfMemory = HRESULT($C800042E);
+ {$EXTERNALSYM hrCurrencyStackOutOfMemory}
+
+//
+// MessageId: hrOutOfSessions
+//
+// MessageText:
+//
+// Out of sessions.
+//
+ hrOutOfSessions = HRESULT($C800044D);
+ {$EXTERNALSYM hrOutOfSessions}
+
+//
+// MessageId: hrWriteConflict
+//
+// MessageText:
+//
+// The write lock failed due to an outstanding write lock.
+//
+ hrWriteConflict = HRESULT($C800044E);
+ {$EXTERNALSYM hrWriteConflict}
+
+//
+// MessageId: hrTransTooDeep
+//
+// MessageText:
+//
+// The transactions are nested too deeply.
+//
+ hrTransTooDeep = HRESULT($C800044F);
+ {$EXTERNALSYM hrTransTooDeep}
+
+//
+// MessageId: hrInvalidSesid
+//
+// MessageText:
+//
+// The session handle is not valid.
+//
+ hrInvalidSesid = HRESULT($C8000450);
+ {$EXTERNALSYM hrInvalidSesid}
+
+//
+// MessageId: hrSessionWriteConflict
+//
+// MessageText:
+//
+// Another session has a private version of the page.
+//
+ hrSessionWriteConflict = HRESULT($C8000453);
+ {$EXTERNALSYM hrSessionWriteConflict}
+
+//
+// MessageId: hrInTransaction
+//
+// MessageText:
+//
+// The operation is not allowed within a transaction.
+//
+ hrInTransaction = HRESULT($C8000454);
+ {$EXTERNALSYM hrInTransaction}
+
+//
+// MessageId: hrDatabaseDuplicate
+//
+// MessageText:
+//
+// The database already exists.
+//
+ hrDatabaseDuplicate = HRESULT($C80004B1);
+ {$EXTERNALSYM hrDatabaseDuplicate}
+
+//
+// MessageId: hrDatabaseInUse
+//
+// MessageText:
+//
+// The database is in use.
+//
+ hrDatabaseInUse = HRESULT($C80004B2);
+ {$EXTERNALSYM hrDatabaseInUse}
+
+//
+// MessageId: hrDatabaseNotFound
+//
+// MessageText:
+//
+// The database does not exist.
+//
+ hrDatabaseNotFound = HRESULT($C80004B3);
+ {$EXTERNALSYM hrDatabaseNotFound}
+
+//
+// MessageId: hrDatabaseInvalidName
+//
+// MessageText:
+//
+// The database name is not valid.
+//
+ hrDatabaseInvalidName = HRESULT($C80004B4);
+ {$EXTERNALSYM hrDatabaseInvalidName}
+
+//
+// MessageId: hrDatabaseInvalidPages
+//
+// MessageText:
+//
+// The number of pages is not valid.
+//
+ hrDatabaseInvalidPages = HRESULT($C80004B5);
+ {$EXTERNALSYM hrDatabaseInvalidPages}
+
+//
+// MessageId: hrDatabaseCorrupted
+//
+// MessageText:
+//
+// The database file is either damaged or cannot be found.
+//
+ hrDatabaseCorrupted = HRESULT($C80004B6);
+ {$EXTERNALSYM hrDatabaseCorrupted}
+
+//
+// MessageId: hrDatabaseLocked
+//
+// MessageText:
+//
+// The database is locked.
+//
+ hrDatabaseLocked = HRESULT($C80004B7);
+ {$EXTERNALSYM hrDatabaseLocked}
+
+//
+// MessageId: hrTableEmpty
+//
+// MessageText:
+//
+// An empty table was opened.
+//
+ hrTableEmpty = HRESULT($88000515);
+ {$EXTERNALSYM hrTableEmpty}
+
+//
+// MessageId: hrTableLocked
+//
+// MessageText:
+//
+// The table is locked.
+//
+ hrTableLocked = HRESULT($C8000516);
+ {$EXTERNALSYM hrTableLocked}
+
+//
+// MessageId: hrTableDuplicate
+//
+// MessageText:
+//
+// The table already exists.
+//
+ hrTableDuplicate = HRESULT($C8000517);
+ {$EXTERNALSYM hrTableDuplicate}
+
+//
+// MessageId: hrTableInUse
+//
+// MessageText:
+//
+// Unable to lock the table because it is already in use.
+//
+ hrTableInUse = HRESULT($C8000518);
+ {$EXTERNALSYM hrTableInUse}
+
+//
+// MessageId: hrObjectNotFound
+//
+// MessageText:
+//
+// The table or object does not exist.
+//
+ hrObjectNotFound = HRESULT($C8000519);
+ {$EXTERNALSYM hrObjectNotFound}
+
+//
+// MessageId: hrCannotRename
+//
+// MessageText:
+//
+// Unable to rename the temporary file.
+//
+ hrCannotRename = HRESULT($C800051A);
+ {$EXTERNALSYM hrCannotRename}
+
+//
+// MessageId: hrDensityInvalid
+//
+// MessageText:
+//
+// The file/index density is not valid.
+//
+ hrDensityInvalid = HRESULT($C800051B);
+ {$EXTERNALSYM hrDensityInvalid}
+
+//
+// MessageId: hrTableNotEmpty
+//
+// MessageText:
+//
+// Unable to define the clustered index.
+//
+ hrTableNotEmpty = HRESULT($C800051C);
+ {$EXTERNALSYM hrTableNotEmpty}
+
+//
+// MessageId: hrInvalidTableId
+//
+// MessageText:
+//
+// The table ID is not valid.
+//
+ hrInvalidTableId = HRESULT($C800051E);
+ {$EXTERNALSYM hrInvalidTableId}
+
+//
+// MessageId: hrTooManyOpenTables
+//
+// MessageText:
+//
+// Unable to open any more tables.
+//
+ hrTooManyOpenTables = HRESULT($C800051F);
+ {$EXTERNALSYM hrTooManyOpenTables}
+
+//
+// MessageId: hrIllegalOperation
+//
+// MessageText:
+//
+// The operation is not supported on tables.
+//
+ hrIllegalOperation = HRESULT($C8000520);
+ {$EXTERNALSYM hrIllegalOperation}
+
+//
+// MessageId: hrObjectDuplicate
+//
+// MessageText:
+//
+// The table or object name is already being used.
+//
+ hrObjectDuplicate = HRESULT($C8000522);
+ {$EXTERNALSYM hrObjectDuplicate}
+
+//
+// MessageId: hrInvalidObject
+//
+// MessageText:
+//
+// The object is not valid for operation.
+//
+ hrInvalidObject = HRESULT($C8000524);
+ {$EXTERNALSYM hrInvalidObject}
+
+//
+// MessageId: hrIndexCantBuild
+//
+// MessageText:
+//
+// Unable to build a clustered index.
+//
+ hrIndexCantBuild = HRESULT($C8000579);
+ {$EXTERNALSYM hrIndexCantBuild}
+
+//
+// MessageId: hrIndexHasPrimary
+//
+// MessageText:
+//
+// The primary index is already defined.
+//
+ hrIndexHasPrimary = HRESULT($C800057A);
+ {$EXTERNALSYM hrIndexHasPrimary}
+
+//
+// MessageId: hrIndexDuplicate
+//
+// MessageText:
+//
+// The index is already defined.
+//
+ hrIndexDuplicate = HRESULT($C800057B);
+ {$EXTERNALSYM hrIndexDuplicate}
+
+//
+// MessageId: hrIndexNotFound
+//
+// MessageText:
+//
+// The index does not exist.
+//
+ hrIndexNotFound = HRESULT($C800057C);
+ {$EXTERNALSYM hrIndexNotFound}
+
+//
+// MessageId: hrIndexMustStay
+//
+// MessageText:
+//
+// Unable to delete a clustered index.
+//
+ hrIndexMustStay = HRESULT($C800057D);
+ {$EXTERNALSYM hrIndexMustStay}
+
+//
+// MessageId: hrIndexInvalidDef
+//
+// MessageText:
+//
+// The index definition is illegal.
+//
+ hrIndexInvalidDef = HRESULT($C800057E);
+ {$EXTERNALSYM hrIndexInvalidDef}
+
+//
+// MessageId: hrIndexHasClustered
+//
+// MessageText:
+//
+// The clustered index is already defined.
+//
+ hrIndexHasClustered = HRESULT($C8000580);
+ {$EXTERNALSYM hrIndexHasClustered}
+
+//
+// MessageId: hrCreateIndexFailed
+//
+// MessageText:
+//
+// Unable to create the index because an error occurred while creating a table.
+//
+ hrCreateIndexFailed = HRESULT($88000581);
+ {$EXTERNALSYM hrCreateIndexFailed}
+
+//
+// MessageId: hrTooManyOpenIndexes
+//
+// MessageText:
+//
+// Out of index description blocks.
+//
+ hrTooManyOpenIndexes = HRESULT($C8000582);
+ {$EXTERNALSYM hrTooManyOpenIndexes}
+
+//
+// MessageId: hrColumnLong
+//
+// MessageText:
+//
+// The column value is too long.
+//
+ hrColumnLong = HRESULT($C80005DD);
+ {$EXTERNALSYM hrColumnLong}
+
+//
+// MessageId: hrColumnDoesNotFit
+//
+// MessageText:
+//
+// The field will not fit in the record.
+//
+ hrColumnDoesNotFit = HRESULT($C80005DF);
+ {$EXTERNALSYM hrColumnDoesNotFit}
+
+//
+// MessageId: hrNullInvalid
+//
+// MessageText:
+//
+// The value cannot be null.
+//
+ hrNullInvalid = HRESULT($C80005E0);
+ {$EXTERNALSYM hrNullInvalid}
+
+//
+// MessageId: hrColumnIndexed
+//
+// MessageText:
+//
+// Unable to delete because the column is indexed.
+//
+ hrColumnIndexed = HRESULT($C80005E1);
+ {$EXTERNALSYM hrColumnIndexed}
+
+//
+// MessageId: hrColumnTooBig
+//
+// MessageText:
+//
+// The length of the field exceeds the maximum length.
+//
+ hrColumnTooBig = HRESULT($C80005E2);
+ {$EXTERNALSYM hrColumnTooBig}
+
+//
+// MessageId: hrColumnNotFound
+//
+// MessageText:
+//
+// Unable to find the column.
+//
+ hrColumnNotFound = HRESULT($C80005E3);
+ {$EXTERNALSYM hrColumnNotFound}
+
+//
+// MessageId: hrColumnDuplicate
+//
+// MessageText:
+//
+// The field is already defined.
+//
+ hrColumnDuplicate = HRESULT($C80005E4);
+ {$EXTERNALSYM hrColumnDuplicate}
+
+//
+// MessageId: hrColumn2ndSysMaint
+//
+// MessageText:
+//
+// Only one auto-increment or version column is allowed per table.
+//
+ hrColumn2ndSysMaint = HRESULT($C80005E6);
+ {$EXTERNALSYM hrColumn2ndSysMaint}
+
+//
+// MessageId: hrInvalidColumnType
+//
+// MessageText:
+//
+// The column data type is not valid.
+//
+ hrInvalidColumnType = HRESULT($C80005E7);
+ {$EXTERNALSYM hrInvalidColumnType}
+
+//
+// MessageId: hrColumnMaxTruncated
+//
+// MessageText:
+//
+// The column was truncated because it exceeded the maximum length.
+//
+ hrColumnMaxTruncated = HRESULT($880005E8);
+ {$EXTERNALSYM hrColumnMaxTruncated}
+
+//
+// MessageId: hrColumnCannotIndex
+//
+// MessageText:
+//
+// Unable to index a long value column.
+//
+ hrColumnCannotIndex = HRESULT($C80005E9);
+ {$EXTERNALSYM hrColumnCannotIndex}
+
+//
+// MessageId: hrTaggedNotNULL
+//
+// MessageText:
+//
+// Tagged columns cannot be null.
+//
+ hrTaggedNotNULL = HRESULT($C80005EA);
+ {$EXTERNALSYM hrTaggedNotNULL}
+
+//
+// MessageId: hrNoCurrentIndex
+//
+// MessageText:
+//
+// The entry is not valid without a current index.
+//
+ hrNoCurrentIndex = HRESULT($C80005EB);
+ {$EXTERNALSYM hrNoCurrentIndex}
+
+//
+// MessageId: hrKeyIsMade
+//
+// MessageText:
+//
+// The key is completely made.
+//
+ hrKeyIsMade = HRESULT($C80005EC);
+ {$EXTERNALSYM hrKeyIsMade}
+
+//
+// MessageId: hrBadColumnId
+//
+// MessageText:
+//
+// The column ID is not correct.
+//
+ hrBadColumnId = HRESULT($C80005ED);
+ {$EXTERNALSYM hrBadColumnId}
+
+//
+// MessageId: hrBadItagSequence
+//
+// MessageText:
+//
+// There is a bad instance identifier for a multivalued column.
+//
+ hrBadItagSequence = HRESULT($C80005EE);
+ {$EXTERNALSYM hrBadItagSequence}
+
+//
+// MessageId: hrCannotBeTagged
+//
+// MessageText:
+//
+// AutoIncrement and Version cannot be multivalued.
+//
+ hrCannotBeTagged = HRESULT($C80005F1);
+ {$EXTERNALSYM hrCannotBeTagged}
+
+//
+// MessageId: hrRecordNotFound
+//
+// MessageText:
+//
+// Unable to find the key.
+//
+ hrRecordNotFound = HRESULT($C8000641);
+ {$EXTERNALSYM hrRecordNotFound}
+
+//
+// MessageId: hrNoCurrentRecord
+//
+// MessageText:
+//
+// The currency is not on a record.
+//
+ hrNoCurrentRecord = HRESULT($C8000643);
+ {$EXTERNALSYM hrNoCurrentRecord}
+
+//
+// MessageId: hrRecordClusteredChanged
+//
+// MessageText:
+//
+// A clustered key cannot be changed.
+//
+ hrRecordClusteredChanged = HRESULT($C8000644);
+ {$EXTERNALSYM hrRecordClusteredChanged}
+
+//
+// MessageId: hrKeyDuplicate
+//
+// MessageText:
+//
+// The key already exists.
+//
+ hrKeyDuplicate = HRESULT($C8000645);
+ {$EXTERNALSYM hrKeyDuplicate}
+
+//
+// MessageId: hrAlreadyPrepared
+//
+// MessageText:
+//
+// The current entry has already been copied or cleared.
+//
+ hrAlreadyPrepared = HRESULT($C8000647);
+ {$EXTERNALSYM hrAlreadyPrepared}
+
+//
+// MessageId: hrKeyNotMade
+//
+// MessageText:
+//
+// No key was made.
+//
+ hrKeyNotMade = HRESULT($C8000648);
+ {$EXTERNALSYM hrKeyNotMade}
+
+//
+// MessageId: hrUpdateNotPrepared
+//
+// MessageText:
+//
+// Update was not prepared.
+//
+ hrUpdateNotPrepared = HRESULT($C8000649);
+ {$EXTERNALSYM hrUpdateNotPrepared}
+
+//
+// MessageId: hrwrnDataHasChanged
+//
+// MessageText:
+//
+// Data has changed.
+//
+ hrwrnDataHasChanged = HRESULT($8800064A);
+ {$EXTERNALSYM hrwrnDataHasChanged}
+
+//
+// MessageId: hrerrDataHasChanged
+//
+// MessageText:
+//
+// The operation was abandoned because data has changed.
+//
+ hrerrDataHasChanged = HRESULT($C800064B);
+ {$EXTERNALSYM hrerrDataHasChanged}
+
+//
+// MessageId: hrKeyChanged
+//
+// MessageText:
+//
+// Moved to a new key.
+//
+ hrKeyChanged = HRESULT($88000652);
+ {$EXTERNALSYM hrKeyChanged}
+
+//
+// MessageId: hrTooManySorts
+//
+// MessageText:
+//
+// There are too many sort processes.
+//
+ hrTooManySorts = HRESULT($C80006A5);
+ {$EXTERNALSYM hrTooManySorts}
+
+//
+// MessageId: hrInvalidOnSort
+//
+// MessageText:
+//
+// An operation that is not valid occurred in the sort.
+//
+ hrInvalidOnSort = HRESULT($C80006A6);
+ {$EXTERNALSYM hrInvalidOnSort}
+
+//
+// MessageId: hrTempFileOpenError
+//
+// MessageText:
+//
+// Unable to open the temporary file.
+//
+ hrTempFileOpenError = HRESULT($C800070B);
+ {$EXTERNALSYM hrTempFileOpenError}
+
+//
+// MessageId: hrTooManyAttachedDatabases
+//
+// MessageText:
+//
+// There are too many databases open.
+//
+ hrTooManyAttachedDatabases = HRESULT($C800070D);
+ {$EXTERNALSYM hrTooManyAttachedDatabases}
+
+//
+// MessageId: hrDiskFull
+//
+// MessageText:
+//
+// The disk is full.
+//
+ hrDiskFull = HRESULT($C8000710);
+ {$EXTERNALSYM hrDiskFull}
+
+//
+// MessageId: hrPermissionDenied
+//
+// MessageText:
+//
+// Permission is denied.
+//
+ hrPermissionDenied = HRESULT($C8000711);
+ {$EXTERNALSYM hrPermissionDenied}
+
+//
+// MessageId: hrFileNotFound
+//
+// MessageText:
+//
+// Unable to find the file.
+//
+ hrFileNotFound = HRESULT($C8000713);
+ {$EXTERNALSYM hrFileNotFound}
+
+//
+// MessageId: hrFileOpenReadOnly
+//
+// MessageText:
+//
+// The database file is read only.
+//
+ hrFileOpenReadOnly = HRESULT($88000715);
+ {$EXTERNALSYM hrFileOpenReadOnly}
+
+//
+// MessageId: hrAfterInitialization
+//
+// MessageText:
+//
+// Unable to restore after initialization.
+//
+ hrAfterInitialization = HRESULT($C800073A);
+ {$EXTERNALSYM hrAfterInitialization}
+
+//
+// MessageId: hrLogCorrupted
+//
+// MessageText:
+//
+// The database log files are damaged.
+//
+ hrLogCorrupted = HRESULT($C800073C);
+ {$EXTERNALSYM hrLogCorrupted}
+
+//
+// MessageId: hrInvalidOperation
+//
+// MessageText:
+//
+// The operation is not valid.
+//
+ hrInvalidOperation = HRESULT($C8000772);
+ {$EXTERNALSYM hrInvalidOperation}
+
+//
+// MessageId: hrAccessDenied
+//
+// MessageText:
+//
+// Access is denied.
+//
+ hrAccessDenied = HRESULT($C8000773);
+ {$EXTERNALSYM hrAccessDenied}
+
+implementation
+
+end.
diff --git a/packages/extra/winunits/jwantldap.pas b/packages/extra/winunits/jwantldap.pas
index 6cdb8bc6f7..d43b306342 100644
--- a/packages/extra/winunits/jwantldap.pas
+++ b/packages/extra/winunits/jwantldap.pas
@@ -1,395 +1,395 @@
-{******************************************************************************}
-{ }
-{ NT LDAP API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: ntldap.h, released June 2000. The original Pascal }
-{ code is: NtLDAP.pas, released December 2000. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwantldap.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaNtLDAP;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "ntldap.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-//
-//
-// Server controls section
-//
-
-//
-// Permissive Modify Control. No Data.
-//
-
-const
- LDAP_SERVER_PERMISSIVE_MODIFY_OID = '1.2.840.113556.1.4.1413';
- {$EXTERNALSYM LDAP_SERVER_PERMISSIVE_MODIFY_OID}
- LDAP_SERVER_PERMISSIVE_MODIFY_OID_W = '1.2.840.113556.1.4.1413';
- {$EXTERNALSYM LDAP_SERVER_PERMISSIVE_MODIFY_OID_W}
-
-//
-// Show Deleted Control. No Data.
-//
-
- LDAP_SERVER_SHOW_DELETED_OID = '1.2.840.113556.1.4.417';
- {$EXTERNALSYM LDAP_SERVER_SHOW_DELETED_OID}
- LDAP_SERVER_SHOW_DELETED_OID_W = '1.2.840.113556.1.4.417';
- {$EXTERNALSYM LDAP_SERVER_SHOW_DELETED_OID_W}
-
-//
-// Cross Domain Move Control. Data as follows
-// SEQUENCE {
-// Name OCTET STRING
-// }
-//
-
- LDAP_SERVER_CROSSDOM_MOVE_TARGET_OID = '1.2.840.113556.1.4.521';
- {$EXTERNALSYM LDAP_SERVER_CROSSDOM_MOVE_TARGET_OID}
- LDAP_SERVER_CROSSDOM_MOVE_TARGET_OID_W = '1.2.840.113556.1.4.521';
- {$EXTERNALSYM LDAP_SERVER_CROSSDOM_MOVE_TARGET_OID_W}
-
-//
-// Notification. No Data.
-//
-
- LDAP_SERVER_NOTIFICATION_OID = '1.2.840.113556.1.4.528';
- {$EXTERNALSYM LDAP_SERVER_NOTIFICATION_OID}
- LDAP_SERVER_NOTIFICATION_OID_W = '1.2.840.113556.1.4.528';
- {$EXTERNALSYM LDAP_SERVER_NOTIFICATION_OID_W}
-
-//
-// Lazy Commit. No Data.
-//
-
- LDAP_SERVER_LAZY_COMMIT_OID = '1.2.840.113556.1.4.619';
- {$EXTERNALSYM LDAP_SERVER_LAZY_COMMIT_OID}
- LDAP_SERVER_LAZY_COMMIT_OID_W = '1.2.840.113556.1.4.619';
- {$EXTERNALSYM LDAP_SERVER_LAZY_COMMIT_OID_W}
-
-//
-// Security Descriptor Flag. Data as follows
-// SEQUENCE {
-// Flags INTEGER
-// }
-//
-
- LDAP_SERVER_SD_FLAGS_OID = '1.2.840.113556.1.4.801';
- {$EXTERNALSYM LDAP_SERVER_SD_FLAGS_OID}
- LDAP_SERVER_SD_FLAGS_OID_W = '1.2.840.113556.1.4.801';
- {$EXTERNALSYM LDAP_SERVER_SD_FLAGS_OID_W}
-
-//
-// Tree Delete. No Data.
-//
-
- LDAP_SERVER_TREE_DELETE_OID = '1.2.840.113556.1.4.805';
- {$EXTERNALSYM LDAP_SERVER_TREE_DELETE_OID}
- LDAP_SERVER_TREE_DELETE_OID_W = '1.2.840.113556.1.4.805';
- {$EXTERNALSYM LDAP_SERVER_TREE_DELETE_OID_W}
-
-//
-// DirSync operation. Data as follows
-// SEQUENCE {
-// Flags INTEGER
-// Size INTEGER
-// Cookie OCTET STRING
-// }
-//
-
- LDAP_SERVER_DIRSYNC_OID = '1.2.840.113556.1.4.841';
- {$EXTERNALSYM LDAP_SERVER_DIRSYNC_OID}
- LDAP_SERVER_DIRSYNC_OID_W = '1.2.840.113556.1.4.841';
- {$EXTERNALSYM LDAP_SERVER_DIRSYNC_OID_W}
-
-//
-// Return extended DNs. No Data.
-//
-
- LDAP_SERVER_EXTENDED_DN_OID = '1.2.840.113556.1.4.529';
- {$EXTERNALSYM LDAP_SERVER_EXTENDED_DN_OID}
- LDAP_SERVER_EXTENDED_DN_OID_W = '1.2.840.113556.1.4.529';
- {$EXTERNALSYM LDAP_SERVER_EXTENDED_DN_OID_W}
-
-//
-// Tell DC which server to verify with that a DN exist. Data as follows
-// SEQUENCE {
-// Flags INTEGER,
-// ServerName OCTET STRING // unicode server string
-// }
-//
-
- LDAP_SERVER_VERIFY_NAME_OID = '1.2.840.113556.1.4.1338';
- {$EXTERNALSYM LDAP_SERVER_VERIFY_NAME_OID}
- LDAP_SERVER_VERIFY_NAME_OID_W = '1.2.840.113556.1.4.1338';
- {$EXTERNALSYM LDAP_SERVER_VERIFY_NAME_OID_W}
-
-//
-// Tells server not to generate referrals
-//
-
- LDAP_SERVER_DOMAIN_SCOPE_OID = '1.2.840.113556.1.4.1339';
- {$EXTERNALSYM LDAP_SERVER_DOMAIN_SCOPE_OID}
- LDAP_SERVER_DOMAIN_SCOPE_OID_W = '1.2.840.113556.1.4.1339';
- {$EXTERNALSYM LDAP_SERVER_DOMAIN_SCOPE_OID_W}
-
-//
-// Server Search Options. Allows the client to pass in flags to control
-// various search behaviours. Data as follows
-// SEQUENCE {
-// Flags INTEGER
-// }
-//
-
- LDAP_SERVER_SEARCH_OPTIONS_OID = '1.2.840.113556.1.4.1340';
- {$EXTERNALSYM LDAP_SERVER_SEARCH_OPTIONS_OID}
- LDAP_SERVER_SEARCH_OPTIONS_OID_W = '1.2.840.113556.1.4.1340';
- {$EXTERNALSYM LDAP_SERVER_SEARCH_OPTIONS_OID_W}
-
-//
-// search option flags
-//
-
- SERVER_SEARCH_FLAG_DOMAIN_SCOPE = $1; // no referrals generated
- {$EXTERNALSYM SERVER_SEARCH_FLAG_DOMAIN_SCOPE}
- SERVER_SEARCH_FLAG_PHANTOM_ROOT = $2; // search all NCs subordinate to search base
- {$EXTERNALSYM SERVER_SEARCH_FLAG_PHANTOM_ROOT}
-
-//
-// End of Server controls
-//
-
-//
-//
-// Operational Attributes
-//
-
- LDAP_OPATT_BECOME_DOM_MASTER = 'becomeDomainMaster';
- {$EXTERNALSYM LDAP_OPATT_BECOME_DOM_MASTER}
- LDAP_OPATT_BECOME_DOM_MASTER_W = 'becomeDomainMaster';
- {$EXTERNALSYM LDAP_OPATT_BECOME_DOM_MASTER_W}
-
- LDAP_OPATT_BECOME_RID_MASTER = 'becomeRidMaster';
- {$EXTERNALSYM LDAP_OPATT_BECOME_RID_MASTER}
- LDAP_OPATT_BECOME_RID_MASTER_W = 'becomeRidMaster';
- {$EXTERNALSYM LDAP_OPATT_BECOME_RID_MASTER_W}
-
- LDAP_OPATT_BECOME_SCHEMA_MASTER = 'becomeSchemaMaster';
- {$EXTERNALSYM LDAP_OPATT_BECOME_SCHEMA_MASTER}
- LDAP_OPATT_BECOME_SCHEMA_MASTER_W = 'becomeSchemaMaster';
- {$EXTERNALSYM LDAP_OPATT_BECOME_SCHEMA_MASTER_W}
-
- LDAP_OPATT_RECALC_HIERARCHY = 'recalcHierarchy';
- {$EXTERNALSYM LDAP_OPATT_RECALC_HIERARCHY}
- LDAP_OPATT_RECALC_HIERARCHY_W = 'recalcHierarchy';
- {$EXTERNALSYM LDAP_OPATT_RECALC_HIERARCHY_W}
-
- LDAP_OPATT_SCHEMA_UPDATE_NOW = 'schemaUpdateNow';
- {$EXTERNALSYM LDAP_OPATT_SCHEMA_UPDATE_NOW}
- LDAP_OPATT_SCHEMA_UPDATE_NOW_W = 'schemaUpdateNow';
- {$EXTERNALSYM LDAP_OPATT_SCHEMA_UPDATE_NOW_W}
-
- LDAP_OPATT_BECOME_PDC = 'becomePdc';
- {$EXTERNALSYM LDAP_OPATT_BECOME_PDC}
- LDAP_OPATT_BECOME_PDC_W = 'becomePdc';
- {$EXTERNALSYM LDAP_OPATT_BECOME_PDC_W}
-
- LDAP_OPATT_FIXUP_INHERITANCE = 'fixupInheritance';
- {$EXTERNALSYM LDAP_OPATT_FIXUP_INHERITANCE}
- LDAP_OPATT_FIXUP_INHERITANCE_W = 'fixupInheritance';
- {$EXTERNALSYM LDAP_OPATT_FIXUP_INHERITANCE_W}
-
- LDAP_OPATT_INVALIDATE_RID_POOL = 'invalidateRidPool';
- {$EXTERNALSYM LDAP_OPATT_INVALIDATE_RID_POOL}
- LDAP_OPATT_INVALIDATE_RID_POOL_W = 'invalidateRidPool';
- {$EXTERNALSYM LDAP_OPATT_INVALIDATE_RID_POOL_W}
-
- LDAP_OPATT_ABANDON_REPL = 'abandonReplication';
- {$EXTERNALSYM LDAP_OPATT_ABANDON_REPL}
- LDAP_OPATT_ABANDON_REPL_W = 'abandonReplication';
- {$EXTERNALSYM LDAP_OPATT_ABANDON_REPL_W}
-
- LDAP_OPATT_DO_GARBAGE_COLLECTION = 'doGarbageCollection';
- {$EXTERNALSYM LDAP_OPATT_DO_GARBAGE_COLLECTION}
- LDAP_OPATT_DO_GARBAGE_COLLECTION_W = 'doGarbageCollection';
- {$EXTERNALSYM LDAP_OPATT_DO_GARBAGE_COLLECTION_W}
-
-//
-// Root DSE Attributes
-//
-
- LDAP_OPATT_SUBSCHEMA_SUBENTRY = 'subschemaSubentry';
- {$EXTERNALSYM LDAP_OPATT_SUBSCHEMA_SUBENTRY}
- LDAP_OPATT_SUBSCHEMA_SUBENTRY_W = 'subschemaSubentry';
- {$EXTERNALSYM LDAP_OPATT_SUBSCHEMA_SUBENTRY_W}
-
- LDAP_OPATT_CURRENT_TIME = 'currentTime';
- {$EXTERNALSYM LDAP_OPATT_CURRENT_TIME}
- LDAP_OPATT_CURRENT_TIME_W = 'currentTime';
- {$EXTERNALSYM LDAP_OPATT_CURRENT_TIME_W}
-
- LDAP_OPATT_SERVER_NAME = 'serverName';
- {$EXTERNALSYM LDAP_OPATT_SERVER_NAME}
- LDAP_OPATT_SERVER_NAME_W = 'serverName';
- {$EXTERNALSYM LDAP_OPATT_SERVER_NAME_W}
-
- LDAP_OPATT_NAMING_CONTEXTS = 'namingContexts';
- {$EXTERNALSYM LDAP_OPATT_NAMING_CONTEXTS}
- LDAP_OPATT_NAMING_CONTEXTS_W = 'namingContexts';
- {$EXTERNALSYM LDAP_OPATT_NAMING_CONTEXTS_W}
-
- LDAP_OPATT_DEFAULT_NAMING_CONTEXT = 'defaultNamingContext';
- {$EXTERNALSYM LDAP_OPATT_DEFAULT_NAMING_CONTEXT}
- LDAP_OPATT_DEFAULT_NAMING_CONTEXT_W = 'defaultNamingContext';
- {$EXTERNALSYM LDAP_OPATT_DEFAULT_NAMING_CONTEXT_W}
-
- LDAP_OPATT_SUPPORTED_CONTROL = 'supportedControl';
- {$EXTERNALSYM LDAP_OPATT_SUPPORTED_CONTROL}
- LDAP_OPATT_SUPPORTED_CONTROL_W = 'supportedControl';
- {$EXTERNALSYM LDAP_OPATT_SUPPORTED_CONTROL_W}
-
- LDAP_OPATT_HIGHEST_COMMITTED_USN = 'highestCommitedUSN';
- {$EXTERNALSYM LDAP_OPATT_HIGHEST_COMMITTED_USN}
- LDAP_OPATT_HIGHEST_COMMITTED_USN_W = 'highestCommitedUSN';
- {$EXTERNALSYM LDAP_OPATT_HIGHEST_COMMITTED_USN_W}
-
- LDAP_OPATT_SUPPORTED_LDAP_VERSION = 'supportedLDAPVersion';
- {$EXTERNALSYM LDAP_OPATT_SUPPORTED_LDAP_VERSION}
- LDAP_OPATT_SUPPORTED_LDAP_VERSION_W = 'supportedLDAPVersion';
- {$EXTERNALSYM LDAP_OPATT_SUPPORTED_LDAP_VERSION_W}
-
- LDAP_OPATT_SUPPORTED_LDAP_POLICIES = 'supportedLDAPPolicies';
- {$EXTERNALSYM LDAP_OPATT_SUPPORTED_LDAP_POLICIES}
- LDAP_OPATT_SUPPORTED_LDAP_POLICIES_W = 'supportedLDAPPolicies';
- {$EXTERNALSYM LDAP_OPATT_SUPPORTED_LDAP_POLICIES_W}
-
- LDAP_OPATT_SCHEMA_NAMING_CONTEXT = 'schemaNamingContext';
- {$EXTERNALSYM LDAP_OPATT_SCHEMA_NAMING_CONTEXT}
- LDAP_OPATT_SCHEMA_NAMING_CONTEXT_W = 'schemaNamingContext';
- {$EXTERNALSYM LDAP_OPATT_SCHEMA_NAMING_CONTEXT_W}
-
- LDAP_OPATT_CONFIG_NAMING_CONTEXT = 'configurationNamingContext';
- {$EXTERNALSYM LDAP_OPATT_CONFIG_NAMING_CONTEXT}
- LDAP_OPATT_CONFIG_NAMING_CONTEXT_W = 'configurationNamingContext';
- {$EXTERNALSYM LDAP_OPATT_CONFIG_NAMING_CONTEXT_W}
-
- LDAP_OPATT_ROOT_DOMAIN_NAMING_CONTEXT = 'rootDomainNamingContext';
- {$EXTERNALSYM LDAP_OPATT_ROOT_DOMAIN_NAMING_CONTEXT}
- LDAP_OPATT_ROOT_DOMAIN_NAMING_CONTEXT_W = 'rootDomainNamingContext';
- {$EXTERNALSYM LDAP_OPATT_ROOT_DOMAIN_NAMING_CONTEXT_W}
-
- LDAP_OPATT_SUPPORTED_SASL_MECHANISM = 'supportedSASLMechanisms';
- {$EXTERNALSYM LDAP_OPATT_SUPPORTED_SASL_MECHANISM}
- LDAP_OPATT_SUPPORTED_SASL_MECHANISM_W = 'supportedSASLMechanisms';
- {$EXTERNALSYM LDAP_OPATT_SUPPORTED_SASL_MECHANISM_W}
-
- LDAP_OPATT_DNS_HOST_NAME = 'dnsHostName';
- {$EXTERNALSYM LDAP_OPATT_DNS_HOST_NAME}
- LDAP_OPATT_DNS_HOST_NAME_W = 'dnsHostName';
- {$EXTERNALSYM LDAP_OPATT_DNS_HOST_NAME_W}
-
- LDAP_OPATT_LDAP_SERVICE_NAME = 'ldapServiceName';
- {$EXTERNALSYM LDAP_OPATT_LDAP_SERVICE_NAME}
- LDAP_OPATT_LDAP_SERVICE_NAME_W = 'ldapServiceName';
- {$EXTERNALSYM LDAP_OPATT_LDAP_SERVICE_NAME_W}
-
- LDAP_OPATT_DS_SERVICE_NAME = 'dsServiceName';
- {$EXTERNALSYM LDAP_OPATT_DS_SERVICE_NAME}
- LDAP_OPATT_DS_SERVICE_NAME_W = 'dsServiceName';
- {$EXTERNALSYM LDAP_OPATT_DS_SERVICE_NAME_W}
-
- LDAP_OPATT_SUPPORTED_CAPABILITIES = 'supportedCapabilities';
- {$EXTERNALSYM LDAP_OPATT_SUPPORTED_CAPABILITIES}
- LDAP_OPATT_SUPPORTED_CAPABILITIES_W = 'supportedCapabilities';
- {$EXTERNALSYM LDAP_OPATT_SUPPORTED_CAPABILITIES_W}
-
-//
-// End of Operational attributes
-//
-
-
-//
-//
-// Server Capabilities
-//
-
-//
-// NT5 Active Directory
-//
-
- LDAP_CAP_ACTIVE_DIRECTORY_OID = '1.2.840.113556.1.4.800';
- {$EXTERNALSYM LDAP_CAP_ACTIVE_DIRECTORY_OID}
- LDAP_CAP_ACTIVE_DIRECTORY_OID_W = '1.2.840.113556.1.4.800';
- {$EXTERNALSYM LDAP_CAP_ACTIVE_DIRECTORY_OID_W}
-
-//
-// End of capabilities
-//
-
-//
-//
-// Matching Rules
-//
-
-//
-// BIT AND
-//
-
- LDAP_MATCHING_RULE_BIT_AND = '1.2.840.113556.1.4.803';
- {$EXTERNALSYM LDAP_MATCHING_RULE_BIT_AND}
- LDAP_MATCHING_RULE_BIT_AND_W = '1.2.840.113556.1.4.803';
- {$EXTERNALSYM LDAP_MATCHING_RULE_BIT_AND_W}
-
-//
-// BIT OR
-//
-
- LDAP_MATCHING_RULE_BIT_OR = '1.2.840.113556.1.4.804';
- {$EXTERNALSYM LDAP_MATCHING_RULE_BIT_OR}
- LDAP_MATCHING_RULE_BIT_OR_W = '1.2.840.113556.1.4.804';
- {$EXTERNALSYM LDAP_MATCHING_RULE_BIT_OR_W}
-
-implementation
-
-end.
+{******************************************************************************}
+{ }
+{ NT LDAP API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: ntldap.h, released June 2000. The original Pascal }
+{ code is: NtLDAP.pas, released December 2000. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwantldap.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaNtLDAP;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "ntldap.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+//
+//
+// Server controls section
+//
+
+//
+// Permissive Modify Control. No Data.
+//
+
+const
+ LDAP_SERVER_PERMISSIVE_MODIFY_OID = '1.2.840.113556.1.4.1413';
+ {$EXTERNALSYM LDAP_SERVER_PERMISSIVE_MODIFY_OID}
+ LDAP_SERVER_PERMISSIVE_MODIFY_OID_W = '1.2.840.113556.1.4.1413';
+ {$EXTERNALSYM LDAP_SERVER_PERMISSIVE_MODIFY_OID_W}
+
+//
+// Show Deleted Control. No Data.
+//
+
+ LDAP_SERVER_SHOW_DELETED_OID = '1.2.840.113556.1.4.417';
+ {$EXTERNALSYM LDAP_SERVER_SHOW_DELETED_OID}
+ LDAP_SERVER_SHOW_DELETED_OID_W = '1.2.840.113556.1.4.417';
+ {$EXTERNALSYM LDAP_SERVER_SHOW_DELETED_OID_W}
+
+//
+// Cross Domain Move Control. Data as follows
+// SEQUENCE {
+// Name OCTET STRING
+// }
+//
+
+ LDAP_SERVER_CROSSDOM_MOVE_TARGET_OID = '1.2.840.113556.1.4.521';
+ {$EXTERNALSYM LDAP_SERVER_CROSSDOM_MOVE_TARGET_OID}
+ LDAP_SERVER_CROSSDOM_MOVE_TARGET_OID_W = '1.2.840.113556.1.4.521';
+ {$EXTERNALSYM LDAP_SERVER_CROSSDOM_MOVE_TARGET_OID_W}
+
+//
+// Notification. No Data.
+//
+
+ LDAP_SERVER_NOTIFICATION_OID = '1.2.840.113556.1.4.528';
+ {$EXTERNALSYM LDAP_SERVER_NOTIFICATION_OID}
+ LDAP_SERVER_NOTIFICATION_OID_W = '1.2.840.113556.1.4.528';
+ {$EXTERNALSYM LDAP_SERVER_NOTIFICATION_OID_W}
+
+//
+// Lazy Commit. No Data.
+//
+
+ LDAP_SERVER_LAZY_COMMIT_OID = '1.2.840.113556.1.4.619';
+ {$EXTERNALSYM LDAP_SERVER_LAZY_COMMIT_OID}
+ LDAP_SERVER_LAZY_COMMIT_OID_W = '1.2.840.113556.1.4.619';
+ {$EXTERNALSYM LDAP_SERVER_LAZY_COMMIT_OID_W}
+
+//
+// Security Descriptor Flag. Data as follows
+// SEQUENCE {
+// Flags INTEGER
+// }
+//
+
+ LDAP_SERVER_SD_FLAGS_OID = '1.2.840.113556.1.4.801';
+ {$EXTERNALSYM LDAP_SERVER_SD_FLAGS_OID}
+ LDAP_SERVER_SD_FLAGS_OID_W = '1.2.840.113556.1.4.801';
+ {$EXTERNALSYM LDAP_SERVER_SD_FLAGS_OID_W}
+
+//
+// Tree Delete. No Data.
+//
+
+ LDAP_SERVER_TREE_DELETE_OID = '1.2.840.113556.1.4.805';
+ {$EXTERNALSYM LDAP_SERVER_TREE_DELETE_OID}
+ LDAP_SERVER_TREE_DELETE_OID_W = '1.2.840.113556.1.4.805';
+ {$EXTERNALSYM LDAP_SERVER_TREE_DELETE_OID_W}
+
+//
+// DirSync operation. Data as follows
+// SEQUENCE {
+// Flags INTEGER
+// Size INTEGER
+// Cookie OCTET STRING
+// }
+//
+
+ LDAP_SERVER_DIRSYNC_OID = '1.2.840.113556.1.4.841';
+ {$EXTERNALSYM LDAP_SERVER_DIRSYNC_OID}
+ LDAP_SERVER_DIRSYNC_OID_W = '1.2.840.113556.1.4.841';
+ {$EXTERNALSYM LDAP_SERVER_DIRSYNC_OID_W}
+
+//
+// Return extended DNs. No Data.
+//
+
+ LDAP_SERVER_EXTENDED_DN_OID = '1.2.840.113556.1.4.529';
+ {$EXTERNALSYM LDAP_SERVER_EXTENDED_DN_OID}
+ LDAP_SERVER_EXTENDED_DN_OID_W = '1.2.840.113556.1.4.529';
+ {$EXTERNALSYM LDAP_SERVER_EXTENDED_DN_OID_W}
+
+//
+// Tell DC which server to verify with that a DN exist. Data as follows
+// SEQUENCE {
+// Flags INTEGER,
+// ServerName OCTET STRING // unicode server string
+// }
+//
+
+ LDAP_SERVER_VERIFY_NAME_OID = '1.2.840.113556.1.4.1338';
+ {$EXTERNALSYM LDAP_SERVER_VERIFY_NAME_OID}
+ LDAP_SERVER_VERIFY_NAME_OID_W = '1.2.840.113556.1.4.1338';
+ {$EXTERNALSYM LDAP_SERVER_VERIFY_NAME_OID_W}
+
+//
+// Tells server not to generate referrals
+//
+
+ LDAP_SERVER_DOMAIN_SCOPE_OID = '1.2.840.113556.1.4.1339';
+ {$EXTERNALSYM LDAP_SERVER_DOMAIN_SCOPE_OID}
+ LDAP_SERVER_DOMAIN_SCOPE_OID_W = '1.2.840.113556.1.4.1339';
+ {$EXTERNALSYM LDAP_SERVER_DOMAIN_SCOPE_OID_W}
+
+//
+// Server Search Options. Allows the client to pass in flags to control
+// various search behaviours. Data as follows
+// SEQUENCE {
+// Flags INTEGER
+// }
+//
+
+ LDAP_SERVER_SEARCH_OPTIONS_OID = '1.2.840.113556.1.4.1340';
+ {$EXTERNALSYM LDAP_SERVER_SEARCH_OPTIONS_OID}
+ LDAP_SERVER_SEARCH_OPTIONS_OID_W = '1.2.840.113556.1.4.1340';
+ {$EXTERNALSYM LDAP_SERVER_SEARCH_OPTIONS_OID_W}
+
+//
+// search option flags
+//
+
+ SERVER_SEARCH_FLAG_DOMAIN_SCOPE = $1; // no referrals generated
+ {$EXTERNALSYM SERVER_SEARCH_FLAG_DOMAIN_SCOPE}
+ SERVER_SEARCH_FLAG_PHANTOM_ROOT = $2; // search all NCs subordinate to search base
+ {$EXTERNALSYM SERVER_SEARCH_FLAG_PHANTOM_ROOT}
+
+//
+// End of Server controls
+//
+
+//
+//
+// Operational Attributes
+//
+
+ LDAP_OPATT_BECOME_DOM_MASTER = 'becomeDomainMaster';
+ {$EXTERNALSYM LDAP_OPATT_BECOME_DOM_MASTER}
+ LDAP_OPATT_BECOME_DOM_MASTER_W = 'becomeDomainMaster';
+ {$EXTERNALSYM LDAP_OPATT_BECOME_DOM_MASTER_W}
+
+ LDAP_OPATT_BECOME_RID_MASTER = 'becomeRidMaster';
+ {$EXTERNALSYM LDAP_OPATT_BECOME_RID_MASTER}
+ LDAP_OPATT_BECOME_RID_MASTER_W = 'becomeRidMaster';
+ {$EXTERNALSYM LDAP_OPATT_BECOME_RID_MASTER_W}
+
+ LDAP_OPATT_BECOME_SCHEMA_MASTER = 'becomeSchemaMaster';
+ {$EXTERNALSYM LDAP_OPATT_BECOME_SCHEMA_MASTER}
+ LDAP_OPATT_BECOME_SCHEMA_MASTER_W = 'becomeSchemaMaster';
+ {$EXTERNALSYM LDAP_OPATT_BECOME_SCHEMA_MASTER_W}
+
+ LDAP_OPATT_RECALC_HIERARCHY = 'recalcHierarchy';
+ {$EXTERNALSYM LDAP_OPATT_RECALC_HIERARCHY}
+ LDAP_OPATT_RECALC_HIERARCHY_W = 'recalcHierarchy';
+ {$EXTERNALSYM LDAP_OPATT_RECALC_HIERARCHY_W}
+
+ LDAP_OPATT_SCHEMA_UPDATE_NOW = 'schemaUpdateNow';
+ {$EXTERNALSYM LDAP_OPATT_SCHEMA_UPDATE_NOW}
+ LDAP_OPATT_SCHEMA_UPDATE_NOW_W = 'schemaUpdateNow';
+ {$EXTERNALSYM LDAP_OPATT_SCHEMA_UPDATE_NOW_W}
+
+ LDAP_OPATT_BECOME_PDC = 'becomePdc';
+ {$EXTERNALSYM LDAP_OPATT_BECOME_PDC}
+ LDAP_OPATT_BECOME_PDC_W = 'becomePdc';
+ {$EXTERNALSYM LDAP_OPATT_BECOME_PDC_W}
+
+ LDAP_OPATT_FIXUP_INHERITANCE = 'fixupInheritance';
+ {$EXTERNALSYM LDAP_OPATT_FIXUP_INHERITANCE}
+ LDAP_OPATT_FIXUP_INHERITANCE_W = 'fixupInheritance';
+ {$EXTERNALSYM LDAP_OPATT_FIXUP_INHERITANCE_W}
+
+ LDAP_OPATT_INVALIDATE_RID_POOL = 'invalidateRidPool';
+ {$EXTERNALSYM LDAP_OPATT_INVALIDATE_RID_POOL}
+ LDAP_OPATT_INVALIDATE_RID_POOL_W = 'invalidateRidPool';
+ {$EXTERNALSYM LDAP_OPATT_INVALIDATE_RID_POOL_W}
+
+ LDAP_OPATT_ABANDON_REPL = 'abandonReplication';
+ {$EXTERNALSYM LDAP_OPATT_ABANDON_REPL}
+ LDAP_OPATT_ABANDON_REPL_W = 'abandonReplication';
+ {$EXTERNALSYM LDAP_OPATT_ABANDON_REPL_W}
+
+ LDAP_OPATT_DO_GARBAGE_COLLECTION = 'doGarbageCollection';
+ {$EXTERNALSYM LDAP_OPATT_DO_GARBAGE_COLLECTION}
+ LDAP_OPATT_DO_GARBAGE_COLLECTION_W = 'doGarbageCollection';
+ {$EXTERNALSYM LDAP_OPATT_DO_GARBAGE_COLLECTION_W}
+
+//
+// Root DSE Attributes
+//
+
+ LDAP_OPATT_SUBSCHEMA_SUBENTRY = 'subschemaSubentry';
+ {$EXTERNALSYM LDAP_OPATT_SUBSCHEMA_SUBENTRY}
+ LDAP_OPATT_SUBSCHEMA_SUBENTRY_W = 'subschemaSubentry';
+ {$EXTERNALSYM LDAP_OPATT_SUBSCHEMA_SUBENTRY_W}
+
+ LDAP_OPATT_CURRENT_TIME = 'currentTime';
+ {$EXTERNALSYM LDAP_OPATT_CURRENT_TIME}
+ LDAP_OPATT_CURRENT_TIME_W = 'currentTime';
+ {$EXTERNALSYM LDAP_OPATT_CURRENT_TIME_W}
+
+ LDAP_OPATT_SERVER_NAME = 'serverName';
+ {$EXTERNALSYM LDAP_OPATT_SERVER_NAME}
+ LDAP_OPATT_SERVER_NAME_W = 'serverName';
+ {$EXTERNALSYM LDAP_OPATT_SERVER_NAME_W}
+
+ LDAP_OPATT_NAMING_CONTEXTS = 'namingContexts';
+ {$EXTERNALSYM LDAP_OPATT_NAMING_CONTEXTS}
+ LDAP_OPATT_NAMING_CONTEXTS_W = 'namingContexts';
+ {$EXTERNALSYM LDAP_OPATT_NAMING_CONTEXTS_W}
+
+ LDAP_OPATT_DEFAULT_NAMING_CONTEXT = 'defaultNamingContext';
+ {$EXTERNALSYM LDAP_OPATT_DEFAULT_NAMING_CONTEXT}
+ LDAP_OPATT_DEFAULT_NAMING_CONTEXT_W = 'defaultNamingContext';
+ {$EXTERNALSYM LDAP_OPATT_DEFAULT_NAMING_CONTEXT_W}
+
+ LDAP_OPATT_SUPPORTED_CONTROL = 'supportedControl';
+ {$EXTERNALSYM LDAP_OPATT_SUPPORTED_CONTROL}
+ LDAP_OPATT_SUPPORTED_CONTROL_W = 'supportedControl';
+ {$EXTERNALSYM LDAP_OPATT_SUPPORTED_CONTROL_W}
+
+ LDAP_OPATT_HIGHEST_COMMITTED_USN = 'highestCommitedUSN';
+ {$EXTERNALSYM LDAP_OPATT_HIGHEST_COMMITTED_USN}
+ LDAP_OPATT_HIGHEST_COMMITTED_USN_W = 'highestCommitedUSN';
+ {$EXTERNALSYM LDAP_OPATT_HIGHEST_COMMITTED_USN_W}
+
+ LDAP_OPATT_SUPPORTED_LDAP_VERSION = 'supportedLDAPVersion';
+ {$EXTERNALSYM LDAP_OPATT_SUPPORTED_LDAP_VERSION}
+ LDAP_OPATT_SUPPORTED_LDAP_VERSION_W = 'supportedLDAPVersion';
+ {$EXTERNALSYM LDAP_OPATT_SUPPORTED_LDAP_VERSION_W}
+
+ LDAP_OPATT_SUPPORTED_LDAP_POLICIES = 'supportedLDAPPolicies';
+ {$EXTERNALSYM LDAP_OPATT_SUPPORTED_LDAP_POLICIES}
+ LDAP_OPATT_SUPPORTED_LDAP_POLICIES_W = 'supportedLDAPPolicies';
+ {$EXTERNALSYM LDAP_OPATT_SUPPORTED_LDAP_POLICIES_W}
+
+ LDAP_OPATT_SCHEMA_NAMING_CONTEXT = 'schemaNamingContext';
+ {$EXTERNALSYM LDAP_OPATT_SCHEMA_NAMING_CONTEXT}
+ LDAP_OPATT_SCHEMA_NAMING_CONTEXT_W = 'schemaNamingContext';
+ {$EXTERNALSYM LDAP_OPATT_SCHEMA_NAMING_CONTEXT_W}
+
+ LDAP_OPATT_CONFIG_NAMING_CONTEXT = 'configurationNamingContext';
+ {$EXTERNALSYM LDAP_OPATT_CONFIG_NAMING_CONTEXT}
+ LDAP_OPATT_CONFIG_NAMING_CONTEXT_W = 'configurationNamingContext';
+ {$EXTERNALSYM LDAP_OPATT_CONFIG_NAMING_CONTEXT_W}
+
+ LDAP_OPATT_ROOT_DOMAIN_NAMING_CONTEXT = 'rootDomainNamingContext';
+ {$EXTERNALSYM LDAP_OPATT_ROOT_DOMAIN_NAMING_CONTEXT}
+ LDAP_OPATT_ROOT_DOMAIN_NAMING_CONTEXT_W = 'rootDomainNamingContext';
+ {$EXTERNALSYM LDAP_OPATT_ROOT_DOMAIN_NAMING_CONTEXT_W}
+
+ LDAP_OPATT_SUPPORTED_SASL_MECHANISM = 'supportedSASLMechanisms';
+ {$EXTERNALSYM LDAP_OPATT_SUPPORTED_SASL_MECHANISM}
+ LDAP_OPATT_SUPPORTED_SASL_MECHANISM_W = 'supportedSASLMechanisms';
+ {$EXTERNALSYM LDAP_OPATT_SUPPORTED_SASL_MECHANISM_W}
+
+ LDAP_OPATT_DNS_HOST_NAME = 'dnsHostName';
+ {$EXTERNALSYM LDAP_OPATT_DNS_HOST_NAME}
+ LDAP_OPATT_DNS_HOST_NAME_W = 'dnsHostName';
+ {$EXTERNALSYM LDAP_OPATT_DNS_HOST_NAME_W}
+
+ LDAP_OPATT_LDAP_SERVICE_NAME = 'ldapServiceName';
+ {$EXTERNALSYM LDAP_OPATT_LDAP_SERVICE_NAME}
+ LDAP_OPATT_LDAP_SERVICE_NAME_W = 'ldapServiceName';
+ {$EXTERNALSYM LDAP_OPATT_LDAP_SERVICE_NAME_W}
+
+ LDAP_OPATT_DS_SERVICE_NAME = 'dsServiceName';
+ {$EXTERNALSYM LDAP_OPATT_DS_SERVICE_NAME}
+ LDAP_OPATT_DS_SERVICE_NAME_W = 'dsServiceName';
+ {$EXTERNALSYM LDAP_OPATT_DS_SERVICE_NAME_W}
+
+ LDAP_OPATT_SUPPORTED_CAPABILITIES = 'supportedCapabilities';
+ {$EXTERNALSYM LDAP_OPATT_SUPPORTED_CAPABILITIES}
+ LDAP_OPATT_SUPPORTED_CAPABILITIES_W = 'supportedCapabilities';
+ {$EXTERNALSYM LDAP_OPATT_SUPPORTED_CAPABILITIES_W}
+
+//
+// End of Operational attributes
+//
+
+
+//
+//
+// Server Capabilities
+//
+
+//
+// NT5 Active Directory
+//
+
+ LDAP_CAP_ACTIVE_DIRECTORY_OID = '1.2.840.113556.1.4.800';
+ {$EXTERNALSYM LDAP_CAP_ACTIVE_DIRECTORY_OID}
+ LDAP_CAP_ACTIVE_DIRECTORY_OID_W = '1.2.840.113556.1.4.800';
+ {$EXTERNALSYM LDAP_CAP_ACTIVE_DIRECTORY_OID_W}
+
+//
+// End of capabilities
+//
+
+//
+//
+// Matching Rules
+//
+
+//
+// BIT AND
+//
+
+ LDAP_MATCHING_RULE_BIT_AND = '1.2.840.113556.1.4.803';
+ {$EXTERNALSYM LDAP_MATCHING_RULE_BIT_AND}
+ LDAP_MATCHING_RULE_BIT_AND_W = '1.2.840.113556.1.4.803';
+ {$EXTERNALSYM LDAP_MATCHING_RULE_BIT_AND_W}
+
+//
+// BIT OR
+//
+
+ LDAP_MATCHING_RULE_BIT_OR = '1.2.840.113556.1.4.804';
+ {$EXTERNALSYM LDAP_MATCHING_RULE_BIT_OR}
+ LDAP_MATCHING_RULE_BIT_OR_W = '1.2.840.113556.1.4.804';
+ {$EXTERNALSYM LDAP_MATCHING_RULE_BIT_OR_W}
+
+implementation
+
+end.
diff --git a/packages/extra/winunits/jwantquery.pas b/packages/extra/winunits/jwantquery.pas
index 5e7cc0a8fc..e28c00f6d3 100644
--- a/packages/extra/winunits/jwantquery.pas
+++ b/packages/extra/winunits/jwantquery.pas
@@ -1,775 +1,775 @@
-{******************************************************************************}
-{ }
-{ Indezing Service Query API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: nyquery.h, released August 2001. The original Pascal }
-{ code is: NtQuery.pas, released December 2000. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwantquery.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaNtQuery;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "ntquery.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- ActiveX, ComObj, {TODO}
- JwaWinType;
-
-{$IFDEF FPC}
-Type
- PROPID = CARDINAL;
- PROPVARIANT=VARIANT;
-{$ENDIF}
-
-type
- // TODO STUBS see CmdTree.h (cmdtree.idl)
- IFilter = Pointer;
- IUnkown = Pointer;
- ICommand = Pointer;
- PPWCHAR = ^PWCHAR;
- REFIID = TGUID; // also in ActiveDS
- DBID = Pointer;
- DBCOMMANDTREE = Pointer;
- PDBCOMMANDTREE = Pointer;
- DBCOMMANDOP = Pointer;
-
-//
-// Use this path for the null catalog, one that doesn't have an index.
-// Use it to search for properties of files that are not indexed.
-//
-
-const
- CINULLCATALOG = '::_noindex_::';
- {$EXTERNALSYM CINULLCATALOG}
-
-//
-// Use this path to connect to the server for administration work
-// (i.e. DocStoreAdmin.) No catalog is associated with the connection
-//
-
- CIADMIN = '::_nodocstore_::';
- {$EXTERNALSYM CIADMIN}
-
-//
-// Minimal support for persistent handlers.
-//
-
-function LoadIFilter(pwcsPath: PWCHAR; pUnkOuter: IUnknown; out ppIUnk: IFilter): HRESULT; stdcall;
-{$EXTERNALSYM LoadIFilter}
-
-const
- LIFF_LOAD_DEFINED_FILTER = 1;
- {$EXTERNALSYM LIFF_LOAD_DEFINED_FILTER}
- LIFF_IMPLEMENT_TEXT_FILTER_FALLBACK_POLICY = 2;
- {$EXTERNALSYM LIFF_IMPLEMENT_TEXT_FILTER_FALLBACK_POLICY}
- LIFF_FORCE_TEXT_FILTER_FALLBACK = 3;
- {$EXTERNALSYM LIFF_FORCE_TEXT_FILTER_FALLBACK}
-
-function LoadIFilterEx(pwcsPath: PWCHAR; dwFlags: DWORD; const riid: REFIID; out ppIUnk: IUnknown): HRESULT; stdcall;
-{$EXTERNALSYM LoadIFilterEx}
-
-function BindIFilterFromStorage(pStg: IStorage; pUnkOuter: IUnknown; out ppIUnk: IFilter): HRESULT; stdcall;
-{$EXTERNALSYM BindIFilterFromStorage}
-
-function BindIFilterFromStream(pStm: IStream; pUnkOuter: IUnkown; out ppIUnk: IFilter): HRESULT; stdcall;
-{$EXTERNALSYM BindIFilterFromStream}
-
-function LocateCatalogsW(pwszScope: PWCHAR; iBmk: ULONG; pwszMachine: PWCHAR;
- var pccMachine: ULONG; pwszCat: PWCHAR; var pccCat: ULONG): HRESULT; stdcall;
-{$EXTERNALSYM LocateCatalogsW}
-
-//
-// For calling from VB
-//
-
-function LocateCatalogsA(pwszScope: PCHAR; iBmk: ULONG; pwszMachine: PCHAR;
- var pccMachine: ULONG; pwszCat: PCHAR; var pccCat: ULONG): HRESULT; stdcall;
-{$EXTERNALSYM LocateCatalogsA}
-
-function LocateCatalogs(pwszScope: PTCHAR; iBmk: ULONG; pwszMachine: PTCHAR;
- var pccMachine: ULONG; pwszCat: PTCHAR; var pccCat: ULONG): HRESULT; stdcall;
-{$EXTERNALSYM LocateCatalogs}
-
-// The Index Server Data Source Object CLSID
-
-const
- CLSID_INDEX_SERVER_DSO: TGUID = (
- D1:$F9AE8980; D2:$7E52; D3:$11d0; D4:($89,$64,$00,$C0,$4F,$D6,$11,$D7));
- {$EXTERNALSYM CLSID_INDEX_SERVER_DSO}
-
-// The storage property set
-
- PSGUID_STORAGE: TGUID = (
- D1:$b725f130; D2:$47ef; D3:$101a; D4:($a5,$f1,$02,$60,$8c,$9e,$eb,$ac));
- {$EXTERNALSYM PSGUID_STORAGE}
-
-//#define PID_STG_DICTIONARY ((PROPID) 0x00000000) //reserved
-//#define PID_STG_CODEPAGE ((PROPID) 0x00000001) //reserved
-
- PID_STG_DIRECTORY = PROPID($00000002);
- {$EXTERNALSYM PID_STG_DIRECTORY}
- PID_STG_CLASSID = PROPID($00000003);
- {$EXTERNALSYM PID_STG_CLASSID}
- PID_STG_STORAGETYPE = PROPID($00000004);
- {$EXTERNALSYM PID_STG_STORAGETYPE}
- PID_STG_VOLUME_ID = PROPID($00000005);
- {$EXTERNALSYM PID_STG_VOLUME_ID}
- PID_STG_PARENT_WORKID = PROPID($00000006);
- {$EXTERNALSYM PID_STG_PARENT_WORKID}
- PID_STG_SECONDARYSTORE = PROPID($00000007);
- {$EXTERNALSYM PID_STG_SECONDARYSTORE}
- PID_STG_FILEINDEX = PROPID($00000008);
- {$EXTERNALSYM PID_STG_FILEINDEX}
- PID_STG_LASTCHANGEUSN = PROPID($00000009);
- {$EXTERNALSYM PID_STG_LASTCHANGEUSN}
- PID_STG_NAME = PROPID($0000000a);
- {$EXTERNALSYM PID_STG_NAME}
- PID_STG_PATH = PROPID($0000000b);
- {$EXTERNALSYM PID_STG_PATH}
- PID_STG_SIZE = PROPID($0000000c);
- {$EXTERNALSYM PID_STG_SIZE}
- PID_STG_ATTRIBUTES = PROPID($0000000d);
- {$EXTERNALSYM PID_STG_ATTRIBUTES}
- PID_STG_WRITETIME = PROPID($0000000e);
- {$EXTERNALSYM PID_STG_WRITETIME}
- PID_STG_CREATETIME = PROPID($0000000f);
- {$EXTERNALSYM PID_STG_CREATETIME}
- PID_STG_ACCESSTIME = PROPID($00000010);
- {$EXTERNALSYM PID_STG_ACCESSTIME}
- PID_STG_CHANGETIME = PROPID($00000011);
- {$EXTERNALSYM PID_STG_CHANGETIME}
- PID_STG_CONTENTS = PROPID($00000013);
- {$EXTERNALSYM PID_STG_CONTENTS}
- PID_STG_SHORTNAME = PROPID($00000014);
- {$EXTERNALSYM PID_STG_SHORTNAME}
- PID_STG_MAX = PID_STG_SHORTNAME;
- {$EXTERNALSYM PID_STG_MAX}
- CSTORAGEPROPERTY = $15;
- {$EXTERNALSYM CSTORAGEPROPERTY}
-
-// File System Content Index Framework property set
-
- DBPROPSET_FSCIFRMWRK_EXT: TGUID = (
- D1:$A9BD1526; D2:$6A80; D3:$11D0; D4:($8C,$9D,$00,$20,$AF,$1D,$74,$0E));
- {$EXTERNALSYM DBPROPSET_FSCIFRMWRK_EXT}
-
- DBPROP_CI_CATALOG_NAME = 2;
- {$EXTERNALSYM DBPROP_CI_CATALOG_NAME}
- DBPROP_CI_INCLUDE_SCOPES = 3;
- {$EXTERNALSYM DBPROP_CI_INCLUDE_SCOPES}
- DBPROP_CI_DEPTHS = 4; // obsolete
- {$EXTERNALSYM DBPROP_CI_DEPTHS}
- DBPROP_CI_SCOPE_FLAGS = 4;
- {$EXTERNALSYM DBPROP_CI_SCOPE_FLAGS}
- DBPROP_CI_EXCLUDE_SCOPES = 5;
- {$EXTERNALSYM DBPROP_CI_EXCLUDE_SCOPES}
- DBPROP_CI_SECURITY_ID = 6;
- {$EXTERNALSYM DBPROP_CI_SECURITY_ID}
- DBPROP_CI_QUERY_TYPE = 7;
- {$EXTERNALSYM DBPROP_CI_QUERY_TYPE}
-
-// Query Extension property set
-
- DBPROPSET_QUERYEXT: TGUID = (
- D1:$A7AC77ED; D2:$F8D7; D3:$11CE; D4:($A7,$98,$00,$20,$F8,$00,$80,$25));
- {$EXTERNALSYM DBPROPSET_QUERYEXT}
-
- DBPROP_USECONTENTINDEX = 2;
- {$EXTERNALSYM DBPROP_USECONTENTINDEX}
- DBPROP_DEFERNONINDEXEDTRIMMING = 3;
- {$EXTERNALSYM DBPROP_DEFERNONINDEXEDTRIMMING}
- DBPROP_USEEXTENDEDDBTYPES = 4;
- {$EXTERNALSYM DBPROP_USEEXTENDEDDBTYPES}
- DBPROP_FIRSTROWS = 7;
- {$EXTERNALSYM DBPROP_FIRSTROWS}
-
-// Content Index Framework Core property set
-
- DBPROPSET_CIFRMWRKCORE_EXT: TGUID = (
- D1:$afafaca5; D2:$b5d1; D3:$11d0; D4:($8c,$62,$00,$c0,$4f,$c2,$db,$8d));
- {$EXTERNALSYM DBPROPSET_CIFRMWRKCORE_EXT}
-
- DBPROP_MACHINE = 2;
- {$EXTERNALSYM DBPROP_MACHINE}
- DBPROP_CLIENT_CLSID = 3;
- {$EXTERNALSYM DBPROP_CLIENT_CLSID}
-
-// MSIDXS Rowset property set
-
- DBPROPSET_MSIDXS_ROWSETEXT: TGUID = (
- D1:$aa6ee6b0; D2:$e828; D3:$11d0; D4:($b2,$3e,$00,$aa,$00,$47,$fc,$01));
- {$EXTERNALSYM DBPROPSET_MSIDXS_ROWSETEXT}
-
- MSIDXSPROP_ROWSETQUERYSTATUS = 2;
- {$EXTERNALSYM MSIDXSPROP_ROWSETQUERYSTATUS}
- MSIDXSPROP_COMMAND_LOCALE_STRING = 3;
- {$EXTERNALSYM MSIDXSPROP_COMMAND_LOCALE_STRING}
- MSIDXSPROP_QUERY_RESTRICTION = 4;
- {$EXTERNALSYM MSIDXSPROP_QUERY_RESTRICTION}
-
-//
-// Query status values returned by MSIDXSPROP_ROWSETQUERYSTATUS
-//
-// Bits Effect
-// ----- -----------------------------------------------------
-// 00-02 Fill Status: How data is being updated, if at all.
-// 03-15 Bitfield query reliability: How accurate the result is
-
- STAT_BUSY = 0;
- {$EXTERNALSYM STAT_BUSY}
- STAT_ERROR = $1;
- {$EXTERNALSYM STAT_ERROR}
- STAT_DONE = $2;
- {$EXTERNALSYM STAT_DONE}
- STAT_REFRESH = $3;
- {$EXTERNALSYM STAT_REFRESH}
-
-function QUERY_FILL_STATUS(x: DWORD): DWORD;
-{$EXTERNALSYM QUERY_FILL_STATUS}
-
-const
- STAT_PARTIAL_SCOPE = $8;
- {$EXTERNALSYM STAT_PARTIAL_SCOPE}
- STAT_NOISE_WORDS = $10;
- {$EXTERNALSYM STAT_NOISE_WORDS}
- STAT_CONTENT_OUT_OF_DATE = $20;
- {$EXTERNALSYM STAT_CONTENT_OUT_OF_DATE}
- STAT_REFRESH_INCOMPLETE = $40;
- {$EXTERNALSYM STAT_REFRESH_INCOMPLETE}
- STAT_CONTENT_QUERY_INCOMPLETE = $80;
- {$EXTERNALSYM STAT_CONTENT_QUERY_INCOMPLETE}
- STAT_TIME_LIMIT_EXCEEDED = $100;
- {$EXTERNALSYM STAT_TIME_LIMIT_EXCEEDED}
- STAT_SHARING_VIOLATION = $200;
- {$EXTERNALSYM STAT_SHARING_VIOLATION}
-
-function QUERY_RELIABILITY_STATUS(x: DWORD): DWORD;
-{$EXTERNALSYM QUERY_RELIABILITY_STATUS}
-
-// Scope flags
-
-const
- QUERY_SHALLOW = 0;
- {$EXTERNALSYM QUERY_SHALLOW}
- QUERY_DEEP = 1;
- {$EXTERNALSYM QUERY_DEEP}
- QUERY_PHYSICAL_PATH = 0;
- {$EXTERNALSYM QUERY_PHYSICAL_PATH}
- QUERY_VIRTUAL_PATH = 2;
- {$EXTERNALSYM QUERY_VIRTUAL_PATH}
-
-// query property set (PSGUID_QUERY) properties not defined in oledb.h
-
- PROPID_QUERY_WORKID = 5;
- {$EXTERNALSYM PROPID_QUERY_WORKID}
- PROPID_QUERY_UNFILTERED = 7;
- {$EXTERNALSYM PROPID_QUERY_UNFILTERED}
- PROPID_QUERY_VIRTUALPATH = 9;
- {$EXTERNALSYM PROPID_QUERY_VIRTUALPATH}
- PROPID_QUERY_LASTSEENTIME = 10;
- {$EXTERNALSYM PROPID_QUERY_LASTSEENTIME}
-
-//
-// Change or get the current state of a catalog specified.
-//
-
- CICAT_STOPPED = $1;
- {$EXTERNALSYM CICAT_STOPPED}
- CICAT_READONLY = $2;
- {$EXTERNALSYM CICAT_READONLY}
- CICAT_WRITABLE = $4;
- {$EXTERNALSYM CICAT_WRITABLE}
- CICAT_NO_QUERY = $8;
- {$EXTERNALSYM CICAT_NO_QUERY}
- CICAT_GET_STATE = $10;
- {$EXTERNALSYM CICAT_GET_STATE}
- CICAT_ALL_OPENED = $20;
- {$EXTERNALSYM CICAT_ALL_OPENED}
-
-function SetCatalogState(pwcsCat, pwcsMachine: PWCHAR; dwNewState: DWORD;
- var pdwOldState: DWORD): HRESULT; stdcall;
-{$EXTERNALSYM SetCatalogState}
-
-//
-// Query catalog state
-//
-
-const
- CI_STATE_SHADOW_MERGE = $0001; // Index is performing a shadow merge
- {$EXTERNALSYM CI_STATE_SHADOW_MERGE}
- CI_STATE_MASTER_MERGE = $0002; // Index is performing a master merge
- {$EXTERNALSYM CI_STATE_MASTER_MERGE}
- CI_STATE_CONTENT_SCAN_REQUIRED = $0004; // Index is likely corrupt, and a rescan is required
- {$EXTERNALSYM CI_STATE_CONTENT_SCAN_REQUIRED}
- CI_STATE_ANNEALING_MERGE = $0008; // Index is performing an annealing (optimizing) merge
- {$EXTERNALSYM CI_STATE_ANNEALING_MERGE}
- CI_STATE_SCANNING = $0010; // Scans are in-progress
- {$EXTERNALSYM CI_STATE_SCANNING}
- CI_STATE_RECOVERING = $0020; // Index metadata is being recovered
- {$EXTERNALSYM CI_STATE_RECOVERING}
- CI_STATE_INDEX_MIGRATION_MERGE = $0040; // Reserved for future use
- {$EXTERNALSYM CI_STATE_INDEX_MIGRATION_MERGE}
- CI_STATE_LOW_MEMORY = $0080; // Indexing is paused due to low memory availability
- {$EXTERNALSYM CI_STATE_LOW_MEMORY}
- CI_STATE_HIGH_IO = $0100; // Indexing is paused due to a high rate of I/O
- {$EXTERNALSYM CI_STATE_HIGH_IO}
- CI_STATE_MASTER_MERGE_PAUSED = $0200; // Master merge is paused
- {$EXTERNALSYM CI_STATE_MASTER_MERGE_PAUSED}
- CI_STATE_READ_ONLY = $0400; // Indexing has been manually paused (read-only)
- {$EXTERNALSYM CI_STATE_READ_ONLY}
- CI_STATE_BATTERY_POWER = $0800; // Indexing is paused to conserve battery life
- {$EXTERNALSYM CI_STATE_BATTERY_POWER}
- CI_STATE_USER_ACTIVE = $1000; // Indexing is paused due to high user activity (keyboard/mouse)
- {$EXTERNALSYM CI_STATE_USER_ACTIVE}
- CI_STATE_STARTING = $2000; // Index is still starting up
- {$EXTERNALSYM CI_STATE_STARTING}
- CI_STATE_READING_USNS = $4000; // USNs on NTFS volumes are being processed
- {$EXTERNALSYM CI_STATE_READING_USNS}
-
-//#include <pshpack4.h>
-
-type
- _CI_STATE = record
- cbStruct: DWORD;
- cWordList: DWORD;
- cPersistentIndex: DWORD;
- cQueries: DWORD;
- cDocuments: DWORD;
- cFreshTest: DWORD;
- dwMergeProgress: DWORD;
- eState: DWORD;
- cFilteredDocuments: DWORD;
- cTotalDocuments: DWORD;
- cPendingScans: DWORD;
- dwIndexSize: DWORD;
- cUniqueKeys: DWORD;
- cSecQDocuments: DWORD;
- dwPropCacheSize: DWORD;
- end;
- {$EXTERNALSYM _CI_STATE}
- CI_STATE = _CI_STATE;
- {$EXTERNALSYM CI_STATE}
- TCiState = CI_STATE;
- PCiState = ^CI_STATE;
-
-//#include <poppack.h>
-
-function CIState(pwcsCat, pwcsMachine: PWCHAR; var pCiState: CI_STATE): HRESULT; stdcall;
-{$EXTERNALSYM CIState}
-
-//
-// Create an ICommand, specifying scopes, catalogs, and machines
-//
-
-function CIMakeICommand(out ppCommand: ICommand; cScope: ULONG; aDepths: LPDWORD;
- awcsScope, awcsCatalogs, awcsMachine: PPWCHAR): HRESULT; stdcall;
-{$EXTERNALSYM CIMakeICommand}
-
-//
-// Create an ICommand, specifying a catalog and machine
-//
-
-function CICreateCommand(out ppCommand: IUnknown; pUnkOuter: IUnknown;
- const riid: REFIID; pwcsCatalog, pwcsMachine: PWCHAR): HRESULT; stdcall;
-{$EXTERNALSYM CICreateCommand}
-
-type
- tagCIPROPERTYDEF = record
- wcsFriendlyName: LPWSTR;
- dbType: DWORD;
- dbCol: DBID;
- end;
- {$EXTERNALSYM tagCIPROPERTYDEF}
- CIPROPERTYDEF = tagCIPROPERTYDEF;
- {$EXTERNALSYM CIPROPERTYDEF}
- TCiPropertyDef = CIPROPERTYDEF;
- PCiPropertyDef = ^CIPROPERTYDEF;
-
-//
-// Values for ulDialect in CITextToSelectTreeEx and CITextToFullTreeEx
-//
-
-const
- ISQLANG_V1 = 1; // Same as the non-Ex versions
- {$EXTERNALSYM ISQLANG_V1}
- ISQLANG_V2 = 2;
- {$EXTERNALSYM ISQLANG_V2}
-
-//
-// Convert pwszRestriction in Triplish to a command tree.
-//
-
-function CITextToSelectTree(pwszRestriction: PWCHAR; var ppTree: PDBCOMMANDTREE;
- cProperties: ULONG; pProperties: PCIPROPERTYDEF; LocaleID: LCID): HRESULT; stdcall;
-{$EXTERNALSYM CITextToSelectTree}
-
-function CITextToSelectTreeEx(pwszRestriction: PWCHAR; ulDialect: ULONG;
- var ppTree: PDBCOMMANDTREE; cProperties: ULONG; pProperties: PCIPROPERTYDEF;
- LocaleID: LCID): HRESULT; stdcall;
-{$EXTERNALSYM CITextToSelectTreeEx}
-
-//
-// Convert pwszRestriction in Triplish, project columns, sort columns
-// and grouping columns to a command tree.
-//
-
-function CITextToFullTree(pwszRestriction, pwszColumns, pwszSortColumns,
- pwszGroupings: PWCHAR; var ppTree: PDBCOMMANDTREE; cProperties: ULONG;
- pProperties: PCIPROPERTYDEF; LocaleID: LCID): HRESULT; stdcall;
-{$EXTERNALSYM CITextToFullTree}
-
-function CITextToFullTreeEx(pwszRestriction: PWCHAR; ulDialect: ULONG;
- pwszColumns, pwszSortColumns, pwszGroupings: PWCHAR; var ppTree: PDBCOMMANDTREE;
- cProperties: ULONG; pProperties: PCIPROPERTYDEF; LocaleID: LCID): HRESULT; stdcall;
-{$EXTERNALSYM CITextToFullTreeEx}
-
-//
-// Build a simple restriction node.
-//
-
-function CIBuildQueryNode(wcsProperty: PWCHAR; dbOperator: DBCOMMANDOP;
- const pvarPropertyValue: PROPVARIANT; var ppTree: PDBCOMMANDTREE;
- cProperties: ULONG; pProperty: PCIPROPERTYDEF; LocaleID: LCID): HRESULT; stdcall;
-{$EXTERNALSYM CIBuildQueryNode}
-
-//
-// Build a restriction tree from an existing tree (could be empty) and a newly added node/tree.
-//
-
-function CIBuildQueryTree(pExistingTree: PDBCOMMANDTREE; dbBoolOp: DBCOMMANDOP;
- cSiblings: ULONG; ppSibsToCombine: PDBCOMMANDTREE; var ppTree: DBCOMMANDTREE): HRESULT; stdcall;
-{$EXTERNALSYM CIBuildQueryTree}
-
-//
-// Convert restriction tree, project columns, sort columns
-// and grouping columns to a command tree.
-//
-
-function CIRestrictionToFullTree(const pTree: DBCOMMANDTREE; pwszColumns,
- pwszSortColumns, pwszGroupings: PWCHAR; var ppTree: PDBCOMMANDTREE;
- cProperties: ULONG; pReserved: PCIPROPERTYDEF; LocaleID: LCID): HRESULT; stdcall;
-{$EXTERNALSYM CIRestrictionToFullTree}
-
-implementation
-
-const
- querylib = 'query.dll';
- {$IFDEF UNICODE}
- AWSuffix = 'W';
- {$ELSE}
- AWSuffix = 'A';
- {$ENDIF UNICODE}
-
-function QUERY_FILL_STATUS(x: DWORD): DWORD;
-begin
- Result := x and $7;
-end;
-
-function QUERY_RELIABILITY_STATUS(x: DWORD): DWORD;
-begin
- Result := x and $FFF8;
-end;
-
-{$IFDEF DYNAMIC_LINK}
-
-var
- _LoadIFilterEx: Pointer;
-
-function LoadIFilterEx;
-begin
- GetProcedureAddress(_LoadIFilterEx, querylib, 'LoadIFilterEx');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_LoadIFilterEx]
- end;
-end;
-
-var
- _LoadIFilter: Pointer;
-
-function LoadIFilter;
-begin
- GetProcedureAddress(_LoadIFilter, querylib, 'LoadIFilter');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_LoadIFilter]
- end;
-end;
-
-var
- _BindIFilterFromStorage: Pointer;
-
-function BindIFilterFromStorage;
-begin
- GetProcedureAddress(_BindIFilterFromStorage, querylib, 'BindIFilterFromStorage');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_BindIFilterFromStorage]
- end;
-end;
-
-var
- _BindIFilterFromStream: Pointer;
-
-function BindIFilterFromStream;
-begin
- GetProcedureAddress(_BindIFilterFromStream, querylib, 'BindIFilterFromStream');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_BindIFilterFromStream]
- end;
-end;
-
-var
- _LocateCatalogsW: Pointer;
-
-function LocateCatalogsW;
-begin
- GetProcedureAddress(_LocateCatalogsW, querylib, 'LocateCatalogsW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_LocateCatalogsW]
- end;
-end;
-
-var
- _LocateCatalogsA: Pointer;
-
-function LocateCatalogsA;
-begin
- GetProcedureAddress(_LocateCatalogsA, querylib, 'LocateCatalogsA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_LocateCatalogsA]
- end;
-end;
-
-var
- _LocateCatalogs: Pointer;
-
-function LocateCatalogs;
-begin
- GetProcedureAddress(_LocateCatalogs, querylib, 'LocateCatalogs' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_LocateCatalogs]
- end;
-end;
-
-var
- _SetCatalogState: Pointer;
-
-function SetCatalogState;
-begin
- GetProcedureAddress(_SetCatalogState, querylib, 'SetCatalogState');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetCatalogState]
- end;
-end;
-
-var
- _CIState: Pointer;
-
-function CIState;
-begin
- GetProcedureAddress(_CIState, querylib, 'CIState');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CIState]
- end;
-end;
-
-var
- _CIMakeICommand: Pointer;
-
-function CIMakeICommand;
-begin
- GetProcedureAddress(_CIMakeICommand, querylib, 'CIMakeICommand');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CIMakeICommand]
- end;
-end;
-
-var
- _CICreateCommand: Pointer;
-
-function CICreateCommand;
-begin
- GetProcedureAddress(_CICreateCommand, querylib, 'CICreateCommand');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CICreateCommand]
- end;
-end;
-
-var
- _CITextToSelectTree: Pointer;
-
-function CITextToSelectTree;
-begin
- GetProcedureAddress(_CITextToSelectTree, querylib, 'CITextToSelectTree');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CITextToSelectTree]
- end;
-end;
-
-var
- _CITextToSelectTreeEx: Pointer;
-
-function CITextToSelectTreeEx;
-begin
- GetProcedureAddress(_CITextToSelectTreeEx, querylib, 'CITextToSelectTreeEx');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CITextToSelectTreeEx]
- end;
-end;
-
-var
- _CITextToFullTree: Pointer;
-
-function CITextToFullTree;
-begin
- GetProcedureAddress(_CITextToFullTree, querylib, 'CITextToSelectTreeEx');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CITextToFullTree]
- end;
-end;
-
-var
- _CITextToFullTreeEx: Pointer;
-
-function CITextToFullTreeEx;
-begin
- GetProcedureAddress(_CITextToFullTreeEx, querylib, 'CITextToFullTreeEx');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CITextToFullTreeEx]
- end;
-end;
-
-var
- _CIBuildQueryNode: Pointer;
-
-function CIBuildQueryNode;
-begin
- GetProcedureAddress(_CIBuildQueryNode, querylib, 'CIBuildQueryNode');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CIBuildQueryNode]
- end;
-end;
-
-var
- _CIBuildQueryTree: Pointer;
-
-function CIBuildQueryTree;
-begin
- GetProcedureAddress(_CIBuildQueryTree, querylib, 'CIBuildQueryTree');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CIBuildQueryTree]
- end;
-end;
-
-var
- _CIRestrictionToFullTree: Pointer;
-
-function CIRestrictionToFullTree;
-begin
- GetProcedureAddress(_CIRestrictionToFullTree, querylib, 'CIRestrictionToFullTree');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CIRestrictionToFullTree]
- end;
-end;
-
-{$ELSE}
-
-function LoadIFilterEx; external querylib name 'LoadIFilterEx';
-function LoadIFilter; external querylib name 'LoadIFilter';
-function BindIFilterFromStorage; external querylib name 'BindIFilterFromStorage';
-function BindIFilterFromStream; external querylib name 'BindIFilterFromStream';
-function LocateCatalogsW; external querylib name 'LocateCatalogsW';
-function LocateCatalogsA; external querylib name 'LocateCatalogsA';
-function LocateCatalogs; external querylib name 'LocateCatalogs' + AWSuffix;
-function SetCatalogState; external querylib name 'SetCatalogState';
-function CIState; external querylib name 'CIState';
-function CIMakeICommand; external querylib name 'CIMakeICommand';
-function CICreateCommand; external querylib name 'CICreateCommand';
-function CITextToSelectTree; external querylib name 'CITextToSelectTree';
-function CITextToSelectTreeEx; external querylib name 'CITextToSelectTreeEx';
-function CITextToFullTree; external querylib name 'CITextToSelectTreeEx';
-function CITextToFullTreeEx; external querylib name 'CITextToFullTreeEx';
-function CIBuildQueryNode; external querylib name 'CIBuildQueryNode';
-function CIBuildQueryTree; external querylib name 'CIBuildQueryTree';
-function CIRestrictionToFullTree; external querylib name 'CIRestrictionToFullTree';
-
-{$ENDIF DYNAMIC_LINK}
-
-end.
+{******************************************************************************}
+{ }
+{ Indezing Service Query API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: nyquery.h, released August 2001. The original Pascal }
+{ code is: NtQuery.pas, released December 2000. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwantquery.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaNtQuery;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "ntquery.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ ActiveX, ComObj, {TODO}
+ JwaWinType;
+
+{$IFDEF FPC}
+Type
+ PROPID = CARDINAL;
+ PROPVARIANT=VARIANT;
+{$ENDIF}
+
+type
+ // TODO STUBS see CmdTree.h (cmdtree.idl)
+ IFilter = Pointer;
+ IUnkown = Pointer;
+ ICommand = Pointer;
+ PPWCHAR = ^PWCHAR;
+ REFIID = TGUID; // also in ActiveDS
+ DBID = Pointer;
+ DBCOMMANDTREE = Pointer;
+ PDBCOMMANDTREE = Pointer;
+ DBCOMMANDOP = Pointer;
+
+//
+// Use this path for the null catalog, one that doesn't have an index.
+// Use it to search for properties of files that are not indexed.
+//
+
+const
+ CINULLCATALOG = '::_noindex_::';
+ {$EXTERNALSYM CINULLCATALOG}
+
+//
+// Use this path to connect to the server for administration work
+// (i.e. DocStoreAdmin.) No catalog is associated with the connection
+//
+
+ CIADMIN = '::_nodocstore_::';
+ {$EXTERNALSYM CIADMIN}
+
+//
+// Minimal support for persistent handlers.
+//
+
+function LoadIFilter(pwcsPath: PWCHAR; pUnkOuter: IUnknown; out ppIUnk: IFilter): HRESULT; stdcall;
+{$EXTERNALSYM LoadIFilter}
+
+const
+ LIFF_LOAD_DEFINED_FILTER = 1;
+ {$EXTERNALSYM LIFF_LOAD_DEFINED_FILTER}
+ LIFF_IMPLEMENT_TEXT_FILTER_FALLBACK_POLICY = 2;
+ {$EXTERNALSYM LIFF_IMPLEMENT_TEXT_FILTER_FALLBACK_POLICY}
+ LIFF_FORCE_TEXT_FILTER_FALLBACK = 3;
+ {$EXTERNALSYM LIFF_FORCE_TEXT_FILTER_FALLBACK}
+
+function LoadIFilterEx(pwcsPath: PWCHAR; dwFlags: DWORD; const riid: REFIID; out ppIUnk: IUnknown): HRESULT; stdcall;
+{$EXTERNALSYM LoadIFilterEx}
+
+function BindIFilterFromStorage(pStg: IStorage; pUnkOuter: IUnknown; out ppIUnk: IFilter): HRESULT; stdcall;
+{$EXTERNALSYM BindIFilterFromStorage}
+
+function BindIFilterFromStream(pStm: IStream; pUnkOuter: IUnkown; out ppIUnk: IFilter): HRESULT; stdcall;
+{$EXTERNALSYM BindIFilterFromStream}
+
+function LocateCatalogsW(pwszScope: PWCHAR; iBmk: ULONG; pwszMachine: PWCHAR;
+ var pccMachine: ULONG; pwszCat: PWCHAR; var pccCat: ULONG): HRESULT; stdcall;
+{$EXTERNALSYM LocateCatalogsW}
+
+//
+// For calling from VB
+//
+
+function LocateCatalogsA(pwszScope: PCHAR; iBmk: ULONG; pwszMachine: PCHAR;
+ var pccMachine: ULONG; pwszCat: PCHAR; var pccCat: ULONG): HRESULT; stdcall;
+{$EXTERNALSYM LocateCatalogsA}
+
+function LocateCatalogs(pwszScope: PTCHAR; iBmk: ULONG; pwszMachine: PTCHAR;
+ var pccMachine: ULONG; pwszCat: PTCHAR; var pccCat: ULONG): HRESULT; stdcall;
+{$EXTERNALSYM LocateCatalogs}
+
+// The Index Server Data Source Object CLSID
+
+const
+ CLSID_INDEX_SERVER_DSO: TGUID = (
+ D1:$F9AE8980; D2:$7E52; D3:$11d0; D4:($89,$64,$00,$C0,$4F,$D6,$11,$D7));
+ {$EXTERNALSYM CLSID_INDEX_SERVER_DSO}
+
+// The storage property set
+
+ PSGUID_STORAGE: TGUID = (
+ D1:$b725f130; D2:$47ef; D3:$101a; D4:($a5,$f1,$02,$60,$8c,$9e,$eb,$ac));
+ {$EXTERNALSYM PSGUID_STORAGE}
+
+//#define PID_STG_DICTIONARY ((PROPID) 0x00000000) //reserved
+//#define PID_STG_CODEPAGE ((PROPID) 0x00000001) //reserved
+
+ PID_STG_DIRECTORY = PROPID($00000002);
+ {$EXTERNALSYM PID_STG_DIRECTORY}
+ PID_STG_CLASSID = PROPID($00000003);
+ {$EXTERNALSYM PID_STG_CLASSID}
+ PID_STG_STORAGETYPE = PROPID($00000004);
+ {$EXTERNALSYM PID_STG_STORAGETYPE}
+ PID_STG_VOLUME_ID = PROPID($00000005);
+ {$EXTERNALSYM PID_STG_VOLUME_ID}
+ PID_STG_PARENT_WORKID = PROPID($00000006);
+ {$EXTERNALSYM PID_STG_PARENT_WORKID}
+ PID_STG_SECONDARYSTORE = PROPID($00000007);
+ {$EXTERNALSYM PID_STG_SECONDARYSTORE}
+ PID_STG_FILEINDEX = PROPID($00000008);
+ {$EXTERNALSYM PID_STG_FILEINDEX}
+ PID_STG_LASTCHANGEUSN = PROPID($00000009);
+ {$EXTERNALSYM PID_STG_LASTCHANGEUSN}
+ PID_STG_NAME = PROPID($0000000a);
+ {$EXTERNALSYM PID_STG_NAME}
+ PID_STG_PATH = PROPID($0000000b);
+ {$EXTERNALSYM PID_STG_PATH}
+ PID_STG_SIZE = PROPID($0000000c);
+ {$EXTERNALSYM PID_STG_SIZE}
+ PID_STG_ATTRIBUTES = PROPID($0000000d);
+ {$EXTERNALSYM PID_STG_ATTRIBUTES}
+ PID_STG_WRITETIME = PROPID($0000000e);
+ {$EXTERNALSYM PID_STG_WRITETIME}
+ PID_STG_CREATETIME = PROPID($0000000f);
+ {$EXTERNALSYM PID_STG_CREATETIME}
+ PID_STG_ACCESSTIME = PROPID($00000010);
+ {$EXTERNALSYM PID_STG_ACCESSTIME}
+ PID_STG_CHANGETIME = PROPID($00000011);
+ {$EXTERNALSYM PID_STG_CHANGETIME}
+ PID_STG_CONTENTS = PROPID($00000013);
+ {$EXTERNALSYM PID_STG_CONTENTS}
+ PID_STG_SHORTNAME = PROPID($00000014);
+ {$EXTERNALSYM PID_STG_SHORTNAME}
+ PID_STG_MAX = PID_STG_SHORTNAME;
+ {$EXTERNALSYM PID_STG_MAX}
+ CSTORAGEPROPERTY = $15;
+ {$EXTERNALSYM CSTORAGEPROPERTY}
+
+// File System Content Index Framework property set
+
+ DBPROPSET_FSCIFRMWRK_EXT: TGUID = (
+ D1:$A9BD1526; D2:$6A80; D3:$11D0; D4:($8C,$9D,$00,$20,$AF,$1D,$74,$0E));
+ {$EXTERNALSYM DBPROPSET_FSCIFRMWRK_EXT}
+
+ DBPROP_CI_CATALOG_NAME = 2;
+ {$EXTERNALSYM DBPROP_CI_CATALOG_NAME}
+ DBPROP_CI_INCLUDE_SCOPES = 3;
+ {$EXTERNALSYM DBPROP_CI_INCLUDE_SCOPES}
+ DBPROP_CI_DEPTHS = 4; // obsolete
+ {$EXTERNALSYM DBPROP_CI_DEPTHS}
+ DBPROP_CI_SCOPE_FLAGS = 4;
+ {$EXTERNALSYM DBPROP_CI_SCOPE_FLAGS}
+ DBPROP_CI_EXCLUDE_SCOPES = 5;
+ {$EXTERNALSYM DBPROP_CI_EXCLUDE_SCOPES}
+ DBPROP_CI_SECURITY_ID = 6;
+ {$EXTERNALSYM DBPROP_CI_SECURITY_ID}
+ DBPROP_CI_QUERY_TYPE = 7;
+ {$EXTERNALSYM DBPROP_CI_QUERY_TYPE}
+
+// Query Extension property set
+
+ DBPROPSET_QUERYEXT: TGUID = (
+ D1:$A7AC77ED; D2:$F8D7; D3:$11CE; D4:($A7,$98,$00,$20,$F8,$00,$80,$25));
+ {$EXTERNALSYM DBPROPSET_QUERYEXT}
+
+ DBPROP_USECONTENTINDEX = 2;
+ {$EXTERNALSYM DBPROP_USECONTENTINDEX}
+ DBPROP_DEFERNONINDEXEDTRIMMING = 3;
+ {$EXTERNALSYM DBPROP_DEFERNONINDEXEDTRIMMING}
+ DBPROP_USEEXTENDEDDBTYPES = 4;
+ {$EXTERNALSYM DBPROP_USEEXTENDEDDBTYPES}
+ DBPROP_FIRSTROWS = 7;
+ {$EXTERNALSYM DBPROP_FIRSTROWS}
+
+// Content Index Framework Core property set
+
+ DBPROPSET_CIFRMWRKCORE_EXT: TGUID = (
+ D1:$afafaca5; D2:$b5d1; D3:$11d0; D4:($8c,$62,$00,$c0,$4f,$c2,$db,$8d));
+ {$EXTERNALSYM DBPROPSET_CIFRMWRKCORE_EXT}
+
+ DBPROP_MACHINE = 2;
+ {$EXTERNALSYM DBPROP_MACHINE}
+ DBPROP_CLIENT_CLSID = 3;
+ {$EXTERNALSYM DBPROP_CLIENT_CLSID}
+
+// MSIDXS Rowset property set
+
+ DBPROPSET_MSIDXS_ROWSETEXT: TGUID = (
+ D1:$aa6ee6b0; D2:$e828; D3:$11d0; D4:($b2,$3e,$00,$aa,$00,$47,$fc,$01));
+ {$EXTERNALSYM DBPROPSET_MSIDXS_ROWSETEXT}
+
+ MSIDXSPROP_ROWSETQUERYSTATUS = 2;
+ {$EXTERNALSYM MSIDXSPROP_ROWSETQUERYSTATUS}
+ MSIDXSPROP_COMMAND_LOCALE_STRING = 3;
+ {$EXTERNALSYM MSIDXSPROP_COMMAND_LOCALE_STRING}
+ MSIDXSPROP_QUERY_RESTRICTION = 4;
+ {$EXTERNALSYM MSIDXSPROP_QUERY_RESTRICTION}
+
+//
+// Query status values returned by MSIDXSPROP_ROWSETQUERYSTATUS
+//
+// Bits Effect
+// ----- -----------------------------------------------------
+// 00-02 Fill Status: How data is being updated, if at all.
+// 03-15 Bitfield query reliability: How accurate the result is
+
+ STAT_BUSY = 0;
+ {$EXTERNALSYM STAT_BUSY}
+ STAT_ERROR = $1;
+ {$EXTERNALSYM STAT_ERROR}
+ STAT_DONE = $2;
+ {$EXTERNALSYM STAT_DONE}
+ STAT_REFRESH = $3;
+ {$EXTERNALSYM STAT_REFRESH}
+
+function QUERY_FILL_STATUS(x: DWORD): DWORD;
+{$EXTERNALSYM QUERY_FILL_STATUS}
+
+const
+ STAT_PARTIAL_SCOPE = $8;
+ {$EXTERNALSYM STAT_PARTIAL_SCOPE}
+ STAT_NOISE_WORDS = $10;
+ {$EXTERNALSYM STAT_NOISE_WORDS}
+ STAT_CONTENT_OUT_OF_DATE = $20;
+ {$EXTERNALSYM STAT_CONTENT_OUT_OF_DATE}
+ STAT_REFRESH_INCOMPLETE = $40;
+ {$EXTERNALSYM STAT_REFRESH_INCOMPLETE}
+ STAT_CONTENT_QUERY_INCOMPLETE = $80;
+ {$EXTERNALSYM STAT_CONTENT_QUERY_INCOMPLETE}
+ STAT_TIME_LIMIT_EXCEEDED = $100;
+ {$EXTERNALSYM STAT_TIME_LIMIT_EXCEEDED}
+ STAT_SHARING_VIOLATION = $200;
+ {$EXTERNALSYM STAT_SHARING_VIOLATION}
+
+function QUERY_RELIABILITY_STATUS(x: DWORD): DWORD;
+{$EXTERNALSYM QUERY_RELIABILITY_STATUS}
+
+// Scope flags
+
+const
+ QUERY_SHALLOW = 0;
+ {$EXTERNALSYM QUERY_SHALLOW}
+ QUERY_DEEP = 1;
+ {$EXTERNALSYM QUERY_DEEP}
+ QUERY_PHYSICAL_PATH = 0;
+ {$EXTERNALSYM QUERY_PHYSICAL_PATH}
+ QUERY_VIRTUAL_PATH = 2;
+ {$EXTERNALSYM QUERY_VIRTUAL_PATH}
+
+// query property set (PSGUID_QUERY) properties not defined in oledb.h
+
+ PROPID_QUERY_WORKID = 5;
+ {$EXTERNALSYM PROPID_QUERY_WORKID}
+ PROPID_QUERY_UNFILTERED = 7;
+ {$EXTERNALSYM PROPID_QUERY_UNFILTERED}
+ PROPID_QUERY_VIRTUALPATH = 9;
+ {$EXTERNALSYM PROPID_QUERY_VIRTUALPATH}
+ PROPID_QUERY_LASTSEENTIME = 10;
+ {$EXTERNALSYM PROPID_QUERY_LASTSEENTIME}
+
+//
+// Change or get the current state of a catalog specified.
+//
+
+ CICAT_STOPPED = $1;
+ {$EXTERNALSYM CICAT_STOPPED}
+ CICAT_READONLY = $2;
+ {$EXTERNALSYM CICAT_READONLY}
+ CICAT_WRITABLE = $4;
+ {$EXTERNALSYM CICAT_WRITABLE}
+ CICAT_NO_QUERY = $8;
+ {$EXTERNALSYM CICAT_NO_QUERY}
+ CICAT_GET_STATE = $10;
+ {$EXTERNALSYM CICAT_GET_STATE}
+ CICAT_ALL_OPENED = $20;
+ {$EXTERNALSYM CICAT_ALL_OPENED}
+
+function SetCatalogState(pwcsCat, pwcsMachine: PWCHAR; dwNewState: DWORD;
+ var pdwOldState: DWORD): HRESULT; stdcall;
+{$EXTERNALSYM SetCatalogState}
+
+//
+// Query catalog state
+//
+
+const
+ CI_STATE_SHADOW_MERGE = $0001; // Index is performing a shadow merge
+ {$EXTERNALSYM CI_STATE_SHADOW_MERGE}
+ CI_STATE_MASTER_MERGE = $0002; // Index is performing a master merge
+ {$EXTERNALSYM CI_STATE_MASTER_MERGE}
+ CI_STATE_CONTENT_SCAN_REQUIRED = $0004; // Index is likely corrupt, and a rescan is required
+ {$EXTERNALSYM CI_STATE_CONTENT_SCAN_REQUIRED}
+ CI_STATE_ANNEALING_MERGE = $0008; // Index is performing an annealing (optimizing) merge
+ {$EXTERNALSYM CI_STATE_ANNEALING_MERGE}
+ CI_STATE_SCANNING = $0010; // Scans are in-progress
+ {$EXTERNALSYM CI_STATE_SCANNING}
+ CI_STATE_RECOVERING = $0020; // Index metadata is being recovered
+ {$EXTERNALSYM CI_STATE_RECOVERING}
+ CI_STATE_INDEX_MIGRATION_MERGE = $0040; // Reserved for future use
+ {$EXTERNALSYM CI_STATE_INDEX_MIGRATION_MERGE}
+ CI_STATE_LOW_MEMORY = $0080; // Indexing is paused due to low memory availability
+ {$EXTERNALSYM CI_STATE_LOW_MEMORY}
+ CI_STATE_HIGH_IO = $0100; // Indexing is paused due to a high rate of I/O
+ {$EXTERNALSYM CI_STATE_HIGH_IO}
+ CI_STATE_MASTER_MERGE_PAUSED = $0200; // Master merge is paused
+ {$EXTERNALSYM CI_STATE_MASTER_MERGE_PAUSED}
+ CI_STATE_READ_ONLY = $0400; // Indexing has been manually paused (read-only)
+ {$EXTERNALSYM CI_STATE_READ_ONLY}
+ CI_STATE_BATTERY_POWER = $0800; // Indexing is paused to conserve battery life
+ {$EXTERNALSYM CI_STATE_BATTERY_POWER}
+ CI_STATE_USER_ACTIVE = $1000; // Indexing is paused due to high user activity (keyboard/mouse)
+ {$EXTERNALSYM CI_STATE_USER_ACTIVE}
+ CI_STATE_STARTING = $2000; // Index is still starting up
+ {$EXTERNALSYM CI_STATE_STARTING}
+ CI_STATE_READING_USNS = $4000; // USNs on NTFS volumes are being processed
+ {$EXTERNALSYM CI_STATE_READING_USNS}
+
+//#include <pshpack4.h>
+
+type
+ _CI_STATE = record
+ cbStruct: DWORD;
+ cWordList: DWORD;
+ cPersistentIndex: DWORD;
+ cQueries: DWORD;
+ cDocuments: DWORD;
+ cFreshTest: DWORD;
+ dwMergeProgress: DWORD;
+ eState: DWORD;
+ cFilteredDocuments: DWORD;
+ cTotalDocuments: DWORD;
+ cPendingScans: DWORD;
+ dwIndexSize: DWORD;
+ cUniqueKeys: DWORD;
+ cSecQDocuments: DWORD;
+ dwPropCacheSize: DWORD;
+ end;
+ {$EXTERNALSYM _CI_STATE}
+ CI_STATE = _CI_STATE;
+ {$EXTERNALSYM CI_STATE}
+ TCiState = CI_STATE;
+ PCiState = ^CI_STATE;
+
+//#include <poppack.h>
+
+function CIState(pwcsCat, pwcsMachine: PWCHAR; var pCiState: CI_STATE): HRESULT; stdcall;
+{$EXTERNALSYM CIState}
+
+//
+// Create an ICommand, specifying scopes, catalogs, and machines
+//
+
+function CIMakeICommand(out ppCommand: ICommand; cScope: ULONG; aDepths: LPDWORD;
+ awcsScope, awcsCatalogs, awcsMachine: PPWCHAR): HRESULT; stdcall;
+{$EXTERNALSYM CIMakeICommand}
+
+//
+// Create an ICommand, specifying a catalog and machine
+//
+
+function CICreateCommand(out ppCommand: IUnknown; pUnkOuter: IUnknown;
+ const riid: REFIID; pwcsCatalog, pwcsMachine: PWCHAR): HRESULT; stdcall;
+{$EXTERNALSYM CICreateCommand}
+
+type
+ tagCIPROPERTYDEF = record
+ wcsFriendlyName: LPWSTR;
+ dbType: DWORD;
+ dbCol: DBID;
+ end;
+ {$EXTERNALSYM tagCIPROPERTYDEF}
+ CIPROPERTYDEF = tagCIPROPERTYDEF;
+ {$EXTERNALSYM CIPROPERTYDEF}
+ TCiPropertyDef = CIPROPERTYDEF;
+ PCiPropertyDef = ^CIPROPERTYDEF;
+
+//
+// Values for ulDialect in CITextToSelectTreeEx and CITextToFullTreeEx
+//
+
+const
+ ISQLANG_V1 = 1; // Same as the non-Ex versions
+ {$EXTERNALSYM ISQLANG_V1}
+ ISQLANG_V2 = 2;
+ {$EXTERNALSYM ISQLANG_V2}
+
+//
+// Convert pwszRestriction in Triplish to a command tree.
+//
+
+function CITextToSelectTree(pwszRestriction: PWCHAR; var ppTree: PDBCOMMANDTREE;
+ cProperties: ULONG; pProperties: PCIPROPERTYDEF; LocaleID: LCID): HRESULT; stdcall;
+{$EXTERNALSYM CITextToSelectTree}
+
+function CITextToSelectTreeEx(pwszRestriction: PWCHAR; ulDialect: ULONG;
+ var ppTree: PDBCOMMANDTREE; cProperties: ULONG; pProperties: PCIPROPERTYDEF;
+ LocaleID: LCID): HRESULT; stdcall;
+{$EXTERNALSYM CITextToSelectTreeEx}
+
+//
+// Convert pwszRestriction in Triplish, project columns, sort columns
+// and grouping columns to a command tree.
+//
+
+function CITextToFullTree(pwszRestriction, pwszColumns, pwszSortColumns,
+ pwszGroupings: PWCHAR; var ppTree: PDBCOMMANDTREE; cProperties: ULONG;
+ pProperties: PCIPROPERTYDEF; LocaleID: LCID): HRESULT; stdcall;
+{$EXTERNALSYM CITextToFullTree}
+
+function CITextToFullTreeEx(pwszRestriction: PWCHAR; ulDialect: ULONG;
+ pwszColumns, pwszSortColumns, pwszGroupings: PWCHAR; var ppTree: PDBCOMMANDTREE;
+ cProperties: ULONG; pProperties: PCIPROPERTYDEF; LocaleID: LCID): HRESULT; stdcall;
+{$EXTERNALSYM CITextToFullTreeEx}
+
+//
+// Build a simple restriction node.
+//
+
+function CIBuildQueryNode(wcsProperty: PWCHAR; dbOperator: DBCOMMANDOP;
+ const pvarPropertyValue: PROPVARIANT; var ppTree: PDBCOMMANDTREE;
+ cProperties: ULONG; pProperty: PCIPROPERTYDEF; LocaleID: LCID): HRESULT; stdcall;
+{$EXTERNALSYM CIBuildQueryNode}
+
+//
+// Build a restriction tree from an existing tree (could be empty) and a newly added node/tree.
+//
+
+function CIBuildQueryTree(pExistingTree: PDBCOMMANDTREE; dbBoolOp: DBCOMMANDOP;
+ cSiblings: ULONG; ppSibsToCombine: PDBCOMMANDTREE; var ppTree: DBCOMMANDTREE): HRESULT; stdcall;
+{$EXTERNALSYM CIBuildQueryTree}
+
+//
+// Convert restriction tree, project columns, sort columns
+// and grouping columns to a command tree.
+//
+
+function CIRestrictionToFullTree(const pTree: DBCOMMANDTREE; pwszColumns,
+ pwszSortColumns, pwszGroupings: PWCHAR; var ppTree: PDBCOMMANDTREE;
+ cProperties: ULONG; pReserved: PCIPROPERTYDEF; LocaleID: LCID): HRESULT; stdcall;
+{$EXTERNALSYM CIRestrictionToFullTree}
+
+implementation
+
+const
+ querylib = 'query.dll';
+ {$IFDEF UNICODE}
+ AWSuffix = 'W';
+ {$ELSE}
+ AWSuffix = 'A';
+ {$ENDIF UNICODE}
+
+function QUERY_FILL_STATUS(x: DWORD): DWORD;
+begin
+ Result := x and $7;
+end;
+
+function QUERY_RELIABILITY_STATUS(x: DWORD): DWORD;
+begin
+ Result := x and $FFF8;
+end;
+
+{$IFDEF DYNAMIC_LINK}
+
+var
+ _LoadIFilterEx: Pointer;
+
+function LoadIFilterEx;
+begin
+ GetProcedureAddress(_LoadIFilterEx, querylib, 'LoadIFilterEx');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_LoadIFilterEx]
+ end;
+end;
+
+var
+ _LoadIFilter: Pointer;
+
+function LoadIFilter;
+begin
+ GetProcedureAddress(_LoadIFilter, querylib, 'LoadIFilter');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_LoadIFilter]
+ end;
+end;
+
+var
+ _BindIFilterFromStorage: Pointer;
+
+function BindIFilterFromStorage;
+begin
+ GetProcedureAddress(_BindIFilterFromStorage, querylib, 'BindIFilterFromStorage');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_BindIFilterFromStorage]
+ end;
+end;
+
+var
+ _BindIFilterFromStream: Pointer;
+
+function BindIFilterFromStream;
+begin
+ GetProcedureAddress(_BindIFilterFromStream, querylib, 'BindIFilterFromStream');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_BindIFilterFromStream]
+ end;
+end;
+
+var
+ _LocateCatalogsW: Pointer;
+
+function LocateCatalogsW;
+begin
+ GetProcedureAddress(_LocateCatalogsW, querylib, 'LocateCatalogsW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_LocateCatalogsW]
+ end;
+end;
+
+var
+ _LocateCatalogsA: Pointer;
+
+function LocateCatalogsA;
+begin
+ GetProcedureAddress(_LocateCatalogsA, querylib, 'LocateCatalogsA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_LocateCatalogsA]
+ end;
+end;
+
+var
+ _LocateCatalogs: Pointer;
+
+function LocateCatalogs;
+begin
+ GetProcedureAddress(_LocateCatalogs, querylib, 'LocateCatalogs' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_LocateCatalogs]
+ end;
+end;
+
+var
+ _SetCatalogState: Pointer;
+
+function SetCatalogState;
+begin
+ GetProcedureAddress(_SetCatalogState, querylib, 'SetCatalogState');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetCatalogState]
+ end;
+end;
+
+var
+ _CIState: Pointer;
+
+function CIState;
+begin
+ GetProcedureAddress(_CIState, querylib, 'CIState');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CIState]
+ end;
+end;
+
+var
+ _CIMakeICommand: Pointer;
+
+function CIMakeICommand;
+begin
+ GetProcedureAddress(_CIMakeICommand, querylib, 'CIMakeICommand');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CIMakeICommand]
+ end;
+end;
+
+var
+ _CICreateCommand: Pointer;
+
+function CICreateCommand;
+begin
+ GetProcedureAddress(_CICreateCommand, querylib, 'CICreateCommand');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CICreateCommand]
+ end;
+end;
+
+var
+ _CITextToSelectTree: Pointer;
+
+function CITextToSelectTree;
+begin
+ GetProcedureAddress(_CITextToSelectTree, querylib, 'CITextToSelectTree');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CITextToSelectTree]
+ end;
+end;
+
+var
+ _CITextToSelectTreeEx: Pointer;
+
+function CITextToSelectTreeEx;
+begin
+ GetProcedureAddress(_CITextToSelectTreeEx, querylib, 'CITextToSelectTreeEx');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CITextToSelectTreeEx]
+ end;
+end;
+
+var
+ _CITextToFullTree: Pointer;
+
+function CITextToFullTree;
+begin
+ GetProcedureAddress(_CITextToFullTree, querylib, 'CITextToSelectTreeEx');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CITextToFullTree]
+ end;
+end;
+
+var
+ _CITextToFullTreeEx: Pointer;
+
+function CITextToFullTreeEx;
+begin
+ GetProcedureAddress(_CITextToFullTreeEx, querylib, 'CITextToFullTreeEx');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CITextToFullTreeEx]
+ end;
+end;
+
+var
+ _CIBuildQueryNode: Pointer;
+
+function CIBuildQueryNode;
+begin
+ GetProcedureAddress(_CIBuildQueryNode, querylib, 'CIBuildQueryNode');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CIBuildQueryNode]
+ end;
+end;
+
+var
+ _CIBuildQueryTree: Pointer;
+
+function CIBuildQueryTree;
+begin
+ GetProcedureAddress(_CIBuildQueryTree, querylib, 'CIBuildQueryTree');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CIBuildQueryTree]
+ end;
+end;
+
+var
+ _CIRestrictionToFullTree: Pointer;
+
+function CIRestrictionToFullTree;
+begin
+ GetProcedureAddress(_CIRestrictionToFullTree, querylib, 'CIRestrictionToFullTree');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CIRestrictionToFullTree]
+ end;
+end;
+
+{$ELSE}
+
+function LoadIFilterEx; external querylib name 'LoadIFilterEx';
+function LoadIFilter; external querylib name 'LoadIFilter';
+function BindIFilterFromStorage; external querylib name 'BindIFilterFromStorage';
+function BindIFilterFromStream; external querylib name 'BindIFilterFromStream';
+function LocateCatalogsW; external querylib name 'LocateCatalogsW';
+function LocateCatalogsA; external querylib name 'LocateCatalogsA';
+function LocateCatalogs; external querylib name 'LocateCatalogs' + AWSuffix;
+function SetCatalogState; external querylib name 'SetCatalogState';
+function CIState; external querylib name 'CIState';
+function CIMakeICommand; external querylib name 'CIMakeICommand';
+function CICreateCommand; external querylib name 'CICreateCommand';
+function CITextToSelectTree; external querylib name 'CITextToSelectTree';
+function CITextToSelectTreeEx; external querylib name 'CITextToSelectTreeEx';
+function CITextToFullTree; external querylib name 'CITextToSelectTreeEx';
+function CITextToFullTreeEx; external querylib name 'CITextToFullTreeEx';
+function CIBuildQueryNode; external querylib name 'CIBuildQueryNode';
+function CIBuildQueryTree; external querylib name 'CIBuildQueryTree';
+function CIRestrictionToFullTree; external querylib name 'CIRestrictionToFullTree';
+
+{$ENDIF DYNAMIC_LINK}
+
+end.
diff --git a/packages/extra/winunits/jwantsecapi.pas b/packages/extra/winunits/jwantsecapi.pas
index 5e668ddd3d..794a475caf 100644
--- a/packages/extra/winunits/jwantsecapi.pas
+++ b/packages/extra/winunits/jwantsecapi.pas
@@ -1,4107 +1,4107 @@
-{******************************************************************************}
-{ }
-{ LSA API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: ntsecapi.h, released June 2000. The original Pascal }
-{ code is: NtSecApi.pas, released December 2000. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwantsecapi.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaNtSecApi;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "ntsecapi.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaWinType, JwaNtStatus, JwaWinNT;
-
-//
-// Security operation mode of the system is held in a control
-// longword.
-//
-
-type
- LSA_OPERATIONAL_MODE = ULONG;
- {$EXTERNALSYM LSA_OPERATIONAL_MODE}
- PLSA_OPERATIONAL_MODE = ^LSA_OPERATIONAL_MODE;
- {$EXTERNALSYM PLSA_OPERATIONAL_MODE}
-
-//
-// The flags in the security operational mode are defined
-// as:
-//
-// PasswordProtected - Some level of authentication (such as
-// a password) must be provided by users before they are
-// allowed to use the system. Once set, this value will
-// not be cleared without re-booting the system.
-//
-// IndividualAccounts - Each user must identify an account to
-// logon to. This flag is only meaningful if the
-// PasswordProtected flag is also set. If this flag is
-// not set and the PasswordProtected flag is set, then all
-// users may logon to the same account. Once set, this value
-// will not be cleared without re-booting the system.
-//
-// MandatoryAccess - Indicates the system is running in a mandatory
-// access control mode (e.g., B-level as defined by the U.S.A's
-// Department of Defense's "Orange Book"). This is not utilized
-// in the current release of NT. This flag is only meaningful
-// if both the PasswordProtected and IndividualAccounts flags are
-// set. Once set, this value will not be cleared without
-// re-booting the system.
-//
-// LogFull - Indicates the system has been brought up in a mode in
-// which if must perform security auditing, but its audit log
-// is full. This may (should) restrict the operations that
-// can occur until the audit log is made not-full again. THIS
-// VALUE MAY BE CLEARED WHILE THE SYSTEM IS RUNNING (I.E., WITHOUT
-// REBOOTING).
-//
-// If the PasswordProtected flag is not set, then the system is running
-// without security, and user interface should be adjusted appropriately.
-//
-
-const
- LSA_MODE_PASSWORD_PROTECTED = $00000001;
- {$EXTERNALSYM LSA_MODE_PASSWORD_PROTECTED}
- LSA_MODE_INDIVIDUAL_ACCOUNTS = $00000002;
- {$EXTERNALSYM LSA_MODE_INDIVIDUAL_ACCOUNTS}
- LSA_MODE_MANDATORY_ACCESS = $00000004;
- {$EXTERNALSYM LSA_MODE_MANDATORY_ACCESS}
- LSA_MODE_LOG_FULL = $00000008;
- {$EXTERNALSYM LSA_MODE_LOG_FULL}
-
-//
-// Used by a logon process to indicate what type of logon is being
-// requested.
-//
-
-type
- _SECURITY_LOGON_TYPE = (
- seltFiller0, seltFiller1,
- Interactive, // Interactively logged on (locally or remotely)
- Network, // Accessing system via network
- Batch, // Started via a batch queue
- Service, // Service started by service controller
- Proxy, // Proxy logon
- Unlock, // Unlock workstation
- NetworkCleartext, // Network logon with cleartext credentials
- NewCredentials, // Clone caller, new default credentials
- RemoteInteractive, // Remote, yet interactive. Terminal server
- CachedInteractive, // Try cached credentials without hitting the net.
- CachedRemoteInteractive, // Same as RemoteInteractive, this is used internally for auditing purpose
- CachedUnlock); // Cached Unlock workstation
- {$EXTERNALSYM _SECURITY_LOGON_TYPE}
- SECURITY_LOGON_TYPE = _SECURITY_LOGON_TYPE;
- {$EXTERNALSYM SECURITY_LOGON_TYPE}
- PSECURITY_LOGON_TYPE = ^SECURITY_LOGON_TYPE;
- {$EXTERNALSYM PSECURITY_LOGON_TYPE}
- TSecurityLogonType = SECURITY_LOGON_TYPE;
- PSecurityLogonType = PSECURITY_LOGON_TYPE;
-
-//
-// Audit Event Categories
-//
-// The following are the built-in types or Categories of audit event.
-// WARNING! This structure is subject to expansion. The user should not
-// compute the number of elements of this type directly, but instead
-// should obtain the count of elements by calling LsaQueryInformationPolicy()
-// for the PolicyAuditEventsInformation class and extracting the count from
-// the MaximumAuditEventCount field of the returned structure.
-//
-
- _POLICY_AUDIT_EVENT_TYPE = (
- AuditCategorySystem,
- AuditCategoryLogon,
- AuditCategoryObjectAccess,
- AuditCategoryPrivilegeUse,
- AuditCategoryDetailedTracking,
- AuditCategoryPolicyChange,
- AuditCategoryAccountManagement,
- AuditCategoryDirectoryServiceAccess,
- AuditCategoryAccountLogon);
- {$EXTERNALSYM _POLICY_AUDIT_EVENT_TYPE}
- POLICY_AUDIT_EVENT_TYPE = _POLICY_AUDIT_EVENT_TYPE;
- {$EXTERNALSYM POLICY_AUDIT_EVENT_TYPE}
- PPOLICY_AUDIT_EVENT_TYPE = ^POLICY_AUDIT_EVENT_TYPE;
- {$EXTERNALSYM PPOLICY_AUDIT_EVENT_TYPE}
- TPolicyAuditEventType = POLICY_AUDIT_EVENT_TYPE;
- PPolicyAuditEventType = PPOLICY_AUDIT_EVENT_TYPE;
-
-//
-// The following defines describe the auditing options for each
-// event type
-//
-
-const
-
-// Leave options specified for this event unchanged
-
- POLICY_AUDIT_EVENT_UNCHANGED = $00000000;
- {$EXTERNALSYM POLICY_AUDIT_EVENT_UNCHANGED}
-
-// Audit successful occurrences of events of this type
-
- POLICY_AUDIT_EVENT_SUCCESS = $00000001;
- {$EXTERNALSYM POLICY_AUDIT_EVENT_SUCCESS}
-
-// Audit failed attempts to cause an event of this type to occur
-
- POLICY_AUDIT_EVENT_FAILURE = $00000002;
- {$EXTERNALSYM POLICY_AUDIT_EVENT_FAILURE}
-
- POLICY_AUDIT_EVENT_NONE = $00000004;
- {$EXTERNALSYM POLICY_AUDIT_EVENT_NONE}
-
-// Mask of valid event auditing options
-
- POLICY_AUDIT_EVENT_MASK = (POLICY_AUDIT_EVENT_SUCCESS or POLICY_AUDIT_EVENT_FAILURE or
- POLICY_AUDIT_EVENT_UNCHANGED or POLICY_AUDIT_EVENT_NONE);
- {$EXTERNALSYM POLICY_AUDIT_EVENT_MASK}
- TPolicyAuditEventMask = POLICY_AUDIT_EVENT_MASK;
-
-type
- PLSA_UNICODE_STRING = ^LSA_UNICODE_STRING;
- {$EXTERNALSYM PLSA_UNICODE_STRING}
- _LSA_UNICODE_STRING = record
- Length: USHORT;
- MaximumLength: USHORT;
- Buffer: PWSTR;
- end;
- {$EXTERNALSYM _LSA_UNICODE_STRING}
- LSA_UNICODE_STRING = _LSA_UNICODE_STRING;
- {$EXTERNALSYM LSA_UNICODE_STRING}
- TLsaUnicodeString = LSA_UNICODE_STRING;
- PLsaUnicodeString = PLSA_UNICODE_STRING;
-
- PLSA_STRING = ^LSA_STRING;
- {$EXTERNALSYM PLSA_STRING}
- _LSA_STRING = record
- Length: USHORT;
- MaximumLength: USHORT;
- Buffer: PCHAR;
- end;
- {$EXTERNALSYM _LSA_STRING}
- LSA_STRING = _LSA_STRING;
- {$EXTERNALSYM LSA_STRING}
- TLsaString = LSA_STRING;
- PLsaString = PLSA_STRING;
-
- PLSA_OBJECT_ATTRIBUTES = ^LSA_OBJECT_ATTRIBUTES;
- {$EXTERNALSYM PLSA_OBJECT_ATTRIBUTES}
- _LSA_OBJECT_ATTRIBUTES = record
- Length: ULONG;
- RootDirectory: HANDLE;
- ObjectName: PLSA_UNICODE_STRING;
- Attributes: ULONG;
- SecurityDescriptor: PVOID; // Points to type SECURITY_DESCRIPTOR
- SecurityQualityOfService: PVOID; // Points to type SECURITY_QUALITY_OF_SERVICE
- end;
- {$EXTERNALSYM _LSA_OBJECT_ATTRIBUTES}
- LSA_OBJECT_ATTRIBUTES = _LSA_OBJECT_ATTRIBUTES;
- {$EXTERNALSYM LSA_OBJECT_ATTRIBUTES}
- TLsaObjectAttributes = LSA_OBJECT_ATTRIBUTES;
- PLsaObjectAttributes = PLSA_OBJECT_ATTRIBUTES;
-
-//
-// Macro for determining whether an API succeeded.
-//
-
-function LSA_SUCCESS(Error: NTSTATUS): BOOL;
-{$EXTERNALSYM LSA_SUCCESS}
-
-function LsaRegisterLogonProcess(const LogonProcessName: LSA_STRING;
- var LsaHandle: HANDLE; SecurityMode: PLSA_OPERATIONAL_MODE): NTSTATUS; stdcall;
-{$EXTERNALSYM LsaRegisterLogonProcess}
-
-function LsaLogonUser(LsaHandle: HANDLE; const OriginName: LSA_STRING;
- LogonType: SECURITY_LOGON_TYPE; AuthenticationPackage: ULONG;
- AuthenticationInformation: PVOID; AuthenticationInformationLength: ULONG;
- LocalGroups: PTOKEN_GROUPS; SourceContext: PTOKEN_SOURCE;
- var ProfileBuffer: PVOID; var ProfileBufferLength: ULONG; var LogonId: LUID;
- var Token: HANDLE; var Quotas: QUOTA_LIMITS; var SubStatus: NTSTATUS): NTSTATUS; stdcall;
-{$EXTERNALSYM LsaLogonUser}
-
-function LsaLookupAuthenticationPackage(LsaHandle: HANDLE;
- const PackageName: LSA_STRING; var AuthenticationPackage: ULONG): NTSTATUS; stdcall;
-{$EXTERNALSYM LsaLookupAuthenticationPackage}
-
-function LsaFreeReturnBuffer(Buffer: PVOID): NTSTATUS; stdcall;
-{$EXTERNALSYM LsaFreeReturnBuffer}
-
-function LsaCallAuthenticationPackage(LsaHandle: HANDLE;
- AuthenticationPackage: ULONG; ProtocolSubmitBuffer: PVOID;
- SubmitBufferLength: ULONG; var ProtocolReturnBuffer: PVOID;
- var ReturnBufferLength: ULONG; var ProtocolStatus: NTSTATUS): NTSTATUS; stdcall;
-{$EXTERNALSYM LsaCallAuthenticationPackage}
-
-function LsaDeregisterLogonProcess(LsaHandle: HANDLE): NTSTATUS; stdcall;
-{$EXTERNALSYM LsaDeregisterLogonProcess}
-
-function LsaConnectUntrusted(var LsaHandle: HANDLE): NTSTATUS; stdcall;
-{$EXTERNALSYM LsaConnectUntrusted}
-
-////////////////////////////////////////////////////////////////////////////
-// //
-// Local Security Policy Administration API datatypes and defines //
-// //
-////////////////////////////////////////////////////////////////////////////
-
-//
-// Access types for the Policy object
-//
-
-const
- POLICY_VIEW_LOCAL_INFORMATION = $00000001;
- {$EXTERNALSYM POLICY_VIEW_LOCAL_INFORMATION}
- POLICY_VIEW_AUDIT_INFORMATION = $00000002;
- {$EXTERNALSYM POLICY_VIEW_AUDIT_INFORMATION}
- POLICY_GET_PRIVATE_INFORMATION = $00000004;
- {$EXTERNALSYM POLICY_GET_PRIVATE_INFORMATION}
- POLICY_TRUST_ADMIN = $00000008;
- {$EXTERNALSYM POLICY_TRUST_ADMIN}
- POLICY_CREATE_ACCOUNT = $00000010;
- {$EXTERNALSYM POLICY_CREATE_ACCOUNT}
- POLICY_CREATE_SECRET = $00000020;
- {$EXTERNALSYM POLICY_CREATE_SECRET}
- POLICY_CREATE_PRIVILEGE = $00000040;
- {$EXTERNALSYM POLICY_CREATE_PRIVILEGE}
- POLICY_SET_DEFAULT_QUOTA_LIMITS = $00000080;
- {$EXTERNALSYM POLICY_SET_DEFAULT_QUOTA_LIMITS}
- POLICY_SET_AUDIT_REQUIREMENTS = $00000100;
- {$EXTERNALSYM POLICY_SET_AUDIT_REQUIREMENTS}
- POLICY_AUDIT_LOG_ADMIN = $00000200;
- {$EXTERNALSYM POLICY_AUDIT_LOG_ADMIN}
- POLICY_SERVER_ADMIN = $00000400;
- {$EXTERNALSYM POLICY_SERVER_ADMIN}
- POLICY_LOOKUP_NAMES = $00000800;
- {$EXTERNALSYM POLICY_LOOKUP_NAMES}
- POLICY_NOTIFICATION = $00001000;
- {$EXTERNALSYM POLICY_NOTIFICATION}
-
- POLICY_ALL_ACCESS = (STANDARD_RIGHTS_REQUIRED or
- POLICY_VIEW_LOCAL_INFORMATION or
- POLICY_VIEW_AUDIT_INFORMATION or
- POLICY_GET_PRIVATE_INFORMATION or
- POLICY_TRUST_ADMIN or
- POLICY_CREATE_ACCOUNT or
- POLICY_CREATE_SECRET or
- POLICY_CREATE_PRIVILEGE or
- POLICY_SET_DEFAULT_QUOTA_LIMITS or
- POLICY_SET_AUDIT_REQUIREMENTS or
- POLICY_AUDIT_LOG_ADMIN or
- POLICY_SERVER_ADMIN or
- POLICY_LOOKUP_NAMES);
- {$EXTERNALSYM POLICY_ALL_ACCESS}
-
- POLICY_READ = (STANDARD_RIGHTS_READ or
- POLICY_VIEW_AUDIT_INFORMATION or
- POLICY_GET_PRIVATE_INFORMATION);
- {$EXTERNALSYM POLICY_READ}
-
- POLICY_WRITE = (STANDARD_RIGHTS_WRITE or
- POLICY_TRUST_ADMIN or
- POLICY_CREATE_ACCOUNT or
- POLICY_CREATE_SECRET or
- POLICY_CREATE_PRIVILEGE or
- POLICY_SET_DEFAULT_QUOTA_LIMITS or
- POLICY_SET_AUDIT_REQUIREMENTS or
- POLICY_AUDIT_LOG_ADMIN or
- POLICY_SERVER_ADMIN);
- {$EXTERNALSYM POLICY_WRITE}
-
- POLICY_EXECUTE = (STANDARD_RIGHTS_EXECUTE or
- POLICY_VIEW_LOCAL_INFORMATION or
- POLICY_LOOKUP_NAMES);
- {$EXTERNALSYM POLICY_EXECUTE}
-
-//
-// Policy object specific data types.
-//
-
-//
-// The following data type is used to identify a domain
-//
-
-type
- PLSA_TRUST_INFORMATION = ^LSA_TRUST_INFORMATION;
- {$EXTERNALSYM PLSA_TRUST_INFORMATION}
- _LSA_TRUST_INFORMATION = record
- Name: LSA_UNICODE_STRING;
- Sid: PSID;
- end;
- {$EXTERNALSYM _LSA_TRUST_INFORMATION}
- LSA_TRUST_INFORMATION = _LSA_TRUST_INFORMATION;
- {$EXTERNALSYM LSA_TRUST_INFORMATION}
- TLsaTrustInformation = LSA_TRUST_INFORMATION;
- PLsaTrustInformation = PLSA_TRUST_INFORMATION;
-
-// where members have the following usage:
-//
-// Name - The name of the domain.
-//
-// Sid - A pointer to the Sid of the Domain
-//
-
-//
-// The following data type is used in name and SID lookup services to
-// describe the domains referenced in the lookup operation.
-//
-
- PLSA_REFERENCED_DOMAIN_LIST = ^LSA_REFERENCED_DOMAIN_LIST;
- {$EXTERNALSYM PLSA_REFERENCED_DOMAIN_LIST}
- _LSA_REFERENCED_DOMAIN_LIST = record
- Entries: ULONG;
- Domains: PLSA_TRUST_INFORMATION;
- end;
- {$EXTERNALSYM _LSA_REFERENCED_DOMAIN_LIST}
- LSA_REFERENCED_DOMAIN_LIST = _LSA_REFERENCED_DOMAIN_LIST;
- {$EXTERNALSYM LSA_REFERENCED_DOMAIN_LIST}
- TLsaReferencedDomainList = LSA_REFERENCED_DOMAIN_LIST;
- PLsaReferencedDomainList = PLSA_REFERENCED_DOMAIN_LIST;
-
-// where members have the following usage:
-//
-// Entries - Is a count of the number of domains described in the
-// Domains array.
-//
-// Domains - Is a pointer to an array of Entries LSA_TRUST_INFORMATION data
-// structures.
-//
-
-//
-// The following data type is used in name to SID lookup services to describe
-// the domains referenced in the lookup operation.
-//
-
- PLSA_TRANSLATED_SID = ^LSA_TRANSLATED_SID;
- {$EXTERNALSYM PLSA_TRANSLATED_SID}
- _LSA_TRANSLATED_SID = record
- Use: SID_NAME_USE;
- RelativeId: ULONG;
- DomainIndex: LONG;
- end;
- {$EXTERNALSYM _LSA_TRANSLATED_SID}
- LSA_TRANSLATED_SID = _LSA_TRANSLATED_SID;
- {$EXTERNALSYM LSA_TRANSLATED_SID}
- TLsaTranslatedSid = LSA_TRANSLATED_SID;
- PLsaTranslatedSid = PLSA_TRANSLATED_SID;
-
-// where members have the following usage:
-//
-// Use - identifies the use of the SID. If this value is SidUnknown or
-// SidInvalid, then the remainder of the record is not set and
-// should be ignored.
-//
-// RelativeId - Contains the relative ID of the translated SID. The
-// remainder of the SID (the prefix) is obtained using the
-// DomainIndex field.
-//
-// DomainIndex - Is the index of an entry in a related
-// LSA_REFERENCED_DOMAIN_LIST data structure describing the
-// domain in which the account was found.
-//
-// If there is no corresponding reference domain for an entry, then
-// this field will contain a negative value.
-//
-
- _LSA_TRANSLATED_SID2 = record
- Use: SID_NAME_USE;
- Sid: PSID;
- DomainIndex: LONG;
- Flags: ULONG;
- end;
- {$EXTERNALSYM _LSA_TRANSLATED_SID2}
- LSA_TRANSLATED_SID2 = _LSA_TRANSLATED_SID2;
- {$EXTERNALSYM LSA_TRANSLATED_SID2}
- PLSA_TRANSLATED_SID2 = ^LSA_TRANSLATED_SID2;
- {$EXTERNALSYM PLSA_TRANSLATED_SID2}
- TLsaTranslatedSid2 = LSA_TRANSLATED_SID2;
- PLsaTranslatedSid2 = PLSA_TRANSLATED_SID2;
-
-// where members have the following usage:
-//
-// Use - identifies the use of the SID. If this value is SidUnknown or
-// SidInvalid, then the remainder of the record is not set and
-// should be ignored.
-//
-// Sid - Contains the complete Sid of the tranlated SID
-//
-// DomainIndex - Is the index of an entry in a related
-// LSA_REFERENCED_DOMAIN_LIST data structure describing the
-// domain in which the account was found.
-//
-// If there is no corresponding reference domain for an entry, then
-// this field will contain a negative value.
-//
-
-//
-// The following data type is used in SID to name lookup services to
-// describe the domains referenced in the lookup operation.
-//
-
- PLSA_TRANSLATED_NAME = ^LSA_TRANSLATED_NAME;
- {$EXTERNALSYM PLSA_TRANSLATED_NAME}
- _LSA_TRANSLATED_NAME = record
- Use: SID_NAME_USE;
- Name: LSA_UNICODE_STRING;
- DomainIndex: LONG;
- end;
- {$EXTERNALSYM _LSA_TRANSLATED_NAME}
- LSA_TRANSLATED_NAME = _LSA_TRANSLATED_NAME;
- {$EXTERNALSYM LSA_TRANSLATED_NAME}
- TLsaTranslatedName = LSA_TRANSLATED_NAME;
- PLsaTranslatedName = PLSA_TRANSLATED_NAME;
-
-// where the members have the following usage:
-//
-// Use - Identifies the use of the name. If this value is SidUnknown
-// or SidInvalid, then the remainder of the record is not set and
-// should be ignored. If this value is SidWellKnownGroup then the
-// Name field is invalid, but the DomainIndex field is not.
-//
-// Name - Contains the isolated name of the translated SID.
-//
-// DomainIndex - Is the index of an entry in a related
-// LSA_REFERENCED_DOMAIN_LIST data structure describing the domain
-// in which the account was found.
-//
-// If there is no corresponding reference domain for an entry, then
-// this field will contain a negative value.
-//
-
-//
-// The following data type is used to represent the role of the LSA
-// server (primary or backup).
-//
-
- _POLICY_LSA_SERVER_ROLE = (plsrFiller0, plsrFiller1, PolicyServerRoleBackup,
- PolicyServerRolePrimary);
- {$EXTERNALSYM _POLICY_LSA_SERVER_ROLE}
- POLICY_LSA_SERVER_ROLE = _POLICY_LSA_SERVER_ROLE;
- {$EXTERNALSYM POLICY_LSA_SERVER_ROLE}
- PPOLICY_LSA_SERVER_ROLE = ^POLICY_LSA_SERVER_ROLE;
- {$EXTERNALSYM PPOLICY_LSA_SERVER_ROLE}
- TPolicyLsaServerRole = POLICY_LSA_SERVER_ROLE;
- PPolicyLsaServerRole = PPOLICY_LSA_SERVER_ROLE;
-
-//
-// The following data type is used to specify the auditing options for
-// an Audit Event Type.
-//
-
- POLICY_AUDIT_EVENT_OPTIONS = ULONG;
- {$EXTERNALSYM POLICY_AUDIT_EVENT_OPTIONS}
- PPOLICY_AUDIT_EVENT_OPTIONS = ^POLICY_AUDIT_EVENT_OPTIONS;
- {$EXTERNALSYM PPOLICY_AUDIT_EVENT_OPTIONS}
-
-// where the following flags can be set:
-//
-// POLICY_AUDIT_EVENT_UNCHANGED - Leave existing auditing options
-// unchanged for events of this type. This flag is only used for
-// set operations. If this flag is set, then all other flags
-// are ignored.
-//
-// POLICY_AUDIT_EVENT_NONE - Cancel all auditing options for events
-// of this type. If this flag is set, the success/failure flags
-// are ignored.
-//
-// POLICY_AUDIT_EVENT_SUCCESS - When auditing is enabled, audit all
-// successful occurrences of events of the given type.
-//
-// POLICY_AUDIT_EVENT_FAILURE - When auditing is enabled, audit all
-// unsuccessful occurrences of events of the given type.
-//
-
-//
-// The following data type defines the classes of Policy Information
-// that may be queried/set.
-//
-
-type
- _POLICY_INFORMATION_CLASS = (
- picFiller0,
- PolicyAuditLogInformation,
- PolicyAuditEventsInformation,
- PolicyPrimaryDomainInformation,
- PolicyPdAccountInformation,
- PolicyAccountDomainInformation,
- PolicyLsaServerRoleInformation,
- PolicyReplicaSourceInformation,
- PolicyDefaultQuotaInformation,
- PolicyModificationInformation,
- PolicyAuditFullSetInformation,
- PolicyAuditFullQueryInformation,
- PolicyDnsDomainInformation,
- PolicyDnsDomainInformationInt);
- {$EXTERNALSYM _POLICY_INFORMATION_CLASS}
- POLICY_INFORMATION_CLASS = _POLICY_INFORMATION_CLASS;
- {$EXTERNALSYM POLICY_INFORMATION_CLASS}
- PPOLICY_INFORMATION_CLASS = ^POLICY_INFORMATION_CLASS;
- {$EXTERNALSYM PPOLICY_INFORMATION_CLASS}
- TPolicyInformationClass = POLICY_INFORMATION_CLASS;
- PPolicyInformationClass = PPOLICY_INFORMATION_CLASS;
-
-//
-// The following data type corresponds to the PolicyAuditLogInformation
-// information class. It is used to represent information relating to
-// the Audit Log.
-//
-// This structure may be used in both query and set operations. However,
-// when used in set operations, some fields are ignored.
-//
-
- PPOLICY_AUDIT_LOG_INFO = ^POLICY_AUDIT_LOG_INFO;
- {$EXTERNALSYM PPOLICY_AUDIT_LOG_INFO}
- _POLICY_AUDIT_LOG_INFO = record
- AuditLogPercentFull: ULONG;
- MaximumLogSize: ULONG;
- AuditRetentionPeriod: LARGE_INTEGER;
- AuditLogFullShutdownInProgress: ByteBool;
- TimeToShutdown: LARGE_INTEGER;
- NextAuditRecordId: ULONG;
- end;
- {$EXTERNALSYM _POLICY_AUDIT_LOG_INFO}
- POLICY_AUDIT_LOG_INFO = _POLICY_AUDIT_LOG_INFO;
- {$EXTERNALSYM POLICY_AUDIT_LOG_INFO}
- TPolicyAuditLogInfo = POLICY_AUDIT_LOG_INFO;
- PPolicyAuditLogInfo = PPOLICY_AUDIT_LOG_INFO;
-
-// where the members have the following usage:
-//
-// AuditLogPercentFull - Indicates the percentage of the Audit Log
-// currently being used.
-//
-// MaximumLogSize - Specifies the maximum size of the Audit Log in
-// kilobytes.
-//
-// AuditRetentionPeriod - Indicates the length of time that Audit
-// Records are to be retained. Audit Records are discardable
-// if their timestamp predates the current time minus the
-// retention period.
-//
-// AuditLogFullShutdownInProgress - Indicates whether or not a system
-// shutdown is being initiated due to the security Audit Log becoming
-// full. This condition will only occur if the system is configured
-// to shutdown when the log becomes full.
-//
-// TRUE indicates that a shutdown is in progress
-// FALSE indicates that a shutdown is not in progress.
-//
-// Once a shutdown has been initiated, this flag will be set to
-// TRUE. If an administrator is able to currect the situation
-// before the shutdown becomes irreversible, then this flag will
-// be reset to false.
-//
-// This field is ignored for set operations.
-//
-// TimeToShutdown - If the AuditLogFullShutdownInProgress flag is set,
-// then this field contains the time left before the shutdown
-// becomes irreversible.
-//
-// This field is ignored for set operations.
-//
-
-//
-// The following data type corresponds to the PolicyAuditEventsInformation
-// information class. It is used to represent information relating to
-// the audit requirements.
-//
-
- PPOLICY_AUDIT_EVENTS_INFO = ^POLICY_AUDIT_EVENTS_INFO;
- {$EXTERNALSYM PPOLICY_AUDIT_EVENTS_INFO}
- _POLICY_AUDIT_EVENTS_INFO = record
- AuditingMode: ByteBool;
- EventAuditingOptions: PPOLICY_AUDIT_EVENT_OPTIONS;
- MaximumAuditEventCount: ULONG;
- end;
- {$EXTERNALSYM _POLICY_AUDIT_EVENTS_INFO}
- POLICY_AUDIT_EVENTS_INFO = _POLICY_AUDIT_EVENTS_INFO;
- {$EXTERNALSYM POLICY_AUDIT_EVENTS_INFO}
- TPolicyAuditEventsInfo = POLICY_AUDIT_EVENTS_INFO;
- PPolicyAuditEventsInfo = PPOLICY_AUDIT_EVENTS_INFO;
-
-// where the members have the following usage:
-//
-// AuditingMode - A Boolean variable specifying the Auditing Mode value.
-// This value is interpreted as follows:
-//
-// TRUE - Auditing is to be enabled (set operations) or is enabled
-// (query operations). Audit Records will be generated according
-// to the Event Auditing Options in effect (see the
-// EventAuditingOptions field.
-//
-// FALSE - Auditing is to be disabled (set operations) or is
-// disabled (query operations). No Audit Records will be
-// generated. Note that for set operations the Event Auditing
-// Options in effect will still be updated as specified by the
-// EventAuditingOptions field whether Auditing is enabled or
-// disabled.
-//
-// EventAuditingOptions - Pointer to an array of Auditing Options
-// indexed by Audit Event Type.
-//
-// MaximumAuditEventCount - Specifiesa count of the number of Audit
-// Event Types specified by the EventAuditingOptions parameter. If
-// this count is less than the number of Audit Event Types supported
-// by the system, the Auditing Options for Event Types with IDs
-// higher than (MaximumAuditEventCount + 1) are left unchanged.
-//
-
-//
-// The following structure corresponds to the PolicyAccountDomainInformation
-// information class.
-//
-
- PPOLICY_ACCOUNT_DOMAIN_INFO = ^POLICY_ACCOUNT_DOMAIN_INFO;
- {$EXTERNALSYM PPOLICY_ACCOUNT_DOMAIN_INFO}
- _POLICY_ACCOUNT_DOMAIN_INFO = record
- DomainName: LSA_UNICODE_STRING;
- DomainSid: PSID;
- end;
- {$EXTERNALSYM _POLICY_ACCOUNT_DOMAIN_INFO}
- POLICY_ACCOUNT_DOMAIN_INFO = _POLICY_ACCOUNT_DOMAIN_INFO;
- {$EXTERNALSYM POLICY_ACCOUNT_DOMAIN_INFO}
- TPolicyAccountDomainInfo = POLICY_ACCOUNT_DOMAIN_INFO;
- PPolicyAccountDomainInfo = PPOLICY_ACCOUNT_DOMAIN_INFO;
-
-// where the members have the following usage:
-//
-// DomainName - Is the name of the domain
-//
-// DomainSid - Is the Sid of the domain
-//
-
-//
-// The following structure corresponds to the PolicyPrimaryDomainInformation
-// information class.
-//
-
- PPOLICY_PRIMARY_DOMAIN_INFO = ^POLICY_PRIMARY_DOMAIN_INFO;
- {$EXTERNALSYM PPOLICY_PRIMARY_DOMAIN_INFO}
- _POLICY_PRIMARY_DOMAIN_INFO = record
- Name: LSA_UNICODE_STRING;
- Sid: PSID;
- end;
- {$EXTERNALSYM _POLICY_PRIMARY_DOMAIN_INFO}
- POLICY_PRIMARY_DOMAIN_INFO = _POLICY_PRIMARY_DOMAIN_INFO;
- {$EXTERNALSYM POLICY_PRIMARY_DOMAIN_INFO}
- TPolicyPrimaryDomainInfo = POLICY_PRIMARY_DOMAIN_INFO;
- PPolicyPrimaryDomainInfo = PPOLICY_PRIMARY_DOMAIN_INFO;
-
-// where the members have the following usage:
-//
-// Name - Is the name of the domain
-//
-// Sid - Is the Sid of the domain
-//
-
-//
-// The following structure corresponds to the PolicyDnsDomainInformation
-// information class
-//
-
- PPOLICY_DNS_DOMAIN_INFO = ^POLICY_DNS_DOMAIN_INFO;
- {$EXTERNALSYM PPOLICY_DNS_DOMAIN_INFO}
- _POLICY_DNS_DOMAIN_INFO = record
- Name: LSA_UNICODE_STRING;
- DnsDomainName: LSA_UNICODE_STRING;
- DnsForestName: LSA_UNICODE_STRING;
- DomainGuid: GUID;
- Sid: PSID;
- end;
- {$EXTERNALSYM _POLICY_DNS_DOMAIN_INFO}
- POLICY_DNS_DOMAIN_INFO = _POLICY_DNS_DOMAIN_INFO;
- {$EXTERNALSYM POLICY_DNS_DOMAIN_INFO}
- TPolicyDnsDomainInfo = POLICY_DNS_DOMAIN_INFO;
- PPolicyDnsDomainInfo = PPOLICY_DNS_DOMAIN_INFO;
-
-// where the members have the following usage:
-//
-// Name - Is the name of the Domain
-//
-// DnsDomainName - Is the DNS name of the domain
-//
-// DnsForestName - Is the DNS forest name of the domain
-//
-// DomainGuid - Is the GUID of the domain
-//
-// Sid - Is the Sid of the domain
-
-//
-// The following structure corresponds to the PolicyPdAccountInformation
-// information class. This structure may be used in Query operations
-// only.
-//
-
- PPOLICY_PD_ACCOUNT_INFO = ^POLICY_PD_ACCOUNT_INFO;
- {$EXTERNALSYM PPOLICY_PD_ACCOUNT_INFO}
- _POLICY_PD_ACCOUNT_INFO = record
- Name: LSA_UNICODE_STRING;
- end;
- {$EXTERNALSYM _POLICY_PD_ACCOUNT_INFO}
- POLICY_PD_ACCOUNT_INFO = _POLICY_PD_ACCOUNT_INFO;
- {$EXTERNALSYM POLICY_PD_ACCOUNT_INFO}
- TPolicyPdAccountInfo = POLICY_PD_ACCOUNT_INFO;
- PPolicyPdAccountInfo = PPOLICY_PD_ACCOUNT_INFO;
-
-// where the members have the following usage:
-//
-// Name - Is the name of an account in the domain that should be used
-// for authentication and name/ID lookup requests.
-//
-
-//
-// The following structure corresponds to the PolicyLsaServerRoleInformation
-// information class.
-//
-
- PPOLICY_LSA_SERVER_ROLE_INFO = ^POLICY_LSA_SERVER_ROLE_INFO;
- {$EXTERNALSYM PPOLICY_LSA_SERVER_ROLE_INFO}
- _POLICY_LSA_SERVER_ROLE_INFO = record
- LsaServerRole: POLICY_LSA_SERVER_ROLE;
- end;
- {$EXTERNALSYM _POLICY_LSA_SERVER_ROLE_INFO}
- POLICY_LSA_SERVER_ROLE_INFO = _POLICY_LSA_SERVER_ROLE_INFO;
- {$EXTERNALSYM POLICY_LSA_SERVER_ROLE_INFO}
- TPolicyLsaServerRoleInfo = POLICY_LSA_SERVER_ROLE_INFO;
- PPolicyLsaServerRoleInfo = PPOLICY_LSA_SERVER_ROLE_INFO;
-
-// where the fields have the following usage:
-//
-// TBS
-//
-
-//
-// The following structure corresponds to the PolicyReplicaSourceInformation
-// information class.
-//
-
- PPOLICY_REPLICA_SOURCE_INFO = ^POLICY_REPLICA_SOURCE_INFO;
- {$EXTERNALSYM PPOLICY_REPLICA_SOURCE_INFO}
- _POLICY_REPLICA_SOURCE_INFO = record
- ReplicaSource: LSA_UNICODE_STRING;
- ReplicaAccountName: LSA_UNICODE_STRING;
- end;
- {$EXTERNALSYM _POLICY_REPLICA_SOURCE_INFO}
- POLICY_REPLICA_SOURCE_INFO = _POLICY_REPLICA_SOURCE_INFO;
- {$EXTERNALSYM POLICY_REPLICA_SOURCE_INFO}
- TPolicyReplicaSourceInfo = POLICY_REPLICA_SOURCE_INFO;
- PPolicyReplicaSourceInfo = PPOLICY_REPLICA_SOURCE_INFO;
-
-//
-// The following structure corresponds to the PolicyDefaultQuotaInformation
-// information class.
-//
-
- PPOLICY_DEFAULT_QUOTA_INFO = ^POLICY_DEFAULT_QUOTA_INFO;
- {$EXTERNALSYM PPOLICY_DEFAULT_QUOTA_INFO}
- _POLICY_DEFAULT_QUOTA_INFO = record
- QuotaLimits: QUOTA_LIMITS;
- end;
- {$EXTERNALSYM _POLICY_DEFAULT_QUOTA_INFO}
- POLICY_DEFAULT_QUOTA_INFO = _POLICY_DEFAULT_QUOTA_INFO;
- {$EXTERNALSYM POLICY_DEFAULT_QUOTA_INFO}
- TPolicyDefaultQuotaInfo = POLICY_DEFAULT_QUOTA_INFO;
- PPolicyDefaultQuotaInfo = PPOLICY_DEFAULT_QUOTA_INFO;
-
-//
-// The following structure corresponds to the PolicyModificationInformation
-// information class.
-//
-
- PPOLICY_MODIFICATION_INFO = ^POLICY_MODIFICATION_INFO;
- {$EXTERNALSYM PPOLICY_MODIFICATION_INFO}
- _POLICY_MODIFICATION_INFO = record
- ModifiedId: LARGE_INTEGER;
- DatabaseCreationTime: LARGE_INTEGER;
- end;
- {$EXTERNALSYM _POLICY_MODIFICATION_INFO}
- POLICY_MODIFICATION_INFO = _POLICY_MODIFICATION_INFO;
- {$EXTERNALSYM POLICY_MODIFICATION_INFO}
- TPolicyModificationInfo = POLICY_MODIFICATION_INFO;
- PPolicyModificationInfo = PPOLICY_MODIFICATION_INFO;
-
-// where the members have the following usage:
-//
-// ModifiedId - Is a 64-bit unsigned integer that is incremented each
-// time anything in the LSA database is modified. This value is
-// only modified on Primary Domain Controllers.
-//
-// DatabaseCreationTime - Is the date/time that the LSA Database was
-// created. On Backup Domain Controllers, this value is replicated
-// from the Primary Domain Controller.
-//
-
-//
-// The following structure type corresponds to the PolicyAuditFullSetInformation
-// Information Class.
-//
-
- PPOLICY_AUDIT_FULL_SET_INFO = ^POLICY_AUDIT_FULL_SET_INFO;
- {$EXTERNALSYM PPOLICY_AUDIT_FULL_SET_INFO}
- _POLICY_AUDIT_FULL_SET_INFO = record
- ShutDownOnFull: ByteBool;
- end;
- {$EXTERNALSYM _POLICY_AUDIT_FULL_SET_INFO}
- POLICY_AUDIT_FULL_SET_INFO = _POLICY_AUDIT_FULL_SET_INFO;
- {$EXTERNALSYM POLICY_AUDIT_FULL_SET_INFO}
- TPolicyAuditFullSetInfo = POLICY_AUDIT_FULL_SET_INFO;
- PPolicyAuditFullSetInfo = PPOLICY_AUDIT_FULL_SET_INFO;
-
-//
-// The following structure type corresponds to the PolicyAuditFullQueryInformation
-// Information Class.
-//
-
- PPOLICY_AUDIT_FULL_QUERY_INFO = ^POLICY_AUDIT_FULL_QUERY_INFO;
- {$EXTERNALSYM PPOLICY_AUDIT_FULL_QUERY_INFO}
- _POLICY_AUDIT_FULL_QUERY_INFO = record
- ShutDownOnFull: ByteBool;
- LogIsFull: ByteBool;
- end;
- {$EXTERNALSYM _POLICY_AUDIT_FULL_QUERY_INFO}
- POLICY_AUDIT_FULL_QUERY_INFO = _POLICY_AUDIT_FULL_QUERY_INFO;
- {$EXTERNALSYM POLICY_AUDIT_FULL_QUERY_INFO}
- TPolicyAuditFullQueryInfo = POLICY_AUDIT_FULL_QUERY_INFO;
- PPolicyAuditFullQueryInfo = PPOLICY_AUDIT_FULL_QUERY_INFO;
-
-//
-// The following data type defines the classes of Policy Information
-// that may be queried/set that has domain wide effect.
-//
-
- _POLICY_DOMAIN_INFORMATION_CLASS = (
- pdicFiller0,
- PolicyDomainQualityOfServiceInformation, // value was used in W2K; no longer supported
- PolicyDomainEfsInformation,
- PolicyDomainKerberosTicketInformation);
- {$EXTERNALSYM _POLICY_DOMAIN_INFORMATION_CLASS}
- POLICY_DOMAIN_INFORMATION_CLASS = _POLICY_DOMAIN_INFORMATION_CLASS;
- {$EXTERNALSYM POLICY_DOMAIN_INFORMATION_CLASS}
- PPOLICY_DOMAIN_INFORMATION_CLASS = ^POLICY_DOMAIN_INFORMATION_CLASS;
- {$EXTERNALSYM PPOLICY_DOMAIN_INFORMATION_CLASS}
- TPolicyDomainInformationClass = POLICY_DOMAIN_INFORMATION_CLASS;
- PPolicyDomainInformationClass = PPOLICY_DOMAIN_INFORMATION_CLASS;
-
-type
- // mvb has dissapeared in november 2002 release!
-
- PPOLICY_DOMAIN_QUALITY_OF_SERVICE_INFO = ^POLICY_DOMAIN_QUALITY_OF_SERVICE_INFO;
- {$EXTERNALSYM PPOLICY_DOMAIN_QUALITY_OF_SERVICE_INFO}
- _POLICY_DOMAIN_QUALITY_OF_SERVICE_INFO = record
- QualityOfService: ULONG;
- end;
- {$EXTERNALSYM _POLICY_DOMAIN_QUALITY_OF_SERVICE_INFO}
- POLICY_DOMAIN_QUALITY_OF_SERVICE_INFO = _POLICY_DOMAIN_QUALITY_OF_SERVICE_INFO;
- {$EXTERNALSYM POLICY_DOMAIN_QUALITY_OF_SERVICE_INFO}
- TPolicyDomainQualityOfServiceInfo = POLICY_DOMAIN_QUALITY_OF_SERVICE_INFO;
- PPolicyDomainQualityOfServiceInfo = PPOLICY_DOMAIN_QUALITY_OF_SERVICE_INFO;
-
-//
-// where the members have the following usage:
-//
-// QualityOfService - Determines what specific QOS actions a machine should take
-//
-
-//
-// The following structure corresponds to the PolicyEfsInformation
-// information class
-//
-
- PPOLICY_DOMAIN_EFS_INFO = ^POLICY_DOMAIN_EFS_INFO;
- {$EXTERNALSYM PPOLICY_DOMAIN_EFS_INFO}
- _POLICY_DOMAIN_EFS_INFO = record
- InfoLength: ULONG;
- EfsBlob: PUCHAR;
- end;
- {$EXTERNALSYM _POLICY_DOMAIN_EFS_INFO}
- POLICY_DOMAIN_EFS_INFO = _POLICY_DOMAIN_EFS_INFO;
- {$EXTERNALSYM POLICY_DOMAIN_EFS_INFO}
- TPolicyDomainEfsInfo = POLICY_DOMAIN_EFS_INFO;
- PPolicyDomainEfsInfo = PPOLICY_DOMAIN_EFS_INFO;
-
-// where the members have the following usage:
-//
-// InfoLength - Length of the EFS Information blob
-//
-// EfsBlob - Efs blob data
-//
-
-//
-// The following structure corresponds to the PolicyDomainKerberosTicketInformation
-// information class
-
-const
- POLICY_KERBEROS_VALIDATE_CLIENT = $00000080;
- {$EXTERNALSYM POLICY_KERBEROS_VALIDATE_CLIENT}
-
-type
- PPOLICY_DOMAIN_KERBEROS_TICKET_INFO = ^POLICY_DOMAIN_KERBEROS_TICKET_INFO;
- {$EXTERNALSYM PPOLICY_DOMAIN_KERBEROS_TICKET_INFO}
- _POLICY_DOMAIN_KERBEROS_TICKET_INFO = record
- AuthenticationOptions: ULONG;
- MaxServiceTicketAge: LARGE_INTEGER;
- MaxTicketAge: LARGE_INTEGER;
- MaxRenewAge: LARGE_INTEGER;
- MaxClockSkew: LARGE_INTEGER;
- Reserved: LARGE_INTEGER;
- end;
- {$EXTERNALSYM _POLICY_DOMAIN_KERBEROS_TICKET_INFO}
- POLICY_DOMAIN_KERBEROS_TICKET_INFO = _POLICY_DOMAIN_KERBEROS_TICKET_INFO;
- {$EXTERNALSYM POLICY_DOMAIN_KERBEROS_TICKET_INFO}
- TPolicyDomainKerberosTicketInfo = POLICY_DOMAIN_KERBEROS_TICKET_INFO;
- PPolicyDomainKerberosTicketInfo = PPOLICY_DOMAIN_KERBEROS_TICKET_INFO;
-
-//
-// where the members have the following usage
-//
-// AuthenticationOptions -- allowed ticket options (POLICY_KERBEROS_* flags )
-//
-// MaxServiceTicketAge -- Maximum lifetime for a service ticket
-//
-// MaxTicketAge -- Maximum lifetime for the initial ticket
-//
-// MaxRenewAge -- Maximum cumulative age a renewable ticket can be with
-// requring authentication
-//
-// MaxClockSkew -- Maximum tolerance for synchronization of computer clocks
-//
-// Reserved -- Reserved
-
-//
-// The following data type defines the classes of Policy Information / Policy Domain Information
-// that may be used to request notification
-//
-
- _POLICY_NOTIFICATION_INFORMATION_CLASS = (
- pnicFiller0,
- PolicyNotifyAuditEventsInformation,
- PolicyNotifyAccountDomainInformation,
- PolicyNotifyServerRoleInformation,
- PolicyNotifyDnsDomainInformation,
- PolicyNotifyDomainEfsInformation,
- PolicyNotifyDomainKerberosTicketInformation,
- PolicyNotifyMachineAccountPasswordInformation);
- {$EXTERNALSYM _POLICY_NOTIFICATION_INFORMATION_CLASS}
- POLICY_NOTIFICATION_INFORMATION_CLASS = _POLICY_NOTIFICATION_INFORMATION_CLASS;
- {$EXTERNALSYM POLICY_NOTIFICATION_INFORMATION_CLASS}
- PPOLICY_NOTIFICATION_INFORMATION_CLASS = ^POLICY_NOTIFICATION_INFORMATION_CLASS;
- {$EXTERNALSYM PPOLICY_NOTIFICATION_INFORMATION_CLASS}
- TPolicyNotificationInformationClass = POLICY_NOTIFICATION_INFORMATION_CLASS;
- PPolicyNotificationInformationClass = PPOLICY_NOTIFICATION_INFORMATION_CLASS;
-
-//
-// LSA RPC Context Handle (Opaque form). Note that a Context Handle is
-// always a pointer type unlike regular handles.
-//
-
- LSA_HANDLE = PVOID;
- {$EXTERNALSYM LSA_HANDLE}
- PLSA_HANDLE = ^LSA_HANDLE;
- {$EXTERNALSYM PLSA_HANDLE}
- TLsaHandle = LSA_HANDLE;
-
-//
-// Trusted Domain Object specific data types
-//
-
-//
-// This data type defines the following information classes that may be
-// queried or set.
-//
-
- _TRUSTED_INFORMATION_CLASS = (
- ticFiller0,
- TrustedDomainNameInformation,
- TrustedControllersInformation,
- TrustedPosixOffsetInformation,
- TrustedPasswordInformation,
- TrustedDomainInformationBasic,
- TrustedDomainInformationEx,
- TrustedDomainAuthInformation,
- TrustedDomainFullInformation,
- TrustedDomainAuthInformationInternal,
- TrustedDomainFullInformationInternal,
- TrustedDomainInformationEx2Internal,
- TrustedDomainFullInformation2Internal);
- {$EXTERNALSYM _TRUSTED_INFORMATION_CLASS}
- TRUSTED_INFORMATION_CLASS = _TRUSTED_INFORMATION_CLASS;
- {$EXTERNALSYM TRUSTED_INFORMATION_CLASS}
- PTRUSTED_INFORMATION_CLASS = ^TRUSTED_INFORMATION_CLASS;
- {$EXTERNALSYM PTRUSTED_INFORMATION_CLASS}
- TTrustedInfomationClass = TRUSTED_INFORMATION_CLASS;
- PTrustedInfomationClass = PTRUSTED_INFORMATION_CLASS;
-
-//
-// The following data type corresponds to the TrustedDomainNameInformation
-// information class.
-//
-
- PTRUSTED_DOMAIN_NAME_INFO = ^TRUSTED_DOMAIN_NAME_INFO;
- {$EXTERNALSYM PTRUSTED_DOMAIN_NAME_INFO}
- _TRUSTED_DOMAIN_NAME_INFO = record
- Name: LSA_UNICODE_STRING;
- end;
- {$EXTERNALSYM _TRUSTED_DOMAIN_NAME_INFO}
- TRUSTED_DOMAIN_NAME_INFO = _TRUSTED_DOMAIN_NAME_INFO;
- {$EXTERNALSYM TRUSTED_DOMAIN_NAME_INFO}
- TTrustedDomainNameInfo = TRUSTED_DOMAIN_NAME_INFO;
- PTrustedDomainNameInfo = PTRUSTED_DOMAIN_NAME_INFO;
-
-// where members have the following meaning:
-//
-// Name - The name of the Trusted Domain.
-//
-
-//
-// The following data type corresponds to the TrustedControllersInformation
-// information class.
-//
-
- PTRUSTED_CONTROLLERS_INFO = ^TRUSTED_CONTROLLERS_INFO;
- {$EXTERNALSYM PTRUSTED_CONTROLLERS_INFO}
- _TRUSTED_CONTROLLERS_INFO = record
- Entries: ULONG;
- Names: PLSA_UNICODE_STRING;
- end;
- {$EXTERNALSYM _TRUSTED_CONTROLLERS_INFO}
- TRUSTED_CONTROLLERS_INFO = _TRUSTED_CONTROLLERS_INFO;
- {$EXTERNALSYM TRUSTED_CONTROLLERS_INFO}
- TTrustedControllersInfo = TRUSTED_CONTROLLERS_INFO;
- PTrustedControllersInfo = PTRUSTED_CONTROLLERS_INFO;
-
-// where members have the following meaning:
-//
-// Entries - Indicate how mamy entries there are in the Names array.
-//
-// Names - Pointer to an array of LSA_UNICODE_STRING structures containing the
-// names of domain controllers of the domain. This information may not
-// be accurate and should be used only as a hint. The order of this
-// list is considered significant and will be maintained.
-//
-// By convention, the first name in this list is assumed to be the
-// Primary Domain Controller of the domain. If the Primary Domain
-// Controller is not known, the first name should be set to the NULL
-// string.
-//
-
-//
-// The following data type corresponds to the TrustedPosixOffsetInformation
-// information class.
-//
-
- PTRUSTED_POSIX_OFFSET_INFO = ^TRUSTED_POSIX_OFFSET_INFO;
- {$EXTERNALSYM PTRUSTED_POSIX_OFFSET_INFO}
- _TRUSTED_POSIX_OFFSET_INFO = record
- Offset: ULONG;
- end;
- {$EXTERNALSYM _TRUSTED_POSIX_OFFSET_INFO}
- TRUSTED_POSIX_OFFSET_INFO = _TRUSTED_POSIX_OFFSET_INFO;
- {$EXTERNALSYM TRUSTED_POSIX_OFFSET_INFO}
- TTrustedPosixOffsetInfo = TRUSTED_POSIX_OFFSET_INFO;
- PTrustedPosixOffsetInfo = PTRUSTED_POSIX_OFFSET_INFO;
-
-// where members have the following meaning:
-//
-// Offset - Is an offset to use for the generation of Posix user and group
-// IDs from SIDs. The Posix ID corresponding to any particular SID is
-// generated by adding the RID of that SID to the Offset of the SID's
-// corresponding TrustedDomain object.
-//
-
-//
-// The following data type corresponds to the TrustedPasswordInformation
-// information class.
-//
-
- PTRUSTED_PASSWORD_INFO = ^TRUSTED_PASSWORD_INFO;
- {$EXTERNALSYM PTRUSTED_PASSWORD_INFO}
- _TRUSTED_PASSWORD_INFO = record
- Password: LSA_UNICODE_STRING;
- OldPassword: LSA_UNICODE_STRING;
- end;
- {$EXTERNALSYM _TRUSTED_PASSWORD_INFO}
- TRUSTED_PASSWORD_INFO = _TRUSTED_PASSWORD_INFO;
- {$EXTERNALSYM TRUSTED_PASSWORD_INFO}
- TTrustedPasswordInfo = TRUSTED_PASSWORD_INFO;
- PTrustedPasswordInfo = PTRUSTED_PASSWORD_INFO;
-
- TRUSTED_DOMAIN_INFORMATION_BASIC = LSA_TRUST_INFORMATION;
- {$EXTERNALSYM TRUSTED_DOMAIN_INFORMATION_BASIC}
- PTRUSTED_DOMAIN_INFORMATION_BASIC = PLSA_TRUST_INFORMATION;
- {$EXTERNALSYM PTRUSTED_DOMAIN_INFORMATION_BASIC}
- TTrustedDomainInformationBasic = TRUSTED_DOMAIN_INFORMATION_BASIC;
- PTrustedDomainInformationBasic = PTRUSTED_DOMAIN_INFORMATION_BASIC;
-
-//
-// Direction of the trust
-//
-
-const
- TRUST_DIRECTION_DISABLED = $00000000;
- {$EXTERNALSYM TRUST_DIRECTION_DISABLED}
- TRUST_DIRECTION_INBOUND = $00000001;
- {$EXTERNALSYM TRUST_DIRECTION_INBOUND}
- TRUST_DIRECTION_OUTBOUND = $00000002;
- {$EXTERNALSYM TRUST_DIRECTION_OUTBOUND}
- TRUST_DIRECTION_BIDIRECTIONAL = TRUST_DIRECTION_INBOUND or TRUST_DIRECTION_OUTBOUND;
- {$EXTERNALSYM TRUST_DIRECTION_BIDIRECTIONAL}
-
- TRUST_TYPE_DOWNLEVEL = $00000001; // NT4 and before
- {$EXTERNALSYM TRUST_TYPE_DOWNLEVEL}
- TRUST_TYPE_UPLEVEL = $00000002; // NT5
- {$EXTERNALSYM TRUST_TYPE_UPLEVEL}
- TRUST_TYPE_MIT = $00000003; // Trust with a MIT Kerberos realm
- {$EXTERNALSYM TRUST_TYPE_MIT}
-// TRUST_TYPE_DCE = $00000004; // Trust with a DCE realm
-// {$EXTERNALSYM TRUST_TYPE_DCE}
-// Levels 0x5 - 0x000FFFFF reserved for future use
-// Provider specific trust levels are from 0x00100000 to 0xFFF00000
-
- TRUST_ATTRIBUTE_NON_TRANSITIVE = $00000001; // Disallow transitivity
- {$EXTERNALSYM TRUST_ATTRIBUTE_NON_TRANSITIVE}
- TRUST_ATTRIBUTE_UPLEVEL_ONLY = $00000002; // Trust link only valid for uplevel client
- {$EXTERNALSYM TRUST_ATTRIBUTE_UPLEVEL_ONLY}
- TRUST_ATTRIBUTE_QUARANTINED_DOMAIN = $00000004; // Used to quarantine domains
- {$EXTERNALSYM TRUST_ATTRIBUTE_QUARANTINED_DOMAIN}
- TRUST_ATTRIBUTE_FOREST_TRANSITIVE = $00000008; // This link may contain forest trust information
- {$EXTERNALSYM TRUST_ATTRIBUTE_FOREST_TRANSITIVE}
- TRUST_ATTRIBUTE_CROSS_ORGANIZATION = $00000010; // This trust is to a domain/forest which is not part of this enterprise
- {$EXTERNALSYM TRUST_ATTRIBUTE_CROSS_ORGANIZATION}
- TRUST_ATTRIBUTE_WITHIN_FOREST = $00000020; // Trust is internal to this forest
- {$EXTERNALSYM TRUST_ATTRIBUTE_WITHIN_FOREST}
- TRUST_ATTRIBUTE_TREAT_AS_EXTERNAL = $00000040; // Trust is to be treated as external for trust boundary purposes
- {$EXTERNALSYM TRUST_ATTRIBUTE_TREAT_AS_EXTERNAL}
-
-// Trust attributes 0x00000040 through 0x00200000 are reserved for future use
-// Trust attributes 0x00400000 through 0x00800000 were used previously (up to W2K) and should not be re-used
-// Trust attributes 0x01000000 through 0x80000000 are reserved for user
-
- TRUST_ATTRIBUTES_VALID = DWORD($FF03FFFF);
- {$EXTERNALSYM TRUST_ATTRIBUTES_VALID}
- TRUST_ATTRIBUTES_USER = DWORD($FF000000);
- {$EXTERNALSYM TRUST_ATTRIBUTES_USER}
-
-type
- PTRUSTED_DOMAIN_INFORMATION_EX = ^TRUSTED_DOMAIN_INFORMATION_EX;
- {$EXTERNALSYM PTRUSTED_DOMAIN_INFORMATION_EX}
- _TRUSTED_DOMAIN_INFORMATION_EX = record
- Name: LSA_UNICODE_STRING;
- FlatName: LSA_UNICODE_STRING;
- Sid: PSID;
- TrustDirection: ULONG;
- TrustType: ULONG;
- TrustAttributes: ULONG;
- end;
- {$EXTERNALSYM _TRUSTED_DOMAIN_INFORMATION_EX}
- TRUSTED_DOMAIN_INFORMATION_EX = _TRUSTED_DOMAIN_INFORMATION_EX;
- {$EXTERNALSYM TRUSTED_DOMAIN_INFORMATION_EX}
- TTrustedDomainInformationEx = TRUSTED_DOMAIN_INFORMATION_EX;
- PTrustedDomainInformationEx = PTRUSTED_DOMAIN_INFORMATION_EX;
-
- _TRUSTED_DOMAIN_INFORMATION_EX2 = record
- Name: LSA_UNICODE_STRING;
- FlatName: LSA_UNICODE_STRING;
- Sid: PSID;
- TrustDirection: ULONG;
- TrustType: ULONG;
- TrustAttributes: ULONG;
- ForestTrustLength: ULONG;
- ForestTrustInfo: PUCHAR;
- end;
- {$EXTERNALSYM _TRUSTED_DOMAIN_INFORMATION_EX2}
- TRUSTED_DOMAIN_INFORMATION_EX2 = _TRUSTED_DOMAIN_INFORMATION_EX2;
- {$EXTERNALSYM TRUSTED_DOMAIN_INFORMATION_EX2}
- PTRUSTED_DOMAIN_INFORMATION_EX2 = ^TRUSTED_DOMAIN_INFORMATION_EX2;
- {$EXTERNALSYM PTRUSTED_DOMAIN_INFORMATION_EX2}
- TTrustedDomainInformationEx2 = TRUSTED_DOMAIN_INFORMATION_EX2;
- PTrustedDomainInformationEx2 = PTRUSTED_DOMAIN_INFORMATION_EX2;
-
-//
-// Type of authentication information
-//
-
-const
- TRUST_AUTH_TYPE_NONE = 0; // Ignore this entry
- {$EXTERNALSYM TRUST_AUTH_TYPE_NONE}
- TRUST_AUTH_TYPE_NT4OWF = 1; // NT4 OWF password
- {$EXTERNALSYM TRUST_AUTH_TYPE_NT4OWF}
- TRUST_AUTH_TYPE_CLEAR = 2; // Cleartext password
- {$EXTERNALSYM TRUST_AUTH_TYPE_CLEAR}
- TRUST_AUTH_TYPE_VERSION = 3; // Cleartext password version number
- {$EXTERNALSYM TRUST_AUTH_TYPE_VERSION}
-
-type
- PLSA_AUTH_INFORMATION = ^LSA_AUTH_INFORMATION;
- {$EXTERNALSYM PLSA_AUTH_INFORMATION}
- _LSA_AUTH_INFORMATION = record
- LastUpdateTime: LARGE_INTEGER;
- AuthType: ULONG;
- AuthInfoLength: ULONG;
- AuthInfo: PUCHAR;
- end;
- {$EXTERNALSYM _LSA_AUTH_INFORMATION}
- LSA_AUTH_INFORMATION = _LSA_AUTH_INFORMATION;
- {$EXTERNALSYM LSA_AUTH_INFORMATION}
- TLsaAuthInformation = LSA_AUTH_INFORMATION;
- PLsaAuthInformation = PLSA_AUTH_INFORMATION;
-
- PTRUSTED_DOMAIN_AUTH_INFORMATION = ^TRUSTED_DOMAIN_AUTH_INFORMATION;
- {$EXTERNALSYM PTRUSTED_DOMAIN_AUTH_INFORMATION}
- _TRUSTED_DOMAIN_AUTH_INFORMATION = record
- IncomingAuthInfos: ULONG;
- IncomingAuthenticationInformation: PLSA_AUTH_INFORMATION;
- IncomingPreviousAuthenticationInformation: PLSA_AUTH_INFORMATION;
- OutgoingAuthInfos: ULONG;
- OutgoingAuthenticationInformation: PLSA_AUTH_INFORMATION;
- OutgoingPreviousAuthenticationInformation: PLSA_AUTH_INFORMATION;
- end;
- {$EXTERNALSYM _TRUSTED_DOMAIN_AUTH_INFORMATION}
- TRUSTED_DOMAIN_AUTH_INFORMATION = _TRUSTED_DOMAIN_AUTH_INFORMATION;
- {$EXTERNALSYM TRUSTED_DOMAIN_AUTH_INFORMATION}
- TTrustedDomainAuthInformation = TRUSTED_DOMAIN_AUTH_INFORMATION;
- PTrustedDomainAuthInformation = PTRUSTED_DOMAIN_AUTH_INFORMATION;
-
- PTRUSTED_DOMAIN_FULL_INFORMATION = ^TRUSTED_DOMAIN_FULL_INFORMATION;
- {$EXTERNALSYM PTRUSTED_DOMAIN_FULL_INFORMATION}
- _TRUSTED_DOMAIN_FULL_INFORMATION = record
- Information: TRUSTED_DOMAIN_INFORMATION_EX;
- PosixOffset: TRUSTED_POSIX_OFFSET_INFO;
- AuthInformation: TRUSTED_DOMAIN_AUTH_INFORMATION;
- end;
- {$EXTERNALSYM _TRUSTED_DOMAIN_FULL_INFORMATION}
- TRUSTED_DOMAIN_FULL_INFORMATION = _TRUSTED_DOMAIN_FULL_INFORMATION;
- {$EXTERNALSYM TRUSTED_DOMAIN_FULL_INFORMATION}
- TTrustedDomainFullInformation = TRUSTED_DOMAIN_FULL_INFORMATION;
- PTrustedDomainFullInformation = PTRUSTED_DOMAIN_FULL_INFORMATION;
-
- PTRUSTED_DOMAIN_FULL_INFORMATION2 = ^TRUSTED_DOMAIN_FULL_INFORMATION2;
- {$EXTERNALSYM PTRUSTED_DOMAIN_FULL_INFORMATION2}
- _TRUSTED_DOMAIN_FULL_INFORMATION2 = record
- Information: TRUSTED_DOMAIN_INFORMATION_EX2;
- PosixOffset: TRUSTED_POSIX_OFFSET_INFO;
- AuthInformation: TRUSTED_DOMAIN_AUTH_INFORMATION;
- end;
- {$EXTERNALSYM _TRUSTED_DOMAIN_FULL_INFORMATION2}
- TRUSTED_DOMAIN_FULL_INFORMATION2 = _TRUSTED_DOMAIN_FULL_INFORMATION2;
- {$EXTERNALSYM TRUSTED_DOMAIN_FULL_INFORMATION2}
- TTrustedDomainFullInformation2 = TRUSTED_DOMAIN_FULL_INFORMATION2;
- PTrustedDomainFullInformation2 = PTRUSTED_DOMAIN_FULL_INFORMATION2;
-
- LSA_FOREST_TRUST_RECORD_TYPE = (
- ForestTrustTopLevelName,
- ForestTrustTopLevelNameEx,
- ForestTrustDomainInfo);
- {$EXTERNALSYM LSA_FOREST_TRUST_RECORD_TYPE}
- TLsaForestTrustRecordType = LSA_FOREST_TRUST_RECORD_TYPE;
-
-const
- ForestTrustRecordTypeLast = ForestTrustDomainInfo;
- {$EXTERNALSYM ForestTrustRecordTypeLast}
-
-//
-// Bottom 16 bits of the flags are reserved for disablement reasons
-//
-
- LSA_FTRECORD_DISABLED_REASONS = $0000FFFF;
- {$EXTERNALSYM LSA_FTRECORD_DISABLED_REASONS}
-
-//
-// Reasons for a top-level name forest trust record to be disabled
-//
-
- LSA_TLN_DISABLED_NEW = $00000001;
- {$EXTERNALSYM LSA_TLN_DISABLED_NEW}
- LSA_TLN_DISABLED_ADMIN = $00000002;
- {$EXTERNALSYM LSA_TLN_DISABLED_ADMIN}
- LSA_TLN_DISABLED_CONFLICT = $00000004;
- {$EXTERNALSYM LSA_TLN_DISABLED_CONFLICT}
-
-//
-// Reasons for a domain information forest trust record to be disabled
-//
-
- LSA_SID_DISABLED_ADMIN = $00000001;
- {$EXTERNALSYM LSA_SID_DISABLED_ADMIN}
- LSA_SID_DISABLED_CONFLICT = $00000002;
- {$EXTERNALSYM LSA_SID_DISABLED_CONFLICT}
- LSA_NB_DISABLED_ADMIN = $00000004;
- {$EXTERNALSYM LSA_NB_DISABLED_ADMIN}
- LSA_NB_DISABLED_CONFLICT = $00000008;
- {$EXTERNALSYM LSA_NB_DISABLED_CONFLICT}
-
-type
- PLSA_FOREST_TRUST_DOMAIN_INFO = ^LSA_FOREST_TRUST_DOMAIN_INFO;
- {$EXTERNALSYM PLSA_FOREST_TRUST_DOMAIN_INFO}
- _LSA_FOREST_TRUST_DOMAIN_INFO = record
- Sid: PSID;
- DnsName: LSA_UNICODE_STRING;
- NetbiosName: LSA_UNICODE_STRING;
- end;
- {$EXTERNALSYM _LSA_FOREST_TRUST_DOMAIN_INFO}
- LSA_FOREST_TRUST_DOMAIN_INFO = _LSA_FOREST_TRUST_DOMAIN_INFO;
- {$EXTERNALSYM LSA_FOREST_TRUST_DOMAIN_INFO}
- TLsaForestTrustDomainInfo = LSA_FOREST_TRUST_DOMAIN_INFO;
- PLsaForestTrustDomainInfo = PLSA_FOREST_TRUST_DOMAIN_INFO;
-
-//
-// To prevent huge data to be passed in, we should put a limit on LSA_FOREST_TRUST_BINARY_DATA.
-// 128K is large enough that can't be reached in the near future, and small enough not to
-// cause memory problems.
-
-const
- MAX_FOREST_TRUST_BINARY_DATA_SIZE = 128 * 1024;
- {$EXTERNALSYM MAX_FOREST_TRUST_BINARY_DATA_SIZE}
-
-type
- PLSA_FOREST_TRUST_BINARY_DATA = ^LSA_FOREST_TRUST_BINARY_DATA;
- {$EXTERNALSYM PLSA_FOREST_TRUST_BINARY_DATA}
- _LSA_FOREST_TRUST_BINARY_DATA = record
- Length: ULONG;
- Buffer: PUCHAR;
- end;
- {$EXTERNALSYM _LSA_FOREST_TRUST_BINARY_DATA}
- LSA_FOREST_TRUST_BINARY_DATA = _LSA_FOREST_TRUST_BINARY_DATA;
- {$EXTERNALSYM LSA_FOREST_TRUST_BINARY_DATA}
- TLsaForestTrustBinaryData = LSA_FOREST_TRUST_BINARY_DATA;
- PLsaForestTrustBinaryData = PLSA_FOREST_TRUST_BINARY_DATA;
-
- PLSA_FOREST_TRUST_RECORD = ^LSA_FOREST_TRUST_RECORD;
- {$EXTERNALSYM PLSA_FOREST_TRUST_RECORD}
- _LSA_FOREST_TRUST_RECORD = record
- Flags: ULONG;
- ForestTrustType: LSA_FOREST_TRUST_RECORD_TYPE; // type of record
- Time: LARGE_INTEGER;
- case Integer of // actual data
- 0: (TopLevelName: LSA_UNICODE_STRING);
- 1: (DomainInfo: LSA_FOREST_TRUST_DOMAIN_INFO);
- 2: (Data: LSA_FOREST_TRUST_BINARY_DATA); // used for unrecognized types
- // } ForestTrustData;
- end;
- {$EXTERNALSYM _LSA_FOREST_TRUST_RECORD}
- LSA_FOREST_TRUST_RECORD = _LSA_FOREST_TRUST_RECORD;
- {$EXTERNALSYM LSA_FOREST_TRUST_RECORD}
- TLsaForestTrustRecord = LSA_FOREST_TRUST_RECORD;
- PLsaForestTrustRecord = PLSA_FOREST_TRUST_RECORD;
-
-//
-// To prevent forest trust blobs of large size, number of records must be
-// smaller than MAX_RECORDS_IN_FOREST_TRUST_INFO
-//
-
-const
- MAX_RECORDS_IN_FOREST_TRUST_INFO = 4000;
- {$EXTERNALSYM MAX_RECORDS_IN_FOREST_TRUST_INFO}
-
-type
- PLSA_FOREST_TRUST_INFORMATION = ^LSA_FOREST_TRUST_INFORMATION;
- {$EXTERNALSYM PLSA_FOREST_TRUST_INFORMATION}
- _LSA_FOREST_TRUST_INFORMATION = record
- RecordCount: ULONG;
- Entries: ^PLSA_FOREST_TRUST_RECORD;
- end;
- {$EXTERNALSYM _LSA_FOREST_TRUST_INFORMATION}
- LSA_FOREST_TRUST_INFORMATION = _LSA_FOREST_TRUST_INFORMATION;
- {$EXTERNALSYM LSA_FOREST_TRUST_INFORMATION}
- TLsaForestTrustInformation = LSA_FOREST_TRUST_INFORMATION;
- PLsaForestTrustInformation = PLSA_FOREST_TRUST_INFORMATION;
-
- LSA_FOREST_TRUST_COLLISION_RECORD_TYPE = (
- CollisionTdo,
- CollisionXref,
- CollisionOther);
- {$EXTERNALSYM LSA_FOREST_TRUST_COLLISION_RECORD_TYPE}
- TLsaForestTrustCollisionRecordType = LSA_FOREST_TRUST_COLLISION_RECORD_TYPE;
-
- PLSA_FOREST_TRUST_COLLISION_RECORD = ^LSA_FOREST_TRUST_COLLISION_RECORD;
- {$EXTERNALSYM PLSA_FOREST_TRUST_COLLISION_RECORD}
- _LSA_FOREST_TRUST_COLLISION_RECORD = record
- Index: ULONG;
- Type_: LSA_FOREST_TRUST_COLLISION_RECORD_TYPE;
- Flags: ULONG;
- Name: LSA_UNICODE_STRING;
- end;
- {$EXTERNALSYM _LSA_FOREST_TRUST_COLLISION_RECORD}
- LSA_FOREST_TRUST_COLLISION_RECORD = _LSA_FOREST_TRUST_COLLISION_RECORD;
- {$EXTERNALSYM LSA_FOREST_TRUST_COLLISION_RECORD}
- TLsaForestTrustCollisionRecord = LSA_FOREST_TRUST_COLLISION_RECORD;
- PLsaForestTrustCollisionRecord = PLSA_FOREST_TRUST_COLLISION_RECORD;
-
- PLSA_FOREST_TRUST_COLLISION_INFORMATION = ^LSA_FOREST_TRUST_COLLISION_INFORMATION;
- {$EXTERNALSYM PLSA_FOREST_TRUST_COLLISION_INFORMATION}
- _LSA_FOREST_TRUST_COLLISION_INFORMATION = record
- RecordCount: ULONG;
- Entries: ^PLSA_FOREST_TRUST_COLLISION_RECORD;
- end;
- {$EXTERNALSYM _LSA_FOREST_TRUST_COLLISION_INFORMATION}
- LSA_FOREST_TRUST_COLLISION_INFORMATION = _LSA_FOREST_TRUST_COLLISION_INFORMATION;
- {$EXTERNALSYM LSA_FOREST_TRUST_COLLISION_INFORMATION}
- TLsaForestTrustCollisionInformation = LSA_FOREST_TRUST_COLLISION_INFORMATION;
- PLsaForestTrustCollisionInformation = PLSA_FOREST_TRUST_COLLISION_INFORMATION;
-
-//
-// LSA Enumeration Context
-//
-
- LSA_ENUMERATION_HANDLE = ULONG;
- {$EXTERNALSYM LSA_ENUMERATION_HANDLE}
- PLSA_ENUMERATION_HANDLE = LSA_ENUMERATION_HANDLE;
- {$EXTERNALSYM PLSA_ENUMERATION_HANDLE}
-
-//
-// LSA Enumeration Information
-//
-
- PLSA_ENUMERATION_INFORMATION = ^LSA_ENUMERATION_INFORMATION;
- {$EXTERNALSYM PLSA_ENUMERATION_INFORMATION}
- _LSA_ENUMERATION_INFORMATION = record
- Sid: PSID;
- end;
- {$EXTERNALSYM _LSA_ENUMERATION_INFORMATION}
- LSA_ENUMERATION_INFORMATION = _LSA_ENUMERATION_INFORMATION;
- {$EXTERNALSYM LSA_ENUMERATION_INFORMATION}
- TLsaEnumerationInformation = LSA_ENUMERATION_INFORMATION;
- PLsaEnumerationInformation = PLSA_ENUMERATION_INFORMATION;
-
-////////////////////////////////////////////////////////////////////////////
-// //
-// Local Security Policy - Miscellaneous API function prototypes //
-// //
-////////////////////////////////////////////////////////////////////////////
-
-function LsaFreeMemory(Buffer: PVOID): NTSTATUS; stdcall;
-{$EXTERNALSYM LsaFreeMemory}
-
-function LsaClose(ObjectHandle: LSA_HANDLE): NTSTATUS; stdcall;
-{$EXTERNALSYM LsaClose}
-
-type
- _SECURITY_LOGON_SESSION_DATA = record
- Size: ULONG;
- LogonId: LUID;
- UserName: LSA_UNICODE_STRING;
- LogonDomain: LSA_UNICODE_STRING;
- AuthenticationPackage: LSA_UNICODE_STRING;
- LogonType: SECURITY_LOGON_TYPE;
- Session: ULONG;
- Sid: PSID;
- LogonTime: LARGE_INTEGER;
-
- //
- // new for whistler:
- //
-
- LogonServer: LSA_UNICODE_STRING;
- DnsDomainName: LSA_UNICODE_STRING;
- Upn: LSA_UNICODE_STRING;
- end;
- {$EXTERNALSYM _SECURITY_LOGON_SESSION_DATA}
- SECURITY_LOGON_SESSION_DATA = _SECURITY_LOGON_SESSION_DATA;
- {$EXTERNALSYM SECURITY_LOGON_SESSION_DATA}
- PSECURITY_LOGON_SESSION_DATA = ^SECURITY_LOGON_SESSION_DATA;
- {$EXTERNALSYM PSECURITY_LOGON_SESSION_DATA}
- TSecurityLogonSessionData = SECURITY_LOGON_SESSION_DATA;
- PSecurityLogonSessionData = PSECURITY_LOGON_SESSION_DATA;
-
-function LsaEnumerateLogonSessions(LogonSessionCount: PULONG; var LogonSessionList: PLUID): NTSTATUS; stdcall;
-{$EXTERNALSYM LsaEnumerateLogonSessions}
-
-function LsaGetLogonSessionData(LogonId: PLUID; var ppLogonSessionData: PSECURITY_LOGON_SESSION_DATA): NTSTATUS; stdcall;
-{$EXTERNALSYM LsaGetLogonSessionData}
-
-function LsaOpenPolicy(SystemName: PLSA_UNICODE_STRING;
- var ObjectAttributes: LSA_OBJECT_ATTRIBUTES; DesiredAccess: ACCESS_MASK;
- var PolicyHandle: LSA_HANDLE): NTSTATUS; stdcall;
-{$EXTERNALSYM LsaOpenPolicy}
-
-function LsaQueryInformationPolicy(PolicyHandle: LSA_HANDLE;
- InformationClass: POLICY_INFORMATION_CLASS; var Buffer: PVOID): NTSTATUS; stdcall;
-{$EXTERNALSYM LsaQueryInformationPolicy}
-
-function LsaSetInformationPolicy(PolicyHandle: LSA_HANDLE;
- InformationClass: POLICY_INFORMATION_CLASS; Buffer: PVOID): NTSTATUS; stdcall;
-{$EXTERNALSYM LsaSetInformationPolicy}
-
-function LsaQueryDomainInformationPolicy(PolicyHandle: LSA_HANDLE;
- InformationClass: POLICY_DOMAIN_INFORMATION_CLASS; Buffer: PPVOID): NTSTATUS; stdcall;
-{$EXTERNALSYM LsaQueryDomainInformationPolicy}
-
-function LsaSetDomainInformationPolicy(PolicyHandle: LSA_HANDLE;
- InformationClass: POLICY_DOMAIN_INFORMATION_CLASS; Buffer: PVOID): NTSTATUS; stdcall;
-{$EXTERNALSYM LsaSetDomainInformationPolicy}
-
-function LsaRegisterPolicyChangeNotification(InformationClass: POLICY_NOTIFICATION_INFORMATION_CLASS;
- NotificationEventHandle: HANDLE): NTSTATUS; stdcall;
-{$EXTERNALSYM LsaRegisterPolicyChangeNotification}
-
-function LsaUnregisterPolicyChangeNotification(InformationClass: POLICY_NOTIFICATION_INFORMATION_CLASS;
- NotificationEventHandle: HANDLE): NTSTATUS; stdcall;
-{$EXTERNALSYM LsaUnregisterPolicyChangeNotification}
-
-function LsaEnumerateTrustedDomains(PolicyHandle: LSA_HANDLE;
- var EnumerationContext: LSA_ENUMERATION_HANDLE; Buffer: PPVOID;
- PreferedMaximumLength: ULONG; var CountReturned: ULONG): NTSTATUS; stdcall;
-{$EXTERNALSYM LsaEnumerateTrustedDomains}
-
-function LsaLookupNames(PolicyHandle: LSA_HANDLE; Count: ULONG;
- Names: PLSA_UNICODE_STRING; var ReferencedDomains: PLSA_REFERENCED_DOMAIN_LIST;
- var Sids: PLSA_TRANSLATED_SID): NTSTATUS; stdcall;
-{$EXTERNALSYM LsaLookupNames}
-
-function LsaLookupNames2(PolicyHandle: LSA_HANDLE; Flags, Count: ULONG; Names: PLSA_UNICODE_STRING;
- var ReferencedDomains: PLSA_REFERENCED_DOMAIN_LIST; var Sids: PLSA_TRANSLATED_SID2): NTSTATUS; stdcall;
-{$EXTERNALSYM LsaLookupNames2}
-
-function LsaLookupSids(PolicyHandle: LSA_HANDLE; Count: ULONG; Sids: PPSID;
- var ReferencedDomains: PLSA_REFERENCED_DOMAIN_LIST;
- var Names: PLSA_TRANSLATED_NAME): NTSTATUS; stdcall;
-{$EXTERNALSYM LsaLookupSids}
-
-const
- SE_INTERACTIVE_LOGON_NAME = 'SeInteractiveLogonRight';
- {$EXTERNALSYM SE_INTERACTIVE_LOGON_NAME}
- SE_NETWORK_LOGON_NAME = 'SeNetworkLogonRight';
- {$EXTERNALSYM SE_NETWORK_LOGON_NAME}
- SE_BATCH_LOGON_NAME = 'SeBatchLogonRight';
- {$EXTERNALSYM SE_BATCH_LOGON_NAME}
- SE_SERVICE_LOGON_NAME = 'SeServiceLogonRight';
- {$EXTERNALSYM SE_SERVICE_LOGON_NAME}
- SE_DENY_INTERACTIVE_LOGON_NAME = 'SeDenyInteractiveLogonRight';
- {$EXTERNALSYM SE_DENY_INTERACTIVE_LOGON_NAME}
- SE_DENY_NETWORK_LOGON_NAME = 'SeDenyNetworkLogonRight';
- {$EXTERNALSYM SE_DENY_NETWORK_LOGON_NAME}
- SE_DENY_BATCH_LOGON_NAME = 'SeDenyBatchLogonRight';
- {$EXTERNALSYM SE_DENY_BATCH_LOGON_NAME}
- SE_DENY_SERVICE_LOGON_NAME = 'SeDenyServiceLogonRight';
- {$EXTERNALSYM SE_DENY_SERVICE_LOGON_NAME}
- SE_REMOTE_INTERACTIVE_LOGON_NAME = 'SeRemoteInteractiveLogonRight';
- {$EXTERNALSYM SE_REMOTE_INTERACTIVE_LOGON_NAME}
- SE_DENY_REMOTE_INTERACTIVE_LOGON_NAME = 'SeDenyRemoteInteractiveLogonRight';
- {$EXTERNALSYM SE_DENY_REMOTE_INTERACTIVE_LOGON_NAME}
-
-//
-// This new API returns all the accounts with a certain privilege
-//
-
-function LsaEnumerateAccountsWithUserRight(PolicyHandle: LSA_HANDLE;
- UserRights: PLSA_UNICODE_STRING; var EnumerationBuffer: PLSA_ENUMERATION_INFORMATION;
- var CountReturned: ULONG): NTSTATUS; stdcall;
-{$EXTERNALSYM LsaEnumerateAccountsWithUserRight}
-
-//
-// These new APIs differ by taking a SID instead of requiring the caller
-// to open the account first and passing in an account handle
-//
-
-function LsaEnumerateAccountRights(PolicyHandle: LSA_HANDLE; AccountSid: PSID;
- var UserRights: PLSA_UNICODE_STRING; var CountOfRights: ULONG): NTSTATUS; stdcall;
-{$EXTERNALSYM LsaEnumerateAccountRights}
-
-function LsaAddAccountRights(PolicyHandle: LSA_HANDLE; AccountSid: PSID;
- UserRights: PLSA_UNICODE_STRING; CountOfRights: ULONG): NTSTATUS; stdcall;
-{$EXTERNALSYM LsaAddAccountRights}
-
-function LsaRemoveAccountRights(PolicyHandle: LSA_HANDLE; AccountSid: PSID;
- AllRights: ByteBool; UserRights: PLSA_UNICODE_STRING; CountOfRights: ULONG): NTSTATUS; stdcall;
-{$EXTERNALSYM LsaRemoveAccountRights}
-
-///////////////////////////////////////////////////////////////////////////////
-// //
-// Local Security Policy - Trusted Domain Object API function prototypes //
-// //
-///////////////////////////////////////////////////////////////////////////////
-
-function LsaOpenTrustedDomainByName(PolicyHandle: LSA_HANDLE;
- const TrustedDomainName: LSA_UNICODE_STRING; DesiredAccess: ACCESS_MASK;
- var TrustedDomainHandle: LSA_HANDLE): NTSTATUS; stdcall;
-{$EXTERNALSYM LsaOpenTrustedDomainByName}
-
-function LsaQueryTrustedDomainInfo(PolicyHandle: LSA_HANDLE; TrustedDomainSid: PSID;
- InformationClass: TRUSTED_INFORMATION_CLASS; Buffer: PPVOID): NTSTATUS; stdcall;
-{$EXTERNALSYM LsaQueryTrustedDomainInfo}
-
-function LsaSetTrustedDomainInformation(PolicyHandle: LSA_HANDLE; TrustedDomainSid: PSID;
- InformationClass: TRUSTED_INFORMATION_CLASS; Buffer: PVOID): NTSTATUS; stdcall;
-{$EXTERNALSYM LsaSetTrustedDomainInformation}
-
-function LsaDeleteTrustedDomain(PolicyHandle: LSA_HANDLE; TrustedDomainSid: PSID): NTSTATUS; stdcall;
-{$EXTERNALSYM LsaDeleteTrustedDomain}
-
-function LsaQueryTrustedDomainInfoByName(PolicyHandle: LSA_HANDLE;
- const TrustedDomainName: LSA_UNICODE_STRING;
- InformationClass: TRUSTED_INFORMATION_CLASS; Buffer: PPVOID): NTSTATUS; stdcall;
-{$EXTERNALSYM LsaQueryTrustedDomainInfoByName}
-
-function LsaSetTrustedDomainInfoByName(PolicyHandle: LSA_HANDLE;
- const TrustedDomainName: LSA_UNICODE_STRING;
- InformationClass: TRUSTED_INFORMATION_CLASS; Buffer: PVOID): NTSTATUS; stdcall;
-{$EXTERNALSYM LsaSetTrustedDomainInfoByName}
-
-function LsaEnumerateTrustedDomainsEx(PolicyHandle: LSA_HANDLE;
- var EnumerationContext: LSA_ENUMERATION_HANDLE; Buffer: PPVOID;
- PreferedMaximumLength: ULONG; var CountReturned: ULONG): NTSTATUS; stdcall;
-{$EXTERNALSYM LsaEnumerateTrustedDomainsEx}
-
-function LsaCreateTrustedDomainEx(PolicyHandle: LSA_HANDLE;
- const TrustedDomainInformation: TRUSTED_DOMAIN_INFORMATION_EX;
- const AuthenticationInformation: TRUSTED_DOMAIN_AUTH_INFORMATION;
- DesiredAccess: ACCESS_MASK; var TrustedDomainHandle: LSA_HANDLE): NTSTATUS; stdcall;
-{$EXTERNALSYM LsaCreateTrustedDomainEx}
-
-function LsaQueryForestTrustInformation(PolicyHandle: LSA_HANDLE; TrustedDomainName: PLSA_UNICODE_STRING;
- var ForestTrustInfo: PLSA_FOREST_TRUST_INFORMATION): NTSTATUS; stdcall;
-{$EXTERNALSYM LsaQueryForestTrustInformation}
-
-function LsaSetForestTrustInformation(PolicyHandle: LSA_HANDLE; TrustedDomainName: PLSA_UNICODE_STRING;
- ForestTrustInfo: PLSA_FOREST_TRUST_INFORMATION; CheckOnly: BOOLEAN; var CollisionInfo: PLSA_FOREST_TRUST_COLLISION_INFORMATION): NTSTATUS; stdcall;
-{$EXTERNALSYM LsaSetForestTrustInformation}
-
-{.DEFINE TESTING_MATCHING_ROUTINE}
-{$IFDEF TESTING_MATCHING_ROUTINE}
-function LsaForestTrustFindMatch(PolicyHandle: LSA_HANDLE; Type_: ULONG; Name: PLSA_UNICODE_STRING; var Match: PLSA_UNICODE_STRING): NTSTATUS; stdcall;
-{$EXTERNALSYM LsaForestTrustFindMatch}
-{$ENDIF TESTING_MATCHING_ROUTINE}
-
-//
-// This API sets the workstation password (equivalent of setting/getting
-// the SSI_SECRET_NAME secret)
-//
-
-function LsaStorePrivateData(PolicyHandle: LSA_HANDLE;
- const KeyName: LSA_UNICODE_STRING; PrivateData: PLSA_UNICODE_STRING): NTSTATUS; stdcall;
-{$EXTERNALSYM LsaStorePrivateData}
-
-function LsaRetrievePrivateData(PolicyHandle: LSA_HANDLE;
- const KeyName: LSA_UNICODE_STRING; var PrivateData: PLSA_UNICODE_STRING): NTSTATUS; stdcall;
-{$EXTERNALSYM LsaRetrievePrivateData}
-
-function LsaNtStatusToWinError(Status: NTSTATUS): ULONG; stdcall;
-{$EXTERNALSYM LsaNtStatusToWinError}
-
-(*#if 0
-NTSTATUS
-NTAPI
-LsaLookupNamesEx(
- IN LSA_HANDLE PolicyHandle,
- IN ULONG Count,
- IN PLSA_NAME_LOOKUP_EX Names,
- OUT PLSA_TRANSLATED_SID_EX *TranslatedSids,
- IN ULONG LookupOptions,
- IN OUT PULONG MappedCount
- );
-
-NTSTATUS
-NTAPI
-LsaLookupSidsEx(
- IN LSA_HANDLE PolicyHandle,
- IN ULONG Count,
- IN PLSA_SID_LOOKUP_EX Sids,
- OUT PLSA_TRANSLATED_NAME_EX *TranslatedNames,
- IN ULONG LookupOptions,
- IN OUT PULONG MappedCount
- );
-#endif*)
-
-//
-// SPNEGO package stuff
-//
-
-type
- NEGOTIATE_MESSAGES = (NegEnumPackagePrefixes, NegGetCallerName, NegCallPackageMax);
- {$EXTERNALSYM NEGOTIATE_MESSAGES}
-
-const
- NEGOTIATE_MAX_PREFIX = 32;
- {$EXTERNALSYM NEGOTIATE_MAX_PREFIX}
-
-type
- PNEGOTIATE_PACKAGE_PREFIX = ^NEGOTIATE_PACKAGE_PREFIX;
- {$EXTERNALSYM PNEGOTIATE_PACKAGE_PREFIX}
- _NEGOTIATE_PACKAGE_PREFIX = record
- PackageId: ULONG_PTR;
- PackageDataA: PVOID;
- PackageDataW: PVOID;
- PrefixLen: ULONG_PTR;
- Prefix: array [0..NEGOTIATE_MAX_PREFIX - 1] of UCHAR;
- end;
- {$EXTERNALSYM _NEGOTIATE_PACKAGE_PREFIX}
- NEGOTIATE_PACKAGE_PREFIX = _NEGOTIATE_PACKAGE_PREFIX;
- {$EXTERNALSYM NEGOTIATE_PACKAGE_PREFIX}
- TNegotiatePackagePrefix = NEGOTIATE_PACKAGE_PREFIX;
- PNegotiatePackagePrefix = PNEGOTIATE_PACKAGE_PREFIX;
-
- PNEGOTIATE_PACKAGE_PREFIXES = ^NEGOTIATE_PACKAGE_PREFIXES;
- {$EXTERNALSYM PNEGOTIATE_PACKAGE_PREFIXES}
- _NEGOTIATE_PACKAGE_PREFIXES = record
- MessageType: ULONG;
- PrefixCount: ULONG;
- Offset: ULONG; // Offset to array of _PREFIX above
- Pad: ULONG; // Align structure for 64-bit
- end;
- {$EXTERNALSYM _NEGOTIATE_PACKAGE_PREFIXES}
- NEGOTIATE_PACKAGE_PREFIXES = _NEGOTIATE_PACKAGE_PREFIXES;
- {$EXTERNALSYM NEGOTIATE_PACKAGE_PREFIXES}
- TNegotiatePackagePrefixes = NEGOTIATE_PACKAGE_PREFIXES;
- PNegotiatePackagePrefixes = PNEGOTIATE_PACKAGE_PREFIXES;
-
- PNEGOTIATE_CALLER_NAME_REQUEST = ^NEGOTIATE_CALLER_NAME_REQUEST;
- {$EXTERNALSYM PNEGOTIATE_CALLER_NAME_REQUEST}
- _NEGOTIATE_CALLER_NAME_REQUEST = record
- MessageType: ULONG;
- LogonId: LUID;
- end;
- {$EXTERNALSYM _NEGOTIATE_CALLER_NAME_REQUEST}
- NEGOTIATE_CALLER_NAME_REQUEST = _NEGOTIATE_CALLER_NAME_REQUEST;
- {$EXTERNALSYM NEGOTIATE_CALLER_NAME_REQUEST}
- TNegotiateCallerNameRequest = NEGOTIATE_CALLER_NAME_REQUEST;
- PNegotiateCallerNameRequest = PNEGOTIATE_CALLER_NAME_REQUEST;
-
- PNEGOTIATE_CALLER_NAME_RESPONSE = ^NEGOTIATE_CALLER_NAME_RESPONSE;
- {$EXTERNALSYM PNEGOTIATE_CALLER_NAME_RESPONSE}
- _NEGOTIATE_CALLER_NAME_RESPONSE = record
- MessageType: ULONG;
- CallerName: PWSTR;
- end;
- {$EXTERNALSYM _NEGOTIATE_CALLER_NAME_RESPONSE}
- NEGOTIATE_CALLER_NAME_RESPONSE = _NEGOTIATE_CALLER_NAME_RESPONSE;
- {$EXTERNALSYM NEGOTIATE_CALLER_NAME_RESPONSE}
- TNegotiateCallerNameResponse = NEGOTIATE_CALLER_NAME_RESPONSE;
- PNegotiateCallerNameResponse = PNEGOTIATE_CALLER_NAME_RESPONSE;
-
-type
- PDOMAIN_PASSWORD_INFORMATION = ^DOMAIN_PASSWORD_INFORMATION;
- {$EXTERNALSYM PDOMAIN_PASSWORD_INFORMATION}
- _DOMAIN_PASSWORD_INFORMATION = record
- MinPasswordLength: USHORT;
- PasswordHistoryLength: USHORT;
- PasswordProperties: ULONG;
- MaxPasswordAge: LARGE_INTEGER;
- MinPasswordAge: LARGE_INTEGER;
- end;
- {$EXTERNALSYM _DOMAIN_PASSWORD_INFORMATION}
- DOMAIN_PASSWORD_INFORMATION = _DOMAIN_PASSWORD_INFORMATION;
- {$EXTERNALSYM DOMAIN_PASSWORD_INFORMATION}
- TDomainPasswordInformation = DOMAIN_PASSWORD_INFORMATION;
- PDomainPasswordInformation = PDOMAIN_PASSWORD_INFORMATION;
-
-//
-// PasswordProperties flags
-//
-
-const
- DOMAIN_PASSWORD_COMPLEX = $00000001;
- {$EXTERNALSYM DOMAIN_PASSWORD_COMPLEX}
- DOMAIN_PASSWORD_NO_ANON_CHANGE = $00000002;
- {$EXTERNALSYM DOMAIN_PASSWORD_NO_ANON_CHANGE}
- DOMAIN_PASSWORD_NO_CLEAR_CHANGE = $00000004;
- {$EXTERNALSYM DOMAIN_PASSWORD_NO_CLEAR_CHANGE}
- DOMAIN_LOCKOUT_ADMINS = $00000008;
- {$EXTERNALSYM DOMAIN_LOCKOUT_ADMINS}
- DOMAIN_PASSWORD_STORE_CLEARTEXT = $00000010;
- {$EXTERNALSYM DOMAIN_PASSWORD_STORE_CLEARTEXT}
- DOMAIN_REFUSE_PASSWORD_CHANGE = $00000020;
- {$EXTERNALSYM DOMAIN_REFUSE_PASSWORD_CHANGE}
-
-type
- PSAM_PASSWORD_NOTIFICATION_ROUTINE = function(UserName: PUNICODE_STRING;
- RelativeId: ULONG; NewPassword: PUNICODE_STRING): NTSTATUS; stdcall;
- {$EXTERNALSYM PSAM_PASSWORD_NOTIFICATION_ROUTINE}
- TSamPasswordNotificationRoutine = PSAM_PASSWORD_NOTIFICATION_ROUTINE;
-
-const
- SAM_PASSWORD_CHANGE_NOTIFY_ROUTINE = 'PasswordChangeNotify';
- {$EXTERNALSYM SAM_PASSWORD_CHANGE_NOTIFY_ROUTINE}
-
-type
- PSAM_INIT_NOTIFICATION_ROUTINE = function : ByteBool; stdcall;
- {$EXTERNALSYM PSAM_INIT_NOTIFICATION_ROUTINE}
- TSamInitNotificationRoutine = PSAM_INIT_NOTIFICATION_ROUTINE;
-
-const
- SAM_INIT_NOTIFICATION_ROUTINE = 'InitializeChangeNotify';
- {$EXTERNALSYM SAM_INIT_NOTIFICATION_ROUTINE}
-
- SAM_PASSWORD_FILTER_ROUTINE = 'PasswordFilter';
- {$EXTERNALSYM SAM_PASSWORD_FILTER_ROUTINE}
-
-type
- PSAM_PASSWORD_FILTER_ROUTINE = function(AccountName, FullName,
- Password: PUNICODE_STRING; SetOperation: ByteBool): ByteBool; stdcall;
- {$EXTERNALSYM PSAM_PASSWORD_FILTER_ROUTINE}
- TSamPasswordFilterRoutine = PSAM_PASSWORD_FILTER_ROUTINE;
-
-/////////////////////////////////////////////////////////////////////////
-// //
-// Name of the MSV1_0 authentication package //
-// //
-/////////////////////////////////////////////////////////////////////////
-
-const
- MSV1_0_PACKAGE_NAME = 'MICROSOFT_AUTHENTICATION_PACKAGE_V1_0';
- {$EXTERNALSYM MSV1_0_PACKAGE_NAME}
- MSV1_0_PACKAGE_NAMEW = WideString('MICROSOFT_AUTHENTICATION_PACKAGE_V1_0');
- {$EXTERNALSYM MSV1_0_PACKAGE_NAMEW}
- MSV1_0_PACKAGE_NAMEW_LENGTH = SizeOf(MSV1_0_PACKAGE_NAMEW) - SizeOf(WCHAR);
- {$EXTERNALSYM MSV1_0_PACKAGE_NAMEW_LENGTH}
-
-//
-// Location of MSV authentication package data
-//
-
- MSV1_0_SUBAUTHENTICATION_KEY = 'SYSTEM\\CurrentControlSet\\Control\\Lsa\\MSV1_0';
- {$EXTERNALSYM MSV1_0_SUBAUTHENTICATION_KEY}
- MSV1_0_SUBAUTHENTICATION_VALUE = 'Auth';
- {$EXTERNALSYM MSV1_0_SUBAUTHENTICATION_VALUE}
-
-/////////////////////////////////////////////////////////////////////////
-// //
-// Widely used MSV1_0 data types //
-// //
-/////////////////////////////////////////////////////////////////////////
-
-///////////////////////////////////////////////////////////////////////////////
-// //
-// LOGON Related Data Structures
-//
-// //
-///////////////////////////////////////////////////////////////////////////////
-
-//
-// When a LsaLogonUser() call is dispatched to the MsV1_0 authentication
-// package, the beginning of the AuthenticationInformation buffer is
-// cast to a MSV1_0_LOGON_SUBMIT_TYPE to determine the type of logon
-// being requested. Similarly, upon return, the type of profile buffer
-// can be determined by typecasting it to a MSV_1_0_PROFILE_BUFFER_TYPE.
-//
-
-//
-// MSV1.0 LsaLogonUser() submission message types.
-//
-
-type
- _MSV1_0_LOGON_SUBMIT_TYPE = (
- mlstFiller0, mlstFiller1,
- MsV1_0InteractiveLogon,
- MsV1_0Lm20Logon,
- MsV1_0NetworkLogon,
- MsV1_0SubAuthLogon,
- mlstFiller6,
- MsV1_0WorkstationUnlockLogon);
- {$EXTERNALSYM _MSV1_0_LOGON_SUBMIT_TYPE}
- MSV1_0_LOGON_SUBMIT_TYPE = _MSV1_0_LOGON_SUBMIT_TYPE;
- {$EXTERNALSYM MSV1_0_LOGON_SUBMIT_TYPE}
- PMSV1_0_LOGON_SUBMIT_TYPE = ^MSV1_0_LOGON_SUBMIT_TYPE;
- {$EXTERNALSYM PMSV1_0_LOGON_SUBMIT_TYPE}
- TMsv1_0LogonSubmitType = MSV1_0_LOGON_SUBMIT_TYPE;
- PMsv1_0LogonSubmitType = PMSV1_0_LOGON_SUBMIT_TYPE;
-
-//
-// MSV1.0 LsaLogonUser() profile buffer types.
-//
-
- _MSV1_0_PROFILE_BUFFER_TYPE = (
- mpbtFiller0, mpbtFiller1,
- MsV1_0InteractiveProfile,
- MsV1_0Lm20LogonProfile,
- MsV1_0SmartCardProfile);
- {$EXTERNALSYM _MSV1_0_PROFILE_BUFFER_TYPE}
- MSV1_0_PROFILE_BUFFER_TYPE = _MSV1_0_PROFILE_BUFFER_TYPE;
- {$EXTERNALSYM MSV1_0_PROFILE_BUFFER_TYPE}
- PMSV1_0_PROFILE_BUFFER_TYPE = ^MSV1_0_PROFILE_BUFFER_TYPE;
- {$EXTERNALSYM PMSV1_0_PROFILE_BUFFER_TYPE}
- TMsv1_0ProfileBufferType = MSV1_0_PROFILE_BUFFER_TYPE;
- PMsv1_0ProfileBufferType = PMSV1_0_PROFILE_BUFFER_TYPE;
-
-//
-// MsV1_0InteractiveLogon
-//
-// The AuthenticationInformation buffer of an LsaLogonUser() call to
-// perform an interactive logon contains the following data structure:
-//
-
- PMSV1_0_INTERACTIVE_LOGON = ^MSV1_0_INTERACTIVE_LOGON;
- {$EXTERNALSYM PMSV1_0_INTERACTIVE_LOGON}
- _MSV1_0_INTERACTIVE_LOGON = record
- MessageType: MSV1_0_LOGON_SUBMIT_TYPE;
- LogonDomainName: UNICODE_STRING;
- UserName: UNICODE_STRING;
- Password: UNICODE_STRING;
- end;
- {$EXTERNALSYM _MSV1_0_INTERACTIVE_LOGON}
- MSV1_0_INTERACTIVE_LOGON = _MSV1_0_INTERACTIVE_LOGON;
- {$EXTERNALSYM MSV1_0_INTERACTIVE_LOGON}
- TMsv10InteractiveLogon = MSV1_0_INTERACTIVE_LOGON;
- PMsv10InteractiveLogon = PMSV1_0_INTERACTIVE_LOGON;
-
-//
-// Where:
-//
-// MessageType - Contains the type of logon being requested. This
-// field must be set to MsV1_0InteractiveLogon.
-//
-// UserName - Is a string representing the user's account name. The
-// name may be up to 255 characters long. The name is treated case
-// insensitive.
-//
-// Password - Is a string containing the user's cleartext password.
-// The password may be up to 255 characters long and contain any
-// UNICODE value.
-//
-//
-
-//
-// The ProfileBuffer returned upon a successful logon of this type
-// contains the following data structure:
-//
-
- PMSV1_0_INTERACTIVE_PROFILE = ^MSV1_0_INTERACTIVE_PROFILE;
- {$EXTERNALSYM PMSV1_0_INTERACTIVE_PROFILE}
- _MSV1_0_INTERACTIVE_PROFILE = record
- MessageType: MSV1_0_PROFILE_BUFFER_TYPE;
- LogonCount: USHORT;
- BadPasswordCount: USHORT;
- LogonTime: LARGE_INTEGER;
- LogoffTime: LARGE_INTEGER;
- KickOffTime: LARGE_INTEGER;
- PasswordLastSet: LARGE_INTEGER;
- PasswordCanChange: LARGE_INTEGER;
- PasswordMustChange: LARGE_INTEGER;
- LogonScript: UNICODE_STRING;
- HomeDirectory: UNICODE_STRING;
- FullName: UNICODE_STRING;
- ProfilePath: UNICODE_STRING;
- HomeDirectoryDrive: UNICODE_STRING;
- LogonServer: UNICODE_STRING;
- UserFlags: ULONG;
- end;
- {$EXTERNALSYM _MSV1_0_INTERACTIVE_PROFILE}
- MSV1_0_INTERACTIVE_PROFILE = _MSV1_0_INTERACTIVE_PROFILE;
- {$EXTERNALSYM MSV1_0_INTERACTIVE_PROFILE}
- TMsv10InteractiveProfile = MSV1_0_INTERACTIVE_PROFILE;
- PMsv10InteractiveProfile = PMSV1_0_INTERACTIVE_PROFILE;
-
-//
-// where:
-//
-// MessageType - Identifies the type of profile data being returned.
-// Contains the type of logon being requested. This field must
-// be set to MsV1_0InteractiveProfile.
-//
-// LogonCount - Number of times the user is currently logged on.
-//
-// BadPasswordCount - Number of times a bad password was applied to
-// the account since last successful logon.
-//
-// LogonTime - Time when user last logged on. This is an absolute
-// format NT standard time value.
-//
-// LogoffTime - Time when user should log off. This is an absolute
-// format NT standard time value.
-//
-// KickOffTime - Time when system should force user logoff. This is
-// an absolute format NT standard time value.
-//
-// PasswordLastChanged - Time and date the password was last
-// changed. This is an absolute format NT standard time
-// value.
-//
-// PasswordCanChange - Time and date when the user can change the
-// password. This is an absolute format NT time value. To
-// prevent a password from ever changing, set this field to a
-// date very far into the future.
-//
-// PasswordMustChange - Time and date when the user must change the
-// password. If the user can never change the password, this
-// field is undefined. This is an absolute format NT time
-// value.
-//
-// LogonScript - The (relative) path to the account's logon
-// script.
-//
-// HomeDirectory - The home directory for the user.
-//
-
-//
-// MsV1_0Lm20Logon and MsV1_0NetworkLogon
-//
-// The AuthenticationInformation buffer of an LsaLogonUser() call to
-// perform an network logon contains the following data structure:
-//
-// MsV1_0NetworkLogon logon differs from MsV1_0Lm20Logon in that the
-// ParameterControl field exists.
-//
-
-const
- MSV1_0_CHALLENGE_LENGTH = 8;
- {$EXTERNALSYM MSV1_0_CHALLENGE_LENGTH}
- MSV1_0_USER_SESSION_KEY_LENGTH = 16;
- {$EXTERNALSYM MSV1_0_USER_SESSION_KEY_LENGTH}
- MSV1_0_LANMAN_SESSION_KEY_LENGTH = 8;
- {$EXTERNALSYM MSV1_0_LANMAN_SESSION_KEY_LENGTH}
-
-//
-// Values for ParameterControl.
-//
-
- MSV1_0_CLEARTEXT_PASSWORD_ALLOWED = $02;
- {$EXTERNALSYM MSV1_0_CLEARTEXT_PASSWORD_ALLOWED}
- MSV1_0_UPDATE_LOGON_STATISTICS = $04;
- {$EXTERNALSYM MSV1_0_UPDATE_LOGON_STATISTICS}
- MSV1_0_RETURN_USER_PARAMETERS = $08;
- {$EXTERNALSYM MSV1_0_RETURN_USER_PARAMETERS}
- MSV1_0_DONT_TRY_GUEST_ACCOUNT = $10;
- {$EXTERNALSYM MSV1_0_DONT_TRY_GUEST_ACCOUNT}
- MSV1_0_ALLOW_SERVER_TRUST_ACCOUNT = $20;
- {$EXTERNALSYM MSV1_0_ALLOW_SERVER_TRUST_ACCOUNT}
- MSV1_0_RETURN_PASSWORD_EXPIRY = $40;
- {$EXTERNALSYM MSV1_0_RETURN_PASSWORD_EXPIRY}
-
-// this next flag says that CaseInsensitiveChallengeResponse
-// (aka LmResponse) contains a client challenge in the first 8 bytes
-
- MSV1_0_USE_CLIENT_CHALLENGE = $80;
- {$EXTERNALSYM MSV1_0_USE_CLIENT_CHALLENGE}
- MSV1_0_TRY_GUEST_ACCOUNT_ONLY = $100;
- {$EXTERNALSYM MSV1_0_TRY_GUEST_ACCOUNT_ONLY}
- MSV1_0_RETURN_PROFILE_PATH = $200;
- {$EXTERNALSYM MSV1_0_RETURN_PROFILE_PATH}
- MSV1_0_TRY_SPECIFIED_DOMAIN_ONLY = $400;
- {$EXTERNALSYM MSV1_0_TRY_SPECIFIED_DOMAIN_ONLY}
- MSV1_0_ALLOW_WORKSTATION_TRUST_ACCOUNT = $800;
- {$EXTERNALSYM MSV1_0_ALLOW_WORKSTATION_TRUST_ACCOUNT}
- MSV1_0_DISABLE_PERSONAL_FALLBACK = $00001000;
- {$EXTERNALSYM MSV1_0_DISABLE_PERSONAL_FALLBACK}
- MSV1_0_ALLOW_FORCE_GUEST = $00002000;
- {$EXTERNALSYM MSV1_0_ALLOW_FORCE_GUEST}
- MSV1_0_CLEARTEXT_PASSWORD_SUPPLIED = $00004000;
- {$EXTERNALSYM MSV1_0_CLEARTEXT_PASSWORD_SUPPLIED}
- MSV1_0_USE_DOMAIN_FOR_ROUTING_ONLY = $00008000;
- {$EXTERNALSYM MSV1_0_USE_DOMAIN_FOR_ROUTING_ONLY}
- MSV1_0_SUBAUTHENTICATION_DLL_EX = $00100000;
- {$EXTERNALSYM MSV1_0_SUBAUTHENTICATION_DLL_EX}
-
-//
-// The high order byte is a value indicating the SubAuthentication DLL.
-// Zero indicates no SubAuthentication DLL.
-//
-
- MSV1_0_SUBAUTHENTICATION_DLL = DWORD($FF000000);
- {$EXTERNALSYM MSV1_0_SUBAUTHENTICATION_DLL}
- MSV1_0_SUBAUTHENTICATION_DLL_SHIFT = 24;
- {$EXTERNALSYM MSV1_0_SUBAUTHENTICATION_DLL_SHIFT}
- MSV1_0_MNS_LOGON = $01000000;
- {$EXTERNALSYM MSV1_0_MNS_LOGON}
-
-//
-// This is the list of subauthentication dlls used in MS
-//
-
- MSV1_0_SUBAUTHENTICATION_DLL_RAS = 2;
- {$EXTERNALSYM MSV1_0_SUBAUTHENTICATION_DLL_RAS}
- MSV1_0_SUBAUTHENTICATION_DLL_IIS = 132;
- {$EXTERNALSYM MSV1_0_SUBAUTHENTICATION_DLL_IIS}
-
-type
- PMSV1_0_LM20_LOGON = ^MSV1_0_LM20_LOGON;
- {$EXTERNALSYM PMSV1_0_LM20_LOGON}
- _MSV1_0_LM20_LOGON = record
- MessageType: MSV1_0_LOGON_SUBMIT_TYPE;
- LogonDomainName: UNICODE_STRING;
- UserName: UNICODE_STRING;
- Workstation: UNICODE_STRING;
- ChallengeToClient: array [0..MSV1_0_CHALLENGE_LENGTH - 1] of UCHAR;
- CaseSensitiveChallengeResponse: STRING;
- CaseInsensitiveChallengeResponse: STRING;
- ParameterControl: ULONG;
- end;
- {$EXTERNALSYM _MSV1_0_LM20_LOGON}
- MSV1_0_LM20_LOGON = _MSV1_0_LM20_LOGON;
- {$EXTERNALSYM MSV1_0_LM20_LOGON}
- TMsv10Lm20Logon = MSV1_0_LM20_LOGON;
- PMsv10Lm20Logon = PMSV1_0_LM20_LOGON;
-
-//
-// NT 5.0 SubAuth dlls can use this struct
-//
-
- PMSV1_0_SUBAUTH_LOGON = ^MSV1_0_SUBAUTH_LOGON;
- {$EXTERNALSYM PMSV1_0_SUBAUTH_LOGON}
- _MSV1_0_SUBAUTH_LOGON = record
- MessageType: MSV1_0_LOGON_SUBMIT_TYPE;
- LogonDomainName: UNICODE_STRING;
- UserName: UNICODE_STRING;
- Workstation: UNICODE_STRING;
- ChallengeToClient: array [0..MSV1_0_CHALLENGE_LENGTH - 1] of UCHAR;
- AuthenticationInfo1: STRING;
- AuthenticationInfo2: STRING;
- ParameterControl: ULONG;
- SubAuthPackageId: ULONG;
- end;
- {$EXTERNALSYM _MSV1_0_SUBAUTH_LOGON}
- MSV1_0_SUBAUTH_LOGON = _MSV1_0_SUBAUTH_LOGON;
- {$EXTERNALSYM MSV1_0_SUBAUTH_LOGON}
- TMsv10SubauthLogon = MSV1_0_SUBAUTH_LOGON;
- PMsv10SubauthLogon = PMSV1_0_SUBAUTH_LOGON;
-
-//
-// Values for UserFlags.
-//
-
-const
- LOGON_GUEST = $01;
- {$EXTERNALSYM LOGON_GUEST}
- LOGON_NOENCRYPTION = $02;
- {$EXTERNALSYM LOGON_NOENCRYPTION}
- LOGON_CACHED_ACCOUNT = $04;
- {$EXTERNALSYM LOGON_CACHED_ACCOUNT}
- LOGON_USED_LM_PASSWORD = $08;
- {$EXTERNALSYM LOGON_USED_LM_PASSWORD}
- LOGON_EXTRA_SIDS = $20;
- {$EXTERNALSYM LOGON_EXTRA_SIDS}
- LOGON_SUBAUTH_SESSION_KEY = $40;
- {$EXTERNALSYM LOGON_SUBAUTH_SESSION_KEY}
- LOGON_SERVER_TRUST_ACCOUNT = $80;
- {$EXTERNALSYM LOGON_SERVER_TRUST_ACCOUNT}
- LOGON_NTLMV2_ENABLED = $100; // says DC understands NTLMv2
- {$EXTERNALSYM LOGON_NTLMV2_ENABLED}
- LOGON_RESOURCE_GROUPS = $200;
- {$EXTERNALSYM LOGON_RESOURCE_GROUPS}
- LOGON_PROFILE_PATH_RETURNED = $400;
- {$EXTERNALSYM LOGON_PROFILE_PATH_RETURNED}
-
-//
-// The high order byte is reserved for return by SubAuthentication DLLs.
-//
-
- MSV1_0_SUBAUTHENTICATION_FLAGS = DWORD($FF000000);
- {$EXTERNALSYM MSV1_0_SUBAUTHENTICATION_FLAGS}
-
-// Values returned by the MSV1_0_MNS_LOGON SubAuthentication DLL
-
- LOGON_GRACE_LOGON = $01000000;
- {$EXTERNALSYM LOGON_GRACE_LOGON}
-
-type
- PMSV1_0_LM20_LOGON_PROFILE = ^MSV1_0_LM20_LOGON_PROFILE;
- {$EXTERNALSYM PMSV1_0_LM20_LOGON_PROFILE}
- _MSV1_0_LM20_LOGON_PROFILE = record
- MessageType: MSV1_0_PROFILE_BUFFER_TYPE;
- KickOffTime: LARGE_INTEGER;
- LogoffTime: LARGE_INTEGER;
- UserFlags: ULONG;
- UserSessionKey: array [0..MSV1_0_USER_SESSION_KEY_LENGTH - 1] of UCHAR;
- LogonDomainName: UNICODE_STRING;
- LanmanSessionKey: array [0..MSV1_0_LANMAN_SESSION_KEY_LENGTH - 1] of UCHAR;
- LogonServer: UNICODE_STRING;
- UserParameters: UNICODE_STRING;
- end;
- {$EXTERNALSYM _MSV1_0_LM20_LOGON_PROFILE}
- MSV1_0_LM20_LOGON_PROFILE = _MSV1_0_LM20_LOGON_PROFILE;
- {$EXTERNALSYM MSV1_0_LM20_LOGON_PROFILE}
- TMsv10Lm20LogonProfile = MSV1_0_LM20_LOGON_PROFILE;
- PMsv10Lm20LogonProfile = PMSV1_0_LM20_LOGON_PROFILE;
-
-//
-// Supplemental credentials structure used for passing credentials into
-// MSV1_0 from other packages
-//
-
-const
- MSV1_0_OWF_PASSWORD_LENGTH = 16;
- {$EXTERNALSYM MSV1_0_OWF_PASSWORD_LENGTH}
- MSV1_0_CRED_LM_PRESENT = $1;
- {$EXTERNALSYM MSV1_0_CRED_LM_PRESENT}
- MSV1_0_CRED_NT_PRESENT = $2;
- {$EXTERNALSYM MSV1_0_CRED_NT_PRESENT}
- MSV1_0_CRED_VERSION = 0;
- {$EXTERNALSYM MSV1_0_CRED_VERSION}
-
-type
- PMSV1_0_SUPPLEMENTAL_CREDENTIAL = ^MSV1_0_SUPPLEMENTAL_CREDENTIAL;
- {$EXTERNALSYM PMSV1_0_SUPPLEMENTAL_CREDENTIAL}
- _MSV1_0_SUPPLEMENTAL_CREDENTIAL = record
- Version: ULONG;
- Flags: ULONG;
- LmPassword: array [0..MSV1_0_OWF_PASSWORD_LENGTH - 1] of UCHAR;
- NtPassword: array [0..MSV1_0_OWF_PASSWORD_LENGTH - 1] of UCHAR;
- end;
- {$EXTERNALSYM _MSV1_0_SUPPLEMENTAL_CREDENTIAL}
- MSV1_0_SUPPLEMENTAL_CREDENTIAL = _MSV1_0_SUPPLEMENTAL_CREDENTIAL;
- {$EXTERNALSYM MSV1_0_SUPPLEMENTAL_CREDENTIAL}
- TMsv10SupplementalCredential = MSV1_0_SUPPLEMENTAL_CREDENTIAL;
- PMsv10SupplementalCredential = PMSV1_0_SUPPLEMENTAL_CREDENTIAL;
-
-//
-// NTLM3 definitions.
-//
-
-const
- MSV1_0_NTLM3_RESPONSE_LENGTH = 16;
- {$EXTERNALSYM MSV1_0_NTLM3_RESPONSE_LENGTH}
- MSV1_0_NTLM3_OWF_LENGTH = 16;
- {$EXTERNALSYM MSV1_0_NTLM3_OWF_LENGTH}
-
-//
-// this is the longest amount of time we'll allow challenge response
-// pairs to be used. Note that this also has to allow for worst case clock skew
-//
-
- MSV1_0_MAX_NTLM3_LIFE = 129600; // 36 hours (in seconds)
- {$EXTERNALSYM MSV1_0_MAX_NTLM3_LIFE}
- MSV1_0_MAX_AVL_SIZE = 64000;
- {$EXTERNALSYM MSV1_0_MAX_AVL_SIZE}
-
-//
-// MsvAvFlags bit values
-//
-
- MSV1_0_AV_FLAG_FORCE_GUEST = $00000001;
- {$EXTERNALSYM MSV1_0_AV_FLAG_FORCE_GUEST}
-
-// this is an MSV1_0 private data structure, defining the layout of an NTLM3 response, as sent by a
-// client in the NtChallengeResponse field of the NETLOGON_NETWORK_INFO structure. If can be differentiated
-// from an old style NT response by its length. This is crude, but it needs to pass through servers and
-// the servers' DCs that do not understand NTLM3 but that are willing to pass longer responses.
-
-type
- PMSV1_0_NTLM3_RESPONSE = ^MSV1_0_NTLM3_RESPONSE;
- {$EXTERNALSYM PMSV1_0_NTLM3_RESPONSE}
- _MSV1_0_NTLM3_RESPONSE = record
- Response: array [0..MSV1_0_NTLM3_RESPONSE_LENGTH - 1] of UCHAR; // hash of OWF of password with all the following fields
- RespType: UCHAR; // id number of response; current is 1
- HiRespType: UCHAR; // highest id number understood by client
- Flags: USHORT; // reserved; must be sent as zero at this version
- MsgWord: ULONG; // 32 bit message from client to server (for use by auth protocol)
- TimeStamp: ULONGLONG; // time stamp when client generated response -- NT system time, quad part
- ChallengeFromClient: array [0..MSV1_0_CHALLENGE_LENGTH - 1] of UCHAR;
- AvPairsOff: ULONG; // offset to start of AvPairs (to allow future expansion)
- Buffer: array [0..0] of UCHAR; // start of buffer with AV pairs (or future stuff -- so use the offset)
- end;
- {$EXTERNALSYM _MSV1_0_NTLM3_RESPONSE}
- MSV1_0_NTLM3_RESPONSE = _MSV1_0_NTLM3_RESPONSE;
- {$EXTERNALSYM MSV1_0_NTLM3_RESPONSE}
- TMsv10Ntlm3Response = MSV1_0_NTLM3_RESPONSE;
- PMsv10Ntlm3Response = PMSV1_0_NTLM3_RESPONSE;
-
-const
- MSV1_0_NTLM3_INPUT_LENGTH = SizeOf(MSV1_0_NTLM3_RESPONSE) - MSV1_0_NTLM3_RESPONSE_LENGTH;
- {$EXTERNALSYM MSV1_0_NTLM3_INPUT_LENGTH}
- //todo MSV1_0_NTLM3_MIN_NT_RESPONSE_LENGTH = RTL_SIZEOF_THROUGH_FIELD(MSV1_0_NTLM3_RESPONSE, AvPairsOff)
- //{$EXTERNALSYM MSV1_0_NTLM3_MIN_NT_RESPONSE_LENGTH}
-
-type
- MSV1_0_AVID = (
- MsvAvEOL, // end of list
- MsvAvNbComputerName, // server's computer name -- NetBIOS
- MsvAvNbDomainName, // server's domain name -- NetBIOS
- MsvAvDnsComputerName, // server's computer name -- DNS
- MsvAvDnsDomainName, // server's domain name -- DNS
- MsvAvDnsTreeName, // server's tree name -- DNS
- MsvAvFlags); // server's extended flags -- DWORD mask
- {$EXTERNALSYM MSV1_0_AVID}
-
- PMSV1_0_AV_PAIR = ^MSV1_0_AV_PAIR;
- {$EXTERNALSYM PMSV1_0_AV_PAIR}
- _MSV1_0_AV_PAIR = record
- AvId: USHORT;
- AvLen: USHORT;
- // Data is treated as byte array following structure
- end;
- {$EXTERNALSYM _MSV1_0_AV_PAIR}
- MSV1_0_AV_PAIR = _MSV1_0_AV_PAIR;
- {$EXTERNALSYM MSV1_0_AV_PAIR}
- TMsv10AvPair = MSV1_0_AV_PAIR;
- PMsv10AvPair = PMSV1_0_AV_PAIR;
-
-///////////////////////////////////////////////////////////////////////////////
-// //
-// CALL PACKAGE Related Data Structures //
-// //
-///////////////////////////////////////////////////////////////////////////////
-
-//
-// MSV1.0 LsaCallAuthenticationPackage() submission and response
-// message types.
-//
-
- _MSV1_0_PROTOCOL_MESSAGE_TYPE = (
- MsV1_0Lm20ChallengeRequest, // Both submission and response
- MsV1_0Lm20GetChallengeResponse, // Both submission and response
- MsV1_0EnumerateUsers, // Both submission and response
- MsV1_0GetUserInfo, // Both submission and response
- MsV1_0ReLogonUsers, // Submission only
- MsV1_0ChangePassword, // Both submission and response
- MsV1_0ChangeCachedPassword, // Both submission and response
- MsV1_0GenericPassthrough, // Both submission and response
- MsV1_0CacheLogon, // Submission only, no response
- MsV1_0SubAuth, // Both submission and response
- MsV1_0DeriveCredential, // Both submission and response
- MsV1_0CacheLookup, // Both submission and response
- MsV1_0SetProcessOption); // Submission only, no response
- {$EXTERNALSYM _MSV1_0_PROTOCOL_MESSAGE_TYPE}
- MSV1_0_PROTOCOL_MESSAGE_TYPE = _MSV1_0_PROTOCOL_MESSAGE_TYPE;
- {$EXTERNALSYM MSV1_0_PROTOCOL_MESSAGE_TYPE}
- PMSV1_0_PROTOCOL_MESSAGE_TYPE = ^MSV1_0_PROTOCOL_MESSAGE_TYPE;
- {$EXTERNALSYM PMSV1_0_PROTOCOL_MESSAGE_TYPE}
- TMsv1_0ProtocolMessageType = MSV1_0_PROTOCOL_MESSAGE_TYPE;
- PMsv1_0ProtocolMessageType = PMSV1_0_PROTOCOL_MESSAGE_TYPE;
-
- PMSV1_0_CHANGEPASSWORD_REQUEST = ^MSV1_0_CHANGEPASSWORD_REQUEST;
- {$EXTERNALSYM PMSV1_0_CHANGEPASSWORD_REQUEST}
- _MSV1_0_CHANGEPASSWORD_REQUEST = record
- MessageType: MSV1_0_PROTOCOL_MESSAGE_TYPE;
- DomainName: UNICODE_STRING;
- AccountName: UNICODE_STRING;
- OldPassword: UNICODE_STRING;
- NewPassword: UNICODE_STRING;
- Impersonating: ByteBool;
- end;
- {$EXTERNALSYM _MSV1_0_CHANGEPASSWORD_REQUEST}
- MSV1_0_CHANGEPASSWORD_REQUEST = _MSV1_0_CHANGEPASSWORD_REQUEST;
- {$EXTERNALSYM MSV1_0_CHANGEPASSWORD_REQUEST}
- TMsv10ChangepasswordRequest = MSV1_0_CHANGEPASSWORD_REQUEST;
- PMsv10ChangepasswordRequest = PMSV1_0_CHANGEPASSWORD_REQUEST;
-
- PMSV1_0_CHANGEPASSWORD_RESPONSE = ^MSV1_0_CHANGEPASSWORD_RESPONSE;
- {$EXTERNALSYM PMSV1_0_CHANGEPASSWORD_RESPONSE}
- _MSV1_0_CHANGEPASSWORD_RESPONSE = record
- MessageType: MSV1_0_PROTOCOL_MESSAGE_TYPE;
- PasswordInfoValid: ByteBool;
- DomainPasswordInfo: DOMAIN_PASSWORD_INFORMATION;
- end;
- {$EXTERNALSYM _MSV1_0_CHANGEPASSWORD_RESPONSE}
- MSV1_0_CHANGEPASSWORD_RESPONSE = _MSV1_0_CHANGEPASSWORD_RESPONSE;
- {$EXTERNALSYM MSV1_0_CHANGEPASSWORD_RESPONSE}
- TMsv10ChangepasswordResponse = MSV1_0_CHANGEPASSWORD_RESPONSE;
- PMsv10ChangepasswordResponse = PMSV1_0_CHANGEPASSWORD_RESPONSE;
-
-//
-// MsV1_0GenericPassthrough - for remoting a CallPackage to
-// a domain controller on the specified domain
-//
-
- _MSV1_0_PASSTHROUGH_REQUEST = record
- MessageType: MSV1_0_PROTOCOL_MESSAGE_TYPE;
- DomainName: UNICODE_STRING;
- PackageName: UNICODE_STRING;
- DataLength: ULONG;
- LogonData: PUCHAR;
- Pad: ULONG;
- end;
- {$EXTERNALSYM _MSV1_0_PASSTHROUGH_REQUEST}
- MSV1_0_PASSTHROUGH_REQUEST = _MSV1_0_PASSTHROUGH_REQUEST;
- {$EXTERNALSYM MSV1_0_PASSTHROUGH_REQUEST}
- PMSV1_0_PASSTHROUGH_REQUEST = ^MSV1_0_PASSTHROUGH_REQUEST;
- {$EXTERNALSYM PMSV1_0_PASSTHROUGH_REQUEST}
- TMsv10PassThroughRequest = MSV1_0_PASSTHROUGH_REQUEST;
- PMsv10PassThroughRequest = PMSV1_0_PASSTHROUGH_REQUEST;
-
- _MSV1_0_PASSTHROUGH_RESPONSE = record
- MessageType: MSV1_0_PROTOCOL_MESSAGE_TYPE;
- Pad: ULONG;
- DataLength: ULONG;
- ValidationData: PUCHAR;
- end;
- {$EXTERNALSYM _MSV1_0_PASSTHROUGH_RESPONSE}
- MSV1_0_PASSTHROUGH_RESPONSE = _MSV1_0_PASSTHROUGH_RESPONSE;
- {$EXTERNALSYM MSV1_0_PASSTHROUGH_RESPONSE}
- PMSV1_0_PASSTHROUGH_RESPONSE = ^MSV1_0_PASSTHROUGH_RESPONSE;
- {$EXTERNALSYM PMSV1_0_PASSTHROUGH_RESPONSE}
- TMsv10PassThroughResponse = MSV1_0_PASSTHROUGH_RESPONSE;
- PMsv10PassThroughResponse = PMSV1_0_PASSTHROUGH_RESPONSE;
-
-//
-// MsV1_0SubAuthInfo submit buffer and response - for submitting a buffer to a
-// specified Subauthentication Package during an LsaCallAuthenticationPackage().
-// If this Subauthentication is to be done locally, then package this message
-// in LsaCallAuthenticationPackage(). If this SubAuthentication needs to be done
-// on the domain controller, then call LsaCallauthenticationPackage with the
-// message type being MsV1_0GenericPassThrough and the LogonData in this struct
-// should be a PMSV1_0_SUBAUTH_REQUEST
-//
-
- PMSV1_0_SUBAUTH_REQUEST = ^MSV1_0_SUBAUTH_REQUEST;
- {$EXTERNALSYM PMSV1_0_SUBAUTH_REQUEST}
- _MSV1_0_SUBAUTH_REQUEST = record
- MessageType: MSV1_0_PROTOCOL_MESSAGE_TYPE;
- SubAuthPackageId: ULONG;
- SubAuthInfoLength: ULONG;
- SubAuthSubmitBuffer: PUCHAR;
- end;
- {$EXTERNALSYM _MSV1_0_SUBAUTH_REQUEST}
- MSV1_0_SUBAUTH_REQUEST = _MSV1_0_SUBAUTH_REQUEST;
- {$EXTERNALSYM MSV1_0_SUBAUTH_REQUEST}
- TMsv10SubauthRequest = MSV1_0_SUBAUTH_REQUEST;
- PMsv10SubauthRequest = PMSV1_0_SUBAUTH_REQUEST;
-
- PMSV1_0_SUBAUTH_RESPONSE = ^MSV1_0_SUBAUTH_RESPONSE;
- {$EXTERNALSYM PMSV1_0_SUBAUTH_RESPONSE}
- _MSV1_0_SUBAUTH_RESPONSE = record
- MessageType: MSV1_0_PROTOCOL_MESSAGE_TYPE;
- SubAuthInfoLength: ULONG;
- SubAuthReturnBuffer: PUCHAR;
- end;
- {$EXTERNALSYM _MSV1_0_SUBAUTH_RESPONSE}
- MSV1_0_SUBAUTH_RESPONSE = _MSV1_0_SUBAUTH_RESPONSE;
- {$EXTERNALSYM MSV1_0_SUBAUTH_RESPONSE}
- TMsv10SubauthResponse = MSV1_0_SUBAUTH_RESPONSE;
- PMsv10SubauthResponse = PMSV1_0_SUBAUTH_RESPONSE;
-
-//
-// Credential Derivation types for MsV1_0DeriveCredential Submit DeriveCredType
-//
-
-//
-// Derive Credential using SHA-1 and Request buffer DeriveCredSubmitBuffer of
-// length DeriveCredInfoLength mixing bytes.
-// Response buffer DeriveCredReturnBuffer will contain SHA-1 hash of size
-// A_SHA_DIGEST_LEN (20)
-//
-
-const
- MSV1_0_DERIVECRED_TYPE_SHA1 = 0;
- {$EXTERNALSYM MSV1_0_DERIVECRED_TYPE_SHA1}
-
-//
-// MsV1_0DeriveCredential submit buffer and response - for submitting a buffer
-// an call to LsaCallAuthenticationPackage().
-//
-
-type
- PMSV1_0_DERIVECRED_REQUEST = ^MSV1_0_DERIVECRED_REQUEST;
- {$EXTERNALSYM PMSV1_0_DERIVECRED_REQUEST}
- _MSV1_0_DERIVECRED_REQUEST = record
- MessageType: MSV1_0_PROTOCOL_MESSAGE_TYPE;
- LogonId: LUID;
- DeriveCredType: ULONG;
- DeriveCredInfoLength: ULONG;
- DeriveCredSubmitBuffer: array [0..0] of UCHAR; // in-place array of length DeriveCredInfoLength
- end;
- {$EXTERNALSYM _MSV1_0_DERIVECRED_REQUEST}
- MSV1_0_DERIVECRED_REQUEST = _MSV1_0_DERIVECRED_REQUEST;
- {$EXTERNALSYM MSV1_0_DERIVECRED_REQUEST}
- TMsv10DeriveCredRequest = MSV1_0_DERIVECRED_REQUEST;
- PMsv10DeriveCredRequest = PMSV1_0_DERIVECRED_REQUEST;
-
- PMSV1_0_DERIVECRED_RESPONSE = ^MSV1_0_DERIVECRED_RESPONSE;
- {$EXTERNALSYM PMSV1_0_DERIVECRED_RESPONSE}
- _MSV1_0_DERIVECRED_RESPONSE = record
- MessageType: MSV1_0_PROTOCOL_MESSAGE_TYPE;
- DeriveCredInfoLength: ULONG;
- DeriveCredReturnBuffer: array [0..0] of UCHAR; // in-place array of length DeriveCredInfoLength
- end;
- {$EXTERNALSYM _MSV1_0_DERIVECRED_RESPONSE}
- MSV1_0_DERIVECRED_RESPONSE = _MSV1_0_DERIVECRED_RESPONSE;
- {$EXTERNALSYM MSV1_0_DERIVECRED_RESPONSE}
- TMsv10DeriveCredResponse = MSV1_0_DERIVECRED_RESPONSE;
- PMsv10DeriveCredResponse = PMSV1_0_DERIVECRED_RESPONSE;
-
-// Revision of the Kerberos Protocol. MS uses Version 5, Revision 6
-
-const
- KERBEROS_VERSION = 5;
- {$EXTERNALSYM KERBEROS_VERSION}
- KERBEROS_REVISION = 6;
- {$EXTERNALSYM KERBEROS_REVISION}
-
-// Encryption Types:
-// These encryption types are supported by the default MS KERBSUPP DLL
-// as crypto systems. Values over 127 are local values, and may be changed
-// without notice.
-
- KERB_ETYPE_NULL = 0;
- {$EXTERNALSYM KERB_ETYPE_NULL}
- KERB_ETYPE_DES_CBC_CRC = 1;
- {$EXTERNALSYM KERB_ETYPE_DES_CBC_CRC}
- KERB_ETYPE_DES_CBC_MD4 = 2;
- {$EXTERNALSYM KERB_ETYPE_DES_CBC_MD4}
- KERB_ETYPE_DES_CBC_MD5 = 3;
- {$EXTERNALSYM KERB_ETYPE_DES_CBC_MD5}
-
- KERB_ETYPE_RC4_MD4 = -128;
- {$EXTERNALSYM KERB_ETYPE_RC4_MD4}
- KERB_ETYPE_RC4_PLAIN2 = -129;
- {$EXTERNALSYM KERB_ETYPE_RC4_PLAIN2}
- KERB_ETYPE_RC4_LM = -130;
- {$EXTERNALSYM KERB_ETYPE_RC4_LM}
- KERB_ETYPE_RC4_SHA = -131;
- {$EXTERNALSYM KERB_ETYPE_RC4_SHA}
- KERB_ETYPE_DES_PLAIN = -132;
- {$EXTERNALSYM KERB_ETYPE_DES_PLAIN}
- KERB_ETYPE_RC4_HMAC_OLD = -133;
- {$EXTERNALSYM KERB_ETYPE_RC4_HMAC_OLD}
- KERB_ETYPE_RC4_PLAIN_OLD = -134;
- {$EXTERNALSYM KERB_ETYPE_RC4_PLAIN_OLD}
- KERB_ETYPE_RC4_HMAC_OLD_EXP = -135;
- {$EXTERNALSYM KERB_ETYPE_RC4_HMAC_OLD_EXP}
- KERB_ETYPE_RC4_PLAIN_OLD_EXP = -136;
- {$EXTERNALSYM KERB_ETYPE_RC4_PLAIN_OLD_EXP}
- KERB_ETYPE_RC4_PLAIN = -140;
- {$EXTERNALSYM KERB_ETYPE_RC4_PLAIN}
- KERB_ETYPE_RC4_PLAIN_EXP = -141;
- {$EXTERNALSYM KERB_ETYPE_RC4_PLAIN_EXP}
-
-//
-// Pkinit encryption types
-//
-
- KERB_ETYPE_DSA_SHA1_CMS = 9;
- {$EXTERNALSYM KERB_ETYPE_DSA_SHA1_CMS}
- KERB_ETYPE_RSA_MD5_CMS = 10;
- {$EXTERNALSYM KERB_ETYPE_RSA_MD5_CMS}
- KERB_ETYPE_RSA_SHA1_CMS = 11;
- {$EXTERNALSYM KERB_ETYPE_RSA_SHA1_CMS}
- KERB_ETYPE_RC2_CBC_ENV = 12;
- {$EXTERNALSYM KERB_ETYPE_RC2_CBC_ENV}
- KERB_ETYPE_RSA_ENV = 13;
- {$EXTERNALSYM KERB_ETYPE_RSA_ENV}
- KERB_ETYPE_RSA_ES_OEAP_ENV = 14;
- {$EXTERNALSYM KERB_ETYPE_RSA_ES_OEAP_ENV}
- KERB_ETYPE_DES_EDE3_CBC_ENV = 15;
- {$EXTERNALSYM KERB_ETYPE_DES_EDE3_CBC_ENV}
-
-//
-// Deprecated
-//
-
- KERB_ETYPE_DSA_SIGN = 8;
- {$EXTERNALSYM KERB_ETYPE_DSA_SIGN}
- KERB_ETYPE_RSA_PRIV = 9;
- {$EXTERNALSYM KERB_ETYPE_RSA_PRIV}
- KERB_ETYPE_RSA_PUB = 10;
- {$EXTERNALSYM KERB_ETYPE_RSA_PUB}
- KERB_ETYPE_RSA_PUB_MD5 = 11;
- {$EXTERNALSYM KERB_ETYPE_RSA_PUB_MD5}
- KERB_ETYPE_RSA_PUB_SHA1 = 12;
- {$EXTERNALSYM KERB_ETYPE_RSA_PUB_SHA1}
- KERB_ETYPE_PKCS7_PUB = 13;
- {$EXTERNALSYM KERB_ETYPE_PKCS7_PUB}
-
-//
-// Unsupported but defined types
-//
-
- KERB_ETYPE_DES3_CBC_MD5 = 5;
- {$EXTERNALSYM KERB_ETYPE_DES3_CBC_MD5}
- KERB_ETYPE_DES3_CBC_SHA1 = 7;
- {$EXTERNALSYM KERB_ETYPE_DES3_CBC_SHA1}
- KERB_ETYPE_DES3_CBC_SHA1_KD = 16;
- {$EXTERNALSYM KERB_ETYPE_DES3_CBC_SHA1_KD}
-
-//
-// In use types
-//
-
- KERB_ETYPE_DES_CBC_MD5_NT = 20;
- {$EXTERNALSYM KERB_ETYPE_DES_CBC_MD5_NT}
- KERB_ETYPE_RC4_HMAC_NT = 23;
- {$EXTERNALSYM KERB_ETYPE_RC4_HMAC_NT}
- KERB_ETYPE_RC4_HMAC_NT_EXP = 24;
- {$EXTERNALSYM KERB_ETYPE_RC4_HMAC_NT_EXP}
-
-// Checksum algorithms.
-// These algorithms are keyed internally for our use.
-
- KERB_CHECKSUM_NONE = 0;
- {$EXTERNALSYM KERB_CHECKSUM_NONE}
- KERB_CHECKSUM_CRC32 = 1;
- {$EXTERNALSYM KERB_CHECKSUM_CRC32}
- KERB_CHECKSUM_MD4 = 2;
- {$EXTERNALSYM KERB_CHECKSUM_MD4}
- KERB_CHECKSUM_KRB_DES_MAC = 4;
- {$EXTERNALSYM KERB_CHECKSUM_KRB_DES_MAC}
- KERB_CHECKSUM_KRB_DES_MAC_K = 5;
- {$EXTERNALSYM KERB_CHECKSUM_KRB_DES_MAC_K}
- KERB_CHECKSUM_MD5 = 7;
- {$EXTERNALSYM KERB_CHECKSUM_MD5}
- KERB_CHECKSUM_MD5_DES = 8;
- {$EXTERNALSYM KERB_CHECKSUM_MD5_DES}
-
- KERB_CHECKSUM_LM = -130;
- {$EXTERNALSYM KERB_CHECKSUM_LM}
- KERB_CHECKSUM_SHA1 = -131;
- {$EXTERNALSYM KERB_CHECKSUM_SHA1}
- KERB_CHECKSUM_REAL_CRC32 = -132;
- {$EXTERNALSYM KERB_CHECKSUM_REAL_CRC32}
- KERB_CHECKSUM_DES_MAC = -133;
- {$EXTERNALSYM KERB_CHECKSUM_DES_MAC}
- KERB_CHECKSUM_DES_MAC_MD5 = -134;
- {$EXTERNALSYM KERB_CHECKSUM_DES_MAC_MD5}
- KERB_CHECKSUM_MD25 = -135;
- {$EXTERNALSYM KERB_CHECKSUM_MD25}
- KERB_CHECKSUM_RC4_MD5 = -136;
- {$EXTERNALSYM KERB_CHECKSUM_RC4_MD5}
- KERB_CHECKSUM_MD5_HMAC = -137; // used by netlogon
- {$EXTERNALSYM KERB_CHECKSUM_MD5_HMAC}
- KERB_CHECKSUM_HMAC_MD5 = -138; // used by Kerberos
- {$EXTERNALSYM KERB_CHECKSUM_HMAC_MD5}
-
- AUTH_REQ_ALLOW_FORWARDABLE = $00000001;
- {$EXTERNALSYM AUTH_REQ_ALLOW_FORWARDABLE}
- AUTH_REQ_ALLOW_PROXIABLE = $00000002;
- {$EXTERNALSYM AUTH_REQ_ALLOW_PROXIABLE}
- AUTH_REQ_ALLOW_POSTDATE = $00000004;
- {$EXTERNALSYM AUTH_REQ_ALLOW_POSTDATE}
- AUTH_REQ_ALLOW_RENEWABLE = $00000008;
- {$EXTERNALSYM AUTH_REQ_ALLOW_RENEWABLE}
- AUTH_REQ_ALLOW_NOADDRESS = $00000010;
- {$EXTERNALSYM AUTH_REQ_ALLOW_NOADDRESS}
- AUTH_REQ_ALLOW_ENC_TKT_IN_SKEY = $00000020;
- {$EXTERNALSYM AUTH_REQ_ALLOW_ENC_TKT_IN_SKEY}
- AUTH_REQ_ALLOW_VALIDATE = $00000040;
- {$EXTERNALSYM AUTH_REQ_ALLOW_VALIDATE}
- AUTH_REQ_VALIDATE_CLIENT = $00000080;
- {$EXTERNALSYM AUTH_REQ_VALIDATE_CLIENT}
- AUTH_REQ_OK_AS_DELEGATE = $00000100;
- {$EXTERNALSYM AUTH_REQ_OK_AS_DELEGATE}
- AUTH_REQ_PREAUTH_REQUIRED = $00000200;
- {$EXTERNALSYM AUTH_REQ_PREAUTH_REQUIRED}
- AUTH_REQ_TRANSITIVE_TRUST = $00000400;
- {$EXTERNALSYM AUTH_REQ_TRANSITIVE_TRUST}
- AUTH_REQ_ALLOW_S4U_DELEGATE = $00000800;
- {$EXTERNALSYM AUTH_REQ_ALLOW_S4U_DELEGATE}
-
- AUTH_REQ_PER_USER_FLAGS = (AUTH_REQ_ALLOW_FORWARDABLE or
- AUTH_REQ_ALLOW_PROXIABLE or
- AUTH_REQ_ALLOW_POSTDATE or
- AUTH_REQ_ALLOW_RENEWABLE or
- AUTH_REQ_ALLOW_VALIDATE);
- {$EXTERNALSYM AUTH_REQ_PER_USER_FLAGS}
-
-//
-// Ticket Flags:
-//
-
- KERB_TICKET_FLAGS_reserved = DWORD($80000000);
- {$EXTERNALSYM KERB_TICKET_FLAGS_reserved}
- KERB_TICKET_FLAGS_forwardable = $40000000;
- {$EXTERNALSYM KERB_TICKET_FLAGS_forwardable}
- KERB_TICKET_FLAGS_forwarded = $20000000;
- {$EXTERNALSYM KERB_TICKET_FLAGS_forwarded}
- KERB_TICKET_FLAGS_proxiable = $10000000;
- {$EXTERNALSYM KERB_TICKET_FLAGS_proxiable}
- KERB_TICKET_FLAGS_proxy = $08000000;
- {$EXTERNALSYM KERB_TICKET_FLAGS_proxy}
- KERB_TICKET_FLAGS_may_postdate = $04000000;
- {$EXTERNALSYM KERB_TICKET_FLAGS_may_postdate}
- KERB_TICKET_FLAGS_postdated = $02000000;
- {$EXTERNALSYM KERB_TICKET_FLAGS_postdated}
- KERB_TICKET_FLAGS_invalid = $01000000;
- {$EXTERNALSYM KERB_TICKET_FLAGS_invalid}
- KERB_TICKET_FLAGS_renewable = $00800000;
- {$EXTERNALSYM KERB_TICKET_FLAGS_renewable}
- KERB_TICKET_FLAGS_initial = $00400000;
- {$EXTERNALSYM KERB_TICKET_FLAGS_initial}
- KERB_TICKET_FLAGS_pre_authent = $00200000;
- {$EXTERNALSYM KERB_TICKET_FLAGS_pre_authent}
- KERB_TICKET_FLAGS_hw_authent = $00100000;
- {$EXTERNALSYM KERB_TICKET_FLAGS_hw_authent}
- KERB_TICKET_FLAGS_ok_as_delegate = $00040000;
- {$EXTERNALSYM KERB_TICKET_FLAGS_ok_as_delegate}
- KERB_TICKET_FLAGS_name_canonicalize = $00010000;
- {$EXTERNALSYM KERB_TICKET_FLAGS_name_canonicalize}
- KERB_TICKET_FLAGS_reserved1 = $00000001;
- {$EXTERNALSYM KERB_TICKET_FLAGS_reserved1}
-
-//
-// Name types
-//
-
- KRB_NT_UNKNOWN = 0; // Name type not known
- {$EXTERNALSYM KRB_NT_UNKNOWN}
- KRB_NT_PRINCIPAL = 1; // Just the name of the principal as in DCE, or for users
- {$EXTERNALSYM KRB_NT_PRINCIPAL}
- KRB_NT_PRINCIPAL_AND_ID = -131; // Name of the principal and its SID.
- {$EXTERNALSYM KRB_NT_PRINCIPAL_AND_ID}
- KRB_NT_SRV_INST = 2; // Service and other unique instance (krbtgt)
- {$EXTERNALSYM KRB_NT_SRV_INST}
- KRB_NT_SRV_INST_AND_ID = -132; // SPN and SID
- {$EXTERNALSYM KRB_NT_SRV_INST_AND_ID}
- KRB_NT_SRV_HST = 3; // Service with host name as instance (telnet, rcommands)
- {$EXTERNALSYM KRB_NT_SRV_HST}
- KRB_NT_SRV_XHST = 4; // Service with host as remaining components
- {$EXTERNALSYM KRB_NT_SRV_XHST}
- KRB_NT_UID = 5; // Unique ID
- {$EXTERNALSYM KRB_NT_UID}
- KRB_NT_ENTERPRISE_PRINCIPAL = 10; // UPN or SPN
- {$EXTERNALSYM KRB_NT_ENTERPRISE_PRINCIPAL}
- KRB_NT_ENT_PRINCIPAL_AND_ID = -130; // UPN and SID
- {$EXTERNALSYM KRB_NT_ENT_PRINCIPAL_AND_ID}
-
-//
-// MS extensions, negative according to the RFC
-//
-
- KRB_NT_MS_PRINCIPAL = -128; // NT4 style name
- {$EXTERNALSYM KRB_NT_MS_PRINCIPAL}
-
- KRB_NT_MS_PRINCIPAL_AND_ID = -129; // nt4 style name with sid
- {$EXTERNALSYM KRB_NT_MS_PRINCIPAL_AND_ID}
-
-// todo #define KERB_IS_MS_PRINCIPAL(_x_) (((_x_) <= KRB_NT_MS_PRINCIPAL) || ((_x_) >= KRB_NT_ENTERPRISE_PRINCIPAL))
-
- MICROSOFT_KERBEROS_NAME_A = 'Kerberos';
- {$EXTERNALSYM MICROSOFT_KERBEROS_NAME_A}
- MICROSOFT_KERBEROS_NAME_W = WideString('Kerberos');
- {$EXTERNALSYM MICROSOFT_KERBEROS_NAME_W}
-
- {$IFDEF UNICODE}
- MICROSOFT_KERBEROS_NAME = MICROSOFT_KERBEROS_NAME_W;
- {$EXTERNALSYM MICROSOFT_KERBEROS_NAME}
- {$ELSE}
- MICROSOFT_KERBEROS_NAME = MICROSOFT_KERBEROS_NAME_A;
- {$EXTERNALSYM MICROSOFT_KERBEROS_NAME}
- {$ENDIF UNICODE}
-
-/////////////////////////////////////////////////////////////////////////
-//
-// Quality of protection parameters for MakeSignature / EncryptMessage
-//
-/////////////////////////////////////////////////////////////////////////
-
-//
-// This flag indicates to EncryptMessage that the message is not to actually
-// be encrypted, but a header/trailer are to be produced.
-//
-
- KERB_WRAP_NO_ENCRYPT = DWORD($80000001);
- {$EXTERNALSYM KERB_WRAP_NO_ENCRYPT}
-
-/////////////////////////////////////////////////////////////////////////
-//
-// LsaLogonUser parameters
-//
-/////////////////////////////////////////////////////////////////////////
-
-const
- KerbInteractiveLogon = 2;
- KerbSmartCardLogon = 6;
- KerbWorkstationUnlockLogon = 7;
- KerbSmartCardUnlockLogon = 8;
- KerbProxyLogon = 9;
- KerbTicketLogon = 10;
- KerbTicketUnlockLogon = 11;
- KerbS4ULogon = 12;
-
-type
- KERB_LOGON_SUBMIT_TYPE = DWORD;
- {$EXTERNALSYM KERB_LOGON_SUBMIT_TYPE}
- PKERB_LOGON_SUBMIT_TYPE = ^KERB_LOGON_SUBMIT_TYPE;
- {$EXTERNALSYM PKERB_LOGON_SUBMIT_TYPE}
-
- PKERB_INTERACTIVE_LOGON = ^KERB_INTERACTIVE_LOGON;
- {$EXTERNALSYM PKERB_INTERACTIVE_LOGON}
- _KERB_INTERACTIVE_LOGON = record
- MessageType: KERB_LOGON_SUBMIT_TYPE;
- LogonDomainName: UNICODE_STRING;
- UserName: UNICODE_STRING;
- Password: UNICODE_STRING;
- end;
- {$EXTERNALSYM _KERB_INTERACTIVE_LOGON}
- KERB_INTERACTIVE_LOGON = _KERB_INTERACTIVE_LOGON;
- {$EXTERNALSYM KERB_INTERACTIVE_LOGON}
- TKerbInteractiveLogon = KERB_INTERACTIVE_LOGON;
- PKerbInteractiveLogon = PKERB_INTERACTIVE_LOGON;
-
- PKERB_INTERACTIVE_UNLOCK_LOGON = ^KERB_INTERACTIVE_UNLOCK_LOGON;
- {$EXTERNALSYM PKERB_INTERACTIVE_UNLOCK_LOGON}
- _KERB_INTERACTIVE_UNLOCK_LOGON = record
- Logon: KERB_INTERACTIVE_LOGON;
- LogonId: LUID;
- end;
- {$EXTERNALSYM _KERB_INTERACTIVE_UNLOCK_LOGON}
- KERB_INTERACTIVE_UNLOCK_LOGON = _KERB_INTERACTIVE_UNLOCK_LOGON;
- {$EXTERNALSYM KERB_INTERACTIVE_UNLOCK_LOGON}
- TKerbInteractiveUnlockLogon = KERB_INTERACTIVE_UNLOCK_LOGON;
- PKerbInteractiveUnlockLogon = PKERB_INTERACTIVE_UNLOCK_LOGON;
-
- PKERB_SMART_CARD_LOGON = ^KERB_SMART_CARD_LOGON;
- {$EXTERNALSYM PKERB_SMART_CARD_LOGON}
- _KERB_SMART_CARD_LOGON = record
- MessageType: KERB_LOGON_SUBMIT_TYPE;
- Pin: UNICODE_STRING;
- CspDataLength: ULONG;
- CspData: PUCHAR;
- end;
- {$EXTERNALSYM _KERB_SMART_CARD_LOGON}
- KERB_SMART_CARD_LOGON = _KERB_SMART_CARD_LOGON;
- {$EXTERNALSYM KERB_SMART_CARD_LOGON}
- TKerbSmartCardLogon = KERB_SMART_CARD_LOGON;
- PKerbSmartCardLogon = PKERB_SMART_CARD_LOGON;
-
- PKERB_SMART_CARD_UNLOCK_LOGON = ^KERB_SMART_CARD_UNLOCK_LOGON;
- {$EXTERNALSYM PKERB_SMART_CARD_UNLOCK_LOGON}
- _KERB_SMART_CARD_UNLOCK_LOGON = record
- Logon: KERB_SMART_CARD_LOGON;
- LogonId: LUID;
- end;
- {$EXTERNALSYM _KERB_SMART_CARD_UNLOCK_LOGON}
- KERB_SMART_CARD_UNLOCK_LOGON = _KERB_SMART_CARD_UNLOCK_LOGON;
- {$EXTERNALSYM KERB_SMART_CARD_UNLOCK_LOGON}
- TKerbSmartCardUnlockLogon = KERB_SMART_CARD_UNLOCK_LOGON;
- PKerbSmartCardUnlockLogon = PKERB_SMART_CARD_UNLOCK_LOGON;
-
-//
-// Structure used for a ticket-only logon
-//
-
- PKERB_TICKET_LOGON = ^KERB_TICKET_LOGON;
- {$EXTERNALSYM PKERB_TICKET_LOGON}
- _KERB_TICKET_LOGON = record
- MessageType: KERB_LOGON_SUBMIT_TYPE;
- Flags: ULONG;
- ServiceTicketLength: ULONG;
- TicketGrantingTicketLength: ULONG;
- ServiceTicket: PUCHAR; // REQUIRED: Service ticket "host"
- TicketGrantingTicket: PUCHAR; // OPTIONAL: User's encdoded in a KERB_CRED message, encrypted with session key from service ticket
- end;
- {$EXTERNALSYM _KERB_TICKET_LOGON}
- KERB_TICKET_LOGON = _KERB_TICKET_LOGON;
- {$EXTERNALSYM KERB_TICKET_LOGON}
- TKerbTicketLogon = KERB_TICKET_LOGON;
- PKerbTicketLogon = PKERB_TICKET_LOGON;
-
-//
-// Flags for the ticket logon flags field
-//
-
-const
- KERB_LOGON_FLAG_ALLOW_EXPIRED_TICKET = $1;
- {$EXTERNALSYM KERB_LOGON_FLAG_ALLOW_EXPIRED_TICKET}
-
-type
- PKERB_TICKET_UNLOCK_LOGON = ^KERB_TICKET_UNLOCK_LOGON;
- {$EXTERNALSYM PKERB_TICKET_UNLOCK_LOGON}
- _KERB_TICKET_UNLOCK_LOGON = record
- Logon: KERB_TICKET_LOGON;
- LogonId: LUID;
- end;
- {$EXTERNALSYM _KERB_TICKET_UNLOCK_LOGON}
- KERB_TICKET_UNLOCK_LOGON = _KERB_TICKET_UNLOCK_LOGON;
- {$EXTERNALSYM KERB_TICKET_UNLOCK_LOGON}
- TKerbTicketUnlockLogon = KERB_TICKET_UNLOCK_LOGON;
- PKerbTicketUnlockLogon = PKERB_TICKET_UNLOCK_LOGON;
-
-//
-// Used for S4U Client requests
-//
-//
-
- _KERB_S4U_LOGON = record
- MessageType: KERB_LOGON_SUBMIT_TYPE;
- Flags: ULONG;
- ClientUpn: UNICODE_STRING; // REQUIRED: UPN for client
- ClientRealm: UNICODE_STRING; // Optional: Client Realm, if known
- end;
- {$EXTERNALSYM _KERB_S4U_LOGON}
- KERB_S4U_LOGON = _KERB_S4U_LOGON;
- {$EXTERNALSYM KERB_S4U_LOGON}
- PKERB_S4U_LOGON = ^KERB_S4U_LOGON;
- {$EXTERNALSYM PKERB_S4U_LOGON}
- TKerbS4ULogon = KERB_S4U_LOGON;
- PKerbS4ULogon = PKERB_S4U_LOGON;
-
-//
-// Use the same profile structure as MSV1_0
-//
-
-type
- _KERB_PROFILE_BUFFER_TYPE = (
- kpbtFiller0, kpbtFiller1,
- KerbInteractiveProfile,
- kpbtFiller3,
- KerbSmartCardProfile,
- kpbtFiller5,
- KerbTicketProfile);
- {$EXTERNALSYM _KERB_PROFILE_BUFFER_TYPE}
- KERB_PROFILE_BUFFER_TYPE = _KERB_PROFILE_BUFFER_TYPE;
- {$EXTERNALSYM KERB_PROFILE_BUFFER_TYPE}
- PKERB_PROFILE_BUFFER_TYPE = ^KERB_PROFILE_BUFFER_TYPE;
- {$EXTERNALSYM PKERB_PROFILE_BUFFER_TYPE}
- TKerbProfileBufferType = KERB_PROFILE_BUFFER_TYPE;
- PKerbProfileBufferType = PKERB_PROFILE_BUFFER_TYPE;
-
- PKERB_INTERACTIVE_PROFILE = ^KERB_INTERACTIVE_PROFILE;
- {$EXTERNALSYM PKERB_INTERACTIVE_PROFILE}
- _KERB_INTERACTIVE_PROFILE = record
- MessageType: KERB_PROFILE_BUFFER_TYPE;
- LogonCount: USHORT;
- BadPasswordCount: USHORT;
- LogonTime: LARGE_INTEGER;
- LogoffTime: LARGE_INTEGER;
- KickOffTime: LARGE_INTEGER;
- PasswordLastSet: LARGE_INTEGER;
- PasswordCanChange: LARGE_INTEGER;
- PasswordMustChange: LARGE_INTEGER;
- LogonScript: UNICODE_STRING;
- HomeDirectory: UNICODE_STRING;
- FullName: UNICODE_STRING;
- ProfilePath: UNICODE_STRING;
- HomeDirectoryDrive: UNICODE_STRING;
- LogonServer: UNICODE_STRING;
- UserFlags: ULONG;
- end;
- {$EXTERNALSYM _KERB_INTERACTIVE_PROFILE}
- KERB_INTERACTIVE_PROFILE = _KERB_INTERACTIVE_PROFILE;
- {$EXTERNALSYM KERB_INTERACTIVE_PROFILE}
- TKerbInteractiveProfile = KERB_INTERACTIVE_PROFILE;
- PKerbInteractiveProfile = PKERB_INTERACTIVE_PROFILE;
-
-//
-// For smart card, we return a smart card profile, which is an interactive
-// profile plus a certificate
-//
-
- PKERB_SMART_CARD_PROFILE = ^KERB_SMART_CARD_PROFILE;
- {$EXTERNALSYM PKERB_SMART_CARD_PROFILE}
- _KERB_SMART_CARD_PROFILE = record
- Profile: KERB_INTERACTIVE_PROFILE;
- CertificateSize: ULONG;
- CertificateData: PUCHAR;
- end;
- {$EXTERNALSYM _KERB_SMART_CARD_PROFILE}
- KERB_SMART_CARD_PROFILE = _KERB_SMART_CARD_PROFILE;
- {$EXTERNALSYM KERB_SMART_CARD_PROFILE}
- TKerbSmartCardProfile = KERB_SMART_CARD_PROFILE;
- PKerbSmartCardProfile = PKERB_SMART_CARD_PROFILE;
-
-//
-// For a ticket logon profile, we return the session key from the ticket
-//
-
- PKERB_CRYPTO_KEY = ^KERB_CRYPTO_KEY;
- {$EXTERNALSYM PKERB_CRYPTO_KEY}
- KERB_CRYPTO_KEY = record
- KeyType: LONG;
- Length: ULONG;
- Value: PUCHAR;
- end;
- {$EXTERNALSYM KERB_CRYPTO_KEY}
- TKerbCryptoKey = KERB_CRYPTO_KEY;
- PKerbCryptoKey = PKERB_CRYPTO_KEY;
-
- PKERB_TICKET_PROFILE = ^KERB_TICKET_PROFILE;
- {$EXTERNALSYM PKERB_TICKET_PROFILE}
- _KERB_TICKET_PROFILE = record
- Profile: KERB_INTERACTIVE_PROFILE;
- SessionKey: KERB_CRYPTO_KEY;
- end;
- {$EXTERNALSYM _KERB_TICKET_PROFILE}
- KERB_TICKET_PROFILE = _KERB_TICKET_PROFILE;
- {$EXTERNALSYM KERB_TICKET_PROFILE}
- TKerbTicketProfile = KERB_TICKET_PROFILE;
- PKerbTicketProfile = PKERB_TICKET_PROFILE;
-
- _KERB_PROTOCOL_MESSAGE_TYPE = (
- KerbDebugRequestMessage,
- KerbQueryTicketCacheMessage,
- KerbChangeMachinePasswordMessage,
- KerbVerifyPacMessage,
- KerbRetrieveTicketMessage,
- KerbUpdateAddressesMessage,
- KerbPurgeTicketCacheMessage,
- KerbChangePasswordMessage,
- KerbRetrieveEncodedTicketMessage,
- KerbDecryptDataMessage,
- KerbAddBindingCacheEntryMessage,
- KerbSetPasswordMessage,
- KerbSetPasswordExMessage,
- KerbVerifyCredentialsMessage,
- KerbQueryTicketCacheExMessage,
- KerbPurgeTicketCacheExMessage,
- KerbRefreshSmartcardCredentialsMessage,
- KerbAddExtraCredentialsMessage,
- KerbQuerySupplementalCredentialsMessage);
- {$EXTERNALSYM _KERB_PROTOCOL_MESSAGE_TYPE}
- KERB_PROTOCOL_MESSAGE_TYPE = _KERB_PROTOCOL_MESSAGE_TYPE;
- {$EXTERNALSYM KERB_PROTOCOL_MESSAGE_TYPE}
- PKERB_PROTOCOL_MESSAGE_TYPE = ^KERB_PROTOCOL_MESSAGE_TYPE;
- {$EXTERNALSYM PKERB_PROTOCOL_MESSAGE_TYPE}
- TKerbProtocolMessageType = KERB_PROTOCOL_MESSAGE_TYPE;
- PKerbProtocolMessageType = PKERB_PROTOCOL_MESSAGE_TYPE;
-
-//
-// Used both for retrieving tickets and for querying ticket cache
-//
-
- PKERB_QUERY_TKT_CACHE_REQUEST = ^KERB_QUERY_TKT_CACHE_REQUEST;
- {$EXTERNALSYM PKERB_QUERY_TKT_CACHE_REQUEST}
- _KERB_QUERY_TKT_CACHE_REQUEST = record
- MessageType: KERB_PROTOCOL_MESSAGE_TYPE;
- LogonId: LUID;
- end;
- {$EXTERNALSYM _KERB_QUERY_TKT_CACHE_REQUEST}
- KERB_QUERY_TKT_CACHE_REQUEST = _KERB_QUERY_TKT_CACHE_REQUEST;
- {$EXTERNALSYM KERB_QUERY_TKT_CACHE_REQUEST}
- TKerbQueryTktCacheRequest = KERB_QUERY_TKT_CACHE_REQUEST;
- PKerbQueryTktCacheRequest = PKERB_QUERY_TKT_CACHE_REQUEST;
-
- PKERB_TICKET_CACHE_INFO = ^KERB_TICKET_CACHE_INFO;
- {$EXTERNALSYM PKERB_TICKET_CACHE_INFO}
- _KERB_TICKET_CACHE_INFO = record
- ServerName: UNICODE_STRING;
- RealmName: UNICODE_STRING;
- StartTime: LARGE_INTEGER;
- EndTime: LARGE_INTEGER;
- RenewTime: LARGE_INTEGER;
- EncryptionType: LONG;
- TicketFlags: ULONG;
- end;
- {$EXTERNALSYM _KERB_TICKET_CACHE_INFO}
- KERB_TICKET_CACHE_INFO = _KERB_TICKET_CACHE_INFO;
- {$EXTERNALSYM KERB_TICKET_CACHE_INFO}
- TKerbTicketCacheInfo = KERB_TICKET_CACHE_INFO;
- PKerbTicketCacheInfo = PKERB_TICKET_CACHE_INFO;
-
- _KERB_TICKET_CACHE_INFO_EX = record
- ClientName: UNICODE_STRING;
- ClientRealm: UNICODE_STRING;
- ServerName: UNICODE_STRING;
- ServerRealm: UNICODE_STRING;
- StartTime: LARGE_INTEGER;
- EndTime: LARGE_INTEGER;
- RenewTime: LARGE_INTEGER;
- EncryptionType: LONG;
- TicketFlags: ULONG;
- end;
- {$EXTERNALSYM _KERB_TICKET_CACHE_INFO_EX}
- KERB_TICKET_CACHE_INFO_EX = _KERB_TICKET_CACHE_INFO_EX;
- {$EXTERNALSYM KERB_TICKET_CACHE_INFO_EX}
- PKERB_TICKET_CACHE_INFO_EX = ^KERB_TICKET_CACHE_INFO_EX;
- {$EXTERNALSYM PKERB_TICKET_CACHE_INFO_EX}
- TKerbTicketCacheInfoEx = KERB_TICKET_CACHE_INFO_EX;
- PKerbTicketCacheInfoEx = PKERB_TICKET_CACHE_INFO_EX;
-
- PKERB_QUERY_TKT_CACHE_RESPONSE = ^KERB_QUERY_TKT_CACHE_RESPONSE;
- {$EXTERNALSYM PKERB_QUERY_TKT_CACHE_RESPONSE}
- _KERB_QUERY_TKT_CACHE_RESPONSE = record
- MessageType: KERB_PROTOCOL_MESSAGE_TYPE;
- CountOfTickets: ULONG;
- Tickets: array [0..ANYSIZE_ARRAY - 1] of KERB_TICKET_CACHE_INFO;
- end;
- {$EXTERNALSYM _KERB_QUERY_TKT_CACHE_RESPONSE}
- KERB_QUERY_TKT_CACHE_RESPONSE = _KERB_QUERY_TKT_CACHE_RESPONSE;
- {$EXTERNALSYM KERB_QUERY_TKT_CACHE_RESPONSE}
- TKerbQueryTktCacheResponse = KERB_QUERY_TKT_CACHE_RESPONSE;
- PKerbQueryTktCacheResponse = PKERB_QUERY_TKT_CACHE_RESPONSE;
-
- _KERB_QUERY_TKT_CACHE_EX_RESPONSE = record
- MessageType: KERB_PROTOCOL_MESSAGE_TYPE;
- CountOfTickets: ULONG;
- Tickets: array [0..ANYSIZE_ARRAY - 1] of KERB_TICKET_CACHE_INFO_EX;
- end;
- {$EXTERNALSYM _KERB_QUERY_TKT_CACHE_EX_RESPONSE}
- KERB_QUERY_TKT_CACHE_EX_RESPONSE = _KERB_QUERY_TKT_CACHE_EX_RESPONSE;
- {$EXTERNALSYM KERB_QUERY_TKT_CACHE_EX_RESPONSE}
- PKERB_QUERY_TKT_CACHE_EX_RESPONSE = ^KERB_QUERY_TKT_CACHE_EX_RESPONSE;
- {$EXTERNALSYM PKERB_QUERY_TKT_CACHE_EX_RESPONSE}
- TKerbQueryTktCacheExResponse = KERB_QUERY_TKT_CACHE_EX_RESPONSE;
- PKerbQueryTktCacheExResponse = PKERB_QUERY_TKT_CACHE_EX_RESPONSE;
-
-//
-// Types for retrieving encoded ticket from the cache
-//
-
- _SecHandle = record
- dwLower: ULONG_PTR;
- dwUpper: ULONG_PTR;
- end;
- {$EXTERNALSYM _SecHandle}
- SecHandle = _SecHandle;
- {$EXTERNALSYM SecHandle}
- PSecHandle = ^SecHandle;
- {$EXTERNALSYM PSecHandle}
-
-// Ticket Flags
-
-const
- KERB_USE_DEFAULT_TICKET_FLAGS = $0;
- {$EXTERNALSYM KERB_USE_DEFAULT_TICKET_FLAGS}
-
-// CacheOptions
-
- KERB_RETRIEVE_TICKET_DEFAULT = $0;
- {$EXTERNALSYM KERB_RETRIEVE_TICKET_DEFAULT}
- KERB_RETRIEVE_TICKET_DONT_USE_CACHE = $1;
- {$EXTERNALSYM KERB_RETRIEVE_TICKET_DONT_USE_CACHE}
- KERB_RETRIEVE_TICKET_USE_CACHE_ONLY = $2;
- {$EXTERNALSYM KERB_RETRIEVE_TICKET_USE_CACHE_ONLY}
- KERB_RETRIEVE_TICKET_USE_CREDHANDLE = $4;
- {$EXTERNALSYM KERB_RETRIEVE_TICKET_USE_CREDHANDLE}
- KERB_RETRIEVE_TICKET_AS_KERB_CRED = $8;
- {$EXTERNALSYM KERB_RETRIEVE_TICKET_AS_KERB_CRED}
- KERB_RETRIEVE_TICKET_WITH_SEC_CRED = $10;
- {$EXTERNALSYM KERB_RETRIEVE_TICKET_WITH_SEC_CRED}
-
-// Encryption Type options
-
- KERB_ETYPE_DEFAULT = $0; // don't specify etype in tkt req.
- {$EXTERNALSYM KERB_ETYPE_DEFAULT}
-
-type
- _KERB_AUTH_DATA = record
- Type_: ULONG;
- Length: ULONG;
- Data: PUCHAR;
- end;
- {$EXTERNALSYM _KERB_AUTH_DATA}
- KERB_AUTH_DATA = _KERB_AUTH_DATA;
- {$EXTERNALSYM KERB_AUTH_DATA}
- PKERB_AUTH_DATA = ^KERB_AUTH_DATA;
- {$EXTERNALSYM PKERB_AUTH_DATA}
- TKerbAuthData = KERB_AUTH_DATA;
- PKerbAuthData = PKERB_AUTH_DATA;
-
- _KERB_NET_ADDRESS = record
- Family: ULONG;
- Length: ULONG;
- Address: PCHAR;
- end;
- {$EXTERNALSYM _KERB_NET_ADDRESS}
- KERB_NET_ADDRESS = _KERB_NET_ADDRESS;
- {$EXTERNALSYM KERB_NET_ADDRESS}
- PKERB_NET_ADDRESS = ^KERB_NET_ADDRESS;
- {$EXTERNALSYM PKERB_NET_ADDRESS}
- TKerbNetAddress = KERB_NET_ADDRESS;
- PKerbNetAddress = PKERB_NET_ADDRESS;
-
- _KERB_NET_ADDRESSES = record
- Number: ULONG;
- Addresses: array [0..ANYSIZE_ARRAY - 1] of KERB_NET_ADDRESS;
- end;
- {$EXTERNALSYM _KERB_NET_ADDRESSES}
- KERB_NET_ADDRESSES = _KERB_NET_ADDRESSES;
- {$EXTERNALSYM KERB_NET_ADDRESSES}
- PKERB_NET_ADDRESSES = ^KERB_NET_ADDRESSES;
- {$EXTERNALSYM PKERB_NET_ADDRESSES}
- TKerbNetAddresses = KERB_NET_ADDRESSES;
- PKerbNetAddresses = PKERB_NET_ADDRESSES;
-
-//
-// Types for the information about a ticket
-//
-
-type
- PKERB_EXTERNAL_NAME = ^KERB_EXTERNAL_NAME;
- {$EXTERNALSYM PKERB_EXTERNAL_NAME}
- _KERB_EXTERNAL_NAME = record
- NameType: SHORT;
- NameCount: USHORT;
- Names: array [0..ANYSIZE_ARRAY - 1] of UNICODE_STRING;
- end;
- {$EXTERNALSYM _KERB_EXTERNAL_NAME}
- KERB_EXTERNAL_NAME = _KERB_EXTERNAL_NAME;
- {$EXTERNALSYM KERB_EXTERNAL_NAME}
- TKerbExternalName = KERB_EXTERNAL_NAME;
- PKerbExternalName = PKERB_EXTERNAL_NAME;
-
- PKERB_EXTERNAL_TICKET = ^KERB_EXTERNAL_TICKET;
- {$EXTERNALSYM PKERB_EXTERNAL_TICKET}
- _KERB_EXTERNAL_TICKET = record
- ServiceName: PKERB_EXTERNAL_NAME;
- TargetName: PKERB_EXTERNAL_NAME;
- ClientName: PKERB_EXTERNAL_NAME;
- DomainName: UNICODE_STRING;
- TargetDomainName: UNICODE_STRING; // contains ClientDomainName
- AltTargetDomainName: UNICODE_STRING;
- SessionKey: KERB_CRYPTO_KEY;
- TicketFlags: ULONG;
- Flags: ULONG;
- KeyExpirationTime: LARGE_INTEGER;
- StartTime: LARGE_INTEGER;
- EndTime: LARGE_INTEGER;
- RenewUntil: LARGE_INTEGER;
- TimeSkew: LARGE_INTEGER;
- EncodedTicketSize: ULONG;
- EncodedTicket: PUCHAR;
- end;
- {$EXTERNALSYM _KERB_EXTERNAL_TICKET}
- KERB_EXTERNAL_TICKET = _KERB_EXTERNAL_TICKET;
- {$EXTERNALSYM KERB_EXTERNAL_TICKET}
- TKerbExternalTicket = KERB_EXTERNAL_TICKET;
- PKerbExternalTicket = PKERB_EXTERNAL_TICKET;
-
- _KERB_RETRIEVE_TKT_REQUEST = record
- MessageType: KERB_PROTOCOL_MESSAGE_TYPE;
- LogonId: LUID;
- TargetName: UNICODE_STRING;
- TicketFlags: ULONG;
- CacheOptions: ULONG;
- EncryptionType: LONG;
- CredentialsHandle: SecHandle;
- end;
- {$EXTERNALSYM _KERB_RETRIEVE_TKT_REQUEST}
- KERB_RETRIEVE_TKT_REQUEST = _KERB_RETRIEVE_TKT_REQUEST;
- {$EXTERNALSYM KERB_RETRIEVE_TKT_REQUEST}
- PKERB_RETRIEVE_TKT_REQUEST = ^KERB_RETRIEVE_TKT_REQUEST;
- {$EXTERNALSYM PKERB_RETRIEVE_TKT_REQUEST}
- TKerbRetrieveTktRequest = KERB_RETRIEVE_TKT_REQUEST;
- PKerbRetrieveTktRequest = PKERB_RETRIEVE_TKT_REQUEST;
-
- PKERB_RETRIEVE_TKT_RESPONSE = ^KERB_RETRIEVE_TKT_RESPONSE;
- {$EXTERNALSYM PKERB_RETRIEVE_TKT_RESPONSE}
- _KERB_RETRIEVE_TKT_RESPONSE = record
- Ticket: KERB_EXTERNAL_TICKET;
- end;
- {$EXTERNALSYM _KERB_RETRIEVE_TKT_RESPONSE}
- KERB_RETRIEVE_TKT_RESPONSE = _KERB_RETRIEVE_TKT_RESPONSE;
- {$EXTERNALSYM KERB_RETRIEVE_TKT_RESPONSE}
- TKerbRetrieveTktResponse = KERB_RETRIEVE_TKT_RESPONSE;
- PKerbRetrieveTktResponse = PKERB_RETRIEVE_TKT_RESPONSE;
-
-//
-// Used to purge entries from the ticket cache
-//
-
- PKERB_PURGE_TKT_CACHE_REQUEST = ^KERB_PURGE_TKT_CACHE_REQUEST;
- {$EXTERNALSYM PKERB_PURGE_TKT_CACHE_REQUEST}
- _KERB_PURGE_TKT_CACHE_REQUEST = record
- MessageType: KERB_PROTOCOL_MESSAGE_TYPE;
- LogonId: LUID;
- ServerName: UNICODE_STRING;
- RealmName: UNICODE_STRING;
- end;
- {$EXTERNALSYM _KERB_PURGE_TKT_CACHE_REQUEST}
- KERB_PURGE_TKT_CACHE_REQUEST = _KERB_PURGE_TKT_CACHE_REQUEST;
- {$EXTERNALSYM KERB_PURGE_TKT_CACHE_REQUEST}
- TKerbPurgeTktCacheRequest = KERB_PURGE_TKT_CACHE_REQUEST;
- PKerbPurgeTktCacheRequest = PKERB_PURGE_TKT_CACHE_REQUEST;
-
-//
-// Flags for purge requests
-//
-
-const
- KERB_PURGE_ALL_TICKETS = 1;
- {$EXTERNALSYM KERB_PURGE_ALL_TICKETS}
-
-type
- _KERB_PURGE_TKT_CACHE_EX_REQUEST = record
- MessageType: KERB_PROTOCOL_MESSAGE_TYPE;
- LogonId: LUID;
- Flags: ULONG;
- TicketTemplate: KERB_TICKET_CACHE_INFO_EX;
- end;
- {$EXTERNALSYM _KERB_PURGE_TKT_CACHE_EX_REQUEST}
- KERB_PURGE_TKT_CACHE_EX_REQUEST = _KERB_PURGE_TKT_CACHE_EX_REQUEST;
- {$EXTERNALSYM KERB_PURGE_TKT_CACHE_EX_REQUEST}
- PKERB_PURGE_TKT_CACHE_EX_REQUEST = ^KERB_PURGE_TKT_CACHE_EX_REQUEST;
- {$EXTERNALSYM PKERB_PURGE_TKT_CACHE_EX_REQUEST}
- TKerbPurgeTktCacheExRequest = KERB_PURGE_TKT_CACHE_EX_REQUEST;
- PKerbPurgeTktCacheExRequest = PKERB_PURGE_TKT_CACHE_EX_REQUEST;
-
-//
-// KerbChangePassword
-//
-// KerbChangePassword changes the password on the KDC account plus
-// the password cache and logon credentials if applicable.
-//
-//
-
- PKERB_CHANGEPASSWORD_REQUEST = ^KERB_CHANGEPASSWORD_REQUEST;
- {$EXTERNALSYM PKERB_CHANGEPASSWORD_REQUEST}
- _KERB_CHANGEPASSWORD_REQUEST = record
- MessageType: KERB_PROTOCOL_MESSAGE_TYPE;
- DomainName: UNICODE_STRING;
- AccountName: UNICODE_STRING;
- OldPassword: UNICODE_STRING;
- NewPassword: UNICODE_STRING;
- Impersonating: ByteBool;
- end;
- {$EXTERNALSYM _KERB_CHANGEPASSWORD_REQUEST}
- KERB_CHANGEPASSWORD_REQUEST = _KERB_CHANGEPASSWORD_REQUEST;
- {$EXTERNALSYM KERB_CHANGEPASSWORD_REQUEST}
- TKerbChangepasswordRequest = KERB_CHANGEPASSWORD_REQUEST;
- PKerbChangepasswordRequest = PKERB_CHANGEPASSWORD_REQUEST;
-
-//
-// KerbSetPassword
-//
-// KerbSetPassword changes the password on the KDC account plus
-// the password cache and logon credentials if applicable.
-//
-//
-
- PKERB_SETPASSWORD_REQUEST = ^KERB_SETPASSWORD_REQUEST;
- {$EXTERNALSYM PKERB_SETPASSWORD_REQUEST}
- _KERB_SETPASSWORD_REQUEST = record
- MessageType: KERB_PROTOCOL_MESSAGE_TYPE;
- LogonId: LUID;
- CredentialsHandle: SecHandle;
- Flags: ULONG;
- DomainName: UNICODE_STRING;
- AccountName: UNICODE_STRING;
- Password: UNICODE_STRING;
- end;
- {$EXTERNALSYM _KERB_SETPASSWORD_REQUEST}
- KERB_SETPASSWORD_REQUEST = _KERB_SETPASSWORD_REQUEST;
- {$EXTERNALSYM KERB_SETPASSWORD_REQUEST}
- TKerbSetpasswordRequest = KERB_SETPASSWORD_REQUEST;
- PKerbSetpasswordRequest = PKERB_SETPASSWORD_REQUEST;
-
- _KERB_SETPASSWORD_EX_REQUEST = record
- MessageType: KERB_PROTOCOL_MESSAGE_TYPE;
- LogonId: LUID;
- CredentialsHandle: SecHandle;
- Flags: ULONG;
- AccountRealm: UNICODE_STRING;
- AccountName: UNICODE_STRING;
- Password: UNICODE_STRING;
- ClientRealm: UNICODE_STRING;
- ClientName: UNICODE_STRING;
- Impersonating: BOOLEAN;
- KdcAddress: UNICODE_STRING;
- KdcAddressType: ULONG;
- end;
- {$EXTERNALSYM _KERB_SETPASSWORD_EX_REQUEST}
- KERB_SETPASSWORD_EX_REQUEST = _KERB_SETPASSWORD_EX_REQUEST;
- {$EXTERNALSYM KERB_SETPASSWORD_EX_REQUEST}
- PKERB_SETPASSWORD_EX_REQUEST = ^KERB_SETPASSWORD_EX_REQUEST;
- {$EXTERNALSYM PKERB_SETPASSWORD_EX_REQUEST}
- TKerbSetPasswordExRequest = KERB_SETPASSWORD_EX_REQUEST;
- PKerbSetPasswordExRequest = PKERB_SETPASSWORD_EX_REQUEST;
-
-const
- DS_UNKNOWN_ADDRESS_TYPE = 0; // anything *but* IP
- {$EXTERNALSYM DS_UNKNOWN_ADDRESS_TYPE}
- KERB_SETPASS_USE_LOGONID = 1;
- {$EXTERNALSYM KERB_SETPASS_USE_LOGONID}
- KERB_SETPASS_USE_CREDHANDLE = 2;
- {$EXTERNALSYM KERB_SETPASS_USE_CREDHANDLE}
-
-type
- PKERB_DECRYPT_REQUEST = ^KERB_DECRYPT_REQUEST;
- {$EXTERNALSYM PKERB_DECRYPT_REQUEST}
- _KERB_DECRYPT_REQUEST = record
- MessageType: KERB_PROTOCOL_MESSAGE_TYPE;
- LogonId: LUID;
- Flags: ULONG;
- CryptoType: LONG;
- KeyUsage: LONG;
- Key: KERB_CRYPTO_KEY; // optional
- EncryptedDataSize: ULONG;
- InitialVectorSize: ULONG;
- InitialVector: PUCHAR;
- EncryptedData: PUCHAR;
- end;
- {$EXTERNALSYM _KERB_DECRYPT_REQUEST}
- KERB_DECRYPT_REQUEST = _KERB_DECRYPT_REQUEST;
- {$EXTERNALSYM KERB_DECRYPT_REQUEST}
- TKerbDecryptRequest = KERB_DECRYPT_REQUEST;
- PKerbDecryptRequest = PKERB_DECRYPT_REQUEST;
-
-//
-// If set, use the primary key from the current logon session of the one provided in the LogonId field.
-// Otherwise, use the Key in the KERB_DECRYPT_MESSAGE.
-
-const
- KERB_DECRYPT_FLAG_DEFAULT_KEY = $00000001;
- {$EXTERNALSYM KERB_DECRYPT_FLAG_DEFAULT_KEY}
-
-type
- PKERB_DECRYPT_RESPONSE = ^KERB_DECRYPT_RESPONSE;
- {$EXTERNALSYM PKERB_DECRYPT_RESPONSE}
- _KERB_DECRYPT_RESPONSE = record
- DecryptedData: array [0..ANYSIZE_ARRAY - 1] of UCHAR;
- end;
- {$EXTERNALSYM _KERB_DECRYPT_RESPONSE}
- KERB_DECRYPT_RESPONSE = _KERB_DECRYPT_RESPONSE;
- {$EXTERNALSYM KERB_DECRYPT_RESPONSE}
- TKerbDecryptResponse = KERB_DECRYPT_RESPONSE;
- PKerbDecryptResponse = PKERB_DECRYPT_RESPONSE;
-
-//
-// Request structure for adding a binding cache entry. TCB privilege
-// is required for this operation.
-//
-
- PKERB_ADD_BINDING_CACHE_ENTRY_REQUEST = ^KERB_ADD_BINDING_CACHE_ENTRY_REQUEST;
- {$EXTERNALSYM PKERB_ADD_BINDING_CACHE_ENTRY_REQUEST}
- _KERB_ADD_BINDING_CACHE_ENTRY_REQUEST = record
- MessageType: KERB_PROTOCOL_MESSAGE_TYPE;
- RealmName: UNICODE_STRING;
- KdcAddress: UNICODE_STRING;
- AddressType: ULONG; //dsgetdc.h DS_NETBIOS_ADDRESS||DS_INET_ADDRESS
- end;
- {$EXTERNALSYM _KERB_ADD_BINDING_CACHE_ENTRY_REQUEST}
- KERB_ADD_BINDING_CACHE_ENTRY_REQUEST = _KERB_ADD_BINDING_CACHE_ENTRY_REQUEST;
- {$EXTERNALSYM KERB_ADD_BINDING_CACHE_ENTRY_REQUEST}
- TKerbAddBindingCacheEntryRequest = KERB_ADD_BINDING_CACHE_ENTRY_REQUEST;
- PKerbAddBindingCacheEntryRequest = PKERB_ADD_BINDING_CACHE_ENTRY_REQUEST;
-
-//
-// Request structure for reacquiring smartcard credentials for a
-// given LUID.
-// Requires TCB.
-//
-
- _KERB_REFRESH_SCCRED_REQUEST = record
- MessageType: KERB_PROTOCOL_MESSAGE_TYPE;
- CredentialBlob: UNICODE_STRING; // optional
- LogonId: LUID;
- Flags: ULONG;
- end;
- {$EXTERNALSYM _KERB_REFRESH_SCCRED_REQUEST}
- KERB_REFRESH_SCCRED_REQUEST = _KERB_REFRESH_SCCRED_REQUEST;
- {$EXTERNALSYM KERB_REFRESH_SCCRED_REQUEST}
- PKERB_REFRESH_SCCRED_REQUEST = ^KERB_REFRESH_SCCRED_REQUEST;
- {$EXTERNALSYM PKERB_REFRESH_SCCRED_REQUEST}
- TKerbRefreshScCredRequest = KERB_REFRESH_SCCRED_REQUEST;
- PKerbRefreshScCredRequest = PKERB_REFRESH_SCCRED_REQUEST;
-
-//
-// Flags for KERB_REFRESH_SCCRED_REQUEST
-//
-// KERB_REFRESH_SCCRED_RELEASE
-// Release the smartcard handle for LUID
-//
-// KERB_REFRESH_SCCRED_GETTGT
-// Use the certificate hash in the blob to get a TGT for the logon
-// session.
-//
-
-const
- KERB_REFRESH_SCCRED_RELEASE = $0;
- {$EXTERNALSYM KERB_REFRESH_SCCRED_RELEASE}
- KERB_REFRESH_SCCRED_GETTGT = $1;
- {$EXTERNALSYM KERB_REFRESH_SCCRED_GETTGT}
-
-//
-// Request structure for adding extra Server credentials to a given
-// logon session. Only applicable during AcceptSecurityContext, and
-// requires TCB to alter "other" creds
-//
-
-type
- _KERB_ADD_CREDENTIALS_REQUEST = record
- MessageType: KERB_PROTOCOL_MESSAGE_TYPE;
- UserName: UNICODE_STRING;
- DomainName: UNICODE_STRING;
- Password: UNICODE_STRING;
- LogonId: LUID; // optional
- Flags: ULONG;
- end;
- {$EXTERNALSYM _KERB_ADD_CREDENTIALS_REQUEST}
- KERB_ADD_CREDENTIALS_REQUEST = _KERB_ADD_CREDENTIALS_REQUEST;
- {$EXTERNALSYM KERB_ADD_CREDENTIALS_REQUEST}
- PKERB_ADD_CREDENTIALS_REQUEST = ^KERB_ADD_CREDENTIALS_REQUEST;
- {$EXTERNALSYM PKERB_ADD_CREDENTIALS_REQUEST}
- TKerbAddCredentialsRequest = KERB_ADD_CREDENTIALS_REQUEST;
- PKerbAddCredentialsRequest = PKERB_ADD_CREDENTIALS_REQUEST;
-
-const
- KERB_REQUEST_ADD_CREDENTIAL = 1;
- {$EXTERNALSYM KERB_REQUEST_ADD_CREDENTIAL}
- KERB_REQUEST_REPLACE_CREDENTIAL = 2;
- {$EXTERNALSYM KERB_REQUEST_REPLACE_CREDENTIAL}
- KERB_REQUEST_REMOVE_CREDENTIAL = 4;
- {$EXTERNALSYM KERB_REQUEST_REMOVE_CREDENTIAL}
-
-implementation
-
-const
- secur32 = 'secur32.dll';
- advapi32 = 'advapi32.dll';
-
-function LSA_SUCCESS(Error: NTSTATUS): BOOL;
-begin
- Result := LONG(Error) > 0;
-end;
-
-{$IFDEF DYNAMIC_LINK}
-
-var
- _LsaRegisterLogonProcess: Pointer;
-
-function LsaRegisterLogonProcess;
-begin
- GetProcedureAddress(_LsaRegisterLogonProcess, secur32, 'LsaRegisterLogonProcess');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_LsaRegisterLogonProcess]
- end;
-end;
-
-var
- _LsaLogonUser: Pointer;
-
-function LsaLogonUser;
-begin
- GetProcedureAddress(_LsaLogonUser, secur32, 'LsaLogonUser');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_LsaLogonUser]
- end;
-end;
-
-var
- _LsaLookupAuthenticationPackage: Pointer;
-
-function LsaLookupAuthenticationPackage;
-begin
- GetProcedureAddress(_LsaLookupAuthenticationPackage, secur32, 'LsaLookupAuthenticationPackage');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_LsaLookupAuthenticationPackage]
- end;
-end;
-
-var
- _LsaFreeReturnBuffer: Pointer;
-
-function LsaFreeReturnBuffer;
-begin
- GetProcedureAddress(_LsaFreeReturnBuffer, secur32, 'LsaFreeReturnBuffer');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_LsaFreeReturnBuffer]
- end;
-end;
-
-var
- _LsaCallAuthenticationPackage: Pointer;
-
-function LsaCallAuthenticationPackage;
-begin
- GetProcedureAddress(_LsaCallAuthenticationPackage, secur32, 'LsaCallAuthenticationPackage');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_LsaCallAuthenticationPackage]
- end;
-end;
-
-var
- _LsaDeregisterLogonProcess: Pointer;
-
-function LsaDeregisterLogonProcess;
-begin
- GetProcedureAddress(_LsaDeregisterLogonProcess, secur32, 'LsaDeregisterLogonProcess');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_LsaDeregisterLogonProcess]
- end;
-end;
-
-var
- _LsaConnectUntrusted: Pointer;
-
-function LsaConnectUntrusted;
-begin
- GetProcedureAddress(_LsaConnectUntrusted, secur32, 'LsaConnectUntrusted');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_LsaConnectUntrusted]
- end;
-end;
-
-var
- _LsaFreeMemory: Pointer;
-
-function LsaFreeMemory;
-begin
- GetProcedureAddress(_LsaFreeMemory, advapi32, 'LsaFreeMemory');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_LsaFreeMemory]
- end;
-end;
-
-var
- _LsaClose: Pointer;
-
-function LsaClose;
-begin
- GetProcedureAddress(_LsaClose, advapi32, 'LsaClose');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_LsaClose]
- end;
-end;
-
-var
- _LsaOpenPolicy: Pointer;
-
-function LsaOpenPolicy;
-begin
- GetProcedureAddress(_LsaOpenPolicy, advapi32, 'LsaOpenPolicy');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_LsaOpenPolicy]
- end;
-end;
-
-var
- _LsaEnumerateLogonSessions: Pointer;
-
-function LsaEnumerateLogonSessions;
-begin
- GetProcedureAddress(_LsaEnumerateLogonSessions, secur32, 'LsaEnumerateLogonSessions');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_LsaEnumerateLogonSessions]
- end;
-end;
-
-var
- _LsaGetLogonSessionData: Pointer;
-
-function LsaGetLogonSessionData;
-begin
- GetProcedureAddress(_LsaGetLogonSessionData, secur32, 'LsaGetLogonSessionData');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_LsaGetLogonSessionData]
- end;
-end;
-
-var
- _LsaQueryInformationPolicy: Pointer;
-
-function LsaQueryInformationPolicy;
-begin
- GetProcedureAddress(_LsaQueryInformationPolicy, advapi32, 'LsaQueryInformationPolicy');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_LsaQueryInformationPolicy]
- end;
-end;
-
-var
- _LsaSetInformationPolicy: Pointer;
-
-function LsaSetInformationPolicy;
-begin
- GetProcedureAddress(_LsaSetInformationPolicy, advapi32, 'LsaSetInformationPolicy');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_LsaSetInformationPolicy]
- end;
-end;
-
-var
- _LsaQueryDomainInformationPolicy: Pointer;
-
-function LsaQueryDomainInformationPolicy;
-begin
- GetProcedureAddress(_LsaQueryDomainInformationPolicy, advapi32, 'LsaQueryDomainInformationPolicy');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_LsaQueryDomainInformationPolicy]
- end;
-end;
-
-var
- _LsaSetDomainInformationPolicy: Pointer;
-
-function LsaSetDomainInformationPolicy;
-begin
- GetProcedureAddress(_LsaSetDomainInformationPolicy, advapi32, 'LsaSetDomainInformationPolicy');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_LsaSetDomainInformationPolicy]
- end;
-end;
-
-var
- _LsaRegisterPolicyChangeNot: Pointer;
-
-function LsaRegisterPolicyChangeNotification;
-begin
- GetProcedureAddress(_LsaRegisterPolicyChangeNot, secur32, 'LsaRegisterPolicyChangeNotification');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_LsaRegisterPolicyChangeNot]
- end;
-end;
-
-var
- _LsaUnregisterPolicyChangeNot: Pointer;
-
-function LsaUnregisterPolicyChangeNotification;
-begin
- GetProcedureAddress(_LsaUnregisterPolicyChangeNot, secur32, 'LsaUnregisterPolicyChangeNotification');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_LsaUnregisterPolicyChangeNot]
- end;
-end;
-
-var
- _LsaEnumerateTrustedDomains: Pointer;
-
-function LsaEnumerateTrustedDomains;
-begin
- GetProcedureAddress(_LsaEnumerateTrustedDomains, advapi32, 'LsaEnumerateTrustedDomains');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_LsaEnumerateTrustedDomains]
- end;
-end;
-
-var
- _LsaLookupNames: Pointer;
-
-function LsaLookupNames;
-begin
- GetProcedureAddress(_LsaLookupNames, advapi32, 'LsaLookupNames');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_LsaLookupNames]
- end;
-end;
-
-var
- _LsaLookupNames2: Pointer;
-
-function LsaLookupNames2;
-begin
- GetProcedureAddress(_LsaLookupNames2, advapi32, 'LsaLookupNames2');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_LsaLookupNames2]
- end;
-end;
-
-var
- _LsaLookupSids: Pointer;
-
-function LsaLookupSids;
-begin
- GetProcedureAddress(_LsaLookupSids, advapi32, 'LsaLookupSids');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_LsaLookupSids]
- end;
-end;
-
-var
- _LsaEnumAccountsWithUserRight: Pointer;
-
-function LsaEnumerateAccountsWithUserRight;
-begin
- GetProcedureAddress(_LsaEnumAccountsWithUserRight, advapi32, 'LsaEnumerateAccountsWithUserRight');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_LsaEnumAccountsWithUserRight]
- end;
-end;
-
-var
- _LsaEnumerateAccountRights: Pointer;
-
-function LsaEnumerateAccountRights;
-begin
- GetProcedureAddress(_LsaEnumerateAccountRights, advapi32, 'LsaEnumerateAccountRights');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_LsaEnumerateAccountRights]
- end;
-end;
-
-var
- _LsaAddAccountRights: Pointer;
-
-function LsaAddAccountRights;
-begin
- GetProcedureAddress(_LsaAddAccountRights, advapi32, 'LsaAddAccountRights');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_LsaAddAccountRights]
- end;
-end;
-
-var
- _LsaRemoveAccountRights: Pointer;
-
-function LsaRemoveAccountRights;
-begin
- GetProcedureAddress(_LsaRemoveAccountRights, advapi32, 'LsaRemoveAccountRights');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_LsaRemoveAccountRights]
- end;
-end;
-
-var
- _LsaOpenTrustedDomainByName: Pointer;
-
-function LsaOpenTrustedDomainByName;
-begin
- GetProcedureAddress(_LsaOpenTrustedDomainByName, advapi32, 'LsaOpenTrustedDomainByName');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_LsaOpenTrustedDomainByName]
- end;
-end;
-
-var
- _LsaQueryTrustedDomainInfo: Pointer;
-
-function LsaQueryTrustedDomainInfo;
-begin
- GetProcedureAddress(_LsaQueryTrustedDomainInfo, advapi32, 'LsaQueryTrustedDomainInfo');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_LsaQueryTrustedDomainInfo]
- end;
-end;
-
-var
- _LsaSetTrustedDomainInformation: Pointer;
-
-function LsaSetTrustedDomainInformation;
-begin
- GetProcedureAddress(_LsaSetTrustedDomainInformation, advapi32, 'LsaSetTrustedDomainInformation');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_LsaSetTrustedDomainInformation]
- end;
-end;
-
-var
- _LsaDeleteTrustedDomain: Pointer;
-
-function LsaDeleteTrustedDomain;
-begin
- GetProcedureAddress(_LsaDeleteTrustedDomain, advapi32, 'LsaDeleteTrustedDomain');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_LsaDeleteTrustedDomain]
- end;
-end;
-
-var
- _LsaQueryTrustedDomainInfoByName: Pointer;
-
-function LsaQueryTrustedDomainInfoByName;
-begin
- GetProcedureAddress(_LsaQueryTrustedDomainInfoByName, advapi32, 'LsaQueryTrustedDomainInfoByName');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_LsaQueryTrustedDomainInfoByName]
- end;
-end;
-
-var
- _LsaSetTrustedDomainInfoByName: Pointer;
-
-function LsaSetTrustedDomainInfoByName;
-begin
- GetProcedureAddress(_LsaSetTrustedDomainInfoByName, advapi32, 'LsaSetTrustedDomainInfoByName');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_LsaSetTrustedDomainInfoByName]
- end;
-end;
-
-var
- _LsaEnumerateTrustedDomainsEx: Pointer;
-
-function LsaEnumerateTrustedDomainsEx;
-begin
- GetProcedureAddress(_LsaEnumerateTrustedDomainsEx, advapi32, 'LsaEnumerateTrustedDomainsEx');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_LsaEnumerateTrustedDomainsEx]
- end;
-end;
-
-var
- _LsaCreateTrustedDomainEx: Pointer;
-
-function LsaCreateTrustedDomainEx;
-begin
- GetProcedureAddress(_LsaCreateTrustedDomainEx, advapi32, 'LsaCreateTrustedDomainEx');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_LsaCreateTrustedDomainEx]
- end;
-end;
-
-var
- _LsaQueryForestTrustInformation: Pointer;
-
-function LsaQueryForestTrustInformation;
-begin
- GetProcedureAddress(_LsaQueryForestTrustInformation, advapi32, 'LsaQueryForestTrustInformation');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_LsaQueryForestTrustInformation]
- end;
-end;
-
-var
- _LsaSetForestTrustInformation: Pointer;
-
-function LsaSetForestTrustInformation;
-begin
- GetProcedureAddress(_LsaSetForestTrustInformation, advapi32, 'LsaSetForestTrustInformation');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_LsaSetForestTrustInformation]
- end;
-end;
-
-var
- _LsaStorePrivateData: Pointer;
-
-function LsaStorePrivateData;
-begin
- GetProcedureAddress(_LsaStorePrivateData, advapi32, 'LsaStorePrivateData');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_LsaStorePrivateData]
- end;
-end;
-
-var
- _LsaRetrievePrivateData: Pointer;
-
-function LsaRetrievePrivateData;
-begin
- GetProcedureAddress(_LsaRetrievePrivateData, advapi32, 'LsaRetrievePrivateData');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_LsaRetrievePrivateData]
- end;
-end;
-
-var
- _LsaNtStatusToWinError: Pointer;
-
-function LsaNtStatusToWinError;
-begin
- GetProcedureAddress(_LsaNtStatusToWinError, advapi32, 'LsaNtStatusToWinError');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_LsaNtStatusToWinError]
- end;
-end;
-
-{$ELSE}
-
-function LsaRegisterLogonProcess; external secur32 name 'LsaRegisterLogonProcess';
-function LsaLogonUser; external secur32 name 'LsaLogonUser';
-function LsaLookupAuthenticationPackage; external secur32 name 'LsaLookupAuthenticationPackage';
-function LsaFreeReturnBuffer; external secur32 name 'LsaFreeReturnBuffer';
-function LsaCallAuthenticationPackage; external secur32 name 'LsaCallAuthenticationPackage';
-function LsaDeregisterLogonProcess; external secur32 name 'LsaDeregisterLogonProcess';
-function LsaConnectUntrusted; external secur32 name 'LsaConnectUntrusted';
-function LsaFreeMemory; external advapi32 name 'LsaFreeMemory';
-function LsaClose; external advapi32 name 'LsaClose';
-function LsaOpenPolicy; external advapi32 name 'LsaOpenPolicy';
-function LsaEnumerateLogonSessions; external secur32 name 'LsaEnumerateLogonSessions';
-function LsaGetLogonSessionData; external secur32 name 'LsaGetLogonSessionData';
-function LsaQueryInformationPolicy; external advapi32 name 'LsaQueryInformationPolicy';
-function LsaSetInformationPolicy; external advapi32 name 'LsaSetInformationPolicy';
-function LsaQueryDomainInformationPolicy; external advapi32 name 'LsaQueryDomainInformationPolicy';
-function LsaSetDomainInformationPolicy; external advapi32 name 'LsaSetDomainInformationPolicy';
-function LsaRegisterPolicyChangeNotification; external secur32 name 'LsaRegisterPolicyChangeNotification';
-function LsaUnregisterPolicyChangeNotification; external secur32 name 'LsaUnregisterPolicyChangeNotification';
-function LsaEnumerateTrustedDomains; external advapi32 name 'LsaEnumerateTrustedDomains';
-function LsaLookupNames; external advapi32 name 'LsaLookupNames';
-function LsaLookupNames2; external advapi32 name 'LsaLookupNames2';
-function LsaLookupSids; external advapi32 name 'LsaLookupSids';
-function LsaEnumerateAccountsWithUserRight; external advapi32 name 'LsaEnumerateAccountsWithUserRight';
-function LsaEnumerateAccountRights; external advapi32 name 'LsaEnumerateAccountRights';
-function LsaAddAccountRights; external advapi32 name 'LsaAddAccountRights';
-function LsaRemoveAccountRights; external advapi32 name 'LsaRemoveAccountRights';
-function LsaOpenTrustedDomainByName; external advapi32 name 'LsaOpenTrustedDomainByName';
-function LsaQueryTrustedDomainInfo; external advapi32 name 'LsaQueryTrustedDomainInfo';
-function LsaSetTrustedDomainInformation; external advapi32 name 'LsaSetTrustedDomainInformation';
-function LsaDeleteTrustedDomain; external advapi32 name 'LsaDeleteTrustedDomain';
-function LsaQueryTrustedDomainInfoByName; external advapi32 name 'LsaQueryTrustedDomainInfoByName';
-function LsaSetTrustedDomainInfoByName; external advapi32 name 'LsaSetTrustedDomainInfoByName';
-function LsaEnumerateTrustedDomainsEx; external advapi32 name 'LsaEnumerateTrustedDomainsEx';
-function LsaCreateTrustedDomainEx; external advapi32 name 'LsaCreateTrustedDomainEx';
-function LsaQueryForestTrustInformation; external advapi32 name 'LsaQueryForestTrustInformation';
-function LsaSetForestTrustInformation; external advapi32 name 'LsaSetForestTrustInformation';
-function LsaStorePrivateData; external advapi32 name 'LsaStorePrivateData';
-function LsaRetrievePrivateData; external advapi32 name 'LsaRetrievePrivateData';
-function LsaNtStatusToWinError; external advapi32 name 'LsaNtStatusToWinError';
-
-{$ENDIF DYNAMIC_LINK}
-
-end.
+{******************************************************************************}
+{ }
+{ LSA API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: ntsecapi.h, released June 2000. The original Pascal }
+{ code is: NtSecApi.pas, released December 2000. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwantsecapi.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaNtSecApi;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "ntsecapi.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaWinType, JwaNtStatus, JwaWinNT;
+
+//
+// Security operation mode of the system is held in a control
+// longword.
+//
+
+type
+ LSA_OPERATIONAL_MODE = ULONG;
+ {$EXTERNALSYM LSA_OPERATIONAL_MODE}
+ PLSA_OPERATIONAL_MODE = ^LSA_OPERATIONAL_MODE;
+ {$EXTERNALSYM PLSA_OPERATIONAL_MODE}
+
+//
+// The flags in the security operational mode are defined
+// as:
+//
+// PasswordProtected - Some level of authentication (such as
+// a password) must be provided by users before they are
+// allowed to use the system. Once set, this value will
+// not be cleared without re-booting the system.
+//
+// IndividualAccounts - Each user must identify an account to
+// logon to. This flag is only meaningful if the
+// PasswordProtected flag is also set. If this flag is
+// not set and the PasswordProtected flag is set, then all
+// users may logon to the same account. Once set, this value
+// will not be cleared without re-booting the system.
+//
+// MandatoryAccess - Indicates the system is running in a mandatory
+// access control mode (e.g., B-level as defined by the U.S.A's
+// Department of Defense's "Orange Book"). This is not utilized
+// in the current release of NT. This flag is only meaningful
+// if both the PasswordProtected and IndividualAccounts flags are
+// set. Once set, this value will not be cleared without
+// re-booting the system.
+//
+// LogFull - Indicates the system has been brought up in a mode in
+// which if must perform security auditing, but its audit log
+// is full. This may (should) restrict the operations that
+// can occur until the audit log is made not-full again. THIS
+// VALUE MAY BE CLEARED WHILE THE SYSTEM IS RUNNING (I.E., WITHOUT
+// REBOOTING).
+//
+// If the PasswordProtected flag is not set, then the system is running
+// without security, and user interface should be adjusted appropriately.
+//
+
+const
+ LSA_MODE_PASSWORD_PROTECTED = $00000001;
+ {$EXTERNALSYM LSA_MODE_PASSWORD_PROTECTED}
+ LSA_MODE_INDIVIDUAL_ACCOUNTS = $00000002;
+ {$EXTERNALSYM LSA_MODE_INDIVIDUAL_ACCOUNTS}
+ LSA_MODE_MANDATORY_ACCESS = $00000004;
+ {$EXTERNALSYM LSA_MODE_MANDATORY_ACCESS}
+ LSA_MODE_LOG_FULL = $00000008;
+ {$EXTERNALSYM LSA_MODE_LOG_FULL}
+
+//
+// Used by a logon process to indicate what type of logon is being
+// requested.
+//
+
+type
+ _SECURITY_LOGON_TYPE = (
+ seltFiller0, seltFiller1,
+ Interactive, // Interactively logged on (locally or remotely)
+ Network, // Accessing system via network
+ Batch, // Started via a batch queue
+ Service, // Service started by service controller
+ Proxy, // Proxy logon
+ Unlock, // Unlock workstation
+ NetworkCleartext, // Network logon with cleartext credentials
+ NewCredentials, // Clone caller, new default credentials
+ RemoteInteractive, // Remote, yet interactive. Terminal server
+ CachedInteractive, // Try cached credentials without hitting the net.
+ CachedRemoteInteractive, // Same as RemoteInteractive, this is used internally for auditing purpose
+ CachedUnlock); // Cached Unlock workstation
+ {$EXTERNALSYM _SECURITY_LOGON_TYPE}
+ SECURITY_LOGON_TYPE = _SECURITY_LOGON_TYPE;
+ {$EXTERNALSYM SECURITY_LOGON_TYPE}
+ PSECURITY_LOGON_TYPE = ^SECURITY_LOGON_TYPE;
+ {$EXTERNALSYM PSECURITY_LOGON_TYPE}
+ TSecurityLogonType = SECURITY_LOGON_TYPE;
+ PSecurityLogonType = PSECURITY_LOGON_TYPE;
+
+//
+// Audit Event Categories
+//
+// The following are the built-in types or Categories of audit event.
+// WARNING! This structure is subject to expansion. The user should not
+// compute the number of elements of this type directly, but instead
+// should obtain the count of elements by calling LsaQueryInformationPolicy()
+// for the PolicyAuditEventsInformation class and extracting the count from
+// the MaximumAuditEventCount field of the returned structure.
+//
+
+ _POLICY_AUDIT_EVENT_TYPE = (
+ AuditCategorySystem,
+ AuditCategoryLogon,
+ AuditCategoryObjectAccess,
+ AuditCategoryPrivilegeUse,
+ AuditCategoryDetailedTracking,
+ AuditCategoryPolicyChange,
+ AuditCategoryAccountManagement,
+ AuditCategoryDirectoryServiceAccess,
+ AuditCategoryAccountLogon);
+ {$EXTERNALSYM _POLICY_AUDIT_EVENT_TYPE}
+ POLICY_AUDIT_EVENT_TYPE = _POLICY_AUDIT_EVENT_TYPE;
+ {$EXTERNALSYM POLICY_AUDIT_EVENT_TYPE}
+ PPOLICY_AUDIT_EVENT_TYPE = ^POLICY_AUDIT_EVENT_TYPE;
+ {$EXTERNALSYM PPOLICY_AUDIT_EVENT_TYPE}
+ TPolicyAuditEventType = POLICY_AUDIT_EVENT_TYPE;
+ PPolicyAuditEventType = PPOLICY_AUDIT_EVENT_TYPE;
+
+//
+// The following defines describe the auditing options for each
+// event type
+//
+
+const
+
+// Leave options specified for this event unchanged
+
+ POLICY_AUDIT_EVENT_UNCHANGED = $00000000;
+ {$EXTERNALSYM POLICY_AUDIT_EVENT_UNCHANGED}
+
+// Audit successful occurrences of events of this type
+
+ POLICY_AUDIT_EVENT_SUCCESS = $00000001;
+ {$EXTERNALSYM POLICY_AUDIT_EVENT_SUCCESS}
+
+// Audit failed attempts to cause an event of this type to occur
+
+ POLICY_AUDIT_EVENT_FAILURE = $00000002;
+ {$EXTERNALSYM POLICY_AUDIT_EVENT_FAILURE}
+
+ POLICY_AUDIT_EVENT_NONE = $00000004;
+ {$EXTERNALSYM POLICY_AUDIT_EVENT_NONE}
+
+// Mask of valid event auditing options
+
+ POLICY_AUDIT_EVENT_MASK = (POLICY_AUDIT_EVENT_SUCCESS or POLICY_AUDIT_EVENT_FAILURE or
+ POLICY_AUDIT_EVENT_UNCHANGED or POLICY_AUDIT_EVENT_NONE);
+ {$EXTERNALSYM POLICY_AUDIT_EVENT_MASK}
+ TPolicyAuditEventMask = POLICY_AUDIT_EVENT_MASK;
+
+type
+ PLSA_UNICODE_STRING = ^LSA_UNICODE_STRING;
+ {$EXTERNALSYM PLSA_UNICODE_STRING}
+ _LSA_UNICODE_STRING = record
+ Length: USHORT;
+ MaximumLength: USHORT;
+ Buffer: PWSTR;
+ end;
+ {$EXTERNALSYM _LSA_UNICODE_STRING}
+ LSA_UNICODE_STRING = _LSA_UNICODE_STRING;
+ {$EXTERNALSYM LSA_UNICODE_STRING}
+ TLsaUnicodeString = LSA_UNICODE_STRING;
+ PLsaUnicodeString = PLSA_UNICODE_STRING;
+
+ PLSA_STRING = ^LSA_STRING;
+ {$EXTERNALSYM PLSA_STRING}
+ _LSA_STRING = record
+ Length: USHORT;
+ MaximumLength: USHORT;
+ Buffer: PCHAR;
+ end;
+ {$EXTERNALSYM _LSA_STRING}
+ LSA_STRING = _LSA_STRING;
+ {$EXTERNALSYM LSA_STRING}
+ TLsaString = LSA_STRING;
+ PLsaString = PLSA_STRING;
+
+ PLSA_OBJECT_ATTRIBUTES = ^LSA_OBJECT_ATTRIBUTES;
+ {$EXTERNALSYM PLSA_OBJECT_ATTRIBUTES}
+ _LSA_OBJECT_ATTRIBUTES = record
+ Length: ULONG;
+ RootDirectory: HANDLE;
+ ObjectName: PLSA_UNICODE_STRING;
+ Attributes: ULONG;
+ SecurityDescriptor: PVOID; // Points to type SECURITY_DESCRIPTOR
+ SecurityQualityOfService: PVOID; // Points to type SECURITY_QUALITY_OF_SERVICE
+ end;
+ {$EXTERNALSYM _LSA_OBJECT_ATTRIBUTES}
+ LSA_OBJECT_ATTRIBUTES = _LSA_OBJECT_ATTRIBUTES;
+ {$EXTERNALSYM LSA_OBJECT_ATTRIBUTES}
+ TLsaObjectAttributes = LSA_OBJECT_ATTRIBUTES;
+ PLsaObjectAttributes = PLSA_OBJECT_ATTRIBUTES;
+
+//
+// Macro for determining whether an API succeeded.
+//
+
+function LSA_SUCCESS(Error: NTSTATUS): BOOL;
+{$EXTERNALSYM LSA_SUCCESS}
+
+function LsaRegisterLogonProcess(const LogonProcessName: LSA_STRING;
+ var LsaHandle: HANDLE; SecurityMode: PLSA_OPERATIONAL_MODE): NTSTATUS; stdcall;
+{$EXTERNALSYM LsaRegisterLogonProcess}
+
+function LsaLogonUser(LsaHandle: HANDLE; const OriginName: LSA_STRING;
+ LogonType: SECURITY_LOGON_TYPE; AuthenticationPackage: ULONG;
+ AuthenticationInformation: PVOID; AuthenticationInformationLength: ULONG;
+ LocalGroups: PTOKEN_GROUPS; SourceContext: PTOKEN_SOURCE;
+ var ProfileBuffer: PVOID; var ProfileBufferLength: ULONG; var LogonId: LUID;
+ var Token: HANDLE; var Quotas: QUOTA_LIMITS; var SubStatus: NTSTATUS): NTSTATUS; stdcall;
+{$EXTERNALSYM LsaLogonUser}
+
+function LsaLookupAuthenticationPackage(LsaHandle: HANDLE;
+ const PackageName: LSA_STRING; var AuthenticationPackage: ULONG): NTSTATUS; stdcall;
+{$EXTERNALSYM LsaLookupAuthenticationPackage}
+
+function LsaFreeReturnBuffer(Buffer: PVOID): NTSTATUS; stdcall;
+{$EXTERNALSYM LsaFreeReturnBuffer}
+
+function LsaCallAuthenticationPackage(LsaHandle: HANDLE;
+ AuthenticationPackage: ULONG; ProtocolSubmitBuffer: PVOID;
+ SubmitBufferLength: ULONG; var ProtocolReturnBuffer: PVOID;
+ var ReturnBufferLength: ULONG; var ProtocolStatus: NTSTATUS): NTSTATUS; stdcall;
+{$EXTERNALSYM LsaCallAuthenticationPackage}
+
+function LsaDeregisterLogonProcess(LsaHandle: HANDLE): NTSTATUS; stdcall;
+{$EXTERNALSYM LsaDeregisterLogonProcess}
+
+function LsaConnectUntrusted(var LsaHandle: HANDLE): NTSTATUS; stdcall;
+{$EXTERNALSYM LsaConnectUntrusted}
+
+////////////////////////////////////////////////////////////////////////////
+// //
+// Local Security Policy Administration API datatypes and defines //
+// //
+////////////////////////////////////////////////////////////////////////////
+
+//
+// Access types for the Policy object
+//
+
+const
+ POLICY_VIEW_LOCAL_INFORMATION = $00000001;
+ {$EXTERNALSYM POLICY_VIEW_LOCAL_INFORMATION}
+ POLICY_VIEW_AUDIT_INFORMATION = $00000002;
+ {$EXTERNALSYM POLICY_VIEW_AUDIT_INFORMATION}
+ POLICY_GET_PRIVATE_INFORMATION = $00000004;
+ {$EXTERNALSYM POLICY_GET_PRIVATE_INFORMATION}
+ POLICY_TRUST_ADMIN = $00000008;
+ {$EXTERNALSYM POLICY_TRUST_ADMIN}
+ POLICY_CREATE_ACCOUNT = $00000010;
+ {$EXTERNALSYM POLICY_CREATE_ACCOUNT}
+ POLICY_CREATE_SECRET = $00000020;
+ {$EXTERNALSYM POLICY_CREATE_SECRET}
+ POLICY_CREATE_PRIVILEGE = $00000040;
+ {$EXTERNALSYM POLICY_CREATE_PRIVILEGE}
+ POLICY_SET_DEFAULT_QUOTA_LIMITS = $00000080;
+ {$EXTERNALSYM POLICY_SET_DEFAULT_QUOTA_LIMITS}
+ POLICY_SET_AUDIT_REQUIREMENTS = $00000100;
+ {$EXTERNALSYM POLICY_SET_AUDIT_REQUIREMENTS}
+ POLICY_AUDIT_LOG_ADMIN = $00000200;
+ {$EXTERNALSYM POLICY_AUDIT_LOG_ADMIN}
+ POLICY_SERVER_ADMIN = $00000400;
+ {$EXTERNALSYM POLICY_SERVER_ADMIN}
+ POLICY_LOOKUP_NAMES = $00000800;
+ {$EXTERNALSYM POLICY_LOOKUP_NAMES}
+ POLICY_NOTIFICATION = $00001000;
+ {$EXTERNALSYM POLICY_NOTIFICATION}
+
+ POLICY_ALL_ACCESS = (STANDARD_RIGHTS_REQUIRED or
+ POLICY_VIEW_LOCAL_INFORMATION or
+ POLICY_VIEW_AUDIT_INFORMATION or
+ POLICY_GET_PRIVATE_INFORMATION or
+ POLICY_TRUST_ADMIN or
+ POLICY_CREATE_ACCOUNT or
+ POLICY_CREATE_SECRET or
+ POLICY_CREATE_PRIVILEGE or
+ POLICY_SET_DEFAULT_QUOTA_LIMITS or
+ POLICY_SET_AUDIT_REQUIREMENTS or
+ POLICY_AUDIT_LOG_ADMIN or
+ POLICY_SERVER_ADMIN or
+ POLICY_LOOKUP_NAMES);
+ {$EXTERNALSYM POLICY_ALL_ACCESS}
+
+ POLICY_READ = (STANDARD_RIGHTS_READ or
+ POLICY_VIEW_AUDIT_INFORMATION or
+ POLICY_GET_PRIVATE_INFORMATION);
+ {$EXTERNALSYM POLICY_READ}
+
+ POLICY_WRITE = (STANDARD_RIGHTS_WRITE or
+ POLICY_TRUST_ADMIN or
+ POLICY_CREATE_ACCOUNT or
+ POLICY_CREATE_SECRET or
+ POLICY_CREATE_PRIVILEGE or
+ POLICY_SET_DEFAULT_QUOTA_LIMITS or
+ POLICY_SET_AUDIT_REQUIREMENTS or
+ POLICY_AUDIT_LOG_ADMIN or
+ POLICY_SERVER_ADMIN);
+ {$EXTERNALSYM POLICY_WRITE}
+
+ POLICY_EXECUTE = (STANDARD_RIGHTS_EXECUTE or
+ POLICY_VIEW_LOCAL_INFORMATION or
+ POLICY_LOOKUP_NAMES);
+ {$EXTERNALSYM POLICY_EXECUTE}
+
+//
+// Policy object specific data types.
+//
+
+//
+// The following data type is used to identify a domain
+//
+
+type
+ PLSA_TRUST_INFORMATION = ^LSA_TRUST_INFORMATION;
+ {$EXTERNALSYM PLSA_TRUST_INFORMATION}
+ _LSA_TRUST_INFORMATION = record
+ Name: LSA_UNICODE_STRING;
+ Sid: PSID;
+ end;
+ {$EXTERNALSYM _LSA_TRUST_INFORMATION}
+ LSA_TRUST_INFORMATION = _LSA_TRUST_INFORMATION;
+ {$EXTERNALSYM LSA_TRUST_INFORMATION}
+ TLsaTrustInformation = LSA_TRUST_INFORMATION;
+ PLsaTrustInformation = PLSA_TRUST_INFORMATION;
+
+// where members have the following usage:
+//
+// Name - The name of the domain.
+//
+// Sid - A pointer to the Sid of the Domain
+//
+
+//
+// The following data type is used in name and SID lookup services to
+// describe the domains referenced in the lookup operation.
+//
+
+ PLSA_REFERENCED_DOMAIN_LIST = ^LSA_REFERENCED_DOMAIN_LIST;
+ {$EXTERNALSYM PLSA_REFERENCED_DOMAIN_LIST}
+ _LSA_REFERENCED_DOMAIN_LIST = record
+ Entries: ULONG;
+ Domains: PLSA_TRUST_INFORMATION;
+ end;
+ {$EXTERNALSYM _LSA_REFERENCED_DOMAIN_LIST}
+ LSA_REFERENCED_DOMAIN_LIST = _LSA_REFERENCED_DOMAIN_LIST;
+ {$EXTERNALSYM LSA_REFERENCED_DOMAIN_LIST}
+ TLsaReferencedDomainList = LSA_REFERENCED_DOMAIN_LIST;
+ PLsaReferencedDomainList = PLSA_REFERENCED_DOMAIN_LIST;
+
+// where members have the following usage:
+//
+// Entries - Is a count of the number of domains described in the
+// Domains array.
+//
+// Domains - Is a pointer to an array of Entries LSA_TRUST_INFORMATION data
+// structures.
+//
+
+//
+// The following data type is used in name to SID lookup services to describe
+// the domains referenced in the lookup operation.
+//
+
+ PLSA_TRANSLATED_SID = ^LSA_TRANSLATED_SID;
+ {$EXTERNALSYM PLSA_TRANSLATED_SID}
+ _LSA_TRANSLATED_SID = record
+ Use: SID_NAME_USE;
+ RelativeId: ULONG;
+ DomainIndex: LONG;
+ end;
+ {$EXTERNALSYM _LSA_TRANSLATED_SID}
+ LSA_TRANSLATED_SID = _LSA_TRANSLATED_SID;
+ {$EXTERNALSYM LSA_TRANSLATED_SID}
+ TLsaTranslatedSid = LSA_TRANSLATED_SID;
+ PLsaTranslatedSid = PLSA_TRANSLATED_SID;
+
+// where members have the following usage:
+//
+// Use - identifies the use of the SID. If this value is SidUnknown or
+// SidInvalid, then the remainder of the record is not set and
+// should be ignored.
+//
+// RelativeId - Contains the relative ID of the translated SID. The
+// remainder of the SID (the prefix) is obtained using the
+// DomainIndex field.
+//
+// DomainIndex - Is the index of an entry in a related
+// LSA_REFERENCED_DOMAIN_LIST data structure describing the
+// domain in which the account was found.
+//
+// If there is no corresponding reference domain for an entry, then
+// this field will contain a negative value.
+//
+
+ _LSA_TRANSLATED_SID2 = record
+ Use: SID_NAME_USE;
+ Sid: PSID;
+ DomainIndex: LONG;
+ Flags: ULONG;
+ end;
+ {$EXTERNALSYM _LSA_TRANSLATED_SID2}
+ LSA_TRANSLATED_SID2 = _LSA_TRANSLATED_SID2;
+ {$EXTERNALSYM LSA_TRANSLATED_SID2}
+ PLSA_TRANSLATED_SID2 = ^LSA_TRANSLATED_SID2;
+ {$EXTERNALSYM PLSA_TRANSLATED_SID2}
+ TLsaTranslatedSid2 = LSA_TRANSLATED_SID2;
+ PLsaTranslatedSid2 = PLSA_TRANSLATED_SID2;
+
+// where members have the following usage:
+//
+// Use - identifies the use of the SID. If this value is SidUnknown or
+// SidInvalid, then the remainder of the record is not set and
+// should be ignored.
+//
+// Sid - Contains the complete Sid of the tranlated SID
+//
+// DomainIndex - Is the index of an entry in a related
+// LSA_REFERENCED_DOMAIN_LIST data structure describing the
+// domain in which the account was found.
+//
+// If there is no corresponding reference domain for an entry, then
+// this field will contain a negative value.
+//
+
+//
+// The following data type is used in SID to name lookup services to
+// describe the domains referenced in the lookup operation.
+//
+
+ PLSA_TRANSLATED_NAME = ^LSA_TRANSLATED_NAME;
+ {$EXTERNALSYM PLSA_TRANSLATED_NAME}
+ _LSA_TRANSLATED_NAME = record
+ Use: SID_NAME_USE;
+ Name: LSA_UNICODE_STRING;
+ DomainIndex: LONG;
+ end;
+ {$EXTERNALSYM _LSA_TRANSLATED_NAME}
+ LSA_TRANSLATED_NAME = _LSA_TRANSLATED_NAME;
+ {$EXTERNALSYM LSA_TRANSLATED_NAME}
+ TLsaTranslatedName = LSA_TRANSLATED_NAME;
+ PLsaTranslatedName = PLSA_TRANSLATED_NAME;
+
+// where the members have the following usage:
+//
+// Use - Identifies the use of the name. If this value is SidUnknown
+// or SidInvalid, then the remainder of the record is not set and
+// should be ignored. If this value is SidWellKnownGroup then the
+// Name field is invalid, but the DomainIndex field is not.
+//
+// Name - Contains the isolated name of the translated SID.
+//
+// DomainIndex - Is the index of an entry in a related
+// LSA_REFERENCED_DOMAIN_LIST data structure describing the domain
+// in which the account was found.
+//
+// If there is no corresponding reference domain for an entry, then
+// this field will contain a negative value.
+//
+
+//
+// The following data type is used to represent the role of the LSA
+// server (primary or backup).
+//
+
+ _POLICY_LSA_SERVER_ROLE = (plsrFiller0, plsrFiller1, PolicyServerRoleBackup,
+ PolicyServerRolePrimary);
+ {$EXTERNALSYM _POLICY_LSA_SERVER_ROLE}
+ POLICY_LSA_SERVER_ROLE = _POLICY_LSA_SERVER_ROLE;
+ {$EXTERNALSYM POLICY_LSA_SERVER_ROLE}
+ PPOLICY_LSA_SERVER_ROLE = ^POLICY_LSA_SERVER_ROLE;
+ {$EXTERNALSYM PPOLICY_LSA_SERVER_ROLE}
+ TPolicyLsaServerRole = POLICY_LSA_SERVER_ROLE;
+ PPolicyLsaServerRole = PPOLICY_LSA_SERVER_ROLE;
+
+//
+// The following data type is used to specify the auditing options for
+// an Audit Event Type.
+//
+
+ POLICY_AUDIT_EVENT_OPTIONS = ULONG;
+ {$EXTERNALSYM POLICY_AUDIT_EVENT_OPTIONS}
+ PPOLICY_AUDIT_EVENT_OPTIONS = ^POLICY_AUDIT_EVENT_OPTIONS;
+ {$EXTERNALSYM PPOLICY_AUDIT_EVENT_OPTIONS}
+
+// where the following flags can be set:
+//
+// POLICY_AUDIT_EVENT_UNCHANGED - Leave existing auditing options
+// unchanged for events of this type. This flag is only used for
+// set operations. If this flag is set, then all other flags
+// are ignored.
+//
+// POLICY_AUDIT_EVENT_NONE - Cancel all auditing options for events
+// of this type. If this flag is set, the success/failure flags
+// are ignored.
+//
+// POLICY_AUDIT_EVENT_SUCCESS - When auditing is enabled, audit all
+// successful occurrences of events of the given type.
+//
+// POLICY_AUDIT_EVENT_FAILURE - When auditing is enabled, audit all
+// unsuccessful occurrences of events of the given type.
+//
+
+//
+// The following data type defines the classes of Policy Information
+// that may be queried/set.
+//
+
+type
+ _POLICY_INFORMATION_CLASS = (
+ picFiller0,
+ PolicyAuditLogInformation,
+ PolicyAuditEventsInformation,
+ PolicyPrimaryDomainInformation,
+ PolicyPdAccountInformation,
+ PolicyAccountDomainInformation,
+ PolicyLsaServerRoleInformation,
+ PolicyReplicaSourceInformation,
+ PolicyDefaultQuotaInformation,
+ PolicyModificationInformation,
+ PolicyAuditFullSetInformation,
+ PolicyAuditFullQueryInformation,
+ PolicyDnsDomainInformation,
+ PolicyDnsDomainInformationInt);
+ {$EXTERNALSYM _POLICY_INFORMATION_CLASS}
+ POLICY_INFORMATION_CLASS = _POLICY_INFORMATION_CLASS;
+ {$EXTERNALSYM POLICY_INFORMATION_CLASS}
+ PPOLICY_INFORMATION_CLASS = ^POLICY_INFORMATION_CLASS;
+ {$EXTERNALSYM PPOLICY_INFORMATION_CLASS}
+ TPolicyInformationClass = POLICY_INFORMATION_CLASS;
+ PPolicyInformationClass = PPOLICY_INFORMATION_CLASS;
+
+//
+// The following data type corresponds to the PolicyAuditLogInformation
+// information class. It is used to represent information relating to
+// the Audit Log.
+//
+// This structure may be used in both query and set operations. However,
+// when used in set operations, some fields are ignored.
+//
+
+ PPOLICY_AUDIT_LOG_INFO = ^POLICY_AUDIT_LOG_INFO;
+ {$EXTERNALSYM PPOLICY_AUDIT_LOG_INFO}
+ _POLICY_AUDIT_LOG_INFO = record
+ AuditLogPercentFull: ULONG;
+ MaximumLogSize: ULONG;
+ AuditRetentionPeriod: LARGE_INTEGER;
+ AuditLogFullShutdownInProgress: ByteBool;
+ TimeToShutdown: LARGE_INTEGER;
+ NextAuditRecordId: ULONG;
+ end;
+ {$EXTERNALSYM _POLICY_AUDIT_LOG_INFO}
+ POLICY_AUDIT_LOG_INFO = _POLICY_AUDIT_LOG_INFO;
+ {$EXTERNALSYM POLICY_AUDIT_LOG_INFO}
+ TPolicyAuditLogInfo = POLICY_AUDIT_LOG_INFO;
+ PPolicyAuditLogInfo = PPOLICY_AUDIT_LOG_INFO;
+
+// where the members have the following usage:
+//
+// AuditLogPercentFull - Indicates the percentage of the Audit Log
+// currently being used.
+//
+// MaximumLogSize - Specifies the maximum size of the Audit Log in
+// kilobytes.
+//
+// AuditRetentionPeriod - Indicates the length of time that Audit
+// Records are to be retained. Audit Records are discardable
+// if their timestamp predates the current time minus the
+// retention period.
+//
+// AuditLogFullShutdownInProgress - Indicates whether or not a system
+// shutdown is being initiated due to the security Audit Log becoming
+// full. This condition will only occur if the system is configured
+// to shutdown when the log becomes full.
+//
+// TRUE indicates that a shutdown is in progress
+// FALSE indicates that a shutdown is not in progress.
+//
+// Once a shutdown has been initiated, this flag will be set to
+// TRUE. If an administrator is able to currect the situation
+// before the shutdown becomes irreversible, then this flag will
+// be reset to false.
+//
+// This field is ignored for set operations.
+//
+// TimeToShutdown - If the AuditLogFullShutdownInProgress flag is set,
+// then this field contains the time left before the shutdown
+// becomes irreversible.
+//
+// This field is ignored for set operations.
+//
+
+//
+// The following data type corresponds to the PolicyAuditEventsInformation
+// information class. It is used to represent information relating to
+// the audit requirements.
+//
+
+ PPOLICY_AUDIT_EVENTS_INFO = ^POLICY_AUDIT_EVENTS_INFO;
+ {$EXTERNALSYM PPOLICY_AUDIT_EVENTS_INFO}
+ _POLICY_AUDIT_EVENTS_INFO = record
+ AuditingMode: ByteBool;
+ EventAuditingOptions: PPOLICY_AUDIT_EVENT_OPTIONS;
+ MaximumAuditEventCount: ULONG;
+ end;
+ {$EXTERNALSYM _POLICY_AUDIT_EVENTS_INFO}
+ POLICY_AUDIT_EVENTS_INFO = _POLICY_AUDIT_EVENTS_INFO;
+ {$EXTERNALSYM POLICY_AUDIT_EVENTS_INFO}
+ TPolicyAuditEventsInfo = POLICY_AUDIT_EVENTS_INFO;
+ PPolicyAuditEventsInfo = PPOLICY_AUDIT_EVENTS_INFO;
+
+// where the members have the following usage:
+//
+// AuditingMode - A Boolean variable specifying the Auditing Mode value.
+// This value is interpreted as follows:
+//
+// TRUE - Auditing is to be enabled (set operations) or is enabled
+// (query operations). Audit Records will be generated according
+// to the Event Auditing Options in effect (see the
+// EventAuditingOptions field.
+//
+// FALSE - Auditing is to be disabled (set operations) or is
+// disabled (query operations). No Audit Records will be
+// generated. Note that for set operations the Event Auditing
+// Options in effect will still be updated as specified by the
+// EventAuditingOptions field whether Auditing is enabled or
+// disabled.
+//
+// EventAuditingOptions - Pointer to an array of Auditing Options
+// indexed by Audit Event Type.
+//
+// MaximumAuditEventCount - Specifiesa count of the number of Audit
+// Event Types specified by the EventAuditingOptions parameter. If
+// this count is less than the number of Audit Event Types supported
+// by the system, the Auditing Options for Event Types with IDs
+// higher than (MaximumAuditEventCount + 1) are left unchanged.
+//
+
+//
+// The following structure corresponds to the PolicyAccountDomainInformation
+// information class.
+//
+
+ PPOLICY_ACCOUNT_DOMAIN_INFO = ^POLICY_ACCOUNT_DOMAIN_INFO;
+ {$EXTERNALSYM PPOLICY_ACCOUNT_DOMAIN_INFO}
+ _POLICY_ACCOUNT_DOMAIN_INFO = record
+ DomainName: LSA_UNICODE_STRING;
+ DomainSid: PSID;
+ end;
+ {$EXTERNALSYM _POLICY_ACCOUNT_DOMAIN_INFO}
+ POLICY_ACCOUNT_DOMAIN_INFO = _POLICY_ACCOUNT_DOMAIN_INFO;
+ {$EXTERNALSYM POLICY_ACCOUNT_DOMAIN_INFO}
+ TPolicyAccountDomainInfo = POLICY_ACCOUNT_DOMAIN_INFO;
+ PPolicyAccountDomainInfo = PPOLICY_ACCOUNT_DOMAIN_INFO;
+
+// where the members have the following usage:
+//
+// DomainName - Is the name of the domain
+//
+// DomainSid - Is the Sid of the domain
+//
+
+//
+// The following structure corresponds to the PolicyPrimaryDomainInformation
+// information class.
+//
+
+ PPOLICY_PRIMARY_DOMAIN_INFO = ^POLICY_PRIMARY_DOMAIN_INFO;
+ {$EXTERNALSYM PPOLICY_PRIMARY_DOMAIN_INFO}
+ _POLICY_PRIMARY_DOMAIN_INFO = record
+ Name: LSA_UNICODE_STRING;
+ Sid: PSID;
+ end;
+ {$EXTERNALSYM _POLICY_PRIMARY_DOMAIN_INFO}
+ POLICY_PRIMARY_DOMAIN_INFO = _POLICY_PRIMARY_DOMAIN_INFO;
+ {$EXTERNALSYM POLICY_PRIMARY_DOMAIN_INFO}
+ TPolicyPrimaryDomainInfo = POLICY_PRIMARY_DOMAIN_INFO;
+ PPolicyPrimaryDomainInfo = PPOLICY_PRIMARY_DOMAIN_INFO;
+
+// where the members have the following usage:
+//
+// Name - Is the name of the domain
+//
+// Sid - Is the Sid of the domain
+//
+
+//
+// The following structure corresponds to the PolicyDnsDomainInformation
+// information class
+//
+
+ PPOLICY_DNS_DOMAIN_INFO = ^POLICY_DNS_DOMAIN_INFO;
+ {$EXTERNALSYM PPOLICY_DNS_DOMAIN_INFO}
+ _POLICY_DNS_DOMAIN_INFO = record
+ Name: LSA_UNICODE_STRING;
+ DnsDomainName: LSA_UNICODE_STRING;
+ DnsForestName: LSA_UNICODE_STRING;
+ DomainGuid: GUID;
+ Sid: PSID;
+ end;
+ {$EXTERNALSYM _POLICY_DNS_DOMAIN_INFO}
+ POLICY_DNS_DOMAIN_INFO = _POLICY_DNS_DOMAIN_INFO;
+ {$EXTERNALSYM POLICY_DNS_DOMAIN_INFO}
+ TPolicyDnsDomainInfo = POLICY_DNS_DOMAIN_INFO;
+ PPolicyDnsDomainInfo = PPOLICY_DNS_DOMAIN_INFO;
+
+// where the members have the following usage:
+//
+// Name - Is the name of the Domain
+//
+// DnsDomainName - Is the DNS name of the domain
+//
+// DnsForestName - Is the DNS forest name of the domain
+//
+// DomainGuid - Is the GUID of the domain
+//
+// Sid - Is the Sid of the domain
+
+//
+// The following structure corresponds to the PolicyPdAccountInformation
+// information class. This structure may be used in Query operations
+// only.
+//
+
+ PPOLICY_PD_ACCOUNT_INFO = ^POLICY_PD_ACCOUNT_INFO;
+ {$EXTERNALSYM PPOLICY_PD_ACCOUNT_INFO}
+ _POLICY_PD_ACCOUNT_INFO = record
+ Name: LSA_UNICODE_STRING;
+ end;
+ {$EXTERNALSYM _POLICY_PD_ACCOUNT_INFO}
+ POLICY_PD_ACCOUNT_INFO = _POLICY_PD_ACCOUNT_INFO;
+ {$EXTERNALSYM POLICY_PD_ACCOUNT_INFO}
+ TPolicyPdAccountInfo = POLICY_PD_ACCOUNT_INFO;
+ PPolicyPdAccountInfo = PPOLICY_PD_ACCOUNT_INFO;
+
+// where the members have the following usage:
+//
+// Name - Is the name of an account in the domain that should be used
+// for authentication and name/ID lookup requests.
+//
+
+//
+// The following structure corresponds to the PolicyLsaServerRoleInformation
+// information class.
+//
+
+ PPOLICY_LSA_SERVER_ROLE_INFO = ^POLICY_LSA_SERVER_ROLE_INFO;
+ {$EXTERNALSYM PPOLICY_LSA_SERVER_ROLE_INFO}
+ _POLICY_LSA_SERVER_ROLE_INFO = record
+ LsaServerRole: POLICY_LSA_SERVER_ROLE;
+ end;
+ {$EXTERNALSYM _POLICY_LSA_SERVER_ROLE_INFO}
+ POLICY_LSA_SERVER_ROLE_INFO = _POLICY_LSA_SERVER_ROLE_INFO;
+ {$EXTERNALSYM POLICY_LSA_SERVER_ROLE_INFO}
+ TPolicyLsaServerRoleInfo = POLICY_LSA_SERVER_ROLE_INFO;
+ PPolicyLsaServerRoleInfo = PPOLICY_LSA_SERVER_ROLE_INFO;
+
+// where the fields have the following usage:
+//
+// TBS
+//
+
+//
+// The following structure corresponds to the PolicyReplicaSourceInformation
+// information class.
+//
+
+ PPOLICY_REPLICA_SOURCE_INFO = ^POLICY_REPLICA_SOURCE_INFO;
+ {$EXTERNALSYM PPOLICY_REPLICA_SOURCE_INFO}
+ _POLICY_REPLICA_SOURCE_INFO = record
+ ReplicaSource: LSA_UNICODE_STRING;
+ ReplicaAccountName: LSA_UNICODE_STRING;
+ end;
+ {$EXTERNALSYM _POLICY_REPLICA_SOURCE_INFO}
+ POLICY_REPLICA_SOURCE_INFO = _POLICY_REPLICA_SOURCE_INFO;
+ {$EXTERNALSYM POLICY_REPLICA_SOURCE_INFO}
+ TPolicyReplicaSourceInfo = POLICY_REPLICA_SOURCE_INFO;
+ PPolicyReplicaSourceInfo = PPOLICY_REPLICA_SOURCE_INFO;
+
+//
+// The following structure corresponds to the PolicyDefaultQuotaInformation
+// information class.
+//
+
+ PPOLICY_DEFAULT_QUOTA_INFO = ^POLICY_DEFAULT_QUOTA_INFO;
+ {$EXTERNALSYM PPOLICY_DEFAULT_QUOTA_INFO}
+ _POLICY_DEFAULT_QUOTA_INFO = record
+ QuotaLimits: QUOTA_LIMITS;
+ end;
+ {$EXTERNALSYM _POLICY_DEFAULT_QUOTA_INFO}
+ POLICY_DEFAULT_QUOTA_INFO = _POLICY_DEFAULT_QUOTA_INFO;
+ {$EXTERNALSYM POLICY_DEFAULT_QUOTA_INFO}
+ TPolicyDefaultQuotaInfo = POLICY_DEFAULT_QUOTA_INFO;
+ PPolicyDefaultQuotaInfo = PPOLICY_DEFAULT_QUOTA_INFO;
+
+//
+// The following structure corresponds to the PolicyModificationInformation
+// information class.
+//
+
+ PPOLICY_MODIFICATION_INFO = ^POLICY_MODIFICATION_INFO;
+ {$EXTERNALSYM PPOLICY_MODIFICATION_INFO}
+ _POLICY_MODIFICATION_INFO = record
+ ModifiedId: LARGE_INTEGER;
+ DatabaseCreationTime: LARGE_INTEGER;
+ end;
+ {$EXTERNALSYM _POLICY_MODIFICATION_INFO}
+ POLICY_MODIFICATION_INFO = _POLICY_MODIFICATION_INFO;
+ {$EXTERNALSYM POLICY_MODIFICATION_INFO}
+ TPolicyModificationInfo = POLICY_MODIFICATION_INFO;
+ PPolicyModificationInfo = PPOLICY_MODIFICATION_INFO;
+
+// where the members have the following usage:
+//
+// ModifiedId - Is a 64-bit unsigned integer that is incremented each
+// time anything in the LSA database is modified. This value is
+// only modified on Primary Domain Controllers.
+//
+// DatabaseCreationTime - Is the date/time that the LSA Database was
+// created. On Backup Domain Controllers, this value is replicated
+// from the Primary Domain Controller.
+//
+
+//
+// The following structure type corresponds to the PolicyAuditFullSetInformation
+// Information Class.
+//
+
+ PPOLICY_AUDIT_FULL_SET_INFO = ^POLICY_AUDIT_FULL_SET_INFO;
+ {$EXTERNALSYM PPOLICY_AUDIT_FULL_SET_INFO}
+ _POLICY_AUDIT_FULL_SET_INFO = record
+ ShutDownOnFull: ByteBool;
+ end;
+ {$EXTERNALSYM _POLICY_AUDIT_FULL_SET_INFO}
+ POLICY_AUDIT_FULL_SET_INFO = _POLICY_AUDIT_FULL_SET_INFO;
+ {$EXTERNALSYM POLICY_AUDIT_FULL_SET_INFO}
+ TPolicyAuditFullSetInfo = POLICY_AUDIT_FULL_SET_INFO;
+ PPolicyAuditFullSetInfo = PPOLICY_AUDIT_FULL_SET_INFO;
+
+//
+// The following structure type corresponds to the PolicyAuditFullQueryInformation
+// Information Class.
+//
+
+ PPOLICY_AUDIT_FULL_QUERY_INFO = ^POLICY_AUDIT_FULL_QUERY_INFO;
+ {$EXTERNALSYM PPOLICY_AUDIT_FULL_QUERY_INFO}
+ _POLICY_AUDIT_FULL_QUERY_INFO = record
+ ShutDownOnFull: ByteBool;
+ LogIsFull: ByteBool;
+ end;
+ {$EXTERNALSYM _POLICY_AUDIT_FULL_QUERY_INFO}
+ POLICY_AUDIT_FULL_QUERY_INFO = _POLICY_AUDIT_FULL_QUERY_INFO;
+ {$EXTERNALSYM POLICY_AUDIT_FULL_QUERY_INFO}
+ TPolicyAuditFullQueryInfo = POLICY_AUDIT_FULL_QUERY_INFO;
+ PPolicyAuditFullQueryInfo = PPOLICY_AUDIT_FULL_QUERY_INFO;
+
+//
+// The following data type defines the classes of Policy Information
+// that may be queried/set that has domain wide effect.
+//
+
+ _POLICY_DOMAIN_INFORMATION_CLASS = (
+ pdicFiller0,
+ PolicyDomainQualityOfServiceInformation, // value was used in W2K; no longer supported
+ PolicyDomainEfsInformation,
+ PolicyDomainKerberosTicketInformation);
+ {$EXTERNALSYM _POLICY_DOMAIN_INFORMATION_CLASS}
+ POLICY_DOMAIN_INFORMATION_CLASS = _POLICY_DOMAIN_INFORMATION_CLASS;
+ {$EXTERNALSYM POLICY_DOMAIN_INFORMATION_CLASS}
+ PPOLICY_DOMAIN_INFORMATION_CLASS = ^POLICY_DOMAIN_INFORMATION_CLASS;
+ {$EXTERNALSYM PPOLICY_DOMAIN_INFORMATION_CLASS}
+ TPolicyDomainInformationClass = POLICY_DOMAIN_INFORMATION_CLASS;
+ PPolicyDomainInformationClass = PPOLICY_DOMAIN_INFORMATION_CLASS;
+
+type
+ // mvb has dissapeared in november 2002 release!
+
+ PPOLICY_DOMAIN_QUALITY_OF_SERVICE_INFO = ^POLICY_DOMAIN_QUALITY_OF_SERVICE_INFO;
+ {$EXTERNALSYM PPOLICY_DOMAIN_QUALITY_OF_SERVICE_INFO}
+ _POLICY_DOMAIN_QUALITY_OF_SERVICE_INFO = record
+ QualityOfService: ULONG;
+ end;
+ {$EXTERNALSYM _POLICY_DOMAIN_QUALITY_OF_SERVICE_INFO}
+ POLICY_DOMAIN_QUALITY_OF_SERVICE_INFO = _POLICY_DOMAIN_QUALITY_OF_SERVICE_INFO;
+ {$EXTERNALSYM POLICY_DOMAIN_QUALITY_OF_SERVICE_INFO}
+ TPolicyDomainQualityOfServiceInfo = POLICY_DOMAIN_QUALITY_OF_SERVICE_INFO;
+ PPolicyDomainQualityOfServiceInfo = PPOLICY_DOMAIN_QUALITY_OF_SERVICE_INFO;
+
+//
+// where the members have the following usage:
+//
+// QualityOfService - Determines what specific QOS actions a machine should take
+//
+
+//
+// The following structure corresponds to the PolicyEfsInformation
+// information class
+//
+
+ PPOLICY_DOMAIN_EFS_INFO = ^POLICY_DOMAIN_EFS_INFO;
+ {$EXTERNALSYM PPOLICY_DOMAIN_EFS_INFO}
+ _POLICY_DOMAIN_EFS_INFO = record
+ InfoLength: ULONG;
+ EfsBlob: PUCHAR;
+ end;
+ {$EXTERNALSYM _POLICY_DOMAIN_EFS_INFO}
+ POLICY_DOMAIN_EFS_INFO = _POLICY_DOMAIN_EFS_INFO;
+ {$EXTERNALSYM POLICY_DOMAIN_EFS_INFO}
+ TPolicyDomainEfsInfo = POLICY_DOMAIN_EFS_INFO;
+ PPolicyDomainEfsInfo = PPOLICY_DOMAIN_EFS_INFO;
+
+// where the members have the following usage:
+//
+// InfoLength - Length of the EFS Information blob
+//
+// EfsBlob - Efs blob data
+//
+
+//
+// The following structure corresponds to the PolicyDomainKerberosTicketInformation
+// information class
+
+const
+ POLICY_KERBEROS_VALIDATE_CLIENT = $00000080;
+ {$EXTERNALSYM POLICY_KERBEROS_VALIDATE_CLIENT}
+
+type
+ PPOLICY_DOMAIN_KERBEROS_TICKET_INFO = ^POLICY_DOMAIN_KERBEROS_TICKET_INFO;
+ {$EXTERNALSYM PPOLICY_DOMAIN_KERBEROS_TICKET_INFO}
+ _POLICY_DOMAIN_KERBEROS_TICKET_INFO = record
+ AuthenticationOptions: ULONG;
+ MaxServiceTicketAge: LARGE_INTEGER;
+ MaxTicketAge: LARGE_INTEGER;
+ MaxRenewAge: LARGE_INTEGER;
+ MaxClockSkew: LARGE_INTEGER;
+ Reserved: LARGE_INTEGER;
+ end;
+ {$EXTERNALSYM _POLICY_DOMAIN_KERBEROS_TICKET_INFO}
+ POLICY_DOMAIN_KERBEROS_TICKET_INFO = _POLICY_DOMAIN_KERBEROS_TICKET_INFO;
+ {$EXTERNALSYM POLICY_DOMAIN_KERBEROS_TICKET_INFO}
+ TPolicyDomainKerberosTicketInfo = POLICY_DOMAIN_KERBEROS_TICKET_INFO;
+ PPolicyDomainKerberosTicketInfo = PPOLICY_DOMAIN_KERBEROS_TICKET_INFO;
+
+//
+// where the members have the following usage
+//
+// AuthenticationOptions -- allowed ticket options (POLICY_KERBEROS_* flags )
+//
+// MaxServiceTicketAge -- Maximum lifetime for a service ticket
+//
+// MaxTicketAge -- Maximum lifetime for the initial ticket
+//
+// MaxRenewAge -- Maximum cumulative age a renewable ticket can be with
+// requring authentication
+//
+// MaxClockSkew -- Maximum tolerance for synchronization of computer clocks
+//
+// Reserved -- Reserved
+
+//
+// The following data type defines the classes of Policy Information / Policy Domain Information
+// that may be used to request notification
+//
+
+ _POLICY_NOTIFICATION_INFORMATION_CLASS = (
+ pnicFiller0,
+ PolicyNotifyAuditEventsInformation,
+ PolicyNotifyAccountDomainInformation,
+ PolicyNotifyServerRoleInformation,
+ PolicyNotifyDnsDomainInformation,
+ PolicyNotifyDomainEfsInformation,
+ PolicyNotifyDomainKerberosTicketInformation,
+ PolicyNotifyMachineAccountPasswordInformation);
+ {$EXTERNALSYM _POLICY_NOTIFICATION_INFORMATION_CLASS}
+ POLICY_NOTIFICATION_INFORMATION_CLASS = _POLICY_NOTIFICATION_INFORMATION_CLASS;
+ {$EXTERNALSYM POLICY_NOTIFICATION_INFORMATION_CLASS}
+ PPOLICY_NOTIFICATION_INFORMATION_CLASS = ^POLICY_NOTIFICATION_INFORMATION_CLASS;
+ {$EXTERNALSYM PPOLICY_NOTIFICATION_INFORMATION_CLASS}
+ TPolicyNotificationInformationClass = POLICY_NOTIFICATION_INFORMATION_CLASS;
+ PPolicyNotificationInformationClass = PPOLICY_NOTIFICATION_INFORMATION_CLASS;
+
+//
+// LSA RPC Context Handle (Opaque form). Note that a Context Handle is
+// always a pointer type unlike regular handles.
+//
+
+ LSA_HANDLE = PVOID;
+ {$EXTERNALSYM LSA_HANDLE}
+ PLSA_HANDLE = ^LSA_HANDLE;
+ {$EXTERNALSYM PLSA_HANDLE}
+ TLsaHandle = LSA_HANDLE;
+
+//
+// Trusted Domain Object specific data types
+//
+
+//
+// This data type defines the following information classes that may be
+// queried or set.
+//
+
+ _TRUSTED_INFORMATION_CLASS = (
+ ticFiller0,
+ TrustedDomainNameInformation,
+ TrustedControllersInformation,
+ TrustedPosixOffsetInformation,
+ TrustedPasswordInformation,
+ TrustedDomainInformationBasic,
+ TrustedDomainInformationEx,
+ TrustedDomainAuthInformation,
+ TrustedDomainFullInformation,
+ TrustedDomainAuthInformationInternal,
+ TrustedDomainFullInformationInternal,
+ TrustedDomainInformationEx2Internal,
+ TrustedDomainFullInformation2Internal);
+ {$EXTERNALSYM _TRUSTED_INFORMATION_CLASS}
+ TRUSTED_INFORMATION_CLASS = _TRUSTED_INFORMATION_CLASS;
+ {$EXTERNALSYM TRUSTED_INFORMATION_CLASS}
+ PTRUSTED_INFORMATION_CLASS = ^TRUSTED_INFORMATION_CLASS;
+ {$EXTERNALSYM PTRUSTED_INFORMATION_CLASS}
+ TTrustedInfomationClass = TRUSTED_INFORMATION_CLASS;
+ PTrustedInfomationClass = PTRUSTED_INFORMATION_CLASS;
+
+//
+// The following data type corresponds to the TrustedDomainNameInformation
+// information class.
+//
+
+ PTRUSTED_DOMAIN_NAME_INFO = ^TRUSTED_DOMAIN_NAME_INFO;
+ {$EXTERNALSYM PTRUSTED_DOMAIN_NAME_INFO}
+ _TRUSTED_DOMAIN_NAME_INFO = record
+ Name: LSA_UNICODE_STRING;
+ end;
+ {$EXTERNALSYM _TRUSTED_DOMAIN_NAME_INFO}
+ TRUSTED_DOMAIN_NAME_INFO = _TRUSTED_DOMAIN_NAME_INFO;
+ {$EXTERNALSYM TRUSTED_DOMAIN_NAME_INFO}
+ TTrustedDomainNameInfo = TRUSTED_DOMAIN_NAME_INFO;
+ PTrustedDomainNameInfo = PTRUSTED_DOMAIN_NAME_INFO;
+
+// where members have the following meaning:
+//
+// Name - The name of the Trusted Domain.
+//
+
+//
+// The following data type corresponds to the TrustedControllersInformation
+// information class.
+//
+
+ PTRUSTED_CONTROLLERS_INFO = ^TRUSTED_CONTROLLERS_INFO;
+ {$EXTERNALSYM PTRUSTED_CONTROLLERS_INFO}
+ _TRUSTED_CONTROLLERS_INFO = record
+ Entries: ULONG;
+ Names: PLSA_UNICODE_STRING;
+ end;
+ {$EXTERNALSYM _TRUSTED_CONTROLLERS_INFO}
+ TRUSTED_CONTROLLERS_INFO = _TRUSTED_CONTROLLERS_INFO;
+ {$EXTERNALSYM TRUSTED_CONTROLLERS_INFO}
+ TTrustedControllersInfo = TRUSTED_CONTROLLERS_INFO;
+ PTrustedControllersInfo = PTRUSTED_CONTROLLERS_INFO;
+
+// where members have the following meaning:
+//
+// Entries - Indicate how mamy entries there are in the Names array.
+//
+// Names - Pointer to an array of LSA_UNICODE_STRING structures containing the
+// names of domain controllers of the domain. This information may not
+// be accurate and should be used only as a hint. The order of this
+// list is considered significant and will be maintained.
+//
+// By convention, the first name in this list is assumed to be the
+// Primary Domain Controller of the domain. If the Primary Domain
+// Controller is not known, the first name should be set to the NULL
+// string.
+//
+
+//
+// The following data type corresponds to the TrustedPosixOffsetInformation
+// information class.
+//
+
+ PTRUSTED_POSIX_OFFSET_INFO = ^TRUSTED_POSIX_OFFSET_INFO;
+ {$EXTERNALSYM PTRUSTED_POSIX_OFFSET_INFO}
+ _TRUSTED_POSIX_OFFSET_INFO = record
+ Offset: ULONG;
+ end;
+ {$EXTERNALSYM _TRUSTED_POSIX_OFFSET_INFO}
+ TRUSTED_POSIX_OFFSET_INFO = _TRUSTED_POSIX_OFFSET_INFO;
+ {$EXTERNALSYM TRUSTED_POSIX_OFFSET_INFO}
+ TTrustedPosixOffsetInfo = TRUSTED_POSIX_OFFSET_INFO;
+ PTrustedPosixOffsetInfo = PTRUSTED_POSIX_OFFSET_INFO;
+
+// where members have the following meaning:
+//
+// Offset - Is an offset to use for the generation of Posix user and group
+// IDs from SIDs. The Posix ID corresponding to any particular SID is
+// generated by adding the RID of that SID to the Offset of the SID's
+// corresponding TrustedDomain object.
+//
+
+//
+// The following data type corresponds to the TrustedPasswordInformation
+// information class.
+//
+
+ PTRUSTED_PASSWORD_INFO = ^TRUSTED_PASSWORD_INFO;
+ {$EXTERNALSYM PTRUSTED_PASSWORD_INFO}
+ _TRUSTED_PASSWORD_INFO = record
+ Password: LSA_UNICODE_STRING;
+ OldPassword: LSA_UNICODE_STRING;
+ end;
+ {$EXTERNALSYM _TRUSTED_PASSWORD_INFO}
+ TRUSTED_PASSWORD_INFO = _TRUSTED_PASSWORD_INFO;
+ {$EXTERNALSYM TRUSTED_PASSWORD_INFO}
+ TTrustedPasswordInfo = TRUSTED_PASSWORD_INFO;
+ PTrustedPasswordInfo = PTRUSTED_PASSWORD_INFO;
+
+ TRUSTED_DOMAIN_INFORMATION_BASIC = LSA_TRUST_INFORMATION;
+ {$EXTERNALSYM TRUSTED_DOMAIN_INFORMATION_BASIC}
+ PTRUSTED_DOMAIN_INFORMATION_BASIC = PLSA_TRUST_INFORMATION;
+ {$EXTERNALSYM PTRUSTED_DOMAIN_INFORMATION_BASIC}
+ TTrustedDomainInformationBasic = TRUSTED_DOMAIN_INFORMATION_BASIC;
+ PTrustedDomainInformationBasic = PTRUSTED_DOMAIN_INFORMATION_BASIC;
+
+//
+// Direction of the trust
+//
+
+const
+ TRUST_DIRECTION_DISABLED = $00000000;
+ {$EXTERNALSYM TRUST_DIRECTION_DISABLED}
+ TRUST_DIRECTION_INBOUND = $00000001;
+ {$EXTERNALSYM TRUST_DIRECTION_INBOUND}
+ TRUST_DIRECTION_OUTBOUND = $00000002;
+ {$EXTERNALSYM TRUST_DIRECTION_OUTBOUND}
+ TRUST_DIRECTION_BIDIRECTIONAL = TRUST_DIRECTION_INBOUND or TRUST_DIRECTION_OUTBOUND;
+ {$EXTERNALSYM TRUST_DIRECTION_BIDIRECTIONAL}
+
+ TRUST_TYPE_DOWNLEVEL = $00000001; // NT4 and before
+ {$EXTERNALSYM TRUST_TYPE_DOWNLEVEL}
+ TRUST_TYPE_UPLEVEL = $00000002; // NT5
+ {$EXTERNALSYM TRUST_TYPE_UPLEVEL}
+ TRUST_TYPE_MIT = $00000003; // Trust with a MIT Kerberos realm
+ {$EXTERNALSYM TRUST_TYPE_MIT}
+// TRUST_TYPE_DCE = $00000004; // Trust with a DCE realm
+// {$EXTERNALSYM TRUST_TYPE_DCE}
+// Levels 0x5 - 0x000FFFFF reserved for future use
+// Provider specific trust levels are from 0x00100000 to 0xFFF00000
+
+ TRUST_ATTRIBUTE_NON_TRANSITIVE = $00000001; // Disallow transitivity
+ {$EXTERNALSYM TRUST_ATTRIBUTE_NON_TRANSITIVE}
+ TRUST_ATTRIBUTE_UPLEVEL_ONLY = $00000002; // Trust link only valid for uplevel client
+ {$EXTERNALSYM TRUST_ATTRIBUTE_UPLEVEL_ONLY}
+ TRUST_ATTRIBUTE_QUARANTINED_DOMAIN = $00000004; // Used to quarantine domains
+ {$EXTERNALSYM TRUST_ATTRIBUTE_QUARANTINED_DOMAIN}
+ TRUST_ATTRIBUTE_FOREST_TRANSITIVE = $00000008; // This link may contain forest trust information
+ {$EXTERNALSYM TRUST_ATTRIBUTE_FOREST_TRANSITIVE}
+ TRUST_ATTRIBUTE_CROSS_ORGANIZATION = $00000010; // This trust is to a domain/forest which is not part of this enterprise
+ {$EXTERNALSYM TRUST_ATTRIBUTE_CROSS_ORGANIZATION}
+ TRUST_ATTRIBUTE_WITHIN_FOREST = $00000020; // Trust is internal to this forest
+ {$EXTERNALSYM TRUST_ATTRIBUTE_WITHIN_FOREST}
+ TRUST_ATTRIBUTE_TREAT_AS_EXTERNAL = $00000040; // Trust is to be treated as external for trust boundary purposes
+ {$EXTERNALSYM TRUST_ATTRIBUTE_TREAT_AS_EXTERNAL}
+
+// Trust attributes 0x00000040 through 0x00200000 are reserved for future use
+// Trust attributes 0x00400000 through 0x00800000 were used previously (up to W2K) and should not be re-used
+// Trust attributes 0x01000000 through 0x80000000 are reserved for user
+
+ TRUST_ATTRIBUTES_VALID = DWORD($FF03FFFF);
+ {$EXTERNALSYM TRUST_ATTRIBUTES_VALID}
+ TRUST_ATTRIBUTES_USER = DWORD($FF000000);
+ {$EXTERNALSYM TRUST_ATTRIBUTES_USER}
+
+type
+ PTRUSTED_DOMAIN_INFORMATION_EX = ^TRUSTED_DOMAIN_INFORMATION_EX;
+ {$EXTERNALSYM PTRUSTED_DOMAIN_INFORMATION_EX}
+ _TRUSTED_DOMAIN_INFORMATION_EX = record
+ Name: LSA_UNICODE_STRING;
+ FlatName: LSA_UNICODE_STRING;
+ Sid: PSID;
+ TrustDirection: ULONG;
+ TrustType: ULONG;
+ TrustAttributes: ULONG;
+ end;
+ {$EXTERNALSYM _TRUSTED_DOMAIN_INFORMATION_EX}
+ TRUSTED_DOMAIN_INFORMATION_EX = _TRUSTED_DOMAIN_INFORMATION_EX;
+ {$EXTERNALSYM TRUSTED_DOMAIN_INFORMATION_EX}
+ TTrustedDomainInformationEx = TRUSTED_DOMAIN_INFORMATION_EX;
+ PTrustedDomainInformationEx = PTRUSTED_DOMAIN_INFORMATION_EX;
+
+ _TRUSTED_DOMAIN_INFORMATION_EX2 = record
+ Name: LSA_UNICODE_STRING;
+ FlatName: LSA_UNICODE_STRING;
+ Sid: PSID;
+ TrustDirection: ULONG;
+ TrustType: ULONG;
+ TrustAttributes: ULONG;
+ ForestTrustLength: ULONG;
+ ForestTrustInfo: PUCHAR;
+ end;
+ {$EXTERNALSYM _TRUSTED_DOMAIN_INFORMATION_EX2}
+ TRUSTED_DOMAIN_INFORMATION_EX2 = _TRUSTED_DOMAIN_INFORMATION_EX2;
+ {$EXTERNALSYM TRUSTED_DOMAIN_INFORMATION_EX2}
+ PTRUSTED_DOMAIN_INFORMATION_EX2 = ^TRUSTED_DOMAIN_INFORMATION_EX2;
+ {$EXTERNALSYM PTRUSTED_DOMAIN_INFORMATION_EX2}
+ TTrustedDomainInformationEx2 = TRUSTED_DOMAIN_INFORMATION_EX2;
+ PTrustedDomainInformationEx2 = PTRUSTED_DOMAIN_INFORMATION_EX2;
+
+//
+// Type of authentication information
+//
+
+const
+ TRUST_AUTH_TYPE_NONE = 0; // Ignore this entry
+ {$EXTERNALSYM TRUST_AUTH_TYPE_NONE}
+ TRUST_AUTH_TYPE_NT4OWF = 1; // NT4 OWF password
+ {$EXTERNALSYM TRUST_AUTH_TYPE_NT4OWF}
+ TRUST_AUTH_TYPE_CLEAR = 2; // Cleartext password
+ {$EXTERNALSYM TRUST_AUTH_TYPE_CLEAR}
+ TRUST_AUTH_TYPE_VERSION = 3; // Cleartext password version number
+ {$EXTERNALSYM TRUST_AUTH_TYPE_VERSION}
+
+type
+ PLSA_AUTH_INFORMATION = ^LSA_AUTH_INFORMATION;
+ {$EXTERNALSYM PLSA_AUTH_INFORMATION}
+ _LSA_AUTH_INFORMATION = record
+ LastUpdateTime: LARGE_INTEGER;
+ AuthType: ULONG;
+ AuthInfoLength: ULONG;
+ AuthInfo: PUCHAR;
+ end;
+ {$EXTERNALSYM _LSA_AUTH_INFORMATION}
+ LSA_AUTH_INFORMATION = _LSA_AUTH_INFORMATION;
+ {$EXTERNALSYM LSA_AUTH_INFORMATION}
+ TLsaAuthInformation = LSA_AUTH_INFORMATION;
+ PLsaAuthInformation = PLSA_AUTH_INFORMATION;
+
+ PTRUSTED_DOMAIN_AUTH_INFORMATION = ^TRUSTED_DOMAIN_AUTH_INFORMATION;
+ {$EXTERNALSYM PTRUSTED_DOMAIN_AUTH_INFORMATION}
+ _TRUSTED_DOMAIN_AUTH_INFORMATION = record
+ IncomingAuthInfos: ULONG;
+ IncomingAuthenticationInformation: PLSA_AUTH_INFORMATION;
+ IncomingPreviousAuthenticationInformation: PLSA_AUTH_INFORMATION;
+ OutgoingAuthInfos: ULONG;
+ OutgoingAuthenticationInformation: PLSA_AUTH_INFORMATION;
+ OutgoingPreviousAuthenticationInformation: PLSA_AUTH_INFORMATION;
+ end;
+ {$EXTERNALSYM _TRUSTED_DOMAIN_AUTH_INFORMATION}
+ TRUSTED_DOMAIN_AUTH_INFORMATION = _TRUSTED_DOMAIN_AUTH_INFORMATION;
+ {$EXTERNALSYM TRUSTED_DOMAIN_AUTH_INFORMATION}
+ TTrustedDomainAuthInformation = TRUSTED_DOMAIN_AUTH_INFORMATION;
+ PTrustedDomainAuthInformation = PTRUSTED_DOMAIN_AUTH_INFORMATION;
+
+ PTRUSTED_DOMAIN_FULL_INFORMATION = ^TRUSTED_DOMAIN_FULL_INFORMATION;
+ {$EXTERNALSYM PTRUSTED_DOMAIN_FULL_INFORMATION}
+ _TRUSTED_DOMAIN_FULL_INFORMATION = record
+ Information: TRUSTED_DOMAIN_INFORMATION_EX;
+ PosixOffset: TRUSTED_POSIX_OFFSET_INFO;
+ AuthInformation: TRUSTED_DOMAIN_AUTH_INFORMATION;
+ end;
+ {$EXTERNALSYM _TRUSTED_DOMAIN_FULL_INFORMATION}
+ TRUSTED_DOMAIN_FULL_INFORMATION = _TRUSTED_DOMAIN_FULL_INFORMATION;
+ {$EXTERNALSYM TRUSTED_DOMAIN_FULL_INFORMATION}
+ TTrustedDomainFullInformation = TRUSTED_DOMAIN_FULL_INFORMATION;
+ PTrustedDomainFullInformation = PTRUSTED_DOMAIN_FULL_INFORMATION;
+
+ PTRUSTED_DOMAIN_FULL_INFORMATION2 = ^TRUSTED_DOMAIN_FULL_INFORMATION2;
+ {$EXTERNALSYM PTRUSTED_DOMAIN_FULL_INFORMATION2}
+ _TRUSTED_DOMAIN_FULL_INFORMATION2 = record
+ Information: TRUSTED_DOMAIN_INFORMATION_EX2;
+ PosixOffset: TRUSTED_POSIX_OFFSET_INFO;
+ AuthInformation: TRUSTED_DOMAIN_AUTH_INFORMATION;
+ end;
+ {$EXTERNALSYM _TRUSTED_DOMAIN_FULL_INFORMATION2}
+ TRUSTED_DOMAIN_FULL_INFORMATION2 = _TRUSTED_DOMAIN_FULL_INFORMATION2;
+ {$EXTERNALSYM TRUSTED_DOMAIN_FULL_INFORMATION2}
+ TTrustedDomainFullInformation2 = TRUSTED_DOMAIN_FULL_INFORMATION2;
+ PTrustedDomainFullInformation2 = PTRUSTED_DOMAIN_FULL_INFORMATION2;
+
+ LSA_FOREST_TRUST_RECORD_TYPE = (
+ ForestTrustTopLevelName,
+ ForestTrustTopLevelNameEx,
+ ForestTrustDomainInfo);
+ {$EXTERNALSYM LSA_FOREST_TRUST_RECORD_TYPE}
+ TLsaForestTrustRecordType = LSA_FOREST_TRUST_RECORD_TYPE;
+
+const
+ ForestTrustRecordTypeLast = ForestTrustDomainInfo;
+ {$EXTERNALSYM ForestTrustRecordTypeLast}
+
+//
+// Bottom 16 bits of the flags are reserved for disablement reasons
+//
+
+ LSA_FTRECORD_DISABLED_REASONS = $0000FFFF;
+ {$EXTERNALSYM LSA_FTRECORD_DISABLED_REASONS}
+
+//
+// Reasons for a top-level name forest trust record to be disabled
+//
+
+ LSA_TLN_DISABLED_NEW = $00000001;
+ {$EXTERNALSYM LSA_TLN_DISABLED_NEW}
+ LSA_TLN_DISABLED_ADMIN = $00000002;
+ {$EXTERNALSYM LSA_TLN_DISABLED_ADMIN}
+ LSA_TLN_DISABLED_CONFLICT = $00000004;
+ {$EXTERNALSYM LSA_TLN_DISABLED_CONFLICT}
+
+//
+// Reasons for a domain information forest trust record to be disabled
+//
+
+ LSA_SID_DISABLED_ADMIN = $00000001;
+ {$EXTERNALSYM LSA_SID_DISABLED_ADMIN}
+ LSA_SID_DISABLED_CONFLICT = $00000002;
+ {$EXTERNALSYM LSA_SID_DISABLED_CONFLICT}
+ LSA_NB_DISABLED_ADMIN = $00000004;
+ {$EXTERNALSYM LSA_NB_DISABLED_ADMIN}
+ LSA_NB_DISABLED_CONFLICT = $00000008;
+ {$EXTERNALSYM LSA_NB_DISABLED_CONFLICT}
+
+type
+ PLSA_FOREST_TRUST_DOMAIN_INFO = ^LSA_FOREST_TRUST_DOMAIN_INFO;
+ {$EXTERNALSYM PLSA_FOREST_TRUST_DOMAIN_INFO}
+ _LSA_FOREST_TRUST_DOMAIN_INFO = record
+ Sid: PSID;
+ DnsName: LSA_UNICODE_STRING;
+ NetbiosName: LSA_UNICODE_STRING;
+ end;
+ {$EXTERNALSYM _LSA_FOREST_TRUST_DOMAIN_INFO}
+ LSA_FOREST_TRUST_DOMAIN_INFO = _LSA_FOREST_TRUST_DOMAIN_INFO;
+ {$EXTERNALSYM LSA_FOREST_TRUST_DOMAIN_INFO}
+ TLsaForestTrustDomainInfo = LSA_FOREST_TRUST_DOMAIN_INFO;
+ PLsaForestTrustDomainInfo = PLSA_FOREST_TRUST_DOMAIN_INFO;
+
+//
+// To prevent huge data to be passed in, we should put a limit on LSA_FOREST_TRUST_BINARY_DATA.
+// 128K is large enough that can't be reached in the near future, and small enough not to
+// cause memory problems.
+
+const
+ MAX_FOREST_TRUST_BINARY_DATA_SIZE = 128 * 1024;
+ {$EXTERNALSYM MAX_FOREST_TRUST_BINARY_DATA_SIZE}
+
+type
+ PLSA_FOREST_TRUST_BINARY_DATA = ^LSA_FOREST_TRUST_BINARY_DATA;
+ {$EXTERNALSYM PLSA_FOREST_TRUST_BINARY_DATA}
+ _LSA_FOREST_TRUST_BINARY_DATA = record
+ Length: ULONG;
+ Buffer: PUCHAR;
+ end;
+ {$EXTERNALSYM _LSA_FOREST_TRUST_BINARY_DATA}
+ LSA_FOREST_TRUST_BINARY_DATA = _LSA_FOREST_TRUST_BINARY_DATA;
+ {$EXTERNALSYM LSA_FOREST_TRUST_BINARY_DATA}
+ TLsaForestTrustBinaryData = LSA_FOREST_TRUST_BINARY_DATA;
+ PLsaForestTrustBinaryData = PLSA_FOREST_TRUST_BINARY_DATA;
+
+ PLSA_FOREST_TRUST_RECORD = ^LSA_FOREST_TRUST_RECORD;
+ {$EXTERNALSYM PLSA_FOREST_TRUST_RECORD}
+ _LSA_FOREST_TRUST_RECORD = record
+ Flags: ULONG;
+ ForestTrustType: LSA_FOREST_TRUST_RECORD_TYPE; // type of record
+ Time: LARGE_INTEGER;
+ case Integer of // actual data
+ 0: (TopLevelName: LSA_UNICODE_STRING);
+ 1: (DomainInfo: LSA_FOREST_TRUST_DOMAIN_INFO);
+ 2: (Data: LSA_FOREST_TRUST_BINARY_DATA); // used for unrecognized types
+ // } ForestTrustData;
+ end;
+ {$EXTERNALSYM _LSA_FOREST_TRUST_RECORD}
+ LSA_FOREST_TRUST_RECORD = _LSA_FOREST_TRUST_RECORD;
+ {$EXTERNALSYM LSA_FOREST_TRUST_RECORD}
+ TLsaForestTrustRecord = LSA_FOREST_TRUST_RECORD;
+ PLsaForestTrustRecord = PLSA_FOREST_TRUST_RECORD;
+
+//
+// To prevent forest trust blobs of large size, number of records must be
+// smaller than MAX_RECORDS_IN_FOREST_TRUST_INFO
+//
+
+const
+ MAX_RECORDS_IN_FOREST_TRUST_INFO = 4000;
+ {$EXTERNALSYM MAX_RECORDS_IN_FOREST_TRUST_INFO}
+
+type
+ PLSA_FOREST_TRUST_INFORMATION = ^LSA_FOREST_TRUST_INFORMATION;
+ {$EXTERNALSYM PLSA_FOREST_TRUST_INFORMATION}
+ _LSA_FOREST_TRUST_INFORMATION = record
+ RecordCount: ULONG;
+ Entries: ^PLSA_FOREST_TRUST_RECORD;
+ end;
+ {$EXTERNALSYM _LSA_FOREST_TRUST_INFORMATION}
+ LSA_FOREST_TRUST_INFORMATION = _LSA_FOREST_TRUST_INFORMATION;
+ {$EXTERNALSYM LSA_FOREST_TRUST_INFORMATION}
+ TLsaForestTrustInformation = LSA_FOREST_TRUST_INFORMATION;
+ PLsaForestTrustInformation = PLSA_FOREST_TRUST_INFORMATION;
+
+ LSA_FOREST_TRUST_COLLISION_RECORD_TYPE = (
+ CollisionTdo,
+ CollisionXref,
+ CollisionOther);
+ {$EXTERNALSYM LSA_FOREST_TRUST_COLLISION_RECORD_TYPE}
+ TLsaForestTrustCollisionRecordType = LSA_FOREST_TRUST_COLLISION_RECORD_TYPE;
+
+ PLSA_FOREST_TRUST_COLLISION_RECORD = ^LSA_FOREST_TRUST_COLLISION_RECORD;
+ {$EXTERNALSYM PLSA_FOREST_TRUST_COLLISION_RECORD}
+ _LSA_FOREST_TRUST_COLLISION_RECORD = record
+ Index: ULONG;
+ Type_: LSA_FOREST_TRUST_COLLISION_RECORD_TYPE;
+ Flags: ULONG;
+ Name: LSA_UNICODE_STRING;
+ end;
+ {$EXTERNALSYM _LSA_FOREST_TRUST_COLLISION_RECORD}
+ LSA_FOREST_TRUST_COLLISION_RECORD = _LSA_FOREST_TRUST_COLLISION_RECORD;
+ {$EXTERNALSYM LSA_FOREST_TRUST_COLLISION_RECORD}
+ TLsaForestTrustCollisionRecord = LSA_FOREST_TRUST_COLLISION_RECORD;
+ PLsaForestTrustCollisionRecord = PLSA_FOREST_TRUST_COLLISION_RECORD;
+
+ PLSA_FOREST_TRUST_COLLISION_INFORMATION = ^LSA_FOREST_TRUST_COLLISION_INFORMATION;
+ {$EXTERNALSYM PLSA_FOREST_TRUST_COLLISION_INFORMATION}
+ _LSA_FOREST_TRUST_COLLISION_INFORMATION = record
+ RecordCount: ULONG;
+ Entries: ^PLSA_FOREST_TRUST_COLLISION_RECORD;
+ end;
+ {$EXTERNALSYM _LSA_FOREST_TRUST_COLLISION_INFORMATION}
+ LSA_FOREST_TRUST_COLLISION_INFORMATION = _LSA_FOREST_TRUST_COLLISION_INFORMATION;
+ {$EXTERNALSYM LSA_FOREST_TRUST_COLLISION_INFORMATION}
+ TLsaForestTrustCollisionInformation = LSA_FOREST_TRUST_COLLISION_INFORMATION;
+ PLsaForestTrustCollisionInformation = PLSA_FOREST_TRUST_COLLISION_INFORMATION;
+
+//
+// LSA Enumeration Context
+//
+
+ LSA_ENUMERATION_HANDLE = ULONG;
+ {$EXTERNALSYM LSA_ENUMERATION_HANDLE}
+ PLSA_ENUMERATION_HANDLE = LSA_ENUMERATION_HANDLE;
+ {$EXTERNALSYM PLSA_ENUMERATION_HANDLE}
+
+//
+// LSA Enumeration Information
+//
+
+ PLSA_ENUMERATION_INFORMATION = ^LSA_ENUMERATION_INFORMATION;
+ {$EXTERNALSYM PLSA_ENUMERATION_INFORMATION}
+ _LSA_ENUMERATION_INFORMATION = record
+ Sid: PSID;
+ end;
+ {$EXTERNALSYM _LSA_ENUMERATION_INFORMATION}
+ LSA_ENUMERATION_INFORMATION = _LSA_ENUMERATION_INFORMATION;
+ {$EXTERNALSYM LSA_ENUMERATION_INFORMATION}
+ TLsaEnumerationInformation = LSA_ENUMERATION_INFORMATION;
+ PLsaEnumerationInformation = PLSA_ENUMERATION_INFORMATION;
+
+////////////////////////////////////////////////////////////////////////////
+// //
+// Local Security Policy - Miscellaneous API function prototypes //
+// //
+////////////////////////////////////////////////////////////////////////////
+
+function LsaFreeMemory(Buffer: PVOID): NTSTATUS; stdcall;
+{$EXTERNALSYM LsaFreeMemory}
+
+function LsaClose(ObjectHandle: LSA_HANDLE): NTSTATUS; stdcall;
+{$EXTERNALSYM LsaClose}
+
+type
+ _SECURITY_LOGON_SESSION_DATA = record
+ Size: ULONG;
+ LogonId: LUID;
+ UserName: LSA_UNICODE_STRING;
+ LogonDomain: LSA_UNICODE_STRING;
+ AuthenticationPackage: LSA_UNICODE_STRING;
+ LogonType: SECURITY_LOGON_TYPE;
+ Session: ULONG;
+ Sid: PSID;
+ LogonTime: LARGE_INTEGER;
+
+ //
+ // new for whistler:
+ //
+
+ LogonServer: LSA_UNICODE_STRING;
+ DnsDomainName: LSA_UNICODE_STRING;
+ Upn: LSA_UNICODE_STRING;
+ end;
+ {$EXTERNALSYM _SECURITY_LOGON_SESSION_DATA}
+ SECURITY_LOGON_SESSION_DATA = _SECURITY_LOGON_SESSION_DATA;
+ {$EXTERNALSYM SECURITY_LOGON_SESSION_DATA}
+ PSECURITY_LOGON_SESSION_DATA = ^SECURITY_LOGON_SESSION_DATA;
+ {$EXTERNALSYM PSECURITY_LOGON_SESSION_DATA}
+ TSecurityLogonSessionData = SECURITY_LOGON_SESSION_DATA;
+ PSecurityLogonSessionData = PSECURITY_LOGON_SESSION_DATA;
+
+function LsaEnumerateLogonSessions(LogonSessionCount: PULONG; var LogonSessionList: PLUID): NTSTATUS; stdcall;
+{$EXTERNALSYM LsaEnumerateLogonSessions}
+
+function LsaGetLogonSessionData(LogonId: PLUID; var ppLogonSessionData: PSECURITY_LOGON_SESSION_DATA): NTSTATUS; stdcall;
+{$EXTERNALSYM LsaGetLogonSessionData}
+
+function LsaOpenPolicy(SystemName: PLSA_UNICODE_STRING;
+ var ObjectAttributes: LSA_OBJECT_ATTRIBUTES; DesiredAccess: ACCESS_MASK;
+ var PolicyHandle: LSA_HANDLE): NTSTATUS; stdcall;
+{$EXTERNALSYM LsaOpenPolicy}
+
+function LsaQueryInformationPolicy(PolicyHandle: LSA_HANDLE;
+ InformationClass: POLICY_INFORMATION_CLASS; var Buffer: PVOID): NTSTATUS; stdcall;
+{$EXTERNALSYM LsaQueryInformationPolicy}
+
+function LsaSetInformationPolicy(PolicyHandle: LSA_HANDLE;
+ InformationClass: POLICY_INFORMATION_CLASS; Buffer: PVOID): NTSTATUS; stdcall;
+{$EXTERNALSYM LsaSetInformationPolicy}
+
+function LsaQueryDomainInformationPolicy(PolicyHandle: LSA_HANDLE;
+ InformationClass: POLICY_DOMAIN_INFORMATION_CLASS; Buffer: PPVOID): NTSTATUS; stdcall;
+{$EXTERNALSYM LsaQueryDomainInformationPolicy}
+
+function LsaSetDomainInformationPolicy(PolicyHandle: LSA_HANDLE;
+ InformationClass: POLICY_DOMAIN_INFORMATION_CLASS; Buffer: PVOID): NTSTATUS; stdcall;
+{$EXTERNALSYM LsaSetDomainInformationPolicy}
+
+function LsaRegisterPolicyChangeNotification(InformationClass: POLICY_NOTIFICATION_INFORMATION_CLASS;
+ NotificationEventHandle: HANDLE): NTSTATUS; stdcall;
+{$EXTERNALSYM LsaRegisterPolicyChangeNotification}
+
+function LsaUnregisterPolicyChangeNotification(InformationClass: POLICY_NOTIFICATION_INFORMATION_CLASS;
+ NotificationEventHandle: HANDLE): NTSTATUS; stdcall;
+{$EXTERNALSYM LsaUnregisterPolicyChangeNotification}
+
+function LsaEnumerateTrustedDomains(PolicyHandle: LSA_HANDLE;
+ var EnumerationContext: LSA_ENUMERATION_HANDLE; Buffer: PPVOID;
+ PreferedMaximumLength: ULONG; var CountReturned: ULONG): NTSTATUS; stdcall;
+{$EXTERNALSYM LsaEnumerateTrustedDomains}
+
+function LsaLookupNames(PolicyHandle: LSA_HANDLE; Count: ULONG;
+ Names: PLSA_UNICODE_STRING; var ReferencedDomains: PLSA_REFERENCED_DOMAIN_LIST;
+ var Sids: PLSA_TRANSLATED_SID): NTSTATUS; stdcall;
+{$EXTERNALSYM LsaLookupNames}
+
+function LsaLookupNames2(PolicyHandle: LSA_HANDLE; Flags, Count: ULONG; Names: PLSA_UNICODE_STRING;
+ var ReferencedDomains: PLSA_REFERENCED_DOMAIN_LIST; var Sids: PLSA_TRANSLATED_SID2): NTSTATUS; stdcall;
+{$EXTERNALSYM LsaLookupNames2}
+
+function LsaLookupSids(PolicyHandle: LSA_HANDLE; Count: ULONG; Sids: PPSID;
+ var ReferencedDomains: PLSA_REFERENCED_DOMAIN_LIST;
+ var Names: PLSA_TRANSLATED_NAME): NTSTATUS; stdcall;
+{$EXTERNALSYM LsaLookupSids}
+
+const
+ SE_INTERACTIVE_LOGON_NAME = 'SeInteractiveLogonRight';
+ {$EXTERNALSYM SE_INTERACTIVE_LOGON_NAME}
+ SE_NETWORK_LOGON_NAME = 'SeNetworkLogonRight';
+ {$EXTERNALSYM SE_NETWORK_LOGON_NAME}
+ SE_BATCH_LOGON_NAME = 'SeBatchLogonRight';
+ {$EXTERNALSYM SE_BATCH_LOGON_NAME}
+ SE_SERVICE_LOGON_NAME = 'SeServiceLogonRight';
+ {$EXTERNALSYM SE_SERVICE_LOGON_NAME}
+ SE_DENY_INTERACTIVE_LOGON_NAME = 'SeDenyInteractiveLogonRight';
+ {$EXTERNALSYM SE_DENY_INTERACTIVE_LOGON_NAME}
+ SE_DENY_NETWORK_LOGON_NAME = 'SeDenyNetworkLogonRight';
+ {$EXTERNALSYM SE_DENY_NETWORK_LOGON_NAME}
+ SE_DENY_BATCH_LOGON_NAME = 'SeDenyBatchLogonRight';
+ {$EXTERNALSYM SE_DENY_BATCH_LOGON_NAME}
+ SE_DENY_SERVICE_LOGON_NAME = 'SeDenyServiceLogonRight';
+ {$EXTERNALSYM SE_DENY_SERVICE_LOGON_NAME}
+ SE_REMOTE_INTERACTIVE_LOGON_NAME = 'SeRemoteInteractiveLogonRight';
+ {$EXTERNALSYM SE_REMOTE_INTERACTIVE_LOGON_NAME}
+ SE_DENY_REMOTE_INTERACTIVE_LOGON_NAME = 'SeDenyRemoteInteractiveLogonRight';
+ {$EXTERNALSYM SE_DENY_REMOTE_INTERACTIVE_LOGON_NAME}
+
+//
+// This new API returns all the accounts with a certain privilege
+//
+
+function LsaEnumerateAccountsWithUserRight(PolicyHandle: LSA_HANDLE;
+ UserRights: PLSA_UNICODE_STRING; var EnumerationBuffer: PLSA_ENUMERATION_INFORMATION;
+ var CountReturned: ULONG): NTSTATUS; stdcall;
+{$EXTERNALSYM LsaEnumerateAccountsWithUserRight}
+
+//
+// These new APIs differ by taking a SID instead of requiring the caller
+// to open the account first and passing in an account handle
+//
+
+function LsaEnumerateAccountRights(PolicyHandle: LSA_HANDLE; AccountSid: PSID;
+ var UserRights: PLSA_UNICODE_STRING; var CountOfRights: ULONG): NTSTATUS; stdcall;
+{$EXTERNALSYM LsaEnumerateAccountRights}
+
+function LsaAddAccountRights(PolicyHandle: LSA_HANDLE; AccountSid: PSID;
+ UserRights: PLSA_UNICODE_STRING; CountOfRights: ULONG): NTSTATUS; stdcall;
+{$EXTERNALSYM LsaAddAccountRights}
+
+function LsaRemoveAccountRights(PolicyHandle: LSA_HANDLE; AccountSid: PSID;
+ AllRights: ByteBool; UserRights: PLSA_UNICODE_STRING; CountOfRights: ULONG): NTSTATUS; stdcall;
+{$EXTERNALSYM LsaRemoveAccountRights}
+
+///////////////////////////////////////////////////////////////////////////////
+// //
+// Local Security Policy - Trusted Domain Object API function prototypes //
+// //
+///////////////////////////////////////////////////////////////////////////////
+
+function LsaOpenTrustedDomainByName(PolicyHandle: LSA_HANDLE;
+ const TrustedDomainName: LSA_UNICODE_STRING; DesiredAccess: ACCESS_MASK;
+ var TrustedDomainHandle: LSA_HANDLE): NTSTATUS; stdcall;
+{$EXTERNALSYM LsaOpenTrustedDomainByName}
+
+function LsaQueryTrustedDomainInfo(PolicyHandle: LSA_HANDLE; TrustedDomainSid: PSID;
+ InformationClass: TRUSTED_INFORMATION_CLASS; Buffer: PPVOID): NTSTATUS; stdcall;
+{$EXTERNALSYM LsaQueryTrustedDomainInfo}
+
+function LsaSetTrustedDomainInformation(PolicyHandle: LSA_HANDLE; TrustedDomainSid: PSID;
+ InformationClass: TRUSTED_INFORMATION_CLASS; Buffer: PVOID): NTSTATUS; stdcall;
+{$EXTERNALSYM LsaSetTrustedDomainInformation}
+
+function LsaDeleteTrustedDomain(PolicyHandle: LSA_HANDLE; TrustedDomainSid: PSID): NTSTATUS; stdcall;
+{$EXTERNALSYM LsaDeleteTrustedDomain}
+
+function LsaQueryTrustedDomainInfoByName(PolicyHandle: LSA_HANDLE;
+ const TrustedDomainName: LSA_UNICODE_STRING;
+ InformationClass: TRUSTED_INFORMATION_CLASS; Buffer: PPVOID): NTSTATUS; stdcall;
+{$EXTERNALSYM LsaQueryTrustedDomainInfoByName}
+
+function LsaSetTrustedDomainInfoByName(PolicyHandle: LSA_HANDLE;
+ const TrustedDomainName: LSA_UNICODE_STRING;
+ InformationClass: TRUSTED_INFORMATION_CLASS; Buffer: PVOID): NTSTATUS; stdcall;
+{$EXTERNALSYM LsaSetTrustedDomainInfoByName}
+
+function LsaEnumerateTrustedDomainsEx(PolicyHandle: LSA_HANDLE;
+ var EnumerationContext: LSA_ENUMERATION_HANDLE; Buffer: PPVOID;
+ PreferedMaximumLength: ULONG; var CountReturned: ULONG): NTSTATUS; stdcall;
+{$EXTERNALSYM LsaEnumerateTrustedDomainsEx}
+
+function LsaCreateTrustedDomainEx(PolicyHandle: LSA_HANDLE;
+ const TrustedDomainInformation: TRUSTED_DOMAIN_INFORMATION_EX;
+ const AuthenticationInformation: TRUSTED_DOMAIN_AUTH_INFORMATION;
+ DesiredAccess: ACCESS_MASK; var TrustedDomainHandle: LSA_HANDLE): NTSTATUS; stdcall;
+{$EXTERNALSYM LsaCreateTrustedDomainEx}
+
+function LsaQueryForestTrustInformation(PolicyHandle: LSA_HANDLE; TrustedDomainName: PLSA_UNICODE_STRING;
+ var ForestTrustInfo: PLSA_FOREST_TRUST_INFORMATION): NTSTATUS; stdcall;
+{$EXTERNALSYM LsaQueryForestTrustInformation}
+
+function LsaSetForestTrustInformation(PolicyHandle: LSA_HANDLE; TrustedDomainName: PLSA_UNICODE_STRING;
+ ForestTrustInfo: PLSA_FOREST_TRUST_INFORMATION; CheckOnly: BOOLEAN; var CollisionInfo: PLSA_FOREST_TRUST_COLLISION_INFORMATION): NTSTATUS; stdcall;
+{$EXTERNALSYM LsaSetForestTrustInformation}
+
+{.DEFINE TESTING_MATCHING_ROUTINE}
+{$IFDEF TESTING_MATCHING_ROUTINE}
+function LsaForestTrustFindMatch(PolicyHandle: LSA_HANDLE; Type_: ULONG; Name: PLSA_UNICODE_STRING; var Match: PLSA_UNICODE_STRING): NTSTATUS; stdcall;
+{$EXTERNALSYM LsaForestTrustFindMatch}
+{$ENDIF TESTING_MATCHING_ROUTINE}
+
+//
+// This API sets the workstation password (equivalent of setting/getting
+// the SSI_SECRET_NAME secret)
+//
+
+function LsaStorePrivateData(PolicyHandle: LSA_HANDLE;
+ const KeyName: LSA_UNICODE_STRING; PrivateData: PLSA_UNICODE_STRING): NTSTATUS; stdcall;
+{$EXTERNALSYM LsaStorePrivateData}
+
+function LsaRetrievePrivateData(PolicyHandle: LSA_HANDLE;
+ const KeyName: LSA_UNICODE_STRING; var PrivateData: PLSA_UNICODE_STRING): NTSTATUS; stdcall;
+{$EXTERNALSYM LsaRetrievePrivateData}
+
+function LsaNtStatusToWinError(Status: NTSTATUS): ULONG; stdcall;
+{$EXTERNALSYM LsaNtStatusToWinError}
+
+(*#if 0
+NTSTATUS
+NTAPI
+LsaLookupNamesEx(
+ IN LSA_HANDLE PolicyHandle,
+ IN ULONG Count,
+ IN PLSA_NAME_LOOKUP_EX Names,
+ OUT PLSA_TRANSLATED_SID_EX *TranslatedSids,
+ IN ULONG LookupOptions,
+ IN OUT PULONG MappedCount
+ );
+
+NTSTATUS
+NTAPI
+LsaLookupSidsEx(
+ IN LSA_HANDLE PolicyHandle,
+ IN ULONG Count,
+ IN PLSA_SID_LOOKUP_EX Sids,
+ OUT PLSA_TRANSLATED_NAME_EX *TranslatedNames,
+ IN ULONG LookupOptions,
+ IN OUT PULONG MappedCount
+ );
+#endif*)
+
+//
+// SPNEGO package stuff
+//
+
+type
+ NEGOTIATE_MESSAGES = (NegEnumPackagePrefixes, NegGetCallerName, NegCallPackageMax);
+ {$EXTERNALSYM NEGOTIATE_MESSAGES}
+
+const
+ NEGOTIATE_MAX_PREFIX = 32;
+ {$EXTERNALSYM NEGOTIATE_MAX_PREFIX}
+
+type
+ PNEGOTIATE_PACKAGE_PREFIX = ^NEGOTIATE_PACKAGE_PREFIX;
+ {$EXTERNALSYM PNEGOTIATE_PACKAGE_PREFIX}
+ _NEGOTIATE_PACKAGE_PREFIX = record
+ PackageId: ULONG_PTR;
+ PackageDataA: PVOID;
+ PackageDataW: PVOID;
+ PrefixLen: ULONG_PTR;
+ Prefix: array [0..NEGOTIATE_MAX_PREFIX - 1] of UCHAR;
+ end;
+ {$EXTERNALSYM _NEGOTIATE_PACKAGE_PREFIX}
+ NEGOTIATE_PACKAGE_PREFIX = _NEGOTIATE_PACKAGE_PREFIX;
+ {$EXTERNALSYM NEGOTIATE_PACKAGE_PREFIX}
+ TNegotiatePackagePrefix = NEGOTIATE_PACKAGE_PREFIX;
+ PNegotiatePackagePrefix = PNEGOTIATE_PACKAGE_PREFIX;
+
+ PNEGOTIATE_PACKAGE_PREFIXES = ^NEGOTIATE_PACKAGE_PREFIXES;
+ {$EXTERNALSYM PNEGOTIATE_PACKAGE_PREFIXES}
+ _NEGOTIATE_PACKAGE_PREFIXES = record
+ MessageType: ULONG;
+ PrefixCount: ULONG;
+ Offset: ULONG; // Offset to array of _PREFIX above
+ Pad: ULONG; // Align structure for 64-bit
+ end;
+ {$EXTERNALSYM _NEGOTIATE_PACKAGE_PREFIXES}
+ NEGOTIATE_PACKAGE_PREFIXES = _NEGOTIATE_PACKAGE_PREFIXES;
+ {$EXTERNALSYM NEGOTIATE_PACKAGE_PREFIXES}
+ TNegotiatePackagePrefixes = NEGOTIATE_PACKAGE_PREFIXES;
+ PNegotiatePackagePrefixes = PNEGOTIATE_PACKAGE_PREFIXES;
+
+ PNEGOTIATE_CALLER_NAME_REQUEST = ^NEGOTIATE_CALLER_NAME_REQUEST;
+ {$EXTERNALSYM PNEGOTIATE_CALLER_NAME_REQUEST}
+ _NEGOTIATE_CALLER_NAME_REQUEST = record
+ MessageType: ULONG;
+ LogonId: LUID;
+ end;
+ {$EXTERNALSYM _NEGOTIATE_CALLER_NAME_REQUEST}
+ NEGOTIATE_CALLER_NAME_REQUEST = _NEGOTIATE_CALLER_NAME_REQUEST;
+ {$EXTERNALSYM NEGOTIATE_CALLER_NAME_REQUEST}
+ TNegotiateCallerNameRequest = NEGOTIATE_CALLER_NAME_REQUEST;
+ PNegotiateCallerNameRequest = PNEGOTIATE_CALLER_NAME_REQUEST;
+
+ PNEGOTIATE_CALLER_NAME_RESPONSE = ^NEGOTIATE_CALLER_NAME_RESPONSE;
+ {$EXTERNALSYM PNEGOTIATE_CALLER_NAME_RESPONSE}
+ _NEGOTIATE_CALLER_NAME_RESPONSE = record
+ MessageType: ULONG;
+ CallerName: PWSTR;
+ end;
+ {$EXTERNALSYM _NEGOTIATE_CALLER_NAME_RESPONSE}
+ NEGOTIATE_CALLER_NAME_RESPONSE = _NEGOTIATE_CALLER_NAME_RESPONSE;
+ {$EXTERNALSYM NEGOTIATE_CALLER_NAME_RESPONSE}
+ TNegotiateCallerNameResponse = NEGOTIATE_CALLER_NAME_RESPONSE;
+ PNegotiateCallerNameResponse = PNEGOTIATE_CALLER_NAME_RESPONSE;
+
+type
+ PDOMAIN_PASSWORD_INFORMATION = ^DOMAIN_PASSWORD_INFORMATION;
+ {$EXTERNALSYM PDOMAIN_PASSWORD_INFORMATION}
+ _DOMAIN_PASSWORD_INFORMATION = record
+ MinPasswordLength: USHORT;
+ PasswordHistoryLength: USHORT;
+ PasswordProperties: ULONG;
+ MaxPasswordAge: LARGE_INTEGER;
+ MinPasswordAge: LARGE_INTEGER;
+ end;
+ {$EXTERNALSYM _DOMAIN_PASSWORD_INFORMATION}
+ DOMAIN_PASSWORD_INFORMATION = _DOMAIN_PASSWORD_INFORMATION;
+ {$EXTERNALSYM DOMAIN_PASSWORD_INFORMATION}
+ TDomainPasswordInformation = DOMAIN_PASSWORD_INFORMATION;
+ PDomainPasswordInformation = PDOMAIN_PASSWORD_INFORMATION;
+
+//
+// PasswordProperties flags
+//
+
+const
+ DOMAIN_PASSWORD_COMPLEX = $00000001;
+ {$EXTERNALSYM DOMAIN_PASSWORD_COMPLEX}
+ DOMAIN_PASSWORD_NO_ANON_CHANGE = $00000002;
+ {$EXTERNALSYM DOMAIN_PASSWORD_NO_ANON_CHANGE}
+ DOMAIN_PASSWORD_NO_CLEAR_CHANGE = $00000004;
+ {$EXTERNALSYM DOMAIN_PASSWORD_NO_CLEAR_CHANGE}
+ DOMAIN_LOCKOUT_ADMINS = $00000008;
+ {$EXTERNALSYM DOMAIN_LOCKOUT_ADMINS}
+ DOMAIN_PASSWORD_STORE_CLEARTEXT = $00000010;
+ {$EXTERNALSYM DOMAIN_PASSWORD_STORE_CLEARTEXT}
+ DOMAIN_REFUSE_PASSWORD_CHANGE = $00000020;
+ {$EXTERNALSYM DOMAIN_REFUSE_PASSWORD_CHANGE}
+
+type
+ PSAM_PASSWORD_NOTIFICATION_ROUTINE = function(UserName: PUNICODE_STRING;
+ RelativeId: ULONG; NewPassword: PUNICODE_STRING): NTSTATUS; stdcall;
+ {$EXTERNALSYM PSAM_PASSWORD_NOTIFICATION_ROUTINE}
+ TSamPasswordNotificationRoutine = PSAM_PASSWORD_NOTIFICATION_ROUTINE;
+
+const
+ SAM_PASSWORD_CHANGE_NOTIFY_ROUTINE = 'PasswordChangeNotify';
+ {$EXTERNALSYM SAM_PASSWORD_CHANGE_NOTIFY_ROUTINE}
+
+type
+ PSAM_INIT_NOTIFICATION_ROUTINE = function : ByteBool; stdcall;
+ {$EXTERNALSYM PSAM_INIT_NOTIFICATION_ROUTINE}
+ TSamInitNotificationRoutine = PSAM_INIT_NOTIFICATION_ROUTINE;
+
+const
+ SAM_INIT_NOTIFICATION_ROUTINE = 'InitializeChangeNotify';
+ {$EXTERNALSYM SAM_INIT_NOTIFICATION_ROUTINE}
+
+ SAM_PASSWORD_FILTER_ROUTINE = 'PasswordFilter';
+ {$EXTERNALSYM SAM_PASSWORD_FILTER_ROUTINE}
+
+type
+ PSAM_PASSWORD_FILTER_ROUTINE = function(AccountName, FullName,
+ Password: PUNICODE_STRING; SetOperation: ByteBool): ByteBool; stdcall;
+ {$EXTERNALSYM PSAM_PASSWORD_FILTER_ROUTINE}
+ TSamPasswordFilterRoutine = PSAM_PASSWORD_FILTER_ROUTINE;
+
+/////////////////////////////////////////////////////////////////////////
+// //
+// Name of the MSV1_0 authentication package //
+// //
+/////////////////////////////////////////////////////////////////////////
+
+const
+ MSV1_0_PACKAGE_NAME = 'MICROSOFT_AUTHENTICATION_PACKAGE_V1_0';
+ {$EXTERNALSYM MSV1_0_PACKAGE_NAME}
+ MSV1_0_PACKAGE_NAMEW = WideString('MICROSOFT_AUTHENTICATION_PACKAGE_V1_0');
+ {$EXTERNALSYM MSV1_0_PACKAGE_NAMEW}
+ MSV1_0_PACKAGE_NAMEW_LENGTH = SizeOf(MSV1_0_PACKAGE_NAMEW) - SizeOf(WCHAR);
+ {$EXTERNALSYM MSV1_0_PACKAGE_NAMEW_LENGTH}
+
+//
+// Location of MSV authentication package data
+//
+
+ MSV1_0_SUBAUTHENTICATION_KEY = 'SYSTEM\\CurrentControlSet\\Control\\Lsa\\MSV1_0';
+ {$EXTERNALSYM MSV1_0_SUBAUTHENTICATION_KEY}
+ MSV1_0_SUBAUTHENTICATION_VALUE = 'Auth';
+ {$EXTERNALSYM MSV1_0_SUBAUTHENTICATION_VALUE}
+
+/////////////////////////////////////////////////////////////////////////
+// //
+// Widely used MSV1_0 data types //
+// //
+/////////////////////////////////////////////////////////////////////////
+
+///////////////////////////////////////////////////////////////////////////////
+// //
+// LOGON Related Data Structures
+//
+// //
+///////////////////////////////////////////////////////////////////////////////
+
+//
+// When a LsaLogonUser() call is dispatched to the MsV1_0 authentication
+// package, the beginning of the AuthenticationInformation buffer is
+// cast to a MSV1_0_LOGON_SUBMIT_TYPE to determine the type of logon
+// being requested. Similarly, upon return, the type of profile buffer
+// can be determined by typecasting it to a MSV_1_0_PROFILE_BUFFER_TYPE.
+//
+
+//
+// MSV1.0 LsaLogonUser() submission message types.
+//
+
+type
+ _MSV1_0_LOGON_SUBMIT_TYPE = (
+ mlstFiller0, mlstFiller1,
+ MsV1_0InteractiveLogon,
+ MsV1_0Lm20Logon,
+ MsV1_0NetworkLogon,
+ MsV1_0SubAuthLogon,
+ mlstFiller6,
+ MsV1_0WorkstationUnlockLogon);
+ {$EXTERNALSYM _MSV1_0_LOGON_SUBMIT_TYPE}
+ MSV1_0_LOGON_SUBMIT_TYPE = _MSV1_0_LOGON_SUBMIT_TYPE;
+ {$EXTERNALSYM MSV1_0_LOGON_SUBMIT_TYPE}
+ PMSV1_0_LOGON_SUBMIT_TYPE = ^MSV1_0_LOGON_SUBMIT_TYPE;
+ {$EXTERNALSYM PMSV1_0_LOGON_SUBMIT_TYPE}
+ TMsv1_0LogonSubmitType = MSV1_0_LOGON_SUBMIT_TYPE;
+ PMsv1_0LogonSubmitType = PMSV1_0_LOGON_SUBMIT_TYPE;
+
+//
+// MSV1.0 LsaLogonUser() profile buffer types.
+//
+
+ _MSV1_0_PROFILE_BUFFER_TYPE = (
+ mpbtFiller0, mpbtFiller1,
+ MsV1_0InteractiveProfile,
+ MsV1_0Lm20LogonProfile,
+ MsV1_0SmartCardProfile);
+ {$EXTERNALSYM _MSV1_0_PROFILE_BUFFER_TYPE}
+ MSV1_0_PROFILE_BUFFER_TYPE = _MSV1_0_PROFILE_BUFFER_TYPE;
+ {$EXTERNALSYM MSV1_0_PROFILE_BUFFER_TYPE}
+ PMSV1_0_PROFILE_BUFFER_TYPE = ^MSV1_0_PROFILE_BUFFER_TYPE;
+ {$EXTERNALSYM PMSV1_0_PROFILE_BUFFER_TYPE}
+ TMsv1_0ProfileBufferType = MSV1_0_PROFILE_BUFFER_TYPE;
+ PMsv1_0ProfileBufferType = PMSV1_0_PROFILE_BUFFER_TYPE;
+
+//
+// MsV1_0InteractiveLogon
+//
+// The AuthenticationInformation buffer of an LsaLogonUser() call to
+// perform an interactive logon contains the following data structure:
+//
+
+ PMSV1_0_INTERACTIVE_LOGON = ^MSV1_0_INTERACTIVE_LOGON;
+ {$EXTERNALSYM PMSV1_0_INTERACTIVE_LOGON}
+ _MSV1_0_INTERACTIVE_LOGON = record
+ MessageType: MSV1_0_LOGON_SUBMIT_TYPE;
+ LogonDomainName: UNICODE_STRING;
+ UserName: UNICODE_STRING;
+ Password: UNICODE_STRING;
+ end;
+ {$EXTERNALSYM _MSV1_0_INTERACTIVE_LOGON}
+ MSV1_0_INTERACTIVE_LOGON = _MSV1_0_INTERACTIVE_LOGON;
+ {$EXTERNALSYM MSV1_0_INTERACTIVE_LOGON}
+ TMsv10InteractiveLogon = MSV1_0_INTERACTIVE_LOGON;
+ PMsv10InteractiveLogon = PMSV1_0_INTERACTIVE_LOGON;
+
+//
+// Where:
+//
+// MessageType - Contains the type of logon being requested. This
+// field must be set to MsV1_0InteractiveLogon.
+//
+// UserName - Is a string representing the user's account name. The
+// name may be up to 255 characters long. The name is treated case
+// insensitive.
+//
+// Password - Is a string containing the user's cleartext password.
+// The password may be up to 255 characters long and contain any
+// UNICODE value.
+//
+//
+
+//
+// The ProfileBuffer returned upon a successful logon of this type
+// contains the following data structure:
+//
+
+ PMSV1_0_INTERACTIVE_PROFILE = ^MSV1_0_INTERACTIVE_PROFILE;
+ {$EXTERNALSYM PMSV1_0_INTERACTIVE_PROFILE}
+ _MSV1_0_INTERACTIVE_PROFILE = record
+ MessageType: MSV1_0_PROFILE_BUFFER_TYPE;
+ LogonCount: USHORT;
+ BadPasswordCount: USHORT;
+ LogonTime: LARGE_INTEGER;
+ LogoffTime: LARGE_INTEGER;
+ KickOffTime: LARGE_INTEGER;
+ PasswordLastSet: LARGE_INTEGER;
+ PasswordCanChange: LARGE_INTEGER;
+ PasswordMustChange: LARGE_INTEGER;
+ LogonScript: UNICODE_STRING;
+ HomeDirectory: UNICODE_STRING;
+ FullName: UNICODE_STRING;
+ ProfilePath: UNICODE_STRING;
+ HomeDirectoryDrive: UNICODE_STRING;
+ LogonServer: UNICODE_STRING;
+ UserFlags: ULONG;
+ end;
+ {$EXTERNALSYM _MSV1_0_INTERACTIVE_PROFILE}
+ MSV1_0_INTERACTIVE_PROFILE = _MSV1_0_INTERACTIVE_PROFILE;
+ {$EXTERNALSYM MSV1_0_INTERACTIVE_PROFILE}
+ TMsv10InteractiveProfile = MSV1_0_INTERACTIVE_PROFILE;
+ PMsv10InteractiveProfile = PMSV1_0_INTERACTIVE_PROFILE;
+
+//
+// where:
+//
+// MessageType - Identifies the type of profile data being returned.
+// Contains the type of logon being requested. This field must
+// be set to MsV1_0InteractiveProfile.
+//
+// LogonCount - Number of times the user is currently logged on.
+//
+// BadPasswordCount - Number of times a bad password was applied to
+// the account since last successful logon.
+//
+// LogonTime - Time when user last logged on. This is an absolute
+// format NT standard time value.
+//
+// LogoffTime - Time when user should log off. This is an absolute
+// format NT standard time value.
+//
+// KickOffTime - Time when system should force user logoff. This is
+// an absolute format NT standard time value.
+//
+// PasswordLastChanged - Time and date the password was last
+// changed. This is an absolute format NT standard time
+// value.
+//
+// PasswordCanChange - Time and date when the user can change the
+// password. This is an absolute format NT time value. To
+// prevent a password from ever changing, set this field to a
+// date very far into the future.
+//
+// PasswordMustChange - Time and date when the user must change the
+// password. If the user can never change the password, this
+// field is undefined. This is an absolute format NT time
+// value.
+//
+// LogonScript - The (relative) path to the account's logon
+// script.
+//
+// HomeDirectory - The home directory for the user.
+//
+
+//
+// MsV1_0Lm20Logon and MsV1_0NetworkLogon
+//
+// The AuthenticationInformation buffer of an LsaLogonUser() call to
+// perform an network logon contains the following data structure:
+//
+// MsV1_0NetworkLogon logon differs from MsV1_0Lm20Logon in that the
+// ParameterControl field exists.
+//
+
+const
+ MSV1_0_CHALLENGE_LENGTH = 8;
+ {$EXTERNALSYM MSV1_0_CHALLENGE_LENGTH}
+ MSV1_0_USER_SESSION_KEY_LENGTH = 16;
+ {$EXTERNALSYM MSV1_0_USER_SESSION_KEY_LENGTH}
+ MSV1_0_LANMAN_SESSION_KEY_LENGTH = 8;
+ {$EXTERNALSYM MSV1_0_LANMAN_SESSION_KEY_LENGTH}
+
+//
+// Values for ParameterControl.
+//
+
+ MSV1_0_CLEARTEXT_PASSWORD_ALLOWED = $02;
+ {$EXTERNALSYM MSV1_0_CLEARTEXT_PASSWORD_ALLOWED}
+ MSV1_0_UPDATE_LOGON_STATISTICS = $04;
+ {$EXTERNALSYM MSV1_0_UPDATE_LOGON_STATISTICS}
+ MSV1_0_RETURN_USER_PARAMETERS = $08;
+ {$EXTERNALSYM MSV1_0_RETURN_USER_PARAMETERS}
+ MSV1_0_DONT_TRY_GUEST_ACCOUNT = $10;
+ {$EXTERNALSYM MSV1_0_DONT_TRY_GUEST_ACCOUNT}
+ MSV1_0_ALLOW_SERVER_TRUST_ACCOUNT = $20;
+ {$EXTERNALSYM MSV1_0_ALLOW_SERVER_TRUST_ACCOUNT}
+ MSV1_0_RETURN_PASSWORD_EXPIRY = $40;
+ {$EXTERNALSYM MSV1_0_RETURN_PASSWORD_EXPIRY}
+
+// this next flag says that CaseInsensitiveChallengeResponse
+// (aka LmResponse) contains a client challenge in the first 8 bytes
+
+ MSV1_0_USE_CLIENT_CHALLENGE = $80;
+ {$EXTERNALSYM MSV1_0_USE_CLIENT_CHALLENGE}
+ MSV1_0_TRY_GUEST_ACCOUNT_ONLY = $100;
+ {$EXTERNALSYM MSV1_0_TRY_GUEST_ACCOUNT_ONLY}
+ MSV1_0_RETURN_PROFILE_PATH = $200;
+ {$EXTERNALSYM MSV1_0_RETURN_PROFILE_PATH}
+ MSV1_0_TRY_SPECIFIED_DOMAIN_ONLY = $400;
+ {$EXTERNALSYM MSV1_0_TRY_SPECIFIED_DOMAIN_ONLY}
+ MSV1_0_ALLOW_WORKSTATION_TRUST_ACCOUNT = $800;
+ {$EXTERNALSYM MSV1_0_ALLOW_WORKSTATION_TRUST_ACCOUNT}
+ MSV1_0_DISABLE_PERSONAL_FALLBACK = $00001000;
+ {$EXTERNALSYM MSV1_0_DISABLE_PERSONAL_FALLBACK}
+ MSV1_0_ALLOW_FORCE_GUEST = $00002000;
+ {$EXTERNALSYM MSV1_0_ALLOW_FORCE_GUEST}
+ MSV1_0_CLEARTEXT_PASSWORD_SUPPLIED = $00004000;
+ {$EXTERNALSYM MSV1_0_CLEARTEXT_PASSWORD_SUPPLIED}
+ MSV1_0_USE_DOMAIN_FOR_ROUTING_ONLY = $00008000;
+ {$EXTERNALSYM MSV1_0_USE_DOMAIN_FOR_ROUTING_ONLY}
+ MSV1_0_SUBAUTHENTICATION_DLL_EX = $00100000;
+ {$EXTERNALSYM MSV1_0_SUBAUTHENTICATION_DLL_EX}
+
+//
+// The high order byte is a value indicating the SubAuthentication DLL.
+// Zero indicates no SubAuthentication DLL.
+//
+
+ MSV1_0_SUBAUTHENTICATION_DLL = DWORD($FF000000);
+ {$EXTERNALSYM MSV1_0_SUBAUTHENTICATION_DLL}
+ MSV1_0_SUBAUTHENTICATION_DLL_SHIFT = 24;
+ {$EXTERNALSYM MSV1_0_SUBAUTHENTICATION_DLL_SHIFT}
+ MSV1_0_MNS_LOGON = $01000000;
+ {$EXTERNALSYM MSV1_0_MNS_LOGON}
+
+//
+// This is the list of subauthentication dlls used in MS
+//
+
+ MSV1_0_SUBAUTHENTICATION_DLL_RAS = 2;
+ {$EXTERNALSYM MSV1_0_SUBAUTHENTICATION_DLL_RAS}
+ MSV1_0_SUBAUTHENTICATION_DLL_IIS = 132;
+ {$EXTERNALSYM MSV1_0_SUBAUTHENTICATION_DLL_IIS}
+
+type
+ PMSV1_0_LM20_LOGON = ^MSV1_0_LM20_LOGON;
+ {$EXTERNALSYM PMSV1_0_LM20_LOGON}
+ _MSV1_0_LM20_LOGON = record
+ MessageType: MSV1_0_LOGON_SUBMIT_TYPE;
+ LogonDomainName: UNICODE_STRING;
+ UserName: UNICODE_STRING;
+ Workstation: UNICODE_STRING;
+ ChallengeToClient: array [0..MSV1_0_CHALLENGE_LENGTH - 1] of UCHAR;
+ CaseSensitiveChallengeResponse: STRING;
+ CaseInsensitiveChallengeResponse: STRING;
+ ParameterControl: ULONG;
+ end;
+ {$EXTERNALSYM _MSV1_0_LM20_LOGON}
+ MSV1_0_LM20_LOGON = _MSV1_0_LM20_LOGON;
+ {$EXTERNALSYM MSV1_0_LM20_LOGON}
+ TMsv10Lm20Logon = MSV1_0_LM20_LOGON;
+ PMsv10Lm20Logon = PMSV1_0_LM20_LOGON;
+
+//
+// NT 5.0 SubAuth dlls can use this struct
+//
+
+ PMSV1_0_SUBAUTH_LOGON = ^MSV1_0_SUBAUTH_LOGON;
+ {$EXTERNALSYM PMSV1_0_SUBAUTH_LOGON}
+ _MSV1_0_SUBAUTH_LOGON = record
+ MessageType: MSV1_0_LOGON_SUBMIT_TYPE;
+ LogonDomainName: UNICODE_STRING;
+ UserName: UNICODE_STRING;
+ Workstation: UNICODE_STRING;
+ ChallengeToClient: array [0..MSV1_0_CHALLENGE_LENGTH - 1] of UCHAR;
+ AuthenticationInfo1: STRING;
+ AuthenticationInfo2: STRING;
+ ParameterControl: ULONG;
+ SubAuthPackageId: ULONG;
+ end;
+ {$EXTERNALSYM _MSV1_0_SUBAUTH_LOGON}
+ MSV1_0_SUBAUTH_LOGON = _MSV1_0_SUBAUTH_LOGON;
+ {$EXTERNALSYM MSV1_0_SUBAUTH_LOGON}
+ TMsv10SubauthLogon = MSV1_0_SUBAUTH_LOGON;
+ PMsv10SubauthLogon = PMSV1_0_SUBAUTH_LOGON;
+
+//
+// Values for UserFlags.
+//
+
+const
+ LOGON_GUEST = $01;
+ {$EXTERNALSYM LOGON_GUEST}
+ LOGON_NOENCRYPTION = $02;
+ {$EXTERNALSYM LOGON_NOENCRYPTION}
+ LOGON_CACHED_ACCOUNT = $04;
+ {$EXTERNALSYM LOGON_CACHED_ACCOUNT}
+ LOGON_USED_LM_PASSWORD = $08;
+ {$EXTERNALSYM LOGON_USED_LM_PASSWORD}
+ LOGON_EXTRA_SIDS = $20;
+ {$EXTERNALSYM LOGON_EXTRA_SIDS}
+ LOGON_SUBAUTH_SESSION_KEY = $40;
+ {$EXTERNALSYM LOGON_SUBAUTH_SESSION_KEY}
+ LOGON_SERVER_TRUST_ACCOUNT = $80;
+ {$EXTERNALSYM LOGON_SERVER_TRUST_ACCOUNT}
+ LOGON_NTLMV2_ENABLED = $100; // says DC understands NTLMv2
+ {$EXTERNALSYM LOGON_NTLMV2_ENABLED}
+ LOGON_RESOURCE_GROUPS = $200;
+ {$EXTERNALSYM LOGON_RESOURCE_GROUPS}
+ LOGON_PROFILE_PATH_RETURNED = $400;
+ {$EXTERNALSYM LOGON_PROFILE_PATH_RETURNED}
+
+//
+// The high order byte is reserved for return by SubAuthentication DLLs.
+//
+
+ MSV1_0_SUBAUTHENTICATION_FLAGS = DWORD($FF000000);
+ {$EXTERNALSYM MSV1_0_SUBAUTHENTICATION_FLAGS}
+
+// Values returned by the MSV1_0_MNS_LOGON SubAuthentication DLL
+
+ LOGON_GRACE_LOGON = $01000000;
+ {$EXTERNALSYM LOGON_GRACE_LOGON}
+
+type
+ PMSV1_0_LM20_LOGON_PROFILE = ^MSV1_0_LM20_LOGON_PROFILE;
+ {$EXTERNALSYM PMSV1_0_LM20_LOGON_PROFILE}
+ _MSV1_0_LM20_LOGON_PROFILE = record
+ MessageType: MSV1_0_PROFILE_BUFFER_TYPE;
+ KickOffTime: LARGE_INTEGER;
+ LogoffTime: LARGE_INTEGER;
+ UserFlags: ULONG;
+ UserSessionKey: array [0..MSV1_0_USER_SESSION_KEY_LENGTH - 1] of UCHAR;
+ LogonDomainName: UNICODE_STRING;
+ LanmanSessionKey: array [0..MSV1_0_LANMAN_SESSION_KEY_LENGTH - 1] of UCHAR;
+ LogonServer: UNICODE_STRING;
+ UserParameters: UNICODE_STRING;
+ end;
+ {$EXTERNALSYM _MSV1_0_LM20_LOGON_PROFILE}
+ MSV1_0_LM20_LOGON_PROFILE = _MSV1_0_LM20_LOGON_PROFILE;
+ {$EXTERNALSYM MSV1_0_LM20_LOGON_PROFILE}
+ TMsv10Lm20LogonProfile = MSV1_0_LM20_LOGON_PROFILE;
+ PMsv10Lm20LogonProfile = PMSV1_0_LM20_LOGON_PROFILE;
+
+//
+// Supplemental credentials structure used for passing credentials into
+// MSV1_0 from other packages
+//
+
+const
+ MSV1_0_OWF_PASSWORD_LENGTH = 16;
+ {$EXTERNALSYM MSV1_0_OWF_PASSWORD_LENGTH}
+ MSV1_0_CRED_LM_PRESENT = $1;
+ {$EXTERNALSYM MSV1_0_CRED_LM_PRESENT}
+ MSV1_0_CRED_NT_PRESENT = $2;
+ {$EXTERNALSYM MSV1_0_CRED_NT_PRESENT}
+ MSV1_0_CRED_VERSION = 0;
+ {$EXTERNALSYM MSV1_0_CRED_VERSION}
+
+type
+ PMSV1_0_SUPPLEMENTAL_CREDENTIAL = ^MSV1_0_SUPPLEMENTAL_CREDENTIAL;
+ {$EXTERNALSYM PMSV1_0_SUPPLEMENTAL_CREDENTIAL}
+ _MSV1_0_SUPPLEMENTAL_CREDENTIAL = record
+ Version: ULONG;
+ Flags: ULONG;
+ LmPassword: array [0..MSV1_0_OWF_PASSWORD_LENGTH - 1] of UCHAR;
+ NtPassword: array [0..MSV1_0_OWF_PASSWORD_LENGTH - 1] of UCHAR;
+ end;
+ {$EXTERNALSYM _MSV1_0_SUPPLEMENTAL_CREDENTIAL}
+ MSV1_0_SUPPLEMENTAL_CREDENTIAL = _MSV1_0_SUPPLEMENTAL_CREDENTIAL;
+ {$EXTERNALSYM MSV1_0_SUPPLEMENTAL_CREDENTIAL}
+ TMsv10SupplementalCredential = MSV1_0_SUPPLEMENTAL_CREDENTIAL;
+ PMsv10SupplementalCredential = PMSV1_0_SUPPLEMENTAL_CREDENTIAL;
+
+//
+// NTLM3 definitions.
+//
+
+const
+ MSV1_0_NTLM3_RESPONSE_LENGTH = 16;
+ {$EXTERNALSYM MSV1_0_NTLM3_RESPONSE_LENGTH}
+ MSV1_0_NTLM3_OWF_LENGTH = 16;
+ {$EXTERNALSYM MSV1_0_NTLM3_OWF_LENGTH}
+
+//
+// this is the longest amount of time we'll allow challenge response
+// pairs to be used. Note that this also has to allow for worst case clock skew
+//
+
+ MSV1_0_MAX_NTLM3_LIFE = 129600; // 36 hours (in seconds)
+ {$EXTERNALSYM MSV1_0_MAX_NTLM3_LIFE}
+ MSV1_0_MAX_AVL_SIZE = 64000;
+ {$EXTERNALSYM MSV1_0_MAX_AVL_SIZE}
+
+//
+// MsvAvFlags bit values
+//
+
+ MSV1_0_AV_FLAG_FORCE_GUEST = $00000001;
+ {$EXTERNALSYM MSV1_0_AV_FLAG_FORCE_GUEST}
+
+// this is an MSV1_0 private data structure, defining the layout of an NTLM3 response, as sent by a
+// client in the NtChallengeResponse field of the NETLOGON_NETWORK_INFO structure. If can be differentiated
+// from an old style NT response by its length. This is crude, but it needs to pass through servers and
+// the servers' DCs that do not understand NTLM3 but that are willing to pass longer responses.
+
+type
+ PMSV1_0_NTLM3_RESPONSE = ^MSV1_0_NTLM3_RESPONSE;
+ {$EXTERNALSYM PMSV1_0_NTLM3_RESPONSE}
+ _MSV1_0_NTLM3_RESPONSE = record
+ Response: array [0..MSV1_0_NTLM3_RESPONSE_LENGTH - 1] of UCHAR; // hash of OWF of password with all the following fields
+ RespType: UCHAR; // id number of response; current is 1
+ HiRespType: UCHAR; // highest id number understood by client
+ Flags: USHORT; // reserved; must be sent as zero at this version
+ MsgWord: ULONG; // 32 bit message from client to server (for use by auth protocol)
+ TimeStamp: ULONGLONG; // time stamp when client generated response -- NT system time, quad part
+ ChallengeFromClient: array [0..MSV1_0_CHALLENGE_LENGTH - 1] of UCHAR;
+ AvPairsOff: ULONG; // offset to start of AvPairs (to allow future expansion)
+ Buffer: array [0..0] of UCHAR; // start of buffer with AV pairs (or future stuff -- so use the offset)
+ end;
+ {$EXTERNALSYM _MSV1_0_NTLM3_RESPONSE}
+ MSV1_0_NTLM3_RESPONSE = _MSV1_0_NTLM3_RESPONSE;
+ {$EXTERNALSYM MSV1_0_NTLM3_RESPONSE}
+ TMsv10Ntlm3Response = MSV1_0_NTLM3_RESPONSE;
+ PMsv10Ntlm3Response = PMSV1_0_NTLM3_RESPONSE;
+
+const
+ MSV1_0_NTLM3_INPUT_LENGTH = SizeOf(MSV1_0_NTLM3_RESPONSE) - MSV1_0_NTLM3_RESPONSE_LENGTH;
+ {$EXTERNALSYM MSV1_0_NTLM3_INPUT_LENGTH}
+ //todo MSV1_0_NTLM3_MIN_NT_RESPONSE_LENGTH = RTL_SIZEOF_THROUGH_FIELD(MSV1_0_NTLM3_RESPONSE, AvPairsOff)
+ //{$EXTERNALSYM MSV1_0_NTLM3_MIN_NT_RESPONSE_LENGTH}
+
+type
+ MSV1_0_AVID = (
+ MsvAvEOL, // end of list
+ MsvAvNbComputerName, // server's computer name -- NetBIOS
+ MsvAvNbDomainName, // server's domain name -- NetBIOS
+ MsvAvDnsComputerName, // server's computer name -- DNS
+ MsvAvDnsDomainName, // server's domain name -- DNS
+ MsvAvDnsTreeName, // server's tree name -- DNS
+ MsvAvFlags); // server's extended flags -- DWORD mask
+ {$EXTERNALSYM MSV1_0_AVID}
+
+ PMSV1_0_AV_PAIR = ^MSV1_0_AV_PAIR;
+ {$EXTERNALSYM PMSV1_0_AV_PAIR}
+ _MSV1_0_AV_PAIR = record
+ AvId: USHORT;
+ AvLen: USHORT;
+ // Data is treated as byte array following structure
+ end;
+ {$EXTERNALSYM _MSV1_0_AV_PAIR}
+ MSV1_0_AV_PAIR = _MSV1_0_AV_PAIR;
+ {$EXTERNALSYM MSV1_0_AV_PAIR}
+ TMsv10AvPair = MSV1_0_AV_PAIR;
+ PMsv10AvPair = PMSV1_0_AV_PAIR;
+
+///////////////////////////////////////////////////////////////////////////////
+// //
+// CALL PACKAGE Related Data Structures //
+// //
+///////////////////////////////////////////////////////////////////////////////
+
+//
+// MSV1.0 LsaCallAuthenticationPackage() submission and response
+// message types.
+//
+
+ _MSV1_0_PROTOCOL_MESSAGE_TYPE = (
+ MsV1_0Lm20ChallengeRequest, // Both submission and response
+ MsV1_0Lm20GetChallengeResponse, // Both submission and response
+ MsV1_0EnumerateUsers, // Both submission and response
+ MsV1_0GetUserInfo, // Both submission and response
+ MsV1_0ReLogonUsers, // Submission only
+ MsV1_0ChangePassword, // Both submission and response
+ MsV1_0ChangeCachedPassword, // Both submission and response
+ MsV1_0GenericPassthrough, // Both submission and response
+ MsV1_0CacheLogon, // Submission only, no response
+ MsV1_0SubAuth, // Both submission and response
+ MsV1_0DeriveCredential, // Both submission and response
+ MsV1_0CacheLookup, // Both submission and response
+ MsV1_0SetProcessOption); // Submission only, no response
+ {$EXTERNALSYM _MSV1_0_PROTOCOL_MESSAGE_TYPE}
+ MSV1_0_PROTOCOL_MESSAGE_TYPE = _MSV1_0_PROTOCOL_MESSAGE_TYPE;
+ {$EXTERNALSYM MSV1_0_PROTOCOL_MESSAGE_TYPE}
+ PMSV1_0_PROTOCOL_MESSAGE_TYPE = ^MSV1_0_PROTOCOL_MESSAGE_TYPE;
+ {$EXTERNALSYM PMSV1_0_PROTOCOL_MESSAGE_TYPE}
+ TMsv1_0ProtocolMessageType = MSV1_0_PROTOCOL_MESSAGE_TYPE;
+ PMsv1_0ProtocolMessageType = PMSV1_0_PROTOCOL_MESSAGE_TYPE;
+
+ PMSV1_0_CHANGEPASSWORD_REQUEST = ^MSV1_0_CHANGEPASSWORD_REQUEST;
+ {$EXTERNALSYM PMSV1_0_CHANGEPASSWORD_REQUEST}
+ _MSV1_0_CHANGEPASSWORD_REQUEST = record
+ MessageType: MSV1_0_PROTOCOL_MESSAGE_TYPE;
+ DomainName: UNICODE_STRING;
+ AccountName: UNICODE_STRING;
+ OldPassword: UNICODE_STRING;
+ NewPassword: UNICODE_STRING;
+ Impersonating: ByteBool;
+ end;
+ {$EXTERNALSYM _MSV1_0_CHANGEPASSWORD_REQUEST}
+ MSV1_0_CHANGEPASSWORD_REQUEST = _MSV1_0_CHANGEPASSWORD_REQUEST;
+ {$EXTERNALSYM MSV1_0_CHANGEPASSWORD_REQUEST}
+ TMsv10ChangepasswordRequest = MSV1_0_CHANGEPASSWORD_REQUEST;
+ PMsv10ChangepasswordRequest = PMSV1_0_CHANGEPASSWORD_REQUEST;
+
+ PMSV1_0_CHANGEPASSWORD_RESPONSE = ^MSV1_0_CHANGEPASSWORD_RESPONSE;
+ {$EXTERNALSYM PMSV1_0_CHANGEPASSWORD_RESPONSE}
+ _MSV1_0_CHANGEPASSWORD_RESPONSE = record
+ MessageType: MSV1_0_PROTOCOL_MESSAGE_TYPE;
+ PasswordInfoValid: ByteBool;
+ DomainPasswordInfo: DOMAIN_PASSWORD_INFORMATION;
+ end;
+ {$EXTERNALSYM _MSV1_0_CHANGEPASSWORD_RESPONSE}
+ MSV1_0_CHANGEPASSWORD_RESPONSE = _MSV1_0_CHANGEPASSWORD_RESPONSE;
+ {$EXTERNALSYM MSV1_0_CHANGEPASSWORD_RESPONSE}
+ TMsv10ChangepasswordResponse = MSV1_0_CHANGEPASSWORD_RESPONSE;
+ PMsv10ChangepasswordResponse = PMSV1_0_CHANGEPASSWORD_RESPONSE;
+
+//
+// MsV1_0GenericPassthrough - for remoting a CallPackage to
+// a domain controller on the specified domain
+//
+
+ _MSV1_0_PASSTHROUGH_REQUEST = record
+ MessageType: MSV1_0_PROTOCOL_MESSAGE_TYPE;
+ DomainName: UNICODE_STRING;
+ PackageName: UNICODE_STRING;
+ DataLength: ULONG;
+ LogonData: PUCHAR;
+ Pad: ULONG;
+ end;
+ {$EXTERNALSYM _MSV1_0_PASSTHROUGH_REQUEST}
+ MSV1_0_PASSTHROUGH_REQUEST = _MSV1_0_PASSTHROUGH_REQUEST;
+ {$EXTERNALSYM MSV1_0_PASSTHROUGH_REQUEST}
+ PMSV1_0_PASSTHROUGH_REQUEST = ^MSV1_0_PASSTHROUGH_REQUEST;
+ {$EXTERNALSYM PMSV1_0_PASSTHROUGH_REQUEST}
+ TMsv10PassThroughRequest = MSV1_0_PASSTHROUGH_REQUEST;
+ PMsv10PassThroughRequest = PMSV1_0_PASSTHROUGH_REQUEST;
+
+ _MSV1_0_PASSTHROUGH_RESPONSE = record
+ MessageType: MSV1_0_PROTOCOL_MESSAGE_TYPE;
+ Pad: ULONG;
+ DataLength: ULONG;
+ ValidationData: PUCHAR;
+ end;
+ {$EXTERNALSYM _MSV1_0_PASSTHROUGH_RESPONSE}
+ MSV1_0_PASSTHROUGH_RESPONSE = _MSV1_0_PASSTHROUGH_RESPONSE;
+ {$EXTERNALSYM MSV1_0_PASSTHROUGH_RESPONSE}
+ PMSV1_0_PASSTHROUGH_RESPONSE = ^MSV1_0_PASSTHROUGH_RESPONSE;
+ {$EXTERNALSYM PMSV1_0_PASSTHROUGH_RESPONSE}
+ TMsv10PassThroughResponse = MSV1_0_PASSTHROUGH_RESPONSE;
+ PMsv10PassThroughResponse = PMSV1_0_PASSTHROUGH_RESPONSE;
+
+//
+// MsV1_0SubAuthInfo submit buffer and response - for submitting a buffer to a
+// specified Subauthentication Package during an LsaCallAuthenticationPackage().
+// If this Subauthentication is to be done locally, then package this message
+// in LsaCallAuthenticationPackage(). If this SubAuthentication needs to be done
+// on the domain controller, then call LsaCallauthenticationPackage with the
+// message type being MsV1_0GenericPassThrough and the LogonData in this struct
+// should be a PMSV1_0_SUBAUTH_REQUEST
+//
+
+ PMSV1_0_SUBAUTH_REQUEST = ^MSV1_0_SUBAUTH_REQUEST;
+ {$EXTERNALSYM PMSV1_0_SUBAUTH_REQUEST}
+ _MSV1_0_SUBAUTH_REQUEST = record
+ MessageType: MSV1_0_PROTOCOL_MESSAGE_TYPE;
+ SubAuthPackageId: ULONG;
+ SubAuthInfoLength: ULONG;
+ SubAuthSubmitBuffer: PUCHAR;
+ end;
+ {$EXTERNALSYM _MSV1_0_SUBAUTH_REQUEST}
+ MSV1_0_SUBAUTH_REQUEST = _MSV1_0_SUBAUTH_REQUEST;
+ {$EXTERNALSYM MSV1_0_SUBAUTH_REQUEST}
+ TMsv10SubauthRequest = MSV1_0_SUBAUTH_REQUEST;
+ PMsv10SubauthRequest = PMSV1_0_SUBAUTH_REQUEST;
+
+ PMSV1_0_SUBAUTH_RESPONSE = ^MSV1_0_SUBAUTH_RESPONSE;
+ {$EXTERNALSYM PMSV1_0_SUBAUTH_RESPONSE}
+ _MSV1_0_SUBAUTH_RESPONSE = record
+ MessageType: MSV1_0_PROTOCOL_MESSAGE_TYPE;
+ SubAuthInfoLength: ULONG;
+ SubAuthReturnBuffer: PUCHAR;
+ end;
+ {$EXTERNALSYM _MSV1_0_SUBAUTH_RESPONSE}
+ MSV1_0_SUBAUTH_RESPONSE = _MSV1_0_SUBAUTH_RESPONSE;
+ {$EXTERNALSYM MSV1_0_SUBAUTH_RESPONSE}
+ TMsv10SubauthResponse = MSV1_0_SUBAUTH_RESPONSE;
+ PMsv10SubauthResponse = PMSV1_0_SUBAUTH_RESPONSE;
+
+//
+// Credential Derivation types for MsV1_0DeriveCredential Submit DeriveCredType
+//
+
+//
+// Derive Credential using SHA-1 and Request buffer DeriveCredSubmitBuffer of
+// length DeriveCredInfoLength mixing bytes.
+// Response buffer DeriveCredReturnBuffer will contain SHA-1 hash of size
+// A_SHA_DIGEST_LEN (20)
+//
+
+const
+ MSV1_0_DERIVECRED_TYPE_SHA1 = 0;
+ {$EXTERNALSYM MSV1_0_DERIVECRED_TYPE_SHA1}
+
+//
+// MsV1_0DeriveCredential submit buffer and response - for submitting a buffer
+// an call to LsaCallAuthenticationPackage().
+//
+
+type
+ PMSV1_0_DERIVECRED_REQUEST = ^MSV1_0_DERIVECRED_REQUEST;
+ {$EXTERNALSYM PMSV1_0_DERIVECRED_REQUEST}
+ _MSV1_0_DERIVECRED_REQUEST = record
+ MessageType: MSV1_0_PROTOCOL_MESSAGE_TYPE;
+ LogonId: LUID;
+ DeriveCredType: ULONG;
+ DeriveCredInfoLength: ULONG;
+ DeriveCredSubmitBuffer: array [0..0] of UCHAR; // in-place array of length DeriveCredInfoLength
+ end;
+ {$EXTERNALSYM _MSV1_0_DERIVECRED_REQUEST}
+ MSV1_0_DERIVECRED_REQUEST = _MSV1_0_DERIVECRED_REQUEST;
+ {$EXTERNALSYM MSV1_0_DERIVECRED_REQUEST}
+ TMsv10DeriveCredRequest = MSV1_0_DERIVECRED_REQUEST;
+ PMsv10DeriveCredRequest = PMSV1_0_DERIVECRED_REQUEST;
+
+ PMSV1_0_DERIVECRED_RESPONSE = ^MSV1_0_DERIVECRED_RESPONSE;
+ {$EXTERNALSYM PMSV1_0_DERIVECRED_RESPONSE}
+ _MSV1_0_DERIVECRED_RESPONSE = record
+ MessageType: MSV1_0_PROTOCOL_MESSAGE_TYPE;
+ DeriveCredInfoLength: ULONG;
+ DeriveCredReturnBuffer: array [0..0] of UCHAR; // in-place array of length DeriveCredInfoLength
+ end;
+ {$EXTERNALSYM _MSV1_0_DERIVECRED_RESPONSE}
+ MSV1_0_DERIVECRED_RESPONSE = _MSV1_0_DERIVECRED_RESPONSE;
+ {$EXTERNALSYM MSV1_0_DERIVECRED_RESPONSE}
+ TMsv10DeriveCredResponse = MSV1_0_DERIVECRED_RESPONSE;
+ PMsv10DeriveCredResponse = PMSV1_0_DERIVECRED_RESPONSE;
+
+// Revision of the Kerberos Protocol. MS uses Version 5, Revision 6
+
+const
+ KERBEROS_VERSION = 5;
+ {$EXTERNALSYM KERBEROS_VERSION}
+ KERBEROS_REVISION = 6;
+ {$EXTERNALSYM KERBEROS_REVISION}
+
+// Encryption Types:
+// These encryption types are supported by the default MS KERBSUPP DLL
+// as crypto systems. Values over 127 are local values, and may be changed
+// without notice.
+
+ KERB_ETYPE_NULL = 0;
+ {$EXTERNALSYM KERB_ETYPE_NULL}
+ KERB_ETYPE_DES_CBC_CRC = 1;
+ {$EXTERNALSYM KERB_ETYPE_DES_CBC_CRC}
+ KERB_ETYPE_DES_CBC_MD4 = 2;
+ {$EXTERNALSYM KERB_ETYPE_DES_CBC_MD4}
+ KERB_ETYPE_DES_CBC_MD5 = 3;
+ {$EXTERNALSYM KERB_ETYPE_DES_CBC_MD5}
+
+ KERB_ETYPE_RC4_MD4 = -128;
+ {$EXTERNALSYM KERB_ETYPE_RC4_MD4}
+ KERB_ETYPE_RC4_PLAIN2 = -129;
+ {$EXTERNALSYM KERB_ETYPE_RC4_PLAIN2}
+ KERB_ETYPE_RC4_LM = -130;
+ {$EXTERNALSYM KERB_ETYPE_RC4_LM}
+ KERB_ETYPE_RC4_SHA = -131;
+ {$EXTERNALSYM KERB_ETYPE_RC4_SHA}
+ KERB_ETYPE_DES_PLAIN = -132;
+ {$EXTERNALSYM KERB_ETYPE_DES_PLAIN}
+ KERB_ETYPE_RC4_HMAC_OLD = -133;
+ {$EXTERNALSYM KERB_ETYPE_RC4_HMAC_OLD}
+ KERB_ETYPE_RC4_PLAIN_OLD = -134;
+ {$EXTERNALSYM KERB_ETYPE_RC4_PLAIN_OLD}
+ KERB_ETYPE_RC4_HMAC_OLD_EXP = -135;
+ {$EXTERNALSYM KERB_ETYPE_RC4_HMAC_OLD_EXP}
+ KERB_ETYPE_RC4_PLAIN_OLD_EXP = -136;
+ {$EXTERNALSYM KERB_ETYPE_RC4_PLAIN_OLD_EXP}
+ KERB_ETYPE_RC4_PLAIN = -140;
+ {$EXTERNALSYM KERB_ETYPE_RC4_PLAIN}
+ KERB_ETYPE_RC4_PLAIN_EXP = -141;
+ {$EXTERNALSYM KERB_ETYPE_RC4_PLAIN_EXP}
+
+//
+// Pkinit encryption types
+//
+
+ KERB_ETYPE_DSA_SHA1_CMS = 9;
+ {$EXTERNALSYM KERB_ETYPE_DSA_SHA1_CMS}
+ KERB_ETYPE_RSA_MD5_CMS = 10;
+ {$EXTERNALSYM KERB_ETYPE_RSA_MD5_CMS}
+ KERB_ETYPE_RSA_SHA1_CMS = 11;
+ {$EXTERNALSYM KERB_ETYPE_RSA_SHA1_CMS}
+ KERB_ETYPE_RC2_CBC_ENV = 12;
+ {$EXTERNALSYM KERB_ETYPE_RC2_CBC_ENV}
+ KERB_ETYPE_RSA_ENV = 13;
+ {$EXTERNALSYM KERB_ETYPE_RSA_ENV}
+ KERB_ETYPE_RSA_ES_OEAP_ENV = 14;
+ {$EXTERNALSYM KERB_ETYPE_RSA_ES_OEAP_ENV}
+ KERB_ETYPE_DES_EDE3_CBC_ENV = 15;
+ {$EXTERNALSYM KERB_ETYPE_DES_EDE3_CBC_ENV}
+
+//
+// Deprecated
+//
+
+ KERB_ETYPE_DSA_SIGN = 8;
+ {$EXTERNALSYM KERB_ETYPE_DSA_SIGN}
+ KERB_ETYPE_RSA_PRIV = 9;
+ {$EXTERNALSYM KERB_ETYPE_RSA_PRIV}
+ KERB_ETYPE_RSA_PUB = 10;
+ {$EXTERNALSYM KERB_ETYPE_RSA_PUB}
+ KERB_ETYPE_RSA_PUB_MD5 = 11;
+ {$EXTERNALSYM KERB_ETYPE_RSA_PUB_MD5}
+ KERB_ETYPE_RSA_PUB_SHA1 = 12;
+ {$EXTERNALSYM KERB_ETYPE_RSA_PUB_SHA1}
+ KERB_ETYPE_PKCS7_PUB = 13;
+ {$EXTERNALSYM KERB_ETYPE_PKCS7_PUB}
+
+//
+// Unsupported but defined types
+//
+
+ KERB_ETYPE_DES3_CBC_MD5 = 5;
+ {$EXTERNALSYM KERB_ETYPE_DES3_CBC_MD5}
+ KERB_ETYPE_DES3_CBC_SHA1 = 7;
+ {$EXTERNALSYM KERB_ETYPE_DES3_CBC_SHA1}
+ KERB_ETYPE_DES3_CBC_SHA1_KD = 16;
+ {$EXTERNALSYM KERB_ETYPE_DES3_CBC_SHA1_KD}
+
+//
+// In use types
+//
+
+ KERB_ETYPE_DES_CBC_MD5_NT = 20;
+ {$EXTERNALSYM KERB_ETYPE_DES_CBC_MD5_NT}
+ KERB_ETYPE_RC4_HMAC_NT = 23;
+ {$EXTERNALSYM KERB_ETYPE_RC4_HMAC_NT}
+ KERB_ETYPE_RC4_HMAC_NT_EXP = 24;
+ {$EXTERNALSYM KERB_ETYPE_RC4_HMAC_NT_EXP}
+
+// Checksum algorithms.
+// These algorithms are keyed internally for our use.
+
+ KERB_CHECKSUM_NONE = 0;
+ {$EXTERNALSYM KERB_CHECKSUM_NONE}
+ KERB_CHECKSUM_CRC32 = 1;
+ {$EXTERNALSYM KERB_CHECKSUM_CRC32}
+ KERB_CHECKSUM_MD4 = 2;
+ {$EXTERNALSYM KERB_CHECKSUM_MD4}
+ KERB_CHECKSUM_KRB_DES_MAC = 4;
+ {$EXTERNALSYM KERB_CHECKSUM_KRB_DES_MAC}
+ KERB_CHECKSUM_KRB_DES_MAC_K = 5;
+ {$EXTERNALSYM KERB_CHECKSUM_KRB_DES_MAC_K}
+ KERB_CHECKSUM_MD5 = 7;
+ {$EXTERNALSYM KERB_CHECKSUM_MD5}
+ KERB_CHECKSUM_MD5_DES = 8;
+ {$EXTERNALSYM KERB_CHECKSUM_MD5_DES}
+
+ KERB_CHECKSUM_LM = -130;
+ {$EXTERNALSYM KERB_CHECKSUM_LM}
+ KERB_CHECKSUM_SHA1 = -131;
+ {$EXTERNALSYM KERB_CHECKSUM_SHA1}
+ KERB_CHECKSUM_REAL_CRC32 = -132;
+ {$EXTERNALSYM KERB_CHECKSUM_REAL_CRC32}
+ KERB_CHECKSUM_DES_MAC = -133;
+ {$EXTERNALSYM KERB_CHECKSUM_DES_MAC}
+ KERB_CHECKSUM_DES_MAC_MD5 = -134;
+ {$EXTERNALSYM KERB_CHECKSUM_DES_MAC_MD5}
+ KERB_CHECKSUM_MD25 = -135;
+ {$EXTERNALSYM KERB_CHECKSUM_MD25}
+ KERB_CHECKSUM_RC4_MD5 = -136;
+ {$EXTERNALSYM KERB_CHECKSUM_RC4_MD5}
+ KERB_CHECKSUM_MD5_HMAC = -137; // used by netlogon
+ {$EXTERNALSYM KERB_CHECKSUM_MD5_HMAC}
+ KERB_CHECKSUM_HMAC_MD5 = -138; // used by Kerberos
+ {$EXTERNALSYM KERB_CHECKSUM_HMAC_MD5}
+
+ AUTH_REQ_ALLOW_FORWARDABLE = $00000001;
+ {$EXTERNALSYM AUTH_REQ_ALLOW_FORWARDABLE}
+ AUTH_REQ_ALLOW_PROXIABLE = $00000002;
+ {$EXTERNALSYM AUTH_REQ_ALLOW_PROXIABLE}
+ AUTH_REQ_ALLOW_POSTDATE = $00000004;
+ {$EXTERNALSYM AUTH_REQ_ALLOW_POSTDATE}
+ AUTH_REQ_ALLOW_RENEWABLE = $00000008;
+ {$EXTERNALSYM AUTH_REQ_ALLOW_RENEWABLE}
+ AUTH_REQ_ALLOW_NOADDRESS = $00000010;
+ {$EXTERNALSYM AUTH_REQ_ALLOW_NOADDRESS}
+ AUTH_REQ_ALLOW_ENC_TKT_IN_SKEY = $00000020;
+ {$EXTERNALSYM AUTH_REQ_ALLOW_ENC_TKT_IN_SKEY}
+ AUTH_REQ_ALLOW_VALIDATE = $00000040;
+ {$EXTERNALSYM AUTH_REQ_ALLOW_VALIDATE}
+ AUTH_REQ_VALIDATE_CLIENT = $00000080;
+ {$EXTERNALSYM AUTH_REQ_VALIDATE_CLIENT}
+ AUTH_REQ_OK_AS_DELEGATE = $00000100;
+ {$EXTERNALSYM AUTH_REQ_OK_AS_DELEGATE}
+ AUTH_REQ_PREAUTH_REQUIRED = $00000200;
+ {$EXTERNALSYM AUTH_REQ_PREAUTH_REQUIRED}
+ AUTH_REQ_TRANSITIVE_TRUST = $00000400;
+ {$EXTERNALSYM AUTH_REQ_TRANSITIVE_TRUST}
+ AUTH_REQ_ALLOW_S4U_DELEGATE = $00000800;
+ {$EXTERNALSYM AUTH_REQ_ALLOW_S4U_DELEGATE}
+
+ AUTH_REQ_PER_USER_FLAGS = (AUTH_REQ_ALLOW_FORWARDABLE or
+ AUTH_REQ_ALLOW_PROXIABLE or
+ AUTH_REQ_ALLOW_POSTDATE or
+ AUTH_REQ_ALLOW_RENEWABLE or
+ AUTH_REQ_ALLOW_VALIDATE);
+ {$EXTERNALSYM AUTH_REQ_PER_USER_FLAGS}
+
+//
+// Ticket Flags:
+//
+
+ KERB_TICKET_FLAGS_reserved = DWORD($80000000);
+ {$EXTERNALSYM KERB_TICKET_FLAGS_reserved}
+ KERB_TICKET_FLAGS_forwardable = $40000000;
+ {$EXTERNALSYM KERB_TICKET_FLAGS_forwardable}
+ KERB_TICKET_FLAGS_forwarded = $20000000;
+ {$EXTERNALSYM KERB_TICKET_FLAGS_forwarded}
+ KERB_TICKET_FLAGS_proxiable = $10000000;
+ {$EXTERNALSYM KERB_TICKET_FLAGS_proxiable}
+ KERB_TICKET_FLAGS_proxy = $08000000;
+ {$EXTERNALSYM KERB_TICKET_FLAGS_proxy}
+ KERB_TICKET_FLAGS_may_postdate = $04000000;
+ {$EXTERNALSYM KERB_TICKET_FLAGS_may_postdate}
+ KERB_TICKET_FLAGS_postdated = $02000000;
+ {$EXTERNALSYM KERB_TICKET_FLAGS_postdated}
+ KERB_TICKET_FLAGS_invalid = $01000000;
+ {$EXTERNALSYM KERB_TICKET_FLAGS_invalid}
+ KERB_TICKET_FLAGS_renewable = $00800000;
+ {$EXTERNALSYM KERB_TICKET_FLAGS_renewable}
+ KERB_TICKET_FLAGS_initial = $00400000;
+ {$EXTERNALSYM KERB_TICKET_FLAGS_initial}
+ KERB_TICKET_FLAGS_pre_authent = $00200000;
+ {$EXTERNALSYM KERB_TICKET_FLAGS_pre_authent}
+ KERB_TICKET_FLAGS_hw_authent = $00100000;
+ {$EXTERNALSYM KERB_TICKET_FLAGS_hw_authent}
+ KERB_TICKET_FLAGS_ok_as_delegate = $00040000;
+ {$EXTERNALSYM KERB_TICKET_FLAGS_ok_as_delegate}
+ KERB_TICKET_FLAGS_name_canonicalize = $00010000;
+ {$EXTERNALSYM KERB_TICKET_FLAGS_name_canonicalize}
+ KERB_TICKET_FLAGS_reserved1 = $00000001;
+ {$EXTERNALSYM KERB_TICKET_FLAGS_reserved1}
+
+//
+// Name types
+//
+
+ KRB_NT_UNKNOWN = 0; // Name type not known
+ {$EXTERNALSYM KRB_NT_UNKNOWN}
+ KRB_NT_PRINCIPAL = 1; // Just the name of the principal as in DCE, or for users
+ {$EXTERNALSYM KRB_NT_PRINCIPAL}
+ KRB_NT_PRINCIPAL_AND_ID = -131; // Name of the principal and its SID.
+ {$EXTERNALSYM KRB_NT_PRINCIPAL_AND_ID}
+ KRB_NT_SRV_INST = 2; // Service and other unique instance (krbtgt)
+ {$EXTERNALSYM KRB_NT_SRV_INST}
+ KRB_NT_SRV_INST_AND_ID = -132; // SPN and SID
+ {$EXTERNALSYM KRB_NT_SRV_INST_AND_ID}
+ KRB_NT_SRV_HST = 3; // Service with host name as instance (telnet, rcommands)
+ {$EXTERNALSYM KRB_NT_SRV_HST}
+ KRB_NT_SRV_XHST = 4; // Service with host as remaining components
+ {$EXTERNALSYM KRB_NT_SRV_XHST}
+ KRB_NT_UID = 5; // Unique ID
+ {$EXTERNALSYM KRB_NT_UID}
+ KRB_NT_ENTERPRISE_PRINCIPAL = 10; // UPN or SPN
+ {$EXTERNALSYM KRB_NT_ENTERPRISE_PRINCIPAL}
+ KRB_NT_ENT_PRINCIPAL_AND_ID = -130; // UPN and SID
+ {$EXTERNALSYM KRB_NT_ENT_PRINCIPAL_AND_ID}
+
+//
+// MS extensions, negative according to the RFC
+//
+
+ KRB_NT_MS_PRINCIPAL = -128; // NT4 style name
+ {$EXTERNALSYM KRB_NT_MS_PRINCIPAL}
+
+ KRB_NT_MS_PRINCIPAL_AND_ID = -129; // nt4 style name with sid
+ {$EXTERNALSYM KRB_NT_MS_PRINCIPAL_AND_ID}
+
+// todo #define KERB_IS_MS_PRINCIPAL(_x_) (((_x_) <= KRB_NT_MS_PRINCIPAL) || ((_x_) >= KRB_NT_ENTERPRISE_PRINCIPAL))
+
+ MICROSOFT_KERBEROS_NAME_A = 'Kerberos';
+ {$EXTERNALSYM MICROSOFT_KERBEROS_NAME_A}
+ MICROSOFT_KERBEROS_NAME_W = WideString('Kerberos');
+ {$EXTERNALSYM MICROSOFT_KERBEROS_NAME_W}
+
+ {$IFDEF UNICODE}
+ MICROSOFT_KERBEROS_NAME = MICROSOFT_KERBEROS_NAME_W;
+ {$EXTERNALSYM MICROSOFT_KERBEROS_NAME}
+ {$ELSE}
+ MICROSOFT_KERBEROS_NAME = MICROSOFT_KERBEROS_NAME_A;
+ {$EXTERNALSYM MICROSOFT_KERBEROS_NAME}
+ {$ENDIF UNICODE}
+
+/////////////////////////////////////////////////////////////////////////
+//
+// Quality of protection parameters for MakeSignature / EncryptMessage
+//
+/////////////////////////////////////////////////////////////////////////
+
+//
+// This flag indicates to EncryptMessage that the message is not to actually
+// be encrypted, but a header/trailer are to be produced.
+//
+
+ KERB_WRAP_NO_ENCRYPT = DWORD($80000001);
+ {$EXTERNALSYM KERB_WRAP_NO_ENCRYPT}
+
+/////////////////////////////////////////////////////////////////////////
+//
+// LsaLogonUser parameters
+//
+/////////////////////////////////////////////////////////////////////////
+
+const
+ KerbInteractiveLogon = 2;
+ KerbSmartCardLogon = 6;
+ KerbWorkstationUnlockLogon = 7;
+ KerbSmartCardUnlockLogon = 8;
+ KerbProxyLogon = 9;
+ KerbTicketLogon = 10;
+ KerbTicketUnlockLogon = 11;
+ KerbS4ULogon = 12;
+
+type
+ KERB_LOGON_SUBMIT_TYPE = DWORD;
+ {$EXTERNALSYM KERB_LOGON_SUBMIT_TYPE}
+ PKERB_LOGON_SUBMIT_TYPE = ^KERB_LOGON_SUBMIT_TYPE;
+ {$EXTERNALSYM PKERB_LOGON_SUBMIT_TYPE}
+
+ PKERB_INTERACTIVE_LOGON = ^KERB_INTERACTIVE_LOGON;
+ {$EXTERNALSYM PKERB_INTERACTIVE_LOGON}
+ _KERB_INTERACTIVE_LOGON = record
+ MessageType: KERB_LOGON_SUBMIT_TYPE;
+ LogonDomainName: UNICODE_STRING;
+ UserName: UNICODE_STRING;
+ Password: UNICODE_STRING;
+ end;
+ {$EXTERNALSYM _KERB_INTERACTIVE_LOGON}
+ KERB_INTERACTIVE_LOGON = _KERB_INTERACTIVE_LOGON;
+ {$EXTERNALSYM KERB_INTERACTIVE_LOGON}
+ TKerbInteractiveLogon = KERB_INTERACTIVE_LOGON;
+ PKerbInteractiveLogon = PKERB_INTERACTIVE_LOGON;
+
+ PKERB_INTERACTIVE_UNLOCK_LOGON = ^KERB_INTERACTIVE_UNLOCK_LOGON;
+ {$EXTERNALSYM PKERB_INTERACTIVE_UNLOCK_LOGON}
+ _KERB_INTERACTIVE_UNLOCK_LOGON = record
+ Logon: KERB_INTERACTIVE_LOGON;
+ LogonId: LUID;
+ end;
+ {$EXTERNALSYM _KERB_INTERACTIVE_UNLOCK_LOGON}
+ KERB_INTERACTIVE_UNLOCK_LOGON = _KERB_INTERACTIVE_UNLOCK_LOGON;
+ {$EXTERNALSYM KERB_INTERACTIVE_UNLOCK_LOGON}
+ TKerbInteractiveUnlockLogon = KERB_INTERACTIVE_UNLOCK_LOGON;
+ PKerbInteractiveUnlockLogon = PKERB_INTERACTIVE_UNLOCK_LOGON;
+
+ PKERB_SMART_CARD_LOGON = ^KERB_SMART_CARD_LOGON;
+ {$EXTERNALSYM PKERB_SMART_CARD_LOGON}
+ _KERB_SMART_CARD_LOGON = record
+ MessageType: KERB_LOGON_SUBMIT_TYPE;
+ Pin: UNICODE_STRING;
+ CspDataLength: ULONG;
+ CspData: PUCHAR;
+ end;
+ {$EXTERNALSYM _KERB_SMART_CARD_LOGON}
+ KERB_SMART_CARD_LOGON = _KERB_SMART_CARD_LOGON;
+ {$EXTERNALSYM KERB_SMART_CARD_LOGON}
+ TKerbSmartCardLogon = KERB_SMART_CARD_LOGON;
+ PKerbSmartCardLogon = PKERB_SMART_CARD_LOGON;
+
+ PKERB_SMART_CARD_UNLOCK_LOGON = ^KERB_SMART_CARD_UNLOCK_LOGON;
+ {$EXTERNALSYM PKERB_SMART_CARD_UNLOCK_LOGON}
+ _KERB_SMART_CARD_UNLOCK_LOGON = record
+ Logon: KERB_SMART_CARD_LOGON;
+ LogonId: LUID;
+ end;
+ {$EXTERNALSYM _KERB_SMART_CARD_UNLOCK_LOGON}
+ KERB_SMART_CARD_UNLOCK_LOGON = _KERB_SMART_CARD_UNLOCK_LOGON;
+ {$EXTERNALSYM KERB_SMART_CARD_UNLOCK_LOGON}
+ TKerbSmartCardUnlockLogon = KERB_SMART_CARD_UNLOCK_LOGON;
+ PKerbSmartCardUnlockLogon = PKERB_SMART_CARD_UNLOCK_LOGON;
+
+//
+// Structure used for a ticket-only logon
+//
+
+ PKERB_TICKET_LOGON = ^KERB_TICKET_LOGON;
+ {$EXTERNALSYM PKERB_TICKET_LOGON}
+ _KERB_TICKET_LOGON = record
+ MessageType: KERB_LOGON_SUBMIT_TYPE;
+ Flags: ULONG;
+ ServiceTicketLength: ULONG;
+ TicketGrantingTicketLength: ULONG;
+ ServiceTicket: PUCHAR; // REQUIRED: Service ticket "host"
+ TicketGrantingTicket: PUCHAR; // OPTIONAL: User's encdoded in a KERB_CRED message, encrypted with session key from service ticket
+ end;
+ {$EXTERNALSYM _KERB_TICKET_LOGON}
+ KERB_TICKET_LOGON = _KERB_TICKET_LOGON;
+ {$EXTERNALSYM KERB_TICKET_LOGON}
+ TKerbTicketLogon = KERB_TICKET_LOGON;
+ PKerbTicketLogon = PKERB_TICKET_LOGON;
+
+//
+// Flags for the ticket logon flags field
+//
+
+const
+ KERB_LOGON_FLAG_ALLOW_EXPIRED_TICKET = $1;
+ {$EXTERNALSYM KERB_LOGON_FLAG_ALLOW_EXPIRED_TICKET}
+
+type
+ PKERB_TICKET_UNLOCK_LOGON = ^KERB_TICKET_UNLOCK_LOGON;
+ {$EXTERNALSYM PKERB_TICKET_UNLOCK_LOGON}
+ _KERB_TICKET_UNLOCK_LOGON = record
+ Logon: KERB_TICKET_LOGON;
+ LogonId: LUID;
+ end;
+ {$EXTERNALSYM _KERB_TICKET_UNLOCK_LOGON}
+ KERB_TICKET_UNLOCK_LOGON = _KERB_TICKET_UNLOCK_LOGON;
+ {$EXTERNALSYM KERB_TICKET_UNLOCK_LOGON}
+ TKerbTicketUnlockLogon = KERB_TICKET_UNLOCK_LOGON;
+ PKerbTicketUnlockLogon = PKERB_TICKET_UNLOCK_LOGON;
+
+//
+// Used for S4U Client requests
+//
+//
+
+ _KERB_S4U_LOGON = record
+ MessageType: KERB_LOGON_SUBMIT_TYPE;
+ Flags: ULONG;
+ ClientUpn: UNICODE_STRING; // REQUIRED: UPN for client
+ ClientRealm: UNICODE_STRING; // Optional: Client Realm, if known
+ end;
+ {$EXTERNALSYM _KERB_S4U_LOGON}
+ KERB_S4U_LOGON = _KERB_S4U_LOGON;
+ {$EXTERNALSYM KERB_S4U_LOGON}
+ PKERB_S4U_LOGON = ^KERB_S4U_LOGON;
+ {$EXTERNALSYM PKERB_S4U_LOGON}
+ TKerbS4ULogon = KERB_S4U_LOGON;
+ PKerbS4ULogon = PKERB_S4U_LOGON;
+
+//
+// Use the same profile structure as MSV1_0
+//
+
+type
+ _KERB_PROFILE_BUFFER_TYPE = (
+ kpbtFiller0, kpbtFiller1,
+ KerbInteractiveProfile,
+ kpbtFiller3,
+ KerbSmartCardProfile,
+ kpbtFiller5,
+ KerbTicketProfile);
+ {$EXTERNALSYM _KERB_PROFILE_BUFFER_TYPE}
+ KERB_PROFILE_BUFFER_TYPE = _KERB_PROFILE_BUFFER_TYPE;
+ {$EXTERNALSYM KERB_PROFILE_BUFFER_TYPE}
+ PKERB_PROFILE_BUFFER_TYPE = ^KERB_PROFILE_BUFFER_TYPE;
+ {$EXTERNALSYM PKERB_PROFILE_BUFFER_TYPE}
+ TKerbProfileBufferType = KERB_PROFILE_BUFFER_TYPE;
+ PKerbProfileBufferType = PKERB_PROFILE_BUFFER_TYPE;
+
+ PKERB_INTERACTIVE_PROFILE = ^KERB_INTERACTIVE_PROFILE;
+ {$EXTERNALSYM PKERB_INTERACTIVE_PROFILE}
+ _KERB_INTERACTIVE_PROFILE = record
+ MessageType: KERB_PROFILE_BUFFER_TYPE;
+ LogonCount: USHORT;
+ BadPasswordCount: USHORT;
+ LogonTime: LARGE_INTEGER;
+ LogoffTime: LARGE_INTEGER;
+ KickOffTime: LARGE_INTEGER;
+ PasswordLastSet: LARGE_INTEGER;
+ PasswordCanChange: LARGE_INTEGER;
+ PasswordMustChange: LARGE_INTEGER;
+ LogonScript: UNICODE_STRING;
+ HomeDirectory: UNICODE_STRING;
+ FullName: UNICODE_STRING;
+ ProfilePath: UNICODE_STRING;
+ HomeDirectoryDrive: UNICODE_STRING;
+ LogonServer: UNICODE_STRING;
+ UserFlags: ULONG;
+ end;
+ {$EXTERNALSYM _KERB_INTERACTIVE_PROFILE}
+ KERB_INTERACTIVE_PROFILE = _KERB_INTERACTIVE_PROFILE;
+ {$EXTERNALSYM KERB_INTERACTIVE_PROFILE}
+ TKerbInteractiveProfile = KERB_INTERACTIVE_PROFILE;
+ PKerbInteractiveProfile = PKERB_INTERACTIVE_PROFILE;
+
+//
+// For smart card, we return a smart card profile, which is an interactive
+// profile plus a certificate
+//
+
+ PKERB_SMART_CARD_PROFILE = ^KERB_SMART_CARD_PROFILE;
+ {$EXTERNALSYM PKERB_SMART_CARD_PROFILE}
+ _KERB_SMART_CARD_PROFILE = record
+ Profile: KERB_INTERACTIVE_PROFILE;
+ CertificateSize: ULONG;
+ CertificateData: PUCHAR;
+ end;
+ {$EXTERNALSYM _KERB_SMART_CARD_PROFILE}
+ KERB_SMART_CARD_PROFILE = _KERB_SMART_CARD_PROFILE;
+ {$EXTERNALSYM KERB_SMART_CARD_PROFILE}
+ TKerbSmartCardProfile = KERB_SMART_CARD_PROFILE;
+ PKerbSmartCardProfile = PKERB_SMART_CARD_PROFILE;
+
+//
+// For a ticket logon profile, we return the session key from the ticket
+//
+
+ PKERB_CRYPTO_KEY = ^KERB_CRYPTO_KEY;
+ {$EXTERNALSYM PKERB_CRYPTO_KEY}
+ KERB_CRYPTO_KEY = record
+ KeyType: LONG;
+ Length: ULONG;
+ Value: PUCHAR;
+ end;
+ {$EXTERNALSYM KERB_CRYPTO_KEY}
+ TKerbCryptoKey = KERB_CRYPTO_KEY;
+ PKerbCryptoKey = PKERB_CRYPTO_KEY;
+
+ PKERB_TICKET_PROFILE = ^KERB_TICKET_PROFILE;
+ {$EXTERNALSYM PKERB_TICKET_PROFILE}
+ _KERB_TICKET_PROFILE = record
+ Profile: KERB_INTERACTIVE_PROFILE;
+ SessionKey: KERB_CRYPTO_KEY;
+ end;
+ {$EXTERNALSYM _KERB_TICKET_PROFILE}
+ KERB_TICKET_PROFILE = _KERB_TICKET_PROFILE;
+ {$EXTERNALSYM KERB_TICKET_PROFILE}
+ TKerbTicketProfile = KERB_TICKET_PROFILE;
+ PKerbTicketProfile = PKERB_TICKET_PROFILE;
+
+ _KERB_PROTOCOL_MESSAGE_TYPE = (
+ KerbDebugRequestMessage,
+ KerbQueryTicketCacheMessage,
+ KerbChangeMachinePasswordMessage,
+ KerbVerifyPacMessage,
+ KerbRetrieveTicketMessage,
+ KerbUpdateAddressesMessage,
+ KerbPurgeTicketCacheMessage,
+ KerbChangePasswordMessage,
+ KerbRetrieveEncodedTicketMessage,
+ KerbDecryptDataMessage,
+ KerbAddBindingCacheEntryMessage,
+ KerbSetPasswordMessage,
+ KerbSetPasswordExMessage,
+ KerbVerifyCredentialsMessage,
+ KerbQueryTicketCacheExMessage,
+ KerbPurgeTicketCacheExMessage,
+ KerbRefreshSmartcardCredentialsMessage,
+ KerbAddExtraCredentialsMessage,
+ KerbQuerySupplementalCredentialsMessage);
+ {$EXTERNALSYM _KERB_PROTOCOL_MESSAGE_TYPE}
+ KERB_PROTOCOL_MESSAGE_TYPE = _KERB_PROTOCOL_MESSAGE_TYPE;
+ {$EXTERNALSYM KERB_PROTOCOL_MESSAGE_TYPE}
+ PKERB_PROTOCOL_MESSAGE_TYPE = ^KERB_PROTOCOL_MESSAGE_TYPE;
+ {$EXTERNALSYM PKERB_PROTOCOL_MESSAGE_TYPE}
+ TKerbProtocolMessageType = KERB_PROTOCOL_MESSAGE_TYPE;
+ PKerbProtocolMessageType = PKERB_PROTOCOL_MESSAGE_TYPE;
+
+//
+// Used both for retrieving tickets and for querying ticket cache
+//
+
+ PKERB_QUERY_TKT_CACHE_REQUEST = ^KERB_QUERY_TKT_CACHE_REQUEST;
+ {$EXTERNALSYM PKERB_QUERY_TKT_CACHE_REQUEST}
+ _KERB_QUERY_TKT_CACHE_REQUEST = record
+ MessageType: KERB_PROTOCOL_MESSAGE_TYPE;
+ LogonId: LUID;
+ end;
+ {$EXTERNALSYM _KERB_QUERY_TKT_CACHE_REQUEST}
+ KERB_QUERY_TKT_CACHE_REQUEST = _KERB_QUERY_TKT_CACHE_REQUEST;
+ {$EXTERNALSYM KERB_QUERY_TKT_CACHE_REQUEST}
+ TKerbQueryTktCacheRequest = KERB_QUERY_TKT_CACHE_REQUEST;
+ PKerbQueryTktCacheRequest = PKERB_QUERY_TKT_CACHE_REQUEST;
+
+ PKERB_TICKET_CACHE_INFO = ^KERB_TICKET_CACHE_INFO;
+ {$EXTERNALSYM PKERB_TICKET_CACHE_INFO}
+ _KERB_TICKET_CACHE_INFO = record
+ ServerName: UNICODE_STRING;
+ RealmName: UNICODE_STRING;
+ StartTime: LARGE_INTEGER;
+ EndTime: LARGE_INTEGER;
+ RenewTime: LARGE_INTEGER;
+ EncryptionType: LONG;
+ TicketFlags: ULONG;
+ end;
+ {$EXTERNALSYM _KERB_TICKET_CACHE_INFO}
+ KERB_TICKET_CACHE_INFO = _KERB_TICKET_CACHE_INFO;
+ {$EXTERNALSYM KERB_TICKET_CACHE_INFO}
+ TKerbTicketCacheInfo = KERB_TICKET_CACHE_INFO;
+ PKerbTicketCacheInfo = PKERB_TICKET_CACHE_INFO;
+
+ _KERB_TICKET_CACHE_INFO_EX = record
+ ClientName: UNICODE_STRING;
+ ClientRealm: UNICODE_STRING;
+ ServerName: UNICODE_STRING;
+ ServerRealm: UNICODE_STRING;
+ StartTime: LARGE_INTEGER;
+ EndTime: LARGE_INTEGER;
+ RenewTime: LARGE_INTEGER;
+ EncryptionType: LONG;
+ TicketFlags: ULONG;
+ end;
+ {$EXTERNALSYM _KERB_TICKET_CACHE_INFO_EX}
+ KERB_TICKET_CACHE_INFO_EX = _KERB_TICKET_CACHE_INFO_EX;
+ {$EXTERNALSYM KERB_TICKET_CACHE_INFO_EX}
+ PKERB_TICKET_CACHE_INFO_EX = ^KERB_TICKET_CACHE_INFO_EX;
+ {$EXTERNALSYM PKERB_TICKET_CACHE_INFO_EX}
+ TKerbTicketCacheInfoEx = KERB_TICKET_CACHE_INFO_EX;
+ PKerbTicketCacheInfoEx = PKERB_TICKET_CACHE_INFO_EX;
+
+ PKERB_QUERY_TKT_CACHE_RESPONSE = ^KERB_QUERY_TKT_CACHE_RESPONSE;
+ {$EXTERNALSYM PKERB_QUERY_TKT_CACHE_RESPONSE}
+ _KERB_QUERY_TKT_CACHE_RESPONSE = record
+ MessageType: KERB_PROTOCOL_MESSAGE_TYPE;
+ CountOfTickets: ULONG;
+ Tickets: array [0..ANYSIZE_ARRAY - 1] of KERB_TICKET_CACHE_INFO;
+ end;
+ {$EXTERNALSYM _KERB_QUERY_TKT_CACHE_RESPONSE}
+ KERB_QUERY_TKT_CACHE_RESPONSE = _KERB_QUERY_TKT_CACHE_RESPONSE;
+ {$EXTERNALSYM KERB_QUERY_TKT_CACHE_RESPONSE}
+ TKerbQueryTktCacheResponse = KERB_QUERY_TKT_CACHE_RESPONSE;
+ PKerbQueryTktCacheResponse = PKERB_QUERY_TKT_CACHE_RESPONSE;
+
+ _KERB_QUERY_TKT_CACHE_EX_RESPONSE = record
+ MessageType: KERB_PROTOCOL_MESSAGE_TYPE;
+ CountOfTickets: ULONG;
+ Tickets: array [0..ANYSIZE_ARRAY - 1] of KERB_TICKET_CACHE_INFO_EX;
+ end;
+ {$EXTERNALSYM _KERB_QUERY_TKT_CACHE_EX_RESPONSE}
+ KERB_QUERY_TKT_CACHE_EX_RESPONSE = _KERB_QUERY_TKT_CACHE_EX_RESPONSE;
+ {$EXTERNALSYM KERB_QUERY_TKT_CACHE_EX_RESPONSE}
+ PKERB_QUERY_TKT_CACHE_EX_RESPONSE = ^KERB_QUERY_TKT_CACHE_EX_RESPONSE;
+ {$EXTERNALSYM PKERB_QUERY_TKT_CACHE_EX_RESPONSE}
+ TKerbQueryTktCacheExResponse = KERB_QUERY_TKT_CACHE_EX_RESPONSE;
+ PKerbQueryTktCacheExResponse = PKERB_QUERY_TKT_CACHE_EX_RESPONSE;
+
+//
+// Types for retrieving encoded ticket from the cache
+//
+
+ _SecHandle = record
+ dwLower: ULONG_PTR;
+ dwUpper: ULONG_PTR;
+ end;
+ {$EXTERNALSYM _SecHandle}
+ SecHandle = _SecHandle;
+ {$EXTERNALSYM SecHandle}
+ PSecHandle = ^SecHandle;
+ {$EXTERNALSYM PSecHandle}
+
+// Ticket Flags
+
+const
+ KERB_USE_DEFAULT_TICKET_FLAGS = $0;
+ {$EXTERNALSYM KERB_USE_DEFAULT_TICKET_FLAGS}
+
+// CacheOptions
+
+ KERB_RETRIEVE_TICKET_DEFAULT = $0;
+ {$EXTERNALSYM KERB_RETRIEVE_TICKET_DEFAULT}
+ KERB_RETRIEVE_TICKET_DONT_USE_CACHE = $1;
+ {$EXTERNALSYM KERB_RETRIEVE_TICKET_DONT_USE_CACHE}
+ KERB_RETRIEVE_TICKET_USE_CACHE_ONLY = $2;
+ {$EXTERNALSYM KERB_RETRIEVE_TICKET_USE_CACHE_ONLY}
+ KERB_RETRIEVE_TICKET_USE_CREDHANDLE = $4;
+ {$EXTERNALSYM KERB_RETRIEVE_TICKET_USE_CREDHANDLE}
+ KERB_RETRIEVE_TICKET_AS_KERB_CRED = $8;
+ {$EXTERNALSYM KERB_RETRIEVE_TICKET_AS_KERB_CRED}
+ KERB_RETRIEVE_TICKET_WITH_SEC_CRED = $10;
+ {$EXTERNALSYM KERB_RETRIEVE_TICKET_WITH_SEC_CRED}
+
+// Encryption Type options
+
+ KERB_ETYPE_DEFAULT = $0; // don't specify etype in tkt req.
+ {$EXTERNALSYM KERB_ETYPE_DEFAULT}
+
+type
+ _KERB_AUTH_DATA = record
+ Type_: ULONG;
+ Length: ULONG;
+ Data: PUCHAR;
+ end;
+ {$EXTERNALSYM _KERB_AUTH_DATA}
+ KERB_AUTH_DATA = _KERB_AUTH_DATA;
+ {$EXTERNALSYM KERB_AUTH_DATA}
+ PKERB_AUTH_DATA = ^KERB_AUTH_DATA;
+ {$EXTERNALSYM PKERB_AUTH_DATA}
+ TKerbAuthData = KERB_AUTH_DATA;
+ PKerbAuthData = PKERB_AUTH_DATA;
+
+ _KERB_NET_ADDRESS = record
+ Family: ULONG;
+ Length: ULONG;
+ Address: PCHAR;
+ end;
+ {$EXTERNALSYM _KERB_NET_ADDRESS}
+ KERB_NET_ADDRESS = _KERB_NET_ADDRESS;
+ {$EXTERNALSYM KERB_NET_ADDRESS}
+ PKERB_NET_ADDRESS = ^KERB_NET_ADDRESS;
+ {$EXTERNALSYM PKERB_NET_ADDRESS}
+ TKerbNetAddress = KERB_NET_ADDRESS;
+ PKerbNetAddress = PKERB_NET_ADDRESS;
+
+ _KERB_NET_ADDRESSES = record
+ Number: ULONG;
+ Addresses: array [0..ANYSIZE_ARRAY - 1] of KERB_NET_ADDRESS;
+ end;
+ {$EXTERNALSYM _KERB_NET_ADDRESSES}
+ KERB_NET_ADDRESSES = _KERB_NET_ADDRESSES;
+ {$EXTERNALSYM KERB_NET_ADDRESSES}
+ PKERB_NET_ADDRESSES = ^KERB_NET_ADDRESSES;
+ {$EXTERNALSYM PKERB_NET_ADDRESSES}
+ TKerbNetAddresses = KERB_NET_ADDRESSES;
+ PKerbNetAddresses = PKERB_NET_ADDRESSES;
+
+//
+// Types for the information about a ticket
+//
+
+type
+ PKERB_EXTERNAL_NAME = ^KERB_EXTERNAL_NAME;
+ {$EXTERNALSYM PKERB_EXTERNAL_NAME}
+ _KERB_EXTERNAL_NAME = record
+ NameType: SHORT;
+ NameCount: USHORT;
+ Names: array [0..ANYSIZE_ARRAY - 1] of UNICODE_STRING;
+ end;
+ {$EXTERNALSYM _KERB_EXTERNAL_NAME}
+ KERB_EXTERNAL_NAME = _KERB_EXTERNAL_NAME;
+ {$EXTERNALSYM KERB_EXTERNAL_NAME}
+ TKerbExternalName = KERB_EXTERNAL_NAME;
+ PKerbExternalName = PKERB_EXTERNAL_NAME;
+
+ PKERB_EXTERNAL_TICKET = ^KERB_EXTERNAL_TICKET;
+ {$EXTERNALSYM PKERB_EXTERNAL_TICKET}
+ _KERB_EXTERNAL_TICKET = record
+ ServiceName: PKERB_EXTERNAL_NAME;
+ TargetName: PKERB_EXTERNAL_NAME;
+ ClientName: PKERB_EXTERNAL_NAME;
+ DomainName: UNICODE_STRING;
+ TargetDomainName: UNICODE_STRING; // contains ClientDomainName
+ AltTargetDomainName: UNICODE_STRING;
+ SessionKey: KERB_CRYPTO_KEY;
+ TicketFlags: ULONG;
+ Flags: ULONG;
+ KeyExpirationTime: LARGE_INTEGER;
+ StartTime: LARGE_INTEGER;
+ EndTime: LARGE_INTEGER;
+ RenewUntil: LARGE_INTEGER;
+ TimeSkew: LARGE_INTEGER;
+ EncodedTicketSize: ULONG;
+ EncodedTicket: PUCHAR;
+ end;
+ {$EXTERNALSYM _KERB_EXTERNAL_TICKET}
+ KERB_EXTERNAL_TICKET = _KERB_EXTERNAL_TICKET;
+ {$EXTERNALSYM KERB_EXTERNAL_TICKET}
+ TKerbExternalTicket = KERB_EXTERNAL_TICKET;
+ PKerbExternalTicket = PKERB_EXTERNAL_TICKET;
+
+ _KERB_RETRIEVE_TKT_REQUEST = record
+ MessageType: KERB_PROTOCOL_MESSAGE_TYPE;
+ LogonId: LUID;
+ TargetName: UNICODE_STRING;
+ TicketFlags: ULONG;
+ CacheOptions: ULONG;
+ EncryptionType: LONG;
+ CredentialsHandle: SecHandle;
+ end;
+ {$EXTERNALSYM _KERB_RETRIEVE_TKT_REQUEST}
+ KERB_RETRIEVE_TKT_REQUEST = _KERB_RETRIEVE_TKT_REQUEST;
+ {$EXTERNALSYM KERB_RETRIEVE_TKT_REQUEST}
+ PKERB_RETRIEVE_TKT_REQUEST = ^KERB_RETRIEVE_TKT_REQUEST;
+ {$EXTERNALSYM PKERB_RETRIEVE_TKT_REQUEST}
+ TKerbRetrieveTktRequest = KERB_RETRIEVE_TKT_REQUEST;
+ PKerbRetrieveTktRequest = PKERB_RETRIEVE_TKT_REQUEST;
+
+ PKERB_RETRIEVE_TKT_RESPONSE = ^KERB_RETRIEVE_TKT_RESPONSE;
+ {$EXTERNALSYM PKERB_RETRIEVE_TKT_RESPONSE}
+ _KERB_RETRIEVE_TKT_RESPONSE = record
+ Ticket: KERB_EXTERNAL_TICKET;
+ end;
+ {$EXTERNALSYM _KERB_RETRIEVE_TKT_RESPONSE}
+ KERB_RETRIEVE_TKT_RESPONSE = _KERB_RETRIEVE_TKT_RESPONSE;
+ {$EXTERNALSYM KERB_RETRIEVE_TKT_RESPONSE}
+ TKerbRetrieveTktResponse = KERB_RETRIEVE_TKT_RESPONSE;
+ PKerbRetrieveTktResponse = PKERB_RETRIEVE_TKT_RESPONSE;
+
+//
+// Used to purge entries from the ticket cache
+//
+
+ PKERB_PURGE_TKT_CACHE_REQUEST = ^KERB_PURGE_TKT_CACHE_REQUEST;
+ {$EXTERNALSYM PKERB_PURGE_TKT_CACHE_REQUEST}
+ _KERB_PURGE_TKT_CACHE_REQUEST = record
+ MessageType: KERB_PROTOCOL_MESSAGE_TYPE;
+ LogonId: LUID;
+ ServerName: UNICODE_STRING;
+ RealmName: UNICODE_STRING;
+ end;
+ {$EXTERNALSYM _KERB_PURGE_TKT_CACHE_REQUEST}
+ KERB_PURGE_TKT_CACHE_REQUEST = _KERB_PURGE_TKT_CACHE_REQUEST;
+ {$EXTERNALSYM KERB_PURGE_TKT_CACHE_REQUEST}
+ TKerbPurgeTktCacheRequest = KERB_PURGE_TKT_CACHE_REQUEST;
+ PKerbPurgeTktCacheRequest = PKERB_PURGE_TKT_CACHE_REQUEST;
+
+//
+// Flags for purge requests
+//
+
+const
+ KERB_PURGE_ALL_TICKETS = 1;
+ {$EXTERNALSYM KERB_PURGE_ALL_TICKETS}
+
+type
+ _KERB_PURGE_TKT_CACHE_EX_REQUEST = record
+ MessageType: KERB_PROTOCOL_MESSAGE_TYPE;
+ LogonId: LUID;
+ Flags: ULONG;
+ TicketTemplate: KERB_TICKET_CACHE_INFO_EX;
+ end;
+ {$EXTERNALSYM _KERB_PURGE_TKT_CACHE_EX_REQUEST}
+ KERB_PURGE_TKT_CACHE_EX_REQUEST = _KERB_PURGE_TKT_CACHE_EX_REQUEST;
+ {$EXTERNALSYM KERB_PURGE_TKT_CACHE_EX_REQUEST}
+ PKERB_PURGE_TKT_CACHE_EX_REQUEST = ^KERB_PURGE_TKT_CACHE_EX_REQUEST;
+ {$EXTERNALSYM PKERB_PURGE_TKT_CACHE_EX_REQUEST}
+ TKerbPurgeTktCacheExRequest = KERB_PURGE_TKT_CACHE_EX_REQUEST;
+ PKerbPurgeTktCacheExRequest = PKERB_PURGE_TKT_CACHE_EX_REQUEST;
+
+//
+// KerbChangePassword
+//
+// KerbChangePassword changes the password on the KDC account plus
+// the password cache and logon credentials if applicable.
+//
+//
+
+ PKERB_CHANGEPASSWORD_REQUEST = ^KERB_CHANGEPASSWORD_REQUEST;
+ {$EXTERNALSYM PKERB_CHANGEPASSWORD_REQUEST}
+ _KERB_CHANGEPASSWORD_REQUEST = record
+ MessageType: KERB_PROTOCOL_MESSAGE_TYPE;
+ DomainName: UNICODE_STRING;
+ AccountName: UNICODE_STRING;
+ OldPassword: UNICODE_STRING;
+ NewPassword: UNICODE_STRING;
+ Impersonating: ByteBool;
+ end;
+ {$EXTERNALSYM _KERB_CHANGEPASSWORD_REQUEST}
+ KERB_CHANGEPASSWORD_REQUEST = _KERB_CHANGEPASSWORD_REQUEST;
+ {$EXTERNALSYM KERB_CHANGEPASSWORD_REQUEST}
+ TKerbChangepasswordRequest = KERB_CHANGEPASSWORD_REQUEST;
+ PKerbChangepasswordRequest = PKERB_CHANGEPASSWORD_REQUEST;
+
+//
+// KerbSetPassword
+//
+// KerbSetPassword changes the password on the KDC account plus
+// the password cache and logon credentials if applicable.
+//
+//
+
+ PKERB_SETPASSWORD_REQUEST = ^KERB_SETPASSWORD_REQUEST;
+ {$EXTERNALSYM PKERB_SETPASSWORD_REQUEST}
+ _KERB_SETPASSWORD_REQUEST = record
+ MessageType: KERB_PROTOCOL_MESSAGE_TYPE;
+ LogonId: LUID;
+ CredentialsHandle: SecHandle;
+ Flags: ULONG;
+ DomainName: UNICODE_STRING;
+ AccountName: UNICODE_STRING;
+ Password: UNICODE_STRING;
+ end;
+ {$EXTERNALSYM _KERB_SETPASSWORD_REQUEST}
+ KERB_SETPASSWORD_REQUEST = _KERB_SETPASSWORD_REQUEST;
+ {$EXTERNALSYM KERB_SETPASSWORD_REQUEST}
+ TKerbSetpasswordRequest = KERB_SETPASSWORD_REQUEST;
+ PKerbSetpasswordRequest = PKERB_SETPASSWORD_REQUEST;
+
+ _KERB_SETPASSWORD_EX_REQUEST = record
+ MessageType: KERB_PROTOCOL_MESSAGE_TYPE;
+ LogonId: LUID;
+ CredentialsHandle: SecHandle;
+ Flags: ULONG;
+ AccountRealm: UNICODE_STRING;
+ AccountName: UNICODE_STRING;
+ Password: UNICODE_STRING;
+ ClientRealm: UNICODE_STRING;
+ ClientName: UNICODE_STRING;
+ Impersonating: BOOLEAN;
+ KdcAddress: UNICODE_STRING;
+ KdcAddressType: ULONG;
+ end;
+ {$EXTERNALSYM _KERB_SETPASSWORD_EX_REQUEST}
+ KERB_SETPASSWORD_EX_REQUEST = _KERB_SETPASSWORD_EX_REQUEST;
+ {$EXTERNALSYM KERB_SETPASSWORD_EX_REQUEST}
+ PKERB_SETPASSWORD_EX_REQUEST = ^KERB_SETPASSWORD_EX_REQUEST;
+ {$EXTERNALSYM PKERB_SETPASSWORD_EX_REQUEST}
+ TKerbSetPasswordExRequest = KERB_SETPASSWORD_EX_REQUEST;
+ PKerbSetPasswordExRequest = PKERB_SETPASSWORD_EX_REQUEST;
+
+const
+ DS_UNKNOWN_ADDRESS_TYPE = 0; // anything *but* IP
+ {$EXTERNALSYM DS_UNKNOWN_ADDRESS_TYPE}
+ KERB_SETPASS_USE_LOGONID = 1;
+ {$EXTERNALSYM KERB_SETPASS_USE_LOGONID}
+ KERB_SETPASS_USE_CREDHANDLE = 2;
+ {$EXTERNALSYM KERB_SETPASS_USE_CREDHANDLE}
+
+type
+ PKERB_DECRYPT_REQUEST = ^KERB_DECRYPT_REQUEST;
+ {$EXTERNALSYM PKERB_DECRYPT_REQUEST}
+ _KERB_DECRYPT_REQUEST = record
+ MessageType: KERB_PROTOCOL_MESSAGE_TYPE;
+ LogonId: LUID;
+ Flags: ULONG;
+ CryptoType: LONG;
+ KeyUsage: LONG;
+ Key: KERB_CRYPTO_KEY; // optional
+ EncryptedDataSize: ULONG;
+ InitialVectorSize: ULONG;
+ InitialVector: PUCHAR;
+ EncryptedData: PUCHAR;
+ end;
+ {$EXTERNALSYM _KERB_DECRYPT_REQUEST}
+ KERB_DECRYPT_REQUEST = _KERB_DECRYPT_REQUEST;
+ {$EXTERNALSYM KERB_DECRYPT_REQUEST}
+ TKerbDecryptRequest = KERB_DECRYPT_REQUEST;
+ PKerbDecryptRequest = PKERB_DECRYPT_REQUEST;
+
+//
+// If set, use the primary key from the current logon session of the one provided in the LogonId field.
+// Otherwise, use the Key in the KERB_DECRYPT_MESSAGE.
+
+const
+ KERB_DECRYPT_FLAG_DEFAULT_KEY = $00000001;
+ {$EXTERNALSYM KERB_DECRYPT_FLAG_DEFAULT_KEY}
+
+type
+ PKERB_DECRYPT_RESPONSE = ^KERB_DECRYPT_RESPONSE;
+ {$EXTERNALSYM PKERB_DECRYPT_RESPONSE}
+ _KERB_DECRYPT_RESPONSE = record
+ DecryptedData: array [0..ANYSIZE_ARRAY - 1] of UCHAR;
+ end;
+ {$EXTERNALSYM _KERB_DECRYPT_RESPONSE}
+ KERB_DECRYPT_RESPONSE = _KERB_DECRYPT_RESPONSE;
+ {$EXTERNALSYM KERB_DECRYPT_RESPONSE}
+ TKerbDecryptResponse = KERB_DECRYPT_RESPONSE;
+ PKerbDecryptResponse = PKERB_DECRYPT_RESPONSE;
+
+//
+// Request structure for adding a binding cache entry. TCB privilege
+// is required for this operation.
+//
+
+ PKERB_ADD_BINDING_CACHE_ENTRY_REQUEST = ^KERB_ADD_BINDING_CACHE_ENTRY_REQUEST;
+ {$EXTERNALSYM PKERB_ADD_BINDING_CACHE_ENTRY_REQUEST}
+ _KERB_ADD_BINDING_CACHE_ENTRY_REQUEST = record
+ MessageType: KERB_PROTOCOL_MESSAGE_TYPE;
+ RealmName: UNICODE_STRING;
+ KdcAddress: UNICODE_STRING;
+ AddressType: ULONG; //dsgetdc.h DS_NETBIOS_ADDRESS||DS_INET_ADDRESS
+ end;
+ {$EXTERNALSYM _KERB_ADD_BINDING_CACHE_ENTRY_REQUEST}
+ KERB_ADD_BINDING_CACHE_ENTRY_REQUEST = _KERB_ADD_BINDING_CACHE_ENTRY_REQUEST;
+ {$EXTERNALSYM KERB_ADD_BINDING_CACHE_ENTRY_REQUEST}
+ TKerbAddBindingCacheEntryRequest = KERB_ADD_BINDING_CACHE_ENTRY_REQUEST;
+ PKerbAddBindingCacheEntryRequest = PKERB_ADD_BINDING_CACHE_ENTRY_REQUEST;
+
+//
+// Request structure for reacquiring smartcard credentials for a
+// given LUID.
+// Requires TCB.
+//
+
+ _KERB_REFRESH_SCCRED_REQUEST = record
+ MessageType: KERB_PROTOCOL_MESSAGE_TYPE;
+ CredentialBlob: UNICODE_STRING; // optional
+ LogonId: LUID;
+ Flags: ULONG;
+ end;
+ {$EXTERNALSYM _KERB_REFRESH_SCCRED_REQUEST}
+ KERB_REFRESH_SCCRED_REQUEST = _KERB_REFRESH_SCCRED_REQUEST;
+ {$EXTERNALSYM KERB_REFRESH_SCCRED_REQUEST}
+ PKERB_REFRESH_SCCRED_REQUEST = ^KERB_REFRESH_SCCRED_REQUEST;
+ {$EXTERNALSYM PKERB_REFRESH_SCCRED_REQUEST}
+ TKerbRefreshScCredRequest = KERB_REFRESH_SCCRED_REQUEST;
+ PKerbRefreshScCredRequest = PKERB_REFRESH_SCCRED_REQUEST;
+
+//
+// Flags for KERB_REFRESH_SCCRED_REQUEST
+//
+// KERB_REFRESH_SCCRED_RELEASE
+// Release the smartcard handle for LUID
+//
+// KERB_REFRESH_SCCRED_GETTGT
+// Use the certificate hash in the blob to get a TGT for the logon
+// session.
+//
+
+const
+ KERB_REFRESH_SCCRED_RELEASE = $0;
+ {$EXTERNALSYM KERB_REFRESH_SCCRED_RELEASE}
+ KERB_REFRESH_SCCRED_GETTGT = $1;
+ {$EXTERNALSYM KERB_REFRESH_SCCRED_GETTGT}
+
+//
+// Request structure for adding extra Server credentials to a given
+// logon session. Only applicable during AcceptSecurityContext, and
+// requires TCB to alter "other" creds
+//
+
+type
+ _KERB_ADD_CREDENTIALS_REQUEST = record
+ MessageType: KERB_PROTOCOL_MESSAGE_TYPE;
+ UserName: UNICODE_STRING;
+ DomainName: UNICODE_STRING;
+ Password: UNICODE_STRING;
+ LogonId: LUID; // optional
+ Flags: ULONG;
+ end;
+ {$EXTERNALSYM _KERB_ADD_CREDENTIALS_REQUEST}
+ KERB_ADD_CREDENTIALS_REQUEST = _KERB_ADD_CREDENTIALS_REQUEST;
+ {$EXTERNALSYM KERB_ADD_CREDENTIALS_REQUEST}
+ PKERB_ADD_CREDENTIALS_REQUEST = ^KERB_ADD_CREDENTIALS_REQUEST;
+ {$EXTERNALSYM PKERB_ADD_CREDENTIALS_REQUEST}
+ TKerbAddCredentialsRequest = KERB_ADD_CREDENTIALS_REQUEST;
+ PKerbAddCredentialsRequest = PKERB_ADD_CREDENTIALS_REQUEST;
+
+const
+ KERB_REQUEST_ADD_CREDENTIAL = 1;
+ {$EXTERNALSYM KERB_REQUEST_ADD_CREDENTIAL}
+ KERB_REQUEST_REPLACE_CREDENTIAL = 2;
+ {$EXTERNALSYM KERB_REQUEST_REPLACE_CREDENTIAL}
+ KERB_REQUEST_REMOVE_CREDENTIAL = 4;
+ {$EXTERNALSYM KERB_REQUEST_REMOVE_CREDENTIAL}
+
+implementation
+
+const
+ secur32 = 'secur32.dll';
+ advapi32 = 'advapi32.dll';
+
+function LSA_SUCCESS(Error: NTSTATUS): BOOL;
+begin
+ Result := LONG(Error) > 0;
+end;
+
+{$IFDEF DYNAMIC_LINK}
+
+var
+ _LsaRegisterLogonProcess: Pointer;
+
+function LsaRegisterLogonProcess;
+begin
+ GetProcedureAddress(_LsaRegisterLogonProcess, secur32, 'LsaRegisterLogonProcess');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_LsaRegisterLogonProcess]
+ end;
+end;
+
+var
+ _LsaLogonUser: Pointer;
+
+function LsaLogonUser;
+begin
+ GetProcedureAddress(_LsaLogonUser, secur32, 'LsaLogonUser');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_LsaLogonUser]
+ end;
+end;
+
+var
+ _LsaLookupAuthenticationPackage: Pointer;
+
+function LsaLookupAuthenticationPackage;
+begin
+ GetProcedureAddress(_LsaLookupAuthenticationPackage, secur32, 'LsaLookupAuthenticationPackage');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_LsaLookupAuthenticationPackage]
+ end;
+end;
+
+var
+ _LsaFreeReturnBuffer: Pointer;
+
+function LsaFreeReturnBuffer;
+begin
+ GetProcedureAddress(_LsaFreeReturnBuffer, secur32, 'LsaFreeReturnBuffer');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_LsaFreeReturnBuffer]
+ end;
+end;
+
+var
+ _LsaCallAuthenticationPackage: Pointer;
+
+function LsaCallAuthenticationPackage;
+begin
+ GetProcedureAddress(_LsaCallAuthenticationPackage, secur32, 'LsaCallAuthenticationPackage');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_LsaCallAuthenticationPackage]
+ end;
+end;
+
+var
+ _LsaDeregisterLogonProcess: Pointer;
+
+function LsaDeregisterLogonProcess;
+begin
+ GetProcedureAddress(_LsaDeregisterLogonProcess, secur32, 'LsaDeregisterLogonProcess');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_LsaDeregisterLogonProcess]
+ end;
+end;
+
+var
+ _LsaConnectUntrusted: Pointer;
+
+function LsaConnectUntrusted;
+begin
+ GetProcedureAddress(_LsaConnectUntrusted, secur32, 'LsaConnectUntrusted');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_LsaConnectUntrusted]
+ end;
+end;
+
+var
+ _LsaFreeMemory: Pointer;
+
+function LsaFreeMemory;
+begin
+ GetProcedureAddress(_LsaFreeMemory, advapi32, 'LsaFreeMemory');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_LsaFreeMemory]
+ end;
+end;
+
+var
+ _LsaClose: Pointer;
+
+function LsaClose;
+begin
+ GetProcedureAddress(_LsaClose, advapi32, 'LsaClose');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_LsaClose]
+ end;
+end;
+
+var
+ _LsaOpenPolicy: Pointer;
+
+function LsaOpenPolicy;
+begin
+ GetProcedureAddress(_LsaOpenPolicy, advapi32, 'LsaOpenPolicy');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_LsaOpenPolicy]
+ end;
+end;
+
+var
+ _LsaEnumerateLogonSessions: Pointer;
+
+function LsaEnumerateLogonSessions;
+begin
+ GetProcedureAddress(_LsaEnumerateLogonSessions, secur32, 'LsaEnumerateLogonSessions');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_LsaEnumerateLogonSessions]
+ end;
+end;
+
+var
+ _LsaGetLogonSessionData: Pointer;
+
+function LsaGetLogonSessionData;
+begin
+ GetProcedureAddress(_LsaGetLogonSessionData, secur32, 'LsaGetLogonSessionData');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_LsaGetLogonSessionData]
+ end;
+end;
+
+var
+ _LsaQueryInformationPolicy: Pointer;
+
+function LsaQueryInformationPolicy;
+begin
+ GetProcedureAddress(_LsaQueryInformationPolicy, advapi32, 'LsaQueryInformationPolicy');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_LsaQueryInformationPolicy]
+ end;
+end;
+
+var
+ _LsaSetInformationPolicy: Pointer;
+
+function LsaSetInformationPolicy;
+begin
+ GetProcedureAddress(_LsaSetInformationPolicy, advapi32, 'LsaSetInformationPolicy');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_LsaSetInformationPolicy]
+ end;
+end;
+
+var
+ _LsaQueryDomainInformationPolicy: Pointer;
+
+function LsaQueryDomainInformationPolicy;
+begin
+ GetProcedureAddress(_LsaQueryDomainInformationPolicy, advapi32, 'LsaQueryDomainInformationPolicy');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_LsaQueryDomainInformationPolicy]
+ end;
+end;
+
+var
+ _LsaSetDomainInformationPolicy: Pointer;
+
+function LsaSetDomainInformationPolicy;
+begin
+ GetProcedureAddress(_LsaSetDomainInformationPolicy, advapi32, 'LsaSetDomainInformationPolicy');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_LsaSetDomainInformationPolicy]
+ end;
+end;
+
+var
+ _LsaRegisterPolicyChangeNot: Pointer;
+
+function LsaRegisterPolicyChangeNotification;
+begin
+ GetProcedureAddress(_LsaRegisterPolicyChangeNot, secur32, 'LsaRegisterPolicyChangeNotification');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_LsaRegisterPolicyChangeNot]
+ end;
+end;
+
+var
+ _LsaUnregisterPolicyChangeNot: Pointer;
+
+function LsaUnregisterPolicyChangeNotification;
+begin
+ GetProcedureAddress(_LsaUnregisterPolicyChangeNot, secur32, 'LsaUnregisterPolicyChangeNotification');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_LsaUnregisterPolicyChangeNot]
+ end;
+end;
+
+var
+ _LsaEnumerateTrustedDomains: Pointer;
+
+function LsaEnumerateTrustedDomains;
+begin
+ GetProcedureAddress(_LsaEnumerateTrustedDomains, advapi32, 'LsaEnumerateTrustedDomains');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_LsaEnumerateTrustedDomains]
+ end;
+end;
+
+var
+ _LsaLookupNames: Pointer;
+
+function LsaLookupNames;
+begin
+ GetProcedureAddress(_LsaLookupNames, advapi32, 'LsaLookupNames');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_LsaLookupNames]
+ end;
+end;
+
+var
+ _LsaLookupNames2: Pointer;
+
+function LsaLookupNames2;
+begin
+ GetProcedureAddress(_LsaLookupNames2, advapi32, 'LsaLookupNames2');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_LsaLookupNames2]
+ end;
+end;
+
+var
+ _LsaLookupSids: Pointer;
+
+function LsaLookupSids;
+begin
+ GetProcedureAddress(_LsaLookupSids, advapi32, 'LsaLookupSids');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_LsaLookupSids]
+ end;
+end;
+
+var
+ _LsaEnumAccountsWithUserRight: Pointer;
+
+function LsaEnumerateAccountsWithUserRight;
+begin
+ GetProcedureAddress(_LsaEnumAccountsWithUserRight, advapi32, 'LsaEnumerateAccountsWithUserRight');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_LsaEnumAccountsWithUserRight]
+ end;
+end;
+
+var
+ _LsaEnumerateAccountRights: Pointer;
+
+function LsaEnumerateAccountRights;
+begin
+ GetProcedureAddress(_LsaEnumerateAccountRights, advapi32, 'LsaEnumerateAccountRights');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_LsaEnumerateAccountRights]
+ end;
+end;
+
+var
+ _LsaAddAccountRights: Pointer;
+
+function LsaAddAccountRights;
+begin
+ GetProcedureAddress(_LsaAddAccountRights, advapi32, 'LsaAddAccountRights');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_LsaAddAccountRights]
+ end;
+end;
+
+var
+ _LsaRemoveAccountRights: Pointer;
+
+function LsaRemoveAccountRights;
+begin
+ GetProcedureAddress(_LsaRemoveAccountRights, advapi32, 'LsaRemoveAccountRights');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_LsaRemoveAccountRights]
+ end;
+end;
+
+var
+ _LsaOpenTrustedDomainByName: Pointer;
+
+function LsaOpenTrustedDomainByName;
+begin
+ GetProcedureAddress(_LsaOpenTrustedDomainByName, advapi32, 'LsaOpenTrustedDomainByName');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_LsaOpenTrustedDomainByName]
+ end;
+end;
+
+var
+ _LsaQueryTrustedDomainInfo: Pointer;
+
+function LsaQueryTrustedDomainInfo;
+begin
+ GetProcedureAddress(_LsaQueryTrustedDomainInfo, advapi32, 'LsaQueryTrustedDomainInfo');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_LsaQueryTrustedDomainInfo]
+ end;
+end;
+
+var
+ _LsaSetTrustedDomainInformation: Pointer;
+
+function LsaSetTrustedDomainInformation;
+begin
+ GetProcedureAddress(_LsaSetTrustedDomainInformation, advapi32, 'LsaSetTrustedDomainInformation');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_LsaSetTrustedDomainInformation]
+ end;
+end;
+
+var
+ _LsaDeleteTrustedDomain: Pointer;
+
+function LsaDeleteTrustedDomain;
+begin
+ GetProcedureAddress(_LsaDeleteTrustedDomain, advapi32, 'LsaDeleteTrustedDomain');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_LsaDeleteTrustedDomain]
+ end;
+end;
+
+var
+ _LsaQueryTrustedDomainInfoByName: Pointer;
+
+function LsaQueryTrustedDomainInfoByName;
+begin
+ GetProcedureAddress(_LsaQueryTrustedDomainInfoByName, advapi32, 'LsaQueryTrustedDomainInfoByName');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_LsaQueryTrustedDomainInfoByName]
+ end;
+end;
+
+var
+ _LsaSetTrustedDomainInfoByName: Pointer;
+
+function LsaSetTrustedDomainInfoByName;
+begin
+ GetProcedureAddress(_LsaSetTrustedDomainInfoByName, advapi32, 'LsaSetTrustedDomainInfoByName');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_LsaSetTrustedDomainInfoByName]
+ end;
+end;
+
+var
+ _LsaEnumerateTrustedDomainsEx: Pointer;
+
+function LsaEnumerateTrustedDomainsEx;
+begin
+ GetProcedureAddress(_LsaEnumerateTrustedDomainsEx, advapi32, 'LsaEnumerateTrustedDomainsEx');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_LsaEnumerateTrustedDomainsEx]
+ end;
+end;
+
+var
+ _LsaCreateTrustedDomainEx: Pointer;
+
+function LsaCreateTrustedDomainEx;
+begin
+ GetProcedureAddress(_LsaCreateTrustedDomainEx, advapi32, 'LsaCreateTrustedDomainEx');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_LsaCreateTrustedDomainEx]
+ end;
+end;
+
+var
+ _LsaQueryForestTrustInformation: Pointer;
+
+function LsaQueryForestTrustInformation;
+begin
+ GetProcedureAddress(_LsaQueryForestTrustInformation, advapi32, 'LsaQueryForestTrustInformation');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_LsaQueryForestTrustInformation]
+ end;
+end;
+
+var
+ _LsaSetForestTrustInformation: Pointer;
+
+function LsaSetForestTrustInformation;
+begin
+ GetProcedureAddress(_LsaSetForestTrustInformation, advapi32, 'LsaSetForestTrustInformation');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_LsaSetForestTrustInformation]
+ end;
+end;
+
+var
+ _LsaStorePrivateData: Pointer;
+
+function LsaStorePrivateData;
+begin
+ GetProcedureAddress(_LsaStorePrivateData, advapi32, 'LsaStorePrivateData');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_LsaStorePrivateData]
+ end;
+end;
+
+var
+ _LsaRetrievePrivateData: Pointer;
+
+function LsaRetrievePrivateData;
+begin
+ GetProcedureAddress(_LsaRetrievePrivateData, advapi32, 'LsaRetrievePrivateData');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_LsaRetrievePrivateData]
+ end;
+end;
+
+var
+ _LsaNtStatusToWinError: Pointer;
+
+function LsaNtStatusToWinError;
+begin
+ GetProcedureAddress(_LsaNtStatusToWinError, advapi32, 'LsaNtStatusToWinError');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_LsaNtStatusToWinError]
+ end;
+end;
+
+{$ELSE}
+
+function LsaRegisterLogonProcess; external secur32 name 'LsaRegisterLogonProcess';
+function LsaLogonUser; external secur32 name 'LsaLogonUser';
+function LsaLookupAuthenticationPackage; external secur32 name 'LsaLookupAuthenticationPackage';
+function LsaFreeReturnBuffer; external secur32 name 'LsaFreeReturnBuffer';
+function LsaCallAuthenticationPackage; external secur32 name 'LsaCallAuthenticationPackage';
+function LsaDeregisterLogonProcess; external secur32 name 'LsaDeregisterLogonProcess';
+function LsaConnectUntrusted; external secur32 name 'LsaConnectUntrusted';
+function LsaFreeMemory; external advapi32 name 'LsaFreeMemory';
+function LsaClose; external advapi32 name 'LsaClose';
+function LsaOpenPolicy; external advapi32 name 'LsaOpenPolicy';
+function LsaEnumerateLogonSessions; external secur32 name 'LsaEnumerateLogonSessions';
+function LsaGetLogonSessionData; external secur32 name 'LsaGetLogonSessionData';
+function LsaQueryInformationPolicy; external advapi32 name 'LsaQueryInformationPolicy';
+function LsaSetInformationPolicy; external advapi32 name 'LsaSetInformationPolicy';
+function LsaQueryDomainInformationPolicy; external advapi32 name 'LsaQueryDomainInformationPolicy';
+function LsaSetDomainInformationPolicy; external advapi32 name 'LsaSetDomainInformationPolicy';
+function LsaRegisterPolicyChangeNotification; external secur32 name 'LsaRegisterPolicyChangeNotification';
+function LsaUnregisterPolicyChangeNotification; external secur32 name 'LsaUnregisterPolicyChangeNotification';
+function LsaEnumerateTrustedDomains; external advapi32 name 'LsaEnumerateTrustedDomains';
+function LsaLookupNames; external advapi32 name 'LsaLookupNames';
+function LsaLookupNames2; external advapi32 name 'LsaLookupNames2';
+function LsaLookupSids; external advapi32 name 'LsaLookupSids';
+function LsaEnumerateAccountsWithUserRight; external advapi32 name 'LsaEnumerateAccountsWithUserRight';
+function LsaEnumerateAccountRights; external advapi32 name 'LsaEnumerateAccountRights';
+function LsaAddAccountRights; external advapi32 name 'LsaAddAccountRights';
+function LsaRemoveAccountRights; external advapi32 name 'LsaRemoveAccountRights';
+function LsaOpenTrustedDomainByName; external advapi32 name 'LsaOpenTrustedDomainByName';
+function LsaQueryTrustedDomainInfo; external advapi32 name 'LsaQueryTrustedDomainInfo';
+function LsaSetTrustedDomainInformation; external advapi32 name 'LsaSetTrustedDomainInformation';
+function LsaDeleteTrustedDomain; external advapi32 name 'LsaDeleteTrustedDomain';
+function LsaQueryTrustedDomainInfoByName; external advapi32 name 'LsaQueryTrustedDomainInfoByName';
+function LsaSetTrustedDomainInfoByName; external advapi32 name 'LsaSetTrustedDomainInfoByName';
+function LsaEnumerateTrustedDomainsEx; external advapi32 name 'LsaEnumerateTrustedDomainsEx';
+function LsaCreateTrustedDomainEx; external advapi32 name 'LsaCreateTrustedDomainEx';
+function LsaQueryForestTrustInformation; external advapi32 name 'LsaQueryForestTrustInformation';
+function LsaSetForestTrustInformation; external advapi32 name 'LsaSetForestTrustInformation';
+function LsaStorePrivateData; external advapi32 name 'LsaStorePrivateData';
+function LsaRetrievePrivateData; external advapi32 name 'LsaRetrievePrivateData';
+function LsaNtStatusToWinError; external advapi32 name 'LsaNtStatusToWinError';
+
+{$ENDIF DYNAMIC_LINK}
+
+end.
diff --git a/packages/extra/winunits/jwantstatus.pas b/packages/extra/winunits/jwantstatus.pas
index baed3f8eb8..729df599a8 100644
--- a/packages/extra/winunits/jwantstatus.pas
+++ b/packages/extra/winunits/jwantstatus.pas
@@ -1,10591 +1,10591 @@
-{******************************************************************************}
-{ }
-{ NT Status Codes API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: ntstatus.h, released June 2000. The original Pascal }
-{ code is: Nt_Status.pas, released December 2000. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwantstatus.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaNtStatus;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "ntstatus.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaWinType;
-
-/////////////////////////////////////////////////////////////////////////
-//
-// Standard Success values
-//
-//
-/////////////////////////////////////////////////////////////////////////
-
-//
-// The success status codes 0 - 63 are reserved for wait completion status.
-// FacilityCodes 0x5 - 0xF have been allocated by various drivers.
-//
-
-const
- STATUS_SUCCESS = NTSTATUS($00000000); // ntsubauth
- {$EXTERNALSYM STATUS_SUCCESS}
-
-//
-// Values are 32 bit values layed out as follows:
-//
-// 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1
-// 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
-// +---+-+-+-----------------------+-------------------------------+
-// |Sev|C|R| Facility | Code |
-// +---+-+-+-----------------------+-------------------------------+
-//
-// where
-//
-// Sev - is the severity code
-//
-// 00 - Success
-// 01 - Informational
-// 10 - Warning
-// 11 - Error
-//
-// C - is the Customer code flag
-//
-// R - is a reserved bit
-//
-// Facility - is the facility code
-//
-// Code - is the facility's status code
-//
-//
-// Define the facility codes
-//
-
- FACILITY_USB_ERROR_CODE = $10;
- {$EXTERNALSYM FACILITY_USB_ERROR_CODE}
- FACILITY_TERMINAL_SERVER = $A;
- {$EXTERNALSYM FACILITY_TERMINAL_SERVER}
- FACILITY_RPC_STUBS = $3;
- {$EXTERNALSYM FACILITY_RPC_STUBS}
- FACILITY_RPC_RUNTIME = $2;
- {$EXTERNALSYM FACILITY_RPC_RUNTIME}
- FACILITY_IO_ERROR_CODE = $4;
- {$EXTERNALSYM FACILITY_IO_ERROR_CODE}
- FACILITY_HID_ERROR_CODE = $11;
- {$EXTERNALSYM FACILITY_HID_ERROR_CODE}
- FACILITY_FIREWIRE_ERROR_CODE = $12;
- {$EXTERNALSYM FACILITY_FIREWIRE_ERROR_CODE}
- FACILITY_DEBUGGER = $1;
- {$EXTERNALSYM FACILITY_DEBUGGER}
- FACILITY_CLUSTER_ERROR_CODE = $13;
- {$EXTERNALSYM FACILITY_CLUSTER_ERROR_CODE}
- FACILITY_ACPI_ERROR_CODE = $14;
- {$EXTERNALSYM FACILITY_ACPI_ERROR_CODE}
-
-//
-// Define the severity codes
-//
-
- STATUS_SEVERITY_WARNING = $2;
- {$EXTERNALSYM STATUS_SEVERITY_WARNING}
- STATUS_SEVERITY_SUCCESS = $0;
- {$EXTERNALSYM STATUS_SEVERITY_SUCCESS}
- STATUS_SEVERITY_INFORMATIONAL = $1;
- {$EXTERNALSYM STATUS_SEVERITY_INFORMATIONAL}
- STATUS_SEVERITY_ERROR = $3;
- {$EXTERNALSYM STATUS_SEVERITY_ERROR}
-
-//
-// MessageId: STATUS_WAIT_0
-//
-// MessageText:
-//
-// STATUS_WAIT_0
-//
-
- STATUS_WAIT_0 = NTSTATUS($00000000); // winnt
- {$EXTERNALSYM STATUS_WAIT_0}
-
-//
-// MessageId: STATUS_WAIT_1
-//
-// MessageText:
-//
-// STATUS_WAIT_1
-//
-
- STATUS_WAIT_1 = NTSTATUS($00000001);
- {$EXTERNALSYM STATUS_WAIT_1}
-
-//
-// MessageId: STATUS_WAIT_2
-//
-// MessageText:
-//
-// STATUS_WAIT_2
-//
-
- STATUS_WAIT_2 = NTSTATUS($00000002);
- {$EXTERNALSYM STATUS_WAIT_2}
-
-//
-// MessageId: STATUS_WAIT_3
-//
-// MessageText:
-//
-// STATUS_WAIT_3
-//
-
- STATUS_WAIT_3 = NTSTATUS($00000003);
- {$EXTERNALSYM STATUS_WAIT_3}
-
-//
-// MessageId: STATUS_WAIT_63
-//
-// MessageText:
-//
-// STATUS_WAIT_63
-//
-
- STATUS_WAIT_63 = NTSTATUS($0000003F);
- {$EXTERNALSYM STATUS_WAIT_63}
-
-//
-// The success status codes 128 - 191 are reserved for wait completion
-// status with an abandoned mutant object.
-//
-
- STATUS_ABANDONED = NTSTATUS($00000080);
- {$EXTERNALSYM STATUS_ABANDONED}
-
-//
-// MessageId: STATUS_ABANDONED_WAIT_0
-//
-// MessageText:
-//
-// STATUS_ABANDONED_WAIT_0
-//
-
- STATUS_ABANDONED_WAIT_0 = NTSTATUS($00000080); // winnt
- {$EXTERNALSYM STATUS_ABANDONED_WAIT_0}
-
-//
-// MessageId: STATUS_ABANDONED_WAIT_63
-//
-// MessageText:
-//
-// STATUS_ABANDONED_WAIT_63
-//
-
- STATUS_ABANDONED_WAIT_63 = NTSTATUS($000000BF);
- {$EXTERNALSYM STATUS_ABANDONED_WAIT_63}
-
-//
-// The success status codes 256, 257, 258, and 258 are reserved for
-// User APC, Kernel APC, Alerted, and Timeout.
-//
-//
-// MessageId: STATUS_USER_APC
-//
-// MessageText:
-//
-// STATUS_USER_APC
-//
-
- STATUS_USER_APC = NTSTATUS($000000C0); // winnt
- {$EXTERNALSYM STATUS_USER_APC}
-
-//
-// MessageId: STATUS_KERNEL_APC
-//
-// MessageText:
-//
-// STATUS_KERNEL_APC
-//
-
- STATUS_KERNEL_APC = NTSTATUS($00000100);
- {$EXTERNALSYM STATUS_KERNEL_APC}
-
-//
-// MessageId: STATUS_ALERTED
-//
-// MessageText:
-//
-// STATUS_ALERTED
-//
-
- STATUS_ALERTED = NTSTATUS($00000101);
- {$EXTERNALSYM STATUS_ALERTED}
-
-//
-// MessageId: STATUS_TIMEOUT
-//
-// MessageText:
-//
-// STATUS_TIMEOUT
-//
-
- STATUS_TIMEOUT = NTSTATUS($00000102); // winnt
- {$EXTERNALSYM STATUS_TIMEOUT}
-
-//
-// MessageId: STATUS_PENDING
-//
-// MessageText:
-//
-// The operation that was requested is pending completion.
-//
-
- STATUS_PENDING = NTSTATUS($00000103); // winnt
- {$EXTERNALSYM STATUS_PENDING}
-
-//
-// MessageId: STATUS_REPARSE
-//
-// MessageText:
-//
-// A reparse should be performed by the Object Manager since the name of the file resulted in a symbolic link.
-//
-
- STATUS_REPARSE = NTSTATUS($00000104);
- {$EXTERNALSYM STATUS_REPARSE}
-
-//
-// MessageId: STATUS_MORE_ENTRIES
-//
-// MessageText:
-//
-// Returned by enumeration APIs to indicate more information is available to successive calls.
-//
-
- STATUS_MORE_ENTRIES = NTSTATUS($00000105);
- {$EXTERNALSYM STATUS_MORE_ENTRIES}
-
-//
-// MessageId: STATUS_NOT_ALL_ASSIGNED
-//
-// MessageText:
-//
-// Indicates not all privileges referenced are assigned to the caller.
-// This allows, for example, all privileges to be disabled without having to know exactly which privileges are assigned.
-//
-
- STATUS_NOT_ALL_ASSIGNED = NTSTATUS($00000106);
- {$EXTERNALSYM STATUS_NOT_ALL_ASSIGNED}
-
-//
-// MessageId: STATUS_SOME_NOT_MAPPED
-//
-// MessageText:
-//
-// Some of the information to be translated has not been translated.
-//
-
- STATUS_SOME_NOT_MAPPED = NTSTATUS($00000107);
- {$EXTERNALSYM STATUS_SOME_NOT_MAPPED}
-
-//
-// MessageId: STATUS_OPLOCK_BREAK_IN_PROGRESS
-//
-// MessageText:
-//
-// An open/create operation completed while an oplock break is underway.
-//
-
- STATUS_OPLOCK_BREAK_IN_PROGRESS = NTSTATUS($00000108);
- {$EXTERNALSYM STATUS_OPLOCK_BREAK_IN_PROGRESS}
-
-//
-// MessageId: STATUS_VOLUME_MOUNTED
-//
-// MessageText:
-//
-// A new volume has been mounted by a file system.
-//
-
- STATUS_VOLUME_MOUNTED = NTSTATUS($00000109);
- {$EXTERNALSYM STATUS_VOLUME_MOUNTED}
-
-//
-// MessageId: STATUS_RXACT_COMMITTED
-//
-// MessageText:
-//
-// This success level status indicates that the transaction state already exists for the registry sub-tree,
-// but that a transaction commit was previously aborted.
-// The commit has now been completed.
-//
-
- STATUS_RXACT_COMMITTED = NTSTATUS($0000010A);
- {$EXTERNALSYM STATUS_RXACT_COMMITTED}
-
-//
-// MessageId: STATUS_NOTIFY_CLEANUP
-//
-// MessageText:
-//
-// This indicates that a notify change request has been completed due to closing the handle
-// which made the notify change request.
-//
-
- STATUS_NOTIFY_CLEANUP = NTSTATUS($0000010B);
- {$EXTERNALSYM STATUS_NOTIFY_CLEANUP}
-
-//
-// MessageId: STATUS_NOTIFY_ENUM_DIR
-//
-// MessageText:
-//
-// This indicates that a notify change request is being completed and that the information
-// is not being returned in the caller's buffer.
-// The caller now needs to enumerate the files to find the changes.
-//
-
- STATUS_NOTIFY_ENUM_DIR = NTSTATUS($0000010C);
- {$EXTERNALSYM STATUS_NOTIFY_ENUM_DIR}
-
-//
-// MessageId: STATUS_NO_QUOTAS_FOR_ACCOUNT
-//
-// MessageText:
-//
-// {No Quotas}
-// No system quota limits are specifically set for this account.
-//
-
- STATUS_NO_QUOTAS_FOR_ACCOUNT = NTSTATUS($0000010D);
- {$EXTERNALSYM STATUS_NO_QUOTAS_FOR_ACCOUNT}
-
-//
-// MessageId: STATUS_PRIMARY_TRANSPORT_CONNECT_FAILED
-//
-// MessageText:
-//
-// {Connect Failure on Primary Transport}
-// An attempt was made to connect to the remote server %hs on the primary transport, but the connection failed.
-// The computer WAS able to connect on a secondary transport.
-//
-
- STATUS_PRIMARY_TRANSPORT_CONNECT_FAILED = NTSTATUS($0000010E);
- {$EXTERNALSYM STATUS_PRIMARY_TRANSPORT_CONNECT_FAILED}
-
-//
-// MessageId: STATUS_PAGE_FAULT_TRANSITION
-//
-// MessageText:
-//
-// Page fault was a transition fault.
-//
-
- STATUS_PAGE_FAULT_TRANSITION = NTSTATUS($00000110);
- {$EXTERNALSYM STATUS_PAGE_FAULT_TRANSITION}
-
-//
-// MessageId: STATUS_PAGE_FAULT_DEMAND_ZERO
-//
-// MessageText:
-//
-// Page fault was a demand zero fault.
-//
-
- STATUS_PAGE_FAULT_DEMAND_ZERO = NTSTATUS($00000111);
- {$EXTERNALSYM STATUS_PAGE_FAULT_DEMAND_ZERO}
-
-//
-// MessageId: STATUS_PAGE_FAULT_COPY_ON_WRITE
-//
-// MessageText:
-//
-// Page fault was a demand zero fault.
-//
-
- STATUS_PAGE_FAULT_COPY_ON_WRITE = NTSTATUS($00000112);
- {$EXTERNALSYM STATUS_PAGE_FAULT_COPY_ON_WRITE}
-
-//
-// MessageId: STATUS_PAGE_FAULT_GUARD_PAGE
-//
-// MessageText:
-//
-// Page fault was a demand zero fault.
-//
-
- STATUS_PAGE_FAULT_GUARD_PAGE = NTSTATUS($00000113);
- {$EXTERNALSYM STATUS_PAGE_FAULT_GUARD_PAGE}
-
-//
-// MessageId: STATUS_PAGE_FAULT_PAGING_FILE
-//
-// MessageText:
-//
-// Page fault was satisfied by reading from a secondary storage device.
-//
-
- STATUS_PAGE_FAULT_PAGING_FILE = NTSTATUS($00000114);
- {$EXTERNALSYM STATUS_PAGE_FAULT_PAGING_FILE}
-
-//
-// MessageId: STATUS_CACHE_PAGE_LOCKED
-//
-// MessageText:
-//
-// Cached page was locked during operation.
-//
-
- STATUS_CACHE_PAGE_LOCKED = NTSTATUS($00000115);
- {$EXTERNALSYM STATUS_CACHE_PAGE_LOCKED}
-
-//
-// MessageId: STATUS_CRASH_DUMP
-//
-// MessageText:
-//
-// Crash dump exists in paging file.
-//
-
- STATUS_CRASH_DUMP = NTSTATUS($00000116);
- {$EXTERNALSYM STATUS_CRASH_DUMP}
-
-//
-// MessageId: STATUS_BUFFER_ALL_ZEROS
-//
-// MessageText:
-//
-// Specified buffer contains all zeros.
-//
-
- STATUS_BUFFER_ALL_ZEROS = NTSTATUS($00000117);
- {$EXTERNALSYM STATUS_BUFFER_ALL_ZEROS}
-
-//
-// MessageId: STATUS_REPARSE_OBJECT
-//
-// MessageText:
-//
-// A reparse should be performed by the Object Manager since the name of the file resulted in a symbolic link.
-//
-
- STATUS_REPARSE_OBJECT = NTSTATUS($00000118);
- {$EXTERNALSYM STATUS_REPARSE_OBJECT}
-
-//
-// MessageId: STATUS_RESOURCE_REQUIREMENTS_CHANGED
-//
-// MessageText:
-//
-// The device has succeeded a query-stop and its resource requirements have changed.
-//
-
- STATUS_RESOURCE_REQUIREMENTS_CHANGED = NTSTATUS($00000119);
- {$EXTERNALSYM STATUS_RESOURCE_REQUIREMENTS_CHANGED}
-
-//
-// MessageId: STATUS_TRANSLATION_COMPLETE
-//
-// MessageText:
-//
-// The translator has translated these resources into the global space and no further translations should be performed.
-//
-
- STATUS_TRANSLATION_COMPLETE = NTSTATUS($00000120);
- {$EXTERNALSYM STATUS_TRANSLATION_COMPLETE}
-
-//
-// MessageId: STATUS_DS_MEMBERSHIP_EVALUATED_LOCALLY
-//
-// MessageText:
-//
-// The directory service evaluated group memberships locally, as it was unable to contact a global catalog server.
-//
-
- STATUS_DS_MEMBERSHIP_EVALUATED_LOCALLY = NTSTATUS($00000121);
- {$EXTERNALSYM STATUS_DS_MEMBERSHIP_EVALUATED_LOCALLY}
-
-//
-// MessageId: DBG_EXCEPTION_HANDLED
-//
-// MessageText:
-//
-// Debugger handled exception
-//
-
- DBG_EXCEPTION_HANDLED = NTSTATUS($00010001); // windbgkd
- {$EXTERNALSYM DBG_EXCEPTION_HANDLED}
-
-//
-// MessageId: DBG_CONTINUE
-//
-// MessageText:
-//
-// Debugger continued
-//
-
- DBG_CONTINUE = NTSTATUS($00010002); // winnt
- {$EXTERNALSYM DBG_CONTINUE}
-
-
-/////////////////////////////////////////////////////////////////////////
-//
-// Standard Information values
-//
-/////////////////////////////////////////////////////////////////////////
-
-//
-// MessageId: STATUS_OBJECT_NAME_EXISTS
-//
-// MessageText:
-//
-// {Object Exists}
-// An attempt was made to create an object and the object name already existed.
-//
-
- STATUS_OBJECT_NAME_EXISTS = NTSTATUS($40000000);
- {$EXTERNALSYM STATUS_OBJECT_NAME_EXISTS}
-
-//
-// MessageId: STATUS_THREAD_WAS_SUSPENDED
-//
-// MessageText:
-//
-// {Thread Suspended}
-// A thread termination occurred while the thread was suspended. The thread was resumed, and termination proceeded.
-//
-
- STATUS_THREAD_WAS_SUSPENDED = NTSTATUS($40000001);
- {$EXTERNALSYM STATUS_THREAD_WAS_SUSPENDED}
-
-//
-// MessageId: STATUS_WORKING_SET_LIMIT_RANGE
-//
-// MessageText:
-//
-// {Working Set Range Error}
-// An attempt was made to set the working set minimum or maximum to values which are outside of the allowable range.
-//
-
- STATUS_WORKING_SET_LIMIT_RANGE = NTSTATUS($40000002);
- {$EXTERNALSYM STATUS_WORKING_SET_LIMIT_RANGE}
-
-//
-// MessageId: STATUS_IMAGE_NOT_AT_BASE
-//
-// MessageText:
-//
-// {Image Relocated}
-// An image file could not be mapped at the address specified in the image file. Local fixups must be performed on this image.
-//
-
- STATUS_IMAGE_NOT_AT_BASE = NTSTATUS($40000003);
- {$EXTERNALSYM STATUS_IMAGE_NOT_AT_BASE}
-
-//
-// MessageId: STATUS_RXACT_STATE_CREATED
-//
-// MessageText:
-//
-// This informational level status indicates that a specified registry sub-tree transaction state did not yet exist and had to be created.
-//
-
- STATUS_RXACT_STATE_CREATED = NTSTATUS($40000004);
- {$EXTERNALSYM STATUS_RXACT_STATE_CREATED}
-
-//
-// MessageId: STATUS_SEGMENT_NOTIFICATION
-//
-// MessageText:
-//
-// {Segment Load}
-// A virtual DOS machine (VDM) is loading, unloading, or moving an MS-DOS or Win16 program segment image.
-// An exception is raised so a debugger can load, unload or track symbols and breakpoints within these 16-bit segments.
-//
-
- STATUS_SEGMENT_NOTIFICATION = NTSTATUS($40000005); // winnt
- {$EXTERNALSYM STATUS_SEGMENT_NOTIFICATION}
-
-//
-// MessageId: STATUS_LOCAL_USER_SESSION_KEY
-//
-// MessageText:
-//
-// {Local Session Key}
-// A user session key was requested for a local RPC connection. The session key returned is a constant value and not unique to this connection.
-//
-
- STATUS_LOCAL_USER_SESSION_KEY = NTSTATUS($40000006);
- {$EXTERNALSYM STATUS_LOCAL_USER_SESSION_KEY}
-
-//
-// MessageId: STATUS_BAD_CURRENT_DIRECTORY
-//
-// MessageText:
-//
-// {Invalid Current Directory}
-// The process cannot switch to the startup current directory %hs.
-// Select OK to set current directory to %hs, or select CANCEL to exit.
-//
-
- STATUS_BAD_CURRENT_DIRECTORY = NTSTATUS($40000007);
- {$EXTERNALSYM STATUS_BAD_CURRENT_DIRECTORY}
-
-//
-// MessageId: STATUS_SERIAL_MORE_WRITES
-//
-// MessageText:
-//
-// {Serial IOCTL Complete}
-// A serial I/O operation was completed by another write to a serial port.
-// (The IOCTL_SERIAL_XOFF_COUNTER reached zero.)
-//
-
- STATUS_SERIAL_MORE_WRITES = NTSTATUS($40000008);
- {$EXTERNALSYM STATUS_SERIAL_MORE_WRITES}
-
-//
-// MessageId: STATUS_REGISTRY_RECOVERED
-//
-// MessageText:
-//
-// {Registry Recovery}
-// One of the files containing the system's Registry data had to be recovered by use of a log or alternate copy.
-// The recovery was successful.
-//
-
- STATUS_REGISTRY_RECOVERED = NTSTATUS($40000009);
- {$EXTERNALSYM STATUS_REGISTRY_RECOVERED}
-
-//
-// MessageId: STATUS_FT_READ_RECOVERY_FROM_BACKUP
-//
-// MessageText:
-//
-// {Redundant Read}
-// To satisfy a read request, the NT fault-tolerant file system successfully read the requested data from a redundant copy.
-// This was done because the file system encountered a failure on a member of the fault-tolerant volume,
-// but was unable to reassign the failing area of the device.
-//
-
- STATUS_FT_READ_RECOVERY_FROM_BACKUP = NTSTATUS($4000000A);
- {$EXTERNALSYM STATUS_FT_READ_RECOVERY_FROM_BACKUP}
-
-//
-// MessageId: STATUS_FT_WRITE_RECOVERY
-//
-// MessageText:
-//
-// {Redundant Write}
-// To satisfy a write request, the NT fault-tolerant file system successfully wrote a redundant copy of the information.
-// This was done because the file system encountered a failure on a member of the fault-tolerant volume,
-// but was not able to reassign the failing area of the device.
-//
-
- STATUS_FT_WRITE_RECOVERY = NTSTATUS($4000000B);
- {$EXTERNALSYM STATUS_FT_WRITE_RECOVERY}
-
-//
-// MessageId: STATUS_SERIAL_COUNTER_TIMEOUT
-//
-// MessageText:
-//
-// {Serial IOCTL Timeout}
-// A serial I/O operation completed because the time-out period expired.
-// (The IOCTL_SERIAL_XOFF_COUNTER had not reached zero.)
-//
-
- STATUS_SERIAL_COUNTER_TIMEOUT = NTSTATUS($4000000C);
- {$EXTERNALSYM STATUS_SERIAL_COUNTER_TIMEOUT}
-
-//
-// MessageId: STATUS_NULL_LM_PASSWORD
-//
-// MessageText:
-//
-// {Password Too Complex}
-// The Windows password is too complex to be converted to a LAN Manager password.
-// The LAN Manager password returned is a NULL string.
-//
-
- STATUS_NULL_LM_PASSWORD = NTSTATUS($4000000D);
- {$EXTERNALSYM STATUS_NULL_LM_PASSWORD}
-
-//
-// MessageId: STATUS_IMAGE_MACHINE_TYPE_MISMATCH
-//
-// MessageText:
-//
-// {Machine Type Mismatch}
-// The image file %hs is valid, but is for a machine type other than the current machine. Select OK to continue, or CANCEL to fail the DLL load.
-//
-
- STATUS_IMAGE_MACHINE_TYPE_MISMATCH = NTSTATUS($4000000E);
- {$EXTERNALSYM STATUS_IMAGE_MACHINE_TYPE_MISMATCH}
-
-//
-// MessageId: STATUS_RECEIVE_PARTIAL
-//
-// MessageText:
-//
-// {Partial Data Received}
-// The network transport returned partial data to its client. The remaining data will be sent later.
-//
-
- STATUS_RECEIVE_PARTIAL = NTSTATUS($4000000F);
- {$EXTERNALSYM STATUS_RECEIVE_PARTIAL}
-
-//
-// MessageId: STATUS_RECEIVE_EXPEDITED
-//
-// MessageText:
-//
-// {Expedited Data Received}
-// The network transport returned data to its client that was marked as expedited by the remote system.
-//
-
- STATUS_RECEIVE_EXPEDITED = NTSTATUS($40000010);
- {$EXTERNALSYM STATUS_RECEIVE_EXPEDITED}
-
-//
-// MessageId: STATUS_RECEIVE_PARTIAL_EXPEDITED
-//
-// MessageText:
-//
-// {Partial Expedited Data Received}
-// The network transport returned partial data to its client and this data was marked as expedited by the remote system. The remaining data will be sent later.
-//
-
- STATUS_RECEIVE_PARTIAL_EXPEDITED = NTSTATUS($40000011);
- {$EXTERNALSYM STATUS_RECEIVE_PARTIAL_EXPEDITED}
-
-//
-// MessageId: STATUS_EVENT_DONE
-//
-// MessageText:
-//
-// {TDI Event Done}
-// The TDI indication has completed successfully.
-//
-
- STATUS_EVENT_DONE = NTSTATUS($40000012);
- {$EXTERNALSYM STATUS_EVENT_DONE}
-
-//
-// MessageId: STATUS_EVENT_PENDING
-//
-// MessageText:
-//
-// {TDI Event Pending}
-// The TDI indication has entered the pending state.
-//
-
- STATUS_EVENT_PENDING = NTSTATUS($40000013);
- {$EXTERNALSYM STATUS_EVENT_PENDING}
-
-//
-// MessageId: STATUS_CHECKING_FILE_SYSTEM
-//
-// MessageText:
-//
-// Checking file system on %wZ
-//
-
- STATUS_CHECKING_FILE_SYSTEM = NTSTATUS($40000014);
- {$EXTERNALSYM STATUS_CHECKING_FILE_SYSTEM}
-
-//
-// MessageId: STATUS_FATAL_APP_EXIT
-//
-// MessageText:
-//
-// {Fatal Application Exit}
-// %hs
-//
-
- STATUS_FATAL_APP_EXIT = NTSTATUS($40000015);
- {$EXTERNALSYM STATUS_FATAL_APP_EXIT}
-
-//
-// MessageId: STATUS_PREDEFINED_HANDLE
-//
-// MessageText:
-//
-// The specified registry key is referenced by a predefined handle.
-//
-
- STATUS_PREDEFINED_HANDLE = NTSTATUS($40000016);
- {$EXTERNALSYM STATUS_PREDEFINED_HANDLE}
-
-//
-// MessageId: STATUS_WAS_UNLOCKED
-//
-// MessageText:
-//
-// {Page Unlocked}
-// The page protection of a locked page was changed to 'No Access' and the page was unlocked from memory and from the process.
-//
-
- STATUS_WAS_UNLOCKED = NTSTATUS($40000017);
- {$EXTERNALSYM STATUS_WAS_UNLOCKED}
-
-//
-// MessageId: STATUS_SERVICE_NOTIFICATION
-//
-// MessageText:
-//
-// %hs
-//
-
- STATUS_SERVICE_NOTIFICATION = NTSTATUS($40000018);
- {$EXTERNALSYM STATUS_SERVICE_NOTIFICATION}
-
-//
-// MessageId: STATUS_WAS_LOCKED
-//
-// MessageText:
-//
-// {Page Locked}
-// One of the pages to lock was already locked.
-//
-
- STATUS_WAS_LOCKED = NTSTATUS($40000019);
- {$EXTERNALSYM STATUS_WAS_LOCKED}
-
-//
-// MessageId: STATUS_LOG_HARD_ERROR
-//
-// MessageText:
-//
-// Application popup: %1 : %2
-//
-
- STATUS_LOG_HARD_ERROR = NTSTATUS($4000001A);
- {$EXTERNALSYM STATUS_LOG_HARD_ERROR}
-
-//
-// MessageId: STATUS_ALREADY_WIN32
-//
-// MessageText:
-//
-// STATUS_ALREADY_WIN32
-//
-
- STATUS_ALREADY_WIN32 = NTSTATUS($4000001B);
- {$EXTERNALSYM STATUS_ALREADY_WIN32}
-
-//
-// MessageId: STATUS_WX86_UNSIMULATE
-//
-// MessageText:
-//
-// Exception status code used by Win32 x86 emulation subsystem.
-//
-
- STATUS_WX86_UNSIMULATE = NTSTATUS($4000001C);
- {$EXTERNALSYM STATUS_WX86_UNSIMULATE}
-
-//
-// MessageId: STATUS_WX86_CONTINUE
-//
-// MessageText:
-//
-// Exception status code used by Win32 x86 emulation subsystem.
-//
-
- STATUS_WX86_CONTINUE = NTSTATUS($4000001D);
- {$EXTERNALSYM STATUS_WX86_CONTINUE}
-
-//
-// MessageId: STATUS_WX86_SINGLE_STEP
-//
-// MessageText:
-//
-// Exception status code used by Win32 x86 emulation subsystem.
-//
-
- STATUS_WX86_SINGLE_STEP = NTSTATUS($4000001E);
- {$EXTERNALSYM STATUS_WX86_SINGLE_STEP}
-
-//
-// MessageId: STATUS_WX86_BREAKPOINT
-//
-// MessageText:
-//
-// Exception status code used by Win32 x86 emulation subsystem.
-//
-
- STATUS_WX86_BREAKPOINT = NTSTATUS($4000001F);
- {$EXTERNALSYM STATUS_WX86_BREAKPOINT}
-
-//
-// MessageId: STATUS_WX86_EXCEPTION_CONTINUE
-//
-// MessageText:
-//
-// Exception status code used by Win32 x86 emulation subsystem.
-//
-
- STATUS_WX86_EXCEPTION_CONTINUE = NTSTATUS($40000020);
- {$EXTERNALSYM STATUS_WX86_EXCEPTION_CONTINUE}
-
-//
-// MessageId: STATUS_WX86_EXCEPTION_LASTCHANCE
-//
-// MessageText:
-//
-// Exception status code used by Win32 x86 emulation subsystem.
-//
-
- STATUS_WX86_EXCEPTION_LASTCHANCE = NTSTATUS($40000021);
- {$EXTERNALSYM STATUS_WX86_EXCEPTION_LASTCHANCE}
-
-//
-// MessageId: STATUS_WX86_EXCEPTION_CHAIN
-//
-// MessageText:
-//
-// Exception status code used by Win32 x86 emulation subsystem.
-//
-
- STATUS_WX86_EXCEPTION_CHAIN = NTSTATUS($40000022);
- {$EXTERNALSYM STATUS_WX86_EXCEPTION_CHAIN}
-
-//
-// MessageId: STATUS_IMAGE_MACHINE_TYPE_MISMATCH_EXE
-//
-// MessageText:
-//
-// {Machine Type Mismatch}
-// The image file %hs is valid, but is for a machine type other than the current machine.
-//
-
- STATUS_IMAGE_MACHINE_TYPE_MISMATCH_EXE = NTSTATUS($40000023);
- {$EXTERNALSYM STATUS_IMAGE_MACHINE_TYPE_MISMATCH_EXE}
-
-//
-// MessageId: STATUS_NO_YIELD_PERFORMED
-//
-// MessageText:
-//
-// A yield execution was performed and no thread was available to run.
-//
-
- STATUS_NO_YIELD_PERFORMED = NTSTATUS($40000024);
- {$EXTERNALSYM STATUS_NO_YIELD_PERFORMED}
-
-//
-// MessageId: STATUS_TIMER_RESUME_IGNORED
-//
-// MessageText:
-//
-// The resumable flag to a timer API was ignored.
-//
-
- STATUS_TIMER_RESUME_IGNORED = NTSTATUS($40000025);
- {$EXTERNALSYM STATUS_TIMER_RESUME_IGNORED}
-
-//
-// MessageId: STATUS_ARBITRATION_UNHANDLED
-//
-// MessageText:
-//
-// The arbiter has deferred arbitration of these resources to its parent
-//
-
- STATUS_ARBITRATION_UNHANDLED = NTSTATUS($40000026);
- {$EXTERNALSYM STATUS_ARBITRATION_UNHANDLED}
-
-//
-// MessageId: STATUS_CARDBUS_NOT_SUPPORTED
-//
-// MessageText:
-//
-// The device "%hs" has detected a CardBus card in its slot, but the firmware on this system is not configured to allow the CardBus controller to be run in CardBus mode.
-// The operating system will currently accept only 16-bit (R2) pc-cards on this controller.
-//
-
- STATUS_CARDBUS_NOT_SUPPORTED = NTSTATUS($40000027);
- {$EXTERNALSYM STATUS_CARDBUS_NOT_SUPPORTED}
-
-//
-// MessageId: STATUS_WX86_CREATEWX86TIB
-//
-// MessageText:
-//
-// Exception status code used by Win32 x86 emulation subsystem.
-//
-
- STATUS_WX86_CREATEWX86TIB = NTSTATUS($40000028);
- {$EXTERNALSYM STATUS_WX86_CREATEWX86TIB}
-
-//
-// MessageId: STATUS_MP_PROCESSOR_MISMATCH
-//
-// MessageText:
-//
-// The CPUs in this multiprocessor system are not all the same revision level. To use all processors the operating system restricts itself to the features of the least capable processor in the system. Should problems occur with this system, contact the CPU manufacturer to see if this mix of processors is supported.
-//
-
- STATUS_MP_PROCESSOR_MISMATCH = NTSTATUS($40000029);
- {$EXTERNALSYM STATUS_MP_PROCESSOR_MISMATCH}
-
-//
-// MessageId: DBG_REPLY_LATER
-//
-// MessageText:
-//
-// Debugger will reply later.
-//
-
- DBG_REPLY_LATER = NTSTATUS($40010001);
- {$EXTERNALSYM DBG_REPLY_LATER}
-
-//
-// MessageId: DBG_UNABLE_TO_PROVIDE_HANDLE
-//
-// MessageText:
-//
-// Debugger can not provide handle.
-//
-
- DBG_UNABLE_TO_PROVIDE_HANDLE = NTSTATUS($40010002);
- {$EXTERNALSYM DBG_UNABLE_TO_PROVIDE_HANDLE}
-
-//
-// MessageId: DBG_TERMINATE_THREAD
-//
-// MessageText:
-//
-// Debugger terminated thread.
-//
-
- DBG_TERMINATE_THREAD = NTSTATUS($40010003); // winnt
- {$EXTERNALSYM DBG_TERMINATE_THREAD}
-
-//
-// MessageId: DBG_TERMINATE_PROCESS
-//
-// MessageText:
-//
-// Debugger terminated process.
-//
-
- DBG_TERMINATE_PROCESS = NTSTATUS($40010004); // winnt
- {$EXTERNALSYM DBG_TERMINATE_PROCESS}
-
-//
-// MessageId: DBG_CONTROL_C
-//
-// MessageText:
-//
-// Debugger got control C.
-//
-
- DBG_CONTROL_C = NTSTATUS($40010005); // winnt
- {$EXTERNALSYM DBG_CONTROL_C}
-
-//
-// MessageId: DBG_PRINTEXCEPTION_C
-//
-// MessageText:
-//
-// Debugger printerd exception on control C.
-//
-
- DBG_PRINTEXCEPTION_C = NTSTATUS($40010006);
- {$EXTERNALSYM DBG_PRINTEXCEPTION_C}
-
-//
-// MessageId: DBG_RIPEXCEPTION
-//
-// MessageText:
-//
-// Debugger recevice RIP exception.
-//
-
- DBG_RIPEXCEPTION = NTSTATUS($40010007);
- {$EXTERNALSYM DBG_RIPEXCEPTION}
-
-//
-// MessageId: DBG_CONTROL_BREAK
-//
-// MessageText:
-//
-// Debugger received control break.
-//
-
- DBG_CONTROL_BREAK = NTSTATUS($40010008); // winnt
- {$EXTERNALSYM DBG_CONTROL_BREAK}
-
-
-/////////////////////////////////////////////////////////////////////////
-//
-// Standard Warning values
-//
-//
-// Note: Do NOT use the value 0x80000000L, as this is a non-portable value
-// for the NT_SUCCESS macro. Warning values start with a code of 1.
-//
-/////////////////////////////////////////////////////////////////////////
-
-//
-// MessageId: STATUS_GUARD_PAGE_VIOLATION
-//
-// MessageText:
-//
-// {EXCEPTION}
-// Guard Page Exception
-// A page of memory that marks the end of a data structure, such as a stack or an array, has been accessed.
-//
-
- STATUS_GUARD_PAGE_VIOLATION = NTSTATUS($80000001); // winnt
- {$EXTERNALSYM STATUS_GUARD_PAGE_VIOLATION}
-
-//
-// MessageId: STATUS_DATATYPE_MISALIGNMENT
-//
-// MessageText:
-//
-// {EXCEPTION}
-// Alignment Fault
-// A datatype misalignment was detected in a load or store instruction.
-//
-
- STATUS_DATATYPE_MISALIGNMENT = NTSTATUS($80000002); // winnt
- {$EXTERNALSYM STATUS_DATATYPE_MISALIGNMENT}
-
-//
-// MessageId: STATUS_BREAKPOINT
-//
-// MessageText:
-//
-// {EXCEPTION}
-// Breakpoint
-// A breakpoint has been reached.
-//
-
- STATUS_BREAKPOINT = NTSTATUS($80000003); // winnt
- {$EXTERNALSYM STATUS_BREAKPOINT}
-
-//
-// MessageId: STATUS_SINGLE_STEP
-//
-// MessageText:
-//
-// {EXCEPTION}
-// Single Step
-// A single step or trace operation has just been completed.
-//
-
- STATUS_SINGLE_STEP = NTSTATUS($80000004); // winnt
- {$EXTERNALSYM STATUS_SINGLE_STEP}
-
-//
-// MessageId: STATUS_BUFFER_OVERFLOW
-//
-// MessageText:
-//
-// {Buffer Overflow}
-// The data was too large to fit into the specified buffer.
-//
-
- STATUS_BUFFER_OVERFLOW = NTSTATUS($80000005);
- {$EXTERNALSYM STATUS_BUFFER_OVERFLOW}
-
-//
-// MessageId: STATUS_NO_MORE_FILES
-//
-// MessageText:
-//
-// {No More Files}
-// No more files were found which match the file specification.
-//
-
- STATUS_NO_MORE_FILES = NTSTATUS($80000006);
- {$EXTERNALSYM STATUS_NO_MORE_FILES}
-
-//
-// MessageId: STATUS_WAKE_SYSTEM_DEBUGGER
-//
-// MessageText:
-//
-// {Kernel Debugger Awakened}
-// the system debugger was awakened by an interrupt.
-//
-
- STATUS_WAKE_SYSTEM_DEBUGGER = NTSTATUS($80000007);
- {$EXTERNALSYM STATUS_WAKE_SYSTEM_DEBUGGER}
-
-//
-// MessageId: STATUS_HANDLES_CLOSED
-//
-// MessageText:
-//
-// {Handles Closed}
-// Handles to objects have been automatically closed as a result of the requested operation.
-//
-
- STATUS_HANDLES_CLOSED = NTSTATUS($8000000A);
- {$EXTERNALSYM STATUS_HANDLES_CLOSED}
-
-//
-// MessageId: STATUS_NO_INHERITANCE
-//
-// MessageText:
-//
-// {Non-Inheritable ACL}
-// An access control list (ACL) contains no components that can be inherited.
-//
-
- STATUS_NO_INHERITANCE = NTSTATUS($8000000B);
- {$EXTERNALSYM STATUS_NO_INHERITANCE}
-
-//
-// MessageId: STATUS_GUID_SUBSTITUTION_MADE
-//
-// MessageText:
-//
-// {GUID Substitution}
-// During the translation of a global identifier (GUID) to a Windows security ID (SID), no administratively-defined GUID prefix was found.
-// A substitute prefix was used, which will not compromise system security.
-// However, this may provide a more restrictive access than intended.
-//
-
- STATUS_GUID_SUBSTITUTION_MADE = NTSTATUS($8000000C);
- {$EXTERNALSYM STATUS_GUID_SUBSTITUTION_MADE}
-
-//
-// MessageId: STATUS_PARTIAL_COPY
-//
-// MessageText:
-//
-// {Partial Copy}
-// Due to protection conflicts not all the requested bytes could be copied.
-//
-
- STATUS_PARTIAL_COPY = NTSTATUS($8000000D);
- {$EXTERNALSYM STATUS_PARTIAL_COPY}
-
-//
-// MessageId: STATUS_DEVICE_PAPER_EMPTY
-//
-// MessageText:
-//
-// {Out of Paper}
-// The printer is out of paper.
-//
-
- STATUS_DEVICE_PAPER_EMPTY = NTSTATUS($8000000E);
- {$EXTERNALSYM STATUS_DEVICE_PAPER_EMPTY}
-
-//
-// MessageId: STATUS_DEVICE_POWERED_OFF
-//
-// MessageText:
-//
-// {Device Power Is Off}
-// The printer power has been turned off.
-//
-
- STATUS_DEVICE_POWERED_OFF = NTSTATUS($8000000F);
- {$EXTERNALSYM STATUS_DEVICE_POWERED_OFF}
-
-//
-// MessageId: STATUS_DEVICE_OFF_LINE
-//
-// MessageText:
-//
-// {Device Offline}
-// The printer has been taken offline.
-//
-
- STATUS_DEVICE_OFF_LINE = NTSTATUS($80000010);
- {$EXTERNALSYM STATUS_DEVICE_OFF_LINE}
-
-//
-// MessageId: STATUS_DEVICE_BUSY
-//
-// MessageText:
-//
-// {Device Busy}
-// The device is currently busy.
-//
-
- STATUS_DEVICE_BUSY = NTSTATUS($80000011);
- {$EXTERNALSYM STATUS_DEVICE_BUSY}
-
-//
-// MessageId: STATUS_NO_MORE_EAS
-//
-// MessageText:
-//
-// {No More EAs}
-// No more extended attributes (EAs) were found for the file.
-//
-
- STATUS_NO_MORE_EAS = NTSTATUS($80000012);
- {$EXTERNALSYM STATUS_NO_MORE_EAS}
-
-//
-// MessageId: STATUS_INVALID_EA_NAME
-//
-// MessageText:
-//
-// {Illegal EA}
-// The specified extended attribute (EA) name contains at least one illegal character.
-//
-
- STATUS_INVALID_EA_NAME = NTSTATUS($80000013);
- {$EXTERNALSYM STATUS_INVALID_EA_NAME}
-
-//
-// MessageId: STATUS_EA_LIST_INCONSISTENT
-//
-// MessageText:
-//
-// {Inconsistent EA List}
-// The extended attribute (EA) list is inconsistent.
-//
-
- STATUS_EA_LIST_INCONSISTENT = NTSTATUS($80000014);
- {$EXTERNALSYM STATUS_EA_LIST_INCONSISTENT}
-
-//
-// MessageId: STATUS_INVALID_EA_FLAG
-//
-// MessageText:
-//
-// {Invalid EA Flag}
-// An invalid extended attribute (EA) flag was set.
-//
-
- STATUS_INVALID_EA_FLAG = NTSTATUS($80000015);
- {$EXTERNALSYM STATUS_INVALID_EA_FLAG}
-
-//
-// MessageId: STATUS_VERIFY_REQUIRED
-//
-// MessageText:
-//
-// {Verifying Disk}
-// The media has changed and a verify operation is in progress so no reads or writes may be performed to the device, except those used in the verify operation.
-//
-
- STATUS_VERIFY_REQUIRED = NTSTATUS($80000016);
- {$EXTERNALSYM STATUS_VERIFY_REQUIRED}
-
-//
-// MessageId: STATUS_EXTRANEOUS_INFORMATION
-//
-// MessageText:
-//
-// {Too Much Information}
-// The specified access control list (ACL) contained more information than was expected.
-//
-
- STATUS_EXTRANEOUS_INFORMATION = NTSTATUS($80000017);
- {$EXTERNALSYM STATUS_EXTRANEOUS_INFORMATION}
-
-//
-// MessageId: STATUS_RXACT_COMMIT_NECESSARY
-//
-// MessageText:
-//
-// This warning level status indicates that the transaction state already exists for the registry sub-tree, but that a transaction commit was previously aborted.
-// The commit has NOT been completed, but has not been rolled back either (so it may still be committed if desired).
-//
-
- STATUS_RXACT_COMMIT_NECESSARY = NTSTATUS($80000018);
- {$EXTERNALSYM STATUS_RXACT_COMMIT_NECESSARY}
-
-//
-// MessageId: STATUS_NO_MORE_ENTRIES
-//
-// MessageText:
-//
-// {No More Entries}
-// No more entries are available from an enumeration operation.
-//
-
- STATUS_NO_MORE_ENTRIES = NTSTATUS($8000001A);
- {$EXTERNALSYM STATUS_NO_MORE_ENTRIES}
-
-//
-// MessageId: STATUS_FILEMARK_DETECTED
-//
-// MessageText:
-//
-// {Filemark Found}
-// A filemark was detected.
-//
-
- STATUS_FILEMARK_DETECTED = NTSTATUS($8000001B);
- {$EXTERNALSYM STATUS_FILEMARK_DETECTED}
-
-//
-// MessageId: STATUS_MEDIA_CHANGED
-//
-// MessageText:
-//
-// {Media Changed}
-// The media may have changed.
-//
-
- STATUS_MEDIA_CHANGED = NTSTATUS($8000001C);
- {$EXTERNALSYM STATUS_MEDIA_CHANGED}
-
-//
-// MessageId: STATUS_BUS_RESET
-//
-// MessageText:
-//
-// {I/O Bus Reset}
-// An I/O bus reset was detected.
-//
-
- STATUS_BUS_RESET = NTSTATUS($8000001D);
- {$EXTERNALSYM STATUS_BUS_RESET}
-
-//
-// MessageId: STATUS_END_OF_MEDIA
-//
-// MessageText:
-//
-// {End of Media}
-// The end of the media was encountered.
-//
-
- STATUS_END_OF_MEDIA = NTSTATUS($8000001E);
- {$EXTERNALSYM STATUS_END_OF_MEDIA}
-
-//
-// MessageId: STATUS_BEGINNING_OF_MEDIA
-//
-// MessageText:
-//
-// Beginning of tape or partition has been detected.
-//
-
- STATUS_BEGINNING_OF_MEDIA = NTSTATUS($8000001F);
- {$EXTERNALSYM STATUS_BEGINNING_OF_MEDIA}
-
-//
-// MessageId: STATUS_MEDIA_CHECK
-//
-// MessageText:
-//
-// {Media Changed}
-// The media may have changed.
-//
-
- STATUS_MEDIA_CHECK = NTSTATUS($80000020);
- {$EXTERNALSYM STATUS_MEDIA_CHECK}
-
-//
-// MessageId: STATUS_SETMARK_DETECTED
-//
-// MessageText:
-//
-// A tape access reached a setmark.
-//
-
- STATUS_SETMARK_DETECTED = NTSTATUS($80000021);
- {$EXTERNALSYM STATUS_SETMARK_DETECTED}
-
-//
-// MessageId: STATUS_NO_DATA_DETECTED
-//
-// MessageText:
-//
-// During a tape access, the end of the data written is reached.
-//
-
- STATUS_NO_DATA_DETECTED = NTSTATUS($80000022);
- {$EXTERNALSYM STATUS_NO_DATA_DETECTED}
-
-//
-// MessageId: STATUS_REDIRECTOR_HAS_OPEN_HANDLES
-//
-// MessageText:
-//
-// The redirector is in use and cannot be unloaded.
-//
-
- STATUS_REDIRECTOR_HAS_OPEN_HANDLES = NTSTATUS($80000023);
- {$EXTERNALSYM STATUS_REDIRECTOR_HAS_OPEN_HANDLES}
-
-//
-// MessageId: STATUS_SERVER_HAS_OPEN_HANDLES
-//
-// MessageText:
-//
-// The server is in use and cannot be unloaded.
-//
-
- STATUS_SERVER_HAS_OPEN_HANDLES = NTSTATUS($80000024);
- {$EXTERNALSYM STATUS_SERVER_HAS_OPEN_HANDLES}
-
-//
-// MessageId: STATUS_ALREADY_DISCONNECTED
-//
-// MessageText:
-//
-// The specified connection has already been disconnected.
-//
-
- STATUS_ALREADY_DISCONNECTED = NTSTATUS($80000025);
- {$EXTERNALSYM STATUS_ALREADY_DISCONNECTED}
-
-//
-// MessageId: STATUS_LONGJUMP
-//
-// MessageText:
-//
-// A long jump has been executed.
-//
-
- STATUS_LONGJUMP = NTSTATUS($80000026);
- {$EXTERNALSYM STATUS_LONGJUMP}
-
-//
-// MessageId: DBG_EXCEPTION_NOT_HANDLED
-//
-// MessageText:
-//
-// Debugger did not handle the exception.
-//
-
- DBG_EXCEPTION_NOT_HANDLED = NTSTATUS($80010001); // winnt
- {$EXTERNALSYM DBG_EXCEPTION_NOT_HANDLED}
-
-
-/////////////////////////////////////////////////////////////////////////
-//
-// Standard Error values
-//
-/////////////////////////////////////////////////////////////////////////
-
-//
-// MessageId: STATUS_UNSUCCESSFUL
-//
-// MessageText:
-//
-// {Operation Failed}
-// The requested operation was unsuccessful.
-//
-
- STATUS_UNSUCCESSFUL = NTSTATUS($C0000001);
- {$EXTERNALSYM STATUS_UNSUCCESSFUL}
-
-//
-// MessageId: STATUS_NOT_IMPLEMENTED
-//
-// MessageText:
-//
-// {Not Implemented}
-// The requested operation is not implemented.
-//
-
- STATUS_NOT_IMPLEMENTED = NTSTATUS($C0000002);
- {$EXTERNALSYM STATUS_NOT_IMPLEMENTED}
-
-//
-// MessageId: STATUS_INVALID_INFO_CLASS
-//
-// MessageText:
-//
-// {Invalid Parameter}
-// The specified information class is not a valid information class for the specified object.
-//
-
- STATUS_INVALID_INFO_CLASS = NTSTATUS($C0000003); // ntsubauth
- {$EXTERNALSYM STATUS_INVALID_INFO_CLASS}
-
-//
-// MessageId: STATUS_INFO_LENGTH_MISMATCH
-//
-// MessageText:
-//
-// The specified information record length does not match the length required for the specified information class.
-//
-
- STATUS_INFO_LENGTH_MISMATCH = NTSTATUS($C0000004);
- {$EXTERNALSYM STATUS_INFO_LENGTH_MISMATCH}
-
-//
-// MessageId: STATUS_ACCESS_VIOLATION
-//
-// MessageText:
-//
-// The instruction at "0x%08lx" referenced memory at "0x%08lx". The memory could not be "%s".
-//
-
- STATUS_ACCESS_VIOLATION = NTSTATUS($C0000005); // winnt
- {$EXTERNALSYM STATUS_ACCESS_VIOLATION}
-
-//
-// MessageId: STATUS_IN_PAGE_ERROR
-//
-// MessageText:
-//
-// The instruction at "0x%08lx" referenced memory at "0x%08lx". The required data was not placed into memory because of an I/O error status of "0x%08lx".
-//
-
- STATUS_IN_PAGE_ERROR = NTSTATUS($C0000006); // winnt
- {$EXTERNALSYM STATUS_IN_PAGE_ERROR}
-
-//
-// MessageId: STATUS_PAGEFILE_QUOTA
-//
-// MessageText:
-//
-// The pagefile quota for the process has been exhausted.
-//
-
- STATUS_PAGEFILE_QUOTA = NTSTATUS($C0000007);
- {$EXTERNALSYM STATUS_PAGEFILE_QUOTA}
-
-//
-// MessageId: STATUS_INVALID_HANDLE
-//
-// MessageText:
-//
-// An invalid HANDLE was specified.
-//
-
- STATUS_INVALID_HANDLE = NTSTATUS($C0000008); // winnt
- {$EXTERNALSYM STATUS_INVALID_HANDLE}
-
-//
-// MessageId: STATUS_BAD_INITIAL_STACK
-//
-// MessageText:
-//
-// An invalid initial stack was specified in a call to NtCreateThread.
-//
-
- STATUS_BAD_INITIAL_STACK = NTSTATUS($C0000009);
- {$EXTERNALSYM STATUS_BAD_INITIAL_STACK}
-
-//
-// MessageId: STATUS_BAD_INITIAL_PC
-//
-// MessageText:
-//
-// An invalid initial start address was specified in a call to NtCreateThread.
-//
-
- STATUS_BAD_INITIAL_PC = NTSTATUS($C000000A);
- {$EXTERNALSYM STATUS_BAD_INITIAL_PC}
-
-//
-// MessageId: STATUS_INVALID_CID
-//
-// MessageText:
-//
-// An invalid Client ID was specified.
-//
-
- STATUS_INVALID_CID = NTSTATUS($C000000B);
- {$EXTERNALSYM STATUS_INVALID_CID}
-
-//
-// MessageId: STATUS_TIMER_NOT_CANCELED
-//
-// MessageText:
-//
-// An attempt was made to cancel or set a timer that has an associated APC and the subject thread is not the thread that originally set the timer with an associated APC routine.
-//
-
- STATUS_TIMER_NOT_CANCELED = NTSTATUS($C000000C);
- {$EXTERNALSYM STATUS_TIMER_NOT_CANCELED}
-
-//
-// MessageId: STATUS_INVALID_PARAMETER
-//
-// MessageText:
-//
-// An invalid parameter was passed to a service or function.
-//
-
- STATUS_INVALID_PARAMETER = NTSTATUS($C000000D);
- {$EXTERNALSYM STATUS_INVALID_PARAMETER}
-
-//
-// MessageId: STATUS_NO_SUCH_DEVICE
-//
-// MessageText:
-//
-// A device which does not exist was specified.
-//
-
- STATUS_NO_SUCH_DEVICE = NTSTATUS($C000000E);
- {$EXTERNALSYM STATUS_NO_SUCH_DEVICE}
-
-//
-// MessageId: STATUS_NO_SUCH_FILE
-//
-// MessageText:
-//
-// {File Not Found}
-// The file %hs does not exist.
-//
-
- STATUS_NO_SUCH_FILE = NTSTATUS($C000000F);
- {$EXTERNALSYM STATUS_NO_SUCH_FILE}
-
-//
-// MessageId: STATUS_INVALID_DEVICE_REQUEST
-//
-// MessageText:
-//
-// The specified request is not a valid operation for the target device.
-//
-
- STATUS_INVALID_DEVICE_REQUEST = NTSTATUS($C0000010);
- {$EXTERNALSYM STATUS_INVALID_DEVICE_REQUEST}
-
-//
-// MessageId: STATUS_END_OF_FILE
-//
-// MessageText:
-//
-// The end-of-file marker has been reached. There is no valid data in the file beyond this marker.
-//
-
- STATUS_END_OF_FILE = NTSTATUS($C0000011);
- {$EXTERNALSYM STATUS_END_OF_FILE}
-
-//
-// MessageId: STATUS_WRONG_VOLUME
-//
-// MessageText:
-//
-// {Wrong Volume}
-// The wrong volume is in the drive.
-// Please insert volume %hs into drive %hs.
-//
-
- STATUS_WRONG_VOLUME = NTSTATUS($C0000012);
- {$EXTERNALSYM STATUS_WRONG_VOLUME}
-
-//
-// MessageId: STATUS_NO_MEDIA_IN_DEVICE
-//
-// MessageText:
-//
-// {No Disk}
-// There is no disk in the drive.
-// Please insert a disk into drive %hs.
-//
-
- STATUS_NO_MEDIA_IN_DEVICE = NTSTATUS($C0000013);
- {$EXTERNALSYM STATUS_NO_MEDIA_IN_DEVICE}
-
-//
-// MessageId: STATUS_UNRECOGNIZED_MEDIA
-//
-// MessageText:
-//
-// {Unknown Disk Format}
-// The disk in drive %hs is not formatted properly.
-// Please check the disk, and reformat if necessary.
-//
-
- STATUS_UNRECOGNIZED_MEDIA = NTSTATUS($C0000014);
- {$EXTERNALSYM STATUS_UNRECOGNIZED_MEDIA}
-
-//
-// MessageId: STATUS_NONEXISTENT_SECTOR
-//
-// MessageText:
-//
-// {Sector Not Found}
-// The specified sector does not exist.
-//
-
- STATUS_NONEXISTENT_SECTOR = NTSTATUS($C0000015);
- {$EXTERNALSYM STATUS_NONEXISTENT_SECTOR}
-
-//
-// MessageId: STATUS_MORE_PROCESSING_REQUIRED
-//
-// MessageText:
-//
-// {Still Busy}
-// The specified I/O request packet (IRP) cannot be disposed of because the I/O operation is not complete.
-//
-
- STATUS_MORE_PROCESSING_REQUIRED = NTSTATUS($C0000016);
- {$EXTERNALSYM STATUS_MORE_PROCESSING_REQUIRED}
-
-//
-// MessageId: STATUS_NO_MEMORY
-//
-// MessageText:
-//
-// {Not Enough Quota}
-// Not enough virtual memory or paging file quota is available to complete the specified operation.
-//
-
- STATUS_NO_MEMORY = NTSTATUS($C0000017); // winnt
- {$EXTERNALSYM STATUS_NO_MEMORY}
-
-//
-// MessageId: STATUS_CONFLICTING_ADDRESSES
-//
-// MessageText:
-//
-// {Conflicting Address Range}
-// The specified address range conflicts with the address space.
-//
-
- STATUS_CONFLICTING_ADDRESSES = NTSTATUS($C0000018);
- {$EXTERNALSYM STATUS_CONFLICTING_ADDRESSES}
-
-//
-// MessageId: STATUS_NOT_MAPPED_VIEW
-//
-// MessageText:
-//
-// Address range to unmap is not a mapped view.
-//
-
- STATUS_NOT_MAPPED_VIEW = NTSTATUS($C0000019);
- {$EXTERNALSYM STATUS_NOT_MAPPED_VIEW}
-
-//
-// MessageId: STATUS_UNABLE_TO_FREE_VM
-//
-// MessageText:
-//
-// Virtual memory cannot be freed.
-//
-
- STATUS_UNABLE_TO_FREE_VM = NTSTATUS($C000001A);
- {$EXTERNALSYM STATUS_UNABLE_TO_FREE_VM}
-
-//
-// MessageId: STATUS_UNABLE_TO_DELETE_SECTION
-//
-// MessageText:
-//
-// Specified section cannot be deleted.
-//
-
- STATUS_UNABLE_TO_DELETE_SECTION = NTSTATUS($C000001B);
- {$EXTERNALSYM STATUS_UNABLE_TO_DELETE_SECTION}
-
-//
-// MessageId: STATUS_INVALID_SYSTEM_SERVICE
-//
-// MessageText:
-//
-// An invalid system service was specified in a system service call.
-//
-
- STATUS_INVALID_SYSTEM_SERVICE = NTSTATUS($C000001C);
- {$EXTERNALSYM STATUS_INVALID_SYSTEM_SERVICE}
-
-//
-// MessageId: STATUS_ILLEGAL_INSTRUCTION
-//
-// MessageText:
-//
-// {EXCEPTION}
-// Illegal Instruction
-// An attempt was made to execute an illegal instruction.
-//
-
- STATUS_ILLEGAL_INSTRUCTION = NTSTATUS($C000001D); // winnt
- {$EXTERNALSYM STATUS_ILLEGAL_INSTRUCTION}
-
-//
-// MessageId: STATUS_INVALID_LOCK_SEQUENCE
-//
-// MessageText:
-//
-// {Invalid Lock Sequence}
-// An attempt was made to execute an invalid lock sequence.
-//
-
- STATUS_INVALID_LOCK_SEQUENCE = NTSTATUS($C000001E);
- {$EXTERNALSYM STATUS_INVALID_LOCK_SEQUENCE}
-
-//
-// MessageId: STATUS_INVALID_VIEW_SIZE
-//
-// MessageText:
-//
-// {Invalid Mapping}
-// An attempt was made to create a view for a section which is bigger than the section.
-//
-
- STATUS_INVALID_VIEW_SIZE = NTSTATUS($C000001F);
- {$EXTERNALSYM STATUS_INVALID_VIEW_SIZE}
-
-//
-// MessageId: STATUS_INVALID_FILE_FOR_SECTION
-//
-// MessageText:
-//
-// {Bad File}
-// The attributes of the specified mapping file for a section of memory cannot be read.
-//
-
- STATUS_INVALID_FILE_FOR_SECTION = NTSTATUS($C0000020);
- {$EXTERNALSYM STATUS_INVALID_FILE_FOR_SECTION}
-
-//
-// MessageId: STATUS_ALREADY_COMMITTED
-//
-// MessageText:
-//
-// {Already Committed}
-// The specified address range is already committed.
-//
-
- STATUS_ALREADY_COMMITTED = NTSTATUS($C0000021);
- {$EXTERNALSYM STATUS_ALREADY_COMMITTED}
-
-//
-// MessageId: STATUS_ACCESS_DENIED
-//
-// MessageText:
-//
-// {Access Denied}
-// A process has requested access to an object, but has not been granted those access rights.
-//
-
- STATUS_ACCESS_DENIED = NTSTATUS($C0000022);
- {$EXTERNALSYM STATUS_ACCESS_DENIED}
-
-//
-// MessageId: STATUS_BUFFER_TOO_SMALL
-//
-// MessageText:
-//
-// {Buffer Too Small}
-// The buffer is too small to contain the entry. No information has been written to the buffer.
-//
-
- STATUS_BUFFER_TOO_SMALL = NTSTATUS($C0000023);
- {$EXTERNALSYM STATUS_BUFFER_TOO_SMALL}
-
-//
-// MessageId: STATUS_OBJECT_TYPE_MISMATCH
-//
-// MessageText:
-//
-// {Wrong Type}
-// There is a mismatch between the type of object required by the requested operation and the type of object that is specified in the request.
-//
-
- STATUS_OBJECT_TYPE_MISMATCH = NTSTATUS($C0000024);
- {$EXTERNALSYM STATUS_OBJECT_TYPE_MISMATCH}
-
-//
-// MessageId: STATUS_NONCONTINUABLE_EXCEPTION
-//
-// MessageText:
-//
-// {EXCEPTION}
-// Cannot Continue
-// Windows cannot continue from this exception.
-//
-
- STATUS_NONCONTINUABLE_EXCEPTION = NTSTATUS($C0000025); // winnt
- {$EXTERNALSYM STATUS_NONCONTINUABLE_EXCEPTION}
-
-//
-// MessageId: STATUS_INVALID_DISPOSITION
-//
-// MessageText:
-//
-// An invalid exception disposition was returned by an exception handler.
-//
-
- STATUS_INVALID_DISPOSITION = NTSTATUS($C0000026); // winnt
- {$EXTERNALSYM STATUS_INVALID_DISPOSITION}
-
-//
-// MessageId: STATUS_UNWIND
-//
-// MessageText:
-//
-// Unwind exception code.
-//
-
- STATUS_UNWIND = NTSTATUS($C0000027);
- {$EXTERNALSYM STATUS_UNWIND}
-
-//
-// MessageId: STATUS_BAD_STACK
-//
-// MessageText:
-//
-// An invalid or unaligned stack was encountered during an unwind operation.
-//
-
- STATUS_BAD_STACK = NTSTATUS($C0000028);
- {$EXTERNALSYM STATUS_BAD_STACK}
-
-//
-// MessageId: STATUS_INVALID_UNWIND_TARGET
-//
-// MessageText:
-//
-// An invalid unwind target was encountered during an unwind operation.
-//
-
- STATUS_INVALID_UNWIND_TARGET = NTSTATUS($C0000029);
- {$EXTERNALSYM STATUS_INVALID_UNWIND_TARGET}
-
-//
-// MessageId: STATUS_NOT_LOCKED
-//
-// MessageText:
-//
-// An attempt was made to unlock a page of memory which was not locked.
-//
-
- STATUS_NOT_LOCKED = NTSTATUS($C000002A);
- {$EXTERNALSYM STATUS_NOT_LOCKED}
-
-//
-// MessageId: STATUS_PARITY_ERROR
-//
-// MessageText:
-//
-// Device parity error on I/O operation.
-//
-
- STATUS_PARITY_ERROR = NTSTATUS($C000002B);
- {$EXTERNALSYM STATUS_PARITY_ERROR}
-
-//
-// MessageId: STATUS_UNABLE_TO_DECOMMIT_VM
-//
-// MessageText:
-//
-// An attempt was made to decommit uncommitted virtual memory.
-//
-
- STATUS_UNABLE_TO_DECOMMIT_VM = NTSTATUS($C000002C);
- {$EXTERNALSYM STATUS_UNABLE_TO_DECOMMIT_VM}
-
-//
-// MessageId: STATUS_NOT_COMMITTED
-//
-// MessageText:
-//
-// An attempt was made to change the attributes on memory that has not been committed.
-//
-
- STATUS_NOT_COMMITTED = NTSTATUS($C000002D);
- {$EXTERNALSYM STATUS_NOT_COMMITTED}
-
-//
-// MessageId: STATUS_INVALID_PORT_ATTRIBUTES
-//
-// MessageText:
-//
-// Invalid Object Attributes specified to NtCreatePort or invalid Port Attributes specified to NtConnectPort
-//
-
- STATUS_INVALID_PORT_ATTRIBUTES = NTSTATUS($C000002E);
- {$EXTERNALSYM STATUS_INVALID_PORT_ATTRIBUTES}
-
-//
-// MessageId: STATUS_PORT_MESSAGE_TOO_LONG
-//
-// MessageText:
-//
-// Length of message passed to NtRequestPort or NtRequestWaitReplyPort was longer than the maximum message allowed by the port.
-//
-
- STATUS_PORT_MESSAGE_TOO_LONG = NTSTATUS($C000002F);
- {$EXTERNALSYM STATUS_PORT_MESSAGE_TOO_LONG}
-
-//
-// MessageId: STATUS_INVALID_PARAMETER_MIX
-//
-// MessageText:
-//
-// An invalid combination of parameters was specified.
-//
-
- STATUS_INVALID_PARAMETER_MIX = NTSTATUS($C0000030);
- {$EXTERNALSYM STATUS_INVALID_PARAMETER_MIX}
-
-//
-// MessageId: STATUS_INVALID_QUOTA_LOWER
-//
-// MessageText:
-//
-// An attempt was made to lower a quota limit below the current usage.
-//
-
- STATUS_INVALID_QUOTA_LOWER = NTSTATUS($C0000031);
- {$EXTERNALSYM STATUS_INVALID_QUOTA_LOWER}
-
-//
-// MessageId: STATUS_DISK_CORRUPT_ERROR
-//
-// MessageText:
-//
-// {Corrupt Disk}
-// The file system structure on the disk is corrupt and unusable.
-// Please run the Chkdsk utility on the volume %hs.
-//
-
- STATUS_DISK_CORRUPT_ERROR = NTSTATUS($C0000032);
- {$EXTERNALSYM STATUS_DISK_CORRUPT_ERROR}
-
-//
-// MessageId: STATUS_OBJECT_NAME_INVALID
-//
-// MessageText:
-//
-// Object Name invalid.
-//
-
- STATUS_OBJECT_NAME_INVALID = NTSTATUS($C0000033);
- {$EXTERNALSYM STATUS_OBJECT_NAME_INVALID}
-
-//
-// MessageId: STATUS_OBJECT_NAME_NOT_FOUND
-//
-// MessageText:
-//
-// Object Name not found.
-//
-
- STATUS_OBJECT_NAME_NOT_FOUND = NTSTATUS($C0000034);
- {$EXTERNALSYM STATUS_OBJECT_NAME_NOT_FOUND}
-
-//
-// MessageId: STATUS_OBJECT_NAME_COLLISION
-//
-// MessageText:
-//
-// Object Name already exists.
-//
-
- STATUS_OBJECT_NAME_COLLISION = NTSTATUS($C0000035);
- {$EXTERNALSYM STATUS_OBJECT_NAME_COLLISION}
-
-//
-// MessageId: STATUS_PORT_DISCONNECTED
-//
-// MessageText:
-//
-// Attempt to send a message to a disconnected communication port.
-//
-
- STATUS_PORT_DISCONNECTED = NTSTATUS($C0000037);
- {$EXTERNALSYM STATUS_PORT_DISCONNECTED}
-
-//
-// MessageId: STATUS_DEVICE_ALREADY_ATTACHED
-//
-// MessageText:
-//
-// An attempt was made to attach to a device that was already attached to another device.
-//
-
- STATUS_DEVICE_ALREADY_ATTACHED = NTSTATUS($C0000038);
- {$EXTERNALSYM STATUS_DEVICE_ALREADY_ATTACHED}
-
-//
-// MessageId: STATUS_OBJECT_PATH_INVALID
-//
-// MessageText:
-//
-// Object Path Component was not a directory object.
-//
-
- STATUS_OBJECT_PATH_INVALID = NTSTATUS($C0000039);
- {$EXTERNALSYM STATUS_OBJECT_PATH_INVALID}
-
-//
-// MessageId: STATUS_OBJECT_PATH_NOT_FOUND
-//
-// MessageText:
-//
-// {Path Not Found}
-// The path %hs does not exist.
-//
-
- STATUS_OBJECT_PATH_NOT_FOUND = NTSTATUS($C000003A);
- {$EXTERNALSYM STATUS_OBJECT_PATH_NOT_FOUND}
-
-//
-// MessageId: STATUS_OBJECT_PATH_SYNTAX_BAD
-//
-// MessageText:
-//
-// Object Path Component was not a directory object.
-//
-
- STATUS_OBJECT_PATH_SYNTAX_BAD = NTSTATUS($C000003B);
- {$EXTERNALSYM STATUS_OBJECT_PATH_SYNTAX_BAD}
-
-//
-// MessageId: STATUS_DATA_OVERRUN
-//
-// MessageText:
-//
-// {Data Overrun}
-// A data overrun error occurred.
-//
-
- STATUS_DATA_OVERRUN = NTSTATUS($C000003C);
- {$EXTERNALSYM STATUS_DATA_OVERRUN}
-
-//
-// MessageId: STATUS_DATA_LATE_ERROR
-//
-// MessageText:
-//
-// {Data Late}
-// A data late error occurred.
-//
-
- STATUS_DATA_LATE_ERROR = NTSTATUS($C000003D);
- {$EXTERNALSYM STATUS_DATA_LATE_ERROR}
-
-//
-// MessageId: STATUS_DATA_ERROR
-//
-// MessageText:
-//
-// {Data Error}
-// An error in reading or writing data occurred.
-//
-
- STATUS_DATA_ERROR = NTSTATUS($C000003E);
- {$EXTERNALSYM STATUS_DATA_ERROR}
-
-//
-// MessageId: STATUS_CRC_ERROR
-//
-// MessageText:
-//
-// {Bad CRC}
-// A cyclic redundancy check (CRC) checksum error occurred.
-//
-
- STATUS_CRC_ERROR = NTSTATUS($C000003F);
- {$EXTERNALSYM STATUS_CRC_ERROR}
-
-//
-// MessageId: STATUS_SECTION_TOO_BIG
-//
-// MessageText:
-//
-// {Section Too Large}
-// The specified section is too big to map the file.
-//
-
- STATUS_SECTION_TOO_BIG = NTSTATUS($C0000040);
- {$EXTERNALSYM STATUS_SECTION_TOO_BIG}
-
-//
-// MessageId: STATUS_PORT_CONNECTION_REFUSED
-//
-// MessageText:
-//
-// The NtConnectPort request is refused.
-//
-
- STATUS_PORT_CONNECTION_REFUSED = NTSTATUS($C0000041);
- {$EXTERNALSYM STATUS_PORT_CONNECTION_REFUSED}
-
-//
-// MessageId: STATUS_INVALID_PORT_HANDLE
-//
-// MessageText:
-//
-// The type of port handle is invalid for the operation requested.
-//
-
- STATUS_INVALID_PORT_HANDLE = NTSTATUS($C0000042);
- {$EXTERNALSYM STATUS_INVALID_PORT_HANDLE}
-
-//
-// MessageId: STATUS_SHARING_VIOLATION
-//
-// MessageText:
-//
-// A file cannot be opened because the share access flags are incompatible.
-//
-
- STATUS_SHARING_VIOLATION = NTSTATUS($C0000043);
- {$EXTERNALSYM STATUS_SHARING_VIOLATION}
-
-//
-// MessageId: STATUS_QUOTA_EXCEEDED
-//
-// MessageText:
-//
-// Insufficient quota exists to complete the operation
-//
-
- STATUS_QUOTA_EXCEEDED = NTSTATUS($C0000044);
- {$EXTERNALSYM STATUS_QUOTA_EXCEEDED}
-
-//
-// MessageId: STATUS_INVALID_PAGE_PROTECTION
-//
-// MessageText:
-//
-// The specified page protection was not valid.
-//
-
- STATUS_INVALID_PAGE_PROTECTION = NTSTATUS($C0000045);
- {$EXTERNALSYM STATUS_INVALID_PAGE_PROTECTION}
-
-//
-// MessageId: STATUS_MUTANT_NOT_OWNED
-//
-// MessageText:
-//
-// An attempt to release a mutant object was made by a thread that was not the owner of the mutant object.
-//
-
- STATUS_MUTANT_NOT_OWNED = NTSTATUS($C0000046);
- {$EXTERNALSYM STATUS_MUTANT_NOT_OWNED}
-
-//
-// MessageId: STATUS_SEMAPHORE_LIMIT_EXCEEDED
-//
-// MessageText:
-//
-// An attempt was made to release a semaphore such that its maximum count would have been exceeded.
-//
-
- STATUS_SEMAPHORE_LIMIT_EXCEEDED = NTSTATUS($C0000047);
- {$EXTERNALSYM STATUS_SEMAPHORE_LIMIT_EXCEEDED}
-
-//
-// MessageId: STATUS_PORT_ALREADY_SET
-//
-// MessageText:
-//
-// An attempt to set a processes DebugPort or ExceptionPort was made, but a port already exists in the process.
-//
-
- STATUS_PORT_ALREADY_SET = NTSTATUS($C0000048);
- {$EXTERNALSYM STATUS_PORT_ALREADY_SET}
-
-//
-// MessageId: STATUS_SECTION_NOT_IMAGE
-//
-// MessageText:
-//
-// An attempt was made to query image information on a section which does not map an image.
-//
-
- STATUS_SECTION_NOT_IMAGE = NTSTATUS($C0000049);
- {$EXTERNALSYM STATUS_SECTION_NOT_IMAGE}
-
-//
-// MessageId: STATUS_SUSPEND_COUNT_EXCEEDED
-//
-// MessageText:
-//
-// An attempt was made to suspend a thread whose suspend count was at its maximum.
-//
-
- STATUS_SUSPEND_COUNT_EXCEEDED = NTSTATUS($C000004A);
- {$EXTERNALSYM STATUS_SUSPEND_COUNT_EXCEEDED}
-
-//
-// MessageId: STATUS_THREAD_IS_TERMINATING
-//
-// MessageText:
-//
-// An attempt was made to suspend a thread that has begun termination.
-//
-
- STATUS_THREAD_IS_TERMINATING = NTSTATUS($C000004B);
- {$EXTERNALSYM STATUS_THREAD_IS_TERMINATING}
-
-//
-// MessageId: STATUS_BAD_WORKING_SET_LIMIT
-//
-// MessageText:
-//
-// An attempt was made to set the working set limit to an invalid value (minimum greater than maximum, etc).
-//
-
- STATUS_BAD_WORKING_SET_LIMIT = NTSTATUS($C000004C);
- {$EXTERNALSYM STATUS_BAD_WORKING_SET_LIMIT}
-
-//
-// MessageId: STATUS_INCOMPATIBLE_FILE_MAP
-//
-// MessageText:
-//
-// A section was created to map a file which is not compatible to an already existing section which maps the same file.
-//
-
- STATUS_INCOMPATIBLE_FILE_MAP = NTSTATUS($C000004D);
- {$EXTERNALSYM STATUS_INCOMPATIBLE_FILE_MAP}
-
-//
-// MessageId: STATUS_SECTION_PROTECTION
-//
-// MessageText:
-//
-// A view to a section specifies a protection which is incompatible with the initial view's protection.
-//
-
- STATUS_SECTION_PROTECTION = NTSTATUS($C000004E);
- {$EXTERNALSYM STATUS_SECTION_PROTECTION}
-
-//
-// MessageId: STATUS_EAS_NOT_SUPPORTED
-//
-// MessageText:
-//
-// An operation involving EAs failed because the file system does not support EAs.
-//
-
- STATUS_EAS_NOT_SUPPORTED = NTSTATUS($C000004F);
- {$EXTERNALSYM STATUS_EAS_NOT_SUPPORTED}
-
-//
-// MessageId: STATUS_EA_TOO_LARGE
-//
-// MessageText:
-//
-// An EA operation failed because EA set is too large.
-//
-
- STATUS_EA_TOO_LARGE = NTSTATUS($C0000050);
- {$EXTERNALSYM STATUS_EA_TOO_LARGE}
-
-//
-// MessageId: STATUS_NONEXISTENT_EA_ENTRY
-//
-// MessageText:
-//
-// An EA operation failed because the name or EA index is invalid.
-//
-
- STATUS_NONEXISTENT_EA_ENTRY = NTSTATUS($C0000051);
- {$EXTERNALSYM STATUS_NONEXISTENT_EA_ENTRY}
-
-//
-// MessageId: STATUS_NO_EAS_ON_FILE
-//
-// MessageText:
-//
-// The file for which EAs were requested has no EAs.
-//
-
- STATUS_NO_EAS_ON_FILE = NTSTATUS($C0000052);
- {$EXTERNALSYM STATUS_NO_EAS_ON_FILE}
-
-//
-// MessageId: STATUS_EA_CORRUPT_ERROR
-//
-// MessageText:
-//
-// The EA is corrupt and non-readable.
-//
-
- STATUS_EA_CORRUPT_ERROR = NTSTATUS($C0000053);
- {$EXTERNALSYM STATUS_EA_CORRUPT_ERROR}
-
-//
-// MessageId: STATUS_FILE_LOCK_CONFLICT
-//
-// MessageText:
-//
-// A requested read/write cannot be granted due to a conflicting file lock.
-//
-
- STATUS_FILE_LOCK_CONFLICT = NTSTATUS($C0000054);
- {$EXTERNALSYM STATUS_FILE_LOCK_CONFLICT}
-
-//
-// MessageId: STATUS_LOCK_NOT_GRANTED
-//
-// MessageText:
-//
-// A requested file lock cannot be granted due to other existing locks.
-//
-
- STATUS_LOCK_NOT_GRANTED = NTSTATUS($C0000055);
- {$EXTERNALSYM STATUS_LOCK_NOT_GRANTED}
-
-//
-// MessageId: STATUS_DELETE_PENDING
-//
-// MessageText:
-//
-// A non close operation has been requested of a file object with a delete pending.
-//
-
- STATUS_DELETE_PENDING = NTSTATUS($C0000056);
- {$EXTERNALSYM STATUS_DELETE_PENDING}
-
-//
-// MessageId: STATUS_CTL_FILE_NOT_SUPPORTED
-//
-// MessageText:
-//
-// An attempt was made to set the control attribute on a file. This attribute is not supported in the target file system.
-//
-
- STATUS_CTL_FILE_NOT_SUPPORTED = NTSTATUS($C0000057);
- {$EXTERNALSYM STATUS_CTL_FILE_NOT_SUPPORTED}
-
-//
-// MessageId: STATUS_UNKNOWN_REVISION
-//
-// MessageText:
-//
-// Indicates a revision number encountered or specified is not one known by the service. It may be a more recent revision than the service is aware of.
-//
-
- STATUS_UNKNOWN_REVISION = NTSTATUS($C0000058);
- {$EXTERNALSYM STATUS_UNKNOWN_REVISION}
-
-//
-// MessageId: STATUS_REVISION_MISMATCH
-//
-// MessageText:
-//
-// Indicates two revision levels are incompatible.
-//
-
- STATUS_REVISION_MISMATCH = NTSTATUS($C0000059);
- {$EXTERNALSYM STATUS_REVISION_MISMATCH}
-
-//
-// MessageId: STATUS_INVALID_OWNER
-//
-// MessageText:
-//
-// Indicates a particular Security ID may not be assigned as the owner of an object.
-//
-
- STATUS_INVALID_OWNER = NTSTATUS($C000005A);
- {$EXTERNALSYM STATUS_INVALID_OWNER}
-
-//
-// MessageId: STATUS_INVALID_PRIMARY_GROUP
-//
-// MessageText:
-//
-// Indicates a particular Security ID may not be assigned as the primary group of an object.
-//
-
- STATUS_INVALID_PRIMARY_GROUP = NTSTATUS($C000005B);
- {$EXTERNALSYM STATUS_INVALID_PRIMARY_GROUP}
-
-//
-// MessageId: STATUS_NO_IMPERSONATION_TOKEN
-//
-// MessageText:
-//
-// An attempt has been made to operate on an impersonation token by a thread that is not currently impersonating a client.
-//
-
- STATUS_NO_IMPERSONATION_TOKEN = NTSTATUS($C000005C);
- {$EXTERNALSYM STATUS_NO_IMPERSONATION_TOKEN}
-
-//
-// MessageId: STATUS_CANT_DISABLE_MANDATORY
-//
-// MessageText:
-//
-// A mandatory group may not be disabled.
-//
-
- STATUS_CANT_DISABLE_MANDATORY = NTSTATUS($C000005D);
- {$EXTERNALSYM STATUS_CANT_DISABLE_MANDATORY}
-
-//
-// MessageId: STATUS_NO_LOGON_SERVERS
-//
-// MessageText:
-//
-// There are currently no logon servers available to service the logon request.
-//
-
- STATUS_NO_LOGON_SERVERS = NTSTATUS($C000005E);
- {$EXTERNALSYM STATUS_NO_LOGON_SERVERS}
-
-//
-// MessageId: STATUS_NO_SUCH_LOGON_SESSION
-//
-// MessageText:
-//
-// A specified logon session does not exist. It may already have been terminated.
-//
-
- STATUS_NO_SUCH_LOGON_SESSION = NTSTATUS($C000005F);
- {$EXTERNALSYM STATUS_NO_SUCH_LOGON_SESSION}
-
-//
-// MessageId: STATUS_NO_SUCH_PRIVILEGE
-//
-// MessageText:
-//
-// A specified privilege does not exist.
-//
-
- STATUS_NO_SUCH_PRIVILEGE = NTSTATUS($C0000060);
- {$EXTERNALSYM STATUS_NO_SUCH_PRIVILEGE}
-
-//
-// MessageId: STATUS_PRIVILEGE_NOT_HELD
-//
-// MessageText:
-//
-// A required privilege is not held by the client.
-//
-
- STATUS_PRIVILEGE_NOT_HELD = NTSTATUS($C0000061);
- {$EXTERNALSYM STATUS_PRIVILEGE_NOT_HELD}
-
-//
-// MessageId: STATUS_INVALID_ACCOUNT_NAME
-//
-// MessageText:
-//
-// The name provided is not a properly formed account name.
-//
-
- STATUS_INVALID_ACCOUNT_NAME = NTSTATUS($C0000062);
- {$EXTERNALSYM STATUS_INVALID_ACCOUNT_NAME}
-
-//
-// MessageId: STATUS_USER_EXISTS
-//
-// MessageText:
-//
-// The specified user already exists.
-//
-
- STATUS_USER_EXISTS = NTSTATUS($C0000063);
- {$EXTERNALSYM STATUS_USER_EXISTS}
-
-//
-// MessageId: STATUS_NO_SUCH_USER
-//
-// MessageText:
-//
-// The specified user does not exist.
-//
-
- STATUS_NO_SUCH_USER = NTSTATUS($C0000064); // ntsubauth
- {$EXTERNALSYM STATUS_NO_SUCH_USER}
-
-//
-// MessageId: STATUS_GROUP_EXISTS
-//
-// MessageText:
-//
-// The specified group already exists.
-//
-
- STATUS_GROUP_EXISTS = NTSTATUS($C0000065);
- {$EXTERNALSYM STATUS_GROUP_EXISTS}
-
-//
-// MessageId: STATUS_NO_SUCH_GROUP
-//
-// MessageText:
-//
-// The specified group does not exist.
-//
-
- STATUS_NO_SUCH_GROUP = NTSTATUS($C0000066);
- {$EXTERNALSYM STATUS_NO_SUCH_GROUP}
-
-//
-// MessageId: STATUS_MEMBER_IN_GROUP
-//
-// MessageText:
-//
-// The specified user account is already in the specified group account.
-// Also used to indicate a group cannot be deleted because it contains a member.
-//
-
- STATUS_MEMBER_IN_GROUP = NTSTATUS($C0000067);
- {$EXTERNALSYM STATUS_MEMBER_IN_GROUP}
-
-//
-// MessageId: STATUS_MEMBER_NOT_IN_GROUP
-//
-// MessageText:
-//
-// The specified user account is not a member of the specified group account.
-//
-
- STATUS_MEMBER_NOT_IN_GROUP = NTSTATUS($C0000068);
- {$EXTERNALSYM STATUS_MEMBER_NOT_IN_GROUP}
-
-//
-// MessageId: STATUS_LAST_ADMIN
-//
-// MessageText:
-//
-// Indicates the requested operation would disable or delete the last remaining administration account.
-// This is not allowed to prevent creating a situation in which the system cannot be administrated.
-//
-
- STATUS_LAST_ADMIN = NTSTATUS($C0000069);
- {$EXTERNALSYM STATUS_LAST_ADMIN}
-
-//
-// MessageId: STATUS_WRONG_PASSWORD
-//
-// MessageText:
-//
-// When trying to update a password, this return status indicates that the value provided as the current password is not correct.
-//
-
- STATUS_WRONG_PASSWORD = NTSTATUS($C000006A); // ntsubauth
- {$EXTERNALSYM STATUS_WRONG_PASSWORD}
-
-//
-// MessageId: STATUS_ILL_FORMED_PASSWORD
-//
-// MessageText:
-//
-// When trying to update a password, this return status indicates that the value provided for the new password contains values that are not allowed in passwords.
-//
-
- STATUS_ILL_FORMED_PASSWORD = NTSTATUS($C000006B);
- {$EXTERNALSYM STATUS_ILL_FORMED_PASSWORD}
-
-//
-// MessageId: STATUS_PASSWORD_RESTRICTION
-//
-// MessageText:
-//
-// When trying to update a password, this status indicates that some password update rule has been violated. For example, the password may not meet length criteria.
-//
-
- STATUS_PASSWORD_RESTRICTION = NTSTATUS($C000006C); // ntsubauth
- {$EXTERNALSYM STATUS_PASSWORD_RESTRICTION}
-
-//
-// MessageId: STATUS_LOGON_FAILURE
-//
-// MessageText:
-//
-// The attempted logon is invalid. This is either due to a bad username or authentication information.
-//
-
- STATUS_LOGON_FAILURE = NTSTATUS($C000006D); // ntsubauth
- {$EXTERNALSYM STATUS_LOGON_FAILURE}
-
-//
-// MessageId: STATUS_ACCOUNT_RESTRICTION
-//
-// MessageText:
-//
-// Indicates a referenced user name and authentication information are valid, but some user account restriction has prevented successful authentication (such as time-of-day restrictions).
-//
-
- STATUS_ACCOUNT_RESTRICTION = NTSTATUS($C000006E); // ntsubauth
- {$EXTERNALSYM STATUS_ACCOUNT_RESTRICTION}
-
-//
-// MessageId: STATUS_INVALID_LOGON_HOURS
-//
-// MessageText:
-//
-// The user account has time restrictions and may not be logged onto at this time.
-//
-
- STATUS_INVALID_LOGON_HOURS = NTSTATUS($C000006F); // ntsubauth
- {$EXTERNALSYM STATUS_INVALID_LOGON_HOURS}
-
-//
-// MessageId: STATUS_INVALID_WORKSTATION
-//
-// MessageText:
-//
-// The user account is restricted such that it may not be used to log on from the source workstation.
-//
-
- STATUS_INVALID_WORKSTATION = NTSTATUS($C0000070); // ntsubauth
- {$EXTERNALSYM STATUS_INVALID_WORKSTATION}
-
-//
-// MessageId: STATUS_PASSWORD_EXPIRED
-//
-// MessageText:
-//
-// The user account's password has expired.
-//
-
- STATUS_PASSWORD_EXPIRED = NTSTATUS($C0000071); // ntsubauth
- {$EXTERNALSYM STATUS_PASSWORD_EXPIRED}
-
-//
-// MessageId: STATUS_ACCOUNT_DISABLED
-//
-// MessageText:
-//
-// The referenced account is currently disabled and may not be logged on to.
-//
-
- STATUS_ACCOUNT_DISABLED = NTSTATUS($C0000072); // ntsubauth
- {$EXTERNALSYM STATUS_ACCOUNT_DISABLED}
-
-//
-// MessageId: STATUS_NONE_MAPPED
-//
-// MessageText:
-//
-// None of the information to be translated has been translated.
-//
-
- STATUS_NONE_MAPPED = NTSTATUS($C0000073);
- {$EXTERNALSYM STATUS_NONE_MAPPED}
-
-//
-// MessageId: STATUS_TOO_MANY_LUIDS_REQUESTED
-//
-// MessageText:
-//
-// The number of LUIDs requested may not be allocated with a single allocation.
-//
-
- STATUS_TOO_MANY_LUIDS_REQUESTED = NTSTATUS($C0000074);
- {$EXTERNALSYM STATUS_TOO_MANY_LUIDS_REQUESTED}
-
-//
-// MessageId: STATUS_LUIDS_EXHAUSTED
-//
-// MessageText:
-//
-// Indicates there are no more LUIDs to allocate.
-//
-
- STATUS_LUIDS_EXHAUSTED = NTSTATUS($C0000075);
- {$EXTERNALSYM STATUS_LUIDS_EXHAUSTED}
-
-//
-// MessageId: STATUS_INVALID_SUB_AUTHORITY
-//
-// MessageText:
-//
-// Indicates the sub-authority value is invalid for the particular use.
-//
-
- STATUS_INVALID_SUB_AUTHORITY = NTSTATUS($C0000076);
- {$EXTERNALSYM STATUS_INVALID_SUB_AUTHORITY}
-
-//
-// MessageId: STATUS_INVALID_ACL
-//
-// MessageText:
-//
-// Indicates the ACL structure is not valid.
-//
-
- STATUS_INVALID_ACL = NTSTATUS($C0000077);
- {$EXTERNALSYM STATUS_INVALID_ACL}
-
-//
-// MessageId: STATUS_INVALID_SID
-//
-// MessageText:
-//
-// Indicates the SID structure is not valid.
-//
-
- STATUS_INVALID_SID = NTSTATUS($C0000078);
- {$EXTERNALSYM STATUS_INVALID_SID}
-
-//
-// MessageId: STATUS_INVALID_SECURITY_DESCR
-//
-// MessageText:
-//
-// Indicates the SECURITY_DESCRIPTOR structure is not valid.
-//
-
- STATUS_INVALID_SECURITY_DESCR = NTSTATUS($C0000079);
- {$EXTERNALSYM STATUS_INVALID_SECURITY_DESCR}
-
-//
-// MessageId: STATUS_PROCEDURE_NOT_FOUND
-//
-// MessageText:
-//
-// Indicates the specified procedure address cannot be found in the DLL.
-//
-
- STATUS_PROCEDURE_NOT_FOUND = NTSTATUS($C000007A);
- {$EXTERNALSYM STATUS_PROCEDURE_NOT_FOUND}
-
-//
-// MessageId: STATUS_INVALID_IMAGE_FORMAT
-//
-// MessageText:
-//
-// {Bad Image}
-// The application or DLL %hs is not a valid Windows image. Please check this against your installation diskette.
-//
-
- STATUS_INVALID_IMAGE_FORMAT = NTSTATUS($C000007B);
- {$EXTERNALSYM STATUS_INVALID_IMAGE_FORMAT}
-
-//
-// MessageId: STATUS_NO_TOKEN
-//
-// MessageText:
-//
-// An attempt was made to reference a token that doesn't exist.
-// This is typically done by referencing the token associated with a thread when the thread is not impersonating a client.
-//
-
- STATUS_NO_TOKEN = NTSTATUS($C000007C);
- {$EXTERNALSYM STATUS_NO_TOKEN}
-
-//
-// MessageId: STATUS_BAD_INHERITANCE_ACL
-//
-// MessageText:
-//
-// Indicates that an attempt to build either an inherited ACL or ACE was not successful.
-// This can be caused by a number of things. One of the more probable causes is the replacement of a CreatorId with an SID that didn't fit into the ACE or ACL.
-//
-
- STATUS_BAD_INHERITANCE_ACL = NTSTATUS($C000007D);
- {$EXTERNALSYM STATUS_BAD_INHERITANCE_ACL}
-
-//
-// MessageId: STATUS_RANGE_NOT_LOCKED
-//
-// MessageText:
-//
-// The range specified in NtUnlockFile was not locked.
-//
-
- STATUS_RANGE_NOT_LOCKED = NTSTATUS($C000007E);
- {$EXTERNALSYM STATUS_RANGE_NOT_LOCKED}
-
-//
-// MessageId: STATUS_DISK_FULL
-//
-// MessageText:
-//
-// An operation failed because the disk was full.
-//
-
- STATUS_DISK_FULL = NTSTATUS($C000007F);
- {$EXTERNALSYM STATUS_DISK_FULL}
-
-//
-// MessageId: STATUS_SERVER_DISABLED
-//
-// MessageText:
-//
-// The GUID allocation server is [already] disabled at the moment.
-//
-
- STATUS_SERVER_DISABLED = NTSTATUS($C0000080);
- {$EXTERNALSYM STATUS_SERVER_DISABLED}
-
-//
-// MessageId: STATUS_SERVER_NOT_DISABLED
-//
-// MessageText:
-//
-// The GUID allocation server is [already] enabled at the moment.
-//
-
- STATUS_SERVER_NOT_DISABLED = NTSTATUS($C0000081);
- {$EXTERNALSYM STATUS_SERVER_NOT_DISABLED}
-
-//
-// MessageId: STATUS_TOO_MANY_GUIDS_REQUESTED
-//
-// MessageText:
-//
-// Too many GUIDs were requested from the allocation server at once.
-//
-
- STATUS_TOO_MANY_GUIDS_REQUESTED = NTSTATUS($C0000082);
- {$EXTERNALSYM STATUS_TOO_MANY_GUIDS_REQUESTED}
-
-//
-// MessageId: STATUS_GUIDS_EXHAUSTED
-//
-// MessageText:
-//
-// The GUIDs could not be allocated because the Authority Agent was exhausted.
-//
-
- STATUS_GUIDS_EXHAUSTED = NTSTATUS($C0000083);
- {$EXTERNALSYM STATUS_GUIDS_EXHAUSTED}
-
-//
-// MessageId: STATUS_INVALID_ID_AUTHORITY
-//
-// MessageText:
-//
-// The value provided was an invalid value for an identifier authority.
-//
-
- STATUS_INVALID_ID_AUTHORITY = NTSTATUS($C0000084);
- {$EXTERNALSYM STATUS_INVALID_ID_AUTHORITY}
-
-//
-// MessageId: STATUS_AGENTS_EXHAUSTED
-//
-// MessageText:
-//
-// There are no more authority agent values available for the given identifier authority value.
-//
-
- STATUS_AGENTS_EXHAUSTED = NTSTATUS($C0000085);
- {$EXTERNALSYM STATUS_AGENTS_EXHAUSTED}
-
-//
-// MessageId: STATUS_INVALID_VOLUME_LABEL
-//
-// MessageText:
-//
-// An invalid volume label has been specified.
-//
-
- STATUS_INVALID_VOLUME_LABEL = NTSTATUS($C0000086);
- {$EXTERNALSYM STATUS_INVALID_VOLUME_LABEL}
-
-//
-// MessageId: STATUS_SECTION_NOT_EXTENDED
-//
-// MessageText:
-//
-// A mapped section could not be extended.
-//
-
- STATUS_SECTION_NOT_EXTENDED = NTSTATUS($C0000087);
- {$EXTERNALSYM STATUS_SECTION_NOT_EXTENDED}
-
-//
-// MessageId: STATUS_NOT_MAPPED_DATA
-//
-// MessageText:
-//
-// Specified section to flush does not map a data file.
-//
-
- STATUS_NOT_MAPPED_DATA = NTSTATUS($C0000088);
- {$EXTERNALSYM STATUS_NOT_MAPPED_DATA}
-
-//
-// MessageId: STATUS_RESOURCE_DATA_NOT_FOUND
-//
-// MessageText:
-//
-// Indicates the specified image file did not contain a resource section.
-//
-
- STATUS_RESOURCE_DATA_NOT_FOUND = NTSTATUS($C0000089);
- {$EXTERNALSYM STATUS_RESOURCE_DATA_NOT_FOUND}
-
-//
-// MessageId: STATUS_RESOURCE_TYPE_NOT_FOUND
-//
-// MessageText:
-//
-// Indicates the specified resource type cannot be found in the image file.
-//
-
- STATUS_RESOURCE_TYPE_NOT_FOUND = NTSTATUS($C000008A);
- {$EXTERNALSYM STATUS_RESOURCE_TYPE_NOT_FOUND}
-
-//
-// MessageId: STATUS_RESOURCE_NAME_NOT_FOUND
-//
-// MessageText:
-//
-// Indicates the specified resource name cannot be found in the image file.
-//
-
- STATUS_RESOURCE_NAME_NOT_FOUND = NTSTATUS($C000008B);
- {$EXTERNALSYM STATUS_RESOURCE_NAME_NOT_FOUND}
-
-//
-// MessageId: STATUS_ARRAY_BOUNDS_EXCEEDED
-//
-// MessageText:
-//
-// {EXCEPTION}
-// Array bounds exceeded.
-//
-
- STATUS_ARRAY_BOUNDS_EXCEEDED = NTSTATUS($C000008C); // winnt
- {$EXTERNALSYM STATUS_ARRAY_BOUNDS_EXCEEDED}
-
-//
-// MessageId: STATUS_FLOAT_DENORMAL_OPERAND
-//
-// MessageText:
-//
-// {EXCEPTION}
-// Floating-point denormal operand.
-//
-
- STATUS_FLOAT_DENORMAL_OPERAND = NTSTATUS($C000008D); // winnt
- {$EXTERNALSYM STATUS_FLOAT_DENORMAL_OPERAND}
-
-//
-// MessageId: STATUS_FLOAT_DIVIDE_BY_ZERO
-//
-// MessageText:
-//
-// {EXCEPTION}
-// Floating-point division by zero.
-//
-
- STATUS_FLOAT_DIVIDE_BY_ZERO = NTSTATUS($C000008E); // winnt
- {$EXTERNALSYM STATUS_FLOAT_DIVIDE_BY_ZERO}
-
-//
-// MessageId: STATUS_FLOAT_INEXACT_RESULT
-//
-// MessageText:
-//
-// {EXCEPTION}
-// Floating-point inexact result.
-//
-
- STATUS_FLOAT_INEXACT_RESULT = NTSTATUS($C000008F); // winnt
- {$EXTERNALSYM STATUS_FLOAT_INEXACT_RESULT}
-
-//
-// MessageId: STATUS_FLOAT_INVALID_OPERATION
-//
-// MessageText:
-//
-// {EXCEPTION}
-// Floating-point invalid operation.
-//
-
- STATUS_FLOAT_INVALID_OPERATION = NTSTATUS($C0000090); // winnt
- {$EXTERNALSYM STATUS_FLOAT_INVALID_OPERATION}
-
-//
-// MessageId: STATUS_FLOAT_OVERFLOW
-//
-// MessageText:
-//
-// {EXCEPTION}
-// Floating-point overflow.
-//
-
- STATUS_FLOAT_OVERFLOW = NTSTATUS($C0000091); // winnt
- {$EXTERNALSYM STATUS_FLOAT_OVERFLOW}
-
-//
-// MessageId: STATUS_FLOAT_STACK_CHECK
-//
-// MessageText:
-//
-// {EXCEPTION}
-// Floating-point stack check.
-//
-
- STATUS_FLOAT_STACK_CHECK = NTSTATUS($C0000092); // winnt
- {$EXTERNALSYM STATUS_FLOAT_STACK_CHECK}
-
-//
-// MessageId: STATUS_FLOAT_UNDERFLOW
-//
-// MessageText:
-//
-// {EXCEPTION}
-// Floating-point underflow.
-//
-
- STATUS_FLOAT_UNDERFLOW = NTSTATUS($C0000093); // winnt
- {$EXTERNALSYM STATUS_FLOAT_UNDERFLOW}
-
-//
-// MessageId: STATUS_INTEGER_DIVIDE_BY_ZERO
-//
-// MessageText:
-//
-// {EXCEPTION}
-// Integer division by zero.
-//
-
- STATUS_INTEGER_DIVIDE_BY_ZERO = NTSTATUS($C0000094); // winnt
- {$EXTERNALSYM STATUS_INTEGER_DIVIDE_BY_ZERO}
-
-//
-// MessageId: STATUS_INTEGER_OVERFLOW
-//
-// MessageText:
-//
-// {EXCEPTION}
-// Integer overflow.
-//
-
- STATUS_INTEGER_OVERFLOW = NTSTATUS($C0000095); // winnt
- {$EXTERNALSYM STATUS_INTEGER_OVERFLOW}
-
-//
-// MessageId: STATUS_PRIVILEGED_INSTRUCTION
-//
-// MessageText:
-//
-// {EXCEPTION}
-// Privileged instruction.
-//
-
- STATUS_PRIVILEGED_INSTRUCTION = NTSTATUS($C0000096); // winnt
- {$EXTERNALSYM STATUS_PRIVILEGED_INSTRUCTION}
-
-//
-// MessageId: STATUS_TOO_MANY_PAGING_FILES
-//
-// MessageText:
-//
-// An attempt was made to install more paging files than the system supports.
-//
-
- STATUS_TOO_MANY_PAGING_FILES = NTSTATUS($C0000097);
- {$EXTERNALSYM STATUS_TOO_MANY_PAGING_FILES}
-
-//
-// MessageId: STATUS_FILE_INVALID
-//
-// MessageText:
-//
-// The volume for a file has been externally altered such that the opened file is no longer valid.
-//
-
- STATUS_FILE_INVALID = NTSTATUS($C0000098);
- {$EXTERNALSYM STATUS_FILE_INVALID}
-
-//
-// MessageId: STATUS_ALLOTTED_SPACE_EXCEEDED
-//
-// MessageText:
-//
-// When a block of memory is allotted for future updates, such as the memory
-// allocated to hold discretionary access control and primary group information, successive updates may exceed the amount of memory originally allotted.
-// Since quota may already have been charged to several processes which have handles to the object, it is not reasonable to alter the size of the allocated memory.
-// Instead, a request that requires more memory than has been allotted must fail and the STATUS_ALLOTED_SPACE_EXCEEDED error returned.
-//
-
- STATUS_ALLOTTED_SPACE_EXCEEDED = NTSTATUS($C0000099);
- {$EXTERNALSYM STATUS_ALLOTTED_SPACE_EXCEEDED}
-
-//
-// MessageId: STATUS_INSUFFICIENT_RESOURCES
-//
-// MessageText:
-//
-// Insufficient system resources exist to complete the API.
-//
-
- STATUS_INSUFFICIENT_RESOURCES = NTSTATUS($C000009A); // ntsubauth
- {$EXTERNALSYM STATUS_INSUFFICIENT_RESOURCES}
-
-//
-// MessageId: STATUS_DFS_EXIT_PATH_FOUND
-//
-// MessageText:
-//
-// An attempt has been made to open a DFS exit path control file.
-//
-
- STATUS_DFS_EXIT_PATH_FOUND = NTSTATUS($C000009B);
- {$EXTERNALSYM STATUS_DFS_EXIT_PATH_FOUND}
-
-//
-// MessageId: STATUS_DEVICE_DATA_ERROR
-//
-// MessageText:
-//
-// STATUS_DEVICE_DATA_ERROR
-//
-
- STATUS_DEVICE_DATA_ERROR = NTSTATUS($C000009C);
- {$EXTERNALSYM STATUS_DEVICE_DATA_ERROR}
-
-//
-// MessageId: STATUS_DEVICE_NOT_CONNECTED
-//
-// MessageText:
-//
-// STATUS_DEVICE_NOT_CONNECTED
-//
-
- STATUS_DEVICE_NOT_CONNECTED = NTSTATUS($C000009D);
- {$EXTERNALSYM STATUS_DEVICE_NOT_CONNECTED}
-
-//
-// MessageId: STATUS_DEVICE_POWER_FAILURE
-//
-// MessageText:
-//
-// STATUS_DEVICE_POWER_FAILURE
-//
-
- STATUS_DEVICE_POWER_FAILURE = NTSTATUS($C000009E);
- {$EXTERNALSYM STATUS_DEVICE_POWER_FAILURE}
-
-//
-// MessageId: STATUS_FREE_VM_NOT_AT_BASE
-//
-// MessageText:
-//
-// Virtual memory cannot be freed as base address is not the base of the region and a region size of zero was specified.
-//
-
- STATUS_FREE_VM_NOT_AT_BASE = NTSTATUS($C000009F);
- {$EXTERNALSYM STATUS_FREE_VM_NOT_AT_BASE}
-
-//
-// MessageId: STATUS_MEMORY_NOT_ALLOCATED
-//
-// MessageText:
-//
-// An attempt was made to free virtual memory which is not allocated.
-//
-
- STATUS_MEMORY_NOT_ALLOCATED = NTSTATUS($C00000A0);
- {$EXTERNALSYM STATUS_MEMORY_NOT_ALLOCATED}
-
-//
-// MessageId: STATUS_WORKING_SET_QUOTA
-//
-// MessageText:
-//
-// The working set is not big enough to allow the requested pages to be locked.
-//
-
- STATUS_WORKING_SET_QUOTA = NTSTATUS($C00000A1);
- {$EXTERNALSYM STATUS_WORKING_SET_QUOTA}
-
-//
-// MessageId: STATUS_MEDIA_WRITE_PROTECTED
-//
-// MessageText:
-//
-// {Write Protect Error}
-// The disk cannot be written to because it is write protected.
-// Please remove the write protection from the volume %hs in drive %hs.
-//
-
- STATUS_MEDIA_WRITE_PROTECTED = NTSTATUS($C00000A2);
- {$EXTERNALSYM STATUS_MEDIA_WRITE_PROTECTED}
-
-//
-// MessageId: STATUS_DEVICE_NOT_READY
-//
-// MessageText:
-//
-// {Drive Not Ready}
-// The drive is not ready for use; its door may be open.
-// Please check drive %hs and make sure that a disk is inserted and that the drive door is closed.
-//
-
- STATUS_DEVICE_NOT_READY = NTSTATUS($C00000A3);
- {$EXTERNALSYM STATUS_DEVICE_NOT_READY}
-
-//
-// MessageId: STATUS_INVALID_GROUP_ATTRIBUTES
-//
-// MessageText:
-//
-// The specified attributes are invalid, or incompatible with the attributes for the group as a whole.
-//
-
- STATUS_INVALID_GROUP_ATTRIBUTES = NTSTATUS($C00000A4);
- {$EXTERNALSYM STATUS_INVALID_GROUP_ATTRIBUTES}
-
-//
-// MessageId: STATUS_BAD_IMPERSONATION_LEVEL
-//
-// MessageText:
-//
-// A specified impersonation level is invalid.
-// Also used to indicate a required impersonation level was not provided.
-//
-
- STATUS_BAD_IMPERSONATION_LEVEL = NTSTATUS($C00000A5);
- {$EXTERNALSYM STATUS_BAD_IMPERSONATION_LEVEL}
-
-//
-// MessageId: STATUS_CANT_OPEN_ANONYMOUS
-//
-// MessageText:
-//
-// An attempt was made to open an Anonymous level token.
-// Anonymous tokens may not be opened.
-//
-
- STATUS_CANT_OPEN_ANONYMOUS = NTSTATUS($C00000A6);
- {$EXTERNALSYM STATUS_CANT_OPEN_ANONYMOUS}
-
-//
-// MessageId: STATUS_BAD_VALIDATION_CLASS
-//
-// MessageText:
-//
-// The validation information class requested was invalid.
-//
-
- STATUS_BAD_VALIDATION_CLASS = NTSTATUS($C00000A7);
- {$EXTERNALSYM STATUS_BAD_VALIDATION_CLASS}
-
-//
-// MessageId: STATUS_BAD_TOKEN_TYPE
-//
-// MessageText:
-//
-// The type of a token object is inappropriate for its attempted use.
-//
-
- STATUS_BAD_TOKEN_TYPE = NTSTATUS($C00000A8);
- {$EXTERNALSYM STATUS_BAD_TOKEN_TYPE}
-
-//
-// MessageId: STATUS_BAD_MASTER_BOOT_RECORD
-//
-// MessageText:
-//
-// The type of a token object is inappropriate for its attempted use.
-//
-
- STATUS_BAD_MASTER_BOOT_RECORD = NTSTATUS($C00000A9);
- {$EXTERNALSYM STATUS_BAD_MASTER_BOOT_RECORD}
-
-//
-// MessageId: STATUS_INSTRUCTION_MISALIGNMENT
-//
-// MessageText:
-//
-// An attempt was made to execute an instruction at an unaligned address and the host system does not support unaligned instruction references.
-//
-
- STATUS_INSTRUCTION_MISALIGNMENT = NTSTATUS($C00000AA);
- {$EXTERNALSYM STATUS_INSTRUCTION_MISALIGNMENT}
-
-//
-// MessageId: STATUS_INSTANCE_NOT_AVAILABLE
-//
-// MessageText:
-//
-// The maximum named pipe instance count has been reached.
-//
-
- STATUS_INSTANCE_NOT_AVAILABLE = NTSTATUS($C00000AB);
- {$EXTERNALSYM STATUS_INSTANCE_NOT_AVAILABLE}
-
-//
-// MessageId: STATUS_PIPE_NOT_AVAILABLE
-//
-// MessageText:
-//
-// An instance of a named pipe cannot be found in the listening state.
-//
-
- STATUS_PIPE_NOT_AVAILABLE = NTSTATUS($C00000AC);
- {$EXTERNALSYM STATUS_PIPE_NOT_AVAILABLE}
-
-//
-// MessageId: STATUS_INVALID_PIPE_STATE
-//
-// MessageText:
-//
-// The named pipe is not in the connected or closing state.
-//
-
- STATUS_INVALID_PIPE_STATE = NTSTATUS($C00000AD);
- {$EXTERNALSYM STATUS_INVALID_PIPE_STATE}
-
-//
-// MessageId: STATUS_PIPE_BUSY
-//
-// MessageText:
-//
-// The specified pipe is set to complete operations and there are current I/O operations queued so it cannot be changed to queue operations.
-//
-
- STATUS_PIPE_BUSY = NTSTATUS($C00000AE);
- {$EXTERNALSYM STATUS_PIPE_BUSY}
-
-//
-// MessageId: STATUS_ILLEGAL_FUNCTION
-//
-// MessageText:
-//
-// The specified handle is not open to the server end of the named pipe.
-//
-
- STATUS_ILLEGAL_FUNCTION = NTSTATUS($C00000AF);
- {$EXTERNALSYM STATUS_ILLEGAL_FUNCTION}
-
-//
-// MessageId: STATUS_PIPE_DISCONNECTED
-//
-// MessageText:
-//
-// The specified named pipe is in the disconnected state.
-//
-
- STATUS_PIPE_DISCONNECTED = NTSTATUS($C00000B0);
- {$EXTERNALSYM STATUS_PIPE_DISCONNECTED}
-
-//
-// MessageId: STATUS_PIPE_CLOSING
-//
-// MessageText:
-//
-// The specified named pipe is in the closing state.
-//
-
- STATUS_PIPE_CLOSING = NTSTATUS($C00000B1);
- {$EXTERNALSYM STATUS_PIPE_CLOSING}
-
-//
-// MessageId: STATUS_PIPE_CONNECTED
-//
-// MessageText:
-//
-// The specified named pipe is in the connected state.
-//
-
- STATUS_PIPE_CONNECTED = NTSTATUS($C00000B2);
- {$EXTERNALSYM STATUS_PIPE_CONNECTED}
-
-//
-// MessageId: STATUS_PIPE_LISTENING
-//
-// MessageText:
-//
-// The specified named pipe is in the listening state.
-//
-
- STATUS_PIPE_LISTENING = NTSTATUS($C00000B3);
- {$EXTERNALSYM STATUS_PIPE_LISTENING}
-
-//
-// MessageId: STATUS_INVALID_READ_MODE
-//
-// MessageText:
-//
-// The specified named pipe is not in message mode.
-//
-
- STATUS_INVALID_READ_MODE = NTSTATUS($C00000B4);
- {$EXTERNALSYM STATUS_INVALID_READ_MODE}
-
-//
-// MessageId: STATUS_IO_TIMEOUT
-//
-// MessageText:
-//
-// {Device Timeout}
-// The specified I/O operation on %hs was not completed before the time-out period expired.
-//
-
- STATUS_IO_TIMEOUT = NTSTATUS($C00000B5);
- {$EXTERNALSYM STATUS_IO_TIMEOUT}
-
-//
-// MessageId: STATUS_FILE_FORCED_CLOSED
-//
-// MessageText:
-//
-// The specified file has been closed by another process.
-//
-
- STATUS_FILE_FORCED_CLOSED = NTSTATUS($C00000B6);
- {$EXTERNALSYM STATUS_FILE_FORCED_CLOSED}
-
-//
-// MessageId: STATUS_PROFILING_NOT_STARTED
-//
-// MessageText:
-//
-// Profiling not started.
-//
-
- STATUS_PROFILING_NOT_STARTED = NTSTATUS($C00000B7);
- {$EXTERNALSYM STATUS_PROFILING_NOT_STARTED}
-
-//
-// MessageId: STATUS_PROFILING_NOT_STOPPED
-//
-// MessageText:
-//
-// Profiling not stopped.
-//
-
- STATUS_PROFILING_NOT_STOPPED = NTSTATUS($C00000B8);
- {$EXTERNALSYM STATUS_PROFILING_NOT_STOPPED}
-
-//
-// MessageId: STATUS_COULD_NOT_INTERPRET
-//
-// MessageText:
-//
-// The passed ACL did not contain the minimum required information.
-//
-
- STATUS_COULD_NOT_INTERPRET = NTSTATUS($C00000B9);
- {$EXTERNALSYM STATUS_COULD_NOT_INTERPRET}
-
-//
-// MessageId: STATUS_FILE_IS_A_DIRECTORY
-//
-// MessageText:
-//
-// The file that was specified as a target is a directory and the caller specified that it could be anything but a directory.
-//
-
- STATUS_FILE_IS_A_DIRECTORY = NTSTATUS($C00000BA);
- {$EXTERNALSYM STATUS_FILE_IS_A_DIRECTORY}
-
-//
-// Network specific errors.
-//
-//
-//
-// MessageId: STATUS_NOT_SUPPORTED
-//
-// MessageText:
-//
-// The network request is not supported.
-//
-
- STATUS_NOT_SUPPORTED = NTSTATUS($C00000BB);
- {$EXTERNALSYM STATUS_NOT_SUPPORTED}
-
-//
-// MessageId: STATUS_REMOTE_NOT_LISTENING
-//
-// MessageText:
-//
-// This remote computer is not listening.
-//
-
- STATUS_REMOTE_NOT_LISTENING = NTSTATUS($C00000BC);
- {$EXTERNALSYM STATUS_REMOTE_NOT_LISTENING}
-
-//
-// MessageId: STATUS_DUPLICATE_NAME
-//
-// MessageText:
-//
-// A duplicate name exists on the network.
-//
-
- STATUS_DUPLICATE_NAME = NTSTATUS($C00000BD);
- {$EXTERNALSYM STATUS_DUPLICATE_NAME}
-
-//
-// MessageId: STATUS_BAD_NETWORK_PATH
-//
-// MessageText:
-//
-// The network path cannot be located.
-//
-
- STATUS_BAD_NETWORK_PATH = NTSTATUS($C00000BE);
- {$EXTERNALSYM STATUS_BAD_NETWORK_PATH}
-
-//
-// MessageId: STATUS_NETWORK_BUSY
-//
-// MessageText:
-//
-// The network is busy.
-//
-
- STATUS_NETWORK_BUSY = NTSTATUS($C00000BF);
- {$EXTERNALSYM STATUS_NETWORK_BUSY}
-
-//
-// MessageId: STATUS_DEVICE_DOES_NOT_EXIST
-//
-// MessageText:
-//
-// This device does not exist.
-//
-
- STATUS_DEVICE_DOES_NOT_EXIST = NTSTATUS($C00000C0);
- {$EXTERNALSYM STATUS_DEVICE_DOES_NOT_EXIST}
-
-//
-// MessageId: STATUS_TOO_MANY_COMMANDS
-//
-// MessageText:
-//
-// The network BIOS command limit has been reached.
-//
-
- STATUS_TOO_MANY_COMMANDS = NTSTATUS($C00000C1);
- {$EXTERNALSYM STATUS_TOO_MANY_COMMANDS}
-
-//
-// MessageId: STATUS_ADAPTER_HARDWARE_ERROR
-//
-// MessageText:
-//
-// An I/O adapter hardware error has occurred.
-//
-
- STATUS_ADAPTER_HARDWARE_ERROR = NTSTATUS($C00000C2);
- {$EXTERNALSYM STATUS_ADAPTER_HARDWARE_ERROR}
-
-//
-// MessageId: STATUS_INVALID_NETWORK_RESPONSE
-//
-// MessageText:
-//
-// The network responded incorrectly.
-//
-
- STATUS_INVALID_NETWORK_RESPONSE = NTSTATUS($C00000C3);
- {$EXTERNALSYM STATUS_INVALID_NETWORK_RESPONSE}
-
-//
-// MessageId: STATUS_UNEXPECTED_NETWORK_ERROR
-//
-// MessageText:
-//
-// An unexpected network error occurred.
-//
-
- STATUS_UNEXPECTED_NETWORK_ERROR = NTSTATUS($C00000C4);
- {$EXTERNALSYM STATUS_UNEXPECTED_NETWORK_ERROR}
-
-//
-// MessageId: STATUS_BAD_REMOTE_ADAPTER
-//
-// MessageText:
-//
-// The remote adapter is not compatible.
-//
-
- STATUS_BAD_REMOTE_ADAPTER = NTSTATUS($C00000C5);
- {$EXTERNALSYM STATUS_BAD_REMOTE_ADAPTER}
-
-//
-// MessageId: STATUS_PRINT_QUEUE_FULL
-//
-// MessageText:
-//
-// The printer queue is full.
-//
-
- STATUS_PRINT_QUEUE_FULL = NTSTATUS($C00000C6);
- {$EXTERNALSYM STATUS_PRINT_QUEUE_FULL}
-
-//
-// MessageId: STATUS_NO_SPOOL_SPACE
-//
-// MessageText:
-//
-// Space to store the file waiting to be printed is not available on the server.
-//
-
- STATUS_NO_SPOOL_SPACE = NTSTATUS($C00000C7);
- {$EXTERNALSYM STATUS_NO_SPOOL_SPACE}
-
-//
-// MessageId: STATUS_PRINT_CANCELLED
-//
-// MessageText:
-//
-// The requested print file has been canceled.
-//
-
- STATUS_PRINT_CANCELLED = NTSTATUS($C00000C8);
- {$EXTERNALSYM STATUS_PRINT_CANCELLED}
-
-//
-// MessageId: STATUS_NETWORK_NAME_DELETED
-//
-// MessageText:
-//
-// The network name was deleted.
-//
-
- STATUS_NETWORK_NAME_DELETED = NTSTATUS($C00000C9);
- {$EXTERNALSYM STATUS_NETWORK_NAME_DELETED}
-
-//
-// MessageId: STATUS_NETWORK_ACCESS_DENIED
-//
-// MessageText:
-//
-// Network access is denied.
-//
-
- STATUS_NETWORK_ACCESS_DENIED = NTSTATUS($C00000CA);
- {$EXTERNALSYM STATUS_NETWORK_ACCESS_DENIED}
-
-//
-// MessageId: STATUS_BAD_DEVICE_TYPE
-//
-// MessageText:
-//
-// {Incorrect Network Resource Type}
-// The specified device type (LPT, for example) conflicts with the actual device type on the remote resource.
-//
-
- STATUS_BAD_DEVICE_TYPE = NTSTATUS($C00000CB);
- {$EXTERNALSYM STATUS_BAD_DEVICE_TYPE}
-
-//
-// MessageId: STATUS_BAD_NETWORK_NAME
-//
-// MessageText:
-//
-// {Network Name Not Found}
-// The specified share name cannot be found on the remote server.
-//
-
- STATUS_BAD_NETWORK_NAME = NTSTATUS($C00000CC);
- {$EXTERNALSYM STATUS_BAD_NETWORK_NAME}
-
-//
-// MessageId: STATUS_TOO_MANY_NAMES
-//
-// MessageText:
-//
-// The name limit for the local computer network adapter card was exceeded.
-//
-
- STATUS_TOO_MANY_NAMES = NTSTATUS($C00000CD);
- {$EXTERNALSYM STATUS_TOO_MANY_NAMES}
-
-//
-// MessageId: STATUS_TOO_MANY_SESSIONS
-//
-// MessageText:
-//
-// The network BIOS session limit was exceeded.
-//
-
- STATUS_TOO_MANY_SESSIONS = NTSTATUS($C00000CE);
- {$EXTERNALSYM STATUS_TOO_MANY_SESSIONS}
-
-//
-// MessageId: STATUS_SHARING_PAUSED
-//
-// MessageText:
-//
-// File sharing has been temporarily paused.
-//
-
- STATUS_SHARING_PAUSED = NTSTATUS($C00000CF);
- {$EXTERNALSYM STATUS_SHARING_PAUSED}
-
-//
-// MessageId: STATUS_REQUEST_NOT_ACCEPTED
-//
-// MessageText:
-//
-// No more connections can be made to this remote computer at this time because there are already as many connections as the computer can accept.
-//
-
- STATUS_REQUEST_NOT_ACCEPTED = NTSTATUS($C00000D0);
- {$EXTERNALSYM STATUS_REQUEST_NOT_ACCEPTED}
-
-//
-// MessageId: STATUS_REDIRECTOR_PAUSED
-//
-// MessageText:
-//
-// Print or disk redirection is temporarily paused.
-//
-
- STATUS_REDIRECTOR_PAUSED = NTSTATUS($C00000D1);
- {$EXTERNALSYM STATUS_REDIRECTOR_PAUSED}
-
-//
-// MessageId: STATUS_NET_WRITE_FAULT
-//
-// MessageText:
-//
-// A network data fault occurred.
-//
-
- STATUS_NET_WRITE_FAULT = NTSTATUS($C00000D2);
- {$EXTERNALSYM STATUS_NET_WRITE_FAULT}
-
-//
-// MessageId: STATUS_PROFILING_AT_LIMIT
-//
-// MessageText:
-//
-// The number of active profiling objects is at the maximum and no more may be started.
-//
-
- STATUS_PROFILING_AT_LIMIT = NTSTATUS($C00000D3);
- {$EXTERNALSYM STATUS_PROFILING_AT_LIMIT}
-
-//
-// MessageId: STATUS_NOT_SAME_DEVICE
-//
-// MessageText:
-//
-// {Incorrect Volume}
-// The target file of a rename request is located on a different device than the source of the rename request.
-//
-
- STATUS_NOT_SAME_DEVICE = NTSTATUS($C00000D4);
- {$EXTERNALSYM STATUS_NOT_SAME_DEVICE}
-
-//
-// MessageId: STATUS_FILE_RENAMED
-//
-// MessageText:
-//
-// The file specified has been renamed and thus cannot be modified.
-//
-
- STATUS_FILE_RENAMED = NTSTATUS($C00000D5);
- {$EXTERNALSYM STATUS_FILE_RENAMED}
-
-//
-// MessageId: STATUS_VIRTUAL_CIRCUIT_CLOSED
-//
-// MessageText:
-//
-// {Network Request Timeout}
-// The session with a remote server has been disconnected because the time-out interval for a request has expired.
-//
-
- STATUS_VIRTUAL_CIRCUIT_CLOSED = NTSTATUS($C00000D6);
- {$EXTERNALSYM STATUS_VIRTUAL_CIRCUIT_CLOSED}
-
-//
-// MessageId: STATUS_NO_SECURITY_ON_OBJECT
-//
-// MessageText:
-//
-// Indicates an attempt was made to operate on the security of an object that does not have security associated with it.
-//
-
- STATUS_NO_SECURITY_ON_OBJECT = NTSTATUS($C00000D7);
- {$EXTERNALSYM STATUS_NO_SECURITY_ON_OBJECT}
-
-//
-// MessageId: STATUS_CANT_WAIT
-//
-// MessageText:
-//
-// Used to indicate that an operation cannot continue without blocking for I/O.
-//
-
- STATUS_CANT_WAIT = NTSTATUS($C00000D8);
- {$EXTERNALSYM STATUS_CANT_WAIT}
-
-//
-// MessageId: STATUS_PIPE_EMPTY
-//
-// MessageText:
-//
-// Used to indicate that a read operation was done on an empty pipe.
-//
-
- STATUS_PIPE_EMPTY = NTSTATUS($C00000D9);
- {$EXTERNALSYM STATUS_PIPE_EMPTY}
-
-//
-// MessageId: STATUS_CANT_ACCESS_DOMAIN_INFO
-//
-// MessageText:
-//
-// Configuration information could not be read from the domain controller, either because the machine is unavailable, or access has been denied.
-//
-
- STATUS_CANT_ACCESS_DOMAIN_INFO = NTSTATUS($C00000DA);
- {$EXTERNALSYM STATUS_CANT_ACCESS_DOMAIN_INFO}
-
-//
-// MessageId: STATUS_CANT_TERMINATE_SELF
-//
-// MessageText:
-//
-// Indicates that a thread attempted to terminate itself by default (called NtTerminateThread with NULL) and it was the last thread in the current process.
-//
-
- STATUS_CANT_TERMINATE_SELF = NTSTATUS($C00000DB);
- {$EXTERNALSYM STATUS_CANT_TERMINATE_SELF}
-
-//
-// MessageId: STATUS_INVALID_SERVER_STATE
-//
-// MessageText:
-//
-// Indicates the Sam Server was in the wrong state to perform the desired operation.
-//
-
- STATUS_INVALID_SERVER_STATE = NTSTATUS($C00000DC);
- {$EXTERNALSYM STATUS_INVALID_SERVER_STATE}
-
-//
-// MessageId: STATUS_INVALID_DOMAIN_STATE
-//
-// MessageText:
-//
-// Indicates the Domain was in the wrong state to perform the desired operation.
-//
-
- STATUS_INVALID_DOMAIN_STATE = NTSTATUS($C00000DD);
- {$EXTERNALSYM STATUS_INVALID_DOMAIN_STATE}
-
-//
-// MessageId: STATUS_INVALID_DOMAIN_ROLE
-//
-// MessageText:
-//
-// This operation is only allowed for the Primary Domain Controller of the domain.
-//
-
- STATUS_INVALID_DOMAIN_ROLE = NTSTATUS($C00000DE);
- {$EXTERNALSYM STATUS_INVALID_DOMAIN_ROLE}
-
-//
-// MessageId: STATUS_NO_SUCH_DOMAIN
-//
-// MessageText:
-//
-// The specified Domain did not exist.
-//
-
- STATUS_NO_SUCH_DOMAIN = NTSTATUS($C00000DF);
- {$EXTERNALSYM STATUS_NO_SUCH_DOMAIN}
-
-//
-// MessageId: STATUS_DOMAIN_EXISTS
-//
-// MessageText:
-//
-// The specified Domain already exists.
-//
-
- STATUS_DOMAIN_EXISTS = NTSTATUS($C00000E0);
- {$EXTERNALSYM STATUS_DOMAIN_EXISTS}
-
-//
-// MessageId: STATUS_DOMAIN_LIMIT_EXCEEDED
-//
-// MessageText:
-//
-// An attempt was made to exceed the limit on the number of domains per server for this release.
-//
-
- STATUS_DOMAIN_LIMIT_EXCEEDED = NTSTATUS($C00000E1);
- {$EXTERNALSYM STATUS_DOMAIN_LIMIT_EXCEEDED}
-
-//
-// MessageId: STATUS_OPLOCK_NOT_GRANTED
-//
-// MessageText:
-//
-// Error status returned when oplock request is denied.
-//
-
- STATUS_OPLOCK_NOT_GRANTED = NTSTATUS($C00000E2);
- {$EXTERNALSYM STATUS_OPLOCK_NOT_GRANTED}
-
-//
-// MessageId: STATUS_INVALID_OPLOCK_PROTOCOL
-//
-// MessageText:
-//
-// Error status returned when an invalid oplock acknowledgment is received by a file system.
-//
-
- STATUS_INVALID_OPLOCK_PROTOCOL = NTSTATUS($C00000E3);
- {$EXTERNALSYM STATUS_INVALID_OPLOCK_PROTOCOL}
-
-//
-// MessageId: STATUS_INTERNAL_DB_CORRUPTION
-//
-// MessageText:
-//
-// This error indicates that the requested operation cannot be completed due to a catastrophic media failure or on-disk data structure corruption.
-//
-
- STATUS_INTERNAL_DB_CORRUPTION = NTSTATUS($C00000E4);
- {$EXTERNALSYM STATUS_INTERNAL_DB_CORRUPTION}
-
-//
-// MessageId: STATUS_INTERNAL_ERROR
-//
-// MessageText:
-//
-// An internal error occurred.
-//
-
- STATUS_INTERNAL_ERROR = NTSTATUS($C00000E5);
- {$EXTERNALSYM STATUS_INTERNAL_ERROR}
-
-//
-// MessageId: STATUS_GENERIC_NOT_MAPPED
-//
-// MessageText:
-//
-// Indicates generic access types were contained in an access mask which should already be mapped to non-generic access types.
-//
-
- STATUS_GENERIC_NOT_MAPPED = NTSTATUS($C00000E6);
- {$EXTERNALSYM STATUS_GENERIC_NOT_MAPPED}
-
-//
-// MessageId: STATUS_BAD_DESCRIPTOR_FORMAT
-//
-// MessageText:
-//
-// Indicates a security descriptor is not in the necessary format (absolute or self-relative).
-//
-
- STATUS_BAD_DESCRIPTOR_FORMAT = NTSTATUS($C00000E7);
- {$EXTERNALSYM STATUS_BAD_DESCRIPTOR_FORMAT}
-
-//
-// Status codes raised by the Cache Manager which must be considered as
-// "expected" by its callers.
-//
-//
-// MessageId: STATUS_INVALID_USER_BUFFER
-//
-// MessageText:
-//
-// An access to a user buffer failed at an "expected" point in time.
-// This code is defined since the caller does not want to accept STATUS_ACCESS_VIOLATION in its filter.
-//
-
- STATUS_INVALID_USER_BUFFER = NTSTATUS($C00000E8);
- {$EXTERNALSYM STATUS_INVALID_USER_BUFFER}
-
-//
-// MessageId: STATUS_UNEXPECTED_IO_ERROR
-//
-// MessageText:
-//
-// If an I/O error is returned which is not defined in the standard FsRtl filter, it is converted to the following error which is guaranteed to be in the filter.
-// In this case information is lost, however, the filter correctly handles the exception.
-//
-
- STATUS_UNEXPECTED_IO_ERROR = NTSTATUS($C00000E9);
- {$EXTERNALSYM STATUS_UNEXPECTED_IO_ERROR}
-
-//
-// MessageId: STATUS_UNEXPECTED_MM_CREATE_ERR
-//
-// MessageText:
-//
-// If an MM error is returned which is not defined in the standard FsRtl filter, it is converted to one of the following errors which is guaranteed to be in the filter.
-// In this case information is lost, however, the filter correctly handles the exception.
-//
-
- STATUS_UNEXPECTED_MM_CREATE_ERR = NTSTATUS($C00000EA);
- {$EXTERNALSYM STATUS_UNEXPECTED_MM_CREATE_ERR}
-
-//
-// MessageId: STATUS_UNEXPECTED_MM_MAP_ERROR
-//
-// MessageText:
-//
-// If an MM error is returned which is not defined in the standard FsRtl filter, it is converted to one of the following errors which is guaranteed to be in the filter.
-// In this case information is lost, however, the filter correctly handles the exception.
-//
-
- STATUS_UNEXPECTED_MM_MAP_ERROR = NTSTATUS($C00000EB);
- {$EXTERNALSYM STATUS_UNEXPECTED_MM_MAP_ERROR}
-
-//
-// MessageId: STATUS_UNEXPECTED_MM_EXTEND_ERR
-//
-// MessageText:
-//
-// If an MM error is returned which is not defined in the standard FsRtl filter, it is converted to one of the following errors which is guaranteed to be in the filter.
-// In this case information is lost, however, the filter correctly handles the exception.
-//
-
- STATUS_UNEXPECTED_MM_EXTEND_ERR = NTSTATUS($C00000EC);
- {$EXTERNALSYM STATUS_UNEXPECTED_MM_EXTEND_ERR}
-
-//
-// MessageId: STATUS_NOT_LOGON_PROCESS
-//
-// MessageText:
-//
-// The requested action is restricted for use by logon processes only. The calling process has not registered as a logon process.
-//
-
- STATUS_NOT_LOGON_PROCESS = NTSTATUS($C00000ED);
- {$EXTERNALSYM STATUS_NOT_LOGON_PROCESS}
-
-//
-// MessageId: STATUS_LOGON_SESSION_EXISTS
-//
-// MessageText:
-//
-// An attempt has been made to start a new session manager or LSA logon session with an ID that is already in use.
-//
-
- STATUS_LOGON_SESSION_EXISTS = NTSTATUS($C00000EE);
- {$EXTERNALSYM STATUS_LOGON_SESSION_EXISTS}
-
-//
-// MessageId: STATUS_INVALID_PARAMETER_1
-//
-// MessageText:
-//
-// An invalid parameter was passed to a service or function as the first argument.
-//
-
- STATUS_INVALID_PARAMETER_1 = NTSTATUS($C00000EF);
- {$EXTERNALSYM STATUS_INVALID_PARAMETER_1}
-
-//
-// MessageId: STATUS_INVALID_PARAMETER_2
-//
-// MessageText:
-//
-// An invalid parameter was passed to a service or function as the second argument.
-//
-
- STATUS_INVALID_PARAMETER_2 = NTSTATUS($C00000F0);
- {$EXTERNALSYM STATUS_INVALID_PARAMETER_2}
-
-//
-// MessageId: STATUS_INVALID_PARAMETER_3
-//
-// MessageText:
-//
-// An invalid parameter was passed to a service or function as the third argument.
-//
-
- STATUS_INVALID_PARAMETER_3 = NTSTATUS($C00000F1);
- {$EXTERNALSYM STATUS_INVALID_PARAMETER_3}
-
-//
-// MessageId: STATUS_INVALID_PARAMETER_4
-//
-// MessageText:
-//
-// An invalid parameter was passed to a service or function as the fourth argument.
-//
-
- STATUS_INVALID_PARAMETER_4 = NTSTATUS($C00000F2);
- {$EXTERNALSYM STATUS_INVALID_PARAMETER_4}
-
-//
-// MessageId: STATUS_INVALID_PARAMETER_5
-//
-// MessageText:
-//
-// An invalid parameter was passed to a service or function as the fifth argument.
-//
-
- STATUS_INVALID_PARAMETER_5 = NTSTATUS($C00000F3);
- {$EXTERNALSYM STATUS_INVALID_PARAMETER_5}
-
-//
-// MessageId: STATUS_INVALID_PARAMETER_6
-//
-// MessageText:
-//
-// An invalid parameter was passed to a service or function as the sixth argument.
-//
-
- STATUS_INVALID_PARAMETER_6 = NTSTATUS($C00000F4);
- {$EXTERNALSYM STATUS_INVALID_PARAMETER_6}
-
-//
-// MessageId: STATUS_INVALID_PARAMETER_7
-//
-// MessageText:
-//
-// An invalid parameter was passed to a service or function as the seventh argument.
-//
-
- STATUS_INVALID_PARAMETER_7 = NTSTATUS($C00000F5);
- {$EXTERNALSYM STATUS_INVALID_PARAMETER_7}
-
-//
-// MessageId: STATUS_INVALID_PARAMETER_8
-//
-// MessageText:
-//
-// An invalid parameter was passed to a service or function as the eighth argument.
-//
-
- STATUS_INVALID_PARAMETER_8 = NTSTATUS($C00000F6);
- {$EXTERNALSYM STATUS_INVALID_PARAMETER_8}
-
-//
-// MessageId: STATUS_INVALID_PARAMETER_9
-//
-// MessageText:
-//
-// An invalid parameter was passed to a service or function as the ninth argument.
-//
-
- STATUS_INVALID_PARAMETER_9 = NTSTATUS($C00000F7);
- {$EXTERNALSYM STATUS_INVALID_PARAMETER_9}
-
-//
-// MessageId: STATUS_INVALID_PARAMETER_10
-//
-// MessageText:
-//
-// An invalid parameter was passed to a service or function as the tenth argument.
-//
-
- STATUS_INVALID_PARAMETER_10 = NTSTATUS($C00000F8);
- {$EXTERNALSYM STATUS_INVALID_PARAMETER_10}
-
-//
-// MessageId: STATUS_INVALID_PARAMETER_11
-//
-// MessageText:
-//
-// An invalid parameter was passed to a service or function as the eleventh argument.
-//
-
- STATUS_INVALID_PARAMETER_11 = NTSTATUS($C00000F9);
- {$EXTERNALSYM STATUS_INVALID_PARAMETER_11}
-
-//
-// MessageId: STATUS_INVALID_PARAMETER_12
-//
-// MessageText:
-//
-// An invalid parameter was passed to a service or function as the twelfth argument.
-//
-
- STATUS_INVALID_PARAMETER_12 = NTSTATUS($C00000FA);
- {$EXTERNALSYM STATUS_INVALID_PARAMETER_12}
-
-//
-// MessageId: STATUS_REDIRECTOR_NOT_STARTED
-//
-// MessageText:
-//
-// An attempt was made to access a network file, but the network software was not yet started.
-//
-
- STATUS_REDIRECTOR_NOT_STARTED = NTSTATUS($C00000FB);
- {$EXTERNALSYM STATUS_REDIRECTOR_NOT_STARTED}
-
-//
-// MessageId: STATUS_REDIRECTOR_STARTED
-//
-// MessageText:
-//
-// An attempt was made to start the redirector, but the redirector has already been started.
-//
-
- STATUS_REDIRECTOR_STARTED = NTSTATUS($C00000FC);
- {$EXTERNALSYM STATUS_REDIRECTOR_STARTED}
-
-//
-// MessageId: STATUS_STACK_OVERFLOW
-//
-// MessageText:
-//
-// A new guard page for the stack cannot be created.
-//
-
- STATUS_STACK_OVERFLOW = NTSTATUS($C00000FD); // winnt
- {$EXTERNALSYM STATUS_STACK_OVERFLOW}
-
-//
-// MessageId: STATUS_NO_SUCH_PACKAGE
-//
-// MessageText:
-//
-// A specified authentication package is unknown.
-//
-
- STATUS_NO_SUCH_PACKAGE = NTSTATUS($C00000FE);
- {$EXTERNALSYM STATUS_NO_SUCH_PACKAGE}
-
-//
-// MessageId: STATUS_BAD_FUNCTION_TABLE
-//
-// MessageText:
-//
-// A malformed function table was encountered during an unwind operation.
-//
-
- STATUS_BAD_FUNCTION_TABLE = NTSTATUS($C00000FF);
- {$EXTERNALSYM STATUS_BAD_FUNCTION_TABLE}
-
-//
-// MessageId: STATUS_VARIABLE_NOT_FOUND
-//
-// MessageText:
-//
-// Indicates the specified environment variable name was not found in the specified environment block.
-//
-
- STATUS_VARIABLE_NOT_FOUND = NTSTATUS($C0000100);
- {$EXTERNALSYM STATUS_VARIABLE_NOT_FOUND}
-
-//
-// MessageId: STATUS_DIRECTORY_NOT_EMPTY
-//
-// MessageText:
-//
-// Indicates that the directory trying to be deleted is not empty.
-//
-
- STATUS_DIRECTORY_NOT_EMPTY = NTSTATUS($C0000101);
- {$EXTERNALSYM STATUS_DIRECTORY_NOT_EMPTY}
-
-//
-// MessageId: STATUS_FILE_CORRUPT_ERROR
-//
-// MessageText:
-//
-// {Corrupt File}
-// The file or directory %hs is corrupt and unreadable.
-// Please run the Chkdsk utility.
-//
-
- STATUS_FILE_CORRUPT_ERROR = NTSTATUS($C0000102);
- {$EXTERNALSYM STATUS_FILE_CORRUPT_ERROR}
-
-//
-// MessageId: STATUS_NOT_A_DIRECTORY
-//
-// MessageText:
-//
-// A requested opened file is not a directory.
-//
-
- STATUS_NOT_A_DIRECTORY = NTSTATUS($C0000103);
- {$EXTERNALSYM STATUS_NOT_A_DIRECTORY}
-
-//
-// MessageId: STATUS_BAD_LOGON_SESSION_STATE
-//
-// MessageText:
-//
-// The logon session is not in a state that is consistent with the requested operation.
-//
-
- STATUS_BAD_LOGON_SESSION_STATE = NTSTATUS($C0000104);
- {$EXTERNALSYM STATUS_BAD_LOGON_SESSION_STATE}
-
-//
-// MessageId: STATUS_LOGON_SESSION_COLLISION
-//
-// MessageText:
-//
-// An internal LSA error has occurred. An authentication package has requested the creation of a Logon Session but the ID of an already existing Logon Session has been specified.
-//
-
- STATUS_LOGON_SESSION_COLLISION = NTSTATUS($C0000105);
- {$EXTERNALSYM STATUS_LOGON_SESSION_COLLISION}
-
-//
-// MessageId: STATUS_NAME_TOO_LONG
-//
-// MessageText:
-//
-// A specified name string is too long for its intended use.
-//
-
- STATUS_NAME_TOO_LONG = NTSTATUS($C0000106);
- {$EXTERNALSYM STATUS_NAME_TOO_LONG}
-
-//
-// MessageId: STATUS_FILES_OPEN
-//
-// MessageText:
-//
-// The user attempted to force close the files on a redirected drive, but there were opened files on the drive, and the user did not specify a sufficient level of force.
-//
-
- STATUS_FILES_OPEN = NTSTATUS($C0000107);
- {$EXTERNALSYM STATUS_FILES_OPEN}
-
-//
-// MessageId: STATUS_CONNECTION_IN_USE
-//
-// MessageText:
-//
-// The user attempted to force close the files on a redirected drive, but there were opened directories on the drive, and the user did not specify a sufficient level of force.
-//
-
- STATUS_CONNECTION_IN_USE = NTSTATUS($C0000108);
- {$EXTERNALSYM STATUS_CONNECTION_IN_USE}
-
-//
-// MessageId: STATUS_MESSAGE_NOT_FOUND
-//
-// MessageText:
-//
-// RtlFindMessage could not locate the requested message ID in the message table resource.
-//
-
- STATUS_MESSAGE_NOT_FOUND = NTSTATUS($C0000109);
- {$EXTERNALSYM STATUS_MESSAGE_NOT_FOUND}
-
-//
-// MessageId: STATUS_PROCESS_IS_TERMINATING
-//
-// MessageText:
-//
-// An attempt was made to duplicate an object handle into or out of an exiting process.
-//
-
- STATUS_PROCESS_IS_TERMINATING = NTSTATUS($C000010A);
- {$EXTERNALSYM STATUS_PROCESS_IS_TERMINATING}
-
-//
-// MessageId: STATUS_INVALID_LOGON_TYPE
-//
-// MessageText:
-//
-// Indicates an invalid value has been provided for the LogonType requested.
-//
-
- STATUS_INVALID_LOGON_TYPE = NTSTATUS($C000010B);
- {$EXTERNALSYM STATUS_INVALID_LOGON_TYPE}
-
-//
-// MessageId: STATUS_NO_GUID_TRANSLATION
-//
-// MessageText:
-//
-// Indicates that an attempt was made to assign protection to a file system file or directory and one of the SIDs in the security descriptor could not be translated into a GUID that could be stored by the file system.
-// This causes the protection attempt to fail, which may cause a file creation attempt to fail.
-//
-
- STATUS_NO_GUID_TRANSLATION = NTSTATUS($C000010C);
- {$EXTERNALSYM STATUS_NO_GUID_TRANSLATION}
-
-//
-// MessageId: STATUS_CANNOT_IMPERSONATE
-//
-// MessageText:
-//
-// Indicates that an attempt has been made to impersonate via a named pipe that has not yet been read from.
-//
-
- STATUS_CANNOT_IMPERSONATE = NTSTATUS($C000010D);
- {$EXTERNALSYM STATUS_CANNOT_IMPERSONATE}
-
-//
-// MessageId: STATUS_IMAGE_ALREADY_LOADED
-//
-// MessageText:
-//
-// Indicates that the specified image is already loaded.
-//
-
- STATUS_IMAGE_ALREADY_LOADED = NTSTATUS($C000010E);
- {$EXTERNALSYM STATUS_IMAGE_ALREADY_LOADED}
-
-//
-// ============================================================
-// NOTE: The following ABIOS error code should be reserved on
-// non ABIOS kernel. Eventually, I will remove the ifdef
-// ABIOS.
-// ============================================================
-//
-//
-// MessageId: STATUS_ABIOS_NOT_PRESENT
-//
-// MessageText:
-//
-// STATUS_ABIOS_NOT_PRESENT
-//
-
- STATUS_ABIOS_NOT_PRESENT = NTSTATUS($C000010F);
- {$EXTERNALSYM STATUS_ABIOS_NOT_PRESENT}
-
-//
-// MessageId: STATUS_ABIOS_LID_NOT_EXIST
-//
-// MessageText:
-//
-// STATUS_ABIOS_LID_NOT_EXIST
-//
-
- STATUS_ABIOS_LID_NOT_EXIST = NTSTATUS($C0000110);
- {$EXTERNALSYM STATUS_ABIOS_LID_NOT_EXIST}
-
-//
-// MessageId: STATUS_ABIOS_LID_ALREADY_OWNED
-//
-// MessageText:
-//
-// STATUS_ABIOS_LID_ALREADY_OWNED
-//
-
- STATUS_ABIOS_LID_ALREADY_OWNED = NTSTATUS($C0000111);
- {$EXTERNALSYM STATUS_ABIOS_LID_ALREADY_OWNED}
-
-//
-// MessageId: STATUS_ABIOS_NOT_LID_OWNER
-//
-// MessageText:
-//
-// STATUS_ABIOS_NOT_LID_OWNER
-//
-
- STATUS_ABIOS_NOT_LID_OWNER = NTSTATUS($C0000112);
- {$EXTERNALSYM STATUS_ABIOS_NOT_LID_OWNER}
-
-//
-// MessageId: STATUS_ABIOS_INVALID_COMMAND
-//
-// MessageText:
-//
-// STATUS_ABIOS_INVALID_COMMAND
-//
-
- STATUS_ABIOS_INVALID_COMMAND = NTSTATUS($C0000113);
- {$EXTERNALSYM STATUS_ABIOS_INVALID_COMMAND}
-
-//
-// MessageId: STATUS_ABIOS_INVALID_LID
-//
-// MessageText:
-//
-// STATUS_ABIOS_INVALID_LID
-//
-
- STATUS_ABIOS_INVALID_LID = NTSTATUS($C0000114);
- {$EXTERNALSYM STATUS_ABIOS_INVALID_LID}
-
-//
-// MessageId: STATUS_ABIOS_SELECTOR_NOT_AVAILABLE
-//
-// MessageText:
-//
-// STATUS_ABIOS_SELECTOR_NOT_AVAILABLE
-//
-
- STATUS_ABIOS_SELECTOR_NOT_AVAILABLE = NTSTATUS($C0000115);
- {$EXTERNALSYM STATUS_ABIOS_SELECTOR_NOT_AVAILABLE}
-
-//
-// MessageId: STATUS_ABIOS_INVALID_SELECTOR
-//
-// MessageText:
-//
-// STATUS_ABIOS_INVALID_SELECTOR
-//
-
- STATUS_ABIOS_INVALID_SELECTOR = NTSTATUS($C0000116);
- {$EXTERNALSYM STATUS_ABIOS_INVALID_SELECTOR}
-
-//
-// MessageId: STATUS_NO_LDT
-//
-// MessageText:
-//
-// Indicates that an attempt was made to change the size of the LDT for a process that has no LDT.
-//
-
- STATUS_NO_LDT = NTSTATUS($C0000117);
- {$EXTERNALSYM STATUS_NO_LDT}
-
-//
-// MessageId: STATUS_INVALID_LDT_SIZE
-//
-// MessageText:
-//
-// Indicates that an attempt was made to grow an LDT by setting its size, or that the size was not an even number of selectors.
-//
-
- STATUS_INVALID_LDT_SIZE = NTSTATUS($C0000118);
- {$EXTERNALSYM STATUS_INVALID_LDT_SIZE}
-
-//
-// MessageId: STATUS_INVALID_LDT_OFFSET
-//
-// MessageText:
-//
-// Indicates that the starting value for the LDT information was not an integral multiple of the selector size.
-//
-
- STATUS_INVALID_LDT_OFFSET = NTSTATUS($C0000119);
- {$EXTERNALSYM STATUS_INVALID_LDT_OFFSET}
-
-//
-// MessageId: STATUS_INVALID_LDT_DESCRIPTOR
-//
-// MessageText:
-//
-// Indicates that the user supplied an invalid descriptor when trying to set up Ldt descriptors.
-//
-
- STATUS_INVALID_LDT_DESCRIPTOR = NTSTATUS($C000011A);
- {$EXTERNALSYM STATUS_INVALID_LDT_DESCRIPTOR}
-
-//
-// MessageId: STATUS_INVALID_IMAGE_NE_FORMAT
-//
-// MessageText:
-//
-// The specified image file did not have the correct format. It appears to be NE format.
-//
-
- STATUS_INVALID_IMAGE_NE_FORMAT = NTSTATUS($C000011B);
- {$EXTERNALSYM STATUS_INVALID_IMAGE_NE_FORMAT}
-
-//
-// MessageId: STATUS_RXACT_INVALID_STATE
-//
-// MessageText:
-//
-// Indicates that the transaction state of a registry sub-tree is incompatible with the requested operation.
-// For example, a request has been made to start a new transaction with one already in progress,
-// or a request has been made to apply a transaction when one is not currently in progress.
-//
-
- STATUS_RXACT_INVALID_STATE = NTSTATUS($C000011C);
- {$EXTERNALSYM STATUS_RXACT_INVALID_STATE}
-
-//
-// MessageId: STATUS_RXACT_COMMIT_FAILURE
-//
-// MessageText:
-//
-// Indicates an error has occurred during a registry transaction commit.
-// The database has been left in an unknown, but probably inconsistent, state.
-// The state of the registry transaction is left as COMMITTING.
-//
-
- STATUS_RXACT_COMMIT_FAILURE = NTSTATUS($C000011D);
- {$EXTERNALSYM STATUS_RXACT_COMMIT_FAILURE}
-
-//
-// MessageId: STATUS_MAPPED_FILE_SIZE_ZERO
-//
-// MessageText:
-//
-// An attempt was made to map a file of size zero with the maximum size specified as zero.
-//
-
- STATUS_MAPPED_FILE_SIZE_ZERO = NTSTATUS($C000011E);
- {$EXTERNALSYM STATUS_MAPPED_FILE_SIZE_ZERO}
-
-//
-// MessageId: STATUS_TOO_MANY_OPENED_FILES
-//
-// MessageText:
-//
-// Too many files are opened on a remote server.
-// This error should only be returned by the Windows redirector on a remote drive.
-//
-
- STATUS_TOO_MANY_OPENED_FILES = NTSTATUS($C000011F);
- {$EXTERNALSYM STATUS_TOO_MANY_OPENED_FILES}
-
-//
-// MessageId: STATUS_CANCELLED
-//
-// MessageText:
-//
-// The I/O request was canceled.
-//
-
- STATUS_CANCELLED = NTSTATUS($C0000120);
- {$EXTERNALSYM STATUS_CANCELLED}
-
-//
-// MessageId: STATUS_CANNOT_DELETE
-//
-// MessageText:
-//
-// An attempt has been made to remove a file or directory that cannot be deleted.
-//
-
- STATUS_CANNOT_DELETE = NTSTATUS($C0000121);
- {$EXTERNALSYM STATUS_CANNOT_DELETE}
-
-//
-// MessageId: STATUS_INVALID_COMPUTER_NAME
-//
-// MessageText:
-//
-// Indicates a name specified as a remote computer name is syntactically invalid.
-//
-
- STATUS_INVALID_COMPUTER_NAME = NTSTATUS($C0000122);
- {$EXTERNALSYM STATUS_INVALID_COMPUTER_NAME}
-
-//
-// MessageId: STATUS_FILE_DELETED
-//
-// MessageText:
-//
-// An I/O request other than close was performed on a file after it has been deleted,
-// which can only happen to a request which did not complete before the last handle was closed via NtClose.
-//
-
- STATUS_FILE_DELETED = NTSTATUS($C0000123);
- {$EXTERNALSYM STATUS_FILE_DELETED}
-
-//
-// MessageId: STATUS_SPECIAL_ACCOUNT
-//
-// MessageText:
-//
-// Indicates an operation has been attempted on a built-in (special) SAM account which is incompatible with built-in accounts.
-// For example, built-in accounts cannot be deleted.
-//
-
- STATUS_SPECIAL_ACCOUNT = NTSTATUS($C0000124);
- {$EXTERNALSYM STATUS_SPECIAL_ACCOUNT}
-
-//
-// MessageId: STATUS_SPECIAL_GROUP
-//
-// MessageText:
-//
-// The operation requested may not be performed on the specified group because it is a built-in special group.
-//
-
- STATUS_SPECIAL_GROUP = NTSTATUS($C0000125);
- {$EXTERNALSYM STATUS_SPECIAL_GROUP}
-
-//
-// MessageId: STATUS_SPECIAL_USER
-//
-// MessageText:
-//
-// The operation requested may not be performed on the specified user because it is a built-in special user.
-//
-
- STATUS_SPECIAL_USER = NTSTATUS($C0000126);
- {$EXTERNALSYM STATUS_SPECIAL_USER}
-
-//
-// MessageId: STATUS_MEMBERS_PRIMARY_GROUP
-//
-// MessageText:
-//
-// Indicates a member cannot be removed from a group because the group is currently the member's primary group.
-//
-
- STATUS_MEMBERS_PRIMARY_GROUP = NTSTATUS($C0000127);
- {$EXTERNALSYM STATUS_MEMBERS_PRIMARY_GROUP}
-
-//
-// MessageId: STATUS_FILE_CLOSED
-//
-// MessageText:
-//
-// An I/O request other than close and several other special case operations was attempted using a file object that had already been closed.
-//
-
- STATUS_FILE_CLOSED = NTSTATUS($C0000128);
- {$EXTERNALSYM STATUS_FILE_CLOSED}
-
-//
-// MessageId: STATUS_TOO_MANY_THREADS
-//
-// MessageText:
-//
-// Indicates a process has too many threads to perform the requested action. For example, assignment of a primary token may only be performed when a process has zero or one threads.
-//
-
- STATUS_TOO_MANY_THREADS = NTSTATUS($C0000129);
- {$EXTERNALSYM STATUS_TOO_MANY_THREADS}
-
-//
-// MessageId: STATUS_THREAD_NOT_IN_PROCESS
-//
-// MessageText:
-//
-// An attempt was made to operate on a thread within a specific process, but the thread specified is not in the process specified.
-//
-
- STATUS_THREAD_NOT_IN_PROCESS = NTSTATUS($C000012A);
- {$EXTERNALSYM STATUS_THREAD_NOT_IN_PROCESS}
-
-//
-// MessageId: STATUS_TOKEN_ALREADY_IN_USE
-//
-// MessageText:
-//
-// An attempt was made to establish a token for use as a primary token but the token is already in use. A token can only be the primary token of one process at a time.
-//
-
- STATUS_TOKEN_ALREADY_IN_USE = NTSTATUS($C000012B);
- {$EXTERNALSYM STATUS_TOKEN_ALREADY_IN_USE}
-
-//
-// MessageId: STATUS_PAGEFILE_QUOTA_EXCEEDED
-//
-// MessageText:
-//
-// Page file quota was exceeded.
-//
-
- STATUS_PAGEFILE_QUOTA_EXCEEDED = NTSTATUS($C000012C);
- {$EXTERNALSYM STATUS_PAGEFILE_QUOTA_EXCEEDED}
-
-//
-// MessageId: STATUS_COMMITMENT_LIMIT
-//
-// MessageText:
-//
-// {Out of Virtual Memory}
-// Your system is low on virtual memory. To ensure that Windows runs properly, increase the size of your virtual memory paging file. For more information, see Help.
-//
-
- STATUS_COMMITMENT_LIMIT = NTSTATUS($C000012D);
- {$EXTERNALSYM STATUS_COMMITMENT_LIMIT}
-
-//
-// MessageId: STATUS_INVALID_IMAGE_LE_FORMAT
-//
-// MessageText:
-//
-// The specified image file did not have the correct format, it appears to be LE format.
-//
-
- STATUS_INVALID_IMAGE_LE_FORMAT = NTSTATUS($C000012E);
- {$EXTERNALSYM STATUS_INVALID_IMAGE_LE_FORMAT}
-
-//
-// MessageId: STATUS_INVALID_IMAGE_NOT_MZ
-//
-// MessageText:
-//
-// The specified image file did not have the correct format, it did not have an initial MZ.
-//
-
- STATUS_INVALID_IMAGE_NOT_MZ = NTSTATUS($C000012F);
- {$EXTERNALSYM STATUS_INVALID_IMAGE_NOT_MZ}
-
-//
-// MessageId: STATUS_INVALID_IMAGE_PROTECT
-//
-// MessageText:
-//
-// The specified image file did not have the correct format, it did not have a proper e_lfarlc in the MZ header.
-//
-
- STATUS_INVALID_IMAGE_PROTECT = NTSTATUS($C0000130);
- {$EXTERNALSYM STATUS_INVALID_IMAGE_PROTECT}
-
-//
-// MessageId: STATUS_INVALID_IMAGE_WIN_16
-//
-// MessageText:
-//
-// The specified image file did not have the correct format, it appears to be a 16-bit Windows image.
-//
-
- STATUS_INVALID_IMAGE_WIN_16 = NTSTATUS($C0000131);
- {$EXTERNALSYM STATUS_INVALID_IMAGE_WIN_16}
-
-//
-// MessageId: STATUS_LOGON_SERVER_CONFLICT
-//
-// MessageText:
-//
-// The Netlogon service cannot start because another Netlogon service running in the domain conflicts with the specified role.
-//
-
- STATUS_LOGON_SERVER_CONFLICT = NTSTATUS($C0000132);
- {$EXTERNALSYM STATUS_LOGON_SERVER_CONFLICT}
-
-//
-// MessageId: STATUS_TIME_DIFFERENCE_AT_DC
-//
-// MessageText:
-//
-// The time at the Primary Domain Controller is different than the time at the Backup Domain Controller or member server by too large an amount.
-//
-
- STATUS_TIME_DIFFERENCE_AT_DC = NTSTATUS($C0000133);
- {$EXTERNALSYM STATUS_TIME_DIFFERENCE_AT_DC}
-
-//
-// MessageId: STATUS_SYNCHRONIZATION_REQUIRED
-//
-// MessageText:
-//
-// The SAM database on a Windows Server is significantly out of synchronization with the copy on the Domain Controller. A complete synchronization is required.
-//
-
- STATUS_SYNCHRONIZATION_REQUIRED = NTSTATUS($C0000134);
- {$EXTERNALSYM STATUS_SYNCHRONIZATION_REQUIRED}
-
-//
-// MessageId: STATUS_DLL_NOT_FOUND
-//
-// MessageText:
-//
-// {Unable To Locate DLL}
-// The dynamic link library %hs could not be found in the specified path %hs.
-//
-
- STATUS_DLL_NOT_FOUND = NTSTATUS($C0000135);
- {$EXTERNALSYM STATUS_DLL_NOT_FOUND}
-
-//
-// MessageId: STATUS_OPEN_FAILED
-//
-// MessageText:
-//
-// The NtCreateFile API failed. This error should never be returned to an application, it is a place holder for the Windows Lan Manager Redirector to use in its internal error mapping routines.
-//
-
- STATUS_OPEN_FAILED = NTSTATUS($C0000136);
- {$EXTERNALSYM STATUS_OPEN_FAILED}
-
-//
-// MessageId: STATUS_IO_PRIVILEGE_FAILED
-//
-// MessageText:
-//
-// {Privilege Failed}
-// The I/O permissions for the process could not be changed.
-//
-
- STATUS_IO_PRIVILEGE_FAILED = NTSTATUS($C0000137);
- {$EXTERNALSYM STATUS_IO_PRIVILEGE_FAILED}
-
-//
-// MessageId: STATUS_ORDINAL_NOT_FOUND
-//
-// MessageText:
-//
-// {Ordinal Not Found}
-// The ordinal %ld could not be located in the dynamic link library %hs.
-//
-
- STATUS_ORDINAL_NOT_FOUND = NTSTATUS($C0000138);
- {$EXTERNALSYM STATUS_ORDINAL_NOT_FOUND}
-
-//
-// MessageId: STATUS_ENTRYPOINT_NOT_FOUND
-//
-// MessageText:
-//
-// {Entry Point Not Found}
-// The procedure entry point %hs could not be located in the dynamic link library %hs.
-//
-
- STATUS_ENTRYPOINT_NOT_FOUND = NTSTATUS($C0000139);
- {$EXTERNALSYM STATUS_ENTRYPOINT_NOT_FOUND}
-
-//
-// MessageId: STATUS_CONTROL_C_EXIT
-//
-// MessageText:
-//
-// {Application Exit by CTRL+C}
-// The application terminated as a result of a CTRL+C.
-//
-
- STATUS_CONTROL_C_EXIT = NTSTATUS($C000013A); // winnt
- {$EXTERNALSYM STATUS_CONTROL_C_EXIT}
-
-//
-// MessageId: STATUS_LOCAL_DISCONNECT
-//
-// MessageText:
-//
-// {Virtual Circuit Closed}
-// The network transport on your computer has closed a network connection. There may or may not be I/O requests outstanding.
-//
-
- STATUS_LOCAL_DISCONNECT = NTSTATUS($C000013B);
- {$EXTERNALSYM STATUS_LOCAL_DISCONNECT}
-
-//
-// MessageId: STATUS_REMOTE_DISCONNECT
-//
-// MessageText:
-//
-// {Virtual Circuit Closed}
-// The network transport on a remote computer has closed a network connection. There may or may not be I/O requests outstanding.
-//
-
- STATUS_REMOTE_DISCONNECT = NTSTATUS($C000013C);
- {$EXTERNALSYM STATUS_REMOTE_DISCONNECT}
-
-//
-// MessageId: STATUS_REMOTE_RESOURCES
-//
-// MessageText:
-//
-// {Insufficient Resources on Remote Computer}
-// The remote computer has insufficient resources to complete the network request. For instance, there may not be enough memory available on the remote computer to carry out the request at this time.
-//
-
- STATUS_REMOTE_RESOURCES = NTSTATUS($C000013D);
- {$EXTERNALSYM STATUS_REMOTE_RESOURCES}
-
-//
-// MessageId: STATUS_LINK_FAILED
-//
-// MessageText:
-//
-// {Virtual Circuit Closed}
-// An existing connection (virtual circuit) has been broken at the remote computer. There is probably something wrong with the network software protocol or the network hardware on the remote computer.
-//
-
- STATUS_LINK_FAILED = NTSTATUS($C000013E);
- {$EXTERNALSYM STATUS_LINK_FAILED}
-
-//
-// MessageId: STATUS_LINK_TIMEOUT
-//
-// MessageText:
-//
-// {Virtual Circuit Closed}
-// The network transport on your computer has closed a network connection because it had to wait too long for a response from the remote computer.
-//
-
- STATUS_LINK_TIMEOUT = NTSTATUS($C000013F);
- {$EXTERNALSYM STATUS_LINK_TIMEOUT}
-
-//
-// MessageId: STATUS_INVALID_CONNECTION
-//
-// MessageText:
-//
-// The connection handle given to the transport was invalid.
-//
-
- STATUS_INVALID_CONNECTION = NTSTATUS($C0000140);
- {$EXTERNALSYM STATUS_INVALID_CONNECTION}
-
-//
-// MessageId: STATUS_INVALID_ADDRESS
-//
-// MessageText:
-//
-// The address handle given to the transport was invalid.
-//
-
- STATUS_INVALID_ADDRESS = NTSTATUS($C0000141);
- {$EXTERNALSYM STATUS_INVALID_ADDRESS}
-
-//
-// MessageId: STATUS_DLL_INIT_FAILED
-//
-// MessageText:
-//
-// {DLL Initialization Failed}
-// Initialization of the dynamic link library %hs failed. The process is terminating abnormally.
-//
-
- STATUS_DLL_INIT_FAILED = NTSTATUS($C0000142);
- {$EXTERNALSYM STATUS_DLL_INIT_FAILED}
-
-//
-// MessageId: STATUS_MISSING_SYSTEMFILE
-//
-// MessageText:
-//
-// {Missing System File}
-// The required system file %hs is bad or missing.
-//
-
- STATUS_MISSING_SYSTEMFILE = NTSTATUS($C0000143);
- {$EXTERNALSYM STATUS_MISSING_SYSTEMFILE}
-
-//
-// MessageId: STATUS_UNHANDLED_EXCEPTION
-//
-// MessageText:
-//
-// {Application Error}
-// The exception %s (0x%08lx) occurred in the application at location 0x%08lx.
-//
-
- STATUS_UNHANDLED_EXCEPTION = NTSTATUS($C0000144);
- {$EXTERNALSYM STATUS_UNHANDLED_EXCEPTION}
-
-//
-// MessageId: STATUS_APP_INIT_FAILURE
-//
-// MessageText:
-//
-// {Application Error}
-// The application failed to initialize properly (0x%lx). Click on OK to terminate the application.
-//
-
- STATUS_APP_INIT_FAILURE = NTSTATUS($C0000145);
- {$EXTERNALSYM STATUS_APP_INIT_FAILURE}
-
-//
-// MessageId: STATUS_PAGEFILE_CREATE_FAILED
-//
-// MessageText:
-//
-// {Unable to Create Paging File}
-// The creation of the paging file %hs failed (%lx). The requested size was %ld.
-//
-
- STATUS_PAGEFILE_CREATE_FAILED = NTSTATUS($C0000146);
- {$EXTERNALSYM STATUS_PAGEFILE_CREATE_FAILED}
-
-//
-// MessageId: STATUS_NO_PAGEFILE
-//
-// MessageText:
-//
-// {No Paging File Specified}
-// No paging file was specified in the system configuration.
-//
-
- STATUS_NO_PAGEFILE = NTSTATUS($C0000147);
- {$EXTERNALSYM STATUS_NO_PAGEFILE}
-
-//
-// MessageId: STATUS_INVALID_LEVEL
-//
-// MessageText:
-//
-// {Incorrect System Call Level}
-// An invalid level was passed into the specified system call.
-//
-
- STATUS_INVALID_LEVEL = NTSTATUS($C0000148);
- {$EXTERNALSYM STATUS_INVALID_LEVEL}
-
-//
-// MessageId: STATUS_WRONG_PASSWORD_CORE
-//
-// MessageText:
-//
-// {Incorrect Password to LAN Manager Server}
-// You specified an incorrect password to a LAN Manager 2.x or MS-NET server.
-//
-
- STATUS_WRONG_PASSWORD_CORE = NTSTATUS($C0000149);
- {$EXTERNALSYM STATUS_WRONG_PASSWORD_CORE}
-
-//
-// MessageId: STATUS_ILLEGAL_FLOAT_CONTEXT
-//
-// MessageText:
-//
-// {EXCEPTION}
-// A real-mode application issued a floating-point instruction and floating-point hardware is not present.
-//
-
- STATUS_ILLEGAL_FLOAT_CONTEXT = NTSTATUS($C000014A);
- {$EXTERNALSYM STATUS_ILLEGAL_FLOAT_CONTEXT}
-
-//
-// MessageId: STATUS_PIPE_BROKEN
-//
-// MessageText:
-//
-// The pipe operation has failed because the other end of the pipe has been closed.
-//
-
- STATUS_PIPE_BROKEN = NTSTATUS($C000014B);
- {$EXTERNALSYM STATUS_PIPE_BROKEN}
-
-//
-// MessageId: STATUS_REGISTRY_CORRUPT
-//
-// MessageText:
-//
-// {The Registry Is Corrupt}
-// The structure of one of the files that contains Registry data is corrupt, or the image of the file in memory is corrupt, or the file could not be recovered because the alternate copy or log was absent or corrupt.
-//
-
- STATUS_REGISTRY_CORRUPT = NTSTATUS($C000014C);
- {$EXTERNALSYM STATUS_REGISTRY_CORRUPT}
-
-//
-// MessageId: STATUS_REGISTRY_IO_FAILED
-//
-// MessageText:
-//
-// An I/O operation initiated by the Registry failed unrecoverably.
-// The Registry could not read in, or write out, or flush, one of the files that contain the system's image of the Registry.
-//
-
- STATUS_REGISTRY_IO_FAILED = NTSTATUS($C000014D);
- {$EXTERNALSYM STATUS_REGISTRY_IO_FAILED}
-
-//
-// MessageId: STATUS_NO_EVENT_PAIR
-//
-// MessageText:
-//
-// An event pair synchronization operation was performed using the thread specific client/server event pair object, but no event pair object was associated with the thread.
-//
-
- STATUS_NO_EVENT_PAIR = NTSTATUS($C000014E);
- {$EXTERNALSYM STATUS_NO_EVENT_PAIR}
-
-//
-// MessageId: STATUS_UNRECOGNIZED_VOLUME
-//
-// MessageText:
-//
-// The volume does not contain a recognized file system.
-// Please make sure that all required file system drivers are loaded and that the volume is not corrupt.
-//
-
- STATUS_UNRECOGNIZED_VOLUME = NTSTATUS($C000014F);
- {$EXTERNALSYM STATUS_UNRECOGNIZED_VOLUME}
-
-//
-// MessageId: STATUS_SERIAL_NO_DEVICE_INITED
-//
-// MessageText:
-//
-// No serial device was successfully initialized. The serial driver will unload.
-//
-
- STATUS_SERIAL_NO_DEVICE_INITED = NTSTATUS($C0000150);
- {$EXTERNALSYM STATUS_SERIAL_NO_DEVICE_INITED}
-
-//
-// MessageId: STATUS_NO_SUCH_ALIAS
-//
-// MessageText:
-//
-// The specified local group does not exist.
-//
-
- STATUS_NO_SUCH_ALIAS = NTSTATUS($C0000151);
- {$EXTERNALSYM STATUS_NO_SUCH_ALIAS}
-
-//
-// MessageId: STATUS_MEMBER_NOT_IN_ALIAS
-//
-// MessageText:
-//
-// The specified account name is not a member of the local group.
-//
-
- STATUS_MEMBER_NOT_IN_ALIAS = NTSTATUS($C0000152);
- {$EXTERNALSYM STATUS_MEMBER_NOT_IN_ALIAS}
-
-//
-// MessageId: STATUS_MEMBER_IN_ALIAS
-//
-// MessageText:
-//
-// The specified account name is already a member of the local group.
-//
-
- STATUS_MEMBER_IN_ALIAS = NTSTATUS($C0000153);
- {$EXTERNALSYM STATUS_MEMBER_IN_ALIAS}
-
-//
-// MessageId: STATUS_ALIAS_EXISTS
-//
-// MessageText:
-//
-// The specified local group already exists.
-//
-
- STATUS_ALIAS_EXISTS = NTSTATUS($C0000154);
- {$EXTERNALSYM STATUS_ALIAS_EXISTS}
-
-//
-// MessageId: STATUS_LOGON_NOT_GRANTED
-//
-// MessageText:
-//
-// A requested type of logon (e.g., Interactive, Network, Service) is not granted by the target system's local security policy.
-// Please ask the system administrator to grant the necessary form of logon.
-//
-
- STATUS_LOGON_NOT_GRANTED = NTSTATUS($C0000155);
- {$EXTERNALSYM STATUS_LOGON_NOT_GRANTED}
-
-//
-// MessageId: STATUS_TOO_MANY_SECRETS
-//
-// MessageText:
-//
-// The maximum number of secrets that may be stored in a single system has been exceeded. The length and number of secrets is limited to satisfy United States State Department export restrictions.
-//
-
- STATUS_TOO_MANY_SECRETS = NTSTATUS($C0000156);
- {$EXTERNALSYM STATUS_TOO_MANY_SECRETS}
-
-//
-// MessageId: STATUS_SECRET_TOO_LONG
-//
-// MessageText:
-//
-// The length of a secret exceeds the maximum length allowed. The length and number of secrets is limited to satisfy United States State Department export restrictions.
-//
-
- STATUS_SECRET_TOO_LONG = NTSTATUS($C0000157);
- {$EXTERNALSYM STATUS_SECRET_TOO_LONG}
-
-//
-// MessageId: STATUS_INTERNAL_DB_ERROR
-//
-// MessageText:
-//
-// The Local Security Authority (LSA) database contains an internal inconsistency.
-//
-
- STATUS_INTERNAL_DB_ERROR = NTSTATUS($C0000158);
- {$EXTERNALSYM STATUS_INTERNAL_DB_ERROR}
-
-//
-// MessageId: STATUS_FULLSCREEN_MODE
-//
-// MessageText:
-//
-// The requested operation cannot be performed in fullscreen mode.
-//
-
- STATUS_FULLSCREEN_MODE = NTSTATUS($C0000159);
- {$EXTERNALSYM STATUS_FULLSCREEN_MODE}
-
-//
-// MessageId: STATUS_TOO_MANY_CONTEXT_IDS
-//
-// MessageText:
-//
-// During a logon attempt, the user's security context accumulated too many security IDs. This is a very unusual situation.
-// Remove the user from some global or local groups to reduce the number of security ids to incorporate into the security context.
-//
-
- STATUS_TOO_MANY_CONTEXT_IDS = NTSTATUS($C000015A);
- {$EXTERNALSYM STATUS_TOO_MANY_CONTEXT_IDS}
-
-//
-// MessageId: STATUS_LOGON_TYPE_NOT_GRANTED
-//
-// MessageText:
-//
-// A user has requested a type of logon (e.g., interactive or network) that has not been granted. An administrator has control over who may logon interactively and through the network.
-//
-
- STATUS_LOGON_TYPE_NOT_GRANTED = NTSTATUS($C000015B);
- {$EXTERNALSYM STATUS_LOGON_TYPE_NOT_GRANTED}
-
-//
-// MessageId: STATUS_NOT_REGISTRY_FILE
-//
-// MessageText:
-//
-// The system has attempted to load or restore a file into the registry, and the specified file is not in the format of a registry file.
-//
-
- STATUS_NOT_REGISTRY_FILE = NTSTATUS($C000015C);
- {$EXTERNALSYM STATUS_NOT_REGISTRY_FILE}
-
-//
-// MessageId: STATUS_NT_CROSS_ENCRYPTION_REQUIRED
-//
-// MessageText:
-//
-// An attempt was made to change a user password in the security account manager without providing the necessary Windows cross-encrypted password.
-//
-
- STATUS_NT_CROSS_ENCRYPTION_REQUIRED = NTSTATUS($C000015D);
- {$EXTERNALSYM STATUS_NT_CROSS_ENCRYPTION_REQUIRED}
-
-//
-// MessageId: STATUS_DOMAIN_CTRLR_CONFIG_ERROR
-//
-// MessageText:
-//
-// A Windows Server has an incorrect configuration.
-//
-
- STATUS_DOMAIN_CTRLR_CONFIG_ERROR = NTSTATUS($C000015E);
- {$EXTERNALSYM STATUS_DOMAIN_CTRLR_CONFIG_ERROR}
-
-//
-// MessageId: STATUS_FT_MISSING_MEMBER
-//
-// MessageText:
-//
-// An attempt was made to explicitly access the secondary copy of information via a device control to the Fault Tolerance driver and the secondary copy is not present in the system.
-//
-
- STATUS_FT_MISSING_MEMBER = NTSTATUS($C000015F);
- {$EXTERNALSYM STATUS_FT_MISSING_MEMBER}
-
-//
-// MessageId: STATUS_ILL_FORMED_SERVICE_ENTRY
-//
-// MessageText:
-//
-// A configuration registry node representing a driver service entry was ill-formed and did not contain required value entries.
-//
-
- STATUS_ILL_FORMED_SERVICE_ENTRY = NTSTATUS($C0000160);
- {$EXTERNALSYM STATUS_ILL_FORMED_SERVICE_ENTRY}
-
-//
-// MessageId: STATUS_ILLEGAL_CHARACTER
-//
-// MessageText:
-//
-// An illegal character was encountered. For a multi-byte character set this includes a lead byte without a succeeding trail byte. For the Unicode character set this includes the characters 0xFFFF and 0xFFFE.
-//
-
- STATUS_ILLEGAL_CHARACTER = NTSTATUS($C0000161);
- {$EXTERNALSYM STATUS_ILLEGAL_CHARACTER}
-
-//
-// MessageId: STATUS_UNMAPPABLE_CHARACTER
-//
-// MessageText:
-//
-// No mapping for the Unicode character exists in the target multi-byte code page.
-//
-
- STATUS_UNMAPPABLE_CHARACTER = NTSTATUS($C0000162);
- {$EXTERNALSYM STATUS_UNMAPPABLE_CHARACTER}
-
-//
-// MessageId: STATUS_UNDEFINED_CHARACTER
-//
-// MessageText:
-//
-// The Unicode character is not defined in the Unicode character set installed on the system.
-//
-
- STATUS_UNDEFINED_CHARACTER = NTSTATUS($C0000163);
- {$EXTERNALSYM STATUS_UNDEFINED_CHARACTER}
-
-//
-// MessageId: STATUS_FLOPPY_VOLUME
-//
-// MessageText:
-//
-// The paging file cannot be created on a floppy diskette.
-//
-
- STATUS_FLOPPY_VOLUME = NTSTATUS($C0000164);
- {$EXTERNALSYM STATUS_FLOPPY_VOLUME}
-
-//
-// MessageId: STATUS_FLOPPY_ID_MARK_NOT_FOUND
-//
-// MessageText:
-//
-// {Floppy Disk Error}
-// While accessing a floppy disk, an ID address mark was not found.
-//
-
- STATUS_FLOPPY_ID_MARK_NOT_FOUND = NTSTATUS($C0000165);
- {$EXTERNALSYM STATUS_FLOPPY_ID_MARK_NOT_FOUND}
-
-//
-// MessageId: STATUS_FLOPPY_WRONG_CYLINDER
-//
-// MessageText:
-//
-// {Floppy Disk Error}
-// While accessing a floppy disk, the track address from the sector ID field was found to be different than the track address maintained by the controller.
-//
-
- STATUS_FLOPPY_WRONG_CYLINDER = NTSTATUS($C0000166);
- {$EXTERNALSYM STATUS_FLOPPY_WRONG_CYLINDER}
-
-//
-// MessageId: STATUS_FLOPPY_UNKNOWN_ERROR
-//
-// MessageText:
-//
-// {Floppy Disk Error}
-// The floppy disk controller reported an error that is not recognized by the floppy disk driver.
-//
-
- STATUS_FLOPPY_UNKNOWN_ERROR = NTSTATUS($C0000167);
- {$EXTERNALSYM STATUS_FLOPPY_UNKNOWN_ERROR}
-
-//
-// MessageId: STATUS_FLOPPY_BAD_REGISTERS
-//
-// MessageText:
-//
-// {Floppy Disk Error}
-// While accessing a floppy-disk, the controller returned inconsistent results via its registers.
-//
-
- STATUS_FLOPPY_BAD_REGISTERS = NTSTATUS($C0000168);
- {$EXTERNALSYM STATUS_FLOPPY_BAD_REGISTERS}
-
-//
-// MessageId: STATUS_DISK_RECALIBRATE_FAILED
-//
-// MessageText:
-//
-// {Hard Disk Error}
-// While accessing the hard disk, a recalibrate operation failed, even after retries.
-//
-
- STATUS_DISK_RECALIBRATE_FAILED = NTSTATUS($C0000169);
- {$EXTERNALSYM STATUS_DISK_RECALIBRATE_FAILED}
-
-//
-// MessageId: STATUS_DISK_OPERATION_FAILED
-//
-// MessageText:
-//
-// {Hard Disk Error}
-// While accessing the hard disk, a disk operation failed even after retries.
-//
-
- STATUS_DISK_OPERATION_FAILED = NTSTATUS($C000016A);
- {$EXTERNALSYM STATUS_DISK_OPERATION_FAILED}
-
-//
-// MessageId: STATUS_DISK_RESET_FAILED
-//
-// MessageText:
-//
-// {Hard Disk Error}
-// While accessing the hard disk, a disk controller reset was needed, but even that failed.
-//
-
- STATUS_DISK_RESET_FAILED = NTSTATUS($C000016B);
- {$EXTERNALSYM STATUS_DISK_RESET_FAILED}
-
-//
-// MessageId: STATUS_SHARED_IRQ_BUSY
-//
-// MessageText:
-//
-// An attempt was made to open a device that was sharing an IRQ with other devices.
-// At least one other device that uses that IRQ was already opened.
-// Two concurrent opens of devices that share an IRQ and only work via interrupts is not supported for the particular bus type that the devices use.
-//
-
- STATUS_SHARED_IRQ_BUSY = NTSTATUS($C000016C);
- {$EXTERNALSYM STATUS_SHARED_IRQ_BUSY}
-
-//
-// MessageId: STATUS_FT_ORPHANING
-//
-// MessageText:
-//
-// {FT Orphaning}
-// A disk that is part of a fault-tolerant volume can no longer be accessed.
-//
-
- STATUS_FT_ORPHANING = NTSTATUS($C000016D);
- {$EXTERNALSYM STATUS_FT_ORPHANING}
-
-//
-// MessageId: STATUS_BIOS_FAILED_TO_CONNECT_INTERRUPT
-//
-// MessageText:
-//
-// The system bios failed to connect a system interrupt to the device or bus for
-// which the device is connected.
-//
-
- STATUS_BIOS_FAILED_TO_CONNECT_INTERRUPT = NTSTATUS($C000016E);
- {$EXTERNALSYM STATUS_BIOS_FAILED_TO_CONNECT_INTERRUPT}
-
-//
-// MessageId: STATUS_PARTITION_FAILURE
-//
-// MessageText:
-//
-// Tape could not be partitioned.
-//
-
- STATUS_PARTITION_FAILURE = NTSTATUS($C0000172);
- {$EXTERNALSYM STATUS_PARTITION_FAILURE}
-
-//
-// MessageId: STATUS_INVALID_BLOCK_LENGTH
-//
-// MessageText:
-//
-// When accessing a new tape of a multivolume partition, the current blocksize is incorrect.
-//
-
- STATUS_INVALID_BLOCK_LENGTH = NTSTATUS($C0000173);
- {$EXTERNALSYM STATUS_INVALID_BLOCK_LENGTH}
-
-//
-// MessageId: STATUS_DEVICE_NOT_PARTITIONED
-//
-// MessageText:
-//
-// Tape partition information could not be found when loading a tape.
-//
-
- STATUS_DEVICE_NOT_PARTITIONED = NTSTATUS($C0000174);
- {$EXTERNALSYM STATUS_DEVICE_NOT_PARTITIONED}
-
-//
-// MessageId: STATUS_UNABLE_TO_LOCK_MEDIA
-//
-// MessageText:
-//
-// Attempt to lock the eject media mechanism fails.
-//
-
- STATUS_UNABLE_TO_LOCK_MEDIA = NTSTATUS($C0000175);
- {$EXTERNALSYM STATUS_UNABLE_TO_LOCK_MEDIA}
-
-//
-// MessageId: STATUS_UNABLE_TO_UNLOAD_MEDIA
-//
-// MessageText:
-//
-// Unload media fails.
-//
-
- STATUS_UNABLE_TO_UNLOAD_MEDIA = NTSTATUS($C0000176);
- {$EXTERNALSYM STATUS_UNABLE_TO_UNLOAD_MEDIA}
-
-//
-// MessageId: STATUS_EOM_OVERFLOW
-//
-// MessageText:
-//
-// Physical end of tape was detected.
-//
-
- STATUS_EOM_OVERFLOW = NTSTATUS($C0000177);
- {$EXTERNALSYM STATUS_EOM_OVERFLOW}
-
-//
-// MessageId: STATUS_NO_MEDIA
-//
-// MessageText:
-//
-// {No Media}
-// There is no media in the drive.
-// Please insert media into drive %hs.
-//
-
- STATUS_NO_MEDIA = NTSTATUS($C0000178);
- {$EXTERNALSYM STATUS_NO_MEDIA}
-
-//
-// MessageId: STATUS_NO_SUCH_MEMBER
-//
-// MessageText:
-//
-// A member could not be added to or removed from the local group because the member does not exist.
-//
-
- STATUS_NO_SUCH_MEMBER = NTSTATUS($C000017A);
- {$EXTERNALSYM STATUS_NO_SUCH_MEMBER}
-
-//
-// MessageId: STATUS_INVALID_MEMBER
-//
-// MessageText:
-//
-// A new member could not be added to a local group because the member has the wrong account type.
-//
-
- STATUS_INVALID_MEMBER = NTSTATUS($C000017B);
- {$EXTERNALSYM STATUS_INVALID_MEMBER}
-
-//
-// MessageId: STATUS_KEY_DELETED
-//
-// MessageText:
-//
-// Illegal operation attempted on a registry key which has been marked for deletion.
-//
-
- STATUS_KEY_DELETED = NTSTATUS($C000017C);
- {$EXTERNALSYM STATUS_KEY_DELETED}
-
-//
-// MessageId: STATUS_NO_LOG_SPACE
-//
-// MessageText:
-//
-// System could not allocate required space in a registry log.
-//
-
- STATUS_NO_LOG_SPACE = NTSTATUS($C000017D);
- {$EXTERNALSYM STATUS_NO_LOG_SPACE}
-
-//
-// MessageId: STATUS_TOO_MANY_SIDS
-//
-// MessageText:
-//
-// Too many Sids have been specified.
-//
-
- STATUS_TOO_MANY_SIDS = NTSTATUS($C000017E);
- {$EXTERNALSYM STATUS_TOO_MANY_SIDS}
-
-//
-// MessageId: STATUS_LM_CROSS_ENCRYPTION_REQUIRED
-//
-// MessageText:
-//
-// An attempt was made to change a user password in the security account manager without providing the necessary LM cross-encrypted password.
-//
-
- STATUS_LM_CROSS_ENCRYPTION_REQUIRED = NTSTATUS($C000017F);
- {$EXTERNALSYM STATUS_LM_CROSS_ENCRYPTION_REQUIRED}
-
-//
-// MessageId: STATUS_KEY_HAS_CHILDREN
-//
-// MessageText:
-//
-// An attempt was made to create a symbolic link in a registry key that already has subkeys or values.
-//
-
- STATUS_KEY_HAS_CHILDREN = NTSTATUS($C0000180);
- {$EXTERNALSYM STATUS_KEY_HAS_CHILDREN}
-
-//
-// MessageId: STATUS_CHILD_MUST_BE_VOLATILE
-//
-// MessageText:
-//
-// An attempt was made to create a Stable subkey under a Volatile parent key.
-//
-
- STATUS_CHILD_MUST_BE_VOLATILE = NTSTATUS($C0000181);
- {$EXTERNALSYM STATUS_CHILD_MUST_BE_VOLATILE}
-
-//
-// MessageId: STATUS_DEVICE_CONFIGURATION_ERROR
-//
-// MessageText:
-//
-// The I/O device is configured incorrectly or the configuration parameters to the driver are incorrect.
-//
-
- STATUS_DEVICE_CONFIGURATION_ERROR = NTSTATUS($C0000182);
- {$EXTERNALSYM STATUS_DEVICE_CONFIGURATION_ERROR}
-
-//
-// MessageId: STATUS_DRIVER_INTERNAL_ERROR
-//
-// MessageText:
-//
-// An error was detected between two drivers or within an I/O driver.
-//
-
- STATUS_DRIVER_INTERNAL_ERROR = NTSTATUS($C0000183);
- {$EXTERNALSYM STATUS_DRIVER_INTERNAL_ERROR}
-
-//
-// MessageId: STATUS_INVALID_DEVICE_STATE
-//
-// MessageText:
-//
-// The device is not in a valid state to perform this request.
-//
-
- STATUS_INVALID_DEVICE_STATE = NTSTATUS($C0000184);
- {$EXTERNALSYM STATUS_INVALID_DEVICE_STATE}
-
-//
-// MessageId: STATUS_IO_DEVICE_ERROR
-//
-// MessageText:
-//
-// The I/O device reported an I/O error.
-//
-
- STATUS_IO_DEVICE_ERROR = NTSTATUS($C0000185);
- {$EXTERNALSYM STATUS_IO_DEVICE_ERROR}
-
-//
-// MessageId: STATUS_DEVICE_PROTOCOL_ERROR
-//
-// MessageText:
-//
-// A protocol error was detected between the driver and the device.
-//
-
- STATUS_DEVICE_PROTOCOL_ERROR = NTSTATUS($C0000186);
- {$EXTERNALSYM STATUS_DEVICE_PROTOCOL_ERROR}
-
-//
-// MessageId: STATUS_BACKUP_CONTROLLER
-//
-// MessageText:
-//
-// This operation is only allowed for the Primary Domain Controller of the domain.
-//
-
- STATUS_BACKUP_CONTROLLER = NTSTATUS($C0000187);
- {$EXTERNALSYM STATUS_BACKUP_CONTROLLER}
-
-//
-// MessageId: STATUS_LOG_FILE_FULL
-//
-// MessageText:
-//
-// Log file space is insufficient to support this operation.
-//
-
- STATUS_LOG_FILE_FULL = NTSTATUS($C0000188);
- {$EXTERNALSYM STATUS_LOG_FILE_FULL}
-
-//
-// MessageId: STATUS_TOO_LATE
-//
-// MessageText:
-//
-// A write operation was attempted to a volume after it was dismounted.
-//
-
- STATUS_TOO_LATE = NTSTATUS($C0000189);
- {$EXTERNALSYM STATUS_TOO_LATE}
-
-//
-// MessageId: STATUS_NO_TRUST_LSA_SECRET
-//
-// MessageText:
-//
-// The workstation does not have a trust secret for the primary domain in the local LSA database.
-//
-
- STATUS_NO_TRUST_LSA_SECRET = NTSTATUS($C000018A);
- {$EXTERNALSYM STATUS_NO_TRUST_LSA_SECRET}
-
-//
-// MessageId: STATUS_NO_TRUST_SAM_ACCOUNT
-//
-// MessageText:
-//
-// The SAM database on the Windows Server does not have a computer account for this workstation trust relationship.
-//
-
- STATUS_NO_TRUST_SAM_ACCOUNT = NTSTATUS($C000018B);
- {$EXTERNALSYM STATUS_NO_TRUST_SAM_ACCOUNT}
-
-//
-// MessageId: STATUS_TRUSTED_DOMAIN_FAILURE
-//
-// MessageText:
-//
-// The logon request failed because the trust relationship between the primary domain and the trusted domain failed.
-//
-
- STATUS_TRUSTED_DOMAIN_FAILURE = NTSTATUS($C000018C);
- {$EXTERNALSYM STATUS_TRUSTED_DOMAIN_FAILURE}
-
-//
-// MessageId: STATUS_TRUSTED_RELATIONSHIP_FAILURE
-//
-// MessageText:
-//
-// The logon request failed because the trust relationship between this workstation and the primary domain failed.
-//
-
- STATUS_TRUSTED_RELATIONSHIP_FAILURE = NTSTATUS($C000018D);
- {$EXTERNALSYM STATUS_TRUSTED_RELATIONSHIP_FAILURE}
-
-//
-// MessageId: STATUS_EVENTLOG_FILE_CORRUPT
-//
-// MessageText:
-//
-// The Eventlog log file is corrupt.
-//
-
- STATUS_EVENTLOG_FILE_CORRUPT = NTSTATUS($C000018E);
- {$EXTERNALSYM STATUS_EVENTLOG_FILE_CORRUPT}
-
-//
-// MessageId: STATUS_EVENTLOG_CANT_START
-//
-// MessageText:
-//
-// No Eventlog log file could be opened. The Eventlog service did not start.
-//
-
- STATUS_EVENTLOG_CANT_START = NTSTATUS($C000018F);
- {$EXTERNALSYM STATUS_EVENTLOG_CANT_START}
-
-//
-// MessageId: STATUS_TRUST_FAILURE
-//
-// MessageText:
-//
-// The network logon failed. This may be because the validation authority can't be reached.
-//
-
- STATUS_TRUST_FAILURE = NTSTATUS($C0000190);
- {$EXTERNALSYM STATUS_TRUST_FAILURE}
-
-//
-// MessageId: STATUS_MUTANT_LIMIT_EXCEEDED
-//
-// MessageText:
-//
-// An attempt was made to acquire a mutant such that its maximum count would have been exceeded.
-//
-
- STATUS_MUTANT_LIMIT_EXCEEDED = NTSTATUS($C0000191);
- {$EXTERNALSYM STATUS_MUTANT_LIMIT_EXCEEDED}
-
-//
-// MessageId: STATUS_NETLOGON_NOT_STARTED
-//
-// MessageText:
-//
-// An attempt was made to logon, but the netlogon service was not started.
-//
-
- STATUS_NETLOGON_NOT_STARTED = NTSTATUS($C0000192);
- {$EXTERNALSYM STATUS_NETLOGON_NOT_STARTED}
-
-//
-// MessageId: STATUS_ACCOUNT_EXPIRED
-//
-// MessageText:
-//
-// The user's account has expired.
-//
-
- STATUS_ACCOUNT_EXPIRED = NTSTATUS($C0000193); // ntsubauth
- {$EXTERNALSYM STATUS_ACCOUNT_EXPIRED}
-
-//
-// MessageId: STATUS_POSSIBLE_DEADLOCK
-//
-// MessageText:
-//
-// {EXCEPTION}
-// Possible deadlock condition.
-//
-
- STATUS_POSSIBLE_DEADLOCK = NTSTATUS($C0000194);
- {$EXTERNALSYM STATUS_POSSIBLE_DEADLOCK}
-
-//
-// MessageId: STATUS_NETWORK_CREDENTIAL_CONFLICT
-//
-// MessageText:
-//
-// The credentials supplied conflict with an existing set of credentials.
-//
-
- STATUS_NETWORK_CREDENTIAL_CONFLICT = NTSTATUS($C0000195);
- {$EXTERNALSYM STATUS_NETWORK_CREDENTIAL_CONFLICT}
-
-//
-// MessageId: STATUS_REMOTE_SESSION_LIMIT
-//
-// MessageText:
-//
-// An attempt was made to establish a session to a network server, but there are already too many sessions established to that server.
-//
-
- STATUS_REMOTE_SESSION_LIMIT = NTSTATUS($C0000196);
- {$EXTERNALSYM STATUS_REMOTE_SESSION_LIMIT}
-
-//
-// MessageId: STATUS_EVENTLOG_FILE_CHANGED
-//
-// MessageText:
-//
-// The log file has changed between reads.
-//
-
- STATUS_EVENTLOG_FILE_CHANGED = NTSTATUS($C0000197);
- {$EXTERNALSYM STATUS_EVENTLOG_FILE_CHANGED}
-
-//
-// MessageId: STATUS_NOLOGON_INTERDOMAIN_TRUST_ACCOUNT
-//
-// MessageText:
-//
-// The account used is an Interdomain Trust account. Use your global user account or local user account to access this server.
-//
-
- STATUS_NOLOGON_INTERDOMAIN_TRUST_ACCOUNT = NTSTATUS($C0000198);
- {$EXTERNALSYM STATUS_NOLOGON_INTERDOMAIN_TRUST_ACCOUNT}
-
-//
-// MessageId: STATUS_NOLOGON_WORKSTATION_TRUST_ACCOUNT
-//
-// MessageText:
-//
-// The account used is a Computer Account. Use your global user account or local user account to access this server.
-//
-
- STATUS_NOLOGON_WORKSTATION_TRUST_ACCOUNT = NTSTATUS($C0000199);
- {$EXTERNALSYM STATUS_NOLOGON_WORKSTATION_TRUST_ACCOUNT}
-
-//
-// MessageId: STATUS_NOLOGON_SERVER_TRUST_ACCOUNT
-//
-// MessageText:
-//
-// The account used is an Server Trust account. Use your global user account or local user account to access this server.
-//
-
- STATUS_NOLOGON_SERVER_TRUST_ACCOUNT = NTSTATUS($C000019A);
- {$EXTERNALSYM STATUS_NOLOGON_SERVER_TRUST_ACCOUNT}
-
-//
-// MessageId: STATUS_DOMAIN_TRUST_INCONSISTENT
-//
-// MessageText:
-//
-// The name or SID of the domain specified is inconsistent with the trust information for that domain.
-//
-
- STATUS_DOMAIN_TRUST_INCONSISTENT = NTSTATUS($C000019B);
- {$EXTERNALSYM STATUS_DOMAIN_TRUST_INCONSISTENT}
-
-//
-// MessageId: STATUS_FS_DRIVER_REQUIRED
-//
-// MessageText:
-//
-// A volume has been accessed for which a file system driver is required that has not yet been loaded.
-//
-
- STATUS_FS_DRIVER_REQUIRED = NTSTATUS($C000019C);
- {$EXTERNALSYM STATUS_FS_DRIVER_REQUIRED}
-
-//
-// MessageId: STATUS_NO_USER_SESSION_KEY
-//
-// MessageText:
-//
-// There is no user session key for the specified logon session.
-//
-
- STATUS_NO_USER_SESSION_KEY = NTSTATUS($C0000202);
- {$EXTERNALSYM STATUS_NO_USER_SESSION_KEY}
-
-//
-// MessageId: STATUS_USER_SESSION_DELETED
-//
-// MessageText:
-//
-// The remote user session has been deleted.
-//
-
- STATUS_USER_SESSION_DELETED = NTSTATUS($C0000203);
- {$EXTERNALSYM STATUS_USER_SESSION_DELETED}
-
-//
-// MessageId: STATUS_RESOURCE_LANG_NOT_FOUND
-//
-// MessageText:
-//
-// Indicates the specified resource language ID cannot be found in the
-// image file.
-//
-
- STATUS_RESOURCE_LANG_NOT_FOUND = NTSTATUS($C0000204);
- {$EXTERNALSYM STATUS_RESOURCE_LANG_NOT_FOUND}
-
-//
-// MessageId: STATUS_INSUFF_SERVER_RESOURCES
-//
-// MessageText:
-//
-// Insufficient server resources exist to complete the request.
-//
-
- STATUS_INSUFF_SERVER_RESOURCES = NTSTATUS($C0000205);
- {$EXTERNALSYM STATUS_INSUFF_SERVER_RESOURCES}
-
-//
-// MessageId: STATUS_INVALID_BUFFER_SIZE
-//
-// MessageText:
-//
-// The size of the buffer is invalid for the specified operation.
-//
-
- STATUS_INVALID_BUFFER_SIZE = NTSTATUS($C0000206);
- {$EXTERNALSYM STATUS_INVALID_BUFFER_SIZE}
-
-//
-// MessageId: STATUS_INVALID_ADDRESS_COMPONENT
-//
-// MessageText:
-//
-// The transport rejected the network address specified as invalid.
-//
-
- STATUS_INVALID_ADDRESS_COMPONENT = NTSTATUS($C0000207);
- {$EXTERNALSYM STATUS_INVALID_ADDRESS_COMPONENT}
-
-//
-// MessageId: STATUS_INVALID_ADDRESS_WILDCARD
-//
-// MessageText:
-//
-// The transport rejected the network address specified due to an
-// invalid use of a wildcard.
-//
-
- STATUS_INVALID_ADDRESS_WILDCARD = NTSTATUS($C0000208);
- {$EXTERNALSYM STATUS_INVALID_ADDRESS_WILDCARD}
-
-//
-// MessageId: STATUS_TOO_MANY_ADDRESSES
-//
-// MessageText:
-//
-// The transport address could not be opened because all the available
-// addresses are in use.
-//
-
- STATUS_TOO_MANY_ADDRESSES = NTSTATUS($C0000209);
- {$EXTERNALSYM STATUS_TOO_MANY_ADDRESSES}
-
-//
-// MessageId: STATUS_ADDRESS_ALREADY_EXISTS
-//
-// MessageText:
-//
-// The transport address could not be opened because it already exists.
-//
-
- STATUS_ADDRESS_ALREADY_EXISTS = NTSTATUS($C000020A);
- {$EXTERNALSYM STATUS_ADDRESS_ALREADY_EXISTS}
-
-//
-// MessageId: STATUS_ADDRESS_CLOSED
-//
-// MessageText:
-//
-// The transport address is now closed.
-//
-
- STATUS_ADDRESS_CLOSED = NTSTATUS($C000020B);
- {$EXTERNALSYM STATUS_ADDRESS_CLOSED}
-
-//
-// MessageId: STATUS_CONNECTION_DISCONNECTED
-//
-// MessageText:
-//
-// The transport connection is now disconnected.
-//
-
- STATUS_CONNECTION_DISCONNECTED = NTSTATUS($C000020C);
- {$EXTERNALSYM STATUS_CONNECTION_DISCONNECTED}
-
-//
-// MessageId: STATUS_CONNECTION_RESET
-//
-// MessageText:
-//
-// The transport connection has been reset.
-//
-
- STATUS_CONNECTION_RESET = NTSTATUS($C000020D);
- {$EXTERNALSYM STATUS_CONNECTION_RESET}
-
-//
-// MessageId: STATUS_TOO_MANY_NODES
-//
-// MessageText:
-//
-// The transport cannot dynamically acquire any more nodes.
-//
-
- STATUS_TOO_MANY_NODES = NTSTATUS($C000020E);
- {$EXTERNALSYM STATUS_TOO_MANY_NODES}
-
-//
-// MessageId: STATUS_TRANSACTION_ABORTED
-//
-// MessageText:
-//
-// The transport aborted a pending transaction.
-//
-
- STATUS_TRANSACTION_ABORTED = NTSTATUS($C000020F);
- {$EXTERNALSYM STATUS_TRANSACTION_ABORTED}
-
-//
-// MessageId: STATUS_TRANSACTION_TIMED_OUT
-//
-// MessageText:
-//
-// The transport timed out a request waiting for a response.
-//
-
- STATUS_TRANSACTION_TIMED_OUT = NTSTATUS($C0000210);
- {$EXTERNALSYM STATUS_TRANSACTION_TIMED_OUT}
-
-//
-// MessageId: STATUS_TRANSACTION_NO_RELEASE
-//
-// MessageText:
-//
-// The transport did not receive a release for a pending response.
-//
-
- STATUS_TRANSACTION_NO_RELEASE = NTSTATUS($C0000211);
- {$EXTERNALSYM STATUS_TRANSACTION_NO_RELEASE}
-
-//
-// MessageId: STATUS_TRANSACTION_NO_MATCH
-//
-// MessageText:
-//
-// The transport did not find a transaction matching the specific
-// token.
-//
-
- STATUS_TRANSACTION_NO_MATCH = NTSTATUS($C0000212);
- {$EXTERNALSYM STATUS_TRANSACTION_NO_MATCH}
-
-//
-// MessageId: STATUS_TRANSACTION_RESPONDED
-//
-// MessageText:
-//
-// The transport had previously responded to a transaction request.
-//
-
- STATUS_TRANSACTION_RESPONDED = NTSTATUS($C0000213);
- {$EXTERNALSYM STATUS_TRANSACTION_RESPONDED}
-
-//
-// MessageId: STATUS_TRANSACTION_INVALID_ID
-//
-// MessageText:
-//
-// The transport does not recognized the transaction request identifier specified.
-//
-
- STATUS_TRANSACTION_INVALID_ID = NTSTATUS($C0000214);
- {$EXTERNALSYM STATUS_TRANSACTION_INVALID_ID}
-
-//
-// MessageId: STATUS_TRANSACTION_INVALID_TYPE
-//
-// MessageText:
-//
-// The transport does not recognize the transaction request type specified.
-//
-
- STATUS_TRANSACTION_INVALID_TYPE = NTSTATUS($C0000215);
- {$EXTERNALSYM STATUS_TRANSACTION_INVALID_TYPE}
-
-//
-// MessageId: STATUS_NOT_SERVER_SESSION
-//
-// MessageText:
-//
-// The transport can only process the specified request on the server side of a session.
-//
-
- STATUS_NOT_SERVER_SESSION = NTSTATUS($C0000216);
- {$EXTERNALSYM STATUS_NOT_SERVER_SESSION}
-
-//
-// MessageId: STATUS_NOT_CLIENT_SESSION
-//
-// MessageText:
-//
-// The transport can only process the specified request on the client side of a session.
-//
-
- STATUS_NOT_CLIENT_SESSION = NTSTATUS($C0000217);
- {$EXTERNALSYM STATUS_NOT_CLIENT_SESSION}
-
-//
-// MessageId: STATUS_CANNOT_LOAD_REGISTRY_FILE
-//
-// MessageText:
-//
-// {Registry File Failure}
-// The registry cannot load the hive (file):
-// %hs
-// or its log or alternate.
-// It is corrupt, absent, or not writable.
-//
-
- STATUS_CANNOT_LOAD_REGISTRY_FILE = NTSTATUS($C0000218);
- {$EXTERNALSYM STATUS_CANNOT_LOAD_REGISTRY_FILE}
-
-//
-// MessageId: STATUS_DEBUG_ATTACH_FAILED
-//
-// MessageText:
-//
-// {Unexpected Failure in DebugActiveProcess}
-// An unexpected failure occurred while processing a DebugActiveProcess API request. You may choose OK to terminate the process, or Cancel to ignore the error.
-//
-
- STATUS_DEBUG_ATTACH_FAILED = NTSTATUS($C0000219);
- {$EXTERNALSYM STATUS_DEBUG_ATTACH_FAILED}
-
-//
-// MessageId: STATUS_SYSTEM_PROCESS_TERMINATED
-//
-// MessageText:
-//
-// {Fatal System Error}
-// The %hs system process terminated unexpectedly
-// with a status of 0x%08x (0x%08x 0x%08x).
-// The system has been shut down.
-//
-
- STATUS_SYSTEM_PROCESS_TERMINATED = NTSTATUS($C000021A);
- {$EXTERNALSYM STATUS_SYSTEM_PROCESS_TERMINATED}
-
-//
-// MessageId: STATUS_DATA_NOT_ACCEPTED
-//
-// MessageText:
-//
-// {Data Not Accepted}
-// The TDI client could not handle the data received during an indication.
-//
-
- STATUS_DATA_NOT_ACCEPTED = NTSTATUS($C000021B);
- {$EXTERNALSYM STATUS_DATA_NOT_ACCEPTED}
-
-//
-// MessageId: STATUS_NO_BROWSER_SERVERS_FOUND
-//
-// MessageText:
-//
-// {Unable to Retrieve Browser Server List}
-// The list of servers for this workgroup is not currently available.
-//
-
- STATUS_NO_BROWSER_SERVERS_FOUND = NTSTATUS($C000021C);
- {$EXTERNALSYM STATUS_NO_BROWSER_SERVERS_FOUND}
-
-//
-// MessageId: STATUS_VDM_HARD_ERROR
-//
-// MessageText:
-//
-// NTVDM encountered a hard error.
-//
-
- STATUS_VDM_HARD_ERROR = NTSTATUS($C000021D);
- {$EXTERNALSYM STATUS_VDM_HARD_ERROR}
-
-//
-// MessageId: STATUS_DRIVER_CANCEL_TIMEOUT
-//
-// MessageText:
-//
-// {Cancel Timeout}
-// The driver %hs failed to complete a cancelled I/O request in the allotted time.
-//
-
- STATUS_DRIVER_CANCEL_TIMEOUT = NTSTATUS($C000021E);
- {$EXTERNALSYM STATUS_DRIVER_CANCEL_TIMEOUT}
-
-//
-// MessageId: STATUS_REPLY_MESSAGE_MISMATCH
-//
-// MessageText:
-//
-// {Reply Message Mismatch}
-// An attempt was made to reply to an LPC message, but the thread specified by the client ID in the message was not waiting on that message.
-//
-
- STATUS_REPLY_MESSAGE_MISMATCH = NTSTATUS($C000021F);
- {$EXTERNALSYM STATUS_REPLY_MESSAGE_MISMATCH}
-
-//
-// MessageId: STATUS_MAPPED_ALIGNMENT
-//
-// MessageText:
-//
-// {Mapped View Alignment Incorrect}
-// An attempt was made to map a view of a file, but either the specified base address or the offset into the file were not aligned on the proper allocation granularity.
-//
-
- STATUS_MAPPED_ALIGNMENT = NTSTATUS($C0000220);
- {$EXTERNALSYM STATUS_MAPPED_ALIGNMENT}
-
-//
-// MessageId: STATUS_IMAGE_CHECKSUM_MISMATCH
-//
-// MessageText:
-//
-// {Bad Image Checksum}
-// The image %hs is possibly corrupt. The header checksum does not match the computed checksum.
-//
-
- STATUS_IMAGE_CHECKSUM_MISMATCH = NTSTATUS($C0000221);
- {$EXTERNALSYM STATUS_IMAGE_CHECKSUM_MISMATCH}
-
-//
-// MessageId: STATUS_LOST_WRITEBEHIND_DATA
-//
-// MessageText:
-//
-// {Delayed Write Failed}
-// Windows was unable to save all the data for the file %hs. The data has been lost.
-// This error may be caused by a failure of your computer hardware or network connection. Please try to save this file elsewhere.
-//
-
- STATUS_LOST_WRITEBEHIND_DATA = NTSTATUS($C0000222);
- {$EXTERNALSYM STATUS_LOST_WRITEBEHIND_DATA}
-
-//
-// MessageId: STATUS_CLIENT_SERVER_PARAMETERS_INVALID
-//
-// MessageText:
-//
-// The parameter(s) passed to the server in the client/server shared memory
-// window were invalid. Too much data may have been put in the shared memory window.
-//
-
- STATUS_CLIENT_SERVER_PARAMETERS_INVALID = NTSTATUS($C0000223);
- {$EXTERNALSYM STATUS_CLIENT_SERVER_PARAMETERS_INVALID}
-
-//
-// MessageId: STATUS_PASSWORD_MUST_CHANGE
-//
-// MessageText:
-//
-// The user's password must be changed before logging on the first time.
-//
-
- STATUS_PASSWORD_MUST_CHANGE = NTSTATUS($C0000224); // ntsubauth
- {$EXTERNALSYM STATUS_PASSWORD_MUST_CHANGE}
-
-//
-// MessageId: STATUS_NOT_FOUND
-//
-// MessageText:
-//
-// The object was not found.
-//
-
- STATUS_NOT_FOUND = NTSTATUS($C0000225);
- {$EXTERNALSYM STATUS_NOT_FOUND}
-
-//
-// MessageId: STATUS_NOT_TINY_STREAM
-//
-// MessageText:
-//
-// The stream is not a tiny stream.
-//
-
- STATUS_NOT_TINY_STREAM = NTSTATUS($C0000226);
- {$EXTERNALSYM STATUS_NOT_TINY_STREAM}
-
-//
-// MessageId: STATUS_RECOVERY_FAILURE
-//
-// MessageText:
-//
-// A transaction recover failed.
-//
-
- STATUS_RECOVERY_FAILURE = NTSTATUS($C0000227);
- {$EXTERNALSYM STATUS_RECOVERY_FAILURE}
-
-//
-// MessageId: STATUS_STACK_OVERFLOW_READ
-//
-// MessageText:
-//
-// The request must be handled by the stack overflow code.
-//
-
- STATUS_STACK_OVERFLOW_READ = NTSTATUS($C0000228);
- {$EXTERNALSYM STATUS_STACK_OVERFLOW_READ}
-
-//
-// MessageId: STATUS_FAIL_CHECK
-//
-// MessageText:
-//
-// A consistency check failed.
-//
-
- STATUS_FAIL_CHECK = NTSTATUS($C0000229);
- {$EXTERNALSYM STATUS_FAIL_CHECK}
-
-//
-// MessageId: STATUS_DUPLICATE_OBJECTID
-//
-// MessageText:
-//
-// The attempt to insert the ID in the index failed because the ID is already in the index.
-//
-
- STATUS_DUPLICATE_OBJECTID = NTSTATUS($C000022A);
- {$EXTERNALSYM STATUS_DUPLICATE_OBJECTID}
-
-//
-// MessageId: STATUS_OBJECTID_EXISTS
-//
-// MessageText:
-//
-// The attempt to set the object's ID failed because the object already has an ID.
-//
-
- STATUS_OBJECTID_EXISTS = NTSTATUS($C000022B);
- {$EXTERNALSYM STATUS_OBJECTID_EXISTS}
-
-//
-// MessageId: STATUS_CONVERT_TO_LARGE
-//
-// MessageText:
-//
-// Internal OFS status codes indicating how an allocation operation is handled. Either it is retried after the containing onode is moved or the extent stream is converted to a large stream.
-//
-
- STATUS_CONVERT_TO_LARGE = NTSTATUS($C000022C);
- {$EXTERNALSYM STATUS_CONVERT_TO_LARGE}
-
-//
-// MessageId: STATUS_RETRY
-//
-// MessageText:
-//
-// The request needs to be retried.
-//
-
- STATUS_RETRY = NTSTATUS($C000022D);
- {$EXTERNALSYM STATUS_RETRY}
-
-//
-// MessageId: STATUS_FOUND_OUT_OF_SCOPE
-//
-// MessageText:
-//
-// The attempt to find the object found an object matching by ID on the volume but it is out of the scope of the handle used for the operation.
-//
-
- STATUS_FOUND_OUT_OF_SCOPE = NTSTATUS($C000022E);
- {$EXTERNALSYM STATUS_FOUND_OUT_OF_SCOPE}
-
-//
-// MessageId: STATUS_ALLOCATE_BUCKET
-//
-// MessageText:
-//
-// The bucket array must be grown. Retry transaction after doing so.
-//
-
- STATUS_ALLOCATE_BUCKET = NTSTATUS($C000022F);
- {$EXTERNALSYM STATUS_ALLOCATE_BUCKET}
-
-//
-// MessageId: STATUS_PROPSET_NOT_FOUND
-//
-// MessageText:
-//
-// The property set specified does not exist on the object.
-//
-
- STATUS_PROPSET_NOT_FOUND = NTSTATUS($C0000230);
- {$EXTERNALSYM STATUS_PROPSET_NOT_FOUND}
-
-//
-// MessageId: STATUS_MARSHALL_OVERFLOW
-//
-// MessageText:
-//
-// The user/kernel marshalling buffer has overflowed.
-//
-
- STATUS_MARSHALL_OVERFLOW = NTSTATUS($C0000231);
- {$EXTERNALSYM STATUS_MARSHALL_OVERFLOW}
-
-//
-// MessageId: STATUS_INVALID_VARIANT
-//
-// MessageText:
-//
-// The supplied variant structure contains invalid data.
-//
-
- STATUS_INVALID_VARIANT = NTSTATUS($C0000232);
- {$EXTERNALSYM STATUS_INVALID_VARIANT}
-
-//
-// MessageId: STATUS_DOMAIN_CONTROLLER_NOT_FOUND
-//
-// MessageText:
-//
-// Could not find a domain controller for this domain.
-//
-
- STATUS_DOMAIN_CONTROLLER_NOT_FOUND = NTSTATUS($C0000233);
- {$EXTERNALSYM STATUS_DOMAIN_CONTROLLER_NOT_FOUND}
-
-//
-// MessageId: STATUS_ACCOUNT_LOCKED_OUT
-//
-// MessageText:
-//
-// The user account has been automatically locked because too many invalid logon attempts or password change attempts have been requested.
-//
-
- STATUS_ACCOUNT_LOCKED_OUT = NTSTATUS($C0000234); // ntsubauth
- {$EXTERNALSYM STATUS_ACCOUNT_LOCKED_OUT}
-
-//
-// MessageId: STATUS_HANDLE_NOT_CLOSABLE
-//
-// MessageText:
-//
-// NtClose was called on a handle that was protected from close via NtSetInformationObject.
-//
-
- STATUS_HANDLE_NOT_CLOSABLE = NTSTATUS($C0000235);
- {$EXTERNALSYM STATUS_HANDLE_NOT_CLOSABLE}
-
-//
-// MessageId: STATUS_CONNECTION_REFUSED
-//
-// MessageText:
-//
-// The transport connection attempt was refused by the remote system.
-//
-
- STATUS_CONNECTION_REFUSED = NTSTATUS($C0000236);
- {$EXTERNALSYM STATUS_CONNECTION_REFUSED}
-
-//
-// MessageId: STATUS_GRACEFUL_DISCONNECT
-//
-// MessageText:
-//
-// The transport connection was gracefully closed.
-//
-
- STATUS_GRACEFUL_DISCONNECT = NTSTATUS($C0000237);
- {$EXTERNALSYM STATUS_GRACEFUL_DISCONNECT}
-
-//
-// MessageId: STATUS_ADDRESS_ALREADY_ASSOCIATED
-//
-// MessageText:
-//
-// The transport endpoint already has an address associated with it.
-//
-
- STATUS_ADDRESS_ALREADY_ASSOCIATED = NTSTATUS($C0000238);
- {$EXTERNALSYM STATUS_ADDRESS_ALREADY_ASSOCIATED}
-
-//
-// MessageId: STATUS_ADDRESS_NOT_ASSOCIATED
-//
-// MessageText:
-//
-// An address has not yet been associated with the transport endpoint.
-//
-
- STATUS_ADDRESS_NOT_ASSOCIATED = NTSTATUS($C0000239);
- {$EXTERNALSYM STATUS_ADDRESS_NOT_ASSOCIATED}
-
-//
-// MessageId: STATUS_CONNECTION_INVALID
-//
-// MessageText:
-//
-// An operation was attempted on a nonexistent transport connection.
-//
-
- STATUS_CONNECTION_INVALID = NTSTATUS($C000023A);
- {$EXTERNALSYM STATUS_CONNECTION_INVALID}
-
-//
-// MessageId: STATUS_CONNECTION_ACTIVE
-//
-// MessageText:
-//
-// An invalid operation was attempted on an active transport connection.
-//
-
- STATUS_CONNECTION_ACTIVE = NTSTATUS($C000023B);
- {$EXTERNALSYM STATUS_CONNECTION_ACTIVE}
-
-//
-// MessageId: STATUS_NETWORK_UNREACHABLE
-//
-// MessageText:
-//
-// The remote network is not reachable by the transport.
-//
-
- STATUS_NETWORK_UNREACHABLE = NTSTATUS($C000023C);
- {$EXTERNALSYM STATUS_NETWORK_UNREACHABLE}
-
-//
-// MessageId: STATUS_HOST_UNREACHABLE
-//
-// MessageText:
-//
-// The remote system is not reachable by the transport.
-//
-
- STATUS_HOST_UNREACHABLE = NTSTATUS($C000023D);
- {$EXTERNALSYM STATUS_HOST_UNREACHABLE}
-
-//
-// MessageId: STATUS_PROTOCOL_UNREACHABLE
-//
-// MessageText:
-//
-// The remote system does not support the transport protocol.
-//
-
- STATUS_PROTOCOL_UNREACHABLE = NTSTATUS($C000023E);
- {$EXTERNALSYM STATUS_PROTOCOL_UNREACHABLE}
-
-//
-// MessageId: STATUS_PORT_UNREACHABLE
-//
-// MessageText:
-//
-// No service is operating at the destination port of the transport on the remote system.
-//
-
- STATUS_PORT_UNREACHABLE = NTSTATUS($C000023F);
- {$EXTERNALSYM STATUS_PORT_UNREACHABLE}
-
-//
-// MessageId: STATUS_REQUEST_ABORTED
-//
-// MessageText:
-//
-// The request was aborted.
-//
-
- STATUS_REQUEST_ABORTED = NTSTATUS($C0000240);
- {$EXTERNALSYM STATUS_REQUEST_ABORTED}
-
-//
-// MessageId: STATUS_CONNECTION_ABORTED
-//
-// MessageText:
-//
-// The transport connection was aborted by the local system.
-//
-
- STATUS_CONNECTION_ABORTED = NTSTATUS($C0000241);
- {$EXTERNALSYM STATUS_CONNECTION_ABORTED}
-
-//
-// MessageId: STATUS_BAD_COMPRESSION_BUFFER
-//
-// MessageText:
-//
-// The specified buffer contains ill-formed data.
-//
-
- STATUS_BAD_COMPRESSION_BUFFER = NTSTATUS($C0000242);
- {$EXTERNALSYM STATUS_BAD_COMPRESSION_BUFFER}
-
-//
-// MessageId: STATUS_USER_MAPPED_FILE
-//
-// MessageText:
-//
-// The requested operation cannot be performed on a file with a user mapped section open.
-//
-
- STATUS_USER_MAPPED_FILE = NTSTATUS($C0000243);
- {$EXTERNALSYM STATUS_USER_MAPPED_FILE}
-
-//
-// MessageId: STATUS_AUDIT_FAILED
-//
-// MessageText:
-//
-// {Audit Failed}
-// An attempt to generate a security audit failed.
-//
-
- STATUS_AUDIT_FAILED = NTSTATUS($C0000244);
- {$EXTERNALSYM STATUS_AUDIT_FAILED}
-
-//
-// MessageId: STATUS_TIMER_RESOLUTION_NOT_SET
-//
-// MessageText:
-//
-// The timer resolution was not previously set by the current process.
-//
-
- STATUS_TIMER_RESOLUTION_NOT_SET = NTSTATUS($C0000245);
- {$EXTERNALSYM STATUS_TIMER_RESOLUTION_NOT_SET}
-
-//
-// MessageId: STATUS_CONNECTION_COUNT_LIMIT
-//
-// MessageText:
-//
-// A connection to the server could not be made because the limit on the number of concurrent connections for this account has been reached.
-//
-
- STATUS_CONNECTION_COUNT_LIMIT = NTSTATUS($C0000246);
- {$EXTERNALSYM STATUS_CONNECTION_COUNT_LIMIT}
-
-//
-// MessageId: STATUS_LOGIN_TIME_RESTRICTION
-//
-// MessageText:
-//
-// Attempting to login during an unauthorized time of day for this account.
-//
-
- STATUS_LOGIN_TIME_RESTRICTION = NTSTATUS($C0000247);
- {$EXTERNALSYM STATUS_LOGIN_TIME_RESTRICTION}
-
-//
-// MessageId: STATUS_LOGIN_WKSTA_RESTRICTION
-//
-// MessageText:
-//
-// The account is not authorized to login from this station.
-//
-
- STATUS_LOGIN_WKSTA_RESTRICTION = NTSTATUS($C0000248);
- {$EXTERNALSYM STATUS_LOGIN_WKSTA_RESTRICTION}
-
-//
-// MessageId: STATUS_IMAGE_MP_UP_MISMATCH
-//
-// MessageText:
-//
-// {UP/MP Image Mismatch}
-// The image %hs has been modified for use on a uniprocessor system, but you are running it on a multiprocessor machine.
-// Please reinstall the image file.
-//
-
- STATUS_IMAGE_MP_UP_MISMATCH = NTSTATUS($C0000249);
- {$EXTERNALSYM STATUS_IMAGE_MP_UP_MISMATCH}
-
-//
-// MessageId: STATUS_INSUFFICIENT_LOGON_INFO
-//
-// MessageText:
-//
-// There is insufficient account information to log you on.
-//
-
- STATUS_INSUFFICIENT_LOGON_INFO = NTSTATUS($C0000250);
- {$EXTERNALSYM STATUS_INSUFFICIENT_LOGON_INFO}
-
-//
-// MessageId: STATUS_BAD_DLL_ENTRYPOINT
-//
-// MessageText:
-//
-// {Invalid DLL Entrypoint}
-// The dynamic link library %hs is not written correctly. The stack pointer has been left in an inconsistent state.
-// The entrypoint should be declared as WINAPI or STDCALL. Select YES to fail the DLL load. Select NO to continue
-// execution. Selecting NO may cause the application to operate incorrectly.
-//
-
- STATUS_BAD_DLL_ENTRYPOINT = NTSTATUS($C0000251);
- {$EXTERNALSYM STATUS_BAD_DLL_ENTRYPOINT}
-
-//
-// MessageId: STATUS_BAD_SERVICE_ENTRYPOINT
-//
-// MessageText:
-//
-// {Invalid Service Callback Entrypoint}
-// The %hs service is not written correctly. The stack pointer has been left in an inconsistent state.
-// The callback entrypoint should be declared as WINAPI or STDCALL. Selecting OK will cause the
-// service to continue operation. However, the service process may operate incorrectly.
-//
-
- STATUS_BAD_SERVICE_ENTRYPOINT = NTSTATUS($C0000252);
- {$EXTERNALSYM STATUS_BAD_SERVICE_ENTRYPOINT}
-
-//
-// MessageId: STATUS_LPC_REPLY_LOST
-//
-// MessageText:
-//
-// The server received the messages but did not send a reply.
-//
-
- STATUS_LPC_REPLY_LOST = NTSTATUS($C0000253);
- {$EXTERNALSYM STATUS_LPC_REPLY_LOST}
-
-//
-// MessageId: STATUS_IP_ADDRESS_CONFLICT1
-//
-// MessageText:
-//
-// The system has detected an IP address conflict with another system on the network. The local interface has been disabled.
-// More details are available in the system event log.
-// Consult your network administrator to resolve the conflict.
-//
-
- STATUS_IP_ADDRESS_CONFLICT1 = NTSTATUS($C0000254);
- {$EXTERNALSYM STATUS_IP_ADDRESS_CONFLICT1}
-
-//
-// MessageId: STATUS_IP_ADDRESS_CONFLICT2
-//
-// MessageText:
-//
-// The system has detected an IP address conflict with another system on the network. Network operations on this system may be disrupted as a result.
-// More details are available in the system event log.
-// Consult your network administrator immediately to resolve the conflict.
-//
-
- STATUS_IP_ADDRESS_CONFLICT2 = NTSTATUS($C0000255);
- {$EXTERNALSYM STATUS_IP_ADDRESS_CONFLICT2}
-
-//
-// MessageId: STATUS_REGISTRY_QUOTA_LIMIT
-//
-// MessageText:
-//
-// {Low On Registry Space}
-// Your maximum registry size is too small. To ensure that Windows runs properly, increase your maximum registry size. For more information, see Help.
-//
-
- STATUS_REGISTRY_QUOTA_LIMIT = NTSTATUS($C0000256);
- {$EXTERNALSYM STATUS_REGISTRY_QUOTA_LIMIT}
-
-//
-// MessageId: STATUS_PATH_NOT_COVERED
-//
-// MessageText:
-//
-// The contacted server does not support the indicated part of the DFS namespace.
-//
-
- STATUS_PATH_NOT_COVERED = NTSTATUS($C0000257);
- {$EXTERNALSYM STATUS_PATH_NOT_COVERED}
-
-//
-// MessageId: STATUS_NO_CALLBACK_ACTIVE
-//
-// MessageText:
-//
-// A callback return system service cannot be executed when no callback is active.
-//
-
- STATUS_NO_CALLBACK_ACTIVE = NTSTATUS($C0000258);
- {$EXTERNALSYM STATUS_NO_CALLBACK_ACTIVE}
-
-//
-// MessageId: STATUS_LICENSE_QUOTA_EXCEEDED
-//
-// MessageText:
-//
-// The service being accessed is licensed for a particular number of connections.
-// No more connections can be made to the service at this time because there are already as many connections as the service can accept.
-//
-
- STATUS_LICENSE_QUOTA_EXCEEDED = NTSTATUS($C0000259);
- {$EXTERNALSYM STATUS_LICENSE_QUOTA_EXCEEDED}
-
-//
-// MessageId: STATUS_PWD_TOO_SHORT
-//
-// MessageText:
-//
-// The password provided is too short to meet the policy of your user account.
-// Please choose a longer password.
-//
-
- STATUS_PWD_TOO_SHORT = NTSTATUS($C000025A);
- {$EXTERNALSYM STATUS_PWD_TOO_SHORT}
-
-//
-// MessageId: STATUS_PWD_TOO_RECENT
-//
-// MessageText:
-//
-// The policy of your user account does not allow you to change passwords too frequently.
-// This is done to prevent users from changing back to a familiar, but potentially discovered, password.
-// If you feel your password has been compromised then please contact your administrator immediately to have a new one assigned.
-//
-
- STATUS_PWD_TOO_RECENT = NTSTATUS($C000025B);
- {$EXTERNALSYM STATUS_PWD_TOO_RECENT}
-
-//
-// MessageId: STATUS_PWD_HISTORY_CONFLICT
-//
-// MessageText:
-//
-// You have attempted to change your password to one that you have used in the past.
-// The policy of your user account does not allow this. Please select a password that you have not previously used.
-//
-
- STATUS_PWD_HISTORY_CONFLICT = NTSTATUS($C000025C);
- {$EXTERNALSYM STATUS_PWD_HISTORY_CONFLICT}
-
-//
-// MessageId: STATUS_PLUGPLAY_NO_DEVICE
-//
-// MessageText:
-//
-// You have attempted to load a legacy device driver while its device instance had been disabled.
-//
-
- STATUS_PLUGPLAY_NO_DEVICE = NTSTATUS($C000025E);
- {$EXTERNALSYM STATUS_PLUGPLAY_NO_DEVICE}
-
-//
-// MessageId: STATUS_UNSUPPORTED_COMPRESSION
-//
-// MessageText:
-//
-// The specified compression format is unsupported.
-//
-
- STATUS_UNSUPPORTED_COMPRESSION = NTSTATUS($C000025F);
- {$EXTERNALSYM STATUS_UNSUPPORTED_COMPRESSION}
-
-//
-// MessageId: STATUS_INVALID_HW_PROFILE
-//
-// MessageText:
-//
-// The specified hardware profile configuration is invalid.
-//
-
- STATUS_INVALID_HW_PROFILE = NTSTATUS($C0000260);
- {$EXTERNALSYM STATUS_INVALID_HW_PROFILE}
-
-//
-// MessageId: STATUS_INVALID_PLUGPLAY_DEVICE_PATH
-//
-// MessageText:
-//
-// The specified Plug and Play registry device path is invalid.
-//
-
- STATUS_INVALID_PLUGPLAY_DEVICE_PATH = NTSTATUS($C0000261);
- {$EXTERNALSYM STATUS_INVALID_PLUGPLAY_DEVICE_PATH}
-
-//
-// MessageId: STATUS_DRIVER_ORDINAL_NOT_FOUND
-//
-// MessageText:
-//
-// {Driver Entry Point Not Found}
-// The %hs device driver could not locate the ordinal %ld in driver %hs.
-//
-
- STATUS_DRIVER_ORDINAL_NOT_FOUND = NTSTATUS($C0000262);
- {$EXTERNALSYM STATUS_DRIVER_ORDINAL_NOT_FOUND}
-
-//
-// MessageId: STATUS_DRIVER_ENTRYPOINT_NOT_FOUND
-//
-// MessageText:
-//
-// {Driver Entry Point Not Found}
-// The %hs device driver could not locate the entry point %hs in driver %hs.
-//
-
- STATUS_DRIVER_ENTRYPOINT_NOT_FOUND = NTSTATUS($C0000263);
- {$EXTERNALSYM STATUS_DRIVER_ENTRYPOINT_NOT_FOUND}
-
-//
-// MessageId: STATUS_RESOURCE_NOT_OWNED
-//
-// MessageText:
-//
-// {Application Error}
-// The application attempted to release a resource it did not own. Click on OK to terminate the application.
-//
-
- STATUS_RESOURCE_NOT_OWNED = NTSTATUS($C0000264);
- {$EXTERNALSYM STATUS_RESOURCE_NOT_OWNED}
-
-//
-// MessageId: STATUS_TOO_MANY_LINKS
-//
-// MessageText:
-//
-// An attempt was made to create more links on a file than the file system supports.
-//
-
- STATUS_TOO_MANY_LINKS = NTSTATUS($C0000265);
- {$EXTERNALSYM STATUS_TOO_MANY_LINKS}
-
-//
-// MessageId: STATUS_QUOTA_LIST_INCONSISTENT
-//
-// MessageText:
-//
-// The specified quota list is internally inconsistent with its descriptor.
-//
-
- STATUS_QUOTA_LIST_INCONSISTENT = NTSTATUS($C0000266);
- {$EXTERNALSYM STATUS_QUOTA_LIST_INCONSISTENT}
-
-//
-// MessageId: STATUS_FILE_IS_OFFLINE
-//
-// MessageText:
-//
-// The specified file has been relocated to offline storage.
-//
-
- STATUS_FILE_IS_OFFLINE = NTSTATUS($C0000267);
- {$EXTERNALSYM STATUS_FILE_IS_OFFLINE}
-
-//
-// MessageId: STATUS_EVALUATION_EXPIRATION
-//
-// MessageText:
-//
-// {Windows Evaluation Notification}
-// The evaluation period for this installation of Windows has expired. This system will shutdown in 1 hour. To restore access to this installation of Windows, please upgrade this installation using a licensed distribution of this product.
-//
-
- STATUS_EVALUATION_EXPIRATION = NTSTATUS($C0000268);
- {$EXTERNALSYM STATUS_EVALUATION_EXPIRATION}
-
-//
-// MessageId: STATUS_ILLEGAL_DLL_RELOCATION
-//
-// MessageText:
-//
-// {Illegal System DLL Relocation}
-// The system DLL %hs was relocated in memory. The application will not run properly.
-// The relocation occurred because the DLL %hs occupied an address range reserved for Windows system DLLs. The vendor supplying the DLL should be contacted for a new DLL.
-//
-
- STATUS_ILLEGAL_DLL_RELOCATION = NTSTATUS($C0000269);
- {$EXTERNALSYM STATUS_ILLEGAL_DLL_RELOCATION}
-
-//
-// MessageId: STATUS_LICENSE_VIOLATION
-//
-// MessageText:
-//
-// {License Violation}
-// The system has detected tampering with your registered product type. This is a violation of your software license. Tampering with product type is not permitted.
-//
-
- STATUS_LICENSE_VIOLATION = NTSTATUS($C000026A);
- {$EXTERNALSYM STATUS_LICENSE_VIOLATION}
-
-//
-// MessageId: STATUS_DLL_INIT_FAILED_LOGOFF
-//
-// MessageText:
-//
-// {DLL Initialization Failed}
-// The application failed to initialize because the window station is shutting down.
-//
-
- STATUS_DLL_INIT_FAILED_LOGOFF = NTSTATUS($C000026B);
- {$EXTERNALSYM STATUS_DLL_INIT_FAILED_LOGOFF}
-
-//
-// MessageId: STATUS_DRIVER_UNABLE_TO_LOAD
-//
-// MessageText:
-//
-// {Unable to Load Device Driver}
-// %hs device driver could not be loaded.
-// Error Status was 0x%x
-//
-
- STATUS_DRIVER_UNABLE_TO_LOAD = NTSTATUS($C000026C);
- {$EXTERNALSYM STATUS_DRIVER_UNABLE_TO_LOAD}
-
-//
-// MessageId: STATUS_DFS_UNAVAILABLE
-//
-// MessageText:
-//
-// DFS is unavailable on the contacted server.
-//
-
- STATUS_DFS_UNAVAILABLE = NTSTATUS($C000026D);
- {$EXTERNALSYM STATUS_DFS_UNAVAILABLE}
-
-//
-// MessageId: STATUS_VOLUME_DISMOUNTED
-//
-// MessageText:
-//
-// An operation was attempted to a volume after it was dismounted.
-//
-
- STATUS_VOLUME_DISMOUNTED = NTSTATUS($C000026E);
- {$EXTERNALSYM STATUS_VOLUME_DISMOUNTED}
-
-//
-// MessageId: STATUS_WX86_INTERNAL_ERROR
-//
-// MessageText:
-//
-// An internal error occurred in the Win32 x86 emulation subsystem.
-//
-
- STATUS_WX86_INTERNAL_ERROR = NTSTATUS($C000026F);
- {$EXTERNALSYM STATUS_WX86_INTERNAL_ERROR}
-
-//
-// MessageId: STATUS_WX86_FLOAT_STACK_CHECK
-//
-// MessageText:
-//
-// Win32 x86 emulation subsystem Floating-point stack check.
-//
-
- STATUS_WX86_FLOAT_STACK_CHECK = NTSTATUS($C0000270);
- {$EXTERNALSYM STATUS_WX86_FLOAT_STACK_CHECK}
-
-//
-// MessageId: STATUS_VALIDATE_CONTINUE
-//
-// MessageText:
-//
-// The validation process needs to continue on to the next step.
-//
-
- STATUS_VALIDATE_CONTINUE = NTSTATUS($C0000271);
- {$EXTERNALSYM STATUS_VALIDATE_CONTINUE}
-
-//
-// MessageId: STATUS_NO_MATCH
-//
-// MessageText:
-//
-// There was no match for the specified key in the index.
-//
-
- STATUS_NO_MATCH = NTSTATUS($C0000272);
- {$EXTERNALSYM STATUS_NO_MATCH}
-
-//
-// MessageId: STATUS_NO_MORE_MATCHES
-//
-// MessageText:
-//
-// There are no more matches for the current index enumeration.
-//
-
- STATUS_NO_MORE_MATCHES = NTSTATUS($C0000273);
- {$EXTERNALSYM STATUS_NO_MORE_MATCHES}
-
-//
-// MessageId: STATUS_NOT_A_REPARSE_POINT
-//
-// MessageText:
-//
-// The NTFS file or directory is not a reparse point.
-//
-
- STATUS_NOT_A_REPARSE_POINT = NTSTATUS($C0000275);
- {$EXTERNALSYM STATUS_NOT_A_REPARSE_POINT}
-
-//
-// MessageId: STATUS_IO_REPARSE_TAG_INVALID
-//
-// MessageText:
-//
-// The Windows I/O reparse tag passed for the NTFS reparse point is invalid.
-//
-
- STATUS_IO_REPARSE_TAG_INVALID = NTSTATUS($C0000276);
- {$EXTERNALSYM STATUS_IO_REPARSE_TAG_INVALID}
-
-//
-// MessageId: STATUS_IO_REPARSE_TAG_MISMATCH
-//
-// MessageText:
-//
-// The Windows I/O reparse tag does not match the one present in the NTFS reparse point.
-//
-
- STATUS_IO_REPARSE_TAG_MISMATCH = NTSTATUS($C0000277);
- {$EXTERNALSYM STATUS_IO_REPARSE_TAG_MISMATCH}
-
-//
-// MessageId: STATUS_IO_REPARSE_DATA_INVALID
-//
-// MessageText:
-//
-// The user data passed for the NTFS reparse point is invalid.
-//
-
- STATUS_IO_REPARSE_DATA_INVALID = NTSTATUS($C0000278);
- {$EXTERNALSYM STATUS_IO_REPARSE_DATA_INVALID}
-
-//
-// MessageId: STATUS_IO_REPARSE_TAG_NOT_HANDLED
-//
-// MessageText:
-//
-// The layered file system driver for this IO tag did not handle it when needed.
-//
-
- STATUS_IO_REPARSE_TAG_NOT_HANDLED = NTSTATUS($C0000279);
- {$EXTERNALSYM STATUS_IO_REPARSE_TAG_NOT_HANDLED}
-
-//
-// MessageId: STATUS_REPARSE_POINT_NOT_RESOLVED
-//
-// MessageText:
-//
-// The NTFS symbolic link could not be resolved even though the initial file name is valid.
-//
-
- STATUS_REPARSE_POINT_NOT_RESOLVED = NTSTATUS($C0000280);
- {$EXTERNALSYM STATUS_REPARSE_POINT_NOT_RESOLVED}
-
-//
-// MessageId: STATUS_DIRECTORY_IS_A_REPARSE_POINT
-//
-// MessageText:
-//
-// The NTFS directory is a reparse point.
-//
-
- STATUS_DIRECTORY_IS_A_REPARSE_POINT = NTSTATUS($C0000281);
- {$EXTERNALSYM STATUS_DIRECTORY_IS_A_REPARSE_POINT}
-
-//
-// MessageId: STATUS_RANGE_LIST_CONFLICT
-//
-// MessageText:
-//
-// The range could not be added to the range list because of a conflict.
-//
-
- STATUS_RANGE_LIST_CONFLICT = NTSTATUS($C0000282);
- {$EXTERNALSYM STATUS_RANGE_LIST_CONFLICT}
-
-//
-// MessageId: STATUS_SOURCE_ELEMENT_EMPTY
-//
-// MessageText:
-//
-// The specified medium changer source element contains no media.
-//
-
- STATUS_SOURCE_ELEMENT_EMPTY = NTSTATUS($C0000283);
- {$EXTERNALSYM STATUS_SOURCE_ELEMENT_EMPTY}
-
-//
-// MessageId: STATUS_DESTINATION_ELEMENT_FULL
-//
-// MessageText:
-//
-// The specified medium changer destination element already contains media.
-//
-
- STATUS_DESTINATION_ELEMENT_FULL = NTSTATUS($C0000284);
- {$EXTERNALSYM STATUS_DESTINATION_ELEMENT_FULL}
-
-//
-// MessageId: STATUS_ILLEGAL_ELEMENT_ADDRESS
-//
-// MessageText:
-//
-// The specified medium changer element does not exist.
-//
-
- STATUS_ILLEGAL_ELEMENT_ADDRESS = NTSTATUS($C0000285);
- {$EXTERNALSYM STATUS_ILLEGAL_ELEMENT_ADDRESS}
-
-//
-// MessageId: STATUS_MAGAZINE_NOT_PRESENT
-//
-// MessageText:
-//
-// The specified element is contained within a magazine that is no longer present.
-//
-
- STATUS_MAGAZINE_NOT_PRESENT = NTSTATUS($C0000286);
- {$EXTERNALSYM STATUS_MAGAZINE_NOT_PRESENT}
-
-//
-// MessageId: STATUS_REINITIALIZATION_NEEDED
-//
-// MessageText:
-//
-// The device requires reinitialization due to hardware errors.
-//
-
- STATUS_REINITIALIZATION_NEEDED = NTSTATUS($C0000287);
- {$EXTERNALSYM STATUS_REINITIALIZATION_NEEDED}
-
-//
-// MessageId: STATUS_DEVICE_REQUIRES_CLEANING
-//
-// MessageText:
-//
-// The device has indicated that cleaning is necessary.
-//
-
- STATUS_DEVICE_REQUIRES_CLEANING = NTSTATUS($80000288);
- {$EXTERNALSYM STATUS_DEVICE_REQUIRES_CLEANING}
-
-//
-// MessageId: STATUS_DEVICE_DOOR_OPEN
-//
-// MessageText:
-//
-// The device has indicated that it's door is open. Further operations require it closed and secured.
-//
-
- STATUS_DEVICE_DOOR_OPEN = NTSTATUS($80000289);
- {$EXTERNALSYM STATUS_DEVICE_DOOR_OPEN}
-
-//
-// MessageId: STATUS_ENCRYPTION_FAILED
-//
-// MessageText:
-//
-// The file encryption attempt failed.
-//
-
- STATUS_ENCRYPTION_FAILED = NTSTATUS($C000028A);
- {$EXTERNALSYM STATUS_ENCRYPTION_FAILED}
-
-//
-// MessageId: STATUS_DECRYPTION_FAILED
-//
-// MessageText:
-//
-// The file decryption attempt failed.
-//
-
- STATUS_DECRYPTION_FAILED = NTSTATUS($C000028B);
- {$EXTERNALSYM STATUS_DECRYPTION_FAILED}
-
-//
-// MessageId: STATUS_RANGE_NOT_FOUND
-//
-// MessageText:
-//
-// The specified range could not be found in the range list.
-//
-
- STATUS_RANGE_NOT_FOUND = NTSTATUS($C000028C);
- {$EXTERNALSYM STATUS_RANGE_NOT_FOUND}
-
-//
-// MessageId: STATUS_NO_RECOVERY_POLICY
-//
-// MessageText:
-//
-// There is no encryption recovery policy configured for this system.
-//
-
- STATUS_NO_RECOVERY_POLICY = NTSTATUS($C000028D);
- {$EXTERNALSYM STATUS_NO_RECOVERY_POLICY}
-
-//
-// MessageId: STATUS_NO_EFS
-//
-// MessageText:
-//
-// The required encryption driver is not loaded for this system.
-//
-
- STATUS_NO_EFS = NTSTATUS($C000028E);
- {$EXTERNALSYM STATUS_NO_EFS}
-
-//
-// MessageId: STATUS_WRONG_EFS
-//
-// MessageText:
-//
-// The file was encrypted with a different encryption driver than is currently loaded.
-//
-
- STATUS_WRONG_EFS = NTSTATUS($C000028F);
- {$EXTERNALSYM STATUS_WRONG_EFS}
-
-//
-// MessageId: STATUS_NO_USER_KEYS
-//
-// MessageText:
-//
-// There are no EFS keys defined for the user.
-//
-
- STATUS_NO_USER_KEYS = NTSTATUS($C0000290);
- {$EXTERNALSYM STATUS_NO_USER_KEYS}
-
-//
-// MessageId: STATUS_FILE_NOT_ENCRYPTED
-//
-// MessageText:
-//
-// The specified file is not encrypted.
-//
-
- STATUS_FILE_NOT_ENCRYPTED = NTSTATUS($C0000291);
- {$EXTERNALSYM STATUS_FILE_NOT_ENCRYPTED}
-
-//
-// MessageId: STATUS_NOT_EXPORT_FORMAT
-//
-// MessageText:
-//
-// The specified file is not in the defined EFS export format.
-//
-
- STATUS_NOT_EXPORT_FORMAT = NTSTATUS($C0000292);
- {$EXTERNALSYM STATUS_NOT_EXPORT_FORMAT}
-
-//
-// MessageId: STATUS_FILE_ENCRYPTED
-//
-// MessageText:
-//
-// The specified file is encrypted and the user does not have the ability to decrypt it.
-//
-
- STATUS_FILE_ENCRYPTED = NTSTATUS($C0000293);
- {$EXTERNALSYM STATUS_FILE_ENCRYPTED}
-
-//
-// MessageId: STATUS_WAKE_SYSTEM
-//
-// MessageText:
-//
-// The system has awoken
-//
-
- STATUS_WAKE_SYSTEM = NTSTATUS($40000294);
- {$EXTERNALSYM STATUS_WAKE_SYSTEM}
-
-//
-// MessageId: STATUS_WMI_GUID_NOT_FOUND
-//
-// MessageText:
-//
-// The guid passed was not recognized as valid by a WMI data provider.
-//
-
- STATUS_WMI_GUID_NOT_FOUND = NTSTATUS($C0000295);
- {$EXTERNALSYM STATUS_WMI_GUID_NOT_FOUND}
-
-//
-// MessageId: STATUS_WMI_INSTANCE_NOT_FOUND
-//
-// MessageText:
-//
-// The instance name passed was not recognized as valid by a WMI data provider.
-//
-
- STATUS_WMI_INSTANCE_NOT_FOUND = NTSTATUS($C0000296);
- {$EXTERNALSYM STATUS_WMI_INSTANCE_NOT_FOUND}
-
-//
-// MessageId: STATUS_WMI_ITEMID_NOT_FOUND
-//
-// MessageText:
-//
-// The data item id passed was not recognized as valid by a WMI data provider.
-//
-
- STATUS_WMI_ITEMID_NOT_FOUND = NTSTATUS($C0000297);
- {$EXTERNALSYM STATUS_WMI_ITEMID_NOT_FOUND}
-
-//
-// MessageId: STATUS_WMI_TRY_AGAIN
-//
-// MessageText:
-//
-// The WMI request could not be completed and should be retried.
-//
-
- STATUS_WMI_TRY_AGAIN = NTSTATUS($C0000298);
- {$EXTERNALSYM STATUS_WMI_TRY_AGAIN}
-
-//
-// MessageId: STATUS_SHARED_POLICY
-//
-// MessageText:
-//
-// The policy object is shared and can only be modified at the root
-//
-
- STATUS_SHARED_POLICY = NTSTATUS($C0000299);
- {$EXTERNALSYM STATUS_SHARED_POLICY}
-
-//
-// MessageId: STATUS_POLICY_OBJECT_NOT_FOUND
-//
-// MessageText:
-//
-// The policy object does not exist when it should
-//
-
- STATUS_POLICY_OBJECT_NOT_FOUND = NTSTATUS($C000029A);
- {$EXTERNALSYM STATUS_POLICY_OBJECT_NOT_FOUND}
-
-//
-// MessageId: STATUS_POLICY_ONLY_IN_DS
-//
-// MessageText:
-//
-// The requested policy information only lives in the Ds
-//
-
- STATUS_POLICY_ONLY_IN_DS = NTSTATUS($C000029B);
- {$EXTERNALSYM STATUS_POLICY_ONLY_IN_DS}
-
-//
-// MessageId: STATUS_VOLUME_NOT_UPGRADED
-//
-// MessageText:
-//
-// The volume must be upgraded to enable this feature
-//
-
- STATUS_VOLUME_NOT_UPGRADED = NTSTATUS($C000029C);
- {$EXTERNALSYM STATUS_VOLUME_NOT_UPGRADED}
-
-//
-// MessageId: STATUS_REMOTE_STORAGE_NOT_ACTIVE
-//
-// MessageText:
-//
-// The remote storage service is not operational at this time.
-//
-
- STATUS_REMOTE_STORAGE_NOT_ACTIVE = NTSTATUS($C000029D);
- {$EXTERNALSYM STATUS_REMOTE_STORAGE_NOT_ACTIVE}
-
-//
-// MessageId: STATUS_REMOTE_STORAGE_MEDIA_ERROR
-//
-// MessageText:
-//
-// The remote storage service encountered a media error.
-//
-
- STATUS_REMOTE_STORAGE_MEDIA_ERROR = NTSTATUS($C000029E);
- {$EXTERNALSYM STATUS_REMOTE_STORAGE_MEDIA_ERROR}
-
-//
-// MessageId: STATUS_NO_TRACKING_SERVICE
-//
-// MessageText:
-//
-// The tracking (workstation) service is not running.
-//
-
- STATUS_NO_TRACKING_SERVICE = NTSTATUS($C000029F);
- {$EXTERNALSYM STATUS_NO_TRACKING_SERVICE}
-
-//
-// MessageId: STATUS_SERVER_SID_MISMATCH
-//
-// MessageText:
-//
-// The server process is running under a SID different than that required by client.
-//
-
- STATUS_SERVER_SID_MISMATCH = NTSTATUS($C00002A0);
- {$EXTERNALSYM STATUS_SERVER_SID_MISMATCH}
-
-//
-// Directory Service specific Errors
-//
-//
-// MessageId: STATUS_DS_NO_ATTRIBUTE_OR_VALUE
-//
-// MessageText:
-//
-// The specified directory service attribute or value does not exist.
-//
-
- STATUS_DS_NO_ATTRIBUTE_OR_VALUE = NTSTATUS($C00002A1);
- {$EXTERNALSYM STATUS_DS_NO_ATTRIBUTE_OR_VALUE}
-
-//
-// MessageId: STATUS_DS_INVALID_ATTRIBUTE_SYNTAX
-//
-// MessageText:
-//
-// The attribute syntax specified to the directory service is invalid.
-//
-
- STATUS_DS_INVALID_ATTRIBUTE_SYNTAX = NTSTATUS($C00002A2);
- {$EXTERNALSYM STATUS_DS_INVALID_ATTRIBUTE_SYNTAX}
-
-//
-// MessageId: STATUS_DS_ATTRIBUTE_TYPE_UNDEFINED
-//
-// MessageText:
-//
-// The attribute type specified to the directory service is not defined.
-//
-
- STATUS_DS_ATTRIBUTE_TYPE_UNDEFINED = NTSTATUS($C00002A3);
- {$EXTERNALSYM STATUS_DS_ATTRIBUTE_TYPE_UNDEFINED}
-
-//
-// MessageId: STATUS_DS_ATTRIBUTE_OR_VALUE_EXISTS
-//
-// MessageText:
-//
-// The specified directory service attribute or value already exists.
-//
-
- STATUS_DS_ATTRIBUTE_OR_VALUE_EXISTS = NTSTATUS($C00002A4);
- {$EXTERNALSYM STATUS_DS_ATTRIBUTE_OR_VALUE_EXISTS}
-
-//
-// MessageId: STATUS_DS_BUSY
-//
-// MessageText:
-//
-// The directory service is busy.
-//
-
- STATUS_DS_BUSY = NTSTATUS($C00002A5);
- {$EXTERNALSYM STATUS_DS_BUSY}
-
-//
-// MessageId: STATUS_DS_UNAVAILABLE
-//
-// MessageText:
-//
-// The directory service is not available.
-//
-
- STATUS_DS_UNAVAILABLE = NTSTATUS($C00002A6);
- {$EXTERNALSYM STATUS_DS_UNAVAILABLE}
-
-//
-// MessageId: STATUS_DS_NO_RIDS_ALLOCATED
-//
-// MessageText:
-//
-// The directory service was unable to allocate a relative identifier.
-//
-
- STATUS_DS_NO_RIDS_ALLOCATED = NTSTATUS($C00002A7);
- {$EXTERNALSYM STATUS_DS_NO_RIDS_ALLOCATED}
-
-//
-// MessageId: STATUS_DS_NO_MORE_RIDS
-//
-// MessageText:
-//
-// The directory service has exhausted the pool of relative identifiers.
-//
-
- STATUS_DS_NO_MORE_RIDS = NTSTATUS($C00002A8);
- {$EXTERNALSYM STATUS_DS_NO_MORE_RIDS}
-
-//
-// MessageId: STATUS_DS_INCORRECT_ROLE_OWNER
-//
-// MessageText:
-//
-// The requested operation could not be performed because the directory service is not the master for that type of operation.
-//
-
- STATUS_DS_INCORRECT_ROLE_OWNER = NTSTATUS($C00002A9);
- {$EXTERNALSYM STATUS_DS_INCORRECT_ROLE_OWNER}
-
-//
-// MessageId: STATUS_DS_RIDMGR_INIT_ERROR
-//
-// MessageText:
-//
-// The directory service was unable to initialize the subsystem that allocates relative identifiers.
-//
-
- STATUS_DS_RIDMGR_INIT_ERROR = NTSTATUS($C00002AA);
- {$EXTERNALSYM STATUS_DS_RIDMGR_INIT_ERROR}
-
-//
-// MessageId: STATUS_DS_OBJ_CLASS_VIOLATION
-//
-// MessageText:
-//
-// The requested operation did not satisfy one or more constraints associated with the class of the object.
-//
-
- STATUS_DS_OBJ_CLASS_VIOLATION = NTSTATUS($C00002AB);
- {$EXTERNALSYM STATUS_DS_OBJ_CLASS_VIOLATION}
-
-//
-// MessageId: STATUS_DS_CANT_ON_NON_LEAF
-//
-// MessageText:
-//
-// The directory service can perform the requested operation only on a leaf object.
-//
-
- STATUS_DS_CANT_ON_NON_LEAF = NTSTATUS($C00002AC);
- {$EXTERNALSYM STATUS_DS_CANT_ON_NON_LEAF}
-
-//
-// MessageId: STATUS_DS_CANT_ON_RDN
-//
-// MessageText:
-//
-// The directory service cannot perform the requested operation on the Relatively Defined Name (RDN) attribute of an object.
-//
-
- STATUS_DS_CANT_ON_RDN = NTSTATUS($C00002AD);
- {$EXTERNALSYM STATUS_DS_CANT_ON_RDN}
-
-//
-// MessageId: STATUS_DS_CANT_MOD_OBJ_CLASS
-//
-// MessageText:
-//
-// The directory service detected an attempt to modify the object class of an object.
-//
-
- STATUS_DS_CANT_MOD_OBJ_CLASS = NTSTATUS($C00002AE);
- {$EXTERNALSYM STATUS_DS_CANT_MOD_OBJ_CLASS}
-
-//
-// MessageId: STATUS_DS_CROSS_DOM_MOVE_FAILED
-//
-// MessageText:
-//
-// An error occurred while performing a cross domain move operation.
-//
-
- STATUS_DS_CROSS_DOM_MOVE_FAILED = NTSTATUS($C00002AF);
- {$EXTERNALSYM STATUS_DS_CROSS_DOM_MOVE_FAILED}
-
-//
-// MessageId: STATUS_DS_GC_NOT_AVAILABLE
-//
-// MessageText:
-//
-// Unable to Contact the Global Catalog Server.
-//
-
- STATUS_DS_GC_NOT_AVAILABLE = NTSTATUS($C00002B0);
- {$EXTERNALSYM STATUS_DS_GC_NOT_AVAILABLE}
-
-//
-// MessageId: STATUS_DIRECTORY_SERVICE_REQUIRED
-//
-// MessageText:
-//
-// The requested operation requires a directory service, and none was available.
-//
-
- STATUS_DIRECTORY_SERVICE_REQUIRED = NTSTATUS($C00002B1);
- {$EXTERNALSYM STATUS_DIRECTORY_SERVICE_REQUIRED}
-
-//
-// MessageId: STATUS_REPARSE_ATTRIBUTE_CONFLICT
-//
-// MessageText:
-//
-// The reparse attribute cannot be set as it is incompatible with an existing attribute.
-//
-
- STATUS_REPARSE_ATTRIBUTE_CONFLICT = NTSTATUS($C00002B2);
- {$EXTERNALSYM STATUS_REPARSE_ATTRIBUTE_CONFLICT}
-
-//
-// MessageId: STATUS_CANT_ENABLE_DENY_ONLY
-//
-// MessageText:
-//
-// A group marked use for deny only can not be enabled.
-//
-
- STATUS_CANT_ENABLE_DENY_ONLY = NTSTATUS($C00002B3);
- {$EXTERNALSYM STATUS_CANT_ENABLE_DENY_ONLY}
-
-//
-// MessageId: STATUS_FLOAT_MULTIPLE_FAULTS
-//
-// MessageText:
-//
-// {EXCEPTION}
-// Multiple floating point faults.
-//
-
- STATUS_FLOAT_MULTIPLE_FAULTS = NTSTATUS($C00002B4); // winnt
- {$EXTERNALSYM STATUS_FLOAT_MULTIPLE_FAULTS}
-
-//
-// MessageId: STATUS_FLOAT_MULTIPLE_TRAPS
-//
-// MessageText:
-//
-// {EXCEPTION}
-// Multiple floating point traps.
-//
-
- STATUS_FLOAT_MULTIPLE_TRAPS = NTSTATUS($C00002B5); // winnt
- {$EXTERNALSYM STATUS_FLOAT_MULTIPLE_TRAPS}
-
-//
-// MessageId: STATUS_DEVICE_REMOVED
-//
-// MessageText:
-//
-// The device has been removed.
-//
-
- STATUS_DEVICE_REMOVED = NTSTATUS($C00002B6);
- {$EXTERNALSYM STATUS_DEVICE_REMOVED}
-
-//
-// MessageId: STATUS_JOURNAL_DELETE_IN_PROGRESS
-//
-// MessageText:
-//
-// The volume change journal is being deleted.
-//
-
- STATUS_JOURNAL_DELETE_IN_PROGRESS = NTSTATUS($C00002B7);
- {$EXTERNALSYM STATUS_JOURNAL_DELETE_IN_PROGRESS}
-
-//
-// MessageId: STATUS_JOURNAL_NOT_ACTIVE
-//
-// MessageText:
-//
-// The volume change journal service is not active.
-//
-
- STATUS_JOURNAL_NOT_ACTIVE = NTSTATUS($C00002B8);
- {$EXTERNALSYM STATUS_JOURNAL_NOT_ACTIVE}
-
-//
-// MessageId: STATUS_NOINTERFACE
-//
-// MessageText:
-//
-// The requested interface is not supported.
-//
-
- STATUS_NOINTERFACE = NTSTATUS($C00002B9);
- {$EXTERNALSYM STATUS_NOINTERFACE}
-
-//
-// MessageId: STATUS_DS_ADMIN_LIMIT_EXCEEDED
-//
-// MessageText:
-//
-// A directory service resource limit has been exceeded.
-//
-
- STATUS_DS_ADMIN_LIMIT_EXCEEDED = NTSTATUS($C00002C1);
- {$EXTERNALSYM STATUS_DS_ADMIN_LIMIT_EXCEEDED}
-
-//
-// MessageId: STATUS_DRIVER_FAILED_SLEEP
-//
-// MessageText:
-//
-// {System Standby Failed}
-// The driver %hs does not support standby mode. Updating this
-// driver may allow the system to go to standby mode.
-//
-
- STATUS_DRIVER_FAILED_SLEEP = NTSTATUS($C00002C2);
- {$EXTERNALSYM STATUS_DRIVER_FAILED_SLEEP}
-
-//
-// MessageId: STATUS_MUTUAL_AUTHENTICATION_FAILED
-//
-// MessageText:
-//
-// Mutual Authentication failed. The server's password is out of date at the domain controller.
-//
-
- STATUS_MUTUAL_AUTHENTICATION_FAILED = NTSTATUS($C00002C3);
- {$EXTERNALSYM STATUS_MUTUAL_AUTHENTICATION_FAILED}
-
-//
-// MessageId: STATUS_CORRUPT_SYSTEM_FILE
-//
-// MessageText:
-//
-// The system file %1 has become corrupt and has been replaced.
-//
-
- STATUS_CORRUPT_SYSTEM_FILE = NTSTATUS($C00002C4);
- {$EXTERNALSYM STATUS_CORRUPT_SYSTEM_FILE}
-
-//
-// MessageId: STATUS_DATATYPE_MISALIGNMENT_ERROR
-//
-// MessageText:
-//
-// {EXCEPTION}
-// Alignment Error
-// A datatype misalignment error was detected in a load or store instruction.
-//
-
- STATUS_DATATYPE_MISALIGNMENT_ERROR = NTSTATUS($C00002C5);
- {$EXTERNALSYM STATUS_DATATYPE_MISALIGNMENT_ERROR}
-
-//
-// MessageId: STATUS_WMI_READ_ONLY
-//
-// MessageText:
-//
-// The WMI data item or data block is read only.
-//
-
- STATUS_WMI_READ_ONLY = NTSTATUS($C00002C6);
- {$EXTERNALSYM STATUS_WMI_READ_ONLY}
-
-//
-// MessageId: STATUS_WMI_SET_FAILURE
-//
-// MessageText:
-//
-// The WMI data item or data block could not be changed.
-//
-
- STATUS_WMI_SET_FAILURE = NTSTATUS($C00002C7);
- {$EXTERNALSYM STATUS_WMI_SET_FAILURE}
-
-//
-// MessageId: STATUS_COMMITMENT_MINIMUM
-//
-// MessageText:
-//
-// {Virtual Memory Minimum Too Low}
-// Your system is low on virtual memory. Windows is increasing the size of your virtual memory paging file.
-// During this process, memory requests for some applications may be denied. For more information, see Help.
-//
-
- STATUS_COMMITMENT_MINIMUM = NTSTATUS($C00002C8);
- {$EXTERNALSYM STATUS_COMMITMENT_MINIMUM}
-
-//
-// MessageId: STATUS_REG_NAT_CONSUMPTION
-//
-// MessageText:
-//
-// {EXCEPTION}
-// Register NaT consumption faults.
-// A NaT value is consumed on a non speculative instruction.
-//
-
- STATUS_REG_NAT_CONSUMPTION = NTSTATUS($C00002C9); // winnt
- {$EXTERNALSYM STATUS_REG_NAT_CONSUMPTION}
-
-//
-// MessageId: STATUS_TRANSPORT_FULL
-//
-// MessageText:
-//
-// The medium changer's transport element contains media, which is causing the operation to fail.
-//
-
- STATUS_TRANSPORT_FULL = NTSTATUS($C00002CA);
- {$EXTERNALSYM STATUS_TRANSPORT_FULL}
-
-//
-// MessageId: STATUS_DS_SAM_INIT_FAILURE
-//
-// MessageText:
-//
-// Security Accounts Manager initialization failed because of the following error:
-// %hs
-// Error Status: 0x%x.
-// Please click OK to shutdown this system and reboot into Directory Services Restore Mode, check the event log for more detailed information.
-//
-
- STATUS_DS_SAM_INIT_FAILURE = NTSTATUS($C00002CB);
- {$EXTERNALSYM STATUS_DS_SAM_INIT_FAILURE}
-
-//
-// MessageId: STATUS_ONLY_IF_CONNECTED
-//
-// MessageText:
-//
-// This operation is supported only when you are connected to the server.
-//
-
- STATUS_ONLY_IF_CONNECTED = NTSTATUS($C00002CC);
- {$EXTERNALSYM STATUS_ONLY_IF_CONNECTED}
-
-//
-// MessageId: STATUS_DS_SENSITIVE_GROUP_VIOLATION
-//
-// MessageText:
-//
-// Only an administrator can modify the membership list of an administrative group.
-//
-
- STATUS_DS_SENSITIVE_GROUP_VIOLATION = NTSTATUS($C00002CD);
- {$EXTERNALSYM STATUS_DS_SENSITIVE_GROUP_VIOLATION}
-
-//
-// MessageId: STATUS_PNP_RESTART_ENUMERATION
-//
-// MessageText:
-//
-// A device was removed so enumeration must be restarted.
-//
-
- STATUS_PNP_RESTART_ENUMERATION = NTSTATUS($C00002CE);
- {$EXTERNALSYM STATUS_PNP_RESTART_ENUMERATION}
-
-//
-// MessageId: STATUS_JOURNAL_ENTRY_DELETED
-//
-// MessageText:
-//
-// The journal entry has been deleted from the journal.
-//
-
- STATUS_JOURNAL_ENTRY_DELETED = NTSTATUS($C00002CF);
- {$EXTERNALSYM STATUS_JOURNAL_ENTRY_DELETED}
-
-//
-// MessageId: STATUS_DS_CANT_MOD_PRIMARYGROUPID
-//
-// MessageText:
-//
-// Cannot change the primary group ID of a domain controller account.
-//
-
- STATUS_DS_CANT_MOD_PRIMARYGROUPID = NTSTATUS($C00002D0);
- {$EXTERNALSYM STATUS_DS_CANT_MOD_PRIMARYGROUPID}
-
-//
-// MessageId: STATUS_SYSTEM_IMAGE_BAD_SIGNATURE
-//
-// MessageText:
-//
-// {Fatal System Error}
-// The system image %s is not properly signed.
-// The file has been replaced with the signed file.
-// The system has been shut down.
-//
-
- STATUS_SYSTEM_IMAGE_BAD_SIGNATURE = NTSTATUS($C00002D1);
- {$EXTERNALSYM STATUS_SYSTEM_IMAGE_BAD_SIGNATURE}
-
-//
-// MessageId: STATUS_PNP_REBOOT_REQUIRED
-//
-// MessageText:
-//
-// Device will not start without a reboot.
-//
-
- STATUS_PNP_REBOOT_REQUIRED = NTSTATUS($C00002D2);
- {$EXTERNALSYM STATUS_PNP_REBOOT_REQUIRED}
-
-//
-// MessageId: STATUS_POWER_STATE_INVALID
-//
-// MessageText:
-//
-// Current device power state cannot support this request.
-//
-
- STATUS_POWER_STATE_INVALID = NTSTATUS($C00002D3);
- {$EXTERNALSYM STATUS_POWER_STATE_INVALID}
-
-//
-// MessageId: STATUS_DS_INVALID_GROUP_TYPE
-//
-// MessageText:
-//
-// The specified group type is invalid.
-//
-
- STATUS_DS_INVALID_GROUP_TYPE = NTSTATUS($C00002D4);
- {$EXTERNALSYM STATUS_DS_INVALID_GROUP_TYPE}
-
-//
-// MessageId: STATUS_DS_NO_NEST_GLOBALGROUP_IN_MIXEDDOMAIN
-//
-// MessageText:
-//
-// In mixed domain no nesting of global group if group is security enabled.
-//
-
- STATUS_DS_NO_NEST_GLOBALGROUP_IN_MIXEDDOMAIN = NTSTATUS($C00002D5);
- {$EXTERNALSYM STATUS_DS_NO_NEST_GLOBALGROUP_IN_MIXEDDOMAIN}
-
-//
-// MessageId: STATUS_DS_NO_NEST_LOCALGROUP_IN_MIXEDDOMAIN
-//
-// MessageText:
-//
-// In mixed domain, cannot nest local groups with other local groups, if the group is security enabled.
-//
-
- STATUS_DS_NO_NEST_LOCALGROUP_IN_MIXEDDOMAIN = NTSTATUS($C00002D6);
- {$EXTERNALSYM STATUS_DS_NO_NEST_LOCALGROUP_IN_MIXEDDOMAIN}
-
-//
-// MessageId: STATUS_DS_GLOBAL_CANT_HAVE_LOCAL_MEMBER
-//
-// MessageText:
-//
-// A global group cannot have a local group as a member.
-//
-
- STATUS_DS_GLOBAL_CANT_HAVE_LOCAL_MEMBER = NTSTATUS($C00002D7);
- {$EXTERNALSYM STATUS_DS_GLOBAL_CANT_HAVE_LOCAL_MEMBER}
-
-//
-// MessageId: STATUS_DS_GLOBAL_CANT_HAVE_UNIVERSAL_MEMBER
-//
-// MessageText:
-//
-// A global group cannot have a universal group as a member.
-//
-
- STATUS_DS_GLOBAL_CANT_HAVE_UNIVERSAL_MEMBER = NTSTATUS($C00002D8);
- {$EXTERNALSYM STATUS_DS_GLOBAL_CANT_HAVE_UNIVERSAL_MEMBER}
-
-//
-// MessageId: STATUS_DS_UNIVERSAL_CANT_HAVE_LOCAL_MEMBER
-//
-// MessageText:
-//
-// A universal group cannot have a local group as a member.
-//
-
- STATUS_DS_UNIVERSAL_CANT_HAVE_LOCAL_MEMBER = NTSTATUS($C00002D9);
- {$EXTERNALSYM STATUS_DS_UNIVERSAL_CANT_HAVE_LOCAL_MEMBER}
-
-//
-// MessageId: STATUS_DS_GLOBAL_CANT_HAVE_CROSSDOMAIN_MEMBER
-//
-// MessageText:
-//
-// A global group cannot have a cross domain member.
-//
-
- STATUS_DS_GLOBAL_CANT_HAVE_CROSSDOMAIN_MEMBER = NTSTATUS($C00002DA);
- {$EXTERNALSYM STATUS_DS_GLOBAL_CANT_HAVE_CROSSDOMAIN_MEMBER}
-
-//
-// MessageId: STATUS_DS_LOCAL_CANT_HAVE_CROSSDOMAIN_LOCAL_MEMBER
-//
-// MessageText:
-//
-// A local group cannot have another cross domain local group as a member.
-//
-
- STATUS_DS_LOCAL_CANT_HAVE_CROSSDOMAIN_LOCAL_MEMBER = NTSTATUS($C00002DB);
- {$EXTERNALSYM STATUS_DS_LOCAL_CANT_HAVE_CROSSDOMAIN_LOCAL_MEMBER}
-
-//
-// MessageId: STATUS_DS_HAVE_PRIMARY_MEMBERS
-//
-// MessageText:
-//
-// Can not change to security disabled group because of having primary members in this group.
-//
-
- STATUS_DS_HAVE_PRIMARY_MEMBERS = NTSTATUS($C00002DC);
- {$EXTERNALSYM STATUS_DS_HAVE_PRIMARY_MEMBERS}
-
-//
-// MessageId: STATUS_WMI_NOT_SUPPORTED
-//
-// MessageText:
-//
-// The WMI operation is not supported by the data block or method.
-//
-
- STATUS_WMI_NOT_SUPPORTED = NTSTATUS($C00002DD);
- {$EXTERNALSYM STATUS_WMI_NOT_SUPPORTED}
-
-//
-// MessageId: STATUS_INSUFFICIENT_POWER
-//
-// MessageText:
-//
-// There is not enough power to complete the requested operation.
-//
-
- STATUS_INSUFFICIENT_POWER = NTSTATUS($C00002DE);
- {$EXTERNALSYM STATUS_INSUFFICIENT_POWER}
-
-//
-// MessageId: STATUS_SAM_NEED_BOOTKEY_PASSWORD
-//
-// MessageText:
-//
-// Security Account Manager needs to get the boot password.
-//
-
- STATUS_SAM_NEED_BOOTKEY_PASSWORD = NTSTATUS($C00002DF);
- {$EXTERNALSYM STATUS_SAM_NEED_BOOTKEY_PASSWORD}
-
-//
-// MessageId: STATUS_SAM_NEED_BOOTKEY_FLOPPY
-//
-// MessageText:
-//
-// Security Account Manager needs to get the boot key from floppy disk.
-//
-
- STATUS_SAM_NEED_BOOTKEY_FLOPPY = NTSTATUS($C00002E0);
- {$EXTERNALSYM STATUS_SAM_NEED_BOOTKEY_FLOPPY}
-
-//
-// MessageId: STATUS_DS_CANT_START
-//
-// MessageText:
-//
-// Directory Service can not start.
-//
-
- STATUS_DS_CANT_START = NTSTATUS($C00002E1);
- {$EXTERNALSYM STATUS_DS_CANT_START}
-
-//
-// MessageId: STATUS_DS_INIT_FAILURE
-//
-// MessageText:
-//
-// Directory Services could not start because of the following error:
-// %hs
-// Error Status: 0x%x.
-// Please click OK to shutdown this system and reboot into Directory Services Restore Mode, check the event log for more detailed information.
-//
-
- STATUS_DS_INIT_FAILURE = NTSTATUS($C00002E2);
- {$EXTERNALSYM STATUS_DS_INIT_FAILURE}
-
-//
-// MessageId: STATUS_SAM_INIT_FAILURE
-//
-// MessageText:
-//
-// Security Accounts Manager initialization failed because of the following error:
-// %hs
-// Error Status: 0x%x.
-// Please click OK to shutdown this system and reboot into Safe Mode, check the event log for more detailed information.
-//
-
- STATUS_SAM_INIT_FAILURE = NTSTATUS($C00002E3);
- {$EXTERNALSYM STATUS_SAM_INIT_FAILURE}
-
-//
-// MessageId: STATUS_DS_GC_REQUIRED
-//
-// MessageText:
-//
-// The requested operation can be performed only on a global catalog server.
-//
-
- STATUS_DS_GC_REQUIRED = NTSTATUS($C00002E4);
- {$EXTERNALSYM STATUS_DS_GC_REQUIRED}
-
-//
-// MessageId: STATUS_DS_LOCAL_MEMBER_OF_LOCAL_ONLY
-//
-// MessageText:
-//
-// A local group can only be a member of other local groups in the same domain.
-//
-
- STATUS_DS_LOCAL_MEMBER_OF_LOCAL_ONLY = NTSTATUS($C00002E5);
- {$EXTERNALSYM STATUS_DS_LOCAL_MEMBER_OF_LOCAL_ONLY}
-
-//
-// MessageId: STATUS_DS_NO_FPO_IN_UNIVERSAL_GROUPS
-//
-// MessageText:
-//
-// Foreign security principals cannot be members of universal groups.
-//
-
- STATUS_DS_NO_FPO_IN_UNIVERSAL_GROUPS = NTSTATUS($C00002E6);
- {$EXTERNALSYM STATUS_DS_NO_FPO_IN_UNIVERSAL_GROUPS}
-
-//
-// MessageId: STATUS_DS_MACHINE_ACCOUNT_QUOTA_EXCEEDED
-//
-// MessageText:
-//
-// Your computer could not be joined to the domain. You have exceeded the maximum number of computer accounts you are allowed to create in this domain. Contact your system administrator to have this limit reset or increased.
-//
-
- STATUS_DS_MACHINE_ACCOUNT_QUOTA_EXCEEDED = NTSTATUS($C00002E7);
- {$EXTERNALSYM STATUS_DS_MACHINE_ACCOUNT_QUOTA_EXCEEDED}
-
-//
-// MessageId: STATUS_MULTIPLE_FAULT_VIOLATION
-//
-// MessageText:
-//
-// STATUS_MULTIPLE_FAULT_VIOLATION
-//
-
- STATUS_MULTIPLE_FAULT_VIOLATION = NTSTATUS($C00002E8);
- {$EXTERNALSYM STATUS_MULTIPLE_FAULT_VIOLATION}
-
-//
-// MessageId: STATUS_NOT_SUPPORTED_ON_SBS
-//
-// MessageText:
-//
-// This operation is not supported on a Microsoft Small Business Server
-//
-
- STATUS_NOT_SUPPORTED_ON_SBS = NTSTATUS($C0000300);
- {$EXTERNALSYM STATUS_NOT_SUPPORTED_ON_SBS}
-
-//
-// MessageId: STATUS_WOW_ASSERTION
-//
-// MessageText:
-//
-// WOW Assertion Error.
-//
-
- STATUS_WOW_ASSERTION = NTSTATUS($C0009898);
- {$EXTERNALSYM STATUS_WOW_ASSERTION}
-
-//
-// MessageId: DBG_NO_STATE_CHANGE
-//
-// MessageText:
-//
-// Debugger did not perform a state change.
-//
-
- DBG_NO_STATE_CHANGE = NTSTATUS($C0010001);
- {$EXTERNALSYM DBG_NO_STATE_CHANGE}
-
-//
-// MessageId: DBG_APP_NOT_IDLE
-//
-// MessageText:
-//
-// Debugger has found the application is not idle.
-//
-
- DBG_APP_NOT_IDLE = NTSTATUS($C0010002);
- {$EXTERNALSYM DBG_APP_NOT_IDLE}
-
-//
-// MessageId: RPC_NT_INVALID_STRING_BINDING
-//
-// MessageText:
-//
-// The string binding is invalid.
-//
-
- RPC_NT_INVALID_STRING_BINDING = NTSTATUS($C0020001);
- {$EXTERNALSYM RPC_NT_INVALID_STRING_BINDING}
-
-//
-// MessageId: RPC_NT_WRONG_KIND_OF_BINDING
-//
-// MessageText:
-//
-// The binding handle is not the correct type.
-//
-
- RPC_NT_WRONG_KIND_OF_BINDING = NTSTATUS($C0020002);
- {$EXTERNALSYM RPC_NT_WRONG_KIND_OF_BINDING}
-
-//
-// MessageId: RPC_NT_INVALID_BINDING
-//
-// MessageText:
-//
-// The binding handle is invalid.
-//
-
- RPC_NT_INVALID_BINDING = NTSTATUS($C0020003);
- {$EXTERNALSYM RPC_NT_INVALID_BINDING}
-
-//
-// MessageId: RPC_NT_PROTSEQ_NOT_SUPPORTED
-//
-// MessageText:
-//
-// The RPC protocol sequence is not supported.
-//
-
- RPC_NT_PROTSEQ_NOT_SUPPORTED = NTSTATUS($C0020004);
- {$EXTERNALSYM RPC_NT_PROTSEQ_NOT_SUPPORTED}
-
-//
-// MessageId: RPC_NT_INVALID_RPC_PROTSEQ
-//
-// MessageText:
-//
-// The RPC protocol sequence is invalid.
-//
-
- RPC_NT_INVALID_RPC_PROTSEQ = NTSTATUS($C0020005);
- {$EXTERNALSYM RPC_NT_INVALID_RPC_PROTSEQ}
-
-//
-// MessageId: RPC_NT_INVALID_STRING_UUID
-//
-// MessageText:
-//
-// The string UUID is invalid.
-//
-
- RPC_NT_INVALID_STRING_UUID = NTSTATUS($C0020006);
- {$EXTERNALSYM RPC_NT_INVALID_STRING_UUID}
-
-//
-// MessageId: RPC_NT_INVALID_ENDPOINT_FORMAT
-//
-// MessageText:
-//
-// The endpoint format is invalid.
-//
-
- RPC_NT_INVALID_ENDPOINT_FORMAT = NTSTATUS($C0020007);
- {$EXTERNALSYM RPC_NT_INVALID_ENDPOINT_FORMAT}
-
-//
-// MessageId: RPC_NT_INVALID_NET_ADDR
-//
-// MessageText:
-//
-// The network address is invalid.
-//
-
- RPC_NT_INVALID_NET_ADDR = NTSTATUS($C0020008);
- {$EXTERNALSYM RPC_NT_INVALID_NET_ADDR}
-
-//
-// MessageId: RPC_NT_NO_ENDPOINT_FOUND
-//
-// MessageText:
-//
-// No endpoint was found.
-//
-
- RPC_NT_NO_ENDPOINT_FOUND = NTSTATUS($C0020009);
- {$EXTERNALSYM RPC_NT_NO_ENDPOINT_FOUND}
-
-//
-// MessageId: RPC_NT_INVALID_TIMEOUT
-//
-// MessageText:
-//
-// The timeout value is invalid.
-//
-
- RPC_NT_INVALID_TIMEOUT = NTSTATUS($C002000A);
- {$EXTERNALSYM RPC_NT_INVALID_TIMEOUT}
-
-//
-// MessageId: RPC_NT_OBJECT_NOT_FOUND
-//
-// MessageText:
-//
-// The object UUID was not found.
-//
-
- RPC_NT_OBJECT_NOT_FOUND = NTSTATUS($C002000B);
- {$EXTERNALSYM RPC_NT_OBJECT_NOT_FOUND}
-
-//
-// MessageId: RPC_NT_ALREADY_REGISTERED
-//
-// MessageText:
-//
-// The object UUID has already been registered.
-//
-
- RPC_NT_ALREADY_REGISTERED = NTSTATUS($C002000C);
- {$EXTERNALSYM RPC_NT_ALREADY_REGISTERED}
-
-//
-// MessageId: RPC_NT_TYPE_ALREADY_REGISTERED
-//
-// MessageText:
-//
-// The type UUID has already been registered.
-//
-
- RPC_NT_TYPE_ALREADY_REGISTERED = NTSTATUS($C002000D);
- {$EXTERNALSYM RPC_NT_TYPE_ALREADY_REGISTERED}
-
-//
-// MessageId: RPC_NT_ALREADY_LISTENING
-//
-// MessageText:
-//
-// The RPC server is already listening.
-//
-
- RPC_NT_ALREADY_LISTENING = NTSTATUS($C002000E);
- {$EXTERNALSYM RPC_NT_ALREADY_LISTENING}
-
-//
-// MessageId: RPC_NT_NO_PROTSEQS_REGISTERED
-//
-// MessageText:
-//
-// No protocol sequences have been registered.
-//
-
- RPC_NT_NO_PROTSEQS_REGISTERED = NTSTATUS($C002000F);
- {$EXTERNALSYM RPC_NT_NO_PROTSEQS_REGISTERED}
-
-//
-// MessageId: RPC_NT_NOT_LISTENING
-//
-// MessageText:
-//
-// The RPC server is not listening.
-//
-
- RPC_NT_NOT_LISTENING = NTSTATUS($C0020010);
- {$EXTERNALSYM RPC_NT_NOT_LISTENING}
-
-//
-// MessageId: RPC_NT_UNKNOWN_MGR_TYPE
-//
-// MessageText:
-//
-// The manager type is unknown.
-//
-
- RPC_NT_UNKNOWN_MGR_TYPE = NTSTATUS($C0020011);
- {$EXTERNALSYM RPC_NT_UNKNOWN_MGR_TYPE}
-
-//
-// MessageId: RPC_NT_UNKNOWN_IF
-//
-// MessageText:
-//
-// The interface is unknown.
-//
-
- RPC_NT_UNKNOWN_IF = NTSTATUS($C0020012);
- {$EXTERNALSYM RPC_NT_UNKNOWN_IF}
-
-//
-// MessageId: RPC_NT_NO_BINDINGS
-//
-// MessageText:
-//
-// There are no bindings.
-//
-
- RPC_NT_NO_BINDINGS = NTSTATUS($C0020013);
- {$EXTERNALSYM RPC_NT_NO_BINDINGS}
-
-//
-// MessageId: RPC_NT_NO_PROTSEQS
-//
-// MessageText:
-//
-// There are no protocol sequences.
-//
-
- RPC_NT_NO_PROTSEQS = NTSTATUS($C0020014);
- {$EXTERNALSYM RPC_NT_NO_PROTSEQS}
-
-//
-// MessageId: RPC_NT_CANT_CREATE_ENDPOINT
-//
-// MessageText:
-//
-// The endpoint cannot be created.
-//
-
- RPC_NT_CANT_CREATE_ENDPOINT = NTSTATUS($C0020015);
- {$EXTERNALSYM RPC_NT_CANT_CREATE_ENDPOINT}
-
-//
-// MessageId: RPC_NT_OUT_OF_RESOURCES
-//
-// MessageText:
-//
-// Not enough resources are available to complete this operation.
-//
-
- RPC_NT_OUT_OF_RESOURCES = NTSTATUS($C0020016);
- {$EXTERNALSYM RPC_NT_OUT_OF_RESOURCES}
-
-//
-// MessageId: RPC_NT_SERVER_UNAVAILABLE
-//
-// MessageText:
-//
-// The RPC server is unavailable.
-//
-
- RPC_NT_SERVER_UNAVAILABLE = NTSTATUS($C0020017);
- {$EXTERNALSYM RPC_NT_SERVER_UNAVAILABLE}
-
-//
-// MessageId: RPC_NT_SERVER_TOO_BUSY
-//
-// MessageText:
-//
-// The RPC server is too busy to complete this operation.
-//
-
- RPC_NT_SERVER_TOO_BUSY = NTSTATUS($C0020018);
- {$EXTERNALSYM RPC_NT_SERVER_TOO_BUSY}
-
-//
-// MessageId: RPC_NT_INVALID_NETWORK_OPTIONS
-//
-// MessageText:
-//
-// The network options are invalid.
-//
-
- RPC_NT_INVALID_NETWORK_OPTIONS = NTSTATUS($C0020019);
- {$EXTERNALSYM RPC_NT_INVALID_NETWORK_OPTIONS}
-
-//
-// MessageId: RPC_NT_NO_CALL_ACTIVE
-//
-// MessageText:
-//
-// There are no remote procedure calls active on this thread.
-//
-
- RPC_NT_NO_CALL_ACTIVE = NTSTATUS($C002001A);
- {$EXTERNALSYM RPC_NT_NO_CALL_ACTIVE}
-
-//
-// MessageId: RPC_NT_CALL_FAILED
-//
-// MessageText:
-//
-// The remote procedure call failed.
-//
-
- RPC_NT_CALL_FAILED = NTSTATUS($C002001B);
- {$EXTERNALSYM RPC_NT_CALL_FAILED}
-
-//
-// MessageId: RPC_NT_CALL_FAILED_DNE
-//
-// MessageText:
-//
-// The remote procedure call failed and did not execute.
-//
-
- RPC_NT_CALL_FAILED_DNE = NTSTATUS($C002001C);
- {$EXTERNALSYM RPC_NT_CALL_FAILED_DNE}
-
-//
-// MessageId: RPC_NT_PROTOCOL_ERROR
-//
-// MessageText:
-//
-// An RPC protocol error occurred.
-//
-
- RPC_NT_PROTOCOL_ERROR = NTSTATUS($C002001D);
- {$EXTERNALSYM RPC_NT_PROTOCOL_ERROR}
-
-//
-// MessageId: RPC_NT_UNSUPPORTED_TRANS_SYN
-//
-// MessageText:
-//
-// The transfer syntax is not supported by the RPC server.
-//
-
- RPC_NT_UNSUPPORTED_TRANS_SYN = NTSTATUS($C002001F);
- {$EXTERNALSYM RPC_NT_UNSUPPORTED_TRANS_SYN}
-
-//
-// MessageId: RPC_NT_UNSUPPORTED_TYPE
-//
-// MessageText:
-//
-// The type UUID is not supported.
-//
-
- RPC_NT_UNSUPPORTED_TYPE = NTSTATUS($C0020021);
- {$EXTERNALSYM RPC_NT_UNSUPPORTED_TYPE}
-
-//
-// MessageId: RPC_NT_INVALID_TAG
-//
-// MessageText:
-//
-// The tag is invalid.
-//
-
- RPC_NT_INVALID_TAG = NTSTATUS($C0020022);
- {$EXTERNALSYM RPC_NT_INVALID_TAG}
-
-//
-// MessageId: RPC_NT_INVALID_BOUND
-//
-// MessageText:
-//
-// The array bounds are invalid.
-//
-
- RPC_NT_INVALID_BOUND = NTSTATUS($C0020023);
- {$EXTERNALSYM RPC_NT_INVALID_BOUND}
-
-//
-// MessageId: RPC_NT_NO_ENTRY_NAME
-//
-// MessageText:
-//
-// The binding does not contain an entry name.
-//
-
- RPC_NT_NO_ENTRY_NAME = NTSTATUS($C0020024);
- {$EXTERNALSYM RPC_NT_NO_ENTRY_NAME}
-
-//
-// MessageId: RPC_NT_INVALID_NAME_SYNTAX
-//
-// MessageText:
-//
-// The name syntax is invalid.
-//
-
- RPC_NT_INVALID_NAME_SYNTAX = NTSTATUS($C0020025);
- {$EXTERNALSYM RPC_NT_INVALID_NAME_SYNTAX}
-
-//
-// MessageId: RPC_NT_UNSUPPORTED_NAME_SYNTAX
-//
-// MessageText:
-//
-// The name syntax is not supported.
-//
-
- RPC_NT_UNSUPPORTED_NAME_SYNTAX = NTSTATUS($C0020026);
- {$EXTERNALSYM RPC_NT_UNSUPPORTED_NAME_SYNTAX}
-
-//
-// MessageId: RPC_NT_UUID_NO_ADDRESS
-//
-// MessageText:
-//
-// No network address is available to use to construct a UUID.
-//
-
- RPC_NT_UUID_NO_ADDRESS = NTSTATUS($C0020028);
- {$EXTERNALSYM RPC_NT_UUID_NO_ADDRESS}
-
-//
-// MessageId: RPC_NT_DUPLICATE_ENDPOINT
-//
-// MessageText:
-//
-// The endpoint is a duplicate.
-//
-
- RPC_NT_DUPLICATE_ENDPOINT = NTSTATUS($C0020029);
- {$EXTERNALSYM RPC_NT_DUPLICATE_ENDPOINT}
-
-//
-// MessageId: RPC_NT_UNKNOWN_AUTHN_TYPE
-//
-// MessageText:
-//
-// The authentication type is unknown.
-//
-
- RPC_NT_UNKNOWN_AUTHN_TYPE = NTSTATUS($C002002A);
- {$EXTERNALSYM RPC_NT_UNKNOWN_AUTHN_TYPE}
-
-//
-// MessageId: RPC_NT_MAX_CALLS_TOO_SMALL
-//
-// MessageText:
-//
-// The maximum number of calls is too small.
-//
-
- RPC_NT_MAX_CALLS_TOO_SMALL = NTSTATUS($C002002B);
- {$EXTERNALSYM RPC_NT_MAX_CALLS_TOO_SMALL}
-
-//
-// MessageId: RPC_NT_STRING_TOO_LONG
-//
-// MessageText:
-//
-// The string is too long.
-//
-
- RPC_NT_STRING_TOO_LONG = NTSTATUS($C002002C);
- {$EXTERNALSYM RPC_NT_STRING_TOO_LONG}
-
-//
-// MessageId: RPC_NT_PROTSEQ_NOT_FOUND
-//
-// MessageText:
-//
-// The RPC protocol sequence was not found.
-//
-
- RPC_NT_PROTSEQ_NOT_FOUND = NTSTATUS($C002002D);
- {$EXTERNALSYM RPC_NT_PROTSEQ_NOT_FOUND}
-
-//
-// MessageId: RPC_NT_PROCNUM_OUT_OF_RANGE
-//
-// MessageText:
-//
-// The procedure number is out of range.
-//
-
- RPC_NT_PROCNUM_OUT_OF_RANGE = NTSTATUS($C002002E);
- {$EXTERNALSYM RPC_NT_PROCNUM_OUT_OF_RANGE}
-
-//
-// MessageId: RPC_NT_BINDING_HAS_NO_AUTH
-//
-// MessageText:
-//
-// The binding does not contain any authentication information.
-//
-
- RPC_NT_BINDING_HAS_NO_AUTH = NTSTATUS($C002002F);
- {$EXTERNALSYM RPC_NT_BINDING_HAS_NO_AUTH}
-
-//
-// MessageId: RPC_NT_UNKNOWN_AUTHN_SERVICE
-//
-// MessageText:
-//
-// The authentication service is unknown.
-//
-
- RPC_NT_UNKNOWN_AUTHN_SERVICE = NTSTATUS($C0020030);
- {$EXTERNALSYM RPC_NT_UNKNOWN_AUTHN_SERVICE}
-
-//
-// MessageId: RPC_NT_UNKNOWN_AUTHN_LEVEL
-//
-// MessageText:
-//
-// The authentication level is unknown.
-//
-
- RPC_NT_UNKNOWN_AUTHN_LEVEL = NTSTATUS($C0020031);
- {$EXTERNALSYM RPC_NT_UNKNOWN_AUTHN_LEVEL}
-
-//
-// MessageId: RPC_NT_INVALID_AUTH_IDENTITY
-//
-// MessageText:
-//
-// The security context is invalid.
-//
-
- RPC_NT_INVALID_AUTH_IDENTITY = NTSTATUS($C0020032);
- {$EXTERNALSYM RPC_NT_INVALID_AUTH_IDENTITY}
-
-//
-// MessageId: RPC_NT_UNKNOWN_AUTHZ_SERVICE
-//
-// MessageText:
-//
-// The authorization service is unknown.
-//
-
- RPC_NT_UNKNOWN_AUTHZ_SERVICE = NTSTATUS($C0020033);
- {$EXTERNALSYM RPC_NT_UNKNOWN_AUTHZ_SERVICE}
-
-//
-// MessageId: EPT_NT_INVALID_ENTRY
-//
-// MessageText:
-//
-// The entry is invalid.
-//
-
- EPT_NT_INVALID_ENTRY = NTSTATUS($C0020034);
- {$EXTERNALSYM EPT_NT_INVALID_ENTRY}
-
-//
-// MessageId: EPT_NT_CANT_PERFORM_OP
-//
-// MessageText:
-//
-// The operation cannot be performed.
-//
-
- EPT_NT_CANT_PERFORM_OP = NTSTATUS($C0020035);
- {$EXTERNALSYM EPT_NT_CANT_PERFORM_OP}
-
-//
-// MessageId: EPT_NT_NOT_REGISTERED
-//
-// MessageText:
-//
-// There are no more endpoints available from the endpoint mapper.
-//
-
- EPT_NT_NOT_REGISTERED = NTSTATUS($C0020036);
- {$EXTERNALSYM EPT_NT_NOT_REGISTERED}
-
-//
-// MessageId: RPC_NT_NOTHING_TO_EXPORT
-//
-// MessageText:
-//
-// No interfaces have been exported.
-//
-
- RPC_NT_NOTHING_TO_EXPORT = NTSTATUS($C0020037);
- {$EXTERNALSYM RPC_NT_NOTHING_TO_EXPORT}
-
-//
-// MessageId: RPC_NT_INCOMPLETE_NAME
-//
-// MessageText:
-//
-// The entry name is incomplete.
-//
-
- RPC_NT_INCOMPLETE_NAME = NTSTATUS($C0020038);
- {$EXTERNALSYM RPC_NT_INCOMPLETE_NAME}
-
-//
-// MessageId: RPC_NT_INVALID_VERS_OPTION
-//
-// MessageText:
-//
-// The version option is invalid.
-//
-
- RPC_NT_INVALID_VERS_OPTION = NTSTATUS($C0020039);
- {$EXTERNALSYM RPC_NT_INVALID_VERS_OPTION}
-
-//
-// MessageId: RPC_NT_NO_MORE_MEMBERS
-//
-// MessageText:
-//
-// There are no more members.
-//
-
- RPC_NT_NO_MORE_MEMBERS = NTSTATUS($C002003A);
- {$EXTERNALSYM RPC_NT_NO_MORE_MEMBERS}
-
-//
-// MessageId: RPC_NT_NOT_ALL_OBJS_UNEXPORTED
-//
-// MessageText:
-//
-// There is nothing to unexport.
-//
-
- RPC_NT_NOT_ALL_OBJS_UNEXPORTED = NTSTATUS($C002003B);
- {$EXTERNALSYM RPC_NT_NOT_ALL_OBJS_UNEXPORTED}
-
-//
-// MessageId: RPC_NT_INTERFACE_NOT_FOUND
-//
-// MessageText:
-//
-// The interface was not found.
-//
-
- RPC_NT_INTERFACE_NOT_FOUND = NTSTATUS($C002003C);
- {$EXTERNALSYM RPC_NT_INTERFACE_NOT_FOUND}
-
-//
-// MessageId: RPC_NT_ENTRY_ALREADY_EXISTS
-//
-// MessageText:
-//
-// The entry already exists.
-//
-
- RPC_NT_ENTRY_ALREADY_EXISTS = NTSTATUS($C002003D);
- {$EXTERNALSYM RPC_NT_ENTRY_ALREADY_EXISTS}
-
-//
-// MessageId: RPC_NT_ENTRY_NOT_FOUND
-//
-// MessageText:
-//
-// The entry is not found.
-//
-
- RPC_NT_ENTRY_NOT_FOUND = NTSTATUS($C002003E);
- {$EXTERNALSYM RPC_NT_ENTRY_NOT_FOUND}
-
-//
-// MessageId: RPC_NT_NAME_SERVICE_UNAVAILABLE
-//
-// MessageText:
-//
-// The name service is unavailable.
-//
-
- RPC_NT_NAME_SERVICE_UNAVAILABLE = NTSTATUS($C002003F);
- {$EXTERNALSYM RPC_NT_NAME_SERVICE_UNAVAILABLE}
-
-//
-// MessageId: RPC_NT_INVALID_NAF_ID
-//
-// MessageText:
-//
-// The network address family is invalid.
-//
-
- RPC_NT_INVALID_NAF_ID = NTSTATUS($C0020040);
- {$EXTERNALSYM RPC_NT_INVALID_NAF_ID}
-
-//
-// MessageId: RPC_NT_CANNOT_SUPPORT
-//
-// MessageText:
-//
-// The requested operation is not supported.
-//
-
- RPC_NT_CANNOT_SUPPORT = NTSTATUS($C0020041);
- {$EXTERNALSYM RPC_NT_CANNOT_SUPPORT}
-
-//
-// MessageId: RPC_NT_NO_CONTEXT_AVAILABLE
-//
-// MessageText:
-//
-// No security context is available to allow impersonation.
-//
-
- RPC_NT_NO_CONTEXT_AVAILABLE = NTSTATUS($C0020042);
- {$EXTERNALSYM RPC_NT_NO_CONTEXT_AVAILABLE}
-
-//
-// MessageId: RPC_NT_INTERNAL_ERROR
-//
-// MessageText:
-//
-// An internal error occurred in RPC.
-//
-
- RPC_NT_INTERNAL_ERROR = NTSTATUS($C0020043);
- {$EXTERNALSYM RPC_NT_INTERNAL_ERROR}
-
-//
-// MessageId: RPC_NT_ZERO_DIVIDE
-//
-// MessageText:
-//
-// The RPC server attempted an integer divide by zero.
-//
-
- RPC_NT_ZERO_DIVIDE = NTSTATUS($C0020044);
- {$EXTERNALSYM RPC_NT_ZERO_DIVIDE}
-
-//
-// MessageId: RPC_NT_ADDRESS_ERROR
-//
-// MessageText:
-//
-// An addressing error occurred in the RPC server.
-//
-
- RPC_NT_ADDRESS_ERROR = NTSTATUS($C0020045);
- {$EXTERNALSYM RPC_NT_ADDRESS_ERROR}
-
-//
-// MessageId: RPC_NT_FP_DIV_ZERO
-//
-// MessageText:
-//
-// A floating point operation at the RPC server caused a divide by zero.
-//
-
- RPC_NT_FP_DIV_ZERO = NTSTATUS($C0020046);
- {$EXTERNALSYM RPC_NT_FP_DIV_ZERO}
-
-//
-// MessageId: RPC_NT_FP_UNDERFLOW
-//
-// MessageText:
-//
-// A floating point underflow occurred at the RPC server.
-//
-
- RPC_NT_FP_UNDERFLOW = NTSTATUS($C0020047);
- {$EXTERNALSYM RPC_NT_FP_UNDERFLOW}
-
-//
-// MessageId: RPC_NT_FP_OVERFLOW
-//
-// MessageText:
-//
-// A floating point overflow occurred at the RPC server.
-//
-
- RPC_NT_FP_OVERFLOW = NTSTATUS($C0020048);
- {$EXTERNALSYM RPC_NT_FP_OVERFLOW}
-
-//
-// MessageId: RPC_NT_NO_MORE_ENTRIES
-//
-// MessageText:
-//
-// The list of RPC servers available for auto-handle binding has been exhausted.
-//
-
- RPC_NT_NO_MORE_ENTRIES = NTSTATUS($C0030001);
- {$EXTERNALSYM RPC_NT_NO_MORE_ENTRIES}
-
-//
-// MessageId: RPC_NT_SS_CHAR_TRANS_OPEN_FAIL
-//
-// MessageText:
-//
-// The file designated by DCERPCCHARTRANS cannot be opened.
-//
-
- RPC_NT_SS_CHAR_TRANS_OPEN_FAIL = NTSTATUS($C0030002);
- {$EXTERNALSYM RPC_NT_SS_CHAR_TRANS_OPEN_FAIL}
-
-//
-// MessageId: RPC_NT_SS_CHAR_TRANS_SHORT_FILE
-//
-// MessageText:
-//
-// The file containing the character translation table has fewer than 512 bytes.
-//
-
- RPC_NT_SS_CHAR_TRANS_SHORT_FILE = NTSTATUS($C0030003);
- {$EXTERNALSYM RPC_NT_SS_CHAR_TRANS_SHORT_FILE}
-
-//
-// MessageId: RPC_NT_SS_IN_NULL_CONTEXT
-//
-// MessageText:
-//
-// A null context handle is passed as an [in] parameter.
-//
-
- RPC_NT_SS_IN_NULL_CONTEXT = NTSTATUS($C0030004);
- {$EXTERNALSYM RPC_NT_SS_IN_NULL_CONTEXT}
-
-//
-// MessageId: RPC_NT_SS_CONTEXT_MISMATCH
-//
-// MessageText:
-//
-// The context handle does not match any known context handles.
-//
-
- RPC_NT_SS_CONTEXT_MISMATCH = NTSTATUS($C0030005);
- {$EXTERNALSYM RPC_NT_SS_CONTEXT_MISMATCH}
-
-//
-// MessageId: RPC_NT_SS_CONTEXT_DAMAGED
-//
-// MessageText:
-//
-// The context handle changed during a call.
-//
-
- RPC_NT_SS_CONTEXT_DAMAGED = NTSTATUS($C0030006);
- {$EXTERNALSYM RPC_NT_SS_CONTEXT_DAMAGED}
-
-//
-// MessageId: RPC_NT_SS_HANDLES_MISMATCH
-//
-// MessageText:
-//
-// The binding handles passed to a remote procedure call do not match.
-//
-
- RPC_NT_SS_HANDLES_MISMATCH = NTSTATUS($C0030007);
- {$EXTERNALSYM RPC_NT_SS_HANDLES_MISMATCH}
-
-//
-// MessageId: RPC_NT_SS_CANNOT_GET_CALL_HANDLE
-//
-// MessageText:
-//
-// The stub is unable to get the call handle.
-//
-
- RPC_NT_SS_CANNOT_GET_CALL_HANDLE = NTSTATUS($C0030008);
- {$EXTERNALSYM RPC_NT_SS_CANNOT_GET_CALL_HANDLE}
-
-//
-// MessageId: RPC_NT_NULL_REF_POINTER
-//
-// MessageText:
-//
-// A null reference pointer was passed to the stub.
-//
-
- RPC_NT_NULL_REF_POINTER = NTSTATUS($C0030009);
- {$EXTERNALSYM RPC_NT_NULL_REF_POINTER}
-
-//
-// MessageId: RPC_NT_ENUM_VALUE_OUT_OF_RANGE
-//
-// MessageText:
-//
-// The enumeration value is out of range.
-//
-
- RPC_NT_ENUM_VALUE_OUT_OF_RANGE = NTSTATUS($C003000A);
- {$EXTERNALSYM RPC_NT_ENUM_VALUE_OUT_OF_RANGE}
-
-//
-// MessageId: RPC_NT_BYTE_COUNT_TOO_SMALL
-//
-// MessageText:
-//
-// The byte count is too small.
-//
-
- RPC_NT_BYTE_COUNT_TOO_SMALL = NTSTATUS($C003000B);
- {$EXTERNALSYM RPC_NT_BYTE_COUNT_TOO_SMALL}
-
-//
-// MessageId: RPC_NT_BAD_STUB_DATA
-//
-// MessageText:
-//
-// The stub received bad data.
-//
-
- RPC_NT_BAD_STUB_DATA = NTSTATUS($C003000C);
- {$EXTERNALSYM RPC_NT_BAD_STUB_DATA}
-
-//
-// MessageId: RPC_NT_CALL_IN_PROGRESS
-//
-// MessageText:
-//
-// A remote procedure call is already in progress for this thread.
-//
-
- RPC_NT_CALL_IN_PROGRESS = NTSTATUS($C0020049);
- {$EXTERNALSYM RPC_NT_CALL_IN_PROGRESS}
-
-//
-// MessageId: RPC_NT_NO_MORE_BINDINGS
-//
-// MessageText:
-//
-// There are no more bindings.
-//
-
- RPC_NT_NO_MORE_BINDINGS = NTSTATUS($C002004A);
- {$EXTERNALSYM RPC_NT_NO_MORE_BINDINGS}
-
-//
-// MessageId: RPC_NT_GROUP_MEMBER_NOT_FOUND
-//
-// MessageText:
-//
-// The group member was not found.
-//
-
- RPC_NT_GROUP_MEMBER_NOT_FOUND = NTSTATUS($C002004B);
- {$EXTERNALSYM RPC_NT_GROUP_MEMBER_NOT_FOUND}
-
-//
-// MessageId: EPT_NT_CANT_CREATE
-//
-// MessageText:
-//
-// The endpoint mapper database entry could not be created.
-//
-
- EPT_NT_CANT_CREATE = NTSTATUS($C002004C);
- {$EXTERNALSYM EPT_NT_CANT_CREATE}
-
-//
-// MessageId: RPC_NT_INVALID_OBJECT
-//
-// MessageText:
-//
-// The object UUID is the nil UUID.
-//
-
- RPC_NT_INVALID_OBJECT = NTSTATUS($C002004D);
- {$EXTERNALSYM RPC_NT_INVALID_OBJECT}
-
-//
-// MessageId: RPC_NT_NO_INTERFACES
-//
-// MessageText:
-//
-// No interfaces have been registered.
-//
-
- RPC_NT_NO_INTERFACES = NTSTATUS($C002004F);
- {$EXTERNALSYM RPC_NT_NO_INTERFACES}
-
-//
-// MessageId: RPC_NT_CALL_CANCELLED
-//
-// MessageText:
-//
-// The remote procedure call was cancelled.
-//
-
- RPC_NT_CALL_CANCELLED = NTSTATUS($C0020050);
- {$EXTERNALSYM RPC_NT_CALL_CANCELLED}
-
-//
-// MessageId: RPC_NT_BINDING_INCOMPLETE
-//
-// MessageText:
-//
-// The binding handle does not contain all required information.
-//
-
- RPC_NT_BINDING_INCOMPLETE = NTSTATUS($C0020051);
- {$EXTERNALSYM RPC_NT_BINDING_INCOMPLETE}
-
-//
-// MessageId: RPC_NT_COMM_FAILURE
-//
-// MessageText:
-//
-// A communications failure occurred during a remote procedure call.
-//
-
- RPC_NT_COMM_FAILURE = NTSTATUS($C0020052);
- {$EXTERNALSYM RPC_NT_COMM_FAILURE}
-
-//
-// MessageId: RPC_NT_UNSUPPORTED_AUTHN_LEVEL
-//
-// MessageText:
-//
-// The requested authentication level is not supported.
-//
-
- RPC_NT_UNSUPPORTED_AUTHN_LEVEL = NTSTATUS($C0020053);
- {$EXTERNALSYM RPC_NT_UNSUPPORTED_AUTHN_LEVEL}
-
-//
-// MessageId: RPC_NT_NO_PRINC_NAME
-//
-// MessageText:
-//
-// No principal name registered.
-//
-
- RPC_NT_NO_PRINC_NAME = NTSTATUS($C0020054);
- {$EXTERNALSYM RPC_NT_NO_PRINC_NAME}
-
-//
-// MessageId: RPC_NT_NOT_RPC_ERROR
-//
-// MessageText:
-//
-// The error specified is not a valid Windows RPC error code.
-//
-
- RPC_NT_NOT_RPC_ERROR = NTSTATUS($C0020055);
- {$EXTERNALSYM RPC_NT_NOT_RPC_ERROR}
-
-//
-// MessageId: RPC_NT_UUID_LOCAL_ONLY
-//
-// MessageText:
-//
-// A UUID that is valid only on this computer has been allocated.
-//
-
- RPC_NT_UUID_LOCAL_ONLY = NTSTATUS($40020056);
- {$EXTERNALSYM RPC_NT_UUID_LOCAL_ONLY}
-
-//
-// MessageId: RPC_NT_SEC_PKG_ERROR
-//
-// MessageText:
-//
-// A security package specific error occurred.
-//
-
- RPC_NT_SEC_PKG_ERROR = NTSTATUS($C0020057);
- {$EXTERNALSYM RPC_NT_SEC_PKG_ERROR}
-
-//
-// MessageId: RPC_NT_NOT_CANCELLED
-//
-// MessageText:
-//
-// Thread is not cancelled.
-//
-
- RPC_NT_NOT_CANCELLED = NTSTATUS($C0020058);
- {$EXTERNALSYM RPC_NT_NOT_CANCELLED}
-
-//
-// MessageId: RPC_NT_INVALID_ES_ACTION
-//
-// MessageText:
-//
-// Invalid operation on the encoding/decoding handle.
-//
-
- RPC_NT_INVALID_ES_ACTION = NTSTATUS($C0030059);
- {$EXTERNALSYM RPC_NT_INVALID_ES_ACTION}
-
-//
-// MessageId: RPC_NT_WRONG_ES_VERSION
-//
-// MessageText:
-//
-// Incompatible version of the serializing package.
-//
-
- RPC_NT_WRONG_ES_VERSION = NTSTATUS($C003005A);
- {$EXTERNALSYM RPC_NT_WRONG_ES_VERSION}
-
-//
-// MessageId: RPC_NT_WRONG_STUB_VERSION
-//
-// MessageText:
-//
-// Incompatible version of the RPC stub.
-//
-
- RPC_NT_WRONG_STUB_VERSION = NTSTATUS($C003005B);
- {$EXTERNALSYM RPC_NT_WRONG_STUB_VERSION}
-
-//
-// MessageId: RPC_NT_INVALID_PIPE_OBJECT
-//
-// MessageText:
-//
-// The RPC pipe object is invalid or corrupted.
-//
-
- RPC_NT_INVALID_PIPE_OBJECT = NTSTATUS($C003005C);
- {$EXTERNALSYM RPC_NT_INVALID_PIPE_OBJECT}
-
-//
-// MessageId: RPC_NT_INVALID_PIPE_OPERATION
-//
-// MessageText:
-//
-// An invalid operation was attempted on an RPC pipe object.
-//
-
- RPC_NT_INVALID_PIPE_OPERATION = NTSTATUS($C003005D);
- {$EXTERNALSYM RPC_NT_INVALID_PIPE_OPERATION}
-
-//
-// MessageId: RPC_NT_WRONG_PIPE_VERSION
-//
-// MessageText:
-//
-// Unsupported RPC pipe version.
-//
-
- RPC_NT_WRONG_PIPE_VERSION = NTSTATUS($C003005E);
- {$EXTERNALSYM RPC_NT_WRONG_PIPE_VERSION}
-
-//
-// MessageId: RPC_NT_PIPE_CLOSED
-//
-// MessageText:
-//
-// The RPC pipe object has already been closed.
-//
-
- RPC_NT_PIPE_CLOSED = NTSTATUS($C003005F);
- {$EXTERNALSYM RPC_NT_PIPE_CLOSED}
-
-//
-// MessageId: RPC_NT_PIPE_DISCIPLINE_ERROR
-//
-// MessageText:
-//
-// The RPC call completed before all pipes were processed.
-//
-
- RPC_NT_PIPE_DISCIPLINE_ERROR = NTSTATUS($C0030060);
- {$EXTERNALSYM RPC_NT_PIPE_DISCIPLINE_ERROR}
-
-//
-// MessageId: RPC_NT_PIPE_EMPTY
-//
-// MessageText:
-//
-// No more data is available from the RPC pipe.
-//
-
- RPC_NT_PIPE_EMPTY = NTSTATUS($C0030061);
- {$EXTERNALSYM RPC_NT_PIPE_EMPTY}
-
-//
-// MessageId: RPC_NT_INVALID_ASYNC_HANDLE
-//
-// MessageText:
-//
-// Invalid asynchronous remote procedure call handle.
-//
-
- RPC_NT_INVALID_ASYNC_HANDLE = NTSTATUS($C0020062);
- {$EXTERNALSYM RPC_NT_INVALID_ASYNC_HANDLE}
-
-//
-// MessageId: RPC_NT_INVALID_ASYNC_CALL
-//
-// MessageText:
-//
-// Invalid asynchronous RPC call handle for this operation.
-//
-
- RPC_NT_INVALID_ASYNC_CALL = NTSTATUS($C0020063);
- {$EXTERNALSYM RPC_NT_INVALID_ASYNC_CALL}
-
-//
-// MessageId: RPC_NT_SEND_INCOMPLETE
-//
-// MessageText:
-//
-// Some data remains to be sent in the request buffer.
-//
-
- RPC_NT_SEND_INCOMPLETE = NTSTATUS($400200AF);
- {$EXTERNALSYM RPC_NT_SEND_INCOMPLETE}
-
-//
-// MessageId: STATUS_ACPI_INVALID_OPCODE
-//
-// MessageText:
-//
-// An attempt was made to run an invalid AML opcode
-//
-
- STATUS_ACPI_INVALID_OPCODE = NTSTATUS($C0140001);
- {$EXTERNALSYM STATUS_ACPI_INVALID_OPCODE}
-
-//
-// MessageId: STATUS_ACPI_STACK_OVERFLOW
-//
-// MessageText:
-//
-// The AML Interpreter Stack has overflowed
-//
-
- STATUS_ACPI_STACK_OVERFLOW = NTSTATUS($C0140002);
- {$EXTERNALSYM STATUS_ACPI_STACK_OVERFLOW}
-
-//
-// MessageId: STATUS_ACPI_ASSERT_FAILED
-//
-// MessageText:
-//
-// An inconsistent state has occurred
-//
-
- STATUS_ACPI_ASSERT_FAILED = NTSTATUS($C0140003);
- {$EXTERNALSYM STATUS_ACPI_ASSERT_FAILED}
-
-//
-// MessageId: STATUS_ACPI_INVALID_INDEX
-//
-// MessageText:
-//
-// An attempt was made to access an array outside of its bounds
-//
-
- STATUS_ACPI_INVALID_INDEX = NTSTATUS($C0140004);
- {$EXTERNALSYM STATUS_ACPI_INVALID_INDEX}
-
-//
-// MessageId: STATUS_ACPI_INVALID_ARGUMENT
-//
-// MessageText:
-//
-// A required argument was not specified
-//
-
- STATUS_ACPI_INVALID_ARGUMENT = NTSTATUS($C0140005);
- {$EXTERNALSYM STATUS_ACPI_INVALID_ARGUMENT}
-
-//
-// MessageId: STATUS_ACPI_FATAL
-//
-// MessageText:
-//
-// A fatal error has occurred
-//
-
- STATUS_ACPI_FATAL = NTSTATUS($C0140006);
- {$EXTERNALSYM STATUS_ACPI_FATAL}
-
-//
-// MessageId: STATUS_ACPI_INVALID_SUPERNAME
-//
-// MessageText:
-//
-// An invalid SuperName was specified
-//
-
- STATUS_ACPI_INVALID_SUPERNAME = NTSTATUS($C0140007);
- {$EXTERNALSYM STATUS_ACPI_INVALID_SUPERNAME}
-
-//
-// MessageId: STATUS_ACPI_INVALID_ARGTYPE
-//
-// MessageText:
-//
-// An argument with an incorrect type was specified
-//
-
- STATUS_ACPI_INVALID_ARGTYPE = NTSTATUS($C0140008);
- {$EXTERNALSYM STATUS_ACPI_INVALID_ARGTYPE}
-
-//
-// MessageId: STATUS_ACPI_INVALID_OBJTYPE
-//
-// MessageText:
-//
-// An object with an incorrect type was specified
-//
-
- STATUS_ACPI_INVALID_OBJTYPE = NTSTATUS($C0140009);
- {$EXTERNALSYM STATUS_ACPI_INVALID_OBJTYPE}
-
-//
-// MessageId: STATUS_ACPI_INVALID_TARGETTYPE
-//
-// MessageText:
-//
-// A target with an incorrect type was specified
-//
-
- STATUS_ACPI_INVALID_TARGETTYPE = NTSTATUS($C014000A);
- {$EXTERNALSYM STATUS_ACPI_INVALID_TARGETTYPE}
-
-//
-// MessageId: STATUS_ACPI_INCORRECT_ARGUMENT_COUNT
-//
-// MessageText:
-//
-// An incorrect number of arguments were specified
-//
-
- STATUS_ACPI_INCORRECT_ARGUMENT_COUNT = NTSTATUS($C014000B);
- {$EXTERNALSYM STATUS_ACPI_INCORRECT_ARGUMENT_COUNT}
-
-//
-// MessageId: STATUS_ACPI_ADDRESS_NOT_MAPPED
-//
-// MessageText:
-//
-// An address failed to translate
-//
-
- STATUS_ACPI_ADDRESS_NOT_MAPPED = NTSTATUS($C014000C);
- {$EXTERNALSYM STATUS_ACPI_ADDRESS_NOT_MAPPED}
-
-//
-// MessageId: STATUS_ACPI_INVALID_EVENTTYPE
-//
-// MessageText:
-//
-// An incorrect event type was specified
-//
-
- STATUS_ACPI_INVALID_EVENTTYPE = NTSTATUS($C014000D);
- {$EXTERNALSYM STATUS_ACPI_INVALID_EVENTTYPE}
-
-//
-// MessageId: STATUS_ACPI_HANDLER_COLLISION
-//
-// MessageText:
-//
-// A handler for the target already exists
-//
-
- STATUS_ACPI_HANDLER_COLLISION = NTSTATUS($C014000E);
- {$EXTERNALSYM STATUS_ACPI_HANDLER_COLLISION}
-
-//
-// MessageId: STATUS_ACPI_INVALID_DATA
-//
-// MessageText:
-//
-// Invalid data for the target was specified
-//
-
- STATUS_ACPI_INVALID_DATA = NTSTATUS($C014000F);
- {$EXTERNALSYM STATUS_ACPI_INVALID_DATA}
-
-//
-// MessageId: STATUS_ACPI_INVALID_REGION
-//
-// MessageText:
-//
-// An invalid region for the target was specified
-//
-
- STATUS_ACPI_INVALID_REGION = NTSTATUS($C0140010);
- {$EXTERNALSYM STATUS_ACPI_INVALID_REGION}
-
-//
-// MessageId: STATUS_ACPI_INVALID_ACCESS_SIZE
-//
-// MessageText:
-//
-// An attempt was made to access a field outside of the defined range
-//
-
- STATUS_ACPI_INVALID_ACCESS_SIZE = NTSTATUS($C0140011);
- {$EXTERNALSYM STATUS_ACPI_INVALID_ACCESS_SIZE}
-
-//
-// MessageId: STATUS_ACPI_ACQUIRE_GLOBAL_LOCK
-//
-// MessageText:
-//
-// The Global system lock could not be acquired
-//
-
- STATUS_ACPI_ACQUIRE_GLOBAL_LOCK = NTSTATUS($C0140012);
- {$EXTERNALSYM STATUS_ACPI_ACQUIRE_GLOBAL_LOCK}
-
-//
-// MessageId: STATUS_ACPI_ALREADY_INITIALIZED
-//
-// MessageText:
-//
-// An attempt was made to reinitialize the ACPI subsystem
-//
-
- STATUS_ACPI_ALREADY_INITIALIZED = NTSTATUS($C0140013);
- {$EXTERNALSYM STATUS_ACPI_ALREADY_INITIALIZED}
-
-//
-// MessageId: STATUS_ACPI_NOT_INITIALIZED
-//
-// MessageText:
-//
-// The ACPI subsystem has not been initialized
-//
-
- STATUS_ACPI_NOT_INITIALIZED = NTSTATUS($C0140014);
- {$EXTERNALSYM STATUS_ACPI_NOT_INITIALIZED}
-
-//
-// MessageId: STATUS_ACPI_INVALID_MUTEX_LEVEL
-//
-// MessageText:
-//
-// An incorrect mutex was specified
-//
-
- STATUS_ACPI_INVALID_MUTEX_LEVEL = NTSTATUS($C0140015);
- {$EXTERNALSYM STATUS_ACPI_INVALID_MUTEX_LEVEL}
-
-//
-// MessageId: STATUS_ACPI_MUTEX_NOT_OWNED
-//
-// MessageText:
-//
-// The mutex is not currently owned
-//
-
- STATUS_ACPI_MUTEX_NOT_OWNED = NTSTATUS($C0140016);
- {$EXTERNALSYM STATUS_ACPI_MUTEX_NOT_OWNED}
-
-//
-// MessageId: STATUS_ACPI_MUTEX_NOT_OWNER
-//
-// MessageText:
-//
-// An attempt was made to access the mutex by a process that was not the owner
-//
-
- STATUS_ACPI_MUTEX_NOT_OWNER = NTSTATUS($C0140017);
- {$EXTERNALSYM STATUS_ACPI_MUTEX_NOT_OWNER}
-
-//
-// MessageId: STATUS_ACPI_RS_ACCESS
-//
-// MessageText:
-//
-// An error occurred during an access to Region Space
-//
-
- STATUS_ACPI_RS_ACCESS = NTSTATUS($C0140018);
- {$EXTERNALSYM STATUS_ACPI_RS_ACCESS}
-
-//
-// MessageId: STATUS_ACPI_INVALID_TABLE
-//
-// MessageText:
-//
-// An attempt was made to use an incorrect table
-//
-
- STATUS_ACPI_INVALID_TABLE = NTSTATUS($C0140019);
- {$EXTERNALSYM STATUS_ACPI_INVALID_TABLE}
-
-//
-// MessageId: STATUS_ACPI_REG_HANDLER_FAILED
-//
-// MessageText:
-//
-// The registration of an ACPI event failed
-//
-
- STATUS_ACPI_REG_HANDLER_FAILED = NTSTATUS($C0140020);
- {$EXTERNALSYM STATUS_ACPI_REG_HANDLER_FAILED}
-
-//
-// MessageId: STATUS_ACPI_POWER_REQUEST_FAILED
-//
-// MessageText:
-//
-// An ACPI Power Object failed to transition state
-//
-
- STATUS_ACPI_POWER_REQUEST_FAILED = NTSTATUS($C0140021);
- {$EXTERNALSYM STATUS_ACPI_POWER_REQUEST_FAILED}
-
-//
-// Terminal Server specific Errors
-//
-//
-// MessageId: STATUS_CTX_WINSTATION_NAME_INVALID
-//
-// MessageText:
-//
-// Session name %1 is invalid.
-//
-
- STATUS_CTX_WINSTATION_NAME_INVALID = NTSTATUS($C00A0001);
- {$EXTERNALSYM STATUS_CTX_WINSTATION_NAME_INVALID}
-
-//
-// MessageId: STATUS_CTX_INVALID_PD
-//
-// MessageText:
-//
-// The protocol driver %1 is invalid.
-//
-
- STATUS_CTX_INVALID_PD = NTSTATUS($C00A0002);
- {$EXTERNALSYM STATUS_CTX_INVALID_PD}
-
-//
-// MessageId: STATUS_CTX_PD_NOT_FOUND
-//
-// MessageText:
-//
-// The protocol driver %1 was not found in the system path.
-//
-
- STATUS_CTX_PD_NOT_FOUND = NTSTATUS($C00A0003);
- {$EXTERNALSYM STATUS_CTX_PD_NOT_FOUND}
-
-//
-// MessageId: STATUS_CTX_CDM_CONNECT
-//
-// MessageText:
-//
-// The Client Drive Mapping Service Has Connected on Terminal Connection.
-//
-
- STATUS_CTX_CDM_CONNECT = NTSTATUS($400A0004);
- {$EXTERNALSYM STATUS_CTX_CDM_CONNECT}
-
-//
-// MessageId: STATUS_CTX_CDM_DISCONNECT
-//
-// MessageText:
-//
-// The Client Drive Mapping Service Has Disconnected on Terminal Connection.
-//
-
- STATUS_CTX_CDM_DISCONNECT = NTSTATUS($400A0005);
- {$EXTERNALSYM STATUS_CTX_CDM_DISCONNECT}
-
-//
-// MessageId: STATUS_CTX_CLOSE_PENDING
-//
-// MessageText:
-//
-// A close operation is pending on the Terminal Connection.
-//
-
- STATUS_CTX_CLOSE_PENDING = NTSTATUS($C00A0006);
- {$EXTERNALSYM STATUS_CTX_CLOSE_PENDING}
-
-//
-// MessageId: STATUS_CTX_NO_OUTBUF
-//
-// MessageText:
-//
-// There are no free output buffers available.
-//
-
- STATUS_CTX_NO_OUTBUF = NTSTATUS($C00A0007);
- {$EXTERNALSYM STATUS_CTX_NO_OUTBUF}
-
-//
-// MessageId: STATUS_CTX_MODEM_INF_NOT_FOUND
-//
-// MessageText:
-//
-// The MODEM.INF file was not found.
-//
-
- STATUS_CTX_MODEM_INF_NOT_FOUND = NTSTATUS($C00A0008);
- {$EXTERNALSYM STATUS_CTX_MODEM_INF_NOT_FOUND}
-
-//
-// MessageId: STATUS_CTX_INVALID_MODEMNAME
-//
-// MessageText:
-//
-// The modem (%1) was not found in MODEM.INF.
-//
-
- STATUS_CTX_INVALID_MODEMNAME = NTSTATUS($C00A0009);
- {$EXTERNALSYM STATUS_CTX_INVALID_MODEMNAME}
-
-//
-// MessageId: STATUS_CTX_RESPONSE_ERROR
-//
-// MessageText:
-//
-// The modem did not accept the command sent to it.
-// Verify the configured modem name matches the attached modem.
-//
-
- STATUS_CTX_RESPONSE_ERROR = NTSTATUS($C00A000A);
- {$EXTERNALSYM STATUS_CTX_RESPONSE_ERROR}
-
-//
-// MessageId: STATUS_CTX_MODEM_RESPONSE_TIMEOUT
-//
-// MessageText:
-//
-// The modem did not respond to the command sent to it.
-// Verify the modem is properly cabled and powered on.
-//
-
- STATUS_CTX_MODEM_RESPONSE_TIMEOUT = NTSTATUS($C00A000B);
- {$EXTERNALSYM STATUS_CTX_MODEM_RESPONSE_TIMEOUT}
-
-//
-// MessageId: STATUS_CTX_MODEM_RESPONSE_NO_CARRIER
-//
-// MessageText:
-//
-// Carrier detect has failed or carrier has been dropped due to disconnect.
-//
-
- STATUS_CTX_MODEM_RESPONSE_NO_CARRIER = NTSTATUS($C00A000C);
- {$EXTERNALSYM STATUS_CTX_MODEM_RESPONSE_NO_CARRIER}
-
-//
-// MessageId: STATUS_CTX_MODEM_RESPONSE_NO_DIALTONE
-//
-// MessageText:
-//
-// Dial tone not detected within required time.
-// Verify phone cable is properly attached and functional.
-//
-
- STATUS_CTX_MODEM_RESPONSE_NO_DIALTONE = NTSTATUS($C00A000D);
- {$EXTERNALSYM STATUS_CTX_MODEM_RESPONSE_NO_DIALTONE}
-
-//
-// MessageId: STATUS_CTX_MODEM_RESPONSE_BUSY
-//
-// MessageText:
-//
-// Busy signal detected at remote site on callback.
-//
-
- STATUS_CTX_MODEM_RESPONSE_BUSY = NTSTATUS($C00A000E);
- {$EXTERNALSYM STATUS_CTX_MODEM_RESPONSE_BUSY}
-
-//
-// MessageId: STATUS_CTX_MODEM_RESPONSE_VOICE
-//
-// MessageText:
-//
-// Voice detected at remote site on callback.
-//
-
- STATUS_CTX_MODEM_RESPONSE_VOICE = NTSTATUS($C00A000F);
- {$EXTERNALSYM STATUS_CTX_MODEM_RESPONSE_VOICE}
-
-//
-// MessageId: STATUS_CTX_TD_ERROR
-//
-// MessageText:
-//
-// Transport driver error
-//
-
- STATUS_CTX_TD_ERROR = NTSTATUS($C00A0010);
- {$EXTERNALSYM STATUS_CTX_TD_ERROR}
-
-//
-// MessageId: STATUS_CTX_LICENSE_CLIENT_INVALID
-//
-// MessageText:
-//
-// The client you are using is not licensed to use this system. Your logon request is denied.
-//
-
- STATUS_CTX_LICENSE_CLIENT_INVALID = NTSTATUS($C00A0012);
- {$EXTERNALSYM STATUS_CTX_LICENSE_CLIENT_INVALID}
-
-//
-// MessageId: STATUS_CTX_LICENSE_NOT_AVAILABLE
-//
-// MessageText:
-//
-// The system has reached its licensed logon limit.
-// Please try again later.
-//
-
- STATUS_CTX_LICENSE_NOT_AVAILABLE = NTSTATUS($C00A0013);
- {$EXTERNALSYM STATUS_CTX_LICENSE_NOT_AVAILABLE}
-
-//
-// MessageId: STATUS_CTX_LICENSE_EXPIRED
-//
-// MessageText:
-//
-// The system license has expired. Your logon request is denied.
-//
-
- STATUS_CTX_LICENSE_EXPIRED = NTSTATUS($C00A0014);
- {$EXTERNALSYM STATUS_CTX_LICENSE_EXPIRED}
-
-//
-// MessageId: STATUS_CTX_WINSTATION_NOT_FOUND
-//
-// MessageText:
-//
-// The specified session cannot be found.
-//
-
- STATUS_CTX_WINSTATION_NOT_FOUND = NTSTATUS($C00A0015);
- {$EXTERNALSYM STATUS_CTX_WINSTATION_NOT_FOUND}
-
-//
-// MessageId: STATUS_CTX_WINSTATION_NAME_COLLISION
-//
-// MessageText:
-//
-// The specified session name is already in use.
-//
-
- STATUS_CTX_WINSTATION_NAME_COLLISION = NTSTATUS($C00A0016);
- {$EXTERNALSYM STATUS_CTX_WINSTATION_NAME_COLLISION}
-
-//
-// MessageId: STATUS_CTX_WINSTATION_BUSY
-//
-// MessageText:
-//
-// The requested operation cannot be completed because the Terminal Connection is currently busy processing a connect, disconnect, reset, or delete operation.
-//
-
- STATUS_CTX_WINSTATION_BUSY = NTSTATUS($C00A0017);
- {$EXTERNALSYM STATUS_CTX_WINSTATION_BUSY}
-
-//
-// MessageId: STATUS_CTX_BAD_VIDEO_MODE
-//
-// MessageText:
-//
-// An attempt has been made to connect to a session whose video mode is not supported by the current client.
-//
-
- STATUS_CTX_BAD_VIDEO_MODE = NTSTATUS($C00A0018);
- {$EXTERNALSYM STATUS_CTX_BAD_VIDEO_MODE}
-
-//
-// MessageId: STATUS_CTX_GRAPHICS_INVALID
-//
-// MessageText:
-//
-// The application attempted to enable DOS graphics mode.
-// DOS graphics mode is not supported.
-//
-
- STATUS_CTX_GRAPHICS_INVALID = NTSTATUS($C00A0022);
- {$EXTERNALSYM STATUS_CTX_GRAPHICS_INVALID}
-
-//
-// MessageId: STATUS_CTX_NOT_CONSOLE
-//
-// MessageText:
-//
-// The requested operation can be performed only on the system console.
-// This is most often the result of a driver or system DLL requiring direct console access.
-//
-
- STATUS_CTX_NOT_CONSOLE = NTSTATUS($C00A0024);
- {$EXTERNALSYM STATUS_CTX_NOT_CONSOLE}
-
-//
-// MessageId: STATUS_CTX_CLIENT_QUERY_TIMEOUT
-//
-// MessageText:
-//
-// The client failed to respond to the server connect message.
-//
-
- STATUS_CTX_CLIENT_QUERY_TIMEOUT = NTSTATUS($C00A0026);
- {$EXTERNALSYM STATUS_CTX_CLIENT_QUERY_TIMEOUT}
-
-//
-// MessageId: STATUS_CTX_CONSOLE_DISCONNECT
-//
-// MessageText:
-//
-// Disconnecting the console session is not supported.
-//
-
- STATUS_CTX_CONSOLE_DISCONNECT = NTSTATUS($C00A0027);
- {$EXTERNALSYM STATUS_CTX_CONSOLE_DISCONNECT}
-
-//
-// MessageId: STATUS_CTX_CONSOLE_CONNECT
-//
-// MessageText:
-//
-// Reconnecting a disconnected session to the console is not supported.
-//
-
- STATUS_CTX_CONSOLE_CONNECT = NTSTATUS($C00A0028);
- {$EXTERNALSYM STATUS_CTX_CONSOLE_CONNECT}
-
-//
-// MessageId: STATUS_CTX_SHADOW_DENIED
-//
-// MessageText:
-//
-// The request to control another session remotely was denied.
-//
-
- STATUS_CTX_SHADOW_DENIED = NTSTATUS($C00A002A);
- {$EXTERNALSYM STATUS_CTX_SHADOW_DENIED}
-
-//
-// MessageId: STATUS_CTX_WINSTATION_ACCESS_DENIED
-//
-// MessageText:
-//
-// A process has requested access to a session, but has not been granted those access rights.
-//
-
- STATUS_CTX_WINSTATION_ACCESS_DENIED = NTSTATUS($C00A002B);
- {$EXTERNALSYM STATUS_CTX_WINSTATION_ACCESS_DENIED}
-
-//
-// MessageId: STATUS_CTX_INVALID_WD
-//
-// MessageText:
-//
-// The Terminal Connection driver %1 is invalid.
-//
-
- STATUS_CTX_INVALID_WD = NTSTATUS($C00A002E);
- {$EXTERNALSYM STATUS_CTX_INVALID_WD}
-
-//
-// MessageId: STATUS_CTX_WD_NOT_FOUND
-//
-// MessageText:
-//
-// The Terminal Connection driver %1 was not found in the system path.
-//
-
- STATUS_CTX_WD_NOT_FOUND = NTSTATUS($C00A002F);
- {$EXTERNALSYM STATUS_CTX_WD_NOT_FOUND}
-
-//
-// MessageId: STATUS_CTX_SHADOW_INVALID
-//
-// MessageText:
-//
-// The requested session cannot be controlled remotely.
-// This may be because the session is disconnected or does not currently have a user logged on.
-// Also, you cannot control a session remotely from the system console or control the system console remotely.
-// And you cannot remote control your own current session.
-//
-
- STATUS_CTX_SHADOW_INVALID = NTSTATUS($C00A0030);
- {$EXTERNALSYM STATUS_CTX_SHADOW_INVALID}
-
-//
-// MessageId: STATUS_CTX_SHADOW_DISABLED
-//
-// MessageText:
-//
-// The requested session is not configured to allow remote control.
-//
-
- STATUS_CTX_SHADOW_DISABLED = NTSTATUS($C00A0031);
- {$EXTERNALSYM STATUS_CTX_SHADOW_DISABLED}
-
-//
-// MessageId: STATUS_RDP_PROTOCOL_ERROR
-//
-// MessageText:
-//
-// The RDP protocol component %2 detected an error in the protocol stream and has disconnected the client.
-//
-
- STATUS_RDP_PROTOCOL_ERROR = NTSTATUS($C00A0032);
- {$EXTERNALSYM STATUS_RDP_PROTOCOL_ERROR}
-
-//
-// MessageId: STATUS_CTX_CLIENT_LICENSE_NOT_SET
-//
-// MessageText:
-//
-// Your request to connect to this Terminal server has been rejected.
-// Your Terminal Server Client license number has not been entered for this copy of the Terminal Client.
-// Please call your system administrator for help in entering a valid, unique license number for this Terminal Server Client.
-// Click OK to continue.
-//
-
- STATUS_CTX_CLIENT_LICENSE_NOT_SET = NTSTATUS($C00A0033);
- {$EXTERNALSYM STATUS_CTX_CLIENT_LICENSE_NOT_SET}
-
-//
-// MessageId: STATUS_CTX_CLIENT_LICENSE_IN_USE
-//
-// MessageText:
-//
-// Your request to connect to this Terminal server has been rejected.
-// Your Terminal Server Client license number is currently being used by another user.
-// Please call your system administrator to obtain a new copy of the Terminal Server Client with a valid, unique license number.
-// Click OK to continue.
-//
-
- STATUS_CTX_CLIENT_LICENSE_IN_USE = NTSTATUS($C00A0034);
- {$EXTERNALSYM STATUS_CTX_CLIENT_LICENSE_IN_USE}
-
-//
-// MessageId: STATUS_PNP_BAD_MPS_TABLE
-//
-// MessageText:
-//
-// A device is missing in the system BIOS MPS table. This device will not be used.
-// Please contact your system vendor for system BIOS update.
-//
-
- STATUS_PNP_BAD_MPS_TABLE = NTSTATUS($C0040035);
- {$EXTERNALSYM STATUS_PNP_BAD_MPS_TABLE}
-
-//
-// MessageId: STATUS_PNP_TRANSLATION_FAILED
-//
-// MessageText:
-//
-// A translator failed to translate resources.
-//
-
- STATUS_PNP_TRANSLATION_FAILED = NTSTATUS($C0040036);
- {$EXTERNALSYM STATUS_PNP_TRANSLATION_FAILED}
-
-//
-// MessageId: STATUS_PNP_IRQ_TRANSLATION_FAILED
-//
-// MessageText:
-//
-// A IRQ translator failed to translate resources.
-//
-
- STATUS_PNP_IRQ_TRANSLATION_FAILED = NTSTATUS($C0040037);
- {$EXTERNALSYM STATUS_PNP_IRQ_TRANSLATION_FAILED}
-
-implementation
-
-end.
+{******************************************************************************}
+{ }
+{ NT Status Codes API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: ntstatus.h, released June 2000. The original Pascal }
+{ code is: Nt_Status.pas, released December 2000. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwantstatus.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaNtStatus;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "ntstatus.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaWinType;
+
+/////////////////////////////////////////////////////////////////////////
+//
+// Standard Success values
+//
+//
+/////////////////////////////////////////////////////////////////////////
+
+//
+// The success status codes 0 - 63 are reserved for wait completion status.
+// FacilityCodes 0x5 - 0xF have been allocated by various drivers.
+//
+
+const
+ STATUS_SUCCESS = NTSTATUS($00000000); // ntsubauth
+ {$EXTERNALSYM STATUS_SUCCESS}
+
+//
+// Values are 32 bit values layed out as follows:
+//
+// 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1
+// 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
+// +---+-+-+-----------------------+-------------------------------+
+// |Sev|C|R| Facility | Code |
+// +---+-+-+-----------------------+-------------------------------+
+//
+// where
+//
+// Sev - is the severity code
+//
+// 00 - Success
+// 01 - Informational
+// 10 - Warning
+// 11 - Error
+//
+// C - is the Customer code flag
+//
+// R - is a reserved bit
+//
+// Facility - is the facility code
+//
+// Code - is the facility's status code
+//
+//
+// Define the facility codes
+//
+
+ FACILITY_USB_ERROR_CODE = $10;
+ {$EXTERNALSYM FACILITY_USB_ERROR_CODE}
+ FACILITY_TERMINAL_SERVER = $A;
+ {$EXTERNALSYM FACILITY_TERMINAL_SERVER}
+ FACILITY_RPC_STUBS = $3;
+ {$EXTERNALSYM FACILITY_RPC_STUBS}
+ FACILITY_RPC_RUNTIME = $2;
+ {$EXTERNALSYM FACILITY_RPC_RUNTIME}
+ FACILITY_IO_ERROR_CODE = $4;
+ {$EXTERNALSYM FACILITY_IO_ERROR_CODE}
+ FACILITY_HID_ERROR_CODE = $11;
+ {$EXTERNALSYM FACILITY_HID_ERROR_CODE}
+ FACILITY_FIREWIRE_ERROR_CODE = $12;
+ {$EXTERNALSYM FACILITY_FIREWIRE_ERROR_CODE}
+ FACILITY_DEBUGGER = $1;
+ {$EXTERNALSYM FACILITY_DEBUGGER}
+ FACILITY_CLUSTER_ERROR_CODE = $13;
+ {$EXTERNALSYM FACILITY_CLUSTER_ERROR_CODE}
+ FACILITY_ACPI_ERROR_CODE = $14;
+ {$EXTERNALSYM FACILITY_ACPI_ERROR_CODE}
+
+//
+// Define the severity codes
+//
+
+ STATUS_SEVERITY_WARNING = $2;
+ {$EXTERNALSYM STATUS_SEVERITY_WARNING}
+ STATUS_SEVERITY_SUCCESS = $0;
+ {$EXTERNALSYM STATUS_SEVERITY_SUCCESS}
+ STATUS_SEVERITY_INFORMATIONAL = $1;
+ {$EXTERNALSYM STATUS_SEVERITY_INFORMATIONAL}
+ STATUS_SEVERITY_ERROR = $3;
+ {$EXTERNALSYM STATUS_SEVERITY_ERROR}
+
+//
+// MessageId: STATUS_WAIT_0
+//
+// MessageText:
+//
+// STATUS_WAIT_0
+//
+
+ STATUS_WAIT_0 = NTSTATUS($00000000); // winnt
+ {$EXTERNALSYM STATUS_WAIT_0}
+
+//
+// MessageId: STATUS_WAIT_1
+//
+// MessageText:
+//
+// STATUS_WAIT_1
+//
+
+ STATUS_WAIT_1 = NTSTATUS($00000001);
+ {$EXTERNALSYM STATUS_WAIT_1}
+
+//
+// MessageId: STATUS_WAIT_2
+//
+// MessageText:
+//
+// STATUS_WAIT_2
+//
+
+ STATUS_WAIT_2 = NTSTATUS($00000002);
+ {$EXTERNALSYM STATUS_WAIT_2}
+
+//
+// MessageId: STATUS_WAIT_3
+//
+// MessageText:
+//
+// STATUS_WAIT_3
+//
+
+ STATUS_WAIT_3 = NTSTATUS($00000003);
+ {$EXTERNALSYM STATUS_WAIT_3}
+
+//
+// MessageId: STATUS_WAIT_63
+//
+// MessageText:
+//
+// STATUS_WAIT_63
+//
+
+ STATUS_WAIT_63 = NTSTATUS($0000003F);
+ {$EXTERNALSYM STATUS_WAIT_63}
+
+//
+// The success status codes 128 - 191 are reserved for wait completion
+// status with an abandoned mutant object.
+//
+
+ STATUS_ABANDONED = NTSTATUS($00000080);
+ {$EXTERNALSYM STATUS_ABANDONED}
+
+//
+// MessageId: STATUS_ABANDONED_WAIT_0
+//
+// MessageText:
+//
+// STATUS_ABANDONED_WAIT_0
+//
+
+ STATUS_ABANDONED_WAIT_0 = NTSTATUS($00000080); // winnt
+ {$EXTERNALSYM STATUS_ABANDONED_WAIT_0}
+
+//
+// MessageId: STATUS_ABANDONED_WAIT_63
+//
+// MessageText:
+//
+// STATUS_ABANDONED_WAIT_63
+//
+
+ STATUS_ABANDONED_WAIT_63 = NTSTATUS($000000BF);
+ {$EXTERNALSYM STATUS_ABANDONED_WAIT_63}
+
+//
+// The success status codes 256, 257, 258, and 258 are reserved for
+// User APC, Kernel APC, Alerted, and Timeout.
+//
+//
+// MessageId: STATUS_USER_APC
+//
+// MessageText:
+//
+// STATUS_USER_APC
+//
+
+ STATUS_USER_APC = NTSTATUS($000000C0); // winnt
+ {$EXTERNALSYM STATUS_USER_APC}
+
+//
+// MessageId: STATUS_KERNEL_APC
+//
+// MessageText:
+//
+// STATUS_KERNEL_APC
+//
+
+ STATUS_KERNEL_APC = NTSTATUS($00000100);
+ {$EXTERNALSYM STATUS_KERNEL_APC}
+
+//
+// MessageId: STATUS_ALERTED
+//
+// MessageText:
+//
+// STATUS_ALERTED
+//
+
+ STATUS_ALERTED = NTSTATUS($00000101);
+ {$EXTERNALSYM STATUS_ALERTED}
+
+//
+// MessageId: STATUS_TIMEOUT
+//
+// MessageText:
+//
+// STATUS_TIMEOUT
+//
+
+ STATUS_TIMEOUT = NTSTATUS($00000102); // winnt
+ {$EXTERNALSYM STATUS_TIMEOUT}
+
+//
+// MessageId: STATUS_PENDING
+//
+// MessageText:
+//
+// The operation that was requested is pending completion.
+//
+
+ STATUS_PENDING = NTSTATUS($00000103); // winnt
+ {$EXTERNALSYM STATUS_PENDING}
+
+//
+// MessageId: STATUS_REPARSE
+//
+// MessageText:
+//
+// A reparse should be performed by the Object Manager since the name of the file resulted in a symbolic link.
+//
+
+ STATUS_REPARSE = NTSTATUS($00000104);
+ {$EXTERNALSYM STATUS_REPARSE}
+
+//
+// MessageId: STATUS_MORE_ENTRIES
+//
+// MessageText:
+//
+// Returned by enumeration APIs to indicate more information is available to successive calls.
+//
+
+ STATUS_MORE_ENTRIES = NTSTATUS($00000105);
+ {$EXTERNALSYM STATUS_MORE_ENTRIES}
+
+//
+// MessageId: STATUS_NOT_ALL_ASSIGNED
+//
+// MessageText:
+//
+// Indicates not all privileges referenced are assigned to the caller.
+// This allows, for example, all privileges to be disabled without having to know exactly which privileges are assigned.
+//
+
+ STATUS_NOT_ALL_ASSIGNED = NTSTATUS($00000106);
+ {$EXTERNALSYM STATUS_NOT_ALL_ASSIGNED}
+
+//
+// MessageId: STATUS_SOME_NOT_MAPPED
+//
+// MessageText:
+//
+// Some of the information to be translated has not been translated.
+//
+
+ STATUS_SOME_NOT_MAPPED = NTSTATUS($00000107);
+ {$EXTERNALSYM STATUS_SOME_NOT_MAPPED}
+
+//
+// MessageId: STATUS_OPLOCK_BREAK_IN_PROGRESS
+//
+// MessageText:
+//
+// An open/create operation completed while an oplock break is underway.
+//
+
+ STATUS_OPLOCK_BREAK_IN_PROGRESS = NTSTATUS($00000108);
+ {$EXTERNALSYM STATUS_OPLOCK_BREAK_IN_PROGRESS}
+
+//
+// MessageId: STATUS_VOLUME_MOUNTED
+//
+// MessageText:
+//
+// A new volume has been mounted by a file system.
+//
+
+ STATUS_VOLUME_MOUNTED = NTSTATUS($00000109);
+ {$EXTERNALSYM STATUS_VOLUME_MOUNTED}
+
+//
+// MessageId: STATUS_RXACT_COMMITTED
+//
+// MessageText:
+//
+// This success level status indicates that the transaction state already exists for the registry sub-tree,
+// but that a transaction commit was previously aborted.
+// The commit has now been completed.
+//
+
+ STATUS_RXACT_COMMITTED = NTSTATUS($0000010A);
+ {$EXTERNALSYM STATUS_RXACT_COMMITTED}
+
+//
+// MessageId: STATUS_NOTIFY_CLEANUP
+//
+// MessageText:
+//
+// This indicates that a notify change request has been completed due to closing the handle
+// which made the notify change request.
+//
+
+ STATUS_NOTIFY_CLEANUP = NTSTATUS($0000010B);
+ {$EXTERNALSYM STATUS_NOTIFY_CLEANUP}
+
+//
+// MessageId: STATUS_NOTIFY_ENUM_DIR
+//
+// MessageText:
+//
+// This indicates that a notify change request is being completed and that the information
+// is not being returned in the caller's buffer.
+// The caller now needs to enumerate the files to find the changes.
+//
+
+ STATUS_NOTIFY_ENUM_DIR = NTSTATUS($0000010C);
+ {$EXTERNALSYM STATUS_NOTIFY_ENUM_DIR}
+
+//
+// MessageId: STATUS_NO_QUOTAS_FOR_ACCOUNT
+//
+// MessageText:
+//
+// {No Quotas}
+// No system quota limits are specifically set for this account.
+//
+
+ STATUS_NO_QUOTAS_FOR_ACCOUNT = NTSTATUS($0000010D);
+ {$EXTERNALSYM STATUS_NO_QUOTAS_FOR_ACCOUNT}
+
+//
+// MessageId: STATUS_PRIMARY_TRANSPORT_CONNECT_FAILED
+//
+// MessageText:
+//
+// {Connect Failure on Primary Transport}
+// An attempt was made to connect to the remote server %hs on the primary transport, but the connection failed.
+// The computer WAS able to connect on a secondary transport.
+//
+
+ STATUS_PRIMARY_TRANSPORT_CONNECT_FAILED = NTSTATUS($0000010E);
+ {$EXTERNALSYM STATUS_PRIMARY_TRANSPORT_CONNECT_FAILED}
+
+//
+// MessageId: STATUS_PAGE_FAULT_TRANSITION
+//
+// MessageText:
+//
+// Page fault was a transition fault.
+//
+
+ STATUS_PAGE_FAULT_TRANSITION = NTSTATUS($00000110);
+ {$EXTERNALSYM STATUS_PAGE_FAULT_TRANSITION}
+
+//
+// MessageId: STATUS_PAGE_FAULT_DEMAND_ZERO
+//
+// MessageText:
+//
+// Page fault was a demand zero fault.
+//
+
+ STATUS_PAGE_FAULT_DEMAND_ZERO = NTSTATUS($00000111);
+ {$EXTERNALSYM STATUS_PAGE_FAULT_DEMAND_ZERO}
+
+//
+// MessageId: STATUS_PAGE_FAULT_COPY_ON_WRITE
+//
+// MessageText:
+//
+// Page fault was a demand zero fault.
+//
+
+ STATUS_PAGE_FAULT_COPY_ON_WRITE = NTSTATUS($00000112);
+ {$EXTERNALSYM STATUS_PAGE_FAULT_COPY_ON_WRITE}
+
+//
+// MessageId: STATUS_PAGE_FAULT_GUARD_PAGE
+//
+// MessageText:
+//
+// Page fault was a demand zero fault.
+//
+
+ STATUS_PAGE_FAULT_GUARD_PAGE = NTSTATUS($00000113);
+ {$EXTERNALSYM STATUS_PAGE_FAULT_GUARD_PAGE}
+
+//
+// MessageId: STATUS_PAGE_FAULT_PAGING_FILE
+//
+// MessageText:
+//
+// Page fault was satisfied by reading from a secondary storage device.
+//
+
+ STATUS_PAGE_FAULT_PAGING_FILE = NTSTATUS($00000114);
+ {$EXTERNALSYM STATUS_PAGE_FAULT_PAGING_FILE}
+
+//
+// MessageId: STATUS_CACHE_PAGE_LOCKED
+//
+// MessageText:
+//
+// Cached page was locked during operation.
+//
+
+ STATUS_CACHE_PAGE_LOCKED = NTSTATUS($00000115);
+ {$EXTERNALSYM STATUS_CACHE_PAGE_LOCKED}
+
+//
+// MessageId: STATUS_CRASH_DUMP
+//
+// MessageText:
+//
+// Crash dump exists in paging file.
+//
+
+ STATUS_CRASH_DUMP = NTSTATUS($00000116);
+ {$EXTERNALSYM STATUS_CRASH_DUMP}
+
+//
+// MessageId: STATUS_BUFFER_ALL_ZEROS
+//
+// MessageText:
+//
+// Specified buffer contains all zeros.
+//
+
+ STATUS_BUFFER_ALL_ZEROS = NTSTATUS($00000117);
+ {$EXTERNALSYM STATUS_BUFFER_ALL_ZEROS}
+
+//
+// MessageId: STATUS_REPARSE_OBJECT
+//
+// MessageText:
+//
+// A reparse should be performed by the Object Manager since the name of the file resulted in a symbolic link.
+//
+
+ STATUS_REPARSE_OBJECT = NTSTATUS($00000118);
+ {$EXTERNALSYM STATUS_REPARSE_OBJECT}
+
+//
+// MessageId: STATUS_RESOURCE_REQUIREMENTS_CHANGED
+//
+// MessageText:
+//
+// The device has succeeded a query-stop and its resource requirements have changed.
+//
+
+ STATUS_RESOURCE_REQUIREMENTS_CHANGED = NTSTATUS($00000119);
+ {$EXTERNALSYM STATUS_RESOURCE_REQUIREMENTS_CHANGED}
+
+//
+// MessageId: STATUS_TRANSLATION_COMPLETE
+//
+// MessageText:
+//
+// The translator has translated these resources into the global space and no further translations should be performed.
+//
+
+ STATUS_TRANSLATION_COMPLETE = NTSTATUS($00000120);
+ {$EXTERNALSYM STATUS_TRANSLATION_COMPLETE}
+
+//
+// MessageId: STATUS_DS_MEMBERSHIP_EVALUATED_LOCALLY
+//
+// MessageText:
+//
+// The directory service evaluated group memberships locally, as it was unable to contact a global catalog server.
+//
+
+ STATUS_DS_MEMBERSHIP_EVALUATED_LOCALLY = NTSTATUS($00000121);
+ {$EXTERNALSYM STATUS_DS_MEMBERSHIP_EVALUATED_LOCALLY}
+
+//
+// MessageId: DBG_EXCEPTION_HANDLED
+//
+// MessageText:
+//
+// Debugger handled exception
+//
+
+ DBG_EXCEPTION_HANDLED = NTSTATUS($00010001); // windbgkd
+ {$EXTERNALSYM DBG_EXCEPTION_HANDLED}
+
+//
+// MessageId: DBG_CONTINUE
+//
+// MessageText:
+//
+// Debugger continued
+//
+
+ DBG_CONTINUE = NTSTATUS($00010002); // winnt
+ {$EXTERNALSYM DBG_CONTINUE}
+
+
+/////////////////////////////////////////////////////////////////////////
+//
+// Standard Information values
+//
+/////////////////////////////////////////////////////////////////////////
+
+//
+// MessageId: STATUS_OBJECT_NAME_EXISTS
+//
+// MessageText:
+//
+// {Object Exists}
+// An attempt was made to create an object and the object name already existed.
+//
+
+ STATUS_OBJECT_NAME_EXISTS = NTSTATUS($40000000);
+ {$EXTERNALSYM STATUS_OBJECT_NAME_EXISTS}
+
+//
+// MessageId: STATUS_THREAD_WAS_SUSPENDED
+//
+// MessageText:
+//
+// {Thread Suspended}
+// A thread termination occurred while the thread was suspended. The thread was resumed, and termination proceeded.
+//
+
+ STATUS_THREAD_WAS_SUSPENDED = NTSTATUS($40000001);
+ {$EXTERNALSYM STATUS_THREAD_WAS_SUSPENDED}
+
+//
+// MessageId: STATUS_WORKING_SET_LIMIT_RANGE
+//
+// MessageText:
+//
+// {Working Set Range Error}
+// An attempt was made to set the working set minimum or maximum to values which are outside of the allowable range.
+//
+
+ STATUS_WORKING_SET_LIMIT_RANGE = NTSTATUS($40000002);
+ {$EXTERNALSYM STATUS_WORKING_SET_LIMIT_RANGE}
+
+//
+// MessageId: STATUS_IMAGE_NOT_AT_BASE
+//
+// MessageText:
+//
+// {Image Relocated}
+// An image file could not be mapped at the address specified in the image file. Local fixups must be performed on this image.
+//
+
+ STATUS_IMAGE_NOT_AT_BASE = NTSTATUS($40000003);
+ {$EXTERNALSYM STATUS_IMAGE_NOT_AT_BASE}
+
+//
+// MessageId: STATUS_RXACT_STATE_CREATED
+//
+// MessageText:
+//
+// This informational level status indicates that a specified registry sub-tree transaction state did not yet exist and had to be created.
+//
+
+ STATUS_RXACT_STATE_CREATED = NTSTATUS($40000004);
+ {$EXTERNALSYM STATUS_RXACT_STATE_CREATED}
+
+//
+// MessageId: STATUS_SEGMENT_NOTIFICATION
+//
+// MessageText:
+//
+// {Segment Load}
+// A virtual DOS machine (VDM) is loading, unloading, or moving an MS-DOS or Win16 program segment image.
+// An exception is raised so a debugger can load, unload or track symbols and breakpoints within these 16-bit segments.
+//
+
+ STATUS_SEGMENT_NOTIFICATION = NTSTATUS($40000005); // winnt
+ {$EXTERNALSYM STATUS_SEGMENT_NOTIFICATION}
+
+//
+// MessageId: STATUS_LOCAL_USER_SESSION_KEY
+//
+// MessageText:
+//
+// {Local Session Key}
+// A user session key was requested for a local RPC connection. The session key returned is a constant value and not unique to this connection.
+//
+
+ STATUS_LOCAL_USER_SESSION_KEY = NTSTATUS($40000006);
+ {$EXTERNALSYM STATUS_LOCAL_USER_SESSION_KEY}
+
+//
+// MessageId: STATUS_BAD_CURRENT_DIRECTORY
+//
+// MessageText:
+//
+// {Invalid Current Directory}
+// The process cannot switch to the startup current directory %hs.
+// Select OK to set current directory to %hs, or select CANCEL to exit.
+//
+
+ STATUS_BAD_CURRENT_DIRECTORY = NTSTATUS($40000007);
+ {$EXTERNALSYM STATUS_BAD_CURRENT_DIRECTORY}
+
+//
+// MessageId: STATUS_SERIAL_MORE_WRITES
+//
+// MessageText:
+//
+// {Serial IOCTL Complete}
+// A serial I/O operation was completed by another write to a serial port.
+// (The IOCTL_SERIAL_XOFF_COUNTER reached zero.)
+//
+
+ STATUS_SERIAL_MORE_WRITES = NTSTATUS($40000008);
+ {$EXTERNALSYM STATUS_SERIAL_MORE_WRITES}
+
+//
+// MessageId: STATUS_REGISTRY_RECOVERED
+//
+// MessageText:
+//
+// {Registry Recovery}
+// One of the files containing the system's Registry data had to be recovered by use of a log or alternate copy.
+// The recovery was successful.
+//
+
+ STATUS_REGISTRY_RECOVERED = NTSTATUS($40000009);
+ {$EXTERNALSYM STATUS_REGISTRY_RECOVERED}
+
+//
+// MessageId: STATUS_FT_READ_RECOVERY_FROM_BACKUP
+//
+// MessageText:
+//
+// {Redundant Read}
+// To satisfy a read request, the NT fault-tolerant file system successfully read the requested data from a redundant copy.
+// This was done because the file system encountered a failure on a member of the fault-tolerant volume,
+// but was unable to reassign the failing area of the device.
+//
+
+ STATUS_FT_READ_RECOVERY_FROM_BACKUP = NTSTATUS($4000000A);
+ {$EXTERNALSYM STATUS_FT_READ_RECOVERY_FROM_BACKUP}
+
+//
+// MessageId: STATUS_FT_WRITE_RECOVERY
+//
+// MessageText:
+//
+// {Redundant Write}
+// To satisfy a write request, the NT fault-tolerant file system successfully wrote a redundant copy of the information.
+// This was done because the file system encountered a failure on a member of the fault-tolerant volume,
+// but was not able to reassign the failing area of the device.
+//
+
+ STATUS_FT_WRITE_RECOVERY = NTSTATUS($4000000B);
+ {$EXTERNALSYM STATUS_FT_WRITE_RECOVERY}
+
+//
+// MessageId: STATUS_SERIAL_COUNTER_TIMEOUT
+//
+// MessageText:
+//
+// {Serial IOCTL Timeout}
+// A serial I/O operation completed because the time-out period expired.
+// (The IOCTL_SERIAL_XOFF_COUNTER had not reached zero.)
+//
+
+ STATUS_SERIAL_COUNTER_TIMEOUT = NTSTATUS($4000000C);
+ {$EXTERNALSYM STATUS_SERIAL_COUNTER_TIMEOUT}
+
+//
+// MessageId: STATUS_NULL_LM_PASSWORD
+//
+// MessageText:
+//
+// {Password Too Complex}
+// The Windows password is too complex to be converted to a LAN Manager password.
+// The LAN Manager password returned is a NULL string.
+//
+
+ STATUS_NULL_LM_PASSWORD = NTSTATUS($4000000D);
+ {$EXTERNALSYM STATUS_NULL_LM_PASSWORD}
+
+//
+// MessageId: STATUS_IMAGE_MACHINE_TYPE_MISMATCH
+//
+// MessageText:
+//
+// {Machine Type Mismatch}
+// The image file %hs is valid, but is for a machine type other than the current machine. Select OK to continue, or CANCEL to fail the DLL load.
+//
+
+ STATUS_IMAGE_MACHINE_TYPE_MISMATCH = NTSTATUS($4000000E);
+ {$EXTERNALSYM STATUS_IMAGE_MACHINE_TYPE_MISMATCH}
+
+//
+// MessageId: STATUS_RECEIVE_PARTIAL
+//
+// MessageText:
+//
+// {Partial Data Received}
+// The network transport returned partial data to its client. The remaining data will be sent later.
+//
+
+ STATUS_RECEIVE_PARTIAL = NTSTATUS($4000000F);
+ {$EXTERNALSYM STATUS_RECEIVE_PARTIAL}
+
+//
+// MessageId: STATUS_RECEIVE_EXPEDITED
+//
+// MessageText:
+//
+// {Expedited Data Received}
+// The network transport returned data to its client that was marked as expedited by the remote system.
+//
+
+ STATUS_RECEIVE_EXPEDITED = NTSTATUS($40000010);
+ {$EXTERNALSYM STATUS_RECEIVE_EXPEDITED}
+
+//
+// MessageId: STATUS_RECEIVE_PARTIAL_EXPEDITED
+//
+// MessageText:
+//
+// {Partial Expedited Data Received}
+// The network transport returned partial data to its client and this data was marked as expedited by the remote system. The remaining data will be sent later.
+//
+
+ STATUS_RECEIVE_PARTIAL_EXPEDITED = NTSTATUS($40000011);
+ {$EXTERNALSYM STATUS_RECEIVE_PARTIAL_EXPEDITED}
+
+//
+// MessageId: STATUS_EVENT_DONE
+//
+// MessageText:
+//
+// {TDI Event Done}
+// The TDI indication has completed successfully.
+//
+
+ STATUS_EVENT_DONE = NTSTATUS($40000012);
+ {$EXTERNALSYM STATUS_EVENT_DONE}
+
+//
+// MessageId: STATUS_EVENT_PENDING
+//
+// MessageText:
+//
+// {TDI Event Pending}
+// The TDI indication has entered the pending state.
+//
+
+ STATUS_EVENT_PENDING = NTSTATUS($40000013);
+ {$EXTERNALSYM STATUS_EVENT_PENDING}
+
+//
+// MessageId: STATUS_CHECKING_FILE_SYSTEM
+//
+// MessageText:
+//
+// Checking file system on %wZ
+//
+
+ STATUS_CHECKING_FILE_SYSTEM = NTSTATUS($40000014);
+ {$EXTERNALSYM STATUS_CHECKING_FILE_SYSTEM}
+
+//
+// MessageId: STATUS_FATAL_APP_EXIT
+//
+// MessageText:
+//
+// {Fatal Application Exit}
+// %hs
+//
+
+ STATUS_FATAL_APP_EXIT = NTSTATUS($40000015);
+ {$EXTERNALSYM STATUS_FATAL_APP_EXIT}
+
+//
+// MessageId: STATUS_PREDEFINED_HANDLE
+//
+// MessageText:
+//
+// The specified registry key is referenced by a predefined handle.
+//
+
+ STATUS_PREDEFINED_HANDLE = NTSTATUS($40000016);
+ {$EXTERNALSYM STATUS_PREDEFINED_HANDLE}
+
+//
+// MessageId: STATUS_WAS_UNLOCKED
+//
+// MessageText:
+//
+// {Page Unlocked}
+// The page protection of a locked page was changed to 'No Access' and the page was unlocked from memory and from the process.
+//
+
+ STATUS_WAS_UNLOCKED = NTSTATUS($40000017);
+ {$EXTERNALSYM STATUS_WAS_UNLOCKED}
+
+//
+// MessageId: STATUS_SERVICE_NOTIFICATION
+//
+// MessageText:
+//
+// %hs
+//
+
+ STATUS_SERVICE_NOTIFICATION = NTSTATUS($40000018);
+ {$EXTERNALSYM STATUS_SERVICE_NOTIFICATION}
+
+//
+// MessageId: STATUS_WAS_LOCKED
+//
+// MessageText:
+//
+// {Page Locked}
+// One of the pages to lock was already locked.
+//
+
+ STATUS_WAS_LOCKED = NTSTATUS($40000019);
+ {$EXTERNALSYM STATUS_WAS_LOCKED}
+
+//
+// MessageId: STATUS_LOG_HARD_ERROR
+//
+// MessageText:
+//
+// Application popup: %1 : %2
+//
+
+ STATUS_LOG_HARD_ERROR = NTSTATUS($4000001A);
+ {$EXTERNALSYM STATUS_LOG_HARD_ERROR}
+
+//
+// MessageId: STATUS_ALREADY_WIN32
+//
+// MessageText:
+//
+// STATUS_ALREADY_WIN32
+//
+
+ STATUS_ALREADY_WIN32 = NTSTATUS($4000001B);
+ {$EXTERNALSYM STATUS_ALREADY_WIN32}
+
+//
+// MessageId: STATUS_WX86_UNSIMULATE
+//
+// MessageText:
+//
+// Exception status code used by Win32 x86 emulation subsystem.
+//
+
+ STATUS_WX86_UNSIMULATE = NTSTATUS($4000001C);
+ {$EXTERNALSYM STATUS_WX86_UNSIMULATE}
+
+//
+// MessageId: STATUS_WX86_CONTINUE
+//
+// MessageText:
+//
+// Exception status code used by Win32 x86 emulation subsystem.
+//
+
+ STATUS_WX86_CONTINUE = NTSTATUS($4000001D);
+ {$EXTERNALSYM STATUS_WX86_CONTINUE}
+
+//
+// MessageId: STATUS_WX86_SINGLE_STEP
+//
+// MessageText:
+//
+// Exception status code used by Win32 x86 emulation subsystem.
+//
+
+ STATUS_WX86_SINGLE_STEP = NTSTATUS($4000001E);
+ {$EXTERNALSYM STATUS_WX86_SINGLE_STEP}
+
+//
+// MessageId: STATUS_WX86_BREAKPOINT
+//
+// MessageText:
+//
+// Exception status code used by Win32 x86 emulation subsystem.
+//
+
+ STATUS_WX86_BREAKPOINT = NTSTATUS($4000001F);
+ {$EXTERNALSYM STATUS_WX86_BREAKPOINT}
+
+//
+// MessageId: STATUS_WX86_EXCEPTION_CONTINUE
+//
+// MessageText:
+//
+// Exception status code used by Win32 x86 emulation subsystem.
+//
+
+ STATUS_WX86_EXCEPTION_CONTINUE = NTSTATUS($40000020);
+ {$EXTERNALSYM STATUS_WX86_EXCEPTION_CONTINUE}
+
+//
+// MessageId: STATUS_WX86_EXCEPTION_LASTCHANCE
+//
+// MessageText:
+//
+// Exception status code used by Win32 x86 emulation subsystem.
+//
+
+ STATUS_WX86_EXCEPTION_LASTCHANCE = NTSTATUS($40000021);
+ {$EXTERNALSYM STATUS_WX86_EXCEPTION_LASTCHANCE}
+
+//
+// MessageId: STATUS_WX86_EXCEPTION_CHAIN
+//
+// MessageText:
+//
+// Exception status code used by Win32 x86 emulation subsystem.
+//
+
+ STATUS_WX86_EXCEPTION_CHAIN = NTSTATUS($40000022);
+ {$EXTERNALSYM STATUS_WX86_EXCEPTION_CHAIN}
+
+//
+// MessageId: STATUS_IMAGE_MACHINE_TYPE_MISMATCH_EXE
+//
+// MessageText:
+//
+// {Machine Type Mismatch}
+// The image file %hs is valid, but is for a machine type other than the current machine.
+//
+
+ STATUS_IMAGE_MACHINE_TYPE_MISMATCH_EXE = NTSTATUS($40000023);
+ {$EXTERNALSYM STATUS_IMAGE_MACHINE_TYPE_MISMATCH_EXE}
+
+//
+// MessageId: STATUS_NO_YIELD_PERFORMED
+//
+// MessageText:
+//
+// A yield execution was performed and no thread was available to run.
+//
+
+ STATUS_NO_YIELD_PERFORMED = NTSTATUS($40000024);
+ {$EXTERNALSYM STATUS_NO_YIELD_PERFORMED}
+
+//
+// MessageId: STATUS_TIMER_RESUME_IGNORED
+//
+// MessageText:
+//
+// The resumable flag to a timer API was ignored.
+//
+
+ STATUS_TIMER_RESUME_IGNORED = NTSTATUS($40000025);
+ {$EXTERNALSYM STATUS_TIMER_RESUME_IGNORED}
+
+//
+// MessageId: STATUS_ARBITRATION_UNHANDLED
+//
+// MessageText:
+//
+// The arbiter has deferred arbitration of these resources to its parent
+//
+
+ STATUS_ARBITRATION_UNHANDLED = NTSTATUS($40000026);
+ {$EXTERNALSYM STATUS_ARBITRATION_UNHANDLED}
+
+//
+// MessageId: STATUS_CARDBUS_NOT_SUPPORTED
+//
+// MessageText:
+//
+// The device "%hs" has detected a CardBus card in its slot, but the firmware on this system is not configured to allow the CardBus controller to be run in CardBus mode.
+// The operating system will currently accept only 16-bit (R2) pc-cards on this controller.
+//
+
+ STATUS_CARDBUS_NOT_SUPPORTED = NTSTATUS($40000027);
+ {$EXTERNALSYM STATUS_CARDBUS_NOT_SUPPORTED}
+
+//
+// MessageId: STATUS_WX86_CREATEWX86TIB
+//
+// MessageText:
+//
+// Exception status code used by Win32 x86 emulation subsystem.
+//
+
+ STATUS_WX86_CREATEWX86TIB = NTSTATUS($40000028);
+ {$EXTERNALSYM STATUS_WX86_CREATEWX86TIB}
+
+//
+// MessageId: STATUS_MP_PROCESSOR_MISMATCH
+//
+// MessageText:
+//
+// The CPUs in this multiprocessor system are not all the same revision level. To use all processors the operating system restricts itself to the features of the least capable processor in the system. Should problems occur with this system, contact the CPU manufacturer to see if this mix of processors is supported.
+//
+
+ STATUS_MP_PROCESSOR_MISMATCH = NTSTATUS($40000029);
+ {$EXTERNALSYM STATUS_MP_PROCESSOR_MISMATCH}
+
+//
+// MessageId: DBG_REPLY_LATER
+//
+// MessageText:
+//
+// Debugger will reply later.
+//
+
+ DBG_REPLY_LATER = NTSTATUS($40010001);
+ {$EXTERNALSYM DBG_REPLY_LATER}
+
+//
+// MessageId: DBG_UNABLE_TO_PROVIDE_HANDLE
+//
+// MessageText:
+//
+// Debugger can not provide handle.
+//
+
+ DBG_UNABLE_TO_PROVIDE_HANDLE = NTSTATUS($40010002);
+ {$EXTERNALSYM DBG_UNABLE_TO_PROVIDE_HANDLE}
+
+//
+// MessageId: DBG_TERMINATE_THREAD
+//
+// MessageText:
+//
+// Debugger terminated thread.
+//
+
+ DBG_TERMINATE_THREAD = NTSTATUS($40010003); // winnt
+ {$EXTERNALSYM DBG_TERMINATE_THREAD}
+
+//
+// MessageId: DBG_TERMINATE_PROCESS
+//
+// MessageText:
+//
+// Debugger terminated process.
+//
+
+ DBG_TERMINATE_PROCESS = NTSTATUS($40010004); // winnt
+ {$EXTERNALSYM DBG_TERMINATE_PROCESS}
+
+//
+// MessageId: DBG_CONTROL_C
+//
+// MessageText:
+//
+// Debugger got control C.
+//
+
+ DBG_CONTROL_C = NTSTATUS($40010005); // winnt
+ {$EXTERNALSYM DBG_CONTROL_C}
+
+//
+// MessageId: DBG_PRINTEXCEPTION_C
+//
+// MessageText:
+//
+// Debugger printerd exception on control C.
+//
+
+ DBG_PRINTEXCEPTION_C = NTSTATUS($40010006);
+ {$EXTERNALSYM DBG_PRINTEXCEPTION_C}
+
+//
+// MessageId: DBG_RIPEXCEPTION
+//
+// MessageText:
+//
+// Debugger recevice RIP exception.
+//
+
+ DBG_RIPEXCEPTION = NTSTATUS($40010007);
+ {$EXTERNALSYM DBG_RIPEXCEPTION}
+
+//
+// MessageId: DBG_CONTROL_BREAK
+//
+// MessageText:
+//
+// Debugger received control break.
+//
+
+ DBG_CONTROL_BREAK = NTSTATUS($40010008); // winnt
+ {$EXTERNALSYM DBG_CONTROL_BREAK}
+
+
+/////////////////////////////////////////////////////////////////////////
+//
+// Standard Warning values
+//
+//
+// Note: Do NOT use the value 0x80000000L, as this is a non-portable value
+// for the NT_SUCCESS macro. Warning values start with a code of 1.
+//
+/////////////////////////////////////////////////////////////////////////
+
+//
+// MessageId: STATUS_GUARD_PAGE_VIOLATION
+//
+// MessageText:
+//
+// {EXCEPTION}
+// Guard Page Exception
+// A page of memory that marks the end of a data structure, such as a stack or an array, has been accessed.
+//
+
+ STATUS_GUARD_PAGE_VIOLATION = NTSTATUS($80000001); // winnt
+ {$EXTERNALSYM STATUS_GUARD_PAGE_VIOLATION}
+
+//
+// MessageId: STATUS_DATATYPE_MISALIGNMENT
+//
+// MessageText:
+//
+// {EXCEPTION}
+// Alignment Fault
+// A datatype misalignment was detected in a load or store instruction.
+//
+
+ STATUS_DATATYPE_MISALIGNMENT = NTSTATUS($80000002); // winnt
+ {$EXTERNALSYM STATUS_DATATYPE_MISALIGNMENT}
+
+//
+// MessageId: STATUS_BREAKPOINT
+//
+// MessageText:
+//
+// {EXCEPTION}
+// Breakpoint
+// A breakpoint has been reached.
+//
+
+ STATUS_BREAKPOINT = NTSTATUS($80000003); // winnt
+ {$EXTERNALSYM STATUS_BREAKPOINT}
+
+//
+// MessageId: STATUS_SINGLE_STEP
+//
+// MessageText:
+//
+// {EXCEPTION}
+// Single Step
+// A single step or trace operation has just been completed.
+//
+
+ STATUS_SINGLE_STEP = NTSTATUS($80000004); // winnt
+ {$EXTERNALSYM STATUS_SINGLE_STEP}
+
+//
+// MessageId: STATUS_BUFFER_OVERFLOW
+//
+// MessageText:
+//
+// {Buffer Overflow}
+// The data was too large to fit into the specified buffer.
+//
+
+ STATUS_BUFFER_OVERFLOW = NTSTATUS($80000005);
+ {$EXTERNALSYM STATUS_BUFFER_OVERFLOW}
+
+//
+// MessageId: STATUS_NO_MORE_FILES
+//
+// MessageText:
+//
+// {No More Files}
+// No more files were found which match the file specification.
+//
+
+ STATUS_NO_MORE_FILES = NTSTATUS($80000006);
+ {$EXTERNALSYM STATUS_NO_MORE_FILES}
+
+//
+// MessageId: STATUS_WAKE_SYSTEM_DEBUGGER
+//
+// MessageText:
+//
+// {Kernel Debugger Awakened}
+// the system debugger was awakened by an interrupt.
+//
+
+ STATUS_WAKE_SYSTEM_DEBUGGER = NTSTATUS($80000007);
+ {$EXTERNALSYM STATUS_WAKE_SYSTEM_DEBUGGER}
+
+//
+// MessageId: STATUS_HANDLES_CLOSED
+//
+// MessageText:
+//
+// {Handles Closed}
+// Handles to objects have been automatically closed as a result of the requested operation.
+//
+
+ STATUS_HANDLES_CLOSED = NTSTATUS($8000000A);
+ {$EXTERNALSYM STATUS_HANDLES_CLOSED}
+
+//
+// MessageId: STATUS_NO_INHERITANCE
+//
+// MessageText:
+//
+// {Non-Inheritable ACL}
+// An access control list (ACL) contains no components that can be inherited.
+//
+
+ STATUS_NO_INHERITANCE = NTSTATUS($8000000B);
+ {$EXTERNALSYM STATUS_NO_INHERITANCE}
+
+//
+// MessageId: STATUS_GUID_SUBSTITUTION_MADE
+//
+// MessageText:
+//
+// {GUID Substitution}
+// During the translation of a global identifier (GUID) to a Windows security ID (SID), no administratively-defined GUID prefix was found.
+// A substitute prefix was used, which will not compromise system security.
+// However, this may provide a more restrictive access than intended.
+//
+
+ STATUS_GUID_SUBSTITUTION_MADE = NTSTATUS($8000000C);
+ {$EXTERNALSYM STATUS_GUID_SUBSTITUTION_MADE}
+
+//
+// MessageId: STATUS_PARTIAL_COPY
+//
+// MessageText:
+//
+// {Partial Copy}
+// Due to protection conflicts not all the requested bytes could be copied.
+//
+
+ STATUS_PARTIAL_COPY = NTSTATUS($8000000D);
+ {$EXTERNALSYM STATUS_PARTIAL_COPY}
+
+//
+// MessageId: STATUS_DEVICE_PAPER_EMPTY
+//
+// MessageText:
+//
+// {Out of Paper}
+// The printer is out of paper.
+//
+
+ STATUS_DEVICE_PAPER_EMPTY = NTSTATUS($8000000E);
+ {$EXTERNALSYM STATUS_DEVICE_PAPER_EMPTY}
+
+//
+// MessageId: STATUS_DEVICE_POWERED_OFF
+//
+// MessageText:
+//
+// {Device Power Is Off}
+// The printer power has been turned off.
+//
+
+ STATUS_DEVICE_POWERED_OFF = NTSTATUS($8000000F);
+ {$EXTERNALSYM STATUS_DEVICE_POWERED_OFF}
+
+//
+// MessageId: STATUS_DEVICE_OFF_LINE
+//
+// MessageText:
+//
+// {Device Offline}
+// The printer has been taken offline.
+//
+
+ STATUS_DEVICE_OFF_LINE = NTSTATUS($80000010);
+ {$EXTERNALSYM STATUS_DEVICE_OFF_LINE}
+
+//
+// MessageId: STATUS_DEVICE_BUSY
+//
+// MessageText:
+//
+// {Device Busy}
+// The device is currently busy.
+//
+
+ STATUS_DEVICE_BUSY = NTSTATUS($80000011);
+ {$EXTERNALSYM STATUS_DEVICE_BUSY}
+
+//
+// MessageId: STATUS_NO_MORE_EAS
+//
+// MessageText:
+//
+// {No More EAs}
+// No more extended attributes (EAs) were found for the file.
+//
+
+ STATUS_NO_MORE_EAS = NTSTATUS($80000012);
+ {$EXTERNALSYM STATUS_NO_MORE_EAS}
+
+//
+// MessageId: STATUS_INVALID_EA_NAME
+//
+// MessageText:
+//
+// {Illegal EA}
+// The specified extended attribute (EA) name contains at least one illegal character.
+//
+
+ STATUS_INVALID_EA_NAME = NTSTATUS($80000013);
+ {$EXTERNALSYM STATUS_INVALID_EA_NAME}
+
+//
+// MessageId: STATUS_EA_LIST_INCONSISTENT
+//
+// MessageText:
+//
+// {Inconsistent EA List}
+// The extended attribute (EA) list is inconsistent.
+//
+
+ STATUS_EA_LIST_INCONSISTENT = NTSTATUS($80000014);
+ {$EXTERNALSYM STATUS_EA_LIST_INCONSISTENT}
+
+//
+// MessageId: STATUS_INVALID_EA_FLAG
+//
+// MessageText:
+//
+// {Invalid EA Flag}
+// An invalid extended attribute (EA) flag was set.
+//
+
+ STATUS_INVALID_EA_FLAG = NTSTATUS($80000015);
+ {$EXTERNALSYM STATUS_INVALID_EA_FLAG}
+
+//
+// MessageId: STATUS_VERIFY_REQUIRED
+//
+// MessageText:
+//
+// {Verifying Disk}
+// The media has changed and a verify operation is in progress so no reads or writes may be performed to the device, except those used in the verify operation.
+//
+
+ STATUS_VERIFY_REQUIRED = NTSTATUS($80000016);
+ {$EXTERNALSYM STATUS_VERIFY_REQUIRED}
+
+//
+// MessageId: STATUS_EXTRANEOUS_INFORMATION
+//
+// MessageText:
+//
+// {Too Much Information}
+// The specified access control list (ACL) contained more information than was expected.
+//
+
+ STATUS_EXTRANEOUS_INFORMATION = NTSTATUS($80000017);
+ {$EXTERNALSYM STATUS_EXTRANEOUS_INFORMATION}
+
+//
+// MessageId: STATUS_RXACT_COMMIT_NECESSARY
+//
+// MessageText:
+//
+// This warning level status indicates that the transaction state already exists for the registry sub-tree, but that a transaction commit was previously aborted.
+// The commit has NOT been completed, but has not been rolled back either (so it may still be committed if desired).
+//
+
+ STATUS_RXACT_COMMIT_NECESSARY = NTSTATUS($80000018);
+ {$EXTERNALSYM STATUS_RXACT_COMMIT_NECESSARY}
+
+//
+// MessageId: STATUS_NO_MORE_ENTRIES
+//
+// MessageText:
+//
+// {No More Entries}
+// No more entries are available from an enumeration operation.
+//
+
+ STATUS_NO_MORE_ENTRIES = NTSTATUS($8000001A);
+ {$EXTERNALSYM STATUS_NO_MORE_ENTRIES}
+
+//
+// MessageId: STATUS_FILEMARK_DETECTED
+//
+// MessageText:
+//
+// {Filemark Found}
+// A filemark was detected.
+//
+
+ STATUS_FILEMARK_DETECTED = NTSTATUS($8000001B);
+ {$EXTERNALSYM STATUS_FILEMARK_DETECTED}
+
+//
+// MessageId: STATUS_MEDIA_CHANGED
+//
+// MessageText:
+//
+// {Media Changed}
+// The media may have changed.
+//
+
+ STATUS_MEDIA_CHANGED = NTSTATUS($8000001C);
+ {$EXTERNALSYM STATUS_MEDIA_CHANGED}
+
+//
+// MessageId: STATUS_BUS_RESET
+//
+// MessageText:
+//
+// {I/O Bus Reset}
+// An I/O bus reset was detected.
+//
+
+ STATUS_BUS_RESET = NTSTATUS($8000001D);
+ {$EXTERNALSYM STATUS_BUS_RESET}
+
+//
+// MessageId: STATUS_END_OF_MEDIA
+//
+// MessageText:
+//
+// {End of Media}
+// The end of the media was encountered.
+//
+
+ STATUS_END_OF_MEDIA = NTSTATUS($8000001E);
+ {$EXTERNALSYM STATUS_END_OF_MEDIA}
+
+//
+// MessageId: STATUS_BEGINNING_OF_MEDIA
+//
+// MessageText:
+//
+// Beginning of tape or partition has been detected.
+//
+
+ STATUS_BEGINNING_OF_MEDIA = NTSTATUS($8000001F);
+ {$EXTERNALSYM STATUS_BEGINNING_OF_MEDIA}
+
+//
+// MessageId: STATUS_MEDIA_CHECK
+//
+// MessageText:
+//
+// {Media Changed}
+// The media may have changed.
+//
+
+ STATUS_MEDIA_CHECK = NTSTATUS($80000020);
+ {$EXTERNALSYM STATUS_MEDIA_CHECK}
+
+//
+// MessageId: STATUS_SETMARK_DETECTED
+//
+// MessageText:
+//
+// A tape access reached a setmark.
+//
+
+ STATUS_SETMARK_DETECTED = NTSTATUS($80000021);
+ {$EXTERNALSYM STATUS_SETMARK_DETECTED}
+
+//
+// MessageId: STATUS_NO_DATA_DETECTED
+//
+// MessageText:
+//
+// During a tape access, the end of the data written is reached.
+//
+
+ STATUS_NO_DATA_DETECTED = NTSTATUS($80000022);
+ {$EXTERNALSYM STATUS_NO_DATA_DETECTED}
+
+//
+// MessageId: STATUS_REDIRECTOR_HAS_OPEN_HANDLES
+//
+// MessageText:
+//
+// The redirector is in use and cannot be unloaded.
+//
+
+ STATUS_REDIRECTOR_HAS_OPEN_HANDLES = NTSTATUS($80000023);
+ {$EXTERNALSYM STATUS_REDIRECTOR_HAS_OPEN_HANDLES}
+
+//
+// MessageId: STATUS_SERVER_HAS_OPEN_HANDLES
+//
+// MessageText:
+//
+// The server is in use and cannot be unloaded.
+//
+
+ STATUS_SERVER_HAS_OPEN_HANDLES = NTSTATUS($80000024);
+ {$EXTERNALSYM STATUS_SERVER_HAS_OPEN_HANDLES}
+
+//
+// MessageId: STATUS_ALREADY_DISCONNECTED
+//
+// MessageText:
+//
+// The specified connection has already been disconnected.
+//
+
+ STATUS_ALREADY_DISCONNECTED = NTSTATUS($80000025);
+ {$EXTERNALSYM STATUS_ALREADY_DISCONNECTED}
+
+//
+// MessageId: STATUS_LONGJUMP
+//
+// MessageText:
+//
+// A long jump has been executed.
+//
+
+ STATUS_LONGJUMP = NTSTATUS($80000026);
+ {$EXTERNALSYM STATUS_LONGJUMP}
+
+//
+// MessageId: DBG_EXCEPTION_NOT_HANDLED
+//
+// MessageText:
+//
+// Debugger did not handle the exception.
+//
+
+ DBG_EXCEPTION_NOT_HANDLED = NTSTATUS($80010001); // winnt
+ {$EXTERNALSYM DBG_EXCEPTION_NOT_HANDLED}
+
+
+/////////////////////////////////////////////////////////////////////////
+//
+// Standard Error values
+//
+/////////////////////////////////////////////////////////////////////////
+
+//
+// MessageId: STATUS_UNSUCCESSFUL
+//
+// MessageText:
+//
+// {Operation Failed}
+// The requested operation was unsuccessful.
+//
+
+ STATUS_UNSUCCESSFUL = NTSTATUS($C0000001);
+ {$EXTERNALSYM STATUS_UNSUCCESSFUL}
+
+//
+// MessageId: STATUS_NOT_IMPLEMENTED
+//
+// MessageText:
+//
+// {Not Implemented}
+// The requested operation is not implemented.
+//
+
+ STATUS_NOT_IMPLEMENTED = NTSTATUS($C0000002);
+ {$EXTERNALSYM STATUS_NOT_IMPLEMENTED}
+
+//
+// MessageId: STATUS_INVALID_INFO_CLASS
+//
+// MessageText:
+//
+// {Invalid Parameter}
+// The specified information class is not a valid information class for the specified object.
+//
+
+ STATUS_INVALID_INFO_CLASS = NTSTATUS($C0000003); // ntsubauth
+ {$EXTERNALSYM STATUS_INVALID_INFO_CLASS}
+
+//
+// MessageId: STATUS_INFO_LENGTH_MISMATCH
+//
+// MessageText:
+//
+// The specified information record length does not match the length required for the specified information class.
+//
+
+ STATUS_INFO_LENGTH_MISMATCH = NTSTATUS($C0000004);
+ {$EXTERNALSYM STATUS_INFO_LENGTH_MISMATCH}
+
+//
+// MessageId: STATUS_ACCESS_VIOLATION
+//
+// MessageText:
+//
+// The instruction at "0x%08lx" referenced memory at "0x%08lx". The memory could not be "%s".
+//
+
+ STATUS_ACCESS_VIOLATION = NTSTATUS($C0000005); // winnt
+ {$EXTERNALSYM STATUS_ACCESS_VIOLATION}
+
+//
+// MessageId: STATUS_IN_PAGE_ERROR
+//
+// MessageText:
+//
+// The instruction at "0x%08lx" referenced memory at "0x%08lx". The required data was not placed into memory because of an I/O error status of "0x%08lx".
+//
+
+ STATUS_IN_PAGE_ERROR = NTSTATUS($C0000006); // winnt
+ {$EXTERNALSYM STATUS_IN_PAGE_ERROR}
+
+//
+// MessageId: STATUS_PAGEFILE_QUOTA
+//
+// MessageText:
+//
+// The pagefile quota for the process has been exhausted.
+//
+
+ STATUS_PAGEFILE_QUOTA = NTSTATUS($C0000007);
+ {$EXTERNALSYM STATUS_PAGEFILE_QUOTA}
+
+//
+// MessageId: STATUS_INVALID_HANDLE
+//
+// MessageText:
+//
+// An invalid HANDLE was specified.
+//
+
+ STATUS_INVALID_HANDLE = NTSTATUS($C0000008); // winnt
+ {$EXTERNALSYM STATUS_INVALID_HANDLE}
+
+//
+// MessageId: STATUS_BAD_INITIAL_STACK
+//
+// MessageText:
+//
+// An invalid initial stack was specified in a call to NtCreateThread.
+//
+
+ STATUS_BAD_INITIAL_STACK = NTSTATUS($C0000009);
+ {$EXTERNALSYM STATUS_BAD_INITIAL_STACK}
+
+//
+// MessageId: STATUS_BAD_INITIAL_PC
+//
+// MessageText:
+//
+// An invalid initial start address was specified in a call to NtCreateThread.
+//
+
+ STATUS_BAD_INITIAL_PC = NTSTATUS($C000000A);
+ {$EXTERNALSYM STATUS_BAD_INITIAL_PC}
+
+//
+// MessageId: STATUS_INVALID_CID
+//
+// MessageText:
+//
+// An invalid Client ID was specified.
+//
+
+ STATUS_INVALID_CID = NTSTATUS($C000000B);
+ {$EXTERNALSYM STATUS_INVALID_CID}
+
+//
+// MessageId: STATUS_TIMER_NOT_CANCELED
+//
+// MessageText:
+//
+// An attempt was made to cancel or set a timer that has an associated APC and the subject thread is not the thread that originally set the timer with an associated APC routine.
+//
+
+ STATUS_TIMER_NOT_CANCELED = NTSTATUS($C000000C);
+ {$EXTERNALSYM STATUS_TIMER_NOT_CANCELED}
+
+//
+// MessageId: STATUS_INVALID_PARAMETER
+//
+// MessageText:
+//
+// An invalid parameter was passed to a service or function.
+//
+
+ STATUS_INVALID_PARAMETER = NTSTATUS($C000000D);
+ {$EXTERNALSYM STATUS_INVALID_PARAMETER}
+
+//
+// MessageId: STATUS_NO_SUCH_DEVICE
+//
+// MessageText:
+//
+// A device which does not exist was specified.
+//
+
+ STATUS_NO_SUCH_DEVICE = NTSTATUS($C000000E);
+ {$EXTERNALSYM STATUS_NO_SUCH_DEVICE}
+
+//
+// MessageId: STATUS_NO_SUCH_FILE
+//
+// MessageText:
+//
+// {File Not Found}
+// The file %hs does not exist.
+//
+
+ STATUS_NO_SUCH_FILE = NTSTATUS($C000000F);
+ {$EXTERNALSYM STATUS_NO_SUCH_FILE}
+
+//
+// MessageId: STATUS_INVALID_DEVICE_REQUEST
+//
+// MessageText:
+//
+// The specified request is not a valid operation for the target device.
+//
+
+ STATUS_INVALID_DEVICE_REQUEST = NTSTATUS($C0000010);
+ {$EXTERNALSYM STATUS_INVALID_DEVICE_REQUEST}
+
+//
+// MessageId: STATUS_END_OF_FILE
+//
+// MessageText:
+//
+// The end-of-file marker has been reached. There is no valid data in the file beyond this marker.
+//
+
+ STATUS_END_OF_FILE = NTSTATUS($C0000011);
+ {$EXTERNALSYM STATUS_END_OF_FILE}
+
+//
+// MessageId: STATUS_WRONG_VOLUME
+//
+// MessageText:
+//
+// {Wrong Volume}
+// The wrong volume is in the drive.
+// Please insert volume %hs into drive %hs.
+//
+
+ STATUS_WRONG_VOLUME = NTSTATUS($C0000012);
+ {$EXTERNALSYM STATUS_WRONG_VOLUME}
+
+//
+// MessageId: STATUS_NO_MEDIA_IN_DEVICE
+//
+// MessageText:
+//
+// {No Disk}
+// There is no disk in the drive.
+// Please insert a disk into drive %hs.
+//
+
+ STATUS_NO_MEDIA_IN_DEVICE = NTSTATUS($C0000013);
+ {$EXTERNALSYM STATUS_NO_MEDIA_IN_DEVICE}
+
+//
+// MessageId: STATUS_UNRECOGNIZED_MEDIA
+//
+// MessageText:
+//
+// {Unknown Disk Format}
+// The disk in drive %hs is not formatted properly.
+// Please check the disk, and reformat if necessary.
+//
+
+ STATUS_UNRECOGNIZED_MEDIA = NTSTATUS($C0000014);
+ {$EXTERNALSYM STATUS_UNRECOGNIZED_MEDIA}
+
+//
+// MessageId: STATUS_NONEXISTENT_SECTOR
+//
+// MessageText:
+//
+// {Sector Not Found}
+// The specified sector does not exist.
+//
+
+ STATUS_NONEXISTENT_SECTOR = NTSTATUS($C0000015);
+ {$EXTERNALSYM STATUS_NONEXISTENT_SECTOR}
+
+//
+// MessageId: STATUS_MORE_PROCESSING_REQUIRED
+//
+// MessageText:
+//
+// {Still Busy}
+// The specified I/O request packet (IRP) cannot be disposed of because the I/O operation is not complete.
+//
+
+ STATUS_MORE_PROCESSING_REQUIRED = NTSTATUS($C0000016);
+ {$EXTERNALSYM STATUS_MORE_PROCESSING_REQUIRED}
+
+//
+// MessageId: STATUS_NO_MEMORY
+//
+// MessageText:
+//
+// {Not Enough Quota}
+// Not enough virtual memory or paging file quota is available to complete the specified operation.
+//
+
+ STATUS_NO_MEMORY = NTSTATUS($C0000017); // winnt
+ {$EXTERNALSYM STATUS_NO_MEMORY}
+
+//
+// MessageId: STATUS_CONFLICTING_ADDRESSES
+//
+// MessageText:
+//
+// {Conflicting Address Range}
+// The specified address range conflicts with the address space.
+//
+
+ STATUS_CONFLICTING_ADDRESSES = NTSTATUS($C0000018);
+ {$EXTERNALSYM STATUS_CONFLICTING_ADDRESSES}
+
+//
+// MessageId: STATUS_NOT_MAPPED_VIEW
+//
+// MessageText:
+//
+// Address range to unmap is not a mapped view.
+//
+
+ STATUS_NOT_MAPPED_VIEW = NTSTATUS($C0000019);
+ {$EXTERNALSYM STATUS_NOT_MAPPED_VIEW}
+
+//
+// MessageId: STATUS_UNABLE_TO_FREE_VM
+//
+// MessageText:
+//
+// Virtual memory cannot be freed.
+//
+
+ STATUS_UNABLE_TO_FREE_VM = NTSTATUS($C000001A);
+ {$EXTERNALSYM STATUS_UNABLE_TO_FREE_VM}
+
+//
+// MessageId: STATUS_UNABLE_TO_DELETE_SECTION
+//
+// MessageText:
+//
+// Specified section cannot be deleted.
+//
+
+ STATUS_UNABLE_TO_DELETE_SECTION = NTSTATUS($C000001B);
+ {$EXTERNALSYM STATUS_UNABLE_TO_DELETE_SECTION}
+
+//
+// MessageId: STATUS_INVALID_SYSTEM_SERVICE
+//
+// MessageText:
+//
+// An invalid system service was specified in a system service call.
+//
+
+ STATUS_INVALID_SYSTEM_SERVICE = NTSTATUS($C000001C);
+ {$EXTERNALSYM STATUS_INVALID_SYSTEM_SERVICE}
+
+//
+// MessageId: STATUS_ILLEGAL_INSTRUCTION
+//
+// MessageText:
+//
+// {EXCEPTION}
+// Illegal Instruction
+// An attempt was made to execute an illegal instruction.
+//
+
+ STATUS_ILLEGAL_INSTRUCTION = NTSTATUS($C000001D); // winnt
+ {$EXTERNALSYM STATUS_ILLEGAL_INSTRUCTION}
+
+//
+// MessageId: STATUS_INVALID_LOCK_SEQUENCE
+//
+// MessageText:
+//
+// {Invalid Lock Sequence}
+// An attempt was made to execute an invalid lock sequence.
+//
+
+ STATUS_INVALID_LOCK_SEQUENCE = NTSTATUS($C000001E);
+ {$EXTERNALSYM STATUS_INVALID_LOCK_SEQUENCE}
+
+//
+// MessageId: STATUS_INVALID_VIEW_SIZE
+//
+// MessageText:
+//
+// {Invalid Mapping}
+// An attempt was made to create a view for a section which is bigger than the section.
+//
+
+ STATUS_INVALID_VIEW_SIZE = NTSTATUS($C000001F);
+ {$EXTERNALSYM STATUS_INVALID_VIEW_SIZE}
+
+//
+// MessageId: STATUS_INVALID_FILE_FOR_SECTION
+//
+// MessageText:
+//
+// {Bad File}
+// The attributes of the specified mapping file for a section of memory cannot be read.
+//
+
+ STATUS_INVALID_FILE_FOR_SECTION = NTSTATUS($C0000020);
+ {$EXTERNALSYM STATUS_INVALID_FILE_FOR_SECTION}
+
+//
+// MessageId: STATUS_ALREADY_COMMITTED
+//
+// MessageText:
+//
+// {Already Committed}
+// The specified address range is already committed.
+//
+
+ STATUS_ALREADY_COMMITTED = NTSTATUS($C0000021);
+ {$EXTERNALSYM STATUS_ALREADY_COMMITTED}
+
+//
+// MessageId: STATUS_ACCESS_DENIED
+//
+// MessageText:
+//
+// {Access Denied}
+// A process has requested access to an object, but has not been granted those access rights.
+//
+
+ STATUS_ACCESS_DENIED = NTSTATUS($C0000022);
+ {$EXTERNALSYM STATUS_ACCESS_DENIED}
+
+//
+// MessageId: STATUS_BUFFER_TOO_SMALL
+//
+// MessageText:
+//
+// {Buffer Too Small}
+// The buffer is too small to contain the entry. No information has been written to the buffer.
+//
+
+ STATUS_BUFFER_TOO_SMALL = NTSTATUS($C0000023);
+ {$EXTERNALSYM STATUS_BUFFER_TOO_SMALL}
+
+//
+// MessageId: STATUS_OBJECT_TYPE_MISMATCH
+//
+// MessageText:
+//
+// {Wrong Type}
+// There is a mismatch between the type of object required by the requested operation and the type of object that is specified in the request.
+//
+
+ STATUS_OBJECT_TYPE_MISMATCH = NTSTATUS($C0000024);
+ {$EXTERNALSYM STATUS_OBJECT_TYPE_MISMATCH}
+
+//
+// MessageId: STATUS_NONCONTINUABLE_EXCEPTION
+//
+// MessageText:
+//
+// {EXCEPTION}
+// Cannot Continue
+// Windows cannot continue from this exception.
+//
+
+ STATUS_NONCONTINUABLE_EXCEPTION = NTSTATUS($C0000025); // winnt
+ {$EXTERNALSYM STATUS_NONCONTINUABLE_EXCEPTION}
+
+//
+// MessageId: STATUS_INVALID_DISPOSITION
+//
+// MessageText:
+//
+// An invalid exception disposition was returned by an exception handler.
+//
+
+ STATUS_INVALID_DISPOSITION = NTSTATUS($C0000026); // winnt
+ {$EXTERNALSYM STATUS_INVALID_DISPOSITION}
+
+//
+// MessageId: STATUS_UNWIND
+//
+// MessageText:
+//
+// Unwind exception code.
+//
+
+ STATUS_UNWIND = NTSTATUS($C0000027);
+ {$EXTERNALSYM STATUS_UNWIND}
+
+//
+// MessageId: STATUS_BAD_STACK
+//
+// MessageText:
+//
+// An invalid or unaligned stack was encountered during an unwind operation.
+//
+
+ STATUS_BAD_STACK = NTSTATUS($C0000028);
+ {$EXTERNALSYM STATUS_BAD_STACK}
+
+//
+// MessageId: STATUS_INVALID_UNWIND_TARGET
+//
+// MessageText:
+//
+// An invalid unwind target was encountered during an unwind operation.
+//
+
+ STATUS_INVALID_UNWIND_TARGET = NTSTATUS($C0000029);
+ {$EXTERNALSYM STATUS_INVALID_UNWIND_TARGET}
+
+//
+// MessageId: STATUS_NOT_LOCKED
+//
+// MessageText:
+//
+// An attempt was made to unlock a page of memory which was not locked.
+//
+
+ STATUS_NOT_LOCKED = NTSTATUS($C000002A);
+ {$EXTERNALSYM STATUS_NOT_LOCKED}
+
+//
+// MessageId: STATUS_PARITY_ERROR
+//
+// MessageText:
+//
+// Device parity error on I/O operation.
+//
+
+ STATUS_PARITY_ERROR = NTSTATUS($C000002B);
+ {$EXTERNALSYM STATUS_PARITY_ERROR}
+
+//
+// MessageId: STATUS_UNABLE_TO_DECOMMIT_VM
+//
+// MessageText:
+//
+// An attempt was made to decommit uncommitted virtual memory.
+//
+
+ STATUS_UNABLE_TO_DECOMMIT_VM = NTSTATUS($C000002C);
+ {$EXTERNALSYM STATUS_UNABLE_TO_DECOMMIT_VM}
+
+//
+// MessageId: STATUS_NOT_COMMITTED
+//
+// MessageText:
+//
+// An attempt was made to change the attributes on memory that has not been committed.
+//
+
+ STATUS_NOT_COMMITTED = NTSTATUS($C000002D);
+ {$EXTERNALSYM STATUS_NOT_COMMITTED}
+
+//
+// MessageId: STATUS_INVALID_PORT_ATTRIBUTES
+//
+// MessageText:
+//
+// Invalid Object Attributes specified to NtCreatePort or invalid Port Attributes specified to NtConnectPort
+//
+
+ STATUS_INVALID_PORT_ATTRIBUTES = NTSTATUS($C000002E);
+ {$EXTERNALSYM STATUS_INVALID_PORT_ATTRIBUTES}
+
+//
+// MessageId: STATUS_PORT_MESSAGE_TOO_LONG
+//
+// MessageText:
+//
+// Length of message passed to NtRequestPort or NtRequestWaitReplyPort was longer than the maximum message allowed by the port.
+//
+
+ STATUS_PORT_MESSAGE_TOO_LONG = NTSTATUS($C000002F);
+ {$EXTERNALSYM STATUS_PORT_MESSAGE_TOO_LONG}
+
+//
+// MessageId: STATUS_INVALID_PARAMETER_MIX
+//
+// MessageText:
+//
+// An invalid combination of parameters was specified.
+//
+
+ STATUS_INVALID_PARAMETER_MIX = NTSTATUS($C0000030);
+ {$EXTERNALSYM STATUS_INVALID_PARAMETER_MIX}
+
+//
+// MessageId: STATUS_INVALID_QUOTA_LOWER
+//
+// MessageText:
+//
+// An attempt was made to lower a quota limit below the current usage.
+//
+
+ STATUS_INVALID_QUOTA_LOWER = NTSTATUS($C0000031);
+ {$EXTERNALSYM STATUS_INVALID_QUOTA_LOWER}
+
+//
+// MessageId: STATUS_DISK_CORRUPT_ERROR
+//
+// MessageText:
+//
+// {Corrupt Disk}
+// The file system structure on the disk is corrupt and unusable.
+// Please run the Chkdsk utility on the volume %hs.
+//
+
+ STATUS_DISK_CORRUPT_ERROR = NTSTATUS($C0000032);
+ {$EXTERNALSYM STATUS_DISK_CORRUPT_ERROR}
+
+//
+// MessageId: STATUS_OBJECT_NAME_INVALID
+//
+// MessageText:
+//
+// Object Name invalid.
+//
+
+ STATUS_OBJECT_NAME_INVALID = NTSTATUS($C0000033);
+ {$EXTERNALSYM STATUS_OBJECT_NAME_INVALID}
+
+//
+// MessageId: STATUS_OBJECT_NAME_NOT_FOUND
+//
+// MessageText:
+//
+// Object Name not found.
+//
+
+ STATUS_OBJECT_NAME_NOT_FOUND = NTSTATUS($C0000034);
+ {$EXTERNALSYM STATUS_OBJECT_NAME_NOT_FOUND}
+
+//
+// MessageId: STATUS_OBJECT_NAME_COLLISION
+//
+// MessageText:
+//
+// Object Name already exists.
+//
+
+ STATUS_OBJECT_NAME_COLLISION = NTSTATUS($C0000035);
+ {$EXTERNALSYM STATUS_OBJECT_NAME_COLLISION}
+
+//
+// MessageId: STATUS_PORT_DISCONNECTED
+//
+// MessageText:
+//
+// Attempt to send a message to a disconnected communication port.
+//
+
+ STATUS_PORT_DISCONNECTED = NTSTATUS($C0000037);
+ {$EXTERNALSYM STATUS_PORT_DISCONNECTED}
+
+//
+// MessageId: STATUS_DEVICE_ALREADY_ATTACHED
+//
+// MessageText:
+//
+// An attempt was made to attach to a device that was already attached to another device.
+//
+
+ STATUS_DEVICE_ALREADY_ATTACHED = NTSTATUS($C0000038);
+ {$EXTERNALSYM STATUS_DEVICE_ALREADY_ATTACHED}
+
+//
+// MessageId: STATUS_OBJECT_PATH_INVALID
+//
+// MessageText:
+//
+// Object Path Component was not a directory object.
+//
+
+ STATUS_OBJECT_PATH_INVALID = NTSTATUS($C0000039);
+ {$EXTERNALSYM STATUS_OBJECT_PATH_INVALID}
+
+//
+// MessageId: STATUS_OBJECT_PATH_NOT_FOUND
+//
+// MessageText:
+//
+// {Path Not Found}
+// The path %hs does not exist.
+//
+
+ STATUS_OBJECT_PATH_NOT_FOUND = NTSTATUS($C000003A);
+ {$EXTERNALSYM STATUS_OBJECT_PATH_NOT_FOUND}
+
+//
+// MessageId: STATUS_OBJECT_PATH_SYNTAX_BAD
+//
+// MessageText:
+//
+// Object Path Component was not a directory object.
+//
+
+ STATUS_OBJECT_PATH_SYNTAX_BAD = NTSTATUS($C000003B);
+ {$EXTERNALSYM STATUS_OBJECT_PATH_SYNTAX_BAD}
+
+//
+// MessageId: STATUS_DATA_OVERRUN
+//
+// MessageText:
+//
+// {Data Overrun}
+// A data overrun error occurred.
+//
+
+ STATUS_DATA_OVERRUN = NTSTATUS($C000003C);
+ {$EXTERNALSYM STATUS_DATA_OVERRUN}
+
+//
+// MessageId: STATUS_DATA_LATE_ERROR
+//
+// MessageText:
+//
+// {Data Late}
+// A data late error occurred.
+//
+
+ STATUS_DATA_LATE_ERROR = NTSTATUS($C000003D);
+ {$EXTERNALSYM STATUS_DATA_LATE_ERROR}
+
+//
+// MessageId: STATUS_DATA_ERROR
+//
+// MessageText:
+//
+// {Data Error}
+// An error in reading or writing data occurred.
+//
+
+ STATUS_DATA_ERROR = NTSTATUS($C000003E);
+ {$EXTERNALSYM STATUS_DATA_ERROR}
+
+//
+// MessageId: STATUS_CRC_ERROR
+//
+// MessageText:
+//
+// {Bad CRC}
+// A cyclic redundancy check (CRC) checksum error occurred.
+//
+
+ STATUS_CRC_ERROR = NTSTATUS($C000003F);
+ {$EXTERNALSYM STATUS_CRC_ERROR}
+
+//
+// MessageId: STATUS_SECTION_TOO_BIG
+//
+// MessageText:
+//
+// {Section Too Large}
+// The specified section is too big to map the file.
+//
+
+ STATUS_SECTION_TOO_BIG = NTSTATUS($C0000040);
+ {$EXTERNALSYM STATUS_SECTION_TOO_BIG}
+
+//
+// MessageId: STATUS_PORT_CONNECTION_REFUSED
+//
+// MessageText:
+//
+// The NtConnectPort request is refused.
+//
+
+ STATUS_PORT_CONNECTION_REFUSED = NTSTATUS($C0000041);
+ {$EXTERNALSYM STATUS_PORT_CONNECTION_REFUSED}
+
+//
+// MessageId: STATUS_INVALID_PORT_HANDLE
+//
+// MessageText:
+//
+// The type of port handle is invalid for the operation requested.
+//
+
+ STATUS_INVALID_PORT_HANDLE = NTSTATUS($C0000042);
+ {$EXTERNALSYM STATUS_INVALID_PORT_HANDLE}
+
+//
+// MessageId: STATUS_SHARING_VIOLATION
+//
+// MessageText:
+//
+// A file cannot be opened because the share access flags are incompatible.
+//
+
+ STATUS_SHARING_VIOLATION = NTSTATUS($C0000043);
+ {$EXTERNALSYM STATUS_SHARING_VIOLATION}
+
+//
+// MessageId: STATUS_QUOTA_EXCEEDED
+//
+// MessageText:
+//
+// Insufficient quota exists to complete the operation
+//
+
+ STATUS_QUOTA_EXCEEDED = NTSTATUS($C0000044);
+ {$EXTERNALSYM STATUS_QUOTA_EXCEEDED}
+
+//
+// MessageId: STATUS_INVALID_PAGE_PROTECTION
+//
+// MessageText:
+//
+// The specified page protection was not valid.
+//
+
+ STATUS_INVALID_PAGE_PROTECTION = NTSTATUS($C0000045);
+ {$EXTERNALSYM STATUS_INVALID_PAGE_PROTECTION}
+
+//
+// MessageId: STATUS_MUTANT_NOT_OWNED
+//
+// MessageText:
+//
+// An attempt to release a mutant object was made by a thread that was not the owner of the mutant object.
+//
+
+ STATUS_MUTANT_NOT_OWNED = NTSTATUS($C0000046);
+ {$EXTERNALSYM STATUS_MUTANT_NOT_OWNED}
+
+//
+// MessageId: STATUS_SEMAPHORE_LIMIT_EXCEEDED
+//
+// MessageText:
+//
+// An attempt was made to release a semaphore such that its maximum count would have been exceeded.
+//
+
+ STATUS_SEMAPHORE_LIMIT_EXCEEDED = NTSTATUS($C0000047);
+ {$EXTERNALSYM STATUS_SEMAPHORE_LIMIT_EXCEEDED}
+
+//
+// MessageId: STATUS_PORT_ALREADY_SET
+//
+// MessageText:
+//
+// An attempt to set a processes DebugPort or ExceptionPort was made, but a port already exists in the process.
+//
+
+ STATUS_PORT_ALREADY_SET = NTSTATUS($C0000048);
+ {$EXTERNALSYM STATUS_PORT_ALREADY_SET}
+
+//
+// MessageId: STATUS_SECTION_NOT_IMAGE
+//
+// MessageText:
+//
+// An attempt was made to query image information on a section which does not map an image.
+//
+
+ STATUS_SECTION_NOT_IMAGE = NTSTATUS($C0000049);
+ {$EXTERNALSYM STATUS_SECTION_NOT_IMAGE}
+
+//
+// MessageId: STATUS_SUSPEND_COUNT_EXCEEDED
+//
+// MessageText:
+//
+// An attempt was made to suspend a thread whose suspend count was at its maximum.
+//
+
+ STATUS_SUSPEND_COUNT_EXCEEDED = NTSTATUS($C000004A);
+ {$EXTERNALSYM STATUS_SUSPEND_COUNT_EXCEEDED}
+
+//
+// MessageId: STATUS_THREAD_IS_TERMINATING
+//
+// MessageText:
+//
+// An attempt was made to suspend a thread that has begun termination.
+//
+
+ STATUS_THREAD_IS_TERMINATING = NTSTATUS($C000004B);
+ {$EXTERNALSYM STATUS_THREAD_IS_TERMINATING}
+
+//
+// MessageId: STATUS_BAD_WORKING_SET_LIMIT
+//
+// MessageText:
+//
+// An attempt was made to set the working set limit to an invalid value (minimum greater than maximum, etc).
+//
+
+ STATUS_BAD_WORKING_SET_LIMIT = NTSTATUS($C000004C);
+ {$EXTERNALSYM STATUS_BAD_WORKING_SET_LIMIT}
+
+//
+// MessageId: STATUS_INCOMPATIBLE_FILE_MAP
+//
+// MessageText:
+//
+// A section was created to map a file which is not compatible to an already existing section which maps the same file.
+//
+
+ STATUS_INCOMPATIBLE_FILE_MAP = NTSTATUS($C000004D);
+ {$EXTERNALSYM STATUS_INCOMPATIBLE_FILE_MAP}
+
+//
+// MessageId: STATUS_SECTION_PROTECTION
+//
+// MessageText:
+//
+// A view to a section specifies a protection which is incompatible with the initial view's protection.
+//
+
+ STATUS_SECTION_PROTECTION = NTSTATUS($C000004E);
+ {$EXTERNALSYM STATUS_SECTION_PROTECTION}
+
+//
+// MessageId: STATUS_EAS_NOT_SUPPORTED
+//
+// MessageText:
+//
+// An operation involving EAs failed because the file system does not support EAs.
+//
+
+ STATUS_EAS_NOT_SUPPORTED = NTSTATUS($C000004F);
+ {$EXTERNALSYM STATUS_EAS_NOT_SUPPORTED}
+
+//
+// MessageId: STATUS_EA_TOO_LARGE
+//
+// MessageText:
+//
+// An EA operation failed because EA set is too large.
+//
+
+ STATUS_EA_TOO_LARGE = NTSTATUS($C0000050);
+ {$EXTERNALSYM STATUS_EA_TOO_LARGE}
+
+//
+// MessageId: STATUS_NONEXISTENT_EA_ENTRY
+//
+// MessageText:
+//
+// An EA operation failed because the name or EA index is invalid.
+//
+
+ STATUS_NONEXISTENT_EA_ENTRY = NTSTATUS($C0000051);
+ {$EXTERNALSYM STATUS_NONEXISTENT_EA_ENTRY}
+
+//
+// MessageId: STATUS_NO_EAS_ON_FILE
+//
+// MessageText:
+//
+// The file for which EAs were requested has no EAs.
+//
+
+ STATUS_NO_EAS_ON_FILE = NTSTATUS($C0000052);
+ {$EXTERNALSYM STATUS_NO_EAS_ON_FILE}
+
+//
+// MessageId: STATUS_EA_CORRUPT_ERROR
+//
+// MessageText:
+//
+// The EA is corrupt and non-readable.
+//
+
+ STATUS_EA_CORRUPT_ERROR = NTSTATUS($C0000053);
+ {$EXTERNALSYM STATUS_EA_CORRUPT_ERROR}
+
+//
+// MessageId: STATUS_FILE_LOCK_CONFLICT
+//
+// MessageText:
+//
+// A requested read/write cannot be granted due to a conflicting file lock.
+//
+
+ STATUS_FILE_LOCK_CONFLICT = NTSTATUS($C0000054);
+ {$EXTERNALSYM STATUS_FILE_LOCK_CONFLICT}
+
+//
+// MessageId: STATUS_LOCK_NOT_GRANTED
+//
+// MessageText:
+//
+// A requested file lock cannot be granted due to other existing locks.
+//
+
+ STATUS_LOCK_NOT_GRANTED = NTSTATUS($C0000055);
+ {$EXTERNALSYM STATUS_LOCK_NOT_GRANTED}
+
+//
+// MessageId: STATUS_DELETE_PENDING
+//
+// MessageText:
+//
+// A non close operation has been requested of a file object with a delete pending.
+//
+
+ STATUS_DELETE_PENDING = NTSTATUS($C0000056);
+ {$EXTERNALSYM STATUS_DELETE_PENDING}
+
+//
+// MessageId: STATUS_CTL_FILE_NOT_SUPPORTED
+//
+// MessageText:
+//
+// An attempt was made to set the control attribute on a file. This attribute is not supported in the target file system.
+//
+
+ STATUS_CTL_FILE_NOT_SUPPORTED = NTSTATUS($C0000057);
+ {$EXTERNALSYM STATUS_CTL_FILE_NOT_SUPPORTED}
+
+//
+// MessageId: STATUS_UNKNOWN_REVISION
+//
+// MessageText:
+//
+// Indicates a revision number encountered or specified is not one known by the service. It may be a more recent revision than the service is aware of.
+//
+
+ STATUS_UNKNOWN_REVISION = NTSTATUS($C0000058);
+ {$EXTERNALSYM STATUS_UNKNOWN_REVISION}
+
+//
+// MessageId: STATUS_REVISION_MISMATCH
+//
+// MessageText:
+//
+// Indicates two revision levels are incompatible.
+//
+
+ STATUS_REVISION_MISMATCH = NTSTATUS($C0000059);
+ {$EXTERNALSYM STATUS_REVISION_MISMATCH}
+
+//
+// MessageId: STATUS_INVALID_OWNER
+//
+// MessageText:
+//
+// Indicates a particular Security ID may not be assigned as the owner of an object.
+//
+
+ STATUS_INVALID_OWNER = NTSTATUS($C000005A);
+ {$EXTERNALSYM STATUS_INVALID_OWNER}
+
+//
+// MessageId: STATUS_INVALID_PRIMARY_GROUP
+//
+// MessageText:
+//
+// Indicates a particular Security ID may not be assigned as the primary group of an object.
+//
+
+ STATUS_INVALID_PRIMARY_GROUP = NTSTATUS($C000005B);
+ {$EXTERNALSYM STATUS_INVALID_PRIMARY_GROUP}
+
+//
+// MessageId: STATUS_NO_IMPERSONATION_TOKEN
+//
+// MessageText:
+//
+// An attempt has been made to operate on an impersonation token by a thread that is not currently impersonating a client.
+//
+
+ STATUS_NO_IMPERSONATION_TOKEN = NTSTATUS($C000005C);
+ {$EXTERNALSYM STATUS_NO_IMPERSONATION_TOKEN}
+
+//
+// MessageId: STATUS_CANT_DISABLE_MANDATORY
+//
+// MessageText:
+//
+// A mandatory group may not be disabled.
+//
+
+ STATUS_CANT_DISABLE_MANDATORY = NTSTATUS($C000005D);
+ {$EXTERNALSYM STATUS_CANT_DISABLE_MANDATORY}
+
+//
+// MessageId: STATUS_NO_LOGON_SERVERS
+//
+// MessageText:
+//
+// There are currently no logon servers available to service the logon request.
+//
+
+ STATUS_NO_LOGON_SERVERS = NTSTATUS($C000005E);
+ {$EXTERNALSYM STATUS_NO_LOGON_SERVERS}
+
+//
+// MessageId: STATUS_NO_SUCH_LOGON_SESSION
+//
+// MessageText:
+//
+// A specified logon session does not exist. It may already have been terminated.
+//
+
+ STATUS_NO_SUCH_LOGON_SESSION = NTSTATUS($C000005F);
+ {$EXTERNALSYM STATUS_NO_SUCH_LOGON_SESSION}
+
+//
+// MessageId: STATUS_NO_SUCH_PRIVILEGE
+//
+// MessageText:
+//
+// A specified privilege does not exist.
+//
+
+ STATUS_NO_SUCH_PRIVILEGE = NTSTATUS($C0000060);
+ {$EXTERNALSYM STATUS_NO_SUCH_PRIVILEGE}
+
+//
+// MessageId: STATUS_PRIVILEGE_NOT_HELD
+//
+// MessageText:
+//
+// A required privilege is not held by the client.
+//
+
+ STATUS_PRIVILEGE_NOT_HELD = NTSTATUS($C0000061);
+ {$EXTERNALSYM STATUS_PRIVILEGE_NOT_HELD}
+
+//
+// MessageId: STATUS_INVALID_ACCOUNT_NAME
+//
+// MessageText:
+//
+// The name provided is not a properly formed account name.
+//
+
+ STATUS_INVALID_ACCOUNT_NAME = NTSTATUS($C0000062);
+ {$EXTERNALSYM STATUS_INVALID_ACCOUNT_NAME}
+
+//
+// MessageId: STATUS_USER_EXISTS
+//
+// MessageText:
+//
+// The specified user already exists.
+//
+
+ STATUS_USER_EXISTS = NTSTATUS($C0000063);
+ {$EXTERNALSYM STATUS_USER_EXISTS}
+
+//
+// MessageId: STATUS_NO_SUCH_USER
+//
+// MessageText:
+//
+// The specified user does not exist.
+//
+
+ STATUS_NO_SUCH_USER = NTSTATUS($C0000064); // ntsubauth
+ {$EXTERNALSYM STATUS_NO_SUCH_USER}
+
+//
+// MessageId: STATUS_GROUP_EXISTS
+//
+// MessageText:
+//
+// The specified group already exists.
+//
+
+ STATUS_GROUP_EXISTS = NTSTATUS($C0000065);
+ {$EXTERNALSYM STATUS_GROUP_EXISTS}
+
+//
+// MessageId: STATUS_NO_SUCH_GROUP
+//
+// MessageText:
+//
+// The specified group does not exist.
+//
+
+ STATUS_NO_SUCH_GROUP = NTSTATUS($C0000066);
+ {$EXTERNALSYM STATUS_NO_SUCH_GROUP}
+
+//
+// MessageId: STATUS_MEMBER_IN_GROUP
+//
+// MessageText:
+//
+// The specified user account is already in the specified group account.
+// Also used to indicate a group cannot be deleted because it contains a member.
+//
+
+ STATUS_MEMBER_IN_GROUP = NTSTATUS($C0000067);
+ {$EXTERNALSYM STATUS_MEMBER_IN_GROUP}
+
+//
+// MessageId: STATUS_MEMBER_NOT_IN_GROUP
+//
+// MessageText:
+//
+// The specified user account is not a member of the specified group account.
+//
+
+ STATUS_MEMBER_NOT_IN_GROUP = NTSTATUS($C0000068);
+ {$EXTERNALSYM STATUS_MEMBER_NOT_IN_GROUP}
+
+//
+// MessageId: STATUS_LAST_ADMIN
+//
+// MessageText:
+//
+// Indicates the requested operation would disable or delete the last remaining administration account.
+// This is not allowed to prevent creating a situation in which the system cannot be administrated.
+//
+
+ STATUS_LAST_ADMIN = NTSTATUS($C0000069);
+ {$EXTERNALSYM STATUS_LAST_ADMIN}
+
+//
+// MessageId: STATUS_WRONG_PASSWORD
+//
+// MessageText:
+//
+// When trying to update a password, this return status indicates that the value provided as the current password is not correct.
+//
+
+ STATUS_WRONG_PASSWORD = NTSTATUS($C000006A); // ntsubauth
+ {$EXTERNALSYM STATUS_WRONG_PASSWORD}
+
+//
+// MessageId: STATUS_ILL_FORMED_PASSWORD
+//
+// MessageText:
+//
+// When trying to update a password, this return status indicates that the value provided for the new password contains values that are not allowed in passwords.
+//
+
+ STATUS_ILL_FORMED_PASSWORD = NTSTATUS($C000006B);
+ {$EXTERNALSYM STATUS_ILL_FORMED_PASSWORD}
+
+//
+// MessageId: STATUS_PASSWORD_RESTRICTION
+//
+// MessageText:
+//
+// When trying to update a password, this status indicates that some password update rule has been violated. For example, the password may not meet length criteria.
+//
+
+ STATUS_PASSWORD_RESTRICTION = NTSTATUS($C000006C); // ntsubauth
+ {$EXTERNALSYM STATUS_PASSWORD_RESTRICTION}
+
+//
+// MessageId: STATUS_LOGON_FAILURE
+//
+// MessageText:
+//
+// The attempted logon is invalid. This is either due to a bad username or authentication information.
+//
+
+ STATUS_LOGON_FAILURE = NTSTATUS($C000006D); // ntsubauth
+ {$EXTERNALSYM STATUS_LOGON_FAILURE}
+
+//
+// MessageId: STATUS_ACCOUNT_RESTRICTION
+//
+// MessageText:
+//
+// Indicates a referenced user name and authentication information are valid, but some user account restriction has prevented successful authentication (such as time-of-day restrictions).
+//
+
+ STATUS_ACCOUNT_RESTRICTION = NTSTATUS($C000006E); // ntsubauth
+ {$EXTERNALSYM STATUS_ACCOUNT_RESTRICTION}
+
+//
+// MessageId: STATUS_INVALID_LOGON_HOURS
+//
+// MessageText:
+//
+// The user account has time restrictions and may not be logged onto at this time.
+//
+
+ STATUS_INVALID_LOGON_HOURS = NTSTATUS($C000006F); // ntsubauth
+ {$EXTERNALSYM STATUS_INVALID_LOGON_HOURS}
+
+//
+// MessageId: STATUS_INVALID_WORKSTATION
+//
+// MessageText:
+//
+// The user account is restricted such that it may not be used to log on from the source workstation.
+//
+
+ STATUS_INVALID_WORKSTATION = NTSTATUS($C0000070); // ntsubauth
+ {$EXTERNALSYM STATUS_INVALID_WORKSTATION}
+
+//
+// MessageId: STATUS_PASSWORD_EXPIRED
+//
+// MessageText:
+//
+// The user account's password has expired.
+//
+
+ STATUS_PASSWORD_EXPIRED = NTSTATUS($C0000071); // ntsubauth
+ {$EXTERNALSYM STATUS_PASSWORD_EXPIRED}
+
+//
+// MessageId: STATUS_ACCOUNT_DISABLED
+//
+// MessageText:
+//
+// The referenced account is currently disabled and may not be logged on to.
+//
+
+ STATUS_ACCOUNT_DISABLED = NTSTATUS($C0000072); // ntsubauth
+ {$EXTERNALSYM STATUS_ACCOUNT_DISABLED}
+
+//
+// MessageId: STATUS_NONE_MAPPED
+//
+// MessageText:
+//
+// None of the information to be translated has been translated.
+//
+
+ STATUS_NONE_MAPPED = NTSTATUS($C0000073);
+ {$EXTERNALSYM STATUS_NONE_MAPPED}
+
+//
+// MessageId: STATUS_TOO_MANY_LUIDS_REQUESTED
+//
+// MessageText:
+//
+// The number of LUIDs requested may not be allocated with a single allocation.
+//
+
+ STATUS_TOO_MANY_LUIDS_REQUESTED = NTSTATUS($C0000074);
+ {$EXTERNALSYM STATUS_TOO_MANY_LUIDS_REQUESTED}
+
+//
+// MessageId: STATUS_LUIDS_EXHAUSTED
+//
+// MessageText:
+//
+// Indicates there are no more LUIDs to allocate.
+//
+
+ STATUS_LUIDS_EXHAUSTED = NTSTATUS($C0000075);
+ {$EXTERNALSYM STATUS_LUIDS_EXHAUSTED}
+
+//
+// MessageId: STATUS_INVALID_SUB_AUTHORITY
+//
+// MessageText:
+//
+// Indicates the sub-authority value is invalid for the particular use.
+//
+
+ STATUS_INVALID_SUB_AUTHORITY = NTSTATUS($C0000076);
+ {$EXTERNALSYM STATUS_INVALID_SUB_AUTHORITY}
+
+//
+// MessageId: STATUS_INVALID_ACL
+//
+// MessageText:
+//
+// Indicates the ACL structure is not valid.
+//
+
+ STATUS_INVALID_ACL = NTSTATUS($C0000077);
+ {$EXTERNALSYM STATUS_INVALID_ACL}
+
+//
+// MessageId: STATUS_INVALID_SID
+//
+// MessageText:
+//
+// Indicates the SID structure is not valid.
+//
+
+ STATUS_INVALID_SID = NTSTATUS($C0000078);
+ {$EXTERNALSYM STATUS_INVALID_SID}
+
+//
+// MessageId: STATUS_INVALID_SECURITY_DESCR
+//
+// MessageText:
+//
+// Indicates the SECURITY_DESCRIPTOR structure is not valid.
+//
+
+ STATUS_INVALID_SECURITY_DESCR = NTSTATUS($C0000079);
+ {$EXTERNALSYM STATUS_INVALID_SECURITY_DESCR}
+
+//
+// MessageId: STATUS_PROCEDURE_NOT_FOUND
+//
+// MessageText:
+//
+// Indicates the specified procedure address cannot be found in the DLL.
+//
+
+ STATUS_PROCEDURE_NOT_FOUND = NTSTATUS($C000007A);
+ {$EXTERNALSYM STATUS_PROCEDURE_NOT_FOUND}
+
+//
+// MessageId: STATUS_INVALID_IMAGE_FORMAT
+//
+// MessageText:
+//
+// {Bad Image}
+// The application or DLL %hs is not a valid Windows image. Please check this against your installation diskette.
+//
+
+ STATUS_INVALID_IMAGE_FORMAT = NTSTATUS($C000007B);
+ {$EXTERNALSYM STATUS_INVALID_IMAGE_FORMAT}
+
+//
+// MessageId: STATUS_NO_TOKEN
+//
+// MessageText:
+//
+// An attempt was made to reference a token that doesn't exist.
+// This is typically done by referencing the token associated with a thread when the thread is not impersonating a client.
+//
+
+ STATUS_NO_TOKEN = NTSTATUS($C000007C);
+ {$EXTERNALSYM STATUS_NO_TOKEN}
+
+//
+// MessageId: STATUS_BAD_INHERITANCE_ACL
+//
+// MessageText:
+//
+// Indicates that an attempt to build either an inherited ACL or ACE was not successful.
+// This can be caused by a number of things. One of the more probable causes is the replacement of a CreatorId with an SID that didn't fit into the ACE or ACL.
+//
+
+ STATUS_BAD_INHERITANCE_ACL = NTSTATUS($C000007D);
+ {$EXTERNALSYM STATUS_BAD_INHERITANCE_ACL}
+
+//
+// MessageId: STATUS_RANGE_NOT_LOCKED
+//
+// MessageText:
+//
+// The range specified in NtUnlockFile was not locked.
+//
+
+ STATUS_RANGE_NOT_LOCKED = NTSTATUS($C000007E);
+ {$EXTERNALSYM STATUS_RANGE_NOT_LOCKED}
+
+//
+// MessageId: STATUS_DISK_FULL
+//
+// MessageText:
+//
+// An operation failed because the disk was full.
+//
+
+ STATUS_DISK_FULL = NTSTATUS($C000007F);
+ {$EXTERNALSYM STATUS_DISK_FULL}
+
+//
+// MessageId: STATUS_SERVER_DISABLED
+//
+// MessageText:
+//
+// The GUID allocation server is [already] disabled at the moment.
+//
+
+ STATUS_SERVER_DISABLED = NTSTATUS($C0000080);
+ {$EXTERNALSYM STATUS_SERVER_DISABLED}
+
+//
+// MessageId: STATUS_SERVER_NOT_DISABLED
+//
+// MessageText:
+//
+// The GUID allocation server is [already] enabled at the moment.
+//
+
+ STATUS_SERVER_NOT_DISABLED = NTSTATUS($C0000081);
+ {$EXTERNALSYM STATUS_SERVER_NOT_DISABLED}
+
+//
+// MessageId: STATUS_TOO_MANY_GUIDS_REQUESTED
+//
+// MessageText:
+//
+// Too many GUIDs were requested from the allocation server at once.
+//
+
+ STATUS_TOO_MANY_GUIDS_REQUESTED = NTSTATUS($C0000082);
+ {$EXTERNALSYM STATUS_TOO_MANY_GUIDS_REQUESTED}
+
+//
+// MessageId: STATUS_GUIDS_EXHAUSTED
+//
+// MessageText:
+//
+// The GUIDs could not be allocated because the Authority Agent was exhausted.
+//
+
+ STATUS_GUIDS_EXHAUSTED = NTSTATUS($C0000083);
+ {$EXTERNALSYM STATUS_GUIDS_EXHAUSTED}
+
+//
+// MessageId: STATUS_INVALID_ID_AUTHORITY
+//
+// MessageText:
+//
+// The value provided was an invalid value for an identifier authority.
+//
+
+ STATUS_INVALID_ID_AUTHORITY = NTSTATUS($C0000084);
+ {$EXTERNALSYM STATUS_INVALID_ID_AUTHORITY}
+
+//
+// MessageId: STATUS_AGENTS_EXHAUSTED
+//
+// MessageText:
+//
+// There are no more authority agent values available for the given identifier authority value.
+//
+
+ STATUS_AGENTS_EXHAUSTED = NTSTATUS($C0000085);
+ {$EXTERNALSYM STATUS_AGENTS_EXHAUSTED}
+
+//
+// MessageId: STATUS_INVALID_VOLUME_LABEL
+//
+// MessageText:
+//
+// An invalid volume label has been specified.
+//
+
+ STATUS_INVALID_VOLUME_LABEL = NTSTATUS($C0000086);
+ {$EXTERNALSYM STATUS_INVALID_VOLUME_LABEL}
+
+//
+// MessageId: STATUS_SECTION_NOT_EXTENDED
+//
+// MessageText:
+//
+// A mapped section could not be extended.
+//
+
+ STATUS_SECTION_NOT_EXTENDED = NTSTATUS($C0000087);
+ {$EXTERNALSYM STATUS_SECTION_NOT_EXTENDED}
+
+//
+// MessageId: STATUS_NOT_MAPPED_DATA
+//
+// MessageText:
+//
+// Specified section to flush does not map a data file.
+//
+
+ STATUS_NOT_MAPPED_DATA = NTSTATUS($C0000088);
+ {$EXTERNALSYM STATUS_NOT_MAPPED_DATA}
+
+//
+// MessageId: STATUS_RESOURCE_DATA_NOT_FOUND
+//
+// MessageText:
+//
+// Indicates the specified image file did not contain a resource section.
+//
+
+ STATUS_RESOURCE_DATA_NOT_FOUND = NTSTATUS($C0000089);
+ {$EXTERNALSYM STATUS_RESOURCE_DATA_NOT_FOUND}
+
+//
+// MessageId: STATUS_RESOURCE_TYPE_NOT_FOUND
+//
+// MessageText:
+//
+// Indicates the specified resource type cannot be found in the image file.
+//
+
+ STATUS_RESOURCE_TYPE_NOT_FOUND = NTSTATUS($C000008A);
+ {$EXTERNALSYM STATUS_RESOURCE_TYPE_NOT_FOUND}
+
+//
+// MessageId: STATUS_RESOURCE_NAME_NOT_FOUND
+//
+// MessageText:
+//
+// Indicates the specified resource name cannot be found in the image file.
+//
+
+ STATUS_RESOURCE_NAME_NOT_FOUND = NTSTATUS($C000008B);
+ {$EXTERNALSYM STATUS_RESOURCE_NAME_NOT_FOUND}
+
+//
+// MessageId: STATUS_ARRAY_BOUNDS_EXCEEDED
+//
+// MessageText:
+//
+// {EXCEPTION}
+// Array bounds exceeded.
+//
+
+ STATUS_ARRAY_BOUNDS_EXCEEDED = NTSTATUS($C000008C); // winnt
+ {$EXTERNALSYM STATUS_ARRAY_BOUNDS_EXCEEDED}
+
+//
+// MessageId: STATUS_FLOAT_DENORMAL_OPERAND
+//
+// MessageText:
+//
+// {EXCEPTION}
+// Floating-point denormal operand.
+//
+
+ STATUS_FLOAT_DENORMAL_OPERAND = NTSTATUS($C000008D); // winnt
+ {$EXTERNALSYM STATUS_FLOAT_DENORMAL_OPERAND}
+
+//
+// MessageId: STATUS_FLOAT_DIVIDE_BY_ZERO
+//
+// MessageText:
+//
+// {EXCEPTION}
+// Floating-point division by zero.
+//
+
+ STATUS_FLOAT_DIVIDE_BY_ZERO = NTSTATUS($C000008E); // winnt
+ {$EXTERNALSYM STATUS_FLOAT_DIVIDE_BY_ZERO}
+
+//
+// MessageId: STATUS_FLOAT_INEXACT_RESULT
+//
+// MessageText:
+//
+// {EXCEPTION}
+// Floating-point inexact result.
+//
+
+ STATUS_FLOAT_INEXACT_RESULT = NTSTATUS($C000008F); // winnt
+ {$EXTERNALSYM STATUS_FLOAT_INEXACT_RESULT}
+
+//
+// MessageId: STATUS_FLOAT_INVALID_OPERATION
+//
+// MessageText:
+//
+// {EXCEPTION}
+// Floating-point invalid operation.
+//
+
+ STATUS_FLOAT_INVALID_OPERATION = NTSTATUS($C0000090); // winnt
+ {$EXTERNALSYM STATUS_FLOAT_INVALID_OPERATION}
+
+//
+// MessageId: STATUS_FLOAT_OVERFLOW
+//
+// MessageText:
+//
+// {EXCEPTION}
+// Floating-point overflow.
+//
+
+ STATUS_FLOAT_OVERFLOW = NTSTATUS($C0000091); // winnt
+ {$EXTERNALSYM STATUS_FLOAT_OVERFLOW}
+
+//
+// MessageId: STATUS_FLOAT_STACK_CHECK
+//
+// MessageText:
+//
+// {EXCEPTION}
+// Floating-point stack check.
+//
+
+ STATUS_FLOAT_STACK_CHECK = NTSTATUS($C0000092); // winnt
+ {$EXTERNALSYM STATUS_FLOAT_STACK_CHECK}
+
+//
+// MessageId: STATUS_FLOAT_UNDERFLOW
+//
+// MessageText:
+//
+// {EXCEPTION}
+// Floating-point underflow.
+//
+
+ STATUS_FLOAT_UNDERFLOW = NTSTATUS($C0000093); // winnt
+ {$EXTERNALSYM STATUS_FLOAT_UNDERFLOW}
+
+//
+// MessageId: STATUS_INTEGER_DIVIDE_BY_ZERO
+//
+// MessageText:
+//
+// {EXCEPTION}
+// Integer division by zero.
+//
+
+ STATUS_INTEGER_DIVIDE_BY_ZERO = NTSTATUS($C0000094); // winnt
+ {$EXTERNALSYM STATUS_INTEGER_DIVIDE_BY_ZERO}
+
+//
+// MessageId: STATUS_INTEGER_OVERFLOW
+//
+// MessageText:
+//
+// {EXCEPTION}
+// Integer overflow.
+//
+
+ STATUS_INTEGER_OVERFLOW = NTSTATUS($C0000095); // winnt
+ {$EXTERNALSYM STATUS_INTEGER_OVERFLOW}
+
+//
+// MessageId: STATUS_PRIVILEGED_INSTRUCTION
+//
+// MessageText:
+//
+// {EXCEPTION}
+// Privileged instruction.
+//
+
+ STATUS_PRIVILEGED_INSTRUCTION = NTSTATUS($C0000096); // winnt
+ {$EXTERNALSYM STATUS_PRIVILEGED_INSTRUCTION}
+
+//
+// MessageId: STATUS_TOO_MANY_PAGING_FILES
+//
+// MessageText:
+//
+// An attempt was made to install more paging files than the system supports.
+//
+
+ STATUS_TOO_MANY_PAGING_FILES = NTSTATUS($C0000097);
+ {$EXTERNALSYM STATUS_TOO_MANY_PAGING_FILES}
+
+//
+// MessageId: STATUS_FILE_INVALID
+//
+// MessageText:
+//
+// The volume for a file has been externally altered such that the opened file is no longer valid.
+//
+
+ STATUS_FILE_INVALID = NTSTATUS($C0000098);
+ {$EXTERNALSYM STATUS_FILE_INVALID}
+
+//
+// MessageId: STATUS_ALLOTTED_SPACE_EXCEEDED
+//
+// MessageText:
+//
+// When a block of memory is allotted for future updates, such as the memory
+// allocated to hold discretionary access control and primary group information, successive updates may exceed the amount of memory originally allotted.
+// Since quota may already have been charged to several processes which have handles to the object, it is not reasonable to alter the size of the allocated memory.
+// Instead, a request that requires more memory than has been allotted must fail and the STATUS_ALLOTED_SPACE_EXCEEDED error returned.
+//
+
+ STATUS_ALLOTTED_SPACE_EXCEEDED = NTSTATUS($C0000099);
+ {$EXTERNALSYM STATUS_ALLOTTED_SPACE_EXCEEDED}
+
+//
+// MessageId: STATUS_INSUFFICIENT_RESOURCES
+//
+// MessageText:
+//
+// Insufficient system resources exist to complete the API.
+//
+
+ STATUS_INSUFFICIENT_RESOURCES = NTSTATUS($C000009A); // ntsubauth
+ {$EXTERNALSYM STATUS_INSUFFICIENT_RESOURCES}
+
+//
+// MessageId: STATUS_DFS_EXIT_PATH_FOUND
+//
+// MessageText:
+//
+// An attempt has been made to open a DFS exit path control file.
+//
+
+ STATUS_DFS_EXIT_PATH_FOUND = NTSTATUS($C000009B);
+ {$EXTERNALSYM STATUS_DFS_EXIT_PATH_FOUND}
+
+//
+// MessageId: STATUS_DEVICE_DATA_ERROR
+//
+// MessageText:
+//
+// STATUS_DEVICE_DATA_ERROR
+//
+
+ STATUS_DEVICE_DATA_ERROR = NTSTATUS($C000009C);
+ {$EXTERNALSYM STATUS_DEVICE_DATA_ERROR}
+
+//
+// MessageId: STATUS_DEVICE_NOT_CONNECTED
+//
+// MessageText:
+//
+// STATUS_DEVICE_NOT_CONNECTED
+//
+
+ STATUS_DEVICE_NOT_CONNECTED = NTSTATUS($C000009D);
+ {$EXTERNALSYM STATUS_DEVICE_NOT_CONNECTED}
+
+//
+// MessageId: STATUS_DEVICE_POWER_FAILURE
+//
+// MessageText:
+//
+// STATUS_DEVICE_POWER_FAILURE
+//
+
+ STATUS_DEVICE_POWER_FAILURE = NTSTATUS($C000009E);
+ {$EXTERNALSYM STATUS_DEVICE_POWER_FAILURE}
+
+//
+// MessageId: STATUS_FREE_VM_NOT_AT_BASE
+//
+// MessageText:
+//
+// Virtual memory cannot be freed as base address is not the base of the region and a region size of zero was specified.
+//
+
+ STATUS_FREE_VM_NOT_AT_BASE = NTSTATUS($C000009F);
+ {$EXTERNALSYM STATUS_FREE_VM_NOT_AT_BASE}
+
+//
+// MessageId: STATUS_MEMORY_NOT_ALLOCATED
+//
+// MessageText:
+//
+// An attempt was made to free virtual memory which is not allocated.
+//
+
+ STATUS_MEMORY_NOT_ALLOCATED = NTSTATUS($C00000A0);
+ {$EXTERNALSYM STATUS_MEMORY_NOT_ALLOCATED}
+
+//
+// MessageId: STATUS_WORKING_SET_QUOTA
+//
+// MessageText:
+//
+// The working set is not big enough to allow the requested pages to be locked.
+//
+
+ STATUS_WORKING_SET_QUOTA = NTSTATUS($C00000A1);
+ {$EXTERNALSYM STATUS_WORKING_SET_QUOTA}
+
+//
+// MessageId: STATUS_MEDIA_WRITE_PROTECTED
+//
+// MessageText:
+//
+// {Write Protect Error}
+// The disk cannot be written to because it is write protected.
+// Please remove the write protection from the volume %hs in drive %hs.
+//
+
+ STATUS_MEDIA_WRITE_PROTECTED = NTSTATUS($C00000A2);
+ {$EXTERNALSYM STATUS_MEDIA_WRITE_PROTECTED}
+
+//
+// MessageId: STATUS_DEVICE_NOT_READY
+//
+// MessageText:
+//
+// {Drive Not Ready}
+// The drive is not ready for use; its door may be open.
+// Please check drive %hs and make sure that a disk is inserted and that the drive door is closed.
+//
+
+ STATUS_DEVICE_NOT_READY = NTSTATUS($C00000A3);
+ {$EXTERNALSYM STATUS_DEVICE_NOT_READY}
+
+//
+// MessageId: STATUS_INVALID_GROUP_ATTRIBUTES
+//
+// MessageText:
+//
+// The specified attributes are invalid, or incompatible with the attributes for the group as a whole.
+//
+
+ STATUS_INVALID_GROUP_ATTRIBUTES = NTSTATUS($C00000A4);
+ {$EXTERNALSYM STATUS_INVALID_GROUP_ATTRIBUTES}
+
+//
+// MessageId: STATUS_BAD_IMPERSONATION_LEVEL
+//
+// MessageText:
+//
+// A specified impersonation level is invalid.
+// Also used to indicate a required impersonation level was not provided.
+//
+
+ STATUS_BAD_IMPERSONATION_LEVEL = NTSTATUS($C00000A5);
+ {$EXTERNALSYM STATUS_BAD_IMPERSONATION_LEVEL}
+
+//
+// MessageId: STATUS_CANT_OPEN_ANONYMOUS
+//
+// MessageText:
+//
+// An attempt was made to open an Anonymous level token.
+// Anonymous tokens may not be opened.
+//
+
+ STATUS_CANT_OPEN_ANONYMOUS = NTSTATUS($C00000A6);
+ {$EXTERNALSYM STATUS_CANT_OPEN_ANONYMOUS}
+
+//
+// MessageId: STATUS_BAD_VALIDATION_CLASS
+//
+// MessageText:
+//
+// The validation information class requested was invalid.
+//
+
+ STATUS_BAD_VALIDATION_CLASS = NTSTATUS($C00000A7);
+ {$EXTERNALSYM STATUS_BAD_VALIDATION_CLASS}
+
+//
+// MessageId: STATUS_BAD_TOKEN_TYPE
+//
+// MessageText:
+//
+// The type of a token object is inappropriate for its attempted use.
+//
+
+ STATUS_BAD_TOKEN_TYPE = NTSTATUS($C00000A8);
+ {$EXTERNALSYM STATUS_BAD_TOKEN_TYPE}
+
+//
+// MessageId: STATUS_BAD_MASTER_BOOT_RECORD
+//
+// MessageText:
+//
+// The type of a token object is inappropriate for its attempted use.
+//
+
+ STATUS_BAD_MASTER_BOOT_RECORD = NTSTATUS($C00000A9);
+ {$EXTERNALSYM STATUS_BAD_MASTER_BOOT_RECORD}
+
+//
+// MessageId: STATUS_INSTRUCTION_MISALIGNMENT
+//
+// MessageText:
+//
+// An attempt was made to execute an instruction at an unaligned address and the host system does not support unaligned instruction references.
+//
+
+ STATUS_INSTRUCTION_MISALIGNMENT = NTSTATUS($C00000AA);
+ {$EXTERNALSYM STATUS_INSTRUCTION_MISALIGNMENT}
+
+//
+// MessageId: STATUS_INSTANCE_NOT_AVAILABLE
+//
+// MessageText:
+//
+// The maximum named pipe instance count has been reached.
+//
+
+ STATUS_INSTANCE_NOT_AVAILABLE = NTSTATUS($C00000AB);
+ {$EXTERNALSYM STATUS_INSTANCE_NOT_AVAILABLE}
+
+//
+// MessageId: STATUS_PIPE_NOT_AVAILABLE
+//
+// MessageText:
+//
+// An instance of a named pipe cannot be found in the listening state.
+//
+
+ STATUS_PIPE_NOT_AVAILABLE = NTSTATUS($C00000AC);
+ {$EXTERNALSYM STATUS_PIPE_NOT_AVAILABLE}
+
+//
+// MessageId: STATUS_INVALID_PIPE_STATE
+//
+// MessageText:
+//
+// The named pipe is not in the connected or closing state.
+//
+
+ STATUS_INVALID_PIPE_STATE = NTSTATUS($C00000AD);
+ {$EXTERNALSYM STATUS_INVALID_PIPE_STATE}
+
+//
+// MessageId: STATUS_PIPE_BUSY
+//
+// MessageText:
+//
+// The specified pipe is set to complete operations and there are current I/O operations queued so it cannot be changed to queue operations.
+//
+
+ STATUS_PIPE_BUSY = NTSTATUS($C00000AE);
+ {$EXTERNALSYM STATUS_PIPE_BUSY}
+
+//
+// MessageId: STATUS_ILLEGAL_FUNCTION
+//
+// MessageText:
+//
+// The specified handle is not open to the server end of the named pipe.
+//
+
+ STATUS_ILLEGAL_FUNCTION = NTSTATUS($C00000AF);
+ {$EXTERNALSYM STATUS_ILLEGAL_FUNCTION}
+
+//
+// MessageId: STATUS_PIPE_DISCONNECTED
+//
+// MessageText:
+//
+// The specified named pipe is in the disconnected state.
+//
+
+ STATUS_PIPE_DISCONNECTED = NTSTATUS($C00000B0);
+ {$EXTERNALSYM STATUS_PIPE_DISCONNECTED}
+
+//
+// MessageId: STATUS_PIPE_CLOSING
+//
+// MessageText:
+//
+// The specified named pipe is in the closing state.
+//
+
+ STATUS_PIPE_CLOSING = NTSTATUS($C00000B1);
+ {$EXTERNALSYM STATUS_PIPE_CLOSING}
+
+//
+// MessageId: STATUS_PIPE_CONNECTED
+//
+// MessageText:
+//
+// The specified named pipe is in the connected state.
+//
+
+ STATUS_PIPE_CONNECTED = NTSTATUS($C00000B2);
+ {$EXTERNALSYM STATUS_PIPE_CONNECTED}
+
+//
+// MessageId: STATUS_PIPE_LISTENING
+//
+// MessageText:
+//
+// The specified named pipe is in the listening state.
+//
+
+ STATUS_PIPE_LISTENING = NTSTATUS($C00000B3);
+ {$EXTERNALSYM STATUS_PIPE_LISTENING}
+
+//
+// MessageId: STATUS_INVALID_READ_MODE
+//
+// MessageText:
+//
+// The specified named pipe is not in message mode.
+//
+
+ STATUS_INVALID_READ_MODE = NTSTATUS($C00000B4);
+ {$EXTERNALSYM STATUS_INVALID_READ_MODE}
+
+//
+// MessageId: STATUS_IO_TIMEOUT
+//
+// MessageText:
+//
+// {Device Timeout}
+// The specified I/O operation on %hs was not completed before the time-out period expired.
+//
+
+ STATUS_IO_TIMEOUT = NTSTATUS($C00000B5);
+ {$EXTERNALSYM STATUS_IO_TIMEOUT}
+
+//
+// MessageId: STATUS_FILE_FORCED_CLOSED
+//
+// MessageText:
+//
+// The specified file has been closed by another process.
+//
+
+ STATUS_FILE_FORCED_CLOSED = NTSTATUS($C00000B6);
+ {$EXTERNALSYM STATUS_FILE_FORCED_CLOSED}
+
+//
+// MessageId: STATUS_PROFILING_NOT_STARTED
+//
+// MessageText:
+//
+// Profiling not started.
+//
+
+ STATUS_PROFILING_NOT_STARTED = NTSTATUS($C00000B7);
+ {$EXTERNALSYM STATUS_PROFILING_NOT_STARTED}
+
+//
+// MessageId: STATUS_PROFILING_NOT_STOPPED
+//
+// MessageText:
+//
+// Profiling not stopped.
+//
+
+ STATUS_PROFILING_NOT_STOPPED = NTSTATUS($C00000B8);
+ {$EXTERNALSYM STATUS_PROFILING_NOT_STOPPED}
+
+//
+// MessageId: STATUS_COULD_NOT_INTERPRET
+//
+// MessageText:
+//
+// The passed ACL did not contain the minimum required information.
+//
+
+ STATUS_COULD_NOT_INTERPRET = NTSTATUS($C00000B9);
+ {$EXTERNALSYM STATUS_COULD_NOT_INTERPRET}
+
+//
+// MessageId: STATUS_FILE_IS_A_DIRECTORY
+//
+// MessageText:
+//
+// The file that was specified as a target is a directory and the caller specified that it could be anything but a directory.
+//
+
+ STATUS_FILE_IS_A_DIRECTORY = NTSTATUS($C00000BA);
+ {$EXTERNALSYM STATUS_FILE_IS_A_DIRECTORY}
+
+//
+// Network specific errors.
+//
+//
+//
+// MessageId: STATUS_NOT_SUPPORTED
+//
+// MessageText:
+//
+// The network request is not supported.
+//
+
+ STATUS_NOT_SUPPORTED = NTSTATUS($C00000BB);
+ {$EXTERNALSYM STATUS_NOT_SUPPORTED}
+
+//
+// MessageId: STATUS_REMOTE_NOT_LISTENING
+//
+// MessageText:
+//
+// This remote computer is not listening.
+//
+
+ STATUS_REMOTE_NOT_LISTENING = NTSTATUS($C00000BC);
+ {$EXTERNALSYM STATUS_REMOTE_NOT_LISTENING}
+
+//
+// MessageId: STATUS_DUPLICATE_NAME
+//
+// MessageText:
+//
+// A duplicate name exists on the network.
+//
+
+ STATUS_DUPLICATE_NAME = NTSTATUS($C00000BD);
+ {$EXTERNALSYM STATUS_DUPLICATE_NAME}
+
+//
+// MessageId: STATUS_BAD_NETWORK_PATH
+//
+// MessageText:
+//
+// The network path cannot be located.
+//
+
+ STATUS_BAD_NETWORK_PATH = NTSTATUS($C00000BE);
+ {$EXTERNALSYM STATUS_BAD_NETWORK_PATH}
+
+//
+// MessageId: STATUS_NETWORK_BUSY
+//
+// MessageText:
+//
+// The network is busy.
+//
+
+ STATUS_NETWORK_BUSY = NTSTATUS($C00000BF);
+ {$EXTERNALSYM STATUS_NETWORK_BUSY}
+
+//
+// MessageId: STATUS_DEVICE_DOES_NOT_EXIST
+//
+// MessageText:
+//
+// This device does not exist.
+//
+
+ STATUS_DEVICE_DOES_NOT_EXIST = NTSTATUS($C00000C0);
+ {$EXTERNALSYM STATUS_DEVICE_DOES_NOT_EXIST}
+
+//
+// MessageId: STATUS_TOO_MANY_COMMANDS
+//
+// MessageText:
+//
+// The network BIOS command limit has been reached.
+//
+
+ STATUS_TOO_MANY_COMMANDS = NTSTATUS($C00000C1);
+ {$EXTERNALSYM STATUS_TOO_MANY_COMMANDS}
+
+//
+// MessageId: STATUS_ADAPTER_HARDWARE_ERROR
+//
+// MessageText:
+//
+// An I/O adapter hardware error has occurred.
+//
+
+ STATUS_ADAPTER_HARDWARE_ERROR = NTSTATUS($C00000C2);
+ {$EXTERNALSYM STATUS_ADAPTER_HARDWARE_ERROR}
+
+//
+// MessageId: STATUS_INVALID_NETWORK_RESPONSE
+//
+// MessageText:
+//
+// The network responded incorrectly.
+//
+
+ STATUS_INVALID_NETWORK_RESPONSE = NTSTATUS($C00000C3);
+ {$EXTERNALSYM STATUS_INVALID_NETWORK_RESPONSE}
+
+//
+// MessageId: STATUS_UNEXPECTED_NETWORK_ERROR
+//
+// MessageText:
+//
+// An unexpected network error occurred.
+//
+
+ STATUS_UNEXPECTED_NETWORK_ERROR = NTSTATUS($C00000C4);
+ {$EXTERNALSYM STATUS_UNEXPECTED_NETWORK_ERROR}
+
+//
+// MessageId: STATUS_BAD_REMOTE_ADAPTER
+//
+// MessageText:
+//
+// The remote adapter is not compatible.
+//
+
+ STATUS_BAD_REMOTE_ADAPTER = NTSTATUS($C00000C5);
+ {$EXTERNALSYM STATUS_BAD_REMOTE_ADAPTER}
+
+//
+// MessageId: STATUS_PRINT_QUEUE_FULL
+//
+// MessageText:
+//
+// The printer queue is full.
+//
+
+ STATUS_PRINT_QUEUE_FULL = NTSTATUS($C00000C6);
+ {$EXTERNALSYM STATUS_PRINT_QUEUE_FULL}
+
+//
+// MessageId: STATUS_NO_SPOOL_SPACE
+//
+// MessageText:
+//
+// Space to store the file waiting to be printed is not available on the server.
+//
+
+ STATUS_NO_SPOOL_SPACE = NTSTATUS($C00000C7);
+ {$EXTERNALSYM STATUS_NO_SPOOL_SPACE}
+
+//
+// MessageId: STATUS_PRINT_CANCELLED
+//
+// MessageText:
+//
+// The requested print file has been canceled.
+//
+
+ STATUS_PRINT_CANCELLED = NTSTATUS($C00000C8);
+ {$EXTERNALSYM STATUS_PRINT_CANCELLED}
+
+//
+// MessageId: STATUS_NETWORK_NAME_DELETED
+//
+// MessageText:
+//
+// The network name was deleted.
+//
+
+ STATUS_NETWORK_NAME_DELETED = NTSTATUS($C00000C9);
+ {$EXTERNALSYM STATUS_NETWORK_NAME_DELETED}
+
+//
+// MessageId: STATUS_NETWORK_ACCESS_DENIED
+//
+// MessageText:
+//
+// Network access is denied.
+//
+
+ STATUS_NETWORK_ACCESS_DENIED = NTSTATUS($C00000CA);
+ {$EXTERNALSYM STATUS_NETWORK_ACCESS_DENIED}
+
+//
+// MessageId: STATUS_BAD_DEVICE_TYPE
+//
+// MessageText:
+//
+// {Incorrect Network Resource Type}
+// The specified device type (LPT, for example) conflicts with the actual device type on the remote resource.
+//
+
+ STATUS_BAD_DEVICE_TYPE = NTSTATUS($C00000CB);
+ {$EXTERNALSYM STATUS_BAD_DEVICE_TYPE}
+
+//
+// MessageId: STATUS_BAD_NETWORK_NAME
+//
+// MessageText:
+//
+// {Network Name Not Found}
+// The specified share name cannot be found on the remote server.
+//
+
+ STATUS_BAD_NETWORK_NAME = NTSTATUS($C00000CC);
+ {$EXTERNALSYM STATUS_BAD_NETWORK_NAME}
+
+//
+// MessageId: STATUS_TOO_MANY_NAMES
+//
+// MessageText:
+//
+// The name limit for the local computer network adapter card was exceeded.
+//
+
+ STATUS_TOO_MANY_NAMES = NTSTATUS($C00000CD);
+ {$EXTERNALSYM STATUS_TOO_MANY_NAMES}
+
+//
+// MessageId: STATUS_TOO_MANY_SESSIONS
+//
+// MessageText:
+//
+// The network BIOS session limit was exceeded.
+//
+
+ STATUS_TOO_MANY_SESSIONS = NTSTATUS($C00000CE);
+ {$EXTERNALSYM STATUS_TOO_MANY_SESSIONS}
+
+//
+// MessageId: STATUS_SHARING_PAUSED
+//
+// MessageText:
+//
+// File sharing has been temporarily paused.
+//
+
+ STATUS_SHARING_PAUSED = NTSTATUS($C00000CF);
+ {$EXTERNALSYM STATUS_SHARING_PAUSED}
+
+//
+// MessageId: STATUS_REQUEST_NOT_ACCEPTED
+//
+// MessageText:
+//
+// No more connections can be made to this remote computer at this time because there are already as many connections as the computer can accept.
+//
+
+ STATUS_REQUEST_NOT_ACCEPTED = NTSTATUS($C00000D0);
+ {$EXTERNALSYM STATUS_REQUEST_NOT_ACCEPTED}
+
+//
+// MessageId: STATUS_REDIRECTOR_PAUSED
+//
+// MessageText:
+//
+// Print or disk redirection is temporarily paused.
+//
+
+ STATUS_REDIRECTOR_PAUSED = NTSTATUS($C00000D1);
+ {$EXTERNALSYM STATUS_REDIRECTOR_PAUSED}
+
+//
+// MessageId: STATUS_NET_WRITE_FAULT
+//
+// MessageText:
+//
+// A network data fault occurred.
+//
+
+ STATUS_NET_WRITE_FAULT = NTSTATUS($C00000D2);
+ {$EXTERNALSYM STATUS_NET_WRITE_FAULT}
+
+//
+// MessageId: STATUS_PROFILING_AT_LIMIT
+//
+// MessageText:
+//
+// The number of active profiling objects is at the maximum and no more may be started.
+//
+
+ STATUS_PROFILING_AT_LIMIT = NTSTATUS($C00000D3);
+ {$EXTERNALSYM STATUS_PROFILING_AT_LIMIT}
+
+//
+// MessageId: STATUS_NOT_SAME_DEVICE
+//
+// MessageText:
+//
+// {Incorrect Volume}
+// The target file of a rename request is located on a different device than the source of the rename request.
+//
+
+ STATUS_NOT_SAME_DEVICE = NTSTATUS($C00000D4);
+ {$EXTERNALSYM STATUS_NOT_SAME_DEVICE}
+
+//
+// MessageId: STATUS_FILE_RENAMED
+//
+// MessageText:
+//
+// The file specified has been renamed and thus cannot be modified.
+//
+
+ STATUS_FILE_RENAMED = NTSTATUS($C00000D5);
+ {$EXTERNALSYM STATUS_FILE_RENAMED}
+
+//
+// MessageId: STATUS_VIRTUAL_CIRCUIT_CLOSED
+//
+// MessageText:
+//
+// {Network Request Timeout}
+// The session with a remote server has been disconnected because the time-out interval for a request has expired.
+//
+
+ STATUS_VIRTUAL_CIRCUIT_CLOSED = NTSTATUS($C00000D6);
+ {$EXTERNALSYM STATUS_VIRTUAL_CIRCUIT_CLOSED}
+
+//
+// MessageId: STATUS_NO_SECURITY_ON_OBJECT
+//
+// MessageText:
+//
+// Indicates an attempt was made to operate on the security of an object that does not have security associated with it.
+//
+
+ STATUS_NO_SECURITY_ON_OBJECT = NTSTATUS($C00000D7);
+ {$EXTERNALSYM STATUS_NO_SECURITY_ON_OBJECT}
+
+//
+// MessageId: STATUS_CANT_WAIT
+//
+// MessageText:
+//
+// Used to indicate that an operation cannot continue without blocking for I/O.
+//
+
+ STATUS_CANT_WAIT = NTSTATUS($C00000D8);
+ {$EXTERNALSYM STATUS_CANT_WAIT}
+
+//
+// MessageId: STATUS_PIPE_EMPTY
+//
+// MessageText:
+//
+// Used to indicate that a read operation was done on an empty pipe.
+//
+
+ STATUS_PIPE_EMPTY = NTSTATUS($C00000D9);
+ {$EXTERNALSYM STATUS_PIPE_EMPTY}
+
+//
+// MessageId: STATUS_CANT_ACCESS_DOMAIN_INFO
+//
+// MessageText:
+//
+// Configuration information could not be read from the domain controller, either because the machine is unavailable, or access has been denied.
+//
+
+ STATUS_CANT_ACCESS_DOMAIN_INFO = NTSTATUS($C00000DA);
+ {$EXTERNALSYM STATUS_CANT_ACCESS_DOMAIN_INFO}
+
+//
+// MessageId: STATUS_CANT_TERMINATE_SELF
+//
+// MessageText:
+//
+// Indicates that a thread attempted to terminate itself by default (called NtTerminateThread with NULL) and it was the last thread in the current process.
+//
+
+ STATUS_CANT_TERMINATE_SELF = NTSTATUS($C00000DB);
+ {$EXTERNALSYM STATUS_CANT_TERMINATE_SELF}
+
+//
+// MessageId: STATUS_INVALID_SERVER_STATE
+//
+// MessageText:
+//
+// Indicates the Sam Server was in the wrong state to perform the desired operation.
+//
+
+ STATUS_INVALID_SERVER_STATE = NTSTATUS($C00000DC);
+ {$EXTERNALSYM STATUS_INVALID_SERVER_STATE}
+
+//
+// MessageId: STATUS_INVALID_DOMAIN_STATE
+//
+// MessageText:
+//
+// Indicates the Domain was in the wrong state to perform the desired operation.
+//
+
+ STATUS_INVALID_DOMAIN_STATE = NTSTATUS($C00000DD);
+ {$EXTERNALSYM STATUS_INVALID_DOMAIN_STATE}
+
+//
+// MessageId: STATUS_INVALID_DOMAIN_ROLE
+//
+// MessageText:
+//
+// This operation is only allowed for the Primary Domain Controller of the domain.
+//
+
+ STATUS_INVALID_DOMAIN_ROLE = NTSTATUS($C00000DE);
+ {$EXTERNALSYM STATUS_INVALID_DOMAIN_ROLE}
+
+//
+// MessageId: STATUS_NO_SUCH_DOMAIN
+//
+// MessageText:
+//
+// The specified Domain did not exist.
+//
+
+ STATUS_NO_SUCH_DOMAIN = NTSTATUS($C00000DF);
+ {$EXTERNALSYM STATUS_NO_SUCH_DOMAIN}
+
+//
+// MessageId: STATUS_DOMAIN_EXISTS
+//
+// MessageText:
+//
+// The specified Domain already exists.
+//
+
+ STATUS_DOMAIN_EXISTS = NTSTATUS($C00000E0);
+ {$EXTERNALSYM STATUS_DOMAIN_EXISTS}
+
+//
+// MessageId: STATUS_DOMAIN_LIMIT_EXCEEDED
+//
+// MessageText:
+//
+// An attempt was made to exceed the limit on the number of domains per server for this release.
+//
+
+ STATUS_DOMAIN_LIMIT_EXCEEDED = NTSTATUS($C00000E1);
+ {$EXTERNALSYM STATUS_DOMAIN_LIMIT_EXCEEDED}
+
+//
+// MessageId: STATUS_OPLOCK_NOT_GRANTED
+//
+// MessageText:
+//
+// Error status returned when oplock request is denied.
+//
+
+ STATUS_OPLOCK_NOT_GRANTED = NTSTATUS($C00000E2);
+ {$EXTERNALSYM STATUS_OPLOCK_NOT_GRANTED}
+
+//
+// MessageId: STATUS_INVALID_OPLOCK_PROTOCOL
+//
+// MessageText:
+//
+// Error status returned when an invalid oplock acknowledgment is received by a file system.
+//
+
+ STATUS_INVALID_OPLOCK_PROTOCOL = NTSTATUS($C00000E3);
+ {$EXTERNALSYM STATUS_INVALID_OPLOCK_PROTOCOL}
+
+//
+// MessageId: STATUS_INTERNAL_DB_CORRUPTION
+//
+// MessageText:
+//
+// This error indicates that the requested operation cannot be completed due to a catastrophic media failure or on-disk data structure corruption.
+//
+
+ STATUS_INTERNAL_DB_CORRUPTION = NTSTATUS($C00000E4);
+ {$EXTERNALSYM STATUS_INTERNAL_DB_CORRUPTION}
+
+//
+// MessageId: STATUS_INTERNAL_ERROR
+//
+// MessageText:
+//
+// An internal error occurred.
+//
+
+ STATUS_INTERNAL_ERROR = NTSTATUS($C00000E5);
+ {$EXTERNALSYM STATUS_INTERNAL_ERROR}
+
+//
+// MessageId: STATUS_GENERIC_NOT_MAPPED
+//
+// MessageText:
+//
+// Indicates generic access types were contained in an access mask which should already be mapped to non-generic access types.
+//
+
+ STATUS_GENERIC_NOT_MAPPED = NTSTATUS($C00000E6);
+ {$EXTERNALSYM STATUS_GENERIC_NOT_MAPPED}
+
+//
+// MessageId: STATUS_BAD_DESCRIPTOR_FORMAT
+//
+// MessageText:
+//
+// Indicates a security descriptor is not in the necessary format (absolute or self-relative).
+//
+
+ STATUS_BAD_DESCRIPTOR_FORMAT = NTSTATUS($C00000E7);
+ {$EXTERNALSYM STATUS_BAD_DESCRIPTOR_FORMAT}
+
+//
+// Status codes raised by the Cache Manager which must be considered as
+// "expected" by its callers.
+//
+//
+// MessageId: STATUS_INVALID_USER_BUFFER
+//
+// MessageText:
+//
+// An access to a user buffer failed at an "expected" point in time.
+// This code is defined since the caller does not want to accept STATUS_ACCESS_VIOLATION in its filter.
+//
+
+ STATUS_INVALID_USER_BUFFER = NTSTATUS($C00000E8);
+ {$EXTERNALSYM STATUS_INVALID_USER_BUFFER}
+
+//
+// MessageId: STATUS_UNEXPECTED_IO_ERROR
+//
+// MessageText:
+//
+// If an I/O error is returned which is not defined in the standard FsRtl filter, it is converted to the following error which is guaranteed to be in the filter.
+// In this case information is lost, however, the filter correctly handles the exception.
+//
+
+ STATUS_UNEXPECTED_IO_ERROR = NTSTATUS($C00000E9);
+ {$EXTERNALSYM STATUS_UNEXPECTED_IO_ERROR}
+
+//
+// MessageId: STATUS_UNEXPECTED_MM_CREATE_ERR
+//
+// MessageText:
+//
+// If an MM error is returned which is not defined in the standard FsRtl filter, it is converted to one of the following errors which is guaranteed to be in the filter.
+// In this case information is lost, however, the filter correctly handles the exception.
+//
+
+ STATUS_UNEXPECTED_MM_CREATE_ERR = NTSTATUS($C00000EA);
+ {$EXTERNALSYM STATUS_UNEXPECTED_MM_CREATE_ERR}
+
+//
+// MessageId: STATUS_UNEXPECTED_MM_MAP_ERROR
+//
+// MessageText:
+//
+// If an MM error is returned which is not defined in the standard FsRtl filter, it is converted to one of the following errors which is guaranteed to be in the filter.
+// In this case information is lost, however, the filter correctly handles the exception.
+//
+
+ STATUS_UNEXPECTED_MM_MAP_ERROR = NTSTATUS($C00000EB);
+ {$EXTERNALSYM STATUS_UNEXPECTED_MM_MAP_ERROR}
+
+//
+// MessageId: STATUS_UNEXPECTED_MM_EXTEND_ERR
+//
+// MessageText:
+//
+// If an MM error is returned which is not defined in the standard FsRtl filter, it is converted to one of the following errors which is guaranteed to be in the filter.
+// In this case information is lost, however, the filter correctly handles the exception.
+//
+
+ STATUS_UNEXPECTED_MM_EXTEND_ERR = NTSTATUS($C00000EC);
+ {$EXTERNALSYM STATUS_UNEXPECTED_MM_EXTEND_ERR}
+
+//
+// MessageId: STATUS_NOT_LOGON_PROCESS
+//
+// MessageText:
+//
+// The requested action is restricted for use by logon processes only. The calling process has not registered as a logon process.
+//
+
+ STATUS_NOT_LOGON_PROCESS = NTSTATUS($C00000ED);
+ {$EXTERNALSYM STATUS_NOT_LOGON_PROCESS}
+
+//
+// MessageId: STATUS_LOGON_SESSION_EXISTS
+//
+// MessageText:
+//
+// An attempt has been made to start a new session manager or LSA logon session with an ID that is already in use.
+//
+
+ STATUS_LOGON_SESSION_EXISTS = NTSTATUS($C00000EE);
+ {$EXTERNALSYM STATUS_LOGON_SESSION_EXISTS}
+
+//
+// MessageId: STATUS_INVALID_PARAMETER_1
+//
+// MessageText:
+//
+// An invalid parameter was passed to a service or function as the first argument.
+//
+
+ STATUS_INVALID_PARAMETER_1 = NTSTATUS($C00000EF);
+ {$EXTERNALSYM STATUS_INVALID_PARAMETER_1}
+
+//
+// MessageId: STATUS_INVALID_PARAMETER_2
+//
+// MessageText:
+//
+// An invalid parameter was passed to a service or function as the second argument.
+//
+
+ STATUS_INVALID_PARAMETER_2 = NTSTATUS($C00000F0);
+ {$EXTERNALSYM STATUS_INVALID_PARAMETER_2}
+
+//
+// MessageId: STATUS_INVALID_PARAMETER_3
+//
+// MessageText:
+//
+// An invalid parameter was passed to a service or function as the third argument.
+//
+
+ STATUS_INVALID_PARAMETER_3 = NTSTATUS($C00000F1);
+ {$EXTERNALSYM STATUS_INVALID_PARAMETER_3}
+
+//
+// MessageId: STATUS_INVALID_PARAMETER_4
+//
+// MessageText:
+//
+// An invalid parameter was passed to a service or function as the fourth argument.
+//
+
+ STATUS_INVALID_PARAMETER_4 = NTSTATUS($C00000F2);
+ {$EXTERNALSYM STATUS_INVALID_PARAMETER_4}
+
+//
+// MessageId: STATUS_INVALID_PARAMETER_5
+//
+// MessageText:
+//
+// An invalid parameter was passed to a service or function as the fifth argument.
+//
+
+ STATUS_INVALID_PARAMETER_5 = NTSTATUS($C00000F3);
+ {$EXTERNALSYM STATUS_INVALID_PARAMETER_5}
+
+//
+// MessageId: STATUS_INVALID_PARAMETER_6
+//
+// MessageText:
+//
+// An invalid parameter was passed to a service or function as the sixth argument.
+//
+
+ STATUS_INVALID_PARAMETER_6 = NTSTATUS($C00000F4);
+ {$EXTERNALSYM STATUS_INVALID_PARAMETER_6}
+
+//
+// MessageId: STATUS_INVALID_PARAMETER_7
+//
+// MessageText:
+//
+// An invalid parameter was passed to a service or function as the seventh argument.
+//
+
+ STATUS_INVALID_PARAMETER_7 = NTSTATUS($C00000F5);
+ {$EXTERNALSYM STATUS_INVALID_PARAMETER_7}
+
+//
+// MessageId: STATUS_INVALID_PARAMETER_8
+//
+// MessageText:
+//
+// An invalid parameter was passed to a service or function as the eighth argument.
+//
+
+ STATUS_INVALID_PARAMETER_8 = NTSTATUS($C00000F6);
+ {$EXTERNALSYM STATUS_INVALID_PARAMETER_8}
+
+//
+// MessageId: STATUS_INVALID_PARAMETER_9
+//
+// MessageText:
+//
+// An invalid parameter was passed to a service or function as the ninth argument.
+//
+
+ STATUS_INVALID_PARAMETER_9 = NTSTATUS($C00000F7);
+ {$EXTERNALSYM STATUS_INVALID_PARAMETER_9}
+
+//
+// MessageId: STATUS_INVALID_PARAMETER_10
+//
+// MessageText:
+//
+// An invalid parameter was passed to a service or function as the tenth argument.
+//
+
+ STATUS_INVALID_PARAMETER_10 = NTSTATUS($C00000F8);
+ {$EXTERNALSYM STATUS_INVALID_PARAMETER_10}
+
+//
+// MessageId: STATUS_INVALID_PARAMETER_11
+//
+// MessageText:
+//
+// An invalid parameter was passed to a service or function as the eleventh argument.
+//
+
+ STATUS_INVALID_PARAMETER_11 = NTSTATUS($C00000F9);
+ {$EXTERNALSYM STATUS_INVALID_PARAMETER_11}
+
+//
+// MessageId: STATUS_INVALID_PARAMETER_12
+//
+// MessageText:
+//
+// An invalid parameter was passed to a service or function as the twelfth argument.
+//
+
+ STATUS_INVALID_PARAMETER_12 = NTSTATUS($C00000FA);
+ {$EXTERNALSYM STATUS_INVALID_PARAMETER_12}
+
+//
+// MessageId: STATUS_REDIRECTOR_NOT_STARTED
+//
+// MessageText:
+//
+// An attempt was made to access a network file, but the network software was not yet started.
+//
+
+ STATUS_REDIRECTOR_NOT_STARTED = NTSTATUS($C00000FB);
+ {$EXTERNALSYM STATUS_REDIRECTOR_NOT_STARTED}
+
+//
+// MessageId: STATUS_REDIRECTOR_STARTED
+//
+// MessageText:
+//
+// An attempt was made to start the redirector, but the redirector has already been started.
+//
+
+ STATUS_REDIRECTOR_STARTED = NTSTATUS($C00000FC);
+ {$EXTERNALSYM STATUS_REDIRECTOR_STARTED}
+
+//
+// MessageId: STATUS_STACK_OVERFLOW
+//
+// MessageText:
+//
+// A new guard page for the stack cannot be created.
+//
+
+ STATUS_STACK_OVERFLOW = NTSTATUS($C00000FD); // winnt
+ {$EXTERNALSYM STATUS_STACK_OVERFLOW}
+
+//
+// MessageId: STATUS_NO_SUCH_PACKAGE
+//
+// MessageText:
+//
+// A specified authentication package is unknown.
+//
+
+ STATUS_NO_SUCH_PACKAGE = NTSTATUS($C00000FE);
+ {$EXTERNALSYM STATUS_NO_SUCH_PACKAGE}
+
+//
+// MessageId: STATUS_BAD_FUNCTION_TABLE
+//
+// MessageText:
+//
+// A malformed function table was encountered during an unwind operation.
+//
+
+ STATUS_BAD_FUNCTION_TABLE = NTSTATUS($C00000FF);
+ {$EXTERNALSYM STATUS_BAD_FUNCTION_TABLE}
+
+//
+// MessageId: STATUS_VARIABLE_NOT_FOUND
+//
+// MessageText:
+//
+// Indicates the specified environment variable name was not found in the specified environment block.
+//
+
+ STATUS_VARIABLE_NOT_FOUND = NTSTATUS($C0000100);
+ {$EXTERNALSYM STATUS_VARIABLE_NOT_FOUND}
+
+//
+// MessageId: STATUS_DIRECTORY_NOT_EMPTY
+//
+// MessageText:
+//
+// Indicates that the directory trying to be deleted is not empty.
+//
+
+ STATUS_DIRECTORY_NOT_EMPTY = NTSTATUS($C0000101);
+ {$EXTERNALSYM STATUS_DIRECTORY_NOT_EMPTY}
+
+//
+// MessageId: STATUS_FILE_CORRUPT_ERROR
+//
+// MessageText:
+//
+// {Corrupt File}
+// The file or directory %hs is corrupt and unreadable.
+// Please run the Chkdsk utility.
+//
+
+ STATUS_FILE_CORRUPT_ERROR = NTSTATUS($C0000102);
+ {$EXTERNALSYM STATUS_FILE_CORRUPT_ERROR}
+
+//
+// MessageId: STATUS_NOT_A_DIRECTORY
+//
+// MessageText:
+//
+// A requested opened file is not a directory.
+//
+
+ STATUS_NOT_A_DIRECTORY = NTSTATUS($C0000103);
+ {$EXTERNALSYM STATUS_NOT_A_DIRECTORY}
+
+//
+// MessageId: STATUS_BAD_LOGON_SESSION_STATE
+//
+// MessageText:
+//
+// The logon session is not in a state that is consistent with the requested operation.
+//
+
+ STATUS_BAD_LOGON_SESSION_STATE = NTSTATUS($C0000104);
+ {$EXTERNALSYM STATUS_BAD_LOGON_SESSION_STATE}
+
+//
+// MessageId: STATUS_LOGON_SESSION_COLLISION
+//
+// MessageText:
+//
+// An internal LSA error has occurred. An authentication package has requested the creation of a Logon Session but the ID of an already existing Logon Session has been specified.
+//
+
+ STATUS_LOGON_SESSION_COLLISION = NTSTATUS($C0000105);
+ {$EXTERNALSYM STATUS_LOGON_SESSION_COLLISION}
+
+//
+// MessageId: STATUS_NAME_TOO_LONG
+//
+// MessageText:
+//
+// A specified name string is too long for its intended use.
+//
+
+ STATUS_NAME_TOO_LONG = NTSTATUS($C0000106);
+ {$EXTERNALSYM STATUS_NAME_TOO_LONG}
+
+//
+// MessageId: STATUS_FILES_OPEN
+//
+// MessageText:
+//
+// The user attempted to force close the files on a redirected drive, but there were opened files on the drive, and the user did not specify a sufficient level of force.
+//
+
+ STATUS_FILES_OPEN = NTSTATUS($C0000107);
+ {$EXTERNALSYM STATUS_FILES_OPEN}
+
+//
+// MessageId: STATUS_CONNECTION_IN_USE
+//
+// MessageText:
+//
+// The user attempted to force close the files on a redirected drive, but there were opened directories on the drive, and the user did not specify a sufficient level of force.
+//
+
+ STATUS_CONNECTION_IN_USE = NTSTATUS($C0000108);
+ {$EXTERNALSYM STATUS_CONNECTION_IN_USE}
+
+//
+// MessageId: STATUS_MESSAGE_NOT_FOUND
+//
+// MessageText:
+//
+// RtlFindMessage could not locate the requested message ID in the message table resource.
+//
+
+ STATUS_MESSAGE_NOT_FOUND = NTSTATUS($C0000109);
+ {$EXTERNALSYM STATUS_MESSAGE_NOT_FOUND}
+
+//
+// MessageId: STATUS_PROCESS_IS_TERMINATING
+//
+// MessageText:
+//
+// An attempt was made to duplicate an object handle into or out of an exiting process.
+//
+
+ STATUS_PROCESS_IS_TERMINATING = NTSTATUS($C000010A);
+ {$EXTERNALSYM STATUS_PROCESS_IS_TERMINATING}
+
+//
+// MessageId: STATUS_INVALID_LOGON_TYPE
+//
+// MessageText:
+//
+// Indicates an invalid value has been provided for the LogonType requested.
+//
+
+ STATUS_INVALID_LOGON_TYPE = NTSTATUS($C000010B);
+ {$EXTERNALSYM STATUS_INVALID_LOGON_TYPE}
+
+//
+// MessageId: STATUS_NO_GUID_TRANSLATION
+//
+// MessageText:
+//
+// Indicates that an attempt was made to assign protection to a file system file or directory and one of the SIDs in the security descriptor could not be translated into a GUID that could be stored by the file system.
+// This causes the protection attempt to fail, which may cause a file creation attempt to fail.
+//
+
+ STATUS_NO_GUID_TRANSLATION = NTSTATUS($C000010C);
+ {$EXTERNALSYM STATUS_NO_GUID_TRANSLATION}
+
+//
+// MessageId: STATUS_CANNOT_IMPERSONATE
+//
+// MessageText:
+//
+// Indicates that an attempt has been made to impersonate via a named pipe that has not yet been read from.
+//
+
+ STATUS_CANNOT_IMPERSONATE = NTSTATUS($C000010D);
+ {$EXTERNALSYM STATUS_CANNOT_IMPERSONATE}
+
+//
+// MessageId: STATUS_IMAGE_ALREADY_LOADED
+//
+// MessageText:
+//
+// Indicates that the specified image is already loaded.
+//
+
+ STATUS_IMAGE_ALREADY_LOADED = NTSTATUS($C000010E);
+ {$EXTERNALSYM STATUS_IMAGE_ALREADY_LOADED}
+
+//
+// ============================================================
+// NOTE: The following ABIOS error code should be reserved on
+// non ABIOS kernel. Eventually, I will remove the ifdef
+// ABIOS.
+// ============================================================
+//
+//
+// MessageId: STATUS_ABIOS_NOT_PRESENT
+//
+// MessageText:
+//
+// STATUS_ABIOS_NOT_PRESENT
+//
+
+ STATUS_ABIOS_NOT_PRESENT = NTSTATUS($C000010F);
+ {$EXTERNALSYM STATUS_ABIOS_NOT_PRESENT}
+
+//
+// MessageId: STATUS_ABIOS_LID_NOT_EXIST
+//
+// MessageText:
+//
+// STATUS_ABIOS_LID_NOT_EXIST
+//
+
+ STATUS_ABIOS_LID_NOT_EXIST = NTSTATUS($C0000110);
+ {$EXTERNALSYM STATUS_ABIOS_LID_NOT_EXIST}
+
+//
+// MessageId: STATUS_ABIOS_LID_ALREADY_OWNED
+//
+// MessageText:
+//
+// STATUS_ABIOS_LID_ALREADY_OWNED
+//
+
+ STATUS_ABIOS_LID_ALREADY_OWNED = NTSTATUS($C0000111);
+ {$EXTERNALSYM STATUS_ABIOS_LID_ALREADY_OWNED}
+
+//
+// MessageId: STATUS_ABIOS_NOT_LID_OWNER
+//
+// MessageText:
+//
+// STATUS_ABIOS_NOT_LID_OWNER
+//
+
+ STATUS_ABIOS_NOT_LID_OWNER = NTSTATUS($C0000112);
+ {$EXTERNALSYM STATUS_ABIOS_NOT_LID_OWNER}
+
+//
+// MessageId: STATUS_ABIOS_INVALID_COMMAND
+//
+// MessageText:
+//
+// STATUS_ABIOS_INVALID_COMMAND
+//
+
+ STATUS_ABIOS_INVALID_COMMAND = NTSTATUS($C0000113);
+ {$EXTERNALSYM STATUS_ABIOS_INVALID_COMMAND}
+
+//
+// MessageId: STATUS_ABIOS_INVALID_LID
+//
+// MessageText:
+//
+// STATUS_ABIOS_INVALID_LID
+//
+
+ STATUS_ABIOS_INVALID_LID = NTSTATUS($C0000114);
+ {$EXTERNALSYM STATUS_ABIOS_INVALID_LID}
+
+//
+// MessageId: STATUS_ABIOS_SELECTOR_NOT_AVAILABLE
+//
+// MessageText:
+//
+// STATUS_ABIOS_SELECTOR_NOT_AVAILABLE
+//
+
+ STATUS_ABIOS_SELECTOR_NOT_AVAILABLE = NTSTATUS($C0000115);
+ {$EXTERNALSYM STATUS_ABIOS_SELECTOR_NOT_AVAILABLE}
+
+//
+// MessageId: STATUS_ABIOS_INVALID_SELECTOR
+//
+// MessageText:
+//
+// STATUS_ABIOS_INVALID_SELECTOR
+//
+
+ STATUS_ABIOS_INVALID_SELECTOR = NTSTATUS($C0000116);
+ {$EXTERNALSYM STATUS_ABIOS_INVALID_SELECTOR}
+
+//
+// MessageId: STATUS_NO_LDT
+//
+// MessageText:
+//
+// Indicates that an attempt was made to change the size of the LDT for a process that has no LDT.
+//
+
+ STATUS_NO_LDT = NTSTATUS($C0000117);
+ {$EXTERNALSYM STATUS_NO_LDT}
+
+//
+// MessageId: STATUS_INVALID_LDT_SIZE
+//
+// MessageText:
+//
+// Indicates that an attempt was made to grow an LDT by setting its size, or that the size was not an even number of selectors.
+//
+
+ STATUS_INVALID_LDT_SIZE = NTSTATUS($C0000118);
+ {$EXTERNALSYM STATUS_INVALID_LDT_SIZE}
+
+//
+// MessageId: STATUS_INVALID_LDT_OFFSET
+//
+// MessageText:
+//
+// Indicates that the starting value for the LDT information was not an integral multiple of the selector size.
+//
+
+ STATUS_INVALID_LDT_OFFSET = NTSTATUS($C0000119);
+ {$EXTERNALSYM STATUS_INVALID_LDT_OFFSET}
+
+//
+// MessageId: STATUS_INVALID_LDT_DESCRIPTOR
+//
+// MessageText:
+//
+// Indicates that the user supplied an invalid descriptor when trying to set up Ldt descriptors.
+//
+
+ STATUS_INVALID_LDT_DESCRIPTOR = NTSTATUS($C000011A);
+ {$EXTERNALSYM STATUS_INVALID_LDT_DESCRIPTOR}
+
+//
+// MessageId: STATUS_INVALID_IMAGE_NE_FORMAT
+//
+// MessageText:
+//
+// The specified image file did not have the correct format. It appears to be NE format.
+//
+
+ STATUS_INVALID_IMAGE_NE_FORMAT = NTSTATUS($C000011B);
+ {$EXTERNALSYM STATUS_INVALID_IMAGE_NE_FORMAT}
+
+//
+// MessageId: STATUS_RXACT_INVALID_STATE
+//
+// MessageText:
+//
+// Indicates that the transaction state of a registry sub-tree is incompatible with the requested operation.
+// For example, a request has been made to start a new transaction with one already in progress,
+// or a request has been made to apply a transaction when one is not currently in progress.
+//
+
+ STATUS_RXACT_INVALID_STATE = NTSTATUS($C000011C);
+ {$EXTERNALSYM STATUS_RXACT_INVALID_STATE}
+
+//
+// MessageId: STATUS_RXACT_COMMIT_FAILURE
+//
+// MessageText:
+//
+// Indicates an error has occurred during a registry transaction commit.
+// The database has been left in an unknown, but probably inconsistent, state.
+// The state of the registry transaction is left as COMMITTING.
+//
+
+ STATUS_RXACT_COMMIT_FAILURE = NTSTATUS($C000011D);
+ {$EXTERNALSYM STATUS_RXACT_COMMIT_FAILURE}
+
+//
+// MessageId: STATUS_MAPPED_FILE_SIZE_ZERO
+//
+// MessageText:
+//
+// An attempt was made to map a file of size zero with the maximum size specified as zero.
+//
+
+ STATUS_MAPPED_FILE_SIZE_ZERO = NTSTATUS($C000011E);
+ {$EXTERNALSYM STATUS_MAPPED_FILE_SIZE_ZERO}
+
+//
+// MessageId: STATUS_TOO_MANY_OPENED_FILES
+//
+// MessageText:
+//
+// Too many files are opened on a remote server.
+// This error should only be returned by the Windows redirector on a remote drive.
+//
+
+ STATUS_TOO_MANY_OPENED_FILES = NTSTATUS($C000011F);
+ {$EXTERNALSYM STATUS_TOO_MANY_OPENED_FILES}
+
+//
+// MessageId: STATUS_CANCELLED
+//
+// MessageText:
+//
+// The I/O request was canceled.
+//
+
+ STATUS_CANCELLED = NTSTATUS($C0000120);
+ {$EXTERNALSYM STATUS_CANCELLED}
+
+//
+// MessageId: STATUS_CANNOT_DELETE
+//
+// MessageText:
+//
+// An attempt has been made to remove a file or directory that cannot be deleted.
+//
+
+ STATUS_CANNOT_DELETE = NTSTATUS($C0000121);
+ {$EXTERNALSYM STATUS_CANNOT_DELETE}
+
+//
+// MessageId: STATUS_INVALID_COMPUTER_NAME
+//
+// MessageText:
+//
+// Indicates a name specified as a remote computer name is syntactically invalid.
+//
+
+ STATUS_INVALID_COMPUTER_NAME = NTSTATUS($C0000122);
+ {$EXTERNALSYM STATUS_INVALID_COMPUTER_NAME}
+
+//
+// MessageId: STATUS_FILE_DELETED
+//
+// MessageText:
+//
+// An I/O request other than close was performed on a file after it has been deleted,
+// which can only happen to a request which did not complete before the last handle was closed via NtClose.
+//
+
+ STATUS_FILE_DELETED = NTSTATUS($C0000123);
+ {$EXTERNALSYM STATUS_FILE_DELETED}
+
+//
+// MessageId: STATUS_SPECIAL_ACCOUNT
+//
+// MessageText:
+//
+// Indicates an operation has been attempted on a built-in (special) SAM account which is incompatible with built-in accounts.
+// For example, built-in accounts cannot be deleted.
+//
+
+ STATUS_SPECIAL_ACCOUNT = NTSTATUS($C0000124);
+ {$EXTERNALSYM STATUS_SPECIAL_ACCOUNT}
+
+//
+// MessageId: STATUS_SPECIAL_GROUP
+//
+// MessageText:
+//
+// The operation requested may not be performed on the specified group because it is a built-in special group.
+//
+
+ STATUS_SPECIAL_GROUP = NTSTATUS($C0000125);
+ {$EXTERNALSYM STATUS_SPECIAL_GROUP}
+
+//
+// MessageId: STATUS_SPECIAL_USER
+//
+// MessageText:
+//
+// The operation requested may not be performed on the specified user because it is a built-in special user.
+//
+
+ STATUS_SPECIAL_USER = NTSTATUS($C0000126);
+ {$EXTERNALSYM STATUS_SPECIAL_USER}
+
+//
+// MessageId: STATUS_MEMBERS_PRIMARY_GROUP
+//
+// MessageText:
+//
+// Indicates a member cannot be removed from a group because the group is currently the member's primary group.
+//
+
+ STATUS_MEMBERS_PRIMARY_GROUP = NTSTATUS($C0000127);
+ {$EXTERNALSYM STATUS_MEMBERS_PRIMARY_GROUP}
+
+//
+// MessageId: STATUS_FILE_CLOSED
+//
+// MessageText:
+//
+// An I/O request other than close and several other special case operations was attempted using a file object that had already been closed.
+//
+
+ STATUS_FILE_CLOSED = NTSTATUS($C0000128);
+ {$EXTERNALSYM STATUS_FILE_CLOSED}
+
+//
+// MessageId: STATUS_TOO_MANY_THREADS
+//
+// MessageText:
+//
+// Indicates a process has too many threads to perform the requested action. For example, assignment of a primary token may only be performed when a process has zero or one threads.
+//
+
+ STATUS_TOO_MANY_THREADS = NTSTATUS($C0000129);
+ {$EXTERNALSYM STATUS_TOO_MANY_THREADS}
+
+//
+// MessageId: STATUS_THREAD_NOT_IN_PROCESS
+//
+// MessageText:
+//
+// An attempt was made to operate on a thread within a specific process, but the thread specified is not in the process specified.
+//
+
+ STATUS_THREAD_NOT_IN_PROCESS = NTSTATUS($C000012A);
+ {$EXTERNALSYM STATUS_THREAD_NOT_IN_PROCESS}
+
+//
+// MessageId: STATUS_TOKEN_ALREADY_IN_USE
+//
+// MessageText:
+//
+// An attempt was made to establish a token for use as a primary token but the token is already in use. A token can only be the primary token of one process at a time.
+//
+
+ STATUS_TOKEN_ALREADY_IN_USE = NTSTATUS($C000012B);
+ {$EXTERNALSYM STATUS_TOKEN_ALREADY_IN_USE}
+
+//
+// MessageId: STATUS_PAGEFILE_QUOTA_EXCEEDED
+//
+// MessageText:
+//
+// Page file quota was exceeded.
+//
+
+ STATUS_PAGEFILE_QUOTA_EXCEEDED = NTSTATUS($C000012C);
+ {$EXTERNALSYM STATUS_PAGEFILE_QUOTA_EXCEEDED}
+
+//
+// MessageId: STATUS_COMMITMENT_LIMIT
+//
+// MessageText:
+//
+// {Out of Virtual Memory}
+// Your system is low on virtual memory. To ensure that Windows runs properly, increase the size of your virtual memory paging file. For more information, see Help.
+//
+
+ STATUS_COMMITMENT_LIMIT = NTSTATUS($C000012D);
+ {$EXTERNALSYM STATUS_COMMITMENT_LIMIT}
+
+//
+// MessageId: STATUS_INVALID_IMAGE_LE_FORMAT
+//
+// MessageText:
+//
+// The specified image file did not have the correct format, it appears to be LE format.
+//
+
+ STATUS_INVALID_IMAGE_LE_FORMAT = NTSTATUS($C000012E);
+ {$EXTERNALSYM STATUS_INVALID_IMAGE_LE_FORMAT}
+
+//
+// MessageId: STATUS_INVALID_IMAGE_NOT_MZ
+//
+// MessageText:
+//
+// The specified image file did not have the correct format, it did not have an initial MZ.
+//
+
+ STATUS_INVALID_IMAGE_NOT_MZ = NTSTATUS($C000012F);
+ {$EXTERNALSYM STATUS_INVALID_IMAGE_NOT_MZ}
+
+//
+// MessageId: STATUS_INVALID_IMAGE_PROTECT
+//
+// MessageText:
+//
+// The specified image file did not have the correct format, it did not have a proper e_lfarlc in the MZ header.
+//
+
+ STATUS_INVALID_IMAGE_PROTECT = NTSTATUS($C0000130);
+ {$EXTERNALSYM STATUS_INVALID_IMAGE_PROTECT}
+
+//
+// MessageId: STATUS_INVALID_IMAGE_WIN_16
+//
+// MessageText:
+//
+// The specified image file did not have the correct format, it appears to be a 16-bit Windows image.
+//
+
+ STATUS_INVALID_IMAGE_WIN_16 = NTSTATUS($C0000131);
+ {$EXTERNALSYM STATUS_INVALID_IMAGE_WIN_16}
+
+//
+// MessageId: STATUS_LOGON_SERVER_CONFLICT
+//
+// MessageText:
+//
+// The Netlogon service cannot start because another Netlogon service running in the domain conflicts with the specified role.
+//
+
+ STATUS_LOGON_SERVER_CONFLICT = NTSTATUS($C0000132);
+ {$EXTERNALSYM STATUS_LOGON_SERVER_CONFLICT}
+
+//
+// MessageId: STATUS_TIME_DIFFERENCE_AT_DC
+//
+// MessageText:
+//
+// The time at the Primary Domain Controller is different than the time at the Backup Domain Controller or member server by too large an amount.
+//
+
+ STATUS_TIME_DIFFERENCE_AT_DC = NTSTATUS($C0000133);
+ {$EXTERNALSYM STATUS_TIME_DIFFERENCE_AT_DC}
+
+//
+// MessageId: STATUS_SYNCHRONIZATION_REQUIRED
+//
+// MessageText:
+//
+// The SAM database on a Windows Server is significantly out of synchronization with the copy on the Domain Controller. A complete synchronization is required.
+//
+
+ STATUS_SYNCHRONIZATION_REQUIRED = NTSTATUS($C0000134);
+ {$EXTERNALSYM STATUS_SYNCHRONIZATION_REQUIRED}
+
+//
+// MessageId: STATUS_DLL_NOT_FOUND
+//
+// MessageText:
+//
+// {Unable To Locate DLL}
+// The dynamic link library %hs could not be found in the specified path %hs.
+//
+
+ STATUS_DLL_NOT_FOUND = NTSTATUS($C0000135);
+ {$EXTERNALSYM STATUS_DLL_NOT_FOUND}
+
+//
+// MessageId: STATUS_OPEN_FAILED
+//
+// MessageText:
+//
+// The NtCreateFile API failed. This error should never be returned to an application, it is a place holder for the Windows Lan Manager Redirector to use in its internal error mapping routines.
+//
+
+ STATUS_OPEN_FAILED = NTSTATUS($C0000136);
+ {$EXTERNALSYM STATUS_OPEN_FAILED}
+
+//
+// MessageId: STATUS_IO_PRIVILEGE_FAILED
+//
+// MessageText:
+//
+// {Privilege Failed}
+// The I/O permissions for the process could not be changed.
+//
+
+ STATUS_IO_PRIVILEGE_FAILED = NTSTATUS($C0000137);
+ {$EXTERNALSYM STATUS_IO_PRIVILEGE_FAILED}
+
+//
+// MessageId: STATUS_ORDINAL_NOT_FOUND
+//
+// MessageText:
+//
+// {Ordinal Not Found}
+// The ordinal %ld could not be located in the dynamic link library %hs.
+//
+
+ STATUS_ORDINAL_NOT_FOUND = NTSTATUS($C0000138);
+ {$EXTERNALSYM STATUS_ORDINAL_NOT_FOUND}
+
+//
+// MessageId: STATUS_ENTRYPOINT_NOT_FOUND
+//
+// MessageText:
+//
+// {Entry Point Not Found}
+// The procedure entry point %hs could not be located in the dynamic link library %hs.
+//
+
+ STATUS_ENTRYPOINT_NOT_FOUND = NTSTATUS($C0000139);
+ {$EXTERNALSYM STATUS_ENTRYPOINT_NOT_FOUND}
+
+//
+// MessageId: STATUS_CONTROL_C_EXIT
+//
+// MessageText:
+//
+// {Application Exit by CTRL+C}
+// The application terminated as a result of a CTRL+C.
+//
+
+ STATUS_CONTROL_C_EXIT = NTSTATUS($C000013A); // winnt
+ {$EXTERNALSYM STATUS_CONTROL_C_EXIT}
+
+//
+// MessageId: STATUS_LOCAL_DISCONNECT
+//
+// MessageText:
+//
+// {Virtual Circuit Closed}
+// The network transport on your computer has closed a network connection. There may or may not be I/O requests outstanding.
+//
+
+ STATUS_LOCAL_DISCONNECT = NTSTATUS($C000013B);
+ {$EXTERNALSYM STATUS_LOCAL_DISCONNECT}
+
+//
+// MessageId: STATUS_REMOTE_DISCONNECT
+//
+// MessageText:
+//
+// {Virtual Circuit Closed}
+// The network transport on a remote computer has closed a network connection. There may or may not be I/O requests outstanding.
+//
+
+ STATUS_REMOTE_DISCONNECT = NTSTATUS($C000013C);
+ {$EXTERNALSYM STATUS_REMOTE_DISCONNECT}
+
+//
+// MessageId: STATUS_REMOTE_RESOURCES
+//
+// MessageText:
+//
+// {Insufficient Resources on Remote Computer}
+// The remote computer has insufficient resources to complete the network request. For instance, there may not be enough memory available on the remote computer to carry out the request at this time.
+//
+
+ STATUS_REMOTE_RESOURCES = NTSTATUS($C000013D);
+ {$EXTERNALSYM STATUS_REMOTE_RESOURCES}
+
+//
+// MessageId: STATUS_LINK_FAILED
+//
+// MessageText:
+//
+// {Virtual Circuit Closed}
+// An existing connection (virtual circuit) has been broken at the remote computer. There is probably something wrong with the network software protocol or the network hardware on the remote computer.
+//
+
+ STATUS_LINK_FAILED = NTSTATUS($C000013E);
+ {$EXTERNALSYM STATUS_LINK_FAILED}
+
+//
+// MessageId: STATUS_LINK_TIMEOUT
+//
+// MessageText:
+//
+// {Virtual Circuit Closed}
+// The network transport on your computer has closed a network connection because it had to wait too long for a response from the remote computer.
+//
+
+ STATUS_LINK_TIMEOUT = NTSTATUS($C000013F);
+ {$EXTERNALSYM STATUS_LINK_TIMEOUT}
+
+//
+// MessageId: STATUS_INVALID_CONNECTION
+//
+// MessageText:
+//
+// The connection handle given to the transport was invalid.
+//
+
+ STATUS_INVALID_CONNECTION = NTSTATUS($C0000140);
+ {$EXTERNALSYM STATUS_INVALID_CONNECTION}
+
+//
+// MessageId: STATUS_INVALID_ADDRESS
+//
+// MessageText:
+//
+// The address handle given to the transport was invalid.
+//
+
+ STATUS_INVALID_ADDRESS = NTSTATUS($C0000141);
+ {$EXTERNALSYM STATUS_INVALID_ADDRESS}
+
+//
+// MessageId: STATUS_DLL_INIT_FAILED
+//
+// MessageText:
+//
+// {DLL Initialization Failed}
+// Initialization of the dynamic link library %hs failed. The process is terminating abnormally.
+//
+
+ STATUS_DLL_INIT_FAILED = NTSTATUS($C0000142);
+ {$EXTERNALSYM STATUS_DLL_INIT_FAILED}
+
+//
+// MessageId: STATUS_MISSING_SYSTEMFILE
+//
+// MessageText:
+//
+// {Missing System File}
+// The required system file %hs is bad or missing.
+//
+
+ STATUS_MISSING_SYSTEMFILE = NTSTATUS($C0000143);
+ {$EXTERNALSYM STATUS_MISSING_SYSTEMFILE}
+
+//
+// MessageId: STATUS_UNHANDLED_EXCEPTION
+//
+// MessageText:
+//
+// {Application Error}
+// The exception %s (0x%08lx) occurred in the application at location 0x%08lx.
+//
+
+ STATUS_UNHANDLED_EXCEPTION = NTSTATUS($C0000144);
+ {$EXTERNALSYM STATUS_UNHANDLED_EXCEPTION}
+
+//
+// MessageId: STATUS_APP_INIT_FAILURE
+//
+// MessageText:
+//
+// {Application Error}
+// The application failed to initialize properly (0x%lx). Click on OK to terminate the application.
+//
+
+ STATUS_APP_INIT_FAILURE = NTSTATUS($C0000145);
+ {$EXTERNALSYM STATUS_APP_INIT_FAILURE}
+
+//
+// MessageId: STATUS_PAGEFILE_CREATE_FAILED
+//
+// MessageText:
+//
+// {Unable to Create Paging File}
+// The creation of the paging file %hs failed (%lx). The requested size was %ld.
+//
+
+ STATUS_PAGEFILE_CREATE_FAILED = NTSTATUS($C0000146);
+ {$EXTERNALSYM STATUS_PAGEFILE_CREATE_FAILED}
+
+//
+// MessageId: STATUS_NO_PAGEFILE
+//
+// MessageText:
+//
+// {No Paging File Specified}
+// No paging file was specified in the system configuration.
+//
+
+ STATUS_NO_PAGEFILE = NTSTATUS($C0000147);
+ {$EXTERNALSYM STATUS_NO_PAGEFILE}
+
+//
+// MessageId: STATUS_INVALID_LEVEL
+//
+// MessageText:
+//
+// {Incorrect System Call Level}
+// An invalid level was passed into the specified system call.
+//
+
+ STATUS_INVALID_LEVEL = NTSTATUS($C0000148);
+ {$EXTERNALSYM STATUS_INVALID_LEVEL}
+
+//
+// MessageId: STATUS_WRONG_PASSWORD_CORE
+//
+// MessageText:
+//
+// {Incorrect Password to LAN Manager Server}
+// You specified an incorrect password to a LAN Manager 2.x or MS-NET server.
+//
+
+ STATUS_WRONG_PASSWORD_CORE = NTSTATUS($C0000149);
+ {$EXTERNALSYM STATUS_WRONG_PASSWORD_CORE}
+
+//
+// MessageId: STATUS_ILLEGAL_FLOAT_CONTEXT
+//
+// MessageText:
+//
+// {EXCEPTION}
+// A real-mode application issued a floating-point instruction and floating-point hardware is not present.
+//
+
+ STATUS_ILLEGAL_FLOAT_CONTEXT = NTSTATUS($C000014A);
+ {$EXTERNALSYM STATUS_ILLEGAL_FLOAT_CONTEXT}
+
+//
+// MessageId: STATUS_PIPE_BROKEN
+//
+// MessageText:
+//
+// The pipe operation has failed because the other end of the pipe has been closed.
+//
+
+ STATUS_PIPE_BROKEN = NTSTATUS($C000014B);
+ {$EXTERNALSYM STATUS_PIPE_BROKEN}
+
+//
+// MessageId: STATUS_REGISTRY_CORRUPT
+//
+// MessageText:
+//
+// {The Registry Is Corrupt}
+// The structure of one of the files that contains Registry data is corrupt, or the image of the file in memory is corrupt, or the file could not be recovered because the alternate copy or log was absent or corrupt.
+//
+
+ STATUS_REGISTRY_CORRUPT = NTSTATUS($C000014C);
+ {$EXTERNALSYM STATUS_REGISTRY_CORRUPT}
+
+//
+// MessageId: STATUS_REGISTRY_IO_FAILED
+//
+// MessageText:
+//
+// An I/O operation initiated by the Registry failed unrecoverably.
+// The Registry could not read in, or write out, or flush, one of the files that contain the system's image of the Registry.
+//
+
+ STATUS_REGISTRY_IO_FAILED = NTSTATUS($C000014D);
+ {$EXTERNALSYM STATUS_REGISTRY_IO_FAILED}
+
+//
+// MessageId: STATUS_NO_EVENT_PAIR
+//
+// MessageText:
+//
+// An event pair synchronization operation was performed using the thread specific client/server event pair object, but no event pair object was associated with the thread.
+//
+
+ STATUS_NO_EVENT_PAIR = NTSTATUS($C000014E);
+ {$EXTERNALSYM STATUS_NO_EVENT_PAIR}
+
+//
+// MessageId: STATUS_UNRECOGNIZED_VOLUME
+//
+// MessageText:
+//
+// The volume does not contain a recognized file system.
+// Please make sure that all required file system drivers are loaded and that the volume is not corrupt.
+//
+
+ STATUS_UNRECOGNIZED_VOLUME = NTSTATUS($C000014F);
+ {$EXTERNALSYM STATUS_UNRECOGNIZED_VOLUME}
+
+//
+// MessageId: STATUS_SERIAL_NO_DEVICE_INITED
+//
+// MessageText:
+//
+// No serial device was successfully initialized. The serial driver will unload.
+//
+
+ STATUS_SERIAL_NO_DEVICE_INITED = NTSTATUS($C0000150);
+ {$EXTERNALSYM STATUS_SERIAL_NO_DEVICE_INITED}
+
+//
+// MessageId: STATUS_NO_SUCH_ALIAS
+//
+// MessageText:
+//
+// The specified local group does not exist.
+//
+
+ STATUS_NO_SUCH_ALIAS = NTSTATUS($C0000151);
+ {$EXTERNALSYM STATUS_NO_SUCH_ALIAS}
+
+//
+// MessageId: STATUS_MEMBER_NOT_IN_ALIAS
+//
+// MessageText:
+//
+// The specified account name is not a member of the local group.
+//
+
+ STATUS_MEMBER_NOT_IN_ALIAS = NTSTATUS($C0000152);
+ {$EXTERNALSYM STATUS_MEMBER_NOT_IN_ALIAS}
+
+//
+// MessageId: STATUS_MEMBER_IN_ALIAS
+//
+// MessageText:
+//
+// The specified account name is already a member of the local group.
+//
+
+ STATUS_MEMBER_IN_ALIAS = NTSTATUS($C0000153);
+ {$EXTERNALSYM STATUS_MEMBER_IN_ALIAS}
+
+//
+// MessageId: STATUS_ALIAS_EXISTS
+//
+// MessageText:
+//
+// The specified local group already exists.
+//
+
+ STATUS_ALIAS_EXISTS = NTSTATUS($C0000154);
+ {$EXTERNALSYM STATUS_ALIAS_EXISTS}
+
+//
+// MessageId: STATUS_LOGON_NOT_GRANTED
+//
+// MessageText:
+//
+// A requested type of logon (e.g., Interactive, Network, Service) is not granted by the target system's local security policy.
+// Please ask the system administrator to grant the necessary form of logon.
+//
+
+ STATUS_LOGON_NOT_GRANTED = NTSTATUS($C0000155);
+ {$EXTERNALSYM STATUS_LOGON_NOT_GRANTED}
+
+//
+// MessageId: STATUS_TOO_MANY_SECRETS
+//
+// MessageText:
+//
+// The maximum number of secrets that may be stored in a single system has been exceeded. The length and number of secrets is limited to satisfy United States State Department export restrictions.
+//
+
+ STATUS_TOO_MANY_SECRETS = NTSTATUS($C0000156);
+ {$EXTERNALSYM STATUS_TOO_MANY_SECRETS}
+
+//
+// MessageId: STATUS_SECRET_TOO_LONG
+//
+// MessageText:
+//
+// The length of a secret exceeds the maximum length allowed. The length and number of secrets is limited to satisfy United States State Department export restrictions.
+//
+
+ STATUS_SECRET_TOO_LONG = NTSTATUS($C0000157);
+ {$EXTERNALSYM STATUS_SECRET_TOO_LONG}
+
+//
+// MessageId: STATUS_INTERNAL_DB_ERROR
+//
+// MessageText:
+//
+// The Local Security Authority (LSA) database contains an internal inconsistency.
+//
+
+ STATUS_INTERNAL_DB_ERROR = NTSTATUS($C0000158);
+ {$EXTERNALSYM STATUS_INTERNAL_DB_ERROR}
+
+//
+// MessageId: STATUS_FULLSCREEN_MODE
+//
+// MessageText:
+//
+// The requested operation cannot be performed in fullscreen mode.
+//
+
+ STATUS_FULLSCREEN_MODE = NTSTATUS($C0000159);
+ {$EXTERNALSYM STATUS_FULLSCREEN_MODE}
+
+//
+// MessageId: STATUS_TOO_MANY_CONTEXT_IDS
+//
+// MessageText:
+//
+// During a logon attempt, the user's security context accumulated too many security IDs. This is a very unusual situation.
+// Remove the user from some global or local groups to reduce the number of security ids to incorporate into the security context.
+//
+
+ STATUS_TOO_MANY_CONTEXT_IDS = NTSTATUS($C000015A);
+ {$EXTERNALSYM STATUS_TOO_MANY_CONTEXT_IDS}
+
+//
+// MessageId: STATUS_LOGON_TYPE_NOT_GRANTED
+//
+// MessageText:
+//
+// A user has requested a type of logon (e.g., interactive or network) that has not been granted. An administrator has control over who may logon interactively and through the network.
+//
+
+ STATUS_LOGON_TYPE_NOT_GRANTED = NTSTATUS($C000015B);
+ {$EXTERNALSYM STATUS_LOGON_TYPE_NOT_GRANTED}
+
+//
+// MessageId: STATUS_NOT_REGISTRY_FILE
+//
+// MessageText:
+//
+// The system has attempted to load or restore a file into the registry, and the specified file is not in the format of a registry file.
+//
+
+ STATUS_NOT_REGISTRY_FILE = NTSTATUS($C000015C);
+ {$EXTERNALSYM STATUS_NOT_REGISTRY_FILE}
+
+//
+// MessageId: STATUS_NT_CROSS_ENCRYPTION_REQUIRED
+//
+// MessageText:
+//
+// An attempt was made to change a user password in the security account manager without providing the necessary Windows cross-encrypted password.
+//
+
+ STATUS_NT_CROSS_ENCRYPTION_REQUIRED = NTSTATUS($C000015D);
+ {$EXTERNALSYM STATUS_NT_CROSS_ENCRYPTION_REQUIRED}
+
+//
+// MessageId: STATUS_DOMAIN_CTRLR_CONFIG_ERROR
+//
+// MessageText:
+//
+// A Windows Server has an incorrect configuration.
+//
+
+ STATUS_DOMAIN_CTRLR_CONFIG_ERROR = NTSTATUS($C000015E);
+ {$EXTERNALSYM STATUS_DOMAIN_CTRLR_CONFIG_ERROR}
+
+//
+// MessageId: STATUS_FT_MISSING_MEMBER
+//
+// MessageText:
+//
+// An attempt was made to explicitly access the secondary copy of information via a device control to the Fault Tolerance driver and the secondary copy is not present in the system.
+//
+
+ STATUS_FT_MISSING_MEMBER = NTSTATUS($C000015F);
+ {$EXTERNALSYM STATUS_FT_MISSING_MEMBER}
+
+//
+// MessageId: STATUS_ILL_FORMED_SERVICE_ENTRY
+//
+// MessageText:
+//
+// A configuration registry node representing a driver service entry was ill-formed and did not contain required value entries.
+//
+
+ STATUS_ILL_FORMED_SERVICE_ENTRY = NTSTATUS($C0000160);
+ {$EXTERNALSYM STATUS_ILL_FORMED_SERVICE_ENTRY}
+
+//
+// MessageId: STATUS_ILLEGAL_CHARACTER
+//
+// MessageText:
+//
+// An illegal character was encountered. For a multi-byte character set this includes a lead byte without a succeeding trail byte. For the Unicode character set this includes the characters 0xFFFF and 0xFFFE.
+//
+
+ STATUS_ILLEGAL_CHARACTER = NTSTATUS($C0000161);
+ {$EXTERNALSYM STATUS_ILLEGAL_CHARACTER}
+
+//
+// MessageId: STATUS_UNMAPPABLE_CHARACTER
+//
+// MessageText:
+//
+// No mapping for the Unicode character exists in the target multi-byte code page.
+//
+
+ STATUS_UNMAPPABLE_CHARACTER = NTSTATUS($C0000162);
+ {$EXTERNALSYM STATUS_UNMAPPABLE_CHARACTER}
+
+//
+// MessageId: STATUS_UNDEFINED_CHARACTER
+//
+// MessageText:
+//
+// The Unicode character is not defined in the Unicode character set installed on the system.
+//
+
+ STATUS_UNDEFINED_CHARACTER = NTSTATUS($C0000163);
+ {$EXTERNALSYM STATUS_UNDEFINED_CHARACTER}
+
+//
+// MessageId: STATUS_FLOPPY_VOLUME
+//
+// MessageText:
+//
+// The paging file cannot be created on a floppy diskette.
+//
+
+ STATUS_FLOPPY_VOLUME = NTSTATUS($C0000164);
+ {$EXTERNALSYM STATUS_FLOPPY_VOLUME}
+
+//
+// MessageId: STATUS_FLOPPY_ID_MARK_NOT_FOUND
+//
+// MessageText:
+//
+// {Floppy Disk Error}
+// While accessing a floppy disk, an ID address mark was not found.
+//
+
+ STATUS_FLOPPY_ID_MARK_NOT_FOUND = NTSTATUS($C0000165);
+ {$EXTERNALSYM STATUS_FLOPPY_ID_MARK_NOT_FOUND}
+
+//
+// MessageId: STATUS_FLOPPY_WRONG_CYLINDER
+//
+// MessageText:
+//
+// {Floppy Disk Error}
+// While accessing a floppy disk, the track address from the sector ID field was found to be different than the track address maintained by the controller.
+//
+
+ STATUS_FLOPPY_WRONG_CYLINDER = NTSTATUS($C0000166);
+ {$EXTERNALSYM STATUS_FLOPPY_WRONG_CYLINDER}
+
+//
+// MessageId: STATUS_FLOPPY_UNKNOWN_ERROR
+//
+// MessageText:
+//
+// {Floppy Disk Error}
+// The floppy disk controller reported an error that is not recognized by the floppy disk driver.
+//
+
+ STATUS_FLOPPY_UNKNOWN_ERROR = NTSTATUS($C0000167);
+ {$EXTERNALSYM STATUS_FLOPPY_UNKNOWN_ERROR}
+
+//
+// MessageId: STATUS_FLOPPY_BAD_REGISTERS
+//
+// MessageText:
+//
+// {Floppy Disk Error}
+// While accessing a floppy-disk, the controller returned inconsistent results via its registers.
+//
+
+ STATUS_FLOPPY_BAD_REGISTERS = NTSTATUS($C0000168);
+ {$EXTERNALSYM STATUS_FLOPPY_BAD_REGISTERS}
+
+//
+// MessageId: STATUS_DISK_RECALIBRATE_FAILED
+//
+// MessageText:
+//
+// {Hard Disk Error}
+// While accessing the hard disk, a recalibrate operation failed, even after retries.
+//
+
+ STATUS_DISK_RECALIBRATE_FAILED = NTSTATUS($C0000169);
+ {$EXTERNALSYM STATUS_DISK_RECALIBRATE_FAILED}
+
+//
+// MessageId: STATUS_DISK_OPERATION_FAILED
+//
+// MessageText:
+//
+// {Hard Disk Error}
+// While accessing the hard disk, a disk operation failed even after retries.
+//
+
+ STATUS_DISK_OPERATION_FAILED = NTSTATUS($C000016A);
+ {$EXTERNALSYM STATUS_DISK_OPERATION_FAILED}
+
+//
+// MessageId: STATUS_DISK_RESET_FAILED
+//
+// MessageText:
+//
+// {Hard Disk Error}
+// While accessing the hard disk, a disk controller reset was needed, but even that failed.
+//
+
+ STATUS_DISK_RESET_FAILED = NTSTATUS($C000016B);
+ {$EXTERNALSYM STATUS_DISK_RESET_FAILED}
+
+//
+// MessageId: STATUS_SHARED_IRQ_BUSY
+//
+// MessageText:
+//
+// An attempt was made to open a device that was sharing an IRQ with other devices.
+// At least one other device that uses that IRQ was already opened.
+// Two concurrent opens of devices that share an IRQ and only work via interrupts is not supported for the particular bus type that the devices use.
+//
+
+ STATUS_SHARED_IRQ_BUSY = NTSTATUS($C000016C);
+ {$EXTERNALSYM STATUS_SHARED_IRQ_BUSY}
+
+//
+// MessageId: STATUS_FT_ORPHANING
+//
+// MessageText:
+//
+// {FT Orphaning}
+// A disk that is part of a fault-tolerant volume can no longer be accessed.
+//
+
+ STATUS_FT_ORPHANING = NTSTATUS($C000016D);
+ {$EXTERNALSYM STATUS_FT_ORPHANING}
+
+//
+// MessageId: STATUS_BIOS_FAILED_TO_CONNECT_INTERRUPT
+//
+// MessageText:
+//
+// The system bios failed to connect a system interrupt to the device or bus for
+// which the device is connected.
+//
+
+ STATUS_BIOS_FAILED_TO_CONNECT_INTERRUPT = NTSTATUS($C000016E);
+ {$EXTERNALSYM STATUS_BIOS_FAILED_TO_CONNECT_INTERRUPT}
+
+//
+// MessageId: STATUS_PARTITION_FAILURE
+//
+// MessageText:
+//
+// Tape could not be partitioned.
+//
+
+ STATUS_PARTITION_FAILURE = NTSTATUS($C0000172);
+ {$EXTERNALSYM STATUS_PARTITION_FAILURE}
+
+//
+// MessageId: STATUS_INVALID_BLOCK_LENGTH
+//
+// MessageText:
+//
+// When accessing a new tape of a multivolume partition, the current blocksize is incorrect.
+//
+
+ STATUS_INVALID_BLOCK_LENGTH = NTSTATUS($C0000173);
+ {$EXTERNALSYM STATUS_INVALID_BLOCK_LENGTH}
+
+//
+// MessageId: STATUS_DEVICE_NOT_PARTITIONED
+//
+// MessageText:
+//
+// Tape partition information could not be found when loading a tape.
+//
+
+ STATUS_DEVICE_NOT_PARTITIONED = NTSTATUS($C0000174);
+ {$EXTERNALSYM STATUS_DEVICE_NOT_PARTITIONED}
+
+//
+// MessageId: STATUS_UNABLE_TO_LOCK_MEDIA
+//
+// MessageText:
+//
+// Attempt to lock the eject media mechanism fails.
+//
+
+ STATUS_UNABLE_TO_LOCK_MEDIA = NTSTATUS($C0000175);
+ {$EXTERNALSYM STATUS_UNABLE_TO_LOCK_MEDIA}
+
+//
+// MessageId: STATUS_UNABLE_TO_UNLOAD_MEDIA
+//
+// MessageText:
+//
+// Unload media fails.
+//
+
+ STATUS_UNABLE_TO_UNLOAD_MEDIA = NTSTATUS($C0000176);
+ {$EXTERNALSYM STATUS_UNABLE_TO_UNLOAD_MEDIA}
+
+//
+// MessageId: STATUS_EOM_OVERFLOW
+//
+// MessageText:
+//
+// Physical end of tape was detected.
+//
+
+ STATUS_EOM_OVERFLOW = NTSTATUS($C0000177);
+ {$EXTERNALSYM STATUS_EOM_OVERFLOW}
+
+//
+// MessageId: STATUS_NO_MEDIA
+//
+// MessageText:
+//
+// {No Media}
+// There is no media in the drive.
+// Please insert media into drive %hs.
+//
+
+ STATUS_NO_MEDIA = NTSTATUS($C0000178);
+ {$EXTERNALSYM STATUS_NO_MEDIA}
+
+//
+// MessageId: STATUS_NO_SUCH_MEMBER
+//
+// MessageText:
+//
+// A member could not be added to or removed from the local group because the member does not exist.
+//
+
+ STATUS_NO_SUCH_MEMBER = NTSTATUS($C000017A);
+ {$EXTERNALSYM STATUS_NO_SUCH_MEMBER}
+
+//
+// MessageId: STATUS_INVALID_MEMBER
+//
+// MessageText:
+//
+// A new member could not be added to a local group because the member has the wrong account type.
+//
+
+ STATUS_INVALID_MEMBER = NTSTATUS($C000017B);
+ {$EXTERNALSYM STATUS_INVALID_MEMBER}
+
+//
+// MessageId: STATUS_KEY_DELETED
+//
+// MessageText:
+//
+// Illegal operation attempted on a registry key which has been marked for deletion.
+//
+
+ STATUS_KEY_DELETED = NTSTATUS($C000017C);
+ {$EXTERNALSYM STATUS_KEY_DELETED}
+
+//
+// MessageId: STATUS_NO_LOG_SPACE
+//
+// MessageText:
+//
+// System could not allocate required space in a registry log.
+//
+
+ STATUS_NO_LOG_SPACE = NTSTATUS($C000017D);
+ {$EXTERNALSYM STATUS_NO_LOG_SPACE}
+
+//
+// MessageId: STATUS_TOO_MANY_SIDS
+//
+// MessageText:
+//
+// Too many Sids have been specified.
+//
+
+ STATUS_TOO_MANY_SIDS = NTSTATUS($C000017E);
+ {$EXTERNALSYM STATUS_TOO_MANY_SIDS}
+
+//
+// MessageId: STATUS_LM_CROSS_ENCRYPTION_REQUIRED
+//
+// MessageText:
+//
+// An attempt was made to change a user password in the security account manager without providing the necessary LM cross-encrypted password.
+//
+
+ STATUS_LM_CROSS_ENCRYPTION_REQUIRED = NTSTATUS($C000017F);
+ {$EXTERNALSYM STATUS_LM_CROSS_ENCRYPTION_REQUIRED}
+
+//
+// MessageId: STATUS_KEY_HAS_CHILDREN
+//
+// MessageText:
+//
+// An attempt was made to create a symbolic link in a registry key that already has subkeys or values.
+//
+
+ STATUS_KEY_HAS_CHILDREN = NTSTATUS($C0000180);
+ {$EXTERNALSYM STATUS_KEY_HAS_CHILDREN}
+
+//
+// MessageId: STATUS_CHILD_MUST_BE_VOLATILE
+//
+// MessageText:
+//
+// An attempt was made to create a Stable subkey under a Volatile parent key.
+//
+
+ STATUS_CHILD_MUST_BE_VOLATILE = NTSTATUS($C0000181);
+ {$EXTERNALSYM STATUS_CHILD_MUST_BE_VOLATILE}
+
+//
+// MessageId: STATUS_DEVICE_CONFIGURATION_ERROR
+//
+// MessageText:
+//
+// The I/O device is configured incorrectly or the configuration parameters to the driver are incorrect.
+//
+
+ STATUS_DEVICE_CONFIGURATION_ERROR = NTSTATUS($C0000182);
+ {$EXTERNALSYM STATUS_DEVICE_CONFIGURATION_ERROR}
+
+//
+// MessageId: STATUS_DRIVER_INTERNAL_ERROR
+//
+// MessageText:
+//
+// An error was detected between two drivers or within an I/O driver.
+//
+
+ STATUS_DRIVER_INTERNAL_ERROR = NTSTATUS($C0000183);
+ {$EXTERNALSYM STATUS_DRIVER_INTERNAL_ERROR}
+
+//
+// MessageId: STATUS_INVALID_DEVICE_STATE
+//
+// MessageText:
+//
+// The device is not in a valid state to perform this request.
+//
+
+ STATUS_INVALID_DEVICE_STATE = NTSTATUS($C0000184);
+ {$EXTERNALSYM STATUS_INVALID_DEVICE_STATE}
+
+//
+// MessageId: STATUS_IO_DEVICE_ERROR
+//
+// MessageText:
+//
+// The I/O device reported an I/O error.
+//
+
+ STATUS_IO_DEVICE_ERROR = NTSTATUS($C0000185);
+ {$EXTERNALSYM STATUS_IO_DEVICE_ERROR}
+
+//
+// MessageId: STATUS_DEVICE_PROTOCOL_ERROR
+//
+// MessageText:
+//
+// A protocol error was detected between the driver and the device.
+//
+
+ STATUS_DEVICE_PROTOCOL_ERROR = NTSTATUS($C0000186);
+ {$EXTERNALSYM STATUS_DEVICE_PROTOCOL_ERROR}
+
+//
+// MessageId: STATUS_BACKUP_CONTROLLER
+//
+// MessageText:
+//
+// This operation is only allowed for the Primary Domain Controller of the domain.
+//
+
+ STATUS_BACKUP_CONTROLLER = NTSTATUS($C0000187);
+ {$EXTERNALSYM STATUS_BACKUP_CONTROLLER}
+
+//
+// MessageId: STATUS_LOG_FILE_FULL
+//
+// MessageText:
+//
+// Log file space is insufficient to support this operation.
+//
+
+ STATUS_LOG_FILE_FULL = NTSTATUS($C0000188);
+ {$EXTERNALSYM STATUS_LOG_FILE_FULL}
+
+//
+// MessageId: STATUS_TOO_LATE
+//
+// MessageText:
+//
+// A write operation was attempted to a volume after it was dismounted.
+//
+
+ STATUS_TOO_LATE = NTSTATUS($C0000189);
+ {$EXTERNALSYM STATUS_TOO_LATE}
+
+//
+// MessageId: STATUS_NO_TRUST_LSA_SECRET
+//
+// MessageText:
+//
+// The workstation does not have a trust secret for the primary domain in the local LSA database.
+//
+
+ STATUS_NO_TRUST_LSA_SECRET = NTSTATUS($C000018A);
+ {$EXTERNALSYM STATUS_NO_TRUST_LSA_SECRET}
+
+//
+// MessageId: STATUS_NO_TRUST_SAM_ACCOUNT
+//
+// MessageText:
+//
+// The SAM database on the Windows Server does not have a computer account for this workstation trust relationship.
+//
+
+ STATUS_NO_TRUST_SAM_ACCOUNT = NTSTATUS($C000018B);
+ {$EXTERNALSYM STATUS_NO_TRUST_SAM_ACCOUNT}
+
+//
+// MessageId: STATUS_TRUSTED_DOMAIN_FAILURE
+//
+// MessageText:
+//
+// The logon request failed because the trust relationship between the primary domain and the trusted domain failed.
+//
+
+ STATUS_TRUSTED_DOMAIN_FAILURE = NTSTATUS($C000018C);
+ {$EXTERNALSYM STATUS_TRUSTED_DOMAIN_FAILURE}
+
+//
+// MessageId: STATUS_TRUSTED_RELATIONSHIP_FAILURE
+//
+// MessageText:
+//
+// The logon request failed because the trust relationship between this workstation and the primary domain failed.
+//
+
+ STATUS_TRUSTED_RELATIONSHIP_FAILURE = NTSTATUS($C000018D);
+ {$EXTERNALSYM STATUS_TRUSTED_RELATIONSHIP_FAILURE}
+
+//
+// MessageId: STATUS_EVENTLOG_FILE_CORRUPT
+//
+// MessageText:
+//
+// The Eventlog log file is corrupt.
+//
+
+ STATUS_EVENTLOG_FILE_CORRUPT = NTSTATUS($C000018E);
+ {$EXTERNALSYM STATUS_EVENTLOG_FILE_CORRUPT}
+
+//
+// MessageId: STATUS_EVENTLOG_CANT_START
+//
+// MessageText:
+//
+// No Eventlog log file could be opened. The Eventlog service did not start.
+//
+
+ STATUS_EVENTLOG_CANT_START = NTSTATUS($C000018F);
+ {$EXTERNALSYM STATUS_EVENTLOG_CANT_START}
+
+//
+// MessageId: STATUS_TRUST_FAILURE
+//
+// MessageText:
+//
+// The network logon failed. This may be because the validation authority can't be reached.
+//
+
+ STATUS_TRUST_FAILURE = NTSTATUS($C0000190);
+ {$EXTERNALSYM STATUS_TRUST_FAILURE}
+
+//
+// MessageId: STATUS_MUTANT_LIMIT_EXCEEDED
+//
+// MessageText:
+//
+// An attempt was made to acquire a mutant such that its maximum count would have been exceeded.
+//
+
+ STATUS_MUTANT_LIMIT_EXCEEDED = NTSTATUS($C0000191);
+ {$EXTERNALSYM STATUS_MUTANT_LIMIT_EXCEEDED}
+
+//
+// MessageId: STATUS_NETLOGON_NOT_STARTED
+//
+// MessageText:
+//
+// An attempt was made to logon, but the netlogon service was not started.
+//
+
+ STATUS_NETLOGON_NOT_STARTED = NTSTATUS($C0000192);
+ {$EXTERNALSYM STATUS_NETLOGON_NOT_STARTED}
+
+//
+// MessageId: STATUS_ACCOUNT_EXPIRED
+//
+// MessageText:
+//
+// The user's account has expired.
+//
+
+ STATUS_ACCOUNT_EXPIRED = NTSTATUS($C0000193); // ntsubauth
+ {$EXTERNALSYM STATUS_ACCOUNT_EXPIRED}
+
+//
+// MessageId: STATUS_POSSIBLE_DEADLOCK
+//
+// MessageText:
+//
+// {EXCEPTION}
+// Possible deadlock condition.
+//
+
+ STATUS_POSSIBLE_DEADLOCK = NTSTATUS($C0000194);
+ {$EXTERNALSYM STATUS_POSSIBLE_DEADLOCK}
+
+//
+// MessageId: STATUS_NETWORK_CREDENTIAL_CONFLICT
+//
+// MessageText:
+//
+// The credentials supplied conflict with an existing set of credentials.
+//
+
+ STATUS_NETWORK_CREDENTIAL_CONFLICT = NTSTATUS($C0000195);
+ {$EXTERNALSYM STATUS_NETWORK_CREDENTIAL_CONFLICT}
+
+//
+// MessageId: STATUS_REMOTE_SESSION_LIMIT
+//
+// MessageText:
+//
+// An attempt was made to establish a session to a network server, but there are already too many sessions established to that server.
+//
+
+ STATUS_REMOTE_SESSION_LIMIT = NTSTATUS($C0000196);
+ {$EXTERNALSYM STATUS_REMOTE_SESSION_LIMIT}
+
+//
+// MessageId: STATUS_EVENTLOG_FILE_CHANGED
+//
+// MessageText:
+//
+// The log file has changed between reads.
+//
+
+ STATUS_EVENTLOG_FILE_CHANGED = NTSTATUS($C0000197);
+ {$EXTERNALSYM STATUS_EVENTLOG_FILE_CHANGED}
+
+//
+// MessageId: STATUS_NOLOGON_INTERDOMAIN_TRUST_ACCOUNT
+//
+// MessageText:
+//
+// The account used is an Interdomain Trust account. Use your global user account or local user account to access this server.
+//
+
+ STATUS_NOLOGON_INTERDOMAIN_TRUST_ACCOUNT = NTSTATUS($C0000198);
+ {$EXTERNALSYM STATUS_NOLOGON_INTERDOMAIN_TRUST_ACCOUNT}
+
+//
+// MessageId: STATUS_NOLOGON_WORKSTATION_TRUST_ACCOUNT
+//
+// MessageText:
+//
+// The account used is a Computer Account. Use your global user account or local user account to access this server.
+//
+
+ STATUS_NOLOGON_WORKSTATION_TRUST_ACCOUNT = NTSTATUS($C0000199);
+ {$EXTERNALSYM STATUS_NOLOGON_WORKSTATION_TRUST_ACCOUNT}
+
+//
+// MessageId: STATUS_NOLOGON_SERVER_TRUST_ACCOUNT
+//
+// MessageText:
+//
+// The account used is an Server Trust account. Use your global user account or local user account to access this server.
+//
+
+ STATUS_NOLOGON_SERVER_TRUST_ACCOUNT = NTSTATUS($C000019A);
+ {$EXTERNALSYM STATUS_NOLOGON_SERVER_TRUST_ACCOUNT}
+
+//
+// MessageId: STATUS_DOMAIN_TRUST_INCONSISTENT
+//
+// MessageText:
+//
+// The name or SID of the domain specified is inconsistent with the trust information for that domain.
+//
+
+ STATUS_DOMAIN_TRUST_INCONSISTENT = NTSTATUS($C000019B);
+ {$EXTERNALSYM STATUS_DOMAIN_TRUST_INCONSISTENT}
+
+//
+// MessageId: STATUS_FS_DRIVER_REQUIRED
+//
+// MessageText:
+//
+// A volume has been accessed for which a file system driver is required that has not yet been loaded.
+//
+
+ STATUS_FS_DRIVER_REQUIRED = NTSTATUS($C000019C);
+ {$EXTERNALSYM STATUS_FS_DRIVER_REQUIRED}
+
+//
+// MessageId: STATUS_NO_USER_SESSION_KEY
+//
+// MessageText:
+//
+// There is no user session key for the specified logon session.
+//
+
+ STATUS_NO_USER_SESSION_KEY = NTSTATUS($C0000202);
+ {$EXTERNALSYM STATUS_NO_USER_SESSION_KEY}
+
+//
+// MessageId: STATUS_USER_SESSION_DELETED
+//
+// MessageText:
+//
+// The remote user session has been deleted.
+//
+
+ STATUS_USER_SESSION_DELETED = NTSTATUS($C0000203);
+ {$EXTERNALSYM STATUS_USER_SESSION_DELETED}
+
+//
+// MessageId: STATUS_RESOURCE_LANG_NOT_FOUND
+//
+// MessageText:
+//
+// Indicates the specified resource language ID cannot be found in the
+// image file.
+//
+
+ STATUS_RESOURCE_LANG_NOT_FOUND = NTSTATUS($C0000204);
+ {$EXTERNALSYM STATUS_RESOURCE_LANG_NOT_FOUND}
+
+//
+// MessageId: STATUS_INSUFF_SERVER_RESOURCES
+//
+// MessageText:
+//
+// Insufficient server resources exist to complete the request.
+//
+
+ STATUS_INSUFF_SERVER_RESOURCES = NTSTATUS($C0000205);
+ {$EXTERNALSYM STATUS_INSUFF_SERVER_RESOURCES}
+
+//
+// MessageId: STATUS_INVALID_BUFFER_SIZE
+//
+// MessageText:
+//
+// The size of the buffer is invalid for the specified operation.
+//
+
+ STATUS_INVALID_BUFFER_SIZE = NTSTATUS($C0000206);
+ {$EXTERNALSYM STATUS_INVALID_BUFFER_SIZE}
+
+//
+// MessageId: STATUS_INVALID_ADDRESS_COMPONENT
+//
+// MessageText:
+//
+// The transport rejected the network address specified as invalid.
+//
+
+ STATUS_INVALID_ADDRESS_COMPONENT = NTSTATUS($C0000207);
+ {$EXTERNALSYM STATUS_INVALID_ADDRESS_COMPONENT}
+
+//
+// MessageId: STATUS_INVALID_ADDRESS_WILDCARD
+//
+// MessageText:
+//
+// The transport rejected the network address specified due to an
+// invalid use of a wildcard.
+//
+
+ STATUS_INVALID_ADDRESS_WILDCARD = NTSTATUS($C0000208);
+ {$EXTERNALSYM STATUS_INVALID_ADDRESS_WILDCARD}
+
+//
+// MessageId: STATUS_TOO_MANY_ADDRESSES
+//
+// MessageText:
+//
+// The transport address could not be opened because all the available
+// addresses are in use.
+//
+
+ STATUS_TOO_MANY_ADDRESSES = NTSTATUS($C0000209);
+ {$EXTERNALSYM STATUS_TOO_MANY_ADDRESSES}
+
+//
+// MessageId: STATUS_ADDRESS_ALREADY_EXISTS
+//
+// MessageText:
+//
+// The transport address could not be opened because it already exists.
+//
+
+ STATUS_ADDRESS_ALREADY_EXISTS = NTSTATUS($C000020A);
+ {$EXTERNALSYM STATUS_ADDRESS_ALREADY_EXISTS}
+
+//
+// MessageId: STATUS_ADDRESS_CLOSED
+//
+// MessageText:
+//
+// The transport address is now closed.
+//
+
+ STATUS_ADDRESS_CLOSED = NTSTATUS($C000020B);
+ {$EXTERNALSYM STATUS_ADDRESS_CLOSED}
+
+//
+// MessageId: STATUS_CONNECTION_DISCONNECTED
+//
+// MessageText:
+//
+// The transport connection is now disconnected.
+//
+
+ STATUS_CONNECTION_DISCONNECTED = NTSTATUS($C000020C);
+ {$EXTERNALSYM STATUS_CONNECTION_DISCONNECTED}
+
+//
+// MessageId: STATUS_CONNECTION_RESET
+//
+// MessageText:
+//
+// The transport connection has been reset.
+//
+
+ STATUS_CONNECTION_RESET = NTSTATUS($C000020D);
+ {$EXTERNALSYM STATUS_CONNECTION_RESET}
+
+//
+// MessageId: STATUS_TOO_MANY_NODES
+//
+// MessageText:
+//
+// The transport cannot dynamically acquire any more nodes.
+//
+
+ STATUS_TOO_MANY_NODES = NTSTATUS($C000020E);
+ {$EXTERNALSYM STATUS_TOO_MANY_NODES}
+
+//
+// MessageId: STATUS_TRANSACTION_ABORTED
+//
+// MessageText:
+//
+// The transport aborted a pending transaction.
+//
+
+ STATUS_TRANSACTION_ABORTED = NTSTATUS($C000020F);
+ {$EXTERNALSYM STATUS_TRANSACTION_ABORTED}
+
+//
+// MessageId: STATUS_TRANSACTION_TIMED_OUT
+//
+// MessageText:
+//
+// The transport timed out a request waiting for a response.
+//
+
+ STATUS_TRANSACTION_TIMED_OUT = NTSTATUS($C0000210);
+ {$EXTERNALSYM STATUS_TRANSACTION_TIMED_OUT}
+
+//
+// MessageId: STATUS_TRANSACTION_NO_RELEASE
+//
+// MessageText:
+//
+// The transport did not receive a release for a pending response.
+//
+
+ STATUS_TRANSACTION_NO_RELEASE = NTSTATUS($C0000211);
+ {$EXTERNALSYM STATUS_TRANSACTION_NO_RELEASE}
+
+//
+// MessageId: STATUS_TRANSACTION_NO_MATCH
+//
+// MessageText:
+//
+// The transport did not find a transaction matching the specific
+// token.
+//
+
+ STATUS_TRANSACTION_NO_MATCH = NTSTATUS($C0000212);
+ {$EXTERNALSYM STATUS_TRANSACTION_NO_MATCH}
+
+//
+// MessageId: STATUS_TRANSACTION_RESPONDED
+//
+// MessageText:
+//
+// The transport had previously responded to a transaction request.
+//
+
+ STATUS_TRANSACTION_RESPONDED = NTSTATUS($C0000213);
+ {$EXTERNALSYM STATUS_TRANSACTION_RESPONDED}
+
+//
+// MessageId: STATUS_TRANSACTION_INVALID_ID
+//
+// MessageText:
+//
+// The transport does not recognized the transaction request identifier specified.
+//
+
+ STATUS_TRANSACTION_INVALID_ID = NTSTATUS($C0000214);
+ {$EXTERNALSYM STATUS_TRANSACTION_INVALID_ID}
+
+//
+// MessageId: STATUS_TRANSACTION_INVALID_TYPE
+//
+// MessageText:
+//
+// The transport does not recognize the transaction request type specified.
+//
+
+ STATUS_TRANSACTION_INVALID_TYPE = NTSTATUS($C0000215);
+ {$EXTERNALSYM STATUS_TRANSACTION_INVALID_TYPE}
+
+//
+// MessageId: STATUS_NOT_SERVER_SESSION
+//
+// MessageText:
+//
+// The transport can only process the specified request on the server side of a session.
+//
+
+ STATUS_NOT_SERVER_SESSION = NTSTATUS($C0000216);
+ {$EXTERNALSYM STATUS_NOT_SERVER_SESSION}
+
+//
+// MessageId: STATUS_NOT_CLIENT_SESSION
+//
+// MessageText:
+//
+// The transport can only process the specified request on the client side of a session.
+//
+
+ STATUS_NOT_CLIENT_SESSION = NTSTATUS($C0000217);
+ {$EXTERNALSYM STATUS_NOT_CLIENT_SESSION}
+
+//
+// MessageId: STATUS_CANNOT_LOAD_REGISTRY_FILE
+//
+// MessageText:
+//
+// {Registry File Failure}
+// The registry cannot load the hive (file):
+// %hs
+// or its log or alternate.
+// It is corrupt, absent, or not writable.
+//
+
+ STATUS_CANNOT_LOAD_REGISTRY_FILE = NTSTATUS($C0000218);
+ {$EXTERNALSYM STATUS_CANNOT_LOAD_REGISTRY_FILE}
+
+//
+// MessageId: STATUS_DEBUG_ATTACH_FAILED
+//
+// MessageText:
+//
+// {Unexpected Failure in DebugActiveProcess}
+// An unexpected failure occurred while processing a DebugActiveProcess API request. You may choose OK to terminate the process, or Cancel to ignore the error.
+//
+
+ STATUS_DEBUG_ATTACH_FAILED = NTSTATUS($C0000219);
+ {$EXTERNALSYM STATUS_DEBUG_ATTACH_FAILED}
+
+//
+// MessageId: STATUS_SYSTEM_PROCESS_TERMINATED
+//
+// MessageText:
+//
+// {Fatal System Error}
+// The %hs system process terminated unexpectedly
+// with a status of 0x%08x (0x%08x 0x%08x).
+// The system has been shut down.
+//
+
+ STATUS_SYSTEM_PROCESS_TERMINATED = NTSTATUS($C000021A);
+ {$EXTERNALSYM STATUS_SYSTEM_PROCESS_TERMINATED}
+
+//
+// MessageId: STATUS_DATA_NOT_ACCEPTED
+//
+// MessageText:
+//
+// {Data Not Accepted}
+// The TDI client could not handle the data received during an indication.
+//
+
+ STATUS_DATA_NOT_ACCEPTED = NTSTATUS($C000021B);
+ {$EXTERNALSYM STATUS_DATA_NOT_ACCEPTED}
+
+//
+// MessageId: STATUS_NO_BROWSER_SERVERS_FOUND
+//
+// MessageText:
+//
+// {Unable to Retrieve Browser Server List}
+// The list of servers for this workgroup is not currently available.
+//
+
+ STATUS_NO_BROWSER_SERVERS_FOUND = NTSTATUS($C000021C);
+ {$EXTERNALSYM STATUS_NO_BROWSER_SERVERS_FOUND}
+
+//
+// MessageId: STATUS_VDM_HARD_ERROR
+//
+// MessageText:
+//
+// NTVDM encountered a hard error.
+//
+
+ STATUS_VDM_HARD_ERROR = NTSTATUS($C000021D);
+ {$EXTERNALSYM STATUS_VDM_HARD_ERROR}
+
+//
+// MessageId: STATUS_DRIVER_CANCEL_TIMEOUT
+//
+// MessageText:
+//
+// {Cancel Timeout}
+// The driver %hs failed to complete a cancelled I/O request in the allotted time.
+//
+
+ STATUS_DRIVER_CANCEL_TIMEOUT = NTSTATUS($C000021E);
+ {$EXTERNALSYM STATUS_DRIVER_CANCEL_TIMEOUT}
+
+//
+// MessageId: STATUS_REPLY_MESSAGE_MISMATCH
+//
+// MessageText:
+//
+// {Reply Message Mismatch}
+// An attempt was made to reply to an LPC message, but the thread specified by the client ID in the message was not waiting on that message.
+//
+
+ STATUS_REPLY_MESSAGE_MISMATCH = NTSTATUS($C000021F);
+ {$EXTERNALSYM STATUS_REPLY_MESSAGE_MISMATCH}
+
+//
+// MessageId: STATUS_MAPPED_ALIGNMENT
+//
+// MessageText:
+//
+// {Mapped View Alignment Incorrect}
+// An attempt was made to map a view of a file, but either the specified base address or the offset into the file were not aligned on the proper allocation granularity.
+//
+
+ STATUS_MAPPED_ALIGNMENT = NTSTATUS($C0000220);
+ {$EXTERNALSYM STATUS_MAPPED_ALIGNMENT}
+
+//
+// MessageId: STATUS_IMAGE_CHECKSUM_MISMATCH
+//
+// MessageText:
+//
+// {Bad Image Checksum}
+// The image %hs is possibly corrupt. The header checksum does not match the computed checksum.
+//
+
+ STATUS_IMAGE_CHECKSUM_MISMATCH = NTSTATUS($C0000221);
+ {$EXTERNALSYM STATUS_IMAGE_CHECKSUM_MISMATCH}
+
+//
+// MessageId: STATUS_LOST_WRITEBEHIND_DATA
+//
+// MessageText:
+//
+// {Delayed Write Failed}
+// Windows was unable to save all the data for the file %hs. The data has been lost.
+// This error may be caused by a failure of your computer hardware or network connection. Please try to save this file elsewhere.
+//
+
+ STATUS_LOST_WRITEBEHIND_DATA = NTSTATUS($C0000222);
+ {$EXTERNALSYM STATUS_LOST_WRITEBEHIND_DATA}
+
+//
+// MessageId: STATUS_CLIENT_SERVER_PARAMETERS_INVALID
+//
+// MessageText:
+//
+// The parameter(s) passed to the server in the client/server shared memory
+// window were invalid. Too much data may have been put in the shared memory window.
+//
+
+ STATUS_CLIENT_SERVER_PARAMETERS_INVALID = NTSTATUS($C0000223);
+ {$EXTERNALSYM STATUS_CLIENT_SERVER_PARAMETERS_INVALID}
+
+//
+// MessageId: STATUS_PASSWORD_MUST_CHANGE
+//
+// MessageText:
+//
+// The user's password must be changed before logging on the first time.
+//
+
+ STATUS_PASSWORD_MUST_CHANGE = NTSTATUS($C0000224); // ntsubauth
+ {$EXTERNALSYM STATUS_PASSWORD_MUST_CHANGE}
+
+//
+// MessageId: STATUS_NOT_FOUND
+//
+// MessageText:
+//
+// The object was not found.
+//
+
+ STATUS_NOT_FOUND = NTSTATUS($C0000225);
+ {$EXTERNALSYM STATUS_NOT_FOUND}
+
+//
+// MessageId: STATUS_NOT_TINY_STREAM
+//
+// MessageText:
+//
+// The stream is not a tiny stream.
+//
+
+ STATUS_NOT_TINY_STREAM = NTSTATUS($C0000226);
+ {$EXTERNALSYM STATUS_NOT_TINY_STREAM}
+
+//
+// MessageId: STATUS_RECOVERY_FAILURE
+//
+// MessageText:
+//
+// A transaction recover failed.
+//
+
+ STATUS_RECOVERY_FAILURE = NTSTATUS($C0000227);
+ {$EXTERNALSYM STATUS_RECOVERY_FAILURE}
+
+//
+// MessageId: STATUS_STACK_OVERFLOW_READ
+//
+// MessageText:
+//
+// The request must be handled by the stack overflow code.
+//
+
+ STATUS_STACK_OVERFLOW_READ = NTSTATUS($C0000228);
+ {$EXTERNALSYM STATUS_STACK_OVERFLOW_READ}
+
+//
+// MessageId: STATUS_FAIL_CHECK
+//
+// MessageText:
+//
+// A consistency check failed.
+//
+
+ STATUS_FAIL_CHECK = NTSTATUS($C0000229);
+ {$EXTERNALSYM STATUS_FAIL_CHECK}
+
+//
+// MessageId: STATUS_DUPLICATE_OBJECTID
+//
+// MessageText:
+//
+// The attempt to insert the ID in the index failed because the ID is already in the index.
+//
+
+ STATUS_DUPLICATE_OBJECTID = NTSTATUS($C000022A);
+ {$EXTERNALSYM STATUS_DUPLICATE_OBJECTID}
+
+//
+// MessageId: STATUS_OBJECTID_EXISTS
+//
+// MessageText:
+//
+// The attempt to set the object's ID failed because the object already has an ID.
+//
+
+ STATUS_OBJECTID_EXISTS = NTSTATUS($C000022B);
+ {$EXTERNALSYM STATUS_OBJECTID_EXISTS}
+
+//
+// MessageId: STATUS_CONVERT_TO_LARGE
+//
+// MessageText:
+//
+// Internal OFS status codes indicating how an allocation operation is handled. Either it is retried after the containing onode is moved or the extent stream is converted to a large stream.
+//
+
+ STATUS_CONVERT_TO_LARGE = NTSTATUS($C000022C);
+ {$EXTERNALSYM STATUS_CONVERT_TO_LARGE}
+
+//
+// MessageId: STATUS_RETRY
+//
+// MessageText:
+//
+// The request needs to be retried.
+//
+
+ STATUS_RETRY = NTSTATUS($C000022D);
+ {$EXTERNALSYM STATUS_RETRY}
+
+//
+// MessageId: STATUS_FOUND_OUT_OF_SCOPE
+//
+// MessageText:
+//
+// The attempt to find the object found an object matching by ID on the volume but it is out of the scope of the handle used for the operation.
+//
+
+ STATUS_FOUND_OUT_OF_SCOPE = NTSTATUS($C000022E);
+ {$EXTERNALSYM STATUS_FOUND_OUT_OF_SCOPE}
+
+//
+// MessageId: STATUS_ALLOCATE_BUCKET
+//
+// MessageText:
+//
+// The bucket array must be grown. Retry transaction after doing so.
+//
+
+ STATUS_ALLOCATE_BUCKET = NTSTATUS($C000022F);
+ {$EXTERNALSYM STATUS_ALLOCATE_BUCKET}
+
+//
+// MessageId: STATUS_PROPSET_NOT_FOUND
+//
+// MessageText:
+//
+// The property set specified does not exist on the object.
+//
+
+ STATUS_PROPSET_NOT_FOUND = NTSTATUS($C0000230);
+ {$EXTERNALSYM STATUS_PROPSET_NOT_FOUND}
+
+//
+// MessageId: STATUS_MARSHALL_OVERFLOW
+//
+// MessageText:
+//
+// The user/kernel marshalling buffer has overflowed.
+//
+
+ STATUS_MARSHALL_OVERFLOW = NTSTATUS($C0000231);
+ {$EXTERNALSYM STATUS_MARSHALL_OVERFLOW}
+
+//
+// MessageId: STATUS_INVALID_VARIANT
+//
+// MessageText:
+//
+// The supplied variant structure contains invalid data.
+//
+
+ STATUS_INVALID_VARIANT = NTSTATUS($C0000232);
+ {$EXTERNALSYM STATUS_INVALID_VARIANT}
+
+//
+// MessageId: STATUS_DOMAIN_CONTROLLER_NOT_FOUND
+//
+// MessageText:
+//
+// Could not find a domain controller for this domain.
+//
+
+ STATUS_DOMAIN_CONTROLLER_NOT_FOUND = NTSTATUS($C0000233);
+ {$EXTERNALSYM STATUS_DOMAIN_CONTROLLER_NOT_FOUND}
+
+//
+// MessageId: STATUS_ACCOUNT_LOCKED_OUT
+//
+// MessageText:
+//
+// The user account has been automatically locked because too many invalid logon attempts or password change attempts have been requested.
+//
+
+ STATUS_ACCOUNT_LOCKED_OUT = NTSTATUS($C0000234); // ntsubauth
+ {$EXTERNALSYM STATUS_ACCOUNT_LOCKED_OUT}
+
+//
+// MessageId: STATUS_HANDLE_NOT_CLOSABLE
+//
+// MessageText:
+//
+// NtClose was called on a handle that was protected from close via NtSetInformationObject.
+//
+
+ STATUS_HANDLE_NOT_CLOSABLE = NTSTATUS($C0000235);
+ {$EXTERNALSYM STATUS_HANDLE_NOT_CLOSABLE}
+
+//
+// MessageId: STATUS_CONNECTION_REFUSED
+//
+// MessageText:
+//
+// The transport connection attempt was refused by the remote system.
+//
+
+ STATUS_CONNECTION_REFUSED = NTSTATUS($C0000236);
+ {$EXTERNALSYM STATUS_CONNECTION_REFUSED}
+
+//
+// MessageId: STATUS_GRACEFUL_DISCONNECT
+//
+// MessageText:
+//
+// The transport connection was gracefully closed.
+//
+
+ STATUS_GRACEFUL_DISCONNECT = NTSTATUS($C0000237);
+ {$EXTERNALSYM STATUS_GRACEFUL_DISCONNECT}
+
+//
+// MessageId: STATUS_ADDRESS_ALREADY_ASSOCIATED
+//
+// MessageText:
+//
+// The transport endpoint already has an address associated with it.
+//
+
+ STATUS_ADDRESS_ALREADY_ASSOCIATED = NTSTATUS($C0000238);
+ {$EXTERNALSYM STATUS_ADDRESS_ALREADY_ASSOCIATED}
+
+//
+// MessageId: STATUS_ADDRESS_NOT_ASSOCIATED
+//
+// MessageText:
+//
+// An address has not yet been associated with the transport endpoint.
+//
+
+ STATUS_ADDRESS_NOT_ASSOCIATED = NTSTATUS($C0000239);
+ {$EXTERNALSYM STATUS_ADDRESS_NOT_ASSOCIATED}
+
+//
+// MessageId: STATUS_CONNECTION_INVALID
+//
+// MessageText:
+//
+// An operation was attempted on a nonexistent transport connection.
+//
+
+ STATUS_CONNECTION_INVALID = NTSTATUS($C000023A);
+ {$EXTERNALSYM STATUS_CONNECTION_INVALID}
+
+//
+// MessageId: STATUS_CONNECTION_ACTIVE
+//
+// MessageText:
+//
+// An invalid operation was attempted on an active transport connection.
+//
+
+ STATUS_CONNECTION_ACTIVE = NTSTATUS($C000023B);
+ {$EXTERNALSYM STATUS_CONNECTION_ACTIVE}
+
+//
+// MessageId: STATUS_NETWORK_UNREACHABLE
+//
+// MessageText:
+//
+// The remote network is not reachable by the transport.
+//
+
+ STATUS_NETWORK_UNREACHABLE = NTSTATUS($C000023C);
+ {$EXTERNALSYM STATUS_NETWORK_UNREACHABLE}
+
+//
+// MessageId: STATUS_HOST_UNREACHABLE
+//
+// MessageText:
+//
+// The remote system is not reachable by the transport.
+//
+
+ STATUS_HOST_UNREACHABLE = NTSTATUS($C000023D);
+ {$EXTERNALSYM STATUS_HOST_UNREACHABLE}
+
+//
+// MessageId: STATUS_PROTOCOL_UNREACHABLE
+//
+// MessageText:
+//
+// The remote system does not support the transport protocol.
+//
+
+ STATUS_PROTOCOL_UNREACHABLE = NTSTATUS($C000023E);
+ {$EXTERNALSYM STATUS_PROTOCOL_UNREACHABLE}
+
+//
+// MessageId: STATUS_PORT_UNREACHABLE
+//
+// MessageText:
+//
+// No service is operating at the destination port of the transport on the remote system.
+//
+
+ STATUS_PORT_UNREACHABLE = NTSTATUS($C000023F);
+ {$EXTERNALSYM STATUS_PORT_UNREACHABLE}
+
+//
+// MessageId: STATUS_REQUEST_ABORTED
+//
+// MessageText:
+//
+// The request was aborted.
+//
+
+ STATUS_REQUEST_ABORTED = NTSTATUS($C0000240);
+ {$EXTERNALSYM STATUS_REQUEST_ABORTED}
+
+//
+// MessageId: STATUS_CONNECTION_ABORTED
+//
+// MessageText:
+//
+// The transport connection was aborted by the local system.
+//
+
+ STATUS_CONNECTION_ABORTED = NTSTATUS($C0000241);
+ {$EXTERNALSYM STATUS_CONNECTION_ABORTED}
+
+//
+// MessageId: STATUS_BAD_COMPRESSION_BUFFER
+//
+// MessageText:
+//
+// The specified buffer contains ill-formed data.
+//
+
+ STATUS_BAD_COMPRESSION_BUFFER = NTSTATUS($C0000242);
+ {$EXTERNALSYM STATUS_BAD_COMPRESSION_BUFFER}
+
+//
+// MessageId: STATUS_USER_MAPPED_FILE
+//
+// MessageText:
+//
+// The requested operation cannot be performed on a file with a user mapped section open.
+//
+
+ STATUS_USER_MAPPED_FILE = NTSTATUS($C0000243);
+ {$EXTERNALSYM STATUS_USER_MAPPED_FILE}
+
+//
+// MessageId: STATUS_AUDIT_FAILED
+//
+// MessageText:
+//
+// {Audit Failed}
+// An attempt to generate a security audit failed.
+//
+
+ STATUS_AUDIT_FAILED = NTSTATUS($C0000244);
+ {$EXTERNALSYM STATUS_AUDIT_FAILED}
+
+//
+// MessageId: STATUS_TIMER_RESOLUTION_NOT_SET
+//
+// MessageText:
+//
+// The timer resolution was not previously set by the current process.
+//
+
+ STATUS_TIMER_RESOLUTION_NOT_SET = NTSTATUS($C0000245);
+ {$EXTERNALSYM STATUS_TIMER_RESOLUTION_NOT_SET}
+
+//
+// MessageId: STATUS_CONNECTION_COUNT_LIMIT
+//
+// MessageText:
+//
+// A connection to the server could not be made because the limit on the number of concurrent connections for this account has been reached.
+//
+
+ STATUS_CONNECTION_COUNT_LIMIT = NTSTATUS($C0000246);
+ {$EXTERNALSYM STATUS_CONNECTION_COUNT_LIMIT}
+
+//
+// MessageId: STATUS_LOGIN_TIME_RESTRICTION
+//
+// MessageText:
+//
+// Attempting to login during an unauthorized time of day for this account.
+//
+
+ STATUS_LOGIN_TIME_RESTRICTION = NTSTATUS($C0000247);
+ {$EXTERNALSYM STATUS_LOGIN_TIME_RESTRICTION}
+
+//
+// MessageId: STATUS_LOGIN_WKSTA_RESTRICTION
+//
+// MessageText:
+//
+// The account is not authorized to login from this station.
+//
+
+ STATUS_LOGIN_WKSTA_RESTRICTION = NTSTATUS($C0000248);
+ {$EXTERNALSYM STATUS_LOGIN_WKSTA_RESTRICTION}
+
+//
+// MessageId: STATUS_IMAGE_MP_UP_MISMATCH
+//
+// MessageText:
+//
+// {UP/MP Image Mismatch}
+// The image %hs has been modified for use on a uniprocessor system, but you are running it on a multiprocessor machine.
+// Please reinstall the image file.
+//
+
+ STATUS_IMAGE_MP_UP_MISMATCH = NTSTATUS($C0000249);
+ {$EXTERNALSYM STATUS_IMAGE_MP_UP_MISMATCH}
+
+//
+// MessageId: STATUS_INSUFFICIENT_LOGON_INFO
+//
+// MessageText:
+//
+// There is insufficient account information to log you on.
+//
+
+ STATUS_INSUFFICIENT_LOGON_INFO = NTSTATUS($C0000250);
+ {$EXTERNALSYM STATUS_INSUFFICIENT_LOGON_INFO}
+
+//
+// MessageId: STATUS_BAD_DLL_ENTRYPOINT
+//
+// MessageText:
+//
+// {Invalid DLL Entrypoint}
+// The dynamic link library %hs is not written correctly. The stack pointer has been left in an inconsistent state.
+// The entrypoint should be declared as WINAPI or STDCALL. Select YES to fail the DLL load. Select NO to continue
+// execution. Selecting NO may cause the application to operate incorrectly.
+//
+
+ STATUS_BAD_DLL_ENTRYPOINT = NTSTATUS($C0000251);
+ {$EXTERNALSYM STATUS_BAD_DLL_ENTRYPOINT}
+
+//
+// MessageId: STATUS_BAD_SERVICE_ENTRYPOINT
+//
+// MessageText:
+//
+// {Invalid Service Callback Entrypoint}
+// The %hs service is not written correctly. The stack pointer has been left in an inconsistent state.
+// The callback entrypoint should be declared as WINAPI or STDCALL. Selecting OK will cause the
+// service to continue operation. However, the service process may operate incorrectly.
+//
+
+ STATUS_BAD_SERVICE_ENTRYPOINT = NTSTATUS($C0000252);
+ {$EXTERNALSYM STATUS_BAD_SERVICE_ENTRYPOINT}
+
+//
+// MessageId: STATUS_LPC_REPLY_LOST
+//
+// MessageText:
+//
+// The server received the messages but did not send a reply.
+//
+
+ STATUS_LPC_REPLY_LOST = NTSTATUS($C0000253);
+ {$EXTERNALSYM STATUS_LPC_REPLY_LOST}
+
+//
+// MessageId: STATUS_IP_ADDRESS_CONFLICT1
+//
+// MessageText:
+//
+// The system has detected an IP address conflict with another system on the network. The local interface has been disabled.
+// More details are available in the system event log.
+// Consult your network administrator to resolve the conflict.
+//
+
+ STATUS_IP_ADDRESS_CONFLICT1 = NTSTATUS($C0000254);
+ {$EXTERNALSYM STATUS_IP_ADDRESS_CONFLICT1}
+
+//
+// MessageId: STATUS_IP_ADDRESS_CONFLICT2
+//
+// MessageText:
+//
+// The system has detected an IP address conflict with another system on the network. Network operations on this system may be disrupted as a result.
+// More details are available in the system event log.
+// Consult your network administrator immediately to resolve the conflict.
+//
+
+ STATUS_IP_ADDRESS_CONFLICT2 = NTSTATUS($C0000255);
+ {$EXTERNALSYM STATUS_IP_ADDRESS_CONFLICT2}
+
+//
+// MessageId: STATUS_REGISTRY_QUOTA_LIMIT
+//
+// MessageText:
+//
+// {Low On Registry Space}
+// Your maximum registry size is too small. To ensure that Windows runs properly, increase your maximum registry size. For more information, see Help.
+//
+
+ STATUS_REGISTRY_QUOTA_LIMIT = NTSTATUS($C0000256);
+ {$EXTERNALSYM STATUS_REGISTRY_QUOTA_LIMIT}
+
+//
+// MessageId: STATUS_PATH_NOT_COVERED
+//
+// MessageText:
+//
+// The contacted server does not support the indicated part of the DFS namespace.
+//
+
+ STATUS_PATH_NOT_COVERED = NTSTATUS($C0000257);
+ {$EXTERNALSYM STATUS_PATH_NOT_COVERED}
+
+//
+// MessageId: STATUS_NO_CALLBACK_ACTIVE
+//
+// MessageText:
+//
+// A callback return system service cannot be executed when no callback is active.
+//
+
+ STATUS_NO_CALLBACK_ACTIVE = NTSTATUS($C0000258);
+ {$EXTERNALSYM STATUS_NO_CALLBACK_ACTIVE}
+
+//
+// MessageId: STATUS_LICENSE_QUOTA_EXCEEDED
+//
+// MessageText:
+//
+// The service being accessed is licensed for a particular number of connections.
+// No more connections can be made to the service at this time because there are already as many connections as the service can accept.
+//
+
+ STATUS_LICENSE_QUOTA_EXCEEDED = NTSTATUS($C0000259);
+ {$EXTERNALSYM STATUS_LICENSE_QUOTA_EXCEEDED}
+
+//
+// MessageId: STATUS_PWD_TOO_SHORT
+//
+// MessageText:
+//
+// The password provided is too short to meet the policy of your user account.
+// Please choose a longer password.
+//
+
+ STATUS_PWD_TOO_SHORT = NTSTATUS($C000025A);
+ {$EXTERNALSYM STATUS_PWD_TOO_SHORT}
+
+//
+// MessageId: STATUS_PWD_TOO_RECENT
+//
+// MessageText:
+//
+// The policy of your user account does not allow you to change passwords too frequently.
+// This is done to prevent users from changing back to a familiar, but potentially discovered, password.
+// If you feel your password has been compromised then please contact your administrator immediately to have a new one assigned.
+//
+
+ STATUS_PWD_TOO_RECENT = NTSTATUS($C000025B);
+ {$EXTERNALSYM STATUS_PWD_TOO_RECENT}
+
+//
+// MessageId: STATUS_PWD_HISTORY_CONFLICT
+//
+// MessageText:
+//
+// You have attempted to change your password to one that you have used in the past.
+// The policy of your user account does not allow this. Please select a password that you have not previously used.
+//
+
+ STATUS_PWD_HISTORY_CONFLICT = NTSTATUS($C000025C);
+ {$EXTERNALSYM STATUS_PWD_HISTORY_CONFLICT}
+
+//
+// MessageId: STATUS_PLUGPLAY_NO_DEVICE
+//
+// MessageText:
+//
+// You have attempted to load a legacy device driver while its device instance had been disabled.
+//
+
+ STATUS_PLUGPLAY_NO_DEVICE = NTSTATUS($C000025E);
+ {$EXTERNALSYM STATUS_PLUGPLAY_NO_DEVICE}
+
+//
+// MessageId: STATUS_UNSUPPORTED_COMPRESSION
+//
+// MessageText:
+//
+// The specified compression format is unsupported.
+//
+
+ STATUS_UNSUPPORTED_COMPRESSION = NTSTATUS($C000025F);
+ {$EXTERNALSYM STATUS_UNSUPPORTED_COMPRESSION}
+
+//
+// MessageId: STATUS_INVALID_HW_PROFILE
+//
+// MessageText:
+//
+// The specified hardware profile configuration is invalid.
+//
+
+ STATUS_INVALID_HW_PROFILE = NTSTATUS($C0000260);
+ {$EXTERNALSYM STATUS_INVALID_HW_PROFILE}
+
+//
+// MessageId: STATUS_INVALID_PLUGPLAY_DEVICE_PATH
+//
+// MessageText:
+//
+// The specified Plug and Play registry device path is invalid.
+//
+
+ STATUS_INVALID_PLUGPLAY_DEVICE_PATH = NTSTATUS($C0000261);
+ {$EXTERNALSYM STATUS_INVALID_PLUGPLAY_DEVICE_PATH}
+
+//
+// MessageId: STATUS_DRIVER_ORDINAL_NOT_FOUND
+//
+// MessageText:
+//
+// {Driver Entry Point Not Found}
+// The %hs device driver could not locate the ordinal %ld in driver %hs.
+//
+
+ STATUS_DRIVER_ORDINAL_NOT_FOUND = NTSTATUS($C0000262);
+ {$EXTERNALSYM STATUS_DRIVER_ORDINAL_NOT_FOUND}
+
+//
+// MessageId: STATUS_DRIVER_ENTRYPOINT_NOT_FOUND
+//
+// MessageText:
+//
+// {Driver Entry Point Not Found}
+// The %hs device driver could not locate the entry point %hs in driver %hs.
+//
+
+ STATUS_DRIVER_ENTRYPOINT_NOT_FOUND = NTSTATUS($C0000263);
+ {$EXTERNALSYM STATUS_DRIVER_ENTRYPOINT_NOT_FOUND}
+
+//
+// MessageId: STATUS_RESOURCE_NOT_OWNED
+//
+// MessageText:
+//
+// {Application Error}
+// The application attempted to release a resource it did not own. Click on OK to terminate the application.
+//
+
+ STATUS_RESOURCE_NOT_OWNED = NTSTATUS($C0000264);
+ {$EXTERNALSYM STATUS_RESOURCE_NOT_OWNED}
+
+//
+// MessageId: STATUS_TOO_MANY_LINKS
+//
+// MessageText:
+//
+// An attempt was made to create more links on a file than the file system supports.
+//
+
+ STATUS_TOO_MANY_LINKS = NTSTATUS($C0000265);
+ {$EXTERNALSYM STATUS_TOO_MANY_LINKS}
+
+//
+// MessageId: STATUS_QUOTA_LIST_INCONSISTENT
+//
+// MessageText:
+//
+// The specified quota list is internally inconsistent with its descriptor.
+//
+
+ STATUS_QUOTA_LIST_INCONSISTENT = NTSTATUS($C0000266);
+ {$EXTERNALSYM STATUS_QUOTA_LIST_INCONSISTENT}
+
+//
+// MessageId: STATUS_FILE_IS_OFFLINE
+//
+// MessageText:
+//
+// The specified file has been relocated to offline storage.
+//
+
+ STATUS_FILE_IS_OFFLINE = NTSTATUS($C0000267);
+ {$EXTERNALSYM STATUS_FILE_IS_OFFLINE}
+
+//
+// MessageId: STATUS_EVALUATION_EXPIRATION
+//
+// MessageText:
+//
+// {Windows Evaluation Notification}
+// The evaluation period for this installation of Windows has expired. This system will shutdown in 1 hour. To restore access to this installation of Windows, please upgrade this installation using a licensed distribution of this product.
+//
+
+ STATUS_EVALUATION_EXPIRATION = NTSTATUS($C0000268);
+ {$EXTERNALSYM STATUS_EVALUATION_EXPIRATION}
+
+//
+// MessageId: STATUS_ILLEGAL_DLL_RELOCATION
+//
+// MessageText:
+//
+// {Illegal System DLL Relocation}
+// The system DLL %hs was relocated in memory. The application will not run properly.
+// The relocation occurred because the DLL %hs occupied an address range reserved for Windows system DLLs. The vendor supplying the DLL should be contacted for a new DLL.
+//
+
+ STATUS_ILLEGAL_DLL_RELOCATION = NTSTATUS($C0000269);
+ {$EXTERNALSYM STATUS_ILLEGAL_DLL_RELOCATION}
+
+//
+// MessageId: STATUS_LICENSE_VIOLATION
+//
+// MessageText:
+//
+// {License Violation}
+// The system has detected tampering with your registered product type. This is a violation of your software license. Tampering with product type is not permitted.
+//
+
+ STATUS_LICENSE_VIOLATION = NTSTATUS($C000026A);
+ {$EXTERNALSYM STATUS_LICENSE_VIOLATION}
+
+//
+// MessageId: STATUS_DLL_INIT_FAILED_LOGOFF
+//
+// MessageText:
+//
+// {DLL Initialization Failed}
+// The application failed to initialize because the window station is shutting down.
+//
+
+ STATUS_DLL_INIT_FAILED_LOGOFF = NTSTATUS($C000026B);
+ {$EXTERNALSYM STATUS_DLL_INIT_FAILED_LOGOFF}
+
+//
+// MessageId: STATUS_DRIVER_UNABLE_TO_LOAD
+//
+// MessageText:
+//
+// {Unable to Load Device Driver}
+// %hs device driver could not be loaded.
+// Error Status was 0x%x
+//
+
+ STATUS_DRIVER_UNABLE_TO_LOAD = NTSTATUS($C000026C);
+ {$EXTERNALSYM STATUS_DRIVER_UNABLE_TO_LOAD}
+
+//
+// MessageId: STATUS_DFS_UNAVAILABLE
+//
+// MessageText:
+//
+// DFS is unavailable on the contacted server.
+//
+
+ STATUS_DFS_UNAVAILABLE = NTSTATUS($C000026D);
+ {$EXTERNALSYM STATUS_DFS_UNAVAILABLE}
+
+//
+// MessageId: STATUS_VOLUME_DISMOUNTED
+//
+// MessageText:
+//
+// An operation was attempted to a volume after it was dismounted.
+//
+
+ STATUS_VOLUME_DISMOUNTED = NTSTATUS($C000026E);
+ {$EXTERNALSYM STATUS_VOLUME_DISMOUNTED}
+
+//
+// MessageId: STATUS_WX86_INTERNAL_ERROR
+//
+// MessageText:
+//
+// An internal error occurred in the Win32 x86 emulation subsystem.
+//
+
+ STATUS_WX86_INTERNAL_ERROR = NTSTATUS($C000026F);
+ {$EXTERNALSYM STATUS_WX86_INTERNAL_ERROR}
+
+//
+// MessageId: STATUS_WX86_FLOAT_STACK_CHECK
+//
+// MessageText:
+//
+// Win32 x86 emulation subsystem Floating-point stack check.
+//
+
+ STATUS_WX86_FLOAT_STACK_CHECK = NTSTATUS($C0000270);
+ {$EXTERNALSYM STATUS_WX86_FLOAT_STACK_CHECK}
+
+//
+// MessageId: STATUS_VALIDATE_CONTINUE
+//
+// MessageText:
+//
+// The validation process needs to continue on to the next step.
+//
+
+ STATUS_VALIDATE_CONTINUE = NTSTATUS($C0000271);
+ {$EXTERNALSYM STATUS_VALIDATE_CONTINUE}
+
+//
+// MessageId: STATUS_NO_MATCH
+//
+// MessageText:
+//
+// There was no match for the specified key in the index.
+//
+
+ STATUS_NO_MATCH = NTSTATUS($C0000272);
+ {$EXTERNALSYM STATUS_NO_MATCH}
+
+//
+// MessageId: STATUS_NO_MORE_MATCHES
+//
+// MessageText:
+//
+// There are no more matches for the current index enumeration.
+//
+
+ STATUS_NO_MORE_MATCHES = NTSTATUS($C0000273);
+ {$EXTERNALSYM STATUS_NO_MORE_MATCHES}
+
+//
+// MessageId: STATUS_NOT_A_REPARSE_POINT
+//
+// MessageText:
+//
+// The NTFS file or directory is not a reparse point.
+//
+
+ STATUS_NOT_A_REPARSE_POINT = NTSTATUS($C0000275);
+ {$EXTERNALSYM STATUS_NOT_A_REPARSE_POINT}
+
+//
+// MessageId: STATUS_IO_REPARSE_TAG_INVALID
+//
+// MessageText:
+//
+// The Windows I/O reparse tag passed for the NTFS reparse point is invalid.
+//
+
+ STATUS_IO_REPARSE_TAG_INVALID = NTSTATUS($C0000276);
+ {$EXTERNALSYM STATUS_IO_REPARSE_TAG_INVALID}
+
+//
+// MessageId: STATUS_IO_REPARSE_TAG_MISMATCH
+//
+// MessageText:
+//
+// The Windows I/O reparse tag does not match the one present in the NTFS reparse point.
+//
+
+ STATUS_IO_REPARSE_TAG_MISMATCH = NTSTATUS($C0000277);
+ {$EXTERNALSYM STATUS_IO_REPARSE_TAG_MISMATCH}
+
+//
+// MessageId: STATUS_IO_REPARSE_DATA_INVALID
+//
+// MessageText:
+//
+// The user data passed for the NTFS reparse point is invalid.
+//
+
+ STATUS_IO_REPARSE_DATA_INVALID = NTSTATUS($C0000278);
+ {$EXTERNALSYM STATUS_IO_REPARSE_DATA_INVALID}
+
+//
+// MessageId: STATUS_IO_REPARSE_TAG_NOT_HANDLED
+//
+// MessageText:
+//
+// The layered file system driver for this IO tag did not handle it when needed.
+//
+
+ STATUS_IO_REPARSE_TAG_NOT_HANDLED = NTSTATUS($C0000279);
+ {$EXTERNALSYM STATUS_IO_REPARSE_TAG_NOT_HANDLED}
+
+//
+// MessageId: STATUS_REPARSE_POINT_NOT_RESOLVED
+//
+// MessageText:
+//
+// The NTFS symbolic link could not be resolved even though the initial file name is valid.
+//
+
+ STATUS_REPARSE_POINT_NOT_RESOLVED = NTSTATUS($C0000280);
+ {$EXTERNALSYM STATUS_REPARSE_POINT_NOT_RESOLVED}
+
+//
+// MessageId: STATUS_DIRECTORY_IS_A_REPARSE_POINT
+//
+// MessageText:
+//
+// The NTFS directory is a reparse point.
+//
+
+ STATUS_DIRECTORY_IS_A_REPARSE_POINT = NTSTATUS($C0000281);
+ {$EXTERNALSYM STATUS_DIRECTORY_IS_A_REPARSE_POINT}
+
+//
+// MessageId: STATUS_RANGE_LIST_CONFLICT
+//
+// MessageText:
+//
+// The range could not be added to the range list because of a conflict.
+//
+
+ STATUS_RANGE_LIST_CONFLICT = NTSTATUS($C0000282);
+ {$EXTERNALSYM STATUS_RANGE_LIST_CONFLICT}
+
+//
+// MessageId: STATUS_SOURCE_ELEMENT_EMPTY
+//
+// MessageText:
+//
+// The specified medium changer source element contains no media.
+//
+
+ STATUS_SOURCE_ELEMENT_EMPTY = NTSTATUS($C0000283);
+ {$EXTERNALSYM STATUS_SOURCE_ELEMENT_EMPTY}
+
+//
+// MessageId: STATUS_DESTINATION_ELEMENT_FULL
+//
+// MessageText:
+//
+// The specified medium changer destination element already contains media.
+//
+
+ STATUS_DESTINATION_ELEMENT_FULL = NTSTATUS($C0000284);
+ {$EXTERNALSYM STATUS_DESTINATION_ELEMENT_FULL}
+
+//
+// MessageId: STATUS_ILLEGAL_ELEMENT_ADDRESS
+//
+// MessageText:
+//
+// The specified medium changer element does not exist.
+//
+
+ STATUS_ILLEGAL_ELEMENT_ADDRESS = NTSTATUS($C0000285);
+ {$EXTERNALSYM STATUS_ILLEGAL_ELEMENT_ADDRESS}
+
+//
+// MessageId: STATUS_MAGAZINE_NOT_PRESENT
+//
+// MessageText:
+//
+// The specified element is contained within a magazine that is no longer present.
+//
+
+ STATUS_MAGAZINE_NOT_PRESENT = NTSTATUS($C0000286);
+ {$EXTERNALSYM STATUS_MAGAZINE_NOT_PRESENT}
+
+//
+// MessageId: STATUS_REINITIALIZATION_NEEDED
+//
+// MessageText:
+//
+// The device requires reinitialization due to hardware errors.
+//
+
+ STATUS_REINITIALIZATION_NEEDED = NTSTATUS($C0000287);
+ {$EXTERNALSYM STATUS_REINITIALIZATION_NEEDED}
+
+//
+// MessageId: STATUS_DEVICE_REQUIRES_CLEANING
+//
+// MessageText:
+//
+// The device has indicated that cleaning is necessary.
+//
+
+ STATUS_DEVICE_REQUIRES_CLEANING = NTSTATUS($80000288);
+ {$EXTERNALSYM STATUS_DEVICE_REQUIRES_CLEANING}
+
+//
+// MessageId: STATUS_DEVICE_DOOR_OPEN
+//
+// MessageText:
+//
+// The device has indicated that it's door is open. Further operations require it closed and secured.
+//
+
+ STATUS_DEVICE_DOOR_OPEN = NTSTATUS($80000289);
+ {$EXTERNALSYM STATUS_DEVICE_DOOR_OPEN}
+
+//
+// MessageId: STATUS_ENCRYPTION_FAILED
+//
+// MessageText:
+//
+// The file encryption attempt failed.
+//
+
+ STATUS_ENCRYPTION_FAILED = NTSTATUS($C000028A);
+ {$EXTERNALSYM STATUS_ENCRYPTION_FAILED}
+
+//
+// MessageId: STATUS_DECRYPTION_FAILED
+//
+// MessageText:
+//
+// The file decryption attempt failed.
+//
+
+ STATUS_DECRYPTION_FAILED = NTSTATUS($C000028B);
+ {$EXTERNALSYM STATUS_DECRYPTION_FAILED}
+
+//
+// MessageId: STATUS_RANGE_NOT_FOUND
+//
+// MessageText:
+//
+// The specified range could not be found in the range list.
+//
+
+ STATUS_RANGE_NOT_FOUND = NTSTATUS($C000028C);
+ {$EXTERNALSYM STATUS_RANGE_NOT_FOUND}
+
+//
+// MessageId: STATUS_NO_RECOVERY_POLICY
+//
+// MessageText:
+//
+// There is no encryption recovery policy configured for this system.
+//
+
+ STATUS_NO_RECOVERY_POLICY = NTSTATUS($C000028D);
+ {$EXTERNALSYM STATUS_NO_RECOVERY_POLICY}
+
+//
+// MessageId: STATUS_NO_EFS
+//
+// MessageText:
+//
+// The required encryption driver is not loaded for this system.
+//
+
+ STATUS_NO_EFS = NTSTATUS($C000028E);
+ {$EXTERNALSYM STATUS_NO_EFS}
+
+//
+// MessageId: STATUS_WRONG_EFS
+//
+// MessageText:
+//
+// The file was encrypted with a different encryption driver than is currently loaded.
+//
+
+ STATUS_WRONG_EFS = NTSTATUS($C000028F);
+ {$EXTERNALSYM STATUS_WRONG_EFS}
+
+//
+// MessageId: STATUS_NO_USER_KEYS
+//
+// MessageText:
+//
+// There are no EFS keys defined for the user.
+//
+
+ STATUS_NO_USER_KEYS = NTSTATUS($C0000290);
+ {$EXTERNALSYM STATUS_NO_USER_KEYS}
+
+//
+// MessageId: STATUS_FILE_NOT_ENCRYPTED
+//
+// MessageText:
+//
+// The specified file is not encrypted.
+//
+
+ STATUS_FILE_NOT_ENCRYPTED = NTSTATUS($C0000291);
+ {$EXTERNALSYM STATUS_FILE_NOT_ENCRYPTED}
+
+//
+// MessageId: STATUS_NOT_EXPORT_FORMAT
+//
+// MessageText:
+//
+// The specified file is not in the defined EFS export format.
+//
+
+ STATUS_NOT_EXPORT_FORMAT = NTSTATUS($C0000292);
+ {$EXTERNALSYM STATUS_NOT_EXPORT_FORMAT}
+
+//
+// MessageId: STATUS_FILE_ENCRYPTED
+//
+// MessageText:
+//
+// The specified file is encrypted and the user does not have the ability to decrypt it.
+//
+
+ STATUS_FILE_ENCRYPTED = NTSTATUS($C0000293);
+ {$EXTERNALSYM STATUS_FILE_ENCRYPTED}
+
+//
+// MessageId: STATUS_WAKE_SYSTEM
+//
+// MessageText:
+//
+// The system has awoken
+//
+
+ STATUS_WAKE_SYSTEM = NTSTATUS($40000294);
+ {$EXTERNALSYM STATUS_WAKE_SYSTEM}
+
+//
+// MessageId: STATUS_WMI_GUID_NOT_FOUND
+//
+// MessageText:
+//
+// The guid passed was not recognized as valid by a WMI data provider.
+//
+
+ STATUS_WMI_GUID_NOT_FOUND = NTSTATUS($C0000295);
+ {$EXTERNALSYM STATUS_WMI_GUID_NOT_FOUND}
+
+//
+// MessageId: STATUS_WMI_INSTANCE_NOT_FOUND
+//
+// MessageText:
+//
+// The instance name passed was not recognized as valid by a WMI data provider.
+//
+
+ STATUS_WMI_INSTANCE_NOT_FOUND = NTSTATUS($C0000296);
+ {$EXTERNALSYM STATUS_WMI_INSTANCE_NOT_FOUND}
+
+//
+// MessageId: STATUS_WMI_ITEMID_NOT_FOUND
+//
+// MessageText:
+//
+// The data item id passed was not recognized as valid by a WMI data provider.
+//
+
+ STATUS_WMI_ITEMID_NOT_FOUND = NTSTATUS($C0000297);
+ {$EXTERNALSYM STATUS_WMI_ITEMID_NOT_FOUND}
+
+//
+// MessageId: STATUS_WMI_TRY_AGAIN
+//
+// MessageText:
+//
+// The WMI request could not be completed and should be retried.
+//
+
+ STATUS_WMI_TRY_AGAIN = NTSTATUS($C0000298);
+ {$EXTERNALSYM STATUS_WMI_TRY_AGAIN}
+
+//
+// MessageId: STATUS_SHARED_POLICY
+//
+// MessageText:
+//
+// The policy object is shared and can only be modified at the root
+//
+
+ STATUS_SHARED_POLICY = NTSTATUS($C0000299);
+ {$EXTERNALSYM STATUS_SHARED_POLICY}
+
+//
+// MessageId: STATUS_POLICY_OBJECT_NOT_FOUND
+//
+// MessageText:
+//
+// The policy object does not exist when it should
+//
+
+ STATUS_POLICY_OBJECT_NOT_FOUND = NTSTATUS($C000029A);
+ {$EXTERNALSYM STATUS_POLICY_OBJECT_NOT_FOUND}
+
+//
+// MessageId: STATUS_POLICY_ONLY_IN_DS
+//
+// MessageText:
+//
+// The requested policy information only lives in the Ds
+//
+
+ STATUS_POLICY_ONLY_IN_DS = NTSTATUS($C000029B);
+ {$EXTERNALSYM STATUS_POLICY_ONLY_IN_DS}
+
+//
+// MessageId: STATUS_VOLUME_NOT_UPGRADED
+//
+// MessageText:
+//
+// The volume must be upgraded to enable this feature
+//
+
+ STATUS_VOLUME_NOT_UPGRADED = NTSTATUS($C000029C);
+ {$EXTERNALSYM STATUS_VOLUME_NOT_UPGRADED}
+
+//
+// MessageId: STATUS_REMOTE_STORAGE_NOT_ACTIVE
+//
+// MessageText:
+//
+// The remote storage service is not operational at this time.
+//
+
+ STATUS_REMOTE_STORAGE_NOT_ACTIVE = NTSTATUS($C000029D);
+ {$EXTERNALSYM STATUS_REMOTE_STORAGE_NOT_ACTIVE}
+
+//
+// MessageId: STATUS_REMOTE_STORAGE_MEDIA_ERROR
+//
+// MessageText:
+//
+// The remote storage service encountered a media error.
+//
+
+ STATUS_REMOTE_STORAGE_MEDIA_ERROR = NTSTATUS($C000029E);
+ {$EXTERNALSYM STATUS_REMOTE_STORAGE_MEDIA_ERROR}
+
+//
+// MessageId: STATUS_NO_TRACKING_SERVICE
+//
+// MessageText:
+//
+// The tracking (workstation) service is not running.
+//
+
+ STATUS_NO_TRACKING_SERVICE = NTSTATUS($C000029F);
+ {$EXTERNALSYM STATUS_NO_TRACKING_SERVICE}
+
+//
+// MessageId: STATUS_SERVER_SID_MISMATCH
+//
+// MessageText:
+//
+// The server process is running under a SID different than that required by client.
+//
+
+ STATUS_SERVER_SID_MISMATCH = NTSTATUS($C00002A0);
+ {$EXTERNALSYM STATUS_SERVER_SID_MISMATCH}
+
+//
+// Directory Service specific Errors
+//
+//
+// MessageId: STATUS_DS_NO_ATTRIBUTE_OR_VALUE
+//
+// MessageText:
+//
+// The specified directory service attribute or value does not exist.
+//
+
+ STATUS_DS_NO_ATTRIBUTE_OR_VALUE = NTSTATUS($C00002A1);
+ {$EXTERNALSYM STATUS_DS_NO_ATTRIBUTE_OR_VALUE}
+
+//
+// MessageId: STATUS_DS_INVALID_ATTRIBUTE_SYNTAX
+//
+// MessageText:
+//
+// The attribute syntax specified to the directory service is invalid.
+//
+
+ STATUS_DS_INVALID_ATTRIBUTE_SYNTAX = NTSTATUS($C00002A2);
+ {$EXTERNALSYM STATUS_DS_INVALID_ATTRIBUTE_SYNTAX}
+
+//
+// MessageId: STATUS_DS_ATTRIBUTE_TYPE_UNDEFINED
+//
+// MessageText:
+//
+// The attribute type specified to the directory service is not defined.
+//
+
+ STATUS_DS_ATTRIBUTE_TYPE_UNDEFINED = NTSTATUS($C00002A3);
+ {$EXTERNALSYM STATUS_DS_ATTRIBUTE_TYPE_UNDEFINED}
+
+//
+// MessageId: STATUS_DS_ATTRIBUTE_OR_VALUE_EXISTS
+//
+// MessageText:
+//
+// The specified directory service attribute or value already exists.
+//
+
+ STATUS_DS_ATTRIBUTE_OR_VALUE_EXISTS = NTSTATUS($C00002A4);
+ {$EXTERNALSYM STATUS_DS_ATTRIBUTE_OR_VALUE_EXISTS}
+
+//
+// MessageId: STATUS_DS_BUSY
+//
+// MessageText:
+//
+// The directory service is busy.
+//
+
+ STATUS_DS_BUSY = NTSTATUS($C00002A5);
+ {$EXTERNALSYM STATUS_DS_BUSY}
+
+//
+// MessageId: STATUS_DS_UNAVAILABLE
+//
+// MessageText:
+//
+// The directory service is not available.
+//
+
+ STATUS_DS_UNAVAILABLE = NTSTATUS($C00002A6);
+ {$EXTERNALSYM STATUS_DS_UNAVAILABLE}
+
+//
+// MessageId: STATUS_DS_NO_RIDS_ALLOCATED
+//
+// MessageText:
+//
+// The directory service was unable to allocate a relative identifier.
+//
+
+ STATUS_DS_NO_RIDS_ALLOCATED = NTSTATUS($C00002A7);
+ {$EXTERNALSYM STATUS_DS_NO_RIDS_ALLOCATED}
+
+//
+// MessageId: STATUS_DS_NO_MORE_RIDS
+//
+// MessageText:
+//
+// The directory service has exhausted the pool of relative identifiers.
+//
+
+ STATUS_DS_NO_MORE_RIDS = NTSTATUS($C00002A8);
+ {$EXTERNALSYM STATUS_DS_NO_MORE_RIDS}
+
+//
+// MessageId: STATUS_DS_INCORRECT_ROLE_OWNER
+//
+// MessageText:
+//
+// The requested operation could not be performed because the directory service is not the master for that type of operation.
+//
+
+ STATUS_DS_INCORRECT_ROLE_OWNER = NTSTATUS($C00002A9);
+ {$EXTERNALSYM STATUS_DS_INCORRECT_ROLE_OWNER}
+
+//
+// MessageId: STATUS_DS_RIDMGR_INIT_ERROR
+//
+// MessageText:
+//
+// The directory service was unable to initialize the subsystem that allocates relative identifiers.
+//
+
+ STATUS_DS_RIDMGR_INIT_ERROR = NTSTATUS($C00002AA);
+ {$EXTERNALSYM STATUS_DS_RIDMGR_INIT_ERROR}
+
+//
+// MessageId: STATUS_DS_OBJ_CLASS_VIOLATION
+//
+// MessageText:
+//
+// The requested operation did not satisfy one or more constraints associated with the class of the object.
+//
+
+ STATUS_DS_OBJ_CLASS_VIOLATION = NTSTATUS($C00002AB);
+ {$EXTERNALSYM STATUS_DS_OBJ_CLASS_VIOLATION}
+
+//
+// MessageId: STATUS_DS_CANT_ON_NON_LEAF
+//
+// MessageText:
+//
+// The directory service can perform the requested operation only on a leaf object.
+//
+
+ STATUS_DS_CANT_ON_NON_LEAF = NTSTATUS($C00002AC);
+ {$EXTERNALSYM STATUS_DS_CANT_ON_NON_LEAF}
+
+//
+// MessageId: STATUS_DS_CANT_ON_RDN
+//
+// MessageText:
+//
+// The directory service cannot perform the requested operation on the Relatively Defined Name (RDN) attribute of an object.
+//
+
+ STATUS_DS_CANT_ON_RDN = NTSTATUS($C00002AD);
+ {$EXTERNALSYM STATUS_DS_CANT_ON_RDN}
+
+//
+// MessageId: STATUS_DS_CANT_MOD_OBJ_CLASS
+//
+// MessageText:
+//
+// The directory service detected an attempt to modify the object class of an object.
+//
+
+ STATUS_DS_CANT_MOD_OBJ_CLASS = NTSTATUS($C00002AE);
+ {$EXTERNALSYM STATUS_DS_CANT_MOD_OBJ_CLASS}
+
+//
+// MessageId: STATUS_DS_CROSS_DOM_MOVE_FAILED
+//
+// MessageText:
+//
+// An error occurred while performing a cross domain move operation.
+//
+
+ STATUS_DS_CROSS_DOM_MOVE_FAILED = NTSTATUS($C00002AF);
+ {$EXTERNALSYM STATUS_DS_CROSS_DOM_MOVE_FAILED}
+
+//
+// MessageId: STATUS_DS_GC_NOT_AVAILABLE
+//
+// MessageText:
+//
+// Unable to Contact the Global Catalog Server.
+//
+
+ STATUS_DS_GC_NOT_AVAILABLE = NTSTATUS($C00002B0);
+ {$EXTERNALSYM STATUS_DS_GC_NOT_AVAILABLE}
+
+//
+// MessageId: STATUS_DIRECTORY_SERVICE_REQUIRED
+//
+// MessageText:
+//
+// The requested operation requires a directory service, and none was available.
+//
+
+ STATUS_DIRECTORY_SERVICE_REQUIRED = NTSTATUS($C00002B1);
+ {$EXTERNALSYM STATUS_DIRECTORY_SERVICE_REQUIRED}
+
+//
+// MessageId: STATUS_REPARSE_ATTRIBUTE_CONFLICT
+//
+// MessageText:
+//
+// The reparse attribute cannot be set as it is incompatible with an existing attribute.
+//
+
+ STATUS_REPARSE_ATTRIBUTE_CONFLICT = NTSTATUS($C00002B2);
+ {$EXTERNALSYM STATUS_REPARSE_ATTRIBUTE_CONFLICT}
+
+//
+// MessageId: STATUS_CANT_ENABLE_DENY_ONLY
+//
+// MessageText:
+//
+// A group marked use for deny only can not be enabled.
+//
+
+ STATUS_CANT_ENABLE_DENY_ONLY = NTSTATUS($C00002B3);
+ {$EXTERNALSYM STATUS_CANT_ENABLE_DENY_ONLY}
+
+//
+// MessageId: STATUS_FLOAT_MULTIPLE_FAULTS
+//
+// MessageText:
+//
+// {EXCEPTION}
+// Multiple floating point faults.
+//
+
+ STATUS_FLOAT_MULTIPLE_FAULTS = NTSTATUS($C00002B4); // winnt
+ {$EXTERNALSYM STATUS_FLOAT_MULTIPLE_FAULTS}
+
+//
+// MessageId: STATUS_FLOAT_MULTIPLE_TRAPS
+//
+// MessageText:
+//
+// {EXCEPTION}
+// Multiple floating point traps.
+//
+
+ STATUS_FLOAT_MULTIPLE_TRAPS = NTSTATUS($C00002B5); // winnt
+ {$EXTERNALSYM STATUS_FLOAT_MULTIPLE_TRAPS}
+
+//
+// MessageId: STATUS_DEVICE_REMOVED
+//
+// MessageText:
+//
+// The device has been removed.
+//
+
+ STATUS_DEVICE_REMOVED = NTSTATUS($C00002B6);
+ {$EXTERNALSYM STATUS_DEVICE_REMOVED}
+
+//
+// MessageId: STATUS_JOURNAL_DELETE_IN_PROGRESS
+//
+// MessageText:
+//
+// The volume change journal is being deleted.
+//
+
+ STATUS_JOURNAL_DELETE_IN_PROGRESS = NTSTATUS($C00002B7);
+ {$EXTERNALSYM STATUS_JOURNAL_DELETE_IN_PROGRESS}
+
+//
+// MessageId: STATUS_JOURNAL_NOT_ACTIVE
+//
+// MessageText:
+//
+// The volume change journal service is not active.
+//
+
+ STATUS_JOURNAL_NOT_ACTIVE = NTSTATUS($C00002B8);
+ {$EXTERNALSYM STATUS_JOURNAL_NOT_ACTIVE}
+
+//
+// MessageId: STATUS_NOINTERFACE
+//
+// MessageText:
+//
+// The requested interface is not supported.
+//
+
+ STATUS_NOINTERFACE = NTSTATUS($C00002B9);
+ {$EXTERNALSYM STATUS_NOINTERFACE}
+
+//
+// MessageId: STATUS_DS_ADMIN_LIMIT_EXCEEDED
+//
+// MessageText:
+//
+// A directory service resource limit has been exceeded.
+//
+
+ STATUS_DS_ADMIN_LIMIT_EXCEEDED = NTSTATUS($C00002C1);
+ {$EXTERNALSYM STATUS_DS_ADMIN_LIMIT_EXCEEDED}
+
+//
+// MessageId: STATUS_DRIVER_FAILED_SLEEP
+//
+// MessageText:
+//
+// {System Standby Failed}
+// The driver %hs does not support standby mode. Updating this
+// driver may allow the system to go to standby mode.
+//
+
+ STATUS_DRIVER_FAILED_SLEEP = NTSTATUS($C00002C2);
+ {$EXTERNALSYM STATUS_DRIVER_FAILED_SLEEP}
+
+//
+// MessageId: STATUS_MUTUAL_AUTHENTICATION_FAILED
+//
+// MessageText:
+//
+// Mutual Authentication failed. The server's password is out of date at the domain controller.
+//
+
+ STATUS_MUTUAL_AUTHENTICATION_FAILED = NTSTATUS($C00002C3);
+ {$EXTERNALSYM STATUS_MUTUAL_AUTHENTICATION_FAILED}
+
+//
+// MessageId: STATUS_CORRUPT_SYSTEM_FILE
+//
+// MessageText:
+//
+// The system file %1 has become corrupt and has been replaced.
+//
+
+ STATUS_CORRUPT_SYSTEM_FILE = NTSTATUS($C00002C4);
+ {$EXTERNALSYM STATUS_CORRUPT_SYSTEM_FILE}
+
+//
+// MessageId: STATUS_DATATYPE_MISALIGNMENT_ERROR
+//
+// MessageText:
+//
+// {EXCEPTION}
+// Alignment Error
+// A datatype misalignment error was detected in a load or store instruction.
+//
+
+ STATUS_DATATYPE_MISALIGNMENT_ERROR = NTSTATUS($C00002C5);
+ {$EXTERNALSYM STATUS_DATATYPE_MISALIGNMENT_ERROR}
+
+//
+// MessageId: STATUS_WMI_READ_ONLY
+//
+// MessageText:
+//
+// The WMI data item or data block is read only.
+//
+
+ STATUS_WMI_READ_ONLY = NTSTATUS($C00002C6);
+ {$EXTERNALSYM STATUS_WMI_READ_ONLY}
+
+//
+// MessageId: STATUS_WMI_SET_FAILURE
+//
+// MessageText:
+//
+// The WMI data item or data block could not be changed.
+//
+
+ STATUS_WMI_SET_FAILURE = NTSTATUS($C00002C7);
+ {$EXTERNALSYM STATUS_WMI_SET_FAILURE}
+
+//
+// MessageId: STATUS_COMMITMENT_MINIMUM
+//
+// MessageText:
+//
+// {Virtual Memory Minimum Too Low}
+// Your system is low on virtual memory. Windows is increasing the size of your virtual memory paging file.
+// During this process, memory requests for some applications may be denied. For more information, see Help.
+//
+
+ STATUS_COMMITMENT_MINIMUM = NTSTATUS($C00002C8);
+ {$EXTERNALSYM STATUS_COMMITMENT_MINIMUM}
+
+//
+// MessageId: STATUS_REG_NAT_CONSUMPTION
+//
+// MessageText:
+//
+// {EXCEPTION}
+// Register NaT consumption faults.
+// A NaT value is consumed on a non speculative instruction.
+//
+
+ STATUS_REG_NAT_CONSUMPTION = NTSTATUS($C00002C9); // winnt
+ {$EXTERNALSYM STATUS_REG_NAT_CONSUMPTION}
+
+//
+// MessageId: STATUS_TRANSPORT_FULL
+//
+// MessageText:
+//
+// The medium changer's transport element contains media, which is causing the operation to fail.
+//
+
+ STATUS_TRANSPORT_FULL = NTSTATUS($C00002CA);
+ {$EXTERNALSYM STATUS_TRANSPORT_FULL}
+
+//
+// MessageId: STATUS_DS_SAM_INIT_FAILURE
+//
+// MessageText:
+//
+// Security Accounts Manager initialization failed because of the following error:
+// %hs
+// Error Status: 0x%x.
+// Please click OK to shutdown this system and reboot into Directory Services Restore Mode, check the event log for more detailed information.
+//
+
+ STATUS_DS_SAM_INIT_FAILURE = NTSTATUS($C00002CB);
+ {$EXTERNALSYM STATUS_DS_SAM_INIT_FAILURE}
+
+//
+// MessageId: STATUS_ONLY_IF_CONNECTED
+//
+// MessageText:
+//
+// This operation is supported only when you are connected to the server.
+//
+
+ STATUS_ONLY_IF_CONNECTED = NTSTATUS($C00002CC);
+ {$EXTERNALSYM STATUS_ONLY_IF_CONNECTED}
+
+//
+// MessageId: STATUS_DS_SENSITIVE_GROUP_VIOLATION
+//
+// MessageText:
+//
+// Only an administrator can modify the membership list of an administrative group.
+//
+
+ STATUS_DS_SENSITIVE_GROUP_VIOLATION = NTSTATUS($C00002CD);
+ {$EXTERNALSYM STATUS_DS_SENSITIVE_GROUP_VIOLATION}
+
+//
+// MessageId: STATUS_PNP_RESTART_ENUMERATION
+//
+// MessageText:
+//
+// A device was removed so enumeration must be restarted.
+//
+
+ STATUS_PNP_RESTART_ENUMERATION = NTSTATUS($C00002CE);
+ {$EXTERNALSYM STATUS_PNP_RESTART_ENUMERATION}
+
+//
+// MessageId: STATUS_JOURNAL_ENTRY_DELETED
+//
+// MessageText:
+//
+// The journal entry has been deleted from the journal.
+//
+
+ STATUS_JOURNAL_ENTRY_DELETED = NTSTATUS($C00002CF);
+ {$EXTERNALSYM STATUS_JOURNAL_ENTRY_DELETED}
+
+//
+// MessageId: STATUS_DS_CANT_MOD_PRIMARYGROUPID
+//
+// MessageText:
+//
+// Cannot change the primary group ID of a domain controller account.
+//
+
+ STATUS_DS_CANT_MOD_PRIMARYGROUPID = NTSTATUS($C00002D0);
+ {$EXTERNALSYM STATUS_DS_CANT_MOD_PRIMARYGROUPID}
+
+//
+// MessageId: STATUS_SYSTEM_IMAGE_BAD_SIGNATURE
+//
+// MessageText:
+//
+// {Fatal System Error}
+// The system image %s is not properly signed.
+// The file has been replaced with the signed file.
+// The system has been shut down.
+//
+
+ STATUS_SYSTEM_IMAGE_BAD_SIGNATURE = NTSTATUS($C00002D1);
+ {$EXTERNALSYM STATUS_SYSTEM_IMAGE_BAD_SIGNATURE}
+
+//
+// MessageId: STATUS_PNP_REBOOT_REQUIRED
+//
+// MessageText:
+//
+// Device will not start without a reboot.
+//
+
+ STATUS_PNP_REBOOT_REQUIRED = NTSTATUS($C00002D2);
+ {$EXTERNALSYM STATUS_PNP_REBOOT_REQUIRED}
+
+//
+// MessageId: STATUS_POWER_STATE_INVALID
+//
+// MessageText:
+//
+// Current device power state cannot support this request.
+//
+
+ STATUS_POWER_STATE_INVALID = NTSTATUS($C00002D3);
+ {$EXTERNALSYM STATUS_POWER_STATE_INVALID}
+
+//
+// MessageId: STATUS_DS_INVALID_GROUP_TYPE
+//
+// MessageText:
+//
+// The specified group type is invalid.
+//
+
+ STATUS_DS_INVALID_GROUP_TYPE = NTSTATUS($C00002D4);
+ {$EXTERNALSYM STATUS_DS_INVALID_GROUP_TYPE}
+
+//
+// MessageId: STATUS_DS_NO_NEST_GLOBALGROUP_IN_MIXEDDOMAIN
+//
+// MessageText:
+//
+// In mixed domain no nesting of global group if group is security enabled.
+//
+
+ STATUS_DS_NO_NEST_GLOBALGROUP_IN_MIXEDDOMAIN = NTSTATUS($C00002D5);
+ {$EXTERNALSYM STATUS_DS_NO_NEST_GLOBALGROUP_IN_MIXEDDOMAIN}
+
+//
+// MessageId: STATUS_DS_NO_NEST_LOCALGROUP_IN_MIXEDDOMAIN
+//
+// MessageText:
+//
+// In mixed domain, cannot nest local groups with other local groups, if the group is security enabled.
+//
+
+ STATUS_DS_NO_NEST_LOCALGROUP_IN_MIXEDDOMAIN = NTSTATUS($C00002D6);
+ {$EXTERNALSYM STATUS_DS_NO_NEST_LOCALGROUP_IN_MIXEDDOMAIN}
+
+//
+// MessageId: STATUS_DS_GLOBAL_CANT_HAVE_LOCAL_MEMBER
+//
+// MessageText:
+//
+// A global group cannot have a local group as a member.
+//
+
+ STATUS_DS_GLOBAL_CANT_HAVE_LOCAL_MEMBER = NTSTATUS($C00002D7);
+ {$EXTERNALSYM STATUS_DS_GLOBAL_CANT_HAVE_LOCAL_MEMBER}
+
+//
+// MessageId: STATUS_DS_GLOBAL_CANT_HAVE_UNIVERSAL_MEMBER
+//
+// MessageText:
+//
+// A global group cannot have a universal group as a member.
+//
+
+ STATUS_DS_GLOBAL_CANT_HAVE_UNIVERSAL_MEMBER = NTSTATUS($C00002D8);
+ {$EXTERNALSYM STATUS_DS_GLOBAL_CANT_HAVE_UNIVERSAL_MEMBER}
+
+//
+// MessageId: STATUS_DS_UNIVERSAL_CANT_HAVE_LOCAL_MEMBER
+//
+// MessageText:
+//
+// A universal group cannot have a local group as a member.
+//
+
+ STATUS_DS_UNIVERSAL_CANT_HAVE_LOCAL_MEMBER = NTSTATUS($C00002D9);
+ {$EXTERNALSYM STATUS_DS_UNIVERSAL_CANT_HAVE_LOCAL_MEMBER}
+
+//
+// MessageId: STATUS_DS_GLOBAL_CANT_HAVE_CROSSDOMAIN_MEMBER
+//
+// MessageText:
+//
+// A global group cannot have a cross domain member.
+//
+
+ STATUS_DS_GLOBAL_CANT_HAVE_CROSSDOMAIN_MEMBER = NTSTATUS($C00002DA);
+ {$EXTERNALSYM STATUS_DS_GLOBAL_CANT_HAVE_CROSSDOMAIN_MEMBER}
+
+//
+// MessageId: STATUS_DS_LOCAL_CANT_HAVE_CROSSDOMAIN_LOCAL_MEMBER
+//
+// MessageText:
+//
+// A local group cannot have another cross domain local group as a member.
+//
+
+ STATUS_DS_LOCAL_CANT_HAVE_CROSSDOMAIN_LOCAL_MEMBER = NTSTATUS($C00002DB);
+ {$EXTERNALSYM STATUS_DS_LOCAL_CANT_HAVE_CROSSDOMAIN_LOCAL_MEMBER}
+
+//
+// MessageId: STATUS_DS_HAVE_PRIMARY_MEMBERS
+//
+// MessageText:
+//
+// Can not change to security disabled group because of having primary members in this group.
+//
+
+ STATUS_DS_HAVE_PRIMARY_MEMBERS = NTSTATUS($C00002DC);
+ {$EXTERNALSYM STATUS_DS_HAVE_PRIMARY_MEMBERS}
+
+//
+// MessageId: STATUS_WMI_NOT_SUPPORTED
+//
+// MessageText:
+//
+// The WMI operation is not supported by the data block or method.
+//
+
+ STATUS_WMI_NOT_SUPPORTED = NTSTATUS($C00002DD);
+ {$EXTERNALSYM STATUS_WMI_NOT_SUPPORTED}
+
+//
+// MessageId: STATUS_INSUFFICIENT_POWER
+//
+// MessageText:
+//
+// There is not enough power to complete the requested operation.
+//
+
+ STATUS_INSUFFICIENT_POWER = NTSTATUS($C00002DE);
+ {$EXTERNALSYM STATUS_INSUFFICIENT_POWER}
+
+//
+// MessageId: STATUS_SAM_NEED_BOOTKEY_PASSWORD
+//
+// MessageText:
+//
+// Security Account Manager needs to get the boot password.
+//
+
+ STATUS_SAM_NEED_BOOTKEY_PASSWORD = NTSTATUS($C00002DF);
+ {$EXTERNALSYM STATUS_SAM_NEED_BOOTKEY_PASSWORD}
+
+//
+// MessageId: STATUS_SAM_NEED_BOOTKEY_FLOPPY
+//
+// MessageText:
+//
+// Security Account Manager needs to get the boot key from floppy disk.
+//
+
+ STATUS_SAM_NEED_BOOTKEY_FLOPPY = NTSTATUS($C00002E0);
+ {$EXTERNALSYM STATUS_SAM_NEED_BOOTKEY_FLOPPY}
+
+//
+// MessageId: STATUS_DS_CANT_START
+//
+// MessageText:
+//
+// Directory Service can not start.
+//
+
+ STATUS_DS_CANT_START = NTSTATUS($C00002E1);
+ {$EXTERNALSYM STATUS_DS_CANT_START}
+
+//
+// MessageId: STATUS_DS_INIT_FAILURE
+//
+// MessageText:
+//
+// Directory Services could not start because of the following error:
+// %hs
+// Error Status: 0x%x.
+// Please click OK to shutdown this system and reboot into Directory Services Restore Mode, check the event log for more detailed information.
+//
+
+ STATUS_DS_INIT_FAILURE = NTSTATUS($C00002E2);
+ {$EXTERNALSYM STATUS_DS_INIT_FAILURE}
+
+//
+// MessageId: STATUS_SAM_INIT_FAILURE
+//
+// MessageText:
+//
+// Security Accounts Manager initialization failed because of the following error:
+// %hs
+// Error Status: 0x%x.
+// Please click OK to shutdown this system and reboot into Safe Mode, check the event log for more detailed information.
+//
+
+ STATUS_SAM_INIT_FAILURE = NTSTATUS($C00002E3);
+ {$EXTERNALSYM STATUS_SAM_INIT_FAILURE}
+
+//
+// MessageId: STATUS_DS_GC_REQUIRED
+//
+// MessageText:
+//
+// The requested operation can be performed only on a global catalog server.
+//
+
+ STATUS_DS_GC_REQUIRED = NTSTATUS($C00002E4);
+ {$EXTERNALSYM STATUS_DS_GC_REQUIRED}
+
+//
+// MessageId: STATUS_DS_LOCAL_MEMBER_OF_LOCAL_ONLY
+//
+// MessageText:
+//
+// A local group can only be a member of other local groups in the same domain.
+//
+
+ STATUS_DS_LOCAL_MEMBER_OF_LOCAL_ONLY = NTSTATUS($C00002E5);
+ {$EXTERNALSYM STATUS_DS_LOCAL_MEMBER_OF_LOCAL_ONLY}
+
+//
+// MessageId: STATUS_DS_NO_FPO_IN_UNIVERSAL_GROUPS
+//
+// MessageText:
+//
+// Foreign security principals cannot be members of universal groups.
+//
+
+ STATUS_DS_NO_FPO_IN_UNIVERSAL_GROUPS = NTSTATUS($C00002E6);
+ {$EXTERNALSYM STATUS_DS_NO_FPO_IN_UNIVERSAL_GROUPS}
+
+//
+// MessageId: STATUS_DS_MACHINE_ACCOUNT_QUOTA_EXCEEDED
+//
+// MessageText:
+//
+// Your computer could not be joined to the domain. You have exceeded the maximum number of computer accounts you are allowed to create in this domain. Contact your system administrator to have this limit reset or increased.
+//
+
+ STATUS_DS_MACHINE_ACCOUNT_QUOTA_EXCEEDED = NTSTATUS($C00002E7);
+ {$EXTERNALSYM STATUS_DS_MACHINE_ACCOUNT_QUOTA_EXCEEDED}
+
+//
+// MessageId: STATUS_MULTIPLE_FAULT_VIOLATION
+//
+// MessageText:
+//
+// STATUS_MULTIPLE_FAULT_VIOLATION
+//
+
+ STATUS_MULTIPLE_FAULT_VIOLATION = NTSTATUS($C00002E8);
+ {$EXTERNALSYM STATUS_MULTIPLE_FAULT_VIOLATION}
+
+//
+// MessageId: STATUS_NOT_SUPPORTED_ON_SBS
+//
+// MessageText:
+//
+// This operation is not supported on a Microsoft Small Business Server
+//
+
+ STATUS_NOT_SUPPORTED_ON_SBS = NTSTATUS($C0000300);
+ {$EXTERNALSYM STATUS_NOT_SUPPORTED_ON_SBS}
+
+//
+// MessageId: STATUS_WOW_ASSERTION
+//
+// MessageText:
+//
+// WOW Assertion Error.
+//
+
+ STATUS_WOW_ASSERTION = NTSTATUS($C0009898);
+ {$EXTERNALSYM STATUS_WOW_ASSERTION}
+
+//
+// MessageId: DBG_NO_STATE_CHANGE
+//
+// MessageText:
+//
+// Debugger did not perform a state change.
+//
+
+ DBG_NO_STATE_CHANGE = NTSTATUS($C0010001);
+ {$EXTERNALSYM DBG_NO_STATE_CHANGE}
+
+//
+// MessageId: DBG_APP_NOT_IDLE
+//
+// MessageText:
+//
+// Debugger has found the application is not idle.
+//
+
+ DBG_APP_NOT_IDLE = NTSTATUS($C0010002);
+ {$EXTERNALSYM DBG_APP_NOT_IDLE}
+
+//
+// MessageId: RPC_NT_INVALID_STRING_BINDING
+//
+// MessageText:
+//
+// The string binding is invalid.
+//
+
+ RPC_NT_INVALID_STRING_BINDING = NTSTATUS($C0020001);
+ {$EXTERNALSYM RPC_NT_INVALID_STRING_BINDING}
+
+//
+// MessageId: RPC_NT_WRONG_KIND_OF_BINDING
+//
+// MessageText:
+//
+// The binding handle is not the correct type.
+//
+
+ RPC_NT_WRONG_KIND_OF_BINDING = NTSTATUS($C0020002);
+ {$EXTERNALSYM RPC_NT_WRONG_KIND_OF_BINDING}
+
+//
+// MessageId: RPC_NT_INVALID_BINDING
+//
+// MessageText:
+//
+// The binding handle is invalid.
+//
+
+ RPC_NT_INVALID_BINDING = NTSTATUS($C0020003);
+ {$EXTERNALSYM RPC_NT_INVALID_BINDING}
+
+//
+// MessageId: RPC_NT_PROTSEQ_NOT_SUPPORTED
+//
+// MessageText:
+//
+// The RPC protocol sequence is not supported.
+//
+
+ RPC_NT_PROTSEQ_NOT_SUPPORTED = NTSTATUS($C0020004);
+ {$EXTERNALSYM RPC_NT_PROTSEQ_NOT_SUPPORTED}
+
+//
+// MessageId: RPC_NT_INVALID_RPC_PROTSEQ
+//
+// MessageText:
+//
+// The RPC protocol sequence is invalid.
+//
+
+ RPC_NT_INVALID_RPC_PROTSEQ = NTSTATUS($C0020005);
+ {$EXTERNALSYM RPC_NT_INVALID_RPC_PROTSEQ}
+
+//
+// MessageId: RPC_NT_INVALID_STRING_UUID
+//
+// MessageText:
+//
+// The string UUID is invalid.
+//
+
+ RPC_NT_INVALID_STRING_UUID = NTSTATUS($C0020006);
+ {$EXTERNALSYM RPC_NT_INVALID_STRING_UUID}
+
+//
+// MessageId: RPC_NT_INVALID_ENDPOINT_FORMAT
+//
+// MessageText:
+//
+// The endpoint format is invalid.
+//
+
+ RPC_NT_INVALID_ENDPOINT_FORMAT = NTSTATUS($C0020007);
+ {$EXTERNALSYM RPC_NT_INVALID_ENDPOINT_FORMAT}
+
+//
+// MessageId: RPC_NT_INVALID_NET_ADDR
+//
+// MessageText:
+//
+// The network address is invalid.
+//
+
+ RPC_NT_INVALID_NET_ADDR = NTSTATUS($C0020008);
+ {$EXTERNALSYM RPC_NT_INVALID_NET_ADDR}
+
+//
+// MessageId: RPC_NT_NO_ENDPOINT_FOUND
+//
+// MessageText:
+//
+// No endpoint was found.
+//
+
+ RPC_NT_NO_ENDPOINT_FOUND = NTSTATUS($C0020009);
+ {$EXTERNALSYM RPC_NT_NO_ENDPOINT_FOUND}
+
+//
+// MessageId: RPC_NT_INVALID_TIMEOUT
+//
+// MessageText:
+//
+// The timeout value is invalid.
+//
+
+ RPC_NT_INVALID_TIMEOUT = NTSTATUS($C002000A);
+ {$EXTERNALSYM RPC_NT_INVALID_TIMEOUT}
+
+//
+// MessageId: RPC_NT_OBJECT_NOT_FOUND
+//
+// MessageText:
+//
+// The object UUID was not found.
+//
+
+ RPC_NT_OBJECT_NOT_FOUND = NTSTATUS($C002000B);
+ {$EXTERNALSYM RPC_NT_OBJECT_NOT_FOUND}
+
+//
+// MessageId: RPC_NT_ALREADY_REGISTERED
+//
+// MessageText:
+//
+// The object UUID has already been registered.
+//
+
+ RPC_NT_ALREADY_REGISTERED = NTSTATUS($C002000C);
+ {$EXTERNALSYM RPC_NT_ALREADY_REGISTERED}
+
+//
+// MessageId: RPC_NT_TYPE_ALREADY_REGISTERED
+//
+// MessageText:
+//
+// The type UUID has already been registered.
+//
+
+ RPC_NT_TYPE_ALREADY_REGISTERED = NTSTATUS($C002000D);
+ {$EXTERNALSYM RPC_NT_TYPE_ALREADY_REGISTERED}
+
+//
+// MessageId: RPC_NT_ALREADY_LISTENING
+//
+// MessageText:
+//
+// The RPC server is already listening.
+//
+
+ RPC_NT_ALREADY_LISTENING = NTSTATUS($C002000E);
+ {$EXTERNALSYM RPC_NT_ALREADY_LISTENING}
+
+//
+// MessageId: RPC_NT_NO_PROTSEQS_REGISTERED
+//
+// MessageText:
+//
+// No protocol sequences have been registered.
+//
+
+ RPC_NT_NO_PROTSEQS_REGISTERED = NTSTATUS($C002000F);
+ {$EXTERNALSYM RPC_NT_NO_PROTSEQS_REGISTERED}
+
+//
+// MessageId: RPC_NT_NOT_LISTENING
+//
+// MessageText:
+//
+// The RPC server is not listening.
+//
+
+ RPC_NT_NOT_LISTENING = NTSTATUS($C0020010);
+ {$EXTERNALSYM RPC_NT_NOT_LISTENING}
+
+//
+// MessageId: RPC_NT_UNKNOWN_MGR_TYPE
+//
+// MessageText:
+//
+// The manager type is unknown.
+//
+
+ RPC_NT_UNKNOWN_MGR_TYPE = NTSTATUS($C0020011);
+ {$EXTERNALSYM RPC_NT_UNKNOWN_MGR_TYPE}
+
+//
+// MessageId: RPC_NT_UNKNOWN_IF
+//
+// MessageText:
+//
+// The interface is unknown.
+//
+
+ RPC_NT_UNKNOWN_IF = NTSTATUS($C0020012);
+ {$EXTERNALSYM RPC_NT_UNKNOWN_IF}
+
+//
+// MessageId: RPC_NT_NO_BINDINGS
+//
+// MessageText:
+//
+// There are no bindings.
+//
+
+ RPC_NT_NO_BINDINGS = NTSTATUS($C0020013);
+ {$EXTERNALSYM RPC_NT_NO_BINDINGS}
+
+//
+// MessageId: RPC_NT_NO_PROTSEQS
+//
+// MessageText:
+//
+// There are no protocol sequences.
+//
+
+ RPC_NT_NO_PROTSEQS = NTSTATUS($C0020014);
+ {$EXTERNALSYM RPC_NT_NO_PROTSEQS}
+
+//
+// MessageId: RPC_NT_CANT_CREATE_ENDPOINT
+//
+// MessageText:
+//
+// The endpoint cannot be created.
+//
+
+ RPC_NT_CANT_CREATE_ENDPOINT = NTSTATUS($C0020015);
+ {$EXTERNALSYM RPC_NT_CANT_CREATE_ENDPOINT}
+
+//
+// MessageId: RPC_NT_OUT_OF_RESOURCES
+//
+// MessageText:
+//
+// Not enough resources are available to complete this operation.
+//
+
+ RPC_NT_OUT_OF_RESOURCES = NTSTATUS($C0020016);
+ {$EXTERNALSYM RPC_NT_OUT_OF_RESOURCES}
+
+//
+// MessageId: RPC_NT_SERVER_UNAVAILABLE
+//
+// MessageText:
+//
+// The RPC server is unavailable.
+//
+
+ RPC_NT_SERVER_UNAVAILABLE = NTSTATUS($C0020017);
+ {$EXTERNALSYM RPC_NT_SERVER_UNAVAILABLE}
+
+//
+// MessageId: RPC_NT_SERVER_TOO_BUSY
+//
+// MessageText:
+//
+// The RPC server is too busy to complete this operation.
+//
+
+ RPC_NT_SERVER_TOO_BUSY = NTSTATUS($C0020018);
+ {$EXTERNALSYM RPC_NT_SERVER_TOO_BUSY}
+
+//
+// MessageId: RPC_NT_INVALID_NETWORK_OPTIONS
+//
+// MessageText:
+//
+// The network options are invalid.
+//
+
+ RPC_NT_INVALID_NETWORK_OPTIONS = NTSTATUS($C0020019);
+ {$EXTERNALSYM RPC_NT_INVALID_NETWORK_OPTIONS}
+
+//
+// MessageId: RPC_NT_NO_CALL_ACTIVE
+//
+// MessageText:
+//
+// There are no remote procedure calls active on this thread.
+//
+
+ RPC_NT_NO_CALL_ACTIVE = NTSTATUS($C002001A);
+ {$EXTERNALSYM RPC_NT_NO_CALL_ACTIVE}
+
+//
+// MessageId: RPC_NT_CALL_FAILED
+//
+// MessageText:
+//
+// The remote procedure call failed.
+//
+
+ RPC_NT_CALL_FAILED = NTSTATUS($C002001B);
+ {$EXTERNALSYM RPC_NT_CALL_FAILED}
+
+//
+// MessageId: RPC_NT_CALL_FAILED_DNE
+//
+// MessageText:
+//
+// The remote procedure call failed and did not execute.
+//
+
+ RPC_NT_CALL_FAILED_DNE = NTSTATUS($C002001C);
+ {$EXTERNALSYM RPC_NT_CALL_FAILED_DNE}
+
+//
+// MessageId: RPC_NT_PROTOCOL_ERROR
+//
+// MessageText:
+//
+// An RPC protocol error occurred.
+//
+
+ RPC_NT_PROTOCOL_ERROR = NTSTATUS($C002001D);
+ {$EXTERNALSYM RPC_NT_PROTOCOL_ERROR}
+
+//
+// MessageId: RPC_NT_UNSUPPORTED_TRANS_SYN
+//
+// MessageText:
+//
+// The transfer syntax is not supported by the RPC server.
+//
+
+ RPC_NT_UNSUPPORTED_TRANS_SYN = NTSTATUS($C002001F);
+ {$EXTERNALSYM RPC_NT_UNSUPPORTED_TRANS_SYN}
+
+//
+// MessageId: RPC_NT_UNSUPPORTED_TYPE
+//
+// MessageText:
+//
+// The type UUID is not supported.
+//
+
+ RPC_NT_UNSUPPORTED_TYPE = NTSTATUS($C0020021);
+ {$EXTERNALSYM RPC_NT_UNSUPPORTED_TYPE}
+
+//
+// MessageId: RPC_NT_INVALID_TAG
+//
+// MessageText:
+//
+// The tag is invalid.
+//
+
+ RPC_NT_INVALID_TAG = NTSTATUS($C0020022);
+ {$EXTERNALSYM RPC_NT_INVALID_TAG}
+
+//
+// MessageId: RPC_NT_INVALID_BOUND
+//
+// MessageText:
+//
+// The array bounds are invalid.
+//
+
+ RPC_NT_INVALID_BOUND = NTSTATUS($C0020023);
+ {$EXTERNALSYM RPC_NT_INVALID_BOUND}
+
+//
+// MessageId: RPC_NT_NO_ENTRY_NAME
+//
+// MessageText:
+//
+// The binding does not contain an entry name.
+//
+
+ RPC_NT_NO_ENTRY_NAME = NTSTATUS($C0020024);
+ {$EXTERNALSYM RPC_NT_NO_ENTRY_NAME}
+
+//
+// MessageId: RPC_NT_INVALID_NAME_SYNTAX
+//
+// MessageText:
+//
+// The name syntax is invalid.
+//
+
+ RPC_NT_INVALID_NAME_SYNTAX = NTSTATUS($C0020025);
+ {$EXTERNALSYM RPC_NT_INVALID_NAME_SYNTAX}
+
+//
+// MessageId: RPC_NT_UNSUPPORTED_NAME_SYNTAX
+//
+// MessageText:
+//
+// The name syntax is not supported.
+//
+
+ RPC_NT_UNSUPPORTED_NAME_SYNTAX = NTSTATUS($C0020026);
+ {$EXTERNALSYM RPC_NT_UNSUPPORTED_NAME_SYNTAX}
+
+//
+// MessageId: RPC_NT_UUID_NO_ADDRESS
+//
+// MessageText:
+//
+// No network address is available to use to construct a UUID.
+//
+
+ RPC_NT_UUID_NO_ADDRESS = NTSTATUS($C0020028);
+ {$EXTERNALSYM RPC_NT_UUID_NO_ADDRESS}
+
+//
+// MessageId: RPC_NT_DUPLICATE_ENDPOINT
+//
+// MessageText:
+//
+// The endpoint is a duplicate.
+//
+
+ RPC_NT_DUPLICATE_ENDPOINT = NTSTATUS($C0020029);
+ {$EXTERNALSYM RPC_NT_DUPLICATE_ENDPOINT}
+
+//
+// MessageId: RPC_NT_UNKNOWN_AUTHN_TYPE
+//
+// MessageText:
+//
+// The authentication type is unknown.
+//
+
+ RPC_NT_UNKNOWN_AUTHN_TYPE = NTSTATUS($C002002A);
+ {$EXTERNALSYM RPC_NT_UNKNOWN_AUTHN_TYPE}
+
+//
+// MessageId: RPC_NT_MAX_CALLS_TOO_SMALL
+//
+// MessageText:
+//
+// The maximum number of calls is too small.
+//
+
+ RPC_NT_MAX_CALLS_TOO_SMALL = NTSTATUS($C002002B);
+ {$EXTERNALSYM RPC_NT_MAX_CALLS_TOO_SMALL}
+
+//
+// MessageId: RPC_NT_STRING_TOO_LONG
+//
+// MessageText:
+//
+// The string is too long.
+//
+
+ RPC_NT_STRING_TOO_LONG = NTSTATUS($C002002C);
+ {$EXTERNALSYM RPC_NT_STRING_TOO_LONG}
+
+//
+// MessageId: RPC_NT_PROTSEQ_NOT_FOUND
+//
+// MessageText:
+//
+// The RPC protocol sequence was not found.
+//
+
+ RPC_NT_PROTSEQ_NOT_FOUND = NTSTATUS($C002002D);
+ {$EXTERNALSYM RPC_NT_PROTSEQ_NOT_FOUND}
+
+//
+// MessageId: RPC_NT_PROCNUM_OUT_OF_RANGE
+//
+// MessageText:
+//
+// The procedure number is out of range.
+//
+
+ RPC_NT_PROCNUM_OUT_OF_RANGE = NTSTATUS($C002002E);
+ {$EXTERNALSYM RPC_NT_PROCNUM_OUT_OF_RANGE}
+
+//
+// MessageId: RPC_NT_BINDING_HAS_NO_AUTH
+//
+// MessageText:
+//
+// The binding does not contain any authentication information.
+//
+
+ RPC_NT_BINDING_HAS_NO_AUTH = NTSTATUS($C002002F);
+ {$EXTERNALSYM RPC_NT_BINDING_HAS_NO_AUTH}
+
+//
+// MessageId: RPC_NT_UNKNOWN_AUTHN_SERVICE
+//
+// MessageText:
+//
+// The authentication service is unknown.
+//
+
+ RPC_NT_UNKNOWN_AUTHN_SERVICE = NTSTATUS($C0020030);
+ {$EXTERNALSYM RPC_NT_UNKNOWN_AUTHN_SERVICE}
+
+//
+// MessageId: RPC_NT_UNKNOWN_AUTHN_LEVEL
+//
+// MessageText:
+//
+// The authentication level is unknown.
+//
+
+ RPC_NT_UNKNOWN_AUTHN_LEVEL = NTSTATUS($C0020031);
+ {$EXTERNALSYM RPC_NT_UNKNOWN_AUTHN_LEVEL}
+
+//
+// MessageId: RPC_NT_INVALID_AUTH_IDENTITY
+//
+// MessageText:
+//
+// The security context is invalid.
+//
+
+ RPC_NT_INVALID_AUTH_IDENTITY = NTSTATUS($C0020032);
+ {$EXTERNALSYM RPC_NT_INVALID_AUTH_IDENTITY}
+
+//
+// MessageId: RPC_NT_UNKNOWN_AUTHZ_SERVICE
+//
+// MessageText:
+//
+// The authorization service is unknown.
+//
+
+ RPC_NT_UNKNOWN_AUTHZ_SERVICE = NTSTATUS($C0020033);
+ {$EXTERNALSYM RPC_NT_UNKNOWN_AUTHZ_SERVICE}
+
+//
+// MessageId: EPT_NT_INVALID_ENTRY
+//
+// MessageText:
+//
+// The entry is invalid.
+//
+
+ EPT_NT_INVALID_ENTRY = NTSTATUS($C0020034);
+ {$EXTERNALSYM EPT_NT_INVALID_ENTRY}
+
+//
+// MessageId: EPT_NT_CANT_PERFORM_OP
+//
+// MessageText:
+//
+// The operation cannot be performed.
+//
+
+ EPT_NT_CANT_PERFORM_OP = NTSTATUS($C0020035);
+ {$EXTERNALSYM EPT_NT_CANT_PERFORM_OP}
+
+//
+// MessageId: EPT_NT_NOT_REGISTERED
+//
+// MessageText:
+//
+// There are no more endpoints available from the endpoint mapper.
+//
+
+ EPT_NT_NOT_REGISTERED = NTSTATUS($C0020036);
+ {$EXTERNALSYM EPT_NT_NOT_REGISTERED}
+
+//
+// MessageId: RPC_NT_NOTHING_TO_EXPORT
+//
+// MessageText:
+//
+// No interfaces have been exported.
+//
+
+ RPC_NT_NOTHING_TO_EXPORT = NTSTATUS($C0020037);
+ {$EXTERNALSYM RPC_NT_NOTHING_TO_EXPORT}
+
+//
+// MessageId: RPC_NT_INCOMPLETE_NAME
+//
+// MessageText:
+//
+// The entry name is incomplete.
+//
+
+ RPC_NT_INCOMPLETE_NAME = NTSTATUS($C0020038);
+ {$EXTERNALSYM RPC_NT_INCOMPLETE_NAME}
+
+//
+// MessageId: RPC_NT_INVALID_VERS_OPTION
+//
+// MessageText:
+//
+// The version option is invalid.
+//
+
+ RPC_NT_INVALID_VERS_OPTION = NTSTATUS($C0020039);
+ {$EXTERNALSYM RPC_NT_INVALID_VERS_OPTION}
+
+//
+// MessageId: RPC_NT_NO_MORE_MEMBERS
+//
+// MessageText:
+//
+// There are no more members.
+//
+
+ RPC_NT_NO_MORE_MEMBERS = NTSTATUS($C002003A);
+ {$EXTERNALSYM RPC_NT_NO_MORE_MEMBERS}
+
+//
+// MessageId: RPC_NT_NOT_ALL_OBJS_UNEXPORTED
+//
+// MessageText:
+//
+// There is nothing to unexport.
+//
+
+ RPC_NT_NOT_ALL_OBJS_UNEXPORTED = NTSTATUS($C002003B);
+ {$EXTERNALSYM RPC_NT_NOT_ALL_OBJS_UNEXPORTED}
+
+//
+// MessageId: RPC_NT_INTERFACE_NOT_FOUND
+//
+// MessageText:
+//
+// The interface was not found.
+//
+
+ RPC_NT_INTERFACE_NOT_FOUND = NTSTATUS($C002003C);
+ {$EXTERNALSYM RPC_NT_INTERFACE_NOT_FOUND}
+
+//
+// MessageId: RPC_NT_ENTRY_ALREADY_EXISTS
+//
+// MessageText:
+//
+// The entry already exists.
+//
+
+ RPC_NT_ENTRY_ALREADY_EXISTS = NTSTATUS($C002003D);
+ {$EXTERNALSYM RPC_NT_ENTRY_ALREADY_EXISTS}
+
+//
+// MessageId: RPC_NT_ENTRY_NOT_FOUND
+//
+// MessageText:
+//
+// The entry is not found.
+//
+
+ RPC_NT_ENTRY_NOT_FOUND = NTSTATUS($C002003E);
+ {$EXTERNALSYM RPC_NT_ENTRY_NOT_FOUND}
+
+//
+// MessageId: RPC_NT_NAME_SERVICE_UNAVAILABLE
+//
+// MessageText:
+//
+// The name service is unavailable.
+//
+
+ RPC_NT_NAME_SERVICE_UNAVAILABLE = NTSTATUS($C002003F);
+ {$EXTERNALSYM RPC_NT_NAME_SERVICE_UNAVAILABLE}
+
+//
+// MessageId: RPC_NT_INVALID_NAF_ID
+//
+// MessageText:
+//
+// The network address family is invalid.
+//
+
+ RPC_NT_INVALID_NAF_ID = NTSTATUS($C0020040);
+ {$EXTERNALSYM RPC_NT_INVALID_NAF_ID}
+
+//
+// MessageId: RPC_NT_CANNOT_SUPPORT
+//
+// MessageText:
+//
+// The requested operation is not supported.
+//
+
+ RPC_NT_CANNOT_SUPPORT = NTSTATUS($C0020041);
+ {$EXTERNALSYM RPC_NT_CANNOT_SUPPORT}
+
+//
+// MessageId: RPC_NT_NO_CONTEXT_AVAILABLE
+//
+// MessageText:
+//
+// No security context is available to allow impersonation.
+//
+
+ RPC_NT_NO_CONTEXT_AVAILABLE = NTSTATUS($C0020042);
+ {$EXTERNALSYM RPC_NT_NO_CONTEXT_AVAILABLE}
+
+//
+// MessageId: RPC_NT_INTERNAL_ERROR
+//
+// MessageText:
+//
+// An internal error occurred in RPC.
+//
+
+ RPC_NT_INTERNAL_ERROR = NTSTATUS($C0020043);
+ {$EXTERNALSYM RPC_NT_INTERNAL_ERROR}
+
+//
+// MessageId: RPC_NT_ZERO_DIVIDE
+//
+// MessageText:
+//
+// The RPC server attempted an integer divide by zero.
+//
+
+ RPC_NT_ZERO_DIVIDE = NTSTATUS($C0020044);
+ {$EXTERNALSYM RPC_NT_ZERO_DIVIDE}
+
+//
+// MessageId: RPC_NT_ADDRESS_ERROR
+//
+// MessageText:
+//
+// An addressing error occurred in the RPC server.
+//
+
+ RPC_NT_ADDRESS_ERROR = NTSTATUS($C0020045);
+ {$EXTERNALSYM RPC_NT_ADDRESS_ERROR}
+
+//
+// MessageId: RPC_NT_FP_DIV_ZERO
+//
+// MessageText:
+//
+// A floating point operation at the RPC server caused a divide by zero.
+//
+
+ RPC_NT_FP_DIV_ZERO = NTSTATUS($C0020046);
+ {$EXTERNALSYM RPC_NT_FP_DIV_ZERO}
+
+//
+// MessageId: RPC_NT_FP_UNDERFLOW
+//
+// MessageText:
+//
+// A floating point underflow occurred at the RPC server.
+//
+
+ RPC_NT_FP_UNDERFLOW = NTSTATUS($C0020047);
+ {$EXTERNALSYM RPC_NT_FP_UNDERFLOW}
+
+//
+// MessageId: RPC_NT_FP_OVERFLOW
+//
+// MessageText:
+//
+// A floating point overflow occurred at the RPC server.
+//
+
+ RPC_NT_FP_OVERFLOW = NTSTATUS($C0020048);
+ {$EXTERNALSYM RPC_NT_FP_OVERFLOW}
+
+//
+// MessageId: RPC_NT_NO_MORE_ENTRIES
+//
+// MessageText:
+//
+// The list of RPC servers available for auto-handle binding has been exhausted.
+//
+
+ RPC_NT_NO_MORE_ENTRIES = NTSTATUS($C0030001);
+ {$EXTERNALSYM RPC_NT_NO_MORE_ENTRIES}
+
+//
+// MessageId: RPC_NT_SS_CHAR_TRANS_OPEN_FAIL
+//
+// MessageText:
+//
+// The file designated by DCERPCCHARTRANS cannot be opened.
+//
+
+ RPC_NT_SS_CHAR_TRANS_OPEN_FAIL = NTSTATUS($C0030002);
+ {$EXTERNALSYM RPC_NT_SS_CHAR_TRANS_OPEN_FAIL}
+
+//
+// MessageId: RPC_NT_SS_CHAR_TRANS_SHORT_FILE
+//
+// MessageText:
+//
+// The file containing the character translation table has fewer than 512 bytes.
+//
+
+ RPC_NT_SS_CHAR_TRANS_SHORT_FILE = NTSTATUS($C0030003);
+ {$EXTERNALSYM RPC_NT_SS_CHAR_TRANS_SHORT_FILE}
+
+//
+// MessageId: RPC_NT_SS_IN_NULL_CONTEXT
+//
+// MessageText:
+//
+// A null context handle is passed as an [in] parameter.
+//
+
+ RPC_NT_SS_IN_NULL_CONTEXT = NTSTATUS($C0030004);
+ {$EXTERNALSYM RPC_NT_SS_IN_NULL_CONTEXT}
+
+//
+// MessageId: RPC_NT_SS_CONTEXT_MISMATCH
+//
+// MessageText:
+//
+// The context handle does not match any known context handles.
+//
+
+ RPC_NT_SS_CONTEXT_MISMATCH = NTSTATUS($C0030005);
+ {$EXTERNALSYM RPC_NT_SS_CONTEXT_MISMATCH}
+
+//
+// MessageId: RPC_NT_SS_CONTEXT_DAMAGED
+//
+// MessageText:
+//
+// The context handle changed during a call.
+//
+
+ RPC_NT_SS_CONTEXT_DAMAGED = NTSTATUS($C0030006);
+ {$EXTERNALSYM RPC_NT_SS_CONTEXT_DAMAGED}
+
+//
+// MessageId: RPC_NT_SS_HANDLES_MISMATCH
+//
+// MessageText:
+//
+// The binding handles passed to a remote procedure call do not match.
+//
+
+ RPC_NT_SS_HANDLES_MISMATCH = NTSTATUS($C0030007);
+ {$EXTERNALSYM RPC_NT_SS_HANDLES_MISMATCH}
+
+//
+// MessageId: RPC_NT_SS_CANNOT_GET_CALL_HANDLE
+//
+// MessageText:
+//
+// The stub is unable to get the call handle.
+//
+
+ RPC_NT_SS_CANNOT_GET_CALL_HANDLE = NTSTATUS($C0030008);
+ {$EXTERNALSYM RPC_NT_SS_CANNOT_GET_CALL_HANDLE}
+
+//
+// MessageId: RPC_NT_NULL_REF_POINTER
+//
+// MessageText:
+//
+// A null reference pointer was passed to the stub.
+//
+
+ RPC_NT_NULL_REF_POINTER = NTSTATUS($C0030009);
+ {$EXTERNALSYM RPC_NT_NULL_REF_POINTER}
+
+//
+// MessageId: RPC_NT_ENUM_VALUE_OUT_OF_RANGE
+//
+// MessageText:
+//
+// The enumeration value is out of range.
+//
+
+ RPC_NT_ENUM_VALUE_OUT_OF_RANGE = NTSTATUS($C003000A);
+ {$EXTERNALSYM RPC_NT_ENUM_VALUE_OUT_OF_RANGE}
+
+//
+// MessageId: RPC_NT_BYTE_COUNT_TOO_SMALL
+//
+// MessageText:
+//
+// The byte count is too small.
+//
+
+ RPC_NT_BYTE_COUNT_TOO_SMALL = NTSTATUS($C003000B);
+ {$EXTERNALSYM RPC_NT_BYTE_COUNT_TOO_SMALL}
+
+//
+// MessageId: RPC_NT_BAD_STUB_DATA
+//
+// MessageText:
+//
+// The stub received bad data.
+//
+
+ RPC_NT_BAD_STUB_DATA = NTSTATUS($C003000C);
+ {$EXTERNALSYM RPC_NT_BAD_STUB_DATA}
+
+//
+// MessageId: RPC_NT_CALL_IN_PROGRESS
+//
+// MessageText:
+//
+// A remote procedure call is already in progress for this thread.
+//
+
+ RPC_NT_CALL_IN_PROGRESS = NTSTATUS($C0020049);
+ {$EXTERNALSYM RPC_NT_CALL_IN_PROGRESS}
+
+//
+// MessageId: RPC_NT_NO_MORE_BINDINGS
+//
+// MessageText:
+//
+// There are no more bindings.
+//
+
+ RPC_NT_NO_MORE_BINDINGS = NTSTATUS($C002004A);
+ {$EXTERNALSYM RPC_NT_NO_MORE_BINDINGS}
+
+//
+// MessageId: RPC_NT_GROUP_MEMBER_NOT_FOUND
+//
+// MessageText:
+//
+// The group member was not found.
+//
+
+ RPC_NT_GROUP_MEMBER_NOT_FOUND = NTSTATUS($C002004B);
+ {$EXTERNALSYM RPC_NT_GROUP_MEMBER_NOT_FOUND}
+
+//
+// MessageId: EPT_NT_CANT_CREATE
+//
+// MessageText:
+//
+// The endpoint mapper database entry could not be created.
+//
+
+ EPT_NT_CANT_CREATE = NTSTATUS($C002004C);
+ {$EXTERNALSYM EPT_NT_CANT_CREATE}
+
+//
+// MessageId: RPC_NT_INVALID_OBJECT
+//
+// MessageText:
+//
+// The object UUID is the nil UUID.
+//
+
+ RPC_NT_INVALID_OBJECT = NTSTATUS($C002004D);
+ {$EXTERNALSYM RPC_NT_INVALID_OBJECT}
+
+//
+// MessageId: RPC_NT_NO_INTERFACES
+//
+// MessageText:
+//
+// No interfaces have been registered.
+//
+
+ RPC_NT_NO_INTERFACES = NTSTATUS($C002004F);
+ {$EXTERNALSYM RPC_NT_NO_INTERFACES}
+
+//
+// MessageId: RPC_NT_CALL_CANCELLED
+//
+// MessageText:
+//
+// The remote procedure call was cancelled.
+//
+
+ RPC_NT_CALL_CANCELLED = NTSTATUS($C0020050);
+ {$EXTERNALSYM RPC_NT_CALL_CANCELLED}
+
+//
+// MessageId: RPC_NT_BINDING_INCOMPLETE
+//
+// MessageText:
+//
+// The binding handle does not contain all required information.
+//
+
+ RPC_NT_BINDING_INCOMPLETE = NTSTATUS($C0020051);
+ {$EXTERNALSYM RPC_NT_BINDING_INCOMPLETE}
+
+//
+// MessageId: RPC_NT_COMM_FAILURE
+//
+// MessageText:
+//
+// A communications failure occurred during a remote procedure call.
+//
+
+ RPC_NT_COMM_FAILURE = NTSTATUS($C0020052);
+ {$EXTERNALSYM RPC_NT_COMM_FAILURE}
+
+//
+// MessageId: RPC_NT_UNSUPPORTED_AUTHN_LEVEL
+//
+// MessageText:
+//
+// The requested authentication level is not supported.
+//
+
+ RPC_NT_UNSUPPORTED_AUTHN_LEVEL = NTSTATUS($C0020053);
+ {$EXTERNALSYM RPC_NT_UNSUPPORTED_AUTHN_LEVEL}
+
+//
+// MessageId: RPC_NT_NO_PRINC_NAME
+//
+// MessageText:
+//
+// No principal name registered.
+//
+
+ RPC_NT_NO_PRINC_NAME = NTSTATUS($C0020054);
+ {$EXTERNALSYM RPC_NT_NO_PRINC_NAME}
+
+//
+// MessageId: RPC_NT_NOT_RPC_ERROR
+//
+// MessageText:
+//
+// The error specified is not a valid Windows RPC error code.
+//
+
+ RPC_NT_NOT_RPC_ERROR = NTSTATUS($C0020055);
+ {$EXTERNALSYM RPC_NT_NOT_RPC_ERROR}
+
+//
+// MessageId: RPC_NT_UUID_LOCAL_ONLY
+//
+// MessageText:
+//
+// A UUID that is valid only on this computer has been allocated.
+//
+
+ RPC_NT_UUID_LOCAL_ONLY = NTSTATUS($40020056);
+ {$EXTERNALSYM RPC_NT_UUID_LOCAL_ONLY}
+
+//
+// MessageId: RPC_NT_SEC_PKG_ERROR
+//
+// MessageText:
+//
+// A security package specific error occurred.
+//
+
+ RPC_NT_SEC_PKG_ERROR = NTSTATUS($C0020057);
+ {$EXTERNALSYM RPC_NT_SEC_PKG_ERROR}
+
+//
+// MessageId: RPC_NT_NOT_CANCELLED
+//
+// MessageText:
+//
+// Thread is not cancelled.
+//
+
+ RPC_NT_NOT_CANCELLED = NTSTATUS($C0020058);
+ {$EXTERNALSYM RPC_NT_NOT_CANCELLED}
+
+//
+// MessageId: RPC_NT_INVALID_ES_ACTION
+//
+// MessageText:
+//
+// Invalid operation on the encoding/decoding handle.
+//
+
+ RPC_NT_INVALID_ES_ACTION = NTSTATUS($C0030059);
+ {$EXTERNALSYM RPC_NT_INVALID_ES_ACTION}
+
+//
+// MessageId: RPC_NT_WRONG_ES_VERSION
+//
+// MessageText:
+//
+// Incompatible version of the serializing package.
+//
+
+ RPC_NT_WRONG_ES_VERSION = NTSTATUS($C003005A);
+ {$EXTERNALSYM RPC_NT_WRONG_ES_VERSION}
+
+//
+// MessageId: RPC_NT_WRONG_STUB_VERSION
+//
+// MessageText:
+//
+// Incompatible version of the RPC stub.
+//
+
+ RPC_NT_WRONG_STUB_VERSION = NTSTATUS($C003005B);
+ {$EXTERNALSYM RPC_NT_WRONG_STUB_VERSION}
+
+//
+// MessageId: RPC_NT_INVALID_PIPE_OBJECT
+//
+// MessageText:
+//
+// The RPC pipe object is invalid or corrupted.
+//
+
+ RPC_NT_INVALID_PIPE_OBJECT = NTSTATUS($C003005C);
+ {$EXTERNALSYM RPC_NT_INVALID_PIPE_OBJECT}
+
+//
+// MessageId: RPC_NT_INVALID_PIPE_OPERATION
+//
+// MessageText:
+//
+// An invalid operation was attempted on an RPC pipe object.
+//
+
+ RPC_NT_INVALID_PIPE_OPERATION = NTSTATUS($C003005D);
+ {$EXTERNALSYM RPC_NT_INVALID_PIPE_OPERATION}
+
+//
+// MessageId: RPC_NT_WRONG_PIPE_VERSION
+//
+// MessageText:
+//
+// Unsupported RPC pipe version.
+//
+
+ RPC_NT_WRONG_PIPE_VERSION = NTSTATUS($C003005E);
+ {$EXTERNALSYM RPC_NT_WRONG_PIPE_VERSION}
+
+//
+// MessageId: RPC_NT_PIPE_CLOSED
+//
+// MessageText:
+//
+// The RPC pipe object has already been closed.
+//
+
+ RPC_NT_PIPE_CLOSED = NTSTATUS($C003005F);
+ {$EXTERNALSYM RPC_NT_PIPE_CLOSED}
+
+//
+// MessageId: RPC_NT_PIPE_DISCIPLINE_ERROR
+//
+// MessageText:
+//
+// The RPC call completed before all pipes were processed.
+//
+
+ RPC_NT_PIPE_DISCIPLINE_ERROR = NTSTATUS($C0030060);
+ {$EXTERNALSYM RPC_NT_PIPE_DISCIPLINE_ERROR}
+
+//
+// MessageId: RPC_NT_PIPE_EMPTY
+//
+// MessageText:
+//
+// No more data is available from the RPC pipe.
+//
+
+ RPC_NT_PIPE_EMPTY = NTSTATUS($C0030061);
+ {$EXTERNALSYM RPC_NT_PIPE_EMPTY}
+
+//
+// MessageId: RPC_NT_INVALID_ASYNC_HANDLE
+//
+// MessageText:
+//
+// Invalid asynchronous remote procedure call handle.
+//
+
+ RPC_NT_INVALID_ASYNC_HANDLE = NTSTATUS($C0020062);
+ {$EXTERNALSYM RPC_NT_INVALID_ASYNC_HANDLE}
+
+//
+// MessageId: RPC_NT_INVALID_ASYNC_CALL
+//
+// MessageText:
+//
+// Invalid asynchronous RPC call handle for this operation.
+//
+
+ RPC_NT_INVALID_ASYNC_CALL = NTSTATUS($C0020063);
+ {$EXTERNALSYM RPC_NT_INVALID_ASYNC_CALL}
+
+//
+// MessageId: RPC_NT_SEND_INCOMPLETE
+//
+// MessageText:
+//
+// Some data remains to be sent in the request buffer.
+//
+
+ RPC_NT_SEND_INCOMPLETE = NTSTATUS($400200AF);
+ {$EXTERNALSYM RPC_NT_SEND_INCOMPLETE}
+
+//
+// MessageId: STATUS_ACPI_INVALID_OPCODE
+//
+// MessageText:
+//
+// An attempt was made to run an invalid AML opcode
+//
+
+ STATUS_ACPI_INVALID_OPCODE = NTSTATUS($C0140001);
+ {$EXTERNALSYM STATUS_ACPI_INVALID_OPCODE}
+
+//
+// MessageId: STATUS_ACPI_STACK_OVERFLOW
+//
+// MessageText:
+//
+// The AML Interpreter Stack has overflowed
+//
+
+ STATUS_ACPI_STACK_OVERFLOW = NTSTATUS($C0140002);
+ {$EXTERNALSYM STATUS_ACPI_STACK_OVERFLOW}
+
+//
+// MessageId: STATUS_ACPI_ASSERT_FAILED
+//
+// MessageText:
+//
+// An inconsistent state has occurred
+//
+
+ STATUS_ACPI_ASSERT_FAILED = NTSTATUS($C0140003);
+ {$EXTERNALSYM STATUS_ACPI_ASSERT_FAILED}
+
+//
+// MessageId: STATUS_ACPI_INVALID_INDEX
+//
+// MessageText:
+//
+// An attempt was made to access an array outside of its bounds
+//
+
+ STATUS_ACPI_INVALID_INDEX = NTSTATUS($C0140004);
+ {$EXTERNALSYM STATUS_ACPI_INVALID_INDEX}
+
+//
+// MessageId: STATUS_ACPI_INVALID_ARGUMENT
+//
+// MessageText:
+//
+// A required argument was not specified
+//
+
+ STATUS_ACPI_INVALID_ARGUMENT = NTSTATUS($C0140005);
+ {$EXTERNALSYM STATUS_ACPI_INVALID_ARGUMENT}
+
+//
+// MessageId: STATUS_ACPI_FATAL
+//
+// MessageText:
+//
+// A fatal error has occurred
+//
+
+ STATUS_ACPI_FATAL = NTSTATUS($C0140006);
+ {$EXTERNALSYM STATUS_ACPI_FATAL}
+
+//
+// MessageId: STATUS_ACPI_INVALID_SUPERNAME
+//
+// MessageText:
+//
+// An invalid SuperName was specified
+//
+
+ STATUS_ACPI_INVALID_SUPERNAME = NTSTATUS($C0140007);
+ {$EXTERNALSYM STATUS_ACPI_INVALID_SUPERNAME}
+
+//
+// MessageId: STATUS_ACPI_INVALID_ARGTYPE
+//
+// MessageText:
+//
+// An argument with an incorrect type was specified
+//
+
+ STATUS_ACPI_INVALID_ARGTYPE = NTSTATUS($C0140008);
+ {$EXTERNALSYM STATUS_ACPI_INVALID_ARGTYPE}
+
+//
+// MessageId: STATUS_ACPI_INVALID_OBJTYPE
+//
+// MessageText:
+//
+// An object with an incorrect type was specified
+//
+
+ STATUS_ACPI_INVALID_OBJTYPE = NTSTATUS($C0140009);
+ {$EXTERNALSYM STATUS_ACPI_INVALID_OBJTYPE}
+
+//
+// MessageId: STATUS_ACPI_INVALID_TARGETTYPE
+//
+// MessageText:
+//
+// A target with an incorrect type was specified
+//
+
+ STATUS_ACPI_INVALID_TARGETTYPE = NTSTATUS($C014000A);
+ {$EXTERNALSYM STATUS_ACPI_INVALID_TARGETTYPE}
+
+//
+// MessageId: STATUS_ACPI_INCORRECT_ARGUMENT_COUNT
+//
+// MessageText:
+//
+// An incorrect number of arguments were specified
+//
+
+ STATUS_ACPI_INCORRECT_ARGUMENT_COUNT = NTSTATUS($C014000B);
+ {$EXTERNALSYM STATUS_ACPI_INCORRECT_ARGUMENT_COUNT}
+
+//
+// MessageId: STATUS_ACPI_ADDRESS_NOT_MAPPED
+//
+// MessageText:
+//
+// An address failed to translate
+//
+
+ STATUS_ACPI_ADDRESS_NOT_MAPPED = NTSTATUS($C014000C);
+ {$EXTERNALSYM STATUS_ACPI_ADDRESS_NOT_MAPPED}
+
+//
+// MessageId: STATUS_ACPI_INVALID_EVENTTYPE
+//
+// MessageText:
+//
+// An incorrect event type was specified
+//
+
+ STATUS_ACPI_INVALID_EVENTTYPE = NTSTATUS($C014000D);
+ {$EXTERNALSYM STATUS_ACPI_INVALID_EVENTTYPE}
+
+//
+// MessageId: STATUS_ACPI_HANDLER_COLLISION
+//
+// MessageText:
+//
+// A handler for the target already exists
+//
+
+ STATUS_ACPI_HANDLER_COLLISION = NTSTATUS($C014000E);
+ {$EXTERNALSYM STATUS_ACPI_HANDLER_COLLISION}
+
+//
+// MessageId: STATUS_ACPI_INVALID_DATA
+//
+// MessageText:
+//
+// Invalid data for the target was specified
+//
+
+ STATUS_ACPI_INVALID_DATA = NTSTATUS($C014000F);
+ {$EXTERNALSYM STATUS_ACPI_INVALID_DATA}
+
+//
+// MessageId: STATUS_ACPI_INVALID_REGION
+//
+// MessageText:
+//
+// An invalid region for the target was specified
+//
+
+ STATUS_ACPI_INVALID_REGION = NTSTATUS($C0140010);
+ {$EXTERNALSYM STATUS_ACPI_INVALID_REGION}
+
+//
+// MessageId: STATUS_ACPI_INVALID_ACCESS_SIZE
+//
+// MessageText:
+//
+// An attempt was made to access a field outside of the defined range
+//
+
+ STATUS_ACPI_INVALID_ACCESS_SIZE = NTSTATUS($C0140011);
+ {$EXTERNALSYM STATUS_ACPI_INVALID_ACCESS_SIZE}
+
+//
+// MessageId: STATUS_ACPI_ACQUIRE_GLOBAL_LOCK
+//
+// MessageText:
+//
+// The Global system lock could not be acquired
+//
+
+ STATUS_ACPI_ACQUIRE_GLOBAL_LOCK = NTSTATUS($C0140012);
+ {$EXTERNALSYM STATUS_ACPI_ACQUIRE_GLOBAL_LOCK}
+
+//
+// MessageId: STATUS_ACPI_ALREADY_INITIALIZED
+//
+// MessageText:
+//
+// An attempt was made to reinitialize the ACPI subsystem
+//
+
+ STATUS_ACPI_ALREADY_INITIALIZED = NTSTATUS($C0140013);
+ {$EXTERNALSYM STATUS_ACPI_ALREADY_INITIALIZED}
+
+//
+// MessageId: STATUS_ACPI_NOT_INITIALIZED
+//
+// MessageText:
+//
+// The ACPI subsystem has not been initialized
+//
+
+ STATUS_ACPI_NOT_INITIALIZED = NTSTATUS($C0140014);
+ {$EXTERNALSYM STATUS_ACPI_NOT_INITIALIZED}
+
+//
+// MessageId: STATUS_ACPI_INVALID_MUTEX_LEVEL
+//
+// MessageText:
+//
+// An incorrect mutex was specified
+//
+
+ STATUS_ACPI_INVALID_MUTEX_LEVEL = NTSTATUS($C0140015);
+ {$EXTERNALSYM STATUS_ACPI_INVALID_MUTEX_LEVEL}
+
+//
+// MessageId: STATUS_ACPI_MUTEX_NOT_OWNED
+//
+// MessageText:
+//
+// The mutex is not currently owned
+//
+
+ STATUS_ACPI_MUTEX_NOT_OWNED = NTSTATUS($C0140016);
+ {$EXTERNALSYM STATUS_ACPI_MUTEX_NOT_OWNED}
+
+//
+// MessageId: STATUS_ACPI_MUTEX_NOT_OWNER
+//
+// MessageText:
+//
+// An attempt was made to access the mutex by a process that was not the owner
+//
+
+ STATUS_ACPI_MUTEX_NOT_OWNER = NTSTATUS($C0140017);
+ {$EXTERNALSYM STATUS_ACPI_MUTEX_NOT_OWNER}
+
+//
+// MessageId: STATUS_ACPI_RS_ACCESS
+//
+// MessageText:
+//
+// An error occurred during an access to Region Space
+//
+
+ STATUS_ACPI_RS_ACCESS = NTSTATUS($C0140018);
+ {$EXTERNALSYM STATUS_ACPI_RS_ACCESS}
+
+//
+// MessageId: STATUS_ACPI_INVALID_TABLE
+//
+// MessageText:
+//
+// An attempt was made to use an incorrect table
+//
+
+ STATUS_ACPI_INVALID_TABLE = NTSTATUS($C0140019);
+ {$EXTERNALSYM STATUS_ACPI_INVALID_TABLE}
+
+//
+// MessageId: STATUS_ACPI_REG_HANDLER_FAILED
+//
+// MessageText:
+//
+// The registration of an ACPI event failed
+//
+
+ STATUS_ACPI_REG_HANDLER_FAILED = NTSTATUS($C0140020);
+ {$EXTERNALSYM STATUS_ACPI_REG_HANDLER_FAILED}
+
+//
+// MessageId: STATUS_ACPI_POWER_REQUEST_FAILED
+//
+// MessageText:
+//
+// An ACPI Power Object failed to transition state
+//
+
+ STATUS_ACPI_POWER_REQUEST_FAILED = NTSTATUS($C0140021);
+ {$EXTERNALSYM STATUS_ACPI_POWER_REQUEST_FAILED}
+
+//
+// Terminal Server specific Errors
+//
+//
+// MessageId: STATUS_CTX_WINSTATION_NAME_INVALID
+//
+// MessageText:
+//
+// Session name %1 is invalid.
+//
+
+ STATUS_CTX_WINSTATION_NAME_INVALID = NTSTATUS($C00A0001);
+ {$EXTERNALSYM STATUS_CTX_WINSTATION_NAME_INVALID}
+
+//
+// MessageId: STATUS_CTX_INVALID_PD
+//
+// MessageText:
+//
+// The protocol driver %1 is invalid.
+//
+
+ STATUS_CTX_INVALID_PD = NTSTATUS($C00A0002);
+ {$EXTERNALSYM STATUS_CTX_INVALID_PD}
+
+//
+// MessageId: STATUS_CTX_PD_NOT_FOUND
+//
+// MessageText:
+//
+// The protocol driver %1 was not found in the system path.
+//
+
+ STATUS_CTX_PD_NOT_FOUND = NTSTATUS($C00A0003);
+ {$EXTERNALSYM STATUS_CTX_PD_NOT_FOUND}
+
+//
+// MessageId: STATUS_CTX_CDM_CONNECT
+//
+// MessageText:
+//
+// The Client Drive Mapping Service Has Connected on Terminal Connection.
+//
+
+ STATUS_CTX_CDM_CONNECT = NTSTATUS($400A0004);
+ {$EXTERNALSYM STATUS_CTX_CDM_CONNECT}
+
+//
+// MessageId: STATUS_CTX_CDM_DISCONNECT
+//
+// MessageText:
+//
+// The Client Drive Mapping Service Has Disconnected on Terminal Connection.
+//
+
+ STATUS_CTX_CDM_DISCONNECT = NTSTATUS($400A0005);
+ {$EXTERNALSYM STATUS_CTX_CDM_DISCONNECT}
+
+//
+// MessageId: STATUS_CTX_CLOSE_PENDING
+//
+// MessageText:
+//
+// A close operation is pending on the Terminal Connection.
+//
+
+ STATUS_CTX_CLOSE_PENDING = NTSTATUS($C00A0006);
+ {$EXTERNALSYM STATUS_CTX_CLOSE_PENDING}
+
+//
+// MessageId: STATUS_CTX_NO_OUTBUF
+//
+// MessageText:
+//
+// There are no free output buffers available.
+//
+
+ STATUS_CTX_NO_OUTBUF = NTSTATUS($C00A0007);
+ {$EXTERNALSYM STATUS_CTX_NO_OUTBUF}
+
+//
+// MessageId: STATUS_CTX_MODEM_INF_NOT_FOUND
+//
+// MessageText:
+//
+// The MODEM.INF file was not found.
+//
+
+ STATUS_CTX_MODEM_INF_NOT_FOUND = NTSTATUS($C00A0008);
+ {$EXTERNALSYM STATUS_CTX_MODEM_INF_NOT_FOUND}
+
+//
+// MessageId: STATUS_CTX_INVALID_MODEMNAME
+//
+// MessageText:
+//
+// The modem (%1) was not found in MODEM.INF.
+//
+
+ STATUS_CTX_INVALID_MODEMNAME = NTSTATUS($C00A0009);
+ {$EXTERNALSYM STATUS_CTX_INVALID_MODEMNAME}
+
+//
+// MessageId: STATUS_CTX_RESPONSE_ERROR
+//
+// MessageText:
+//
+// The modem did not accept the command sent to it.
+// Verify the configured modem name matches the attached modem.
+//
+
+ STATUS_CTX_RESPONSE_ERROR = NTSTATUS($C00A000A);
+ {$EXTERNALSYM STATUS_CTX_RESPONSE_ERROR}
+
+//
+// MessageId: STATUS_CTX_MODEM_RESPONSE_TIMEOUT
+//
+// MessageText:
+//
+// The modem did not respond to the command sent to it.
+// Verify the modem is properly cabled and powered on.
+//
+
+ STATUS_CTX_MODEM_RESPONSE_TIMEOUT = NTSTATUS($C00A000B);
+ {$EXTERNALSYM STATUS_CTX_MODEM_RESPONSE_TIMEOUT}
+
+//
+// MessageId: STATUS_CTX_MODEM_RESPONSE_NO_CARRIER
+//
+// MessageText:
+//
+// Carrier detect has failed or carrier has been dropped due to disconnect.
+//
+
+ STATUS_CTX_MODEM_RESPONSE_NO_CARRIER = NTSTATUS($C00A000C);
+ {$EXTERNALSYM STATUS_CTX_MODEM_RESPONSE_NO_CARRIER}
+
+//
+// MessageId: STATUS_CTX_MODEM_RESPONSE_NO_DIALTONE
+//
+// MessageText:
+//
+// Dial tone not detected within required time.
+// Verify phone cable is properly attached and functional.
+//
+
+ STATUS_CTX_MODEM_RESPONSE_NO_DIALTONE = NTSTATUS($C00A000D);
+ {$EXTERNALSYM STATUS_CTX_MODEM_RESPONSE_NO_DIALTONE}
+
+//
+// MessageId: STATUS_CTX_MODEM_RESPONSE_BUSY
+//
+// MessageText:
+//
+// Busy signal detected at remote site on callback.
+//
+
+ STATUS_CTX_MODEM_RESPONSE_BUSY = NTSTATUS($C00A000E);
+ {$EXTERNALSYM STATUS_CTX_MODEM_RESPONSE_BUSY}
+
+//
+// MessageId: STATUS_CTX_MODEM_RESPONSE_VOICE
+//
+// MessageText:
+//
+// Voice detected at remote site on callback.
+//
+
+ STATUS_CTX_MODEM_RESPONSE_VOICE = NTSTATUS($C00A000F);
+ {$EXTERNALSYM STATUS_CTX_MODEM_RESPONSE_VOICE}
+
+//
+// MessageId: STATUS_CTX_TD_ERROR
+//
+// MessageText:
+//
+// Transport driver error
+//
+
+ STATUS_CTX_TD_ERROR = NTSTATUS($C00A0010);
+ {$EXTERNALSYM STATUS_CTX_TD_ERROR}
+
+//
+// MessageId: STATUS_CTX_LICENSE_CLIENT_INVALID
+//
+// MessageText:
+//
+// The client you are using is not licensed to use this system. Your logon request is denied.
+//
+
+ STATUS_CTX_LICENSE_CLIENT_INVALID = NTSTATUS($C00A0012);
+ {$EXTERNALSYM STATUS_CTX_LICENSE_CLIENT_INVALID}
+
+//
+// MessageId: STATUS_CTX_LICENSE_NOT_AVAILABLE
+//
+// MessageText:
+//
+// The system has reached its licensed logon limit.
+// Please try again later.
+//
+
+ STATUS_CTX_LICENSE_NOT_AVAILABLE = NTSTATUS($C00A0013);
+ {$EXTERNALSYM STATUS_CTX_LICENSE_NOT_AVAILABLE}
+
+//
+// MessageId: STATUS_CTX_LICENSE_EXPIRED
+//
+// MessageText:
+//
+// The system license has expired. Your logon request is denied.
+//
+
+ STATUS_CTX_LICENSE_EXPIRED = NTSTATUS($C00A0014);
+ {$EXTERNALSYM STATUS_CTX_LICENSE_EXPIRED}
+
+//
+// MessageId: STATUS_CTX_WINSTATION_NOT_FOUND
+//
+// MessageText:
+//
+// The specified session cannot be found.
+//
+
+ STATUS_CTX_WINSTATION_NOT_FOUND = NTSTATUS($C00A0015);
+ {$EXTERNALSYM STATUS_CTX_WINSTATION_NOT_FOUND}
+
+//
+// MessageId: STATUS_CTX_WINSTATION_NAME_COLLISION
+//
+// MessageText:
+//
+// The specified session name is already in use.
+//
+
+ STATUS_CTX_WINSTATION_NAME_COLLISION = NTSTATUS($C00A0016);
+ {$EXTERNALSYM STATUS_CTX_WINSTATION_NAME_COLLISION}
+
+//
+// MessageId: STATUS_CTX_WINSTATION_BUSY
+//
+// MessageText:
+//
+// The requested operation cannot be completed because the Terminal Connection is currently busy processing a connect, disconnect, reset, or delete operation.
+//
+
+ STATUS_CTX_WINSTATION_BUSY = NTSTATUS($C00A0017);
+ {$EXTERNALSYM STATUS_CTX_WINSTATION_BUSY}
+
+//
+// MessageId: STATUS_CTX_BAD_VIDEO_MODE
+//
+// MessageText:
+//
+// An attempt has been made to connect to a session whose video mode is not supported by the current client.
+//
+
+ STATUS_CTX_BAD_VIDEO_MODE = NTSTATUS($C00A0018);
+ {$EXTERNALSYM STATUS_CTX_BAD_VIDEO_MODE}
+
+//
+// MessageId: STATUS_CTX_GRAPHICS_INVALID
+//
+// MessageText:
+//
+// The application attempted to enable DOS graphics mode.
+// DOS graphics mode is not supported.
+//
+
+ STATUS_CTX_GRAPHICS_INVALID = NTSTATUS($C00A0022);
+ {$EXTERNALSYM STATUS_CTX_GRAPHICS_INVALID}
+
+//
+// MessageId: STATUS_CTX_NOT_CONSOLE
+//
+// MessageText:
+//
+// The requested operation can be performed only on the system console.
+// This is most often the result of a driver or system DLL requiring direct console access.
+//
+
+ STATUS_CTX_NOT_CONSOLE = NTSTATUS($C00A0024);
+ {$EXTERNALSYM STATUS_CTX_NOT_CONSOLE}
+
+//
+// MessageId: STATUS_CTX_CLIENT_QUERY_TIMEOUT
+//
+// MessageText:
+//
+// The client failed to respond to the server connect message.
+//
+
+ STATUS_CTX_CLIENT_QUERY_TIMEOUT = NTSTATUS($C00A0026);
+ {$EXTERNALSYM STATUS_CTX_CLIENT_QUERY_TIMEOUT}
+
+//
+// MessageId: STATUS_CTX_CONSOLE_DISCONNECT
+//
+// MessageText:
+//
+// Disconnecting the console session is not supported.
+//
+
+ STATUS_CTX_CONSOLE_DISCONNECT = NTSTATUS($C00A0027);
+ {$EXTERNALSYM STATUS_CTX_CONSOLE_DISCONNECT}
+
+//
+// MessageId: STATUS_CTX_CONSOLE_CONNECT
+//
+// MessageText:
+//
+// Reconnecting a disconnected session to the console is not supported.
+//
+
+ STATUS_CTX_CONSOLE_CONNECT = NTSTATUS($C00A0028);
+ {$EXTERNALSYM STATUS_CTX_CONSOLE_CONNECT}
+
+//
+// MessageId: STATUS_CTX_SHADOW_DENIED
+//
+// MessageText:
+//
+// The request to control another session remotely was denied.
+//
+
+ STATUS_CTX_SHADOW_DENIED = NTSTATUS($C00A002A);
+ {$EXTERNALSYM STATUS_CTX_SHADOW_DENIED}
+
+//
+// MessageId: STATUS_CTX_WINSTATION_ACCESS_DENIED
+//
+// MessageText:
+//
+// A process has requested access to a session, but has not been granted those access rights.
+//
+
+ STATUS_CTX_WINSTATION_ACCESS_DENIED = NTSTATUS($C00A002B);
+ {$EXTERNALSYM STATUS_CTX_WINSTATION_ACCESS_DENIED}
+
+//
+// MessageId: STATUS_CTX_INVALID_WD
+//
+// MessageText:
+//
+// The Terminal Connection driver %1 is invalid.
+//
+
+ STATUS_CTX_INVALID_WD = NTSTATUS($C00A002E);
+ {$EXTERNALSYM STATUS_CTX_INVALID_WD}
+
+//
+// MessageId: STATUS_CTX_WD_NOT_FOUND
+//
+// MessageText:
+//
+// The Terminal Connection driver %1 was not found in the system path.
+//
+
+ STATUS_CTX_WD_NOT_FOUND = NTSTATUS($C00A002F);
+ {$EXTERNALSYM STATUS_CTX_WD_NOT_FOUND}
+
+//
+// MessageId: STATUS_CTX_SHADOW_INVALID
+//
+// MessageText:
+//
+// The requested session cannot be controlled remotely.
+// This may be because the session is disconnected or does not currently have a user logged on.
+// Also, you cannot control a session remotely from the system console or control the system console remotely.
+// And you cannot remote control your own current session.
+//
+
+ STATUS_CTX_SHADOW_INVALID = NTSTATUS($C00A0030);
+ {$EXTERNALSYM STATUS_CTX_SHADOW_INVALID}
+
+//
+// MessageId: STATUS_CTX_SHADOW_DISABLED
+//
+// MessageText:
+//
+// The requested session is not configured to allow remote control.
+//
+
+ STATUS_CTX_SHADOW_DISABLED = NTSTATUS($C00A0031);
+ {$EXTERNALSYM STATUS_CTX_SHADOW_DISABLED}
+
+//
+// MessageId: STATUS_RDP_PROTOCOL_ERROR
+//
+// MessageText:
+//
+// The RDP protocol component %2 detected an error in the protocol stream and has disconnected the client.
+//
+
+ STATUS_RDP_PROTOCOL_ERROR = NTSTATUS($C00A0032);
+ {$EXTERNALSYM STATUS_RDP_PROTOCOL_ERROR}
+
+//
+// MessageId: STATUS_CTX_CLIENT_LICENSE_NOT_SET
+//
+// MessageText:
+//
+// Your request to connect to this Terminal server has been rejected.
+// Your Terminal Server Client license number has not been entered for this copy of the Terminal Client.
+// Please call your system administrator for help in entering a valid, unique license number for this Terminal Server Client.
+// Click OK to continue.
+//
+
+ STATUS_CTX_CLIENT_LICENSE_NOT_SET = NTSTATUS($C00A0033);
+ {$EXTERNALSYM STATUS_CTX_CLIENT_LICENSE_NOT_SET}
+
+//
+// MessageId: STATUS_CTX_CLIENT_LICENSE_IN_USE
+//
+// MessageText:
+//
+// Your request to connect to this Terminal server has been rejected.
+// Your Terminal Server Client license number is currently being used by another user.
+// Please call your system administrator to obtain a new copy of the Terminal Server Client with a valid, unique license number.
+// Click OK to continue.
+//
+
+ STATUS_CTX_CLIENT_LICENSE_IN_USE = NTSTATUS($C00A0034);
+ {$EXTERNALSYM STATUS_CTX_CLIENT_LICENSE_IN_USE}
+
+//
+// MessageId: STATUS_PNP_BAD_MPS_TABLE
+//
+// MessageText:
+//
+// A device is missing in the system BIOS MPS table. This device will not be used.
+// Please contact your system vendor for system BIOS update.
+//
+
+ STATUS_PNP_BAD_MPS_TABLE = NTSTATUS($C0040035);
+ {$EXTERNALSYM STATUS_PNP_BAD_MPS_TABLE}
+
+//
+// MessageId: STATUS_PNP_TRANSLATION_FAILED
+//
+// MessageText:
+//
+// A translator failed to translate resources.
+//
+
+ STATUS_PNP_TRANSLATION_FAILED = NTSTATUS($C0040036);
+ {$EXTERNALSYM STATUS_PNP_TRANSLATION_FAILED}
+
+//
+// MessageId: STATUS_PNP_IRQ_TRANSLATION_FAILED
+//
+// MessageText:
+//
+// A IRQ translator failed to translate resources.
+//
+
+ STATUS_PNP_IRQ_TRANSLATION_FAILED = NTSTATUS($C0040037);
+ {$EXTERNALSYM STATUS_PNP_IRQ_TRANSLATION_FAILED}
+
+implementation
+
+end.
diff --git a/packages/extra/winunits/jwapatchapi.pas b/packages/extra/winunits/jwapatchapi.pas
index b3ea7b871b..22d0902281 100644
--- a/packages/extra/winunits/jwapatchapi.pas
+++ b/packages/extra/winunits/jwapatchapi.pas
@@ -1,832 +1,832 @@
-{******************************************************************************}
-{ }
-{ Creating and applying patches to filesAPI interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: patchapi.h, released August 2001. The original Pascal }
-{ code is: PatchApi.pas, released December 2001. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwapatchapi.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaPatchApi;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "patchapi.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaWinType;
-
-//
-// The following constants can be combined and used as the OptionFlags
-// parameter in the patch creation apis.
-//
-
-const
- PATCH_OPTION_USE_BEST = $00000000; // auto choose best (slower)
- {$EXTERNALSYM PATCH_OPTION_USE_BEST}
-
- PATCH_OPTION_USE_LZX_BEST = $00000003; // auto choose best of LZX
- {$EXTERNALSYM PATCH_OPTION_USE_LZX_BEST}
- PATCH_OPTION_USE_LZX_A = $00000001; // normal
- {$EXTERNALSYM PATCH_OPTION_USE_LZX_A}
- PATCH_OPTION_USE_LZX_B = $00000002; // better on some x86 binaries
- {$EXTERNALSYM PATCH_OPTION_USE_LZX_B}
- PATCH_OPTION_USE_LZX_LARGE = $00000004; // better support for files >8MB
- {$EXTERNALSYM PATCH_OPTION_USE_LZX_LARGE}
-
- PATCH_OPTION_NO_BINDFIX = $00010000; // PE bound imports
- {$EXTERNALSYM PATCH_OPTION_NO_BINDFIX}
- PATCH_OPTION_NO_LOCKFIX = $00020000; // PE smashed locks
- {$EXTERNALSYM PATCH_OPTION_NO_LOCKFIX}
- PATCH_OPTION_NO_REBASE = $00040000; // PE rebased image
- {$EXTERNALSYM PATCH_OPTION_NO_REBASE}
- PATCH_OPTION_FAIL_IF_SAME_FILE = $00080000; // don't create if same
- {$EXTERNALSYM PATCH_OPTION_FAIL_IF_SAME_FILE}
- PATCH_OPTION_FAIL_IF_BIGGER = $00100000; // fail if patch is larger than simply compressing new file (slower)
- {$EXTERNALSYM PATCH_OPTION_FAIL_IF_BIGGER}
- PATCH_OPTION_NO_CHECKSUM = $00200000; // PE checksum zero
- {$EXTERNALSYM PATCH_OPTION_NO_CHECKSUM}
- PATCH_OPTION_NO_RESTIMEFIX = $00400000; // PE resource timestamps
- {$EXTERNALSYM PATCH_OPTION_NO_RESTIMEFIX}
- PATCH_OPTION_NO_TIMESTAMP = $00800000; // don't store new file timestamp in patch
- {$EXTERNALSYM PATCH_OPTION_NO_TIMESTAMP}
- PATCH_OPTION_SIGNATURE_MD5 = $01000000; // use MD5 instead of CRC32
- {$EXTERNALSYM PATCH_OPTION_SIGNATURE_MD5}
- PATCH_OPTION_RESERVED1 = DWORD($80000000); // (used internally)
- {$EXTERNALSYM PATCH_OPTION_RESERVED1}
-
- PATCH_OPTION_VALID_FLAGS = DWORD($80FF0007);
- {$EXTERNALSYM PATCH_OPTION_VALID_FLAGS}
-
- PATCH_SYMBOL_NO_IMAGEHLP = $00000001; // don't use imagehlp.dll
- {$EXTERNALSYM PATCH_SYMBOL_NO_IMAGEHLP}
- PATCH_SYMBOL_NO_FAILURES = $00000002; // don't fail patch due to imagehlp failures
- {$EXTERNALSYM PATCH_SYMBOL_NO_FAILURES}
- PATCH_SYMBOL_UNDECORATED_TOO = $00000004; // after matching decorated symbols, try to match remaining by undecorated names
- {$EXTERNALSYM PATCH_SYMBOL_UNDECORATED_TOO}
- PATCH_SYMBOL_RESERVED1 = DWORD($80000000); // (used internally)
- {$EXTERNALSYM PATCH_SYMBOL_RESERVED1}
-
-//
-// The following constants can be combined and used as the ApplyOptionFlags
-// parameter in the patch apply and test apis.
-//
-
- APPLY_OPTION_FAIL_IF_EXACT = $00000001; // don't copy new file
- {$EXTERNALSYM APPLY_OPTION_FAIL_IF_EXACT}
- APPLY_OPTION_FAIL_IF_CLOSE = $00000002; // differ by rebase, bind
- {$EXTERNALSYM APPLY_OPTION_FAIL_IF_CLOSE}
- APPLY_OPTION_TEST_ONLY = $00000004; // don't create new file
- {$EXTERNALSYM APPLY_OPTION_TEST_ONLY}
- APPLY_OPTION_VALID_FLAGS = $00000007;
- {$EXTERNALSYM APPLY_OPTION_VALID_FLAGS}
-
-//
-// In addition to standard Win32 error codes, the following error codes may
-// be returned via GetLastError() when one of the patch APIs fails.
-//
-
- ERROR_PATCH_ENCODE_FAILURE = DWORD($C00E3101); // create
- {$EXTERNALSYM ERROR_PATCH_ENCODE_FAILURE}
- ERROR_PATCH_INVALID_OPTIONS = DWORD($C00E3102); // create
- {$EXTERNALSYM ERROR_PATCH_INVALID_OPTIONS}
- ERROR_PATCH_SAME_FILE = DWORD($C00E3103); // create
- {$EXTERNALSYM ERROR_PATCH_SAME_FILE}
- ERROR_PATCH_RETAIN_RANGES_DIFFER = DWORD($C00E3104); // create
- {$EXTERNALSYM ERROR_PATCH_RETAIN_RANGES_DIFFER}
- ERROR_PATCH_BIGGER_THAN_COMPRESSED = DWORD($C00E3105); // create
- {$EXTERNALSYM ERROR_PATCH_BIGGER_THAN_COMPRESSED}
- ERROR_PATCH_IMAGEHLP_FAILURE = DWORD($C00E3106); // create
- {$EXTERNALSYM ERROR_PATCH_IMAGEHLP_FAILURE}
-
- ERROR_PATCH_DECODE_FAILURE = DWORD($C00E4101); // apply
- {$EXTERNALSYM ERROR_PATCH_DECODE_FAILURE}
- ERROR_PATCH_CORRUPT = DWORD($C00E4102); // apply
- {$EXTERNALSYM ERROR_PATCH_CORRUPT}
- ERROR_PATCH_NEWER_FORMAT = DWORD($C00E4103); // apply
- {$EXTERNALSYM ERROR_PATCH_NEWER_FORMAT}
- ERROR_PATCH_WRONG_FILE = DWORD($C00E4104); // apply
- {$EXTERNALSYM ERROR_PATCH_WRONG_FILE}
- ERROR_PATCH_NOT_NECESSARY = DWORD($C00E4105); // apply
- {$EXTERNALSYM ERROR_PATCH_NOT_NECESSARY}
- ERROR_PATCH_NOT_AVAILABLE = DWORD($C00E4106); // apply
- {$EXTERNALSYM ERROR_PATCH_NOT_AVAILABLE}
-
-type
- PATCH_PROGRESS_CALLBACK = function(CallbackContext: PVOID; CurrentPosition, MaximumPosition: ULONG): BOOL; stdcall;
- {$EXTERNALSYM PATCH_PROGRESS_CALLBACK}
- TPatchProgressCallback = PATCH_PROGRESS_CALLBACK;
-
- PPATCH_PROGRESS_CALLBACK = ^PATCH_PROGRESS_CALLBACK;
- {$EXTERNALSYM PPATCH_PROGRESS_CALLBACK}
- PPatchProgressCallback = PPATCH_PROGRESS_CALLBACK;
-
- PATCH_SYMLOAD_CALLBACK = function(WhichFile: ULONG; SymbolFileName: LPCSTR; SymType, SymbolFileCheckSum,
- SymbolFileTimeDate, ImageFileCheckSum, ImageFileTimeDate: ULONG; CallbackContext: PVOID): BOOL; stdcall;
- {$EXTERNALSYM PATCH_SYMLOAD_CALLBACK}
- TPatchSymLoadCallback = PATCH_SYMLOAD_CALLBACK;
-
- PPATCH_SYMLOAD_CALLBACK = ^PATCH_SYMLOAD_CALLBACK;
- {$EXTERNALSYM PPATCH_SYMLOAD_CALLBACK}
- PPatchSymLoadCallback = PPATCH_SYMLOAD_CALLBACK;
-
- PPATCH_IGNORE_RANGE = ^PATCH_IGNORE_RANGE;
- {$EXTERNALSYM PPATCH_IGNORE_RANGE}
- _PATCH_IGNORE_RANGE = record
- OffsetInOldFile: ULONG;
- LengthInBytes: ULONG;
- end;
- {$EXTERNALSYM _PATCH_IGNORE_RANGE}
- PATCH_IGNORE_RANGE = _PATCH_IGNORE_RANGE;
- {$EXTERNALSYM PATCH_IGNORE_RANGE}
- TPatchIgnoreRange = PATCH_IGNORE_RANGE;
- PPatchIgnoreRange = PPATCH_IGNORE_RANGE;
-
- PPATCH_RETAIN_RANGE = ^PATCH_RETAIN_RANGE;
- {$EXTERNALSYM PPATCH_RETAIN_RANGE}
- _PATCH_RETAIN_RANGE = record
- OffsetInOldFile: ULONG;
- LengthInBytes: ULONG;
- OffsetInNewFile: ULONG;
- end;
- {$EXTERNALSYM _PATCH_RETAIN_RANGE}
- PATCH_RETAIN_RANGE = _PATCH_RETAIN_RANGE;
- {$EXTERNALSYM PATCH_RETAIN_RANGE}
- TPatchRetainRange = PATCH_RETAIN_RANGE;
- PPatchRetainRange = PPATCH_RETAIN_RANGE;
-
- PPATCH_OLD_FILE_INFO_A = ^PATCH_OLD_FILE_INFO_A;
- {$EXTERNALSYM PPATCH_OLD_FILE_INFO_A}
- _PATCH_OLD_FILE_INFO_A = record
- SizeOfThisStruct: ULONG;
- OldFileName: LPCSTR;
- IgnoreRangeCount: ULONG; // maximum 255
- IgnoreRangeArray: PPATCH_IGNORE_RANGE;
- RetainRangeCount: ULONG; // maximum 255
- RetainRangeArray: PPATCH_RETAIN_RANGE;
- end;
- {$EXTERNALSYM _PATCH_OLD_FILE_INFO_A}
- PATCH_OLD_FILE_INFO_A = _PATCH_OLD_FILE_INFO_A;
- {$EXTERNALSYM PATCH_OLD_FILE_INFO_A}
- TPatchOldFileInfoA = PATCH_OLD_FILE_INFO_A;
- PPatchOldFileInfoA = PPATCH_OLD_FILE_INFO_A;
-
- PPATCH_OLD_FILE_INFO_W = ^PATCH_OLD_FILE_INFO_W;
- {$EXTERNALSYM PPATCH_OLD_FILE_INFO_W}
- _PATCH_OLD_FILE_INFO_W = record
- SizeOfThisStruct: ULONG;
- OldFileName: LPCWSTR;
- IgnoreRangeCount: ULONG; // maximum 255
- IgnoreRangeArray: PPATCH_IGNORE_RANGE;
- RetainRangeCount: ULONG; // maximum 255
- RetainRangeArray: PPATCH_RETAIN_RANGE;
- end;
- {$EXTERNALSYM _PATCH_OLD_FILE_INFO_W}
- PATCH_OLD_FILE_INFO_W = _PATCH_OLD_FILE_INFO_W;
- {$EXTERNALSYM PATCH_OLD_FILE_INFO_W}
- TPatchOldFileInfoW = PATCH_OLD_FILE_INFO_W;
- PPatchOldFileInfoW = PPATCH_OLD_FILE_INFO_W;
-
- PPATCH_OLD_FILE_INFO_H = ^PATCH_OLD_FILE_INFO_H;
- {$EXTERNALSYM PPATCH_OLD_FILE_INFO_H}
- _PATCH_OLD_FILE_INFO_H = record
- SizeOfThisStruct: ULONG;
- OldFileHandle: HANDLE;
- IgnoreRangeCount: ULONG; // maximum 255
- IgnoreRangeArray: PPATCH_IGNORE_RANGE;
- RetainRangeCount: ULONG; // maximum 255
- RetainRangeArray: PPATCH_RETAIN_RANGE;
- end;
- {$EXTERNALSYM _PATCH_OLD_FILE_INFO_H}
- PATCH_OLD_FILE_INFO_H = _PATCH_OLD_FILE_INFO_H;
- {$EXTERNALSYM PATCH_OLD_FILE_INFO_H}
- TPatchOldFileInfoH = PATCH_OLD_FILE_INFO_H;
- PPatchOldFileInfoH = PPATCH_OLD_FILE_INFO_H;
-
- PPATCH_OLD_FILE_INFO = ^PATCH_OLD_FILE_INFO;
- {$EXTERNALSYM PPATCH_OLD_FILE_INFO}
- _PATCH_OLD_FILE_INFO = record
- SizeOfThisStruct: ULONG;
- Union: record
- case Integer of
- 0: (OldFileNameA: LPCSTR);
- 1: (OldFileNameW: LPCWSTR);
- 2: (OldFileHandle: HANDLE);
- end;
- IgnoreRangeCount: ULONG; // maximum 255
- IgnoreRangeArray: PPATCH_IGNORE_RANGE;
- RetainRangeCount: ULONG; // maximum 255
- RetainRangeArray: PPATCH_RETAIN_RANGE;
- end;
- {$EXTERNALSYM _PATCH_OLD_FILE_INFO}
- PATCH_OLD_FILE_INFO = _PATCH_OLD_FILE_INFO;
- {$EXTERNALSYM PATCH_OLD_FILE_INFO}
- TPatchOldFileInfo = PATCH_OLD_FILE_INFO;
- PPatchOldFileInfo = PPATCH_OLD_FILE_INFO;
-
- PPATCH_OPTION_DATA = ^PATCH_OPTION_DATA;
- {$EXTERNALSYM PPATCH_OPTION_DATA}
- _PATCH_OPTION_DATA = record
- SizeOfThisStruct: ULONG;
- SymbolOptionFlags: ULONG; // PATCH_SYMBOL_xxx flags
- NewFileSymbolPath: LPCSTR; // always ANSI, never Unicode
- OldFileSymbolPathArray: ^LPCSTR; // array[ OldFileCount ]
- ExtendedOptionFlags: ULONG;
- SymLoadCallback: PATCH_SYMLOAD_CALLBACK;
- SymLoadContext: PVOID;
- end;
- {$EXTERNALSYM _PATCH_OPTION_DATA}
- PATCH_OPTION_DATA = _PATCH_OPTION_DATA;
- {$EXTERNALSYM PATCH_OPTION_DATA}
- TPatchOptionData = PATCH_OPTION_DATA;
- PPatchOptionData = PPATCH_OPTION_DATA;
-
-//
-// Note that PATCH_OPTION_DATA contains LPCSTR paths, and no LPCWSTR (Unicode)
-// path argument is available, even when used with one of the Unicode APIs
-// such as CreatePatchFileW. This is because the underlying system services
-// for symbol file handling (IMAGEHLP.DLL) only support ANSI file/path names.
-//
-
-//
-// A note about PATCH_RETAIN_RANGE specifiers with multiple old files:
-//
-// Each old version file must have the same RetainRangeCount, and the same
-// retain range LengthInBytes and OffsetInNewFile values in the same order.
-// Only the OffsetInOldFile values can differ between old files for retain
-// ranges.
-//
-
-//
-// The following prototypes are interface for creating patches from files.
-//
-
-function CreatePatchFileA(OldFileName: LPCSTR; NewFileName: LPCSTR; PatchFileName: LPCSTR; OptionFlags: ULONG; OptionData: PPATCH_OPTION_DATA): BOOL; stdcall;
-{$EXTERNALSYM CreatePatchFileA}
-
-function CreatePatchFileW(OldFileName: LPCWSTR; NewFileName: LPCWSTR; PatchFileName: LPCWSTR; OptionFlags: ULONG; OptionData: PPATCH_OPTION_DATA): BOOL; stdcall;
-{$EXTERNALSYM CreatePatchFileW}
-
-function CreatePatchFileByHandles(OldFileHandle: HANDLE; NewFileHandle: HANDLE; PatchFileHandle: HANDLE; OptionFlags: ULONG; OptionData: PPATCH_OPTION_DATA): BOOL; stdcall;
-{$EXTERNALSYM CreatePatchFileByHandles}
-
-function CreatePatchFileExA(OldFileCount: ULONG; OldFileInfoArray: PPATCH_OLD_FILE_INFO_A; NewFileName: LPCSTR; PatchFileName: LPCSTR;
- OptionFlags: ULONG; OptionData: PPATCH_OPTION_DATA; ProgressCallback: PATCH_PROGRESS_CALLBACK; CallbackContext: PVOID): BOOL; stdcall;
-{$EXTERNALSYM CreatePatchFileExA}
-
-function CreatePatchFileExW(OldFileCount: ULONG; OldFileInfoArray: PPATCH_OLD_FILE_INFO_W; NewFileName: LPCWSTR; PatchFileName: LPCWSTR;
- OptionFlags: ULONG; OptionData: PPATCH_OPTION_DATA; ProgressCallback: PATCH_PROGRESS_CALLBACK; CallbackContext: PVOID): BOOL; stdcall;
-{$EXTERNALSYM CreatePatchFileExW}
-
-function CreatePatchFileByHandlesEx(OldFileCount: ULONG; OldFileInfoArray: PPATCH_OLD_FILE_INFO_H; NewFileHandle: HANDLE;
- PatchFileHandle: HANDLE; OptionFlags: ULONG; OptionData: PPATCH_OPTION_DATA; ProgressCallback: PATCH_PROGRESS_CALLBACK; CallbackContext: PVOID): BOOL; stdcall;
-{$EXTERNALSYM CreatePatchFileByHandlesEx}
-
-function ExtractPatchHeaderToFileA(PatchFileName: LPCSTR; PatchHeaderFileName: LPCSTR): BOOL; stdcall;
-{$EXTERNALSYM ExtractPatchHeaderToFileA}
-
-function ExtractPatchHeaderToFileW(PatchFileName: LPCWSTR; PatchHeaderFileName: LPCWSTR): BOOL; stdcall;
-{$EXTERNALSYM ExtractPatchHeaderToFileW}
-
-function ExtractPatchHeaderToFileByHandles(PatchFileHandle: HANDLE; PatchHeaderFileHandle: HANDLE): BOOL; stdcall;
-{$EXTERNALSYM ExtractPatchHeaderToFileByHandles}
-
-//
-// The following prototypes are interface for creating new file from old file
-// and patch file. Note that it is possible for the TestApply API to succeed
-// but the actual Apply to fail since the TestApply only verifies that the
-// old file has the correct CRC without actually applying the patch. The
-// TestApply API only requires the patch header portion of the patch file,
-// but its CRC must be fixed up.
-//
-
-function TestApplyPatchToFileA(PatchFileName: LPCSTR; OldFileName: LPCSTR; ApplyOptionFlags: ULONG): BOOL; stdcall;
-{$EXTERNALSYM TestApplyPatchToFileA}
-
-function TestApplyPatchToFileW(PatchFileName: LPCWSTR; OldFileName: LPCWSTR; ApplyOptionFlags: ULONG): BOOL; stdcall;
-{$EXTERNALSYM TestApplyPatchToFileW}
-
-function TestApplyPatchToFileByHandles(PatchFileHandle: HANDLE; OldFileHandle: HANDLE; ApplyOptionFlags: ULONG): BOOL; stdcall;
-{$EXTERNALSYM TestApplyPatchToFileByHandles}
-
-function ApplyPatchToFileA(PatchFileName: LPCSTR; OldFileName: LPCSTR; NewFileName: LPCSTR; ApplyOptionFlags: ULONG): BOOL; stdcall;
-{$EXTERNALSYM ApplyPatchToFileA}
-
-function ApplyPatchToFileW(PatchFileName: LPCWSTR; OldFileName: LPCWSTR; NewFileName: LPCWSTR; ApplyOptionFlags: ULONG): BOOL; stdcall;
-{$EXTERNALSYM ApplyPatchToFileW}
-
-function ApplyPatchToFileByHandles(PatchFileHandle: HANDLE; OldFileHandle: HANDLE; NewFileHandle: HANDLE; ApplyOptionFlags: ULONG): BOOL; stdcall;
-{$EXTERNALSYM ApplyPatchToFileByHandles}
-
-function ApplyPatchToFileExA(PatchFileName: LPCSTR; OldFileName: LPCSTR; NewFileName: LPCSTR; ApplyOptionFlags: ULONG;
- ProgressCallback: PATCH_PROGRESS_CALLBACK; CallbackContext: PVOID): BOOL; stdcall;
-{$EXTERNALSYM ApplyPatchToFileExA}
-
-function ApplyPatchToFileExW(PatchFileName: LPCWSTR; OldFileName: LPCWSTR; NewFileName: LPCWSTR; ApplyOptionFlags: ULONG;
- ProgressCallback: PATCH_PROGRESS_CALLBACK; CallbackContext: PVOID): BOOL; stdcall;
-{$EXTERNALSYM ApplyPatchToFileExW}
-
-function ApplyPatchToFileByHandlesEx(PatchFileHandle: HANDLE; OldFileHandle: HANDLE; NewFileHandle: HANDLE;
- ApplyOptionFlags: ULONG; ProgressCallback: PATCH_PROGRESS_CALLBACK; CallbackContext: PVOID): BOOL; stdcall;
-{$EXTERNALSYM ApplyPatchToFileByHandlesEx}
-
-//
-// The following prototypes provide a unique patch "signature" for a given
-// file. Consider the case where you have a new foo.dll and the machines
-// to be updated with the new foo.dll may have one of three different old
-// foo.dll files. Rather than creating a single large patch file that can
-// update any of the three older foo.dll files, three separate smaller patch
-// files can be created and "named" according to the patch signature of the
-// old file. Then the patch applyer application can determine at runtime
-// which of the three foo.dll patch files is necessary given the specific
-// foo.dll to be updated. If patch files are being downloaded over a slow
-// network connection (Internet over a modem), this signature scheme provides
-// a mechanism for choosing the correct single patch file to download at
-// application time thus decreasing total bytes necessary to download.
-//
-
-function GetFilePatchSignatureA(FileName: LPCSTR; OptionFlags: ULONG; OptionData: PVOID; IgnoreRangeCount: ULONG; IgnoreRangeArray: PPATCH_IGNORE_RANGE;
- RetainRangeCount: ULONG; RetainRangeArray: PPATCH_RETAIN_RANGE; SignatureBufferSize: ULONG; SignatureBuffer: PVOID): BOOL; stdcall;
-{$EXTERNALSYM GetFilePatchSignatureA}
-
-function GetFilePatchSignatureW(FileName: LPCWSTR; OptionFlags: ULONG; OptionData: PVOID; IgnoreRangeCount: ULONG; IgnoreRangeArray: PPATCH_IGNORE_RANGE;
- RetainRangeCount: ULONG; RetainRangeArray: PPATCH_RETAIN_RANGE; SignatureBufferSizeInBytes: ULONG; SignatureBuffer: PVOID): BOOL; stdcall;
-{$EXTERNALSYM GetFilePatchSignatureW}
-
-function GetFilePatchSignatureByHandle(FileHandle: HANDLE; OptionFlags: ULONG; OptionData: PVOID; IgnoreRangeCount: ULONG; IgnoreRangeArray: PPATCH_IGNORE_RANGE;
- RetainRangeCount: ULONG; RetainRangeArray: PPATCH_RETAIN_RANGE; SignatureBufferSize: ULONG; SignatureBuffer: PVOID): BOOL; stdcall;
-{$EXTERNALSYM GetFilePatchSignatureByHandle}
-
-//
-// Depending on whether UNICODE is defined, map the generic API names to the
-// appropriate Unicode or Ansi APIs.
-//
-
-function CreatePatchFile(OldFileName: LPCTSTR; NewFileName: LPCTSTR; PatchFileName: LPCTSTR; OptionFlags: ULONG; OptionData: PPATCH_OPTION_DATA): BOOL; stdcall;
-{$EXTERNALSYM CreatePatchFile}
-function CreatePatchFileEx(OldFileCount: ULONG; OldFileInfoArray: PPATCH_OLD_FILE_INFO; NewFileName: LPCTSTR; PatchFileName: LPCTSTR;
- OptionFlags: ULONG; OptionData: PPATCH_OPTION_DATA; ProgressCallback: PATCH_PROGRESS_CALLBACK; CallbackContext: PVOID): BOOL; stdcall;
-{$EXTERNALSYM CreatePatchFileEx}
-function ExtractPatchHeaderToFile(PatchFileName: LPCTSTR; PatchHeaderFileName: LPCTSTR): BOOL; stdcall;
-{$EXTERNALSYM ExtractPatchHeaderToFile}
-function TestApplyPatchToFile(PatchFileName: LPCTSTR; OldFileName: LPCTSTR; ApplyOptionFlags: ULONG): BOOL; stdcall;
-{$EXTERNALSYM TestApplyPatchToFile}
-function ApplyPatchToFile(PatchFileName: LPCTSTR; OldFileName: LPCTSTR; NewFileName: LPCTSTR; ApplyOptionFlags: ULONG): BOOL; stdcall;
-{$EXTERNALSYM ApplyPatchToFile}
-function ApplyPatchToFileEx(PatchFileName: LPCTSTR; OldFileName: LPCTSTR; NewFileName: LPCTSTR; ApplyOptionFlags: ULONG; ProgressCallback: PATCH_PROGRESS_CALLBACK; CallbackContext: PVOID): BOOL; stdcall;
-{$EXTERNALSYM ApplyPatchToFileEx}
-function GetFilePatchSignature(FileName: LPCTSTR; OptionFlags: ULONG; OptionData: PVOID; IgnoreRangeCount: ULONG; IgnoreRangeArray: PPATCH_IGNORE_RANGE;
- RetainRangeCount: ULONG; RetainRangeArray: PPATCH_RETAIN_RANGE; SignatureBufferSizeInBytes: ULONG; SignatureBuffer: PVOID): BOOL; stdcall;
-{$EXTERNALSYM GetFilePatchSignature}
-
-implementation
-
-const
- patchapi = 'mspatcha.dll';
- {$IFDEF UNICODE}
- AWSuffix = 'W';
- {$ELSE}
- AWSuffix = 'A';
- {$ENDIF UNICODE}
-
-{$IFDEF DYNAMIC_LINK}
-
-var
- _CreatePatchFileA: Pointer;
-
-function CreatePatchFileA;
-begin
- GetProcedureAddress(_CreatePatchFileA, patchapi, 'CreatePatchFileA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreatePatchFileA]
- end;
-end;
-
-var
- _CreatePatchFileW: Pointer;
-
-function CreatePatchFileW;
-begin
- GetProcedureAddress(_CreatePatchFileW, patchapi, 'CreatePatchFileW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreatePatchFileW]
- end;
-end;
-
-var
- _CreatePatchFileByHandles: Pointer;
-
-function CreatePatchFileByHandles;
-begin
- GetProcedureAddress(_CreatePatchFileByHandles, patchapi, 'CreatePatchFileByHandles');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreatePatchFileByHandles]
- end;
-end;
-
-var
- _CreatePatchFileExA: Pointer;
-
-function CreatePatchFileExA;
-begin
- GetProcedureAddress(_CreatePatchFileExA, patchapi, 'CreatePatchFileExA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreatePatchFileExA]
- end;
-end;
-
-var
- _CreatePatchFileExW: Pointer;
-
-function CreatePatchFileExW;
-begin
- GetProcedureAddress(_CreatePatchFileExW, patchapi, 'CreatePatchFileExW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreatePatchFileExW]
- end;
-end;
-
-var
- _CreatePatchFileByHandlesEx: Pointer;
-
-function CreatePatchFileByHandlesEx;
-begin
- GetProcedureAddress(_CreatePatchFileByHandlesEx, patchapi, 'CreatePatchFileByHandlesEx');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreatePatchFileByHandlesEx]
- end;
-end;
-
-var
- _ExtractPatchHeaderToFileA: Pointer;
-
-function ExtractPatchHeaderToFileA;
-begin
- GetProcedureAddress(_ExtractPatchHeaderToFileA, patchapi, 'ExtractPatchHeaderToFileA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ExtractPatchHeaderToFileA]
- end;
-end;
-
-var
- _ExtractPatchHeaderToFileW: Pointer;
-
-function ExtractPatchHeaderToFileW;
-begin
- GetProcedureAddress(_ExtractPatchHeaderToFileW, patchapi, 'ExtractPatchHeaderToFileW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ExtractPatchHeaderToFileW]
- end;
-end;
-
-var
- _ExtrPatchHdrToFileByHandles: Pointer;
-
-function ExtractPatchHeaderToFileByHandles;
-begin
- GetProcedureAddress(_ExtrPatchHdrToFileByHandles, patchapi, 'ExtractPatchHeaderToFileByHandles');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ExtrPatchHdrToFileByHandles]
- end;
-end;
-
-var
- _TestApplyPatchToFileA: Pointer;
-
-function TestApplyPatchToFileA;
-begin
- GetProcedureAddress(_TestApplyPatchToFileA, patchapi, 'TestApplyPatchToFileA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_TestApplyPatchToFileA]
- end;
-end;
-
-var
- _TestApplyPatchToFileW: Pointer;
-
-function TestApplyPatchToFileW;
-begin
- GetProcedureAddress(_TestApplyPatchToFileW, patchapi, 'TestApplyPatchToFileW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_TestApplyPatchToFileW]
- end;
-end;
-
-var
- _TestApplyPatchToFileByHandles: Pointer;
-
-function TestApplyPatchToFileByHandles;
-begin
- GetProcedureAddress(_TestApplyPatchToFileByHandles, patchapi, 'TestApplyPatchToFileByHandles');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_TestApplyPatchToFileByHandles]
- end;
-end;
-
-var
- _ApplyPatchToFileA: Pointer;
-
-function ApplyPatchToFileA;
-begin
- GetProcedureAddress(_ApplyPatchToFileA, patchapi, 'ApplyPatchToFileA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ApplyPatchToFileA]
- end;
-end;
-
-var
- _ApplyPatchToFileW: Pointer;
-
-function ApplyPatchToFileW;
-begin
- GetProcedureAddress(_ApplyPatchToFileW, patchapi, 'ApplyPatchToFileW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ApplyPatchToFileW]
- end;
-end;
-
-var
- _ApplyPatchToFileByHandles: Pointer;
-
-function ApplyPatchToFileByHandles;
-begin
- GetProcedureAddress(_ApplyPatchToFileByHandles, patchapi, 'ApplyPatchToFileByHandles');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ApplyPatchToFileByHandles]
- end;
-end;
-
-var
- _ApplyPatchToFileExA: Pointer;
-
-function ApplyPatchToFileExA;
-begin
- GetProcedureAddress(_ApplyPatchToFileExA, patchapi, 'ApplyPatchToFileExA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ApplyPatchToFileExA]
- end;
-end;
-
-var
- _ApplyPatchToFileExW: Pointer;
-
-function ApplyPatchToFileExW;
-begin
- GetProcedureAddress(_ApplyPatchToFileExW, patchapi, 'ApplyPatchToFileExW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ApplyPatchToFileExW]
- end;
-end;
-
-var
- _ApplyPatchToFileByHandlesEx: Pointer;
-
-function ApplyPatchToFileByHandlesEx;
-begin
- GetProcedureAddress(_ApplyPatchToFileByHandlesEx, patchapi, 'ApplyPatchToFileByHandlesEx');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ApplyPatchToFileByHandlesEx]
- end;
-end;
-
-var
- _GetFilePatchSignatureA: Pointer;
-
-function GetFilePatchSignatureA;
-begin
- GetProcedureAddress(_GetFilePatchSignatureA, patchapi, 'GetFilePatchSignatureA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetFilePatchSignatureA]
- end;
-end;
-
-var
- _GetFilePatchSignatureW: Pointer;
-
-function GetFilePatchSignatureW;
-begin
- GetProcedureAddress(_GetFilePatchSignatureW, patchapi, 'GetFilePatchSignatureW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetFilePatchSignatureW]
- end;
-end;
-
-var
- _GetFilePatchSignatureByHandle: Pointer;
-
-function GetFilePatchSignatureByHandle;
-begin
- GetProcedureAddress(_GetFilePatchSignatureByHandle, patchapi, 'GetFilePatchSignatureByHandle');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetFilePatchSignatureByHandle]
- end;
-end;
-
-var
- _CreatePatchFile: Pointer;
-
-function CreatePatchFile;
-begin
- GetProcedureAddress(_CreatePatchFile, patchapi, 'CreatePatchFile' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreatePatchFile]
- end;
-end;
-
-var
- _CreatePatchFileEx: Pointer;
-
-function CreatePatchFileEx;
-begin
- GetProcedureAddress(_CreatePatchFileEx, patchapi, 'CreatePatchFileEx' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreatePatchFileEx]
- end;
-end;
-
-var
- _ExtractPatchHeaderToFile: Pointer;
-
-function ExtractPatchHeaderToFile;
-begin
- GetProcedureAddress(_ExtractPatchHeaderToFile, patchapi, 'ExtractPatchHeaderToFile' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ExtractPatchHeaderToFile]
- end;
-end;
-
-var
- _TestApplyPatchToFile: Pointer;
-
-function TestApplyPatchToFile;
-begin
- GetProcedureAddress(_TestApplyPatchToFile, patchapi, 'TestApplyPatchToFile' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_TestApplyPatchToFile]
- end;
-end;
-
-var
- _ApplyPatchToFile: Pointer;
-
-function ApplyPatchToFile;
-begin
- GetProcedureAddress(_ApplyPatchToFile, patchapi, 'ApplyPatchToFile' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ApplyPatchToFile]
- end;
-end;
-
-var
- _ApplyPatchToFileEx: Pointer;
-
-function ApplyPatchToFileEx;
-begin
- GetProcedureAddress(_ApplyPatchToFileEx, patchapi, 'ApplyPatchToFileEx' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ApplyPatchToFileEx]
- end;
-end;
-
-var
- _GetFilePatchSignature: Pointer;
-
-function GetFilePatchSignature;
-begin
- GetProcedureAddress(_GetFilePatchSignature, patchapi, 'GetFilePatchSignature' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetFilePatchSignature]
- end;
-end;
-
-{$ELSE}
-
-function CreatePatchFileA; external patchapi name 'CreatePatchFileA';
-function CreatePatchFileW; external patchapi name 'CreatePatchFileW';
-function CreatePatchFileByHandles; external patchapi name 'CreatePatchFileByHandles';
-function CreatePatchFileExA; external patchapi name 'CreatePatchFileExA';
-function CreatePatchFileExW; external patchapi name 'CreatePatchFileExW';
-function CreatePatchFileByHandlesEx; external patchapi name 'CreatePatchFileByHandlesEx';
-function ExtractPatchHeaderToFileA; external patchapi name 'ExtractPatchHeaderToFileA';
-function ExtractPatchHeaderToFileW; external patchapi name 'ExtractPatchHeaderToFileW';
-function ExtractPatchHeaderToFileByHandles; external patchapi name 'ExtractPatchHeaderToFileByHandles';
-function TestApplyPatchToFileA; external patchapi name 'TestApplyPatchToFileA';
-function TestApplyPatchToFileW; external patchapi name 'TestApplyPatchToFileW';
-function TestApplyPatchToFileByHandles; external patchapi name 'TestApplyPatchToFileByHandles';
-function ApplyPatchToFileA; external patchapi name 'ApplyPatchToFileA';
-function ApplyPatchToFileW; external patchapi name 'ApplyPatchToFileW';
-function ApplyPatchToFileByHandles; external patchapi name 'ApplyPatchToFileByHandles';
-function ApplyPatchToFileExA; external patchapi name 'ApplyPatchToFileExA';
-function ApplyPatchToFileExW; external patchapi name 'ApplyPatchToFileExW';
-function ApplyPatchToFileByHandlesEx; external patchapi name 'ApplyPatchToFileByHandlesEx';
-function GetFilePatchSignatureA; external patchapi name 'GetFilePatchSignatureA';
-function GetFilePatchSignatureW; external patchapi name 'GetFilePatchSignatureW';
-function GetFilePatchSignatureByHandle; external patchapi name 'GetFilePatchSignatureByHandle';
-function CreatePatchFile; external patchapi name 'CreatePatchFile' + AWSuffix;
-function CreatePatchFileEx; external patchapi name 'CreatePatchFileEx' + AWSuffix;
-function ExtractPatchHeaderToFile; external patchapi name 'ExtractPatchHeaderToFile' + AWSuffix;
-function TestApplyPatchToFile; external patchapi name 'TestApplyPatchToFile' + AWSuffix;
-function ApplyPatchToFile; external patchapi name 'ApplyPatchToFile' + AWSuffix;
-function ApplyPatchToFileEx; external patchapi name 'ApplyPatchToFileEx' + AWSuffix;
-function GetFilePatchSignature; external patchapi name 'GetFilePatchSignature' + AWSuffix;
-
-{$ENDIF DYNAMIC_LINK}
-
-end.
+{******************************************************************************}
+{ }
+{ Creating and applying patches to filesAPI interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: patchapi.h, released August 2001. The original Pascal }
+{ code is: PatchApi.pas, released December 2001. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwapatchapi.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaPatchApi;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "patchapi.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaWinType;
+
+//
+// The following constants can be combined and used as the OptionFlags
+// parameter in the patch creation apis.
+//
+
+const
+ PATCH_OPTION_USE_BEST = $00000000; // auto choose best (slower)
+ {$EXTERNALSYM PATCH_OPTION_USE_BEST}
+
+ PATCH_OPTION_USE_LZX_BEST = $00000003; // auto choose best of LZX
+ {$EXTERNALSYM PATCH_OPTION_USE_LZX_BEST}
+ PATCH_OPTION_USE_LZX_A = $00000001; // normal
+ {$EXTERNALSYM PATCH_OPTION_USE_LZX_A}
+ PATCH_OPTION_USE_LZX_B = $00000002; // better on some x86 binaries
+ {$EXTERNALSYM PATCH_OPTION_USE_LZX_B}
+ PATCH_OPTION_USE_LZX_LARGE = $00000004; // better support for files >8MB
+ {$EXTERNALSYM PATCH_OPTION_USE_LZX_LARGE}
+
+ PATCH_OPTION_NO_BINDFIX = $00010000; // PE bound imports
+ {$EXTERNALSYM PATCH_OPTION_NO_BINDFIX}
+ PATCH_OPTION_NO_LOCKFIX = $00020000; // PE smashed locks
+ {$EXTERNALSYM PATCH_OPTION_NO_LOCKFIX}
+ PATCH_OPTION_NO_REBASE = $00040000; // PE rebased image
+ {$EXTERNALSYM PATCH_OPTION_NO_REBASE}
+ PATCH_OPTION_FAIL_IF_SAME_FILE = $00080000; // don't create if same
+ {$EXTERNALSYM PATCH_OPTION_FAIL_IF_SAME_FILE}
+ PATCH_OPTION_FAIL_IF_BIGGER = $00100000; // fail if patch is larger than simply compressing new file (slower)
+ {$EXTERNALSYM PATCH_OPTION_FAIL_IF_BIGGER}
+ PATCH_OPTION_NO_CHECKSUM = $00200000; // PE checksum zero
+ {$EXTERNALSYM PATCH_OPTION_NO_CHECKSUM}
+ PATCH_OPTION_NO_RESTIMEFIX = $00400000; // PE resource timestamps
+ {$EXTERNALSYM PATCH_OPTION_NO_RESTIMEFIX}
+ PATCH_OPTION_NO_TIMESTAMP = $00800000; // don't store new file timestamp in patch
+ {$EXTERNALSYM PATCH_OPTION_NO_TIMESTAMP}
+ PATCH_OPTION_SIGNATURE_MD5 = $01000000; // use MD5 instead of CRC32
+ {$EXTERNALSYM PATCH_OPTION_SIGNATURE_MD5}
+ PATCH_OPTION_RESERVED1 = DWORD($80000000); // (used internally)
+ {$EXTERNALSYM PATCH_OPTION_RESERVED1}
+
+ PATCH_OPTION_VALID_FLAGS = DWORD($80FF0007);
+ {$EXTERNALSYM PATCH_OPTION_VALID_FLAGS}
+
+ PATCH_SYMBOL_NO_IMAGEHLP = $00000001; // don't use imagehlp.dll
+ {$EXTERNALSYM PATCH_SYMBOL_NO_IMAGEHLP}
+ PATCH_SYMBOL_NO_FAILURES = $00000002; // don't fail patch due to imagehlp failures
+ {$EXTERNALSYM PATCH_SYMBOL_NO_FAILURES}
+ PATCH_SYMBOL_UNDECORATED_TOO = $00000004; // after matching decorated symbols, try to match remaining by undecorated names
+ {$EXTERNALSYM PATCH_SYMBOL_UNDECORATED_TOO}
+ PATCH_SYMBOL_RESERVED1 = DWORD($80000000); // (used internally)
+ {$EXTERNALSYM PATCH_SYMBOL_RESERVED1}
+
+//
+// The following constants can be combined and used as the ApplyOptionFlags
+// parameter in the patch apply and test apis.
+//
+
+ APPLY_OPTION_FAIL_IF_EXACT = $00000001; // don't copy new file
+ {$EXTERNALSYM APPLY_OPTION_FAIL_IF_EXACT}
+ APPLY_OPTION_FAIL_IF_CLOSE = $00000002; // differ by rebase, bind
+ {$EXTERNALSYM APPLY_OPTION_FAIL_IF_CLOSE}
+ APPLY_OPTION_TEST_ONLY = $00000004; // don't create new file
+ {$EXTERNALSYM APPLY_OPTION_TEST_ONLY}
+ APPLY_OPTION_VALID_FLAGS = $00000007;
+ {$EXTERNALSYM APPLY_OPTION_VALID_FLAGS}
+
+//
+// In addition to standard Win32 error codes, the following error codes may
+// be returned via GetLastError() when one of the patch APIs fails.
+//
+
+ ERROR_PATCH_ENCODE_FAILURE = DWORD($C00E3101); // create
+ {$EXTERNALSYM ERROR_PATCH_ENCODE_FAILURE}
+ ERROR_PATCH_INVALID_OPTIONS = DWORD($C00E3102); // create
+ {$EXTERNALSYM ERROR_PATCH_INVALID_OPTIONS}
+ ERROR_PATCH_SAME_FILE = DWORD($C00E3103); // create
+ {$EXTERNALSYM ERROR_PATCH_SAME_FILE}
+ ERROR_PATCH_RETAIN_RANGES_DIFFER = DWORD($C00E3104); // create
+ {$EXTERNALSYM ERROR_PATCH_RETAIN_RANGES_DIFFER}
+ ERROR_PATCH_BIGGER_THAN_COMPRESSED = DWORD($C00E3105); // create
+ {$EXTERNALSYM ERROR_PATCH_BIGGER_THAN_COMPRESSED}
+ ERROR_PATCH_IMAGEHLP_FAILURE = DWORD($C00E3106); // create
+ {$EXTERNALSYM ERROR_PATCH_IMAGEHLP_FAILURE}
+
+ ERROR_PATCH_DECODE_FAILURE = DWORD($C00E4101); // apply
+ {$EXTERNALSYM ERROR_PATCH_DECODE_FAILURE}
+ ERROR_PATCH_CORRUPT = DWORD($C00E4102); // apply
+ {$EXTERNALSYM ERROR_PATCH_CORRUPT}
+ ERROR_PATCH_NEWER_FORMAT = DWORD($C00E4103); // apply
+ {$EXTERNALSYM ERROR_PATCH_NEWER_FORMAT}
+ ERROR_PATCH_WRONG_FILE = DWORD($C00E4104); // apply
+ {$EXTERNALSYM ERROR_PATCH_WRONG_FILE}
+ ERROR_PATCH_NOT_NECESSARY = DWORD($C00E4105); // apply
+ {$EXTERNALSYM ERROR_PATCH_NOT_NECESSARY}
+ ERROR_PATCH_NOT_AVAILABLE = DWORD($C00E4106); // apply
+ {$EXTERNALSYM ERROR_PATCH_NOT_AVAILABLE}
+
+type
+ PATCH_PROGRESS_CALLBACK = function(CallbackContext: PVOID; CurrentPosition, MaximumPosition: ULONG): BOOL; stdcall;
+ {$EXTERNALSYM PATCH_PROGRESS_CALLBACK}
+ TPatchProgressCallback = PATCH_PROGRESS_CALLBACK;
+
+ PPATCH_PROGRESS_CALLBACK = ^PATCH_PROGRESS_CALLBACK;
+ {$EXTERNALSYM PPATCH_PROGRESS_CALLBACK}
+ PPatchProgressCallback = PPATCH_PROGRESS_CALLBACK;
+
+ PATCH_SYMLOAD_CALLBACK = function(WhichFile: ULONG; SymbolFileName: LPCSTR; SymType, SymbolFileCheckSum,
+ SymbolFileTimeDate, ImageFileCheckSum, ImageFileTimeDate: ULONG; CallbackContext: PVOID): BOOL; stdcall;
+ {$EXTERNALSYM PATCH_SYMLOAD_CALLBACK}
+ TPatchSymLoadCallback = PATCH_SYMLOAD_CALLBACK;
+
+ PPATCH_SYMLOAD_CALLBACK = ^PATCH_SYMLOAD_CALLBACK;
+ {$EXTERNALSYM PPATCH_SYMLOAD_CALLBACK}
+ PPatchSymLoadCallback = PPATCH_SYMLOAD_CALLBACK;
+
+ PPATCH_IGNORE_RANGE = ^PATCH_IGNORE_RANGE;
+ {$EXTERNALSYM PPATCH_IGNORE_RANGE}
+ _PATCH_IGNORE_RANGE = record
+ OffsetInOldFile: ULONG;
+ LengthInBytes: ULONG;
+ end;
+ {$EXTERNALSYM _PATCH_IGNORE_RANGE}
+ PATCH_IGNORE_RANGE = _PATCH_IGNORE_RANGE;
+ {$EXTERNALSYM PATCH_IGNORE_RANGE}
+ TPatchIgnoreRange = PATCH_IGNORE_RANGE;
+ PPatchIgnoreRange = PPATCH_IGNORE_RANGE;
+
+ PPATCH_RETAIN_RANGE = ^PATCH_RETAIN_RANGE;
+ {$EXTERNALSYM PPATCH_RETAIN_RANGE}
+ _PATCH_RETAIN_RANGE = record
+ OffsetInOldFile: ULONG;
+ LengthInBytes: ULONG;
+ OffsetInNewFile: ULONG;
+ end;
+ {$EXTERNALSYM _PATCH_RETAIN_RANGE}
+ PATCH_RETAIN_RANGE = _PATCH_RETAIN_RANGE;
+ {$EXTERNALSYM PATCH_RETAIN_RANGE}
+ TPatchRetainRange = PATCH_RETAIN_RANGE;
+ PPatchRetainRange = PPATCH_RETAIN_RANGE;
+
+ PPATCH_OLD_FILE_INFO_A = ^PATCH_OLD_FILE_INFO_A;
+ {$EXTERNALSYM PPATCH_OLD_FILE_INFO_A}
+ _PATCH_OLD_FILE_INFO_A = record
+ SizeOfThisStruct: ULONG;
+ OldFileName: LPCSTR;
+ IgnoreRangeCount: ULONG; // maximum 255
+ IgnoreRangeArray: PPATCH_IGNORE_RANGE;
+ RetainRangeCount: ULONG; // maximum 255
+ RetainRangeArray: PPATCH_RETAIN_RANGE;
+ end;
+ {$EXTERNALSYM _PATCH_OLD_FILE_INFO_A}
+ PATCH_OLD_FILE_INFO_A = _PATCH_OLD_FILE_INFO_A;
+ {$EXTERNALSYM PATCH_OLD_FILE_INFO_A}
+ TPatchOldFileInfoA = PATCH_OLD_FILE_INFO_A;
+ PPatchOldFileInfoA = PPATCH_OLD_FILE_INFO_A;
+
+ PPATCH_OLD_FILE_INFO_W = ^PATCH_OLD_FILE_INFO_W;
+ {$EXTERNALSYM PPATCH_OLD_FILE_INFO_W}
+ _PATCH_OLD_FILE_INFO_W = record
+ SizeOfThisStruct: ULONG;
+ OldFileName: LPCWSTR;
+ IgnoreRangeCount: ULONG; // maximum 255
+ IgnoreRangeArray: PPATCH_IGNORE_RANGE;
+ RetainRangeCount: ULONG; // maximum 255
+ RetainRangeArray: PPATCH_RETAIN_RANGE;
+ end;
+ {$EXTERNALSYM _PATCH_OLD_FILE_INFO_W}
+ PATCH_OLD_FILE_INFO_W = _PATCH_OLD_FILE_INFO_W;
+ {$EXTERNALSYM PATCH_OLD_FILE_INFO_W}
+ TPatchOldFileInfoW = PATCH_OLD_FILE_INFO_W;
+ PPatchOldFileInfoW = PPATCH_OLD_FILE_INFO_W;
+
+ PPATCH_OLD_FILE_INFO_H = ^PATCH_OLD_FILE_INFO_H;
+ {$EXTERNALSYM PPATCH_OLD_FILE_INFO_H}
+ _PATCH_OLD_FILE_INFO_H = record
+ SizeOfThisStruct: ULONG;
+ OldFileHandle: HANDLE;
+ IgnoreRangeCount: ULONG; // maximum 255
+ IgnoreRangeArray: PPATCH_IGNORE_RANGE;
+ RetainRangeCount: ULONG; // maximum 255
+ RetainRangeArray: PPATCH_RETAIN_RANGE;
+ end;
+ {$EXTERNALSYM _PATCH_OLD_FILE_INFO_H}
+ PATCH_OLD_FILE_INFO_H = _PATCH_OLD_FILE_INFO_H;
+ {$EXTERNALSYM PATCH_OLD_FILE_INFO_H}
+ TPatchOldFileInfoH = PATCH_OLD_FILE_INFO_H;
+ PPatchOldFileInfoH = PPATCH_OLD_FILE_INFO_H;
+
+ PPATCH_OLD_FILE_INFO = ^PATCH_OLD_FILE_INFO;
+ {$EXTERNALSYM PPATCH_OLD_FILE_INFO}
+ _PATCH_OLD_FILE_INFO = record
+ SizeOfThisStruct: ULONG;
+ Union: record
+ case Integer of
+ 0: (OldFileNameA: LPCSTR);
+ 1: (OldFileNameW: LPCWSTR);
+ 2: (OldFileHandle: HANDLE);
+ end;
+ IgnoreRangeCount: ULONG; // maximum 255
+ IgnoreRangeArray: PPATCH_IGNORE_RANGE;
+ RetainRangeCount: ULONG; // maximum 255
+ RetainRangeArray: PPATCH_RETAIN_RANGE;
+ end;
+ {$EXTERNALSYM _PATCH_OLD_FILE_INFO}
+ PATCH_OLD_FILE_INFO = _PATCH_OLD_FILE_INFO;
+ {$EXTERNALSYM PATCH_OLD_FILE_INFO}
+ TPatchOldFileInfo = PATCH_OLD_FILE_INFO;
+ PPatchOldFileInfo = PPATCH_OLD_FILE_INFO;
+
+ PPATCH_OPTION_DATA = ^PATCH_OPTION_DATA;
+ {$EXTERNALSYM PPATCH_OPTION_DATA}
+ _PATCH_OPTION_DATA = record
+ SizeOfThisStruct: ULONG;
+ SymbolOptionFlags: ULONG; // PATCH_SYMBOL_xxx flags
+ NewFileSymbolPath: LPCSTR; // always ANSI, never Unicode
+ OldFileSymbolPathArray: ^LPCSTR; // array[ OldFileCount ]
+ ExtendedOptionFlags: ULONG;
+ SymLoadCallback: PATCH_SYMLOAD_CALLBACK;
+ SymLoadContext: PVOID;
+ end;
+ {$EXTERNALSYM _PATCH_OPTION_DATA}
+ PATCH_OPTION_DATA = _PATCH_OPTION_DATA;
+ {$EXTERNALSYM PATCH_OPTION_DATA}
+ TPatchOptionData = PATCH_OPTION_DATA;
+ PPatchOptionData = PPATCH_OPTION_DATA;
+
+//
+// Note that PATCH_OPTION_DATA contains LPCSTR paths, and no LPCWSTR (Unicode)
+// path argument is available, even when used with one of the Unicode APIs
+// such as CreatePatchFileW. This is because the underlying system services
+// for symbol file handling (IMAGEHLP.DLL) only support ANSI file/path names.
+//
+
+//
+// A note about PATCH_RETAIN_RANGE specifiers with multiple old files:
+//
+// Each old version file must have the same RetainRangeCount, and the same
+// retain range LengthInBytes and OffsetInNewFile values in the same order.
+// Only the OffsetInOldFile values can differ between old files for retain
+// ranges.
+//
+
+//
+// The following prototypes are interface for creating patches from files.
+//
+
+function CreatePatchFileA(OldFileName: LPCSTR; NewFileName: LPCSTR; PatchFileName: LPCSTR; OptionFlags: ULONG; OptionData: PPATCH_OPTION_DATA): BOOL; stdcall;
+{$EXTERNALSYM CreatePatchFileA}
+
+function CreatePatchFileW(OldFileName: LPCWSTR; NewFileName: LPCWSTR; PatchFileName: LPCWSTR; OptionFlags: ULONG; OptionData: PPATCH_OPTION_DATA): BOOL; stdcall;
+{$EXTERNALSYM CreatePatchFileW}
+
+function CreatePatchFileByHandles(OldFileHandle: HANDLE; NewFileHandle: HANDLE; PatchFileHandle: HANDLE; OptionFlags: ULONG; OptionData: PPATCH_OPTION_DATA): BOOL; stdcall;
+{$EXTERNALSYM CreatePatchFileByHandles}
+
+function CreatePatchFileExA(OldFileCount: ULONG; OldFileInfoArray: PPATCH_OLD_FILE_INFO_A; NewFileName: LPCSTR; PatchFileName: LPCSTR;
+ OptionFlags: ULONG; OptionData: PPATCH_OPTION_DATA; ProgressCallback: PATCH_PROGRESS_CALLBACK; CallbackContext: PVOID): BOOL; stdcall;
+{$EXTERNALSYM CreatePatchFileExA}
+
+function CreatePatchFileExW(OldFileCount: ULONG; OldFileInfoArray: PPATCH_OLD_FILE_INFO_W; NewFileName: LPCWSTR; PatchFileName: LPCWSTR;
+ OptionFlags: ULONG; OptionData: PPATCH_OPTION_DATA; ProgressCallback: PATCH_PROGRESS_CALLBACK; CallbackContext: PVOID): BOOL; stdcall;
+{$EXTERNALSYM CreatePatchFileExW}
+
+function CreatePatchFileByHandlesEx(OldFileCount: ULONG; OldFileInfoArray: PPATCH_OLD_FILE_INFO_H; NewFileHandle: HANDLE;
+ PatchFileHandle: HANDLE; OptionFlags: ULONG; OptionData: PPATCH_OPTION_DATA; ProgressCallback: PATCH_PROGRESS_CALLBACK; CallbackContext: PVOID): BOOL; stdcall;
+{$EXTERNALSYM CreatePatchFileByHandlesEx}
+
+function ExtractPatchHeaderToFileA(PatchFileName: LPCSTR; PatchHeaderFileName: LPCSTR): BOOL; stdcall;
+{$EXTERNALSYM ExtractPatchHeaderToFileA}
+
+function ExtractPatchHeaderToFileW(PatchFileName: LPCWSTR; PatchHeaderFileName: LPCWSTR): BOOL; stdcall;
+{$EXTERNALSYM ExtractPatchHeaderToFileW}
+
+function ExtractPatchHeaderToFileByHandles(PatchFileHandle: HANDLE; PatchHeaderFileHandle: HANDLE): BOOL; stdcall;
+{$EXTERNALSYM ExtractPatchHeaderToFileByHandles}
+
+//
+// The following prototypes are interface for creating new file from old file
+// and patch file. Note that it is possible for the TestApply API to succeed
+// but the actual Apply to fail since the TestApply only verifies that the
+// old file has the correct CRC without actually applying the patch. The
+// TestApply API only requires the patch header portion of the patch file,
+// but its CRC must be fixed up.
+//
+
+function TestApplyPatchToFileA(PatchFileName: LPCSTR; OldFileName: LPCSTR; ApplyOptionFlags: ULONG): BOOL; stdcall;
+{$EXTERNALSYM TestApplyPatchToFileA}
+
+function TestApplyPatchToFileW(PatchFileName: LPCWSTR; OldFileName: LPCWSTR; ApplyOptionFlags: ULONG): BOOL; stdcall;
+{$EXTERNALSYM TestApplyPatchToFileW}
+
+function TestApplyPatchToFileByHandles(PatchFileHandle: HANDLE; OldFileHandle: HANDLE; ApplyOptionFlags: ULONG): BOOL; stdcall;
+{$EXTERNALSYM TestApplyPatchToFileByHandles}
+
+function ApplyPatchToFileA(PatchFileName: LPCSTR; OldFileName: LPCSTR; NewFileName: LPCSTR; ApplyOptionFlags: ULONG): BOOL; stdcall;
+{$EXTERNALSYM ApplyPatchToFileA}
+
+function ApplyPatchToFileW(PatchFileName: LPCWSTR; OldFileName: LPCWSTR; NewFileName: LPCWSTR; ApplyOptionFlags: ULONG): BOOL; stdcall;
+{$EXTERNALSYM ApplyPatchToFileW}
+
+function ApplyPatchToFileByHandles(PatchFileHandle: HANDLE; OldFileHandle: HANDLE; NewFileHandle: HANDLE; ApplyOptionFlags: ULONG): BOOL; stdcall;
+{$EXTERNALSYM ApplyPatchToFileByHandles}
+
+function ApplyPatchToFileExA(PatchFileName: LPCSTR; OldFileName: LPCSTR; NewFileName: LPCSTR; ApplyOptionFlags: ULONG;
+ ProgressCallback: PATCH_PROGRESS_CALLBACK; CallbackContext: PVOID): BOOL; stdcall;
+{$EXTERNALSYM ApplyPatchToFileExA}
+
+function ApplyPatchToFileExW(PatchFileName: LPCWSTR; OldFileName: LPCWSTR; NewFileName: LPCWSTR; ApplyOptionFlags: ULONG;
+ ProgressCallback: PATCH_PROGRESS_CALLBACK; CallbackContext: PVOID): BOOL; stdcall;
+{$EXTERNALSYM ApplyPatchToFileExW}
+
+function ApplyPatchToFileByHandlesEx(PatchFileHandle: HANDLE; OldFileHandle: HANDLE; NewFileHandle: HANDLE;
+ ApplyOptionFlags: ULONG; ProgressCallback: PATCH_PROGRESS_CALLBACK; CallbackContext: PVOID): BOOL; stdcall;
+{$EXTERNALSYM ApplyPatchToFileByHandlesEx}
+
+//
+// The following prototypes provide a unique patch "signature" for a given
+// file. Consider the case where you have a new foo.dll and the machines
+// to be updated with the new foo.dll may have one of three different old
+// foo.dll files. Rather than creating a single large patch file that can
+// update any of the three older foo.dll files, three separate smaller patch
+// files can be created and "named" according to the patch signature of the
+// old file. Then the patch applyer application can determine at runtime
+// which of the three foo.dll patch files is necessary given the specific
+// foo.dll to be updated. If patch files are being downloaded over a slow
+// network connection (Internet over a modem), this signature scheme provides
+// a mechanism for choosing the correct single patch file to download at
+// application time thus decreasing total bytes necessary to download.
+//
+
+function GetFilePatchSignatureA(FileName: LPCSTR; OptionFlags: ULONG; OptionData: PVOID; IgnoreRangeCount: ULONG; IgnoreRangeArray: PPATCH_IGNORE_RANGE;
+ RetainRangeCount: ULONG; RetainRangeArray: PPATCH_RETAIN_RANGE; SignatureBufferSize: ULONG; SignatureBuffer: PVOID): BOOL; stdcall;
+{$EXTERNALSYM GetFilePatchSignatureA}
+
+function GetFilePatchSignatureW(FileName: LPCWSTR; OptionFlags: ULONG; OptionData: PVOID; IgnoreRangeCount: ULONG; IgnoreRangeArray: PPATCH_IGNORE_RANGE;
+ RetainRangeCount: ULONG; RetainRangeArray: PPATCH_RETAIN_RANGE; SignatureBufferSizeInBytes: ULONG; SignatureBuffer: PVOID): BOOL; stdcall;
+{$EXTERNALSYM GetFilePatchSignatureW}
+
+function GetFilePatchSignatureByHandle(FileHandle: HANDLE; OptionFlags: ULONG; OptionData: PVOID; IgnoreRangeCount: ULONG; IgnoreRangeArray: PPATCH_IGNORE_RANGE;
+ RetainRangeCount: ULONG; RetainRangeArray: PPATCH_RETAIN_RANGE; SignatureBufferSize: ULONG; SignatureBuffer: PVOID): BOOL; stdcall;
+{$EXTERNALSYM GetFilePatchSignatureByHandle}
+
+//
+// Depending on whether UNICODE is defined, map the generic API names to the
+// appropriate Unicode or Ansi APIs.
+//
+
+function CreatePatchFile(OldFileName: LPCTSTR; NewFileName: LPCTSTR; PatchFileName: LPCTSTR; OptionFlags: ULONG; OptionData: PPATCH_OPTION_DATA): BOOL; stdcall;
+{$EXTERNALSYM CreatePatchFile}
+function CreatePatchFileEx(OldFileCount: ULONG; OldFileInfoArray: PPATCH_OLD_FILE_INFO; NewFileName: LPCTSTR; PatchFileName: LPCTSTR;
+ OptionFlags: ULONG; OptionData: PPATCH_OPTION_DATA; ProgressCallback: PATCH_PROGRESS_CALLBACK; CallbackContext: PVOID): BOOL; stdcall;
+{$EXTERNALSYM CreatePatchFileEx}
+function ExtractPatchHeaderToFile(PatchFileName: LPCTSTR; PatchHeaderFileName: LPCTSTR): BOOL; stdcall;
+{$EXTERNALSYM ExtractPatchHeaderToFile}
+function TestApplyPatchToFile(PatchFileName: LPCTSTR; OldFileName: LPCTSTR; ApplyOptionFlags: ULONG): BOOL; stdcall;
+{$EXTERNALSYM TestApplyPatchToFile}
+function ApplyPatchToFile(PatchFileName: LPCTSTR; OldFileName: LPCTSTR; NewFileName: LPCTSTR; ApplyOptionFlags: ULONG): BOOL; stdcall;
+{$EXTERNALSYM ApplyPatchToFile}
+function ApplyPatchToFileEx(PatchFileName: LPCTSTR; OldFileName: LPCTSTR; NewFileName: LPCTSTR; ApplyOptionFlags: ULONG; ProgressCallback: PATCH_PROGRESS_CALLBACK; CallbackContext: PVOID): BOOL; stdcall;
+{$EXTERNALSYM ApplyPatchToFileEx}
+function GetFilePatchSignature(FileName: LPCTSTR; OptionFlags: ULONG; OptionData: PVOID; IgnoreRangeCount: ULONG; IgnoreRangeArray: PPATCH_IGNORE_RANGE;
+ RetainRangeCount: ULONG; RetainRangeArray: PPATCH_RETAIN_RANGE; SignatureBufferSizeInBytes: ULONG; SignatureBuffer: PVOID): BOOL; stdcall;
+{$EXTERNALSYM GetFilePatchSignature}
+
+implementation
+
+const
+ patchapi = 'mspatcha.dll';
+ {$IFDEF UNICODE}
+ AWSuffix = 'W';
+ {$ELSE}
+ AWSuffix = 'A';
+ {$ENDIF UNICODE}
+
+{$IFDEF DYNAMIC_LINK}
+
+var
+ _CreatePatchFileA: Pointer;
+
+function CreatePatchFileA;
+begin
+ GetProcedureAddress(_CreatePatchFileA, patchapi, 'CreatePatchFileA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreatePatchFileA]
+ end;
+end;
+
+var
+ _CreatePatchFileW: Pointer;
+
+function CreatePatchFileW;
+begin
+ GetProcedureAddress(_CreatePatchFileW, patchapi, 'CreatePatchFileW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreatePatchFileW]
+ end;
+end;
+
+var
+ _CreatePatchFileByHandles: Pointer;
+
+function CreatePatchFileByHandles;
+begin
+ GetProcedureAddress(_CreatePatchFileByHandles, patchapi, 'CreatePatchFileByHandles');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreatePatchFileByHandles]
+ end;
+end;
+
+var
+ _CreatePatchFileExA: Pointer;
+
+function CreatePatchFileExA;
+begin
+ GetProcedureAddress(_CreatePatchFileExA, patchapi, 'CreatePatchFileExA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreatePatchFileExA]
+ end;
+end;
+
+var
+ _CreatePatchFileExW: Pointer;
+
+function CreatePatchFileExW;
+begin
+ GetProcedureAddress(_CreatePatchFileExW, patchapi, 'CreatePatchFileExW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreatePatchFileExW]
+ end;
+end;
+
+var
+ _CreatePatchFileByHandlesEx: Pointer;
+
+function CreatePatchFileByHandlesEx;
+begin
+ GetProcedureAddress(_CreatePatchFileByHandlesEx, patchapi, 'CreatePatchFileByHandlesEx');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreatePatchFileByHandlesEx]
+ end;
+end;
+
+var
+ _ExtractPatchHeaderToFileA: Pointer;
+
+function ExtractPatchHeaderToFileA;
+begin
+ GetProcedureAddress(_ExtractPatchHeaderToFileA, patchapi, 'ExtractPatchHeaderToFileA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ExtractPatchHeaderToFileA]
+ end;
+end;
+
+var
+ _ExtractPatchHeaderToFileW: Pointer;
+
+function ExtractPatchHeaderToFileW;
+begin
+ GetProcedureAddress(_ExtractPatchHeaderToFileW, patchapi, 'ExtractPatchHeaderToFileW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ExtractPatchHeaderToFileW]
+ end;
+end;
+
+var
+ _ExtrPatchHdrToFileByHandles: Pointer;
+
+function ExtractPatchHeaderToFileByHandles;
+begin
+ GetProcedureAddress(_ExtrPatchHdrToFileByHandles, patchapi, 'ExtractPatchHeaderToFileByHandles');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ExtrPatchHdrToFileByHandles]
+ end;
+end;
+
+var
+ _TestApplyPatchToFileA: Pointer;
+
+function TestApplyPatchToFileA;
+begin
+ GetProcedureAddress(_TestApplyPatchToFileA, patchapi, 'TestApplyPatchToFileA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_TestApplyPatchToFileA]
+ end;
+end;
+
+var
+ _TestApplyPatchToFileW: Pointer;
+
+function TestApplyPatchToFileW;
+begin
+ GetProcedureAddress(_TestApplyPatchToFileW, patchapi, 'TestApplyPatchToFileW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_TestApplyPatchToFileW]
+ end;
+end;
+
+var
+ _TestApplyPatchToFileByHandles: Pointer;
+
+function TestApplyPatchToFileByHandles;
+begin
+ GetProcedureAddress(_TestApplyPatchToFileByHandles, patchapi, 'TestApplyPatchToFileByHandles');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_TestApplyPatchToFileByHandles]
+ end;
+end;
+
+var
+ _ApplyPatchToFileA: Pointer;
+
+function ApplyPatchToFileA;
+begin
+ GetProcedureAddress(_ApplyPatchToFileA, patchapi, 'ApplyPatchToFileA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ApplyPatchToFileA]
+ end;
+end;
+
+var
+ _ApplyPatchToFileW: Pointer;
+
+function ApplyPatchToFileW;
+begin
+ GetProcedureAddress(_ApplyPatchToFileW, patchapi, 'ApplyPatchToFileW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ApplyPatchToFileW]
+ end;
+end;
+
+var
+ _ApplyPatchToFileByHandles: Pointer;
+
+function ApplyPatchToFileByHandles;
+begin
+ GetProcedureAddress(_ApplyPatchToFileByHandles, patchapi, 'ApplyPatchToFileByHandles');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ApplyPatchToFileByHandles]
+ end;
+end;
+
+var
+ _ApplyPatchToFileExA: Pointer;
+
+function ApplyPatchToFileExA;
+begin
+ GetProcedureAddress(_ApplyPatchToFileExA, patchapi, 'ApplyPatchToFileExA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ApplyPatchToFileExA]
+ end;
+end;
+
+var
+ _ApplyPatchToFileExW: Pointer;
+
+function ApplyPatchToFileExW;
+begin
+ GetProcedureAddress(_ApplyPatchToFileExW, patchapi, 'ApplyPatchToFileExW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ApplyPatchToFileExW]
+ end;
+end;
+
+var
+ _ApplyPatchToFileByHandlesEx: Pointer;
+
+function ApplyPatchToFileByHandlesEx;
+begin
+ GetProcedureAddress(_ApplyPatchToFileByHandlesEx, patchapi, 'ApplyPatchToFileByHandlesEx');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ApplyPatchToFileByHandlesEx]
+ end;
+end;
+
+var
+ _GetFilePatchSignatureA: Pointer;
+
+function GetFilePatchSignatureA;
+begin
+ GetProcedureAddress(_GetFilePatchSignatureA, patchapi, 'GetFilePatchSignatureA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetFilePatchSignatureA]
+ end;
+end;
+
+var
+ _GetFilePatchSignatureW: Pointer;
+
+function GetFilePatchSignatureW;
+begin
+ GetProcedureAddress(_GetFilePatchSignatureW, patchapi, 'GetFilePatchSignatureW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetFilePatchSignatureW]
+ end;
+end;
+
+var
+ _GetFilePatchSignatureByHandle: Pointer;
+
+function GetFilePatchSignatureByHandle;
+begin
+ GetProcedureAddress(_GetFilePatchSignatureByHandle, patchapi, 'GetFilePatchSignatureByHandle');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetFilePatchSignatureByHandle]
+ end;
+end;
+
+var
+ _CreatePatchFile: Pointer;
+
+function CreatePatchFile;
+begin
+ GetProcedureAddress(_CreatePatchFile, patchapi, 'CreatePatchFile' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreatePatchFile]
+ end;
+end;
+
+var
+ _CreatePatchFileEx: Pointer;
+
+function CreatePatchFileEx;
+begin
+ GetProcedureAddress(_CreatePatchFileEx, patchapi, 'CreatePatchFileEx' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreatePatchFileEx]
+ end;
+end;
+
+var
+ _ExtractPatchHeaderToFile: Pointer;
+
+function ExtractPatchHeaderToFile;
+begin
+ GetProcedureAddress(_ExtractPatchHeaderToFile, patchapi, 'ExtractPatchHeaderToFile' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ExtractPatchHeaderToFile]
+ end;
+end;
+
+var
+ _TestApplyPatchToFile: Pointer;
+
+function TestApplyPatchToFile;
+begin
+ GetProcedureAddress(_TestApplyPatchToFile, patchapi, 'TestApplyPatchToFile' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_TestApplyPatchToFile]
+ end;
+end;
+
+var
+ _ApplyPatchToFile: Pointer;
+
+function ApplyPatchToFile;
+begin
+ GetProcedureAddress(_ApplyPatchToFile, patchapi, 'ApplyPatchToFile' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ApplyPatchToFile]
+ end;
+end;
+
+var
+ _ApplyPatchToFileEx: Pointer;
+
+function ApplyPatchToFileEx;
+begin
+ GetProcedureAddress(_ApplyPatchToFileEx, patchapi, 'ApplyPatchToFileEx' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ApplyPatchToFileEx]
+ end;
+end;
+
+var
+ _GetFilePatchSignature: Pointer;
+
+function GetFilePatchSignature;
+begin
+ GetProcedureAddress(_GetFilePatchSignature, patchapi, 'GetFilePatchSignature' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetFilePatchSignature]
+ end;
+end;
+
+{$ELSE}
+
+function CreatePatchFileA; external patchapi name 'CreatePatchFileA';
+function CreatePatchFileW; external patchapi name 'CreatePatchFileW';
+function CreatePatchFileByHandles; external patchapi name 'CreatePatchFileByHandles';
+function CreatePatchFileExA; external patchapi name 'CreatePatchFileExA';
+function CreatePatchFileExW; external patchapi name 'CreatePatchFileExW';
+function CreatePatchFileByHandlesEx; external patchapi name 'CreatePatchFileByHandlesEx';
+function ExtractPatchHeaderToFileA; external patchapi name 'ExtractPatchHeaderToFileA';
+function ExtractPatchHeaderToFileW; external patchapi name 'ExtractPatchHeaderToFileW';
+function ExtractPatchHeaderToFileByHandles; external patchapi name 'ExtractPatchHeaderToFileByHandles';
+function TestApplyPatchToFileA; external patchapi name 'TestApplyPatchToFileA';
+function TestApplyPatchToFileW; external patchapi name 'TestApplyPatchToFileW';
+function TestApplyPatchToFileByHandles; external patchapi name 'TestApplyPatchToFileByHandles';
+function ApplyPatchToFileA; external patchapi name 'ApplyPatchToFileA';
+function ApplyPatchToFileW; external patchapi name 'ApplyPatchToFileW';
+function ApplyPatchToFileByHandles; external patchapi name 'ApplyPatchToFileByHandles';
+function ApplyPatchToFileExA; external patchapi name 'ApplyPatchToFileExA';
+function ApplyPatchToFileExW; external patchapi name 'ApplyPatchToFileExW';
+function ApplyPatchToFileByHandlesEx; external patchapi name 'ApplyPatchToFileByHandlesEx';
+function GetFilePatchSignatureA; external patchapi name 'GetFilePatchSignatureA';
+function GetFilePatchSignatureW; external patchapi name 'GetFilePatchSignatureW';
+function GetFilePatchSignatureByHandle; external patchapi name 'GetFilePatchSignatureByHandle';
+function CreatePatchFile; external patchapi name 'CreatePatchFile' + AWSuffix;
+function CreatePatchFileEx; external patchapi name 'CreatePatchFileEx' + AWSuffix;
+function ExtractPatchHeaderToFile; external patchapi name 'ExtractPatchHeaderToFile' + AWSuffix;
+function TestApplyPatchToFile; external patchapi name 'TestApplyPatchToFile' + AWSuffix;
+function ApplyPatchToFile; external patchapi name 'ApplyPatchToFile' + AWSuffix;
+function ApplyPatchToFileEx; external patchapi name 'ApplyPatchToFileEx' + AWSuffix;
+function GetFilePatchSignature; external patchapi name 'GetFilePatchSignature' + AWSuffix;
+
+{$ENDIF DYNAMIC_LINK}
+
+end.
diff --git a/packages/extra/winunits/jwapatchwiz.pas b/packages/extra/winunits/jwapatchwiz.pas
index 0cd5608230..2f3f3c1f2a 100644
--- a/packages/extra/winunits/jwapatchwiz.pas
+++ b/packages/extra/winunits/jwapatchwiz.pas
@@ -1,434 +1,434 @@
-{******************************************************************************}
-{ }
-{ MSI Patch Wizard API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: patchwiz.h, released August 2001. The original Pascal }
-{ code is: PatchWiz.pas, released December 2001. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwapatchwiz.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaPatchWiz;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "PatchWiz.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaWinType;
-
- (* PATCHWIZ.H - public header file for PATCHWIZ.DLL *)
-
-(*
-** UINT WINAPI UiCreatePatchPackage ( LPTSTR szPcpPath,
-** LPTSTR szPatchPath, LPTSTR szLogPath, HWND hwndStatus,
-** LPTSTR szTempFolder, BOOL fRemoveTempFolderIfPresent );
-**
-** Arguments:
-** szPcpPath - full absolute path to Windows Installer database
-** (PCP file) that contains appropriate tables of input-data for
-** Patch creation process such as Properties and TargetImages.
-** szPatchPath - optional, full absolute path to Patching Package
-** file (MSP file) to create and stuff with output. If this
-** NULL or an empty string, the api will try to use
-** Properties.Value where Properties.Name = PatchOutputPath
-** from the PCP file.
-** szLogPath - optional, full absolute path to text log file to
-** append to. Caller should truncate file if wanted.
-** hwndStatus - optional, window handle to display status text.
-** More details to come later.
-** szTempFolder - optional location to use for temp files.
-** Default is %TEMP%\~pcw_tmp.tmp\.
-** fRemoveTempFolderIfPresent - remove temp folder (and all its
-** contents) if present. If FALSE and folder is present, api
-** will fail.
-**
-** Return Values: ERROR_SUCCESS, plus ERROR_PCW_* that follow.
-*)
-
-const
- ERROR_PCW_BASE = DWORD($C00E5101);
- {$EXTERNALSYM ERROR_PCW_BASE}
-
- ERROR_PCW_PCP_DOESNT_EXIST = ERROR_PCW_BASE + $00;
- {$EXTERNALSYM ERROR_PCW_PCP_DOESNT_EXIST}
- ERROR_PCW_PCP_BAD_FORMAT = ERROR_PCW_BASE + $01;
- {$EXTERNALSYM ERROR_PCW_PCP_BAD_FORMAT}
- ERROR_PCW_CANT_CREATE_TEMP_FOLDER = ERROR_PCW_BASE + $02;
- {$EXTERNALSYM ERROR_PCW_CANT_CREATE_TEMP_FOLDER}
- ERROR_PCW_MISSING_PATCH_PATH = ERROR_PCW_BASE + $03;
- {$EXTERNALSYM ERROR_PCW_MISSING_PATCH_PATH}
- ERROR_PCW_CANT_OVERWRITE_PATCH = ERROR_PCW_BASE + $04;
- {$EXTERNALSYM ERROR_PCW_CANT_OVERWRITE_PATCH}
- ERROR_PCW_CANT_CREATE_PATCH_FILE = ERROR_PCW_BASE + $05;
- {$EXTERNALSYM ERROR_PCW_CANT_CREATE_PATCH_FILE}
- ERROR_PCW_MISSING_PATCH_GUID = ERROR_PCW_BASE + $06;
- {$EXTERNALSYM ERROR_PCW_MISSING_PATCH_GUID}
- ERROR_PCW_BAD_PATCH_GUID = ERROR_PCW_BASE + $07;
- {$EXTERNALSYM ERROR_PCW_BAD_PATCH_GUID}
- ERROR_PCW_BAD_GUIDS_TO_REPLACE = ERROR_PCW_BASE + $08;
- {$EXTERNALSYM ERROR_PCW_BAD_GUIDS_TO_REPLACE}
- ERROR_PCW_BAD_TARGET_PRODUCT_CODE_LIST = ERROR_PCW_BASE + $09;
- {$EXTERNALSYM ERROR_PCW_BAD_TARGET_PRODUCT_CODE_LIST}
- ERROR_PCW_NO_UPGRADED_IMAGES_TO_PATCH = ERROR_PCW_BASE + $0a;
- {$EXTERNALSYM ERROR_PCW_NO_UPGRADED_IMAGES_TO_PATCH}
- //#define ERROR_PCW_BAD_API_PATCHING_OPTION_FLAGS (ERROR_PCW_BASE + 0x0b) -- obsolete
- ERROR_PCW_BAD_API_PATCHING_SYMBOL_FLAGS = ERROR_PCW_BASE + $0c;
- {$EXTERNALSYM ERROR_PCW_BAD_API_PATCHING_SYMBOL_FLAGS}
- ERROR_PCW_OODS_COPYING_MSI = ERROR_PCW_BASE + $0d;
- {$EXTERNALSYM ERROR_PCW_OODS_COPYING_MSI}
- ERROR_PCW_UPGRADED_IMAGE_NAME_TOO_LONG = ERROR_PCW_BASE + $0e;
- {$EXTERNALSYM ERROR_PCW_UPGRADED_IMAGE_NAME_TOO_LONG}
- ERROR_PCW_BAD_UPGRADED_IMAGE_NAME = ERROR_PCW_BASE + $0f;
- {$EXTERNALSYM ERROR_PCW_BAD_UPGRADED_IMAGE_NAME}
-
- ERROR_PCW_DUP_UPGRADED_IMAGE_NAME = ERROR_PCW_BASE + $10;
- {$EXTERNALSYM ERROR_PCW_DUP_UPGRADED_IMAGE_NAME}
- ERROR_PCW_UPGRADED_IMAGE_PATH_TOO_LONG = ERROR_PCW_BASE + $11;
- {$EXTERNALSYM ERROR_PCW_UPGRADED_IMAGE_PATH_TOO_LONG}
- ERROR_PCW_UPGRADED_IMAGE_PATH_EMPTY = ERROR_PCW_BASE + $12;
- {$EXTERNALSYM ERROR_PCW_UPGRADED_IMAGE_PATH_EMPTY}
- ERROR_PCW_UPGRADED_IMAGE_PATH_NOT_EXIST = ERROR_PCW_BASE + $13;
- {$EXTERNALSYM ERROR_PCW_UPGRADED_IMAGE_PATH_NOT_EXIST}
- ERROR_PCW_UPGRADED_IMAGE_PATH_NOT_MSI = ERROR_PCW_BASE + $14;
- {$EXTERNALSYM ERROR_PCW_UPGRADED_IMAGE_PATH_NOT_MSI}
- ERROR_PCW_UPGRADED_IMAGE_COMPRESSED = ERROR_PCW_BASE + $15;
- {$EXTERNALSYM ERROR_PCW_UPGRADED_IMAGE_COMPRESSED}
- ERROR_PCW_TARGET_IMAGE_NAME_TOO_LONG = ERROR_PCW_BASE + $16;
- {$EXTERNALSYM ERROR_PCW_TARGET_IMAGE_NAME_TOO_LONG}
- ERROR_PCW_BAD_TARGET_IMAGE_NAME = ERROR_PCW_BASE + $17;
- {$EXTERNALSYM ERROR_PCW_BAD_TARGET_IMAGE_NAME}
- ERROR_PCW_DUP_TARGET_IMAGE_NAME = ERROR_PCW_BASE + $18;
- {$EXTERNALSYM ERROR_PCW_DUP_TARGET_IMAGE_NAME}
- ERROR_PCW_TARGET_IMAGE_PATH_TOO_LONG = ERROR_PCW_BASE + $19;
- {$EXTERNALSYM ERROR_PCW_TARGET_IMAGE_PATH_TOO_LONG}
- ERROR_PCW_TARGET_IMAGE_PATH_EMPTY = ERROR_PCW_BASE + $1a;
- {$EXTERNALSYM ERROR_PCW_TARGET_IMAGE_PATH_EMPTY}
- ERROR_PCW_TARGET_IMAGE_PATH_NOT_EXIST = ERROR_PCW_BASE + $1b;
- {$EXTERNALSYM ERROR_PCW_TARGET_IMAGE_PATH_NOT_EXIST}
- ERROR_PCW_TARGET_IMAGE_PATH_NOT_MSI = ERROR_PCW_BASE + $1c;
- {$EXTERNALSYM ERROR_PCW_TARGET_IMAGE_PATH_NOT_MSI}
- ERROR_PCW_TARGET_IMAGE_COMPRESSED = ERROR_PCW_BASE + $1d;
- {$EXTERNALSYM ERROR_PCW_TARGET_IMAGE_COMPRESSED}
- ERROR_PCW_TARGET_BAD_PROD_VALIDATE = ERROR_PCW_BASE + $1e;
- {$EXTERNALSYM ERROR_PCW_TARGET_BAD_PROD_VALIDATE}
- ERROR_PCW_TARGET_BAD_PROD_CODE_VAL = ERROR_PCW_BASE + $1f;
- {$EXTERNALSYM ERROR_PCW_TARGET_BAD_PROD_CODE_VAL}
-
- ERROR_PCW_UPGRADED_MISSING_SRC_FILES = ERROR_PCW_BASE + $20;
- {$EXTERNALSYM ERROR_PCW_UPGRADED_MISSING_SRC_FILES}
- ERROR_PCW_TARGET_MISSING_SRC_FILES = ERROR_PCW_BASE + $21;
- {$EXTERNALSYM ERROR_PCW_TARGET_MISSING_SRC_FILES}
- ERROR_PCW_IMAGE_FAMILY_NAME_TOO_LONG = ERROR_PCW_BASE + $22;
- {$EXTERNALSYM ERROR_PCW_IMAGE_FAMILY_NAME_TOO_LONG}
- ERROR_PCW_BAD_IMAGE_FAMILY_NAME = ERROR_PCW_BASE + $23;
- {$EXTERNALSYM ERROR_PCW_BAD_IMAGE_FAMILY_NAME}
- ERROR_PCW_DUP_IMAGE_FAMILY_NAME = ERROR_PCW_BASE + $24;
- {$EXTERNALSYM ERROR_PCW_DUP_IMAGE_FAMILY_NAME}
- ERROR_PCW_BAD_IMAGE_FAMILY_SRC_PROP = ERROR_PCW_BASE + $25;
- {$EXTERNALSYM ERROR_PCW_BAD_IMAGE_FAMILY_SRC_PROP}
- ERROR_PCW_UFILEDATA_LONG_FILE_TABLE_KEY = ERROR_PCW_BASE + $26;
- {$EXTERNALSYM ERROR_PCW_UFILEDATA_LONG_FILE_TABLE_KEY}
- ERROR_PCW_UFILEDATA_BLANK_FILE_TABLE_KEY = ERROR_PCW_BASE + $27;
- {$EXTERNALSYM ERROR_PCW_UFILEDATA_BLANK_FILE_TABLE_KEY}
- ERROR_PCW_UFILEDATA_MISSING_FILE_TABLE_KEY = ERROR_PCW_BASE + $28;
- {$EXTERNALSYM ERROR_PCW_UFILEDATA_MISSING_FILE_TABLE_KEY}
- ERROR_PCW_EXTFILE_LONG_FILE_TABLE_KEY = ERROR_PCW_BASE + $29;
- {$EXTERNALSYM ERROR_PCW_EXTFILE_LONG_FILE_TABLE_KEY}
- ERROR_PCW_EXTFILE_BLANK_FILE_TABLE_KEY = ERROR_PCW_BASE + $2a;
- {$EXTERNALSYM ERROR_PCW_EXTFILE_BLANK_FILE_TABLE_KEY}
- ERROR_PCW_EXTFILE_BAD_FAMILY_FIELD = ERROR_PCW_BASE + $2b;
- {$EXTERNALSYM ERROR_PCW_EXTFILE_BAD_FAMILY_FIELD}
- ERROR_PCW_EXTFILE_LONG_PATH_TO_FILE = ERROR_PCW_BASE + $2c;
- {$EXTERNALSYM ERROR_PCW_EXTFILE_LONG_PATH_TO_FILE}
- ERROR_PCW_EXTFILE_BLANK_PATH_TO_FILE = ERROR_PCW_BASE + $2d;
- {$EXTERNALSYM ERROR_PCW_EXTFILE_BLANK_PATH_TO_FILE}
- ERROR_PCW_EXTFILE_MISSING_FILE = ERROR_PCW_BASE + $2e;
- {$EXTERNALSYM ERROR_PCW_EXTFILE_MISSING_FILE}
-//#define ERROR_PCW_FILERANGE_LONG_FILE_TABLE_KEY (ERROR_PCW_BASE + 0x2f) -- obsolete
-
-//#define ERROR_PCW_FILERANGE_BLANK_FILE_TABLE_KEY (ERROR_PCW_BASE + 0x30) -- obsolete
-//#define ERROR_PCW_FILERANGE_MISSING_FILE_TABLE_KEY (ERROR_PCW_BASE + 0x31) -- obsolete
-//#define ERROR_PCW_FILERANGE_LONG_PATH_TO_FILE (ERROR_PCW_BASE + 0x32) -- obsolete
-//#define ERROR_PCW_FILERANGE_MISSING_FILE (ERROR_PCW_BASE + 0x33) -- obsolete
-//#define ERROR_PCW_FILERANGE_INVALID_OFFSET (ERROR_PCW_BASE + 0x34) -- obsolete
-//#define ERROR_PCW_FILERANGE_INVALID_SIZE (ERROR_PCW_BASE + 0x35) -- obsolete
-//#define ERROR_PCW_FILERANGE_INVALID_RETAIN (ERROR_PCW_BASE + 0x36) -- obsolete
-//#define ERROR_PCW_BAD_MEDIA_SRC_PROP_NAME (ERROR_PCW_BASE + 0x37) -- obsolete
-//#define ERROR_PCW_BAD_MEDIA_DISK_ID (ERROR_PCW_BASE + 0x38) -- obsolete
- ERROR_PCW_BAD_FILE_SEQUENCE_START = ERROR_PCW_BASE + $39;
- {$EXTERNALSYM ERROR_PCW_BAD_FILE_SEQUENCE_START}
- ERROR_PCW_CANT_COPY_FILE_TO_TEMP_FOLDER = ERROR_PCW_BASE + $3a;
- {$EXTERNALSYM ERROR_PCW_CANT_COPY_FILE_TO_TEMP_FOLDER}
- ERROR_PCW_CANT_CREATE_ONE_PATCH_FILE = ERROR_PCW_BASE + $3b;
- {$EXTERNALSYM ERROR_PCW_CANT_CREATE_ONE_PATCH_FILE}
- ERROR_PCW_BAD_IMAGE_FAMILY_DISKID = ERROR_PCW_BASE + $3c;
- {$EXTERNALSYM ERROR_PCW_BAD_IMAGE_FAMILY_DISKID}
- ERROR_PCW_BAD_IMAGE_FAMILY_FILESEQSTART = ERROR_PCW_BASE + $3d;
- {$EXTERNALSYM ERROR_PCW_BAD_IMAGE_FAMILY_FILESEQSTART}
- ERROR_PCW_BAD_UPGRADED_IMAGE_FAMILY = ERROR_PCW_BASE + $3e;
- {$EXTERNALSYM ERROR_PCW_BAD_UPGRADED_IMAGE_FAMILY}
- ERROR_PCW_BAD_TARGET_IMAGE_UPGRADED = ERROR_PCW_BASE + $3f;
- {$EXTERNALSYM ERROR_PCW_BAD_TARGET_IMAGE_UPGRADED}
-
- ERROR_PCW_DUP_TARGET_IMAGE_PACKCODE = ERROR_PCW_BASE + $40;
- {$EXTERNALSYM ERROR_PCW_DUP_TARGET_IMAGE_PACKCODE}
- ERROR_PCW_UFILEDATA_BAD_UPGRADED_FIELD = ERROR_PCW_BASE + $41;
- {$EXTERNALSYM ERROR_PCW_UFILEDATA_BAD_UPGRADED_FIELD}
- ERROR_PCW_MISMATCHED_PRODUCT_CODES = ERROR_PCW_BASE + $42;
- {$EXTERNALSYM ERROR_PCW_MISMATCHED_PRODUCT_CODES}
- ERROR_PCW_MISMATCHED_PRODUCT_VERSIONS = ERROR_PCW_BASE + $43;
- {$EXTERNALSYM ERROR_PCW_MISMATCHED_PRODUCT_VERSIONS}
- ERROR_PCW_CANNOT_WRITE_DDF = ERROR_PCW_BASE + $44;
- {$EXTERNALSYM ERROR_PCW_CANNOT_WRITE_DDF}
- ERROR_PCW_CANNOT_RUN_MAKECAB = ERROR_PCW_BASE + $45;
- {$EXTERNALSYM ERROR_PCW_CANNOT_RUN_MAKECAB}
-//#define ERROR_PCW_CANNOT_CREATE_STORAGE (ERROR_PCW_BASE + 0x46) -- obsolete
-//#define ERROR_PCW_CANNOT_CREATE_STREAM (ERROR_PCW_BASE + 0x47) -- obsolete
-//#define ERROR_PCW_CANNOT_WRITE_STREAM (ERROR_PCW_BASE + 0x48) -- obsolete
-//#define ERROR_PCW_CANNOT_READ_CABINET (ERROR_PCW_BASE + 0x49) -- obsolete
- ERROR_PCW_WRITE_SUMMARY_PROPERTIES = ERROR_PCW_BASE + $4a;
- {$EXTERNALSYM ERROR_PCW_WRITE_SUMMARY_PROPERTIES}
- ERROR_PCW_TFILEDATA_LONG_FILE_TABLE_KEY = ERROR_PCW_BASE + $4b;
- {$EXTERNALSYM ERROR_PCW_TFILEDATA_LONG_FILE_TABLE_KEY}
- ERROR_PCW_TFILEDATA_BLANK_FILE_TABLE_KEY = ERROR_PCW_BASE + $4c;
- {$EXTERNALSYM ERROR_PCW_TFILEDATA_BLANK_FILE_TABLE_KEY}
- ERROR_PCW_TFILEDATA_MISSING_FILE_TABLE_KEY = ERROR_PCW_BASE + $4d;
- {$EXTERNALSYM ERROR_PCW_TFILEDATA_MISSING_FILE_TABLE_KEY}
- ERROR_PCW_TFILEDATA_BAD_TARGET_FIELD = ERROR_PCW_BASE + $4e;
- {$EXTERNALSYM ERROR_PCW_TFILEDATA_BAD_TARGET_FIELD}
- ERROR_PCW_UPGRADED_IMAGE_PATCH_PATH_TOO_LONG = ERROR_PCW_BASE + $4f;
- {$EXTERNALSYM ERROR_PCW_UPGRADED_IMAGE_PATCH_PATH_TOO_LONG}
-
- ERROR_PCW_UPGRADED_IMAGE_PATCH_PATH_NOT_EXIST = ERROR_PCW_BASE + $50;
- {$EXTERNALSYM ERROR_PCW_UPGRADED_IMAGE_PATCH_PATH_NOT_EXIST}
- ERROR_PCW_UPGRADED_IMAGE_PATCH_PATH_NOT_MSI = ERROR_PCW_BASE + $51;
- {$EXTERNALSYM ERROR_PCW_UPGRADED_IMAGE_PATCH_PATH_NOT_MSI}
- ERROR_PCW_DUP_UPGRADED_IMAGE_PACKCODE = ERROR_PCW_BASE + $52;
- {$EXTERNALSYM ERROR_PCW_DUP_UPGRADED_IMAGE_PACKCODE}
- ERROR_PCW_UFILEIGNORE_BAD_UPGRADED_FIELD = ERROR_PCW_BASE + $53;
- {$EXTERNALSYM ERROR_PCW_UFILEIGNORE_BAD_UPGRADED_FIELD}
- ERROR_PCW_UFILEIGNORE_LONG_FILE_TABLE_KEY = ERROR_PCW_BASE + $54;
- {$EXTERNALSYM ERROR_PCW_UFILEIGNORE_LONG_FILE_TABLE_KEY}
- ERROR_PCW_UFILEIGNORE_BLANK_FILE_TABLE_KEY = ERROR_PCW_BASE + $55;
- {$EXTERNALSYM ERROR_PCW_UFILEIGNORE_BLANK_FILE_TABLE_KEY}
- ERROR_PCW_UFILEIGNORE_BAD_FILE_TABLE_KEY = ERROR_PCW_BASE + $56;
- {$EXTERNALSYM ERROR_PCW_UFILEIGNORE_BAD_FILE_TABLE_KEY}
- ERROR_PCW_FAMILY_RANGE_NAME_TOO_LONG = ERROR_PCW_BASE + $57;
- {$EXTERNALSYM ERROR_PCW_FAMILY_RANGE_NAME_TOO_LONG}
- ERROR_PCW_BAD_FAMILY_RANGE_NAME = ERROR_PCW_BASE + $58;
- {$EXTERNALSYM ERROR_PCW_BAD_FAMILY_RANGE_NAME}
- ERROR_PCW_FAMILY_RANGE_LONG_FILE_TABLE_KEY = ERROR_PCW_BASE + $59;
- {$EXTERNALSYM ERROR_PCW_FAMILY_RANGE_LONG_FILE_TABLE_KEY}
- ERROR_PCW_FAMILY_RANGE_BLANK_FILE_TABLE_KEY = ERROR_PCW_BASE + $5a;
- {$EXTERNALSYM ERROR_PCW_FAMILY_RANGE_BLANK_FILE_TABLE_KEY}
- ERROR_PCW_FAMILY_RANGE_LONG_RETAIN_OFFSETS = ERROR_PCW_BASE + $5b;
- {$EXTERNALSYM ERROR_PCW_FAMILY_RANGE_LONG_RETAIN_OFFSETS}
- ERROR_PCW_FAMILY_RANGE_BLANK_RETAIN_OFFSETS = ERROR_PCW_BASE + $5c;
- {$EXTERNALSYM ERROR_PCW_FAMILY_RANGE_BLANK_RETAIN_OFFSETS}
- ERROR_PCW_FAMILY_RANGE_BAD_RETAIN_OFFSETS = ERROR_PCW_BASE + $5d;
- {$EXTERNALSYM ERROR_PCW_FAMILY_RANGE_BAD_RETAIN_OFFSETS}
- ERROR_PCW_FAMILY_RANGE_LONG_RETAIN_LENGTHS = ERROR_PCW_BASE + $5e;
- {$EXTERNALSYM ERROR_PCW_FAMILY_RANGE_LONG_RETAIN_LENGTHS}
- ERROR_PCW_FAMILY_RANGE_BLANK_RETAIN_LENGTHS = ERROR_PCW_BASE + $5f;
- {$EXTERNALSYM ERROR_PCW_FAMILY_RANGE_BLANK_RETAIN_LENGTHS}
-
- ERROR_PCW_FAMILY_RANGE_BAD_RETAIN_LENGTHS = ERROR_PCW_BASE + $60;
- {$EXTERNALSYM ERROR_PCW_FAMILY_RANGE_BAD_RETAIN_LENGTHS}
- ERROR_PCW_FAMILY_RANGE_COUNT_MISMATCH = ERROR_PCW_BASE + $61;
- {$EXTERNALSYM ERROR_PCW_FAMILY_RANGE_COUNT_MISMATCH}
- ERROR_PCW_EXTFILE_LONG_IGNORE_OFFSETS = ERROR_PCW_BASE + $62;
- {$EXTERNALSYM ERROR_PCW_EXTFILE_LONG_IGNORE_OFFSETS}
- ERROR_PCW_EXTFILE_BAD_IGNORE_OFFSETS = ERROR_PCW_BASE + $63;
- {$EXTERNALSYM ERROR_PCW_EXTFILE_BAD_IGNORE_OFFSETS}
- ERROR_PCW_EXTFILE_LONG_IGNORE_LENGTHS = ERROR_PCW_BASE + $64;
- {$EXTERNALSYM ERROR_PCW_EXTFILE_LONG_IGNORE_LENGTHS}
- ERROR_PCW_EXTFILE_BAD_IGNORE_LENGTHS = ERROR_PCW_BASE + $65;
- {$EXTERNALSYM ERROR_PCW_EXTFILE_BAD_IGNORE_LENGTHS}
- ERROR_PCW_EXTFILE_IGNORE_COUNT_MISMATCH = ERROR_PCW_BASE + $66;
- {$EXTERNALSYM ERROR_PCW_EXTFILE_IGNORE_COUNT_MISMATCH}
- ERROR_PCW_EXTFILE_LONG_RETAIN_OFFSETS = ERROR_PCW_BASE + $67;
- {$EXTERNALSYM ERROR_PCW_EXTFILE_LONG_RETAIN_OFFSETS}
- ERROR_PCW_EXTFILE_BAD_RETAIN_OFFSETS = ERROR_PCW_BASE + $68;
- {$EXTERNALSYM ERROR_PCW_EXTFILE_BAD_RETAIN_OFFSETS}
-//#define ERROR_PCW_EXTFILE_RETAIN_COUNT_MISMATCH (ERROR_PCW_BASE + 0x69) -- obsolete
- ERROR_PCW_TFILEDATA_LONG_IGNORE_OFFSETS = ERROR_PCW_BASE + $6a;
- {$EXTERNALSYM ERROR_PCW_TFILEDATA_LONG_IGNORE_OFFSETS}
- ERROR_PCW_TFILEDATA_BAD_IGNORE_OFFSETS = ERROR_PCW_BASE + $6b;
- {$EXTERNALSYM ERROR_PCW_TFILEDATA_BAD_IGNORE_OFFSETS}
- ERROR_PCW_TFILEDATA_LONG_IGNORE_LENGTHS = ERROR_PCW_BASE + $6c;
- {$EXTERNALSYM ERROR_PCW_TFILEDATA_LONG_IGNORE_LENGTHS}
- ERROR_PCW_TFILEDATA_BAD_IGNORE_LENGTHS = ERROR_PCW_BASE + $6d;
- {$EXTERNALSYM ERROR_PCW_TFILEDATA_BAD_IGNORE_LENGTHS}
- ERROR_PCW_TFILEDATA_IGNORE_COUNT_MISMATCH = ERROR_PCW_BASE + $6e;
- {$EXTERNALSYM ERROR_PCW_TFILEDATA_IGNORE_COUNT_MISMATCH}
- ERROR_PCW_TFILEDATA_LONG_RETAIN_OFFSETS = ERROR_PCW_BASE + $6f;
- {$EXTERNALSYM ERROR_PCW_TFILEDATA_LONG_RETAIN_OFFSETS}
-
- ERROR_PCW_TFILEDATA_BAD_RETAIN_OFFSETS = ERROR_PCW_BASE + $70;
- {$EXTERNALSYM ERROR_PCW_TFILEDATA_BAD_RETAIN_OFFSETS}
-//#define ERROR_PCW_TFILEDATA_RETAIN_COUNT_MISMATCH (ERROR_PCW_BASE + 0x71) -- obsolete
- ERROR_PCW_CANT_GENERATE_TRANSFORM = ERROR_PCW_BASE + $72;
- {$EXTERNALSYM ERROR_PCW_CANT_GENERATE_TRANSFORM}
- ERROR_PCW_CANT_CREATE_SUMMARY_INFO = ERROR_PCW_BASE + $73;
- {$EXTERNALSYM ERROR_PCW_CANT_CREATE_SUMMARY_INFO}
- ERROR_PCW_CANT_GENERATE_TRANSFORM_POUND = ERROR_PCW_BASE + $74;
- {$EXTERNALSYM ERROR_PCW_CANT_GENERATE_TRANSFORM_POUND}
- ERROR_PCW_CANT_CREATE_SUMMARY_INFO_POUND = ERROR_PCW_BASE + $75;
- {$EXTERNALSYM ERROR_PCW_CANT_CREATE_SUMMARY_INFO_POUND}
- ERROR_PCW_BAD_UPGRADED_IMAGE_PRODUCT_CODE = ERROR_PCW_BASE + $76;
- {$EXTERNALSYM ERROR_PCW_BAD_UPGRADED_IMAGE_PRODUCT_CODE}
- ERROR_PCW_BAD_UPGRADED_IMAGE_PRODUCT_VERSION = ERROR_PCW_BASE + $77;
- {$EXTERNALSYM ERROR_PCW_BAD_UPGRADED_IMAGE_PRODUCT_VERSION}
- ERROR_PCW_BAD_UPGRADED_IMAGE_UPGRADE_CODE = ERROR_PCW_BASE + $78;
- {$EXTERNALSYM ERROR_PCW_BAD_UPGRADED_IMAGE_UPGRADE_CODE}
- ERROR_PCW_BAD_TARGET_IMAGE_PRODUCT_CODE = ERROR_PCW_BASE + $79;
- {$EXTERNALSYM ERROR_PCW_BAD_TARGET_IMAGE_PRODUCT_CODE}
- ERROR_PCW_BAD_TARGET_IMAGE_PRODUCT_VERSION = ERROR_PCW_BASE + $7a;
- {$EXTERNALSYM ERROR_PCW_BAD_TARGET_IMAGE_PRODUCT_VERSION}
- ERROR_PCW_BAD_TARGET_IMAGE_UPGRADE_CODE = ERROR_PCW_BASE + $7b;
- {$EXTERNALSYM ERROR_PCW_BAD_TARGET_IMAGE_UPGRADE_CODE}
- ERROR_PCW_MATCHED_PRODUCT_VERSIONS = ERROR_PCW_BASE + $7c;
- {$EXTERNALSYM ERROR_PCW_MATCHED_PRODUCT_VERSIONS}
- ERROR_PCW_NEXTxd = ERROR_PCW_BASE + $7d;
- {$EXTERNALSYM ERROR_PCW_NEXTxd}
- ERROR_PCW_NEXTxe = ERROR_PCW_BASE + $7e;
- {$EXTERNALSYM ERROR_PCW_NEXTxe}
- ERROR_PCW_NEXTxf = ERROR_PCW_BASE + $7f;
- {$EXTERNALSYM ERROR_PCW_NEXTxf}
-
-(*
-#define ERROR_PCW_NEXTx0 (ERROR_PCW_BASE + 0x80)
-#define ERROR_PCW_NEXTx1 (ERROR_PCW_BASE + 0x81)
-#define ERROR_PCW_NEXTx2 (ERROR_PCW_BASE + 0x82)
-#define ERROR_PCW_NEXTx3 (ERROR_PCW_BASE + 0x83)
-#define ERROR_PCW_NEXTx4 (ERROR_PCW_BASE + 0x84)
-#define ERROR_PCW_NEXTx5 (ERROR_PCW_BASE + 0x85)
-#define ERROR_PCW_NEXTx6 (ERROR_PCW_BASE + 0x86)
-#define ERROR_PCW_NEXTx7 (ERROR_PCW_BASE + 0x87)
-#define ERROR_PCW_NEXTx8 (ERROR_PCW_BASE + 0x88)
-#define ERROR_PCW_NEXTx9 (ERROR_PCW_BASE + 0x89)
-#define ERROR_PCW_NEXTxa (ERROR_PCW_BASE + 0x8a)
-#define ERROR_PCW_NEXTxb (ERROR_PCW_BASE + 0x8b)
-#define ERROR_PCW_NEXTxc (ERROR_PCW_BASE + 0x8c)
-#define ERROR_PCW_NEXTxd (ERROR_PCW_BASE + 0x8d)
-#define ERROR_PCW_NEXTxe (ERROR_PCW_BASE + 0x8e)
-#define ERROR_PCW_NEXTxf (ERROR_PCW_BASE + 0x8f)
-*)
-
-// Control IDs for hwndStatus child Text controls; title is required
-
- IDC_STATUS_TITLE = $1cf0;
- {$EXTERNALSYM IDC_STATUS_TITLE}
- IDC_STATUS_DATA1 = $1cf1;
- {$EXTERNALSYM IDC_STATUS_DATA1}
- IDC_STATUS_DATA2 = $1cf2;
- {$EXTERNALSYM IDC_STATUS_DATA2}
-
-function UiCreatePatchPackageA(szaPcpPath, szaPatchPath, szaLogPath: LPSTR; hwndStatus: HWND; szaTempFolder: LPSTR; fRemoveTempFolderIfPresent: BOOL): UINT; stdcall;
-{$EXTERNALSYM UiCreatePatchPackageA}
-function UiCreatePatchPackageW(szwPcpPath, szwPatchPath, szwLogPath: LPWSTR; hwndStatus: HWND; szwTempFolder: LPWSTR; fRemoveTempFolderIfPresent: BOOL): UINT; stdcall;
-{$EXTERNALSYM UiCreatePatchPackageW}
-function UiCreatePatchPackage(szwPcpPath, szwPatchPath, szwLogPath: LPTSTR; hwndStatus: HWND; szwTempFolder: LPTSTR; fRemoveTempFolderIfPresent: BOOL): UINT; stdcall;
-{$EXTERNALSYM UiCreatePatchPackage}
-
-implementation
-
-const
- patchwiz = 'patchwiz.dll'; // mvb Installed in Samples\SysMgmt\Msi\Patching
- {$IFDEF UNICODE}
- AWSuffix = 'W';
- {$ELSE}
- AWSuffix = 'A';
- {$ENDIF UNICODE}
-
-{$IFDEF DYNAMIC_LINK}
-
-var
- _UiCreatePatchPackageA: Pointer;
-
-function UiCreatePatchPackageA;
-begin
- GetProcedureAddress(_UiCreatePatchPackageA, patchwiz, 'UiCreatePatchPackageA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_UiCreatePatchPackageA]
- end;
-end;
-
-var
- _UiCreatePatchPackageW: Pointer;
-
-function UiCreatePatchPackageW;
-begin
- GetProcedureAddress(_UiCreatePatchPackageW, patchwiz, 'UiCreatePatchPackageW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_UiCreatePatchPackageW]
- end;
-end;
-
-var
- _UiCreatePatchPackage: Pointer;
-
-function UiCreatePatchPackage;
-begin
- GetProcedureAddress(_UiCreatePatchPackage, patchwiz, 'UiCreatePatchPackage' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_UiCreatePatchPackage]
- end;
-end;
-
-{$ELSE}
-
-function UiCreatePatchPackageA; external patchwiz name 'UiCreatePatchPackageA';
-function UiCreatePatchPackageW; external patchwiz name 'UiCreatePatchPackageW';
-function UiCreatePatchPackage; external patchwiz name 'UiCreatePatchPackage' + AWSuffix;
-
-{$ENDIF DYNAMIC_LINK}
-
-end.
+{******************************************************************************}
+{ }
+{ MSI Patch Wizard API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: patchwiz.h, released August 2001. The original Pascal }
+{ code is: PatchWiz.pas, released December 2001. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwapatchwiz.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaPatchWiz;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "PatchWiz.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaWinType;
+
+ (* PATCHWIZ.H - public header file for PATCHWIZ.DLL *)
+
+(*
+** UINT WINAPI UiCreatePatchPackage ( LPTSTR szPcpPath,
+** LPTSTR szPatchPath, LPTSTR szLogPath, HWND hwndStatus,
+** LPTSTR szTempFolder, BOOL fRemoveTempFolderIfPresent );
+**
+** Arguments:
+** szPcpPath - full absolute path to Windows Installer database
+** (PCP file) that contains appropriate tables of input-data for
+** Patch creation process such as Properties and TargetImages.
+** szPatchPath - optional, full absolute path to Patching Package
+** file (MSP file) to create and stuff with output. If this
+** NULL or an empty string, the api will try to use
+** Properties.Value where Properties.Name = PatchOutputPath
+** from the PCP file.
+** szLogPath - optional, full absolute path to text log file to
+** append to. Caller should truncate file if wanted.
+** hwndStatus - optional, window handle to display status text.
+** More details to come later.
+** szTempFolder - optional location to use for temp files.
+** Default is %TEMP%\~pcw_tmp.tmp\.
+** fRemoveTempFolderIfPresent - remove temp folder (and all its
+** contents) if present. If FALSE and folder is present, api
+** will fail.
+**
+** Return Values: ERROR_SUCCESS, plus ERROR_PCW_* that follow.
+*)
+
+const
+ ERROR_PCW_BASE = DWORD($C00E5101);
+ {$EXTERNALSYM ERROR_PCW_BASE}
+
+ ERROR_PCW_PCP_DOESNT_EXIST = ERROR_PCW_BASE + $00;
+ {$EXTERNALSYM ERROR_PCW_PCP_DOESNT_EXIST}
+ ERROR_PCW_PCP_BAD_FORMAT = ERROR_PCW_BASE + $01;
+ {$EXTERNALSYM ERROR_PCW_PCP_BAD_FORMAT}
+ ERROR_PCW_CANT_CREATE_TEMP_FOLDER = ERROR_PCW_BASE + $02;
+ {$EXTERNALSYM ERROR_PCW_CANT_CREATE_TEMP_FOLDER}
+ ERROR_PCW_MISSING_PATCH_PATH = ERROR_PCW_BASE + $03;
+ {$EXTERNALSYM ERROR_PCW_MISSING_PATCH_PATH}
+ ERROR_PCW_CANT_OVERWRITE_PATCH = ERROR_PCW_BASE + $04;
+ {$EXTERNALSYM ERROR_PCW_CANT_OVERWRITE_PATCH}
+ ERROR_PCW_CANT_CREATE_PATCH_FILE = ERROR_PCW_BASE + $05;
+ {$EXTERNALSYM ERROR_PCW_CANT_CREATE_PATCH_FILE}
+ ERROR_PCW_MISSING_PATCH_GUID = ERROR_PCW_BASE + $06;
+ {$EXTERNALSYM ERROR_PCW_MISSING_PATCH_GUID}
+ ERROR_PCW_BAD_PATCH_GUID = ERROR_PCW_BASE + $07;
+ {$EXTERNALSYM ERROR_PCW_BAD_PATCH_GUID}
+ ERROR_PCW_BAD_GUIDS_TO_REPLACE = ERROR_PCW_BASE + $08;
+ {$EXTERNALSYM ERROR_PCW_BAD_GUIDS_TO_REPLACE}
+ ERROR_PCW_BAD_TARGET_PRODUCT_CODE_LIST = ERROR_PCW_BASE + $09;
+ {$EXTERNALSYM ERROR_PCW_BAD_TARGET_PRODUCT_CODE_LIST}
+ ERROR_PCW_NO_UPGRADED_IMAGES_TO_PATCH = ERROR_PCW_BASE + $0a;
+ {$EXTERNALSYM ERROR_PCW_NO_UPGRADED_IMAGES_TO_PATCH}
+ //#define ERROR_PCW_BAD_API_PATCHING_OPTION_FLAGS (ERROR_PCW_BASE + 0x0b) -- obsolete
+ ERROR_PCW_BAD_API_PATCHING_SYMBOL_FLAGS = ERROR_PCW_BASE + $0c;
+ {$EXTERNALSYM ERROR_PCW_BAD_API_PATCHING_SYMBOL_FLAGS}
+ ERROR_PCW_OODS_COPYING_MSI = ERROR_PCW_BASE + $0d;
+ {$EXTERNALSYM ERROR_PCW_OODS_COPYING_MSI}
+ ERROR_PCW_UPGRADED_IMAGE_NAME_TOO_LONG = ERROR_PCW_BASE + $0e;
+ {$EXTERNALSYM ERROR_PCW_UPGRADED_IMAGE_NAME_TOO_LONG}
+ ERROR_PCW_BAD_UPGRADED_IMAGE_NAME = ERROR_PCW_BASE + $0f;
+ {$EXTERNALSYM ERROR_PCW_BAD_UPGRADED_IMAGE_NAME}
+
+ ERROR_PCW_DUP_UPGRADED_IMAGE_NAME = ERROR_PCW_BASE + $10;
+ {$EXTERNALSYM ERROR_PCW_DUP_UPGRADED_IMAGE_NAME}
+ ERROR_PCW_UPGRADED_IMAGE_PATH_TOO_LONG = ERROR_PCW_BASE + $11;
+ {$EXTERNALSYM ERROR_PCW_UPGRADED_IMAGE_PATH_TOO_LONG}
+ ERROR_PCW_UPGRADED_IMAGE_PATH_EMPTY = ERROR_PCW_BASE + $12;
+ {$EXTERNALSYM ERROR_PCW_UPGRADED_IMAGE_PATH_EMPTY}
+ ERROR_PCW_UPGRADED_IMAGE_PATH_NOT_EXIST = ERROR_PCW_BASE + $13;
+ {$EXTERNALSYM ERROR_PCW_UPGRADED_IMAGE_PATH_NOT_EXIST}
+ ERROR_PCW_UPGRADED_IMAGE_PATH_NOT_MSI = ERROR_PCW_BASE + $14;
+ {$EXTERNALSYM ERROR_PCW_UPGRADED_IMAGE_PATH_NOT_MSI}
+ ERROR_PCW_UPGRADED_IMAGE_COMPRESSED = ERROR_PCW_BASE + $15;
+ {$EXTERNALSYM ERROR_PCW_UPGRADED_IMAGE_COMPRESSED}
+ ERROR_PCW_TARGET_IMAGE_NAME_TOO_LONG = ERROR_PCW_BASE + $16;
+ {$EXTERNALSYM ERROR_PCW_TARGET_IMAGE_NAME_TOO_LONG}
+ ERROR_PCW_BAD_TARGET_IMAGE_NAME = ERROR_PCW_BASE + $17;
+ {$EXTERNALSYM ERROR_PCW_BAD_TARGET_IMAGE_NAME}
+ ERROR_PCW_DUP_TARGET_IMAGE_NAME = ERROR_PCW_BASE + $18;
+ {$EXTERNALSYM ERROR_PCW_DUP_TARGET_IMAGE_NAME}
+ ERROR_PCW_TARGET_IMAGE_PATH_TOO_LONG = ERROR_PCW_BASE + $19;
+ {$EXTERNALSYM ERROR_PCW_TARGET_IMAGE_PATH_TOO_LONG}
+ ERROR_PCW_TARGET_IMAGE_PATH_EMPTY = ERROR_PCW_BASE + $1a;
+ {$EXTERNALSYM ERROR_PCW_TARGET_IMAGE_PATH_EMPTY}
+ ERROR_PCW_TARGET_IMAGE_PATH_NOT_EXIST = ERROR_PCW_BASE + $1b;
+ {$EXTERNALSYM ERROR_PCW_TARGET_IMAGE_PATH_NOT_EXIST}
+ ERROR_PCW_TARGET_IMAGE_PATH_NOT_MSI = ERROR_PCW_BASE + $1c;
+ {$EXTERNALSYM ERROR_PCW_TARGET_IMAGE_PATH_NOT_MSI}
+ ERROR_PCW_TARGET_IMAGE_COMPRESSED = ERROR_PCW_BASE + $1d;
+ {$EXTERNALSYM ERROR_PCW_TARGET_IMAGE_COMPRESSED}
+ ERROR_PCW_TARGET_BAD_PROD_VALIDATE = ERROR_PCW_BASE + $1e;
+ {$EXTERNALSYM ERROR_PCW_TARGET_BAD_PROD_VALIDATE}
+ ERROR_PCW_TARGET_BAD_PROD_CODE_VAL = ERROR_PCW_BASE + $1f;
+ {$EXTERNALSYM ERROR_PCW_TARGET_BAD_PROD_CODE_VAL}
+
+ ERROR_PCW_UPGRADED_MISSING_SRC_FILES = ERROR_PCW_BASE + $20;
+ {$EXTERNALSYM ERROR_PCW_UPGRADED_MISSING_SRC_FILES}
+ ERROR_PCW_TARGET_MISSING_SRC_FILES = ERROR_PCW_BASE + $21;
+ {$EXTERNALSYM ERROR_PCW_TARGET_MISSING_SRC_FILES}
+ ERROR_PCW_IMAGE_FAMILY_NAME_TOO_LONG = ERROR_PCW_BASE + $22;
+ {$EXTERNALSYM ERROR_PCW_IMAGE_FAMILY_NAME_TOO_LONG}
+ ERROR_PCW_BAD_IMAGE_FAMILY_NAME = ERROR_PCW_BASE + $23;
+ {$EXTERNALSYM ERROR_PCW_BAD_IMAGE_FAMILY_NAME}
+ ERROR_PCW_DUP_IMAGE_FAMILY_NAME = ERROR_PCW_BASE + $24;
+ {$EXTERNALSYM ERROR_PCW_DUP_IMAGE_FAMILY_NAME}
+ ERROR_PCW_BAD_IMAGE_FAMILY_SRC_PROP = ERROR_PCW_BASE + $25;
+ {$EXTERNALSYM ERROR_PCW_BAD_IMAGE_FAMILY_SRC_PROP}
+ ERROR_PCW_UFILEDATA_LONG_FILE_TABLE_KEY = ERROR_PCW_BASE + $26;
+ {$EXTERNALSYM ERROR_PCW_UFILEDATA_LONG_FILE_TABLE_KEY}
+ ERROR_PCW_UFILEDATA_BLANK_FILE_TABLE_KEY = ERROR_PCW_BASE + $27;
+ {$EXTERNALSYM ERROR_PCW_UFILEDATA_BLANK_FILE_TABLE_KEY}
+ ERROR_PCW_UFILEDATA_MISSING_FILE_TABLE_KEY = ERROR_PCW_BASE + $28;
+ {$EXTERNALSYM ERROR_PCW_UFILEDATA_MISSING_FILE_TABLE_KEY}
+ ERROR_PCW_EXTFILE_LONG_FILE_TABLE_KEY = ERROR_PCW_BASE + $29;
+ {$EXTERNALSYM ERROR_PCW_EXTFILE_LONG_FILE_TABLE_KEY}
+ ERROR_PCW_EXTFILE_BLANK_FILE_TABLE_KEY = ERROR_PCW_BASE + $2a;
+ {$EXTERNALSYM ERROR_PCW_EXTFILE_BLANK_FILE_TABLE_KEY}
+ ERROR_PCW_EXTFILE_BAD_FAMILY_FIELD = ERROR_PCW_BASE + $2b;
+ {$EXTERNALSYM ERROR_PCW_EXTFILE_BAD_FAMILY_FIELD}
+ ERROR_PCW_EXTFILE_LONG_PATH_TO_FILE = ERROR_PCW_BASE + $2c;
+ {$EXTERNALSYM ERROR_PCW_EXTFILE_LONG_PATH_TO_FILE}
+ ERROR_PCW_EXTFILE_BLANK_PATH_TO_FILE = ERROR_PCW_BASE + $2d;
+ {$EXTERNALSYM ERROR_PCW_EXTFILE_BLANK_PATH_TO_FILE}
+ ERROR_PCW_EXTFILE_MISSING_FILE = ERROR_PCW_BASE + $2e;
+ {$EXTERNALSYM ERROR_PCW_EXTFILE_MISSING_FILE}
+//#define ERROR_PCW_FILERANGE_LONG_FILE_TABLE_KEY (ERROR_PCW_BASE + 0x2f) -- obsolete
+
+//#define ERROR_PCW_FILERANGE_BLANK_FILE_TABLE_KEY (ERROR_PCW_BASE + 0x30) -- obsolete
+//#define ERROR_PCW_FILERANGE_MISSING_FILE_TABLE_KEY (ERROR_PCW_BASE + 0x31) -- obsolete
+//#define ERROR_PCW_FILERANGE_LONG_PATH_TO_FILE (ERROR_PCW_BASE + 0x32) -- obsolete
+//#define ERROR_PCW_FILERANGE_MISSING_FILE (ERROR_PCW_BASE + 0x33) -- obsolete
+//#define ERROR_PCW_FILERANGE_INVALID_OFFSET (ERROR_PCW_BASE + 0x34) -- obsolete
+//#define ERROR_PCW_FILERANGE_INVALID_SIZE (ERROR_PCW_BASE + 0x35) -- obsolete
+//#define ERROR_PCW_FILERANGE_INVALID_RETAIN (ERROR_PCW_BASE + 0x36) -- obsolete
+//#define ERROR_PCW_BAD_MEDIA_SRC_PROP_NAME (ERROR_PCW_BASE + 0x37) -- obsolete
+//#define ERROR_PCW_BAD_MEDIA_DISK_ID (ERROR_PCW_BASE + 0x38) -- obsolete
+ ERROR_PCW_BAD_FILE_SEQUENCE_START = ERROR_PCW_BASE + $39;
+ {$EXTERNALSYM ERROR_PCW_BAD_FILE_SEQUENCE_START}
+ ERROR_PCW_CANT_COPY_FILE_TO_TEMP_FOLDER = ERROR_PCW_BASE + $3a;
+ {$EXTERNALSYM ERROR_PCW_CANT_COPY_FILE_TO_TEMP_FOLDER}
+ ERROR_PCW_CANT_CREATE_ONE_PATCH_FILE = ERROR_PCW_BASE + $3b;
+ {$EXTERNALSYM ERROR_PCW_CANT_CREATE_ONE_PATCH_FILE}
+ ERROR_PCW_BAD_IMAGE_FAMILY_DISKID = ERROR_PCW_BASE + $3c;
+ {$EXTERNALSYM ERROR_PCW_BAD_IMAGE_FAMILY_DISKID}
+ ERROR_PCW_BAD_IMAGE_FAMILY_FILESEQSTART = ERROR_PCW_BASE + $3d;
+ {$EXTERNALSYM ERROR_PCW_BAD_IMAGE_FAMILY_FILESEQSTART}
+ ERROR_PCW_BAD_UPGRADED_IMAGE_FAMILY = ERROR_PCW_BASE + $3e;
+ {$EXTERNALSYM ERROR_PCW_BAD_UPGRADED_IMAGE_FAMILY}
+ ERROR_PCW_BAD_TARGET_IMAGE_UPGRADED = ERROR_PCW_BASE + $3f;
+ {$EXTERNALSYM ERROR_PCW_BAD_TARGET_IMAGE_UPGRADED}
+
+ ERROR_PCW_DUP_TARGET_IMAGE_PACKCODE = ERROR_PCW_BASE + $40;
+ {$EXTERNALSYM ERROR_PCW_DUP_TARGET_IMAGE_PACKCODE}
+ ERROR_PCW_UFILEDATA_BAD_UPGRADED_FIELD = ERROR_PCW_BASE + $41;
+ {$EXTERNALSYM ERROR_PCW_UFILEDATA_BAD_UPGRADED_FIELD}
+ ERROR_PCW_MISMATCHED_PRODUCT_CODES = ERROR_PCW_BASE + $42;
+ {$EXTERNALSYM ERROR_PCW_MISMATCHED_PRODUCT_CODES}
+ ERROR_PCW_MISMATCHED_PRODUCT_VERSIONS = ERROR_PCW_BASE + $43;
+ {$EXTERNALSYM ERROR_PCW_MISMATCHED_PRODUCT_VERSIONS}
+ ERROR_PCW_CANNOT_WRITE_DDF = ERROR_PCW_BASE + $44;
+ {$EXTERNALSYM ERROR_PCW_CANNOT_WRITE_DDF}
+ ERROR_PCW_CANNOT_RUN_MAKECAB = ERROR_PCW_BASE + $45;
+ {$EXTERNALSYM ERROR_PCW_CANNOT_RUN_MAKECAB}
+//#define ERROR_PCW_CANNOT_CREATE_STORAGE (ERROR_PCW_BASE + 0x46) -- obsolete
+//#define ERROR_PCW_CANNOT_CREATE_STREAM (ERROR_PCW_BASE + 0x47) -- obsolete
+//#define ERROR_PCW_CANNOT_WRITE_STREAM (ERROR_PCW_BASE + 0x48) -- obsolete
+//#define ERROR_PCW_CANNOT_READ_CABINET (ERROR_PCW_BASE + 0x49) -- obsolete
+ ERROR_PCW_WRITE_SUMMARY_PROPERTIES = ERROR_PCW_BASE + $4a;
+ {$EXTERNALSYM ERROR_PCW_WRITE_SUMMARY_PROPERTIES}
+ ERROR_PCW_TFILEDATA_LONG_FILE_TABLE_KEY = ERROR_PCW_BASE + $4b;
+ {$EXTERNALSYM ERROR_PCW_TFILEDATA_LONG_FILE_TABLE_KEY}
+ ERROR_PCW_TFILEDATA_BLANK_FILE_TABLE_KEY = ERROR_PCW_BASE + $4c;
+ {$EXTERNALSYM ERROR_PCW_TFILEDATA_BLANK_FILE_TABLE_KEY}
+ ERROR_PCW_TFILEDATA_MISSING_FILE_TABLE_KEY = ERROR_PCW_BASE + $4d;
+ {$EXTERNALSYM ERROR_PCW_TFILEDATA_MISSING_FILE_TABLE_KEY}
+ ERROR_PCW_TFILEDATA_BAD_TARGET_FIELD = ERROR_PCW_BASE + $4e;
+ {$EXTERNALSYM ERROR_PCW_TFILEDATA_BAD_TARGET_FIELD}
+ ERROR_PCW_UPGRADED_IMAGE_PATCH_PATH_TOO_LONG = ERROR_PCW_BASE + $4f;
+ {$EXTERNALSYM ERROR_PCW_UPGRADED_IMAGE_PATCH_PATH_TOO_LONG}
+
+ ERROR_PCW_UPGRADED_IMAGE_PATCH_PATH_NOT_EXIST = ERROR_PCW_BASE + $50;
+ {$EXTERNALSYM ERROR_PCW_UPGRADED_IMAGE_PATCH_PATH_NOT_EXIST}
+ ERROR_PCW_UPGRADED_IMAGE_PATCH_PATH_NOT_MSI = ERROR_PCW_BASE + $51;
+ {$EXTERNALSYM ERROR_PCW_UPGRADED_IMAGE_PATCH_PATH_NOT_MSI}
+ ERROR_PCW_DUP_UPGRADED_IMAGE_PACKCODE = ERROR_PCW_BASE + $52;
+ {$EXTERNALSYM ERROR_PCW_DUP_UPGRADED_IMAGE_PACKCODE}
+ ERROR_PCW_UFILEIGNORE_BAD_UPGRADED_FIELD = ERROR_PCW_BASE + $53;
+ {$EXTERNALSYM ERROR_PCW_UFILEIGNORE_BAD_UPGRADED_FIELD}
+ ERROR_PCW_UFILEIGNORE_LONG_FILE_TABLE_KEY = ERROR_PCW_BASE + $54;
+ {$EXTERNALSYM ERROR_PCW_UFILEIGNORE_LONG_FILE_TABLE_KEY}
+ ERROR_PCW_UFILEIGNORE_BLANK_FILE_TABLE_KEY = ERROR_PCW_BASE + $55;
+ {$EXTERNALSYM ERROR_PCW_UFILEIGNORE_BLANK_FILE_TABLE_KEY}
+ ERROR_PCW_UFILEIGNORE_BAD_FILE_TABLE_KEY = ERROR_PCW_BASE + $56;
+ {$EXTERNALSYM ERROR_PCW_UFILEIGNORE_BAD_FILE_TABLE_KEY}
+ ERROR_PCW_FAMILY_RANGE_NAME_TOO_LONG = ERROR_PCW_BASE + $57;
+ {$EXTERNALSYM ERROR_PCW_FAMILY_RANGE_NAME_TOO_LONG}
+ ERROR_PCW_BAD_FAMILY_RANGE_NAME = ERROR_PCW_BASE + $58;
+ {$EXTERNALSYM ERROR_PCW_BAD_FAMILY_RANGE_NAME}
+ ERROR_PCW_FAMILY_RANGE_LONG_FILE_TABLE_KEY = ERROR_PCW_BASE + $59;
+ {$EXTERNALSYM ERROR_PCW_FAMILY_RANGE_LONG_FILE_TABLE_KEY}
+ ERROR_PCW_FAMILY_RANGE_BLANK_FILE_TABLE_KEY = ERROR_PCW_BASE + $5a;
+ {$EXTERNALSYM ERROR_PCW_FAMILY_RANGE_BLANK_FILE_TABLE_KEY}
+ ERROR_PCW_FAMILY_RANGE_LONG_RETAIN_OFFSETS = ERROR_PCW_BASE + $5b;
+ {$EXTERNALSYM ERROR_PCW_FAMILY_RANGE_LONG_RETAIN_OFFSETS}
+ ERROR_PCW_FAMILY_RANGE_BLANK_RETAIN_OFFSETS = ERROR_PCW_BASE + $5c;
+ {$EXTERNALSYM ERROR_PCW_FAMILY_RANGE_BLANK_RETAIN_OFFSETS}
+ ERROR_PCW_FAMILY_RANGE_BAD_RETAIN_OFFSETS = ERROR_PCW_BASE + $5d;
+ {$EXTERNALSYM ERROR_PCW_FAMILY_RANGE_BAD_RETAIN_OFFSETS}
+ ERROR_PCW_FAMILY_RANGE_LONG_RETAIN_LENGTHS = ERROR_PCW_BASE + $5e;
+ {$EXTERNALSYM ERROR_PCW_FAMILY_RANGE_LONG_RETAIN_LENGTHS}
+ ERROR_PCW_FAMILY_RANGE_BLANK_RETAIN_LENGTHS = ERROR_PCW_BASE + $5f;
+ {$EXTERNALSYM ERROR_PCW_FAMILY_RANGE_BLANK_RETAIN_LENGTHS}
+
+ ERROR_PCW_FAMILY_RANGE_BAD_RETAIN_LENGTHS = ERROR_PCW_BASE + $60;
+ {$EXTERNALSYM ERROR_PCW_FAMILY_RANGE_BAD_RETAIN_LENGTHS}
+ ERROR_PCW_FAMILY_RANGE_COUNT_MISMATCH = ERROR_PCW_BASE + $61;
+ {$EXTERNALSYM ERROR_PCW_FAMILY_RANGE_COUNT_MISMATCH}
+ ERROR_PCW_EXTFILE_LONG_IGNORE_OFFSETS = ERROR_PCW_BASE + $62;
+ {$EXTERNALSYM ERROR_PCW_EXTFILE_LONG_IGNORE_OFFSETS}
+ ERROR_PCW_EXTFILE_BAD_IGNORE_OFFSETS = ERROR_PCW_BASE + $63;
+ {$EXTERNALSYM ERROR_PCW_EXTFILE_BAD_IGNORE_OFFSETS}
+ ERROR_PCW_EXTFILE_LONG_IGNORE_LENGTHS = ERROR_PCW_BASE + $64;
+ {$EXTERNALSYM ERROR_PCW_EXTFILE_LONG_IGNORE_LENGTHS}
+ ERROR_PCW_EXTFILE_BAD_IGNORE_LENGTHS = ERROR_PCW_BASE + $65;
+ {$EXTERNALSYM ERROR_PCW_EXTFILE_BAD_IGNORE_LENGTHS}
+ ERROR_PCW_EXTFILE_IGNORE_COUNT_MISMATCH = ERROR_PCW_BASE + $66;
+ {$EXTERNALSYM ERROR_PCW_EXTFILE_IGNORE_COUNT_MISMATCH}
+ ERROR_PCW_EXTFILE_LONG_RETAIN_OFFSETS = ERROR_PCW_BASE + $67;
+ {$EXTERNALSYM ERROR_PCW_EXTFILE_LONG_RETAIN_OFFSETS}
+ ERROR_PCW_EXTFILE_BAD_RETAIN_OFFSETS = ERROR_PCW_BASE + $68;
+ {$EXTERNALSYM ERROR_PCW_EXTFILE_BAD_RETAIN_OFFSETS}
+//#define ERROR_PCW_EXTFILE_RETAIN_COUNT_MISMATCH (ERROR_PCW_BASE + 0x69) -- obsolete
+ ERROR_PCW_TFILEDATA_LONG_IGNORE_OFFSETS = ERROR_PCW_BASE + $6a;
+ {$EXTERNALSYM ERROR_PCW_TFILEDATA_LONG_IGNORE_OFFSETS}
+ ERROR_PCW_TFILEDATA_BAD_IGNORE_OFFSETS = ERROR_PCW_BASE + $6b;
+ {$EXTERNALSYM ERROR_PCW_TFILEDATA_BAD_IGNORE_OFFSETS}
+ ERROR_PCW_TFILEDATA_LONG_IGNORE_LENGTHS = ERROR_PCW_BASE + $6c;
+ {$EXTERNALSYM ERROR_PCW_TFILEDATA_LONG_IGNORE_LENGTHS}
+ ERROR_PCW_TFILEDATA_BAD_IGNORE_LENGTHS = ERROR_PCW_BASE + $6d;
+ {$EXTERNALSYM ERROR_PCW_TFILEDATA_BAD_IGNORE_LENGTHS}
+ ERROR_PCW_TFILEDATA_IGNORE_COUNT_MISMATCH = ERROR_PCW_BASE + $6e;
+ {$EXTERNALSYM ERROR_PCW_TFILEDATA_IGNORE_COUNT_MISMATCH}
+ ERROR_PCW_TFILEDATA_LONG_RETAIN_OFFSETS = ERROR_PCW_BASE + $6f;
+ {$EXTERNALSYM ERROR_PCW_TFILEDATA_LONG_RETAIN_OFFSETS}
+
+ ERROR_PCW_TFILEDATA_BAD_RETAIN_OFFSETS = ERROR_PCW_BASE + $70;
+ {$EXTERNALSYM ERROR_PCW_TFILEDATA_BAD_RETAIN_OFFSETS}
+//#define ERROR_PCW_TFILEDATA_RETAIN_COUNT_MISMATCH (ERROR_PCW_BASE + 0x71) -- obsolete
+ ERROR_PCW_CANT_GENERATE_TRANSFORM = ERROR_PCW_BASE + $72;
+ {$EXTERNALSYM ERROR_PCW_CANT_GENERATE_TRANSFORM}
+ ERROR_PCW_CANT_CREATE_SUMMARY_INFO = ERROR_PCW_BASE + $73;
+ {$EXTERNALSYM ERROR_PCW_CANT_CREATE_SUMMARY_INFO}
+ ERROR_PCW_CANT_GENERATE_TRANSFORM_POUND = ERROR_PCW_BASE + $74;
+ {$EXTERNALSYM ERROR_PCW_CANT_GENERATE_TRANSFORM_POUND}
+ ERROR_PCW_CANT_CREATE_SUMMARY_INFO_POUND = ERROR_PCW_BASE + $75;
+ {$EXTERNALSYM ERROR_PCW_CANT_CREATE_SUMMARY_INFO_POUND}
+ ERROR_PCW_BAD_UPGRADED_IMAGE_PRODUCT_CODE = ERROR_PCW_BASE + $76;
+ {$EXTERNALSYM ERROR_PCW_BAD_UPGRADED_IMAGE_PRODUCT_CODE}
+ ERROR_PCW_BAD_UPGRADED_IMAGE_PRODUCT_VERSION = ERROR_PCW_BASE + $77;
+ {$EXTERNALSYM ERROR_PCW_BAD_UPGRADED_IMAGE_PRODUCT_VERSION}
+ ERROR_PCW_BAD_UPGRADED_IMAGE_UPGRADE_CODE = ERROR_PCW_BASE + $78;
+ {$EXTERNALSYM ERROR_PCW_BAD_UPGRADED_IMAGE_UPGRADE_CODE}
+ ERROR_PCW_BAD_TARGET_IMAGE_PRODUCT_CODE = ERROR_PCW_BASE + $79;
+ {$EXTERNALSYM ERROR_PCW_BAD_TARGET_IMAGE_PRODUCT_CODE}
+ ERROR_PCW_BAD_TARGET_IMAGE_PRODUCT_VERSION = ERROR_PCW_BASE + $7a;
+ {$EXTERNALSYM ERROR_PCW_BAD_TARGET_IMAGE_PRODUCT_VERSION}
+ ERROR_PCW_BAD_TARGET_IMAGE_UPGRADE_CODE = ERROR_PCW_BASE + $7b;
+ {$EXTERNALSYM ERROR_PCW_BAD_TARGET_IMAGE_UPGRADE_CODE}
+ ERROR_PCW_MATCHED_PRODUCT_VERSIONS = ERROR_PCW_BASE + $7c;
+ {$EXTERNALSYM ERROR_PCW_MATCHED_PRODUCT_VERSIONS}
+ ERROR_PCW_NEXTxd = ERROR_PCW_BASE + $7d;
+ {$EXTERNALSYM ERROR_PCW_NEXTxd}
+ ERROR_PCW_NEXTxe = ERROR_PCW_BASE + $7e;
+ {$EXTERNALSYM ERROR_PCW_NEXTxe}
+ ERROR_PCW_NEXTxf = ERROR_PCW_BASE + $7f;
+ {$EXTERNALSYM ERROR_PCW_NEXTxf}
+
+(*
+#define ERROR_PCW_NEXTx0 (ERROR_PCW_BASE + 0x80)
+#define ERROR_PCW_NEXTx1 (ERROR_PCW_BASE + 0x81)
+#define ERROR_PCW_NEXTx2 (ERROR_PCW_BASE + 0x82)
+#define ERROR_PCW_NEXTx3 (ERROR_PCW_BASE + 0x83)
+#define ERROR_PCW_NEXTx4 (ERROR_PCW_BASE + 0x84)
+#define ERROR_PCW_NEXTx5 (ERROR_PCW_BASE + 0x85)
+#define ERROR_PCW_NEXTx6 (ERROR_PCW_BASE + 0x86)
+#define ERROR_PCW_NEXTx7 (ERROR_PCW_BASE + 0x87)
+#define ERROR_PCW_NEXTx8 (ERROR_PCW_BASE + 0x88)
+#define ERROR_PCW_NEXTx9 (ERROR_PCW_BASE + 0x89)
+#define ERROR_PCW_NEXTxa (ERROR_PCW_BASE + 0x8a)
+#define ERROR_PCW_NEXTxb (ERROR_PCW_BASE + 0x8b)
+#define ERROR_PCW_NEXTxc (ERROR_PCW_BASE + 0x8c)
+#define ERROR_PCW_NEXTxd (ERROR_PCW_BASE + 0x8d)
+#define ERROR_PCW_NEXTxe (ERROR_PCW_BASE + 0x8e)
+#define ERROR_PCW_NEXTxf (ERROR_PCW_BASE + 0x8f)
+*)
+
+// Control IDs for hwndStatus child Text controls; title is required
+
+ IDC_STATUS_TITLE = $1cf0;
+ {$EXTERNALSYM IDC_STATUS_TITLE}
+ IDC_STATUS_DATA1 = $1cf1;
+ {$EXTERNALSYM IDC_STATUS_DATA1}
+ IDC_STATUS_DATA2 = $1cf2;
+ {$EXTERNALSYM IDC_STATUS_DATA2}
+
+function UiCreatePatchPackageA(szaPcpPath, szaPatchPath, szaLogPath: LPSTR; hwndStatus: HWND; szaTempFolder: LPSTR; fRemoveTempFolderIfPresent: BOOL): UINT; stdcall;
+{$EXTERNALSYM UiCreatePatchPackageA}
+function UiCreatePatchPackageW(szwPcpPath, szwPatchPath, szwLogPath: LPWSTR; hwndStatus: HWND; szwTempFolder: LPWSTR; fRemoveTempFolderIfPresent: BOOL): UINT; stdcall;
+{$EXTERNALSYM UiCreatePatchPackageW}
+function UiCreatePatchPackage(szwPcpPath, szwPatchPath, szwLogPath: LPTSTR; hwndStatus: HWND; szwTempFolder: LPTSTR; fRemoveTempFolderIfPresent: BOOL): UINT; stdcall;
+{$EXTERNALSYM UiCreatePatchPackage}
+
+implementation
+
+const
+ patchwiz = 'patchwiz.dll'; // mvb Installed in Samples\SysMgmt\Msi\Patching
+ {$IFDEF UNICODE}
+ AWSuffix = 'W';
+ {$ELSE}
+ AWSuffix = 'A';
+ {$ENDIF UNICODE}
+
+{$IFDEF DYNAMIC_LINK}
+
+var
+ _UiCreatePatchPackageA: Pointer;
+
+function UiCreatePatchPackageA;
+begin
+ GetProcedureAddress(_UiCreatePatchPackageA, patchwiz, 'UiCreatePatchPackageA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_UiCreatePatchPackageA]
+ end;
+end;
+
+var
+ _UiCreatePatchPackageW: Pointer;
+
+function UiCreatePatchPackageW;
+begin
+ GetProcedureAddress(_UiCreatePatchPackageW, patchwiz, 'UiCreatePatchPackageW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_UiCreatePatchPackageW]
+ end;
+end;
+
+var
+ _UiCreatePatchPackage: Pointer;
+
+function UiCreatePatchPackage;
+begin
+ GetProcedureAddress(_UiCreatePatchPackage, patchwiz, 'UiCreatePatchPackage' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_UiCreatePatchPackage]
+ end;
+end;
+
+{$ELSE}
+
+function UiCreatePatchPackageA; external patchwiz name 'UiCreatePatchPackageA';
+function UiCreatePatchPackageW; external patchwiz name 'UiCreatePatchPackageW';
+function UiCreatePatchPackage; external patchwiz name 'UiCreatePatchPackage' + AWSuffix;
+
+{$ENDIF DYNAMIC_LINK}
+
+end.
diff --git a/packages/extra/winunits/jwapbt.pas b/packages/extra/winunits/jwapbt.pas
index 449541ca58..e345862498 100644
--- a/packages/extra/winunits/jwapbt.pas
+++ b/packages/extra/winunits/jwapbt.pas
@@ -1,98 +1,98 @@
-{******************************************************************************}
-{ }
-{ Power Event Message Definitions API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: pbt.h, released June 2000. The original Pascal }
-{ code is: Pbt.pas, released December 2000. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwapbt.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaPbt;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "pbt.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-const
- WM_POWERBROADCAST = $0218;
- {$EXTERNALSYM WM_POWERBROADCAST}
-
- PBT_APMQUERYSUSPEND = $0000;
- {$EXTERNALSYM PBT_APMQUERYSUSPEND}
- PBT_APMQUERYSTANDBY = $0001;
- {$EXTERNALSYM PBT_APMQUERYSTANDBY}
-
- PBT_APMQUERYSUSPENDFAILED = $0002;
- {$EXTERNALSYM PBT_APMQUERYSUSPENDFAILED}
- PBT_APMQUERYSTANDBYFAILED = $0003;
- {$EXTERNALSYM PBT_APMQUERYSTANDBYFAILED}
-
- PBT_APMSUSPEND = $0004;
- {$EXTERNALSYM PBT_APMSUSPEND}
- PBT_APMSTANDBY = $0005;
- {$EXTERNALSYM PBT_APMSTANDBY}
-
- PBT_APMRESUMECRITICAL = $0006;
- {$EXTERNALSYM PBT_APMRESUMECRITICAL}
- PBT_APMRESUMESUSPEND = $0007;
- {$EXTERNALSYM PBT_APMRESUMESUSPEND}
- PBT_APMRESUMESTANDBY = $0008;
- {$EXTERNALSYM PBT_APMRESUMESTANDBY}
-
- PBTF_APMRESUMEFROMFAILURE = $00000001;
- {$EXTERNALSYM PBTF_APMRESUMEFROMFAILURE}
-
- PBT_APMBATTERYLOW = $0009;
- {$EXTERNALSYM PBT_APMBATTERYLOW}
- PBT_APMPOWERSTATUSCHANGE = $000A;
- {$EXTERNALSYM PBT_APMPOWERSTATUSCHANGE}
-
- PBT_APMOEMEVENT = $000B;
- {$EXTERNALSYM PBT_APMOEMEVENT}
- PBT_APMRESUMEAUTOMATIC = $0012;
- {$EXTERNALSYM PBT_APMRESUMEAUTOMATIC}
-
-implementation
-
-end.
+{******************************************************************************}
+{ }
+{ Power Event Message Definitions API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: pbt.h, released June 2000. The original Pascal }
+{ code is: Pbt.pas, released December 2000. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwapbt.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaPbt;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "pbt.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+const
+ WM_POWERBROADCAST = $0218;
+ {$EXTERNALSYM WM_POWERBROADCAST}
+
+ PBT_APMQUERYSUSPEND = $0000;
+ {$EXTERNALSYM PBT_APMQUERYSUSPEND}
+ PBT_APMQUERYSTANDBY = $0001;
+ {$EXTERNALSYM PBT_APMQUERYSTANDBY}
+
+ PBT_APMQUERYSUSPENDFAILED = $0002;
+ {$EXTERNALSYM PBT_APMQUERYSUSPENDFAILED}
+ PBT_APMQUERYSTANDBYFAILED = $0003;
+ {$EXTERNALSYM PBT_APMQUERYSTANDBYFAILED}
+
+ PBT_APMSUSPEND = $0004;
+ {$EXTERNALSYM PBT_APMSUSPEND}
+ PBT_APMSTANDBY = $0005;
+ {$EXTERNALSYM PBT_APMSTANDBY}
+
+ PBT_APMRESUMECRITICAL = $0006;
+ {$EXTERNALSYM PBT_APMRESUMECRITICAL}
+ PBT_APMRESUMESUSPEND = $0007;
+ {$EXTERNALSYM PBT_APMRESUMESUSPEND}
+ PBT_APMRESUMESTANDBY = $0008;
+ {$EXTERNALSYM PBT_APMRESUMESTANDBY}
+
+ PBTF_APMRESUMEFROMFAILURE = $00000001;
+ {$EXTERNALSYM PBTF_APMRESUMEFROMFAILURE}
+
+ PBT_APMBATTERYLOW = $0009;
+ {$EXTERNALSYM PBT_APMBATTERYLOW}
+ PBT_APMPOWERSTATUSCHANGE = $000A;
+ {$EXTERNALSYM PBT_APMPOWERSTATUSCHANGE}
+
+ PBT_APMOEMEVENT = $000B;
+ {$EXTERNALSYM PBT_APMOEMEVENT}
+ PBT_APMRESUMEAUTOMATIC = $0012;
+ {$EXTERNALSYM PBT_APMRESUMEAUTOMATIC}
+
+implementation
+
+end.
diff --git a/packages/extra/winunits/jwapdh.pas b/packages/extra/winunits/jwapdh.pas
index 6abb557d9b..338d00297b 100644
--- a/packages/extra/winunits/jwapdh.pas
+++ b/packages/extra/winunits/jwapdh.pas
@@ -1,3100 +1,3100 @@
-{******************************************************************************}
-{ }
-{ Performance Data Helper API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: pdh.h, released June 2000. The original Pascal }
-{ code is: Pdh.pas, released December 2000. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwapdh.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaPdh;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "pdh.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaWinBase, JwaWinType, JwaWinPerf;
-
-type
- PDH_STATUS = DWORD;
- {$EXTERNALSYM PDH_STATUS}
-
-const
-
-// version info
-
- PDH_CVERSION_WIN40 = DWORD($0400);
- {$EXTERNALSYM PDH_CVERSION_WIN40}
- PDH_CVERSION_WIN50 = DWORD($0500);
- {$EXTERNALSYM PDH_CVERSION_WIN50}
-
-// v1.1 revision of PDH -- basic log functions
-// v1.2 of the PDH -- adds variable instance counters
-// v1.3 of the PDH -- adds log service control & stubs for NT5/PDH v2 fn's
-// v2.0 of the PDH -- is the NT v 5.0 B2 version
-
- PDH_VERSION = DWORD((PDH_CVERSION_WIN50) + $0003);
- {$EXTERNALSYM PDH_VERSION}
-
-// define severity masks
-
-function IsSuccessSeverity(ErrorCode: Longint): Boolean;
-{$EXTERNALSYM IsSuccessSeverity}
-function IsInformationalSeverity(ErrorCode: Longint): Boolean;
-{$EXTERNALSYM IsInformationalSeverity}
-function IsWarningSeverity(ErrorCode: Longint): Boolean;
-{$EXTERNALSYM IsWarningSeverity}
-function IsErrorSeverity(ErrorCode: Longint): Boolean;
-{$EXTERNALSYM IsErrorSeverity}
-
-const
- MAX_COUNTER_PATH = 256; // Maximum counter path length
- {$EXTERNALSYM MAX_COUNTER_PATH}
-
- PDH_MAX_COUNTER_NAME = 1024; // Maximum counter name length.
- {$EXTERNALSYM PDH_MAX_COUNTER_NAME}
- PDH_MAX_INSTANCE_NAME = 1024; // Maximum counter instance name length.
- {$EXTERNALSYM PDH_MAX_INSTANCE_NAME}
- PDH_MAX_COUNTER_PATH = 2048; // Maximum full counter path length.
- {$EXTERNALSYM PDH_MAX_COUNTER_PATH}
- PDH_MAX_DATASOURCE_PATH = 1024; // MAximum full counter log name length.
- {$EXTERNALSYM PDH_MAX_DATASOURCE_PATH}
-
-// data type definitions
-
-type
- PDH_HCOUNTER = HANDLE;
- {$EXTERNALSYM PDH_HCOUNTER}
- PDH_HQUERY = HANDLE;
- {$EXTERNALSYM PDH_HQUERY}
- PDH_HLOG = HANDLE;
- {$EXTERNALSYM PDH_HLOG}
-
- HCOUNTER = PDH_HCOUNTER;
- {$EXTERNALSYM HCOUNTER}
- HQUERY = PDH_HQUERY;
- {$EXTERNALSYM HQUERY}
- HLOG = PDH_HLOG;
- {$EXTERNALSYM HLOG}
-
-const
- INVALID_HANDLE_VALUE = HANDLE(LONG_PTR(-1));
- {$EXTERNALSYM INVALID_HANDLE_VALUE}
-
- H_REALTIME_DATASOURCE = NULL;
- {$EXTERNALSYM H_REALTIME_DATASOURCE}
- H_WBEM_DATASOURCE = INVALID_HANDLE_VALUE;
- {$EXTERNALSYM H_WBEM_DATASOURCE}
-
-type
- PPDH_RAW_COUNTER = ^PDH_RAW_COUNTER;
- {$EXTERNALSYM PPDH_RAW_COUNTER}
- _PDH_RAW_COUNTER = record
- CStatus: DWORD;
- TimeStamp: FILETIME;
- FirstValue: LONGLONG;
- SecondValue: LONGLONG;
- MultiCount: DWORD;
- end;
- {$EXTERNALSYM _PDH_RAW_COUNTER}
- PDH_RAW_COUNTER = _PDH_RAW_COUNTER;
- {$EXTERNALSYM PDH_RAW_COUNTER}
- TPdhRawCounter = PDH_RAW_COUNTER;
- PPdhRawCounter = PPDH_RAW_COUNTER;
-
- PPDH_RAW_COUNTER_ITEM_A = ^PDH_RAW_COUNTER_ITEM_A;
- {$EXTERNALSYM PPDH_RAW_COUNTER_ITEM_A}
- _PDH_RAW_COUNTER_ITEM_A = record
- szName: LPSTR;
- RawValue: PDH_RAW_COUNTER;
- end;
- {$EXTERNALSYM _PDH_RAW_COUNTER_ITEM_A}
- PDH_RAW_COUNTER_ITEM_A = _PDH_RAW_COUNTER_ITEM_A;
- {$EXTERNALSYM PDH_RAW_COUNTER_ITEM_A}
- TPdhRawCounterItemA = PDH_RAW_COUNTER_ITEM_A;
- PPdhRawCounterItemA = PPDH_RAW_COUNTER_ITEM_A;
-
- PPDH_RAW_COUNTER_ITEM_W = ^PDH_RAW_COUNTER_ITEM_W;
- {$EXTERNALSYM PPDH_RAW_COUNTER_ITEM_W}
- _PDH_RAW_COUNTER_ITEM_W = record
- szName: LPWSTR;
- RawValue: PDH_RAW_COUNTER;
- end;
- {$EXTERNALSYM _PDH_RAW_COUNTER_ITEM_W}
- PDH_RAW_COUNTER_ITEM_W = _PDH_RAW_COUNTER_ITEM_W;
- {$EXTERNALSYM PDH_RAW_COUNTER_ITEM_W}
- TPdhRawCounterItemW = PDH_RAW_COUNTER_ITEM_W;
- PPdhRawCounterItemW = PPDH_RAW_COUNTER_ITEM_W;
-
- {$IFDEF UNICODE}
- PPdhRawCounterItem = PPdhRawCounterItemW;
- PDH_RAW_COUNTER_ITEM = _PDH_RAW_COUNTER_ITEM_W;
- {$EXTERNALSYM PDH_RAW_COUNTER_ITEM}
- PPDH_RAW_COUNTER_ITEM = PPDH_RAW_COUNTER_ITEM_W;
- {$EXTERNALSYM PPDH_RAW_COUNTER_ITEM}
- TPdhRawCounterItem = _PDH_RAW_COUNTER_ITEM_W;
- {$ELSE}
- PPdhRawCounterItem = PPdhRawCounterItemA;
- PDH_RAW_COUNTER_ITEM = _PDH_RAW_COUNTER_ITEM_A;
- {$EXTERNALSYM PDH_RAW_COUNTER_ITEM}
- PPDH_RAW_COUNTER_ITEM = PPDH_RAW_COUNTER_ITEM_A;
- {$EXTERNALSYM PPDH_RAW_COUNTER_ITEM}
- TPdhRawCounterItem = _PDH_RAW_COUNTER_ITEM_A;
- {$ENDIF UNICODE}
-
- PPDH_FMT_COUNTERVALUE = ^PDH_FMT_COUNTERVALUE;
- {$EXTERNALSYM PPDH_FMT_COUNTERVALUE}
- _PDH_FMT_COUNTERVALUE = record
- CStatus: DWORD;
- case Longint of
- 1: (longValue: LONG);
- 2: (doubleValue: Double);
- 3: (largeValue: LONGLONG);
- 4: (AnsiStringValue: LPSTR);
- 5: (WideStringValue: LPCWSTR);
- end;
- {$EXTERNALSYM _PDH_FMT_COUNTERVALUE}
- PDH_FMT_COUNTERVALUE = _PDH_FMT_COUNTERVALUE;
- {$EXTERNALSYM PDH_FMT_COUNTERVALUE}
- TPdhFmtCounterValue = PDH_FMT_COUNTERVALUE;
- PPdhFmtCounterValue = PPDH_FMT_COUNTERVALUE;
-
- PPDH_FMT_COUNTERVALUE_ITEM_A = ^PDH_FMT_COUNTERVALUE_ITEM_A;
- {$EXTERNALSYM PPDH_FMT_COUNTERVALUE_ITEM_A}
- _PDH_FMT_COUNTERVALUE_ITEM_A = record
- szName: LPSTR;
- FmtValue: PDH_FMT_COUNTERVALUE;
- end;
- {$EXTERNALSYM _PDH_FMT_COUNTERVALUE_ITEM_A}
- PDH_FMT_COUNTERVALUE_ITEM_A = _PDH_FMT_COUNTERVALUE_ITEM_A;
- {$EXTERNALSYM PDH_FMT_COUNTERVALUE_ITEM_A}
- TPdhFmtCounterValueItemA = PDH_FMT_COUNTERVALUE_ITEM_A;
- PPdhFmtCounterValueItemA = PPDH_FMT_COUNTERVALUE_ITEM_A;
-
- PPDH_FMT_COUNTERVALUE_ITEM_W = ^PDH_FMT_COUNTERVALUE_ITEM_W;
- {$EXTERNALSYM PPDH_FMT_COUNTERVALUE_ITEM_W}
- _PDH_FMT_COUNTERVALUE_ITEM_W = record
- szName: LPWSTR;
- FmtValue: PDH_FMT_COUNTERVALUE;
- end;
- {$EXTERNALSYM _PDH_FMT_COUNTERVALUE_ITEM_W}
- PDH_FMT_COUNTERVALUE_ITEM_W = _PDH_FMT_COUNTERVALUE_ITEM_W;
- {$EXTERNALSYM PDH_FMT_COUNTERVALUE_ITEM_W}
- TPdhFmtCounterValueItemW = PDH_FMT_COUNTERVALUE_ITEM_W;
- PPdhFmtCounterValueItemW = PPDH_FMT_COUNTERVALUE_ITEM_W;
-
- {$IFDEF UNICODE}
- PPdhFmtCounterValueItem = PPdhFmtCounterValueItemW;
- PDH_FMT_COUNTERVALUE_ITEM = _PDH_FMT_COUNTERVALUE_ITEM_W;
- {$EXTERNALSYM PDH_FMT_COUNTERVALUE_ITEM}
- PPDH_FMT_COUNTERVALUE_ITEM = PPDH_FMT_COUNTERVALUE_ITEM_W;
- {$EXTERNALSYM PPDH_FMT_COUNTERVALUE_ITEM}
- TPdhFmtCounterValueItem = _PDH_FMT_COUNTERVALUE_ITEM_W;
- {$ELSE}
- PPdhFmtCounterValueItem = PPdhFmtCounterValueItemA;
- PDH_FMT_COUNTERVALUE_ITEM = _PDH_FMT_COUNTERVALUE_ITEM_A;
- {$EXTERNALSYM PDH_FMT_COUNTERVALUE_ITEM}
- PPDH_FMT_COUNTERVALUE_ITEM = PPDH_FMT_COUNTERVALUE_ITEM_A;
- {$EXTERNALSYM PPDH_FMT_COUNTERVALUE_ITEM}
- TPdhFmtCounterValueItem = _PDH_FMT_COUNTERVALUE_ITEM_A;
- {$ENDIF UNICODE}
-
- PPDH_STATISTICS = ^PDH_STATISTICS;
- {$EXTERNALSYM PPDH_STATISTICS}
- _PDH_STATISTICS = record
- dwFormat: DWORD;
- Count: DWORD;
- min: PDH_FMT_COUNTERVALUE;
- max: PDH_FMT_COUNTERVALUE;
- mean: PDH_FMT_COUNTERVALUE;
- end;
- {$EXTERNALSYM _PDH_STATISTICS}
- PDH_STATISTICS = _PDH_STATISTICS;
- {$EXTERNALSYM PDH_STATISTICS}
- TPdhStatistics = PDH_STATISTICS;
- PPdhStatistics = PPDH_STATISTICS;
-
- PPDH_COUNTER_PATH_ELEMENTS_A = ^PDH_COUNTER_PATH_ELEMENTS_A;
- {$EXTERNALSYM PPDH_COUNTER_PATH_ELEMENTS_A}
- _PDH_COUNTER_PATH_ELEMENTS_A = record
- szMachineName: LPSTR;
- szObjectName: LPSTR;
- szInstanceName: LPSTR;
- szParentInstance: LPSTR;
- dwInstanceIndex: DWORD;
- szCounterName: LPSTR;
- end;
- {$EXTERNALSYM _PDH_COUNTER_PATH_ELEMENTS_A}
- PDH_COUNTER_PATH_ELEMENTS_A = _PDH_COUNTER_PATH_ELEMENTS_A;
- {$EXTERNALSYM PDH_COUNTER_PATH_ELEMENTS_A}
- TPdhCounterPathElementsA = PDH_COUNTER_PATH_ELEMENTS_A;
- PPdhCounterPathElementsA = PPDH_COUNTER_PATH_ELEMENTS_A;
-
- PPDH_COUNTER_PATH_ELEMENTS_W = ^PDH_COUNTER_PATH_ELEMENTS_W;
- {$EXTERNALSYM PPDH_COUNTER_PATH_ELEMENTS_W}
- _PDH_COUNTER_PATH_ELEMENTS_W = record
- szMachineName: LPWSTR;
- szObjectName: LPWSTR;
- szInstanceName: LPWSTR;
- szParentInstance: LPWSTR;
- dwInstanceIndex: DWORD;
- szCounterName: LPWSTR;
- end;
- {$EXTERNALSYM _PDH_COUNTER_PATH_ELEMENTS_W}
- PDH_COUNTER_PATH_ELEMENTS_W = _PDH_COUNTER_PATH_ELEMENTS_W;
- {$EXTERNALSYM PDH_COUNTER_PATH_ELEMENTS_W}
- TPdhCounterPathElementsW = PDH_COUNTER_PATH_ELEMENTS_W;
- PPdhCounterPathElementsW = PPDH_COUNTER_PATH_ELEMENTS_W;
-
- {$IFDEF UNICODE}
- PPdhCounterPathElements = PPdhCounterPathElementsW;
- PDH_COUNTER_PATH_ELEMENTS = _PDH_COUNTER_PATH_ELEMENTS_W;
- {$EXTERNALSYM PDH_COUNTER_PATH_ELEMENTS}
- PPDH_COUNTER_PATH_ELEMENTS = PPDH_COUNTER_PATH_ELEMENTS_W;
- {$EXTERNALSYM PPDH_COUNTER_PATH_ELEMENTS}
- TPdhCounterPathElements = _PDH_COUNTER_PATH_ELEMENTS_W;
- {$ELSE}
- PPdhCounterPathElements = PPdhCounterPathElementsA;
- PDH_COUNTER_PATH_ELEMENTS = _PDH_COUNTER_PATH_ELEMENTS_A;
- {$EXTERNALSYM PDH_COUNTER_PATH_ELEMENTS}
- PPDH_COUNTER_PATH_ELEMENTS = PPDH_COUNTER_PATH_ELEMENTS_A;
- {$EXTERNALSYM PPDH_COUNTER_PATH_ELEMENTS}
- TPdhCounterPathElements = _PDH_COUNTER_PATH_ELEMENTS_A;
- {$ENDIF UNICODE}
-
- PPDH_DATA_ITEM_PATH_ELEMENTS_A = ^PDH_DATA_ITEM_PATH_ELEMENTS_A;
- {$EXTERNALSYM PPDH_DATA_ITEM_PATH_ELEMENTS_A}
- _PDH_DATA_ITEM_PATH_ELEMENTS_A = record
- szMachineName: LPSTR;
- ObjectGUID: GUID;
- dwItemId: DWORD;
- szInstanceName: LPSTR;
- end;
- {$EXTERNALSYM _PDH_DATA_ITEM_PATH_ELEMENTS_A}
- PDH_DATA_ITEM_PATH_ELEMENTS_A = _PDH_DATA_ITEM_PATH_ELEMENTS_A;
- {$EXTERNALSYM PDH_DATA_ITEM_PATH_ELEMENTS_A}
- TPdhDataItemPathElementsA = PDH_DATA_ITEM_PATH_ELEMENTS_A;
- PPdhDataItemPathElementsA = PPDH_DATA_ITEM_PATH_ELEMENTS_A;
-
- PPDH_DATA_ITEM_PATH_ELEMENTS_W = ^PDH_DATA_ITEM_PATH_ELEMENTS_W;
- {$EXTERNALSYM PPDH_DATA_ITEM_PATH_ELEMENTS_W}
- _PDH_DATA_ITEM_PATH_ELEMENTS_W = record
- szMachineName: LPWSTR;
- ObjectGUID: GUID;
- dwItemId: DWORD;
- szInstanceName: LPWSTR;
- end;
- {$EXTERNALSYM _PDH_DATA_ITEM_PATH_ELEMENTS_W}
- PDH_DATA_ITEM_PATH_ELEMENTS_W = _PDH_DATA_ITEM_PATH_ELEMENTS_W;
- {$EXTERNALSYM PDH_DATA_ITEM_PATH_ELEMENTS_W}
- TPdhDataItemPathElementsW = PDH_DATA_ITEM_PATH_ELEMENTS_W;
- PPdhDataItemPathElementsW = PPDH_DATA_ITEM_PATH_ELEMENTS_W;
-
- {$IFDEF UNICODE}
- PPdhDataItemPathElements = PPdhDataItemPathElementsW;
- PDH_DATA_ITEM_PATH_ELEMENTS = _PDH_DATA_ITEM_PATH_ELEMENTS_W;
- {$EXTERNALSYM PDH_DATA_ITEM_PATH_ELEMENTS}
- PPDH_DATA_ITEM_PATH_ELEMENTS = PPDH_DATA_ITEM_PATH_ELEMENTS_W;
- {$EXTERNALSYM PPDH_DATA_ITEM_PATH_ELEMENTS}
- TPdhDataItemPathElements = _PDH_DATA_ITEM_PATH_ELEMENTS_W;
- {$ELSE}
- PPdhDataItemPathElements = PPdhDataItemPathElementsA;
- PDH_DATA_ITEM_PATH_ELEMENTS = _PDH_DATA_ITEM_PATH_ELEMENTS_A;
- {$EXTERNALSYM PDH_DATA_ITEM_PATH_ELEMENTS}
- PPDH_DATA_ITEM_PATH_ELEMENTS = PPDH_DATA_ITEM_PATH_ELEMENTS_A;
- {$EXTERNALSYM PPDH_DATA_ITEM_PATH_ELEMENTS}
- TPdhDataItemPathElements = _PDH_DATA_ITEM_PATH_ELEMENTS_A;
- {$ENDIF UNICODE}
-
- PPDH_COUNTER_INFO_A = ^PDH_COUNTER_INFO_A;
- {$EXTERNALSYM PPDH_COUNTER_INFO_A}
- _PDH_COUNTER_INFO_A = record
- dwLength: DWORD;
- dwType: DWORD;
- CVersion: DWORD;
- CStatus: DWORD;
- lScale: LONG;
- lDefaultScale: LONG;
- dwUserData: DWORD_PTR;
- dwQueryUserData: DWORD_PTR;
- szFullPath: LPSTR;
- Union: record
- case Longint of
- 1: (DataItemPath: PDH_DATA_ITEM_PATH_ELEMENTS_A);
- 2: (CounterPath: PDH_COUNTER_PATH_ELEMENTS_A);
- 3: (szMachineName: LPSTR;
- szObjectName: LPSTR;
- szInstanceName: LPSTR;
- szParentInstance: LPSTR;
- dwInstanceIndex: DWORD;
- szCounterName: LPSTR);
- end;
- szExplainText: LPSTR;
- DataBuffer: array [0..0] of DWORD;
- end;
- {$EXTERNALSYM _PDH_COUNTER_INFO_A}
- PDH_COUNTER_INFO_A = _PDH_COUNTER_INFO_A;
- {$EXTERNALSYM PDH_COUNTER_INFO_A}
- TPdhCounterInfoA = PDH_COUNTER_INFO_A;
- PPdhCounterInfoA = PPDH_COUNTER_INFO_A;
-
- PPDH_COUNTER_INFO_W = ^PDH_COUNTER_INFO_W;
- {$EXTERNALSYM PPDH_COUNTER_INFO_W}
- _PDH_COUNTER_INFO_W = record
- dwLength: DWORD;
- dwType: DWORD;
- CVersion: DWORD;
- CStatus: DWORD;
- lScale: LONG;
- lDefaultScale: LONG;
- dwUserData: DWORD_PTR;
- dwQueryUserData: DWORD_PTR;
- szFullPath: LPWSTR;
- Union: record
- case Longint of
- 1: (DataItemPath: PDH_DATA_ITEM_PATH_ELEMENTS_W);
- 2: (CounterPath: PDH_COUNTER_PATH_ELEMENTS_W);
- 3: (szMachineName: LPWSTR;
- szObjectName: LPWSTR;
- szInstanceName: LPWSTR;
- szParentInstance: LPWSTR;
- dwInstanceIndex: DWORD;
- szCounterName: LPWSTR);
- end;
- szExplainText: LPWSTR;
- DataBuffer: array [0..0] of DWORD;
- end;
- {$EXTERNALSYM _PDH_COUNTER_INFO_W}
- PDH_COUNTER_INFO_W = _PDH_COUNTER_INFO_W;
- {$EXTERNALSYM PDH_COUNTER_INFO_W}
- TPdhCounterInfoW = PDH_COUNTER_INFO_W;
- PPdhCounterInfoW = PPDH_COUNTER_INFO_W;
-
- {$IFDEF UNICODE}
- PPdhCounterInfo = PPdhCounterInfoW;
- PDH_COUNTER_INFO = _PDH_COUNTER_INFO_W;
- {$EXTERNALSYM PDH_COUNTER_INFO}
- PPDH_COUNTER_INFO = PPDH_COUNTER_INFO_W;
- {$EXTERNALSYM PPDH_COUNTER_INFO}
- TPdhCounterInfo = _PDH_COUNTER_INFO_W;
- {$ELSE}
- PPdhCounterInfo = PPdhCounterInfoA;
- PDH_COUNTER_INFO = _PDH_COUNTER_INFO_A;
- {$EXTERNALSYM PDH_COUNTER_INFO}
- PPDH_COUNTER_INFO = PPDH_COUNTER_INFO_A;
- {$EXTERNALSYM PPDH_COUNTER_INFO}
- TPdhCounterInfo = _PDH_COUNTER_INFO_A;
- {$ENDIF UNICODE}
-
- PPDH_TIME_INFO = ^PDH_TIME_INFO;
- {$EXTERNALSYM PPDH_TIME_INFO}
- _PDH_TIME_INFO = record
- StartTime: LONGLONG;
- EndTime: LONGLONG;
- SampleCount: DWORD;
- end;
- {$EXTERNALSYM _PDH_TIME_INFO}
- PDH_TIME_INFO = _PDH_TIME_INFO;
- {$EXTERNALSYM PDH_TIME_INFO}
- TPdhTimeInfo = PDH_TIME_INFO;
- PPdhTimeInfo = PPDH_TIME_INFO;
-
- PPDH_RAW_LOG_RECORD = ^PDH_RAW_LOG_RECORD;
- {$EXTERNALSYM PPDH_RAW_LOG_RECORD}
- _PDH_RAW_LOG_RECORD = record
- dwStructureSize: DWORD;
- dwRecordType: DWORD;
- dwItems: DWORD;
- RawBytes: array [0..0] of UCHAR;
- end;
- {$EXTERNALSYM _PDH_RAW_LOG_RECORD}
- PDH_RAW_LOG_RECORD = _PDH_RAW_LOG_RECORD;
- {$EXTERNALSYM PDH_RAW_LOG_RECORD}
- TPdhRawLogRecord = PDH_RAW_LOG_RECORD;
- PPdhRawLogRecord = PPDH_RAW_LOG_RECORD;
-
- PPDH_LOG_SERVICE_QUERY_INFO_A = ^PDH_LOG_SERVICE_QUERY_INFO_A;
- {$EXTERNALSYM PPDH_LOG_SERVICE_QUERY_INFO_A}
- _PDH_LOG_SERVICE_QUERY_INFO_A = record
- dwSize: DWORD;
- dwFlags: DWORD;
- dwLogQuota: DWORD;
- szLogFileCaption: LPSTR;
- szDefaultDir: LPSTR;
- szBaseFileName: LPSTR;
- dwFileType: DWORD;
- dwReserved: DWORD;
- Union: record
- case Longint of
- 1: (PdlAutoNameInterval: DWORD;
- PdlAutoNameUnits: DWORD;
- PdlCommandFilename: LPSTR;
- PdlCounterList: LPSTR;
- PdlAutoNameFormat: DWORD;
- PdlSampleInterval: DWORD;
- PdlLogStartTime: FILETIME;
- PdlLogEndTime: FILETIME);
- 2: (TlNumberOfBuffers: DWORD;
- TlMinimumBuffers: DWORD;
- TlMaximumBuffers: DWORD;
- TlFreeBuffers: DWORD;
- TlBufferSize: DWORD;
- TlEventsLost: DWORD;
- TlLoggerThreadId: DWORD;
- TlBuffersWritten: DWORD;
- TlLogHandle: DWORD;
- TlLogFileName: LPSTR);
- end;
- end;
- {$EXTERNALSYM _PDH_LOG_SERVICE_QUERY_INFO_A}
- PDH_LOG_SERVICE_QUERY_INFO_A = _PDH_LOG_SERVICE_QUERY_INFO_A;
- {$EXTERNALSYM _PDH_LOG_SERVICE_QUERY_INFO_A}
- TPdhLogServiceQueryInfoA = PDH_LOG_SERVICE_QUERY_INFO_A;
- PPdhLogServiceQueryInfoA = PPDH_LOG_SERVICE_QUERY_INFO_A;
-
- PPDH_LOG_SERVICE_QUERY_INFO_W = ^PDH_LOG_SERVICE_QUERY_INFO_W;
- {$EXTERNALSYM PPDH_LOG_SERVICE_QUERY_INFO_W}
- _PDH_LOG_SERVICE_QUERY_INFO_W = record
- dwSize: DWORD;
- dwFlags: DWORD;
- dwLogQuota: DWORD;
- szLogFileCaption: LPWSTR;
- szDefaultDir: LPWSTR;
- szBaseFileName: LPWSTR;
- dwFileType: DWORD;
- dwReserved: DWORD;
- Union: record
- case Longint of
- 1: (PdlAutoNameInterval: DWORD;
- PdlAutoNameUnits: DWORD;
- PdlCommandFilename: LPWSTR;
- PdlCounterList: LPWSTR;
- PdlAutoNameFormat: DWORD;
- PdlSampleInterval: DWORD;
- PdlLogStartTime: FILETIME;
- PdlLogEndTime: FILETIME);
- 2: (TlNumberOfBuffers: DWORD;
- TlMinimumBuffers: DWORD;
- TlMaximumBuffers: DWORD;
- TlFreeBuffers: DWORD;
- TlBufferSize: DWORD;
- TlEventsLost: DWORD;
- TlLoggerThreadId: DWORD;
- TlBuffersWritten: DWORD;
- TlLogHandle: DWORD;
- TlLogFileName: LPWSTR);
- end;
- end;
- {$EXTERNALSYM _PDH_LOG_SERVICE_QUERY_INFO_W}
- PDH_LOG_SERVICE_QUERY_INFO_W = _PDH_LOG_SERVICE_QUERY_INFO_W;
- {$EXTERNALSYM PDH_LOG_SERVICE_QUERY_INFO_W}
- TPdhLogServiceQueryInfoW = PDH_LOG_SERVICE_QUERY_INFO_W;
- PPdhLogServiceQueryInfoW = PPDH_LOG_SERVICE_QUERY_INFO_W;
-
- {$IFDEF UNICODE}
- PPdhLogServiceQueryInfo = PPdhLogServiceQueryInfoW;
- PDH_LOG_SERVICE_QUERY_INFO = _PDH_LOG_SERVICE_QUERY_INFO_W;
- {$EXTERNALSYM PDH_LOG_SERVICE_QUERY_INFO}
- PPDH_LOG_SERVICE_QUERY_INFO = PPDH_LOG_SERVICE_QUERY_INFO_W;
- {$EXTERNALSYM PPDH_LOG_SERVICE_QUERY_INFO}
- TPdhLogServiceQueryInfo = _PDH_LOG_SERVICE_QUERY_INFO_W;
- {$ELSE}
- PPdhLogServiceQueryInfo = PPdhLogServiceQueryInfoA;
- PDH_LOG_SERVICE_QUERY_INFO = _PDH_LOG_SERVICE_QUERY_INFO_A;
- {$EXTERNALSYM PDH_LOG_SERVICE_QUERY_INFO}
- PPDH_LOG_SERVICE_QUERY_INFO = PPDH_LOG_SERVICE_QUERY_INFO_A;
- {$EXTERNALSYM PPDH_LOG_SERVICE_QUERY_INFO}
- TPdhLogServiceQueryInfo = _PDH_LOG_SERVICE_QUERY_INFO_A;
- {$ENDIF UNICODE}
-
-//
-// Time value constants
-//
-
-const
- MAX_TIME_VALUE = LONGLONG($7FFFFFFFFFFFFFFF);
- {$EXTERNALSYM MAX_TIME_VALUE}
- MIN_TIME_VALUE = LONGLONG(0);
- {$EXTERNALSYM MIN_TIME_VALUE}
-
-// function definitions
-
-function PdhGetDllVersion(var lpdwVersion: DWORD): PDH_STATUS; stdcall;
-{$EXTERNALSYM PdhGetDllVersion}
-
-//
-// Query Functions
-//
-
-function PdhOpenQueryA(szDataSource: LPCSTR; dwUserData: DWORD_PTR;
- var phQuery: PDH_HQUERY): PDH_STATUS; stdcall;
-{$EXTERNALSYM PdhOpenQueryA}
-function PdhOpenQueryW(szDataSource: LPCWSTR; dwUserData: DWORD_PTR;
- var phQuery: PDH_HQUERY): PDH_STATUS; stdcall;
-{$EXTERNALSYM PdhOpenQueryW}
-function PdhOpenQuery(szDataSource: LPCTSTR; dwUserData: DWORD_PTR;
- var phQuery: PDH_HQUERY): PDH_STATUS; stdcall;
-{$EXTERNALSYM PdhOpenQuery}
-
-function PdhAddCounterA(hQuery: PDH_HQUERY; szFullCounterPath: LPCSTR;
- dwUserData: DWORD_PTR; var phCounter: PDH_HCOUNTER): PDH_STATUS; stdcall;
-{$EXTERNALSYM PdhAddCounterA}
-function PdhAddCounterW(hQuery: PDH_HQUERY; szFullCounterPath: LPCWSTR;
- dwUserData: DWORD_PTR; var phCounter: PDH_HCOUNTER): PDH_STATUS; stdcall;
-{$EXTERNALSYM PdhAddCounterW}
-function PdhAddCounter(hQuery: PDH_HQUERY; szFullCounterPath: LPCTSTR;
- dwUserData: DWORD_PTR; var phCounter: PDH_HCOUNTER): PDH_STATUS; stdcall;
-{$EXTERNALSYM PdhAddCounter}
-
-function PdhRemoveCounter(hCounter: PDH_HCOUNTER): PDH_STATUS; stdcall;
-{$EXTERNALSYM PdhRemoveCounter}
-
-function PdhCollectQueryData(hQuery: PDH_HQUERY): PDH_STATUS; stdcall;
-{$EXTERNALSYM PdhCollectQueryData}
-
-function PdhCloseQuery(hQuery: PDH_HQUERY): PDH_STATUS; stdcall;
-{$EXTERNALSYM PdhCloseQuery}
-
-//
-// Counter Functions
-//
-
-function PdhGetFormattedCounterValue(hCounter: PDH_HCOUNTER; dwFormat: DWORD;
- lpdwType: LPDWORD; var pValue: PDH_FMT_COUNTERVALUE): PDH_STATUS; stdcall;
-{$EXTERNALSYM PdhGetFormattedCounterValue}
-
-function PdhGetFormattedCounterArrayA(hCounter: PDH_HCOUNTER; dwFormat: DWORD;
- var lpdwBufferSize, lpdwItemCount: DWORD;
- var ItemBuffer: PDH_FMT_COUNTERVALUE_ITEM_A): PDH_STATUS; stdcall;
-{$EXTERNALSYM PdhGetFormattedCounterArrayA}
-function PdhGetFormattedCounterArrayW(hCounter: PDH_HCOUNTER; dwFormat: DWORD;
- var lpdwBufferSize, lpdwItemCount: DWORD;
- var ItemBuffer: PDH_FMT_COUNTERVALUE_ITEM_W): PDH_STATUS; stdcall;
-{$EXTERNALSYM PdhGetFormattedCounterArrayW}
-function PdhGetFormattedCounterArray(hCounter: PDH_HCOUNTER; dwFormat: DWORD;
- var lpdwBufferSize, lpdwItemCount: DWORD;
- var ItemBuffer: PDH_FMT_COUNTERVALUE_ITEM): PDH_STATUS; stdcall;
-{$EXTERNALSYM PdhGetFormattedCounterArray}
-
-// dwFormat flag values
-
-const
- PDH_FMT_RAW = DWORD($00000010);
- {$EXTERNALSYM PDH_FMT_RAW}
- PDH_FMT_ANSI = DWORD($00000020);
- {$EXTERNALSYM PDH_FMT_ANSI}
- PDH_FMT_UNICODE = DWORD($00000040);
- {$EXTERNALSYM PDH_FMT_UNICODE}
- PDH_FMT_LONG = DWORD($00000100);
- {$EXTERNALSYM PDH_FMT_LONG}
- PDH_FMT_DOUBLE = DWORD($00000200);
- {$EXTERNALSYM PDH_FMT_DOUBLE}
- PDH_FMT_LARGE = DWORD($00000400);
- {$EXTERNALSYM PDH_FMT_LARGE}
- PDH_FMT_NOSCALE = DWORD($00001000);
- {$EXTERNALSYM PDH_FMT_NOSCALE}
- PDH_FMT_1000 = DWORD($00002000);
- {$EXTERNALSYM PDH_FMT_1000}
- PDH_FMT_NODATA = DWORD($00004000);
- {$EXTERNALSYM PDH_FMT_NODATA}
- PDH_FMT_NOCAP100 = DWORD($00008000);
- {$EXTERNALSYM PDH_FMT_NODATA}
-
- PERF_DETAIL_COSTLY = DWORD($00010000);
- {$EXTERNALSYM PERF_DETAIL_COSTLY}
- PERF_DETAIL_STANDARD = DWORD($0000FFFF);
- {$EXTERNALSYM PERF_DETAIL_STANDARD}
-
-function PdhGetRawCounterValue(hCounter: PDH_HCOUNTER; lpdwType: LPDWORD;
- var pValue: PDH_RAW_COUNTER): PDH_STATUS; stdcall;
-{$EXTERNALSYM PdhGetRawCounterValue}
-
-function PdhGetRawCounterArrayA(hCounter: PDH_HCOUNTER; var lpdwBufferSize,
- lpdwItemCount: DWORD; var ItemBuffer: PDH_RAW_COUNTER_ITEM_A): PDH_STATUS; stdcall;
-{$EXTERNALSYM PdhGetRawCounterArrayA}
-function PdhGetRawCounterArrayW(hCounter: PDH_HCOUNTER; var lpdwBufferSize,
- lpdwItemCount: DWORD; var ItemBuffer: PDH_RAW_COUNTER_ITEM_W): PDH_STATUS; stdcall;
-{$EXTERNALSYM PdhGetRawCounterArrayW}
-function PdhGetRawCounterArray(hCounter: PDH_HCOUNTER; var lpdwBufferSize,
- lpdwItemCount: DWORD; var ItemBuffer: PDH_RAW_COUNTER_ITEM): PDH_STATUS; stdcall;
-{$EXTERNALSYM PdhGetRawCounterArray}
-
-function PdhCalculateCounterFromRawValue(hCounter: PDH_HCOUNTER; dwFormat: DWORD;
- rawValue1, rawValue2: PPDH_RAW_COUNTER; var fmtValue: PDH_FMT_COUNTERVALUE): PDH_STATUS; stdcall;
-{$EXTERNALSYM PdhCalculateCounterFromRawValue}
-
-function PdhComputeCounterStatistics(hCounter: PDH_HCOUNTER; dwFormat, dwFirstEntry,
- dwNumEntries: DWORD; lpRawValueArray: PPDH_RAW_COUNTER; var data: PDH_STATISTICS): PDH_STATUS; stdcall;
-{$EXTERNALSYM PdhComputeCounterStatistics}
-
-function PdhGetCounterInfoA(hCounter: PDH_HCOUNTER; bRetrieveExplainText: Boolean;
- var pdwBufferSize: DWORD; lpBuffer: PPDH_COUNTER_INFO_A): PDH_STATUS; stdcall;
-{$EXTERNALSYM PdhGetCounterInfoA}
-function PdhGetCounterInfoW(hCounter: PDH_HCOUNTER; bRetrieveExplainText: Boolean;
- var pdwBufferSize: DWORD; lpBuffer: PPDH_COUNTER_INFO_W): PDH_STATUS; stdcall;
-{$EXTERNALSYM PdhGetCounterInfoW}
-function PdhGetCounterInfo(hCounter: PDH_HCOUNTER; bRetrieveExplainText: Boolean;
- var pdwBufferSize: DWORD; lpBuffer: PPDH_COUNTER_INFO): PDH_STATUS; stdcall;
-{$EXTERNALSYM PdhGetCounterInfo}
-
-const
- PDH_MAX_SCALE = Longint(7);
- {$EXTERNALSYM PDH_MAX_SCALE}
- PDH_MIN_SCALE = Longint(-7);
- {$EXTERNALSYM PDH_MIN_SCALE}
-
-function PdhSetCounterScaleFactor(hCounter: PDH_HCOUNTER; lFactor: LONG): PDH_STATUS; stdcall;
-{$EXTERNALSYM PdhSetCounterScaleFactor}
-
-//
-// Browsing and enumeration functions
-//
-
-function PdhConnectMachineA(szMachineName: LPCSTR): PDH_STATUS; stdcall;
-{$EXTERNALSYM PdhConnectMachineA}
-function PdhConnectMachineW(szMachineName: LPCWSTR): PDH_STATUS; stdcall;
-{$EXTERNALSYM PdhConnectMachineW}
-function PdhConnectMachine(szMachineName: LPCTSTR): PDH_STATUS; stdcall;
-{$EXTERNALSYM PdhConnectMachine}
-
-function PdhEnumMachinesA(szDataSource: LPCSTR; mszMachineList: LPSTR;
- pcchBufferSize: LPDWORD): PDH_STATUS; stdcall;
-{$EXTERNALSYM PdhEnumMachinesA}
-function PdhEnumMachinesW(szDataSource: LPCWSTR; mszMachineList: LPWSTR;
- pcchBufferSize: LPDWORD): PDH_STATUS; stdcall;
-{$EXTERNALSYM PdhEnumMachinesW}
-function PdhEnumMachines(szDataSource: LPCTSTR; mszMachineList: LPTSTR;
- pcchBufferSize: LPDWORD): PDH_STATUS; stdcall;
-{$EXTERNALSYM PdhEnumMachines}
-
-function PdhEnumObjectsA(szDataSource, szMachineName: LPCSTR; mszObjectList: LPSTR;
- var pcchBufferSize: DWORD; dwDetailLevel: DWORD; bRefresh: BOOL): PDH_STATUS; stdcall;
-{$EXTERNALSYM PdhEnumObjectsA}
-function PdhEnumObjectsW(szDataSource, szMachineName: LPCWSTR; mszObjectList: LPWSTR;
- var pcchBufferSize: DWORD; dwDetailLevel: DWORD; bRefresh: BOOL): PDH_STATUS; stdcall;
-{$EXTERNALSYM PdhEnumObjectsW}
-function PdhEnumObjects(szDataSource, szMachineName: LPCTSTR; mszObjectList: LPTSTR;
- var pcchBufferSize: DWORD; dwDetailLevel: DWORD; bRefresh: BOOL): PDH_STATUS; stdcall;
-{$EXTERNALSYM PdhEnumObjects}
-
-function PdhEnumObjectItemsA(szDataSource, szMachineName, szObjectName: LPCSTR;
- mszCounterList: LPSTR; var pcchCounterListLength: DWORD; mszInstanceList: LPSTR;
- var pcchInstanceListLength: DWORD; dwDetailLevel, dwFlags: DWORD): PDH_STATUS; stdcall;
-{$EXTERNALSYM PdhEnumObjectItemsA}
-function PdhEnumObjectItemsW(szDataSource, szMachineName, szObjectName: LPCWSTR;
- mszCounterList: LPWSTR; var pcchCounterListLength: DWORD; mszInstanceList: LPWSTR;
- var pcchInstanceListLength: DWORD; dwDetailLevel, dwFlags: DWORD): PDH_STATUS; stdcall;
-{$EXTERNALSYM PdhEnumObjectItemsW}
-function PdhEnumObjectItems(szDataSource, szMachineName, szObjectName: LPCTSTR;
- mszCounterList: LPTSTR; var pcchCounterListLength: DWORD; mszInstanceList: LPTSTR;
- var pcchInstanceListLength: DWORD; dwDetailLevel, dwFlags: DWORD): PDH_STATUS; stdcall;
-{$EXTERNALSYM PdhEnumObjectItems}
-
-const
- PDH_OBJECT_HAS_INSTANCES = $00000001;
- {$EXTERNALSYM PDH_OBJECT_HAS_INSTANCES}
-
-function PdhMakeCounterPathA(pCounterPathElements: PPDH_COUNTER_PATH_ELEMENTS_A;
- szFullPathBuffer: LPSTR; var pcchBufferSize: DWORD; dwFlags: DWORD): PDH_STATUS; stdcall;
-{$EXTERNALSYM PdhMakeCounterPathA}
-function PdhMakeCounterPathW(pCounterPathElements: PPDH_COUNTER_PATH_ELEMENTS_W;
- szFullPathBuffer: LPWSTR; var pcchBufferSize: DWORD; dwFlags: DWORD): PDH_STATUS; stdcall;
-{$EXTERNALSYM PdhMakeCounterPathW}
-function PdhMakeCounterPath(pCounterPathElements: PPDH_COUNTER_PATH_ELEMENTS;
- szFullPathBuffer: LPTSTR; var pcchBufferSize: DWORD; dwFlags: DWORD): PDH_STATUS; stdcall;
-{$EXTERNALSYM PdhMakeCounterPath}
-
-// todo shouldn't pCounterPathElements be a pointer to ...?
-
-function PdhParseCounterPathA(szFullPathBuffer: LPCSTR;
- pCounterPathElements: PDH_COUNTER_PATH_ELEMENTS_A; var pdwBufferSize: DWORD;
- dwFlags: DWORD): PDH_STATUS; stdcall;
-{$EXTERNALSYM PdhParseCounterPathA}
-function PdhParseCounterPathW(szFullPathBuffer: LPCWSTR;
- pCounterPathElements: PDH_COUNTER_PATH_ELEMENTS_W; var pdwBufferSize: DWORD;
- dwFlags: DWORD): PDH_STATUS; stdcall;
-{$EXTERNALSYM PdhParseCounterPathW}
-function PdhParseCounterPath(szFullPathBuffer: LPCTSTR;
- pCounterPathElements: PDH_COUNTER_PATH_ELEMENTS; var pdwBufferSize: DWORD;
- dwFlags: DWORD): PDH_STATUS; stdcall;
-{$EXTERNALSYM PdhParseCounterPath}
-
-const
- PDH_PATH_WBEM_RESULT = DWORD($00000001);
- {$EXTERNALSYM PDH_PATH_WBEM_RESULT}
- PDH_PATH_WBEM_INPUT = DWORD($00000002);
- {$EXTERNALSYM PDH_PATH_WBEM_INPUT}
-
-function PDH_PATH_LANG_FLAGS(LangId, Flags: DWORD): DWORD;
-{$EXTERNALSYM PDH_PATH_LANG_FLAGS}
-
-function PdhParseInstanceNameA(szInstanceString: LPSTR; szInstanceName: LPCSTR;
- var pcchInstanceNameLength: DWORD; szParentName: LPSTR;
- var pcchParentNameLength: DWORD; lpIndex: LPDWORD): PDH_STATUS; stdcall;
-{$EXTERNALSYM PdhParseInstanceNameA}
-function PdhParseInstanceNameW(szInstanceString: LPWSTR; szInstanceName: LPCWSTR;
- var pcchInstanceNameLength: DWORD; szParentName: LPWSTR;
- var pcchParentNameLength: DWORD; lpIndex: LPDWORD): PDH_STATUS; stdcall;
-{$EXTERNALSYM PdhParseInstanceNameW}
-function PdhParseInstanceName(szInstanceString: LPTSTR; szInstanceName: LPCTSTR;
- var pcchInstanceNameLength: DWORD; szParentName: LPTSTR;
- var pcchParentNameLength: DWORD; lpIndex: LPDWORD): PDH_STATUS; stdcall;
-{$EXTERNALSYM PdhParseInstanceName}
-
-function PdhValidatePathA(szFullPathBuffer: LPCSTR): PDH_STATUS; stdcall;
-{$EXTERNALSYM PdhValidatePathA}
-function PdhValidatePathW(szFullPathBuffer: LPCWSTR): PDH_STATUS; stdcall;
-{$EXTERNALSYM PdhValidatePathW}
-function PdhValidatePath(szFullPathBuffer: LPCTSTR): PDH_STATUS; stdcall;
-{$EXTERNALSYM PdhValidatePath}
-
-function PdhGetDefaultPerfObjectA(szDataSource, szMachineName: LPCSTR;
- szDefaultObjectName: LPSTR; var pcchBufferSize: DWORD): PDH_STATUS; stdcall;
-{$EXTERNALSYM PdhGetDefaultPerfObjectA}
-function PdhGetDefaultPerfObjectW(szDataSource, szMachineName: LPCWSTR;
- szDefaultObjectName: LPWSTR; var pcchBufferSize: DWORD): PDH_STATUS; stdcall;
-{$EXTERNALSYM PdhGetDefaultPerfObjectW}
-function PdhGetDefaultPerfObject(szDataSource, szMachineName: LPCTSTR;
- szDefaultObjectName: LPTSTR; var pcchBufferSize: DWORD): PDH_STATUS; stdcall;
-{$EXTERNALSYM PdhGetDefaultPerfObject}
-
-function PdhGetDefaultPerfCounterA(szDataSource, szMachineName, szObjectName: LPCSTR;
- szDefaultCounterName: LPSTR; var pcchBufferSize: DWORD): PDH_STATUS; stdcall;
-{$EXTERNALSYM PdhGetDefaultPerfCounterA}
-function PdhGetDefaultPerfCounterW(szDataSource, szMachineName, szObjectName: LPCWSTR;
- szDefaultCounterName: LPWSTR; var pcchBufferSize: DWORD): PDH_STATUS; stdcall;
-{$EXTERNALSYM PdhGetDefaultPerfCounterW}
-function PdhGetDefaultPerfCounter(szDataSource, szMachineName, szObjectName: LPCTSTR;
- szDefaultCounterName: LPTSTR; var pcchBufferSize: DWORD): PDH_STATUS; stdcall;
-{$EXTERNALSYM PdhGetDefaultPerfCounter}
-
-type
- CounterPathCallBack = function(dwArg: DWORD_PTR): PDH_STATUS; stdcall;
- {$EXTERNALSYM CounterPathCallBack}
-
-const
- PDH_CF_INCLUDEINSTANCEINDEX = 1 shl 0;
- PDH_CF_SINGLECOUNTERPERADD = 1 shl 1;
- PDH_CF_SINGLECOUNTERPERDIALOG = 1 shl 2;
- PDH_CF_LOCALCOUNTERSONLY = 1 shl 3;
- PDH_CF_WILDCARDINSTANCES = 1 shl 4;
- PDH_CF_HIDEDETAILBOX = 1 shl 5;
- PDH_CF_INITIALIZEPATH = 1 shl 6;
- PDH_CF_DISABLEMACHINESELECTION = 1 shl 7;
- PDH_CF_INCLUDECOSTLYOBJECTS = 1 shl 8;
- PDH_CF_SHOWOBJECTBROWSER = 1 shl 9;
- PDH_CF_RESERVED = DWORD($FFFFFD00);
-
-type
- _BrowseDlgConfig_HW = record
- // Configuration flags
- dwConfigFlags: DWORD;
- hWndOwner: HWND;
- hDataSource: PDH_HLOG;
- szReturnPathBuffer: LPWSTR;
- cchReturnPathLength: DWORD;
- pCallBack: CounterPathCallBack;
- dwCallBackArg: DWORD_PTR;
- CallBackStatus: PDH_STATUS;
- dwDefaultDetailLevel: DWORD;
- szDialogBoxCaption: LPWSTR;
- end;
- {$EXTERNALSYM _BrowseDlgConfig_HW}
- PDH_BROWSE_DLG_CONFIG_HW = _BrowseDlgConfig_HW;
- {$EXTERNALSYM PDH_BROWSE_DLG_CONFIG_HW}
- PPDH_BROWSE_DLG_CONFIG_HW = ^PDH_BROWSE_DLG_CONFIG_HW;
- {$EXTERNALSYM PPDH_BROWSE_DLG_CONFIG_HW}
- TPdhBrowseDlgConfigHW = PDH_BROWSE_DLG_CONFIG_HW;
- PPdhBrowseDlgConfigHW = PPDH_BROWSE_DLG_CONFIG_HW;
-
- _BrowseDlgConfig_HA = record
- // Configuration flags
- dwConfigFlags: DWORD;
- hWndOwner: HWND;
- hDataSource: PDH_HLOG;
- szReturnPathBuffer: LPSTR;
- cchReturnPathLength: DWORD;
- pCallBack: CounterPathCallBack;
- dwCallBackArg: DWORD_PTR;
- CallBackStatus: PDH_STATUS;
- dwDefaultDetailLevel: DWORD;
- szDialogBoxCaption: LPSTR;
- end;
- {$EXTERNALSYM _BrowseDlgConfig_HA}
- PDH_BROWSE_DLG_CONFIG_HA = _BrowseDlgConfig_HA;
- {$EXTERNALSYM PDH_BROWSE_DLG_CONFIG_HA}
- PPDH_BROWSE_DLG_CONFIG_HA = ^PDH_BROWSE_DLG_CONFIG_HA;
- {$EXTERNALSYM PPDH_BROWSE_DLG_CONFIG_HA}
- TPdhBrowseDlgConfigHA = PDH_BROWSE_DLG_CONFIG_HA;
- PPdhBrowseDlgConfigHA = PPDH_BROWSE_DLG_CONFIG_HA;
-
- {$IFDEF UNICODE}
- PDH_BROWSE_DLG_CONFIG_H = PDH_BROWSE_DLG_CONFIG_HW;
- PPDH_BROWSE_DLG_CONFIG_H = PPDH_BROWSE_DLG_CONFIG_HW;
- {$ELSE}
- PDH_BROWSE_DLG_CONFIG_H = PDH_BROWSE_DLG_CONFIG_HA;
- PPDH_BROWSE_DLG_CONFIG_H = PPDH_BROWSE_DLG_CONFIG_HA;
- {$ENDIF UNICODE}
-
- PPDH_BROWSE_DLG_CONFIG_A = ^_BrowseDlgConfig_A;
- {$EXTERNALSYM PPDH_BROWSE_DLG_CONFIG_A}
- _BrowseDlgConfig_A = record
- dwConfigFlags: DWORD;
- hWndOwner: HWND;
- szDataSource: LPSTR;
- szReturnPathBuffer: LPSTR;
- cchReturnPathLength: DWORD;
- pCallBack: CounterPathCallBack;
- dwCallBackArg: DWORD_PTR;
- CallBackStatus: PDH_STATUS;
- dwDefaultDetailLevel: DWORD;
- szDialogBoxCaption: LPSTR;
- end;
- {$EXTERNALSYM _BrowseDlgConfig_A}
- PDH_BROWSE_DLG_CONFIG_A = _BrowseDlgConfig_A;
- {$EXTERNALSYM PDH_BROWSE_DLG_CONFIG_A}
- TPdhBrowseDlgConfigA = PDH_BROWSE_DLG_CONFIG_A;
- PPdhBrowseDlgConfigA = PPDH_BROWSE_DLG_CONFIG_A;
-
- PPDH_BROWSE_DLG_CONFIG_W = ^_BrowseDlgConfig_W;
- {$EXTERNALSYM PPDH_BROWSE_DLG_CONFIG_W}
- _BrowseDlgConfig_W = record
- dwConfigFlags: DWORD;
- hWndOwner: HWND;
- szDataSource: LPWSTR;
- szReturnPathBuffer: LPWSTR;
- cchReturnPathLength: DWORD;
- pCallBack: CounterPathCallBack;
- dwCallBackArg: DWORD_PTR;
- CallBackStatus: PDH_STATUS;
- dwDefaultDetailLevel: DWORD;
- szDialogBoxCaption: LPWSTR;
- end;
- {$EXTERNALSYM _BrowseDlgConfig_W}
- PDH_BROWSE_DLG_CONFIG_W = _BrowseDlgConfig_W;
- {$EXTERNALSYM PDH_BROWSE_DLG_CONFIG_W}
- TPdhBrowseDlgConfigW = PDH_BROWSE_DLG_CONFIG_W;
- PPdhBrowseDlgConfigW = PPDH_BROWSE_DLG_CONFIG_W;
-
- {$IFDEF UNICODE}
- PPdhBrowseDlgConfig = PPdhBrowseDlgConfigW;
- PDH_BROWSE_DLG_CONFIG = PDH_BROWSE_DLG_CONFIG_W;
- {$EXTERNALSYM PDH_BROWSE_DLG_CONFIG}
- PPDH_BROWSE_DLG_CONFIG = PPDH_BROWSE_DLG_CONFIG_W;
- {$EXTERNALSYM PPDH_BROWSE_DLG_CONFIG}
- TPdhBrowseDlgConfig = TPdhBrowseDlgConfigW;
- {$ELSE}
- PPdhBrowseDlgConfig = PPdhBrowseDlgConfigA;
- PDH_BROWSE_DLG_CONFIG = PDH_BROWSE_DLG_CONFIG_A;
- {$EXTERNALSYM PDH_BROWSE_DLG_CONFIG}
- PPDH_BROWSE_DLG_CONFIG = PPDH_BROWSE_DLG_CONFIG_A;
- {$EXTERNALSYM PPDH_BROWSE_DLG_CONFIG}
- TPdhBrowseDlgConfig = TPdhBrowseDlgConfigA;
- {$ENDIF UNICODE}
-
-function PdhBrowseCountersA(const pBrowseDlgData: PDH_BROWSE_DLG_CONFIG_A): PDH_STATUS; stdcall;
-{$EXTERNALSYM PdhBrowseCountersA}
-function PdhBrowseCountersW(const pBrowseDlgData: PDH_BROWSE_DLG_CONFIG_W): PDH_STATUS; stdcall;
-{$EXTERNALSYM PdhBrowseCountersW}
-function PdhBrowseCounters(const pBrowseDlgData: PDH_BROWSE_DLG_CONFIG): PDH_STATUS; stdcall;
-{$EXTERNALSYM PdhBrowseCounters}
-
-function PdhExpandCounterPathA(szWildCardPath: LPCSTR; mszExpandedPathList: LPSTR;
- var pcchPathListLength: DWORD): PDH_STATUS; stdcall;
-{$EXTERNALSYM PdhExpandCounterPathA}
-function PdhExpandCounterPathW(szWildCardPath: LPCWSTR; mszExpandedPathList: LPWSTR;
- var pcchPathListLength: DWORD): PDH_STATUS; stdcall;
-{$EXTERNALSYM PdhExpandCounterPathW}
-function PdhExpandCounterPath(szWildCardPath: LPCTSTR; mszExpandedPathList: LPTSTR;
- var pcchPathListLength: DWORD): PDH_STATUS; stdcall;
-{$EXTERNALSYM PdhExpandCounterPath}
-
-//
-// v2.0 functions
-//
-
-function PdhLookupPerfNameByIndexA(szMachineName: LPCSTR; dwNameIndex: DWORD;
- szNameBuffer: LPSTR; var pcchNameBufferSize: DWORD): PDH_STATUS; stdcall;
-{$EXTERNALSYM PdhLookupPerfNameByIndexA}
-function PdhLookupPerfNameByIndexW(szMachineName: LPCWSTR; dwNameIndex: DWORD;
- szNameBuffer: LPWSTR; var pcchNameBufferSize: DWORD): PDH_STATUS; stdcall;
-{$EXTERNALSYM PdhLookupPerfNameByIndexW}
-function PdhLookupPerfNameByIndex(szMachineName: LPCTSTR; dwNameIndex: DWORD;
- szNameBuffer: LPTSTR; var pcchNameBufferSize: DWORD): PDH_STATUS; stdcall;
-{$EXTERNALSYM PdhLookupPerfNameByIndex}
-
-function PdhLookupPerfIndexByNameA(szMachineName, szNameBuffer: LPCSTR;
- var pdwIndex: DWORD): PDH_STATUS; stdcall;
-{$EXTERNALSYM PdhLookupPerfIndexByNameA}
-function PdhLookupPerfIndexByNameW(szMachineName, szNameBuffer: LPCWSTR;
- var pdwIndex: DWORD): PDH_STATUS; stdcall;
-{$EXTERNALSYM PdhLookupPerfIndexByNameW}
-function PdhLookupPerfIndexByName(szMachineName, szNameBuffer: LPCTSTR;
- var pdwIndex: DWORD): PDH_STATUS; stdcall;
-{$EXTERNALSYM PdhLookupPerfIndexByName}
-
-const
- PDH_NOEXPANDCOUNTERS = 1;
- {$EXTERNALSYM PDH_NOEXPANDCOUNTERS}
- PDH_NOEXPANDINSTANCES = 2;
- {$EXTERNALSYM PDH_NOEXPANDINSTANCES}
- PDH_REFRESHCOUNTERS = 4;
- {$EXTERNALSYM PDH_REFRESHCOUNTERS}
-
-function PdhExpandWildCardPathA(szDataSource, szWildCardPath: LPCSTR;
- mszExpandedPathList: LPSTR; var pcchPathListLength: DWORD; dwFlags: DWORD): PDH_STATUS; stdcall;
-{$EXTERNALSYM PdhExpandWildCardPathA}
-function PdhExpandWildCardPathW(szDataSource, szWildCardPath: LPCWSTR;
- mszExpandedPathList: LPWSTR; var pcchPathListLength: DWORD; dwFlags: DWORD): PDH_STATUS; stdcall;
-{$EXTERNALSYM PdhExpandWildCardPathW}
-function PdhExpandWildCardPath(szDataSource, szWildCardPath: LPCTSTR;
- mszExpandedPathList: LPTSTR; var pcchPathListLength: DWORD; dwFlags: DWORD): PDH_STATUS; stdcall;
-{$EXTERNALSYM PdhExpandWildCardPath}
-
-//
-// Logging Functions
-//
-
-const
- PDH_LOG_READ_ACCESS = DWORD($00010000);
- {$EXTERNALSYM PDH_LOG_READ_ACCESS}
- PDH_LOG_WRITE_ACCESS = DWORD($00020000);
- {$EXTERNALSYM PDH_LOG_WRITE_ACCESS}
- PDH_LOG_UPDATE_ACCESS = DWORD($00040000);
- {$EXTERNALSYM PDH_LOG_UPDATE_ACCESS}
- PDH_LOG_ACCESS_MASK = DWORD($000F0000);
- {$EXTERNALSYM PDH_LOG_ACCESS_MASK}
-
- PDH_LOG_CREATE_NEW = DWORD($00000001);
- {$EXTERNALSYM PDH_LOG_CREATE_NEW}
- PDH_LOG_CREATE_ALWAYS = DWORD($00000002);
- {$EXTERNALSYM PDH_LOG_CREATE_ALWAYS}
- PDH_LOG_OPEN_ALWAYS = DWORD($00000003);
- {$EXTERNALSYM PDH_LOG_OPEN_ALWAYS}
- PDH_LOG_OPEN_EXISTING = DWORD($00000004);
- {$EXTERNALSYM PDH_LOG_OPEN_EXISTING}
- PDH_LOG_CREATE_MASK = DWORD($0000000F);
- {$EXTERNALSYM PDH_LOG_CREATE_MASK}
-
- PDH_LOG_OPT_USER_STRING = DWORD($01000000);
- {$EXTERNALSYM PDH_LOG_OPT_USER_STRING}
- PDH_LOG_OPT_CIRCULAR = DWORD($02000000);
- {$EXTERNALSYM PDH_LOG_OPT_CIRCULAR}
- PDH_LOG_OPT_MAX_IS_BYTES = DWORD($04000000);
- {$EXTERNALSYM PDH_LOG_OPT_MAX_IS_BYTES}
- PDH_LOG_OPT_APPEND = DWORD($08000000);
- {$EXTERNALSYM PDH_LOG_OPT_APPEND}
- PDH_LOG_OPT_MASK = DWORD($0F000000);
- {$EXTERNALSYM PDH_LOG_OPT_MASK}
-
- PDH_LOG_TYPE_UNDEFINED = 0;
- {$EXTERNALSYM PDH_LOG_TYPE_UNDEFINED}
- PDH_LOG_TYPE_CSV = 1;
- {$EXTERNALSYM PDH_LOG_TYPE_CSV}
- PDH_LOG_TYPE_TSV = 2;
- {$EXTERNALSYM PDH_LOG_TYPE_TSV}
- //PDH_LOG_TYPE_BINARY = 3; // this is the retired binary format
- //{$EXTERNALSYM PDH_LOG_TYPE_BINARY}
- PDH_LOG_TYPE_TRACE_KERNEL = 4;
- {$EXTERNALSYM PDH_LOG_TYPE_TRACE_KERNEL}
- PDH_LOG_TYPE_TRACE_GENERIC = 5;
- {$EXTERNALSYM PDH_LOG_TYPE_TRACE_GENERIC}
- PDH_LOG_TYPE_PERFMON = 6;
- {$EXTERNALSYM PDH_LOG_TYPE_PERFMON}
- PDH_LOG_TYPE_SQL = 7;
- {$EXTERNALSYM PDH_LOG_TYPE_SQL}
- PDH_LOG_TYPE_BINARY = 8;
- {$EXTERNALSYM PDH_LOG_TYPE_BINARY}
-
-function PdhOpenLogA(szLogFileName: LPCSTR; dwAccessFlags: DWORD;
- lpdwLogType: LPDWORD; hQuery: PDH_HQUERY; dwMaxRecords: DWORD;
- szUserCaption: LPCSTR; var phLog: PDH_HLOG): PDH_STATUS; stdcall;
-{$EXTERNALSYM PdhOpenLogA}
-function PdhOpenLogW(szLogFileName: LPCWSTR; dwAccessFlags: DWORD;
- lpdwLogType: LPDWORD; hQuery: PDH_HQUERY; dwMaxRecords: DWORD;
- szUserCaption: LPCWSTR; var phLog: PDH_HLOG): PDH_STATUS; stdcall;
-{$EXTERNALSYM PdhOpenLogW}
-function PdhOpenLog(szLogFileName: LPCTSTR; dwAccessFlags: DWORD;
- lpdwLogType: LPDWORD; hQuery: PDH_HQUERY; dwMaxRecords: DWORD;
- szUserCaption: LPCTSTR; var phLog: PDH_HLOG): PDH_STATUS; stdcall;
-{$EXTERNALSYM PdhOpenLog}
-
-function PdhUpdateLogA(hLog: PDH_HLOG; szUserString: LPCSTR): PDH_STATUS; stdcall;
-{$EXTERNALSYM PdhUpdateLogA}
-function PdhUpdateLogW(hLog: PDH_HLOG; szUserString: LPCWSTR): PDH_STATUS; stdcall;
-{$EXTERNALSYM PdhUpdateLogW}
-function PdhUpdateLog(hLog: PDH_HLOG; szUserString: LPCTSTR): PDH_STATUS; stdcall;
-{$EXTERNALSYM PdhUpdateLog}
-
-function PdhUpdateLogFileCatalog(hLog: PDH_HLOG): PDH_STATUS; stdcall;
-{$EXTERNALSYM PdhUpdateLogFileCatalog}
-
-function PdhGetLogFileSize(hLog: PDH_HLOG; var llSize: LONGLONG): PDH_STATUS; stdcall;
-{$EXTERNALSYM PdhGetLogFileSize}
-
-function PdhCloseLog(hLog: PDH_HLOG; dwFlags: DWORD): PDH_STATUS; stdcall;
-{$EXTERNALSYM PdhCloseLog}
-
-const
- PDH_FLAGS_CLOSE_QUERY = DWORD($00000001);
- {$EXTERNALSYM PDH_FLAGS_CLOSE_QUERY}
-
-//
-// Data source selection dialog
-//
-
-const
- PDH_FLAGS_FILE_BROWSER_ONLY = DWORD($00000001);
- {$EXTERNALSYM PDH_FLAGS_FILE_BROWSER_ONLY}
-
-function PdhSelectDataSourceA(hWndOwner: HWND; dwFlags: DWORD;
- szDataSource: LPSTR; var pcchBufferLength: DWORD): PDH_STATUS; stdcall;
-{$EXTERNALSYM PdhSelectDataSourceA}
-function PdhSelectDataSourceW(hWndOwner: HWND; dwFlags: DWORD;
- szDataSource: LPWSTR; var pcchBufferLength: DWORD): PDH_STATUS; stdcall;
-{$EXTERNALSYM PdhSelectDataSourceW}
-function PdhSelectDataSource(hWndOwner: HWND; dwFlags: DWORD;
- szDataSource: LPTSTR; var pcchBufferLength: DWORD): PDH_STATUS; stdcall;
-{$EXTERNALSYM PdhSelectDataSource}
-
-function PdhIsRealTimeQuery(hQuery: PDH_HQUERY): BOOL; stdcall;
-{$EXTERNALSYM PdhIsRealTimeQuery}
-
-function PdhSetQueryTimeRange(hQuery: PDH_HQUERY; var pInfo: PDH_TIME_INFO): PDH_STATUS; stdcall;
-{$EXTERNALSYM PdhSetQueryTimeRange}
-
-function PdhGetDataSourceTimeRangeA(szDataSource: LPCSTR; var pdwNumEntries: DWORD;
- var pInfo: PDH_TIME_INFO; pdwBufferSize: LPDWORD): PDH_STATUS; stdcall;
-{$EXTERNALSYM PdhGetDataSourceTimeRangeA}
-function PdhGetDataSourceTimeRangeW(szDataSource: LPCWSTR; var pdwNumEntries: DWORD;
- var pInfo: PDH_TIME_INFO; pdwBufferSize: LPDWORD): PDH_STATUS; stdcall;
-{$EXTERNALSYM PdhGetDataSourceTimeRangeW}
-function PdhGetDataSourceTimeRange(szDataSource: LPCTSTR; var pdwNumEntries: DWORD;
- var pInfo: PDH_TIME_INFO; pdwBufferSize: LPDWORD): PDH_STATUS; stdcall;
-{$EXTERNALSYM PdhGetDataSourceTimeRange}
-
-function PdhCollectQueryDataEx(hQuery: PDH_HQUERY; dwIntervalTime: DWORD;
- hNewDataEvent: HANDLE): PDH_STATUS; stdcall;
-{$EXTERNALSYM PdhCollectQueryDataEx}
-
-function PdhFormatFromRawValue(dwCounterType, dwFormat: DWORD;
- var pTimeBase: LONGLONG; pRawValue1, pRawValue2: PPDH_RAW_COUNTER;
- var pFmtValue: PDH_FMT_COUNTERVALUE): PDH_STATUS; stdcall;
-{$EXTERNALSYM PdhFormatFromRawValue}
-
-function PdhGetCounterTimeBase(hCounter: PDH_HCOUNTER; var pTimeBase: LONGLONG): PDH_STATUS; stdcall;
-{$EXTERNALSYM PdhGetCounterTimeBase}
-
-function PdhReadRawLogRecord(hLog: PDH_HLOG; ftRecord: FILETIME;
- var pRawLogRecord: PDH_RAW_LOG_RECORD; pdwBufferLength: LPDWORD): PDH_STATUS; stdcall;
-{$EXTERNALSYM PdhReadRawLogRecord}
-
-const
- DATA_SOURCE_REGISTRY = DWORD($00000001);
- {$EXTERNALSYM DATA_SOURCE_REGISTRY}
- DATA_SOURCE_LOGFILE = DWORD($00000002);
- {$EXTERNALSYM DATA_SOURCE_LOGFILE}
- DATA_SOURCE_WBEM = DWORD($00000004);
- {$EXTERNALSYM DATA_SOURCE_WBEM}
-
-function PdhSetDefaultRealTimeDataSource(dwDataSourceId: DWORD): PDH_STATUS; stdcall;
-{$EXTERNALSYM PdhSetDefaultRealTimeDataSource}
-
-// Extended API for WMI event trace logfile format
-//
-
-function PdhBindInputDataSourceW(var phDataSource: PDH_HLOG; LogFileNameList: LPCWSTR): PDH_STATUS; stdcall;
-{$EXTERNALSYM PdhBindInputDataSourceW}
-function PdhBindInputDataSourceA(var phDataSource: PDH_HLOG; LogFileNameList: LPCSTR): PDH_STATUS; stdcall;
-{$EXTERNALSYM PdhBindInputDataSourceA}
-function PdhBindInputDataSource(var phDataSource: PDH_HLOG; LogFileNameList: LPCTSTR): PDH_STATUS; stdcall;
-{$EXTERNALSYM PdhBindInputDataSource}
-
-function PdhOpenQueryH(hDataSource: PDH_HLOG; dwUserData: DWORD_PTR; var phQuery: PDH_HQUERY): PDH_STATUS; stdcall;
-{$EXTERNALSYM PdhOpenQueryH}
-
-function PdhEnumMachinesHW(hDataSource: PDH_HLOG; mszMachineList: LPWSTR; pcchBufferSize: LPDWORD): PDH_STATUS; stdcall;
-{$EXTERNALSYM PdhEnumMachinesHW}
-function PdhEnumMachinesHA(hDataSource: PDH_HLOG; mszMachineList: LPSTR; pcchBufferSize: LPDWORD): PDH_STATUS; stdcall;
-{$EXTERNALSYM PdhEnumMachinesHA}
-function PdhEnumMachinesH(hDataSource: PDH_HLOG; mszMachineList: LPTSTR; pcchBufferSize: LPDWORD): PDH_STATUS; stdcall;
-{$EXTERNALSYM PdhEnumMachinesH}
-
-function PdhEnumObjectsHA(hDataSource: PDH_HLOG; szMachineName: LPCSTR; mszObjectList: LPSTR; pcchBufferSize: LPDWORD;
- dwDetailLevel: DWORD; bRefresh: BOOL): PDH_STATUS; stdcall;
-{$EXTERNALSYM PdhEnumObjectsHA}
-function PdhEnumObjectsHW(hDataSource: PDH_HLOG; szMachineName: LPCWSTR; mszObjectList: LPWSTR; pcchBufferSize: LPDWORD;
- dwDetailLevel: DWORD; bRefresh: BOOL): PDH_STATUS; stdcall;
-{$EXTERNALSYM PdhEnumObjectsHW}
-function PdhEnumObjectsH(hDataSource: PDH_HLOG; szMachineName: LPCTSTR; mszObjectList: LPWSTR; pcchBufferSize: LPDWORD;
- dwDetailLevel: DWORD; bRefresh: BOOL): PDH_STATUS; stdcall;
-{$EXTERNALSYM PdhEnumObjectsH}
-
-function PdhEnumObjectItemsHA(hDataSource: PDH_HLOG; szMachineName, szObjectName: LPCSTR; mszCounterList: LPSTR;
- pcchCounterListLength: LPDWORD; mszInstanceList: LPSTR; pcchInstanceListLength: LPDWORD;
- dwDetailLevel, dwFlags: DWORD): PDH_STATUS; stdcall;
-{$EXTERNALSYM PdhEnumObjectItemsHA}
-function PdhEnumObjectItemsHW(hDataSource: PDH_HLOG; szMachineName, szObjectName: LPCWSTR; mszCounterList: LPWSTR;
- pcchCounterListLength: LPDWORD; mszInstanceList: LPWSTR; pcchInstanceListLength: LPDWORD;
- dwDetailLevel, dwFlags: DWORD): PDH_STATUS; stdcall;
-{$EXTERNALSYM PdhEnumObjectItemsHW}
-function PdhEnumObjectItemsH(hDataSource: PDH_HLOG; szMachineName, szObjectName: LPCTSTR; mszCounterList: LPTSTR;
- pcchCounterListLength: LPDWORD; mszInstanceList: LPTSTR; pcchInstanceListLength: LPDWORD;
- dwDetailLevel, dwFlags: DWORD): PDH_STATUS; stdcall;
-{$EXTERNALSYM PdhEnumObjectItemsH}
-
-function PdhExpandWildCardPathHA(hDataSource: PDH_HLOG; szWildCardPath: LPCSTR; mszExpandedPathList: LPSTR;
- pcchPathListLength: LPDWORD; dwFlags: DWORD): PDH_STATUS; stdcall;
-{$EXTERNALSYM PdhExpandWildCardPathHA}
-function PdhExpandWildCardPathHW(hDataSource: PDH_HLOG; szWildCardPath: LPCWSTR; mszExpandedPathList: LPWSTR;
- pcchPathListLength: LPDWORD; dwFlags: DWORD): PDH_STATUS; stdcall;
-{$EXTERNALSYM PdhExpandWildCardPathHW}
-function PdhExpandWildCardPathH(hDataSource: PDH_HLOG; szWildCardPath: LPCTSTR; mszExpandedPathList: LPTSTR;
- pcchPathListLength: LPDWORD; dwFlags: DWORD): PDH_STATUS; stdcall;
-{$EXTERNALSYM PdhExpandWildCardPathH}
-
-function PdhGetDataSourceTimeRangeH(hDataSource: PDH_HLOG; pdwNumEntries: LPDWORD; pInfo: PPDH_TIME_INFO;
- pdwBufferSize: LPDWORD): PDH_STATUS; stdcall;
-{$EXTERNALSYM PdhGetDataSourceTimeRangeH}
-
-function PdhGetDefaultPerfObjectHW(hDataSource: PDH_HLOG; szMachineName: LPCWSTR; szDefaultObjectName: LPWSTR;
- pcchBufferSize: LPDWORD): PDH_STATUS; stdcall;
-{$EXTERNALSYM PdhGetDefaultPerfObjectHW}
-function PdhGetDefaultPerfObjectHA(hDataSource: PDH_HLOG; szMachineName: LPCSTR; szDefaultObjectName: LPSTR;
- pcchBufferSize: LPDWORD): PDH_STATUS; stdcall;
-{$EXTERNALSYM PdhGetDefaultPerfObjectHA}
-function PdhGetDefaultPerfObjectH(hDataSource: PDH_HLOG; szMachineName: LPCTSTR; szDefaultObjectName: LPTSTR;
- pcchBufferSize: LPDWORD): PDH_STATUS; stdcall;
-{$EXTERNALSYM PdhGetDefaultPerfObjectH}
-
-function PdhGetDefaultPerfCounterHW(hDataSource: PDH_HLOG; szMachineName, szObjectName: LPCWSTR;
- szDefaultCounterName: LPWSTR; pcchBufferSize: LPDWORD): PDH_STATUS; stdcall;
-{$EXTERNALSYM PdhGetDefaultPerfCounterHW}
-function PdhGetDefaultPerfCounterHA(hDataSource: PDH_HLOG; szMachineName, szObjectName: LPCSTR;
- szDefaultCounterName: LPSTR; pcchBufferSize: LPDWORD): PDH_STATUS; stdcall;
-{$EXTERNALSYM PdhGetDefaultPerfCounterHA}
-function PdhGetDefaultPerfCounterH(hDataSource: PDH_HLOG; szMachineName, szObjectName: LPCTSTR;
- szDefaultCounterName: LPTSTR; pcchBufferSize: LPDWORD): PDH_STATUS; stdcall;
-{$EXTERNALSYM PdhGetDefaultPerfCounterH}
-
-function PdhBrowseCountersHW(const pBrowseDlgData: PDH_BROWSE_DLG_CONFIG_HW): PDH_STATUS; stdcall;
-{$EXTERNALSYM PdhBrowseCountersHW}
-function PdhBrowseCountersHA(const pBrowseDlgData: PDH_BROWSE_DLG_CONFIG_HA): PDH_STATUS; stdcall;
-{$EXTERNALSYM PdhBrowseCountersHA}
-function PdhBrowseCountersH(const pBrowseDlgData: PDH_BROWSE_DLG_CONFIG_H): PDH_STATUS; stdcall;
-{$EXTERNALSYM PdhBrowseCountersH}
-
-//Check that a DSN points to a database that contains the correct Perfmon tables.
-
-function PdhVerifySQLDBW(szDataSource: LPCWSTR): PDH_STATUS; stdcall;
-{$EXTERNALSYM PdhVerifySQLDBW}
-function PdhVerifySQLDBA(szDataSource: LPCSTR): PDH_STATUS; stdcall;
-{$EXTERNALSYM PdhVerifySQLDBA}
-function PdhVerifySQLDB(szDataSource: LPCTSTR): PDH_STATUS; stdcall;
-{$EXTERNALSYM PdhVerifySQLDB}
-
-//Create the correct perfmon tables in the database pointed to by a DSN.
-
-function PdhCreateSQLTablesW(szDataSource: LPCWSTR): PDH_STATUS; stdcall;
-{$EXTERNALSYM PdhCreateSQLTablesW}
-function PdhCreateSQLTablesA(szDataSource: LPCSTR): PDH_STATUS; stdcall;
-{$EXTERNALSYM PdhCreateSQLTablesA}
-function PdhCreateSQLTables(szDataSource: LPCTSTR): PDH_STATUS; stdcall;
-{$EXTERNALSYM PdhCreateSQLTables}
-
-//Return the list of Log set names in the database pointed to by the DSN.
-
-function PdhEnumLogSetNamesW(szDataSource: LPCWSTR; mszDataSetNameList: LPWSTR; pcchBufferLength: LPDWORD): PDH_STATUS; stdcall;
-{$EXTERNALSYM PdhEnumLogSetNamesW}
-function PdhEnumLogSetNamesA(szDataSource: LPCSTR; mszDataSetNameList: LPSTR; pcchBufferLength: LPDWORD): PDH_STATUS; stdcall;
-{$EXTERNALSYM PdhEnumLogSetNamesA}
-function PdhEnumLogSetNames(szDataSource: LPCTSTR; mszDataSetNameList: LPTSTR; pcchBufferLength: LPDWORD): PDH_STATUS; stdcall;
-{$EXTERNALSYM PdhEnumLogSetNames}
-
-//Retrieve the GUID for an open Log Set
-
-function PdhGetLogSetGUID(hLog: PDH_HLOG; pGuid: LPGUID; pRunId: LPINT): PDH_STATUS; stdcall;
-{$EXTERNALSYM PdhGetLogSetGUID}
-
-//Set the RunID for an open Log Set
-
-function PdhSetLogSetRunID(hLog: PDH_HLOG; RunId: Integer): PDH_STATUS; stdcall;
-{$EXTERNALSYM PdhSetLogSetRunID}
-
-implementation
-
-const
- PdhLib = 'pdh.dll';
- {$IFDEF UNICODE}
- AWSuffix = 'W';
- {$ELSE}
- AWSuffix = 'A';
- {$ENDIF UNICODE}
-
-function IsSuccessSeverity(ErrorCode: Longint): Boolean;
-begin
- Result := (ErrorCode and $C0000000) = $00000000;
-end;
-
-function IsInformationalSeverity(ErrorCode: Longint): Boolean;
-begin
- Result := (ErrorCode and $C0000000) = $40000000;
-end;
-
-function IsWarningSeverity(ErrorCode: Longint): Boolean;
-begin
- Result := (ErrorCode and $C0000000) = $80000000;
-end;
-
-function IsErrorSeverity(ErrorCode: Longint): Boolean;
-begin
- Result := (ErrorCode and $C0000000) = $C0000000;
-end;
-
-function PDH_PATH_LANG_FLAGS(LangId, Flags: DWORD): DWORD;
-begin
- Result := DWORD(((LangId and $0000FFFF) shl 16) or (Flags and $0000FFFF));
-end;
-
-{$IFDEF DYNAMIC_LINK}
-
-var
- _PdhGetDllVersion: Pointer;
-
-function PdhGetDllVersion;
-begin
- GetProcedureAddress(_PdhGetDllVersion, PdhLib, 'PdhGetDllVersion');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PdhGetDllVersion]
- end;
-end;
-
-var
- _PdhOpenQueryA: Pointer;
-
-function PdhOpenQueryA;
-begin
- GetProcedureAddress(_PdhOpenQueryA, PdhLib, 'PdhOpenQueryA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PdhOpenQueryA]
- end;
-end;
-
-var
- _PdhOpenQueryW: Pointer;
-
-function PdhOpenQueryW;
-begin
- GetProcedureAddress(_PdhOpenQueryW, PdhLib, 'PdhOpenQueryW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PdhOpenQueryW]
- end;
-end;
-
-var
- _PdhOpenQuery: Pointer;
-
-function PdhOpenQuery;
-begin
- GetProcedureAddress(_PdhOpenQuery, PdhLib, 'PdhOpenQuery' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PdhOpenQuery]
- end;
-end;
-
-var
- _PdhAddCounterA: Pointer;
-
-function PdhAddCounterA;
-begin
- GetProcedureAddress(_PdhAddCounterA, PdhLib, 'PdhAddCounterA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PdhAddCounterA]
- end;
-end;
-
-var
- _PdhAddCounterW: Pointer;
-
-function PdhAddCounterW;
-begin
- GetProcedureAddress(_PdhAddCounterW, PdhLib, 'PdhAddCounterW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PdhAddCounterW]
- end;
-end;
-
-var
- _PdhAddCounter: Pointer;
-
-function PdhAddCounter;
-begin
- GetProcedureAddress(_PdhAddCounter, PdhLib, 'PdhAddCounter' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PdhAddCounter]
- end;
-end;
-
-var
- _PdhRemoveCounter: Pointer;
-
-function PdhRemoveCounter;
-begin
- GetProcedureAddress(_PdhRemoveCounter, PdhLib, 'PdhRemoveCounter');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PdhRemoveCounter]
- end;
-end;
-
-var
- _PdhCollectQueryData: Pointer;
-
-function PdhCollectQueryData;
-begin
- GetProcedureAddress(_PdhCollectQueryData, PdhLib, 'PdhCollectQueryData');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PdhCollectQueryData]
- end;
-end;
-
-var
- _PdhCloseQuery: Pointer;
-
-function PdhCloseQuery;
-begin
- GetProcedureAddress(_PdhCloseQuery, PdhLib, 'PdhCloseQuery');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PdhCloseQuery]
- end;
-end;
-
-var
- _PdhGetFormattedCounterValue: Pointer;
-
-function PdhGetFormattedCounterValue;
-begin
- GetProcedureAddress(_PdhGetFormattedCounterValue, PdhLib, 'PdhGetFormattedCounterValue');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PdhGetFormattedCounterValue]
- end;
-end;
-
-var
- _PdhGetFormattedCounterArrayA: Pointer;
-
-function PdhGetFormattedCounterArrayA;
-begin
- GetProcedureAddress(_PdhGetFormattedCounterArrayA, PdhLib, 'PdhGetFormattedCounterArrayA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PdhGetFormattedCounterArrayA]
- end;
-end;
-
-var
- _PdhGetFormattedCounterArrayW: Pointer;
-
-function PdhGetFormattedCounterArrayW;
-begin
- GetProcedureAddress(_PdhGetFormattedCounterArrayW, PdhLib, 'PdhGetFormattedCounterArrayW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PdhGetFormattedCounterArrayW]
- end;
-end;
-
-var
- _PdhGetFormattedCounterArray: Pointer;
-
-function PdhGetFormattedCounterArray;
-begin
- GetProcedureAddress(_PdhGetFormattedCounterArray, PdhLib, 'PdhGetFormattedCounterArray' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PdhGetFormattedCounterArray]
- end;
-end;
-
-var
- _PdhGetRawCounterValue: Pointer;
-
-function PdhGetRawCounterValue;
-begin
- GetProcedureAddress(_PdhGetRawCounterValue, PdhLib, 'PdhGetRawCounterValue');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PdhGetRawCounterValue]
- end;
-end;
-
-var
- _PdhGetRawCounterArrayA: Pointer;
-
-function PdhGetRawCounterArrayA;
-begin
- GetProcedureAddress(_PdhGetRawCounterArrayA, PdhLib, 'PdhGetRawCounterArrayA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PdhGetRawCounterArrayA]
- end;
-end;
-
-var
- _PdhGetRawCounterArrayW: Pointer;
-
-function PdhGetRawCounterArrayW;
-begin
- GetProcedureAddress(_PdhGetRawCounterArrayW, PdhLib, 'PdhGetRawCounterArrayW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PdhGetRawCounterArrayW]
- end;
-end;
-
-var
- _PdhGetRawCounterArray: Pointer;
-
-function PdhGetRawCounterArray;
-begin
- GetProcedureAddress(_PdhGetRawCounterArray, PdhLib, 'PdhGetRawCounterArray' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PdhGetRawCounterArray]
- end;
-end;
-
-var
- _PdhCalculateCounterFromRawValue: Pointer;
-
-function PdhCalculateCounterFromRawValue;
-begin
- GetProcedureAddress(_PdhCalculateCounterFromRawValue, PdhLib, 'PdhCalculateCounterFromRawValue');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PdhCalculateCounterFromRawValue]
- end;
-end;
-
-var
- _PdhComputeCounterStatistics: Pointer;
-
-function PdhComputeCounterStatistics;
-begin
- GetProcedureAddress(_PdhComputeCounterStatistics, PdhLib, 'PdhComputeCounterStatistics');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PdhComputeCounterStatistics]
- end;
-end;
-
-var
- _PdhGetCounterInfoA: Pointer;
-
-function PdhGetCounterInfoA;
-begin
- GetProcedureAddress(_PdhGetCounterInfoA, PdhLib, 'PdhGetCounterInfoA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PdhGetCounterInfoA]
- end;
-end;
-
-var
- _PdhGetCounterInfoW: Pointer;
-
-function PdhGetCounterInfoW;
-begin
- GetProcedureAddress(_PdhGetCounterInfoW, PdhLib, 'PdhGetCounterInfoW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PdhGetCounterInfoW]
- end;
-end;
-
-var
- _PdhGetCounterInfo: Pointer;
-
-function PdhGetCounterInfo;
-begin
- GetProcedureAddress(_PdhGetCounterInfo, PdhLib, 'PdhGetCounterInfo' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PdhGetCounterInfo]
- end;
-end;
-
-var
- _PdhSetCounterScaleFactor: Pointer;
-
-function PdhSetCounterScaleFactor;
-begin
- GetProcedureAddress(_PdhSetCounterScaleFactor, PdhLib, 'PdhSetCounterScaleFactor');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PdhSetCounterScaleFactor]
- end;
-end;
-
-var
- _PdhConnectMachineA: Pointer;
-
-function PdhConnectMachineA;
-begin
- GetProcedureAddress(_PdhConnectMachineA, PdhLib, 'PdhConnectMachineA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PdhConnectMachineA]
- end;
-end;
-
-var
- _PdhConnectMachineW: Pointer;
-
-function PdhConnectMachineW;
-begin
- GetProcedureAddress(_PdhConnectMachineW, PdhLib, 'PdhConnectMachineW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PdhConnectMachineW]
- end;
-end;
-
-var
- _PdhConnectMachine: Pointer;
-
-function PdhConnectMachine;
-begin
- GetProcedureAddress(_PdhConnectMachine, PdhLib, 'PdhConnectMachine' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PdhConnectMachine]
- end;
-end;
-
-var
- _PdhEnumMachinesA: Pointer;
-
-function PdhEnumMachinesA;
-begin
- GetProcedureAddress(_PdhEnumMachinesA, PdhLib, 'PdhEnumMachinesA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PdhEnumMachinesA]
- end;
-end;
-
-var
- _PdhEnumMachinesW: Pointer;
-
-function PdhEnumMachinesW;
-begin
- GetProcedureAddress(_PdhEnumMachinesW, PdhLib, 'PdhEnumMachinesW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PdhEnumMachinesW]
- end;
-end;
-
-var
- _PdhEnumMachines: Pointer;
-
-function PdhEnumMachines;
-begin
- GetProcedureAddress(_PdhEnumMachines, PdhLib, 'PdhEnumMachines' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PdhEnumMachines]
- end;
-end;
-
-var
- _PdhEnumObjectsA: Pointer;
-
-function PdhEnumObjectsA;
-begin
- GetProcedureAddress(_PdhEnumObjectsA, PdhLib, 'PdhEnumObjectsA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PdhEnumObjectsA]
- end;
-end;
-
-var
- _PdhEnumObjectsW: Pointer;
-
-function PdhEnumObjectsW;
-begin
- GetProcedureAddress(_PdhEnumObjectsW, PdhLib, 'PdhEnumObjectsW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PdhEnumObjectsW]
- end;
-end;
-
-var
- _PdhEnumObjects: Pointer;
-
-function PdhEnumObjects;
-begin
- GetProcedureAddress(_PdhEnumObjects, PdhLib, 'PdhEnumObjects' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PdhEnumObjects]
- end;
-end;
-
-var
- _PdhEnumObjectItemsA: Pointer;
-
-function PdhEnumObjectItemsA;
-begin
- GetProcedureAddress(_PdhEnumObjectItemsA, PdhLib, 'PdhEnumObjectItemsA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PdhEnumObjectItemsA]
- end;
-end;
-
-var
- _PdhEnumObjectItemsW: Pointer;
-
-function PdhEnumObjectItemsW;
-begin
- GetProcedureAddress(_PdhEnumObjectItemsW, PdhLib, 'PdhEnumObjectItemsW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PdhEnumObjectItemsW]
- end;
-end;
-
-var
- _PdhEnumObjectItems: Pointer;
-
-function PdhEnumObjectItems;
-begin
- GetProcedureAddress(_PdhEnumObjectItems, PdhLib, 'PdhEnumObjectItems' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PdhEnumObjectItems]
- end;
-end;
-
-var
- _PdhMakeCounterPathA: Pointer;
-
-function PdhMakeCounterPathA;
-begin
- GetProcedureAddress(_PdhMakeCounterPathA, PdhLib, 'PdhMakeCounterPathA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PdhMakeCounterPathA]
- end;
-end;
-
-var
- _PdhMakeCounterPathW: Pointer;
-
-function PdhMakeCounterPathW;
-begin
- GetProcedureAddress(_PdhMakeCounterPathW, PdhLib, 'PdhMakeCounterPathW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PdhMakeCounterPathW]
- end;
-end;
-
-var
- _PdhMakeCounterPath: Pointer;
-
-function PdhMakeCounterPath;
-begin
- GetProcedureAddress(_PdhMakeCounterPath, PdhLib, 'PdhMakeCounterPath' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PdhMakeCounterPath]
- end;
-end;
-
-var
- _PdhParseCounterPathA: Pointer;
-
-function PdhParseCounterPathA;
-begin
- GetProcedureAddress(_PdhParseCounterPathA, PdhLib, 'PdhParseCounterPathA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PdhParseCounterPathA]
- end;
-end;
-
-var
- _PdhParseCounterPathW: Pointer;
-
-function PdhParseCounterPathW;
-begin
- GetProcedureAddress(_PdhParseCounterPathW, PdhLib, 'PdhParseCounterPathW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PdhParseCounterPathW]
- end;
-end;
-
-var
- _PdhParseCounterPath: Pointer;
-
-function PdhParseCounterPath;
-begin
- GetProcedureAddress(_PdhParseCounterPath, PdhLib, 'PdhParseCounterPath' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PdhParseCounterPath]
- end;
-end;
-
-var
- _PdhParseInstanceNameA: Pointer;
-
-function PdhParseInstanceNameA;
-begin
- GetProcedureAddress(_PdhParseInstanceNameA, PdhLib, 'PdhParseInstanceNameA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PdhParseInstanceNameA]
- end;
-end;
-
-var
- _PdhParseInstanceNameW: Pointer;
-
-function PdhParseInstanceNameW;
-begin
- GetProcedureAddress(_PdhParseInstanceNameW, PdhLib, 'PdhParseInstanceNameW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PdhParseInstanceNameW]
- end;
-end;
-
-var
- _PdhParseInstanceName: Pointer;
-
-function PdhParseInstanceName;
-begin
- GetProcedureAddress(_PdhParseInstanceName, PdhLib, 'PdhParseInstanceName' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PdhParseInstanceName]
- end;
-end;
-
-var
- _PdhValidatePathA: Pointer;
-
-function PdhValidatePathA;
-begin
- GetProcedureAddress(_PdhValidatePathA, PdhLib, 'PdhValidatePathA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PdhValidatePathA]
- end;
-end;
-
-var
- _PdhValidatePathW: Pointer;
-
-function PdhValidatePathW;
-begin
- GetProcedureAddress(_PdhValidatePathW, PdhLib, 'PdhValidatePathW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PdhValidatePathW]
- end;
-end;
-
-var
- _PdhValidatePath: Pointer;
-
-function PdhValidatePath;
-begin
- GetProcedureAddress(_PdhValidatePath, PdhLib, 'PdhValidatePath' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PdhValidatePath]
- end;
-end;
-
-var
- _PdhGetDefaultPerfObjectA: Pointer;
-
-function PdhGetDefaultPerfObjectA;
-begin
- GetProcedureAddress(_PdhGetDefaultPerfObjectA, PdhLib, 'PdhGetDefaultPerfObjectA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PdhGetDefaultPerfObjectA]
- end;
-end;
-
-var
- _PdhGetDefaultPerfObjectW: Pointer;
-
-function PdhGetDefaultPerfObjectW;
-begin
- GetProcedureAddress(_PdhGetDefaultPerfObjectW, PdhLib, 'PdhGetDefaultPerfObjectW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PdhGetDefaultPerfObjectW]
- end;
-end;
-
-var
- _PdhGetDefaultPerfObject: Pointer;
-
-function PdhGetDefaultPerfObject;
-begin
- GetProcedureAddress(_PdhGetDefaultPerfObject, PdhLib, 'PdhGetDefaultPerfObject' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PdhGetDefaultPerfObject]
- end;
-end;
-
-var
- _PdhGetDefaultPerfCounterA: Pointer;
-
-function PdhGetDefaultPerfCounterA;
-begin
- GetProcedureAddress(_PdhGetDefaultPerfCounterA, PdhLib, 'PdhGetDefaultPerfCounterA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PdhGetDefaultPerfCounterA]
- end;
-end;
-
-var
- _PdhGetDefaultPerfCounterW: Pointer;
-
-function PdhGetDefaultPerfCounterW;
-begin
- GetProcedureAddress(_PdhGetDefaultPerfCounterW, PdhLib, 'PdhGetDefaultPerfCounterW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PdhGetDefaultPerfCounterW]
- end;
-end;
-
-var
- _PdhGetDefaultPerfCounter: Pointer;
-
-function PdhGetDefaultPerfCounter;
-begin
- GetProcedureAddress(_PdhGetDefaultPerfCounter, PdhLib, 'PdhGetDefaultPerfCounter' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PdhGetDefaultPerfCounter]
- end;
-end;
-
-var
- _PdhBrowseCountersA: Pointer;
-
-function PdhBrowseCountersA;
-begin
- GetProcedureAddress(_PdhBrowseCountersA, PdhLib, 'PdhBrowseCountersA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PdhBrowseCountersA]
- end;
-end;
-
-var
- _PdhBrowseCountersW: Pointer;
-
-function PdhBrowseCountersW;
-begin
- GetProcedureAddress(_PdhBrowseCountersW, PdhLib, 'PdhBrowseCountersW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PdhBrowseCountersW]
- end;
-end;
-
-var
- _PdhBrowseCounters: Pointer;
-
-function PdhBrowseCounters;
-begin
- GetProcedureAddress(_PdhBrowseCounters, PdhLib, 'PdhBrowseCounters' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PdhBrowseCounters]
- end;
-end;
-
-var
- _PdhExpandCounterPathA: Pointer;
-
-function PdhExpandCounterPathA;
-begin
- GetProcedureAddress(_PdhExpandCounterPathA, PdhLib, 'PdhExpandCounterPathA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PdhExpandCounterPathA]
- end;
-end;
-
-var
- _PdhExpandCounterPathW: Pointer;
-
-function PdhExpandCounterPathW;
-begin
- GetProcedureAddress(_PdhExpandCounterPathW, PdhLib, 'PdhExpandCounterPathW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PdhExpandCounterPathW]
- end;
-end;
-
-var
- _PdhExpandCounterPath: Pointer;
-
-function PdhExpandCounterPath;
-begin
- GetProcedureAddress(_PdhExpandCounterPath, PdhLib, 'PdhExpandCounterPath' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PdhExpandCounterPath]
- end;
-end;
-
-var
- _PdhLookupPerfNameByIndexA: Pointer;
-
-function PdhLookupPerfNameByIndexA;
-begin
- GetProcedureAddress(_PdhLookupPerfNameByIndexA, PdhLib, 'PdhLookupPerfNameByIndexA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PdhLookupPerfNameByIndexA]
- end;
-end;
-
-var
- _PdhLookupPerfNameByIndexW: Pointer;
-
-function PdhLookupPerfNameByIndexW;
-begin
- GetProcedureAddress(_PdhLookupPerfNameByIndexW, PdhLib, 'PdhLookupPerfNameByIndexW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PdhLookupPerfNameByIndexW]
- end;
-end;
-
-var
- _PdhLookupPerfNameByIndex: Pointer;
-
-function PdhLookupPerfNameByIndex;
-begin
- GetProcedureAddress(_PdhLookupPerfNameByIndex, PdhLib, 'PdhLookupPerfNameByIndex' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PdhLookupPerfNameByIndex]
- end;
-end;
-
-var
- _PdhLookupPerfIndexByNameA: Pointer;
-
-function PdhLookupPerfIndexByNameA;
-begin
- GetProcedureAddress(_PdhLookupPerfIndexByNameA, PdhLib, 'PdhLookupPerfIndexByNameA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PdhLookupPerfIndexByNameA]
- end;
-end;
-
-var
- _PdhLookupPerfIndexByNameW: Pointer;
-
-function PdhLookupPerfIndexByNameW;
-begin
- GetProcedureAddress(_PdhLookupPerfIndexByNameW, PdhLib, 'PdhLookupPerfIndexByNameW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PdhLookupPerfIndexByNameW]
- end;
-end;
-
-var
- _PdhLookupPerfIndexByName: Pointer;
-
-function PdhLookupPerfIndexByName;
-begin
- GetProcedureAddress(_PdhLookupPerfIndexByName, PdhLib, 'PdhLookupPerfIndexByName' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PdhLookupPerfIndexByName]
- end;
-end;
-
-var
- _PdhExpandWildCardPathA: Pointer;
-
-function PdhExpandWildCardPathA;
-begin
- GetProcedureAddress(_PdhExpandWildCardPathA, PdhLib, 'PdhExpandWildCardPathA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PdhExpandWildCardPathA]
- end;
-end;
-
-var
- _PdhExpandWildCardPathW: Pointer;
-
-function PdhExpandWildCardPathW;
-begin
- GetProcedureAddress(_PdhExpandWildCardPathW, PdhLib, 'PdhExpandWildCardPathW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PdhExpandWildCardPathW]
- end;
-end;
-
-var
- _PdhExpandWildCardPath: Pointer;
-
-function PdhExpandWildCardPath;
-begin
- GetProcedureAddress(_PdhExpandWildCardPath, PdhLib, 'PdhExpandWildCardPath' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PdhExpandWildCardPath]
- end;
-end;
-
-var
- _PdhOpenLogA: Pointer;
-
-function PdhOpenLogA;
-begin
- GetProcedureAddress(_PdhOpenLogA, PdhLib, 'PdhOpenLogA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PdhOpenLogA]
- end;
-end;
-
-var
- _PdhOpenLogW: Pointer;
-
-function PdhOpenLogW;
-begin
- GetProcedureAddress(_PdhOpenLogW, PdhLib, 'PdhOpenLogW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PdhOpenLogW]
- end;
-end;
-
-var
- _PdhOpenLog: Pointer;
-
-function PdhOpenLog;
-begin
- GetProcedureAddress(_PdhOpenLog, PdhLib, 'PdhOpenLog' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PdhOpenLog]
- end;
-end;
-
-var
- _PdhUpdateLogA: Pointer;
-
-function PdhUpdateLogA;
-begin
- GetProcedureAddress(_PdhUpdateLogA, PdhLib, 'PdhUpdateLogA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PdhUpdateLogA]
- end;
-end;
-
-var
- _PdhUpdateLogW: Pointer;
-
-function PdhUpdateLogW;
-begin
- GetProcedureAddress(_PdhUpdateLogW, PdhLib, 'PdhUpdateLogW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PdhUpdateLogW]
- end;
-end;
-
-var
- _PdhUpdateLog: Pointer;
-
-function PdhUpdateLog;
-begin
- GetProcedureAddress(_PdhUpdateLog, PdhLib, 'PdhUpdateLog' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PdhUpdateLog]
- end;
-end;
-
-var
- _PdhUpdateLogFileCatalog: Pointer;
-
-function PdhUpdateLogFileCatalog;
-begin
- GetProcedureAddress(_PdhUpdateLogFileCatalog, PdhLib, 'PdhUpdateLogFileCatalog');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PdhUpdateLogFileCatalog]
- end;
-end;
-
-var
- _PdhGetLogFileSize: Pointer;
-
-function PdhGetLogFileSize;
-begin
- GetProcedureAddress(_PdhGetLogFileSize, PdhLib, 'PdhGetLogFileSize');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PdhGetLogFileSize]
- end;
-end;
-
-var
- _PdhCloseLog: Pointer;
-
-function PdhCloseLog;
-begin
- GetProcedureAddress(_PdhCloseLog, PdhLib, 'PdhCloseLog');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PdhCloseLog]
- end;
-end;
-
-var
- _PdhSelectDataSourceA: Pointer;
-
-function PdhSelectDataSourceA;
-begin
- GetProcedureAddress(_PdhSelectDataSourceA, PdhLib, 'PdhSelectDataSourceA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PdhSelectDataSourceA]
- end;
-end;
-
-var
- _PdhSelectDataSourceW: Pointer;
-
-function PdhSelectDataSourceW;
-begin
- GetProcedureAddress(_PdhSelectDataSourceW, PdhLib, 'PdhSelectDataSourceW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PdhSelectDataSourceW]
- end;
-end;
-
-var
- _PdhSelectDataSource: Pointer;
-
-function PdhSelectDataSource;
-begin
- GetProcedureAddress(_PdhSelectDataSource, PdhLib, 'PdhSelectDataSource' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PdhSelectDataSource]
- end;
-end;
-
-var
- _PdhIsRealTimeQuery: Pointer;
-
-function PdhIsRealTimeQuery;
-begin
- GetProcedureAddress(_PdhIsRealTimeQuery, PdhLib, 'PdhIsRealTimeQuery');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PdhIsRealTimeQuery]
- end;
-end;
-
-var
- _PdhSetQueryTimeRange: Pointer;
-
-function PdhSetQueryTimeRange;
-begin
- GetProcedureAddress(_PdhSetQueryTimeRange, PdhLib, 'PdhSetQueryTimeRange');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PdhSetQueryTimeRange]
- end;
-end;
-
-var
- _PdhGetDataSourceTimeRangeA: Pointer;
-
-function PdhGetDataSourceTimeRangeA;
-begin
- GetProcedureAddress(_PdhGetDataSourceTimeRangeA, PdhLib, 'PdhGetDataSourceTimeRangeA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PdhGetDataSourceTimeRangeA]
- end;
-end;
-
-var
- _PdhGetDataSourceTimeRangeW: Pointer;
-
-function PdhGetDataSourceTimeRangeW;
-begin
- GetProcedureAddress(_PdhGetDataSourceTimeRangeW, PdhLib, 'PdhGetDataSourceTimeRangeW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PdhGetDataSourceTimeRangeW]
- end;
-end;
-
-var
- _PdhGetDataSourceTimeRange: Pointer;
-
-function PdhGetDataSourceTimeRange;
-begin
- GetProcedureAddress(_PdhGetDataSourceTimeRange, PdhLib, 'PdhGetDataSourceTimeRange' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PdhGetDataSourceTimeRange]
- end;
-end;
-
-var
- _PdhCollectQueryDataEx: Pointer;
-
-function PdhCollectQueryDataEx;
-begin
- GetProcedureAddress(_PdhCollectQueryDataEx, PdhLib, 'PdhCollectQueryDataEx');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PdhCollectQueryDataEx]
- end;
-end;
-
-var
- _PdhFormatFromRawValue: Pointer;
-
-function PdhFormatFromRawValue;
-begin
- GetProcedureAddress(_PdhFormatFromRawValue, PdhLib, 'PdhFormatFromRawValue');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PdhFormatFromRawValue]
- end;
-end;
-
-var
- _PdhGetCounterTimeBase: Pointer;
-
-function PdhGetCounterTimeBase;
-begin
- GetProcedureAddress(_PdhGetCounterTimeBase, PdhLib, 'PdhGetCounterTimeBase');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PdhGetCounterTimeBase]
- end;
-end;
-
-var
- _PdhReadRawLogRecord: Pointer;
-
-function PdhReadRawLogRecord;
-begin
- GetProcedureAddress(_PdhReadRawLogRecord, PdhLib, 'PdhReadRawLogRecord');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PdhReadRawLogRecord]
- end;
-end;
-
-var
- _PdhSetDefaultRealTimeDataSource: Pointer;
-
-function PdhSetDefaultRealTimeDataSource;
-begin
- GetProcedureAddress(_PdhSetDefaultRealTimeDataSource, PdhLib, 'PdhSetDefaultRealTimeDataSource');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PdhSetDefaultRealTimeDataSource]
- end;
-end;
-
-var
- _PdhBindInputDataSourceW: Pointer;
-
-function PdhBindInputDataSourceW;
-begin
- GetProcedureAddress(_PdhBindInputDataSourceW, PdhLib, 'PdhBindInputDataSourceW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PdhBindInputDataSourceW]
- end;
-end;
-
-var
- _PdhBindInputDataSourceA: Pointer;
-
-function PdhBindInputDataSourceA;
-begin
- GetProcedureAddress(_PdhBindInputDataSourceA, PdhLib, 'PdhBindInputDataSourceA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PdhBindInputDataSourceA]
- end;
-end;
-
-var
- _PdhBindInputDataSource: Pointer;
-
-function PdhBindInputDataSource;
-begin
- GetProcedureAddress(_PdhBindInputDataSource, PdhLib, 'PdhBindInputDataSource' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PdhBindInputDataSource]
- end;
-end;
-
-var
- _PdhOpenQueryH: Pointer;
-
-function PdhOpenQueryH;
-begin
- GetProcedureAddress(_PdhOpenQueryH, PdhLib, 'PdhOpenQueryH');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PdhOpenQueryH]
- end;
-end;
-
-var
- _PdhEnumMachinesHW: Pointer;
-
-function PdhEnumMachinesHW;
-begin
- GetProcedureAddress(_PdhEnumMachinesHW, PdhLib, 'PdhEnumMachinesHW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PdhEnumMachinesHW]
- end;
-end;
-
-var
- _PdhEnumMachinesHA: Pointer;
-
-function PdhEnumMachinesHA;
-begin
- GetProcedureAddress(_PdhEnumMachinesHA, PdhLib, 'PdhEnumMachinesHA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PdhEnumMachinesHA]
- end;
-end;
-
-var
- _PdhEnumMachinesH: Pointer;
-
-function PdhEnumMachinesH;
-begin
- GetProcedureAddress(_PdhEnumMachinesH, PdhLib, 'PdhEnumMachinesH' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PdhEnumMachinesH]
- end;
-end;
-
-var
- _PdhEnumObjectsHW: Pointer;
-
-function PdhEnumObjectsHW;
-begin
- GetProcedureAddress(_PdhEnumObjectsHW, PdhLib, 'PdhEnumObjectsHW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PdhEnumObjectsHW]
- end;
-end;
-
-var
- _PdhEnumObjectsHA: Pointer;
-
-function PdhEnumObjectsHA;
-begin
- GetProcedureAddress(_PdhEnumObjectsHA, PdhLib, 'PdhEnumObjectsHA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PdhEnumObjectsHA]
- end;
-end;
-
-var
- _PdhEnumObjectsH: Pointer;
-
-function PdhEnumObjectsH;
-begin
- GetProcedureAddress(_PdhEnumObjectsH, PdhLib, 'PdhEnumObjectsH' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PdhEnumObjectsH]
- end;
-end;
-
-var
- _PdhEnumObjectItemsHW: Pointer;
-
-function PdhEnumObjectItemsHW;
-begin
- GetProcedureAddress(_PdhEnumObjectItemsHW, PdhLib, 'PdhEnumObjectItemsHW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PdhEnumObjectItemsHW]
- end;
-end;
-
-var
- _PdhEnumObjectItemsHA: Pointer;
-
-function PdhEnumObjectItemsHA;
-begin
- GetProcedureAddress(_PdhEnumObjectItemsHA, PdhLib, 'PdhEnumObjectItemsHA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PdhEnumObjectItemsHA]
- end;
-end;
-
-var
- _PdhEnumObjectItemsH: Pointer;
-
-function PdhEnumObjectItemsH;
-begin
- GetProcedureAddress(_PdhEnumObjectItemsH, PdhLib, 'PdhEnumObjectItemsH' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PdhEnumObjectItemsH]
- end;
-end;
-
-var
- _PdhExpandWildCardPathHW: Pointer;
-
-function PdhExpandWildCardPathHW;
-begin
- GetProcedureAddress(_PdhExpandWildCardPathHW, PdhLib, 'PdhExpandWildCardPathHW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PdhExpandWildCardPathHW]
- end;
-end;
-
-var
- _PdhExpandWildCardPathHA: Pointer;
-
-function PdhExpandWildCardPathHA;
-begin
- GetProcedureAddress(_PdhExpandWildCardPathHA, PdhLib, 'PdhExpandWildCardPathHA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PdhExpandWildCardPathHA]
- end;
-end;
-
-var
- _PdhExpandWildCardPathH: Pointer;
-
-function PdhExpandWildCardPathH;
-begin
- GetProcedureAddress(_PdhExpandWildCardPathH, PdhLib, 'PdhExpandWildCardPathH' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PdhExpandWildCardPathH]
- end;
-end;
-
-var
- _PdhGetDataSourceTimeRangeH: Pointer;
-
-function PdhGetDataSourceTimeRangeH;
-begin
- GetProcedureAddress(_PdhGetDataSourceTimeRangeH, PdhLib, 'PdhGetDataSourceTimeRangeH');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PdhGetDataSourceTimeRangeH]
- end;
-end;
-
-var
- _PdhGetDefaultPerfObjectHW: Pointer;
-
-function PdhGetDefaultPerfObjectHW;
-begin
- GetProcedureAddress(_PdhGetDefaultPerfObjectHW, PdhLib, 'PdhGetDefaultPerfObjectHW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PdhGetDefaultPerfObjectHW]
- end;
-end;
-
-var
- _PdhGetDefaultPerfObjectHA: Pointer;
-
-function PdhGetDefaultPerfObjectHA;
-begin
- GetProcedureAddress(_PdhGetDefaultPerfObjectHA, PdhLib, 'PdhGetDefaultPerfObjectHA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PdhGetDefaultPerfObjectHA]
- end;
-end;
-
-var
- _PdhGetDefaultPerfObjectH: Pointer;
-
-function PdhGetDefaultPerfObjectH;
-begin
- GetProcedureAddress(_PdhGetDefaultPerfObjectH, PdhLib, 'PdhGetDefaultPerfObjectH' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PdhGetDefaultPerfObjectH]
- end;
-end;
-
-var
- _PdhGetDefaultPerfCounterHW: Pointer;
-
-function PdhGetDefaultPerfCounterHW;
-begin
- GetProcedureAddress(_PdhGetDefaultPerfCounterHW, PdhLib, 'PdhGetDefaultPerfCounterHW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PdhGetDefaultPerfCounterHW]
- end;
-end;
-
-var
- _PdhGetDefaultPerfCounterHA: Pointer;
-
-function PdhGetDefaultPerfCounterHA;
-begin
- GetProcedureAddress(_PdhGetDefaultPerfCounterHA, PdhLib, 'PdhGetDefaultPerfCounterHA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PdhGetDefaultPerfCounterHA]
- end;
-end;
-
-var
- _PdhGetDefaultPerfCounterH: Pointer;
-
-function PdhGetDefaultPerfCounterH;
-begin
- GetProcedureAddress(_PdhGetDefaultPerfCounterH, PdhLib, 'PdhGetDefaultPerfCounterH' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PdhGetDefaultPerfCounterH]
- end;
-end;
-
-var
- _PdhBrowseCountersHW: Pointer;
-
-function PdhBrowseCountersHW;
-begin
- GetProcedureAddress(_PdhBrowseCountersHW, PdhLib, 'PdhBrowseCountersHW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PdhBrowseCountersHW]
- end;
-end;
-
-var
- _PdhBrowseCountersHA: Pointer;
-
-function PdhBrowseCountersHA;
-begin
- GetProcedureAddress(_PdhBrowseCountersHA, PdhLib, 'PdhBrowseCountersHA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PdhBrowseCountersHA]
- end;
-end;
-
-var
- _PdhBrowseCountersH: Pointer;
-
-function PdhBrowseCountersH;
-begin
- GetProcedureAddress(_PdhBrowseCountersH, PdhLib, 'PdhBrowseCountersH' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PdhBrowseCountersH]
- end;
-end;
-
-var
- _PdhVerifySQLDBW: Pointer;
-
-function PdhVerifySQLDBW;
-begin
- GetProcedureAddress(_PdhVerifySQLDBW, PdhLib, 'PdhVerifySQLDBW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PdhVerifySQLDBW]
- end;
-end;
-
-var
- _PdhVerifySQLDBA: Pointer;
-
-function PdhVerifySQLDBA;
-begin
- GetProcedureAddress(_PdhVerifySQLDBA, PdhLib, 'PdhVerifySQLDBA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PdhVerifySQLDBA]
- end;
-end;
-
-var
- _PdhVerifySQLDB: Pointer;
-
-function PdhVerifySQLDB;
-begin
- GetProcedureAddress(_PdhVerifySQLDB, PdhLib, 'PdhVerifySQLDB' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PdhVerifySQLDB]
- end;
-end;
-
-var
- _PdhCreateSQLTablesW: Pointer;
-
-function PdhCreateSQLTablesW;
-begin
- GetProcedureAddress(_PdhCreateSQLTablesW, PdhLib, 'PdhCreateSQLTablesW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PdhCreateSQLTablesW]
- end;
-end;
-
-var
- _PdhCreateSQLTablesA: Pointer;
-
-function PdhCreateSQLTablesA;
-begin
- GetProcedureAddress(_PdhCreateSQLTablesA, PdhLib, 'PdhCreateSQLTablesA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PdhCreateSQLTablesA]
- end;
-end;
-
-var
- _PdhCreateSQLTables: Pointer;
-
-function PdhCreateSQLTables;
-begin
- GetProcedureAddress(_PdhCreateSQLTables, PdhLib, 'PdhCreateSQLTables' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PdhCreateSQLTables]
- end;
-end;
-
-var
- _PdhEnumLogSetNamesW: Pointer;
-
-function PdhEnumLogSetNamesW;
-begin
- GetProcedureAddress(_PdhEnumLogSetNamesW, PdhLib, 'PdhEnumLogSetNamesW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PdhEnumLogSetNamesW]
- end;
-end;
-
-var
- _PdhEnumLogSetNamesA: Pointer;
-
-function PdhEnumLogSetNamesA;
-begin
- GetProcedureAddress(_PdhEnumLogSetNamesA, PdhLib, 'PdhEnumLogSetNamesA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PdhEnumLogSetNamesA]
- end;
-end;
-
-var
- _PdhEnumLogSetNames: Pointer;
-
-function PdhEnumLogSetNames;
-begin
- GetProcedureAddress(_PdhEnumLogSetNames, PdhLib, 'PdhEnumLogSetNames' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PdhEnumLogSetNames]
- end;
-end;
-
-var
- _PdhGetLogSetGUID: Pointer;
-
-function PdhGetLogSetGUID;
-begin
- GetProcedureAddress(_PdhGetLogSetGUID, PdhLib, 'PdhGetLogSetGUID');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PdhGetLogSetGUID]
- end;
-end;
-
-var
- _PdhSetLogSetRunID: Pointer;
-
-function PdhSetLogSetRunID;
-begin
- GetProcedureAddress(_PdhSetLogSetRunID, PdhLib, 'PdhSetLogSetRunID');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PdhSetLogSetRunID]
- end;
-end;
-
-{$ELSE}
-
-function PdhGetDllVersion; external PdhLib name 'PdhGetDllVersion';
-function PdhOpenQueryA; external PdhLib name 'PdhOpenQueryA';
-function PdhOpenQueryW; external PdhLib name 'PdhOpenQueryW';
-function PdhOpenQuery; external PdhLib name 'PdhOpenQuery' + AWSuffix;
-function PdhAddCounterA; external PdhLib name 'PdhAddCounterA';
-function PdhAddCounterW; external PdhLib name 'PdhAddCounterW';
-function PdhAddCounter; external PdhLib name 'PdhAddCounter' + AWSuffix;
-function PdhRemoveCounter; external PdhLib name 'PdhRemoveCounter';
-function PdhCollectQueryData; external PdhLib name 'PdhCollectQueryData';
-function PdhCloseQuery; external PdhLib name 'PdhCloseQuery';
-function PdhGetFormattedCounterValue; external PdhLib name 'PdhGetFormattedCounterValue';
-function PdhGetFormattedCounterArrayA; external PdhLib name 'PdhGetFormattedCounterArrayA';
-function PdhGetFormattedCounterArrayW; external PdhLib name 'PdhGetFormattedCounterArrayW';
-function PdhGetFormattedCounterArray; external PdhLib name 'PdhGetFormattedCounterArray' + AWSuffix;
-function PdhGetRawCounterValue; external PdhLib name 'PdhGetRawCounterValue';
-function PdhGetRawCounterArrayA; external PdhLib name 'PdhGetRawCounterArrayA';
-function PdhGetRawCounterArrayW; external PdhLib name 'PdhGetRawCounterArrayW';
-function PdhGetRawCounterArray; external PdhLib name 'PdhGetRawCounterArray' + AWSuffix;
-function PdhCalculateCounterFromRawValue; external PdhLib name 'PdhCalculateCounterFromRawValue';
-function PdhComputeCounterStatistics; external PdhLib name 'PdhComputeCounterStatistics';
-function PdhGetCounterInfoA; external PdhLib name 'PdhGetCounterInfoA';
-function PdhGetCounterInfoW; external PdhLib name 'PdhGetCounterInfoW';
-function PdhGetCounterInfo; external PdhLib name 'PdhGetCounterInfo' + AWSuffix;
-function PdhSetCounterScaleFactor; external PdhLib name 'PdhSetCounterScaleFactor';
-function PdhConnectMachineA; external PdhLib name 'PdhConnectMachineA';
-function PdhConnectMachineW; external PdhLib name 'PdhConnectMachineW';
-function PdhConnectMachine; external PdhLib name 'PdhConnectMachine' + AWSuffix;
-function PdhEnumMachinesA; external PdhLib name 'PdhEnumMachinesA';
-function PdhEnumMachinesW; external PdhLib name 'PdhEnumMachinesW';
-function PdhEnumMachines; external PdhLib name 'PdhEnumMachines' + AWSuffix;
-function PdhEnumObjectsA; external PdhLib name 'PdhEnumObjectsA';
-function PdhEnumObjectsW; external PdhLib name 'PdhEnumObjectsW';
-function PdhEnumObjects; external PdhLib name 'PdhEnumObjects' + AWSuffix;
-function PdhEnumObjectItemsA; external PdhLib name 'PdhEnumObjectItemsA';
-function PdhEnumObjectItemsW; external PdhLib name 'PdhEnumObjectItemsW';
-function PdhEnumObjectItems; external PdhLib name 'PdhEnumObjectItems' + AWSuffix;
-function PdhMakeCounterPathA; external PdhLib name 'PdhMakeCounterPathA';
-function PdhMakeCounterPathW; external PdhLib name 'PdhMakeCounterPathW';
-function PdhMakeCounterPath; external PdhLib name 'PdhMakeCounterPath' + AWSuffix;
-function PdhParseCounterPathA; external PdhLib name 'PdhParseCounterPathA';
-function PdhParseCounterPathW; external PdhLib name 'PdhParseCounterPathW';
-function PdhParseCounterPath; external PdhLib name 'PdhParseCounterPath' + AWSuffix;
-function PdhParseInstanceNameA; external PdhLib name 'PdhParseInstanceNameA';
-function PdhParseInstanceNameW; external PdhLib name 'PdhParseInstanceNameW';
-function PdhParseInstanceName; external PdhLib name 'PdhParseInstanceName' + AWSuffix;
-function PdhValidatePathA; external PdhLib name 'PdhValidatePathA';
-function PdhValidatePathW; external PdhLib name 'PdhValidatePathW';
-function PdhValidatePath; external PdhLib name 'PdhValidatePath' + AWSuffix;
-function PdhGetDefaultPerfObjectA; external PdhLib name 'PdhGetDefaultPerfObjectA';
-function PdhGetDefaultPerfObjectW; external PdhLib name 'PdhGetDefaultPerfObjectW';
-function PdhGetDefaultPerfObject; external PdhLib name 'PdhGetDefaultPerfObject' + AWSuffix;
-function PdhGetDefaultPerfCounterA; external PdhLib name 'PdhGetDefaultPerfCounterA';
-function PdhGetDefaultPerfCounterW; external PdhLib name 'PdhGetDefaultPerfCounterW';
-function PdhGetDefaultPerfCounter; external PdhLib name 'PdhGetDefaultPerfCounter' + AWSuffix;
-function PdhBrowseCountersA; external PdhLib name 'PdhBrowseCountersA';
-function PdhBrowseCountersW; external PdhLib name 'PdhBrowseCountersW';
-function PdhBrowseCounters; external PdhLib name 'PdhBrowseCounters' + AWSuffix;
-function PdhExpandCounterPathA; external PdhLib name 'PdhExpandCounterPathA';
-function PdhExpandCounterPathW; external PdhLib name 'PdhExpandCounterPathW';
-function PdhExpandCounterPath; external PdhLib name 'PdhExpandCounterPath' + AWSuffix;
-function PdhLookupPerfNameByIndexA; external PdhLib name 'PdhLookupPerfNameByIndexA';
-function PdhLookupPerfNameByIndexW; external PdhLib name 'PdhLookupPerfNameByIndexW';
-function PdhLookupPerfNameByIndex; external PdhLib name 'PdhLookupPerfNameByIndex' + AWSuffix;
-function PdhLookupPerfIndexByNameA; external PdhLib name 'PdhLookupPerfIndexByNameA';
-function PdhLookupPerfIndexByNameW; external PdhLib name 'PdhLookupPerfIndexByNameW';
-function PdhLookupPerfIndexByName; external PdhLib name 'PdhLookupPerfIndexByName' + AWSuffix;
-function PdhExpandWildCardPathA; external PdhLib name 'PdhExpandWildCardPathA';
-function PdhExpandWildCardPathW; external PdhLib name 'PdhExpandWildCardPathW';
-function PdhExpandWildCardPath; external PdhLib name 'PdhExpandWildCardPath' + AWSuffix;
-function PdhOpenLogA; external PdhLib name 'PdhOpenLogA';
-function PdhOpenLogW; external PdhLib name 'PdhOpenLogW';
-function PdhOpenLog; external PdhLib name 'PdhOpenLog' + AWSuffix;
-function PdhUpdateLogA; external PdhLib name 'PdhUpdateLogA';
-function PdhUpdateLogW; external PdhLib name 'PdhUpdateLogW';
-function PdhUpdateLog; external PdhLib name 'PdhUpdateLog' + AWSuffix;
-function PdhUpdateLogFileCatalog; external PdhLib name 'PdhUpdateLogFileCatalog';
-function PdhGetLogFileSize; external PdhLib name 'PdhGetLogFileSize';
-function PdhCloseLog; external PdhLib name 'PdhCloseLog';
-function PdhSelectDataSourceA; external PdhLib name 'PdhSelectDataSourceA';
-function PdhSelectDataSourceW; external PdhLib name 'PdhSelectDataSourceW';
-function PdhSelectDataSource; external PdhLib name 'PdhSelectDataSource' + AWSuffix;
-function PdhIsRealTimeQuery; external PdhLib name 'PdhIsRealTimeQuery';
-function PdhSetQueryTimeRange; external PdhLib name 'PdhSetQueryTimeRange';
-function PdhGetDataSourceTimeRangeA; external PdhLib name 'PdhGetDataSourceTimeRangeA';
-function PdhGetDataSourceTimeRangeW; external PdhLib name 'PdhGetDataSourceTimeRangeW';
-function PdhGetDataSourceTimeRange; external PdhLib name 'PdhGetDataSourceTimeRange' + AWSuffix;
-function PdhCollectQueryDataEx; external PdhLib name 'PdhCollectQueryDataEx';
-function PdhFormatFromRawValue; external PdhLib name 'PdhFormatFromRawValue';
-function PdhGetCounterTimeBase; external PdhLib name 'PdhGetCounterTimeBase';
-function PdhReadRawLogRecord; external PdhLib name 'PdhReadRawLogRecord';
-function PdhSetDefaultRealTimeDataSource; external PdhLib name 'PdhSetDefaultRealTimeDataSource';
-function PdhBindInputDataSourceW; external PdhLib name 'PdhBindInputDataSourceW';
-function PdhBindInputDataSourceA; external PdhLib name 'PdhBindInputDataSourceA';
-function PdhBindInputDataSource; external PdhLib name 'PdhBindInputDataSource' + AWSuffix;
-function PdhOpenQueryH; external PdhLib name 'PdhOpenQueryH';
-function PdhEnumMachinesHW; external PdhLib name 'PdhEnumMachinesHW';
-function PdhEnumMachinesHA; external PdhLib name 'PdhEnumMachinesHA';
-function PdhEnumMachinesH; external PdhLib name 'PdhEnumMachinesH' + AWSuffix;
-function PdhEnumObjectsHW; external PdhLib name 'PdhEnumObjectsHW';
-function PdhEnumObjectsHA; external PdhLib name 'PdhEnumObjectsHA';
-function PdhEnumObjectsH; external PdhLib name 'PdhEnumObjectsH' + AWSuffix;
-function PdhEnumObjectItemsHW; external PdhLib name 'PdhEnumObjectItemsHW';
-function PdhEnumObjectItemsHA; external PdhLib name 'PdhEnumObjectItemsHA';
-function PdhEnumObjectItemsH; external PdhLib name 'PdhEnumObjectItemsH' + AWSuffix;
-function PdhExpandWildCardPathHW; external PdhLib name 'PdhExpandWildCardPathHW';
-function PdhExpandWildCardPathHA; external PdhLib name 'PdhExpandWildCardPathHA';
-function PdhExpandWildCardPathH; external PdhLib name 'PdhExpandWildCardPathH' + AWSuffix;
-function PdhGetDataSourceTimeRangeH; external PdhLib name 'PdhGetDataSourceTimeRangeH';
-function PdhGetDefaultPerfObjectHW; external PdhLib name 'PdhGetDefaultPerfObjectHW';
-function PdhGetDefaultPerfObjectHA; external PdhLib name 'PdhGetDefaultPerfObjectHA';
-function PdhGetDefaultPerfObjectH; external PdhLib name 'PdhGetDefaultPerfObjectH' + AWSuffix;
-function PdhGetDefaultPerfCounterHW; external PdhLib name 'PdhGetDefaultPerfCounterHW';
-function PdhGetDefaultPerfCounterHA; external PdhLib name 'PdhGetDefaultPerfCounterHA';
-function PdhGetDefaultPerfCounterH; external PdhLib name 'PdhGetDefaultPerfCounterH' + AWSuffix;
-function PdhBrowseCountersHW; external PdhLib name 'PdhBrowseCountersHW';
-function PdhBrowseCountersHA; external PdhLib name 'PdhBrowseCountersHA';
-function PdhBrowseCountersH; external PdhLib name 'PdhBrowseCountersH' + AWSuffix;
-function PdhVerifySQLDBW; external PdhLib name 'PdhVerifySQLDBW';
-function PdhVerifySQLDBA; external PdhLib name 'PdhVerifySQLDBA';
-function PdhVerifySQLDB; external PdhLib name 'PdhVerifySQLDB' + AWSuffix;
-function PdhCreateSQLTablesW; external PdhLib name 'PdhCreateSQLTablesW';
-function PdhCreateSQLTablesA; external PdhLib name 'PdhCreateSQLTablesA';
-function PdhCreateSQLTables; external PdhLib name 'PdhCreateSQLTables' + AWSuffix;
-function PdhEnumLogSetNamesW; external PdhLib name 'PdhEnumLogSetNamesW';
-function PdhEnumLogSetNamesA; external PdhLib name 'PdhEnumLogSetNamesA';
-function PdhEnumLogSetNames; external PdhLib name 'PdhEnumLogSetNames' + AWSuffix;
-function PdhGetLogSetGUID; external PdhLib name 'PdhGetLogSetGUID';
-function PdhSetLogSetRunID; external PdhLib name 'PdhSetLogSetRunID';
-
-{$ENDIF DYNAMIC_LINK}
-
-end.
+{******************************************************************************}
+{ }
+{ Performance Data Helper API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: pdh.h, released June 2000. The original Pascal }
+{ code is: Pdh.pas, released December 2000. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwapdh.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaPdh;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "pdh.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaWinBase, JwaWinType, JwaWinPerf;
+
+type
+ PDH_STATUS = DWORD;
+ {$EXTERNALSYM PDH_STATUS}
+
+const
+
+// version info
+
+ PDH_CVERSION_WIN40 = DWORD($0400);
+ {$EXTERNALSYM PDH_CVERSION_WIN40}
+ PDH_CVERSION_WIN50 = DWORD($0500);
+ {$EXTERNALSYM PDH_CVERSION_WIN50}
+
+// v1.1 revision of PDH -- basic log functions
+// v1.2 of the PDH -- adds variable instance counters
+// v1.3 of the PDH -- adds log service control & stubs for NT5/PDH v2 fn's
+// v2.0 of the PDH -- is the NT v 5.0 B2 version
+
+ PDH_VERSION = DWORD((PDH_CVERSION_WIN50) + $0003);
+ {$EXTERNALSYM PDH_VERSION}
+
+// define severity masks
+
+function IsSuccessSeverity(ErrorCode: Longint): Boolean;
+{$EXTERNALSYM IsSuccessSeverity}
+function IsInformationalSeverity(ErrorCode: Longint): Boolean;
+{$EXTERNALSYM IsInformationalSeverity}
+function IsWarningSeverity(ErrorCode: Longint): Boolean;
+{$EXTERNALSYM IsWarningSeverity}
+function IsErrorSeverity(ErrorCode: Longint): Boolean;
+{$EXTERNALSYM IsErrorSeverity}
+
+const
+ MAX_COUNTER_PATH = 256; // Maximum counter path length
+ {$EXTERNALSYM MAX_COUNTER_PATH}
+
+ PDH_MAX_COUNTER_NAME = 1024; // Maximum counter name length.
+ {$EXTERNALSYM PDH_MAX_COUNTER_NAME}
+ PDH_MAX_INSTANCE_NAME = 1024; // Maximum counter instance name length.
+ {$EXTERNALSYM PDH_MAX_INSTANCE_NAME}
+ PDH_MAX_COUNTER_PATH = 2048; // Maximum full counter path length.
+ {$EXTERNALSYM PDH_MAX_COUNTER_PATH}
+ PDH_MAX_DATASOURCE_PATH = 1024; // MAximum full counter log name length.
+ {$EXTERNALSYM PDH_MAX_DATASOURCE_PATH}
+
+// data type definitions
+
+type
+ PDH_HCOUNTER = HANDLE;
+ {$EXTERNALSYM PDH_HCOUNTER}
+ PDH_HQUERY = HANDLE;
+ {$EXTERNALSYM PDH_HQUERY}
+ PDH_HLOG = HANDLE;
+ {$EXTERNALSYM PDH_HLOG}
+
+ HCOUNTER = PDH_HCOUNTER;
+ {$EXTERNALSYM HCOUNTER}
+ HQUERY = PDH_HQUERY;
+ {$EXTERNALSYM HQUERY}
+ HLOG = PDH_HLOG;
+ {$EXTERNALSYM HLOG}
+
+const
+ INVALID_HANDLE_VALUE = HANDLE(LONG_PTR(-1));
+ {$EXTERNALSYM INVALID_HANDLE_VALUE}
+
+ H_REALTIME_DATASOURCE = NULL;
+ {$EXTERNALSYM H_REALTIME_DATASOURCE}
+ H_WBEM_DATASOURCE = INVALID_HANDLE_VALUE;
+ {$EXTERNALSYM H_WBEM_DATASOURCE}
+
+type
+ PPDH_RAW_COUNTER = ^PDH_RAW_COUNTER;
+ {$EXTERNALSYM PPDH_RAW_COUNTER}
+ _PDH_RAW_COUNTER = record
+ CStatus: DWORD;
+ TimeStamp: FILETIME;
+ FirstValue: LONGLONG;
+ SecondValue: LONGLONG;
+ MultiCount: DWORD;
+ end;
+ {$EXTERNALSYM _PDH_RAW_COUNTER}
+ PDH_RAW_COUNTER = _PDH_RAW_COUNTER;
+ {$EXTERNALSYM PDH_RAW_COUNTER}
+ TPdhRawCounter = PDH_RAW_COUNTER;
+ PPdhRawCounter = PPDH_RAW_COUNTER;
+
+ PPDH_RAW_COUNTER_ITEM_A = ^PDH_RAW_COUNTER_ITEM_A;
+ {$EXTERNALSYM PPDH_RAW_COUNTER_ITEM_A}
+ _PDH_RAW_COUNTER_ITEM_A = record
+ szName: LPSTR;
+ RawValue: PDH_RAW_COUNTER;
+ end;
+ {$EXTERNALSYM _PDH_RAW_COUNTER_ITEM_A}
+ PDH_RAW_COUNTER_ITEM_A = _PDH_RAW_COUNTER_ITEM_A;
+ {$EXTERNALSYM PDH_RAW_COUNTER_ITEM_A}
+ TPdhRawCounterItemA = PDH_RAW_COUNTER_ITEM_A;
+ PPdhRawCounterItemA = PPDH_RAW_COUNTER_ITEM_A;
+
+ PPDH_RAW_COUNTER_ITEM_W = ^PDH_RAW_COUNTER_ITEM_W;
+ {$EXTERNALSYM PPDH_RAW_COUNTER_ITEM_W}
+ _PDH_RAW_COUNTER_ITEM_W = record
+ szName: LPWSTR;
+ RawValue: PDH_RAW_COUNTER;
+ end;
+ {$EXTERNALSYM _PDH_RAW_COUNTER_ITEM_W}
+ PDH_RAW_COUNTER_ITEM_W = _PDH_RAW_COUNTER_ITEM_W;
+ {$EXTERNALSYM PDH_RAW_COUNTER_ITEM_W}
+ TPdhRawCounterItemW = PDH_RAW_COUNTER_ITEM_W;
+ PPdhRawCounterItemW = PPDH_RAW_COUNTER_ITEM_W;
+
+ {$IFDEF UNICODE}
+ PPdhRawCounterItem = PPdhRawCounterItemW;
+ PDH_RAW_COUNTER_ITEM = _PDH_RAW_COUNTER_ITEM_W;
+ {$EXTERNALSYM PDH_RAW_COUNTER_ITEM}
+ PPDH_RAW_COUNTER_ITEM = PPDH_RAW_COUNTER_ITEM_W;
+ {$EXTERNALSYM PPDH_RAW_COUNTER_ITEM}
+ TPdhRawCounterItem = _PDH_RAW_COUNTER_ITEM_W;
+ {$ELSE}
+ PPdhRawCounterItem = PPdhRawCounterItemA;
+ PDH_RAW_COUNTER_ITEM = _PDH_RAW_COUNTER_ITEM_A;
+ {$EXTERNALSYM PDH_RAW_COUNTER_ITEM}
+ PPDH_RAW_COUNTER_ITEM = PPDH_RAW_COUNTER_ITEM_A;
+ {$EXTERNALSYM PPDH_RAW_COUNTER_ITEM}
+ TPdhRawCounterItem = _PDH_RAW_COUNTER_ITEM_A;
+ {$ENDIF UNICODE}
+
+ PPDH_FMT_COUNTERVALUE = ^PDH_FMT_COUNTERVALUE;
+ {$EXTERNALSYM PPDH_FMT_COUNTERVALUE}
+ _PDH_FMT_COUNTERVALUE = record
+ CStatus: DWORD;
+ case Longint of
+ 1: (longValue: LONG);
+ 2: (doubleValue: Double);
+ 3: (largeValue: LONGLONG);
+ 4: (AnsiStringValue: LPSTR);
+ 5: (WideStringValue: LPCWSTR);
+ end;
+ {$EXTERNALSYM _PDH_FMT_COUNTERVALUE}
+ PDH_FMT_COUNTERVALUE = _PDH_FMT_COUNTERVALUE;
+ {$EXTERNALSYM PDH_FMT_COUNTERVALUE}
+ TPdhFmtCounterValue = PDH_FMT_COUNTERVALUE;
+ PPdhFmtCounterValue = PPDH_FMT_COUNTERVALUE;
+
+ PPDH_FMT_COUNTERVALUE_ITEM_A = ^PDH_FMT_COUNTERVALUE_ITEM_A;
+ {$EXTERNALSYM PPDH_FMT_COUNTERVALUE_ITEM_A}
+ _PDH_FMT_COUNTERVALUE_ITEM_A = record
+ szName: LPSTR;
+ FmtValue: PDH_FMT_COUNTERVALUE;
+ end;
+ {$EXTERNALSYM _PDH_FMT_COUNTERVALUE_ITEM_A}
+ PDH_FMT_COUNTERVALUE_ITEM_A = _PDH_FMT_COUNTERVALUE_ITEM_A;
+ {$EXTERNALSYM PDH_FMT_COUNTERVALUE_ITEM_A}
+ TPdhFmtCounterValueItemA = PDH_FMT_COUNTERVALUE_ITEM_A;
+ PPdhFmtCounterValueItemA = PPDH_FMT_COUNTERVALUE_ITEM_A;
+
+ PPDH_FMT_COUNTERVALUE_ITEM_W = ^PDH_FMT_COUNTERVALUE_ITEM_W;
+ {$EXTERNALSYM PPDH_FMT_COUNTERVALUE_ITEM_W}
+ _PDH_FMT_COUNTERVALUE_ITEM_W = record
+ szName: LPWSTR;
+ FmtValue: PDH_FMT_COUNTERVALUE;
+ end;
+ {$EXTERNALSYM _PDH_FMT_COUNTERVALUE_ITEM_W}
+ PDH_FMT_COUNTERVALUE_ITEM_W = _PDH_FMT_COUNTERVALUE_ITEM_W;
+ {$EXTERNALSYM PDH_FMT_COUNTERVALUE_ITEM_W}
+ TPdhFmtCounterValueItemW = PDH_FMT_COUNTERVALUE_ITEM_W;
+ PPdhFmtCounterValueItemW = PPDH_FMT_COUNTERVALUE_ITEM_W;
+
+ {$IFDEF UNICODE}
+ PPdhFmtCounterValueItem = PPdhFmtCounterValueItemW;
+ PDH_FMT_COUNTERVALUE_ITEM = _PDH_FMT_COUNTERVALUE_ITEM_W;
+ {$EXTERNALSYM PDH_FMT_COUNTERVALUE_ITEM}
+ PPDH_FMT_COUNTERVALUE_ITEM = PPDH_FMT_COUNTERVALUE_ITEM_W;
+ {$EXTERNALSYM PPDH_FMT_COUNTERVALUE_ITEM}
+ TPdhFmtCounterValueItem = _PDH_FMT_COUNTERVALUE_ITEM_W;
+ {$ELSE}
+ PPdhFmtCounterValueItem = PPdhFmtCounterValueItemA;
+ PDH_FMT_COUNTERVALUE_ITEM = _PDH_FMT_COUNTERVALUE_ITEM_A;
+ {$EXTERNALSYM PDH_FMT_COUNTERVALUE_ITEM}
+ PPDH_FMT_COUNTERVALUE_ITEM = PPDH_FMT_COUNTERVALUE_ITEM_A;
+ {$EXTERNALSYM PPDH_FMT_COUNTERVALUE_ITEM}
+ TPdhFmtCounterValueItem = _PDH_FMT_COUNTERVALUE_ITEM_A;
+ {$ENDIF UNICODE}
+
+ PPDH_STATISTICS = ^PDH_STATISTICS;
+ {$EXTERNALSYM PPDH_STATISTICS}
+ _PDH_STATISTICS = record
+ dwFormat: DWORD;
+ Count: DWORD;
+ min: PDH_FMT_COUNTERVALUE;
+ max: PDH_FMT_COUNTERVALUE;
+ mean: PDH_FMT_COUNTERVALUE;
+ end;
+ {$EXTERNALSYM _PDH_STATISTICS}
+ PDH_STATISTICS = _PDH_STATISTICS;
+ {$EXTERNALSYM PDH_STATISTICS}
+ TPdhStatistics = PDH_STATISTICS;
+ PPdhStatistics = PPDH_STATISTICS;
+
+ PPDH_COUNTER_PATH_ELEMENTS_A = ^PDH_COUNTER_PATH_ELEMENTS_A;
+ {$EXTERNALSYM PPDH_COUNTER_PATH_ELEMENTS_A}
+ _PDH_COUNTER_PATH_ELEMENTS_A = record
+ szMachineName: LPSTR;
+ szObjectName: LPSTR;
+ szInstanceName: LPSTR;
+ szParentInstance: LPSTR;
+ dwInstanceIndex: DWORD;
+ szCounterName: LPSTR;
+ end;
+ {$EXTERNALSYM _PDH_COUNTER_PATH_ELEMENTS_A}
+ PDH_COUNTER_PATH_ELEMENTS_A = _PDH_COUNTER_PATH_ELEMENTS_A;
+ {$EXTERNALSYM PDH_COUNTER_PATH_ELEMENTS_A}
+ TPdhCounterPathElementsA = PDH_COUNTER_PATH_ELEMENTS_A;
+ PPdhCounterPathElementsA = PPDH_COUNTER_PATH_ELEMENTS_A;
+
+ PPDH_COUNTER_PATH_ELEMENTS_W = ^PDH_COUNTER_PATH_ELEMENTS_W;
+ {$EXTERNALSYM PPDH_COUNTER_PATH_ELEMENTS_W}
+ _PDH_COUNTER_PATH_ELEMENTS_W = record
+ szMachineName: LPWSTR;
+ szObjectName: LPWSTR;
+ szInstanceName: LPWSTR;
+ szParentInstance: LPWSTR;
+ dwInstanceIndex: DWORD;
+ szCounterName: LPWSTR;
+ end;
+ {$EXTERNALSYM _PDH_COUNTER_PATH_ELEMENTS_W}
+ PDH_COUNTER_PATH_ELEMENTS_W = _PDH_COUNTER_PATH_ELEMENTS_W;
+ {$EXTERNALSYM PDH_COUNTER_PATH_ELEMENTS_W}
+ TPdhCounterPathElementsW = PDH_COUNTER_PATH_ELEMENTS_W;
+ PPdhCounterPathElementsW = PPDH_COUNTER_PATH_ELEMENTS_W;
+
+ {$IFDEF UNICODE}
+ PPdhCounterPathElements = PPdhCounterPathElementsW;
+ PDH_COUNTER_PATH_ELEMENTS = _PDH_COUNTER_PATH_ELEMENTS_W;
+ {$EXTERNALSYM PDH_COUNTER_PATH_ELEMENTS}
+ PPDH_COUNTER_PATH_ELEMENTS = PPDH_COUNTER_PATH_ELEMENTS_W;
+ {$EXTERNALSYM PPDH_COUNTER_PATH_ELEMENTS}
+ TPdhCounterPathElements = _PDH_COUNTER_PATH_ELEMENTS_W;
+ {$ELSE}
+ PPdhCounterPathElements = PPdhCounterPathElementsA;
+ PDH_COUNTER_PATH_ELEMENTS = _PDH_COUNTER_PATH_ELEMENTS_A;
+ {$EXTERNALSYM PDH_COUNTER_PATH_ELEMENTS}
+ PPDH_COUNTER_PATH_ELEMENTS = PPDH_COUNTER_PATH_ELEMENTS_A;
+ {$EXTERNALSYM PPDH_COUNTER_PATH_ELEMENTS}
+ TPdhCounterPathElements = _PDH_COUNTER_PATH_ELEMENTS_A;
+ {$ENDIF UNICODE}
+
+ PPDH_DATA_ITEM_PATH_ELEMENTS_A = ^PDH_DATA_ITEM_PATH_ELEMENTS_A;
+ {$EXTERNALSYM PPDH_DATA_ITEM_PATH_ELEMENTS_A}
+ _PDH_DATA_ITEM_PATH_ELEMENTS_A = record
+ szMachineName: LPSTR;
+ ObjectGUID: GUID;
+ dwItemId: DWORD;
+ szInstanceName: LPSTR;
+ end;
+ {$EXTERNALSYM _PDH_DATA_ITEM_PATH_ELEMENTS_A}
+ PDH_DATA_ITEM_PATH_ELEMENTS_A = _PDH_DATA_ITEM_PATH_ELEMENTS_A;
+ {$EXTERNALSYM PDH_DATA_ITEM_PATH_ELEMENTS_A}
+ TPdhDataItemPathElementsA = PDH_DATA_ITEM_PATH_ELEMENTS_A;
+ PPdhDataItemPathElementsA = PPDH_DATA_ITEM_PATH_ELEMENTS_A;
+
+ PPDH_DATA_ITEM_PATH_ELEMENTS_W = ^PDH_DATA_ITEM_PATH_ELEMENTS_W;
+ {$EXTERNALSYM PPDH_DATA_ITEM_PATH_ELEMENTS_W}
+ _PDH_DATA_ITEM_PATH_ELEMENTS_W = record
+ szMachineName: LPWSTR;
+ ObjectGUID: GUID;
+ dwItemId: DWORD;
+ szInstanceName: LPWSTR;
+ end;
+ {$EXTERNALSYM _PDH_DATA_ITEM_PATH_ELEMENTS_W}
+ PDH_DATA_ITEM_PATH_ELEMENTS_W = _PDH_DATA_ITEM_PATH_ELEMENTS_W;
+ {$EXTERNALSYM PDH_DATA_ITEM_PATH_ELEMENTS_W}
+ TPdhDataItemPathElementsW = PDH_DATA_ITEM_PATH_ELEMENTS_W;
+ PPdhDataItemPathElementsW = PPDH_DATA_ITEM_PATH_ELEMENTS_W;
+
+ {$IFDEF UNICODE}
+ PPdhDataItemPathElements = PPdhDataItemPathElementsW;
+ PDH_DATA_ITEM_PATH_ELEMENTS = _PDH_DATA_ITEM_PATH_ELEMENTS_W;
+ {$EXTERNALSYM PDH_DATA_ITEM_PATH_ELEMENTS}
+ PPDH_DATA_ITEM_PATH_ELEMENTS = PPDH_DATA_ITEM_PATH_ELEMENTS_W;
+ {$EXTERNALSYM PPDH_DATA_ITEM_PATH_ELEMENTS}
+ TPdhDataItemPathElements = _PDH_DATA_ITEM_PATH_ELEMENTS_W;
+ {$ELSE}
+ PPdhDataItemPathElements = PPdhDataItemPathElementsA;
+ PDH_DATA_ITEM_PATH_ELEMENTS = _PDH_DATA_ITEM_PATH_ELEMENTS_A;
+ {$EXTERNALSYM PDH_DATA_ITEM_PATH_ELEMENTS}
+ PPDH_DATA_ITEM_PATH_ELEMENTS = PPDH_DATA_ITEM_PATH_ELEMENTS_A;
+ {$EXTERNALSYM PPDH_DATA_ITEM_PATH_ELEMENTS}
+ TPdhDataItemPathElements = _PDH_DATA_ITEM_PATH_ELEMENTS_A;
+ {$ENDIF UNICODE}
+
+ PPDH_COUNTER_INFO_A = ^PDH_COUNTER_INFO_A;
+ {$EXTERNALSYM PPDH_COUNTER_INFO_A}
+ _PDH_COUNTER_INFO_A = record
+ dwLength: DWORD;
+ dwType: DWORD;
+ CVersion: DWORD;
+ CStatus: DWORD;
+ lScale: LONG;
+ lDefaultScale: LONG;
+ dwUserData: DWORD_PTR;
+ dwQueryUserData: DWORD_PTR;
+ szFullPath: LPSTR;
+ Union: record
+ case Longint of
+ 1: (DataItemPath: PDH_DATA_ITEM_PATH_ELEMENTS_A);
+ 2: (CounterPath: PDH_COUNTER_PATH_ELEMENTS_A);
+ 3: (szMachineName: LPSTR;
+ szObjectName: LPSTR;
+ szInstanceName: LPSTR;
+ szParentInstance: LPSTR;
+ dwInstanceIndex: DWORD;
+ szCounterName: LPSTR);
+ end;
+ szExplainText: LPSTR;
+ DataBuffer: array [0..0] of DWORD;
+ end;
+ {$EXTERNALSYM _PDH_COUNTER_INFO_A}
+ PDH_COUNTER_INFO_A = _PDH_COUNTER_INFO_A;
+ {$EXTERNALSYM PDH_COUNTER_INFO_A}
+ TPdhCounterInfoA = PDH_COUNTER_INFO_A;
+ PPdhCounterInfoA = PPDH_COUNTER_INFO_A;
+
+ PPDH_COUNTER_INFO_W = ^PDH_COUNTER_INFO_W;
+ {$EXTERNALSYM PPDH_COUNTER_INFO_W}
+ _PDH_COUNTER_INFO_W = record
+ dwLength: DWORD;
+ dwType: DWORD;
+ CVersion: DWORD;
+ CStatus: DWORD;
+ lScale: LONG;
+ lDefaultScale: LONG;
+ dwUserData: DWORD_PTR;
+ dwQueryUserData: DWORD_PTR;
+ szFullPath: LPWSTR;
+ Union: record
+ case Longint of
+ 1: (DataItemPath: PDH_DATA_ITEM_PATH_ELEMENTS_W);
+ 2: (CounterPath: PDH_COUNTER_PATH_ELEMENTS_W);
+ 3: (szMachineName: LPWSTR;
+ szObjectName: LPWSTR;
+ szInstanceName: LPWSTR;
+ szParentInstance: LPWSTR;
+ dwInstanceIndex: DWORD;
+ szCounterName: LPWSTR);
+ end;
+ szExplainText: LPWSTR;
+ DataBuffer: array [0..0] of DWORD;
+ end;
+ {$EXTERNALSYM _PDH_COUNTER_INFO_W}
+ PDH_COUNTER_INFO_W = _PDH_COUNTER_INFO_W;
+ {$EXTERNALSYM PDH_COUNTER_INFO_W}
+ TPdhCounterInfoW = PDH_COUNTER_INFO_W;
+ PPdhCounterInfoW = PPDH_COUNTER_INFO_W;
+
+ {$IFDEF UNICODE}
+ PPdhCounterInfo = PPdhCounterInfoW;
+ PDH_COUNTER_INFO = _PDH_COUNTER_INFO_W;
+ {$EXTERNALSYM PDH_COUNTER_INFO}
+ PPDH_COUNTER_INFO = PPDH_COUNTER_INFO_W;
+ {$EXTERNALSYM PPDH_COUNTER_INFO}
+ TPdhCounterInfo = _PDH_COUNTER_INFO_W;
+ {$ELSE}
+ PPdhCounterInfo = PPdhCounterInfoA;
+ PDH_COUNTER_INFO = _PDH_COUNTER_INFO_A;
+ {$EXTERNALSYM PDH_COUNTER_INFO}
+ PPDH_COUNTER_INFO = PPDH_COUNTER_INFO_A;
+ {$EXTERNALSYM PPDH_COUNTER_INFO}
+ TPdhCounterInfo = _PDH_COUNTER_INFO_A;
+ {$ENDIF UNICODE}
+
+ PPDH_TIME_INFO = ^PDH_TIME_INFO;
+ {$EXTERNALSYM PPDH_TIME_INFO}
+ _PDH_TIME_INFO = record
+ StartTime: LONGLONG;
+ EndTime: LONGLONG;
+ SampleCount: DWORD;
+ end;
+ {$EXTERNALSYM _PDH_TIME_INFO}
+ PDH_TIME_INFO = _PDH_TIME_INFO;
+ {$EXTERNALSYM PDH_TIME_INFO}
+ TPdhTimeInfo = PDH_TIME_INFO;
+ PPdhTimeInfo = PPDH_TIME_INFO;
+
+ PPDH_RAW_LOG_RECORD = ^PDH_RAW_LOG_RECORD;
+ {$EXTERNALSYM PPDH_RAW_LOG_RECORD}
+ _PDH_RAW_LOG_RECORD = record
+ dwStructureSize: DWORD;
+ dwRecordType: DWORD;
+ dwItems: DWORD;
+ RawBytes: array [0..0] of UCHAR;
+ end;
+ {$EXTERNALSYM _PDH_RAW_LOG_RECORD}
+ PDH_RAW_LOG_RECORD = _PDH_RAW_LOG_RECORD;
+ {$EXTERNALSYM PDH_RAW_LOG_RECORD}
+ TPdhRawLogRecord = PDH_RAW_LOG_RECORD;
+ PPdhRawLogRecord = PPDH_RAW_LOG_RECORD;
+
+ PPDH_LOG_SERVICE_QUERY_INFO_A = ^PDH_LOG_SERVICE_QUERY_INFO_A;
+ {$EXTERNALSYM PPDH_LOG_SERVICE_QUERY_INFO_A}
+ _PDH_LOG_SERVICE_QUERY_INFO_A = record
+ dwSize: DWORD;
+ dwFlags: DWORD;
+ dwLogQuota: DWORD;
+ szLogFileCaption: LPSTR;
+ szDefaultDir: LPSTR;
+ szBaseFileName: LPSTR;
+ dwFileType: DWORD;
+ dwReserved: DWORD;
+ Union: record
+ case Longint of
+ 1: (PdlAutoNameInterval: DWORD;
+ PdlAutoNameUnits: DWORD;
+ PdlCommandFilename: LPSTR;
+ PdlCounterList: LPSTR;
+ PdlAutoNameFormat: DWORD;
+ PdlSampleInterval: DWORD;
+ PdlLogStartTime: FILETIME;
+ PdlLogEndTime: FILETIME);
+ 2: (TlNumberOfBuffers: DWORD;
+ TlMinimumBuffers: DWORD;
+ TlMaximumBuffers: DWORD;
+ TlFreeBuffers: DWORD;
+ TlBufferSize: DWORD;
+ TlEventsLost: DWORD;
+ TlLoggerThreadId: DWORD;
+ TlBuffersWritten: DWORD;
+ TlLogHandle: DWORD;
+ TlLogFileName: LPSTR);
+ end;
+ end;
+ {$EXTERNALSYM _PDH_LOG_SERVICE_QUERY_INFO_A}
+ PDH_LOG_SERVICE_QUERY_INFO_A = _PDH_LOG_SERVICE_QUERY_INFO_A;
+ {$EXTERNALSYM _PDH_LOG_SERVICE_QUERY_INFO_A}
+ TPdhLogServiceQueryInfoA = PDH_LOG_SERVICE_QUERY_INFO_A;
+ PPdhLogServiceQueryInfoA = PPDH_LOG_SERVICE_QUERY_INFO_A;
+
+ PPDH_LOG_SERVICE_QUERY_INFO_W = ^PDH_LOG_SERVICE_QUERY_INFO_W;
+ {$EXTERNALSYM PPDH_LOG_SERVICE_QUERY_INFO_W}
+ _PDH_LOG_SERVICE_QUERY_INFO_W = record
+ dwSize: DWORD;
+ dwFlags: DWORD;
+ dwLogQuota: DWORD;
+ szLogFileCaption: LPWSTR;
+ szDefaultDir: LPWSTR;
+ szBaseFileName: LPWSTR;
+ dwFileType: DWORD;
+ dwReserved: DWORD;
+ Union: record
+ case Longint of
+ 1: (PdlAutoNameInterval: DWORD;
+ PdlAutoNameUnits: DWORD;
+ PdlCommandFilename: LPWSTR;
+ PdlCounterList: LPWSTR;
+ PdlAutoNameFormat: DWORD;
+ PdlSampleInterval: DWORD;
+ PdlLogStartTime: FILETIME;
+ PdlLogEndTime: FILETIME);
+ 2: (TlNumberOfBuffers: DWORD;
+ TlMinimumBuffers: DWORD;
+ TlMaximumBuffers: DWORD;
+ TlFreeBuffers: DWORD;
+ TlBufferSize: DWORD;
+ TlEventsLost: DWORD;
+ TlLoggerThreadId: DWORD;
+ TlBuffersWritten: DWORD;
+ TlLogHandle: DWORD;
+ TlLogFileName: LPWSTR);
+ end;
+ end;
+ {$EXTERNALSYM _PDH_LOG_SERVICE_QUERY_INFO_W}
+ PDH_LOG_SERVICE_QUERY_INFO_W = _PDH_LOG_SERVICE_QUERY_INFO_W;
+ {$EXTERNALSYM PDH_LOG_SERVICE_QUERY_INFO_W}
+ TPdhLogServiceQueryInfoW = PDH_LOG_SERVICE_QUERY_INFO_W;
+ PPdhLogServiceQueryInfoW = PPDH_LOG_SERVICE_QUERY_INFO_W;
+
+ {$IFDEF UNICODE}
+ PPdhLogServiceQueryInfo = PPdhLogServiceQueryInfoW;
+ PDH_LOG_SERVICE_QUERY_INFO = _PDH_LOG_SERVICE_QUERY_INFO_W;
+ {$EXTERNALSYM PDH_LOG_SERVICE_QUERY_INFO}
+ PPDH_LOG_SERVICE_QUERY_INFO = PPDH_LOG_SERVICE_QUERY_INFO_W;
+ {$EXTERNALSYM PPDH_LOG_SERVICE_QUERY_INFO}
+ TPdhLogServiceQueryInfo = _PDH_LOG_SERVICE_QUERY_INFO_W;
+ {$ELSE}
+ PPdhLogServiceQueryInfo = PPdhLogServiceQueryInfoA;
+ PDH_LOG_SERVICE_QUERY_INFO = _PDH_LOG_SERVICE_QUERY_INFO_A;
+ {$EXTERNALSYM PDH_LOG_SERVICE_QUERY_INFO}
+ PPDH_LOG_SERVICE_QUERY_INFO = PPDH_LOG_SERVICE_QUERY_INFO_A;
+ {$EXTERNALSYM PPDH_LOG_SERVICE_QUERY_INFO}
+ TPdhLogServiceQueryInfo = _PDH_LOG_SERVICE_QUERY_INFO_A;
+ {$ENDIF UNICODE}
+
+//
+// Time value constants
+//
+
+const
+ MAX_TIME_VALUE = LONGLONG($7FFFFFFFFFFFFFFF);
+ {$EXTERNALSYM MAX_TIME_VALUE}
+ MIN_TIME_VALUE = LONGLONG(0);
+ {$EXTERNALSYM MIN_TIME_VALUE}
+
+// function definitions
+
+function PdhGetDllVersion(var lpdwVersion: DWORD): PDH_STATUS; stdcall;
+{$EXTERNALSYM PdhGetDllVersion}
+
+//
+// Query Functions
+//
+
+function PdhOpenQueryA(szDataSource: LPCSTR; dwUserData: DWORD_PTR;
+ var phQuery: PDH_HQUERY): PDH_STATUS; stdcall;
+{$EXTERNALSYM PdhOpenQueryA}
+function PdhOpenQueryW(szDataSource: LPCWSTR; dwUserData: DWORD_PTR;
+ var phQuery: PDH_HQUERY): PDH_STATUS; stdcall;
+{$EXTERNALSYM PdhOpenQueryW}
+function PdhOpenQuery(szDataSource: LPCTSTR; dwUserData: DWORD_PTR;
+ var phQuery: PDH_HQUERY): PDH_STATUS; stdcall;
+{$EXTERNALSYM PdhOpenQuery}
+
+function PdhAddCounterA(hQuery: PDH_HQUERY; szFullCounterPath: LPCSTR;
+ dwUserData: DWORD_PTR; var phCounter: PDH_HCOUNTER): PDH_STATUS; stdcall;
+{$EXTERNALSYM PdhAddCounterA}
+function PdhAddCounterW(hQuery: PDH_HQUERY; szFullCounterPath: LPCWSTR;
+ dwUserData: DWORD_PTR; var phCounter: PDH_HCOUNTER): PDH_STATUS; stdcall;
+{$EXTERNALSYM PdhAddCounterW}
+function PdhAddCounter(hQuery: PDH_HQUERY; szFullCounterPath: LPCTSTR;
+ dwUserData: DWORD_PTR; var phCounter: PDH_HCOUNTER): PDH_STATUS; stdcall;
+{$EXTERNALSYM PdhAddCounter}
+
+function PdhRemoveCounter(hCounter: PDH_HCOUNTER): PDH_STATUS; stdcall;
+{$EXTERNALSYM PdhRemoveCounter}
+
+function PdhCollectQueryData(hQuery: PDH_HQUERY): PDH_STATUS; stdcall;
+{$EXTERNALSYM PdhCollectQueryData}
+
+function PdhCloseQuery(hQuery: PDH_HQUERY): PDH_STATUS; stdcall;
+{$EXTERNALSYM PdhCloseQuery}
+
+//
+// Counter Functions
+//
+
+function PdhGetFormattedCounterValue(hCounter: PDH_HCOUNTER; dwFormat: DWORD;
+ lpdwType: LPDWORD; var pValue: PDH_FMT_COUNTERVALUE): PDH_STATUS; stdcall;
+{$EXTERNALSYM PdhGetFormattedCounterValue}
+
+function PdhGetFormattedCounterArrayA(hCounter: PDH_HCOUNTER; dwFormat: DWORD;
+ var lpdwBufferSize, lpdwItemCount: DWORD;
+ var ItemBuffer: PDH_FMT_COUNTERVALUE_ITEM_A): PDH_STATUS; stdcall;
+{$EXTERNALSYM PdhGetFormattedCounterArrayA}
+function PdhGetFormattedCounterArrayW(hCounter: PDH_HCOUNTER; dwFormat: DWORD;
+ var lpdwBufferSize, lpdwItemCount: DWORD;
+ var ItemBuffer: PDH_FMT_COUNTERVALUE_ITEM_W): PDH_STATUS; stdcall;
+{$EXTERNALSYM PdhGetFormattedCounterArrayW}
+function PdhGetFormattedCounterArray(hCounter: PDH_HCOUNTER; dwFormat: DWORD;
+ var lpdwBufferSize, lpdwItemCount: DWORD;
+ var ItemBuffer: PDH_FMT_COUNTERVALUE_ITEM): PDH_STATUS; stdcall;
+{$EXTERNALSYM PdhGetFormattedCounterArray}
+
+// dwFormat flag values
+
+const
+ PDH_FMT_RAW = DWORD($00000010);
+ {$EXTERNALSYM PDH_FMT_RAW}
+ PDH_FMT_ANSI = DWORD($00000020);
+ {$EXTERNALSYM PDH_FMT_ANSI}
+ PDH_FMT_UNICODE = DWORD($00000040);
+ {$EXTERNALSYM PDH_FMT_UNICODE}
+ PDH_FMT_LONG = DWORD($00000100);
+ {$EXTERNALSYM PDH_FMT_LONG}
+ PDH_FMT_DOUBLE = DWORD($00000200);
+ {$EXTERNALSYM PDH_FMT_DOUBLE}
+ PDH_FMT_LARGE = DWORD($00000400);
+ {$EXTERNALSYM PDH_FMT_LARGE}
+ PDH_FMT_NOSCALE = DWORD($00001000);
+ {$EXTERNALSYM PDH_FMT_NOSCALE}
+ PDH_FMT_1000 = DWORD($00002000);
+ {$EXTERNALSYM PDH_FMT_1000}
+ PDH_FMT_NODATA = DWORD($00004000);
+ {$EXTERNALSYM PDH_FMT_NODATA}
+ PDH_FMT_NOCAP100 = DWORD($00008000);
+ {$EXTERNALSYM PDH_FMT_NODATA}
+
+ PERF_DETAIL_COSTLY = DWORD($00010000);
+ {$EXTERNALSYM PERF_DETAIL_COSTLY}
+ PERF_DETAIL_STANDARD = DWORD($0000FFFF);
+ {$EXTERNALSYM PERF_DETAIL_STANDARD}
+
+function PdhGetRawCounterValue(hCounter: PDH_HCOUNTER; lpdwType: LPDWORD;
+ var pValue: PDH_RAW_COUNTER): PDH_STATUS; stdcall;
+{$EXTERNALSYM PdhGetRawCounterValue}
+
+function PdhGetRawCounterArrayA(hCounter: PDH_HCOUNTER; var lpdwBufferSize,
+ lpdwItemCount: DWORD; var ItemBuffer: PDH_RAW_COUNTER_ITEM_A): PDH_STATUS; stdcall;
+{$EXTERNALSYM PdhGetRawCounterArrayA}
+function PdhGetRawCounterArrayW(hCounter: PDH_HCOUNTER; var lpdwBufferSize,
+ lpdwItemCount: DWORD; var ItemBuffer: PDH_RAW_COUNTER_ITEM_W): PDH_STATUS; stdcall;
+{$EXTERNALSYM PdhGetRawCounterArrayW}
+function PdhGetRawCounterArray(hCounter: PDH_HCOUNTER; var lpdwBufferSize,
+ lpdwItemCount: DWORD; var ItemBuffer: PDH_RAW_COUNTER_ITEM): PDH_STATUS; stdcall;
+{$EXTERNALSYM PdhGetRawCounterArray}
+
+function PdhCalculateCounterFromRawValue(hCounter: PDH_HCOUNTER; dwFormat: DWORD;
+ rawValue1, rawValue2: PPDH_RAW_COUNTER; var fmtValue: PDH_FMT_COUNTERVALUE): PDH_STATUS; stdcall;
+{$EXTERNALSYM PdhCalculateCounterFromRawValue}
+
+function PdhComputeCounterStatistics(hCounter: PDH_HCOUNTER; dwFormat, dwFirstEntry,
+ dwNumEntries: DWORD; lpRawValueArray: PPDH_RAW_COUNTER; var data: PDH_STATISTICS): PDH_STATUS; stdcall;
+{$EXTERNALSYM PdhComputeCounterStatistics}
+
+function PdhGetCounterInfoA(hCounter: PDH_HCOUNTER; bRetrieveExplainText: Boolean;
+ var pdwBufferSize: DWORD; lpBuffer: PPDH_COUNTER_INFO_A): PDH_STATUS; stdcall;
+{$EXTERNALSYM PdhGetCounterInfoA}
+function PdhGetCounterInfoW(hCounter: PDH_HCOUNTER; bRetrieveExplainText: Boolean;
+ var pdwBufferSize: DWORD; lpBuffer: PPDH_COUNTER_INFO_W): PDH_STATUS; stdcall;
+{$EXTERNALSYM PdhGetCounterInfoW}
+function PdhGetCounterInfo(hCounter: PDH_HCOUNTER; bRetrieveExplainText: Boolean;
+ var pdwBufferSize: DWORD; lpBuffer: PPDH_COUNTER_INFO): PDH_STATUS; stdcall;
+{$EXTERNALSYM PdhGetCounterInfo}
+
+const
+ PDH_MAX_SCALE = Longint(7);
+ {$EXTERNALSYM PDH_MAX_SCALE}
+ PDH_MIN_SCALE = Longint(-7);
+ {$EXTERNALSYM PDH_MIN_SCALE}
+
+function PdhSetCounterScaleFactor(hCounter: PDH_HCOUNTER; lFactor: LONG): PDH_STATUS; stdcall;
+{$EXTERNALSYM PdhSetCounterScaleFactor}
+
+//
+// Browsing and enumeration functions
+//
+
+function PdhConnectMachineA(szMachineName: LPCSTR): PDH_STATUS; stdcall;
+{$EXTERNALSYM PdhConnectMachineA}
+function PdhConnectMachineW(szMachineName: LPCWSTR): PDH_STATUS; stdcall;
+{$EXTERNALSYM PdhConnectMachineW}
+function PdhConnectMachine(szMachineName: LPCTSTR): PDH_STATUS; stdcall;
+{$EXTERNALSYM PdhConnectMachine}
+
+function PdhEnumMachinesA(szDataSource: LPCSTR; mszMachineList: LPSTR;
+ pcchBufferSize: LPDWORD): PDH_STATUS; stdcall;
+{$EXTERNALSYM PdhEnumMachinesA}
+function PdhEnumMachinesW(szDataSource: LPCWSTR; mszMachineList: LPWSTR;
+ pcchBufferSize: LPDWORD): PDH_STATUS; stdcall;
+{$EXTERNALSYM PdhEnumMachinesW}
+function PdhEnumMachines(szDataSource: LPCTSTR; mszMachineList: LPTSTR;
+ pcchBufferSize: LPDWORD): PDH_STATUS; stdcall;
+{$EXTERNALSYM PdhEnumMachines}
+
+function PdhEnumObjectsA(szDataSource, szMachineName: LPCSTR; mszObjectList: LPSTR;
+ var pcchBufferSize: DWORD; dwDetailLevel: DWORD; bRefresh: BOOL): PDH_STATUS; stdcall;
+{$EXTERNALSYM PdhEnumObjectsA}
+function PdhEnumObjectsW(szDataSource, szMachineName: LPCWSTR; mszObjectList: LPWSTR;
+ var pcchBufferSize: DWORD; dwDetailLevel: DWORD; bRefresh: BOOL): PDH_STATUS; stdcall;
+{$EXTERNALSYM PdhEnumObjectsW}
+function PdhEnumObjects(szDataSource, szMachineName: LPCTSTR; mszObjectList: LPTSTR;
+ var pcchBufferSize: DWORD; dwDetailLevel: DWORD; bRefresh: BOOL): PDH_STATUS; stdcall;
+{$EXTERNALSYM PdhEnumObjects}
+
+function PdhEnumObjectItemsA(szDataSource, szMachineName, szObjectName: LPCSTR;
+ mszCounterList: LPSTR; var pcchCounterListLength: DWORD; mszInstanceList: LPSTR;
+ var pcchInstanceListLength: DWORD; dwDetailLevel, dwFlags: DWORD): PDH_STATUS; stdcall;
+{$EXTERNALSYM PdhEnumObjectItemsA}
+function PdhEnumObjectItemsW(szDataSource, szMachineName, szObjectName: LPCWSTR;
+ mszCounterList: LPWSTR; var pcchCounterListLength: DWORD; mszInstanceList: LPWSTR;
+ var pcchInstanceListLength: DWORD; dwDetailLevel, dwFlags: DWORD): PDH_STATUS; stdcall;
+{$EXTERNALSYM PdhEnumObjectItemsW}
+function PdhEnumObjectItems(szDataSource, szMachineName, szObjectName: LPCTSTR;
+ mszCounterList: LPTSTR; var pcchCounterListLength: DWORD; mszInstanceList: LPTSTR;
+ var pcchInstanceListLength: DWORD; dwDetailLevel, dwFlags: DWORD): PDH_STATUS; stdcall;
+{$EXTERNALSYM PdhEnumObjectItems}
+
+const
+ PDH_OBJECT_HAS_INSTANCES = $00000001;
+ {$EXTERNALSYM PDH_OBJECT_HAS_INSTANCES}
+
+function PdhMakeCounterPathA(pCounterPathElements: PPDH_COUNTER_PATH_ELEMENTS_A;
+ szFullPathBuffer: LPSTR; var pcchBufferSize: DWORD; dwFlags: DWORD): PDH_STATUS; stdcall;
+{$EXTERNALSYM PdhMakeCounterPathA}
+function PdhMakeCounterPathW(pCounterPathElements: PPDH_COUNTER_PATH_ELEMENTS_W;
+ szFullPathBuffer: LPWSTR; var pcchBufferSize: DWORD; dwFlags: DWORD): PDH_STATUS; stdcall;
+{$EXTERNALSYM PdhMakeCounterPathW}
+function PdhMakeCounterPath(pCounterPathElements: PPDH_COUNTER_PATH_ELEMENTS;
+ szFullPathBuffer: LPTSTR; var pcchBufferSize: DWORD; dwFlags: DWORD): PDH_STATUS; stdcall;
+{$EXTERNALSYM PdhMakeCounterPath}
+
+// todo shouldn't pCounterPathElements be a pointer to ...?
+
+function PdhParseCounterPathA(szFullPathBuffer: LPCSTR;
+ pCounterPathElements: PDH_COUNTER_PATH_ELEMENTS_A; var pdwBufferSize: DWORD;
+ dwFlags: DWORD): PDH_STATUS; stdcall;
+{$EXTERNALSYM PdhParseCounterPathA}
+function PdhParseCounterPathW(szFullPathBuffer: LPCWSTR;
+ pCounterPathElements: PDH_COUNTER_PATH_ELEMENTS_W; var pdwBufferSize: DWORD;
+ dwFlags: DWORD): PDH_STATUS; stdcall;
+{$EXTERNALSYM PdhParseCounterPathW}
+function PdhParseCounterPath(szFullPathBuffer: LPCTSTR;
+ pCounterPathElements: PDH_COUNTER_PATH_ELEMENTS; var pdwBufferSize: DWORD;
+ dwFlags: DWORD): PDH_STATUS; stdcall;
+{$EXTERNALSYM PdhParseCounterPath}
+
+const
+ PDH_PATH_WBEM_RESULT = DWORD($00000001);
+ {$EXTERNALSYM PDH_PATH_WBEM_RESULT}
+ PDH_PATH_WBEM_INPUT = DWORD($00000002);
+ {$EXTERNALSYM PDH_PATH_WBEM_INPUT}
+
+function PDH_PATH_LANG_FLAGS(LangId, Flags: DWORD): DWORD;
+{$EXTERNALSYM PDH_PATH_LANG_FLAGS}
+
+function PdhParseInstanceNameA(szInstanceString: LPSTR; szInstanceName: LPCSTR;
+ var pcchInstanceNameLength: DWORD; szParentName: LPSTR;
+ var pcchParentNameLength: DWORD; lpIndex: LPDWORD): PDH_STATUS; stdcall;
+{$EXTERNALSYM PdhParseInstanceNameA}
+function PdhParseInstanceNameW(szInstanceString: LPWSTR; szInstanceName: LPCWSTR;
+ var pcchInstanceNameLength: DWORD; szParentName: LPWSTR;
+ var pcchParentNameLength: DWORD; lpIndex: LPDWORD): PDH_STATUS; stdcall;
+{$EXTERNALSYM PdhParseInstanceNameW}
+function PdhParseInstanceName(szInstanceString: LPTSTR; szInstanceName: LPCTSTR;
+ var pcchInstanceNameLength: DWORD; szParentName: LPTSTR;
+ var pcchParentNameLength: DWORD; lpIndex: LPDWORD): PDH_STATUS; stdcall;
+{$EXTERNALSYM PdhParseInstanceName}
+
+function PdhValidatePathA(szFullPathBuffer: LPCSTR): PDH_STATUS; stdcall;
+{$EXTERNALSYM PdhValidatePathA}
+function PdhValidatePathW(szFullPathBuffer: LPCWSTR): PDH_STATUS; stdcall;
+{$EXTERNALSYM PdhValidatePathW}
+function PdhValidatePath(szFullPathBuffer: LPCTSTR): PDH_STATUS; stdcall;
+{$EXTERNALSYM PdhValidatePath}
+
+function PdhGetDefaultPerfObjectA(szDataSource, szMachineName: LPCSTR;
+ szDefaultObjectName: LPSTR; var pcchBufferSize: DWORD): PDH_STATUS; stdcall;
+{$EXTERNALSYM PdhGetDefaultPerfObjectA}
+function PdhGetDefaultPerfObjectW(szDataSource, szMachineName: LPCWSTR;
+ szDefaultObjectName: LPWSTR; var pcchBufferSize: DWORD): PDH_STATUS; stdcall;
+{$EXTERNALSYM PdhGetDefaultPerfObjectW}
+function PdhGetDefaultPerfObject(szDataSource, szMachineName: LPCTSTR;
+ szDefaultObjectName: LPTSTR; var pcchBufferSize: DWORD): PDH_STATUS; stdcall;
+{$EXTERNALSYM PdhGetDefaultPerfObject}
+
+function PdhGetDefaultPerfCounterA(szDataSource, szMachineName, szObjectName: LPCSTR;
+ szDefaultCounterName: LPSTR; var pcchBufferSize: DWORD): PDH_STATUS; stdcall;
+{$EXTERNALSYM PdhGetDefaultPerfCounterA}
+function PdhGetDefaultPerfCounterW(szDataSource, szMachineName, szObjectName: LPCWSTR;
+ szDefaultCounterName: LPWSTR; var pcchBufferSize: DWORD): PDH_STATUS; stdcall;
+{$EXTERNALSYM PdhGetDefaultPerfCounterW}
+function PdhGetDefaultPerfCounter(szDataSource, szMachineName, szObjectName: LPCTSTR;
+ szDefaultCounterName: LPTSTR; var pcchBufferSize: DWORD): PDH_STATUS; stdcall;
+{$EXTERNALSYM PdhGetDefaultPerfCounter}
+
+type
+ CounterPathCallBack = function(dwArg: DWORD_PTR): PDH_STATUS; stdcall;
+ {$EXTERNALSYM CounterPathCallBack}
+
+const
+ PDH_CF_INCLUDEINSTANCEINDEX = 1 shl 0;
+ PDH_CF_SINGLECOUNTERPERADD = 1 shl 1;
+ PDH_CF_SINGLECOUNTERPERDIALOG = 1 shl 2;
+ PDH_CF_LOCALCOUNTERSONLY = 1 shl 3;
+ PDH_CF_WILDCARDINSTANCES = 1 shl 4;
+ PDH_CF_HIDEDETAILBOX = 1 shl 5;
+ PDH_CF_INITIALIZEPATH = 1 shl 6;
+ PDH_CF_DISABLEMACHINESELECTION = 1 shl 7;
+ PDH_CF_INCLUDECOSTLYOBJECTS = 1 shl 8;
+ PDH_CF_SHOWOBJECTBROWSER = 1 shl 9;
+ PDH_CF_RESERVED = DWORD($FFFFFD00);
+
+type
+ _BrowseDlgConfig_HW = record
+ // Configuration flags
+ dwConfigFlags: DWORD;
+ hWndOwner: HWND;
+ hDataSource: PDH_HLOG;
+ szReturnPathBuffer: LPWSTR;
+ cchReturnPathLength: DWORD;
+ pCallBack: CounterPathCallBack;
+ dwCallBackArg: DWORD_PTR;
+ CallBackStatus: PDH_STATUS;
+ dwDefaultDetailLevel: DWORD;
+ szDialogBoxCaption: LPWSTR;
+ end;
+ {$EXTERNALSYM _BrowseDlgConfig_HW}
+ PDH_BROWSE_DLG_CONFIG_HW = _BrowseDlgConfig_HW;
+ {$EXTERNALSYM PDH_BROWSE_DLG_CONFIG_HW}
+ PPDH_BROWSE_DLG_CONFIG_HW = ^PDH_BROWSE_DLG_CONFIG_HW;
+ {$EXTERNALSYM PPDH_BROWSE_DLG_CONFIG_HW}
+ TPdhBrowseDlgConfigHW = PDH_BROWSE_DLG_CONFIG_HW;
+ PPdhBrowseDlgConfigHW = PPDH_BROWSE_DLG_CONFIG_HW;
+
+ _BrowseDlgConfig_HA = record
+ // Configuration flags
+ dwConfigFlags: DWORD;
+ hWndOwner: HWND;
+ hDataSource: PDH_HLOG;
+ szReturnPathBuffer: LPSTR;
+ cchReturnPathLength: DWORD;
+ pCallBack: CounterPathCallBack;
+ dwCallBackArg: DWORD_PTR;
+ CallBackStatus: PDH_STATUS;
+ dwDefaultDetailLevel: DWORD;
+ szDialogBoxCaption: LPSTR;
+ end;
+ {$EXTERNALSYM _BrowseDlgConfig_HA}
+ PDH_BROWSE_DLG_CONFIG_HA = _BrowseDlgConfig_HA;
+ {$EXTERNALSYM PDH_BROWSE_DLG_CONFIG_HA}
+ PPDH_BROWSE_DLG_CONFIG_HA = ^PDH_BROWSE_DLG_CONFIG_HA;
+ {$EXTERNALSYM PPDH_BROWSE_DLG_CONFIG_HA}
+ TPdhBrowseDlgConfigHA = PDH_BROWSE_DLG_CONFIG_HA;
+ PPdhBrowseDlgConfigHA = PPDH_BROWSE_DLG_CONFIG_HA;
+
+ {$IFDEF UNICODE}
+ PDH_BROWSE_DLG_CONFIG_H = PDH_BROWSE_DLG_CONFIG_HW;
+ PPDH_BROWSE_DLG_CONFIG_H = PPDH_BROWSE_DLG_CONFIG_HW;
+ {$ELSE}
+ PDH_BROWSE_DLG_CONFIG_H = PDH_BROWSE_DLG_CONFIG_HA;
+ PPDH_BROWSE_DLG_CONFIG_H = PPDH_BROWSE_DLG_CONFIG_HA;
+ {$ENDIF UNICODE}
+
+ PPDH_BROWSE_DLG_CONFIG_A = ^_BrowseDlgConfig_A;
+ {$EXTERNALSYM PPDH_BROWSE_DLG_CONFIG_A}
+ _BrowseDlgConfig_A = record
+ dwConfigFlags: DWORD;
+ hWndOwner: HWND;
+ szDataSource: LPSTR;
+ szReturnPathBuffer: LPSTR;
+ cchReturnPathLength: DWORD;
+ pCallBack: CounterPathCallBack;
+ dwCallBackArg: DWORD_PTR;
+ CallBackStatus: PDH_STATUS;
+ dwDefaultDetailLevel: DWORD;
+ szDialogBoxCaption: LPSTR;
+ end;
+ {$EXTERNALSYM _BrowseDlgConfig_A}
+ PDH_BROWSE_DLG_CONFIG_A = _BrowseDlgConfig_A;
+ {$EXTERNALSYM PDH_BROWSE_DLG_CONFIG_A}
+ TPdhBrowseDlgConfigA = PDH_BROWSE_DLG_CONFIG_A;
+ PPdhBrowseDlgConfigA = PPDH_BROWSE_DLG_CONFIG_A;
+
+ PPDH_BROWSE_DLG_CONFIG_W = ^_BrowseDlgConfig_W;
+ {$EXTERNALSYM PPDH_BROWSE_DLG_CONFIG_W}
+ _BrowseDlgConfig_W = record
+ dwConfigFlags: DWORD;
+ hWndOwner: HWND;
+ szDataSource: LPWSTR;
+ szReturnPathBuffer: LPWSTR;
+ cchReturnPathLength: DWORD;
+ pCallBack: CounterPathCallBack;
+ dwCallBackArg: DWORD_PTR;
+ CallBackStatus: PDH_STATUS;
+ dwDefaultDetailLevel: DWORD;
+ szDialogBoxCaption: LPWSTR;
+ end;
+ {$EXTERNALSYM _BrowseDlgConfig_W}
+ PDH_BROWSE_DLG_CONFIG_W = _BrowseDlgConfig_W;
+ {$EXTERNALSYM PDH_BROWSE_DLG_CONFIG_W}
+ TPdhBrowseDlgConfigW = PDH_BROWSE_DLG_CONFIG_W;
+ PPdhBrowseDlgConfigW = PPDH_BROWSE_DLG_CONFIG_W;
+
+ {$IFDEF UNICODE}
+ PPdhBrowseDlgConfig = PPdhBrowseDlgConfigW;
+ PDH_BROWSE_DLG_CONFIG = PDH_BROWSE_DLG_CONFIG_W;
+ {$EXTERNALSYM PDH_BROWSE_DLG_CONFIG}
+ PPDH_BROWSE_DLG_CONFIG = PPDH_BROWSE_DLG_CONFIG_W;
+ {$EXTERNALSYM PPDH_BROWSE_DLG_CONFIG}
+ TPdhBrowseDlgConfig = TPdhBrowseDlgConfigW;
+ {$ELSE}
+ PPdhBrowseDlgConfig = PPdhBrowseDlgConfigA;
+ PDH_BROWSE_DLG_CONFIG = PDH_BROWSE_DLG_CONFIG_A;
+ {$EXTERNALSYM PDH_BROWSE_DLG_CONFIG}
+ PPDH_BROWSE_DLG_CONFIG = PPDH_BROWSE_DLG_CONFIG_A;
+ {$EXTERNALSYM PPDH_BROWSE_DLG_CONFIG}
+ TPdhBrowseDlgConfig = TPdhBrowseDlgConfigA;
+ {$ENDIF UNICODE}
+
+function PdhBrowseCountersA(const pBrowseDlgData: PDH_BROWSE_DLG_CONFIG_A): PDH_STATUS; stdcall;
+{$EXTERNALSYM PdhBrowseCountersA}
+function PdhBrowseCountersW(const pBrowseDlgData: PDH_BROWSE_DLG_CONFIG_W): PDH_STATUS; stdcall;
+{$EXTERNALSYM PdhBrowseCountersW}
+function PdhBrowseCounters(const pBrowseDlgData: PDH_BROWSE_DLG_CONFIG): PDH_STATUS; stdcall;
+{$EXTERNALSYM PdhBrowseCounters}
+
+function PdhExpandCounterPathA(szWildCardPath: LPCSTR; mszExpandedPathList: LPSTR;
+ var pcchPathListLength: DWORD): PDH_STATUS; stdcall;
+{$EXTERNALSYM PdhExpandCounterPathA}
+function PdhExpandCounterPathW(szWildCardPath: LPCWSTR; mszExpandedPathList: LPWSTR;
+ var pcchPathListLength: DWORD): PDH_STATUS; stdcall;
+{$EXTERNALSYM PdhExpandCounterPathW}
+function PdhExpandCounterPath(szWildCardPath: LPCTSTR; mszExpandedPathList: LPTSTR;
+ var pcchPathListLength: DWORD): PDH_STATUS; stdcall;
+{$EXTERNALSYM PdhExpandCounterPath}
+
+//
+// v2.0 functions
+//
+
+function PdhLookupPerfNameByIndexA(szMachineName: LPCSTR; dwNameIndex: DWORD;
+ szNameBuffer: LPSTR; var pcchNameBufferSize: DWORD): PDH_STATUS; stdcall;
+{$EXTERNALSYM PdhLookupPerfNameByIndexA}
+function PdhLookupPerfNameByIndexW(szMachineName: LPCWSTR; dwNameIndex: DWORD;
+ szNameBuffer: LPWSTR; var pcchNameBufferSize: DWORD): PDH_STATUS; stdcall;
+{$EXTERNALSYM PdhLookupPerfNameByIndexW}
+function PdhLookupPerfNameByIndex(szMachineName: LPCTSTR; dwNameIndex: DWORD;
+ szNameBuffer: LPTSTR; var pcchNameBufferSize: DWORD): PDH_STATUS; stdcall;
+{$EXTERNALSYM PdhLookupPerfNameByIndex}
+
+function PdhLookupPerfIndexByNameA(szMachineName, szNameBuffer: LPCSTR;
+ var pdwIndex: DWORD): PDH_STATUS; stdcall;
+{$EXTERNALSYM PdhLookupPerfIndexByNameA}
+function PdhLookupPerfIndexByNameW(szMachineName, szNameBuffer: LPCWSTR;
+ var pdwIndex: DWORD): PDH_STATUS; stdcall;
+{$EXTERNALSYM PdhLookupPerfIndexByNameW}
+function PdhLookupPerfIndexByName(szMachineName, szNameBuffer: LPCTSTR;
+ var pdwIndex: DWORD): PDH_STATUS; stdcall;
+{$EXTERNALSYM PdhLookupPerfIndexByName}
+
+const
+ PDH_NOEXPANDCOUNTERS = 1;
+ {$EXTERNALSYM PDH_NOEXPANDCOUNTERS}
+ PDH_NOEXPANDINSTANCES = 2;
+ {$EXTERNALSYM PDH_NOEXPANDINSTANCES}
+ PDH_REFRESHCOUNTERS = 4;
+ {$EXTERNALSYM PDH_REFRESHCOUNTERS}
+
+function PdhExpandWildCardPathA(szDataSource, szWildCardPath: LPCSTR;
+ mszExpandedPathList: LPSTR; var pcchPathListLength: DWORD; dwFlags: DWORD): PDH_STATUS; stdcall;
+{$EXTERNALSYM PdhExpandWildCardPathA}
+function PdhExpandWildCardPathW(szDataSource, szWildCardPath: LPCWSTR;
+ mszExpandedPathList: LPWSTR; var pcchPathListLength: DWORD; dwFlags: DWORD): PDH_STATUS; stdcall;
+{$EXTERNALSYM PdhExpandWildCardPathW}
+function PdhExpandWildCardPath(szDataSource, szWildCardPath: LPCTSTR;
+ mszExpandedPathList: LPTSTR; var pcchPathListLength: DWORD; dwFlags: DWORD): PDH_STATUS; stdcall;
+{$EXTERNALSYM PdhExpandWildCardPath}
+
+//
+// Logging Functions
+//
+
+const
+ PDH_LOG_READ_ACCESS = DWORD($00010000);
+ {$EXTERNALSYM PDH_LOG_READ_ACCESS}
+ PDH_LOG_WRITE_ACCESS = DWORD($00020000);
+ {$EXTERNALSYM PDH_LOG_WRITE_ACCESS}
+ PDH_LOG_UPDATE_ACCESS = DWORD($00040000);
+ {$EXTERNALSYM PDH_LOG_UPDATE_ACCESS}
+ PDH_LOG_ACCESS_MASK = DWORD($000F0000);
+ {$EXTERNALSYM PDH_LOG_ACCESS_MASK}
+
+ PDH_LOG_CREATE_NEW = DWORD($00000001);
+ {$EXTERNALSYM PDH_LOG_CREATE_NEW}
+ PDH_LOG_CREATE_ALWAYS = DWORD($00000002);
+ {$EXTERNALSYM PDH_LOG_CREATE_ALWAYS}
+ PDH_LOG_OPEN_ALWAYS = DWORD($00000003);
+ {$EXTERNALSYM PDH_LOG_OPEN_ALWAYS}
+ PDH_LOG_OPEN_EXISTING = DWORD($00000004);
+ {$EXTERNALSYM PDH_LOG_OPEN_EXISTING}
+ PDH_LOG_CREATE_MASK = DWORD($0000000F);
+ {$EXTERNALSYM PDH_LOG_CREATE_MASK}
+
+ PDH_LOG_OPT_USER_STRING = DWORD($01000000);
+ {$EXTERNALSYM PDH_LOG_OPT_USER_STRING}
+ PDH_LOG_OPT_CIRCULAR = DWORD($02000000);
+ {$EXTERNALSYM PDH_LOG_OPT_CIRCULAR}
+ PDH_LOG_OPT_MAX_IS_BYTES = DWORD($04000000);
+ {$EXTERNALSYM PDH_LOG_OPT_MAX_IS_BYTES}
+ PDH_LOG_OPT_APPEND = DWORD($08000000);
+ {$EXTERNALSYM PDH_LOG_OPT_APPEND}
+ PDH_LOG_OPT_MASK = DWORD($0F000000);
+ {$EXTERNALSYM PDH_LOG_OPT_MASK}
+
+ PDH_LOG_TYPE_UNDEFINED = 0;
+ {$EXTERNALSYM PDH_LOG_TYPE_UNDEFINED}
+ PDH_LOG_TYPE_CSV = 1;
+ {$EXTERNALSYM PDH_LOG_TYPE_CSV}
+ PDH_LOG_TYPE_TSV = 2;
+ {$EXTERNALSYM PDH_LOG_TYPE_TSV}
+ //PDH_LOG_TYPE_BINARY = 3; // this is the retired binary format
+ //{$EXTERNALSYM PDH_LOG_TYPE_BINARY}
+ PDH_LOG_TYPE_TRACE_KERNEL = 4;
+ {$EXTERNALSYM PDH_LOG_TYPE_TRACE_KERNEL}
+ PDH_LOG_TYPE_TRACE_GENERIC = 5;
+ {$EXTERNALSYM PDH_LOG_TYPE_TRACE_GENERIC}
+ PDH_LOG_TYPE_PERFMON = 6;
+ {$EXTERNALSYM PDH_LOG_TYPE_PERFMON}
+ PDH_LOG_TYPE_SQL = 7;
+ {$EXTERNALSYM PDH_LOG_TYPE_SQL}
+ PDH_LOG_TYPE_BINARY = 8;
+ {$EXTERNALSYM PDH_LOG_TYPE_BINARY}
+
+function PdhOpenLogA(szLogFileName: LPCSTR; dwAccessFlags: DWORD;
+ lpdwLogType: LPDWORD; hQuery: PDH_HQUERY; dwMaxRecords: DWORD;
+ szUserCaption: LPCSTR; var phLog: PDH_HLOG): PDH_STATUS; stdcall;
+{$EXTERNALSYM PdhOpenLogA}
+function PdhOpenLogW(szLogFileName: LPCWSTR; dwAccessFlags: DWORD;
+ lpdwLogType: LPDWORD; hQuery: PDH_HQUERY; dwMaxRecords: DWORD;
+ szUserCaption: LPCWSTR; var phLog: PDH_HLOG): PDH_STATUS; stdcall;
+{$EXTERNALSYM PdhOpenLogW}
+function PdhOpenLog(szLogFileName: LPCTSTR; dwAccessFlags: DWORD;
+ lpdwLogType: LPDWORD; hQuery: PDH_HQUERY; dwMaxRecords: DWORD;
+ szUserCaption: LPCTSTR; var phLog: PDH_HLOG): PDH_STATUS; stdcall;
+{$EXTERNALSYM PdhOpenLog}
+
+function PdhUpdateLogA(hLog: PDH_HLOG; szUserString: LPCSTR): PDH_STATUS; stdcall;
+{$EXTERNALSYM PdhUpdateLogA}
+function PdhUpdateLogW(hLog: PDH_HLOG; szUserString: LPCWSTR): PDH_STATUS; stdcall;
+{$EXTERNALSYM PdhUpdateLogW}
+function PdhUpdateLog(hLog: PDH_HLOG; szUserString: LPCTSTR): PDH_STATUS; stdcall;
+{$EXTERNALSYM PdhUpdateLog}
+
+function PdhUpdateLogFileCatalog(hLog: PDH_HLOG): PDH_STATUS; stdcall;
+{$EXTERNALSYM PdhUpdateLogFileCatalog}
+
+function PdhGetLogFileSize(hLog: PDH_HLOG; var llSize: LONGLONG): PDH_STATUS; stdcall;
+{$EXTERNALSYM PdhGetLogFileSize}
+
+function PdhCloseLog(hLog: PDH_HLOG; dwFlags: DWORD): PDH_STATUS; stdcall;
+{$EXTERNALSYM PdhCloseLog}
+
+const
+ PDH_FLAGS_CLOSE_QUERY = DWORD($00000001);
+ {$EXTERNALSYM PDH_FLAGS_CLOSE_QUERY}
+
+//
+// Data source selection dialog
+//
+
+const
+ PDH_FLAGS_FILE_BROWSER_ONLY = DWORD($00000001);
+ {$EXTERNALSYM PDH_FLAGS_FILE_BROWSER_ONLY}
+
+function PdhSelectDataSourceA(hWndOwner: HWND; dwFlags: DWORD;
+ szDataSource: LPSTR; var pcchBufferLength: DWORD): PDH_STATUS; stdcall;
+{$EXTERNALSYM PdhSelectDataSourceA}
+function PdhSelectDataSourceW(hWndOwner: HWND; dwFlags: DWORD;
+ szDataSource: LPWSTR; var pcchBufferLength: DWORD): PDH_STATUS; stdcall;
+{$EXTERNALSYM PdhSelectDataSourceW}
+function PdhSelectDataSource(hWndOwner: HWND; dwFlags: DWORD;
+ szDataSource: LPTSTR; var pcchBufferLength: DWORD): PDH_STATUS; stdcall;
+{$EXTERNALSYM PdhSelectDataSource}
+
+function PdhIsRealTimeQuery(hQuery: PDH_HQUERY): BOOL; stdcall;
+{$EXTERNALSYM PdhIsRealTimeQuery}
+
+function PdhSetQueryTimeRange(hQuery: PDH_HQUERY; var pInfo: PDH_TIME_INFO): PDH_STATUS; stdcall;
+{$EXTERNALSYM PdhSetQueryTimeRange}
+
+function PdhGetDataSourceTimeRangeA(szDataSource: LPCSTR; var pdwNumEntries: DWORD;
+ var pInfo: PDH_TIME_INFO; pdwBufferSize: LPDWORD): PDH_STATUS; stdcall;
+{$EXTERNALSYM PdhGetDataSourceTimeRangeA}
+function PdhGetDataSourceTimeRangeW(szDataSource: LPCWSTR; var pdwNumEntries: DWORD;
+ var pInfo: PDH_TIME_INFO; pdwBufferSize: LPDWORD): PDH_STATUS; stdcall;
+{$EXTERNALSYM PdhGetDataSourceTimeRangeW}
+function PdhGetDataSourceTimeRange(szDataSource: LPCTSTR; var pdwNumEntries: DWORD;
+ var pInfo: PDH_TIME_INFO; pdwBufferSize: LPDWORD): PDH_STATUS; stdcall;
+{$EXTERNALSYM PdhGetDataSourceTimeRange}
+
+function PdhCollectQueryDataEx(hQuery: PDH_HQUERY; dwIntervalTime: DWORD;
+ hNewDataEvent: HANDLE): PDH_STATUS; stdcall;
+{$EXTERNALSYM PdhCollectQueryDataEx}
+
+function PdhFormatFromRawValue(dwCounterType, dwFormat: DWORD;
+ var pTimeBase: LONGLONG; pRawValue1, pRawValue2: PPDH_RAW_COUNTER;
+ var pFmtValue: PDH_FMT_COUNTERVALUE): PDH_STATUS; stdcall;
+{$EXTERNALSYM PdhFormatFromRawValue}
+
+function PdhGetCounterTimeBase(hCounter: PDH_HCOUNTER; var pTimeBase: LONGLONG): PDH_STATUS; stdcall;
+{$EXTERNALSYM PdhGetCounterTimeBase}
+
+function PdhReadRawLogRecord(hLog: PDH_HLOG; ftRecord: FILETIME;
+ var pRawLogRecord: PDH_RAW_LOG_RECORD; pdwBufferLength: LPDWORD): PDH_STATUS; stdcall;
+{$EXTERNALSYM PdhReadRawLogRecord}
+
+const
+ DATA_SOURCE_REGISTRY = DWORD($00000001);
+ {$EXTERNALSYM DATA_SOURCE_REGISTRY}
+ DATA_SOURCE_LOGFILE = DWORD($00000002);
+ {$EXTERNALSYM DATA_SOURCE_LOGFILE}
+ DATA_SOURCE_WBEM = DWORD($00000004);
+ {$EXTERNALSYM DATA_SOURCE_WBEM}
+
+function PdhSetDefaultRealTimeDataSource(dwDataSourceId: DWORD): PDH_STATUS; stdcall;
+{$EXTERNALSYM PdhSetDefaultRealTimeDataSource}
+
+// Extended API for WMI event trace logfile format
+//
+
+function PdhBindInputDataSourceW(var phDataSource: PDH_HLOG; LogFileNameList: LPCWSTR): PDH_STATUS; stdcall;
+{$EXTERNALSYM PdhBindInputDataSourceW}
+function PdhBindInputDataSourceA(var phDataSource: PDH_HLOG; LogFileNameList: LPCSTR): PDH_STATUS; stdcall;
+{$EXTERNALSYM PdhBindInputDataSourceA}
+function PdhBindInputDataSource(var phDataSource: PDH_HLOG; LogFileNameList: LPCTSTR): PDH_STATUS; stdcall;
+{$EXTERNALSYM PdhBindInputDataSource}
+
+function PdhOpenQueryH(hDataSource: PDH_HLOG; dwUserData: DWORD_PTR; var phQuery: PDH_HQUERY): PDH_STATUS; stdcall;
+{$EXTERNALSYM PdhOpenQueryH}
+
+function PdhEnumMachinesHW(hDataSource: PDH_HLOG; mszMachineList: LPWSTR; pcchBufferSize: LPDWORD): PDH_STATUS; stdcall;
+{$EXTERNALSYM PdhEnumMachinesHW}
+function PdhEnumMachinesHA(hDataSource: PDH_HLOG; mszMachineList: LPSTR; pcchBufferSize: LPDWORD): PDH_STATUS; stdcall;
+{$EXTERNALSYM PdhEnumMachinesHA}
+function PdhEnumMachinesH(hDataSource: PDH_HLOG; mszMachineList: LPTSTR; pcchBufferSize: LPDWORD): PDH_STATUS; stdcall;
+{$EXTERNALSYM PdhEnumMachinesH}
+
+function PdhEnumObjectsHA(hDataSource: PDH_HLOG; szMachineName: LPCSTR; mszObjectList: LPSTR; pcchBufferSize: LPDWORD;
+ dwDetailLevel: DWORD; bRefresh: BOOL): PDH_STATUS; stdcall;
+{$EXTERNALSYM PdhEnumObjectsHA}
+function PdhEnumObjectsHW(hDataSource: PDH_HLOG; szMachineName: LPCWSTR; mszObjectList: LPWSTR; pcchBufferSize: LPDWORD;
+ dwDetailLevel: DWORD; bRefresh: BOOL): PDH_STATUS; stdcall;
+{$EXTERNALSYM PdhEnumObjectsHW}
+function PdhEnumObjectsH(hDataSource: PDH_HLOG; szMachineName: LPCTSTR; mszObjectList: LPWSTR; pcchBufferSize: LPDWORD;
+ dwDetailLevel: DWORD; bRefresh: BOOL): PDH_STATUS; stdcall;
+{$EXTERNALSYM PdhEnumObjectsH}
+
+function PdhEnumObjectItemsHA(hDataSource: PDH_HLOG; szMachineName, szObjectName: LPCSTR; mszCounterList: LPSTR;
+ pcchCounterListLength: LPDWORD; mszInstanceList: LPSTR; pcchInstanceListLength: LPDWORD;
+ dwDetailLevel, dwFlags: DWORD): PDH_STATUS; stdcall;
+{$EXTERNALSYM PdhEnumObjectItemsHA}
+function PdhEnumObjectItemsHW(hDataSource: PDH_HLOG; szMachineName, szObjectName: LPCWSTR; mszCounterList: LPWSTR;
+ pcchCounterListLength: LPDWORD; mszInstanceList: LPWSTR; pcchInstanceListLength: LPDWORD;
+ dwDetailLevel, dwFlags: DWORD): PDH_STATUS; stdcall;
+{$EXTERNALSYM PdhEnumObjectItemsHW}
+function PdhEnumObjectItemsH(hDataSource: PDH_HLOG; szMachineName, szObjectName: LPCTSTR; mszCounterList: LPTSTR;
+ pcchCounterListLength: LPDWORD; mszInstanceList: LPTSTR; pcchInstanceListLength: LPDWORD;
+ dwDetailLevel, dwFlags: DWORD): PDH_STATUS; stdcall;
+{$EXTERNALSYM PdhEnumObjectItemsH}
+
+function PdhExpandWildCardPathHA(hDataSource: PDH_HLOG; szWildCardPath: LPCSTR; mszExpandedPathList: LPSTR;
+ pcchPathListLength: LPDWORD; dwFlags: DWORD): PDH_STATUS; stdcall;
+{$EXTERNALSYM PdhExpandWildCardPathHA}
+function PdhExpandWildCardPathHW(hDataSource: PDH_HLOG; szWildCardPath: LPCWSTR; mszExpandedPathList: LPWSTR;
+ pcchPathListLength: LPDWORD; dwFlags: DWORD): PDH_STATUS; stdcall;
+{$EXTERNALSYM PdhExpandWildCardPathHW}
+function PdhExpandWildCardPathH(hDataSource: PDH_HLOG; szWildCardPath: LPCTSTR; mszExpandedPathList: LPTSTR;
+ pcchPathListLength: LPDWORD; dwFlags: DWORD): PDH_STATUS; stdcall;
+{$EXTERNALSYM PdhExpandWildCardPathH}
+
+function PdhGetDataSourceTimeRangeH(hDataSource: PDH_HLOG; pdwNumEntries: LPDWORD; pInfo: PPDH_TIME_INFO;
+ pdwBufferSize: LPDWORD): PDH_STATUS; stdcall;
+{$EXTERNALSYM PdhGetDataSourceTimeRangeH}
+
+function PdhGetDefaultPerfObjectHW(hDataSource: PDH_HLOG; szMachineName: LPCWSTR; szDefaultObjectName: LPWSTR;
+ pcchBufferSize: LPDWORD): PDH_STATUS; stdcall;
+{$EXTERNALSYM PdhGetDefaultPerfObjectHW}
+function PdhGetDefaultPerfObjectHA(hDataSource: PDH_HLOG; szMachineName: LPCSTR; szDefaultObjectName: LPSTR;
+ pcchBufferSize: LPDWORD): PDH_STATUS; stdcall;
+{$EXTERNALSYM PdhGetDefaultPerfObjectHA}
+function PdhGetDefaultPerfObjectH(hDataSource: PDH_HLOG; szMachineName: LPCTSTR; szDefaultObjectName: LPTSTR;
+ pcchBufferSize: LPDWORD): PDH_STATUS; stdcall;
+{$EXTERNALSYM PdhGetDefaultPerfObjectH}
+
+function PdhGetDefaultPerfCounterHW(hDataSource: PDH_HLOG; szMachineName, szObjectName: LPCWSTR;
+ szDefaultCounterName: LPWSTR; pcchBufferSize: LPDWORD): PDH_STATUS; stdcall;
+{$EXTERNALSYM PdhGetDefaultPerfCounterHW}
+function PdhGetDefaultPerfCounterHA(hDataSource: PDH_HLOG; szMachineName, szObjectName: LPCSTR;
+ szDefaultCounterName: LPSTR; pcchBufferSize: LPDWORD): PDH_STATUS; stdcall;
+{$EXTERNALSYM PdhGetDefaultPerfCounterHA}
+function PdhGetDefaultPerfCounterH(hDataSource: PDH_HLOG; szMachineName, szObjectName: LPCTSTR;
+ szDefaultCounterName: LPTSTR; pcchBufferSize: LPDWORD): PDH_STATUS; stdcall;
+{$EXTERNALSYM PdhGetDefaultPerfCounterH}
+
+function PdhBrowseCountersHW(const pBrowseDlgData: PDH_BROWSE_DLG_CONFIG_HW): PDH_STATUS; stdcall;
+{$EXTERNALSYM PdhBrowseCountersHW}
+function PdhBrowseCountersHA(const pBrowseDlgData: PDH_BROWSE_DLG_CONFIG_HA): PDH_STATUS; stdcall;
+{$EXTERNALSYM PdhBrowseCountersHA}
+function PdhBrowseCountersH(const pBrowseDlgData: PDH_BROWSE_DLG_CONFIG_H): PDH_STATUS; stdcall;
+{$EXTERNALSYM PdhBrowseCountersH}
+
+//Check that a DSN points to a database that contains the correct Perfmon tables.
+
+function PdhVerifySQLDBW(szDataSource: LPCWSTR): PDH_STATUS; stdcall;
+{$EXTERNALSYM PdhVerifySQLDBW}
+function PdhVerifySQLDBA(szDataSource: LPCSTR): PDH_STATUS; stdcall;
+{$EXTERNALSYM PdhVerifySQLDBA}
+function PdhVerifySQLDB(szDataSource: LPCTSTR): PDH_STATUS; stdcall;
+{$EXTERNALSYM PdhVerifySQLDB}
+
+//Create the correct perfmon tables in the database pointed to by a DSN.
+
+function PdhCreateSQLTablesW(szDataSource: LPCWSTR): PDH_STATUS; stdcall;
+{$EXTERNALSYM PdhCreateSQLTablesW}
+function PdhCreateSQLTablesA(szDataSource: LPCSTR): PDH_STATUS; stdcall;
+{$EXTERNALSYM PdhCreateSQLTablesA}
+function PdhCreateSQLTables(szDataSource: LPCTSTR): PDH_STATUS; stdcall;
+{$EXTERNALSYM PdhCreateSQLTables}
+
+//Return the list of Log set names in the database pointed to by the DSN.
+
+function PdhEnumLogSetNamesW(szDataSource: LPCWSTR; mszDataSetNameList: LPWSTR; pcchBufferLength: LPDWORD): PDH_STATUS; stdcall;
+{$EXTERNALSYM PdhEnumLogSetNamesW}
+function PdhEnumLogSetNamesA(szDataSource: LPCSTR; mszDataSetNameList: LPSTR; pcchBufferLength: LPDWORD): PDH_STATUS; stdcall;
+{$EXTERNALSYM PdhEnumLogSetNamesA}
+function PdhEnumLogSetNames(szDataSource: LPCTSTR; mszDataSetNameList: LPTSTR; pcchBufferLength: LPDWORD): PDH_STATUS; stdcall;
+{$EXTERNALSYM PdhEnumLogSetNames}
+
+//Retrieve the GUID for an open Log Set
+
+function PdhGetLogSetGUID(hLog: PDH_HLOG; pGuid: LPGUID; pRunId: LPINT): PDH_STATUS; stdcall;
+{$EXTERNALSYM PdhGetLogSetGUID}
+
+//Set the RunID for an open Log Set
+
+function PdhSetLogSetRunID(hLog: PDH_HLOG; RunId: Integer): PDH_STATUS; stdcall;
+{$EXTERNALSYM PdhSetLogSetRunID}
+
+implementation
+
+const
+ PdhLib = 'pdh.dll';
+ {$IFDEF UNICODE}
+ AWSuffix = 'W';
+ {$ELSE}
+ AWSuffix = 'A';
+ {$ENDIF UNICODE}
+
+function IsSuccessSeverity(ErrorCode: Longint): Boolean;
+begin
+ Result := (ErrorCode and $C0000000) = $00000000;
+end;
+
+function IsInformationalSeverity(ErrorCode: Longint): Boolean;
+begin
+ Result := (ErrorCode and $C0000000) = $40000000;
+end;
+
+function IsWarningSeverity(ErrorCode: Longint): Boolean;
+begin
+ Result := (ErrorCode and $C0000000) = $80000000;
+end;
+
+function IsErrorSeverity(ErrorCode: Longint): Boolean;
+begin
+ Result := (ErrorCode and $C0000000) = $C0000000;
+end;
+
+function PDH_PATH_LANG_FLAGS(LangId, Flags: DWORD): DWORD;
+begin
+ Result := DWORD(((LangId and $0000FFFF) shl 16) or (Flags and $0000FFFF));
+end;
+
+{$IFDEF DYNAMIC_LINK}
+
+var
+ _PdhGetDllVersion: Pointer;
+
+function PdhGetDllVersion;
+begin
+ GetProcedureAddress(_PdhGetDllVersion, PdhLib, 'PdhGetDllVersion');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PdhGetDllVersion]
+ end;
+end;
+
+var
+ _PdhOpenQueryA: Pointer;
+
+function PdhOpenQueryA;
+begin
+ GetProcedureAddress(_PdhOpenQueryA, PdhLib, 'PdhOpenQueryA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PdhOpenQueryA]
+ end;
+end;
+
+var
+ _PdhOpenQueryW: Pointer;
+
+function PdhOpenQueryW;
+begin
+ GetProcedureAddress(_PdhOpenQueryW, PdhLib, 'PdhOpenQueryW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PdhOpenQueryW]
+ end;
+end;
+
+var
+ _PdhOpenQuery: Pointer;
+
+function PdhOpenQuery;
+begin
+ GetProcedureAddress(_PdhOpenQuery, PdhLib, 'PdhOpenQuery' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PdhOpenQuery]
+ end;
+end;
+
+var
+ _PdhAddCounterA: Pointer;
+
+function PdhAddCounterA;
+begin
+ GetProcedureAddress(_PdhAddCounterA, PdhLib, 'PdhAddCounterA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PdhAddCounterA]
+ end;
+end;
+
+var
+ _PdhAddCounterW: Pointer;
+
+function PdhAddCounterW;
+begin
+ GetProcedureAddress(_PdhAddCounterW, PdhLib, 'PdhAddCounterW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PdhAddCounterW]
+ end;
+end;
+
+var
+ _PdhAddCounter: Pointer;
+
+function PdhAddCounter;
+begin
+ GetProcedureAddress(_PdhAddCounter, PdhLib, 'PdhAddCounter' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PdhAddCounter]
+ end;
+end;
+
+var
+ _PdhRemoveCounter: Pointer;
+
+function PdhRemoveCounter;
+begin
+ GetProcedureAddress(_PdhRemoveCounter, PdhLib, 'PdhRemoveCounter');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PdhRemoveCounter]
+ end;
+end;
+
+var
+ _PdhCollectQueryData: Pointer;
+
+function PdhCollectQueryData;
+begin
+ GetProcedureAddress(_PdhCollectQueryData, PdhLib, 'PdhCollectQueryData');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PdhCollectQueryData]
+ end;
+end;
+
+var
+ _PdhCloseQuery: Pointer;
+
+function PdhCloseQuery;
+begin
+ GetProcedureAddress(_PdhCloseQuery, PdhLib, 'PdhCloseQuery');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PdhCloseQuery]
+ end;
+end;
+
+var
+ _PdhGetFormattedCounterValue: Pointer;
+
+function PdhGetFormattedCounterValue;
+begin
+ GetProcedureAddress(_PdhGetFormattedCounterValue, PdhLib, 'PdhGetFormattedCounterValue');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PdhGetFormattedCounterValue]
+ end;
+end;
+
+var
+ _PdhGetFormattedCounterArrayA: Pointer;
+
+function PdhGetFormattedCounterArrayA;
+begin
+ GetProcedureAddress(_PdhGetFormattedCounterArrayA, PdhLib, 'PdhGetFormattedCounterArrayA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PdhGetFormattedCounterArrayA]
+ end;
+end;
+
+var
+ _PdhGetFormattedCounterArrayW: Pointer;
+
+function PdhGetFormattedCounterArrayW;
+begin
+ GetProcedureAddress(_PdhGetFormattedCounterArrayW, PdhLib, 'PdhGetFormattedCounterArrayW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PdhGetFormattedCounterArrayW]
+ end;
+end;
+
+var
+ _PdhGetFormattedCounterArray: Pointer;
+
+function PdhGetFormattedCounterArray;
+begin
+ GetProcedureAddress(_PdhGetFormattedCounterArray, PdhLib, 'PdhGetFormattedCounterArray' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PdhGetFormattedCounterArray]
+ end;
+end;
+
+var
+ _PdhGetRawCounterValue: Pointer;
+
+function PdhGetRawCounterValue;
+begin
+ GetProcedureAddress(_PdhGetRawCounterValue, PdhLib, 'PdhGetRawCounterValue');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PdhGetRawCounterValue]
+ end;
+end;
+
+var
+ _PdhGetRawCounterArrayA: Pointer;
+
+function PdhGetRawCounterArrayA;
+begin
+ GetProcedureAddress(_PdhGetRawCounterArrayA, PdhLib, 'PdhGetRawCounterArrayA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PdhGetRawCounterArrayA]
+ end;
+end;
+
+var
+ _PdhGetRawCounterArrayW: Pointer;
+
+function PdhGetRawCounterArrayW;
+begin
+ GetProcedureAddress(_PdhGetRawCounterArrayW, PdhLib, 'PdhGetRawCounterArrayW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PdhGetRawCounterArrayW]
+ end;
+end;
+
+var
+ _PdhGetRawCounterArray: Pointer;
+
+function PdhGetRawCounterArray;
+begin
+ GetProcedureAddress(_PdhGetRawCounterArray, PdhLib, 'PdhGetRawCounterArray' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PdhGetRawCounterArray]
+ end;
+end;
+
+var
+ _PdhCalculateCounterFromRawValue: Pointer;
+
+function PdhCalculateCounterFromRawValue;
+begin
+ GetProcedureAddress(_PdhCalculateCounterFromRawValue, PdhLib, 'PdhCalculateCounterFromRawValue');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PdhCalculateCounterFromRawValue]
+ end;
+end;
+
+var
+ _PdhComputeCounterStatistics: Pointer;
+
+function PdhComputeCounterStatistics;
+begin
+ GetProcedureAddress(_PdhComputeCounterStatistics, PdhLib, 'PdhComputeCounterStatistics');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PdhComputeCounterStatistics]
+ end;
+end;
+
+var
+ _PdhGetCounterInfoA: Pointer;
+
+function PdhGetCounterInfoA;
+begin
+ GetProcedureAddress(_PdhGetCounterInfoA, PdhLib, 'PdhGetCounterInfoA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PdhGetCounterInfoA]
+ end;
+end;
+
+var
+ _PdhGetCounterInfoW: Pointer;
+
+function PdhGetCounterInfoW;
+begin
+ GetProcedureAddress(_PdhGetCounterInfoW, PdhLib, 'PdhGetCounterInfoW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PdhGetCounterInfoW]
+ end;
+end;
+
+var
+ _PdhGetCounterInfo: Pointer;
+
+function PdhGetCounterInfo;
+begin
+ GetProcedureAddress(_PdhGetCounterInfo, PdhLib, 'PdhGetCounterInfo' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PdhGetCounterInfo]
+ end;
+end;
+
+var
+ _PdhSetCounterScaleFactor: Pointer;
+
+function PdhSetCounterScaleFactor;
+begin
+ GetProcedureAddress(_PdhSetCounterScaleFactor, PdhLib, 'PdhSetCounterScaleFactor');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PdhSetCounterScaleFactor]
+ end;
+end;
+
+var
+ _PdhConnectMachineA: Pointer;
+
+function PdhConnectMachineA;
+begin
+ GetProcedureAddress(_PdhConnectMachineA, PdhLib, 'PdhConnectMachineA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PdhConnectMachineA]
+ end;
+end;
+
+var
+ _PdhConnectMachineW: Pointer;
+
+function PdhConnectMachineW;
+begin
+ GetProcedureAddress(_PdhConnectMachineW, PdhLib, 'PdhConnectMachineW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PdhConnectMachineW]
+ end;
+end;
+
+var
+ _PdhConnectMachine: Pointer;
+
+function PdhConnectMachine;
+begin
+ GetProcedureAddress(_PdhConnectMachine, PdhLib, 'PdhConnectMachine' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PdhConnectMachine]
+ end;
+end;
+
+var
+ _PdhEnumMachinesA: Pointer;
+
+function PdhEnumMachinesA;
+begin
+ GetProcedureAddress(_PdhEnumMachinesA, PdhLib, 'PdhEnumMachinesA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PdhEnumMachinesA]
+ end;
+end;
+
+var
+ _PdhEnumMachinesW: Pointer;
+
+function PdhEnumMachinesW;
+begin
+ GetProcedureAddress(_PdhEnumMachinesW, PdhLib, 'PdhEnumMachinesW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PdhEnumMachinesW]
+ end;
+end;
+
+var
+ _PdhEnumMachines: Pointer;
+
+function PdhEnumMachines;
+begin
+ GetProcedureAddress(_PdhEnumMachines, PdhLib, 'PdhEnumMachines' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PdhEnumMachines]
+ end;
+end;
+
+var
+ _PdhEnumObjectsA: Pointer;
+
+function PdhEnumObjectsA;
+begin
+ GetProcedureAddress(_PdhEnumObjectsA, PdhLib, 'PdhEnumObjectsA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PdhEnumObjectsA]
+ end;
+end;
+
+var
+ _PdhEnumObjectsW: Pointer;
+
+function PdhEnumObjectsW;
+begin
+ GetProcedureAddress(_PdhEnumObjectsW, PdhLib, 'PdhEnumObjectsW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PdhEnumObjectsW]
+ end;
+end;
+
+var
+ _PdhEnumObjects: Pointer;
+
+function PdhEnumObjects;
+begin
+ GetProcedureAddress(_PdhEnumObjects, PdhLib, 'PdhEnumObjects' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PdhEnumObjects]
+ end;
+end;
+
+var
+ _PdhEnumObjectItemsA: Pointer;
+
+function PdhEnumObjectItemsA;
+begin
+ GetProcedureAddress(_PdhEnumObjectItemsA, PdhLib, 'PdhEnumObjectItemsA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PdhEnumObjectItemsA]
+ end;
+end;
+
+var
+ _PdhEnumObjectItemsW: Pointer;
+
+function PdhEnumObjectItemsW;
+begin
+ GetProcedureAddress(_PdhEnumObjectItemsW, PdhLib, 'PdhEnumObjectItemsW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PdhEnumObjectItemsW]
+ end;
+end;
+
+var
+ _PdhEnumObjectItems: Pointer;
+
+function PdhEnumObjectItems;
+begin
+ GetProcedureAddress(_PdhEnumObjectItems, PdhLib, 'PdhEnumObjectItems' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PdhEnumObjectItems]
+ end;
+end;
+
+var
+ _PdhMakeCounterPathA: Pointer;
+
+function PdhMakeCounterPathA;
+begin
+ GetProcedureAddress(_PdhMakeCounterPathA, PdhLib, 'PdhMakeCounterPathA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PdhMakeCounterPathA]
+ end;
+end;
+
+var
+ _PdhMakeCounterPathW: Pointer;
+
+function PdhMakeCounterPathW;
+begin
+ GetProcedureAddress(_PdhMakeCounterPathW, PdhLib, 'PdhMakeCounterPathW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PdhMakeCounterPathW]
+ end;
+end;
+
+var
+ _PdhMakeCounterPath: Pointer;
+
+function PdhMakeCounterPath;
+begin
+ GetProcedureAddress(_PdhMakeCounterPath, PdhLib, 'PdhMakeCounterPath' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PdhMakeCounterPath]
+ end;
+end;
+
+var
+ _PdhParseCounterPathA: Pointer;
+
+function PdhParseCounterPathA;
+begin
+ GetProcedureAddress(_PdhParseCounterPathA, PdhLib, 'PdhParseCounterPathA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PdhParseCounterPathA]
+ end;
+end;
+
+var
+ _PdhParseCounterPathW: Pointer;
+
+function PdhParseCounterPathW;
+begin
+ GetProcedureAddress(_PdhParseCounterPathW, PdhLib, 'PdhParseCounterPathW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PdhParseCounterPathW]
+ end;
+end;
+
+var
+ _PdhParseCounterPath: Pointer;
+
+function PdhParseCounterPath;
+begin
+ GetProcedureAddress(_PdhParseCounterPath, PdhLib, 'PdhParseCounterPath' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PdhParseCounterPath]
+ end;
+end;
+
+var
+ _PdhParseInstanceNameA: Pointer;
+
+function PdhParseInstanceNameA;
+begin
+ GetProcedureAddress(_PdhParseInstanceNameA, PdhLib, 'PdhParseInstanceNameA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PdhParseInstanceNameA]
+ end;
+end;
+
+var
+ _PdhParseInstanceNameW: Pointer;
+
+function PdhParseInstanceNameW;
+begin
+ GetProcedureAddress(_PdhParseInstanceNameW, PdhLib, 'PdhParseInstanceNameW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PdhParseInstanceNameW]
+ end;
+end;
+
+var
+ _PdhParseInstanceName: Pointer;
+
+function PdhParseInstanceName;
+begin
+ GetProcedureAddress(_PdhParseInstanceName, PdhLib, 'PdhParseInstanceName' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PdhParseInstanceName]
+ end;
+end;
+
+var
+ _PdhValidatePathA: Pointer;
+
+function PdhValidatePathA;
+begin
+ GetProcedureAddress(_PdhValidatePathA, PdhLib, 'PdhValidatePathA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PdhValidatePathA]
+ end;
+end;
+
+var
+ _PdhValidatePathW: Pointer;
+
+function PdhValidatePathW;
+begin
+ GetProcedureAddress(_PdhValidatePathW, PdhLib, 'PdhValidatePathW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PdhValidatePathW]
+ end;
+end;
+
+var
+ _PdhValidatePath: Pointer;
+
+function PdhValidatePath;
+begin
+ GetProcedureAddress(_PdhValidatePath, PdhLib, 'PdhValidatePath' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PdhValidatePath]
+ end;
+end;
+
+var
+ _PdhGetDefaultPerfObjectA: Pointer;
+
+function PdhGetDefaultPerfObjectA;
+begin
+ GetProcedureAddress(_PdhGetDefaultPerfObjectA, PdhLib, 'PdhGetDefaultPerfObjectA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PdhGetDefaultPerfObjectA]
+ end;
+end;
+
+var
+ _PdhGetDefaultPerfObjectW: Pointer;
+
+function PdhGetDefaultPerfObjectW;
+begin
+ GetProcedureAddress(_PdhGetDefaultPerfObjectW, PdhLib, 'PdhGetDefaultPerfObjectW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PdhGetDefaultPerfObjectW]
+ end;
+end;
+
+var
+ _PdhGetDefaultPerfObject: Pointer;
+
+function PdhGetDefaultPerfObject;
+begin
+ GetProcedureAddress(_PdhGetDefaultPerfObject, PdhLib, 'PdhGetDefaultPerfObject' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PdhGetDefaultPerfObject]
+ end;
+end;
+
+var
+ _PdhGetDefaultPerfCounterA: Pointer;
+
+function PdhGetDefaultPerfCounterA;
+begin
+ GetProcedureAddress(_PdhGetDefaultPerfCounterA, PdhLib, 'PdhGetDefaultPerfCounterA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PdhGetDefaultPerfCounterA]
+ end;
+end;
+
+var
+ _PdhGetDefaultPerfCounterW: Pointer;
+
+function PdhGetDefaultPerfCounterW;
+begin
+ GetProcedureAddress(_PdhGetDefaultPerfCounterW, PdhLib, 'PdhGetDefaultPerfCounterW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PdhGetDefaultPerfCounterW]
+ end;
+end;
+
+var
+ _PdhGetDefaultPerfCounter: Pointer;
+
+function PdhGetDefaultPerfCounter;
+begin
+ GetProcedureAddress(_PdhGetDefaultPerfCounter, PdhLib, 'PdhGetDefaultPerfCounter' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PdhGetDefaultPerfCounter]
+ end;
+end;
+
+var
+ _PdhBrowseCountersA: Pointer;
+
+function PdhBrowseCountersA;
+begin
+ GetProcedureAddress(_PdhBrowseCountersA, PdhLib, 'PdhBrowseCountersA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PdhBrowseCountersA]
+ end;
+end;
+
+var
+ _PdhBrowseCountersW: Pointer;
+
+function PdhBrowseCountersW;
+begin
+ GetProcedureAddress(_PdhBrowseCountersW, PdhLib, 'PdhBrowseCountersW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PdhBrowseCountersW]
+ end;
+end;
+
+var
+ _PdhBrowseCounters: Pointer;
+
+function PdhBrowseCounters;
+begin
+ GetProcedureAddress(_PdhBrowseCounters, PdhLib, 'PdhBrowseCounters' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PdhBrowseCounters]
+ end;
+end;
+
+var
+ _PdhExpandCounterPathA: Pointer;
+
+function PdhExpandCounterPathA;
+begin
+ GetProcedureAddress(_PdhExpandCounterPathA, PdhLib, 'PdhExpandCounterPathA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PdhExpandCounterPathA]
+ end;
+end;
+
+var
+ _PdhExpandCounterPathW: Pointer;
+
+function PdhExpandCounterPathW;
+begin
+ GetProcedureAddress(_PdhExpandCounterPathW, PdhLib, 'PdhExpandCounterPathW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PdhExpandCounterPathW]
+ end;
+end;
+
+var
+ _PdhExpandCounterPath: Pointer;
+
+function PdhExpandCounterPath;
+begin
+ GetProcedureAddress(_PdhExpandCounterPath, PdhLib, 'PdhExpandCounterPath' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PdhExpandCounterPath]
+ end;
+end;
+
+var
+ _PdhLookupPerfNameByIndexA: Pointer;
+
+function PdhLookupPerfNameByIndexA;
+begin
+ GetProcedureAddress(_PdhLookupPerfNameByIndexA, PdhLib, 'PdhLookupPerfNameByIndexA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PdhLookupPerfNameByIndexA]
+ end;
+end;
+
+var
+ _PdhLookupPerfNameByIndexW: Pointer;
+
+function PdhLookupPerfNameByIndexW;
+begin
+ GetProcedureAddress(_PdhLookupPerfNameByIndexW, PdhLib, 'PdhLookupPerfNameByIndexW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PdhLookupPerfNameByIndexW]
+ end;
+end;
+
+var
+ _PdhLookupPerfNameByIndex: Pointer;
+
+function PdhLookupPerfNameByIndex;
+begin
+ GetProcedureAddress(_PdhLookupPerfNameByIndex, PdhLib, 'PdhLookupPerfNameByIndex' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PdhLookupPerfNameByIndex]
+ end;
+end;
+
+var
+ _PdhLookupPerfIndexByNameA: Pointer;
+
+function PdhLookupPerfIndexByNameA;
+begin
+ GetProcedureAddress(_PdhLookupPerfIndexByNameA, PdhLib, 'PdhLookupPerfIndexByNameA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PdhLookupPerfIndexByNameA]
+ end;
+end;
+
+var
+ _PdhLookupPerfIndexByNameW: Pointer;
+
+function PdhLookupPerfIndexByNameW;
+begin
+ GetProcedureAddress(_PdhLookupPerfIndexByNameW, PdhLib, 'PdhLookupPerfIndexByNameW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PdhLookupPerfIndexByNameW]
+ end;
+end;
+
+var
+ _PdhLookupPerfIndexByName: Pointer;
+
+function PdhLookupPerfIndexByName;
+begin
+ GetProcedureAddress(_PdhLookupPerfIndexByName, PdhLib, 'PdhLookupPerfIndexByName' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PdhLookupPerfIndexByName]
+ end;
+end;
+
+var
+ _PdhExpandWildCardPathA: Pointer;
+
+function PdhExpandWildCardPathA;
+begin
+ GetProcedureAddress(_PdhExpandWildCardPathA, PdhLib, 'PdhExpandWildCardPathA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PdhExpandWildCardPathA]
+ end;
+end;
+
+var
+ _PdhExpandWildCardPathW: Pointer;
+
+function PdhExpandWildCardPathW;
+begin
+ GetProcedureAddress(_PdhExpandWildCardPathW, PdhLib, 'PdhExpandWildCardPathW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PdhExpandWildCardPathW]
+ end;
+end;
+
+var
+ _PdhExpandWildCardPath: Pointer;
+
+function PdhExpandWildCardPath;
+begin
+ GetProcedureAddress(_PdhExpandWildCardPath, PdhLib, 'PdhExpandWildCardPath' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PdhExpandWildCardPath]
+ end;
+end;
+
+var
+ _PdhOpenLogA: Pointer;
+
+function PdhOpenLogA;
+begin
+ GetProcedureAddress(_PdhOpenLogA, PdhLib, 'PdhOpenLogA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PdhOpenLogA]
+ end;
+end;
+
+var
+ _PdhOpenLogW: Pointer;
+
+function PdhOpenLogW;
+begin
+ GetProcedureAddress(_PdhOpenLogW, PdhLib, 'PdhOpenLogW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PdhOpenLogW]
+ end;
+end;
+
+var
+ _PdhOpenLog: Pointer;
+
+function PdhOpenLog;
+begin
+ GetProcedureAddress(_PdhOpenLog, PdhLib, 'PdhOpenLog' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PdhOpenLog]
+ end;
+end;
+
+var
+ _PdhUpdateLogA: Pointer;
+
+function PdhUpdateLogA;
+begin
+ GetProcedureAddress(_PdhUpdateLogA, PdhLib, 'PdhUpdateLogA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PdhUpdateLogA]
+ end;
+end;
+
+var
+ _PdhUpdateLogW: Pointer;
+
+function PdhUpdateLogW;
+begin
+ GetProcedureAddress(_PdhUpdateLogW, PdhLib, 'PdhUpdateLogW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PdhUpdateLogW]
+ end;
+end;
+
+var
+ _PdhUpdateLog: Pointer;
+
+function PdhUpdateLog;
+begin
+ GetProcedureAddress(_PdhUpdateLog, PdhLib, 'PdhUpdateLog' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PdhUpdateLog]
+ end;
+end;
+
+var
+ _PdhUpdateLogFileCatalog: Pointer;
+
+function PdhUpdateLogFileCatalog;
+begin
+ GetProcedureAddress(_PdhUpdateLogFileCatalog, PdhLib, 'PdhUpdateLogFileCatalog');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PdhUpdateLogFileCatalog]
+ end;
+end;
+
+var
+ _PdhGetLogFileSize: Pointer;
+
+function PdhGetLogFileSize;
+begin
+ GetProcedureAddress(_PdhGetLogFileSize, PdhLib, 'PdhGetLogFileSize');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PdhGetLogFileSize]
+ end;
+end;
+
+var
+ _PdhCloseLog: Pointer;
+
+function PdhCloseLog;
+begin
+ GetProcedureAddress(_PdhCloseLog, PdhLib, 'PdhCloseLog');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PdhCloseLog]
+ end;
+end;
+
+var
+ _PdhSelectDataSourceA: Pointer;
+
+function PdhSelectDataSourceA;
+begin
+ GetProcedureAddress(_PdhSelectDataSourceA, PdhLib, 'PdhSelectDataSourceA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PdhSelectDataSourceA]
+ end;
+end;
+
+var
+ _PdhSelectDataSourceW: Pointer;
+
+function PdhSelectDataSourceW;
+begin
+ GetProcedureAddress(_PdhSelectDataSourceW, PdhLib, 'PdhSelectDataSourceW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PdhSelectDataSourceW]
+ end;
+end;
+
+var
+ _PdhSelectDataSource: Pointer;
+
+function PdhSelectDataSource;
+begin
+ GetProcedureAddress(_PdhSelectDataSource, PdhLib, 'PdhSelectDataSource' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PdhSelectDataSource]
+ end;
+end;
+
+var
+ _PdhIsRealTimeQuery: Pointer;
+
+function PdhIsRealTimeQuery;
+begin
+ GetProcedureAddress(_PdhIsRealTimeQuery, PdhLib, 'PdhIsRealTimeQuery');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PdhIsRealTimeQuery]
+ end;
+end;
+
+var
+ _PdhSetQueryTimeRange: Pointer;
+
+function PdhSetQueryTimeRange;
+begin
+ GetProcedureAddress(_PdhSetQueryTimeRange, PdhLib, 'PdhSetQueryTimeRange');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PdhSetQueryTimeRange]
+ end;
+end;
+
+var
+ _PdhGetDataSourceTimeRangeA: Pointer;
+
+function PdhGetDataSourceTimeRangeA;
+begin
+ GetProcedureAddress(_PdhGetDataSourceTimeRangeA, PdhLib, 'PdhGetDataSourceTimeRangeA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PdhGetDataSourceTimeRangeA]
+ end;
+end;
+
+var
+ _PdhGetDataSourceTimeRangeW: Pointer;
+
+function PdhGetDataSourceTimeRangeW;
+begin
+ GetProcedureAddress(_PdhGetDataSourceTimeRangeW, PdhLib, 'PdhGetDataSourceTimeRangeW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PdhGetDataSourceTimeRangeW]
+ end;
+end;
+
+var
+ _PdhGetDataSourceTimeRange: Pointer;
+
+function PdhGetDataSourceTimeRange;
+begin
+ GetProcedureAddress(_PdhGetDataSourceTimeRange, PdhLib, 'PdhGetDataSourceTimeRange' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PdhGetDataSourceTimeRange]
+ end;
+end;
+
+var
+ _PdhCollectQueryDataEx: Pointer;
+
+function PdhCollectQueryDataEx;
+begin
+ GetProcedureAddress(_PdhCollectQueryDataEx, PdhLib, 'PdhCollectQueryDataEx');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PdhCollectQueryDataEx]
+ end;
+end;
+
+var
+ _PdhFormatFromRawValue: Pointer;
+
+function PdhFormatFromRawValue;
+begin
+ GetProcedureAddress(_PdhFormatFromRawValue, PdhLib, 'PdhFormatFromRawValue');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PdhFormatFromRawValue]
+ end;
+end;
+
+var
+ _PdhGetCounterTimeBase: Pointer;
+
+function PdhGetCounterTimeBase;
+begin
+ GetProcedureAddress(_PdhGetCounterTimeBase, PdhLib, 'PdhGetCounterTimeBase');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PdhGetCounterTimeBase]
+ end;
+end;
+
+var
+ _PdhReadRawLogRecord: Pointer;
+
+function PdhReadRawLogRecord;
+begin
+ GetProcedureAddress(_PdhReadRawLogRecord, PdhLib, 'PdhReadRawLogRecord');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PdhReadRawLogRecord]
+ end;
+end;
+
+var
+ _PdhSetDefaultRealTimeDataSource: Pointer;
+
+function PdhSetDefaultRealTimeDataSource;
+begin
+ GetProcedureAddress(_PdhSetDefaultRealTimeDataSource, PdhLib, 'PdhSetDefaultRealTimeDataSource');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PdhSetDefaultRealTimeDataSource]
+ end;
+end;
+
+var
+ _PdhBindInputDataSourceW: Pointer;
+
+function PdhBindInputDataSourceW;
+begin
+ GetProcedureAddress(_PdhBindInputDataSourceW, PdhLib, 'PdhBindInputDataSourceW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PdhBindInputDataSourceW]
+ end;
+end;
+
+var
+ _PdhBindInputDataSourceA: Pointer;
+
+function PdhBindInputDataSourceA;
+begin
+ GetProcedureAddress(_PdhBindInputDataSourceA, PdhLib, 'PdhBindInputDataSourceA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PdhBindInputDataSourceA]
+ end;
+end;
+
+var
+ _PdhBindInputDataSource: Pointer;
+
+function PdhBindInputDataSource;
+begin
+ GetProcedureAddress(_PdhBindInputDataSource, PdhLib, 'PdhBindInputDataSource' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PdhBindInputDataSource]
+ end;
+end;
+
+var
+ _PdhOpenQueryH: Pointer;
+
+function PdhOpenQueryH;
+begin
+ GetProcedureAddress(_PdhOpenQueryH, PdhLib, 'PdhOpenQueryH');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PdhOpenQueryH]
+ end;
+end;
+
+var
+ _PdhEnumMachinesHW: Pointer;
+
+function PdhEnumMachinesHW;
+begin
+ GetProcedureAddress(_PdhEnumMachinesHW, PdhLib, 'PdhEnumMachinesHW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PdhEnumMachinesHW]
+ end;
+end;
+
+var
+ _PdhEnumMachinesHA: Pointer;
+
+function PdhEnumMachinesHA;
+begin
+ GetProcedureAddress(_PdhEnumMachinesHA, PdhLib, 'PdhEnumMachinesHA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PdhEnumMachinesHA]
+ end;
+end;
+
+var
+ _PdhEnumMachinesH: Pointer;
+
+function PdhEnumMachinesH;
+begin
+ GetProcedureAddress(_PdhEnumMachinesH, PdhLib, 'PdhEnumMachinesH' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PdhEnumMachinesH]
+ end;
+end;
+
+var
+ _PdhEnumObjectsHW: Pointer;
+
+function PdhEnumObjectsHW;
+begin
+ GetProcedureAddress(_PdhEnumObjectsHW, PdhLib, 'PdhEnumObjectsHW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PdhEnumObjectsHW]
+ end;
+end;
+
+var
+ _PdhEnumObjectsHA: Pointer;
+
+function PdhEnumObjectsHA;
+begin
+ GetProcedureAddress(_PdhEnumObjectsHA, PdhLib, 'PdhEnumObjectsHA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PdhEnumObjectsHA]
+ end;
+end;
+
+var
+ _PdhEnumObjectsH: Pointer;
+
+function PdhEnumObjectsH;
+begin
+ GetProcedureAddress(_PdhEnumObjectsH, PdhLib, 'PdhEnumObjectsH' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PdhEnumObjectsH]
+ end;
+end;
+
+var
+ _PdhEnumObjectItemsHW: Pointer;
+
+function PdhEnumObjectItemsHW;
+begin
+ GetProcedureAddress(_PdhEnumObjectItemsHW, PdhLib, 'PdhEnumObjectItemsHW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PdhEnumObjectItemsHW]
+ end;
+end;
+
+var
+ _PdhEnumObjectItemsHA: Pointer;
+
+function PdhEnumObjectItemsHA;
+begin
+ GetProcedureAddress(_PdhEnumObjectItemsHA, PdhLib, 'PdhEnumObjectItemsHA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PdhEnumObjectItemsHA]
+ end;
+end;
+
+var
+ _PdhEnumObjectItemsH: Pointer;
+
+function PdhEnumObjectItemsH;
+begin
+ GetProcedureAddress(_PdhEnumObjectItemsH, PdhLib, 'PdhEnumObjectItemsH' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PdhEnumObjectItemsH]
+ end;
+end;
+
+var
+ _PdhExpandWildCardPathHW: Pointer;
+
+function PdhExpandWildCardPathHW;
+begin
+ GetProcedureAddress(_PdhExpandWildCardPathHW, PdhLib, 'PdhExpandWildCardPathHW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PdhExpandWildCardPathHW]
+ end;
+end;
+
+var
+ _PdhExpandWildCardPathHA: Pointer;
+
+function PdhExpandWildCardPathHA;
+begin
+ GetProcedureAddress(_PdhExpandWildCardPathHA, PdhLib, 'PdhExpandWildCardPathHA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PdhExpandWildCardPathHA]
+ end;
+end;
+
+var
+ _PdhExpandWildCardPathH: Pointer;
+
+function PdhExpandWildCardPathH;
+begin
+ GetProcedureAddress(_PdhExpandWildCardPathH, PdhLib, 'PdhExpandWildCardPathH' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PdhExpandWildCardPathH]
+ end;
+end;
+
+var
+ _PdhGetDataSourceTimeRangeH: Pointer;
+
+function PdhGetDataSourceTimeRangeH;
+begin
+ GetProcedureAddress(_PdhGetDataSourceTimeRangeH, PdhLib, 'PdhGetDataSourceTimeRangeH');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PdhGetDataSourceTimeRangeH]
+ end;
+end;
+
+var
+ _PdhGetDefaultPerfObjectHW: Pointer;
+
+function PdhGetDefaultPerfObjectHW;
+begin
+ GetProcedureAddress(_PdhGetDefaultPerfObjectHW, PdhLib, 'PdhGetDefaultPerfObjectHW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PdhGetDefaultPerfObjectHW]
+ end;
+end;
+
+var
+ _PdhGetDefaultPerfObjectHA: Pointer;
+
+function PdhGetDefaultPerfObjectHA;
+begin
+ GetProcedureAddress(_PdhGetDefaultPerfObjectHA, PdhLib, 'PdhGetDefaultPerfObjectHA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PdhGetDefaultPerfObjectHA]
+ end;
+end;
+
+var
+ _PdhGetDefaultPerfObjectH: Pointer;
+
+function PdhGetDefaultPerfObjectH;
+begin
+ GetProcedureAddress(_PdhGetDefaultPerfObjectH, PdhLib, 'PdhGetDefaultPerfObjectH' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PdhGetDefaultPerfObjectH]
+ end;
+end;
+
+var
+ _PdhGetDefaultPerfCounterHW: Pointer;
+
+function PdhGetDefaultPerfCounterHW;
+begin
+ GetProcedureAddress(_PdhGetDefaultPerfCounterHW, PdhLib, 'PdhGetDefaultPerfCounterHW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PdhGetDefaultPerfCounterHW]
+ end;
+end;
+
+var
+ _PdhGetDefaultPerfCounterHA: Pointer;
+
+function PdhGetDefaultPerfCounterHA;
+begin
+ GetProcedureAddress(_PdhGetDefaultPerfCounterHA, PdhLib, 'PdhGetDefaultPerfCounterHA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PdhGetDefaultPerfCounterHA]
+ end;
+end;
+
+var
+ _PdhGetDefaultPerfCounterH: Pointer;
+
+function PdhGetDefaultPerfCounterH;
+begin
+ GetProcedureAddress(_PdhGetDefaultPerfCounterH, PdhLib, 'PdhGetDefaultPerfCounterH' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PdhGetDefaultPerfCounterH]
+ end;
+end;
+
+var
+ _PdhBrowseCountersHW: Pointer;
+
+function PdhBrowseCountersHW;
+begin
+ GetProcedureAddress(_PdhBrowseCountersHW, PdhLib, 'PdhBrowseCountersHW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PdhBrowseCountersHW]
+ end;
+end;
+
+var
+ _PdhBrowseCountersHA: Pointer;
+
+function PdhBrowseCountersHA;
+begin
+ GetProcedureAddress(_PdhBrowseCountersHA, PdhLib, 'PdhBrowseCountersHA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PdhBrowseCountersHA]
+ end;
+end;
+
+var
+ _PdhBrowseCountersH: Pointer;
+
+function PdhBrowseCountersH;
+begin
+ GetProcedureAddress(_PdhBrowseCountersH, PdhLib, 'PdhBrowseCountersH' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PdhBrowseCountersH]
+ end;
+end;
+
+var
+ _PdhVerifySQLDBW: Pointer;
+
+function PdhVerifySQLDBW;
+begin
+ GetProcedureAddress(_PdhVerifySQLDBW, PdhLib, 'PdhVerifySQLDBW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PdhVerifySQLDBW]
+ end;
+end;
+
+var
+ _PdhVerifySQLDBA: Pointer;
+
+function PdhVerifySQLDBA;
+begin
+ GetProcedureAddress(_PdhVerifySQLDBA, PdhLib, 'PdhVerifySQLDBA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PdhVerifySQLDBA]
+ end;
+end;
+
+var
+ _PdhVerifySQLDB: Pointer;
+
+function PdhVerifySQLDB;
+begin
+ GetProcedureAddress(_PdhVerifySQLDB, PdhLib, 'PdhVerifySQLDB' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PdhVerifySQLDB]
+ end;
+end;
+
+var
+ _PdhCreateSQLTablesW: Pointer;
+
+function PdhCreateSQLTablesW;
+begin
+ GetProcedureAddress(_PdhCreateSQLTablesW, PdhLib, 'PdhCreateSQLTablesW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PdhCreateSQLTablesW]
+ end;
+end;
+
+var
+ _PdhCreateSQLTablesA: Pointer;
+
+function PdhCreateSQLTablesA;
+begin
+ GetProcedureAddress(_PdhCreateSQLTablesA, PdhLib, 'PdhCreateSQLTablesA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PdhCreateSQLTablesA]
+ end;
+end;
+
+var
+ _PdhCreateSQLTables: Pointer;
+
+function PdhCreateSQLTables;
+begin
+ GetProcedureAddress(_PdhCreateSQLTables, PdhLib, 'PdhCreateSQLTables' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PdhCreateSQLTables]
+ end;
+end;
+
+var
+ _PdhEnumLogSetNamesW: Pointer;
+
+function PdhEnumLogSetNamesW;
+begin
+ GetProcedureAddress(_PdhEnumLogSetNamesW, PdhLib, 'PdhEnumLogSetNamesW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PdhEnumLogSetNamesW]
+ end;
+end;
+
+var
+ _PdhEnumLogSetNamesA: Pointer;
+
+function PdhEnumLogSetNamesA;
+begin
+ GetProcedureAddress(_PdhEnumLogSetNamesA, PdhLib, 'PdhEnumLogSetNamesA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PdhEnumLogSetNamesA]
+ end;
+end;
+
+var
+ _PdhEnumLogSetNames: Pointer;
+
+function PdhEnumLogSetNames;
+begin
+ GetProcedureAddress(_PdhEnumLogSetNames, PdhLib, 'PdhEnumLogSetNames' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PdhEnumLogSetNames]
+ end;
+end;
+
+var
+ _PdhGetLogSetGUID: Pointer;
+
+function PdhGetLogSetGUID;
+begin
+ GetProcedureAddress(_PdhGetLogSetGUID, PdhLib, 'PdhGetLogSetGUID');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PdhGetLogSetGUID]
+ end;
+end;
+
+var
+ _PdhSetLogSetRunID: Pointer;
+
+function PdhSetLogSetRunID;
+begin
+ GetProcedureAddress(_PdhSetLogSetRunID, PdhLib, 'PdhSetLogSetRunID');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PdhSetLogSetRunID]
+ end;
+end;
+
+{$ELSE}
+
+function PdhGetDllVersion; external PdhLib name 'PdhGetDllVersion';
+function PdhOpenQueryA; external PdhLib name 'PdhOpenQueryA';
+function PdhOpenQueryW; external PdhLib name 'PdhOpenQueryW';
+function PdhOpenQuery; external PdhLib name 'PdhOpenQuery' + AWSuffix;
+function PdhAddCounterA; external PdhLib name 'PdhAddCounterA';
+function PdhAddCounterW; external PdhLib name 'PdhAddCounterW';
+function PdhAddCounter; external PdhLib name 'PdhAddCounter' + AWSuffix;
+function PdhRemoveCounter; external PdhLib name 'PdhRemoveCounter';
+function PdhCollectQueryData; external PdhLib name 'PdhCollectQueryData';
+function PdhCloseQuery; external PdhLib name 'PdhCloseQuery';
+function PdhGetFormattedCounterValue; external PdhLib name 'PdhGetFormattedCounterValue';
+function PdhGetFormattedCounterArrayA; external PdhLib name 'PdhGetFormattedCounterArrayA';
+function PdhGetFormattedCounterArrayW; external PdhLib name 'PdhGetFormattedCounterArrayW';
+function PdhGetFormattedCounterArray; external PdhLib name 'PdhGetFormattedCounterArray' + AWSuffix;
+function PdhGetRawCounterValue; external PdhLib name 'PdhGetRawCounterValue';
+function PdhGetRawCounterArrayA; external PdhLib name 'PdhGetRawCounterArrayA';
+function PdhGetRawCounterArrayW; external PdhLib name 'PdhGetRawCounterArrayW';
+function PdhGetRawCounterArray; external PdhLib name 'PdhGetRawCounterArray' + AWSuffix;
+function PdhCalculateCounterFromRawValue; external PdhLib name 'PdhCalculateCounterFromRawValue';
+function PdhComputeCounterStatistics; external PdhLib name 'PdhComputeCounterStatistics';
+function PdhGetCounterInfoA; external PdhLib name 'PdhGetCounterInfoA';
+function PdhGetCounterInfoW; external PdhLib name 'PdhGetCounterInfoW';
+function PdhGetCounterInfo; external PdhLib name 'PdhGetCounterInfo' + AWSuffix;
+function PdhSetCounterScaleFactor; external PdhLib name 'PdhSetCounterScaleFactor';
+function PdhConnectMachineA; external PdhLib name 'PdhConnectMachineA';
+function PdhConnectMachineW; external PdhLib name 'PdhConnectMachineW';
+function PdhConnectMachine; external PdhLib name 'PdhConnectMachine' + AWSuffix;
+function PdhEnumMachinesA; external PdhLib name 'PdhEnumMachinesA';
+function PdhEnumMachinesW; external PdhLib name 'PdhEnumMachinesW';
+function PdhEnumMachines; external PdhLib name 'PdhEnumMachines' + AWSuffix;
+function PdhEnumObjectsA; external PdhLib name 'PdhEnumObjectsA';
+function PdhEnumObjectsW; external PdhLib name 'PdhEnumObjectsW';
+function PdhEnumObjects; external PdhLib name 'PdhEnumObjects' + AWSuffix;
+function PdhEnumObjectItemsA; external PdhLib name 'PdhEnumObjectItemsA';
+function PdhEnumObjectItemsW; external PdhLib name 'PdhEnumObjectItemsW';
+function PdhEnumObjectItems; external PdhLib name 'PdhEnumObjectItems' + AWSuffix;
+function PdhMakeCounterPathA; external PdhLib name 'PdhMakeCounterPathA';
+function PdhMakeCounterPathW; external PdhLib name 'PdhMakeCounterPathW';
+function PdhMakeCounterPath; external PdhLib name 'PdhMakeCounterPath' + AWSuffix;
+function PdhParseCounterPathA; external PdhLib name 'PdhParseCounterPathA';
+function PdhParseCounterPathW; external PdhLib name 'PdhParseCounterPathW';
+function PdhParseCounterPath; external PdhLib name 'PdhParseCounterPath' + AWSuffix;
+function PdhParseInstanceNameA; external PdhLib name 'PdhParseInstanceNameA';
+function PdhParseInstanceNameW; external PdhLib name 'PdhParseInstanceNameW';
+function PdhParseInstanceName; external PdhLib name 'PdhParseInstanceName' + AWSuffix;
+function PdhValidatePathA; external PdhLib name 'PdhValidatePathA';
+function PdhValidatePathW; external PdhLib name 'PdhValidatePathW';
+function PdhValidatePath; external PdhLib name 'PdhValidatePath' + AWSuffix;
+function PdhGetDefaultPerfObjectA; external PdhLib name 'PdhGetDefaultPerfObjectA';
+function PdhGetDefaultPerfObjectW; external PdhLib name 'PdhGetDefaultPerfObjectW';
+function PdhGetDefaultPerfObject; external PdhLib name 'PdhGetDefaultPerfObject' + AWSuffix;
+function PdhGetDefaultPerfCounterA; external PdhLib name 'PdhGetDefaultPerfCounterA';
+function PdhGetDefaultPerfCounterW; external PdhLib name 'PdhGetDefaultPerfCounterW';
+function PdhGetDefaultPerfCounter; external PdhLib name 'PdhGetDefaultPerfCounter' + AWSuffix;
+function PdhBrowseCountersA; external PdhLib name 'PdhBrowseCountersA';
+function PdhBrowseCountersW; external PdhLib name 'PdhBrowseCountersW';
+function PdhBrowseCounters; external PdhLib name 'PdhBrowseCounters' + AWSuffix;
+function PdhExpandCounterPathA; external PdhLib name 'PdhExpandCounterPathA';
+function PdhExpandCounterPathW; external PdhLib name 'PdhExpandCounterPathW';
+function PdhExpandCounterPath; external PdhLib name 'PdhExpandCounterPath' + AWSuffix;
+function PdhLookupPerfNameByIndexA; external PdhLib name 'PdhLookupPerfNameByIndexA';
+function PdhLookupPerfNameByIndexW; external PdhLib name 'PdhLookupPerfNameByIndexW';
+function PdhLookupPerfNameByIndex; external PdhLib name 'PdhLookupPerfNameByIndex' + AWSuffix;
+function PdhLookupPerfIndexByNameA; external PdhLib name 'PdhLookupPerfIndexByNameA';
+function PdhLookupPerfIndexByNameW; external PdhLib name 'PdhLookupPerfIndexByNameW';
+function PdhLookupPerfIndexByName; external PdhLib name 'PdhLookupPerfIndexByName' + AWSuffix;
+function PdhExpandWildCardPathA; external PdhLib name 'PdhExpandWildCardPathA';
+function PdhExpandWildCardPathW; external PdhLib name 'PdhExpandWildCardPathW';
+function PdhExpandWildCardPath; external PdhLib name 'PdhExpandWildCardPath' + AWSuffix;
+function PdhOpenLogA; external PdhLib name 'PdhOpenLogA';
+function PdhOpenLogW; external PdhLib name 'PdhOpenLogW';
+function PdhOpenLog; external PdhLib name 'PdhOpenLog' + AWSuffix;
+function PdhUpdateLogA; external PdhLib name 'PdhUpdateLogA';
+function PdhUpdateLogW; external PdhLib name 'PdhUpdateLogW';
+function PdhUpdateLog; external PdhLib name 'PdhUpdateLog' + AWSuffix;
+function PdhUpdateLogFileCatalog; external PdhLib name 'PdhUpdateLogFileCatalog';
+function PdhGetLogFileSize; external PdhLib name 'PdhGetLogFileSize';
+function PdhCloseLog; external PdhLib name 'PdhCloseLog';
+function PdhSelectDataSourceA; external PdhLib name 'PdhSelectDataSourceA';
+function PdhSelectDataSourceW; external PdhLib name 'PdhSelectDataSourceW';
+function PdhSelectDataSource; external PdhLib name 'PdhSelectDataSource' + AWSuffix;
+function PdhIsRealTimeQuery; external PdhLib name 'PdhIsRealTimeQuery';
+function PdhSetQueryTimeRange; external PdhLib name 'PdhSetQueryTimeRange';
+function PdhGetDataSourceTimeRangeA; external PdhLib name 'PdhGetDataSourceTimeRangeA';
+function PdhGetDataSourceTimeRangeW; external PdhLib name 'PdhGetDataSourceTimeRangeW';
+function PdhGetDataSourceTimeRange; external PdhLib name 'PdhGetDataSourceTimeRange' + AWSuffix;
+function PdhCollectQueryDataEx; external PdhLib name 'PdhCollectQueryDataEx';
+function PdhFormatFromRawValue; external PdhLib name 'PdhFormatFromRawValue';
+function PdhGetCounterTimeBase; external PdhLib name 'PdhGetCounterTimeBase';
+function PdhReadRawLogRecord; external PdhLib name 'PdhReadRawLogRecord';
+function PdhSetDefaultRealTimeDataSource; external PdhLib name 'PdhSetDefaultRealTimeDataSource';
+function PdhBindInputDataSourceW; external PdhLib name 'PdhBindInputDataSourceW';
+function PdhBindInputDataSourceA; external PdhLib name 'PdhBindInputDataSourceA';
+function PdhBindInputDataSource; external PdhLib name 'PdhBindInputDataSource' + AWSuffix;
+function PdhOpenQueryH; external PdhLib name 'PdhOpenQueryH';
+function PdhEnumMachinesHW; external PdhLib name 'PdhEnumMachinesHW';
+function PdhEnumMachinesHA; external PdhLib name 'PdhEnumMachinesHA';
+function PdhEnumMachinesH; external PdhLib name 'PdhEnumMachinesH' + AWSuffix;
+function PdhEnumObjectsHW; external PdhLib name 'PdhEnumObjectsHW';
+function PdhEnumObjectsHA; external PdhLib name 'PdhEnumObjectsHA';
+function PdhEnumObjectsH; external PdhLib name 'PdhEnumObjectsH' + AWSuffix;
+function PdhEnumObjectItemsHW; external PdhLib name 'PdhEnumObjectItemsHW';
+function PdhEnumObjectItemsHA; external PdhLib name 'PdhEnumObjectItemsHA';
+function PdhEnumObjectItemsH; external PdhLib name 'PdhEnumObjectItemsH' + AWSuffix;
+function PdhExpandWildCardPathHW; external PdhLib name 'PdhExpandWildCardPathHW';
+function PdhExpandWildCardPathHA; external PdhLib name 'PdhExpandWildCardPathHA';
+function PdhExpandWildCardPathH; external PdhLib name 'PdhExpandWildCardPathH' + AWSuffix;
+function PdhGetDataSourceTimeRangeH; external PdhLib name 'PdhGetDataSourceTimeRangeH';
+function PdhGetDefaultPerfObjectHW; external PdhLib name 'PdhGetDefaultPerfObjectHW';
+function PdhGetDefaultPerfObjectHA; external PdhLib name 'PdhGetDefaultPerfObjectHA';
+function PdhGetDefaultPerfObjectH; external PdhLib name 'PdhGetDefaultPerfObjectH' + AWSuffix;
+function PdhGetDefaultPerfCounterHW; external PdhLib name 'PdhGetDefaultPerfCounterHW';
+function PdhGetDefaultPerfCounterHA; external PdhLib name 'PdhGetDefaultPerfCounterHA';
+function PdhGetDefaultPerfCounterH; external PdhLib name 'PdhGetDefaultPerfCounterH' + AWSuffix;
+function PdhBrowseCountersHW; external PdhLib name 'PdhBrowseCountersHW';
+function PdhBrowseCountersHA; external PdhLib name 'PdhBrowseCountersHA';
+function PdhBrowseCountersH; external PdhLib name 'PdhBrowseCountersH' + AWSuffix;
+function PdhVerifySQLDBW; external PdhLib name 'PdhVerifySQLDBW';
+function PdhVerifySQLDBA; external PdhLib name 'PdhVerifySQLDBA';
+function PdhVerifySQLDB; external PdhLib name 'PdhVerifySQLDB' + AWSuffix;
+function PdhCreateSQLTablesW; external PdhLib name 'PdhCreateSQLTablesW';
+function PdhCreateSQLTablesA; external PdhLib name 'PdhCreateSQLTablesA';
+function PdhCreateSQLTables; external PdhLib name 'PdhCreateSQLTables' + AWSuffix;
+function PdhEnumLogSetNamesW; external PdhLib name 'PdhEnumLogSetNamesW';
+function PdhEnumLogSetNamesA; external PdhLib name 'PdhEnumLogSetNamesA';
+function PdhEnumLogSetNames; external PdhLib name 'PdhEnumLogSetNames' + AWSuffix;
+function PdhGetLogSetGUID; external PdhLib name 'PdhGetLogSetGUID';
+function PdhSetLogSetRunID; external PdhLib name 'PdhSetLogSetRunID';
+
+{$ENDIF DYNAMIC_LINK}
+
+end.
diff --git a/packages/extra/winunits/jwapdhmsg.pas b/packages/extra/winunits/jwapdhmsg.pas
index cf12362009..cd2fe22a22 100644
--- a/packages/extra/winunits/jwapdhmsg.pas
+++ b/packages/extra/winunits/jwapdhmsg.pas
@@ -1,1102 +1,1102 @@
-{******************************************************************************}
-{ }
-{ Performance Data Helper Error Codes API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: pdhmsg.h, released August 2001. The original Pascal }
-{ code is: PdhMsg.pas, released December 2000. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwapdhmsg.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaPdhMsg;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "pdhmsg.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaWinType;
-
-// PDH DLL messages
-//
-//
-// Success Messages
-//
-// the Win32 error value ERROR_SUCCESS is used for success returns
-//
-// MESSAGE NAME FORMAT
-//
-// PDH_CSTATUS_... messages are data item status message and
-// are returned in reference to the status of a data
-// item
-// PDH_... messages are returned by FUNCTIONS only and
-// not used as data item status values
-//
-// Success Messages
-// These messages are normally returned when the operation completed
-// successfully.
-//
-//
-// Values are 32 bit values layed out as follows:
-//
-// 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1
-// 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
-// +---+-+-+-----------------------+-------------------------------+
-// |Sev|C|R| Facility | Code |
-// +---+-+-+-----------------------+-------------------------------+
-//
-// where
-//
-// Sev - is the severity code
-//
-// 00 - Success
-// 01 - Informational
-// 10 - Warning
-// 11 - Error
-//
-// C - is the Customer code flag
-//
-// R - is a reserved bit
-//
-// Facility - is the facility code
-//
-// Code - is the facility's status code
-//
-//
-// Define the facility codes
-
-const
-
-//
-// Define the severity codes
-//
-
- STATUS_SEVERITY_WARNING = $2;
- {$EXTERNALSYM STATUS_SEVERITY_WARNING}
- STATUS_SEVERITY_SUCCESS = $0;
- {$EXTERNALSYM STATUS_SEVERITY_SUCCESS}
- STATUS_SEVERITY_INFORMATIONAL = $1;
- {$EXTERNALSYM STATUS_SEVERITY_INFORMATIONAL}
- STATUS_SEVERITY_ERROR = $3;
- {$EXTERNALSYM STATUS_SEVERITY_ERROR}
-
-//
-// MessageId: PDH_CSTATUS_VALID_DATA
-//
-// MessageText:
-//
-// The returned data is valid.
-//
-
- PDH_CSTATUS_VALID_DATA = DWORD($00000000);
- {$EXTERNALSYM PDH_CSTATUS_VALID_DATA}
-
-//
-// MessageId: PDH_CSTATUS_NEW_DATA
-//
-// MessageText:
-//
-// The return data value is valid and different from the last sample.
-//
-
- PDH_CSTATUS_NEW_DATA = DWORD($00000001);
- {$EXTERNALSYM PDH_CSTATUS_NEW_DATA}
-
-//
-// Informational messages
-//
-// None
-//
-// Warning Messages
-// These messages are returned when the function has completed
-// successfully but the results may be different than expected.
-//
-//
-// MessageId: PDH_CSTATUS_NO_MACHINE
-//
-// MessageText:
-//
-// Unable to connect to specified machine or machine is off line.
-//
-
- PDH_CSTATUS_NO_MACHINE = DWORD($800007D0);
- {$EXTERNALSYM PDH_CSTATUS_NO_MACHINE}
-
-//
-// MessageId: PDH_CSTATUS_NO_INSTANCE
-//
-// MessageText:
-//
-// The specified instance is not present.
-//
-
- PDH_CSTATUS_NO_INSTANCE = DWORD($800007D1);
- {$EXTERNALSYM PDH_CSTATUS_NO_INSTANCE}
-
-//
-// MessageId: PDH_MORE_DATA
-//
-// MessageText:
-//
-// There is more data to return than would fit in the supplied buffer. Allocate
-// a larger buffer and call the function again.
-//
-
- PDH_MORE_DATA = DWORD($800007D2);
- {$EXTERNALSYM PDH_MORE_DATA}
-
-//
-// MessageId: PDH_CSTATUS_ITEM_NOT_VALIDATED
-//
-// MessageText:
-//
-// The data item has been added to the query, but has not been validated nor
-// accessed. No other status information on this data item is available.
-//
-
- PDH_CSTATUS_ITEM_NOT_VALIDATED = DWORD($800007D3);
- {$EXTERNALSYM PDH_CSTATUS_ITEM_NOT_VALIDATED}
-
-//
-// MessageId: PDH_RETRY
-//
-// MessageText:
-//
-// The selected operation should be retried.
-//
-
- PDH_RETRY = DWORD($800007D4);
- {$EXTERNALSYM PDH_RETRY}
-
-//
-// MessageId: PDH_NO_DATA
-//
-// MessageText:
-//
-// No data to return.
-//
-
- PDH_NO_DATA = DWORD($800007D5);
- {$EXTERNALSYM PDH_NO_DATA}
-
-//
-// MessageId: PDH_CALC_NEGATIVE_DENOMINATOR
-//
-// MessageText:
-//
-// A counter with a negative denominator value was detected.
-//
-
- PDH_CALC_NEGATIVE_DENOMINATOR = DWORD($800007D6);
- {$EXTERNALSYM PDH_CALC_NEGATIVE_DENOMINATOR}
-
-//
-// MessageId: PDH_CALC_NEGATIVE_TIMEBASE
-//
-// MessageText:
-//
-// A counter with a negative timebase value was detected.
-//
-
- PDH_CALC_NEGATIVE_TIMEBASE = DWORD($800007D7);
- {$EXTERNALSYM PDH_CALC_NEGATIVE_TIMEBASE}
-
-//
-// MessageId: PDH_CALC_NEGATIVE_VALUE
-//
-// MessageText:
-//
-// A counter with a negative value was detected.
-//
-
- PDH_CALC_NEGATIVE_VALUE = DWORD($800007D8);
- {$EXTERNALSYM PDH_CALC_NEGATIVE_VALUE}
-
-//
-// MessageId: PDH_DIALOG_CANCELLED
-//
-// MessageText:
-//
-// The user cancelled the dialog box.
-//
-
- PDH_DIALOG_CANCELLED = DWORD($800007D9);
- {$EXTERNALSYM PDH_DIALOG_CANCELLED}
-
-//
-// MessageId: PDH_END_OF_LOG_FILE
-//
-// MessageText:
-//
-// The end of the log file was reached.
-//
-
- PDH_END_OF_LOG_FILE = DWORD($800007DA);
- {$EXTERNALSYM PDH_END_OF_LOG_FILE}
-
-//
-// MessageId: PDH_ASYNC_QUERY_TIMEOUT
-//
-// MessageText:
-//
-// Time out while waiting for asynchronous counter collection thread to end.
-//
-
- PDH_ASYNC_QUERY_TIMEOUT = DWORD($800007DB);
- {$EXTERNALSYM PDH_ASYNC_QUERY_TIMEOUT}
-
-//
-// MessageId: PDH_CANNOT_SET_DEFAULT_REALTIME_DATASOURCE
-//
-// MessageText:
-//
-// Cannot change default real-time data source. There are real-time query
-// sessions collecting counter data.
-//
-
- PDH_CANNOT_SET_DEFAULT_REALTIME_DATASOURCE = DWORD($800007DC);
- {$EXTERNALSYM PDH_CANNOT_SET_DEFAULT_REALTIME_DATASOURCE}
-
-//
-// Error Messages
-// These messages are returned when the function could not complete
-// as requested and some corrective action may be required by the
-// the caller or the user.
-//
-//
-// MessageId: PDH_CSTATUS_NO_OBJECT
-//
-// MessageText:
-//
-// The specified object is not found on the system.
-//
-
- PDH_CSTATUS_NO_OBJECT = DWORD($C0000BB8);
- {$EXTERNALSYM PDH_CSTATUS_NO_OBJECT}
-
-//
-// MessageId: PDH_CSTATUS_NO_COUNTER
-//
-// MessageText:
-//
-// The specified counter could not be found.
-//
-
- PDH_CSTATUS_NO_COUNTER = DWORD($C0000BB9);
- {$EXTERNALSYM PDH_CSTATUS_NO_COUNTER}
-
-//
-// MessageId: PDH_CSTATUS_INVALID_DATA
-//
-// MessageText:
-//
-// The returned data is not valid.
-//
-
- PDH_CSTATUS_INVALID_DATA = DWORD($C0000BBA);
- {$EXTERNALSYM PDH_CSTATUS_INVALID_DATA}
-
-//
-// MessageId: PDH_MEMORY_ALLOCATION_FAILURE
-//
-// MessageText:
-//
-// A PDH function could not allocate enough temporary memory to complete the
-// operation. Close some applications or extend the pagefile and retry the
-// function.
-//
-
- PDH_MEMORY_ALLOCATION_FAILURE = DWORD($C0000BBB);
- {$EXTERNALSYM PDH_MEMORY_ALLOCATION_FAILURE}
-
-//
-// MessageId: PDH_INVALID_HANDLE
-//
-// MessageText:
-//
-// The handle is not a valid PDH object.
-//
-
- PDH_INVALID_HANDLE = DWORD($C0000BBC);
- {$EXTERNALSYM PDH_INVALID_HANDLE}
-
-//
-// MessageId: PDH_INVALID_ARGUMENT
-//
-// MessageText:
-//
-// A required argument is missing or incorrect.
-//
-
- PDH_INVALID_ARGUMENT = DWORD($C0000BBD);
- {$EXTERNALSYM PDH_INVALID_ARGUMENT}
-
-//
-// MessageId: PDH_FUNCTION_NOT_FOUND
-//
-// MessageText:
-//
-// Unable to find the specified function.
-//
-
- PDH_FUNCTION_NOT_FOUND = DWORD($C0000BBE);
- {$EXTERNALSYM PDH_FUNCTION_NOT_FOUND}
-
-//
-// MessageId: PDH_CSTATUS_NO_COUNTERNAME
-//
-// MessageText:
-//
-// No counter was specified.
-//
-
- PDH_CSTATUS_NO_COUNTERNAME = DWORD($C0000BBF);
- {$EXTERNALSYM PDH_CSTATUS_NO_COUNTERNAME}
-
-//
-// MessageId: PDH_CSTATUS_BAD_COUNTERNAME
-//
-// MessageText:
-//
-// Unable to parse the counter path. Check the format and syntax of the
-// specified path.
-//
-
- PDH_CSTATUS_BAD_COUNTERNAME = DWORD($C0000BC0);
- {$EXTERNALSYM PDH_CSTATUS_BAD_COUNTERNAME}
-
-//
-// MessageId: PDH_INVALID_BUFFER
-//
-// MessageText:
-//
-// The buffer passed by the caller is invalid.
-//
-
- PDH_INVALID_BUFFER = DWORD($C0000BC1);
- {$EXTERNALSYM PDH_INVALID_BUFFER}
-
-//
-// MessageId: PDH_INSUFFICIENT_BUFFER
-//
-// MessageText:
-//
-// The requested data is larger than the buffer supplied. Unable to return the
-// requested data.
-//
-
- PDH_INSUFFICIENT_BUFFER = DWORD($C0000BC2);
- {$EXTERNALSYM PDH_INSUFFICIENT_BUFFER}
-
-//
-// MessageId: PDH_CANNOT_CONNECT_MACHINE
-//
-// MessageText:
-//
-// Unable to connect to the requested machine.
-//
-
- PDH_CANNOT_CONNECT_MACHINE = DWORD($C0000BC3);
- {$EXTERNALSYM PDH_CANNOT_CONNECT_MACHINE}
-
-//
-// MessageId: PDH_INVALID_PATH
-//
-// MessageText:
-//
-// The specified counter path could not be interpreted.
-//
-
- PDH_INVALID_PATH = DWORD($C0000BC4);
- {$EXTERNALSYM PDH_INVALID_PATH}
-
-//
-// MessageId: PDH_INVALID_INSTANCE
-//
-// MessageText:
-//
-// The instance name could not be read from the specified counter path.
-//
-
- PDH_INVALID_INSTANCE = DWORD($C0000BC5);
- {$EXTERNALSYM PDH_INVALID_INSTANCE}
-
-//
-// MessageId: PDH_INVALID_DATA
-//
-// MessageText:
-//
-// The data is not valid.
-//
-
- PDH_INVALID_DATA = DWORD($C0000BC6);
- {$EXTERNALSYM PDH_INVALID_DATA}
-
-//
-// MessageId: PDH_NO_DIALOG_DATA
-//
-// MessageText:
-//
-// The dialog box data block was missing or invalid.
-//
-
- PDH_NO_DIALOG_DATA = DWORD($C0000BC7);
- {$EXTERNALSYM PDH_NO_DIALOG_DATA}
-
-//
-// MessageId: PDH_CANNOT_READ_NAME_STRINGS
-//
-// MessageText:
-//
-// Unable to read the counter and/or explain text from the specified machine.
-//
-
- PDH_CANNOT_READ_NAME_STRINGS = DWORD($C0000BC8);
- {$EXTERNALSYM PDH_CANNOT_READ_NAME_STRINGS}
-
-//
-// MessageId: PDH_LOG_FILE_CREATE_ERROR
-//
-// MessageText:
-//
-// Unable to create the specified log file.
-//
-
- PDH_LOG_FILE_CREATE_ERROR = DWORD($C0000BC9);
- {$EXTERNALSYM PDH_LOG_FILE_CREATE_ERROR}
-
-//
-// MessageId: PDH_LOG_FILE_OPEN_ERROR
-//
-// MessageText:
-//
-// Unable to open the specified log file.
-//
-
- PDH_LOG_FILE_OPEN_ERROR = DWORD($C0000BCA);
- {$EXTERNALSYM PDH_LOG_FILE_OPEN_ERROR}
-
-//
-// MessageId: PDH_LOG_TYPE_NOT_FOUND
-//
-// MessageText:
-//
-// The specified log file type has not been installed on this system.
-//
-
- PDH_LOG_TYPE_NOT_FOUND = DWORD($C0000BCB);
- {$EXTERNALSYM PDH_LOG_TYPE_NOT_FOUND}
-
-//
-// MessageId: PDH_NO_MORE_DATA
-//
-// MessageText:
-//
-// No more data is available.
-//
-
- PDH_NO_MORE_DATA = DWORD($C0000BCC);
- {$EXTERNALSYM PDH_NO_MORE_DATA}
-
-//
-// MessageId: PDH_ENTRY_NOT_IN_LOG_FILE
-//
-// MessageText:
-//
-// The specified record was not found in the log file.
-//
-
- PDH_ENTRY_NOT_IN_LOG_FILE = DWORD($C0000BCD);
- {$EXTERNALSYM PDH_ENTRY_NOT_IN_LOG_FILE}
-
-//
-// MessageId: PDH_DATA_SOURCE_IS_LOG_FILE
-//
-// MessageText:
-//
-// The specified data source is a log file.
-//
-
- PDH_DATA_SOURCE_IS_LOG_FILE = DWORD($C0000BCE);
- {$EXTERNALSYM PDH_DATA_SOURCE_IS_LOG_FILE}
-
-//
-// MessageId: PDH_DATA_SOURCE_IS_REAL_TIME
-//
-// MessageText:
-//
-// The specified data source is the current activity.
-//
-
- PDH_DATA_SOURCE_IS_REAL_TIME = DWORD($C0000BCF);
- {$EXTERNALSYM PDH_DATA_SOURCE_IS_REAL_TIME}
-
-//
-// MessageId: PDH_UNABLE_READ_LOG_HEADER
-//
-// MessageText:
-//
-// The log file header could not be read.
-//
-
- PDH_UNABLE_READ_LOG_HEADER = DWORD($C0000BD0);
- {$EXTERNALSYM PDH_UNABLE_READ_LOG_HEADER}
-
-//
-// MessageId: PDH_FILE_NOT_FOUND
-//
-// MessageText:
-//
-// Unable to find the specified file.
-//
-
- PDH_FILE_NOT_FOUND = DWORD($C0000BD1);
- {$EXTERNALSYM PDH_FILE_NOT_FOUND}
-
-//
-// MessageId: PDH_FILE_ALREADY_EXISTS
-//
-// MessageText:
-//
-// There is already a file with the specified file name.
-//
-
- PDH_FILE_ALREADY_EXISTS = DWORD($C0000BD2);
- {$EXTERNALSYM PDH_FILE_ALREADY_EXISTS}
-
-//
-// MessageId: PDH_NOT_IMPLEMENTED
-//
-// MessageText:
-//
-// The function referenced has not been implemented.
-//
-
- PDH_NOT_IMPLEMENTED = DWORD($C0000BD3);
- {$EXTERNALSYM PDH_NOT_IMPLEMENTED}
-
-//
-// MessageId: PDH_STRING_NOT_FOUND
-//
-// MessageText:
-//
-// Unable to find the specified string in the list of performance name and
-// explain text strings.
-//
-
- PDH_STRING_NOT_FOUND = DWORD($C0000BD4);
- {$EXTERNALSYM PDH_STRING_NOT_FOUND}
-
-//
-// MessageId: PDH_UNABLE_MAP_NAME_FILES
-//
-// MessageText:
-//
-// Unable to map to the performance counter name data files. The data
-// will be read from the registry and stored locally.
-//
-
- PDH_UNABLE_MAP_NAME_FILES = DWORD($80000BD5);
- {$EXTERNALSYM PDH_UNABLE_MAP_NAME_FILES}
-
-//
-// MessageId: PDH_UNKNOWN_LOG_FORMAT
-//
-// MessageText:
-//
-// The format of the specified log file is not recognized by the PDH DLL.
-//
-
- PDH_UNKNOWN_LOG_FORMAT = DWORD($C0000BD6);
- {$EXTERNALSYM PDH_UNKNOWN_LOG_FORMAT}
-
-//
-// MessageId: PDH_UNKNOWN_LOGSVC_COMMAND
-//
-// MessageText:
-//
-// The specified Log Service command value is not recognized.
-//
-
- PDH_UNKNOWN_LOGSVC_COMMAND = DWORD($C0000BD7);
- {$EXTERNALSYM PDH_UNKNOWN_LOGSVC_COMMAND}
-
-//
-// MessageId: PDH_LOGSVC_QUERY_NOT_FOUND
-//
-// MessageText:
-//
-// The specified Query from the Log Service could not be found or could not
-// be opened.
-//
-
- PDH_LOGSVC_QUERY_NOT_FOUND = DWORD($C0000BD8);
- {$EXTERNALSYM PDH_LOGSVC_QUERY_NOT_FOUND}
-
-//
-// MessageId: PDH_LOGSVC_NOT_OPENED
-//
-// MessageText:
-//
-// The Performance Data Log Service key could not be opened. This may be due
-// to insufficient privilege or because the service has not been installed.
-//
-
- PDH_LOGSVC_NOT_OPENED = DWORD($C0000BD9);
- {$EXTERNALSYM PDH_LOGSVC_NOT_OPENED}
-
-//
-// MessageId: PDH_WBEM_ERROR
-//
-// MessageText:
-//
-// An error occurred while accessing the WBEM data store.
-//
-
- PDH_WBEM_ERROR = DWORD($C0000BDA);
- {$EXTERNALSYM PDH_WBEM_ERROR}
-
-//
-// MessageId: PDH_ACCESS_DENIED
-//
-// MessageText:
-//
-// Unable to access the desired machine or service. Check the permissions and
-// authentication of the log service or the interactive user session against
-// those on the machine or service being monitored.
-//
-
- PDH_ACCESS_DENIED = DWORD($C0000BDB);
- {$EXTERNALSYM PDH_ACCESS_DENIED}
-
-//
-// MessageId: PDH_LOG_FILE_TOO_SMALL
-//
-// MessageText:
-//
-// The maximum log file size specified is too small to log the selected counters.
-// No data will be recorded in this log file. Specify a smaller set of counters
-// to log or a larger file size and retry this call.
-//
-
- PDH_LOG_FILE_TOO_SMALL = DWORD($C0000BDC);
- {$EXTERNALSYM PDH_LOG_FILE_TOO_SMALL}
-
-//
-// MessageId: PDH_INVALID_DATASOURCE
-//
-// MessageText:
-//
-// Cannot connect to ODBC DataSource Name.
-//
-
- PDH_INVALID_DATASOURCE = DWORD($C0000BDD);
- {$EXTERNALSYM PDH_INVALID_DATASOURCE}
-
-//
-// MessageId: PDH_INVALID_SQLDB
-//
-// MessageText:
-//
-// SQL Database does not contain a valid set of tables for Perfmon, use PdhCreateSQLTables.
-//
-
- PDH_INVALID_SQLDB = DWORD($C0000BDE);
- {$EXTERNALSYM PDH_INVALID_SQLDB}
-
-//
-// MessageId: PDH_NO_COUNTERS
-//
-// MessageText:
-//
-// No counters were found for this Perfmon SQL Log Set.
-//
-
- PDH_NO_COUNTERS = DWORD($C0000BDF);
- {$EXTERNALSYM PDH_NO_COUNTERS}
-
-//
-// MessageId: PDH_SQL_ALLOC_FAILED
-//
-// MessageText:
-//
-// Call to SQLAllocStmt failed with %1.
-//
-
- PDH_SQL_ALLOC_FAILED = DWORD($C0000BE0);
- {$EXTERNALSYM PDH_SQL_ALLOC_FAILED}
-
-//
-// MessageId: PDH_SQL_ALLOCCON_FAILED
-//
-// MessageText:
-//
-// Call to SQLAllocConnect failed with %1.
-//
-
- PDH_SQL_ALLOCCON_FAILED = DWORD($C0000BE1);
- {$EXTERNALSYM PDH_SQL_ALLOCCON_FAILED}
-
-//
-// MessageId: PDH_SQL_EXEC_DIRECT_FAILED
-//
-// MessageText:
-//
-// Call to SQLExecDirect failed with %1.
-//
-
- PDH_SQL_EXEC_DIRECT_FAILED = DWORD($C0000BE2);
- {$EXTERNALSYM PDH_SQL_EXEC_DIRECT_FAILED}
-
-//
-// MessageId: PDH_SQL_FETCH_FAILED
-//
-// MessageText:
-//
-// Call to SQLFetch failed with %1.
-//
-
- PDH_SQL_FETCH_FAILED = DWORD($C0000BE3);
- {$EXTERNALSYM PDH_SQL_FETCH_FAILED}
-
-//
-// MessageId: PDH_SQL_ROWCOUNT_FAILED
-//
-// MessageText:
-//
-// Call to SQLRowCount failed with %1.
-//
-
- PDH_SQL_ROWCOUNT_FAILED = DWORD($C0000BE4);
- {$EXTERNALSYM PDH_SQL_ROWCOUNT_FAILED}
-
-//
-// MessageId: PDH_SQL_MORE_RESULTS_FAILED
-//
-// MessageText:
-//
-// Call to SQLMoreResults failed with %1.
-//
-
- PDH_SQL_MORE_RESULTS_FAILED = DWORD($C0000BE5);
- {$EXTERNALSYM PDH_SQL_MORE_RESULTS_FAILED}
-
-//
-// MessageId: PDH_SQL_CONNECT_FAILED
-//
-// MessageText:
-//
-// Call to SQLConnect failed with %1.
-//
-
- PDH_SQL_CONNECT_FAILED = DWORD($C0000BE6);
- {$EXTERNALSYM PDH_SQL_CONNECT_FAILED}
-
-//
-// MessageId: PDH_SQL_BIND_FAILED
-//
-// MessageText:
-//
-// Call to SQLBindCol failed with %1.
-//
-
- PDH_SQL_BIND_FAILED = DWORD($C0000BE7);
- {$EXTERNALSYM PDH_SQL_BIND_FAILED}
-
-//
-// MessageId: PDH_CANNOT_CONNECT_WMI_SERVER
-//
-// MessageText:
-//
-// Unable to connect to the WMI server on requested machine.
-//
-
- PDH_CANNOT_CONNECT_WMI_SERVER = DWORD($C0000BE8);
- {$EXTERNALSYM PDH_CANNOT_CONNECT_WMI_SERVER}
-
-//
-// MessageId: PDH_PLA_COLLECTION_ALREADY_RUNNING
-//
-// MessageText:
-//
-// Collection "%1!s!" is already running.
-//
-
- PDH_PLA_COLLECTION_ALREADY_RUNNING = DWORD($C0000BE9);
- {$EXTERNALSYM PDH_PLA_COLLECTION_ALREADY_RUNNING}
-
-//
-// MessageId: PDH_PLA_ERROR_SCHEDULE_OVERLAP
-//
-// MessageText:
-//
-// The specified start time is after the end time.
-//
-
- PDH_PLA_ERROR_SCHEDULE_OVERLAP = DWORD($C0000BEA);
- {$EXTERNALSYM PDH_PLA_ERROR_SCHEDULE_OVERLAP}
-
-//
-// MessageId: PDH_PLA_COLLECTION_NOT_FOUND
-//
-// MessageText:
-//
-// Collection "%1!s!" does not exist.
-//
-
- PDH_PLA_COLLECTION_NOT_FOUND = DWORD($C0000BEB);
- {$EXTERNALSYM PDH_PLA_COLLECTION_NOT_FOUND}
-
-//
-// MessageId: PDH_PLA_ERROR_SCHEDULE_ELAPSED
-//
-// MessageText:
-//
-// The specified end time has already elapsed.
-//
-
- PDH_PLA_ERROR_SCHEDULE_ELAPSED = DWORD($C0000BEC);
- {$EXTERNALSYM PDH_PLA_ERROR_SCHEDULE_ELAPSED}
-
-//
-// MessageId: PDH_PLA_ERROR_NOSTART
-//
-// MessageText:
-//
-// Collection "%1!s!" did not start, check the application event log for any errors.
-//
-
- PDH_PLA_ERROR_NOSTART = DWORD($C0000BED);
- {$EXTERNALSYM PDH_PLA_ERROR_NOSTART}
-
-//
-// MessageId: PDH_PLA_ERROR_ALREADY_EXISTS
-//
-// MessageText:
-//
-// Collection "%1!s!" already exists.
-//
-
- PDH_PLA_ERROR_ALREADY_EXISTS = DWORD($C0000BEE);
- {$EXTERNALSYM PDH_PLA_ERROR_ALREADY_EXISTS}
-
-//
-// MessageId: PDH_PLA_ERROR_TYPE_MISMATCH
-//
-// MessageText:
-//
-// There is a mismatch in the settings type.
-//
-
- PDH_PLA_ERROR_TYPE_MISMATCH = DWORD($C0000BEF);
- {$EXTERNALSYM PDH_PLA_ERROR_TYPE_MISMATCH}
-
-//
-// MessageId: PDH_PLA_ERROR_FILEPATH
-//
-// MessageText:
-//
-// The information specified does not resolve to a valid path name.
-//
-
- PDH_PLA_ERROR_FILEPATH = DWORD($C0000BF0);
- {$EXTERNALSYM PDH_PLA_ERROR_FILEPATH}
-
-//
-// MessageId: PDH_PLA_SERVICE_ERROR
-//
-// MessageText:
-//
-// The "Performance Logs & Alerts" service did not respond.
-//
-
- PDH_PLA_SERVICE_ERROR = DWORD($C0000BF1);
- {$EXTERNALSYM PDH_PLA_SERVICE_ERROR}
-
-//
-// MessageId: PDH_PLA_VALIDATION_ERROR
-//
-// MessageText:
-//
-// The information passed is not valid.
-//
-
- PDH_PLA_VALIDATION_ERROR = DWORD($C0000BF2);
- {$EXTERNALSYM PDH_PLA_VALIDATION_ERROR}
-
-//
-// MessageId: PDH_PLA_VALIDATION_WARNING
-//
-// MessageText:
-//
-// The information passed is not valid.
-//
-
- PDH_PLA_VALIDATION_WARNING = DWORD($80000BF3);
- {$EXTERNALSYM PDH_PLA_VALIDATION_WARNING}
-
-//
-// MessageId: PDH_PLA_ERROR_NAME_TOO_LONG
-//
-// MessageText:
-//
-// The name supplied is too long.
-//
-
- PDH_PLA_ERROR_NAME_TOO_LONG = DWORD($C0000BF4);
- {$EXTERNALSYM PDH_PLA_ERROR_NAME_TOO_LONG}
-
-//
-// MessageId: PDH_INVALID_SQL_LOG_FORMAT
-//
-// MessageText:
-//
-// SQL log format is incorrect. Correct format is "SQL:<DSN-name>!<LogSet-Name>".
-//
-
- PDH_INVALID_SQL_LOG_FORMAT = DWORD($C0000BF5);
- {$EXTERNALSYM PDH_INVALID_SQL_LOG_FORMAT}
-
-//
-// MessageId: PDH_COUNTER_ALREADY_IN_QUERY
-//
-// MessageText:
-//
-// Performance counter in PdhAddCounter() call has already been added
-// in the performance query. This counter is ignored.
-//
-
- PDH_COUNTER_ALREADY_IN_QUERY = DWORD($C0000BF6);
- {$EXTERNALSYM PDH_COUNTER_ALREADY_IN_QUERY}
-
-//
-// MessageId: PDH_BINARY_LOG_CORRUPT
-//
-// MessageText:
-//
-// Unable to read counter information and data from input binary log files.
-//
-
- PDH_BINARY_LOG_CORRUPT = DWORD($C0000BF7);
- {$EXTERNALSYM PDH_BINARY_LOG_CORRUPT}
-
-//
-// MessageId: PDH_LOG_SAMPLE_TOO_SMALL
-//
-// MessageText:
-//
-// At least one of the input binary log files contain fewer than two data samples.
-//
-
- PDH_LOG_SAMPLE_TOO_SMALL = DWORD($C0000BF8);
- {$EXTERNALSYM PDH_LOG_SAMPLE_TOO_SMALL}
-
-//
-// MessageId: PDH_OS_LATER_VERSION
-//
-// MessageText:
-//
-// The version of the operating system on the computer named %1 is later than that on the local computer. This operation is not available from the local computer.
-//
-
- PDH_OS_LATER_VERSION = DWORD($C0000BF9);
- {$EXTERNALSYM PDH_OS_LATER_VERSION}
-
-//
-// MessageId: PDH_OS_EARLIER_VERSION
-//
-// MessageText:
-//
-// %1 supports %2 or later. Check the operating system version on the computer named %3.
-//
-
- PDH_OS_EARLIER_VERSION = DWORD($C0000BFA);
- {$EXTERNALSYM PDH_OS_EARLIER_VERSION}
-
-//
-// MessageId: PDH_INCORRECT_APPEND_TIME
-//
-// MessageText:
-//
-// The output file must contain earlier data than the file to be appended.
-//
-
- PDH_INCORRECT_APPEND_TIME = DWORD($C0000BFB);
- {$EXTERNALSYM PDH_INCORRECT_APPEND_TIME}
-
-//
-// MessageId: PDH_UNMATCHED_APPEND_COUNTER
-//
-// MessageText:
-//
-// Both files must have identical counters in order to append.
-//
-
- PDH_UNMATCHED_APPEND_COUNTER = DWORD($C0000BFC);
- {$EXTERNALSYM PDH_UNMATCHED_APPEND_COUNTER}
-
-//
-// MessageId: PDH_SQL_ALTER_DETAIL_FAILED
-//
-// MessageText:
-//
-// Cannot alter CounterDetail table layout in SQL database.
-//
-
- PDH_SQL_ALTER_DETAIL_FAILED = DWORD($C0000BFD);
- {$EXTERNALSYM PDH_SQL_ALTER_DETAIL_FAILED}
-
-//
-// MessageId: PDH_QUERY_PERF_DATA_TIMEOUT
-//
-// MessageText:
-//
-// System is busy. Timeout when collecting counter data. Please retry later or increase "CollectTime" registry value.
-//
-
- PDH_QUERY_PERF_DATA_TIMEOUT = DWORD($C0000BFE);
- {$EXTERNALSYM PDH_QUERY_PERF_DATA_TIMEOUT}
-
-implementation
-
-end.
+{******************************************************************************}
+{ }
+{ Performance Data Helper Error Codes API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: pdhmsg.h, released August 2001. The original Pascal }
+{ code is: PdhMsg.pas, released December 2000. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwapdhmsg.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaPdhMsg;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "pdhmsg.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaWinType;
+
+// PDH DLL messages
+//
+//
+// Success Messages
+//
+// the Win32 error value ERROR_SUCCESS is used for success returns
+//
+// MESSAGE NAME FORMAT
+//
+// PDH_CSTATUS_... messages are data item status message and
+// are returned in reference to the status of a data
+// item
+// PDH_... messages are returned by FUNCTIONS only and
+// not used as data item status values
+//
+// Success Messages
+// These messages are normally returned when the operation completed
+// successfully.
+//
+//
+// Values are 32 bit values layed out as follows:
+//
+// 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1
+// 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
+// +---+-+-+-----------------------+-------------------------------+
+// |Sev|C|R| Facility | Code |
+// +---+-+-+-----------------------+-------------------------------+
+//
+// where
+//
+// Sev - is the severity code
+//
+// 00 - Success
+// 01 - Informational
+// 10 - Warning
+// 11 - Error
+//
+// C - is the Customer code flag
+//
+// R - is a reserved bit
+//
+// Facility - is the facility code
+//
+// Code - is the facility's status code
+//
+//
+// Define the facility codes
+
+const
+
+//
+// Define the severity codes
+//
+
+ STATUS_SEVERITY_WARNING = $2;
+ {$EXTERNALSYM STATUS_SEVERITY_WARNING}
+ STATUS_SEVERITY_SUCCESS = $0;
+ {$EXTERNALSYM STATUS_SEVERITY_SUCCESS}
+ STATUS_SEVERITY_INFORMATIONAL = $1;
+ {$EXTERNALSYM STATUS_SEVERITY_INFORMATIONAL}
+ STATUS_SEVERITY_ERROR = $3;
+ {$EXTERNALSYM STATUS_SEVERITY_ERROR}
+
+//
+// MessageId: PDH_CSTATUS_VALID_DATA
+//
+// MessageText:
+//
+// The returned data is valid.
+//
+
+ PDH_CSTATUS_VALID_DATA = DWORD($00000000);
+ {$EXTERNALSYM PDH_CSTATUS_VALID_DATA}
+
+//
+// MessageId: PDH_CSTATUS_NEW_DATA
+//
+// MessageText:
+//
+// The return data value is valid and different from the last sample.
+//
+
+ PDH_CSTATUS_NEW_DATA = DWORD($00000001);
+ {$EXTERNALSYM PDH_CSTATUS_NEW_DATA}
+
+//
+// Informational messages
+//
+// None
+//
+// Warning Messages
+// These messages are returned when the function has completed
+// successfully but the results may be different than expected.
+//
+//
+// MessageId: PDH_CSTATUS_NO_MACHINE
+//
+// MessageText:
+//
+// Unable to connect to specified machine or machine is off line.
+//
+
+ PDH_CSTATUS_NO_MACHINE = DWORD($800007D0);
+ {$EXTERNALSYM PDH_CSTATUS_NO_MACHINE}
+
+//
+// MessageId: PDH_CSTATUS_NO_INSTANCE
+//
+// MessageText:
+//
+// The specified instance is not present.
+//
+
+ PDH_CSTATUS_NO_INSTANCE = DWORD($800007D1);
+ {$EXTERNALSYM PDH_CSTATUS_NO_INSTANCE}
+
+//
+// MessageId: PDH_MORE_DATA
+//
+// MessageText:
+//
+// There is more data to return than would fit in the supplied buffer. Allocate
+// a larger buffer and call the function again.
+//
+
+ PDH_MORE_DATA = DWORD($800007D2);
+ {$EXTERNALSYM PDH_MORE_DATA}
+
+//
+// MessageId: PDH_CSTATUS_ITEM_NOT_VALIDATED
+//
+// MessageText:
+//
+// The data item has been added to the query, but has not been validated nor
+// accessed. No other status information on this data item is available.
+//
+
+ PDH_CSTATUS_ITEM_NOT_VALIDATED = DWORD($800007D3);
+ {$EXTERNALSYM PDH_CSTATUS_ITEM_NOT_VALIDATED}
+
+//
+// MessageId: PDH_RETRY
+//
+// MessageText:
+//
+// The selected operation should be retried.
+//
+
+ PDH_RETRY = DWORD($800007D4);
+ {$EXTERNALSYM PDH_RETRY}
+
+//
+// MessageId: PDH_NO_DATA
+//
+// MessageText:
+//
+// No data to return.
+//
+
+ PDH_NO_DATA = DWORD($800007D5);
+ {$EXTERNALSYM PDH_NO_DATA}
+
+//
+// MessageId: PDH_CALC_NEGATIVE_DENOMINATOR
+//
+// MessageText:
+//
+// A counter with a negative denominator value was detected.
+//
+
+ PDH_CALC_NEGATIVE_DENOMINATOR = DWORD($800007D6);
+ {$EXTERNALSYM PDH_CALC_NEGATIVE_DENOMINATOR}
+
+//
+// MessageId: PDH_CALC_NEGATIVE_TIMEBASE
+//
+// MessageText:
+//
+// A counter with a negative timebase value was detected.
+//
+
+ PDH_CALC_NEGATIVE_TIMEBASE = DWORD($800007D7);
+ {$EXTERNALSYM PDH_CALC_NEGATIVE_TIMEBASE}
+
+//
+// MessageId: PDH_CALC_NEGATIVE_VALUE
+//
+// MessageText:
+//
+// A counter with a negative value was detected.
+//
+
+ PDH_CALC_NEGATIVE_VALUE = DWORD($800007D8);
+ {$EXTERNALSYM PDH_CALC_NEGATIVE_VALUE}
+
+//
+// MessageId: PDH_DIALOG_CANCELLED
+//
+// MessageText:
+//
+// The user cancelled the dialog box.
+//
+
+ PDH_DIALOG_CANCELLED = DWORD($800007D9);
+ {$EXTERNALSYM PDH_DIALOG_CANCELLED}
+
+//
+// MessageId: PDH_END_OF_LOG_FILE
+//
+// MessageText:
+//
+// The end of the log file was reached.
+//
+
+ PDH_END_OF_LOG_FILE = DWORD($800007DA);
+ {$EXTERNALSYM PDH_END_OF_LOG_FILE}
+
+//
+// MessageId: PDH_ASYNC_QUERY_TIMEOUT
+//
+// MessageText:
+//
+// Time out while waiting for asynchronous counter collection thread to end.
+//
+
+ PDH_ASYNC_QUERY_TIMEOUT = DWORD($800007DB);
+ {$EXTERNALSYM PDH_ASYNC_QUERY_TIMEOUT}
+
+//
+// MessageId: PDH_CANNOT_SET_DEFAULT_REALTIME_DATASOURCE
+//
+// MessageText:
+//
+// Cannot change default real-time data source. There are real-time query
+// sessions collecting counter data.
+//
+
+ PDH_CANNOT_SET_DEFAULT_REALTIME_DATASOURCE = DWORD($800007DC);
+ {$EXTERNALSYM PDH_CANNOT_SET_DEFAULT_REALTIME_DATASOURCE}
+
+//
+// Error Messages
+// These messages are returned when the function could not complete
+// as requested and some corrective action may be required by the
+// the caller or the user.
+//
+//
+// MessageId: PDH_CSTATUS_NO_OBJECT
+//
+// MessageText:
+//
+// The specified object is not found on the system.
+//
+
+ PDH_CSTATUS_NO_OBJECT = DWORD($C0000BB8);
+ {$EXTERNALSYM PDH_CSTATUS_NO_OBJECT}
+
+//
+// MessageId: PDH_CSTATUS_NO_COUNTER
+//
+// MessageText:
+//
+// The specified counter could not be found.
+//
+
+ PDH_CSTATUS_NO_COUNTER = DWORD($C0000BB9);
+ {$EXTERNALSYM PDH_CSTATUS_NO_COUNTER}
+
+//
+// MessageId: PDH_CSTATUS_INVALID_DATA
+//
+// MessageText:
+//
+// The returned data is not valid.
+//
+
+ PDH_CSTATUS_INVALID_DATA = DWORD($C0000BBA);
+ {$EXTERNALSYM PDH_CSTATUS_INVALID_DATA}
+
+//
+// MessageId: PDH_MEMORY_ALLOCATION_FAILURE
+//
+// MessageText:
+//
+// A PDH function could not allocate enough temporary memory to complete the
+// operation. Close some applications or extend the pagefile and retry the
+// function.
+//
+
+ PDH_MEMORY_ALLOCATION_FAILURE = DWORD($C0000BBB);
+ {$EXTERNALSYM PDH_MEMORY_ALLOCATION_FAILURE}
+
+//
+// MessageId: PDH_INVALID_HANDLE
+//
+// MessageText:
+//
+// The handle is not a valid PDH object.
+//
+
+ PDH_INVALID_HANDLE = DWORD($C0000BBC);
+ {$EXTERNALSYM PDH_INVALID_HANDLE}
+
+//
+// MessageId: PDH_INVALID_ARGUMENT
+//
+// MessageText:
+//
+// A required argument is missing or incorrect.
+//
+
+ PDH_INVALID_ARGUMENT = DWORD($C0000BBD);
+ {$EXTERNALSYM PDH_INVALID_ARGUMENT}
+
+//
+// MessageId: PDH_FUNCTION_NOT_FOUND
+//
+// MessageText:
+//
+// Unable to find the specified function.
+//
+
+ PDH_FUNCTION_NOT_FOUND = DWORD($C0000BBE);
+ {$EXTERNALSYM PDH_FUNCTION_NOT_FOUND}
+
+//
+// MessageId: PDH_CSTATUS_NO_COUNTERNAME
+//
+// MessageText:
+//
+// No counter was specified.
+//
+
+ PDH_CSTATUS_NO_COUNTERNAME = DWORD($C0000BBF);
+ {$EXTERNALSYM PDH_CSTATUS_NO_COUNTERNAME}
+
+//
+// MessageId: PDH_CSTATUS_BAD_COUNTERNAME
+//
+// MessageText:
+//
+// Unable to parse the counter path. Check the format and syntax of the
+// specified path.
+//
+
+ PDH_CSTATUS_BAD_COUNTERNAME = DWORD($C0000BC0);
+ {$EXTERNALSYM PDH_CSTATUS_BAD_COUNTERNAME}
+
+//
+// MessageId: PDH_INVALID_BUFFER
+//
+// MessageText:
+//
+// The buffer passed by the caller is invalid.
+//
+
+ PDH_INVALID_BUFFER = DWORD($C0000BC1);
+ {$EXTERNALSYM PDH_INVALID_BUFFER}
+
+//
+// MessageId: PDH_INSUFFICIENT_BUFFER
+//
+// MessageText:
+//
+// The requested data is larger than the buffer supplied. Unable to return the
+// requested data.
+//
+
+ PDH_INSUFFICIENT_BUFFER = DWORD($C0000BC2);
+ {$EXTERNALSYM PDH_INSUFFICIENT_BUFFER}
+
+//
+// MessageId: PDH_CANNOT_CONNECT_MACHINE
+//
+// MessageText:
+//
+// Unable to connect to the requested machine.
+//
+
+ PDH_CANNOT_CONNECT_MACHINE = DWORD($C0000BC3);
+ {$EXTERNALSYM PDH_CANNOT_CONNECT_MACHINE}
+
+//
+// MessageId: PDH_INVALID_PATH
+//
+// MessageText:
+//
+// The specified counter path could not be interpreted.
+//
+
+ PDH_INVALID_PATH = DWORD($C0000BC4);
+ {$EXTERNALSYM PDH_INVALID_PATH}
+
+//
+// MessageId: PDH_INVALID_INSTANCE
+//
+// MessageText:
+//
+// The instance name could not be read from the specified counter path.
+//
+
+ PDH_INVALID_INSTANCE = DWORD($C0000BC5);
+ {$EXTERNALSYM PDH_INVALID_INSTANCE}
+
+//
+// MessageId: PDH_INVALID_DATA
+//
+// MessageText:
+//
+// The data is not valid.
+//
+
+ PDH_INVALID_DATA = DWORD($C0000BC6);
+ {$EXTERNALSYM PDH_INVALID_DATA}
+
+//
+// MessageId: PDH_NO_DIALOG_DATA
+//
+// MessageText:
+//
+// The dialog box data block was missing or invalid.
+//
+
+ PDH_NO_DIALOG_DATA = DWORD($C0000BC7);
+ {$EXTERNALSYM PDH_NO_DIALOG_DATA}
+
+//
+// MessageId: PDH_CANNOT_READ_NAME_STRINGS
+//
+// MessageText:
+//
+// Unable to read the counter and/or explain text from the specified machine.
+//
+
+ PDH_CANNOT_READ_NAME_STRINGS = DWORD($C0000BC8);
+ {$EXTERNALSYM PDH_CANNOT_READ_NAME_STRINGS}
+
+//
+// MessageId: PDH_LOG_FILE_CREATE_ERROR
+//
+// MessageText:
+//
+// Unable to create the specified log file.
+//
+
+ PDH_LOG_FILE_CREATE_ERROR = DWORD($C0000BC9);
+ {$EXTERNALSYM PDH_LOG_FILE_CREATE_ERROR}
+
+//
+// MessageId: PDH_LOG_FILE_OPEN_ERROR
+//
+// MessageText:
+//
+// Unable to open the specified log file.
+//
+
+ PDH_LOG_FILE_OPEN_ERROR = DWORD($C0000BCA);
+ {$EXTERNALSYM PDH_LOG_FILE_OPEN_ERROR}
+
+//
+// MessageId: PDH_LOG_TYPE_NOT_FOUND
+//
+// MessageText:
+//
+// The specified log file type has not been installed on this system.
+//
+
+ PDH_LOG_TYPE_NOT_FOUND = DWORD($C0000BCB);
+ {$EXTERNALSYM PDH_LOG_TYPE_NOT_FOUND}
+
+//
+// MessageId: PDH_NO_MORE_DATA
+//
+// MessageText:
+//
+// No more data is available.
+//
+
+ PDH_NO_MORE_DATA = DWORD($C0000BCC);
+ {$EXTERNALSYM PDH_NO_MORE_DATA}
+
+//
+// MessageId: PDH_ENTRY_NOT_IN_LOG_FILE
+//
+// MessageText:
+//
+// The specified record was not found in the log file.
+//
+
+ PDH_ENTRY_NOT_IN_LOG_FILE = DWORD($C0000BCD);
+ {$EXTERNALSYM PDH_ENTRY_NOT_IN_LOG_FILE}
+
+//
+// MessageId: PDH_DATA_SOURCE_IS_LOG_FILE
+//
+// MessageText:
+//
+// The specified data source is a log file.
+//
+
+ PDH_DATA_SOURCE_IS_LOG_FILE = DWORD($C0000BCE);
+ {$EXTERNALSYM PDH_DATA_SOURCE_IS_LOG_FILE}
+
+//
+// MessageId: PDH_DATA_SOURCE_IS_REAL_TIME
+//
+// MessageText:
+//
+// The specified data source is the current activity.
+//
+
+ PDH_DATA_SOURCE_IS_REAL_TIME = DWORD($C0000BCF);
+ {$EXTERNALSYM PDH_DATA_SOURCE_IS_REAL_TIME}
+
+//
+// MessageId: PDH_UNABLE_READ_LOG_HEADER
+//
+// MessageText:
+//
+// The log file header could not be read.
+//
+
+ PDH_UNABLE_READ_LOG_HEADER = DWORD($C0000BD0);
+ {$EXTERNALSYM PDH_UNABLE_READ_LOG_HEADER}
+
+//
+// MessageId: PDH_FILE_NOT_FOUND
+//
+// MessageText:
+//
+// Unable to find the specified file.
+//
+
+ PDH_FILE_NOT_FOUND = DWORD($C0000BD1);
+ {$EXTERNALSYM PDH_FILE_NOT_FOUND}
+
+//
+// MessageId: PDH_FILE_ALREADY_EXISTS
+//
+// MessageText:
+//
+// There is already a file with the specified file name.
+//
+
+ PDH_FILE_ALREADY_EXISTS = DWORD($C0000BD2);
+ {$EXTERNALSYM PDH_FILE_ALREADY_EXISTS}
+
+//
+// MessageId: PDH_NOT_IMPLEMENTED
+//
+// MessageText:
+//
+// The function referenced has not been implemented.
+//
+
+ PDH_NOT_IMPLEMENTED = DWORD($C0000BD3);
+ {$EXTERNALSYM PDH_NOT_IMPLEMENTED}
+
+//
+// MessageId: PDH_STRING_NOT_FOUND
+//
+// MessageText:
+//
+// Unable to find the specified string in the list of performance name and
+// explain text strings.
+//
+
+ PDH_STRING_NOT_FOUND = DWORD($C0000BD4);
+ {$EXTERNALSYM PDH_STRING_NOT_FOUND}
+
+//
+// MessageId: PDH_UNABLE_MAP_NAME_FILES
+//
+// MessageText:
+//
+// Unable to map to the performance counter name data files. The data
+// will be read from the registry and stored locally.
+//
+
+ PDH_UNABLE_MAP_NAME_FILES = DWORD($80000BD5);
+ {$EXTERNALSYM PDH_UNABLE_MAP_NAME_FILES}
+
+//
+// MessageId: PDH_UNKNOWN_LOG_FORMAT
+//
+// MessageText:
+//
+// The format of the specified log file is not recognized by the PDH DLL.
+//
+
+ PDH_UNKNOWN_LOG_FORMAT = DWORD($C0000BD6);
+ {$EXTERNALSYM PDH_UNKNOWN_LOG_FORMAT}
+
+//
+// MessageId: PDH_UNKNOWN_LOGSVC_COMMAND
+//
+// MessageText:
+//
+// The specified Log Service command value is not recognized.
+//
+
+ PDH_UNKNOWN_LOGSVC_COMMAND = DWORD($C0000BD7);
+ {$EXTERNALSYM PDH_UNKNOWN_LOGSVC_COMMAND}
+
+//
+// MessageId: PDH_LOGSVC_QUERY_NOT_FOUND
+//
+// MessageText:
+//
+// The specified Query from the Log Service could not be found or could not
+// be opened.
+//
+
+ PDH_LOGSVC_QUERY_NOT_FOUND = DWORD($C0000BD8);
+ {$EXTERNALSYM PDH_LOGSVC_QUERY_NOT_FOUND}
+
+//
+// MessageId: PDH_LOGSVC_NOT_OPENED
+//
+// MessageText:
+//
+// The Performance Data Log Service key could not be opened. This may be due
+// to insufficient privilege or because the service has not been installed.
+//
+
+ PDH_LOGSVC_NOT_OPENED = DWORD($C0000BD9);
+ {$EXTERNALSYM PDH_LOGSVC_NOT_OPENED}
+
+//
+// MessageId: PDH_WBEM_ERROR
+//
+// MessageText:
+//
+// An error occurred while accessing the WBEM data store.
+//
+
+ PDH_WBEM_ERROR = DWORD($C0000BDA);
+ {$EXTERNALSYM PDH_WBEM_ERROR}
+
+//
+// MessageId: PDH_ACCESS_DENIED
+//
+// MessageText:
+//
+// Unable to access the desired machine or service. Check the permissions and
+// authentication of the log service or the interactive user session against
+// those on the machine or service being monitored.
+//
+
+ PDH_ACCESS_DENIED = DWORD($C0000BDB);
+ {$EXTERNALSYM PDH_ACCESS_DENIED}
+
+//
+// MessageId: PDH_LOG_FILE_TOO_SMALL
+//
+// MessageText:
+//
+// The maximum log file size specified is too small to log the selected counters.
+// No data will be recorded in this log file. Specify a smaller set of counters
+// to log or a larger file size and retry this call.
+//
+
+ PDH_LOG_FILE_TOO_SMALL = DWORD($C0000BDC);
+ {$EXTERNALSYM PDH_LOG_FILE_TOO_SMALL}
+
+//
+// MessageId: PDH_INVALID_DATASOURCE
+//
+// MessageText:
+//
+// Cannot connect to ODBC DataSource Name.
+//
+
+ PDH_INVALID_DATASOURCE = DWORD($C0000BDD);
+ {$EXTERNALSYM PDH_INVALID_DATASOURCE}
+
+//
+// MessageId: PDH_INVALID_SQLDB
+//
+// MessageText:
+//
+// SQL Database does not contain a valid set of tables for Perfmon, use PdhCreateSQLTables.
+//
+
+ PDH_INVALID_SQLDB = DWORD($C0000BDE);
+ {$EXTERNALSYM PDH_INVALID_SQLDB}
+
+//
+// MessageId: PDH_NO_COUNTERS
+//
+// MessageText:
+//
+// No counters were found for this Perfmon SQL Log Set.
+//
+
+ PDH_NO_COUNTERS = DWORD($C0000BDF);
+ {$EXTERNALSYM PDH_NO_COUNTERS}
+
+//
+// MessageId: PDH_SQL_ALLOC_FAILED
+//
+// MessageText:
+//
+// Call to SQLAllocStmt failed with %1.
+//
+
+ PDH_SQL_ALLOC_FAILED = DWORD($C0000BE0);
+ {$EXTERNALSYM PDH_SQL_ALLOC_FAILED}
+
+//
+// MessageId: PDH_SQL_ALLOCCON_FAILED
+//
+// MessageText:
+//
+// Call to SQLAllocConnect failed with %1.
+//
+
+ PDH_SQL_ALLOCCON_FAILED = DWORD($C0000BE1);
+ {$EXTERNALSYM PDH_SQL_ALLOCCON_FAILED}
+
+//
+// MessageId: PDH_SQL_EXEC_DIRECT_FAILED
+//
+// MessageText:
+//
+// Call to SQLExecDirect failed with %1.
+//
+
+ PDH_SQL_EXEC_DIRECT_FAILED = DWORD($C0000BE2);
+ {$EXTERNALSYM PDH_SQL_EXEC_DIRECT_FAILED}
+
+//
+// MessageId: PDH_SQL_FETCH_FAILED
+//
+// MessageText:
+//
+// Call to SQLFetch failed with %1.
+//
+
+ PDH_SQL_FETCH_FAILED = DWORD($C0000BE3);
+ {$EXTERNALSYM PDH_SQL_FETCH_FAILED}
+
+//
+// MessageId: PDH_SQL_ROWCOUNT_FAILED
+//
+// MessageText:
+//
+// Call to SQLRowCount failed with %1.
+//
+
+ PDH_SQL_ROWCOUNT_FAILED = DWORD($C0000BE4);
+ {$EXTERNALSYM PDH_SQL_ROWCOUNT_FAILED}
+
+//
+// MessageId: PDH_SQL_MORE_RESULTS_FAILED
+//
+// MessageText:
+//
+// Call to SQLMoreResults failed with %1.
+//
+
+ PDH_SQL_MORE_RESULTS_FAILED = DWORD($C0000BE5);
+ {$EXTERNALSYM PDH_SQL_MORE_RESULTS_FAILED}
+
+//
+// MessageId: PDH_SQL_CONNECT_FAILED
+//
+// MessageText:
+//
+// Call to SQLConnect failed with %1.
+//
+
+ PDH_SQL_CONNECT_FAILED = DWORD($C0000BE6);
+ {$EXTERNALSYM PDH_SQL_CONNECT_FAILED}
+
+//
+// MessageId: PDH_SQL_BIND_FAILED
+//
+// MessageText:
+//
+// Call to SQLBindCol failed with %1.
+//
+
+ PDH_SQL_BIND_FAILED = DWORD($C0000BE7);
+ {$EXTERNALSYM PDH_SQL_BIND_FAILED}
+
+//
+// MessageId: PDH_CANNOT_CONNECT_WMI_SERVER
+//
+// MessageText:
+//
+// Unable to connect to the WMI server on requested machine.
+//
+
+ PDH_CANNOT_CONNECT_WMI_SERVER = DWORD($C0000BE8);
+ {$EXTERNALSYM PDH_CANNOT_CONNECT_WMI_SERVER}
+
+//
+// MessageId: PDH_PLA_COLLECTION_ALREADY_RUNNING
+//
+// MessageText:
+//
+// Collection "%1!s!" is already running.
+//
+
+ PDH_PLA_COLLECTION_ALREADY_RUNNING = DWORD($C0000BE9);
+ {$EXTERNALSYM PDH_PLA_COLLECTION_ALREADY_RUNNING}
+
+//
+// MessageId: PDH_PLA_ERROR_SCHEDULE_OVERLAP
+//
+// MessageText:
+//
+// The specified start time is after the end time.
+//
+
+ PDH_PLA_ERROR_SCHEDULE_OVERLAP = DWORD($C0000BEA);
+ {$EXTERNALSYM PDH_PLA_ERROR_SCHEDULE_OVERLAP}
+
+//
+// MessageId: PDH_PLA_COLLECTION_NOT_FOUND
+//
+// MessageText:
+//
+// Collection "%1!s!" does not exist.
+//
+
+ PDH_PLA_COLLECTION_NOT_FOUND = DWORD($C0000BEB);
+ {$EXTERNALSYM PDH_PLA_COLLECTION_NOT_FOUND}
+
+//
+// MessageId: PDH_PLA_ERROR_SCHEDULE_ELAPSED
+//
+// MessageText:
+//
+// The specified end time has already elapsed.
+//
+
+ PDH_PLA_ERROR_SCHEDULE_ELAPSED = DWORD($C0000BEC);
+ {$EXTERNALSYM PDH_PLA_ERROR_SCHEDULE_ELAPSED}
+
+//
+// MessageId: PDH_PLA_ERROR_NOSTART
+//
+// MessageText:
+//
+// Collection "%1!s!" did not start, check the application event log for any errors.
+//
+
+ PDH_PLA_ERROR_NOSTART = DWORD($C0000BED);
+ {$EXTERNALSYM PDH_PLA_ERROR_NOSTART}
+
+//
+// MessageId: PDH_PLA_ERROR_ALREADY_EXISTS
+//
+// MessageText:
+//
+// Collection "%1!s!" already exists.
+//
+
+ PDH_PLA_ERROR_ALREADY_EXISTS = DWORD($C0000BEE);
+ {$EXTERNALSYM PDH_PLA_ERROR_ALREADY_EXISTS}
+
+//
+// MessageId: PDH_PLA_ERROR_TYPE_MISMATCH
+//
+// MessageText:
+//
+// There is a mismatch in the settings type.
+//
+
+ PDH_PLA_ERROR_TYPE_MISMATCH = DWORD($C0000BEF);
+ {$EXTERNALSYM PDH_PLA_ERROR_TYPE_MISMATCH}
+
+//
+// MessageId: PDH_PLA_ERROR_FILEPATH
+//
+// MessageText:
+//
+// The information specified does not resolve to a valid path name.
+//
+
+ PDH_PLA_ERROR_FILEPATH = DWORD($C0000BF0);
+ {$EXTERNALSYM PDH_PLA_ERROR_FILEPATH}
+
+//
+// MessageId: PDH_PLA_SERVICE_ERROR
+//
+// MessageText:
+//
+// The "Performance Logs & Alerts" service did not respond.
+//
+
+ PDH_PLA_SERVICE_ERROR = DWORD($C0000BF1);
+ {$EXTERNALSYM PDH_PLA_SERVICE_ERROR}
+
+//
+// MessageId: PDH_PLA_VALIDATION_ERROR
+//
+// MessageText:
+//
+// The information passed is not valid.
+//
+
+ PDH_PLA_VALIDATION_ERROR = DWORD($C0000BF2);
+ {$EXTERNALSYM PDH_PLA_VALIDATION_ERROR}
+
+//
+// MessageId: PDH_PLA_VALIDATION_WARNING
+//
+// MessageText:
+//
+// The information passed is not valid.
+//
+
+ PDH_PLA_VALIDATION_WARNING = DWORD($80000BF3);
+ {$EXTERNALSYM PDH_PLA_VALIDATION_WARNING}
+
+//
+// MessageId: PDH_PLA_ERROR_NAME_TOO_LONG
+//
+// MessageText:
+//
+// The name supplied is too long.
+//
+
+ PDH_PLA_ERROR_NAME_TOO_LONG = DWORD($C0000BF4);
+ {$EXTERNALSYM PDH_PLA_ERROR_NAME_TOO_LONG}
+
+//
+// MessageId: PDH_INVALID_SQL_LOG_FORMAT
+//
+// MessageText:
+//
+// SQL log format is incorrect. Correct format is "SQL:<DSN-name>!<LogSet-Name>".
+//
+
+ PDH_INVALID_SQL_LOG_FORMAT = DWORD($C0000BF5);
+ {$EXTERNALSYM PDH_INVALID_SQL_LOG_FORMAT}
+
+//
+// MessageId: PDH_COUNTER_ALREADY_IN_QUERY
+//
+// MessageText:
+//
+// Performance counter in PdhAddCounter() call has already been added
+// in the performance query. This counter is ignored.
+//
+
+ PDH_COUNTER_ALREADY_IN_QUERY = DWORD($C0000BF6);
+ {$EXTERNALSYM PDH_COUNTER_ALREADY_IN_QUERY}
+
+//
+// MessageId: PDH_BINARY_LOG_CORRUPT
+//
+// MessageText:
+//
+// Unable to read counter information and data from input binary log files.
+//
+
+ PDH_BINARY_LOG_CORRUPT = DWORD($C0000BF7);
+ {$EXTERNALSYM PDH_BINARY_LOG_CORRUPT}
+
+//
+// MessageId: PDH_LOG_SAMPLE_TOO_SMALL
+//
+// MessageText:
+//
+// At least one of the input binary log files contain fewer than two data samples.
+//
+
+ PDH_LOG_SAMPLE_TOO_SMALL = DWORD($C0000BF8);
+ {$EXTERNALSYM PDH_LOG_SAMPLE_TOO_SMALL}
+
+//
+// MessageId: PDH_OS_LATER_VERSION
+//
+// MessageText:
+//
+// The version of the operating system on the computer named %1 is later than that on the local computer. This operation is not available from the local computer.
+//
+
+ PDH_OS_LATER_VERSION = DWORD($C0000BF9);
+ {$EXTERNALSYM PDH_OS_LATER_VERSION}
+
+//
+// MessageId: PDH_OS_EARLIER_VERSION
+//
+// MessageText:
+//
+// %1 supports %2 or later. Check the operating system version on the computer named %3.
+//
+
+ PDH_OS_EARLIER_VERSION = DWORD($C0000BFA);
+ {$EXTERNALSYM PDH_OS_EARLIER_VERSION}
+
+//
+// MessageId: PDH_INCORRECT_APPEND_TIME
+//
+// MessageText:
+//
+// The output file must contain earlier data than the file to be appended.
+//
+
+ PDH_INCORRECT_APPEND_TIME = DWORD($C0000BFB);
+ {$EXTERNALSYM PDH_INCORRECT_APPEND_TIME}
+
+//
+// MessageId: PDH_UNMATCHED_APPEND_COUNTER
+//
+// MessageText:
+//
+// Both files must have identical counters in order to append.
+//
+
+ PDH_UNMATCHED_APPEND_COUNTER = DWORD($C0000BFC);
+ {$EXTERNALSYM PDH_UNMATCHED_APPEND_COUNTER}
+
+//
+// MessageId: PDH_SQL_ALTER_DETAIL_FAILED
+//
+// MessageText:
+//
+// Cannot alter CounterDetail table layout in SQL database.
+//
+
+ PDH_SQL_ALTER_DETAIL_FAILED = DWORD($C0000BFD);
+ {$EXTERNALSYM PDH_SQL_ALTER_DETAIL_FAILED}
+
+//
+// MessageId: PDH_QUERY_PERF_DATA_TIMEOUT
+//
+// MessageText:
+//
+// System is busy. Timeout when collecting counter data. Please retry later or increase "CollectTime" registry value.
+//
+
+ PDH_QUERY_PERF_DATA_TIMEOUT = DWORD($C0000BFE);
+ {$EXTERNALSYM PDH_QUERY_PERF_DATA_TIMEOUT}
+
+implementation
+
+end.
diff --git a/packages/extra/winunits/jwapowrprof.pas b/packages/extra/winunits/jwapowrprof.pas
index 6a7351ab4d..d98d13d6a7 100644
--- a/packages/extra/winunits/jwapowrprof.pas
+++ b/packages/extra/winunits/jwapowrprof.pas
@@ -1,592 +1,592 @@
-{******************************************************************************}
-{ }
-{ Power Policy Applicator interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: powrprof.h, released June 2000. The original Pascal }
-{ code is: PowrProf.pas, released August 2001. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwapowrprof.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaPowrProf;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "powrprof.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaWinNT, JwaWinType;
-
-// Registry storage structures for the GLOBAL_POWER_POLICY data. There are two
-// structures, GLOBAL_MACHINE_POWER_POLICY and GLOBAL_USER_POWER_POLICY. the
-// GLOBAL_MACHINE_POWER_POLICY stores per machine data for which there is no UI.
-// GLOBAL_USER_POWER_POLICY stores the per user data.
-
-type
- PGLOBAL_MACHINE_POWER_POLICY = ^GLOBAL_MACHINE_POWER_POLICY;
- {$EXTERNALSYM PGLOBAL_MACHINE_POWER_POLICY}
- _GLOBAL_MACHINE_POWER_POLICY = record
- Revision: ULONG;
- LidOpenWakeAc: SYSTEM_POWER_STATE;
- LidOpenWakeDc: SYSTEM_POWER_STATE;
- BroadcastCapacityResolution: ULONG;
- end;
- {$EXTERNALSYM _GLOBAL_MACHINE_POWER_POLICY}
- GLOBAL_MACHINE_POWER_POLICY = _GLOBAL_MACHINE_POWER_POLICY;
- {$EXTERNALSYM GLOBAL_MACHINE_POWER_POLICY}
- TGlobalMachinePowerPolicy = GLOBAL_MACHINE_POWER_POLICY;
- PGlobalMachinePowerPolicy = PGLOBAL_MACHINE_POWER_POLICY;
-
- PGLOBAL_USER_POWER_POLICY = ^GLOBAL_USER_POWER_POLICY;
- {$EXTERNALSYM PGLOBAL_USER_POWER_POLICY}
- _GLOBAL_USER_POWER_POLICY = record
- Revision: ULONG;
- PowerButtonAc: POWER_ACTION_POLICY;
- PowerButtonDc: POWER_ACTION_POLICY;
- SleepButtonAc: POWER_ACTION_POLICY;
- SleepButtonDc: POWER_ACTION_POLICY;
- LidCloseAc: POWER_ACTION_POLICY;
- LidCloseDc: POWER_ACTION_POLICY;
- DischargePolicy: array [0..NUM_DISCHARGE_POLICIES - 1] of SYSTEM_POWER_LEVEL;
- GlobalFlags: ULONG;
- end;
- {$EXTERNALSYM _GLOBAL_USER_POWER_POLICY}
- GLOBAL_USER_POWER_POLICY = _GLOBAL_USER_POWER_POLICY;
- {$EXTERNALSYM GLOBAL_USER_POWER_POLICY}
- TGlobalUserPowerPolicy = GLOBAL_USER_POWER_POLICY;
- PGlobalUserPowerPolicy = PGLOBAL_USER_POWER_POLICY;
-
-// Structure to manage global power policies at the user level. This structure
-// contains data which is common across all power policy profiles.
-
- PGLOBAL_POWER_POLICY = ^GLOBAL_POWER_POLICY;
- {$EXTERNALSYM PGLOBAL_POWER_POLICY}
- _GLOBAL_POWER_POLICY = record
- user: GLOBAL_USER_POWER_POLICY;
- mach: GLOBAL_MACHINE_POWER_POLICY;
- end;
- {$EXTERNALSYM _GLOBAL_POWER_POLICY}
- GLOBAL_POWER_POLICY = _GLOBAL_POWER_POLICY;
- {$EXTERNALSYM GLOBAL_POWER_POLICY}
- TGlobalPowerPolicy = GLOBAL_POWER_POLICY;
- PGlobalPowerPolicy = PGLOBAL_POWER_POLICY;
-
-// Registry storage structures for the POWER_POLICY data. There are three
-// structures, MACHINE_POWER_POLICY, MACHINE_PROCESSOR_POWER_POLICY and USER_POWER_POLICY. the
-// MACHINE_POWER_POLICY stores per machine data for which there is no UI.
-// USER_POWER_POLICY stores the per user data.
-
- PMACHINE_POWER_POLICY = ^MACHINE_POWER_POLICY;
- {$EXTERNALSYM PMACHINE_POWER_POLICY}
- _MACHINE_POWER_POLICY = record
- Revision: ULONG; // 1
- // meaning of power action "sleep"
- MinSleepAc: SYSTEM_POWER_STATE;
- MinSleepDc: SYSTEM_POWER_STATE;
- ReducedLatencySleepAc: SYSTEM_POWER_STATE;
- ReducedLatencySleepDc: SYSTEM_POWER_STATE;
- // parameters for dozing
- DozeTimeoutAc: ULONG;
- DozeTimeoutDc: ULONG;
- DozeS4TimeoutAc: ULONG;
- DozeS4TimeoutDc: ULONG;
- // processor policies
- MinThrottleAc: UCHAR;
- MinThrottleDc: UCHAR;
- pad1: array [0..1] of UCHAR;
- OverThrottledAc: POWER_ACTION_POLICY;
- OverThrottledDc: POWER_ACTION_POLICY;
- end;
- {$EXTERNALSYM _MACHINE_POWER_POLICY}
- MACHINE_POWER_POLICY = _MACHINE_POWER_POLICY;
- {$EXTERNALSYM MACHINE_POWER_POLICY}
- TMachinePowerPolicy = MACHINE_POWER_POLICY;
- PMachinePowerPolicy = PMACHINE_POWER_POLICY;
-
- PMACHINE_PROCESSOR_POWER_POLICY = ^MACHINE_PROCESSOR_POWER_POLICY;
- {$EXTERNALSYM PMACHINE_PROCESSOR_POWER_POLICY}
- _MACHINE_PROCESSOR_POWER_POLICY = record
- Revision: ULONG; // 1
- ProcessorPolicyAc: PROCESSOR_POWER_POLICY;
- ProcessorPolicyDc: PROCESSOR_POWER_POLICY;
- end;
- {$EXTERNALSYM _MACHINE_PROCESSOR_POWER_POLICY}
- MACHINE_PROCESSOR_POWER_POLICY = _MACHINE_PROCESSOR_POWER_POLICY;
- {$EXTERNALSYM MACHINE_PROCESSOR_POWER_POLICY}
- TMachineProcessorPowerPolicy = MACHINE_PROCESSOR_POWER_POLICY;
- PMachineProcessorPowerPolicy = PMACHINE_PROCESSOR_POWER_POLICY;
-
- PUSER_POWER_POLICY = ^USER_POWER_POLICY;
- {$EXTERNALSYM PUSER_POWER_POLICY}
- _USER_POWER_POLICY = record
- Revision: ULONG; // 1
- // "system idle" detection
- IdleAc: POWER_ACTION_POLICY;
- IdleDc: POWER_ACTION_POLICY;
- IdleTimeoutAc: ULONG;
- IdleTimeoutDc: ULONG;
- IdleSensitivityAc: UCHAR;
- IdleSensitivityDc: UCHAR;
- // Throttling Policy
- ThrottlePolicyAc: UCHAR;
- ThrottlePolicyDc: UCHAR;
- // meaning of power action "sleep"
- MaxSleepAc: SYSTEM_POWER_STATE;
- MaxSleepDc: SYSTEM_POWER_STATE;
- // For future use
- Reserved: array [0..1] of ULONG;
- // video policies
- VideoTimeoutAc: ULONG;
- VideoTimeoutDc: ULONG;
- // hard disk policies
- SpindownTimeoutAc: ULONG;
- SpindownTimeoutDc: ULONG;
- // processor policies
- OptimizeForPowerAc: ByteBool;
- OptimizeForPowerDc: ByteBool;
- FanThrottleToleranceAc: UCHAR;
- FanThrottleToleranceDc: UCHAR;
- ForcedThrottleAc: UCHAR;
- ForcedThrottleDc: UCHAR;
- end;
- {$EXTERNALSYM _USER_POWER_POLICY}
- USER_POWER_POLICY = _USER_POWER_POLICY;
- {$EXTERNALSYM USER_POWER_POLICY}
- TUserPowerPolicy = USER_POWER_POLICY;
- PUserPowerPolicy = PUSER_POWER_POLICY;
-
-// Structure to manage power policies at the user level. This structure
-// contains data which is unique across power policy profiles.
-
- PPOWER_POLICY = ^POWER_POLICY;
- {$EXTERNALSYM PPOWER_POLICY}
- _POWER_POLICY = record
- user: USER_POWER_POLICY;
- mach: MACHINE_POWER_POLICY;
- end;
- {$EXTERNALSYM _POWER_POLICY}
- POWER_POLICY = _POWER_POLICY;
- {$EXTERNALSYM POWER_POLICY}
- TPowerPolicy = POWER_POLICY;
- PPowerPolicy = PPOWER_POLICY;
-
-// Constants for GlobalFlags
-
-const
- EnableSysTrayBatteryMeter = $01;
- {$EXTERNALSYM EnableSysTrayBatteryMeter}
- EnableMultiBatteryDisplay = $02;
- {$EXTERNALSYM EnableMultiBatteryDisplay}
- EnablePasswordLogon = $04;
- {$EXTERNALSYM EnablePasswordLogon}
- EnableWakeOnRing = $08;
- {$EXTERNALSYM EnableWakeOnRing}
- EnableVideoDimDisplay = $10;
- {$EXTERNALSYM EnableVideoDimDisplay}
-
-// This constant is passed as a uiID to WritePwrScheme.
-
- NEWSCHEME = UINT(-1);
- {$EXTERNALSYM NEWSCHEME}
-
-// Prototype for EnumPwrSchemes callback proceedures.
-
-type
- PWRSCHEMESENUMPROC = function(uiIndex: UINT; dwName: DWORD; sName: LPTSTR; dwDesc: DWORD; sDesc: LPTSTR; pp: PPOWER_POLICY; lParam: LPARAM): ByteBool; stdcall;
- {$EXTERNALSYM PWRSCHEMESENUMPROC}
- PFNNTINITIATEPWRACTION = function(pPowerAction: POWER_ACTION; SystemPowerState: SYSTEM_POWER_STATE; u: ULONG; b: ByteBool): ByteBool; stdcall;
- {$EXTERNALSYM PFNNTINITIATEPWRACTION}
-
-// Public function prototypes
-
-function GetPwrDiskSpindownRange(var RangeMax, RangeMin: UINT): ByteBool; stdcall;
-{$EXTERNALSYM GetPwrDiskSpindownRange}
-function EnumPwrSchemes(lpfnPwrSchemesEnumProc: PWRSCHEMESENUMPROC; lParam: LPARAM): ByteBool; stdcall;
-{$EXTERNALSYM EnumPwrSchemes}
-function ReadGlobalPwrPolicy(var pGlobalPowerPolicy: GLOBAL_POWER_POLICY): ByteBool; stdcall;
-{$EXTERNALSYM ReadGlobalPwrPolicy}
-function ReadPwrScheme(uiID: UINT; var pPowerPolicy: POWER_POLICY): ByteBool; stdcall;
-{$EXTERNALSYM ReadPwrScheme}
-function WritePwrScheme(puiID: PUINT; lpszName, lpszDescription: LPTSTR; const pPowerPolicy: POWER_POLICY): ByteBool; stdcall;
-{$EXTERNALSYM WritePwrScheme}
-function WriteGlobalPwrPolicy(const pGlobalPowerPolicy: GLOBAL_POWER_POLICY): ByteBool; stdcall;
-{$EXTERNALSYM WriteGlobalPwrPolicy}
-function DeletePwrScheme(uiIndex: UINT): ByteBool; stdcall;
-{$EXTERNALSYM DeletePwrScheme}
-function GetActivePwrScheme(var puiID: UINT): ByteBool; stdcall;
-{$EXTERNALSYM GetActivePwrScheme}
-function SetActivePwrScheme(uiID: UINT; pGlobalPowerPolicy: PGLOBAL_POWER_POLICY; pPowerPolicy: PPOWER_POLICY): ByteBool; stdcall;
-{$EXTERNALSYM SetActivePwrScheme}
-function GetPwrCapabilities(var lpSystemPowerCapabilities: SYSTEM_POWER_CAPABILITIES): ByteBool; stdcall;
-{$EXTERNALSYM GetPwrCapabilities}
-function IsPwrSuspendAllowed: ByteBool; stdcall;
-{$EXTERNALSYM IsPwrSuspendAllowed}
-function IsPwrHibernateAllowed: ByteBool; stdcall;
-{$EXTERNALSYM IsPwrHibernateAllowed}
-function IsPwrShutdownAllowed: ByteBool; stdcall;
-{$EXTERNALSYM IsPwrShutdownAllowed}
-function IsAdminOverrideActive(pAdministratorPowerPolicy: PADMINISTRATOR_POWER_POLICY): ByteBool; stdcall;
-{$EXTERNALSYM IsAdminOverrideActive}
-function SetSuspendState(Hibernate, ForceCritical, DisableWakeEvent: ByteBool): ByteBool; stdcall;
-{$EXTERNALSYM SetSuspendState}
-function GetCurrentPowerPolicies(pGlobalPowerPolicy: PGLOBAL_POWER_POLICY; pPowerPolicy: PPOWER_POLICY): ByteBool; stdcall;
-{$EXTERNALSYM GetCurrentPowerPolicies}
-function CanUserWritePwrScheme: ByteBool; stdcall;
-{$EXTERNALSYM CanUserWritePwrScheme}
-function ReadProcessorPwrScheme(uiID: UINT; var pMachineProcessorPowerPolicy: MACHINE_PROCESSOR_POWER_POLICY): ByteBool; stdcall;
-{$EXTERNALSYM ReadProcessorPwrScheme}
-function WriteProcessorPwrScheme(uiID: UINT; const pMachineProcessorPowerPolicy: MACHINE_PROCESSOR_POWER_POLICY): ByteBool; stdcall;
-{$EXTERNALSYM WriteProcessorPwrScheme}
-function ValidatePowerPolicies(GlobalPolicy: PGLOBAL_POWER_POLICY; Policy: PPOWER_POLICY): ByteBool; stdcall;
-{$EXTERNALSYM ValidatePowerPolicies}
-
-function CallNtPowerInformation(InformationLeveL: POWER_INFORMATION_LEVEL; lpInputBuffer: PVOID; nInputBufferSize: ULONG; lpOutputBuffer: PVOID; nOutputBufferSize: ULONG): NTSTATUS; stdcall;
-{$EXTERNALSYM CallNtPowerInformation}
-
-implementation
-
-const
- powrproflib = 'powrprof.dll';
-
-{$IFDEF DYNAMIC_LINK}
-
-var
- _GetPwrDiskSpindownRange: Pointer;
-
-function GetPwrDiskSpindownRange;
-begin
- GetProcedureAddress(_GetPwrDiskSpindownRange, powrproflib, 'GetPwrDiskSpindownRange');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetPwrDiskSpindownRange]
- end;
-end;
-
-var
- _EnumPwrSchemes: Pointer;
-
-function EnumPwrSchemes;
-begin
- GetProcedureAddress(_EnumPwrSchemes, powrproflib, 'EnumPwrSchemes');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_EnumPwrSchemes]
- end;
-end;
-
-var
- _ReadGlobalPwrPolicy: Pointer;
-
-function ReadGlobalPwrPolicy;
-begin
- GetProcedureAddress(_ReadGlobalPwrPolicy, powrproflib, 'ReadGlobalPwrPolicy');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ReadGlobalPwrPolicy]
- end;
-end;
-
-var
- _ReadPwrScheme: Pointer;
-
-function ReadPwrScheme;
-begin
- GetProcedureAddress(_ReadPwrScheme, powrproflib, 'ReadPwrScheme');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ReadPwrScheme]
- end;
-end;
-
-var
- _WritePwrScheme: Pointer;
-
-function WritePwrScheme;
-begin
- GetProcedureAddress(_WritePwrScheme, powrproflib, 'WritePwrScheme');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WritePwrScheme]
- end;
-end;
-
-var
- _WriteGlobalPwrPolicy: Pointer;
-
-function WriteGlobalPwrPolicy;
-begin
- GetProcedureAddress(_WriteGlobalPwrPolicy, powrproflib, 'WriteGlobalPwrPolicy');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WriteGlobalPwrPolicy]
- end;
-end;
-
-var
- _DeletePwrScheme: Pointer;
-
-function DeletePwrScheme;
-begin
- GetProcedureAddress(_DeletePwrScheme, powrproflib, 'DeletePwrScheme');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DeletePwrScheme]
- end;
-end;
-
-var
- _GetActivePwrScheme: Pointer;
-
-function GetActivePwrScheme;
-begin
- GetProcedureAddress(_GetActivePwrScheme, powrproflib, 'GetActivePwrScheme');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetActivePwrScheme]
- end;
-end;
-
-var
- _SetActivePwrScheme: Pointer;
-
-function SetActivePwrScheme;
-begin
- GetProcedureAddress(_SetActivePwrScheme, powrproflib, 'SetActivePwrScheme');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetActivePwrScheme]
- end;
-end;
-
-var
- _GetPwrCapabilities: Pointer;
-
-function GetPwrCapabilities;
-begin
- GetProcedureAddress(_GetPwrCapabilities, powrproflib, 'GetPwrCapabilities');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetPwrCapabilities]
- end;
-end;
-
-var
- _IsPwrSuspendAllowed: Pointer;
-
-function IsPwrSuspendAllowed;
-begin
- GetProcedureAddress(_IsPwrSuspendAllowed, powrproflib, 'IsPwrSuspendAllowed');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_IsPwrSuspendAllowed]
- end;
-end;
-
-var
- _IsPwrHibernateAllowed: Pointer;
-
-function IsPwrHibernateAllowed;
-begin
- GetProcedureAddress(_IsPwrHibernateAllowed, powrproflib, 'IsPwrHibernateAllowed');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_IsPwrHibernateAllowed]
- end;
-end;
-
-var
- _IsPwrShutdownAllowed: Pointer;
-
-function IsPwrShutdownAllowed;
-begin
- GetProcedureAddress(_IsPwrShutdownAllowed, powrproflib, 'IsPwrShutdownAllowed');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_IsPwrShutdownAllowed]
- end;
-end;
-
-var
- _IsAdminOverrideActive: Pointer;
-
-function IsAdminOverrideActive;
-begin
- GetProcedureAddress(_IsAdminOverrideActive, powrproflib, 'IsAdminOverrideActive');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_IsAdminOverrideActive]
- end;
-end;
-
-var
- _SetSuspendState: Pointer;
-
-function SetSuspendState;
-begin
- GetProcedureAddress(_SetSuspendState, powrproflib, 'SetSuspendState');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetSuspendState]
- end;
-end;
-
-var
- _GetCurrentPowerPolicies: Pointer;
-
-function GetCurrentPowerPolicies;
-begin
- GetProcedureAddress(_GetCurrentPowerPolicies, powrproflib, 'GetCurrentPowerPolicies');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetCurrentPowerPolicies]
- end;
-end;
-
-var
- _CanUserWritePwrScheme: Pointer;
-
-function CanUserWritePwrScheme;
-begin
- GetProcedureAddress(_CanUserWritePwrScheme, powrproflib, 'CanUserWritePwrScheme');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CanUserWritePwrScheme]
- end;
-end;
-
-var
- _ReadProcessorPwrScheme: Pointer;
-
-function ReadProcessorPwrScheme;
-begin
- GetProcedureAddress(_ReadProcessorPwrScheme, powrproflib, 'ReadProcessorPwrScheme');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ReadProcessorPwrScheme]
- end;
-end;
-
-var
- _WriteProcessorPwrScheme: Pointer;
-
-function WriteProcessorPwrScheme;
-begin
- GetProcedureAddress(_WriteProcessorPwrScheme, powrproflib, 'WriteProcessorPwrScheme');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WriteProcessorPwrScheme]
- end;
-end;
-
-var
- _ValidatePowerPolicies: Pointer;
-
-function ValidatePowerPolicies;
-begin
- GetProcedureAddress(_ValidatePowerPolicies, powrproflib, 'ValidatePowerPolicies');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ValidatePowerPolicies]
- end;
-end;
-
-var
- _CallNtPowerInformation: Pointer;
-
-function CallNtPowerInformation;
-begin
- GetProcedureAddress(_CallNtPowerInformation, powrproflib, 'CallNtPowerInformation');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CallNtPowerInformation]
- end;
-end;
-
-{$ELSE}
-
-function GetPwrDiskSpindownRange; external powrproflib name 'GetPwrDiskSpindownRange';
-function EnumPwrSchemes; external powrproflib name 'EnumPwrSchemes';
-function ReadGlobalPwrPolicy; external powrproflib name 'ReadGlobalPwrPolicy';
-function ReadPwrScheme; external powrproflib name 'ReadPwrScheme';
-function WritePwrScheme; external powrproflib name 'WritePwrScheme';
-function WriteGlobalPwrPolicy; external powrproflib name 'WriteGlobalPwrPolicy';
-function DeletePwrScheme; external powrproflib name 'DeletePwrScheme';
-function GetActivePwrScheme; external powrproflib name 'GetActivePwrScheme';
-function SetActivePwrScheme; external powrproflib name 'SetActivePwrScheme';
-function GetPwrCapabilities; external powrproflib name 'GetPwrCapabilities';
-function IsPwrSuspendAllowed; external powrproflib name 'IsPwrSuspendAllowed';
-function IsPwrHibernateAllowed; external powrproflib name 'IsPwrHibernateAllowed';
-function IsPwrShutdownAllowed; external powrproflib name 'IsPwrShutdownAllowed';
-function IsAdminOverrideActive; external powrproflib name 'IsAdminOverrideActive';
-function SetSuspendState; external powrproflib name 'SetSuspendState';
-function GetCurrentPowerPolicies; external powrproflib name 'GetCurrentPowerPolicies';
-function CanUserWritePwrScheme; external powrproflib name 'CanUserWritePwrScheme';
-function ReadProcessorPwrScheme; external powrproflib name 'ReadProcessorPwrScheme';
-function WriteProcessorPwrScheme; external powrproflib name 'WriteProcessorPwrScheme';
-function ValidatePowerPolicies; external powrproflib name 'ValidatePowerPolicies';
-function CallNtPowerInformation; external powrproflib name 'CallNtPowerInformation';
-
-{$ENDIF DYNAMIC_LINK}
-
-end.
+{******************************************************************************}
+{ }
+{ Power Policy Applicator interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: powrprof.h, released June 2000. The original Pascal }
+{ code is: PowrProf.pas, released August 2001. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwapowrprof.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaPowrProf;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "powrprof.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaWinNT, JwaWinType;
+
+// Registry storage structures for the GLOBAL_POWER_POLICY data. There are two
+// structures, GLOBAL_MACHINE_POWER_POLICY and GLOBAL_USER_POWER_POLICY. the
+// GLOBAL_MACHINE_POWER_POLICY stores per machine data for which there is no UI.
+// GLOBAL_USER_POWER_POLICY stores the per user data.
+
+type
+ PGLOBAL_MACHINE_POWER_POLICY = ^GLOBAL_MACHINE_POWER_POLICY;
+ {$EXTERNALSYM PGLOBAL_MACHINE_POWER_POLICY}
+ _GLOBAL_MACHINE_POWER_POLICY = record
+ Revision: ULONG;
+ LidOpenWakeAc: SYSTEM_POWER_STATE;
+ LidOpenWakeDc: SYSTEM_POWER_STATE;
+ BroadcastCapacityResolution: ULONG;
+ end;
+ {$EXTERNALSYM _GLOBAL_MACHINE_POWER_POLICY}
+ GLOBAL_MACHINE_POWER_POLICY = _GLOBAL_MACHINE_POWER_POLICY;
+ {$EXTERNALSYM GLOBAL_MACHINE_POWER_POLICY}
+ TGlobalMachinePowerPolicy = GLOBAL_MACHINE_POWER_POLICY;
+ PGlobalMachinePowerPolicy = PGLOBAL_MACHINE_POWER_POLICY;
+
+ PGLOBAL_USER_POWER_POLICY = ^GLOBAL_USER_POWER_POLICY;
+ {$EXTERNALSYM PGLOBAL_USER_POWER_POLICY}
+ _GLOBAL_USER_POWER_POLICY = record
+ Revision: ULONG;
+ PowerButtonAc: POWER_ACTION_POLICY;
+ PowerButtonDc: POWER_ACTION_POLICY;
+ SleepButtonAc: POWER_ACTION_POLICY;
+ SleepButtonDc: POWER_ACTION_POLICY;
+ LidCloseAc: POWER_ACTION_POLICY;
+ LidCloseDc: POWER_ACTION_POLICY;
+ DischargePolicy: array [0..NUM_DISCHARGE_POLICIES - 1] of SYSTEM_POWER_LEVEL;
+ GlobalFlags: ULONG;
+ end;
+ {$EXTERNALSYM _GLOBAL_USER_POWER_POLICY}
+ GLOBAL_USER_POWER_POLICY = _GLOBAL_USER_POWER_POLICY;
+ {$EXTERNALSYM GLOBAL_USER_POWER_POLICY}
+ TGlobalUserPowerPolicy = GLOBAL_USER_POWER_POLICY;
+ PGlobalUserPowerPolicy = PGLOBAL_USER_POWER_POLICY;
+
+// Structure to manage global power policies at the user level. This structure
+// contains data which is common across all power policy profiles.
+
+ PGLOBAL_POWER_POLICY = ^GLOBAL_POWER_POLICY;
+ {$EXTERNALSYM PGLOBAL_POWER_POLICY}
+ _GLOBAL_POWER_POLICY = record
+ user: GLOBAL_USER_POWER_POLICY;
+ mach: GLOBAL_MACHINE_POWER_POLICY;
+ end;
+ {$EXTERNALSYM _GLOBAL_POWER_POLICY}
+ GLOBAL_POWER_POLICY = _GLOBAL_POWER_POLICY;
+ {$EXTERNALSYM GLOBAL_POWER_POLICY}
+ TGlobalPowerPolicy = GLOBAL_POWER_POLICY;
+ PGlobalPowerPolicy = PGLOBAL_POWER_POLICY;
+
+// Registry storage structures for the POWER_POLICY data. There are three
+// structures, MACHINE_POWER_POLICY, MACHINE_PROCESSOR_POWER_POLICY and USER_POWER_POLICY. the
+// MACHINE_POWER_POLICY stores per machine data for which there is no UI.
+// USER_POWER_POLICY stores the per user data.
+
+ PMACHINE_POWER_POLICY = ^MACHINE_POWER_POLICY;
+ {$EXTERNALSYM PMACHINE_POWER_POLICY}
+ _MACHINE_POWER_POLICY = record
+ Revision: ULONG; // 1
+ // meaning of power action "sleep"
+ MinSleepAc: SYSTEM_POWER_STATE;
+ MinSleepDc: SYSTEM_POWER_STATE;
+ ReducedLatencySleepAc: SYSTEM_POWER_STATE;
+ ReducedLatencySleepDc: SYSTEM_POWER_STATE;
+ // parameters for dozing
+ DozeTimeoutAc: ULONG;
+ DozeTimeoutDc: ULONG;
+ DozeS4TimeoutAc: ULONG;
+ DozeS4TimeoutDc: ULONG;
+ // processor policies
+ MinThrottleAc: UCHAR;
+ MinThrottleDc: UCHAR;
+ pad1: array [0..1] of UCHAR;
+ OverThrottledAc: POWER_ACTION_POLICY;
+ OverThrottledDc: POWER_ACTION_POLICY;
+ end;
+ {$EXTERNALSYM _MACHINE_POWER_POLICY}
+ MACHINE_POWER_POLICY = _MACHINE_POWER_POLICY;
+ {$EXTERNALSYM MACHINE_POWER_POLICY}
+ TMachinePowerPolicy = MACHINE_POWER_POLICY;
+ PMachinePowerPolicy = PMACHINE_POWER_POLICY;
+
+ PMACHINE_PROCESSOR_POWER_POLICY = ^MACHINE_PROCESSOR_POWER_POLICY;
+ {$EXTERNALSYM PMACHINE_PROCESSOR_POWER_POLICY}
+ _MACHINE_PROCESSOR_POWER_POLICY = record
+ Revision: ULONG; // 1
+ ProcessorPolicyAc: PROCESSOR_POWER_POLICY;
+ ProcessorPolicyDc: PROCESSOR_POWER_POLICY;
+ end;
+ {$EXTERNALSYM _MACHINE_PROCESSOR_POWER_POLICY}
+ MACHINE_PROCESSOR_POWER_POLICY = _MACHINE_PROCESSOR_POWER_POLICY;
+ {$EXTERNALSYM MACHINE_PROCESSOR_POWER_POLICY}
+ TMachineProcessorPowerPolicy = MACHINE_PROCESSOR_POWER_POLICY;
+ PMachineProcessorPowerPolicy = PMACHINE_PROCESSOR_POWER_POLICY;
+
+ PUSER_POWER_POLICY = ^USER_POWER_POLICY;
+ {$EXTERNALSYM PUSER_POWER_POLICY}
+ _USER_POWER_POLICY = record
+ Revision: ULONG; // 1
+ // "system idle" detection
+ IdleAc: POWER_ACTION_POLICY;
+ IdleDc: POWER_ACTION_POLICY;
+ IdleTimeoutAc: ULONG;
+ IdleTimeoutDc: ULONG;
+ IdleSensitivityAc: UCHAR;
+ IdleSensitivityDc: UCHAR;
+ // Throttling Policy
+ ThrottlePolicyAc: UCHAR;
+ ThrottlePolicyDc: UCHAR;
+ // meaning of power action "sleep"
+ MaxSleepAc: SYSTEM_POWER_STATE;
+ MaxSleepDc: SYSTEM_POWER_STATE;
+ // For future use
+ Reserved: array [0..1] of ULONG;
+ // video policies
+ VideoTimeoutAc: ULONG;
+ VideoTimeoutDc: ULONG;
+ // hard disk policies
+ SpindownTimeoutAc: ULONG;
+ SpindownTimeoutDc: ULONG;
+ // processor policies
+ OptimizeForPowerAc: ByteBool;
+ OptimizeForPowerDc: ByteBool;
+ FanThrottleToleranceAc: UCHAR;
+ FanThrottleToleranceDc: UCHAR;
+ ForcedThrottleAc: UCHAR;
+ ForcedThrottleDc: UCHAR;
+ end;
+ {$EXTERNALSYM _USER_POWER_POLICY}
+ USER_POWER_POLICY = _USER_POWER_POLICY;
+ {$EXTERNALSYM USER_POWER_POLICY}
+ TUserPowerPolicy = USER_POWER_POLICY;
+ PUserPowerPolicy = PUSER_POWER_POLICY;
+
+// Structure to manage power policies at the user level. This structure
+// contains data which is unique across power policy profiles.
+
+ PPOWER_POLICY = ^POWER_POLICY;
+ {$EXTERNALSYM PPOWER_POLICY}
+ _POWER_POLICY = record
+ user: USER_POWER_POLICY;
+ mach: MACHINE_POWER_POLICY;
+ end;
+ {$EXTERNALSYM _POWER_POLICY}
+ POWER_POLICY = _POWER_POLICY;
+ {$EXTERNALSYM POWER_POLICY}
+ TPowerPolicy = POWER_POLICY;
+ PPowerPolicy = PPOWER_POLICY;
+
+// Constants for GlobalFlags
+
+const
+ EnableSysTrayBatteryMeter = $01;
+ {$EXTERNALSYM EnableSysTrayBatteryMeter}
+ EnableMultiBatteryDisplay = $02;
+ {$EXTERNALSYM EnableMultiBatteryDisplay}
+ EnablePasswordLogon = $04;
+ {$EXTERNALSYM EnablePasswordLogon}
+ EnableWakeOnRing = $08;
+ {$EXTERNALSYM EnableWakeOnRing}
+ EnableVideoDimDisplay = $10;
+ {$EXTERNALSYM EnableVideoDimDisplay}
+
+// This constant is passed as a uiID to WritePwrScheme.
+
+ NEWSCHEME = UINT(-1);
+ {$EXTERNALSYM NEWSCHEME}
+
+// Prototype for EnumPwrSchemes callback proceedures.
+
+type
+ PWRSCHEMESENUMPROC = function(uiIndex: UINT; dwName: DWORD; sName: LPTSTR; dwDesc: DWORD; sDesc: LPTSTR; pp: PPOWER_POLICY; lParam: LPARAM): ByteBool; stdcall;
+ {$EXTERNALSYM PWRSCHEMESENUMPROC}
+ PFNNTINITIATEPWRACTION = function(pPowerAction: POWER_ACTION; SystemPowerState: SYSTEM_POWER_STATE; u: ULONG; b: ByteBool): ByteBool; stdcall;
+ {$EXTERNALSYM PFNNTINITIATEPWRACTION}
+
+// Public function prototypes
+
+function GetPwrDiskSpindownRange(var RangeMax, RangeMin: UINT): ByteBool; stdcall;
+{$EXTERNALSYM GetPwrDiskSpindownRange}
+function EnumPwrSchemes(lpfnPwrSchemesEnumProc: PWRSCHEMESENUMPROC; lParam: LPARAM): ByteBool; stdcall;
+{$EXTERNALSYM EnumPwrSchemes}
+function ReadGlobalPwrPolicy(var pGlobalPowerPolicy: GLOBAL_POWER_POLICY): ByteBool; stdcall;
+{$EXTERNALSYM ReadGlobalPwrPolicy}
+function ReadPwrScheme(uiID: UINT; var pPowerPolicy: POWER_POLICY): ByteBool; stdcall;
+{$EXTERNALSYM ReadPwrScheme}
+function WritePwrScheme(puiID: PUINT; lpszName, lpszDescription: LPTSTR; const pPowerPolicy: POWER_POLICY): ByteBool; stdcall;
+{$EXTERNALSYM WritePwrScheme}
+function WriteGlobalPwrPolicy(const pGlobalPowerPolicy: GLOBAL_POWER_POLICY): ByteBool; stdcall;
+{$EXTERNALSYM WriteGlobalPwrPolicy}
+function DeletePwrScheme(uiIndex: UINT): ByteBool; stdcall;
+{$EXTERNALSYM DeletePwrScheme}
+function GetActivePwrScheme(var puiID: UINT): ByteBool; stdcall;
+{$EXTERNALSYM GetActivePwrScheme}
+function SetActivePwrScheme(uiID: UINT; pGlobalPowerPolicy: PGLOBAL_POWER_POLICY; pPowerPolicy: PPOWER_POLICY): ByteBool; stdcall;
+{$EXTERNALSYM SetActivePwrScheme}
+function GetPwrCapabilities(var lpSystemPowerCapabilities: SYSTEM_POWER_CAPABILITIES): ByteBool; stdcall;
+{$EXTERNALSYM GetPwrCapabilities}
+function IsPwrSuspendAllowed: ByteBool; stdcall;
+{$EXTERNALSYM IsPwrSuspendAllowed}
+function IsPwrHibernateAllowed: ByteBool; stdcall;
+{$EXTERNALSYM IsPwrHibernateAllowed}
+function IsPwrShutdownAllowed: ByteBool; stdcall;
+{$EXTERNALSYM IsPwrShutdownAllowed}
+function IsAdminOverrideActive(pAdministratorPowerPolicy: PADMINISTRATOR_POWER_POLICY): ByteBool; stdcall;
+{$EXTERNALSYM IsAdminOverrideActive}
+function SetSuspendState(Hibernate, ForceCritical, DisableWakeEvent: ByteBool): ByteBool; stdcall;
+{$EXTERNALSYM SetSuspendState}
+function GetCurrentPowerPolicies(pGlobalPowerPolicy: PGLOBAL_POWER_POLICY; pPowerPolicy: PPOWER_POLICY): ByteBool; stdcall;
+{$EXTERNALSYM GetCurrentPowerPolicies}
+function CanUserWritePwrScheme: ByteBool; stdcall;
+{$EXTERNALSYM CanUserWritePwrScheme}
+function ReadProcessorPwrScheme(uiID: UINT; var pMachineProcessorPowerPolicy: MACHINE_PROCESSOR_POWER_POLICY): ByteBool; stdcall;
+{$EXTERNALSYM ReadProcessorPwrScheme}
+function WriteProcessorPwrScheme(uiID: UINT; const pMachineProcessorPowerPolicy: MACHINE_PROCESSOR_POWER_POLICY): ByteBool; stdcall;
+{$EXTERNALSYM WriteProcessorPwrScheme}
+function ValidatePowerPolicies(GlobalPolicy: PGLOBAL_POWER_POLICY; Policy: PPOWER_POLICY): ByteBool; stdcall;
+{$EXTERNALSYM ValidatePowerPolicies}
+
+function CallNtPowerInformation(InformationLeveL: POWER_INFORMATION_LEVEL; lpInputBuffer: PVOID; nInputBufferSize: ULONG; lpOutputBuffer: PVOID; nOutputBufferSize: ULONG): NTSTATUS; stdcall;
+{$EXTERNALSYM CallNtPowerInformation}
+
+implementation
+
+const
+ powrproflib = 'powrprof.dll';
+
+{$IFDEF DYNAMIC_LINK}
+
+var
+ _GetPwrDiskSpindownRange: Pointer;
+
+function GetPwrDiskSpindownRange;
+begin
+ GetProcedureAddress(_GetPwrDiskSpindownRange, powrproflib, 'GetPwrDiskSpindownRange');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetPwrDiskSpindownRange]
+ end;
+end;
+
+var
+ _EnumPwrSchemes: Pointer;
+
+function EnumPwrSchemes;
+begin
+ GetProcedureAddress(_EnumPwrSchemes, powrproflib, 'EnumPwrSchemes');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_EnumPwrSchemes]
+ end;
+end;
+
+var
+ _ReadGlobalPwrPolicy: Pointer;
+
+function ReadGlobalPwrPolicy;
+begin
+ GetProcedureAddress(_ReadGlobalPwrPolicy, powrproflib, 'ReadGlobalPwrPolicy');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ReadGlobalPwrPolicy]
+ end;
+end;
+
+var
+ _ReadPwrScheme: Pointer;
+
+function ReadPwrScheme;
+begin
+ GetProcedureAddress(_ReadPwrScheme, powrproflib, 'ReadPwrScheme');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ReadPwrScheme]
+ end;
+end;
+
+var
+ _WritePwrScheme: Pointer;
+
+function WritePwrScheme;
+begin
+ GetProcedureAddress(_WritePwrScheme, powrproflib, 'WritePwrScheme');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WritePwrScheme]
+ end;
+end;
+
+var
+ _WriteGlobalPwrPolicy: Pointer;
+
+function WriteGlobalPwrPolicy;
+begin
+ GetProcedureAddress(_WriteGlobalPwrPolicy, powrproflib, 'WriteGlobalPwrPolicy');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WriteGlobalPwrPolicy]
+ end;
+end;
+
+var
+ _DeletePwrScheme: Pointer;
+
+function DeletePwrScheme;
+begin
+ GetProcedureAddress(_DeletePwrScheme, powrproflib, 'DeletePwrScheme');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DeletePwrScheme]
+ end;
+end;
+
+var
+ _GetActivePwrScheme: Pointer;
+
+function GetActivePwrScheme;
+begin
+ GetProcedureAddress(_GetActivePwrScheme, powrproflib, 'GetActivePwrScheme');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetActivePwrScheme]
+ end;
+end;
+
+var
+ _SetActivePwrScheme: Pointer;
+
+function SetActivePwrScheme;
+begin
+ GetProcedureAddress(_SetActivePwrScheme, powrproflib, 'SetActivePwrScheme');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetActivePwrScheme]
+ end;
+end;
+
+var
+ _GetPwrCapabilities: Pointer;
+
+function GetPwrCapabilities;
+begin
+ GetProcedureAddress(_GetPwrCapabilities, powrproflib, 'GetPwrCapabilities');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetPwrCapabilities]
+ end;
+end;
+
+var
+ _IsPwrSuspendAllowed: Pointer;
+
+function IsPwrSuspendAllowed;
+begin
+ GetProcedureAddress(_IsPwrSuspendAllowed, powrproflib, 'IsPwrSuspendAllowed');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_IsPwrSuspendAllowed]
+ end;
+end;
+
+var
+ _IsPwrHibernateAllowed: Pointer;
+
+function IsPwrHibernateAllowed;
+begin
+ GetProcedureAddress(_IsPwrHibernateAllowed, powrproflib, 'IsPwrHibernateAllowed');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_IsPwrHibernateAllowed]
+ end;
+end;
+
+var
+ _IsPwrShutdownAllowed: Pointer;
+
+function IsPwrShutdownAllowed;
+begin
+ GetProcedureAddress(_IsPwrShutdownAllowed, powrproflib, 'IsPwrShutdownAllowed');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_IsPwrShutdownAllowed]
+ end;
+end;
+
+var
+ _IsAdminOverrideActive: Pointer;
+
+function IsAdminOverrideActive;
+begin
+ GetProcedureAddress(_IsAdminOverrideActive, powrproflib, 'IsAdminOverrideActive');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_IsAdminOverrideActive]
+ end;
+end;
+
+var
+ _SetSuspendState: Pointer;
+
+function SetSuspendState;
+begin
+ GetProcedureAddress(_SetSuspendState, powrproflib, 'SetSuspendState');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetSuspendState]
+ end;
+end;
+
+var
+ _GetCurrentPowerPolicies: Pointer;
+
+function GetCurrentPowerPolicies;
+begin
+ GetProcedureAddress(_GetCurrentPowerPolicies, powrproflib, 'GetCurrentPowerPolicies');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetCurrentPowerPolicies]
+ end;
+end;
+
+var
+ _CanUserWritePwrScheme: Pointer;
+
+function CanUserWritePwrScheme;
+begin
+ GetProcedureAddress(_CanUserWritePwrScheme, powrproflib, 'CanUserWritePwrScheme');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CanUserWritePwrScheme]
+ end;
+end;
+
+var
+ _ReadProcessorPwrScheme: Pointer;
+
+function ReadProcessorPwrScheme;
+begin
+ GetProcedureAddress(_ReadProcessorPwrScheme, powrproflib, 'ReadProcessorPwrScheme');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ReadProcessorPwrScheme]
+ end;
+end;
+
+var
+ _WriteProcessorPwrScheme: Pointer;
+
+function WriteProcessorPwrScheme;
+begin
+ GetProcedureAddress(_WriteProcessorPwrScheme, powrproflib, 'WriteProcessorPwrScheme');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WriteProcessorPwrScheme]
+ end;
+end;
+
+var
+ _ValidatePowerPolicies: Pointer;
+
+function ValidatePowerPolicies;
+begin
+ GetProcedureAddress(_ValidatePowerPolicies, powrproflib, 'ValidatePowerPolicies');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ValidatePowerPolicies]
+ end;
+end;
+
+var
+ _CallNtPowerInformation: Pointer;
+
+function CallNtPowerInformation;
+begin
+ GetProcedureAddress(_CallNtPowerInformation, powrproflib, 'CallNtPowerInformation');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CallNtPowerInformation]
+ end;
+end;
+
+{$ELSE}
+
+function GetPwrDiskSpindownRange; external powrproflib name 'GetPwrDiskSpindownRange';
+function EnumPwrSchemes; external powrproflib name 'EnumPwrSchemes';
+function ReadGlobalPwrPolicy; external powrproflib name 'ReadGlobalPwrPolicy';
+function ReadPwrScheme; external powrproflib name 'ReadPwrScheme';
+function WritePwrScheme; external powrproflib name 'WritePwrScheme';
+function WriteGlobalPwrPolicy; external powrproflib name 'WriteGlobalPwrPolicy';
+function DeletePwrScheme; external powrproflib name 'DeletePwrScheme';
+function GetActivePwrScheme; external powrproflib name 'GetActivePwrScheme';
+function SetActivePwrScheme; external powrproflib name 'SetActivePwrScheme';
+function GetPwrCapabilities; external powrproflib name 'GetPwrCapabilities';
+function IsPwrSuspendAllowed; external powrproflib name 'IsPwrSuspendAllowed';
+function IsPwrHibernateAllowed; external powrproflib name 'IsPwrHibernateAllowed';
+function IsPwrShutdownAllowed; external powrproflib name 'IsPwrShutdownAllowed';
+function IsAdminOverrideActive; external powrproflib name 'IsAdminOverrideActive';
+function SetSuspendState; external powrproflib name 'SetSuspendState';
+function GetCurrentPowerPolicies; external powrproflib name 'GetCurrentPowerPolicies';
+function CanUserWritePwrScheme; external powrproflib name 'CanUserWritePwrScheme';
+function ReadProcessorPwrScheme; external powrproflib name 'ReadProcessorPwrScheme';
+function WriteProcessorPwrScheme; external powrproflib name 'WriteProcessorPwrScheme';
+function ValidatePowerPolicies; external powrproflib name 'ValidatePowerPolicies';
+function CallNtPowerInformation; external powrproflib name 'CallNtPowerInformation';
+
+{$ENDIF DYNAMIC_LINK}
+
+end.
diff --git a/packages/extra/winunits/jwaprofinfo.pas b/packages/extra/winunits/jwaprofinfo.pas
index 26fe2208b8..cebd25880c 100644
--- a/packages/extra/winunits/jwaprofinfo.pas
+++ b/packages/extra/winunits/jwaprofinfo.pas
@@ -1,115 +1,115 @@
-{******************************************************************************}
-{ }
-{ Profile Info Structures API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: profinfo.h, released June 2000. The original Pascal }
-{ code is: ProfInfo.pas, released December 2000. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwaprofinfo.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaProfInfo;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "profinfo.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaWinType;
-
-type
- LPPROFILEINFOA = ^PROFILEINFOA;
- {$EXTERNALSYM LPPROFILEINFOA}
- _PROFILEINFOA = record
- dwSize: DWORD; // Set to sizeof(PROFILEINFO) before calling
- dwFlags: DWORD; // See flags above
- lpUserName: LPSTR; // User name (required)
- lpProfilePath: LPSTR; // Roaming profile path (optional, can be NULL)
- lpDefaultPath: LPSTR; // Default user profile path (optional, can be NULL)
- lpServerName: LPSTR; // Validating domain controller name in netbios format (optional, can be NULL but group NT4 style policy won't be applied)
- lpPolicyPath: LPSTR; // Path to the NT4 style policy file (optional, can be NULL)
- hProfile: HANDLE; // Filled in by the function. Registry key handle open to the root.
- end;
- {$EXTERNALSYM _PROFILEINFOA}
- PROFILEINFOA = _PROFILEINFOA;
- {$EXTERNALSYM PROFILEINFOA}
- TProfileInfoA = PROFILEINFOA;
- PProfileInfoA = LPPROFILEINFOA;
-
- LPPROFILEINFOW = ^PROFILEINFOW;
- {$EXTERNALSYM LPPROFILEINFOW}
- _PROFILEINFOW = record
- dwSize: DWORD; // Set to sizeof(PROFILEINFO) before calling
- dwFlags: DWORD; // See flags above
- lpUserName: LPWSTR; // User name (required)
- lpProfilePath: LPWSTR; // Roaming profile path (optional, can be NULL)
- lpDefaultPath: LPWSTR; // Default user profile path (optional, can be NULL)
- lpServerName: LPWSTR; // Validating domain controller name in netbios format (optional, can be NULL but group NT4 style policy won't be applied)
- lpPolicyPath: LPWSTR; // Path to the NT4 style policy file (optional, can be NULL)
- hProfile: HANDLE; // Filled in by the function. Registry key handle open to the root.
- end;
- {$EXTERNALSYM _PROFILEINFOW}
- PROFILEINFOW = _PROFILEINFOW;
- {$EXTERNALSYM PROFILEINFOW}
- TProfileInfoW = PROFILEINFOW;
- PProfileInfoW = LPPROFILEINFOW;
-
- {$IFDEF UNICODE}
- PROFILEINFO = PROFILEINFOW;
- {$EXTERNALSYM PROFILEINFO}
- LPPROFILEINFO = LPPROFILEINFOW;
- {$EXTERNALSYM LPPROFILEINFO}
- TProfileInfo = TProfileInfoW;
- PProfileInfo = PProfileInfoW;
- {$ELSE}
- PROFILEINFO = PROFILEINFOA;
- {$EXTERNALSYM PROFILEINFO}
- LPPROFILEINFO = LPPROFILEINFOA;
- {$EXTERNALSYM LPPROFILEINFO}
- TProfileInfo = TProfileInfoA;
- PProfileInfo = PProfileInfoA;
- {$ENDIF UNICODE}
-
-implementation
-
-end.
+{******************************************************************************}
+{ }
+{ Profile Info Structures API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: profinfo.h, released June 2000. The original Pascal }
+{ code is: ProfInfo.pas, released December 2000. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwaprofinfo.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaProfInfo;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "profinfo.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaWinType;
+
+type
+ LPPROFILEINFOA = ^PROFILEINFOA;
+ {$EXTERNALSYM LPPROFILEINFOA}
+ _PROFILEINFOA = record
+ dwSize: DWORD; // Set to sizeof(PROFILEINFO) before calling
+ dwFlags: DWORD; // See flags above
+ lpUserName: LPSTR; // User name (required)
+ lpProfilePath: LPSTR; // Roaming profile path (optional, can be NULL)
+ lpDefaultPath: LPSTR; // Default user profile path (optional, can be NULL)
+ lpServerName: LPSTR; // Validating domain controller name in netbios format (optional, can be NULL but group NT4 style policy won't be applied)
+ lpPolicyPath: LPSTR; // Path to the NT4 style policy file (optional, can be NULL)
+ hProfile: HANDLE; // Filled in by the function. Registry key handle open to the root.
+ end;
+ {$EXTERNALSYM _PROFILEINFOA}
+ PROFILEINFOA = _PROFILEINFOA;
+ {$EXTERNALSYM PROFILEINFOA}
+ TProfileInfoA = PROFILEINFOA;
+ PProfileInfoA = LPPROFILEINFOA;
+
+ LPPROFILEINFOW = ^PROFILEINFOW;
+ {$EXTERNALSYM LPPROFILEINFOW}
+ _PROFILEINFOW = record
+ dwSize: DWORD; // Set to sizeof(PROFILEINFO) before calling
+ dwFlags: DWORD; // See flags above
+ lpUserName: LPWSTR; // User name (required)
+ lpProfilePath: LPWSTR; // Roaming profile path (optional, can be NULL)
+ lpDefaultPath: LPWSTR; // Default user profile path (optional, can be NULL)
+ lpServerName: LPWSTR; // Validating domain controller name in netbios format (optional, can be NULL but group NT4 style policy won't be applied)
+ lpPolicyPath: LPWSTR; // Path to the NT4 style policy file (optional, can be NULL)
+ hProfile: HANDLE; // Filled in by the function. Registry key handle open to the root.
+ end;
+ {$EXTERNALSYM _PROFILEINFOW}
+ PROFILEINFOW = _PROFILEINFOW;
+ {$EXTERNALSYM PROFILEINFOW}
+ TProfileInfoW = PROFILEINFOW;
+ PProfileInfoW = LPPROFILEINFOW;
+
+ {$IFDEF UNICODE}
+ PROFILEINFO = PROFILEINFOW;
+ {$EXTERNALSYM PROFILEINFO}
+ LPPROFILEINFO = LPPROFILEINFOW;
+ {$EXTERNALSYM LPPROFILEINFO}
+ TProfileInfo = TProfileInfoW;
+ PProfileInfo = PProfileInfoW;
+ {$ELSE}
+ PROFILEINFO = PROFILEINFOA;
+ {$EXTERNALSYM PROFILEINFO}
+ LPPROFILEINFO = LPPROFILEINFOA;
+ {$EXTERNALSYM LPPROFILEINFO}
+ TProfileInfo = TProfileInfoA;
+ PProfileInfo = PProfileInfoA;
+ {$ENDIF UNICODE}
+
+implementation
+
+end.
diff --git a/packages/extra/winunits/jwaprotocol.pas b/packages/extra/winunits/jwaprotocol.pas
index e4c3f312ee..d205bbd6b9 100644
--- a/packages/extra/winunits/jwaprotocol.pas
+++ b/packages/extra/winunits/jwaprotocol.pas
@@ -1,126 +1,126 @@
-{******************************************************************************}
-{ }
-{ Winsock2 Protocol Definitions API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: protocol.h, released June 2000. The original Pascal }
-{ code is: Protocol.pas, released December 2000. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwaprotocol.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaProtocol;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "protocol.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- {$IFDEF USE_DELPHI_TYPES}
- Windows;
- {$ELSE}
- JwaWinType;
- {$ENDIF USE_DELPHI_TYPES}
-
-type
- ETHERNET_ADDRESS = array [0..5] of BYTE;
- {$EXTERNALSYM ETHERNET_ADDRESS}
-
- ETHERNET_FRAME = record
- Destination: ETHERNET_ADDRESS;
- Source: ETHERNET_ADDRESS;
- FrameType: WORD; // in host-order
- end;
- {$EXTERNALSYM ETHERNET_FRAME}
- TEthernetFrame = ETHERNET_FRAME;
- PEthernetFrame = ^TEthernetFrame;
-
-const
- ETHERNET_FRAME_TYPE_IP = $0800;
- {$EXTERNALSYM ETHERNET_FRAME_TYPE_IP}
-
-type
- IP_HEADER = record
- x: BYTE;
- tos: BYTE;
- length: WORD;
- identifier: WORD;
- fragment: WORD;
- ttl: BYTE;
- protocol: BYTE;
- cksum: WORD;
- src: DWORD;
- dest: DWORD;
- end;
- {$EXTERNALSYM IP_HEADER}
- LPIP_HEADER = ^IP_HEADER;
- {$EXTERNALSYM LPIP_HEADER}
- TIPHeader = IP_HEADER;
- PIPHeader = LPIP_HEADER;
-
-const
- IP_MF = $2000;
- {$EXTERNALSYM IP_MF}
- IP_FRAGMENT_OFFSET_MASK = $1FFF;
- {$EXTERNALSYM IP_FRAGMENT_OFFSET_MASK}
-
- IP_HEADER_MINIMUM_LEN = 20;
- {$EXTERNALSYM IP_HEADER_MINIMUM_LEN}
-
-type
- UDP_HEADER = record
- src_port: WORD;
- dest_port: WORD;
- length: WORD; // including this header
- checksum: WORD;
- end;
- {$EXTERNALSYM UDP_HEADER}
- TUDPHeader = UDP_HEADER;
- PUDPHeader = ^TUDPHeader;
-
-const
- UDP_HEADER_LEN = 8;
- {$EXTERNALSYM UDP_HEADER_LEN}
-
-implementation
-
-end.
+{******************************************************************************}
+{ }
+{ Winsock2 Protocol Definitions API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: protocol.h, released June 2000. The original Pascal }
+{ code is: Protocol.pas, released December 2000. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwaprotocol.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaProtocol;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "protocol.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ {$IFDEF USE_DELPHI_TYPES}
+ Windows;
+ {$ELSE}
+ JwaWinType;
+ {$ENDIF USE_DELPHI_TYPES}
+
+type
+ ETHERNET_ADDRESS = array [0..5] of BYTE;
+ {$EXTERNALSYM ETHERNET_ADDRESS}
+
+ ETHERNET_FRAME = record
+ Destination: ETHERNET_ADDRESS;
+ Source: ETHERNET_ADDRESS;
+ FrameType: WORD; // in host-order
+ end;
+ {$EXTERNALSYM ETHERNET_FRAME}
+ TEthernetFrame = ETHERNET_FRAME;
+ PEthernetFrame = ^TEthernetFrame;
+
+const
+ ETHERNET_FRAME_TYPE_IP = $0800;
+ {$EXTERNALSYM ETHERNET_FRAME_TYPE_IP}
+
+type
+ IP_HEADER = record
+ x: BYTE;
+ tos: BYTE;
+ length: WORD;
+ identifier: WORD;
+ fragment: WORD;
+ ttl: BYTE;
+ protocol: BYTE;
+ cksum: WORD;
+ src: DWORD;
+ dest: DWORD;
+ end;
+ {$EXTERNALSYM IP_HEADER}
+ LPIP_HEADER = ^IP_HEADER;
+ {$EXTERNALSYM LPIP_HEADER}
+ TIPHeader = IP_HEADER;
+ PIPHeader = LPIP_HEADER;
+
+const
+ IP_MF = $2000;
+ {$EXTERNALSYM IP_MF}
+ IP_FRAGMENT_OFFSET_MASK = $1FFF;
+ {$EXTERNALSYM IP_FRAGMENT_OFFSET_MASK}
+
+ IP_HEADER_MINIMUM_LEN = 20;
+ {$EXTERNALSYM IP_HEADER_MINIMUM_LEN}
+
+type
+ UDP_HEADER = record
+ src_port: WORD;
+ dest_port: WORD;
+ length: WORD; // including this header
+ checksum: WORD;
+ end;
+ {$EXTERNALSYM UDP_HEADER}
+ TUDPHeader = UDP_HEADER;
+ PUDPHeader = ^TUDPHeader;
+
+const
+ UDP_HEADER_LEN = 8;
+ {$EXTERNALSYM UDP_HEADER_LEN}
+
+implementation
+
+end.
diff --git a/packages/extra/winunits/jwaprsht.pas b/packages/extra/winunits/jwaprsht.pas
index 27d81a06d1..ba0dfd6531 100644
--- a/packages/extra/winunits/jwaprsht.pas
+++ b/packages/extra/winunits/jwaprsht.pas
@@ -1,1050 +1,1050 @@
-{******************************************************************************}
-{ }
-{ Property Sheet Pages API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: prsht.h, released June 2000. The original Pascal }
-{ code is: PrSht.pas, released December 2000. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwaprsht.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaPrSht;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "ntdsapi.h"'}
-{$HPPEMIT ''}
-{$HPPEMIT 'typedef PHPROPSHEETPAGE *HPROPSHEETPAGE'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaWinNT, JwaWinUser, JwaWinType;
-
-//#ifndef CCSIZEOF_STRUCT
-//#define CCSIZEOF_STRUCT(structname, member) (((int)((LPBYTE)(&((structname*)0)->member) - ((LPBYTE)((structname*)0)))) + sizeof(((structname*)0)->member))
-//#endif
-
-//
-// For compilers that don't support nameless unions
-//
-
-const
- MAXPROPPAGES = 100;
- {$EXTERNALSYM MAXPROPPAGES}
-
-type
- HPROPSHEETPAGE = Pointer;
- {$EXTERNALSYM HPROPSHEETPAGE}
- PHPROPSHEETPAGE = ^HPROPSHEETPAGE;
- {$NODEFINE PHPROPSHEETPAGE}
-
- LPFNPSPCALLBACKA = function(hwnd: HWND; uMsg: UINT; ppsp: Pointer{LPPROPSHEETPAGEA}): UINT; stdcall;
- {$EXTERNALSYM LPFNPSPCALLBACKA}
- LPFNPSPCALLBACKW = function(hwnd: HWND; uMsg: UINT; ppsp: Pointer{LPPROPSHEETPAGEW}): UINT; stdcall;
- {$EXTERNALSYM LPFNPSPCALLBACKW}
-
- {$IFDEF UNICODE}
- LPFNPSPCALLBACK = function(hwnd: HWND; uMsg: UINT; ppsp: Pointer{LPPROPSHEETPAGEW}): UINT; stdcall;
- {$EXTERNALSYM LPFNPSPCALLBACK}
- {$ELSE}
- LPFNPSPCALLBACK = function(hwnd: HWND; uMsg: UINT; ppsp: Pointer{LPPROPSHEETPAGEA}): UINT; stdcall;
- {$EXTERNALSYM LPFNPSPCALLBACK}
- {$ENDIF UNICODE}
-
-const
- PSP_DEFAULT = $00000000;
- {$EXTERNALSYM PSP_DEFAULT}
- PSP_DLGINDIRECT = $00000001;
- {$EXTERNALSYM PSP_DLGINDIRECT}
- PSP_USEHICON = $00000002;
- {$EXTERNALSYM PSP_USEHICON}
- PSP_USEICONID = $00000004;
- {$EXTERNALSYM PSP_USEICONID}
- PSP_USETITLE = $00000008;
- {$EXTERNALSYM PSP_USETITLE}
- PSP_RTLREADING = $00000010;
- {$EXTERNALSYM PSP_RTLREADING}
-
- PSP_HASHELP = $00000020;
- {$EXTERNALSYM PSP_HASHELP}
- PSP_USEREFPARENT = $00000040;
- {$EXTERNALSYM PSP_USEREFPARENT}
- PSP_USECALLBACK = $00000080;
- {$EXTERNALSYM PSP_USECALLBACK}
- PSP_PREMATURE = $00000400;
- {$EXTERNALSYM PSP_PREMATURE}
-
-//----- New flags for wizard97 --------------
-
- PSP_HIDEHEADER = $00000800;
- {$EXTERNALSYM PSP_HIDEHEADER}
- PSP_USEHEADERTITLE = $00001000;
- {$EXTERNALSYM PSP_USEHEADERTITLE}
- PSP_USEHEADERSUBTITLE = $00002000;
- {$EXTERNALSYM PSP_USEHEADERSUBTITLE}
-
-//-------------------------------------------
-
- PSPCB_ADDREF = 0;
- {$EXTERNALSYM PSPCB_ADDREF}
- PSPCB_RELEASE = 1;
- {$EXTERNALSYM PSPCB_RELEASE}
- PSPCB_CREATE = 2;
- {$EXTERNALSYM PSPCB_CREATE}
-
-//#define PROPSHEETPAGEA_V1_SIZE CCSIZEOF_STRUCT(PROPSHEETPAGEA, pcRefParent)
-//#define PROPSHEETPAGEW_V1_SIZE CCSIZEOF_STRUCT(PROPSHEETPAGEW, pcRefParent)
-
-type
- _PROPSHEETPAGEA = record
- dwSize: DWORD;
- dwFlags: DWORD;
- hInstance: HINSTANCE;
- u: record
- case Integer of
- 0: (pszTemplate: LPCSTR);
- 1: (pResource: LPCDLGTEMPLATE);
- end;
- u2: record
- case Integer of
- 0: (hIcon: HICON);
- 1: (pszIcon: LPCSTR);
- end;
- pszTitle: LPCSTR;
- pfnDlgProc: DLGPROC;
- lParam: LPARAM;
- pfnCallback: LPFNPSPCALLBACKA;
- pcRefParent: LPUINT;
- {$IFDEF IE400_UP}
- pszHeaderTitle: LPCSTR; // this is displayed in the header
- pszHeaderSubTitle: LPCSTR; //
- {$ENDIF IE400_UP}
- end;
- {$EXTERNALSYM _PROPSHEETPAGEA}
- PROPSHEETPAGEA = _PROPSHEETPAGEA;
- {$EXTERNALSYM PROPSHEETPAGEA}
- LPPROPSHEETPAGEA = ^PROPSHEETPAGEA;
- {$EXTERNALSYM LPPROPSHEETPAGEA}
- LPCPROPSHEETPAGEA = LPPROPSHEETPAGEA;
- {$EXTERNALSYM LPCPROPSHEETPAGEA}
- TPropSheetPageA = PROPSHEETPAGEA;
- PPropSheetPageA = LPPROPSHEETPAGEA;
-
- _PROPSHEETPAGEW = record
- dwSize: DWORD;
- dwFlags: DWORD;
- hInstance: HINSTANCE;
- u: record
- case Integer of
- 0: (pszTemplate: LPCWSTR);
- 1: (pResource: LPCDLGTEMPLATE);
- end;
- u2: record
- case Integer of
- 0: (hIcon: HICON);
- 1: (pszIcon: LPCWSTR);
- end;
- pszTitle: LPCWSTR;
- pfnDlgProc: DLGPROC;
- lParam: LPARAM;
- pfnCallback: LPFNPSPCALLBACKW;
- pcRefParent: LPUINT;
- {$IFDEF IE400_UP}
- pszHeaderTitle: LPCWSTR; // this is displayed in the header
- pszHeaderSubTitle: LPCWSTR; //
- {$ENDIF IE400_UP}
- end;
- {$EXTERNALSYM _PROPSHEETPAGEW}
- PROPSHEETPAGEW = _PROPSHEETPAGEW;
- {$EXTERNALSYM PROPSHEETPAGEW}
- LPPROPSHEETPAGEW = ^PROPSHEETPAGEW;
- {$EXTERNALSYM LPPROPSHEETPAGEW}
- LPCPROPSHEETPAGEW = LPPROPSHEETPAGEW;
- {$EXTERNALSYM LPCPROPSHEETPAGEW}
- TPropSheetPageW = PROPSHEETPAGEW;
- PPropSheetPageW = LPPROPSHEETPAGEW;
-
-{$IFDEF UNICODE}
- PROPSHEETPAGE = PROPSHEETPAGEW;
- {$EXTERNALSYM PROPSHEETPAGE}
- LPPROPSHEETPAGE = LPPROPSHEETPAGEW;
- {$EXTERNALSYM LPPROPSHEETPAGE}
- LPCPROPSHEETPAGE = LPCPROPSHEETPAGEW;
- {$EXTERNALSYM LPCPROPSHEETPAGE}
- TPropSheetPage = TPropSheetPageW;
- PPropSheetPage = PPropSheetPageW;
-
-const
- PROPSHEETPAGE_V1_SIZE = 40; {PROPSHEETPAGEW_V1_SIZE}
- {$EXTERNALSYM PROPSHEETPAGE_V1_SIZE}
-{$ELSE}
- PROPSHEETPAGE = PROPSHEETPAGEA;
- {$EXTERNALSYM PROPSHEETPAGE}
- LPPROPSHEETPAGE = LPPROPSHEETPAGEA;
- {$EXTERNALSYM LPPROPSHEETPAGE}
- LPCPROPSHEETPAGE = LPCPROPSHEETPAGEA;
- {$EXTERNALSYM LPCPROPSHEETPAGE}
- TPropSheetPage = TPropSheetPageA;
- PPropSheetPage = PPropSheetPageA;
-
-const
- PROPSHEETPAGE_V1_SIZE = 40; {PROPSHEETPAGEA_V1_SIZE}
- {$EXTERNALSYM PROPSHEETPAGE_V1_SIZE}
-{$ENDIF UNICODE}
-
-const
- PSH_DEFAULT = $00000000;
- {$EXTERNALSYM PSH_DEFAULT}
- PSH_PROPTITLE = $00000001;
- {$EXTERNALSYM PSH_PROPTITLE}
- PSH_USEHICON = $00000002;
- {$EXTERNALSYM PSH_USEHICON}
- PSH_USEICONID = $00000004;
- {$EXTERNALSYM PSH_USEICONID}
- PSH_PROPSHEETPAGE = $00000008;
- {$EXTERNALSYM PSH_PROPSHEETPAGE}
- PSH_WIZARDHASFINISH = $00000010;
- {$EXTERNALSYM PSH_WIZARDHASFINISH}
- PSH_WIZARD = $00000020;
- {$EXTERNALSYM PSH_WIZARD}
- PSH_USEPSTARTPAGE = $00000040;
- {$EXTERNALSYM PSH_USEPSTARTPAGE}
- PSH_NOAPPLYNOW = $00000080;
- {$EXTERNALSYM PSH_NOAPPLYNOW}
- PSH_USECALLBACK = $00000100;
- {$EXTERNALSYM PSH_USECALLBACK}
- PSH_HASHELP = $00000200;
- {$EXTERNALSYM PSH_HASHELP}
- PSH_MODELESS = $00000400;
- {$EXTERNALSYM PSH_MODELESS}
- PSH_RTLREADING = $00000800;
- {$EXTERNALSYM PSH_RTLREADING}
- PSH_WIZARDCONTEXTHELP = $00001000;
- {$EXTERNALSYM PSH_WIZARDCONTEXTHELP}
-
-//----- New flags for wizard97 -----------
-
- {$IFDEF IE500_UP}
- PSH_WIZARD97 = $01000000;
- {$EXTERNALSYM PSH_WIZARD97}
- {$ELSE}
- PSH_WIZARD97 = $00002000;
- {$EXTERNALSYM PSH_WIZARD97}
- {$ENDIF IE500_UP}
-
-// 0x00004000 was not used by any previous release
-
- PSH_WATERMARK = $00008000;
- {$EXTERNALSYM PSH_WATERMARK}
- PSH_USEHBMWATERMARK = $00010000; // user pass in a hbmWatermark instead of pszbmWatermark
- {$EXTERNALSYM PSH_USEHBMWATERMARK}
- PSH_USEHPLWATERMARK = $00020000; //
- {$EXTERNALSYM PSH_USEHPLWATERMARK}
- PSH_STRETCHWATERMARK = $00040000; // stretchwatermark also applies for the header
- {$EXTERNALSYM PSH_STRETCHWATERMARK}
- PSH_HEADER = $00080000;
- {$EXTERNALSYM PSH_HEADER}
- PSH_USEHBMHEADER = $00100000;
- {$EXTERNALSYM PSH_USEHBMHEADER}
- PSH_USEPAGELANG = $00200000; // use frame dialog template matched to page
- {$EXTERNALSYM PSH_USEPAGELANG}
-
-//----------------------------------------
-
-//----- New flags for wizard-lite --------
-
- PSH_WIZARD_LITE = $00400000;
- {$EXTERNALSYM PSH_WIZARD_LITE}
- PSH_NOCONTEXTHELP = $02000000;
- {$EXTERNALSYM PSH_NOCONTEXTHELP}
-
-//----------------------------------------
-
-type
- PFNPROPSHEETCALLBACK = function(hwn: HWND; uMsg: UINT; lParam: LPARAM): Integer; stdcall;
- {$EXTERNALSYM PFNPROPSHEETCALLBACK}
-
-//const
-//#define PROPSHEETHEADERA_V1_SIZE CCSIZEOF_STRUCT(PROPSHEETHEADERA, pfnCallback)
-//#define PROPSHEETHEADERW_V1_SIZE CCSIZEOF_STRUCT(PROPSHEETHEADERW, pfnCallback)
-
-type
- _PROPSHEETHEADERA = record
- dwSize: DWORD;
- dwFlags: DWORD;
- hwndParent: HWND;
- hInstance: HINSTANCE;
- u: record
- case Integer of
- 0: (hIcon: HICON);
- 1: (pszIcon: LPCSTR);
- end;
- pszCaption: LPCSTR;
- nPages: UINT;
- u2: record
- case Integer of
- 0: (nStartPage: UINT);
- 1: (pStartPage: LPCSTR);
- end;
- u3: record
- case Integer of
- 0: (ppsp: LPCPROPSHEETPAGEA);
- 1: (phpage: PHPROPSHEETPAGE);
- end;
- pfnCallback: PFNPROPSHEETCALLBACK;
- {$IFDEF IE400_UP}
- u4: record
- case Integer of
- 0: (hbmWatermark: HBITMAP);
- 1: (pszbmWatermark: LPCSTR);
- end;
- hplWatermark: HPALETTE;
- u5: record
- case Integer of
- 0: (hbmHeader: HBITMAP); // Header bitmap shares the palette with watermark
- 1: (pszbmHeader: LPCSTR);
- end;
- {$ENDIF IE400_UP}
- end;
- {$EXTERNALSYM _PROPSHEETHEADERA}
- PROPSHEETHEADERA =_PROPSHEETHEADERA;
- {$EXTERNALSYM PROPSHEETHEADERA}
- LPPROPSHEETHEADERA = ^PROPSHEETHEADERA;
- {$EXTERNALSYM LPPROPSHEETHEADERA}
- LPCPROPSHEETHEADERA = LPPROPSHEETHEADERA;
- {$EXTERNALSYM LPCPROPSHEETHEADERA}
- TPropSheetHeaderA = PROPSHEETHEADERA;
- PPropSheetHeaderA = LPPROPSHEETHEADERA;
-
- _PROPSHEETHEADERW = record
- dwSize: DWORD;
- dwFlags: DWORD;
- hwndParent: HWND;
- hInstance: HINSTANCE;
- u: record
- case Integer of
- 0: (hIcon: HICON);
- 1: (pszIcon: LPCWSTR);
- end;
- pszCaption: LPCWSTR;
- nPages: UINT;
- u2: record
- case Integer of
- 0: (nStartPage: UINT);
- 1: (pStartPage: LPCWSTR);
- end;
- u3: record
- case Integer of
- 0: (ppsp: LPCPROPSHEETPAGEW);
- 1: (phpage: PHPROPSHEETPAGE);
- end;
- pfnCallback: PFNPROPSHEETCALLBACK;
- {$IFDEF IE400_UP}
- u4: record
- case Integer of
- 0: (hbmWatermark: HBITMAP);
- 1: (pszbmWatermark: LPCWSTR);
- end;
- hplWatermark: HPALETTE;
- u5: record
- case Integer of
- 0: (hbmHeader: HBITMAP); // Header bitmap shares the palette with watermark
- 1: (pszbmHeader: LPCWSTR);
- end;
- {$ENDIF IE400_UP}
- end;
- {$EXTERNALSYM _PROPSHEETHEADERW}
- PROPSHEETHEADERW =_PROPSHEETHEADERW;
- {$EXTERNALSYM PROPSHEETHEADERW}
- LPPROPSHEETHEADERW = ^PROPSHEETHEADERW;
- {$EXTERNALSYM LPPROPSHEETHEADERW}
- LPCPROPSHEETHEADERW = LPPROPSHEETHEADERW;
- {$EXTERNALSYM LPCPROPSHEETHEADERW}
- TPropSheetHeaderW = PROPSHEETHEADERW;
- PPropSheetHeaderW = LPPROPSHEETHEADERW;
-
-{$IFDEF UNICODE}
- PROPSHEETHEADER = PROPSHEETHEADERW;
- {$EXTERNALSYM PROPSHEETHEADER}
- LPPROPSHEETHEADER = LPPROPSHEETHEADERW;
- {$EXTERNALSYM LPPROPSHEETHEADER}
- LPCPROPSHEETHEADER = LPCPROPSHEETHEADERW;
- {$EXTERNALSYM LPCPROPSHEETHEADER}
- TPropSheetHeader = TPropSheetHeaderW;
- PPropSheetHeader = PPropSheetHeaderW;
-
-const
- PROPSHEETHEADER_V1_SIZE = 40; {PROPSHEETHEADERW_V1_SIZE}
- {$EXTERNALSYM PROPSHEETHEADER_V1_SIZE}
-{$ELSE}
- PROPSHEETHEADER = PROPSHEETHEADERA;
- {$EXTERNALSYM PROPSHEETHEADER}
- LPPROPSHEETHEADER = LPPROPSHEETHEADERA;
- {$EXTERNALSYM LPPROPSHEETHEADER}
- LPCPROPSHEETHEADER = LPCPROPSHEETHEADERA;
- {$EXTERNALSYM LPCPROPSHEETHEADER}
- TPropSheetHeader = TPropSheetHeaderA;
- PPropSheetHeader = PPropSheetHeaderA;
-
-const
- PROPSHEETHEADER_V1_SIZE = 40; {PROPSHEETHEADERA_V1_SIZE}
- {$EXTERNALSYM PROPSHEETHEADER_V1_SIZE}
-{$ENDIF UNICODE}
-
-const
- PSCB_INITIALIZED = 1;
- {$EXTERNALSYM PSCB_INITIALIZED}
- PSCB_PRECREATE = 2;
- {$EXTERNALSYM PSCB_PRECREATE}
-
-function CreatePropertySheetPageA(const lppsp: PROPSHEETPAGEA): HPROPSHEETPAGE; stdcall;
-{$EXTERNALSYM CreatePropertySheetPageA}
-function CreatePropertySheetPageW(const lppsp: PROPSHEETPAGEW): HPROPSHEETPAGE; stdcall;
-{$EXTERNALSYM DestroyPropertySheetPage}
-function DestroyPropertySheetPage(hPSPage: HPROPSHEETPAGE): BOOL; stdcall;
-{$EXTERNALSYM DestroyPropertySheetPage}
-function PropertySheetA(const lppsph: PROPSHEETHEADERA): INT_PTR; stdcall;
-{$EXTERNALSYM PropertySheetA}
-function PropertySheetW(const lppsph: PROPSHEETHEADERW): INT_PTR; stdcall;
-{$EXTERNALSYM PropertySheetW}
-function CreatePropertySheetPage(const lppsp: PROPSHEETPAGE): HPROPSHEETPAGE; stdcall;
-{$EXTERNALSYM DestroyPropertySheetPage}
-function PropertySheet(const lppsph: PROPSHEETHEADER): INT_PTR; stdcall;
-{$EXTERNALSYM PropertySheet}
-
-type
- LPFNADDPROPSHEETPAGE = function(page: HPROPSHEETPAGE; lParam: LPARAM): BOOL; stdcall;
- {$EXTERNALSYM LPFNADDPROPSHEETPAGE}
- LPFNADDPROPSHEETPAGES = function(pv: LPVOID; fn: LPFNADDPROPSHEETPAGE; lParam: LPARAM): BOOL; stdcall;
- {$EXTERNALSYM LPFNADDPROPSHEETPAGES}
-
- _PSHNOTIFY = record
- hdr: NMHDR;
- lParam: LPARAM;
- end;
- {$EXTERNALSYM _PSHNOTIFY}
- PSHNOTIFY = _PSHNOTIFY;
- {$EXTERNALSYM PSHNOTIFY}
- LPPSHNOTIFY = ^PSHNOTIFY;
- {$EXTERNALSYM LPPSHNOTIFY}
- TPSHNotify = PSHNOTIFY;
- PPSHNotify = LPPSHNOTIFY;
-
-const
- PSN_FIRST = ULONG(0-200);
- {$EXTERNALSYM PSN_FIRST}
- PSN_LAST = ULONG(0-299);
- {$EXTERNALSYM PSN_LAST}
-
- PSN_SETACTIVE = PSN_FIRST - 0;
- {$EXTERNALSYM PSN_SETACTIVE}
- PSN_KILLACTIVE = PSN_FIRST - 1;
- {$EXTERNALSYM PSN_KILLACTIVE}
- //PSN_VALIDATE = PSN_FIRST - 1;
- //{$EXTERNALSYM PSN_VALIDATE}
- PSN_APPLY = PSN_FIRST - 2;
- {$EXTERNALSYM PSN_APPLY}
- PSN_RESET = PSN_FIRST - 3;
- {$EXTERNALSYM PSN_RESET}
- //PSN_CANCEL = PSN_FIRST - 3;
- //{$EXTERNALSYM PSN_CANCEL}
- PSN_HELP = PSN_FIRST - 5;
- {$EXTERNALSYM PSN_HELP}
- PSN_WIZBACK = PSN_FIRST - 6;
- {$EXTERNALSYM PSN_WIZBACK}
- PSN_WIZNEXT = PSN_FIRST - 7;
- {$EXTERNALSYM PSN_WIZNEXT}
- PSN_WIZFINISH = PSN_FIRST - 8;
- {$EXTERNALSYM PSN_WIZFINISH}
- PSN_QUERYCANCEL = PSN_FIRST - 9;
- {$EXTERNALSYM PSN_QUERYCANCEL}
- PSN_GETOBJECT = PSN_FIRST - 10;
- {$EXTERNALSYM PSN_GETOBJECT}
- PSN_TRANSLATEACCELERATOR = PSN_FIRST - 12;
- {$EXTERNALSYM PSN_TRANSLATEACCELERATOR}
- PSN_QUERYINITIALFOCUS = PSN_FIRST - 13;
- {$EXTERNALSYM PSN_QUERYINITIALFOCUS}
-
- PSNRET_NOERROR = 0;
- {$EXTERNALSYM PSNRET_NOERROR}
- PSNRET_INVALID = 1;
- {$EXTERNALSYM PSNRET_INVALID}
- PSNRET_INVALID_NOCHANGEPAGE = 2;
- {$EXTERNALSYM PSNRET_INVALID_NOCHANGEPAGE}
- PSNRET_MESSAGEHANDLED = 3;
- {$EXTERNALSYM PSNRET_MESSAGEHANDLED}
-
- PSM_SETCURSEL = WM_USER + 101;
- {$EXTERNALSYM PSM_SETCURSEL}
-
-function PropSheet_SetCurSel(hPropSheetDlg: HWND; hPage: HPROPSHEETPAGE; Index: Integer): BOOL;
-
-const
- PSM_REMOVEPAGE = WM_USER + 102;
- {$EXTERNALSYM PSM_REMOVEPAGE}
-
-procedure PropSheet_RemovePage(hPropSheetDlg: HWND; Index: Integer; hPage: HPROPSHEETPAGE);
-
-const
- PSM_ADDPAGE = WM_USER + 103;
- {$EXTERNALSYM PSM_ADDPAGE}
-
-function PropSheet_AddPage(hPropSheetDlg: HWND; hpage: HPROPSHEETPAGE): BOOL;
-
-const
- PSM_CHANGED = WM_USER + 104;
- {$EXTERNALSYM PSM_CHANGED}
-
-function PropSheet_Changed(hPropSheetDlg: HWND; hwndPage: HWND): BOOL;
-
-const
- PSM_RESTARTWINDOWS = WM_USER + 105;
- {$EXTERNALSYM PSM_RESTARTWINDOWS}
-
-procedure PropSheet_RestartWindows(hPropSheetDlg: HWND);
-
-const
- PSM_REBOOTSYSTEM = WM_USER + 106;
- {$EXTERNALSYM PSM_REBOOTSYSTEM}
-
-procedure PropSheet_RebootSystem(hPropSheetDlg: HWND);
-
-const
- PSM_CANCELTOCLOSE = WM_USER + 107;
- {$EXTERNALSYM PSM_CANCELTOCLOSE}
-
-procedure PropSheet_CancelToClose(hPropSheetDlg: HWND);
-
-const
- PSM_QUERYSIBLINGS = WM_USER + 108;
- {$EXTERNALSYM PSM_QUERYSIBLINGS}
-
-function PropSheet_QuerySiblings(hPropSheetDlg: HWND; Param1: WPARAM; Param2: LPARAM): Integer;
-
-const
- PSM_UNCHANGED = WM_USER + 109;
- {$EXTERNALSYM PSM_UNCHANGED}
-
-procedure PropSheet_UnChanged(hPropSheetDlg: HWND; hwndPage: HWND);
-
-const
- PSM_APPLY = WM_USER + 110;
- {$EXTERNALSYM PSM_APPLY}
-
-function PropSheet_Apply(hPropSheetDlg: HWND): BOOL;
-
-const
- PSM_SETTITLEA = WM_USER + 111;
- {$EXTERNALSYM PSM_SETTITLEA}
- PSM_SETTITLEW = WM_USER + 120;
- {$EXTERNALSYM PSM_SETTITLEW}
-
- {$IFDEF UNICODE}
- PSM_SETTITLE = PSM_SETTITLEW;
- {$EXTERNALSYM PSM_SETTITLE}
- {$ELSE}
- PSM_SETTITLE = PSM_SETTITLEA;
- {$EXTERNALSYM PSM_SETTITLE}
- {$ENDIF UNICODE}
-
-procedure PropSheet_SetTitle(hPropSheetDlg: HWND; dwStyle: DWORD; lpszText: LPTSTR);
-
-const
- PSM_SETWIZBUTTONS = WM_USER + 112;
- {$EXTERNALSYM PSM_SETWIZBUTTONS}
-
-procedure PropSheet_SetWizButtons(hPropSheetDlg: HWND; dwFlags: DWORD);
-
-const
- PSWIZB_BACK = $00000001;
- {$EXTERNALSYM PSWIZB_BACK}
- PSWIZB_NEXT = $00000002;
- {$EXTERNALSYM PSWIZB_NEXT}
- PSWIZB_FINISH = $00000004;
- {$EXTERNALSYM PSWIZB_FINISH}
- PSWIZB_DISABLEDFINISH = $00000008;
- {$EXTERNALSYM PSWIZB_DISABLEDFINISH}
-
- PSM_PRESSBUTTON = WM_USER + 113;
- {$EXTERNALSYM PSM_PRESSBUTTON}
-
-function PropSheet_PressButton(hPropSheetDlg: HWND; iButton: Integer): BOOL;
-
-const
- PSBTN_BACK = 0;
- {$EXTERNALSYM PSBTN_BACK}
- PSBTN_NEXT = 1;
- {$EXTERNALSYM PSBTN_NEXT}
- PSBTN_FINISH = 2;
- {$EXTERNALSYM PSBTN_FINISH}
- PSBTN_OK = 3;
- {$EXTERNALSYM PSBTN_OK}
- PSBTN_APPLYNOW = 4;
- {$EXTERNALSYM PSBTN_APPLYNOW}
- PSBTN_CANCEL = 5;
- {$EXTERNALSYM PSBTN_CANCEL}
- PSBTN_HELP = 6;
- {$EXTERNALSYM PSBTN_HELP}
- PSBTN_MAX = 6;
- {$EXTERNALSYM PSBTN_MAX}
-
- PSM_SETCURSELID = WM_USER + 114;
- {$EXTERNALSYM PSM_SETCURSELID}
-
-function PropSheet_SetCurSelByID(hPropSheetDlg: HWND; id: Integer): BOOL;
-
-const
- PSM_SETFINISHTEXTA = WM_USER + 115;
- {$EXTERNALSYM PSM_SETFINISHTEXTA}
- PSM_SETFINISHTEXTW = WM_USER + 121;
- {$EXTERNALSYM PSM_SETFINISHTEXTW}
-
- {$IFDEF UNICODE}
- PSM_SETFINISHTEXT = PSM_SETFINISHTEXTW;
- {$EXTERNALSYM PSM_SETFINISHTEXT}
- {$ELSE}
- PSM_SETFINISHTEXT = PSM_SETFINISHTEXTA;
- {$EXTERNALSYM PSM_SETFINISHTEXT}
- {$ENDIF UNICODE}
-
-procedure PropSheet_SetFinishText(hPropSheetDlg: HWND; lpszText: LPTSTR);
-
-const
- PSM_GETTABCONTROL = WM_USER + 116;
- {$EXTERNALSYM PSM_GETTABCONTROL}
-
-function PropSheet_GetTabControl(hPropSheetDlg: HWND): HWND;
-
-const
- PSM_ISDIALOGMESSAGE = WM_USER + 117;
- {$EXTERNALSYM PSM_ISDIALOGMESSAGE}
-
-function PropSheet_IsDialogMessage(hDlg: HWND; pMsg: LPMSG): BOOL;
-
-const
- PSM_GETCURRENTPAGEHWND = WM_USER + 118;
- {$EXTERNALSYM PSM_GETCURRENTPAGEHWND}
-
-function PropSheet_GetCurrentPageHwnd(hDlg: HWND): HWND;
-
-const
- PSM_INSERTPAGE = WM_USER + 119;
- {$EXTERNALSYM PSM_INSERTPAGE}
-
-function PropSheet_InsertPage(hPropSheetDlg: HWND; index: Integer; hpage: HPROPSHEETPAGE): BOOL;
-
-const
- PSM_SETHEADERTITLEA = WM_USER + 125;
- {$EXTERNALSYM PSM_SETHEADERTITLEA}
- PSM_SETHEADERTITLEW = WM_USER + 126;
- {$EXTERNALSYM PSM_SETHEADERTITLEW}
-
- {$IFDEF UNICODE}
- PSM_SETHEADERTITLE = PSM_SETHEADERTITLEW;
- {$EXTERNALSYM PSM_SETHEADERTITLE}
- {$ELSE}
- PSM_SETHEADERTITLE = PSM_SETHEADERTITLEA;
- {$EXTERNALSYM PSM_SETHEADERTITLE}
- {$ENDIF UNICODE}
-
-function PropSheet_SetHeaderTitle(hWizardDlg: HWND; iPageIndex: Integer; lpszText: LPCSTR): Integer;
-
-const
- PSM_SETHEADERSUBTITLEA = WM_USER + 127;
- {$EXTERNALSYM PSM_SETHEADERSUBTITLEA}
- PSM_SETHEADERSUBTITLEW = WM_USER + 128;
- {$EXTERNALSYM PSM_SETHEADERSUBTITLEW}
-
- {$IFDEF UNICODE}
- PSM_SETHEADERSUBTITLE = PSM_SETHEADERSUBTITLEW;
- {$EXTERNALSYM PSM_SETHEADERSUBTITLE}
- {$ELSE}
- PSM_SETHEADERSUBTITLE = PSM_SETHEADERSUBTITLEA;
- {$EXTERNALSYM PSM_SETHEADERSUBTITLE}
- {$ENDIF UNICODE}
-
-procedure PropSheet_SetHeaderSubTitle(hWizardDlg: HWND; iPageIndex: Integer; pszHeaderSubTitle: LPCSTR);
-
-const
- PSM_HWNDTOINDEX = WM_USER + 129;
- {$EXTERNALSYM PSM_HWNDTOINDEX}
-
-function PropSheet_HwndToIndex(hPropSheetDlg: HWND; hPageDlg: HWND): Integer;
-
-const
- PSM_INDEXTOHWND = WM_USER + 130;
- {$EXTERNALSYM PSM_INDEXTOHWND}
-
-function PropSheet_IndexToHwnd(hPropSheetDlg: HWND; iPageIndex: Integer): HWND;
-
-const
- PSM_PAGETOINDEX = WM_USER + 131;
- {$EXTERNALSYM PSM_PAGETOINDEX}
-
-function PropSheet_PageToIndex(hPropSheetDlg: HWND; hPage: HPROPSHEETPAGE): Integer;
-
-const
- PSM_INDEXTOPAGE = WM_USER + 132;
- {$EXTERNALSYM PSM_INDEXTOPAGE}
-
-function PropSheet_IndexToPage(hPropSheetDlg: HWND; iPageIndex: Integer): HPROPSHEETPAGE;
-
-const
- PSM_IDTOINDEX = WM_USER + 133;
- {$EXTERNALSYM PSM_IDTOINDEX}
-
-function PropSheet_IdToIndex(hPropSheetDlg: HWND; iPageId: Integer): Integer;
-
-const
- PSM_INDEXTOID = WM_USER + 134;
- {$EXTERNALSYM PSM_INDEXTOID}
-
-function PropSheet_IndexToId(hPropSheetDlg: HWND; iPageIndex: Integer): Integer;
-
-const
- PSM_GETRESULT = WM_USER + 135;
- {$EXTERNALSYM PSM_GETRESULT}
-
-function PropSheet_GetResult(hPropSheetDlg: HWND): BOOL;
-
-const
- PSM_RECALCPAGESIZES = WM_USER + 136;
- {$EXTERNALSYM PSM_RECALCPAGESIZES}
-
-function PropSheet_RecalcPageSizes(hPropSheetDlg: HWND): BOOL;
-
-const
- ID_PSRESTARTWINDOWS = $2;
- {$EXTERNALSYM ID_PSRESTARTWINDOWS}
-
- ID_PSREBOOTSYSTEM = ID_PSRESTARTWINDOWS or $1;
- {$EXTERNALSYM ID_PSREBOOTSYSTEM}
-
- WIZ_CXDLG = 276;
- {$EXTERNALSYM WIZ_CXDLG}
- WIZ_CYDLG = 140;
- {$EXTERNALSYM WIZ_CYDLG}
-
- WIZ_CXBMP = 80;
- {$EXTERNALSYM WIZ_CXBMP}
-
- WIZ_BODYX = 92;
- {$EXTERNALSYM WIZ_BODYX}
- WIZ_BODYCX = 184;
- {$EXTERNALSYM WIZ_BODYCX}
-
- PROP_SM_CXDLG = 212;
- {$EXTERNALSYM PROP_SM_CXDLG}
- PROP_SM_CYDLG = 188;
- {$EXTERNALSYM PROP_SM_CYDLG}
-
- PROP_MED_CXDLG = 227;
- {$EXTERNALSYM PROP_MED_CXDLG}
- PROP_MED_CYDLG = 215;
- {$EXTERNALSYM PROP_MED_CYDLG}
-
- PROP_LG_CXDLG = 252;
- {$EXTERNALSYM PROP_LG_CXDLG}
- PROP_LG_CYDLG = 218;
- {$EXTERNALSYM PROP_LG_CYDLG}
-
-implementation
-
-const
- comctl32 = 'comctl32.dll';
- {$IFDEF UNICODE}
- AWSuffix = 'W';
- {$ELSE}
- AWSuffix = 'A';
- {$ENDIF UNICODE}
-
-function PropSheet_SetCurSel(hPropSheetDlg: HWND; hPage: HPROPSHEETPAGE; Index: Integer): BOOL;
-begin
- Result := BOOL(SendMessage(hPropSheetDlg, PSM_SETCURSEL, WPARAM(Index), LPARAM(hPage)));
-end;
-
-procedure PropSheet_RemovePage(hPropSheetDlg: HWND; Index: Integer; hPage: HPROPSHEETPAGE);
-begin
- SendMessage(hPropSheetDlg, PSM_REMOVEPAGE, Index, LPARAM(hPage));
-end;
-
-function PropSheet_AddPage(hPropSheetDlg: HWND; hpage: HPROPSHEETPAGE): BOOL;
-begin
- Result := BOOL(SendMessage(hPropSheetDlg, PSM_ADDPAGE, 0, LPARAM(hpage)));
-end;
-
-function PropSheet_Changed(hPropSheetDlg: HWND; hwndPage: HWND): BOOL;
-begin
- Result := BOOL(SendMessage(hPropSheetDlg, PSM_CHANGED, WPARAM(hwndPage), 0));
-end;
-
-procedure PropSheet_RestartWindows(hPropSheetDlg: HWND);
-begin
- SendMessage(hPropSheetDlg, PSM_RESTARTWINDOWS, 0, 0);
-end;
-
-procedure PropSheet_RebootSystem(hPropSheetDlg: HWND);
-begin
- SendMessage(hPropSheetDlg, PSM_REBOOTSYSTEM, 0, 0);
-end;
-
-procedure PropSheet_CancelToClose(hPropSheetDlg: HWND);
-begin
- PostMessage(hPropSheetDlg, PSM_CANCELTOCLOSE, 0, 0);
-end;
-
-function PropSheet_QuerySiblings(hPropSheetDlg: HWND; Param1: WPARAM; Param2: LPARAM): Integer;
-begin
- Result := SendMessage(hPropSheetDlg, PSM_QUERYSIBLINGS, Param1, Param2);
-end;
-
-procedure PropSheet_UnChanged(hPropSheetDlg: HWND; hwndPage: HWND);
-begin
- SendMessage(hPropSheetDlg, PSM_UNCHANGED, WPARAM(hwndPage), 0);
-end;
-
-function PropSheet_Apply(hPropSheetDlg: HWND): BOOL;
-begin
- Result := BOOL(SendMessage(hPropSheetDlg, PSM_APPLY, 0, 0));
-end;
-
-procedure PropSheet_SetTitle(hPropSheetDlg: HWND; dwStyle: DWORD; lpszText: LPTSTR);
-begin
- SendMessage(hPropSheetDlg, PSM_SETTITLE, dwStyle, LPARAM(LPCTSTR(lpszText)));
-end;
-
-procedure PropSheet_SetWizButtons(hPropSheetDlg: HWND; dwFlags: DWORD);
-begin
- PostMessage(hPropSheetDlg, PSM_SETWIZBUTTONS, 0, LPARAM(dwFlags));
-end;
-
-function PropSheet_PressButton(hPropSheetDlg: HWND; iButton: Integer): BOOL;
-begin
- Result := PostMessage(hPropSheetDlg, PSM_PRESSBUTTON, WPARAM(iButton), 0);
-end;
-
-function PropSheet_SetCurSelByID(hPropSheetDlg: HWND; id: Integer): BOOL;
-begin
- Result := BOOL(SendMessage(hPropSheetDlg, PSM_SETCURSELID, 0, LPARAM(id)));
-end;
-
-procedure PropSheet_SetFinishText(hPropSheetDlg: HWND; lpszText: LPTSTR);
-begin
- SendMessage(hPropSheetDlg, PSM_SETFINISHTEXT, 0, LPARAM(lpszText));
-end;
-
-function PropSheet_GetTabControl(hPropSheetDlg: HWND): HWND;
-begin
- Result := SendMessage(hPropSheetDlg, PSM_GETTABCONTROL, 0, 0);
-end;
-
-function PropSheet_IsDialogMessage(hDlg: HWND; pMsg: LPMSG): BOOL;
-begin
- Result := BOOL(SendMessage(hDlg, PSM_ISDIALOGMESSAGE, 0, LPARAM(pMsg)));
-end;
-
-function PropSheet_GetCurrentPageHwnd(hDlg: HWND): HWND;
-begin
- Result := SendMessage(hDlg, PSM_GETCURRENTPAGEHWND, 0, 0);
-end;
-
-function PropSheet_InsertPage(hPropSheetDlg: HWND; index: Integer; hpage: HPROPSHEETPAGE): BOOL;
-begin
- Result := BOOL(SendMessage(hPropSheetDlg, PSM_INSERTPAGE, WPARAM(index), LPARAM(hpage)));
-end;
-
-function PropSheet_SetHeaderTitle(hWizardDlg: HWND; iPageIndex: Integer; lpszText: LPCSTR): Integer;
-begin
- Result := SendMessage(hWizardDlg, PSM_SETHEADERTITLE, WPARAM(iPageIndex), LPARAM(lpszText));
-end;
-
-procedure PropSheet_SetHeaderSubTitle(hWizardDlg: HWND; iPageIndex: Integer; pszHeaderSubTitle: LPCSTR);
-begin
- SendMessage(hWizardDlg, PSM_SETHEADERSUBTITLE, WPARAM(iPageIndex), LPARAM(pszHeaderSubTitle));
-end;
-
-function PropSheet_HwndToIndex(hPropSheetDlg: HWND; hPageDlg: HWND): Integer;
-begin
- Result := SendMessage(hPropSheetDlg, PSM_HWNDTOINDEX, WPARAM(hPageDlg), 0);
-end;
-
-function PropSheet_IndexToHwnd(hPropSheetDlg: HWND; iPageIndex: Integer): HWND;
-begin
- Result := SendMessage(hPropSheetDlg, PSM_INDEXTOHWND, WPARAM(iPageIndex), 0);
-end;
-
-function PropSheet_PageToIndex(hPropSheetDlg: HWND; hPage: HPROPSHEETPAGE): Integer;
-begin
- Result := SendMessage(hPropSheetDlg, PSM_PAGETOINDEX, 0, LPARAM(hpage));
-end;
-
-function PropSheet_IndexToPage(hPropSheetDlg: HWND; iPageIndex: Integer): HPROPSHEETPAGE;
-begin
- Result := HPROPSHEETPAGE(SendMessage(hPropSheetDlg, PSM_INDEXTOPAGE, WPARAM(iPageIndex), 0));
-end;
-
-function PropSheet_IdToIndex(hPropSheetDlg: HWND; iPageId: Integer): Integer;
-begin
- Result := SendMessage(hPropSheetDlg, PSM_IDTOINDEX, 0, LPARAM(iPageId));
-end;
-
-function PropSheet_IndexToId(hPropSheetDlg: HWND; iPageIndex: Integer): Integer;
-begin
- Result := SendMessage(hPropSheetDlg, PSM_INDEXTOID, WPARAM(iPageIndex), 0)
-end;
-
-function PropSheet_GetResult(hPropSheetDlg: HWND): BOOL;
-begin
- Result := BOOL(SendMessage(hPropSheetDlg, PSM_GETRESULT, 0, 0));
-end;
-
-function PropSheet_RecalcPageSizes(hPropSheetDlg: HWND): BOOL;
-begin
- Result := BOOL(SendMessage(hPropSheetDlg, PSM_RECALCPAGESIZES, 0, 0));
-end;
-
-{$IFDEF DYNAMIC_LINK}
-
-var
- _CreatePropertySheetPageA: Pointer;
-
-function CreatePropertySheetPageA;
-begin
- GetProcedureAddress(_CreatePropertySheetPageA, comctl32, 'CreatePropertySheetPageA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreatePropertySheetPageA]
- end;
-end;
-
-var
- _CreatePropertySheetPageW: Pointer;
-
-function CreatePropertySheetPageW;
-begin
- GetProcedureAddress(_CreatePropertySheetPageW, comctl32, 'CreatePropertySheetPageW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreatePropertySheetPageW]
- end;
-end;
-
-var
- _DestroyPropertySheetPage: Pointer;
-
-function DestroyPropertySheetPage;
-begin
- GetProcedureAddress(_DestroyPropertySheetPage, comctl32, 'DestroyPropertySheetPage');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DestroyPropertySheetPage]
- end;
-end;
-
-var
- _PropertySheetA: Pointer;
-
-function PropertySheetA;
-begin
- GetProcedureAddress(_PropertySheetA, comctl32, 'PropertySheetA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PropertySheetA]
- end;
-end;
-
-var
- _PropertySheetW: Pointer;
-
-function PropertySheetW;
-begin
- GetProcedureAddress(_PropertySheetW, comctl32, 'PropertySheetW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PropertySheetW]
- end;
-end;
-
-var
- _CreatePropertySheetPage: Pointer;
-
-function CreatePropertySheetPage;
-begin
- GetProcedureAddress(_CreatePropertySheetPage, comctl32, 'CreatePropertySheetPage' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreatePropertySheetPage]
- end;
-end;
-
-var
- _PropertySheet: Pointer;
-
-function PropertySheet;
-begin
- GetProcedureAddress(_PropertySheet, comctl32, 'PropertySheet' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PropertySheet]
- end;
-end;
-
-{$ELSE}
-
-function CreatePropertySheetPageA; external comctl32 name 'CreatePropertySheetPageA';
-function CreatePropertySheetPageW; external comctl32 name 'CreatePropertySheetPageW';
-function DestroyPropertySheetPage; external comctl32 name 'DestroyPropertySheetPage';
-function PropertySheetA; external comctl32 name 'PropertySheetA';
-function PropertySheetW; external comctl32 name 'PropertySheetW';
-function CreatePropertySheetPage; external comctl32 name 'CreatePropertySheetPage' + AWSuffix;
-function PropertySheet; external comctl32 name 'PropertySheet' + AWSuffix;
-
-{$ENDIF DYNAMIC_LINK}
-
-end.
+{******************************************************************************}
+{ }
+{ Property Sheet Pages API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: prsht.h, released June 2000. The original Pascal }
+{ code is: PrSht.pas, released December 2000. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwaprsht.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaPrSht;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "ntdsapi.h"'}
+{$HPPEMIT ''}
+{$HPPEMIT 'typedef PHPROPSHEETPAGE *HPROPSHEETPAGE'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaWinNT, JwaWinUser, JwaWinType;
+
+//#ifndef CCSIZEOF_STRUCT
+//#define CCSIZEOF_STRUCT(structname, member) (((int)((LPBYTE)(&((structname*)0)->member) - ((LPBYTE)((structname*)0)))) + sizeof(((structname*)0)->member))
+//#endif
+
+//
+// For compilers that don't support nameless unions
+//
+
+const
+ MAXPROPPAGES = 100;
+ {$EXTERNALSYM MAXPROPPAGES}
+
+type
+ HPROPSHEETPAGE = Pointer;
+ {$EXTERNALSYM HPROPSHEETPAGE}
+ PHPROPSHEETPAGE = ^HPROPSHEETPAGE;
+ {$NODEFINE PHPROPSHEETPAGE}
+
+ LPFNPSPCALLBACKA = function(hwnd: HWND; uMsg: UINT; ppsp: Pointer{LPPROPSHEETPAGEA}): UINT; stdcall;
+ {$EXTERNALSYM LPFNPSPCALLBACKA}
+ LPFNPSPCALLBACKW = function(hwnd: HWND; uMsg: UINT; ppsp: Pointer{LPPROPSHEETPAGEW}): UINT; stdcall;
+ {$EXTERNALSYM LPFNPSPCALLBACKW}
+
+ {$IFDEF UNICODE}
+ LPFNPSPCALLBACK = function(hwnd: HWND; uMsg: UINT; ppsp: Pointer{LPPROPSHEETPAGEW}): UINT; stdcall;
+ {$EXTERNALSYM LPFNPSPCALLBACK}
+ {$ELSE}
+ LPFNPSPCALLBACK = function(hwnd: HWND; uMsg: UINT; ppsp: Pointer{LPPROPSHEETPAGEA}): UINT; stdcall;
+ {$EXTERNALSYM LPFNPSPCALLBACK}
+ {$ENDIF UNICODE}
+
+const
+ PSP_DEFAULT = $00000000;
+ {$EXTERNALSYM PSP_DEFAULT}
+ PSP_DLGINDIRECT = $00000001;
+ {$EXTERNALSYM PSP_DLGINDIRECT}
+ PSP_USEHICON = $00000002;
+ {$EXTERNALSYM PSP_USEHICON}
+ PSP_USEICONID = $00000004;
+ {$EXTERNALSYM PSP_USEICONID}
+ PSP_USETITLE = $00000008;
+ {$EXTERNALSYM PSP_USETITLE}
+ PSP_RTLREADING = $00000010;
+ {$EXTERNALSYM PSP_RTLREADING}
+
+ PSP_HASHELP = $00000020;
+ {$EXTERNALSYM PSP_HASHELP}
+ PSP_USEREFPARENT = $00000040;
+ {$EXTERNALSYM PSP_USEREFPARENT}
+ PSP_USECALLBACK = $00000080;
+ {$EXTERNALSYM PSP_USECALLBACK}
+ PSP_PREMATURE = $00000400;
+ {$EXTERNALSYM PSP_PREMATURE}
+
+//----- New flags for wizard97 --------------
+
+ PSP_HIDEHEADER = $00000800;
+ {$EXTERNALSYM PSP_HIDEHEADER}
+ PSP_USEHEADERTITLE = $00001000;
+ {$EXTERNALSYM PSP_USEHEADERTITLE}
+ PSP_USEHEADERSUBTITLE = $00002000;
+ {$EXTERNALSYM PSP_USEHEADERSUBTITLE}
+
+//-------------------------------------------
+
+ PSPCB_ADDREF = 0;
+ {$EXTERNALSYM PSPCB_ADDREF}
+ PSPCB_RELEASE = 1;
+ {$EXTERNALSYM PSPCB_RELEASE}
+ PSPCB_CREATE = 2;
+ {$EXTERNALSYM PSPCB_CREATE}
+
+//#define PROPSHEETPAGEA_V1_SIZE CCSIZEOF_STRUCT(PROPSHEETPAGEA, pcRefParent)
+//#define PROPSHEETPAGEW_V1_SIZE CCSIZEOF_STRUCT(PROPSHEETPAGEW, pcRefParent)
+
+type
+ _PROPSHEETPAGEA = record
+ dwSize: DWORD;
+ dwFlags: DWORD;
+ hInstance: HINSTANCE;
+ u: record
+ case Integer of
+ 0: (pszTemplate: LPCSTR);
+ 1: (pResource: LPCDLGTEMPLATE);
+ end;
+ u2: record
+ case Integer of
+ 0: (hIcon: HICON);
+ 1: (pszIcon: LPCSTR);
+ end;
+ pszTitle: LPCSTR;
+ pfnDlgProc: DLGPROC;
+ lParam: LPARAM;
+ pfnCallback: LPFNPSPCALLBACKA;
+ pcRefParent: LPUINT;
+ {$IFDEF IE400_UP}
+ pszHeaderTitle: LPCSTR; // this is displayed in the header
+ pszHeaderSubTitle: LPCSTR; //
+ {$ENDIF IE400_UP}
+ end;
+ {$EXTERNALSYM _PROPSHEETPAGEA}
+ PROPSHEETPAGEA = _PROPSHEETPAGEA;
+ {$EXTERNALSYM PROPSHEETPAGEA}
+ LPPROPSHEETPAGEA = ^PROPSHEETPAGEA;
+ {$EXTERNALSYM LPPROPSHEETPAGEA}
+ LPCPROPSHEETPAGEA = LPPROPSHEETPAGEA;
+ {$EXTERNALSYM LPCPROPSHEETPAGEA}
+ TPropSheetPageA = PROPSHEETPAGEA;
+ PPropSheetPageA = LPPROPSHEETPAGEA;
+
+ _PROPSHEETPAGEW = record
+ dwSize: DWORD;
+ dwFlags: DWORD;
+ hInstance: HINSTANCE;
+ u: record
+ case Integer of
+ 0: (pszTemplate: LPCWSTR);
+ 1: (pResource: LPCDLGTEMPLATE);
+ end;
+ u2: record
+ case Integer of
+ 0: (hIcon: HICON);
+ 1: (pszIcon: LPCWSTR);
+ end;
+ pszTitle: LPCWSTR;
+ pfnDlgProc: DLGPROC;
+ lParam: LPARAM;
+ pfnCallback: LPFNPSPCALLBACKW;
+ pcRefParent: LPUINT;
+ {$IFDEF IE400_UP}
+ pszHeaderTitle: LPCWSTR; // this is displayed in the header
+ pszHeaderSubTitle: LPCWSTR; //
+ {$ENDIF IE400_UP}
+ end;
+ {$EXTERNALSYM _PROPSHEETPAGEW}
+ PROPSHEETPAGEW = _PROPSHEETPAGEW;
+ {$EXTERNALSYM PROPSHEETPAGEW}
+ LPPROPSHEETPAGEW = ^PROPSHEETPAGEW;
+ {$EXTERNALSYM LPPROPSHEETPAGEW}
+ LPCPROPSHEETPAGEW = LPPROPSHEETPAGEW;
+ {$EXTERNALSYM LPCPROPSHEETPAGEW}
+ TPropSheetPageW = PROPSHEETPAGEW;
+ PPropSheetPageW = LPPROPSHEETPAGEW;
+
+{$IFDEF UNICODE}
+ PROPSHEETPAGE = PROPSHEETPAGEW;
+ {$EXTERNALSYM PROPSHEETPAGE}
+ LPPROPSHEETPAGE = LPPROPSHEETPAGEW;
+ {$EXTERNALSYM LPPROPSHEETPAGE}
+ LPCPROPSHEETPAGE = LPCPROPSHEETPAGEW;
+ {$EXTERNALSYM LPCPROPSHEETPAGE}
+ TPropSheetPage = TPropSheetPageW;
+ PPropSheetPage = PPropSheetPageW;
+
+const
+ PROPSHEETPAGE_V1_SIZE = 40; {PROPSHEETPAGEW_V1_SIZE}
+ {$EXTERNALSYM PROPSHEETPAGE_V1_SIZE}
+{$ELSE}
+ PROPSHEETPAGE = PROPSHEETPAGEA;
+ {$EXTERNALSYM PROPSHEETPAGE}
+ LPPROPSHEETPAGE = LPPROPSHEETPAGEA;
+ {$EXTERNALSYM LPPROPSHEETPAGE}
+ LPCPROPSHEETPAGE = LPCPROPSHEETPAGEA;
+ {$EXTERNALSYM LPCPROPSHEETPAGE}
+ TPropSheetPage = TPropSheetPageA;
+ PPropSheetPage = PPropSheetPageA;
+
+const
+ PROPSHEETPAGE_V1_SIZE = 40; {PROPSHEETPAGEA_V1_SIZE}
+ {$EXTERNALSYM PROPSHEETPAGE_V1_SIZE}
+{$ENDIF UNICODE}
+
+const
+ PSH_DEFAULT = $00000000;
+ {$EXTERNALSYM PSH_DEFAULT}
+ PSH_PROPTITLE = $00000001;
+ {$EXTERNALSYM PSH_PROPTITLE}
+ PSH_USEHICON = $00000002;
+ {$EXTERNALSYM PSH_USEHICON}
+ PSH_USEICONID = $00000004;
+ {$EXTERNALSYM PSH_USEICONID}
+ PSH_PROPSHEETPAGE = $00000008;
+ {$EXTERNALSYM PSH_PROPSHEETPAGE}
+ PSH_WIZARDHASFINISH = $00000010;
+ {$EXTERNALSYM PSH_WIZARDHASFINISH}
+ PSH_WIZARD = $00000020;
+ {$EXTERNALSYM PSH_WIZARD}
+ PSH_USEPSTARTPAGE = $00000040;
+ {$EXTERNALSYM PSH_USEPSTARTPAGE}
+ PSH_NOAPPLYNOW = $00000080;
+ {$EXTERNALSYM PSH_NOAPPLYNOW}
+ PSH_USECALLBACK = $00000100;
+ {$EXTERNALSYM PSH_USECALLBACK}
+ PSH_HASHELP = $00000200;
+ {$EXTERNALSYM PSH_HASHELP}
+ PSH_MODELESS = $00000400;
+ {$EXTERNALSYM PSH_MODELESS}
+ PSH_RTLREADING = $00000800;
+ {$EXTERNALSYM PSH_RTLREADING}
+ PSH_WIZARDCONTEXTHELP = $00001000;
+ {$EXTERNALSYM PSH_WIZARDCONTEXTHELP}
+
+//----- New flags for wizard97 -----------
+
+ {$IFDEF IE500_UP}
+ PSH_WIZARD97 = $01000000;
+ {$EXTERNALSYM PSH_WIZARD97}
+ {$ELSE}
+ PSH_WIZARD97 = $00002000;
+ {$EXTERNALSYM PSH_WIZARD97}
+ {$ENDIF IE500_UP}
+
+// 0x00004000 was not used by any previous release
+
+ PSH_WATERMARK = $00008000;
+ {$EXTERNALSYM PSH_WATERMARK}
+ PSH_USEHBMWATERMARK = $00010000; // user pass in a hbmWatermark instead of pszbmWatermark
+ {$EXTERNALSYM PSH_USEHBMWATERMARK}
+ PSH_USEHPLWATERMARK = $00020000; //
+ {$EXTERNALSYM PSH_USEHPLWATERMARK}
+ PSH_STRETCHWATERMARK = $00040000; // stretchwatermark also applies for the header
+ {$EXTERNALSYM PSH_STRETCHWATERMARK}
+ PSH_HEADER = $00080000;
+ {$EXTERNALSYM PSH_HEADER}
+ PSH_USEHBMHEADER = $00100000;
+ {$EXTERNALSYM PSH_USEHBMHEADER}
+ PSH_USEPAGELANG = $00200000; // use frame dialog template matched to page
+ {$EXTERNALSYM PSH_USEPAGELANG}
+
+//----------------------------------------
+
+//----- New flags for wizard-lite --------
+
+ PSH_WIZARD_LITE = $00400000;
+ {$EXTERNALSYM PSH_WIZARD_LITE}
+ PSH_NOCONTEXTHELP = $02000000;
+ {$EXTERNALSYM PSH_NOCONTEXTHELP}
+
+//----------------------------------------
+
+type
+ PFNPROPSHEETCALLBACK = function(hwn: HWND; uMsg: UINT; lParam: LPARAM): Integer; stdcall;
+ {$EXTERNALSYM PFNPROPSHEETCALLBACK}
+
+//const
+//#define PROPSHEETHEADERA_V1_SIZE CCSIZEOF_STRUCT(PROPSHEETHEADERA, pfnCallback)
+//#define PROPSHEETHEADERW_V1_SIZE CCSIZEOF_STRUCT(PROPSHEETHEADERW, pfnCallback)
+
+type
+ _PROPSHEETHEADERA = record
+ dwSize: DWORD;
+ dwFlags: DWORD;
+ hwndParent: HWND;
+ hInstance: HINSTANCE;
+ u: record
+ case Integer of
+ 0: (hIcon: HICON);
+ 1: (pszIcon: LPCSTR);
+ end;
+ pszCaption: LPCSTR;
+ nPages: UINT;
+ u2: record
+ case Integer of
+ 0: (nStartPage: UINT);
+ 1: (pStartPage: LPCSTR);
+ end;
+ u3: record
+ case Integer of
+ 0: (ppsp: LPCPROPSHEETPAGEA);
+ 1: (phpage: PHPROPSHEETPAGE);
+ end;
+ pfnCallback: PFNPROPSHEETCALLBACK;
+ {$IFDEF IE400_UP}
+ u4: record
+ case Integer of
+ 0: (hbmWatermark: HBITMAP);
+ 1: (pszbmWatermark: LPCSTR);
+ end;
+ hplWatermark: HPALETTE;
+ u5: record
+ case Integer of
+ 0: (hbmHeader: HBITMAP); // Header bitmap shares the palette with watermark
+ 1: (pszbmHeader: LPCSTR);
+ end;
+ {$ENDIF IE400_UP}
+ end;
+ {$EXTERNALSYM _PROPSHEETHEADERA}
+ PROPSHEETHEADERA =_PROPSHEETHEADERA;
+ {$EXTERNALSYM PROPSHEETHEADERA}
+ LPPROPSHEETHEADERA = ^PROPSHEETHEADERA;
+ {$EXTERNALSYM LPPROPSHEETHEADERA}
+ LPCPROPSHEETHEADERA = LPPROPSHEETHEADERA;
+ {$EXTERNALSYM LPCPROPSHEETHEADERA}
+ TPropSheetHeaderA = PROPSHEETHEADERA;
+ PPropSheetHeaderA = LPPROPSHEETHEADERA;
+
+ _PROPSHEETHEADERW = record
+ dwSize: DWORD;
+ dwFlags: DWORD;
+ hwndParent: HWND;
+ hInstance: HINSTANCE;
+ u: record
+ case Integer of
+ 0: (hIcon: HICON);
+ 1: (pszIcon: LPCWSTR);
+ end;
+ pszCaption: LPCWSTR;
+ nPages: UINT;
+ u2: record
+ case Integer of
+ 0: (nStartPage: UINT);
+ 1: (pStartPage: LPCWSTR);
+ end;
+ u3: record
+ case Integer of
+ 0: (ppsp: LPCPROPSHEETPAGEW);
+ 1: (phpage: PHPROPSHEETPAGE);
+ end;
+ pfnCallback: PFNPROPSHEETCALLBACK;
+ {$IFDEF IE400_UP}
+ u4: record
+ case Integer of
+ 0: (hbmWatermark: HBITMAP);
+ 1: (pszbmWatermark: LPCWSTR);
+ end;
+ hplWatermark: HPALETTE;
+ u5: record
+ case Integer of
+ 0: (hbmHeader: HBITMAP); // Header bitmap shares the palette with watermark
+ 1: (pszbmHeader: LPCWSTR);
+ end;
+ {$ENDIF IE400_UP}
+ end;
+ {$EXTERNALSYM _PROPSHEETHEADERW}
+ PROPSHEETHEADERW =_PROPSHEETHEADERW;
+ {$EXTERNALSYM PROPSHEETHEADERW}
+ LPPROPSHEETHEADERW = ^PROPSHEETHEADERW;
+ {$EXTERNALSYM LPPROPSHEETHEADERW}
+ LPCPROPSHEETHEADERW = LPPROPSHEETHEADERW;
+ {$EXTERNALSYM LPCPROPSHEETHEADERW}
+ TPropSheetHeaderW = PROPSHEETHEADERW;
+ PPropSheetHeaderW = LPPROPSHEETHEADERW;
+
+{$IFDEF UNICODE}
+ PROPSHEETHEADER = PROPSHEETHEADERW;
+ {$EXTERNALSYM PROPSHEETHEADER}
+ LPPROPSHEETHEADER = LPPROPSHEETHEADERW;
+ {$EXTERNALSYM LPPROPSHEETHEADER}
+ LPCPROPSHEETHEADER = LPCPROPSHEETHEADERW;
+ {$EXTERNALSYM LPCPROPSHEETHEADER}
+ TPropSheetHeader = TPropSheetHeaderW;
+ PPropSheetHeader = PPropSheetHeaderW;
+
+const
+ PROPSHEETHEADER_V1_SIZE = 40; {PROPSHEETHEADERW_V1_SIZE}
+ {$EXTERNALSYM PROPSHEETHEADER_V1_SIZE}
+{$ELSE}
+ PROPSHEETHEADER = PROPSHEETHEADERA;
+ {$EXTERNALSYM PROPSHEETHEADER}
+ LPPROPSHEETHEADER = LPPROPSHEETHEADERA;
+ {$EXTERNALSYM LPPROPSHEETHEADER}
+ LPCPROPSHEETHEADER = LPCPROPSHEETHEADERA;
+ {$EXTERNALSYM LPCPROPSHEETHEADER}
+ TPropSheetHeader = TPropSheetHeaderA;
+ PPropSheetHeader = PPropSheetHeaderA;
+
+const
+ PROPSHEETHEADER_V1_SIZE = 40; {PROPSHEETHEADERA_V1_SIZE}
+ {$EXTERNALSYM PROPSHEETHEADER_V1_SIZE}
+{$ENDIF UNICODE}
+
+const
+ PSCB_INITIALIZED = 1;
+ {$EXTERNALSYM PSCB_INITIALIZED}
+ PSCB_PRECREATE = 2;
+ {$EXTERNALSYM PSCB_PRECREATE}
+
+function CreatePropertySheetPageA(const lppsp: PROPSHEETPAGEA): HPROPSHEETPAGE; stdcall;
+{$EXTERNALSYM CreatePropertySheetPageA}
+function CreatePropertySheetPageW(const lppsp: PROPSHEETPAGEW): HPROPSHEETPAGE; stdcall;
+{$EXTERNALSYM DestroyPropertySheetPage}
+function DestroyPropertySheetPage(hPSPage: HPROPSHEETPAGE): BOOL; stdcall;
+{$EXTERNALSYM DestroyPropertySheetPage}
+function PropertySheetA(const lppsph: PROPSHEETHEADERA): INT_PTR; stdcall;
+{$EXTERNALSYM PropertySheetA}
+function PropertySheetW(const lppsph: PROPSHEETHEADERW): INT_PTR; stdcall;
+{$EXTERNALSYM PropertySheetW}
+function CreatePropertySheetPage(const lppsp: PROPSHEETPAGE): HPROPSHEETPAGE; stdcall;
+{$EXTERNALSYM DestroyPropertySheetPage}
+function PropertySheet(const lppsph: PROPSHEETHEADER): INT_PTR; stdcall;
+{$EXTERNALSYM PropertySheet}
+
+type
+ LPFNADDPROPSHEETPAGE = function(page: HPROPSHEETPAGE; lParam: LPARAM): BOOL; stdcall;
+ {$EXTERNALSYM LPFNADDPROPSHEETPAGE}
+ LPFNADDPROPSHEETPAGES = function(pv: LPVOID; fn: LPFNADDPROPSHEETPAGE; lParam: LPARAM): BOOL; stdcall;
+ {$EXTERNALSYM LPFNADDPROPSHEETPAGES}
+
+ _PSHNOTIFY = record
+ hdr: NMHDR;
+ lParam: LPARAM;
+ end;
+ {$EXTERNALSYM _PSHNOTIFY}
+ PSHNOTIFY = _PSHNOTIFY;
+ {$EXTERNALSYM PSHNOTIFY}
+ LPPSHNOTIFY = ^PSHNOTIFY;
+ {$EXTERNALSYM LPPSHNOTIFY}
+ TPSHNotify = PSHNOTIFY;
+ PPSHNotify = LPPSHNOTIFY;
+
+const
+ PSN_FIRST = ULONG(0-200);
+ {$EXTERNALSYM PSN_FIRST}
+ PSN_LAST = ULONG(0-299);
+ {$EXTERNALSYM PSN_LAST}
+
+ PSN_SETACTIVE = PSN_FIRST - 0;
+ {$EXTERNALSYM PSN_SETACTIVE}
+ PSN_KILLACTIVE = PSN_FIRST - 1;
+ {$EXTERNALSYM PSN_KILLACTIVE}
+ //PSN_VALIDATE = PSN_FIRST - 1;
+ //{$EXTERNALSYM PSN_VALIDATE}
+ PSN_APPLY = PSN_FIRST - 2;
+ {$EXTERNALSYM PSN_APPLY}
+ PSN_RESET = PSN_FIRST - 3;
+ {$EXTERNALSYM PSN_RESET}
+ //PSN_CANCEL = PSN_FIRST - 3;
+ //{$EXTERNALSYM PSN_CANCEL}
+ PSN_HELP = PSN_FIRST - 5;
+ {$EXTERNALSYM PSN_HELP}
+ PSN_WIZBACK = PSN_FIRST - 6;
+ {$EXTERNALSYM PSN_WIZBACK}
+ PSN_WIZNEXT = PSN_FIRST - 7;
+ {$EXTERNALSYM PSN_WIZNEXT}
+ PSN_WIZFINISH = PSN_FIRST - 8;
+ {$EXTERNALSYM PSN_WIZFINISH}
+ PSN_QUERYCANCEL = PSN_FIRST - 9;
+ {$EXTERNALSYM PSN_QUERYCANCEL}
+ PSN_GETOBJECT = PSN_FIRST - 10;
+ {$EXTERNALSYM PSN_GETOBJECT}
+ PSN_TRANSLATEACCELERATOR = PSN_FIRST - 12;
+ {$EXTERNALSYM PSN_TRANSLATEACCELERATOR}
+ PSN_QUERYINITIALFOCUS = PSN_FIRST - 13;
+ {$EXTERNALSYM PSN_QUERYINITIALFOCUS}
+
+ PSNRET_NOERROR = 0;
+ {$EXTERNALSYM PSNRET_NOERROR}
+ PSNRET_INVALID = 1;
+ {$EXTERNALSYM PSNRET_INVALID}
+ PSNRET_INVALID_NOCHANGEPAGE = 2;
+ {$EXTERNALSYM PSNRET_INVALID_NOCHANGEPAGE}
+ PSNRET_MESSAGEHANDLED = 3;
+ {$EXTERNALSYM PSNRET_MESSAGEHANDLED}
+
+ PSM_SETCURSEL = WM_USER + 101;
+ {$EXTERNALSYM PSM_SETCURSEL}
+
+function PropSheet_SetCurSel(hPropSheetDlg: HWND; hPage: HPROPSHEETPAGE; Index: Integer): BOOL;
+
+const
+ PSM_REMOVEPAGE = WM_USER + 102;
+ {$EXTERNALSYM PSM_REMOVEPAGE}
+
+procedure PropSheet_RemovePage(hPropSheetDlg: HWND; Index: Integer; hPage: HPROPSHEETPAGE);
+
+const
+ PSM_ADDPAGE = WM_USER + 103;
+ {$EXTERNALSYM PSM_ADDPAGE}
+
+function PropSheet_AddPage(hPropSheetDlg: HWND; hpage: HPROPSHEETPAGE): BOOL;
+
+const
+ PSM_CHANGED = WM_USER + 104;
+ {$EXTERNALSYM PSM_CHANGED}
+
+function PropSheet_Changed(hPropSheetDlg: HWND; hwndPage: HWND): BOOL;
+
+const
+ PSM_RESTARTWINDOWS = WM_USER + 105;
+ {$EXTERNALSYM PSM_RESTARTWINDOWS}
+
+procedure PropSheet_RestartWindows(hPropSheetDlg: HWND);
+
+const
+ PSM_REBOOTSYSTEM = WM_USER + 106;
+ {$EXTERNALSYM PSM_REBOOTSYSTEM}
+
+procedure PropSheet_RebootSystem(hPropSheetDlg: HWND);
+
+const
+ PSM_CANCELTOCLOSE = WM_USER + 107;
+ {$EXTERNALSYM PSM_CANCELTOCLOSE}
+
+procedure PropSheet_CancelToClose(hPropSheetDlg: HWND);
+
+const
+ PSM_QUERYSIBLINGS = WM_USER + 108;
+ {$EXTERNALSYM PSM_QUERYSIBLINGS}
+
+function PropSheet_QuerySiblings(hPropSheetDlg: HWND; Param1: WPARAM; Param2: LPARAM): Integer;
+
+const
+ PSM_UNCHANGED = WM_USER + 109;
+ {$EXTERNALSYM PSM_UNCHANGED}
+
+procedure PropSheet_UnChanged(hPropSheetDlg: HWND; hwndPage: HWND);
+
+const
+ PSM_APPLY = WM_USER + 110;
+ {$EXTERNALSYM PSM_APPLY}
+
+function PropSheet_Apply(hPropSheetDlg: HWND): BOOL;
+
+const
+ PSM_SETTITLEA = WM_USER + 111;
+ {$EXTERNALSYM PSM_SETTITLEA}
+ PSM_SETTITLEW = WM_USER + 120;
+ {$EXTERNALSYM PSM_SETTITLEW}
+
+ {$IFDEF UNICODE}
+ PSM_SETTITLE = PSM_SETTITLEW;
+ {$EXTERNALSYM PSM_SETTITLE}
+ {$ELSE}
+ PSM_SETTITLE = PSM_SETTITLEA;
+ {$EXTERNALSYM PSM_SETTITLE}
+ {$ENDIF UNICODE}
+
+procedure PropSheet_SetTitle(hPropSheetDlg: HWND; dwStyle: DWORD; lpszText: LPTSTR);
+
+const
+ PSM_SETWIZBUTTONS = WM_USER + 112;
+ {$EXTERNALSYM PSM_SETWIZBUTTONS}
+
+procedure PropSheet_SetWizButtons(hPropSheetDlg: HWND; dwFlags: DWORD);
+
+const
+ PSWIZB_BACK = $00000001;
+ {$EXTERNALSYM PSWIZB_BACK}
+ PSWIZB_NEXT = $00000002;
+ {$EXTERNALSYM PSWIZB_NEXT}
+ PSWIZB_FINISH = $00000004;
+ {$EXTERNALSYM PSWIZB_FINISH}
+ PSWIZB_DISABLEDFINISH = $00000008;
+ {$EXTERNALSYM PSWIZB_DISABLEDFINISH}
+
+ PSM_PRESSBUTTON = WM_USER + 113;
+ {$EXTERNALSYM PSM_PRESSBUTTON}
+
+function PropSheet_PressButton(hPropSheetDlg: HWND; iButton: Integer): BOOL;
+
+const
+ PSBTN_BACK = 0;
+ {$EXTERNALSYM PSBTN_BACK}
+ PSBTN_NEXT = 1;
+ {$EXTERNALSYM PSBTN_NEXT}
+ PSBTN_FINISH = 2;
+ {$EXTERNALSYM PSBTN_FINISH}
+ PSBTN_OK = 3;
+ {$EXTERNALSYM PSBTN_OK}
+ PSBTN_APPLYNOW = 4;
+ {$EXTERNALSYM PSBTN_APPLYNOW}
+ PSBTN_CANCEL = 5;
+ {$EXTERNALSYM PSBTN_CANCEL}
+ PSBTN_HELP = 6;
+ {$EXTERNALSYM PSBTN_HELP}
+ PSBTN_MAX = 6;
+ {$EXTERNALSYM PSBTN_MAX}
+
+ PSM_SETCURSELID = WM_USER + 114;
+ {$EXTERNALSYM PSM_SETCURSELID}
+
+function PropSheet_SetCurSelByID(hPropSheetDlg: HWND; id: Integer): BOOL;
+
+const
+ PSM_SETFINISHTEXTA = WM_USER + 115;
+ {$EXTERNALSYM PSM_SETFINISHTEXTA}
+ PSM_SETFINISHTEXTW = WM_USER + 121;
+ {$EXTERNALSYM PSM_SETFINISHTEXTW}
+
+ {$IFDEF UNICODE}
+ PSM_SETFINISHTEXT = PSM_SETFINISHTEXTW;
+ {$EXTERNALSYM PSM_SETFINISHTEXT}
+ {$ELSE}
+ PSM_SETFINISHTEXT = PSM_SETFINISHTEXTA;
+ {$EXTERNALSYM PSM_SETFINISHTEXT}
+ {$ENDIF UNICODE}
+
+procedure PropSheet_SetFinishText(hPropSheetDlg: HWND; lpszText: LPTSTR);
+
+const
+ PSM_GETTABCONTROL = WM_USER + 116;
+ {$EXTERNALSYM PSM_GETTABCONTROL}
+
+function PropSheet_GetTabControl(hPropSheetDlg: HWND): HWND;
+
+const
+ PSM_ISDIALOGMESSAGE = WM_USER + 117;
+ {$EXTERNALSYM PSM_ISDIALOGMESSAGE}
+
+function PropSheet_IsDialogMessage(hDlg: HWND; pMsg: LPMSG): BOOL;
+
+const
+ PSM_GETCURRENTPAGEHWND = WM_USER + 118;
+ {$EXTERNALSYM PSM_GETCURRENTPAGEHWND}
+
+function PropSheet_GetCurrentPageHwnd(hDlg: HWND): HWND;
+
+const
+ PSM_INSERTPAGE = WM_USER + 119;
+ {$EXTERNALSYM PSM_INSERTPAGE}
+
+function PropSheet_InsertPage(hPropSheetDlg: HWND; index: Integer; hpage: HPROPSHEETPAGE): BOOL;
+
+const
+ PSM_SETHEADERTITLEA = WM_USER + 125;
+ {$EXTERNALSYM PSM_SETHEADERTITLEA}
+ PSM_SETHEADERTITLEW = WM_USER + 126;
+ {$EXTERNALSYM PSM_SETHEADERTITLEW}
+
+ {$IFDEF UNICODE}
+ PSM_SETHEADERTITLE = PSM_SETHEADERTITLEW;
+ {$EXTERNALSYM PSM_SETHEADERTITLE}
+ {$ELSE}
+ PSM_SETHEADERTITLE = PSM_SETHEADERTITLEA;
+ {$EXTERNALSYM PSM_SETHEADERTITLE}
+ {$ENDIF UNICODE}
+
+function PropSheet_SetHeaderTitle(hWizardDlg: HWND; iPageIndex: Integer; lpszText: LPCSTR): Integer;
+
+const
+ PSM_SETHEADERSUBTITLEA = WM_USER + 127;
+ {$EXTERNALSYM PSM_SETHEADERSUBTITLEA}
+ PSM_SETHEADERSUBTITLEW = WM_USER + 128;
+ {$EXTERNALSYM PSM_SETHEADERSUBTITLEW}
+
+ {$IFDEF UNICODE}
+ PSM_SETHEADERSUBTITLE = PSM_SETHEADERSUBTITLEW;
+ {$EXTERNALSYM PSM_SETHEADERSUBTITLE}
+ {$ELSE}
+ PSM_SETHEADERSUBTITLE = PSM_SETHEADERSUBTITLEA;
+ {$EXTERNALSYM PSM_SETHEADERSUBTITLE}
+ {$ENDIF UNICODE}
+
+procedure PropSheet_SetHeaderSubTitle(hWizardDlg: HWND; iPageIndex: Integer; pszHeaderSubTitle: LPCSTR);
+
+const
+ PSM_HWNDTOINDEX = WM_USER + 129;
+ {$EXTERNALSYM PSM_HWNDTOINDEX}
+
+function PropSheet_HwndToIndex(hPropSheetDlg: HWND; hPageDlg: HWND): Integer;
+
+const
+ PSM_INDEXTOHWND = WM_USER + 130;
+ {$EXTERNALSYM PSM_INDEXTOHWND}
+
+function PropSheet_IndexToHwnd(hPropSheetDlg: HWND; iPageIndex: Integer): HWND;
+
+const
+ PSM_PAGETOINDEX = WM_USER + 131;
+ {$EXTERNALSYM PSM_PAGETOINDEX}
+
+function PropSheet_PageToIndex(hPropSheetDlg: HWND; hPage: HPROPSHEETPAGE): Integer;
+
+const
+ PSM_INDEXTOPAGE = WM_USER + 132;
+ {$EXTERNALSYM PSM_INDEXTOPAGE}
+
+function PropSheet_IndexToPage(hPropSheetDlg: HWND; iPageIndex: Integer): HPROPSHEETPAGE;
+
+const
+ PSM_IDTOINDEX = WM_USER + 133;
+ {$EXTERNALSYM PSM_IDTOINDEX}
+
+function PropSheet_IdToIndex(hPropSheetDlg: HWND; iPageId: Integer): Integer;
+
+const
+ PSM_INDEXTOID = WM_USER + 134;
+ {$EXTERNALSYM PSM_INDEXTOID}
+
+function PropSheet_IndexToId(hPropSheetDlg: HWND; iPageIndex: Integer): Integer;
+
+const
+ PSM_GETRESULT = WM_USER + 135;
+ {$EXTERNALSYM PSM_GETRESULT}
+
+function PropSheet_GetResult(hPropSheetDlg: HWND): BOOL;
+
+const
+ PSM_RECALCPAGESIZES = WM_USER + 136;
+ {$EXTERNALSYM PSM_RECALCPAGESIZES}
+
+function PropSheet_RecalcPageSizes(hPropSheetDlg: HWND): BOOL;
+
+const
+ ID_PSRESTARTWINDOWS = $2;
+ {$EXTERNALSYM ID_PSRESTARTWINDOWS}
+
+ ID_PSREBOOTSYSTEM = ID_PSRESTARTWINDOWS or $1;
+ {$EXTERNALSYM ID_PSREBOOTSYSTEM}
+
+ WIZ_CXDLG = 276;
+ {$EXTERNALSYM WIZ_CXDLG}
+ WIZ_CYDLG = 140;
+ {$EXTERNALSYM WIZ_CYDLG}
+
+ WIZ_CXBMP = 80;
+ {$EXTERNALSYM WIZ_CXBMP}
+
+ WIZ_BODYX = 92;
+ {$EXTERNALSYM WIZ_BODYX}
+ WIZ_BODYCX = 184;
+ {$EXTERNALSYM WIZ_BODYCX}
+
+ PROP_SM_CXDLG = 212;
+ {$EXTERNALSYM PROP_SM_CXDLG}
+ PROP_SM_CYDLG = 188;
+ {$EXTERNALSYM PROP_SM_CYDLG}
+
+ PROP_MED_CXDLG = 227;
+ {$EXTERNALSYM PROP_MED_CXDLG}
+ PROP_MED_CYDLG = 215;
+ {$EXTERNALSYM PROP_MED_CYDLG}
+
+ PROP_LG_CXDLG = 252;
+ {$EXTERNALSYM PROP_LG_CXDLG}
+ PROP_LG_CYDLG = 218;
+ {$EXTERNALSYM PROP_LG_CYDLG}
+
+implementation
+
+const
+ comctl32 = 'comctl32.dll';
+ {$IFDEF UNICODE}
+ AWSuffix = 'W';
+ {$ELSE}
+ AWSuffix = 'A';
+ {$ENDIF UNICODE}
+
+function PropSheet_SetCurSel(hPropSheetDlg: HWND; hPage: HPROPSHEETPAGE; Index: Integer): BOOL;
+begin
+ Result := BOOL(SendMessage(hPropSheetDlg, PSM_SETCURSEL, WPARAM(Index), LPARAM(hPage)));
+end;
+
+procedure PropSheet_RemovePage(hPropSheetDlg: HWND; Index: Integer; hPage: HPROPSHEETPAGE);
+begin
+ SendMessage(hPropSheetDlg, PSM_REMOVEPAGE, Index, LPARAM(hPage));
+end;
+
+function PropSheet_AddPage(hPropSheetDlg: HWND; hpage: HPROPSHEETPAGE): BOOL;
+begin
+ Result := BOOL(SendMessage(hPropSheetDlg, PSM_ADDPAGE, 0, LPARAM(hpage)));
+end;
+
+function PropSheet_Changed(hPropSheetDlg: HWND; hwndPage: HWND): BOOL;
+begin
+ Result := BOOL(SendMessage(hPropSheetDlg, PSM_CHANGED, WPARAM(hwndPage), 0));
+end;
+
+procedure PropSheet_RestartWindows(hPropSheetDlg: HWND);
+begin
+ SendMessage(hPropSheetDlg, PSM_RESTARTWINDOWS, 0, 0);
+end;
+
+procedure PropSheet_RebootSystem(hPropSheetDlg: HWND);
+begin
+ SendMessage(hPropSheetDlg, PSM_REBOOTSYSTEM, 0, 0);
+end;
+
+procedure PropSheet_CancelToClose(hPropSheetDlg: HWND);
+begin
+ PostMessage(hPropSheetDlg, PSM_CANCELTOCLOSE, 0, 0);
+end;
+
+function PropSheet_QuerySiblings(hPropSheetDlg: HWND; Param1: WPARAM; Param2: LPARAM): Integer;
+begin
+ Result := SendMessage(hPropSheetDlg, PSM_QUERYSIBLINGS, Param1, Param2);
+end;
+
+procedure PropSheet_UnChanged(hPropSheetDlg: HWND; hwndPage: HWND);
+begin
+ SendMessage(hPropSheetDlg, PSM_UNCHANGED, WPARAM(hwndPage), 0);
+end;
+
+function PropSheet_Apply(hPropSheetDlg: HWND): BOOL;
+begin
+ Result := BOOL(SendMessage(hPropSheetDlg, PSM_APPLY, 0, 0));
+end;
+
+procedure PropSheet_SetTitle(hPropSheetDlg: HWND; dwStyle: DWORD; lpszText: LPTSTR);
+begin
+ SendMessage(hPropSheetDlg, PSM_SETTITLE, dwStyle, LPARAM(LPCTSTR(lpszText)));
+end;
+
+procedure PropSheet_SetWizButtons(hPropSheetDlg: HWND; dwFlags: DWORD);
+begin
+ PostMessage(hPropSheetDlg, PSM_SETWIZBUTTONS, 0, LPARAM(dwFlags));
+end;
+
+function PropSheet_PressButton(hPropSheetDlg: HWND; iButton: Integer): BOOL;
+begin
+ Result := PostMessage(hPropSheetDlg, PSM_PRESSBUTTON, WPARAM(iButton), 0);
+end;
+
+function PropSheet_SetCurSelByID(hPropSheetDlg: HWND; id: Integer): BOOL;
+begin
+ Result := BOOL(SendMessage(hPropSheetDlg, PSM_SETCURSELID, 0, LPARAM(id)));
+end;
+
+procedure PropSheet_SetFinishText(hPropSheetDlg: HWND; lpszText: LPTSTR);
+begin
+ SendMessage(hPropSheetDlg, PSM_SETFINISHTEXT, 0, LPARAM(lpszText));
+end;
+
+function PropSheet_GetTabControl(hPropSheetDlg: HWND): HWND;
+begin
+ Result := SendMessage(hPropSheetDlg, PSM_GETTABCONTROL, 0, 0);
+end;
+
+function PropSheet_IsDialogMessage(hDlg: HWND; pMsg: LPMSG): BOOL;
+begin
+ Result := BOOL(SendMessage(hDlg, PSM_ISDIALOGMESSAGE, 0, LPARAM(pMsg)));
+end;
+
+function PropSheet_GetCurrentPageHwnd(hDlg: HWND): HWND;
+begin
+ Result := SendMessage(hDlg, PSM_GETCURRENTPAGEHWND, 0, 0);
+end;
+
+function PropSheet_InsertPage(hPropSheetDlg: HWND; index: Integer; hpage: HPROPSHEETPAGE): BOOL;
+begin
+ Result := BOOL(SendMessage(hPropSheetDlg, PSM_INSERTPAGE, WPARAM(index), LPARAM(hpage)));
+end;
+
+function PropSheet_SetHeaderTitle(hWizardDlg: HWND; iPageIndex: Integer; lpszText: LPCSTR): Integer;
+begin
+ Result := SendMessage(hWizardDlg, PSM_SETHEADERTITLE, WPARAM(iPageIndex), LPARAM(lpszText));
+end;
+
+procedure PropSheet_SetHeaderSubTitle(hWizardDlg: HWND; iPageIndex: Integer; pszHeaderSubTitle: LPCSTR);
+begin
+ SendMessage(hWizardDlg, PSM_SETHEADERSUBTITLE, WPARAM(iPageIndex), LPARAM(pszHeaderSubTitle));
+end;
+
+function PropSheet_HwndToIndex(hPropSheetDlg: HWND; hPageDlg: HWND): Integer;
+begin
+ Result := SendMessage(hPropSheetDlg, PSM_HWNDTOINDEX, WPARAM(hPageDlg), 0);
+end;
+
+function PropSheet_IndexToHwnd(hPropSheetDlg: HWND; iPageIndex: Integer): HWND;
+begin
+ Result := SendMessage(hPropSheetDlg, PSM_INDEXTOHWND, WPARAM(iPageIndex), 0);
+end;
+
+function PropSheet_PageToIndex(hPropSheetDlg: HWND; hPage: HPROPSHEETPAGE): Integer;
+begin
+ Result := SendMessage(hPropSheetDlg, PSM_PAGETOINDEX, 0, LPARAM(hpage));
+end;
+
+function PropSheet_IndexToPage(hPropSheetDlg: HWND; iPageIndex: Integer): HPROPSHEETPAGE;
+begin
+ Result := HPROPSHEETPAGE(SendMessage(hPropSheetDlg, PSM_INDEXTOPAGE, WPARAM(iPageIndex), 0));
+end;
+
+function PropSheet_IdToIndex(hPropSheetDlg: HWND; iPageId: Integer): Integer;
+begin
+ Result := SendMessage(hPropSheetDlg, PSM_IDTOINDEX, 0, LPARAM(iPageId));
+end;
+
+function PropSheet_IndexToId(hPropSheetDlg: HWND; iPageIndex: Integer): Integer;
+begin
+ Result := SendMessage(hPropSheetDlg, PSM_INDEXTOID, WPARAM(iPageIndex), 0)
+end;
+
+function PropSheet_GetResult(hPropSheetDlg: HWND): BOOL;
+begin
+ Result := BOOL(SendMessage(hPropSheetDlg, PSM_GETRESULT, 0, 0));
+end;
+
+function PropSheet_RecalcPageSizes(hPropSheetDlg: HWND): BOOL;
+begin
+ Result := BOOL(SendMessage(hPropSheetDlg, PSM_RECALCPAGESIZES, 0, 0));
+end;
+
+{$IFDEF DYNAMIC_LINK}
+
+var
+ _CreatePropertySheetPageA: Pointer;
+
+function CreatePropertySheetPageA;
+begin
+ GetProcedureAddress(_CreatePropertySheetPageA, comctl32, 'CreatePropertySheetPageA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreatePropertySheetPageA]
+ end;
+end;
+
+var
+ _CreatePropertySheetPageW: Pointer;
+
+function CreatePropertySheetPageW;
+begin
+ GetProcedureAddress(_CreatePropertySheetPageW, comctl32, 'CreatePropertySheetPageW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreatePropertySheetPageW]
+ end;
+end;
+
+var
+ _DestroyPropertySheetPage: Pointer;
+
+function DestroyPropertySheetPage;
+begin
+ GetProcedureAddress(_DestroyPropertySheetPage, comctl32, 'DestroyPropertySheetPage');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DestroyPropertySheetPage]
+ end;
+end;
+
+var
+ _PropertySheetA: Pointer;
+
+function PropertySheetA;
+begin
+ GetProcedureAddress(_PropertySheetA, comctl32, 'PropertySheetA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PropertySheetA]
+ end;
+end;
+
+var
+ _PropertySheetW: Pointer;
+
+function PropertySheetW;
+begin
+ GetProcedureAddress(_PropertySheetW, comctl32, 'PropertySheetW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PropertySheetW]
+ end;
+end;
+
+var
+ _CreatePropertySheetPage: Pointer;
+
+function CreatePropertySheetPage;
+begin
+ GetProcedureAddress(_CreatePropertySheetPage, comctl32, 'CreatePropertySheetPage' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreatePropertySheetPage]
+ end;
+end;
+
+var
+ _PropertySheet: Pointer;
+
+function PropertySheet;
+begin
+ GetProcedureAddress(_PropertySheet, comctl32, 'PropertySheet' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PropertySheet]
+ end;
+end;
+
+{$ELSE}
+
+function CreatePropertySheetPageA; external comctl32 name 'CreatePropertySheetPageA';
+function CreatePropertySheetPageW; external comctl32 name 'CreatePropertySheetPageW';
+function DestroyPropertySheetPage; external comctl32 name 'DestroyPropertySheetPage';
+function PropertySheetA; external comctl32 name 'PropertySheetA';
+function PropertySheetW; external comctl32 name 'PropertySheetW';
+function CreatePropertySheetPage; external comctl32 name 'CreatePropertySheetPage' + AWSuffix;
+function PropertySheet; external comctl32 name 'PropertySheet' + AWSuffix;
+
+{$ENDIF DYNAMIC_LINK}
+
+end.
diff --git a/packages/extra/winunits/jwapsapi.pas b/packages/extra/winunits/jwapsapi.pas
index 9becf390de..599a361eb2 100644
--- a/packages/extra/winunits/jwapsapi.pas
+++ b/packages/extra/winunits/jwapsapi.pas
@@ -1,746 +1,746 @@
-{******************************************************************************}
-{ }
-{ Process Status API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: psapi.h, released June 2000. The original Pascal }
-{ code is: PsApi.pas, released December 2000. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwapsapi.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaPsApi;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include <psapi.h>'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaWinType;
-
-function EnumProcesses(lpidProcess: LPDWORD; cb: DWORD; var cbNeeded: DWORD): BOOL; stdcall;
-{$EXTERNALSYM EnumProcesses}
-
-function EnumProcessModules(hProcess: HANDLE; lphModule: PHMODULE; cb: DWORD;
- var lpcbNeeded: DWORD): BOOL; stdcall;
-{$EXTERNALSYM EnumProcessModules}
-
-function GetModuleBaseNameA(hProcess: HANDLE; hModule: HMODULE; lpBaseName: LPSTR;
- nSize: DWORD): DWORD; stdcall;
-{$EXTERNALSYM GetModuleBaseNameA}
-function GetModuleBaseNameW(hProcess: HANDLE; hModule: HMODULE; lpBaseName: LPWSTR;
- nSize: DWORD): DWORD; stdcall;
-{$EXTERNALSYM GetModuleBaseNameW}
-function GetModuleBaseName(hProcess: HANDLE; hModule: HMODULE; lpBaseName: LPTSTR;
- nSize: DWORD): DWORD; stdcall;
-{$EXTERNALSYM GetModuleBaseName}
-
-function GetModuleFileNameExA(hProcess: HANDLE; hModule: HMODULE; lpFilename: LPSTR;
- nSize: DWORD): DWORD; stdcall;
-{$EXTERNALSYM GetModuleFileNameExA}
-function GetModuleFileNameExW(hProcess: HANDLE; hModule: HMODULE; lpFilename: LPWSTR;
- nSize: DWORD): DWORD; stdcall;
-{$EXTERNALSYM GetModuleFileNameExW}
-function GetModuleFileNameEx(hProcess: HANDLE; hModule: HMODULE; lpFilename: LPTSTR;
- nSize: DWORD): DWORD; stdcall;
-{$EXTERNALSYM GetModuleFileNameEx}
-
-type
- LPMODULEINFO = ^MODULEINFO;
- {$EXTERNALSYM LPMODULEINFO}
- _MODULEINFO = packed record
- lpBaseOfDll: LPVOID;
- SizeOfImage: DWORD;
- EntryPoint: LPVOID;
- end;
- {$EXTERNALSYM _MODULEINFO}
- MODULEINFO = _MODULEINFO;
- {$EXTERNALSYM MODULEINFO}
- TModuleInfo = MODULEINFO;
- PModuleInfo = LPMODULEINFO;
-
-function GetModuleInformation(hProcess: HANDLE; hModule: HMODULE;
- var lpmodinfo: MODULEINFO; cb: DWORD): BOOL; stdcall;
-{$EXTERNALSYM GetModuleInformation}
-
-function EmptyWorkingSet(hProcess: HANDLE): BOOL; stdcall;
-{$EXTERNALSYM EmptyWorkingSet}
-
-function QueryWorkingSet(hProcess: HANDLE; pv: PVOID; cb: DWORD): BOOL; stdcall;
-{$EXTERNALSYM QueryWorkingSet}
-
-function InitializeProcessForWsWatch(hProcess: HANDLE): BOOL; stdcall;
-{$EXTERNALSYM InitializeProcessForWsWatch}
-
-type
- PPSAPI_WS_WATCH_INFORMATION = ^PSAPI_WS_WATCH_INFORMATION;
- {$EXTERNALSYM PPSAPI_WS_WATCH_INFORMATION}
- _PSAPI_WS_WATCH_INFORMATION = packed record
- FaultingPc: LPVOID;
- FaultingVa: LPVOID;
- end;
- {$EXTERNALSYM _PSAPI_WS_WATCH_INFORMATION}
- PSAPI_WS_WATCH_INFORMATION = _PSAPI_WS_WATCH_INFORMATION;
- {$EXTERNALSYM PSAPI_WS_WATCH_INFORMATION}
- TPsApiWsWatchInformation = PSAPI_WS_WATCH_INFORMATION;
- PPsApiWsWatchInformation = PPSAPI_WS_WATCH_INFORMATION;
-
-function GetWsChanges(hProcess: HANDLE; var lpWatchInfo: PSAPI_WS_WATCH_INFORMATION;
- cb: DWORD): BOOL; stdcall;
-{$EXTERNALSYM GetWsChanges}
-
-function GetMappedFileNameW(hProcess: HANDLE; lpv: LPVOID; lpFilename: LPWSTR;
- nSize: DWORD): DWORD; stdcall;
-{$EXTERNALSYM GetMappedFileNameW}
-function GetMappedFileNameA(hProcess: HANDLE; lpv: LPVOID; lpFilename: LPSTR;
- nSize: DWORD): DWORD; stdcall;
-{$EXTERNALSYM GetMappedFileNameA}
-function GetMappedFileName(hProcess: HANDLE; lpv: LPVOID; lpFilename: LPTSTR;
- nSize: DWORD): DWORD; stdcall;
-{$EXTERNALSYM GetMappedFileName}
-
-function EnumDeviceDrivers(lpImageBase: LPLPVOID; cb: DWORD; var lpcbNeeded: DWORD): BOOL; stdcall;
-{$EXTERNALSYM EnumDeviceDrivers}
-
-function GetDeviceDriverBaseNameA(ImageBase: LPVOID; lpBaseName: LPSTR;
- nSize: DWORD): DWORD; stdcall;
-{$EXTERNALSYM GetDeviceDriverBaseNameA}
-function GetDeviceDriverBaseNameW(ImageBase: LPVOID; lpBaseName: LPWSTR;
- nSize: DWORD): DWORD; stdcall;
-{$EXTERNALSYM GetDeviceDriverBaseNameW}
-function GetDeviceDriverBaseName(ImageBase: LPVOID; lpBaseName: LPTSTR;
- nSize: DWORD): DWORD; stdcall;
-{$EXTERNALSYM GetDeviceDriverBaseName}
-
-function GetDeviceDriverFileNameA(ImageBase: LPVOID; lpFilename: LPSTR;
- nSize: DWORD): DWORD; stdcall;
-{$EXTERNALSYM GetDeviceDriverFileNameA}
-function GetDeviceDriverFileNameW(ImageBase: LPVOID; lpFilename: LPWSTR;
- nSize: DWORD): DWORD; stdcall;
-{$EXTERNALSYM GetDeviceDriverFileNameW}
-function GetDeviceDriverFileName(ImageBase: LPVOID; lpFilename: LPTSTR;
- nSize: DWORD): DWORD; stdcall;
-{$EXTERNALSYM GetDeviceDriverFileName}
-
-// Structure for GetProcessMemoryInfo()
-
-type
- PPROCESS_MEMORY_COUNTERS = ^PROCESS_MEMORY_COUNTERS;
- {$EXTERNALSYM PPROCESS_MEMORY_COUNTERS}
- _PROCESS_MEMORY_COUNTERS = packed record
- cb: DWORD;
- PageFaultCount: DWORD;
- PeakWorkingSetSize: SIZE_T;
- WorkingSetSize: SIZE_T;
- QuotaPeakPagedPoolUsage: SIZE_T;
- QuotaPagedPoolUsage: SIZE_T;
- QuotaPeakNonPagedPoolUsage: SIZE_T;
- QuotaNonPagedPoolUsage: SIZE_T;
- PagefileUsage: SIZE_T;
- PeakPagefileUsage: SIZE_T;
- end;
- {$EXTERNALSYM _PROCESS_MEMORY_COUNTERS}
- PROCESS_MEMORY_COUNTERS = _PROCESS_MEMORY_COUNTERS;
- {$EXTERNALSYM PROCESS_MEMORY_COUNTERS}
- TProcessMemoryCounters = PROCESS_MEMORY_COUNTERS;
- PProcessMemoryCounters = PPROCESS_MEMORY_COUNTERS;
-
- _PROCESS_MEMORY_COUNTERS_EX = record
- cb: DWORD;
- PageFaultCount: DWORD;
- PeakWorkingSetSize: SIZE_T;
- WorkingSetSize: SIZE_T;
- QuotaPeakPagedPoolUsage: SIZE_T;
- QuotaPagedPoolUsage: SIZE_T;
- QuotaPeakNonPagedPoolUsage: SIZE_T;
- QuotaNonPagedPoolUsage: SIZE_T;
- PagefileUsage: SIZE_T;
- PeakPagefileUsage: SIZE_T;
- PrivateUsage: SIZE_T;
- end;
- {$EXTERNALSYM _PROCESS_MEMORY_COUNTERS_EX}
- PROCESS_MEMORY_COUNTERS_EX = _PROCESS_MEMORY_COUNTERS_EX;
- {$EXTERNALSYM PROCESS_MEMORY_COUNTERS_EX}
- PPROCESS_MEMORY_COUNTERS_EX = ^PROCESS_MEMORY_COUNTERS_EX;
- {$EXTERNALSYM PPROCESS_MEMORY_COUNTERS_EX}
- TProcessMemoryCountersEx = PROCESS_MEMORY_COUNTERS_EX;
-
-function GetProcessMemoryInfo(Process: HANDLE;
- var ppsmemCounters: PROCESS_MEMORY_COUNTERS; cb: DWORD): BOOL; stdcall;
-{$EXTERNALSYM GetProcessMemoryInfo}
-
-type
- _PERFORMANCE_INFORMATION = record
- cb: DWORD;
- CommitTotal: SIZE_T;
- CommitLimit: SIZE_T;
- CommitPeak: SIZE_T;
- PhysicalTotal: SIZE_T;
- PhysicalAvailable: SIZE_T;
- SystemCache: SIZE_T;
- KernelTotal: SIZE_T;
- KernelPaged: SIZE_T;
- KernelNonpaged: SIZE_T;
- PageSize: SIZE_T;
- HandleCount: DWORD;
- ProcessCount: DWORD;
- ThreadCount: DWORD;
- end;
- {$EXTERNALSYM _PERFORMANCE_INFORMATION}
- PERFORMANCE_INFORMATION = _PERFORMANCE_INFORMATION;
- {$EXTERNALSYM PERFORMANCE_INFORMATION}
- PPERFORMANCE_INFORMATION = ^PERFORMANCE_INFORMATION;
- {$EXTERNALSYM PPERFORMANCE_INFORMATION}
- TPerformanceInformation = PERFORMANCE_INFORMATION;
- PPerformanceInformation = PPERFORMANCE_INFORMATION;
-
-{ MVB:
-
- Please note that this function, unlike what the Platform SDK documents, is _not_ available for Windows 2000!!!
- It is available starting with Windows XP and Windows.NET Server.
- If needed, you can relatively easily clone the functionality of this function by using the performance monitor
- API (either through the HKEY_PERFORMANCE_DATA registry interface or using the Performance Data Helper API)
-}
-
-function GetPerformanceInfo(pPerformanceInformation: PPERFORMANCE_INFORMATION;
- cb: DWORD): BOOL; stdcall;
-{$EXTERNALSYM GetPerformanceInfo}
-
-type
- _ENUM_PAGE_FILE_INFORMATION = record
- cb: DWORD;
- Reserved: DWORD;
- TotalSize: SIZE_T;
- TotalInUse: SIZE_T;
- PeakUsage: SIZE_T;
- end;
- {$EXTERNALSYM _ENUM_PAGE_FILE_INFORMATION}
- ENUM_PAGE_FILE_INFORMATION = _ENUM_PAGE_FILE_INFORMATION;
- {$EXTERNALSYM ENUM_PAGE_FILE_INFORMATION}
- PENUM_PAGE_FILE_INFORMATION = ^ENUM_PAGE_FILE_INFORMATION;
- TEnumPageFileInformation = ENUM_PAGE_FILE_INFORMATION;
- PEnumPageFileInformation = PENUM_PAGE_FILE_INFORMATION;
-
-type
- PENUM_PAGE_FILE_CALLBACKW = function(pContext: LPVOID;
- pPageFileInfo: PENUM_PAGE_FILE_INFORMATION; lpFilename: LPCWSTR): BOOL; stdcall;
- {$EXTERNALSYM PENUM_PAGE_FILE_CALLBACKW}
- PENUM_PAGE_FILE_CALLBACKA = function(pContext: LPVOID;
- pPageFileInfo: PENUM_PAGE_FILE_INFORMATION; lpFilename: LPCSTR): BOOL; stdcall;
- {$EXTERNALSYM PENUM_PAGE_FILE_CALLBACKA}
- {$IFDEF UNICODE}
- PENUM_PAGE_FILE_CALLBACK = PENUM_PAGE_FILE_CALLBACKW;
- {$EXTERNALSYM PENUM_PAGE_FILE_CALLBACK}
- {$ELSE}
- PENUM_PAGE_FILE_CALLBACK = PENUM_PAGE_FILE_CALLBACKA;
- {$EXTERNALSYM PENUM_PAGE_FILE_CALLBACK}
- {$ENDIF UNICODE}
-
-function EnumPageFilesW(pCallBackRoutine: PENUM_PAGE_FILE_CALLBACKW; pContext: LPVOID): BOOL; stdcall;
-{$EXTERNALSYM EnumPageFilesW}
-function EnumPageFilesA(pCallBackRoutine: PENUM_PAGE_FILE_CALLBACKA; pContext: LPVOID): BOOL; stdcall;
-{$EXTERNALSYM EnumPageFilesA}
-function EnumPageFiles(pCallBackRoutine: PENUM_PAGE_FILE_CALLBACK; pContext: LPVOID): BOOL; stdcall;
-{$EXTERNALSYM EnumPageFiles}
-
-function GetProcessImageFileNameA(hProcess: HANDLE; lpImageFileName: LPSTR;
- nSize: DWORD): DWORD; stdcall;
-{$EXTERNALSYM GetProcessImageFileNameA}
-function GetProcessImageFileNameW(hProcess: HANDLE; lpImageFileName: LPWSTR;
- nSize: DWORD): DWORD; stdcall;
-{$EXTERNALSYM GetProcessImageFileNameW}
-function GetProcessImageFileName(hProcess: HANDLE; lpImageFileName: LPTSTR;
- nSize: DWORD): DWORD; stdcall;
-{$EXTERNALSYM GetProcessImageFileName}
-
-implementation
-
-const
- PsapiLib = 'psapi.dll';
- {$IFDEF UNICODE}
- AWSuffix = 'W';
- {$ELSE}
- AWSuffix = 'A';
- {$ENDIF UNICODE}
-
-{$IFDEF DYNAMIC_LINK}
-
-var
- _EnumProcesses: Pointer;
-
-function EnumProcesses;
-begin
- GetProcedureAddress(_EnumProcesses, PsapiLib, 'EnumProcesses');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_EnumProcesses]
- end;
-end;
-
-var
- _EnumProcessModules: Pointer;
-
-function EnumProcessModules;
-begin
- GetProcedureAddress(_EnumProcessModules, PsapiLib, 'EnumProcessModules');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_EnumProcessModules]
- end;
-end;
-
-var
- _GetModuleBaseNameA: Pointer;
-
-function GetModuleBaseNameA;
-begin
- GetProcedureAddress(_GetModuleBaseNameA, PsapiLib, 'GetModuleBaseNameA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetModuleBaseNameA]
- end;
-end;
-
-var
- _GetModuleBaseNameW: Pointer;
-
-function GetModuleBaseNameW;
-begin
- GetProcedureAddress(_GetModuleBaseNameW, PsapiLib, 'GetModuleBaseNameW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetModuleBaseNameW]
- end;
-end;
-
-var
- _GetModuleBaseName: Pointer;
-
-function GetModuleBaseName;
-begin
- GetProcedureAddress(_GetModuleBaseName, PsapiLib, 'GetModuleBaseName' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetModuleBaseName]
- end;
-end;
-
-var
- _GetModuleFileNameExA: Pointer;
-
-function GetModuleFileNameExA;
-begin
- GetProcedureAddress(_GetModuleFileNameExA, PsapiLib, 'GetModuleFileNameExA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetModuleFileNameExA]
- end;
-end;
-
-var
- _GetModuleFileNameExW: Pointer;
-
-function GetModuleFileNameExW;
-begin
- GetProcedureAddress(_GetModuleFileNameExW, PsapiLib, 'GetModuleFileNameExW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetModuleFileNameExW]
- end;
-end;
-
-var
- _GetModuleFileNameEx: Pointer;
-
-function GetModuleFileNameEx;
-begin
- GetProcedureAddress(_GetModuleFileNameEx, PsapiLib, 'GetModuleFileNameEx' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetModuleFileNameEx]
- end;
-end;
-
-var
- _GetModuleInformation: Pointer;
-
-function GetModuleInformation;
-begin
- GetProcedureAddress(_GetModuleInformation, PsapiLib, 'GetModuleInformation');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetModuleInformation]
- end;
-end;
-
-var
- _EmptyWorkingSet: Pointer;
-
-function EmptyWorkingSet;
-begin
- GetProcedureAddress(_EmptyWorkingSet, PsapiLib, 'EmptyWorkingSet');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_EmptyWorkingSet]
- end;
-end;
-
-var
- _QueryWorkingSet: Pointer;
-
-function QueryWorkingSet;
-begin
- GetProcedureAddress(_QueryWorkingSet, PsapiLib, 'QueryWorkingSet');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_QueryWorkingSet]
- end;
-end;
-
-var
- _InitializeProcessForWsWatch: Pointer;
-
-function InitializeProcessForWsWatch;
-begin
- GetProcedureAddress(_InitializeProcessForWsWatch, PsapiLib, 'InitializeProcessForWsWatch');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_InitializeProcessForWsWatch]
- end;
-end;
-
-var
- _GetWsChanges: Pointer;
-
-function GetWsChanges;
-begin
- GetProcedureAddress(_GetWsChanges, PsapiLib, 'GetWsChanges');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetWsChanges]
- end;
-end;
-
-var
- _GetMappedFileNameW: Pointer;
-
-function GetMappedFileNameW;
-begin
- GetProcedureAddress(_GetMappedFileNameW, PsapiLib, 'GetMappedFileNameW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetMappedFileNameW]
- end;
-end;
-
-var
- _GetMappedFileNameA: Pointer;
-
-function GetMappedFileNameA;
-begin
- GetProcedureAddress(_GetMappedFileNameA, PsapiLib, 'GetMappedFileNameA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetMappedFileNameA]
- end;
-end;
-
-var
- _GetMappedFileName: Pointer;
-
-function GetMappedFileName;
-begin
- GetProcedureAddress(_GetMappedFileName, PsapiLib, 'GetMappedFileName' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetMappedFileName]
- end;
-end;
-
-var
- _EnumDeviceDrivers: Pointer;
-
-function EnumDeviceDrivers;
-begin
- GetProcedureAddress(_EnumDeviceDrivers, PsapiLib, 'EnumDeviceDrivers');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_EnumDeviceDrivers]
- end;
-end;
-
-var
- _GetDeviceDriverBaseNameA: Pointer;
-
-function GetDeviceDriverBaseNameA;
-begin
- GetProcedureAddress(_GetDeviceDriverBaseNameA, PsapiLib, 'GetDeviceDriverBaseNameA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetDeviceDriverBaseNameA]
- end;
-end;
-
-var
- _GetDeviceDriverBaseNameW: Pointer;
-
-function GetDeviceDriverBaseNameW;
-begin
- GetProcedureAddress(_GetDeviceDriverBaseNameW, PsapiLib, 'GetDeviceDriverBaseNameW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetDeviceDriverBaseNameW]
- end;
-end;
-
-var
- _GetDeviceDriverBaseName: Pointer;
-
-function GetDeviceDriverBaseName;
-begin
- GetProcedureAddress(_GetDeviceDriverBaseName, PsapiLib, 'GetDeviceDriverBaseName' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetDeviceDriverBaseName]
- end;
-end;
-
-var
- _GetDeviceDriverFileNameA: Pointer;
-
-function GetDeviceDriverFileNameA;
-begin
- GetProcedureAddress(_GetDeviceDriverFileNameA, PsapiLib, 'GetDeviceDriverFileNameA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetDeviceDriverFileNameA]
- end;
-end;
-
-var
- _GetDeviceDriverFileNameW: Pointer;
-
-function GetDeviceDriverFileNameW;
-begin
- GetProcedureAddress(_GetDeviceDriverFileNameW, PsapiLib, 'GetDeviceDriverFileNameW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetDeviceDriverFileNameW]
- end;
-end;
-
-var
- _GetDeviceDriverFileName: Pointer;
-
-function GetDeviceDriverFileName;
-begin
- GetProcedureAddress(_GetDeviceDriverFileName, PsapiLib, 'GetDeviceDriverFileName' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetDeviceDriverFileName]
- end;
-end;
-
-var
- _GetProcessMemoryInfo: Pointer;
-
-function GetProcessMemoryInfo;
-begin
- GetProcedureAddress(_GetProcessMemoryInfo, PsapiLib, 'GetProcessMemoryInfo');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetProcessMemoryInfo]
- end;
-end;
-
-var
- _GetPerformanceInfo: Pointer;
-
-function GetPerformanceInfo;
-begin
- GetProcedureAddress(_GetPerformanceInfo, PsapiLib, 'GetPerformanceInfo');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetPerformanceInfo]
- end;
-end;
-
-var
- _EnumPageFilesW: Pointer;
-
-function EnumPageFilesW;
-begin
- GetProcedureAddress(_EnumPageFilesW, PsapiLib, 'EnumPageFilesA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_EnumPageFilesW]
- end;
-end;
-
-var
- _EnumPageFilesA: Pointer;
-
-function EnumPageFilesA;
-begin
- GetProcedureAddress(_EnumPageFilesA, PsapiLib, 'EnumPageFilesW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_EnumPageFilesA]
- end;
-end;
-
-var
- _EnumPageFiles: Pointer;
-
-function EnumPageFiles;
-begin
- GetProcedureAddress(_EnumPageFiles, PsapiLib, 'EnumPageFiles' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_EnumPageFiles]
- end;
-end;
-
-var
- _GetProcessImageFileNameA: Pointer;
-
-function GetProcessImageFileNameA;
-begin
- GetProcedureAddress(_GetProcessImageFileNameA, PsapiLib, 'GetProcessImageFileNameA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetProcessImageFileNameA]
- end;
-end;
-
-var
- _GetProcessImageFileNameW: Pointer;
-
-function GetProcessImageFileNameW;
-begin
- GetProcedureAddress(_GetProcessImageFileNameW, PsapiLib, 'GetProcessImageFileNameW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetProcessImageFileNameW]
- end;
-end;
-
-var
- _GetProcessImageFileName: Pointer;
-
-function GetProcessImageFileName;
-begin
- GetProcedureAddress(_GetProcessImageFileName, PsapiLib, 'GetProcessImageFileName' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetProcessImageFileName]
- end;
-end;
-
-{$ELSE}
-
-function EnumProcesses; external PsapiLib name 'EnumProcesses';
-function EnumProcessModules; external PsapiLib name 'EnumProcessModules';
-function GetModuleBaseNameA; external PsapiLib name 'GetModuleBaseNameA';
-function GetModuleBaseNameW; external PsapiLib name 'GetModuleBaseNameW';
-function GetModuleBaseName; external PsapiLib name 'GetModuleBaseName' + AWSuffix;
-function GetModuleFileNameExA; external PsapiLib name 'GetModuleFileNameExA';
-function GetModuleFileNameExW; external PsapiLib name 'GetModuleFileNameExW';
-function GetModuleFileNameEx; external PsapiLib name 'GetModuleFileNameEx' + AWSuffix;
-function GetModuleInformation; external PsapiLib name 'GetModuleInformation';
-function EmptyWorkingSet; external PsapiLib name 'EmptyWorkingSet';
-function QueryWorkingSet; external PsapiLib name 'QueryWorkingSet';
-function InitializeProcessForWsWatch; external PsapiLib name 'InitializeProcessForWsWatch';
-function GetWsChanges; external PsapiLib name 'GetWsChanges';
-function GetMappedFileNameW; external PsapiLib name 'GetMappedFileNameW';
-function GetMappedFileNameA; external PsapiLib name 'GetMappedFileNameA';
-function GetMappedFileName; external PsapiLib name 'GetMappedFileName' + AWSuffix;
-function EnumDeviceDrivers; external PsapiLib name 'EnumDeviceDrivers';
-function GetDeviceDriverBaseNameA; external PsapiLib name 'GetDeviceDriverBaseNameA';
-function GetDeviceDriverBaseNameW; external PsapiLib name 'GetDeviceDriverBaseNameW';
-function GetDeviceDriverBaseName; external PsapiLib name 'GetDeviceDriverBaseName' + AWSuffix;
-function GetDeviceDriverFileNameA; external PsapiLib name 'GetDeviceDriverFileNameA';
-function GetDeviceDriverFileNameW; external PsapiLib name 'GetDeviceDriverFileNameW';
-function GetDeviceDriverFileName; external PsapiLib name 'GetDeviceDriverFileName' + AWSuffix;
-function GetProcessMemoryInfo; external PsapiLib name 'GetProcessMemoryInfo';
-function GetPerformanceInfo; external PsapiLib name 'GetPerformanceInfo';
-function EnumPageFilesW; external PsapiLib name 'EnumPageFilesA';
-function EnumPageFilesA; external PsapiLib name 'EnumPageFilesW';
-function EnumPageFiles; external PsapiLib name 'EnumPageFiles' + AWSuffix;
-function GetProcessImageFileNameA; external PsapiLib name 'GetProcessImageFileNameA';
-function GetProcessImageFileNameW; external PsapiLib name 'GetProcessImageFileNameW';
-function GetProcessImageFileName; external PsapiLib name 'GetProcessImageFileName' + AWSuffix;
-
-{$ENDIF DYNAMIC_LINK}
-
-end.
+{******************************************************************************}
+{ }
+{ Process Status API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: psapi.h, released June 2000. The original Pascal }
+{ code is: PsApi.pas, released December 2000. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwapsapi.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaPsApi;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include <psapi.h>'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaWinType;
+
+function EnumProcesses(lpidProcess: LPDWORD; cb: DWORD; var cbNeeded: DWORD): BOOL; stdcall;
+{$EXTERNALSYM EnumProcesses}
+
+function EnumProcessModules(hProcess: HANDLE; lphModule: PHMODULE; cb: DWORD;
+ var lpcbNeeded: DWORD): BOOL; stdcall;
+{$EXTERNALSYM EnumProcessModules}
+
+function GetModuleBaseNameA(hProcess: HANDLE; hModule: HMODULE; lpBaseName: LPSTR;
+ nSize: DWORD): DWORD; stdcall;
+{$EXTERNALSYM GetModuleBaseNameA}
+function GetModuleBaseNameW(hProcess: HANDLE; hModule: HMODULE; lpBaseName: LPWSTR;
+ nSize: DWORD): DWORD; stdcall;
+{$EXTERNALSYM GetModuleBaseNameW}
+function GetModuleBaseName(hProcess: HANDLE; hModule: HMODULE; lpBaseName: LPTSTR;
+ nSize: DWORD): DWORD; stdcall;
+{$EXTERNALSYM GetModuleBaseName}
+
+function GetModuleFileNameExA(hProcess: HANDLE; hModule: HMODULE; lpFilename: LPSTR;
+ nSize: DWORD): DWORD; stdcall;
+{$EXTERNALSYM GetModuleFileNameExA}
+function GetModuleFileNameExW(hProcess: HANDLE; hModule: HMODULE; lpFilename: LPWSTR;
+ nSize: DWORD): DWORD; stdcall;
+{$EXTERNALSYM GetModuleFileNameExW}
+function GetModuleFileNameEx(hProcess: HANDLE; hModule: HMODULE; lpFilename: LPTSTR;
+ nSize: DWORD): DWORD; stdcall;
+{$EXTERNALSYM GetModuleFileNameEx}
+
+type
+ LPMODULEINFO = ^MODULEINFO;
+ {$EXTERNALSYM LPMODULEINFO}
+ _MODULEINFO = packed record
+ lpBaseOfDll: LPVOID;
+ SizeOfImage: DWORD;
+ EntryPoint: LPVOID;
+ end;
+ {$EXTERNALSYM _MODULEINFO}
+ MODULEINFO = _MODULEINFO;
+ {$EXTERNALSYM MODULEINFO}
+ TModuleInfo = MODULEINFO;
+ PModuleInfo = LPMODULEINFO;
+
+function GetModuleInformation(hProcess: HANDLE; hModule: HMODULE;
+ var lpmodinfo: MODULEINFO; cb: DWORD): BOOL; stdcall;
+{$EXTERNALSYM GetModuleInformation}
+
+function EmptyWorkingSet(hProcess: HANDLE): BOOL; stdcall;
+{$EXTERNALSYM EmptyWorkingSet}
+
+function QueryWorkingSet(hProcess: HANDLE; pv: PVOID; cb: DWORD): BOOL; stdcall;
+{$EXTERNALSYM QueryWorkingSet}
+
+function InitializeProcessForWsWatch(hProcess: HANDLE): BOOL; stdcall;
+{$EXTERNALSYM InitializeProcessForWsWatch}
+
+type
+ PPSAPI_WS_WATCH_INFORMATION = ^PSAPI_WS_WATCH_INFORMATION;
+ {$EXTERNALSYM PPSAPI_WS_WATCH_INFORMATION}
+ _PSAPI_WS_WATCH_INFORMATION = packed record
+ FaultingPc: LPVOID;
+ FaultingVa: LPVOID;
+ end;
+ {$EXTERNALSYM _PSAPI_WS_WATCH_INFORMATION}
+ PSAPI_WS_WATCH_INFORMATION = _PSAPI_WS_WATCH_INFORMATION;
+ {$EXTERNALSYM PSAPI_WS_WATCH_INFORMATION}
+ TPsApiWsWatchInformation = PSAPI_WS_WATCH_INFORMATION;
+ PPsApiWsWatchInformation = PPSAPI_WS_WATCH_INFORMATION;
+
+function GetWsChanges(hProcess: HANDLE; var lpWatchInfo: PSAPI_WS_WATCH_INFORMATION;
+ cb: DWORD): BOOL; stdcall;
+{$EXTERNALSYM GetWsChanges}
+
+function GetMappedFileNameW(hProcess: HANDLE; lpv: LPVOID; lpFilename: LPWSTR;
+ nSize: DWORD): DWORD; stdcall;
+{$EXTERNALSYM GetMappedFileNameW}
+function GetMappedFileNameA(hProcess: HANDLE; lpv: LPVOID; lpFilename: LPSTR;
+ nSize: DWORD): DWORD; stdcall;
+{$EXTERNALSYM GetMappedFileNameA}
+function GetMappedFileName(hProcess: HANDLE; lpv: LPVOID; lpFilename: LPTSTR;
+ nSize: DWORD): DWORD; stdcall;
+{$EXTERNALSYM GetMappedFileName}
+
+function EnumDeviceDrivers(lpImageBase: LPLPVOID; cb: DWORD; var lpcbNeeded: DWORD): BOOL; stdcall;
+{$EXTERNALSYM EnumDeviceDrivers}
+
+function GetDeviceDriverBaseNameA(ImageBase: LPVOID; lpBaseName: LPSTR;
+ nSize: DWORD): DWORD; stdcall;
+{$EXTERNALSYM GetDeviceDriverBaseNameA}
+function GetDeviceDriverBaseNameW(ImageBase: LPVOID; lpBaseName: LPWSTR;
+ nSize: DWORD): DWORD; stdcall;
+{$EXTERNALSYM GetDeviceDriverBaseNameW}
+function GetDeviceDriverBaseName(ImageBase: LPVOID; lpBaseName: LPTSTR;
+ nSize: DWORD): DWORD; stdcall;
+{$EXTERNALSYM GetDeviceDriverBaseName}
+
+function GetDeviceDriverFileNameA(ImageBase: LPVOID; lpFilename: LPSTR;
+ nSize: DWORD): DWORD; stdcall;
+{$EXTERNALSYM GetDeviceDriverFileNameA}
+function GetDeviceDriverFileNameW(ImageBase: LPVOID; lpFilename: LPWSTR;
+ nSize: DWORD): DWORD; stdcall;
+{$EXTERNALSYM GetDeviceDriverFileNameW}
+function GetDeviceDriverFileName(ImageBase: LPVOID; lpFilename: LPTSTR;
+ nSize: DWORD): DWORD; stdcall;
+{$EXTERNALSYM GetDeviceDriverFileName}
+
+// Structure for GetProcessMemoryInfo()
+
+type
+ PPROCESS_MEMORY_COUNTERS = ^PROCESS_MEMORY_COUNTERS;
+ {$EXTERNALSYM PPROCESS_MEMORY_COUNTERS}
+ _PROCESS_MEMORY_COUNTERS = packed record
+ cb: DWORD;
+ PageFaultCount: DWORD;
+ PeakWorkingSetSize: SIZE_T;
+ WorkingSetSize: SIZE_T;
+ QuotaPeakPagedPoolUsage: SIZE_T;
+ QuotaPagedPoolUsage: SIZE_T;
+ QuotaPeakNonPagedPoolUsage: SIZE_T;
+ QuotaNonPagedPoolUsage: SIZE_T;
+ PagefileUsage: SIZE_T;
+ PeakPagefileUsage: SIZE_T;
+ end;
+ {$EXTERNALSYM _PROCESS_MEMORY_COUNTERS}
+ PROCESS_MEMORY_COUNTERS = _PROCESS_MEMORY_COUNTERS;
+ {$EXTERNALSYM PROCESS_MEMORY_COUNTERS}
+ TProcessMemoryCounters = PROCESS_MEMORY_COUNTERS;
+ PProcessMemoryCounters = PPROCESS_MEMORY_COUNTERS;
+
+ _PROCESS_MEMORY_COUNTERS_EX = record
+ cb: DWORD;
+ PageFaultCount: DWORD;
+ PeakWorkingSetSize: SIZE_T;
+ WorkingSetSize: SIZE_T;
+ QuotaPeakPagedPoolUsage: SIZE_T;
+ QuotaPagedPoolUsage: SIZE_T;
+ QuotaPeakNonPagedPoolUsage: SIZE_T;
+ QuotaNonPagedPoolUsage: SIZE_T;
+ PagefileUsage: SIZE_T;
+ PeakPagefileUsage: SIZE_T;
+ PrivateUsage: SIZE_T;
+ end;
+ {$EXTERNALSYM _PROCESS_MEMORY_COUNTERS_EX}
+ PROCESS_MEMORY_COUNTERS_EX = _PROCESS_MEMORY_COUNTERS_EX;
+ {$EXTERNALSYM PROCESS_MEMORY_COUNTERS_EX}
+ PPROCESS_MEMORY_COUNTERS_EX = ^PROCESS_MEMORY_COUNTERS_EX;
+ {$EXTERNALSYM PPROCESS_MEMORY_COUNTERS_EX}
+ TProcessMemoryCountersEx = PROCESS_MEMORY_COUNTERS_EX;
+
+function GetProcessMemoryInfo(Process: HANDLE;
+ var ppsmemCounters: PROCESS_MEMORY_COUNTERS; cb: DWORD): BOOL; stdcall;
+{$EXTERNALSYM GetProcessMemoryInfo}
+
+type
+ _PERFORMANCE_INFORMATION = record
+ cb: DWORD;
+ CommitTotal: SIZE_T;
+ CommitLimit: SIZE_T;
+ CommitPeak: SIZE_T;
+ PhysicalTotal: SIZE_T;
+ PhysicalAvailable: SIZE_T;
+ SystemCache: SIZE_T;
+ KernelTotal: SIZE_T;
+ KernelPaged: SIZE_T;
+ KernelNonpaged: SIZE_T;
+ PageSize: SIZE_T;
+ HandleCount: DWORD;
+ ProcessCount: DWORD;
+ ThreadCount: DWORD;
+ end;
+ {$EXTERNALSYM _PERFORMANCE_INFORMATION}
+ PERFORMANCE_INFORMATION = _PERFORMANCE_INFORMATION;
+ {$EXTERNALSYM PERFORMANCE_INFORMATION}
+ PPERFORMANCE_INFORMATION = ^PERFORMANCE_INFORMATION;
+ {$EXTERNALSYM PPERFORMANCE_INFORMATION}
+ TPerformanceInformation = PERFORMANCE_INFORMATION;
+ PPerformanceInformation = PPERFORMANCE_INFORMATION;
+
+{ MVB:
+
+ Please note that this function, unlike what the Platform SDK documents, is _not_ available for Windows 2000!!!
+ It is available starting with Windows XP and Windows.NET Server.
+ If needed, you can relatively easily clone the functionality of this function by using the performance monitor
+ API (either through the HKEY_PERFORMANCE_DATA registry interface or using the Performance Data Helper API)
+}
+
+function GetPerformanceInfo(pPerformanceInformation: PPERFORMANCE_INFORMATION;
+ cb: DWORD): BOOL; stdcall;
+{$EXTERNALSYM GetPerformanceInfo}
+
+type
+ _ENUM_PAGE_FILE_INFORMATION = record
+ cb: DWORD;
+ Reserved: DWORD;
+ TotalSize: SIZE_T;
+ TotalInUse: SIZE_T;
+ PeakUsage: SIZE_T;
+ end;
+ {$EXTERNALSYM _ENUM_PAGE_FILE_INFORMATION}
+ ENUM_PAGE_FILE_INFORMATION = _ENUM_PAGE_FILE_INFORMATION;
+ {$EXTERNALSYM ENUM_PAGE_FILE_INFORMATION}
+ PENUM_PAGE_FILE_INFORMATION = ^ENUM_PAGE_FILE_INFORMATION;
+ TEnumPageFileInformation = ENUM_PAGE_FILE_INFORMATION;
+ PEnumPageFileInformation = PENUM_PAGE_FILE_INFORMATION;
+
+type
+ PENUM_PAGE_FILE_CALLBACKW = function(pContext: LPVOID;
+ pPageFileInfo: PENUM_PAGE_FILE_INFORMATION; lpFilename: LPCWSTR): BOOL; stdcall;
+ {$EXTERNALSYM PENUM_PAGE_FILE_CALLBACKW}
+ PENUM_PAGE_FILE_CALLBACKA = function(pContext: LPVOID;
+ pPageFileInfo: PENUM_PAGE_FILE_INFORMATION; lpFilename: LPCSTR): BOOL; stdcall;
+ {$EXTERNALSYM PENUM_PAGE_FILE_CALLBACKA}
+ {$IFDEF UNICODE}
+ PENUM_PAGE_FILE_CALLBACK = PENUM_PAGE_FILE_CALLBACKW;
+ {$EXTERNALSYM PENUM_PAGE_FILE_CALLBACK}
+ {$ELSE}
+ PENUM_PAGE_FILE_CALLBACK = PENUM_PAGE_FILE_CALLBACKA;
+ {$EXTERNALSYM PENUM_PAGE_FILE_CALLBACK}
+ {$ENDIF UNICODE}
+
+function EnumPageFilesW(pCallBackRoutine: PENUM_PAGE_FILE_CALLBACKW; pContext: LPVOID): BOOL; stdcall;
+{$EXTERNALSYM EnumPageFilesW}
+function EnumPageFilesA(pCallBackRoutine: PENUM_PAGE_FILE_CALLBACKA; pContext: LPVOID): BOOL; stdcall;
+{$EXTERNALSYM EnumPageFilesA}
+function EnumPageFiles(pCallBackRoutine: PENUM_PAGE_FILE_CALLBACK; pContext: LPVOID): BOOL; stdcall;
+{$EXTERNALSYM EnumPageFiles}
+
+function GetProcessImageFileNameA(hProcess: HANDLE; lpImageFileName: LPSTR;
+ nSize: DWORD): DWORD; stdcall;
+{$EXTERNALSYM GetProcessImageFileNameA}
+function GetProcessImageFileNameW(hProcess: HANDLE; lpImageFileName: LPWSTR;
+ nSize: DWORD): DWORD; stdcall;
+{$EXTERNALSYM GetProcessImageFileNameW}
+function GetProcessImageFileName(hProcess: HANDLE; lpImageFileName: LPTSTR;
+ nSize: DWORD): DWORD; stdcall;
+{$EXTERNALSYM GetProcessImageFileName}
+
+implementation
+
+const
+ PsapiLib = 'psapi.dll';
+ {$IFDEF UNICODE}
+ AWSuffix = 'W';
+ {$ELSE}
+ AWSuffix = 'A';
+ {$ENDIF UNICODE}
+
+{$IFDEF DYNAMIC_LINK}
+
+var
+ _EnumProcesses: Pointer;
+
+function EnumProcesses;
+begin
+ GetProcedureAddress(_EnumProcesses, PsapiLib, 'EnumProcesses');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_EnumProcesses]
+ end;
+end;
+
+var
+ _EnumProcessModules: Pointer;
+
+function EnumProcessModules;
+begin
+ GetProcedureAddress(_EnumProcessModules, PsapiLib, 'EnumProcessModules');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_EnumProcessModules]
+ end;
+end;
+
+var
+ _GetModuleBaseNameA: Pointer;
+
+function GetModuleBaseNameA;
+begin
+ GetProcedureAddress(_GetModuleBaseNameA, PsapiLib, 'GetModuleBaseNameA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetModuleBaseNameA]
+ end;
+end;
+
+var
+ _GetModuleBaseNameW: Pointer;
+
+function GetModuleBaseNameW;
+begin
+ GetProcedureAddress(_GetModuleBaseNameW, PsapiLib, 'GetModuleBaseNameW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetModuleBaseNameW]
+ end;
+end;
+
+var
+ _GetModuleBaseName: Pointer;
+
+function GetModuleBaseName;
+begin
+ GetProcedureAddress(_GetModuleBaseName, PsapiLib, 'GetModuleBaseName' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetModuleBaseName]
+ end;
+end;
+
+var
+ _GetModuleFileNameExA: Pointer;
+
+function GetModuleFileNameExA;
+begin
+ GetProcedureAddress(_GetModuleFileNameExA, PsapiLib, 'GetModuleFileNameExA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetModuleFileNameExA]
+ end;
+end;
+
+var
+ _GetModuleFileNameExW: Pointer;
+
+function GetModuleFileNameExW;
+begin
+ GetProcedureAddress(_GetModuleFileNameExW, PsapiLib, 'GetModuleFileNameExW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetModuleFileNameExW]
+ end;
+end;
+
+var
+ _GetModuleFileNameEx: Pointer;
+
+function GetModuleFileNameEx;
+begin
+ GetProcedureAddress(_GetModuleFileNameEx, PsapiLib, 'GetModuleFileNameEx' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetModuleFileNameEx]
+ end;
+end;
+
+var
+ _GetModuleInformation: Pointer;
+
+function GetModuleInformation;
+begin
+ GetProcedureAddress(_GetModuleInformation, PsapiLib, 'GetModuleInformation');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetModuleInformation]
+ end;
+end;
+
+var
+ _EmptyWorkingSet: Pointer;
+
+function EmptyWorkingSet;
+begin
+ GetProcedureAddress(_EmptyWorkingSet, PsapiLib, 'EmptyWorkingSet');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_EmptyWorkingSet]
+ end;
+end;
+
+var
+ _QueryWorkingSet: Pointer;
+
+function QueryWorkingSet;
+begin
+ GetProcedureAddress(_QueryWorkingSet, PsapiLib, 'QueryWorkingSet');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_QueryWorkingSet]
+ end;
+end;
+
+var
+ _InitializeProcessForWsWatch: Pointer;
+
+function InitializeProcessForWsWatch;
+begin
+ GetProcedureAddress(_InitializeProcessForWsWatch, PsapiLib, 'InitializeProcessForWsWatch');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_InitializeProcessForWsWatch]
+ end;
+end;
+
+var
+ _GetWsChanges: Pointer;
+
+function GetWsChanges;
+begin
+ GetProcedureAddress(_GetWsChanges, PsapiLib, 'GetWsChanges');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetWsChanges]
+ end;
+end;
+
+var
+ _GetMappedFileNameW: Pointer;
+
+function GetMappedFileNameW;
+begin
+ GetProcedureAddress(_GetMappedFileNameW, PsapiLib, 'GetMappedFileNameW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetMappedFileNameW]
+ end;
+end;
+
+var
+ _GetMappedFileNameA: Pointer;
+
+function GetMappedFileNameA;
+begin
+ GetProcedureAddress(_GetMappedFileNameA, PsapiLib, 'GetMappedFileNameA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetMappedFileNameA]
+ end;
+end;
+
+var
+ _GetMappedFileName: Pointer;
+
+function GetMappedFileName;
+begin
+ GetProcedureAddress(_GetMappedFileName, PsapiLib, 'GetMappedFileName' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetMappedFileName]
+ end;
+end;
+
+var
+ _EnumDeviceDrivers: Pointer;
+
+function EnumDeviceDrivers;
+begin
+ GetProcedureAddress(_EnumDeviceDrivers, PsapiLib, 'EnumDeviceDrivers');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_EnumDeviceDrivers]
+ end;
+end;
+
+var
+ _GetDeviceDriverBaseNameA: Pointer;
+
+function GetDeviceDriverBaseNameA;
+begin
+ GetProcedureAddress(_GetDeviceDriverBaseNameA, PsapiLib, 'GetDeviceDriverBaseNameA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetDeviceDriverBaseNameA]
+ end;
+end;
+
+var
+ _GetDeviceDriverBaseNameW: Pointer;
+
+function GetDeviceDriverBaseNameW;
+begin
+ GetProcedureAddress(_GetDeviceDriverBaseNameW, PsapiLib, 'GetDeviceDriverBaseNameW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetDeviceDriverBaseNameW]
+ end;
+end;
+
+var
+ _GetDeviceDriverBaseName: Pointer;
+
+function GetDeviceDriverBaseName;
+begin
+ GetProcedureAddress(_GetDeviceDriverBaseName, PsapiLib, 'GetDeviceDriverBaseName' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetDeviceDriverBaseName]
+ end;
+end;
+
+var
+ _GetDeviceDriverFileNameA: Pointer;
+
+function GetDeviceDriverFileNameA;
+begin
+ GetProcedureAddress(_GetDeviceDriverFileNameA, PsapiLib, 'GetDeviceDriverFileNameA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetDeviceDriverFileNameA]
+ end;
+end;
+
+var
+ _GetDeviceDriverFileNameW: Pointer;
+
+function GetDeviceDriverFileNameW;
+begin
+ GetProcedureAddress(_GetDeviceDriverFileNameW, PsapiLib, 'GetDeviceDriverFileNameW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetDeviceDriverFileNameW]
+ end;
+end;
+
+var
+ _GetDeviceDriverFileName: Pointer;
+
+function GetDeviceDriverFileName;
+begin
+ GetProcedureAddress(_GetDeviceDriverFileName, PsapiLib, 'GetDeviceDriverFileName' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetDeviceDriverFileName]
+ end;
+end;
+
+var
+ _GetProcessMemoryInfo: Pointer;
+
+function GetProcessMemoryInfo;
+begin
+ GetProcedureAddress(_GetProcessMemoryInfo, PsapiLib, 'GetProcessMemoryInfo');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetProcessMemoryInfo]
+ end;
+end;
+
+var
+ _GetPerformanceInfo: Pointer;
+
+function GetPerformanceInfo;
+begin
+ GetProcedureAddress(_GetPerformanceInfo, PsapiLib, 'GetPerformanceInfo');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetPerformanceInfo]
+ end;
+end;
+
+var
+ _EnumPageFilesW: Pointer;
+
+function EnumPageFilesW;
+begin
+ GetProcedureAddress(_EnumPageFilesW, PsapiLib, 'EnumPageFilesA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_EnumPageFilesW]
+ end;
+end;
+
+var
+ _EnumPageFilesA: Pointer;
+
+function EnumPageFilesA;
+begin
+ GetProcedureAddress(_EnumPageFilesA, PsapiLib, 'EnumPageFilesW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_EnumPageFilesA]
+ end;
+end;
+
+var
+ _EnumPageFiles: Pointer;
+
+function EnumPageFiles;
+begin
+ GetProcedureAddress(_EnumPageFiles, PsapiLib, 'EnumPageFiles' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_EnumPageFiles]
+ end;
+end;
+
+var
+ _GetProcessImageFileNameA: Pointer;
+
+function GetProcessImageFileNameA;
+begin
+ GetProcedureAddress(_GetProcessImageFileNameA, PsapiLib, 'GetProcessImageFileNameA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetProcessImageFileNameA]
+ end;
+end;
+
+var
+ _GetProcessImageFileNameW: Pointer;
+
+function GetProcessImageFileNameW;
+begin
+ GetProcedureAddress(_GetProcessImageFileNameW, PsapiLib, 'GetProcessImageFileNameW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetProcessImageFileNameW]
+ end;
+end;
+
+var
+ _GetProcessImageFileName: Pointer;
+
+function GetProcessImageFileName;
+begin
+ GetProcedureAddress(_GetProcessImageFileName, PsapiLib, 'GetProcessImageFileName' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetProcessImageFileName]
+ end;
+end;
+
+{$ELSE}
+
+function EnumProcesses; external PsapiLib name 'EnumProcesses';
+function EnumProcessModules; external PsapiLib name 'EnumProcessModules';
+function GetModuleBaseNameA; external PsapiLib name 'GetModuleBaseNameA';
+function GetModuleBaseNameW; external PsapiLib name 'GetModuleBaseNameW';
+function GetModuleBaseName; external PsapiLib name 'GetModuleBaseName' + AWSuffix;
+function GetModuleFileNameExA; external PsapiLib name 'GetModuleFileNameExA';
+function GetModuleFileNameExW; external PsapiLib name 'GetModuleFileNameExW';
+function GetModuleFileNameEx; external PsapiLib name 'GetModuleFileNameEx' + AWSuffix;
+function GetModuleInformation; external PsapiLib name 'GetModuleInformation';
+function EmptyWorkingSet; external PsapiLib name 'EmptyWorkingSet';
+function QueryWorkingSet; external PsapiLib name 'QueryWorkingSet';
+function InitializeProcessForWsWatch; external PsapiLib name 'InitializeProcessForWsWatch';
+function GetWsChanges; external PsapiLib name 'GetWsChanges';
+function GetMappedFileNameW; external PsapiLib name 'GetMappedFileNameW';
+function GetMappedFileNameA; external PsapiLib name 'GetMappedFileNameA';
+function GetMappedFileName; external PsapiLib name 'GetMappedFileName' + AWSuffix;
+function EnumDeviceDrivers; external PsapiLib name 'EnumDeviceDrivers';
+function GetDeviceDriverBaseNameA; external PsapiLib name 'GetDeviceDriverBaseNameA';
+function GetDeviceDriverBaseNameW; external PsapiLib name 'GetDeviceDriverBaseNameW';
+function GetDeviceDriverBaseName; external PsapiLib name 'GetDeviceDriverBaseName' + AWSuffix;
+function GetDeviceDriverFileNameA; external PsapiLib name 'GetDeviceDriverFileNameA';
+function GetDeviceDriverFileNameW; external PsapiLib name 'GetDeviceDriverFileNameW';
+function GetDeviceDriverFileName; external PsapiLib name 'GetDeviceDriverFileName' + AWSuffix;
+function GetProcessMemoryInfo; external PsapiLib name 'GetProcessMemoryInfo';
+function GetPerformanceInfo; external PsapiLib name 'GetPerformanceInfo';
+function EnumPageFilesW; external PsapiLib name 'EnumPageFilesA';
+function EnumPageFilesA; external PsapiLib name 'EnumPageFilesW';
+function EnumPageFiles; external PsapiLib name 'EnumPageFiles' + AWSuffix;
+function GetProcessImageFileNameA; external PsapiLib name 'GetProcessImageFileNameA';
+function GetProcessImageFileNameW; external PsapiLib name 'GetProcessImageFileNameW';
+function GetProcessImageFileName; external PsapiLib name 'GetProcessImageFileName' + AWSuffix;
+
+{$ENDIF DYNAMIC_LINK}
+
+end.
diff --git a/packages/extra/winunits/jwaqos.pas b/packages/extra/winunits/jwaqos.pas
index 9322aba82e..91a2cb705d 100644
--- a/packages/extra/winunits/jwaqos.pas
+++ b/packages/extra/winunits/jwaqos.pas
@@ -1,286 +1,286 @@
-{******************************************************************************}
-{ }
-{ Winsock2 Quality Of Service API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: qos.h, released June 2000. The original Pascal }
-{ code is: Qos.pas, released December 2000. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwaqos.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaQos;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "qos.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaWinType;
-
-type
- ULONG = Cardinal;
- {$NODEFINE ULONG}
-
-//
-// Definitions for valued-based Service Type for each direction of data flow.
-//
-
-type
- SERVICETYPE = ULONG;
- {$EXTERNALSYM SERVICETYPE}
- TServiceType = SERVICETYPE;
- PServiceType = ^TServiceType;
-
-const
- SERVICETYPE_NOTRAFFIC = $00000000; // No data in this direction
- {$EXTERNALSYM SERVICETYPE_NOTRAFFIC}
- SERVICETYPE_BESTEFFORT = $00000001; // Best Effort
- {$EXTERNALSYM SERVICETYPE_BESTEFFORT}
- SERVICETYPE_CONTROLLEDLOAD = $00000002; // Controlled Load
- {$EXTERNALSYM SERVICETYPE_CONTROLLEDLOAD}
- SERVICETYPE_GUARANTEED = $00000003; // Guaranteed
- {$EXTERNALSYM SERVICETYPE_GUARANTEED}
- SERVICETYPE_NETWORK_UNAVAILABLE = $00000004; // Used to notify change to user
- {$EXTERNALSYM SERVICETYPE_NETWORK_UNAVAILABLE}
- SERVICETYPE_GENERAL_INFORMATION = $00000005; // corresponds to "General Parameters" defined by IntServ
- {$EXTERNALSYM SERVICETYPE_GENERAL_INFORMATION}
- SERVICETYPE_NOCHANGE = $00000006; // used to indicate that the flow spec contains no change from any previous one
- {$EXTERNALSYM SERVICETYPE_NOCHANGE}
- SERVICETYPE_NONCONFORMING = $00000009; // Non-Conforming Traffic
- {$EXTERNALSYM SERVICETYPE_NONCONFORMING}
- SERVICETYPE_NETWORK_CONTROL = $0000000A; // Network Control traffic
- {$EXTERNALSYM SERVICETYPE_NETWORK_CONTROL}
- SERVICETYPE_QUALITATIVE = $0000000D; // Qualitative applications
- {$EXTERNALSYM SERVICETYPE_QUALITATIVE}
-
-// ********* The usage of these is currently not supported. ***************
-
- SERVICE_BESTEFFORT = DWORD($80010000);
- {$EXTERNALSYM SERVICE_BESTEFFORT}
- SERVICE_CONTROLLEDLOAD = DWORD($80020000);
- {$EXTERNALSYM SERVICE_CONTROLLEDLOAD}
- SERVICE_GUARANTEED = DWORD($80040000);
- {$EXTERNALSYM SERVICE_GUARANTEED}
- SERVICE_QUALITATIVE = DWORD($80200000);
- {$EXTERNALSYM SERVICE_QUALITATIVE}
-
-// ***************************** ***** ************************************
-
-//
-// Flags to control the usage of RSVP on this flow.
-//
-
-//
-// to turn off traffic control, 'OR' ( | ) this flag with the
-// ServiceType field in the FLOWSPEC
-//
-
- SERVICE_NO_TRAFFIC_CONTROL = DWORD($81000000);
- {$EXTERNALSYM SERVICE_NO_TRAFFIC_CONTROL}
-
-//
-// this flag can be used to prevent any rsvp signaling messages from being
-// sent. Local traffic control will be invoked, but no RSVP Path messages
-// will be sent.This flag can also be used in conjunction with a receiving
-// flowspec to suppress the automatic generation of a Reserve message.
-// The application would receive notification that a Path message had arrived
-// and would then need to alter the QOS by issuing WSAIoctl( SIO_SET_QOS ),
-// to unset this flag and thereby causing Reserve messages to go out.
-//
-
- SERVICE_NO_QOS_SIGNALING = $40000000;
- {$EXTERNALSYM SERVICE_NO_QOS_SIGNALING}
-
-//
-// Flow Specifications for each direction of data flow.
-//
-
-type
- _flowspec = record
- TokenRate: ULONG; // In Bytes/sec
- TokenBucketSize: ULONG; // In Bytes
- PeakBandwidth: ULONG; // In Bytes/sec
- Latency: ULONG; // In microseconds
- DelayVariation: ULONG; // In microseconds
- ServiceType: SERVICETYPE;
- MaxSduSize: ULONG; // In Bytes
- MinimumPolicedSize: ULONG; // In Bytes
- end;
- {$EXTERNALSYM _flowspec}
- FLOWSPEC = _flowspec;
- {$EXTERNALSYM FLOWSPEC}
- PFLOWSPEC = ^FLOWSPEC;
- {$EXTERNALSYM PFLOWSPEC}
- LPFLOWSPEC = ^FLOWSPEC;
- {$EXTERNALSYM LPFLOWSPEC}
- TFlowSpec = FLOWSPEC;
-
-//
-// this value can be used in the FLOWSPEC structure to instruct the Rsvp Service
-// provider to derive the appropriate default value for the parameter. Note
-// that not all values in the FLOWSPEC structure can be defaults. In the
-// ReceivingFlowspec, all parameters can be defaulted except the ServiceType.
-// In the SendingFlowspec, the MaxSduSize and MinimumPolicedSize can be
-// defaulted. Other defaults may be possible. Refer to the appropriate
-// documentation.
-//
-
-const
- QOS_NOT_SPECIFIED = DWORD($FFFFFFFF);
- {$EXTERNALSYM QOS_NOT_SPECIFIED}
-
-//
-// define a value that can be used for the PeakBandwidth, which will map into
-// positive infinity when the FLOWSPEC is converted into IntServ floating point
-// format. We can't use (-1) because that value was previously defined to mean
-// "select the default".
-//
-
- POSITIVE_INFINITY_RATE = DWORD($FFFFFFFE);
- {$EXTERNALSYM POSITIVE_INFINITY_RATE}
-
-//
-// the provider specific structure can have a number of objects in it.
-// Each next structure in the
-// ProviderSpecific will be the QOS_OBJECT_HDR struct that prefaces the actual
-// data with a type and length for that object. This QOS_OBJECT struct can
-// repeat several times if there are several objects. This list of objects
-// terminates either when the buffer length has been reached ( WSABUF ) or
-// an object of type QOS_END_OF_LIST is encountered.
-//
-
-type
- QOS_OBJECT_HDR = record
- ObjectType: ULONG;
- ObjectLength: ULONG; // the length of object buffer INCLUDING this header
- end;
- {$EXTERNALSYM QOS_OBJECT_HDR}
- LPQOS_OBJECT_HDR = ^QOS_OBJECT_HDR;
- {$EXTERNALSYM LPQOS_OBJECT_HDR}
- TQOSObjectHdr = QOS_OBJECT_HDR;
- PQOSObjectHdr = LPQOS_OBJECT_HDR;
-
-//
-// general QOS objects start at this offset from the base and have a range
-// of 1000
-//
-
-const
- QOS_GENERAL_ID_BASE = 2000;
- {$EXTERNALSYM QOS_GENERAL_ID_BASE}
-
- QOS_OBJECT_END_OF_LIST = $00000001 + QOS_GENERAL_ID_BASE; // QOS_End_of_list structure passed
- {$EXTERNALSYM QOS_OBJECT_END_OF_LIST}
-
- QOS_OBJECT_SD_MODE = $00000002 + QOS_GENERAL_ID_BASE; // QOS_ShapeDiscard structure passed
- {$EXTERNALSYM QOS_OBJECT_SD_MODE}
-
- QOS_OBJECT_SHAPING_RATE = $00000003 + QOS_GENERAL_ID_BASE; // QOS_ShapingRate structure
- {$EXTERNALSYM QOS_OBJECT_SHAPING_RATE}
-
- QOS_OBJECT_DESTADDR = $00000004 + QOS_GENERAL_ID_BASE; // QOS_DestAddr structure (defined in qossp.h)
- {$EXTERNALSYM QOS_OBJECT_DESTADDR}
-
-//
-// This structure is used to define the behaviour that the traffic
-// control packet shaper will apply to the flow.
-//
-// TC_NONCONF_BORROW - the flow will receive resources remaining
-// after all higher priority flows have been serviced. If a
-// TokenRate is specified, packets may be non-conforming and
-// will be demoted to less than best-effort priority.
-//
-// TC_NONCONF_SHAPE - TokenRate must be specified. Non-conforming
-// packets will be retianed in the packet shaper until they become
-// conforming.
-//
-// TC_NONCONF_DISCARD - TokenRate must be specified. Non-conforming
-// packets will be discarded.
-//
-
-type
- _QOS_SD_MODE = record
- ObjectHdr: QOS_OBJECT_HDR;
- ShapeDiscardMode: ULONG;
- end;
- {$EXTERNALSYM _QOS_SD_MODE}
- QOS_SD_MODE = _QOS_SD_MODE;
- {$EXTERNALSYM QOS_SD_MODE}
- LPQOS_SD_MODE = ^QOS_SD_MODE;
- {$EXTERNALSYM LPQOS_SD_MODE}
- TQOSSDMode = QOS_SD_MODE;
- PQOSSDMode = LPQOS_SD_MODE;
-
-const
- TC_NONCONF_BORROW = 0;
- {$EXTERNALSYM TC_NONCONF_BORROW}
- TC_NONCONF_SHAPE = 1;
- {$EXTERNALSYM TC_NONCONF_SHAPE}
- TC_NONCONF_DISCARD = 2;
- {$EXTERNALSYM TC_NONCONF_DISCARD}
- TC_NONCONF_BORROW_PLUS = 3; // not supported currently
- {$EXTERNALSYM TC_NONCONF_BORROW_PLUS}
-
-//
-// This structure allows an app to specify a prorated "average token rate" using by
-// the traffic shaper under SHAPE modehaper queue. It is expressed in bytes per sec.
-//
-// ShapingRate (bytes per sec.)
-//
-
-type
- _QOS_SHAPING_RATE = record
- ObjectHdr: QOS_OBJECT_HDR;
- ShapingRate: ULONG;
- end;
- {$EXTERNALSYM _QOS_SHAPING_RATE}
- QOS_SHAPING_RATE = _QOS_SHAPING_RATE;
- {$EXTERNALSYM QOS_SHAPING_RATE}
- LPQOS_SHAPING_RATE = ^QOS_SHAPING_RATE;
- {$EXTERNALSYM LPQOS_SHAPING_RATE}
- TQOSShapingRate = QOS_SHAPING_RATE;
- PQOSShapingRate = LPQOS_SHAPING_RATE;
-
-implementation
-
-end.
+{******************************************************************************}
+{ }
+{ Winsock2 Quality Of Service API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: qos.h, released June 2000. The original Pascal }
+{ code is: Qos.pas, released December 2000. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwaqos.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaQos;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "qos.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaWinType;
+
+type
+ ULONG = Cardinal;
+ {$NODEFINE ULONG}
+
+//
+// Definitions for valued-based Service Type for each direction of data flow.
+//
+
+type
+ SERVICETYPE = ULONG;
+ {$EXTERNALSYM SERVICETYPE}
+ TServiceType = SERVICETYPE;
+ PServiceType = ^TServiceType;
+
+const
+ SERVICETYPE_NOTRAFFIC = $00000000; // No data in this direction
+ {$EXTERNALSYM SERVICETYPE_NOTRAFFIC}
+ SERVICETYPE_BESTEFFORT = $00000001; // Best Effort
+ {$EXTERNALSYM SERVICETYPE_BESTEFFORT}
+ SERVICETYPE_CONTROLLEDLOAD = $00000002; // Controlled Load
+ {$EXTERNALSYM SERVICETYPE_CONTROLLEDLOAD}
+ SERVICETYPE_GUARANTEED = $00000003; // Guaranteed
+ {$EXTERNALSYM SERVICETYPE_GUARANTEED}
+ SERVICETYPE_NETWORK_UNAVAILABLE = $00000004; // Used to notify change to user
+ {$EXTERNALSYM SERVICETYPE_NETWORK_UNAVAILABLE}
+ SERVICETYPE_GENERAL_INFORMATION = $00000005; // corresponds to "General Parameters" defined by IntServ
+ {$EXTERNALSYM SERVICETYPE_GENERAL_INFORMATION}
+ SERVICETYPE_NOCHANGE = $00000006; // used to indicate that the flow spec contains no change from any previous one
+ {$EXTERNALSYM SERVICETYPE_NOCHANGE}
+ SERVICETYPE_NONCONFORMING = $00000009; // Non-Conforming Traffic
+ {$EXTERNALSYM SERVICETYPE_NONCONFORMING}
+ SERVICETYPE_NETWORK_CONTROL = $0000000A; // Network Control traffic
+ {$EXTERNALSYM SERVICETYPE_NETWORK_CONTROL}
+ SERVICETYPE_QUALITATIVE = $0000000D; // Qualitative applications
+ {$EXTERNALSYM SERVICETYPE_QUALITATIVE}
+
+// ********* The usage of these is currently not supported. ***************
+
+ SERVICE_BESTEFFORT = DWORD($80010000);
+ {$EXTERNALSYM SERVICE_BESTEFFORT}
+ SERVICE_CONTROLLEDLOAD = DWORD($80020000);
+ {$EXTERNALSYM SERVICE_CONTROLLEDLOAD}
+ SERVICE_GUARANTEED = DWORD($80040000);
+ {$EXTERNALSYM SERVICE_GUARANTEED}
+ SERVICE_QUALITATIVE = DWORD($80200000);
+ {$EXTERNALSYM SERVICE_QUALITATIVE}
+
+// ***************************** ***** ************************************
+
+//
+// Flags to control the usage of RSVP on this flow.
+//
+
+//
+// to turn off traffic control, 'OR' ( | ) this flag with the
+// ServiceType field in the FLOWSPEC
+//
+
+ SERVICE_NO_TRAFFIC_CONTROL = DWORD($81000000);
+ {$EXTERNALSYM SERVICE_NO_TRAFFIC_CONTROL}
+
+//
+// this flag can be used to prevent any rsvp signaling messages from being
+// sent. Local traffic control will be invoked, but no RSVP Path messages
+// will be sent.This flag can also be used in conjunction with a receiving
+// flowspec to suppress the automatic generation of a Reserve message.
+// The application would receive notification that a Path message had arrived
+// and would then need to alter the QOS by issuing WSAIoctl( SIO_SET_QOS ),
+// to unset this flag and thereby causing Reserve messages to go out.
+//
+
+ SERVICE_NO_QOS_SIGNALING = $40000000;
+ {$EXTERNALSYM SERVICE_NO_QOS_SIGNALING}
+
+//
+// Flow Specifications for each direction of data flow.
+//
+
+type
+ _flowspec = record
+ TokenRate: ULONG; // In Bytes/sec
+ TokenBucketSize: ULONG; // In Bytes
+ PeakBandwidth: ULONG; // In Bytes/sec
+ Latency: ULONG; // In microseconds
+ DelayVariation: ULONG; // In microseconds
+ ServiceType: SERVICETYPE;
+ MaxSduSize: ULONG; // In Bytes
+ MinimumPolicedSize: ULONG; // In Bytes
+ end;
+ {$EXTERNALSYM _flowspec}
+ FLOWSPEC = _flowspec;
+ {$EXTERNALSYM FLOWSPEC}
+ PFLOWSPEC = ^FLOWSPEC;
+ {$EXTERNALSYM PFLOWSPEC}
+ LPFLOWSPEC = ^FLOWSPEC;
+ {$EXTERNALSYM LPFLOWSPEC}
+ TFlowSpec = FLOWSPEC;
+
+//
+// this value can be used in the FLOWSPEC structure to instruct the Rsvp Service
+// provider to derive the appropriate default value for the parameter. Note
+// that not all values in the FLOWSPEC structure can be defaults. In the
+// ReceivingFlowspec, all parameters can be defaulted except the ServiceType.
+// In the SendingFlowspec, the MaxSduSize and MinimumPolicedSize can be
+// defaulted. Other defaults may be possible. Refer to the appropriate
+// documentation.
+//
+
+const
+ QOS_NOT_SPECIFIED = DWORD($FFFFFFFF);
+ {$EXTERNALSYM QOS_NOT_SPECIFIED}
+
+//
+// define a value that can be used for the PeakBandwidth, which will map into
+// positive infinity when the FLOWSPEC is converted into IntServ floating point
+// format. We can't use (-1) because that value was previously defined to mean
+// "select the default".
+//
+
+ POSITIVE_INFINITY_RATE = DWORD($FFFFFFFE);
+ {$EXTERNALSYM POSITIVE_INFINITY_RATE}
+
+//
+// the provider specific structure can have a number of objects in it.
+// Each next structure in the
+// ProviderSpecific will be the QOS_OBJECT_HDR struct that prefaces the actual
+// data with a type and length for that object. This QOS_OBJECT struct can
+// repeat several times if there are several objects. This list of objects
+// terminates either when the buffer length has been reached ( WSABUF ) or
+// an object of type QOS_END_OF_LIST is encountered.
+//
+
+type
+ QOS_OBJECT_HDR = record
+ ObjectType: ULONG;
+ ObjectLength: ULONG; // the length of object buffer INCLUDING this header
+ end;
+ {$EXTERNALSYM QOS_OBJECT_HDR}
+ LPQOS_OBJECT_HDR = ^QOS_OBJECT_HDR;
+ {$EXTERNALSYM LPQOS_OBJECT_HDR}
+ TQOSObjectHdr = QOS_OBJECT_HDR;
+ PQOSObjectHdr = LPQOS_OBJECT_HDR;
+
+//
+// general QOS objects start at this offset from the base and have a range
+// of 1000
+//
+
+const
+ QOS_GENERAL_ID_BASE = 2000;
+ {$EXTERNALSYM QOS_GENERAL_ID_BASE}
+
+ QOS_OBJECT_END_OF_LIST = $00000001 + QOS_GENERAL_ID_BASE; // QOS_End_of_list structure passed
+ {$EXTERNALSYM QOS_OBJECT_END_OF_LIST}
+
+ QOS_OBJECT_SD_MODE = $00000002 + QOS_GENERAL_ID_BASE; // QOS_ShapeDiscard structure passed
+ {$EXTERNALSYM QOS_OBJECT_SD_MODE}
+
+ QOS_OBJECT_SHAPING_RATE = $00000003 + QOS_GENERAL_ID_BASE; // QOS_ShapingRate structure
+ {$EXTERNALSYM QOS_OBJECT_SHAPING_RATE}
+
+ QOS_OBJECT_DESTADDR = $00000004 + QOS_GENERAL_ID_BASE; // QOS_DestAddr structure (defined in qossp.h)
+ {$EXTERNALSYM QOS_OBJECT_DESTADDR}
+
+//
+// This structure is used to define the behaviour that the traffic
+// control packet shaper will apply to the flow.
+//
+// TC_NONCONF_BORROW - the flow will receive resources remaining
+// after all higher priority flows have been serviced. If a
+// TokenRate is specified, packets may be non-conforming and
+// will be demoted to less than best-effort priority.
+//
+// TC_NONCONF_SHAPE - TokenRate must be specified. Non-conforming
+// packets will be retianed in the packet shaper until they become
+// conforming.
+//
+// TC_NONCONF_DISCARD - TokenRate must be specified. Non-conforming
+// packets will be discarded.
+//
+
+type
+ _QOS_SD_MODE = record
+ ObjectHdr: QOS_OBJECT_HDR;
+ ShapeDiscardMode: ULONG;
+ end;
+ {$EXTERNALSYM _QOS_SD_MODE}
+ QOS_SD_MODE = _QOS_SD_MODE;
+ {$EXTERNALSYM QOS_SD_MODE}
+ LPQOS_SD_MODE = ^QOS_SD_MODE;
+ {$EXTERNALSYM LPQOS_SD_MODE}
+ TQOSSDMode = QOS_SD_MODE;
+ PQOSSDMode = LPQOS_SD_MODE;
+
+const
+ TC_NONCONF_BORROW = 0;
+ {$EXTERNALSYM TC_NONCONF_BORROW}
+ TC_NONCONF_SHAPE = 1;
+ {$EXTERNALSYM TC_NONCONF_SHAPE}
+ TC_NONCONF_DISCARD = 2;
+ {$EXTERNALSYM TC_NONCONF_DISCARD}
+ TC_NONCONF_BORROW_PLUS = 3; // not supported currently
+ {$EXTERNALSYM TC_NONCONF_BORROW_PLUS}
+
+//
+// This structure allows an app to specify a prorated "average token rate" using by
+// the traffic shaper under SHAPE modehaper queue. It is expressed in bytes per sec.
+//
+// ShapingRate (bytes per sec.)
+//
+
+type
+ _QOS_SHAPING_RATE = record
+ ObjectHdr: QOS_OBJECT_HDR;
+ ShapingRate: ULONG;
+ end;
+ {$EXTERNALSYM _QOS_SHAPING_RATE}
+ QOS_SHAPING_RATE = _QOS_SHAPING_RATE;
+ {$EXTERNALSYM QOS_SHAPING_RATE}
+ LPQOS_SHAPING_RATE = ^QOS_SHAPING_RATE;
+ {$EXTERNALSYM LPQOS_SHAPING_RATE}
+ TQOSShapingRate = QOS_SHAPING_RATE;
+ PQOSShapingRate = LPQOS_SHAPING_RATE;
+
+implementation
+
+end.
diff --git a/packages/extra/winunits/jwaqosname.pas b/packages/extra/winunits/jwaqosname.pas
index 0ace2b6f6b..c0f199c975 100644
--- a/packages/extra/winunits/jwaqosname.pas
+++ b/packages/extra/winunits/jwaqosname.pas
@@ -1,107 +1,107 @@
-{******************************************************************************}
-{ }
-{ Winsock2 QOS Template Names API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: qosname.h, released June 2000. The original Pascal }
-{ code is: QosName.pas, released December 2000. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwaqosname.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaQosName;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "qosname.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- {$IFDEF USE_DELPHI_TYPES}
- Windows,
- {$ELSE}
- JwaWinType,
- {$ENDIF USE_DELPHI_TYPES}
- JwaWinSock2;
-
-// Built-in QoS Templates
-
-const
- QT_1 = 'G711';
- {$EXTERNALSYM QT_1}
- QT_2 = 'G723.1';
- {$EXTERNALSYM QT_2}
- QT_3 = 'G729';
- {$EXTERNALSYM QT_3}
- QT_4 = 'H263QCIF';
- {$EXTERNALSYM QT_4}
- QT_5 = 'H263CIF';
- {$EXTERNALSYM QT_5}
- QT_6 = 'H261QCIF';
- {$EXTERNALSYM QT_6}
- QT_7 = 'H261CIF';
- {$EXTERNALSYM QT_7}
- QT_8 = 'GSM6.10';
- {$EXTERNALSYM QT_8}
-
- WSCINSTALL_QOS_TEMPLATE = 'WSCInstallQOSTemplate';
- {$EXTERNALSYM WSCINSTALL_QOS_TEMPLATE}
- WSCREMOVE_QOS_TEMPLATE = 'WSCRemoveQOSTemplate';
- {$EXTERNALSYM WSCREMOVE_QOS_TEMPLATE}
- WPUGET_QOS_TEMPLATE = 'WPUGetQOSTemplate';
- {$EXTERNALSYM WPUGET_QOS_TEMPLATE}
-
-type
- WSC_INSTALL_QOS_TEMPLATE = function(Guid: PGUID; QosName: LPWSABUF; Qos: LPQOS): BOOL; stdcall;
- {$EXTERNALSYM WSC_INSTALL_QOS_TEMPLATE}
- TWscInstallQosTemplate = WSC_INSTALL_QOS_TEMPLATE;
-
- WSC_REMOVE_QOS_TEMPLATE = function(Guid: PGUID; QosName: LPWSABUF): BOOL; stdcall;
- {$EXTERNALSYM WSC_REMOVE_QOS_TEMPLATE}
- TWscRemoveQosTemplate = WSC_REMOVE_QOS_TEMPLATE;
-
- WPU_GET_QOS_TEMPLATE = function(Guid: PGUID; QosName: LPWSABUF; Qos: LPQOS): BOOL; stdcall;
- {$EXTERNALSYM WPU_GET_QOS_TEMPLATE}
- TWpuGetQosTemplate = WPU_GET_QOS_TEMPLATE;
-
-implementation
-
-end.
+{******************************************************************************}
+{ }
+{ Winsock2 QOS Template Names API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: qosname.h, released June 2000. The original Pascal }
+{ code is: QosName.pas, released December 2000. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwaqosname.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaQosName;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "qosname.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ {$IFDEF USE_DELPHI_TYPES}
+ Windows,
+ {$ELSE}
+ JwaWinType,
+ {$ENDIF USE_DELPHI_TYPES}
+ JwaWinSock2;
+
+// Built-in QoS Templates
+
+const
+ QT_1 = 'G711';
+ {$EXTERNALSYM QT_1}
+ QT_2 = 'G723.1';
+ {$EXTERNALSYM QT_2}
+ QT_3 = 'G729';
+ {$EXTERNALSYM QT_3}
+ QT_4 = 'H263QCIF';
+ {$EXTERNALSYM QT_4}
+ QT_5 = 'H263CIF';
+ {$EXTERNALSYM QT_5}
+ QT_6 = 'H261QCIF';
+ {$EXTERNALSYM QT_6}
+ QT_7 = 'H261CIF';
+ {$EXTERNALSYM QT_7}
+ QT_8 = 'GSM6.10';
+ {$EXTERNALSYM QT_8}
+
+ WSCINSTALL_QOS_TEMPLATE = 'WSCInstallQOSTemplate';
+ {$EXTERNALSYM WSCINSTALL_QOS_TEMPLATE}
+ WSCREMOVE_QOS_TEMPLATE = 'WSCRemoveQOSTemplate';
+ {$EXTERNALSYM WSCREMOVE_QOS_TEMPLATE}
+ WPUGET_QOS_TEMPLATE = 'WPUGetQOSTemplate';
+ {$EXTERNALSYM WPUGET_QOS_TEMPLATE}
+
+type
+ WSC_INSTALL_QOS_TEMPLATE = function(Guid: PGUID; QosName: LPWSABUF; Qos: LPQOS): BOOL; stdcall;
+ {$EXTERNALSYM WSC_INSTALL_QOS_TEMPLATE}
+ TWscInstallQosTemplate = WSC_INSTALL_QOS_TEMPLATE;
+
+ WSC_REMOVE_QOS_TEMPLATE = function(Guid: PGUID; QosName: LPWSABUF): BOOL; stdcall;
+ {$EXTERNALSYM WSC_REMOVE_QOS_TEMPLATE}
+ TWscRemoveQosTemplate = WSC_REMOVE_QOS_TEMPLATE;
+
+ WPU_GET_QOS_TEMPLATE = function(Guid: PGUID; QosName: LPWSABUF; Qos: LPQOS): BOOL; stdcall;
+ {$EXTERNALSYM WPU_GET_QOS_TEMPLATE}
+ TWpuGetQosTemplate = WPU_GET_QOS_TEMPLATE;
+
+implementation
+
+end.
diff --git a/packages/extra/winunits/jwaqospol.pas b/packages/extra/winunits/jwaqospol.pas
index dda7461ec1..1104f41dd6 100644
--- a/packages/extra/winunits/jwaqospol.pas
+++ b/packages/extra/winunits/jwaqospol.pas
@@ -1,125 +1,125 @@
-{******************************************************************************}
-{ }
-{ Winsock2 Service Policy API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: qospol.h, released June 2000. The original Pascal }
-{ code is: QosPol.pas, released December 2000. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwaqospol.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaQosPol;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "qospol.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaWinSock2;
-
-const
- PE_TYPE_APPID = 3; // policy element contains Application Identity
- {$EXTERNALSYM PE_TYPE_APPID}
-
-// Policy Location attribute carries sub application attributes
-
- PE_ATTRIB_TYPE_POLICY_LOCATOR = 1;
- {$EXTERNALSYM PE_ATTRIB_TYPE_POLICY_LOCATOR}
-
- POLICY_LOCATOR_SUB_TYPE_ASCII_DN = 1;
- {$EXTERNALSYM POLICY_LOCATOR_SUB_TYPE_ASCII_DN}
- POLICY_LOCATOR_SUB_TYPE_UNICODE_DN = 2;
- {$EXTERNALSYM POLICY_LOCATOR_SUB_TYPE_UNICODE_DN}
- POLICY_LOCATOR_SUB_TYPE_ASCII_DN_ENC = 3;
- {$EXTERNALSYM POLICY_LOCATOR_SUB_TYPE_ASCII_DN_ENC}
- POLICY_LOCATOR_SUB_TYPE_UNICODE_DN_ENC = 4;
- {$EXTERNALSYM POLICY_LOCATOR_SUB_TYPE_UNICODE_DN_ENC}
-
-// Credentials attribute carries the application identity
-
- PE_ATTRIB_TYPE_CREDENTIAL = 2;
- {$EXTERNALSYM PE_ATTRIB_TYPE_CREDENTIAL}
-
- CREDENTIAL_SUB_TYPE_ASCII_ID = 1;
- {$EXTERNALSYM CREDENTIAL_SUB_TYPE_ASCII_ID}
- CREDENTIAL_SUB_TYPE_UNICODE_ID = 2;
- {$EXTERNALSYM CREDENTIAL_SUB_TYPE_UNICODE_ID}
- CREDENTIAL_SUB_TYPE_KERBEROS_TKT = 3;
- {$EXTERNALSYM CREDENTIAL_SUB_TYPE_KERBEROS_TKT}
- CREDENTIAL_SUB_TYPE_X509_V3_CERT = 4;
- {$EXTERNALSYM CREDENTIAL_SUB_TYPE_X509_V3_CERT}
- CREDENTIAL_SUB_TYPE_PGP_CERT = 5;
- {$EXTERNALSYM CREDENTIAL_SUB_TYPE_PGP_CERT}
-
-// Identity Policy Element attribute structure
-
-type
- _IDPE_ATTR = record
- PeAttribLength: USHORT;
- PeAttribType: UCHAR; // Use the #defines from above
- PeAttribSubType: UCHAR; // Use the #defines from above
- PeAttribValue: array [0..3] of UCHAR;
- end;
- {$EXTERNALSYM _IDPE_ATTR}
- IDPE_ATTR = _IDPE_ATTR;
- {$EXTERNALSYM IDPE_ATTR}
- LPIDPE_ATTR = ^IDPE_ATTR;
- {$EXTERNALSYM LPIDPE_ATTR}
- TIDPEAttr = IDPE_ATTR;
- PIDPEAttr = LPIDPE_ATTR;
-
-const
- IDPE_ATTR_HDR_LEN = SizeOf(USHORT) + SizeOf(UCHAR) + SizeOf(UCHAR);
- {$EXTERNALSYM IDPE_ATTR_HDR_LEN}
-
-function RSVP_BYTE_MULTIPLE(X: Integer): Integer;
-{$EXTERNALSYM RSVP_BYTE_MULTIPLE}
-
-implementation
-
-function RSVP_BYTE_MULTIPLE(X: Integer): Integer;
-begin
- Result := Round(((X + 3) / 4) * 4);
-end;
-
-end.
+{******************************************************************************}
+{ }
+{ Winsock2 Service Policy API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: qospol.h, released June 2000. The original Pascal }
+{ code is: QosPol.pas, released December 2000. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwaqospol.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaQosPol;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "qospol.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaWinSock2;
+
+const
+ PE_TYPE_APPID = 3; // policy element contains Application Identity
+ {$EXTERNALSYM PE_TYPE_APPID}
+
+// Policy Location attribute carries sub application attributes
+
+ PE_ATTRIB_TYPE_POLICY_LOCATOR = 1;
+ {$EXTERNALSYM PE_ATTRIB_TYPE_POLICY_LOCATOR}
+
+ POLICY_LOCATOR_SUB_TYPE_ASCII_DN = 1;
+ {$EXTERNALSYM POLICY_LOCATOR_SUB_TYPE_ASCII_DN}
+ POLICY_LOCATOR_SUB_TYPE_UNICODE_DN = 2;
+ {$EXTERNALSYM POLICY_LOCATOR_SUB_TYPE_UNICODE_DN}
+ POLICY_LOCATOR_SUB_TYPE_ASCII_DN_ENC = 3;
+ {$EXTERNALSYM POLICY_LOCATOR_SUB_TYPE_ASCII_DN_ENC}
+ POLICY_LOCATOR_SUB_TYPE_UNICODE_DN_ENC = 4;
+ {$EXTERNALSYM POLICY_LOCATOR_SUB_TYPE_UNICODE_DN_ENC}
+
+// Credentials attribute carries the application identity
+
+ PE_ATTRIB_TYPE_CREDENTIAL = 2;
+ {$EXTERNALSYM PE_ATTRIB_TYPE_CREDENTIAL}
+
+ CREDENTIAL_SUB_TYPE_ASCII_ID = 1;
+ {$EXTERNALSYM CREDENTIAL_SUB_TYPE_ASCII_ID}
+ CREDENTIAL_SUB_TYPE_UNICODE_ID = 2;
+ {$EXTERNALSYM CREDENTIAL_SUB_TYPE_UNICODE_ID}
+ CREDENTIAL_SUB_TYPE_KERBEROS_TKT = 3;
+ {$EXTERNALSYM CREDENTIAL_SUB_TYPE_KERBEROS_TKT}
+ CREDENTIAL_SUB_TYPE_X509_V3_CERT = 4;
+ {$EXTERNALSYM CREDENTIAL_SUB_TYPE_X509_V3_CERT}
+ CREDENTIAL_SUB_TYPE_PGP_CERT = 5;
+ {$EXTERNALSYM CREDENTIAL_SUB_TYPE_PGP_CERT}
+
+// Identity Policy Element attribute structure
+
+type
+ _IDPE_ATTR = record
+ PeAttribLength: USHORT;
+ PeAttribType: UCHAR; // Use the #defines from above
+ PeAttribSubType: UCHAR; // Use the #defines from above
+ PeAttribValue: array [0..3] of UCHAR;
+ end;
+ {$EXTERNALSYM _IDPE_ATTR}
+ IDPE_ATTR = _IDPE_ATTR;
+ {$EXTERNALSYM IDPE_ATTR}
+ LPIDPE_ATTR = ^IDPE_ATTR;
+ {$EXTERNALSYM LPIDPE_ATTR}
+ TIDPEAttr = IDPE_ATTR;
+ PIDPEAttr = LPIDPE_ATTR;
+
+const
+ IDPE_ATTR_HDR_LEN = SizeOf(USHORT) + SizeOf(UCHAR) + SizeOf(UCHAR);
+ {$EXTERNALSYM IDPE_ATTR_HDR_LEN}
+
+function RSVP_BYTE_MULTIPLE(X: Integer): Integer;
+{$EXTERNALSYM RSVP_BYTE_MULTIPLE}
+
+implementation
+
+function RSVP_BYTE_MULTIPLE(X: Integer): Integer;
+begin
+ Result := Round(((X + 3) / 4) * 4);
+end;
+
+end.
diff --git a/packages/extra/winunits/jwaqossp.pas b/packages/extra/winunits/jwaqossp.pas
index c9dd4ff050..8aba7ad3dd 100644
--- a/packages/extra/winunits/jwaqossp.pas
+++ b/packages/extra/winunits/jwaqossp.pas
@@ -1,1036 +1,1036 @@
-{******************************************************************************}
-{ }
-{ Winsock2 QOS Service Provider API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: qossp.h, released August 2001. The original Pascal }
-{ code is: QosSp.pas, released December 2000. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwaqossp.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaQosSp;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "qossp.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- {$IFDEF USE_DELPHI_TYPES}
- Windows,
- {$ELSE}
- JwaWinType,
- {$ENDIF USE_DELPHI_TYPES}
- JwaWinSock2, JwaQos;
-
-(*
- * Definition of object Types
- *
- *
- * define the values for ObjectType above - RSVP Objects ids start at an
- * offset from zero to allow for ATM objects that might be defined in the
- * lower number range.
- *)
-
-const
- RSVP_OBJECT_ID_BASE = 1000;
- {$EXTERNALSYM RSVP_OBJECT_ID_BASE}
- RSVP_OBJECT_STATUS_INFO = $00000000 + RSVP_OBJECT_ID_BASE;
- {$EXTERNALSYM RSVP_OBJECT_STATUS_INFO}
- (* RSVP_STATUS_INFO structure passed *)
- RSVP_OBJECT_RESERVE_INFO = $00000001 + RSVP_OBJECT_ID_BASE;
- {$EXTERNALSYM RSVP_OBJECT_RESERVE_INFO}
- (* RSVP_RESERVE_INFO structure passed *)
- RSVP_OBJECT_ADSPEC = $00000002 + RSVP_OBJECT_ID_BASE;
- {$EXTERNALSYM RSVP_OBJECT_ADSPEC}
- (* RSVP_ADSPEC structure passed *)
- RSVP_OBJECT_POLICY_INFO = $00000003 + RSVP_OBJECT_ID_BASE;
- {$EXTERNALSYM RSVP_OBJECT_POLICY_INFO}
- (* RSVP POLICY ELEMENT(S) retrieved *)
- RSVP_OBJECT_FILTERSPEC_LIST = $00000004 + RSVP_OBJECT_ID_BASE;
- {$EXTERNALSYM RSVP_OBJECT_FILTERSPEC_LIST}
- (* RSVP SENDER LIST returned *)
-
-(*
- * IPV4 addressing for RSVP FILTERSPECS
- *)
-
-type
- _IN_ADDR_IPV4 = record
- Addr: ULONG;
- AddrBytes: array [0..3] of UCHAR;
- end;
- {$EXTERNALSYM _IN_ADDR_IPV4}
- IN_ADDR_IPV4 = _IN_ADDR_IPV4;
- {$EXTERNALSYM IN_ADDR_IPV4}
- LPIN_ADDR_IPV4 = ^IN_ADDR_IPV4;
- {$EXTERNALSYM LPIN_ADDR_IPV4}
- TInAddrIPV4 = IN_ADDR_IPV4;
- PInAddrIPV4 = LPIN_ADDR_IPV4;
-
-(*
- * IPV6 addressing for RSVP FILTERSPECS
- *)
-
- _IN_ADDR_IPV6 = record
- Addr: array [0..15] of UCHAR; //IPV6 address
- end;
- {$EXTERNALSYM _IN_ADDR_IPV6}
- IN_ADDR_IPV6 = _IN_ADDR_IPV6;
- {$EXTERNALSYM IN_ADDR_IPV6}
- LPIN_ADDR_IPV6 = ^IN_ADDR_IPV6;
- {$EXTERNALSYM LPIN_ADDR_IPV6}
- TInAddrIPV6 = IN_ADDR_IPV6;
- PInAddrIPV6 = LPIN_ADDR_IPV6;
-
- LPCIN_ADDR_IPV6 = ^IN_ADDR_IPV6;
- {$EXTERNALSYM LPCIN_ADDR_IPV6}
-
-(*
- * IPV4 addressing for RSVP FILTERSPECS
- *)
-
- LPRSVP_FILTERSPEC_V4 = ^RSVP_FILTERSPEC_V4;
- {$EXTERNALSYM LPRSVP_FILTERSPEC_V4}
- _RSVP_FILTERSPEC_V4 = record
- Address: IN_ADDR_IPV4;
- Unused: USHORT;
- Port: USHORT;
- end;
- {$EXTERNALSYM _RSVP_FILTERSPEC_V4}
- RSVP_FILTERSPEC_V4 = _RSVP_FILTERSPEC_V4;
- {$EXTERNALSYM RSVP_FILTERSPEC_V4}
- TRsvpFilterSpecV4 = RSVP_FILTERSPEC_V4;
- PRsvpFilterSpecV4 = LPRSVP_FILTERSPEC_V4;
-
- LPRSVP_FILTERSPEC_V6 = ^RSVP_FILTERSPEC_V6;
- {$EXTERNALSYM LPRSVP_FILTERSPEC_V6}
- _RSVP_FILTERSPEC_V6 = record
- Address: IN_ADDR_IPV6;
- UnUsed: USHORT;
- Port: USHORT;
- end;
- {$EXTERNALSYM _RSVP_FILTERSPEC_V6}
- RSVP_FILTERSPEC_V6 = _RSVP_FILTERSPEC_V6;
- {$EXTERNALSYM RSVP_FILTERSPEC_V6}
- TRsvpFilterSpecV6 = RSVP_FILTERSPEC_V6;
- PRsvpFilterSpecV6 = LPRSVP_FILTERSPEC_V6;
-
- LPRSVP_FILTERSPEC_V6_FLOW = ^RSVP_FILTERSPEC_V6_FLOW;
- {$EXTERNALSYM LPRSVP_FILTERSPEC_V6_FLOW}
- _RSVP_FILTERSPEC_V6_FLOW = record
- Address: IN_ADDR_IPV6;
- UnUsed: UCHAR;
- FlowLabel: array [0..2] of UCHAR;
- end;
- {$EXTERNALSYM _RSVP_FILTERSPEC_V6_FLOW}
- RSVP_FILTERSPEC_V6_FLOW = _RSVP_FILTERSPEC_V6_FLOW;
- {$EXTERNALSYM RSVP_FILTERSPEC_V6_FLOW}
- TRsvpFilterSpecV6Flow = RSVP_FILTERSPEC_V6_FLOW;
- PRsvpFilterSpecV6Flow = LPRSVP_FILTERSPEC_V6_FLOW;
-
- LPRSVP_FILTERSPEC_V4_GPI = ^RSVP_FILTERSPEC_V4_GPI;
- {$EXTERNALSYM LPRSVP_FILTERSPEC_V4_GPI}
- _RSVP_FILTERSPEC_V4_GPI = record
- Address: IN_ADDR_IPV4;
- GeneralPortId: ULONG;
- end;
- {$EXTERNALSYM _RSVP_FILTERSPEC_V4_GPI}
- RSVP_FILTERSPEC_V4_GPI = _RSVP_FILTERSPEC_V4_GPI;
- {$EXTERNALSYM RSVP_FILTERSPEC_V4_GPI}
- TRsvpFilterSpecV4Gpi = RSVP_FILTERSPEC_V4_GPI;
- PRsvpFilterSpecV4Gpi = LPRSVP_FILTERSPEC_V4_GPI;
-
- LPRSVP_FILTERSPEC_V6_GPI = ^RSVP_FILTERSPEC_V6_GPI;
- {$EXTERNALSYM LPRSVP_FILTERSPEC_V6_GPI}
- _RSVP_FILTERSPEC_V6_GPI = record
- Address: IN_ADDR_IPV6;
- GeneralPortId: ULONG;
- end;
- {$EXTERNALSYM _RSVP_FILTERSPEC_V6_GPI}
- RSVP_FILTERSPEC_V6_GPI = _RSVP_FILTERSPEC_V6_GPI;
- {$EXTERNALSYM RSVP_FILTERSPEC_V6_GPI}
- TRsvpFilterSpecV6Gpi = RSVP_FILTERSPEC_V6_GPI;
- PRsvpFilterSpecV6Gpi = LPRSVP_FILTERSPEC_V6_GPI;
-
-(*
- * FILTERSPEC TYPES used in making reservations.
- *)
-
-const
- FILTERSPECV4 = 1;
- {$EXTERNALSYM FILTERSPECV4}
- FILTERSPECV6 = 2;
- {$EXTERNALSYM FILTERSPECV6}
- FILTERSPECV6_FLOW = 3;
- {$EXTERNALSYM FILTERSPECV6_FLOW}
- FILTERSPECV4_GPI = 4;
- {$EXTERNALSYM FILTERSPECV4_GPI}
- FILTERSPECV6_GPI = 5;
- {$EXTERNALSYM FILTERSPECV6_GPI}
- FILTERSPEC_END = 6;
- {$EXTERNALSYM FILTERSPEC_END}
-
-type
- FilterType = DWORD;
- {$EXTERNALSYM FilterType}
-
-type
- LPRSVP_FILTERSPEC = ^RSVP_FILTERSPEC;
- {$EXTERNALSYM LPRSVP_FILTERSPEC}
- _RSVP_FILTERSPEC = record
- Type_: FilterType;
- case Integer of
- 0: (FilterSpecV4: RSVP_FILTERSPEC_V4);
- 1: (FilterSpecV6: RSVP_FILTERSPEC_V6);
- 2: (FilterSpecV6Flow: RSVP_FILTERSPEC_V6_FLOW);
- 3: (FilterSpecV4Gpi: RSVP_FILTERSPEC_V4_GPI);
- 4: (FilterSpecV6Gpi: RSVP_FILTERSPEC_V6_GPI);
- end;
- {$EXTERNALSYM _RSVP_FILTERSPEC}
- RSVP_FILTERSPEC = _RSVP_FILTERSPEC;
- {$EXTERNALSYM RSVP_FILTERSPEC}
- TRsvpFilterSpec = RSVP_FILTERSPEC;
- PRsvpFilterSpec = LPRSVP_FILTERSPEC;
-
-(*
- * FLOWDESCRIPTOR Structure used for specifying one or more
- * Filters per Flowspec.
- *)
-
- LPFLOWDESCRIPTOR = ^FLOWDESCRIPTOR;
- {$EXTERNALSYM LPFLOWDESCRIPTOR}
- _FLOWDESCRIPTOR = record
- FlowSpec: FLOWSPEC;
- NumFilters: ULONG;
- FilterList: LPRSVP_FILTERSPEC;
- end;
- {$EXTERNALSYM _FLOWDESCRIPTOR}
- FLOWDESCRIPTOR = _FLOWDESCRIPTOR;
- {$EXTERNALSYM FLOWDESCRIPTOR}
- TFlowDescriptor = FLOWDESCRIPTOR;
- PFlowDescriptor = LPFLOWDESCRIPTOR;
-
-(*
- * RSVP_POLICY contains undefined policy data. RSVP transports this
- * data on behalf of the Policy Control component.
- *)
-
- LPRSVP_POLICY = ^RSVP_POLICY;
- {$EXTERNALSYM LPRSVP_POLICY}
- _RSVP_POLICY = record
- Len: USHORT;
- Type_: USHORT;
- Info: array [0..4 - 1] of UCHAR;
- end;
- {$EXTERNALSYM _RSVP_POLICY}
- RSVP_POLICY = _RSVP_POLICY;
- {$EXTERNALSYM RSVP_POLICY}
- TRsvpPolicy = RSVP_POLICY;
- PRsvpPolicy = LPRSVP_POLICY;
-
- LPCRSVP_POLICY = ^RSVP_POLICY;
- {$EXTERNALSYM LPCRSVP_POLICY}
-
-const
- RSVP_POLICY_HDR_LEN = SizeOf(USHORT) + SizeOf(USHORT);
- {$EXTERNALSYM RSVP_POLICY_HDR_LEN}
-
-(*
- * RSVP_POLICY_INFO contains undefined policy element(s) retrieved from RSVP.
- *)
-
-type
- LPRSVP_POLICY_INFO = ^RSVP_POLICY_INFO;
- {$EXTERNALSYM LPRSVP_POLICY_INFO}
- _RSVP_POLICY_INFO = record
- ObjectHdr: QOS_OBJECT_HDR;
- NumPolicyElement: ULONG; // count of the number of policy elements
- PolicyElement: array [0..0] of RSVP_POLICY; // a list of the policy elements retrieved
- end;
- {$EXTERNALSYM _RSVP_POLICY_INFO}
- RSVP_POLICY_INFO = _RSVP_POLICY_INFO;
- {$EXTERNALSYM RSVP_POLICY_INFO}
- TRsvpPolicyInfo = RSVP_POLICY_INFO;
- PRsvpPolicyInfo = LPRSVP_POLICY_INFO;
-
-(*
- * RSVP_RESERVE_INFO Structure used for storing RSVP specific
- * information for fine tuning interaction via the Winsock2
- * Generic QoS API via the provider specific buffer. This structure
- * includes the QOS_OBJECT_HDR structure directly
- *)
-
- LPRSVP_RESERVE_INFO = ^RSVP_RESERVE_INFO;
- {$EXTERNALSYM LPRSVP_RESERVE_INFO}
- _RSVP_RESERVE_INFO = record
- ObjectHdr: QOS_OBJECT_HDR; // type and length of this object
- Style: ULONG; // RSVP Style (FF,WF,SE)
- ConfirmRequest: ULONG; // Non Zero for Confirm Request (receive only)
- PolicyElementList: LPRSVP_POLICY_INFO; // Points to the set of policy elements
- NumFlowDesc: ULONG; // Number of FlowDesc
- FlowDescList: LPFLOWDESCRIPTOR; // Points to the FlowDesc list
- end;
- {$EXTERNALSYM _RSVP_RESERVE_INFO}
- RSVP_RESERVE_INFO = _RSVP_RESERVE_INFO;
- {$EXTERNALSYM RSVP_RESERVE_INFO}
- TRsvpReserveInfo = RSVP_RESERVE_INFO;
- PRsvpReserveInfo = LPRSVP_RESERVE_INFO;
-
- LPCRSVP_RESERVE_INFO = ^RSVP_RESERVE_INFO;
- {$EXTERNALSYM LPCRSVP_RESERVE_INFO}
-
-(*
- * definitions for the ulStyle in the previous structure
- *)
-
-const
- RSVP_DEFAULT_STYLE = $00000000;
- {$EXTERNALSYM RSVP_DEFAULT_STYLE}
- RSVP_WILDCARD_STYLE = $00000001;
- {$EXTERNALSYM RSVP_WILDCARD_STYLE}
- RSVP_FIXED_FILTER_STYLE = $00000002;
- {$EXTERNALSYM RSVP_FIXED_FILTER_STYLE}
- RSVP_SHARED_EXPLICIT_STYLE = $00000003;
- {$EXTERNALSYM RSVP_SHARED_EXPLICIT_STYLE}
-
-(*
- * RSVP_STATUS_INFO Structure used for storing RSVP specific
- * error of status indications. This also serves as a header
- * for additional objects in the provider specific buffer when
- * interacting via Winsock2 Generic QoS API. This structure includes
- * the QOS_OBJECT_COUNT and QOS_OBJECT_HDR structures directly It is
- * expected to be the first structure in the provider specific structure
- * since it includes the QOS_OBJECT_COUNT
- *)
-
-type
- LPRSVP_STATUS_INFO = ^RSVP_STATUS_INFO;
- {$EXTERNALSYM LPRSVP_STATUS_INFO}
- _RSVP_STATUS_INFO = record
- ObjectHdr: QOS_OBJECT_HDR; // Object Hdr
- StatusCode: ULONG; // Error or Status Information see Winsock2.h
- ExtendedStatus1: ULONG; // Provider specific status extension
- ExtendedStatus2: ULONG; // Provider specific status extension
- end;
- {$EXTERNALSYM _RSVP_STATUS_INFO}
- RSVP_STATUS_INFO = _RSVP_STATUS_INFO;
- {$EXTERNALSYM RSVP_STATUS_INFO}
- TRsvpStatusInfo = RSVP_STATUS_INFO;
- PRsvpStatusInfo = LPRSVP_STATUS_INFO;
-
- LPCRSVP_STATUS_INFO = ^RSVP_STATUS_INFO;
- {$EXTERNALSYM LPCRSVP_STATUS_INFO}
-
-(*
- * QOS_DestAddr structure -- used for WSAIoctl(SIO_SET_QOS) when we
- * do not want to issue a connect for a sending socket. The destination
- * address is required so we can generate the session information for
- * RSVP signalling.
-*)
-
- LPQOS_DESTADDR = ^QOS_DESTADDR;
- {$EXTERNALSYM LPQOS_DESTADDR}
- _QOS_DESTADDR = record
- ObjectHdr: QOS_OBJECT_HDR; // Object header
- SocketAddress: PSockAddr; // Destination socket address
- SocketAddressLength: ULONG; // Length of the address structure
- end;
- {$EXTERNALSYM _QOS_DESTADDR}
- QOS_DESTADDR = _QOS_DESTADDR;
- {$EXTERNALSYM QOS_DESTADDR}
- TQosDestAddr = QOS_DESTADDR;
- PQosDestAddr = LPQOS_DESTADDR;
-
- LPCQOS_DESTADDR = ^QOS_DESTADDR;
- {$EXTERNALSYM LPCQOS_DESTADDR}
-
-(*
- * this structure defines the "General Characterization Parameters" contained in
- * the RSVP Adspec object
- *)
-
- LPAD_GENERAL_PARAMS = ^AD_GENERAL_PARAMS;
- {$EXTERNALSYM LPAD_GENERAL_PARAMS}
- _AD_GENERAL_PARAMS = record
- IntServAwareHopCount: ULONG; // number of hops that conform to
- // Integrated Services requirements *)
- PathBandwidthEstimate: ULONG; // minimum bandwidth available from
- // sender to receiver *)
- MinimumLatency: ULONG; // sum of minimum latency of the packet
- // forwarding process in routers
- // (in usec)*)
- PathMTU: ULONG; // max transmission unit end to end that
- // will not incur fragmentation *)
- Flags: ULONG; // used to hold break bits.*)
- end;
- {$EXTERNALSYM _AD_GENERAL_PARAMS}
- AD_GENERAL_PARAMS = _AD_GENERAL_PARAMS;
- {$EXTERNALSYM AD_GENERAL_PARAMS}
- TAdGeneralParams = AD_GENERAL_PARAMS;
- PAdGeneralParams = LPAD_GENERAL_PARAMS;
-
-(*
- * Minimum Latency may be set to this "undefined" value
- *)
-
-const
- INDETERMINATE_LATENCY = DWORD($FFFFFFFF);
- {$EXTERNALSYM INDETERMINATE_LATENCY}
-
-(*
- * This Flag is used to indicate the existence of a network element not
- * supporting QoS control services somewhere in the data path. If this bit
- * is set in the specific service override then it indicates that that
- * service was not supported at at least one hop.
- *)
-
- AD_FLAG_BREAK_BIT = $00000001;
- {$EXTERNALSYM AD_FLAG_BREAK_BIT}
-
-(*
- * this structure describes the Guaranteed service parameters
- *)
-
-type
- LPAD_GUARANTEED = ^AD_GUARANTEED;
- {$EXTERNALSYM LPAD_GUARANTEED}
- _AD_GUARANTEED = record
- CTotal: ULONG;
- DTotal: ULONG;
- CSum: ULONG;
- DSum: ULONG;
- end;
- {$EXTERNALSYM _AD_GUARANTEED}
- AD_GUARANTEED = _AD_GUARANTEED;
- {$EXTERNALSYM AD_GUARANTEED}
- TAdGuaranteed = AD_GUARANTEED;
- PAdGuaranteed = LPAD_GUARANTEED;
-
-(*
- * this structure describes the format of the parameter buffer that can be
- * included in the Service_Type structure below. This structure allows an
- * application to include any valid Int Serv service parameter in the Buffer
- * value, after providing the Int Serv parameter id in the ParameterId field.
- *)
-
- LPPARAM_BUFFER = ^PARAM_BUFFER;
- {$EXTERNALSYM LPPARAM_BUFFER}
- _PARAM_BUFFER = record
- ParameterId: ULONG; // Int Server parameter ID
- Length: ULONG; // total length of this structure
- // ( 8 bytes + length of Buffer )
- Buffer: array [0..1 - 1] of UCHAR; // Paramter itself
- end;
- {$EXTERNALSYM _PARAM_BUFFER}
- PARAM_BUFFER = _PARAM_BUFFER;
- {$EXTERNALSYM PARAM_BUFFER}
- TParamBuffer = PARAM_BUFFER;
- PParamBuffer = LPPARAM_BUFFER;
-
-(*
- * this structure contains the service types supported
- *)
-
- LPCONTROL_SERVICE = ^CONTROL_SERVICE;
- {$EXTERNALSYM LPCONTROL_SERVICE}
- _CONTROL_SERVICE = record
-
- //
- // the length of this entire structure including the following buffer.
- // This length value can be added to the ptr to the structure to get the ptr
- // to the next SERVICE_TYPE structure in the list, until the
- // NumberOfServices count has been exhausted.
- //
-
- Length: ULONG;
- Service: SERVICETYPE;
- Overrides: AD_GENERAL_PARAMS;
-
- //
- // service specific information ( controlled load has no service specific
- // info here )
- //
-
- case Integer of
- 0: (Guaranteed: AD_GUARANTEED);
- 1: (ParamBuffer: array [0..0] of PARAM_BUFFER); // allows for other services down the road
-
- end;
- {$EXTERNALSYM _CONTROL_SERVICE}
- CONTROL_SERVICE = _CONTROL_SERVICE;
- {$EXTERNALSYM CONTROL_SERVICE}
- TControlService = CONTROL_SERVICE;
- PControlService = LPCONTROL_SERVICE;
-
-(*
- * This structure defines the information which is carried in the Rsvp
- * Adspec. This Rsvp object typically indicates which service types are
- * available ( Controlled Load and/or Guaranteed Service ), if a non-Rsvp
- * hop has been encountered by the Path message, and the minumum MTU along
- * the path. The services array indicates which services are supported
- *)
-
- LPRSVP_ADSPEC = ^RSVP_ADSPEC;
- {$EXTERNALSYM LPRSVP_ADSPEC}
- _RSVP_ADSPEC = record
- ObjectHdr: QOS_OBJECT_HDR;
- GeneralParams: AD_GENERAL_PARAMS; // contains the general characterization paramters
- NumberOfServices: ULONG; // count of the number of services
- Services: array [0..0] of CONTROL_SERVICE; // a list of the services supported/requested
- end;
- {$EXTERNALSYM _RSVP_ADSPEC}
- RSVP_ADSPEC = _RSVP_ADSPEC;
- {$EXTERNALSYM RSVP_ADSPEC}
- TRsvpAdSpec = RSVP_ADSPEC;
- PRsvpAdSpec = LPRSVP_ADSPEC;
-
-//
-// Opcode for the SIO_CHK_QOS ioctl
-// (specific for the Microsoft QOS Service Provider
-//
-// Bascially:
-//
-// SIO_CHK_QOS = _WSAIORW(IOC_VENDOR,1)
-// = mIOC_IN | mIOC_OUT | mIOC_VENDOR | mCOMPANY | ioctl_code
-// where
-// mIOC_IN = 0x80000000
-// mIOC_OUT = 0x40000000
-// mIOC_VENDOR = 0x04000000
-// mCOMPANY = 0x18000000
-// ioctl_code = 0x00000001
-//
-// See WSAIoctl man page for details.
-//
-
-const
- mIOC_IN = DWORD($80000000);
- {$EXTERNALSYM mIOC_IN}
- mIOC_OUT = $40000000;
- {$EXTERNALSYM mIOC_OUT}
- mIOC_VENDOR = $04000000;
- {$EXTERNALSYM mIOC_VENDOR}
- mCOMPANY = $18000000;
- {$EXTERNALSYM mCOMPANY}
- ioctl_code = $00000001;
- {$EXTERNALSYM ioctl_code}
-
- SIO_CHK_QOS = mIOC_IN or mIOC_OUT or mIOC_VENDOR or mCOMPANY or ioctl_code;
- {$EXTERNALSYM SIO_CHK_QOS}
-
-//
-// The following may be specified in the input buffer
-// of the SIO_CHK_IOCTL ioctl call
-//
-
- QOSSPBASE = 50000;
- {$EXTERNALSYM QOSSPBASE}
-
- ALLOWED_TO_SEND_DATA = QOSSPBASE + 1; // query the SBM/BEST_EFFORT limit
- {$EXTERNALSYM ALLOWED_TO_SEND_DATA}
- // -- result is based on a comparison between
- // the user-specified token rate and the
- // SBM/BEST_EFFORT bandwidth parameters in
- // the system
- // -- result is a YES(1) or NO(0) answer
- // in the output buffer
-
- ABLE_TO_RECV_RSVP = QOSSPBASE + 2; // query the SBM/BEST_EFFORT limit
- {$EXTERNALSYM ABLE_TO_RECV_RSVP}
- // -- result is based on a comparison between
- // the user-specified token rate and the
- // SBM/BEST_EFFORT bandwidth parameters in
- // the system
- // -- result is a YES(1) or NO(0) answer
- // in the output buffer
-
- LINE_RATE = QOSSPBASE + 3; // query the interface capacity
- {$EXTERNALSYM LINE_RATE}
- // -- result returned in the output buffer
- // in kilo-bits per second
-
- LOCAL_TRAFFIC_CONTROL = QOSSPBASE + 4; // check if Kernel Traffic Control is available or not
- {$EXTERNALSYM LOCAL_TRAFFIC_CONTROL}
- // -- 0 if not available
- // -- 1 if avaiable
- // -- INFO_NOT_AVAILABLE if there is no way to check
-
- LOCAL_QOSABILITY = QOSSPBASE + 5; // The followings are for
- {$EXTERNALSYM LOCAL_QOSABILITY}
- // the Discovery of Local QOSability
- // -- 0 if no local QOS support
- // -- 1 if local QOS support available
- // -- INFO_NOT_AVAILABLE if there is no way to check
-
- END_TO_END_QOSABILITY = QOSSPBASE + 6; // The followings are for
- {$EXTERNALSYM END_TO_END_QOSABILITY}
- // the Discovery of End-to-End QOSability
- // -- 0 if no end-to-end QOS support
- // -- 1 if end-to-end QOS support available
- // -- INFO_NOT_AVAILABLE if there is no way to check
-
- INFO_NOT_AVAILABLE = DWORD($FFFFFFFF); // used when LINE_RATE is not known
- {$EXTERNALSYM INFO_NOT_AVAILABLE}
-
- ANY_DEST_ADDR = DWORD($FFFFFFFF); // for QOS_OBJECT_DEST_ADDR
- {$EXTERNALSYM ANY_DEST_ADDR}
-
-// The followings are for Guaranteed_Service+Latency -> ISSLOW_Traffic_Class Mapping
-
- MODERATELY_DELAY_SENSITIVE = DWORD($FFFFFFFD);
- {$EXTERNALSYM MODERATELY_DELAY_SENSITIVE}
-
- HIGHLY_DELAY_SENSITIVE = DWORD($FFFFFFFE);
- {$EXTERNALSYM HIGHLY_DELAY_SENSITIVE}
-
-//
-// QOSSP Error Code/Value
-//
-
- QOSSP_ERR_BASE = QOSSPBASE + 6000;
- {$EXTERNALSYM QOSSP_ERR_BASE}
-
-// No error
-
- GQOS_NO_ERRORCODE = 0;
- {$EXTERNALSYM GQOS_NO_ERRORCODE}
-
- GQOS_NO_ERRORVALUE = 0;
- {$EXTERNALSYM GQOS_NO_ERRORVALUE}
-
-// Unknown error
-
- GQOS_ERRORCODE_UNKNOWN = DWORD($FFFFFFFF);
- {$EXTERNALSYM GQOS_ERRORCODE_UNKNOWN}
-
- GQOS_ERRORVALUE_UNKNOWN = DWORD($FFFFFFFF);
- {$EXTERNALSYM GQOS_ERRORVALUE_UNKNOWN}
-
-// Admission (Resource) Error
-
- GQOS_NET_ADMISSION = QOSSP_ERR_BASE + 100;
- {$EXTERNALSYM GQOS_NET_ADMISSION}
-
- GQOS_OTHER = QOSSP_ERR_BASE + 100 + 1;
- {$EXTERNALSYM GQOS_OTHER}
- GQOS_DELAYBND = QOSSP_ERR_BASE + 100 + 2;
- {$EXTERNALSYM GQOS_DELAYBND}
- GQOS_BANDWIDTH = QOSSP_ERR_BASE + 100 + 3;
- {$EXTERNALSYM GQOS_BANDWIDTH}
- GQOS_MTU = QOSSP_ERR_BASE + 100 + 4;
- {$EXTERNALSYM GQOS_MTU}
- GQOS_FLOW_RATE = QOSSP_ERR_BASE + 100 + 5;
- {$EXTERNALSYM GQOS_FLOW_RATE}
- GQOS_PEAK_RATE = QOSSP_ERR_BASE + 100 + 6;
- {$EXTERNALSYM GQOS_PEAK_RATE}
- GQOS_AGG_PEAK_RATE = QOSSP_ERR_BASE + 100 + 7;
- {$EXTERNALSYM GQOS_AGG_PEAK_RATE}
-
-// Policy Error
-
- GQOS_NET_POLICY = QOSSP_ERR_BASE + 200;
- {$EXTERNALSYM GQOS_NET_POLICY}
-
- GQOS_POLICY_ERROR_UNKNOWN = QOSSP_ERR_BASE + 200 + 0;
- {$EXTERNALSYM GQOS_POLICY_ERROR_UNKNOWN}
-
- GQOS_POLICY_GLOBAL_DEF_FLOW_COUNT = QOSSP_ERR_BASE + 200 + 1;
- {$EXTERNALSYM GQOS_POLICY_GLOBAL_DEF_FLOW_COUNT}
- GQOS_POLICY_GLOBAL_GRP_FLOW_COUNT = QOSSP_ERR_BASE + 200 + 2;
- {$EXTERNALSYM GQOS_POLICY_GLOBAL_GRP_FLOW_COUNT}
- GQOS_POLICY_GLOBAL_USER_FLOW_COUNT = QOSSP_ERR_BASE + 200 + 3;
- {$EXTERNALSYM GQOS_POLICY_GLOBAL_USER_FLOW_COUNT}
- GQOS_POLICY_GLOBAL_UNK_USER_FLOW_COUNT = QOSSP_ERR_BASE + 200 + 4;
- {$EXTERNALSYM GQOS_POLICY_GLOBAL_UNK_USER_FLOW_COUNT}
- GQOS_POLICY_SUBNET_DEF_FLOW_COUNT = QOSSP_ERR_BASE + 200 + 5;
- {$EXTERNALSYM GQOS_POLICY_SUBNET_DEF_FLOW_COUNT}
- GQOS_POLICY_SUBNET_GRP_FLOW_COUNT = QOSSP_ERR_BASE + 200 + 6;
- {$EXTERNALSYM GQOS_POLICY_SUBNET_GRP_FLOW_COUNT}
- GQOS_POLICY_SUBNET_USER_FLOW_COUNT = QOSSP_ERR_BASE + 200 + 7;
- {$EXTERNALSYM GQOS_POLICY_SUBNET_USER_FLOW_COUNT}
- GQOS_POLICY_SUBNET_UNK_USER_FLOW_COUNT = QOSSP_ERR_BASE + 200 + 8;
- {$EXTERNALSYM GQOS_POLICY_SUBNET_UNK_USER_FLOW_COUNT}
-
- GQOS_POLICY_GLOBAL_DEF_FLOW_DURATION = QOSSP_ERR_BASE + 200 + 9;
- {$EXTERNALSYM GQOS_POLICY_GLOBAL_DEF_FLOW_DURATION}
- GQOS_POLICY_GLOBAL_GRP_FLOW_DURATION = QOSSP_ERR_BASE + 200 + 10;
- {$EXTERNALSYM GQOS_POLICY_GLOBAL_GRP_FLOW_DURATION}
- GQOS_POLICY_GLOBAL_USER_FLOW_DURATION = QOSSP_ERR_BASE + 200 + 11;
- {$EXTERNALSYM GQOS_POLICY_GLOBAL_USER_FLOW_DURATION}
- GQOS_POLICY_GLOBAL_UNK_USER_FLOW_DURATION = QOSSP_ERR_BASE + 200 + 12;
- {$EXTERNALSYM GQOS_POLICY_GLOBAL_UNK_USER_FLOW_DURATION}
- GQOS_POLICY_SUBNET_DEF_FLOW_DURATION = QOSSP_ERR_BASE + 200 + 13;
- {$EXTERNALSYM GQOS_POLICY_SUBNET_DEF_FLOW_DURATION}
- GQOS_POLICY_SUBNET_GRP_FLOW_DURATION = QOSSP_ERR_BASE + 200 + 14;
- {$EXTERNALSYM GQOS_POLICY_SUBNET_GRP_FLOW_DURATION}
- GQOS_POLICY_SUBNET_USER_FLOW_DURATION = QOSSP_ERR_BASE + 200 + 15;
- {$EXTERNALSYM GQOS_POLICY_SUBNET_USER_FLOW_DURATION}
- GQOS_POLICY_SUBNET_UNK_USER_FLOW_DURATION = QOSSP_ERR_BASE + 200 + 16;
- {$EXTERNALSYM GQOS_POLICY_SUBNET_UNK_USER_FLOW_DURATION}
-
- GQOS_POLICY_GLOBAL_DEF_FLOW_RATE = QOSSP_ERR_BASE + 200 + 17;
- {$EXTERNALSYM GQOS_POLICY_GLOBAL_DEF_FLOW_RATE}
- GQOS_POLICY_GLOBAL_GRP_FLOW_RATE = QOSSP_ERR_BASE + 200 + 18;
- {$EXTERNALSYM GQOS_POLICY_GLOBAL_GRP_FLOW_RATE}
- GQOS_POLICY_GLOBAL_USER_FLOW_RATE = QOSSP_ERR_BASE + 200 + 19;
- {$EXTERNALSYM GQOS_POLICY_GLOBAL_USER_FLOW_RATE}
- GQOS_POLICY_GLOBAL_UNK_USER_FLOW_RATE = QOSSP_ERR_BASE + 200 + 20;
- {$EXTERNALSYM GQOS_POLICY_GLOBAL_UNK_USER_FLOW_RATE}
- GQOS_POLICY_SUBNET_DEF_FLOW_RATE = QOSSP_ERR_BASE + 200 + 21;
- {$EXTERNALSYM GQOS_POLICY_SUBNET_DEF_FLOW_RATE}
- GQOS_POLICY_SUBNET_GRP_FLOW_RATE = QOSSP_ERR_BASE + 200 + 22;
- {$EXTERNALSYM GQOS_POLICY_SUBNET_GRP_FLOW_RATE}
- GQOS_POLICY_SUBNET_USER_FLOW_RATE = QOSSP_ERR_BASE + 200 + 23;
- {$EXTERNALSYM GQOS_POLICY_SUBNET_USER_FLOW_RATE}
- GQOS_POLICY_SUBNET_UNK_USER_FLOW_RATE = QOSSP_ERR_BASE + 200 + 24;
- {$EXTERNALSYM GQOS_POLICY_SUBNET_UNK_USER_FLOW_RATE}
-
- GQOS_POLICY_GLOBAL_DEF_PEAK_RATE = QOSSP_ERR_BASE + 200 + 25;
- {$EXTERNALSYM GQOS_POLICY_GLOBAL_DEF_PEAK_RATE}
- GQOS_POLICY_GLOBAL_GRP_PEAK_RATE = QOSSP_ERR_BASE + 200 + 26;
- {$EXTERNALSYM GQOS_POLICY_GLOBAL_GRP_PEAK_RATE}
- GQOS_POLICY_GLOBAL_USER_PEAK_RATE = QOSSP_ERR_BASE + 200 + 27;
- {$EXTERNALSYM GQOS_POLICY_GLOBAL_USER_PEAK_RATE}
- GQOS_POLICY_GLOBAL_UNK_USER_PEAK_RATE = QOSSP_ERR_BASE + 200 + 28;
- {$EXTERNALSYM GQOS_POLICY_GLOBAL_UNK_USER_PEAK_RATE}
- GQOS_POLICY_SUBNET_DEF_PEAK_RATE = QOSSP_ERR_BASE + 200 + 29;
- {$EXTERNALSYM GQOS_POLICY_SUBNET_DEF_PEAK_RATE}
- GQOS_POLICY_SUBNET_GRP_PEAK_RATE = QOSSP_ERR_BASE + 200 + 30;
- {$EXTERNALSYM GQOS_POLICY_SUBNET_GRP_PEAK_RATE}
- GQOS_POLICY_SUBNET_USER_PEAK_RATE = QOSSP_ERR_BASE + 200 + 31;
- {$EXTERNALSYM GQOS_POLICY_SUBNET_USER_PEAK_RATE}
- GQOS_POLICY_SUBNET_UNK_USER_PEAK_RATE = QOSSP_ERR_BASE + 200 + 32;
- {$EXTERNALSYM GQOS_POLICY_SUBNET_UNK_USER_PEAK_RATE}
-
- GQOS_POLICY_GLOBAL_DEF_SUM_FLOW_RATE = QOSSP_ERR_BASE + 200 + 33;
- {$EXTERNALSYM GQOS_POLICY_GLOBAL_DEF_SUM_FLOW_RATE}
- GQOS_POLICY_GLOBAL_GRP_SUM_FLOW_RATE = QOSSP_ERR_BASE + 200 + 34;
- {$EXTERNALSYM GQOS_POLICY_GLOBAL_GRP_SUM_FLOW_RATE}
- GQOS_POLICY_GLOBAL_USER_SUM_FLOW_RATE = QOSSP_ERR_BASE + 200 + 35;
- {$EXTERNALSYM GQOS_POLICY_GLOBAL_USER_SUM_FLOW_RATE}
- GQOS_POLICY_GLOBAL_UNK_USER_SUM_FLOW_RATE = QOSSP_ERR_BASE + 200 + 36;
- {$EXTERNALSYM GQOS_POLICY_GLOBAL_UNK_USER_SUM_FLOW_RATE}
- GQOS_POLICY_SUBNET_DEF_SUM_FLOW_RATE = QOSSP_ERR_BASE + 200 + 37;
- {$EXTERNALSYM GQOS_POLICY_SUBNET_DEF_SUM_FLOW_RATE}
- GQOS_POLICY_SUBNET_GRP_SUM_FLOW_RATE = QOSSP_ERR_BASE + 200 + 38;
- {$EXTERNALSYM GQOS_POLICY_SUBNET_GRP_SUM_FLOW_RATE}
- GQOS_POLICY_SUBNET_USER_SUM_FLOW_RATE = QOSSP_ERR_BASE + 200 + 39;
- {$EXTERNALSYM GQOS_POLICY_SUBNET_USER_SUM_FLOW_RATE}
- GQOS_POLICY_SUBNET_UNK_USER_SUM_FLOW_RATE = QOSSP_ERR_BASE + 200 + 40;
- {$EXTERNALSYM GQOS_POLICY_SUBNET_UNK_USER_SUM_FLOW_RATE}
-
- GQOS_POLICY_GLOBAL_DEF_SUM_PEAK_RATE = QOSSP_ERR_BASE + 200 + 41;
- {$EXTERNALSYM GQOS_POLICY_GLOBAL_DEF_SUM_PEAK_RATE}
- GQOS_POLICY_GLOBAL_GRP_SUM_PEAK_RATE = QOSSP_ERR_BASE + 200 + 42;
- {$EXTERNALSYM GQOS_POLICY_GLOBAL_GRP_SUM_PEAK_RATE}
- GQOS_POLICY_GLOBAL_USER_SUM_PEAK_RATE = QOSSP_ERR_BASE + 200 + 43;
- {$EXTERNALSYM GQOS_POLICY_GLOBAL_USER_SUM_PEAK_RATE}
- GQOS_POLICY_GLOBAL_UNK_USER_SUM_PEAK_RATE = QOSSP_ERR_BASE + 200 + 44;
- {$EXTERNALSYM GQOS_POLICY_GLOBAL_UNK_USER_SUM_PEAK_RATE}
- GQOS_POLICY_SUBNET_DEF_SUM_PEAK_RATE = QOSSP_ERR_BASE + 200 + 45;
- {$EXTERNALSYM GQOS_POLICY_SUBNET_DEF_SUM_PEAK_RATE}
- GQOS_POLICY_SUBNET_GRP_SUM_PEAK_RATE = QOSSP_ERR_BASE + 200 + 46;
- {$EXTERNALSYM GQOS_POLICY_SUBNET_GRP_SUM_PEAK_RATE}
- GQOS_POLICY_SUBNET_USER_SUM_PEAK_RATE = QOSSP_ERR_BASE + 200 + 47;
- {$EXTERNALSYM GQOS_POLICY_SUBNET_USER_SUM_PEAK_RATE}
- GQOS_POLICY_SUBNET_UNK_USER_SUM_PEAK_RATE = QOSSP_ERR_BASE + 200 + 48;
- {$EXTERNALSYM GQOS_POLICY_SUBNET_UNK_USER_SUM_PEAK_RATE}
-
- GQOS_POLICY_UNKNOWN_USER = QOSSP_ERR_BASE + 200 + 49;
- {$EXTERNALSYM GQOS_POLICY_UNKNOWN_USER}
- GQOS_POLICY_NO_PRIVILEGES = QOSSP_ERR_BASE + 200 + 50;
- {$EXTERNALSYM GQOS_POLICY_NO_PRIVILEGES}
- GQOS_POLICY_EXPIRED_USER_TOKEN = QOSSP_ERR_BASE + 200 + 51;
- {$EXTERNALSYM GQOS_POLICY_EXPIRED_USER_TOKEN}
- GQOS_POLICY_NO_RESOURCES = QOSSP_ERR_BASE + 200 + 52;
- {$EXTERNALSYM GQOS_POLICY_NO_RESOURCES}
- GQOS_POLICY_PRE_EMPTED = QOSSP_ERR_BASE + 200 + 53;
- {$EXTERNALSYM GQOS_POLICY_PRE_EMPTED}
- GQOS_POLICY_USER_CHANGED = QOSSP_ERR_BASE + 200 + 54;
- {$EXTERNALSYM GQOS_POLICY_USER_CHANGED}
- GQOS_POLICY_NO_ACCEPTS = QOSSP_ERR_BASE + 200 + 55;
- {$EXTERNALSYM GQOS_POLICY_NO_ACCEPTS}
- GQOS_POLICY_NO_MEMORY = QOSSP_ERR_BASE + 200 + 56;
- {$EXTERNALSYM GQOS_POLICY_NO_MEMORY}
- GQOS_POLICY_CRAZY_FLOWSPEC = QOSSP_ERR_BASE + 200 + 57;
- {$EXTERNALSYM GQOS_POLICY_CRAZY_FLOWSPEC}
-
- GQOS_POLICY_NO_MORE_INFO = QOSSP_ERR_BASE + 200 + 58;
- {$EXTERNALSYM GQOS_POLICY_NO_MORE_INFO}
- GQOS_POLICY_UNSUPPORTED_CREDENTIAL_TYPE = QOSSP_ERR_BASE + 200 + 59;
- {$EXTERNALSYM GQOS_POLICY_UNSUPPORTED_CREDENTIAL_TYPE}
- GQOS_POLICY_INSUFFICIENT_PRIVILEGES = QOSSP_ERR_BASE + 200 + 60;
- {$EXTERNALSYM GQOS_POLICY_INSUFFICIENT_PRIVILEGES}
- GQOS_POLICY_EXPIRED_CREDENTIAL = QOSSP_ERR_BASE + 200 + 61;
- {$EXTERNALSYM GQOS_POLICY_EXPIRED_CREDENTIAL}
- GQOS_POLICY_IDENTITY_CHANGED = QOSSP_ERR_BASE + 200 + 62;
- {$EXTERNALSYM GQOS_POLICY_IDENTITY_CHANGED}
- GQOS_POLICY_NO_QOS_PROVIDED = QOSSP_ERR_BASE + 200 + 63;
- {$EXTERNALSYM GQOS_POLICY_NO_QOS_PROVIDED}
- GQOS_POLICY_DO_NOT_SEND = QOSSP_ERR_BASE + 200 + 64;
- {$EXTERNALSYM GQOS_POLICY_DO_NOT_SEND}
-
- GQOS_POLICY_ERROR_USERID = QOSSP_ERR_BASE + 200 + 99;
- {$EXTERNALSYM GQOS_POLICY_ERROR_USERID}
-
-// RSVP Error
-
- GQOS_RSVP = QOSSP_ERR_BASE + 300;
- {$EXTERNALSYM GQOS_RSVP}
-
- GQOS_NO_PATH = QOSSP_ERR_BASE + 300 + 1;
- {$EXTERNALSYM GQOS_NO_PATH}
- GQOS_NO_SENDER = QOSSP_ERR_BASE + 300 + 2;
- {$EXTERNALSYM GQOS_NO_SENDER}
- GQOS_BAD_STYLE = QOSSP_ERR_BASE + 300 + 3;
- {$EXTERNALSYM GQOS_BAD_STYLE}
- GQOS_UNKNOWN_STYLE = QOSSP_ERR_BASE + 300 + 4;
- {$EXTERNALSYM GQOS_UNKNOWN_STYLE}
- GQOS_BAD_DSTPORT = QOSSP_ERR_BASE + 300 + 5;
- {$EXTERNALSYM GQOS_BAD_DSTPORT}
- GQOS_BAD_SNDPORT = QOSSP_ERR_BASE + 300 + 6;
- {$EXTERNALSYM GQOS_BAD_SNDPORT}
- GQOS_AMBIG_FILTER = QOSSP_ERR_BASE + 300 + 7;
- {$EXTERNALSYM GQOS_AMBIG_FILTER}
- GQOS_PREEMPTED = QOSSP_ERR_BASE + 300 + 8;
- {$EXTERNALSYM GQOS_PREEMPTED}
- GQOS_UNKN_OBJ_CLASS = QOSSP_ERR_BASE + 300 + 9;
- {$EXTERNALSYM GQOS_UNKN_OBJ_CLASS}
- GQOS_UNKNOWN_CTYPE = QOSSP_ERR_BASE + 300 + 10;
- {$EXTERNALSYM GQOS_UNKNOWN_CTYPE}
- GQOS_INVALID = QOSSP_ERR_BASE + 300 + 11;
- {$EXTERNALSYM GQOS_INVALID}
-
-// API Error
-
- GQOS_API = QOSSP_ERR_BASE + 400;
- {$EXTERNALSYM GQOS_API}
-
- GQOS_API_BADSEND = QOSSP_ERR_BASE + 400 + 1; (* Sender addr not my interface *)
- {$EXTERNALSYM GQOS_API_BADSEND}
- GQOS_API_BADRECV = QOSSP_ERR_BASE + 400 + 2; (* Recv addr not my interface *)
- {$EXTERNALSYM GQOS_API_BADRECV}
- GQOS_API_BADSPORT = QOSSP_ERR_BASE + 400 + 3; (* Sport !=0 but Dport == 0 *)
- {$EXTERNALSYM GQOS_API_BADSPORT}
-
-// TC System Error
-
- GQOS_KERNEL_TC_SYS = QOSSP_ERR_BASE + 500;
- {$EXTERNALSYM GQOS_KERNEL_TC_SYS}
-
- GQOS_TC_GENERIC = QOSSP_ERR_BASE + 500 + 1;
- {$EXTERNALSYM GQOS_TC_GENERIC}
- GQOS_TC_INVALID = QOSSP_ERR_BASE + 500 + 2;
- {$EXTERNALSYM GQOS_TC_INVALID}
- GQOS_NO_MEMORY = QOSSP_ERR_BASE + 500 + 3;
- {$EXTERNALSYM GQOS_NO_MEMORY}
- GQOS_BAD_ADDRESSTYPE = QOSSP_ERR_BASE + 500 + 4;
- {$EXTERNALSYM GQOS_BAD_ADDRESSTYPE}
- GQOS_BAD_DUPLICATE = QOSSP_ERR_BASE + 500 + 5;
- {$EXTERNALSYM GQOS_BAD_DUPLICATE}
- GQOS_CONFLICT = QOSSP_ERR_BASE + 500 + 6;
- {$EXTERNALSYM GQOS_CONFLICT}
- GQOS_NOTREADY = QOSSP_ERR_BASE + 500 + 7;
- {$EXTERNALSYM GQOS_NOTREADY}
- GQOS_WOULDBLOCK = QOSSP_ERR_BASE + 500 + 8;
- {$EXTERNALSYM GQOS_WOULDBLOCK}
- GQOS_INCOMPATIBLE = QOSSP_ERR_BASE + 500 + 9;
- {$EXTERNALSYM GQOS_INCOMPATIBLE}
- GQOS_BAD_SDMODE = QOSSP_ERR_BASE + 500 + 10;
- {$EXTERNALSYM GQOS_BAD_SDMODE}
- GQOS_BAD_QOSPRIORITY = QOSSP_ERR_BASE + 500 + 11;
- {$EXTERNALSYM GQOS_BAD_QOSPRIORITY}
- GQOS_BAD_TRAFFICCLASS = QOSSP_ERR_BASE + 500 + 12;
- {$EXTERNALSYM GQOS_BAD_TRAFFICCLASS}
- GQOS_NO_SYS_RESOURCES = QOSSP_ERR_BASE + 500 + 13;
- {$EXTERNALSYM GQOS_NO_SYS_RESOURCES}
-
-// RSVP System Error
-
- GQOS_RSVP_SYS = QOSSP_ERR_BASE + 600;
- {$EXTERNALSYM GQOS_RSVP_SYS}
-
- GQOS_OTHER_SYS = QOSSP_ERR_BASE + 600 + 1;
- {$EXTERNALSYM GQOS_OTHER_SYS}
- GQOS_MEMORY_SYS = QOSSP_ERR_BASE + 600 + 2;
- {$EXTERNALSYM GQOS_MEMORY_SYS}
- GQOS_API_SYS = QOSSP_ERR_BASE + 600 + 3;
- {$EXTERNALSYM GQOS_API_SYS}
- GQOS_SETQOS_NO_LOCAL_APPS = QOSSP_ERR_BASE + 600 + 4;
- {$EXTERNALSYM GQOS_SETQOS_NO_LOCAL_APPS}
-
-// TC Error
-
- GQOS_KERNEL_TC = QOSSP_ERR_BASE + 700;
- {$EXTERNALSYM GQOS_KERNEL_TC}
-
- GQOS_CONFLICT_SERV = QOSSP_ERR_BASE + 700 + 1;
- {$EXTERNALSYM GQOS_CONFLICT_SERV}
- GQOS_NO_SERV = QOSSP_ERR_BASE + 700 + 2;
- {$EXTERNALSYM GQOS_NO_SERV}
- GQOS_BAD_FLOWSPEC = QOSSP_ERR_BASE + 700 + 3;
- {$EXTERNALSYM GQOS_BAD_FLOWSPEC}
- GQOS_BAD_TSPEC = QOSSP_ERR_BASE + 700 + 4;
- {$EXTERNALSYM GQOS_BAD_TSPEC}
- GQOS_BAD_ADSPEC = QOSSP_ERR_BASE + 700 + 5;
- {$EXTERNALSYM GQOS_BAD_ADSPEC}
-
-// GQOS API ERRORS
-
-// WSAIoctl Error
-
- GQOS_IOCTL_SYSTEMFAILURE = QOSSP_ERR_BASE + 800 + 1;
- {$EXTERNALSYM GQOS_IOCTL_SYSTEMFAILURE}
- GQOS_IOCTL_NOBYTESRETURNED = QOSSP_ERR_BASE + 800 + 2;
- {$EXTERNALSYM GQOS_IOCTL_NOBYTESRETURNED}
- GQOS_IOCTL_INVALIDSOCKET = QOSSP_ERR_BASE + 800 + 3;
- {$EXTERNALSYM GQOS_IOCTL_INVALIDSOCKET}
- GQOS_IOCTL_INV_FUNCPTR = QOSSP_ERR_BASE + 800 + 4;
- {$EXTERNALSYM GQOS_IOCTL_INV_FUNCPTR}
- GQOS_IOCTL_INV_OVERLAPPED = QOSSP_ERR_BASE + 800 + 5;
- {$EXTERNALSYM GQOS_IOCTL_INV_OVERLAPPED}
-
-// SIO_SET_QOS error
-
- GQOS_SETQOS_BADINBUFFER = QOSSP_ERR_BASE + 810 + 1;
- {$EXTERNALSYM GQOS_SETQOS_BADINBUFFER}
- GQOS_SETQOS_BADFLOWSPEC = QOSSP_ERR_BASE + 810 + 2;
- {$EXTERNALSYM GQOS_SETQOS_BADFLOWSPEC}
- GQOS_SETQOS_COLLISION = QOSSP_ERR_BASE + 810 + 3;
- {$EXTERNALSYM GQOS_SETQOS_COLLISION}
- GQOS_SETQOS_BADPROVSPECBUF = QOSSP_ERR_BASE + 810 + 4;
- {$EXTERNALSYM GQOS_SETQOS_BADPROVSPECBUF}
- GQOS_SETQOS_ILLEGALOP = QOSSP_ERR_BASE + 810 + 5;
- {$EXTERNALSYM GQOS_SETQOS_ILLEGALOP}
- GQOS_SETQOS_INVALIDADDRESS = QOSSP_ERR_BASE + 810 + 6;
- {$EXTERNALSYM GQOS_SETQOS_INVALIDADDRESS}
- GQOS_SETQOS_OUTOFMEMORY = QOSSP_ERR_BASE + 810 + 7;
- {$EXTERNALSYM GQOS_SETQOS_OUTOFMEMORY}
- GQOS_SETQOS_EXCEPTION = QOSSP_ERR_BASE + 810 + 8;
- {$EXTERNALSYM GQOS_SETQOS_EXCEPTION}
- GQOS_SETQOS_BADADDRLEN = QOSSP_ERR_BASE + 810 + 9;
- {$EXTERNALSYM GQOS_SETQOS_BADADDRLEN}
- GQOS_SETQOS_NOSOCKNAME = QOSSP_ERR_BASE + 810 + 10;
- {$EXTERNALSYM GQOS_SETQOS_NOSOCKNAME}
- GQOS_SETQOS_IPTOSFAIL = QOSSP_ERR_BASE + 810 + 11;
- {$EXTERNALSYM GQOS_SETQOS_IPTOSFAIL}
- GQOS_SETQOS_OPENSESSIONFAIL = QOSSP_ERR_BASE + 810 + 12;
- {$EXTERNALSYM GQOS_SETQOS_OPENSESSIONFAIL}
- GQOS_SETQOS_SENDFAIL = QOSSP_ERR_BASE + 810 + 13;
- {$EXTERNALSYM GQOS_SETQOS_SENDFAIL}
- GQOS_SETQOS_RECVFAIL = QOSSP_ERR_BASE + 810 + 14;
- {$EXTERNALSYM GQOS_SETQOS_RECVFAIL}
- GQOS_SETQOS_BADPOLICYOBJECT = QOSSP_ERR_BASE + 810 + 15;
- {$EXTERNALSYM GQOS_SETQOS_BADPOLICYOBJECT}
- GQOS_SETQOS_UNKNOWNFILTEROBJ = QOSSP_ERR_BASE + 810 + 16;
- {$EXTERNALSYM GQOS_SETQOS_UNKNOWNFILTEROBJ}
- GQOS_SETQOS_BADFILTERTYPE = QOSSP_ERR_BASE + 810 + 17;
- {$EXTERNALSYM GQOS_SETQOS_BADFILTERTYPE}
- GQOS_SETQOS_BADFILTERCOUNT = QOSSP_ERR_BASE + 810 + 18;
- {$EXTERNALSYM GQOS_SETQOS_BADFILTERCOUNT}
- GQOS_SETQOS_BADOBJLENGTH = QOSSP_ERR_BASE + 810 + 19;
- {$EXTERNALSYM GQOS_SETQOS_BADOBJLENGTH}
- GQOS_SETQOS_BADFLOWCOUNT = QOSSP_ERR_BASE + 810 + 20;
- {$EXTERNALSYM GQOS_SETQOS_BADFLOWCOUNT}
- GQOS_SETQOS_UNKNOWNPSOBJ = QOSSP_ERR_BASE + 810 + 21;
- {$EXTERNALSYM GQOS_SETQOS_UNKNOWNPSOBJ}
- GQOS_SETQOS_BADPOLICYOBJ = QOSSP_ERR_BASE + 810 + 22;
- {$EXTERNALSYM GQOS_SETQOS_BADPOLICYOBJ}
- GQOS_SETQOS_BADFLOWDESC = QOSSP_ERR_BASE + 810 + 23;
- {$EXTERNALSYM GQOS_SETQOS_BADFLOWDESC}
- GQOS_SETQOS_BADPROVSPECOBJ = QOSSP_ERR_BASE + 810 + 24;
- {$EXTERNALSYM GQOS_SETQOS_BADPROVSPECOBJ}
- GQOS_SETQOS_NOLOOPBACK = QOSSP_ERR_BASE + 810 + 25;
- {$EXTERNALSYM GQOS_SETQOS_NOLOOPBACK}
- GQOS_SETQOS_MODENOTSUPPORTED = QOSSP_ERR_BASE + 810 + 26;
- {$EXTERNALSYM GQOS_SETQOS_MODENOTSUPPORTED}
- GQOS_SETQOS_MISSINGFLOWDESC = QOSSP_ERR_BASE + 810 + 27;
- {$EXTERNALSYM GQOS_SETQOS_MISSINGFLOWDESC}
-
-// SIO_GET_QOS error
-
- GQOS_GETQOS_BADOUTBUFFER = QOSSP_ERR_BASE + 840 + 1;
- {$EXTERNALSYM GQOS_GETQOS_BADOUTBUFFER}
- GQOS_GETQOS_SYSTEMFAILURE = QOSSP_ERR_BASE + 840 + 2;
- {$EXTERNALSYM GQOS_GETQOS_SYSTEMFAILURE}
- GQOS_GETQOS_EXCEPTION = QOSSP_ERR_BASE + 840 + 3;
- {$EXTERNALSYM GQOS_GETQOS_EXCEPTION}
- GQOS_GETQOS_INTERNALFAILURE = QOSSP_ERR_BASE + 840 + 4;
- {$EXTERNALSYM GQOS_GETQOS_INTERNALFAILURE}
-
-// SIO_CHK_QOS error
-
- GQOS_CHKQOS_BADINBUFFER = QOSSP_ERR_BASE + 850 + 1;
- {$EXTERNALSYM GQOS_CHKQOS_BADINBUFFER}
- GQOS_CHKQOS_BADOUTBUFFER = QOSSP_ERR_BASE + 850 + 2;
- {$EXTERNALSYM GQOS_CHKQOS_BADOUTBUFFER}
- GQOS_CHKQOS_SYSTEMFAILURE = QOSSP_ERR_BASE + 850 + 3;
- {$EXTERNALSYM GQOS_CHKQOS_SYSTEMFAILURE}
- GQOS_CHKQOS_INTERNALFAILURE = QOSSP_ERR_BASE + 850 + 4;
- {$EXTERNALSYM GQOS_CHKQOS_INTERNALFAILURE}
- GQOS_CHKQOS_BADPARAMETER = QOSSP_ERR_BASE + 850 + 5;
- {$EXTERNALSYM GQOS_CHKQOS_BADPARAMETER}
- GQOS_CHKQOS_EXCEPTION = QOSSP_ERR_BASE + 850 + 6;
- {$EXTERNALSYM GQOS_CHKQOS_EXCEPTION}
-
-implementation
-
-end.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+{******************************************************************************}
+{ }
+{ Winsock2 QOS Service Provider API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: qossp.h, released August 2001. The original Pascal }
+{ code is: QosSp.pas, released December 2000. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwaqossp.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaQosSp;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "qossp.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ {$IFDEF USE_DELPHI_TYPES}
+ Windows,
+ {$ELSE}
+ JwaWinType,
+ {$ENDIF USE_DELPHI_TYPES}
+ JwaWinSock2, JwaQos;
+
+(*
+ * Definition of object Types
+ *
+ *
+ * define the values for ObjectType above - RSVP Objects ids start at an
+ * offset from zero to allow for ATM objects that might be defined in the
+ * lower number range.
+ *)
+
+const
+ RSVP_OBJECT_ID_BASE = 1000;
+ {$EXTERNALSYM RSVP_OBJECT_ID_BASE}
+ RSVP_OBJECT_STATUS_INFO = $00000000 + RSVP_OBJECT_ID_BASE;
+ {$EXTERNALSYM RSVP_OBJECT_STATUS_INFO}
+ (* RSVP_STATUS_INFO structure passed *)
+ RSVP_OBJECT_RESERVE_INFO = $00000001 + RSVP_OBJECT_ID_BASE;
+ {$EXTERNALSYM RSVP_OBJECT_RESERVE_INFO}
+ (* RSVP_RESERVE_INFO structure passed *)
+ RSVP_OBJECT_ADSPEC = $00000002 + RSVP_OBJECT_ID_BASE;
+ {$EXTERNALSYM RSVP_OBJECT_ADSPEC}
+ (* RSVP_ADSPEC structure passed *)
+ RSVP_OBJECT_POLICY_INFO = $00000003 + RSVP_OBJECT_ID_BASE;
+ {$EXTERNALSYM RSVP_OBJECT_POLICY_INFO}
+ (* RSVP POLICY ELEMENT(S) retrieved *)
+ RSVP_OBJECT_FILTERSPEC_LIST = $00000004 + RSVP_OBJECT_ID_BASE;
+ {$EXTERNALSYM RSVP_OBJECT_FILTERSPEC_LIST}
+ (* RSVP SENDER LIST returned *)
+
+(*
+ * IPV4 addressing for RSVP FILTERSPECS
+ *)
+
+type
+ _IN_ADDR_IPV4 = record
+ Addr: ULONG;
+ AddrBytes: array [0..3] of UCHAR;
+ end;
+ {$EXTERNALSYM _IN_ADDR_IPV4}
+ IN_ADDR_IPV4 = _IN_ADDR_IPV4;
+ {$EXTERNALSYM IN_ADDR_IPV4}
+ LPIN_ADDR_IPV4 = ^IN_ADDR_IPV4;
+ {$EXTERNALSYM LPIN_ADDR_IPV4}
+ TInAddrIPV4 = IN_ADDR_IPV4;
+ PInAddrIPV4 = LPIN_ADDR_IPV4;
+
+(*
+ * IPV6 addressing for RSVP FILTERSPECS
+ *)
+
+ _IN_ADDR_IPV6 = record
+ Addr: array [0..15] of UCHAR; //IPV6 address
+ end;
+ {$EXTERNALSYM _IN_ADDR_IPV6}
+ IN_ADDR_IPV6 = _IN_ADDR_IPV6;
+ {$EXTERNALSYM IN_ADDR_IPV6}
+ LPIN_ADDR_IPV6 = ^IN_ADDR_IPV6;
+ {$EXTERNALSYM LPIN_ADDR_IPV6}
+ TInAddrIPV6 = IN_ADDR_IPV6;
+ PInAddrIPV6 = LPIN_ADDR_IPV6;
+
+ LPCIN_ADDR_IPV6 = ^IN_ADDR_IPV6;
+ {$EXTERNALSYM LPCIN_ADDR_IPV6}
+
+(*
+ * IPV4 addressing for RSVP FILTERSPECS
+ *)
+
+ LPRSVP_FILTERSPEC_V4 = ^RSVP_FILTERSPEC_V4;
+ {$EXTERNALSYM LPRSVP_FILTERSPEC_V4}
+ _RSVP_FILTERSPEC_V4 = record
+ Address: IN_ADDR_IPV4;
+ Unused: USHORT;
+ Port: USHORT;
+ end;
+ {$EXTERNALSYM _RSVP_FILTERSPEC_V4}
+ RSVP_FILTERSPEC_V4 = _RSVP_FILTERSPEC_V4;
+ {$EXTERNALSYM RSVP_FILTERSPEC_V4}
+ TRsvpFilterSpecV4 = RSVP_FILTERSPEC_V4;
+ PRsvpFilterSpecV4 = LPRSVP_FILTERSPEC_V4;
+
+ LPRSVP_FILTERSPEC_V6 = ^RSVP_FILTERSPEC_V6;
+ {$EXTERNALSYM LPRSVP_FILTERSPEC_V6}
+ _RSVP_FILTERSPEC_V6 = record
+ Address: IN_ADDR_IPV6;
+ UnUsed: USHORT;
+ Port: USHORT;
+ end;
+ {$EXTERNALSYM _RSVP_FILTERSPEC_V6}
+ RSVP_FILTERSPEC_V6 = _RSVP_FILTERSPEC_V6;
+ {$EXTERNALSYM RSVP_FILTERSPEC_V6}
+ TRsvpFilterSpecV6 = RSVP_FILTERSPEC_V6;
+ PRsvpFilterSpecV6 = LPRSVP_FILTERSPEC_V6;
+
+ LPRSVP_FILTERSPEC_V6_FLOW = ^RSVP_FILTERSPEC_V6_FLOW;
+ {$EXTERNALSYM LPRSVP_FILTERSPEC_V6_FLOW}
+ _RSVP_FILTERSPEC_V6_FLOW = record
+ Address: IN_ADDR_IPV6;
+ UnUsed: UCHAR;
+ FlowLabel: array [0..2] of UCHAR;
+ end;
+ {$EXTERNALSYM _RSVP_FILTERSPEC_V6_FLOW}
+ RSVP_FILTERSPEC_V6_FLOW = _RSVP_FILTERSPEC_V6_FLOW;
+ {$EXTERNALSYM RSVP_FILTERSPEC_V6_FLOW}
+ TRsvpFilterSpecV6Flow = RSVP_FILTERSPEC_V6_FLOW;
+ PRsvpFilterSpecV6Flow = LPRSVP_FILTERSPEC_V6_FLOW;
+
+ LPRSVP_FILTERSPEC_V4_GPI = ^RSVP_FILTERSPEC_V4_GPI;
+ {$EXTERNALSYM LPRSVP_FILTERSPEC_V4_GPI}
+ _RSVP_FILTERSPEC_V4_GPI = record
+ Address: IN_ADDR_IPV4;
+ GeneralPortId: ULONG;
+ end;
+ {$EXTERNALSYM _RSVP_FILTERSPEC_V4_GPI}
+ RSVP_FILTERSPEC_V4_GPI = _RSVP_FILTERSPEC_V4_GPI;
+ {$EXTERNALSYM RSVP_FILTERSPEC_V4_GPI}
+ TRsvpFilterSpecV4Gpi = RSVP_FILTERSPEC_V4_GPI;
+ PRsvpFilterSpecV4Gpi = LPRSVP_FILTERSPEC_V4_GPI;
+
+ LPRSVP_FILTERSPEC_V6_GPI = ^RSVP_FILTERSPEC_V6_GPI;
+ {$EXTERNALSYM LPRSVP_FILTERSPEC_V6_GPI}
+ _RSVP_FILTERSPEC_V6_GPI = record
+ Address: IN_ADDR_IPV6;
+ GeneralPortId: ULONG;
+ end;
+ {$EXTERNALSYM _RSVP_FILTERSPEC_V6_GPI}
+ RSVP_FILTERSPEC_V6_GPI = _RSVP_FILTERSPEC_V6_GPI;
+ {$EXTERNALSYM RSVP_FILTERSPEC_V6_GPI}
+ TRsvpFilterSpecV6Gpi = RSVP_FILTERSPEC_V6_GPI;
+ PRsvpFilterSpecV6Gpi = LPRSVP_FILTERSPEC_V6_GPI;
+
+(*
+ * FILTERSPEC TYPES used in making reservations.
+ *)
+
+const
+ FILTERSPECV4 = 1;
+ {$EXTERNALSYM FILTERSPECV4}
+ FILTERSPECV6 = 2;
+ {$EXTERNALSYM FILTERSPECV6}
+ FILTERSPECV6_FLOW = 3;
+ {$EXTERNALSYM FILTERSPECV6_FLOW}
+ FILTERSPECV4_GPI = 4;
+ {$EXTERNALSYM FILTERSPECV4_GPI}
+ FILTERSPECV6_GPI = 5;
+ {$EXTERNALSYM FILTERSPECV6_GPI}
+ FILTERSPEC_END = 6;
+ {$EXTERNALSYM FILTERSPEC_END}
+
+type
+ FilterType = DWORD;
+ {$EXTERNALSYM FilterType}
+
+type
+ LPRSVP_FILTERSPEC = ^RSVP_FILTERSPEC;
+ {$EXTERNALSYM LPRSVP_FILTERSPEC}
+ _RSVP_FILTERSPEC = record
+ Type_: FilterType;
+ case Integer of
+ 0: (FilterSpecV4: RSVP_FILTERSPEC_V4);
+ 1: (FilterSpecV6: RSVP_FILTERSPEC_V6);
+ 2: (FilterSpecV6Flow: RSVP_FILTERSPEC_V6_FLOW);
+ 3: (FilterSpecV4Gpi: RSVP_FILTERSPEC_V4_GPI);
+ 4: (FilterSpecV6Gpi: RSVP_FILTERSPEC_V6_GPI);
+ end;
+ {$EXTERNALSYM _RSVP_FILTERSPEC}
+ RSVP_FILTERSPEC = _RSVP_FILTERSPEC;
+ {$EXTERNALSYM RSVP_FILTERSPEC}
+ TRsvpFilterSpec = RSVP_FILTERSPEC;
+ PRsvpFilterSpec = LPRSVP_FILTERSPEC;
+
+(*
+ * FLOWDESCRIPTOR Structure used for specifying one or more
+ * Filters per Flowspec.
+ *)
+
+ LPFLOWDESCRIPTOR = ^FLOWDESCRIPTOR;
+ {$EXTERNALSYM LPFLOWDESCRIPTOR}
+ _FLOWDESCRIPTOR = record
+ FlowSpec: FLOWSPEC;
+ NumFilters: ULONG;
+ FilterList: LPRSVP_FILTERSPEC;
+ end;
+ {$EXTERNALSYM _FLOWDESCRIPTOR}
+ FLOWDESCRIPTOR = _FLOWDESCRIPTOR;
+ {$EXTERNALSYM FLOWDESCRIPTOR}
+ TFlowDescriptor = FLOWDESCRIPTOR;
+ PFlowDescriptor = LPFLOWDESCRIPTOR;
+
+(*
+ * RSVP_POLICY contains undefined policy data. RSVP transports this
+ * data on behalf of the Policy Control component.
+ *)
+
+ LPRSVP_POLICY = ^RSVP_POLICY;
+ {$EXTERNALSYM LPRSVP_POLICY}
+ _RSVP_POLICY = record
+ Len: USHORT;
+ Type_: USHORT;
+ Info: array [0..4 - 1] of UCHAR;
+ end;
+ {$EXTERNALSYM _RSVP_POLICY}
+ RSVP_POLICY = _RSVP_POLICY;
+ {$EXTERNALSYM RSVP_POLICY}
+ TRsvpPolicy = RSVP_POLICY;
+ PRsvpPolicy = LPRSVP_POLICY;
+
+ LPCRSVP_POLICY = ^RSVP_POLICY;
+ {$EXTERNALSYM LPCRSVP_POLICY}
+
+const
+ RSVP_POLICY_HDR_LEN = SizeOf(USHORT) + SizeOf(USHORT);
+ {$EXTERNALSYM RSVP_POLICY_HDR_LEN}
+
+(*
+ * RSVP_POLICY_INFO contains undefined policy element(s) retrieved from RSVP.
+ *)
+
+type
+ LPRSVP_POLICY_INFO = ^RSVP_POLICY_INFO;
+ {$EXTERNALSYM LPRSVP_POLICY_INFO}
+ _RSVP_POLICY_INFO = record
+ ObjectHdr: QOS_OBJECT_HDR;
+ NumPolicyElement: ULONG; // count of the number of policy elements
+ PolicyElement: array [0..0] of RSVP_POLICY; // a list of the policy elements retrieved
+ end;
+ {$EXTERNALSYM _RSVP_POLICY_INFO}
+ RSVP_POLICY_INFO = _RSVP_POLICY_INFO;
+ {$EXTERNALSYM RSVP_POLICY_INFO}
+ TRsvpPolicyInfo = RSVP_POLICY_INFO;
+ PRsvpPolicyInfo = LPRSVP_POLICY_INFO;
+
+(*
+ * RSVP_RESERVE_INFO Structure used for storing RSVP specific
+ * information for fine tuning interaction via the Winsock2
+ * Generic QoS API via the provider specific buffer. This structure
+ * includes the QOS_OBJECT_HDR structure directly
+ *)
+
+ LPRSVP_RESERVE_INFO = ^RSVP_RESERVE_INFO;
+ {$EXTERNALSYM LPRSVP_RESERVE_INFO}
+ _RSVP_RESERVE_INFO = record
+ ObjectHdr: QOS_OBJECT_HDR; // type and length of this object
+ Style: ULONG; // RSVP Style (FF,WF,SE)
+ ConfirmRequest: ULONG; // Non Zero for Confirm Request (receive only)
+ PolicyElementList: LPRSVP_POLICY_INFO; // Points to the set of policy elements
+ NumFlowDesc: ULONG; // Number of FlowDesc
+ FlowDescList: LPFLOWDESCRIPTOR; // Points to the FlowDesc list
+ end;
+ {$EXTERNALSYM _RSVP_RESERVE_INFO}
+ RSVP_RESERVE_INFO = _RSVP_RESERVE_INFO;
+ {$EXTERNALSYM RSVP_RESERVE_INFO}
+ TRsvpReserveInfo = RSVP_RESERVE_INFO;
+ PRsvpReserveInfo = LPRSVP_RESERVE_INFO;
+
+ LPCRSVP_RESERVE_INFO = ^RSVP_RESERVE_INFO;
+ {$EXTERNALSYM LPCRSVP_RESERVE_INFO}
+
+(*
+ * definitions for the ulStyle in the previous structure
+ *)
+
+const
+ RSVP_DEFAULT_STYLE = $00000000;
+ {$EXTERNALSYM RSVP_DEFAULT_STYLE}
+ RSVP_WILDCARD_STYLE = $00000001;
+ {$EXTERNALSYM RSVP_WILDCARD_STYLE}
+ RSVP_FIXED_FILTER_STYLE = $00000002;
+ {$EXTERNALSYM RSVP_FIXED_FILTER_STYLE}
+ RSVP_SHARED_EXPLICIT_STYLE = $00000003;
+ {$EXTERNALSYM RSVP_SHARED_EXPLICIT_STYLE}
+
+(*
+ * RSVP_STATUS_INFO Structure used for storing RSVP specific
+ * error of status indications. This also serves as a header
+ * for additional objects in the provider specific buffer when
+ * interacting via Winsock2 Generic QoS API. This structure includes
+ * the QOS_OBJECT_COUNT and QOS_OBJECT_HDR structures directly It is
+ * expected to be the first structure in the provider specific structure
+ * since it includes the QOS_OBJECT_COUNT
+ *)
+
+type
+ LPRSVP_STATUS_INFO = ^RSVP_STATUS_INFO;
+ {$EXTERNALSYM LPRSVP_STATUS_INFO}
+ _RSVP_STATUS_INFO = record
+ ObjectHdr: QOS_OBJECT_HDR; // Object Hdr
+ StatusCode: ULONG; // Error or Status Information see Winsock2.h
+ ExtendedStatus1: ULONG; // Provider specific status extension
+ ExtendedStatus2: ULONG; // Provider specific status extension
+ end;
+ {$EXTERNALSYM _RSVP_STATUS_INFO}
+ RSVP_STATUS_INFO = _RSVP_STATUS_INFO;
+ {$EXTERNALSYM RSVP_STATUS_INFO}
+ TRsvpStatusInfo = RSVP_STATUS_INFO;
+ PRsvpStatusInfo = LPRSVP_STATUS_INFO;
+
+ LPCRSVP_STATUS_INFO = ^RSVP_STATUS_INFO;
+ {$EXTERNALSYM LPCRSVP_STATUS_INFO}
+
+(*
+ * QOS_DestAddr structure -- used for WSAIoctl(SIO_SET_QOS) when we
+ * do not want to issue a connect for a sending socket. The destination
+ * address is required so we can generate the session information for
+ * RSVP signalling.
+*)
+
+ LPQOS_DESTADDR = ^QOS_DESTADDR;
+ {$EXTERNALSYM LPQOS_DESTADDR}
+ _QOS_DESTADDR = record
+ ObjectHdr: QOS_OBJECT_HDR; // Object header
+ SocketAddress: PSockAddr; // Destination socket address
+ SocketAddressLength: ULONG; // Length of the address structure
+ end;
+ {$EXTERNALSYM _QOS_DESTADDR}
+ QOS_DESTADDR = _QOS_DESTADDR;
+ {$EXTERNALSYM QOS_DESTADDR}
+ TQosDestAddr = QOS_DESTADDR;
+ PQosDestAddr = LPQOS_DESTADDR;
+
+ LPCQOS_DESTADDR = ^QOS_DESTADDR;
+ {$EXTERNALSYM LPCQOS_DESTADDR}
+
+(*
+ * this structure defines the "General Characterization Parameters" contained in
+ * the RSVP Adspec object
+ *)
+
+ LPAD_GENERAL_PARAMS = ^AD_GENERAL_PARAMS;
+ {$EXTERNALSYM LPAD_GENERAL_PARAMS}
+ _AD_GENERAL_PARAMS = record
+ IntServAwareHopCount: ULONG; // number of hops that conform to
+ // Integrated Services requirements *)
+ PathBandwidthEstimate: ULONG; // minimum bandwidth available from
+ // sender to receiver *)
+ MinimumLatency: ULONG; // sum of minimum latency of the packet
+ // forwarding process in routers
+ // (in usec)*)
+ PathMTU: ULONG; // max transmission unit end to end that
+ // will not incur fragmentation *)
+ Flags: ULONG; // used to hold break bits.*)
+ end;
+ {$EXTERNALSYM _AD_GENERAL_PARAMS}
+ AD_GENERAL_PARAMS = _AD_GENERAL_PARAMS;
+ {$EXTERNALSYM AD_GENERAL_PARAMS}
+ TAdGeneralParams = AD_GENERAL_PARAMS;
+ PAdGeneralParams = LPAD_GENERAL_PARAMS;
+
+(*
+ * Minimum Latency may be set to this "undefined" value
+ *)
+
+const
+ INDETERMINATE_LATENCY = DWORD($FFFFFFFF);
+ {$EXTERNALSYM INDETERMINATE_LATENCY}
+
+(*
+ * This Flag is used to indicate the existence of a network element not
+ * supporting QoS control services somewhere in the data path. If this bit
+ * is set in the specific service override then it indicates that that
+ * service was not supported at at least one hop.
+ *)
+
+ AD_FLAG_BREAK_BIT = $00000001;
+ {$EXTERNALSYM AD_FLAG_BREAK_BIT}
+
+(*
+ * this structure describes the Guaranteed service parameters
+ *)
+
+type
+ LPAD_GUARANTEED = ^AD_GUARANTEED;
+ {$EXTERNALSYM LPAD_GUARANTEED}
+ _AD_GUARANTEED = record
+ CTotal: ULONG;
+ DTotal: ULONG;
+ CSum: ULONG;
+ DSum: ULONG;
+ end;
+ {$EXTERNALSYM _AD_GUARANTEED}
+ AD_GUARANTEED = _AD_GUARANTEED;
+ {$EXTERNALSYM AD_GUARANTEED}
+ TAdGuaranteed = AD_GUARANTEED;
+ PAdGuaranteed = LPAD_GUARANTEED;
+
+(*
+ * this structure describes the format of the parameter buffer that can be
+ * included in the Service_Type structure below. This structure allows an
+ * application to include any valid Int Serv service parameter in the Buffer
+ * value, after providing the Int Serv parameter id in the ParameterId field.
+ *)
+
+ LPPARAM_BUFFER = ^PARAM_BUFFER;
+ {$EXTERNALSYM LPPARAM_BUFFER}
+ _PARAM_BUFFER = record
+ ParameterId: ULONG; // Int Server parameter ID
+ Length: ULONG; // total length of this structure
+ // ( 8 bytes + length of Buffer )
+ Buffer: array [0..1 - 1] of UCHAR; // Paramter itself
+ end;
+ {$EXTERNALSYM _PARAM_BUFFER}
+ PARAM_BUFFER = _PARAM_BUFFER;
+ {$EXTERNALSYM PARAM_BUFFER}
+ TParamBuffer = PARAM_BUFFER;
+ PParamBuffer = LPPARAM_BUFFER;
+
+(*
+ * this structure contains the service types supported
+ *)
+
+ LPCONTROL_SERVICE = ^CONTROL_SERVICE;
+ {$EXTERNALSYM LPCONTROL_SERVICE}
+ _CONTROL_SERVICE = record
+
+ //
+ // the length of this entire structure including the following buffer.
+ // This length value can be added to the ptr to the structure to get the ptr
+ // to the next SERVICE_TYPE structure in the list, until the
+ // NumberOfServices count has been exhausted.
+ //
+
+ Length: ULONG;
+ Service: SERVICETYPE;
+ Overrides: AD_GENERAL_PARAMS;
+
+ //
+ // service specific information ( controlled load has no service specific
+ // info here )
+ //
+
+ case Integer of
+ 0: (Guaranteed: AD_GUARANTEED);
+ 1: (ParamBuffer: array [0..0] of PARAM_BUFFER); // allows for other services down the road
+
+ end;
+ {$EXTERNALSYM _CONTROL_SERVICE}
+ CONTROL_SERVICE = _CONTROL_SERVICE;
+ {$EXTERNALSYM CONTROL_SERVICE}
+ TControlService = CONTROL_SERVICE;
+ PControlService = LPCONTROL_SERVICE;
+
+(*
+ * This structure defines the information which is carried in the Rsvp
+ * Adspec. This Rsvp object typically indicates which service types are
+ * available ( Controlled Load and/or Guaranteed Service ), if a non-Rsvp
+ * hop has been encountered by the Path message, and the minumum MTU along
+ * the path. The services array indicates which services are supported
+ *)
+
+ LPRSVP_ADSPEC = ^RSVP_ADSPEC;
+ {$EXTERNALSYM LPRSVP_ADSPEC}
+ _RSVP_ADSPEC = record
+ ObjectHdr: QOS_OBJECT_HDR;
+ GeneralParams: AD_GENERAL_PARAMS; // contains the general characterization paramters
+ NumberOfServices: ULONG; // count of the number of services
+ Services: array [0..0] of CONTROL_SERVICE; // a list of the services supported/requested
+ end;
+ {$EXTERNALSYM _RSVP_ADSPEC}
+ RSVP_ADSPEC = _RSVP_ADSPEC;
+ {$EXTERNALSYM RSVP_ADSPEC}
+ TRsvpAdSpec = RSVP_ADSPEC;
+ PRsvpAdSpec = LPRSVP_ADSPEC;
+
+//
+// Opcode for the SIO_CHK_QOS ioctl
+// (specific for the Microsoft QOS Service Provider
+//
+// Bascially:
+//
+// SIO_CHK_QOS = _WSAIORW(IOC_VENDOR,1)
+// = mIOC_IN | mIOC_OUT | mIOC_VENDOR | mCOMPANY | ioctl_code
+// where
+// mIOC_IN = 0x80000000
+// mIOC_OUT = 0x40000000
+// mIOC_VENDOR = 0x04000000
+// mCOMPANY = 0x18000000
+// ioctl_code = 0x00000001
+//
+// See WSAIoctl man page for details.
+//
+
+const
+ mIOC_IN = DWORD($80000000);
+ {$EXTERNALSYM mIOC_IN}
+ mIOC_OUT = $40000000;
+ {$EXTERNALSYM mIOC_OUT}
+ mIOC_VENDOR = $04000000;
+ {$EXTERNALSYM mIOC_VENDOR}
+ mCOMPANY = $18000000;
+ {$EXTERNALSYM mCOMPANY}
+ ioctl_code = $00000001;
+ {$EXTERNALSYM ioctl_code}
+
+ SIO_CHK_QOS = mIOC_IN or mIOC_OUT or mIOC_VENDOR or mCOMPANY or ioctl_code;
+ {$EXTERNALSYM SIO_CHK_QOS}
+
+//
+// The following may be specified in the input buffer
+// of the SIO_CHK_IOCTL ioctl call
+//
+
+ QOSSPBASE = 50000;
+ {$EXTERNALSYM QOSSPBASE}
+
+ ALLOWED_TO_SEND_DATA = QOSSPBASE + 1; // query the SBM/BEST_EFFORT limit
+ {$EXTERNALSYM ALLOWED_TO_SEND_DATA}
+ // -- result is based on a comparison between
+ // the user-specified token rate and the
+ // SBM/BEST_EFFORT bandwidth parameters in
+ // the system
+ // -- result is a YES(1) or NO(0) answer
+ // in the output buffer
+
+ ABLE_TO_RECV_RSVP = QOSSPBASE + 2; // query the SBM/BEST_EFFORT limit
+ {$EXTERNALSYM ABLE_TO_RECV_RSVP}
+ // -- result is based on a comparison between
+ // the user-specified token rate and the
+ // SBM/BEST_EFFORT bandwidth parameters in
+ // the system
+ // -- result is a YES(1) or NO(0) answer
+ // in the output buffer
+
+ LINE_RATE = QOSSPBASE + 3; // query the interface capacity
+ {$EXTERNALSYM LINE_RATE}
+ // -- result returned in the output buffer
+ // in kilo-bits per second
+
+ LOCAL_TRAFFIC_CONTROL = QOSSPBASE + 4; // check if Kernel Traffic Control is available or not
+ {$EXTERNALSYM LOCAL_TRAFFIC_CONTROL}
+ // -- 0 if not available
+ // -- 1 if avaiable
+ // -- INFO_NOT_AVAILABLE if there is no way to check
+
+ LOCAL_QOSABILITY = QOSSPBASE + 5; // The followings are for
+ {$EXTERNALSYM LOCAL_QOSABILITY}
+ // the Discovery of Local QOSability
+ // -- 0 if no local QOS support
+ // -- 1 if local QOS support available
+ // -- INFO_NOT_AVAILABLE if there is no way to check
+
+ END_TO_END_QOSABILITY = QOSSPBASE + 6; // The followings are for
+ {$EXTERNALSYM END_TO_END_QOSABILITY}
+ // the Discovery of End-to-End QOSability
+ // -- 0 if no end-to-end QOS support
+ // -- 1 if end-to-end QOS support available
+ // -- INFO_NOT_AVAILABLE if there is no way to check
+
+ INFO_NOT_AVAILABLE = DWORD($FFFFFFFF); // used when LINE_RATE is not known
+ {$EXTERNALSYM INFO_NOT_AVAILABLE}
+
+ ANY_DEST_ADDR = DWORD($FFFFFFFF); // for QOS_OBJECT_DEST_ADDR
+ {$EXTERNALSYM ANY_DEST_ADDR}
+
+// The followings are for Guaranteed_Service+Latency -> ISSLOW_Traffic_Class Mapping
+
+ MODERATELY_DELAY_SENSITIVE = DWORD($FFFFFFFD);
+ {$EXTERNALSYM MODERATELY_DELAY_SENSITIVE}
+
+ HIGHLY_DELAY_SENSITIVE = DWORD($FFFFFFFE);
+ {$EXTERNALSYM HIGHLY_DELAY_SENSITIVE}
+
+//
+// QOSSP Error Code/Value
+//
+
+ QOSSP_ERR_BASE = QOSSPBASE + 6000;
+ {$EXTERNALSYM QOSSP_ERR_BASE}
+
+// No error
+
+ GQOS_NO_ERRORCODE = 0;
+ {$EXTERNALSYM GQOS_NO_ERRORCODE}
+
+ GQOS_NO_ERRORVALUE = 0;
+ {$EXTERNALSYM GQOS_NO_ERRORVALUE}
+
+// Unknown error
+
+ GQOS_ERRORCODE_UNKNOWN = DWORD($FFFFFFFF);
+ {$EXTERNALSYM GQOS_ERRORCODE_UNKNOWN}
+
+ GQOS_ERRORVALUE_UNKNOWN = DWORD($FFFFFFFF);
+ {$EXTERNALSYM GQOS_ERRORVALUE_UNKNOWN}
+
+// Admission (Resource) Error
+
+ GQOS_NET_ADMISSION = QOSSP_ERR_BASE + 100;
+ {$EXTERNALSYM GQOS_NET_ADMISSION}
+
+ GQOS_OTHER = QOSSP_ERR_BASE + 100 + 1;
+ {$EXTERNALSYM GQOS_OTHER}
+ GQOS_DELAYBND = QOSSP_ERR_BASE + 100 + 2;
+ {$EXTERNALSYM GQOS_DELAYBND}
+ GQOS_BANDWIDTH = QOSSP_ERR_BASE + 100 + 3;
+ {$EXTERNALSYM GQOS_BANDWIDTH}
+ GQOS_MTU = QOSSP_ERR_BASE + 100 + 4;
+ {$EXTERNALSYM GQOS_MTU}
+ GQOS_FLOW_RATE = QOSSP_ERR_BASE + 100 + 5;
+ {$EXTERNALSYM GQOS_FLOW_RATE}
+ GQOS_PEAK_RATE = QOSSP_ERR_BASE + 100 + 6;
+ {$EXTERNALSYM GQOS_PEAK_RATE}
+ GQOS_AGG_PEAK_RATE = QOSSP_ERR_BASE + 100 + 7;
+ {$EXTERNALSYM GQOS_AGG_PEAK_RATE}
+
+// Policy Error
+
+ GQOS_NET_POLICY = QOSSP_ERR_BASE + 200;
+ {$EXTERNALSYM GQOS_NET_POLICY}
+
+ GQOS_POLICY_ERROR_UNKNOWN = QOSSP_ERR_BASE + 200 + 0;
+ {$EXTERNALSYM GQOS_POLICY_ERROR_UNKNOWN}
+
+ GQOS_POLICY_GLOBAL_DEF_FLOW_COUNT = QOSSP_ERR_BASE + 200 + 1;
+ {$EXTERNALSYM GQOS_POLICY_GLOBAL_DEF_FLOW_COUNT}
+ GQOS_POLICY_GLOBAL_GRP_FLOW_COUNT = QOSSP_ERR_BASE + 200 + 2;
+ {$EXTERNALSYM GQOS_POLICY_GLOBAL_GRP_FLOW_COUNT}
+ GQOS_POLICY_GLOBAL_USER_FLOW_COUNT = QOSSP_ERR_BASE + 200 + 3;
+ {$EXTERNALSYM GQOS_POLICY_GLOBAL_USER_FLOW_COUNT}
+ GQOS_POLICY_GLOBAL_UNK_USER_FLOW_COUNT = QOSSP_ERR_BASE + 200 + 4;
+ {$EXTERNALSYM GQOS_POLICY_GLOBAL_UNK_USER_FLOW_COUNT}
+ GQOS_POLICY_SUBNET_DEF_FLOW_COUNT = QOSSP_ERR_BASE + 200 + 5;
+ {$EXTERNALSYM GQOS_POLICY_SUBNET_DEF_FLOW_COUNT}
+ GQOS_POLICY_SUBNET_GRP_FLOW_COUNT = QOSSP_ERR_BASE + 200 + 6;
+ {$EXTERNALSYM GQOS_POLICY_SUBNET_GRP_FLOW_COUNT}
+ GQOS_POLICY_SUBNET_USER_FLOW_COUNT = QOSSP_ERR_BASE + 200 + 7;
+ {$EXTERNALSYM GQOS_POLICY_SUBNET_USER_FLOW_COUNT}
+ GQOS_POLICY_SUBNET_UNK_USER_FLOW_COUNT = QOSSP_ERR_BASE + 200 + 8;
+ {$EXTERNALSYM GQOS_POLICY_SUBNET_UNK_USER_FLOW_COUNT}
+
+ GQOS_POLICY_GLOBAL_DEF_FLOW_DURATION = QOSSP_ERR_BASE + 200 + 9;
+ {$EXTERNALSYM GQOS_POLICY_GLOBAL_DEF_FLOW_DURATION}
+ GQOS_POLICY_GLOBAL_GRP_FLOW_DURATION = QOSSP_ERR_BASE + 200 + 10;
+ {$EXTERNALSYM GQOS_POLICY_GLOBAL_GRP_FLOW_DURATION}
+ GQOS_POLICY_GLOBAL_USER_FLOW_DURATION = QOSSP_ERR_BASE + 200 + 11;
+ {$EXTERNALSYM GQOS_POLICY_GLOBAL_USER_FLOW_DURATION}
+ GQOS_POLICY_GLOBAL_UNK_USER_FLOW_DURATION = QOSSP_ERR_BASE + 200 + 12;
+ {$EXTERNALSYM GQOS_POLICY_GLOBAL_UNK_USER_FLOW_DURATION}
+ GQOS_POLICY_SUBNET_DEF_FLOW_DURATION = QOSSP_ERR_BASE + 200 + 13;
+ {$EXTERNALSYM GQOS_POLICY_SUBNET_DEF_FLOW_DURATION}
+ GQOS_POLICY_SUBNET_GRP_FLOW_DURATION = QOSSP_ERR_BASE + 200 + 14;
+ {$EXTERNALSYM GQOS_POLICY_SUBNET_GRP_FLOW_DURATION}
+ GQOS_POLICY_SUBNET_USER_FLOW_DURATION = QOSSP_ERR_BASE + 200 + 15;
+ {$EXTERNALSYM GQOS_POLICY_SUBNET_USER_FLOW_DURATION}
+ GQOS_POLICY_SUBNET_UNK_USER_FLOW_DURATION = QOSSP_ERR_BASE + 200 + 16;
+ {$EXTERNALSYM GQOS_POLICY_SUBNET_UNK_USER_FLOW_DURATION}
+
+ GQOS_POLICY_GLOBAL_DEF_FLOW_RATE = QOSSP_ERR_BASE + 200 + 17;
+ {$EXTERNALSYM GQOS_POLICY_GLOBAL_DEF_FLOW_RATE}
+ GQOS_POLICY_GLOBAL_GRP_FLOW_RATE = QOSSP_ERR_BASE + 200 + 18;
+ {$EXTERNALSYM GQOS_POLICY_GLOBAL_GRP_FLOW_RATE}
+ GQOS_POLICY_GLOBAL_USER_FLOW_RATE = QOSSP_ERR_BASE + 200 + 19;
+ {$EXTERNALSYM GQOS_POLICY_GLOBAL_USER_FLOW_RATE}
+ GQOS_POLICY_GLOBAL_UNK_USER_FLOW_RATE = QOSSP_ERR_BASE + 200 + 20;
+ {$EXTERNALSYM GQOS_POLICY_GLOBAL_UNK_USER_FLOW_RATE}
+ GQOS_POLICY_SUBNET_DEF_FLOW_RATE = QOSSP_ERR_BASE + 200 + 21;
+ {$EXTERNALSYM GQOS_POLICY_SUBNET_DEF_FLOW_RATE}
+ GQOS_POLICY_SUBNET_GRP_FLOW_RATE = QOSSP_ERR_BASE + 200 + 22;
+ {$EXTERNALSYM GQOS_POLICY_SUBNET_GRP_FLOW_RATE}
+ GQOS_POLICY_SUBNET_USER_FLOW_RATE = QOSSP_ERR_BASE + 200 + 23;
+ {$EXTERNALSYM GQOS_POLICY_SUBNET_USER_FLOW_RATE}
+ GQOS_POLICY_SUBNET_UNK_USER_FLOW_RATE = QOSSP_ERR_BASE + 200 + 24;
+ {$EXTERNALSYM GQOS_POLICY_SUBNET_UNK_USER_FLOW_RATE}
+
+ GQOS_POLICY_GLOBAL_DEF_PEAK_RATE = QOSSP_ERR_BASE + 200 + 25;
+ {$EXTERNALSYM GQOS_POLICY_GLOBAL_DEF_PEAK_RATE}
+ GQOS_POLICY_GLOBAL_GRP_PEAK_RATE = QOSSP_ERR_BASE + 200 + 26;
+ {$EXTERNALSYM GQOS_POLICY_GLOBAL_GRP_PEAK_RATE}
+ GQOS_POLICY_GLOBAL_USER_PEAK_RATE = QOSSP_ERR_BASE + 200 + 27;
+ {$EXTERNALSYM GQOS_POLICY_GLOBAL_USER_PEAK_RATE}
+ GQOS_POLICY_GLOBAL_UNK_USER_PEAK_RATE = QOSSP_ERR_BASE + 200 + 28;
+ {$EXTERNALSYM GQOS_POLICY_GLOBAL_UNK_USER_PEAK_RATE}
+ GQOS_POLICY_SUBNET_DEF_PEAK_RATE = QOSSP_ERR_BASE + 200 + 29;
+ {$EXTERNALSYM GQOS_POLICY_SUBNET_DEF_PEAK_RATE}
+ GQOS_POLICY_SUBNET_GRP_PEAK_RATE = QOSSP_ERR_BASE + 200 + 30;
+ {$EXTERNALSYM GQOS_POLICY_SUBNET_GRP_PEAK_RATE}
+ GQOS_POLICY_SUBNET_USER_PEAK_RATE = QOSSP_ERR_BASE + 200 + 31;
+ {$EXTERNALSYM GQOS_POLICY_SUBNET_USER_PEAK_RATE}
+ GQOS_POLICY_SUBNET_UNK_USER_PEAK_RATE = QOSSP_ERR_BASE + 200 + 32;
+ {$EXTERNALSYM GQOS_POLICY_SUBNET_UNK_USER_PEAK_RATE}
+
+ GQOS_POLICY_GLOBAL_DEF_SUM_FLOW_RATE = QOSSP_ERR_BASE + 200 + 33;
+ {$EXTERNALSYM GQOS_POLICY_GLOBAL_DEF_SUM_FLOW_RATE}
+ GQOS_POLICY_GLOBAL_GRP_SUM_FLOW_RATE = QOSSP_ERR_BASE + 200 + 34;
+ {$EXTERNALSYM GQOS_POLICY_GLOBAL_GRP_SUM_FLOW_RATE}
+ GQOS_POLICY_GLOBAL_USER_SUM_FLOW_RATE = QOSSP_ERR_BASE + 200 + 35;
+ {$EXTERNALSYM GQOS_POLICY_GLOBAL_USER_SUM_FLOW_RATE}
+ GQOS_POLICY_GLOBAL_UNK_USER_SUM_FLOW_RATE = QOSSP_ERR_BASE + 200 + 36;
+ {$EXTERNALSYM GQOS_POLICY_GLOBAL_UNK_USER_SUM_FLOW_RATE}
+ GQOS_POLICY_SUBNET_DEF_SUM_FLOW_RATE = QOSSP_ERR_BASE + 200 + 37;
+ {$EXTERNALSYM GQOS_POLICY_SUBNET_DEF_SUM_FLOW_RATE}
+ GQOS_POLICY_SUBNET_GRP_SUM_FLOW_RATE = QOSSP_ERR_BASE + 200 + 38;
+ {$EXTERNALSYM GQOS_POLICY_SUBNET_GRP_SUM_FLOW_RATE}
+ GQOS_POLICY_SUBNET_USER_SUM_FLOW_RATE = QOSSP_ERR_BASE + 200 + 39;
+ {$EXTERNALSYM GQOS_POLICY_SUBNET_USER_SUM_FLOW_RATE}
+ GQOS_POLICY_SUBNET_UNK_USER_SUM_FLOW_RATE = QOSSP_ERR_BASE + 200 + 40;
+ {$EXTERNALSYM GQOS_POLICY_SUBNET_UNK_USER_SUM_FLOW_RATE}
+
+ GQOS_POLICY_GLOBAL_DEF_SUM_PEAK_RATE = QOSSP_ERR_BASE + 200 + 41;
+ {$EXTERNALSYM GQOS_POLICY_GLOBAL_DEF_SUM_PEAK_RATE}
+ GQOS_POLICY_GLOBAL_GRP_SUM_PEAK_RATE = QOSSP_ERR_BASE + 200 + 42;
+ {$EXTERNALSYM GQOS_POLICY_GLOBAL_GRP_SUM_PEAK_RATE}
+ GQOS_POLICY_GLOBAL_USER_SUM_PEAK_RATE = QOSSP_ERR_BASE + 200 + 43;
+ {$EXTERNALSYM GQOS_POLICY_GLOBAL_USER_SUM_PEAK_RATE}
+ GQOS_POLICY_GLOBAL_UNK_USER_SUM_PEAK_RATE = QOSSP_ERR_BASE + 200 + 44;
+ {$EXTERNALSYM GQOS_POLICY_GLOBAL_UNK_USER_SUM_PEAK_RATE}
+ GQOS_POLICY_SUBNET_DEF_SUM_PEAK_RATE = QOSSP_ERR_BASE + 200 + 45;
+ {$EXTERNALSYM GQOS_POLICY_SUBNET_DEF_SUM_PEAK_RATE}
+ GQOS_POLICY_SUBNET_GRP_SUM_PEAK_RATE = QOSSP_ERR_BASE + 200 + 46;
+ {$EXTERNALSYM GQOS_POLICY_SUBNET_GRP_SUM_PEAK_RATE}
+ GQOS_POLICY_SUBNET_USER_SUM_PEAK_RATE = QOSSP_ERR_BASE + 200 + 47;
+ {$EXTERNALSYM GQOS_POLICY_SUBNET_USER_SUM_PEAK_RATE}
+ GQOS_POLICY_SUBNET_UNK_USER_SUM_PEAK_RATE = QOSSP_ERR_BASE + 200 + 48;
+ {$EXTERNALSYM GQOS_POLICY_SUBNET_UNK_USER_SUM_PEAK_RATE}
+
+ GQOS_POLICY_UNKNOWN_USER = QOSSP_ERR_BASE + 200 + 49;
+ {$EXTERNALSYM GQOS_POLICY_UNKNOWN_USER}
+ GQOS_POLICY_NO_PRIVILEGES = QOSSP_ERR_BASE + 200 + 50;
+ {$EXTERNALSYM GQOS_POLICY_NO_PRIVILEGES}
+ GQOS_POLICY_EXPIRED_USER_TOKEN = QOSSP_ERR_BASE + 200 + 51;
+ {$EXTERNALSYM GQOS_POLICY_EXPIRED_USER_TOKEN}
+ GQOS_POLICY_NO_RESOURCES = QOSSP_ERR_BASE + 200 + 52;
+ {$EXTERNALSYM GQOS_POLICY_NO_RESOURCES}
+ GQOS_POLICY_PRE_EMPTED = QOSSP_ERR_BASE + 200 + 53;
+ {$EXTERNALSYM GQOS_POLICY_PRE_EMPTED}
+ GQOS_POLICY_USER_CHANGED = QOSSP_ERR_BASE + 200 + 54;
+ {$EXTERNALSYM GQOS_POLICY_USER_CHANGED}
+ GQOS_POLICY_NO_ACCEPTS = QOSSP_ERR_BASE + 200 + 55;
+ {$EXTERNALSYM GQOS_POLICY_NO_ACCEPTS}
+ GQOS_POLICY_NO_MEMORY = QOSSP_ERR_BASE + 200 + 56;
+ {$EXTERNALSYM GQOS_POLICY_NO_MEMORY}
+ GQOS_POLICY_CRAZY_FLOWSPEC = QOSSP_ERR_BASE + 200 + 57;
+ {$EXTERNALSYM GQOS_POLICY_CRAZY_FLOWSPEC}
+
+ GQOS_POLICY_NO_MORE_INFO = QOSSP_ERR_BASE + 200 + 58;
+ {$EXTERNALSYM GQOS_POLICY_NO_MORE_INFO}
+ GQOS_POLICY_UNSUPPORTED_CREDENTIAL_TYPE = QOSSP_ERR_BASE + 200 + 59;
+ {$EXTERNALSYM GQOS_POLICY_UNSUPPORTED_CREDENTIAL_TYPE}
+ GQOS_POLICY_INSUFFICIENT_PRIVILEGES = QOSSP_ERR_BASE + 200 + 60;
+ {$EXTERNALSYM GQOS_POLICY_INSUFFICIENT_PRIVILEGES}
+ GQOS_POLICY_EXPIRED_CREDENTIAL = QOSSP_ERR_BASE + 200 + 61;
+ {$EXTERNALSYM GQOS_POLICY_EXPIRED_CREDENTIAL}
+ GQOS_POLICY_IDENTITY_CHANGED = QOSSP_ERR_BASE + 200 + 62;
+ {$EXTERNALSYM GQOS_POLICY_IDENTITY_CHANGED}
+ GQOS_POLICY_NO_QOS_PROVIDED = QOSSP_ERR_BASE + 200 + 63;
+ {$EXTERNALSYM GQOS_POLICY_NO_QOS_PROVIDED}
+ GQOS_POLICY_DO_NOT_SEND = QOSSP_ERR_BASE + 200 + 64;
+ {$EXTERNALSYM GQOS_POLICY_DO_NOT_SEND}
+
+ GQOS_POLICY_ERROR_USERID = QOSSP_ERR_BASE + 200 + 99;
+ {$EXTERNALSYM GQOS_POLICY_ERROR_USERID}
+
+// RSVP Error
+
+ GQOS_RSVP = QOSSP_ERR_BASE + 300;
+ {$EXTERNALSYM GQOS_RSVP}
+
+ GQOS_NO_PATH = QOSSP_ERR_BASE + 300 + 1;
+ {$EXTERNALSYM GQOS_NO_PATH}
+ GQOS_NO_SENDER = QOSSP_ERR_BASE + 300 + 2;
+ {$EXTERNALSYM GQOS_NO_SENDER}
+ GQOS_BAD_STYLE = QOSSP_ERR_BASE + 300 + 3;
+ {$EXTERNALSYM GQOS_BAD_STYLE}
+ GQOS_UNKNOWN_STYLE = QOSSP_ERR_BASE + 300 + 4;
+ {$EXTERNALSYM GQOS_UNKNOWN_STYLE}
+ GQOS_BAD_DSTPORT = QOSSP_ERR_BASE + 300 + 5;
+ {$EXTERNALSYM GQOS_BAD_DSTPORT}
+ GQOS_BAD_SNDPORT = QOSSP_ERR_BASE + 300 + 6;
+ {$EXTERNALSYM GQOS_BAD_SNDPORT}
+ GQOS_AMBIG_FILTER = QOSSP_ERR_BASE + 300 + 7;
+ {$EXTERNALSYM GQOS_AMBIG_FILTER}
+ GQOS_PREEMPTED = QOSSP_ERR_BASE + 300 + 8;
+ {$EXTERNALSYM GQOS_PREEMPTED}
+ GQOS_UNKN_OBJ_CLASS = QOSSP_ERR_BASE + 300 + 9;
+ {$EXTERNALSYM GQOS_UNKN_OBJ_CLASS}
+ GQOS_UNKNOWN_CTYPE = QOSSP_ERR_BASE + 300 + 10;
+ {$EXTERNALSYM GQOS_UNKNOWN_CTYPE}
+ GQOS_INVALID = QOSSP_ERR_BASE + 300 + 11;
+ {$EXTERNALSYM GQOS_INVALID}
+
+// API Error
+
+ GQOS_API = QOSSP_ERR_BASE + 400;
+ {$EXTERNALSYM GQOS_API}
+
+ GQOS_API_BADSEND = QOSSP_ERR_BASE + 400 + 1; (* Sender addr not my interface *)
+ {$EXTERNALSYM GQOS_API_BADSEND}
+ GQOS_API_BADRECV = QOSSP_ERR_BASE + 400 + 2; (* Recv addr not my interface *)
+ {$EXTERNALSYM GQOS_API_BADRECV}
+ GQOS_API_BADSPORT = QOSSP_ERR_BASE + 400 + 3; (* Sport !=0 but Dport == 0 *)
+ {$EXTERNALSYM GQOS_API_BADSPORT}
+
+// TC System Error
+
+ GQOS_KERNEL_TC_SYS = QOSSP_ERR_BASE + 500;
+ {$EXTERNALSYM GQOS_KERNEL_TC_SYS}
+
+ GQOS_TC_GENERIC = QOSSP_ERR_BASE + 500 + 1;
+ {$EXTERNALSYM GQOS_TC_GENERIC}
+ GQOS_TC_INVALID = QOSSP_ERR_BASE + 500 + 2;
+ {$EXTERNALSYM GQOS_TC_INVALID}
+ GQOS_NO_MEMORY = QOSSP_ERR_BASE + 500 + 3;
+ {$EXTERNALSYM GQOS_NO_MEMORY}
+ GQOS_BAD_ADDRESSTYPE = QOSSP_ERR_BASE + 500 + 4;
+ {$EXTERNALSYM GQOS_BAD_ADDRESSTYPE}
+ GQOS_BAD_DUPLICATE = QOSSP_ERR_BASE + 500 + 5;
+ {$EXTERNALSYM GQOS_BAD_DUPLICATE}
+ GQOS_CONFLICT = QOSSP_ERR_BASE + 500 + 6;
+ {$EXTERNALSYM GQOS_CONFLICT}
+ GQOS_NOTREADY = QOSSP_ERR_BASE + 500 + 7;
+ {$EXTERNALSYM GQOS_NOTREADY}
+ GQOS_WOULDBLOCK = QOSSP_ERR_BASE + 500 + 8;
+ {$EXTERNALSYM GQOS_WOULDBLOCK}
+ GQOS_INCOMPATIBLE = QOSSP_ERR_BASE + 500 + 9;
+ {$EXTERNALSYM GQOS_INCOMPATIBLE}
+ GQOS_BAD_SDMODE = QOSSP_ERR_BASE + 500 + 10;
+ {$EXTERNALSYM GQOS_BAD_SDMODE}
+ GQOS_BAD_QOSPRIORITY = QOSSP_ERR_BASE + 500 + 11;
+ {$EXTERNALSYM GQOS_BAD_QOSPRIORITY}
+ GQOS_BAD_TRAFFICCLASS = QOSSP_ERR_BASE + 500 + 12;
+ {$EXTERNALSYM GQOS_BAD_TRAFFICCLASS}
+ GQOS_NO_SYS_RESOURCES = QOSSP_ERR_BASE + 500 + 13;
+ {$EXTERNALSYM GQOS_NO_SYS_RESOURCES}
+
+// RSVP System Error
+
+ GQOS_RSVP_SYS = QOSSP_ERR_BASE + 600;
+ {$EXTERNALSYM GQOS_RSVP_SYS}
+
+ GQOS_OTHER_SYS = QOSSP_ERR_BASE + 600 + 1;
+ {$EXTERNALSYM GQOS_OTHER_SYS}
+ GQOS_MEMORY_SYS = QOSSP_ERR_BASE + 600 + 2;
+ {$EXTERNALSYM GQOS_MEMORY_SYS}
+ GQOS_API_SYS = QOSSP_ERR_BASE + 600 + 3;
+ {$EXTERNALSYM GQOS_API_SYS}
+ GQOS_SETQOS_NO_LOCAL_APPS = QOSSP_ERR_BASE + 600 + 4;
+ {$EXTERNALSYM GQOS_SETQOS_NO_LOCAL_APPS}
+
+// TC Error
+
+ GQOS_KERNEL_TC = QOSSP_ERR_BASE + 700;
+ {$EXTERNALSYM GQOS_KERNEL_TC}
+
+ GQOS_CONFLICT_SERV = QOSSP_ERR_BASE + 700 + 1;
+ {$EXTERNALSYM GQOS_CONFLICT_SERV}
+ GQOS_NO_SERV = QOSSP_ERR_BASE + 700 + 2;
+ {$EXTERNALSYM GQOS_NO_SERV}
+ GQOS_BAD_FLOWSPEC = QOSSP_ERR_BASE + 700 + 3;
+ {$EXTERNALSYM GQOS_BAD_FLOWSPEC}
+ GQOS_BAD_TSPEC = QOSSP_ERR_BASE + 700 + 4;
+ {$EXTERNALSYM GQOS_BAD_TSPEC}
+ GQOS_BAD_ADSPEC = QOSSP_ERR_BASE + 700 + 5;
+ {$EXTERNALSYM GQOS_BAD_ADSPEC}
+
+// GQOS API ERRORS
+
+// WSAIoctl Error
+
+ GQOS_IOCTL_SYSTEMFAILURE = QOSSP_ERR_BASE + 800 + 1;
+ {$EXTERNALSYM GQOS_IOCTL_SYSTEMFAILURE}
+ GQOS_IOCTL_NOBYTESRETURNED = QOSSP_ERR_BASE + 800 + 2;
+ {$EXTERNALSYM GQOS_IOCTL_NOBYTESRETURNED}
+ GQOS_IOCTL_INVALIDSOCKET = QOSSP_ERR_BASE + 800 + 3;
+ {$EXTERNALSYM GQOS_IOCTL_INVALIDSOCKET}
+ GQOS_IOCTL_INV_FUNCPTR = QOSSP_ERR_BASE + 800 + 4;
+ {$EXTERNALSYM GQOS_IOCTL_INV_FUNCPTR}
+ GQOS_IOCTL_INV_OVERLAPPED = QOSSP_ERR_BASE + 800 + 5;
+ {$EXTERNALSYM GQOS_IOCTL_INV_OVERLAPPED}
+
+// SIO_SET_QOS error
+
+ GQOS_SETQOS_BADINBUFFER = QOSSP_ERR_BASE + 810 + 1;
+ {$EXTERNALSYM GQOS_SETQOS_BADINBUFFER}
+ GQOS_SETQOS_BADFLOWSPEC = QOSSP_ERR_BASE + 810 + 2;
+ {$EXTERNALSYM GQOS_SETQOS_BADFLOWSPEC}
+ GQOS_SETQOS_COLLISION = QOSSP_ERR_BASE + 810 + 3;
+ {$EXTERNALSYM GQOS_SETQOS_COLLISION}
+ GQOS_SETQOS_BADPROVSPECBUF = QOSSP_ERR_BASE + 810 + 4;
+ {$EXTERNALSYM GQOS_SETQOS_BADPROVSPECBUF}
+ GQOS_SETQOS_ILLEGALOP = QOSSP_ERR_BASE + 810 + 5;
+ {$EXTERNALSYM GQOS_SETQOS_ILLEGALOP}
+ GQOS_SETQOS_INVALIDADDRESS = QOSSP_ERR_BASE + 810 + 6;
+ {$EXTERNALSYM GQOS_SETQOS_INVALIDADDRESS}
+ GQOS_SETQOS_OUTOFMEMORY = QOSSP_ERR_BASE + 810 + 7;
+ {$EXTERNALSYM GQOS_SETQOS_OUTOFMEMORY}
+ GQOS_SETQOS_EXCEPTION = QOSSP_ERR_BASE + 810 + 8;
+ {$EXTERNALSYM GQOS_SETQOS_EXCEPTION}
+ GQOS_SETQOS_BADADDRLEN = QOSSP_ERR_BASE + 810 + 9;
+ {$EXTERNALSYM GQOS_SETQOS_BADADDRLEN}
+ GQOS_SETQOS_NOSOCKNAME = QOSSP_ERR_BASE + 810 + 10;
+ {$EXTERNALSYM GQOS_SETQOS_NOSOCKNAME}
+ GQOS_SETQOS_IPTOSFAIL = QOSSP_ERR_BASE + 810 + 11;
+ {$EXTERNALSYM GQOS_SETQOS_IPTOSFAIL}
+ GQOS_SETQOS_OPENSESSIONFAIL = QOSSP_ERR_BASE + 810 + 12;
+ {$EXTERNALSYM GQOS_SETQOS_OPENSESSIONFAIL}
+ GQOS_SETQOS_SENDFAIL = QOSSP_ERR_BASE + 810 + 13;
+ {$EXTERNALSYM GQOS_SETQOS_SENDFAIL}
+ GQOS_SETQOS_RECVFAIL = QOSSP_ERR_BASE + 810 + 14;
+ {$EXTERNALSYM GQOS_SETQOS_RECVFAIL}
+ GQOS_SETQOS_BADPOLICYOBJECT = QOSSP_ERR_BASE + 810 + 15;
+ {$EXTERNALSYM GQOS_SETQOS_BADPOLICYOBJECT}
+ GQOS_SETQOS_UNKNOWNFILTEROBJ = QOSSP_ERR_BASE + 810 + 16;
+ {$EXTERNALSYM GQOS_SETQOS_UNKNOWNFILTEROBJ}
+ GQOS_SETQOS_BADFILTERTYPE = QOSSP_ERR_BASE + 810 + 17;
+ {$EXTERNALSYM GQOS_SETQOS_BADFILTERTYPE}
+ GQOS_SETQOS_BADFILTERCOUNT = QOSSP_ERR_BASE + 810 + 18;
+ {$EXTERNALSYM GQOS_SETQOS_BADFILTERCOUNT}
+ GQOS_SETQOS_BADOBJLENGTH = QOSSP_ERR_BASE + 810 + 19;
+ {$EXTERNALSYM GQOS_SETQOS_BADOBJLENGTH}
+ GQOS_SETQOS_BADFLOWCOUNT = QOSSP_ERR_BASE + 810 + 20;
+ {$EXTERNALSYM GQOS_SETQOS_BADFLOWCOUNT}
+ GQOS_SETQOS_UNKNOWNPSOBJ = QOSSP_ERR_BASE + 810 + 21;
+ {$EXTERNALSYM GQOS_SETQOS_UNKNOWNPSOBJ}
+ GQOS_SETQOS_BADPOLICYOBJ = QOSSP_ERR_BASE + 810 + 22;
+ {$EXTERNALSYM GQOS_SETQOS_BADPOLICYOBJ}
+ GQOS_SETQOS_BADFLOWDESC = QOSSP_ERR_BASE + 810 + 23;
+ {$EXTERNALSYM GQOS_SETQOS_BADFLOWDESC}
+ GQOS_SETQOS_BADPROVSPECOBJ = QOSSP_ERR_BASE + 810 + 24;
+ {$EXTERNALSYM GQOS_SETQOS_BADPROVSPECOBJ}
+ GQOS_SETQOS_NOLOOPBACK = QOSSP_ERR_BASE + 810 + 25;
+ {$EXTERNALSYM GQOS_SETQOS_NOLOOPBACK}
+ GQOS_SETQOS_MODENOTSUPPORTED = QOSSP_ERR_BASE + 810 + 26;
+ {$EXTERNALSYM GQOS_SETQOS_MODENOTSUPPORTED}
+ GQOS_SETQOS_MISSINGFLOWDESC = QOSSP_ERR_BASE + 810 + 27;
+ {$EXTERNALSYM GQOS_SETQOS_MISSINGFLOWDESC}
+
+// SIO_GET_QOS error
+
+ GQOS_GETQOS_BADOUTBUFFER = QOSSP_ERR_BASE + 840 + 1;
+ {$EXTERNALSYM GQOS_GETQOS_BADOUTBUFFER}
+ GQOS_GETQOS_SYSTEMFAILURE = QOSSP_ERR_BASE + 840 + 2;
+ {$EXTERNALSYM GQOS_GETQOS_SYSTEMFAILURE}
+ GQOS_GETQOS_EXCEPTION = QOSSP_ERR_BASE + 840 + 3;
+ {$EXTERNALSYM GQOS_GETQOS_EXCEPTION}
+ GQOS_GETQOS_INTERNALFAILURE = QOSSP_ERR_BASE + 840 + 4;
+ {$EXTERNALSYM GQOS_GETQOS_INTERNALFAILURE}
+
+// SIO_CHK_QOS error
+
+ GQOS_CHKQOS_BADINBUFFER = QOSSP_ERR_BASE + 850 + 1;
+ {$EXTERNALSYM GQOS_CHKQOS_BADINBUFFER}
+ GQOS_CHKQOS_BADOUTBUFFER = QOSSP_ERR_BASE + 850 + 2;
+ {$EXTERNALSYM GQOS_CHKQOS_BADOUTBUFFER}
+ GQOS_CHKQOS_SYSTEMFAILURE = QOSSP_ERR_BASE + 850 + 3;
+ {$EXTERNALSYM GQOS_CHKQOS_SYSTEMFAILURE}
+ GQOS_CHKQOS_INTERNALFAILURE = QOSSP_ERR_BASE + 850 + 4;
+ {$EXTERNALSYM GQOS_CHKQOS_INTERNALFAILURE}
+ GQOS_CHKQOS_BADPARAMETER = QOSSP_ERR_BASE + 850 + 5;
+ {$EXTERNALSYM GQOS_CHKQOS_BADPARAMETER}
+ GQOS_CHKQOS_EXCEPTION = QOSSP_ERR_BASE + 850 + 6;
+ {$EXTERNALSYM GQOS_CHKQOS_EXCEPTION}
+
+implementation
+
+end.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/packages/extra/winunits/jwareason.pas b/packages/extra/winunits/jwareason.pas
index 36a7fdc397..2bf4e7ee1f 100644
--- a/packages/extra/winunits/jwareason.pas
+++ b/packages/extra/winunits/jwareason.pas
@@ -1,236 +1,236 @@
-{******************************************************************************}
-{ }
-{ Windows Shutdown Reason Codes interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: reason.h, released June 2000. The original Pascal }
-{ code is: Reason.pas, released December 2000. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwareason.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaReason;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "WinReg.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaWinType;
-
-// Reason flags
-
-// Flags used by the various UIs.
-
-const
- SHTDN_REASON_FLAG_COMMENT_REQUIRED = $01000000;
- {$EXTERNALSYM SHTDN_REASON_FLAG_COMMENT_REQUIRED}
- SHTDN_REASON_FLAG_DIRTY_PROBLEM_ID_REQUIRED = $02000000;
- {$EXTERNALSYM SHTDN_REASON_FLAG_DIRTY_PROBLEM_ID_REQUIRED}
- SHTDN_REASON_FLAG_CLEAN_UI = $04000000;
- {$EXTERNALSYM SHTDN_REASON_FLAG_CLEAN_UI}
- SHTDN_REASON_FLAG_DIRTY_UI = $08000000;
- {$EXTERNALSYM SHTDN_REASON_FLAG_DIRTY_UI}
-
-// Flags that end up in the event log code.
-
- SHTDN_REASON_FLAG_USER_DEFINED = $40000000;
- {$EXTERNALSYM SHTDN_REASON_FLAG_USER_DEFINED}
- SHTDN_REASON_FLAG_PLANNED = DWORD($80000000);
- {$EXTERNALSYM SHTDN_REASON_FLAG_PLANNED}
-
-// Microsoft major reasons.
-
- SHTDN_REASON_MAJOR_OTHER = $00000000;
- {$EXTERNALSYM SHTDN_REASON_MAJOR_OTHER}
- SHTDN_REASON_MAJOR_NONE = $00000000;
- {$EXTERNALSYM SHTDN_REASON_MAJOR_NONE}
- SHTDN_REASON_MAJOR_HARDWARE = $00010000;
- {$EXTERNALSYM SHTDN_REASON_MAJOR_HARDWARE}
- SHTDN_REASON_MAJOR_OPERATINGSYSTEM = $00020000;
- {$EXTERNALSYM SHTDN_REASON_MAJOR_OPERATINGSYSTEM}
- SHTDN_REASON_MAJOR_SOFTWARE = $00030000;
- {$EXTERNALSYM SHTDN_REASON_MAJOR_SOFTWARE}
- SHTDN_REASON_MAJOR_APPLICATION = $00040000;
- {$EXTERNALSYM SHTDN_REASON_MAJOR_APPLICATION}
- SHTDN_REASON_MAJOR_SYSTEM = $00050000;
- {$EXTERNALSYM SHTDN_REASON_MAJOR_SYSTEM}
- SHTDN_REASON_MAJOR_POWER = $00060000;
- {$EXTERNALSYM SHTDN_REASON_MAJOR_POWER}
- SHTDN_REASON_MAJOR_LEGACY_API = $00070000;
- {$EXTERNALSYM SHTDN_REASON_MAJOR_LEGACY_API}
-
-// Microsoft minor reasons.
-
- SHTDN_REASON_MINOR_OTHER = $00000000;
- {$EXTERNALSYM SHTDN_REASON_MINOR_OTHER}
- SHTDN_REASON_MINOR_NONE = $000000ff;
- {$EXTERNALSYM SHTDN_REASON_MINOR_NONE}
- SHTDN_REASON_MINOR_MAINTENANCE = $00000001;
- {$EXTERNALSYM SHTDN_REASON_MINOR_MAINTENANCE}
- SHTDN_REASON_MINOR_INSTALLATION = $00000002;
- {$EXTERNALSYM SHTDN_REASON_MINOR_INSTALLATION}
- SHTDN_REASON_MINOR_UPGRADE = $00000003;
- {$EXTERNALSYM SHTDN_REASON_MINOR_UPGRADE}
- SHTDN_REASON_MINOR_RECONFIG = $00000004;
- {$EXTERNALSYM SHTDN_REASON_MINOR_RECONFIG}
- SHTDN_REASON_MINOR_HUNG = $00000005;
- {$EXTERNALSYM SHTDN_REASON_MINOR_HUNG}
- SHTDN_REASON_MINOR_UNSTABLE = $00000006;
- {$EXTERNALSYM SHTDN_REASON_MINOR_UNSTABLE}
- SHTDN_REASON_MINOR_DISK = $00000007;
- {$EXTERNALSYM SHTDN_REASON_MINOR_DISK}
- SHTDN_REASON_MINOR_PROCESSOR = $00000008;
- {$EXTERNALSYM SHTDN_REASON_MINOR_PROCESSOR}
- SHTDN_REASON_MINOR_NETWORKCARD = $00000009;
- {$EXTERNALSYM SHTDN_REASON_MINOR_NETWORKCARD}
- SHTDN_REASON_MINOR_POWER_SUPPLY = $0000000a;
- {$EXTERNALSYM SHTDN_REASON_MINOR_POWER_SUPPLY}
- SHTDN_REASON_MINOR_CORDUNPLUGGED = $0000000b;
- {$EXTERNALSYM SHTDN_REASON_MINOR_CORDUNPLUGGED}
- SHTDN_REASON_MINOR_ENVIRONMENT = $0000000c;
- {$EXTERNALSYM SHTDN_REASON_MINOR_ENVIRONMENT}
- SHTDN_REASON_MINOR_HARDWARE_DRIVER = $0000000d;
- {$EXTERNALSYM SHTDN_REASON_MINOR_HARDWARE_DRIVER}
- SHTDN_REASON_MINOR_OTHERDRIVER = $0000000e;
- {$EXTERNALSYM SHTDN_REASON_MINOR_OTHERDRIVER}
- SHTDN_REASON_MINOR_BLUESCREEN = $0000000F;
- {$EXTERNALSYM SHTDN_REASON_MINOR_BLUESCREEN}
- SHTDN_REASON_MINOR_SERVICEPACK = $00000010;
- {$EXTERNALSYM SHTDN_REASON_MINOR_SERVICEPACK}
- SHTDN_REASON_MINOR_HOTFIX = $00000011;
- {$EXTERNALSYM SHTDN_REASON_MINOR_HOTFIX}
- SHTDN_REASON_MINOR_SECURITYFIX = $00000012;
- {$EXTERNALSYM SHTDN_REASON_MINOR_SECURITYFIX}
- SHTDN_REASON_MINOR_SECURITY = $00000013;
- {$EXTERNALSYM SHTDN_REASON_MINOR_SECURITY}
- SHTDN_REASON_MINOR_NETWORK_CONNECTIVITY = $00000014;
- {$EXTERNALSYM SHTDN_REASON_MINOR_NETWORK_CONNECTIVITY}
- SHTDN_REASON_MINOR_WMI = $00000015;
- {$EXTERNALSYM SHTDN_REASON_MINOR_WMI}
- SHTDN_REASON_MINOR_SERVICEPACK_UNINSTALL = $00000016;
- {$EXTERNALSYM SHTDN_REASON_MINOR_SERVICEPACK_UNINSTALL}
- SHTDN_REASON_MINOR_HOTFIX_UNINSTALL = $00000017;
- {$EXTERNALSYM SHTDN_REASON_MINOR_HOTFIX_UNINSTALL}
- SHTDN_REASON_MINOR_SECURITYFIX_UNINSTALL = $00000018;
- {$EXTERNALSYM SHTDN_REASON_MINOR_SECURITYFIX_UNINSTALL}
- SHTDN_REASON_MINOR_MMC = $00000019;
- {$EXTERNALSYM SHTDN_REASON_MINOR_MMC}
- SHTDN_REASON_MINOR_TERMSRV = $00000020;
- {$EXTERNALSYM SHTDN_REASON_MINOR_TERMSRV}
- SHTDN_REASON_MINOR_DC_PROMOTION = $00000021;
- {$EXTERNALSYM SHTDN_REASON_MINOR_DC_PROMOTION}
- SHTDN_REASON_MINOR_DC_DEMOTION = $00000022;
- {$EXTERNALSYM SHTDN_REASON_MINOR_DC_DEMOTION}
-
- SHTDN_REASON_UNKNOWN = SHTDN_REASON_MINOR_NONE;
- {$EXTERNALSYM SHTDN_REASON_UNKNOWN}
- SHTDN_REASON_LEGACY_API = SHTDN_REASON_MAJOR_LEGACY_API or SHTDN_REASON_FLAG_PLANNED;
- {$EXTERNALSYM SHTDN_REASON_LEGACY_API}
-
-// This mask cuts out UI flags.
-
- SHTDN_REASON_VALID_BIT_MASK = DWORD($c0ffffff);
- {$EXTERNALSYM SHTDN_REASON_VALID_BIT_MASK}
-
-// Convenience flags.
-
- PCLEANUI = SHTDN_REASON_FLAG_PLANNED or SHTDN_REASON_FLAG_CLEAN_UI;
- {$EXTERNALSYM PCLEANUI}
- UCLEANUI = SHTDN_REASON_FLAG_CLEAN_UI;
- {$EXTERNALSYM UCLEANUI}
- PDIRTYUI = SHTDN_REASON_FLAG_PLANNED or SHTDN_REASON_FLAG_DIRTY_UI;
- {$EXTERNALSYM PDIRTYUI}
- UDIRTYUI = SHTDN_REASON_FLAG_DIRTY_UI;
- {$EXTERNALSYM UDIRTYUI}
-
-(*
- * Maximum character lengths for reason name, description, problem id, and
- * comment respectively.
- *)
-
- MAX_REASON_NAME_LEN = 64;
- {$EXTERNALSYM MAX_REASON_NAME_LEN}
- MAX_REASON_DESC_LEN = 256;
- {$EXTERNALSYM MAX_REASON_DESC_LEN}
- MAX_REASON_BUGID_LEN = 32;
- {$EXTERNALSYM MAX_REASON_BUGID_LEN}
- MAX_REASON_COMMENT_LEN = 512;
- {$EXTERNALSYM MAX_REASON_COMMENT_LEN}
- SHUTDOWN_TYPE_LEN = 32;
- {$EXTERNALSYM SHUTDOWN_TYPE_LEN}
-
-(*
- * S.E.T. policy value
- *
- *)
-
- POLICY_SHOWREASONUI_NEVER = 0;
- {$EXTERNALSYM POLICY_SHOWREASONUI_NEVER}
- POLICY_SHOWREASONUI_ALWAYS = 1;
- {$EXTERNALSYM POLICY_SHOWREASONUI_ALWAYS}
- POLICY_SHOWREASONUI_WORKSTATIONONLY = 2;
- {$EXTERNALSYM POLICY_SHOWREASONUI_WORKSTATIONONLY}
- POLICY_SHOWREASONUI_SERVERONLY = 3;
- {$EXTERNALSYM POLICY_SHOWREASONUI_SERVERONLY}
-
-(*
- * Snapshot policy values
- *)
-
- SNAPSHOT_POLICY_NEVER = 0;
- {$EXTERNALSYM SNAPSHOT_POLICY_NEVER}
- SNAPSHOT_POLICY_ALWAYS = 1;
- {$EXTERNALSYM SNAPSHOT_POLICY_ALWAYS}
- SNAPSHOT_POLICY_UNPLANNED = 2;
- {$EXTERNALSYM SNAPSHOT_POLICY_UNPLANNED}
-
-(*
- * Maximue user defined reasons
- *)
-
- MAX_NUM_REASONS = 256;
- {$EXTERNALSYM MAX_NUM_REASONS}
-
-implementation
-
-end.
+{******************************************************************************}
+{ }
+{ Windows Shutdown Reason Codes interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: reason.h, released June 2000. The original Pascal }
+{ code is: Reason.pas, released December 2000. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwareason.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaReason;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "WinReg.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaWinType;
+
+// Reason flags
+
+// Flags used by the various UIs.
+
+const
+ SHTDN_REASON_FLAG_COMMENT_REQUIRED = $01000000;
+ {$EXTERNALSYM SHTDN_REASON_FLAG_COMMENT_REQUIRED}
+ SHTDN_REASON_FLAG_DIRTY_PROBLEM_ID_REQUIRED = $02000000;
+ {$EXTERNALSYM SHTDN_REASON_FLAG_DIRTY_PROBLEM_ID_REQUIRED}
+ SHTDN_REASON_FLAG_CLEAN_UI = $04000000;
+ {$EXTERNALSYM SHTDN_REASON_FLAG_CLEAN_UI}
+ SHTDN_REASON_FLAG_DIRTY_UI = $08000000;
+ {$EXTERNALSYM SHTDN_REASON_FLAG_DIRTY_UI}
+
+// Flags that end up in the event log code.
+
+ SHTDN_REASON_FLAG_USER_DEFINED = $40000000;
+ {$EXTERNALSYM SHTDN_REASON_FLAG_USER_DEFINED}
+ SHTDN_REASON_FLAG_PLANNED = DWORD($80000000);
+ {$EXTERNALSYM SHTDN_REASON_FLAG_PLANNED}
+
+// Microsoft major reasons.
+
+ SHTDN_REASON_MAJOR_OTHER = $00000000;
+ {$EXTERNALSYM SHTDN_REASON_MAJOR_OTHER}
+ SHTDN_REASON_MAJOR_NONE = $00000000;
+ {$EXTERNALSYM SHTDN_REASON_MAJOR_NONE}
+ SHTDN_REASON_MAJOR_HARDWARE = $00010000;
+ {$EXTERNALSYM SHTDN_REASON_MAJOR_HARDWARE}
+ SHTDN_REASON_MAJOR_OPERATINGSYSTEM = $00020000;
+ {$EXTERNALSYM SHTDN_REASON_MAJOR_OPERATINGSYSTEM}
+ SHTDN_REASON_MAJOR_SOFTWARE = $00030000;
+ {$EXTERNALSYM SHTDN_REASON_MAJOR_SOFTWARE}
+ SHTDN_REASON_MAJOR_APPLICATION = $00040000;
+ {$EXTERNALSYM SHTDN_REASON_MAJOR_APPLICATION}
+ SHTDN_REASON_MAJOR_SYSTEM = $00050000;
+ {$EXTERNALSYM SHTDN_REASON_MAJOR_SYSTEM}
+ SHTDN_REASON_MAJOR_POWER = $00060000;
+ {$EXTERNALSYM SHTDN_REASON_MAJOR_POWER}
+ SHTDN_REASON_MAJOR_LEGACY_API = $00070000;
+ {$EXTERNALSYM SHTDN_REASON_MAJOR_LEGACY_API}
+
+// Microsoft minor reasons.
+
+ SHTDN_REASON_MINOR_OTHER = $00000000;
+ {$EXTERNALSYM SHTDN_REASON_MINOR_OTHER}
+ SHTDN_REASON_MINOR_NONE = $000000ff;
+ {$EXTERNALSYM SHTDN_REASON_MINOR_NONE}
+ SHTDN_REASON_MINOR_MAINTENANCE = $00000001;
+ {$EXTERNALSYM SHTDN_REASON_MINOR_MAINTENANCE}
+ SHTDN_REASON_MINOR_INSTALLATION = $00000002;
+ {$EXTERNALSYM SHTDN_REASON_MINOR_INSTALLATION}
+ SHTDN_REASON_MINOR_UPGRADE = $00000003;
+ {$EXTERNALSYM SHTDN_REASON_MINOR_UPGRADE}
+ SHTDN_REASON_MINOR_RECONFIG = $00000004;
+ {$EXTERNALSYM SHTDN_REASON_MINOR_RECONFIG}
+ SHTDN_REASON_MINOR_HUNG = $00000005;
+ {$EXTERNALSYM SHTDN_REASON_MINOR_HUNG}
+ SHTDN_REASON_MINOR_UNSTABLE = $00000006;
+ {$EXTERNALSYM SHTDN_REASON_MINOR_UNSTABLE}
+ SHTDN_REASON_MINOR_DISK = $00000007;
+ {$EXTERNALSYM SHTDN_REASON_MINOR_DISK}
+ SHTDN_REASON_MINOR_PROCESSOR = $00000008;
+ {$EXTERNALSYM SHTDN_REASON_MINOR_PROCESSOR}
+ SHTDN_REASON_MINOR_NETWORKCARD = $00000009;
+ {$EXTERNALSYM SHTDN_REASON_MINOR_NETWORKCARD}
+ SHTDN_REASON_MINOR_POWER_SUPPLY = $0000000a;
+ {$EXTERNALSYM SHTDN_REASON_MINOR_POWER_SUPPLY}
+ SHTDN_REASON_MINOR_CORDUNPLUGGED = $0000000b;
+ {$EXTERNALSYM SHTDN_REASON_MINOR_CORDUNPLUGGED}
+ SHTDN_REASON_MINOR_ENVIRONMENT = $0000000c;
+ {$EXTERNALSYM SHTDN_REASON_MINOR_ENVIRONMENT}
+ SHTDN_REASON_MINOR_HARDWARE_DRIVER = $0000000d;
+ {$EXTERNALSYM SHTDN_REASON_MINOR_HARDWARE_DRIVER}
+ SHTDN_REASON_MINOR_OTHERDRIVER = $0000000e;
+ {$EXTERNALSYM SHTDN_REASON_MINOR_OTHERDRIVER}
+ SHTDN_REASON_MINOR_BLUESCREEN = $0000000F;
+ {$EXTERNALSYM SHTDN_REASON_MINOR_BLUESCREEN}
+ SHTDN_REASON_MINOR_SERVICEPACK = $00000010;
+ {$EXTERNALSYM SHTDN_REASON_MINOR_SERVICEPACK}
+ SHTDN_REASON_MINOR_HOTFIX = $00000011;
+ {$EXTERNALSYM SHTDN_REASON_MINOR_HOTFIX}
+ SHTDN_REASON_MINOR_SECURITYFIX = $00000012;
+ {$EXTERNALSYM SHTDN_REASON_MINOR_SECURITYFIX}
+ SHTDN_REASON_MINOR_SECURITY = $00000013;
+ {$EXTERNALSYM SHTDN_REASON_MINOR_SECURITY}
+ SHTDN_REASON_MINOR_NETWORK_CONNECTIVITY = $00000014;
+ {$EXTERNALSYM SHTDN_REASON_MINOR_NETWORK_CONNECTIVITY}
+ SHTDN_REASON_MINOR_WMI = $00000015;
+ {$EXTERNALSYM SHTDN_REASON_MINOR_WMI}
+ SHTDN_REASON_MINOR_SERVICEPACK_UNINSTALL = $00000016;
+ {$EXTERNALSYM SHTDN_REASON_MINOR_SERVICEPACK_UNINSTALL}
+ SHTDN_REASON_MINOR_HOTFIX_UNINSTALL = $00000017;
+ {$EXTERNALSYM SHTDN_REASON_MINOR_HOTFIX_UNINSTALL}
+ SHTDN_REASON_MINOR_SECURITYFIX_UNINSTALL = $00000018;
+ {$EXTERNALSYM SHTDN_REASON_MINOR_SECURITYFIX_UNINSTALL}
+ SHTDN_REASON_MINOR_MMC = $00000019;
+ {$EXTERNALSYM SHTDN_REASON_MINOR_MMC}
+ SHTDN_REASON_MINOR_TERMSRV = $00000020;
+ {$EXTERNALSYM SHTDN_REASON_MINOR_TERMSRV}
+ SHTDN_REASON_MINOR_DC_PROMOTION = $00000021;
+ {$EXTERNALSYM SHTDN_REASON_MINOR_DC_PROMOTION}
+ SHTDN_REASON_MINOR_DC_DEMOTION = $00000022;
+ {$EXTERNALSYM SHTDN_REASON_MINOR_DC_DEMOTION}
+
+ SHTDN_REASON_UNKNOWN = SHTDN_REASON_MINOR_NONE;
+ {$EXTERNALSYM SHTDN_REASON_UNKNOWN}
+ SHTDN_REASON_LEGACY_API = SHTDN_REASON_MAJOR_LEGACY_API or SHTDN_REASON_FLAG_PLANNED;
+ {$EXTERNALSYM SHTDN_REASON_LEGACY_API}
+
+// This mask cuts out UI flags.
+
+ SHTDN_REASON_VALID_BIT_MASK = DWORD($c0ffffff);
+ {$EXTERNALSYM SHTDN_REASON_VALID_BIT_MASK}
+
+// Convenience flags.
+
+ PCLEANUI = SHTDN_REASON_FLAG_PLANNED or SHTDN_REASON_FLAG_CLEAN_UI;
+ {$EXTERNALSYM PCLEANUI}
+ UCLEANUI = SHTDN_REASON_FLAG_CLEAN_UI;
+ {$EXTERNALSYM UCLEANUI}
+ PDIRTYUI = SHTDN_REASON_FLAG_PLANNED or SHTDN_REASON_FLAG_DIRTY_UI;
+ {$EXTERNALSYM PDIRTYUI}
+ UDIRTYUI = SHTDN_REASON_FLAG_DIRTY_UI;
+ {$EXTERNALSYM UDIRTYUI}
+
+(*
+ * Maximum character lengths for reason name, description, problem id, and
+ * comment respectively.
+ *)
+
+ MAX_REASON_NAME_LEN = 64;
+ {$EXTERNALSYM MAX_REASON_NAME_LEN}
+ MAX_REASON_DESC_LEN = 256;
+ {$EXTERNALSYM MAX_REASON_DESC_LEN}
+ MAX_REASON_BUGID_LEN = 32;
+ {$EXTERNALSYM MAX_REASON_BUGID_LEN}
+ MAX_REASON_COMMENT_LEN = 512;
+ {$EXTERNALSYM MAX_REASON_COMMENT_LEN}
+ SHUTDOWN_TYPE_LEN = 32;
+ {$EXTERNALSYM SHUTDOWN_TYPE_LEN}
+
+(*
+ * S.E.T. policy value
+ *
+ *)
+
+ POLICY_SHOWREASONUI_NEVER = 0;
+ {$EXTERNALSYM POLICY_SHOWREASONUI_NEVER}
+ POLICY_SHOWREASONUI_ALWAYS = 1;
+ {$EXTERNALSYM POLICY_SHOWREASONUI_ALWAYS}
+ POLICY_SHOWREASONUI_WORKSTATIONONLY = 2;
+ {$EXTERNALSYM POLICY_SHOWREASONUI_WORKSTATIONONLY}
+ POLICY_SHOWREASONUI_SERVERONLY = 3;
+ {$EXTERNALSYM POLICY_SHOWREASONUI_SERVERONLY}
+
+(*
+ * Snapshot policy values
+ *)
+
+ SNAPSHOT_POLICY_NEVER = 0;
+ {$EXTERNALSYM SNAPSHOT_POLICY_NEVER}
+ SNAPSHOT_POLICY_ALWAYS = 1;
+ {$EXTERNALSYM SNAPSHOT_POLICY_ALWAYS}
+ SNAPSHOT_POLICY_UNPLANNED = 2;
+ {$EXTERNALSYM SNAPSHOT_POLICY_UNPLANNED}
+
+(*
+ * Maximue user defined reasons
+ *)
+
+ MAX_NUM_REASONS = 256;
+ {$EXTERNALSYM MAX_NUM_REASONS}
+
+implementation
+
+end.
diff --git a/packages/extra/winunits/jwaregstr.pas b/packages/extra/winunits/jwaregstr.pas
index 2f9d8671c8..2a37d3afd6 100644
--- a/packages/extra/winunits/jwaregstr.pas
+++ b/packages/extra/winunits/jwaregstr.pas
@@ -1,2549 +1,2549 @@
-{******************************************************************************}
-{ }
-{ Registry Key Definitions API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: regstr.h, released June 2000. The original Pascal }
-{ code is: RegStr.pas, released December 2000. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwaregstr.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaRegStr;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "regstr.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-{.$DEFINE NEC_98}
-
-uses
- JwaWinType;
-
-const
-
-// Public registry key names
-
- REGSTR_KEY_CLASS = 'Class'; // under LOCAL_MACHINE
- {$EXTERNALSYM REGSTR_KEY_CLASS}
- REGSTR_KEY_CONFIG = 'Config'; // under LOCAL_MACHINE
- {$EXTERNALSYM REGSTR_KEY_CONFIG}
- REGSTR_KEY_ENUM = 'Enum'; // under LOCAL_MACHINE
- {$EXTERNALSYM REGSTR_KEY_ENUM}
- REGSTR_KEY_ROOTENUM = 'Root'; // child of ENUM
- {$EXTERNALSYM REGSTR_KEY_ROOTENUM}
- REGSTR_KEY_BIOSENUM = 'BIOS'; // child of ENUM
- {$EXTERNALSYM REGSTR_KEY_BIOSENUM}
- REGSTR_KEY_ACPIENUM = 'ACPI'; // child of ENUM
- {$EXTERNALSYM REGSTR_KEY_ACPIENUM}
- REGSTR_KEY_PCMCIAENUM = 'PCMCIA'; // child of ENUM
- {$EXTERNALSYM REGSTR_KEY_PCMCIAENUM}
- REGSTR_KEY_PCIENUM = 'PCI'; // child of ENUM
- {$EXTERNALSYM REGSTR_KEY_PCIENUM}
- REGSTR_KEY_VPOWERDENUM = 'VPOWERD'; // child of ENUM
- {$EXTERNALSYM REGSTR_KEY_VPOWERDENUM}
- {$IFDEF NEC_98}
- REGSTR_KEY_ISAENUM = 'C98PnP'; // child of ENUM
- {$EXTERNALSYM REGSTR_KEY_ISAENUM}
- REGSTR_KEY_EISAENUM = 'NESA'; // child of ENUM
- {$EXTERNALSYM REGSTR_KEY_EISAENUM}
- {$ELSE}
- REGSTR_KEY_ISAENUM = 'ISAPnP'; // child of ENUM
- {$EXTERNALSYM REGSTR_KEY_ISAENUM}
- REGSTR_KEY_EISAENUM = 'EISA'; // child of ENUM
- {$EXTERNALSYM REGSTR_KEY_EISAENUM}
- {$ENDIF NEC_98}
- REGSTR_KEY_LOGCONFIG = 'LogConfig'; // child of enum\<enumerator>\<deviceid>\<instanceid>
- {$EXTERNALSYM REGSTR_KEY_LOGCONFIG}
- REGSTR_KEY_SYSTEMBOARD = '*PNP0C01'; // child of enum\root
- {$EXTERNALSYM REGSTR_KEY_SYSTEMBOARD}
- REGSTR_KEY_APM = '*PNP0C05'; // child of enum\root
- {$EXTERNALSYM REGSTR_KEY_APM}
-
- REGSTR_KEY_INIUPDATE = 'IniUpdate';
- {$EXTERNALSYM REGSTR_KEY_INIUPDATE}
- REG_KEY_INSTDEV = 'Installed'; // child of hklm\class\classname (Win98-only)
- {$EXTERNALSYM REG_KEY_INSTDEV}
-
- REGSTR_KEY_DOSOPTCDROM = 'CD-ROM';
- {$EXTERNALSYM REGSTR_KEY_DOSOPTCDROM}
- REGSTR_KEY_DOSOPTMOUSE = 'MOUSE';
- {$EXTERNALSYM REGSTR_KEY_DOSOPTMOUSE}
-
- REGSTR_KEY_KNOWNDOCKINGSTATES = 'Hardware Profiles';
- {$EXTERNALSYM REGSTR_KEY_KNOWNDOCKINGSTATES}
- REGSTR_KEY_DEVICEPARAMETERS = 'Device Parameters';
- {$EXTERNALSYM REGSTR_KEY_DEVICEPARAMETERS}
-
-// Public registry paths
-
- REGSTR_DEFAULT_INSTANCE = '0000';
- {$EXTERNALSYM REGSTR_DEFAULT_INSTANCE}
- REGSTR_PATH_MOTHERBOARD = REGSTR_KEY_SYSTEMBOARD + '\' + REGSTR_DEFAULT_INSTANCE;
- {$EXTERNALSYM REGSTR_PATH_MOTHERBOARD}
- REGSTR_PATH_SETUP = 'Software\Microsoft\Windows\CurrentVersion';
- {$EXTERNALSYM REGSTR_PATH_SETUP}
- REGSTR_PATH_DRIVERSIGN = 'Software\Microsoft\Driver Signing';
- {$EXTERNALSYM REGSTR_PATH_DRIVERSIGN}
- REGSTR_PATH_NONDRIVERSIGN = 'Software\Microsoft\Non-Driver Signing';
- {$EXTERNALSYM REGSTR_PATH_NONDRIVERSIGN}
- REGSTR_PATH_DRIVERSIGN_POLICY = 'Software\Policies\Microsoft\Windows NT\Driver Signing';
- {$EXTERNALSYM REGSTR_PATH_DRIVERSIGN_POLICY}
- REGSTR_PATH_NONDRIVERSIGN_POLICY = 'Software\Policies\Microsoft\Windows NT\Non-Driver Signing';
- {$EXTERNALSYM REGSTR_PATH_NONDRIVERSIGN_POLICY}
- REGSTR_PATH_PIFCONVERT = 'Software\Microsoft\Windows\CurrentVersion\PIFConvert';
- {$EXTERNALSYM REGSTR_PATH_PIFCONVERT}
- REGSTR_PATH_MSDOSOPTS = 'Software\Microsoft\Windows\CurrentVersion\MS-DOSOptions';
- {$EXTERNALSYM REGSTR_PATH_MSDOSOPTS}
- REGSTR_PATH_NOSUGGMSDOS = 'Software\Microsoft\Windows\CurrentVersion\NoMSDOSWarn';
- {$EXTERNALSYM REGSTR_PATH_NOSUGGMSDOS}
- REGSTR_PATH_NEWDOSBOX = 'Software\Microsoft\Windows\CurrentVersion\MS-DOSSpecialConfig';
- {$EXTERNALSYM REGSTR_PATH_NEWDOSBOX}
- REGSTR_PATH_RUNONCE = 'Software\Microsoft\Windows\CurrentVersion\RunOnce';
- {$EXTERNALSYM REGSTR_PATH_RUNONCE}
- REGSTR_PATH_RUNONCEEX = 'Software\Microsoft\Windows\CurrentVersion\RunOnceEx';
- {$EXTERNALSYM REGSTR_PATH_RUNONCEEX}
- REGSTR_PATH_RUN = 'Software\Microsoft\Windows\CurrentVersion\Run';
- {$EXTERNALSYM REGSTR_PATH_RUN}
- REGSTR_PATH_RUNSERVICESONCE = 'Software\Microsoft\Windows\CurrentVersion\RunServicesOnce';
- {$EXTERNALSYM REGSTR_PATH_RUNSERVICESONCE}
- REGSTR_PATH_RUNSERVICES = 'Software\Microsoft\Windows\CurrentVersion\RunServices';
- {$EXTERNALSYM REGSTR_PATH_RUNSERVICES}
- REGSTR_PATH_EXPLORER = 'Software\Microsoft\Windows\CurrentVersion\Explorer';
- {$EXTERNALSYM REGSTR_PATH_EXPLORER}
- REGSTR_PATH_DETECT = 'Software\Microsoft\Windows\CurrentVersion\Detect';
- {$EXTERNALSYM REGSTR_PATH_DETECT}
- REGSTR_PATH_APPPATHS = 'Software\Microsoft\Windows\CurrentVersion\App Paths';
- {$EXTERNALSYM REGSTR_PATH_APPPATHS}
- REGSTR_PATH_UNINSTALL = 'Software\Microsoft\Windows\CurrentVersion\Uninstall';
- {$EXTERNALSYM REGSTR_PATH_UNINSTALL}
- REGSTR_PATH_REALMODENET = 'Software\Microsoft\Windows\CurrentVersion\Network\Real Mode Net';
- {$EXTERNALSYM REGSTR_PATH_REALMODENET}
- REGSTR_PATH_NETEQUIV = 'Software\Microsoft\Windows\CurrentVersion\Network\Equivalent';
- {$EXTERNALSYM REGSTR_PATH_NETEQUIV}
- REGSTR_PATH_CVNETWORK = 'Software\Microsoft\Windows\CurrentVersion\Network';
- {$EXTERNALSYM REGSTR_PATH_CVNETWORK}
- REGSTR_PATH_WMI_SECURITY = 'System\CurrentControlSet\Control\Wmi\Security';
- {$EXTERNALSYM REGSTR_PATH_WMI_SECURITY}
- REGSTR_PATH_RELIABILITY = 'Software\Microsoft\Windows\CurrentVersion\Reliability';
- {$EXTERNALSYM REGSTR_PATH_RELIABILITY}
- REGSTR_PATH_RELIABILITY_POLICY = TEXT('Software\Policies\Microsoft\Windows NT\Reliability');
- {$EXTERNALSYM REGSTR_PATH_RELIABILITY_POLICY}
- REGSTR_PATH_RELIABILITY_POLICY_SHUTDOWNREASONUI = TEXT('ShutdownReasonUI');
- {$EXTERNALSYM REGSTR_PATH_RELIABILITY_POLICY_SHUTDOWNREASONUI}
- REGSTR_PATH_RELIABILITY_POLICY_SNAPSHOT = TEXT('Snapshot');
- {$EXTERNALSYM REGSTR_PATH_RELIABILITY_POLICY_SNAPSHOT}
- REGSTR_PATH_RELIABILITY_POLICY_REPORTSNAPSHOT = TEXT('ReportSnapshot');
- {$EXTERNALSYM REGSTR_PATH_RELIABILITY_POLICY_REPORTSNAPSHOT}
- REGSTR_PATH_REINSTALL = 'SOFTWARE\Microsoft\Windows\CurrentVersion\Reinstall';
- {$EXTERNALSYM REGSTR_PATH_REINSTALL}
- REGSTR_PATH_NT_CURRENTVERSION = 'Software\Microsoft\Windows NT\CurrentVersion';
- {$EXTERNALSYM REGSTR_PATH_NT_CURRENTVERSION}
-
- REGSTR_PATH_VOLUMECACHE = 'Software\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches';
- {$EXTERNALSYM REGSTR_PATH_VOLUMECACHE}
- REGSTR_VAL_DISPLAY = 'display';
- {$EXTERNALSYM REGSTR_VAL_DISPLAY}
-
- REGSTR_PATH_IDCONFIGDB = 'System\CurrentControlSet\Control\IDConfigDB';
- {$EXTERNALSYM REGSTR_PATH_IDCONFIGDB}
- REGSTR_PATH_CRITICALDEVICEDATABASE = 'System\CurrentControlSet\Control\CriticalDeviceDatabase';
- {$EXTERNALSYM REGSTR_PATH_CRITICALDEVICEDATABASE}
- REGSTR_PATH_CLASS = 'System\CurrentControlSet\Services\Class';
- {$EXTERNALSYM REGSTR_PATH_CLASS}
- REGSTR_PATH_DISPLAYSETTINGS = 'Display\Settings';
- {$EXTERNALSYM REGSTR_PATH_DISPLAYSETTINGS}
- REGSTR_PATH_FONTS = 'Display\Fonts';
- {$EXTERNALSYM REGSTR_PATH_FONTS}
- REGSTR_PATH_ENUM = 'Enum';
- {$EXTERNALSYM REGSTR_PATH_ENUM}
- REGSTR_PATH_ROOT = 'Enum\Root';
- {$EXTERNALSYM REGSTR_PATH_ROOT}
-
- REGSTR_PATH_CURRENTCONTROLSET = 'System\CurrentControlSet';
- {$EXTERNALSYM REGSTR_PATH_CURRENTCONTROLSET}
- REGSTR_PATH_SYSTEMENUM = 'System\CurrentControlSet\Enum';
- {$EXTERNALSYM REGSTR_PATH_SYSTEMENUM}
- REGSTR_PATH_HWPROFILES = 'System\CurrentControlSet\Hardware Profiles';
- {$EXTERNALSYM REGSTR_PATH_HWPROFILES}
- REGSTR_PATH_HWPROFILESCURRENT = 'System\CurrentControlSet\Hardware Profiles\Current';
- {$EXTERNALSYM REGSTR_PATH_HWPROFILESCURRENT}
- REGSTR_PATH_CLASS_NT = 'System\CurrentControlSet\Control\Class';
- {$EXTERNALSYM REGSTR_PATH_CLASS_NT}
- REGSTR_PATH_PER_HW_ID_STORAGE = 'Software\Microsoft\Windows NT\CurrentVersion\PerHwIdStorage';
- {$EXTERNALSYM REGSTR_PATH_PER_HW_ID_STORAGE}
-
- REGSTR_PATH_DEVICE_CLASSES = 'System\CurrentControlSet\Control\DeviceClasses';
- {$EXTERNALSYM REGSTR_PATH_DEVICE_CLASSES}
-
- REGSTR_PATH_CODEVICEINSTALLERS = 'System\CurrentControlSet\Control\CoDeviceInstallers';
- {$EXTERNALSYM REGSTR_PATH_CODEVICEINSTALLERS}
- REGSTR_PATH_BUSINFORMATION = 'System\CurrentControlSet\Control\PnP\BusInformation';
- {$EXTERNALSYM REGSTR_PATH_BUSINFORMATION}
-
- REGSTR_PATH_SERVICES = 'System\CurrentControlSet\Services';
- {$EXTERNALSYM REGSTR_PATH_SERVICES}
- REGSTR_PATH_VXD = 'System\CurrentControlSet\Services\VxD';
- {$EXTERNALSYM REGSTR_PATH_VXD}
- REGSTR_PATH_IOS = 'System\CurrentControlSet\Services\VxD\IOS';
- {$EXTERNALSYM REGSTR_PATH_IOS}
- REGSTR_PATH_VMM = 'System\CurrentControlSet\Services\VxD\VMM';
- {$EXTERNALSYM REGSTR_PATH_VMM}
- REGSTR_PATH_VPOWERD = 'System\CurrentControlSet\Services\VxD\VPOWERD';
- {$EXTERNALSYM REGSTR_PATH_VPOWERD}
- REGSTR_PATH_VNETSUP = 'System\CurrentControlSet\Services\VxD\VNETSUP';
- {$EXTERNALSYM REGSTR_PATH_VNETSUP}
- REGSTR_PATH_NWREDIR = 'System\CurrentControlSet\Services\VxD\NWREDIR';
- {$EXTERNALSYM REGSTR_PATH_NWREDIR}
- REGSTR_PATH_NCPSERVER = 'System\CurrentControlSet\Services\NcpServer\Parameters';
- {$EXTERNALSYM REGSTR_PATH_NCPSERVER}
- REGSTR_PATH_VCOMM = 'System\CurrentControlSet\Services\VxD\VCOMM';
- {$EXTERNALSYM REGSTR_PATH_VCOMM}
-
- REGSTR_PATH_IOARB = 'System\CurrentControlSet\Services\Arbitrators\IOArb';
- {$EXTERNALSYM REGSTR_PATH_IOARB}
- REGSTR_PATH_ADDRARB = 'System\CurrentControlSet\Services\Arbitrators\AddrArb';
- {$EXTERNALSYM REGSTR_PATH_ADDRARB}
- REGSTR_PATH_DMAARB = 'System\CurrentControlSet\Services\Arbitrators\DMAArb';
- {$EXTERNALSYM REGSTR_PATH_DMAARB}
- REGSTR_PATH_IRQARB = 'System\CurrentControlSet\Services\Arbitrators\IRQArb';
- {$EXTERNALSYM REGSTR_PATH_IRQARB}
-
- REGSTR_PATH_CODEPAGE = 'System\CurrentControlSet\Control\Nls\Codepage';
- {$EXTERNALSYM REGSTR_PATH_CODEPAGE}
- REGSTR_PATH_FILESYSTEM = 'System\CurrentControlSet\Control\FileSystem';
- {$EXTERNALSYM REGSTR_PATH_FILESYSTEM}
- REGSTR_PATH_FILESYSTEM_NOVOLTRACK = 'System\CurrentControlSet\Control\FileSystem\NoVolTrack';
- {$EXTERNALSYM REGSTR_PATH_FILESYSTEM_NOVOLTRACK}
- REGSTR_PATH_CDFS = 'System\CurrentControlSet\Control\FileSystem\CDFS';
- {$EXTERNALSYM REGSTR_PATH_CDFS}
- REGSTR_PATH_WINBOOT = 'System\CurrentControlSet\Control\WinBoot';
- {$EXTERNALSYM REGSTR_PATH_WINBOOT}
- REGSTR_PATH_INSTALLEDFILES = 'System\CurrentControlSet\Control\InstalledFiles';
- {$EXTERNALSYM REGSTR_PATH_INSTALLEDFILES}
- REGSTR_PATH_VMM32FILES = 'System\CurrentControlSet\Control\VMM32Files';
- {$EXTERNALSYM REGSTR_PATH_VMM32FILES}
-
-//
-// Reasonable Limit for Values Names
-//
-
- REGSTR_MAX_VALUE_LENGTH = 256;
- {$EXTERNALSYM REGSTR_MAX_VALUE_LENGTH}
-
-//
-// Values used by user mode Pnp Manager
-//
-
- REGSTR_KEY_DEVICE_PROPERTIES = 'Properties';
- {$EXTERNALSYM REGSTR_KEY_DEVICE_PROPERTIES}
- REGSTR_VAL_SLOTNUMBER = 'SlotNumber';
- {$EXTERNALSYM REGSTR_VAL_SLOTNUMBER}
- REGSTR_VAL_ATTACHEDCOMPONENTS = 'AttachedComponents';
- {$EXTERNALSYM REGSTR_VAL_ATTACHEDCOMPONENTS}
- REGSTR_VAL_BASEDEVICEPATH = 'BaseDevicePath';
- {$EXTERNALSYM REGSTR_VAL_BASEDEVICEPATH}
- REGSTR_VAL_SYSTEMBUSNUMBER = 'SystemBusNumber';
- {$EXTERNALSYM REGSTR_VAL_SYSTEMBUSNUMBER}
- REGSTR_VAL_BUSDATATYPE = 'BusDataType';
- {$EXTERNALSYM REGSTR_VAL_BUSDATATYPE}
- REGSTR_VAL_INTERFACETYPE = 'InterfaceType';
- {$EXTERNALSYM REGSTR_VAL_INTERFACETYPE}
- REGSTR_VAL_SERVICE = 'Service';
- {$EXTERNALSYM REGSTR_VAL_SERVICE}
- REGSTR_VAL_DETECTSIGNATURE = 'DetectSignature';
- {$EXTERNALSYM REGSTR_VAL_DETECTSIGNATURE}
- REGSTR_VAL_CLASSGUID = 'ClassGUID';
- {$EXTERNALSYM REGSTR_VAL_CLASSGUID}
- REGSTR_VAL_INSTANCEIDENTIFIER = 'InstanceIdentifier';
- {$EXTERNALSYM REGSTR_VAL_INSTANCEIDENTIFIER}
- REGSTR_VAL_DUPLICATEOF = 'DuplicateOf';
- {$EXTERNALSYM REGSTR_VAL_DUPLICATEOF}
- REGSTR_VAL_STATUSFLAGS = 'StatusFlags';
- {$EXTERNALSYM REGSTR_VAL_STATUSFLAGS}
- REGSTR_VAL_DISABLECOUNT = 'DisableCount';
- {$EXTERNALSYM REGSTR_VAL_DISABLECOUNT}
- REGSTR_VAL_UNKNOWNPROBLEMS = 'UnknownProblem';
- {$EXTERNALSYM REGSTR_VAL_UNKNOWNPROBLEMS}
- REGSTR_VAL_DOCKSTATE = 'DockState';
- {$EXTERNALSYM REGSTR_VAL_DOCKSTATE}
- REGSTR_VAL_PREFERENCEORDER = 'PreferenceOrder';
- {$EXTERNALSYM REGSTR_VAL_PREFERENCEORDER}
- REGSTR_VAL_USERWAITINTERVAL = 'UserWaitInterval';
- {$EXTERNALSYM REGSTR_VAL_USERWAITINTERVAL}
- REGSTR_VAL_DEVICE_INSTANCE = 'DeviceInstance';
- {$EXTERNALSYM REGSTR_VAL_DEVICE_INSTANCE}
- REGSTR_VAL_SYMBOLIC_LINK = 'SymbolicLink';
- {$EXTERNALSYM REGSTR_VAL_SYMBOLIC_LINK}
- REGSTR_VAL_DEFAULT = 'Default';
- {$EXTERNALSYM REGSTR_VAL_DEFAULT}
- REGSTR_VAL_LOWERFILTERS = 'LowerFilters';
- {$EXTERNALSYM REGSTR_VAL_LOWERFILTERS}
- REGSTR_VAL_UPPERFILTERS = 'UpperFilters';
- {$EXTERNALSYM REGSTR_VAL_UPPERFILTERS}
- REGSTR_VAL_LOCATION_INFORMATION = 'LocationInformation';
- {$EXTERNALSYM REGSTR_VAL_LOCATION_INFORMATION}
- REGSTR_VAL_UI_NUMBER = 'UINumber';
- {$EXTERNALSYM REGSTR_VAL_UI_NUMBER}
- REGSTR_VAL_UI_NUMBER_DESC_FORMAT = 'UINumberDescFormat';
- {$EXTERNALSYM REGSTR_VAL_UI_NUMBER_DESC_FORMAT}
- REGSTR_VAL_CAPABILITIES = 'Capabilities';
- {$EXTERNALSYM REGSTR_VAL_CAPABILITIES}
- REGSTR_VAL_DEVICE_TYPE = 'DeviceType';
- {$EXTERNALSYM REGSTR_VAL_DEVICE_TYPE}
- REGSTR_VAL_DEVICE_CHARACTERISTICS = 'DeviceCharacteristics';
- {$EXTERNALSYM REGSTR_VAL_DEVICE_CHARACTERISTICS}
- REGSTR_VAL_DEVICE_SECURITY_DESCRIPTOR = 'Security';
- {$EXTERNALSYM REGSTR_VAL_DEVICE_SECURITY_DESCRIPTOR}
- REGSTR_VAL_DEVICE_EXCLUSIVE = 'Exclusive';
- {$EXTERNALSYM REGSTR_VAL_DEVICE_EXCLUSIVE}
- REGSTR_VAL_RESOURCE_PICKER_TAGS = 'ResourcePickerTags';
- {$EXTERNALSYM REGSTR_VAL_RESOURCE_PICKER_TAGS}
- REGSTR_VAL_RESOURCE_PICKER_EXCEPTIONS = 'ResourcePickerExceptions';
- {$EXTERNALSYM REGSTR_VAL_RESOURCE_PICKER_EXCEPTIONS}
- REGSTR_VAL_CUSTOM_PROPERTY_CACHE_DATE = 'CustomPropertyCacheDate';
- {$EXTERNALSYM REGSTR_VAL_CUSTOM_PROPERTY_CACHE_DATE}
- REGSTR_VAL_CUSTOM_PROPERTY_HW_ID_KEY = 'CustomPropertyHwIdKey';
- {$EXTERNALSYM REGSTR_VAL_CUSTOM_PROPERTY_HW_ID_KEY}
- REGSTR_VAL_LAST_UPDATE_TIME = 'LastUpdateTime';
- {$EXTERNALSYM REGSTR_VAL_LAST_UPDATE_TIME}
-
-//
-// Values used by kernel mode Pnp Manager
-//
-
- REGSTR_VALUE_DEVICE_OBJECT_NAME = 'DeviceObjectName';
- {$EXTERNALSYM REGSTR_VALUE_DEVICE_OBJECT_NAME}
- REGSTR_VALUE_DEVICE_SYMBOLIC_NAME = 'DeviceSymbolicName';
- {$EXTERNALSYM REGSTR_VALUE_DEVICE_SYMBOLIC_NAME}
- REGSTR_VAL_EJECT_PRIORITY = 'EjectPriority';
-
-//
-// Values used by both kernel-mode and user-mode PnP Managers
-//
-
- REGSTR_KEY_CONTROL = 'Control';
- {$EXTERNALSYM REGSTR_KEY_CONTROL}
- REGSTR_VAL_ACTIVESERVICE = 'ActiveService';
- {$EXTERNALSYM REGSTR_VAL_ACTIVESERVICE}
- REGSTR_VAL_LINKED = 'Linked';
- {$EXTERNALSYM REGSTR_VAL_LINKED}
- REGSTR_VAL_PHYSICALDEVICEOBJECT = 'PhysicalDeviceObject';
- {$EXTERNALSYM REGSTR_VAL_PHYSICALDEVICEOBJECT}
- REGSTR_VAL_REMOVAL_POLICY = 'RemovalPolicy';
- {$EXTERNALSYM REGSTR_VAL_REMOVAL_POLICY}
-
-//
-// Values under REGSTR_PATH_NT_CURRENTVERSION
-//
-
- REGSTR_VAL_CURRENT_VERSION = 'CurrentVersion';
- {$EXTERNALSYM REGSTR_VAL_CURRENT_VERSION}
- REGSTR_VAL_CURRENT_BUILD = 'CurrentBuildNumber';
- {$EXTERNALSYM REGSTR_VAL_CURRENT_BUILD}
- REGSTR_VAL_CURRENT_CSDVERSION = 'CSDVersion';
- {$EXTERNALSYM REGSTR_VAL_CURRENT_CSDVERSION}
- REGSTR_VAL_CURRENT_TYPE = 'CurrentType';
- {$EXTERNALSYM REGSTR_VAL_CURRENT_TYPE}
-
-//
-// Values under REGSTR_PATH_DISPLAYSETTINGS
-//
-
- REGSTR_VAL_BITSPERPIXEL = 'BitsPerPixel';
- {$EXTERNALSYM REGSTR_VAL_BITSPERPIXEL}
- REGSTR_VAL_RESOLUTION = 'Resolution';
- {$EXTERNALSYM REGSTR_VAL_RESOLUTION}
- REGSTR_VAL_DPILOGICALX = 'DPILogicalX';
- {$EXTERNALSYM REGSTR_VAL_DPILOGICALX}
- REGSTR_VAL_DPILOGICALY = 'DPILogicalY';
- {$EXTERNALSYM REGSTR_VAL_DPILOGICALY}
- REGSTR_VAL_DPIPHYSICALX = 'DPIPhysicalX';
- {$EXTERNALSYM REGSTR_VAL_DPIPHYSICALX}
- REGSTR_VAL_DPIPHYSICALY = 'DPIPhysicalY';
- {$EXTERNALSYM REGSTR_VAL_DPIPHYSICALY}
- REGSTR_VAL_REFRESHRATE = 'RefreshRate';
- {$EXTERNALSYM REGSTR_VAL_REFRESHRATE}
- REGSTR_VAL_DISPLAYFLAGS = 'DisplayFlags';
- {$EXTERNALSYM REGSTR_VAL_DISPLAYFLAGS}
-
-// under HKEY_CURRENT_USER
-
- REGSTR_PATH_CONTROLPANEL = 'Control Panel';
- {$EXTERNALSYM REGSTR_PATH_CONTROLPANEL}
-
-// under HKEY_LOCAL_MACHINE
-
- REGSTR_PATH_CONTROLSFOLDER = 'Software\Microsoft\Windows\CurrentVersion\Controls Folder';
- {$EXTERNALSYM REGSTR_PATH_CONTROLSFOLDER}
-
-//
-// Entries under REGSTR_PATH_CODEPAGE
-//
-
- REGSTR_VAL_DOSCP = 'OEMCP';
- {$EXTERNALSYM REGSTR_VAL_DOSCP}
- REGSTR_VAL_WINCP = 'ACP';
- {$EXTERNALSYM REGSTR_VAL_WINCP}
-
- REGSTR_PATH_DYNA_ENUM = 'Config Manager\Enum';
- {$EXTERNALSYM REGSTR_PATH_DYNA_ENUM}
-
-//
-// Entries under REGSTR_PATH_DYNA_ENUM
-//
-
- REGSTR_VAL_HARDWARE_KEY = 'HardWareKey';
- {$EXTERNALSYM REGSTR_VAL_HARDWARE_KEY}
- REGSTR_VAL_ALLOCATION = 'Allocation';
- {$EXTERNALSYM REGSTR_VAL_ALLOCATION}
- REGSTR_VAL_PROBLEM = 'Problem';
- {$EXTERNALSYM REGSTR_VAL_PROBLEM}
- REGSTR_VAL_STATUS = 'Status';
- {$EXTERNALSYM REGSTR_VAL_STATUS}
-
-//
-// Used by address arbitrator
-//
-
- REGSTR_VAL_DONTUSEMEM = 'DontAllocLastMem';
- {$EXTERNALSYM REGSTR_VAL_DONTUSEMEM}
-
-//
-// Entries under REGSTR_PATH_SETUP
-//
-
- REGSTR_VAL_SYSTEMROOT = 'SystemRoot';
- {$EXTERNALSYM REGSTR_VAL_SYSTEMROOT}
- REGSTR_VAL_BOOTCOUNT = 'BootCount';
- {$EXTERNALSYM REGSTR_VAL_BOOTCOUNT}
- REGSTR_VAL_REALNETSTART = 'RealNetStart';
- {$EXTERNALSYM REGSTR_VAL_REALNETSTART}
- REGSTR_VAL_MEDIA = 'MediaPath';
- {$EXTERNALSYM REGSTR_VAL_MEDIA}
- REGSTR_VAL_CONFIG = 'ConfigPath';
- {$EXTERNALSYM REGSTR_VAL_CONFIG}
- REGSTR_VAL_DEVICEPATH = 'DevicePath'; // default search path for .INFs
- {$EXTERNALSYM REGSTR_VAL_DEVICEPATH}
- REGSTR_VAL_SRCPATH = 'SourcePath'; // last source files path during setup.
- {$EXTERNALSYM REGSTR_VAL_SRCPATH}
- REGSTR_VAL_SVCPAKSRCPATH = 'ServicePackSourcePath'; // last service pack source path
- {$EXTERNALSYM REGSTR_VAL_SVCPAKSRCPATH}
- REGSTR_VAL_DRIVERCACHEPATH = 'DriverCachePath'; // location of driver cache
- {$EXTERNALSYM REGSTR_VAL_DRIVERCACHEPATH}
-
- REGSTR_VAL_OLDWINDIR = 'OldWinDir'; // old windows location
- {$EXTERNALSYM REGSTR_VAL_OLDWINDIR}
- REGSTR_VAL_SETUPFLAGS = 'SetupFlags'; // flags that setup passes on after install.
- {$EXTERNALSYM REGSTR_VAL_SETUPFLAGS}
- REGSTR_VAL_REGOWNER = 'RegisteredOwner';
- {$EXTERNALSYM REGSTR_VAL_REGOWNER}
- REGSTR_VAL_REGORGANIZATION = 'RegisteredOrganization';
- {$EXTERNALSYM REGSTR_VAL_REGORGANIZATION}
- REGSTR_VAL_LICENSINGINFO = 'LicensingInfo';
- {$EXTERNALSYM REGSTR_VAL_LICENSINGINFO}
- REGSTR_VAL_OLDMSDOSVER = 'OldMSDOSVer'; // will be DOS ver < 7 (when Setup run)
- {$EXTERNALSYM REGSTR_VAL_OLDMSDOSVER}
- REGSTR_VAL_FIRSTINSTALLDATETIME = 'FirstInstallDateTime'; // will Win 95 install date-time
- {$EXTERNALSYM REGSTR_VAL_FIRSTINSTALLDATETIME}
-
- REGSTR_VAL_INSTALLTYPE = 'InstallType';
- {$EXTERNALSYM REGSTR_VAL_INSTALLTYPE}
-
- // Values for InstallType
-
- IT_COMPACT = $0000;
- {$EXTERNALSYM IT_COMPACT}
- IT_TYPICAL = $0001;
- {$EXTERNALSYM IT_TYPICAL}
- IT_PORTABLE = $0002;
- {$EXTERNALSYM IT_PORTABLE}
- IT_CUSTOM = $0003;
- {$EXTERNALSYM IT_CUSTOM}
-
- REGSTR_VAL_WRAPPER = 'Wrapper';
- {$EXTERNALSYM REGSTR_VAL_WRAPPER}
-
- REGSTR_VAL_LASTALIVEINTERVAL = 'TimeStampInterval';
- {$EXTERNALSYM REGSTR_VAL_LASTALIVEINTERVAL}
- REGSTR_VAL_LASTALIVESTAMP = 'LastAliveStamp';
- {$EXTERNALSYM REGSTR_VAL_LASTALIVESTAMP}
- REGSTR_VAL_LASTALIVEUPTIME = TEXT('LastAliveUptime');
- {$EXTERNALSYM REGSTR_VAL_LASTALIVEUPTIME}
- REGSTR_VAL_SHUTDOWNREASON = 'ShutdownReason';
- {$EXTERNALSYM REGSTR_VAL_SHUTDOWNREASON}
- REGSTR_VAL_SHUTDOWNREASON_CODE = 'ShutdownReasonCode';
- {$EXTERNALSYM REGSTR_VAL_SHUTDOWNREASON_CODE}
- REGSTR_VAL_SHUTDOWNREASON_COMMENT = 'ShutdownReasonComment';
- {$EXTERNALSYM REGSTR_VAL_SHUTDOWNREASON_COMMENT}
- REGSTR_VAL_SHUTDOWNREASON_PROCESS = 'ShutdownReasonProcess';
- {$EXTERNALSYM REGSTR_VAL_SHUTDOWNREASON_PROCESS}
- REGSTR_VAL_SHUTDOWNREASON_USERNAME = 'ShutdownReasonUserName';
- {$EXTERNALSYM REGSTR_VAL_SHUTDOWNREASON_USERNAME}
- REGSTR_VAL_SHOWREASONUI = 'ShutdownReasonUI';
- {$EXTERNALSYM REGSTR_VAL_SHOWREASONUI}
- REGSTR_VAL_SHUTDOWN_IGNORE_PREDEFINED = 'ShutdownIgnorePredefinedReasons';
- {$EXTERNALSYM REGSTR_VAL_SHUTDOWN_IGNORE_PREDEFINED}
- REGSTR_VAL_SHUTDOWN_STATE_SNAPSHOT = 'ShutdownStateSnapshot';
- {$EXTERNALSYM REGSTR_VAL_SHUTDOWN_STATE_SNAPSHOT}
-
- REGSTR_KEY_SETUP = '\Setup';
- {$EXTERNALSYM REGSTR_KEY_SETUP}
- REGSTR_VAL_BOOTDIR = 'BootDir';
- {$EXTERNALSYM REGSTR_VAL_BOOTDIR}
- REGSTR_VAL_WINBOOTDIR = 'WinbootDir';
- {$EXTERNALSYM REGSTR_VAL_WINBOOTDIR}
- REGSTR_VAL_WINDIR = 'WinDir';
- {$EXTERNALSYM REGSTR_VAL_WINDIR}
-
- REGSTR_VAL_APPINSTPATH = 'AppInstallPath'; // Used by install wizard
- {$EXTERNALSYM REGSTR_VAL_APPINSTPATH}
-
-// Values for international startup disk
-
- REGSTR_PATH_EBD = REGSTR_PATH_SETUP + REGSTR_KEY_SETUP + '\EBD';
- {$EXTERNALSYM REGSTR_PATH_EBD}
-
-// Keys under REGSTR_KEY_EBD
-
- REGSTR_KEY_EBDFILESLOCAL = 'EBDFilesLocale';
- {$EXTERNALSYM REGSTR_KEY_EBDFILESLOCAL}
- REGSTR_KEY_EBDFILESKEYBOARD = 'EBDFilesKeyboard';
- {$EXTERNALSYM REGSTR_KEY_EBDFILESKEYBOARD}
- REGSTR_KEY_EBDAUTOEXECBATLOCAL = 'EBDAutoexecBatLocale';
- {$EXTERNALSYM REGSTR_KEY_EBDAUTOEXECBATLOCAL}
- REGSTR_KEY_EBDAUTOEXECBATKEYBOARD = 'EBDAutoexecBatKeyboard';
- {$EXTERNALSYM REGSTR_KEY_EBDAUTOEXECBATKEYBOARD}
- REGSTR_KEY_EBDCONFIGSYSLOCAL = 'EBDConfigSysLocale';
- {$EXTERNALSYM REGSTR_KEY_EBDCONFIGSYSLOCAL}
- REGSTR_KEY_EBDCONFIGSYSKEYBOARD = 'EBDConfigSysKeyboard';
- {$EXTERNALSYM REGSTR_KEY_EBDCONFIGSYSKEYBOARD}
-
-// Values under REGSTR_PATH_DRIVERSIGN and REGSTR_PATH_NONDRIVERSIGN
-
- REGSTR_VAL_POLICY = 'Policy';
- {$EXTERNALSYM REGSTR_VAL_POLICY}
-
-// Values under REGSTR_PATH_DRIVERSIGN_POLICY and REGSTR_PATH_NONDRIVERSIGN_POLICY
-
- REGSTR_VAL_BEHAVIOR_ON_FAILED_VERIFY = 'BehaviorOnFailedVerify';
- {$EXTERNALSYM REGSTR_VAL_BEHAVIOR_ON_FAILED_VERIFY}
-
-// Types of driver signing policies (apply to both preference and policy values
-// defined above)
-
- DRIVERSIGN_NONE = $00000000;
- {$EXTERNALSYM DRIVERSIGN_NONE}
- DRIVERSIGN_WARNING = $00000001;
- {$EXTERNALSYM DRIVERSIGN_WARNING}
- DRIVERSIGN_BLOCKING = $00000002;
- {$EXTERNALSYM DRIVERSIGN_BLOCKING}
-
-//
-// Entries under REGSTR_PATH_PIFCONVERT
-//
-
- REGSTR_VAL_MSDOSMODE = 'MSDOSMode';
- {$EXTERNALSYM REGSTR_VAL_MSDOSMODE}
- REGSTR_VAL_MSDOSMODEDISCARD = 'Discard';
- {$EXTERNALSYM REGSTR_VAL_MSDOSMODEDISCARD}
-
-//
-// Entries under REGSTR_PATH_MSDOSOPTS (global settings)
-//
-
- REGSTR_VAL_DOSOPTGLOBALFLAGS = 'GlobalFlags';
- {$EXTERNALSYM REGSTR_VAL_DOSOPTGLOBALFLAGS}
-
-// Flags for GlobalFlags
-
- DOSOPTGF_DEFCLEAN = $00000001; // Default action is clean config
- {$EXTERNALSYM DOSOPTGF_DEFCLEAN}
-
-//
-// Entries under REGSTR_PATH_MSDOSOPTS \ OptionSubkey
-//
-
- REGSTR_VAL_DOSOPTFLAGS = 'Flags';
- {$EXTERNALSYM REGSTR_VAL_DOSOPTFLAGS}
- REGSTR_VAL_OPTORDER = 'Order';
- {$EXTERNALSYM REGSTR_VAL_OPTORDER}
- REGSTR_VAL_CONFIGSYS = 'Config.Sys';
- {$EXTERNALSYM REGSTR_VAL_CONFIGSYS}
- REGSTR_VAL_AUTOEXEC = 'Autoexec.Bat';
- {$EXTERNALSYM REGSTR_VAL_AUTOEXEC}
- REGSTR_VAL_STDDOSOPTION = 'StdOption';
- {$EXTERNALSYM REGSTR_VAL_STDDOSOPTION}
- REGSTR_VAL_DOSOPTTIP = 'TipText';
- {$EXTERNALSYM REGSTR_VAL_DOSOPTTIP}
-
-// Flags for DOSOPTFLAGS
-
- DOSOPTF_DEFAULT = $00000001; // Default enabled for clean config
- {$EXTERNALSYM DOSOPTF_DEFAULT}
- DOSOPTF_SUPPORTED = $00000002; // Option actually supported
- {$EXTERNALSYM DOSOPTF_SUPPORTED}
- DOSOPTF_ALWAYSUSE = $00000004; // Always use this option
- {$EXTERNALSYM DOSOPTF_ALWAYSUSE}
- DOSOPTF_USESPMODE = $00000008; // Option puts machine in Prot Mode
- {$EXTERNALSYM DOSOPTF_USESPMODE}
- DOSOPTF_PROVIDESUMB = $00000010; // Can load drivers high
- {$EXTERNALSYM DOSOPTF_PROVIDESUMB}
- DOSOPTF_NEEDSETUP = $00000020; // Need to configure option
- {$EXTERNALSYM DOSOPTF_NEEDSETUP}
- DOSOPTF_INDOSSTART = $00000040; // Suppored by DOSSTART.BAT
- {$EXTERNALSYM DOSOPTF_INDOSSTART}
- DOSOPTF_MULTIPLE = $00000080; // Load multiple configuration lines
- {$EXTERNALSYM DOSOPTF_MULTIPLE}
-
-//
-// Flags returned by SUGetSetSetupFlags and in the registry
-//
-
- SUF_FIRSTTIME = $00000001; // First boot into Win95.
- {$EXTERNALSYM SUF_FIRSTTIME}
- SUF_EXPRESS = $00000002; // User Setup via express mode (vs customize).
- {$EXTERNALSYM SUF_EXPRESS}
- SUF_BATCHINF = $00000004; // Setup using batch file (MSBATCH.INF).
- {$EXTERNALSYM SUF_BATCHINF}
- SUF_CLEAN = $00000008; // Setup was done to a clean directory.
- {$EXTERNALSYM SUF_CLEAN}
- SUF_INSETUP = $00000010; // You're in Setup.
- {$EXTERNALSYM SUF_INSETUP}
- SUF_NETSETUP = $00000020; // Doing a net (workstation) setup.
- {$EXTERNALSYM SUF_NETSETUP}
- SUF_NETHDBOOT = $00000040; // Workstation boots from local harddrive
- {$EXTERNALSYM SUF_NETHDBOOT}
- SUF_NETRPLBOOT = $00000080; // Workstation boots via RPL (vs floppy)
- {$EXTERNALSYM SUF_NETRPLBOOT}
- SUF_SBSCOPYOK = $00000100; // Can copy to LDID_SHARED (SBS)
- {$EXTERNALSYM SUF_SBSCOPYOK}
-
-//
-// Entries under REGSTR_PATH_VMM
-//
-
- REGSTR_VAL_DOSPAGER = 'DOSPager';
- {$EXTERNALSYM REGSTR_VAL_DOSPAGER}
- REGSTR_VAL_VXDGROUPS = 'VXDGroups';
- {$EXTERNALSYM REGSTR_VAL_VXDGROUPS}
-
-//
-// Entries under REGSTR_PATH_VPOWERD
-//
-
- REGSTR_VAL_VPOWERDFLAGS = 'Flags';
- {$EXTERNALSYM REGSTR_VAL_VPOWERDFLAGS}
- VPDF_DISABLEPWRMGMT = $00000001; // Don't load device
- {$EXTERNALSYM VPDF_DISABLEPWRMGMT}
- VPDF_FORCEAPM10MODE = $00000002; // Always go into 1.0 mode
- {$EXTERNALSYM VPDF_FORCEAPM10MODE}
- VPDF_SKIPINTELSLCHECK = $00000004; // Don't detect Intel SL chipset
- {$EXTERNALSYM VPDF_SKIPINTELSLCHECK}
- VPDF_DISABLEPWRSTATUSPOLL = $00000008; // Don't poll power status
- {$EXTERNALSYM VPDF_DISABLEPWRSTATUSPOLL}
- VPDF_DISABLERINGRESUME = $00000010; // Don't let the modem wake the machine (APM 1.2 only)
- {$EXTERNALSYM VPDF_DISABLERINGRESUME}
- VPDF_SHOWMULTIBATT = $00000020; // Show all batteries checkbox in power control panel
- {$EXTERNALSYM VPDF_SHOWMULTIBATT}
-
-//
-// Entries under REGSTR_PATH_BUSINFORMATION
-//
-
- BIF_SHOWSIMILARDRIVERS = $00000001; // Show similar drivers instead of all class drivers in UI.
- {$EXTERNALSYM BIF_SHOWSIMILARDRIVERS}
- BIF_RAWDEVICENEEDSDRIVER = $00000002; // RAW device needs a driver installed.
- {$EXTERNALSYM BIF_RAWDEVICENEEDSDRIVER}
-
-//
-// Entries under REGSTR_PATH_VNETSUP
-//
-
- REGSTR_VAL_WORKGROUP = 'Workgroup';
- {$EXTERNALSYM REGSTR_VAL_WORKGROUP}
- REGSTR_VAL_DIRECTHOST = 'DirectHost';
- {$EXTERNALSYM REGSTR_VAL_DIRECTHOST}
- REGSTR_VAL_FILESHARING = 'FileSharing';
- {$EXTERNALSYM REGSTR_VAL_FILESHARING}
- REGSTR_VAL_PRINTSHARING = 'PrintSharing';
- {$EXTERNALSYM REGSTR_VAL_PRINTSHARING}
-
-//
-// Entries under REGSTR_PATH_NWREDIR
-//
-
- REGSTR_VAL_FIRSTNETDRIVE = 'FirstNetworkDrive';
- {$EXTERNALSYM REGSTR_VAL_FIRSTNETDRIVE}
- REGSTR_VAL_MAXCONNECTIONS = 'MaxConnections';
- {$EXTERNALSYM REGSTR_VAL_MAXCONNECTIONS}
- REGSTR_VAL_APISUPPORT = 'APISupport';
- {$EXTERNALSYM REGSTR_VAL_APISUPPORT}
- REGSTR_VAL_MAXRETRY = 'MaxRetry';
- {$EXTERNALSYM REGSTR_VAL_MAXRETRY}
- REGSTR_VAL_MINRETRY = 'MinRetry';
- {$EXTERNALSYM REGSTR_VAL_MINRETRY}
- REGSTR_VAL_SUPPORTLFN = 'SupportLFN';
- {$EXTERNALSYM REGSTR_VAL_SUPPORTLFN}
- REGSTR_VAL_SUPPORTBURST = 'SupportBurst';
- {$EXTERNALSYM REGSTR_VAL_SUPPORTBURST}
- REGSTR_VAL_SUPPORTTUNNELLING = 'SupportTunnelling';
- {$EXTERNALSYM REGSTR_VAL_SUPPORTTUNNELLING}
- REGSTR_VAL_FULLTRACE = 'FullTrace';
- {$EXTERNALSYM REGSTR_VAL_FULLTRACE}
- REGSTR_VAL_READCACHING = 'ReadCaching';
- {$EXTERNALSYM REGSTR_VAL_READCACHING}
- REGSTR_VAL_SHOWDOTS = 'ShowDots';
- {$EXTERNALSYM REGSTR_VAL_SHOWDOTS}
- REGSTR_VAL_GAPTIME = 'GapTime';
- {$EXTERNALSYM REGSTR_VAL_GAPTIME}
- REGSTR_VAL_SEARCHMODE = 'SearchMode';
- {$EXTERNALSYM REGSTR_VAL_SEARCHMODE}
- REGSTR_VAL_SHELLVERSION = 'ShellVersion';
- {$EXTERNALSYM REGSTR_VAL_SHELLVERSION}
- REGSTR_VAL_MAXLIP = 'MaxLIP';
- {$EXTERNALSYM REGSTR_VAL_MAXLIP}
- REGSTR_VAL_PRESERVECASE = 'PreserveCase';
- {$EXTERNALSYM REGSTR_VAL_PRESERVECASE}
- REGSTR_VAL_OPTIMIZESFN = 'OptimizeSFN';
- {$EXTERNALSYM REGSTR_VAL_OPTIMIZESFN}
-
-//
-// Entries under REGSTR_PATH_NCPSERVER
-//
-
- REGSTR_VAL_NCP_BROWSEMASTER = 'BrowseMaster';
- {$EXTERNALSYM REGSTR_VAL_NCP_BROWSEMASTER}
- REGSTR_VAL_NCP_USEPEERBROWSING = 'Use_PeerBrowsing';
- {$EXTERNALSYM REGSTR_VAL_NCP_USEPEERBROWSING}
- REGSTR_VAL_NCP_USESAP = 'Use_Sap';
- {$EXTERNALSYM REGSTR_VAL_NCP_USESAP}
-
-//
-// Entries under REGSTR_PATH_VCOMM
-//
-
- REGSTR_VAL_PCCARD_POWER = 'EnablePowerManagement';
- {$EXTERNALSYM REGSTR_VAL_PCCARD_POWER}
-
-//
-// Entries under REGSTR_PATH_FILESYSTEM
-//
-
- REGSTR_VAL_WIN31FILESYSTEM = 'Win31FileSystem';
- {$EXTERNALSYM REGSTR_VAL_WIN31FILESYSTEM}
- REGSTR_VAL_PRESERVELONGNAMES = 'PreserveLongNames';
- {$EXTERNALSYM REGSTR_VAL_PRESERVELONGNAMES}
- REGSTR_VAL_DRIVEWRITEBEHIND = 'DriveWriteBehind';
- {$EXTERNALSYM REGSTR_VAL_DRIVEWRITEBEHIND}
- REGSTR_VAL_ASYNCFILECOMMIT = 'AsyncFileCommit';
- {$EXTERNALSYM REGSTR_VAL_ASYNCFILECOMMIT}
- REGSTR_VAL_PATHCACHECOUNT = 'PathCache';
- {$EXTERNALSYM REGSTR_VAL_PATHCACHECOUNT}
- REGSTR_VAL_NAMECACHECOUNT = 'NameCache';
- {$EXTERNALSYM REGSTR_VAL_NAMECACHECOUNT}
- REGSTR_VAL_CONTIGFILEALLOC = 'ContigFileAllocSize';
- {$EXTERNALSYM REGSTR_VAL_CONTIGFILEALLOC}
- REGSTR_VAL_FREESPACERATIO = 'FreeSpaceRatio';
- {$EXTERNALSYM REGSTR_VAL_FREESPACERATIO}
- REGSTR_VAL_VOLIDLETIMEOUT = 'VolumeIdleTimeout';
- {$EXTERNALSYM REGSTR_VAL_VOLIDLETIMEOUT}
- REGSTR_VAL_BUFFIDLETIMEOUT = 'BufferIdleTimeout';
- {$EXTERNALSYM REGSTR_VAL_BUFFIDLETIMEOUT}
- REGSTR_VAL_BUFFAGETIMEOUT = 'BufferAgeTimeout';
- {$EXTERNALSYM REGSTR_VAL_BUFFAGETIMEOUT}
- REGSTR_VAL_NAMENUMERICTAIL = 'NameNumericTail';
- {$EXTERNALSYM REGSTR_VAL_NAMENUMERICTAIL}
- REGSTR_VAL_READAHEADTHRESHOLD = 'ReadAheadThreshold';
- {$EXTERNALSYM REGSTR_VAL_READAHEADTHRESHOLD}
- REGSTR_VAL_DOUBLEBUFFER = 'DoubleBuffer';
- {$EXTERNALSYM REGSTR_VAL_DOUBLEBUFFER}
- REGSTR_VAL_SOFTCOMPATMODE = 'SoftCompatMode';
- {$EXTERNALSYM REGSTR_VAL_SOFTCOMPATMODE}
- REGSTR_VAL_DRIVESPINDOWN = 'DriveSpinDown';
- {$EXTERNALSYM REGSTR_VAL_DRIVESPINDOWN}
- REGSTR_VAL_FORCEPMIO = 'ForcePMIO';
- {$EXTERNALSYM REGSTR_VAL_FORCEPMIO}
- REGSTR_VAL_FORCERMIO = 'ForceRMIO';
- {$EXTERNALSYM REGSTR_VAL_FORCERMIO}
- REGSTR_VAL_LASTBOOTPMDRVS = 'LastBootPMDrvs';
- {$EXTERNALSYM REGSTR_VAL_LASTBOOTPMDRVS}
- REGSTR_VAL_ACSPINDOWNPREVIOUS = 'ACSpinDownPrevious';
- {$EXTERNALSYM REGSTR_VAL_ACSPINDOWNPREVIOUS}
- REGSTR_VAL_BATSPINDOWNPREVIOUS = 'BatSpinDownPrevious';
- {$EXTERNALSYM REGSTR_VAL_BATSPINDOWNPREVIOUS}
- REGSTR_VAL_VIRTUALHDIRQ = 'VirtualHDIRQ';
- {$EXTERNALSYM REGSTR_VAL_VIRTUALHDIRQ}
- REGSTR_VAL_SRVNAMECACHECOUNT = 'ServerNameCacheMax';
- {$EXTERNALSYM REGSTR_VAL_SRVNAMECACHECOUNT}
- REGSTR_VAL_SRVNAMECACHE = 'ServerNameCache';
- {$EXTERNALSYM REGSTR_VAL_SRVNAMECACHE}
- REGSTR_VAL_SRVNAMECACHENETPROV = 'ServerNameCacheNumNets';
- {$EXTERNALSYM REGSTR_VAL_SRVNAMECACHENETPROV}
- REGSTR_VAL_AUTOMOUNT = 'AutoMountDrives';
- {$EXTERNALSYM REGSTR_VAL_AUTOMOUNT}
- REGSTR_VAL_COMPRESSIONMETHOD = 'CompressionAlgorithm';
- {$EXTERNALSYM REGSTR_VAL_COMPRESSIONMETHOD}
- REGSTR_VAL_COMPRESSIONTHRESHOLD = 'CompressionThreshold';
- {$EXTERNALSYM REGSTR_VAL_COMPRESSIONTHRESHOLD}
- REGSTR_VAL_ACDRIVESPINDOWN = 'ACDriveSpinDown';
- {$EXTERNALSYM REGSTR_VAL_ACDRIVESPINDOWN}
- REGSTR_VAL_BATDRIVESPINDOWN = 'BatDriveSpinDown';
- {$EXTERNALSYM REGSTR_VAL_BATDRIVESPINDOWN}
-
-//
-// Entries under REGSTR_PATH_FILESYSTEM_NOVOLTRACK
-//
-// A sub-key under which a variable number of variable length structures are stored.
-//
-// Each structure contains an offset followed by a number of pattern bytes.
-// The pattern in each structure is compared at the specified offset within
-// the boot record at the time a volume is mounted. If any pattern in this
-// set of patterns matches a pattern already in the boot record, VFAT will not
-// write a volume tracking serial number in the OEM_SerialNum field of the
-// boot record on the volume being mounted.
-//
-
-//
-// Entries under REGSTR_PATH_CDFS
-//
-
- REGSTR_VAL_CDCACHESIZE = 'CacheSize'; // Number of 2K cache sectors
- {$EXTERNALSYM REGSTR_VAL_CDCACHESIZE}
- REGSTR_VAL_CDPREFETCH = 'Prefetch'; // Number of 2K cache sectors for prefetching
- {$EXTERNALSYM REGSTR_VAL_CDPREFETCH}
- REGSTR_VAL_CDPREFETCHTAIL = 'PrefetchTail'; // Number of LRU1 prefetch sectors
- {$EXTERNALSYM REGSTR_VAL_CDPREFETCHTAIL}
- REGSTR_VAL_CDRAWCACHE = 'RawCache'; // Number of 2352-byte cache sectors
- {$EXTERNALSYM REGSTR_VAL_CDRAWCACHE}
- REGSTR_VAL_CDEXTERRORS = 'ExtendedErrors'; // Return extended error codes
- {$EXTERNALSYM REGSTR_VAL_CDEXTERRORS}
- REGSTR_VAL_CDSVDSENSE = 'SVDSense'; // 0=PVD, 1=Kanji, 2=Unicode
- {$EXTERNALSYM REGSTR_VAL_CDSVDSENSE}
- REGSTR_VAL_CDSHOWVERSIONS = 'ShowVersions'; // Show file version numbers
- {$EXTERNALSYM REGSTR_VAL_CDSHOWVERSIONS}
- REGSTR_VAL_CDCOMPATNAMES = 'MSCDEXCompatNames'; // Disable Numeric Tails on long file names
- {$EXTERNALSYM REGSTR_VAL_CDCOMPATNAMES}
- REGSTR_VAL_CDNOREADAHEAD = 'NoReadAhead'; // Disable Read Ahead if set to 1
- {$EXTERNALSYM REGSTR_VAL_CDNOREADAHEAD}
-
-//
-// define values for IOS devices
-//
-
- REGSTR_VAL_SCSI = 'SCSI\';
- {$EXTERNALSYM REGSTR_VAL_SCSI}
- REGSTR_VAL_ESDI = 'ESDI\';
- {$EXTERNALSYM REGSTR_VAL_ESDI}
- REGSTR_VAL_FLOP = 'FLOP\';
- {$EXTERNALSYM REGSTR_VAL_FLOP}
-
-//
-// define defs for IOS device types and values for IOS devices
-//
-
- REGSTR_VAL_DISK = 'GenDisk';
- {$EXTERNALSYM REGSTR_VAL_DISK}
- REGSTR_VAL_CDROM = 'GenCD';
- {$EXTERNALSYM REGSTR_VAL_CDROM}
- REGSTR_VAL_TAPE = 'TAPE';
- {$EXTERNALSYM REGSTR_VAL_TAPE}
- REGSTR_VAL_SCANNER = 'SCANNER';
- {$EXTERNALSYM REGSTR_VAL_SCANNER}
- REGSTR_VAL_FLOPPY = 'FLOPPY';
- {$EXTERNALSYM REGSTR_VAL_FLOPPY}
-
- REGSTR_VAL_SCSITID = 'SCSITargetID';
- {$EXTERNALSYM REGSTR_VAL_SCSITID}
- REGSTR_VAL_SCSILUN = 'SCSILUN';
- {$EXTERNALSYM REGSTR_VAL_SCSILUN}
- REGSTR_VAL_REVLEVEL = 'RevisionLevel';
- {$EXTERNALSYM REGSTR_VAL_REVLEVEL}
- REGSTR_VAL_PRODUCTID = 'ProductId';
- {$EXTERNALSYM REGSTR_VAL_PRODUCTID}
- REGSTR_VAL_PRODUCTTYPE = 'ProductType';
- {$EXTERNALSYM REGSTR_VAL_PRODUCTTYPE}
- REGSTR_VAL_DEVTYPE = 'DeviceType';
- {$EXTERNALSYM REGSTR_VAL_DEVTYPE}
- REGSTR_VAL_REMOVABLE = 'Removable';
- {$EXTERNALSYM REGSTR_VAL_REMOVABLE}
- REGSTR_VAL_CURDRVLET = 'CurrentDriveLetterAssignment';
- {$EXTERNALSYM REGSTR_VAL_CURDRVLET}
- REGSTR_VAL_USRDRVLET = 'UserDriveLetterAssignment';
- {$EXTERNALSYM REGSTR_VAL_USRDRVLET}
- REGSTR_VAL_SYNCDATAXFER = 'SyncDataXfer';
- {$EXTERNALSYM REGSTR_VAL_SYNCDATAXFER}
- REGSTR_VAL_AUTOINSNOTE = 'AutoInsertNotification';
- {$EXTERNALSYM REGSTR_VAL_AUTOINSNOTE}
- REGSTR_VAL_DISCONNECT = 'Disconnect';
- {$EXTERNALSYM REGSTR_VAL_DISCONNECT}
- REGSTR_VAL_INT13 = 'Int13';
- {$EXTERNALSYM REGSTR_VAL_INT13}
- REGSTR_VAL_PMODE_INT13 = 'PModeInt13';
- {$EXTERNALSYM REGSTR_VAL_PMODE_INT13}
- REGSTR_VAL_USERSETTINGS = 'AdapterSettings';
- {$EXTERNALSYM REGSTR_VAL_USERSETTINGS}
- REGSTR_VAL_NOIDE = 'NoIDE';
- {$EXTERNALSYM REGSTR_VAL_NOIDE}
-
-// The foll. clase name definitions should be the same as in dirkdrv.inx and
-// cdrom.inx
-
- REGSTR_VAL_DISKCLASSNAME = 'DiskDrive';
- {$EXTERNALSYM REGSTR_VAL_DISKCLASSNAME}
- REGSTR_VAL_CDROMCLASSNAME = 'CDROM';
- {$EXTERNALSYM REGSTR_VAL_CDROMCLASSNAME}
-
-// The foll. value determines whether a port driver should be force loaded
-// or not.
-
- REGSTR_VAL_FORCELOAD = 'ForceLoadPD';
- {$EXTERNALSYM REGSTR_VAL_FORCELOAD}
-
-// The foll. value determines whether or not the FIFO is used on the Floppy
-// controller.
-
- REGSTR_VAL_FORCEFIFO = 'ForceFIFO';
- {$EXTERNALSYM REGSTR_VAL_FORCEFIFO}
- REGSTR_VAL_FORCECL = 'ForceChangeLine';
- {$EXTERNALSYM REGSTR_VAL_FORCECL}
-
-//
-// Generic CLASS Entries
-//
-
- REGSTR_VAL_NOUSECLASS = 'NoUseClass'; // Don't include this class in PnP functions
- {$EXTERNALSYM REGSTR_VAL_NOUSECLASS}
- REGSTR_VAL_NOINSTALLCLASS = 'NoInstallClass'; // Don't include this class in New Device Wizard
- {$EXTERNALSYM REGSTR_VAL_NOINSTALLCLASS}
- REGSTR_VAL_NODISPLAYCLASS = 'NoDisplayClass'; // Don't include this class in Device Manager
- {$EXTERNALSYM REGSTR_VAL_NODISPLAYCLASS}
- REGSTR_VAL_SILENTINSTALL = 'SilentInstall'; // Always Silent Install devices of this class.
- {$EXTERNALSYM REGSTR_VAL_SILENTINSTALL}
-
-//
-// Class Names
-//
-
- REGSTR_KEY_PCMCIA_CLASS = 'PCMCIA'; // child of PATH_CLASS
- {$EXTERNALSYM REGSTR_KEY_PCMCIA_CLASS}
- REGSTR_KEY_SCSI_CLASS = 'SCSIAdapter';
- {$EXTERNALSYM REGSTR_KEY_SCSI_CLASS}
- REGSTR_KEY_PORTS_CLASS = 'ports';
- {$EXTERNALSYM REGSTR_KEY_PORTS_CLASS}
- REGSTR_KEY_MEDIA_CLASS = 'MEDIA';
- {$EXTERNALSYM REGSTR_KEY_MEDIA_CLASS}
- REGSTR_KEY_DISPLAY_CLASS = 'Display';
- {$EXTERNALSYM REGSTR_KEY_DISPLAY_CLASS}
- REGSTR_KEY_KEYBOARD_CLASS = 'Keyboard';
- {$EXTERNALSYM REGSTR_KEY_KEYBOARD_CLASS}
- REGSTR_KEY_MOUSE_CLASS = 'Mouse';
- {$EXTERNALSYM REGSTR_KEY_MOUSE_CLASS}
- REGSTR_KEY_MONITOR_CLASS = 'Monitor';
- {$EXTERNALSYM REGSTR_KEY_MONITOR_CLASS}
- REGSTR_KEY_MODEM_CLASS = 'Modem';
- {$EXTERNALSYM REGSTR_KEY_MODEM_CLASS}
-
-//
-// Values under PATH_CLASS\PCMCIA
-//
-
- REGSTR_VAL_PCMCIA_OPT = 'Options';
- {$EXTERNALSYM REGSTR_VAL_PCMCIA_OPT}
- PCMCIA_OPT_HAVE_SOCKET = $00000001;
- {$EXTERNALSYM PCMCIA_OPT_HAVE_SOCKET}
- //PCMCIA_OPT_ENABLED = $00000002;
- //{$EXTERNALSYM PCMCIA_OPT_ENABLED}
- PCMCIA_OPT_AUTOMEM = $00000004;
- {$EXTERNALSYM PCMCIA_OPT_AUTOMEM}
- PCMCIA_OPT_NO_SOUND = $00000008;
- {$EXTERNALSYM PCMCIA_OPT_NO_SOUND}
- PCMCIA_OPT_NO_AUDIO = $00000010;
- {$EXTERNALSYM PCMCIA_OPT_NO_AUDIO}
- PCMCIA_OPT_NO_APMREMOVE = $00000020;
- {$EXTERNALSYM PCMCIA_OPT_NO_APMREMOVE}
-
- REGSTR_VAL_PCMCIA_MEM = 'Memory'; // Card services shared mem range
- {$EXTERNALSYM REGSTR_VAL_PCMCIA_MEM}
- PCMCIA_DEF_MEMBEGIN = $000C0000; // default 0xC0000 - 0x00FFFFFF
- {$EXTERNALSYM PCMCIA_DEF_MEMBEGIN}
- PCMCIA_DEF_MEMEND = $00FFFFFF; // (0 - 16meg)
- {$EXTERNALSYM PCMCIA_DEF_MEMEND}
- PCMCIA_DEF_MEMLEN = $00001000; // default 4k window
- {$EXTERNALSYM PCMCIA_DEF_MEMLEN}
-
- REGSTR_VAL_PCMCIA_ALLOC = 'AllocMemWin'; // PCCard alloced memory Window
- {$EXTERNALSYM REGSTR_VAL_PCMCIA_ALLOC}
- REGSTR_VAL_PCMCIA_ATAD = 'ATADelay'; // ATA device config start delay
- {$EXTERNALSYM REGSTR_VAL_PCMCIA_ATAD}
-
- REGSTR_VAL_PCMCIA_SIZ = 'MinRegionSize'; // Minimum region size
- {$EXTERNALSYM REGSTR_VAL_PCMCIA_SIZ}
- PCMCIA_DEF_MIN_REGION = $00010000; // 64K minimum region size
- {$EXTERNALSYM PCMCIA_DEF_MIN_REGION}
-
-// Values in LPTENUM keys
-
- REGSTR_VAL_P1284MDL = 'Model';
- {$EXTERNALSYM REGSTR_VAL_P1284MDL}
- REGSTR_VAL_P1284MFG = 'Manufacturer';
- {$EXTERNALSYM REGSTR_VAL_P1284MFG}
-
-//
-// Values under PATH_CLASS\ISAPNP
-//
-
- REGSTR_VAL_ISAPNP = 'ISAPNP'; // ISAPNP VxD name
- {$EXTERNALSYM REGSTR_VAL_ISAPNP}
- REGSTR_VAL_ISAPNP_RDP_OVERRIDE = 'RDPOverRide'; // ReadDataPort OverRide
- {$EXTERNALSYM REGSTR_VAL_ISAPNP_RDP_OVERRIDE}
-
-//
-// Values under PATH_CLASS\PCI
-//
-
- REGSTR_VAL_PCI = 'PCI'; // PCI VxD name
- {$EXTERNALSYM REGSTR_VAL_PCI}
- REGSTR_PCI_OPTIONS = 'Options'; // Possible PCI options
- {$EXTERNALSYM REGSTR_PCI_OPTIONS}
- REGSTR_PCI_DUAL_IDE = 'PCIDualIDE'; // Dual IDE flag
- {$EXTERNALSYM REGSTR_PCI_DUAL_IDE}
- PCI_OPTIONS_USE_BIOS = $00000001;
- {$EXTERNALSYM PCI_OPTIONS_USE_BIOS}
- PCI_OPTIONS_USE_IRQ_STEERING = $00000002;
- {$EXTERNALSYM PCI_OPTIONS_USE_IRQ_STEERING}
-
-//
-// Values under PATH_CLASS\AGPxxxx
-//
-// note: These flags affect standard AGP capabilities,
-// and are set in agplib
-//
-
- AGP_FLAG_NO_1X_RATE = $00000001;
- {$EXTERNALSYM AGP_FLAG_NO_1X_RATE}
- AGP_FLAG_NO_2X_RATE = $00000002;
- {$EXTERNALSYM AGP_FLAG_NO_2X_RATE}
- AGP_FLAG_NO_4X_RATE = $00000004;
- {$EXTERNALSYM AGP_FLAG_NO_4X_RATE}
- AGP_FLAG_NO_8X_RATE = $00000008;
- {$EXTERNALSYM AGP_FLAG_NO_8X_RATE}
- AGP_FLAG_REVERSE_INITIALIZATION = $00000080;
- {$EXTERNALSYM AGP_FLAG_REVERSE_INITIALIZATION}
-
- AGP_FLAG_NO_SBA_ENABLE = $00000100;
- {$EXTERNALSYM AGP_FLAG_NO_SBA_ENABLE}
-
-//
-// AGP flags > AGP_SPECIAL_TARGET are platform specific
-//
-
- AGP_FLAG_SPECIAL_TARGET = $000FFFFF;
- {$EXTERNALSYM AGP_FLAG_SPECIAL_TARGET}
- AGP_FLAG_SPECIAL_RESERVE = $000F0000;
- {$EXTERNALSYM AGP_FLAG_SPECIAL_RESERVE}
-
-//
-// Detection related values
-//
-
- REGSTR_KEY_CRASHES = 'Crashes'; // key of REGSTR_PATH_DETECT
- {$EXTERNALSYM REGSTR_KEY_CRASHES}
- REGSTR_KEY_DANGERS = 'Dangers'; // key of REGSTR_PATH_DETECT
- {$EXTERNALSYM REGSTR_KEY_DANGERS}
- REGSTR_KEY_DETMODVARS = 'DetModVars'; // key of REGSTR_PATH_DETECT
- {$EXTERNALSYM REGSTR_KEY_DETMODVARS}
- REGSTR_KEY_NDISINFO = 'NDISInfo'; // key of netcard hw entry
- {$EXTERNALSYM REGSTR_KEY_NDISINFO}
- REGSTR_VAL_PROTINIPATH = 'ProtIniPath'; // protocol.ini path
- {$EXTERNALSYM REGSTR_VAL_PROTINIPATH}
- REGSTR_VAL_RESOURCES = 'Resources'; // resources of crash func.
- {$EXTERNALSYM REGSTR_VAL_RESOURCES}
- REGSTR_VAL_CRASHFUNCS = 'CrashFuncs'; // detfunc caused the crash
- {$EXTERNALSYM REGSTR_VAL_CRASHFUNCS}
- REGSTR_VAL_CLASS = 'Class'; // device class
- {$EXTERNALSYM REGSTR_VAL_CLASS}
- REGSTR_VAL_DEVDESC = 'DeviceDesc'; // device description
- {$EXTERNALSYM REGSTR_VAL_DEVDESC}
- REGSTR_VAL_BOOTCONFIG = 'BootConfig'; // detected configuration
- {$EXTERNALSYM REGSTR_VAL_BOOTCONFIG}
- REGSTR_VAL_DETFUNC = 'DetFunc'; // specifies detect mod/func.
- {$EXTERNALSYM REGSTR_VAL_DETFUNC}
- REGSTR_VAL_DETFLAGS = 'DetFlags'; // detection flags
- {$EXTERNALSYM REGSTR_VAL_DETFLAGS}
- REGSTR_VAL_COMPATIBLEIDS = 'CompatibleIDs'; // value of enum\dev\inst
- {$EXTERNALSYM REGSTR_VAL_COMPATIBLEIDS}
- REGSTR_VAL_DETCONFIG = 'DetConfig'; // detected configuration
- {$EXTERNALSYM REGSTR_VAL_DETCONFIG}
- REGSTR_VAL_VERIFYKEY = 'VerifyKey'; // key used in verify mode
- {$EXTERNALSYM REGSTR_VAL_VERIFYKEY}
- REGSTR_VAL_COMINFO = 'ComInfo'; // com info. for serial mouse
- {$EXTERNALSYM REGSTR_VAL_COMINFO}
- REGSTR_VAL_INFNAME = 'InfName'; // INF filename
- {$EXTERNALSYM REGSTR_VAL_INFNAME}
- REGSTR_VAL_CARDSPECIFIC = 'CardSpecific'; // Netcard specific info (WORD)
- {$EXTERNALSYM REGSTR_VAL_CARDSPECIFIC}
- REGSTR_VAL_NETOSTYPE = 'NetOSType'; // NetOS type associate w/ card
- {$EXTERNALSYM REGSTR_VAL_NETOSTYPE}
- REGSTR_DATA_NETOS_NDIS = 'NDIS'; // Data of REGSTR_VAL_NETOSTYPE
- {$EXTERNALSYM REGSTR_DATA_NETOS_NDIS}
- REGSTR_DATA_NETOS_ODI = 'ODI'; // Data of REGSTR_VAL_NETOSTYPE
- {$EXTERNALSYM REGSTR_DATA_NETOS_ODI}
- REGSTR_DATA_NETOS_IPX = 'IPX'; // Data of REGSTR_VAL_NETOSTYPE
- {$EXTERNALSYM REGSTR_DATA_NETOS_IPX}
- REGSTR_VAL_MFG = 'Mfg';
- {$EXTERNALSYM REGSTR_VAL_MFG}
- REGSTR_VAL_SCAN_ONLY_FIRST = 'ScanOnlyFirstDrive'; // used with IDE driver
- {$EXTERNALSYM REGSTR_VAL_SCAN_ONLY_FIRST}
- REGSTR_VAL_SHARE_IRQ = 'ForceIRQSharing'; // used with IDE driver
- {$EXTERNALSYM REGSTR_VAL_SHARE_IRQ}
- REGSTR_VAL_NONSTANDARD_ATAPI = 'NonStandardATAPI'; // used with IDE driver
- {$EXTERNALSYM REGSTR_VAL_NONSTANDARD_ATAPI}
- REGSTR_VAL_IDE_FORCE_SERIALIZE = 'ForceSerialization'; // used with IDE driver
- {$EXTERNALSYM REGSTR_VAL_IDE_FORCE_SERIALIZE}
- REGSTR_VAL_MAX_HCID_LEN = 1024; // Maximum hardware/compat ID len
- {$EXTERNALSYM REGSTR_VAL_MAX_HCID_LEN}
- REGSTR_VAL_HWREV = 'HWRevision';
- {$EXTERNALSYM REGSTR_VAL_HWREV}
- REGSTR_VAL_ENABLEINTS = 'EnableInts';
- {$EXTERNALSYM REGSTR_VAL_ENABLEINTS}
-
-//
-// Bit values of REGSTR_VAL_DETFLAGS
-//
-
- REGDF_NOTDETIO = $00000001; // cannot detect I/O resource
- {$EXTERNALSYM REGDF_NOTDETIO}
- REGDF_NOTDETMEM = $00000002; // cannot detect mem resource
- {$EXTERNALSYM REGDF_NOTDETMEM}
- REGDF_NOTDETIRQ = $00000004; // cannot detect IRQ resource
- {$EXTERNALSYM REGDF_NOTDETIRQ}
- REGDF_NOTDETDMA = $00000008; // cannot detect DMA resource
- {$EXTERNALSYM REGDF_NOTDETDMA}
- REGDF_NOTDETALL = REGDF_NOTDETIO or REGDF_NOTDETMEM or REGDF_NOTDETIRQ or REGDF_NOTDETDMA;
- {$EXTERNALSYM REGDF_NOTDETALL}
- REGDF_NEEDFULLCONFIG = $00000010; // stop devnode if lack resource
- {$EXTERNALSYM REGDF_NEEDFULLCONFIG}
- REGDF_GENFORCEDCONFIG = $00000020; // also generate forceconfig
- {$EXTERNALSYM REGDF_GENFORCEDCONFIG}
- REGDF_NODETCONFIG = $00008000; // don't write detconfig to reg.
- {$EXTERNALSYM REGDF_NODETCONFIG}
- REGDF_CONFLICTIO = $00010000; // I/O res. in conflict
- {$EXTERNALSYM REGDF_CONFLICTIO}
- REGDF_CONFLICTMEM = $00020000; // mem res. in conflict
- {$EXTERNALSYM REGDF_CONFLICTMEM}
- REGDF_CONFLICTIRQ = $00040000; // IRQ res. in conflict
- {$EXTERNALSYM REGDF_CONFLICTIRQ}
- REGDF_CONFLICTDMA = $00080000; // DMA res. in conflict
- {$EXTERNALSYM REGDF_CONFLICTDMA}
- REGDF_CONFLICTALL = REGDF_CONFLICTIO or REGDF_CONFLICTMEM or REGDF_CONFLICTIRQ or REGDF_CONFLICTDMA;
- {$EXTERNALSYM REGDF_CONFLICTALL}
- REGDF_MAPIRQ2TO9 = $00100000; // IRQ2 has been mapped to 9
- {$EXTERNALSYM REGDF_MAPIRQ2TO9}
- REGDF_NOTVERIFIED = DWORD($80000000); // previous device unverified
- {$EXTERNALSYM REGDF_NOTVERIFIED}
-
-//
-// Values in REGSTR_KEY_SYSTEMBOARD
-//
-
- REGSTR_VAL_APMBIOSVER = 'APMBiosVer';
- {$EXTERNALSYM REGSTR_VAL_APMBIOSVER}
- REGSTR_VAL_APMFLAGS = 'APMFlags';
- {$EXTERNALSYM REGSTR_VAL_APMFLAGS}
- REGSTR_VAL_SLSUPPORT = 'SLSupport';
- {$EXTERNALSYM REGSTR_VAL_SLSUPPORT}
- REGSTR_VAL_MACHINETYPE = 'MachineType';
- {$EXTERNALSYM REGSTR_VAL_MACHINETYPE}
- REGSTR_VAL_SETUPMACHINETYPE = 'SetupMachineType';
- {$EXTERNALSYM REGSTR_VAL_SETUPMACHINETYPE}
- REGSTR_MACHTYPE_UNKNOWN = 'Unknown';
- {$EXTERNALSYM REGSTR_MACHTYPE_UNKNOWN}
- REGSTR_MACHTYPE_IBMPC = 'IBM PC';
- {$EXTERNALSYM REGSTR_MACHTYPE_IBMPC}
- REGSTR_MACHTYPE_IBMPCJR = 'IBM PCjr';
- {$EXTERNALSYM REGSTR_MACHTYPE_IBMPCJR}
- REGSTR_MACHTYPE_IBMPCCONV = 'IBM PC Convertible';
- {$EXTERNALSYM REGSTR_MACHTYPE_IBMPCCONV}
- REGSTR_MACHTYPE_IBMPCXT = 'IBM PC/XT';
- {$EXTERNALSYM REGSTR_MACHTYPE_IBMPCXT}
- REGSTR_MACHTYPE_IBMPCXT_286 = 'IBM PC/XT 286';
- {$EXTERNALSYM REGSTR_MACHTYPE_IBMPCXT_286}
- REGSTR_MACHTYPE_IBMPCAT = 'IBM PC/AT';
- {$EXTERNALSYM REGSTR_MACHTYPE_IBMPCAT}
- REGSTR_MACHTYPE_IBMPS2_25 = 'IBM PS/2-25';
- {$EXTERNALSYM REGSTR_MACHTYPE_IBMPS2_25}
- REGSTR_MACHTYPE_IBMPS2_30_286 = 'IBM PS/2-30 286';
- {$EXTERNALSYM REGSTR_MACHTYPE_IBMPS2_30_286}
- REGSTR_MACHTYPE_IBMPS2_30 = 'IBM PS/2-30';
- {$EXTERNALSYM REGSTR_MACHTYPE_IBMPS2_30}
- REGSTR_MACHTYPE_IBMPS2_50 = 'IBM PS/2-50';
- {$EXTERNALSYM REGSTR_MACHTYPE_IBMPS2_50}
- REGSTR_MACHTYPE_IBMPS2_50Z = 'IBM PS/2-50Z';
- {$EXTERNALSYM REGSTR_MACHTYPE_IBMPS2_50Z}
- REGSTR_MACHTYPE_IBMPS2_55SX = 'IBM PS/2-55SX';
- {$EXTERNALSYM REGSTR_MACHTYPE_IBMPS2_55SX}
- REGSTR_MACHTYPE_IBMPS2_60 = 'IBM PS/2-60';
- {$EXTERNALSYM REGSTR_MACHTYPE_IBMPS2_60}
- REGSTR_MACHTYPE_IBMPS2_65SX = 'IBM PS/2-65SX';
- {$EXTERNALSYM REGSTR_MACHTYPE_IBMPS2_65SX}
- REGSTR_MACHTYPE_IBMPS2_70 = 'IBM PS/2-70';
- {$EXTERNALSYM REGSTR_MACHTYPE_IBMPS2_70}
- REGSTR_MACHTYPE_IBMPS2_P70 = 'IBM PS/2-P70';
- {$EXTERNALSYM REGSTR_MACHTYPE_IBMPS2_P70}
- REGSTR_MACHTYPE_IBMPS2_70_80 = 'IBM PS/2-70/80';
- {$EXTERNALSYM REGSTR_MACHTYPE_IBMPS2_70_80}
- REGSTR_MACHTYPE_IBMPS2_80 = 'IBM PS/2-80';
- {$EXTERNALSYM REGSTR_MACHTYPE_IBMPS2_80}
- REGSTR_MACHTYPE_IBMPS2_90 = 'IBM PS/2-90';
- {$EXTERNALSYM REGSTR_MACHTYPE_IBMPS2_90}
- REGSTR_MACHTYPE_IBMPS1 = 'IBM PS/1';
- {$EXTERNALSYM REGSTR_MACHTYPE_IBMPS1}
- REGSTR_MACHTYPE_PHOENIX_PCAT = 'Phoenix PC/AT Compatible';
- {$EXTERNALSYM REGSTR_MACHTYPE_PHOENIX_PCAT}
- REGSTR_MACHTYPE_HP_VECTRA = 'HP Vectra';
- {$EXTERNALSYM REGSTR_MACHTYPE_HP_VECTRA}
- REGSTR_MACHTYPE_ATT_PC = 'ATandT PC';
- {$EXTERNALSYM REGSTR_MACHTYPE_ATT_PC}
- REGSTR_MACHTYPE_ZENITH_PC = 'Zenith PC';
- {$EXTERNALSYM REGSTR_MACHTYPE_ZENITH_PC}
-
- REGSTR_VAL_APMMENUSUSPEND = 'APMMenuSuspend';
- {$EXTERNALSYM REGSTR_VAL_APMMENUSUSPEND}
- APMMENUSUSPEND_DISABLED = 0; // always disabled
- {$EXTERNALSYM APMMENUSUSPEND_DISABLED}
- APMMENUSUSPEND_ENABLED = 1; // always enabled
- {$EXTERNALSYM APMMENUSUSPEND_ENABLED}
- APMMENUSUSPEND_UNDOCKED = 2; // enabled undocked
- {$EXTERNALSYM APMMENUSUSPEND_UNDOCKED}
- APMMENUSUSPEND_NOCHANGE = $80; // bitflag - cannot change setting via UI
- {$EXTERNALSYM APMMENUSUSPEND_NOCHANGE}
-
- REGSTR_VAL_APMACTIMEOUT = 'APMACTimeout';
- {$EXTERNALSYM REGSTR_VAL_APMACTIMEOUT}
- REGSTR_VAL_APMBATTIMEOUT = 'APMBatTimeout';
- {$EXTERNALSYM REGSTR_VAL_APMBATTIMEOUT}
- APMTIMEOUT_DISABLED = 0;
- {$EXTERNALSYM APMTIMEOUT_DISABLED}
-
- REGSTR_VAL_APMSHUTDOWNPOWER = 'APMShutDownPower';
- {$EXTERNALSYM REGSTR_VAL_APMSHUTDOWNPOWER}
-
- REGSTR_VAL_BUSTYPE = 'BusType';
- {$EXTERNALSYM REGSTR_VAL_BUSTYPE}
- REGSTR_VAL_CPU = 'CPU';
- {$EXTERNALSYM REGSTR_VAL_CPU}
- REGSTR_VAL_NDP = 'NDP';
- {$EXTERNALSYM REGSTR_VAL_NDP}
- REGSTR_VAL_PNPBIOSVER = 'PnPBIOSVer';
- {$EXTERNALSYM REGSTR_VAL_PNPBIOSVER}
- REGSTR_VAL_PNPSTRUCOFFSET = 'PnPStrucOffset';
- {$EXTERNALSYM REGSTR_VAL_PNPSTRUCOFFSET}
- REGSTR_VAL_PCIBIOSVER = 'PCIBIOSVer';
- {$EXTERNALSYM REGSTR_VAL_PCIBIOSVER}
- REGSTR_VAL_HWMECHANISM = 'HWMechanism';
- {$EXTERNALSYM REGSTR_VAL_HWMECHANISM}
- REGSTR_VAL_LASTPCIBUSNUM = 'LastPCIBusNum';
- {$EXTERNALSYM REGSTR_VAL_LASTPCIBUSNUM}
- REGSTR_VAL_CONVMEM = 'ConvMem';
- {$EXTERNALSYM REGSTR_VAL_CONVMEM}
- REGSTR_VAL_EXTMEM = 'ExtMem';
- {$EXTERNALSYM REGSTR_VAL_EXTMEM}
- REGSTR_VAL_COMPUTERNAME = 'ComputerName';
- {$EXTERNALSYM REGSTR_VAL_COMPUTERNAME}
- REGSTR_VAL_BIOSNAME = 'BIOSName';
- {$EXTERNALSYM REGSTR_VAL_BIOSNAME}
- REGSTR_VAL_BIOSVERSION = 'BIOSVersion';
- {$EXTERNALSYM REGSTR_VAL_BIOSVERSION}
- REGSTR_VAL_BIOSDATE = 'BIOSDate';
- {$EXTERNALSYM REGSTR_VAL_BIOSDATE}
- REGSTR_VAL_MODEL = 'Model';
- {$EXTERNALSYM REGSTR_VAL_MODEL}
- REGSTR_VAL_SUBMODEL = 'Submodel';
- {$EXTERNALSYM REGSTR_VAL_SUBMODEL}
- REGSTR_VAL_REVISION = 'Revision';
- {$EXTERNALSYM REGSTR_VAL_REVISION}
-
-//
-// Values used in the LPT(ECP) device entry
-//
-
- REGSTR_VAL_FIFODEPTH = 'FIFODepth';
- {$EXTERNALSYM REGSTR_VAL_FIFODEPTH}
- REGSTR_VAL_RDINTTHRESHOLD = 'RDIntThreshold';
- {$EXTERNALSYM REGSTR_VAL_RDINTTHRESHOLD}
- REGSTR_VAL_WRINTTHRESHOLD = 'WRIntThreshold';
- {$EXTERNALSYM REGSTR_VAL_WRINTTHRESHOLD}
-
-//used in enum\xxx\<devname>\<instname>
-
- REGSTR_VAL_PRIORITY = 'Priority';
- {$EXTERNALSYM REGSTR_VAL_PRIORITY}
- REGSTR_VAL_DRIVER = 'Driver';
- {$EXTERNALSYM REGSTR_VAL_DRIVER}
- REGSTR_VAL_FUNCDESC = 'FunctionDesc';
- {$EXTERNALSYM REGSTR_VAL_FUNCDESC}
- REGSTR_VAL_FORCEDCONFIG = 'ForcedConfig';
- {$EXTERNALSYM REGSTR_VAL_FORCEDCONFIG}
- REGSTR_VAL_CONFIGFLAGS = 'ConfigFlags'; // (binary ULONG)
- {$EXTERNALSYM REGSTR_VAL_CONFIGFLAGS}
- REGSTR_VAL_CSCONFIGFLAGS = 'CSConfigFlags'; // (binary ULONG)
- {$EXTERNALSYM REGSTR_VAL_CSCONFIGFLAGS}
-
- CONFIGFLAG_DISABLED = $00000001; // Set if disabled
- {$EXTERNALSYM CONFIGFLAG_DISABLED}
- CONFIGFLAG_REMOVED = $00000002; // Set if a present hardware enum device deleted
- {$EXTERNALSYM CONFIGFLAG_REMOVED}
- CONFIGFLAG_MANUAL_INSTALL = $00000004; // Set if the devnode was manually installed
- {$EXTERNALSYM CONFIGFLAG_MANUAL_INSTALL}
- CONFIGFLAG_IGNORE_BOOT_LC = $00000008; // Set if skip the boot config
- {$EXTERNALSYM CONFIGFLAG_IGNORE_BOOT_LC}
- CONFIGFLAG_NET_BOOT = $00000010; // Load this devnode when in net boot
- {$EXTERNALSYM CONFIGFLAG_NET_BOOT}
- CONFIGFLAG_REINSTALL = $00000020; // Redo install
- {$EXTERNALSYM CONFIGFLAG_REINSTALL}
- CONFIGFLAG_FAILEDINSTALL = $00000040; // Failed the install
- {$EXTERNALSYM CONFIGFLAG_FAILEDINSTALL}
- CONFIGFLAG_CANTSTOPACHILD = $00000080; // Can't stop/remove a single child
- {$EXTERNALSYM CONFIGFLAG_CANTSTOPACHILD}
- CONFIGFLAG_OKREMOVEROM = $00000100; // Can remove even if rom.
- {$EXTERNALSYM CONFIGFLAG_OKREMOVEROM}
- CONFIGFLAG_NOREMOVEEXIT = $00000200; // Don't remove at exit.
- {$EXTERNALSYM CONFIGFLAG_NOREMOVEEXIT}
- CONFIGFLAG_FINISH_INSTALL = $00000400; // Complete install for devnode running 'raw'
- {$EXTERNALSYM CONFIGFLAG_FINISH_INSTALL}
- CONFIGFLAG_NEEDS_FORCED_CONFIG = $00000800; // This devnode requires a forced config
- {$EXTERNALSYM CONFIGFLAG_NEEDS_FORCED_CONFIG}
- CONFIGFLAG_NETBOOT_CARD = $00001000; // This is the remote boot network card
- {$EXTERNALSYM CONFIGFLAG_NETBOOT_CARD}
- CONFIGFLAG_PARTIAL_LOG_CONF = $00002000; // This device has a partial logconfig
- {$EXTERNALSYM CONFIGFLAG_PARTIAL_LOG_CONF}
- CONFIGFLAG_SUPPRESS_SURPRISE = $00004000; // Set if unsafe removals should be ignored
- {$EXTERNALSYM CONFIGFLAG_SUPPRESS_SURPRISE}
- CONFIGFLAG_VERIFY_HARDWARE = $00008000; // Set if hardware should be tested for logo failures
- {$EXTERNALSYM CONFIGFLAG_VERIFY_HARDWARE}
-
- CSCONFIGFLAG_BITS = $00000007; // OR of below bits
- {$EXTERNALSYM CSCONFIGFLAG_BITS}
- CSCONFIGFLAG_DISABLED = $00000001; // Set if
- {$EXTERNALSYM CSCONFIGFLAG_DISABLED}
- CSCONFIGFLAG_DO_NOT_CREATE = $00000002; // Set if
- {$EXTERNALSYM CSCONFIGFLAG_DO_NOT_CREATE}
- CSCONFIGFLAG_DO_NOT_START = $00000004; // Set if
- {$EXTERNALSYM CSCONFIGFLAG_DO_NOT_START}
-
- DMSTATEFLAG_APPLYTOALL = $00000001; // Set if Apply To All check box is checked
- {$EXTERNALSYM DMSTATEFLAG_APPLYTOALL}
-
-//
-// Special devnodes name
-//
-
- REGSTR_VAL_ROOT_DEVNODE = 'HTREE\ROOT\0';
- {$EXTERNALSYM REGSTR_VAL_ROOT_DEVNODE}
- REGSTR_VAL_RESERVED_DEVNODE = 'HTREE\RESERVED\0';
- {$EXTERNALSYM REGSTR_VAL_RESERVED_DEVNODE}
- REGSTR_PATH_READDATAPORT = REGSTR_KEY_ISAENUM + '\ReadDataPort\0';
- {$EXTERNALSYM REGSTR_PATH_READDATAPORT}
-
-//
-// Multifunction definitions
-//
- REGSTR_PATH_MULTI_FUNCTION = 'MF';
- {$EXTERNALSYM REGSTR_PATH_MULTI_FUNCTION}
- REGSTR_VAL_RESOURCE_MAP = 'ResourceMap';
- {$EXTERNALSYM REGSTR_VAL_RESOURCE_MAP}
- REGSTR_PATH_CHILD_PREFIX = 'Child';
- {$EXTERNALSYM REGSTR_PATH_CHILD_PREFIX}
- NUM_RESOURCE_MAP = 256;
- {$EXTERNALSYM NUM_RESOURCE_MAP}
- REGSTR_VAL_MF_FLAGS = 'MFFlags';
- {$EXTERNALSYM REGSTR_VAL_MF_FLAGS}
- MF_FLAGS_EVEN_IF_NO_RESOURCE = $00000001;
- {$EXTERNALSYM MF_FLAGS_EVEN_IF_NO_RESOURCE}
- MF_FLAGS_NO_CREATE_IF_NO_RESOURCE = $00000002;
- {$EXTERNALSYM MF_FLAGS_NO_CREATE_IF_NO_RESOURCE}
- MF_FLAGS_FILL_IN_UNKNOWN_RESOURCE = $00000004;
- {$EXTERNALSYM MF_FLAGS_FILL_IN_UNKNOWN_RESOURCE}
- MF_FLAGS_CREATE_BUT_NO_SHOW_DISABLED = $00000008;
- {$EXTERNALSYM MF_FLAGS_CREATE_BUT_NO_SHOW_DISABLED}
-
-//
-// EISA multi functions add-on
-//
-
- {$IFDEF NEC_98}
- REGSTR_VAL_EISA_RANGES = 'NESARanges';
- {$EXTERNALSYM REGSTR_VAL_EISA_RANGES}
- REGSTR_VAL_EISA_FUNCTIONS = 'NESAFunctions';
- {$EXTERNALSYM REGSTR_VAL_EISA_FUNCTIONS}
- REGSTR_VAL_EISA_FUNCTIONS_MASK = 'NESAFunctionsMask';
- {$EXTERNALSYM REGSTR_VAL_EISA_FUNCTIONS_MASK}
- REGSTR_VAL_EISA_FLAGS = 'NESAFlags';
- {$EXTERNALSYM REGSTR_VAL_EISA_FLAGS}
- REGSTR_VAL_EISA_SIMULATE_INT15 = 'NESASimulateInt15';
- {$EXTERNALSYM REGSTR_VAL_EISA_SIMULATE_INT15}
- {$ELSE}
- REGSTR_VAL_EISA_RANGES = 'EISARanges';
- {$EXTERNALSYM REGSTR_VAL_EISA_RANGES}
- REGSTR_VAL_EISA_FUNCTIONS = 'EISAFunctions';
- {$EXTERNALSYM REGSTR_VAL_EISA_FUNCTIONS}
- REGSTR_VAL_EISA_FUNCTIONS_MASK = 'EISAFunctionsMask';
- {$EXTERNALSYM REGSTR_VAL_EISA_FUNCTIONS_MASK}
- REGSTR_VAL_EISA_FLAGS = 'EISAFlags';
- {$EXTERNALSYM REGSTR_VAL_EISA_FLAGS}
- REGSTR_VAL_EISA_SIMULATE_INT15 = 'EISASimulateInt15';
- {$EXTERNALSYM REGSTR_VAL_EISA_SIMULATE_INT15}
- {$ENDIF NEC_98}
- EISAFLAG_NO_IO_MERGE = $00000001;
- {$EXTERNALSYM EISAFLAG_NO_IO_MERGE}
- EISAFLAG_SLOT_IO_FIRST = $00000002;
- {$EXTERNALSYM EISAFLAG_SLOT_IO_FIRST}
- EISA_NO_MAX_FUNCTION = $FF;
- {$EXTERNALSYM EISA_NO_MAX_FUNCTION}
- NUM_EISA_RANGES = 4;
- {$EXTERNALSYM NUM_EISA_RANGES}
-
-//
-// Driver entries
-//
-
- REGSTR_VAL_DRVDESC = 'DriverDesc'; // value of enum\dev\inst\DRV
- {$EXTERNALSYM REGSTR_VAL_DRVDESC}
- REGSTR_VAL_DEVLOADER = 'DevLoader'; // value of DRV
- {$EXTERNALSYM REGSTR_VAL_DEVLOADER}
- REGSTR_VAL_STATICVXD = 'StaticVxD'; // value of DRV
- {$EXTERNALSYM REGSTR_VAL_STATICVXD}
- REGSTR_VAL_PROPERTIES = 'Properties'; // value of DRV
- {$EXTERNALSYM REGSTR_VAL_PROPERTIES}
- REGSTR_VAL_MANUFACTURER = 'Manufacturer';
- {$EXTERNALSYM REGSTR_VAL_MANUFACTURER}
- REGSTR_VAL_EXISTS = 'Exists'; // value of HCC\HW\ENUM\ROOT\dev\inst
- {$EXTERNALSYM REGSTR_VAL_EXISTS}
- REGSTR_VAL_CMENUMFLAGS = 'CMEnumFlags'; // (binary ULONG)
- {$EXTERNALSYM REGSTR_VAL_CMENUMFLAGS}
- REGSTR_VAL_CMDRIVFLAGS = 'CMDrivFlags'; // (binary ULONG)
- {$EXTERNALSYM REGSTR_VAL_CMDRIVFLAGS}
- REGSTR_VAL_ENUMERATOR = 'Enumerator'; // value of DRV
- {$EXTERNALSYM REGSTR_VAL_ENUMERATOR}
- REGSTR_VAL_DEVICEDRIVER = 'DeviceDriver'; // value of DRV
- {$EXTERNALSYM REGSTR_VAL_DEVICEDRIVER}
- REGSTR_VAL_PORTNAME = 'PortName'; // VCOMM uses this for it's port names
- {$EXTERNALSYM REGSTR_VAL_PORTNAME}
- REGSTR_VAL_INFPATH = 'InfPath';
- {$EXTERNALSYM REGSTR_VAL_INFPATH}
- REGSTR_VAL_INFSECTION = 'InfSection';
- {$EXTERNALSYM REGSTR_VAL_INFSECTION}
- REGSTR_VAL_INFSECTIONEXT = 'InfSectionExt';
- {$EXTERNALSYM REGSTR_VAL_INFSECTIONEXT}
- REGSTR_VAL_POLLING = 'Polling'; // SCSI specific
- {$EXTERNALSYM REGSTR_VAL_POLLING}
- REGSTR_VAL_DONTLOADIFCONFLICT = 'DontLoadIfConflict'; // SCSI specific
- {$EXTERNALSYM REGSTR_VAL_DONTLOADIFCONFLICT}
- REGSTR_VAL_PORTSUBCLASS = 'PortSubClass';
- {$EXTERNALSYM REGSTR_VAL_PORTSUBCLASS}
- REGSTR_VAL_NETCLEAN = 'NetClean'; // Driver required for NetClean boot
- {$EXTERNALSYM REGSTR_VAL_NETCLEAN}
- REGSTR_VAL_IDE_NO_SERIALIZE = 'IDENoSerialize'; // IDE specific
- {$EXTERNALSYM REGSTR_VAL_IDE_NO_SERIALIZE}
- REGSTR_VAL_NOCMOSORFDPT = 'NoCMOSorFDPT'; // IDE specific
- {$EXTERNALSYM REGSTR_VAL_NOCMOSORFDPT}
- REGSTR_VAL_COMVERIFYBASE = 'COMVerifyBase'; // VCD specific
- {$EXTERNALSYM REGSTR_VAL_COMVERIFYBASE}
- REGSTR_VAL_MATCHINGDEVID = 'MatchingDeviceId';
- {$EXTERNALSYM REGSTR_VAL_MATCHINGDEVID}
- REGSTR_VAL_DRIVERDATE = 'DriverDate'; // value of DRV
- {$EXTERNALSYM REGSTR_VAL_DRIVERDATE}
- REGSTR_VAL_DRIVERDATEDATA = 'DriverDateData'; // value of DRV
- {$EXTERNALSYM REGSTR_VAL_DRIVERDATEDATA}
- REGSTR_VAL_DRIVERVERSION = 'DriverVersion'; // value of DRV
- {$EXTERNALSYM REGSTR_VAL_DRIVERVERSION}
- REGSTR_VAL_LOCATION_INFORMATION_OVERRIDE = 'LocationInformationOverride'; // value of DRV
- {$EXTERNALSYM REGSTR_VAL_LOCATION_INFORMATION_OVERRIDE}
-
-//
-// Driver keys
-//
-
- REGSTR_KEY_OVERRIDE = 'Override'; // key under the software section
- {$EXTERNALSYM REGSTR_KEY_OVERRIDE}
-
-//used by CONFIGMG
-
- REGSTR_VAL_CONFIGMG = 'CONFIGMG'; // Config Manager VxD name
- {$EXTERNALSYM REGSTR_VAL_CONFIGMG}
- REGSTR_VAL_SYSDM = 'SysDM'; // The device installer DLL
- {$EXTERNALSYM REGSTR_VAL_SYSDM}
- REGSTR_VAL_SYSDMFUNC = 'SysDMFunc'; // The device installer DLL function
- {$EXTERNALSYM REGSTR_VAL_SYSDMFUNC}
- REGSTR_VAL_PRIVATE = 'Private'; // The private library
- {$EXTERNALSYM REGSTR_VAL_PRIVATE}
- REGSTR_VAL_PRIVATEFUNC = 'PrivateFunc'; // The private library function
- {$EXTERNALSYM REGSTR_VAL_PRIVATEFUNC}
- REGSTR_VAL_DETECT = 'Detect'; // The detection library
- {$EXTERNALSYM REGSTR_VAL_DETECT}
- REGSTR_VAL_DETECTFUNC = 'DetectFunc'; // The detection library function
- {$EXTERNALSYM REGSTR_VAL_DETECTFUNC}
- REGSTR_VAL_ASKFORCONFIG = 'AskForConfig'; // The AskForConfig library
- {$EXTERNALSYM REGSTR_VAL_ASKFORCONFIG}
- REGSTR_VAL_ASKFORCONFIGFUNC = 'AskForConfigFunc'; // The AskForConfig library function
- {$EXTERNALSYM REGSTR_VAL_ASKFORCONFIGFUNC}
- REGSTR_VAL_WAITFORUNDOCK = 'WaitForUndock'; // The WaitForUndock library
- {$EXTERNALSYM REGSTR_VAL_WAITFORUNDOCK}
- REGSTR_VAL_WAITFORUNDOCKFUNC = 'WaitForUndockFunc'; // The WaitForUndock library function
- {$EXTERNALSYM REGSTR_VAL_WAITFORUNDOCKFUNC}
- REGSTR_VAL_REMOVEROMOKAY = 'RemoveRomOkay'; // The RemoveRomOkay library
- {$EXTERNALSYM REGSTR_VAL_REMOVEROMOKAY}
- REGSTR_VAL_REMOVEROMOKAYFUNC = 'RemoveRomOkayFunc'; // The RemoveRomOkay library function
- {$EXTERNALSYM REGSTR_VAL_REMOVEROMOKAYFUNC}
-
-//used in IDCONFIGDB
-
- REGSTR_VAL_CURCONFIG = 'CurrentConfig'; // value of idconfigdb
- {$EXTERNALSYM REGSTR_VAL_CURCONFIG}
- REGSTR_VAL_FRIENDLYNAME = 'FriendlyName'; // value of idconfigdb
- {$EXTERNALSYM REGSTR_VAL_FRIENDLYNAME}
- REGSTR_VAL_CURRENTCONFIG = 'CurrentConfig'; // value of idconfigdb
- {$EXTERNALSYM REGSTR_VAL_CURRENTCONFIG}
- REGSTR_VAL_MAP = 'Map'; // value of idconfigdb
- {$EXTERNALSYM REGSTR_VAL_MAP}
- REGSTR_VAL_ID = 'CurrentID'; // value of idconfigdb
- {$EXTERNALSYM REGSTR_VAL_ID}
- REGSTR_VAL_DOCKED = 'CurrentDockedState'; // value of idconfigdb
- {$EXTERNALSYM REGSTR_VAL_DOCKED}
- REGSTR_VAL_CHECKSUM = 'CurrentChecksum'; // value of idconfigdb
- {$EXTERNALSYM REGSTR_VAL_CHECKSUM}
- REGSTR_VAL_HWDETECT = 'HardwareDetect'; // value of idconfigdb
- {$EXTERNALSYM REGSTR_VAL_HWDETECT}
- REGSTR_VAL_INHIBITRESULTS = 'InhibitResults'; // value of idconfigdb
- {$EXTERNALSYM REGSTR_VAL_INHIBITRESULTS}
-
-//used in HKEY_CURRENT_CONFIG
-
- REGSTR_VAL_PROFILEFLAGS = 'ProfileFlags'; // value of HKEY_CURRENT_CONFIG
- {$EXTERNALSYM REGSTR_VAL_PROFILEFLAGS}
-
-//used in PCMCIA
-
- REGSTR_KEY_PCMCIA = 'PCMCIA\'; // PCMCIA dev ID prefix
- {$EXTERNALSYM REGSTR_KEY_PCMCIA}
- REGSTR_KEY_PCUNKNOWN = 'UNKNOWN_MANUFACTURER'; // PCMCIA dev ID manuf
- {$EXTERNALSYM REGSTR_KEY_PCUNKNOWN}
- REGSTR_VAL_PCSSDRIVER = 'Driver'; // value of DRV
- {$EXTERNALSYM REGSTR_VAL_PCSSDRIVER}
- REGSTR_KEY_PCMTD = 'MTD-'; // MTD dev ID component
- {$EXTERNALSYM REGSTR_KEY_PCMTD}
- REGSTR_VAL_PCMTDRIVER = 'MTD'; // value of Mem Tech DRV
- {$EXTERNALSYM REGSTR_VAL_PCMTDRIVER}
-
-//used in hardware\enum\dev\inst by Device Installer
-
- REGSTR_VAL_HARDWAREID = 'HardwareID'; // value of enum\dev\inst
- {$EXTERNALSYM REGSTR_VAL_HARDWAREID}
-
-//value names under class brach REGSTR_KEY_CLASS + class name
-// and for the drivers REGSTR_KEY_CLASS\classname\xxxx
-
- REGSTR_VAL_INSTALLER = 'Installer'; // 16-bit class installer module/entry point
- {$EXTERNALSYM REGSTR_VAL_INSTALLER}
- REGSTR_VAL_INSTALLER_32 = 'Installer32'; // 32-bit class installer module/entry point
- {$EXTERNALSYM REGSTR_VAL_INSTALLER_32}
- REGSTR_VAL_INSICON = 'Icon'; // value of class\name
- {$EXTERNALSYM REGSTR_VAL_INSICON}
- REGSTR_VAL_ENUMPROPPAGES = 'EnumPropPages'; // For Class/Device Properties (16-bit)
- {$EXTERNALSYM REGSTR_VAL_ENUMPROPPAGES}
- REGSTR_VAL_ENUMPROPPAGES_32 = 'EnumPropPages32'; // For Class/Device Properties (32-bit)
- {$EXTERNALSYM REGSTR_VAL_ENUMPROPPAGES_32}
- REGSTR_VAL_BASICPROPERTIES = 'BasicProperties'; // For CPL basic Properties (16-bit)
- {$EXTERNALSYM REGSTR_VAL_BASICPROPERTIES}
- REGSTR_VAL_BASICPROPERTIES_32 = 'BasicProperties32'; // For CPL basic Properties (32-bit)
- {$EXTERNALSYM REGSTR_VAL_BASICPROPERTIES_32}
- REGSTR_VAL_COINSTALLERS_32 = 'CoInstallers32'; // Device-specific co-installer multi-sz list (32-bit)
- {$EXTERNALSYM REGSTR_VAL_COINSTALLERS_32}
- REGSTR_VAL_PRIVATEPROBLEM = 'PrivateProblem'; // For Handling Private Problems
- {$EXTERNALSYM REGSTR_VAL_PRIVATEPROBLEM}
-
-// names used for display driver set information
-
- REGSTR_KEY_CURRENT = 'Current'; // current mode information
- {$EXTERNALSYM REGSTR_KEY_CURRENT}
- REGSTR_KEY_DEFAULT = 'Default'; // default configuration
- {$EXTERNALSYM REGSTR_KEY_DEFAULT}
- REGSTR_KEY_MODES = 'Modes'; // modes subtree
- {$EXTERNALSYM REGSTR_KEY_MODES}
-
- REGSTR_VAL_MODE = 'Mode'; // default mode
- {$EXTERNALSYM REGSTR_VAL_MODE}
- REGSTR_VAL_BPP = 'BPP'; // bits per pixel
- {$EXTERNALSYM REGSTR_VAL_BPP}
- REGSTR_VAL_HRES = 'HRes'; // horizontal resolution
- {$EXTERNALSYM REGSTR_VAL_HRES}
- REGSTR_VAL_VRES = 'VRes'; // vertical resolution
- {$EXTERNALSYM REGSTR_VAL_VRES}
- REGSTR_VAL_FONTSIZE = 'FontSize'; // used in default or override
- {$EXTERNALSYM REGSTR_VAL_FONTSIZE}
- REGSTR_VAL_DRV = 'drv'; // the driver file
- {$EXTERNALSYM REGSTR_VAL_DRV}
- REGSTR_VAL_GRB = 'grb'; // the grabber file
- {$EXTERNALSYM REGSTR_VAL_GRB}
- REGSTR_VAL_VDD = 'vdd'; // vdds used here
- {$EXTERNALSYM REGSTR_VAL_VDD}
- REGSTR_VAL_VER = 'Ver';
- {$EXTERNALSYM REGSTR_VAL_VER}
- REGSTR_VAL_MAXRES = 'MaxResolution'; // max res for monitors
- {$EXTERNALSYM REGSTR_VAL_MAXRES}
- REGSTR_VAL_DPMS = 'DPMS'; // DPMS enabled
- {$EXTERNALSYM REGSTR_VAL_DPMS}
- REGSTR_VAL_RESUMERESET = 'ResumeReset'; // need reset on resume
- {$EXTERNALSYM REGSTR_VAL_RESUMERESET}
-
- REGSTR_VAL_DESCRIPTION = 'Description';
- {$EXTERNALSYM REGSTR_VAL_DESCRIPTION}
-
-// keys in fontsize tree
-
- REGSTR_KEY_SYSTEM = 'System'; // entries for system.ini
- {$EXTERNALSYM REGSTR_KEY_SYSTEM}
- REGSTR_KEY_USER = 'User'; // entries for win.ini
- {$EXTERNALSYM REGSTR_KEY_USER}
- REGSTR_VAL_DPI = 'dpi'; // dpi of fontsize
- {$EXTERNALSYM REGSTR_VAL_DPI}
-
-//
-// Used by PCIC socket services
-//
-
- REGSTR_VAL_PCICOPTIONS = 'PCICOptions'; // Binary DWORD. IRQ mask in
- {$EXTERNALSYM REGSTR_VAL_PCICOPTIONS}
- // low word. # skts in high
- {$IFDEF NEC_98}
- PCIC_DEFAULT_IRQMASK = $1468; // Default IRQ masks
- {$EXTERNALSYM PCIC_DEFAULT_IRQMASK}
- {$ELSE}
- PCIC_DEFAULT_IRQMASK = $4EB8; // Default IRQ masks
- {$EXTERNALSYM PCIC_DEFAULT_IRQMASK}
- {$ENDIF NEC_98}
- PCIC_DEFAULT_NUMSOCKETS = 0; // 0 = Automatic detection
- {$EXTERNALSYM PCIC_DEFAULT_NUMSOCKETS}
- REGSTR_VAL_PCICIRQMAP = 'PCICIRQMap'; // Binary 16 byte IRQ map table
- {$EXTERNALSYM REGSTR_VAL_PCICIRQMAP}
-
-// names used for control panel entries
-
- REGSTR_PATH_APPEARANCE = 'Control Panel\Appearance';
- {$EXTERNALSYM REGSTR_PATH_APPEARANCE}
- REGSTR_PATH_LOOKSCHEMES = 'Control Panel\Appearance\Schemes';
- {$EXTERNALSYM REGSTR_PATH_LOOKSCHEMES}
- REGSTR_VAL_CUSTOMCOLORS = 'CustomColors';
- {$EXTERNALSYM REGSTR_VAL_CUSTOMCOLORS}
-
- REGSTR_PATH_SCREENSAVE = 'Control Panel\Desktop';
- {$EXTERNALSYM REGSTR_PATH_SCREENSAVE}
- REGSTR_VALUE_USESCRPASSWORD = 'ScreenSaveUsePassword';
- {$EXTERNALSYM REGSTR_VALUE_USESCRPASSWORD}
- REGSTR_VALUE_SCRPASSWORD = 'ScreenSave_Data';
- {$EXTERNALSYM REGSTR_VALUE_SCRPASSWORD}
-
- REGSTR_VALUE_LOWPOWERTIMEOUT = 'ScreenSaveLowPowerTimeout';
- {$EXTERNALSYM REGSTR_VALUE_LOWPOWERTIMEOUT}
- REGSTR_VALUE_POWEROFFTIMEOUT = 'ScreenSavePowerOffTimeout';
- {$EXTERNALSYM REGSTR_VALUE_POWEROFFTIMEOUT}
- REGSTR_VALUE_LOWPOWERACTIVE = 'ScreenSaveLowPowerActive';
- {$EXTERNALSYM REGSTR_VALUE_LOWPOWERACTIVE}
- REGSTR_VALUE_POWEROFFACTIVE = 'ScreenSavePowerOffActive';
- {$EXTERNALSYM REGSTR_VALUE_POWEROFFACTIVE}
-
-// used for Windows applets
-
- REGSTR_PATH_WINDOWSAPPLETS = 'Software\Microsoft\Windows\CurrentVersion\Applets';
- {$EXTERNALSYM REGSTR_PATH_WINDOWSAPPLETS}
-
-//
-// system tray. Flag values defined in systrap.h
-//
-
- REGSTR_PATH_SYSTRAY = 'Software\Microsoft\Windows\CurrentVersion\Applets\SysTray';
- {$EXTERNALSYM REGSTR_PATH_SYSTRAY}
- REGSTR_VAL_SYSTRAYSVCS = 'Services';
- {$EXTERNALSYM REGSTR_VAL_SYSTRAYSVCS}
- REGSTR_VAL_SYSTRAYBATFLAGS = 'PowerFlags';
- {$EXTERNALSYM REGSTR_VAL_SYSTRAYBATFLAGS}
- REGSTR_VAL_SYSTRAYPCCARDFLAGS = 'PCMCIAFlags';
- {$EXTERNALSYM REGSTR_VAL_SYSTRAYPCCARDFLAGS}
-
-//
-// Used by system networking components to store per-user values.
-// All keys here are under HKCU.
-//
-
- REGSTR_PATH_NETWORK_USERSETTINGS = 'Network';
- {$EXTERNALSYM REGSTR_PATH_NETWORK_USERSETTINGS}
-
- REGSTR_KEY_NETWORK_PERSISTENT = '\Persistent';
- {$EXTERNALSYM REGSTR_KEY_NETWORK_PERSISTENT}
- REGSTR_KEY_NETWORK_RECENT = '\Recent';
- {$EXTERNALSYM REGSTR_KEY_NETWORK_RECENT}
- REGSTR_VAL_REMOTE_PATH = 'RemotePath';
- {$EXTERNALSYM REGSTR_VAL_REMOTE_PATH}
- REGSTR_VAL_USER_NAME = 'UserName';
- {$EXTERNALSYM REGSTR_VAL_USER_NAME}
- REGSTR_VAL_PROVIDER_NAME = 'ProviderName';
- {$EXTERNALSYM REGSTR_VAL_PROVIDER_NAME}
- REGSTR_VAL_CONNECTION_TYPE = 'ConnectionType';
- {$EXTERNALSYM REGSTR_VAL_CONNECTION_TYPE}
- REGSTR_VAL_UPGRADE = 'Upgrade';
- {$EXTERNALSYM REGSTR_VAL_UPGRADE}
-
- REGSTR_KEY_LOGON = '\Logon';
- {$EXTERNALSYM REGSTR_KEY_LOGON}
- REGSTR_VAL_MUSTBEVALIDATED = 'MustBeValidated';
- {$EXTERNALSYM REGSTR_VAL_MUSTBEVALIDATED}
- REGSTR_VAL_RUNLOGINSCRIPT = 'ProcessLoginScript';
- {$EXTERNALSYM REGSTR_VAL_RUNLOGINSCRIPT}
-
-//
-// NetworkProvider entries. These entries are under
-// REGSTR_PATH_SERVICES\xxx\NetworkProvider
-//
-
- REGSTR_KEY_NETWORKPROVIDER = '\NetworkProvider';
- {$EXTERNALSYM REGSTR_KEY_NETWORKPROVIDER}
- REGSTR_PATH_NW32NETPROVIDER = REGSTR_PATH_SERVICES + '\NWNP32' + REGSTR_KEY_NETWORKPROVIDER;
- {$EXTERNALSYM REGSTR_PATH_NW32NETPROVIDER}
- REGSTR_PATH_MS32NETPROVIDER = REGSTR_PATH_SERVICES + '\MSNP32' + REGSTR_KEY_NETWORKPROVIDER;
- {$EXTERNALSYM REGSTR_PATH_MS32NETPROVIDER}
- REGSTR_VAL_AUTHENT_AGENT = 'AuthenticatingAgent';
- {$EXTERNALSYM REGSTR_VAL_AUTHENT_AGENT}
-
-//
-// Entries under REGSTR_PATH_REALMODENET
-//
-
- REGSTR_VAL_PREFREDIR = 'PreferredRedir';
- {$EXTERNALSYM REGSTR_VAL_PREFREDIR}
- REGSTR_VAL_AUTOSTART = 'AutoStart';
- {$EXTERNALSYM REGSTR_VAL_AUTOSTART}
- REGSTR_VAL_AUTOLOGON = 'AutoLogon';
- {$EXTERNALSYM REGSTR_VAL_AUTOLOGON}
- REGSTR_VAL_NETCARD = 'Netcard';
- {$EXTERNALSYM REGSTR_VAL_NETCARD}
- REGSTR_VAL_TRANSPORT = 'Transport';
- {$EXTERNALSYM REGSTR_VAL_TRANSPORT}
- REGSTR_VAL_DYNAMIC = 'Dynamic';
- {$EXTERNALSYM REGSTR_VAL_DYNAMIC}
- REGSTR_VAL_TRANSITION = 'Transition';
- {$EXTERNALSYM REGSTR_VAL_TRANSITION}
- REGSTR_VAL_STATICDRIVE = 'StaticDrive';
- {$EXTERNALSYM REGSTR_VAL_STATICDRIVE}
- REGSTR_VAL_LOADHI = 'LoadHi';
- {$EXTERNALSYM REGSTR_VAL_LOADHI}
- REGSTR_VAL_LOADRMDRIVERS = 'LoadRMDrivers';
- {$EXTERNALSYM REGSTR_VAL_LOADRMDRIVERS}
- REGSTR_VAL_SETUPN = 'SetupN';
- {$EXTERNALSYM REGSTR_VAL_SETUPN}
- REGSTR_VAL_SETUPNPATH = 'SetupNPath';
- {$EXTERNALSYM REGSTR_VAL_SETUPNPATH}
-
-//
-// Entries under REGSTR_PATH_CVNETWORK
-//
-
- REGSTR_VAL_WRKGRP_FORCEMAPPING = 'WrkgrpForceMapping';
- {$EXTERNALSYM REGSTR_VAL_WRKGRP_FORCEMAPPING}
- REGSTR_VAL_WRKGRP_REQUIRED = 'WrkgrpRequired';
- {$EXTERNALSYM REGSTR_VAL_WRKGRP_REQUIRED}
-
-//
-// NT-compatible place where the name of the currently logged-on user is stored.
-//
-
- REGSTR_PATH_CURRENT_CONTROL_SET = 'System\CurrentControlSet\Control';
- {$EXTERNALSYM REGSTR_PATH_CURRENT_CONTROL_SET}
- REGSTR_VAL_CURRENT_USER = 'Current User';
- {$EXTERNALSYM REGSTR_VAL_CURRENT_USER}
-
-// section where password providers are installed (each provider has subkey under this key)
-
- REGSTR_PATH_PWDPROVIDER = 'System\CurrentControlSet\Control\PwdProvider';
- {$EXTERNALSYM REGSTR_PATH_PWDPROVIDER}
- REGSTR_VAL_PWDPROVIDER_PATH = 'ProviderPath';
- {$EXTERNALSYM REGSTR_VAL_PWDPROVIDER_PATH}
- REGSTR_VAL_PWDPROVIDER_DESC = 'Description';
- {$EXTERNALSYM REGSTR_VAL_PWDPROVIDER_DESC}
- REGSTR_VAL_PWDPROVIDER_CHANGEPWD = 'ChangePassword';
- {$EXTERNALSYM REGSTR_VAL_PWDPROVIDER_CHANGEPWD}
- REGSTR_VAL_PWDPROVIDER_CHANGEPWDHWND = 'ChangePasswordHwnd';
- {$EXTERNALSYM REGSTR_VAL_PWDPROVIDER_CHANGEPWDHWND}
- REGSTR_VAL_PWDPROVIDER_GETPWDSTATUS = 'GetPasswordStatus';
- {$EXTERNALSYM REGSTR_VAL_PWDPROVIDER_GETPWDSTATUS}
- REGSTR_VAL_PWDPROVIDER_ISNP = 'NetworkProvider';
- {$EXTERNALSYM REGSTR_VAL_PWDPROVIDER_ISNP}
- REGSTR_VAL_PWDPROVIDER_CHANGEORDER = 'ChangeOrder';
- {$EXTERNALSYM REGSTR_VAL_PWDPROVIDER_CHANGEORDER}
-
-//
-// Used by administrator configuration tool and various components who enforce
-// policies.
-//
-
- REGSTR_PATH_POLICIES = 'Software\Microsoft\Windows\CurrentVersion\Policies';
- {$EXTERNALSYM REGSTR_PATH_POLICIES}
-
-// used to control remote update of administrator policies
-
- REGSTR_PATH_UPDATE = 'System\CurrentControlSet\Control\Update';
- {$EXTERNALSYM REGSTR_PATH_UPDATE}
- REGSTR_VALUE_ENABLE = 'Enable';
- {$EXTERNALSYM REGSTR_VALUE_ENABLE}
- REGSTR_VALUE_VERBOSE = 'Verbose';
- {$EXTERNALSYM REGSTR_VALUE_VERBOSE}
- REGSTR_VALUE_NETPATH = 'NetworkPath';
- {$EXTERNALSYM REGSTR_VALUE_NETPATH}
- REGSTR_VALUE_DEFAULTLOC = 'UseDefaultNetLocation';
- {$EXTERNALSYM REGSTR_VALUE_DEFAULTLOC}
-
-//
-// Entries under REGSTR_PATH_POLICIES
-//
-
- REGSTR_KEY_NETWORK = 'Network';
- {$EXTERNALSYM REGSTR_KEY_NETWORK}
- // already defined above
- // REGSTR_KEY_SYSTEM = 'System';
- // {$EXTERNALSYM REGSTR_KEY_SYSTEM}
- REGSTR_KEY_PRINTERS = 'Printers';
- {$EXTERNALSYM REGSTR_KEY_PRINTERS}
- REGSTR_KEY_WINOLDAPP = 'WinOldApp';
- {$EXTERNALSYM REGSTR_KEY_WINOLDAPP}
-
-// (following are values REG_DWORD, legal values 0 or 1, treat as TEXT("0") if value not present)
-// policies under NETWORK key
-
- REGSTR_VAL_NOFILESHARING = 'NoFileSharing'; // TEXT("1") prevents server from loading
- {$EXTERNALSYM REGSTR_VAL_NOFILESHARING}
- REGSTR_VAL_NOPRINTSHARING = 'NoPrintSharing';
- {$EXTERNALSYM REGSTR_VAL_NOPRINTSHARING}
- REGSTR_VAL_NOFILESHARINGCTRL = 'NoFileSharingControl'; // TEXT("1") removes sharing ui
- {$EXTERNALSYM REGSTR_VAL_NOFILESHARINGCTRL}
- REGSTR_VAL_NOPRINTSHARINGCTRL = 'NoPrintSharingControl';
- {$EXTERNALSYM REGSTR_VAL_NOPRINTSHARINGCTRL}
- REGSTR_VAL_HIDESHAREPWDS = 'HideSharePwds'; // TEXT("1") hides share passwords with asterisks
- {$EXTERNALSYM REGSTR_VAL_HIDESHAREPWDS}
- REGSTR_VAL_DISABLEPWDCACHING = 'DisablePwdCaching'; // TEXT("1") disables caching
- {$EXTERNALSYM REGSTR_VAL_DISABLEPWDCACHING}
- REGSTR_VAL_ALPHANUMPWDS = 'AlphanumPwds'; // TEXT("1") forces alphanumeric passwords
- {$EXTERNALSYM REGSTR_VAL_ALPHANUMPWDS}
- REGSTR_VAL_NETSETUP_DISABLE = 'NoNetSetup';
- {$EXTERNALSYM REGSTR_VAL_NETSETUP_DISABLE}
- REGSTR_VAL_NETSETUP_NOCONFIGPAGE = 'NoNetSetupConfigPage';
- {$EXTERNALSYM REGSTR_VAL_NETSETUP_NOCONFIGPAGE}
- REGSTR_VAL_NETSETUP_NOIDPAGE = 'NoNetSetupIDPage';
- {$EXTERNALSYM REGSTR_VAL_NETSETUP_NOIDPAGE}
- REGSTR_VAL_NETSETUP_NOSECURITYPAGE = 'NoNetSetupSecurityPage';
- {$EXTERNALSYM REGSTR_VAL_NETSETUP_NOSECURITYPAGE}
- REGSTR_VAL_SYSTEMCPL_NOVIRTMEMPAGE = 'NoVirtMemPage';
- {$EXTERNALSYM REGSTR_VAL_SYSTEMCPL_NOVIRTMEMPAGE}
- REGSTR_VAL_SYSTEMCPL_NODEVMGRPAGE = 'NoDevMgrPage';
- {$EXTERNALSYM REGSTR_VAL_SYSTEMCPL_NODEVMGRPAGE}
- REGSTR_VAL_SYSTEMCPL_NOCONFIGPAGE = 'NoConfigPage';
- {$EXTERNALSYM REGSTR_VAL_SYSTEMCPL_NOCONFIGPAGE}
- REGSTR_VAL_SYSTEMCPL_NOFILESYSPAGE = 'NoFileSysPage';
- {$EXTERNALSYM REGSTR_VAL_SYSTEMCPL_NOFILESYSPAGE}
- REGSTR_VAL_DISPCPL_NODISPCPL = 'NoDispCPL';
- {$EXTERNALSYM REGSTR_VAL_DISPCPL_NODISPCPL}
- REGSTR_VAL_DISPCPL_NOBACKGROUNDPAGE = 'NoDispBackgroundPage';
- {$EXTERNALSYM REGSTR_VAL_DISPCPL_NOBACKGROUNDPAGE}
- REGSTR_VAL_DISPCPL_NOSCRSAVPAGE = 'NoDispScrSavPage';
- {$EXTERNALSYM REGSTR_VAL_DISPCPL_NOSCRSAVPAGE}
- REGSTR_VAL_DISPCPL_NOAPPEARANCEPAGE = 'NoDispAppearancePage';
- {$EXTERNALSYM REGSTR_VAL_DISPCPL_NOAPPEARANCEPAGE}
- REGSTR_VAL_DISPCPL_NOSETTINGSPAGE = 'NoDispSettingsPage';
- {$EXTERNALSYM REGSTR_VAL_DISPCPL_NOSETTINGSPAGE}
- REGSTR_VAL_SECCPL_NOSECCPL = 'NoSecCPL';
- {$EXTERNALSYM REGSTR_VAL_SECCPL_NOSECCPL}
- REGSTR_VAL_SECCPL_NOPWDPAGE = 'NoPwdPage';
- {$EXTERNALSYM REGSTR_VAL_SECCPL_NOPWDPAGE}
- REGSTR_VAL_SECCPL_NOADMINPAGE = 'NoAdminPage';
- {$EXTERNALSYM REGSTR_VAL_SECCPL_NOADMINPAGE}
- REGSTR_VAL_SECCPL_NOPROFILEPAGE = 'NoProfilePage';
- {$EXTERNALSYM REGSTR_VAL_SECCPL_NOPROFILEPAGE}
- REGSTR_VAL_PRINTERS_HIDETABS = 'NoPrinterTabs';
- {$EXTERNALSYM REGSTR_VAL_PRINTERS_HIDETABS}
- REGSTR_VAL_PRINTERS_NODELETE = 'NoDeletePrinter';
- {$EXTERNALSYM REGSTR_VAL_PRINTERS_NODELETE}
- REGSTR_VAL_PRINTERS_NOADD = 'NoAddPrinter';
- {$EXTERNALSYM REGSTR_VAL_PRINTERS_NOADD}
- REGSTR_VAL_WINOLDAPP_DISABLED = 'Disabled';
- {$EXTERNALSYM REGSTR_VAL_WINOLDAPP_DISABLED}
- REGSTR_VAL_WINOLDAPP_NOREALMODE = 'NoRealMode';
- {$EXTERNALSYM REGSTR_VAL_WINOLDAPP_NOREALMODE}
- REGSTR_VAL_NOENTIRENETWORK = 'NoEntireNetwork';
- {$EXTERNALSYM REGSTR_VAL_NOENTIRENETWORK}
- REGSTR_VAL_NOWORKGROUPCONTENTS = 'NoWorkgroupContents';
- {$EXTERNALSYM REGSTR_VAL_NOWORKGROUPCONTENTS}
-
-// (following are values REG_DWORD, legal values 0 or 1, treat as TEXT("1") if value not present)
-// policies under Policies\SYSTEM key
- REGSTR_VAL_UNDOCK_WITHOUT_LOGON = 'UndockWithoutLogon';
- {$EXTERNALSYM REGSTR_VAL_UNDOCK_WITHOUT_LOGON}
-
-// REG_DWORD, 0=off, otherwise value is minimum # of chars to allow in password
-
- REGSTR_VAL_MINPWDLEN = 'MinPwdLen';
- {$EXTERNALSYM REGSTR_VAL_MINPWDLEN}
-
-// REG_DWORD, 0=off, otherwise value is # of days for pwd to expire
-
- REGSTR_VAL_PWDEXPIRATION = 'PwdExpiration';
- {$EXTERNALSYM REGSTR_VAL_PWDEXPIRATION}
-
- REGSTR_VAL_WIN31PROVIDER = 'Win31Provider'; // REG_SZ
- {$EXTERNALSYM REGSTR_VAL_WIN31PROVIDER}
-
-// policies under SYSTEM key
-
- REGSTR_VAL_DISABLEREGTOOLS = 'DisableRegistryTools';
- {$EXTERNALSYM REGSTR_VAL_DISABLEREGTOOLS}
-
- REGSTR_PATH_WINLOGON = 'Software\Microsoft\Windows\CurrentVersion\Winlogon';
- {$EXTERNALSYM REGSTR_PATH_WINLOGON}
- REGSTR_VAL_LEGALNOTICECAPTION = 'LegalNoticeCaption'; // REG_SZ
- {$EXTERNALSYM REGSTR_VAL_LEGALNOTICECAPTION}
- REGSTR_VAL_LEGALNOTICETEXT = 'LegalNoticeText'; // REG_SZ
- {$EXTERNALSYM REGSTR_VAL_LEGALNOTICETEXT}
- REGSTR_VAL_DRIVE_SPINDOWN = 'NoDispSpinDown';
- {$EXTERNALSYM REGSTR_VAL_DRIVE_SPINDOWN}
-
- REGSTR_VAL_RESTRICTRUN = 'RestrictRun';
- {$EXTERNALSYM REGSTR_VAL_RESTRICTRUN}
-
-//
-// Entries in policy file. (Won't be in local registry, only policy hive)
-
- REGSTR_KEY_POL_USERS = 'Users';
- {$EXTERNALSYM REGSTR_KEY_POL_USERS}
- REGSTR_KEY_POL_COMPUTERS = 'Computers';
- {$EXTERNALSYM REGSTR_KEY_POL_COMPUTERS}
- REGSTR_KEY_POL_USERGROUPS = 'UserGroups';
- {$EXTERNALSYM REGSTR_KEY_POL_USERGROUPS}
- REGSTR_KEY_POL_DEFAULT = '.default';
- {$EXTERNALSYM REGSTR_KEY_POL_DEFAULT}
- REGSTR_KEY_POL_USERGROUPDATA = 'GroupData\UserGroups\Priority';
- {$EXTERNALSYM REGSTR_KEY_POL_USERGROUPDATA}
-
-//
-// Entries for time zone information under LOCAL_MACHINE
-//
-
- REGSTR_PATH_TIMEZONE = 'System\CurrentControlSet\Control\TimeZoneInformation';
- {$EXTERNALSYM REGSTR_PATH_TIMEZONE}
- REGSTR_VAL_TZBIAS = 'Bias';
- {$EXTERNALSYM REGSTR_VAL_TZBIAS}
- REGSTR_VAL_TZDLTBIAS = 'DaylightBias';
- {$EXTERNALSYM REGSTR_VAL_TZDLTBIAS}
- REGSTR_VAL_TZSTDBIAS = 'StandardBias';
- {$EXTERNALSYM REGSTR_VAL_TZSTDBIAS}
- REGSTR_VAL_TZACTBIAS = 'ActiveTimeBias';
- {$EXTERNALSYM REGSTR_VAL_TZACTBIAS}
- REGSTR_VAL_TZDLTFLAG = 'DaylightFlag';
- {$EXTERNALSYM REGSTR_VAL_TZDLTFLAG}
- REGSTR_VAL_TZSTDSTART = 'StandardStart';
- {$EXTERNALSYM REGSTR_VAL_TZSTDSTART}
- REGSTR_VAL_TZDLTSTART = 'DaylightStart';
- {$EXTERNALSYM REGSTR_VAL_TZDLTSTART}
- REGSTR_VAL_TZDLTNAME = 'DaylightName';
- {$EXTERNALSYM REGSTR_VAL_TZDLTNAME}
- REGSTR_VAL_TZSTDNAME = 'StandardName';
- {$EXTERNALSYM REGSTR_VAL_TZSTDNAME}
- REGSTR_VAL_TZNOCHANGESTART = 'NoChangeStart';
- {$EXTERNALSYM REGSTR_VAL_TZNOCHANGESTART}
- REGSTR_VAL_TZNOCHANGEEND = 'NoChangeEnd';
- {$EXTERNALSYM REGSTR_VAL_TZNOCHANGEEND}
- REGSTR_VAL_TZNOAUTOTIME = 'DisableAutoDaylightTimeSet';
- {$EXTERNALSYM REGSTR_VAL_TZNOAUTOTIME}
-
-//
-// Entries for floating point processor existence under LOCAL_MACHINE
-//
-
- REGSTR_PATH_FLOATINGPOINTPROCESSOR = 'HARDWARE\DESCRIPTION\System\FloatingPointProcessor';
- {$EXTERNALSYM REGSTR_PATH_FLOATINGPOINTPROCESSOR}
- REGSTR_PATH_FLOATINGPOINTPROCESSOR0 = 'HARDWARE\DESCRIPTION\System\FloatingPointProcessor\0';
- {$EXTERNALSYM REGSTR_PATH_FLOATINGPOINTPROCESSOR0}
-
-//
-// Entries for computer name under LOCAL_MACHINE
-//
-
- REGSTR_PATH_COMPUTRNAME = 'System\CurrentControlSet\Control\ComputerName\ComputerName';
- {$EXTERNALSYM REGSTR_PATH_COMPUTRNAME}
- REGSTR_VAL_COMPUTRNAME = 'ComputerName';
- {$EXTERNALSYM REGSTR_VAL_COMPUTRNAME}
-
-// Entry so that we force a reboot on shutdown / single instance dos app
-
- REGSTR_PATH_SHUTDOWN = 'System\CurrentControlSet\Control\Shutdown';
- {$EXTERNALSYM REGSTR_PATH_SHUTDOWN}
- REGSTR_VAL_FORCEREBOOT = 'ForceReboot';
- {$EXTERNALSYM REGSTR_VAL_FORCEREBOOT}
- REGSTR_VAL_SETUPPROGRAMRAN = 'SetupProgramRan';
- {$EXTERNALSYM REGSTR_VAL_SETUPPROGRAMRAN}
- REGSTR_VAL_DOES_POLLING = 'PollingSupportNeeded';
- {$EXTERNALSYM REGSTR_VAL_DOES_POLLING}
-
-//
-// Entries for known system DLLs under LOCAL_MACHINE
-//
-// The VAL keys here are the actual DLL names (FOO.DLL)
-//
-
- REGSTR_PATH_KNOWNDLLS = 'System\CurrentControlSet\Control\SessionManager\KnownDLLs';
- {$EXTERNALSYM REGSTR_PATH_KNOWNDLLS}
- REGSTR_PATH_KNOWN16DLLS = 'System\CurrentControlSet\Control\SessionManager\Known16DLLs';
- {$EXTERNALSYM REGSTR_PATH_KNOWN16DLLS}
-
-// Entries here for system dlls we need to version check in case overwritten
-
- REGSTR_PATH_CHECKVERDLLS = 'System\CurrentControlSet\Control\SessionManager\CheckVerDLLs';
- {$EXTERNALSYM REGSTR_PATH_CHECKVERDLLS}
- REGSTR_PATH_WARNVERDLLS = 'System\CurrentControlSet\Control\SessionManager\WarnVerDLLs';
- {$EXTERNALSYM REGSTR_PATH_WARNVERDLLS}
-
-// Entries here for app ini files we (msgsrv32) need to hack
-
- REGSTR_PATH_HACKINIFILE = 'System\CurrentControlSet\Control\SessionManager\HackIniFiles';
- {$EXTERNALSYM REGSTR_PATH_HACKINIFILE}
-
-// Keys here for bad applications we want to warn the user about before running
-
- REGSTR_PATH_CHECKBADAPPS = 'System\CurrentControlSet\Control\SessionManager\CheckBadApps';
- {$EXTERNALSYM REGSTR_PATH_CHECKBADAPPS}
-
-// Keys here for applications we need to patch
-
- REGSTR_PATH_APPPATCH = 'System\CurrentControlSet\Control\SessionManager\AppPatches';
- {$EXTERNALSYM REGSTR_PATH_APPPATCH}
-
- REGSTR_PATH_CHECKBADAPPS400 = 'System\CurrentControlSet\Control\SessionManager\CheckBadApps400';
- {$EXTERNALSYM REGSTR_PATH_CHECKBADAPPS400}
-
- REGSTR_PATH_SHELLSERVICEOBJECT = 'Software\Microsoft\Windows\CurrentVersion\ShellServiceObject';
- {$EXTERNALSYM REGSTR_PATH_SHELLSERVICEOBJECT}
- REGSTR_PATH_SHELLSERVICEOBJECTDELAYED = 'Software\Microsoft\Windows\CurrentVersion\ShellServiceObjectDelayLoad';
- {$EXTERNALSYM REGSTR_PATH_SHELLSERVICEOBJECTDELAYED}
-
-//
-// Entries for known system VxDs under LOCAL_MACHINE
-//
-// The VAL keys here are the full path names of VxDs (c:\app\vapp.vxd)
-// It is suggested that the keynames be the same as the module name of
-// the VxD.
-// This section is used to dyna-load VxDs with
-// CreateFile(\.\vxd_regstr_keyname).
-//
-
- REGSTR_PATH_KNOWNVXDS = 'System\CurrentControlSet\Control\SessionManager\KnownVxDs';
- {$EXTERNALSYM REGSTR_PATH_KNOWNVXDS}
-
-//
-// Entries for values in uninstaller keys under REGSTR_PATH_UNINSTALL \ appname
-//
-
- REGSTR_VAL_UNINSTALLER_DISPLAYNAME = 'DisplayName';
- {$EXTERNALSYM REGSTR_VAL_UNINSTALLER_DISPLAYNAME}
- REGSTR_VAL_UNINSTALLER_COMMANDLINE = 'UninstallString';
- {$EXTERNALSYM REGSTR_VAL_UNINSTALLER_COMMANDLINE}
-
-//
-// Entries for values in uninstaller keys under REGSTR_PATH_REINSTALL \ instanceid
-//
-
- REGSTR_VAL_REINSTALL_DISPLAYNAME = 'DisplayName';
- {$EXTERNALSYM REGSTR_VAL_REINSTALL_DISPLAYNAME}
- REGSTR_VAL_REINSTALL_STRING = 'ReinstallString';
- {$EXTERNALSYM REGSTR_VAL_REINSTALL_STRING}
- REGSTR_VAL_REINSTALL_DEVICEINSTANCEIDS = 'DeviceInstanceIds';
- {$EXTERNALSYM REGSTR_VAL_REINSTALL_DEVICEINSTANCEIDS}
-
-//
-// Entries for known per user settings: Under HKEY_CURRENT_USER
-//
-
- REGSTR_PATH_DESKTOP = REGSTR_PATH_SCREENSAVE;
- {$EXTERNALSYM REGSTR_PATH_DESKTOP}
- REGSTR_PATH_MOUSE = 'Control Panel\Mouse';
- {$EXTERNALSYM REGSTR_PATH_MOUSE}
- REGSTR_PATH_KEYBOARD = 'Control Panel\Keyboard';
- {$EXTERNALSYM REGSTR_PATH_KEYBOARD}
- REGSTR_PATH_COLORS = 'Control Panel\Colors';
- {$EXTERNALSYM REGSTR_PATH_COLORS}
- REGSTR_PATH_SOUND = 'Control Panel\Sound';
- {$EXTERNALSYM REGSTR_PATH_SOUND}
- REGSTR_PATH_METRICS = 'Control Panel\Desktop\WindowMetrics';
- {$EXTERNALSYM REGSTR_PATH_METRICS}
- REGSTR_PATH_ICONS = 'Control Panel\Icons';
- {$EXTERNALSYM REGSTR_PATH_ICONS}
- REGSTR_PATH_CURSORS = 'Control Panel\Cursors';
- {$EXTERNALSYM REGSTR_PATH_CURSORS}
- REGSTR_PATH_CHECKDISK = 'Software\Microsoft\Windows\CurrentVersion\Applets\Check Drive';
- {$EXTERNALSYM REGSTR_PATH_CHECKDISK}
- REGSTR_PATH_CHECKDISKSET = 'Settings';
- {$EXTERNALSYM REGSTR_PATH_CHECKDISKSET}
- REGSTR_PATH_CHECKDISKUDRVS = 'NoUnknownDDErrDrvs';
- {$EXTERNALSYM REGSTR_PATH_CHECKDISKUDRVS}
-
-//
-// Entries under REGSTR_PATH_FAULT
-//
-
- REGSTR_PATH_FAULT = 'Software\Microsoft\Windows\CurrentVersion\Fault';
- {$EXTERNALSYM REGSTR_PATH_FAULT}
- REGSTR_VAL_FAULT_LOGFILE = 'LogFile';
- {$EXTERNALSYM REGSTR_VAL_FAULT_LOGFILE}
-
-//
-// Entries under REGSTR_PATH_AEDEBUG
-//
-
- REGSTR_PATH_AEDEBUG = 'Software\Microsoft\Windows NT\CurrentVersion\AeDebug';
- {$EXTERNALSYM REGSTR_PATH_AEDEBUG}
- REGSTR_VAL_AEDEBUG_DEBUGGER = 'Debugger';
- {$EXTERNALSYM REGSTR_VAL_AEDEBUG_DEBUGGER}
- REGSTR_VAL_AEDEBUG_AUTO = 'Auto';
- {$EXTERNALSYM REGSTR_VAL_AEDEBUG_AUTO}
-
-//
-// Entries under REGSTR_PATH_GRPCONV
-//
-
- REGSTR_PATH_GRPCONV = 'Software\Microsoft\Windows\CurrentVersion\GrpConv';
- {$EXTERNALSYM REGSTR_PATH_GRPCONV}
-
-//
-// Entries under the RegItem key in a shell namespace
-//
-
- REGSTR_VAL_REGITEMDELETEMESSAGE = 'Removal Message';
- {$EXTERNALSYM REGSTR_VAL_REGITEMDELETEMESSAGE}
-
-//
-// Entries for the Drives Tools page
-//
-// NOTE that these items are not recorded for removable drives. These
-// keys record X=DSKTLSYSTEMTIME where X is the drive letter. Since
-// these tools actually work on the disk in the drive, as opposed to
-// the drive itself, it is pointless to record them on a removable media
-// since if a different disk is inserted in the drive, the data is
-// meaningless.
-//
-
- REGSTR_PATH_LASTCHECK = 'Software\Microsoft\Windows\CurrentVersion\Explorer\LastCheck';
- {$EXTERNALSYM REGSTR_PATH_LASTCHECK}
- REGSTR_PATH_LASTOPTIMIZE = 'Software\Microsoft\Windows\CurrentVersion\Explorer\LastOptimize';
- {$EXTERNALSYM REGSTR_PATH_LASTOPTIMIZE}
- REGSTR_PATH_LASTBACKUP = 'Software\Microsoft\Windows\CurrentVersion\Explorer\LastBackup';
- {$EXTERNALSYM REGSTR_PATH_LASTBACKUP}
-
-//
-// The above 3 keys record with the registry value of the drive letter
-// a SYSTEMTIME structure
-//
-
-//
-// Entries under HKEY_LOCAL_MACHINE for Check Drive specific stuff
-//
-
- REGSTR_PATH_CHKLASTCHECK = 'Software\Microsoft\Windows\CurrentVersion\Applets\Check Drive\LastCheck';
- {$EXTERNALSYM REGSTR_PATH_CHKLASTCHECK}
- REGSTR_PATH_CHKLASTSURFAN = 'Software\Microsoft\Windows\CurrentVersion\Applets\Check Drive\LastSurfaceAnalysis';
- {$EXTERNALSYM REGSTR_PATH_CHKLASTSURFAN}
-
-//
-// The above 2 keys record the following binary structure which is
-// a system time structure with the addition of a result code field.
-// Note that the time part of REGSTR_PATH_CHKLASTCHECK is effectively
-// identical to REGSTR_PATH_LASTCHECK under the explorer key
-//
-
-type
- _DSKTLSYSTEMTIME = packed record
- wYear: WORD;
- wMonth: WORD;
- wDayOfWeek: WORD;
- wDay: WORD;
- wHour: WORD;
- wMinute: WORD;
- wSecond: WORD;
- wMilliseconds: WORD;
- wResult: WORD;
- end;
- {$EXTERNALSYM _DSKTLSYSTEMTIME}
- DSKTLSYSTEMTIME = _DSKTLSYSTEMTIME;
- {$EXTERNALSYM DSKTLSYSTEMTIME}
- PDSKTLSYSTEMTIME = ^DSKTLSYSTEMTIME;
- {$EXTERNALSYM PDSKTLSYSTEMTIME}
- LPDSKTLSYSTEMTIME = ^DSKTLSYSTEMTIME;
- {$EXTERNALSYM LPDSKTLSYSTEMTIME}
- TDsktlSystemTime = _DSKTLSYSTEMTIME;
-
-//
-// The following are defines for the wResult field
-//
-
-const
- DTRESULTOK = 0; // Operation was successful, no errors
- {$EXTERNALSYM DTRESULTOK}
- DTRESULTFIX = 1; // Operation was successful, errors were found
- {$EXTERNALSYM DTRESULTFIX}
- // but all were fixed.
- DTRESULTPROB = 2; // Operation was not successful or errors
- {$EXTERNALSYM DTRESULTPROB}
- // were found and some or all were not fixed.
- DTRESULTPART = 3; // Operation was partially completed but was
- {$EXTERNALSYM DTRESULTPART}
- // terminated either by the user or an error.
-
-//
-// Entries for persistent shares
-//
-
- REGSTR_KEY_SHARES = 'Software\Microsoft\Windows\CurrentVersion\Network\LanMan';
- {$EXTERNALSYM REGSTR_KEY_SHARES}
- REGSTR_VAL_SHARES_FLAGS = 'Flags';
- {$EXTERNALSYM REGSTR_VAL_SHARES_FLAGS}
- REGSTR_VAL_SHARES_TYPE = 'Type';
- {$EXTERNALSYM REGSTR_VAL_SHARES_TYPE}
- REGSTR_VAL_SHARES_PATH = 'Path';
- {$EXTERNALSYM REGSTR_VAL_SHARES_PATH}
- REGSTR_VAL_SHARES_REMARK = 'Remark';
- {$EXTERNALSYM REGSTR_VAL_SHARES_REMARK}
- REGSTR_VAL_SHARES_RW_PASS = 'Parm1';
- {$EXTERNALSYM REGSTR_VAL_SHARES_RW_PASS}
- REGSTR_VAL_SHARES_RO_PASS = 'Parm2';
- {$EXTERNALSYM REGSTR_VAL_SHARES_RO_PASS}
-
-//
-// Entries for printer settings under LOCAL_MACHINE
-//
-
- REGSTR_PATH_PRINT = 'System\CurrentControlSet\Control\Print';
- {$EXTERNALSYM REGSTR_PATH_PRINT}
- REGSTR_PATH_PRINTERS = 'System\CurrentControlSet\Control\Print\Printers';
- {$EXTERNALSYM REGSTR_PATH_PRINTERS}
- REGSTR_PATH_PROVIDERS = 'System\CurrentControlSet\Control\Print\Providers';
- {$EXTERNALSYM REGSTR_PATH_PROVIDERS}
- REGSTR_PATH_MONITORS = 'System\CurrentControlSet\Control\Print\Monitors';
- {$EXTERNALSYM REGSTR_PATH_MONITORS}
- REGSTR_PATH_ENVIRONMENTS = 'System\CurrentControlSet\Control\Print\Environments';
- {$EXTERNALSYM REGSTR_PATH_ENVIRONMENTS}
- REGSTR_VAL_START_ON_BOOT = 'StartOnBoot';
- {$EXTERNALSYM REGSTR_VAL_START_ON_BOOT}
- REGSTR_VAL_PRINTERS_MASK = 'PrintersMask';
- {$EXTERNALSYM REGSTR_VAL_PRINTERS_MASK}
- REGSTR_VAL_DOS_SPOOL_MASK = 'DOSSpoolMask';
- {$EXTERNALSYM REGSTR_VAL_DOS_SPOOL_MASK}
- REGSTR_KEY_CURRENT_ENV = '\Windows 4.0';
- {$EXTERNALSYM REGSTR_KEY_CURRENT_ENV}
- REGSTR_KEY_DRIVERS = '\Drivers';
- {$EXTERNALSYM REGSTR_KEY_DRIVERS}
- REGSTR_KEY_PRINT_PROC = '\Print Processors';
- {$EXTERNALSYM REGSTR_KEY_PRINT_PROC}
-
-//
-// Entries for MultiMedia under HKEY_CURRENT_USER
-//
-
- REGSTR_PATH_EVENTLABELS = 'AppEvents\EventLabels';
- {$EXTERNALSYM REGSTR_PATH_EVENTLABELS}
- REGSTR_PATH_SCHEMES = 'AppEvents\Schemes';
- {$EXTERNALSYM REGSTR_PATH_SCHEMES}
- REGSTR_PATH_APPS = REGSTR_PATH_SCHEMES + '\Apps';
- {$EXTERNALSYM REGSTR_PATH_APPS}
- REGSTR_PATH_APPS_DEFAULT = REGSTR_PATH_SCHEMES + '\Apps\.Default';
- {$EXTERNALSYM REGSTR_PATH_APPS_DEFAULT}
- REGSTR_PATH_NAMES = REGSTR_PATH_SCHEMES + '\Names';
- {$EXTERNALSYM REGSTR_PATH_NAMES}
- REGSTR_PATH_MULTIMEDIA = REGSTR_PATH_SETUP + '\Multimedia';
- {$EXTERNALSYM REGSTR_PATH_MULTIMEDIA}
- REGSTR_PATH_MULTIMEDIA_AUDIO = 'Software\Microsoft\Multimedia\Audio';
- {$EXTERNALSYM REGSTR_PATH_MULTIMEDIA_AUDIO}
- REGSTR_PATH_MULTIMEDIA_AUDIO_IMAGES = REGSTR_PATH_MULTIMEDIA_AUDIO + '\Images';
- {$EXTERNALSYM REGSTR_PATH_MULTIMEDIA_AUDIO_IMAGES}
-
-//
-// Entries for MultiMedia under HKEY_LOCAL_MACHINE
-//
-
- REGSTR_PATH_MEDIARESOURCES = REGSTR_PATH_CURRENT_CONTROL_SET + '\MediaResources';
- {$EXTERNALSYM REGSTR_PATH_MEDIARESOURCES}
- REGSTR_PATH_MEDIAPROPERTIES = REGSTR_PATH_CURRENT_CONTROL_SET + '\MediaProperties';
- {$EXTERNALSYM REGSTR_PATH_MEDIAPROPERTIES}
- REGSTR_PATH_PRIVATEPROPERTIES = REGSTR_PATH_MEDIAPROPERTIES + '\PrivateProperties';
- {$EXTERNALSYM REGSTR_PATH_PRIVATEPROPERTIES}
- REGSTR_PATH_PUBLICPROPERTIES = REGSTR_PATH_MEDIAPROPERTIES + '\PublicProperties';
- {$EXTERNALSYM REGSTR_PATH_PUBLICPROPERTIES}
-
-// joysticks
-
- REGSTR_PATH_JOYOEM = REGSTR_PATH_PRIVATEPROPERTIES + '\Joystick\OEM';
- {$EXTERNALSYM REGSTR_PATH_JOYOEM}
- REGSTR_PATH_JOYCONFIG = REGSTR_PATH_MEDIARESOURCES + '\Joystick';
- {$EXTERNALSYM REGSTR_PATH_JOYCONFIG}
- REGSTR_KEY_JOYCURR = 'CurrentJoystickSettings';
- {$EXTERNALSYM REGSTR_KEY_JOYCURR}
- REGSTR_KEY_JOYSETTINGS = 'JoystickSettings';
- {$EXTERNALSYM REGSTR_KEY_JOYSETTINGS}
-
-// joystick values found under REGSTR_PATH_JOYCONFIG
-
- REGSTR_VAL_JOYUSERVALUES = 'JoystickUserValues';
- {$EXTERNALSYM REGSTR_VAL_JOYUSERVALUES}
- REGSTR_VAL_JOYCALLOUT = 'JoystickCallout';
- {$EXTERNALSYM REGSTR_VAL_JOYCALLOUT}
-
-// joystick values found under REGSTR_KEY_JOYCURR and REGSTR_KEY_JOYSETTINGS
-
- REGSTR_VAL_JOYNCONFIG = 'Joystick%dConfiguration';
- {$EXTERNALSYM REGSTR_VAL_JOYNCONFIG}
- REGSTR_VAL_JOYNOEMNAME = 'Joystick%dOEMName';
- {$EXTERNALSYM REGSTR_VAL_JOYNOEMNAME}
- REGSTR_VAL_JOYNOEMCALLOUT = 'Joystick%dOEMCallout';
- {$EXTERNALSYM REGSTR_VAL_JOYNOEMCALLOUT}
-
-// joystick values found under keys under REGSTR_PATH_JOYOEM
-
- REGSTR_VAL_JOYOEMCALLOUT = 'OEMCallout';
- {$EXTERNALSYM REGSTR_VAL_JOYOEMCALLOUT}
- REGSTR_VAL_JOYOEMNAME = 'OEMName';
- {$EXTERNALSYM REGSTR_VAL_JOYOEMNAME}
- REGSTR_VAL_JOYOEMDATA = 'OEMData';
- {$EXTERNALSYM REGSTR_VAL_JOYOEMDATA}
- REGSTR_VAL_JOYOEMXYLABEL = 'OEMXYLabel';
- {$EXTERNALSYM REGSTR_VAL_JOYOEMXYLABEL}
- REGSTR_VAL_JOYOEMZLABEL = 'OEMZLabel';
- {$EXTERNALSYM REGSTR_VAL_JOYOEMZLABEL}
- REGSTR_VAL_JOYOEMRLABEL = 'OEMRLabel';
- {$EXTERNALSYM REGSTR_VAL_JOYOEMRLABEL}
- REGSTR_VAL_JOYOEMPOVLABEL = 'OEMPOVLabel';
- {$EXTERNALSYM REGSTR_VAL_JOYOEMPOVLABEL}
- REGSTR_VAL_JOYOEMULABEL = 'OEMULabel';
- {$EXTERNALSYM REGSTR_VAL_JOYOEMULABEL}
- REGSTR_VAL_JOYOEMVLABEL = 'OEMVLabel';
- {$EXTERNALSYM REGSTR_VAL_JOYOEMVLABEL}
- REGSTR_VAL_JOYOEMTESTMOVEDESC = 'OEMTestMoveDesc';
- {$EXTERNALSYM REGSTR_VAL_JOYOEMTESTMOVEDESC}
- REGSTR_VAL_JOYOEMTESTBUTTONDESC = 'OEMTestButtonDesc';
- {$EXTERNALSYM REGSTR_VAL_JOYOEMTESTBUTTONDESC}
- REGSTR_VAL_JOYOEMTESTMOVECAP = 'OEMTestMoveCap';
- {$EXTERNALSYM REGSTR_VAL_JOYOEMTESTMOVECAP}
- REGSTR_VAL_JOYOEMTESTBUTTONCAP = 'OEMTestButtonCap';
- {$EXTERNALSYM REGSTR_VAL_JOYOEMTESTBUTTONCAP}
- REGSTR_VAL_JOYOEMTESTWINCAP = 'OEMTestWinCap';
- {$EXTERNALSYM REGSTR_VAL_JOYOEMTESTWINCAP}
- REGSTR_VAL_JOYOEMCALCAP = 'OEMCalCap';
- {$EXTERNALSYM REGSTR_VAL_JOYOEMCALCAP}
- REGSTR_VAL_JOYOEMCALWINCAP = 'OEMCalWinCap';
- {$EXTERNALSYM REGSTR_VAL_JOYOEMCALWINCAP}
- REGSTR_VAL_JOYOEMCAL1 = 'OEMCal1';
- {$EXTERNALSYM REGSTR_VAL_JOYOEMCAL1}
- REGSTR_VAL_JOYOEMCAL2 = 'OEMCal2';
- {$EXTERNALSYM REGSTR_VAL_JOYOEMCAL2}
- REGSTR_VAL_JOYOEMCAL3 = 'OEMCal3';
- {$EXTERNALSYM REGSTR_VAL_JOYOEMCAL3}
- REGSTR_VAL_JOYOEMCAL4 = 'OEMCal4';
- {$EXTERNALSYM REGSTR_VAL_JOYOEMCAL4}
- REGSTR_VAL_JOYOEMCAL5 = 'OEMCal5';
- {$EXTERNALSYM REGSTR_VAL_JOYOEMCAL5}
- REGSTR_VAL_JOYOEMCAL6 = 'OEMCal6';
- {$EXTERNALSYM REGSTR_VAL_JOYOEMCAL6}
- REGSTR_VAL_JOYOEMCAL7 = 'OEMCal7';
- {$EXTERNALSYM REGSTR_VAL_JOYOEMCAL7}
- REGSTR_VAL_JOYOEMCAL8 = 'OEMCal8';
- {$EXTERNALSYM REGSTR_VAL_JOYOEMCAL8}
- REGSTR_VAL_JOYOEMCAL9 = 'OEMCal9';
- {$EXTERNALSYM REGSTR_VAL_JOYOEMCAL9}
- REGSTR_VAL_JOYOEMCAL10 = 'OEMCal10';
- {$EXTERNALSYM REGSTR_VAL_JOYOEMCAL10}
- REGSTR_VAL_JOYOEMCAL11 = 'OEMCal11';
- {$EXTERNALSYM REGSTR_VAL_JOYOEMCAL11}
- REGSTR_VAL_JOYOEMCAL12 = 'OEMCal12';
- {$EXTERNALSYM REGSTR_VAL_JOYOEMCAL12}
-
-// Image values under REGSTR_PATH_MULTIMEDIA_AUDIO_IMAGES
-
- REGSTR_VAL_AUDIO_BITMAP = 'bitmap';
- {$EXTERNALSYM REGSTR_VAL_AUDIO_BITMAP}
- REGSTR_VAL_AUDIO_ICON = 'icon';
- {$EXTERNALSYM REGSTR_VAL_AUDIO_ICON}
-
-//
-// Entries for Device Installer under HKEY_CURRENT_USER
-//
-
- REGSTR_PATH_DEVICEINSTALLER = 'Software\Microsoft\Windows\CurrentVersion\Device Installer';
- {$EXTERNALSYM REGSTR_PATH_DEVICEINSTALLER}
-
-// Device Installer values found under REGSTR_PATH_DEVICEINSTALLER
-
- REGSTR_VAL_SEARCHOPTIONS = 'SearchOptions';
- {$EXTERNALSYM REGSTR_VAL_SEARCHOPTIONS}
-
-// BiosInfo defines.
-
- {$IFDEF _KERNEL_PNPI_}
- REGSTR_PATH_BIOSINFO = '\Registry\Machine\System\CurrentControlSet\Control\BiosInfo';
- {$EXTERNALSYM REGSTR_PATH_BIOSINFO}
- {$ELSE}
- REGSTR_PATH_BIOSINFO = 'System\CurrentControlSet\Control\BiosInfo';
- {$EXTERNALSYM REGSTR_PATH_BIOSINFO}
- {$ENDIF _KERNEL_PNPI_}
-
-// Pci Irq Routing registry defines.
-
- {$IFDEF _KERNEL_PNPI_}
- REGSTR_PATH_PCIIR = '\Registry\Machine\System\CurrentControlSet\Control\Pnp\PciIrqRouting';
- {$EXTERNALSYM REGSTR_PATH_PCIIR}
- REGSTR_VAL_OPTIONS = 'Options';
- {$EXTERNALSYM REGSTR_VAL_OPTIONS}
- REGSTR_VAL_STAT = 'Status';
- {$EXTERNALSYM REGSTR_VAL_STAT}
- REGSTR_VAL_TABLE_STAT = 'TableStatus';
- {$EXTERNALSYM REGSTR_VAL_TABLE_STAT}
- REGSTR_VAL_MINIPORT_STAT = 'MiniportStatus';
- {$EXTERNALSYM REGSTR_VAL_MINIPORT_STAT}
- {$ELSE}
- REGSTR_PATH_PCIIR = 'System\CurrentControlSet\Control\Pnp\PciIrqRouting';
- {$EXTERNALSYM REGSTR_PATH_PCIIR}
- REGSTR_VAL_OPTIONS = 'Options';
- {$EXTERNALSYM REGSTR_VAL_OPTIONS}
- REGSTR_VAL_STAT = 'Status';
- {$EXTERNALSYM REGSTR_VAL_STAT}
- REGSTR_VAL_TABLE_STAT = 'TableStatus';
- {$EXTERNALSYM REGSTR_VAL_TABLE_STAT}
- REGSTR_VAL_MINIPORT_STAT = 'MiniportStatus';
- {$EXTERNALSYM REGSTR_VAL_MINIPORT_STAT}
- {$ENDIF _KERNEL_PNPI_}
-
-// Pci Irq Routing Option values.
-
- PIR_OPTION_ENABLED = $00000001;
- {$EXTERNALSYM PIR_OPTION_ENABLED}
- PIR_OPTION_REGISTRY = $00000002;
- {$EXTERNALSYM PIR_OPTION_REGISTRY}
- PIR_OPTION_MSSPEC = $00000004;
- {$EXTERNALSYM PIR_OPTION_MSSPEC}
- PIR_OPTION_REALMODE = $00000008;
- {$EXTERNALSYM PIR_OPTION_REALMODE}
- PIR_OPTION_DEFAULT = $0000000f;
- {$EXTERNALSYM PIR_OPTION_DEFAULT}
-
-// Pci Irq Routing Status values.
-
- PIR_STATUS_ERROR = $00000000;
- {$EXTERNALSYM PIR_STATUS_ERROR}
- PIR_STATUS_ENABLED = $00000001;
- {$EXTERNALSYM PIR_STATUS_ENABLED}
- PIR_STATUS_DISABLED = $00000002;
- {$EXTERNALSYM PIR_STATUS_DISABLED}
- PIR_STATUS_MAX = $00000003;
- {$EXTERNALSYM PIR_STATUS_MAX}
-
- PIR_STATUS_TABLE_REGISTRY = $00000000;
- {$EXTERNALSYM PIR_STATUS_TABLE_REGISTRY}
- PIR_STATUS_TABLE_MSSPEC = $00000001;
- {$EXTERNALSYM PIR_STATUS_TABLE_MSSPEC}
- PIR_STATUS_TABLE_REALMODE = $00000002;
- {$EXTERNALSYM PIR_STATUS_TABLE_REALMODE}
- PIR_STATUS_TABLE_NONE = $00000003;
- {$EXTERNALSYM PIR_STATUS_TABLE_NONE}
- PIR_STATUS_TABLE_ERROR = $00000004;
- {$EXTERNALSYM PIR_STATUS_TABLE_ERROR}
- PIR_STATUS_TABLE_BAD = $00000005;
- {$EXTERNALSYM PIR_STATUS_TABLE_BAD}
- PIR_STATUS_TABLE_SUCCESS = $00000006;
- {$EXTERNALSYM PIR_STATUS_TABLE_SUCCESS}
- PIR_STATUS_TABLE_MAX = $00000007;
- {$EXTERNALSYM PIR_STATUS_TABLE_MAX}
-
- PIR_STATUS_MINIPORT_NORMAL = $00000000;
- {$EXTERNALSYM PIR_STATUS_MINIPORT_NORMAL}
- PIR_STATUS_MINIPORT_COMPATIBLE = $00000001;
- {$EXTERNALSYM PIR_STATUS_MINIPORT_COMPATIBLE}
- PIR_STATUS_MINIPORT_OVERRIDE = $00000002;
- {$EXTERNALSYM PIR_STATUS_MINIPORT_OVERRIDE}
- PIR_STATUS_MINIPORT_NONE = $00000003;
- {$EXTERNALSYM PIR_STATUS_MINIPORT_NONE}
- PIR_STATUS_MINIPORT_ERROR = $00000004;
- {$EXTERNALSYM PIR_STATUS_MINIPORT_ERROR}
- PIR_STATUS_MINIPORT_NOKEY = $00000005;
- {$EXTERNALSYM PIR_STATUS_MINIPORT_NOKEY}
- PIR_STATUS_MINIPORT_SUCCESS = $00000006;
- {$EXTERNALSYM PIR_STATUS_MINIPORT_SUCCESS}
- PIR_STATUS_MINIPORT_INVALID = $00000007;
- {$EXTERNALSYM PIR_STATUS_MINIPORT_INVALID}
- PIR_STATUS_MINIPORT_MAX = $00000008;
- {$EXTERNALSYM PIR_STATUS_MINIPORT_MAX}
-
-//
-// entries for LastKnownGood
-// each value name under this key is SubPath/File (note reversal of '\\' to '/')
-// each value is an indication of post-processing to be done after files have been recovered
-// LASTGOOD_OPERATION bits indicate the primary post-processing operation
-// remaining bits may be used as flags (allocate flags from highest bits first)
-// a value of 0 is the same as the value being omitted, ie, no post processing.
-//
-
- REGSTR_PATH_LASTGOOD = 'System\LastKnownGoodRecovery\LastGood';
- {$EXTERNALSYM REGSTR_PATH_LASTGOOD}
- REGSTR_PATH_LASTGOODTMP = 'System\LastKnownGoodRecovery\LastGood.Tmp';
- {$EXTERNALSYM REGSTR_PATH_LASTGOODTMP}
-
- LASTGOOD_OPERATION = $000000FF; // operation to perform
- {$EXTERNALSYM LASTGOOD_OPERATION}
- LASTGOOD_OPERATION_NOPOSTPROC = $00000000; // no post-processing
- {$EXTERNALSYM LASTGOOD_OPERATION_NOPOSTPROC}
- LASTGOOD_OPERATION_DELETE = $00000001; // Delete file during recovery
- {$EXTERNALSYM LASTGOOD_OPERATION_DELETE}
-
-implementation
-
-end.
+{******************************************************************************}
+{ }
+{ Registry Key Definitions API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: regstr.h, released June 2000. The original Pascal }
+{ code is: RegStr.pas, released December 2000. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwaregstr.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaRegStr;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "regstr.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+{.$DEFINE NEC_98}
+
+uses
+ JwaWinType;
+
+const
+
+// Public registry key names
+
+ REGSTR_KEY_CLASS = 'Class'; // under LOCAL_MACHINE
+ {$EXTERNALSYM REGSTR_KEY_CLASS}
+ REGSTR_KEY_CONFIG = 'Config'; // under LOCAL_MACHINE
+ {$EXTERNALSYM REGSTR_KEY_CONFIG}
+ REGSTR_KEY_ENUM = 'Enum'; // under LOCAL_MACHINE
+ {$EXTERNALSYM REGSTR_KEY_ENUM}
+ REGSTR_KEY_ROOTENUM = 'Root'; // child of ENUM
+ {$EXTERNALSYM REGSTR_KEY_ROOTENUM}
+ REGSTR_KEY_BIOSENUM = 'BIOS'; // child of ENUM
+ {$EXTERNALSYM REGSTR_KEY_BIOSENUM}
+ REGSTR_KEY_ACPIENUM = 'ACPI'; // child of ENUM
+ {$EXTERNALSYM REGSTR_KEY_ACPIENUM}
+ REGSTR_KEY_PCMCIAENUM = 'PCMCIA'; // child of ENUM
+ {$EXTERNALSYM REGSTR_KEY_PCMCIAENUM}
+ REGSTR_KEY_PCIENUM = 'PCI'; // child of ENUM
+ {$EXTERNALSYM REGSTR_KEY_PCIENUM}
+ REGSTR_KEY_VPOWERDENUM = 'VPOWERD'; // child of ENUM
+ {$EXTERNALSYM REGSTR_KEY_VPOWERDENUM}
+ {$IFDEF NEC_98}
+ REGSTR_KEY_ISAENUM = 'C98PnP'; // child of ENUM
+ {$EXTERNALSYM REGSTR_KEY_ISAENUM}
+ REGSTR_KEY_EISAENUM = 'NESA'; // child of ENUM
+ {$EXTERNALSYM REGSTR_KEY_EISAENUM}
+ {$ELSE}
+ REGSTR_KEY_ISAENUM = 'ISAPnP'; // child of ENUM
+ {$EXTERNALSYM REGSTR_KEY_ISAENUM}
+ REGSTR_KEY_EISAENUM = 'EISA'; // child of ENUM
+ {$EXTERNALSYM REGSTR_KEY_EISAENUM}
+ {$ENDIF NEC_98}
+ REGSTR_KEY_LOGCONFIG = 'LogConfig'; // child of enum\<enumerator>\<deviceid>\<instanceid>
+ {$EXTERNALSYM REGSTR_KEY_LOGCONFIG}
+ REGSTR_KEY_SYSTEMBOARD = '*PNP0C01'; // child of enum\root
+ {$EXTERNALSYM REGSTR_KEY_SYSTEMBOARD}
+ REGSTR_KEY_APM = '*PNP0C05'; // child of enum\root
+ {$EXTERNALSYM REGSTR_KEY_APM}
+
+ REGSTR_KEY_INIUPDATE = 'IniUpdate';
+ {$EXTERNALSYM REGSTR_KEY_INIUPDATE}
+ REG_KEY_INSTDEV = 'Installed'; // child of hklm\class\classname (Win98-only)
+ {$EXTERNALSYM REG_KEY_INSTDEV}
+
+ REGSTR_KEY_DOSOPTCDROM = 'CD-ROM';
+ {$EXTERNALSYM REGSTR_KEY_DOSOPTCDROM}
+ REGSTR_KEY_DOSOPTMOUSE = 'MOUSE';
+ {$EXTERNALSYM REGSTR_KEY_DOSOPTMOUSE}
+
+ REGSTR_KEY_KNOWNDOCKINGSTATES = 'Hardware Profiles';
+ {$EXTERNALSYM REGSTR_KEY_KNOWNDOCKINGSTATES}
+ REGSTR_KEY_DEVICEPARAMETERS = 'Device Parameters';
+ {$EXTERNALSYM REGSTR_KEY_DEVICEPARAMETERS}
+
+// Public registry paths
+
+ REGSTR_DEFAULT_INSTANCE = '0000';
+ {$EXTERNALSYM REGSTR_DEFAULT_INSTANCE}
+ REGSTR_PATH_MOTHERBOARD = REGSTR_KEY_SYSTEMBOARD + '\' + REGSTR_DEFAULT_INSTANCE;
+ {$EXTERNALSYM REGSTR_PATH_MOTHERBOARD}
+ REGSTR_PATH_SETUP = 'Software\Microsoft\Windows\CurrentVersion';
+ {$EXTERNALSYM REGSTR_PATH_SETUP}
+ REGSTR_PATH_DRIVERSIGN = 'Software\Microsoft\Driver Signing';
+ {$EXTERNALSYM REGSTR_PATH_DRIVERSIGN}
+ REGSTR_PATH_NONDRIVERSIGN = 'Software\Microsoft\Non-Driver Signing';
+ {$EXTERNALSYM REGSTR_PATH_NONDRIVERSIGN}
+ REGSTR_PATH_DRIVERSIGN_POLICY = 'Software\Policies\Microsoft\Windows NT\Driver Signing';
+ {$EXTERNALSYM REGSTR_PATH_DRIVERSIGN_POLICY}
+ REGSTR_PATH_NONDRIVERSIGN_POLICY = 'Software\Policies\Microsoft\Windows NT\Non-Driver Signing';
+ {$EXTERNALSYM REGSTR_PATH_NONDRIVERSIGN_POLICY}
+ REGSTR_PATH_PIFCONVERT = 'Software\Microsoft\Windows\CurrentVersion\PIFConvert';
+ {$EXTERNALSYM REGSTR_PATH_PIFCONVERT}
+ REGSTR_PATH_MSDOSOPTS = 'Software\Microsoft\Windows\CurrentVersion\MS-DOSOptions';
+ {$EXTERNALSYM REGSTR_PATH_MSDOSOPTS}
+ REGSTR_PATH_NOSUGGMSDOS = 'Software\Microsoft\Windows\CurrentVersion\NoMSDOSWarn';
+ {$EXTERNALSYM REGSTR_PATH_NOSUGGMSDOS}
+ REGSTR_PATH_NEWDOSBOX = 'Software\Microsoft\Windows\CurrentVersion\MS-DOSSpecialConfig';
+ {$EXTERNALSYM REGSTR_PATH_NEWDOSBOX}
+ REGSTR_PATH_RUNONCE = 'Software\Microsoft\Windows\CurrentVersion\RunOnce';
+ {$EXTERNALSYM REGSTR_PATH_RUNONCE}
+ REGSTR_PATH_RUNONCEEX = 'Software\Microsoft\Windows\CurrentVersion\RunOnceEx';
+ {$EXTERNALSYM REGSTR_PATH_RUNONCEEX}
+ REGSTR_PATH_RUN = 'Software\Microsoft\Windows\CurrentVersion\Run';
+ {$EXTERNALSYM REGSTR_PATH_RUN}
+ REGSTR_PATH_RUNSERVICESONCE = 'Software\Microsoft\Windows\CurrentVersion\RunServicesOnce';
+ {$EXTERNALSYM REGSTR_PATH_RUNSERVICESONCE}
+ REGSTR_PATH_RUNSERVICES = 'Software\Microsoft\Windows\CurrentVersion\RunServices';
+ {$EXTERNALSYM REGSTR_PATH_RUNSERVICES}
+ REGSTR_PATH_EXPLORER = 'Software\Microsoft\Windows\CurrentVersion\Explorer';
+ {$EXTERNALSYM REGSTR_PATH_EXPLORER}
+ REGSTR_PATH_DETECT = 'Software\Microsoft\Windows\CurrentVersion\Detect';
+ {$EXTERNALSYM REGSTR_PATH_DETECT}
+ REGSTR_PATH_APPPATHS = 'Software\Microsoft\Windows\CurrentVersion\App Paths';
+ {$EXTERNALSYM REGSTR_PATH_APPPATHS}
+ REGSTR_PATH_UNINSTALL = 'Software\Microsoft\Windows\CurrentVersion\Uninstall';
+ {$EXTERNALSYM REGSTR_PATH_UNINSTALL}
+ REGSTR_PATH_REALMODENET = 'Software\Microsoft\Windows\CurrentVersion\Network\Real Mode Net';
+ {$EXTERNALSYM REGSTR_PATH_REALMODENET}
+ REGSTR_PATH_NETEQUIV = 'Software\Microsoft\Windows\CurrentVersion\Network\Equivalent';
+ {$EXTERNALSYM REGSTR_PATH_NETEQUIV}
+ REGSTR_PATH_CVNETWORK = 'Software\Microsoft\Windows\CurrentVersion\Network';
+ {$EXTERNALSYM REGSTR_PATH_CVNETWORK}
+ REGSTR_PATH_WMI_SECURITY = 'System\CurrentControlSet\Control\Wmi\Security';
+ {$EXTERNALSYM REGSTR_PATH_WMI_SECURITY}
+ REGSTR_PATH_RELIABILITY = 'Software\Microsoft\Windows\CurrentVersion\Reliability';
+ {$EXTERNALSYM REGSTR_PATH_RELIABILITY}
+ REGSTR_PATH_RELIABILITY_POLICY = TEXT('Software\Policies\Microsoft\Windows NT\Reliability');
+ {$EXTERNALSYM REGSTR_PATH_RELIABILITY_POLICY}
+ REGSTR_PATH_RELIABILITY_POLICY_SHUTDOWNREASONUI = TEXT('ShutdownReasonUI');
+ {$EXTERNALSYM REGSTR_PATH_RELIABILITY_POLICY_SHUTDOWNREASONUI}
+ REGSTR_PATH_RELIABILITY_POLICY_SNAPSHOT = TEXT('Snapshot');
+ {$EXTERNALSYM REGSTR_PATH_RELIABILITY_POLICY_SNAPSHOT}
+ REGSTR_PATH_RELIABILITY_POLICY_REPORTSNAPSHOT = TEXT('ReportSnapshot');
+ {$EXTERNALSYM REGSTR_PATH_RELIABILITY_POLICY_REPORTSNAPSHOT}
+ REGSTR_PATH_REINSTALL = 'SOFTWARE\Microsoft\Windows\CurrentVersion\Reinstall';
+ {$EXTERNALSYM REGSTR_PATH_REINSTALL}
+ REGSTR_PATH_NT_CURRENTVERSION = 'Software\Microsoft\Windows NT\CurrentVersion';
+ {$EXTERNALSYM REGSTR_PATH_NT_CURRENTVERSION}
+
+ REGSTR_PATH_VOLUMECACHE = 'Software\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches';
+ {$EXTERNALSYM REGSTR_PATH_VOLUMECACHE}
+ REGSTR_VAL_DISPLAY = 'display';
+ {$EXTERNALSYM REGSTR_VAL_DISPLAY}
+
+ REGSTR_PATH_IDCONFIGDB = 'System\CurrentControlSet\Control\IDConfigDB';
+ {$EXTERNALSYM REGSTR_PATH_IDCONFIGDB}
+ REGSTR_PATH_CRITICALDEVICEDATABASE = 'System\CurrentControlSet\Control\CriticalDeviceDatabase';
+ {$EXTERNALSYM REGSTR_PATH_CRITICALDEVICEDATABASE}
+ REGSTR_PATH_CLASS = 'System\CurrentControlSet\Services\Class';
+ {$EXTERNALSYM REGSTR_PATH_CLASS}
+ REGSTR_PATH_DISPLAYSETTINGS = 'Display\Settings';
+ {$EXTERNALSYM REGSTR_PATH_DISPLAYSETTINGS}
+ REGSTR_PATH_FONTS = 'Display\Fonts';
+ {$EXTERNALSYM REGSTR_PATH_FONTS}
+ REGSTR_PATH_ENUM = 'Enum';
+ {$EXTERNALSYM REGSTR_PATH_ENUM}
+ REGSTR_PATH_ROOT = 'Enum\Root';
+ {$EXTERNALSYM REGSTR_PATH_ROOT}
+
+ REGSTR_PATH_CURRENTCONTROLSET = 'System\CurrentControlSet';
+ {$EXTERNALSYM REGSTR_PATH_CURRENTCONTROLSET}
+ REGSTR_PATH_SYSTEMENUM = 'System\CurrentControlSet\Enum';
+ {$EXTERNALSYM REGSTR_PATH_SYSTEMENUM}
+ REGSTR_PATH_HWPROFILES = 'System\CurrentControlSet\Hardware Profiles';
+ {$EXTERNALSYM REGSTR_PATH_HWPROFILES}
+ REGSTR_PATH_HWPROFILESCURRENT = 'System\CurrentControlSet\Hardware Profiles\Current';
+ {$EXTERNALSYM REGSTR_PATH_HWPROFILESCURRENT}
+ REGSTR_PATH_CLASS_NT = 'System\CurrentControlSet\Control\Class';
+ {$EXTERNALSYM REGSTR_PATH_CLASS_NT}
+ REGSTR_PATH_PER_HW_ID_STORAGE = 'Software\Microsoft\Windows NT\CurrentVersion\PerHwIdStorage';
+ {$EXTERNALSYM REGSTR_PATH_PER_HW_ID_STORAGE}
+
+ REGSTR_PATH_DEVICE_CLASSES = 'System\CurrentControlSet\Control\DeviceClasses';
+ {$EXTERNALSYM REGSTR_PATH_DEVICE_CLASSES}
+
+ REGSTR_PATH_CODEVICEINSTALLERS = 'System\CurrentControlSet\Control\CoDeviceInstallers';
+ {$EXTERNALSYM REGSTR_PATH_CODEVICEINSTALLERS}
+ REGSTR_PATH_BUSINFORMATION = 'System\CurrentControlSet\Control\PnP\BusInformation';
+ {$EXTERNALSYM REGSTR_PATH_BUSINFORMATION}
+
+ REGSTR_PATH_SERVICES = 'System\CurrentControlSet\Services';
+ {$EXTERNALSYM REGSTR_PATH_SERVICES}
+ REGSTR_PATH_VXD = 'System\CurrentControlSet\Services\VxD';
+ {$EXTERNALSYM REGSTR_PATH_VXD}
+ REGSTR_PATH_IOS = 'System\CurrentControlSet\Services\VxD\IOS';
+ {$EXTERNALSYM REGSTR_PATH_IOS}
+ REGSTR_PATH_VMM = 'System\CurrentControlSet\Services\VxD\VMM';
+ {$EXTERNALSYM REGSTR_PATH_VMM}
+ REGSTR_PATH_VPOWERD = 'System\CurrentControlSet\Services\VxD\VPOWERD';
+ {$EXTERNALSYM REGSTR_PATH_VPOWERD}
+ REGSTR_PATH_VNETSUP = 'System\CurrentControlSet\Services\VxD\VNETSUP';
+ {$EXTERNALSYM REGSTR_PATH_VNETSUP}
+ REGSTR_PATH_NWREDIR = 'System\CurrentControlSet\Services\VxD\NWREDIR';
+ {$EXTERNALSYM REGSTR_PATH_NWREDIR}
+ REGSTR_PATH_NCPSERVER = 'System\CurrentControlSet\Services\NcpServer\Parameters';
+ {$EXTERNALSYM REGSTR_PATH_NCPSERVER}
+ REGSTR_PATH_VCOMM = 'System\CurrentControlSet\Services\VxD\VCOMM';
+ {$EXTERNALSYM REGSTR_PATH_VCOMM}
+
+ REGSTR_PATH_IOARB = 'System\CurrentControlSet\Services\Arbitrators\IOArb';
+ {$EXTERNALSYM REGSTR_PATH_IOARB}
+ REGSTR_PATH_ADDRARB = 'System\CurrentControlSet\Services\Arbitrators\AddrArb';
+ {$EXTERNALSYM REGSTR_PATH_ADDRARB}
+ REGSTR_PATH_DMAARB = 'System\CurrentControlSet\Services\Arbitrators\DMAArb';
+ {$EXTERNALSYM REGSTR_PATH_DMAARB}
+ REGSTR_PATH_IRQARB = 'System\CurrentControlSet\Services\Arbitrators\IRQArb';
+ {$EXTERNALSYM REGSTR_PATH_IRQARB}
+
+ REGSTR_PATH_CODEPAGE = 'System\CurrentControlSet\Control\Nls\Codepage';
+ {$EXTERNALSYM REGSTR_PATH_CODEPAGE}
+ REGSTR_PATH_FILESYSTEM = 'System\CurrentControlSet\Control\FileSystem';
+ {$EXTERNALSYM REGSTR_PATH_FILESYSTEM}
+ REGSTR_PATH_FILESYSTEM_NOVOLTRACK = 'System\CurrentControlSet\Control\FileSystem\NoVolTrack';
+ {$EXTERNALSYM REGSTR_PATH_FILESYSTEM_NOVOLTRACK}
+ REGSTR_PATH_CDFS = 'System\CurrentControlSet\Control\FileSystem\CDFS';
+ {$EXTERNALSYM REGSTR_PATH_CDFS}
+ REGSTR_PATH_WINBOOT = 'System\CurrentControlSet\Control\WinBoot';
+ {$EXTERNALSYM REGSTR_PATH_WINBOOT}
+ REGSTR_PATH_INSTALLEDFILES = 'System\CurrentControlSet\Control\InstalledFiles';
+ {$EXTERNALSYM REGSTR_PATH_INSTALLEDFILES}
+ REGSTR_PATH_VMM32FILES = 'System\CurrentControlSet\Control\VMM32Files';
+ {$EXTERNALSYM REGSTR_PATH_VMM32FILES}
+
+//
+// Reasonable Limit for Values Names
+//
+
+ REGSTR_MAX_VALUE_LENGTH = 256;
+ {$EXTERNALSYM REGSTR_MAX_VALUE_LENGTH}
+
+//
+// Values used by user mode Pnp Manager
+//
+
+ REGSTR_KEY_DEVICE_PROPERTIES = 'Properties';
+ {$EXTERNALSYM REGSTR_KEY_DEVICE_PROPERTIES}
+ REGSTR_VAL_SLOTNUMBER = 'SlotNumber';
+ {$EXTERNALSYM REGSTR_VAL_SLOTNUMBER}
+ REGSTR_VAL_ATTACHEDCOMPONENTS = 'AttachedComponents';
+ {$EXTERNALSYM REGSTR_VAL_ATTACHEDCOMPONENTS}
+ REGSTR_VAL_BASEDEVICEPATH = 'BaseDevicePath';
+ {$EXTERNALSYM REGSTR_VAL_BASEDEVICEPATH}
+ REGSTR_VAL_SYSTEMBUSNUMBER = 'SystemBusNumber';
+ {$EXTERNALSYM REGSTR_VAL_SYSTEMBUSNUMBER}
+ REGSTR_VAL_BUSDATATYPE = 'BusDataType';
+ {$EXTERNALSYM REGSTR_VAL_BUSDATATYPE}
+ REGSTR_VAL_INTERFACETYPE = 'InterfaceType';
+ {$EXTERNALSYM REGSTR_VAL_INTERFACETYPE}
+ REGSTR_VAL_SERVICE = 'Service';
+ {$EXTERNALSYM REGSTR_VAL_SERVICE}
+ REGSTR_VAL_DETECTSIGNATURE = 'DetectSignature';
+ {$EXTERNALSYM REGSTR_VAL_DETECTSIGNATURE}
+ REGSTR_VAL_CLASSGUID = 'ClassGUID';
+ {$EXTERNALSYM REGSTR_VAL_CLASSGUID}
+ REGSTR_VAL_INSTANCEIDENTIFIER = 'InstanceIdentifier';
+ {$EXTERNALSYM REGSTR_VAL_INSTANCEIDENTIFIER}
+ REGSTR_VAL_DUPLICATEOF = 'DuplicateOf';
+ {$EXTERNALSYM REGSTR_VAL_DUPLICATEOF}
+ REGSTR_VAL_STATUSFLAGS = 'StatusFlags';
+ {$EXTERNALSYM REGSTR_VAL_STATUSFLAGS}
+ REGSTR_VAL_DISABLECOUNT = 'DisableCount';
+ {$EXTERNALSYM REGSTR_VAL_DISABLECOUNT}
+ REGSTR_VAL_UNKNOWNPROBLEMS = 'UnknownProblem';
+ {$EXTERNALSYM REGSTR_VAL_UNKNOWNPROBLEMS}
+ REGSTR_VAL_DOCKSTATE = 'DockState';
+ {$EXTERNALSYM REGSTR_VAL_DOCKSTATE}
+ REGSTR_VAL_PREFERENCEORDER = 'PreferenceOrder';
+ {$EXTERNALSYM REGSTR_VAL_PREFERENCEORDER}
+ REGSTR_VAL_USERWAITINTERVAL = 'UserWaitInterval';
+ {$EXTERNALSYM REGSTR_VAL_USERWAITINTERVAL}
+ REGSTR_VAL_DEVICE_INSTANCE = 'DeviceInstance';
+ {$EXTERNALSYM REGSTR_VAL_DEVICE_INSTANCE}
+ REGSTR_VAL_SYMBOLIC_LINK = 'SymbolicLink';
+ {$EXTERNALSYM REGSTR_VAL_SYMBOLIC_LINK}
+ REGSTR_VAL_DEFAULT = 'Default';
+ {$EXTERNALSYM REGSTR_VAL_DEFAULT}
+ REGSTR_VAL_LOWERFILTERS = 'LowerFilters';
+ {$EXTERNALSYM REGSTR_VAL_LOWERFILTERS}
+ REGSTR_VAL_UPPERFILTERS = 'UpperFilters';
+ {$EXTERNALSYM REGSTR_VAL_UPPERFILTERS}
+ REGSTR_VAL_LOCATION_INFORMATION = 'LocationInformation';
+ {$EXTERNALSYM REGSTR_VAL_LOCATION_INFORMATION}
+ REGSTR_VAL_UI_NUMBER = 'UINumber';
+ {$EXTERNALSYM REGSTR_VAL_UI_NUMBER}
+ REGSTR_VAL_UI_NUMBER_DESC_FORMAT = 'UINumberDescFormat';
+ {$EXTERNALSYM REGSTR_VAL_UI_NUMBER_DESC_FORMAT}
+ REGSTR_VAL_CAPABILITIES = 'Capabilities';
+ {$EXTERNALSYM REGSTR_VAL_CAPABILITIES}
+ REGSTR_VAL_DEVICE_TYPE = 'DeviceType';
+ {$EXTERNALSYM REGSTR_VAL_DEVICE_TYPE}
+ REGSTR_VAL_DEVICE_CHARACTERISTICS = 'DeviceCharacteristics';
+ {$EXTERNALSYM REGSTR_VAL_DEVICE_CHARACTERISTICS}
+ REGSTR_VAL_DEVICE_SECURITY_DESCRIPTOR = 'Security';
+ {$EXTERNALSYM REGSTR_VAL_DEVICE_SECURITY_DESCRIPTOR}
+ REGSTR_VAL_DEVICE_EXCLUSIVE = 'Exclusive';
+ {$EXTERNALSYM REGSTR_VAL_DEVICE_EXCLUSIVE}
+ REGSTR_VAL_RESOURCE_PICKER_TAGS = 'ResourcePickerTags';
+ {$EXTERNALSYM REGSTR_VAL_RESOURCE_PICKER_TAGS}
+ REGSTR_VAL_RESOURCE_PICKER_EXCEPTIONS = 'ResourcePickerExceptions';
+ {$EXTERNALSYM REGSTR_VAL_RESOURCE_PICKER_EXCEPTIONS}
+ REGSTR_VAL_CUSTOM_PROPERTY_CACHE_DATE = 'CustomPropertyCacheDate';
+ {$EXTERNALSYM REGSTR_VAL_CUSTOM_PROPERTY_CACHE_DATE}
+ REGSTR_VAL_CUSTOM_PROPERTY_HW_ID_KEY = 'CustomPropertyHwIdKey';
+ {$EXTERNALSYM REGSTR_VAL_CUSTOM_PROPERTY_HW_ID_KEY}
+ REGSTR_VAL_LAST_UPDATE_TIME = 'LastUpdateTime';
+ {$EXTERNALSYM REGSTR_VAL_LAST_UPDATE_TIME}
+
+//
+// Values used by kernel mode Pnp Manager
+//
+
+ REGSTR_VALUE_DEVICE_OBJECT_NAME = 'DeviceObjectName';
+ {$EXTERNALSYM REGSTR_VALUE_DEVICE_OBJECT_NAME}
+ REGSTR_VALUE_DEVICE_SYMBOLIC_NAME = 'DeviceSymbolicName';
+ {$EXTERNALSYM REGSTR_VALUE_DEVICE_SYMBOLIC_NAME}
+ REGSTR_VAL_EJECT_PRIORITY = 'EjectPriority';
+
+//
+// Values used by both kernel-mode and user-mode PnP Managers
+//
+
+ REGSTR_KEY_CONTROL = 'Control';
+ {$EXTERNALSYM REGSTR_KEY_CONTROL}
+ REGSTR_VAL_ACTIVESERVICE = 'ActiveService';
+ {$EXTERNALSYM REGSTR_VAL_ACTIVESERVICE}
+ REGSTR_VAL_LINKED = 'Linked';
+ {$EXTERNALSYM REGSTR_VAL_LINKED}
+ REGSTR_VAL_PHYSICALDEVICEOBJECT = 'PhysicalDeviceObject';
+ {$EXTERNALSYM REGSTR_VAL_PHYSICALDEVICEOBJECT}
+ REGSTR_VAL_REMOVAL_POLICY = 'RemovalPolicy';
+ {$EXTERNALSYM REGSTR_VAL_REMOVAL_POLICY}
+
+//
+// Values under REGSTR_PATH_NT_CURRENTVERSION
+//
+
+ REGSTR_VAL_CURRENT_VERSION = 'CurrentVersion';
+ {$EXTERNALSYM REGSTR_VAL_CURRENT_VERSION}
+ REGSTR_VAL_CURRENT_BUILD = 'CurrentBuildNumber';
+ {$EXTERNALSYM REGSTR_VAL_CURRENT_BUILD}
+ REGSTR_VAL_CURRENT_CSDVERSION = 'CSDVersion';
+ {$EXTERNALSYM REGSTR_VAL_CURRENT_CSDVERSION}
+ REGSTR_VAL_CURRENT_TYPE = 'CurrentType';
+ {$EXTERNALSYM REGSTR_VAL_CURRENT_TYPE}
+
+//
+// Values under REGSTR_PATH_DISPLAYSETTINGS
+//
+
+ REGSTR_VAL_BITSPERPIXEL = 'BitsPerPixel';
+ {$EXTERNALSYM REGSTR_VAL_BITSPERPIXEL}
+ REGSTR_VAL_RESOLUTION = 'Resolution';
+ {$EXTERNALSYM REGSTR_VAL_RESOLUTION}
+ REGSTR_VAL_DPILOGICALX = 'DPILogicalX';
+ {$EXTERNALSYM REGSTR_VAL_DPILOGICALX}
+ REGSTR_VAL_DPILOGICALY = 'DPILogicalY';
+ {$EXTERNALSYM REGSTR_VAL_DPILOGICALY}
+ REGSTR_VAL_DPIPHYSICALX = 'DPIPhysicalX';
+ {$EXTERNALSYM REGSTR_VAL_DPIPHYSICALX}
+ REGSTR_VAL_DPIPHYSICALY = 'DPIPhysicalY';
+ {$EXTERNALSYM REGSTR_VAL_DPIPHYSICALY}
+ REGSTR_VAL_REFRESHRATE = 'RefreshRate';
+ {$EXTERNALSYM REGSTR_VAL_REFRESHRATE}
+ REGSTR_VAL_DISPLAYFLAGS = 'DisplayFlags';
+ {$EXTERNALSYM REGSTR_VAL_DISPLAYFLAGS}
+
+// under HKEY_CURRENT_USER
+
+ REGSTR_PATH_CONTROLPANEL = 'Control Panel';
+ {$EXTERNALSYM REGSTR_PATH_CONTROLPANEL}
+
+// under HKEY_LOCAL_MACHINE
+
+ REGSTR_PATH_CONTROLSFOLDER = 'Software\Microsoft\Windows\CurrentVersion\Controls Folder';
+ {$EXTERNALSYM REGSTR_PATH_CONTROLSFOLDER}
+
+//
+// Entries under REGSTR_PATH_CODEPAGE
+//
+
+ REGSTR_VAL_DOSCP = 'OEMCP';
+ {$EXTERNALSYM REGSTR_VAL_DOSCP}
+ REGSTR_VAL_WINCP = 'ACP';
+ {$EXTERNALSYM REGSTR_VAL_WINCP}
+
+ REGSTR_PATH_DYNA_ENUM = 'Config Manager\Enum';
+ {$EXTERNALSYM REGSTR_PATH_DYNA_ENUM}
+
+//
+// Entries under REGSTR_PATH_DYNA_ENUM
+//
+
+ REGSTR_VAL_HARDWARE_KEY = 'HardWareKey';
+ {$EXTERNALSYM REGSTR_VAL_HARDWARE_KEY}
+ REGSTR_VAL_ALLOCATION = 'Allocation';
+ {$EXTERNALSYM REGSTR_VAL_ALLOCATION}
+ REGSTR_VAL_PROBLEM = 'Problem';
+ {$EXTERNALSYM REGSTR_VAL_PROBLEM}
+ REGSTR_VAL_STATUS = 'Status';
+ {$EXTERNALSYM REGSTR_VAL_STATUS}
+
+//
+// Used by address arbitrator
+//
+
+ REGSTR_VAL_DONTUSEMEM = 'DontAllocLastMem';
+ {$EXTERNALSYM REGSTR_VAL_DONTUSEMEM}
+
+//
+// Entries under REGSTR_PATH_SETUP
+//
+
+ REGSTR_VAL_SYSTEMROOT = 'SystemRoot';
+ {$EXTERNALSYM REGSTR_VAL_SYSTEMROOT}
+ REGSTR_VAL_BOOTCOUNT = 'BootCount';
+ {$EXTERNALSYM REGSTR_VAL_BOOTCOUNT}
+ REGSTR_VAL_REALNETSTART = 'RealNetStart';
+ {$EXTERNALSYM REGSTR_VAL_REALNETSTART}
+ REGSTR_VAL_MEDIA = 'MediaPath';
+ {$EXTERNALSYM REGSTR_VAL_MEDIA}
+ REGSTR_VAL_CONFIG = 'ConfigPath';
+ {$EXTERNALSYM REGSTR_VAL_CONFIG}
+ REGSTR_VAL_DEVICEPATH = 'DevicePath'; // default search path for .INFs
+ {$EXTERNALSYM REGSTR_VAL_DEVICEPATH}
+ REGSTR_VAL_SRCPATH = 'SourcePath'; // last source files path during setup.
+ {$EXTERNALSYM REGSTR_VAL_SRCPATH}
+ REGSTR_VAL_SVCPAKSRCPATH = 'ServicePackSourcePath'; // last service pack source path
+ {$EXTERNALSYM REGSTR_VAL_SVCPAKSRCPATH}
+ REGSTR_VAL_DRIVERCACHEPATH = 'DriverCachePath'; // location of driver cache
+ {$EXTERNALSYM REGSTR_VAL_DRIVERCACHEPATH}
+
+ REGSTR_VAL_OLDWINDIR = 'OldWinDir'; // old windows location
+ {$EXTERNALSYM REGSTR_VAL_OLDWINDIR}
+ REGSTR_VAL_SETUPFLAGS = 'SetupFlags'; // flags that setup passes on after install.
+ {$EXTERNALSYM REGSTR_VAL_SETUPFLAGS}
+ REGSTR_VAL_REGOWNER = 'RegisteredOwner';
+ {$EXTERNALSYM REGSTR_VAL_REGOWNER}
+ REGSTR_VAL_REGORGANIZATION = 'RegisteredOrganization';
+ {$EXTERNALSYM REGSTR_VAL_REGORGANIZATION}
+ REGSTR_VAL_LICENSINGINFO = 'LicensingInfo';
+ {$EXTERNALSYM REGSTR_VAL_LICENSINGINFO}
+ REGSTR_VAL_OLDMSDOSVER = 'OldMSDOSVer'; // will be DOS ver < 7 (when Setup run)
+ {$EXTERNALSYM REGSTR_VAL_OLDMSDOSVER}
+ REGSTR_VAL_FIRSTINSTALLDATETIME = 'FirstInstallDateTime'; // will Win 95 install date-time
+ {$EXTERNALSYM REGSTR_VAL_FIRSTINSTALLDATETIME}
+
+ REGSTR_VAL_INSTALLTYPE = 'InstallType';
+ {$EXTERNALSYM REGSTR_VAL_INSTALLTYPE}
+
+ // Values for InstallType
+
+ IT_COMPACT = $0000;
+ {$EXTERNALSYM IT_COMPACT}
+ IT_TYPICAL = $0001;
+ {$EXTERNALSYM IT_TYPICAL}
+ IT_PORTABLE = $0002;
+ {$EXTERNALSYM IT_PORTABLE}
+ IT_CUSTOM = $0003;
+ {$EXTERNALSYM IT_CUSTOM}
+
+ REGSTR_VAL_WRAPPER = 'Wrapper';
+ {$EXTERNALSYM REGSTR_VAL_WRAPPER}
+
+ REGSTR_VAL_LASTALIVEINTERVAL = 'TimeStampInterval';
+ {$EXTERNALSYM REGSTR_VAL_LASTALIVEINTERVAL}
+ REGSTR_VAL_LASTALIVESTAMP = 'LastAliveStamp';
+ {$EXTERNALSYM REGSTR_VAL_LASTALIVESTAMP}
+ REGSTR_VAL_LASTALIVEUPTIME = TEXT('LastAliveUptime');
+ {$EXTERNALSYM REGSTR_VAL_LASTALIVEUPTIME}
+ REGSTR_VAL_SHUTDOWNREASON = 'ShutdownReason';
+ {$EXTERNALSYM REGSTR_VAL_SHUTDOWNREASON}
+ REGSTR_VAL_SHUTDOWNREASON_CODE = 'ShutdownReasonCode';
+ {$EXTERNALSYM REGSTR_VAL_SHUTDOWNREASON_CODE}
+ REGSTR_VAL_SHUTDOWNREASON_COMMENT = 'ShutdownReasonComment';
+ {$EXTERNALSYM REGSTR_VAL_SHUTDOWNREASON_COMMENT}
+ REGSTR_VAL_SHUTDOWNREASON_PROCESS = 'ShutdownReasonProcess';
+ {$EXTERNALSYM REGSTR_VAL_SHUTDOWNREASON_PROCESS}
+ REGSTR_VAL_SHUTDOWNREASON_USERNAME = 'ShutdownReasonUserName';
+ {$EXTERNALSYM REGSTR_VAL_SHUTDOWNREASON_USERNAME}
+ REGSTR_VAL_SHOWREASONUI = 'ShutdownReasonUI';
+ {$EXTERNALSYM REGSTR_VAL_SHOWREASONUI}
+ REGSTR_VAL_SHUTDOWN_IGNORE_PREDEFINED = 'ShutdownIgnorePredefinedReasons';
+ {$EXTERNALSYM REGSTR_VAL_SHUTDOWN_IGNORE_PREDEFINED}
+ REGSTR_VAL_SHUTDOWN_STATE_SNAPSHOT = 'ShutdownStateSnapshot';
+ {$EXTERNALSYM REGSTR_VAL_SHUTDOWN_STATE_SNAPSHOT}
+
+ REGSTR_KEY_SETUP = '\Setup';
+ {$EXTERNALSYM REGSTR_KEY_SETUP}
+ REGSTR_VAL_BOOTDIR = 'BootDir';
+ {$EXTERNALSYM REGSTR_VAL_BOOTDIR}
+ REGSTR_VAL_WINBOOTDIR = 'WinbootDir';
+ {$EXTERNALSYM REGSTR_VAL_WINBOOTDIR}
+ REGSTR_VAL_WINDIR = 'WinDir';
+ {$EXTERNALSYM REGSTR_VAL_WINDIR}
+
+ REGSTR_VAL_APPINSTPATH = 'AppInstallPath'; // Used by install wizard
+ {$EXTERNALSYM REGSTR_VAL_APPINSTPATH}
+
+// Values for international startup disk
+
+ REGSTR_PATH_EBD = REGSTR_PATH_SETUP + REGSTR_KEY_SETUP + '\EBD';
+ {$EXTERNALSYM REGSTR_PATH_EBD}
+
+// Keys under REGSTR_KEY_EBD
+
+ REGSTR_KEY_EBDFILESLOCAL = 'EBDFilesLocale';
+ {$EXTERNALSYM REGSTR_KEY_EBDFILESLOCAL}
+ REGSTR_KEY_EBDFILESKEYBOARD = 'EBDFilesKeyboard';
+ {$EXTERNALSYM REGSTR_KEY_EBDFILESKEYBOARD}
+ REGSTR_KEY_EBDAUTOEXECBATLOCAL = 'EBDAutoexecBatLocale';
+ {$EXTERNALSYM REGSTR_KEY_EBDAUTOEXECBATLOCAL}
+ REGSTR_KEY_EBDAUTOEXECBATKEYBOARD = 'EBDAutoexecBatKeyboard';
+ {$EXTERNALSYM REGSTR_KEY_EBDAUTOEXECBATKEYBOARD}
+ REGSTR_KEY_EBDCONFIGSYSLOCAL = 'EBDConfigSysLocale';
+ {$EXTERNALSYM REGSTR_KEY_EBDCONFIGSYSLOCAL}
+ REGSTR_KEY_EBDCONFIGSYSKEYBOARD = 'EBDConfigSysKeyboard';
+ {$EXTERNALSYM REGSTR_KEY_EBDCONFIGSYSKEYBOARD}
+
+// Values under REGSTR_PATH_DRIVERSIGN and REGSTR_PATH_NONDRIVERSIGN
+
+ REGSTR_VAL_POLICY = 'Policy';
+ {$EXTERNALSYM REGSTR_VAL_POLICY}
+
+// Values under REGSTR_PATH_DRIVERSIGN_POLICY and REGSTR_PATH_NONDRIVERSIGN_POLICY
+
+ REGSTR_VAL_BEHAVIOR_ON_FAILED_VERIFY = 'BehaviorOnFailedVerify';
+ {$EXTERNALSYM REGSTR_VAL_BEHAVIOR_ON_FAILED_VERIFY}
+
+// Types of driver signing policies (apply to both preference and policy values
+// defined above)
+
+ DRIVERSIGN_NONE = $00000000;
+ {$EXTERNALSYM DRIVERSIGN_NONE}
+ DRIVERSIGN_WARNING = $00000001;
+ {$EXTERNALSYM DRIVERSIGN_WARNING}
+ DRIVERSIGN_BLOCKING = $00000002;
+ {$EXTERNALSYM DRIVERSIGN_BLOCKING}
+
+//
+// Entries under REGSTR_PATH_PIFCONVERT
+//
+
+ REGSTR_VAL_MSDOSMODE = 'MSDOSMode';
+ {$EXTERNALSYM REGSTR_VAL_MSDOSMODE}
+ REGSTR_VAL_MSDOSMODEDISCARD = 'Discard';
+ {$EXTERNALSYM REGSTR_VAL_MSDOSMODEDISCARD}
+
+//
+// Entries under REGSTR_PATH_MSDOSOPTS (global settings)
+//
+
+ REGSTR_VAL_DOSOPTGLOBALFLAGS = 'GlobalFlags';
+ {$EXTERNALSYM REGSTR_VAL_DOSOPTGLOBALFLAGS}
+
+// Flags for GlobalFlags
+
+ DOSOPTGF_DEFCLEAN = $00000001; // Default action is clean config
+ {$EXTERNALSYM DOSOPTGF_DEFCLEAN}
+
+//
+// Entries under REGSTR_PATH_MSDOSOPTS \ OptionSubkey
+//
+
+ REGSTR_VAL_DOSOPTFLAGS = 'Flags';
+ {$EXTERNALSYM REGSTR_VAL_DOSOPTFLAGS}
+ REGSTR_VAL_OPTORDER = 'Order';
+ {$EXTERNALSYM REGSTR_VAL_OPTORDER}
+ REGSTR_VAL_CONFIGSYS = 'Config.Sys';
+ {$EXTERNALSYM REGSTR_VAL_CONFIGSYS}
+ REGSTR_VAL_AUTOEXEC = 'Autoexec.Bat';
+ {$EXTERNALSYM REGSTR_VAL_AUTOEXEC}
+ REGSTR_VAL_STDDOSOPTION = 'StdOption';
+ {$EXTERNALSYM REGSTR_VAL_STDDOSOPTION}
+ REGSTR_VAL_DOSOPTTIP = 'TipText';
+ {$EXTERNALSYM REGSTR_VAL_DOSOPTTIP}
+
+// Flags for DOSOPTFLAGS
+
+ DOSOPTF_DEFAULT = $00000001; // Default enabled for clean config
+ {$EXTERNALSYM DOSOPTF_DEFAULT}
+ DOSOPTF_SUPPORTED = $00000002; // Option actually supported
+ {$EXTERNALSYM DOSOPTF_SUPPORTED}
+ DOSOPTF_ALWAYSUSE = $00000004; // Always use this option
+ {$EXTERNALSYM DOSOPTF_ALWAYSUSE}
+ DOSOPTF_USESPMODE = $00000008; // Option puts machine in Prot Mode
+ {$EXTERNALSYM DOSOPTF_USESPMODE}
+ DOSOPTF_PROVIDESUMB = $00000010; // Can load drivers high
+ {$EXTERNALSYM DOSOPTF_PROVIDESUMB}
+ DOSOPTF_NEEDSETUP = $00000020; // Need to configure option
+ {$EXTERNALSYM DOSOPTF_NEEDSETUP}
+ DOSOPTF_INDOSSTART = $00000040; // Suppored by DOSSTART.BAT
+ {$EXTERNALSYM DOSOPTF_INDOSSTART}
+ DOSOPTF_MULTIPLE = $00000080; // Load multiple configuration lines
+ {$EXTERNALSYM DOSOPTF_MULTIPLE}
+
+//
+// Flags returned by SUGetSetSetupFlags and in the registry
+//
+
+ SUF_FIRSTTIME = $00000001; // First boot into Win95.
+ {$EXTERNALSYM SUF_FIRSTTIME}
+ SUF_EXPRESS = $00000002; // User Setup via express mode (vs customize).
+ {$EXTERNALSYM SUF_EXPRESS}
+ SUF_BATCHINF = $00000004; // Setup using batch file (MSBATCH.INF).
+ {$EXTERNALSYM SUF_BATCHINF}
+ SUF_CLEAN = $00000008; // Setup was done to a clean directory.
+ {$EXTERNALSYM SUF_CLEAN}
+ SUF_INSETUP = $00000010; // You're in Setup.
+ {$EXTERNALSYM SUF_INSETUP}
+ SUF_NETSETUP = $00000020; // Doing a net (workstation) setup.
+ {$EXTERNALSYM SUF_NETSETUP}
+ SUF_NETHDBOOT = $00000040; // Workstation boots from local harddrive
+ {$EXTERNALSYM SUF_NETHDBOOT}
+ SUF_NETRPLBOOT = $00000080; // Workstation boots via RPL (vs floppy)
+ {$EXTERNALSYM SUF_NETRPLBOOT}
+ SUF_SBSCOPYOK = $00000100; // Can copy to LDID_SHARED (SBS)
+ {$EXTERNALSYM SUF_SBSCOPYOK}
+
+//
+// Entries under REGSTR_PATH_VMM
+//
+
+ REGSTR_VAL_DOSPAGER = 'DOSPager';
+ {$EXTERNALSYM REGSTR_VAL_DOSPAGER}
+ REGSTR_VAL_VXDGROUPS = 'VXDGroups';
+ {$EXTERNALSYM REGSTR_VAL_VXDGROUPS}
+
+//
+// Entries under REGSTR_PATH_VPOWERD
+//
+
+ REGSTR_VAL_VPOWERDFLAGS = 'Flags';
+ {$EXTERNALSYM REGSTR_VAL_VPOWERDFLAGS}
+ VPDF_DISABLEPWRMGMT = $00000001; // Don't load device
+ {$EXTERNALSYM VPDF_DISABLEPWRMGMT}
+ VPDF_FORCEAPM10MODE = $00000002; // Always go into 1.0 mode
+ {$EXTERNALSYM VPDF_FORCEAPM10MODE}
+ VPDF_SKIPINTELSLCHECK = $00000004; // Don't detect Intel SL chipset
+ {$EXTERNALSYM VPDF_SKIPINTELSLCHECK}
+ VPDF_DISABLEPWRSTATUSPOLL = $00000008; // Don't poll power status
+ {$EXTERNALSYM VPDF_DISABLEPWRSTATUSPOLL}
+ VPDF_DISABLERINGRESUME = $00000010; // Don't let the modem wake the machine (APM 1.2 only)
+ {$EXTERNALSYM VPDF_DISABLERINGRESUME}
+ VPDF_SHOWMULTIBATT = $00000020; // Show all batteries checkbox in power control panel
+ {$EXTERNALSYM VPDF_SHOWMULTIBATT}
+
+//
+// Entries under REGSTR_PATH_BUSINFORMATION
+//
+
+ BIF_SHOWSIMILARDRIVERS = $00000001; // Show similar drivers instead of all class drivers in UI.
+ {$EXTERNALSYM BIF_SHOWSIMILARDRIVERS}
+ BIF_RAWDEVICENEEDSDRIVER = $00000002; // RAW device needs a driver installed.
+ {$EXTERNALSYM BIF_RAWDEVICENEEDSDRIVER}
+
+//
+// Entries under REGSTR_PATH_VNETSUP
+//
+
+ REGSTR_VAL_WORKGROUP = 'Workgroup';
+ {$EXTERNALSYM REGSTR_VAL_WORKGROUP}
+ REGSTR_VAL_DIRECTHOST = 'DirectHost';
+ {$EXTERNALSYM REGSTR_VAL_DIRECTHOST}
+ REGSTR_VAL_FILESHARING = 'FileSharing';
+ {$EXTERNALSYM REGSTR_VAL_FILESHARING}
+ REGSTR_VAL_PRINTSHARING = 'PrintSharing';
+ {$EXTERNALSYM REGSTR_VAL_PRINTSHARING}
+
+//
+// Entries under REGSTR_PATH_NWREDIR
+//
+
+ REGSTR_VAL_FIRSTNETDRIVE = 'FirstNetworkDrive';
+ {$EXTERNALSYM REGSTR_VAL_FIRSTNETDRIVE}
+ REGSTR_VAL_MAXCONNECTIONS = 'MaxConnections';
+ {$EXTERNALSYM REGSTR_VAL_MAXCONNECTIONS}
+ REGSTR_VAL_APISUPPORT = 'APISupport';
+ {$EXTERNALSYM REGSTR_VAL_APISUPPORT}
+ REGSTR_VAL_MAXRETRY = 'MaxRetry';
+ {$EXTERNALSYM REGSTR_VAL_MAXRETRY}
+ REGSTR_VAL_MINRETRY = 'MinRetry';
+ {$EXTERNALSYM REGSTR_VAL_MINRETRY}
+ REGSTR_VAL_SUPPORTLFN = 'SupportLFN';
+ {$EXTERNALSYM REGSTR_VAL_SUPPORTLFN}
+ REGSTR_VAL_SUPPORTBURST = 'SupportBurst';
+ {$EXTERNALSYM REGSTR_VAL_SUPPORTBURST}
+ REGSTR_VAL_SUPPORTTUNNELLING = 'SupportTunnelling';
+ {$EXTERNALSYM REGSTR_VAL_SUPPORTTUNNELLING}
+ REGSTR_VAL_FULLTRACE = 'FullTrace';
+ {$EXTERNALSYM REGSTR_VAL_FULLTRACE}
+ REGSTR_VAL_READCACHING = 'ReadCaching';
+ {$EXTERNALSYM REGSTR_VAL_READCACHING}
+ REGSTR_VAL_SHOWDOTS = 'ShowDots';
+ {$EXTERNALSYM REGSTR_VAL_SHOWDOTS}
+ REGSTR_VAL_GAPTIME = 'GapTime';
+ {$EXTERNALSYM REGSTR_VAL_GAPTIME}
+ REGSTR_VAL_SEARCHMODE = 'SearchMode';
+ {$EXTERNALSYM REGSTR_VAL_SEARCHMODE}
+ REGSTR_VAL_SHELLVERSION = 'ShellVersion';
+ {$EXTERNALSYM REGSTR_VAL_SHELLVERSION}
+ REGSTR_VAL_MAXLIP = 'MaxLIP';
+ {$EXTERNALSYM REGSTR_VAL_MAXLIP}
+ REGSTR_VAL_PRESERVECASE = 'PreserveCase';
+ {$EXTERNALSYM REGSTR_VAL_PRESERVECASE}
+ REGSTR_VAL_OPTIMIZESFN = 'OptimizeSFN';
+ {$EXTERNALSYM REGSTR_VAL_OPTIMIZESFN}
+
+//
+// Entries under REGSTR_PATH_NCPSERVER
+//
+
+ REGSTR_VAL_NCP_BROWSEMASTER = 'BrowseMaster';
+ {$EXTERNALSYM REGSTR_VAL_NCP_BROWSEMASTER}
+ REGSTR_VAL_NCP_USEPEERBROWSING = 'Use_PeerBrowsing';
+ {$EXTERNALSYM REGSTR_VAL_NCP_USEPEERBROWSING}
+ REGSTR_VAL_NCP_USESAP = 'Use_Sap';
+ {$EXTERNALSYM REGSTR_VAL_NCP_USESAP}
+
+//
+// Entries under REGSTR_PATH_VCOMM
+//
+
+ REGSTR_VAL_PCCARD_POWER = 'EnablePowerManagement';
+ {$EXTERNALSYM REGSTR_VAL_PCCARD_POWER}
+
+//
+// Entries under REGSTR_PATH_FILESYSTEM
+//
+
+ REGSTR_VAL_WIN31FILESYSTEM = 'Win31FileSystem';
+ {$EXTERNALSYM REGSTR_VAL_WIN31FILESYSTEM}
+ REGSTR_VAL_PRESERVELONGNAMES = 'PreserveLongNames';
+ {$EXTERNALSYM REGSTR_VAL_PRESERVELONGNAMES}
+ REGSTR_VAL_DRIVEWRITEBEHIND = 'DriveWriteBehind';
+ {$EXTERNALSYM REGSTR_VAL_DRIVEWRITEBEHIND}
+ REGSTR_VAL_ASYNCFILECOMMIT = 'AsyncFileCommit';
+ {$EXTERNALSYM REGSTR_VAL_ASYNCFILECOMMIT}
+ REGSTR_VAL_PATHCACHECOUNT = 'PathCache';
+ {$EXTERNALSYM REGSTR_VAL_PATHCACHECOUNT}
+ REGSTR_VAL_NAMECACHECOUNT = 'NameCache';
+ {$EXTERNALSYM REGSTR_VAL_NAMECACHECOUNT}
+ REGSTR_VAL_CONTIGFILEALLOC = 'ContigFileAllocSize';
+ {$EXTERNALSYM REGSTR_VAL_CONTIGFILEALLOC}
+ REGSTR_VAL_FREESPACERATIO = 'FreeSpaceRatio';
+ {$EXTERNALSYM REGSTR_VAL_FREESPACERATIO}
+ REGSTR_VAL_VOLIDLETIMEOUT = 'VolumeIdleTimeout';
+ {$EXTERNALSYM REGSTR_VAL_VOLIDLETIMEOUT}
+ REGSTR_VAL_BUFFIDLETIMEOUT = 'BufferIdleTimeout';
+ {$EXTERNALSYM REGSTR_VAL_BUFFIDLETIMEOUT}
+ REGSTR_VAL_BUFFAGETIMEOUT = 'BufferAgeTimeout';
+ {$EXTERNALSYM REGSTR_VAL_BUFFAGETIMEOUT}
+ REGSTR_VAL_NAMENUMERICTAIL = 'NameNumericTail';
+ {$EXTERNALSYM REGSTR_VAL_NAMENUMERICTAIL}
+ REGSTR_VAL_READAHEADTHRESHOLD = 'ReadAheadThreshold';
+ {$EXTERNALSYM REGSTR_VAL_READAHEADTHRESHOLD}
+ REGSTR_VAL_DOUBLEBUFFER = 'DoubleBuffer';
+ {$EXTERNALSYM REGSTR_VAL_DOUBLEBUFFER}
+ REGSTR_VAL_SOFTCOMPATMODE = 'SoftCompatMode';
+ {$EXTERNALSYM REGSTR_VAL_SOFTCOMPATMODE}
+ REGSTR_VAL_DRIVESPINDOWN = 'DriveSpinDown';
+ {$EXTERNALSYM REGSTR_VAL_DRIVESPINDOWN}
+ REGSTR_VAL_FORCEPMIO = 'ForcePMIO';
+ {$EXTERNALSYM REGSTR_VAL_FORCEPMIO}
+ REGSTR_VAL_FORCERMIO = 'ForceRMIO';
+ {$EXTERNALSYM REGSTR_VAL_FORCERMIO}
+ REGSTR_VAL_LASTBOOTPMDRVS = 'LastBootPMDrvs';
+ {$EXTERNALSYM REGSTR_VAL_LASTBOOTPMDRVS}
+ REGSTR_VAL_ACSPINDOWNPREVIOUS = 'ACSpinDownPrevious';
+ {$EXTERNALSYM REGSTR_VAL_ACSPINDOWNPREVIOUS}
+ REGSTR_VAL_BATSPINDOWNPREVIOUS = 'BatSpinDownPrevious';
+ {$EXTERNALSYM REGSTR_VAL_BATSPINDOWNPREVIOUS}
+ REGSTR_VAL_VIRTUALHDIRQ = 'VirtualHDIRQ';
+ {$EXTERNALSYM REGSTR_VAL_VIRTUALHDIRQ}
+ REGSTR_VAL_SRVNAMECACHECOUNT = 'ServerNameCacheMax';
+ {$EXTERNALSYM REGSTR_VAL_SRVNAMECACHECOUNT}
+ REGSTR_VAL_SRVNAMECACHE = 'ServerNameCache';
+ {$EXTERNALSYM REGSTR_VAL_SRVNAMECACHE}
+ REGSTR_VAL_SRVNAMECACHENETPROV = 'ServerNameCacheNumNets';
+ {$EXTERNALSYM REGSTR_VAL_SRVNAMECACHENETPROV}
+ REGSTR_VAL_AUTOMOUNT = 'AutoMountDrives';
+ {$EXTERNALSYM REGSTR_VAL_AUTOMOUNT}
+ REGSTR_VAL_COMPRESSIONMETHOD = 'CompressionAlgorithm';
+ {$EXTERNALSYM REGSTR_VAL_COMPRESSIONMETHOD}
+ REGSTR_VAL_COMPRESSIONTHRESHOLD = 'CompressionThreshold';
+ {$EXTERNALSYM REGSTR_VAL_COMPRESSIONTHRESHOLD}
+ REGSTR_VAL_ACDRIVESPINDOWN = 'ACDriveSpinDown';
+ {$EXTERNALSYM REGSTR_VAL_ACDRIVESPINDOWN}
+ REGSTR_VAL_BATDRIVESPINDOWN = 'BatDriveSpinDown';
+ {$EXTERNALSYM REGSTR_VAL_BATDRIVESPINDOWN}
+
+//
+// Entries under REGSTR_PATH_FILESYSTEM_NOVOLTRACK
+//
+// A sub-key under which a variable number of variable length structures are stored.
+//
+// Each structure contains an offset followed by a number of pattern bytes.
+// The pattern in each structure is compared at the specified offset within
+// the boot record at the time a volume is mounted. If any pattern in this
+// set of patterns matches a pattern already in the boot record, VFAT will not
+// write a volume tracking serial number in the OEM_SerialNum field of the
+// boot record on the volume being mounted.
+//
+
+//
+// Entries under REGSTR_PATH_CDFS
+//
+
+ REGSTR_VAL_CDCACHESIZE = 'CacheSize'; // Number of 2K cache sectors
+ {$EXTERNALSYM REGSTR_VAL_CDCACHESIZE}
+ REGSTR_VAL_CDPREFETCH = 'Prefetch'; // Number of 2K cache sectors for prefetching
+ {$EXTERNALSYM REGSTR_VAL_CDPREFETCH}
+ REGSTR_VAL_CDPREFETCHTAIL = 'PrefetchTail'; // Number of LRU1 prefetch sectors
+ {$EXTERNALSYM REGSTR_VAL_CDPREFETCHTAIL}
+ REGSTR_VAL_CDRAWCACHE = 'RawCache'; // Number of 2352-byte cache sectors
+ {$EXTERNALSYM REGSTR_VAL_CDRAWCACHE}
+ REGSTR_VAL_CDEXTERRORS = 'ExtendedErrors'; // Return extended error codes
+ {$EXTERNALSYM REGSTR_VAL_CDEXTERRORS}
+ REGSTR_VAL_CDSVDSENSE = 'SVDSense'; // 0=PVD, 1=Kanji, 2=Unicode
+ {$EXTERNALSYM REGSTR_VAL_CDSVDSENSE}
+ REGSTR_VAL_CDSHOWVERSIONS = 'ShowVersions'; // Show file version numbers
+ {$EXTERNALSYM REGSTR_VAL_CDSHOWVERSIONS}
+ REGSTR_VAL_CDCOMPATNAMES = 'MSCDEXCompatNames'; // Disable Numeric Tails on long file names
+ {$EXTERNALSYM REGSTR_VAL_CDCOMPATNAMES}
+ REGSTR_VAL_CDNOREADAHEAD = 'NoReadAhead'; // Disable Read Ahead if set to 1
+ {$EXTERNALSYM REGSTR_VAL_CDNOREADAHEAD}
+
+//
+// define values for IOS devices
+//
+
+ REGSTR_VAL_SCSI = 'SCSI\';
+ {$EXTERNALSYM REGSTR_VAL_SCSI}
+ REGSTR_VAL_ESDI = 'ESDI\';
+ {$EXTERNALSYM REGSTR_VAL_ESDI}
+ REGSTR_VAL_FLOP = 'FLOP\';
+ {$EXTERNALSYM REGSTR_VAL_FLOP}
+
+//
+// define defs for IOS device types and values for IOS devices
+//
+
+ REGSTR_VAL_DISK = 'GenDisk';
+ {$EXTERNALSYM REGSTR_VAL_DISK}
+ REGSTR_VAL_CDROM = 'GenCD';
+ {$EXTERNALSYM REGSTR_VAL_CDROM}
+ REGSTR_VAL_TAPE = 'TAPE';
+ {$EXTERNALSYM REGSTR_VAL_TAPE}
+ REGSTR_VAL_SCANNER = 'SCANNER';
+ {$EXTERNALSYM REGSTR_VAL_SCANNER}
+ REGSTR_VAL_FLOPPY = 'FLOPPY';
+ {$EXTERNALSYM REGSTR_VAL_FLOPPY}
+
+ REGSTR_VAL_SCSITID = 'SCSITargetID';
+ {$EXTERNALSYM REGSTR_VAL_SCSITID}
+ REGSTR_VAL_SCSILUN = 'SCSILUN';
+ {$EXTERNALSYM REGSTR_VAL_SCSILUN}
+ REGSTR_VAL_REVLEVEL = 'RevisionLevel';
+ {$EXTERNALSYM REGSTR_VAL_REVLEVEL}
+ REGSTR_VAL_PRODUCTID = 'ProductId';
+ {$EXTERNALSYM REGSTR_VAL_PRODUCTID}
+ REGSTR_VAL_PRODUCTTYPE = 'ProductType';
+ {$EXTERNALSYM REGSTR_VAL_PRODUCTTYPE}
+ REGSTR_VAL_DEVTYPE = 'DeviceType';
+ {$EXTERNALSYM REGSTR_VAL_DEVTYPE}
+ REGSTR_VAL_REMOVABLE = 'Removable';
+ {$EXTERNALSYM REGSTR_VAL_REMOVABLE}
+ REGSTR_VAL_CURDRVLET = 'CurrentDriveLetterAssignment';
+ {$EXTERNALSYM REGSTR_VAL_CURDRVLET}
+ REGSTR_VAL_USRDRVLET = 'UserDriveLetterAssignment';
+ {$EXTERNALSYM REGSTR_VAL_USRDRVLET}
+ REGSTR_VAL_SYNCDATAXFER = 'SyncDataXfer';
+ {$EXTERNALSYM REGSTR_VAL_SYNCDATAXFER}
+ REGSTR_VAL_AUTOINSNOTE = 'AutoInsertNotification';
+ {$EXTERNALSYM REGSTR_VAL_AUTOINSNOTE}
+ REGSTR_VAL_DISCONNECT = 'Disconnect';
+ {$EXTERNALSYM REGSTR_VAL_DISCONNECT}
+ REGSTR_VAL_INT13 = 'Int13';
+ {$EXTERNALSYM REGSTR_VAL_INT13}
+ REGSTR_VAL_PMODE_INT13 = 'PModeInt13';
+ {$EXTERNALSYM REGSTR_VAL_PMODE_INT13}
+ REGSTR_VAL_USERSETTINGS = 'AdapterSettings';
+ {$EXTERNALSYM REGSTR_VAL_USERSETTINGS}
+ REGSTR_VAL_NOIDE = 'NoIDE';
+ {$EXTERNALSYM REGSTR_VAL_NOIDE}
+
+// The foll. clase name definitions should be the same as in dirkdrv.inx and
+// cdrom.inx
+
+ REGSTR_VAL_DISKCLASSNAME = 'DiskDrive';
+ {$EXTERNALSYM REGSTR_VAL_DISKCLASSNAME}
+ REGSTR_VAL_CDROMCLASSNAME = 'CDROM';
+ {$EXTERNALSYM REGSTR_VAL_CDROMCLASSNAME}
+
+// The foll. value determines whether a port driver should be force loaded
+// or not.
+
+ REGSTR_VAL_FORCELOAD = 'ForceLoadPD';
+ {$EXTERNALSYM REGSTR_VAL_FORCELOAD}
+
+// The foll. value determines whether or not the FIFO is used on the Floppy
+// controller.
+
+ REGSTR_VAL_FORCEFIFO = 'ForceFIFO';
+ {$EXTERNALSYM REGSTR_VAL_FORCEFIFO}
+ REGSTR_VAL_FORCECL = 'ForceChangeLine';
+ {$EXTERNALSYM REGSTR_VAL_FORCECL}
+
+//
+// Generic CLASS Entries
+//
+
+ REGSTR_VAL_NOUSECLASS = 'NoUseClass'; // Don't include this class in PnP functions
+ {$EXTERNALSYM REGSTR_VAL_NOUSECLASS}
+ REGSTR_VAL_NOINSTALLCLASS = 'NoInstallClass'; // Don't include this class in New Device Wizard
+ {$EXTERNALSYM REGSTR_VAL_NOINSTALLCLASS}
+ REGSTR_VAL_NODISPLAYCLASS = 'NoDisplayClass'; // Don't include this class in Device Manager
+ {$EXTERNALSYM REGSTR_VAL_NODISPLAYCLASS}
+ REGSTR_VAL_SILENTINSTALL = 'SilentInstall'; // Always Silent Install devices of this class.
+ {$EXTERNALSYM REGSTR_VAL_SILENTINSTALL}
+
+//
+// Class Names
+//
+
+ REGSTR_KEY_PCMCIA_CLASS = 'PCMCIA'; // child of PATH_CLASS
+ {$EXTERNALSYM REGSTR_KEY_PCMCIA_CLASS}
+ REGSTR_KEY_SCSI_CLASS = 'SCSIAdapter';
+ {$EXTERNALSYM REGSTR_KEY_SCSI_CLASS}
+ REGSTR_KEY_PORTS_CLASS = 'ports';
+ {$EXTERNALSYM REGSTR_KEY_PORTS_CLASS}
+ REGSTR_KEY_MEDIA_CLASS = 'MEDIA';
+ {$EXTERNALSYM REGSTR_KEY_MEDIA_CLASS}
+ REGSTR_KEY_DISPLAY_CLASS = 'Display';
+ {$EXTERNALSYM REGSTR_KEY_DISPLAY_CLASS}
+ REGSTR_KEY_KEYBOARD_CLASS = 'Keyboard';
+ {$EXTERNALSYM REGSTR_KEY_KEYBOARD_CLASS}
+ REGSTR_KEY_MOUSE_CLASS = 'Mouse';
+ {$EXTERNALSYM REGSTR_KEY_MOUSE_CLASS}
+ REGSTR_KEY_MONITOR_CLASS = 'Monitor';
+ {$EXTERNALSYM REGSTR_KEY_MONITOR_CLASS}
+ REGSTR_KEY_MODEM_CLASS = 'Modem';
+ {$EXTERNALSYM REGSTR_KEY_MODEM_CLASS}
+
+//
+// Values under PATH_CLASS\PCMCIA
+//
+
+ REGSTR_VAL_PCMCIA_OPT = 'Options';
+ {$EXTERNALSYM REGSTR_VAL_PCMCIA_OPT}
+ PCMCIA_OPT_HAVE_SOCKET = $00000001;
+ {$EXTERNALSYM PCMCIA_OPT_HAVE_SOCKET}
+ //PCMCIA_OPT_ENABLED = $00000002;
+ //{$EXTERNALSYM PCMCIA_OPT_ENABLED}
+ PCMCIA_OPT_AUTOMEM = $00000004;
+ {$EXTERNALSYM PCMCIA_OPT_AUTOMEM}
+ PCMCIA_OPT_NO_SOUND = $00000008;
+ {$EXTERNALSYM PCMCIA_OPT_NO_SOUND}
+ PCMCIA_OPT_NO_AUDIO = $00000010;
+ {$EXTERNALSYM PCMCIA_OPT_NO_AUDIO}
+ PCMCIA_OPT_NO_APMREMOVE = $00000020;
+ {$EXTERNALSYM PCMCIA_OPT_NO_APMREMOVE}
+
+ REGSTR_VAL_PCMCIA_MEM = 'Memory'; // Card services shared mem range
+ {$EXTERNALSYM REGSTR_VAL_PCMCIA_MEM}
+ PCMCIA_DEF_MEMBEGIN = $000C0000; // default 0xC0000 - 0x00FFFFFF
+ {$EXTERNALSYM PCMCIA_DEF_MEMBEGIN}
+ PCMCIA_DEF_MEMEND = $00FFFFFF; // (0 - 16meg)
+ {$EXTERNALSYM PCMCIA_DEF_MEMEND}
+ PCMCIA_DEF_MEMLEN = $00001000; // default 4k window
+ {$EXTERNALSYM PCMCIA_DEF_MEMLEN}
+
+ REGSTR_VAL_PCMCIA_ALLOC = 'AllocMemWin'; // PCCard alloced memory Window
+ {$EXTERNALSYM REGSTR_VAL_PCMCIA_ALLOC}
+ REGSTR_VAL_PCMCIA_ATAD = 'ATADelay'; // ATA device config start delay
+ {$EXTERNALSYM REGSTR_VAL_PCMCIA_ATAD}
+
+ REGSTR_VAL_PCMCIA_SIZ = 'MinRegionSize'; // Minimum region size
+ {$EXTERNALSYM REGSTR_VAL_PCMCIA_SIZ}
+ PCMCIA_DEF_MIN_REGION = $00010000; // 64K minimum region size
+ {$EXTERNALSYM PCMCIA_DEF_MIN_REGION}
+
+// Values in LPTENUM keys
+
+ REGSTR_VAL_P1284MDL = 'Model';
+ {$EXTERNALSYM REGSTR_VAL_P1284MDL}
+ REGSTR_VAL_P1284MFG = 'Manufacturer';
+ {$EXTERNALSYM REGSTR_VAL_P1284MFG}
+
+//
+// Values under PATH_CLASS\ISAPNP
+//
+
+ REGSTR_VAL_ISAPNP = 'ISAPNP'; // ISAPNP VxD name
+ {$EXTERNALSYM REGSTR_VAL_ISAPNP}
+ REGSTR_VAL_ISAPNP_RDP_OVERRIDE = 'RDPOverRide'; // ReadDataPort OverRide
+ {$EXTERNALSYM REGSTR_VAL_ISAPNP_RDP_OVERRIDE}
+
+//
+// Values under PATH_CLASS\PCI
+//
+
+ REGSTR_VAL_PCI = 'PCI'; // PCI VxD name
+ {$EXTERNALSYM REGSTR_VAL_PCI}
+ REGSTR_PCI_OPTIONS = 'Options'; // Possible PCI options
+ {$EXTERNALSYM REGSTR_PCI_OPTIONS}
+ REGSTR_PCI_DUAL_IDE = 'PCIDualIDE'; // Dual IDE flag
+ {$EXTERNALSYM REGSTR_PCI_DUAL_IDE}
+ PCI_OPTIONS_USE_BIOS = $00000001;
+ {$EXTERNALSYM PCI_OPTIONS_USE_BIOS}
+ PCI_OPTIONS_USE_IRQ_STEERING = $00000002;
+ {$EXTERNALSYM PCI_OPTIONS_USE_IRQ_STEERING}
+
+//
+// Values under PATH_CLASS\AGPxxxx
+//
+// note: These flags affect standard AGP capabilities,
+// and are set in agplib
+//
+
+ AGP_FLAG_NO_1X_RATE = $00000001;
+ {$EXTERNALSYM AGP_FLAG_NO_1X_RATE}
+ AGP_FLAG_NO_2X_RATE = $00000002;
+ {$EXTERNALSYM AGP_FLAG_NO_2X_RATE}
+ AGP_FLAG_NO_4X_RATE = $00000004;
+ {$EXTERNALSYM AGP_FLAG_NO_4X_RATE}
+ AGP_FLAG_NO_8X_RATE = $00000008;
+ {$EXTERNALSYM AGP_FLAG_NO_8X_RATE}
+ AGP_FLAG_REVERSE_INITIALIZATION = $00000080;
+ {$EXTERNALSYM AGP_FLAG_REVERSE_INITIALIZATION}
+
+ AGP_FLAG_NO_SBA_ENABLE = $00000100;
+ {$EXTERNALSYM AGP_FLAG_NO_SBA_ENABLE}
+
+//
+// AGP flags > AGP_SPECIAL_TARGET are platform specific
+//
+
+ AGP_FLAG_SPECIAL_TARGET = $000FFFFF;
+ {$EXTERNALSYM AGP_FLAG_SPECIAL_TARGET}
+ AGP_FLAG_SPECIAL_RESERVE = $000F0000;
+ {$EXTERNALSYM AGP_FLAG_SPECIAL_RESERVE}
+
+//
+// Detection related values
+//
+
+ REGSTR_KEY_CRASHES = 'Crashes'; // key of REGSTR_PATH_DETECT
+ {$EXTERNALSYM REGSTR_KEY_CRASHES}
+ REGSTR_KEY_DANGERS = 'Dangers'; // key of REGSTR_PATH_DETECT
+ {$EXTERNALSYM REGSTR_KEY_DANGERS}
+ REGSTR_KEY_DETMODVARS = 'DetModVars'; // key of REGSTR_PATH_DETECT
+ {$EXTERNALSYM REGSTR_KEY_DETMODVARS}
+ REGSTR_KEY_NDISINFO = 'NDISInfo'; // key of netcard hw entry
+ {$EXTERNALSYM REGSTR_KEY_NDISINFO}
+ REGSTR_VAL_PROTINIPATH = 'ProtIniPath'; // protocol.ini path
+ {$EXTERNALSYM REGSTR_VAL_PROTINIPATH}
+ REGSTR_VAL_RESOURCES = 'Resources'; // resources of crash func.
+ {$EXTERNALSYM REGSTR_VAL_RESOURCES}
+ REGSTR_VAL_CRASHFUNCS = 'CrashFuncs'; // detfunc caused the crash
+ {$EXTERNALSYM REGSTR_VAL_CRASHFUNCS}
+ REGSTR_VAL_CLASS = 'Class'; // device class
+ {$EXTERNALSYM REGSTR_VAL_CLASS}
+ REGSTR_VAL_DEVDESC = 'DeviceDesc'; // device description
+ {$EXTERNALSYM REGSTR_VAL_DEVDESC}
+ REGSTR_VAL_BOOTCONFIG = 'BootConfig'; // detected configuration
+ {$EXTERNALSYM REGSTR_VAL_BOOTCONFIG}
+ REGSTR_VAL_DETFUNC = 'DetFunc'; // specifies detect mod/func.
+ {$EXTERNALSYM REGSTR_VAL_DETFUNC}
+ REGSTR_VAL_DETFLAGS = 'DetFlags'; // detection flags
+ {$EXTERNALSYM REGSTR_VAL_DETFLAGS}
+ REGSTR_VAL_COMPATIBLEIDS = 'CompatibleIDs'; // value of enum\dev\inst
+ {$EXTERNALSYM REGSTR_VAL_COMPATIBLEIDS}
+ REGSTR_VAL_DETCONFIG = 'DetConfig'; // detected configuration
+ {$EXTERNALSYM REGSTR_VAL_DETCONFIG}
+ REGSTR_VAL_VERIFYKEY = 'VerifyKey'; // key used in verify mode
+ {$EXTERNALSYM REGSTR_VAL_VERIFYKEY}
+ REGSTR_VAL_COMINFO = 'ComInfo'; // com info. for serial mouse
+ {$EXTERNALSYM REGSTR_VAL_COMINFO}
+ REGSTR_VAL_INFNAME = 'InfName'; // INF filename
+ {$EXTERNALSYM REGSTR_VAL_INFNAME}
+ REGSTR_VAL_CARDSPECIFIC = 'CardSpecific'; // Netcard specific info (WORD)
+ {$EXTERNALSYM REGSTR_VAL_CARDSPECIFIC}
+ REGSTR_VAL_NETOSTYPE = 'NetOSType'; // NetOS type associate w/ card
+ {$EXTERNALSYM REGSTR_VAL_NETOSTYPE}
+ REGSTR_DATA_NETOS_NDIS = 'NDIS'; // Data of REGSTR_VAL_NETOSTYPE
+ {$EXTERNALSYM REGSTR_DATA_NETOS_NDIS}
+ REGSTR_DATA_NETOS_ODI = 'ODI'; // Data of REGSTR_VAL_NETOSTYPE
+ {$EXTERNALSYM REGSTR_DATA_NETOS_ODI}
+ REGSTR_DATA_NETOS_IPX = 'IPX'; // Data of REGSTR_VAL_NETOSTYPE
+ {$EXTERNALSYM REGSTR_DATA_NETOS_IPX}
+ REGSTR_VAL_MFG = 'Mfg';
+ {$EXTERNALSYM REGSTR_VAL_MFG}
+ REGSTR_VAL_SCAN_ONLY_FIRST = 'ScanOnlyFirstDrive'; // used with IDE driver
+ {$EXTERNALSYM REGSTR_VAL_SCAN_ONLY_FIRST}
+ REGSTR_VAL_SHARE_IRQ = 'ForceIRQSharing'; // used with IDE driver
+ {$EXTERNALSYM REGSTR_VAL_SHARE_IRQ}
+ REGSTR_VAL_NONSTANDARD_ATAPI = 'NonStandardATAPI'; // used with IDE driver
+ {$EXTERNALSYM REGSTR_VAL_NONSTANDARD_ATAPI}
+ REGSTR_VAL_IDE_FORCE_SERIALIZE = 'ForceSerialization'; // used with IDE driver
+ {$EXTERNALSYM REGSTR_VAL_IDE_FORCE_SERIALIZE}
+ REGSTR_VAL_MAX_HCID_LEN = 1024; // Maximum hardware/compat ID len
+ {$EXTERNALSYM REGSTR_VAL_MAX_HCID_LEN}
+ REGSTR_VAL_HWREV = 'HWRevision';
+ {$EXTERNALSYM REGSTR_VAL_HWREV}
+ REGSTR_VAL_ENABLEINTS = 'EnableInts';
+ {$EXTERNALSYM REGSTR_VAL_ENABLEINTS}
+
+//
+// Bit values of REGSTR_VAL_DETFLAGS
+//
+
+ REGDF_NOTDETIO = $00000001; // cannot detect I/O resource
+ {$EXTERNALSYM REGDF_NOTDETIO}
+ REGDF_NOTDETMEM = $00000002; // cannot detect mem resource
+ {$EXTERNALSYM REGDF_NOTDETMEM}
+ REGDF_NOTDETIRQ = $00000004; // cannot detect IRQ resource
+ {$EXTERNALSYM REGDF_NOTDETIRQ}
+ REGDF_NOTDETDMA = $00000008; // cannot detect DMA resource
+ {$EXTERNALSYM REGDF_NOTDETDMA}
+ REGDF_NOTDETALL = REGDF_NOTDETIO or REGDF_NOTDETMEM or REGDF_NOTDETIRQ or REGDF_NOTDETDMA;
+ {$EXTERNALSYM REGDF_NOTDETALL}
+ REGDF_NEEDFULLCONFIG = $00000010; // stop devnode if lack resource
+ {$EXTERNALSYM REGDF_NEEDFULLCONFIG}
+ REGDF_GENFORCEDCONFIG = $00000020; // also generate forceconfig
+ {$EXTERNALSYM REGDF_GENFORCEDCONFIG}
+ REGDF_NODETCONFIG = $00008000; // don't write detconfig to reg.
+ {$EXTERNALSYM REGDF_NODETCONFIG}
+ REGDF_CONFLICTIO = $00010000; // I/O res. in conflict
+ {$EXTERNALSYM REGDF_CONFLICTIO}
+ REGDF_CONFLICTMEM = $00020000; // mem res. in conflict
+ {$EXTERNALSYM REGDF_CONFLICTMEM}
+ REGDF_CONFLICTIRQ = $00040000; // IRQ res. in conflict
+ {$EXTERNALSYM REGDF_CONFLICTIRQ}
+ REGDF_CONFLICTDMA = $00080000; // DMA res. in conflict
+ {$EXTERNALSYM REGDF_CONFLICTDMA}
+ REGDF_CONFLICTALL = REGDF_CONFLICTIO or REGDF_CONFLICTMEM or REGDF_CONFLICTIRQ or REGDF_CONFLICTDMA;
+ {$EXTERNALSYM REGDF_CONFLICTALL}
+ REGDF_MAPIRQ2TO9 = $00100000; // IRQ2 has been mapped to 9
+ {$EXTERNALSYM REGDF_MAPIRQ2TO9}
+ REGDF_NOTVERIFIED = DWORD($80000000); // previous device unverified
+ {$EXTERNALSYM REGDF_NOTVERIFIED}
+
+//
+// Values in REGSTR_KEY_SYSTEMBOARD
+//
+
+ REGSTR_VAL_APMBIOSVER = 'APMBiosVer';
+ {$EXTERNALSYM REGSTR_VAL_APMBIOSVER}
+ REGSTR_VAL_APMFLAGS = 'APMFlags';
+ {$EXTERNALSYM REGSTR_VAL_APMFLAGS}
+ REGSTR_VAL_SLSUPPORT = 'SLSupport';
+ {$EXTERNALSYM REGSTR_VAL_SLSUPPORT}
+ REGSTR_VAL_MACHINETYPE = 'MachineType';
+ {$EXTERNALSYM REGSTR_VAL_MACHINETYPE}
+ REGSTR_VAL_SETUPMACHINETYPE = 'SetupMachineType';
+ {$EXTERNALSYM REGSTR_VAL_SETUPMACHINETYPE}
+ REGSTR_MACHTYPE_UNKNOWN = 'Unknown';
+ {$EXTERNALSYM REGSTR_MACHTYPE_UNKNOWN}
+ REGSTR_MACHTYPE_IBMPC = 'IBM PC';
+ {$EXTERNALSYM REGSTR_MACHTYPE_IBMPC}
+ REGSTR_MACHTYPE_IBMPCJR = 'IBM PCjr';
+ {$EXTERNALSYM REGSTR_MACHTYPE_IBMPCJR}
+ REGSTR_MACHTYPE_IBMPCCONV = 'IBM PC Convertible';
+ {$EXTERNALSYM REGSTR_MACHTYPE_IBMPCCONV}
+ REGSTR_MACHTYPE_IBMPCXT = 'IBM PC/XT';
+ {$EXTERNALSYM REGSTR_MACHTYPE_IBMPCXT}
+ REGSTR_MACHTYPE_IBMPCXT_286 = 'IBM PC/XT 286';
+ {$EXTERNALSYM REGSTR_MACHTYPE_IBMPCXT_286}
+ REGSTR_MACHTYPE_IBMPCAT = 'IBM PC/AT';
+ {$EXTERNALSYM REGSTR_MACHTYPE_IBMPCAT}
+ REGSTR_MACHTYPE_IBMPS2_25 = 'IBM PS/2-25';
+ {$EXTERNALSYM REGSTR_MACHTYPE_IBMPS2_25}
+ REGSTR_MACHTYPE_IBMPS2_30_286 = 'IBM PS/2-30 286';
+ {$EXTERNALSYM REGSTR_MACHTYPE_IBMPS2_30_286}
+ REGSTR_MACHTYPE_IBMPS2_30 = 'IBM PS/2-30';
+ {$EXTERNALSYM REGSTR_MACHTYPE_IBMPS2_30}
+ REGSTR_MACHTYPE_IBMPS2_50 = 'IBM PS/2-50';
+ {$EXTERNALSYM REGSTR_MACHTYPE_IBMPS2_50}
+ REGSTR_MACHTYPE_IBMPS2_50Z = 'IBM PS/2-50Z';
+ {$EXTERNALSYM REGSTR_MACHTYPE_IBMPS2_50Z}
+ REGSTR_MACHTYPE_IBMPS2_55SX = 'IBM PS/2-55SX';
+ {$EXTERNALSYM REGSTR_MACHTYPE_IBMPS2_55SX}
+ REGSTR_MACHTYPE_IBMPS2_60 = 'IBM PS/2-60';
+ {$EXTERNALSYM REGSTR_MACHTYPE_IBMPS2_60}
+ REGSTR_MACHTYPE_IBMPS2_65SX = 'IBM PS/2-65SX';
+ {$EXTERNALSYM REGSTR_MACHTYPE_IBMPS2_65SX}
+ REGSTR_MACHTYPE_IBMPS2_70 = 'IBM PS/2-70';
+ {$EXTERNALSYM REGSTR_MACHTYPE_IBMPS2_70}
+ REGSTR_MACHTYPE_IBMPS2_P70 = 'IBM PS/2-P70';
+ {$EXTERNALSYM REGSTR_MACHTYPE_IBMPS2_P70}
+ REGSTR_MACHTYPE_IBMPS2_70_80 = 'IBM PS/2-70/80';
+ {$EXTERNALSYM REGSTR_MACHTYPE_IBMPS2_70_80}
+ REGSTR_MACHTYPE_IBMPS2_80 = 'IBM PS/2-80';
+ {$EXTERNALSYM REGSTR_MACHTYPE_IBMPS2_80}
+ REGSTR_MACHTYPE_IBMPS2_90 = 'IBM PS/2-90';
+ {$EXTERNALSYM REGSTR_MACHTYPE_IBMPS2_90}
+ REGSTR_MACHTYPE_IBMPS1 = 'IBM PS/1';
+ {$EXTERNALSYM REGSTR_MACHTYPE_IBMPS1}
+ REGSTR_MACHTYPE_PHOENIX_PCAT = 'Phoenix PC/AT Compatible';
+ {$EXTERNALSYM REGSTR_MACHTYPE_PHOENIX_PCAT}
+ REGSTR_MACHTYPE_HP_VECTRA = 'HP Vectra';
+ {$EXTERNALSYM REGSTR_MACHTYPE_HP_VECTRA}
+ REGSTR_MACHTYPE_ATT_PC = 'ATandT PC';
+ {$EXTERNALSYM REGSTR_MACHTYPE_ATT_PC}
+ REGSTR_MACHTYPE_ZENITH_PC = 'Zenith PC';
+ {$EXTERNALSYM REGSTR_MACHTYPE_ZENITH_PC}
+
+ REGSTR_VAL_APMMENUSUSPEND = 'APMMenuSuspend';
+ {$EXTERNALSYM REGSTR_VAL_APMMENUSUSPEND}
+ APMMENUSUSPEND_DISABLED = 0; // always disabled
+ {$EXTERNALSYM APMMENUSUSPEND_DISABLED}
+ APMMENUSUSPEND_ENABLED = 1; // always enabled
+ {$EXTERNALSYM APMMENUSUSPEND_ENABLED}
+ APMMENUSUSPEND_UNDOCKED = 2; // enabled undocked
+ {$EXTERNALSYM APMMENUSUSPEND_UNDOCKED}
+ APMMENUSUSPEND_NOCHANGE = $80; // bitflag - cannot change setting via UI
+ {$EXTERNALSYM APMMENUSUSPEND_NOCHANGE}
+
+ REGSTR_VAL_APMACTIMEOUT = 'APMACTimeout';
+ {$EXTERNALSYM REGSTR_VAL_APMACTIMEOUT}
+ REGSTR_VAL_APMBATTIMEOUT = 'APMBatTimeout';
+ {$EXTERNALSYM REGSTR_VAL_APMBATTIMEOUT}
+ APMTIMEOUT_DISABLED = 0;
+ {$EXTERNALSYM APMTIMEOUT_DISABLED}
+
+ REGSTR_VAL_APMSHUTDOWNPOWER = 'APMShutDownPower';
+ {$EXTERNALSYM REGSTR_VAL_APMSHUTDOWNPOWER}
+
+ REGSTR_VAL_BUSTYPE = 'BusType';
+ {$EXTERNALSYM REGSTR_VAL_BUSTYPE}
+ REGSTR_VAL_CPU = 'CPU';
+ {$EXTERNALSYM REGSTR_VAL_CPU}
+ REGSTR_VAL_NDP = 'NDP';
+ {$EXTERNALSYM REGSTR_VAL_NDP}
+ REGSTR_VAL_PNPBIOSVER = 'PnPBIOSVer';
+ {$EXTERNALSYM REGSTR_VAL_PNPBIOSVER}
+ REGSTR_VAL_PNPSTRUCOFFSET = 'PnPStrucOffset';
+ {$EXTERNALSYM REGSTR_VAL_PNPSTRUCOFFSET}
+ REGSTR_VAL_PCIBIOSVER = 'PCIBIOSVer';
+ {$EXTERNALSYM REGSTR_VAL_PCIBIOSVER}
+ REGSTR_VAL_HWMECHANISM = 'HWMechanism';
+ {$EXTERNALSYM REGSTR_VAL_HWMECHANISM}
+ REGSTR_VAL_LASTPCIBUSNUM = 'LastPCIBusNum';
+ {$EXTERNALSYM REGSTR_VAL_LASTPCIBUSNUM}
+ REGSTR_VAL_CONVMEM = 'ConvMem';
+ {$EXTERNALSYM REGSTR_VAL_CONVMEM}
+ REGSTR_VAL_EXTMEM = 'ExtMem';
+ {$EXTERNALSYM REGSTR_VAL_EXTMEM}
+ REGSTR_VAL_COMPUTERNAME = 'ComputerName';
+ {$EXTERNALSYM REGSTR_VAL_COMPUTERNAME}
+ REGSTR_VAL_BIOSNAME = 'BIOSName';
+ {$EXTERNALSYM REGSTR_VAL_BIOSNAME}
+ REGSTR_VAL_BIOSVERSION = 'BIOSVersion';
+ {$EXTERNALSYM REGSTR_VAL_BIOSVERSION}
+ REGSTR_VAL_BIOSDATE = 'BIOSDate';
+ {$EXTERNALSYM REGSTR_VAL_BIOSDATE}
+ REGSTR_VAL_MODEL = 'Model';
+ {$EXTERNALSYM REGSTR_VAL_MODEL}
+ REGSTR_VAL_SUBMODEL = 'Submodel';
+ {$EXTERNALSYM REGSTR_VAL_SUBMODEL}
+ REGSTR_VAL_REVISION = 'Revision';
+ {$EXTERNALSYM REGSTR_VAL_REVISION}
+
+//
+// Values used in the LPT(ECP) device entry
+//
+
+ REGSTR_VAL_FIFODEPTH = 'FIFODepth';
+ {$EXTERNALSYM REGSTR_VAL_FIFODEPTH}
+ REGSTR_VAL_RDINTTHRESHOLD = 'RDIntThreshold';
+ {$EXTERNALSYM REGSTR_VAL_RDINTTHRESHOLD}
+ REGSTR_VAL_WRINTTHRESHOLD = 'WRIntThreshold';
+ {$EXTERNALSYM REGSTR_VAL_WRINTTHRESHOLD}
+
+//used in enum\xxx\<devname>\<instname>
+
+ REGSTR_VAL_PRIORITY = 'Priority';
+ {$EXTERNALSYM REGSTR_VAL_PRIORITY}
+ REGSTR_VAL_DRIVER = 'Driver';
+ {$EXTERNALSYM REGSTR_VAL_DRIVER}
+ REGSTR_VAL_FUNCDESC = 'FunctionDesc';
+ {$EXTERNALSYM REGSTR_VAL_FUNCDESC}
+ REGSTR_VAL_FORCEDCONFIG = 'ForcedConfig';
+ {$EXTERNALSYM REGSTR_VAL_FORCEDCONFIG}
+ REGSTR_VAL_CONFIGFLAGS = 'ConfigFlags'; // (binary ULONG)
+ {$EXTERNALSYM REGSTR_VAL_CONFIGFLAGS}
+ REGSTR_VAL_CSCONFIGFLAGS = 'CSConfigFlags'; // (binary ULONG)
+ {$EXTERNALSYM REGSTR_VAL_CSCONFIGFLAGS}
+
+ CONFIGFLAG_DISABLED = $00000001; // Set if disabled
+ {$EXTERNALSYM CONFIGFLAG_DISABLED}
+ CONFIGFLAG_REMOVED = $00000002; // Set if a present hardware enum device deleted
+ {$EXTERNALSYM CONFIGFLAG_REMOVED}
+ CONFIGFLAG_MANUAL_INSTALL = $00000004; // Set if the devnode was manually installed
+ {$EXTERNALSYM CONFIGFLAG_MANUAL_INSTALL}
+ CONFIGFLAG_IGNORE_BOOT_LC = $00000008; // Set if skip the boot config
+ {$EXTERNALSYM CONFIGFLAG_IGNORE_BOOT_LC}
+ CONFIGFLAG_NET_BOOT = $00000010; // Load this devnode when in net boot
+ {$EXTERNALSYM CONFIGFLAG_NET_BOOT}
+ CONFIGFLAG_REINSTALL = $00000020; // Redo install
+ {$EXTERNALSYM CONFIGFLAG_REINSTALL}
+ CONFIGFLAG_FAILEDINSTALL = $00000040; // Failed the install
+ {$EXTERNALSYM CONFIGFLAG_FAILEDINSTALL}
+ CONFIGFLAG_CANTSTOPACHILD = $00000080; // Can't stop/remove a single child
+ {$EXTERNALSYM CONFIGFLAG_CANTSTOPACHILD}
+ CONFIGFLAG_OKREMOVEROM = $00000100; // Can remove even if rom.
+ {$EXTERNALSYM CONFIGFLAG_OKREMOVEROM}
+ CONFIGFLAG_NOREMOVEEXIT = $00000200; // Don't remove at exit.
+ {$EXTERNALSYM CONFIGFLAG_NOREMOVEEXIT}
+ CONFIGFLAG_FINISH_INSTALL = $00000400; // Complete install for devnode running 'raw'
+ {$EXTERNALSYM CONFIGFLAG_FINISH_INSTALL}
+ CONFIGFLAG_NEEDS_FORCED_CONFIG = $00000800; // This devnode requires a forced config
+ {$EXTERNALSYM CONFIGFLAG_NEEDS_FORCED_CONFIG}
+ CONFIGFLAG_NETBOOT_CARD = $00001000; // This is the remote boot network card
+ {$EXTERNALSYM CONFIGFLAG_NETBOOT_CARD}
+ CONFIGFLAG_PARTIAL_LOG_CONF = $00002000; // This device has a partial logconfig
+ {$EXTERNALSYM CONFIGFLAG_PARTIAL_LOG_CONF}
+ CONFIGFLAG_SUPPRESS_SURPRISE = $00004000; // Set if unsafe removals should be ignored
+ {$EXTERNALSYM CONFIGFLAG_SUPPRESS_SURPRISE}
+ CONFIGFLAG_VERIFY_HARDWARE = $00008000; // Set if hardware should be tested for logo failures
+ {$EXTERNALSYM CONFIGFLAG_VERIFY_HARDWARE}
+
+ CSCONFIGFLAG_BITS = $00000007; // OR of below bits
+ {$EXTERNALSYM CSCONFIGFLAG_BITS}
+ CSCONFIGFLAG_DISABLED = $00000001; // Set if
+ {$EXTERNALSYM CSCONFIGFLAG_DISABLED}
+ CSCONFIGFLAG_DO_NOT_CREATE = $00000002; // Set if
+ {$EXTERNALSYM CSCONFIGFLAG_DO_NOT_CREATE}
+ CSCONFIGFLAG_DO_NOT_START = $00000004; // Set if
+ {$EXTERNALSYM CSCONFIGFLAG_DO_NOT_START}
+
+ DMSTATEFLAG_APPLYTOALL = $00000001; // Set if Apply To All check box is checked
+ {$EXTERNALSYM DMSTATEFLAG_APPLYTOALL}
+
+//
+// Special devnodes name
+//
+
+ REGSTR_VAL_ROOT_DEVNODE = 'HTREE\ROOT\0';
+ {$EXTERNALSYM REGSTR_VAL_ROOT_DEVNODE}
+ REGSTR_VAL_RESERVED_DEVNODE = 'HTREE\RESERVED\0';
+ {$EXTERNALSYM REGSTR_VAL_RESERVED_DEVNODE}
+ REGSTR_PATH_READDATAPORT = REGSTR_KEY_ISAENUM + '\ReadDataPort\0';
+ {$EXTERNALSYM REGSTR_PATH_READDATAPORT}
+
+//
+// Multifunction definitions
+//
+ REGSTR_PATH_MULTI_FUNCTION = 'MF';
+ {$EXTERNALSYM REGSTR_PATH_MULTI_FUNCTION}
+ REGSTR_VAL_RESOURCE_MAP = 'ResourceMap';
+ {$EXTERNALSYM REGSTR_VAL_RESOURCE_MAP}
+ REGSTR_PATH_CHILD_PREFIX = 'Child';
+ {$EXTERNALSYM REGSTR_PATH_CHILD_PREFIX}
+ NUM_RESOURCE_MAP = 256;
+ {$EXTERNALSYM NUM_RESOURCE_MAP}
+ REGSTR_VAL_MF_FLAGS = 'MFFlags';
+ {$EXTERNALSYM REGSTR_VAL_MF_FLAGS}
+ MF_FLAGS_EVEN_IF_NO_RESOURCE = $00000001;
+ {$EXTERNALSYM MF_FLAGS_EVEN_IF_NO_RESOURCE}
+ MF_FLAGS_NO_CREATE_IF_NO_RESOURCE = $00000002;
+ {$EXTERNALSYM MF_FLAGS_NO_CREATE_IF_NO_RESOURCE}
+ MF_FLAGS_FILL_IN_UNKNOWN_RESOURCE = $00000004;
+ {$EXTERNALSYM MF_FLAGS_FILL_IN_UNKNOWN_RESOURCE}
+ MF_FLAGS_CREATE_BUT_NO_SHOW_DISABLED = $00000008;
+ {$EXTERNALSYM MF_FLAGS_CREATE_BUT_NO_SHOW_DISABLED}
+
+//
+// EISA multi functions add-on
+//
+
+ {$IFDEF NEC_98}
+ REGSTR_VAL_EISA_RANGES = 'NESARanges';
+ {$EXTERNALSYM REGSTR_VAL_EISA_RANGES}
+ REGSTR_VAL_EISA_FUNCTIONS = 'NESAFunctions';
+ {$EXTERNALSYM REGSTR_VAL_EISA_FUNCTIONS}
+ REGSTR_VAL_EISA_FUNCTIONS_MASK = 'NESAFunctionsMask';
+ {$EXTERNALSYM REGSTR_VAL_EISA_FUNCTIONS_MASK}
+ REGSTR_VAL_EISA_FLAGS = 'NESAFlags';
+ {$EXTERNALSYM REGSTR_VAL_EISA_FLAGS}
+ REGSTR_VAL_EISA_SIMULATE_INT15 = 'NESASimulateInt15';
+ {$EXTERNALSYM REGSTR_VAL_EISA_SIMULATE_INT15}
+ {$ELSE}
+ REGSTR_VAL_EISA_RANGES = 'EISARanges';
+ {$EXTERNALSYM REGSTR_VAL_EISA_RANGES}
+ REGSTR_VAL_EISA_FUNCTIONS = 'EISAFunctions';
+ {$EXTERNALSYM REGSTR_VAL_EISA_FUNCTIONS}
+ REGSTR_VAL_EISA_FUNCTIONS_MASK = 'EISAFunctionsMask';
+ {$EXTERNALSYM REGSTR_VAL_EISA_FUNCTIONS_MASK}
+ REGSTR_VAL_EISA_FLAGS = 'EISAFlags';
+ {$EXTERNALSYM REGSTR_VAL_EISA_FLAGS}
+ REGSTR_VAL_EISA_SIMULATE_INT15 = 'EISASimulateInt15';
+ {$EXTERNALSYM REGSTR_VAL_EISA_SIMULATE_INT15}
+ {$ENDIF NEC_98}
+ EISAFLAG_NO_IO_MERGE = $00000001;
+ {$EXTERNALSYM EISAFLAG_NO_IO_MERGE}
+ EISAFLAG_SLOT_IO_FIRST = $00000002;
+ {$EXTERNALSYM EISAFLAG_SLOT_IO_FIRST}
+ EISA_NO_MAX_FUNCTION = $FF;
+ {$EXTERNALSYM EISA_NO_MAX_FUNCTION}
+ NUM_EISA_RANGES = 4;
+ {$EXTERNALSYM NUM_EISA_RANGES}
+
+//
+// Driver entries
+//
+
+ REGSTR_VAL_DRVDESC = 'DriverDesc'; // value of enum\dev\inst\DRV
+ {$EXTERNALSYM REGSTR_VAL_DRVDESC}
+ REGSTR_VAL_DEVLOADER = 'DevLoader'; // value of DRV
+ {$EXTERNALSYM REGSTR_VAL_DEVLOADER}
+ REGSTR_VAL_STATICVXD = 'StaticVxD'; // value of DRV
+ {$EXTERNALSYM REGSTR_VAL_STATICVXD}
+ REGSTR_VAL_PROPERTIES = 'Properties'; // value of DRV
+ {$EXTERNALSYM REGSTR_VAL_PROPERTIES}
+ REGSTR_VAL_MANUFACTURER = 'Manufacturer';
+ {$EXTERNALSYM REGSTR_VAL_MANUFACTURER}
+ REGSTR_VAL_EXISTS = 'Exists'; // value of HCC\HW\ENUM\ROOT\dev\inst
+ {$EXTERNALSYM REGSTR_VAL_EXISTS}
+ REGSTR_VAL_CMENUMFLAGS = 'CMEnumFlags'; // (binary ULONG)
+ {$EXTERNALSYM REGSTR_VAL_CMENUMFLAGS}
+ REGSTR_VAL_CMDRIVFLAGS = 'CMDrivFlags'; // (binary ULONG)
+ {$EXTERNALSYM REGSTR_VAL_CMDRIVFLAGS}
+ REGSTR_VAL_ENUMERATOR = 'Enumerator'; // value of DRV
+ {$EXTERNALSYM REGSTR_VAL_ENUMERATOR}
+ REGSTR_VAL_DEVICEDRIVER = 'DeviceDriver'; // value of DRV
+ {$EXTERNALSYM REGSTR_VAL_DEVICEDRIVER}
+ REGSTR_VAL_PORTNAME = 'PortName'; // VCOMM uses this for it's port names
+ {$EXTERNALSYM REGSTR_VAL_PORTNAME}
+ REGSTR_VAL_INFPATH = 'InfPath';
+ {$EXTERNALSYM REGSTR_VAL_INFPATH}
+ REGSTR_VAL_INFSECTION = 'InfSection';
+ {$EXTERNALSYM REGSTR_VAL_INFSECTION}
+ REGSTR_VAL_INFSECTIONEXT = 'InfSectionExt';
+ {$EXTERNALSYM REGSTR_VAL_INFSECTIONEXT}
+ REGSTR_VAL_POLLING = 'Polling'; // SCSI specific
+ {$EXTERNALSYM REGSTR_VAL_POLLING}
+ REGSTR_VAL_DONTLOADIFCONFLICT = 'DontLoadIfConflict'; // SCSI specific
+ {$EXTERNALSYM REGSTR_VAL_DONTLOADIFCONFLICT}
+ REGSTR_VAL_PORTSUBCLASS = 'PortSubClass';
+ {$EXTERNALSYM REGSTR_VAL_PORTSUBCLASS}
+ REGSTR_VAL_NETCLEAN = 'NetClean'; // Driver required for NetClean boot
+ {$EXTERNALSYM REGSTR_VAL_NETCLEAN}
+ REGSTR_VAL_IDE_NO_SERIALIZE = 'IDENoSerialize'; // IDE specific
+ {$EXTERNALSYM REGSTR_VAL_IDE_NO_SERIALIZE}
+ REGSTR_VAL_NOCMOSORFDPT = 'NoCMOSorFDPT'; // IDE specific
+ {$EXTERNALSYM REGSTR_VAL_NOCMOSORFDPT}
+ REGSTR_VAL_COMVERIFYBASE = 'COMVerifyBase'; // VCD specific
+ {$EXTERNALSYM REGSTR_VAL_COMVERIFYBASE}
+ REGSTR_VAL_MATCHINGDEVID = 'MatchingDeviceId';
+ {$EXTERNALSYM REGSTR_VAL_MATCHINGDEVID}
+ REGSTR_VAL_DRIVERDATE = 'DriverDate'; // value of DRV
+ {$EXTERNALSYM REGSTR_VAL_DRIVERDATE}
+ REGSTR_VAL_DRIVERDATEDATA = 'DriverDateData'; // value of DRV
+ {$EXTERNALSYM REGSTR_VAL_DRIVERDATEDATA}
+ REGSTR_VAL_DRIVERVERSION = 'DriverVersion'; // value of DRV
+ {$EXTERNALSYM REGSTR_VAL_DRIVERVERSION}
+ REGSTR_VAL_LOCATION_INFORMATION_OVERRIDE = 'LocationInformationOverride'; // value of DRV
+ {$EXTERNALSYM REGSTR_VAL_LOCATION_INFORMATION_OVERRIDE}
+
+//
+// Driver keys
+//
+
+ REGSTR_KEY_OVERRIDE = 'Override'; // key under the software section
+ {$EXTERNALSYM REGSTR_KEY_OVERRIDE}
+
+//used by CONFIGMG
+
+ REGSTR_VAL_CONFIGMG = 'CONFIGMG'; // Config Manager VxD name
+ {$EXTERNALSYM REGSTR_VAL_CONFIGMG}
+ REGSTR_VAL_SYSDM = 'SysDM'; // The device installer DLL
+ {$EXTERNALSYM REGSTR_VAL_SYSDM}
+ REGSTR_VAL_SYSDMFUNC = 'SysDMFunc'; // The device installer DLL function
+ {$EXTERNALSYM REGSTR_VAL_SYSDMFUNC}
+ REGSTR_VAL_PRIVATE = 'Private'; // The private library
+ {$EXTERNALSYM REGSTR_VAL_PRIVATE}
+ REGSTR_VAL_PRIVATEFUNC = 'PrivateFunc'; // The private library function
+ {$EXTERNALSYM REGSTR_VAL_PRIVATEFUNC}
+ REGSTR_VAL_DETECT = 'Detect'; // The detection library
+ {$EXTERNALSYM REGSTR_VAL_DETECT}
+ REGSTR_VAL_DETECTFUNC = 'DetectFunc'; // The detection library function
+ {$EXTERNALSYM REGSTR_VAL_DETECTFUNC}
+ REGSTR_VAL_ASKFORCONFIG = 'AskForConfig'; // The AskForConfig library
+ {$EXTERNALSYM REGSTR_VAL_ASKFORCONFIG}
+ REGSTR_VAL_ASKFORCONFIGFUNC = 'AskForConfigFunc'; // The AskForConfig library function
+ {$EXTERNALSYM REGSTR_VAL_ASKFORCONFIGFUNC}
+ REGSTR_VAL_WAITFORUNDOCK = 'WaitForUndock'; // The WaitForUndock library
+ {$EXTERNALSYM REGSTR_VAL_WAITFORUNDOCK}
+ REGSTR_VAL_WAITFORUNDOCKFUNC = 'WaitForUndockFunc'; // The WaitForUndock library function
+ {$EXTERNALSYM REGSTR_VAL_WAITFORUNDOCKFUNC}
+ REGSTR_VAL_REMOVEROMOKAY = 'RemoveRomOkay'; // The RemoveRomOkay library
+ {$EXTERNALSYM REGSTR_VAL_REMOVEROMOKAY}
+ REGSTR_VAL_REMOVEROMOKAYFUNC = 'RemoveRomOkayFunc'; // The RemoveRomOkay library function
+ {$EXTERNALSYM REGSTR_VAL_REMOVEROMOKAYFUNC}
+
+//used in IDCONFIGDB
+
+ REGSTR_VAL_CURCONFIG = 'CurrentConfig'; // value of idconfigdb
+ {$EXTERNALSYM REGSTR_VAL_CURCONFIG}
+ REGSTR_VAL_FRIENDLYNAME = 'FriendlyName'; // value of idconfigdb
+ {$EXTERNALSYM REGSTR_VAL_FRIENDLYNAME}
+ REGSTR_VAL_CURRENTCONFIG = 'CurrentConfig'; // value of idconfigdb
+ {$EXTERNALSYM REGSTR_VAL_CURRENTCONFIG}
+ REGSTR_VAL_MAP = 'Map'; // value of idconfigdb
+ {$EXTERNALSYM REGSTR_VAL_MAP}
+ REGSTR_VAL_ID = 'CurrentID'; // value of idconfigdb
+ {$EXTERNALSYM REGSTR_VAL_ID}
+ REGSTR_VAL_DOCKED = 'CurrentDockedState'; // value of idconfigdb
+ {$EXTERNALSYM REGSTR_VAL_DOCKED}
+ REGSTR_VAL_CHECKSUM = 'CurrentChecksum'; // value of idconfigdb
+ {$EXTERNALSYM REGSTR_VAL_CHECKSUM}
+ REGSTR_VAL_HWDETECT = 'HardwareDetect'; // value of idconfigdb
+ {$EXTERNALSYM REGSTR_VAL_HWDETECT}
+ REGSTR_VAL_INHIBITRESULTS = 'InhibitResults'; // value of idconfigdb
+ {$EXTERNALSYM REGSTR_VAL_INHIBITRESULTS}
+
+//used in HKEY_CURRENT_CONFIG
+
+ REGSTR_VAL_PROFILEFLAGS = 'ProfileFlags'; // value of HKEY_CURRENT_CONFIG
+ {$EXTERNALSYM REGSTR_VAL_PROFILEFLAGS}
+
+//used in PCMCIA
+
+ REGSTR_KEY_PCMCIA = 'PCMCIA\'; // PCMCIA dev ID prefix
+ {$EXTERNALSYM REGSTR_KEY_PCMCIA}
+ REGSTR_KEY_PCUNKNOWN = 'UNKNOWN_MANUFACTURER'; // PCMCIA dev ID manuf
+ {$EXTERNALSYM REGSTR_KEY_PCUNKNOWN}
+ REGSTR_VAL_PCSSDRIVER = 'Driver'; // value of DRV
+ {$EXTERNALSYM REGSTR_VAL_PCSSDRIVER}
+ REGSTR_KEY_PCMTD = 'MTD-'; // MTD dev ID component
+ {$EXTERNALSYM REGSTR_KEY_PCMTD}
+ REGSTR_VAL_PCMTDRIVER = 'MTD'; // value of Mem Tech DRV
+ {$EXTERNALSYM REGSTR_VAL_PCMTDRIVER}
+
+//used in hardware\enum\dev\inst by Device Installer
+
+ REGSTR_VAL_HARDWAREID = 'HardwareID'; // value of enum\dev\inst
+ {$EXTERNALSYM REGSTR_VAL_HARDWAREID}
+
+//value names under class brach REGSTR_KEY_CLASS + class name
+// and for the drivers REGSTR_KEY_CLASS\classname\xxxx
+
+ REGSTR_VAL_INSTALLER = 'Installer'; // 16-bit class installer module/entry point
+ {$EXTERNALSYM REGSTR_VAL_INSTALLER}
+ REGSTR_VAL_INSTALLER_32 = 'Installer32'; // 32-bit class installer module/entry point
+ {$EXTERNALSYM REGSTR_VAL_INSTALLER_32}
+ REGSTR_VAL_INSICON = 'Icon'; // value of class\name
+ {$EXTERNALSYM REGSTR_VAL_INSICON}
+ REGSTR_VAL_ENUMPROPPAGES = 'EnumPropPages'; // For Class/Device Properties (16-bit)
+ {$EXTERNALSYM REGSTR_VAL_ENUMPROPPAGES}
+ REGSTR_VAL_ENUMPROPPAGES_32 = 'EnumPropPages32'; // For Class/Device Properties (32-bit)
+ {$EXTERNALSYM REGSTR_VAL_ENUMPROPPAGES_32}
+ REGSTR_VAL_BASICPROPERTIES = 'BasicProperties'; // For CPL basic Properties (16-bit)
+ {$EXTERNALSYM REGSTR_VAL_BASICPROPERTIES}
+ REGSTR_VAL_BASICPROPERTIES_32 = 'BasicProperties32'; // For CPL basic Properties (32-bit)
+ {$EXTERNALSYM REGSTR_VAL_BASICPROPERTIES_32}
+ REGSTR_VAL_COINSTALLERS_32 = 'CoInstallers32'; // Device-specific co-installer multi-sz list (32-bit)
+ {$EXTERNALSYM REGSTR_VAL_COINSTALLERS_32}
+ REGSTR_VAL_PRIVATEPROBLEM = 'PrivateProblem'; // For Handling Private Problems
+ {$EXTERNALSYM REGSTR_VAL_PRIVATEPROBLEM}
+
+// names used for display driver set information
+
+ REGSTR_KEY_CURRENT = 'Current'; // current mode information
+ {$EXTERNALSYM REGSTR_KEY_CURRENT}
+ REGSTR_KEY_DEFAULT = 'Default'; // default configuration
+ {$EXTERNALSYM REGSTR_KEY_DEFAULT}
+ REGSTR_KEY_MODES = 'Modes'; // modes subtree
+ {$EXTERNALSYM REGSTR_KEY_MODES}
+
+ REGSTR_VAL_MODE = 'Mode'; // default mode
+ {$EXTERNALSYM REGSTR_VAL_MODE}
+ REGSTR_VAL_BPP = 'BPP'; // bits per pixel
+ {$EXTERNALSYM REGSTR_VAL_BPP}
+ REGSTR_VAL_HRES = 'HRes'; // horizontal resolution
+ {$EXTERNALSYM REGSTR_VAL_HRES}
+ REGSTR_VAL_VRES = 'VRes'; // vertical resolution
+ {$EXTERNALSYM REGSTR_VAL_VRES}
+ REGSTR_VAL_FONTSIZE = 'FontSize'; // used in default or override
+ {$EXTERNALSYM REGSTR_VAL_FONTSIZE}
+ REGSTR_VAL_DRV = 'drv'; // the driver file
+ {$EXTERNALSYM REGSTR_VAL_DRV}
+ REGSTR_VAL_GRB = 'grb'; // the grabber file
+ {$EXTERNALSYM REGSTR_VAL_GRB}
+ REGSTR_VAL_VDD = 'vdd'; // vdds used here
+ {$EXTERNALSYM REGSTR_VAL_VDD}
+ REGSTR_VAL_VER = 'Ver';
+ {$EXTERNALSYM REGSTR_VAL_VER}
+ REGSTR_VAL_MAXRES = 'MaxResolution'; // max res for monitors
+ {$EXTERNALSYM REGSTR_VAL_MAXRES}
+ REGSTR_VAL_DPMS = 'DPMS'; // DPMS enabled
+ {$EXTERNALSYM REGSTR_VAL_DPMS}
+ REGSTR_VAL_RESUMERESET = 'ResumeReset'; // need reset on resume
+ {$EXTERNALSYM REGSTR_VAL_RESUMERESET}
+
+ REGSTR_VAL_DESCRIPTION = 'Description';
+ {$EXTERNALSYM REGSTR_VAL_DESCRIPTION}
+
+// keys in fontsize tree
+
+ REGSTR_KEY_SYSTEM = 'System'; // entries for system.ini
+ {$EXTERNALSYM REGSTR_KEY_SYSTEM}
+ REGSTR_KEY_USER = 'User'; // entries for win.ini
+ {$EXTERNALSYM REGSTR_KEY_USER}
+ REGSTR_VAL_DPI = 'dpi'; // dpi of fontsize
+ {$EXTERNALSYM REGSTR_VAL_DPI}
+
+//
+// Used by PCIC socket services
+//
+
+ REGSTR_VAL_PCICOPTIONS = 'PCICOptions'; // Binary DWORD. IRQ mask in
+ {$EXTERNALSYM REGSTR_VAL_PCICOPTIONS}
+ // low word. # skts in high
+ {$IFDEF NEC_98}
+ PCIC_DEFAULT_IRQMASK = $1468; // Default IRQ masks
+ {$EXTERNALSYM PCIC_DEFAULT_IRQMASK}
+ {$ELSE}
+ PCIC_DEFAULT_IRQMASK = $4EB8; // Default IRQ masks
+ {$EXTERNALSYM PCIC_DEFAULT_IRQMASK}
+ {$ENDIF NEC_98}
+ PCIC_DEFAULT_NUMSOCKETS = 0; // 0 = Automatic detection
+ {$EXTERNALSYM PCIC_DEFAULT_NUMSOCKETS}
+ REGSTR_VAL_PCICIRQMAP = 'PCICIRQMap'; // Binary 16 byte IRQ map table
+ {$EXTERNALSYM REGSTR_VAL_PCICIRQMAP}
+
+// names used for control panel entries
+
+ REGSTR_PATH_APPEARANCE = 'Control Panel\Appearance';
+ {$EXTERNALSYM REGSTR_PATH_APPEARANCE}
+ REGSTR_PATH_LOOKSCHEMES = 'Control Panel\Appearance\Schemes';
+ {$EXTERNALSYM REGSTR_PATH_LOOKSCHEMES}
+ REGSTR_VAL_CUSTOMCOLORS = 'CustomColors';
+ {$EXTERNALSYM REGSTR_VAL_CUSTOMCOLORS}
+
+ REGSTR_PATH_SCREENSAVE = 'Control Panel\Desktop';
+ {$EXTERNALSYM REGSTR_PATH_SCREENSAVE}
+ REGSTR_VALUE_USESCRPASSWORD = 'ScreenSaveUsePassword';
+ {$EXTERNALSYM REGSTR_VALUE_USESCRPASSWORD}
+ REGSTR_VALUE_SCRPASSWORD = 'ScreenSave_Data';
+ {$EXTERNALSYM REGSTR_VALUE_SCRPASSWORD}
+
+ REGSTR_VALUE_LOWPOWERTIMEOUT = 'ScreenSaveLowPowerTimeout';
+ {$EXTERNALSYM REGSTR_VALUE_LOWPOWERTIMEOUT}
+ REGSTR_VALUE_POWEROFFTIMEOUT = 'ScreenSavePowerOffTimeout';
+ {$EXTERNALSYM REGSTR_VALUE_POWEROFFTIMEOUT}
+ REGSTR_VALUE_LOWPOWERACTIVE = 'ScreenSaveLowPowerActive';
+ {$EXTERNALSYM REGSTR_VALUE_LOWPOWERACTIVE}
+ REGSTR_VALUE_POWEROFFACTIVE = 'ScreenSavePowerOffActive';
+ {$EXTERNALSYM REGSTR_VALUE_POWEROFFACTIVE}
+
+// used for Windows applets
+
+ REGSTR_PATH_WINDOWSAPPLETS = 'Software\Microsoft\Windows\CurrentVersion\Applets';
+ {$EXTERNALSYM REGSTR_PATH_WINDOWSAPPLETS}
+
+//
+// system tray. Flag values defined in systrap.h
+//
+
+ REGSTR_PATH_SYSTRAY = 'Software\Microsoft\Windows\CurrentVersion\Applets\SysTray';
+ {$EXTERNALSYM REGSTR_PATH_SYSTRAY}
+ REGSTR_VAL_SYSTRAYSVCS = 'Services';
+ {$EXTERNALSYM REGSTR_VAL_SYSTRAYSVCS}
+ REGSTR_VAL_SYSTRAYBATFLAGS = 'PowerFlags';
+ {$EXTERNALSYM REGSTR_VAL_SYSTRAYBATFLAGS}
+ REGSTR_VAL_SYSTRAYPCCARDFLAGS = 'PCMCIAFlags';
+ {$EXTERNALSYM REGSTR_VAL_SYSTRAYPCCARDFLAGS}
+
+//
+// Used by system networking components to store per-user values.
+// All keys here are under HKCU.
+//
+
+ REGSTR_PATH_NETWORK_USERSETTINGS = 'Network';
+ {$EXTERNALSYM REGSTR_PATH_NETWORK_USERSETTINGS}
+
+ REGSTR_KEY_NETWORK_PERSISTENT = '\Persistent';
+ {$EXTERNALSYM REGSTR_KEY_NETWORK_PERSISTENT}
+ REGSTR_KEY_NETWORK_RECENT = '\Recent';
+ {$EXTERNALSYM REGSTR_KEY_NETWORK_RECENT}
+ REGSTR_VAL_REMOTE_PATH = 'RemotePath';
+ {$EXTERNALSYM REGSTR_VAL_REMOTE_PATH}
+ REGSTR_VAL_USER_NAME = 'UserName';
+ {$EXTERNALSYM REGSTR_VAL_USER_NAME}
+ REGSTR_VAL_PROVIDER_NAME = 'ProviderName';
+ {$EXTERNALSYM REGSTR_VAL_PROVIDER_NAME}
+ REGSTR_VAL_CONNECTION_TYPE = 'ConnectionType';
+ {$EXTERNALSYM REGSTR_VAL_CONNECTION_TYPE}
+ REGSTR_VAL_UPGRADE = 'Upgrade';
+ {$EXTERNALSYM REGSTR_VAL_UPGRADE}
+
+ REGSTR_KEY_LOGON = '\Logon';
+ {$EXTERNALSYM REGSTR_KEY_LOGON}
+ REGSTR_VAL_MUSTBEVALIDATED = 'MustBeValidated';
+ {$EXTERNALSYM REGSTR_VAL_MUSTBEVALIDATED}
+ REGSTR_VAL_RUNLOGINSCRIPT = 'ProcessLoginScript';
+ {$EXTERNALSYM REGSTR_VAL_RUNLOGINSCRIPT}
+
+//
+// NetworkProvider entries. These entries are under
+// REGSTR_PATH_SERVICES\xxx\NetworkProvider
+//
+
+ REGSTR_KEY_NETWORKPROVIDER = '\NetworkProvider';
+ {$EXTERNALSYM REGSTR_KEY_NETWORKPROVIDER}
+ REGSTR_PATH_NW32NETPROVIDER = REGSTR_PATH_SERVICES + '\NWNP32' + REGSTR_KEY_NETWORKPROVIDER;
+ {$EXTERNALSYM REGSTR_PATH_NW32NETPROVIDER}
+ REGSTR_PATH_MS32NETPROVIDER = REGSTR_PATH_SERVICES + '\MSNP32' + REGSTR_KEY_NETWORKPROVIDER;
+ {$EXTERNALSYM REGSTR_PATH_MS32NETPROVIDER}
+ REGSTR_VAL_AUTHENT_AGENT = 'AuthenticatingAgent';
+ {$EXTERNALSYM REGSTR_VAL_AUTHENT_AGENT}
+
+//
+// Entries under REGSTR_PATH_REALMODENET
+//
+
+ REGSTR_VAL_PREFREDIR = 'PreferredRedir';
+ {$EXTERNALSYM REGSTR_VAL_PREFREDIR}
+ REGSTR_VAL_AUTOSTART = 'AutoStart';
+ {$EXTERNALSYM REGSTR_VAL_AUTOSTART}
+ REGSTR_VAL_AUTOLOGON = 'AutoLogon';
+ {$EXTERNALSYM REGSTR_VAL_AUTOLOGON}
+ REGSTR_VAL_NETCARD = 'Netcard';
+ {$EXTERNALSYM REGSTR_VAL_NETCARD}
+ REGSTR_VAL_TRANSPORT = 'Transport';
+ {$EXTERNALSYM REGSTR_VAL_TRANSPORT}
+ REGSTR_VAL_DYNAMIC = 'Dynamic';
+ {$EXTERNALSYM REGSTR_VAL_DYNAMIC}
+ REGSTR_VAL_TRANSITION = 'Transition';
+ {$EXTERNALSYM REGSTR_VAL_TRANSITION}
+ REGSTR_VAL_STATICDRIVE = 'StaticDrive';
+ {$EXTERNALSYM REGSTR_VAL_STATICDRIVE}
+ REGSTR_VAL_LOADHI = 'LoadHi';
+ {$EXTERNALSYM REGSTR_VAL_LOADHI}
+ REGSTR_VAL_LOADRMDRIVERS = 'LoadRMDrivers';
+ {$EXTERNALSYM REGSTR_VAL_LOADRMDRIVERS}
+ REGSTR_VAL_SETUPN = 'SetupN';
+ {$EXTERNALSYM REGSTR_VAL_SETUPN}
+ REGSTR_VAL_SETUPNPATH = 'SetupNPath';
+ {$EXTERNALSYM REGSTR_VAL_SETUPNPATH}
+
+//
+// Entries under REGSTR_PATH_CVNETWORK
+//
+
+ REGSTR_VAL_WRKGRP_FORCEMAPPING = 'WrkgrpForceMapping';
+ {$EXTERNALSYM REGSTR_VAL_WRKGRP_FORCEMAPPING}
+ REGSTR_VAL_WRKGRP_REQUIRED = 'WrkgrpRequired';
+ {$EXTERNALSYM REGSTR_VAL_WRKGRP_REQUIRED}
+
+//
+// NT-compatible place where the name of the currently logged-on user is stored.
+//
+
+ REGSTR_PATH_CURRENT_CONTROL_SET = 'System\CurrentControlSet\Control';
+ {$EXTERNALSYM REGSTR_PATH_CURRENT_CONTROL_SET}
+ REGSTR_VAL_CURRENT_USER = 'Current User';
+ {$EXTERNALSYM REGSTR_VAL_CURRENT_USER}
+
+// section where password providers are installed (each provider has subkey under this key)
+
+ REGSTR_PATH_PWDPROVIDER = 'System\CurrentControlSet\Control\PwdProvider';
+ {$EXTERNALSYM REGSTR_PATH_PWDPROVIDER}
+ REGSTR_VAL_PWDPROVIDER_PATH = 'ProviderPath';
+ {$EXTERNALSYM REGSTR_VAL_PWDPROVIDER_PATH}
+ REGSTR_VAL_PWDPROVIDER_DESC = 'Description';
+ {$EXTERNALSYM REGSTR_VAL_PWDPROVIDER_DESC}
+ REGSTR_VAL_PWDPROVIDER_CHANGEPWD = 'ChangePassword';
+ {$EXTERNALSYM REGSTR_VAL_PWDPROVIDER_CHANGEPWD}
+ REGSTR_VAL_PWDPROVIDER_CHANGEPWDHWND = 'ChangePasswordHwnd';
+ {$EXTERNALSYM REGSTR_VAL_PWDPROVIDER_CHANGEPWDHWND}
+ REGSTR_VAL_PWDPROVIDER_GETPWDSTATUS = 'GetPasswordStatus';
+ {$EXTERNALSYM REGSTR_VAL_PWDPROVIDER_GETPWDSTATUS}
+ REGSTR_VAL_PWDPROVIDER_ISNP = 'NetworkProvider';
+ {$EXTERNALSYM REGSTR_VAL_PWDPROVIDER_ISNP}
+ REGSTR_VAL_PWDPROVIDER_CHANGEORDER = 'ChangeOrder';
+ {$EXTERNALSYM REGSTR_VAL_PWDPROVIDER_CHANGEORDER}
+
+//
+// Used by administrator configuration tool and various components who enforce
+// policies.
+//
+
+ REGSTR_PATH_POLICIES = 'Software\Microsoft\Windows\CurrentVersion\Policies';
+ {$EXTERNALSYM REGSTR_PATH_POLICIES}
+
+// used to control remote update of administrator policies
+
+ REGSTR_PATH_UPDATE = 'System\CurrentControlSet\Control\Update';
+ {$EXTERNALSYM REGSTR_PATH_UPDATE}
+ REGSTR_VALUE_ENABLE = 'Enable';
+ {$EXTERNALSYM REGSTR_VALUE_ENABLE}
+ REGSTR_VALUE_VERBOSE = 'Verbose';
+ {$EXTERNALSYM REGSTR_VALUE_VERBOSE}
+ REGSTR_VALUE_NETPATH = 'NetworkPath';
+ {$EXTERNALSYM REGSTR_VALUE_NETPATH}
+ REGSTR_VALUE_DEFAULTLOC = 'UseDefaultNetLocation';
+ {$EXTERNALSYM REGSTR_VALUE_DEFAULTLOC}
+
+//
+// Entries under REGSTR_PATH_POLICIES
+//
+
+ REGSTR_KEY_NETWORK = 'Network';
+ {$EXTERNALSYM REGSTR_KEY_NETWORK}
+ // already defined above
+ // REGSTR_KEY_SYSTEM = 'System';
+ // {$EXTERNALSYM REGSTR_KEY_SYSTEM}
+ REGSTR_KEY_PRINTERS = 'Printers';
+ {$EXTERNALSYM REGSTR_KEY_PRINTERS}
+ REGSTR_KEY_WINOLDAPP = 'WinOldApp';
+ {$EXTERNALSYM REGSTR_KEY_WINOLDAPP}
+
+// (following are values REG_DWORD, legal values 0 or 1, treat as TEXT("0") if value not present)
+// policies under NETWORK key
+
+ REGSTR_VAL_NOFILESHARING = 'NoFileSharing'; // TEXT("1") prevents server from loading
+ {$EXTERNALSYM REGSTR_VAL_NOFILESHARING}
+ REGSTR_VAL_NOPRINTSHARING = 'NoPrintSharing';
+ {$EXTERNALSYM REGSTR_VAL_NOPRINTSHARING}
+ REGSTR_VAL_NOFILESHARINGCTRL = 'NoFileSharingControl'; // TEXT("1") removes sharing ui
+ {$EXTERNALSYM REGSTR_VAL_NOFILESHARINGCTRL}
+ REGSTR_VAL_NOPRINTSHARINGCTRL = 'NoPrintSharingControl';
+ {$EXTERNALSYM REGSTR_VAL_NOPRINTSHARINGCTRL}
+ REGSTR_VAL_HIDESHAREPWDS = 'HideSharePwds'; // TEXT("1") hides share passwords with asterisks
+ {$EXTERNALSYM REGSTR_VAL_HIDESHAREPWDS}
+ REGSTR_VAL_DISABLEPWDCACHING = 'DisablePwdCaching'; // TEXT("1") disables caching
+ {$EXTERNALSYM REGSTR_VAL_DISABLEPWDCACHING}
+ REGSTR_VAL_ALPHANUMPWDS = 'AlphanumPwds'; // TEXT("1") forces alphanumeric passwords
+ {$EXTERNALSYM REGSTR_VAL_ALPHANUMPWDS}
+ REGSTR_VAL_NETSETUP_DISABLE = 'NoNetSetup';
+ {$EXTERNALSYM REGSTR_VAL_NETSETUP_DISABLE}
+ REGSTR_VAL_NETSETUP_NOCONFIGPAGE = 'NoNetSetupConfigPage';
+ {$EXTERNALSYM REGSTR_VAL_NETSETUP_NOCONFIGPAGE}
+ REGSTR_VAL_NETSETUP_NOIDPAGE = 'NoNetSetupIDPage';
+ {$EXTERNALSYM REGSTR_VAL_NETSETUP_NOIDPAGE}
+ REGSTR_VAL_NETSETUP_NOSECURITYPAGE = 'NoNetSetupSecurityPage';
+ {$EXTERNALSYM REGSTR_VAL_NETSETUP_NOSECURITYPAGE}
+ REGSTR_VAL_SYSTEMCPL_NOVIRTMEMPAGE = 'NoVirtMemPage';
+ {$EXTERNALSYM REGSTR_VAL_SYSTEMCPL_NOVIRTMEMPAGE}
+ REGSTR_VAL_SYSTEMCPL_NODEVMGRPAGE = 'NoDevMgrPage';
+ {$EXTERNALSYM REGSTR_VAL_SYSTEMCPL_NODEVMGRPAGE}
+ REGSTR_VAL_SYSTEMCPL_NOCONFIGPAGE = 'NoConfigPage';
+ {$EXTERNALSYM REGSTR_VAL_SYSTEMCPL_NOCONFIGPAGE}
+ REGSTR_VAL_SYSTEMCPL_NOFILESYSPAGE = 'NoFileSysPage';
+ {$EXTERNALSYM REGSTR_VAL_SYSTEMCPL_NOFILESYSPAGE}
+ REGSTR_VAL_DISPCPL_NODISPCPL = 'NoDispCPL';
+ {$EXTERNALSYM REGSTR_VAL_DISPCPL_NODISPCPL}
+ REGSTR_VAL_DISPCPL_NOBACKGROUNDPAGE = 'NoDispBackgroundPage';
+ {$EXTERNALSYM REGSTR_VAL_DISPCPL_NOBACKGROUNDPAGE}
+ REGSTR_VAL_DISPCPL_NOSCRSAVPAGE = 'NoDispScrSavPage';
+ {$EXTERNALSYM REGSTR_VAL_DISPCPL_NOSCRSAVPAGE}
+ REGSTR_VAL_DISPCPL_NOAPPEARANCEPAGE = 'NoDispAppearancePage';
+ {$EXTERNALSYM REGSTR_VAL_DISPCPL_NOAPPEARANCEPAGE}
+ REGSTR_VAL_DISPCPL_NOSETTINGSPAGE = 'NoDispSettingsPage';
+ {$EXTERNALSYM REGSTR_VAL_DISPCPL_NOSETTINGSPAGE}
+ REGSTR_VAL_SECCPL_NOSECCPL = 'NoSecCPL';
+ {$EXTERNALSYM REGSTR_VAL_SECCPL_NOSECCPL}
+ REGSTR_VAL_SECCPL_NOPWDPAGE = 'NoPwdPage';
+ {$EXTERNALSYM REGSTR_VAL_SECCPL_NOPWDPAGE}
+ REGSTR_VAL_SECCPL_NOADMINPAGE = 'NoAdminPage';
+ {$EXTERNALSYM REGSTR_VAL_SECCPL_NOADMINPAGE}
+ REGSTR_VAL_SECCPL_NOPROFILEPAGE = 'NoProfilePage';
+ {$EXTERNALSYM REGSTR_VAL_SECCPL_NOPROFILEPAGE}
+ REGSTR_VAL_PRINTERS_HIDETABS = 'NoPrinterTabs';
+ {$EXTERNALSYM REGSTR_VAL_PRINTERS_HIDETABS}
+ REGSTR_VAL_PRINTERS_NODELETE = 'NoDeletePrinter';
+ {$EXTERNALSYM REGSTR_VAL_PRINTERS_NODELETE}
+ REGSTR_VAL_PRINTERS_NOADD = 'NoAddPrinter';
+ {$EXTERNALSYM REGSTR_VAL_PRINTERS_NOADD}
+ REGSTR_VAL_WINOLDAPP_DISABLED = 'Disabled';
+ {$EXTERNALSYM REGSTR_VAL_WINOLDAPP_DISABLED}
+ REGSTR_VAL_WINOLDAPP_NOREALMODE = 'NoRealMode';
+ {$EXTERNALSYM REGSTR_VAL_WINOLDAPP_NOREALMODE}
+ REGSTR_VAL_NOENTIRENETWORK = 'NoEntireNetwork';
+ {$EXTERNALSYM REGSTR_VAL_NOENTIRENETWORK}
+ REGSTR_VAL_NOWORKGROUPCONTENTS = 'NoWorkgroupContents';
+ {$EXTERNALSYM REGSTR_VAL_NOWORKGROUPCONTENTS}
+
+// (following are values REG_DWORD, legal values 0 or 1, treat as TEXT("1") if value not present)
+// policies under Policies\SYSTEM key
+ REGSTR_VAL_UNDOCK_WITHOUT_LOGON = 'UndockWithoutLogon';
+ {$EXTERNALSYM REGSTR_VAL_UNDOCK_WITHOUT_LOGON}
+
+// REG_DWORD, 0=off, otherwise value is minimum # of chars to allow in password
+
+ REGSTR_VAL_MINPWDLEN = 'MinPwdLen';
+ {$EXTERNALSYM REGSTR_VAL_MINPWDLEN}
+
+// REG_DWORD, 0=off, otherwise value is # of days for pwd to expire
+
+ REGSTR_VAL_PWDEXPIRATION = 'PwdExpiration';
+ {$EXTERNALSYM REGSTR_VAL_PWDEXPIRATION}
+
+ REGSTR_VAL_WIN31PROVIDER = 'Win31Provider'; // REG_SZ
+ {$EXTERNALSYM REGSTR_VAL_WIN31PROVIDER}
+
+// policies under SYSTEM key
+
+ REGSTR_VAL_DISABLEREGTOOLS = 'DisableRegistryTools';
+ {$EXTERNALSYM REGSTR_VAL_DISABLEREGTOOLS}
+
+ REGSTR_PATH_WINLOGON = 'Software\Microsoft\Windows\CurrentVersion\Winlogon';
+ {$EXTERNALSYM REGSTR_PATH_WINLOGON}
+ REGSTR_VAL_LEGALNOTICECAPTION = 'LegalNoticeCaption'; // REG_SZ
+ {$EXTERNALSYM REGSTR_VAL_LEGALNOTICECAPTION}
+ REGSTR_VAL_LEGALNOTICETEXT = 'LegalNoticeText'; // REG_SZ
+ {$EXTERNALSYM REGSTR_VAL_LEGALNOTICETEXT}
+ REGSTR_VAL_DRIVE_SPINDOWN = 'NoDispSpinDown';
+ {$EXTERNALSYM REGSTR_VAL_DRIVE_SPINDOWN}
+
+ REGSTR_VAL_RESTRICTRUN = 'RestrictRun';
+ {$EXTERNALSYM REGSTR_VAL_RESTRICTRUN}
+
+//
+// Entries in policy file. (Won't be in local registry, only policy hive)
+
+ REGSTR_KEY_POL_USERS = 'Users';
+ {$EXTERNALSYM REGSTR_KEY_POL_USERS}
+ REGSTR_KEY_POL_COMPUTERS = 'Computers';
+ {$EXTERNALSYM REGSTR_KEY_POL_COMPUTERS}
+ REGSTR_KEY_POL_USERGROUPS = 'UserGroups';
+ {$EXTERNALSYM REGSTR_KEY_POL_USERGROUPS}
+ REGSTR_KEY_POL_DEFAULT = '.default';
+ {$EXTERNALSYM REGSTR_KEY_POL_DEFAULT}
+ REGSTR_KEY_POL_USERGROUPDATA = 'GroupData\UserGroups\Priority';
+ {$EXTERNALSYM REGSTR_KEY_POL_USERGROUPDATA}
+
+//
+// Entries for time zone information under LOCAL_MACHINE
+//
+
+ REGSTR_PATH_TIMEZONE = 'System\CurrentControlSet\Control\TimeZoneInformation';
+ {$EXTERNALSYM REGSTR_PATH_TIMEZONE}
+ REGSTR_VAL_TZBIAS = 'Bias';
+ {$EXTERNALSYM REGSTR_VAL_TZBIAS}
+ REGSTR_VAL_TZDLTBIAS = 'DaylightBias';
+ {$EXTERNALSYM REGSTR_VAL_TZDLTBIAS}
+ REGSTR_VAL_TZSTDBIAS = 'StandardBias';
+ {$EXTERNALSYM REGSTR_VAL_TZSTDBIAS}
+ REGSTR_VAL_TZACTBIAS = 'ActiveTimeBias';
+ {$EXTERNALSYM REGSTR_VAL_TZACTBIAS}
+ REGSTR_VAL_TZDLTFLAG = 'DaylightFlag';
+ {$EXTERNALSYM REGSTR_VAL_TZDLTFLAG}
+ REGSTR_VAL_TZSTDSTART = 'StandardStart';
+ {$EXTERNALSYM REGSTR_VAL_TZSTDSTART}
+ REGSTR_VAL_TZDLTSTART = 'DaylightStart';
+ {$EXTERNALSYM REGSTR_VAL_TZDLTSTART}
+ REGSTR_VAL_TZDLTNAME = 'DaylightName';
+ {$EXTERNALSYM REGSTR_VAL_TZDLTNAME}
+ REGSTR_VAL_TZSTDNAME = 'StandardName';
+ {$EXTERNALSYM REGSTR_VAL_TZSTDNAME}
+ REGSTR_VAL_TZNOCHANGESTART = 'NoChangeStart';
+ {$EXTERNALSYM REGSTR_VAL_TZNOCHANGESTART}
+ REGSTR_VAL_TZNOCHANGEEND = 'NoChangeEnd';
+ {$EXTERNALSYM REGSTR_VAL_TZNOCHANGEEND}
+ REGSTR_VAL_TZNOAUTOTIME = 'DisableAutoDaylightTimeSet';
+ {$EXTERNALSYM REGSTR_VAL_TZNOAUTOTIME}
+
+//
+// Entries for floating point processor existence under LOCAL_MACHINE
+//
+
+ REGSTR_PATH_FLOATINGPOINTPROCESSOR = 'HARDWARE\DESCRIPTION\System\FloatingPointProcessor';
+ {$EXTERNALSYM REGSTR_PATH_FLOATINGPOINTPROCESSOR}
+ REGSTR_PATH_FLOATINGPOINTPROCESSOR0 = 'HARDWARE\DESCRIPTION\System\FloatingPointProcessor\0';
+ {$EXTERNALSYM REGSTR_PATH_FLOATINGPOINTPROCESSOR0}
+
+//
+// Entries for computer name under LOCAL_MACHINE
+//
+
+ REGSTR_PATH_COMPUTRNAME = 'System\CurrentControlSet\Control\ComputerName\ComputerName';
+ {$EXTERNALSYM REGSTR_PATH_COMPUTRNAME}
+ REGSTR_VAL_COMPUTRNAME = 'ComputerName';
+ {$EXTERNALSYM REGSTR_VAL_COMPUTRNAME}
+
+// Entry so that we force a reboot on shutdown / single instance dos app
+
+ REGSTR_PATH_SHUTDOWN = 'System\CurrentControlSet\Control\Shutdown';
+ {$EXTERNALSYM REGSTR_PATH_SHUTDOWN}
+ REGSTR_VAL_FORCEREBOOT = 'ForceReboot';
+ {$EXTERNALSYM REGSTR_VAL_FORCEREBOOT}
+ REGSTR_VAL_SETUPPROGRAMRAN = 'SetupProgramRan';
+ {$EXTERNALSYM REGSTR_VAL_SETUPPROGRAMRAN}
+ REGSTR_VAL_DOES_POLLING = 'PollingSupportNeeded';
+ {$EXTERNALSYM REGSTR_VAL_DOES_POLLING}
+
+//
+// Entries for known system DLLs under LOCAL_MACHINE
+//
+// The VAL keys here are the actual DLL names (FOO.DLL)
+//
+
+ REGSTR_PATH_KNOWNDLLS = 'System\CurrentControlSet\Control\SessionManager\KnownDLLs';
+ {$EXTERNALSYM REGSTR_PATH_KNOWNDLLS}
+ REGSTR_PATH_KNOWN16DLLS = 'System\CurrentControlSet\Control\SessionManager\Known16DLLs';
+ {$EXTERNALSYM REGSTR_PATH_KNOWN16DLLS}
+
+// Entries here for system dlls we need to version check in case overwritten
+
+ REGSTR_PATH_CHECKVERDLLS = 'System\CurrentControlSet\Control\SessionManager\CheckVerDLLs';
+ {$EXTERNALSYM REGSTR_PATH_CHECKVERDLLS}
+ REGSTR_PATH_WARNVERDLLS = 'System\CurrentControlSet\Control\SessionManager\WarnVerDLLs';
+ {$EXTERNALSYM REGSTR_PATH_WARNVERDLLS}
+
+// Entries here for app ini files we (msgsrv32) need to hack
+
+ REGSTR_PATH_HACKINIFILE = 'System\CurrentControlSet\Control\SessionManager\HackIniFiles';
+ {$EXTERNALSYM REGSTR_PATH_HACKINIFILE}
+
+// Keys here for bad applications we want to warn the user about before running
+
+ REGSTR_PATH_CHECKBADAPPS = 'System\CurrentControlSet\Control\SessionManager\CheckBadApps';
+ {$EXTERNALSYM REGSTR_PATH_CHECKBADAPPS}
+
+// Keys here for applications we need to patch
+
+ REGSTR_PATH_APPPATCH = 'System\CurrentControlSet\Control\SessionManager\AppPatches';
+ {$EXTERNALSYM REGSTR_PATH_APPPATCH}
+
+ REGSTR_PATH_CHECKBADAPPS400 = 'System\CurrentControlSet\Control\SessionManager\CheckBadApps400';
+ {$EXTERNALSYM REGSTR_PATH_CHECKBADAPPS400}
+
+ REGSTR_PATH_SHELLSERVICEOBJECT = 'Software\Microsoft\Windows\CurrentVersion\ShellServiceObject';
+ {$EXTERNALSYM REGSTR_PATH_SHELLSERVICEOBJECT}
+ REGSTR_PATH_SHELLSERVICEOBJECTDELAYED = 'Software\Microsoft\Windows\CurrentVersion\ShellServiceObjectDelayLoad';
+ {$EXTERNALSYM REGSTR_PATH_SHELLSERVICEOBJECTDELAYED}
+
+//
+// Entries for known system VxDs under LOCAL_MACHINE
+//
+// The VAL keys here are the full path names of VxDs (c:\app\vapp.vxd)
+// It is suggested that the keynames be the same as the module name of
+// the VxD.
+// This section is used to dyna-load VxDs with
+// CreateFile(\.\vxd_regstr_keyname).
+//
+
+ REGSTR_PATH_KNOWNVXDS = 'System\CurrentControlSet\Control\SessionManager\KnownVxDs';
+ {$EXTERNALSYM REGSTR_PATH_KNOWNVXDS}
+
+//
+// Entries for values in uninstaller keys under REGSTR_PATH_UNINSTALL \ appname
+//
+
+ REGSTR_VAL_UNINSTALLER_DISPLAYNAME = 'DisplayName';
+ {$EXTERNALSYM REGSTR_VAL_UNINSTALLER_DISPLAYNAME}
+ REGSTR_VAL_UNINSTALLER_COMMANDLINE = 'UninstallString';
+ {$EXTERNALSYM REGSTR_VAL_UNINSTALLER_COMMANDLINE}
+
+//
+// Entries for values in uninstaller keys under REGSTR_PATH_REINSTALL \ instanceid
+//
+
+ REGSTR_VAL_REINSTALL_DISPLAYNAME = 'DisplayName';
+ {$EXTERNALSYM REGSTR_VAL_REINSTALL_DISPLAYNAME}
+ REGSTR_VAL_REINSTALL_STRING = 'ReinstallString';
+ {$EXTERNALSYM REGSTR_VAL_REINSTALL_STRING}
+ REGSTR_VAL_REINSTALL_DEVICEINSTANCEIDS = 'DeviceInstanceIds';
+ {$EXTERNALSYM REGSTR_VAL_REINSTALL_DEVICEINSTANCEIDS}
+
+//
+// Entries for known per user settings: Under HKEY_CURRENT_USER
+//
+
+ REGSTR_PATH_DESKTOP = REGSTR_PATH_SCREENSAVE;
+ {$EXTERNALSYM REGSTR_PATH_DESKTOP}
+ REGSTR_PATH_MOUSE = 'Control Panel\Mouse';
+ {$EXTERNALSYM REGSTR_PATH_MOUSE}
+ REGSTR_PATH_KEYBOARD = 'Control Panel\Keyboard';
+ {$EXTERNALSYM REGSTR_PATH_KEYBOARD}
+ REGSTR_PATH_COLORS = 'Control Panel\Colors';
+ {$EXTERNALSYM REGSTR_PATH_COLORS}
+ REGSTR_PATH_SOUND = 'Control Panel\Sound';
+ {$EXTERNALSYM REGSTR_PATH_SOUND}
+ REGSTR_PATH_METRICS = 'Control Panel\Desktop\WindowMetrics';
+ {$EXTERNALSYM REGSTR_PATH_METRICS}
+ REGSTR_PATH_ICONS = 'Control Panel\Icons';
+ {$EXTERNALSYM REGSTR_PATH_ICONS}
+ REGSTR_PATH_CURSORS = 'Control Panel\Cursors';
+ {$EXTERNALSYM REGSTR_PATH_CURSORS}
+ REGSTR_PATH_CHECKDISK = 'Software\Microsoft\Windows\CurrentVersion\Applets\Check Drive';
+ {$EXTERNALSYM REGSTR_PATH_CHECKDISK}
+ REGSTR_PATH_CHECKDISKSET = 'Settings';
+ {$EXTERNALSYM REGSTR_PATH_CHECKDISKSET}
+ REGSTR_PATH_CHECKDISKUDRVS = 'NoUnknownDDErrDrvs';
+ {$EXTERNALSYM REGSTR_PATH_CHECKDISKUDRVS}
+
+//
+// Entries under REGSTR_PATH_FAULT
+//
+
+ REGSTR_PATH_FAULT = 'Software\Microsoft\Windows\CurrentVersion\Fault';
+ {$EXTERNALSYM REGSTR_PATH_FAULT}
+ REGSTR_VAL_FAULT_LOGFILE = 'LogFile';
+ {$EXTERNALSYM REGSTR_VAL_FAULT_LOGFILE}
+
+//
+// Entries under REGSTR_PATH_AEDEBUG
+//
+
+ REGSTR_PATH_AEDEBUG = 'Software\Microsoft\Windows NT\CurrentVersion\AeDebug';
+ {$EXTERNALSYM REGSTR_PATH_AEDEBUG}
+ REGSTR_VAL_AEDEBUG_DEBUGGER = 'Debugger';
+ {$EXTERNALSYM REGSTR_VAL_AEDEBUG_DEBUGGER}
+ REGSTR_VAL_AEDEBUG_AUTO = 'Auto';
+ {$EXTERNALSYM REGSTR_VAL_AEDEBUG_AUTO}
+
+//
+// Entries under REGSTR_PATH_GRPCONV
+//
+
+ REGSTR_PATH_GRPCONV = 'Software\Microsoft\Windows\CurrentVersion\GrpConv';
+ {$EXTERNALSYM REGSTR_PATH_GRPCONV}
+
+//
+// Entries under the RegItem key in a shell namespace
+//
+
+ REGSTR_VAL_REGITEMDELETEMESSAGE = 'Removal Message';
+ {$EXTERNALSYM REGSTR_VAL_REGITEMDELETEMESSAGE}
+
+//
+// Entries for the Drives Tools page
+//
+// NOTE that these items are not recorded for removable drives. These
+// keys record X=DSKTLSYSTEMTIME where X is the drive letter. Since
+// these tools actually work on the disk in the drive, as opposed to
+// the drive itself, it is pointless to record them on a removable media
+// since if a different disk is inserted in the drive, the data is
+// meaningless.
+//
+
+ REGSTR_PATH_LASTCHECK = 'Software\Microsoft\Windows\CurrentVersion\Explorer\LastCheck';
+ {$EXTERNALSYM REGSTR_PATH_LASTCHECK}
+ REGSTR_PATH_LASTOPTIMIZE = 'Software\Microsoft\Windows\CurrentVersion\Explorer\LastOptimize';
+ {$EXTERNALSYM REGSTR_PATH_LASTOPTIMIZE}
+ REGSTR_PATH_LASTBACKUP = 'Software\Microsoft\Windows\CurrentVersion\Explorer\LastBackup';
+ {$EXTERNALSYM REGSTR_PATH_LASTBACKUP}
+
+//
+// The above 3 keys record with the registry value of the drive letter
+// a SYSTEMTIME structure
+//
+
+//
+// Entries under HKEY_LOCAL_MACHINE for Check Drive specific stuff
+//
+
+ REGSTR_PATH_CHKLASTCHECK = 'Software\Microsoft\Windows\CurrentVersion\Applets\Check Drive\LastCheck';
+ {$EXTERNALSYM REGSTR_PATH_CHKLASTCHECK}
+ REGSTR_PATH_CHKLASTSURFAN = 'Software\Microsoft\Windows\CurrentVersion\Applets\Check Drive\LastSurfaceAnalysis';
+ {$EXTERNALSYM REGSTR_PATH_CHKLASTSURFAN}
+
+//
+// The above 2 keys record the following binary structure which is
+// a system time structure with the addition of a result code field.
+// Note that the time part of REGSTR_PATH_CHKLASTCHECK is effectively
+// identical to REGSTR_PATH_LASTCHECK under the explorer key
+//
+
+type
+ _DSKTLSYSTEMTIME = packed record
+ wYear: WORD;
+ wMonth: WORD;
+ wDayOfWeek: WORD;
+ wDay: WORD;
+ wHour: WORD;
+ wMinute: WORD;
+ wSecond: WORD;
+ wMilliseconds: WORD;
+ wResult: WORD;
+ end;
+ {$EXTERNALSYM _DSKTLSYSTEMTIME}
+ DSKTLSYSTEMTIME = _DSKTLSYSTEMTIME;
+ {$EXTERNALSYM DSKTLSYSTEMTIME}
+ PDSKTLSYSTEMTIME = ^DSKTLSYSTEMTIME;
+ {$EXTERNALSYM PDSKTLSYSTEMTIME}
+ LPDSKTLSYSTEMTIME = ^DSKTLSYSTEMTIME;
+ {$EXTERNALSYM LPDSKTLSYSTEMTIME}
+ TDsktlSystemTime = _DSKTLSYSTEMTIME;
+
+//
+// The following are defines for the wResult field
+//
+
+const
+ DTRESULTOK = 0; // Operation was successful, no errors
+ {$EXTERNALSYM DTRESULTOK}
+ DTRESULTFIX = 1; // Operation was successful, errors were found
+ {$EXTERNALSYM DTRESULTFIX}
+ // but all were fixed.
+ DTRESULTPROB = 2; // Operation was not successful or errors
+ {$EXTERNALSYM DTRESULTPROB}
+ // were found and some or all were not fixed.
+ DTRESULTPART = 3; // Operation was partially completed but was
+ {$EXTERNALSYM DTRESULTPART}
+ // terminated either by the user or an error.
+
+//
+// Entries for persistent shares
+//
+
+ REGSTR_KEY_SHARES = 'Software\Microsoft\Windows\CurrentVersion\Network\LanMan';
+ {$EXTERNALSYM REGSTR_KEY_SHARES}
+ REGSTR_VAL_SHARES_FLAGS = 'Flags';
+ {$EXTERNALSYM REGSTR_VAL_SHARES_FLAGS}
+ REGSTR_VAL_SHARES_TYPE = 'Type';
+ {$EXTERNALSYM REGSTR_VAL_SHARES_TYPE}
+ REGSTR_VAL_SHARES_PATH = 'Path';
+ {$EXTERNALSYM REGSTR_VAL_SHARES_PATH}
+ REGSTR_VAL_SHARES_REMARK = 'Remark';
+ {$EXTERNALSYM REGSTR_VAL_SHARES_REMARK}
+ REGSTR_VAL_SHARES_RW_PASS = 'Parm1';
+ {$EXTERNALSYM REGSTR_VAL_SHARES_RW_PASS}
+ REGSTR_VAL_SHARES_RO_PASS = 'Parm2';
+ {$EXTERNALSYM REGSTR_VAL_SHARES_RO_PASS}
+
+//
+// Entries for printer settings under LOCAL_MACHINE
+//
+
+ REGSTR_PATH_PRINT = 'System\CurrentControlSet\Control\Print';
+ {$EXTERNALSYM REGSTR_PATH_PRINT}
+ REGSTR_PATH_PRINTERS = 'System\CurrentControlSet\Control\Print\Printers';
+ {$EXTERNALSYM REGSTR_PATH_PRINTERS}
+ REGSTR_PATH_PROVIDERS = 'System\CurrentControlSet\Control\Print\Providers';
+ {$EXTERNALSYM REGSTR_PATH_PROVIDERS}
+ REGSTR_PATH_MONITORS = 'System\CurrentControlSet\Control\Print\Monitors';
+ {$EXTERNALSYM REGSTR_PATH_MONITORS}
+ REGSTR_PATH_ENVIRONMENTS = 'System\CurrentControlSet\Control\Print\Environments';
+ {$EXTERNALSYM REGSTR_PATH_ENVIRONMENTS}
+ REGSTR_VAL_START_ON_BOOT = 'StartOnBoot';
+ {$EXTERNALSYM REGSTR_VAL_START_ON_BOOT}
+ REGSTR_VAL_PRINTERS_MASK = 'PrintersMask';
+ {$EXTERNALSYM REGSTR_VAL_PRINTERS_MASK}
+ REGSTR_VAL_DOS_SPOOL_MASK = 'DOSSpoolMask';
+ {$EXTERNALSYM REGSTR_VAL_DOS_SPOOL_MASK}
+ REGSTR_KEY_CURRENT_ENV = '\Windows 4.0';
+ {$EXTERNALSYM REGSTR_KEY_CURRENT_ENV}
+ REGSTR_KEY_DRIVERS = '\Drivers';
+ {$EXTERNALSYM REGSTR_KEY_DRIVERS}
+ REGSTR_KEY_PRINT_PROC = '\Print Processors';
+ {$EXTERNALSYM REGSTR_KEY_PRINT_PROC}
+
+//
+// Entries for MultiMedia under HKEY_CURRENT_USER
+//
+
+ REGSTR_PATH_EVENTLABELS = 'AppEvents\EventLabels';
+ {$EXTERNALSYM REGSTR_PATH_EVENTLABELS}
+ REGSTR_PATH_SCHEMES = 'AppEvents\Schemes';
+ {$EXTERNALSYM REGSTR_PATH_SCHEMES}
+ REGSTR_PATH_APPS = REGSTR_PATH_SCHEMES + '\Apps';
+ {$EXTERNALSYM REGSTR_PATH_APPS}
+ REGSTR_PATH_APPS_DEFAULT = REGSTR_PATH_SCHEMES + '\Apps\.Default';
+ {$EXTERNALSYM REGSTR_PATH_APPS_DEFAULT}
+ REGSTR_PATH_NAMES = REGSTR_PATH_SCHEMES + '\Names';
+ {$EXTERNALSYM REGSTR_PATH_NAMES}
+ REGSTR_PATH_MULTIMEDIA = REGSTR_PATH_SETUP + '\Multimedia';
+ {$EXTERNALSYM REGSTR_PATH_MULTIMEDIA}
+ REGSTR_PATH_MULTIMEDIA_AUDIO = 'Software\Microsoft\Multimedia\Audio';
+ {$EXTERNALSYM REGSTR_PATH_MULTIMEDIA_AUDIO}
+ REGSTR_PATH_MULTIMEDIA_AUDIO_IMAGES = REGSTR_PATH_MULTIMEDIA_AUDIO + '\Images';
+ {$EXTERNALSYM REGSTR_PATH_MULTIMEDIA_AUDIO_IMAGES}
+
+//
+// Entries for MultiMedia under HKEY_LOCAL_MACHINE
+//
+
+ REGSTR_PATH_MEDIARESOURCES = REGSTR_PATH_CURRENT_CONTROL_SET + '\MediaResources';
+ {$EXTERNALSYM REGSTR_PATH_MEDIARESOURCES}
+ REGSTR_PATH_MEDIAPROPERTIES = REGSTR_PATH_CURRENT_CONTROL_SET + '\MediaProperties';
+ {$EXTERNALSYM REGSTR_PATH_MEDIAPROPERTIES}
+ REGSTR_PATH_PRIVATEPROPERTIES = REGSTR_PATH_MEDIAPROPERTIES + '\PrivateProperties';
+ {$EXTERNALSYM REGSTR_PATH_PRIVATEPROPERTIES}
+ REGSTR_PATH_PUBLICPROPERTIES = REGSTR_PATH_MEDIAPROPERTIES + '\PublicProperties';
+ {$EXTERNALSYM REGSTR_PATH_PUBLICPROPERTIES}
+
+// joysticks
+
+ REGSTR_PATH_JOYOEM = REGSTR_PATH_PRIVATEPROPERTIES + '\Joystick\OEM';
+ {$EXTERNALSYM REGSTR_PATH_JOYOEM}
+ REGSTR_PATH_JOYCONFIG = REGSTR_PATH_MEDIARESOURCES + '\Joystick';
+ {$EXTERNALSYM REGSTR_PATH_JOYCONFIG}
+ REGSTR_KEY_JOYCURR = 'CurrentJoystickSettings';
+ {$EXTERNALSYM REGSTR_KEY_JOYCURR}
+ REGSTR_KEY_JOYSETTINGS = 'JoystickSettings';
+ {$EXTERNALSYM REGSTR_KEY_JOYSETTINGS}
+
+// joystick values found under REGSTR_PATH_JOYCONFIG
+
+ REGSTR_VAL_JOYUSERVALUES = 'JoystickUserValues';
+ {$EXTERNALSYM REGSTR_VAL_JOYUSERVALUES}
+ REGSTR_VAL_JOYCALLOUT = 'JoystickCallout';
+ {$EXTERNALSYM REGSTR_VAL_JOYCALLOUT}
+
+// joystick values found under REGSTR_KEY_JOYCURR and REGSTR_KEY_JOYSETTINGS
+
+ REGSTR_VAL_JOYNCONFIG = 'Joystick%dConfiguration';
+ {$EXTERNALSYM REGSTR_VAL_JOYNCONFIG}
+ REGSTR_VAL_JOYNOEMNAME = 'Joystick%dOEMName';
+ {$EXTERNALSYM REGSTR_VAL_JOYNOEMNAME}
+ REGSTR_VAL_JOYNOEMCALLOUT = 'Joystick%dOEMCallout';
+ {$EXTERNALSYM REGSTR_VAL_JOYNOEMCALLOUT}
+
+// joystick values found under keys under REGSTR_PATH_JOYOEM
+
+ REGSTR_VAL_JOYOEMCALLOUT = 'OEMCallout';
+ {$EXTERNALSYM REGSTR_VAL_JOYOEMCALLOUT}
+ REGSTR_VAL_JOYOEMNAME = 'OEMName';
+ {$EXTERNALSYM REGSTR_VAL_JOYOEMNAME}
+ REGSTR_VAL_JOYOEMDATA = 'OEMData';
+ {$EXTERNALSYM REGSTR_VAL_JOYOEMDATA}
+ REGSTR_VAL_JOYOEMXYLABEL = 'OEMXYLabel';
+ {$EXTERNALSYM REGSTR_VAL_JOYOEMXYLABEL}
+ REGSTR_VAL_JOYOEMZLABEL = 'OEMZLabel';
+ {$EXTERNALSYM REGSTR_VAL_JOYOEMZLABEL}
+ REGSTR_VAL_JOYOEMRLABEL = 'OEMRLabel';
+ {$EXTERNALSYM REGSTR_VAL_JOYOEMRLABEL}
+ REGSTR_VAL_JOYOEMPOVLABEL = 'OEMPOVLabel';
+ {$EXTERNALSYM REGSTR_VAL_JOYOEMPOVLABEL}
+ REGSTR_VAL_JOYOEMULABEL = 'OEMULabel';
+ {$EXTERNALSYM REGSTR_VAL_JOYOEMULABEL}
+ REGSTR_VAL_JOYOEMVLABEL = 'OEMVLabel';
+ {$EXTERNALSYM REGSTR_VAL_JOYOEMVLABEL}
+ REGSTR_VAL_JOYOEMTESTMOVEDESC = 'OEMTestMoveDesc';
+ {$EXTERNALSYM REGSTR_VAL_JOYOEMTESTMOVEDESC}
+ REGSTR_VAL_JOYOEMTESTBUTTONDESC = 'OEMTestButtonDesc';
+ {$EXTERNALSYM REGSTR_VAL_JOYOEMTESTBUTTONDESC}
+ REGSTR_VAL_JOYOEMTESTMOVECAP = 'OEMTestMoveCap';
+ {$EXTERNALSYM REGSTR_VAL_JOYOEMTESTMOVECAP}
+ REGSTR_VAL_JOYOEMTESTBUTTONCAP = 'OEMTestButtonCap';
+ {$EXTERNALSYM REGSTR_VAL_JOYOEMTESTBUTTONCAP}
+ REGSTR_VAL_JOYOEMTESTWINCAP = 'OEMTestWinCap';
+ {$EXTERNALSYM REGSTR_VAL_JOYOEMTESTWINCAP}
+ REGSTR_VAL_JOYOEMCALCAP = 'OEMCalCap';
+ {$EXTERNALSYM REGSTR_VAL_JOYOEMCALCAP}
+ REGSTR_VAL_JOYOEMCALWINCAP = 'OEMCalWinCap';
+ {$EXTERNALSYM REGSTR_VAL_JOYOEMCALWINCAP}
+ REGSTR_VAL_JOYOEMCAL1 = 'OEMCal1';
+ {$EXTERNALSYM REGSTR_VAL_JOYOEMCAL1}
+ REGSTR_VAL_JOYOEMCAL2 = 'OEMCal2';
+ {$EXTERNALSYM REGSTR_VAL_JOYOEMCAL2}
+ REGSTR_VAL_JOYOEMCAL3 = 'OEMCal3';
+ {$EXTERNALSYM REGSTR_VAL_JOYOEMCAL3}
+ REGSTR_VAL_JOYOEMCAL4 = 'OEMCal4';
+ {$EXTERNALSYM REGSTR_VAL_JOYOEMCAL4}
+ REGSTR_VAL_JOYOEMCAL5 = 'OEMCal5';
+ {$EXTERNALSYM REGSTR_VAL_JOYOEMCAL5}
+ REGSTR_VAL_JOYOEMCAL6 = 'OEMCal6';
+ {$EXTERNALSYM REGSTR_VAL_JOYOEMCAL6}
+ REGSTR_VAL_JOYOEMCAL7 = 'OEMCal7';
+ {$EXTERNALSYM REGSTR_VAL_JOYOEMCAL7}
+ REGSTR_VAL_JOYOEMCAL8 = 'OEMCal8';
+ {$EXTERNALSYM REGSTR_VAL_JOYOEMCAL8}
+ REGSTR_VAL_JOYOEMCAL9 = 'OEMCal9';
+ {$EXTERNALSYM REGSTR_VAL_JOYOEMCAL9}
+ REGSTR_VAL_JOYOEMCAL10 = 'OEMCal10';
+ {$EXTERNALSYM REGSTR_VAL_JOYOEMCAL10}
+ REGSTR_VAL_JOYOEMCAL11 = 'OEMCal11';
+ {$EXTERNALSYM REGSTR_VAL_JOYOEMCAL11}
+ REGSTR_VAL_JOYOEMCAL12 = 'OEMCal12';
+ {$EXTERNALSYM REGSTR_VAL_JOYOEMCAL12}
+
+// Image values under REGSTR_PATH_MULTIMEDIA_AUDIO_IMAGES
+
+ REGSTR_VAL_AUDIO_BITMAP = 'bitmap';
+ {$EXTERNALSYM REGSTR_VAL_AUDIO_BITMAP}
+ REGSTR_VAL_AUDIO_ICON = 'icon';
+ {$EXTERNALSYM REGSTR_VAL_AUDIO_ICON}
+
+//
+// Entries for Device Installer under HKEY_CURRENT_USER
+//
+
+ REGSTR_PATH_DEVICEINSTALLER = 'Software\Microsoft\Windows\CurrentVersion\Device Installer';
+ {$EXTERNALSYM REGSTR_PATH_DEVICEINSTALLER}
+
+// Device Installer values found under REGSTR_PATH_DEVICEINSTALLER
+
+ REGSTR_VAL_SEARCHOPTIONS = 'SearchOptions';
+ {$EXTERNALSYM REGSTR_VAL_SEARCHOPTIONS}
+
+// BiosInfo defines.
+
+ {$IFDEF _KERNEL_PNPI_}
+ REGSTR_PATH_BIOSINFO = '\Registry\Machine\System\CurrentControlSet\Control\BiosInfo';
+ {$EXTERNALSYM REGSTR_PATH_BIOSINFO}
+ {$ELSE}
+ REGSTR_PATH_BIOSINFO = 'System\CurrentControlSet\Control\BiosInfo';
+ {$EXTERNALSYM REGSTR_PATH_BIOSINFO}
+ {$ENDIF _KERNEL_PNPI_}
+
+// Pci Irq Routing registry defines.
+
+ {$IFDEF _KERNEL_PNPI_}
+ REGSTR_PATH_PCIIR = '\Registry\Machine\System\CurrentControlSet\Control\Pnp\PciIrqRouting';
+ {$EXTERNALSYM REGSTR_PATH_PCIIR}
+ REGSTR_VAL_OPTIONS = 'Options';
+ {$EXTERNALSYM REGSTR_VAL_OPTIONS}
+ REGSTR_VAL_STAT = 'Status';
+ {$EXTERNALSYM REGSTR_VAL_STAT}
+ REGSTR_VAL_TABLE_STAT = 'TableStatus';
+ {$EXTERNALSYM REGSTR_VAL_TABLE_STAT}
+ REGSTR_VAL_MINIPORT_STAT = 'MiniportStatus';
+ {$EXTERNALSYM REGSTR_VAL_MINIPORT_STAT}
+ {$ELSE}
+ REGSTR_PATH_PCIIR = 'System\CurrentControlSet\Control\Pnp\PciIrqRouting';
+ {$EXTERNALSYM REGSTR_PATH_PCIIR}
+ REGSTR_VAL_OPTIONS = 'Options';
+ {$EXTERNALSYM REGSTR_VAL_OPTIONS}
+ REGSTR_VAL_STAT = 'Status';
+ {$EXTERNALSYM REGSTR_VAL_STAT}
+ REGSTR_VAL_TABLE_STAT = 'TableStatus';
+ {$EXTERNALSYM REGSTR_VAL_TABLE_STAT}
+ REGSTR_VAL_MINIPORT_STAT = 'MiniportStatus';
+ {$EXTERNALSYM REGSTR_VAL_MINIPORT_STAT}
+ {$ENDIF _KERNEL_PNPI_}
+
+// Pci Irq Routing Option values.
+
+ PIR_OPTION_ENABLED = $00000001;
+ {$EXTERNALSYM PIR_OPTION_ENABLED}
+ PIR_OPTION_REGISTRY = $00000002;
+ {$EXTERNALSYM PIR_OPTION_REGISTRY}
+ PIR_OPTION_MSSPEC = $00000004;
+ {$EXTERNALSYM PIR_OPTION_MSSPEC}
+ PIR_OPTION_REALMODE = $00000008;
+ {$EXTERNALSYM PIR_OPTION_REALMODE}
+ PIR_OPTION_DEFAULT = $0000000f;
+ {$EXTERNALSYM PIR_OPTION_DEFAULT}
+
+// Pci Irq Routing Status values.
+
+ PIR_STATUS_ERROR = $00000000;
+ {$EXTERNALSYM PIR_STATUS_ERROR}
+ PIR_STATUS_ENABLED = $00000001;
+ {$EXTERNALSYM PIR_STATUS_ENABLED}
+ PIR_STATUS_DISABLED = $00000002;
+ {$EXTERNALSYM PIR_STATUS_DISABLED}
+ PIR_STATUS_MAX = $00000003;
+ {$EXTERNALSYM PIR_STATUS_MAX}
+
+ PIR_STATUS_TABLE_REGISTRY = $00000000;
+ {$EXTERNALSYM PIR_STATUS_TABLE_REGISTRY}
+ PIR_STATUS_TABLE_MSSPEC = $00000001;
+ {$EXTERNALSYM PIR_STATUS_TABLE_MSSPEC}
+ PIR_STATUS_TABLE_REALMODE = $00000002;
+ {$EXTERNALSYM PIR_STATUS_TABLE_REALMODE}
+ PIR_STATUS_TABLE_NONE = $00000003;
+ {$EXTERNALSYM PIR_STATUS_TABLE_NONE}
+ PIR_STATUS_TABLE_ERROR = $00000004;
+ {$EXTERNALSYM PIR_STATUS_TABLE_ERROR}
+ PIR_STATUS_TABLE_BAD = $00000005;
+ {$EXTERNALSYM PIR_STATUS_TABLE_BAD}
+ PIR_STATUS_TABLE_SUCCESS = $00000006;
+ {$EXTERNALSYM PIR_STATUS_TABLE_SUCCESS}
+ PIR_STATUS_TABLE_MAX = $00000007;
+ {$EXTERNALSYM PIR_STATUS_TABLE_MAX}
+
+ PIR_STATUS_MINIPORT_NORMAL = $00000000;
+ {$EXTERNALSYM PIR_STATUS_MINIPORT_NORMAL}
+ PIR_STATUS_MINIPORT_COMPATIBLE = $00000001;
+ {$EXTERNALSYM PIR_STATUS_MINIPORT_COMPATIBLE}
+ PIR_STATUS_MINIPORT_OVERRIDE = $00000002;
+ {$EXTERNALSYM PIR_STATUS_MINIPORT_OVERRIDE}
+ PIR_STATUS_MINIPORT_NONE = $00000003;
+ {$EXTERNALSYM PIR_STATUS_MINIPORT_NONE}
+ PIR_STATUS_MINIPORT_ERROR = $00000004;
+ {$EXTERNALSYM PIR_STATUS_MINIPORT_ERROR}
+ PIR_STATUS_MINIPORT_NOKEY = $00000005;
+ {$EXTERNALSYM PIR_STATUS_MINIPORT_NOKEY}
+ PIR_STATUS_MINIPORT_SUCCESS = $00000006;
+ {$EXTERNALSYM PIR_STATUS_MINIPORT_SUCCESS}
+ PIR_STATUS_MINIPORT_INVALID = $00000007;
+ {$EXTERNALSYM PIR_STATUS_MINIPORT_INVALID}
+ PIR_STATUS_MINIPORT_MAX = $00000008;
+ {$EXTERNALSYM PIR_STATUS_MINIPORT_MAX}
+
+//
+// entries for LastKnownGood
+// each value name under this key is SubPath/File (note reversal of '\\' to '/')
+// each value is an indication of post-processing to be done after files have been recovered
+// LASTGOOD_OPERATION bits indicate the primary post-processing operation
+// remaining bits may be used as flags (allocate flags from highest bits first)
+// a value of 0 is the same as the value being omitted, ie, no post processing.
+//
+
+ REGSTR_PATH_LASTGOOD = 'System\LastKnownGoodRecovery\LastGood';
+ {$EXTERNALSYM REGSTR_PATH_LASTGOOD}
+ REGSTR_PATH_LASTGOODTMP = 'System\LastKnownGoodRecovery\LastGood.Tmp';
+ {$EXTERNALSYM REGSTR_PATH_LASTGOODTMP}
+
+ LASTGOOD_OPERATION = $000000FF; // operation to perform
+ {$EXTERNALSYM LASTGOOD_OPERATION}
+ LASTGOOD_OPERATION_NOPOSTPROC = $00000000; // no post-processing
+ {$EXTERNALSYM LASTGOOD_OPERATION_NOPOSTPROC}
+ LASTGOOD_OPERATION_DELETE = $00000001; // Delete file during recovery
+ {$EXTERNALSYM LASTGOOD_OPERATION_DELETE}
+
+implementation
+
+end.
diff --git a/packages/extra/winunits/jwarpc.pas b/packages/extra/winunits/jwarpc.pas
index f72c00a4e8..7d6cf55b52 100644
--- a/packages/extra/winunits/jwarpc.pas
+++ b/packages/extra/winunits/jwarpc.pas
@@ -1,65 +1,65 @@
-{******************************************************************************}
-{ }
-{ RPC API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: rpc.h, released June 2000. The original Pascal }
-{ code is: Rpc.pas, released December 2000. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwarpc.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaRpc;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "Rpc.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-type
- I_RPC_HANDLE = Pointer;
- {$EXTERNALSYM I_RPC_HANDLE}
- RPC_STATUS = Longint;
- {$EXTERNALSYM RPC_STATUS}
-
-implementation
-
-end.
+{******************************************************************************}
+{ }
+{ RPC API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: rpc.h, released June 2000. The original Pascal }
+{ code is: Rpc.pas, released December 2000. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwarpc.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaRpc;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "Rpc.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+type
+ I_RPC_HANDLE = Pointer;
+ {$EXTERNALSYM I_RPC_HANDLE}
+ RPC_STATUS = Longint;
+ {$EXTERNALSYM RPC_STATUS}
+
+implementation
+
+end.
diff --git a/packages/extra/winunits/jwarpcasync.pas b/packages/extra/winunits/jwarpcasync.pas
index 31874e9b6e..babd17f917 100644
--- a/packages/extra/winunits/jwarpcasync.pas
+++ b/packages/extra/winunits/jwarpcasync.pas
@@ -1,714 +1,714 @@
-{******************************************************************************}
-{ }
-{ Asynchronous RPC API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: rpcnasync.h, released August 2001. The original Pascal }
-{ code is: RpcAsync.pas, released December 2000. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwarpcasync.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaRpcASync;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "RpcAsync.h"'}
-{$HPPEMIT ''}
-{$HPPEMIT 'typedef RPC_EXTENDED_ERROR_INFO* PRPC_EXTENDED_ERROR_INFO'}
-{$HPPEMIT 'typedef RPC_ERROR_ENUM_HANDLE* PRPC_ERROR_ENUM_HANDLE'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaRpc, JwaRpcDce, JwaWinBase, JwaWinNT, JwaWinType;
-
-type
- _RPC_NOTIFICATION_TYPES = (
- RpcNotificationTypeNone,
- RpcNotificationTypeEvent,
- RpcNotificationTypeApc,
- RpcNotificationTypeIoc,
- RpcNotificationTypeHwnd,
- RpcNotificationTypeCallback);
- {$EXTERNALSYM _RPC_NOTIFICATION_TYPES}
- RPC_NOTIFICATION_TYPES = _RPC_NOTIFICATION_TYPES;
- {$EXTERNALSYM RPC_NOTIFICATION_TYPES}
- TRpcNotificationTypes = RPC_NOTIFICATION_TYPES;
-
- PFN_RPCNOTIFICATION_ROUTINE = ^RPCNOTIFICATION_ROUTINE;
- {$EXTERNALSYM PFN_RPCNOTIFICATION_ROUTINE}
-
- _RPC_ASYNC_EVENT = (
- RpcCallComplete,
- RpcSendComplete,
- RpcReceiveComplete);
- {$EXTERNALSYM _RPC_ASYNC_EVENT}
- RPC_ASYNC_EVENT = _RPC_ASYNC_EVENT;
- {$EXTERNALSYM RPC_ASYNC_EVENT}
- TRpcASynchEvent = RPC_ASYNC_EVENT;
-
- _RPC_ASYNC_STATE = record
- Size: Cardinal; // size of this structure
- Signature: Cardinal;
- Lock: Longint;
- Flags: Cardinal;
- StubInfo: Pointer;
- UserInfo: Pointer;
- RuntimeInfo: Pointer;
- Event: RPC_ASYNC_EVENT;
-
- NotificationType: RPC_NOTIFICATION_TYPES;
- u: record
- case Integer of
- //
- // Notification by APC
- //
- 0: (
- NotificationRoutine: PFN_RPCNOTIFICATION_ROUTINE;
- hThread: HANDLE);
-
- //
- // Notification by IO completion port
- //
- 1: (
- hIOPort: HANDLE;
- dwNumberOfBytesTransferred: DWORD;
- dwCompletionKey: DWORD_PTR;
- lpOverlapped: LPOVERLAPPED);
-
- //
- // Notification by window message
- //
- 2: (
- hWnd: HWND;
- Msg: UINT);
-
- //
- // Notification by event
- //
- 4: (
- hEvent: HANDLE);
-
- //
- // Notification by callback function
- //
- // This option is available only to OLE
- //
- //5: (
- // NotificationRoutine: PFN_RPCNOTIFICATION_ROUTINE);
- end;
- Reserved: array [0..3] of LONG_PTR;
- end;
- {$EXTERNALSYM _RPC_ASYNC_STATE}
- RPC_ASYNC_STATE = _RPC_ASYNC_STATE;
- {$EXTERNALSYM RPC_ASYNC_STATE}
- PRPC_ASYNC_STATE = ^RPC_ASYNC_STATE;
- {$EXTERNALSYM PRPC_ASYNC_STATE}
- TRpcASynchState = RPC_ASYNC_STATE;
- PRpcASynchState = PRPC_ASYNC_STATE;
-
- RPCNOTIFICATION_ROUTINE = procedure(var pAsync: RPC_ASYNC_STATE;
- Context: Pointer; Event: RPC_ASYNC_EVENT); stdcall;
- {$EXTERNALSYM RPCNOTIFICATION_ROUTINE}
-// PFN_RPCNOTIFICATION_ROUTINE = ^RPCNOTIFICATION_ROUTINE;
-// {$EXTERNALSYM PFN_RPCNOTIFICATION_ROUTINE}
- TRpcNotificationRoutine = RPCNOTIFICATION_ROUTINE;
- PRpcNotificationRoutine = PFN_RPCNOTIFICATION_ROUTINE;
-
-// Possible values for Flags
-
-const
- RPC_C_NOTIFY_ON_SEND_COMPLETE = $1;
- {$EXTERNALSYM RPC_C_NOTIFY_ON_SEND_COMPLETE}
- RPC_C_INFINITE_TIMEOUT = INFINITE;
- {$EXTERNALSYM RPC_C_INFINITE_TIMEOUT}
-
-function RpcAsyncGetCallHandle(var pAsync: RPC_ASYNC_STATE): Pointer;
-{$EXTERNALSYM RpcAsyncGetCallHandle}
-function RpcAsyncInitializeHandle(var pAsync: RPC_ASYNC_STATE; Size: Cardinal): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcAsyncInitializeHandle}
-function RpcAsyncRegisterInfo(var pAsync: RPC_ASYNC_STATE): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcAsyncRegisterInfo}
-function RpcAsyncGetCallStatus(var pAsync: RPC_ASYNC_STATE): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcAsyncGetCallStatus}
-function RpcAsyncCompleteCall(var pAsync: RPC_ASYNC_STATE; Reply: Pointer): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcAsyncCompleteCall}
-function RpcAsyncAbortCall(var pAsync: RPC_ASYNC_STATE; ExceptionCode: Cardinal): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcAsyncAbortCall}
-function RpcAsyncCancelCall(var pAsync: RPC_ASYNC_STATE; fAbort: BOOL): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcAsyncCancelCall}
-function RpcAsyncCleanupThread(dwTimeout: DWORD): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcAsyncCleanupThread}
-
-type
- tagExtendedErrorParamTypes = (
- eeptFiller0,
- eeptAnsiString,
- eeptUnicodeString,
- eeptLongVal,
- eeptShortVal,
- eeptPointerVal,
- eeptNone,
- eeptBinary);
- {$EXTERNALSYM tagExtendedErrorParamTypes}
- ExtendedErrorParamTypes = tagExtendedErrorParamTypes;
- {$EXTERNALSYM ExtendedErrorParamTypes}
- TExtendedErrorParamTypes = ExtendedErrorParamTypes;
-
-const
- MaxNumberOfEEInfoParams = 4;
- {$EXTERNALSYM MaxNumberOfEEInfoParams}
- RPC_EEINFO_VERSION = 1;
- {$EXTERNALSYM RPC_EEINFO_VERSION}
-
-type
- tagBinaryParam = record
- Buffer: Pointer;
- Size: Word;
- end;
- {$EXTERNALSYM tagBinaryParam}
- BinaryParam = tagBinaryParam;
- {$EXTERNALSYM BinaryParam}
- TBinaryParam = BinaryParam;
-
- tagRPC_EE_INFO_PARAM = record
- ParameterType: ExtendedErrorParamTypes;
- case Integer of
- 0: (AnsiString: LPSTR);
- 1: (UnicodeString: LPWSTR);
- 2: (LVal: Longint);
- 3: (SVal: Word);
- 4: (PVal: ULONGLONG);
- 5: (BVal: BinaryParam);
- end;
- {$EXTERNALSYM tagRPC_EE_INFO_PARAM}
- RPC_EE_INFO_PARAM = tagRPC_EE_INFO_PARAM;
- {$EXTERNALSYM RPC_EE_INFO_PARAM}
- TRpcEeInfoParam = RPC_EE_INFO_PARAM;
-
-const
- EEInfoPreviousRecordsMissing = 1;
- {$EXTERNALSYM EEInfoPreviousRecordsMissing}
- EEInfoNextRecordsMissing = 2;
- {$EXTERNALSYM EEInfoNextRecordsMissing}
- EEInfoUseFileTime = 4;
- {$EXTERNALSYM EEInfoUseFileTime}
-
- EEInfoGCCOM = 11;
- {$EXTERNALSYM EEInfoGCCOM}
- EEInfoGCFRS = 12;
- {$EXTERNALSYM EEInfoGCFRS}
-
-type
- tagRPC_EXTENDED_ERROR_INFO = record
- Version: ULONG;
- ComputerName: LPWSTR;
- ProcessID: ULONG;
- u: record
- case Integer of
- 0: ( SystemTime: SYSTEMTIME);
- 1: (FileTime: FILETIME);
- end;
- GeneratingComponent: ULONG;
- Status: ULONG;
- DetectionLocation: USHORT;
- Flags: USHORT;
- NumberOfParameters: Integer;
- Parameters: array [0..MaxNumberOfEEInfoParams - 1] of RPC_EE_INFO_PARAM;
- end;
- {$EXTERNALSYM tagRPC_EXTENDED_ERROR_INFO}
- RPC_EXTENDED_ERROR_INFO = tagRPC_EXTENDED_ERROR_INFO;
- {$EXTERNALSYM RPC_EXTENDED_ERROR_INFO}
- PRPC_EXTENDED_ERROR_INFO = ^RPC_EXTENDED_ERROR_INFO;
- {$NODEFINE PRPC_EXTENDED_ERROR_INFO}
- TRpcExtendedErrorInfo = RPC_EXTENDED_ERROR_INFO;
- PRpcExtendedErrorInfo = ^RPC_EXTENDED_ERROR_INFO;
-
- tagRPC_ERROR_ENUM_HANDLE = record
- Signature: ULONG;
- CurrentPos: Pointer;
- Head: Pointer;
- end;
- {$EXTERNALSYM tagRPC_ERROR_ENUM_HANDLE}
- RPC_ERROR_ENUM_HANDLE = tagRPC_ERROR_ENUM_HANDLE;
- {$EXTERNALSYM RPC_ERROR_ENUM_HANDLE}
- PRPC_ERROR_ENUM_HANDLE = ^RPC_ERROR_ENUM_HANDLE;
- {$NODEFINE PRPC_ERROR_ENUM_HANDLE}
- TRpcErrorEnumHandle = RPC_ERROR_ENUM_HANDLE;
- PRpcErrorEnumHandle = PRPC_ERROR_ENUM_HANDLE;
-
-function RpcErrorStartEnumeration(var EnumHandle: RPC_ERROR_ENUM_HANDLE): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcErrorStartEnumeration}
-function RpcErrorGetNextRecord(EnumHandle: PRPC_ERROR_ENUM_HANDLE; CopyStrings: BOOL;
- var ErrorInfo: RPC_EXTENDED_ERROR_INFO): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcErrorGetNextRecord}
-function RpcErrorEndEnumeration(var EnumHandle: RPC_ERROR_ENUM_HANDLE): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcErrorEndEnumeration}
-function RpcErrorResetEnumeration(var EnumHandle: RPC_ERROR_ENUM_HANDLE): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcErrorResetEnumeration}
-function RpcErrorGetNumberOfRecords(var EnumHandle: RPC_ERROR_ENUM_HANDLE; var Records: Integer): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcErrorGetNumberOfRecords}
-function RpcErrorSaveErrorInfo(EnumHandle: PRPC_ERROR_ENUM_HANDLE; var ErrorBlob: PVOID; var BlobSize: size_t): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcErrorSaveErrorInfo}
-function RpcErrorLoadErrorInfo(ErrorBlob: PVOID; BlobSize: size_t; var EnumHandle: RPC_ERROR_ENUM_HANDLE): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcErrorLoadErrorInfo}
-function RpcErrorAddRecord(ErrorInfo: PRPC_EXTENDED_ERROR_INFO): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcErrorAddRecord}
-procedure RpcErrorClearInformation; stdcall;
-{$EXTERNALSYM RpcErrorClearInformation}
-function RpcGetAuthorizationContextForClient(ClientBinding: RPC_BINDING_HANDLE; ImpersonateOnReturn: BOOL;
- Reserved1: PVOID; pExpirationTime: PLARGE_INTEGER; Reserved2: LUID; Reserved3: DWORD;
- Reserved4: PVOID; var pAuthzClientContext: PVOID): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcGetAuthorizationContextForClient}
-function RpcFreeAuthorizationContext(var pAuthzClientContext: PVOID): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcFreeAuthorizationContext}
-function RpcSsContextLockExclusive(ServerBindingHandle: RPC_BINDING_HANDLE; UserContext: PVOID): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcSsContextLockExclusive}
-function RpcSsContextLockShared(ServerBindingHandle: RPC_BINDING_HANDLE; UserContext: PVOID): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcSsContextLockShared}
-
-const
- RPC_CALL_ATTRIBUTES_VERSION = 1;
- {$EXTERNALSYM RPC_CALL_ATTRIBUTES_VERSION}
- RPC_QUERY_SERVER_PRINCIPAL_NAME = 2;
- {$EXTERNALSYM RPC_QUERY_SERVER_PRINCIPAL_NAME}
- RPC_QUERY_CLIENT_PRINCIPAL_NAME = 4;
- {$EXTERNALSYM RPC_QUERY_CLIENT_PRINCIPAL_NAME}
-
-type
- tagRPC_CALL_ATTRIBUTES_V1_W = record
- Version: Cardinal;
- Flags: Cardinal;
- ServerPrincipalNameBufferLength: Cardinal;
- ServerPrincipalName: PWord;
- ClientPrincipalNameBufferLength: Cardinal;
- ClientPrincipalName: PWord;
- AuthenticationLevel: Cardinal;
- AuthenticationService: Cardinal;
- NullSession: BOOL;
- end;
- {$EXTERNALSYM tagRPC_CALL_ATTRIBUTES_V1_W}
- RPC_CALL_ATTRIBUTES_V1_W = tagRPC_CALL_ATTRIBUTES_V1_W;
- {$EXTERNALSYM RPC_CALL_ATTRIBUTES_V1_W}
- TRpcCallAttributesV1W = RPC_CALL_ATTRIBUTES_V1_W;
-
- tagRPC_CALL_ATTRIBUTES_V1_A = record
- Version: Cardinal;
- Flags: Cardinal;
- ServerPrincipalNameBufferLength: Cardinal;
- ServerPrincipalName: PChar;
- ClientPrincipalNameBufferLength: Cardinal;
- ClientPrincipalName: PChar;
- AuthenticationLevel: Cardinal;
- AuthenticationService: Cardinal;
- NullSession: BOOL;
- end;
- {$EXTERNALSYM tagRPC_CALL_ATTRIBUTES_V1_A}
- RPC_CALL_ATTRIBUTES_V1_A = tagRPC_CALL_ATTRIBUTES_V1_A;
- {$EXTERNALSYM RPC_CALL_ATTRIBUTES_V1_A}
- TRpcCallAttributesV1A = RPC_CALL_ATTRIBUTES_V1_A;
- {$IFDEF UNICODE}
- RPC_CALL_ATTRIBUTES_V1 = RPC_CALL_ATTRIBUTES_V1_W;
- {$EXTERNALSYM RPC_CALL_ATTRIBUTES_V1}
- TRpcCallAttributesV1 = TRpcCallAttributesV1W;
- {$ELSE}
- RPC_CALL_ATTRIBUTES_V1 = RPC_CALL_ATTRIBUTES_V1_A;
- {$EXTERNALSYM RPC_CALL_ATTRIBUTES_V1}
- TRpcCallAttributesV1 = TRpcCallAttributesV1A;
- {$ENDIF UNICODE}
-
-function RpcServerInqCallAttributesW(ClientBinding: RPC_BINDING_HANDLE; RpcCallAttributes: Pointer): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcServerInqCallAttributesW}
-function RpcServerInqCallAttributesA(ClientBinding: RPC_BINDING_HANDLE; RpcCallAttributes: Pointer): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcServerInqCallAttributesA}
-function RpcServerInqCallAttributes(ClientBinding: RPC_BINDING_HANDLE; RpcCallAttributes: Pointer): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcServerInqCallAttributes}
-
-type
- RPC_CALL_ATTRIBUTES = RPC_CALL_ATTRIBUTES_V1;
- {$EXTERNALSYM RPC_CALL_ATTRIBUTES}
- TRpcCallAttributes = RPC_CALL_ATTRIBUTES;
-
-implementation
-
-const
- rpclib = 'rpc4rt.dll';
- {$IFDEF UNICODE}
- AWSuffix = 'W';
- {$ELSE}
- AWSuffix = 'A';
- {$ENDIF UNICODE}
-
-function RpcAsyncGetCallHandle(var pAsync: RPC_ASYNC_STATE): Pointer;
-begin
- Result := pAsync.RuntimeInfo;
-end;
-
-{$IFDEF DYNAMIC_LINK}
-
-var
- _RpcAsyncInitializeHandle: Pointer;
-
-function RpcAsyncInitializeHandle;
-begin
- GetProcedureAddress(_RpcAsyncInitializeHandle, rpclib, 'RpcAsyncInitializeHandle');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcAsyncInitializeHandle]
- end;
-end;
-
-var
- _RpcAsyncRegisterInfo: Pointer;
-
-function RpcAsyncRegisterInfo;
-begin
- GetProcedureAddress(_RpcAsyncRegisterInfo, rpclib, 'RpcAsyncRegisterInfo');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcAsyncRegisterInfo]
- end;
-end;
-
-var
- _RpcAsyncGetCallStatus: Pointer;
-
-function RpcAsyncGetCallStatus;
-begin
- GetProcedureAddress(_RpcAsyncGetCallStatus, rpclib, 'RpcAsyncGetCallStatus');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcAsyncGetCallStatus]
- end;
-end;
-
-var
- _RpcAsyncCompleteCall: Pointer;
-
-function RpcAsyncCompleteCall;
-begin
- GetProcedureAddress(_RpcAsyncCompleteCall, rpclib, 'RpcAsyncCompleteCall');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcAsyncCompleteCall]
- end;
-end;
-
-var
- _RpcAsyncAbortCall: Pointer;
-
-function RpcAsyncAbortCall;
-begin
- GetProcedureAddress(_RpcAsyncAbortCall, rpclib, 'RpcAsyncAbortCall');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcAsyncAbortCall]
- end;
-end;
-
-var
- _RpcAsyncCancelCall: Pointer;
-
-function RpcAsyncCancelCall;
-begin
- GetProcedureAddress(_RpcAsyncCancelCall, rpclib, 'RpcAsyncCancelCall');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcAsyncCancelCall]
- end;
-end;
-
-var
- _RpcAsyncCleanupThread: Pointer;
-
-function RpcAsyncCleanupThread;
-begin
- GetProcedureAddress(_RpcAsyncCleanupThread, rpclib, 'RpcAsyncCleanupThread');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcAsyncCleanupThread]
- end;
-end;
-
-var
- _RpcErrorStartEnumeration: Pointer;
-
-function RpcErrorStartEnumeration;
-begin
- GetProcedureAddress(_RpcErrorStartEnumeration, rpclib, 'RpcErrorStartEnumeration');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcErrorStartEnumeration]
- end;
-end;
-
-var
- _RpcErrorGetNextRecord: Pointer;
-
-function RpcErrorGetNextRecord;
-begin
- GetProcedureAddress(_RpcErrorGetNextRecord, rpclib, 'RpcErrorGetNextRecord');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcErrorGetNextRecord]
- end;
-end;
-
-var
- _RpcErrorEndEnumeration: Pointer;
-
-function RpcErrorEndEnumeration;
-begin
- GetProcedureAddress(_RpcErrorEndEnumeration, rpclib, 'RpcErrorEndEnumeration');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcErrorEndEnumeration]
- end;
-end;
-
-var
- _RpcErrorResetEnumeration: Pointer;
-
-function RpcErrorResetEnumeration;
-begin
- GetProcedureAddress(_RpcErrorResetEnumeration, rpclib, 'RpcErrorResetEnumeration');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcErrorResetEnumeration]
- end;
-end;
-
-var
- _RpcErrorGetNumberOfRecords: Pointer;
-
-function RpcErrorGetNumberOfRecords;
-begin
- GetProcedureAddress(_RpcErrorGetNumberOfRecords, rpclib, 'RpcErrorGetNumberOfRecords');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcErrorGetNumberOfRecords]
- end;
-end;
-
-var
- _RpcErrorSaveErrorInfo: Pointer;
-
-function RpcErrorSaveErrorInfo;
-begin
- GetProcedureAddress(_RpcErrorSaveErrorInfo, rpclib, 'RpcErrorSaveErrorInfo');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcErrorSaveErrorInfo]
- end;
-end;
-
-var
- _RpcErrorLoadErrorInfo: Pointer;
-
-function RpcErrorLoadErrorInfo;
-begin
- GetProcedureAddress(_RpcErrorLoadErrorInfo, rpclib, 'RpcErrorLoadErrorInfo');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcErrorLoadErrorInfo]
- end;
-end;
-
-var
- _RpcErrorAddRecord: Pointer;
-
-function RpcErrorAddRecord;
-begin
- GetProcedureAddress(_RpcErrorAddRecord, rpclib, 'RpcErrorAddRecord');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcErrorAddRecord]
- end;
-end;
-
-var
- _RpcErrorClearInformation: Pointer;
-
-procedure RpcErrorClearInformation;
-begin
- GetProcedureAddress(_RpcErrorClearInformation, rpclib, 'RpcErrorClearInformation');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcErrorClearInformation]
- end;
-end;
-
-var
- _RpcGetAuthContextForClient: Pointer;
-
-function RpcGetAuthorizationContextForClient;
-begin
- GetProcedureAddress(_RpcGetAuthContextForClient, rpclib, 'RpcGetAuthorizationContextForClient');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcGetAuthContextForClient]
- end;
-end;
-
-var
- _RpcFreeAuthorizationContext: Pointer;
-
-function RpcFreeAuthorizationContext;
-begin
- GetProcedureAddress(_RpcFreeAuthorizationContext, rpclib, 'RpcFreeAuthorizationContext');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcFreeAuthorizationContext]
- end;
-end;
-
-var
- _RpcSsContextLockExclusive: Pointer;
-
-function RpcSsContextLockExclusive;
-begin
- GetProcedureAddress(_RpcSsContextLockExclusive, rpclib, 'RpcSsContextLockExclusive');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcSsContextLockExclusive]
- end;
-end;
-
-var
- _RpcSsContextLockShared: Pointer;
-
-function RpcSsContextLockShared;
-begin
- GetProcedureAddress(_RpcSsContextLockShared, rpclib, 'RpcSsContextLockShared');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcSsContextLockShared]
- end;
-end;
-
-var
- _RpcServerInqCallAttributesA: Pointer;
-
-function RpcServerInqCallAttributesA;
-begin
- GetProcedureAddress(_RpcServerInqCallAttributesA, rpclib, 'RpcServerInqCallAttributesA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcServerInqCallAttributesA]
- end;
-end;
-
-var
- _RpcServerInqCallAttributesW: Pointer;
-
-function RpcServerInqCallAttributesW;
-begin
- GetProcedureAddress(_RpcServerInqCallAttributesW, rpclib, 'RpcServerInqCallAttributesW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcServerInqCallAttributesW]
- end;
-end;
-
-var
- _RpcServerInqCallAttributes: Pointer;
-
-function RpcServerInqCallAttributes;
-begin
- GetProcedureAddress(_RpcServerInqCallAttributes, rpclib, 'RpcServerInqCallAttributes' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcServerInqCallAttributes]
- end;
-end;
-
-{$ELSE}
-
-function RpcAsyncInitializeHandle; external rpclib name 'RpcAsyncInitializeHandle';
-function RpcAsyncRegisterInfo; external rpclib name 'RpcAsyncRegisterInfo';
-function RpcAsyncGetCallStatus; external rpclib name 'RpcAsyncGetCallStatus';
-function RpcAsyncCompleteCall; external rpclib name 'RpcAsyncCompleteCall';
-function RpcAsyncAbortCall; external rpclib name 'RpcAsyncAbortCall';
-function RpcAsyncCancelCall; external rpclib name 'RpcAsyncCancelCall';
-function RpcAsyncCleanupThread; external rpclib name 'RpcAsyncCleanupThread';
-function RpcErrorStartEnumeration; external rpclib name 'RpcErrorStartEnumeration';
-function RpcErrorGetNextRecord; external rpclib name 'RpcErrorGetNextRecord';
-function RpcErrorEndEnumeration; external rpclib name 'RpcErrorEndEnumeration';
-function RpcErrorResetEnumeration; external rpclib name 'RpcErrorResetEnumeration';
-function RpcErrorGetNumberOfRecords; external rpclib name 'RpcErrorGetNumberOfRecords';
-function RpcErrorSaveErrorInfo; external rpclib name 'RpcErrorSaveErrorInfo';
-function RpcErrorLoadErrorInfo; external rpclib name 'RpcErrorLoadErrorInfo';
-function RpcErrorAddRecord; external rpclib name 'RpcErrorAddRecord';
-procedure RpcErrorClearInformation; external rpclib name 'RpcErrorClearInformation';
-function RpcGetAuthorizationContextForClient; external rpclib name 'RpcGetAuthorizationContextForClient';
-function RpcFreeAuthorizationContext; external rpclib name 'RpcFreeAuthorizationContext';
-function RpcSsContextLockExclusive; external rpclib name 'RpcSsContextLockExclusive';
-function RpcSsContextLockShared; external rpclib name 'RpcSsContextLockShared';
-function RpcServerInqCallAttributesA; external rpclib name 'RpcServerInqCallAttributesA';
-function RpcServerInqCallAttributesW; external rpclib name 'RpcServerInqCallAttributesW';
-function RpcServerInqCallAttributes; external rpclib name 'RpcServerInqCallAttributes' + AWSuffix;
-
-{$ENDIF DYNAMIC_LINK}
-
-end.
+{******************************************************************************}
+{ }
+{ Asynchronous RPC API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: rpcnasync.h, released August 2001. The original Pascal }
+{ code is: RpcAsync.pas, released December 2000. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwarpcasync.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaRpcASync;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "RpcAsync.h"'}
+{$HPPEMIT ''}
+{$HPPEMIT 'typedef RPC_EXTENDED_ERROR_INFO* PRPC_EXTENDED_ERROR_INFO'}
+{$HPPEMIT 'typedef RPC_ERROR_ENUM_HANDLE* PRPC_ERROR_ENUM_HANDLE'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaRpc, JwaRpcDce, JwaWinBase, JwaWinNT, JwaWinType;
+
+type
+ _RPC_NOTIFICATION_TYPES = (
+ RpcNotificationTypeNone,
+ RpcNotificationTypeEvent,
+ RpcNotificationTypeApc,
+ RpcNotificationTypeIoc,
+ RpcNotificationTypeHwnd,
+ RpcNotificationTypeCallback);
+ {$EXTERNALSYM _RPC_NOTIFICATION_TYPES}
+ RPC_NOTIFICATION_TYPES = _RPC_NOTIFICATION_TYPES;
+ {$EXTERNALSYM RPC_NOTIFICATION_TYPES}
+ TRpcNotificationTypes = RPC_NOTIFICATION_TYPES;
+
+ PFN_RPCNOTIFICATION_ROUTINE = ^RPCNOTIFICATION_ROUTINE;
+ {$EXTERNALSYM PFN_RPCNOTIFICATION_ROUTINE}
+
+ _RPC_ASYNC_EVENT = (
+ RpcCallComplete,
+ RpcSendComplete,
+ RpcReceiveComplete);
+ {$EXTERNALSYM _RPC_ASYNC_EVENT}
+ RPC_ASYNC_EVENT = _RPC_ASYNC_EVENT;
+ {$EXTERNALSYM RPC_ASYNC_EVENT}
+ TRpcASynchEvent = RPC_ASYNC_EVENT;
+
+ _RPC_ASYNC_STATE = record
+ Size: Cardinal; // size of this structure
+ Signature: Cardinal;
+ Lock: Longint;
+ Flags: Cardinal;
+ StubInfo: Pointer;
+ UserInfo: Pointer;
+ RuntimeInfo: Pointer;
+ Event: RPC_ASYNC_EVENT;
+
+ NotificationType: RPC_NOTIFICATION_TYPES;
+ u: record
+ case Integer of
+ //
+ // Notification by APC
+ //
+ 0: (
+ NotificationRoutine: PFN_RPCNOTIFICATION_ROUTINE;
+ hThread: HANDLE);
+
+ //
+ // Notification by IO completion port
+ //
+ 1: (
+ hIOPort: HANDLE;
+ dwNumberOfBytesTransferred: DWORD;
+ dwCompletionKey: DWORD_PTR;
+ lpOverlapped: LPOVERLAPPED);
+
+ //
+ // Notification by window message
+ //
+ 2: (
+ hWnd: HWND;
+ Msg: UINT);
+
+ //
+ // Notification by event
+ //
+ 4: (
+ hEvent: HANDLE);
+
+ //
+ // Notification by callback function
+ //
+ // This option is available only to OLE
+ //
+ //5: (
+ // NotificationRoutine: PFN_RPCNOTIFICATION_ROUTINE);
+ end;
+ Reserved: array [0..3] of LONG_PTR;
+ end;
+ {$EXTERNALSYM _RPC_ASYNC_STATE}
+ RPC_ASYNC_STATE = _RPC_ASYNC_STATE;
+ {$EXTERNALSYM RPC_ASYNC_STATE}
+ PRPC_ASYNC_STATE = ^RPC_ASYNC_STATE;
+ {$EXTERNALSYM PRPC_ASYNC_STATE}
+ TRpcASynchState = RPC_ASYNC_STATE;
+ PRpcASynchState = PRPC_ASYNC_STATE;
+
+ RPCNOTIFICATION_ROUTINE = procedure(var pAsync: RPC_ASYNC_STATE;
+ Context: Pointer; Event: RPC_ASYNC_EVENT); stdcall;
+ {$EXTERNALSYM RPCNOTIFICATION_ROUTINE}
+// PFN_RPCNOTIFICATION_ROUTINE = ^RPCNOTIFICATION_ROUTINE;
+// {$EXTERNALSYM PFN_RPCNOTIFICATION_ROUTINE}
+ TRpcNotificationRoutine = RPCNOTIFICATION_ROUTINE;
+ PRpcNotificationRoutine = PFN_RPCNOTIFICATION_ROUTINE;
+
+// Possible values for Flags
+
+const
+ RPC_C_NOTIFY_ON_SEND_COMPLETE = $1;
+ {$EXTERNALSYM RPC_C_NOTIFY_ON_SEND_COMPLETE}
+ RPC_C_INFINITE_TIMEOUT = INFINITE;
+ {$EXTERNALSYM RPC_C_INFINITE_TIMEOUT}
+
+function RpcAsyncGetCallHandle(var pAsync: RPC_ASYNC_STATE): Pointer;
+{$EXTERNALSYM RpcAsyncGetCallHandle}
+function RpcAsyncInitializeHandle(var pAsync: RPC_ASYNC_STATE; Size: Cardinal): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcAsyncInitializeHandle}
+function RpcAsyncRegisterInfo(var pAsync: RPC_ASYNC_STATE): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcAsyncRegisterInfo}
+function RpcAsyncGetCallStatus(var pAsync: RPC_ASYNC_STATE): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcAsyncGetCallStatus}
+function RpcAsyncCompleteCall(var pAsync: RPC_ASYNC_STATE; Reply: Pointer): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcAsyncCompleteCall}
+function RpcAsyncAbortCall(var pAsync: RPC_ASYNC_STATE; ExceptionCode: Cardinal): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcAsyncAbortCall}
+function RpcAsyncCancelCall(var pAsync: RPC_ASYNC_STATE; fAbort: BOOL): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcAsyncCancelCall}
+function RpcAsyncCleanupThread(dwTimeout: DWORD): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcAsyncCleanupThread}
+
+type
+ tagExtendedErrorParamTypes = (
+ eeptFiller0,
+ eeptAnsiString,
+ eeptUnicodeString,
+ eeptLongVal,
+ eeptShortVal,
+ eeptPointerVal,
+ eeptNone,
+ eeptBinary);
+ {$EXTERNALSYM tagExtendedErrorParamTypes}
+ ExtendedErrorParamTypes = tagExtendedErrorParamTypes;
+ {$EXTERNALSYM ExtendedErrorParamTypes}
+ TExtendedErrorParamTypes = ExtendedErrorParamTypes;
+
+const
+ MaxNumberOfEEInfoParams = 4;
+ {$EXTERNALSYM MaxNumberOfEEInfoParams}
+ RPC_EEINFO_VERSION = 1;
+ {$EXTERNALSYM RPC_EEINFO_VERSION}
+
+type
+ tagBinaryParam = record
+ Buffer: Pointer;
+ Size: Word;
+ end;
+ {$EXTERNALSYM tagBinaryParam}
+ BinaryParam = tagBinaryParam;
+ {$EXTERNALSYM BinaryParam}
+ TBinaryParam = BinaryParam;
+
+ tagRPC_EE_INFO_PARAM = record
+ ParameterType: ExtendedErrorParamTypes;
+ case Integer of
+ 0: (AnsiString: LPSTR);
+ 1: (UnicodeString: LPWSTR);
+ 2: (LVal: Longint);
+ 3: (SVal: Word);
+ 4: (PVal: ULONGLONG);
+ 5: (BVal: BinaryParam);
+ end;
+ {$EXTERNALSYM tagRPC_EE_INFO_PARAM}
+ RPC_EE_INFO_PARAM = tagRPC_EE_INFO_PARAM;
+ {$EXTERNALSYM RPC_EE_INFO_PARAM}
+ TRpcEeInfoParam = RPC_EE_INFO_PARAM;
+
+const
+ EEInfoPreviousRecordsMissing = 1;
+ {$EXTERNALSYM EEInfoPreviousRecordsMissing}
+ EEInfoNextRecordsMissing = 2;
+ {$EXTERNALSYM EEInfoNextRecordsMissing}
+ EEInfoUseFileTime = 4;
+ {$EXTERNALSYM EEInfoUseFileTime}
+
+ EEInfoGCCOM = 11;
+ {$EXTERNALSYM EEInfoGCCOM}
+ EEInfoGCFRS = 12;
+ {$EXTERNALSYM EEInfoGCFRS}
+
+type
+ tagRPC_EXTENDED_ERROR_INFO = record
+ Version: ULONG;
+ ComputerName: LPWSTR;
+ ProcessID: ULONG;
+ u: record
+ case Integer of
+ 0: ( SystemTime: SYSTEMTIME);
+ 1: (FileTime: FILETIME);
+ end;
+ GeneratingComponent: ULONG;
+ Status: ULONG;
+ DetectionLocation: USHORT;
+ Flags: USHORT;
+ NumberOfParameters: Integer;
+ Parameters: array [0..MaxNumberOfEEInfoParams - 1] of RPC_EE_INFO_PARAM;
+ end;
+ {$EXTERNALSYM tagRPC_EXTENDED_ERROR_INFO}
+ RPC_EXTENDED_ERROR_INFO = tagRPC_EXTENDED_ERROR_INFO;
+ {$EXTERNALSYM RPC_EXTENDED_ERROR_INFO}
+ PRPC_EXTENDED_ERROR_INFO = ^RPC_EXTENDED_ERROR_INFO;
+ {$NODEFINE PRPC_EXTENDED_ERROR_INFO}
+ TRpcExtendedErrorInfo = RPC_EXTENDED_ERROR_INFO;
+ PRpcExtendedErrorInfo = ^RPC_EXTENDED_ERROR_INFO;
+
+ tagRPC_ERROR_ENUM_HANDLE = record
+ Signature: ULONG;
+ CurrentPos: Pointer;
+ Head: Pointer;
+ end;
+ {$EXTERNALSYM tagRPC_ERROR_ENUM_HANDLE}
+ RPC_ERROR_ENUM_HANDLE = tagRPC_ERROR_ENUM_HANDLE;
+ {$EXTERNALSYM RPC_ERROR_ENUM_HANDLE}
+ PRPC_ERROR_ENUM_HANDLE = ^RPC_ERROR_ENUM_HANDLE;
+ {$NODEFINE PRPC_ERROR_ENUM_HANDLE}
+ TRpcErrorEnumHandle = RPC_ERROR_ENUM_HANDLE;
+ PRpcErrorEnumHandle = PRPC_ERROR_ENUM_HANDLE;
+
+function RpcErrorStartEnumeration(var EnumHandle: RPC_ERROR_ENUM_HANDLE): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcErrorStartEnumeration}
+function RpcErrorGetNextRecord(EnumHandle: PRPC_ERROR_ENUM_HANDLE; CopyStrings: BOOL;
+ var ErrorInfo: RPC_EXTENDED_ERROR_INFO): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcErrorGetNextRecord}
+function RpcErrorEndEnumeration(var EnumHandle: RPC_ERROR_ENUM_HANDLE): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcErrorEndEnumeration}
+function RpcErrorResetEnumeration(var EnumHandle: RPC_ERROR_ENUM_HANDLE): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcErrorResetEnumeration}
+function RpcErrorGetNumberOfRecords(var EnumHandle: RPC_ERROR_ENUM_HANDLE; var Records: Integer): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcErrorGetNumberOfRecords}
+function RpcErrorSaveErrorInfo(EnumHandle: PRPC_ERROR_ENUM_HANDLE; var ErrorBlob: PVOID; var BlobSize: size_t): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcErrorSaveErrorInfo}
+function RpcErrorLoadErrorInfo(ErrorBlob: PVOID; BlobSize: size_t; var EnumHandle: RPC_ERROR_ENUM_HANDLE): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcErrorLoadErrorInfo}
+function RpcErrorAddRecord(ErrorInfo: PRPC_EXTENDED_ERROR_INFO): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcErrorAddRecord}
+procedure RpcErrorClearInformation; stdcall;
+{$EXTERNALSYM RpcErrorClearInformation}
+function RpcGetAuthorizationContextForClient(ClientBinding: RPC_BINDING_HANDLE; ImpersonateOnReturn: BOOL;
+ Reserved1: PVOID; pExpirationTime: PLARGE_INTEGER; Reserved2: LUID; Reserved3: DWORD;
+ Reserved4: PVOID; var pAuthzClientContext: PVOID): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcGetAuthorizationContextForClient}
+function RpcFreeAuthorizationContext(var pAuthzClientContext: PVOID): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcFreeAuthorizationContext}
+function RpcSsContextLockExclusive(ServerBindingHandle: RPC_BINDING_HANDLE; UserContext: PVOID): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcSsContextLockExclusive}
+function RpcSsContextLockShared(ServerBindingHandle: RPC_BINDING_HANDLE; UserContext: PVOID): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcSsContextLockShared}
+
+const
+ RPC_CALL_ATTRIBUTES_VERSION = 1;
+ {$EXTERNALSYM RPC_CALL_ATTRIBUTES_VERSION}
+ RPC_QUERY_SERVER_PRINCIPAL_NAME = 2;
+ {$EXTERNALSYM RPC_QUERY_SERVER_PRINCIPAL_NAME}
+ RPC_QUERY_CLIENT_PRINCIPAL_NAME = 4;
+ {$EXTERNALSYM RPC_QUERY_CLIENT_PRINCIPAL_NAME}
+
+type
+ tagRPC_CALL_ATTRIBUTES_V1_W = record
+ Version: Cardinal;
+ Flags: Cardinal;
+ ServerPrincipalNameBufferLength: Cardinal;
+ ServerPrincipalName: PWord;
+ ClientPrincipalNameBufferLength: Cardinal;
+ ClientPrincipalName: PWord;
+ AuthenticationLevel: Cardinal;
+ AuthenticationService: Cardinal;
+ NullSession: BOOL;
+ end;
+ {$EXTERNALSYM tagRPC_CALL_ATTRIBUTES_V1_W}
+ RPC_CALL_ATTRIBUTES_V1_W = tagRPC_CALL_ATTRIBUTES_V1_W;
+ {$EXTERNALSYM RPC_CALL_ATTRIBUTES_V1_W}
+ TRpcCallAttributesV1W = RPC_CALL_ATTRIBUTES_V1_W;
+
+ tagRPC_CALL_ATTRIBUTES_V1_A = record
+ Version: Cardinal;
+ Flags: Cardinal;
+ ServerPrincipalNameBufferLength: Cardinal;
+ ServerPrincipalName: PChar;
+ ClientPrincipalNameBufferLength: Cardinal;
+ ClientPrincipalName: PChar;
+ AuthenticationLevel: Cardinal;
+ AuthenticationService: Cardinal;
+ NullSession: BOOL;
+ end;
+ {$EXTERNALSYM tagRPC_CALL_ATTRIBUTES_V1_A}
+ RPC_CALL_ATTRIBUTES_V1_A = tagRPC_CALL_ATTRIBUTES_V1_A;
+ {$EXTERNALSYM RPC_CALL_ATTRIBUTES_V1_A}
+ TRpcCallAttributesV1A = RPC_CALL_ATTRIBUTES_V1_A;
+ {$IFDEF UNICODE}
+ RPC_CALL_ATTRIBUTES_V1 = RPC_CALL_ATTRIBUTES_V1_W;
+ {$EXTERNALSYM RPC_CALL_ATTRIBUTES_V1}
+ TRpcCallAttributesV1 = TRpcCallAttributesV1W;
+ {$ELSE}
+ RPC_CALL_ATTRIBUTES_V1 = RPC_CALL_ATTRIBUTES_V1_A;
+ {$EXTERNALSYM RPC_CALL_ATTRIBUTES_V1}
+ TRpcCallAttributesV1 = TRpcCallAttributesV1A;
+ {$ENDIF UNICODE}
+
+function RpcServerInqCallAttributesW(ClientBinding: RPC_BINDING_HANDLE; RpcCallAttributes: Pointer): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcServerInqCallAttributesW}
+function RpcServerInqCallAttributesA(ClientBinding: RPC_BINDING_HANDLE; RpcCallAttributes: Pointer): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcServerInqCallAttributesA}
+function RpcServerInqCallAttributes(ClientBinding: RPC_BINDING_HANDLE; RpcCallAttributes: Pointer): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcServerInqCallAttributes}
+
+type
+ RPC_CALL_ATTRIBUTES = RPC_CALL_ATTRIBUTES_V1;
+ {$EXTERNALSYM RPC_CALL_ATTRIBUTES}
+ TRpcCallAttributes = RPC_CALL_ATTRIBUTES;
+
+implementation
+
+const
+ rpclib = 'rpc4rt.dll';
+ {$IFDEF UNICODE}
+ AWSuffix = 'W';
+ {$ELSE}
+ AWSuffix = 'A';
+ {$ENDIF UNICODE}
+
+function RpcAsyncGetCallHandle(var pAsync: RPC_ASYNC_STATE): Pointer;
+begin
+ Result := pAsync.RuntimeInfo;
+end;
+
+{$IFDEF DYNAMIC_LINK}
+
+var
+ _RpcAsyncInitializeHandle: Pointer;
+
+function RpcAsyncInitializeHandle;
+begin
+ GetProcedureAddress(_RpcAsyncInitializeHandle, rpclib, 'RpcAsyncInitializeHandle');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcAsyncInitializeHandle]
+ end;
+end;
+
+var
+ _RpcAsyncRegisterInfo: Pointer;
+
+function RpcAsyncRegisterInfo;
+begin
+ GetProcedureAddress(_RpcAsyncRegisterInfo, rpclib, 'RpcAsyncRegisterInfo');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcAsyncRegisterInfo]
+ end;
+end;
+
+var
+ _RpcAsyncGetCallStatus: Pointer;
+
+function RpcAsyncGetCallStatus;
+begin
+ GetProcedureAddress(_RpcAsyncGetCallStatus, rpclib, 'RpcAsyncGetCallStatus');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcAsyncGetCallStatus]
+ end;
+end;
+
+var
+ _RpcAsyncCompleteCall: Pointer;
+
+function RpcAsyncCompleteCall;
+begin
+ GetProcedureAddress(_RpcAsyncCompleteCall, rpclib, 'RpcAsyncCompleteCall');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcAsyncCompleteCall]
+ end;
+end;
+
+var
+ _RpcAsyncAbortCall: Pointer;
+
+function RpcAsyncAbortCall;
+begin
+ GetProcedureAddress(_RpcAsyncAbortCall, rpclib, 'RpcAsyncAbortCall');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcAsyncAbortCall]
+ end;
+end;
+
+var
+ _RpcAsyncCancelCall: Pointer;
+
+function RpcAsyncCancelCall;
+begin
+ GetProcedureAddress(_RpcAsyncCancelCall, rpclib, 'RpcAsyncCancelCall');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcAsyncCancelCall]
+ end;
+end;
+
+var
+ _RpcAsyncCleanupThread: Pointer;
+
+function RpcAsyncCleanupThread;
+begin
+ GetProcedureAddress(_RpcAsyncCleanupThread, rpclib, 'RpcAsyncCleanupThread');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcAsyncCleanupThread]
+ end;
+end;
+
+var
+ _RpcErrorStartEnumeration: Pointer;
+
+function RpcErrorStartEnumeration;
+begin
+ GetProcedureAddress(_RpcErrorStartEnumeration, rpclib, 'RpcErrorStartEnumeration');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcErrorStartEnumeration]
+ end;
+end;
+
+var
+ _RpcErrorGetNextRecord: Pointer;
+
+function RpcErrorGetNextRecord;
+begin
+ GetProcedureAddress(_RpcErrorGetNextRecord, rpclib, 'RpcErrorGetNextRecord');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcErrorGetNextRecord]
+ end;
+end;
+
+var
+ _RpcErrorEndEnumeration: Pointer;
+
+function RpcErrorEndEnumeration;
+begin
+ GetProcedureAddress(_RpcErrorEndEnumeration, rpclib, 'RpcErrorEndEnumeration');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcErrorEndEnumeration]
+ end;
+end;
+
+var
+ _RpcErrorResetEnumeration: Pointer;
+
+function RpcErrorResetEnumeration;
+begin
+ GetProcedureAddress(_RpcErrorResetEnumeration, rpclib, 'RpcErrorResetEnumeration');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcErrorResetEnumeration]
+ end;
+end;
+
+var
+ _RpcErrorGetNumberOfRecords: Pointer;
+
+function RpcErrorGetNumberOfRecords;
+begin
+ GetProcedureAddress(_RpcErrorGetNumberOfRecords, rpclib, 'RpcErrorGetNumberOfRecords');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcErrorGetNumberOfRecords]
+ end;
+end;
+
+var
+ _RpcErrorSaveErrorInfo: Pointer;
+
+function RpcErrorSaveErrorInfo;
+begin
+ GetProcedureAddress(_RpcErrorSaveErrorInfo, rpclib, 'RpcErrorSaveErrorInfo');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcErrorSaveErrorInfo]
+ end;
+end;
+
+var
+ _RpcErrorLoadErrorInfo: Pointer;
+
+function RpcErrorLoadErrorInfo;
+begin
+ GetProcedureAddress(_RpcErrorLoadErrorInfo, rpclib, 'RpcErrorLoadErrorInfo');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcErrorLoadErrorInfo]
+ end;
+end;
+
+var
+ _RpcErrorAddRecord: Pointer;
+
+function RpcErrorAddRecord;
+begin
+ GetProcedureAddress(_RpcErrorAddRecord, rpclib, 'RpcErrorAddRecord');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcErrorAddRecord]
+ end;
+end;
+
+var
+ _RpcErrorClearInformation: Pointer;
+
+procedure RpcErrorClearInformation;
+begin
+ GetProcedureAddress(_RpcErrorClearInformation, rpclib, 'RpcErrorClearInformation');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcErrorClearInformation]
+ end;
+end;
+
+var
+ _RpcGetAuthContextForClient: Pointer;
+
+function RpcGetAuthorizationContextForClient;
+begin
+ GetProcedureAddress(_RpcGetAuthContextForClient, rpclib, 'RpcGetAuthorizationContextForClient');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcGetAuthContextForClient]
+ end;
+end;
+
+var
+ _RpcFreeAuthorizationContext: Pointer;
+
+function RpcFreeAuthorizationContext;
+begin
+ GetProcedureAddress(_RpcFreeAuthorizationContext, rpclib, 'RpcFreeAuthorizationContext');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcFreeAuthorizationContext]
+ end;
+end;
+
+var
+ _RpcSsContextLockExclusive: Pointer;
+
+function RpcSsContextLockExclusive;
+begin
+ GetProcedureAddress(_RpcSsContextLockExclusive, rpclib, 'RpcSsContextLockExclusive');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcSsContextLockExclusive]
+ end;
+end;
+
+var
+ _RpcSsContextLockShared: Pointer;
+
+function RpcSsContextLockShared;
+begin
+ GetProcedureAddress(_RpcSsContextLockShared, rpclib, 'RpcSsContextLockShared');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcSsContextLockShared]
+ end;
+end;
+
+var
+ _RpcServerInqCallAttributesA: Pointer;
+
+function RpcServerInqCallAttributesA;
+begin
+ GetProcedureAddress(_RpcServerInqCallAttributesA, rpclib, 'RpcServerInqCallAttributesA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcServerInqCallAttributesA]
+ end;
+end;
+
+var
+ _RpcServerInqCallAttributesW: Pointer;
+
+function RpcServerInqCallAttributesW;
+begin
+ GetProcedureAddress(_RpcServerInqCallAttributesW, rpclib, 'RpcServerInqCallAttributesW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcServerInqCallAttributesW]
+ end;
+end;
+
+var
+ _RpcServerInqCallAttributes: Pointer;
+
+function RpcServerInqCallAttributes;
+begin
+ GetProcedureAddress(_RpcServerInqCallAttributes, rpclib, 'RpcServerInqCallAttributes' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcServerInqCallAttributes]
+ end;
+end;
+
+{$ELSE}
+
+function RpcAsyncInitializeHandle; external rpclib name 'RpcAsyncInitializeHandle';
+function RpcAsyncRegisterInfo; external rpclib name 'RpcAsyncRegisterInfo';
+function RpcAsyncGetCallStatus; external rpclib name 'RpcAsyncGetCallStatus';
+function RpcAsyncCompleteCall; external rpclib name 'RpcAsyncCompleteCall';
+function RpcAsyncAbortCall; external rpclib name 'RpcAsyncAbortCall';
+function RpcAsyncCancelCall; external rpclib name 'RpcAsyncCancelCall';
+function RpcAsyncCleanupThread; external rpclib name 'RpcAsyncCleanupThread';
+function RpcErrorStartEnumeration; external rpclib name 'RpcErrorStartEnumeration';
+function RpcErrorGetNextRecord; external rpclib name 'RpcErrorGetNextRecord';
+function RpcErrorEndEnumeration; external rpclib name 'RpcErrorEndEnumeration';
+function RpcErrorResetEnumeration; external rpclib name 'RpcErrorResetEnumeration';
+function RpcErrorGetNumberOfRecords; external rpclib name 'RpcErrorGetNumberOfRecords';
+function RpcErrorSaveErrorInfo; external rpclib name 'RpcErrorSaveErrorInfo';
+function RpcErrorLoadErrorInfo; external rpclib name 'RpcErrorLoadErrorInfo';
+function RpcErrorAddRecord; external rpclib name 'RpcErrorAddRecord';
+procedure RpcErrorClearInformation; external rpclib name 'RpcErrorClearInformation';
+function RpcGetAuthorizationContextForClient; external rpclib name 'RpcGetAuthorizationContextForClient';
+function RpcFreeAuthorizationContext; external rpclib name 'RpcFreeAuthorizationContext';
+function RpcSsContextLockExclusive; external rpclib name 'RpcSsContextLockExclusive';
+function RpcSsContextLockShared; external rpclib name 'RpcSsContextLockShared';
+function RpcServerInqCallAttributesA; external rpclib name 'RpcServerInqCallAttributesA';
+function RpcServerInqCallAttributesW; external rpclib name 'RpcServerInqCallAttributesW';
+function RpcServerInqCallAttributes; external rpclib name 'RpcServerInqCallAttributes' + AWSuffix;
+
+{$ENDIF DYNAMIC_LINK}
+
+end.
diff --git a/packages/extra/winunits/jwarpcdce.pas b/packages/extra/winunits/jwarpcdce.pas
index 48648052aa..f327062f95 100644
--- a/packages/extra/winunits/jwarpcdce.pas
+++ b/packages/extra/winunits/jwarpcdce.pas
@@ -1,3424 +1,3424 @@
-{******************************************************************************}
-{ }
-{ RPC DCE API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: rpcdce.h, released June 2000. The original Pascal }
-{ code is: Rpcce.pas, released December 2000. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwarpcdce.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaRpcDce;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "RpcDce.h"'}
-{$HPPEMIT ''}
-{$HPPEMIT 'typedef RPC_BINDING_VECTOR *PRPC_BINDING_VECTOR'}
-{$HPPEMIT 'typedef UUID_VECTOR *PUUID_VECTOR'}
-{$HPPEMIT 'typedef RPC_IF_ID *PRPC_IF_ID'}
-{$HPPEMIT 'typedef RPC_PROTSEQ_VECTORA *PRPC_PROTSEQ_VECTORA'}
-{$HPPEMIT 'typedef RPC_PROTSEQ_VECTORW *PRPC_PROTSEQ_VECTORW'}
-{$HPPEMIT 'typedef RPC_STATS_VECTOR *PRPC_STATS_VECTOR'}
-{$HPPEMIT 'typedef RPC_IF_ID_VECTOR *PRPC_IF_ID_VECTOR'}
-{$HPPEMIT 'typedef RPC_AUTHZ_HANDLE *PRPC_AUTHZ_HANDLE'}
-{$HPPEMIT 'typedef RPC_AUTH_IDENTITY_HANDLE *PRPC_AUTH_IDENTITY_HANDLE'}
-{$HPPEMIT 'typedef RPC_BINDING_HANDLE *PRPC_BINDING_HANDLE'}
-{$HPPEMIT 'typedef UUID *PUUID'}
-{$HPPEMIT 'typedef UUID *LPUUID'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaWinNT, JwaWinType, JwaRpc;
-
-type
- RPC_BINDING_HANDLE = I_RPC_HANDLE;
- {$EXTERNALSYM RPC_BINDING_HANDLE}
- UUID = GUID;
- {$EXTERNALSYM UUID}
-
- PRPC_BINDING_HANDLE = ^RPC_BINDING_HANDLE;
- {$NODEFINE PRPC_BINDING_HANDLE}
- PUUID = ^UUID;
- {$NODEFINE PUUID}
- LPUUID = ^UUID;
- {$NODEFINE LPUUID}
-
-type
- PRPC_BINDING_VECTOR = ^RPC_BINDING_VECTOR;
- {$NODEFINE PRPC_BINDING_VECTOR}
- _RPC_BINDING_VECTOR = record
- Count: Cardinal;
- BindingH: array [0..0] of RPC_BINDING_HANDLE;
- end;
- {$EXTERNALSYM _RPC_BINDING_VECTOR}
- RPC_BINDING_VECTOR = _RPC_BINDING_VECTOR;
- {$EXTERNALSYM RPC_BINDING_VECTOR}
- TRpcBindingVector = RPC_BINDING_VECTOR;
- PRpcBindingVector = PRPC_BINDING_VECTOR;
-
- PUUID_VECTOR = ^UUID_VECTOR;
- {$NODEFINE PUUID_VECTOR}
- _UUID_VECTOR = record
- Count: Cardinal;
- Uuid: array [0..0] of PUUID;
- end;
- {$EXTERNALSYM _UUID_VECTOR}
- UUID_VECTOR = _UUID_VECTOR;
- {$EXTERNALSYM UUID_VECTOR}
- TUuidVector = UUID_VECTOR;
- PUuidVector = ^TUuidVector;
-
- RPC_IF_HANDLE = LPVOID;
- {$EXTERNALSYM RPC_IF_HANDLE}
-
- PRPC_IF_ID = ^RPC_IF_ID;
- {$NODEFINE PRPC_IF_ID}
- _RPC_IF_ID = record
- Uuid: UUID;
- VersMajor: Word;
- VersMinor: Word;
- end;
- {$EXTERNALSYM _RPC_IF_ID}
- RPC_IF_ID = _RPC_IF_ID;
- {$EXTERNALSYM RPC_IF_ID}
- TRpcIfId = RPC_IF_ID;
- PRpcIfId = ^TRpcIfId;
-
-const
- RPC_C_BINDING_INFINITE_TIMEOUT = 10;
- {$EXTERNALSYM RPC_C_BINDING_INFINITE_TIMEOUT}
- RPC_C_BINDING_MIN_TIMEOUT = 0;
- {$EXTERNALSYM RPC_C_BINDING_MIN_TIMEOUT}
- RPC_C_BINDING_DEFAULT_TIMEOUT = 5;
- {$EXTERNALSYM RPC_C_BINDING_DEFAULT_TIMEOUT}
- RPC_C_BINDING_MAX_TIMEOUT = 9;
- {$EXTERNALSYM RPC_C_BINDING_MAX_TIMEOUT}
-
- RPC_C_CANCEL_INFINITE_TIMEOUT = DWORD(-1);
- {$EXTERNALSYM RPC_C_CANCEL_INFINITE_TIMEOUT}
-
- RPC_C_LISTEN_MAX_CALLS_DEFAULT = 1234;
- {$EXTERNALSYM RPC_C_LISTEN_MAX_CALLS_DEFAULT}
- RPC_C_PROTSEQ_MAX_REQS_DEFAULT = 10;
- {$EXTERNALSYM RPC_C_PROTSEQ_MAX_REQS_DEFAULT}
-
-// RPC_POLICY EndpointFlags.
-
- RPC_C_BIND_TO_ALL_NICS = 1;
- {$EXTERNALSYM RPC_C_BIND_TO_ALL_NICS}
- RPC_C_USE_INTERNET_PORT = $1;
- {$EXTERNALSYM RPC_C_USE_INTERNET_PORT}
- RPC_C_USE_INTRANET_PORT = $2;
- {$EXTERNALSYM RPC_C_USE_INTRANET_PORT}
- RPC_C_DONT_FAIL = $4;
- {$EXTERNALSYM RPC_C_DONT_FAIL}
-
-// RPC_POLICY EndpointFlags specific to the Falcon/RPC transport:
-
- RPC_C_MQ_TEMPORARY = $0000;
- {$EXTERNALSYM RPC_C_MQ_TEMPORARY}
- RPC_C_MQ_PERMANENT = $0001;
- {$EXTERNALSYM RPC_C_MQ_PERMANENT}
- RPC_C_MQ_CLEAR_ON_OPEN = $0002;
- {$EXTERNALSYM RPC_C_MQ_CLEAR_ON_OPEN}
- RPC_C_MQ_USE_EXISTING_SECURITY = $0004;
- {$EXTERNALSYM RPC_C_MQ_USE_EXISTING_SECURITY}
- RPC_C_MQ_AUTHN_LEVEL_NONE = $0000;
- {$EXTERNALSYM RPC_C_MQ_AUTHN_LEVEL_NONE}
- RPC_C_MQ_AUTHN_LEVEL_PKT_INTEGRITY = $0008;
- {$EXTERNALSYM RPC_C_MQ_AUTHN_LEVEL_PKT_INTEGRITY}
- RPC_C_MQ_AUTHN_LEVEL_PKT_PRIVACY = $0010;
- {$EXTERNALSYM RPC_C_MQ_AUTHN_LEVEL_PKT_PRIVACY}
-
-// Client: RpcBindingSetOption() values for the Falcon/RPC transport:
-
- RPC_C_OPT_MQ_DELIVERY = 1;
- {$EXTERNALSYM RPC_C_OPT_MQ_DELIVERY}
- RPC_C_OPT_MQ_PRIORITY = 2;
- {$EXTERNALSYM RPC_C_OPT_MQ_PRIORITY}
- RPC_C_OPT_MQ_JOURNAL = 3;
- {$EXTERNALSYM RPC_C_OPT_MQ_JOURNAL}
- RPC_C_OPT_MQ_ACKNOWLEDGE = 4;
- {$EXTERNALSYM RPC_C_OPT_MQ_ACKNOWLEDGE}
- RPC_C_OPT_MQ_AUTHN_SERVICE = 5;
- {$EXTERNALSYM RPC_C_OPT_MQ_AUTHN_SERVICE}
- RPC_C_OPT_MQ_AUTHN_LEVEL = 6;
- {$EXTERNALSYM RPC_C_OPT_MQ_AUTHN_LEVEL}
- RPC_C_OPT_MQ_TIME_TO_REACH_QUEUE = 7;
- {$EXTERNALSYM RPC_C_OPT_MQ_TIME_TO_REACH_QUEUE}
- RPC_C_OPT_MQ_TIME_TO_BE_RECEIVED = 8;
- {$EXTERNALSYM RPC_C_OPT_MQ_TIME_TO_BE_RECEIVED}
- RPC_C_OPT_BINDING_NONCAUSAL = 9;
- {$EXTERNALSYM RPC_C_OPT_BINDING_NONCAUSAL}
- RPC_C_OPT_SECURITY_CALLBACK = 10;
- {$EXTERNALSYM RPC_C_OPT_SECURITY_CALLBACK}
- RPC_C_OPT_UNIQUE_BINDING = 11;
- {$EXTERNALSYM RPC_C_OPT_UNIQUE_BINDING}
- RPC_C_OPT_CALL_TIMEOUT = 12;
- {$EXTERNALSYM RPC_C_OPT_CALL_TIMEOUT}
- RPC_C_OPT_DONT_LINGER = 13;
- {$EXTERNALSYM RPC_C_OPT_DONT_LINGER}
- RPC_C_OPT_MAX_OPTIONS = 14;
- {$EXTERNALSYM RPC_C_OPT_MAX_OPTIONS}
-
- RPC_C_MQ_EXPRESS = 0; // Client: RPC_C_MQ_DELIVERY.
- {$EXTERNALSYM RPC_C_MQ_EXPRESS}
- RPC_C_MQ_RECOVERABLE = 1;
- {$EXTERNALSYM RPC_C_MQ_RECOVERABLE}
-
- RPC_C_MQ_JOURNAL_NONE = 0; // Client: RPC_C_MQ_JOURNAL.
- {$EXTERNALSYM RPC_C_MQ_JOURNAL_NONE}
- RPC_C_MQ_JOURNAL_DEADLETTER = 1;
- {$EXTERNALSYM RPC_C_MQ_JOURNAL_DEADLETTER}
- RPC_C_MQ_JOURNAL_ALWAYS = 2;
- {$EXTERNALSYM RPC_C_MQ_JOURNAL_ALWAYS}
-
-// flags for RpcServerInqAuthClientEx
-
- RPC_C_FULL_CERT_CHAIN = $0001;
- {$EXTERNALSYM RPC_C_FULL_CERT_CHAIN}
-
-type
- PRPC_PROTSEQ_VECTORA = ^RPC_PROTSEQ_VECTORA;
- {$NODEFINE PRPC_PROTSEQ_VECTORA}
- _RPC_PROTSEQ_VECTORA = record
- Count: Cardinal;
- Protseq: array [0..0] of PByte
- end;
- {$EXTERNALSYM _RPC_PROTSEQ_VECTORA}
- RPC_PROTSEQ_VECTORA = _RPC_PROTSEQ_VECTORA;
- {$EXTERNALSYM RPC_PROTSEQ_VECTORA}
- TRpcProtSeqVectorA = RPC_PROTSEQ_VECTORA;
- PRpcProtSeqVectorA = PRPC_PROTSEQ_VECTORA;
-
- PRPC_PROTSEQ_VECTORW = ^RPC_PROTSEQ_VECTORW;
- {$NODEFINE PRPC_PROTSEQ_VECTORW}
- _RPC_PROTSEQ_VECTORW = record
- Count: Cardinal;
- Protseq: array [0..0] of PWord;
- end;
- {$EXTERNALSYM _RPC_PROTSEQ_VECTORW}
- RPC_PROTSEQ_VECTORW = _RPC_PROTSEQ_VECTORW;
- {$EXTERNALSYM RPC_PROTSEQ_VECTORW}
- TRpcProtSeqVectorW = RPC_PROTSEQ_VECTORW;
- PRpcProtSeqVectorW = PRPC_PROTSEQ_VECTORW;
-
- {$IFDEF UNICODE}
- RPC_PROTSEQ_VECTOR = RPC_PROTSEQ_VECTORW;
- {$EXTERNALSYM RPC_PROTSEQ_VECTOR}
- PRPC_PROTSEQ_VECTOR = PRPC_PROTSEQ_VECTORW;
- TRpcProtSeqVector = TRpcProtSeqVectorW;
- PRpcProtSeqVector = PRpcProtSeqVectorW;
- {$ELSE}
- RPC_PROTSEQ_VECTOR = RPC_PROTSEQ_VECTORA;
- {$EXTERNALSYM RPC_PROTSEQ_VECTOR}
- PRPC_PROTSEQ_VECTOR = PRPC_PROTSEQ_VECTORA;
- TRpcProtSeqVector = TRpcProtSeqVectorA;
- PRpcProtSeqVector = PRpcProtSeqVectorA;
- {$ENDIF UNICODE}
-
- PRPC_POLICY = ^RPC_POLICY;
- {$EXTERNALSYM PRPC_POLICY}
- _RPC_POLICY = record
- Length: Cardinal;
- EndpointFlags: Cardinal;
- NICFlags: Cardinal;
- end;
- {$EXTERNALSYM _RPC_POLICY}
- RPC_POLICY = _RPC_POLICY;
- {$EXTERNALSYM RPC_POLICY}
- TRpcPolicy = RPC_POLICY;
- PRpcPolicy = PRPC_POLICY;
-
- RPC_OBJECT_INQ_FN = procedure(const ObjectUuid: UUID; var TypeUuid: UUID;
- var Status: RPC_STATUS); stdcall;
- {$EXTERNALSYM RPC_OBJECT_INQ_FN}
- TRpcObjectInqFn = RPC_OBJECT_INQ_FN;
-
- RPC_IF_CALLBACK_FN = function(InterfaceUuid: RPC_IF_HANDLE; Context: Pointer): RPC_STATUS; stdcall;
- {$EXTERNALSYM RPC_IF_CALLBACK_FN}
- TRpcIfCallbackFn = RPC_IF_CALLBACK_FN;
-
- RPC_SECURITY_CALLBACK_FN = procedure(Context: Pointer); stdcall;
- {$EXTERNALSYM RPC_SECURITY_CALLBACK_FN}
- TRpcSecurityCallbackFn = RPC_SECURITY_CALLBACK_FN;
-
- PRPC_STATS_VECTOR = ^RPC_STATS_VECTOR;
- {$NODEFINE PRPC_STATS_VECTOR}
- RPC_STATS_VECTOR = record
- Count: Cardinal;
- Stats: array [0..0] of Cardinal;
- end;
- {$EXTERNALSYM RPC_STATS_VECTOR}
- TRpcStatsVector = RPC_STATS_VECTOR;
- PRpcStatsVector = PRPC_STATS_VECTOR;
-
-const
- RPC_C_STATS_CALLS_IN = 0;
- {$EXTERNALSYM RPC_C_STATS_CALLS_IN}
- RPC_C_STATS_CALLS_OUT = 1;
- {$EXTERNALSYM RPC_C_STATS_CALLS_OUT}
- RPC_C_STATS_PKTS_IN = 2;
- {$EXTERNALSYM RPC_C_STATS_PKTS_IN}
- RPC_C_STATS_PKTS_OUT = 3;
- {$EXTERNALSYM RPC_C_STATS_PKTS_OUT}
-
-type
- PRPC_IF_ID_VECTOR = ^RPC_IF_ID_VECTOR;
- {$NODEFINE RPC_IF_ID_VECTOR}
- RPC_IF_ID_VECTOR = record
- Count: Cardinal;
- IfId: array [0..0] of PRpcIfId;
- end;
- {$EXTERNALSYM RPC_IF_ID_VECTOR}
- TRpcIfIdVector = RPC_IF_ID_VECTOR;
- PRpcIfIdVector = PRPC_IF_ID_VECTOR;
-
-function RpcBindingCopy(SourceBinding: RPC_BINDING_HANDLE;
- var DestinationBinding: RPC_BINDING_HANDLE): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcBindingCopy}
-
-function RpcBindingFree(var Binding: RPC_BINDING_HANDLE): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcBindingFree}
-
-function RpcBindingSetOption(hBinding: RPC_BINDING_HANDLE; option: Cardinal;
- optionValue: ULONG_PTR): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcBindingSetOption}
-
-function RpcBindingInqOption(hBinding: RPC_BINDING_HANDLE; option: Cardinal;
- var pOptionValue: ULONG_PTR): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcBindingInqOption}
-
-function RpcBindingFromStringBindingA(StringBinding: PChar;
- var Binding: RPC_BINDING_HANDLE): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcBindingFromStringBindingA}
-function RpcBindingFromStringBindingW(StringBinding: PWideChar;
- var Binding: RPC_BINDING_HANDLE): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcBindingFromStringBindingW}
-function RpcBindingFromStringBinding(StringBinding: PTSTR;
- var Binding: RPC_BINDING_HANDLE): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcBindingFromStringBinding}
-
-function RpcSsGetContextBinding(ContextHandle: Pointer; var Binding: RPC_BINDING_HANDLE): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcSsGetContextBinding}
-
-function RpcBindingInqObject(Binding: RPC_BINDING_HANDLE; var ObjectUuid: UUID): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcBindingInqObject}
-
-function RpcBindingReset(Binding: RPC_BINDING_HANDLE): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcBindingReset}
-
-// RpcBindingServerFromClient : UNSUPPORTED
-// RpcBindingSetAuthInfo
-
-function RpcBindingSetObject(Binding: RPC_BINDING_HANDLE; const ObjectUuid: UUID): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcBindingSetObject}
-
-function RpcMgmtInqDefaultProtectLevel(AuthnSvc: Cardinal; var AuthnLevel: Cardinal): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcMgmtInqDefaultProtectLevel}
-
-function RpcBindingToStringBindingA(Binding: RPC_BINDING_HANDLE;
- var StringBinding: PChar): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcBindingToStringBindingA}
-function RpcBindingToStringBindingW(Binding: RPC_BINDING_HANDLE;
- var StringBinding: PWideChar): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcBindingToStringBindingW}
-function RpcBindingToStringBinding(Binding: RPC_BINDING_HANDLE;
- var StringBinding: PTSTR): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcBindingToStringBinding}
-
-function RpcBindingVectorFree(var BindingVector: PRPC_BINDING_VECTOR): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcBindingVectorFree}
-
-function RpcStringBindingComposeA(ObjUuid, Protseq, NetworkAddr, Endpoint,
- Options: PChar; var StringBinding: PChar): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcStringBindingComposeA}
-function RpcStringBindingComposeW(ObjUuid, Protseq, NetworkAddr, Endpoint,
- Options: PWideChar; var StringBinding: PWideChar): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcStringBindingComposeW}
-function RpcStringBindingCompose(ObjUuid, Protseq, NetworkAddr, Endpoint,
- Options: PTSTR; var StringBinding: PTSTR): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcStringBindingCompose}
-
-function RpcStringBindingParseA(StringBinding: PChar; ObjUuid, Protseq,
- NetworkAddr, Endpoint, NetworkOptions: PPChar): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcStringBindingParseA}
-function RpcStringBindingParseW(StringBinding: PWideChar; ObjUuid, Protseq,
- NetworkAddr, Endpoint, NetworkOptions: PPWideChar): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcStringBindingParseW}
-function RpcStringBindingParse(StringBinding: PTSTR; ObjUuid, Protseq,
- NetworkAddr, Endpoint, NetworkOptions: PPTSTR): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcStringBindingParse}
-
-function RpcStringFreeA(var S: PChar): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcStringFreeA}
-function RpcStringFreeW(var S: PWideChar): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcStringFreeW}
-function RpcStringFree(var S: PTSTR): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcStringFree}
-
-function RpcIfInqId(RpcIfHandle: RPC_IF_HANDLE; var RpcIfId: RPC_IF_ID): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcIfInqId}
-
-function RpcNetworkIsProtseqValidA(Protseq: PChar): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcNetworkIsProtseqValidA}
-
-function RpcNetworkIsProtseqValidW(Protseq: PWideChar): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcNetworkIsProtseqValidW}
-
-function RpcMgmtInqComTimeout(Binding: RPC_BINDING_HANDLE; var Timeout: Cardinal): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcMgmtInqComTimeout}
-
-function RpcMgmtSetComTimeout(Binding: RPC_BINDING_HANDLE; Timeout: Cardinal): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcMgmtSetComTimeout}
-
-function RpcMgmtSetCancelTimeout(Timeout: Longint): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcMgmtSetCancelTimeout}
-
-function RpcNetworkInqProtseqsA(var ProtseqVector: PRPC_PROTSEQ_VECTORA): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcNetworkInqProtseqsA}
-function RpcNetworkInqProtseqsW(var ProtseqVector: PRPC_PROTSEQ_VECTORW): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcNetworkInqProtseqsW}
-function RpcNetworkInqProtseqs(var ProtseqVector: PRPC_PROTSEQ_VECTOR): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcNetworkInqProtseqs}
-
-function RpcObjectInqType(const ObjUuid: UUID; TypeUuid: PUUID): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcObjectInqType}
-
-function RpcObjectSetInqFn(InquiryFn: RPC_OBJECT_INQ_FN): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcObjectSetInqFn}
-
-function RpcObjectSetType(const ObjUuid: UUID; TypeUuid: PUUID): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcObjectSetType}
-
-function RpcProtseqVectorFreeA(var ProtseqVector: PRPC_PROTSEQ_VECTORA): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcProtseqVectorFreeA}
-function RpcProtseqVectorFreeW(var ProtseqVector: PRPC_PROTSEQ_VECTORW): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcProtseqVectorFreeW}
-function RpcProtseqVectorFree(var ProtseqVector: PRPC_PROTSEQ_VECTOR): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcProtseqVectorFree}
-
-function RpcServerInqBindings(var BindingVector: PRPC_BINDING_VECTOR): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcServerInqBindings}
-
-function RpcServerInqIf(IfSpec: RPC_IF_HANDLE; MgrTypeUuid: PUUID;
- MgrEpv: Pointer): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcServerInqIf}
-
-function RpcServerListen(MinimumCallThreads, MaxCalls, DontWait: Cardinal): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcServerListen}
-
-function RpcServerRegisterIf(IfSpec: RPC_IF_HANDLE; MgrTypeUuid: PUUID;
- MgrEpv: Pointer): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcServerRegisterIf}
-
-function RpcServerRegisterIfEx(IfSpec: RPC_IF_HANDLE; MgrTypeUuid: PUUID;
- MgrEpv: Pointer; Flags, MaxCalls: Cardinal; IfCallback: RPC_IF_CALLBACK_FN): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcServerRegisterIfEx}
-
-function RpcServerRegisterIf2(IfSpec: RPC_IF_HANDLE; MgrTypeUuid: PUUID;
- MgrEpv: Pointer; Flags, MaxCalls, MaxRpcSize: Cardinal;
- IfCallbackFn: RPC_IF_CALLBACK_FN): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcServerRegisterIf2}
-
-function RpcServerUnregisterIf(IfSpec: RPC_IF_HANDLE; MgrTypeUuid: PUUID;
- WaitForCallsToComplete: Cardinal): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcServerUnregisterIf}
-
-function RpcServerUnregisterIfEx(IfSpec: RPC_IF_HANDLE; MgrTypeUuid: PUUID;
- RundownContextHandles: Integer): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcServerUnregisterIfEx}
-
-function RpcServerUseAllProtseqs(MaxCalls: Cardinal; SecurityDescriptor: Pointer): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcServerUseAllProtseqs}
-
-function RpcServerUseAllProtseqsEx(MaxCalls: Cardinal; SecurityDescriptor: Pointer;
- Policy: PRPC_POLICY): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcServerUseAllProtseqsEx}
-
-function RpcServerUseAllProtseqsIf(MaxCalls: Cardinal; IfSpec: RPC_IF_HANDLE;
- SecurityDescriptor: Pointer): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcServerUseAllProtseqsIf}
-
-function RpcServerUseAllProtseqsIfEx(MaxCalls: Cardinal; IfSpec: RPC_IF_HANDLE;
- SecurityDescriptor: Pointer; Policy: PRPC_POLICY): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcServerUseAllProtseqsIfEx}
-
-function RpcServerUseProtseqA(Protseq: PChar; MaxCalls: Cardinal;
- SecurityDescriptor: Pointer): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcServerUseProtseqA}
-function RpcServerUseProtseqW(Protseq: PWideChar; MaxCalls: Cardinal;
- SecurityDescriptor: Pointer): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcServerUseProtseqW}
-function RpcServerUseProtseq(Protseq: PTSTR; MaxCalls: Cardinal;
- SecurityDescriptor: Pointer): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcServerUseProtseq}
-
-function RpcServerUseProtseqExA(Protseq: PChar; MaxCalls: Cardinal;
- SecurityDescriptor: Pointer; const Policy: RPC_POLICY): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcServerUseProtseqExA}
-function RpcServerUseProtseqExW(Protseq: PWideChar; MaxCalls: Cardinal;
- SecurityDescriptor: Pointer; const Policy: RPC_POLICY): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcServerUseProtseqExW}
-function RpcServerUseProtseqEx(Protseq: PTSTR; MaxCalls: Cardinal;
- SecurityDescriptor: Pointer; const Policy: RPC_POLICY): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcServerUseProtseqEx}
-
-function RpcServerUseProtseqEpA(Protseq: PChar; MaxCalls: Cardinal;
- Endpoint: PChar; SecurityDescriptor: Pointer): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcServerUseProtseqEpA}
-function RpcServerUseProtseqEpW(Protseq: PWideChar; MaxCalls: Cardinal;
- Endpoint: PWideChar; SecurityDescriptor: Pointer): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcServerUseProtseqEpW}
-function RpcServerUseProtseqEp(Protseq: PTSTR; MaxCalls: Cardinal;
- Endpoint: PTSTR; SecurityDescriptor: Pointer): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcServerUseProtseqEp}
-
-function RpcServerUseProtseqEpExA(Protseq: PChar; MaxCalls: Cardinal;
- Endpoint: PChar; SecurityDescriptor: Pointer; const Policy: RPC_POLICY): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcServerUseProtseqEpExA}
-function RpcServerUseProtseqEpExW(Protseq: PWideChar; MaxCalls: Cardinal;
- Endpoint: PWideChar; SecurityDescriptor: Pointer; const Policy: RPC_POLICY): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcServerUseProtseqEpExW}
-function RpcServerUseProtseqEpEx(Protseq: PTSTR; MaxCalls: Cardinal;
- Endpoint: PTSTR; SecurityDescriptor: Pointer; const Policy: RPC_POLICY): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcServerUseProtseqEpEx}
-
-function RpcServerUseProtseqIfA(Protseq: PChar; MaxCalls: Cardinal;
- IfSpec: RPC_IF_HANDLE; SecurityDescriptor: Pointer): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcServerUseProtseqIfA}
-function RpcServerUseProtseqIfW(Protseq: PWideChar; MaxCalls: Cardinal;
- IfSpec: RPC_IF_HANDLE; SecurityDescriptor: Pointer): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcServerUseProtseqIfW}
-
-function RpcServerUseProtseqIfExA(Protseq: PChar; MaxCalls: Cardinal;
- IfSpec: RPC_IF_HANDLE; SecurityDescriptor: Pointer; const Policy: RPC_POLICY): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcServerUseProtseqIfExA}
-function RpcServerUseProtseqIfExW(Protseq: PWideChar; MaxCalls: Cardinal;
- IfSpec: RPC_IF_HANDLE; SecurityDescriptor: Pointer; const Policy: RPC_POLICY): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcServerUseProtseqIfExW}
-function RpcServerUseProtseqIfEx(Protseq: PTSTR; MaxCalls: Cardinal;
- IfSpec: RPC_IF_HANDLE; SecurityDescriptor: Pointer; const Policy: RPC_POLICY): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcServerUseProtseqIfEx}
-
-procedure RpcServerYield; stdcall;
-{$EXTERNALSYM RpcServerYield}
-
-function RpcMgmtStatsVectorFree(var StatsVector: PRPC_STATS_VECTOR): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcMgmtStatsVectorFree}
-
-function RpcMgmtInqStats(Binding: RPC_BINDING_HANDLE; var Statistics: PRPC_STATS_VECTOR): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcMgmtInqStats}
-
-function RpcMgmtIsServerListening(Binding: RPC_BINDING_HANDLE): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcMgmtIsServerListening}
-
-function RpcMgmtStopServerListening(Binding: RPC_BINDING_HANDLE): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcMgmtStopServerListening}
-
-function RpcMgmtWaitServerListen: RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcMgmtWaitServerListen}
-
-function RpcMgmtSetServerStackSize(ThreadStackSize: Cardinal): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcMgmtSetServerStackSize}
-
-procedure RpcSsDontSerializeContext; stdcall;
-{$EXTERNALSYM RpcSsDontSerializeContext}
-
-function RpcMgmtEnableIdleCleanup: RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcMgmtEnableIdleCleanup}
-
-function RpcMgmtInqIfIds(Binding: RPC_BINDING_HANDLE;
- var IfIdVector: PRPC_IF_ID_VECTOR): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcMgmtInqIfIds}
-
-function RpcIfIdVectorFree(var IfIdVector: PRPC_IF_ID_VECTOR): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcIfIdVectorFree}
-
-function RpcMgmtInqServerPrincNameA(Binding: RPC_BINDING_HANDLE;
- AuthnSvc: Cardinal; var ServerPrincName: PChar): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcMgmtInqServerPrincNameA}
-function RpcMgmtInqServerPrincNameW(Binding: RPC_BINDING_HANDLE;
- AuthnSvc: Cardinal; var ServerPrincName: PWideChar): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcMgmtInqServerPrincNameW}
-function RpcMgmtInqServerPrincName(Binding: RPC_BINDING_HANDLE;
- AuthnSvc: Cardinal; var ServerPrincName: PTSTR): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcMgmtInqServerPrincName}
-
-function RpcServerInqDefaultPrincNameA(AuthnSvc: Cardinal; var PrincName: PChar): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcServerInqDefaultPrincNameA}
-function RpcServerInqDefaultPrincNameW(AuthnSvc: Cardinal; var PrincName: PWideChar): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcServerInqDefaultPrincNameW}
-function RpcServerInqDefaultPrincName(AuthnSvc: Cardinal; var PrincName: PTSTR): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcServerInqDefaultPrincName}
-
-function RpcEpResolveBinding(Binding: RPC_BINDING_HANDLE; IfSpe: RPC_IF_HANDLE): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcEpResolveBinding}
-
-function RpcNsBindingInqEntryNameA(Binding: RPC_BINDING_HANDLE;
- EntryNameSyntax: Cardinal; var EntryName: PChar): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcNsBindingInqEntryNameA}
-function RpcNsBindingInqEntryNameW(Binding: RPC_BINDING_HANDLE;
- EntryNameSyntax: Cardinal; var EntryName: PWideChar): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcNsBindingInqEntryNameW}
-function RpcNsBindingInqEntryName(Binding: RPC_BINDING_HANDLE;
- EntryNameSyntax: Cardinal; var EntryName: PTSTR): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcNsBindingInqEntryName}
-
-type
- RPC_AUTH_IDENTITY_HANDLE = Pointer;
- {$EXTERNALSYM RPC_AUTH_IDENTITY_HANDLE}
- RPC_AUTHZ_HANDLE = Pointer;
- {$EXTERNALSYM RPC_AUTHZ_HANDLE}
- PRPC_AUTHZ_HANDLE = ^RPC_AUTHZ_HANDLE;
- {$NODEFINE PRPC_AUTHZ_HANDLE}
-
- PRPC_AUTH_IDENTITY_HANDLE = ^RPC_AUTH_IDENTITY_HANDLE;
- {$NODEFINE PRPC_AUTH_IDENTITY_HANDLE}
-
-const
- RPC_C_AUTHN_LEVEL_DEFAULT = 0;
- {$EXTERNALSYM RPC_C_AUTHN_LEVEL_DEFAULT}
- RPC_C_AUTHN_LEVEL_NONE = 1;
- {$EXTERNALSYM RPC_C_AUTHN_LEVEL_NONE}
- RPC_C_AUTHN_LEVEL_CONNECT = 2;
- {$EXTERNALSYM RPC_C_AUTHN_LEVEL_CONNECT}
- RPC_C_AUTHN_LEVEL_CALL = 3;
- {$EXTERNALSYM RPC_C_AUTHN_LEVEL_CALL}
- RPC_C_AUTHN_LEVEL_PKT = 4;
- {$EXTERNALSYM RPC_C_AUTHN_LEVEL_PKT}
- RPC_C_AUTHN_LEVEL_PKT_INTEGRITY = 5;
- {$EXTERNALSYM RPC_C_AUTHN_LEVEL_PKT_INTEGRITY}
- RPC_C_AUTHN_LEVEL_PKT_PRIVACY = 6;
- {$EXTERNALSYM RPC_C_AUTHN_LEVEL_PKT_PRIVACY}
-
- RPC_C_IMP_LEVEL_DEFAULT = 0;
- {$EXTERNALSYM RPC_C_IMP_LEVEL_DEFAULT}
- RPC_C_IMP_LEVEL_ANONYMOUS = 1;
- {$EXTERNALSYM RPC_C_IMP_LEVEL_ANONYMOUS}
- RPC_C_IMP_LEVEL_IDENTIFY = 2;
- {$EXTERNALSYM RPC_C_IMP_LEVEL_IDENTIFY}
- RPC_C_IMP_LEVEL_IMPERSONATE = 3;
- {$EXTERNALSYM RPC_C_IMP_LEVEL_IMPERSONATE}
- RPC_C_IMP_LEVEL_DELEGATE = 4;
- {$EXTERNALSYM RPC_C_IMP_LEVEL_DELEGATE}
-
- RPC_C_QOS_IDENTITY_STATIC = 0;
- {$EXTERNALSYM RPC_C_QOS_IDENTITY_STATIC}
- RPC_C_QOS_IDENTITY_DYNAMIC = 1;
- {$EXTERNALSYM RPC_C_QOS_IDENTITY_DYNAMIC}
-
- RPC_C_QOS_CAPABILITIES_DEFAULT = $0;
- {$EXTERNALSYM RPC_C_QOS_CAPABILITIES_DEFAULT}
- RPC_C_QOS_CAPABILITIES_MUTUAL_AUTH = $1;
- {$EXTERNALSYM RPC_C_QOS_CAPABILITIES_MUTUAL_AUTH}
- RPC_C_QOS_CAPABILITIES_MAKE_FULLSIC = $2;
- {$EXTERNALSYM RPC_C_QOS_CAPABILITIES_MAKE_FULLSIC}
- RPC_C_QOS_CAPABILITIES_ANY_AUTHORITY = $4;
- {$EXTERNALSYM RPC_C_QOS_CAPABILITIES_ANY_AUTHORITY}
- RPC_C_QOS_CAPABILITIES_IGNORE_DELEGATE_FAILURE = $8;
- {$EXTERNALSYM RPC_C_QOS_CAPABILITIES_IGNORE_DELEGATE_FAILURE}
- RPC_C_QOS_CAPABILITIES_LOCAL_MA_HINT = $10;
- {$EXTERNALSYM RPC_C_QOS_CAPABILITIES_LOCAL_MA_HINT}
-
- RPC_C_PROTECT_LEVEL_DEFAULT = RPC_C_AUTHN_LEVEL_DEFAULT;
- {$EXTERNALSYM RPC_C_PROTECT_LEVEL_DEFAULT}
- RPC_C_PROTECT_LEVEL_NONE = RPC_C_AUTHN_LEVEL_NONE;
- {$EXTERNALSYM RPC_C_PROTECT_LEVEL_NONE}
- RPC_C_PROTECT_LEVEL_CONNECT = RPC_C_AUTHN_LEVEL_CONNECT;
- {$EXTERNALSYM RPC_C_PROTECT_LEVEL_CONNECT}
- RPC_C_PROTECT_LEVEL_CALL = RPC_C_AUTHN_LEVEL_CALL;
- {$EXTERNALSYM RPC_C_PROTECT_LEVEL_CALL}
- RPC_C_PROTECT_LEVEL_PKT = RPC_C_AUTHN_LEVEL_PKT;
- {$EXTERNALSYM RPC_C_PROTECT_LEVEL_PKT}
- RPC_C_PROTECT_LEVEL_PKT_INTEGRITY = RPC_C_AUTHN_LEVEL_PKT_INTEGRITY;
- {$EXTERNALSYM RPC_C_PROTECT_LEVEL_PKT_INTEGRITY}
- RPC_C_PROTECT_LEVEL_PKT_PRIVACY = RPC_C_AUTHN_LEVEL_PKT_PRIVACY;
- {$EXTERNALSYM RPC_C_PROTECT_LEVEL_PKT_PRIVACY}
-
- RPC_C_AUTHN_NONE = 0;
- {$EXTERNALSYM RPC_C_AUTHN_NONE}
- RPC_C_AUTHN_DCE_PRIVATE = 1;
- {$EXTERNALSYM RPC_C_AUTHN_DCE_PRIVATE}
- RPC_C_AUTHN_DCE_PUBLIC = 2;
- {$EXTERNALSYM RPC_C_AUTHN_DCE_PUBLIC}
- RPC_C_AUTHN_DEC_PUBLIC = 4;
- {$EXTERNALSYM RPC_C_AUTHN_DEC_PUBLIC}
- RPC_C_AUTHN_GSS_NEGOTIATE = 9;
- {$EXTERNALSYM RPC_C_AUTHN_GSS_NEGOTIATE}
- RPC_C_AUTHN_WINNT = 10;
- {$EXTERNALSYM RPC_C_AUTHN_WINNT}
- RPC_C_AUTHN_GSS_SCHANNEL = 14;
- {$EXTERNALSYM RPC_C_AUTHN_GSS_SCHANNEL}
- RPC_C_AUTHN_GSS_KERBEROS = 16;
- {$EXTERNALSYM RPC_C_AUTHN_GSS_KERBEROS}
- RPC_C_AUTHN_DPA = 17;
- {$EXTERNALSYM RPC_C_AUTHN_DPA}
- RPC_C_AUTHN_MSN = 18;
- {$EXTERNALSYM RPC_C_AUTHN_MSN}
- RPC_C_AUTHN_DIGEST = 21;
- {$EXTERNALSYM RPC_C_AUTHN_DIGEST}
- RPC_C_AUTHN_MQ = 100;
- {$EXTERNALSYM RPC_C_AUTHN_MQ}
- RPC_C_AUTHN_DEFAULT = DWORD($FFFFFFFF);
- {$EXTERNALSYM RPC_C_AUTHN_DEFAULT}
-
- RPC_C_NO_CREDENTIALS = RPC_AUTH_IDENTITY_HANDLE(MAXUINT_PTR);
- {$EXTERNALSYM RPC_C_NO_CREDENTIALS}
-
- RPC_C_SECURITY_QOS_VERSION = 1;
- {$EXTERNALSYM RPC_C_SECURITY_QOS_VERSION}
- RPC_C_SECURITY_QOS_VERSION_1 = 1;
- {$EXTERNALSYM RPC_C_SECURITY_QOS_VERSION_1}
-
-type
- _RPC_SECURITY_QOS = record
- Version: Longint;
- Capabilities: Longint;
- IdentityTracking: Longint;
- ImpersonationType: Longint;
- end;
- {$EXTERNALSYM _RPC_SECURITY_QOS}
- RPC_SECURITY_QOS = _RPC_SECURITY_QOS;
- {$EXTERNALSYM RPC_SECURITY_QOS}
- PRPC_SECURITY_QOS = ^RPC_SECURITY_QOS;
- {$EXTERNALSYM PRPC_SECURITY_QOS}
- TRpcSecurityQos = RPC_SECURITY_QOS;
- PRpcSecurityQos = PRPC_SECURITY_QOS;
-
-const
- SEC_WINNT_AUTH_IDENTITY_ANSI = $1;
- {$EXTERNALSYM SEC_WINNT_AUTH_IDENTITY_ANSI}
- SEC_WINNT_AUTH_IDENTITY_UNICODE = $2;
- {$EXTERNALSYM SEC_WINNT_AUTH_IDENTITY_UNICODE}
-
-type
- _SEC_WINNT_AUTH_IDENTITY_W = record
- User: PWideChar;
- UserLength: Longint;
- Domain: PWideChar;
- DomainLength: Longint;
- Password: PWideChar;
- PasswordLength: Longint;
- Flags: Longint;
- end;
- {$EXTERNALSYM _SEC_WINNT_AUTH_IDENTITY_W}
- SEC_WINNT_AUTH_IDENTITY_W = _SEC_WINNT_AUTH_IDENTITY_W;
- {$EXTERNALSYM SEC_WINNT_AUTH_IDENTITY_W}
- PSEC_WINNT_AUTH_IDENTITY_W = ^SEC_WINNT_AUTH_IDENTITY_W;
- {$EXTERNALSYM PSEC_WINNT_AUTH_IDENTITY_W}
- TSecWinNTAuthIdentityW = SEC_WINNT_AUTH_IDENTITY_W;
- PSecWinNTAuthIdentityW = PSEC_WINNT_AUTH_IDENTITY_W;
-
- _SEC_WINNT_AUTH_IDENTITY_A = record
- User: PChar;
- UserLength: Longint;
- Domain: PChar;
- DomainLength: Longint;
- Password: PChar;
- PasswordLength: Longint;
- Flags: Longint;
- end;
- {$EXTERNALSYM _SEC_WINNT_AUTH_IDENTITY_A}
- SEC_WINNT_AUTH_IDENTITY_A = _SEC_WINNT_AUTH_IDENTITY_A;
- {$EXTERNALSYM SEC_WINNT_AUTH_IDENTITY_A}
- PSEC_WINNT_AUTH_IDENTITY_A = ^SEC_WINNT_AUTH_IDENTITY_A;
- {$EXTERNALSYM PSEC_WINNT_AUTH_IDENTITY_A}
- TSecWinNTAuthIdentityA = SEC_WINNT_AUTH_IDENTITY_A;
- PSecWinNTAuthIdentityA = PSEC_WINNT_AUTH_IDENTITY_A;
-
- {$IFDEF UNICODE}
- SEC_WINNT_AUTH_IDENTITY = SEC_WINNT_AUTH_IDENTITY_W;
- {$EXTERNALSYM SEC_WINNT_AUTH_IDENTITY}
- PSEC_WINNT_AUTH_IDENTITY = PSEC_WINNT_AUTH_IDENTITY_W;
- {$EXTERNALSYM PSEC_WINNT_AUTH_IDENTITY}
- _SEC_WINNT_AUTH_IDENTITY = _SEC_WINNT_AUTH_IDENTITY_W;
- {$EXTERNALSYM _SEC_WINNT_AUTH_IDENTITY}
- TSecWinNTAuthIdentity = TSecWinNTAuthIdentityW;
- PSecWinNTAuthIdentity = PSecWinNTAuthIdentityW;
- {$ELSE}
- SEC_WINNT_AUTH_IDENTITY = SEC_WINNT_AUTH_IDENTITY_A;
- {$EXTERNALSYM SEC_WINNT_AUTH_IDENTITY}
- PSEC_WINNT_AUTH_IDENTITY = PSEC_WINNT_AUTH_IDENTITY_A;
- {$EXTERNALSYM PSEC_WINNT_AUTH_IDENTITY}
- _SEC_WINNT_AUTH_IDENTITY = _SEC_WINNT_AUTH_IDENTITY_A;
- {$EXTERNALSYM _SEC_WINNT_AUTH_IDENTITY}
- TSecWinNTAuthIdentity = TSecWinNTAuthIdentityA;
- PSecWinNTAuthIdentity = PSecWinNTAuthIdentityA;
- {$ENDIF UNICODE}
-
-const
- RPC_C_SECURITY_QOS_VERSION_2 = 2;
- {$EXTERNALSYM RPC_C_SECURITY_QOS_VERSION_2}
-
- RPC_C_AUTHN_INFO_TYPE_HTTP = 1;
- {$EXTERNALSYM RPC_C_AUTHN_INFO_TYPE_HTTP}
-
- RPC_C_HTTP_AUTHN_TARGET_SERVER = 1;
- {$EXTERNALSYM RPC_C_HTTP_AUTHN_TARGET_SERVER}
- RPC_C_HTTP_AUTHN_TARGET_PROXY = 2;
- {$EXTERNALSYM RPC_C_HTTP_AUTHN_TARGET_PROXY}
-
- RPC_C_HTTP_AUTHN_SCHEME_BASIC = $00000001;
- {$EXTERNALSYM RPC_C_HTTP_AUTHN_SCHEME_BASIC}
- RPC_C_HTTP_AUTHN_SCHEME_NTLM = $00000002;
- {$EXTERNALSYM RPC_C_HTTP_AUTHN_SCHEME_NTLM}
- RPC_C_HTTP_AUTHN_SCHEME_PASSPORT = $00000004;
- {$EXTERNALSYM RPC_C_HTTP_AUTHN_SCHEME_PASSPORT}
- RPC_C_HTTP_AUTHN_SCHEME_DIGEST = $00000008;
- {$EXTERNALSYM RPC_C_HTTP_AUTHN_SCHEME_DIGEST}
- RPC_C_HTTP_AUTHN_SCHEME_NEGOTIATE = $00000010;
- {$EXTERNALSYM RPC_C_HTTP_AUTHN_SCHEME_NEGOTIATE}
-
- RPC_C_HTTP_FLAG_USE_SSL = 1;
- {$EXTERNALSYM RPC_C_HTTP_FLAG_USE_SSL}
- RPC_C_HTTP_FLAG_USE_FIRST_AUTH_SCHEME = 2;
- {$EXTERNALSYM RPC_C_HTTP_FLAG_USE_FIRST_AUTH_SCHEME}
-
-type
- _RPC_HTTP_TRANSPORT_CREDENTIALS_W = record
- TransportCredentials: PSEC_WINNT_AUTH_IDENTITY_W;
- Flags: Cardinal;
- AuthenticationTarget: Cardinal;
- NumberOfAuthnSchemes: Cardinal;
- AuthnSchemes: PCardinal;
- ServerCertificateSubject: PWord;
- end;
- {$EXTERNALSYM RPC_HTTP_TRANSPORT_CREDENTIALS_W}
- RPC_HTTP_TRANSPORT_CREDENTIALS_W = _RPC_HTTP_TRANSPORT_CREDENTIALS_W;
- {$EXTERNALSYM RPC_HTTP_TRANSPORT_CREDENTIALS_W}
- PRPC_HTTP_TRANSPORT_CREDENTIALS_W = ^RPC_HTTP_TRANSPORT_CREDENTIALS_W;
- {$EXTERNALSYM PRPC_HTTP_TRANSPORT_CREDENTIALS_W}
- TRpcHttpTransportCredentialsW = RPC_HTTP_TRANSPORT_CREDENTIALS_W;
- PRpcHttpTransportCredentialsW = PRPC_HTTP_TRANSPORT_CREDENTIALS_W;
-
- _RPC_HTTP_TRANSPORT_CREDENTIALS_A = record
- TransportCredentials: PSEC_WINNT_AUTH_IDENTITY_A;
- Flags: Cardinal;
- AuthenticationTarget: Cardinal;
- NumberOfAuthnSchemes: Cardinal;
- AuthnSchemes: PCardinal;
- ServerCertificateSubject: PByte;
- end;
- {$EXTERNALSYM RPC_HTTP_TRANSPORT_CREDENTIALS_A}
- RPC_HTTP_TRANSPORT_CREDENTIALS_A = _RPC_HTTP_TRANSPORT_CREDENTIALS_A;
- {$EXTERNALSYM RPC_HTTP_TRANSPORT_CREDENTIALS_A}
- PRPC_HTTP_TRANSPORT_CREDENTIALS_A = ^RPC_HTTP_TRANSPORT_CREDENTIALS_A;
- {$EXTERNALSYM PRPC_HTTP_TRANSPORT_CREDENTIALS_A}
- TRpcHttpTransportCredentialsA = RPC_HTTP_TRANSPORT_CREDENTIALS_A;
- PRpcHttpTransportCredentialsA = PRPC_HTTP_TRANSPORT_CREDENTIALS_A;
-
- _RPC_SECURITY_QOS_V2_W = record
- Version: Cardinal;
- Capabilities: Cardinal;
- IdentityTracking: Cardinal;
- ImpersonationType: Cardinal;
- AdditionalSecurityInfoType: Cardinal;
- case Integer of
- 0: (HttpCredentials: PRPC_HTTP_TRANSPORT_CREDENTIALS_W);
- end;
- {$EXTERNALSYM _RPC_SECURITY_QOS_V2_W}
- RPC_SECURITY_QOS_V2_W = _RPC_SECURITY_QOS_V2_W;
- {$EXTERNALSYM RPC_SECURITY_QOS_V2_W}
- PRPC_SECURITY_QOS_V2_W = ^RPC_SECURITY_QOS_V2_W;
- {$EXTERNALSYM PRPC_SECURITY_QOS_V2_W}
- TRpcSecurityQosV2W = RPC_SECURITY_QOS_V2_W;
- PRpcSecurityQosV2W = PRPC_SECURITY_QOS_V2_W;
-
- _RPC_SECURITY_QOS_V2_A = record
- Version: Cardinal;
- Capabilities: Cardinal;
- IdentityTracking: Cardinal;
- ImpersonationType: Cardinal;
- AdditionalSecurityInfoType: Cardinal;
- case Integer of
- 0: (HttpCredentials: PRPC_HTTP_TRANSPORT_CREDENTIALS_A);
- end;
- {$EXTERNALSYM _RPC_SECURITY_QOS_V2_A}
- RPC_SECURITY_QOS_V2_A = _RPC_SECURITY_QOS_V2_A;
- {$EXTERNALSYM RPC_SECURITY_QOS_V2_A}
- PRPC_SECURITY_QOS_V2_A = ^RPC_SECURITY_QOS_V2_A;
- {$EXTERNALSYM PRPC_SECURITY_QOS_V2_A}
- TRpcSecurityQosV2A = RPC_SECURITY_QOS_V2_A;
- PRpcSecurityQosV2A = PRPC_SECURITY_QOS_V2_A;
-
-const
- RPC_C_SECURITY_QOS_VERSION_3 = 3;
- {$EXTERNALSYM RPC_C_SECURITY_QOS_VERSION_3}
-
-type
- _RPC_SECURITY_QOS_V3_W = record
- Version: Cardinal;
- Capabilities: Cardinal;
- IdentityTracking: Cardinal;
- ImpersonationType: Cardinal;
- AdditionalSecurityInfoType: Cardinal;
- u: record
- case Integer of
- 0: (HttpCredentials: PRPC_HTTP_TRANSPORT_CREDENTIALS_W);
- end;
- Sid: Pointer;
- end;
- {$EXTERNALSYM _RPC_SECURITY_QOS_V3_W}
- RPC_SECURITY_QOS_V3_W = _RPC_SECURITY_QOS_V3_W;
- {$EXTERNALSYM RPC_SECURITY_QOS_V3_W}
- PRPC_SECURITY_QOS_V3_W = ^RPC_SECURITY_QOS_V3_W;
- {$EXTERNALSYM PRPC_SECURITY_QOS_V3_W}
- TRpcSecurityQosV3W = RPC_SECURITY_QOS_V3_W;
- PRpcSecurityQosV3W = PRPC_SECURITY_QOS_V3_W;
-
- _RPC_SECURITY_QOS_V3_A = record
- Version: Cardinal;
- Capabilities: Cardinal;
- IdentityTracking: Cardinal;
- ImpersonationType: Cardinal;
- AdditionalSecurityInfoType: Cardinal;
- u: record
- case Integer of
- 0: (HttpCredentials: PRPC_HTTP_TRANSPORT_CREDENTIALS_A);
- end;
- Sid: Pointer;
- end;
- {$EXTERNALSYM _RPC_SECURITY_QOS_V3_A}
- RPC_SECURITY_QOS_V3_A = _RPC_SECURITY_QOS_V3_A;
- {$EXTERNALSYM RPC_SECURITY_QOS_V3_A}
- PRPC_SECURITY_QOS_V3_A = ^RPC_SECURITY_QOS_V3_A;
- {$EXTERNALSYM PRPC_SECURITY_QOS_V3_A}
- TRpcSecurityQosV3A = RPC_SECURITY_QOS_V3_A;
- PRpcSecurityQosV3A = PRPC_SECURITY_QOS_V3_A;
-
- {$IFDEF UNICODE}
-
- RPC_SECURITY_QOS_V2 = RPC_SECURITY_QOS_V2_W;
- {$EXTERNALSYM RPC_SECURITY_QOS_V2}
- PRPC_SECURITY_QOS_V2 = PRPC_SECURITY_QOS_V2_W;
- {$EXTERNALSYM PRPC_SECURITY_QOS_V2}
- _RPC_SECURITY_QOS_V2 = _RPC_SECURITY_QOS_V2_W;
- {$EXTERNALSYM _RPC_SECURITY_QOS_V2}
- TRpcSecurityQosV2 = TRpcSecurityQosV2W;
- PRpcSecurityQosV2 = PRpcSecurityQosV2W;
-
- RPC_HTTP_TRANSPORT_CREDENTIALS = RPC_HTTP_TRANSPORT_CREDENTIALS_W;
- {$EXTERNALSYM RPC_HTTP_TRANSPORT_CREDENTIALS}
- PRPC_HTTP_TRANSPORT_CREDENTIALS = PRPC_HTTP_TRANSPORT_CREDENTIALS_W;
- {$EXTERNALSYM PRPC_HTTP_TRANSPORT_CREDENTIALS}
- _RPC_HTTP_TRANSPORT_CREDENTIALS = _RPC_HTTP_TRANSPORT_CREDENTIALS_W;
- {$EXTERNALSYM _RPC_HTTP_TRANSPORT_CREDENTIALS}
- TRpcHttpTransportCredentials = TRpcHttpTransportCredentialsW;
- PRpcHttpTransportCredentials = PRpcHttpTransportCredentialsW;
-
- RPC_SECURITY_QOS_V3 = RPC_SECURITY_QOS_V3_W;
- {$EXTERNALSYM RPC_SECURITY_QOS_V3}
- PRPC_SECURITY_QOS_V3 = PRPC_SECURITY_QOS_V3_W;
- {$EXTERNALSYM PRPC_SECURITY_QOS_V3}
- _RPC_SECURITY_QOS_V3 = _RPC_SECURITY_QOS_V3_W;
- {$EXTERNALSYM _RPC_SECURITY_QOS_V3}
- TRpcSecurityQosV3 = TRpcSecurityQosV3W;
- PRpcSecurityQosV3 = PRpcSecurityQosV3W;
-
- {$ELSE}
-
- RPC_SECURITY_QOS_V2 = RPC_SECURITY_QOS_V2_A;
- {$EXTERNALSYM RPC_SECURITY_QOS_V2}
- PRPC_SECURITY_QOS_V2 = PRPC_SECURITY_QOS_V2_A;
- {$EXTERNALSYM PRPC_SECURITY_QOS_V2}
- _RPC_SECURITY_QOS_V2 = _RPC_SECURITY_QOS_V2_A;
- {$EXTERNALSYM _RPC_SECURITY_QOS_V2}
- TRpcSecurityQosV2 = TRpcSecurityQosV2A;
- PRpcSecurityQosV2 = PRpcSecurityQosV2A;
-
- RPC_HTTP_TRANSPORT_CREDENTIALS = RPC_HTTP_TRANSPORT_CREDENTIALS_A;
- {$EXTERNALSYM RPC_HTTP_TRANSPORT_CREDENTIALS}
- PRPC_HTTP_TRANSPORT_CREDENTIALS = PRPC_HTTP_TRANSPORT_CREDENTIALS_A;
- {$EXTERNALSYM PRPC_HTTP_TRANSPORT_CREDENTIALS}
- _RPC_HTTP_TRANSPORT_CREDENTIALS = _RPC_HTTP_TRANSPORT_CREDENTIALS_A;
- {$EXTERNALSYM _RPC_HTTP_TRANSPORT_CREDENTIALS}
- TRpcHttpTransportCredentials = TRpcHttpTransportCredentialsA;
- PRpcHttpTransportCredentials = PRpcHttpTransportCredentialsA;
-
- RPC_SECURITY_QOS_V3 = RPC_SECURITY_QOS_V3_A;
- {$EXTERNALSYM RPC_SECURITY_QOS_V3}
- PRPC_SECURITY_QOS_V3 = PRPC_SECURITY_QOS_V3_A;
- {$EXTERNALSYM PRPC_SECURITY_QOS_V3}
- _RPC_SECURITY_QOS_V3 = _RPC_SECURITY_QOS_V3_A;
- {$EXTERNALSYM _RPC_SECURITY_QOS_V3}
- TRpcSecurityQosV3 = TRpcSecurityQosV3A;
- PRpcSecurityQosV3 = PRpcSecurityQosV3A;
-
- {$ENDIF UNICODE}
-
-type
- RPC_NEW_HTTP_PROXY_CHANNEL = function(ServerName: PWideChar; ServerPort: PWord; RemoteUser: PByte; out NewServerName: PWord): RPC_STATUS; stdcall;
- {$EXTERNALSYM RPC_NEW_HTTP_PROXY_CHANNEL}
-
- RPC_HTTP_PROXY_FREE_STRING = procedure(ServerName: PWideChar); stdcall;
- {$EXTERNALSYM RPC_HTTP_PROXY_FREE_STRING}
-
-const
- RPC_C_AUTHZ_NONE = 0;
- {$EXTERNALSYM RPC_C_AUTHZ_NONE}
- RPC_C_AUTHZ_NAME = 1;
- {$EXTERNALSYM RPC_C_AUTHZ_NAME}
- RPC_C_AUTHZ_DCE = 2;
- {$EXTERNALSYM RPC_C_AUTHZ_DCE}
- RPC_C_AUTHZ_DEFAULT = DWORD($ffffffff);
- {$EXTERNALSYM RPC_C_AUTHZ_DEFAULT}
-
-function RpcImpersonateClient(BindingHandle: RPC_BINDING_HANDLE): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcImpersonateClient}
-
-function RpcRevertToSelfEx(BindingHandle: RPC_BINDING_HANDLE): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcRevertToSelfEx}
-
-function RpcRevertToSelf: RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcRevertToSelf}
-
-function RpcBindingInqAuthClientA(ClientBinding: RPC_BINDING_HANDLE;
- Privs: PRPC_AUTHZ_HANDLE; ServerPrincName: PPChar; AuthnLevel, AuthnSvc,
- AuthzSvc: PCardinal): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcBindingInqAuthClientA}
-function RpcBindingInqAuthClientW(ClientBinding: RPC_BINDING_HANDLE;
- Privs: PRPC_AUTHZ_HANDLE; ServerPrincName: PPWideChar; AuthnLevel, AuthnSvc,
- AuthzSvc: PCardinal): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcBindingInqAuthClientW}
-
-function RpcBindingInqAuthClientExA(ClientBinding: RPC_BINDING_HANDLE;
- Privs: PRPC_AUTHZ_HANDLE; ServerPrincName: PPChar; AuthnLevel, AuthnSvc,
- AuthzSvc: PCardinal; Flags: Cardinal): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcBindingInqAuthClientExA}
-function RpcBindingInqAuthClientExW(ClientBinding: RPC_BINDING_HANDLE;
- Privs: PRPC_AUTHZ_HANDLE; ServerPrincName: PPWideChar; AuthnLevel, AuthnSvc,
- AuthzSvc: PCardinal; Flags: Cardinal): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcBindingInqAuthClientExW}
-
-function RpcBindingInqAuthInfoA(Binding: RPC_BINDING_HANDLE; ServerPrincName: PPChar;
- AuthnLevel, AuthnSvc: PCardinal; AuthIdentity: PRPC_AUTH_IDENTITY_HANDLE;
- AuthzSvc: PCardinal): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcBindingInqAuthInfoA}
-function RpcBindingInqAuthInfoW(Binding: RPC_BINDING_HANDLE; ServerPrincName: PPWideChar;
- AuthnLevel, AuthnSvc: PCardinal; AuthIdentity: PRPC_AUTH_IDENTITY_HANDLE;
- AuthzSvc: PCardinal): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcBindingInqAuthInfoW}
-
-function RpcBindingSetAuthInfoA(Binding: RPC_BINDING_HANDLE; ServerPrincName: PChar;
- AuthnLevel, AuthnSvc: Cardinal; AuthIdentity: RPC_AUTH_IDENTITY_HANDLE;
- AuthzSvc: Cardinal): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcBindingSetAuthInfoA}
-function RpcBindingSetAuthInfoW(Binding: RPC_BINDING_HANDLE; ServerPrincName: PWideChar;
- AuthnLevel, AuthnSvc: Cardinal; AuthIdentity: RPC_AUTH_IDENTITY_HANDLE;
- AuthzSvc: Cardinal): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcBindingSetAuthInfoW}
-
-function RpcBindingSetAuthInfoExA(Binding: RPC_BINDING_HANDLE;
- ServerPrincName: PChar; AuthnLevel, AuthnSvc: Cardinal;
- AuthIdentity: RPC_AUTH_IDENTITY_HANDLE; AuthzSvc: Cardinal;
- const SecurityQOS: RPC_SECURITY_QOS): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcBindingSetAuthInfoExA}
-function RpcBindingSetAuthInfoExW(Binding: RPC_BINDING_HANDLE;
- ServerPrincName: PWideChar; AuthnLevel, AuthnSvc: Cardinal;
- AuthIdentity: RPC_AUTH_IDENTITY_HANDLE; AuthzSvc: Cardinal;
- const SecurityQOS: RPC_SECURITY_QOS): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcBindingSetAuthInfoExW}
-
-function RpcBindingInqAuthInfoExA(Binding: RPC_BINDING_HANDLE;
- ServerPrincName: PPChar; AuthnLevel, AuthnSvc: PCardinal;
- AuthIdentity: PRPC_AUTH_IDENTITY_HANDLE; AuthzSvc: PCardinal;
- RpcQosVersion: Cardinal; var SecurityQOS: RPC_SECURITY_QOS): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcBindingInqAuthInfoExA}
-function RpcBindingInqAuthInfoExW(Binding: RPC_BINDING_HANDLE;
- ServerPrincName: PPWideChar; AuthnLevel, AuthnSvc: PCardinal;
- AuthIdentity: PRPC_AUTH_IDENTITY_HANDLE; AuthzSvc: PCardinal;
- RpcQosVersion: Cardinal; var SecurityQOS: RPC_SECURITY_QOS): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcBindingInqAuthInfoExW}
-
-type
- RPC_AUTH_KEY_RETRIEVAL_FN = procedure(Arg: Pointer; ServerPrincName: PWideChar;
- KeyVer: Cardinal; var Key: Pointer; var Status: RPC_STATUS); stdcall;
- {$EXTERNALSYM RPC_AUTH_KEY_RETRIEVAL_FN}
- TRpcAuthKeyRetrievalFn = RPC_AUTH_KEY_RETRIEVAL_FN;
-
-function RpcServerRegisterAuthInfoA(ServerPrincName: PChar; AuthnSvc: Cardinal;
- GetKeyFn: RPC_AUTH_KEY_RETRIEVAL_FN; Arg: Pointer): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcServerRegisterAuthInfoA}
-function RpcServerRegisterAuthInfoW(ServerPrincName: PWideChar; AuthnSvc: Cardinal;
- GetKeyFn: RPC_AUTH_KEY_RETRIEVAL_FN; Arg: Pointer): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcServerRegisterAuthInfoW}
-function RpcBindingInqAuthClient(ClientBinding: RPC_BINDING_HANDLE;
- Privs: PRPC_AUTHZ_HANDLE; ServerPrincName: PPTSTR; AuthnLevel, AuthnSvc,
- AuthzSvc: PCardinal): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcBindingInqAuthClient}
-function RpcBindingInqAuthClientEx(ClientBinding: RPC_BINDING_HANDLE;
- Privs: PRPC_AUTHZ_HANDLE; ServerPrincName: PPTSTR; AuthnLevel, AuthnSvc,
- AuthzSvc: PCardinal; Flags: Cardinal): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcBindingInqAuthClientEx}
-function RpcBindingInqAuthInfo(Binding: RPC_BINDING_HANDLE; ServerPrincName: PPTSTR;
- AuthnLevel, AuthnSvc: PCardinal; AuthIdentity: PRPC_AUTH_IDENTITY_HANDLE;
- AuthzSvc: PCardinal): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcBindingInqAuthInfo}
-function RpcBindingSetAuthInfo(Binding: RPC_BINDING_HANDLE; ServerPrincName: PTSTR;
- AuthnLevel, AuthnSvc: Cardinal; AuthIdentity: RPC_AUTH_IDENTITY_HANDLE;
- AuthzSvc: Cardinal): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcBindingSetAuthInfo}
-function RpcBindingSetAuthInfoEx(Binding: RPC_BINDING_HANDLE;
- ServerPrincName: PTSTR; AuthnLevel, AuthnSvc: Cardinal;
- AuthIdentity: RPC_AUTH_IDENTITY_HANDLE; AuthzSvc: Cardinal;
- const SecurityQOS: RPC_SECURITY_QOS): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcBindingSetAuthInfoEx}
-function RpcBindingInqAuthInfoEx(Binding: RPC_BINDING_HANDLE;
- ServerPrincName: PPTSTR; AuthnLevel, AuthnSvc: PCardinal;
- AuthIdentity: PRPC_AUTH_IDENTITY_HANDLE; AuthzSvc: PCardinal;
- RpcQosVersion: Cardinal; var SecurityQOS: RPC_SECURITY_QOS): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcBindingInqAuthInfoEx}
-function RpcServerRegisterAuthInfo(ServerPrincName: PTSTR; AuthnSvc: Cardinal;
- GetKeyFn: RPC_AUTH_KEY_RETRIEVAL_FN; Arg: Pointer): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcServerRegisterAuthInfo}
-
-type
- RPC_CLIENT_INFORMATION1 = record
- UserName: PChar;
- ComputerName: PChar;
- Privilege: Word;
- AuthFlags: Longword;
- end;
- {$EXTERNALSYM RPC_CLIENT_INFORMATION1}
- PRPC_CLIENT_INFORMATION1 = ^RPC_CLIENT_INFORMATION1;
- {$EXTERNALSYM PRPC_CLIENT_INFORMATION1}
- TRpcClientInformation1 = RPC_CLIENT_INFORMATION1;
- PRpcClientInformation1 = PRPC_CLIENT_INFORMATION1;
-
-function RpcBindingServerFromClient(ClientBinding: RPC_BINDING_HANDLE;
- var ServerBinding: RPC_BINDING_HANDLE): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcBindingServerFromClient}
-
-procedure RpcRaiseException(exception: RPC_STATUS); stdcall;
-{$EXTERNALSYM RpcRaiseException}
-
-function RpcTestCancel: RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcTestCancel}
-
-function RpcServerTestCancel(BindingHandle: RPC_BINDING_HANDLE): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcServerTestCancel}
-
-function RpcCancelThread(Thread: Pointer): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcCancelThread}
-
-function RpcCancelThreadEx(Thread: Pointer; Timeout: Longint): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcCancelThreadEx}
-
-function UuidCreate(var Uuid: UUID): RPC_STATUS; stdcall;
-{$EXTERNALSYM UuidCreate}
-
-function UuidCreateSequential(out Uuid: UUID): RPC_STATUS; stdcall;
-{$EXTERNALSYM UuidCreateSequential}
-
-function UuidFromStringA(StringUuid: PChar; var Uuid: UUID): RPC_STATUS; stdcall;
-{$EXTERNALSYM UuidFromStringA}
-function UuidFromStringW(StringUuid: PWideChar; var Uuid: UUID): RPC_STATUS; stdcall;
-{$EXTERNALSYM UuidFromStringW}
-function UuidFromString(StringUuid: PTSTR; var Uuid: UUID): RPC_STATUS; stdcall;
-{$EXTERNALSYM UuidFromString}
-
-function UuidToStringA(const Uuid: UUID; var StringUuid: PChar): RPC_STATUS; stdcall;
-{$EXTERNALSYM UuidToStringA}
-function UuidToStringW(const Uuid: UUID; var StringUuid: PWideChar): RPC_STATUS; stdcall;
-{$EXTERNALSYM UuidToStringW}
-function UuidToString(const Uuid: UUID; var StringUuid: PTSTR): RPC_STATUS; stdcall;
-{$EXTERNALSYM UuidToString}
-
-function UuidCompare(const Uuid1, Uuid2: UUID; var Status: RPC_STATUS): Integer; stdcall;
-{$EXTERNALSYM UuidCompare}
-
-function UuidCreateNil(var NilUuid: UUID): RPC_STATUS; stdcall;
-{$EXTERNALSYM UuidCreateNil}
-
-function UuidEqual(const Uuid1, Uuid2: UUID; var Status: RPC_STATUS): Integer; stdcall;
-{$EXTERNALSYM UuidEqual}
-
-function UuidHash(const Uuid: UUID; var Status: RPC_STATUS): Word; stdcall;
-{$EXTERNALSYM UuidHash}
-
-function UuidIsNil(const Uuid: UUID; var Status: RPC_STATUS): Integer; stdcall;
-{$EXTERNALSYM UuidIsNil}
-
-function RpcEpRegisterNoReplaceA(IfSpec: RPC_IF_HANDLE;
- BindingVector: PRPC_BINDING_VECTOR; UuidVector: PUUID_VECTOR;
- Annotation: PChar): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcEpRegisterNoReplaceA}
-function RpcEpRegisterNoReplaceW(IfSpec: RPC_IF_HANDLE;
- BindingVector: PRPC_BINDING_VECTOR; UuidVector: PUUID_VECTOR;
- Annotation: PWideChar): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcEpRegisterNoReplaceW}
-function RpcEpRegisterNoReplace(IfSpec: RPC_IF_HANDLE;
- BindingVector: PRPC_BINDING_VECTOR; UuidVector: PUUID_VECTOR;
- Annotation: PTSTR): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcEpRegisterNoReplace}
-
-function RpcEpRegisterA(IfSpec: RPC_IF_HANDLE; BindingVector: PRPC_BINDING_VECTOR;
- UuidVector: PUUID_VECTOR; Annotation: PChar): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcEpRegisterA}
-function RpcEpRegisterW(IfSpec: RPC_IF_HANDLE; BindingVector: PRPC_BINDING_VECTOR;
- UuidVector: PUUID_VECTOR; Annotation: PWideChar): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcEpRegisterW}
-
-function RpcEpRegister(IfSpec: RPC_IF_HANDLE; BindingVector: PRPC_BINDING_VECTOR;
- UuidVector: PUUID_VECTOR; Annotation: PTSTR): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcEpRegister}
-
-function RpcEpUnregister(IfSpec: RPC_IF_HANDLE; BindingVector: PRPC_BINDING_VECTOR;
- UuidVector: UUID_VECTOR): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcEpUnregister}
-
-function DceErrorInqTextA(RpcStatus: RPC_STATUS; ErrorText: PChar): RPC_STATUS; stdcall;
-{$EXTERNALSYM DceErrorInqTextA}
-function DceErrorInqTextW(RpcStatus: RPC_STATUS; ErrorText: PWideChar): RPC_STATUS; stdcall;
-{$EXTERNALSYM DceErrorInqTextW}
-function DceErrorInqText(RpcStatus: RPC_STATUS; ErrorText: PTSTR): RPC_STATUS; stdcall;
-{$EXTERNALSYM DceErrorInqText}
-
-const
- DCE_C_ERROR_STRING_LEN = 256;
- {$EXTERNALSYM DCE_C_ERROR_STRING_LEN}
-
-type
- RPC_EP_INQ_HANDLE = ^I_RPC_HANDLE;
- {$EXTERNALSYM RPC_EP_INQ_HANDLE}
-
-const
- RPC_C_EP_ALL_ELTS = 0;
- {$EXTERNALSYM RPC_C_EP_ALL_ELTS}
- RPC_C_EP_MATCH_BY_IF = 1;
- {$EXTERNALSYM RPC_C_EP_MATCH_BY_IF}
- RPC_C_EP_MATCH_BY_OBJ = 2;
- {$EXTERNALSYM RPC_C_EP_MATCH_BY_OBJ}
- RPC_C_EP_MATCH_BY_BOTH = 3;
- {$EXTERNALSYM RPC_C_EP_MATCH_BY_BOTH}
-
- RPC_C_VERS_ALL = 1;
- {$EXTERNALSYM RPC_C_VERS_ALL}
- RPC_C_VERS_COMPATIBLE = 2;
- {$EXTERNALSYM RPC_C_VERS_COMPATIBLE}
- RPC_C_VERS_EXACT = 3;
- {$EXTERNALSYM RPC_C_VERS_EXACT}
- RPC_C_VERS_MAJOR_ONLY = 4;
- {$EXTERNALSYM RPC_C_VERS_MAJOR_ONLY}
- RPC_C_VERS_UPTO = 5;
- {$EXTERNALSYM RPC_C_VERS_UPTO}
-
-function RpcMgmtEpEltInqBegin(EpBinding: RPC_BINDING_HANDLE; InquiryType: Cardinal;
- IfId: PRPC_IF_ID; VersOption: Cardinal; ObjectUuid: PUUID;
- var InquiryContext: RPC_EP_INQ_HANDLE): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcMgmtEpEltInqBegin}
-
-function RpcMgmtEpEltInqDone(var InquiryContext: RPC_EP_INQ_HANDLE): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcMgmtEpEltInqDone}
-
-function RpcMgmtEpEltInqNextA(InquiryContext: RPC_EP_INQ_HANDLE; var IfId: RPC_IF_ID;
- Binding: PRPC_BINDING_HANDLE; ObjectUuid: PUUID; var Annotation: PChar): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcMgmtEpEltInqNextA}
-function RpcMgmtEpEltInqNextW(InquiryContext: RPC_EP_INQ_HANDLE; var IfId: RPC_IF_ID;
- Binding: PRPC_BINDING_HANDLE; ObjectUuid: PUUID; var Annotation: PWideChar): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcMgmtEpEltInqNextW}
-function RpcMgmtEpEltInqNext(InquiryContext: RPC_EP_INQ_HANDLE; var IfId: RPC_IF_ID;
- Binding: PRPC_BINDING_HANDLE; ObjectUuid: PUUID; var Annotation: PTSTR): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcMgmtEpEltInqNext}
-
-function RpcMgmtEpUnregister(EpBinding: RPC_BINDING_HANDLE; IfId: PRPC_IF_ID;
- Binding: RPC_BINDING_HANDLE; ObjectUuid : PUUID): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcMgmtEpUnregister}
-
-type
- RPC_MGMT_AUTHORIZATION_FN = function(ClientBinding: RPC_BINDING_HANDLE;
- RequestedMgmtOperation: Cardinal; var Status: RPC_STATUS): Integer; stdcall;
- {$EXTERNALSYM RPC_MGMT_AUTHORIZATION_FN}
- TRpcMgmtAuthorizationFn = RPC_MGMT_AUTHORIZATION_FN;
-
-const
- RPC_C_MGMT_INQ_IF_IDS = 0;
- {$EXTERNALSYM RPC_C_MGMT_INQ_IF_IDS}
- RPC_C_MGMT_INQ_PRINC_NAME = 1;
- {$EXTERNALSYM RPC_C_MGMT_INQ_PRINC_NAME}
- RPC_C_MGMT_INQ_STATS = 2;
- {$EXTERNALSYM RPC_C_MGMT_INQ_STATS}
- RPC_C_MGMT_IS_SERVER_LISTEN = 3;
- {$EXTERNALSYM RPC_C_MGMT_IS_SERVER_LISTEN}
- RPC_C_MGMT_STOP_SERVER_LISTEN = 4;
- {$EXTERNALSYM RPC_C_MGMT_STOP_SERVER_LISTEN}
-
-function RpcMgmtSetAuthorizationFn(AuthorizationFn: RPC_MGMT_AUTHORIZATION_FN): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcMgmtSetAuthorizationFn}
-
-const
- RPC_C_PARM_MAX_PACKET_LENGTH = 1;
- {$EXTERNALSYM RPC_C_PARM_MAX_PACKET_LENGTH}
- RPC_C_PARM_BUFFER_LENGTH = 2;
- {$EXTERNALSYM RPC_C_PARM_BUFFER_LENGTH}
-
- RPC_IF_AUTOLISTEN = $0001;
- {$EXTERNALSYM RPC_IF_AUTOLISTEN}
- RPC_IF_OLE = $0002;
- {$EXTERNALSYM RPC_IF_OLE}
- RPC_IF_ALLOW_UNKNOWN_AUTHORITY = $0004;
- {$EXTERNALSYM RPC_IF_ALLOW_UNKNOWN_AUTHORITY}
- RPC_IF_ALLOW_SECURE_ONLY = $0008;
- {$EXTERNALSYM RPC_IF_ALLOW_SECURE_ONLY}
- RPC_IF_ALLOW_CALLBACKS_WITH_NO_AUTH = $0010;
- {$EXTERNALSYM RPC_IF_ALLOW_CALLBACKS_WITH_NO_AUTH}
-
-implementation
-
-const
- rpclib = 'rpcrt4.dll';
- {$IFDEF UNICODE}
- AWSuffix = 'W';
- {$ELSE}
- AWSuffix = 'A';
- {$ENDIF UNICODE}
-
-{$IFDEF DYNAMIC_LINK}
-
-var
- _RpcBindingCopy: Pointer;
-
-function RpcBindingCopy;
-begin
- GetProcedureAddress(_RpcBindingCopy, rpclib, 'RpcBindingCopy');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcBindingCopy]
- end;
-end;
-
-var
- _RpcBindingFree: Pointer;
-
-function RpcBindingFree;
-begin
- GetProcedureAddress(_RpcBindingFree, rpclib, 'RpcBindingFree');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcBindingFree]
- end;
-end;
-
-var
- _RpcBindingSetOption: Pointer;
-
-function RpcBindingSetOption;
-begin
- GetProcedureAddress(_RpcBindingSetOption, rpclib, 'RpcBindingSetOption');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcBindingSetOption]
- end;
-end;
-
-var
- _RpcBindingInqOption: Pointer;
-
-function RpcBindingInqOption;
-begin
- GetProcedureAddress(_RpcBindingInqOption, rpclib, 'RpcBindingInqOption');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcBindingInqOption]
- end;
-end;
-
-var
- _RpcBindingFromStringBindingA: Pointer;
-
-function RpcBindingFromStringBindingA;
-begin
- GetProcedureAddress(_RpcBindingFromStringBindingA, rpclib, 'RpcBindingFromStringBindingA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcBindingFromStringBindingA]
- end;
-end;
-
-var
- _RpcBindingFromStringBindingW: Pointer;
-
-function RpcBindingFromStringBindingW;
-begin
- GetProcedureAddress(_RpcBindingFromStringBindingW, rpclib, 'RpcBindingFromStringBindingW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcBindingFromStringBindingW]
- end;
-end;
-
-var
- _RpcBindingFromStringBinding: Pointer;
-
-function RpcBindingFromStringBinding;
-begin
- GetProcedureAddress(_RpcBindingFromStringBinding, rpclib, 'RpcBindingFromStringBinding' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcBindingFromStringBinding]
- end;
-end;
-
-var
- _RpcSsGetContextBinding: Pointer;
-
-function RpcSsGetContextBinding;
-begin
- GetProcedureAddress(_RpcSsGetContextBinding, rpclib, 'RpcSsGetContextBinding');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcSsGetContextBinding]
- end;
-end;
-
-var
- _RpcBindingInqObject: Pointer;
-
-function RpcBindingInqObject;
-begin
- GetProcedureAddress(_RpcBindingInqObject, rpclib, 'RpcBindingInqObject');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcBindingInqObject]
- end;
-end;
-
-var
- _RpcBindingReset: Pointer;
-
-function RpcBindingReset;
-begin
- GetProcedureAddress(_RpcBindingReset, rpclib, 'RpcBindingReset');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcBindingReset]
- end;
-end;
-
-var
- _RpcBindingSetObject: Pointer;
-
-function RpcBindingSetObject;
-begin
- GetProcedureAddress(_RpcBindingSetObject, rpclib, 'RpcBindingSetObject');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcBindingSetObject]
- end;
-end;
-
-var
- _RpcMgmtInqDefaultProtectLevel: Pointer;
-
-function RpcMgmtInqDefaultProtectLevel;
-begin
- GetProcedureAddress(_RpcMgmtInqDefaultProtectLevel, rpclib, 'RpcMgmtInqDefaultProtectLevel');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcMgmtInqDefaultProtectLevel]
- end;
-end;
-
-var
- _RpcBindingToStringBindingA: Pointer;
-
-function RpcBindingToStringBindingA;
-begin
- GetProcedureAddress(_RpcBindingToStringBindingA, rpclib, 'RpcBindingToStringBindingA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcBindingToStringBindingA]
- end;
-end;
-
-var
- _RpcBindingToStringBindingW: Pointer;
-
-function RpcBindingToStringBindingW;
-begin
- GetProcedureAddress(_RpcBindingToStringBindingW, rpclib, 'RpcBindingToStringBindingW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcBindingToStringBindingW]
- end;
-end;
-
-var
- _RpcBindingToStringBinding: Pointer;
-
-function RpcBindingToStringBinding;
-begin
- GetProcedureAddress(_RpcBindingToStringBinding, rpclib, 'RpcBindingToStringBinding' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcBindingToStringBinding]
- end;
-end;
-
-var
- _RpcBindingVectorFree: Pointer;
-
-function RpcBindingVectorFree;
-begin
- GetProcedureAddress(_RpcBindingVectorFree, rpclib, 'RpcBindingVectorFree');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcBindingVectorFree]
- end;
-end;
-
-var
- _RpcStringBindingComposeA: Pointer;
-
-function RpcStringBindingComposeA;
-begin
- GetProcedureAddress(_RpcStringBindingComposeA, rpclib, 'RpcStringBindingComposeA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcStringBindingComposeA]
- end;
-end;
-
-var
- _RpcStringBindingComposeW: Pointer;
-
-function RpcStringBindingComposeW;
-begin
- GetProcedureAddress(_RpcStringBindingComposeW, rpclib, 'RpcStringBindingComposeW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcStringBindingComposeW]
- end;
-end;
-
-var
- _RpcStringBindingCompose: Pointer;
-
-function RpcStringBindingCompose;
-begin
- GetProcedureAddress(_RpcStringBindingCompose, rpclib, 'RpcStringBindingCompose' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcStringBindingCompose]
- end;
-end;
-
-var
- _RpcStringBindingParseA: Pointer;
-
-function RpcStringBindingParseA;
-begin
- GetProcedureAddress(_RpcStringBindingParseA, rpclib, 'RpcStringBindingParseA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcStringBindingParseA]
- end;
-end;
-
-var
- _RpcStringBindingParseW: Pointer;
-
-function RpcStringBindingParseW;
-begin
- GetProcedureAddress(_RpcStringBindingParseW, rpclib, 'RpcStringBindingParseW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcStringBindingParseW]
- end;
-end;
-
-var
- _RpcStringBindingParse: Pointer;
-
-function RpcStringBindingParse;
-begin
- GetProcedureAddress(_RpcStringBindingParse, rpclib, 'RpcStringBindingParse' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcStringBindingParse]
- end;
-end;
-
-var
- _RpcStringFreeA: Pointer;
-
-function RpcStringFreeA;
-begin
- GetProcedureAddress(_RpcStringFreeA, rpclib, 'RpcStringFreeA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcStringFreeA]
- end;
-end;
-
-var
- _RpcStringFreeW: Pointer;
-
-function RpcStringFreeW;
-begin
- GetProcedureAddress(_RpcStringFreeW, rpclib, 'RpcStringFreeW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcStringFreeW]
- end;
-end;
-
-var
- _RpcStringFree: Pointer;
-
-function RpcStringFree;
-begin
- GetProcedureAddress(_RpcStringFree, rpclib, 'RpcStringFree' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcStringFree]
- end;
-end;
-
-var
- _RpcIfInqId: Pointer;
-
-function RpcIfInqId;
-begin
- GetProcedureAddress(_RpcIfInqId, rpclib, 'RpcIfInqId');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcIfInqId]
- end;
-end;
-
-var
- _RpcNetworkIsProtseqValidA: Pointer;
-
-function RpcNetworkIsProtseqValidA;
-begin
- GetProcedureAddress(_RpcNetworkIsProtseqValidA, rpclib, 'RpcNetworkIsProtseqValidA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcNetworkIsProtseqValidA]
- end;
-end;
-
-var
- _RpcNetworkIsProtseqValidW: Pointer;
-
-function RpcNetworkIsProtseqValidW;
-begin
- GetProcedureAddress(_RpcNetworkIsProtseqValidW, rpclib, 'RpcNetworkIsProtseqValidW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcNetworkIsProtseqValidW]
- end;
-end;
-
-var
- _RpcMgmtInqComTimeout: Pointer;
-
-function RpcMgmtInqComTimeout;
-begin
- GetProcedureAddress(_RpcMgmtInqComTimeout, rpclib, 'RpcMgmtInqComTimeout');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcMgmtInqComTimeout]
- end;
-end;
-
-var
- _RpcMgmtSetComTimeout: Pointer;
-
-function RpcMgmtSetComTimeout;
-begin
- GetProcedureAddress(_RpcMgmtSetComTimeout, rpclib, 'RpcMgmtSetComTimeout');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcMgmtSetComTimeout]
- end;
-end;
-
-var
- _RpcMgmtSetCancelTimeout: Pointer;
-
-function RpcMgmtSetCancelTimeout;
-begin
- GetProcedureAddress(_RpcMgmtSetCancelTimeout, rpclib, 'RpcMgmtSetCancelTimeout');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcMgmtSetCancelTimeout]
- end;
-end;
-
-var
- _RpcNetworkInqProtseqsA: Pointer;
-
-function RpcNetworkInqProtseqsA;
-begin
- GetProcedureAddress(_RpcNetworkInqProtseqsA, rpclib, 'RpcNetworkInqProtseqsA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcNetworkInqProtseqsA]
- end;
-end;
-
-var
- _RpcNetworkInqProtseqsW: Pointer;
-
-function RpcNetworkInqProtseqsW;
-begin
- GetProcedureAddress(_RpcNetworkInqProtseqsW, rpclib, 'RpcNetworkInqProtseqsW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcNetworkInqProtseqsW]
- end;
-end;
-
-var
- _RpcNetworkInqProtseqs: Pointer;
-
-function RpcNetworkInqProtseqs;
-begin
- GetProcedureAddress(_RpcNetworkInqProtseqs, rpclib, 'RpcNetworkInqProtseqs' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcNetworkInqProtseqs]
- end;
-end;
-
-var
- _RpcObjectInqType: Pointer;
-
-function RpcObjectInqType;
-begin
- GetProcedureAddress(_RpcObjectInqType, rpclib, 'RpcObjectInqType');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcObjectInqType]
- end;
-end;
-
-var
- _RpcObjectSetInqFn: Pointer;
-
-function RpcObjectSetInqFn;
-begin
- GetProcedureAddress(_RpcObjectSetInqFn, rpclib, 'RpcObjectSetInqFn');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcObjectSetInqFn]
- end;
-end;
-
-var
- _RpcObjectSetType: Pointer;
-
-function RpcObjectSetType;
-begin
- GetProcedureAddress(_RpcObjectSetType, rpclib, 'RpcObjectSetType');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcObjectSetType]
- end;
-end;
-
-var
- _RpcProtseqVectorFreeA: Pointer;
-
-function RpcProtseqVectorFreeA;
-begin
- GetProcedureAddress(_RpcProtseqVectorFreeA, rpclib, 'RpcProtseqVectorFreeA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcProtseqVectorFreeA]
- end;
-end;
-
-var
- _RpcProtseqVectorFreeW: Pointer;
-
-function RpcProtseqVectorFreeW;
-begin
- GetProcedureAddress(_RpcProtseqVectorFreeW, rpclib, 'RpcProtseqVectorFreeW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcProtseqVectorFreeW]
- end;
-end;
-
-var
- _RpcProtseqVectorFree: Pointer;
-
-function RpcProtseqVectorFree;
-begin
- GetProcedureAddress(_RpcProtseqVectorFree, rpclib, 'RpcProtseqVectorFree' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcProtseqVectorFree]
- end;
-end;
-
-var
- _RpcServerInqBindings: Pointer;
-
-function RpcServerInqBindings;
-begin
- GetProcedureAddress(_RpcServerInqBindings, rpclib, 'RpcServerInqBindings');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcServerInqBindings]
- end;
-end;
-
-var
- _RpcServerInqIf: Pointer;
-
-function RpcServerInqIf;
-begin
- GetProcedureAddress(_RpcServerInqIf, rpclib, 'RpcServerInqIf');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcServerInqIf]
- end;
-end;
-
-var
- _RpcServerListen: Pointer;
-
-function RpcServerListen;
-begin
- GetProcedureAddress(_RpcServerListen, rpclib, 'RpcServerListen');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcServerListen]
- end;
-end;
-
-var
- _RpcServerRegisterIf: Pointer;
-
-function RpcServerRegisterIf;
-begin
- GetProcedureAddress(_RpcServerRegisterIf, rpclib, 'RpcServerRegisterIf');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcServerRegisterIf]
- end;
-end;
-
-var
- _RpcServerRegisterIfEx: Pointer;
-
-function RpcServerRegisterIfEx;
-begin
- GetProcedureAddress(_RpcServerRegisterIfEx, rpclib, 'RpcServerRegisterIfEx');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcServerRegisterIfEx]
- end;
-end;
-
-var
- _RpcServerRegisterIf2: Pointer;
-
-function RpcServerRegisterIf2;
-begin
- GetProcedureAddress(_RpcServerRegisterIf2, rpclib, 'RpcServerRegisterIf2');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcServerRegisterIf2]
- end;
-end;
-
-var
- _RpcServerUnregisterIf: Pointer;
-
-function RpcServerUnregisterIf;
-begin
- GetProcedureAddress(_RpcServerUnregisterIf, rpclib, 'RpcServerUnregisterIf');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcServerUnregisterIf]
- end;
-end;
-
-var
- _RpcServerUnregisterIfEx: Pointer;
-
-function RpcServerUnregisterIfEx;
-begin
- GetProcedureAddress(_RpcServerUnregisterIfEx, rpclib, 'RpcServerUnregisterIfEx');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcServerUnregisterIfEx]
- end;
-end;
-
-var
- _RpcServerUseAllProtseqs: Pointer;
-
-function RpcServerUseAllProtseqs;
-begin
- GetProcedureAddress(_RpcServerUseAllProtseqs, rpclib, 'RpcServerUseAllProtseqs');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcServerUseAllProtseqs]
- end;
-end;
-
-var
- _RpcServerUseAllProtseqsEx: Pointer;
-
-function RpcServerUseAllProtseqsEx;
-begin
- GetProcedureAddress(_RpcServerUseAllProtseqsEx, rpclib, 'RpcServerUseAllProtseqsEx');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcServerUseAllProtseqsEx]
- end;
-end;
-
-var
- _RpcServerUseAllProtseqsIf: Pointer;
-
-function RpcServerUseAllProtseqsIf;
-begin
- GetProcedureAddress(_RpcServerUseAllProtseqsIf, rpclib, 'RpcServerUseAllProtseqsIf');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcServerUseAllProtseqsIf]
- end;
-end;
-
-var
- _RpcServerUseAllProtseqsIfEx: Pointer;
-
-function RpcServerUseAllProtseqsIfEx;
-begin
- GetProcedureAddress(_RpcServerUseAllProtseqsIfEx, rpclib, 'RpcServerUseAllProtseqsIfEx');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcServerUseAllProtseqsIfEx]
- end;
-end;
-
-var
- _RpcServerUseProtseqA: Pointer;
-
-function RpcServerUseProtseqA;
-begin
- GetProcedureAddress(_RpcServerUseProtseqA, rpclib, 'RpcServerUseProtseqA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcServerUseProtseqA]
- end;
-end;
-
-var
- _RpcServerUseProtseqW: Pointer;
-
-function RpcServerUseProtseqW;
-begin
- GetProcedureAddress(_RpcServerUseProtseqW, rpclib, 'RpcServerUseProtseqW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcServerUseProtseqW]
- end;
-end;
-
-var
- _RpcServerUseProtseq: Pointer;
-
-function RpcServerUseProtseq;
-begin
- GetProcedureAddress(_RpcServerUseProtseq, rpclib, 'RpcServerUseProtseq' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcServerUseProtseq]
- end;
-end;
-
-var
- _RpcServerUseProtseqExA: Pointer;
-
-function RpcServerUseProtseqExA;
-begin
- GetProcedureAddress(_RpcServerUseProtseqExA, rpclib, 'RpcServerUseProtseqExA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcServerUseProtseqExA]
- end;
-end;
-
-var
- _RpcServerUseProtseqExW: Pointer;
-
-function RpcServerUseProtseqExW;
-begin
- GetProcedureAddress(_RpcServerUseProtseqExW, rpclib, 'RpcServerUseProtseqExW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcServerUseProtseqExW]
- end;
-end;
-
-var
- _RpcServerUseProtseqEx: Pointer;
-
-function RpcServerUseProtseqEx;
-begin
- GetProcedureAddress(_RpcServerUseProtseqEx, rpclib, 'RpcServerUseProtseqEx' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcServerUseProtseqEx]
- end;
-end;
-
-var
- _RpcServerUseProtseqEpA: Pointer;
-
-function RpcServerUseProtseqEpA;
-begin
- GetProcedureAddress(_RpcServerUseProtseqEpA, rpclib, 'RpcServerUseProtseqEpA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcServerUseProtseqEpA]
- end;
-end;
-
-var
- _RpcServerUseProtseqEpW: Pointer;
-
-function RpcServerUseProtseqEpW;
-begin
- GetProcedureAddress(_RpcServerUseProtseqEpW, rpclib, 'RpcServerUseProtseqEpW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcServerUseProtseqEpW]
- end;
-end;
-
-var
- _RpcServerUseProtseqEp: Pointer;
-
-function RpcServerUseProtseqEp;
-begin
- GetProcedureAddress(_RpcServerUseProtseqEp, rpclib, 'RpcServerUseProtseqEp' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcServerUseProtseqEp]
- end;
-end;
-
-var
- _RpcServerUseProtseqEpExA: Pointer;
-
-function RpcServerUseProtseqEpExA;
-begin
- GetProcedureAddress(_RpcServerUseProtseqEpExA, rpclib, 'RpcServerUseProtseqEpExA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcServerUseProtseqEpExA]
- end;
-end;
-
-var
- _RpcServerUseProtseqEpExW: Pointer;
-
-function RpcServerUseProtseqEpExW;
-begin
- GetProcedureAddress(_RpcServerUseProtseqEpExW, rpclib, 'RpcServerUseProtseqEpExW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcServerUseProtseqEpExW]
- end;
-end;
-
-var
- _RpcServerUseProtseqEpEx: Pointer;
-
-function RpcServerUseProtseqEpEx;
-begin
- GetProcedureAddress(_RpcServerUseProtseqEpEx, rpclib, 'RpcServerUseProtseqEpEx' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcServerUseProtseqEpEx]
- end;
-end;
-
-var
- _RpcServerUseProtseqIfA: Pointer;
-
-function RpcServerUseProtseqIfA;
-begin
- GetProcedureAddress(_RpcServerUseProtseqIfA, rpclib, 'RpcServerUseProtseqIfA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcServerUseProtseqIfA]
- end;
-end;
-
-var
- _RpcServerUseProtseqIfW: Pointer;
-
-function RpcServerUseProtseqIfW;
-begin
- GetProcedureAddress(_RpcServerUseProtseqIfW, rpclib, 'RpcServerUseProtseqIfW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcServerUseProtseqIfW]
- end;
-end;
-
-var
- _RpcServerUseProtseqIfExA: Pointer;
-
-function RpcServerUseProtseqIfExA;
-begin
- GetProcedureAddress(_RpcServerUseProtseqIfExA, rpclib, 'RpcServerUseProtseqIfExA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcServerUseProtseqIfExA]
- end;
-end;
-
-var
- _RpcServerUseProtseqIfExW: Pointer;
-
-function RpcServerUseProtseqIfExW;
-begin
- GetProcedureAddress(_RpcServerUseProtseqIfExW, rpclib, 'RpcServerUseProtseqIfExW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcServerUseProtseqIfExW]
- end;
-end;
-
-var
- _RpcServerUseProtseqIfEx: Pointer;
-
-function RpcServerUseProtseqIfEx;
-begin
- GetProcedureAddress(_RpcServerUseProtseqIfEx, rpclib, 'RpcServerUseProtseqIfEx' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcServerUseProtseqIfEx]
- end;
-end;
-
-var
- _RpcServerYield: Pointer;
-
-procedure RpcServerYield;
-begin
- GetProcedureAddress(_RpcServerYield, rpclib, 'RpcServerYield');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcServerYield]
- end;
-end;
-
-var
- _RpcMgmtStatsVectorFree: Pointer;
-
-function RpcMgmtStatsVectorFree;
-begin
- GetProcedureAddress(_RpcMgmtStatsVectorFree, rpclib, 'RpcMgmtStatsVectorFree');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcMgmtStatsVectorFree]
- end;
-end;
-
-var
- _RpcMgmtInqStats: Pointer;
-
-function RpcMgmtInqStats;
-begin
- GetProcedureAddress(_RpcMgmtInqStats, rpclib, 'RpcMgmtInqStats');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcMgmtInqStats]
- end;
-end;
-
-var
- _RpcMgmtIsServerListening: Pointer;
-
-function RpcMgmtIsServerListening;
-begin
- GetProcedureAddress(_RpcMgmtIsServerListening, rpclib, 'RpcMgmtIsServerListening');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcMgmtIsServerListening]
- end;
-end;
-
-var
- _RpcMgmtStopServerListening: Pointer;
-
-function RpcMgmtStopServerListening;
-begin
- GetProcedureAddress(_RpcMgmtStopServerListening, rpclib, 'RpcMgmtStopServerListening');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcMgmtStopServerListening]
- end;
-end;
-
-var
- _RpcMgmtWaitServerListen: Pointer;
-
-function RpcMgmtWaitServerListen;
-begin
- GetProcedureAddress(_RpcMgmtWaitServerListen, rpclib, 'RpcMgmtWaitServerListen');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcMgmtWaitServerListen]
- end;
-end;
-
-var
- _RpcMgmtSetServerStackSize: Pointer;
-
-function RpcMgmtSetServerStackSize;
-begin
- GetProcedureAddress(_RpcMgmtSetServerStackSize, rpclib, 'RpcMgmtSetServerStackSize');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcMgmtSetServerStackSize]
- end;
-end;
-
-var
- _RpcSsDontSerializeContext: Pointer;
-
-procedure RpcSsDontSerializeContext;
-begin
- GetProcedureAddress(_RpcSsDontSerializeContext, rpclib, 'RpcSsDontSerializeContext');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcSsDontSerializeContext]
- end;
-end;
-
-var
- _RpcMgmtEnableIdleCleanup: Pointer;
-
-function RpcMgmtEnableIdleCleanup;
-begin
- GetProcedureAddress(_RpcMgmtEnableIdleCleanup, rpclib, 'RpcMgmtEnableIdleCleanup');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcMgmtEnableIdleCleanup]
- end;
-end;
-
-var
- _RpcMgmtInqIfIds: Pointer;
-
-function RpcMgmtInqIfIds;
-begin
- GetProcedureAddress(_RpcMgmtInqIfIds, rpclib, 'RpcMgmtInqIfIds');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcMgmtInqIfIds]
- end;
-end;
-
-var
- _RpcIfIdVectorFree: Pointer;
-
-function RpcIfIdVectorFree;
-begin
- GetProcedureAddress(_RpcIfIdVectorFree, rpclib, 'RpcIfIdVectorFree');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcIfIdVectorFree]
- end;
-end;
-
-var
- _RpcMgmtInqServerPrincNameA: Pointer;
-
-function RpcMgmtInqServerPrincNameA;
-begin
- GetProcedureAddress(_RpcMgmtInqServerPrincNameA, rpclib, 'RpcMgmtInqServerPrincNameA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcMgmtInqServerPrincNameA]
- end;
-end;
-
-var
- _RpcMgmtInqServerPrincNameW: Pointer;
-
-function RpcMgmtInqServerPrincNameW;
-begin
- GetProcedureAddress(_RpcMgmtInqServerPrincNameW, rpclib, 'RpcMgmtInqServerPrincNameW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcMgmtInqServerPrincNameW]
- end;
-end;
-
-var
- _RpcMgmtInqServerPrincName: Pointer;
-
-function RpcMgmtInqServerPrincName;
-begin
- GetProcedureAddress(_RpcMgmtInqServerPrincName, rpclib, 'RpcMgmtInqServerPrincName' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcMgmtInqServerPrincName]
- end;
-end;
-
-var
- _RpcServerInqDefaultPrincNameA: Pointer;
-
-function RpcServerInqDefaultPrincNameA;
-begin
- GetProcedureAddress(_RpcServerInqDefaultPrincNameA, rpclib, 'RpcServerInqDefaultPrincNameA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcServerInqDefaultPrincNameA]
- end;
-end;
-
-var
- _RpcServerInqDefaultPrincNameW: Pointer;
-
-function RpcServerInqDefaultPrincNameW;
-begin
- GetProcedureAddress(_RpcServerInqDefaultPrincNameW, rpclib, 'RpcServerInqDefaultPrincNameW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcServerInqDefaultPrincNameW]
- end;
-end;
-
-var
- _RpcServerInqDefaultPrincName: Pointer;
-
-function RpcServerInqDefaultPrincName;
-begin
- GetProcedureAddress(_RpcServerInqDefaultPrincName, rpclib, 'RpcServerInqDefaultPrincName' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcServerInqDefaultPrincName]
- end;
-end;
-
-var
- _RpcEpResolveBinding: Pointer;
-
-function RpcEpResolveBinding;
-begin
- GetProcedureAddress(_RpcEpResolveBinding, rpclib, 'RpcEpResolveBinding');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcEpResolveBinding]
- end;
-end;
-
-var
- _RpcNsBindingInqEntryNameA: Pointer;
-
-function RpcNsBindingInqEntryNameA;
-begin
- GetProcedureAddress(_RpcNsBindingInqEntryNameA, rpclib, 'RpcNsBindingInqEntryNameA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcNsBindingInqEntryNameA]
- end;
-end;
-
-var
- _RpcNsBindingInqEntryNameW: Pointer;
-
-function RpcNsBindingInqEntryNameW;
-begin
- GetProcedureAddress(_RpcNsBindingInqEntryNameW, rpclib, 'RpcNsBindingInqEntryNameW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcNsBindingInqEntryNameW]
- end;
-end;
-
-var
- _RpcNsBindingInqEntryName: Pointer;
-
-function RpcNsBindingInqEntryName;
-begin
- GetProcedureAddress(_RpcNsBindingInqEntryName, rpclib, 'RpcNsBindingInqEntryName' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcNsBindingInqEntryName]
- end;
-end;
-
-var
- _RpcImpersonateClient: Pointer;
-
-function RpcImpersonateClient;
-begin
- GetProcedureAddress(_RpcImpersonateClient, rpclib, 'RpcImpersonateClient');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcImpersonateClient]
- end;
-end;
-
-var
- _RpcRevertToSelfEx: Pointer;
-
-function RpcRevertToSelfEx;
-begin
- GetProcedureAddress(_RpcRevertToSelfEx, rpclib, 'RpcRevertToSelfEx');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcRevertToSelfEx]
- end;
-end;
-
-var
- _RpcRevertToSelf: Pointer;
-
-function RpcRevertToSelf;
-begin
- GetProcedureAddress(_RpcRevertToSelf, rpclib, 'RpcRevertToSelf');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcRevertToSelf]
- end;
-end;
-
-var
- _RpcBindingInqAuthClientA: Pointer;
-
-function RpcBindingInqAuthClientA;
-begin
- GetProcedureAddress(_RpcBindingInqAuthClientA, rpclib, 'RpcBindingInqAuthClientA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcBindingInqAuthClientA]
- end;
-end;
-
-var
- _RpcBindingInqAuthClientW: Pointer;
-
-function RpcBindingInqAuthClientW;
-begin
- GetProcedureAddress(_RpcBindingInqAuthClientW, rpclib, 'RpcBindingInqAuthClientW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcBindingInqAuthClientW]
- end;
-end;
-
-var
- _RpcBindingInqAuthClientExA: Pointer;
-
-function RpcBindingInqAuthClientExA;
-begin
- GetProcedureAddress(_RpcBindingInqAuthClientExA, rpclib, 'RpcBindingInqAuthClientExA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcBindingInqAuthClientExA]
- end;
-end;
-
-var
- _RpcBindingInqAuthClientExW: Pointer;
-
-function RpcBindingInqAuthClientExW;
-begin
- GetProcedureAddress(_RpcBindingInqAuthClientExW, rpclib, 'RpcBindingInqAuthClientExW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcBindingInqAuthClientExW]
- end;
-end;
-
-var
- _RpcBindingInqAuthInfoA: Pointer;
-
-function RpcBindingInqAuthInfoA;
-begin
- GetProcedureAddress(_RpcBindingInqAuthInfoA, rpclib, 'RpcBindingInqAuthInfoA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcBindingInqAuthInfoA]
- end;
-end;
-
-var
- _RpcBindingInqAuthInfoW: Pointer;
-
-function RpcBindingInqAuthInfoW;
-begin
- GetProcedureAddress(_RpcBindingInqAuthInfoW, rpclib, 'RpcBindingInqAuthInfoW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcBindingInqAuthInfoW]
- end;
-end;
-
-var
- _RpcBindingSetAuthInfoA: Pointer;
-
-function RpcBindingSetAuthInfoA;
-begin
- GetProcedureAddress(_RpcBindingSetAuthInfoA, rpclib, 'RpcBindingSetAuthInfoA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcBindingSetAuthInfoA]
- end;
-end;
-
-var
- _RpcBindingSetAuthInfoW: Pointer;
-
-function RpcBindingSetAuthInfoW;
-begin
- GetProcedureAddress(_RpcBindingSetAuthInfoW, rpclib, 'RpcBindingSetAuthInfoW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcBindingSetAuthInfoW]
- end;
-end;
-
-var
- _RpcBindingSetAuthInfoExA: Pointer;
-
-function RpcBindingSetAuthInfoExA;
-begin
- GetProcedureAddress(_RpcBindingSetAuthInfoExA, rpclib, 'RpcBindingSetAuthInfoExA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcBindingSetAuthInfoExA]
- end;
-end;
-
-var
- _RpcBindingSetAuthInfoExW: Pointer;
-
-function RpcBindingSetAuthInfoExW;
-begin
- GetProcedureAddress(_RpcBindingSetAuthInfoExW, rpclib, 'RpcBindingSetAuthInfoExW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcBindingSetAuthInfoExW]
- end;
-end;
-
-var
- _RpcBindingInqAuthInfoExA: Pointer;
-
-function RpcBindingInqAuthInfoExA;
-begin
- GetProcedureAddress(_RpcBindingInqAuthInfoExA, rpclib, 'RpcBindingInqAuthInfoExA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcBindingInqAuthInfoExA]
- end;
-end;
-
-var
- _RpcBindingInqAuthInfoExW: Pointer;
-
-function RpcBindingInqAuthInfoExW;
-begin
- GetProcedureAddress(_RpcBindingInqAuthInfoExW, rpclib, 'RpcBindingInqAuthInfoExW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcBindingInqAuthInfoExW]
- end;
-end;
-
-var
- _RpcServerRegisterAuthInfoA: Pointer;
-
-function RpcServerRegisterAuthInfoA;
-begin
- GetProcedureAddress(_RpcServerRegisterAuthInfoA, rpclib, 'RpcServerRegisterAuthInfoA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcServerRegisterAuthInfoA]
- end;
-end;
-
-var
- _RpcServerRegisterAuthInfoW: Pointer;
-
-function RpcServerRegisterAuthInfoW;
-begin
- GetProcedureAddress(_RpcServerRegisterAuthInfoW, rpclib, 'RpcServerRegisterAuthInfoW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcServerRegisterAuthInfoW]
- end;
-end;
-
-var
- _RpcBindingInqAuthClient: Pointer;
-
-function RpcBindingInqAuthClient;
-begin
- GetProcedureAddress(_RpcBindingInqAuthClient, rpclib, 'RpcBindingInqAuthClient' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcBindingInqAuthClient]
- end;
-end;
-
-var
- _RpcBindingInqAuthClientEx: Pointer;
-
-function RpcBindingInqAuthClientEx;
-begin
- GetProcedureAddress(_RpcBindingInqAuthClientEx, rpclib, 'RpcBindingInqAuthClientEx' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcBindingInqAuthClientEx]
- end;
-end;
-
-var
- _RpcBindingInqAuthInfo: Pointer;
-
-function RpcBindingInqAuthInfo;
-begin
- GetProcedureAddress(_RpcBindingInqAuthInfo, rpclib, 'RpcBindingInqAuthInfo' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcBindingInqAuthInfo]
- end;
-end;
-
-var
- _RpcBindingSetAuthInfo: Pointer;
-
-function RpcBindingSetAuthInfo;
-begin
- GetProcedureAddress(_RpcBindingSetAuthInfo, rpclib, 'RpcBindingSetAuthInfo' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcBindingSetAuthInfo]
- end;
-end;
-
-var
- _RpcBindingSetAuthInfoEx: Pointer;
-
-function RpcBindingSetAuthInfoEx;
-begin
- GetProcedureAddress(_RpcBindingSetAuthInfoEx, rpclib, 'RpcBindingSetAuthInfoEx' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcBindingSetAuthInfoEx]
- end;
-end;
-
-var
- _RpcBindingInqAuthInfoEx: Pointer;
-
-function RpcBindingInqAuthInfoEx;
-begin
- GetProcedureAddress(_RpcBindingInqAuthInfoEx, rpclib, 'RpcBindingInqAuthInfoEx' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcBindingInqAuthInfoEx]
- end;
-end;
-
-var
- _RpcServerRegisterAuthInfo: Pointer;
-
-function RpcServerRegisterAuthInfo;
-begin
- GetProcedureAddress(_RpcServerRegisterAuthInfo, rpclib, 'RpcServerRegisterAuthInfo' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcServerRegisterAuthInfo]
- end;
-end;
-
-var
- _RpcBindingServerFromClient: Pointer;
-
-function RpcBindingServerFromClient;
-begin
- GetProcedureAddress(_RpcBindingServerFromClient, rpclib, 'RpcBindingServerFromClient');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcBindingServerFromClient]
- end;
-end;
-
-var
- _RpcRaiseException: Pointer;
-
-procedure RpcRaiseException;
-begin
- GetProcedureAddress(_RpcRaiseException, rpclib, 'RpcRaiseException');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcRaiseException]
- end;
-end;
-
-var
- _RpcTestCancel: Pointer;
-
-function RpcTestCancel;
-begin
- GetProcedureAddress(_RpcTestCancel, rpclib, 'RpcTestCancel');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcTestCancel]
- end;
-end;
-
-var
- _RpcServerTestCancel: Pointer;
-
-function RpcServerTestCancel;
-begin
- GetProcedureAddress(_RpcServerTestCancel, rpclib, 'RpcServerTestCancel');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcServerTestCancel]
- end;
-end;
-
-var
- _RpcCancelThread: Pointer;
-
-function RpcCancelThread;
-begin
- GetProcedureAddress(_RpcCancelThread, rpclib, 'RpcCancelThread');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcCancelThread]
- end;
-end;
-
-var
- _RpcCancelThreadEx: Pointer;
-
-function RpcCancelThreadEx;
-begin
- GetProcedureAddress(_RpcCancelThreadEx, rpclib, 'RpcCancelThreadEx');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcCancelThreadEx]
- end;
-end;
-
-var
- _UuidCreate: Pointer;
-
-function UuidCreate;
-begin
- GetProcedureAddress(_UuidCreate, rpclib, 'UuidCreate');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_UuidCreate]
- end;
-end;
-
-var
- _UuidCreateSequential: Pointer;
-
-function UuidCreateSequential;
-begin
- GetProcedureAddress(_UuidCreateSequential, rpclib, 'UuidCreateSequential');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_UuidCreateSequential]
- end;
-end;
-
-var
- _UuidFromStringA: Pointer;
-
-function UuidFromStringA;
-begin
- GetProcedureAddress(_UuidFromStringA, rpclib, 'UuidFromStringA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_UuidFromStringA]
- end;
-end;
-
-var
- _UuidFromStringW: Pointer;
-
-function UuidFromStringW;
-begin
- GetProcedureAddress(_UuidFromStringW, rpclib, 'UuidFromStringW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_UuidFromStringW]
- end;
-end;
-
-var
- _UuidFromString: Pointer;
-
-function UuidFromString;
-begin
- GetProcedureAddress(_UuidFromString, rpclib, 'UuidFromString' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_UuidFromString]
- end;
-end;
-
-var
- _UuidToStringA: Pointer;
-
-function UuidToStringA;
-begin
- GetProcedureAddress(_UuidToStringA, rpclib, 'UuidToStringA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_UuidToStringA]
- end;
-end;
-
-var
- _UuidToStringW: Pointer;
-
-function UuidToStringW;
-begin
- GetProcedureAddress(_UuidToStringW, rpclib, 'UuidToStringW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_UuidToStringW]
- end;
-end;
-
-var
- _UuidToString: Pointer;
-
-function UuidToString;
-begin
- GetProcedureAddress(_UuidToString, rpclib, 'UuidToString' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_UuidToString]
- end;
-end;
-
-var
- _UuidCompare: Pointer;
-
-function UuidCompare;
-begin
- GetProcedureAddress(_UuidCompare, rpclib, 'UuidCompare');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_UuidCompare]
- end;
-end;
-
-var
- _UuidCreateNil: Pointer;
-
-function UuidCreateNil;
-begin
- GetProcedureAddress(_UuidCreateNil, rpclib, 'UuidCreateNil');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_UuidCreateNil]
- end;
-end;
-
-var
- _UuidEqual: Pointer;
-
-function UuidEqual;
-begin
- GetProcedureAddress(_UuidEqual, rpclib, 'UuidEqual');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_UuidEqual]
- end;
-end;
-
-var
- _UuidHash: Pointer;
-
-function UuidHash;
-begin
- GetProcedureAddress(_UuidHash, rpclib, 'UuidHash');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_UuidHash]
- end;
-end;
-
-var
- _UuidIsNil: Pointer;
-
-function UuidIsNil;
-begin
- GetProcedureAddress(_UuidIsNil, rpclib, 'UuidIsNil');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_UuidIsNil]
- end;
-end;
-
-var
- _RpcEpRegisterNoReplaceA: Pointer;
-
-function RpcEpRegisterNoReplaceA;
-begin
- GetProcedureAddress(_RpcEpRegisterNoReplaceA, rpclib, 'RpcEpRegisterNoReplaceA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcEpRegisterNoReplaceA]
- end;
-end;
-
-var
- _RpcEpRegisterNoReplaceW: Pointer;
-
-function RpcEpRegisterNoReplaceW;
-begin
- GetProcedureAddress(_RpcEpRegisterNoReplaceW, rpclib, 'RpcEpRegisterNoReplaceW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcEpRegisterNoReplaceW]
- end;
-end;
-
-var
- _RpcEpRegisterNoReplace: Pointer;
-
-function RpcEpRegisterNoReplace;
-begin
- GetProcedureAddress(_RpcEpRegisterNoReplace, rpclib, 'RpcEpRegisterNoReplace' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcEpRegisterNoReplace]
- end;
-end;
-
-var
- _RpcEpRegisterA: Pointer;
-
-function RpcEpRegisterA;
-begin
- GetProcedureAddress(_RpcEpRegisterA, rpclib, 'RpcEpRegisterA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcEpRegisterA]
- end;
-end;
-
-var
- _RpcEpRegisterW: Pointer;
-
-function RpcEpRegisterW;
-begin
- GetProcedureAddress(_RpcEpRegisterW, rpclib, 'RpcEpRegisterW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcEpRegisterW]
- end;
-end;
-
-var
- _RpcEpRegister: Pointer;
-
-function RpcEpRegister;
-begin
- GetProcedureAddress(_RpcEpRegister, rpclib, 'RpcEpRegister' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcEpRegister]
- end;
-end;
-
-var
- _RpcEpUnregister: Pointer;
-
-function RpcEpUnregister;
-begin
- GetProcedureAddress(_RpcEpUnregister, rpclib, 'RpcEpUnregister');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcEpUnregister]
- end;
-end;
-
-var
- _DceErrorInqTextA: Pointer;
-
-function DceErrorInqTextA;
-begin
- GetProcedureAddress(_DceErrorInqTextA, rpclib, 'DceErrorInqTextA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DceErrorInqTextA]
- end;
-end;
-
-var
- _DceErrorInqTextW: Pointer;
-
-function DceErrorInqTextW;
-begin
- GetProcedureAddress(_DceErrorInqTextW, rpclib, 'DceErrorInqTextW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DceErrorInqTextW]
- end;
-end;
-
-var
- _DceErrorInqText: Pointer;
-
-function DceErrorInqText;
-begin
- GetProcedureAddress(_DceErrorInqText, rpclib, 'DceErrorInqText' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DceErrorInqText]
- end;
-end;
-
-var
- _RpcMgmtEpEltInqBegin: Pointer;
-
-function RpcMgmtEpEltInqBegin;
-begin
- GetProcedureAddress(_RpcMgmtEpEltInqBegin, rpclib, 'RpcMgmtEpEltInqBegin');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcMgmtEpEltInqBegin]
- end;
-end;
-
-var
- _RpcMgmtEpEltInqDone: Pointer;
-
-function RpcMgmtEpEltInqDone;
-begin
- GetProcedureAddress(_RpcMgmtEpEltInqDone, rpclib, 'RpcMgmtEpEltInqDone');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcMgmtEpEltInqDone]
- end;
-end;
-
-var
- _RpcMgmtEpEltInqNextA: Pointer;
-
-function RpcMgmtEpEltInqNextA;
-begin
- GetProcedureAddress(_RpcMgmtEpEltInqNextA, rpclib, 'RpcMgmtEpEltInqNextA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcMgmtEpEltInqNextA]
- end;
-end;
-
-var
- _RpcMgmtEpEltInqNextW: Pointer;
-
-function RpcMgmtEpEltInqNextW;
-begin
- GetProcedureAddress(_RpcMgmtEpEltInqNextW, rpclib, 'RpcMgmtEpEltInqNextW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcMgmtEpEltInqNextW]
- end;
-end;
-
-var
- _RpcMgmtEpEltInqNext: Pointer;
-
-function RpcMgmtEpEltInqNext;
-begin
- GetProcedureAddress(_RpcMgmtEpEltInqNext, rpclib, 'RpcMgmtEpEltInqNext' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcMgmtEpEltInqNext]
- end;
-end;
-
-var
- _RpcMgmtEpUnregister: Pointer;
-
-function RpcMgmtEpUnregister;
-begin
- GetProcedureAddress(_RpcMgmtEpUnregister, rpclib, 'RpcMgmtEpUnregister');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcMgmtEpUnregister]
- end;
-end;
-
-var
- _RpcMgmtSetAuthorizationFn: Pointer;
-
-function RpcMgmtSetAuthorizationFn;
-begin
- GetProcedureAddress(_RpcMgmtSetAuthorizationFn, rpclib, 'RpcMgmtSetAuthorizationFn');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcMgmtSetAuthorizationFn]
- end;
-end;
-
-{$ELSE}
-
-function RpcBindingCopy; external rpclib name 'RpcBindingCopy';
-function RpcBindingFree; external rpclib name 'RpcBindingFree';
-function RpcBindingSetOption; external rpclib name 'RpcBindingSetOption';
-function RpcBindingInqOption; external rpclib name 'RpcBindingInqOption';
-function RpcBindingFromStringBindingA; external rpclib name 'RpcBindingFromStringBindingA';
-function RpcBindingFromStringBindingW; external rpclib name 'RpcBindingFromStringBindingW';
-function RpcBindingFromStringBinding; external rpclib name 'RpcBindingFromStringBinding' + AWSuffix;
-function RpcSsGetContextBinding; external rpclib name 'RpcSsGetContextBinding';
-function RpcBindingInqObject; external rpclib name 'RpcBindingInqObject';
-function RpcBindingReset; external rpclib name 'RpcBindingReset';
-function RpcBindingSetObject; external rpclib name 'RpcBindingSetObject';
-function RpcMgmtInqDefaultProtectLevel; external rpclib name 'RpcMgmtInqDefaultProtectLevel';
-function RpcBindingToStringBindingA; external rpclib name 'RpcBindingToStringBindingA';
-function RpcBindingToStringBindingW; external rpclib name 'RpcBindingToStringBindingW';
-function RpcBindingToStringBinding; external rpclib name 'RpcBindingToStringBinding' + AWSuffix;
-function RpcBindingVectorFree; external rpclib name 'RpcBindingVectorFree';
-function RpcStringBindingComposeA; external rpclib name 'RpcStringBindingComposeA';
-function RpcStringBindingComposeW; external rpclib name 'RpcStringBindingComposeW';
-function RpcStringBindingCompose; external rpclib name 'RpcStringBindingCompose' + AWSuffix;
-function RpcStringBindingParseA; external rpclib name 'RpcStringBindingParseA';
-function RpcStringBindingParseW; external rpclib name 'RpcStringBindingParseW';
-function RpcStringBindingParse; external rpclib name 'RpcStringBindingParse' + AWSuffix;
-function RpcStringFreeA; external rpclib name 'RpcStringFreeA';
-function RpcStringFreeW; external rpclib name 'RpcStringFreeW';
-function RpcStringFree; external rpclib name 'RpcStringFree' + AWSuffix;
-function RpcIfInqId; external rpclib name 'RpcIfInqId';
-function RpcNetworkIsProtseqValidA; external rpclib name 'RpcNetworkIsProtseqValidA';
-function RpcNetworkIsProtseqValidW; external rpclib name 'RpcNetworkIsProtseqValidW';
-function RpcMgmtInqComTimeout; external rpclib name 'RpcMgmtInqComTimeout';
-function RpcMgmtSetComTimeout; external rpclib name 'RpcMgmtSetComTimeout';
-function RpcMgmtSetCancelTimeout; external rpclib name 'RpcMgmtSetCancelTimeout';
-function RpcNetworkInqProtseqsA; external rpclib name 'RpcNetworkInqProtseqsA';
-function RpcNetworkInqProtseqsW; external rpclib name 'RpcNetworkInqProtseqsW';
-function RpcNetworkInqProtseqs; external rpclib name 'RpcNetworkInqProtseqs' + AWSuffix;
-function RpcObjectInqType; external rpclib name 'RpcObjectInqType';
-function RpcObjectSetInqFn; external rpclib name 'RpcObjectSetInqFn';
-function RpcObjectSetType; external rpclib name 'RpcObjectSetType';
-function RpcProtseqVectorFreeA; external rpclib name 'RpcProtseqVectorFreeA';
-function RpcProtseqVectorFreeW; external rpclib name 'RpcProtseqVectorFreeW';
-function RpcProtseqVectorFree; external rpclib name 'RpcProtseqVectorFree' + AWSuffix;
-function RpcServerInqBindings; external rpclib name 'RpcServerInqBindings';
-function RpcServerInqIf; external rpclib name 'RpcServerInqIf';
-function RpcServerListen; external rpclib name 'RpcServerListen';
-function RpcServerRegisterIf; external rpclib name 'RpcServerRegisterIf';
-function RpcServerRegisterIfEx; external rpclib name 'RpcServerRegisterIfEx';
-function RpcServerRegisterIf2; external rpclib name 'RpcServerRegisterIf2';
-function RpcServerUnregisterIf; external rpclib name 'RpcServerUnregisterIf';
-function RpcServerUnregisterIfEx; external rpclib name 'RpcServerUnregisterIfEx';
-function RpcServerUseAllProtseqs; external rpclib name 'RpcServerUseAllProtseqs';
-function RpcServerUseAllProtseqsEx; external rpclib name 'RpcServerUseAllProtseqsEx';
-function RpcServerUseAllProtseqsIf; external rpclib name 'RpcServerUseAllProtseqsIf';
-function RpcServerUseAllProtseqsIfEx; external rpclib name 'RpcServerUseAllProtseqsIfEx';
-function RpcServerUseProtseqA; external rpclib name 'RpcServerUseProtseqA';
-function RpcServerUseProtseqW; external rpclib name 'RpcServerUseProtseqW';
-function RpcServerUseProtseq; external rpclib name 'RpcServerUseProtseq' + AWSuffix;
-function RpcServerUseProtseqExA; external rpclib name 'RpcServerUseProtseqExA';
-function RpcServerUseProtseqExW; external rpclib name 'RpcServerUseProtseqExW';
-function RpcServerUseProtseqEx; external rpclib name 'RpcServerUseProtseqEx' + AWSuffix;
-function RpcServerUseProtseqEpA; external rpclib name 'RpcServerUseProtseqEpA';
-function RpcServerUseProtseqEpW; external rpclib name 'RpcServerUseProtseqEpW';
-function RpcServerUseProtseqEp; external rpclib name 'RpcServerUseProtseqEp' + AWSuffix;
-function RpcServerUseProtseqEpExA; external rpclib name 'RpcServerUseProtseqEpExA';
-function RpcServerUseProtseqEpExW; external rpclib name 'RpcServerUseProtseqEpExW';
-function RpcServerUseProtseqEpEx; external rpclib name 'RpcServerUseProtseqEpEx' + AWSuffix;
-function RpcServerUseProtseqIfA; external rpclib name 'RpcServerUseProtseqIfA';
-function RpcServerUseProtseqIfW; external rpclib name 'RpcServerUseProtseqIfW';
-function RpcServerUseProtseqIfExA; external rpclib name 'RpcServerUseProtseqIfExA';
-function RpcServerUseProtseqIfExW; external rpclib name 'RpcServerUseProtseqIfExW';
-function RpcServerUseProtseqIfEx; external rpclib name 'RpcServerUseProtseqIfEx' + AWSuffix;
-procedure RpcServerYield; external rpclib name 'RpcServerYield';
-function RpcMgmtStatsVectorFree; external rpclib name 'RpcMgmtStatsVectorFree';
-function RpcMgmtInqStats; external rpclib name 'RpcMgmtInqStats';
-function RpcMgmtIsServerListening; external rpclib name 'RpcMgmtIsServerListening';
-function RpcMgmtStopServerListening; external rpclib name 'RpcMgmtStopServerListening';
-function RpcMgmtWaitServerListen; external rpclib name 'RpcMgmtWaitServerListen';
-function RpcMgmtSetServerStackSize; external rpclib name 'RpcMgmtSetServerStackSize';
-procedure RpcSsDontSerializeContext; external rpclib name 'RpcSsDontSerializeContext';
-function RpcMgmtEnableIdleCleanup; external rpclib name 'RpcMgmtEnableIdleCleanup';
-function RpcMgmtInqIfIds; external rpclib name 'RpcMgmtInqIfIds';
-function RpcIfIdVectorFree; external rpclib name 'RpcIfIdVectorFree';
-function RpcMgmtInqServerPrincNameA; external rpclib name 'RpcMgmtInqServerPrincNameA';
-function RpcMgmtInqServerPrincNameW; external rpclib name 'RpcMgmtInqServerPrincNameW';
-function RpcMgmtInqServerPrincName; external rpclib name 'RpcMgmtInqServerPrincName' + AWSuffix;
-function RpcServerInqDefaultPrincNameA; external rpclib name 'RpcServerInqDefaultPrincNameA';
-function RpcServerInqDefaultPrincNameW; external rpclib name 'RpcServerInqDefaultPrincNameW';
-function RpcServerInqDefaultPrincName; external rpclib name 'RpcServerInqDefaultPrincName' + AWSuffix;
-function RpcEpResolveBinding; external rpclib name 'RpcEpResolveBinding';
-function RpcNsBindingInqEntryNameA; external rpclib name 'RpcNsBindingInqEntryNameA';
-function RpcNsBindingInqEntryNameW; external rpclib name 'RpcNsBindingInqEntryNameW';
-function RpcNsBindingInqEntryName; external rpclib name 'RpcNsBindingInqEntryName' + AWSuffix;
-function RpcImpersonateClient; external rpclib name 'RpcImpersonateClient';
-function RpcRevertToSelfEx; external rpclib name 'RpcRevertToSelfEx';
-function RpcRevertToSelf; external rpclib name 'RpcRevertToSelf';
-function RpcBindingInqAuthClientA; external rpclib name 'RpcBindingInqAuthClientA';
-function RpcBindingInqAuthClientW; external rpclib name 'RpcBindingInqAuthClientW';
-function RpcBindingInqAuthClientExA; external rpclib name 'RpcBindingInqAuthClientExA';
-function RpcBindingInqAuthClientExW; external rpclib name 'RpcBindingInqAuthClientExW';
-function RpcBindingInqAuthInfoA; external rpclib name 'RpcBindingInqAuthInfoA';
-function RpcBindingInqAuthInfoW; external rpclib name 'RpcBindingInqAuthInfoW';
-function RpcBindingSetAuthInfoA; external rpclib name 'RpcBindingSetAuthInfoA';
-function RpcBindingSetAuthInfoW; external rpclib name 'RpcBindingSetAuthInfoW';
-function RpcBindingSetAuthInfoExA; external rpclib name 'RpcBindingSetAuthInfoExA';
-function RpcBindingSetAuthInfoExW; external rpclib name 'RpcBindingSetAuthInfoExW';
-function RpcBindingInqAuthInfoExA; external rpclib name 'RpcBindingInqAuthInfoExA';
-function RpcBindingInqAuthInfoExW; external rpclib name 'RpcBindingInqAuthInfoExW';
-function RpcServerRegisterAuthInfoA; external rpclib name 'RpcServerRegisterAuthInfoA';
-function RpcServerRegisterAuthInfoW; external rpclib name 'RpcServerRegisterAuthInfoW';
-function RpcBindingInqAuthClient; external rpclib name 'RpcBindingInqAuthClient' + AWSuffix;
-function RpcBindingInqAuthClientEx; external rpclib name 'RpcBindingInqAuthClientEx' + AWSuffix;
-function RpcBindingInqAuthInfo; external rpclib name 'RpcBindingInqAuthInfo' + AWSuffix;
-function RpcBindingSetAuthInfo; external rpclib name 'RpcBindingSetAuthInfo' + AWSuffix;
-function RpcBindingSetAuthInfoEx; external rpclib name 'RpcBindingSetAuthInfoEx' + AWSuffix;
-function RpcBindingInqAuthInfoEx; external rpclib name 'RpcBindingInqAuthInfoEx' + AWSuffix;
-function RpcServerRegisterAuthInfo; external rpclib name 'RpcServerRegisterAuthInfo' + AWSuffix;
-function RpcBindingServerFromClient; external rpclib name 'RpcBindingServerFromClient';
-procedure RpcRaiseException; external rpclib name 'RpcRaiseException';
-function RpcTestCancel; external rpclib name 'RpcTestCancel';
-function RpcServerTestCancel; external rpclib name 'RpcServerTestCancel';
-function RpcCancelThread; external rpclib name 'RpcCancelThread';
-function RpcCancelThreadEx; external rpclib name 'RpcCancelThreadEx';
-function UuidCreate; external rpclib name 'UuidCreate';
-function UuidCreateSequential; external rpclib name 'UuidCreateSequential';
-function UuidFromStringA; external rpclib name 'UuidFromStringA';
-function UuidFromStringW; external rpclib name 'UuidFromStringW';
-function UuidFromString; external rpclib name 'UuidFromString' + AWSuffix;
-function UuidToStringA; external rpclib name 'UuidToStringA';
-function UuidToStringW; external rpclib name 'UuidToStringW';
-function UuidToString; external rpclib name 'UuidToString' + AWSuffix;
-function UuidCompare; external rpclib name 'UuidCompare';
-function UuidCreateNil; external rpclib name 'UuidCreateNil';
-function UuidEqual; external rpclib name 'UuidEqual';
-function UuidHash; external rpclib name 'UuidHash';
-function UuidIsNil; external rpclib name 'UuidIsNil';
-function RpcEpRegisterNoReplaceA; external rpclib name 'RpcEpRegisterNoReplaceA';
-function RpcEpRegisterNoReplaceW; external rpclib name 'RpcEpRegisterNoReplaceW';
-function RpcEpRegisterNoReplace; external rpclib name 'RpcEpRegisterNoReplace' + AWSuffix;
-function RpcEpRegisterA; external rpclib name 'RpcEpRegisterA';
-function RpcEpRegisterW; external rpclib name 'RpcEpRegisterW';
-function RpcEpRegister; external rpclib name 'RpcEpRegister' + AWSuffix;
-function RpcEpUnregister; external rpclib name 'RpcEpUnregister';
-function DceErrorInqTextA; external rpclib name 'DceErrorInqTextA';
-function DceErrorInqTextW; external rpclib name 'DceErrorInqTextW';
-function DceErrorInqText; external rpclib name 'DceErrorInqText' + AWSuffix;
-function RpcMgmtEpEltInqBegin; external rpclib name 'RpcMgmtEpEltInqBegin';
-function RpcMgmtEpEltInqDone; external rpclib name 'RpcMgmtEpEltInqDone';
-function RpcMgmtEpEltInqNextA; external rpclib name 'RpcMgmtEpEltInqNextA';
-function RpcMgmtEpEltInqNextW; external rpclib name 'RpcMgmtEpEltInqNextW';
-function RpcMgmtEpEltInqNext; external rpclib name 'RpcMgmtEpEltInqNext' + AWSuffix;
-function RpcMgmtEpUnregister; external rpclib name 'RpcMgmtEpUnregister';
-function RpcMgmtSetAuthorizationFn; external rpclib name 'RpcMgmtSetAuthorizationFn';
-
-{$ENDIF DYNAMIC_LINK}
-
-end.
+{******************************************************************************}
+{ }
+{ RPC DCE API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: rpcdce.h, released June 2000. The original Pascal }
+{ code is: Rpcce.pas, released December 2000. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwarpcdce.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaRpcDce;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "RpcDce.h"'}
+{$HPPEMIT ''}
+{$HPPEMIT 'typedef RPC_BINDING_VECTOR *PRPC_BINDING_VECTOR'}
+{$HPPEMIT 'typedef UUID_VECTOR *PUUID_VECTOR'}
+{$HPPEMIT 'typedef RPC_IF_ID *PRPC_IF_ID'}
+{$HPPEMIT 'typedef RPC_PROTSEQ_VECTORA *PRPC_PROTSEQ_VECTORA'}
+{$HPPEMIT 'typedef RPC_PROTSEQ_VECTORW *PRPC_PROTSEQ_VECTORW'}
+{$HPPEMIT 'typedef RPC_STATS_VECTOR *PRPC_STATS_VECTOR'}
+{$HPPEMIT 'typedef RPC_IF_ID_VECTOR *PRPC_IF_ID_VECTOR'}
+{$HPPEMIT 'typedef RPC_AUTHZ_HANDLE *PRPC_AUTHZ_HANDLE'}
+{$HPPEMIT 'typedef RPC_AUTH_IDENTITY_HANDLE *PRPC_AUTH_IDENTITY_HANDLE'}
+{$HPPEMIT 'typedef RPC_BINDING_HANDLE *PRPC_BINDING_HANDLE'}
+{$HPPEMIT 'typedef UUID *PUUID'}
+{$HPPEMIT 'typedef UUID *LPUUID'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaWinNT, JwaWinType, JwaRpc;
+
+type
+ RPC_BINDING_HANDLE = I_RPC_HANDLE;
+ {$EXTERNALSYM RPC_BINDING_HANDLE}
+ UUID = GUID;
+ {$EXTERNALSYM UUID}
+
+ PRPC_BINDING_HANDLE = ^RPC_BINDING_HANDLE;
+ {$NODEFINE PRPC_BINDING_HANDLE}
+ PUUID = ^UUID;
+ {$NODEFINE PUUID}
+ LPUUID = ^UUID;
+ {$NODEFINE LPUUID}
+
+type
+ PRPC_BINDING_VECTOR = ^RPC_BINDING_VECTOR;
+ {$NODEFINE PRPC_BINDING_VECTOR}
+ _RPC_BINDING_VECTOR = record
+ Count: Cardinal;
+ BindingH: array [0..0] of RPC_BINDING_HANDLE;
+ end;
+ {$EXTERNALSYM _RPC_BINDING_VECTOR}
+ RPC_BINDING_VECTOR = _RPC_BINDING_VECTOR;
+ {$EXTERNALSYM RPC_BINDING_VECTOR}
+ TRpcBindingVector = RPC_BINDING_VECTOR;
+ PRpcBindingVector = PRPC_BINDING_VECTOR;
+
+ PUUID_VECTOR = ^UUID_VECTOR;
+ {$NODEFINE PUUID_VECTOR}
+ _UUID_VECTOR = record
+ Count: Cardinal;
+ Uuid: array [0..0] of PUUID;
+ end;
+ {$EXTERNALSYM _UUID_VECTOR}
+ UUID_VECTOR = _UUID_VECTOR;
+ {$EXTERNALSYM UUID_VECTOR}
+ TUuidVector = UUID_VECTOR;
+ PUuidVector = ^TUuidVector;
+
+ RPC_IF_HANDLE = LPVOID;
+ {$EXTERNALSYM RPC_IF_HANDLE}
+
+ PRPC_IF_ID = ^RPC_IF_ID;
+ {$NODEFINE PRPC_IF_ID}
+ _RPC_IF_ID = record
+ Uuid: UUID;
+ VersMajor: Word;
+ VersMinor: Word;
+ end;
+ {$EXTERNALSYM _RPC_IF_ID}
+ RPC_IF_ID = _RPC_IF_ID;
+ {$EXTERNALSYM RPC_IF_ID}
+ TRpcIfId = RPC_IF_ID;
+ PRpcIfId = ^TRpcIfId;
+
+const
+ RPC_C_BINDING_INFINITE_TIMEOUT = 10;
+ {$EXTERNALSYM RPC_C_BINDING_INFINITE_TIMEOUT}
+ RPC_C_BINDING_MIN_TIMEOUT = 0;
+ {$EXTERNALSYM RPC_C_BINDING_MIN_TIMEOUT}
+ RPC_C_BINDING_DEFAULT_TIMEOUT = 5;
+ {$EXTERNALSYM RPC_C_BINDING_DEFAULT_TIMEOUT}
+ RPC_C_BINDING_MAX_TIMEOUT = 9;
+ {$EXTERNALSYM RPC_C_BINDING_MAX_TIMEOUT}
+
+ RPC_C_CANCEL_INFINITE_TIMEOUT = DWORD(-1);
+ {$EXTERNALSYM RPC_C_CANCEL_INFINITE_TIMEOUT}
+
+ RPC_C_LISTEN_MAX_CALLS_DEFAULT = 1234;
+ {$EXTERNALSYM RPC_C_LISTEN_MAX_CALLS_DEFAULT}
+ RPC_C_PROTSEQ_MAX_REQS_DEFAULT = 10;
+ {$EXTERNALSYM RPC_C_PROTSEQ_MAX_REQS_DEFAULT}
+
+// RPC_POLICY EndpointFlags.
+
+ RPC_C_BIND_TO_ALL_NICS = 1;
+ {$EXTERNALSYM RPC_C_BIND_TO_ALL_NICS}
+ RPC_C_USE_INTERNET_PORT = $1;
+ {$EXTERNALSYM RPC_C_USE_INTERNET_PORT}
+ RPC_C_USE_INTRANET_PORT = $2;
+ {$EXTERNALSYM RPC_C_USE_INTRANET_PORT}
+ RPC_C_DONT_FAIL = $4;
+ {$EXTERNALSYM RPC_C_DONT_FAIL}
+
+// RPC_POLICY EndpointFlags specific to the Falcon/RPC transport:
+
+ RPC_C_MQ_TEMPORARY = $0000;
+ {$EXTERNALSYM RPC_C_MQ_TEMPORARY}
+ RPC_C_MQ_PERMANENT = $0001;
+ {$EXTERNALSYM RPC_C_MQ_PERMANENT}
+ RPC_C_MQ_CLEAR_ON_OPEN = $0002;
+ {$EXTERNALSYM RPC_C_MQ_CLEAR_ON_OPEN}
+ RPC_C_MQ_USE_EXISTING_SECURITY = $0004;
+ {$EXTERNALSYM RPC_C_MQ_USE_EXISTING_SECURITY}
+ RPC_C_MQ_AUTHN_LEVEL_NONE = $0000;
+ {$EXTERNALSYM RPC_C_MQ_AUTHN_LEVEL_NONE}
+ RPC_C_MQ_AUTHN_LEVEL_PKT_INTEGRITY = $0008;
+ {$EXTERNALSYM RPC_C_MQ_AUTHN_LEVEL_PKT_INTEGRITY}
+ RPC_C_MQ_AUTHN_LEVEL_PKT_PRIVACY = $0010;
+ {$EXTERNALSYM RPC_C_MQ_AUTHN_LEVEL_PKT_PRIVACY}
+
+// Client: RpcBindingSetOption() values for the Falcon/RPC transport:
+
+ RPC_C_OPT_MQ_DELIVERY = 1;
+ {$EXTERNALSYM RPC_C_OPT_MQ_DELIVERY}
+ RPC_C_OPT_MQ_PRIORITY = 2;
+ {$EXTERNALSYM RPC_C_OPT_MQ_PRIORITY}
+ RPC_C_OPT_MQ_JOURNAL = 3;
+ {$EXTERNALSYM RPC_C_OPT_MQ_JOURNAL}
+ RPC_C_OPT_MQ_ACKNOWLEDGE = 4;
+ {$EXTERNALSYM RPC_C_OPT_MQ_ACKNOWLEDGE}
+ RPC_C_OPT_MQ_AUTHN_SERVICE = 5;
+ {$EXTERNALSYM RPC_C_OPT_MQ_AUTHN_SERVICE}
+ RPC_C_OPT_MQ_AUTHN_LEVEL = 6;
+ {$EXTERNALSYM RPC_C_OPT_MQ_AUTHN_LEVEL}
+ RPC_C_OPT_MQ_TIME_TO_REACH_QUEUE = 7;
+ {$EXTERNALSYM RPC_C_OPT_MQ_TIME_TO_REACH_QUEUE}
+ RPC_C_OPT_MQ_TIME_TO_BE_RECEIVED = 8;
+ {$EXTERNALSYM RPC_C_OPT_MQ_TIME_TO_BE_RECEIVED}
+ RPC_C_OPT_BINDING_NONCAUSAL = 9;
+ {$EXTERNALSYM RPC_C_OPT_BINDING_NONCAUSAL}
+ RPC_C_OPT_SECURITY_CALLBACK = 10;
+ {$EXTERNALSYM RPC_C_OPT_SECURITY_CALLBACK}
+ RPC_C_OPT_UNIQUE_BINDING = 11;
+ {$EXTERNALSYM RPC_C_OPT_UNIQUE_BINDING}
+ RPC_C_OPT_CALL_TIMEOUT = 12;
+ {$EXTERNALSYM RPC_C_OPT_CALL_TIMEOUT}
+ RPC_C_OPT_DONT_LINGER = 13;
+ {$EXTERNALSYM RPC_C_OPT_DONT_LINGER}
+ RPC_C_OPT_MAX_OPTIONS = 14;
+ {$EXTERNALSYM RPC_C_OPT_MAX_OPTIONS}
+
+ RPC_C_MQ_EXPRESS = 0; // Client: RPC_C_MQ_DELIVERY.
+ {$EXTERNALSYM RPC_C_MQ_EXPRESS}
+ RPC_C_MQ_RECOVERABLE = 1;
+ {$EXTERNALSYM RPC_C_MQ_RECOVERABLE}
+
+ RPC_C_MQ_JOURNAL_NONE = 0; // Client: RPC_C_MQ_JOURNAL.
+ {$EXTERNALSYM RPC_C_MQ_JOURNAL_NONE}
+ RPC_C_MQ_JOURNAL_DEADLETTER = 1;
+ {$EXTERNALSYM RPC_C_MQ_JOURNAL_DEADLETTER}
+ RPC_C_MQ_JOURNAL_ALWAYS = 2;
+ {$EXTERNALSYM RPC_C_MQ_JOURNAL_ALWAYS}
+
+// flags for RpcServerInqAuthClientEx
+
+ RPC_C_FULL_CERT_CHAIN = $0001;
+ {$EXTERNALSYM RPC_C_FULL_CERT_CHAIN}
+
+type
+ PRPC_PROTSEQ_VECTORA = ^RPC_PROTSEQ_VECTORA;
+ {$NODEFINE PRPC_PROTSEQ_VECTORA}
+ _RPC_PROTSEQ_VECTORA = record
+ Count: Cardinal;
+ Protseq: array [0..0] of PByte
+ end;
+ {$EXTERNALSYM _RPC_PROTSEQ_VECTORA}
+ RPC_PROTSEQ_VECTORA = _RPC_PROTSEQ_VECTORA;
+ {$EXTERNALSYM RPC_PROTSEQ_VECTORA}
+ TRpcProtSeqVectorA = RPC_PROTSEQ_VECTORA;
+ PRpcProtSeqVectorA = PRPC_PROTSEQ_VECTORA;
+
+ PRPC_PROTSEQ_VECTORW = ^RPC_PROTSEQ_VECTORW;
+ {$NODEFINE PRPC_PROTSEQ_VECTORW}
+ _RPC_PROTSEQ_VECTORW = record
+ Count: Cardinal;
+ Protseq: array [0..0] of PWord;
+ end;
+ {$EXTERNALSYM _RPC_PROTSEQ_VECTORW}
+ RPC_PROTSEQ_VECTORW = _RPC_PROTSEQ_VECTORW;
+ {$EXTERNALSYM RPC_PROTSEQ_VECTORW}
+ TRpcProtSeqVectorW = RPC_PROTSEQ_VECTORW;
+ PRpcProtSeqVectorW = PRPC_PROTSEQ_VECTORW;
+
+ {$IFDEF UNICODE}
+ RPC_PROTSEQ_VECTOR = RPC_PROTSEQ_VECTORW;
+ {$EXTERNALSYM RPC_PROTSEQ_VECTOR}
+ PRPC_PROTSEQ_VECTOR = PRPC_PROTSEQ_VECTORW;
+ TRpcProtSeqVector = TRpcProtSeqVectorW;
+ PRpcProtSeqVector = PRpcProtSeqVectorW;
+ {$ELSE}
+ RPC_PROTSEQ_VECTOR = RPC_PROTSEQ_VECTORA;
+ {$EXTERNALSYM RPC_PROTSEQ_VECTOR}
+ PRPC_PROTSEQ_VECTOR = PRPC_PROTSEQ_VECTORA;
+ TRpcProtSeqVector = TRpcProtSeqVectorA;
+ PRpcProtSeqVector = PRpcProtSeqVectorA;
+ {$ENDIF UNICODE}
+
+ PRPC_POLICY = ^RPC_POLICY;
+ {$EXTERNALSYM PRPC_POLICY}
+ _RPC_POLICY = record
+ Length: Cardinal;
+ EndpointFlags: Cardinal;
+ NICFlags: Cardinal;
+ end;
+ {$EXTERNALSYM _RPC_POLICY}
+ RPC_POLICY = _RPC_POLICY;
+ {$EXTERNALSYM RPC_POLICY}
+ TRpcPolicy = RPC_POLICY;
+ PRpcPolicy = PRPC_POLICY;
+
+ RPC_OBJECT_INQ_FN = procedure(const ObjectUuid: UUID; var TypeUuid: UUID;
+ var Status: RPC_STATUS); stdcall;
+ {$EXTERNALSYM RPC_OBJECT_INQ_FN}
+ TRpcObjectInqFn = RPC_OBJECT_INQ_FN;
+
+ RPC_IF_CALLBACK_FN = function(InterfaceUuid: RPC_IF_HANDLE; Context: Pointer): RPC_STATUS; stdcall;
+ {$EXTERNALSYM RPC_IF_CALLBACK_FN}
+ TRpcIfCallbackFn = RPC_IF_CALLBACK_FN;
+
+ RPC_SECURITY_CALLBACK_FN = procedure(Context: Pointer); stdcall;
+ {$EXTERNALSYM RPC_SECURITY_CALLBACK_FN}
+ TRpcSecurityCallbackFn = RPC_SECURITY_CALLBACK_FN;
+
+ PRPC_STATS_VECTOR = ^RPC_STATS_VECTOR;
+ {$NODEFINE PRPC_STATS_VECTOR}
+ RPC_STATS_VECTOR = record
+ Count: Cardinal;
+ Stats: array [0..0] of Cardinal;
+ end;
+ {$EXTERNALSYM RPC_STATS_VECTOR}
+ TRpcStatsVector = RPC_STATS_VECTOR;
+ PRpcStatsVector = PRPC_STATS_VECTOR;
+
+const
+ RPC_C_STATS_CALLS_IN = 0;
+ {$EXTERNALSYM RPC_C_STATS_CALLS_IN}
+ RPC_C_STATS_CALLS_OUT = 1;
+ {$EXTERNALSYM RPC_C_STATS_CALLS_OUT}
+ RPC_C_STATS_PKTS_IN = 2;
+ {$EXTERNALSYM RPC_C_STATS_PKTS_IN}
+ RPC_C_STATS_PKTS_OUT = 3;
+ {$EXTERNALSYM RPC_C_STATS_PKTS_OUT}
+
+type
+ PRPC_IF_ID_VECTOR = ^RPC_IF_ID_VECTOR;
+ {$NODEFINE RPC_IF_ID_VECTOR}
+ RPC_IF_ID_VECTOR = record
+ Count: Cardinal;
+ IfId: array [0..0] of PRpcIfId;
+ end;
+ {$EXTERNALSYM RPC_IF_ID_VECTOR}
+ TRpcIfIdVector = RPC_IF_ID_VECTOR;
+ PRpcIfIdVector = PRPC_IF_ID_VECTOR;
+
+function RpcBindingCopy(SourceBinding: RPC_BINDING_HANDLE;
+ var DestinationBinding: RPC_BINDING_HANDLE): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcBindingCopy}
+
+function RpcBindingFree(var Binding: RPC_BINDING_HANDLE): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcBindingFree}
+
+function RpcBindingSetOption(hBinding: RPC_BINDING_HANDLE; option: Cardinal;
+ optionValue: ULONG_PTR): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcBindingSetOption}
+
+function RpcBindingInqOption(hBinding: RPC_BINDING_HANDLE; option: Cardinal;
+ var pOptionValue: ULONG_PTR): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcBindingInqOption}
+
+function RpcBindingFromStringBindingA(StringBinding: PChar;
+ var Binding: RPC_BINDING_HANDLE): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcBindingFromStringBindingA}
+function RpcBindingFromStringBindingW(StringBinding: PWideChar;
+ var Binding: RPC_BINDING_HANDLE): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcBindingFromStringBindingW}
+function RpcBindingFromStringBinding(StringBinding: PTSTR;
+ var Binding: RPC_BINDING_HANDLE): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcBindingFromStringBinding}
+
+function RpcSsGetContextBinding(ContextHandle: Pointer; var Binding: RPC_BINDING_HANDLE): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcSsGetContextBinding}
+
+function RpcBindingInqObject(Binding: RPC_BINDING_HANDLE; var ObjectUuid: UUID): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcBindingInqObject}
+
+function RpcBindingReset(Binding: RPC_BINDING_HANDLE): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcBindingReset}
+
+// RpcBindingServerFromClient : UNSUPPORTED
+// RpcBindingSetAuthInfo
+
+function RpcBindingSetObject(Binding: RPC_BINDING_HANDLE; const ObjectUuid: UUID): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcBindingSetObject}
+
+function RpcMgmtInqDefaultProtectLevel(AuthnSvc: Cardinal; var AuthnLevel: Cardinal): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcMgmtInqDefaultProtectLevel}
+
+function RpcBindingToStringBindingA(Binding: RPC_BINDING_HANDLE;
+ var StringBinding: PChar): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcBindingToStringBindingA}
+function RpcBindingToStringBindingW(Binding: RPC_BINDING_HANDLE;
+ var StringBinding: PWideChar): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcBindingToStringBindingW}
+function RpcBindingToStringBinding(Binding: RPC_BINDING_HANDLE;
+ var StringBinding: PTSTR): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcBindingToStringBinding}
+
+function RpcBindingVectorFree(var BindingVector: PRPC_BINDING_VECTOR): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcBindingVectorFree}
+
+function RpcStringBindingComposeA(ObjUuid, Protseq, NetworkAddr, Endpoint,
+ Options: PChar; var StringBinding: PChar): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcStringBindingComposeA}
+function RpcStringBindingComposeW(ObjUuid, Protseq, NetworkAddr, Endpoint,
+ Options: PWideChar; var StringBinding: PWideChar): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcStringBindingComposeW}
+function RpcStringBindingCompose(ObjUuid, Protseq, NetworkAddr, Endpoint,
+ Options: PTSTR; var StringBinding: PTSTR): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcStringBindingCompose}
+
+function RpcStringBindingParseA(StringBinding: PChar; ObjUuid, Protseq,
+ NetworkAddr, Endpoint, NetworkOptions: PPChar): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcStringBindingParseA}
+function RpcStringBindingParseW(StringBinding: PWideChar; ObjUuid, Protseq,
+ NetworkAddr, Endpoint, NetworkOptions: PPWideChar): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcStringBindingParseW}
+function RpcStringBindingParse(StringBinding: PTSTR; ObjUuid, Protseq,
+ NetworkAddr, Endpoint, NetworkOptions: PPTSTR): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcStringBindingParse}
+
+function RpcStringFreeA(var S: PChar): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcStringFreeA}
+function RpcStringFreeW(var S: PWideChar): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcStringFreeW}
+function RpcStringFree(var S: PTSTR): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcStringFree}
+
+function RpcIfInqId(RpcIfHandle: RPC_IF_HANDLE; var RpcIfId: RPC_IF_ID): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcIfInqId}
+
+function RpcNetworkIsProtseqValidA(Protseq: PChar): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcNetworkIsProtseqValidA}
+
+function RpcNetworkIsProtseqValidW(Protseq: PWideChar): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcNetworkIsProtseqValidW}
+
+function RpcMgmtInqComTimeout(Binding: RPC_BINDING_HANDLE; var Timeout: Cardinal): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcMgmtInqComTimeout}
+
+function RpcMgmtSetComTimeout(Binding: RPC_BINDING_HANDLE; Timeout: Cardinal): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcMgmtSetComTimeout}
+
+function RpcMgmtSetCancelTimeout(Timeout: Longint): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcMgmtSetCancelTimeout}
+
+function RpcNetworkInqProtseqsA(var ProtseqVector: PRPC_PROTSEQ_VECTORA): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcNetworkInqProtseqsA}
+function RpcNetworkInqProtseqsW(var ProtseqVector: PRPC_PROTSEQ_VECTORW): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcNetworkInqProtseqsW}
+function RpcNetworkInqProtseqs(var ProtseqVector: PRPC_PROTSEQ_VECTOR): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcNetworkInqProtseqs}
+
+function RpcObjectInqType(const ObjUuid: UUID; TypeUuid: PUUID): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcObjectInqType}
+
+function RpcObjectSetInqFn(InquiryFn: RPC_OBJECT_INQ_FN): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcObjectSetInqFn}
+
+function RpcObjectSetType(const ObjUuid: UUID; TypeUuid: PUUID): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcObjectSetType}
+
+function RpcProtseqVectorFreeA(var ProtseqVector: PRPC_PROTSEQ_VECTORA): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcProtseqVectorFreeA}
+function RpcProtseqVectorFreeW(var ProtseqVector: PRPC_PROTSEQ_VECTORW): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcProtseqVectorFreeW}
+function RpcProtseqVectorFree(var ProtseqVector: PRPC_PROTSEQ_VECTOR): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcProtseqVectorFree}
+
+function RpcServerInqBindings(var BindingVector: PRPC_BINDING_VECTOR): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcServerInqBindings}
+
+function RpcServerInqIf(IfSpec: RPC_IF_HANDLE; MgrTypeUuid: PUUID;
+ MgrEpv: Pointer): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcServerInqIf}
+
+function RpcServerListen(MinimumCallThreads, MaxCalls, DontWait: Cardinal): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcServerListen}
+
+function RpcServerRegisterIf(IfSpec: RPC_IF_HANDLE; MgrTypeUuid: PUUID;
+ MgrEpv: Pointer): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcServerRegisterIf}
+
+function RpcServerRegisterIfEx(IfSpec: RPC_IF_HANDLE; MgrTypeUuid: PUUID;
+ MgrEpv: Pointer; Flags, MaxCalls: Cardinal; IfCallback: RPC_IF_CALLBACK_FN): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcServerRegisterIfEx}
+
+function RpcServerRegisterIf2(IfSpec: RPC_IF_HANDLE; MgrTypeUuid: PUUID;
+ MgrEpv: Pointer; Flags, MaxCalls, MaxRpcSize: Cardinal;
+ IfCallbackFn: RPC_IF_CALLBACK_FN): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcServerRegisterIf2}
+
+function RpcServerUnregisterIf(IfSpec: RPC_IF_HANDLE; MgrTypeUuid: PUUID;
+ WaitForCallsToComplete: Cardinal): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcServerUnregisterIf}
+
+function RpcServerUnregisterIfEx(IfSpec: RPC_IF_HANDLE; MgrTypeUuid: PUUID;
+ RundownContextHandles: Integer): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcServerUnregisterIfEx}
+
+function RpcServerUseAllProtseqs(MaxCalls: Cardinal; SecurityDescriptor: Pointer): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcServerUseAllProtseqs}
+
+function RpcServerUseAllProtseqsEx(MaxCalls: Cardinal; SecurityDescriptor: Pointer;
+ Policy: PRPC_POLICY): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcServerUseAllProtseqsEx}
+
+function RpcServerUseAllProtseqsIf(MaxCalls: Cardinal; IfSpec: RPC_IF_HANDLE;
+ SecurityDescriptor: Pointer): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcServerUseAllProtseqsIf}
+
+function RpcServerUseAllProtseqsIfEx(MaxCalls: Cardinal; IfSpec: RPC_IF_HANDLE;
+ SecurityDescriptor: Pointer; Policy: PRPC_POLICY): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcServerUseAllProtseqsIfEx}
+
+function RpcServerUseProtseqA(Protseq: PChar; MaxCalls: Cardinal;
+ SecurityDescriptor: Pointer): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcServerUseProtseqA}
+function RpcServerUseProtseqW(Protseq: PWideChar; MaxCalls: Cardinal;
+ SecurityDescriptor: Pointer): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcServerUseProtseqW}
+function RpcServerUseProtseq(Protseq: PTSTR; MaxCalls: Cardinal;
+ SecurityDescriptor: Pointer): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcServerUseProtseq}
+
+function RpcServerUseProtseqExA(Protseq: PChar; MaxCalls: Cardinal;
+ SecurityDescriptor: Pointer; const Policy: RPC_POLICY): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcServerUseProtseqExA}
+function RpcServerUseProtseqExW(Protseq: PWideChar; MaxCalls: Cardinal;
+ SecurityDescriptor: Pointer; const Policy: RPC_POLICY): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcServerUseProtseqExW}
+function RpcServerUseProtseqEx(Protseq: PTSTR; MaxCalls: Cardinal;
+ SecurityDescriptor: Pointer; const Policy: RPC_POLICY): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcServerUseProtseqEx}
+
+function RpcServerUseProtseqEpA(Protseq: PChar; MaxCalls: Cardinal;
+ Endpoint: PChar; SecurityDescriptor: Pointer): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcServerUseProtseqEpA}
+function RpcServerUseProtseqEpW(Protseq: PWideChar; MaxCalls: Cardinal;
+ Endpoint: PWideChar; SecurityDescriptor: Pointer): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcServerUseProtseqEpW}
+function RpcServerUseProtseqEp(Protseq: PTSTR; MaxCalls: Cardinal;
+ Endpoint: PTSTR; SecurityDescriptor: Pointer): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcServerUseProtseqEp}
+
+function RpcServerUseProtseqEpExA(Protseq: PChar; MaxCalls: Cardinal;
+ Endpoint: PChar; SecurityDescriptor: Pointer; const Policy: RPC_POLICY): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcServerUseProtseqEpExA}
+function RpcServerUseProtseqEpExW(Protseq: PWideChar; MaxCalls: Cardinal;
+ Endpoint: PWideChar; SecurityDescriptor: Pointer; const Policy: RPC_POLICY): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcServerUseProtseqEpExW}
+function RpcServerUseProtseqEpEx(Protseq: PTSTR; MaxCalls: Cardinal;
+ Endpoint: PTSTR; SecurityDescriptor: Pointer; const Policy: RPC_POLICY): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcServerUseProtseqEpEx}
+
+function RpcServerUseProtseqIfA(Protseq: PChar; MaxCalls: Cardinal;
+ IfSpec: RPC_IF_HANDLE; SecurityDescriptor: Pointer): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcServerUseProtseqIfA}
+function RpcServerUseProtseqIfW(Protseq: PWideChar; MaxCalls: Cardinal;
+ IfSpec: RPC_IF_HANDLE; SecurityDescriptor: Pointer): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcServerUseProtseqIfW}
+
+function RpcServerUseProtseqIfExA(Protseq: PChar; MaxCalls: Cardinal;
+ IfSpec: RPC_IF_HANDLE; SecurityDescriptor: Pointer; const Policy: RPC_POLICY): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcServerUseProtseqIfExA}
+function RpcServerUseProtseqIfExW(Protseq: PWideChar; MaxCalls: Cardinal;
+ IfSpec: RPC_IF_HANDLE; SecurityDescriptor: Pointer; const Policy: RPC_POLICY): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcServerUseProtseqIfExW}
+function RpcServerUseProtseqIfEx(Protseq: PTSTR; MaxCalls: Cardinal;
+ IfSpec: RPC_IF_HANDLE; SecurityDescriptor: Pointer; const Policy: RPC_POLICY): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcServerUseProtseqIfEx}
+
+procedure RpcServerYield; stdcall;
+{$EXTERNALSYM RpcServerYield}
+
+function RpcMgmtStatsVectorFree(var StatsVector: PRPC_STATS_VECTOR): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcMgmtStatsVectorFree}
+
+function RpcMgmtInqStats(Binding: RPC_BINDING_HANDLE; var Statistics: PRPC_STATS_VECTOR): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcMgmtInqStats}
+
+function RpcMgmtIsServerListening(Binding: RPC_BINDING_HANDLE): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcMgmtIsServerListening}
+
+function RpcMgmtStopServerListening(Binding: RPC_BINDING_HANDLE): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcMgmtStopServerListening}
+
+function RpcMgmtWaitServerListen: RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcMgmtWaitServerListen}
+
+function RpcMgmtSetServerStackSize(ThreadStackSize: Cardinal): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcMgmtSetServerStackSize}
+
+procedure RpcSsDontSerializeContext; stdcall;
+{$EXTERNALSYM RpcSsDontSerializeContext}
+
+function RpcMgmtEnableIdleCleanup: RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcMgmtEnableIdleCleanup}
+
+function RpcMgmtInqIfIds(Binding: RPC_BINDING_HANDLE;
+ var IfIdVector: PRPC_IF_ID_VECTOR): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcMgmtInqIfIds}
+
+function RpcIfIdVectorFree(var IfIdVector: PRPC_IF_ID_VECTOR): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcIfIdVectorFree}
+
+function RpcMgmtInqServerPrincNameA(Binding: RPC_BINDING_HANDLE;
+ AuthnSvc: Cardinal; var ServerPrincName: PChar): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcMgmtInqServerPrincNameA}
+function RpcMgmtInqServerPrincNameW(Binding: RPC_BINDING_HANDLE;
+ AuthnSvc: Cardinal; var ServerPrincName: PWideChar): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcMgmtInqServerPrincNameW}
+function RpcMgmtInqServerPrincName(Binding: RPC_BINDING_HANDLE;
+ AuthnSvc: Cardinal; var ServerPrincName: PTSTR): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcMgmtInqServerPrincName}
+
+function RpcServerInqDefaultPrincNameA(AuthnSvc: Cardinal; var PrincName: PChar): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcServerInqDefaultPrincNameA}
+function RpcServerInqDefaultPrincNameW(AuthnSvc: Cardinal; var PrincName: PWideChar): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcServerInqDefaultPrincNameW}
+function RpcServerInqDefaultPrincName(AuthnSvc: Cardinal; var PrincName: PTSTR): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcServerInqDefaultPrincName}
+
+function RpcEpResolveBinding(Binding: RPC_BINDING_HANDLE; IfSpe: RPC_IF_HANDLE): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcEpResolveBinding}
+
+function RpcNsBindingInqEntryNameA(Binding: RPC_BINDING_HANDLE;
+ EntryNameSyntax: Cardinal; var EntryName: PChar): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcNsBindingInqEntryNameA}
+function RpcNsBindingInqEntryNameW(Binding: RPC_BINDING_HANDLE;
+ EntryNameSyntax: Cardinal; var EntryName: PWideChar): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcNsBindingInqEntryNameW}
+function RpcNsBindingInqEntryName(Binding: RPC_BINDING_HANDLE;
+ EntryNameSyntax: Cardinal; var EntryName: PTSTR): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcNsBindingInqEntryName}
+
+type
+ RPC_AUTH_IDENTITY_HANDLE = Pointer;
+ {$EXTERNALSYM RPC_AUTH_IDENTITY_HANDLE}
+ RPC_AUTHZ_HANDLE = Pointer;
+ {$EXTERNALSYM RPC_AUTHZ_HANDLE}
+ PRPC_AUTHZ_HANDLE = ^RPC_AUTHZ_HANDLE;
+ {$NODEFINE PRPC_AUTHZ_HANDLE}
+
+ PRPC_AUTH_IDENTITY_HANDLE = ^RPC_AUTH_IDENTITY_HANDLE;
+ {$NODEFINE PRPC_AUTH_IDENTITY_HANDLE}
+
+const
+ RPC_C_AUTHN_LEVEL_DEFAULT = 0;
+ {$EXTERNALSYM RPC_C_AUTHN_LEVEL_DEFAULT}
+ RPC_C_AUTHN_LEVEL_NONE = 1;
+ {$EXTERNALSYM RPC_C_AUTHN_LEVEL_NONE}
+ RPC_C_AUTHN_LEVEL_CONNECT = 2;
+ {$EXTERNALSYM RPC_C_AUTHN_LEVEL_CONNECT}
+ RPC_C_AUTHN_LEVEL_CALL = 3;
+ {$EXTERNALSYM RPC_C_AUTHN_LEVEL_CALL}
+ RPC_C_AUTHN_LEVEL_PKT = 4;
+ {$EXTERNALSYM RPC_C_AUTHN_LEVEL_PKT}
+ RPC_C_AUTHN_LEVEL_PKT_INTEGRITY = 5;
+ {$EXTERNALSYM RPC_C_AUTHN_LEVEL_PKT_INTEGRITY}
+ RPC_C_AUTHN_LEVEL_PKT_PRIVACY = 6;
+ {$EXTERNALSYM RPC_C_AUTHN_LEVEL_PKT_PRIVACY}
+
+ RPC_C_IMP_LEVEL_DEFAULT = 0;
+ {$EXTERNALSYM RPC_C_IMP_LEVEL_DEFAULT}
+ RPC_C_IMP_LEVEL_ANONYMOUS = 1;
+ {$EXTERNALSYM RPC_C_IMP_LEVEL_ANONYMOUS}
+ RPC_C_IMP_LEVEL_IDENTIFY = 2;
+ {$EXTERNALSYM RPC_C_IMP_LEVEL_IDENTIFY}
+ RPC_C_IMP_LEVEL_IMPERSONATE = 3;
+ {$EXTERNALSYM RPC_C_IMP_LEVEL_IMPERSONATE}
+ RPC_C_IMP_LEVEL_DELEGATE = 4;
+ {$EXTERNALSYM RPC_C_IMP_LEVEL_DELEGATE}
+
+ RPC_C_QOS_IDENTITY_STATIC = 0;
+ {$EXTERNALSYM RPC_C_QOS_IDENTITY_STATIC}
+ RPC_C_QOS_IDENTITY_DYNAMIC = 1;
+ {$EXTERNALSYM RPC_C_QOS_IDENTITY_DYNAMIC}
+
+ RPC_C_QOS_CAPABILITIES_DEFAULT = $0;
+ {$EXTERNALSYM RPC_C_QOS_CAPABILITIES_DEFAULT}
+ RPC_C_QOS_CAPABILITIES_MUTUAL_AUTH = $1;
+ {$EXTERNALSYM RPC_C_QOS_CAPABILITIES_MUTUAL_AUTH}
+ RPC_C_QOS_CAPABILITIES_MAKE_FULLSIC = $2;
+ {$EXTERNALSYM RPC_C_QOS_CAPABILITIES_MAKE_FULLSIC}
+ RPC_C_QOS_CAPABILITIES_ANY_AUTHORITY = $4;
+ {$EXTERNALSYM RPC_C_QOS_CAPABILITIES_ANY_AUTHORITY}
+ RPC_C_QOS_CAPABILITIES_IGNORE_DELEGATE_FAILURE = $8;
+ {$EXTERNALSYM RPC_C_QOS_CAPABILITIES_IGNORE_DELEGATE_FAILURE}
+ RPC_C_QOS_CAPABILITIES_LOCAL_MA_HINT = $10;
+ {$EXTERNALSYM RPC_C_QOS_CAPABILITIES_LOCAL_MA_HINT}
+
+ RPC_C_PROTECT_LEVEL_DEFAULT = RPC_C_AUTHN_LEVEL_DEFAULT;
+ {$EXTERNALSYM RPC_C_PROTECT_LEVEL_DEFAULT}
+ RPC_C_PROTECT_LEVEL_NONE = RPC_C_AUTHN_LEVEL_NONE;
+ {$EXTERNALSYM RPC_C_PROTECT_LEVEL_NONE}
+ RPC_C_PROTECT_LEVEL_CONNECT = RPC_C_AUTHN_LEVEL_CONNECT;
+ {$EXTERNALSYM RPC_C_PROTECT_LEVEL_CONNECT}
+ RPC_C_PROTECT_LEVEL_CALL = RPC_C_AUTHN_LEVEL_CALL;
+ {$EXTERNALSYM RPC_C_PROTECT_LEVEL_CALL}
+ RPC_C_PROTECT_LEVEL_PKT = RPC_C_AUTHN_LEVEL_PKT;
+ {$EXTERNALSYM RPC_C_PROTECT_LEVEL_PKT}
+ RPC_C_PROTECT_LEVEL_PKT_INTEGRITY = RPC_C_AUTHN_LEVEL_PKT_INTEGRITY;
+ {$EXTERNALSYM RPC_C_PROTECT_LEVEL_PKT_INTEGRITY}
+ RPC_C_PROTECT_LEVEL_PKT_PRIVACY = RPC_C_AUTHN_LEVEL_PKT_PRIVACY;
+ {$EXTERNALSYM RPC_C_PROTECT_LEVEL_PKT_PRIVACY}
+
+ RPC_C_AUTHN_NONE = 0;
+ {$EXTERNALSYM RPC_C_AUTHN_NONE}
+ RPC_C_AUTHN_DCE_PRIVATE = 1;
+ {$EXTERNALSYM RPC_C_AUTHN_DCE_PRIVATE}
+ RPC_C_AUTHN_DCE_PUBLIC = 2;
+ {$EXTERNALSYM RPC_C_AUTHN_DCE_PUBLIC}
+ RPC_C_AUTHN_DEC_PUBLIC = 4;
+ {$EXTERNALSYM RPC_C_AUTHN_DEC_PUBLIC}
+ RPC_C_AUTHN_GSS_NEGOTIATE = 9;
+ {$EXTERNALSYM RPC_C_AUTHN_GSS_NEGOTIATE}
+ RPC_C_AUTHN_WINNT = 10;
+ {$EXTERNALSYM RPC_C_AUTHN_WINNT}
+ RPC_C_AUTHN_GSS_SCHANNEL = 14;
+ {$EXTERNALSYM RPC_C_AUTHN_GSS_SCHANNEL}
+ RPC_C_AUTHN_GSS_KERBEROS = 16;
+ {$EXTERNALSYM RPC_C_AUTHN_GSS_KERBEROS}
+ RPC_C_AUTHN_DPA = 17;
+ {$EXTERNALSYM RPC_C_AUTHN_DPA}
+ RPC_C_AUTHN_MSN = 18;
+ {$EXTERNALSYM RPC_C_AUTHN_MSN}
+ RPC_C_AUTHN_DIGEST = 21;
+ {$EXTERNALSYM RPC_C_AUTHN_DIGEST}
+ RPC_C_AUTHN_MQ = 100;
+ {$EXTERNALSYM RPC_C_AUTHN_MQ}
+ RPC_C_AUTHN_DEFAULT = DWORD($FFFFFFFF);
+ {$EXTERNALSYM RPC_C_AUTHN_DEFAULT}
+
+ RPC_C_NO_CREDENTIALS = RPC_AUTH_IDENTITY_HANDLE(MAXUINT_PTR);
+ {$EXTERNALSYM RPC_C_NO_CREDENTIALS}
+
+ RPC_C_SECURITY_QOS_VERSION = 1;
+ {$EXTERNALSYM RPC_C_SECURITY_QOS_VERSION}
+ RPC_C_SECURITY_QOS_VERSION_1 = 1;
+ {$EXTERNALSYM RPC_C_SECURITY_QOS_VERSION_1}
+
+type
+ _RPC_SECURITY_QOS = record
+ Version: Longint;
+ Capabilities: Longint;
+ IdentityTracking: Longint;
+ ImpersonationType: Longint;
+ end;
+ {$EXTERNALSYM _RPC_SECURITY_QOS}
+ RPC_SECURITY_QOS = _RPC_SECURITY_QOS;
+ {$EXTERNALSYM RPC_SECURITY_QOS}
+ PRPC_SECURITY_QOS = ^RPC_SECURITY_QOS;
+ {$EXTERNALSYM PRPC_SECURITY_QOS}
+ TRpcSecurityQos = RPC_SECURITY_QOS;
+ PRpcSecurityQos = PRPC_SECURITY_QOS;
+
+const
+ SEC_WINNT_AUTH_IDENTITY_ANSI = $1;
+ {$EXTERNALSYM SEC_WINNT_AUTH_IDENTITY_ANSI}
+ SEC_WINNT_AUTH_IDENTITY_UNICODE = $2;
+ {$EXTERNALSYM SEC_WINNT_AUTH_IDENTITY_UNICODE}
+
+type
+ _SEC_WINNT_AUTH_IDENTITY_W = record
+ User: PWideChar;
+ UserLength: Longint;
+ Domain: PWideChar;
+ DomainLength: Longint;
+ Password: PWideChar;
+ PasswordLength: Longint;
+ Flags: Longint;
+ end;
+ {$EXTERNALSYM _SEC_WINNT_AUTH_IDENTITY_W}
+ SEC_WINNT_AUTH_IDENTITY_W = _SEC_WINNT_AUTH_IDENTITY_W;
+ {$EXTERNALSYM SEC_WINNT_AUTH_IDENTITY_W}
+ PSEC_WINNT_AUTH_IDENTITY_W = ^SEC_WINNT_AUTH_IDENTITY_W;
+ {$EXTERNALSYM PSEC_WINNT_AUTH_IDENTITY_W}
+ TSecWinNTAuthIdentityW = SEC_WINNT_AUTH_IDENTITY_W;
+ PSecWinNTAuthIdentityW = PSEC_WINNT_AUTH_IDENTITY_W;
+
+ _SEC_WINNT_AUTH_IDENTITY_A = record
+ User: PChar;
+ UserLength: Longint;
+ Domain: PChar;
+ DomainLength: Longint;
+ Password: PChar;
+ PasswordLength: Longint;
+ Flags: Longint;
+ end;
+ {$EXTERNALSYM _SEC_WINNT_AUTH_IDENTITY_A}
+ SEC_WINNT_AUTH_IDENTITY_A = _SEC_WINNT_AUTH_IDENTITY_A;
+ {$EXTERNALSYM SEC_WINNT_AUTH_IDENTITY_A}
+ PSEC_WINNT_AUTH_IDENTITY_A = ^SEC_WINNT_AUTH_IDENTITY_A;
+ {$EXTERNALSYM PSEC_WINNT_AUTH_IDENTITY_A}
+ TSecWinNTAuthIdentityA = SEC_WINNT_AUTH_IDENTITY_A;
+ PSecWinNTAuthIdentityA = PSEC_WINNT_AUTH_IDENTITY_A;
+
+ {$IFDEF UNICODE}
+ SEC_WINNT_AUTH_IDENTITY = SEC_WINNT_AUTH_IDENTITY_W;
+ {$EXTERNALSYM SEC_WINNT_AUTH_IDENTITY}
+ PSEC_WINNT_AUTH_IDENTITY = PSEC_WINNT_AUTH_IDENTITY_W;
+ {$EXTERNALSYM PSEC_WINNT_AUTH_IDENTITY}
+ _SEC_WINNT_AUTH_IDENTITY = _SEC_WINNT_AUTH_IDENTITY_W;
+ {$EXTERNALSYM _SEC_WINNT_AUTH_IDENTITY}
+ TSecWinNTAuthIdentity = TSecWinNTAuthIdentityW;
+ PSecWinNTAuthIdentity = PSecWinNTAuthIdentityW;
+ {$ELSE}
+ SEC_WINNT_AUTH_IDENTITY = SEC_WINNT_AUTH_IDENTITY_A;
+ {$EXTERNALSYM SEC_WINNT_AUTH_IDENTITY}
+ PSEC_WINNT_AUTH_IDENTITY = PSEC_WINNT_AUTH_IDENTITY_A;
+ {$EXTERNALSYM PSEC_WINNT_AUTH_IDENTITY}
+ _SEC_WINNT_AUTH_IDENTITY = _SEC_WINNT_AUTH_IDENTITY_A;
+ {$EXTERNALSYM _SEC_WINNT_AUTH_IDENTITY}
+ TSecWinNTAuthIdentity = TSecWinNTAuthIdentityA;
+ PSecWinNTAuthIdentity = PSecWinNTAuthIdentityA;
+ {$ENDIF UNICODE}
+
+const
+ RPC_C_SECURITY_QOS_VERSION_2 = 2;
+ {$EXTERNALSYM RPC_C_SECURITY_QOS_VERSION_2}
+
+ RPC_C_AUTHN_INFO_TYPE_HTTP = 1;
+ {$EXTERNALSYM RPC_C_AUTHN_INFO_TYPE_HTTP}
+
+ RPC_C_HTTP_AUTHN_TARGET_SERVER = 1;
+ {$EXTERNALSYM RPC_C_HTTP_AUTHN_TARGET_SERVER}
+ RPC_C_HTTP_AUTHN_TARGET_PROXY = 2;
+ {$EXTERNALSYM RPC_C_HTTP_AUTHN_TARGET_PROXY}
+
+ RPC_C_HTTP_AUTHN_SCHEME_BASIC = $00000001;
+ {$EXTERNALSYM RPC_C_HTTP_AUTHN_SCHEME_BASIC}
+ RPC_C_HTTP_AUTHN_SCHEME_NTLM = $00000002;
+ {$EXTERNALSYM RPC_C_HTTP_AUTHN_SCHEME_NTLM}
+ RPC_C_HTTP_AUTHN_SCHEME_PASSPORT = $00000004;
+ {$EXTERNALSYM RPC_C_HTTP_AUTHN_SCHEME_PASSPORT}
+ RPC_C_HTTP_AUTHN_SCHEME_DIGEST = $00000008;
+ {$EXTERNALSYM RPC_C_HTTP_AUTHN_SCHEME_DIGEST}
+ RPC_C_HTTP_AUTHN_SCHEME_NEGOTIATE = $00000010;
+ {$EXTERNALSYM RPC_C_HTTP_AUTHN_SCHEME_NEGOTIATE}
+
+ RPC_C_HTTP_FLAG_USE_SSL = 1;
+ {$EXTERNALSYM RPC_C_HTTP_FLAG_USE_SSL}
+ RPC_C_HTTP_FLAG_USE_FIRST_AUTH_SCHEME = 2;
+ {$EXTERNALSYM RPC_C_HTTP_FLAG_USE_FIRST_AUTH_SCHEME}
+
+type
+ _RPC_HTTP_TRANSPORT_CREDENTIALS_W = record
+ TransportCredentials: PSEC_WINNT_AUTH_IDENTITY_W;
+ Flags: Cardinal;
+ AuthenticationTarget: Cardinal;
+ NumberOfAuthnSchemes: Cardinal;
+ AuthnSchemes: PCardinal;
+ ServerCertificateSubject: PWord;
+ end;
+ {$EXTERNALSYM RPC_HTTP_TRANSPORT_CREDENTIALS_W}
+ RPC_HTTP_TRANSPORT_CREDENTIALS_W = _RPC_HTTP_TRANSPORT_CREDENTIALS_W;
+ {$EXTERNALSYM RPC_HTTP_TRANSPORT_CREDENTIALS_W}
+ PRPC_HTTP_TRANSPORT_CREDENTIALS_W = ^RPC_HTTP_TRANSPORT_CREDENTIALS_W;
+ {$EXTERNALSYM PRPC_HTTP_TRANSPORT_CREDENTIALS_W}
+ TRpcHttpTransportCredentialsW = RPC_HTTP_TRANSPORT_CREDENTIALS_W;
+ PRpcHttpTransportCredentialsW = PRPC_HTTP_TRANSPORT_CREDENTIALS_W;
+
+ _RPC_HTTP_TRANSPORT_CREDENTIALS_A = record
+ TransportCredentials: PSEC_WINNT_AUTH_IDENTITY_A;
+ Flags: Cardinal;
+ AuthenticationTarget: Cardinal;
+ NumberOfAuthnSchemes: Cardinal;
+ AuthnSchemes: PCardinal;
+ ServerCertificateSubject: PByte;
+ end;
+ {$EXTERNALSYM RPC_HTTP_TRANSPORT_CREDENTIALS_A}
+ RPC_HTTP_TRANSPORT_CREDENTIALS_A = _RPC_HTTP_TRANSPORT_CREDENTIALS_A;
+ {$EXTERNALSYM RPC_HTTP_TRANSPORT_CREDENTIALS_A}
+ PRPC_HTTP_TRANSPORT_CREDENTIALS_A = ^RPC_HTTP_TRANSPORT_CREDENTIALS_A;
+ {$EXTERNALSYM PRPC_HTTP_TRANSPORT_CREDENTIALS_A}
+ TRpcHttpTransportCredentialsA = RPC_HTTP_TRANSPORT_CREDENTIALS_A;
+ PRpcHttpTransportCredentialsA = PRPC_HTTP_TRANSPORT_CREDENTIALS_A;
+
+ _RPC_SECURITY_QOS_V2_W = record
+ Version: Cardinal;
+ Capabilities: Cardinal;
+ IdentityTracking: Cardinal;
+ ImpersonationType: Cardinal;
+ AdditionalSecurityInfoType: Cardinal;
+ case Integer of
+ 0: (HttpCredentials: PRPC_HTTP_TRANSPORT_CREDENTIALS_W);
+ end;
+ {$EXTERNALSYM _RPC_SECURITY_QOS_V2_W}
+ RPC_SECURITY_QOS_V2_W = _RPC_SECURITY_QOS_V2_W;
+ {$EXTERNALSYM RPC_SECURITY_QOS_V2_W}
+ PRPC_SECURITY_QOS_V2_W = ^RPC_SECURITY_QOS_V2_W;
+ {$EXTERNALSYM PRPC_SECURITY_QOS_V2_W}
+ TRpcSecurityQosV2W = RPC_SECURITY_QOS_V2_W;
+ PRpcSecurityQosV2W = PRPC_SECURITY_QOS_V2_W;
+
+ _RPC_SECURITY_QOS_V2_A = record
+ Version: Cardinal;
+ Capabilities: Cardinal;
+ IdentityTracking: Cardinal;
+ ImpersonationType: Cardinal;
+ AdditionalSecurityInfoType: Cardinal;
+ case Integer of
+ 0: (HttpCredentials: PRPC_HTTP_TRANSPORT_CREDENTIALS_A);
+ end;
+ {$EXTERNALSYM _RPC_SECURITY_QOS_V2_A}
+ RPC_SECURITY_QOS_V2_A = _RPC_SECURITY_QOS_V2_A;
+ {$EXTERNALSYM RPC_SECURITY_QOS_V2_A}
+ PRPC_SECURITY_QOS_V2_A = ^RPC_SECURITY_QOS_V2_A;
+ {$EXTERNALSYM PRPC_SECURITY_QOS_V2_A}
+ TRpcSecurityQosV2A = RPC_SECURITY_QOS_V2_A;
+ PRpcSecurityQosV2A = PRPC_SECURITY_QOS_V2_A;
+
+const
+ RPC_C_SECURITY_QOS_VERSION_3 = 3;
+ {$EXTERNALSYM RPC_C_SECURITY_QOS_VERSION_3}
+
+type
+ _RPC_SECURITY_QOS_V3_W = record
+ Version: Cardinal;
+ Capabilities: Cardinal;
+ IdentityTracking: Cardinal;
+ ImpersonationType: Cardinal;
+ AdditionalSecurityInfoType: Cardinal;
+ u: record
+ case Integer of
+ 0: (HttpCredentials: PRPC_HTTP_TRANSPORT_CREDENTIALS_W);
+ end;
+ Sid: Pointer;
+ end;
+ {$EXTERNALSYM _RPC_SECURITY_QOS_V3_W}
+ RPC_SECURITY_QOS_V3_W = _RPC_SECURITY_QOS_V3_W;
+ {$EXTERNALSYM RPC_SECURITY_QOS_V3_W}
+ PRPC_SECURITY_QOS_V3_W = ^RPC_SECURITY_QOS_V3_W;
+ {$EXTERNALSYM PRPC_SECURITY_QOS_V3_W}
+ TRpcSecurityQosV3W = RPC_SECURITY_QOS_V3_W;
+ PRpcSecurityQosV3W = PRPC_SECURITY_QOS_V3_W;
+
+ _RPC_SECURITY_QOS_V3_A = record
+ Version: Cardinal;
+ Capabilities: Cardinal;
+ IdentityTracking: Cardinal;
+ ImpersonationType: Cardinal;
+ AdditionalSecurityInfoType: Cardinal;
+ u: record
+ case Integer of
+ 0: (HttpCredentials: PRPC_HTTP_TRANSPORT_CREDENTIALS_A);
+ end;
+ Sid: Pointer;
+ end;
+ {$EXTERNALSYM _RPC_SECURITY_QOS_V3_A}
+ RPC_SECURITY_QOS_V3_A = _RPC_SECURITY_QOS_V3_A;
+ {$EXTERNALSYM RPC_SECURITY_QOS_V3_A}
+ PRPC_SECURITY_QOS_V3_A = ^RPC_SECURITY_QOS_V3_A;
+ {$EXTERNALSYM PRPC_SECURITY_QOS_V3_A}
+ TRpcSecurityQosV3A = RPC_SECURITY_QOS_V3_A;
+ PRpcSecurityQosV3A = PRPC_SECURITY_QOS_V3_A;
+
+ {$IFDEF UNICODE}
+
+ RPC_SECURITY_QOS_V2 = RPC_SECURITY_QOS_V2_W;
+ {$EXTERNALSYM RPC_SECURITY_QOS_V2}
+ PRPC_SECURITY_QOS_V2 = PRPC_SECURITY_QOS_V2_W;
+ {$EXTERNALSYM PRPC_SECURITY_QOS_V2}
+ _RPC_SECURITY_QOS_V2 = _RPC_SECURITY_QOS_V2_W;
+ {$EXTERNALSYM _RPC_SECURITY_QOS_V2}
+ TRpcSecurityQosV2 = TRpcSecurityQosV2W;
+ PRpcSecurityQosV2 = PRpcSecurityQosV2W;
+
+ RPC_HTTP_TRANSPORT_CREDENTIALS = RPC_HTTP_TRANSPORT_CREDENTIALS_W;
+ {$EXTERNALSYM RPC_HTTP_TRANSPORT_CREDENTIALS}
+ PRPC_HTTP_TRANSPORT_CREDENTIALS = PRPC_HTTP_TRANSPORT_CREDENTIALS_W;
+ {$EXTERNALSYM PRPC_HTTP_TRANSPORT_CREDENTIALS}
+ _RPC_HTTP_TRANSPORT_CREDENTIALS = _RPC_HTTP_TRANSPORT_CREDENTIALS_W;
+ {$EXTERNALSYM _RPC_HTTP_TRANSPORT_CREDENTIALS}
+ TRpcHttpTransportCredentials = TRpcHttpTransportCredentialsW;
+ PRpcHttpTransportCredentials = PRpcHttpTransportCredentialsW;
+
+ RPC_SECURITY_QOS_V3 = RPC_SECURITY_QOS_V3_W;
+ {$EXTERNALSYM RPC_SECURITY_QOS_V3}
+ PRPC_SECURITY_QOS_V3 = PRPC_SECURITY_QOS_V3_W;
+ {$EXTERNALSYM PRPC_SECURITY_QOS_V3}
+ _RPC_SECURITY_QOS_V3 = _RPC_SECURITY_QOS_V3_W;
+ {$EXTERNALSYM _RPC_SECURITY_QOS_V3}
+ TRpcSecurityQosV3 = TRpcSecurityQosV3W;
+ PRpcSecurityQosV3 = PRpcSecurityQosV3W;
+
+ {$ELSE}
+
+ RPC_SECURITY_QOS_V2 = RPC_SECURITY_QOS_V2_A;
+ {$EXTERNALSYM RPC_SECURITY_QOS_V2}
+ PRPC_SECURITY_QOS_V2 = PRPC_SECURITY_QOS_V2_A;
+ {$EXTERNALSYM PRPC_SECURITY_QOS_V2}
+ _RPC_SECURITY_QOS_V2 = _RPC_SECURITY_QOS_V2_A;
+ {$EXTERNALSYM _RPC_SECURITY_QOS_V2}
+ TRpcSecurityQosV2 = TRpcSecurityQosV2A;
+ PRpcSecurityQosV2 = PRpcSecurityQosV2A;
+
+ RPC_HTTP_TRANSPORT_CREDENTIALS = RPC_HTTP_TRANSPORT_CREDENTIALS_A;
+ {$EXTERNALSYM RPC_HTTP_TRANSPORT_CREDENTIALS}
+ PRPC_HTTP_TRANSPORT_CREDENTIALS = PRPC_HTTP_TRANSPORT_CREDENTIALS_A;
+ {$EXTERNALSYM PRPC_HTTP_TRANSPORT_CREDENTIALS}
+ _RPC_HTTP_TRANSPORT_CREDENTIALS = _RPC_HTTP_TRANSPORT_CREDENTIALS_A;
+ {$EXTERNALSYM _RPC_HTTP_TRANSPORT_CREDENTIALS}
+ TRpcHttpTransportCredentials = TRpcHttpTransportCredentialsA;
+ PRpcHttpTransportCredentials = PRpcHttpTransportCredentialsA;
+
+ RPC_SECURITY_QOS_V3 = RPC_SECURITY_QOS_V3_A;
+ {$EXTERNALSYM RPC_SECURITY_QOS_V3}
+ PRPC_SECURITY_QOS_V3 = PRPC_SECURITY_QOS_V3_A;
+ {$EXTERNALSYM PRPC_SECURITY_QOS_V3}
+ _RPC_SECURITY_QOS_V3 = _RPC_SECURITY_QOS_V3_A;
+ {$EXTERNALSYM _RPC_SECURITY_QOS_V3}
+ TRpcSecurityQosV3 = TRpcSecurityQosV3A;
+ PRpcSecurityQosV3 = PRpcSecurityQosV3A;
+
+ {$ENDIF UNICODE}
+
+type
+ RPC_NEW_HTTP_PROXY_CHANNEL = function(ServerName: PWideChar; ServerPort: PWord; RemoteUser: PByte; out NewServerName: PWord): RPC_STATUS; stdcall;
+ {$EXTERNALSYM RPC_NEW_HTTP_PROXY_CHANNEL}
+
+ RPC_HTTP_PROXY_FREE_STRING = procedure(ServerName: PWideChar); stdcall;
+ {$EXTERNALSYM RPC_HTTP_PROXY_FREE_STRING}
+
+const
+ RPC_C_AUTHZ_NONE = 0;
+ {$EXTERNALSYM RPC_C_AUTHZ_NONE}
+ RPC_C_AUTHZ_NAME = 1;
+ {$EXTERNALSYM RPC_C_AUTHZ_NAME}
+ RPC_C_AUTHZ_DCE = 2;
+ {$EXTERNALSYM RPC_C_AUTHZ_DCE}
+ RPC_C_AUTHZ_DEFAULT = DWORD($ffffffff);
+ {$EXTERNALSYM RPC_C_AUTHZ_DEFAULT}
+
+function RpcImpersonateClient(BindingHandle: RPC_BINDING_HANDLE): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcImpersonateClient}
+
+function RpcRevertToSelfEx(BindingHandle: RPC_BINDING_HANDLE): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcRevertToSelfEx}
+
+function RpcRevertToSelf: RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcRevertToSelf}
+
+function RpcBindingInqAuthClientA(ClientBinding: RPC_BINDING_HANDLE;
+ Privs: PRPC_AUTHZ_HANDLE; ServerPrincName: PPChar; AuthnLevel, AuthnSvc,
+ AuthzSvc: PCardinal): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcBindingInqAuthClientA}
+function RpcBindingInqAuthClientW(ClientBinding: RPC_BINDING_HANDLE;
+ Privs: PRPC_AUTHZ_HANDLE; ServerPrincName: PPWideChar; AuthnLevel, AuthnSvc,
+ AuthzSvc: PCardinal): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcBindingInqAuthClientW}
+
+function RpcBindingInqAuthClientExA(ClientBinding: RPC_BINDING_HANDLE;
+ Privs: PRPC_AUTHZ_HANDLE; ServerPrincName: PPChar; AuthnLevel, AuthnSvc,
+ AuthzSvc: PCardinal; Flags: Cardinal): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcBindingInqAuthClientExA}
+function RpcBindingInqAuthClientExW(ClientBinding: RPC_BINDING_HANDLE;
+ Privs: PRPC_AUTHZ_HANDLE; ServerPrincName: PPWideChar; AuthnLevel, AuthnSvc,
+ AuthzSvc: PCardinal; Flags: Cardinal): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcBindingInqAuthClientExW}
+
+function RpcBindingInqAuthInfoA(Binding: RPC_BINDING_HANDLE; ServerPrincName: PPChar;
+ AuthnLevel, AuthnSvc: PCardinal; AuthIdentity: PRPC_AUTH_IDENTITY_HANDLE;
+ AuthzSvc: PCardinal): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcBindingInqAuthInfoA}
+function RpcBindingInqAuthInfoW(Binding: RPC_BINDING_HANDLE; ServerPrincName: PPWideChar;
+ AuthnLevel, AuthnSvc: PCardinal; AuthIdentity: PRPC_AUTH_IDENTITY_HANDLE;
+ AuthzSvc: PCardinal): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcBindingInqAuthInfoW}
+
+function RpcBindingSetAuthInfoA(Binding: RPC_BINDING_HANDLE; ServerPrincName: PChar;
+ AuthnLevel, AuthnSvc: Cardinal; AuthIdentity: RPC_AUTH_IDENTITY_HANDLE;
+ AuthzSvc: Cardinal): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcBindingSetAuthInfoA}
+function RpcBindingSetAuthInfoW(Binding: RPC_BINDING_HANDLE; ServerPrincName: PWideChar;
+ AuthnLevel, AuthnSvc: Cardinal; AuthIdentity: RPC_AUTH_IDENTITY_HANDLE;
+ AuthzSvc: Cardinal): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcBindingSetAuthInfoW}
+
+function RpcBindingSetAuthInfoExA(Binding: RPC_BINDING_HANDLE;
+ ServerPrincName: PChar; AuthnLevel, AuthnSvc: Cardinal;
+ AuthIdentity: RPC_AUTH_IDENTITY_HANDLE; AuthzSvc: Cardinal;
+ const SecurityQOS: RPC_SECURITY_QOS): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcBindingSetAuthInfoExA}
+function RpcBindingSetAuthInfoExW(Binding: RPC_BINDING_HANDLE;
+ ServerPrincName: PWideChar; AuthnLevel, AuthnSvc: Cardinal;
+ AuthIdentity: RPC_AUTH_IDENTITY_HANDLE; AuthzSvc: Cardinal;
+ const SecurityQOS: RPC_SECURITY_QOS): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcBindingSetAuthInfoExW}
+
+function RpcBindingInqAuthInfoExA(Binding: RPC_BINDING_HANDLE;
+ ServerPrincName: PPChar; AuthnLevel, AuthnSvc: PCardinal;
+ AuthIdentity: PRPC_AUTH_IDENTITY_HANDLE; AuthzSvc: PCardinal;
+ RpcQosVersion: Cardinal; var SecurityQOS: RPC_SECURITY_QOS): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcBindingInqAuthInfoExA}
+function RpcBindingInqAuthInfoExW(Binding: RPC_BINDING_HANDLE;
+ ServerPrincName: PPWideChar; AuthnLevel, AuthnSvc: PCardinal;
+ AuthIdentity: PRPC_AUTH_IDENTITY_HANDLE; AuthzSvc: PCardinal;
+ RpcQosVersion: Cardinal; var SecurityQOS: RPC_SECURITY_QOS): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcBindingInqAuthInfoExW}
+
+type
+ RPC_AUTH_KEY_RETRIEVAL_FN = procedure(Arg: Pointer; ServerPrincName: PWideChar;
+ KeyVer: Cardinal; var Key: Pointer; var Status: RPC_STATUS); stdcall;
+ {$EXTERNALSYM RPC_AUTH_KEY_RETRIEVAL_FN}
+ TRpcAuthKeyRetrievalFn = RPC_AUTH_KEY_RETRIEVAL_FN;
+
+function RpcServerRegisterAuthInfoA(ServerPrincName: PChar; AuthnSvc: Cardinal;
+ GetKeyFn: RPC_AUTH_KEY_RETRIEVAL_FN; Arg: Pointer): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcServerRegisterAuthInfoA}
+function RpcServerRegisterAuthInfoW(ServerPrincName: PWideChar; AuthnSvc: Cardinal;
+ GetKeyFn: RPC_AUTH_KEY_RETRIEVAL_FN; Arg: Pointer): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcServerRegisterAuthInfoW}
+function RpcBindingInqAuthClient(ClientBinding: RPC_BINDING_HANDLE;
+ Privs: PRPC_AUTHZ_HANDLE; ServerPrincName: PPTSTR; AuthnLevel, AuthnSvc,
+ AuthzSvc: PCardinal): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcBindingInqAuthClient}
+function RpcBindingInqAuthClientEx(ClientBinding: RPC_BINDING_HANDLE;
+ Privs: PRPC_AUTHZ_HANDLE; ServerPrincName: PPTSTR; AuthnLevel, AuthnSvc,
+ AuthzSvc: PCardinal; Flags: Cardinal): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcBindingInqAuthClientEx}
+function RpcBindingInqAuthInfo(Binding: RPC_BINDING_HANDLE; ServerPrincName: PPTSTR;
+ AuthnLevel, AuthnSvc: PCardinal; AuthIdentity: PRPC_AUTH_IDENTITY_HANDLE;
+ AuthzSvc: PCardinal): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcBindingInqAuthInfo}
+function RpcBindingSetAuthInfo(Binding: RPC_BINDING_HANDLE; ServerPrincName: PTSTR;
+ AuthnLevel, AuthnSvc: Cardinal; AuthIdentity: RPC_AUTH_IDENTITY_HANDLE;
+ AuthzSvc: Cardinal): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcBindingSetAuthInfo}
+function RpcBindingSetAuthInfoEx(Binding: RPC_BINDING_HANDLE;
+ ServerPrincName: PTSTR; AuthnLevel, AuthnSvc: Cardinal;
+ AuthIdentity: RPC_AUTH_IDENTITY_HANDLE; AuthzSvc: Cardinal;
+ const SecurityQOS: RPC_SECURITY_QOS): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcBindingSetAuthInfoEx}
+function RpcBindingInqAuthInfoEx(Binding: RPC_BINDING_HANDLE;
+ ServerPrincName: PPTSTR; AuthnLevel, AuthnSvc: PCardinal;
+ AuthIdentity: PRPC_AUTH_IDENTITY_HANDLE; AuthzSvc: PCardinal;
+ RpcQosVersion: Cardinal; var SecurityQOS: RPC_SECURITY_QOS): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcBindingInqAuthInfoEx}
+function RpcServerRegisterAuthInfo(ServerPrincName: PTSTR; AuthnSvc: Cardinal;
+ GetKeyFn: RPC_AUTH_KEY_RETRIEVAL_FN; Arg: Pointer): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcServerRegisterAuthInfo}
+
+type
+ RPC_CLIENT_INFORMATION1 = record
+ UserName: PChar;
+ ComputerName: PChar;
+ Privilege: Word;
+ AuthFlags: Longword;
+ end;
+ {$EXTERNALSYM RPC_CLIENT_INFORMATION1}
+ PRPC_CLIENT_INFORMATION1 = ^RPC_CLIENT_INFORMATION1;
+ {$EXTERNALSYM PRPC_CLIENT_INFORMATION1}
+ TRpcClientInformation1 = RPC_CLIENT_INFORMATION1;
+ PRpcClientInformation1 = PRPC_CLIENT_INFORMATION1;
+
+function RpcBindingServerFromClient(ClientBinding: RPC_BINDING_HANDLE;
+ var ServerBinding: RPC_BINDING_HANDLE): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcBindingServerFromClient}
+
+procedure RpcRaiseException(exception: RPC_STATUS); stdcall;
+{$EXTERNALSYM RpcRaiseException}
+
+function RpcTestCancel: RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcTestCancel}
+
+function RpcServerTestCancel(BindingHandle: RPC_BINDING_HANDLE): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcServerTestCancel}
+
+function RpcCancelThread(Thread: Pointer): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcCancelThread}
+
+function RpcCancelThreadEx(Thread: Pointer; Timeout: Longint): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcCancelThreadEx}
+
+function UuidCreate(var Uuid: UUID): RPC_STATUS; stdcall;
+{$EXTERNALSYM UuidCreate}
+
+function UuidCreateSequential(out Uuid: UUID): RPC_STATUS; stdcall;
+{$EXTERNALSYM UuidCreateSequential}
+
+function UuidFromStringA(StringUuid: PChar; var Uuid: UUID): RPC_STATUS; stdcall;
+{$EXTERNALSYM UuidFromStringA}
+function UuidFromStringW(StringUuid: PWideChar; var Uuid: UUID): RPC_STATUS; stdcall;
+{$EXTERNALSYM UuidFromStringW}
+function UuidFromString(StringUuid: PTSTR; var Uuid: UUID): RPC_STATUS; stdcall;
+{$EXTERNALSYM UuidFromString}
+
+function UuidToStringA(const Uuid: UUID; var StringUuid: PChar): RPC_STATUS; stdcall;
+{$EXTERNALSYM UuidToStringA}
+function UuidToStringW(const Uuid: UUID; var StringUuid: PWideChar): RPC_STATUS; stdcall;
+{$EXTERNALSYM UuidToStringW}
+function UuidToString(const Uuid: UUID; var StringUuid: PTSTR): RPC_STATUS; stdcall;
+{$EXTERNALSYM UuidToString}
+
+function UuidCompare(const Uuid1, Uuid2: UUID; var Status: RPC_STATUS): Integer; stdcall;
+{$EXTERNALSYM UuidCompare}
+
+function UuidCreateNil(var NilUuid: UUID): RPC_STATUS; stdcall;
+{$EXTERNALSYM UuidCreateNil}
+
+function UuidEqual(const Uuid1, Uuid2: UUID; var Status: RPC_STATUS): Integer; stdcall;
+{$EXTERNALSYM UuidEqual}
+
+function UuidHash(const Uuid: UUID; var Status: RPC_STATUS): Word; stdcall;
+{$EXTERNALSYM UuidHash}
+
+function UuidIsNil(const Uuid: UUID; var Status: RPC_STATUS): Integer; stdcall;
+{$EXTERNALSYM UuidIsNil}
+
+function RpcEpRegisterNoReplaceA(IfSpec: RPC_IF_HANDLE;
+ BindingVector: PRPC_BINDING_VECTOR; UuidVector: PUUID_VECTOR;
+ Annotation: PChar): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcEpRegisterNoReplaceA}
+function RpcEpRegisterNoReplaceW(IfSpec: RPC_IF_HANDLE;
+ BindingVector: PRPC_BINDING_VECTOR; UuidVector: PUUID_VECTOR;
+ Annotation: PWideChar): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcEpRegisterNoReplaceW}
+function RpcEpRegisterNoReplace(IfSpec: RPC_IF_HANDLE;
+ BindingVector: PRPC_BINDING_VECTOR; UuidVector: PUUID_VECTOR;
+ Annotation: PTSTR): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcEpRegisterNoReplace}
+
+function RpcEpRegisterA(IfSpec: RPC_IF_HANDLE; BindingVector: PRPC_BINDING_VECTOR;
+ UuidVector: PUUID_VECTOR; Annotation: PChar): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcEpRegisterA}
+function RpcEpRegisterW(IfSpec: RPC_IF_HANDLE; BindingVector: PRPC_BINDING_VECTOR;
+ UuidVector: PUUID_VECTOR; Annotation: PWideChar): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcEpRegisterW}
+
+function RpcEpRegister(IfSpec: RPC_IF_HANDLE; BindingVector: PRPC_BINDING_VECTOR;
+ UuidVector: PUUID_VECTOR; Annotation: PTSTR): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcEpRegister}
+
+function RpcEpUnregister(IfSpec: RPC_IF_HANDLE; BindingVector: PRPC_BINDING_VECTOR;
+ UuidVector: UUID_VECTOR): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcEpUnregister}
+
+function DceErrorInqTextA(RpcStatus: RPC_STATUS; ErrorText: PChar): RPC_STATUS; stdcall;
+{$EXTERNALSYM DceErrorInqTextA}
+function DceErrorInqTextW(RpcStatus: RPC_STATUS; ErrorText: PWideChar): RPC_STATUS; stdcall;
+{$EXTERNALSYM DceErrorInqTextW}
+function DceErrorInqText(RpcStatus: RPC_STATUS; ErrorText: PTSTR): RPC_STATUS; stdcall;
+{$EXTERNALSYM DceErrorInqText}
+
+const
+ DCE_C_ERROR_STRING_LEN = 256;
+ {$EXTERNALSYM DCE_C_ERROR_STRING_LEN}
+
+type
+ RPC_EP_INQ_HANDLE = ^I_RPC_HANDLE;
+ {$EXTERNALSYM RPC_EP_INQ_HANDLE}
+
+const
+ RPC_C_EP_ALL_ELTS = 0;
+ {$EXTERNALSYM RPC_C_EP_ALL_ELTS}
+ RPC_C_EP_MATCH_BY_IF = 1;
+ {$EXTERNALSYM RPC_C_EP_MATCH_BY_IF}
+ RPC_C_EP_MATCH_BY_OBJ = 2;
+ {$EXTERNALSYM RPC_C_EP_MATCH_BY_OBJ}
+ RPC_C_EP_MATCH_BY_BOTH = 3;
+ {$EXTERNALSYM RPC_C_EP_MATCH_BY_BOTH}
+
+ RPC_C_VERS_ALL = 1;
+ {$EXTERNALSYM RPC_C_VERS_ALL}
+ RPC_C_VERS_COMPATIBLE = 2;
+ {$EXTERNALSYM RPC_C_VERS_COMPATIBLE}
+ RPC_C_VERS_EXACT = 3;
+ {$EXTERNALSYM RPC_C_VERS_EXACT}
+ RPC_C_VERS_MAJOR_ONLY = 4;
+ {$EXTERNALSYM RPC_C_VERS_MAJOR_ONLY}
+ RPC_C_VERS_UPTO = 5;
+ {$EXTERNALSYM RPC_C_VERS_UPTO}
+
+function RpcMgmtEpEltInqBegin(EpBinding: RPC_BINDING_HANDLE; InquiryType: Cardinal;
+ IfId: PRPC_IF_ID; VersOption: Cardinal; ObjectUuid: PUUID;
+ var InquiryContext: RPC_EP_INQ_HANDLE): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcMgmtEpEltInqBegin}
+
+function RpcMgmtEpEltInqDone(var InquiryContext: RPC_EP_INQ_HANDLE): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcMgmtEpEltInqDone}
+
+function RpcMgmtEpEltInqNextA(InquiryContext: RPC_EP_INQ_HANDLE; var IfId: RPC_IF_ID;
+ Binding: PRPC_BINDING_HANDLE; ObjectUuid: PUUID; var Annotation: PChar): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcMgmtEpEltInqNextA}
+function RpcMgmtEpEltInqNextW(InquiryContext: RPC_EP_INQ_HANDLE; var IfId: RPC_IF_ID;
+ Binding: PRPC_BINDING_HANDLE; ObjectUuid: PUUID; var Annotation: PWideChar): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcMgmtEpEltInqNextW}
+function RpcMgmtEpEltInqNext(InquiryContext: RPC_EP_INQ_HANDLE; var IfId: RPC_IF_ID;
+ Binding: PRPC_BINDING_HANDLE; ObjectUuid: PUUID; var Annotation: PTSTR): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcMgmtEpEltInqNext}
+
+function RpcMgmtEpUnregister(EpBinding: RPC_BINDING_HANDLE; IfId: PRPC_IF_ID;
+ Binding: RPC_BINDING_HANDLE; ObjectUuid : PUUID): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcMgmtEpUnregister}
+
+type
+ RPC_MGMT_AUTHORIZATION_FN = function(ClientBinding: RPC_BINDING_HANDLE;
+ RequestedMgmtOperation: Cardinal; var Status: RPC_STATUS): Integer; stdcall;
+ {$EXTERNALSYM RPC_MGMT_AUTHORIZATION_FN}
+ TRpcMgmtAuthorizationFn = RPC_MGMT_AUTHORIZATION_FN;
+
+const
+ RPC_C_MGMT_INQ_IF_IDS = 0;
+ {$EXTERNALSYM RPC_C_MGMT_INQ_IF_IDS}
+ RPC_C_MGMT_INQ_PRINC_NAME = 1;
+ {$EXTERNALSYM RPC_C_MGMT_INQ_PRINC_NAME}
+ RPC_C_MGMT_INQ_STATS = 2;
+ {$EXTERNALSYM RPC_C_MGMT_INQ_STATS}
+ RPC_C_MGMT_IS_SERVER_LISTEN = 3;
+ {$EXTERNALSYM RPC_C_MGMT_IS_SERVER_LISTEN}
+ RPC_C_MGMT_STOP_SERVER_LISTEN = 4;
+ {$EXTERNALSYM RPC_C_MGMT_STOP_SERVER_LISTEN}
+
+function RpcMgmtSetAuthorizationFn(AuthorizationFn: RPC_MGMT_AUTHORIZATION_FN): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcMgmtSetAuthorizationFn}
+
+const
+ RPC_C_PARM_MAX_PACKET_LENGTH = 1;
+ {$EXTERNALSYM RPC_C_PARM_MAX_PACKET_LENGTH}
+ RPC_C_PARM_BUFFER_LENGTH = 2;
+ {$EXTERNALSYM RPC_C_PARM_BUFFER_LENGTH}
+
+ RPC_IF_AUTOLISTEN = $0001;
+ {$EXTERNALSYM RPC_IF_AUTOLISTEN}
+ RPC_IF_OLE = $0002;
+ {$EXTERNALSYM RPC_IF_OLE}
+ RPC_IF_ALLOW_UNKNOWN_AUTHORITY = $0004;
+ {$EXTERNALSYM RPC_IF_ALLOW_UNKNOWN_AUTHORITY}
+ RPC_IF_ALLOW_SECURE_ONLY = $0008;
+ {$EXTERNALSYM RPC_IF_ALLOW_SECURE_ONLY}
+ RPC_IF_ALLOW_CALLBACKS_WITH_NO_AUTH = $0010;
+ {$EXTERNALSYM RPC_IF_ALLOW_CALLBACKS_WITH_NO_AUTH}
+
+implementation
+
+const
+ rpclib = 'rpcrt4.dll';
+ {$IFDEF UNICODE}
+ AWSuffix = 'W';
+ {$ELSE}
+ AWSuffix = 'A';
+ {$ENDIF UNICODE}
+
+{$IFDEF DYNAMIC_LINK}
+
+var
+ _RpcBindingCopy: Pointer;
+
+function RpcBindingCopy;
+begin
+ GetProcedureAddress(_RpcBindingCopy, rpclib, 'RpcBindingCopy');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcBindingCopy]
+ end;
+end;
+
+var
+ _RpcBindingFree: Pointer;
+
+function RpcBindingFree;
+begin
+ GetProcedureAddress(_RpcBindingFree, rpclib, 'RpcBindingFree');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcBindingFree]
+ end;
+end;
+
+var
+ _RpcBindingSetOption: Pointer;
+
+function RpcBindingSetOption;
+begin
+ GetProcedureAddress(_RpcBindingSetOption, rpclib, 'RpcBindingSetOption');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcBindingSetOption]
+ end;
+end;
+
+var
+ _RpcBindingInqOption: Pointer;
+
+function RpcBindingInqOption;
+begin
+ GetProcedureAddress(_RpcBindingInqOption, rpclib, 'RpcBindingInqOption');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcBindingInqOption]
+ end;
+end;
+
+var
+ _RpcBindingFromStringBindingA: Pointer;
+
+function RpcBindingFromStringBindingA;
+begin
+ GetProcedureAddress(_RpcBindingFromStringBindingA, rpclib, 'RpcBindingFromStringBindingA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcBindingFromStringBindingA]
+ end;
+end;
+
+var
+ _RpcBindingFromStringBindingW: Pointer;
+
+function RpcBindingFromStringBindingW;
+begin
+ GetProcedureAddress(_RpcBindingFromStringBindingW, rpclib, 'RpcBindingFromStringBindingW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcBindingFromStringBindingW]
+ end;
+end;
+
+var
+ _RpcBindingFromStringBinding: Pointer;
+
+function RpcBindingFromStringBinding;
+begin
+ GetProcedureAddress(_RpcBindingFromStringBinding, rpclib, 'RpcBindingFromStringBinding' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcBindingFromStringBinding]
+ end;
+end;
+
+var
+ _RpcSsGetContextBinding: Pointer;
+
+function RpcSsGetContextBinding;
+begin
+ GetProcedureAddress(_RpcSsGetContextBinding, rpclib, 'RpcSsGetContextBinding');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcSsGetContextBinding]
+ end;
+end;
+
+var
+ _RpcBindingInqObject: Pointer;
+
+function RpcBindingInqObject;
+begin
+ GetProcedureAddress(_RpcBindingInqObject, rpclib, 'RpcBindingInqObject');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcBindingInqObject]
+ end;
+end;
+
+var
+ _RpcBindingReset: Pointer;
+
+function RpcBindingReset;
+begin
+ GetProcedureAddress(_RpcBindingReset, rpclib, 'RpcBindingReset');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcBindingReset]
+ end;
+end;
+
+var
+ _RpcBindingSetObject: Pointer;
+
+function RpcBindingSetObject;
+begin
+ GetProcedureAddress(_RpcBindingSetObject, rpclib, 'RpcBindingSetObject');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcBindingSetObject]
+ end;
+end;
+
+var
+ _RpcMgmtInqDefaultProtectLevel: Pointer;
+
+function RpcMgmtInqDefaultProtectLevel;
+begin
+ GetProcedureAddress(_RpcMgmtInqDefaultProtectLevel, rpclib, 'RpcMgmtInqDefaultProtectLevel');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcMgmtInqDefaultProtectLevel]
+ end;
+end;
+
+var
+ _RpcBindingToStringBindingA: Pointer;
+
+function RpcBindingToStringBindingA;
+begin
+ GetProcedureAddress(_RpcBindingToStringBindingA, rpclib, 'RpcBindingToStringBindingA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcBindingToStringBindingA]
+ end;
+end;
+
+var
+ _RpcBindingToStringBindingW: Pointer;
+
+function RpcBindingToStringBindingW;
+begin
+ GetProcedureAddress(_RpcBindingToStringBindingW, rpclib, 'RpcBindingToStringBindingW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcBindingToStringBindingW]
+ end;
+end;
+
+var
+ _RpcBindingToStringBinding: Pointer;
+
+function RpcBindingToStringBinding;
+begin
+ GetProcedureAddress(_RpcBindingToStringBinding, rpclib, 'RpcBindingToStringBinding' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcBindingToStringBinding]
+ end;
+end;
+
+var
+ _RpcBindingVectorFree: Pointer;
+
+function RpcBindingVectorFree;
+begin
+ GetProcedureAddress(_RpcBindingVectorFree, rpclib, 'RpcBindingVectorFree');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcBindingVectorFree]
+ end;
+end;
+
+var
+ _RpcStringBindingComposeA: Pointer;
+
+function RpcStringBindingComposeA;
+begin
+ GetProcedureAddress(_RpcStringBindingComposeA, rpclib, 'RpcStringBindingComposeA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcStringBindingComposeA]
+ end;
+end;
+
+var
+ _RpcStringBindingComposeW: Pointer;
+
+function RpcStringBindingComposeW;
+begin
+ GetProcedureAddress(_RpcStringBindingComposeW, rpclib, 'RpcStringBindingComposeW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcStringBindingComposeW]
+ end;
+end;
+
+var
+ _RpcStringBindingCompose: Pointer;
+
+function RpcStringBindingCompose;
+begin
+ GetProcedureAddress(_RpcStringBindingCompose, rpclib, 'RpcStringBindingCompose' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcStringBindingCompose]
+ end;
+end;
+
+var
+ _RpcStringBindingParseA: Pointer;
+
+function RpcStringBindingParseA;
+begin
+ GetProcedureAddress(_RpcStringBindingParseA, rpclib, 'RpcStringBindingParseA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcStringBindingParseA]
+ end;
+end;
+
+var
+ _RpcStringBindingParseW: Pointer;
+
+function RpcStringBindingParseW;
+begin
+ GetProcedureAddress(_RpcStringBindingParseW, rpclib, 'RpcStringBindingParseW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcStringBindingParseW]
+ end;
+end;
+
+var
+ _RpcStringBindingParse: Pointer;
+
+function RpcStringBindingParse;
+begin
+ GetProcedureAddress(_RpcStringBindingParse, rpclib, 'RpcStringBindingParse' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcStringBindingParse]
+ end;
+end;
+
+var
+ _RpcStringFreeA: Pointer;
+
+function RpcStringFreeA;
+begin
+ GetProcedureAddress(_RpcStringFreeA, rpclib, 'RpcStringFreeA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcStringFreeA]
+ end;
+end;
+
+var
+ _RpcStringFreeW: Pointer;
+
+function RpcStringFreeW;
+begin
+ GetProcedureAddress(_RpcStringFreeW, rpclib, 'RpcStringFreeW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcStringFreeW]
+ end;
+end;
+
+var
+ _RpcStringFree: Pointer;
+
+function RpcStringFree;
+begin
+ GetProcedureAddress(_RpcStringFree, rpclib, 'RpcStringFree' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcStringFree]
+ end;
+end;
+
+var
+ _RpcIfInqId: Pointer;
+
+function RpcIfInqId;
+begin
+ GetProcedureAddress(_RpcIfInqId, rpclib, 'RpcIfInqId');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcIfInqId]
+ end;
+end;
+
+var
+ _RpcNetworkIsProtseqValidA: Pointer;
+
+function RpcNetworkIsProtseqValidA;
+begin
+ GetProcedureAddress(_RpcNetworkIsProtseqValidA, rpclib, 'RpcNetworkIsProtseqValidA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcNetworkIsProtseqValidA]
+ end;
+end;
+
+var
+ _RpcNetworkIsProtseqValidW: Pointer;
+
+function RpcNetworkIsProtseqValidW;
+begin
+ GetProcedureAddress(_RpcNetworkIsProtseqValidW, rpclib, 'RpcNetworkIsProtseqValidW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcNetworkIsProtseqValidW]
+ end;
+end;
+
+var
+ _RpcMgmtInqComTimeout: Pointer;
+
+function RpcMgmtInqComTimeout;
+begin
+ GetProcedureAddress(_RpcMgmtInqComTimeout, rpclib, 'RpcMgmtInqComTimeout');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcMgmtInqComTimeout]
+ end;
+end;
+
+var
+ _RpcMgmtSetComTimeout: Pointer;
+
+function RpcMgmtSetComTimeout;
+begin
+ GetProcedureAddress(_RpcMgmtSetComTimeout, rpclib, 'RpcMgmtSetComTimeout');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcMgmtSetComTimeout]
+ end;
+end;
+
+var
+ _RpcMgmtSetCancelTimeout: Pointer;
+
+function RpcMgmtSetCancelTimeout;
+begin
+ GetProcedureAddress(_RpcMgmtSetCancelTimeout, rpclib, 'RpcMgmtSetCancelTimeout');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcMgmtSetCancelTimeout]
+ end;
+end;
+
+var
+ _RpcNetworkInqProtseqsA: Pointer;
+
+function RpcNetworkInqProtseqsA;
+begin
+ GetProcedureAddress(_RpcNetworkInqProtseqsA, rpclib, 'RpcNetworkInqProtseqsA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcNetworkInqProtseqsA]
+ end;
+end;
+
+var
+ _RpcNetworkInqProtseqsW: Pointer;
+
+function RpcNetworkInqProtseqsW;
+begin
+ GetProcedureAddress(_RpcNetworkInqProtseqsW, rpclib, 'RpcNetworkInqProtseqsW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcNetworkInqProtseqsW]
+ end;
+end;
+
+var
+ _RpcNetworkInqProtseqs: Pointer;
+
+function RpcNetworkInqProtseqs;
+begin
+ GetProcedureAddress(_RpcNetworkInqProtseqs, rpclib, 'RpcNetworkInqProtseqs' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcNetworkInqProtseqs]
+ end;
+end;
+
+var
+ _RpcObjectInqType: Pointer;
+
+function RpcObjectInqType;
+begin
+ GetProcedureAddress(_RpcObjectInqType, rpclib, 'RpcObjectInqType');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcObjectInqType]
+ end;
+end;
+
+var
+ _RpcObjectSetInqFn: Pointer;
+
+function RpcObjectSetInqFn;
+begin
+ GetProcedureAddress(_RpcObjectSetInqFn, rpclib, 'RpcObjectSetInqFn');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcObjectSetInqFn]
+ end;
+end;
+
+var
+ _RpcObjectSetType: Pointer;
+
+function RpcObjectSetType;
+begin
+ GetProcedureAddress(_RpcObjectSetType, rpclib, 'RpcObjectSetType');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcObjectSetType]
+ end;
+end;
+
+var
+ _RpcProtseqVectorFreeA: Pointer;
+
+function RpcProtseqVectorFreeA;
+begin
+ GetProcedureAddress(_RpcProtseqVectorFreeA, rpclib, 'RpcProtseqVectorFreeA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcProtseqVectorFreeA]
+ end;
+end;
+
+var
+ _RpcProtseqVectorFreeW: Pointer;
+
+function RpcProtseqVectorFreeW;
+begin
+ GetProcedureAddress(_RpcProtseqVectorFreeW, rpclib, 'RpcProtseqVectorFreeW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcProtseqVectorFreeW]
+ end;
+end;
+
+var
+ _RpcProtseqVectorFree: Pointer;
+
+function RpcProtseqVectorFree;
+begin
+ GetProcedureAddress(_RpcProtseqVectorFree, rpclib, 'RpcProtseqVectorFree' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcProtseqVectorFree]
+ end;
+end;
+
+var
+ _RpcServerInqBindings: Pointer;
+
+function RpcServerInqBindings;
+begin
+ GetProcedureAddress(_RpcServerInqBindings, rpclib, 'RpcServerInqBindings');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcServerInqBindings]
+ end;
+end;
+
+var
+ _RpcServerInqIf: Pointer;
+
+function RpcServerInqIf;
+begin
+ GetProcedureAddress(_RpcServerInqIf, rpclib, 'RpcServerInqIf');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcServerInqIf]
+ end;
+end;
+
+var
+ _RpcServerListen: Pointer;
+
+function RpcServerListen;
+begin
+ GetProcedureAddress(_RpcServerListen, rpclib, 'RpcServerListen');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcServerListen]
+ end;
+end;
+
+var
+ _RpcServerRegisterIf: Pointer;
+
+function RpcServerRegisterIf;
+begin
+ GetProcedureAddress(_RpcServerRegisterIf, rpclib, 'RpcServerRegisterIf');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcServerRegisterIf]
+ end;
+end;
+
+var
+ _RpcServerRegisterIfEx: Pointer;
+
+function RpcServerRegisterIfEx;
+begin
+ GetProcedureAddress(_RpcServerRegisterIfEx, rpclib, 'RpcServerRegisterIfEx');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcServerRegisterIfEx]
+ end;
+end;
+
+var
+ _RpcServerRegisterIf2: Pointer;
+
+function RpcServerRegisterIf2;
+begin
+ GetProcedureAddress(_RpcServerRegisterIf2, rpclib, 'RpcServerRegisterIf2');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcServerRegisterIf2]
+ end;
+end;
+
+var
+ _RpcServerUnregisterIf: Pointer;
+
+function RpcServerUnregisterIf;
+begin
+ GetProcedureAddress(_RpcServerUnregisterIf, rpclib, 'RpcServerUnregisterIf');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcServerUnregisterIf]
+ end;
+end;
+
+var
+ _RpcServerUnregisterIfEx: Pointer;
+
+function RpcServerUnregisterIfEx;
+begin
+ GetProcedureAddress(_RpcServerUnregisterIfEx, rpclib, 'RpcServerUnregisterIfEx');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcServerUnregisterIfEx]
+ end;
+end;
+
+var
+ _RpcServerUseAllProtseqs: Pointer;
+
+function RpcServerUseAllProtseqs;
+begin
+ GetProcedureAddress(_RpcServerUseAllProtseqs, rpclib, 'RpcServerUseAllProtseqs');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcServerUseAllProtseqs]
+ end;
+end;
+
+var
+ _RpcServerUseAllProtseqsEx: Pointer;
+
+function RpcServerUseAllProtseqsEx;
+begin
+ GetProcedureAddress(_RpcServerUseAllProtseqsEx, rpclib, 'RpcServerUseAllProtseqsEx');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcServerUseAllProtseqsEx]
+ end;
+end;
+
+var
+ _RpcServerUseAllProtseqsIf: Pointer;
+
+function RpcServerUseAllProtseqsIf;
+begin
+ GetProcedureAddress(_RpcServerUseAllProtseqsIf, rpclib, 'RpcServerUseAllProtseqsIf');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcServerUseAllProtseqsIf]
+ end;
+end;
+
+var
+ _RpcServerUseAllProtseqsIfEx: Pointer;
+
+function RpcServerUseAllProtseqsIfEx;
+begin
+ GetProcedureAddress(_RpcServerUseAllProtseqsIfEx, rpclib, 'RpcServerUseAllProtseqsIfEx');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcServerUseAllProtseqsIfEx]
+ end;
+end;
+
+var
+ _RpcServerUseProtseqA: Pointer;
+
+function RpcServerUseProtseqA;
+begin
+ GetProcedureAddress(_RpcServerUseProtseqA, rpclib, 'RpcServerUseProtseqA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcServerUseProtseqA]
+ end;
+end;
+
+var
+ _RpcServerUseProtseqW: Pointer;
+
+function RpcServerUseProtseqW;
+begin
+ GetProcedureAddress(_RpcServerUseProtseqW, rpclib, 'RpcServerUseProtseqW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcServerUseProtseqW]
+ end;
+end;
+
+var
+ _RpcServerUseProtseq: Pointer;
+
+function RpcServerUseProtseq;
+begin
+ GetProcedureAddress(_RpcServerUseProtseq, rpclib, 'RpcServerUseProtseq' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcServerUseProtseq]
+ end;
+end;
+
+var
+ _RpcServerUseProtseqExA: Pointer;
+
+function RpcServerUseProtseqExA;
+begin
+ GetProcedureAddress(_RpcServerUseProtseqExA, rpclib, 'RpcServerUseProtseqExA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcServerUseProtseqExA]
+ end;
+end;
+
+var
+ _RpcServerUseProtseqExW: Pointer;
+
+function RpcServerUseProtseqExW;
+begin
+ GetProcedureAddress(_RpcServerUseProtseqExW, rpclib, 'RpcServerUseProtseqExW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcServerUseProtseqExW]
+ end;
+end;
+
+var
+ _RpcServerUseProtseqEx: Pointer;
+
+function RpcServerUseProtseqEx;
+begin
+ GetProcedureAddress(_RpcServerUseProtseqEx, rpclib, 'RpcServerUseProtseqEx' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcServerUseProtseqEx]
+ end;
+end;
+
+var
+ _RpcServerUseProtseqEpA: Pointer;
+
+function RpcServerUseProtseqEpA;
+begin
+ GetProcedureAddress(_RpcServerUseProtseqEpA, rpclib, 'RpcServerUseProtseqEpA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcServerUseProtseqEpA]
+ end;
+end;
+
+var
+ _RpcServerUseProtseqEpW: Pointer;
+
+function RpcServerUseProtseqEpW;
+begin
+ GetProcedureAddress(_RpcServerUseProtseqEpW, rpclib, 'RpcServerUseProtseqEpW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcServerUseProtseqEpW]
+ end;
+end;
+
+var
+ _RpcServerUseProtseqEp: Pointer;
+
+function RpcServerUseProtseqEp;
+begin
+ GetProcedureAddress(_RpcServerUseProtseqEp, rpclib, 'RpcServerUseProtseqEp' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcServerUseProtseqEp]
+ end;
+end;
+
+var
+ _RpcServerUseProtseqEpExA: Pointer;
+
+function RpcServerUseProtseqEpExA;
+begin
+ GetProcedureAddress(_RpcServerUseProtseqEpExA, rpclib, 'RpcServerUseProtseqEpExA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcServerUseProtseqEpExA]
+ end;
+end;
+
+var
+ _RpcServerUseProtseqEpExW: Pointer;
+
+function RpcServerUseProtseqEpExW;
+begin
+ GetProcedureAddress(_RpcServerUseProtseqEpExW, rpclib, 'RpcServerUseProtseqEpExW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcServerUseProtseqEpExW]
+ end;
+end;
+
+var
+ _RpcServerUseProtseqEpEx: Pointer;
+
+function RpcServerUseProtseqEpEx;
+begin
+ GetProcedureAddress(_RpcServerUseProtseqEpEx, rpclib, 'RpcServerUseProtseqEpEx' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcServerUseProtseqEpEx]
+ end;
+end;
+
+var
+ _RpcServerUseProtseqIfA: Pointer;
+
+function RpcServerUseProtseqIfA;
+begin
+ GetProcedureAddress(_RpcServerUseProtseqIfA, rpclib, 'RpcServerUseProtseqIfA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcServerUseProtseqIfA]
+ end;
+end;
+
+var
+ _RpcServerUseProtseqIfW: Pointer;
+
+function RpcServerUseProtseqIfW;
+begin
+ GetProcedureAddress(_RpcServerUseProtseqIfW, rpclib, 'RpcServerUseProtseqIfW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcServerUseProtseqIfW]
+ end;
+end;
+
+var
+ _RpcServerUseProtseqIfExA: Pointer;
+
+function RpcServerUseProtseqIfExA;
+begin
+ GetProcedureAddress(_RpcServerUseProtseqIfExA, rpclib, 'RpcServerUseProtseqIfExA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcServerUseProtseqIfExA]
+ end;
+end;
+
+var
+ _RpcServerUseProtseqIfExW: Pointer;
+
+function RpcServerUseProtseqIfExW;
+begin
+ GetProcedureAddress(_RpcServerUseProtseqIfExW, rpclib, 'RpcServerUseProtseqIfExW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcServerUseProtseqIfExW]
+ end;
+end;
+
+var
+ _RpcServerUseProtseqIfEx: Pointer;
+
+function RpcServerUseProtseqIfEx;
+begin
+ GetProcedureAddress(_RpcServerUseProtseqIfEx, rpclib, 'RpcServerUseProtseqIfEx' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcServerUseProtseqIfEx]
+ end;
+end;
+
+var
+ _RpcServerYield: Pointer;
+
+procedure RpcServerYield;
+begin
+ GetProcedureAddress(_RpcServerYield, rpclib, 'RpcServerYield');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcServerYield]
+ end;
+end;
+
+var
+ _RpcMgmtStatsVectorFree: Pointer;
+
+function RpcMgmtStatsVectorFree;
+begin
+ GetProcedureAddress(_RpcMgmtStatsVectorFree, rpclib, 'RpcMgmtStatsVectorFree');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcMgmtStatsVectorFree]
+ end;
+end;
+
+var
+ _RpcMgmtInqStats: Pointer;
+
+function RpcMgmtInqStats;
+begin
+ GetProcedureAddress(_RpcMgmtInqStats, rpclib, 'RpcMgmtInqStats');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcMgmtInqStats]
+ end;
+end;
+
+var
+ _RpcMgmtIsServerListening: Pointer;
+
+function RpcMgmtIsServerListening;
+begin
+ GetProcedureAddress(_RpcMgmtIsServerListening, rpclib, 'RpcMgmtIsServerListening');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcMgmtIsServerListening]
+ end;
+end;
+
+var
+ _RpcMgmtStopServerListening: Pointer;
+
+function RpcMgmtStopServerListening;
+begin
+ GetProcedureAddress(_RpcMgmtStopServerListening, rpclib, 'RpcMgmtStopServerListening');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcMgmtStopServerListening]
+ end;
+end;
+
+var
+ _RpcMgmtWaitServerListen: Pointer;
+
+function RpcMgmtWaitServerListen;
+begin
+ GetProcedureAddress(_RpcMgmtWaitServerListen, rpclib, 'RpcMgmtWaitServerListen');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcMgmtWaitServerListen]
+ end;
+end;
+
+var
+ _RpcMgmtSetServerStackSize: Pointer;
+
+function RpcMgmtSetServerStackSize;
+begin
+ GetProcedureAddress(_RpcMgmtSetServerStackSize, rpclib, 'RpcMgmtSetServerStackSize');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcMgmtSetServerStackSize]
+ end;
+end;
+
+var
+ _RpcSsDontSerializeContext: Pointer;
+
+procedure RpcSsDontSerializeContext;
+begin
+ GetProcedureAddress(_RpcSsDontSerializeContext, rpclib, 'RpcSsDontSerializeContext');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcSsDontSerializeContext]
+ end;
+end;
+
+var
+ _RpcMgmtEnableIdleCleanup: Pointer;
+
+function RpcMgmtEnableIdleCleanup;
+begin
+ GetProcedureAddress(_RpcMgmtEnableIdleCleanup, rpclib, 'RpcMgmtEnableIdleCleanup');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcMgmtEnableIdleCleanup]
+ end;
+end;
+
+var
+ _RpcMgmtInqIfIds: Pointer;
+
+function RpcMgmtInqIfIds;
+begin
+ GetProcedureAddress(_RpcMgmtInqIfIds, rpclib, 'RpcMgmtInqIfIds');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcMgmtInqIfIds]
+ end;
+end;
+
+var
+ _RpcIfIdVectorFree: Pointer;
+
+function RpcIfIdVectorFree;
+begin
+ GetProcedureAddress(_RpcIfIdVectorFree, rpclib, 'RpcIfIdVectorFree');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcIfIdVectorFree]
+ end;
+end;
+
+var
+ _RpcMgmtInqServerPrincNameA: Pointer;
+
+function RpcMgmtInqServerPrincNameA;
+begin
+ GetProcedureAddress(_RpcMgmtInqServerPrincNameA, rpclib, 'RpcMgmtInqServerPrincNameA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcMgmtInqServerPrincNameA]
+ end;
+end;
+
+var
+ _RpcMgmtInqServerPrincNameW: Pointer;
+
+function RpcMgmtInqServerPrincNameW;
+begin
+ GetProcedureAddress(_RpcMgmtInqServerPrincNameW, rpclib, 'RpcMgmtInqServerPrincNameW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcMgmtInqServerPrincNameW]
+ end;
+end;
+
+var
+ _RpcMgmtInqServerPrincName: Pointer;
+
+function RpcMgmtInqServerPrincName;
+begin
+ GetProcedureAddress(_RpcMgmtInqServerPrincName, rpclib, 'RpcMgmtInqServerPrincName' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcMgmtInqServerPrincName]
+ end;
+end;
+
+var
+ _RpcServerInqDefaultPrincNameA: Pointer;
+
+function RpcServerInqDefaultPrincNameA;
+begin
+ GetProcedureAddress(_RpcServerInqDefaultPrincNameA, rpclib, 'RpcServerInqDefaultPrincNameA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcServerInqDefaultPrincNameA]
+ end;
+end;
+
+var
+ _RpcServerInqDefaultPrincNameW: Pointer;
+
+function RpcServerInqDefaultPrincNameW;
+begin
+ GetProcedureAddress(_RpcServerInqDefaultPrincNameW, rpclib, 'RpcServerInqDefaultPrincNameW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcServerInqDefaultPrincNameW]
+ end;
+end;
+
+var
+ _RpcServerInqDefaultPrincName: Pointer;
+
+function RpcServerInqDefaultPrincName;
+begin
+ GetProcedureAddress(_RpcServerInqDefaultPrincName, rpclib, 'RpcServerInqDefaultPrincName' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcServerInqDefaultPrincName]
+ end;
+end;
+
+var
+ _RpcEpResolveBinding: Pointer;
+
+function RpcEpResolveBinding;
+begin
+ GetProcedureAddress(_RpcEpResolveBinding, rpclib, 'RpcEpResolveBinding');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcEpResolveBinding]
+ end;
+end;
+
+var
+ _RpcNsBindingInqEntryNameA: Pointer;
+
+function RpcNsBindingInqEntryNameA;
+begin
+ GetProcedureAddress(_RpcNsBindingInqEntryNameA, rpclib, 'RpcNsBindingInqEntryNameA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcNsBindingInqEntryNameA]
+ end;
+end;
+
+var
+ _RpcNsBindingInqEntryNameW: Pointer;
+
+function RpcNsBindingInqEntryNameW;
+begin
+ GetProcedureAddress(_RpcNsBindingInqEntryNameW, rpclib, 'RpcNsBindingInqEntryNameW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcNsBindingInqEntryNameW]
+ end;
+end;
+
+var
+ _RpcNsBindingInqEntryName: Pointer;
+
+function RpcNsBindingInqEntryName;
+begin
+ GetProcedureAddress(_RpcNsBindingInqEntryName, rpclib, 'RpcNsBindingInqEntryName' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcNsBindingInqEntryName]
+ end;
+end;
+
+var
+ _RpcImpersonateClient: Pointer;
+
+function RpcImpersonateClient;
+begin
+ GetProcedureAddress(_RpcImpersonateClient, rpclib, 'RpcImpersonateClient');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcImpersonateClient]
+ end;
+end;
+
+var
+ _RpcRevertToSelfEx: Pointer;
+
+function RpcRevertToSelfEx;
+begin
+ GetProcedureAddress(_RpcRevertToSelfEx, rpclib, 'RpcRevertToSelfEx');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcRevertToSelfEx]
+ end;
+end;
+
+var
+ _RpcRevertToSelf: Pointer;
+
+function RpcRevertToSelf;
+begin
+ GetProcedureAddress(_RpcRevertToSelf, rpclib, 'RpcRevertToSelf');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcRevertToSelf]
+ end;
+end;
+
+var
+ _RpcBindingInqAuthClientA: Pointer;
+
+function RpcBindingInqAuthClientA;
+begin
+ GetProcedureAddress(_RpcBindingInqAuthClientA, rpclib, 'RpcBindingInqAuthClientA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcBindingInqAuthClientA]
+ end;
+end;
+
+var
+ _RpcBindingInqAuthClientW: Pointer;
+
+function RpcBindingInqAuthClientW;
+begin
+ GetProcedureAddress(_RpcBindingInqAuthClientW, rpclib, 'RpcBindingInqAuthClientW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcBindingInqAuthClientW]
+ end;
+end;
+
+var
+ _RpcBindingInqAuthClientExA: Pointer;
+
+function RpcBindingInqAuthClientExA;
+begin
+ GetProcedureAddress(_RpcBindingInqAuthClientExA, rpclib, 'RpcBindingInqAuthClientExA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcBindingInqAuthClientExA]
+ end;
+end;
+
+var
+ _RpcBindingInqAuthClientExW: Pointer;
+
+function RpcBindingInqAuthClientExW;
+begin
+ GetProcedureAddress(_RpcBindingInqAuthClientExW, rpclib, 'RpcBindingInqAuthClientExW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcBindingInqAuthClientExW]
+ end;
+end;
+
+var
+ _RpcBindingInqAuthInfoA: Pointer;
+
+function RpcBindingInqAuthInfoA;
+begin
+ GetProcedureAddress(_RpcBindingInqAuthInfoA, rpclib, 'RpcBindingInqAuthInfoA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcBindingInqAuthInfoA]
+ end;
+end;
+
+var
+ _RpcBindingInqAuthInfoW: Pointer;
+
+function RpcBindingInqAuthInfoW;
+begin
+ GetProcedureAddress(_RpcBindingInqAuthInfoW, rpclib, 'RpcBindingInqAuthInfoW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcBindingInqAuthInfoW]
+ end;
+end;
+
+var
+ _RpcBindingSetAuthInfoA: Pointer;
+
+function RpcBindingSetAuthInfoA;
+begin
+ GetProcedureAddress(_RpcBindingSetAuthInfoA, rpclib, 'RpcBindingSetAuthInfoA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcBindingSetAuthInfoA]
+ end;
+end;
+
+var
+ _RpcBindingSetAuthInfoW: Pointer;
+
+function RpcBindingSetAuthInfoW;
+begin
+ GetProcedureAddress(_RpcBindingSetAuthInfoW, rpclib, 'RpcBindingSetAuthInfoW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcBindingSetAuthInfoW]
+ end;
+end;
+
+var
+ _RpcBindingSetAuthInfoExA: Pointer;
+
+function RpcBindingSetAuthInfoExA;
+begin
+ GetProcedureAddress(_RpcBindingSetAuthInfoExA, rpclib, 'RpcBindingSetAuthInfoExA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcBindingSetAuthInfoExA]
+ end;
+end;
+
+var
+ _RpcBindingSetAuthInfoExW: Pointer;
+
+function RpcBindingSetAuthInfoExW;
+begin
+ GetProcedureAddress(_RpcBindingSetAuthInfoExW, rpclib, 'RpcBindingSetAuthInfoExW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcBindingSetAuthInfoExW]
+ end;
+end;
+
+var
+ _RpcBindingInqAuthInfoExA: Pointer;
+
+function RpcBindingInqAuthInfoExA;
+begin
+ GetProcedureAddress(_RpcBindingInqAuthInfoExA, rpclib, 'RpcBindingInqAuthInfoExA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcBindingInqAuthInfoExA]
+ end;
+end;
+
+var
+ _RpcBindingInqAuthInfoExW: Pointer;
+
+function RpcBindingInqAuthInfoExW;
+begin
+ GetProcedureAddress(_RpcBindingInqAuthInfoExW, rpclib, 'RpcBindingInqAuthInfoExW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcBindingInqAuthInfoExW]
+ end;
+end;
+
+var
+ _RpcServerRegisterAuthInfoA: Pointer;
+
+function RpcServerRegisterAuthInfoA;
+begin
+ GetProcedureAddress(_RpcServerRegisterAuthInfoA, rpclib, 'RpcServerRegisterAuthInfoA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcServerRegisterAuthInfoA]
+ end;
+end;
+
+var
+ _RpcServerRegisterAuthInfoW: Pointer;
+
+function RpcServerRegisterAuthInfoW;
+begin
+ GetProcedureAddress(_RpcServerRegisterAuthInfoW, rpclib, 'RpcServerRegisterAuthInfoW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcServerRegisterAuthInfoW]
+ end;
+end;
+
+var
+ _RpcBindingInqAuthClient: Pointer;
+
+function RpcBindingInqAuthClient;
+begin
+ GetProcedureAddress(_RpcBindingInqAuthClient, rpclib, 'RpcBindingInqAuthClient' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcBindingInqAuthClient]
+ end;
+end;
+
+var
+ _RpcBindingInqAuthClientEx: Pointer;
+
+function RpcBindingInqAuthClientEx;
+begin
+ GetProcedureAddress(_RpcBindingInqAuthClientEx, rpclib, 'RpcBindingInqAuthClientEx' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcBindingInqAuthClientEx]
+ end;
+end;
+
+var
+ _RpcBindingInqAuthInfo: Pointer;
+
+function RpcBindingInqAuthInfo;
+begin
+ GetProcedureAddress(_RpcBindingInqAuthInfo, rpclib, 'RpcBindingInqAuthInfo' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcBindingInqAuthInfo]
+ end;
+end;
+
+var
+ _RpcBindingSetAuthInfo: Pointer;
+
+function RpcBindingSetAuthInfo;
+begin
+ GetProcedureAddress(_RpcBindingSetAuthInfo, rpclib, 'RpcBindingSetAuthInfo' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcBindingSetAuthInfo]
+ end;
+end;
+
+var
+ _RpcBindingSetAuthInfoEx: Pointer;
+
+function RpcBindingSetAuthInfoEx;
+begin
+ GetProcedureAddress(_RpcBindingSetAuthInfoEx, rpclib, 'RpcBindingSetAuthInfoEx' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcBindingSetAuthInfoEx]
+ end;
+end;
+
+var
+ _RpcBindingInqAuthInfoEx: Pointer;
+
+function RpcBindingInqAuthInfoEx;
+begin
+ GetProcedureAddress(_RpcBindingInqAuthInfoEx, rpclib, 'RpcBindingInqAuthInfoEx' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcBindingInqAuthInfoEx]
+ end;
+end;
+
+var
+ _RpcServerRegisterAuthInfo: Pointer;
+
+function RpcServerRegisterAuthInfo;
+begin
+ GetProcedureAddress(_RpcServerRegisterAuthInfo, rpclib, 'RpcServerRegisterAuthInfo' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcServerRegisterAuthInfo]
+ end;
+end;
+
+var
+ _RpcBindingServerFromClient: Pointer;
+
+function RpcBindingServerFromClient;
+begin
+ GetProcedureAddress(_RpcBindingServerFromClient, rpclib, 'RpcBindingServerFromClient');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcBindingServerFromClient]
+ end;
+end;
+
+var
+ _RpcRaiseException: Pointer;
+
+procedure RpcRaiseException;
+begin
+ GetProcedureAddress(_RpcRaiseException, rpclib, 'RpcRaiseException');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcRaiseException]
+ end;
+end;
+
+var
+ _RpcTestCancel: Pointer;
+
+function RpcTestCancel;
+begin
+ GetProcedureAddress(_RpcTestCancel, rpclib, 'RpcTestCancel');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcTestCancel]
+ end;
+end;
+
+var
+ _RpcServerTestCancel: Pointer;
+
+function RpcServerTestCancel;
+begin
+ GetProcedureAddress(_RpcServerTestCancel, rpclib, 'RpcServerTestCancel');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcServerTestCancel]
+ end;
+end;
+
+var
+ _RpcCancelThread: Pointer;
+
+function RpcCancelThread;
+begin
+ GetProcedureAddress(_RpcCancelThread, rpclib, 'RpcCancelThread');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcCancelThread]
+ end;
+end;
+
+var
+ _RpcCancelThreadEx: Pointer;
+
+function RpcCancelThreadEx;
+begin
+ GetProcedureAddress(_RpcCancelThreadEx, rpclib, 'RpcCancelThreadEx');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcCancelThreadEx]
+ end;
+end;
+
+var
+ _UuidCreate: Pointer;
+
+function UuidCreate;
+begin
+ GetProcedureAddress(_UuidCreate, rpclib, 'UuidCreate');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_UuidCreate]
+ end;
+end;
+
+var
+ _UuidCreateSequential: Pointer;
+
+function UuidCreateSequential;
+begin
+ GetProcedureAddress(_UuidCreateSequential, rpclib, 'UuidCreateSequential');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_UuidCreateSequential]
+ end;
+end;
+
+var
+ _UuidFromStringA: Pointer;
+
+function UuidFromStringA;
+begin
+ GetProcedureAddress(_UuidFromStringA, rpclib, 'UuidFromStringA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_UuidFromStringA]
+ end;
+end;
+
+var
+ _UuidFromStringW: Pointer;
+
+function UuidFromStringW;
+begin
+ GetProcedureAddress(_UuidFromStringW, rpclib, 'UuidFromStringW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_UuidFromStringW]
+ end;
+end;
+
+var
+ _UuidFromString: Pointer;
+
+function UuidFromString;
+begin
+ GetProcedureAddress(_UuidFromString, rpclib, 'UuidFromString' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_UuidFromString]
+ end;
+end;
+
+var
+ _UuidToStringA: Pointer;
+
+function UuidToStringA;
+begin
+ GetProcedureAddress(_UuidToStringA, rpclib, 'UuidToStringA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_UuidToStringA]
+ end;
+end;
+
+var
+ _UuidToStringW: Pointer;
+
+function UuidToStringW;
+begin
+ GetProcedureAddress(_UuidToStringW, rpclib, 'UuidToStringW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_UuidToStringW]
+ end;
+end;
+
+var
+ _UuidToString: Pointer;
+
+function UuidToString;
+begin
+ GetProcedureAddress(_UuidToString, rpclib, 'UuidToString' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_UuidToString]
+ end;
+end;
+
+var
+ _UuidCompare: Pointer;
+
+function UuidCompare;
+begin
+ GetProcedureAddress(_UuidCompare, rpclib, 'UuidCompare');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_UuidCompare]
+ end;
+end;
+
+var
+ _UuidCreateNil: Pointer;
+
+function UuidCreateNil;
+begin
+ GetProcedureAddress(_UuidCreateNil, rpclib, 'UuidCreateNil');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_UuidCreateNil]
+ end;
+end;
+
+var
+ _UuidEqual: Pointer;
+
+function UuidEqual;
+begin
+ GetProcedureAddress(_UuidEqual, rpclib, 'UuidEqual');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_UuidEqual]
+ end;
+end;
+
+var
+ _UuidHash: Pointer;
+
+function UuidHash;
+begin
+ GetProcedureAddress(_UuidHash, rpclib, 'UuidHash');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_UuidHash]
+ end;
+end;
+
+var
+ _UuidIsNil: Pointer;
+
+function UuidIsNil;
+begin
+ GetProcedureAddress(_UuidIsNil, rpclib, 'UuidIsNil');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_UuidIsNil]
+ end;
+end;
+
+var
+ _RpcEpRegisterNoReplaceA: Pointer;
+
+function RpcEpRegisterNoReplaceA;
+begin
+ GetProcedureAddress(_RpcEpRegisterNoReplaceA, rpclib, 'RpcEpRegisterNoReplaceA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcEpRegisterNoReplaceA]
+ end;
+end;
+
+var
+ _RpcEpRegisterNoReplaceW: Pointer;
+
+function RpcEpRegisterNoReplaceW;
+begin
+ GetProcedureAddress(_RpcEpRegisterNoReplaceW, rpclib, 'RpcEpRegisterNoReplaceW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcEpRegisterNoReplaceW]
+ end;
+end;
+
+var
+ _RpcEpRegisterNoReplace: Pointer;
+
+function RpcEpRegisterNoReplace;
+begin
+ GetProcedureAddress(_RpcEpRegisterNoReplace, rpclib, 'RpcEpRegisterNoReplace' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcEpRegisterNoReplace]
+ end;
+end;
+
+var
+ _RpcEpRegisterA: Pointer;
+
+function RpcEpRegisterA;
+begin
+ GetProcedureAddress(_RpcEpRegisterA, rpclib, 'RpcEpRegisterA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcEpRegisterA]
+ end;
+end;
+
+var
+ _RpcEpRegisterW: Pointer;
+
+function RpcEpRegisterW;
+begin
+ GetProcedureAddress(_RpcEpRegisterW, rpclib, 'RpcEpRegisterW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcEpRegisterW]
+ end;
+end;
+
+var
+ _RpcEpRegister: Pointer;
+
+function RpcEpRegister;
+begin
+ GetProcedureAddress(_RpcEpRegister, rpclib, 'RpcEpRegister' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcEpRegister]
+ end;
+end;
+
+var
+ _RpcEpUnregister: Pointer;
+
+function RpcEpUnregister;
+begin
+ GetProcedureAddress(_RpcEpUnregister, rpclib, 'RpcEpUnregister');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcEpUnregister]
+ end;
+end;
+
+var
+ _DceErrorInqTextA: Pointer;
+
+function DceErrorInqTextA;
+begin
+ GetProcedureAddress(_DceErrorInqTextA, rpclib, 'DceErrorInqTextA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DceErrorInqTextA]
+ end;
+end;
+
+var
+ _DceErrorInqTextW: Pointer;
+
+function DceErrorInqTextW;
+begin
+ GetProcedureAddress(_DceErrorInqTextW, rpclib, 'DceErrorInqTextW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DceErrorInqTextW]
+ end;
+end;
+
+var
+ _DceErrorInqText: Pointer;
+
+function DceErrorInqText;
+begin
+ GetProcedureAddress(_DceErrorInqText, rpclib, 'DceErrorInqText' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DceErrorInqText]
+ end;
+end;
+
+var
+ _RpcMgmtEpEltInqBegin: Pointer;
+
+function RpcMgmtEpEltInqBegin;
+begin
+ GetProcedureAddress(_RpcMgmtEpEltInqBegin, rpclib, 'RpcMgmtEpEltInqBegin');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcMgmtEpEltInqBegin]
+ end;
+end;
+
+var
+ _RpcMgmtEpEltInqDone: Pointer;
+
+function RpcMgmtEpEltInqDone;
+begin
+ GetProcedureAddress(_RpcMgmtEpEltInqDone, rpclib, 'RpcMgmtEpEltInqDone');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcMgmtEpEltInqDone]
+ end;
+end;
+
+var
+ _RpcMgmtEpEltInqNextA: Pointer;
+
+function RpcMgmtEpEltInqNextA;
+begin
+ GetProcedureAddress(_RpcMgmtEpEltInqNextA, rpclib, 'RpcMgmtEpEltInqNextA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcMgmtEpEltInqNextA]
+ end;
+end;
+
+var
+ _RpcMgmtEpEltInqNextW: Pointer;
+
+function RpcMgmtEpEltInqNextW;
+begin
+ GetProcedureAddress(_RpcMgmtEpEltInqNextW, rpclib, 'RpcMgmtEpEltInqNextW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcMgmtEpEltInqNextW]
+ end;
+end;
+
+var
+ _RpcMgmtEpEltInqNext: Pointer;
+
+function RpcMgmtEpEltInqNext;
+begin
+ GetProcedureAddress(_RpcMgmtEpEltInqNext, rpclib, 'RpcMgmtEpEltInqNext' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcMgmtEpEltInqNext]
+ end;
+end;
+
+var
+ _RpcMgmtEpUnregister: Pointer;
+
+function RpcMgmtEpUnregister;
+begin
+ GetProcedureAddress(_RpcMgmtEpUnregister, rpclib, 'RpcMgmtEpUnregister');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcMgmtEpUnregister]
+ end;
+end;
+
+var
+ _RpcMgmtSetAuthorizationFn: Pointer;
+
+function RpcMgmtSetAuthorizationFn;
+begin
+ GetProcedureAddress(_RpcMgmtSetAuthorizationFn, rpclib, 'RpcMgmtSetAuthorizationFn');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcMgmtSetAuthorizationFn]
+ end;
+end;
+
+{$ELSE}
+
+function RpcBindingCopy; external rpclib name 'RpcBindingCopy';
+function RpcBindingFree; external rpclib name 'RpcBindingFree';
+function RpcBindingSetOption; external rpclib name 'RpcBindingSetOption';
+function RpcBindingInqOption; external rpclib name 'RpcBindingInqOption';
+function RpcBindingFromStringBindingA; external rpclib name 'RpcBindingFromStringBindingA';
+function RpcBindingFromStringBindingW; external rpclib name 'RpcBindingFromStringBindingW';
+function RpcBindingFromStringBinding; external rpclib name 'RpcBindingFromStringBinding' + AWSuffix;
+function RpcSsGetContextBinding; external rpclib name 'RpcSsGetContextBinding';
+function RpcBindingInqObject; external rpclib name 'RpcBindingInqObject';
+function RpcBindingReset; external rpclib name 'RpcBindingReset';
+function RpcBindingSetObject; external rpclib name 'RpcBindingSetObject';
+function RpcMgmtInqDefaultProtectLevel; external rpclib name 'RpcMgmtInqDefaultProtectLevel';
+function RpcBindingToStringBindingA; external rpclib name 'RpcBindingToStringBindingA';
+function RpcBindingToStringBindingW; external rpclib name 'RpcBindingToStringBindingW';
+function RpcBindingToStringBinding; external rpclib name 'RpcBindingToStringBinding' + AWSuffix;
+function RpcBindingVectorFree; external rpclib name 'RpcBindingVectorFree';
+function RpcStringBindingComposeA; external rpclib name 'RpcStringBindingComposeA';
+function RpcStringBindingComposeW; external rpclib name 'RpcStringBindingComposeW';
+function RpcStringBindingCompose; external rpclib name 'RpcStringBindingCompose' + AWSuffix;
+function RpcStringBindingParseA; external rpclib name 'RpcStringBindingParseA';
+function RpcStringBindingParseW; external rpclib name 'RpcStringBindingParseW';
+function RpcStringBindingParse; external rpclib name 'RpcStringBindingParse' + AWSuffix;
+function RpcStringFreeA; external rpclib name 'RpcStringFreeA';
+function RpcStringFreeW; external rpclib name 'RpcStringFreeW';
+function RpcStringFree; external rpclib name 'RpcStringFree' + AWSuffix;
+function RpcIfInqId; external rpclib name 'RpcIfInqId';
+function RpcNetworkIsProtseqValidA; external rpclib name 'RpcNetworkIsProtseqValidA';
+function RpcNetworkIsProtseqValidW; external rpclib name 'RpcNetworkIsProtseqValidW';
+function RpcMgmtInqComTimeout; external rpclib name 'RpcMgmtInqComTimeout';
+function RpcMgmtSetComTimeout; external rpclib name 'RpcMgmtSetComTimeout';
+function RpcMgmtSetCancelTimeout; external rpclib name 'RpcMgmtSetCancelTimeout';
+function RpcNetworkInqProtseqsA; external rpclib name 'RpcNetworkInqProtseqsA';
+function RpcNetworkInqProtseqsW; external rpclib name 'RpcNetworkInqProtseqsW';
+function RpcNetworkInqProtseqs; external rpclib name 'RpcNetworkInqProtseqs' + AWSuffix;
+function RpcObjectInqType; external rpclib name 'RpcObjectInqType';
+function RpcObjectSetInqFn; external rpclib name 'RpcObjectSetInqFn';
+function RpcObjectSetType; external rpclib name 'RpcObjectSetType';
+function RpcProtseqVectorFreeA; external rpclib name 'RpcProtseqVectorFreeA';
+function RpcProtseqVectorFreeW; external rpclib name 'RpcProtseqVectorFreeW';
+function RpcProtseqVectorFree; external rpclib name 'RpcProtseqVectorFree' + AWSuffix;
+function RpcServerInqBindings; external rpclib name 'RpcServerInqBindings';
+function RpcServerInqIf; external rpclib name 'RpcServerInqIf';
+function RpcServerListen; external rpclib name 'RpcServerListen';
+function RpcServerRegisterIf; external rpclib name 'RpcServerRegisterIf';
+function RpcServerRegisterIfEx; external rpclib name 'RpcServerRegisterIfEx';
+function RpcServerRegisterIf2; external rpclib name 'RpcServerRegisterIf2';
+function RpcServerUnregisterIf; external rpclib name 'RpcServerUnregisterIf';
+function RpcServerUnregisterIfEx; external rpclib name 'RpcServerUnregisterIfEx';
+function RpcServerUseAllProtseqs; external rpclib name 'RpcServerUseAllProtseqs';
+function RpcServerUseAllProtseqsEx; external rpclib name 'RpcServerUseAllProtseqsEx';
+function RpcServerUseAllProtseqsIf; external rpclib name 'RpcServerUseAllProtseqsIf';
+function RpcServerUseAllProtseqsIfEx; external rpclib name 'RpcServerUseAllProtseqsIfEx';
+function RpcServerUseProtseqA; external rpclib name 'RpcServerUseProtseqA';
+function RpcServerUseProtseqW; external rpclib name 'RpcServerUseProtseqW';
+function RpcServerUseProtseq; external rpclib name 'RpcServerUseProtseq' + AWSuffix;
+function RpcServerUseProtseqExA; external rpclib name 'RpcServerUseProtseqExA';
+function RpcServerUseProtseqExW; external rpclib name 'RpcServerUseProtseqExW';
+function RpcServerUseProtseqEx; external rpclib name 'RpcServerUseProtseqEx' + AWSuffix;
+function RpcServerUseProtseqEpA; external rpclib name 'RpcServerUseProtseqEpA';
+function RpcServerUseProtseqEpW; external rpclib name 'RpcServerUseProtseqEpW';
+function RpcServerUseProtseqEp; external rpclib name 'RpcServerUseProtseqEp' + AWSuffix;
+function RpcServerUseProtseqEpExA; external rpclib name 'RpcServerUseProtseqEpExA';
+function RpcServerUseProtseqEpExW; external rpclib name 'RpcServerUseProtseqEpExW';
+function RpcServerUseProtseqEpEx; external rpclib name 'RpcServerUseProtseqEpEx' + AWSuffix;
+function RpcServerUseProtseqIfA; external rpclib name 'RpcServerUseProtseqIfA';
+function RpcServerUseProtseqIfW; external rpclib name 'RpcServerUseProtseqIfW';
+function RpcServerUseProtseqIfExA; external rpclib name 'RpcServerUseProtseqIfExA';
+function RpcServerUseProtseqIfExW; external rpclib name 'RpcServerUseProtseqIfExW';
+function RpcServerUseProtseqIfEx; external rpclib name 'RpcServerUseProtseqIfEx' + AWSuffix;
+procedure RpcServerYield; external rpclib name 'RpcServerYield';
+function RpcMgmtStatsVectorFree; external rpclib name 'RpcMgmtStatsVectorFree';
+function RpcMgmtInqStats; external rpclib name 'RpcMgmtInqStats';
+function RpcMgmtIsServerListening; external rpclib name 'RpcMgmtIsServerListening';
+function RpcMgmtStopServerListening; external rpclib name 'RpcMgmtStopServerListening';
+function RpcMgmtWaitServerListen; external rpclib name 'RpcMgmtWaitServerListen';
+function RpcMgmtSetServerStackSize; external rpclib name 'RpcMgmtSetServerStackSize';
+procedure RpcSsDontSerializeContext; external rpclib name 'RpcSsDontSerializeContext';
+function RpcMgmtEnableIdleCleanup; external rpclib name 'RpcMgmtEnableIdleCleanup';
+function RpcMgmtInqIfIds; external rpclib name 'RpcMgmtInqIfIds';
+function RpcIfIdVectorFree; external rpclib name 'RpcIfIdVectorFree';
+function RpcMgmtInqServerPrincNameA; external rpclib name 'RpcMgmtInqServerPrincNameA';
+function RpcMgmtInqServerPrincNameW; external rpclib name 'RpcMgmtInqServerPrincNameW';
+function RpcMgmtInqServerPrincName; external rpclib name 'RpcMgmtInqServerPrincName' + AWSuffix;
+function RpcServerInqDefaultPrincNameA; external rpclib name 'RpcServerInqDefaultPrincNameA';
+function RpcServerInqDefaultPrincNameW; external rpclib name 'RpcServerInqDefaultPrincNameW';
+function RpcServerInqDefaultPrincName; external rpclib name 'RpcServerInqDefaultPrincName' + AWSuffix;
+function RpcEpResolveBinding; external rpclib name 'RpcEpResolveBinding';
+function RpcNsBindingInqEntryNameA; external rpclib name 'RpcNsBindingInqEntryNameA';
+function RpcNsBindingInqEntryNameW; external rpclib name 'RpcNsBindingInqEntryNameW';
+function RpcNsBindingInqEntryName; external rpclib name 'RpcNsBindingInqEntryName' + AWSuffix;
+function RpcImpersonateClient; external rpclib name 'RpcImpersonateClient';
+function RpcRevertToSelfEx; external rpclib name 'RpcRevertToSelfEx';
+function RpcRevertToSelf; external rpclib name 'RpcRevertToSelf';
+function RpcBindingInqAuthClientA; external rpclib name 'RpcBindingInqAuthClientA';
+function RpcBindingInqAuthClientW; external rpclib name 'RpcBindingInqAuthClientW';
+function RpcBindingInqAuthClientExA; external rpclib name 'RpcBindingInqAuthClientExA';
+function RpcBindingInqAuthClientExW; external rpclib name 'RpcBindingInqAuthClientExW';
+function RpcBindingInqAuthInfoA; external rpclib name 'RpcBindingInqAuthInfoA';
+function RpcBindingInqAuthInfoW; external rpclib name 'RpcBindingInqAuthInfoW';
+function RpcBindingSetAuthInfoA; external rpclib name 'RpcBindingSetAuthInfoA';
+function RpcBindingSetAuthInfoW; external rpclib name 'RpcBindingSetAuthInfoW';
+function RpcBindingSetAuthInfoExA; external rpclib name 'RpcBindingSetAuthInfoExA';
+function RpcBindingSetAuthInfoExW; external rpclib name 'RpcBindingSetAuthInfoExW';
+function RpcBindingInqAuthInfoExA; external rpclib name 'RpcBindingInqAuthInfoExA';
+function RpcBindingInqAuthInfoExW; external rpclib name 'RpcBindingInqAuthInfoExW';
+function RpcServerRegisterAuthInfoA; external rpclib name 'RpcServerRegisterAuthInfoA';
+function RpcServerRegisterAuthInfoW; external rpclib name 'RpcServerRegisterAuthInfoW';
+function RpcBindingInqAuthClient; external rpclib name 'RpcBindingInqAuthClient' + AWSuffix;
+function RpcBindingInqAuthClientEx; external rpclib name 'RpcBindingInqAuthClientEx' + AWSuffix;
+function RpcBindingInqAuthInfo; external rpclib name 'RpcBindingInqAuthInfo' + AWSuffix;
+function RpcBindingSetAuthInfo; external rpclib name 'RpcBindingSetAuthInfo' + AWSuffix;
+function RpcBindingSetAuthInfoEx; external rpclib name 'RpcBindingSetAuthInfoEx' + AWSuffix;
+function RpcBindingInqAuthInfoEx; external rpclib name 'RpcBindingInqAuthInfoEx' + AWSuffix;
+function RpcServerRegisterAuthInfo; external rpclib name 'RpcServerRegisterAuthInfo' + AWSuffix;
+function RpcBindingServerFromClient; external rpclib name 'RpcBindingServerFromClient';
+procedure RpcRaiseException; external rpclib name 'RpcRaiseException';
+function RpcTestCancel; external rpclib name 'RpcTestCancel';
+function RpcServerTestCancel; external rpclib name 'RpcServerTestCancel';
+function RpcCancelThread; external rpclib name 'RpcCancelThread';
+function RpcCancelThreadEx; external rpclib name 'RpcCancelThreadEx';
+function UuidCreate; external rpclib name 'UuidCreate';
+function UuidCreateSequential; external rpclib name 'UuidCreateSequential';
+function UuidFromStringA; external rpclib name 'UuidFromStringA';
+function UuidFromStringW; external rpclib name 'UuidFromStringW';
+function UuidFromString; external rpclib name 'UuidFromString' + AWSuffix;
+function UuidToStringA; external rpclib name 'UuidToStringA';
+function UuidToStringW; external rpclib name 'UuidToStringW';
+function UuidToString; external rpclib name 'UuidToString' + AWSuffix;
+function UuidCompare; external rpclib name 'UuidCompare';
+function UuidCreateNil; external rpclib name 'UuidCreateNil';
+function UuidEqual; external rpclib name 'UuidEqual';
+function UuidHash; external rpclib name 'UuidHash';
+function UuidIsNil; external rpclib name 'UuidIsNil';
+function RpcEpRegisterNoReplaceA; external rpclib name 'RpcEpRegisterNoReplaceA';
+function RpcEpRegisterNoReplaceW; external rpclib name 'RpcEpRegisterNoReplaceW';
+function RpcEpRegisterNoReplace; external rpclib name 'RpcEpRegisterNoReplace' + AWSuffix;
+function RpcEpRegisterA; external rpclib name 'RpcEpRegisterA';
+function RpcEpRegisterW; external rpclib name 'RpcEpRegisterW';
+function RpcEpRegister; external rpclib name 'RpcEpRegister' + AWSuffix;
+function RpcEpUnregister; external rpclib name 'RpcEpUnregister';
+function DceErrorInqTextA; external rpclib name 'DceErrorInqTextA';
+function DceErrorInqTextW; external rpclib name 'DceErrorInqTextW';
+function DceErrorInqText; external rpclib name 'DceErrorInqText' + AWSuffix;
+function RpcMgmtEpEltInqBegin; external rpclib name 'RpcMgmtEpEltInqBegin';
+function RpcMgmtEpEltInqDone; external rpclib name 'RpcMgmtEpEltInqDone';
+function RpcMgmtEpEltInqNextA; external rpclib name 'RpcMgmtEpEltInqNextA';
+function RpcMgmtEpEltInqNextW; external rpclib name 'RpcMgmtEpEltInqNextW';
+function RpcMgmtEpEltInqNext; external rpclib name 'RpcMgmtEpEltInqNext' + AWSuffix;
+function RpcMgmtEpUnregister; external rpclib name 'RpcMgmtEpUnregister';
+function RpcMgmtSetAuthorizationFn; external rpclib name 'RpcMgmtSetAuthorizationFn';
+
+{$ENDIF DYNAMIC_LINK}
+
+end.
diff --git a/packages/extra/winunits/jwarpcnsi.pas b/packages/extra/winunits/jwarpcnsi.pas
index 49a5dd463a..66f7dc1fdc 100644
--- a/packages/extra/winunits/jwarpcnsi.pas
+++ b/packages/extra/winunits/jwarpcnsi.pas
@@ -1,1467 +1,1467 @@
-{******************************************************************************}
-{ }
-{ RPC NSI API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: rpcnsi.h, released June 2000. The original Pascal }
-{ code is: RpcNsi.pas, released December 2000. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwarpcnsi.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaRpcNsi;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "RpcNsi.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaWinType, JwaRpc, JwaRpcDce;
-
-type
- RPC_NS_HANDLE = Pointer;
- {$EXTERNALSYM RPC_NS_HANDLE}
-
-const
- RPC_C_NS_SYNTAX_DEFAULT = 0;
- {$EXTERNALSYM RPC_C_NS_SYNTAX_DEFAULT}
- RPC_C_NS_SYNTAX_DCE = 3;
- {$EXTERNALSYM RPC_C_NS_SYNTAX_DCE}
-
- RPC_C_PROFILE_DEFAULT_ELT = 0;
- {$EXTERNALSYM RPC_C_PROFILE_DEFAULT_ELT}
- RPC_C_PROFILE_ALL_ELT = 1;
- {$EXTERNALSYM RPC_C_PROFILE_ALL_ELT}
- RPC_C_PROFILE_ALL_ELTS = RPC_C_PROFILE_ALL_ELT;
- {$EXTERNALSYM RPC_C_PROFILE_ALL_ELTS}
- RPC_C_PROFILE_MATCH_BY_IF = 2;
- {$EXTERNALSYM RPC_C_PROFILE_MATCH_BY_IF}
- RPC_C_PROFILE_MATCH_BY_MBR = 3;
- {$EXTERNALSYM RPC_C_PROFILE_MATCH_BY_MBR}
- RPC_C_PROFILE_MATCH_BY_BOTH = 4;
- {$EXTERNALSYM RPC_C_PROFILE_MATCH_BY_BOTH}
-
- RPC_C_NS_DEFAULT_EXP_AGE = -1;
- {$EXTERNALSYM RPC_C_NS_DEFAULT_EXP_AGE}
-
-// Server APIs
-
-function RpcNsBindingExportA(EntryNameSyntax: Longword; EntryName: PChar;
- IfSpec: RPC_IF_HANDLE; BindingVec: PRPC_BINDING_VECTOR;
- ObjectUuidVec: PUUID_VECTOR): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcNsBindingExportA}
-function RpcNsBindingExportW(EntryNameSyntax: Longword; EntryName: PWideChar;
- IfSpec: RPC_IF_HANDLE; BindingVec: PRPC_BINDING_VECTOR;
- ObjectUuidVec: PUUID_VECTOR): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcNsBindingExportW}
-function RpcNsBindingExport(EntryNameSyntax: Longword; EntryName: PTSTR;
- IfSpec: RPC_IF_HANDLE; BindingVec: PRPC_BINDING_VECTOR;
- ObjectUuidVec: PUUID_VECTOR): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcNsBindingExport}
-
-function RpcNsBindingUnexportA(EntryNameSyntax: Longword; EntryName: PChar;
- IfSpec: RPC_IF_HANDLE; ObjectUuidVec: PUUID_VECTOR): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcNsBindingUnexportA}
-function RpcNsBindingUnexportW(EntryNameSyntax: Longword; EntryName: PWideChar;
- IfSpec: RPC_IF_HANDLE; ObjectUuidVec: PUUID_VECTOR): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcNsBindingUnexportW}
-function RpcNsBindingUnexport(EntryNameSyntax: Longword; EntryName: PTSTR;
- IfSpec: RPC_IF_HANDLE; ObjectUuidVec: PUUID_VECTOR): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcNsBindingUnexport}
-
-// Server PnP APIs
-
-function RpcNsBindingExportPnPA(EntryNameSyntax: Longword; EntryName: PChar;
- IfSpec: RPC_IF_HANDLE; ObjectVector: PUUID_VECTOR): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcNsBindingExportPnPA}
-function RpcNsBindingExportPnPW(EntryNameSyntax: Longword; EntryName: PWideChar;
- IfSpec: RPC_IF_HANDLE; ObjectVector: PUUID_VECTOR): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcNsBindingExportPnPW}
-function RpcNsBindingExportPnP(EntryNameSyntax: Longword; EntryName: PTSTR;
- IfSpec: RPC_IF_HANDLE; ObjectVector: PUUID_VECTOR): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcNsBindingExportPnP}
-
-function RpcNsBindingUnexportPnPA(EntryNameSyntax: Longword; EntryName: PChar;
- IfSpec: RPC_IF_HANDLE; ObjectVector: PUUID_VECTOR): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcNsBindingUnexportPnPA}
-function RpcNsBindingUnexportPnPW(EntryNameSyntax: Longword; EntryName: PWideChar;
- IfSpec: RPC_IF_HANDLE; ObjectVector: PUUID_VECTOR): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcNsBindingUnexportPnPW}
-function RpcNsBindingUnexportPnP(EntryNameSyntax: Longword; EntryName: PTSTR;
- IfSpec: RPC_IF_HANDLE; ObjectVector: PUUID_VECTOR): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcNsBindingUnexportPnP}
-
-// Client APIs
-
-function RpcNsBindingLookupBeginA(EntryNameSyntax: Longword; EntryName: PChar;
- IfSpec: RPC_IF_HANDLE; ObjUuid: PUUID; BindingMaxCount: Longword;
- var LookupContext: RPC_NS_HANDLE): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcNsBindingLookupBeginA}
-function RpcNsBindingLookupBeginW(EntryNameSyntax: Longword; EntryName: PWideChar;
- IfSpec: RPC_IF_HANDLE; ObjUuid: PUUID; BindingMaxCount: Longword;
- var LookupContext: RPC_NS_HANDLE): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcNsBindingLookupBeginW}
-function RpcNsBindingLookupBegin(EntryNameSyntax: Longword; EntryName: PTSTR;
- IfSpec: RPC_IF_HANDLE; ObjUuid: PUUID; BindingMaxCount: Longword;
- var LookupContext: RPC_NS_HANDLE): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcNsBindingLookupBegin}
-
-function RpcNsBindingLookupNext(LookupContext: RPC_NS_HANDLE;
- var BindingVec: PRPC_BINDING_VECTOR): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcNsBindingLookupNext}
-
-function RpcNsBindingLookupDone(var LookupContext: RPC_NS_HANDLE): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcNsBindingLookupDone}
-
-// Group APIs
-
-function RpcNsGroupDeleteA(GroupNameSyntax: Longword; GroupName: PChar): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcNsGroupDeleteA}
-function RpcNsGroupDeleteW(GroupNameSyntax: Longword; GroupName: PWideChar): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcNsGroupDeleteW}
-function RpcNsGroupDelete(GroupNameSyntax: Longword; GroupName: PTSTR): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcNsGroupDelete}
-
-function RpcNsGroupMbrAddA(GroupNameSyntax: Longword; GroupName: PChar;
- MemberNameSyntax: Longword; MemberName: PChar): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcNsGroupMbrAddA}
-function RpcNsGroupMbrAddW(GroupNameSyntax: Longword; GroupName: PWideChar;
- MemberNameSyntax: Longword; MemberName: PWideChar): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcNsGroupMbrAddW}
-function RpcNsGroupMbrAdd(GroupNameSyntax: Longword; GroupName: PTSTR;
- MemberNameSyntax: Longword; MemberName: PTSTR): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcNsGroupMbrAdd}
-
-function RpcNsGroupMbrRemoveA(GroupNameSyntax: Longword; GroupName: PChar;
- MemberNameSyntax: Longword; MemberName: PChar): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcNsGroupMbrRemoveA}
-function RpcNsGroupMbrRemoveW(GroupNameSyntax: Longword; GroupName: PWideChar;
- MemberNameSyntax: Longword; MemberName: PWideChar): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcNsGroupMbrRemoveW}
-function RpcNsGroupMbrRemove(GroupNameSyntax: Longword; GroupName: PTSTR;
- MemberNameSyntax: Longword; MemberName: PTSTR): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcNsGroupMbrRemove}
-
-function RpcNsGroupMbrInqBeginA(GroupNameSyntax: Longword; GroupName: PChar;
- MemberNameSyntax: Longword; var InquiryContext: RPC_NS_HANDLE): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcNsGroupMbrInqBeginA}
-function RpcNsGroupMbrInqBeginW(GroupNameSyntax: Longword; GroupName: PWideChar;
- MemberNameSyntax: Longword; var InquiryContext: RPC_NS_HANDLE): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcNsGroupMbrInqBeginW}
-function RpcNsGroupMbrInqBegin(GroupNameSyntax: Longword; GroupName: PTSTR;
- MemberNameSyntax: Longword; var InquiryContext: RPC_NS_HANDLE): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcNsGroupMbrInqBegin}
-
-function RpcNsGroupMbrInqNextA(InquiryContext: RPC_NS_HANDLE; MemberName: PPChar): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcNsGroupMbrInqNextA}
-function RpcNsGroupMbrInqNextW(InquiryContext: RPC_NS_HANDLE; MemberName: PPWideChar): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcNsGroupMbrInqNextW}
-function RpcNsGroupMbrInqNext(InquiryContext: RPC_NS_HANDLE; MemberName: PPTSTR): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcNsGroupMbrInqNext}
-
-function RpcNsGroupMbrInqDone(var InquiryContext: RPC_NS_HANDLE): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcNsGroupMbrInqDone}
-
-// Profile APIs
-
-function RpcNsProfileDeleteA(ProfileNameSyntax: Longword; ProfileName: PChar): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcNsProfileDeleteA}
-function RpcNsProfileDeleteW(ProfileNameSyntax: Longword; ProfileName: PWideChar): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcNsProfileDeleteW}
-function RpcNsProfileDelete(ProfileNameSyntax: Longword; ProfileName: PTSTR): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcNsProfileDelete}
-
-function RpcNsProfileEltAddA(ProfileNameSyntax: Longword; ProfileName: PChar;
- IfId: PRPC_IF_ID; MemberNameSyntax: Longword; MemberName: PChar;
- Priority: Longword; Annotation: PChar): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcNsProfileEltAddA}
-function RpcNsProfileEltAddW(ProfileNameSyntax: Longword; ProfileName: PWideChar;
- IfId: PRPC_IF_ID; MemberNameSyntax: Longword; MemberName: PWideChar;
- Priority: Longword; Annotation: PWideChar): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcNsProfileEltAddW}
-function RpcNsProfileEltAdd(ProfileNameSyntax: Longword; ProfileName: PTSTR;
- IfId: PRPC_IF_ID; MemberNameSyntax: Longword; MemberName: PTSTR;
- Priority: Longword; Annotation: PTSTR): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcNsProfileEltAdd}
-
-function RpcNsProfileEltRemoveA(ProfileNameSyntax: Longword; ProfileName: PChar;
- IfId: PRPC_IF_ID; MemberNameSyntax: Longword; MemberName: PChar): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcNsProfileEltRemoveA}
-function RpcNsProfileEltRemoveW(ProfileNameSyntax: Longword; ProfileName: PWideChar;
- IfId: PRPC_IF_ID; MemberNameSyntax: Longword; MemberName: PWideChar): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcNsProfileEltRemoveW}
-function RpcNsProfileEltRemove(ProfileNameSyntax: Longword; ProfileName: PTSTR;
- IfId: PRPC_IF_ID; MemberNameSyntax: Longword; MemberName: PTSTR): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcNsProfileEltRemove}
-
-function RpcNsProfileEltInqBeginA(ProfileNameSyntax: Longword; ProfileName: PChar;
- InquiryType: Longword; IfId: PRPC_IF_ID; VersOption, MemberNameSyntax: Longword;
- MemberName: PChar; var InquiryContext: RPC_NS_HANDLE): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcNsProfileEltInqBeginA}
-function RpcNsProfileEltInqBeginW(ProfileNameSyntax: Longword; ProfileName: PWideChar;
- InquiryType: Longword; IfId: PRPC_IF_ID; VersOption, MemberNameSyntax: Longword;
- MemberName: PWideChar; var InquiryContext: RPC_NS_HANDLE): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcNsProfileEltInqBeginW}
-function RpcNsProfileEltInqBegin(ProfileNameSyntax: Longword; ProfileName: PTSTR;
- InquiryType: Longword; IfId: PRPC_IF_ID; VersOption, MemberNameSyntax: Longword;
- MemberName: PTSTR; var InquiryContext: RPC_NS_HANDLE): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcNsProfileEltInqBegin}
-
-function RpcNsProfileEltInqNextA(InquiryContext: RPC_NS_HANDLE; var IfId: RPC_IF_ID;
- MemberName: PPChar; var Priority: Longword; Annotation: PPChar): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcNsProfileEltInqNextA}
-function RpcNsProfileEltInqNextW(InquiryContext: RPC_NS_HANDLE; var IfId: RPC_IF_ID;
- MemberName: PPWideChar; var Priority: Longword; Annotation: PPWideChar): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcNsProfileEltInqNextW}
-function RpcNsProfileEltInqNext(InquiryContext: RPC_NS_HANDLE; var IfId: RPC_IF_ID;
- MemberName: PPTSTR; var Priority: Longword; Annotation: PPTSTR): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcNsProfileEltInqNext}
-
-function RpcNsProfileEltInqDone(var InquiryContext: RPC_NS_HANDLE): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcNsProfileEltInqDone}
-
-// Entry object APIs
-
-function RpcNsEntryObjectInqBeginA(EntryNameSyntax: Longword; EntryName: PChar;
- var InquiryContext: RPC_NS_HANDLE): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcNsEntryObjectInqBeginA}
-function RpcNsEntryObjectInqBeginW(EntryNameSyntax: Longword; EntryName: PWideChar;
- var InquiryContext: RPC_NS_HANDLE): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcNsEntryObjectInqBeginW}
-function RpcNsEntryObjectInqBegin(EntryNameSyntax: Longword; EntryName: PTSTR;
- var InquiryContext: RPC_NS_HANDLE): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcNsEntryObjectInqBegin}
-
-function RpcNsEntryObjectInqNext(InquiryContext: RPC_NS_HANDLE; ObjUuid: PUUID): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcNsEntryObjectInqNext}
-
-function RpcNsEntryObjectInqDone(var InquiryContext: RPC_NS_HANDLE): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcNsEntryObjectInqDone}
-
-// Management and MISC APIs
-
-function RpcNsEntryExpandNameA(EntryNameSyntax: Longword; EntryName: PChar;
- var ExpandedName: PChar): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcNsEntryExpandNameA}
-function RpcNsEntryExpandNameW(EntryNameSyntax: Longword; EntryName: PWideChar;
- var ExpandedName: PWideChar): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcNsEntryExpandNameW}
-function RpcNsEntryExpandName(EntryNameSyntax: Longword; EntryName: PTSTR;
- var ExpandedName: PTSTR): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcNsEntryExpandName}
-
-function RpcNsMgmtBindingUnexportA(EntryNameSyntax: Longword; EntryName: PChar;
- IfId: PRPC_IF_ID; VersOption: Longword; ObjectUuidVec: PUUID_VECTOR): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcNsMgmtBindingUnexportA}
-function RpcNsMgmtBindingUnexportW(EntryNameSyntax: Longword; EntryName: PWideChar;
- IfId: PRPC_IF_ID; VersOption: Longword; ObjectUuidVec: PUUID_VECTOR): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcNsMgmtBindingUnexportW}
-function RpcNsMgmtBindingUnexport(EntryNameSyntax: Longword; EntryName: PTSTR;
- IfId: PRPC_IF_ID; VersOption: Longword; ObjectUuidVec: PUUID_VECTOR): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcNsMgmtBindingUnexport}
-
-function RpcNsMgmtEntryCreateA(EntryNameSyntax: Longword; EntryName: PChar): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcNsMgmtEntryCreateA}
-function RpcNsMgmtEntryCreateW(EntryNameSyntax: Longword; EntryName: PWideChar): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcNsMgmtEntryCreateW}
-function RpcNsMgmtEntryCreate(EntryNameSyntax: Longword; EntryName: PTSTR): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcNsMgmtEntryCreate}
-
-function RpcNsMgmtEntryDeleteA(EntryNameSyntax: Longword; EntryName: PChar): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcNsMgmtEntryDeleteA}
-function RpcNsMgmtEntryDeleteW(EntryNameSyntax: Longword; EntryName: PWideChar): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcNsMgmtEntryDeleteW}
-function RpcNsMgmtEntryDelete(EntryNameSyntax: Longword; EntryName: PTSTR): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcNsMgmtEntryDelete}
-
-function RpcNsMgmtEntryInqIfIdsA(EntryNameSyntax: Longword; EntryName: PChar;
- var IfIdVec: PRPC_IF_ID_VECTOR): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcNsMgmtEntryInqIfIdsA}
-function RpcNsMgmtEntryInqIfIdsW(EntryNameSyntax: Longword; EntryName: PWideChar;
- var IfIdVec: PRPC_IF_ID_VECTOR): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcNsMgmtEntryInqIfIdsW}
-function RpcNsMgmtEntryInqIfIds(EntryNameSyntax: Longword; EntryName: PTSTR;
- var IfIdVec: PRPC_IF_ID_VECTOR): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcNsMgmtEntryInqIfIds}
-
-function RpcNsMgmtHandleSetExpAge(NsHandle: RPC_NS_HANDLE;
- ExpirationAge: Longword): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcNsMgmtHandleSetExpAge}
-
-function RpcNsMgmtInqExpAge(var ExpirationAge: Longword): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcNsMgmtInqExpAge}
-
-function RpcNsMgmtSetExpAge(ExpirationAge: Longword): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcNsMgmtSetExpAge}
-
-// Client API's implemented in wrappers.
-
-function RpcNsBindingImportBeginA(EntryNameSyntax: Longword; EntryName: PChar;
- IfSpec: RPC_IF_HANDLE; ObjUuid: PUUID; var ImportContext: RPC_NS_HANDLE): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcNsBindingImportBeginA}
-function RpcNsBindingImportBeginW(EntryNameSyntax: Longword; EntryName: PWideChar;
- IfSpec: RPC_IF_HANDLE; ObjUuid: PUUID; var ImportContext: RPC_NS_HANDLE): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcNsBindingImportBeginW}
-function RpcNsBindingImportBegin(EntryNameSyntax: Longword; EntryName: PTSTR;
- IfSpec: RPC_IF_HANDLE; ObjUuid: PUUID; var ImportContext: RPC_NS_HANDLE): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcNsBindingImportBegin}
-
-function RpcNsBindingImportNext(ImportContext: RPC_NS_HANDLE;
- var Binding: RPC_BINDING_HANDLE): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcNsBindingImportNext}
-
-function RpcNsBindingImportDone(var ImportContext: RPC_NS_HANDLE): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcNsBindingImportDone}
-
-function RpcNsBindingSelect(BindingVec: PRPC_BINDING_VECTOR; var Binding: RPC_BINDING_HANDLE): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcNsBindingSelect}
-
-implementation
-
-const
- rpcns4 = 'rpcns4.dll';
- {$IFDEF UNICODE}
- AWSuffix = 'W';
- {$ELSE}
- AWSuffix = 'A';
- {$ENDIF UNICODE}
-
-{$IFDEF DYNAMIC_LINK}
-
-var
- _RpcNsBindingExportA: Pointer;
-
-function RpcNsBindingExportA;
-begin
- GetProcedureAddress(_RpcNsBindingExportA, rpcns4, 'RpcNsBindingExportA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcNsBindingExportA]
- end;
-end;
-
-var
- _RpcNsBindingExportW: Pointer;
-
-function RpcNsBindingExportW;
-begin
- GetProcedureAddress(_RpcNsBindingExportW, rpcns4, 'RpcNsBindingExportW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcNsBindingExportW]
- end;
-end;
-
-var
- _RpcNsBindingExport: Pointer;
-
-function RpcNsBindingExport;
-begin
- GetProcedureAddress(_RpcNsBindingExport, rpcns4, 'RpcNsBindingExport' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcNsBindingExport]
- end;
-end;
-
-var
- _RpcNsBindingUnexportA: Pointer;
-
-function RpcNsBindingUnexportA;
-begin
- GetProcedureAddress(_RpcNsBindingUnexportA, rpcns4, 'RpcNsBindingUnexportA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcNsBindingUnexportA]
- end;
-end;
-
-var
- _RpcNsBindingUnexportW: Pointer;
-
-function RpcNsBindingUnexportW;
-begin
- GetProcedureAddress(_RpcNsBindingUnexportW, rpcns4, 'RpcNsBindingUnexportW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcNsBindingUnexportW]
- end;
-end;
-
-var
- _RpcNsBindingUnexport: Pointer;
-
-function RpcNsBindingUnexport;
-begin
- GetProcedureAddress(_RpcNsBindingUnexport, rpcns4, 'RpcNsBindingUnexport' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcNsBindingUnexport]
- end;
-end;
-
-var
- _RpcNsBindingExportPnPA: Pointer;
-
-function RpcNsBindingExportPnPA;
-begin
- GetProcedureAddress(_RpcNsBindingExportPnPA, rpcns4, 'RpcNsBindingExportPnPA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcNsBindingExportPnPA]
- end;
-end;
-
-var
- _RpcNsBindingExportPnPW: Pointer;
-
-function RpcNsBindingExportPnPW;
-begin
- GetProcedureAddress(_RpcNsBindingExportPnPW, rpcns4, 'RpcNsBindingExportPnPW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcNsBindingExportPnPW]
- end;
-end;
-
-var
- _RpcNsBindingExportPnP: Pointer;
-
-function RpcNsBindingExportPnP;
-begin
- GetProcedureAddress(_RpcNsBindingExportPnP, rpcns4, 'RpcNsBindingExportPnP' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcNsBindingExportPnP]
- end;
-end;
-
-var
- _RpcNsBindingUnexportPnPA: Pointer;
-
-function RpcNsBindingUnexportPnPA;
-begin
- GetProcedureAddress(_RpcNsBindingUnexportPnPA, rpcns4, 'RpcNsBindingUnexportPnPA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcNsBindingUnexportPnPA]
- end;
-end;
-
-var
- _RpcNsBindingUnexportPnPW: Pointer;
-
-function RpcNsBindingUnexportPnPW;
-begin
- GetProcedureAddress(_RpcNsBindingUnexportPnPW, rpcns4, 'RpcNsBindingUnexportPnPW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcNsBindingUnexportPnPW]
- end;
-end;
-
-var
- _RpcNsBindingUnexportPnP: Pointer;
-
-function RpcNsBindingUnexportPnP;
-begin
- GetProcedureAddress(_RpcNsBindingUnexportPnP, rpcns4, 'RpcNsBindingUnexportPnP' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcNsBindingUnexportPnP]
- end;
-end;
-
-var
- _RpcNsBindingLookupBeginA: Pointer;
-
-function RpcNsBindingLookupBeginA;
-begin
- GetProcedureAddress(_RpcNsBindingLookupBeginA, rpcns4, 'RpcNsBindingLookupBeginA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcNsBindingLookupBeginA]
- end;
-end;
-
-var
- _RpcNsBindingLookupBeginW: Pointer;
-
-function RpcNsBindingLookupBeginW;
-begin
- GetProcedureAddress(_RpcNsBindingLookupBeginW, rpcns4, 'RpcNsBindingLookupBeginW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcNsBindingLookupBeginW]
- end;
-end;
-
-var
- _RpcNsBindingLookupBegin: Pointer;
-
-function RpcNsBindingLookupBegin;
-begin
- GetProcedureAddress(_RpcNsBindingLookupBegin, rpcns4, 'RpcNsBindingLookupBegin' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcNsBindingLookupBegin]
- end;
-end;
-
-var
- _RpcNsBindingLookupNext: Pointer;
-
-function RpcNsBindingLookupNext;
-begin
- GetProcedureAddress(_RpcNsBindingLookupNext, rpcns4, 'RpcNsBindingLookupNext');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcNsBindingLookupNext]
- end;
-end;
-
-var
- _RpcNsBindingLookupDone: Pointer;
-
-function RpcNsBindingLookupDone;
-begin
- GetProcedureAddress(_RpcNsBindingLookupDone, rpcns4, 'RpcNsBindingLookupDone');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcNsBindingLookupDone]
- end;
-end;
-
-var
- _RpcNsGroupDeleteA: Pointer;
-
-function RpcNsGroupDeleteA;
-begin
- GetProcedureAddress(_RpcNsGroupDeleteA, rpcns4, 'RpcNsGroupDeleteA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcNsGroupDeleteA]
- end;
-end;
-
-var
- _RpcNsGroupDeleteW: Pointer;
-
-function RpcNsGroupDeleteW;
-begin
- GetProcedureAddress(_RpcNsGroupDeleteW, rpcns4, 'RpcNsGroupDeleteW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcNsGroupDeleteW]
- end;
-end;
-
-var
- _RpcNsGroupDelete: Pointer;
-
-function RpcNsGroupDelete;
-begin
- GetProcedureAddress(_RpcNsGroupDelete, rpcns4, 'RpcNsGroupDelete' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcNsGroupDelete]
- end;
-end;
-
-var
- _RpcNsGroupMbrAddA: Pointer;
-
-function RpcNsGroupMbrAddA;
-begin
- GetProcedureAddress(_RpcNsGroupMbrAddA, rpcns4, 'RpcNsGroupMbrAddA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcNsGroupMbrAddA]
- end;
-end;
-
-var
- _RpcNsGroupMbrAddW: Pointer;
-
-function RpcNsGroupMbrAddW;
-begin
- GetProcedureAddress(_RpcNsGroupMbrAddW, rpcns4, 'RpcNsGroupMbrAddW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcNsGroupMbrAddW]
- end;
-end;
-
-var
- _RpcNsGroupMbrAdd: Pointer;
-
-function RpcNsGroupMbrAdd;
-begin
- GetProcedureAddress(_RpcNsGroupMbrAdd, rpcns4, 'RpcNsGroupMbrAdd' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcNsGroupMbrAdd]
- end;
-end;
-
-var
- _RpcNsGroupMbrRemoveA: Pointer;
-
-function RpcNsGroupMbrRemoveA;
-begin
- GetProcedureAddress(_RpcNsGroupMbrRemoveA, rpcns4, 'RpcNsGroupMbrRemoveA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcNsGroupMbrRemoveA]
- end;
-end;
-
-var
- _RpcNsGroupMbrRemoveW: Pointer;
-
-function RpcNsGroupMbrRemoveW;
-begin
- GetProcedureAddress(_RpcNsGroupMbrRemoveW, rpcns4, 'RpcNsGroupMbrRemoveW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcNsGroupMbrRemoveW]
- end;
-end;
-
-var
- _RpcNsGroupMbrRemove: Pointer;
-
-function RpcNsGroupMbrRemove;
-begin
- GetProcedureAddress(_RpcNsGroupMbrRemove, rpcns4, 'RpcNsGroupMbrRemove' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcNsGroupMbrRemove]
- end;
-end;
-
-var
- _RpcNsGroupMbrInqBeginA: Pointer;
-
-function RpcNsGroupMbrInqBeginA;
-begin
- GetProcedureAddress(_RpcNsGroupMbrInqBeginA, rpcns4, 'RpcNsGroupMbrInqBeginA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcNsGroupMbrInqBeginA]
- end;
-end;
-
-var
- _RpcNsGroupMbrInqBeginW: Pointer;
-
-function RpcNsGroupMbrInqBeginW;
-begin
- GetProcedureAddress(_RpcNsGroupMbrInqBeginW, rpcns4, 'RpcNsGroupMbrInqBeginW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcNsGroupMbrInqBeginW]
- end;
-end;
-
-var
- _RpcNsGroupMbrInqBegin: Pointer;
-
-function RpcNsGroupMbrInqBegin;
-begin
- GetProcedureAddress(_RpcNsGroupMbrInqBegin, rpcns4, 'RpcNsGroupMbrInqBegin' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcNsGroupMbrInqBegin]
- end;
-end;
-
-var
- _RpcNsGroupMbrInqNextA: Pointer;
-
-function RpcNsGroupMbrInqNextA;
-begin
- GetProcedureAddress(_RpcNsGroupMbrInqNextA, rpcns4, 'RpcNsGroupMbrInqNextA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcNsGroupMbrInqNextA]
- end;
-end;
-
-var
- _RpcNsGroupMbrInqNextW: Pointer;
-
-function RpcNsGroupMbrInqNextW;
-begin
- GetProcedureAddress(_RpcNsGroupMbrInqNextW, rpcns4, 'RpcNsGroupMbrInqNextW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcNsGroupMbrInqNextW]
- end;
-end;
-
-var
- _RpcNsGroupMbrInqNext: Pointer;
-
-function RpcNsGroupMbrInqNext;
-begin
- GetProcedureAddress(_RpcNsGroupMbrInqNext, rpcns4, 'RpcNsGroupMbrInqNext' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcNsGroupMbrInqNext]
- end;
-end;
-
-var
- _RpcNsGroupMbrInqDone: Pointer;
-
-function RpcNsGroupMbrInqDone;
-begin
- GetProcedureAddress(_RpcNsGroupMbrInqDone, rpcns4, 'RpcNsGroupMbrInqDone');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcNsGroupMbrInqDone]
- end;
-end;
-
-var
- _RpcNsProfileDeleteA: Pointer;
-
-function RpcNsProfileDeleteA;
-begin
- GetProcedureAddress(_RpcNsProfileDeleteA, rpcns4, 'RpcNsProfileDeleteA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcNsProfileDeleteA]
- end;
-end;
-
-var
- _RpcNsProfileDeleteW: Pointer;
-
-function RpcNsProfileDeleteW;
-begin
- GetProcedureAddress(_RpcNsProfileDeleteW, rpcns4, 'RpcNsProfileDeleteW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcNsProfileDeleteW]
- end;
-end;
-
-var
- _RpcNsProfileDelete: Pointer;
-
-function RpcNsProfileDelete;
-begin
- GetProcedureAddress(_RpcNsProfileDelete, rpcns4, 'RpcNsProfileDelete' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcNsProfileDelete]
- end;
-end;
-
-var
- _RpcNsProfileEltAddA: Pointer;
-
-function RpcNsProfileEltAddA;
-begin
- GetProcedureAddress(_RpcNsProfileEltAddA, rpcns4, 'RpcNsProfileEltAddA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcNsProfileEltAddA]
- end;
-end;
-
-var
- _RpcNsProfileEltAddW: Pointer;
-
-function RpcNsProfileEltAddW;
-begin
- GetProcedureAddress(_RpcNsProfileEltAddW, rpcns4, 'RpcNsProfileEltAddW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcNsProfileEltAddW]
- end;
-end;
-
-var
- _RpcNsProfileEltAdd: Pointer;
-
-function RpcNsProfileEltAdd;
-begin
- GetProcedureAddress(_RpcNsProfileEltAdd, rpcns4, 'RpcNsProfileEltAdd' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcNsProfileEltAdd]
- end;
-end;
-
-var
- _RpcNsProfileEltRemoveA: Pointer;
-
-function RpcNsProfileEltRemoveA;
-begin
- GetProcedureAddress(_RpcNsProfileEltRemoveA, rpcns4, 'RpcNsProfileEltRemoveA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcNsProfileEltRemoveA]
- end;
-end;
-
-var
- _RpcNsProfileEltRemoveW: Pointer;
-
-function RpcNsProfileEltRemoveW;
-begin
- GetProcedureAddress(_RpcNsProfileEltRemoveW, rpcns4, 'RpcNsProfileEltRemoveW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcNsProfileEltRemoveW]
- end;
-end;
-
-var
- _RpcNsProfileEltRemove: Pointer;
-
-function RpcNsProfileEltRemove;
-begin
- GetProcedureAddress(_RpcNsProfileEltRemove, rpcns4, 'RpcNsProfileEltRemove' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcNsProfileEltRemove]
- end;
-end;
-
-var
- _RpcNsProfileEltInqBeginA: Pointer;
-
-function RpcNsProfileEltInqBeginA;
-begin
- GetProcedureAddress(_RpcNsProfileEltInqBeginA, rpcns4, 'RpcNsProfileEltInqBeginA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcNsProfileEltInqBeginA]
- end;
-end;
-
-var
- _RpcNsProfileEltInqBeginW: Pointer;
-
-function RpcNsProfileEltInqBeginW;
-begin
- GetProcedureAddress(_RpcNsProfileEltInqBeginW, rpcns4, 'RpcNsProfileEltInqBeginW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcNsProfileEltInqBeginW]
- end;
-end;
-
-var
- _RpcNsProfileEltInqBegin: Pointer;
-
-function RpcNsProfileEltInqBegin;
-begin
- GetProcedureAddress(_RpcNsProfileEltInqBegin, rpcns4, 'RpcNsProfileEltInqBegin' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcNsProfileEltInqBegin]
- end;
-end;
-
-var
- _RpcNsProfileEltInqNextA: Pointer;
-
-function RpcNsProfileEltInqNextA;
-begin
- GetProcedureAddress(_RpcNsProfileEltInqNextA, rpcns4, 'RpcNsProfileEltInqNextA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcNsProfileEltInqNextA]
- end;
-end;
-
-var
- _RpcNsProfileEltInqNextW: Pointer;
-
-function RpcNsProfileEltInqNextW;
-begin
- GetProcedureAddress(_RpcNsProfileEltInqNextW, rpcns4, 'RpcNsProfileEltInqNextW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcNsProfileEltInqNextW]
- end;
-end;
-
-var
- _RpcNsProfileEltInqNext: Pointer;
-
-function RpcNsProfileEltInqNext;
-begin
- GetProcedureAddress(_RpcNsProfileEltInqNext, rpcns4, 'RpcNsProfileEltInqNext' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcNsProfileEltInqNext]
- end;
-end;
-
-var
- _RpcNsProfileEltInqDone: Pointer;
-
-function RpcNsProfileEltInqDone;
-begin
- GetProcedureAddress(_RpcNsProfileEltInqDone, rpcns4, 'RpcNsProfileEltInqDone');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcNsProfileEltInqDone]
- end;
-end;
-
-var
- _RpcNsEntryObjectInqBeginA: Pointer;
-
-function RpcNsEntryObjectInqBeginA;
-begin
- GetProcedureAddress(_RpcNsEntryObjectInqBeginA, rpcns4, 'RpcNsEntryObjectInqBeginA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcNsEntryObjectInqBeginA]
- end;
-end;
-
-var
- _RpcNsEntryObjectInqBeginW: Pointer;
-
-function RpcNsEntryObjectInqBeginW;
-begin
- GetProcedureAddress(_RpcNsEntryObjectInqBeginW, rpcns4, 'RpcNsEntryObjectInqBeginW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcNsEntryObjectInqBeginW]
- end;
-end;
-
-var
- _RpcNsEntryObjectInqBegin: Pointer;
-
-function RpcNsEntryObjectInqBegin;
-begin
- GetProcedureAddress(_RpcNsEntryObjectInqBegin, rpcns4, 'RpcNsEntryObjectInqBegin' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcNsEntryObjectInqBegin]
- end;
-end;
-
-var
- _RpcNsEntryObjectInqNext: Pointer;
-
-function RpcNsEntryObjectInqNext;
-begin
- GetProcedureAddress(_RpcNsEntryObjectInqNext, rpcns4, 'RpcNsEntryObjectInqNext');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcNsEntryObjectInqNext]
- end;
-end;
-
-var
- _RpcNsEntryObjectInqDone: Pointer;
-
-function RpcNsEntryObjectInqDone;
-begin
- GetProcedureAddress(_RpcNsEntryObjectInqDone, rpcns4, 'RpcNsEntryObjectInqDone');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcNsEntryObjectInqDone]
- end;
-end;
-
-var
- _RpcNsEntryExpandNameA: Pointer;
-
-function RpcNsEntryExpandNameA;
-begin
- GetProcedureAddress(_RpcNsEntryExpandNameA, rpcns4, 'RpcNsEntryExpandNameA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcNsEntryExpandNameA]
- end;
-end;
-
-var
- _RpcNsEntryExpandNameW: Pointer;
-
-function RpcNsEntryExpandNameW;
-begin
- GetProcedureAddress(_RpcNsEntryExpandNameW, rpcns4, 'RpcNsEntryExpandNameW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcNsEntryExpandNameW]
- end;
-end;
-
-var
- _RpcNsEntryExpandName: Pointer;
-
-function RpcNsEntryExpandName;
-begin
- GetProcedureAddress(_RpcNsEntryExpandName, rpcns4, 'RpcNsEntryExpandName' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcNsEntryExpandName]
- end;
-end;
-
-var
- _RpcNsMgmtBindingUnexportA: Pointer;
-
-function RpcNsMgmtBindingUnexportA;
-begin
- GetProcedureAddress(_RpcNsMgmtBindingUnexportA, rpcns4, 'RpcNsMgmtBindingUnexportA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcNsMgmtBindingUnexportA]
- end;
-end;
-
-var
- _RpcNsMgmtBindingUnexportW: Pointer;
-
-function RpcNsMgmtBindingUnexportW;
-begin
- GetProcedureAddress(_RpcNsMgmtBindingUnexportW, rpcns4, 'RpcNsMgmtBindingUnexportW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcNsMgmtBindingUnexportW]
- end;
-end;
-
-var
- _RpcNsMgmtBindingUnexport: Pointer;
-
-function RpcNsMgmtBindingUnexport;
-begin
- GetProcedureAddress(_RpcNsMgmtBindingUnexport, rpcns4, 'RpcNsMgmtBindingUnexport' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcNsMgmtBindingUnexport]
- end;
-end;
-
-var
- _RpcNsMgmtEntryCreateA: Pointer;
-
-function RpcNsMgmtEntryCreateA;
-begin
- GetProcedureAddress(_RpcNsMgmtEntryCreateA, rpcns4, 'RpcNsMgmtEntryCreateA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcNsMgmtEntryCreateA]
- end;
-end;
-
-var
- _RpcNsMgmtEntryCreateW: Pointer;
-
-function RpcNsMgmtEntryCreateW;
-begin
- GetProcedureAddress(_RpcNsMgmtEntryCreateW, rpcns4, 'RpcNsMgmtEntryCreateW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcNsMgmtEntryCreateW]
- end;
-end;
-
-var
- _RpcNsMgmtEntryCreate: Pointer;
-
-function RpcNsMgmtEntryCreate;
-begin
- GetProcedureAddress(_RpcNsMgmtEntryCreate, rpcns4, 'RpcNsMgmtEntryCreate' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcNsMgmtEntryCreate]
- end;
-end;
-
-var
- _RpcNsMgmtEntryDeleteA: Pointer;
-
-function RpcNsMgmtEntryDeleteA;
-begin
- GetProcedureAddress(_RpcNsMgmtEntryDeleteA, rpcns4, 'RpcNsMgmtEntryDeleteA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcNsMgmtEntryDeleteA]
- end;
-end;
-
-var
- _RpcNsMgmtEntryDeleteW: Pointer;
-
-function RpcNsMgmtEntryDeleteW;
-begin
- GetProcedureAddress(_RpcNsMgmtEntryDeleteW, rpcns4, 'RpcNsMgmtEntryDeleteW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcNsMgmtEntryDeleteW]
- end;
-end;
-
-var
- _RpcNsMgmtEntryDelete: Pointer;
-
-function RpcNsMgmtEntryDelete;
-begin
- GetProcedureAddress(_RpcNsMgmtEntryDelete, rpcns4, 'RpcNsMgmtEntryDelete' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcNsMgmtEntryDelete]
- end;
-end;
-
-var
- _RpcNsMgmtEntryInqIfIdsA: Pointer;
-
-function RpcNsMgmtEntryInqIfIdsA;
-begin
- GetProcedureAddress(_RpcNsMgmtEntryInqIfIdsA, rpcns4, 'RpcNsMgmtEntryInqIfIdsA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcNsMgmtEntryInqIfIdsA]
- end;
-end;
-
-var
- _RpcNsMgmtEntryInqIfIdsW: Pointer;
-
-function RpcNsMgmtEntryInqIfIdsW;
-begin
- GetProcedureAddress(_RpcNsMgmtEntryInqIfIdsW, rpcns4, 'RpcNsMgmtEntryInqIfIdsW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcNsMgmtEntryInqIfIdsW]
- end;
-end;
-
-var
- _RpcNsMgmtEntryInqIfIds: Pointer;
-
-function RpcNsMgmtEntryInqIfIds;
-begin
- GetProcedureAddress(_RpcNsMgmtEntryInqIfIds, rpcns4, 'RpcNsMgmtEntryInqIfIds' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcNsMgmtEntryInqIfIds]
- end;
-end;
-
-var
- _RpcNsMgmtHandleSetExpAge: Pointer;
-
-function RpcNsMgmtHandleSetExpAge;
-begin
- GetProcedureAddress(_RpcNsMgmtHandleSetExpAge, rpcns4, 'RpcNsMgmtHandleSetExpAge');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcNsMgmtHandleSetExpAge]
- end;
-end;
-
-var
- _RpcNsMgmtInqExpAge: Pointer;
-
-function RpcNsMgmtInqExpAge;
-begin
- GetProcedureAddress(_RpcNsMgmtInqExpAge, rpcns4, 'RpcNsMgmtInqExpAge');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcNsMgmtInqExpAge]
- end;
-end;
-
-var
- _RpcNsMgmtSetExpAge: Pointer;
-
-function RpcNsMgmtSetExpAge;
-begin
- GetProcedureAddress(_RpcNsMgmtSetExpAge, rpcns4, 'RpcNsMgmtSetExpAge');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcNsMgmtSetExpAge]
- end;
-end;
-
-var
- _RpcNsBindingImportBeginA: Pointer;
-
-function RpcNsBindingImportBeginA;
-begin
- GetProcedureAddress(_RpcNsBindingImportBeginA, rpcns4, 'RpcNsBindingImportBeginA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcNsBindingImportBeginA]
- end;
-end;
-
-var
- _RpcNsBindingImportBeginW: Pointer;
-
-function RpcNsBindingImportBeginW;
-begin
- GetProcedureAddress(_RpcNsBindingImportBeginW, rpcns4, 'RpcNsBindingImportBeginW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcNsBindingImportBeginW]
- end;
-end;
-
-var
- _RpcNsBindingImportBegin: Pointer;
-
-function RpcNsBindingImportBegin;
-begin
- GetProcedureAddress(_RpcNsBindingImportBegin, rpcns4, 'RpcNsBindingImportBegin' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcNsBindingImportBegin]
- end;
-end;
-
-var
- _RpcNsBindingImportNext: Pointer;
-
-function RpcNsBindingImportNext;
-begin
- GetProcedureAddress(_RpcNsBindingImportNext, rpcns4, 'RpcNsBindingImportNext');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcNsBindingImportNext]
- end;
-end;
-
-var
- _RpcNsBindingImportDone: Pointer;
-
-function RpcNsBindingImportDone;
-begin
- GetProcedureAddress(_RpcNsBindingImportDone, rpcns4, 'RpcNsBindingImportDone');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcNsBindingImportDone]
- end;
-end;
-
-var
- _RpcNsBindingSelect: Pointer;
-
-function RpcNsBindingSelect;
-begin
- GetProcedureAddress(_RpcNsBindingSelect, rpcns4, 'RpcNsBindingSelect');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcNsBindingSelect]
- end;
-end;
-
-{$ELSE}
-
-function RpcNsBindingExportA; external rpcns4 name 'RpcNsBindingExportA';
-function RpcNsBindingExportW; external rpcns4 name 'RpcNsBindingExportW';
-function RpcNsBindingExport; external rpcns4 name 'RpcNsBindingExport' + AWSuffix;
-function RpcNsBindingUnexportA; external rpcns4 name 'RpcNsBindingUnexportA';
-function RpcNsBindingUnexportW; external rpcns4 name 'RpcNsBindingUnexportW';
-function RpcNsBindingUnexport; external rpcns4 name 'RpcNsBindingUnexport' + AWSuffix;
-function RpcNsBindingExportPnPA; external rpcns4 name 'RpcNsBindingExportPnPA';
-function RpcNsBindingExportPnPW; external rpcns4 name 'RpcNsBindingExportPnPW';
-function RpcNsBindingExportPnP; external rpcns4 name 'RpcNsBindingExportPnP' + AWSuffix;
-function RpcNsBindingUnexportPnPA; external rpcns4 name 'RpcNsBindingUnexportPnPA';
-function RpcNsBindingUnexportPnPW; external rpcns4 name 'RpcNsBindingUnexportPnPW';
-function RpcNsBindingUnexportPnP; external rpcns4 name 'RpcNsBindingUnexportPnP' + AWSuffix;
-function RpcNsBindingLookupBeginA; external rpcns4 name 'RpcNsBindingLookupBeginA';
-function RpcNsBindingLookupBeginW; external rpcns4 name 'RpcNsBindingLookupBeginW';
-function RpcNsBindingLookupBegin; external rpcns4 name 'RpcNsBindingLookupBegin' + AWSuffix;
-function RpcNsBindingLookupNext; external rpcns4 name 'RpcNsBindingLookupNext';
-function RpcNsBindingLookupDone; external rpcns4 name 'RpcNsBindingLookupDone';
-function RpcNsGroupDeleteA; external rpcns4 name 'RpcNsGroupDeleteA';
-function RpcNsGroupDeleteW; external rpcns4 name 'RpcNsGroupDeleteW';
-function RpcNsGroupDelete; external rpcns4 name 'RpcNsGroupDelete' + AWSuffix;
-function RpcNsGroupMbrAddA; external rpcns4 name 'RpcNsGroupMbrAddA';
-function RpcNsGroupMbrAddW; external rpcns4 name 'RpcNsGroupMbrAddW';
-function RpcNsGroupMbrAdd; external rpcns4 name 'RpcNsGroupMbrAdd' + AWSuffix;
-function RpcNsGroupMbrRemoveA; external rpcns4 name 'RpcNsGroupMbrRemoveA';
-function RpcNsGroupMbrRemoveW; external rpcns4 name 'RpcNsGroupMbrRemoveW';
-function RpcNsGroupMbrRemove; external rpcns4 name 'RpcNsGroupMbrRemove' + AWSuffix;
-function RpcNsGroupMbrInqBeginA; external rpcns4 name 'RpcNsGroupMbrInqBeginA';
-function RpcNsGroupMbrInqBeginW; external rpcns4 name 'RpcNsGroupMbrInqBeginW';
-function RpcNsGroupMbrInqBegin; external rpcns4 name 'RpcNsGroupMbrInqBegin' + AWSuffix;
-function RpcNsGroupMbrInqNextA; external rpcns4 name 'RpcNsGroupMbrInqNextA';
-function RpcNsGroupMbrInqNextW; external rpcns4 name 'RpcNsGroupMbrInqNextW';
-function RpcNsGroupMbrInqNext; external rpcns4 name 'RpcNsGroupMbrInqNext' + AWSuffix;
-function RpcNsGroupMbrInqDone; external rpcns4 name 'RpcNsGroupMbrInqDone';
-function RpcNsProfileDeleteA; external rpcns4 name 'RpcNsProfileDeleteA';
-function RpcNsProfileDeleteW; external rpcns4 name 'RpcNsProfileDeleteW';
-function RpcNsProfileDelete; external rpcns4 name 'RpcNsProfileDelete' + AWSuffix;
-function RpcNsProfileEltAddA; external rpcns4 name 'RpcNsProfileEltAddA';
-function RpcNsProfileEltAddW; external rpcns4 name 'RpcNsProfileEltAddW';
-function RpcNsProfileEltAdd; external rpcns4 name 'RpcNsProfileEltAdd' + AWSuffix;
-function RpcNsProfileEltRemoveA; external rpcns4 name 'RpcNsProfileEltRemoveA';
-function RpcNsProfileEltRemoveW; external rpcns4 name 'RpcNsProfileEltRemoveW';
-function RpcNsProfileEltRemove; external rpcns4 name 'RpcNsProfileEltRemove' + AWSuffix;
-function RpcNsProfileEltInqBeginA; external rpcns4 name 'RpcNsProfileEltInqBeginA';
-function RpcNsProfileEltInqBeginW; external rpcns4 name 'RpcNsProfileEltInqBeginW';
-function RpcNsProfileEltInqBegin; external rpcns4 name 'RpcNsProfileEltInqBegin' + AWSuffix;
-function RpcNsProfileEltInqNextA; external rpcns4 name 'RpcNsProfileEltInqNextA';
-function RpcNsProfileEltInqNextW; external rpcns4 name 'RpcNsProfileEltInqNextW';
-function RpcNsProfileEltInqNext; external rpcns4 name 'RpcNsProfileEltInqNext' + AWSuffix;
-function RpcNsProfileEltInqDone; external rpcns4 name 'RpcNsProfileEltInqDone';
-function RpcNsEntryObjectInqBeginA; external rpcns4 name 'RpcNsEntryObjectInqBeginA';
-function RpcNsEntryObjectInqBeginW; external rpcns4 name 'RpcNsEntryObjectInqBeginW';
-function RpcNsEntryObjectInqBegin; external rpcns4 name 'RpcNsEntryObjectInqBegin' + AWSuffix;
-function RpcNsEntryObjectInqNext; external rpcns4 name 'RpcNsEntryObjectInqNext';
-function RpcNsEntryObjectInqDone; external rpcns4 name 'RpcNsEntryObjectInqDone';
-function RpcNsEntryExpandNameA; external rpcns4 name 'RpcNsEntryExpandNameA';
-function RpcNsEntryExpandNameW; external rpcns4 name 'RpcNsEntryExpandNameW';
-function RpcNsEntryExpandName; external rpcns4 name 'RpcNsEntryExpandName' + AWSuffix;
-function RpcNsMgmtBindingUnexportA; external rpcns4 name 'RpcNsMgmtBindingUnexportA';
-function RpcNsMgmtBindingUnexportW; external rpcns4 name 'RpcNsMgmtBindingUnexportW';
-function RpcNsMgmtBindingUnexport; external rpcns4 name 'RpcNsMgmtBindingUnexport' + AWSuffix;
-function RpcNsMgmtEntryCreateA; external rpcns4 name 'RpcNsMgmtEntryCreateA';
-function RpcNsMgmtEntryCreateW; external rpcns4 name 'RpcNsMgmtEntryCreateW';
-function RpcNsMgmtEntryCreate; external rpcns4 name 'RpcNsMgmtEntryCreate' + AWSuffix;
-function RpcNsMgmtEntryDeleteA; external rpcns4 name 'RpcNsMgmtEntryDeleteA';
-function RpcNsMgmtEntryDeleteW; external rpcns4 name 'RpcNsMgmtEntryDeleteW';
-function RpcNsMgmtEntryDelete; external rpcns4 name 'RpcNsMgmtEntryDelete' + AWSuffix;
-function RpcNsMgmtEntryInqIfIdsA; external rpcns4 name 'RpcNsMgmtEntryInqIfIdsA';
-function RpcNsMgmtEntryInqIfIdsW; external rpcns4 name 'RpcNsMgmtEntryInqIfIdsW';
-function RpcNsMgmtEntryInqIfIds; external rpcns4 name 'RpcNsMgmtEntryInqIfIds' + AWSuffix;
-function RpcNsMgmtHandleSetExpAge; external rpcns4 name 'RpcNsMgmtHandleSetExpAge';
-function RpcNsMgmtInqExpAge; external rpcns4 name 'RpcNsMgmtInqExpAge';
-function RpcNsMgmtSetExpAge; external rpcns4 name 'RpcNsMgmtSetExpAge';
-function RpcNsBindingImportBeginA; external rpcns4 name 'RpcNsBindingImportBeginA';
-function RpcNsBindingImportBeginW; external rpcns4 name 'RpcNsBindingImportBeginW';
-function RpcNsBindingImportBegin; external rpcns4 name 'RpcNsBindingImportBegin' + AWSuffix;
-function RpcNsBindingImportNext; external rpcns4 name 'RpcNsBindingImportNext';
-function RpcNsBindingImportDone; external rpcns4 name 'RpcNsBindingImportDone';
-function RpcNsBindingSelect; external rpcns4 name 'RpcNsBindingSelect';
-
-{$ENDIF DYNAMIC_LINK}
-
-end.
+{******************************************************************************}
+{ }
+{ RPC NSI API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: rpcnsi.h, released June 2000. The original Pascal }
+{ code is: RpcNsi.pas, released December 2000. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwarpcnsi.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaRpcNsi;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "RpcNsi.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaWinType, JwaRpc, JwaRpcDce;
+
+type
+ RPC_NS_HANDLE = Pointer;
+ {$EXTERNALSYM RPC_NS_HANDLE}
+
+const
+ RPC_C_NS_SYNTAX_DEFAULT = 0;
+ {$EXTERNALSYM RPC_C_NS_SYNTAX_DEFAULT}
+ RPC_C_NS_SYNTAX_DCE = 3;
+ {$EXTERNALSYM RPC_C_NS_SYNTAX_DCE}
+
+ RPC_C_PROFILE_DEFAULT_ELT = 0;
+ {$EXTERNALSYM RPC_C_PROFILE_DEFAULT_ELT}
+ RPC_C_PROFILE_ALL_ELT = 1;
+ {$EXTERNALSYM RPC_C_PROFILE_ALL_ELT}
+ RPC_C_PROFILE_ALL_ELTS = RPC_C_PROFILE_ALL_ELT;
+ {$EXTERNALSYM RPC_C_PROFILE_ALL_ELTS}
+ RPC_C_PROFILE_MATCH_BY_IF = 2;
+ {$EXTERNALSYM RPC_C_PROFILE_MATCH_BY_IF}
+ RPC_C_PROFILE_MATCH_BY_MBR = 3;
+ {$EXTERNALSYM RPC_C_PROFILE_MATCH_BY_MBR}
+ RPC_C_PROFILE_MATCH_BY_BOTH = 4;
+ {$EXTERNALSYM RPC_C_PROFILE_MATCH_BY_BOTH}
+
+ RPC_C_NS_DEFAULT_EXP_AGE = -1;
+ {$EXTERNALSYM RPC_C_NS_DEFAULT_EXP_AGE}
+
+// Server APIs
+
+function RpcNsBindingExportA(EntryNameSyntax: Longword; EntryName: PChar;
+ IfSpec: RPC_IF_HANDLE; BindingVec: PRPC_BINDING_VECTOR;
+ ObjectUuidVec: PUUID_VECTOR): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcNsBindingExportA}
+function RpcNsBindingExportW(EntryNameSyntax: Longword; EntryName: PWideChar;
+ IfSpec: RPC_IF_HANDLE; BindingVec: PRPC_BINDING_VECTOR;
+ ObjectUuidVec: PUUID_VECTOR): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcNsBindingExportW}
+function RpcNsBindingExport(EntryNameSyntax: Longword; EntryName: PTSTR;
+ IfSpec: RPC_IF_HANDLE; BindingVec: PRPC_BINDING_VECTOR;
+ ObjectUuidVec: PUUID_VECTOR): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcNsBindingExport}
+
+function RpcNsBindingUnexportA(EntryNameSyntax: Longword; EntryName: PChar;
+ IfSpec: RPC_IF_HANDLE; ObjectUuidVec: PUUID_VECTOR): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcNsBindingUnexportA}
+function RpcNsBindingUnexportW(EntryNameSyntax: Longword; EntryName: PWideChar;
+ IfSpec: RPC_IF_HANDLE; ObjectUuidVec: PUUID_VECTOR): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcNsBindingUnexportW}
+function RpcNsBindingUnexport(EntryNameSyntax: Longword; EntryName: PTSTR;
+ IfSpec: RPC_IF_HANDLE; ObjectUuidVec: PUUID_VECTOR): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcNsBindingUnexport}
+
+// Server PnP APIs
+
+function RpcNsBindingExportPnPA(EntryNameSyntax: Longword; EntryName: PChar;
+ IfSpec: RPC_IF_HANDLE; ObjectVector: PUUID_VECTOR): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcNsBindingExportPnPA}
+function RpcNsBindingExportPnPW(EntryNameSyntax: Longword; EntryName: PWideChar;
+ IfSpec: RPC_IF_HANDLE; ObjectVector: PUUID_VECTOR): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcNsBindingExportPnPW}
+function RpcNsBindingExportPnP(EntryNameSyntax: Longword; EntryName: PTSTR;
+ IfSpec: RPC_IF_HANDLE; ObjectVector: PUUID_VECTOR): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcNsBindingExportPnP}
+
+function RpcNsBindingUnexportPnPA(EntryNameSyntax: Longword; EntryName: PChar;
+ IfSpec: RPC_IF_HANDLE; ObjectVector: PUUID_VECTOR): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcNsBindingUnexportPnPA}
+function RpcNsBindingUnexportPnPW(EntryNameSyntax: Longword; EntryName: PWideChar;
+ IfSpec: RPC_IF_HANDLE; ObjectVector: PUUID_VECTOR): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcNsBindingUnexportPnPW}
+function RpcNsBindingUnexportPnP(EntryNameSyntax: Longword; EntryName: PTSTR;
+ IfSpec: RPC_IF_HANDLE; ObjectVector: PUUID_VECTOR): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcNsBindingUnexportPnP}
+
+// Client APIs
+
+function RpcNsBindingLookupBeginA(EntryNameSyntax: Longword; EntryName: PChar;
+ IfSpec: RPC_IF_HANDLE; ObjUuid: PUUID; BindingMaxCount: Longword;
+ var LookupContext: RPC_NS_HANDLE): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcNsBindingLookupBeginA}
+function RpcNsBindingLookupBeginW(EntryNameSyntax: Longword; EntryName: PWideChar;
+ IfSpec: RPC_IF_HANDLE; ObjUuid: PUUID; BindingMaxCount: Longword;
+ var LookupContext: RPC_NS_HANDLE): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcNsBindingLookupBeginW}
+function RpcNsBindingLookupBegin(EntryNameSyntax: Longword; EntryName: PTSTR;
+ IfSpec: RPC_IF_HANDLE; ObjUuid: PUUID; BindingMaxCount: Longword;
+ var LookupContext: RPC_NS_HANDLE): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcNsBindingLookupBegin}
+
+function RpcNsBindingLookupNext(LookupContext: RPC_NS_HANDLE;
+ var BindingVec: PRPC_BINDING_VECTOR): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcNsBindingLookupNext}
+
+function RpcNsBindingLookupDone(var LookupContext: RPC_NS_HANDLE): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcNsBindingLookupDone}
+
+// Group APIs
+
+function RpcNsGroupDeleteA(GroupNameSyntax: Longword; GroupName: PChar): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcNsGroupDeleteA}
+function RpcNsGroupDeleteW(GroupNameSyntax: Longword; GroupName: PWideChar): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcNsGroupDeleteW}
+function RpcNsGroupDelete(GroupNameSyntax: Longword; GroupName: PTSTR): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcNsGroupDelete}
+
+function RpcNsGroupMbrAddA(GroupNameSyntax: Longword; GroupName: PChar;
+ MemberNameSyntax: Longword; MemberName: PChar): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcNsGroupMbrAddA}
+function RpcNsGroupMbrAddW(GroupNameSyntax: Longword; GroupName: PWideChar;
+ MemberNameSyntax: Longword; MemberName: PWideChar): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcNsGroupMbrAddW}
+function RpcNsGroupMbrAdd(GroupNameSyntax: Longword; GroupName: PTSTR;
+ MemberNameSyntax: Longword; MemberName: PTSTR): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcNsGroupMbrAdd}
+
+function RpcNsGroupMbrRemoveA(GroupNameSyntax: Longword; GroupName: PChar;
+ MemberNameSyntax: Longword; MemberName: PChar): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcNsGroupMbrRemoveA}
+function RpcNsGroupMbrRemoveW(GroupNameSyntax: Longword; GroupName: PWideChar;
+ MemberNameSyntax: Longword; MemberName: PWideChar): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcNsGroupMbrRemoveW}
+function RpcNsGroupMbrRemove(GroupNameSyntax: Longword; GroupName: PTSTR;
+ MemberNameSyntax: Longword; MemberName: PTSTR): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcNsGroupMbrRemove}
+
+function RpcNsGroupMbrInqBeginA(GroupNameSyntax: Longword; GroupName: PChar;
+ MemberNameSyntax: Longword; var InquiryContext: RPC_NS_HANDLE): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcNsGroupMbrInqBeginA}
+function RpcNsGroupMbrInqBeginW(GroupNameSyntax: Longword; GroupName: PWideChar;
+ MemberNameSyntax: Longword; var InquiryContext: RPC_NS_HANDLE): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcNsGroupMbrInqBeginW}
+function RpcNsGroupMbrInqBegin(GroupNameSyntax: Longword; GroupName: PTSTR;
+ MemberNameSyntax: Longword; var InquiryContext: RPC_NS_HANDLE): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcNsGroupMbrInqBegin}
+
+function RpcNsGroupMbrInqNextA(InquiryContext: RPC_NS_HANDLE; MemberName: PPChar): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcNsGroupMbrInqNextA}
+function RpcNsGroupMbrInqNextW(InquiryContext: RPC_NS_HANDLE; MemberName: PPWideChar): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcNsGroupMbrInqNextW}
+function RpcNsGroupMbrInqNext(InquiryContext: RPC_NS_HANDLE; MemberName: PPTSTR): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcNsGroupMbrInqNext}
+
+function RpcNsGroupMbrInqDone(var InquiryContext: RPC_NS_HANDLE): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcNsGroupMbrInqDone}
+
+// Profile APIs
+
+function RpcNsProfileDeleteA(ProfileNameSyntax: Longword; ProfileName: PChar): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcNsProfileDeleteA}
+function RpcNsProfileDeleteW(ProfileNameSyntax: Longword; ProfileName: PWideChar): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcNsProfileDeleteW}
+function RpcNsProfileDelete(ProfileNameSyntax: Longword; ProfileName: PTSTR): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcNsProfileDelete}
+
+function RpcNsProfileEltAddA(ProfileNameSyntax: Longword; ProfileName: PChar;
+ IfId: PRPC_IF_ID; MemberNameSyntax: Longword; MemberName: PChar;
+ Priority: Longword; Annotation: PChar): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcNsProfileEltAddA}
+function RpcNsProfileEltAddW(ProfileNameSyntax: Longword; ProfileName: PWideChar;
+ IfId: PRPC_IF_ID; MemberNameSyntax: Longword; MemberName: PWideChar;
+ Priority: Longword; Annotation: PWideChar): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcNsProfileEltAddW}
+function RpcNsProfileEltAdd(ProfileNameSyntax: Longword; ProfileName: PTSTR;
+ IfId: PRPC_IF_ID; MemberNameSyntax: Longword; MemberName: PTSTR;
+ Priority: Longword; Annotation: PTSTR): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcNsProfileEltAdd}
+
+function RpcNsProfileEltRemoveA(ProfileNameSyntax: Longword; ProfileName: PChar;
+ IfId: PRPC_IF_ID; MemberNameSyntax: Longword; MemberName: PChar): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcNsProfileEltRemoveA}
+function RpcNsProfileEltRemoveW(ProfileNameSyntax: Longword; ProfileName: PWideChar;
+ IfId: PRPC_IF_ID; MemberNameSyntax: Longword; MemberName: PWideChar): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcNsProfileEltRemoveW}
+function RpcNsProfileEltRemove(ProfileNameSyntax: Longword; ProfileName: PTSTR;
+ IfId: PRPC_IF_ID; MemberNameSyntax: Longword; MemberName: PTSTR): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcNsProfileEltRemove}
+
+function RpcNsProfileEltInqBeginA(ProfileNameSyntax: Longword; ProfileName: PChar;
+ InquiryType: Longword; IfId: PRPC_IF_ID; VersOption, MemberNameSyntax: Longword;
+ MemberName: PChar; var InquiryContext: RPC_NS_HANDLE): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcNsProfileEltInqBeginA}
+function RpcNsProfileEltInqBeginW(ProfileNameSyntax: Longword; ProfileName: PWideChar;
+ InquiryType: Longword; IfId: PRPC_IF_ID; VersOption, MemberNameSyntax: Longword;
+ MemberName: PWideChar; var InquiryContext: RPC_NS_HANDLE): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcNsProfileEltInqBeginW}
+function RpcNsProfileEltInqBegin(ProfileNameSyntax: Longword; ProfileName: PTSTR;
+ InquiryType: Longword; IfId: PRPC_IF_ID; VersOption, MemberNameSyntax: Longword;
+ MemberName: PTSTR; var InquiryContext: RPC_NS_HANDLE): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcNsProfileEltInqBegin}
+
+function RpcNsProfileEltInqNextA(InquiryContext: RPC_NS_HANDLE; var IfId: RPC_IF_ID;
+ MemberName: PPChar; var Priority: Longword; Annotation: PPChar): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcNsProfileEltInqNextA}
+function RpcNsProfileEltInqNextW(InquiryContext: RPC_NS_HANDLE; var IfId: RPC_IF_ID;
+ MemberName: PPWideChar; var Priority: Longword; Annotation: PPWideChar): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcNsProfileEltInqNextW}
+function RpcNsProfileEltInqNext(InquiryContext: RPC_NS_HANDLE; var IfId: RPC_IF_ID;
+ MemberName: PPTSTR; var Priority: Longword; Annotation: PPTSTR): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcNsProfileEltInqNext}
+
+function RpcNsProfileEltInqDone(var InquiryContext: RPC_NS_HANDLE): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcNsProfileEltInqDone}
+
+// Entry object APIs
+
+function RpcNsEntryObjectInqBeginA(EntryNameSyntax: Longword; EntryName: PChar;
+ var InquiryContext: RPC_NS_HANDLE): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcNsEntryObjectInqBeginA}
+function RpcNsEntryObjectInqBeginW(EntryNameSyntax: Longword; EntryName: PWideChar;
+ var InquiryContext: RPC_NS_HANDLE): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcNsEntryObjectInqBeginW}
+function RpcNsEntryObjectInqBegin(EntryNameSyntax: Longword; EntryName: PTSTR;
+ var InquiryContext: RPC_NS_HANDLE): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcNsEntryObjectInqBegin}
+
+function RpcNsEntryObjectInqNext(InquiryContext: RPC_NS_HANDLE; ObjUuid: PUUID): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcNsEntryObjectInqNext}
+
+function RpcNsEntryObjectInqDone(var InquiryContext: RPC_NS_HANDLE): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcNsEntryObjectInqDone}
+
+// Management and MISC APIs
+
+function RpcNsEntryExpandNameA(EntryNameSyntax: Longword; EntryName: PChar;
+ var ExpandedName: PChar): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcNsEntryExpandNameA}
+function RpcNsEntryExpandNameW(EntryNameSyntax: Longword; EntryName: PWideChar;
+ var ExpandedName: PWideChar): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcNsEntryExpandNameW}
+function RpcNsEntryExpandName(EntryNameSyntax: Longword; EntryName: PTSTR;
+ var ExpandedName: PTSTR): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcNsEntryExpandName}
+
+function RpcNsMgmtBindingUnexportA(EntryNameSyntax: Longword; EntryName: PChar;
+ IfId: PRPC_IF_ID; VersOption: Longword; ObjectUuidVec: PUUID_VECTOR): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcNsMgmtBindingUnexportA}
+function RpcNsMgmtBindingUnexportW(EntryNameSyntax: Longword; EntryName: PWideChar;
+ IfId: PRPC_IF_ID; VersOption: Longword; ObjectUuidVec: PUUID_VECTOR): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcNsMgmtBindingUnexportW}
+function RpcNsMgmtBindingUnexport(EntryNameSyntax: Longword; EntryName: PTSTR;
+ IfId: PRPC_IF_ID; VersOption: Longword; ObjectUuidVec: PUUID_VECTOR): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcNsMgmtBindingUnexport}
+
+function RpcNsMgmtEntryCreateA(EntryNameSyntax: Longword; EntryName: PChar): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcNsMgmtEntryCreateA}
+function RpcNsMgmtEntryCreateW(EntryNameSyntax: Longword; EntryName: PWideChar): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcNsMgmtEntryCreateW}
+function RpcNsMgmtEntryCreate(EntryNameSyntax: Longword; EntryName: PTSTR): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcNsMgmtEntryCreate}
+
+function RpcNsMgmtEntryDeleteA(EntryNameSyntax: Longword; EntryName: PChar): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcNsMgmtEntryDeleteA}
+function RpcNsMgmtEntryDeleteW(EntryNameSyntax: Longword; EntryName: PWideChar): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcNsMgmtEntryDeleteW}
+function RpcNsMgmtEntryDelete(EntryNameSyntax: Longword; EntryName: PTSTR): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcNsMgmtEntryDelete}
+
+function RpcNsMgmtEntryInqIfIdsA(EntryNameSyntax: Longword; EntryName: PChar;
+ var IfIdVec: PRPC_IF_ID_VECTOR): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcNsMgmtEntryInqIfIdsA}
+function RpcNsMgmtEntryInqIfIdsW(EntryNameSyntax: Longword; EntryName: PWideChar;
+ var IfIdVec: PRPC_IF_ID_VECTOR): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcNsMgmtEntryInqIfIdsW}
+function RpcNsMgmtEntryInqIfIds(EntryNameSyntax: Longword; EntryName: PTSTR;
+ var IfIdVec: PRPC_IF_ID_VECTOR): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcNsMgmtEntryInqIfIds}
+
+function RpcNsMgmtHandleSetExpAge(NsHandle: RPC_NS_HANDLE;
+ ExpirationAge: Longword): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcNsMgmtHandleSetExpAge}
+
+function RpcNsMgmtInqExpAge(var ExpirationAge: Longword): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcNsMgmtInqExpAge}
+
+function RpcNsMgmtSetExpAge(ExpirationAge: Longword): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcNsMgmtSetExpAge}
+
+// Client API's implemented in wrappers.
+
+function RpcNsBindingImportBeginA(EntryNameSyntax: Longword; EntryName: PChar;
+ IfSpec: RPC_IF_HANDLE; ObjUuid: PUUID; var ImportContext: RPC_NS_HANDLE): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcNsBindingImportBeginA}
+function RpcNsBindingImportBeginW(EntryNameSyntax: Longword; EntryName: PWideChar;
+ IfSpec: RPC_IF_HANDLE; ObjUuid: PUUID; var ImportContext: RPC_NS_HANDLE): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcNsBindingImportBeginW}
+function RpcNsBindingImportBegin(EntryNameSyntax: Longword; EntryName: PTSTR;
+ IfSpec: RPC_IF_HANDLE; ObjUuid: PUUID; var ImportContext: RPC_NS_HANDLE): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcNsBindingImportBegin}
+
+function RpcNsBindingImportNext(ImportContext: RPC_NS_HANDLE;
+ var Binding: RPC_BINDING_HANDLE): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcNsBindingImportNext}
+
+function RpcNsBindingImportDone(var ImportContext: RPC_NS_HANDLE): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcNsBindingImportDone}
+
+function RpcNsBindingSelect(BindingVec: PRPC_BINDING_VECTOR; var Binding: RPC_BINDING_HANDLE): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcNsBindingSelect}
+
+implementation
+
+const
+ rpcns4 = 'rpcns4.dll';
+ {$IFDEF UNICODE}
+ AWSuffix = 'W';
+ {$ELSE}
+ AWSuffix = 'A';
+ {$ENDIF UNICODE}
+
+{$IFDEF DYNAMIC_LINK}
+
+var
+ _RpcNsBindingExportA: Pointer;
+
+function RpcNsBindingExportA;
+begin
+ GetProcedureAddress(_RpcNsBindingExportA, rpcns4, 'RpcNsBindingExportA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcNsBindingExportA]
+ end;
+end;
+
+var
+ _RpcNsBindingExportW: Pointer;
+
+function RpcNsBindingExportW;
+begin
+ GetProcedureAddress(_RpcNsBindingExportW, rpcns4, 'RpcNsBindingExportW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcNsBindingExportW]
+ end;
+end;
+
+var
+ _RpcNsBindingExport: Pointer;
+
+function RpcNsBindingExport;
+begin
+ GetProcedureAddress(_RpcNsBindingExport, rpcns4, 'RpcNsBindingExport' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcNsBindingExport]
+ end;
+end;
+
+var
+ _RpcNsBindingUnexportA: Pointer;
+
+function RpcNsBindingUnexportA;
+begin
+ GetProcedureAddress(_RpcNsBindingUnexportA, rpcns4, 'RpcNsBindingUnexportA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcNsBindingUnexportA]
+ end;
+end;
+
+var
+ _RpcNsBindingUnexportW: Pointer;
+
+function RpcNsBindingUnexportW;
+begin
+ GetProcedureAddress(_RpcNsBindingUnexportW, rpcns4, 'RpcNsBindingUnexportW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcNsBindingUnexportW]
+ end;
+end;
+
+var
+ _RpcNsBindingUnexport: Pointer;
+
+function RpcNsBindingUnexport;
+begin
+ GetProcedureAddress(_RpcNsBindingUnexport, rpcns4, 'RpcNsBindingUnexport' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcNsBindingUnexport]
+ end;
+end;
+
+var
+ _RpcNsBindingExportPnPA: Pointer;
+
+function RpcNsBindingExportPnPA;
+begin
+ GetProcedureAddress(_RpcNsBindingExportPnPA, rpcns4, 'RpcNsBindingExportPnPA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcNsBindingExportPnPA]
+ end;
+end;
+
+var
+ _RpcNsBindingExportPnPW: Pointer;
+
+function RpcNsBindingExportPnPW;
+begin
+ GetProcedureAddress(_RpcNsBindingExportPnPW, rpcns4, 'RpcNsBindingExportPnPW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcNsBindingExportPnPW]
+ end;
+end;
+
+var
+ _RpcNsBindingExportPnP: Pointer;
+
+function RpcNsBindingExportPnP;
+begin
+ GetProcedureAddress(_RpcNsBindingExportPnP, rpcns4, 'RpcNsBindingExportPnP' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcNsBindingExportPnP]
+ end;
+end;
+
+var
+ _RpcNsBindingUnexportPnPA: Pointer;
+
+function RpcNsBindingUnexportPnPA;
+begin
+ GetProcedureAddress(_RpcNsBindingUnexportPnPA, rpcns4, 'RpcNsBindingUnexportPnPA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcNsBindingUnexportPnPA]
+ end;
+end;
+
+var
+ _RpcNsBindingUnexportPnPW: Pointer;
+
+function RpcNsBindingUnexportPnPW;
+begin
+ GetProcedureAddress(_RpcNsBindingUnexportPnPW, rpcns4, 'RpcNsBindingUnexportPnPW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcNsBindingUnexportPnPW]
+ end;
+end;
+
+var
+ _RpcNsBindingUnexportPnP: Pointer;
+
+function RpcNsBindingUnexportPnP;
+begin
+ GetProcedureAddress(_RpcNsBindingUnexportPnP, rpcns4, 'RpcNsBindingUnexportPnP' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcNsBindingUnexportPnP]
+ end;
+end;
+
+var
+ _RpcNsBindingLookupBeginA: Pointer;
+
+function RpcNsBindingLookupBeginA;
+begin
+ GetProcedureAddress(_RpcNsBindingLookupBeginA, rpcns4, 'RpcNsBindingLookupBeginA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcNsBindingLookupBeginA]
+ end;
+end;
+
+var
+ _RpcNsBindingLookupBeginW: Pointer;
+
+function RpcNsBindingLookupBeginW;
+begin
+ GetProcedureAddress(_RpcNsBindingLookupBeginW, rpcns4, 'RpcNsBindingLookupBeginW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcNsBindingLookupBeginW]
+ end;
+end;
+
+var
+ _RpcNsBindingLookupBegin: Pointer;
+
+function RpcNsBindingLookupBegin;
+begin
+ GetProcedureAddress(_RpcNsBindingLookupBegin, rpcns4, 'RpcNsBindingLookupBegin' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcNsBindingLookupBegin]
+ end;
+end;
+
+var
+ _RpcNsBindingLookupNext: Pointer;
+
+function RpcNsBindingLookupNext;
+begin
+ GetProcedureAddress(_RpcNsBindingLookupNext, rpcns4, 'RpcNsBindingLookupNext');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcNsBindingLookupNext]
+ end;
+end;
+
+var
+ _RpcNsBindingLookupDone: Pointer;
+
+function RpcNsBindingLookupDone;
+begin
+ GetProcedureAddress(_RpcNsBindingLookupDone, rpcns4, 'RpcNsBindingLookupDone');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcNsBindingLookupDone]
+ end;
+end;
+
+var
+ _RpcNsGroupDeleteA: Pointer;
+
+function RpcNsGroupDeleteA;
+begin
+ GetProcedureAddress(_RpcNsGroupDeleteA, rpcns4, 'RpcNsGroupDeleteA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcNsGroupDeleteA]
+ end;
+end;
+
+var
+ _RpcNsGroupDeleteW: Pointer;
+
+function RpcNsGroupDeleteW;
+begin
+ GetProcedureAddress(_RpcNsGroupDeleteW, rpcns4, 'RpcNsGroupDeleteW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcNsGroupDeleteW]
+ end;
+end;
+
+var
+ _RpcNsGroupDelete: Pointer;
+
+function RpcNsGroupDelete;
+begin
+ GetProcedureAddress(_RpcNsGroupDelete, rpcns4, 'RpcNsGroupDelete' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcNsGroupDelete]
+ end;
+end;
+
+var
+ _RpcNsGroupMbrAddA: Pointer;
+
+function RpcNsGroupMbrAddA;
+begin
+ GetProcedureAddress(_RpcNsGroupMbrAddA, rpcns4, 'RpcNsGroupMbrAddA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcNsGroupMbrAddA]
+ end;
+end;
+
+var
+ _RpcNsGroupMbrAddW: Pointer;
+
+function RpcNsGroupMbrAddW;
+begin
+ GetProcedureAddress(_RpcNsGroupMbrAddW, rpcns4, 'RpcNsGroupMbrAddW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcNsGroupMbrAddW]
+ end;
+end;
+
+var
+ _RpcNsGroupMbrAdd: Pointer;
+
+function RpcNsGroupMbrAdd;
+begin
+ GetProcedureAddress(_RpcNsGroupMbrAdd, rpcns4, 'RpcNsGroupMbrAdd' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcNsGroupMbrAdd]
+ end;
+end;
+
+var
+ _RpcNsGroupMbrRemoveA: Pointer;
+
+function RpcNsGroupMbrRemoveA;
+begin
+ GetProcedureAddress(_RpcNsGroupMbrRemoveA, rpcns4, 'RpcNsGroupMbrRemoveA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcNsGroupMbrRemoveA]
+ end;
+end;
+
+var
+ _RpcNsGroupMbrRemoveW: Pointer;
+
+function RpcNsGroupMbrRemoveW;
+begin
+ GetProcedureAddress(_RpcNsGroupMbrRemoveW, rpcns4, 'RpcNsGroupMbrRemoveW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcNsGroupMbrRemoveW]
+ end;
+end;
+
+var
+ _RpcNsGroupMbrRemove: Pointer;
+
+function RpcNsGroupMbrRemove;
+begin
+ GetProcedureAddress(_RpcNsGroupMbrRemove, rpcns4, 'RpcNsGroupMbrRemove' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcNsGroupMbrRemove]
+ end;
+end;
+
+var
+ _RpcNsGroupMbrInqBeginA: Pointer;
+
+function RpcNsGroupMbrInqBeginA;
+begin
+ GetProcedureAddress(_RpcNsGroupMbrInqBeginA, rpcns4, 'RpcNsGroupMbrInqBeginA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcNsGroupMbrInqBeginA]
+ end;
+end;
+
+var
+ _RpcNsGroupMbrInqBeginW: Pointer;
+
+function RpcNsGroupMbrInqBeginW;
+begin
+ GetProcedureAddress(_RpcNsGroupMbrInqBeginW, rpcns4, 'RpcNsGroupMbrInqBeginW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcNsGroupMbrInqBeginW]
+ end;
+end;
+
+var
+ _RpcNsGroupMbrInqBegin: Pointer;
+
+function RpcNsGroupMbrInqBegin;
+begin
+ GetProcedureAddress(_RpcNsGroupMbrInqBegin, rpcns4, 'RpcNsGroupMbrInqBegin' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcNsGroupMbrInqBegin]
+ end;
+end;
+
+var
+ _RpcNsGroupMbrInqNextA: Pointer;
+
+function RpcNsGroupMbrInqNextA;
+begin
+ GetProcedureAddress(_RpcNsGroupMbrInqNextA, rpcns4, 'RpcNsGroupMbrInqNextA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcNsGroupMbrInqNextA]
+ end;
+end;
+
+var
+ _RpcNsGroupMbrInqNextW: Pointer;
+
+function RpcNsGroupMbrInqNextW;
+begin
+ GetProcedureAddress(_RpcNsGroupMbrInqNextW, rpcns4, 'RpcNsGroupMbrInqNextW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcNsGroupMbrInqNextW]
+ end;
+end;
+
+var
+ _RpcNsGroupMbrInqNext: Pointer;
+
+function RpcNsGroupMbrInqNext;
+begin
+ GetProcedureAddress(_RpcNsGroupMbrInqNext, rpcns4, 'RpcNsGroupMbrInqNext' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcNsGroupMbrInqNext]
+ end;
+end;
+
+var
+ _RpcNsGroupMbrInqDone: Pointer;
+
+function RpcNsGroupMbrInqDone;
+begin
+ GetProcedureAddress(_RpcNsGroupMbrInqDone, rpcns4, 'RpcNsGroupMbrInqDone');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcNsGroupMbrInqDone]
+ end;
+end;
+
+var
+ _RpcNsProfileDeleteA: Pointer;
+
+function RpcNsProfileDeleteA;
+begin
+ GetProcedureAddress(_RpcNsProfileDeleteA, rpcns4, 'RpcNsProfileDeleteA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcNsProfileDeleteA]
+ end;
+end;
+
+var
+ _RpcNsProfileDeleteW: Pointer;
+
+function RpcNsProfileDeleteW;
+begin
+ GetProcedureAddress(_RpcNsProfileDeleteW, rpcns4, 'RpcNsProfileDeleteW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcNsProfileDeleteW]
+ end;
+end;
+
+var
+ _RpcNsProfileDelete: Pointer;
+
+function RpcNsProfileDelete;
+begin
+ GetProcedureAddress(_RpcNsProfileDelete, rpcns4, 'RpcNsProfileDelete' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcNsProfileDelete]
+ end;
+end;
+
+var
+ _RpcNsProfileEltAddA: Pointer;
+
+function RpcNsProfileEltAddA;
+begin
+ GetProcedureAddress(_RpcNsProfileEltAddA, rpcns4, 'RpcNsProfileEltAddA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcNsProfileEltAddA]
+ end;
+end;
+
+var
+ _RpcNsProfileEltAddW: Pointer;
+
+function RpcNsProfileEltAddW;
+begin
+ GetProcedureAddress(_RpcNsProfileEltAddW, rpcns4, 'RpcNsProfileEltAddW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcNsProfileEltAddW]
+ end;
+end;
+
+var
+ _RpcNsProfileEltAdd: Pointer;
+
+function RpcNsProfileEltAdd;
+begin
+ GetProcedureAddress(_RpcNsProfileEltAdd, rpcns4, 'RpcNsProfileEltAdd' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcNsProfileEltAdd]
+ end;
+end;
+
+var
+ _RpcNsProfileEltRemoveA: Pointer;
+
+function RpcNsProfileEltRemoveA;
+begin
+ GetProcedureAddress(_RpcNsProfileEltRemoveA, rpcns4, 'RpcNsProfileEltRemoveA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcNsProfileEltRemoveA]
+ end;
+end;
+
+var
+ _RpcNsProfileEltRemoveW: Pointer;
+
+function RpcNsProfileEltRemoveW;
+begin
+ GetProcedureAddress(_RpcNsProfileEltRemoveW, rpcns4, 'RpcNsProfileEltRemoveW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcNsProfileEltRemoveW]
+ end;
+end;
+
+var
+ _RpcNsProfileEltRemove: Pointer;
+
+function RpcNsProfileEltRemove;
+begin
+ GetProcedureAddress(_RpcNsProfileEltRemove, rpcns4, 'RpcNsProfileEltRemove' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcNsProfileEltRemove]
+ end;
+end;
+
+var
+ _RpcNsProfileEltInqBeginA: Pointer;
+
+function RpcNsProfileEltInqBeginA;
+begin
+ GetProcedureAddress(_RpcNsProfileEltInqBeginA, rpcns4, 'RpcNsProfileEltInqBeginA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcNsProfileEltInqBeginA]
+ end;
+end;
+
+var
+ _RpcNsProfileEltInqBeginW: Pointer;
+
+function RpcNsProfileEltInqBeginW;
+begin
+ GetProcedureAddress(_RpcNsProfileEltInqBeginW, rpcns4, 'RpcNsProfileEltInqBeginW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcNsProfileEltInqBeginW]
+ end;
+end;
+
+var
+ _RpcNsProfileEltInqBegin: Pointer;
+
+function RpcNsProfileEltInqBegin;
+begin
+ GetProcedureAddress(_RpcNsProfileEltInqBegin, rpcns4, 'RpcNsProfileEltInqBegin' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcNsProfileEltInqBegin]
+ end;
+end;
+
+var
+ _RpcNsProfileEltInqNextA: Pointer;
+
+function RpcNsProfileEltInqNextA;
+begin
+ GetProcedureAddress(_RpcNsProfileEltInqNextA, rpcns4, 'RpcNsProfileEltInqNextA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcNsProfileEltInqNextA]
+ end;
+end;
+
+var
+ _RpcNsProfileEltInqNextW: Pointer;
+
+function RpcNsProfileEltInqNextW;
+begin
+ GetProcedureAddress(_RpcNsProfileEltInqNextW, rpcns4, 'RpcNsProfileEltInqNextW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcNsProfileEltInqNextW]
+ end;
+end;
+
+var
+ _RpcNsProfileEltInqNext: Pointer;
+
+function RpcNsProfileEltInqNext;
+begin
+ GetProcedureAddress(_RpcNsProfileEltInqNext, rpcns4, 'RpcNsProfileEltInqNext' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcNsProfileEltInqNext]
+ end;
+end;
+
+var
+ _RpcNsProfileEltInqDone: Pointer;
+
+function RpcNsProfileEltInqDone;
+begin
+ GetProcedureAddress(_RpcNsProfileEltInqDone, rpcns4, 'RpcNsProfileEltInqDone');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcNsProfileEltInqDone]
+ end;
+end;
+
+var
+ _RpcNsEntryObjectInqBeginA: Pointer;
+
+function RpcNsEntryObjectInqBeginA;
+begin
+ GetProcedureAddress(_RpcNsEntryObjectInqBeginA, rpcns4, 'RpcNsEntryObjectInqBeginA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcNsEntryObjectInqBeginA]
+ end;
+end;
+
+var
+ _RpcNsEntryObjectInqBeginW: Pointer;
+
+function RpcNsEntryObjectInqBeginW;
+begin
+ GetProcedureAddress(_RpcNsEntryObjectInqBeginW, rpcns4, 'RpcNsEntryObjectInqBeginW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcNsEntryObjectInqBeginW]
+ end;
+end;
+
+var
+ _RpcNsEntryObjectInqBegin: Pointer;
+
+function RpcNsEntryObjectInqBegin;
+begin
+ GetProcedureAddress(_RpcNsEntryObjectInqBegin, rpcns4, 'RpcNsEntryObjectInqBegin' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcNsEntryObjectInqBegin]
+ end;
+end;
+
+var
+ _RpcNsEntryObjectInqNext: Pointer;
+
+function RpcNsEntryObjectInqNext;
+begin
+ GetProcedureAddress(_RpcNsEntryObjectInqNext, rpcns4, 'RpcNsEntryObjectInqNext');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcNsEntryObjectInqNext]
+ end;
+end;
+
+var
+ _RpcNsEntryObjectInqDone: Pointer;
+
+function RpcNsEntryObjectInqDone;
+begin
+ GetProcedureAddress(_RpcNsEntryObjectInqDone, rpcns4, 'RpcNsEntryObjectInqDone');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcNsEntryObjectInqDone]
+ end;
+end;
+
+var
+ _RpcNsEntryExpandNameA: Pointer;
+
+function RpcNsEntryExpandNameA;
+begin
+ GetProcedureAddress(_RpcNsEntryExpandNameA, rpcns4, 'RpcNsEntryExpandNameA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcNsEntryExpandNameA]
+ end;
+end;
+
+var
+ _RpcNsEntryExpandNameW: Pointer;
+
+function RpcNsEntryExpandNameW;
+begin
+ GetProcedureAddress(_RpcNsEntryExpandNameW, rpcns4, 'RpcNsEntryExpandNameW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcNsEntryExpandNameW]
+ end;
+end;
+
+var
+ _RpcNsEntryExpandName: Pointer;
+
+function RpcNsEntryExpandName;
+begin
+ GetProcedureAddress(_RpcNsEntryExpandName, rpcns4, 'RpcNsEntryExpandName' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcNsEntryExpandName]
+ end;
+end;
+
+var
+ _RpcNsMgmtBindingUnexportA: Pointer;
+
+function RpcNsMgmtBindingUnexportA;
+begin
+ GetProcedureAddress(_RpcNsMgmtBindingUnexportA, rpcns4, 'RpcNsMgmtBindingUnexportA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcNsMgmtBindingUnexportA]
+ end;
+end;
+
+var
+ _RpcNsMgmtBindingUnexportW: Pointer;
+
+function RpcNsMgmtBindingUnexportW;
+begin
+ GetProcedureAddress(_RpcNsMgmtBindingUnexportW, rpcns4, 'RpcNsMgmtBindingUnexportW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcNsMgmtBindingUnexportW]
+ end;
+end;
+
+var
+ _RpcNsMgmtBindingUnexport: Pointer;
+
+function RpcNsMgmtBindingUnexport;
+begin
+ GetProcedureAddress(_RpcNsMgmtBindingUnexport, rpcns4, 'RpcNsMgmtBindingUnexport' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcNsMgmtBindingUnexport]
+ end;
+end;
+
+var
+ _RpcNsMgmtEntryCreateA: Pointer;
+
+function RpcNsMgmtEntryCreateA;
+begin
+ GetProcedureAddress(_RpcNsMgmtEntryCreateA, rpcns4, 'RpcNsMgmtEntryCreateA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcNsMgmtEntryCreateA]
+ end;
+end;
+
+var
+ _RpcNsMgmtEntryCreateW: Pointer;
+
+function RpcNsMgmtEntryCreateW;
+begin
+ GetProcedureAddress(_RpcNsMgmtEntryCreateW, rpcns4, 'RpcNsMgmtEntryCreateW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcNsMgmtEntryCreateW]
+ end;
+end;
+
+var
+ _RpcNsMgmtEntryCreate: Pointer;
+
+function RpcNsMgmtEntryCreate;
+begin
+ GetProcedureAddress(_RpcNsMgmtEntryCreate, rpcns4, 'RpcNsMgmtEntryCreate' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcNsMgmtEntryCreate]
+ end;
+end;
+
+var
+ _RpcNsMgmtEntryDeleteA: Pointer;
+
+function RpcNsMgmtEntryDeleteA;
+begin
+ GetProcedureAddress(_RpcNsMgmtEntryDeleteA, rpcns4, 'RpcNsMgmtEntryDeleteA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcNsMgmtEntryDeleteA]
+ end;
+end;
+
+var
+ _RpcNsMgmtEntryDeleteW: Pointer;
+
+function RpcNsMgmtEntryDeleteW;
+begin
+ GetProcedureAddress(_RpcNsMgmtEntryDeleteW, rpcns4, 'RpcNsMgmtEntryDeleteW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcNsMgmtEntryDeleteW]
+ end;
+end;
+
+var
+ _RpcNsMgmtEntryDelete: Pointer;
+
+function RpcNsMgmtEntryDelete;
+begin
+ GetProcedureAddress(_RpcNsMgmtEntryDelete, rpcns4, 'RpcNsMgmtEntryDelete' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcNsMgmtEntryDelete]
+ end;
+end;
+
+var
+ _RpcNsMgmtEntryInqIfIdsA: Pointer;
+
+function RpcNsMgmtEntryInqIfIdsA;
+begin
+ GetProcedureAddress(_RpcNsMgmtEntryInqIfIdsA, rpcns4, 'RpcNsMgmtEntryInqIfIdsA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcNsMgmtEntryInqIfIdsA]
+ end;
+end;
+
+var
+ _RpcNsMgmtEntryInqIfIdsW: Pointer;
+
+function RpcNsMgmtEntryInqIfIdsW;
+begin
+ GetProcedureAddress(_RpcNsMgmtEntryInqIfIdsW, rpcns4, 'RpcNsMgmtEntryInqIfIdsW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcNsMgmtEntryInqIfIdsW]
+ end;
+end;
+
+var
+ _RpcNsMgmtEntryInqIfIds: Pointer;
+
+function RpcNsMgmtEntryInqIfIds;
+begin
+ GetProcedureAddress(_RpcNsMgmtEntryInqIfIds, rpcns4, 'RpcNsMgmtEntryInqIfIds' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcNsMgmtEntryInqIfIds]
+ end;
+end;
+
+var
+ _RpcNsMgmtHandleSetExpAge: Pointer;
+
+function RpcNsMgmtHandleSetExpAge;
+begin
+ GetProcedureAddress(_RpcNsMgmtHandleSetExpAge, rpcns4, 'RpcNsMgmtHandleSetExpAge');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcNsMgmtHandleSetExpAge]
+ end;
+end;
+
+var
+ _RpcNsMgmtInqExpAge: Pointer;
+
+function RpcNsMgmtInqExpAge;
+begin
+ GetProcedureAddress(_RpcNsMgmtInqExpAge, rpcns4, 'RpcNsMgmtInqExpAge');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcNsMgmtInqExpAge]
+ end;
+end;
+
+var
+ _RpcNsMgmtSetExpAge: Pointer;
+
+function RpcNsMgmtSetExpAge;
+begin
+ GetProcedureAddress(_RpcNsMgmtSetExpAge, rpcns4, 'RpcNsMgmtSetExpAge');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcNsMgmtSetExpAge]
+ end;
+end;
+
+var
+ _RpcNsBindingImportBeginA: Pointer;
+
+function RpcNsBindingImportBeginA;
+begin
+ GetProcedureAddress(_RpcNsBindingImportBeginA, rpcns4, 'RpcNsBindingImportBeginA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcNsBindingImportBeginA]
+ end;
+end;
+
+var
+ _RpcNsBindingImportBeginW: Pointer;
+
+function RpcNsBindingImportBeginW;
+begin
+ GetProcedureAddress(_RpcNsBindingImportBeginW, rpcns4, 'RpcNsBindingImportBeginW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcNsBindingImportBeginW]
+ end;
+end;
+
+var
+ _RpcNsBindingImportBegin: Pointer;
+
+function RpcNsBindingImportBegin;
+begin
+ GetProcedureAddress(_RpcNsBindingImportBegin, rpcns4, 'RpcNsBindingImportBegin' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcNsBindingImportBegin]
+ end;
+end;
+
+var
+ _RpcNsBindingImportNext: Pointer;
+
+function RpcNsBindingImportNext;
+begin
+ GetProcedureAddress(_RpcNsBindingImportNext, rpcns4, 'RpcNsBindingImportNext');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcNsBindingImportNext]
+ end;
+end;
+
+var
+ _RpcNsBindingImportDone: Pointer;
+
+function RpcNsBindingImportDone;
+begin
+ GetProcedureAddress(_RpcNsBindingImportDone, rpcns4, 'RpcNsBindingImportDone');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcNsBindingImportDone]
+ end;
+end;
+
+var
+ _RpcNsBindingSelect: Pointer;
+
+function RpcNsBindingSelect;
+begin
+ GetProcedureAddress(_RpcNsBindingSelect, rpcns4, 'RpcNsBindingSelect');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcNsBindingSelect]
+ end;
+end;
+
+{$ELSE}
+
+function RpcNsBindingExportA; external rpcns4 name 'RpcNsBindingExportA';
+function RpcNsBindingExportW; external rpcns4 name 'RpcNsBindingExportW';
+function RpcNsBindingExport; external rpcns4 name 'RpcNsBindingExport' + AWSuffix;
+function RpcNsBindingUnexportA; external rpcns4 name 'RpcNsBindingUnexportA';
+function RpcNsBindingUnexportW; external rpcns4 name 'RpcNsBindingUnexportW';
+function RpcNsBindingUnexport; external rpcns4 name 'RpcNsBindingUnexport' + AWSuffix;
+function RpcNsBindingExportPnPA; external rpcns4 name 'RpcNsBindingExportPnPA';
+function RpcNsBindingExportPnPW; external rpcns4 name 'RpcNsBindingExportPnPW';
+function RpcNsBindingExportPnP; external rpcns4 name 'RpcNsBindingExportPnP' + AWSuffix;
+function RpcNsBindingUnexportPnPA; external rpcns4 name 'RpcNsBindingUnexportPnPA';
+function RpcNsBindingUnexportPnPW; external rpcns4 name 'RpcNsBindingUnexportPnPW';
+function RpcNsBindingUnexportPnP; external rpcns4 name 'RpcNsBindingUnexportPnP' + AWSuffix;
+function RpcNsBindingLookupBeginA; external rpcns4 name 'RpcNsBindingLookupBeginA';
+function RpcNsBindingLookupBeginW; external rpcns4 name 'RpcNsBindingLookupBeginW';
+function RpcNsBindingLookupBegin; external rpcns4 name 'RpcNsBindingLookupBegin' + AWSuffix;
+function RpcNsBindingLookupNext; external rpcns4 name 'RpcNsBindingLookupNext';
+function RpcNsBindingLookupDone; external rpcns4 name 'RpcNsBindingLookupDone';
+function RpcNsGroupDeleteA; external rpcns4 name 'RpcNsGroupDeleteA';
+function RpcNsGroupDeleteW; external rpcns4 name 'RpcNsGroupDeleteW';
+function RpcNsGroupDelete; external rpcns4 name 'RpcNsGroupDelete' + AWSuffix;
+function RpcNsGroupMbrAddA; external rpcns4 name 'RpcNsGroupMbrAddA';
+function RpcNsGroupMbrAddW; external rpcns4 name 'RpcNsGroupMbrAddW';
+function RpcNsGroupMbrAdd; external rpcns4 name 'RpcNsGroupMbrAdd' + AWSuffix;
+function RpcNsGroupMbrRemoveA; external rpcns4 name 'RpcNsGroupMbrRemoveA';
+function RpcNsGroupMbrRemoveW; external rpcns4 name 'RpcNsGroupMbrRemoveW';
+function RpcNsGroupMbrRemove; external rpcns4 name 'RpcNsGroupMbrRemove' + AWSuffix;
+function RpcNsGroupMbrInqBeginA; external rpcns4 name 'RpcNsGroupMbrInqBeginA';
+function RpcNsGroupMbrInqBeginW; external rpcns4 name 'RpcNsGroupMbrInqBeginW';
+function RpcNsGroupMbrInqBegin; external rpcns4 name 'RpcNsGroupMbrInqBegin' + AWSuffix;
+function RpcNsGroupMbrInqNextA; external rpcns4 name 'RpcNsGroupMbrInqNextA';
+function RpcNsGroupMbrInqNextW; external rpcns4 name 'RpcNsGroupMbrInqNextW';
+function RpcNsGroupMbrInqNext; external rpcns4 name 'RpcNsGroupMbrInqNext' + AWSuffix;
+function RpcNsGroupMbrInqDone; external rpcns4 name 'RpcNsGroupMbrInqDone';
+function RpcNsProfileDeleteA; external rpcns4 name 'RpcNsProfileDeleteA';
+function RpcNsProfileDeleteW; external rpcns4 name 'RpcNsProfileDeleteW';
+function RpcNsProfileDelete; external rpcns4 name 'RpcNsProfileDelete' + AWSuffix;
+function RpcNsProfileEltAddA; external rpcns4 name 'RpcNsProfileEltAddA';
+function RpcNsProfileEltAddW; external rpcns4 name 'RpcNsProfileEltAddW';
+function RpcNsProfileEltAdd; external rpcns4 name 'RpcNsProfileEltAdd' + AWSuffix;
+function RpcNsProfileEltRemoveA; external rpcns4 name 'RpcNsProfileEltRemoveA';
+function RpcNsProfileEltRemoveW; external rpcns4 name 'RpcNsProfileEltRemoveW';
+function RpcNsProfileEltRemove; external rpcns4 name 'RpcNsProfileEltRemove' + AWSuffix;
+function RpcNsProfileEltInqBeginA; external rpcns4 name 'RpcNsProfileEltInqBeginA';
+function RpcNsProfileEltInqBeginW; external rpcns4 name 'RpcNsProfileEltInqBeginW';
+function RpcNsProfileEltInqBegin; external rpcns4 name 'RpcNsProfileEltInqBegin' + AWSuffix;
+function RpcNsProfileEltInqNextA; external rpcns4 name 'RpcNsProfileEltInqNextA';
+function RpcNsProfileEltInqNextW; external rpcns4 name 'RpcNsProfileEltInqNextW';
+function RpcNsProfileEltInqNext; external rpcns4 name 'RpcNsProfileEltInqNext' + AWSuffix;
+function RpcNsProfileEltInqDone; external rpcns4 name 'RpcNsProfileEltInqDone';
+function RpcNsEntryObjectInqBeginA; external rpcns4 name 'RpcNsEntryObjectInqBeginA';
+function RpcNsEntryObjectInqBeginW; external rpcns4 name 'RpcNsEntryObjectInqBeginW';
+function RpcNsEntryObjectInqBegin; external rpcns4 name 'RpcNsEntryObjectInqBegin' + AWSuffix;
+function RpcNsEntryObjectInqNext; external rpcns4 name 'RpcNsEntryObjectInqNext';
+function RpcNsEntryObjectInqDone; external rpcns4 name 'RpcNsEntryObjectInqDone';
+function RpcNsEntryExpandNameA; external rpcns4 name 'RpcNsEntryExpandNameA';
+function RpcNsEntryExpandNameW; external rpcns4 name 'RpcNsEntryExpandNameW';
+function RpcNsEntryExpandName; external rpcns4 name 'RpcNsEntryExpandName' + AWSuffix;
+function RpcNsMgmtBindingUnexportA; external rpcns4 name 'RpcNsMgmtBindingUnexportA';
+function RpcNsMgmtBindingUnexportW; external rpcns4 name 'RpcNsMgmtBindingUnexportW';
+function RpcNsMgmtBindingUnexport; external rpcns4 name 'RpcNsMgmtBindingUnexport' + AWSuffix;
+function RpcNsMgmtEntryCreateA; external rpcns4 name 'RpcNsMgmtEntryCreateA';
+function RpcNsMgmtEntryCreateW; external rpcns4 name 'RpcNsMgmtEntryCreateW';
+function RpcNsMgmtEntryCreate; external rpcns4 name 'RpcNsMgmtEntryCreate' + AWSuffix;
+function RpcNsMgmtEntryDeleteA; external rpcns4 name 'RpcNsMgmtEntryDeleteA';
+function RpcNsMgmtEntryDeleteW; external rpcns4 name 'RpcNsMgmtEntryDeleteW';
+function RpcNsMgmtEntryDelete; external rpcns4 name 'RpcNsMgmtEntryDelete' + AWSuffix;
+function RpcNsMgmtEntryInqIfIdsA; external rpcns4 name 'RpcNsMgmtEntryInqIfIdsA';
+function RpcNsMgmtEntryInqIfIdsW; external rpcns4 name 'RpcNsMgmtEntryInqIfIdsW';
+function RpcNsMgmtEntryInqIfIds; external rpcns4 name 'RpcNsMgmtEntryInqIfIds' + AWSuffix;
+function RpcNsMgmtHandleSetExpAge; external rpcns4 name 'RpcNsMgmtHandleSetExpAge';
+function RpcNsMgmtInqExpAge; external rpcns4 name 'RpcNsMgmtInqExpAge';
+function RpcNsMgmtSetExpAge; external rpcns4 name 'RpcNsMgmtSetExpAge';
+function RpcNsBindingImportBeginA; external rpcns4 name 'RpcNsBindingImportBeginA';
+function RpcNsBindingImportBeginW; external rpcns4 name 'RpcNsBindingImportBeginW';
+function RpcNsBindingImportBegin; external rpcns4 name 'RpcNsBindingImportBegin' + AWSuffix;
+function RpcNsBindingImportNext; external rpcns4 name 'RpcNsBindingImportNext';
+function RpcNsBindingImportDone; external rpcns4 name 'RpcNsBindingImportDone';
+function RpcNsBindingSelect; external rpcns4 name 'RpcNsBindingSelect';
+
+{$ENDIF DYNAMIC_LINK}
+
+end.
diff --git a/packages/extra/winunits/jwarpcnterr.pas b/packages/extra/winunits/jwarpcnterr.pas
index bd327bbba0..2581a8790a 100644
--- a/packages/extra/winunits/jwarpcnterr.pas
+++ b/packages/extra/winunits/jwarpcnterr.pas
@@ -1,113 +1,113 @@
-{******************************************************************************}
-{ }
-{ RPC Error Codes API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: rpcnterr.h, released June 2000. The original Pascal }
-{ code is: RpcNtErr.pas, released December 2000. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwarpcnterr.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaRpcNtErr;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "RpcNtErr.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaWinError;
-
-{*********************************************************/
-/** Microsoft LAN Manager **/
-/** Copyright(c) Microsoft Corp., 1987-1999 **/
-/** **/
-/** Rpc Error Codes from the compiler and runtime **/
-/** **/
-/*********************************************************}
-
-const
- RPC_S_OK = ERROR_SUCCESS;
- {$EXTERNALSYM RPC_S_OK}
- RPC_S_INVALID_ARG = ERROR_INVALID_PARAMETER;
- {$EXTERNALSYM RPC_S_INVALID_ARG}
- RPC_S_OUT_OF_MEMORY = ERROR_OUTOFMEMORY;
- {$EXTERNALSYM RPC_S_OUT_OF_MEMORY}
- RPC_S_OUT_OF_THREADS = ERROR_MAX_THRDS_REACHED;
- {$EXTERNALSYM RPC_S_OUT_OF_THREADS}
- RPC_S_INVALID_LEVEL = ERROR_INVALID_PARAMETER;
- {$EXTERNALSYM RPC_S_INVALID_LEVEL}
- RPC_S_BUFFER_TOO_SMALL = ERROR_INSUFFICIENT_BUFFER;
- {$EXTERNALSYM RPC_S_BUFFER_TOO_SMALL}
- RPC_S_INVALID_SECURITY_DESC = ERROR_INVALID_SECURITY_DESCR;
- {$EXTERNALSYM RPC_S_INVALID_SECURITY_DESC}
- RPC_S_ACCESS_DENIED = ERROR_ACCESS_DENIED;
- {$EXTERNALSYM RPC_S_ACCESS_DENIED}
- RPC_S_SERVER_OUT_OF_MEMORY = ERROR_NOT_ENOUGH_SERVER_MEMORY;
- {$EXTERNALSYM RPC_S_SERVER_OUT_OF_MEMORY}
- RPC_S_ASYNC_CALL_PENDING = ERROR_IO_PENDING;
- {$EXTERNALSYM RPC_S_ASYNC_CALL_PENDING}
- RPC_S_UNKNOWN_PRINCIPAL = ERROR_NONE_MAPPED;
- {$EXTERNALSYM RPC_S_UNKNOWN_PRINCIPAL}
- RPC_S_TIMEOUT = ERROR_TIMEOUT;
- {$EXTERNALSYM RPC_S_TIMEOUT}
-
- RPC_X_NO_MEMORY = RPC_S_OUT_OF_MEMORY;
- {$EXTERNALSYM RPC_X_NO_MEMORY}
- RPC_X_INVALID_BOUND = RPC_S_INVALID_BOUND;
- {$EXTERNALSYM RPC_X_INVALID_BOUND}
- RPC_X_INVALID_TAG = RPC_S_INVALID_TAG;
- {$EXTERNALSYM RPC_X_INVALID_TAG}
- RPC_X_ENUM_VALUE_TOO_LARGE = RPC_X_ENUM_VALUE_OUT_OF_RANGE;
- {$EXTERNALSYM RPC_X_ENUM_VALUE_TOO_LARGE}
- RPC_X_SS_CONTEXT_MISMATCH = ERROR_INVALID_HANDLE;
- {$EXTERNALSYM RPC_X_SS_CONTEXT_MISMATCH}
- RPC_X_INVALID_BUFFER = ERROR_INVALID_USER_BUFFER;
- {$EXTERNALSYM RPC_X_INVALID_BUFFER}
- RPC_X_PIPE_APP_MEMORY = ERROR_OUTOFMEMORY;
- {$EXTERNALSYM RPC_X_PIPE_APP_MEMORY}
- RPC_X_INVALID_PIPE_OPERATION = RPC_X_WRONG_PIPE_ORDER;
- {$EXTERNALSYM RPC_X_INVALID_PIPE_OPERATION}
-
-implementation
-
-end.
+{******************************************************************************}
+{ }
+{ RPC Error Codes API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: rpcnterr.h, released June 2000. The original Pascal }
+{ code is: RpcNtErr.pas, released December 2000. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwarpcnterr.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaRpcNtErr;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "RpcNtErr.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaWinError;
+
+{*********************************************************/
+/** Microsoft LAN Manager **/
+/** Copyright(c) Microsoft Corp., 1987-1999 **/
+/** **/
+/** Rpc Error Codes from the compiler and runtime **/
+/** **/
+/*********************************************************}
+
+const
+ RPC_S_OK = ERROR_SUCCESS;
+ {$EXTERNALSYM RPC_S_OK}
+ RPC_S_INVALID_ARG = ERROR_INVALID_PARAMETER;
+ {$EXTERNALSYM RPC_S_INVALID_ARG}
+ RPC_S_OUT_OF_MEMORY = ERROR_OUTOFMEMORY;
+ {$EXTERNALSYM RPC_S_OUT_OF_MEMORY}
+ RPC_S_OUT_OF_THREADS = ERROR_MAX_THRDS_REACHED;
+ {$EXTERNALSYM RPC_S_OUT_OF_THREADS}
+ RPC_S_INVALID_LEVEL = ERROR_INVALID_PARAMETER;
+ {$EXTERNALSYM RPC_S_INVALID_LEVEL}
+ RPC_S_BUFFER_TOO_SMALL = ERROR_INSUFFICIENT_BUFFER;
+ {$EXTERNALSYM RPC_S_BUFFER_TOO_SMALL}
+ RPC_S_INVALID_SECURITY_DESC = ERROR_INVALID_SECURITY_DESCR;
+ {$EXTERNALSYM RPC_S_INVALID_SECURITY_DESC}
+ RPC_S_ACCESS_DENIED = ERROR_ACCESS_DENIED;
+ {$EXTERNALSYM RPC_S_ACCESS_DENIED}
+ RPC_S_SERVER_OUT_OF_MEMORY = ERROR_NOT_ENOUGH_SERVER_MEMORY;
+ {$EXTERNALSYM RPC_S_SERVER_OUT_OF_MEMORY}
+ RPC_S_ASYNC_CALL_PENDING = ERROR_IO_PENDING;
+ {$EXTERNALSYM RPC_S_ASYNC_CALL_PENDING}
+ RPC_S_UNKNOWN_PRINCIPAL = ERROR_NONE_MAPPED;
+ {$EXTERNALSYM RPC_S_UNKNOWN_PRINCIPAL}
+ RPC_S_TIMEOUT = ERROR_TIMEOUT;
+ {$EXTERNALSYM RPC_S_TIMEOUT}
+
+ RPC_X_NO_MEMORY = RPC_S_OUT_OF_MEMORY;
+ {$EXTERNALSYM RPC_X_NO_MEMORY}
+ RPC_X_INVALID_BOUND = RPC_S_INVALID_BOUND;
+ {$EXTERNALSYM RPC_X_INVALID_BOUND}
+ RPC_X_INVALID_TAG = RPC_S_INVALID_TAG;
+ {$EXTERNALSYM RPC_X_INVALID_TAG}
+ RPC_X_ENUM_VALUE_TOO_LARGE = RPC_X_ENUM_VALUE_OUT_OF_RANGE;
+ {$EXTERNALSYM RPC_X_ENUM_VALUE_TOO_LARGE}
+ RPC_X_SS_CONTEXT_MISMATCH = ERROR_INVALID_HANDLE;
+ {$EXTERNALSYM RPC_X_SS_CONTEXT_MISMATCH}
+ RPC_X_INVALID_BUFFER = ERROR_INVALID_USER_BUFFER;
+ {$EXTERNALSYM RPC_X_INVALID_BUFFER}
+ RPC_X_PIPE_APP_MEMORY = ERROR_OUTOFMEMORY;
+ {$EXTERNALSYM RPC_X_PIPE_APP_MEMORY}
+ RPC_X_INVALID_PIPE_OPERATION = RPC_X_WRONG_PIPE_ORDER;
+ {$EXTERNALSYM RPC_X_INVALID_PIPE_OPERATION}
+
+implementation
+
+end.
diff --git a/packages/extra/winunits/jwarpcssl.pas b/packages/extra/winunits/jwarpcssl.pas
index 6e56028b9b..5c851c1f55 100644
--- a/packages/extra/winunits/jwarpcssl.pas
+++ b/packages/extra/winunits/jwarpcssl.pas
@@ -1,126 +1,126 @@
-{******************************************************************************}
-{ }
-{ WinCypt dependent RPC API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: rpcssl.h, released June 2000. The original Pascal }
-{ code is: RpcSsl.pas, released April 2003. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwarpcssl.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaRpcSsl;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "rpcssl.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaRpc, JwaWinCrypt, JwaWinType;
-
-function RpcCertGeneratePrincipalNameW(Context: PCCERT_CONTEXT; Flags: DWORD; out pBuffer: PWideChar): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcCertGeneratePrincipalNameW}
-function RpcCertGeneratePrincipalNameA(Context: PCCERT_CONTEXT; Flags: DWORD; out pBuffer: PAnsiChar): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcCertGeneratePrincipalNameA}
-function RpcCertGeneratePrincipalName(Context: PCCERT_CONTEXT; Flags: DWORD; out pBuffer: PTCHAR): RPC_STATUS; stdcall;
-{$EXTERNALSYM RpcCertGeneratePrincipalName}
-
-implementation
-
-const
- rpclib = 'rpcrt4.dll';
- {$IFDEF UNICODE}
- AWSuffix = 'W';
- {$ELSE}
- AWSuffix = 'A';
- {$ENDIF UNICODE}
-
-{$IFDEF DYNAMIC_LINK}
-
-var
- _RpcCertGeneratePrincipalNameW: Pointer;
-
-function RpcCertGeneratePrincipalNameW;
-begin
- GetProcedureAddress(_RpcCertGeneratePrincipalNameW, rpclib, 'RpcCertGeneratePrincipalNameW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcCertGeneratePrincipalNameW]
- end;
-end;
-
-var
- _RpcCertGeneratePrincipalNameA: Pointer;
-
-function RpcCertGeneratePrincipalNameA;
-begin
- GetProcedureAddress(_RpcCertGeneratePrincipalNameA, rpclib, 'RpcCertGeneratePrincipalNameA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcCertGeneratePrincipalNameA]
- end;
-end;
-
-var
- _RpcCertGeneratePrincipalName: Pointer;
-
-function RpcCertGeneratePrincipalName;
-begin
- GetProcedureAddress(_RpcCertGeneratePrincipalName, rpclib, 'RpcCertGeneratePrincipalName' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RpcCertGeneratePrincipalName]
- end;
-end;
-
-{$ELSE}
-
-function RpcCertGeneratePrincipalNameW; external rpclib name 'RpcCertGeneratePrincipalNameW';
-function RpcCertGeneratePrincipalNameA; external rpclib name 'RpcCertGeneratePrincipalNameA';
-function RpcCertGeneratePrincipalName; external rpclib name 'RpcCertGeneratePrincipalName' + AWSuffix;
-
-{$ENDIF DYNAMIC_LINK}
-
-end.
+{******************************************************************************}
+{ }
+{ WinCypt dependent RPC API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: rpcssl.h, released June 2000. The original Pascal }
+{ code is: RpcSsl.pas, released April 2003. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwarpcssl.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaRpcSsl;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "rpcssl.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaRpc, JwaWinCrypt, JwaWinType;
+
+function RpcCertGeneratePrincipalNameW(Context: PCCERT_CONTEXT; Flags: DWORD; out pBuffer: PWideChar): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcCertGeneratePrincipalNameW}
+function RpcCertGeneratePrincipalNameA(Context: PCCERT_CONTEXT; Flags: DWORD; out pBuffer: PAnsiChar): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcCertGeneratePrincipalNameA}
+function RpcCertGeneratePrincipalName(Context: PCCERT_CONTEXT; Flags: DWORD; out pBuffer: PTCHAR): RPC_STATUS; stdcall;
+{$EXTERNALSYM RpcCertGeneratePrincipalName}
+
+implementation
+
+const
+ rpclib = 'rpcrt4.dll';
+ {$IFDEF UNICODE}
+ AWSuffix = 'W';
+ {$ELSE}
+ AWSuffix = 'A';
+ {$ENDIF UNICODE}
+
+{$IFDEF DYNAMIC_LINK}
+
+var
+ _RpcCertGeneratePrincipalNameW: Pointer;
+
+function RpcCertGeneratePrincipalNameW;
+begin
+ GetProcedureAddress(_RpcCertGeneratePrincipalNameW, rpclib, 'RpcCertGeneratePrincipalNameW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcCertGeneratePrincipalNameW]
+ end;
+end;
+
+var
+ _RpcCertGeneratePrincipalNameA: Pointer;
+
+function RpcCertGeneratePrincipalNameA;
+begin
+ GetProcedureAddress(_RpcCertGeneratePrincipalNameA, rpclib, 'RpcCertGeneratePrincipalNameA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcCertGeneratePrincipalNameA]
+ end;
+end;
+
+var
+ _RpcCertGeneratePrincipalName: Pointer;
+
+function RpcCertGeneratePrincipalName;
+begin
+ GetProcedureAddress(_RpcCertGeneratePrincipalName, rpclib, 'RpcCertGeneratePrincipalName' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RpcCertGeneratePrincipalName]
+ end;
+end;
+
+{$ELSE}
+
+function RpcCertGeneratePrincipalNameW; external rpclib name 'RpcCertGeneratePrincipalNameW';
+function RpcCertGeneratePrincipalNameA; external rpclib name 'RpcCertGeneratePrincipalNameA';
+function RpcCertGeneratePrincipalName; external rpclib name 'RpcCertGeneratePrincipalName' + AWSuffix;
+
+{$ENDIF DYNAMIC_LINK}
+
+end.
diff --git a/packages/extra/winunits/jwascesvc.pas b/packages/extra/winunits/jwascesvc.pas
index c400ce33dd..d3ff3d0bfd 100644
--- a/packages/extra/winunits/jwascesvc.pas
+++ b/packages/extra/winunits/jwascesvc.pas
@@ -1,336 +1,336 @@
-{******************************************************************************}
-{ }
-{ Security Service Attachements API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: scesvc.h, released June 2000. The original Pascal }
-{ code is: SceSvc.pas, released December 2000. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwascesvc.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaSceSvc;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "scesvc.h"'}
-{$HPPEMIT ''}
-{$HPPEMIT 'typedef SCESVC_HANDLE *PSCESVC_HANDLE'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaWinType;
-
-type
- SCESTATUS = DWORD;
- {$EXTERNALSYM SCESTATUS}
-
-const
- SCESTATUS_SUCCESS = 0;
- {$EXTERNALSYM SCESTATUS_SUCCESS}
- SCESTATUS_INVALID_PARAMETER = 1;
- {$EXTERNALSYM SCESTATUS_INVALID_PARAMETER}
- SCESTATUS_RECORD_NOT_FOUND = 2;
- {$EXTERNALSYM SCESTATUS_RECORD_NOT_FOUND}
- SCESTATUS_INVALID_DATA = 3;
- {$EXTERNALSYM SCESTATUS_INVALID_DATA}
- SCESTATUS_OBJECT_EXIST = 4;
- {$EXTERNALSYM SCESTATUS_OBJECT_EXIST}
- SCESTATUS_BUFFER_TOO_SMALL = 5;
- {$EXTERNALSYM SCESTATUS_BUFFER_TOO_SMALL}
- SCESTATUS_PROFILE_NOT_FOUND = 6;
- {$EXTERNALSYM SCESTATUS_PROFILE_NOT_FOUND}
- SCESTATUS_BAD_FORMAT = 7;
- {$EXTERNALSYM SCESTATUS_BAD_FORMAT}
- SCESTATUS_NOT_ENOUGH_RESOURCE = 8;
- {$EXTERNALSYM SCESTATUS_NOT_ENOUGH_RESOURCE}
- SCESTATUS_ACCESS_DENIED = 9;
- {$EXTERNALSYM SCESTATUS_ACCESS_DENIED}
- SCESTATUS_CANT_DELETE = 10;
- {$EXTERNALSYM SCESTATUS_CANT_DELETE}
- SCESTATUS_PREFIX_OVERFLOW = 11;
- {$EXTERNALSYM SCESTATUS_PREFIX_OVERFLOW}
- SCESTATUS_OTHER_ERROR = 12;
- {$EXTERNALSYM SCESTATUS_OTHER_ERROR}
- SCESTATUS_ALREADY_RUNNING = 13;
- {$EXTERNALSYM SCESTATUS_ALREADY_RUNNING}
- SCESTATUS_SERVICE_NOT_SUPPORT = 14;
- {$EXTERNALSYM SCESTATUS_SERVICE_NOT_SUPPORT}
- SCESTATUS_MOD_NOT_FOUND = 15;
- {$EXTERNALSYM SCESTATUS_MOD_NOT_FOUND}
- SCESTATUS_EXCEPTION_IN_SERVER = 16;
- {$EXTERNALSYM SCESTATUS_EXCEPTION_IN_SERVER}
- SCESTATUS_NO_TEMPLATE_GIVEN = 17;
- {$EXTERNALSYM SCESTATUS_NO_TEMPLATE_GIVEN}
- SCESTATUS_NO_MAPPING = 18;
- {$EXTERNALSYM SCESTATUS_NO_MAPPING}
- SCESTATUS_TRUST_FAIL = 19;
- {$EXTERNALSYM SCESTATUS_TRUST_FAIL}
-
-type
- PSCESVC_CONFIGURATION_LINE = ^SCESVC_CONFIGURATION_LINE;
- {$EXTERNALSYM PSCESVC_CONFIGURATION_LINE}
- _SCESVC_CONFIGURATION_LINE_ = record
- Key: LPTSTR;
- Value: LPTSTR;
- ValueLen: DWORD; // number of bytes
- end;
- {$EXTERNALSYM _SCESVC_CONFIGURATION_LINE_}
- SCESVC_CONFIGURATION_LINE = _SCESVC_CONFIGURATION_LINE_;
- {$EXTERNALSYM SCESVC_CONFIGURATION_LINE}
- TScesvcConfigurationLine = SCESVC_CONFIGURATION_LINE;
- PScesvcConfigurationLine = PSCESVC_CONFIGURATION_LINE;
-
- PSCESVC_CONFIGURATION_INFO = ^SCESVC_CONFIGURATION_INFO;
- {$EXTERNALSYM PSCESVC_CONFIGURATION_INFO}
- _SCESVC_CONFIGURATION_INFO_ = record
- Count: DWORD;
- Lines: PSCESVC_CONFIGURATION_INFO;
- end;
- {$EXTERNALSYM _SCESVC_CONFIGURATION_INFO_}
- SCESVC_CONFIGURATION_INFO = _SCESVC_CONFIGURATION_INFO_;
- {$EXTERNALSYM SCESVC_CONFIGURATION_INFO}
- TScesvcConfigurationInfo = SCESVC_CONFIGURATION_INFO;
- PScesvcConfigurationInfo = PSCESVC_CONFIGURATION_INFO;
-
- SCE_HANDLE = PVOID;
- {$EXTERNALSYM SCE_HANDLE}
- SCE_ENUMERATION_CONTEXT = ULONG;
- {$EXTERNALSYM SCE_ENUMERATION_CONTEXT}
- PSCE_ENUMERATION_CONTEXT = ^SCE_ENUMERATION_CONTEXT;
- {$EXTERNALSYM PSCE_ENUMERATION_CONTEXT}
-
- _SCESVC_INFO_TYPE = (
- SceSvcConfigurationInfo,
- SceSvcMergedPolicyInfo,
- SceSvcAnalysisInfo,
- SceSvcInternalUse); // !!!do not use this type!!!
- {$EXTERNALSYM _SCESVC_INFO_TYPE}
- SCESVC_INFO_TYPE = _SCESVC_INFO_TYPE;
- {$EXTERNALSYM SCESVC_INFO_TYPE}
- TScesvcInfoType = _SCESVC_INFO_TYPE;
-
-const
- SCE_ROOT_PATH = 'Software\Microsoft\Windows NT\CurrentVersion\SeCEdit';
- {$EXTERNALSYM SCE_ROOT_PATH}
-
- SCE_ROOT_SERVICE_PATH = SCE_ROOT_PATH + '\SvcEngs';
- {$EXTERNALSYM SCE_ROOT_SERVICE_PATH}
-
-type
- SCESVC_HANDLE = PVOID;
- {$EXTERNALSYM SCESVC_HANDLE}
-
- PSCESVC_HANDLE = ^SCESVC_HANDLE;
- {$NODEFINE PSCESVC_HANDLE}
-
- PSCESVC_ANALYSIS_LINE = ^SCESVC_ANALYSIS_LINE;
- {$EXTERNALSYM PSCESVC_ANALYSIS_LINE}
- _SCESVC_ANALYSIS_LINE_ = record
- Key: LPTSTR;
- Value: PBYTE;
- ValueLen: DWORD; // number of bytes
- end;
- {$EXTERNALSYM _SCESVC_ANALYSIS_LINE_}
- SCESVC_ANALYSIS_LINE = _SCESVC_ANALYSIS_LINE_;
- {$EXTERNALSYM SCESVC_ANALYSIS_LINE}
- TScesvcAnalysisLine = SCESVC_ANALYSIS_LINE;
- PScesvcAnalysisLine = PSCESVC_ANALYSIS_LINE;
-
- PSCESVC_ANALYSIS_INFO = ^SCESVC_ANALYSIS_INFO;
- {$EXTERNALSYM PSCESVC_ANALYSIS_INFO}
- _SCESVC_ANALYSIS_INFO_ = record
- Count: DWORD;
- Lines: PSCESVC_ANALYSIS_LINE;
- end;
- {$EXTERNALSYM _SCESVC_ANALYSIS_INFO_}
- SCESVC_ANALYSIS_INFO = _SCESVC_ANALYSIS_INFO_;
- {$EXTERNALSYM SCESVC_ANALYSIS_INFO}
- TScesvcAnalysisInfo = SCESVC_ANALYSIS_INFO;
- PScesvcAnalysisInfo = PSCESVC_ANALYSIS_INFO;
-
-const
- SCESVC_ENUMERATION_MAX = 100;
- {$EXTERNALSYM SCESVC_ENUMERATION_MAX}
-
-type
- PFSCE_QUERY_INFO = function(sceHandle: SCE_HANDLE; sceType: SCESVC_INFO_TYPE;
- lpPrefix: LPTSTR; bExact: BOOL; ppvInfo: PPVOID;
- var psceEnumHandle: SCE_ENUMERATION_CONTEXT): SCESTATUS; stdcall;
- {$EXTERNALSYM PFSCE_QUERY_INFO}
-
- PFSCE_SET_INFO = function(sceHandle: SCE_HANDLE; sceType: SCESVC_INFO_TYPE;
- lpPrefix: LPTSTR; bExact: BOOL; pvInfo: PVOID): SCESTATUS; stdcall;
- {$EXTERNALSYM PFSCE_SET_INFO}
-
- PFSCE_FREE_INFO = function(pvServiceInfo: PVOID): SCESTATUS; stdcall;
- {$EXTERNALSYM PFSCE_FREE_INFO}
-
-const
- SCE_LOG_LEVEL_ALWAYS = 0;
- {$EXTERNALSYM SCE_LOG_LEVEL_ALWAYS}
- SCE_LOG_LEVEL_ERROR = 1;
- {$EXTERNALSYM SCE_LOG_LEVEL_ERROR}
- SCE_LOG_LEVEL_DETAIL = 2;
- {$EXTERNALSYM SCE_LOG_LEVEL_DETAIL}
- SCE_LOG_LEVEL_DEBUG = 3;
- {$EXTERNALSYM SCE_LOG_LEVEL_DEBUG}
-
-type
- PFSCE_LOG_INFO = function(ErrLevel: Integer; Win32rc: DWORD; pErrFmt: LPTSTR {...}): SCESTATUS; stdcall;
- {$EXTERNALSYM PFSCE_LOG_INFO}
-
- PSCESVC_CALLBACK_INFO = ^SCESVC_CALLBACK_INFO;
- {$EXTERNALSYM PSCESVC_CALLBACK_INFO}
- _SCESVC_CALLBACK_INFO_ = record
- sceHandle: SCE_HANDLE;
- pfQueryInfo: PFSCE_QUERY_INFO;
- pfSetInfo: PFSCE_SET_INFO;
- pfFreeInfo: PFSCE_FREE_INFO;
- pfLogInfo: PFSCE_LOG_INFO;
- end;
- {$EXTERNALSYM _SCESVC_CALLBACK_INFO_}
- SCESVC_CALLBACK_INFO = _SCESVC_CALLBACK_INFO_;
- {$EXTERNALSYM SCESVC_CALLBACK_INFO}
- TScesvcCallbackInfo = SCESVC_CALLBACK_INFO;
- PScesvcCallbackInfo = PSCESVC_CALLBACK_INFO;
-
- PF_ConfigAnalyzeService = function(pSceCbInfo: PSCESVC_CALLBACK_INFO): SCESTATUS; stdcall;
- {$EXTERNALSYM PF_ConfigAnalyzeService}
-
- PF_UpdateService = function(pSceCbInfo: PSCESVC_CALLBACK_INFO;
- ServiceInfo: PSCESVC_CONFIGURATION_INFO): SCESTATUS; stdcall;
- {$EXTERNALSYM PF_UpdateService}
-
-//
-// headers for extension snap-ins
-// only define this for NT5
-//
-
-const
- struuidNodetypeSceTemplateServices = '{24a7f717-1f0c-11d1-affb-00c04fb984f9}';
- {$EXTERNALSYM struuidNodetypeSceTemplateServices}
- lstruuidNodetypeSceTemplateServices = '{24a7f717-1f0c-11d1-affb-00c04fb984f9}';
- {$EXTERNALSYM lstruuidNodetypeSceTemplateServices}
- cNodetypeSceTemplateServices: GUID = (
- D1:$24a7f717; D2:$1f0c; D3:$11d1; D4:($af, $fb, $0, $c0, $4f, $b9, $84, $f9));
- {$EXTERNALSYM cNodetypeSceTemplateServices}
- struuidNodetypeSceAnalysisServices = '{678050c7-1ff8-11d1-affb-00c04fb984f9}';
- {$EXTERNALSYM struuidNodetypeSceAnalysisServices}
- lstruuidNodetypeSceAnalysisServices = '{678050c7-1ff8-11d1-affb-00c04fb984f9}';
- {$EXTERNALSYM lstruuidNodetypeSceAnalysisServices}
- cNodetypeSceAnalysisServices: GUID = (
- D1:$678050c7; D2:$1ff8; D3:$11d1; D4:($af, $fb, $0, $c0, $4f, $b9, $84, $f9));
- {$EXTERNALSYM cNodetypeSceAnalysisServices}
- struuidNodetypeSceEventLog = '{2ce06698-4bf3-11d1-8c30-00c04fb984f9}';
- {$EXTERNALSYM struuidNodetypeSceEventLog}
- lstruuidNodetypeSceEventLog = '{2ce06698-4bf3-11d1-8c30-00c04fb984f9}';
- {$EXTERNALSYM lstruuidNodetypeSceEventLog}
- cNodetypeSceEventLog: GUID = (
- D1:$2ce06698; D2:$4bf3; D3:$11d1; D4:($8c, $30, $0, $c0, $4f, $b9, $84, $f9));
- {$EXTERNALSYM cNodetypeSceEventLog}
-
-type
- LPSCESVC_CONFIGURATION_INFO = ^PSCESVC_CONFIGURATION_INFO;
- {$EXTERNALSYM LPSCESVC_CONFIGURATION_INFO}
- LPSCESVC_ANALYSIS_INFO = ^PSCESVC_ANALYSIS_INFO;
- {$EXTERNALSYM LPSCESVC_ANALYSIS_INFO}
-
-const
- CCF_SCESVC_ATTACHMENT = 'CCF_SCESVC_ATTACHMENT';
- {$EXTERNALSYM CCF_SCESVC_ATTACHMENT}
- CCF_SCESVC_ATTACHMENT_DATA = 'CCF_SCESVC_ATTACHMENT_DATA';
- {$EXTERNALSYM CCF_SCESVC_ATTACHMENT_DATA}
-
-//
-// implemented by service attachment
-//
-
-const
- IID_ISceSvcAttachmentPersistInfo: GUID = (
- D1:$6d90e0d0; D2:$200d; D3:$11d1; D4:($af, $fb, $0, $c0, $4f, $b9, $84, $f9));
- {$EXTERNALSYM IID_ISceSvcAttachmentPersistInfo}
-
- SID_ISceSvcAttachmentPersistInfo = '{6d90e0d0-200d-11d1-affb-00c04fb984f9}';
-
-type
- ISceSvcAttachmentPersistInfo = interface (IUnknown)
- [SID_ISceSvcAttachmentPersistInfo]
- function Save(lpTemplateName: LPTSTR; scesvcHandle: PSCESVC_HANDLE;
- ppvData: PPVOID; pbOverwriteAll: PBOOL): HRESULT; stdcall;
- function IsDirty(lpTemplateName: LPTSTR): HRESULT; stdcall;
- function FreeBuffer(pvData: PVOID): HRESULT; stdcall;
- end;
- {$EXTERNALSYM ISceSvcAttachmentPersistInfo}
-
- LPSCESVCATTACHMENTPERSISTINFO = ISceSvcAttachmentPersistInfo;
- {$EXTERNALSYM LPSCESVCATTACHMENTPERSISTINFO}
-
-//
-// implemented by SecEdit
-//
-
-const
- IID_ISceSvcAttachmentData: GUID = (
- D1:$17c35fde; D2:$200d; D3:$11d1; D4:($af, $fb, $0, $c0, $4f, $b9, $84, $f9));
- {$EXTERNALSYM IID_ISceSvcAttachmentData}
-
- SID_ISceSvcAttachmentData = '{17c35fde-200d-11d1-affb-00c04fb984f9}';
-
-type
- ISceSvcAttachmentData = interface (IUnknown)
- [SID_ISceSvcAttachmentData]
- function GetData(scesvcHandle: SCESVC_HANDLE; sceType: SCESVC_INFO_TYPE;
- ppvData: PPVOID; psceEnumHandle: PSCE_ENUMERATION_CONTEXT): HRESULT; stdcall;
- function Initialize(lpServiceName, lpTemplateName: LPCTSTR;
- lpSceSvcPersistInfo: LPSCESVCATTACHMENTPERSISTINFO;
- pscesvcHandle: PSCESVC_HANDLE): HRESULT; stdcall;
- function FreeBuffer(pvData: PVOID): HRESULT; stdcall;
- function CloseHandle(scesvcHandle: SCESVC_HANDLE): HRESULT; stdcall;
- end;
- {$EXTERNALSYM ISceSvcAttachmentData}
-
- LPSCESVCATTACHMENTDATA = ISceSvcAttachmentData;
- {$EXTERNALSYM LPSCESVCATTACHMENTDATA}
-
-implementation
-
-end.
+{******************************************************************************}
+{ }
+{ Security Service Attachements API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: scesvc.h, released June 2000. The original Pascal }
+{ code is: SceSvc.pas, released December 2000. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwascesvc.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaSceSvc;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "scesvc.h"'}
+{$HPPEMIT ''}
+{$HPPEMIT 'typedef SCESVC_HANDLE *PSCESVC_HANDLE'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaWinType;
+
+type
+ SCESTATUS = DWORD;
+ {$EXTERNALSYM SCESTATUS}
+
+const
+ SCESTATUS_SUCCESS = 0;
+ {$EXTERNALSYM SCESTATUS_SUCCESS}
+ SCESTATUS_INVALID_PARAMETER = 1;
+ {$EXTERNALSYM SCESTATUS_INVALID_PARAMETER}
+ SCESTATUS_RECORD_NOT_FOUND = 2;
+ {$EXTERNALSYM SCESTATUS_RECORD_NOT_FOUND}
+ SCESTATUS_INVALID_DATA = 3;
+ {$EXTERNALSYM SCESTATUS_INVALID_DATA}
+ SCESTATUS_OBJECT_EXIST = 4;
+ {$EXTERNALSYM SCESTATUS_OBJECT_EXIST}
+ SCESTATUS_BUFFER_TOO_SMALL = 5;
+ {$EXTERNALSYM SCESTATUS_BUFFER_TOO_SMALL}
+ SCESTATUS_PROFILE_NOT_FOUND = 6;
+ {$EXTERNALSYM SCESTATUS_PROFILE_NOT_FOUND}
+ SCESTATUS_BAD_FORMAT = 7;
+ {$EXTERNALSYM SCESTATUS_BAD_FORMAT}
+ SCESTATUS_NOT_ENOUGH_RESOURCE = 8;
+ {$EXTERNALSYM SCESTATUS_NOT_ENOUGH_RESOURCE}
+ SCESTATUS_ACCESS_DENIED = 9;
+ {$EXTERNALSYM SCESTATUS_ACCESS_DENIED}
+ SCESTATUS_CANT_DELETE = 10;
+ {$EXTERNALSYM SCESTATUS_CANT_DELETE}
+ SCESTATUS_PREFIX_OVERFLOW = 11;
+ {$EXTERNALSYM SCESTATUS_PREFIX_OVERFLOW}
+ SCESTATUS_OTHER_ERROR = 12;
+ {$EXTERNALSYM SCESTATUS_OTHER_ERROR}
+ SCESTATUS_ALREADY_RUNNING = 13;
+ {$EXTERNALSYM SCESTATUS_ALREADY_RUNNING}
+ SCESTATUS_SERVICE_NOT_SUPPORT = 14;
+ {$EXTERNALSYM SCESTATUS_SERVICE_NOT_SUPPORT}
+ SCESTATUS_MOD_NOT_FOUND = 15;
+ {$EXTERNALSYM SCESTATUS_MOD_NOT_FOUND}
+ SCESTATUS_EXCEPTION_IN_SERVER = 16;
+ {$EXTERNALSYM SCESTATUS_EXCEPTION_IN_SERVER}
+ SCESTATUS_NO_TEMPLATE_GIVEN = 17;
+ {$EXTERNALSYM SCESTATUS_NO_TEMPLATE_GIVEN}
+ SCESTATUS_NO_MAPPING = 18;
+ {$EXTERNALSYM SCESTATUS_NO_MAPPING}
+ SCESTATUS_TRUST_FAIL = 19;
+ {$EXTERNALSYM SCESTATUS_TRUST_FAIL}
+
+type
+ PSCESVC_CONFIGURATION_LINE = ^SCESVC_CONFIGURATION_LINE;
+ {$EXTERNALSYM PSCESVC_CONFIGURATION_LINE}
+ _SCESVC_CONFIGURATION_LINE_ = record
+ Key: LPTSTR;
+ Value: LPTSTR;
+ ValueLen: DWORD; // number of bytes
+ end;
+ {$EXTERNALSYM _SCESVC_CONFIGURATION_LINE_}
+ SCESVC_CONFIGURATION_LINE = _SCESVC_CONFIGURATION_LINE_;
+ {$EXTERNALSYM SCESVC_CONFIGURATION_LINE}
+ TScesvcConfigurationLine = SCESVC_CONFIGURATION_LINE;
+ PScesvcConfigurationLine = PSCESVC_CONFIGURATION_LINE;
+
+ PSCESVC_CONFIGURATION_INFO = ^SCESVC_CONFIGURATION_INFO;
+ {$EXTERNALSYM PSCESVC_CONFIGURATION_INFO}
+ _SCESVC_CONFIGURATION_INFO_ = record
+ Count: DWORD;
+ Lines: PSCESVC_CONFIGURATION_INFO;
+ end;
+ {$EXTERNALSYM _SCESVC_CONFIGURATION_INFO_}
+ SCESVC_CONFIGURATION_INFO = _SCESVC_CONFIGURATION_INFO_;
+ {$EXTERNALSYM SCESVC_CONFIGURATION_INFO}
+ TScesvcConfigurationInfo = SCESVC_CONFIGURATION_INFO;
+ PScesvcConfigurationInfo = PSCESVC_CONFIGURATION_INFO;
+
+ SCE_HANDLE = PVOID;
+ {$EXTERNALSYM SCE_HANDLE}
+ SCE_ENUMERATION_CONTEXT = ULONG;
+ {$EXTERNALSYM SCE_ENUMERATION_CONTEXT}
+ PSCE_ENUMERATION_CONTEXT = ^SCE_ENUMERATION_CONTEXT;
+ {$EXTERNALSYM PSCE_ENUMERATION_CONTEXT}
+
+ _SCESVC_INFO_TYPE = (
+ SceSvcConfigurationInfo,
+ SceSvcMergedPolicyInfo,
+ SceSvcAnalysisInfo,
+ SceSvcInternalUse); // !!!do not use this type!!!
+ {$EXTERNALSYM _SCESVC_INFO_TYPE}
+ SCESVC_INFO_TYPE = _SCESVC_INFO_TYPE;
+ {$EXTERNALSYM SCESVC_INFO_TYPE}
+ TScesvcInfoType = _SCESVC_INFO_TYPE;
+
+const
+ SCE_ROOT_PATH = 'Software\Microsoft\Windows NT\CurrentVersion\SeCEdit';
+ {$EXTERNALSYM SCE_ROOT_PATH}
+
+ SCE_ROOT_SERVICE_PATH = SCE_ROOT_PATH + '\SvcEngs';
+ {$EXTERNALSYM SCE_ROOT_SERVICE_PATH}
+
+type
+ SCESVC_HANDLE = PVOID;
+ {$EXTERNALSYM SCESVC_HANDLE}
+
+ PSCESVC_HANDLE = ^SCESVC_HANDLE;
+ {$NODEFINE PSCESVC_HANDLE}
+
+ PSCESVC_ANALYSIS_LINE = ^SCESVC_ANALYSIS_LINE;
+ {$EXTERNALSYM PSCESVC_ANALYSIS_LINE}
+ _SCESVC_ANALYSIS_LINE_ = record
+ Key: LPTSTR;
+ Value: PBYTE;
+ ValueLen: DWORD; // number of bytes
+ end;
+ {$EXTERNALSYM _SCESVC_ANALYSIS_LINE_}
+ SCESVC_ANALYSIS_LINE = _SCESVC_ANALYSIS_LINE_;
+ {$EXTERNALSYM SCESVC_ANALYSIS_LINE}
+ TScesvcAnalysisLine = SCESVC_ANALYSIS_LINE;
+ PScesvcAnalysisLine = PSCESVC_ANALYSIS_LINE;
+
+ PSCESVC_ANALYSIS_INFO = ^SCESVC_ANALYSIS_INFO;
+ {$EXTERNALSYM PSCESVC_ANALYSIS_INFO}
+ _SCESVC_ANALYSIS_INFO_ = record
+ Count: DWORD;
+ Lines: PSCESVC_ANALYSIS_LINE;
+ end;
+ {$EXTERNALSYM _SCESVC_ANALYSIS_INFO_}
+ SCESVC_ANALYSIS_INFO = _SCESVC_ANALYSIS_INFO_;
+ {$EXTERNALSYM SCESVC_ANALYSIS_INFO}
+ TScesvcAnalysisInfo = SCESVC_ANALYSIS_INFO;
+ PScesvcAnalysisInfo = PSCESVC_ANALYSIS_INFO;
+
+const
+ SCESVC_ENUMERATION_MAX = 100;
+ {$EXTERNALSYM SCESVC_ENUMERATION_MAX}
+
+type
+ PFSCE_QUERY_INFO = function(sceHandle: SCE_HANDLE; sceType: SCESVC_INFO_TYPE;
+ lpPrefix: LPTSTR; bExact: BOOL; ppvInfo: PPVOID;
+ var psceEnumHandle: SCE_ENUMERATION_CONTEXT): SCESTATUS; stdcall;
+ {$EXTERNALSYM PFSCE_QUERY_INFO}
+
+ PFSCE_SET_INFO = function(sceHandle: SCE_HANDLE; sceType: SCESVC_INFO_TYPE;
+ lpPrefix: LPTSTR; bExact: BOOL; pvInfo: PVOID): SCESTATUS; stdcall;
+ {$EXTERNALSYM PFSCE_SET_INFO}
+
+ PFSCE_FREE_INFO = function(pvServiceInfo: PVOID): SCESTATUS; stdcall;
+ {$EXTERNALSYM PFSCE_FREE_INFO}
+
+const
+ SCE_LOG_LEVEL_ALWAYS = 0;
+ {$EXTERNALSYM SCE_LOG_LEVEL_ALWAYS}
+ SCE_LOG_LEVEL_ERROR = 1;
+ {$EXTERNALSYM SCE_LOG_LEVEL_ERROR}
+ SCE_LOG_LEVEL_DETAIL = 2;
+ {$EXTERNALSYM SCE_LOG_LEVEL_DETAIL}
+ SCE_LOG_LEVEL_DEBUG = 3;
+ {$EXTERNALSYM SCE_LOG_LEVEL_DEBUG}
+
+type
+ PFSCE_LOG_INFO = function(ErrLevel: Integer; Win32rc: DWORD; pErrFmt: LPTSTR {...}): SCESTATUS; stdcall;
+ {$EXTERNALSYM PFSCE_LOG_INFO}
+
+ PSCESVC_CALLBACK_INFO = ^SCESVC_CALLBACK_INFO;
+ {$EXTERNALSYM PSCESVC_CALLBACK_INFO}
+ _SCESVC_CALLBACK_INFO_ = record
+ sceHandle: SCE_HANDLE;
+ pfQueryInfo: PFSCE_QUERY_INFO;
+ pfSetInfo: PFSCE_SET_INFO;
+ pfFreeInfo: PFSCE_FREE_INFO;
+ pfLogInfo: PFSCE_LOG_INFO;
+ end;
+ {$EXTERNALSYM _SCESVC_CALLBACK_INFO_}
+ SCESVC_CALLBACK_INFO = _SCESVC_CALLBACK_INFO_;
+ {$EXTERNALSYM SCESVC_CALLBACK_INFO}
+ TScesvcCallbackInfo = SCESVC_CALLBACK_INFO;
+ PScesvcCallbackInfo = PSCESVC_CALLBACK_INFO;
+
+ PF_ConfigAnalyzeService = function(pSceCbInfo: PSCESVC_CALLBACK_INFO): SCESTATUS; stdcall;
+ {$EXTERNALSYM PF_ConfigAnalyzeService}
+
+ PF_UpdateService = function(pSceCbInfo: PSCESVC_CALLBACK_INFO;
+ ServiceInfo: PSCESVC_CONFIGURATION_INFO): SCESTATUS; stdcall;
+ {$EXTERNALSYM PF_UpdateService}
+
+//
+// headers for extension snap-ins
+// only define this for NT5
+//
+
+const
+ struuidNodetypeSceTemplateServices = '{24a7f717-1f0c-11d1-affb-00c04fb984f9}';
+ {$EXTERNALSYM struuidNodetypeSceTemplateServices}
+ lstruuidNodetypeSceTemplateServices = '{24a7f717-1f0c-11d1-affb-00c04fb984f9}';
+ {$EXTERNALSYM lstruuidNodetypeSceTemplateServices}
+ cNodetypeSceTemplateServices: GUID = (
+ D1:$24a7f717; D2:$1f0c; D3:$11d1; D4:($af, $fb, $0, $c0, $4f, $b9, $84, $f9));
+ {$EXTERNALSYM cNodetypeSceTemplateServices}
+ struuidNodetypeSceAnalysisServices = '{678050c7-1ff8-11d1-affb-00c04fb984f9}';
+ {$EXTERNALSYM struuidNodetypeSceAnalysisServices}
+ lstruuidNodetypeSceAnalysisServices = '{678050c7-1ff8-11d1-affb-00c04fb984f9}';
+ {$EXTERNALSYM lstruuidNodetypeSceAnalysisServices}
+ cNodetypeSceAnalysisServices: GUID = (
+ D1:$678050c7; D2:$1ff8; D3:$11d1; D4:($af, $fb, $0, $c0, $4f, $b9, $84, $f9));
+ {$EXTERNALSYM cNodetypeSceAnalysisServices}
+ struuidNodetypeSceEventLog = '{2ce06698-4bf3-11d1-8c30-00c04fb984f9}';
+ {$EXTERNALSYM struuidNodetypeSceEventLog}
+ lstruuidNodetypeSceEventLog = '{2ce06698-4bf3-11d1-8c30-00c04fb984f9}';
+ {$EXTERNALSYM lstruuidNodetypeSceEventLog}
+ cNodetypeSceEventLog: GUID = (
+ D1:$2ce06698; D2:$4bf3; D3:$11d1; D4:($8c, $30, $0, $c0, $4f, $b9, $84, $f9));
+ {$EXTERNALSYM cNodetypeSceEventLog}
+
+type
+ LPSCESVC_CONFIGURATION_INFO = ^PSCESVC_CONFIGURATION_INFO;
+ {$EXTERNALSYM LPSCESVC_CONFIGURATION_INFO}
+ LPSCESVC_ANALYSIS_INFO = ^PSCESVC_ANALYSIS_INFO;
+ {$EXTERNALSYM LPSCESVC_ANALYSIS_INFO}
+
+const
+ CCF_SCESVC_ATTACHMENT = 'CCF_SCESVC_ATTACHMENT';
+ {$EXTERNALSYM CCF_SCESVC_ATTACHMENT}
+ CCF_SCESVC_ATTACHMENT_DATA = 'CCF_SCESVC_ATTACHMENT_DATA';
+ {$EXTERNALSYM CCF_SCESVC_ATTACHMENT_DATA}
+
+//
+// implemented by service attachment
+//
+
+const
+ IID_ISceSvcAttachmentPersistInfo: GUID = (
+ D1:$6d90e0d0; D2:$200d; D3:$11d1; D4:($af, $fb, $0, $c0, $4f, $b9, $84, $f9));
+ {$EXTERNALSYM IID_ISceSvcAttachmentPersistInfo}
+
+ SID_ISceSvcAttachmentPersistInfo = '{6d90e0d0-200d-11d1-affb-00c04fb984f9}';
+
+type
+ ISceSvcAttachmentPersistInfo = interface (IUnknown)
+ [SID_ISceSvcAttachmentPersistInfo]
+ function Save(lpTemplateName: LPTSTR; scesvcHandle: PSCESVC_HANDLE;
+ ppvData: PPVOID; pbOverwriteAll: PBOOL): HRESULT; stdcall;
+ function IsDirty(lpTemplateName: LPTSTR): HRESULT; stdcall;
+ function FreeBuffer(pvData: PVOID): HRESULT; stdcall;
+ end;
+ {$EXTERNALSYM ISceSvcAttachmentPersistInfo}
+
+ LPSCESVCATTACHMENTPERSISTINFO = ISceSvcAttachmentPersistInfo;
+ {$EXTERNALSYM LPSCESVCATTACHMENTPERSISTINFO}
+
+//
+// implemented by SecEdit
+//
+
+const
+ IID_ISceSvcAttachmentData: GUID = (
+ D1:$17c35fde; D2:$200d; D3:$11d1; D4:($af, $fb, $0, $c0, $4f, $b9, $84, $f9));
+ {$EXTERNALSYM IID_ISceSvcAttachmentData}
+
+ SID_ISceSvcAttachmentData = '{17c35fde-200d-11d1-affb-00c04fb984f9}';
+
+type
+ ISceSvcAttachmentData = interface (IUnknown)
+ [SID_ISceSvcAttachmentData]
+ function GetData(scesvcHandle: SCESVC_HANDLE; sceType: SCESVC_INFO_TYPE;
+ ppvData: PPVOID; psceEnumHandle: PSCE_ENUMERATION_CONTEXT): HRESULT; stdcall;
+ function Initialize(lpServiceName, lpTemplateName: LPCTSTR;
+ lpSceSvcPersistInfo: LPSCESVCATTACHMENTPERSISTINFO;
+ pscesvcHandle: PSCESVC_HANDLE): HRESULT; stdcall;
+ function FreeBuffer(pvData: PVOID): HRESULT; stdcall;
+ function CloseHandle(scesvcHandle: SCESVC_HANDLE): HRESULT; stdcall;
+ end;
+ {$EXTERNALSYM ISceSvcAttachmentData}
+
+ LPSCESVCATTACHMENTDATA = ISceSvcAttachmentData;
+ {$EXTERNALSYM LPSCESVCATTACHMENTDATA}
+
+implementation
+
+end.
diff --git a/packages/extra/winunits/jwaschedule.pas b/packages/extra/winunits/jwaschedule.pas
index 06bbf81b00..78dc9d20ce 100644
--- a/packages/extra/winunits/jwaschedule.pas
+++ b/packages/extra/winunits/jwaschedule.pas
@@ -1,133 +1,133 @@
-{******************************************************************************}
-{ }
-{ Scheduler API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: schedule.h, released June 2000. The original Pascal }
-{ code is: Schedule.pas, released December 2000. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwaschedule.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaSchedule;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "schedule.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaWinType;
-
-//
-// The DS and FRS use the same structure to represent different schedules.
-// The DS uses a 15-minute polling schedule. FRS uses a 60-minute
-// start/stop schedule. Hence, the schedule for the system volume is
-// a special case because we only have the DS schedule to work from.
-// We will work around this problem by treating the 15
-// -minute polling schedule as a 60-minute start/stop schedule.
-// Replication is enabled for any hour that has any of the four
-// 15-minute bits set.
-//
-// When the ReplicationSchedule is not present the default is
-// "always replicate."
-//
-
-//
-// Only the interval schedule is currently implemented. Others are ignored.
-//
-
-const
- SCHEDULE_INTERVAL = 0; // schedule as understood by NT5
- {$EXTERNALSYM SCHEDULE_INTERVAL}
- SCHEDULE_BANDWIDTH = 1; // bandwidth as understood by NT5
- {$EXTERNALSYM SCHEDULE_BANDWIDTH}
- SCHEDULE_PRIORITY = 2; // priority as understood by NT5
- {$EXTERNALSYM SCHEDULE_PRIORITY}
-
-//
-// Schedule Header
-//
-// Each schedule blob begins with n array of schedule headers that
-// specify the number and type of schedules contained in the blob.
-//
-
-type
- PSCHEDULE_HEADER = ^SCHEDULE_HEADER;
- {$EXTERNALSYM PSCHEDULE_HEADER}
- _SCHEDULE_HEADER = record
- Type_: ULONG; // one of the SCHEDULE_ ordinals
- Offset: ULONG; // offset from start of schedule structure
- end;
- {$EXTERNALSYM _SCHEDULE_HEADER}
- SCHEDULE_HEADER = _SCHEDULE_HEADER;
- {$EXTERNALSYM SCHEDULE_HEADER}
- TScheduleHeader = SCHEDULE_HEADER;
- PScheduleHeader = PSCHEDULE_HEADER;
-
-//
-// Schedule
-//
-
- PSCHEDULE = ^_SCHEDULE;
- {$EXTERNALSYM PSCHEDULE}
- _SCHEDULE = record
- Size: ULONG; // inclusive size in bytes
- Bandwidth: ULONG;
- NumberOfSchedules: ULONG;
- Schedules: array [0..0] of SCHEDULE_HEADER;
- end;
- {$EXTERNALSYM _SCHEDULE}
- //SCHEDULE = _SCHEDULE;
- //{$EXTERNALSYM SCHEDULE}
- TSchedule = _SCHEDULE;
-
-// The above structure is followed by the Data buffer and the
-// SCHEDULE_HEADER contains offsets to refer to the appropriate
-// parts in the data buffer.
-
-const
- SCHEDULE_DATA_ENTRIES = 7 * 24; // 7 days X 24 hours
- {$EXTERNALSYM SCHEDULE_DATA_ENTRIES}
-
-implementation
-
-end.
+{******************************************************************************}
+{ }
+{ Scheduler API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: schedule.h, released June 2000. The original Pascal }
+{ code is: Schedule.pas, released December 2000. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwaschedule.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaSchedule;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "schedule.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaWinType;
+
+//
+// The DS and FRS use the same structure to represent different schedules.
+// The DS uses a 15-minute polling schedule. FRS uses a 60-minute
+// start/stop schedule. Hence, the schedule for the system volume is
+// a special case because we only have the DS schedule to work from.
+// We will work around this problem by treating the 15
+// -minute polling schedule as a 60-minute start/stop schedule.
+// Replication is enabled for any hour that has any of the four
+// 15-minute bits set.
+//
+// When the ReplicationSchedule is not present the default is
+// "always replicate."
+//
+
+//
+// Only the interval schedule is currently implemented. Others are ignored.
+//
+
+const
+ SCHEDULE_INTERVAL = 0; // schedule as understood by NT5
+ {$EXTERNALSYM SCHEDULE_INTERVAL}
+ SCHEDULE_BANDWIDTH = 1; // bandwidth as understood by NT5
+ {$EXTERNALSYM SCHEDULE_BANDWIDTH}
+ SCHEDULE_PRIORITY = 2; // priority as understood by NT5
+ {$EXTERNALSYM SCHEDULE_PRIORITY}
+
+//
+// Schedule Header
+//
+// Each schedule blob begins with n array of schedule headers that
+// specify the number and type of schedules contained in the blob.
+//
+
+type
+ PSCHEDULE_HEADER = ^SCHEDULE_HEADER;
+ {$EXTERNALSYM PSCHEDULE_HEADER}
+ _SCHEDULE_HEADER = record
+ Type_: ULONG; // one of the SCHEDULE_ ordinals
+ Offset: ULONG; // offset from start of schedule structure
+ end;
+ {$EXTERNALSYM _SCHEDULE_HEADER}
+ SCHEDULE_HEADER = _SCHEDULE_HEADER;
+ {$EXTERNALSYM SCHEDULE_HEADER}
+ TScheduleHeader = SCHEDULE_HEADER;
+ PScheduleHeader = PSCHEDULE_HEADER;
+
+//
+// Schedule
+//
+
+ PSCHEDULE = ^_SCHEDULE;
+ {$EXTERNALSYM PSCHEDULE}
+ _SCHEDULE = record
+ Size: ULONG; // inclusive size in bytes
+ Bandwidth: ULONG;
+ NumberOfSchedules: ULONG;
+ Schedules: array [0..0] of SCHEDULE_HEADER;
+ end;
+ {$EXTERNALSYM _SCHEDULE}
+ //SCHEDULE = _SCHEDULE;
+ //{$EXTERNALSYM SCHEDULE}
+ TSchedule = _SCHEDULE;
+
+// The above structure is followed by the Data buffer and the
+// SCHEDULE_HEADER contains offsets to refer to the appropriate
+// parts in the data buffer.
+
+const
+ SCHEDULE_DATA_ENTRIES = 7 * 24; // 7 days X 24 hours
+ {$EXTERNALSYM SCHEDULE_DATA_ENTRIES}
+
+implementation
+
+end.
diff --git a/packages/extra/winunits/jwaschemadef.pas b/packages/extra/winunits/jwaschemadef.pas
index cb1c872e88..5863da2a50 100644
--- a/packages/extra/winunits/jwaschemadef.pas
+++ b/packages/extra/winunits/jwaschemadef.pas
@@ -1,87 +1,87 @@
-{******************************************************************************}
-{ }
-{ Visual Styles (Themes) API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: schemadef.h, released June 2001. The original Pascal }
-{ code is: SchemaDef.pas, released July 2001. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwaschemadef.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaSchemaDef;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "schemadef.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaWinType;
-
-const
- SCHEMADEF_VERSION = 1; // defines the exported func(s) implemented
- {$EXTERNALSYM SCHEMADEF_VERSION}
-
-type
- TMPROPINFO = record
- pszName: LPCWSTR;
- sEnumVal: Short;
- bPrimVal: Byte;
- end;
- {$EXTERNALSYM TMPROPINFO}
- TTmPropInfo = TMPROPINFO;
- PTmPropInfo = ^TMPROPINFO;
-
- TMSCHEMAINFO = record
- dwSize: DWORD; // size of this struct
- iSchemaDefVersion: Integer; // version number from this file
- iThemeMgrVersion: Integer; // version number from "thschema.h"
- iPropCount: Integer; // # of entries in prop table
- pPropTable: PTmPropInfo; // ptr to prop table
- end;
- {$EXTERNALSYM TMSCHEMAINFO}
- TTmSchemaInfo = TMSCHEMAINFO;
- PTmSchemaInfo = ^TMSCHEMAINFO;
-
-implementation
-
-end.
+{******************************************************************************}
+{ }
+{ Visual Styles (Themes) API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: schemadef.h, released June 2001. The original Pascal }
+{ code is: SchemaDef.pas, released July 2001. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwaschemadef.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaSchemaDef;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "schemadef.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaWinType;
+
+const
+ SCHEMADEF_VERSION = 1; // defines the exported func(s) implemented
+ {$EXTERNALSYM SCHEMADEF_VERSION}
+
+type
+ TMPROPINFO = record
+ pszName: LPCWSTR;
+ sEnumVal: Short;
+ bPrimVal: Byte;
+ end;
+ {$EXTERNALSYM TMPROPINFO}
+ TTmPropInfo = TMPROPINFO;
+ PTmPropInfo = ^TMPROPINFO;
+
+ TMSCHEMAINFO = record
+ dwSize: DWORD; // size of this struct
+ iSchemaDefVersion: Integer; // version number from this file
+ iThemeMgrVersion: Integer; // version number from "thschema.h"
+ iPropCount: Integer; // # of entries in prop table
+ pPropTable: PTmPropInfo; // ptr to prop table
+ end;
+ {$EXTERNALSYM TMSCHEMAINFO}
+ TTmSchemaInfo = TMSCHEMAINFO;
+ PTmSchemaInfo = ^TMSCHEMAINFO;
+
+implementation
+
+end.
diff --git a/packages/extra/winunits/jwasddl.pas b/packages/extra/winunits/jwasddl.pas
index 6fb722e9c3..6802acc772 100644
--- a/packages/extra/winunits/jwasddl.pas
+++ b/packages/extra/winunits/jwasddl.pas
@@ -1,537 +1,537 @@
-{******************************************************************************}
-{ }
-{ Security Descriptor Definition Language API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: sddl.h, released June 2000. The original Pascal }
-{ code is: Sddl.pas, released December 2000. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwasddl.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaSddl;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "sddl.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaWinNT, JwaWinType;
-
-//
-// SDDL Version information
-//
-
-const
- SDDL_REVISION_1 = 1;
- {$EXTERNALSYM SDDL_REVISION_1}
- SDDL_REVISION = SDDL_REVISION_1;
- {$EXTERNALSYM SDDL_REVISION}
-
-//
-// SDDL Component tags
-//
-
- SDDL_OWNER = 'O'; // Owner tag
- {$EXTERNALSYM SDDL_OWNER}
- SDDL_GROUP = 'G'; // Group tag
- {$EXTERNALSYM SDDL_GROUP}
- SDDL_DACL = 'D'; // DACL tag
- {$EXTERNALSYM SDDL_DACL}
- SDDL_SACL = 'S'; // SACL tag
- {$EXTERNALSYM SDDL_SACL}
-
-//
-// SDDL Security descriptor controls
-//
-
- SDDL_PROTECTED = 'P'; // DACL or SACL Protected
- {$EXTERNALSYM SDDL_PROTECTED}
- SDDL_AUTO_INHERIT_REQ = 'AR'; // Auto inherit request
- {$EXTERNALSYM SDDL_AUTO_INHERIT_REQ}
- SDDL_AUTO_INHERITED = 'AI'; // DACL/SACL are auto inherited
- {$EXTERNALSYM SDDL_AUTO_INHERITED}
-
-//
-// SDDL Ace types
-//
-
- SDDL_ACCESS_ALLOWED = 'A'; // Access allowed
- {$EXTERNALSYM SDDL_ACCESS_ALLOWED}
- SDDL_ACCESS_DENIED = 'D'; // Access denied
- {$EXTERNALSYM SDDL_ACCESS_DENIED}
- SDDL_OBJECT_ACCESS_ALLOWED = 'OA'; // Object access allowed
- {$EXTERNALSYM SDDL_OBJECT_ACCESS_ALLOWED}
- SDDL_OBJECT_ACCESS_DENIED = 'OD'; // Object access denied
- {$EXTERNALSYM SDDL_OBJECT_ACCESS_DENIED}
- SDDL_AUDIT = 'AU'; // Audit
- {$EXTERNALSYM SDDL_AUDIT}
- SDDL_ALARM = 'AL'; // Alarm
- {$EXTERNALSYM SDDL_ALARM}
- SDDL_OBJECT_AUDIT = 'OU'; // Object audit
- {$EXTERNALSYM SDDL_OBJECT_AUDIT}
- SDDL_OBJECT_ALARM = 'OL'; // Object alarm
- {$EXTERNALSYM SDDL_OBJECT_ALARM}
-
-//
-// SDDL Ace flags
-//
-
- SDDL_CONTAINER_INHERIT = 'CI'; // Container inherit
- {$EXTERNALSYM SDDL_CONTAINER_INHERIT}
- SDDL_OBJECT_INHERIT = 'OI'; // Object inherit
- {$EXTERNALSYM SDDL_OBJECT_INHERIT}
- SDDL_NO_PROPAGATE = 'NP'; // Inherit no propagate
- {$EXTERNALSYM SDDL_NO_PROPAGATE}
- SDDL_INHERIT_ONLY = 'IO'; // Inherit only
- {$EXTERNALSYM SDDL_INHERIT_ONLY}
- SDDL_INHERITED = 'ID'; // Inherited
- {$EXTERNALSYM SDDL_INHERITED}
- SDDL_AUDIT_SUCCESS = 'SA'; // Audit success
- {$EXTERNALSYM SDDL_AUDIT_SUCCESS}
- SDDL_AUDIT_FAILURE = 'FA'; // Audit failure
- {$EXTERNALSYM SDDL_AUDIT_FAILURE}
-
-//
-// SDDL Rights
-//
-
- SDDL_READ_PROPERTY = 'RP';
- {$EXTERNALSYM SDDL_READ_PROPERTY}
- SDDL_WRITE_PROPERTY = 'WP';
- {$EXTERNALSYM SDDL_WRITE_PROPERTY}
- SDDL_CREATE_CHILD = 'CC';
- {$EXTERNALSYM SDDL_CREATE_CHILD}
- SDDL_DELETE_CHILD = 'DC';
- {$EXTERNALSYM SDDL_DELETE_CHILD}
- SDDL_LIST_CHILDREN = 'LC';
- {$EXTERNALSYM SDDL_LIST_CHILDREN}
- SDDL_SELF_WRITE = 'SW';
- {$EXTERNALSYM SDDL_SELF_WRITE}
- SDDL_LIST_OBJECT = 'LO';
- {$EXTERNALSYM SDDL_LIST_OBJECT}
- SDDL_DELETE_TREE = 'DT';
- {$EXTERNALSYM SDDL_DELETE_TREE}
- SDDL_CONTROL_ACCESS = 'CR';
- {$EXTERNALSYM SDDL_CONTROL_ACCESS}
- SDDL_READ_CONTROL = 'RC';
- {$EXTERNALSYM SDDL_READ_CONTROL}
- SDDL_WRITE_DAC = 'WD';
- {$EXTERNALSYM SDDL_WRITE_DAC}
- SDDL_WRITE_OWNER = 'WO';
- {$EXTERNALSYM SDDL_WRITE_OWNER}
- SDDL_STANDARD_DELETE = 'SD';
- {$EXTERNALSYM SDDL_STANDARD_DELETE}
- SDDL_GENERIC_ALL = 'GA';
- {$EXTERNALSYM SDDL_GENERIC_ALL}
- SDDL_GENERIC_READ = 'GR';
- {$EXTERNALSYM SDDL_GENERIC_READ}
- SDDL_GENERIC_WRITE = 'GW';
- {$EXTERNALSYM SDDL_GENERIC_WRITE}
- SDDL_GENERIC_EXECUTE = 'GX';
- {$EXTERNALSYM SDDL_GENERIC_EXECUTE}
- SDDL_FILE_ALL = 'FA';
- {$EXTERNALSYM SDDL_FILE_ALL}
- SDDL_FILE_READ = 'FR';
- {$EXTERNALSYM SDDL_FILE_READ}
- SDDL_FILE_WRITE = 'FW';
- {$EXTERNALSYM SDDL_FILE_WRITE}
- SDDL_FILE_EXECUTE = 'FX';
- {$EXTERNALSYM SDDL_FILE_EXECUTE}
- SDDL_KEY_ALL = 'KA';
- {$EXTERNALSYM SDDL_KEY_ALL}
- SDDL_KEY_READ = 'KR';
- {$EXTERNALSYM SDDL_KEY_READ}
- SDDL_KEY_WRITE = 'KW';
- {$EXTERNALSYM SDDL_KEY_WRITE}
- SDDL_KEY_EXECUTE = 'KX';
- {$EXTERNALSYM SDDL_KEY_EXECUTE}
-
-//
-// SDDL User alias max size
-// - currently, upto two supported eg. "DA"
-// - modify this if more WCHARs need to be there in future e.g. "DAX"
-//
-
- SDDL_ALIAS_SIZE = 2;
- {$EXTERNALSYM SDDL_ALIAS_SIZE}
-
-//
-// SDDL User aliases
-//
-
- SDDL_DOMAIN_ADMINISTRATORS = 'DA'; // Domain admins
- {$EXTERNALSYM SDDL_DOMAIN_ADMINISTRATORS}
- SDDL_DOMAIN_GUESTS = 'DG'; // Domain guests
- {$EXTERNALSYM SDDL_DOMAIN_GUESTS}
- SDDL_DOMAIN_USERS = 'DU'; // Domain users
- {$EXTERNALSYM SDDL_DOMAIN_USERS}
- SDDL_ENTERPRISE_DOMAIN_CONTROLLERS = 'ED'; // Enterprise domain controllers
- {$EXTERNALSYM SDDL_ENTERPRISE_DOMAIN_CONTROLLERS}
- SDDL_DOMAIN_DOMAIN_CONTROLLERS = 'DD'; // Domain domain controllers
- {$EXTERNALSYM SDDL_DOMAIN_DOMAIN_CONTROLLERS}
- SDDL_DOMAIN_COMPUTERS = 'DC'; // Domain computers
- {$EXTERNALSYM SDDL_DOMAIN_COMPUTERS}
- SDDL_BUILTIN_ADMINISTRATORS = 'BA'; // Builtin (local ) administrators
- {$EXTERNALSYM SDDL_BUILTIN_ADMINISTRATORS}
- SDDL_BUILTIN_GUESTS = 'BG'; // Builtin (local ) guests
- {$EXTERNALSYM SDDL_BUILTIN_GUESTS}
- SDDL_BUILTIN_USERS = 'BU'; // Builtin (local ) users
- {$EXTERNALSYM SDDL_BUILTIN_USERS}
- SDDL_LOCAL_ADMIN = 'LA'; // Local administrator account
- {$EXTERNALSYM SDDL_LOCAL_ADMIN}
- SDDL_LOCAL_GUEST = 'LG'; // Local group account
- {$EXTERNALSYM SDDL_LOCAL_GUEST}
- SDDL_ACCOUNT_OPERATORS = 'AO'; // Account operators
- {$EXTERNALSYM SDDL_ACCOUNT_OPERATORS}
- SDDL_BACKUP_OPERATORS = 'BO'; // Backup operators
- {$EXTERNALSYM SDDL_BACKUP_OPERATORS}
- SDDL_PRINTER_OPERATORS = 'PO'; // Printer operators
- {$EXTERNALSYM SDDL_PRINTER_OPERATORS}
- SDDL_SERVER_OPERATORS = 'SO'; // Server operators
- {$EXTERNALSYM SDDL_SERVER_OPERATORS}
- SDDL_AUTHENTICATED_USERS = 'AU'; // Authenticated users
- {$EXTERNALSYM SDDL_AUTHENTICATED_USERS}
- SDDL_PERSONAL_SELF = 'PS'; // Personal self
- {$EXTERNALSYM SDDL_PERSONAL_SELF}
- SDDL_CREATOR_OWNER = 'CO'; // Creator owner
- {$EXTERNALSYM SDDL_CREATOR_OWNER}
- SDDL_CREATOR_GROUP = 'CG'; // Creator group
- {$EXTERNALSYM SDDL_CREATOR_GROUP}
- SDDL_LOCAL_SYSTEM = 'SY'; // Local system
- {$EXTERNALSYM SDDL_LOCAL_SYSTEM}
- SDDL_POWER_USERS = 'PU'; // Power users
- {$EXTERNALSYM SDDL_POWER_USERS}
- SDDL_EVERYONE = 'WD'; // Everyone ( World )
- {$EXTERNALSYM SDDL_EVERYONE}
- SDDL_REPLICATOR = 'RE'; // Replicator
- {$EXTERNALSYM SDDL_REPLICATOR}
- SDDL_INTERACTIVE = 'IU'; // Interactive logon user
- {$EXTERNALSYM SDDL_INTERACTIVE}
- SDDL_NETWORK = 'NU'; // Nework logon user
- {$EXTERNALSYM SDDL_NETWORK}
- SDDL_SERVICE = 'SU'; // Service logon user
- {$EXTERNALSYM SDDL_SERVICE}
- SDDL_RESTRICTED_CODE = 'RC'; // Restricted code
- {$EXTERNALSYM SDDL_RESTRICTED_CODE}
- SDDL_ANONYMOUS = 'AN'; // Anonymous Logon
- {$EXTERNALSYM SDDL_ANONYMOUS}
- SDDL_SCHEMA_ADMINISTRATORS = 'SA'; // Schema Administrators
- {$EXTERNALSYM SDDL_SCHEMA_ADMINISTRATORS}
- SDDL_CERT_SERV_ADMINISTRATORS = 'CA'; // Certificate Server Administrators
- {$EXTERNALSYM SDDL_CERT_SERV_ADMINISTRATORS}
- SDDL_RAS_SERVERS = 'RS'; // RAS servers group
- {$EXTERNALSYM SDDL_RAS_SERVERS}
- SDDL_ENTERPRISE_ADMINS = 'EA'; // Enterprise administrators
- {$EXTERNALSYM SDDL_ENTERPRISE_ADMINS}
- SDDL_GROUP_POLICY_ADMINS = 'PA'; // Group Policy administrators
- {$EXTERNALSYM SDDL_GROUP_POLICY_ADMINS}
- SDDL_ALIAS_PREW2KCOMPACC = 'RU'; // alias to allow previous windows 2000
- {$EXTERNALSYM SDDL_ALIAS_PREW2KCOMPACC}
- SDDL_LOCAL_SERVICE = 'LS'; // Local service account (for services)
- {$EXTERNALSYM SDDL_LOCAL_SERVICE}
- SDDL_NETWORK_SERVICE = 'NS'; // Network service account (for services)
- {$EXTERNALSYM SDDL_NETWORK_SERVICE}
- SDDL_REMOTE_DESKTOP = 'RD'; // Remote desktop users (for terminal server)
- {$EXTERNALSYM SDDL_REMOTE_DESKTOP}
- SDDL_NETWORK_CONFIGURATION_OPS = 'NO'; // Network configuration operators ( to manage configuration of networking features)
- {$EXTERNALSYM SDDL_NETWORK_CONFIGURATION_OPS}
- SDDL_PERFMON_USERS = 'MU'; // Performance Monitor Users
- {$EXTERNALSYM SDDL_PERFMON_USERS}
- SDDL_PERFLOG_USERS = 'LU'; // Performance Log Users
- {$EXTERNALSYM SDDL_PERFLOG_USERS}
-
-//
-// SDDL Seperators - character version
-//
-
- SDDL_SEPERATORC = ';';
- {$EXTERNALSYM SDDL_SEPERATORC}
- SDDL_DELIMINATORC = ':';
- {$EXTERNALSYM SDDL_DELIMINATORC}
- SDDL_ACE_BEGINC = '(';
- {$EXTERNALSYM SDDL_ACE_BEGINC}
- SDDL_ACE_ENDC = ')';
- {$EXTERNALSYM SDDL_ACE_ENDC}
-
-//
-// SDDL Seperators - string version
-//
-
- SDDL_SEPERATOR = ';';
- {$EXTERNALSYM SDDL_SEPERATOR}
- SDDL_DELIMINATOR = ':';
- {$EXTERNALSYM SDDL_DELIMINATOR}
- SDDL_ACE_BEGIN = '(';
- {$EXTERNALSYM SDDL_ACE_BEGIN}
- SDDL_ACE_END = ')';
- {$EXTERNALSYM SDDL_ACE_END}
-
-function ConvertSidToStringSidA(Sid: PSID; var StringSid: LPSTR): BOOL; stdcall;
-{$EXTERNALSYM ConvertSidToStringSidA}
-function ConvertSidToStringSidW(Sid: PSID; var StringSid: LPWSTR): BOOL; stdcall;
-{$EXTERNALSYM ConvertSidToStringSidW}
-function ConvertSidToStringSid(Sid: PSID; var StringSid: LPTSTR): BOOL; stdcall;
-{$EXTERNALSYM ConvertSidToStringSid}
-
-function ConvertStringSidToSidA(StringSid: LPCSTR; var Sid: PSID): BOOL; stdcall;
-{$EXTERNALSYM ConvertStringSidToSidA}
-function ConvertStringSidToSidW(StringSid: LPCWSTR; var Sid: PSID): BOOL; stdcall;
-{$EXTERNALSYM ConvertStringSidToSidW}
-function ConvertStringSidToSid(StringSid: LPCTSTR; var Sid: PSID): BOOL; stdcall;
-{$EXTERNALSYM ConvertStringSidToSid}
-
-function ConvertStringSecurityDescriptorToSecurityDescriptorA(StringSecurityDescriptor: LPCSTR;
- StringSDRevision: DWORD; var SecurityDescriptor: PSECURITY_DESCRIPTOR;
- SecurityDescriptorSize: PULONG): BOOL; stdcall;
-{$EXTERNALSYM ConvertStringSecurityDescriptorToSecurityDescriptorA}
-function ConvertStringSecurityDescriptorToSecurityDescriptorW(StringSecurityDescriptor: LPCWSTR;
- StringSDRevision: DWORD; var SecurityDescriptor: PSECURITY_DESCRIPTOR;
- SecurityDescriptorSize: PULONG): BOOL; stdcall;
-{$EXTERNALSYM ConvertStringSecurityDescriptorToSecurityDescriptorW}
-function ConvertStringSecurityDescriptorToSecurityDescriptor(StringSecurityDescriptor: LPCTSTR;
- StringSDRevision: DWORD; var SecurityDescriptor: PSECURITY_DESCRIPTOR;
- SecurityDescriptorSize: PULONG): BOOL; stdcall;
-{$EXTERNALSYM ConvertStringSecurityDescriptorToSecurityDescriptor}
-
-function ConvertSecurityDescriptorToStringSecurityDescriptorA(
- SecurityDescriptor: PSECURITY_DESCRIPTOR; RequestedStringSDRevision: DWORD;
- SecurityInformation: SECURITY_INFORMATION; var StringSecurityDescriptor: LPSTR;
- StringSecurityDescriptorLen: PULONG): BOOL; stdcall;
-{$EXTERNALSYM ConvertSecurityDescriptorToStringSecurityDescriptorA}
-function ConvertSecurityDescriptorToStringSecurityDescriptorW(
- SecurityDescriptor: PSECURITY_DESCRIPTOR; RequestedStringSDRevision: DWORD;
- SecurityInformation: SECURITY_INFORMATION; var StringSecurityDescriptor: LPWSTR;
- StringSecurityDescriptorLen: PULONG): BOOL; stdcall;
-{$EXTERNALSYM ConvertSecurityDescriptorToStringSecurityDescriptorW}
-function ConvertSecurityDescriptorToStringSecurityDescriptor(
- SecurityDescriptor: PSECURITY_DESCRIPTOR; RequestedStringSDRevision: DWORD;
- SecurityInformation: SECURITY_INFORMATION; var StringSecurityDescriptor: LPTSTR;
- StringSecurityDescriptorLen: PULONG): BOOL; stdcall;
-{$EXTERNALSYM ConvertSecurityDescriptorToStringSecurityDescriptor}
-
-implementation
-
-const
- advapi32 = 'advapi32.dll';
- {$IFDEF UNICODE}
- AWSuffix = 'W';
- {$ELSE}
- AWSuffix = 'A';
- {$ENDIF UNICODE}
-
-{$IFDEF DYNAMIC_LINK}
-
-var
- _ConvertSidToStringSidA: Pointer;
-
-function ConvertSidToStringSidA;
-begin
- GetProcedureAddress(_ConvertSidToStringSidA, advapi32, 'ConvertSidToStringSidA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ConvertSidToStringSidA]
- end;
-end;
-
-var
- _ConvertSidToStringSidW: Pointer;
-
-function ConvertSidToStringSidW;
-begin
- GetProcedureAddress(_ConvertSidToStringSidW, advapi32, 'ConvertSidToStringSidW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ConvertSidToStringSidW]
- end;
-end;
-
-var
- _ConvertSidToStringSid: Pointer;
-
-function ConvertSidToStringSid;
-begin
- GetProcedureAddress(_ConvertSidToStringSid, advapi32, 'ConvertSidToStringSid' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ConvertSidToStringSid]
- end;
-end;
-
-var
- _ConvertStringSidToSidA: Pointer;
-
-function ConvertStringSidToSidA;
-begin
- GetProcedureAddress(_ConvertStringSidToSidA, advapi32, 'ConvertStringSidToSidA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ConvertStringSidToSidA]
- end;
-end;
-
-var
- _ConvertStringSidToSidW: Pointer;
-
-function ConvertStringSidToSidW;
-begin
- GetProcedureAddress(_ConvertStringSidToSidW, advapi32, 'ConvertStringSidToSidW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ConvertStringSidToSidW]
- end;
-end;
-
-var
- _ConvertStringSidToSid: Pointer;
-
-function ConvertStringSidToSid;
-begin
- GetProcedureAddress(_ConvertStringSidToSid, advapi32, 'ConvertStringSidToSid' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ConvertStringSidToSid]
- end;
-end;
-
-var
- _ConvStrSecDescrToSecDescrA: Pointer;
-
-function ConvertStringSecurityDescriptorToSecurityDescriptorA;
-begin
- GetProcedureAddress(_ConvStrSecDescrToSecDescrA, advapi32, 'ConvertStringSecurityDescriptorToSecurityDescriptorA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ConvStrSecDescrToSecDescrA]
- end;
-end;
-
-var
- _ConvStrSecDescrToSecDescrW: Pointer;
-
-function ConvertStringSecurityDescriptorToSecurityDescriptorW;
-begin
- GetProcedureAddress(_ConvStrSecDescrToSecDescrW, advapi32, 'ConvertStringSecurityDescriptorToSecurityDescriptorW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ConvStrSecDescrToSecDescrW]
- end;
-end;
-
-var
- _ConvStrSecDescrToSecDescr: Pointer;
-
-function ConvertStringSecurityDescriptorToSecurityDescriptor;
-begin
- GetProcedureAddress(_ConvStrSecDescrToSecDescr, advapi32, 'ConvertStringSecurityDescriptorToSecurityDescriptor' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ConvStrSecDescrToSecDescr]
- end;
-end;
-
-var
- _ConvSecDescrToStrSecDescrA: Pointer;
-
-function ConvertSecurityDescriptorToStringSecurityDescriptorA;
-begin
- GetProcedureAddress(_ConvSecDescrToStrSecDescrA, advapi32, 'ConvertSecurityDescriptorToStringSecurityDescriptorA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ConvSecDescrToStrSecDescrA]
- end;
-end;
-
-var
- _ConvSecDescrToStrSecDescrW: Pointer;
-
-function ConvertSecurityDescriptorToStringSecurityDescriptorW;
-begin
- GetProcedureAddress(_ConvSecDescrToStrSecDescrW, advapi32, 'ConvertSecurityDescriptorToStringSecurityDescriptorW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ConvSecDescrToStrSecDescrW]
- end;
-end;
-
-var
- _ConvSecDescrToStrSecDescr: Pointer;
-
-function ConvertSecurityDescriptorToStringSecurityDescriptor;
-begin
- GetProcedureAddress(_ConvSecDescrToStrSecDescr, advapi32, 'ConvertSecurityDescriptorToStringSecurityDescriptor' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ConvSecDescrToStrSecDescr]
- end;
-end;
-
-{$ELSE}
-
-function ConvertSidToStringSidA; external advapi32 name 'ConvertSidToStringSidA';
-function ConvertSidToStringSidW; external advapi32 name 'ConvertSidToStringSidW';
-function ConvertSidToStringSid; external advapi32 name 'ConvertSidToStringSid' + AWSuffix;
-function ConvertStringSidToSidA; external advapi32 name 'ConvertStringSidToSidA';
-function ConvertStringSidToSidW; external advapi32 name 'ConvertStringSidToSidW';
-function ConvertStringSidToSid; external advapi32 name 'ConvertStringSidToSid' + AWSuffix;
-function ConvertStringSecurityDescriptorToSecurityDescriptorA; external advapi32 name 'ConvertStringSecurityDescriptorToSecurityDescriptorA';
-function ConvertStringSecurityDescriptorToSecurityDescriptorW; external advapi32 name 'ConvertStringSecurityDescriptorToSecurityDescriptorW';
-function ConvertStringSecurityDescriptorToSecurityDescriptor; external advapi32 name 'ConvertStringSecurityDescriptorToSecurityDescriptor' + AWSuffix;
-function ConvertSecurityDescriptorToStringSecurityDescriptorA; external advapi32 name 'ConvertSecurityDescriptorToStringSecurityDescriptorA';
-function ConvertSecurityDescriptorToStringSecurityDescriptorW; external advapi32 name 'ConvertSecurityDescriptorToStringSecurityDescriptorW';
-function ConvertSecurityDescriptorToStringSecurityDescriptor; external advapi32 name 'ConvertSecurityDescriptorToStringSecurityDescriptor' + AWSuffix;
-
-{$ENDIF DYNAMIC_LINK}
-
-end.
+{******************************************************************************}
+{ }
+{ Security Descriptor Definition Language API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: sddl.h, released June 2000. The original Pascal }
+{ code is: Sddl.pas, released December 2000. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwasddl.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaSddl;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "sddl.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaWinNT, JwaWinType;
+
+//
+// SDDL Version information
+//
+
+const
+ SDDL_REVISION_1 = 1;
+ {$EXTERNALSYM SDDL_REVISION_1}
+ SDDL_REVISION = SDDL_REVISION_1;
+ {$EXTERNALSYM SDDL_REVISION}
+
+//
+// SDDL Component tags
+//
+
+ SDDL_OWNER = 'O'; // Owner tag
+ {$EXTERNALSYM SDDL_OWNER}
+ SDDL_GROUP = 'G'; // Group tag
+ {$EXTERNALSYM SDDL_GROUP}
+ SDDL_DACL = 'D'; // DACL tag
+ {$EXTERNALSYM SDDL_DACL}
+ SDDL_SACL = 'S'; // SACL tag
+ {$EXTERNALSYM SDDL_SACL}
+
+//
+// SDDL Security descriptor controls
+//
+
+ SDDL_PROTECTED = 'P'; // DACL or SACL Protected
+ {$EXTERNALSYM SDDL_PROTECTED}
+ SDDL_AUTO_INHERIT_REQ = 'AR'; // Auto inherit request
+ {$EXTERNALSYM SDDL_AUTO_INHERIT_REQ}
+ SDDL_AUTO_INHERITED = 'AI'; // DACL/SACL are auto inherited
+ {$EXTERNALSYM SDDL_AUTO_INHERITED}
+
+//
+// SDDL Ace types
+//
+
+ SDDL_ACCESS_ALLOWED = 'A'; // Access allowed
+ {$EXTERNALSYM SDDL_ACCESS_ALLOWED}
+ SDDL_ACCESS_DENIED = 'D'; // Access denied
+ {$EXTERNALSYM SDDL_ACCESS_DENIED}
+ SDDL_OBJECT_ACCESS_ALLOWED = 'OA'; // Object access allowed
+ {$EXTERNALSYM SDDL_OBJECT_ACCESS_ALLOWED}
+ SDDL_OBJECT_ACCESS_DENIED = 'OD'; // Object access denied
+ {$EXTERNALSYM SDDL_OBJECT_ACCESS_DENIED}
+ SDDL_AUDIT = 'AU'; // Audit
+ {$EXTERNALSYM SDDL_AUDIT}
+ SDDL_ALARM = 'AL'; // Alarm
+ {$EXTERNALSYM SDDL_ALARM}
+ SDDL_OBJECT_AUDIT = 'OU'; // Object audit
+ {$EXTERNALSYM SDDL_OBJECT_AUDIT}
+ SDDL_OBJECT_ALARM = 'OL'; // Object alarm
+ {$EXTERNALSYM SDDL_OBJECT_ALARM}
+
+//
+// SDDL Ace flags
+//
+
+ SDDL_CONTAINER_INHERIT = 'CI'; // Container inherit
+ {$EXTERNALSYM SDDL_CONTAINER_INHERIT}
+ SDDL_OBJECT_INHERIT = 'OI'; // Object inherit
+ {$EXTERNALSYM SDDL_OBJECT_INHERIT}
+ SDDL_NO_PROPAGATE = 'NP'; // Inherit no propagate
+ {$EXTERNALSYM SDDL_NO_PROPAGATE}
+ SDDL_INHERIT_ONLY = 'IO'; // Inherit only
+ {$EXTERNALSYM SDDL_INHERIT_ONLY}
+ SDDL_INHERITED = 'ID'; // Inherited
+ {$EXTERNALSYM SDDL_INHERITED}
+ SDDL_AUDIT_SUCCESS = 'SA'; // Audit success
+ {$EXTERNALSYM SDDL_AUDIT_SUCCESS}
+ SDDL_AUDIT_FAILURE = 'FA'; // Audit failure
+ {$EXTERNALSYM SDDL_AUDIT_FAILURE}
+
+//
+// SDDL Rights
+//
+
+ SDDL_READ_PROPERTY = 'RP';
+ {$EXTERNALSYM SDDL_READ_PROPERTY}
+ SDDL_WRITE_PROPERTY = 'WP';
+ {$EXTERNALSYM SDDL_WRITE_PROPERTY}
+ SDDL_CREATE_CHILD = 'CC';
+ {$EXTERNALSYM SDDL_CREATE_CHILD}
+ SDDL_DELETE_CHILD = 'DC';
+ {$EXTERNALSYM SDDL_DELETE_CHILD}
+ SDDL_LIST_CHILDREN = 'LC';
+ {$EXTERNALSYM SDDL_LIST_CHILDREN}
+ SDDL_SELF_WRITE = 'SW';
+ {$EXTERNALSYM SDDL_SELF_WRITE}
+ SDDL_LIST_OBJECT = 'LO';
+ {$EXTERNALSYM SDDL_LIST_OBJECT}
+ SDDL_DELETE_TREE = 'DT';
+ {$EXTERNALSYM SDDL_DELETE_TREE}
+ SDDL_CONTROL_ACCESS = 'CR';
+ {$EXTERNALSYM SDDL_CONTROL_ACCESS}
+ SDDL_READ_CONTROL = 'RC';
+ {$EXTERNALSYM SDDL_READ_CONTROL}
+ SDDL_WRITE_DAC = 'WD';
+ {$EXTERNALSYM SDDL_WRITE_DAC}
+ SDDL_WRITE_OWNER = 'WO';
+ {$EXTERNALSYM SDDL_WRITE_OWNER}
+ SDDL_STANDARD_DELETE = 'SD';
+ {$EXTERNALSYM SDDL_STANDARD_DELETE}
+ SDDL_GENERIC_ALL = 'GA';
+ {$EXTERNALSYM SDDL_GENERIC_ALL}
+ SDDL_GENERIC_READ = 'GR';
+ {$EXTERNALSYM SDDL_GENERIC_READ}
+ SDDL_GENERIC_WRITE = 'GW';
+ {$EXTERNALSYM SDDL_GENERIC_WRITE}
+ SDDL_GENERIC_EXECUTE = 'GX';
+ {$EXTERNALSYM SDDL_GENERIC_EXECUTE}
+ SDDL_FILE_ALL = 'FA';
+ {$EXTERNALSYM SDDL_FILE_ALL}
+ SDDL_FILE_READ = 'FR';
+ {$EXTERNALSYM SDDL_FILE_READ}
+ SDDL_FILE_WRITE = 'FW';
+ {$EXTERNALSYM SDDL_FILE_WRITE}
+ SDDL_FILE_EXECUTE = 'FX';
+ {$EXTERNALSYM SDDL_FILE_EXECUTE}
+ SDDL_KEY_ALL = 'KA';
+ {$EXTERNALSYM SDDL_KEY_ALL}
+ SDDL_KEY_READ = 'KR';
+ {$EXTERNALSYM SDDL_KEY_READ}
+ SDDL_KEY_WRITE = 'KW';
+ {$EXTERNALSYM SDDL_KEY_WRITE}
+ SDDL_KEY_EXECUTE = 'KX';
+ {$EXTERNALSYM SDDL_KEY_EXECUTE}
+
+//
+// SDDL User alias max size
+// - currently, upto two supported eg. "DA"
+// - modify this if more WCHARs need to be there in future e.g. "DAX"
+//
+
+ SDDL_ALIAS_SIZE = 2;
+ {$EXTERNALSYM SDDL_ALIAS_SIZE}
+
+//
+// SDDL User aliases
+//
+
+ SDDL_DOMAIN_ADMINISTRATORS = 'DA'; // Domain admins
+ {$EXTERNALSYM SDDL_DOMAIN_ADMINISTRATORS}
+ SDDL_DOMAIN_GUESTS = 'DG'; // Domain guests
+ {$EXTERNALSYM SDDL_DOMAIN_GUESTS}
+ SDDL_DOMAIN_USERS = 'DU'; // Domain users
+ {$EXTERNALSYM SDDL_DOMAIN_USERS}
+ SDDL_ENTERPRISE_DOMAIN_CONTROLLERS = 'ED'; // Enterprise domain controllers
+ {$EXTERNALSYM SDDL_ENTERPRISE_DOMAIN_CONTROLLERS}
+ SDDL_DOMAIN_DOMAIN_CONTROLLERS = 'DD'; // Domain domain controllers
+ {$EXTERNALSYM SDDL_DOMAIN_DOMAIN_CONTROLLERS}
+ SDDL_DOMAIN_COMPUTERS = 'DC'; // Domain computers
+ {$EXTERNALSYM SDDL_DOMAIN_COMPUTERS}
+ SDDL_BUILTIN_ADMINISTRATORS = 'BA'; // Builtin (local ) administrators
+ {$EXTERNALSYM SDDL_BUILTIN_ADMINISTRATORS}
+ SDDL_BUILTIN_GUESTS = 'BG'; // Builtin (local ) guests
+ {$EXTERNALSYM SDDL_BUILTIN_GUESTS}
+ SDDL_BUILTIN_USERS = 'BU'; // Builtin (local ) users
+ {$EXTERNALSYM SDDL_BUILTIN_USERS}
+ SDDL_LOCAL_ADMIN = 'LA'; // Local administrator account
+ {$EXTERNALSYM SDDL_LOCAL_ADMIN}
+ SDDL_LOCAL_GUEST = 'LG'; // Local group account
+ {$EXTERNALSYM SDDL_LOCAL_GUEST}
+ SDDL_ACCOUNT_OPERATORS = 'AO'; // Account operators
+ {$EXTERNALSYM SDDL_ACCOUNT_OPERATORS}
+ SDDL_BACKUP_OPERATORS = 'BO'; // Backup operators
+ {$EXTERNALSYM SDDL_BACKUP_OPERATORS}
+ SDDL_PRINTER_OPERATORS = 'PO'; // Printer operators
+ {$EXTERNALSYM SDDL_PRINTER_OPERATORS}
+ SDDL_SERVER_OPERATORS = 'SO'; // Server operators
+ {$EXTERNALSYM SDDL_SERVER_OPERATORS}
+ SDDL_AUTHENTICATED_USERS = 'AU'; // Authenticated users
+ {$EXTERNALSYM SDDL_AUTHENTICATED_USERS}
+ SDDL_PERSONAL_SELF = 'PS'; // Personal self
+ {$EXTERNALSYM SDDL_PERSONAL_SELF}
+ SDDL_CREATOR_OWNER = 'CO'; // Creator owner
+ {$EXTERNALSYM SDDL_CREATOR_OWNER}
+ SDDL_CREATOR_GROUP = 'CG'; // Creator group
+ {$EXTERNALSYM SDDL_CREATOR_GROUP}
+ SDDL_LOCAL_SYSTEM = 'SY'; // Local system
+ {$EXTERNALSYM SDDL_LOCAL_SYSTEM}
+ SDDL_POWER_USERS = 'PU'; // Power users
+ {$EXTERNALSYM SDDL_POWER_USERS}
+ SDDL_EVERYONE = 'WD'; // Everyone ( World )
+ {$EXTERNALSYM SDDL_EVERYONE}
+ SDDL_REPLICATOR = 'RE'; // Replicator
+ {$EXTERNALSYM SDDL_REPLICATOR}
+ SDDL_INTERACTIVE = 'IU'; // Interactive logon user
+ {$EXTERNALSYM SDDL_INTERACTIVE}
+ SDDL_NETWORK = 'NU'; // Nework logon user
+ {$EXTERNALSYM SDDL_NETWORK}
+ SDDL_SERVICE = 'SU'; // Service logon user
+ {$EXTERNALSYM SDDL_SERVICE}
+ SDDL_RESTRICTED_CODE = 'RC'; // Restricted code
+ {$EXTERNALSYM SDDL_RESTRICTED_CODE}
+ SDDL_ANONYMOUS = 'AN'; // Anonymous Logon
+ {$EXTERNALSYM SDDL_ANONYMOUS}
+ SDDL_SCHEMA_ADMINISTRATORS = 'SA'; // Schema Administrators
+ {$EXTERNALSYM SDDL_SCHEMA_ADMINISTRATORS}
+ SDDL_CERT_SERV_ADMINISTRATORS = 'CA'; // Certificate Server Administrators
+ {$EXTERNALSYM SDDL_CERT_SERV_ADMINISTRATORS}
+ SDDL_RAS_SERVERS = 'RS'; // RAS servers group
+ {$EXTERNALSYM SDDL_RAS_SERVERS}
+ SDDL_ENTERPRISE_ADMINS = 'EA'; // Enterprise administrators
+ {$EXTERNALSYM SDDL_ENTERPRISE_ADMINS}
+ SDDL_GROUP_POLICY_ADMINS = 'PA'; // Group Policy administrators
+ {$EXTERNALSYM SDDL_GROUP_POLICY_ADMINS}
+ SDDL_ALIAS_PREW2KCOMPACC = 'RU'; // alias to allow previous windows 2000
+ {$EXTERNALSYM SDDL_ALIAS_PREW2KCOMPACC}
+ SDDL_LOCAL_SERVICE = 'LS'; // Local service account (for services)
+ {$EXTERNALSYM SDDL_LOCAL_SERVICE}
+ SDDL_NETWORK_SERVICE = 'NS'; // Network service account (for services)
+ {$EXTERNALSYM SDDL_NETWORK_SERVICE}
+ SDDL_REMOTE_DESKTOP = 'RD'; // Remote desktop users (for terminal server)
+ {$EXTERNALSYM SDDL_REMOTE_DESKTOP}
+ SDDL_NETWORK_CONFIGURATION_OPS = 'NO'; // Network configuration operators ( to manage configuration of networking features)
+ {$EXTERNALSYM SDDL_NETWORK_CONFIGURATION_OPS}
+ SDDL_PERFMON_USERS = 'MU'; // Performance Monitor Users
+ {$EXTERNALSYM SDDL_PERFMON_USERS}
+ SDDL_PERFLOG_USERS = 'LU'; // Performance Log Users
+ {$EXTERNALSYM SDDL_PERFLOG_USERS}
+
+//
+// SDDL Seperators - character version
+//
+
+ SDDL_SEPERATORC = ';';
+ {$EXTERNALSYM SDDL_SEPERATORC}
+ SDDL_DELIMINATORC = ':';
+ {$EXTERNALSYM SDDL_DELIMINATORC}
+ SDDL_ACE_BEGINC = '(';
+ {$EXTERNALSYM SDDL_ACE_BEGINC}
+ SDDL_ACE_ENDC = ')';
+ {$EXTERNALSYM SDDL_ACE_ENDC}
+
+//
+// SDDL Seperators - string version
+//
+
+ SDDL_SEPERATOR = ';';
+ {$EXTERNALSYM SDDL_SEPERATOR}
+ SDDL_DELIMINATOR = ':';
+ {$EXTERNALSYM SDDL_DELIMINATOR}
+ SDDL_ACE_BEGIN = '(';
+ {$EXTERNALSYM SDDL_ACE_BEGIN}
+ SDDL_ACE_END = ')';
+ {$EXTERNALSYM SDDL_ACE_END}
+
+function ConvertSidToStringSidA(Sid: PSID; var StringSid: LPSTR): BOOL; stdcall;
+{$EXTERNALSYM ConvertSidToStringSidA}
+function ConvertSidToStringSidW(Sid: PSID; var StringSid: LPWSTR): BOOL; stdcall;
+{$EXTERNALSYM ConvertSidToStringSidW}
+function ConvertSidToStringSid(Sid: PSID; var StringSid: LPTSTR): BOOL; stdcall;
+{$EXTERNALSYM ConvertSidToStringSid}
+
+function ConvertStringSidToSidA(StringSid: LPCSTR; var Sid: PSID): BOOL; stdcall;
+{$EXTERNALSYM ConvertStringSidToSidA}
+function ConvertStringSidToSidW(StringSid: LPCWSTR; var Sid: PSID): BOOL; stdcall;
+{$EXTERNALSYM ConvertStringSidToSidW}
+function ConvertStringSidToSid(StringSid: LPCTSTR; var Sid: PSID): BOOL; stdcall;
+{$EXTERNALSYM ConvertStringSidToSid}
+
+function ConvertStringSecurityDescriptorToSecurityDescriptorA(StringSecurityDescriptor: LPCSTR;
+ StringSDRevision: DWORD; var SecurityDescriptor: PSECURITY_DESCRIPTOR;
+ SecurityDescriptorSize: PULONG): BOOL; stdcall;
+{$EXTERNALSYM ConvertStringSecurityDescriptorToSecurityDescriptorA}
+function ConvertStringSecurityDescriptorToSecurityDescriptorW(StringSecurityDescriptor: LPCWSTR;
+ StringSDRevision: DWORD; var SecurityDescriptor: PSECURITY_DESCRIPTOR;
+ SecurityDescriptorSize: PULONG): BOOL; stdcall;
+{$EXTERNALSYM ConvertStringSecurityDescriptorToSecurityDescriptorW}
+function ConvertStringSecurityDescriptorToSecurityDescriptor(StringSecurityDescriptor: LPCTSTR;
+ StringSDRevision: DWORD; var SecurityDescriptor: PSECURITY_DESCRIPTOR;
+ SecurityDescriptorSize: PULONG): BOOL; stdcall;
+{$EXTERNALSYM ConvertStringSecurityDescriptorToSecurityDescriptor}
+
+function ConvertSecurityDescriptorToStringSecurityDescriptorA(
+ SecurityDescriptor: PSECURITY_DESCRIPTOR; RequestedStringSDRevision: DWORD;
+ SecurityInformation: SECURITY_INFORMATION; var StringSecurityDescriptor: LPSTR;
+ StringSecurityDescriptorLen: PULONG): BOOL; stdcall;
+{$EXTERNALSYM ConvertSecurityDescriptorToStringSecurityDescriptorA}
+function ConvertSecurityDescriptorToStringSecurityDescriptorW(
+ SecurityDescriptor: PSECURITY_DESCRIPTOR; RequestedStringSDRevision: DWORD;
+ SecurityInformation: SECURITY_INFORMATION; var StringSecurityDescriptor: LPWSTR;
+ StringSecurityDescriptorLen: PULONG): BOOL; stdcall;
+{$EXTERNALSYM ConvertSecurityDescriptorToStringSecurityDescriptorW}
+function ConvertSecurityDescriptorToStringSecurityDescriptor(
+ SecurityDescriptor: PSECURITY_DESCRIPTOR; RequestedStringSDRevision: DWORD;
+ SecurityInformation: SECURITY_INFORMATION; var StringSecurityDescriptor: LPTSTR;
+ StringSecurityDescriptorLen: PULONG): BOOL; stdcall;
+{$EXTERNALSYM ConvertSecurityDescriptorToStringSecurityDescriptor}
+
+implementation
+
+const
+ advapi32 = 'advapi32.dll';
+ {$IFDEF UNICODE}
+ AWSuffix = 'W';
+ {$ELSE}
+ AWSuffix = 'A';
+ {$ENDIF UNICODE}
+
+{$IFDEF DYNAMIC_LINK}
+
+var
+ _ConvertSidToStringSidA: Pointer;
+
+function ConvertSidToStringSidA;
+begin
+ GetProcedureAddress(_ConvertSidToStringSidA, advapi32, 'ConvertSidToStringSidA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ConvertSidToStringSidA]
+ end;
+end;
+
+var
+ _ConvertSidToStringSidW: Pointer;
+
+function ConvertSidToStringSidW;
+begin
+ GetProcedureAddress(_ConvertSidToStringSidW, advapi32, 'ConvertSidToStringSidW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ConvertSidToStringSidW]
+ end;
+end;
+
+var
+ _ConvertSidToStringSid: Pointer;
+
+function ConvertSidToStringSid;
+begin
+ GetProcedureAddress(_ConvertSidToStringSid, advapi32, 'ConvertSidToStringSid' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ConvertSidToStringSid]
+ end;
+end;
+
+var
+ _ConvertStringSidToSidA: Pointer;
+
+function ConvertStringSidToSidA;
+begin
+ GetProcedureAddress(_ConvertStringSidToSidA, advapi32, 'ConvertStringSidToSidA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ConvertStringSidToSidA]
+ end;
+end;
+
+var
+ _ConvertStringSidToSidW: Pointer;
+
+function ConvertStringSidToSidW;
+begin
+ GetProcedureAddress(_ConvertStringSidToSidW, advapi32, 'ConvertStringSidToSidW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ConvertStringSidToSidW]
+ end;
+end;
+
+var
+ _ConvertStringSidToSid: Pointer;
+
+function ConvertStringSidToSid;
+begin
+ GetProcedureAddress(_ConvertStringSidToSid, advapi32, 'ConvertStringSidToSid' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ConvertStringSidToSid]
+ end;
+end;
+
+var
+ _ConvStrSecDescrToSecDescrA: Pointer;
+
+function ConvertStringSecurityDescriptorToSecurityDescriptorA;
+begin
+ GetProcedureAddress(_ConvStrSecDescrToSecDescrA, advapi32, 'ConvertStringSecurityDescriptorToSecurityDescriptorA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ConvStrSecDescrToSecDescrA]
+ end;
+end;
+
+var
+ _ConvStrSecDescrToSecDescrW: Pointer;
+
+function ConvertStringSecurityDescriptorToSecurityDescriptorW;
+begin
+ GetProcedureAddress(_ConvStrSecDescrToSecDescrW, advapi32, 'ConvertStringSecurityDescriptorToSecurityDescriptorW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ConvStrSecDescrToSecDescrW]
+ end;
+end;
+
+var
+ _ConvStrSecDescrToSecDescr: Pointer;
+
+function ConvertStringSecurityDescriptorToSecurityDescriptor;
+begin
+ GetProcedureAddress(_ConvStrSecDescrToSecDescr, advapi32, 'ConvertStringSecurityDescriptorToSecurityDescriptor' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ConvStrSecDescrToSecDescr]
+ end;
+end;
+
+var
+ _ConvSecDescrToStrSecDescrA: Pointer;
+
+function ConvertSecurityDescriptorToStringSecurityDescriptorA;
+begin
+ GetProcedureAddress(_ConvSecDescrToStrSecDescrA, advapi32, 'ConvertSecurityDescriptorToStringSecurityDescriptorA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ConvSecDescrToStrSecDescrA]
+ end;
+end;
+
+var
+ _ConvSecDescrToStrSecDescrW: Pointer;
+
+function ConvertSecurityDescriptorToStringSecurityDescriptorW;
+begin
+ GetProcedureAddress(_ConvSecDescrToStrSecDescrW, advapi32, 'ConvertSecurityDescriptorToStringSecurityDescriptorW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ConvSecDescrToStrSecDescrW]
+ end;
+end;
+
+var
+ _ConvSecDescrToStrSecDescr: Pointer;
+
+function ConvertSecurityDescriptorToStringSecurityDescriptor;
+begin
+ GetProcedureAddress(_ConvSecDescrToStrSecDescr, advapi32, 'ConvertSecurityDescriptorToStringSecurityDescriptor' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ConvSecDescrToStrSecDescr]
+ end;
+end;
+
+{$ELSE}
+
+function ConvertSidToStringSidA; external advapi32 name 'ConvertSidToStringSidA';
+function ConvertSidToStringSidW; external advapi32 name 'ConvertSidToStringSidW';
+function ConvertSidToStringSid; external advapi32 name 'ConvertSidToStringSid' + AWSuffix;
+function ConvertStringSidToSidA; external advapi32 name 'ConvertStringSidToSidA';
+function ConvertStringSidToSidW; external advapi32 name 'ConvertStringSidToSidW';
+function ConvertStringSidToSid; external advapi32 name 'ConvertStringSidToSid' + AWSuffix;
+function ConvertStringSecurityDescriptorToSecurityDescriptorA; external advapi32 name 'ConvertStringSecurityDescriptorToSecurityDescriptorA';
+function ConvertStringSecurityDescriptorToSecurityDescriptorW; external advapi32 name 'ConvertStringSecurityDescriptorToSecurityDescriptorW';
+function ConvertStringSecurityDescriptorToSecurityDescriptor; external advapi32 name 'ConvertStringSecurityDescriptorToSecurityDescriptor' + AWSuffix;
+function ConvertSecurityDescriptorToStringSecurityDescriptorA; external advapi32 name 'ConvertSecurityDescriptorToStringSecurityDescriptorA';
+function ConvertSecurityDescriptorToStringSecurityDescriptorW; external advapi32 name 'ConvertSecurityDescriptorToStringSecurityDescriptorW';
+function ConvertSecurityDescriptorToStringSecurityDescriptor; external advapi32 name 'ConvertSecurityDescriptorToStringSecurityDescriptor' + AWSuffix;
+
+{$ENDIF DYNAMIC_LINK}
+
+end.
diff --git a/packages/extra/winunits/jwasecext.pas b/packages/extra/winunits/jwasecext.pas
index 39a1e463ed..ce5a206439 100644
--- a/packages/extra/winunits/jwasecext.pas
+++ b/packages/extra/winunits/jwasecext.pas
@@ -1,325 +1,325 @@
-{******************************************************************************}
-{ }
-{ SSPI Context Management API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: secext.h, released August 2001. The original Pascal }
-{ code is: SecExt.pas, released December 2000. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwasecext.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaSecExt;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "secext.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaSSPI, JwaWinType;
-
-//
-// Extended Name APIs for ADS
-//
-
-const
- // Examples for the following formats assume a fictitous company
- // which hooks into the global X.500 and DNS name spaces as follows.
- //
- // Enterprise root domain in DNS is
- //
- // widget.com
- //
- // Enterprise root domain in X.500 (RFC 1779 format) is
- //
- // O=Widget, C=US
- //
- // There exists the child domain
- //
- // engineering.widget.com
- //
- // equivalent to
- //
- // OU=Engineering, O=Widget, C=US
- //
- // There exists a container within the Engineering domain
- //
- // OU=Software, OU=Engineering, O=Widget, C=US
- //
- // There exists the user
- //
- // CN=John Doe, OU=Software, OU=Engineering, O=Widget, C=US
- //
- // And this user's downlevel (pre-ADS) user name is
- //
- // Engineering\JohnDoe
-
- // unknown name type
- NameUnknown = 0;
- {$EXTERNALSYM NameUnknown}
-
- // CN=John Doe, OU=Software, OU=Engineering, O=Widget, C=US
- NameFullyQualifiedDN = 1;
- {$EXTERNALSYM NameFullyQualifiedDN}
-
- // Engineering\JohnDoe
- NameSamCompatible = 2;
- {$EXTERNALSYM NameSamCompatible}
-
- // Probably "John Doe" but could be something else. I.e. The
- // display name is not necessarily the defining RDN.
- NameDisplay = 3;
- {$EXTERNALSYM NameDisplay}
-
- // String-ized GUID as returned by IIDFromString().
- // eg: {4fa050f0-f561-11cf-bdd9-00aa003a77b6}
- NameUniqueId = 6;
- {$EXTERNALSYM NameUniqueId}
-
- // engineering.widget.com/software/John Doe
- NameCanonical = 7;
- {$EXTERNALSYM NameCanonical}
-
- // johndoe@engineering.com
- NameUserPrincipal = 8;
- {$EXTERNALSYM NameUserPrincipal}
-
- // Same as NameCanonical except that rightmost '/' is
- // replaced with '\n' - even in domain-only case.
- // eg: engineering.widget.com/software\nJohn Doe
- NameCanonicalEx = 9;
- {$EXTERNALSYM NameCanonicalEx}
-
- // www/srv.engineering.com/engineering.com
- NameServicePrincipal = 10;
- {$EXTERNALSYM NameServicePrincipal}
-
- // DNS domain name + SAM username
- // eg: engineering.widget.com\JohnDoe
- NameDnsDomain = 12;
- {$EXTERNALSYM NameDnsDomain}
-
-type
- EXTENDED_NAME_FORMAT = DWORD;
- {$EXTERNALSYM EXTENDED_NAME_FORMAT}
- PEXTENDED_NAME_FORMAT = ^EXTENDED_NAME_FORMAT;
- {$EXTERNALSYM PEXTENDED_NAME_FORMAT}
- TExtendedNameFormat = EXTENDED_NAME_FORMAT;
- PExtendedNameFormat = PEXTENDED_NAME_FORMAT;
-
-function GetUserNameExA(NameFormat: EXTENDED_NAME_FORMAT; lpNameBuffer: LPSTR;
- var nSize: ULONG): ByteBool; stdcall;
-{$EXTERNALSYM GetUserNameExA}
-function GetUserNameExW(NameFormat: EXTENDED_NAME_FORMAT; lpNameBuffer: LPWSTR;
- var nSize: ULONG): ByteBool; stdcall;
-{$EXTERNALSYM GetUserNameExW}
-function GetUserNameEx(NameFormat: EXTENDED_NAME_FORMAT; lpNameBuffer: LPTSTR;
- var nSize: ULONG): ByteBool; stdcall;
-{$EXTERNALSYM GetUserNameEx}
-
-function GetComputerObjectNameA(NameFormat: EXTENDED_NAME_FORMAT;
- lpNameBuffer: LPSTR; var nSize: ULONG): ByteBool; stdcall;
-{$EXTERNALSYM GetComputerObjectNameA}
-function GetComputerObjectNameW(NameFormat: EXTENDED_NAME_FORMAT;
- lpNameBuffer: LPWSTR; var nSize: ULONG): ByteBool; stdcall;
-{$EXTERNALSYM GetComputerObjectNameW}
-function GetComputerObjectName(NameFormat: EXTENDED_NAME_FORMAT;
- lpNameBuffer: LPTSTR; var nSize: ULONG): ByteBool; stdcall;
-{$EXTERNALSYM GetComputerObjectName}
-
-function TranslateNameA(lpAccountName: LPCSTR; AccountNameFormat,
- DesiredNameFormat: EXTENDED_NAME_FORMAT; lpTranslatedName: LPSTR;
- var nSize: ULONG): ByteBool; stdcall;
-{$EXTERNALSYM TranslateNameA}
-function TranslateNameW(lpAccountName: LPCWSTR; AccountNameFormat,
- DesiredNameFormat: EXTENDED_NAME_FORMAT; lpTranslatedName: LPWSTR;
- var nSize: ULONG): ByteBool; stdcall;
-{$EXTERNALSYM TranslateNameW}
-function TranslateName(lpAccountName: LPCTSTR; AccountNameFormat,
- DesiredNameFormat: EXTENDED_NAME_FORMAT; lpTranslatedName: LPTSTR;
- var nSize: ULONG): ByteBool; stdcall;
-{$EXTERNALSYM TranslateName}
-
-implementation
-
-const
- secur32 = 'secur32.dll';
- {$IFDEF UNICODE}
- AWSuffix = 'W';
- {$ELSE}
- AWSuffix = 'A';
- {$ENDIF UNICODE}
-
-{$IFDEF DYNAMIC_LINK}
-
-var
- _GetUserNameExA: Pointer;
-
-function GetUserNameExA;
-begin
- GetProcedureAddress(_GetUserNameExA, secur32, 'GetUserNameExA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetUserNameExA]
- end;
-end;
-
-var
- _GetUserNameExW: Pointer;
-
-function GetUserNameExW;
-begin
- GetProcedureAddress(_GetUserNameExW, secur32, 'GetUserNameExW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetUserNameExW]
- end;
-end;
-
-var
- _GetUserNameEx: Pointer;
-
-function GetUserNameEx;
-begin
- GetProcedureAddress(_GetUserNameEx, secur32, 'GetUserNameEx' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetUserNameEx]
- end;
-end;
-
-var
- _GetComputerObjectNameA: Pointer;
-
-function GetComputerObjectNameA;
-begin
- GetProcedureAddress(_GetComputerObjectNameA, secur32, 'GetComputerObjectNameA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetComputerObjectNameA]
- end;
-end;
-
-var
- _GetComputerObjectNameW: Pointer;
-
-function GetComputerObjectNameW;
-begin
- GetProcedureAddress(_GetComputerObjectNameW, secur32, 'GetComputerObjectNameW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetComputerObjectNameW]
- end;
-end;
-
-var
- _GetComputerObjectName: Pointer;
-
-function GetComputerObjectName;
-begin
- GetProcedureAddress(_GetComputerObjectName, secur32, 'GetComputerObjectName' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetComputerObjectName]
- end;
-end;
-
-var
- _TranslateNameA: Pointer;
-
-function TranslateNameA;
-begin
- GetProcedureAddress(_TranslateNameA, secur32, 'TranslateNameA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_TranslateNameA]
- end;
-end;
-
-var
- _TranslateNameW: Pointer;
-
-function TranslateNameW;
-begin
- GetProcedureAddress(_TranslateNameW, secur32, 'TranslateNameW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_TranslateNameW]
- end;
-end;
-
-var
- _TranslateName: Pointer;
-
-function TranslateName;
-begin
- GetProcedureAddress(_TranslateName, secur32, 'TranslateName' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_TranslateName]
- end;
-end;
-
-{$ELSE}
-
-function GetUserNameExA; external secur32 name 'GetUserNameExA';
-function GetUserNameExW; external secur32 name 'GetUserNameExW';
-function GetUserNameEx; external secur32 name 'GetUserNameEx' + AWSuffix;
-function GetComputerObjectNameA; external secur32 name 'GetComputerObjectNameA';
-function GetComputerObjectNameW; external secur32 name 'GetComputerObjectNameW';
-function GetComputerObjectName; external secur32 name 'GetComputerObjectName' + AWSuffix;
-function TranslateNameA; external secur32 name 'TranslateNameA';
-function TranslateNameW; external secur32 name 'TranslateNameW';
-function TranslateName; external secur32 name 'TranslateName' + AWSuffix;
-
-{$ENDIF DYNAMIC_LINK}
-
-end.
+{******************************************************************************}
+{ }
+{ SSPI Context Management API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: secext.h, released August 2001. The original Pascal }
+{ code is: SecExt.pas, released December 2000. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwasecext.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaSecExt;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "secext.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaSSPI, JwaWinType;
+
+//
+// Extended Name APIs for ADS
+//
+
+const
+ // Examples for the following formats assume a fictitous company
+ // which hooks into the global X.500 and DNS name spaces as follows.
+ //
+ // Enterprise root domain in DNS is
+ //
+ // widget.com
+ //
+ // Enterprise root domain in X.500 (RFC 1779 format) is
+ //
+ // O=Widget, C=US
+ //
+ // There exists the child domain
+ //
+ // engineering.widget.com
+ //
+ // equivalent to
+ //
+ // OU=Engineering, O=Widget, C=US
+ //
+ // There exists a container within the Engineering domain
+ //
+ // OU=Software, OU=Engineering, O=Widget, C=US
+ //
+ // There exists the user
+ //
+ // CN=John Doe, OU=Software, OU=Engineering, O=Widget, C=US
+ //
+ // And this user's downlevel (pre-ADS) user name is
+ //
+ // Engineering\JohnDoe
+
+ // unknown name type
+ NameUnknown = 0;
+ {$EXTERNALSYM NameUnknown}
+
+ // CN=John Doe, OU=Software, OU=Engineering, O=Widget, C=US
+ NameFullyQualifiedDN = 1;
+ {$EXTERNALSYM NameFullyQualifiedDN}
+
+ // Engineering\JohnDoe
+ NameSamCompatible = 2;
+ {$EXTERNALSYM NameSamCompatible}
+
+ // Probably "John Doe" but could be something else. I.e. The
+ // display name is not necessarily the defining RDN.
+ NameDisplay = 3;
+ {$EXTERNALSYM NameDisplay}
+
+ // String-ized GUID as returned by IIDFromString().
+ // eg: {4fa050f0-f561-11cf-bdd9-00aa003a77b6}
+ NameUniqueId = 6;
+ {$EXTERNALSYM NameUniqueId}
+
+ // engineering.widget.com/software/John Doe
+ NameCanonical = 7;
+ {$EXTERNALSYM NameCanonical}
+
+ // johndoe@engineering.com
+ NameUserPrincipal = 8;
+ {$EXTERNALSYM NameUserPrincipal}
+
+ // Same as NameCanonical except that rightmost '/' is
+ // replaced with '\n' - even in domain-only case.
+ // eg: engineering.widget.com/software\nJohn Doe
+ NameCanonicalEx = 9;
+ {$EXTERNALSYM NameCanonicalEx}
+
+ // www/srv.engineering.com/engineering.com
+ NameServicePrincipal = 10;
+ {$EXTERNALSYM NameServicePrincipal}
+
+ // DNS domain name + SAM username
+ // eg: engineering.widget.com\JohnDoe
+ NameDnsDomain = 12;
+ {$EXTERNALSYM NameDnsDomain}
+
+type
+ EXTENDED_NAME_FORMAT = DWORD;
+ {$EXTERNALSYM EXTENDED_NAME_FORMAT}
+ PEXTENDED_NAME_FORMAT = ^EXTENDED_NAME_FORMAT;
+ {$EXTERNALSYM PEXTENDED_NAME_FORMAT}
+ TExtendedNameFormat = EXTENDED_NAME_FORMAT;
+ PExtendedNameFormat = PEXTENDED_NAME_FORMAT;
+
+function GetUserNameExA(NameFormat: EXTENDED_NAME_FORMAT; lpNameBuffer: LPSTR;
+ var nSize: ULONG): ByteBool; stdcall;
+{$EXTERNALSYM GetUserNameExA}
+function GetUserNameExW(NameFormat: EXTENDED_NAME_FORMAT; lpNameBuffer: LPWSTR;
+ var nSize: ULONG): ByteBool; stdcall;
+{$EXTERNALSYM GetUserNameExW}
+function GetUserNameEx(NameFormat: EXTENDED_NAME_FORMAT; lpNameBuffer: LPTSTR;
+ var nSize: ULONG): ByteBool; stdcall;
+{$EXTERNALSYM GetUserNameEx}
+
+function GetComputerObjectNameA(NameFormat: EXTENDED_NAME_FORMAT;
+ lpNameBuffer: LPSTR; var nSize: ULONG): ByteBool; stdcall;
+{$EXTERNALSYM GetComputerObjectNameA}
+function GetComputerObjectNameW(NameFormat: EXTENDED_NAME_FORMAT;
+ lpNameBuffer: LPWSTR; var nSize: ULONG): ByteBool; stdcall;
+{$EXTERNALSYM GetComputerObjectNameW}
+function GetComputerObjectName(NameFormat: EXTENDED_NAME_FORMAT;
+ lpNameBuffer: LPTSTR; var nSize: ULONG): ByteBool; stdcall;
+{$EXTERNALSYM GetComputerObjectName}
+
+function TranslateNameA(lpAccountName: LPCSTR; AccountNameFormat,
+ DesiredNameFormat: EXTENDED_NAME_FORMAT; lpTranslatedName: LPSTR;
+ var nSize: ULONG): ByteBool; stdcall;
+{$EXTERNALSYM TranslateNameA}
+function TranslateNameW(lpAccountName: LPCWSTR; AccountNameFormat,
+ DesiredNameFormat: EXTENDED_NAME_FORMAT; lpTranslatedName: LPWSTR;
+ var nSize: ULONG): ByteBool; stdcall;
+{$EXTERNALSYM TranslateNameW}
+function TranslateName(lpAccountName: LPCTSTR; AccountNameFormat,
+ DesiredNameFormat: EXTENDED_NAME_FORMAT; lpTranslatedName: LPTSTR;
+ var nSize: ULONG): ByteBool; stdcall;
+{$EXTERNALSYM TranslateName}
+
+implementation
+
+const
+ secur32 = 'secur32.dll';
+ {$IFDEF UNICODE}
+ AWSuffix = 'W';
+ {$ELSE}
+ AWSuffix = 'A';
+ {$ENDIF UNICODE}
+
+{$IFDEF DYNAMIC_LINK}
+
+var
+ _GetUserNameExA: Pointer;
+
+function GetUserNameExA;
+begin
+ GetProcedureAddress(_GetUserNameExA, secur32, 'GetUserNameExA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetUserNameExA]
+ end;
+end;
+
+var
+ _GetUserNameExW: Pointer;
+
+function GetUserNameExW;
+begin
+ GetProcedureAddress(_GetUserNameExW, secur32, 'GetUserNameExW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetUserNameExW]
+ end;
+end;
+
+var
+ _GetUserNameEx: Pointer;
+
+function GetUserNameEx;
+begin
+ GetProcedureAddress(_GetUserNameEx, secur32, 'GetUserNameEx' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetUserNameEx]
+ end;
+end;
+
+var
+ _GetComputerObjectNameA: Pointer;
+
+function GetComputerObjectNameA;
+begin
+ GetProcedureAddress(_GetComputerObjectNameA, secur32, 'GetComputerObjectNameA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetComputerObjectNameA]
+ end;
+end;
+
+var
+ _GetComputerObjectNameW: Pointer;
+
+function GetComputerObjectNameW;
+begin
+ GetProcedureAddress(_GetComputerObjectNameW, secur32, 'GetComputerObjectNameW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetComputerObjectNameW]
+ end;
+end;
+
+var
+ _GetComputerObjectName: Pointer;
+
+function GetComputerObjectName;
+begin
+ GetProcedureAddress(_GetComputerObjectName, secur32, 'GetComputerObjectName' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetComputerObjectName]
+ end;
+end;
+
+var
+ _TranslateNameA: Pointer;
+
+function TranslateNameA;
+begin
+ GetProcedureAddress(_TranslateNameA, secur32, 'TranslateNameA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_TranslateNameA]
+ end;
+end;
+
+var
+ _TranslateNameW: Pointer;
+
+function TranslateNameW;
+begin
+ GetProcedureAddress(_TranslateNameW, secur32, 'TranslateNameW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_TranslateNameW]
+ end;
+end;
+
+var
+ _TranslateName: Pointer;
+
+function TranslateName;
+begin
+ GetProcedureAddress(_TranslateName, secur32, 'TranslateName' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_TranslateName]
+ end;
+end;
+
+{$ELSE}
+
+function GetUserNameExA; external secur32 name 'GetUserNameExA';
+function GetUserNameExW; external secur32 name 'GetUserNameExW';
+function GetUserNameEx; external secur32 name 'GetUserNameEx' + AWSuffix;
+function GetComputerObjectNameA; external secur32 name 'GetComputerObjectNameA';
+function GetComputerObjectNameW; external secur32 name 'GetComputerObjectNameW';
+function GetComputerObjectName; external secur32 name 'GetComputerObjectName' + AWSuffix;
+function TranslateNameA; external secur32 name 'TranslateNameA';
+function TranslateNameW; external secur32 name 'TranslateNameW';
+function TranslateName; external secur32 name 'TranslateName' + AWSuffix;
+
+{$ENDIF DYNAMIC_LINK}
+
+end.
diff --git a/packages/extra/winunits/jwasecurity.pas b/packages/extra/winunits/jwasecurity.pas
index ddedeb3f68..04f49270fa 100644
--- a/packages/extra/winunits/jwasecurity.pas
+++ b/packages/extra/winunits/jwasecurity.pas
@@ -1,102 +1,102 @@
-{******************************************************************************}
-{ }
-{ Security API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: security.h, released June 2000. The original Pascal }
-{ code is: Security.pas, released December 2000. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwasecurity.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaSecurity;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "security.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-// This file will go out and pull in all the header files that you need,
-// based on defines that you issue. The following macros are used.
-//
-// SECURITY_KERNEL Use the kernel interface, not the usermode
-//
-
-//
-// These are name that can be used to refer to the builtin packages
-//
-
-const
- NTLMSP_NAME_A = 'NTLM';
- {$EXTERNALSYM NTLMSP_NAME_A}
- NTLMSP_NAME = WideString('NTLM');
- {$EXTERNALSYM NTLMSP_NAME}
-
- MICROSOFT_KERBEROS_NAME_A = 'Kerberos';
- {$EXTERNALSYM MICROSOFT_KERBEROS_NAME_A}
- MICROSOFT_KERBEROS_NAME_W = WideString('Kerberos');
- {$EXTERNALSYM MICROSOFT_KERBEROS_NAME_W}
-
- // (rom) WIN32_CHICAGO replaced by UNICODE
- {$IFDEF UNICODE}
- MICROSOFT_KERBEROS_NAME = MICROSOFT_KERBEROS_NAME_W;
- {$EXTERNALSYM MICROSOFT_KERBEROS_NAME}
- {$ELSE}
- MICROSOFT_KERBEROS_NAME = MICROSOFT_KERBEROS_NAME_A;
- {$EXTERNALSYM MICROSOFT_KERBEROS_NAME}
- {$ENDIF UNICODE}
-
- NEGOSSP_NAME_W = WideString('Negotiate');
- {$EXTERNALSYM NEGOSSP_NAME_W}
- NEGOSSP_NAME_A = 'Negotiate';
- {$EXTERNALSYM NEGOSSP_NAME_A}
-
- {$IFDEF UNICODE}
- NEGOSSP_NAME = NEGOSSP_NAME_W;
- {$EXTERNALSYM NEGOSSP_NAME}
- {$ELSE}
- NEGOSSP_NAME = NEGOSSP_NAME_A;
- {$EXTERNALSYM NEGOSSP_NAME}
- {$ENDIF UNICODE}
-
-implementation
-
-end.
+{******************************************************************************}
+{ }
+{ Security API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: security.h, released June 2000. The original Pascal }
+{ code is: Security.pas, released December 2000. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwasecurity.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaSecurity;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "security.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+// This file will go out and pull in all the header files that you need,
+// based on defines that you issue. The following macros are used.
+//
+// SECURITY_KERNEL Use the kernel interface, not the usermode
+//
+
+//
+// These are name that can be used to refer to the builtin packages
+//
+
+const
+ NTLMSP_NAME_A = 'NTLM';
+ {$EXTERNALSYM NTLMSP_NAME_A}
+ NTLMSP_NAME = WideString('NTLM');
+ {$EXTERNALSYM NTLMSP_NAME}
+
+ MICROSOFT_KERBEROS_NAME_A = 'Kerberos';
+ {$EXTERNALSYM MICROSOFT_KERBEROS_NAME_A}
+ MICROSOFT_KERBEROS_NAME_W = WideString('Kerberos');
+ {$EXTERNALSYM MICROSOFT_KERBEROS_NAME_W}
+
+ // (rom) WIN32_CHICAGO replaced by UNICODE
+ {$IFDEF UNICODE}
+ MICROSOFT_KERBEROS_NAME = MICROSOFT_KERBEROS_NAME_W;
+ {$EXTERNALSYM MICROSOFT_KERBEROS_NAME}
+ {$ELSE}
+ MICROSOFT_KERBEROS_NAME = MICROSOFT_KERBEROS_NAME_A;
+ {$EXTERNALSYM MICROSOFT_KERBEROS_NAME}
+ {$ENDIF UNICODE}
+
+ NEGOSSP_NAME_W = WideString('Negotiate');
+ {$EXTERNALSYM NEGOSSP_NAME_W}
+ NEGOSSP_NAME_A = 'Negotiate';
+ {$EXTERNALSYM NEGOSSP_NAME_A}
+
+ {$IFDEF UNICODE}
+ NEGOSSP_NAME = NEGOSSP_NAME_W;
+ {$EXTERNALSYM NEGOSSP_NAME}
+ {$ELSE}
+ NEGOSSP_NAME = NEGOSSP_NAME_A;
+ {$EXTERNALSYM NEGOSSP_NAME}
+ {$ENDIF UNICODE}
+
+implementation
+
+end.
diff --git a/packages/extra/winunits/jwasens.pas b/packages/extra/winunits/jwasens.pas
index a7a31b65a0..c1b0d66ae1 100644
--- a/packages/extra/winunits/jwasens.pas
+++ b/packages/extra/winunits/jwasens.pas
@@ -1,95 +1,95 @@
-{******************************************************************************}
-{ }
-{ System Event Notification Services API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: sens.h, released March 2003. The original Pascal }
-{ code is: Sens.pas, released April 2003. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwasens.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaSens;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "Sens.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-//
-// Constants
-//
-
-const
- CONNECTION_LAN = $00000001;
- {$EXTERNALSYM CONNECTION_LAN}
- CONNECTION_WAN = $00000002;
- {$EXTERNALSYM CONNECTION_WAN}
- CONNECTION_AOL = $00000004;
- {$EXTERNALSYM CONNECTION_AOL}
-
-//
-// SENS Guids related to Event System
-//
-
- SENSGUID_PUBLISHER: TGUID = '{5fee1bd6-5b9b-11d1-8dd2-00aa004abd5e}';
- {$EXTERNALSYM SENSGUID_PUBLISHER}
- SENSGUID_SUBSCRIBER_LCE: TGUID = '{d3938ab0-5b9d-11d1-8dd2-00aa004abd5e}';
- {$EXTERNALSYM SENSGUID_SUBSCRIBER_LCE}
- SENSGUID_SUBSCRIBER_WININET: TGUID = '{d3938ab5-5b9d-11d1-8dd2-00aa004abd5e}';
- {$EXTERNALSYM SENSGUID_SUBSCRIBER_WININET}
-
-//
-// Classes of Events published by SENS
-//
-
- SENSGUID_EVENTCLASS_NETWORK: TGUID = '{d5978620-5b9f-11d1-8dd2-00aa004abd5e}';
- {$EXTERNALSYM SENSGUID_EVENTCLASS_NETWORK}
- SENSGUID_EVENTCLASS_LOGON: TGUID = '{d5978630-5b9f-11d1-8dd2-00aa004abd5e}';
- {$EXTERNALSYM SENSGUID_EVENTCLASS_LOGON}
- SENSGUID_EVENTCLASS_ONNOW: TGUID = '{d5978640-5b9f-11d1-8dd2-00aa004abd5e}';
- {$EXTERNALSYM SENSGUID_EVENTCLASS_ONNOW}
- SENSGUID_EVENTCLASS_LOGON2: TGUID = '{d5978650-5b9f-11d1-8dd2-00aa004abd5e}';
- {$EXTERNALSYM SENSGUID_EVENTCLASS_LOGON2}
-
-implementation
-
-end.
+{******************************************************************************}
+{ }
+{ System Event Notification Services API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: sens.h, released March 2003. The original Pascal }
+{ code is: Sens.pas, released April 2003. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwasens.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaSens;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "Sens.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+//
+// Constants
+//
+
+const
+ CONNECTION_LAN = $00000001;
+ {$EXTERNALSYM CONNECTION_LAN}
+ CONNECTION_WAN = $00000002;
+ {$EXTERNALSYM CONNECTION_WAN}
+ CONNECTION_AOL = $00000004;
+ {$EXTERNALSYM CONNECTION_AOL}
+
+//
+// SENS Guids related to Event System
+//
+
+ SENSGUID_PUBLISHER: TGUID = '{5fee1bd6-5b9b-11d1-8dd2-00aa004abd5e}';
+ {$EXTERNALSYM SENSGUID_PUBLISHER}
+ SENSGUID_SUBSCRIBER_LCE: TGUID = '{d3938ab0-5b9d-11d1-8dd2-00aa004abd5e}';
+ {$EXTERNALSYM SENSGUID_SUBSCRIBER_LCE}
+ SENSGUID_SUBSCRIBER_WININET: TGUID = '{d3938ab5-5b9d-11d1-8dd2-00aa004abd5e}';
+ {$EXTERNALSYM SENSGUID_SUBSCRIBER_WININET}
+
+//
+// Classes of Events published by SENS
+//
+
+ SENSGUID_EVENTCLASS_NETWORK: TGUID = '{d5978620-5b9f-11d1-8dd2-00aa004abd5e}';
+ {$EXTERNALSYM SENSGUID_EVENTCLASS_NETWORK}
+ SENSGUID_EVENTCLASS_LOGON: TGUID = '{d5978630-5b9f-11d1-8dd2-00aa004abd5e}';
+ {$EXTERNALSYM SENSGUID_EVENTCLASS_LOGON}
+ SENSGUID_EVENTCLASS_ONNOW: TGUID = '{d5978640-5b9f-11d1-8dd2-00aa004abd5e}';
+ {$EXTERNALSYM SENSGUID_EVENTCLASS_ONNOW}
+ SENSGUID_EVENTCLASS_LOGON2: TGUID = '{d5978650-5b9f-11d1-8dd2-00aa004abd5e}';
+ {$EXTERNALSYM SENSGUID_EVENTCLASS_LOGON2}
+
+implementation
+
+end.
diff --git a/packages/extra/winunits/jwasensapi.pas b/packages/extra/winunits/jwasensapi.pas
index 47e13b29be..9c320076c4 100644
--- a/packages/extra/winunits/jwasensapi.pas
+++ b/packages/extra/winunits/jwasensapi.pas
@@ -1,166 +1,166 @@
-{******************************************************************************}
-{ }
-{ System Event Notification Services API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: sensapi.h, released March 2003. The original Pascal }
-{ code is: SensAPI.pas, released April 2003. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwasensapi.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaSensAPI;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "SensAPI.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaWinNT, JwaWinType;
-
-const
- NETWORK_ALIVE_LAN = $00000001;
- {$EXTERNALSYM NETWORK_ALIVE_LAN}
- NETWORK_ALIVE_WAN = $00000002;
- {$EXTERNALSYM NETWORK_ALIVE_WAN}
- NETWORK_ALIVE_AOL = $00000004;
- {$EXTERNALSYM NETWORK_ALIVE_AOL}
-
-type
- tagQOCINFO = record
- dwSize: DWORD;
- dwFlags: DWORD;
- dwInSpeed: DWORD;
- dwOutSpeed: DWORD;
- end;
- {$EXTERNALSYM tagQOCINFO}
- QOCINFO = tagQOCINFO;
- {$EXTERNALSYM QOCINFO}
- LPQOCINFO = ^QOCINFO;
- {$EXTERNALSYM LPQOCINFO}
- TQocInfo = QOCINFO;
- PQocInfo = LPQOCINFO;
-
-function IsDestinationReachableA(lpszDestination: LPCSTR; lpQOCInfo: LPQOCINFO): BOOL; stdcall;
-{$EXTERNALSYM IsDestinationReachableA}
-function IsDestinationReachableW(lpszDestination: LPCWSTR; lpQOCInfo: LPQOCINFO): BOOL; stdcall;
-{$EXTERNALSYM IsDestinationReachableW}
-function IsDestinationReachable(lpszDestination: LPCTSTR; lpQOCInfo: LPQOCINFO): BOOL; stdcall;
-{$EXTERNALSYM IsDestinationReachable}
-
-function IsNetworkAlive(out lpdwFlags: DWORD): BOOL; stdcall;
-{$EXTERNALSYM IsNetworkAlive}
-
-implementation
-
-const
- sensapilib = 'sensapi.dll';
- {$IFDEF UNICODE}
- AWSuffix = 'W';
- {$ELSE}
- AWSuffix = 'A';
- {$ENDIF UNICODE}
-
-{$IFDEF DYNAMIC_LINK}
-
-var
- _IsDestinationReachableA: Pointer;
-
-function IsDestinationReachableA;
-begin
- GetProcedureAddress(_IsDestinationReachableA, sensapilib, 'IsDestinationReachableA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_IsDestinationReachableA]
- end;
-end;
-
-var
- _IsDestinationReachableW: Pointer;
-
-function IsDestinationReachableW;
-begin
- GetProcedureAddress(_IsDestinationReachableW, sensapilib, 'IsDestinationReachableW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_IsDestinationReachableW]
- end;
-end;
-
-var
- _IsDestinationReachable: Pointer;
-
-function IsDestinationReachable;
-begin
- GetProcedureAddress(_IsDestinationReachable, sensapilib, 'IsDestinationReachable' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_IsDestinationReachable]
- end;
-end;
-
-var
- _IsNetworkAlive: Pointer;
-
-function IsNetworkAlive;
-begin
- GetProcedureAddress(_IsNetworkAlive, sensapilib, 'IsNetworkAlive');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_IsNetworkAlive]
- end;
-end;
-
-{$ELSE}
-
-function IsDestinationReachableA; external sensapilib name 'IsDestinationReachableA';
-function IsDestinationReachableW; external sensapilib name 'IsDestinationReachableW';
-function IsDestinationReachable; external sensapilib name 'IsDestinationReachable' + AWSuffix;
-function IsNetworkAlive; external sensapilib name 'IsNetworkAlive';
-
-{$ENDIF DYNAMIC_LINK}
-
-end.
+{******************************************************************************}
+{ }
+{ System Event Notification Services API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: sensapi.h, released March 2003. The original Pascal }
+{ code is: SensAPI.pas, released April 2003. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwasensapi.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaSensAPI;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "SensAPI.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaWinNT, JwaWinType;
+
+const
+ NETWORK_ALIVE_LAN = $00000001;
+ {$EXTERNALSYM NETWORK_ALIVE_LAN}
+ NETWORK_ALIVE_WAN = $00000002;
+ {$EXTERNALSYM NETWORK_ALIVE_WAN}
+ NETWORK_ALIVE_AOL = $00000004;
+ {$EXTERNALSYM NETWORK_ALIVE_AOL}
+
+type
+ tagQOCINFO = record
+ dwSize: DWORD;
+ dwFlags: DWORD;
+ dwInSpeed: DWORD;
+ dwOutSpeed: DWORD;
+ end;
+ {$EXTERNALSYM tagQOCINFO}
+ QOCINFO = tagQOCINFO;
+ {$EXTERNALSYM QOCINFO}
+ LPQOCINFO = ^QOCINFO;
+ {$EXTERNALSYM LPQOCINFO}
+ TQocInfo = QOCINFO;
+ PQocInfo = LPQOCINFO;
+
+function IsDestinationReachableA(lpszDestination: LPCSTR; lpQOCInfo: LPQOCINFO): BOOL; stdcall;
+{$EXTERNALSYM IsDestinationReachableA}
+function IsDestinationReachableW(lpszDestination: LPCWSTR; lpQOCInfo: LPQOCINFO): BOOL; stdcall;
+{$EXTERNALSYM IsDestinationReachableW}
+function IsDestinationReachable(lpszDestination: LPCTSTR; lpQOCInfo: LPQOCINFO): BOOL; stdcall;
+{$EXTERNALSYM IsDestinationReachable}
+
+function IsNetworkAlive(out lpdwFlags: DWORD): BOOL; stdcall;
+{$EXTERNALSYM IsNetworkAlive}
+
+implementation
+
+const
+ sensapilib = 'sensapi.dll';
+ {$IFDEF UNICODE}
+ AWSuffix = 'W';
+ {$ELSE}
+ AWSuffix = 'A';
+ {$ENDIF UNICODE}
+
+{$IFDEF DYNAMIC_LINK}
+
+var
+ _IsDestinationReachableA: Pointer;
+
+function IsDestinationReachableA;
+begin
+ GetProcedureAddress(_IsDestinationReachableA, sensapilib, 'IsDestinationReachableA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_IsDestinationReachableA]
+ end;
+end;
+
+var
+ _IsDestinationReachableW: Pointer;
+
+function IsDestinationReachableW;
+begin
+ GetProcedureAddress(_IsDestinationReachableW, sensapilib, 'IsDestinationReachableW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_IsDestinationReachableW]
+ end;
+end;
+
+var
+ _IsDestinationReachable: Pointer;
+
+function IsDestinationReachable;
+begin
+ GetProcedureAddress(_IsDestinationReachable, sensapilib, 'IsDestinationReachable' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_IsDestinationReachable]
+ end;
+end;
+
+var
+ _IsNetworkAlive: Pointer;
+
+function IsNetworkAlive;
+begin
+ GetProcedureAddress(_IsNetworkAlive, sensapilib, 'IsNetworkAlive');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_IsNetworkAlive]
+ end;
+end;
+
+{$ELSE}
+
+function IsDestinationReachableA; external sensapilib name 'IsDestinationReachableA';
+function IsDestinationReachableW; external sensapilib name 'IsDestinationReachableW';
+function IsDestinationReachable; external sensapilib name 'IsDestinationReachable' + AWSuffix;
+function IsNetworkAlive; external sensapilib name 'IsNetworkAlive';
+
+{$ENDIF DYNAMIC_LINK}
+
+end.
diff --git a/packages/extra/winunits/jwasensevts.pas b/packages/extra/winunits/jwasensevts.pas
index c9873bb213..834a70ab83 100644
--- a/packages/extra/winunits/jwasensevts.pas
+++ b/packages/extra/winunits/jwasensevts.pas
@@ -1,168 +1,168 @@
-
-{******************************************************************************}
-{ }
-{ System Event Notification Services API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: sensevts.h, released March 2003. The original Pascal }
-{ code is: SensEvts.pas, released April 2003. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwasensevts.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaSensEvts;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "SensEvts.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaWinNT, JwaWinType;
-
-//
-// SENS Events Type library
-//
-
-//[
-//uuid(d597deed-5b9f-11d1-8dd2-00aa004abd5e),
-//version(2.0),
-//helpstring("SENS Events Type Library")
-//]
-
-//library SensEvents
-//{
-//
-//typedef [uuid(d597fad1-5b9f-11d1-8dd2-00aa004abd5e)] struct SENS_QOCINFO
-
-type
- SENS_QOCINFO = record
- dwSize: DWORD;
- dwFlags: DWORD;
- dwOutSpeed: DWORD;
- dwInSpeed: DWORD;
- end;
- {$EXTERNALSYM SENS_QOCINFO}
- LPSENS_QOCINFO = ^SENS_QOCINFO;
- {$EXTERNALSYM LPSENS_QOCINFO}
- TSensQocInfo = SENS_QOCINFO;
- PSensQocInfo = LPSENS_QOCINFO;
-
-//
-// Interface ISensNetwork
-//
-
- ISensNetwork = interface (IDispatch)
- ['{d597bab1-5b9f-11d1-8dd2-00aa004abd5e}']
- function ConnectionMade(bstrConnection: WideString; ulType: ULONG; lpQOCInfo: LPSENS_QOCINFO): HRESULT; stdcall; {$IFDEF SUPPORTS_DISPID} dispid 1; {$endif}
- function ConnectionMadeNoQOCInfo(bstrConnection: WideString; ulType: ULONG): HRESULT; stdcall; {$IFDEF SUPPORTS_DISPID} dispid 2; {$endif}
- function ConnectionLost(bstrConnection: WideString; ulType: ULONG): HRESULT; stdcall; {$IFDEF SUPPORTS_DISPID} dispid 3; {$endif}
- function DestinationReachable(bstrDestination, bstrConnection: WideString; ulType: ULONG; lpQOCInfo: LPSENS_QOCINFO): HRESULT; stdcall; {$IFDEF SUPPORTS_DISPID} dispid 4; {$endif}
- function DestinationReachableNoQOCInfo(bstrDestination, bstrConnection: WideString; ulType: ULONG): HRESULT; stdcall; {$IFDEF SUPPORTS_DISPID} dispid 5; {$endif}
- end;
- {$EXTERNALSYM ISensNetwork}
-
-//
-// Interface ISensOnNow
-//
-
- ISensOnNow = interface (IDispatch)
- ['{d597bab2-5b9f-11d1-8dd2-00aa004abd5e}']
- function OnACPower: HRESULT; stdcall; {$IFDEF SUPPORTS_DISPID} dispid 1; {$endif}
- function OnBatteryPower(dwBatteryLifePercent: DWORD): HRESULT; stdcall; {$IFDEF SUPPORTS_DISPID} dispid 2; {$endif}
- function BatteryLow(dwBatteryLifePercent: DWORD): HRESULT; stdcall; {$IFDEF SUPPORTS_DISPID} dispid 3; {$endif}
- end;
- {$EXTERNALSYM ISensOnNow}
-
-//
-// Interface ISensLogon
-//
-
- ISensLogon = interface (IDispatch)
- ['{d597bab3-5b9f-11d1-8dd2-00aa004abd5e}']
- function Logon(bstrUserName: WideString): HRESULT; stdcall; {$IFDEF SUPPORTS_DISPID} dispid 1; {$endif}
- function Logoff(bstrUserName: WideString): HRESULT; stdcall; {$IFDEF SUPPORTS_DISPID} dispid 2; {$endif}
- function StartShell(bstrUserName: WideString): HRESULT; stdcall; {$IFDEF SUPPORTS_DISPID} dispid 3; {$endif}
- function DisplayLock(bstrUserName: WideString): HRESULT; stdcall; {$IFDEF SUPPORTS_DISPID} dispid 4;{$endif}
- function DisplayUnlock(bstrUserName: WideString): HRESULT; stdcall; {$IFDEF SUPPORTS_DISPID} dispid 5;{$endif}
- function StartScreenSaver(bstrUserName: WideString): HRESULT; stdcall; {$IFDEF SUPPORTS_DISPID} dispid 6;{$endif}
- function StopScreenSaver(bstrUserName: WideString): HRESULT; stdcall; {$IFDEF SUPPORTS_DISPID} dispid 7;{$endif}
- end;
- {$EXTERNALSYM ISensLogon}
-
-//
-// Interface ISensLogon2
-//
-
- ISensLogon2 = interface (IDispatch)
- ['{d597bab4-5b9f-11d1-8dd2-00aa004abd5e}']
- function Logon(bstrUserName: WideString; dwSessionId: DWORD): HRESULT; stdcall; {$IFDEF SUPPORTS_DISPID} dispid 1; {$endif}
- function Logoff(bstrUserName: WideString; dwSessionId: DWORD): HRESULT; stdcall; {$IFDEF SUPPORTS_DISPID} dispid 2;{$endif}
- function SessionDisconnect(bstrUserName: WideString; dwSessionId: DWORD): HRESULT; stdcall; {$IFDEF SUPPORTS_DISPID} dispid 3;{$endif}
- function SessionReconnect(bstrUserName: WideString; dwSessionId: DWORD): HRESULT; stdcall; {$IFDEF SUPPORTS_DISPID} dispid 4; {$endif}
- function PostShell(bstrUserName: WideString; dwSessionId: DWORD): HRESULT; stdcall; {$IFDEF SUPPORTS_DISPID} dispid 5; {$endif}
- end;
- {$EXTERNALSYM ISensLogon2}
-
-//
-// CoClass SENS
-//
-
-// [
-// uuid(d597cafe-5b9f-11d1-8dd2-00aa004abd5e),
-// helpstring("System Event Notification Service (SENS)")
-// ]
-// coclass SENS
-// {
-// [default, source] interface ISensNetwork;
-// [source] interface ISensOnNow;
-// [source] interface ISensLogon;
-// [source] interface ISensLogon2;
-// };
-//};
-
-const
- CLSID_SENS: TGUID = '{d597cafe-5b9f-11d1-8dd2-00aa004abd5e}';
- {$EXTERNALSYM CLSID_SENS}
-
-implementation
-
-end.
+
+{******************************************************************************}
+{ }
+{ System Event Notification Services API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: sensevts.h, released March 2003. The original Pascal }
+{ code is: SensEvts.pas, released April 2003. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwasensevts.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaSensEvts;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "SensEvts.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaWinNT, JwaWinType;
+
+//
+// SENS Events Type library
+//
+
+//[
+//uuid(d597deed-5b9f-11d1-8dd2-00aa004abd5e),
+//version(2.0),
+//helpstring("SENS Events Type Library")
+//]
+
+//library SensEvents
+//{
+//
+//typedef [uuid(d597fad1-5b9f-11d1-8dd2-00aa004abd5e)] struct SENS_QOCINFO
+
+type
+ SENS_QOCINFO = record
+ dwSize: DWORD;
+ dwFlags: DWORD;
+ dwOutSpeed: DWORD;
+ dwInSpeed: DWORD;
+ end;
+ {$EXTERNALSYM SENS_QOCINFO}
+ LPSENS_QOCINFO = ^SENS_QOCINFO;
+ {$EXTERNALSYM LPSENS_QOCINFO}
+ TSensQocInfo = SENS_QOCINFO;
+ PSensQocInfo = LPSENS_QOCINFO;
+
+//
+// Interface ISensNetwork
+//
+
+ ISensNetwork = interface (IDispatch)
+ ['{d597bab1-5b9f-11d1-8dd2-00aa004abd5e}']
+ function ConnectionMade(bstrConnection: WideString; ulType: ULONG; lpQOCInfo: LPSENS_QOCINFO): HRESULT; stdcall; {$IFDEF SUPPORTS_DISPID} dispid 1; {$endif}
+ function ConnectionMadeNoQOCInfo(bstrConnection: WideString; ulType: ULONG): HRESULT; stdcall; {$IFDEF SUPPORTS_DISPID} dispid 2; {$endif}
+ function ConnectionLost(bstrConnection: WideString; ulType: ULONG): HRESULT; stdcall; {$IFDEF SUPPORTS_DISPID} dispid 3; {$endif}
+ function DestinationReachable(bstrDestination, bstrConnection: WideString; ulType: ULONG; lpQOCInfo: LPSENS_QOCINFO): HRESULT; stdcall; {$IFDEF SUPPORTS_DISPID} dispid 4; {$endif}
+ function DestinationReachableNoQOCInfo(bstrDestination, bstrConnection: WideString; ulType: ULONG): HRESULT; stdcall; {$IFDEF SUPPORTS_DISPID} dispid 5; {$endif}
+ end;
+ {$EXTERNALSYM ISensNetwork}
+
+//
+// Interface ISensOnNow
+//
+
+ ISensOnNow = interface (IDispatch)
+ ['{d597bab2-5b9f-11d1-8dd2-00aa004abd5e}']
+ function OnACPower: HRESULT; stdcall; {$IFDEF SUPPORTS_DISPID} dispid 1; {$endif}
+ function OnBatteryPower(dwBatteryLifePercent: DWORD): HRESULT; stdcall; {$IFDEF SUPPORTS_DISPID} dispid 2; {$endif}
+ function BatteryLow(dwBatteryLifePercent: DWORD): HRESULT; stdcall; {$IFDEF SUPPORTS_DISPID} dispid 3; {$endif}
+ end;
+ {$EXTERNALSYM ISensOnNow}
+
+//
+// Interface ISensLogon
+//
+
+ ISensLogon = interface (IDispatch)
+ ['{d597bab3-5b9f-11d1-8dd2-00aa004abd5e}']
+ function Logon(bstrUserName: WideString): HRESULT; stdcall; {$IFDEF SUPPORTS_DISPID} dispid 1; {$endif}
+ function Logoff(bstrUserName: WideString): HRESULT; stdcall; {$IFDEF SUPPORTS_DISPID} dispid 2; {$endif}
+ function StartShell(bstrUserName: WideString): HRESULT; stdcall; {$IFDEF SUPPORTS_DISPID} dispid 3; {$endif}
+ function DisplayLock(bstrUserName: WideString): HRESULT; stdcall; {$IFDEF SUPPORTS_DISPID} dispid 4;{$endif}
+ function DisplayUnlock(bstrUserName: WideString): HRESULT; stdcall; {$IFDEF SUPPORTS_DISPID} dispid 5;{$endif}
+ function StartScreenSaver(bstrUserName: WideString): HRESULT; stdcall; {$IFDEF SUPPORTS_DISPID} dispid 6;{$endif}
+ function StopScreenSaver(bstrUserName: WideString): HRESULT; stdcall; {$IFDEF SUPPORTS_DISPID} dispid 7;{$endif}
+ end;
+ {$EXTERNALSYM ISensLogon}
+
+//
+// Interface ISensLogon2
+//
+
+ ISensLogon2 = interface (IDispatch)
+ ['{d597bab4-5b9f-11d1-8dd2-00aa004abd5e}']
+ function Logon(bstrUserName: WideString; dwSessionId: DWORD): HRESULT; stdcall; {$IFDEF SUPPORTS_DISPID} dispid 1; {$endif}
+ function Logoff(bstrUserName: WideString; dwSessionId: DWORD): HRESULT; stdcall; {$IFDEF SUPPORTS_DISPID} dispid 2;{$endif}
+ function SessionDisconnect(bstrUserName: WideString; dwSessionId: DWORD): HRESULT; stdcall; {$IFDEF SUPPORTS_DISPID} dispid 3;{$endif}
+ function SessionReconnect(bstrUserName: WideString; dwSessionId: DWORD): HRESULT; stdcall; {$IFDEF SUPPORTS_DISPID} dispid 4; {$endif}
+ function PostShell(bstrUserName: WideString; dwSessionId: DWORD): HRESULT; stdcall; {$IFDEF SUPPORTS_DISPID} dispid 5; {$endif}
+ end;
+ {$EXTERNALSYM ISensLogon2}
+
+//
+// CoClass SENS
+//
+
+// [
+// uuid(d597cafe-5b9f-11d1-8dd2-00aa004abd5e),
+// helpstring("System Event Notification Service (SENS)")
+// ]
+// coclass SENS
+// {
+// [default, source] interface ISensNetwork;
+// [source] interface ISensOnNow;
+// [source] interface ISensLogon;
+// [source] interface ISensLogon2;
+// };
+//};
+
+const
+ CLSID_SENS: TGUID = '{d597cafe-5b9f-11d1-8dd2-00aa004abd5e}';
+ {$EXTERNALSYM CLSID_SENS}
+
+implementation
+
+end.
diff --git a/packages/extra/winunits/jwasfc.pas b/packages/extra/winunits/jwasfc.pas
index fb93b96824..d9e902a2c9 100644
--- a/packages/extra/winunits/jwasfc.pas
+++ b/packages/extra/winunits/jwasfc.pas
@@ -1,168 +1,168 @@
-{******************************************************************************}
-{ }
-{ Windows File Protection API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: sfc.h, released August 2001. The original Pascal }
-{ code is: Sfc.pas, released December 2000. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwasfc.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaSfc;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "sfc.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaWinType;
-
-const
- SFC_DISABLE_NORMAL = 0;
- {$EXTERNALSYM SFC_DISABLE_NORMAL}
- SFC_DISABLE_ASK = 1;
- {$EXTERNALSYM SFC_DISABLE_ASK}
- SFC_DISABLE_ONCE = 2;
- {$EXTERNALSYM SFC_DISABLE_ONCE}
- SFC_DISABLE_SETUP = 3;
- {$EXTERNALSYM SFC_DISABLE_SETUP}
- SFC_DISABLE_NOPOPUPS = 4;
- {$EXTERNALSYM SFC_DISABLE_NOPOPUPS}
-
- SFC_SCAN_NORMAL = 0;
- {$EXTERNALSYM SFC_SCAN_NORMAL}
- SFC_SCAN_ALWAYS = 1;
- {$EXTERNALSYM SFC_SCAN_ALWAYS}
- SFC_SCAN_ONCE = 2;
- {$EXTERNALSYM SFC_SCAN_ONCE}
- SFC_SCAN_IMMEDIATE = 3;
- {$EXTERNALSYM SFC_SCAN_IMMEDIATE}
-
- SFC_QUOTA_DEFAULT = 50;
- {$EXTERNALSYM SFC_QUOTA_DEFAULT}
- SFC_QUOTA_ALL_FILES = ULONG(-1);
- {$EXTERNALSYM SFC_QUOTA_ALL_FILES}
-
- SFC_IDLE_TRIGGER = WideString('WFP_IDLE_TRIGGER');
- {$EXTERNALSYM SFC_IDLE_TRIGGER}
-
-type
- PPROTECTED_FILE_DATA = ^PROTECTED_FILE_DATA;
- {$EXTERNALSYM PPROTECTED_FILE_DATA}
- _PROTECTED_FILE_DATA = record
- FileName: array [0..MAX_PATH - 1] of WCHAR;
- FileNumber: DWORD;
- end;
- {$EXTERNALSYM _PROTECTED_FILE_DATA}
- PROTECTED_FILE_DATA = _PROTECTED_FILE_DATA;
- {$EXTERNALSYM PROTECTED_FILE_DATA}
- TProtectedFileData = PROTECTED_FILE_DATA;
- PProtectedFileData = PPROTECTED_FILE_DATA;
-
-function SfcGetNextProtectedFile(RpcHandle: HANDLE;
- var ProtFileData: PROTECTED_FILE_DATA): BOOL; stdcall;
-{$EXTERNALSYM SfcGetNextProtectedFile}
-function SfcIsFileProtected(RpcHandle: HANDLE; ProtFileName: LPCWSTR): BOOL; stdcall;
-{$EXTERNALSYM SfcIsFileProtected}
-
-//
-// new APIs which are not currently supported, but are stubbed out
-//
-
-function SfpVerifyFile(pszFileName: LPCSTR; pszError: LPSTR; dwErrSize: DWORD): BOOL; stdcall;
-
-implementation
-
-const
- Sfclib = 'sfc.dll';
-
-{$IFDEF DYNAMIC_LINK}
-
-var
- _SfcGetNextProtectedFile: Pointer;
-
-function SfcGetNextProtectedFile;
-begin
- GetProcedureAddress(_SfcGetNextProtectedFile, Sfclib, 'SfcGetNextProtectedFile');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SfcGetNextProtectedFile]
- end;
-end;
-
-var
- _SfcIsFileProtected: Pointer;
-
-function SfcIsFileProtected;
-begin
- GetProcedureAddress(_SfcIsFileProtected, Sfclib, 'SfcIsFileProtected');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SfcIsFileProtected]
- end;
-end;
-
-var
- _SfpVerifyFile: Pointer;
-
-function SfpVerifyFile;
-begin
- GetProcedureAddress(_SfpVerifyFile, Sfclib, 'SfpVerifyFile');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SfpVerifyFile]
- end;
-end;
-
-{$ELSE}
-
-function SfcGetNextProtectedFile; external Sfclib name 'SfcGetNextProtectedFile';
-function SfcIsFileProtected; external Sfclib name 'SfcIsFileProtected';
-function SfpVerifyFile; external Sfclib name 'SfpVerifyFile';
-
-{$ENDIF DYNAMIC_LINK}
-
-end.
+{******************************************************************************}
+{ }
+{ Windows File Protection API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: sfc.h, released August 2001. The original Pascal }
+{ code is: Sfc.pas, released December 2000. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwasfc.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaSfc;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "sfc.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaWinType;
+
+const
+ SFC_DISABLE_NORMAL = 0;
+ {$EXTERNALSYM SFC_DISABLE_NORMAL}
+ SFC_DISABLE_ASK = 1;
+ {$EXTERNALSYM SFC_DISABLE_ASK}
+ SFC_DISABLE_ONCE = 2;
+ {$EXTERNALSYM SFC_DISABLE_ONCE}
+ SFC_DISABLE_SETUP = 3;
+ {$EXTERNALSYM SFC_DISABLE_SETUP}
+ SFC_DISABLE_NOPOPUPS = 4;
+ {$EXTERNALSYM SFC_DISABLE_NOPOPUPS}
+
+ SFC_SCAN_NORMAL = 0;
+ {$EXTERNALSYM SFC_SCAN_NORMAL}
+ SFC_SCAN_ALWAYS = 1;
+ {$EXTERNALSYM SFC_SCAN_ALWAYS}
+ SFC_SCAN_ONCE = 2;
+ {$EXTERNALSYM SFC_SCAN_ONCE}
+ SFC_SCAN_IMMEDIATE = 3;
+ {$EXTERNALSYM SFC_SCAN_IMMEDIATE}
+
+ SFC_QUOTA_DEFAULT = 50;
+ {$EXTERNALSYM SFC_QUOTA_DEFAULT}
+ SFC_QUOTA_ALL_FILES = ULONG(-1);
+ {$EXTERNALSYM SFC_QUOTA_ALL_FILES}
+
+ SFC_IDLE_TRIGGER = WideString('WFP_IDLE_TRIGGER');
+ {$EXTERNALSYM SFC_IDLE_TRIGGER}
+
+type
+ PPROTECTED_FILE_DATA = ^PROTECTED_FILE_DATA;
+ {$EXTERNALSYM PPROTECTED_FILE_DATA}
+ _PROTECTED_FILE_DATA = record
+ FileName: array [0..MAX_PATH - 1] of WCHAR;
+ FileNumber: DWORD;
+ end;
+ {$EXTERNALSYM _PROTECTED_FILE_DATA}
+ PROTECTED_FILE_DATA = _PROTECTED_FILE_DATA;
+ {$EXTERNALSYM PROTECTED_FILE_DATA}
+ TProtectedFileData = PROTECTED_FILE_DATA;
+ PProtectedFileData = PPROTECTED_FILE_DATA;
+
+function SfcGetNextProtectedFile(RpcHandle: HANDLE;
+ var ProtFileData: PROTECTED_FILE_DATA): BOOL; stdcall;
+{$EXTERNALSYM SfcGetNextProtectedFile}
+function SfcIsFileProtected(RpcHandle: HANDLE; ProtFileName: LPCWSTR): BOOL; stdcall;
+{$EXTERNALSYM SfcIsFileProtected}
+
+//
+// new APIs which are not currently supported, but are stubbed out
+//
+
+function SfpVerifyFile(pszFileName: LPCSTR; pszError: LPSTR; dwErrSize: DWORD): BOOL; stdcall;
+
+implementation
+
+const
+ Sfclib = 'sfc.dll';
+
+{$IFDEF DYNAMIC_LINK}
+
+var
+ _SfcGetNextProtectedFile: Pointer;
+
+function SfcGetNextProtectedFile;
+begin
+ GetProcedureAddress(_SfcGetNextProtectedFile, Sfclib, 'SfcGetNextProtectedFile');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SfcGetNextProtectedFile]
+ end;
+end;
+
+var
+ _SfcIsFileProtected: Pointer;
+
+function SfcIsFileProtected;
+begin
+ GetProcedureAddress(_SfcIsFileProtected, Sfclib, 'SfcIsFileProtected');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SfcIsFileProtected]
+ end;
+end;
+
+var
+ _SfpVerifyFile: Pointer;
+
+function SfpVerifyFile;
+begin
+ GetProcedureAddress(_SfpVerifyFile, Sfclib, 'SfpVerifyFile');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SfpVerifyFile]
+ end;
+end;
+
+{$ELSE}
+
+function SfcGetNextProtectedFile; external Sfclib name 'SfcGetNextProtectedFile';
+function SfcIsFileProtected; external Sfclib name 'SfcIsFileProtected';
+function SfpVerifyFile; external Sfclib name 'SfpVerifyFile';
+
+{$ENDIF DYNAMIC_LINK}
+
+end.
diff --git a/packages/extra/winunits/jwashlguid.pas b/packages/extra/winunits/jwashlguid.pas
index 2523b00371..4f5063fce1 100644
--- a/packages/extra/winunits/jwashlguid.pas
+++ b/packages/extra/winunits/jwashlguid.pas
@@ -1,921 +1,921 @@
-{******************************************************************************}
-{ }
-{ Shell GUID definitions API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: shlguid.h, released November 2002. The original Pascal }
-{ code is: JwaShlGuid.pas, released April 2002. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwashlguid.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaShlGuid;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "shlguid.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-//#define DEFINE_SHLGUID(name, l, w1, w2) DEFINE_GUID(name, l, w1, w2, 0xC0,0,0,0,0,0,0,0x46)
-
-const
- CLSID_ShellDesktop: TGUID = (D1:$00021400; D2:$0; D3:$0; D4:($C0,0,0,0,0,0,0,$46)); // 00021400-0000-0000-C000-0000000000));
- {$EXTERNALSYM CLSID_ShellDesktop}
- CLSID_ShellLink: TGUID = (D1:$00021401; D2:$0; D3:$0; D4:($C0,0,0,0,0,0,0,$46)); // 00021401-0000-0000-C000-0000000000));
- {$EXTERNALSYM CLSID_ShellLink}
-
- CLSID_NetworkPlaces: TGUID = (D1:$208D2C60; D2:$3AEA; D3:$1069; D4:($A2,$D7,$08,$00,$2B,$30,$30,$9D));//208D2C60-3AEA-1069-A2D7-08002B3030));
- {$EXTERNALSYM CLSID_NetworkPlaces}
- CLSID_NetworkDomain: TGUID = (D1:$46e06680; D2:$4bf0; D3:$11d1; D4:($83,$ee,$00,$a0,$c9,$0d,$c8,$49));//46e06680-4bf0-11d1-83ee-00a0c90dc8));
- {$EXTERNALSYM CLSID_NetworkDomain}
- CLSID_NetworkServer: TGUID = (D1:$c0542a90; D2:$4bf0; D3:$11d1; D4:($83,$ee,$00,$a0,$c9,$0d,$c8,$49));//c0542a90-4bf0-11d1-83ee-00a0c90dc8));
- {$EXTERNALSYM CLSID_NetworkServer}
- CLSID_NetworkShare: TGUID = (D1:$54a754c0; D2:$4bf0; D3:$11d1; D4:($83,$ee,$00,$a0,$c9,$0d,$c8,$49));//54a754c0-4bf1-11d1-83ee-00a0c90dc8));
- {$EXTERNALSYM CLSID_NetworkShare}
- CLSID_MyComputer: TGUID = (D1:$20D04FE0; D2:$3AEA; D3:$1069; D4:($A2,$D8,$08,$00,$2B,$30,$30,$9D));//20D04FE0-3AEA-1069-A2D8-08002B3030));
- {$EXTERNALSYM CLSID_MyComputer}
- CLSID_Internet: TGUID = (D1:$871C5380; D2:$42A0; D3:$1069; D4:($A2,$EA,$08,$00,$2B,$30,$30,$9D));//871C5380-42A0-1069-A2EA-08002B3030));
- {$EXTERNALSYM CLSID_Internet}
- CLSID_ShellFSFolder: TGUID = (D1:$F3364BA0; D2:$65B9; D3:$11CE; D4:($A9,$BA,$00,$AA,$00,$4A,$E8,$37));//F3364BA0-65B9-11CE-A9BA-00AA004AE8));
- {$EXTERNALSYM CLSID_ShellFSFolder}
- CLSID_RecycleBin: TGUID = (D1:$645FF040; D2:$5081; D3:$101B; D4:($9F,$08,$00,$AA,$00,$2F,$95,$4E));//645FF040-5081-101B-9F08-00AA002F95));
- {$EXTERNALSYM CLSID_RecycleBin}
- CLSID_ControlPanel: TGUID = (D1:$21EC2020; D2:$3AEA; D3:$1069; D4:($A2,$DD,$08,$00,$2B,$30,$30,$9D));//21EC2020-3AEA-1069-A2DD-08002B3030));
- {$EXTERNALSYM CLSID_ControlPanel}
- CLSID_Printers: TGUID = (D1:$2227A280; D2:$3AEA; D3:$1069; D4:($A2,$DE,$08,$00,$2B,$30,$30,$9D));
- {$EXTERNALSYM CLSID_Printers}
- CLSID_MyDocuments: TGUID = (D1:$450d8fba; D2:$ad25; D3:$11d0; D4:($98,$a8,$08,$00,$36,$1b,$11,$03));//450D8FBA-AD25-11D0-98A8-0800361B11));
- {$EXTERNALSYM CLSID_MyDocuments}
-
-// string version of above CLSIDs
-// useful for doing psfDesktop->ParseDisplayName( L"::" L STR_MYDOCS_CLSID, ...);
-
- STR_MYDOCS_CLSID = '{450D8FBA-AD25-11D0-98A8-0800361B1103}';
- {$EXTERNALSYM STR_MYDOCS_CLSID}
-
-//#if (_WIN32_IE >= 0x0400)
-
- CATID_BrowsableShellExt: TGUID = (D1:$00021490; D2:$0; D3:$0; D4:($C0,0,0,0,0,0,0,$46));
- {$EXTERNALSYM CATID_BrowsableShellExt}
- CATID_BrowseInPlace: TGUID = (D1:$00021491; D2:$0; D3:$0; D4:($C0,0,0,0,0,0,0,$46));
- {$EXTERNALSYM CATID_BrowseInPlace}
- CATID_DeskBand: TGUID = (D1:$00021492; D2:$0; D3:$0; D4:($C0,0,0,0,0,0,0,$46));
- {$EXTERNALSYM CATID_DeskBand}
- CATID_InfoBand: TGUID = (D1:$00021493; D2:$0; D3:$0; D4:($C0,0,0,0,0,0,0,$46));
- {$EXTERNALSYM CATID_InfoBand}
- CATID_CommBand: TGUID = (D1:$00021494; D2:$0; D3:$0; D4:($C0,0,0,0,0,0,0,$46));
- {$EXTERNALSYM CATID_CommBand}
-
-//#endif
-
- PSGUID_INTERNETSHORTCUT: TGUID = (D1:$000214A0; D2:$0; D3:$0; D4:($C0,0,0,0,0,0,0,$46));
- {$EXTERNALSYM PSGUID_INTERNETSHORTCUT}
- FMTID_Intshcut: TGUID = (D1:$000214A0; D2:$0; D3:$0; D4:($C0,0,0,0,0,0,0,$46));
- {$EXTERNALSYM FMTID_Intshcut}
-
- PSGUID_INTERNETSITE: TGUID = (D1:$000214A1; D2:$0; D3:$0; D4:($C0,0,0,0,0,0,0,$46));
- {$EXTERNALSYM PSGUID_INTERNETSITE}
- FMTID_InternetSite: TGUID = (D1:$000214A1; D2:$0; D3:$0; D4:($C0,0,0,0,0,0,0,$46));
- {$EXTERNALSYM FMTID_InternetSite}
-
- CGID_Explorer: TGUID = (D1:$000214D0; D2:$0; D3:$0; D4:($C0,0,0,0,0,0,0,$46));
- {$EXTERNALSYM CGID_Explorer}
- CGID_ShellDocView: TGUID = (D1:$000214D1; D2:$0; D3:$0; D4:($C0,0,0,0,0,0,0,$46));
- {$EXTERNALSYM CGID_ShellDocView}
-
-//#if (_WIN32_IE >= 0x0400)
-
- CGID_ShellServiceObject: TGUID = (D1:$000214D2; D2:$0; D3:$0; D4:($C0,0,0,0,0,0,0,$46));
- {$EXTERNALSYM CGID_ShellServiceObject}
- CGID_ExplorerBarDoc: TGUID = (D1:$000214D3; D2:$0; D3:$0; D4:($C0,0,0,0,0,0,0,$46));
- {$EXTERNALSYM CGID_ExplorerBarDoc}
-
-//#endif
-
- IID_INewShortcutHookA: TGUID = (D1:$000214E1; D2:$0; D3:$0; D4:($C0,0,0,0,0,0,0,$46));
- {$EXTERNALSYM IID_INewShortcutHookA}
- IID_IShellBrowser: TGUID = (D1:$000214E2; D2:$0; D3:$0; D4:($C0,0,0,0,0,0,0,$46));
- {$EXTERNALSYM IID_IShellBrowser}
- IID_IShellView: TGUID = (D1:$000214E3; D2:$0; D3:$0; D4:($C0,0,0,0,0,0,0,$46));
- {$EXTERNALSYM IID_IShellView}
- IID_IContextMenu: TGUID = (D1:$000214E4; D2:$0; D3:$0; D4:($C0,0,0,0,0,0,0,$46));
- {$EXTERNALSYM IID_IContextMenu}
- IID_IShellIcon: TGUID = (D1:$000214E5; D2:$0; D3:$0; D4:($C0,0,0,0,0,0,0,$46));
- {$EXTERNALSYM IID_IShellIcon}
- IID_IShellFolder: TGUID = (D1:$000214E6; D2:$0; D3:$0; D4:($C0,0,0,0,0,0,0,$46));
- {$EXTERNALSYM IID_IShellFolder}
- IID_IShellExtInit: TGUID = (D1:$000214E8; D2:$0; D3:$0; D4:($C0,0,0,0,0,0,0,$46));
- {$EXTERNALSYM IID_IShellExtInit}
- IID_IShellPropSheetExt: TGUID = (D1:$000214E9; D2:$0; D3:$0; D4:($C0,0,0,0,0,0,0,$46));
- {$EXTERNALSYM IID_IShellPropSheetExt}
- IID_IPersistFolder: TGUID = (D1:$000214EA; D2:$0; D3:$0; D4:($C0,0,0,0,0,0,0,$46));
- {$EXTERNALSYM IID_IPersistFolder}
- IID_IExtractIconA: TGUID = (D1:$000214EB; D2:$0; D3:$0; D4:($C0,0,0,0,0,0,0,$46));
- {$EXTERNALSYM IID_IExtractIconA}
- IID_IShellDetails: TGUID = (D1:$000214EC; D2:$0; D3:$0; D4:($C0,0,0,0,0,0,0,$46));
- {$EXTERNALSYM IID_IShellDetails}
- IID_IDelayedRelease: TGUID = (D1:$000214ED; D2:$0; D3:$0; D4:($C0,0,0,0,0,0,0,$46));
- {$EXTERNALSYM IID_IDelayedRelease}
- IID_IShellLinkA: TGUID = (D1:$000214EE; D2:$0; D3:$0; D4:($C0,0,0,0,0,0,0,$46));
- {$EXTERNALSYM IID_IShellLinkA}
- IID_IShellCopyHookA: TGUID = (D1:$000214EF; D2:$0; D3:$0; D4:($C0,0,0,0,0,0,0,$46));
- {$EXTERNALSYM IID_IShellCopyHookA}
- IID_IFileViewerA: TGUID = (D1:$000214F0; D2:$0; D3:$0; D4:($C0,0,0,0,0,0,0,$46));
- {$EXTERNALSYM IID_IFileViewerA}
- IID_ICommDlgBrowser: TGUID = (D1:$000214F1; D2:$0; D3:$0; D4:($C0,0,0,0,0,0,0,$46));
- {$EXTERNALSYM IID_ICommDlgBrowser}
- IID_IEnumIDList: TGUID = (D1:$000214F2; D2:$0; D3:$0; D4:($C0,0,0,0,0,0,0,$46));
- {$EXTERNALSYM IID_IEnumIDList}
- IID_IFileViewerSite: TGUID = (D1:$000214F3; D2:$0; D3:$0; D4:($C0,0,0,0,0,0,0,$46));
- {$EXTERNALSYM IID_IFileViewerSite}
- IID_IContextMenu2: TGUID = (D1:$000214F4; D2:$0; D3:$0; D4:($C0,0,0,0,0,0,0,$46));
- {$EXTERNALSYM IID_IContextMenu2}
- IID_IShellExecuteHookA: TGUID = (D1:$000214F5; D2:$0; D3:$0; D4:($C0,0,0,0,0,0,0,$46));
- {$EXTERNALSYM IID_IShellExecuteHookA}
- IID_IPropSheetPage: TGUID = (D1:$000214F6; D2:$0; D3:$0; D4:($C0,0,0,0,0,0,0,$46));
- {$EXTERNALSYM IID_IPropSheetPage}
- IID_INewShortcutHookW: TGUID = (D1:$000214F7; D2:$0; D3:$0; D4:($C0,0,0,0,0,0,0,$46));
- {$EXTERNALSYM IID_INewShortcutHookW}
- IID_IFileViewerW: TGUID = (D1:$000214F8; D2:$0; D3:$0; D4:($C0,0,0,0,0,0,0,$46));
- {$EXTERNALSYM IID_IFileViewerW}
- IID_IShellLinkW: TGUID = (D1:$000214F9; D2:$0; D3:$0; D4:($C0,0,0,0,0,0,0,$46));
- {$EXTERNALSYM IID_IShellLinkW}
- IID_IExtractIconW: TGUID = (D1:$000214FA; D2:$0; D3:$0; D4:($C0,0,0,0,0,0,0,$46));
- {$EXTERNALSYM IID_IExtractIconW}
- IID_IShellExecuteHookW: TGUID = (D1:$000214FB; D2:$0; D3:$0; D4:($C0,0,0,0,0,0,0,$46));
- {$EXTERNALSYM IID_IShellExecuteHookW}
- IID_IShellCopyHookW: TGUID = (D1:$000214FC; D2:$0; D3:$0; D4:($C0,0,0,0,0,0,0,$46));
- {$EXTERNALSYM IID_IShellCopyHookW}
-
- IID_IRemoteComputer: TGUID = (D1:$000214FE; D2:$0; D3:$0; D4:($C0,0,0,0,0,0,0,$46));
- {$EXTERNALSYM IID_IRemoteComputer}
-
-//#define IID_ICopyHookA IID_IShellCopyHookA
-
- IID_ICopyHookA: TGUID = (D1:$000214EF; D2:$0000; D3:$0000; D4:($C0,0,0,0,0,0,0,$46));
- {$EXTERNALSYM IID_ICopyHookA}
-
-//#define IID_ICopyHookW IID_IShellCopyHookW
-
- IID_ICopyHookW: TGUID = (D1:$000214FC; D2:$0000; D3:$0000; D4:($C0,0,0,0,0,0,0,$46));
- {$EXTERNALSYM IID_ICopyHookW}
-
-//#define SID_LinkSite IID_IShellLinkW // IServiceProvider::QueryService() access the link object that is defering to you
-
- SID_LinkSite: TGUID = (D1:$000214F9; D2:$0; D3:$0; D4:($C0,0,0,0,0,0,0,$46));
- {$EXTERNALSYM SID_LinkSite}
-
-//#if (_WIN32_IE >= 0x0400)
-
- IID_IQueryInfo: TGUID = (D1:$00021500; D2:$0; D3:$0; D4:($C0,0,0,0,0,0,0,$46));
- {$EXTERNALSYM IID_IQueryInfo}
-
-//#endif
-
- IID_IBriefcaseStg: TGUID = (D1:$8BCE1FA1; D2:$0921; D3:$101B; D4:($B1, $FF, $00, $DD, $01, $0C, $CC, $48));
- {$EXTERNALSYM IID_IBriefcaseStg}
- IID_IShellView2: TGUID = (D1:$88E39E80; D2:$3578; D3:$11CF; D4:($AE, $69, $08, $00, $2B, $2E, $12, $62));
- {$EXTERNALSYM IID_IShellView2}
- IID_IShellLinkDataList: TGUID = (D1:$45e2b4ae; D2:$b1c3; D3:$11d0; D4:($b9, $2f, $0, $a0, $c9, $3, $12, $e1));
- {$EXTERNALSYM IID_IShellLinkDataList}
-//#if (_WIN32_IE >= 0x0500)
- IID_IResolveShellLink: TGUID = (D1:$5cd52983; D2:$9449; D3:$11d2; D4:($96, $3a, $00, $c0, $4f, $79, $ad, $f0));
- {$EXTERNALSYM IID_IResolveShellLink}
-//#endif // _WIN32_IE >= 0x0500
-
-//#if (_WIN32_IE >= 0x0400)
-
- IID_IURLSearchHook: TGUID = (D1:$AC60F6A0; D2:$0FD9; D3:$11D0; D4:($99, $CB, $00, $C0, $4F, $D6, $44, $97));
- {$EXTERNALSYM IID_IURLSearchHook}
- IID_ISearchContext: TGUID = (D1:$09F656A2; D2:$41AF; D3:$480C; D4:($88, $F7, $16, $CC, $0D, $16, $46, $15));
- {$EXTERNALSYM IID_ISearchContext}
- IID_IURLSearchHook2: TGUID = (D1:$5ee44da4; D2:$6d32; D3:$46e3; D4:($86, $bc, $07, $54, $0d, $ed, $d0, $e0));
- {$EXTERNALSYM IID_IURLSearchHook2}
- IID_IDelegateFolder: TGUID = (D1:$ADD8BA80; D2:$002B; D3:$11D0; D4:($8F, $0F, $00, $C0, $4F, $D7, $D0, $62));
- {$EXTERNALSYM IID_IDelegateFolder}
-
-//#if (_WIN32_IE >= 0x0500)
-
-// CLSID_FolderShortcut {0AFACED1-E828-11D1-9187-B532F1E9575D}
-
- CLSID_FolderShortcut: TGUID = (D1:$0AFACED1; D2:$E828; D3:$11D1; D4:($91, $87, $B5, $32, $F1, $E9, $57, $5D));
- {$EXTERNALSYM CLSID_FolderShortcut}
-
-// CLSID_StorageFolder {E773F1AF-3A65-4866-857D-846FC9C4598A}
-
- CLSID_StgFolder: TGUID = (D1:$E773F1AF; D2:$3A65; D3:$4866; D4:($85, $7D, $84, $6F, $C9, $C4, $59, $8A));
- {$EXTERNALSYM CLSID_StgFolder}
-
-//#endif
-
- IID_IInputObject: TGUID = (D1:$68284faa; D2:$6a48; D3:$11d0; D4:($8c, $78, $0, $c0, $4f, $d9, $18, $b4));
- {$EXTERNALSYM IID_IInputObject}
- IID_IInputObjectSite: TGUID = (D1:$f1db8392; D2:$7331; D3:$11d0; D4:($8c, $99, $0, $a0, $c9, $2d, $bf, $e8));
- {$EXTERNALSYM IID_IInputObjectSite}
-
- IID_IDockingWindowSite: TGUID = (D1:$2a342fc2; D2:$7b26; D3:$11d0; D4:($8c, $a9, $0, $a0, $c9, $2d, $bf, $e8));
- {$EXTERNALSYM IID_IDockingWindowSite}
- IID_IDockingWindowFrame: TGUID = (D1:$47d2657a; D2:$7b27; D3:$11d0; D4:($8c, $a9, $0, $a0, $c9, $2d, $bf, $e8));
- {$EXTERNALSYM IID_IDockingWindowFrame}
-
- IID_IShellIconOverlay: TGUID = (D1:$7D688A70; D2:$C613; D3:$11D0; D4:($99, $9B, $00, $C0, $4F, $D6, $55, $E1));
- {$EXTERNALSYM IID_IShellIconOverlay}
- IID_IShellIconOverlayIdentifier: TGUID = (D1:$0C6C4200; D2:$C589; D3:$11D0; D4:($99, $9A, $00, $C0, $4F, $D6, $55, $E1));
- {$EXTERNALSYM IID_IShellIconOverlayIdentifier}
-
-// {10339516-2894-11d2-9039-00C04F8EEB3E}
-
- IID_ICommDlgBrowser2: TGUID = (D1:$10339516; D2:$2894; D3:$11d2; D4:($90, $39, $0, $c0, $4f, $8e, $eb, $3e));
- {$EXTERNALSYM IID_ICommDlgBrowser2}
-
-// 2047E320-F2A9-11CE-AE65-08002B2E1262
-
- IID_IShellFolderViewCB: TGUID = (D1:$2047E320; D2:$F2A9; D3:$11CE; D4:($AE, $65, $08, $00, $2B, $2E, $12, $62));
- {$EXTERNALSYM IID_IShellFolderViewCB}
-
-//#define SID_ShellFolderViewCB IID_IShellFolderViewCB
-
- SID_ShellFolderViewCB: TGUID = (D1:$2047E320; D2:$F2A9; D3:$11CE; D4:($AE, $65, $08, $00, $2B, $2E, $12, $62));
- {$EXTERNALSYM SID_ShellFolderViewCB}
-
-// {CEF04FDF-FE72-11d2-87A5-00C04F6837CF}
-
- IID_IPersistFolder3: TGUID = (D1:$cef04fdf; D2:$fe72; D3:$11d2; D4:($87, $a5, $0, $c0, $4f, $68, $37, $cf));
- {$EXTERNALSYM IID_IPersistFolder3}
-
-// {63B51F81-C868-11D0-999C-00C04FD655E1}
-
- CLSID_CFSIconOverlayManager: TGUID = (D1:$63B51F81; D2:$C868; D3:$11D0; D4:($99, $9C, $00, $C0, $4F, $D6, $55, $E1));
- {$EXTERNALSYM CLSID_CFSIconOverlayManager}
-
-// {85788D00-6807-11d0-B810-00C04FD706EC}
-
- IID_IRunnableTask: TGUID = (D1:$85788d00; D2:$6807; D3:$11d0; D4:($b8, $10, $0, $c0, $4f, $d7, $6, $ec));
- {$EXTERNALSYM IID_IRunnableTask}
-
-// {4ea39266-7211-409f-b622-f63dbd16c533}
-
- IID_IThumbnailCapture: TGUID = (D1:$4ea39266; D2:$7211; D3:$409f; D4:($b6, $22, $f6, $3d, $bd, $16, $c5, $33));
- {$EXTERNALSYM IID_IThumbnailCapture}
-
-// {BCFCE0A0-EC17-11d0-8D10-00A0C90F2719}
-
- IID_IContextMenu3: TGUID = (D1:$bcfce0a0; D2:$ec17; D3:$11d0; D4:($8d, $10, $0, $a0, $c9, $f, $27, $19));
- {$EXTERNALSYM IID_IContextMenu3}
-
-//#endif // _WIN32_IE >= 0x0400
-
-//#define SID_SShellBrowser IID_IShellBrowser
-
- SID_SShellBrowser: TGUID = (D1:$000214E2; D2:$0; D3:$0; D4:($C0,0,0,0,0,0,0,$46));
- {$EXTERNALSYM SID_SShellBrowser}
-
-//#if (_WIN32_IE >= 0x0400)
-
-//#define SID_SShellDesktop CLSID_ShellDesktop
-
- SID_SShellDesktop: TGUID = (D1:$00021400; D2:$0; D3:$0; D4:($C0,0,0,0,0,0,0,$46)); // 00021400-0000-0000-C000-0000000000));
- {$EXTERNALSYM SID_SShellDesktop}
-
-//#endif
-
-//#if (_WIN32_IE >= 0x0400)
-
-//
-// IShellDiscardable is an IID-only interface. If the object supports this
-// interface it can be discarded anytime. IWebBrowser::PutProperty QI's for
-// this interface to detect discardable properties.
-//
-
- IID_IDiscardableBrowserProperty: TGUID = (D1:$49c3de7c; D2:$d329; D3:$11d0; D4:($ab, $73, $00, $c0, $4f, $c3, $3e, $80));
- {$EXTERNALSYM IID_IDiscardableBrowserProperty}
-
-// IShellChangeNotify is a sink of LPCITEMIDLIST notification events
-//
-// D82BE2B1-5764-11D0-A96E-00C04FD705A2
-
- IID_IShellChangeNotify: TGUID = (D1:$D82BE2B1; D2:$5764; D3:$11D0; D4:($A9, $6E, $00, $C0, $4F, $D7, $05, $A2));
- {$EXTERNALSYM IID_IShellChangeNotify}
-
-//#endif // _WIN32_IE >= 0x0400
-
- {$IFDEF UNICODE}
-
- //#define IID_IFileViewer IID_IFileViewerW
- //#define IID_IShellLink IID_IShellLinkW
- //#define IID_IExtractIcon IID_IExtractIconW
- //#define IID_IShellCopyHook IID_IShellCopyHookW
- //#define IID_IShellExecuteHook IID_IShellExecuteHookW
- //#define IID_INewShortcutHook IID_INewShortcutHookW
-
- IID_IFileViewer: TGUID = (D1:$000214F8; D2:$0; D3:$0; D4:($C0,0,0,0,0,0,0,$46));
- {$EXTERNALSYM IID_IFileViewer}
- IID_IShellLink: TGUID = (D1:$000214F9; D2:$0; D3:$0; D4:($C0,0,0,0,0,0,0,$46));
- {$EXTERNALSYM IID_IShellLink}
- IID_IExtractIcon: TGUID = (D1:$000214FA; D2:$0; D3:$0; D4:($C0,0,0,0,0,0,0,$46));
- {$EXTERNALSYM IID_IExtractIcon}
- IID_IShellExecuteHook: TGUID = (D1:$000214FB; D2:$0; D3:$0; D4:($C0,0,0,0,0,0,0,$46));
- {$EXTERNALSYM IID_IShellExecuteHook}
- IID_IShellCopyHook: TGUID = (D1:$000214FC; D2:$0; D3:$0; D4:($C0,0,0,0,0,0,0,$46));
- {$EXTERNALSYM IID_IShellCopyHook}
- IID_INewShortcutHook: TGUID = (D1:$000214F7; D2:$0; D3:$0; D4:($C0,0,0,0,0,0,0,$46));
- {$EXTERNALSYM IID_INewShortcutHook}
-
- {$ELSE}
-
- //#define IID_IFileViewer IID_IFileViewerA
- //#define IID_IShellLink IID_IShellLinkA
- //#define IID_IExtractIcon IID_IExtractIconA
- //#define IID_IShellCopyHook IID_IShellCopyHookA
- //#define IID_IShellExecuteHook IID_IShellExecuteHookA
- //#define IID_INewShortcutHook IID_INewShortcutHookA
-
- IID_IFileViewer: TGUID = (D1:$000214F0; D2:$0; D3:$0; D4:($C0,0,0,0,0,0,0,$46));
- {$EXTERNALSYM IID_IFileViewer}
- IID_IShellLink: TGUID = (D1:$000214EE; D2:$0; D3:$0; D4:($C0,0,0,0,0,0,0,$46));
- {$EXTERNALSYM IID_IShellLink}
- IID_IExtractIcon: TGUID = (D1:$000214EB; D2:$0; D3:$0; D4:($C0,0,0,0,0,0,0,$46));
- {$EXTERNALSYM IID_IExtractIcon}
- IID_IShellCopyHook: TGUID = (D1:$000214EF; D2:$0; D3:$0; D4:($C0,0,0,0,0,0,0,$46));
- {$EXTERNALSYM IID_IShellCopyHook}
- IID_IShellExecuteHook: TGUID = (D1:$000214F5; D2:$0; D3:$0; D4:($C0,0,0,0,0,0,0,$46));
- {$EXTERNALSYM IID_IShellExecuteHook}
- IID_INewShortcutHook: TGUID = (D1:$000214E1; D2:$0; D3:$0; D4:($C0,0,0,0,0,0,0,$46));
- {$EXTERNALSYM IID_INewShortcutHook}
-
- {$ENDIF UNICODE}
-
-//#if (_WIN32_IE >= 0x0400)
-
-// UrlHistory Guids
-
- CLSID_CUrlHistory: TGUID = (D1:$3C374A40; D2:$BAE4; D3:$11CF; D4:($BF, $7D, $00, $AA, $00, $69, $46, $EE));
- {$EXTERNALSYM CLSID_CUrlHistory}
-
-//#define SID_SUrlHistory CLSID_CUrlHistory
-
- SID_SUrlHistory: TGUID = (D1:$3C374A40; D2:$BAE4; D3:$11CF; D4:($BF, $7D, $00, $AA, $00, $69, $46, $EE));
- {$EXTERNALSYM SID_SUrlHistory}
-
-//UrlSearchHook Guids
-
- CLSID_CURLSearchHook: TGUID = (D1:$CFBFAE00; D2:$17A6; D3:$11D0; D4:($99, $CB, $00, $C0, $4F, $D6, $44, $97));
- {$EXTERNALSYM CLSID_CURLSearchHook}
-
-//#define SID_SInternetExplorer IID_IWebBrowserApp
-//#define SID_SWebBrowserApp IID_IWebBrowserApp
-
-// AutoComplete Guids
-
- IID_IAutoCompList: TGUID = (D1:$00BB2760; D2:$6A77; D3:$11D0; D4:($A5, $35, $00, $C0, $4F, $D7, $D0, $62));
- {$EXTERNALSYM IID_IAutoCompList}
- IID_IObjMgr: TGUID = (D1:$00BB2761; D2:$6A77; D3:$11D0; D4:($A5, $35, $00, $C0, $4F, $D7, $D0, $62));
- {$EXTERNALSYM IID_IObjMgr}
- IID_IACList: TGUID = (D1:$77A130B0; D2:$94FD; D3:$11D0; D4:($A5, $44, $00, $C0, $4F, $D7, $d0, $62));
- {$EXTERNALSYM IID_IACList}
- IID_IACList2: TGUID = (D1:$470141a0; D2:$5186; D3:$11d2; D4:($bb, $b6, $00, $60, $97, $7b, $46, $4c));
- {$EXTERNALSYM IID_IACList2}
- IID_ICurrentWorkingDirectory: TGUID = (D1:$91956d21; D2:$9276; D3:$11d1; D4:($92, $1a, $00, $60, $97, $df, $5b, $d4)); // {91956D21-9276-11d1-921A-006097DF5BD));
- {$EXTERNALSYM IID_ICurrentWorkingDirectory}
- CLSID_AutoComplete: TGUID = (D1:$00BB2763; D2:$6A77; D3:$11D0; D4:($A5, $35, $00, $C0, $4F, $D7, $D0, $62));
- {$EXTERNALSYM CLSID_AutoComplete}
- CLSID_ACLHistory: TGUID = (D1:$00BB2764; D2:$6A77; D3:$11D0; D4:($A5, $35, $00, $C0, $4F, $D7, $D0, $62));
- {$EXTERNALSYM CLSID_ACLHistory}
- CLSID_ACListISF: TGUID = (D1:$03C036F1; D2:$A186; D3:$11D0; D4:($82, $4A, $00, $AA, $00, $5B, $43, $83));
- {$EXTERNALSYM CLSID_ACListISF}
- CLSID_ACLMRU: TGUID = (D1:$6756a641; D2:$de71; D3:$11d0; D4:($83, $1b, $0, $aa, $0, $5b, $43, $83)); // {6756A641-DE71-11d0-831B-00AA005B438));
- {$EXTERNALSYM CLSID_ACLMRU}
- CLSID_ACLMulti: TGUID = (D1:$00BB2765; D2:$6A77; D3:$11D0; D4:($A5, $35, $00, $C0, $4F, $D7, $D0, $62));
- {$EXTERNALSYM CLSID_ACLMulti}
-//#if (_WIN32_IE >= 0x0600)
- CLSID_ACLCustomMRU: TGUID = (D1:$6935db93; D2:$21e8; D3:$4ccc; D4:($be, $b9, $9f, $e3, $c7, $7a, $29, $7a));
- {$EXTERNALSYM CLSID_ACLCustomMRU}
-//#endif
-
-//#if (_WIN32_IE >= 0x0500)
-/// IProgressDialog
-// {F8383852-FCD3-11d1-A6B9-006097DF5BD4}
- CLSID_ProgressDialog: TGUID = (D1:$f8383852; D2:$fcd3; D3:$11d1; D4:($a6, $b9, $0, $60, $97, $df, $5b, $d4));
- {$EXTERNALSYM CLSID_ProgressDialog}
-// {EBBC7C04-315E-11d2-B62F-006097DF5BD4}
- IID_IProgressDialog: TGUID = (D1:$ebbc7c04; D2:$315e; D3:$11d2; D4:($b6, $2f, $0, $60, $97, $df, $5b, $d4));
- {$EXTERNALSYM IID_IProgressDialog}
-//#endif // _WIN32_IE >= 0x0500
-
-//
-// Progress objects exposed via QueryService
-//
-
-//#define SID_SProgressUI CLSID_ProgressDialog
-
- SID_SProgressUI: TGUID = (D1:$f8383852; D2:$fcd3; D3:$11d1; D4:($a6, $b9, $0, $60, $97, $df, $5b, $d4));
- {$EXTERNALSYM SID_SProgressUI}
-
-//
-// Top-most browser implementation in the heirarchy. use IServiceProvider::QueryService()
-// to get to interfaces (IID_IShellBrowser, IID_IBrowserService, etc.)
-//
-
- SID_STopLevelBrowser: TGUID = (D1:$4C96BE40; D2:$915C; D3:$11CF; D4:($99, $D3, $00, $AA, $00, $4A, $E8, $37));
- {$EXTERNALSYM SID_STopLevelBrowser}
-
-//#endif // _WIN32_IE >= 0x0400
-
-//#if (_WIN32_IE >= 0x0400)
-
-// {75048700-EF1F-11D0-9888-006097DEACF9}
-
- CLSID_ActiveDesktop: TGUID = (D1:$75048700; D2:$EF1F; D3:$11D0; D4:($98, $88, $00, $60, $97, $DE, $AC, $F9));
- {$EXTERNALSYM CLSID_ActiveDesktop}
-
-// {F490EB00-1240-11D1-9888-006097DEACF9}
-
- IID_IActiveDesktop: TGUID = (D1:$F490EB00; D2:$1240; D3:$11D1; D4:($98, $88, $00, $60, $97, $DE, $AC, $F9));
- {$EXTERNALSYM IID_IActiveDesktop}
-
-// {74C26041-70D1-11d1-B75A-00A0C90564FE}
-
- IID_ISynchronizedCallBack: TGUID = (D1:$74c26041; D2:$70d1; D3:$11d1; D4:($b7, $5a, $0, $a0, $c9, $5, $64, $fe));
- {$EXTERNALSYM IID_ISynchronizedCallBack}
-
-// Extended column handler interfaces
-// {D2A105C0-87D5-11d1-8391-0000F80461CF}
-
- IID_IShellDetails3: TGUID = (D1:$d2a105c0; D2:$87d5; D3:$11d1; D4:($83, $91, $0, $0, $f8, $4, $61, $cf));
- {$EXTERNALSYM IID_IShellDetails3}
-
-// {c46ca590-3c3f-11d2-bee6-0000f805ca57}
-
- IID_IQueryAssociations: TGUID = (D1:$c46ca590; D2:$3c3f; D3:$11d2; D4:($be, $e6, $00, $00, $f8, $05, $ca, $57));
- {$EXTERNALSYM IID_IQueryAssociations}
-
-// {a07034fd-6caa-4954-ac3f-97a27216f98a}
-
- CLSID_QueryAssociations: TGUID = (D1:$a07034fd; D2:$6caa; D3:$4954; D4:($ac, $3f, $97, $a2, $72, $16, $f9, $8a));
- {$EXTERNALSYM CLSID_QueryAssociations}
-
-// {E8025004-1C42-11d2-BE2C-00A0C9A83DA1}
-
- IID_IColumnProvider: TGUID = (D1:$e8025004; D2:$1c42; D3:$11d2; D4:($be, $2c, $0, $a0, $c9, $a8, $3d, $a1));
- {$EXTERNALSYM IID_IColumnProvider}
-
-// {24F14F01-7B1C-11d1-838f-0000F80461CF}
-
- CLSID_DocFileColumnProvider: TGUID = (D1:$24f14f01; D2:$7b1c; D3:$11d1; D4:($83, $8f, $0, $0, $f8, $4, $61, $cf));
- {$EXTERNALSYM CLSID_DocFileColumnProvider}
-
-// {24F14F02-7B1C-11d1-838f-0000F80461CF}
-
- CLSID_LinkColumnProvider: TGUID = (D1:$24f14f02; D2:$7b1c; D3:$11d1; D4:($83, $8f, $0, $0, $f8, $4, $61, $cf));
- {$EXTERNALSYM CLSID_LinkColumnProvider}
-
-// {0D2E74C4-3C34-11d2-A27E-00C04FC30871}
-
- CLSID_FileSysColumnProvider: TGUID = (D1:$d2e74c4; D2:$3c34; D3:$11d2; D4:($a2, $7e, $0, $c0, $4f, $c3, $8, $71));
- {$EXTERNALSYM CLSID_FileSysColumnProvider}
-
-// For Internet Shortcut Creation Command
-// The shell uses this command to allow trident to save off it's per frame data in the shortcut
-// and to allow it to fire the OnPersist() event on every frame
-// {93A68750-951A-11d1-946F-000000000000}
-
- CGID_ShortCut: TGUID = (D1:$93a68750; D2:$951a; D3:$11d1; D4:($94, $6f, $0, $0, $0, $0, $0, $0));
- {$EXTERNALSYM CGID_ShortCut}
-
-// {FB700430-952C-11d1-946F-000000000000}
-
- IID_INamedPropertyBag: TGUID = (D1:$fb700430; D2:$952c; D3:$11d1; D4:($94, $6f, $0, $0, $0, $0, $0, $0));
- {$EXTERNALSYM IID_INamedPropertyBag}
-
-// {1E796980-9CC5-11D1-A83F-00C04FC99D61}
-
- CLSID_InternetButtons: TGUID = (D1:$1E796980; D2:$9CC5; D3:$11D1; D4:($A8, $3F, $00, $C0, $4F, $C9, $9D, $61));
- {$EXTERNALSYM CLSID_InternetButtons}
-
-//#if (_WIN32_IE >= 0x0500)
-// {178F34B8-A282-11d2-86C5-00C04F8EEA99}
-
- CLSID_MSOButtons: TGUID = (D1:$178f34b8; D2:$a282; D3:$11d2; D4:($86, $c5, $0, $c0, $4f, $8e, $ea, $99));
- {$EXTERNALSYM CLSID_MSOButtons}
-
-// {2CE4B5D8-A28F-11d2-86C5-00C04F8EEA99}
-
- CLSID_ToolbarExtButtons: TGUID = (D1:$2ce4b5d8; D2:$a28f; D3:$11d2; D4:($86, $c5, $0, $c0, $4f, $8e, $ea, $99));
- {$EXTERNALSYM CLSID_ToolbarExtButtons}
-//#endif // _WIN32_IE >= 0x0500
-
-// {CFCCC7A0-A282-11D1-9082-006008059382}
-
- CLSID_DarwinAppPublisher: TGUID = (D1:$CFCCC7A0; D2:$A282; D3:$11D1; D4:($90, $82, $00, $60, $08, $05, $93, $82));
- {$EXTERNALSYM CLSID_DarwinAppPublisher}
-
-// {7057E952-BD1B-11d1-8919-00C04FC2C836}
-
- CLSID_DocHostUIHandler: TGUID = (D1:$7057e952; D2:$bd1b; D3:$11d1; D4:($89, $19, $0, $c0, $4f, $c2, $c8, $36));
- {$EXTERNALSYM CLSID_DocHostUIHandler}
-//#endif // _WIN32_IE >= 0x0400
-
-//#if (_WIN32_IE >= 0x0500)
-
-// {93F2F68C-1D1B-11d3-A30E-00C04F79ABD1}
-
- IID_IShellFolder2: TGUID = (D1:$93f2f68c; D2:$1d1b; D3:$11d3; D4:($a3, $e, $0, $c0, $4f, $79, $ab, $d1));
- {$EXTERNALSYM IID_IShellFolder2}
-
- PSGUID_SHELLDETAILS: TGUID = (D1:$28636aa6; D2:$953d; D3:$11d2; D4:($b5, $d6, $0, $c0, $4f, $d9, $18, $d0));
- {$EXTERNALSYM PSGUID_SHELLDETAILS}
- FMTID_ShellDetails: TGUID = (D1:$28636aa6; D2:$953d; D3:$11d2; D4:($b5, $d6, $0, $c0, $4f, $d9, $18, $d0));
- {$EXTERNALSYM FMTID_ShellDetails}
-
- PID_FINDDATA = 0;
- {$EXTERNALSYM PID_FINDDATA}
- PID_NETRESOURCE = 1;
- {$EXTERNALSYM PID_NETRESOURCE}
- PID_DESCRIPTIONID = 2;
- {$EXTERNALSYM PID_DESCRIPTIONID}
- PID_WHICHFOLDER = 3;
- {$EXTERNALSYM PID_WHICHFOLDER}
- PID_NETWORKLOCATION = 4;
- {$EXTERNALSYM PID_NETWORKLOCATION}
- PID_COMPUTERNAME = 5;
- {$EXTERNALSYM PID_COMPUTERNAME}
-
-// PSGUID_STORAGE comes from ntquery.h
-//#define PSGUID_STORAGE {0xb725f130, 0x47ef, 0x101a, 0xa5, 0xf1, 0x02, 0x60, 0x8c, 0x9e, 0xeb, 0xac}
-
- FMTID_Storage: TGUID = (D1:$b725f130; D2:$47ef; D3:$101a; D4:($a5, $f1, $02, $60, $8c, $9e, $eb, $ac));
- {$EXTERNALSYM FMTID_Storage}
-
-// Image properties
-
- PSGUID_IMAGEPROPERTIES: TGUID = (D1:$14b81da1; D2:$0135; D3:$4d31; D4:($96, $d9, $6c, $bf, $c9, $67, $1a, $99));
- {$EXTERNALSYM PSGUID_IMAGEPROPERTIES}
-
- FMTID_ImageProperties: TGUID = (D1:$14b81da1; D2:$0135; D3:$4d31; D4:($96, $d9, $6c, $bf, $c9, $67, $1a, $99));
- {$EXTERNALSYM FMTID_ImageProperties}
-
-// The GUIDs used to identify shell item attributes (columns). See IShellFolder2::GetDetailsEx implementations...
-
-// {9B174B33-40FF-11d2-A27E-00C04FC30871}
-
- PSGUID_DISPLACED: TGUID = (D1:$9b174b33; D2:$40ff; D3:$11d2; D4:($a2, $7e, $0, $c0, $4f, $c3, $8, $71));
- {$EXTERNALSYM PSGUID_DISPLACED}
-
- FMTID_Displaced: TGUID = (D1:$9b174b33; D2:$40ff; D3:$11d2; D4:($a2, $7e, $0, $c0, $4f, $c3, $8, $71));
- {$EXTERNALSYM FMTID_Displaced}
-
- PID_DISPLACED_FROM = 2;
- {$EXTERNALSYM PID_DISPLACED_FROM}
- PID_DISPLACED_DATE = 3;
- {$EXTERNALSYM PID_DISPLACED_DATE}
-
-// {328D8B21-7729-4bfc-954C-902B329D56B0}
-
- PSGUID_BRIEFCASE: TGUID = (D1:$328d8b21; D2:$7729; D3:$4bfc; D4:($95, $4c, $90, $2b, $32, $9d, $56, $b0));
- {$EXTERNALSYM PSGUID_BRIEFCASE}
-
- FMTID_Briefcase: TGUID = (D1:$328d8b21; D2:$7729; D3:$4bfc; D4:($95, $4c, $90, $2b, $32, $9d, $56, $b0));
- {$EXTERNALSYM FMTID_Briefcase}
-
- PID_SYNC_COPY_IN = 2;
- {$EXTERNALSYM PID_SYNC_COPY_IN}
-
-// {9B174B34-40FF-11d2-A27E-00C04FC30871}
-
- PSGUID_MISC: TGUID = (D1:$9b174b34; D2:$40ff; D3:$11d2; D4:($a2, $7e, $0, $c0, $4f, $c3, $8, $71));
- {$EXTERNALSYM PSGUID_MISC}
-
- FMTID_Misc: TGUID = (D1:$9b174b34; D2:$40ff; D3:$11d2; D4:($a2, $7e, $0, $c0, $4f, $c3, $8, $71));
- {$EXTERNALSYM FMTID_Misc}
-
- PID_MISC_STATUS = 2;
- {$EXTERNALSYM PID_MISC_STATUS}
- PID_MISC_ACCESSCOUNT = 3;
- {$EXTERNALSYM PID_MISC_ACCESSCOUNT}
- PID_MISC_OWNER = 4;
- {$EXTERNALSYM PID_MISC_OWNER}
- PID_HTMLINFOTIPFILE = 5;
- {$EXTERNALSYM PID_HTMLINFOTIPFILE}
- PID_MISC_PICS = 6;
- {$EXTERNALSYM PID_MISC_PICS}
-
-// {F2275480-F782-4291-BD94-F13693513AEC}
-
- PSGUID_WEBVIEW: TGUID = (D1:$f2275480; D2:$f782; D3:$4291; D4:($bd, $94, $f1, $36, $93, $51, $3a, $ec));
- {$EXTERNALSYM PSGUID_WEBVIEW}
-
- FMTID_WebView: TGUID = (D1:$f2275480; D2:$f782; D3:$4291; D4:($bd, $94, $f1, $36, $93, $51, $3a, $ec));
- {$EXTERNALSYM FMTID_WebView}
-
- PID_DISPLAY_PROPERTIES = 0;
- {$EXTERNALSYM PID_DISPLAY_PROPERTIES}
- PID_INTROTEXT = 1;
- {$EXTERNALSYM PID_INTROTEXT}
-
-// {56A3372E-CE9C-11d2-9F0E-006097C686F6}
-
- PSGUID_MUSIC: TGUID = (D1:$56a3372e; D2:$ce9c; D3:$11d2; D4:($9f, $e, $0, $60, $97, $c6, $86, $f6));
- {$EXTERNALSYM PSGUID_MUSIC}
-
- FMTID_MUSIC: TGUID = (D1:$56a3372e; D2:$ce9c; D3:$11d2; D4:($9f, $e, $0, $60, $97, $c6, $86, $f6));
- {$EXTERNALSYM FMTID_MUSIC}
-
- PIDSI_ARTIST = 2;
- {$EXTERNALSYM PIDSI_ARTIST}
- PIDSI_SONGTITLE = 3;
- {$EXTERNALSYM PIDSI_SONGTITLE}
- PIDSI_ALBUM = 4;
- {$EXTERNALSYM PIDSI_ALBUM}
- PIDSI_YEAR = 5;
- {$EXTERNALSYM PIDSI_YEAR}
- PIDSI_COMMENT = 6;
- {$EXTERNALSYM PIDSI_COMMENT}
- PIDSI_TRACK = 7;
- {$EXTERNALSYM PIDSI_TRACK}
- PIDSI_GENRE = 11;
- {$EXTERNALSYM PIDSI_GENRE}
- PIDSI_LYRICS = 12;
- {$EXTERNALSYM PIDSI_LYRICS}
-
-// {AEAC19E4-89AE-4508-B9B7-BB867ABEE2ED}
-
- PSGUID_DRM: TGUID = (D1:$aeac19e4; D2:$89ae; D3:$4508; D4:($b9, $b7, $bb, $86, $7a, $be, $e2, $ed));
- {$EXTERNALSYM PSGUID_DRM}
-
- FMTID_DRM: TGUID = (D1:$aeac19e4; D2:$89ae; D3:$4508; D4:($b9, $b7, $bb, $86, $7a, $be, $e2, $ed));
- {$EXTERNALSYM FMTID_DRM}
-
- PIDDRSI_PROTECTED = 2;
- {$EXTERNALSYM PIDDRSI_PROTECTED}
- PIDDRSI_DESCRIPTION = 3;
- {$EXTERNALSYM PIDDRSI_DESCRIPTION}
- PIDDRSI_PLAYCOUNT = 4;
- {$EXTERNALSYM PIDDRSI_PLAYCOUNT}
- PIDDRSI_PLAYSTARTS = 5;
- {$EXTERNALSYM PIDDRSI_PLAYSTARTS}
- PIDDRSI_PLAYEXPIRES = 6;
- {$EXTERNALSYM PIDDRSI_PLAYEXPIRES}
-
-//#define PSGUID_VIDEO {0x64440491, 0x4c8b, 0x11d1, 0x8b, 0x70, 0x8, 0x0, 0x36, 0xb1, 0x1a, 0x3}
-// FMTID_VideoSummaryInformation property identifiers
-
- PIDVSI_STREAM_NAME = $00000002; // "StreamName", VT_LPWSTR
- {$EXTERNALSYM PIDVSI_STREAM_NAME}
- PIDVSI_FRAME_WIDTH = $00000003; // "FrameWidth", VT_UI4
- {$EXTERNALSYM PIDVSI_FRAME_WIDTH}
- PIDVSI_FRAME_HEIGHT = $00000004; // "FrameHeight", VT_UI4
- {$EXTERNALSYM PIDVSI_FRAME_HEIGHT}
- PIDVSI_TIMELENGTH = $00000007; // "TimeLength", VT_UI4, milliseconds
- {$EXTERNALSYM PIDVSI_TIMELENGTH}
- PIDVSI_FRAME_COUNT = $00000005; // "FrameCount". VT_UI4
- {$EXTERNALSYM PIDVSI_FRAME_COUNT}
- PIDVSI_FRAME_RATE = $00000006; // "FrameRate", VT_UI4, frames/millisecond
- {$EXTERNALSYM PIDVSI_FRAME_RATE}
- PIDVSI_DATA_RATE = $00000008; // "DataRate", VT_UI4, bytes/second
- {$EXTERNALSYM PIDVSI_DATA_RATE}
- PIDVSI_SAMPLE_SIZE = $00000009; // "SampleSize", VT_UI4
- {$EXTERNALSYM PIDVSI_SAMPLE_SIZE}
- PIDVSI_COMPRESSION = $0000000A; // "Compression", VT_LPWSTR
- {$EXTERNALSYM PIDVSI_COMPRESSION}
- PIDVSI_STREAM_NUMBER = $0000000B; // "StreamNumber", VT_UI2
- {$EXTERNALSYM PIDVSI_STREAM_NUMBER}
-
-//#define PSGUID_AUDIO {0x64440490, 0x4c8b, 0x11d1, 0x8b, 0x70, 0x8, 0x0, 0x36, 0xb1, 0x1a, 0x3}
-// FMTID_AudioSummaryInformation property identifiers
-
- PIDASI_FORMAT = $00000002; // VT_BSTR
- {$EXTERNALSYM PIDASI_FORMAT}
- PIDASI_TIMELENGTH = $00000003; // VT_UI4, milliseconds
- {$EXTERNALSYM PIDASI_TIMELENGTH}
- PIDASI_AVG_DATA_RATE = $00000004; // VT_UI4, Hz
- {$EXTERNALSYM PIDASI_AVG_DATA_RATE}
- PIDASI_SAMPLE_RATE = $00000005; // VT_UI4, bits
- {$EXTERNALSYM PIDASI_SAMPLE_RATE}
- PIDASI_SAMPLE_SIZE = $00000006; // VT_UI4, bits
- {$EXTERNALSYM PIDASI_SAMPLE_SIZE}
- PIDASI_CHANNEL_COUNT = $00000007; // VT_UI4
- {$EXTERNALSYM PIDASI_CHANNEL_COUNT}
- PIDASI_STREAM_NUMBER = $00000008; // VT_UI2
- {$EXTERNALSYM PIDASI_STREAM_NUMBER}
- PIDASI_STREAM_NAME = $00000009; // VT_LPWSTR
- {$EXTERNALSYM PIDASI_STREAM_NAME}
- PIDASI_COMPRESSION = $0000000A; // VT_LPWSTR
- {$EXTERNALSYM PIDASI_COMPRESSION}
-
-// {305CA226-D286-468e-B848-2B2E8E697B74}
-
-//#define PSGUID_CONTROLPANEL {0x305ca226, 0xd286, 0x468e, 0xb8, 0x48, 0x2b, 0x2e, 0x8e, 0x69, 0x7b, 0x74}
-
- PID_CONTROLPANEL_CATEGORY = 2;
- {$EXTERNALSYM PID_CONTROLPANEL_CATEGORY}
-
-// {9B174B35-40FF-11d2-A27E-00C04FC30871}
-
- PSGUID_VOLUME: TGUID = (D1:$9b174b35; D2:$40ff; D3:$11d2; D4:($a2, $7e, $0, $c0, $4f, $c3, $8, $71));
- {$EXTERNALSYM PSGUID_VOLUME}
-
- FMTID_Volume: TGUID = (D1:$9b174b35; D2:$40ff; D3:$11d2; D4:($a2, $7e, $0, $c0, $4f, $c3, $8, $71));
- {$EXTERNALSYM FMTID_Volume}
-
- PID_VOLUME_FREE = 2;
- {$EXTERNALSYM PID_VOLUME_FREE}
- PID_VOLUME_CAPACITY = 3;
- {$EXTERNALSYM PID_VOLUME_CAPACITY}
- PID_VOLUME_FILESYSTEM = 4;
- {$EXTERNALSYM PID_VOLUME_FILESYSTEM}
-
-// {D8C3986F-813B-449c-845D-87B95D674ADE}
-
-//#define PSGUID_SHARE {0xd8c3986f, 0x813b, 0x449c, 0x84, 0x5d, 0x87, 0xb9, 0x5d, 0x67, 0x4a, 0xde}
-
- PID_SHARE_CSC_STATUS = 2;
- {$EXTERNALSYM PID_SHARE_CSC_STATUS}
-
-// {B9B4B3FC-2B51-4a42-B5D8-324146AFCF25}
-
-//#define PSGUID_LINK {0xb9b4b3fc, 0x2b51, 0x4a42, 0xb5, 0xd8, 0x32, 0x41, 0x46, 0xaf, 0xcf, 0x25}
-
- PID_LINK_TARGET = 2;
- {$EXTERNALSYM PID_LINK_TARGET}
-
- PSGUID_QUERY_D: TGUID = (D1:$49691c90; D2:$7e17; D3:$101a; D4:($a9,$1c,$08,$00,$2b,$2e,$cd,$a9));
- {$EXTERNALSYM PSGUID_QUERY_D}
-
- FMTID_Query: TGUID = (D1:$49691c90; D2:$7e17; D3:$101a; D4:($a9,$1c,$08,$00,$2b,$2e,$cd,$a9));
- {$EXTERNALSYM FMTID_Query}
-
- PID_QUERY_RANK = 2;
- {$EXTERNALSYM PID_QUERY_RANK}
-
-// FMTID_SummaryInformation, see OLE docs for PID_ values for these
-
-//#define PSGUID_SUMMARYINFORMATION {0xf29f85e0L, 0x4ff9, 0x1068, 0xab, 0x91, 0x08, 0x00, 0x2b, 0x27, 0xb3, 0xd9}
-
-// FMTID_DocumentSummaryInformation, see OLE docs on the PID_ values for this
-
-//#define PSGUID_DOCUMENTSUMMARYINFORMATION {0xd5cdd502L, 0x2e9c, 0x101b, 0x93, 0x97, 0x08, 0x00, 0x2b, 0x2c, 0xf9, 0xae}
-
-// FMTID_MediaFileSummaryInformation, see propidl.h PID_ values for this
-
-//#define PSGUID_MEDIAFILESUMMARYINFORMATION {0x64440492L, 0x4c8b, 0x11d1, 0x8b, 0x70, 0x08, 0x00, 0x36, 0xb1, 0x1a, 0x03}
-
-// FMTID_ImageSummaryInformation,, see propidl.h PID_ values for this
-
-//#define PSGUID_IMAGESUMMARYINFORMATION {0x6444048fL, 0x4c8b, 0x11d1, 0x8b, 0x70, 0x8, 0x00, 0x36, 0xb1, 0x1a, 0x03}
-
-// {0E700BE1-9DB6-11d1-A1CE-00C04FD75D13}
-
- IID_IEnumExtraSearch: TGUID = (D1:$e700be1; D2:$9db6; D3:$11d1; D4:($a1, $ce, $0, $c0, $4f, $d7, $5d, $13));
- {$EXTERNALSYM IID_IEnumExtraSearch}
-
-// {12518493-00B2-11d2-9FA5-9E3420524153}
-
- CLSID_MountedVolume: TGUID = (D1:$12518493; D2:$00B2; D3:$11d2; D4:($9F, $A5, $9E, $34, $20, $52, $41, $53));
- {$EXTERNALSYM CLSID_MountedVolume}
-
-// {FFB8655F-81B9-4fce-B89C-9A6BA76D13E7}
-
- CLSID_HWShellExecute: TGUID = (D1:$ffb8655f; D2:$81b9; D3:$4fce; D4:($b8, $9c, $9a, $6b, $a7, $6d, $13, $e7));
- {$EXTERNALSYM CLSID_HWShellExecute}
-
-// {12518492-00B2-11d2-9FA5-9E3420524153}
-
- IID_IMountedVolume: TGUID = (D1:$12518492; D2:$00B2; D3:$11d2; D4:($9F, $A5, $9E, $34, $20, $52, $41, $53));
- {$EXTERNALSYM IID_IMountedVolume}
-
-// {4657278A-411B-11d2-839A-00C04FD918D0}
-
- CLSID_DragDropHelper: TGUID = (D1:$4657278a; D2:$411b; D3:$11d2; D4:($83, $9a, $0, $c0, $4f, $d9, $18, $d0));
- {$EXTERNALSYM CLSID_DragDropHelper}
-
-// {4657278B-411B-11d2-839A-00C04FD918D0}
-
- IID_IDropTargetHelper: TGUID = (D1:$4657278b; D2:$411b; D3:$11d2; D4:($83, $9a, $0, $c0, $4f, $d9, $18, $d0));
- {$EXTERNALSYM IID_IDropTargetHelper}
-
-// {DE5BF786-477A-11d2-839D-00C04FD918D0}
-
- IID_IDragSourceHelper: TGUID = (D1:$de5bf786; D2:$477a; D3:$11d2; D4:($83, $9d, $0, $c0, $4f, $d9, $18, $d0));
- {$EXTERNALSYM IID_IDragSourceHelper}
-
-// {3050f3BB-98b5-11cf-bb82-00aa00bdce0b}
-
- CLSID_CAnchorBrowsePropertyPage: TGUID = (D1:$3050f3BB; D2:$98b5; D3:$11cf; D4:($bb, $82, $00, $aa, $00, $bd, $ce, $0b));
- {$EXTERNALSYM CLSID_CAnchorBrowsePropertyPage}
-
-// {3050f3B3-98b5-11cf-bb82-00aa00bdce0b}
-
- CLSID_CImageBrowsePropertyPage: TGUID = (D1:$3050f3B3; D2:$98b5; D3:$11cf; D4:($bb, $82, $00, $aa, $00, $bd, $ce, $0b));
- {$EXTERNALSYM CLSID_CImageBrowsePropertyPage}
-
-// {3050f3B4-98b5-11cf-bb82-00aa00bdce0b}
-
- CLSID_CDocBrowsePropertyPage: TGUID = (D1:$3050f3B4; D2:$98b5; D3:$11cf; D4:($bb, $82, $00, $aa, $00, $bd, $ce, $0b));
- {$EXTERNALSYM CLSID_CDocBrowsePropertyPage}
-
-// {01E18D10-4D8B-11d2-855D-006008059367}
-
- IID_IFileSystemBindData: TGUID = (D1:$1e18d10; D2:$4d8b; D3:$11d2; D4:($85, $5d, $0, $60, $8, $5, $93, $67));
- {$EXTERNALSYM IID_IFileSystemBindData}
-
-// {49E1B500-4636-11d3-97F7-00C04F45D0B3}
-
- SID_STopWindow: TGUID = (D1:$49e1b500; D2:$4636; D3:$11d3; D4:($97, $f7, $0, $c0, $4f, $45, $d0, $b3));
- {$EXTERNALSYM SID_STopWindow}
-
-// {889A935D-971E-4B12-B90C-24DFC9E1E5E8}
-
- SID_SGetViewFromViewDual: TGUID = (D1:$889A935D; D2:$971E; D3:$4B12; D4:($B9, $0C, $24, $DF, $C9, $E1, $E5, $E8));
- {$EXTERNALSYM SID_SGetViewFromViewDual}
-
-// BHIDs for IShellItem::BindToHandler()
-//#define BHID_LocalCopyHelper CLSID_LocalCopyHelper
-// {3981e224-f559-11d3-8e3a-00c04f6837d5}
-
- BHID_SFObject: TGUID = (D1:$3981e224; D2:$f559; D3:$11d3; D4:($8e, $3a, $00, $c0, $4f, $68, $37, $d5));
- {$EXTERNALSYM BHID_SFObject}
-
-// {3981e225-f559-11d3-8e3a-00c04f6837d5}
-
- BHID_SFUIObject: TGUID = (D1:$3981e225; D2:$f559; D3:$11d3; D4:($8e, $3a, $00, $c0, $4f, $68, $37, $d5));
- {$EXTERNALSYM BHID_SFUIObject}
-
-// {3981e226-f559-11d3-8e3a-00c04f6837d5}
-
- BHID_SFViewObject: TGUID = (D1:$3981e226; D2:$f559; D3:$11d3; D4:($8e, $3a, $00, $c0, $4f, $68, $37, $d5));
- {$EXTERNALSYM BHID_SFViewObject}
-
-// {3981e227-f559-11d3-8e3a-00c04f6837d5}
-
- BHID_Storage: TGUID = (D1:$3981e227; D2:$f559; D3:$11d3; D4:($8e, $3a, $00, $c0, $4f, $68, $37, $d5));
- {$EXTERNALSYM BHID_Storage}
-
-// {1CEBB3AB-7C10-499a-A417-92CA16C4CB83}
-
- BHID_Stream: TGUID = (D1:$1cebb3ab; D2:$7c10; D3:$499a; D4:($a4, $17, $92, $ca, $16, $c4, $cb, $83));
- {$EXTERNALSYM BHID_Stream}
-
-// {3981e228-f559-11d3-8e3a-00c04f6837d5}
-
- BHID_LinkTargetItem: TGUID = (D1:$3981e228; D2:$f559; D3:$11d3; D4:($8e, $3a, $00, $c0, $4f, $68, $37, $d5));
- {$EXTERNALSYM BHID_LinkTargetItem}
-
-// {4621A4E3-F0D6-4773-8A9C-46E77B174840}
-
- BHID_StorageEnum: TGUID = (D1:$4621a4e3; D2:$f0d6; D3:$4773; D4:($8a, $9c, $46, $e7, $7b, $17, $48, $40));
- {$EXTERNALSYM BHID_StorageEnum}
-
-//#endif // _WIN32_IE >= 0x0500
-
-//#if _WIN32_IE >= 0x0600
-
-// {faadfc40-b777-4b69-aa81-77035ef0e6e8}
-
- SID_CtxQueryAssociations: TGUID = (D1:$faadfc40; D2:$b777; D3:$4b69; D4:($aa, $81, $77, $03, $5e, $f0, $e6, $e8));
- {$EXTERNALSYM SID_CtxQueryAssociations}
-
-//#endif // _WIN32_IE >= 0x0600
-
-//#endif // _SHLGUID_H_
-
-implementation
-
-end.
+{******************************************************************************}
+{ }
+{ Shell GUID definitions API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: shlguid.h, released November 2002. The original Pascal }
+{ code is: JwaShlGuid.pas, released April 2002. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwashlguid.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaShlGuid;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "shlguid.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+//#define DEFINE_SHLGUID(name, l, w1, w2) DEFINE_GUID(name, l, w1, w2, 0xC0,0,0,0,0,0,0,0x46)
+
+const
+ CLSID_ShellDesktop: TGUID = (D1:$00021400; D2:$0; D3:$0; D4:($C0,0,0,0,0,0,0,$46)); // 00021400-0000-0000-C000-0000000000));
+ {$EXTERNALSYM CLSID_ShellDesktop}
+ CLSID_ShellLink: TGUID = (D1:$00021401; D2:$0; D3:$0; D4:($C0,0,0,0,0,0,0,$46)); // 00021401-0000-0000-C000-0000000000));
+ {$EXTERNALSYM CLSID_ShellLink}
+
+ CLSID_NetworkPlaces: TGUID = (D1:$208D2C60; D2:$3AEA; D3:$1069; D4:($A2,$D7,$08,$00,$2B,$30,$30,$9D));//208D2C60-3AEA-1069-A2D7-08002B3030));
+ {$EXTERNALSYM CLSID_NetworkPlaces}
+ CLSID_NetworkDomain: TGUID = (D1:$46e06680; D2:$4bf0; D3:$11d1; D4:($83,$ee,$00,$a0,$c9,$0d,$c8,$49));//46e06680-4bf0-11d1-83ee-00a0c90dc8));
+ {$EXTERNALSYM CLSID_NetworkDomain}
+ CLSID_NetworkServer: TGUID = (D1:$c0542a90; D2:$4bf0; D3:$11d1; D4:($83,$ee,$00,$a0,$c9,$0d,$c8,$49));//c0542a90-4bf0-11d1-83ee-00a0c90dc8));
+ {$EXTERNALSYM CLSID_NetworkServer}
+ CLSID_NetworkShare: TGUID = (D1:$54a754c0; D2:$4bf0; D3:$11d1; D4:($83,$ee,$00,$a0,$c9,$0d,$c8,$49));//54a754c0-4bf1-11d1-83ee-00a0c90dc8));
+ {$EXTERNALSYM CLSID_NetworkShare}
+ CLSID_MyComputer: TGUID = (D1:$20D04FE0; D2:$3AEA; D3:$1069; D4:($A2,$D8,$08,$00,$2B,$30,$30,$9D));//20D04FE0-3AEA-1069-A2D8-08002B3030));
+ {$EXTERNALSYM CLSID_MyComputer}
+ CLSID_Internet: TGUID = (D1:$871C5380; D2:$42A0; D3:$1069; D4:($A2,$EA,$08,$00,$2B,$30,$30,$9D));//871C5380-42A0-1069-A2EA-08002B3030));
+ {$EXTERNALSYM CLSID_Internet}
+ CLSID_ShellFSFolder: TGUID = (D1:$F3364BA0; D2:$65B9; D3:$11CE; D4:($A9,$BA,$00,$AA,$00,$4A,$E8,$37));//F3364BA0-65B9-11CE-A9BA-00AA004AE8));
+ {$EXTERNALSYM CLSID_ShellFSFolder}
+ CLSID_RecycleBin: TGUID = (D1:$645FF040; D2:$5081; D3:$101B; D4:($9F,$08,$00,$AA,$00,$2F,$95,$4E));//645FF040-5081-101B-9F08-00AA002F95));
+ {$EXTERNALSYM CLSID_RecycleBin}
+ CLSID_ControlPanel: TGUID = (D1:$21EC2020; D2:$3AEA; D3:$1069; D4:($A2,$DD,$08,$00,$2B,$30,$30,$9D));//21EC2020-3AEA-1069-A2DD-08002B3030));
+ {$EXTERNALSYM CLSID_ControlPanel}
+ CLSID_Printers: TGUID = (D1:$2227A280; D2:$3AEA; D3:$1069; D4:($A2,$DE,$08,$00,$2B,$30,$30,$9D));
+ {$EXTERNALSYM CLSID_Printers}
+ CLSID_MyDocuments: TGUID = (D1:$450d8fba; D2:$ad25; D3:$11d0; D4:($98,$a8,$08,$00,$36,$1b,$11,$03));//450D8FBA-AD25-11D0-98A8-0800361B11));
+ {$EXTERNALSYM CLSID_MyDocuments}
+
+// string version of above CLSIDs
+// useful for doing psfDesktop->ParseDisplayName( L"::" L STR_MYDOCS_CLSID, ...);
+
+ STR_MYDOCS_CLSID = '{450D8FBA-AD25-11D0-98A8-0800361B1103}';
+ {$EXTERNALSYM STR_MYDOCS_CLSID}
+
+//#if (_WIN32_IE >= 0x0400)
+
+ CATID_BrowsableShellExt: TGUID = (D1:$00021490; D2:$0; D3:$0; D4:($C0,0,0,0,0,0,0,$46));
+ {$EXTERNALSYM CATID_BrowsableShellExt}
+ CATID_BrowseInPlace: TGUID = (D1:$00021491; D2:$0; D3:$0; D4:($C0,0,0,0,0,0,0,$46));
+ {$EXTERNALSYM CATID_BrowseInPlace}
+ CATID_DeskBand: TGUID = (D1:$00021492; D2:$0; D3:$0; D4:($C0,0,0,0,0,0,0,$46));
+ {$EXTERNALSYM CATID_DeskBand}
+ CATID_InfoBand: TGUID = (D1:$00021493; D2:$0; D3:$0; D4:($C0,0,0,0,0,0,0,$46));
+ {$EXTERNALSYM CATID_InfoBand}
+ CATID_CommBand: TGUID = (D1:$00021494; D2:$0; D3:$0; D4:($C0,0,0,0,0,0,0,$46));
+ {$EXTERNALSYM CATID_CommBand}
+
+//#endif
+
+ PSGUID_INTERNETSHORTCUT: TGUID = (D1:$000214A0; D2:$0; D3:$0; D4:($C0,0,0,0,0,0,0,$46));
+ {$EXTERNALSYM PSGUID_INTERNETSHORTCUT}
+ FMTID_Intshcut: TGUID = (D1:$000214A0; D2:$0; D3:$0; D4:($C0,0,0,0,0,0,0,$46));
+ {$EXTERNALSYM FMTID_Intshcut}
+
+ PSGUID_INTERNETSITE: TGUID = (D1:$000214A1; D2:$0; D3:$0; D4:($C0,0,0,0,0,0,0,$46));
+ {$EXTERNALSYM PSGUID_INTERNETSITE}
+ FMTID_InternetSite: TGUID = (D1:$000214A1; D2:$0; D3:$0; D4:($C0,0,0,0,0,0,0,$46));
+ {$EXTERNALSYM FMTID_InternetSite}
+
+ CGID_Explorer: TGUID = (D1:$000214D0; D2:$0; D3:$0; D4:($C0,0,0,0,0,0,0,$46));
+ {$EXTERNALSYM CGID_Explorer}
+ CGID_ShellDocView: TGUID = (D1:$000214D1; D2:$0; D3:$0; D4:($C0,0,0,0,0,0,0,$46));
+ {$EXTERNALSYM CGID_ShellDocView}
+
+//#if (_WIN32_IE >= 0x0400)
+
+ CGID_ShellServiceObject: TGUID = (D1:$000214D2; D2:$0; D3:$0; D4:($C0,0,0,0,0,0,0,$46));
+ {$EXTERNALSYM CGID_ShellServiceObject}
+ CGID_ExplorerBarDoc: TGUID = (D1:$000214D3; D2:$0; D3:$0; D4:($C0,0,0,0,0,0,0,$46));
+ {$EXTERNALSYM CGID_ExplorerBarDoc}
+
+//#endif
+
+ IID_INewShortcutHookA: TGUID = (D1:$000214E1; D2:$0; D3:$0; D4:($C0,0,0,0,0,0,0,$46));
+ {$EXTERNALSYM IID_INewShortcutHookA}
+ IID_IShellBrowser: TGUID = (D1:$000214E2; D2:$0; D3:$0; D4:($C0,0,0,0,0,0,0,$46));
+ {$EXTERNALSYM IID_IShellBrowser}
+ IID_IShellView: TGUID = (D1:$000214E3; D2:$0; D3:$0; D4:($C0,0,0,0,0,0,0,$46));
+ {$EXTERNALSYM IID_IShellView}
+ IID_IContextMenu: TGUID = (D1:$000214E4; D2:$0; D3:$0; D4:($C0,0,0,0,0,0,0,$46));
+ {$EXTERNALSYM IID_IContextMenu}
+ IID_IShellIcon: TGUID = (D1:$000214E5; D2:$0; D3:$0; D4:($C0,0,0,0,0,0,0,$46));
+ {$EXTERNALSYM IID_IShellIcon}
+ IID_IShellFolder: TGUID = (D1:$000214E6; D2:$0; D3:$0; D4:($C0,0,0,0,0,0,0,$46));
+ {$EXTERNALSYM IID_IShellFolder}
+ IID_IShellExtInit: TGUID = (D1:$000214E8; D2:$0; D3:$0; D4:($C0,0,0,0,0,0,0,$46));
+ {$EXTERNALSYM IID_IShellExtInit}
+ IID_IShellPropSheetExt: TGUID = (D1:$000214E9; D2:$0; D3:$0; D4:($C0,0,0,0,0,0,0,$46));
+ {$EXTERNALSYM IID_IShellPropSheetExt}
+ IID_IPersistFolder: TGUID = (D1:$000214EA; D2:$0; D3:$0; D4:($C0,0,0,0,0,0,0,$46));
+ {$EXTERNALSYM IID_IPersistFolder}
+ IID_IExtractIconA: TGUID = (D1:$000214EB; D2:$0; D3:$0; D4:($C0,0,0,0,0,0,0,$46));
+ {$EXTERNALSYM IID_IExtractIconA}
+ IID_IShellDetails: TGUID = (D1:$000214EC; D2:$0; D3:$0; D4:($C0,0,0,0,0,0,0,$46));
+ {$EXTERNALSYM IID_IShellDetails}
+ IID_IDelayedRelease: TGUID = (D1:$000214ED; D2:$0; D3:$0; D4:($C0,0,0,0,0,0,0,$46));
+ {$EXTERNALSYM IID_IDelayedRelease}
+ IID_IShellLinkA: TGUID = (D1:$000214EE; D2:$0; D3:$0; D4:($C0,0,0,0,0,0,0,$46));
+ {$EXTERNALSYM IID_IShellLinkA}
+ IID_IShellCopyHookA: TGUID = (D1:$000214EF; D2:$0; D3:$0; D4:($C0,0,0,0,0,0,0,$46));
+ {$EXTERNALSYM IID_IShellCopyHookA}
+ IID_IFileViewerA: TGUID = (D1:$000214F0; D2:$0; D3:$0; D4:($C0,0,0,0,0,0,0,$46));
+ {$EXTERNALSYM IID_IFileViewerA}
+ IID_ICommDlgBrowser: TGUID = (D1:$000214F1; D2:$0; D3:$0; D4:($C0,0,0,0,0,0,0,$46));
+ {$EXTERNALSYM IID_ICommDlgBrowser}
+ IID_IEnumIDList: TGUID = (D1:$000214F2; D2:$0; D3:$0; D4:($C0,0,0,0,0,0,0,$46));
+ {$EXTERNALSYM IID_IEnumIDList}
+ IID_IFileViewerSite: TGUID = (D1:$000214F3; D2:$0; D3:$0; D4:($C0,0,0,0,0,0,0,$46));
+ {$EXTERNALSYM IID_IFileViewerSite}
+ IID_IContextMenu2: TGUID = (D1:$000214F4; D2:$0; D3:$0; D4:($C0,0,0,0,0,0,0,$46));
+ {$EXTERNALSYM IID_IContextMenu2}
+ IID_IShellExecuteHookA: TGUID = (D1:$000214F5; D2:$0; D3:$0; D4:($C0,0,0,0,0,0,0,$46));
+ {$EXTERNALSYM IID_IShellExecuteHookA}
+ IID_IPropSheetPage: TGUID = (D1:$000214F6; D2:$0; D3:$0; D4:($C0,0,0,0,0,0,0,$46));
+ {$EXTERNALSYM IID_IPropSheetPage}
+ IID_INewShortcutHookW: TGUID = (D1:$000214F7; D2:$0; D3:$0; D4:($C0,0,0,0,0,0,0,$46));
+ {$EXTERNALSYM IID_INewShortcutHookW}
+ IID_IFileViewerW: TGUID = (D1:$000214F8; D2:$0; D3:$0; D4:($C0,0,0,0,0,0,0,$46));
+ {$EXTERNALSYM IID_IFileViewerW}
+ IID_IShellLinkW: TGUID = (D1:$000214F9; D2:$0; D3:$0; D4:($C0,0,0,0,0,0,0,$46));
+ {$EXTERNALSYM IID_IShellLinkW}
+ IID_IExtractIconW: TGUID = (D1:$000214FA; D2:$0; D3:$0; D4:($C0,0,0,0,0,0,0,$46));
+ {$EXTERNALSYM IID_IExtractIconW}
+ IID_IShellExecuteHookW: TGUID = (D1:$000214FB; D2:$0; D3:$0; D4:($C0,0,0,0,0,0,0,$46));
+ {$EXTERNALSYM IID_IShellExecuteHookW}
+ IID_IShellCopyHookW: TGUID = (D1:$000214FC; D2:$0; D3:$0; D4:($C0,0,0,0,0,0,0,$46));
+ {$EXTERNALSYM IID_IShellCopyHookW}
+
+ IID_IRemoteComputer: TGUID = (D1:$000214FE; D2:$0; D3:$0; D4:($C0,0,0,0,0,0,0,$46));
+ {$EXTERNALSYM IID_IRemoteComputer}
+
+//#define IID_ICopyHookA IID_IShellCopyHookA
+
+ IID_ICopyHookA: TGUID = (D1:$000214EF; D2:$0000; D3:$0000; D4:($C0,0,0,0,0,0,0,$46));
+ {$EXTERNALSYM IID_ICopyHookA}
+
+//#define IID_ICopyHookW IID_IShellCopyHookW
+
+ IID_ICopyHookW: TGUID = (D1:$000214FC; D2:$0000; D3:$0000; D4:($C0,0,0,0,0,0,0,$46));
+ {$EXTERNALSYM IID_ICopyHookW}
+
+//#define SID_LinkSite IID_IShellLinkW // IServiceProvider::QueryService() access the link object that is defering to you
+
+ SID_LinkSite: TGUID = (D1:$000214F9; D2:$0; D3:$0; D4:($C0,0,0,0,0,0,0,$46));
+ {$EXTERNALSYM SID_LinkSite}
+
+//#if (_WIN32_IE >= 0x0400)
+
+ IID_IQueryInfo: TGUID = (D1:$00021500; D2:$0; D3:$0; D4:($C0,0,0,0,0,0,0,$46));
+ {$EXTERNALSYM IID_IQueryInfo}
+
+//#endif
+
+ IID_IBriefcaseStg: TGUID = (D1:$8BCE1FA1; D2:$0921; D3:$101B; D4:($B1, $FF, $00, $DD, $01, $0C, $CC, $48));
+ {$EXTERNALSYM IID_IBriefcaseStg}
+ IID_IShellView2: TGUID = (D1:$88E39E80; D2:$3578; D3:$11CF; D4:($AE, $69, $08, $00, $2B, $2E, $12, $62));
+ {$EXTERNALSYM IID_IShellView2}
+ IID_IShellLinkDataList: TGUID = (D1:$45e2b4ae; D2:$b1c3; D3:$11d0; D4:($b9, $2f, $0, $a0, $c9, $3, $12, $e1));
+ {$EXTERNALSYM IID_IShellLinkDataList}
+//#if (_WIN32_IE >= 0x0500)
+ IID_IResolveShellLink: TGUID = (D1:$5cd52983; D2:$9449; D3:$11d2; D4:($96, $3a, $00, $c0, $4f, $79, $ad, $f0));
+ {$EXTERNALSYM IID_IResolveShellLink}
+//#endif // _WIN32_IE >= 0x0500
+
+//#if (_WIN32_IE >= 0x0400)
+
+ IID_IURLSearchHook: TGUID = (D1:$AC60F6A0; D2:$0FD9; D3:$11D0; D4:($99, $CB, $00, $C0, $4F, $D6, $44, $97));
+ {$EXTERNALSYM IID_IURLSearchHook}
+ IID_ISearchContext: TGUID = (D1:$09F656A2; D2:$41AF; D3:$480C; D4:($88, $F7, $16, $CC, $0D, $16, $46, $15));
+ {$EXTERNALSYM IID_ISearchContext}
+ IID_IURLSearchHook2: TGUID = (D1:$5ee44da4; D2:$6d32; D3:$46e3; D4:($86, $bc, $07, $54, $0d, $ed, $d0, $e0));
+ {$EXTERNALSYM IID_IURLSearchHook2}
+ IID_IDelegateFolder: TGUID = (D1:$ADD8BA80; D2:$002B; D3:$11D0; D4:($8F, $0F, $00, $C0, $4F, $D7, $D0, $62));
+ {$EXTERNALSYM IID_IDelegateFolder}
+
+//#if (_WIN32_IE >= 0x0500)
+
+// CLSID_FolderShortcut {0AFACED1-E828-11D1-9187-B532F1E9575D}
+
+ CLSID_FolderShortcut: TGUID = (D1:$0AFACED1; D2:$E828; D3:$11D1; D4:($91, $87, $B5, $32, $F1, $E9, $57, $5D));
+ {$EXTERNALSYM CLSID_FolderShortcut}
+
+// CLSID_StorageFolder {E773F1AF-3A65-4866-857D-846FC9C4598A}
+
+ CLSID_StgFolder: TGUID = (D1:$E773F1AF; D2:$3A65; D3:$4866; D4:($85, $7D, $84, $6F, $C9, $C4, $59, $8A));
+ {$EXTERNALSYM CLSID_StgFolder}
+
+//#endif
+
+ IID_IInputObject: TGUID = (D1:$68284faa; D2:$6a48; D3:$11d0; D4:($8c, $78, $0, $c0, $4f, $d9, $18, $b4));
+ {$EXTERNALSYM IID_IInputObject}
+ IID_IInputObjectSite: TGUID = (D1:$f1db8392; D2:$7331; D3:$11d0; D4:($8c, $99, $0, $a0, $c9, $2d, $bf, $e8));
+ {$EXTERNALSYM IID_IInputObjectSite}
+
+ IID_IDockingWindowSite: TGUID = (D1:$2a342fc2; D2:$7b26; D3:$11d0; D4:($8c, $a9, $0, $a0, $c9, $2d, $bf, $e8));
+ {$EXTERNALSYM IID_IDockingWindowSite}
+ IID_IDockingWindowFrame: TGUID = (D1:$47d2657a; D2:$7b27; D3:$11d0; D4:($8c, $a9, $0, $a0, $c9, $2d, $bf, $e8));
+ {$EXTERNALSYM IID_IDockingWindowFrame}
+
+ IID_IShellIconOverlay: TGUID = (D1:$7D688A70; D2:$C613; D3:$11D0; D4:($99, $9B, $00, $C0, $4F, $D6, $55, $E1));
+ {$EXTERNALSYM IID_IShellIconOverlay}
+ IID_IShellIconOverlayIdentifier: TGUID = (D1:$0C6C4200; D2:$C589; D3:$11D0; D4:($99, $9A, $00, $C0, $4F, $D6, $55, $E1));
+ {$EXTERNALSYM IID_IShellIconOverlayIdentifier}
+
+// {10339516-2894-11d2-9039-00C04F8EEB3E}
+
+ IID_ICommDlgBrowser2: TGUID = (D1:$10339516; D2:$2894; D3:$11d2; D4:($90, $39, $0, $c0, $4f, $8e, $eb, $3e));
+ {$EXTERNALSYM IID_ICommDlgBrowser2}
+
+// 2047E320-F2A9-11CE-AE65-08002B2E1262
+
+ IID_IShellFolderViewCB: TGUID = (D1:$2047E320; D2:$F2A9; D3:$11CE; D4:($AE, $65, $08, $00, $2B, $2E, $12, $62));
+ {$EXTERNALSYM IID_IShellFolderViewCB}
+
+//#define SID_ShellFolderViewCB IID_IShellFolderViewCB
+
+ SID_ShellFolderViewCB: TGUID = (D1:$2047E320; D2:$F2A9; D3:$11CE; D4:($AE, $65, $08, $00, $2B, $2E, $12, $62));
+ {$EXTERNALSYM SID_ShellFolderViewCB}
+
+// {CEF04FDF-FE72-11d2-87A5-00C04F6837CF}
+
+ IID_IPersistFolder3: TGUID = (D1:$cef04fdf; D2:$fe72; D3:$11d2; D4:($87, $a5, $0, $c0, $4f, $68, $37, $cf));
+ {$EXTERNALSYM IID_IPersistFolder3}
+
+// {63B51F81-C868-11D0-999C-00C04FD655E1}
+
+ CLSID_CFSIconOverlayManager: TGUID = (D1:$63B51F81; D2:$C868; D3:$11D0; D4:($99, $9C, $00, $C0, $4F, $D6, $55, $E1));
+ {$EXTERNALSYM CLSID_CFSIconOverlayManager}
+
+// {85788D00-6807-11d0-B810-00C04FD706EC}
+
+ IID_IRunnableTask: TGUID = (D1:$85788d00; D2:$6807; D3:$11d0; D4:($b8, $10, $0, $c0, $4f, $d7, $6, $ec));
+ {$EXTERNALSYM IID_IRunnableTask}
+
+// {4ea39266-7211-409f-b622-f63dbd16c533}
+
+ IID_IThumbnailCapture: TGUID = (D1:$4ea39266; D2:$7211; D3:$409f; D4:($b6, $22, $f6, $3d, $bd, $16, $c5, $33));
+ {$EXTERNALSYM IID_IThumbnailCapture}
+
+// {BCFCE0A0-EC17-11d0-8D10-00A0C90F2719}
+
+ IID_IContextMenu3: TGUID = (D1:$bcfce0a0; D2:$ec17; D3:$11d0; D4:($8d, $10, $0, $a0, $c9, $f, $27, $19));
+ {$EXTERNALSYM IID_IContextMenu3}
+
+//#endif // _WIN32_IE >= 0x0400
+
+//#define SID_SShellBrowser IID_IShellBrowser
+
+ SID_SShellBrowser: TGUID = (D1:$000214E2; D2:$0; D3:$0; D4:($C0,0,0,0,0,0,0,$46));
+ {$EXTERNALSYM SID_SShellBrowser}
+
+//#if (_WIN32_IE >= 0x0400)
+
+//#define SID_SShellDesktop CLSID_ShellDesktop
+
+ SID_SShellDesktop: TGUID = (D1:$00021400; D2:$0; D3:$0; D4:($C0,0,0,0,0,0,0,$46)); // 00021400-0000-0000-C000-0000000000));
+ {$EXTERNALSYM SID_SShellDesktop}
+
+//#endif
+
+//#if (_WIN32_IE >= 0x0400)
+
+//
+// IShellDiscardable is an IID-only interface. If the object supports this
+// interface it can be discarded anytime. IWebBrowser::PutProperty QI's for
+// this interface to detect discardable properties.
+//
+
+ IID_IDiscardableBrowserProperty: TGUID = (D1:$49c3de7c; D2:$d329; D3:$11d0; D4:($ab, $73, $00, $c0, $4f, $c3, $3e, $80));
+ {$EXTERNALSYM IID_IDiscardableBrowserProperty}
+
+// IShellChangeNotify is a sink of LPCITEMIDLIST notification events
+//
+// D82BE2B1-5764-11D0-A96E-00C04FD705A2
+
+ IID_IShellChangeNotify: TGUID = (D1:$D82BE2B1; D2:$5764; D3:$11D0; D4:($A9, $6E, $00, $C0, $4F, $D7, $05, $A2));
+ {$EXTERNALSYM IID_IShellChangeNotify}
+
+//#endif // _WIN32_IE >= 0x0400
+
+ {$IFDEF UNICODE}
+
+ //#define IID_IFileViewer IID_IFileViewerW
+ //#define IID_IShellLink IID_IShellLinkW
+ //#define IID_IExtractIcon IID_IExtractIconW
+ //#define IID_IShellCopyHook IID_IShellCopyHookW
+ //#define IID_IShellExecuteHook IID_IShellExecuteHookW
+ //#define IID_INewShortcutHook IID_INewShortcutHookW
+
+ IID_IFileViewer: TGUID = (D1:$000214F8; D2:$0; D3:$0; D4:($C0,0,0,0,0,0,0,$46));
+ {$EXTERNALSYM IID_IFileViewer}
+ IID_IShellLink: TGUID = (D1:$000214F9; D2:$0; D3:$0; D4:($C0,0,0,0,0,0,0,$46));
+ {$EXTERNALSYM IID_IShellLink}
+ IID_IExtractIcon: TGUID = (D1:$000214FA; D2:$0; D3:$0; D4:($C0,0,0,0,0,0,0,$46));
+ {$EXTERNALSYM IID_IExtractIcon}
+ IID_IShellExecuteHook: TGUID = (D1:$000214FB; D2:$0; D3:$0; D4:($C0,0,0,0,0,0,0,$46));
+ {$EXTERNALSYM IID_IShellExecuteHook}
+ IID_IShellCopyHook: TGUID = (D1:$000214FC; D2:$0; D3:$0; D4:($C0,0,0,0,0,0,0,$46));
+ {$EXTERNALSYM IID_IShellCopyHook}
+ IID_INewShortcutHook: TGUID = (D1:$000214F7; D2:$0; D3:$0; D4:($C0,0,0,0,0,0,0,$46));
+ {$EXTERNALSYM IID_INewShortcutHook}
+
+ {$ELSE}
+
+ //#define IID_IFileViewer IID_IFileViewerA
+ //#define IID_IShellLink IID_IShellLinkA
+ //#define IID_IExtractIcon IID_IExtractIconA
+ //#define IID_IShellCopyHook IID_IShellCopyHookA
+ //#define IID_IShellExecuteHook IID_IShellExecuteHookA
+ //#define IID_INewShortcutHook IID_INewShortcutHookA
+
+ IID_IFileViewer: TGUID = (D1:$000214F0; D2:$0; D3:$0; D4:($C0,0,0,0,0,0,0,$46));
+ {$EXTERNALSYM IID_IFileViewer}
+ IID_IShellLink: TGUID = (D1:$000214EE; D2:$0; D3:$0; D4:($C0,0,0,0,0,0,0,$46));
+ {$EXTERNALSYM IID_IShellLink}
+ IID_IExtractIcon: TGUID = (D1:$000214EB; D2:$0; D3:$0; D4:($C0,0,0,0,0,0,0,$46));
+ {$EXTERNALSYM IID_IExtractIcon}
+ IID_IShellCopyHook: TGUID = (D1:$000214EF; D2:$0; D3:$0; D4:($C0,0,0,0,0,0,0,$46));
+ {$EXTERNALSYM IID_IShellCopyHook}
+ IID_IShellExecuteHook: TGUID = (D1:$000214F5; D2:$0; D3:$0; D4:($C0,0,0,0,0,0,0,$46));
+ {$EXTERNALSYM IID_IShellExecuteHook}
+ IID_INewShortcutHook: TGUID = (D1:$000214E1; D2:$0; D3:$0; D4:($C0,0,0,0,0,0,0,$46));
+ {$EXTERNALSYM IID_INewShortcutHook}
+
+ {$ENDIF UNICODE}
+
+//#if (_WIN32_IE >= 0x0400)
+
+// UrlHistory Guids
+
+ CLSID_CUrlHistory: TGUID = (D1:$3C374A40; D2:$BAE4; D3:$11CF; D4:($BF, $7D, $00, $AA, $00, $69, $46, $EE));
+ {$EXTERNALSYM CLSID_CUrlHistory}
+
+//#define SID_SUrlHistory CLSID_CUrlHistory
+
+ SID_SUrlHistory: TGUID = (D1:$3C374A40; D2:$BAE4; D3:$11CF; D4:($BF, $7D, $00, $AA, $00, $69, $46, $EE));
+ {$EXTERNALSYM SID_SUrlHistory}
+
+//UrlSearchHook Guids
+
+ CLSID_CURLSearchHook: TGUID = (D1:$CFBFAE00; D2:$17A6; D3:$11D0; D4:($99, $CB, $00, $C0, $4F, $D6, $44, $97));
+ {$EXTERNALSYM CLSID_CURLSearchHook}
+
+//#define SID_SInternetExplorer IID_IWebBrowserApp
+//#define SID_SWebBrowserApp IID_IWebBrowserApp
+
+// AutoComplete Guids
+
+ IID_IAutoCompList: TGUID = (D1:$00BB2760; D2:$6A77; D3:$11D0; D4:($A5, $35, $00, $C0, $4F, $D7, $D0, $62));
+ {$EXTERNALSYM IID_IAutoCompList}
+ IID_IObjMgr: TGUID = (D1:$00BB2761; D2:$6A77; D3:$11D0; D4:($A5, $35, $00, $C0, $4F, $D7, $D0, $62));
+ {$EXTERNALSYM IID_IObjMgr}
+ IID_IACList: TGUID = (D1:$77A130B0; D2:$94FD; D3:$11D0; D4:($A5, $44, $00, $C0, $4F, $D7, $d0, $62));
+ {$EXTERNALSYM IID_IACList}
+ IID_IACList2: TGUID = (D1:$470141a0; D2:$5186; D3:$11d2; D4:($bb, $b6, $00, $60, $97, $7b, $46, $4c));
+ {$EXTERNALSYM IID_IACList2}
+ IID_ICurrentWorkingDirectory: TGUID = (D1:$91956d21; D2:$9276; D3:$11d1; D4:($92, $1a, $00, $60, $97, $df, $5b, $d4)); // {91956D21-9276-11d1-921A-006097DF5BD));
+ {$EXTERNALSYM IID_ICurrentWorkingDirectory}
+ CLSID_AutoComplete: TGUID = (D1:$00BB2763; D2:$6A77; D3:$11D0; D4:($A5, $35, $00, $C0, $4F, $D7, $D0, $62));
+ {$EXTERNALSYM CLSID_AutoComplete}
+ CLSID_ACLHistory: TGUID = (D1:$00BB2764; D2:$6A77; D3:$11D0; D4:($A5, $35, $00, $C0, $4F, $D7, $D0, $62));
+ {$EXTERNALSYM CLSID_ACLHistory}
+ CLSID_ACListISF: TGUID = (D1:$03C036F1; D2:$A186; D3:$11D0; D4:($82, $4A, $00, $AA, $00, $5B, $43, $83));
+ {$EXTERNALSYM CLSID_ACListISF}
+ CLSID_ACLMRU: TGUID = (D1:$6756a641; D2:$de71; D3:$11d0; D4:($83, $1b, $0, $aa, $0, $5b, $43, $83)); // {6756A641-DE71-11d0-831B-00AA005B438));
+ {$EXTERNALSYM CLSID_ACLMRU}
+ CLSID_ACLMulti: TGUID = (D1:$00BB2765; D2:$6A77; D3:$11D0; D4:($A5, $35, $00, $C0, $4F, $D7, $D0, $62));
+ {$EXTERNALSYM CLSID_ACLMulti}
+//#if (_WIN32_IE >= 0x0600)
+ CLSID_ACLCustomMRU: TGUID = (D1:$6935db93; D2:$21e8; D3:$4ccc; D4:($be, $b9, $9f, $e3, $c7, $7a, $29, $7a));
+ {$EXTERNALSYM CLSID_ACLCustomMRU}
+//#endif
+
+//#if (_WIN32_IE >= 0x0500)
+/// IProgressDialog
+// {F8383852-FCD3-11d1-A6B9-006097DF5BD4}
+ CLSID_ProgressDialog: TGUID = (D1:$f8383852; D2:$fcd3; D3:$11d1; D4:($a6, $b9, $0, $60, $97, $df, $5b, $d4));
+ {$EXTERNALSYM CLSID_ProgressDialog}
+// {EBBC7C04-315E-11d2-B62F-006097DF5BD4}
+ IID_IProgressDialog: TGUID = (D1:$ebbc7c04; D2:$315e; D3:$11d2; D4:($b6, $2f, $0, $60, $97, $df, $5b, $d4));
+ {$EXTERNALSYM IID_IProgressDialog}
+//#endif // _WIN32_IE >= 0x0500
+
+//
+// Progress objects exposed via QueryService
+//
+
+//#define SID_SProgressUI CLSID_ProgressDialog
+
+ SID_SProgressUI: TGUID = (D1:$f8383852; D2:$fcd3; D3:$11d1; D4:($a6, $b9, $0, $60, $97, $df, $5b, $d4));
+ {$EXTERNALSYM SID_SProgressUI}
+
+//
+// Top-most browser implementation in the heirarchy. use IServiceProvider::QueryService()
+// to get to interfaces (IID_IShellBrowser, IID_IBrowserService, etc.)
+//
+
+ SID_STopLevelBrowser: TGUID = (D1:$4C96BE40; D2:$915C; D3:$11CF; D4:($99, $D3, $00, $AA, $00, $4A, $E8, $37));
+ {$EXTERNALSYM SID_STopLevelBrowser}
+
+//#endif // _WIN32_IE >= 0x0400
+
+//#if (_WIN32_IE >= 0x0400)
+
+// {75048700-EF1F-11D0-9888-006097DEACF9}
+
+ CLSID_ActiveDesktop: TGUID = (D1:$75048700; D2:$EF1F; D3:$11D0; D4:($98, $88, $00, $60, $97, $DE, $AC, $F9));
+ {$EXTERNALSYM CLSID_ActiveDesktop}
+
+// {F490EB00-1240-11D1-9888-006097DEACF9}
+
+ IID_IActiveDesktop: TGUID = (D1:$F490EB00; D2:$1240; D3:$11D1; D4:($98, $88, $00, $60, $97, $DE, $AC, $F9));
+ {$EXTERNALSYM IID_IActiveDesktop}
+
+// {74C26041-70D1-11d1-B75A-00A0C90564FE}
+
+ IID_ISynchronizedCallBack: TGUID = (D1:$74c26041; D2:$70d1; D3:$11d1; D4:($b7, $5a, $0, $a0, $c9, $5, $64, $fe));
+ {$EXTERNALSYM IID_ISynchronizedCallBack}
+
+// Extended column handler interfaces
+// {D2A105C0-87D5-11d1-8391-0000F80461CF}
+
+ IID_IShellDetails3: TGUID = (D1:$d2a105c0; D2:$87d5; D3:$11d1; D4:($83, $91, $0, $0, $f8, $4, $61, $cf));
+ {$EXTERNALSYM IID_IShellDetails3}
+
+// {c46ca590-3c3f-11d2-bee6-0000f805ca57}
+
+ IID_IQueryAssociations: TGUID = (D1:$c46ca590; D2:$3c3f; D3:$11d2; D4:($be, $e6, $00, $00, $f8, $05, $ca, $57));
+ {$EXTERNALSYM IID_IQueryAssociations}
+
+// {a07034fd-6caa-4954-ac3f-97a27216f98a}
+
+ CLSID_QueryAssociations: TGUID = (D1:$a07034fd; D2:$6caa; D3:$4954; D4:($ac, $3f, $97, $a2, $72, $16, $f9, $8a));
+ {$EXTERNALSYM CLSID_QueryAssociations}
+
+// {E8025004-1C42-11d2-BE2C-00A0C9A83DA1}
+
+ IID_IColumnProvider: TGUID = (D1:$e8025004; D2:$1c42; D3:$11d2; D4:($be, $2c, $0, $a0, $c9, $a8, $3d, $a1));
+ {$EXTERNALSYM IID_IColumnProvider}
+
+// {24F14F01-7B1C-11d1-838f-0000F80461CF}
+
+ CLSID_DocFileColumnProvider: TGUID = (D1:$24f14f01; D2:$7b1c; D3:$11d1; D4:($83, $8f, $0, $0, $f8, $4, $61, $cf));
+ {$EXTERNALSYM CLSID_DocFileColumnProvider}
+
+// {24F14F02-7B1C-11d1-838f-0000F80461CF}
+
+ CLSID_LinkColumnProvider: TGUID = (D1:$24f14f02; D2:$7b1c; D3:$11d1; D4:($83, $8f, $0, $0, $f8, $4, $61, $cf));
+ {$EXTERNALSYM CLSID_LinkColumnProvider}
+
+// {0D2E74C4-3C34-11d2-A27E-00C04FC30871}
+
+ CLSID_FileSysColumnProvider: TGUID = (D1:$d2e74c4; D2:$3c34; D3:$11d2; D4:($a2, $7e, $0, $c0, $4f, $c3, $8, $71));
+ {$EXTERNALSYM CLSID_FileSysColumnProvider}
+
+// For Internet Shortcut Creation Command
+// The shell uses this command to allow trident to save off it's per frame data in the shortcut
+// and to allow it to fire the OnPersist() event on every frame
+// {93A68750-951A-11d1-946F-000000000000}
+
+ CGID_ShortCut: TGUID = (D1:$93a68750; D2:$951a; D3:$11d1; D4:($94, $6f, $0, $0, $0, $0, $0, $0));
+ {$EXTERNALSYM CGID_ShortCut}
+
+// {FB700430-952C-11d1-946F-000000000000}
+
+ IID_INamedPropertyBag: TGUID = (D1:$fb700430; D2:$952c; D3:$11d1; D4:($94, $6f, $0, $0, $0, $0, $0, $0));
+ {$EXTERNALSYM IID_INamedPropertyBag}
+
+// {1E796980-9CC5-11D1-A83F-00C04FC99D61}
+
+ CLSID_InternetButtons: TGUID = (D1:$1E796980; D2:$9CC5; D3:$11D1; D4:($A8, $3F, $00, $C0, $4F, $C9, $9D, $61));
+ {$EXTERNALSYM CLSID_InternetButtons}
+
+//#if (_WIN32_IE >= 0x0500)
+// {178F34B8-A282-11d2-86C5-00C04F8EEA99}
+
+ CLSID_MSOButtons: TGUID = (D1:$178f34b8; D2:$a282; D3:$11d2; D4:($86, $c5, $0, $c0, $4f, $8e, $ea, $99));
+ {$EXTERNALSYM CLSID_MSOButtons}
+
+// {2CE4B5D8-A28F-11d2-86C5-00C04F8EEA99}
+
+ CLSID_ToolbarExtButtons: TGUID = (D1:$2ce4b5d8; D2:$a28f; D3:$11d2; D4:($86, $c5, $0, $c0, $4f, $8e, $ea, $99));
+ {$EXTERNALSYM CLSID_ToolbarExtButtons}
+//#endif // _WIN32_IE >= 0x0500
+
+// {CFCCC7A0-A282-11D1-9082-006008059382}
+
+ CLSID_DarwinAppPublisher: TGUID = (D1:$CFCCC7A0; D2:$A282; D3:$11D1; D4:($90, $82, $00, $60, $08, $05, $93, $82));
+ {$EXTERNALSYM CLSID_DarwinAppPublisher}
+
+// {7057E952-BD1B-11d1-8919-00C04FC2C836}
+
+ CLSID_DocHostUIHandler: TGUID = (D1:$7057e952; D2:$bd1b; D3:$11d1; D4:($89, $19, $0, $c0, $4f, $c2, $c8, $36));
+ {$EXTERNALSYM CLSID_DocHostUIHandler}
+//#endif // _WIN32_IE >= 0x0400
+
+//#if (_WIN32_IE >= 0x0500)
+
+// {93F2F68C-1D1B-11d3-A30E-00C04F79ABD1}
+
+ IID_IShellFolder2: TGUID = (D1:$93f2f68c; D2:$1d1b; D3:$11d3; D4:($a3, $e, $0, $c0, $4f, $79, $ab, $d1));
+ {$EXTERNALSYM IID_IShellFolder2}
+
+ PSGUID_SHELLDETAILS: TGUID = (D1:$28636aa6; D2:$953d; D3:$11d2; D4:($b5, $d6, $0, $c0, $4f, $d9, $18, $d0));
+ {$EXTERNALSYM PSGUID_SHELLDETAILS}
+ FMTID_ShellDetails: TGUID = (D1:$28636aa6; D2:$953d; D3:$11d2; D4:($b5, $d6, $0, $c0, $4f, $d9, $18, $d0));
+ {$EXTERNALSYM FMTID_ShellDetails}
+
+ PID_FINDDATA = 0;
+ {$EXTERNALSYM PID_FINDDATA}
+ PID_NETRESOURCE = 1;
+ {$EXTERNALSYM PID_NETRESOURCE}
+ PID_DESCRIPTIONID = 2;
+ {$EXTERNALSYM PID_DESCRIPTIONID}
+ PID_WHICHFOLDER = 3;
+ {$EXTERNALSYM PID_WHICHFOLDER}
+ PID_NETWORKLOCATION = 4;
+ {$EXTERNALSYM PID_NETWORKLOCATION}
+ PID_COMPUTERNAME = 5;
+ {$EXTERNALSYM PID_COMPUTERNAME}
+
+// PSGUID_STORAGE comes from ntquery.h
+//#define PSGUID_STORAGE {0xb725f130, 0x47ef, 0x101a, 0xa5, 0xf1, 0x02, 0x60, 0x8c, 0x9e, 0xeb, 0xac}
+
+ FMTID_Storage: TGUID = (D1:$b725f130; D2:$47ef; D3:$101a; D4:($a5, $f1, $02, $60, $8c, $9e, $eb, $ac));
+ {$EXTERNALSYM FMTID_Storage}
+
+// Image properties
+
+ PSGUID_IMAGEPROPERTIES: TGUID = (D1:$14b81da1; D2:$0135; D3:$4d31; D4:($96, $d9, $6c, $bf, $c9, $67, $1a, $99));
+ {$EXTERNALSYM PSGUID_IMAGEPROPERTIES}
+
+ FMTID_ImageProperties: TGUID = (D1:$14b81da1; D2:$0135; D3:$4d31; D4:($96, $d9, $6c, $bf, $c9, $67, $1a, $99));
+ {$EXTERNALSYM FMTID_ImageProperties}
+
+// The GUIDs used to identify shell item attributes (columns). See IShellFolder2::GetDetailsEx implementations...
+
+// {9B174B33-40FF-11d2-A27E-00C04FC30871}
+
+ PSGUID_DISPLACED: TGUID = (D1:$9b174b33; D2:$40ff; D3:$11d2; D4:($a2, $7e, $0, $c0, $4f, $c3, $8, $71));
+ {$EXTERNALSYM PSGUID_DISPLACED}
+
+ FMTID_Displaced: TGUID = (D1:$9b174b33; D2:$40ff; D3:$11d2; D4:($a2, $7e, $0, $c0, $4f, $c3, $8, $71));
+ {$EXTERNALSYM FMTID_Displaced}
+
+ PID_DISPLACED_FROM = 2;
+ {$EXTERNALSYM PID_DISPLACED_FROM}
+ PID_DISPLACED_DATE = 3;
+ {$EXTERNALSYM PID_DISPLACED_DATE}
+
+// {328D8B21-7729-4bfc-954C-902B329D56B0}
+
+ PSGUID_BRIEFCASE: TGUID = (D1:$328d8b21; D2:$7729; D3:$4bfc; D4:($95, $4c, $90, $2b, $32, $9d, $56, $b0));
+ {$EXTERNALSYM PSGUID_BRIEFCASE}
+
+ FMTID_Briefcase: TGUID = (D1:$328d8b21; D2:$7729; D3:$4bfc; D4:($95, $4c, $90, $2b, $32, $9d, $56, $b0));
+ {$EXTERNALSYM FMTID_Briefcase}
+
+ PID_SYNC_COPY_IN = 2;
+ {$EXTERNALSYM PID_SYNC_COPY_IN}
+
+// {9B174B34-40FF-11d2-A27E-00C04FC30871}
+
+ PSGUID_MISC: TGUID = (D1:$9b174b34; D2:$40ff; D3:$11d2; D4:($a2, $7e, $0, $c0, $4f, $c3, $8, $71));
+ {$EXTERNALSYM PSGUID_MISC}
+
+ FMTID_Misc: TGUID = (D1:$9b174b34; D2:$40ff; D3:$11d2; D4:($a2, $7e, $0, $c0, $4f, $c3, $8, $71));
+ {$EXTERNALSYM FMTID_Misc}
+
+ PID_MISC_STATUS = 2;
+ {$EXTERNALSYM PID_MISC_STATUS}
+ PID_MISC_ACCESSCOUNT = 3;
+ {$EXTERNALSYM PID_MISC_ACCESSCOUNT}
+ PID_MISC_OWNER = 4;
+ {$EXTERNALSYM PID_MISC_OWNER}
+ PID_HTMLINFOTIPFILE = 5;
+ {$EXTERNALSYM PID_HTMLINFOTIPFILE}
+ PID_MISC_PICS = 6;
+ {$EXTERNALSYM PID_MISC_PICS}
+
+// {F2275480-F782-4291-BD94-F13693513AEC}
+
+ PSGUID_WEBVIEW: TGUID = (D1:$f2275480; D2:$f782; D3:$4291; D4:($bd, $94, $f1, $36, $93, $51, $3a, $ec));
+ {$EXTERNALSYM PSGUID_WEBVIEW}
+
+ FMTID_WebView: TGUID = (D1:$f2275480; D2:$f782; D3:$4291; D4:($bd, $94, $f1, $36, $93, $51, $3a, $ec));
+ {$EXTERNALSYM FMTID_WebView}
+
+ PID_DISPLAY_PROPERTIES = 0;
+ {$EXTERNALSYM PID_DISPLAY_PROPERTIES}
+ PID_INTROTEXT = 1;
+ {$EXTERNALSYM PID_INTROTEXT}
+
+// {56A3372E-CE9C-11d2-9F0E-006097C686F6}
+
+ PSGUID_MUSIC: TGUID = (D1:$56a3372e; D2:$ce9c; D3:$11d2; D4:($9f, $e, $0, $60, $97, $c6, $86, $f6));
+ {$EXTERNALSYM PSGUID_MUSIC}
+
+ FMTID_MUSIC: TGUID = (D1:$56a3372e; D2:$ce9c; D3:$11d2; D4:($9f, $e, $0, $60, $97, $c6, $86, $f6));
+ {$EXTERNALSYM FMTID_MUSIC}
+
+ PIDSI_ARTIST = 2;
+ {$EXTERNALSYM PIDSI_ARTIST}
+ PIDSI_SONGTITLE = 3;
+ {$EXTERNALSYM PIDSI_SONGTITLE}
+ PIDSI_ALBUM = 4;
+ {$EXTERNALSYM PIDSI_ALBUM}
+ PIDSI_YEAR = 5;
+ {$EXTERNALSYM PIDSI_YEAR}
+ PIDSI_COMMENT = 6;
+ {$EXTERNALSYM PIDSI_COMMENT}
+ PIDSI_TRACK = 7;
+ {$EXTERNALSYM PIDSI_TRACK}
+ PIDSI_GENRE = 11;
+ {$EXTERNALSYM PIDSI_GENRE}
+ PIDSI_LYRICS = 12;
+ {$EXTERNALSYM PIDSI_LYRICS}
+
+// {AEAC19E4-89AE-4508-B9B7-BB867ABEE2ED}
+
+ PSGUID_DRM: TGUID = (D1:$aeac19e4; D2:$89ae; D3:$4508; D4:($b9, $b7, $bb, $86, $7a, $be, $e2, $ed));
+ {$EXTERNALSYM PSGUID_DRM}
+
+ FMTID_DRM: TGUID = (D1:$aeac19e4; D2:$89ae; D3:$4508; D4:($b9, $b7, $bb, $86, $7a, $be, $e2, $ed));
+ {$EXTERNALSYM FMTID_DRM}
+
+ PIDDRSI_PROTECTED = 2;
+ {$EXTERNALSYM PIDDRSI_PROTECTED}
+ PIDDRSI_DESCRIPTION = 3;
+ {$EXTERNALSYM PIDDRSI_DESCRIPTION}
+ PIDDRSI_PLAYCOUNT = 4;
+ {$EXTERNALSYM PIDDRSI_PLAYCOUNT}
+ PIDDRSI_PLAYSTARTS = 5;
+ {$EXTERNALSYM PIDDRSI_PLAYSTARTS}
+ PIDDRSI_PLAYEXPIRES = 6;
+ {$EXTERNALSYM PIDDRSI_PLAYEXPIRES}
+
+//#define PSGUID_VIDEO {0x64440491, 0x4c8b, 0x11d1, 0x8b, 0x70, 0x8, 0x0, 0x36, 0xb1, 0x1a, 0x3}
+// FMTID_VideoSummaryInformation property identifiers
+
+ PIDVSI_STREAM_NAME = $00000002; // "StreamName", VT_LPWSTR
+ {$EXTERNALSYM PIDVSI_STREAM_NAME}
+ PIDVSI_FRAME_WIDTH = $00000003; // "FrameWidth", VT_UI4
+ {$EXTERNALSYM PIDVSI_FRAME_WIDTH}
+ PIDVSI_FRAME_HEIGHT = $00000004; // "FrameHeight", VT_UI4
+ {$EXTERNALSYM PIDVSI_FRAME_HEIGHT}
+ PIDVSI_TIMELENGTH = $00000007; // "TimeLength", VT_UI4, milliseconds
+ {$EXTERNALSYM PIDVSI_TIMELENGTH}
+ PIDVSI_FRAME_COUNT = $00000005; // "FrameCount". VT_UI4
+ {$EXTERNALSYM PIDVSI_FRAME_COUNT}
+ PIDVSI_FRAME_RATE = $00000006; // "FrameRate", VT_UI4, frames/millisecond
+ {$EXTERNALSYM PIDVSI_FRAME_RATE}
+ PIDVSI_DATA_RATE = $00000008; // "DataRate", VT_UI4, bytes/second
+ {$EXTERNALSYM PIDVSI_DATA_RATE}
+ PIDVSI_SAMPLE_SIZE = $00000009; // "SampleSize", VT_UI4
+ {$EXTERNALSYM PIDVSI_SAMPLE_SIZE}
+ PIDVSI_COMPRESSION = $0000000A; // "Compression", VT_LPWSTR
+ {$EXTERNALSYM PIDVSI_COMPRESSION}
+ PIDVSI_STREAM_NUMBER = $0000000B; // "StreamNumber", VT_UI2
+ {$EXTERNALSYM PIDVSI_STREAM_NUMBER}
+
+//#define PSGUID_AUDIO {0x64440490, 0x4c8b, 0x11d1, 0x8b, 0x70, 0x8, 0x0, 0x36, 0xb1, 0x1a, 0x3}
+// FMTID_AudioSummaryInformation property identifiers
+
+ PIDASI_FORMAT = $00000002; // VT_BSTR
+ {$EXTERNALSYM PIDASI_FORMAT}
+ PIDASI_TIMELENGTH = $00000003; // VT_UI4, milliseconds
+ {$EXTERNALSYM PIDASI_TIMELENGTH}
+ PIDASI_AVG_DATA_RATE = $00000004; // VT_UI4, Hz
+ {$EXTERNALSYM PIDASI_AVG_DATA_RATE}
+ PIDASI_SAMPLE_RATE = $00000005; // VT_UI4, bits
+ {$EXTERNALSYM PIDASI_SAMPLE_RATE}
+ PIDASI_SAMPLE_SIZE = $00000006; // VT_UI4, bits
+ {$EXTERNALSYM PIDASI_SAMPLE_SIZE}
+ PIDASI_CHANNEL_COUNT = $00000007; // VT_UI4
+ {$EXTERNALSYM PIDASI_CHANNEL_COUNT}
+ PIDASI_STREAM_NUMBER = $00000008; // VT_UI2
+ {$EXTERNALSYM PIDASI_STREAM_NUMBER}
+ PIDASI_STREAM_NAME = $00000009; // VT_LPWSTR
+ {$EXTERNALSYM PIDASI_STREAM_NAME}
+ PIDASI_COMPRESSION = $0000000A; // VT_LPWSTR
+ {$EXTERNALSYM PIDASI_COMPRESSION}
+
+// {305CA226-D286-468e-B848-2B2E8E697B74}
+
+//#define PSGUID_CONTROLPANEL {0x305ca226, 0xd286, 0x468e, 0xb8, 0x48, 0x2b, 0x2e, 0x8e, 0x69, 0x7b, 0x74}
+
+ PID_CONTROLPANEL_CATEGORY = 2;
+ {$EXTERNALSYM PID_CONTROLPANEL_CATEGORY}
+
+// {9B174B35-40FF-11d2-A27E-00C04FC30871}
+
+ PSGUID_VOLUME: TGUID = (D1:$9b174b35; D2:$40ff; D3:$11d2; D4:($a2, $7e, $0, $c0, $4f, $c3, $8, $71));
+ {$EXTERNALSYM PSGUID_VOLUME}
+
+ FMTID_Volume: TGUID = (D1:$9b174b35; D2:$40ff; D3:$11d2; D4:($a2, $7e, $0, $c0, $4f, $c3, $8, $71));
+ {$EXTERNALSYM FMTID_Volume}
+
+ PID_VOLUME_FREE = 2;
+ {$EXTERNALSYM PID_VOLUME_FREE}
+ PID_VOLUME_CAPACITY = 3;
+ {$EXTERNALSYM PID_VOLUME_CAPACITY}
+ PID_VOLUME_FILESYSTEM = 4;
+ {$EXTERNALSYM PID_VOLUME_FILESYSTEM}
+
+// {D8C3986F-813B-449c-845D-87B95D674ADE}
+
+//#define PSGUID_SHARE {0xd8c3986f, 0x813b, 0x449c, 0x84, 0x5d, 0x87, 0xb9, 0x5d, 0x67, 0x4a, 0xde}
+
+ PID_SHARE_CSC_STATUS = 2;
+ {$EXTERNALSYM PID_SHARE_CSC_STATUS}
+
+// {B9B4B3FC-2B51-4a42-B5D8-324146AFCF25}
+
+//#define PSGUID_LINK {0xb9b4b3fc, 0x2b51, 0x4a42, 0xb5, 0xd8, 0x32, 0x41, 0x46, 0xaf, 0xcf, 0x25}
+
+ PID_LINK_TARGET = 2;
+ {$EXTERNALSYM PID_LINK_TARGET}
+
+ PSGUID_QUERY_D: TGUID = (D1:$49691c90; D2:$7e17; D3:$101a; D4:($a9,$1c,$08,$00,$2b,$2e,$cd,$a9));
+ {$EXTERNALSYM PSGUID_QUERY_D}
+
+ FMTID_Query: TGUID = (D1:$49691c90; D2:$7e17; D3:$101a; D4:($a9,$1c,$08,$00,$2b,$2e,$cd,$a9));
+ {$EXTERNALSYM FMTID_Query}
+
+ PID_QUERY_RANK = 2;
+ {$EXTERNALSYM PID_QUERY_RANK}
+
+// FMTID_SummaryInformation, see OLE docs for PID_ values for these
+
+//#define PSGUID_SUMMARYINFORMATION {0xf29f85e0L, 0x4ff9, 0x1068, 0xab, 0x91, 0x08, 0x00, 0x2b, 0x27, 0xb3, 0xd9}
+
+// FMTID_DocumentSummaryInformation, see OLE docs on the PID_ values for this
+
+//#define PSGUID_DOCUMENTSUMMARYINFORMATION {0xd5cdd502L, 0x2e9c, 0x101b, 0x93, 0x97, 0x08, 0x00, 0x2b, 0x2c, 0xf9, 0xae}
+
+// FMTID_MediaFileSummaryInformation, see propidl.h PID_ values for this
+
+//#define PSGUID_MEDIAFILESUMMARYINFORMATION {0x64440492L, 0x4c8b, 0x11d1, 0x8b, 0x70, 0x08, 0x00, 0x36, 0xb1, 0x1a, 0x03}
+
+// FMTID_ImageSummaryInformation,, see propidl.h PID_ values for this
+
+//#define PSGUID_IMAGESUMMARYINFORMATION {0x6444048fL, 0x4c8b, 0x11d1, 0x8b, 0x70, 0x8, 0x00, 0x36, 0xb1, 0x1a, 0x03}
+
+// {0E700BE1-9DB6-11d1-A1CE-00C04FD75D13}
+
+ IID_IEnumExtraSearch: TGUID = (D1:$e700be1; D2:$9db6; D3:$11d1; D4:($a1, $ce, $0, $c0, $4f, $d7, $5d, $13));
+ {$EXTERNALSYM IID_IEnumExtraSearch}
+
+// {12518493-00B2-11d2-9FA5-9E3420524153}
+
+ CLSID_MountedVolume: TGUID = (D1:$12518493; D2:$00B2; D3:$11d2; D4:($9F, $A5, $9E, $34, $20, $52, $41, $53));
+ {$EXTERNALSYM CLSID_MountedVolume}
+
+// {FFB8655F-81B9-4fce-B89C-9A6BA76D13E7}
+
+ CLSID_HWShellExecute: TGUID = (D1:$ffb8655f; D2:$81b9; D3:$4fce; D4:($b8, $9c, $9a, $6b, $a7, $6d, $13, $e7));
+ {$EXTERNALSYM CLSID_HWShellExecute}
+
+// {12518492-00B2-11d2-9FA5-9E3420524153}
+
+ IID_IMountedVolume: TGUID = (D1:$12518492; D2:$00B2; D3:$11d2; D4:($9F, $A5, $9E, $34, $20, $52, $41, $53));
+ {$EXTERNALSYM IID_IMountedVolume}
+
+// {4657278A-411B-11d2-839A-00C04FD918D0}
+
+ CLSID_DragDropHelper: TGUID = (D1:$4657278a; D2:$411b; D3:$11d2; D4:($83, $9a, $0, $c0, $4f, $d9, $18, $d0));
+ {$EXTERNALSYM CLSID_DragDropHelper}
+
+// {4657278B-411B-11d2-839A-00C04FD918D0}
+
+ IID_IDropTargetHelper: TGUID = (D1:$4657278b; D2:$411b; D3:$11d2; D4:($83, $9a, $0, $c0, $4f, $d9, $18, $d0));
+ {$EXTERNALSYM IID_IDropTargetHelper}
+
+// {DE5BF786-477A-11d2-839D-00C04FD918D0}
+
+ IID_IDragSourceHelper: TGUID = (D1:$de5bf786; D2:$477a; D3:$11d2; D4:($83, $9d, $0, $c0, $4f, $d9, $18, $d0));
+ {$EXTERNALSYM IID_IDragSourceHelper}
+
+// {3050f3BB-98b5-11cf-bb82-00aa00bdce0b}
+
+ CLSID_CAnchorBrowsePropertyPage: TGUID = (D1:$3050f3BB; D2:$98b5; D3:$11cf; D4:($bb, $82, $00, $aa, $00, $bd, $ce, $0b));
+ {$EXTERNALSYM CLSID_CAnchorBrowsePropertyPage}
+
+// {3050f3B3-98b5-11cf-bb82-00aa00bdce0b}
+
+ CLSID_CImageBrowsePropertyPage: TGUID = (D1:$3050f3B3; D2:$98b5; D3:$11cf; D4:($bb, $82, $00, $aa, $00, $bd, $ce, $0b));
+ {$EXTERNALSYM CLSID_CImageBrowsePropertyPage}
+
+// {3050f3B4-98b5-11cf-bb82-00aa00bdce0b}
+
+ CLSID_CDocBrowsePropertyPage: TGUID = (D1:$3050f3B4; D2:$98b5; D3:$11cf; D4:($bb, $82, $00, $aa, $00, $bd, $ce, $0b));
+ {$EXTERNALSYM CLSID_CDocBrowsePropertyPage}
+
+// {01E18D10-4D8B-11d2-855D-006008059367}
+
+ IID_IFileSystemBindData: TGUID = (D1:$1e18d10; D2:$4d8b; D3:$11d2; D4:($85, $5d, $0, $60, $8, $5, $93, $67));
+ {$EXTERNALSYM IID_IFileSystemBindData}
+
+// {49E1B500-4636-11d3-97F7-00C04F45D0B3}
+
+ SID_STopWindow: TGUID = (D1:$49e1b500; D2:$4636; D3:$11d3; D4:($97, $f7, $0, $c0, $4f, $45, $d0, $b3));
+ {$EXTERNALSYM SID_STopWindow}
+
+// {889A935D-971E-4B12-B90C-24DFC9E1E5E8}
+
+ SID_SGetViewFromViewDual: TGUID = (D1:$889A935D; D2:$971E; D3:$4B12; D4:($B9, $0C, $24, $DF, $C9, $E1, $E5, $E8));
+ {$EXTERNALSYM SID_SGetViewFromViewDual}
+
+// BHIDs for IShellItem::BindToHandler()
+//#define BHID_LocalCopyHelper CLSID_LocalCopyHelper
+// {3981e224-f559-11d3-8e3a-00c04f6837d5}
+
+ BHID_SFObject: TGUID = (D1:$3981e224; D2:$f559; D3:$11d3; D4:($8e, $3a, $00, $c0, $4f, $68, $37, $d5));
+ {$EXTERNALSYM BHID_SFObject}
+
+// {3981e225-f559-11d3-8e3a-00c04f6837d5}
+
+ BHID_SFUIObject: TGUID = (D1:$3981e225; D2:$f559; D3:$11d3; D4:($8e, $3a, $00, $c0, $4f, $68, $37, $d5));
+ {$EXTERNALSYM BHID_SFUIObject}
+
+// {3981e226-f559-11d3-8e3a-00c04f6837d5}
+
+ BHID_SFViewObject: TGUID = (D1:$3981e226; D2:$f559; D3:$11d3; D4:($8e, $3a, $00, $c0, $4f, $68, $37, $d5));
+ {$EXTERNALSYM BHID_SFViewObject}
+
+// {3981e227-f559-11d3-8e3a-00c04f6837d5}
+
+ BHID_Storage: TGUID = (D1:$3981e227; D2:$f559; D3:$11d3; D4:($8e, $3a, $00, $c0, $4f, $68, $37, $d5));
+ {$EXTERNALSYM BHID_Storage}
+
+// {1CEBB3AB-7C10-499a-A417-92CA16C4CB83}
+
+ BHID_Stream: TGUID = (D1:$1cebb3ab; D2:$7c10; D3:$499a; D4:($a4, $17, $92, $ca, $16, $c4, $cb, $83));
+ {$EXTERNALSYM BHID_Stream}
+
+// {3981e228-f559-11d3-8e3a-00c04f6837d5}
+
+ BHID_LinkTargetItem: TGUID = (D1:$3981e228; D2:$f559; D3:$11d3; D4:($8e, $3a, $00, $c0, $4f, $68, $37, $d5));
+ {$EXTERNALSYM BHID_LinkTargetItem}
+
+// {4621A4E3-F0D6-4773-8A9C-46E77B174840}
+
+ BHID_StorageEnum: TGUID = (D1:$4621a4e3; D2:$f0d6; D3:$4773; D4:($8a, $9c, $46, $e7, $7b, $17, $48, $40));
+ {$EXTERNALSYM BHID_StorageEnum}
+
+//#endif // _WIN32_IE >= 0x0500
+
+//#if _WIN32_IE >= 0x0600
+
+// {faadfc40-b777-4b69-aa81-77035ef0e6e8}
+
+ SID_CtxQueryAssociations: TGUID = (D1:$faadfc40; D2:$b777; D3:$4b69; D4:($aa, $81, $77, $03, $5e, $f0, $e6, $e8));
+ {$EXTERNALSYM SID_CtxQueryAssociations}
+
+//#endif // _WIN32_IE >= 0x0600
+
+//#endif // _SHLGUID_H_
+
+implementation
+
+end.
diff --git a/packages/extra/winunits/jwasisbkup.pas b/packages/extra/winunits/jwasisbkup.pas
index 5d0b979dc5..4037284cbe 100644
--- a/packages/extra/winunits/jwasisbkup.pas
+++ b/packages/extra/winunits/jwasisbkup.pas
@@ -1,253 +1,253 @@
-{******************************************************************************}
-{ }
-{ Single-Instance Store API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: sisbkup.h, released August 2001. The original Pascal }
-{ code is: SisBkUp.pas, released December 2001. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwasisbkup.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaSisBkUp;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "sisbkup.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaWinNT, JwaWinType;
-
-function SisCreateBackupStructure(volumeRoot: PWCHAR; var sisBackupStructure: PVOID; var commonStoreRootPathname: PWCHAR;
- countOfCommonStoreFilesToBackup: PULONG; var commonStoreFilesToBackup: PWCHAR): BOOL; stdcall;
-{$EXTERNALSYM SisCreateBackupStructure}
-
-function SisCSFilesToBackupForLink(sisBackupStructure, reparseData: PVOID; reparseDataSize: ULONG; thisFileContext: PVOID;
- matchingFileContext: PPVOID; countOfCommonStoreFilesToBackup: PULONG; var commonStoreFilesToBackup: PWCHAR): BOOL; stdcall;
-{$EXTERNALSYM SisCSFilesToBackupForLink}
-
-function SisFreeBackupStructure(sisBackupStructure: PVOID): BOOL; stdcall;
-{$EXTERNALSYM SisFreeBackupStructure}
-
-function SisCreateRestoreStructure(volumeRoot: PWCHAR; var sisRestoreStructure: PVOID; var commonStoreRootPathname: PWCHAR;
- countOfCommonStoreFilesToRestore: PULONG; var commonStoreFilesToRestore: PWCHAR): BOOL; stdcall;
-{$EXTERNALSYM SisCreateRestoreStructure}
-
-function SisRestoredLink(sisRestoreStructure: PVOID; restoredFileName: PWCHAR; reparseData: PVOID; reparseDataSize: ULONG;
- countOfCommonStoreFilesToRestore: PULONG; var commonStoreFilesToRestore: PWCHAR): BOOL; stdcall;
-{$EXTERNALSYM SisRestoredLink}
-
-function SisRestoredCommonStoreFile(sisRestoreStructure: PVOID; commonStoreFileName: PWCHAR): BOOL; stdcall;
-{$EXTERNALSYM SisRestoredCommonStoreFile}
-
-function SisFreeRestoreStructure(sisRestoreStructure: PVOID): BOOL; stdcall;
-{$EXTERNALSYM SisFreeRestoreStructure}
-
-function SisFreeAllocatedMemory(allocatedSpace: PVOID): BOOL; stdcall;
-{$EXTERNALSYM SisFreeAllocatedMemory}
-
-//
-// SIS entry function typedefs
-//
-
-type
- PF_SISCREATEBACKUPSTRUCTURE = function(volumeRoot: PWCHAR; var sisBackupStructure: PVOID; var commonStoreRootPathname: PWCHAR;
- countOfCommonStoreFilesToBackup: PULONG; var commonStoreFilesToBackup: PWCHAR): BOOL; stdcall;
- {$EXTERNALSYM PF_SISCREATEBACKUPSTRUCTURE}
- TSisCreateBackupStructure = PF_SISCREATEBACKUPSTRUCTURE;
-
- PF_SISCSFILESTOBACKUPFORLINK = function(sisBackupStructure, reparseData: PVOID; reparseDataSize: ULONG; thisFileContext: PVOID;
- matchingFileContext: PPVOID; countOfCommonStoreFilesToBackup: PULONG; var commonStoreFilesToBackup: PWCHAR): BOOL; stdcall;
- {$EXTERNALSYM PF_SISCSFILESTOBACKUPFORLINK}
- TSisCSFilesToBackupForLink = PF_SISCSFILESTOBACKUPFORLINK;
-
- PF_SISFREEBACKUPSTRUCTURE = function(sisBackupStructure: PVOID): BOOL; stdcall;
- {$EXTERNALSYM PF_SISFREEBACKUPSTRUCTURE}
- TSusFreeBackupStructure = PF_SISFREEBACKUPSTRUCTURE;
-
- PF_SISCREATERESTORESTRUCTURE = function(volumeRoot: PWCHAR; var sisRestoreStructure: PVOID; var commonStoreRootPathname: PWCHAR;
- countOfCommonStoreFilesToRestore: PULONG; var commonStoreFilesToRestore: PWCHAR): BOOL; stdcall;
- {$EXTERNALSYM PF_SISCREATERESTORESTRUCTURE}
- TSisCreateRestoreStructure = PF_SISCREATERESTORESTRUCTURE;
-
- PF_SISRESTOREDLINK = function(sisRestoreStructure: PVOID; restoredFileName: PWCHAR; reparseData: PVOID; reparseDataSize: ULONG;
- countOfCommonStoreFilesToRestore: PULONG; var commonStoreFilesToRestore: PWCHAR): BOOL; stdcall;
- {$EXTERNALSYM PF_SISRESTOREDLINK}
- TSisRestoredLink = PF_SISRESTOREDLINK;
-
- PF_SISRESTOREDCOMMONSTOREFILE = function(sisRestoreStructure: PVOID; commonStoreFileName: PWCHAR): BOOL; stdcall;
- {$EXTERNALSYM PF_SISRESTOREDCOMMONSTOREFILE}
- TSisRestoredCommonStoreFile = PF_SISRESTOREDCOMMONSTOREFILE;
-
- PF_SISFREERESTORESTRUCTURE = function(sisRestoreStructure: PVOID): BOOL; stdcall;
- {$EXTERNALSYM PF_SISFREERESTORESTRUCTURE}
- TSisFreeRestoreStructure = PF_SISFREERESTORESTRUCTURE;
-
- PF_SISFREEALLOCATEDMEMORY = function(allocatedSpace: PVOID): BOOL; stdcall;
- {$EXTERNALSYM PF_SISFREEALLOCATEDMEMORY}
- TSisFreeAllocatedMemory = PF_SISFREEALLOCATEDMEMORY;
-
-implementation
-
-const
- sisbkuplib = 'sisbkup.dll';
-
-{$IFDEF DYNAMIC_LINK}
-
-var
- _SisCreateBackupStructure: Pointer;
-
-function SisCreateBackupStructure;
-begin
- GetProcedureAddress(_SisCreateBackupStructure, sisbkuplib, 'SisCreateBackupStructure');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SisCreateBackupStructure]
- end;
-end;
-
-var
- _SisCSFilesToBackupForLink: Pointer;
-
-function SisCSFilesToBackupForLink;
-begin
- GetProcedureAddress(_SisCSFilesToBackupForLink, sisbkuplib, 'SisCSFilesToBackupForLink');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SisCSFilesToBackupForLink]
- end;
-end;
-
-var
- _SisFreeBackupStructure: Pointer;
-
-function SisFreeBackupStructure;
-begin
- GetProcedureAddress(_SisFreeBackupStructure, sisbkuplib, 'SisFreeBackupStructure');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SisFreeBackupStructure]
- end;
-end;
-
-var
- _SisCreateRestoreStructure: Pointer;
-
-function SisCreateRestoreStructure;
-begin
- GetProcedureAddress(_SisCreateRestoreStructure, sisbkuplib, 'SisCreateRestoreStructure');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SisCreateRestoreStructure]
- end;
-end;
-
-var
- _SisRestoredLink: Pointer;
-
-function SisRestoredLink;
-begin
- GetProcedureAddress(_SisRestoredLink, sisbkuplib, 'SisRestoredLink');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SisRestoredLink]
- end;
-end;
-
-var
- _SisRestoredCommonStoreFile: Pointer;
-
-function SisRestoredCommonStoreFile;
-begin
- GetProcedureAddress(_SisRestoredCommonStoreFile, sisbkuplib, 'SisRestoredCommonStoreFile');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SisRestoredCommonStoreFile]
- end;
-end;
-
-var
- _SisFreeRestoreStructure: Pointer;
-
-function SisFreeRestoreStructure;
-begin
- GetProcedureAddress(_SisFreeRestoreStructure, sisbkuplib, 'SisFreeRestoreStructure');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SisFreeRestoreStructure]
- end;
-end;
-
-var
- _SisFreeAllocatedMemory: Pointer;
-
-function SisFreeAllocatedMemory;
-begin
- GetProcedureAddress(_SisFreeAllocatedMemory, sisbkuplib, 'SisFreeAllocatedMemory');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SisFreeAllocatedMemory]
- end;
-end;
-
-{$ELSE}
-
-function SisCreateBackupStructure; external sisbkuplib name 'SisCreateBackupStructure';
-function SisCSFilesToBackupForLink; external sisbkuplib name 'SisCSFilesToBackupForLink';
-function SisFreeBackupStructure; external sisbkuplib name 'SisFreeBackupStructure';
-function SisCreateRestoreStructure; external sisbkuplib name 'SisCreateRestoreStructure';
-function SisRestoredLink; external sisbkuplib name 'SisRestoredLink';
-function SisRestoredCommonStoreFile; external sisbkuplib name 'SisRestoredCommonStoreFile';
-function SisFreeRestoreStructure; external sisbkuplib name 'SisFreeRestoreStructure';
-function SisFreeAllocatedMemory; external sisbkuplib name 'SisFreeAllocatedMemory';
-
-{$ENDIF DYNAMIC_LINK}
-
-end.
+{******************************************************************************}
+{ }
+{ Single-Instance Store API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: sisbkup.h, released August 2001. The original Pascal }
+{ code is: SisBkUp.pas, released December 2001. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwasisbkup.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaSisBkUp;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "sisbkup.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaWinNT, JwaWinType;
+
+function SisCreateBackupStructure(volumeRoot: PWCHAR; var sisBackupStructure: PVOID; var commonStoreRootPathname: PWCHAR;
+ countOfCommonStoreFilesToBackup: PULONG; var commonStoreFilesToBackup: PWCHAR): BOOL; stdcall;
+{$EXTERNALSYM SisCreateBackupStructure}
+
+function SisCSFilesToBackupForLink(sisBackupStructure, reparseData: PVOID; reparseDataSize: ULONG; thisFileContext: PVOID;
+ matchingFileContext: PPVOID; countOfCommonStoreFilesToBackup: PULONG; var commonStoreFilesToBackup: PWCHAR): BOOL; stdcall;
+{$EXTERNALSYM SisCSFilesToBackupForLink}
+
+function SisFreeBackupStructure(sisBackupStructure: PVOID): BOOL; stdcall;
+{$EXTERNALSYM SisFreeBackupStructure}
+
+function SisCreateRestoreStructure(volumeRoot: PWCHAR; var sisRestoreStructure: PVOID; var commonStoreRootPathname: PWCHAR;
+ countOfCommonStoreFilesToRestore: PULONG; var commonStoreFilesToRestore: PWCHAR): BOOL; stdcall;
+{$EXTERNALSYM SisCreateRestoreStructure}
+
+function SisRestoredLink(sisRestoreStructure: PVOID; restoredFileName: PWCHAR; reparseData: PVOID; reparseDataSize: ULONG;
+ countOfCommonStoreFilesToRestore: PULONG; var commonStoreFilesToRestore: PWCHAR): BOOL; stdcall;
+{$EXTERNALSYM SisRestoredLink}
+
+function SisRestoredCommonStoreFile(sisRestoreStructure: PVOID; commonStoreFileName: PWCHAR): BOOL; stdcall;
+{$EXTERNALSYM SisRestoredCommonStoreFile}
+
+function SisFreeRestoreStructure(sisRestoreStructure: PVOID): BOOL; stdcall;
+{$EXTERNALSYM SisFreeRestoreStructure}
+
+function SisFreeAllocatedMemory(allocatedSpace: PVOID): BOOL; stdcall;
+{$EXTERNALSYM SisFreeAllocatedMemory}
+
+//
+// SIS entry function typedefs
+//
+
+type
+ PF_SISCREATEBACKUPSTRUCTURE = function(volumeRoot: PWCHAR; var sisBackupStructure: PVOID; var commonStoreRootPathname: PWCHAR;
+ countOfCommonStoreFilesToBackup: PULONG; var commonStoreFilesToBackup: PWCHAR): BOOL; stdcall;
+ {$EXTERNALSYM PF_SISCREATEBACKUPSTRUCTURE}
+ TSisCreateBackupStructure = PF_SISCREATEBACKUPSTRUCTURE;
+
+ PF_SISCSFILESTOBACKUPFORLINK = function(sisBackupStructure, reparseData: PVOID; reparseDataSize: ULONG; thisFileContext: PVOID;
+ matchingFileContext: PPVOID; countOfCommonStoreFilesToBackup: PULONG; var commonStoreFilesToBackup: PWCHAR): BOOL; stdcall;
+ {$EXTERNALSYM PF_SISCSFILESTOBACKUPFORLINK}
+ TSisCSFilesToBackupForLink = PF_SISCSFILESTOBACKUPFORLINK;
+
+ PF_SISFREEBACKUPSTRUCTURE = function(sisBackupStructure: PVOID): BOOL; stdcall;
+ {$EXTERNALSYM PF_SISFREEBACKUPSTRUCTURE}
+ TSusFreeBackupStructure = PF_SISFREEBACKUPSTRUCTURE;
+
+ PF_SISCREATERESTORESTRUCTURE = function(volumeRoot: PWCHAR; var sisRestoreStructure: PVOID; var commonStoreRootPathname: PWCHAR;
+ countOfCommonStoreFilesToRestore: PULONG; var commonStoreFilesToRestore: PWCHAR): BOOL; stdcall;
+ {$EXTERNALSYM PF_SISCREATERESTORESTRUCTURE}
+ TSisCreateRestoreStructure = PF_SISCREATERESTORESTRUCTURE;
+
+ PF_SISRESTOREDLINK = function(sisRestoreStructure: PVOID; restoredFileName: PWCHAR; reparseData: PVOID; reparseDataSize: ULONG;
+ countOfCommonStoreFilesToRestore: PULONG; var commonStoreFilesToRestore: PWCHAR): BOOL; stdcall;
+ {$EXTERNALSYM PF_SISRESTOREDLINK}
+ TSisRestoredLink = PF_SISRESTOREDLINK;
+
+ PF_SISRESTOREDCOMMONSTOREFILE = function(sisRestoreStructure: PVOID; commonStoreFileName: PWCHAR): BOOL; stdcall;
+ {$EXTERNALSYM PF_SISRESTOREDCOMMONSTOREFILE}
+ TSisRestoredCommonStoreFile = PF_SISRESTOREDCOMMONSTOREFILE;
+
+ PF_SISFREERESTORESTRUCTURE = function(sisRestoreStructure: PVOID): BOOL; stdcall;
+ {$EXTERNALSYM PF_SISFREERESTORESTRUCTURE}
+ TSisFreeRestoreStructure = PF_SISFREERESTORESTRUCTURE;
+
+ PF_SISFREEALLOCATEDMEMORY = function(allocatedSpace: PVOID): BOOL; stdcall;
+ {$EXTERNALSYM PF_SISFREEALLOCATEDMEMORY}
+ TSisFreeAllocatedMemory = PF_SISFREEALLOCATEDMEMORY;
+
+implementation
+
+const
+ sisbkuplib = 'sisbkup.dll';
+
+{$IFDEF DYNAMIC_LINK}
+
+var
+ _SisCreateBackupStructure: Pointer;
+
+function SisCreateBackupStructure;
+begin
+ GetProcedureAddress(_SisCreateBackupStructure, sisbkuplib, 'SisCreateBackupStructure');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SisCreateBackupStructure]
+ end;
+end;
+
+var
+ _SisCSFilesToBackupForLink: Pointer;
+
+function SisCSFilesToBackupForLink;
+begin
+ GetProcedureAddress(_SisCSFilesToBackupForLink, sisbkuplib, 'SisCSFilesToBackupForLink');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SisCSFilesToBackupForLink]
+ end;
+end;
+
+var
+ _SisFreeBackupStructure: Pointer;
+
+function SisFreeBackupStructure;
+begin
+ GetProcedureAddress(_SisFreeBackupStructure, sisbkuplib, 'SisFreeBackupStructure');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SisFreeBackupStructure]
+ end;
+end;
+
+var
+ _SisCreateRestoreStructure: Pointer;
+
+function SisCreateRestoreStructure;
+begin
+ GetProcedureAddress(_SisCreateRestoreStructure, sisbkuplib, 'SisCreateRestoreStructure');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SisCreateRestoreStructure]
+ end;
+end;
+
+var
+ _SisRestoredLink: Pointer;
+
+function SisRestoredLink;
+begin
+ GetProcedureAddress(_SisRestoredLink, sisbkuplib, 'SisRestoredLink');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SisRestoredLink]
+ end;
+end;
+
+var
+ _SisRestoredCommonStoreFile: Pointer;
+
+function SisRestoredCommonStoreFile;
+begin
+ GetProcedureAddress(_SisRestoredCommonStoreFile, sisbkuplib, 'SisRestoredCommonStoreFile');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SisRestoredCommonStoreFile]
+ end;
+end;
+
+var
+ _SisFreeRestoreStructure: Pointer;
+
+function SisFreeRestoreStructure;
+begin
+ GetProcedureAddress(_SisFreeRestoreStructure, sisbkuplib, 'SisFreeRestoreStructure');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SisFreeRestoreStructure]
+ end;
+end;
+
+var
+ _SisFreeAllocatedMemory: Pointer;
+
+function SisFreeAllocatedMemory;
+begin
+ GetProcedureAddress(_SisFreeAllocatedMemory, sisbkuplib, 'SisFreeAllocatedMemory');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SisFreeAllocatedMemory]
+ end;
+end;
+
+{$ELSE}
+
+function SisCreateBackupStructure; external sisbkuplib name 'SisCreateBackupStructure';
+function SisCSFilesToBackupForLink; external sisbkuplib name 'SisCSFilesToBackupForLink';
+function SisFreeBackupStructure; external sisbkuplib name 'SisFreeBackupStructure';
+function SisCreateRestoreStructure; external sisbkuplib name 'SisCreateRestoreStructure';
+function SisRestoredLink; external sisbkuplib name 'SisRestoredLink';
+function SisRestoredCommonStoreFile; external sisbkuplib name 'SisRestoredCommonStoreFile';
+function SisFreeRestoreStructure; external sisbkuplib name 'SisFreeRestoreStructure';
+function SisFreeAllocatedMemory; external sisbkuplib name 'SisFreeAllocatedMemory';
+
+{$ENDIF DYNAMIC_LINK}
+
+end.
diff --git a/packages/extra/winunits/jwasnmp.pas b/packages/extra/winunits/jwasnmp.pas
index 1ba4018cfb..405aa803ef 100644
--- a/packages/extra/winunits/jwasnmp.pas
+++ b/packages/extra/winunits/jwasnmp.pas
@@ -1,1181 +1,1181 @@
-{******************************************************************************}
-{ }
-{ Simple Network Management Protocol API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: snmp.h, released October 2001. The original Pascal }
-{ code is: SNMP.pas, released October 2001. The initial developer of the }
-{ Pascal code is Petr Vones (petr dott v att mujmail dott cz). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwasnmp.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaSnmp;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "snmp.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaWinType;
-
-type
- PAsnOctetString = ^TAsnOctetString;
- TAsnOctetString = record
- stream: PChar;
- length: UINT;
- dynamic_: BOOL;
- end;
- {$EXTERNALSYM TAsnOctetString}
-
- PAsnObjectIdentifier = ^TAsnObjectIdentifier;
- TAsnObjectIdentifier = record
- idLength: UINT;
- ids: PUINT;
- end;
- {$EXTERNALSYM TAsnObjectIdentifier}
-
- TAsnInteger32 = LONG;
- {$EXTERNALSYM TAsnInteger32}
- TAsnUnsigned32 = ULONG;
- {$EXTERNALSYM TAsnUnsigned32}
- TAsnCounter64 = ULARGE_INTEGER;
- {$EXTERNALSYM TAsnCounter64}
- TAsnCounter32 = TAsnUnsigned32;
- {$EXTERNALSYM TAsnCounter32}
- TAsnGauge32 = TAsnUnsigned32;
- {$EXTERNALSYM TAsnGauge32}
- TAsnTimeticks = TAsnUnsigned32;
- {$EXTERNALSYM TAsnTimeticks}
- TAsnBits = TAsnOctetString;
- {$EXTERNALSYM TAsnBits}
- TAsnSequence = TAsnOctetString;
- {$EXTERNALSYM TAsnSequence}
- TAsnImplicitSequence = TAsnOctetString;
- {$EXTERNALSYM TAsnImplicitSequence}
- TAsnIPAddress = TAsnOctetString;
- {$EXTERNALSYM TAsnIPAddress}
- TAsnNetworkAddress = TAsnOctetString;
- {$EXTERNALSYM TAsnNetworkAddress}
- TAsnDisplayString = TAsnOctetString;
- {$EXTERNALSYM TAsnDisplayString}
- TAsnOpaque = TAsnOctetString;
- {$EXTERNALSYM TAsnOpaque}
-
- PAsnAny = ^TAsnAny;
- TAsnAny = record
- asnType: Byte;
- case Integer of
- 0: (number: TAsnInteger32); // ASN_INTEGER, ASN_INTEGER32
- 1: (unsigned32: TAsnUnsigned32); // ASN_UNSIGNED32
- 2: (counter64: TAsnCounter64); // ASN_COUNTER64
- 3: (string_: TAsnOctetString); // ASN_OCTETSTRING
- 4: (bits: TAsnBits); // ASN_BITS
- 5: (object_: TAsnObjectIdentifier); // ASN_OBJECTIDENTIFIER
- 6: (sequence: TAsnSequence); // ASN_SEQUENCE
- 7: (address: TAsnIPAddress); // ASN_IPADDRESS
- 8: (counter: TAsnCounter32); // ASN_COUNTER32
- 9: (gauge: TAsnGauge32); // ASN_GAUGE32
- 10: (ticks: TAsnTimeticks); // ASN_TIMETICKS
- 11: (arbitrary: TAsnOpaque); // ASN_OPAQUE
- end;
- {$EXTERNALSYM TAsnAny}
-
- TAsnObjectName = TAsnObjectIdentifier;
- {$EXTERNALSYM TAsnObjectName}
- TAsnObjectSyntax = TAsnAny;
- {$EXTERNALSYM TAsnObjectSyntax}
-
- PSnmpVarBind = ^TSnmpVarBind;
- TSnmpVarBind = record
- name: TAsnObjectName;
- value: TAsnObjectSyntax;
- end;
- {$EXTERNALSYM TSnmpVarBind}
-
- PSnmpVarBindList = ^TSnmpVarBindList;
- TSnmpVarBindList = record
- list: PSnmpVarBind;
- len: UINT;
- end;
- {$EXTERNALSYM TSnmpVarBindList}
-
-const
- // (rom) deactivated seems useless
- { IFNDEF _INC_WINSNMP}
-
- { ASN/BER Base Types }
-
- ASN_UNIVERSAL = $00;
- {$EXTERNALSYM ASN_UNIVERSAL}
- ASN_APPLICATION = $40;
- {$EXTERNALSYM ASN_APPLICATION}
- ASN_CONTEXT = $80;
- {$EXTERNALSYM ASN_CONTEXT}
- ASN_PRIVATE = $C0;
- {$EXTERNALSYM ASN_PRIVATE}
-
- ASN_PRIMITIVE = $00;
- {$EXTERNALSYM ASN_PRIMITIVE}
- ASN_CONSTRUCTOR = $20;
- {$EXTERNALSYM ASN_CONSTRUCTOR}
-
- { PDU Type Values }
-
- SNMP_PDU_GET = ASN_CONTEXT or ASN_CONSTRUCTOR or $0;
- {$EXTERNALSYM SNMP_PDU_GET}
- SNMP_PDU_GETNEXT = ASN_CONTEXT or ASN_CONSTRUCTOR or $1;
- {$EXTERNALSYM SNMP_PDU_GETNEXT}
- SNMP_PDU_RESPONSE = ASN_CONTEXT or ASN_CONSTRUCTOR or $2;
- {$EXTERNALSYM SNMP_PDU_RESPONSE}
- SNMP_PDU_SET = ASN_CONTEXT or ASN_CONSTRUCTOR or $3;
- {$EXTERNALSYM SNMP_PDU_SET}
- SNMP_PDU_V1TRAP = ASN_CONTEXT or ASN_CONSTRUCTOR or $4;
- {$EXTERNALSYM SNMP_PDU_V1TRAP}
- SNMP_PDU_GETBULK = ASN_CONTEXT or ASN_CONSTRUCTOR or $5;
- {$EXTERNALSYM SNMP_PDU_GETBULK}
- SNMP_PDU_INFORM = ASN_CONTEXT or ASN_CONSTRUCTOR or $6;
- {$EXTERNALSYM SNMP_PDU_INFORM}
- SNMP_PDU_TRAP = ASN_CONTEXT or ASN_CONSTRUCTOR or $7;
- {$EXTERNALSYM SNMP_PDU_TRAP}
-
- // (rom) deactivated seems useless
- { ENDIF _INC_WINSNMP}
-
- { SNMP Simple Syntax Values }
-
- ASN_INTEGER = ASN_UNIVERSAL or ASN_PRIMITIVE or $02;
- {$EXTERNALSYM ASN_INTEGER}
- ASN_BITS = ASN_UNIVERSAL or ASN_PRIMITIVE or $03;
- {$EXTERNALSYM ASN_BITS}
- ASN_OCTETSTRING = ASN_UNIVERSAL or ASN_PRIMITIVE or $04;
- {$EXTERNALSYM ASN_OCTETSTRING}
- ASN_NULL = ASN_UNIVERSAL or ASN_PRIMITIVE or $05;
- {$EXTERNALSYM ASN_NULL}
- ASN_OBJECTIDENTIFIER = ASN_UNIVERSAL or ASN_PRIMITIVE or $06;
- {$EXTERNALSYM ASN_OBJECTIDENTIFIER}
- ASN_INTEGER32 = ASN_INTEGER;
- {$EXTERNALSYM ASN_INTEGER32}
-
-{ SNMP Constructor Syntax Values }
-
- ASN_SEQUENCE = ASN_UNIVERSAL or ASN_CONSTRUCTOR or $10;
- {$EXTERNALSYM ASN_SEQUENCE}
- ASN_SEQUENCEOF = ASN_SEQUENCE;
- {$EXTERNALSYM ASN_SEQUENCEOF}
-
-{ SNMP Application Syntax Values }
-
- ASN_IPADDRESS = ASN_APPLICATION or ASN_PRIMITIVE or $00;
- {$EXTERNALSYM ASN_IPADDRESS}
- ASN_COUNTER32 = ASN_APPLICATION or ASN_PRIMITIVE or $01;
- {$EXTERNALSYM ASN_COUNTER32}
- ASN_GAUGE32 = ASN_APPLICATION or ASN_PRIMITIVE or $02;
- {$EXTERNALSYM ASN_GAUGE32}
- ASN_TIMETICKS = ASN_APPLICATION or ASN_PRIMITIVE or $03;
- {$EXTERNALSYM ASN_TIMETICKS}
- ASN_OPAQUE = ASN_APPLICATION or ASN_PRIMITIVE or $04;
- {$EXTERNALSYM ASN_OPAQUE}
- ASN_COUNTER64 = ASN_APPLICATION or ASN_PRIMITIVE or $06;
- {$EXTERNALSYM ASN_COUNTER64}
- ASN_UINTEGER32 = ASN_APPLICATION or ASN_PRIMITIVE or $07;
- {$EXTERNALSYM ASN_UINTEGER32}
- ASN_RFC2578_UNSIGNED32 = ASN_GAUGE32;
- {$EXTERNALSYM ASN_RFC2578_UNSIGNED32}
-
-{ SNMP Exception Conditions }
-
- SNMP_EXCEPTION_NOSUCHOBJECT = ASN_CONTEXT or ASN_PRIMITIVE or $00;
- {$EXTERNALSYM SNMP_EXCEPTION_NOSUCHOBJECT}
- SNMP_EXCEPTION_NOSUCHINSTANCE = ASN_CONTEXT or ASN_PRIMITIVE or $01;
- {$EXTERNALSYM SNMP_EXCEPTION_NOSUCHINSTANCE}
- SNMP_EXCEPTION_ENDOFMIBVIEW = ASN_CONTEXT or ASN_PRIMITIVE or $02;
- {$EXTERNALSYM SNMP_EXCEPTION_ENDOFMIBVIEW}
-
-{ SNMP Request Types (used in SnmpExtensionQueryEx) }
-
- SNMP_EXTENSION_GET = SNMP_PDU_GET;
- {$EXTERNALSYM SNMP_EXTENSION_GET}
- SNMP_EXTENSION_GET_NEXT = SNMP_PDU_GETNEXT;
- {$EXTERNALSYM SNMP_EXTENSION_GET_NEXT}
- SNMP_EXTENSION_GET_BULK = SNMP_PDU_GETBULK;
- {$EXTERNALSYM SNMP_EXTENSION_GET_BULK}
- SNMP_EXTENSION_SET_TEST = ASN_PRIVATE or ASN_CONSTRUCTOR or $0;
- {$EXTERNALSYM SNMP_EXTENSION_SET_TEST}
- SNMP_EXTENSION_SET_COMMIT = SNMP_PDU_SET;
- {$EXTERNALSYM SNMP_EXTENSION_SET_COMMIT}
- SNMP_EXTENSION_SET_UNDO = ASN_PRIVATE or ASN_CONSTRUCTOR or $1;
- {$EXTERNALSYM SNMP_EXTENSION_SET_UNDO}
- SNMP_EXTENSION_SET_CLEANUP = ASN_PRIVATE or ASN_CONSTRUCTOR or $2;
- {$EXTERNALSYM SNMP_EXTENSION_SET_CLEANUP}
-
-{ SNMP Error Codes }
-
- SNMP_ERRORSTATUS_NOERROR = 0;
- {$EXTERNALSYM SNMP_ERRORSTATUS_NOERROR}
- SNMP_ERRORSTATUS_TOOBIG = 1;
- {$EXTERNALSYM SNMP_ERRORSTATUS_TOOBIG}
- SNMP_ERRORSTATUS_NOSUCHNAME = 2;
- {$EXTERNALSYM SNMP_ERRORSTATUS_NOSUCHNAME}
- SNMP_ERRORSTATUS_BADVALUE = 3;
- {$EXTERNALSYM SNMP_ERRORSTATUS_BADVALUE}
- SNMP_ERRORSTATUS_READONLY = 4;
- {$EXTERNALSYM SNMP_ERRORSTATUS_READONLY}
- SNMP_ERRORSTATUS_GENERR = 5;
- {$EXTERNALSYM SNMP_ERRORSTATUS_GENERR}
- SNMP_ERRORSTATUS_NOACCESS = 6;
- {$EXTERNALSYM SNMP_ERRORSTATUS_NOACCESS}
- SNMP_ERRORSTATUS_WRONGTYPE = 7;
- {$EXTERNALSYM SNMP_ERRORSTATUS_WRONGTYPE}
- SNMP_ERRORSTATUS_WRONGLENGTH = 8;
- {$EXTERNALSYM SNMP_ERRORSTATUS_WRONGLENGTH}
- SNMP_ERRORSTATUS_WRONGENCODING = 9;
- {$EXTERNALSYM SNMP_ERRORSTATUS_WRONGENCODING}
- SNMP_ERRORSTATUS_WRONGVALUE = 10;
- {$EXTERNALSYM SNMP_ERRORSTATUS_WRONGVALUE}
- SNMP_ERRORSTATUS_NOCREATION = 11;
- {$EXTERNALSYM SNMP_ERRORSTATUS_NOCREATION}
- SNMP_ERRORSTATUS_INCONSISTENTVALUE = 12;
- {$EXTERNALSYM SNMP_ERRORSTATUS_INCONSISTENTVALUE}
- SNMP_ERRORSTATUS_RESOURCEUNAVAILABLE = 13;
- {$EXTERNALSYM SNMP_ERRORSTATUS_RESOURCEUNAVAILABLE}
- SNMP_ERRORSTATUS_COMMITFAILED = 14;
- {$EXTERNALSYM SNMP_ERRORSTATUS_COMMITFAILED}
- SNMP_ERRORSTATUS_UNDOFAILED = 15;
- {$EXTERNALSYM SNMP_ERRORSTATUS_UNDOFAILED}
- SNMP_ERRORSTATUS_AUTHORIZATIONERROR = 16;
- {$EXTERNALSYM SNMP_ERRORSTATUS_AUTHORIZATIONERROR}
- SNMP_ERRORSTATUS_NOTWRITABLE = 17;
- {$EXTERNALSYM SNMP_ERRORSTATUS_NOTWRITABLE}
- SNMP_ERRORSTATUS_INCONSISTENTNAME = 18;
- {$EXTERNALSYM SNMP_ERRORSTATUS_INCONSISTENTNAME}
-
-{ SNMPv1 Trap Types }
-
- SNMP_GENERICTRAP_COLDSTART = 0;
- {$EXTERNALSYM SNMP_GENERICTRAP_COLDSTART}
- SNMP_GENERICTRAP_WARMSTART = 1;
- {$EXTERNALSYM SNMP_GENERICTRAP_WARMSTART}
- SNMP_GENERICTRAP_LINKDOWN = 2;
- {$EXTERNALSYM SNMP_GENERICTRAP_LINKDOWN}
- SNMP_GENERICTRAP_LINKUP = 3;
- {$EXTERNALSYM SNMP_GENERICTRAP_LINKUP}
- SNMP_GENERICTRAP_AUTHFAILURE = 4;
- {$EXTERNALSYM SNMP_GENERICTRAP_AUTHFAILURE}
- SNMP_GENERICTRAP_EGPNEIGHLOSS = 5;
- {$EXTERNALSYM SNMP_GENERICTRAP_EGPNEIGHLOSS}
- SNMP_GENERICTRAP_ENTERSPECIFIC = 6;
- {$EXTERNALSYM SNMP_GENERICTRAP_ENTERSPECIFIC}
-
-{ SNMP Access Types }
-
- SNMP_ACCESS_NONE = 0;
- {$EXTERNALSYM SNMP_ACCESS_NONE}
- SNMP_ACCESS_NOTIFY = 1;
- {$EXTERNALSYM SNMP_ACCESS_NOTIFY}
- SNMP_ACCESS_READ_ONLY = 2;
- {$EXTERNALSYM SNMP_ACCESS_READ_ONLY}
- SNMP_ACCESS_READ_WRITE = 3;
- {$EXTERNALSYM SNMP_ACCESS_READ_WRITE}
- SNMP_ACCESS_READ_CREATE = 4;
- {$EXTERNALSYM SNMP_ACCESS_READ_CREATE}
-
-{ SNMP API Return Code Definitions }
-
-type
- SNMPAPI = Integer;
- {$EXTERNALSYM SNMPAPI}
-
-const
- SNMPAPI_NOERROR = True;
- {$EXTERNALSYM SNMPAPI_NOERROR}
- SNMPAPI_ERROR = False;
- {$EXTERNALSYM SNMPAPI_ERROR}
-
-{ SNMP Extension API Type Definitions }
-
-type
- TSnmpExtensionInit = function(dwUptimeReference: DWORD; var phSubagentTrapEvent: HANDLE;
- var pFirstSupportedRegion: PAsnObjectIdentifier): BOOL; stdcall;
-
- TSnmpExtensionInitEx = function(var pNextSupportedRegion: PAsnObjectIdentifier): BOOL; stdcall;
-
- TSnmpExtensionMonitor = function(pAgentMgmtData: LPVOID): BOOL; stdcall;
-
- TSnmpExtensionQuery = function(bPduType: Byte; var pVarBindList: TSnmpVarBindList;
- var pErrorStatus: TAsnInteger32; var pErrorIndex: TAsnInteger32): BOOL; stdcall;
-
- TSnmpExtensionQueryEx = function(nRequestType: UINT; nTransactionId: UINT; var pVarBindList: PSnmpVarBindList;
- var pContextInfo: PAsnOctetString; var pErrorStatus: TAsnInteger32; var pErrorIndex: TAsnInteger32): BOOL; stdcall;
-
- TSnmpExtensionTrap = function(pEnterpriseOid: PAsnObjectIdentifier; var pGenericTrapId: TAsnInteger32;
- var pSpecificTrapId: TAsnInteger32; var pTimeStamp: TAsnTimeticks; var pVarBindList: PSnmpVarBindList): BOOL; stdcall;
-
- TSnmpExtensionClose = procedure; stdcall;
-
-{ SNMP API Prototypes }
-
-function SnmpUtilOidCpy(pOidDst: PAsnObjectIdentifier; pOidSrc: PAsnObjectIdentifier): SNMPAPI; stdcall;
-{$EXTERNALSYM SnmpUtilOidCpy}
-function SnmpUtilOidAppend(pOidDst: PAsnObjectIdentifier; pOidSrc: PAsnObjectIdentifier): SNMPAPI; stdcall;
-{$EXTERNALSYM SnmpUtilOidAppend}
-function SnmpUtilOidNCmp(pOid1, pOid2: PAsnObjectIdentifier; nSubIds: UINT): SNMPAPI; stdcall;
-{$EXTERNALSYM SnmpUtilOidNCmp}
-function SnmpUtilOidCmp(pOid1, pOid2: PAsnObjectIdentifier): SNMPAPI; stdcall;
-{$EXTERNALSYM SnmpUtilOidCmp}
-procedure SnmpUtilOidFree(pOid: TAsnObjectIdentifier); stdcall;
-{$EXTERNALSYM SnmpUtilOidFree}
-function SnmpUtilOctetsCmp(pOctets1, pOctets2: PAsnOctetString): SNMPAPI; stdcall;
-{$EXTERNALSYM SnmpUtilOctetsCmp}
-function SnmpUtilOctetsNCmp(pOctets1, pOctets2: PAsnOctetString; nChars: UINT): SNMPAPI; stdcall;
-{$EXTERNALSYM SnmpUtilOctetsNCmp}
-function SnmpUtilOctetsCpy(pOctetsDst, pOctetsSrc: PAsnOctetString): SNMPAPI; stdcall;
-{$EXTERNALSYM SnmpUtilOctetsCpy}
-procedure SnmpUtilOctetsFree(pOctets: PAsnOctetString); stdcall;
-{$EXTERNALSYM SnmpUtilOctetsFree}
-function SnmpUtilAsnAnyCpy(pAnyDst, pAnySrc: PAsnAny): SNMPAPI; stdcall;
-{$EXTERNALSYM SnmpUtilAsnAnyCpy}
-procedure SnmpUtilAsnAnyFree(pAny: PAsnAny); stdcall;
-{$EXTERNALSYM SnmpUtilAsnAnyFree}
-function SnmpUtilVarBindCpy(pVbDst: PSnmpVarBind; pVbSrc: PSnmpVarBind): SNMPAPI; stdcall;
-{$EXTERNALSYM SnmpUtilVarBindCpy}
-procedure SnmpUtilVarBindFree(pVb: PSnmpVarBind); stdcall;
-{$EXTERNALSYM SnmpUtilVarBindFree}
-function SnmpUtilVarBindListCpy(pVblDst: PSnmpVarBindList; pVblSrc: PSnmpVarBindList): SNMPAPI; stdcall;
-{$EXTERNALSYM SnmpUtilVarBindListCpy}
-procedure SnmpUtilVarBindListFree(pVbl: PSnmpVarBindList); stdcall;
-{$EXTERNALSYM SnmpUtilVarBindListFree}
-procedure SnmpUtilMemFree(pMem: LPVOID); stdcall;
-{$EXTERNALSYM SnmpUtilMemFree}
-function SnmpUtilMemAlloc(nBytes: UINT): LPVOID; stdcall;
-{$EXTERNALSYM SnmpUtilMemAlloc}
-function SnmpUtilMemReAlloc(pMem: LPVOID; nBytes: UINT): LPVOID; stdcall;
-{$EXTERNALSYM SnmpUtilMemReAlloc}
-function SnmpUtilOidToA(Oid: PAsnObjectIdentifier): LPSTR; stdcall;
-{$EXTERNALSYM SnmpUtilOidToA}
-function SnmpUtilIdsToA(Ids: PUINT; IdLength: UINT): LPSTR; stdcall;
-{$EXTERNALSYM SnmpUtilIdsToA}
-procedure SnmpUtilPrintOid(Oid: PAsnObjectIdentifier); stdcall;
-{$EXTERNALSYM SnmpUtilPrintOid}
-procedure SnmpUtilPrintAsnAny(pAny: PAsnAny); stdcall;
-{$EXTERNALSYM SnmpUtilPrintAsnAny}
-function SnmpSvcGetUptime: DWORD; stdcall;
-{$EXTERNALSYM SnmpSvcGetUptime}
-procedure SnmpSvcSetLogLevel(nLogLevel: INT); stdcall;
-{$EXTERNALSYM SnmpSvcSetLogLevel}
-procedure SnmpSvcSetLogType(nLogType: INT); stdcall;
-{$EXTERNALSYM SnmpSvcSetLogType}
-
-{ SNMP Debugging Definitions }
-
-const
- SNMP_LOG_SILENT = $0;
- {$EXTERNALSYM SNMP_LOG_SILENT}
- SNMP_LOG_FATAL = $1;
- {$EXTERNALSYM SNMP_LOG_FATAL}
- SNMP_LOG_ERROR = $2;
- {$EXTERNALSYM SNMP_LOG_ERROR}
- SNMP_LOG_WARNING = $3;
- {$EXTERNALSYM SNMP_LOG_WARNING}
- SNMP_LOG_TRACE = $4;
- {$EXTERNALSYM SNMP_LOG_TRACE}
- SNMP_LOG_VERBOSE = $5;
- {$EXTERNALSYM SNMP_LOG_VERBOSE}
-
- SNMP_OUTPUT_TO_CONSOLE = $1;
- {$EXTERNALSYM SNMP_OUTPUT_TO_CONSOLE}
- SNMP_OUTPUT_TO_LOGFILE = $2;
- {$EXTERNALSYM SNMP_OUTPUT_TO_LOGFILE}
- SNMP_OUTPUT_TO_EVENTLOG = $4; // no longer supported
- {$EXTERNALSYM SNMP_OUTPUT_TO_EVENTLOG}
- SNMP_OUTPUT_TO_DEBUGGER = $8;
- {$EXTERNALSYM SNMP_OUTPUT_TO_DEBUGGER}
-
-{ SNMP Debugging Prototypes }
-
-procedure SnmpUtilDbgPrint(nLogLevel: INT; szFormat: LPSTR); stdcall;
-{$EXTERNALSYM SnmpUtilDbgPrint}
-
-{ Miscellaneous definitions }
-
-const
- DEFINE_NULLOID: TAsnObjectIdentifier = (idLength: 0; ids: nil);
- {$EXTERNALSYM DEFINE_NULLOID}
- DEFINE_NULLOCTETS: TAsnOctetString = (stream: nil; length: 0; dynamic_: False);
- {$EXTERNALSYM DEFINE_NULLOCTETS}
-
- DEFAULT_SNMP_PORT_UDP = 161;
- {$EXTERNALSYM DEFAULT_SNMP_PORT_UDP}
- DEFAULT_SNMP_PORT_IPX = 36879;
- {$EXTERNALSYM DEFAULT_SNMP_PORT_IPX}
- DEFAULT_SNMPTRAP_PORT_UDP = 162;
- {$EXTERNALSYM DEFAULT_SNMPTRAP_PORT_UDP}
- DEFAULT_SNMPTRAP_PORT_IPX = 36880;
- {$EXTERNALSYM DEFAULT_SNMPTRAP_PORT_IPX}
- SNMP_MAX_OID_LEN = 128;
- {$EXTERNALSYM SNMP_MAX_OID_LEN}
-
-{ API Error Code Definitions }
-
- SNMP_MEM_ALLOC_ERROR = 1;
- {$EXTERNALSYM SNMP_MEM_ALLOC_ERROR}
- SNMP_BERAPI_INVALID_LENGTH = 10;
- {$EXTERNALSYM SNMP_BERAPI_INVALID_LENGTH}
- SNMP_BERAPI_INVALID_TAG = 11;
- {$EXTERNALSYM SNMP_BERAPI_INVALID_TAG}
- SNMP_BERAPI_OVERFLOW = 12;
- {$EXTERNALSYM SNMP_BERAPI_OVERFLOW}
- SNMP_BERAPI_SHORT_BUFFER = 13;
- {$EXTERNALSYM SNMP_BERAPI_SHORT_BUFFER}
- SNMP_BERAPI_INVALID_OBJELEM = 14;
- {$EXTERNALSYM SNMP_BERAPI_INVALID_OBJELEM}
- SNMP_PDUAPI_UNRECOGNIZED_PDU = 20;
- {$EXTERNALSYM SNMP_PDUAPI_UNRECOGNIZED_PDU}
- SNMP_PDUAPI_INVALID_ES = 21;
- {$EXTERNALSYM SNMP_PDUAPI_INVALID_ES}
- SNMP_PDUAPI_INVALID_GT = 22;
- {$EXTERNALSYM SNMP_PDUAPI_INVALID_GT}
- SNMP_AUTHAPI_INVALID_VERSION = 30;
- {$EXTERNALSYM SNMP_AUTHAPI_INVALID_VERSION}
- SNMP_AUTHAPI_INVALID_MSG_TYPE = 31;
- {$EXTERNALSYM SNMP_AUTHAPI_INVALID_MSG_TYPE}
- SNMP_AUTHAPI_TRIV_AUTH_FAILED = 32;
- {$EXTERNALSYM SNMP_AUTHAPI_TRIV_AUTH_FAILED}
-
-{ Support for old definitions (support disabled via SNMPSTRICT) }
-
-{$IFNDEF SNMPSTRICT}
-
-function SNMP_oidcpy(pOidDst: PAsnObjectIdentifier; pOidSrc: PAsnObjectIdentifier): SNMPAPI; stdcall;
-{$EXTERNALSYM SNMP_oidcpy}
-function SNMP_oidappend(pOidDst: PAsnObjectIdentifier; pOidSrc: PAsnObjectIdentifier): SNMPAPI; stdcall;
-{$EXTERNALSYM SNMP_oidappend}
-function SNMP_oidncmp(pOid1, pOid2: PAsnObjectIdentifier; nSubIds: UINT): SNMPAPI; stdcall;
-{$EXTERNALSYM SNMP_oidncmp}
-function SNMP_oidcmp(pOid1, pOid2: PAsnObjectIdentifier): SNMPAPI; stdcall;
-{$EXTERNALSYM SNMP_oidcmp}
-procedure SNMP_oidfree(pOid: TAsnObjectIdentifier); stdcall;
-{$EXTERNALSYM SNMP_oidfree}
-
-function SNMP_CopyVarBind(pVbDst: PSnmpVarBind; pVbSrc: PSnmpVarBind): SNMPAPI; stdcall;
-{$EXTERNALSYM SNMP_CopyVarBind}
-procedure SNMP_FreeVarBind(pVb: PSnmpVarBind); stdcall;
-{$EXTERNALSYM SNMP_FreeVarBind}
-function SNMP_CopyVarBindList(pVblDst: PSnmpVarBindList; pVblSrc: PSnmpVarBindList): SNMPAPI; stdcall;
-{$EXTERNALSYM SNMP_CopyVarBindList}
-procedure SNMP_FreeVarBindList(pVbl: PSnmpVarBindList); stdcall;
-{$EXTERNALSYM SNMP_FreeVarBindList}
-
-procedure SNMP_printany(pAny: PAsnAny); stdcall;
-{$EXTERNALSYM SNMP_printany}
-
-procedure SNMP_free(pMem: LPVOID); stdcall;
-{$EXTERNALSYM SNMP_free}
-function SNMP_malloc(nBytes: UINT): LPVOID; stdcall;
-{$EXTERNALSYM SNMP_malloc}
-function SNMP_realloc(pMem: LPVOID; nBytes: UINT): LPVOID; stdcall;
-{$EXTERNALSYM SNMP_realloc}
-
-procedure SNMP_DBG_free(pMem: LPVOID); stdcall;
-{$EXTERNALSYM SNMP_DBG_free}
-function SNMP_DBG_malloc(nBytes: UINT): LPVOID; stdcall;
-{$EXTERNALSYM SNMP_DBG_malloc}
-function SNMP_DBG_realloc(pMem: LPVOID; nBytes: UINT): LPVOID; stdcall;
-{$EXTERNALSYM SNMP_DBG_realloc}
-
-const
- ASN_RFC1155_IPADDRESS = ASN_IPADDRESS;
- {$EXTERNALSYM ASN_RFC1155_IPADDRESS}
- ASN_RFC1155_COUNTER = ASN_COUNTER32;
- {$EXTERNALSYM ASN_RFC1155_COUNTER}
- ASN_RFC1155_GAUGE = ASN_GAUGE32;
- {$EXTERNALSYM ASN_RFC1155_GAUGE}
- ASN_RFC1155_TIMETICKS = ASN_TIMETICKS;
- {$EXTERNALSYM ASN_RFC1155_TIMETICKS}
- ASN_RFC1155_OPAQUE = ASN_OPAQUE;
- {$EXTERNALSYM ASN_RFC1155_OPAQUE}
- ASN_RFC1213_DISPSTRING = ASN_OCTETSTRING;
- {$EXTERNALSYM ASN_RFC1213_DISPSTRING}
-
- ASN_RFC1157_GETREQUEST = SNMP_PDU_GET;
- {$EXTERNALSYM ASN_RFC1157_GETREQUEST}
- ASN_RFC1157_GETNEXTREQUEST = SNMP_PDU_GETNEXT;
- {$EXTERNALSYM ASN_RFC1157_GETNEXTREQUEST}
- ASN_RFC1157_GETRESPONSE = SNMP_PDU_RESPONSE;
- {$EXTERNALSYM ASN_RFC1157_GETRESPONSE}
- ASN_RFC1157_SETREQUEST = SNMP_PDU_SET;
- {$EXTERNALSYM ASN_RFC1157_SETREQUEST}
- ASN_RFC1157_TRAP = SNMP_PDU_V1TRAP;
- {$EXTERNALSYM ASN_RFC1157_TRAP}
-
- ASN_CONTEXTSPECIFIC = ASN_CONTEXT;
- {$EXTERNALSYM ASN_CONTEXTSPECIFIC}
- ASN_PRIMATIVE = ASN_PRIMITIVE;
- {$EXTERNALSYM ASN_PRIMATIVE}
-
-type
- RFC1157VarBindList = TSnmpVarBindList;
- {$EXTERNALSYM RFC1157VarBindList}
- RFC1157VarBind = TSnmpVarBind;
- {$EXTERNALSYM RFC1157VarBind}
- TAsnInteger = TAsnInteger32;
- {$EXTERNALSYM TAsnInteger}
- TAsnCounter = TAsnCounter32;
- {$EXTERNALSYM TAsnCounter}
- TAsnGauge = TAsnGauge32;
- {$EXTERNALSYM TAsnGauge}
-
-const
- ASN_UNSIGNED32 = ASN_UINTEGER32;
- {$EXTERNALSYM ASN_UNSIGNED32}
-
-{$ENDIF !SNMPSTRICT}
-
-implementation
-
-uses
- JwaWinBase;
-
-const
- snmpapilib = 'snmpapi.dll';
-
-{$IFDEF DYNAMIC_LINK}
-
-var
- _SnmpUtilOidCpy: Pointer;
-
-function SnmpUtilOidCpy;
-begin
- GetProcedureAddress(_SnmpUtilOidCpy, snmpapilib, 'SnmpUtilOidCpy');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SnmpUtilOidCpy]
- end;
-end;
-
-var
- _SnmpUtilOidAppend: Pointer;
-
-function SnmpUtilOidAppend;
-begin
- GetProcedureAddress(_SnmpUtilOidAppend, snmpapilib, 'SnmpUtilOidAppend');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SnmpUtilOidAppend]
- end;
-end;
-
-var
- _SnmpUtilOidNCmp: Pointer;
-
-function SnmpUtilOidNCmp;
-begin
- GetProcedureAddress(_SnmpUtilOidNCmp, snmpapilib, 'SnmpUtilOidNCmp');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SnmpUtilOidNCmp]
- end;
-end;
-
-var
- _SnmpUtilOidCmp: Pointer;
-
-function SnmpUtilOidCmp;
-begin
- GetProcedureAddress(_SnmpUtilOidCmp, snmpapilib, 'SnmpUtilOidCmp');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SnmpUtilOidCmp]
- end;
-end;
-
-var
- _SnmpUtilOidFree: Pointer;
-
-procedure SnmpUtilOidFree;
-begin
- GetProcedureAddress(_SnmpUtilOidFree, snmpapilib, 'SnmpUtilOidFree');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SnmpUtilOidFree]
- end;
-end;
-
-var
- _SnmpUtilOctetsCmp: Pointer;
-
-function SnmpUtilOctetsCmp;
-begin
- GetProcedureAddress(_SnmpUtilOctetsCmp, snmpapilib, 'SnmpUtilOctetsCmp');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SnmpUtilOctetsCmp]
- end;
-end;
-
-var
- _SnmpUtilOctetsNCmp: Pointer;
-
-function SnmpUtilOctetsNCmp;
-begin
- GetProcedureAddress(_SnmpUtilOctetsNCmp, snmpapilib, 'SnmpUtilOctetsNCmp');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SnmpUtilOctetsNCmp]
- end;
-end;
-
-var
- _SnmpUtilOctetsCpy: Pointer;
-
-function SnmpUtilOctetsCpy;
-begin
- GetProcedureAddress(_SnmpUtilOctetsCpy, snmpapilib, 'SnmpUtilOctetsCpy');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SnmpUtilOctetsCpy]
- end;
-end;
-
-var
- _SnmpUtilOctetsFree: Pointer;
-
-procedure SnmpUtilOctetsFree;
-begin
- GetProcedureAddress(_SnmpUtilOctetsFree, snmpapilib, 'SnmpUtilOctetsFree');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SnmpUtilOctetsFree]
- end;
-end;
-
-var
- _SnmpUtilAsnAnyCpy: Pointer;
-
-function SnmpUtilAsnAnyCpy;
-begin
- GetProcedureAddress(_SnmpUtilAsnAnyCpy, snmpapilib, 'SnmpUtilAsnAnyCpy');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SnmpUtilAsnAnyCpy]
- end;
-end;
-
-var
- _SnmpUtilAsnAnyFree: Pointer;
-
-procedure SnmpUtilAsnAnyFree;
-begin
- GetProcedureAddress(_SnmpUtilAsnAnyFree, snmpapilib, 'SnmpUtilAsnAnyFree');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SnmpUtilAsnAnyFree]
- end;
-end;
-
-var
- _SnmpUtilVarBindCpy: Pointer;
-
-function SnmpUtilVarBindCpy;
-begin
- GetProcedureAddress(_SnmpUtilVarBindCpy, snmpapilib, 'SnmpUtilVarBindCpy');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SnmpUtilVarBindCpy]
- end;
-end;
-
-var
- _SnmpUtilVarBindFree: Pointer;
-
-procedure SnmpUtilVarBindFree;
-begin
- GetProcedureAddress(_SnmpUtilVarBindFree, snmpapilib, 'SnmpUtilVarBindFree');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SnmpUtilVarBindFree]
- end;
-end;
-
-var
- _SnmpUtilVarBindListCpy: Pointer;
-
-function SnmpUtilVarBindListCpy;
-begin
- GetProcedureAddress(_SnmpUtilVarBindListCpy, snmpapilib, 'SnmpUtilVarBindListCpy');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SnmpUtilVarBindListCpy]
- end;
-end;
-
-var
- _SnmpUtilVarBindListFree: Pointer;
-
-procedure SnmpUtilVarBindListFree;
-begin
- GetProcedureAddress(_SnmpUtilVarBindListFree, snmpapilib, 'SnmpUtilVarBindListFree');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SnmpUtilVarBindListFree]
- end;
-end;
-
-var
- _SnmpUtilMemFree: Pointer;
-
-procedure SnmpUtilMemFree;
-begin
- GetProcedureAddress(_SnmpUtilMemFree, snmpapilib, 'SnmpUtilMemFree');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SnmpUtilMemFree]
- end;
-end;
-
-var
- _SnmpUtilMemAlloc: Pointer;
-
-function SnmpUtilMemAlloc;
-begin
- GetProcedureAddress(_SnmpUtilMemAlloc, snmpapilib, 'SnmpUtilMemAlloc');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SnmpUtilMemAlloc]
- end;
-end;
-
-var
- _SnmpUtilMemReAlloc: Pointer;
-
-function SnmpUtilMemReAlloc;
-begin
- GetProcedureAddress(_SnmpUtilMemReAlloc, snmpapilib, 'SnmpUtilMemReAlloc');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SnmpUtilMemReAlloc]
- end;
-end;
-
-var
- _SnmpUtilOidToA: Pointer;
-
-function SnmpUtilOidToA;
-begin
- GetProcedureAddress(_SnmpUtilOidToA, snmpapilib, 'SnmpUtilOidToA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SnmpUtilOidToA]
- end;
-end;
-
-var
- _SnmpUtilIdsToA: Pointer;
-
-function SnmpUtilIdsToA;
-begin
- GetProcedureAddress(_SnmpUtilIdsToA, snmpapilib, 'SnmpUtilIdsToA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SnmpUtilIdsToA]
- end;
-end;
-
-var
- _SnmpUtilPrintOid: Pointer;
-
-procedure SnmpUtilPrintOid;
-begin
- GetProcedureAddress(_SnmpUtilPrintOid, snmpapilib, 'SnmpUtilPrintOid');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SnmpUtilPrintOid]
- end;
-end;
-
-var
- _SnmpUtilPrintAsnAny: Pointer;
-
-procedure SnmpUtilPrintAsnAny;
-begin
- GetProcedureAddress(_SnmpUtilPrintAsnAny, snmpapilib, 'SnmpUtilPrintAsnAny');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SnmpUtilPrintAsnAny]
- end;
-end;
-
-var
- _SnmpSvcGetUptime: Pointer;
-
-function SnmpSvcGetUptime;
-begin
- GetProcedureAddress(_SnmpSvcGetUptime, snmpapilib, 'SnmpSvcGetUptime');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SnmpSvcGetUptime]
- end;
-end;
-
-var
- _SnmpSvcSetLogLevel: Pointer;
-
-procedure SnmpSvcSetLogLevel;
-begin
- GetProcedureAddress(_SnmpSvcSetLogLevel, snmpapilib, 'SnmpSvcSetLogLevel');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SnmpSvcSetLogLevel]
- end;
-end;
-
-var
- _SnmpSvcSetLogType: Pointer;
-
-procedure SnmpSvcSetLogType;
-begin
- GetProcedureAddress(_SnmpSvcSetLogType, snmpapilib, 'SnmpSvcSetLogType');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SnmpSvcSetLogType]
- end;
-end;
-
-var
- _SnmpUtilDbgPrint: Pointer;
-
-procedure SnmpUtilDbgPrint;
-begin
- GetProcedureAddress(_SnmpUtilDbgPrint, snmpapilib, 'SnmpUtilDbgPrint');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SnmpUtilDbgPrint]
- end;
-end;
-
-{$IFNDEF SNMPSTRICT}
-
-var
- _SNMP_oidcpy: Pointer;
-
-function SNMP_oidcpy;
-begin
- GetProcedureAddress(_SNMP_oidcpy, snmpapilib, 'SnmpUtilOidCpy');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SNMP_oidcpy]
- end;
-end;
-
-var
- _SNMP_oidappend: Pointer;
-
-function SNMP_oidappend;
-begin
- GetProcedureAddress(_SNMP_oidappend, snmpapilib, 'SnmpUtilOidAppend');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SNMP_oidappend]
- end;
-end;
-
-var
- _SNMP_oidncmp: Pointer;
-
-function SNMP_oidncmp;
-begin
- GetProcedureAddress(_SNMP_oidncmp, snmpapilib, 'SnmpUtilOidNCmp');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SNMP_oidncmp]
- end;
-end;
-
-var
- _SNMP_oidcmp: Pointer;
-
-function SNMP_oidcmp;
-begin
- GetProcedureAddress(_SNMP_oidcmp, snmpapilib, 'SnmpUtilOidCmp');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SNMP_oidcmp]
- end;
-end;
-
-var
- _SNMP_oidfree: Pointer;
-
-procedure SNMP_oidfree;
-begin
- GetProcedureAddress(_SNMP_oidfree, snmpapilib, 'SnmpUtilOidFree');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SNMP_oidfree]
- end;
-end;
-
-var
- _SNMP_CopyVarBind: Pointer;
-
-function SNMP_CopyVarBind;
-begin
- GetProcedureAddress(_SNMP_CopyVarBind, snmpapilib, 'SnmpUtilVarBindCpy');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SNMP_CopyVarBind]
- end;
-end;
-
-var
- _SNMP_FreeVarBind: Pointer;
-
-procedure SNMP_FreeVarBind;
-begin
- GetProcedureAddress(_SNMP_FreeVarBind, snmpapilib, 'SnmpUtilVarBindFree');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SNMP_FreeVarBind]
- end;
-end;
-
-var
- _SNMP_CopyVarBindList: Pointer;
-
-function SNMP_CopyVarBindList;
-begin
- GetProcedureAddress(_SNMP_CopyVarBindList, snmpapilib, 'SnmpUtilVarBindListCpy');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SNMP_CopyVarBindList]
- end;
-end;
-
-var
- _SNMP_FreeVarBindList: Pointer;
-
-procedure SNMP_FreeVarBindList;
-begin
- GetProcedureAddress(_SNMP_FreeVarBindList, snmpapilib, 'SnmpUtilVarBindListFree');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SNMP_FreeVarBindList]
- end;
-end;
-
-var
- _SNMP_printany: Pointer;
-
-procedure SNMP_printany;
-begin
- GetProcedureAddress(_SNMP_printany, snmpapilib, 'SnmpUtilPrintAsnAny');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SNMP_printany]
- end;
-end;
-
-var
- _SNMP_free: Pointer;
-
-procedure SNMP_free;
-begin
- GetProcedureAddress(_SNMP_free, snmpapilib, 'SnmpUtilMemFree');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SNMP_free]
- end;
-end;
-
-var
- _SNMP_malloc: Pointer;
-
-function SNMP_malloc;
-begin
- GetProcedureAddress(_SNMP_malloc, snmpapilib, 'SnmpUtilMemAlloc');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SNMP_malloc]
- end;
-end;
-
-var
- _SNMP_realloc: Pointer;
-
-function SNMP_realloc;
-begin
- GetProcedureAddress(_SNMP_realloc, snmpapilib, 'SnmpUtilMemReAlloc');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SNMP_realloc]
- end;
-end;
-
-var
- _SNMP_DBG_free: Pointer;
-
-procedure SNMP_DBG_free;
-begin
- GetProcedureAddress(_SNMP_DBG_free, snmpapilib, 'SnmpUtilMemFree');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SNMP_DBG_free]
- end;
-end;
-
-var
- _SNMP_DBG_malloc: Pointer;
-
-function SNMP_DBG_malloc;
-begin
- GetProcedureAddress(_SNMP_DBG_malloc, snmpapilib, 'SnmpUtilMemAlloc');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SNMP_DBG_malloc]
- end;
-end;
-
-var
- _SNMP_DBG_realloc: Pointer;
-
-function SNMP_DBG_realloc;
-begin
- GetProcedureAddress(_SNMP_DBG_realloc, snmpapilib, 'SnmpUtilMemReAlloc');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SNMP_DBG_realloc]
- end;
-end;
-
-{$ENDIF !SNMPSTRICT}
-
-{$ELSE}
-
-function SnmpUtilOidCpy; external snmpapilib name 'SnmpUtilOidCpy';
-function SnmpUtilOidAppend; external snmpapilib name 'SnmpUtilOidAppend';
-function SnmpUtilOidNCmp; external snmpapilib name 'SnmpUtilOidNCmp';
-function SnmpUtilOidCmp; external snmpapilib name 'SnmpUtilOidCmp';
-procedure SnmpUtilOidFree; external snmpapilib name 'SnmpUtilOidFree';
-function SnmpUtilOctetsCmp; external snmpapilib name 'SnmpUtilOctetsCmp';
-function SnmpUtilOctetsNCmp; external snmpapilib name 'SnmpUtilOctetsNCmp';
-function SnmpUtilOctetsCpy; external snmpapilib name 'SnmpUtilOctetsCpy';
-procedure SnmpUtilOctetsFree; external snmpapilib name 'SnmpUtilOctetsFree';
-function SnmpUtilAsnAnyCpy; external snmpapilib name 'SnmpUtilAsnAnyCpy';
-procedure SnmpUtilAsnAnyFree; external snmpapilib name 'SnmpUtilAsnAnyFree';
-function SnmpUtilVarBindCpy; external snmpapilib name 'SnmpUtilVarBindCpy';
-procedure SnmpUtilVarBindFree; external snmpapilib name 'SnmpUtilVarBindFree';
-function SnmpUtilVarBindListCpy; external snmpapilib name 'SnmpUtilVarBindListCpy';
-procedure SnmpUtilVarBindListFree; external snmpapilib name 'SnmpUtilVarBindListFree';
-procedure SnmpUtilMemFree; external snmpapilib name 'SnmpUtilMemFree';
-function SnmpUtilMemAlloc; external snmpapilib name 'SnmpUtilMemAlloc';
-function SnmpUtilMemReAlloc; external snmpapilib name 'SnmpUtilMemReAlloc';
-function SnmpUtilOidToA; external snmpapilib name 'SnmpUtilOidToA';
-function SnmpUtilIdsToA; external snmpapilib name 'SnmpUtilIdsToA';
-procedure SnmpUtilPrintOid; external snmpapilib name 'SnmpUtilPrintOid';
-procedure SnmpUtilPrintAsnAny; external snmpapilib name 'SnmpUtilPrintAsnAny';
-function SnmpSvcGetUptime; external snmpapilib name 'SnmpSvcGetUptime';
-procedure SnmpSvcSetLogLevel; external snmpapilib name 'SnmpSvcSetLogLevel';
-procedure SnmpSvcSetLogType; external snmpapilib name 'SnmpSvcSetLogType';
-procedure SnmpUtilDbgPrint; external snmpapilib name 'SnmpUtilDbgPrint';
-{$IFNDEF SNMPSTRICT}
-function SNMP_oidcpy; external snmpapilib name 'SnmpUtilOidCpy';
-function SNMP_oidappend; external snmpapilib name 'SnmpUtilOidAppend';
-function SNMP_oidncmp; external snmpapilib name 'SnmpUtilOidNCmp';
-function SNMP_oidcmp; external snmpapilib name 'SnmpUtilOidCmp';
-procedure SNMP_oidfree; external snmpapilib name 'SnmpUtilOidFree';
-function SNMP_CopyVarBind; external snmpapilib name 'SnmpUtilVarBindCpy';
-procedure SNMP_FreeVarBind; external snmpapilib name 'SnmpUtilVarBindFree';
-function SNMP_CopyVarBindList; external snmpapilib name 'SnmpUtilVarBindListCpy';
-procedure SNMP_FreeVarBindList; external snmpapilib name 'SnmpUtilVarBindListFree';
-procedure SNMP_printany; external snmpapilib name 'SnmpUtilPrintAsnAny';
-procedure SNMP_free; external snmpapilib name 'SnmpUtilMemFree';
-function SNMP_malloc; external snmpapilib name 'SnmpUtilMemAlloc';
-function SNMP_realloc; external snmpapilib name 'SnmpUtilMemReAlloc';
-procedure SNMP_DBG_free; external snmpapilib name 'SnmpUtilMemFree';
-function SNMP_DBG_malloc; external snmpapilib name 'SnmpUtilMemAlloc';
-function SNMP_DBG_realloc; external snmpapilib name 'SnmpUtilMemReAlloc';
-{$ENDIF !SNMPSTRICT}
-
-{$ENDIF DYNAMIC_LINK}
-
-end.
+{******************************************************************************}
+{ }
+{ Simple Network Management Protocol API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: snmp.h, released October 2001. The original Pascal }
+{ code is: SNMP.pas, released October 2001. The initial developer of the }
+{ Pascal code is Petr Vones (petr dott v att mujmail dott cz). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwasnmp.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaSnmp;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "snmp.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaWinType;
+
+type
+ PAsnOctetString = ^TAsnOctetString;
+ TAsnOctetString = record
+ stream: PChar;
+ length: UINT;
+ dynamic_: BOOL;
+ end;
+ {$EXTERNALSYM TAsnOctetString}
+
+ PAsnObjectIdentifier = ^TAsnObjectIdentifier;
+ TAsnObjectIdentifier = record
+ idLength: UINT;
+ ids: PUINT;
+ end;
+ {$EXTERNALSYM TAsnObjectIdentifier}
+
+ TAsnInteger32 = LONG;
+ {$EXTERNALSYM TAsnInteger32}
+ TAsnUnsigned32 = ULONG;
+ {$EXTERNALSYM TAsnUnsigned32}
+ TAsnCounter64 = ULARGE_INTEGER;
+ {$EXTERNALSYM TAsnCounter64}
+ TAsnCounter32 = TAsnUnsigned32;
+ {$EXTERNALSYM TAsnCounter32}
+ TAsnGauge32 = TAsnUnsigned32;
+ {$EXTERNALSYM TAsnGauge32}
+ TAsnTimeticks = TAsnUnsigned32;
+ {$EXTERNALSYM TAsnTimeticks}
+ TAsnBits = TAsnOctetString;
+ {$EXTERNALSYM TAsnBits}
+ TAsnSequence = TAsnOctetString;
+ {$EXTERNALSYM TAsnSequence}
+ TAsnImplicitSequence = TAsnOctetString;
+ {$EXTERNALSYM TAsnImplicitSequence}
+ TAsnIPAddress = TAsnOctetString;
+ {$EXTERNALSYM TAsnIPAddress}
+ TAsnNetworkAddress = TAsnOctetString;
+ {$EXTERNALSYM TAsnNetworkAddress}
+ TAsnDisplayString = TAsnOctetString;
+ {$EXTERNALSYM TAsnDisplayString}
+ TAsnOpaque = TAsnOctetString;
+ {$EXTERNALSYM TAsnOpaque}
+
+ PAsnAny = ^TAsnAny;
+ TAsnAny = record
+ asnType: Byte;
+ case Integer of
+ 0: (number: TAsnInteger32); // ASN_INTEGER, ASN_INTEGER32
+ 1: (unsigned32: TAsnUnsigned32); // ASN_UNSIGNED32
+ 2: (counter64: TAsnCounter64); // ASN_COUNTER64
+ 3: (string_: TAsnOctetString); // ASN_OCTETSTRING
+ 4: (bits: TAsnBits); // ASN_BITS
+ 5: (object_: TAsnObjectIdentifier); // ASN_OBJECTIDENTIFIER
+ 6: (sequence: TAsnSequence); // ASN_SEQUENCE
+ 7: (address: TAsnIPAddress); // ASN_IPADDRESS
+ 8: (counter: TAsnCounter32); // ASN_COUNTER32
+ 9: (gauge: TAsnGauge32); // ASN_GAUGE32
+ 10: (ticks: TAsnTimeticks); // ASN_TIMETICKS
+ 11: (arbitrary: TAsnOpaque); // ASN_OPAQUE
+ end;
+ {$EXTERNALSYM TAsnAny}
+
+ TAsnObjectName = TAsnObjectIdentifier;
+ {$EXTERNALSYM TAsnObjectName}
+ TAsnObjectSyntax = TAsnAny;
+ {$EXTERNALSYM TAsnObjectSyntax}
+
+ PSnmpVarBind = ^TSnmpVarBind;
+ TSnmpVarBind = record
+ name: TAsnObjectName;
+ value: TAsnObjectSyntax;
+ end;
+ {$EXTERNALSYM TSnmpVarBind}
+
+ PSnmpVarBindList = ^TSnmpVarBindList;
+ TSnmpVarBindList = record
+ list: PSnmpVarBind;
+ len: UINT;
+ end;
+ {$EXTERNALSYM TSnmpVarBindList}
+
+const
+ // (rom) deactivated seems useless
+ { IFNDEF _INC_WINSNMP}
+
+ { ASN/BER Base Types }
+
+ ASN_UNIVERSAL = $00;
+ {$EXTERNALSYM ASN_UNIVERSAL}
+ ASN_APPLICATION = $40;
+ {$EXTERNALSYM ASN_APPLICATION}
+ ASN_CONTEXT = $80;
+ {$EXTERNALSYM ASN_CONTEXT}
+ ASN_PRIVATE = $C0;
+ {$EXTERNALSYM ASN_PRIVATE}
+
+ ASN_PRIMITIVE = $00;
+ {$EXTERNALSYM ASN_PRIMITIVE}
+ ASN_CONSTRUCTOR = $20;
+ {$EXTERNALSYM ASN_CONSTRUCTOR}
+
+ { PDU Type Values }
+
+ SNMP_PDU_GET = ASN_CONTEXT or ASN_CONSTRUCTOR or $0;
+ {$EXTERNALSYM SNMP_PDU_GET}
+ SNMP_PDU_GETNEXT = ASN_CONTEXT or ASN_CONSTRUCTOR or $1;
+ {$EXTERNALSYM SNMP_PDU_GETNEXT}
+ SNMP_PDU_RESPONSE = ASN_CONTEXT or ASN_CONSTRUCTOR or $2;
+ {$EXTERNALSYM SNMP_PDU_RESPONSE}
+ SNMP_PDU_SET = ASN_CONTEXT or ASN_CONSTRUCTOR or $3;
+ {$EXTERNALSYM SNMP_PDU_SET}
+ SNMP_PDU_V1TRAP = ASN_CONTEXT or ASN_CONSTRUCTOR or $4;
+ {$EXTERNALSYM SNMP_PDU_V1TRAP}
+ SNMP_PDU_GETBULK = ASN_CONTEXT or ASN_CONSTRUCTOR or $5;
+ {$EXTERNALSYM SNMP_PDU_GETBULK}
+ SNMP_PDU_INFORM = ASN_CONTEXT or ASN_CONSTRUCTOR or $6;
+ {$EXTERNALSYM SNMP_PDU_INFORM}
+ SNMP_PDU_TRAP = ASN_CONTEXT or ASN_CONSTRUCTOR or $7;
+ {$EXTERNALSYM SNMP_PDU_TRAP}
+
+ // (rom) deactivated seems useless
+ { ENDIF _INC_WINSNMP}
+
+ { SNMP Simple Syntax Values }
+
+ ASN_INTEGER = ASN_UNIVERSAL or ASN_PRIMITIVE or $02;
+ {$EXTERNALSYM ASN_INTEGER}
+ ASN_BITS = ASN_UNIVERSAL or ASN_PRIMITIVE or $03;
+ {$EXTERNALSYM ASN_BITS}
+ ASN_OCTETSTRING = ASN_UNIVERSAL or ASN_PRIMITIVE or $04;
+ {$EXTERNALSYM ASN_OCTETSTRING}
+ ASN_NULL = ASN_UNIVERSAL or ASN_PRIMITIVE or $05;
+ {$EXTERNALSYM ASN_NULL}
+ ASN_OBJECTIDENTIFIER = ASN_UNIVERSAL or ASN_PRIMITIVE or $06;
+ {$EXTERNALSYM ASN_OBJECTIDENTIFIER}
+ ASN_INTEGER32 = ASN_INTEGER;
+ {$EXTERNALSYM ASN_INTEGER32}
+
+{ SNMP Constructor Syntax Values }
+
+ ASN_SEQUENCE = ASN_UNIVERSAL or ASN_CONSTRUCTOR or $10;
+ {$EXTERNALSYM ASN_SEQUENCE}
+ ASN_SEQUENCEOF = ASN_SEQUENCE;
+ {$EXTERNALSYM ASN_SEQUENCEOF}
+
+{ SNMP Application Syntax Values }
+
+ ASN_IPADDRESS = ASN_APPLICATION or ASN_PRIMITIVE or $00;
+ {$EXTERNALSYM ASN_IPADDRESS}
+ ASN_COUNTER32 = ASN_APPLICATION or ASN_PRIMITIVE or $01;
+ {$EXTERNALSYM ASN_COUNTER32}
+ ASN_GAUGE32 = ASN_APPLICATION or ASN_PRIMITIVE or $02;
+ {$EXTERNALSYM ASN_GAUGE32}
+ ASN_TIMETICKS = ASN_APPLICATION or ASN_PRIMITIVE or $03;
+ {$EXTERNALSYM ASN_TIMETICKS}
+ ASN_OPAQUE = ASN_APPLICATION or ASN_PRIMITIVE or $04;
+ {$EXTERNALSYM ASN_OPAQUE}
+ ASN_COUNTER64 = ASN_APPLICATION or ASN_PRIMITIVE or $06;
+ {$EXTERNALSYM ASN_COUNTER64}
+ ASN_UINTEGER32 = ASN_APPLICATION or ASN_PRIMITIVE or $07;
+ {$EXTERNALSYM ASN_UINTEGER32}
+ ASN_RFC2578_UNSIGNED32 = ASN_GAUGE32;
+ {$EXTERNALSYM ASN_RFC2578_UNSIGNED32}
+
+{ SNMP Exception Conditions }
+
+ SNMP_EXCEPTION_NOSUCHOBJECT = ASN_CONTEXT or ASN_PRIMITIVE or $00;
+ {$EXTERNALSYM SNMP_EXCEPTION_NOSUCHOBJECT}
+ SNMP_EXCEPTION_NOSUCHINSTANCE = ASN_CONTEXT or ASN_PRIMITIVE or $01;
+ {$EXTERNALSYM SNMP_EXCEPTION_NOSUCHINSTANCE}
+ SNMP_EXCEPTION_ENDOFMIBVIEW = ASN_CONTEXT or ASN_PRIMITIVE or $02;
+ {$EXTERNALSYM SNMP_EXCEPTION_ENDOFMIBVIEW}
+
+{ SNMP Request Types (used in SnmpExtensionQueryEx) }
+
+ SNMP_EXTENSION_GET = SNMP_PDU_GET;
+ {$EXTERNALSYM SNMP_EXTENSION_GET}
+ SNMP_EXTENSION_GET_NEXT = SNMP_PDU_GETNEXT;
+ {$EXTERNALSYM SNMP_EXTENSION_GET_NEXT}
+ SNMP_EXTENSION_GET_BULK = SNMP_PDU_GETBULK;
+ {$EXTERNALSYM SNMP_EXTENSION_GET_BULK}
+ SNMP_EXTENSION_SET_TEST = ASN_PRIVATE or ASN_CONSTRUCTOR or $0;
+ {$EXTERNALSYM SNMP_EXTENSION_SET_TEST}
+ SNMP_EXTENSION_SET_COMMIT = SNMP_PDU_SET;
+ {$EXTERNALSYM SNMP_EXTENSION_SET_COMMIT}
+ SNMP_EXTENSION_SET_UNDO = ASN_PRIVATE or ASN_CONSTRUCTOR or $1;
+ {$EXTERNALSYM SNMP_EXTENSION_SET_UNDO}
+ SNMP_EXTENSION_SET_CLEANUP = ASN_PRIVATE or ASN_CONSTRUCTOR or $2;
+ {$EXTERNALSYM SNMP_EXTENSION_SET_CLEANUP}
+
+{ SNMP Error Codes }
+
+ SNMP_ERRORSTATUS_NOERROR = 0;
+ {$EXTERNALSYM SNMP_ERRORSTATUS_NOERROR}
+ SNMP_ERRORSTATUS_TOOBIG = 1;
+ {$EXTERNALSYM SNMP_ERRORSTATUS_TOOBIG}
+ SNMP_ERRORSTATUS_NOSUCHNAME = 2;
+ {$EXTERNALSYM SNMP_ERRORSTATUS_NOSUCHNAME}
+ SNMP_ERRORSTATUS_BADVALUE = 3;
+ {$EXTERNALSYM SNMP_ERRORSTATUS_BADVALUE}
+ SNMP_ERRORSTATUS_READONLY = 4;
+ {$EXTERNALSYM SNMP_ERRORSTATUS_READONLY}
+ SNMP_ERRORSTATUS_GENERR = 5;
+ {$EXTERNALSYM SNMP_ERRORSTATUS_GENERR}
+ SNMP_ERRORSTATUS_NOACCESS = 6;
+ {$EXTERNALSYM SNMP_ERRORSTATUS_NOACCESS}
+ SNMP_ERRORSTATUS_WRONGTYPE = 7;
+ {$EXTERNALSYM SNMP_ERRORSTATUS_WRONGTYPE}
+ SNMP_ERRORSTATUS_WRONGLENGTH = 8;
+ {$EXTERNALSYM SNMP_ERRORSTATUS_WRONGLENGTH}
+ SNMP_ERRORSTATUS_WRONGENCODING = 9;
+ {$EXTERNALSYM SNMP_ERRORSTATUS_WRONGENCODING}
+ SNMP_ERRORSTATUS_WRONGVALUE = 10;
+ {$EXTERNALSYM SNMP_ERRORSTATUS_WRONGVALUE}
+ SNMP_ERRORSTATUS_NOCREATION = 11;
+ {$EXTERNALSYM SNMP_ERRORSTATUS_NOCREATION}
+ SNMP_ERRORSTATUS_INCONSISTENTVALUE = 12;
+ {$EXTERNALSYM SNMP_ERRORSTATUS_INCONSISTENTVALUE}
+ SNMP_ERRORSTATUS_RESOURCEUNAVAILABLE = 13;
+ {$EXTERNALSYM SNMP_ERRORSTATUS_RESOURCEUNAVAILABLE}
+ SNMP_ERRORSTATUS_COMMITFAILED = 14;
+ {$EXTERNALSYM SNMP_ERRORSTATUS_COMMITFAILED}
+ SNMP_ERRORSTATUS_UNDOFAILED = 15;
+ {$EXTERNALSYM SNMP_ERRORSTATUS_UNDOFAILED}
+ SNMP_ERRORSTATUS_AUTHORIZATIONERROR = 16;
+ {$EXTERNALSYM SNMP_ERRORSTATUS_AUTHORIZATIONERROR}
+ SNMP_ERRORSTATUS_NOTWRITABLE = 17;
+ {$EXTERNALSYM SNMP_ERRORSTATUS_NOTWRITABLE}
+ SNMP_ERRORSTATUS_INCONSISTENTNAME = 18;
+ {$EXTERNALSYM SNMP_ERRORSTATUS_INCONSISTENTNAME}
+
+{ SNMPv1 Trap Types }
+
+ SNMP_GENERICTRAP_COLDSTART = 0;
+ {$EXTERNALSYM SNMP_GENERICTRAP_COLDSTART}
+ SNMP_GENERICTRAP_WARMSTART = 1;
+ {$EXTERNALSYM SNMP_GENERICTRAP_WARMSTART}
+ SNMP_GENERICTRAP_LINKDOWN = 2;
+ {$EXTERNALSYM SNMP_GENERICTRAP_LINKDOWN}
+ SNMP_GENERICTRAP_LINKUP = 3;
+ {$EXTERNALSYM SNMP_GENERICTRAP_LINKUP}
+ SNMP_GENERICTRAP_AUTHFAILURE = 4;
+ {$EXTERNALSYM SNMP_GENERICTRAP_AUTHFAILURE}
+ SNMP_GENERICTRAP_EGPNEIGHLOSS = 5;
+ {$EXTERNALSYM SNMP_GENERICTRAP_EGPNEIGHLOSS}
+ SNMP_GENERICTRAP_ENTERSPECIFIC = 6;
+ {$EXTERNALSYM SNMP_GENERICTRAP_ENTERSPECIFIC}
+
+{ SNMP Access Types }
+
+ SNMP_ACCESS_NONE = 0;
+ {$EXTERNALSYM SNMP_ACCESS_NONE}
+ SNMP_ACCESS_NOTIFY = 1;
+ {$EXTERNALSYM SNMP_ACCESS_NOTIFY}
+ SNMP_ACCESS_READ_ONLY = 2;
+ {$EXTERNALSYM SNMP_ACCESS_READ_ONLY}
+ SNMP_ACCESS_READ_WRITE = 3;
+ {$EXTERNALSYM SNMP_ACCESS_READ_WRITE}
+ SNMP_ACCESS_READ_CREATE = 4;
+ {$EXTERNALSYM SNMP_ACCESS_READ_CREATE}
+
+{ SNMP API Return Code Definitions }
+
+type
+ SNMPAPI = Integer;
+ {$EXTERNALSYM SNMPAPI}
+
+const
+ SNMPAPI_NOERROR = True;
+ {$EXTERNALSYM SNMPAPI_NOERROR}
+ SNMPAPI_ERROR = False;
+ {$EXTERNALSYM SNMPAPI_ERROR}
+
+{ SNMP Extension API Type Definitions }
+
+type
+ TSnmpExtensionInit = function(dwUptimeReference: DWORD; var phSubagentTrapEvent: HANDLE;
+ var pFirstSupportedRegion: PAsnObjectIdentifier): BOOL; stdcall;
+
+ TSnmpExtensionInitEx = function(var pNextSupportedRegion: PAsnObjectIdentifier): BOOL; stdcall;
+
+ TSnmpExtensionMonitor = function(pAgentMgmtData: LPVOID): BOOL; stdcall;
+
+ TSnmpExtensionQuery = function(bPduType: Byte; var pVarBindList: TSnmpVarBindList;
+ var pErrorStatus: TAsnInteger32; var pErrorIndex: TAsnInteger32): BOOL; stdcall;
+
+ TSnmpExtensionQueryEx = function(nRequestType: UINT; nTransactionId: UINT; var pVarBindList: PSnmpVarBindList;
+ var pContextInfo: PAsnOctetString; var pErrorStatus: TAsnInteger32; var pErrorIndex: TAsnInteger32): BOOL; stdcall;
+
+ TSnmpExtensionTrap = function(pEnterpriseOid: PAsnObjectIdentifier; var pGenericTrapId: TAsnInteger32;
+ var pSpecificTrapId: TAsnInteger32; var pTimeStamp: TAsnTimeticks; var pVarBindList: PSnmpVarBindList): BOOL; stdcall;
+
+ TSnmpExtensionClose = procedure; stdcall;
+
+{ SNMP API Prototypes }
+
+function SnmpUtilOidCpy(pOidDst: PAsnObjectIdentifier; pOidSrc: PAsnObjectIdentifier): SNMPAPI; stdcall;
+{$EXTERNALSYM SnmpUtilOidCpy}
+function SnmpUtilOidAppend(pOidDst: PAsnObjectIdentifier; pOidSrc: PAsnObjectIdentifier): SNMPAPI; stdcall;
+{$EXTERNALSYM SnmpUtilOidAppend}
+function SnmpUtilOidNCmp(pOid1, pOid2: PAsnObjectIdentifier; nSubIds: UINT): SNMPAPI; stdcall;
+{$EXTERNALSYM SnmpUtilOidNCmp}
+function SnmpUtilOidCmp(pOid1, pOid2: PAsnObjectIdentifier): SNMPAPI; stdcall;
+{$EXTERNALSYM SnmpUtilOidCmp}
+procedure SnmpUtilOidFree(pOid: TAsnObjectIdentifier); stdcall;
+{$EXTERNALSYM SnmpUtilOidFree}
+function SnmpUtilOctetsCmp(pOctets1, pOctets2: PAsnOctetString): SNMPAPI; stdcall;
+{$EXTERNALSYM SnmpUtilOctetsCmp}
+function SnmpUtilOctetsNCmp(pOctets1, pOctets2: PAsnOctetString; nChars: UINT): SNMPAPI; stdcall;
+{$EXTERNALSYM SnmpUtilOctetsNCmp}
+function SnmpUtilOctetsCpy(pOctetsDst, pOctetsSrc: PAsnOctetString): SNMPAPI; stdcall;
+{$EXTERNALSYM SnmpUtilOctetsCpy}
+procedure SnmpUtilOctetsFree(pOctets: PAsnOctetString); stdcall;
+{$EXTERNALSYM SnmpUtilOctetsFree}
+function SnmpUtilAsnAnyCpy(pAnyDst, pAnySrc: PAsnAny): SNMPAPI; stdcall;
+{$EXTERNALSYM SnmpUtilAsnAnyCpy}
+procedure SnmpUtilAsnAnyFree(pAny: PAsnAny); stdcall;
+{$EXTERNALSYM SnmpUtilAsnAnyFree}
+function SnmpUtilVarBindCpy(pVbDst: PSnmpVarBind; pVbSrc: PSnmpVarBind): SNMPAPI; stdcall;
+{$EXTERNALSYM SnmpUtilVarBindCpy}
+procedure SnmpUtilVarBindFree(pVb: PSnmpVarBind); stdcall;
+{$EXTERNALSYM SnmpUtilVarBindFree}
+function SnmpUtilVarBindListCpy(pVblDst: PSnmpVarBindList; pVblSrc: PSnmpVarBindList): SNMPAPI; stdcall;
+{$EXTERNALSYM SnmpUtilVarBindListCpy}
+procedure SnmpUtilVarBindListFree(pVbl: PSnmpVarBindList); stdcall;
+{$EXTERNALSYM SnmpUtilVarBindListFree}
+procedure SnmpUtilMemFree(pMem: LPVOID); stdcall;
+{$EXTERNALSYM SnmpUtilMemFree}
+function SnmpUtilMemAlloc(nBytes: UINT): LPVOID; stdcall;
+{$EXTERNALSYM SnmpUtilMemAlloc}
+function SnmpUtilMemReAlloc(pMem: LPVOID; nBytes: UINT): LPVOID; stdcall;
+{$EXTERNALSYM SnmpUtilMemReAlloc}
+function SnmpUtilOidToA(Oid: PAsnObjectIdentifier): LPSTR; stdcall;
+{$EXTERNALSYM SnmpUtilOidToA}
+function SnmpUtilIdsToA(Ids: PUINT; IdLength: UINT): LPSTR; stdcall;
+{$EXTERNALSYM SnmpUtilIdsToA}
+procedure SnmpUtilPrintOid(Oid: PAsnObjectIdentifier); stdcall;
+{$EXTERNALSYM SnmpUtilPrintOid}
+procedure SnmpUtilPrintAsnAny(pAny: PAsnAny); stdcall;
+{$EXTERNALSYM SnmpUtilPrintAsnAny}
+function SnmpSvcGetUptime: DWORD; stdcall;
+{$EXTERNALSYM SnmpSvcGetUptime}
+procedure SnmpSvcSetLogLevel(nLogLevel: INT); stdcall;
+{$EXTERNALSYM SnmpSvcSetLogLevel}
+procedure SnmpSvcSetLogType(nLogType: INT); stdcall;
+{$EXTERNALSYM SnmpSvcSetLogType}
+
+{ SNMP Debugging Definitions }
+
+const
+ SNMP_LOG_SILENT = $0;
+ {$EXTERNALSYM SNMP_LOG_SILENT}
+ SNMP_LOG_FATAL = $1;
+ {$EXTERNALSYM SNMP_LOG_FATAL}
+ SNMP_LOG_ERROR = $2;
+ {$EXTERNALSYM SNMP_LOG_ERROR}
+ SNMP_LOG_WARNING = $3;
+ {$EXTERNALSYM SNMP_LOG_WARNING}
+ SNMP_LOG_TRACE = $4;
+ {$EXTERNALSYM SNMP_LOG_TRACE}
+ SNMP_LOG_VERBOSE = $5;
+ {$EXTERNALSYM SNMP_LOG_VERBOSE}
+
+ SNMP_OUTPUT_TO_CONSOLE = $1;
+ {$EXTERNALSYM SNMP_OUTPUT_TO_CONSOLE}
+ SNMP_OUTPUT_TO_LOGFILE = $2;
+ {$EXTERNALSYM SNMP_OUTPUT_TO_LOGFILE}
+ SNMP_OUTPUT_TO_EVENTLOG = $4; // no longer supported
+ {$EXTERNALSYM SNMP_OUTPUT_TO_EVENTLOG}
+ SNMP_OUTPUT_TO_DEBUGGER = $8;
+ {$EXTERNALSYM SNMP_OUTPUT_TO_DEBUGGER}
+
+{ SNMP Debugging Prototypes }
+
+procedure SnmpUtilDbgPrint(nLogLevel: INT; szFormat: LPSTR); stdcall;
+{$EXTERNALSYM SnmpUtilDbgPrint}
+
+{ Miscellaneous definitions }
+
+const
+ DEFINE_NULLOID: TAsnObjectIdentifier = (idLength: 0; ids: nil);
+ {$EXTERNALSYM DEFINE_NULLOID}
+ DEFINE_NULLOCTETS: TAsnOctetString = (stream: nil; length: 0; dynamic_: False);
+ {$EXTERNALSYM DEFINE_NULLOCTETS}
+
+ DEFAULT_SNMP_PORT_UDP = 161;
+ {$EXTERNALSYM DEFAULT_SNMP_PORT_UDP}
+ DEFAULT_SNMP_PORT_IPX = 36879;
+ {$EXTERNALSYM DEFAULT_SNMP_PORT_IPX}
+ DEFAULT_SNMPTRAP_PORT_UDP = 162;
+ {$EXTERNALSYM DEFAULT_SNMPTRAP_PORT_UDP}
+ DEFAULT_SNMPTRAP_PORT_IPX = 36880;
+ {$EXTERNALSYM DEFAULT_SNMPTRAP_PORT_IPX}
+ SNMP_MAX_OID_LEN = 128;
+ {$EXTERNALSYM SNMP_MAX_OID_LEN}
+
+{ API Error Code Definitions }
+
+ SNMP_MEM_ALLOC_ERROR = 1;
+ {$EXTERNALSYM SNMP_MEM_ALLOC_ERROR}
+ SNMP_BERAPI_INVALID_LENGTH = 10;
+ {$EXTERNALSYM SNMP_BERAPI_INVALID_LENGTH}
+ SNMP_BERAPI_INVALID_TAG = 11;
+ {$EXTERNALSYM SNMP_BERAPI_INVALID_TAG}
+ SNMP_BERAPI_OVERFLOW = 12;
+ {$EXTERNALSYM SNMP_BERAPI_OVERFLOW}
+ SNMP_BERAPI_SHORT_BUFFER = 13;
+ {$EXTERNALSYM SNMP_BERAPI_SHORT_BUFFER}
+ SNMP_BERAPI_INVALID_OBJELEM = 14;
+ {$EXTERNALSYM SNMP_BERAPI_INVALID_OBJELEM}
+ SNMP_PDUAPI_UNRECOGNIZED_PDU = 20;
+ {$EXTERNALSYM SNMP_PDUAPI_UNRECOGNIZED_PDU}
+ SNMP_PDUAPI_INVALID_ES = 21;
+ {$EXTERNALSYM SNMP_PDUAPI_INVALID_ES}
+ SNMP_PDUAPI_INVALID_GT = 22;
+ {$EXTERNALSYM SNMP_PDUAPI_INVALID_GT}
+ SNMP_AUTHAPI_INVALID_VERSION = 30;
+ {$EXTERNALSYM SNMP_AUTHAPI_INVALID_VERSION}
+ SNMP_AUTHAPI_INVALID_MSG_TYPE = 31;
+ {$EXTERNALSYM SNMP_AUTHAPI_INVALID_MSG_TYPE}
+ SNMP_AUTHAPI_TRIV_AUTH_FAILED = 32;
+ {$EXTERNALSYM SNMP_AUTHAPI_TRIV_AUTH_FAILED}
+
+{ Support for old definitions (support disabled via SNMPSTRICT) }
+
+{$IFNDEF SNMPSTRICT}
+
+function SNMP_oidcpy(pOidDst: PAsnObjectIdentifier; pOidSrc: PAsnObjectIdentifier): SNMPAPI; stdcall;
+{$EXTERNALSYM SNMP_oidcpy}
+function SNMP_oidappend(pOidDst: PAsnObjectIdentifier; pOidSrc: PAsnObjectIdentifier): SNMPAPI; stdcall;
+{$EXTERNALSYM SNMP_oidappend}
+function SNMP_oidncmp(pOid1, pOid2: PAsnObjectIdentifier; nSubIds: UINT): SNMPAPI; stdcall;
+{$EXTERNALSYM SNMP_oidncmp}
+function SNMP_oidcmp(pOid1, pOid2: PAsnObjectIdentifier): SNMPAPI; stdcall;
+{$EXTERNALSYM SNMP_oidcmp}
+procedure SNMP_oidfree(pOid: TAsnObjectIdentifier); stdcall;
+{$EXTERNALSYM SNMP_oidfree}
+
+function SNMP_CopyVarBind(pVbDst: PSnmpVarBind; pVbSrc: PSnmpVarBind): SNMPAPI; stdcall;
+{$EXTERNALSYM SNMP_CopyVarBind}
+procedure SNMP_FreeVarBind(pVb: PSnmpVarBind); stdcall;
+{$EXTERNALSYM SNMP_FreeVarBind}
+function SNMP_CopyVarBindList(pVblDst: PSnmpVarBindList; pVblSrc: PSnmpVarBindList): SNMPAPI; stdcall;
+{$EXTERNALSYM SNMP_CopyVarBindList}
+procedure SNMP_FreeVarBindList(pVbl: PSnmpVarBindList); stdcall;
+{$EXTERNALSYM SNMP_FreeVarBindList}
+
+procedure SNMP_printany(pAny: PAsnAny); stdcall;
+{$EXTERNALSYM SNMP_printany}
+
+procedure SNMP_free(pMem: LPVOID); stdcall;
+{$EXTERNALSYM SNMP_free}
+function SNMP_malloc(nBytes: UINT): LPVOID; stdcall;
+{$EXTERNALSYM SNMP_malloc}
+function SNMP_realloc(pMem: LPVOID; nBytes: UINT): LPVOID; stdcall;
+{$EXTERNALSYM SNMP_realloc}
+
+procedure SNMP_DBG_free(pMem: LPVOID); stdcall;
+{$EXTERNALSYM SNMP_DBG_free}
+function SNMP_DBG_malloc(nBytes: UINT): LPVOID; stdcall;
+{$EXTERNALSYM SNMP_DBG_malloc}
+function SNMP_DBG_realloc(pMem: LPVOID; nBytes: UINT): LPVOID; stdcall;
+{$EXTERNALSYM SNMP_DBG_realloc}
+
+const
+ ASN_RFC1155_IPADDRESS = ASN_IPADDRESS;
+ {$EXTERNALSYM ASN_RFC1155_IPADDRESS}
+ ASN_RFC1155_COUNTER = ASN_COUNTER32;
+ {$EXTERNALSYM ASN_RFC1155_COUNTER}
+ ASN_RFC1155_GAUGE = ASN_GAUGE32;
+ {$EXTERNALSYM ASN_RFC1155_GAUGE}
+ ASN_RFC1155_TIMETICKS = ASN_TIMETICKS;
+ {$EXTERNALSYM ASN_RFC1155_TIMETICKS}
+ ASN_RFC1155_OPAQUE = ASN_OPAQUE;
+ {$EXTERNALSYM ASN_RFC1155_OPAQUE}
+ ASN_RFC1213_DISPSTRING = ASN_OCTETSTRING;
+ {$EXTERNALSYM ASN_RFC1213_DISPSTRING}
+
+ ASN_RFC1157_GETREQUEST = SNMP_PDU_GET;
+ {$EXTERNALSYM ASN_RFC1157_GETREQUEST}
+ ASN_RFC1157_GETNEXTREQUEST = SNMP_PDU_GETNEXT;
+ {$EXTERNALSYM ASN_RFC1157_GETNEXTREQUEST}
+ ASN_RFC1157_GETRESPONSE = SNMP_PDU_RESPONSE;
+ {$EXTERNALSYM ASN_RFC1157_GETRESPONSE}
+ ASN_RFC1157_SETREQUEST = SNMP_PDU_SET;
+ {$EXTERNALSYM ASN_RFC1157_SETREQUEST}
+ ASN_RFC1157_TRAP = SNMP_PDU_V1TRAP;
+ {$EXTERNALSYM ASN_RFC1157_TRAP}
+
+ ASN_CONTEXTSPECIFIC = ASN_CONTEXT;
+ {$EXTERNALSYM ASN_CONTEXTSPECIFIC}
+ ASN_PRIMATIVE = ASN_PRIMITIVE;
+ {$EXTERNALSYM ASN_PRIMATIVE}
+
+type
+ RFC1157VarBindList = TSnmpVarBindList;
+ {$EXTERNALSYM RFC1157VarBindList}
+ RFC1157VarBind = TSnmpVarBind;
+ {$EXTERNALSYM RFC1157VarBind}
+ TAsnInteger = TAsnInteger32;
+ {$EXTERNALSYM TAsnInteger}
+ TAsnCounter = TAsnCounter32;
+ {$EXTERNALSYM TAsnCounter}
+ TAsnGauge = TAsnGauge32;
+ {$EXTERNALSYM TAsnGauge}
+
+const
+ ASN_UNSIGNED32 = ASN_UINTEGER32;
+ {$EXTERNALSYM ASN_UNSIGNED32}
+
+{$ENDIF !SNMPSTRICT}
+
+implementation
+
+uses
+ JwaWinBase;
+
+const
+ snmpapilib = 'snmpapi.dll';
+
+{$IFDEF DYNAMIC_LINK}
+
+var
+ _SnmpUtilOidCpy: Pointer;
+
+function SnmpUtilOidCpy;
+begin
+ GetProcedureAddress(_SnmpUtilOidCpy, snmpapilib, 'SnmpUtilOidCpy');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SnmpUtilOidCpy]
+ end;
+end;
+
+var
+ _SnmpUtilOidAppend: Pointer;
+
+function SnmpUtilOidAppend;
+begin
+ GetProcedureAddress(_SnmpUtilOidAppend, snmpapilib, 'SnmpUtilOidAppend');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SnmpUtilOidAppend]
+ end;
+end;
+
+var
+ _SnmpUtilOidNCmp: Pointer;
+
+function SnmpUtilOidNCmp;
+begin
+ GetProcedureAddress(_SnmpUtilOidNCmp, snmpapilib, 'SnmpUtilOidNCmp');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SnmpUtilOidNCmp]
+ end;
+end;
+
+var
+ _SnmpUtilOidCmp: Pointer;
+
+function SnmpUtilOidCmp;
+begin
+ GetProcedureAddress(_SnmpUtilOidCmp, snmpapilib, 'SnmpUtilOidCmp');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SnmpUtilOidCmp]
+ end;
+end;
+
+var
+ _SnmpUtilOidFree: Pointer;
+
+procedure SnmpUtilOidFree;
+begin
+ GetProcedureAddress(_SnmpUtilOidFree, snmpapilib, 'SnmpUtilOidFree');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SnmpUtilOidFree]
+ end;
+end;
+
+var
+ _SnmpUtilOctetsCmp: Pointer;
+
+function SnmpUtilOctetsCmp;
+begin
+ GetProcedureAddress(_SnmpUtilOctetsCmp, snmpapilib, 'SnmpUtilOctetsCmp');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SnmpUtilOctetsCmp]
+ end;
+end;
+
+var
+ _SnmpUtilOctetsNCmp: Pointer;
+
+function SnmpUtilOctetsNCmp;
+begin
+ GetProcedureAddress(_SnmpUtilOctetsNCmp, snmpapilib, 'SnmpUtilOctetsNCmp');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SnmpUtilOctetsNCmp]
+ end;
+end;
+
+var
+ _SnmpUtilOctetsCpy: Pointer;
+
+function SnmpUtilOctetsCpy;
+begin
+ GetProcedureAddress(_SnmpUtilOctetsCpy, snmpapilib, 'SnmpUtilOctetsCpy');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SnmpUtilOctetsCpy]
+ end;
+end;
+
+var
+ _SnmpUtilOctetsFree: Pointer;
+
+procedure SnmpUtilOctetsFree;
+begin
+ GetProcedureAddress(_SnmpUtilOctetsFree, snmpapilib, 'SnmpUtilOctetsFree');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SnmpUtilOctetsFree]
+ end;
+end;
+
+var
+ _SnmpUtilAsnAnyCpy: Pointer;
+
+function SnmpUtilAsnAnyCpy;
+begin
+ GetProcedureAddress(_SnmpUtilAsnAnyCpy, snmpapilib, 'SnmpUtilAsnAnyCpy');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SnmpUtilAsnAnyCpy]
+ end;
+end;
+
+var
+ _SnmpUtilAsnAnyFree: Pointer;
+
+procedure SnmpUtilAsnAnyFree;
+begin
+ GetProcedureAddress(_SnmpUtilAsnAnyFree, snmpapilib, 'SnmpUtilAsnAnyFree');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SnmpUtilAsnAnyFree]
+ end;
+end;
+
+var
+ _SnmpUtilVarBindCpy: Pointer;
+
+function SnmpUtilVarBindCpy;
+begin
+ GetProcedureAddress(_SnmpUtilVarBindCpy, snmpapilib, 'SnmpUtilVarBindCpy');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SnmpUtilVarBindCpy]
+ end;
+end;
+
+var
+ _SnmpUtilVarBindFree: Pointer;
+
+procedure SnmpUtilVarBindFree;
+begin
+ GetProcedureAddress(_SnmpUtilVarBindFree, snmpapilib, 'SnmpUtilVarBindFree');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SnmpUtilVarBindFree]
+ end;
+end;
+
+var
+ _SnmpUtilVarBindListCpy: Pointer;
+
+function SnmpUtilVarBindListCpy;
+begin
+ GetProcedureAddress(_SnmpUtilVarBindListCpy, snmpapilib, 'SnmpUtilVarBindListCpy');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SnmpUtilVarBindListCpy]
+ end;
+end;
+
+var
+ _SnmpUtilVarBindListFree: Pointer;
+
+procedure SnmpUtilVarBindListFree;
+begin
+ GetProcedureAddress(_SnmpUtilVarBindListFree, snmpapilib, 'SnmpUtilVarBindListFree');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SnmpUtilVarBindListFree]
+ end;
+end;
+
+var
+ _SnmpUtilMemFree: Pointer;
+
+procedure SnmpUtilMemFree;
+begin
+ GetProcedureAddress(_SnmpUtilMemFree, snmpapilib, 'SnmpUtilMemFree');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SnmpUtilMemFree]
+ end;
+end;
+
+var
+ _SnmpUtilMemAlloc: Pointer;
+
+function SnmpUtilMemAlloc;
+begin
+ GetProcedureAddress(_SnmpUtilMemAlloc, snmpapilib, 'SnmpUtilMemAlloc');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SnmpUtilMemAlloc]
+ end;
+end;
+
+var
+ _SnmpUtilMemReAlloc: Pointer;
+
+function SnmpUtilMemReAlloc;
+begin
+ GetProcedureAddress(_SnmpUtilMemReAlloc, snmpapilib, 'SnmpUtilMemReAlloc');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SnmpUtilMemReAlloc]
+ end;
+end;
+
+var
+ _SnmpUtilOidToA: Pointer;
+
+function SnmpUtilOidToA;
+begin
+ GetProcedureAddress(_SnmpUtilOidToA, snmpapilib, 'SnmpUtilOidToA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SnmpUtilOidToA]
+ end;
+end;
+
+var
+ _SnmpUtilIdsToA: Pointer;
+
+function SnmpUtilIdsToA;
+begin
+ GetProcedureAddress(_SnmpUtilIdsToA, snmpapilib, 'SnmpUtilIdsToA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SnmpUtilIdsToA]
+ end;
+end;
+
+var
+ _SnmpUtilPrintOid: Pointer;
+
+procedure SnmpUtilPrintOid;
+begin
+ GetProcedureAddress(_SnmpUtilPrintOid, snmpapilib, 'SnmpUtilPrintOid');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SnmpUtilPrintOid]
+ end;
+end;
+
+var
+ _SnmpUtilPrintAsnAny: Pointer;
+
+procedure SnmpUtilPrintAsnAny;
+begin
+ GetProcedureAddress(_SnmpUtilPrintAsnAny, snmpapilib, 'SnmpUtilPrintAsnAny');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SnmpUtilPrintAsnAny]
+ end;
+end;
+
+var
+ _SnmpSvcGetUptime: Pointer;
+
+function SnmpSvcGetUptime;
+begin
+ GetProcedureAddress(_SnmpSvcGetUptime, snmpapilib, 'SnmpSvcGetUptime');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SnmpSvcGetUptime]
+ end;
+end;
+
+var
+ _SnmpSvcSetLogLevel: Pointer;
+
+procedure SnmpSvcSetLogLevel;
+begin
+ GetProcedureAddress(_SnmpSvcSetLogLevel, snmpapilib, 'SnmpSvcSetLogLevel');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SnmpSvcSetLogLevel]
+ end;
+end;
+
+var
+ _SnmpSvcSetLogType: Pointer;
+
+procedure SnmpSvcSetLogType;
+begin
+ GetProcedureAddress(_SnmpSvcSetLogType, snmpapilib, 'SnmpSvcSetLogType');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SnmpSvcSetLogType]
+ end;
+end;
+
+var
+ _SnmpUtilDbgPrint: Pointer;
+
+procedure SnmpUtilDbgPrint;
+begin
+ GetProcedureAddress(_SnmpUtilDbgPrint, snmpapilib, 'SnmpUtilDbgPrint');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SnmpUtilDbgPrint]
+ end;
+end;
+
+{$IFNDEF SNMPSTRICT}
+
+var
+ _SNMP_oidcpy: Pointer;
+
+function SNMP_oidcpy;
+begin
+ GetProcedureAddress(_SNMP_oidcpy, snmpapilib, 'SnmpUtilOidCpy');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SNMP_oidcpy]
+ end;
+end;
+
+var
+ _SNMP_oidappend: Pointer;
+
+function SNMP_oidappend;
+begin
+ GetProcedureAddress(_SNMP_oidappend, snmpapilib, 'SnmpUtilOidAppend');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SNMP_oidappend]
+ end;
+end;
+
+var
+ _SNMP_oidncmp: Pointer;
+
+function SNMP_oidncmp;
+begin
+ GetProcedureAddress(_SNMP_oidncmp, snmpapilib, 'SnmpUtilOidNCmp');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SNMP_oidncmp]
+ end;
+end;
+
+var
+ _SNMP_oidcmp: Pointer;
+
+function SNMP_oidcmp;
+begin
+ GetProcedureAddress(_SNMP_oidcmp, snmpapilib, 'SnmpUtilOidCmp');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SNMP_oidcmp]
+ end;
+end;
+
+var
+ _SNMP_oidfree: Pointer;
+
+procedure SNMP_oidfree;
+begin
+ GetProcedureAddress(_SNMP_oidfree, snmpapilib, 'SnmpUtilOidFree');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SNMP_oidfree]
+ end;
+end;
+
+var
+ _SNMP_CopyVarBind: Pointer;
+
+function SNMP_CopyVarBind;
+begin
+ GetProcedureAddress(_SNMP_CopyVarBind, snmpapilib, 'SnmpUtilVarBindCpy');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SNMP_CopyVarBind]
+ end;
+end;
+
+var
+ _SNMP_FreeVarBind: Pointer;
+
+procedure SNMP_FreeVarBind;
+begin
+ GetProcedureAddress(_SNMP_FreeVarBind, snmpapilib, 'SnmpUtilVarBindFree');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SNMP_FreeVarBind]
+ end;
+end;
+
+var
+ _SNMP_CopyVarBindList: Pointer;
+
+function SNMP_CopyVarBindList;
+begin
+ GetProcedureAddress(_SNMP_CopyVarBindList, snmpapilib, 'SnmpUtilVarBindListCpy');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SNMP_CopyVarBindList]
+ end;
+end;
+
+var
+ _SNMP_FreeVarBindList: Pointer;
+
+procedure SNMP_FreeVarBindList;
+begin
+ GetProcedureAddress(_SNMP_FreeVarBindList, snmpapilib, 'SnmpUtilVarBindListFree');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SNMP_FreeVarBindList]
+ end;
+end;
+
+var
+ _SNMP_printany: Pointer;
+
+procedure SNMP_printany;
+begin
+ GetProcedureAddress(_SNMP_printany, snmpapilib, 'SnmpUtilPrintAsnAny');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SNMP_printany]
+ end;
+end;
+
+var
+ _SNMP_free: Pointer;
+
+procedure SNMP_free;
+begin
+ GetProcedureAddress(_SNMP_free, snmpapilib, 'SnmpUtilMemFree');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SNMP_free]
+ end;
+end;
+
+var
+ _SNMP_malloc: Pointer;
+
+function SNMP_malloc;
+begin
+ GetProcedureAddress(_SNMP_malloc, snmpapilib, 'SnmpUtilMemAlloc');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SNMP_malloc]
+ end;
+end;
+
+var
+ _SNMP_realloc: Pointer;
+
+function SNMP_realloc;
+begin
+ GetProcedureAddress(_SNMP_realloc, snmpapilib, 'SnmpUtilMemReAlloc');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SNMP_realloc]
+ end;
+end;
+
+var
+ _SNMP_DBG_free: Pointer;
+
+procedure SNMP_DBG_free;
+begin
+ GetProcedureAddress(_SNMP_DBG_free, snmpapilib, 'SnmpUtilMemFree');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SNMP_DBG_free]
+ end;
+end;
+
+var
+ _SNMP_DBG_malloc: Pointer;
+
+function SNMP_DBG_malloc;
+begin
+ GetProcedureAddress(_SNMP_DBG_malloc, snmpapilib, 'SnmpUtilMemAlloc');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SNMP_DBG_malloc]
+ end;
+end;
+
+var
+ _SNMP_DBG_realloc: Pointer;
+
+function SNMP_DBG_realloc;
+begin
+ GetProcedureAddress(_SNMP_DBG_realloc, snmpapilib, 'SnmpUtilMemReAlloc');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SNMP_DBG_realloc]
+ end;
+end;
+
+{$ENDIF !SNMPSTRICT}
+
+{$ELSE}
+
+function SnmpUtilOidCpy; external snmpapilib name 'SnmpUtilOidCpy';
+function SnmpUtilOidAppend; external snmpapilib name 'SnmpUtilOidAppend';
+function SnmpUtilOidNCmp; external snmpapilib name 'SnmpUtilOidNCmp';
+function SnmpUtilOidCmp; external snmpapilib name 'SnmpUtilOidCmp';
+procedure SnmpUtilOidFree; external snmpapilib name 'SnmpUtilOidFree';
+function SnmpUtilOctetsCmp; external snmpapilib name 'SnmpUtilOctetsCmp';
+function SnmpUtilOctetsNCmp; external snmpapilib name 'SnmpUtilOctetsNCmp';
+function SnmpUtilOctetsCpy; external snmpapilib name 'SnmpUtilOctetsCpy';
+procedure SnmpUtilOctetsFree; external snmpapilib name 'SnmpUtilOctetsFree';
+function SnmpUtilAsnAnyCpy; external snmpapilib name 'SnmpUtilAsnAnyCpy';
+procedure SnmpUtilAsnAnyFree; external snmpapilib name 'SnmpUtilAsnAnyFree';
+function SnmpUtilVarBindCpy; external snmpapilib name 'SnmpUtilVarBindCpy';
+procedure SnmpUtilVarBindFree; external snmpapilib name 'SnmpUtilVarBindFree';
+function SnmpUtilVarBindListCpy; external snmpapilib name 'SnmpUtilVarBindListCpy';
+procedure SnmpUtilVarBindListFree; external snmpapilib name 'SnmpUtilVarBindListFree';
+procedure SnmpUtilMemFree; external snmpapilib name 'SnmpUtilMemFree';
+function SnmpUtilMemAlloc; external snmpapilib name 'SnmpUtilMemAlloc';
+function SnmpUtilMemReAlloc; external snmpapilib name 'SnmpUtilMemReAlloc';
+function SnmpUtilOidToA; external snmpapilib name 'SnmpUtilOidToA';
+function SnmpUtilIdsToA; external snmpapilib name 'SnmpUtilIdsToA';
+procedure SnmpUtilPrintOid; external snmpapilib name 'SnmpUtilPrintOid';
+procedure SnmpUtilPrintAsnAny; external snmpapilib name 'SnmpUtilPrintAsnAny';
+function SnmpSvcGetUptime; external snmpapilib name 'SnmpSvcGetUptime';
+procedure SnmpSvcSetLogLevel; external snmpapilib name 'SnmpSvcSetLogLevel';
+procedure SnmpSvcSetLogType; external snmpapilib name 'SnmpSvcSetLogType';
+procedure SnmpUtilDbgPrint; external snmpapilib name 'SnmpUtilDbgPrint';
+{$IFNDEF SNMPSTRICT}
+function SNMP_oidcpy; external snmpapilib name 'SnmpUtilOidCpy';
+function SNMP_oidappend; external snmpapilib name 'SnmpUtilOidAppend';
+function SNMP_oidncmp; external snmpapilib name 'SnmpUtilOidNCmp';
+function SNMP_oidcmp; external snmpapilib name 'SnmpUtilOidCmp';
+procedure SNMP_oidfree; external snmpapilib name 'SnmpUtilOidFree';
+function SNMP_CopyVarBind; external snmpapilib name 'SnmpUtilVarBindCpy';
+procedure SNMP_FreeVarBind; external snmpapilib name 'SnmpUtilVarBindFree';
+function SNMP_CopyVarBindList; external snmpapilib name 'SnmpUtilVarBindListCpy';
+procedure SNMP_FreeVarBindList; external snmpapilib name 'SnmpUtilVarBindListFree';
+procedure SNMP_printany; external snmpapilib name 'SnmpUtilPrintAsnAny';
+procedure SNMP_free; external snmpapilib name 'SnmpUtilMemFree';
+function SNMP_malloc; external snmpapilib name 'SnmpUtilMemAlloc';
+function SNMP_realloc; external snmpapilib name 'SnmpUtilMemReAlloc';
+procedure SNMP_DBG_free; external snmpapilib name 'SnmpUtilMemFree';
+function SNMP_DBG_malloc; external snmpapilib name 'SnmpUtilMemAlloc';
+function SNMP_DBG_realloc; external snmpapilib name 'SnmpUtilMemReAlloc';
+{$ENDIF !SNMPSTRICT}
+
+{$ENDIF DYNAMIC_LINK}
+
+end.
diff --git a/packages/extra/winunits/jwasporder.pas b/packages/extra/winunits/jwasporder.pas
index d672c07e19..e2c24207f1 100644
--- a/packages/extra/winunits/jwasporder.pas
+++ b/packages/extra/winunits/jwasporder.pas
@@ -1,114 +1,114 @@
-{******************************************************************************}
-{ }
-{ Winsock2 Service Provider ordering API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: sporder.h, released June 2000. The original Pascal }
-{ code is: SpOrder.pas, released June 2001. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwasporder.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaSpOrder;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "sporder.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaWinType;
-
-function WSCWriteProviderOrder(lpwdCatalogEntryId: LPDWORD; dwNumberOfEntries: DWORD): Integer; stdcall;
-{$EXTERNALSYM WSCWriteProviderOrder}
-
-type
- LPWSCWRITEPROVIDERORDER = function(lpwdCatalogEntryId: LPDWORD; dwNumberOfEntries: DWORD): Integer; stdcall;
- {$EXTERNALSYM LPWSCWRITEPROVIDERORDER}
-
-function WSCWriteNameSpaceOrder(const lpProviderId: TGUID; dwNumberOfEntries: DWORD): Integer; stdcall;
-{$EXTERNALSYM WSCWriteNameSpaceOrder}
-
-type
- LPWSCWRITENAMESPACEORDER = function(const lpProviderId: TGUID; dwNumberOfEntries: DWORD): Integer; stdcall;
- {$EXTERNALSYM LPWSCWRITENAMESPACEORDER}
-
-implementation
-
-const
- sporderlib = 'sporder.dll';
-
-{$IFDEF DYNAMIC_LINK}
-
-var
- _WSCWriteProviderOrder: Pointer;
-
-function WSCWriteProviderOrder;
-begin
- GetProcedureAddress(_WSCWriteProviderOrder, sporderlib, 'WSCWriteProviderOrder');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WSCWriteProviderOrder]
- end;
-end;
-
-var
- _WSCWriteNameSpaceOrder: Pointer;
-
-function WSCWriteNameSpaceOrder;
-begin
- GetProcedureAddress(_WSCWriteNameSpaceOrder, sporderlib, 'WSCWriteNameSpaceOrder');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WSCWriteNameSpaceOrder]
- end;
-end;
-
-{$ELSE}
-
-function WSCWriteProviderOrder; external sporderlib name 'WSCWriteProviderOrder';
-function WSCWriteNameSpaceOrder; external sporderlib name 'WSCWriteNameSpaceOrder';
-
-{$ENDIF DYNAMIC_LINK}
-
-end.
+{******************************************************************************}
+{ }
+{ Winsock2 Service Provider ordering API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: sporder.h, released June 2000. The original Pascal }
+{ code is: SpOrder.pas, released June 2001. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwasporder.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaSpOrder;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "sporder.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaWinType;
+
+function WSCWriteProviderOrder(lpwdCatalogEntryId: LPDWORD; dwNumberOfEntries: DWORD): Integer; stdcall;
+{$EXTERNALSYM WSCWriteProviderOrder}
+
+type
+ LPWSCWRITEPROVIDERORDER = function(lpwdCatalogEntryId: LPDWORD; dwNumberOfEntries: DWORD): Integer; stdcall;
+ {$EXTERNALSYM LPWSCWRITEPROVIDERORDER}
+
+function WSCWriteNameSpaceOrder(const lpProviderId: TGUID; dwNumberOfEntries: DWORD): Integer; stdcall;
+{$EXTERNALSYM WSCWriteNameSpaceOrder}
+
+type
+ LPWSCWRITENAMESPACEORDER = function(const lpProviderId: TGUID; dwNumberOfEntries: DWORD): Integer; stdcall;
+ {$EXTERNALSYM LPWSCWRITENAMESPACEORDER}
+
+implementation
+
+const
+ sporderlib = 'sporder.dll';
+
+{$IFDEF DYNAMIC_LINK}
+
+var
+ _WSCWriteProviderOrder: Pointer;
+
+function WSCWriteProviderOrder;
+begin
+ GetProcedureAddress(_WSCWriteProviderOrder, sporderlib, 'WSCWriteProviderOrder');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WSCWriteProviderOrder]
+ end;
+end;
+
+var
+ _WSCWriteNameSpaceOrder: Pointer;
+
+function WSCWriteNameSpaceOrder;
+begin
+ GetProcedureAddress(_WSCWriteNameSpaceOrder, sporderlib, 'WSCWriteNameSpaceOrder');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WSCWriteNameSpaceOrder]
+ end;
+end;
+
+{$ELSE}
+
+function WSCWriteProviderOrder; external sporderlib name 'WSCWriteProviderOrder';
+function WSCWriteNameSpaceOrder; external sporderlib name 'WSCWriteNameSpaceOrder';
+
+{$ENDIF DYNAMIC_LINK}
+
+end.
diff --git a/packages/extra/winunits/jwasrrestoreptapi.pas b/packages/extra/winunits/jwasrrestoreptapi.pas
index 7532125747..1c6a3fbfde 100644
--- a/packages/extra/winunits/jwasrrestoreptapi.pas
+++ b/packages/extra/winunits/jwasrrestoreptapi.pas
@@ -1,300 +1,300 @@
-{******************************************************************************}
-{ }
-{ Windows System Restore API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: srrestoreptapi.h, released Match 2003. The original }
-{ Pascal code is: SrRestorePtApi.pas, released December 2000. }
-{ The initial developer of the Pascal code is Marcel van Brakel }
-{ (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwasrrestoreptapi.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaSrRestorePtApi;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "SrRestorePtApi.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaWinNT, JwaWinType;
-
-//
-// Type of Event
-//
-
-const
- MIN_EVENT = 100;
- {$EXTERNALSYM MIN_EVENT}
- BEGIN_SYSTEM_CHANGE = 100;
- {$EXTERNALSYM BEGIN_SYSTEM_CHANGE}
- END_SYSTEM_CHANGE = 101;
- {$EXTERNALSYM END_SYSTEM_CHANGE}
- BEGIN_NESTED_SYSTEM_CHANGE = 102; // for Whistler only - use this to prevent nested restore pts
- {$EXTERNALSYM BEGIN_NESTED_SYSTEM_CHANGE}
- END_NESTED_SYSTEM_CHANGE = 103; // for Whistler only - use this to prevent nested restore pts
- {$EXTERNALSYM END_NESTED_SYSTEM_CHANGE}
- MAX_EVENT = 103;
- {$EXTERNALSYM MAX_EVENT}
-
-//
-// Type of Restore Points
-//
-
- MIN_RPT = 0;
- {$EXTERNALSYM MIN_RPT}
- APPLICATION_INSTALL = 0;
- {$EXTERNALSYM APPLICATION_INSTALL}
- APPLICATION_UNINSTALL = 1;
- {$EXTERNALSYM APPLICATION_UNINSTALL}
- DESKTOP_SETTING = 2; // Not implemented
- {$EXTERNALSYM DESKTOP_SETTING}
- ACCESSIBILITY_SETTING = 3; // Not implemented
- {$EXTERNALSYM ACCESSIBILITY_SETTING}
- OE_SETTING = 4; // Not implemented
- {$EXTERNALSYM OE_SETTING}
- APPLICATION_RUN = 5; // Not implemented
- {$EXTERNALSYM APPLICATION_RUN}
- RESTORE = 6;
- {$EXTERNALSYM RESTORE}
- CHECKPOINT = 7;
- {$EXTERNALSYM CHECKPOINT}
- WINDOWS_SHUTDOWN = 8; // Not implemented
- {$EXTERNALSYM WINDOWS_SHUTDOWN}
- WINDOWS_BOOT = 9; // Not implemented
- {$EXTERNALSYM WINDOWS_BOOT}
- DEVICE_DRIVER_INSTALL = 10;
- {$EXTERNALSYM DEVICE_DRIVER_INSTALL}
- FIRSTRUN = 11;
- {$EXTERNALSYM FIRSTRUN}
- MODIFY_SETTINGS = 12;
- {$EXTERNALSYM MODIFY_SETTINGS}
- CANCELLED_OPERATION = 13; // Only valid for END_SYSTEM_CHANGE
- {$EXTERNALSYM CANCELLED_OPERATION}
- BACKUP_RECOVERY = 14;
- {$EXTERNALSYM BACKUP_RECOVERY}
- MAX_RPT = 14;
- {$EXTERNALSYM MAX_RPT}
-
- MAX_DESC = 64;
- {$EXTERNALSYM MAX_DESC}
- MAX_DESC_W = 256; // longer for Whistler
- {$EXTERNALSYM MAX_DESC_W}
-
-//
-// for Millennium compatibility
-//
-
-//#pragma pack(push, srrestoreptapi_include)
-//#pragma pack(1)
-
-//
-// Restore point information
-//
-
-type
- _RESTOREPTINFOA = packed record
- dwEventType: DWORD; // Type of Event - Begin or End
- dwRestorePtType: DWORD; // Type of Restore Point - App install/uninstall
- llSequenceNumber: Int64; // Sequence Number - 0 for begin
- szDescription: array [0..MAX_DESC - 1] of Char; // Description - Name of Application / Operation
- end;
- {$EXTERNALSYM _RESTOREPTINFOA}
- RESTOREPOINTINFOA = _RESTOREPTINFOA;
- {$EXTERNALSYM RESTOREPOINTINFOA}
- PRESTOREPOINTINFOA = ^RESTOREPOINTINFOA;
- {$EXTERNALSYM PRESTOREPOINTINFOA}
- TRestorePointInfoA = RESTOREPOINTINFOA;
-
- _RESTOREPTINFOW = packed record
- dwEventType: DWORD; // Type of Event - Begin or End
- dwRestorePtType: DWORD; // Type of Restore Point - App install/uninstall
- llSequenceNumber: Int64; // Sequence Number - 0 for begin
- szDescription: array [0..MAX_DESC_W - 1] of WideChar; // Description - Name of Application / Operation
- end;
- {$EXTERNALSYM _RESTOREPTINFOW}
- RESTOREPOINTINFOW = _RESTOREPTINFOW;
- {$EXTERNALSYM RESTOREPOINTINFOW}
- PRESTOREPOINTINFOW = ^RESTOREPOINTINFOW;
- {$EXTERNALSYM PRESTOREPOINTINFOW}
- TRestorePointInfoW = RESTOREPOINTINFOW;
- {$IFDEF UNICODE}
- RESTOREPOINTINFO = RESTOREPOINTINFOW;
- {$EXTERNALSYM RESTOREPOINTINFO}
- PRESTOREPOINTINFO = PRESTOREPOINTINFOW;
- {$EXTERNALSYM PRESTOREPOINTINFO}
- TRestorePointInfo = TRestorePointInfoW;
- {$ELSE}
- RESTOREPOINTINFO = RESTOREPOINTINFOA;
- {$EXTERNALSYM RESTOREPOINTINFO}
- PRESTOREPOINTINFO = PRESTOREPOINTINFOA;
- {$EXTERNALSYM PRESTOREPOINTINFO}
- TRestorePointInfo = TRestorePointInfoA;
- {$ENDIF UNICODE}
-
-//
-// Status returned by System Restore
-//
-
- _SMGRSTATUS = packed record
- nStatus: DWORD; // Status returned by State Manager Process
- llSequenceNumber: Int64; // Sequence Number for the restore point
- end;
- {$EXTERNALSYM _SMGRSTATUS}
- STATEMGRSTATUS = _SMGRSTATUS;
- {$EXTERNALSYM STATEMGRSTATUS}
- PSTATEMGRSTATUS = ^STATEMGRSTATUS;
- {$EXTERNALSYM PSTATEMGRSTATUS}
- TSMgrStatus = STATEMGRSTATUS;
-
-//#pragma pack(pop, srrestoreptapi_include)
-
-//
-// RPC call to set a restore point
-//
-// Return value TRUE if the call was a success
-// FALSE if the call failed
-//
-// If pSmgrStatus nStatus field is set as follows
-//
-// ERROR_SUCCESS If the call succeeded (return value will be TRUE)
-//
-// ERROR_TIMEOUT If the call timed out due to a wait on a mutex for
-// for setting restore points.
-//
-// ERROR_INVALID_DATA If the cancel restore point is called with an invalid
-// sequence number
-//
-// ERROR_INTERNAL_ERROR If there are internal failures.
-//
-// ERROR_BAD_ENVIRONMENT If the API is called in SafeMode
-//
-// ERROR_SERVICE_DISABLED If SystemRestore is Disabled.
-//
-// ERROR_DISK_FULL If System Restore is frozen (Windows Whistler only)
-//
-// ERROR_ALREADY_EXISTS If this is a nested restore point
-
-function SRSetRestorePointA(pRestorePtSpec: PRESTOREPOINTINFOA; pSMgrStatus: PSTATEMGRSTATUS): BOOL stdcall;
-{$EXTERNALSYM SRSetRestorePointA}
-function SRSetRestorePointW(pRestorePtSpec: PRESTOREPOINTINFOW; pSMgrStatus: PSTATEMGRSTATUS): BOOL stdcall;
-{$EXTERNALSYM SRSetRestorePointW}
-function SRRemoveRestorePoint(dwRPNum: DWORD): DWORD; stdcall;
-{$EXTERNALSYM SRRemoveRestorePoint}
-function SRSetRestorePoint(pRestorePtSpec: PRESTOREPOINTINFO; pSMgrStatus: PSTATEMGRSTATUS): BOOL stdcall;
-{$EXTERNALSYM SRSetRestorePoint}
-
-implementation
-
-const
- srclient = 'srclient.dll';
- {$IFDEF UNICODE}
- AWSuffix = 'W';
- {$ELSE}
- AWSuffix = 'A';
- {$ENDIF UNICODE}
-
-{$IFDEF DYNAMIC_LINK}
-
-var
- _SRSetRestorePointA: Pointer;
-
-function SRSetRestorePointA;
-begin
- GetProcedureAddress(_SRSetRestorePointA, srclient, 'SRSetRestorePointA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SRSetRestorePointA]
- end;
-end;
-
-var
- _SRSetRestorePointW: Pointer;
-
-function SRSetRestorePointW;
-begin
- GetProcedureAddress(_SRSetRestorePointW, srclient, 'SRSetRestorePointW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SRSetRestorePointW]
- end;
-end;
-
-var
- _SRSetRestorePoint: Pointer;
-
-function SRSetRestorePoint;
-begin
- GetProcedureAddress(_SRSetRestorePoint, srclient, 'SRSetRestorePoint' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SRSetRestorePoint]
- end;
-end;
-
-var
- _SRRemoveRestorePoint: Pointer;
-
-function SRRemoveRestorePoint;
-begin
- GetProcedureAddress(_SRRemoveRestorePoint, srclient, 'SRRemoveRestorePoint');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SRRemoveRestorePoint]
- end;
-end;
-
-{$ELSE}
-
-function SRSetRestorePointA; external srclient name 'SRSetRestorePointA';
-function SRSetRestorePointW; external srclient name 'SRSetRestorePointW';
-function SRSetRestorePoint; external srclient name 'SRSetRestorePointW' + AWSuffix;
-function SRRemoveRestorePoint; external srclient name 'SRRemoveRestorePoint';
-
-{$ENDIF DYNAMIC_LINK}
-
-end.
-
+{******************************************************************************}
+{ }
+{ Windows System Restore API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: srrestoreptapi.h, released Match 2003. The original }
+{ Pascal code is: SrRestorePtApi.pas, released December 2000. }
+{ The initial developer of the Pascal code is Marcel van Brakel }
+{ (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwasrrestoreptapi.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaSrRestorePtApi;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "SrRestorePtApi.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaWinNT, JwaWinType;
+
+//
+// Type of Event
+//
+
+const
+ MIN_EVENT = 100;
+ {$EXTERNALSYM MIN_EVENT}
+ BEGIN_SYSTEM_CHANGE = 100;
+ {$EXTERNALSYM BEGIN_SYSTEM_CHANGE}
+ END_SYSTEM_CHANGE = 101;
+ {$EXTERNALSYM END_SYSTEM_CHANGE}
+ BEGIN_NESTED_SYSTEM_CHANGE = 102; // for Whistler only - use this to prevent nested restore pts
+ {$EXTERNALSYM BEGIN_NESTED_SYSTEM_CHANGE}
+ END_NESTED_SYSTEM_CHANGE = 103; // for Whistler only - use this to prevent nested restore pts
+ {$EXTERNALSYM END_NESTED_SYSTEM_CHANGE}
+ MAX_EVENT = 103;
+ {$EXTERNALSYM MAX_EVENT}
+
+//
+// Type of Restore Points
+//
+
+ MIN_RPT = 0;
+ {$EXTERNALSYM MIN_RPT}
+ APPLICATION_INSTALL = 0;
+ {$EXTERNALSYM APPLICATION_INSTALL}
+ APPLICATION_UNINSTALL = 1;
+ {$EXTERNALSYM APPLICATION_UNINSTALL}
+ DESKTOP_SETTING = 2; // Not implemented
+ {$EXTERNALSYM DESKTOP_SETTING}
+ ACCESSIBILITY_SETTING = 3; // Not implemented
+ {$EXTERNALSYM ACCESSIBILITY_SETTING}
+ OE_SETTING = 4; // Not implemented
+ {$EXTERNALSYM OE_SETTING}
+ APPLICATION_RUN = 5; // Not implemented
+ {$EXTERNALSYM APPLICATION_RUN}
+ RESTORE = 6;
+ {$EXTERNALSYM RESTORE}
+ CHECKPOINT = 7;
+ {$EXTERNALSYM CHECKPOINT}
+ WINDOWS_SHUTDOWN = 8; // Not implemented
+ {$EXTERNALSYM WINDOWS_SHUTDOWN}
+ WINDOWS_BOOT = 9; // Not implemented
+ {$EXTERNALSYM WINDOWS_BOOT}
+ DEVICE_DRIVER_INSTALL = 10;
+ {$EXTERNALSYM DEVICE_DRIVER_INSTALL}
+ FIRSTRUN = 11;
+ {$EXTERNALSYM FIRSTRUN}
+ MODIFY_SETTINGS = 12;
+ {$EXTERNALSYM MODIFY_SETTINGS}
+ CANCELLED_OPERATION = 13; // Only valid for END_SYSTEM_CHANGE
+ {$EXTERNALSYM CANCELLED_OPERATION}
+ BACKUP_RECOVERY = 14;
+ {$EXTERNALSYM BACKUP_RECOVERY}
+ MAX_RPT = 14;
+ {$EXTERNALSYM MAX_RPT}
+
+ MAX_DESC = 64;
+ {$EXTERNALSYM MAX_DESC}
+ MAX_DESC_W = 256; // longer for Whistler
+ {$EXTERNALSYM MAX_DESC_W}
+
+//
+// for Millennium compatibility
+//
+
+//#pragma pack(push, srrestoreptapi_include)
+//#pragma pack(1)
+
+//
+// Restore point information
+//
+
+type
+ _RESTOREPTINFOA = packed record
+ dwEventType: DWORD; // Type of Event - Begin or End
+ dwRestorePtType: DWORD; // Type of Restore Point - App install/uninstall
+ llSequenceNumber: Int64; // Sequence Number - 0 for begin
+ szDescription: array [0..MAX_DESC - 1] of Char; // Description - Name of Application / Operation
+ end;
+ {$EXTERNALSYM _RESTOREPTINFOA}
+ RESTOREPOINTINFOA = _RESTOREPTINFOA;
+ {$EXTERNALSYM RESTOREPOINTINFOA}
+ PRESTOREPOINTINFOA = ^RESTOREPOINTINFOA;
+ {$EXTERNALSYM PRESTOREPOINTINFOA}
+ TRestorePointInfoA = RESTOREPOINTINFOA;
+
+ _RESTOREPTINFOW = packed record
+ dwEventType: DWORD; // Type of Event - Begin or End
+ dwRestorePtType: DWORD; // Type of Restore Point - App install/uninstall
+ llSequenceNumber: Int64; // Sequence Number - 0 for begin
+ szDescription: array [0..MAX_DESC_W - 1] of WideChar; // Description - Name of Application / Operation
+ end;
+ {$EXTERNALSYM _RESTOREPTINFOW}
+ RESTOREPOINTINFOW = _RESTOREPTINFOW;
+ {$EXTERNALSYM RESTOREPOINTINFOW}
+ PRESTOREPOINTINFOW = ^RESTOREPOINTINFOW;
+ {$EXTERNALSYM PRESTOREPOINTINFOW}
+ TRestorePointInfoW = RESTOREPOINTINFOW;
+ {$IFDEF UNICODE}
+ RESTOREPOINTINFO = RESTOREPOINTINFOW;
+ {$EXTERNALSYM RESTOREPOINTINFO}
+ PRESTOREPOINTINFO = PRESTOREPOINTINFOW;
+ {$EXTERNALSYM PRESTOREPOINTINFO}
+ TRestorePointInfo = TRestorePointInfoW;
+ {$ELSE}
+ RESTOREPOINTINFO = RESTOREPOINTINFOA;
+ {$EXTERNALSYM RESTOREPOINTINFO}
+ PRESTOREPOINTINFO = PRESTOREPOINTINFOA;
+ {$EXTERNALSYM PRESTOREPOINTINFO}
+ TRestorePointInfo = TRestorePointInfoA;
+ {$ENDIF UNICODE}
+
+//
+// Status returned by System Restore
+//
+
+ _SMGRSTATUS = packed record
+ nStatus: DWORD; // Status returned by State Manager Process
+ llSequenceNumber: Int64; // Sequence Number for the restore point
+ end;
+ {$EXTERNALSYM _SMGRSTATUS}
+ STATEMGRSTATUS = _SMGRSTATUS;
+ {$EXTERNALSYM STATEMGRSTATUS}
+ PSTATEMGRSTATUS = ^STATEMGRSTATUS;
+ {$EXTERNALSYM PSTATEMGRSTATUS}
+ TSMgrStatus = STATEMGRSTATUS;
+
+//#pragma pack(pop, srrestoreptapi_include)
+
+//
+// RPC call to set a restore point
+//
+// Return value TRUE if the call was a success
+// FALSE if the call failed
+//
+// If pSmgrStatus nStatus field is set as follows
+//
+// ERROR_SUCCESS If the call succeeded (return value will be TRUE)
+//
+// ERROR_TIMEOUT If the call timed out due to a wait on a mutex for
+// for setting restore points.
+//
+// ERROR_INVALID_DATA If the cancel restore point is called with an invalid
+// sequence number
+//
+// ERROR_INTERNAL_ERROR If there are internal failures.
+//
+// ERROR_BAD_ENVIRONMENT If the API is called in SafeMode
+//
+// ERROR_SERVICE_DISABLED If SystemRestore is Disabled.
+//
+// ERROR_DISK_FULL If System Restore is frozen (Windows Whistler only)
+//
+// ERROR_ALREADY_EXISTS If this is a nested restore point
+
+function SRSetRestorePointA(pRestorePtSpec: PRESTOREPOINTINFOA; pSMgrStatus: PSTATEMGRSTATUS): BOOL stdcall;
+{$EXTERNALSYM SRSetRestorePointA}
+function SRSetRestorePointW(pRestorePtSpec: PRESTOREPOINTINFOW; pSMgrStatus: PSTATEMGRSTATUS): BOOL stdcall;
+{$EXTERNALSYM SRSetRestorePointW}
+function SRRemoveRestorePoint(dwRPNum: DWORD): DWORD; stdcall;
+{$EXTERNALSYM SRRemoveRestorePoint}
+function SRSetRestorePoint(pRestorePtSpec: PRESTOREPOINTINFO; pSMgrStatus: PSTATEMGRSTATUS): BOOL stdcall;
+{$EXTERNALSYM SRSetRestorePoint}
+
+implementation
+
+const
+ srclient = 'srclient.dll';
+ {$IFDEF UNICODE}
+ AWSuffix = 'W';
+ {$ELSE}
+ AWSuffix = 'A';
+ {$ENDIF UNICODE}
+
+{$IFDEF DYNAMIC_LINK}
+
+var
+ _SRSetRestorePointA: Pointer;
+
+function SRSetRestorePointA;
+begin
+ GetProcedureAddress(_SRSetRestorePointA, srclient, 'SRSetRestorePointA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SRSetRestorePointA]
+ end;
+end;
+
+var
+ _SRSetRestorePointW: Pointer;
+
+function SRSetRestorePointW;
+begin
+ GetProcedureAddress(_SRSetRestorePointW, srclient, 'SRSetRestorePointW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SRSetRestorePointW]
+ end;
+end;
+
+var
+ _SRSetRestorePoint: Pointer;
+
+function SRSetRestorePoint;
+begin
+ GetProcedureAddress(_SRSetRestorePoint, srclient, 'SRSetRestorePoint' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SRSetRestorePoint]
+ end;
+end;
+
+var
+ _SRRemoveRestorePoint: Pointer;
+
+function SRRemoveRestorePoint;
+begin
+ GetProcedureAddress(_SRRemoveRestorePoint, srclient, 'SRRemoveRestorePoint');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SRRemoveRestorePoint]
+ end;
+end;
+
+{$ELSE}
+
+function SRSetRestorePointA; external srclient name 'SRSetRestorePointA';
+function SRSetRestorePointW; external srclient name 'SRSetRestorePointW';
+function SRSetRestorePoint; external srclient name 'SRSetRestorePointW' + AWSuffix;
+function SRRemoveRestorePoint; external srclient name 'SRRemoveRestorePoint';
+
+{$ENDIF DYNAMIC_LINK}
+
+end.
+
diff --git a/packages/extra/winunits/jwasspi.pas b/packages/extra/winunits/jwasspi.pas
index 953cedbf43..f7949cdf8d 100644
--- a/packages/extra/winunits/jwasspi.pas
+++ b/packages/extra/winunits/jwasspi.pas
@@ -1,3247 +1,3247 @@
-{******************************************************************************}
-{ }
-{ Security Service Provider API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: sspi.h, released June 2000. The original Pascal }
-{ code is: Sspi.pas, released December 2000. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwasspi.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaSspi;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "sspi.h"'}
-{$HPPEMIT ''}
-{$HPPEMIT '#typedef SEC_CHAR *PSEC_CHAR'}
-{$HPPEMIT '#typedef SEC_WCHAR *PSEC_WCHAR'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaWinType;
-
-//
-// Determine environment:
-//
-
-const
- ISSP_LEVEL = 32;
- {$EXTERNALSYM ISSP_LEVEL}
- ISSP_MODE = 1;
- {$EXTERNALSYM ISSP_MODE}
-
-//
-// Now, define platform specific mappings:
-//
-
-//
-// For NT-2 and up, wtypes will define HRESULT to be long.
-//
-
-type
- SEC_WCHAR = WCHAR;
- {$EXTERNALSYM SEC_WCHAR}
- PSEC_WCHAR = ^SEC_CHAR;
- {$NODEFINE PSEC_WCHAR}
- PSecWChar = ^TSecWChar;
- TSecWChar = SEC_WCHAR;
-
- SEC_CHAR = CHAR;
- {$EXTERNALSYM SEC_CHAR}
- PSEC_CHAR = ^SEC_CHAR;
- {$NODEFINE PSEC_CHAR}
- PSecChar = ^TSecChar;
- TSecChar = SEC_CHAR;
-
- SECURITY_STATUS = LONG;
- {$EXTERNALSYM SECURITY_STATUS}
- PSecurityStatus = ^TSecurityStatus;
- TSecurityStatus = SECURITY_STATUS;
-
-//
-// Decide what a string - 32 bits only since for 16 bits it is clear.
-//
-
- {$IFDEF UNICODE}
- SECURITY_PSTR = ^SEC_WCHAR;
- {$EXTERNALSYM SECURITY_PSTR}
- SECURITY_PCSTR = ^SEC_WCHAR;
- {$EXTERNALSYM SECURITY_PCSTR}
- {$ELSE}
- SECURITY_PSTR = ^SEC_CHAR;
- {$EXTERNALSYM SECURITY_PSTR}
- SECURITY_PCSTR = ^SEC_CHAR;
- {$EXTERNALSYM SECURITY_PCSTR}
- {$ENDIF UNICODE}
-
-//
-// Okay, security specific types:
-//
-
- PSecHandle = ^SecHandle;
- {$EXTERNALSYM PSecHandle}
- _SecHandle = record
- dwLower: ULONG_PTR;
- dwUpper: ULONG_PTR;
- end;
- {$EXTERNALSYM _SecHandle}
- SecHandle = _SecHandle;
- {$EXTERNALSYM SecHandle}
- TSecHandle = SecHandle;
-
-procedure SecInvalidateHandle(var x: SecHandle);
-{$EXTERNALSYM SecInvalidateHandle}
-
-function SecIsValidHandle(x: SecHandle): Boolean;
-{$EXTERNALSYM SecIsValidHandle}
-
-type
- CredHandle = SecHandle;
- {$EXTERNALSYM CredHandle}
- PCredHandle = ^CredHandle;
- {$EXTERNALSYM PCredHandle}
- TCredHandle = CredHandle;
-
- CtxtHandle = SecHandle;
- {$EXTERNALSYM CtxtHandle}
- PCtxtHandle = ^CtxtHandle;
- {$EXTERNALSYM PCtxthandle}
- TCtxthandle = CtxtHandle;
-
- _SECURITY_INTEGER = LARGE_INTEGER;
- {$EXTERNALSYM _SECURITY_INTEGER}
- SECURITY_INTEGER = _SECURITY_INTEGER;
- {$EXTERNALSYM SECURITY_INTEGER}
- PSECURITY_INTEGER = ^SECURITY_INTEGER;
- {$EXTERNALSYM PSECURITY_INTEGER}
-
-// todo Timestamp was removed from SSPI in August 2001 PSDK, where is it now?!
-
- TimeStamp = SECURITY_INTEGER;
- {$EXTERNALSYM TimeStamp}
- PTimeStamp = ^SECURITY_INTEGER;
- {$EXTERNALSYM PTimeStamp}
- TTimeStamp = TimeStamp;
-
-//
-// If we are in 32 bit mode, define the SECURITY_STRING structure,
-// as a clone of the base UNICODE_STRING structure. This is used
-// internally in security components, an as the string interface
-// for kernel components (e.g. FSPs)
-//
-
- SECURITY_STRING = UNICODE_STRING;
- {$EXTERNALSYM SECURITY_STRING}
- PSECURITY_STRING = ^SECURITY_STRING;
- {$EXTERNALSYM PSECURITY_STRING}
- TSecurityString = SECURITY_STRING;
- PSecurityString = PSECURITY_STRING;
-
-//
-// SecPkgInfo structure
-//
-// Provides general information about a security provider
-//
-
- PSecPkgInfoW = ^SecPkgInfoW;
- {$EXTERNALSYM PSecPkgInfoW}
- _SecPkgInfoW = record
- fCapabilities: Cardinal; // Capability bitmask
- wVersion: Word; // Version of driver
- wRPCID: Word; // ID for RPC Runtime
- cbMaxToken: Cardinal; // Size of authentication token (max)
- Name: PSecWChar; // Text name
- Comment: PSecWChar; // Comment
- end;
- {$EXTERNALSYM _SecPkgInfoW}
- SecPkgInfoW = _SecPkgInfoW;
- {$EXTERNALSYM SecPkgInfoW}
- TSecPkgInfoW = SecPkgInfoW;
-
- PSecPkgInfoA = ^SecPkgInfoA;
- {$EXTERNALSYM PSecPkgInfoA}
- _SecPkgInfoA = record
- fCapabilities: Cardinal; // Capability bitmask
- wVersion: Word; // Version of driver
- wRPCID: Word; // ID for RPC Runtime
- cbMaxToken: Cardinal; // Size of authentication token (max)
- Name: PSecChar; // Text name
- Comment: PSecChar; // Comment
- end;
- {$EXTERNALSYM _SecPkgInfoA}
- SecPkgInfoA = _SecPkgInfoA;
- {$EXTERNALSYM SecPkgInfoA}
- TSecPkgInfoA = SecPkgInfoA;
-
- {$IFDEF UNICODE}
- SecPkgInfo = SecPkgInfoW;
- {$EXTERNALSYM SecPkgInfo}
- PSecPkgInfo = PSecPkgInfoW;
- {$EXTERNALSYM PSecPkgInfo}
- TSecPkgInfo = TSecPkgInfoW;
- {$ELSE}
- SecPkgInfo = SecPkgInfoA;
- {$EXTERNALSYM SecPkgInfo}
- PSecPkgInfo = PSecPkgInfoA;
- {$EXTERNALSYM PSecPkgInfo}
- TSecPkgInfo = TSecPkgInfoA;
- {$ENDIF UNICODE}
-
-//
-// Security Package Capabilities
-//
-
-const
- SECPKG_FLAG_INTEGRITY = $00000001; // Supports integrity on messages
- {$EXTERNALSYM SECPKG_FLAG_INTEGRITY}
- SECPKG_FLAG_PRIVACY = $00000002; // Supports privacy (confidentiality)
- {$EXTERNALSYM SECPKG_FLAG_PRIVACY}
- SECPKG_FLAG_TOKEN_ONLY = $00000004; // Only security token needed
- {$EXTERNALSYM SECPKG_FLAG_TOKEN_ONLY}
- SECPKG_FLAG_DATAGRAM = $00000008; // Datagram RPC support
- {$EXTERNALSYM SECPKG_FLAG_DATAGRAM}
- SECPKG_FLAG_CONNECTION = $00000010; // Connection oriented RPC support
- {$EXTERNALSYM SECPKG_FLAG_CONNECTION}
- SECPKG_FLAG_MULTI_REQUIRED = $00000020; // Full 3-leg required for re-auth.
- {$EXTERNALSYM SECPKG_FLAG_MULTI_REQUIRED}
- SECPKG_FLAG_CLIENT_ONLY = $00000040; // Server side functionality not available
- {$EXTERNALSYM SECPKG_FLAG_CLIENT_ONLY}
- SECPKG_FLAG_EXTENDED_ERROR = $00000080; // Supports extended error msgs
- {$EXTERNALSYM SECPKG_FLAG_EXTENDED_ERROR}
- SECPKG_FLAG_IMPERSONATION = $00000100; // Supports impersonation
- {$EXTERNALSYM SECPKG_FLAG_IMPERSONATION}
- SECPKG_FLAG_ACCEPT_WIN32_NAME = $00000200; // Accepts Win32 names
- {$EXTERNALSYM SECPKG_FLAG_ACCEPT_WIN32_NAME}
- SECPKG_FLAG_STREAM = $00000400; // Supports stream semantics
- {$EXTERNALSYM SECPKG_FLAG_STREAM}
- SECPKG_FLAG_NEGOTIABLE = $00000800; // Can be used by the negotiate package
- {$EXTERNALSYM SECPKG_FLAG_NEGOTIABLE}
- SECPKG_FLAG_GSS_COMPATIBLE = $00001000; // GSS Compatibility Available
- {$EXTERNALSYM SECPKG_FLAG_GSS_COMPATIBLE}
- SECPKG_FLAG_LOGON = $00002000; // Supports common LsaLogonUser
- {$EXTERNALSYM SECPKG_FLAG_LOGON}
- SECPKG_FLAG_ASCII_BUFFERS = $00004000; // Token Buffers are in ASCII
- {$EXTERNALSYM SECPKG_FLAG_ASCII_BUFFERS}
- SECPKG_FLAG_FRAGMENT = $00008000; // Package can fragment to fit
- {$EXTERNALSYM SECPKG_FLAG_FRAGMENT}
- SECPKG_FLAG_MUTUAL_AUTH = $00010000; // Package can perform mutual authentication
- {$EXTERNALSYM SECPKG_FLAG_MUTUAL_AUTH}
- SECPKG_FLAG_DELEGATION = $00020000; // Package can delegate
- {$EXTERNALSYM SECPKG_FLAG_DELEGATION}
-
- SECPKG_ID_NONE = $FFFF;
- {$EXTERNALSYM SECPKG_ID_NONE}
-
-//
-// SecBuffer
-//
-// Generic memory descriptors for buffers passed in to the security
-// API
-//
-
-type
- PSecBuffer = ^SecBuffer;
- {$EXTERNALSYM PSecBuffer}
- _SecBuffer = record
- cbBuffer: Cardinal; // Size of the buffer, in bytes
- BufferType: Cardinal; // Type of the buffer (below)
- pvBuffer: Pointer; // Pointer to the buffer
- end;
- {$EXTERNALSYM _SecBuffer}
- SecBuffer = _SecBuffer;
- {$EXTERNALSYM SecBuffer}
- TSecBuffer = SecBuffer;
-
- PSecBufferDesc = ^SecBufferDesc;
- {$EXTERNALSYM PSecBufferDesc}
- _SecBufferDesc = record
- ulVersion: Cardinal; // Version number
- cBuffers: Cardinal; // Number of buffers
- pBuffers: PSecBuffer; // Pointer to array of buffers
- end;
- {$EXTERNALSYM _SecBufferDesc}
- SecBufferDesc = _SecBufferDesc;
- {$EXTERNALSYM SecBufferDesc}
- TSecBufferDesc = SecBufferDesc;
-
-const
- SECBUFFER_VERSION = 0;
- {$EXTERNALSYM SECBUFFER_VERSION}
-
- SECBUFFER_EMPTY = 0; // Undefined, replaced by provider
- {$EXTERNALSYM SECBUFFER_EMPTY}
- SECBUFFER_DATA = 1; // Packet data
- {$EXTERNALSYM SECBUFFER_DATA}
- SECBUFFER_TOKEN = 2; // Security token
- {$EXTERNALSYM SECBUFFER_TOKEN}
- SECBUFFER_PKG_PARAMS = 3; // Package specific parameters
- {$EXTERNALSYM SECBUFFER_PKG_PARAMS}
- SECBUFFER_MISSING = 4; // Missing Data indicator
- {$EXTERNALSYM SECBUFFER_MISSING}
- SECBUFFER_EXTRA = 5; // Extra data
- {$EXTERNALSYM SECBUFFER_EXTRA}
- SECBUFFER_STREAM_TRAILER = 6; // Security Trailer
- {$EXTERNALSYM SECBUFFER_STREAM_TRAILER}
- SECBUFFER_STREAM_HEADER = 7; // Security Header
- {$EXTERNALSYM SECBUFFER_STREAM_HEADER}
- SECBUFFER_NEGOTIATION_INFO = 8; // Hints from the negotiation pkg
- {$EXTERNALSYM SECBUFFER_NEGOTIATION_INFO}
- SECBUFFER_PADDING = 9; // non-data padding
- {$EXTERNALSYM SECBUFFER_PADDING}
- SECBUFFER_STREAM = 10; // whole encrypted message
- {$EXTERNALSYM SECBUFFER_STREAM}
- SECBUFFER_MECHLIST = 11;
- {$EXTERNALSYM SECBUFFER_MECHLIST}
- SECBUFFER_MECHLIST_SIGNATURE = 12;
- {$EXTERNALSYM SECBUFFER_MECHLIST_SIGNATURE}
- SECBUFFER_TARGET = 13;
- {$EXTERNALSYM SECBUFFER_TARGET}
- SECBUFFER_CHANNEL_BINDINGS = 14;
- {$EXTERNALSYM SECBUFFER_CHANNEL_BINDINGS}
-
- SECBUFFER_ATTRMASK = DWORD($F0000000);
- {$EXTERNALSYM SECBUFFER_ATTRMASK}
- SECBUFFER_READONLY = DWORD($80000000); // Buffer is read-only
- {$EXTERNALSYM SECBUFFER_READONLY}
- SECBUFFER_READONLY_WITH_CHECKSUM = $10000000; // Buffer is read-only, and checksummed
- {$EXTERNALSYM SECBUFFER_READONLY_WITH_CHECKSUM}
- SECBUFFER_RESERVED = DWORD($60000000); // Flags reserved to security system
- {$EXTERNALSYM SECBUFFER_RESERVED}
-
-type
- PSEC_NEGOTIATION_INFO = ^SEC_NEGOTIATION_INFO;
- {$EXTERNALSYM PSEC_NEGOTIATION_INFO}
- _SEC_NEGOTIATION_INFO = record
- Size: Cardinal; // Size of this structure
- NameLength: Cardinal; // Length of name hint
- Name: PSecWChar; // Name hint
- Reserved: Pointer; // Reserved
- end;
- {$EXTERNALSYM _SEC_NEGOTIATION_INFO}
- SEC_NEGOTIATION_INFO = _SEC_NEGOTIATION_INFO;
- {$EXTERNALSYM SEC_NEGOTIATION_INFO}
- TSecNegotiationInfo = SEC_NEGOTIATION_INFO;
- PSecNegotiationInfo = PSEC_NEGOTIATION_INFO;
-
- _SEC_CHANNEL_BINDINGS = record
- dwInitiatorAddrType: Cardinal;
- cbInitiatorLength: Cardinal;
- dwInitiatorOffset: Cardinal;
- dwAcceptorAddrType: Cardinal;
- cbAcceptorLength: Cardinal;
- dwAcceptorOffset: Cardinal;
- cbApplicationDataLength: Cardinal;
- dwApplicationDataOffset: Cardinal;
- end;
- {$EXTERNALSYM _SEC_CHANNEL_BINDINGS}
- SEC_CHANNEL_BINDINGS = _SEC_CHANNEL_BINDINGS;
- {$EXTERNALSYM SEC_CHANNEL_BINDINGS}
- PSEC_CHANNEL_BINDINGS = ^SEC_CHANNEL_BINDINGS;
- {$EXTERNALSYM PSEC_CHANNEL_BINDINGS}
- TSecChannelBindings = SEC_CHANNEL_BINDINGS;
- PSecChannelBindings = PSEC_CHANNEL_BINDINGS;
-
-//
-// Data Representation Constant:
-//
-
-const
- SECURITY_NATIVE_DREP = $00000010;
- {$EXTERNALSYM SECURITY_NATIVE_DREP}
- SECURITY_NETWORK_DREP = $00000000;
- {$EXTERNALSYM SECURITY_NETWORK_DREP}
-
-//
-// Credential Use Flags
-//
-
- SECPKG_CRED_INBOUND = $00000001;
- {$EXTERNALSYM SECPKG_CRED_INBOUND}
- SECPKG_CRED_OUTBOUND = $00000002;
- {$EXTERNALSYM SECPKG_CRED_OUTBOUND}
- SECPKG_CRED_BOTH = $00000003;
- {$EXTERNALSYM SECPKG_CRED_BOTH}
- SECPKG_CRED_DEFAULT = $00000004;
- {$EXTERNALSYM SECPKG_CRED_DEFAULT}
- SECPKG_CRED_RESERVED = DWORD($F0000000);
- {$EXTERNALSYM SECPKG_CRED_RESERVED}
-
-//
-// InitializeSecurityContext Requirement and return flags:
-//
-
- ISC_REQ_DELEGATE = $00000001;
- {$EXTERNALSYM ISC_REQ_DELEGATE}
- ISC_REQ_MUTUAL_AUTH = $00000002;
- {$EXTERNALSYM ISC_REQ_MUTUAL_AUTH}
- ISC_REQ_REPLAY_DETECT = $00000004;
- {$EXTERNALSYM ISC_REQ_REPLAY_DETECT}
- ISC_REQ_SEQUENCE_DETECT = $00000008;
- {$EXTERNALSYM ISC_REQ_SEQUENCE_DETECT}
- ISC_REQ_CONFIDENTIALITY = $00000010;
- {$EXTERNALSYM ISC_REQ_CONFIDENTIALITY}
- ISC_REQ_USE_SESSION_KEY = $00000020;
- {$EXTERNALSYM ISC_REQ_USE_SESSION_KEY}
- ISC_REQ_PROMPT_FOR_CREDS = $00000040;
- {$EXTERNALSYM ISC_REQ_PROMPT_FOR_CREDS}
- ISC_REQ_USE_SUPPLIED_CREDS = $00000080;
- {$EXTERNALSYM ISC_REQ_USE_SUPPLIED_CREDS}
- ISC_REQ_ALLOCATE_MEMORY = $00000100;
- {$EXTERNALSYM ISC_REQ_ALLOCATE_MEMORY}
- ISC_REQ_USE_DCE_STYLE = $00000200;
- {$EXTERNALSYM ISC_REQ_USE_DCE_STYLE}
- ISC_REQ_DATAGRAM = $00000400;
- {$EXTERNALSYM ISC_REQ_DATAGRAM}
- ISC_REQ_CONNECTION = $00000800;
- {$EXTERNALSYM ISC_REQ_CONNECTION}
- ISC_REQ_CALL_LEVEL = $00001000;
- {$EXTERNALSYM ISC_REQ_CALL_LEVEL}
- ISC_REQ_FRAGMENT_SUPPLIED = $00002000;
- {$EXTERNALSYM ISC_REQ_FRAGMENT_SUPPLIED}
- ISC_REQ_EXTENDED_ERROR = $00004000;
- {$EXTERNALSYM ISC_REQ_EXTENDED_ERROR}
- ISC_REQ_STREAM = $00008000;
- {$EXTERNALSYM ISC_REQ_STREAM}
- ISC_REQ_INTEGRITY = $00010000;
- {$EXTERNALSYM ISC_REQ_INTEGRITY}
- ISC_REQ_IDENTIFY = $00020000;
- {$EXTERNALSYM ISC_REQ_IDENTIFY}
- ISC_REQ_NULL_SESSION = $00040000;
- {$EXTERNALSYM ISC_REQ_NULL_SESSION}
- ISC_REQ_MANUAL_CRED_VALIDATION = $00080000;
- {$EXTERNALSYM ISC_REQ_MANUAL_CRED_VALIDATION}
- ISC_REQ_RESERVED1 = $00100000;
- {$EXTERNALSYM ISC_REQ_RESERVED1}
- ISC_REQ_FRAGMENT_TO_FIT = $00200000;
- {$EXTERNALSYM ISC_REQ_FRAGMENT_TO_FIT}
-
- ISC_RET_DELEGATE = $00000001;
- {$EXTERNALSYM ISC_RET_DELEGATE}
- ISC_RET_MUTUAL_AUTH = $00000002;
- {$EXTERNALSYM ISC_RET_MUTUAL_AUTH}
- ISC_RET_REPLAY_DETECT = $00000004;
- {$EXTERNALSYM ISC_RET_REPLAY_DETECT}
- ISC_RET_SEQUENCE_DETECT = $00000008;
- {$EXTERNALSYM ISC_RET_SEQUENCE_DETECT}
- ISC_RET_CONFIDENTIALITY = $00000010;
- {$EXTERNALSYM ISC_RET_CONFIDENTIALITY}
- ISC_RET_USE_SESSION_KEY = $00000020;
- {$EXTERNALSYM ISC_RET_USE_SESSION_KEY}
- ISC_RET_USED_COLLECTED_CREDS = $00000040;
- {$EXTERNALSYM ISC_RET_USED_COLLECTED_CREDS}
- ISC_RET_USED_SUPPLIED_CREDS = $00000080;
- {$EXTERNALSYM ISC_RET_USED_SUPPLIED_CREDS}
- ISC_RET_ALLOCATED_MEMORY = $00000100;
- {$EXTERNALSYM ISC_RET_ALLOCATED_MEMORY}
- ISC_RET_USED_DCE_STYLE = $00000200;
- {$EXTERNALSYM ISC_RET_USED_DCE_STYLE}
- ISC_RET_DATAGRAM = $00000400;
- {$EXTERNALSYM ISC_RET_DATAGRAM}
- ISC_RET_CONNECTION = $00000800;
- {$EXTERNALSYM ISC_RET_CONNECTION}
- ISC_RET_INTERMEDIATE_RETURN = $00001000;
- {$EXTERNALSYM ISC_RET_INTERMEDIATE_RETURN}
- ISC_RET_CALL_LEVEL = $00002000;
- {$EXTERNALSYM ISC_RET_CALL_LEVEL}
- ISC_RET_EXTENDED_ERROR = $00004000;
- {$EXTERNALSYM ISC_RET_EXTENDED_ERROR}
- ISC_RET_STREAM = $00008000;
- {$EXTERNALSYM ISC_RET_STREAM}
- ISC_RET_INTEGRITY = $00010000;
- {$EXTERNALSYM ISC_RET_INTEGRITY}
- ISC_RET_IDENTIFY = $00020000;
- {$EXTERNALSYM ISC_RET_IDENTIFY}
- ISC_RET_NULL_SESSION = $00040000;
- {$EXTERNALSYM ISC_RET_NULL_SESSION}
- ISC_RET_MANUAL_CRED_VALIDATION = $00080000;
- {$EXTERNALSYM ISC_RET_MANUAL_CRED_VALIDATION}
- ISC_RET_RESERVED1 = $00100000;
- {$EXTERNALSYM ISC_RET_RESERVED1}
- ISC_RET_FRAGMENT_ONLY = $00200000;
- {$EXTERNALSYM ISC_RET_FRAGMENT_ONLY}
-
- ASC_REQ_DELEGATE = $00000001;
- {$EXTERNALSYM ASC_REQ_DELEGATE}
- ASC_REQ_MUTUAL_AUTH = $00000002;
- {$EXTERNALSYM ASC_REQ_MUTUAL_AUTH}
- ASC_REQ_REPLAY_DETECT = $00000004;
- {$EXTERNALSYM ASC_REQ_REPLAY_DETECT}
- ASC_REQ_SEQUENCE_DETECT = $00000008;
- {$EXTERNALSYM ASC_REQ_SEQUENCE_DETECT}
- ASC_REQ_CONFIDENTIALITY = $00000010;
- {$EXTERNALSYM ASC_REQ_CONFIDENTIALITY}
- ASC_REQ_USE_SESSION_KEY = $00000020;
- {$EXTERNALSYM ASC_REQ_USE_SESSION_KEY}
- ASC_REQ_ALLOCATE_MEMORY = $00000100;
- {$EXTERNALSYM ASC_REQ_ALLOCATE_MEMORY}
- ASC_REQ_USE_DCE_STYLE = $00000200;
- {$EXTERNALSYM ASC_REQ_USE_DCE_STYLE}
- ASC_REQ_DATAGRAM = $00000400;
- {$EXTERNALSYM ASC_REQ_DATAGRAM}
- ASC_REQ_CONNECTION = $00000800;
- {$EXTERNALSYM ASC_REQ_CONNECTION}
- ASC_REQ_CALL_LEVEL = $00001000;
- {$EXTERNALSYM ASC_REQ_CALL_LEVEL}
- ASC_REQ_EXTENDED_ERROR = $00008000;
- {$EXTERNALSYM ASC_REQ_EXTENDED_ERROR}
- ASC_REQ_STREAM = $00010000;
- {$EXTERNALSYM ASC_REQ_STREAM}
- ASC_REQ_INTEGRITY = $00020000;
- {$EXTERNALSYM ASC_REQ_INTEGRITY}
- ASC_REQ_LICENSING = $00040000;
- {$EXTERNALSYM ASC_REQ_LICENSING}
- ASC_REQ_IDENTIFY = $00080000;
- {$EXTERNALSYM ASC_REQ_IDENTIFY}
- ASC_REQ_ALLOW_NULL_SESSION = $00100000;
- {$EXTERNALSYM ASC_REQ_ALLOW_NULL_SESSION}
- ASC_REQ_ALLOW_NON_USER_LOGONS = $00200000;
- {$EXTERNALSYM ASC_REQ_ALLOW_NON_USER_LOGONS}
- ASC_REQ_ALLOW_CONTEXT_REPLAY = $00400000;
- {$EXTERNALSYM ASC_REQ_ALLOW_CONTEXT_REPLAY}
- ASC_REQ_FRAGMENT_TO_FIT = $00800000;
- {$EXTERNALSYM ASC_REQ_FRAGMENT_TO_FIT}
- ASC_REQ_FRAGMENT_SUPPLIED = $00002000;
- {$EXTERNALSYM ASC_REQ_FRAGMENT_SUPPLIED}
- ASC_REQ_NO_TOKEN = $01000000;
- {$EXTERNALSYM ASC_REQ_NO_TOKEN}
-
- ASC_RET_DELEGATE = $00000001;
- {$EXTERNALSYM ASC_RET_DELEGATE}
- ASC_RET_MUTUAL_AUTH = $00000002;
- {$EXTERNALSYM ASC_RET_MUTUAL_AUTH}
- ASC_RET_REPLAY_DETECT = $00000004;
- {$EXTERNALSYM ASC_RET_REPLAY_DETECT}
- ASC_RET_SEQUENCE_DETECT = $00000008;
- {$EXTERNALSYM ASC_RET_SEQUENCE_DETECT}
- ASC_RET_CONFIDENTIALITY = $00000010;
- {$EXTERNALSYM ASC_RET_CONFIDENTIALITY}
- ASC_RET_USE_SESSION_KEY = $00000020;
- {$EXTERNALSYM ASC_RET_USE_SESSION_KEY}
- ASC_RET_ALLOCATED_MEMORY = $00000100;
- {$EXTERNALSYM ASC_RET_ALLOCATED_MEMORY}
- ASC_RET_USED_DCE_STYLE = $00000200;
- {$EXTERNALSYM ASC_RET_USED_DCE_STYLE}
- ASC_RET_DATAGRAM = $00000400;
- {$EXTERNALSYM ASC_RET_DATAGRAM}
- ASC_RET_CONNECTION = $00000800;
- {$EXTERNALSYM ASC_RET_CONNECTION}
- ASC_RET_CALL_LEVEL = $00002000; // skipped 1000 to be like ISC_
- {$EXTERNALSYM ASC_RET_CALL_LEVEL}
- ASC_RET_THIRD_LEG_FAILED = $00004000;
- {$EXTERNALSYM ASC_RET_THIRD_LEG_FAILED}
- ASC_RET_EXTENDED_ERROR = $00008000;
- {$EXTERNALSYM ASC_RET_EXTENDED_ERROR}
- ASC_RET_STREAM = $00010000;
- {$EXTERNALSYM ASC_RET_STREAM}
- ASC_RET_INTEGRITY = $00020000;
- {$EXTERNALSYM ASC_RET_INTEGRITY}
- ASC_RET_LICENSING = $00040000;
- {$EXTERNALSYM ASC_RET_LICENSING}
- ASC_RET_IDENTIFY = $00080000;
- {$EXTERNALSYM ASC_RET_IDENTIFY}
- ASC_RET_NULL_SESSION = $00100000;
- {$EXTERNALSYM ASC_RET_NULL_SESSION}
- ASC_RET_ALLOW_NON_USER_LOGONS = $00200000;
- {$EXTERNALSYM ASC_RET_ALLOW_NON_USER_LOGONS}
- ASC_RET_ALLOW_CONTEXT_REPLAY = $00400000;
- {$EXTERNALSYM ASC_RET_ALLOW_CONTEXT_REPLAY}
- ASC_RET_FRAGMENT_ONLY = $00800000;
- {$EXTERNALSYM ASC_RET_FRAGMENT_ONLY}
- ASC_RET_NO_TOKEN = $01000000;
- {$EXTERNALSYM ASC_RET_NO_TOKEN}
-
-//
-// Security Credentials Attributes:
-//
-
- SECPKG_CRED_ATTR_NAMES = 1;
- {$EXTERNALSYM SECPKG_CRED_ATTR_NAMES}
-
-type
- PSecPkgCredentials_NamesW = ^SecPkgCredentials_NamesW;
- {$EXTERNALSYM PSecPkgCredentials_NamesW}
- _SecPkgCredentials_NamesW = record
- sUserName: PSecWChar;
- end;
- {$EXTERNALSYM _SecPkgCredentials_NamesW}
- SecPkgCredentials_NamesW = _SecPkgCredentials_NamesW;
- {$EXTERNALSYM SecPkgCredentials_NamesW}
- TSecPkgCredentialsNamesW = SecPkgCredentials_NamesW;
- PSecPkgCredentialsNamesW = PSecPkgCredentials_NamesW;
-
- PSecPkgCredentials_NamesA = ^SecPkgCredentials_NamesA;
- {$EXTERNALSYM PSecPkgCredentials_NamesA}
- _SecPkgCredentials_NamesA = record
- sUserName: PSecChar;
- end;
- {$EXTERNALSYM _SecPkgCredentials_NamesA}
- SecPkgCredentials_NamesA = _SecPkgCredentials_NamesA;
- {$EXTERNALSYM SecPkgCredentials_NamesA}
- TSecPkgCredentialsNamesA = SecPkgCredentials_NamesA;
- PSecPkgCredentialsNamesA = PSecPkgCredentials_NamesA;
-
- {$IFDEF UNICODE}
- SecPkgCredentials_Names = SecPkgCredentials_NamesW;
- {$EXTERNALSYM SecPkgCredentials_Names}
- PSecPkgCredentials_Names = PSecPkgCredentials_NamesW;
- {$EXTERNALSYM PSecPkgCredentials_Names}
- TSecPkgCredentialsNames = TSecPkgCredentialsNamesW;
- PSecPkgCredentialsNames = PSecPkgCredentialsNamesW;
- {$ELSE}
- SecPkgCredentials_Names = SecPkgCredentials_NamesA;
- {$EXTERNALSYM SecPkgCredentials_Names}
- PSecPkgCredentials_Names = PSecPkgCredentials_NamesA;
- {$EXTERNALSYM PSecPkgCredentials_Names}
- TSecPkgCredentialsNames = TSecPkgCredentialsNamesA;
- PSecPkgCredentialsNames = PSecPkgCredentialsNamesA;
- {$ENDIF UNICODE}
-
-//
-// Security Context Attributes:
-//
-
-const
- SECPKG_ATTR_SIZES = 0;
- {$EXTERNALSYM SECPKG_ATTR_SIZES}
- SECPKG_ATTR_NAMES = 1;
- {$EXTERNALSYM SECPKG_ATTR_NAMES}
- SECPKG_ATTR_LIFESPAN = 2;
- {$EXTERNALSYM SECPKG_ATTR_LIFESPAN}
- SECPKG_ATTR_DCE_INFO = 3;
- {$EXTERNALSYM SECPKG_ATTR_DCE_INFO}
- SECPKG_ATTR_STREAM_SIZES = 4;
- {$EXTERNALSYM SECPKG_ATTR_STREAM_SIZES}
- SECPKG_ATTR_KEY_INFO = 5;
- {$EXTERNALSYM SECPKG_ATTR_KEY_INFO}
- SECPKG_ATTR_AUTHORITY = 6;
- {$EXTERNALSYM SECPKG_ATTR_AUTHORITY}
- SECPKG_ATTR_PROTO_INFO = 7;
- {$EXTERNALSYM SECPKG_ATTR_PROTO_INFO}
- SECPKG_ATTR_PASSWORD_EXPIRY = 8;
- {$EXTERNALSYM SECPKG_ATTR_PASSWORD_EXPIRY}
- SECPKG_ATTR_SESSION_KEY = 9;
- {$EXTERNALSYM SECPKG_ATTR_SESSION_KEY}
- SECPKG_ATTR_PACKAGE_INFO = 10;
- {$EXTERNALSYM SECPKG_ATTR_PACKAGE_INFO}
- SECPKG_ATTR_USER_FLAGS = 11;
- {$EXTERNALSYM SECPKG_ATTR_USER_FLAGS}
- SECPKG_ATTR_NEGOTIATION_INFO = 12;
- {$EXTERNALSYM SECPKG_ATTR_NEGOTIATION_INFO}
- SECPKG_ATTR_NATIVE_NAMES = 13;
- {$EXTERNALSYM SECPKG_ATTR_NATIVE_NAMES}
- SECPKG_ATTR_FLAGS = 14;
- {$EXTERNALSYM SECPKG_ATTR_FLAGS}
- SECPKG_ATTR_USE_VALIDATED = 15;
- {$EXTERNALSYM SECPKG_ATTR_USE_VALIDATED}
- SECPKG_ATTR_CREDENTIAL_NAME = 16;
- {$EXTERNALSYM SECPKG_ATTR_CREDENTIAL_NAME}
- SECPKG_ATTR_TARGET_INFORMATION = 17;
- {$EXTERNALSYM SECPKG_ATTR_TARGET_INFORMATION}
- SECPKG_ATTR_ACCESS_TOKEN = 18;
- {$EXTERNALSYM SECPKG_ATTR_ACCESS_TOKEN}
- SECPKG_ATTR_TARGET = 19;
- {$EXTERNALSYM SECPKG_ATTR_TARGET}
- SECPKG_ATTR_AUTHENTICATION_ID = 20;
- {$EXTERNALSYM SECPKG_ATTR_AUTHENTICATION_ID}
-
-type
- PSecPkgContext_Sizes = ^SecPkgContext_Sizes;
- {$EXTERNALSYM PSecPkgContext_Sizes}
- _SecPkgContext_Sizes = record
- cbMaxToken: Cardinal;
- cbMaxSignature: Cardinal;
- cbBlockSize: Cardinal;
- cbSecurityTrailer: Cardinal;
- end;
- {$EXTERNALSYM _SecPkgContext_Sizes}
- SecPkgContext_Sizes = _SecPkgContext_Sizes;
- {$EXTERNALSYM SecPkgContext_Sizes}
- TSecPkgContextSizes = SecPkgContext_Sizes;
- PSecPkgContextSizes = PSecPkgContext_Sizes;
-
- PSecPkgContext_StreamSizes = ^SecPkgContext_StreamSizes;
- {$EXTERNALSYM PSecPkgContext_StreamSizes}
- _SecPkgContext_StreamSizes = record
- cbHeader: Cardinal;
- cbTrailer: Cardinal;
- cbMaximumMessage: Cardinal;
- cBuffers: Cardinal;
- cbBlockSize: Cardinal;
- end;
- {$EXTERNALSYM _SecPkgContext_StreamSizes}
- SecPkgContext_StreamSizes = _SecPkgContext_StreamSizes;
- {$EXTERNALSYM SecPkgContext_StreamSizes}
- TSecPkgContextStreamSizes = SecPkgContext_StreamSizes;
- PSecPkgContextStreamSizes = PSecPkgContext_StreamSizes;
-
- PSecPkgContext_NamesW = ^SecPkgContext_NamesW;
- {$EXTERNALSYM PSecPkgContext_NamesW}
- _SecPkgContext_NamesW = record
- sUserName: PSecWChar;
- end;
- {$EXTERNALSYM _SecPkgContext_NamesW}
- SecPkgContext_NamesW = _SecPkgContext_NamesW;
- {$EXTERNALSYM SecPkgContext_NamesW}
- TSecPkgContextNamesW = SecPkgContext_NamesW;
- PSecPkgContextNamesW = PSecPkgContext_NamesW;
-
- PSecPkgContext_NamesA = ^SecPkgContext_NamesA;
- {$EXTERNALSYM PSecPkgContext_NamesA}
- _SecPkgContext_NamesA = record
- sUserName: PSecChar;
- end;
- {$EXTERNALSYM _SecPkgContext_NamesA}
- SecPkgContext_NamesA = _SecPkgContext_NamesA;
- {$EXTERNALSYM SecPkgContext_NamesA}
- TSecPkgContextNamesA = SecPkgContext_NamesA;
- PSecPkgContextNamesA = PSecPkgContext_NamesA;
-
- {$IFDEF UNICODE}
- SecPkgContext_Names = SecPkgContext_NamesW;
- {$EXTERNALSYM SecPkgContext_Names}
- PSecPkgContext_Names = PSecPkgContext_NamesW;
- {$EXTERNALSYM PSecPkgContext_Names}
- TSecPkgContextNames = TSecPkgContextNamesW;
- PSecPkgContextNames = PSecPkgContextNamesW;
- {$ELSE}
- SecPkgContext_Names = SecPkgContext_NamesA;
- {$EXTERNALSYM SecPkgContext_Names}
- PSecPkgContext_Names = PSecPkgContext_NamesA;
- {$EXTERNALSYM PSecPkgContext_Names}
- TSecPkgContextNames = TSecPkgContextNamesA;
- PSecPkgContextNames = PSecPkgContextNamesA;
- {$ENDIF UNICODE}
-
- PSecPkgContext_LifeSpan = ^SecPkgContext_LifeSpan;
- {$EXTERNALSYM PSecPkgContext_LifeSpan}
- _SecPkgContext_Lifespan = record
- tsStart: TimeStamp;
- tsExpiry: TimeStamp;
- end;
- {$EXTERNALSYM _SecPkgContext_Lifespan}
- SecPkgContext_Lifespan = _SecPkgContext_Lifespan;
- {$EXTERNALSYM SecPkgContext_Lifespan}
- TSecPkgContextLifeSpan = SecPkgContext_Lifespan;
- PSecPkgContextLifeSpan = PSecPkgContext_LifeSpan;
-
- PSecPkgContext_DceInfo = ^SecPkgContext_DceInfo;
- {$EXTERNALSYM PSecPkgContext_DceInfo}
- _SecPkgContext_DceInfo = record
- AuthzSvc: Cardinal;
- pPac: Pointer;
- end;
- {$EXTERNALSYM _SecPkgContext_DceInfo}
- SecPkgContext_DceInfo = _SecPkgContext_DceInfo;
- {$EXTERNALSYM SecPkgContext_DceInfo}
- TSecPkgContextDceInfo = SecPkgContext_DceInfo;
- PSecPkgContextDceInfo = PSecPkgContext_DceInfo;
-
- PSecPkgContext_KeyInfoA = ^SecPkgContext_KeyInfoA;
- {$EXTERNALSYM PSecPkgContext_KeyInfoA}
- _SecPkgContext_KeyInfoA = record
- sSignatureAlgorithmName: PSecChar;
- sEncryptAlgorithmName: PSecChar;
- KeySize: Cardinal;
- SignatureAlgorithm: Cardinal;
- EncryptAlgorithm: Cardinal;
- end;
- {$EXTERNALSYM _SecPkgContext_KeyInfoA}
- SecPkgContext_KeyInfoA = _SecPkgContext_KeyInfoA;
- {$EXTERNALSYM SecPkgContext_KeyInfoA}
- TSecPkgContextKeyInfoA = SecPkgContext_KeyInfoA;
- PSecPkgContextKeyInfoA = PSecPkgContext_KeyInfoA;
-
- PSecPkgContext_KeyInfoW = ^SecPkgContext_KeyInfoW;
- {$EXTERNALSYM PSecPkgContext_KeyInfoW}
- _SecPkgContext_KeyInfoW = record
- sSignatureAlgorithmName: PSecWChar;
- sEncryptAlgorithmName: PSecWChar;
- KeySize: Cardinal;
- SignatureAlgorithm: Cardinal;
- EncryptAlgorithm: Cardinal;
- end;
- {$EXTERNALSYM _SecPkgContext_KeyInfoW}
- SecPkgContext_KeyInfoW = _SecPkgContext_KeyInfoW;
- {$EXTERNALSYM SecPkgContext_KeyInfoW}
- TSecPkgContextKeyInfoW = SecPkgContext_KeyInfoW;
- PSecPkgContextKeyInfoW = PSecPkgContext_KeyInfoW;
-
- {$IFDEF UNICODE}
- SecPkgContext_KeyInfo = SecPkgContext_KeyInfoW;
- {$EXTERNALSYM SecPkgContext_KeyInfo}
- PSecPkgContext_KeyInfo = PSecPkgContext_KeyInfoW;
- {$EXTERNALSYM PSecPkgContext_KeyInfo}
- TSecPkgContextKeyInfo = TSecPkgContextKeyInfoW;
- PSecPkgContextKeyInfo = PSecPkgContextKeyInfoW;
- {$ELSE}
- SecPkgContext_KeyInfo = SecPkgContext_KeyInfoA;
- {$EXTERNALSYM SecPkgContext_KeyInfo}
- PSecPkgContext_KeyInfo = PSecPkgContext_KeyInfoA;
- {$EXTERNALSYM PSecPkgContext_KeyInfo}
- TSecPkgContextKeyInfo = TSecPkgContextKeyInfoA;
- PSecPkgContextKeyInfo = PSecPkgContextKeyInfoA;
- {$ENDIF UNICODE}
-
- PSecPkgContext_AuthorityA = ^SecPkgContext_AuthorityA;
- {$EXTERNALSYM PSecPkgContext_AuthorityA}
- _SecPkgContext_AuthorityA = record
- sAuthorityName: PSecChar;
- end;
- {$EXTERNALSYM _SecPkgContext_AuthorityA}
- SecPkgContext_AuthorityA = _SecPkgContext_AuthorityA;
- {$EXTERNALSYM SecPkgContext_AuthorityA}
- TSecPkgContextAuthorityA = SecPkgContext_AuthorityA;
- PSecPkgContextAuthorityA = PSecPkgContext_AuthorityA;
-
- PSecPkgContext_AuthorityW = ^SecPkgContext_AuthorityW;
- {$EXTERNALSYM PSecPkgContext_AuthorityW}
- _SecPkgContext_AuthorityW = record
- sAuthorityName: PSecWChar;
- end;
- {$EXTERNALSYM _SecPkgContext_AuthorityW}
- SecPkgContext_AuthorityW = _SecPkgContext_AuthorityW;
- {$EXTERNALSYM SecPkgContext_AuthorityW}
- TSecPkgContextAuthorityW = SecPkgContext_AuthorityW;
- PSecPkgContextAuthorityW = PSecPkgContext_AuthorityW;
-
- {$IFDEF UNICODE}
- SecPkgContext_Authority = SecPkgContext_AuthorityW;
- {$EXTERNALSYM SecPkgContext_Authority}
- PSecPkgContext_Authority = PSecPkgContext_AuthorityW;
- {$EXTERNALSYM PSecPkgContext_Authority}
- TSecPkgContextAuthority = TSecPkgContextAuthorityW;
- PSecPkgContextAuthority = PSecPkgContextAuthorityW;
- {$ELSE}
- SecPkgContext_Authority = SecPkgContext_AuthorityA;
- {$EXTERNALSYM SecPkgContext_Authority}
- PSecPkgContext_Authority = PSecPkgContext_AuthorityA;
- {$EXTERNALSYM PSecPkgContext_Authority}
- TSecPkgContextAuthority = SecPkgContext_AuthorityA;
- PSecPkgContextAuthority = PSecPkgContext_AuthorityA;
- {$ENDIF UNICODE}
-
- PSecPkgContext_ProtoInfoA = ^SecPkgContext_ProtoInfoA;
- {$EXTERNALSYM PSecPkgContext_ProtoInfoA}
- _SecPkgContext_ProtoInfoA = record
- sProtocolName: PSecChar;
- majorVersion: Cardinal;
- minorVersion: Cardinal;
- end;
- {$EXTERNALSYM _SecPkgContext_ProtoInfoA}
- SecPkgContext_ProtoInfoA = _SecPkgContext_ProtoInfoA;
- {$EXTERNALSYM SecPkgContext_ProtoInfoA}
- TSecPkgContextProtoInfoA = SecPkgContext_ProtoInfoA;
- PSecPkgContextProtoInfoA = PSecPkgContext_ProtoInfoA;
-
- PSecPkgContext_ProtoInfoW = ^SecPkgContext_ProtoInfoW;
- {$EXTERNALSYM PSecPkgContext_ProtoInfoW}
- _SecPkgContext_ProtoInfoW = record
- sProtocolName: PSecWChar;
- majorVersion: Cardinal;
- minorVersion: Cardinal;
- end;
- {$EXTERNALSYM _SecPkgContext_ProtoInfoW}
- SecPkgContext_ProtoInfoW = _SecPkgContext_ProtoInfoW;
- {$EXTERNALSYM SecPkgContext_ProtoInfoW}
- TSecPkgContextProtoInfoW = SecPkgContext_ProtoInfoW;
- PSecPkgContextProtoInfoW = PSecPkgContext_ProtoInfoW;
-
- {$IFDEF UNICODE}
- SecPkgContext_ProtoInfo = SecPkgContext_ProtoInfoW;
- {$EXTERNALSYM SecPkgContext_ProtoInfo}
- PSecPkgContext_ProtoInfo = PSecPkgContext_ProtoInfoW;
- {$EXTERNALSYM PSecPkgContext_ProtoInfo}
- TSecPkgContextProtoInfo = TSecPkgContextProtoInfoW;
- PSecPkgContextProtoInfo = PSecPkgContextProtoInfoW;
- {$ELSE}
- SecPkgContext_ProtoInfo = SecPkgContext_ProtoInfoA;
- {$EXTERNALSYM SecPkgContext_ProtoInfo}
- PSecPkgContext_ProtoInfo = PSecPkgContext_ProtoInfoA;
- {$EXTERNALSYM PSecPkgContext_ProtoInfo}
- TSecPkgContextProtoInfo = TSecPkgContextProtoInfoA;
- PSecPkgContextProtoInfo = PSecPkgContextProtoInfoA;
- {$ENDIF UNICODE}
-
- PSecPkgContext_PasswordExpiry = ^SecPkgContext_PasswordExpiry;
- {$EXTERNALSYM PSecPkgContext_PasswordExpiry}
- _SecPkgContext_PasswordExpiry = record
- tsPasswordExpires: TimeStamp;
- end;
- {$EXTERNALSYM _SecPkgContext_PasswordExpiry}
- SecPkgContext_PasswordExpiry = _SecPkgContext_PasswordExpiry;
- {$EXTERNALSYM SecPkgContext_PasswordExpiry}
- TSecPkgContextPasswordExpiry = SecPkgContext_PasswordExpiry;
- PSecPkgContextPasswordExpiry = PSecPkgContext_PasswordExpiry;
-
- PSecPkgContext_SessionKey = ^SecPkgContext_SessionKey;
- {$EXTERNALSYM PSecPkgContext_SessionKey}
- _SecPkgContext_SessionKey = record
- SessionKeyLength: Cardinal;
- SessionKey: PByte;
- end;
- {$EXTERNALSYM _SecPkgContext_SessionKey}
- SecPkgContext_SessionKey = _SecPkgContext_SessionKey;
- {$EXTERNALSYM SecPkgContext_SessionKey}
- TSecPkgContextSessionKey = SecPkgContext_SessionKey;
- PSecPkgContextSessionKey = PSecPkgContext_SessionKey;
-
- PSecPkgContext_PackageInfoW = ^SecPkgContext_PackageInfoW;
- {$EXTERNALSYM PSecPkgContext_PackageInfoW}
- _SecPkgContext_PackageInfoW = record
- PackageInfo: PSecPkgInfoW;
- end;
- {$EXTERNALSYM _SecPkgContext_PackageInfoW}
- SecPkgContext_PackageInfoW = _SecPkgContext_PackageInfoW;
- {$EXTERNALSYM SecPkgContext_PackageInfoW}
- TSecPkgContextPackageInfoW = SecPkgContext_PackageInfoW;
- PSecPkgContextPackageInfoW = PSecPkgContext_PackageInfoW;
-
- PSecPkgContext_PackageInfoA = ^SecPkgContext_PackageInfoA;
- {$EXTERNALSYM PSecPkgContext_PackageInfoA}
- _SecPkgContext_PackageInfoA = record
- PackageInfo: PSecPkgInfoA;
- end;
- {$EXTERNALSYM _SecPkgContext_PackageInfoA}
- SecPkgContext_PackageInfoA = _SecPkgContext_PackageInfoA;
- {$EXTERNALSYM SecPkgContext_PackageInfoA}
- TSecPkgContextPackageInfoA = SecPkgContext_PackageInfoA;
- PSecPkgContextPackageInfoA = PSecPkgContext_PackageInfoA;
-
- PSecPkgContext_UserFlags = ^SecPkgContext_UserFlags;
- {$EXTERNALSYM PSecPkgContext_UserFlags}
- _SecPkgContext_UserFlags = record
- UserFlags: Cardinal;
- end;
- {$EXTERNALSYM _SecPkgContext_UserFlags}
- SecPkgContext_UserFlags = _SecPkgContext_UserFlags;
- {$EXTERNALSYM SecPkgContext_UserFlags}
- TSecPkgContextUserFlags = SecPkgContext_UserFlags;
- PSecPkgContextUserFlags = PSecPkgContext_UserFlags;
-
- PSecPkgContext_Flags = ^SecPkgContext_Flags;
- {$EXTERNALSYM PSecPkgContext_Flags}
- _SecPkgContext_Flags = record
- Flags: Cardinal;
- end;
- {$EXTERNALSYM _SecPkgContext_Flags}
- SecPkgContext_Flags = _SecPkgContext_Flags;
- {$EXTERNALSYM SecPkgContext_Flags}
- TSecPkgContextFlags = SecPkgContext_Flags;
- PSecPkgContextFlags = PSecPkgContext_Flags;
-
- {$IFDEF UNICODE}
- SecPkgContext_PackageInfo = SecPkgContext_PackageInfoW;
- {$EXTERNALSYM SecPkgContext_PackageInfo}
- PSecPkgContext_PackageInfo = PSecPkgContext_PackageInfoW;
- {$EXTERNALSYM PSecPkgContext_PackageInfo}
- TSecPkgContextPackageInfo = TSecPkgContextPackageInfoW;
- PSecPkgContextPackageInfo = PSecPkgContextPackageInfoW;
- {$ELSE}
- SecPkgContext_PackageInfo = SecPkgContext_PackageInfoA;
- {$EXTERNALSYM SecPkgContext_PackageInfo}
- PSecPkgContext_PackageInfo = PSecPkgContext_PackageInfoA;
- {$EXTERNALSYM PSecPkgContext_PackageInfo}
- TSecPkgContextPackageInfo = TSecPkgContextPackageInfoA;
- PSecPkgContextPackageInfo = PSecPkgContextPackageInfoA;
- {$ENDIF UNICODE}
-
- PSecPkgContext_NegotiationInfoA = ^SecPkgContext_NegotiationInfoA;
- {$EXTERNALSYM PSecPkgContext_NegotiationInfoA}
- _SecPkgContext_NegotiationInfoA = record
- PackageInfo: PSecPkgInfoA;
- NegotiationState: Cardinal;
- end;
- {$EXTERNALSYM _SecPkgContext_NegotiationInfoA}
- SecPkgContext_NegotiationInfoA = _SecPkgContext_NegotiationInfoA;
- {$EXTERNALSYM SecPkgContext_NegotiationInfoA}
- TSecPkgContextNegotiationInfoA = SecPkgContext_NegotiationInfoA;
- PSecPkgContextNegotiationInfoA = PSecPkgContext_NegotiationInfoA;
-
- PSecPkgContext_NegotiationInfoW = ^SecPkgContext_NegotiationInfoW;
- {$EXTERNALSYM PSecPkgContext_NegotiationInfoW}
- _SecPkgContext_NegotiationInfoW = record
- PackageInfo: PSecPkgInfoW;
- NegotiationState: Cardinal;
- end;
- {$EXTERNALSYM _SecPkgContext_NegotiationInfoW}
- SecPkgContext_NegotiationInfoW = _SecPkgContext_NegotiationInfoW;
- {$EXTERNALSYM SecPkgContext_NegotiationInfoW}
- TSecPkgContextNegotiationInfoW = SecPkgContext_NegotiationInfoW;
- PSecPkgContextNegotiationInfoW = PSecPkgContext_NegotiationInfoW ;
-
- {$IFDEF UNICODE}
- SecPkgContext_NegotiationInfo = SecPkgContext_NegotiationInfoW;
- {$EXTERNALSYM SecPkgContext_NegotiationInfo}
- PSecPkgContext_NegotiationInfo = PSecPkgContext_NegotiationInfoW;
- {$EXTERNALSYM PSecPkgContext_NegotiationInfo}
- TSecPkgContextNegotiationInfo = TSecPkgContextNegotiationInfoW;
- PSecPkgContextNegotiationInfo = PSecPkgContextNegotiationInfoW;
- {$ELSE}
- SecPkgContext_NegotiationInfo = SecPkgContext_NegotiationInfoA;
- {$EXTERNALSYM SecPkgContext_NegotiationInfo}
- PSecPkgContext_NegotiationInfo = PSecPkgContext_NegotiationInfoA;
- {$EXTERNALSYM PSecPkgContext_NegotiationInfo}
- TSecPkgContextNegotiationInfo = TSecPkgContextNegotiationInfoA;
- PSecPkgContextNegotiationInfo = PSecPkgContextNegotiationInfoA;
- {$ENDIF UNICODE}
-
-const
- SECPKG_NEGOTIATION_COMPLETE = 0;
- {$EXTERNALSYM SECPKG_NEGOTIATION_COMPLETE}
- SECPKG_NEGOTIATION_OPTIMISTIC = 1;
- {$EXTERNALSYM SECPKG_NEGOTIATION_OPTIMISTIC}
- SECPKG_NEGOTIATION_IN_PROGRESS = 2;
- {$EXTERNALSYM SECPKG_NEGOTIATION_IN_PROGRESS}
- SECPKG_NEGOTIATION_DIRECT = 3;
- {$EXTERNALSYM SECPKG_NEGOTIATION_DIRECT}
- SECPKG_NEGOTIATION_TRY_MULTICRED = 4;
- {$EXTERNALSYM SECPKG_NEGOTIATION_TRY_MULTICRED}
-
-type
- PSecPkgContext_NativeNamesW = ^SecPkgContext_NativeNamesW;
- {$EXTERNALSYM PSecPkgContext_NativeNamesW}
- _SecPkgContext_NativeNamesW = record
- sClientName: PSecWChar;
- sServerName: PSecWChar;
- end;
- {$EXTERNALSYM _SecPkgContext_NativeNamesW}
- SecPkgContext_NativeNamesW = _SecPkgContext_NativeNamesW;
- {$EXTERNALSYM SecPkgContext_NativeNamesW}
- TSecPkgContextNativeNamesW = SecPkgContext_NativeNamesW;
- PSecPkgContextNativeNamesW = PSecPkgContext_NativeNamesW;
-
- PSecPkgContext_NativeNamesA = ^SecPkgContext_NativeNamesA;
- {$EXTERNALSYM PSecPkgContext_NativeNamesA}
- _SecPkgContext_NativeNamesA = record
- sClientName: PSecChar;
- sServerName: PSecChar;
- end;
- {$EXTERNALSYM _SecPkgContext_NativeNamesA}
- SecPkgContext_NativeNamesA = _SecPkgContext_NativeNamesA;
- {$EXTERNALSYM SecPkgContext_NativeNamesA}
- TSecPkgContextNativeNamesA = SecPkgContext_NativeNamesA;
- PSecPkgContextNativeNamesA = PSecPkgContext_NativeNamesA;
-
- {$IFDEF UNICODE}
- SecPkgContext_NativeNames = SecPkgContext_NativeNamesW;
- {$EXTERNALSYM SecPkgContext_NativeNames}
- PSecPkgContext_NativeNames = PSecPkgContext_NativeNamesW;
- {$EXTERNALSYM PSecPkgContext_NativeNames}
- TSecPkgContextNativeNames = TSecPkgContextNativeNamesW;
- PSecPkgContextNativeNames = PSecPkgContextNativeNamesW;
- {$ELSE}
- SecPkgContext_NativeNames = SecPkgContext_NativeNamesA;
- {$EXTERNALSYM SecPkgContext_NativeNames}
- PSecPkgContext_NativeNames = PSecPkgContext_NativeNamesA;
- {$EXTERNALSYM PSecPkgContext_NativeNames}
- TSecPkgContextNativeNames = TSecPkgContextNativeNamesA;
- PSecPkgContextNativeNames = PSecPkgContextNativeNamesA;
- {$ENDIF UNICODE}
-
- _SecPkgContext_CredentialNameW = record
- CredentialType: Cardinal;
- sCredentialName: PSEC_WCHAR;
- end;
- {$EXTERNALSYM _SecPkgContext_CredentialNameW}
- SecPkgContext_CredentialNameW = _SecPkgContext_CredentialNameW;
- {$EXTERNALSYM SecPkgContext_CredentialNameW}
- PSecPkgContext_CredentialNameW = ^SecPkgContext_CredentialNameW;
- {$EXTERNALSYM PSecPkgContext_CredentialNameW}
- TSecPkgContextCredentialNameW = SecPkgContext_CredentialNameW;
- PSecPkgContextCredentialNameW = PSecPkgContext_CredentialNameW;
-
- _SecPkgContext_CredentialNameA = record
- CredentialType: Cardinal;
- sCredentialName: PSEC_CHAR;
- end;
- {$EXTERNALSYM _SecPkgContext_CredentialNameA}
- SecPkgContext_CredentialNameA = _SecPkgContext_CredentialNameA;
- {$EXTERNALSYM SecPkgContext_CredentialNameA}
- PSecPkgContext_CredentialNameA = ^SecPkgContext_CredentialNameA;
- {$EXTERNALSYM PSecPkgContext_CredentialNameA}
- TSecPkgContextCredentialNameA = SecPkgContext_CredentialNameA;
- PSecPkgContextCredentialNameA = PSecPkgContext_CredentialNameA;
-
- {$IFDEF UNICODE}
- SecPkgContext_CredentialName = SecPkgContext_CredentialNameW;
- {$EXTERNALSYM SecPkgContext_CredentialName}
- PSecPkgContext_CredentialName = PSecPkgContext_CredentialNameW;
- {$EXTERNALSYM PSecPkgContext_CredentialName}
- TSecPkgContextCredentialName = TSecPkgContextCredentialNameW;
- PSecPkgContextCredentialName = PSecPkgContextCredentialNameW;
- {$ELSE}
- SecPkgContext_CredentialName = SecPkgContext_CredentialNameA;
- {$EXTERNALSYM SecPkgContext_CredentialName}
- PSecPkgContext_CredentialName = PSecPkgContext_CredentialNameA;
- {$EXTERNALSYM PSecPkgContext_CredentialName}
- TSecPkgContextCredentialName = TSecPkgContextCredentialNameA;
- PSecPkgContextCredentialName = PSecPkgContextCredentialNameA;
- {$ENDIF UNICODE}
-
- _SecPkgContext_AccessToken = record
- AccessToken: Pointer;
- end;
- {$EXTERNALSYM _SecPkgContext_AccessToken}
- SecPkgContext_AccessToken = _SecPkgContext_AccessToken;
- {$EXTERNALSYM SecPkgContext_AccessToken}
- PSecPkgContext_AccessToken = ^SecPkgContext_AccessToken;
- {$EXTERNALSYM PSecPkgContext_AccessToken}
- TSecPkgContextAccessToken = SecPkgContext_AccessToken;
- PSecPkgContextAccessToken = PSecPkgContext_AccessToken;
-
- _SecPkgContext_TargetInformation = record
- MarshalledTargetInfoLength: Cardinal;
- MarshalledTargetInfo: PWideChar;
- end;
- {$EXTERNALSYM _SecPkgContext_TargetInformation}
- SecPkgContext_TargetInformation = _SecPkgContext_TargetInformation;
- {$EXTERNALSYM SecPkgContext_TargetInformation}
- PSecPkgContext_TargetInformation = ^SecPkgContext_TargetInformation;
- {$EXTERNALSYM PSecPkgContext_TargetInformation}
- TSecPkgContextTargetInformation = SecPkgContext_TargetInformation;
- PSecPkgContextTargetInformation = PSecPkgContext_TargetInformation;
-
- _SecPkgContext_AuthzID = record
- AuthzIDLength: Cardinal;
- AuthzID: PChar;
- end;
- {$EXTERNALSYM _SecPkgContext_AuthzID}
- SecPkgContext_AuthzID = _SecPkgContext_AuthzID;
- {$EXTERNALSYM SecPkgContext_AuthzID}
- PSecPkgContext_AuthzID = ^SecPkgContext_AuthzID;
- {$EXTERNALSYM PSecPkgContext_AuthzID}
- TSecPkgContextAuthzID = SecPkgContext_AuthzID;
- PSecPkgContextAuthzID = PSecPkgContext_AuthzID;
-
- _SecPkgContext_Target = record
- TargetLength: Cardinal;
- Target: PChar;
- end;
- {$EXTERNALSYM _SecPkgContext_Target}
- SecPkgContext_Target = _SecPkgContext_Target;
- {$EXTERNALSYM SecPkgContext_Target}
- PSecPkgContext_Target = ^SecPkgContext_Target;
- {$EXTERNALSYM PSecPkgContext_Target}
- TSecPkgContextTarget = SecPkgContext_Target;
- PSecPkgContextTarget = PSecPkgContext_Target;
-
- SEC_GET_KEY_FN = procedure(
- Arg: Pointer; // Argument passed in
- Principal: Pointer; // Principal ID
- KeyVer: Cardinal; // Key Version
- var Key: Pointer; // Returned ptr to key
- var Status: SECURITY_STATUS); stdcall; // returned status
- {$EXTERNALSYM SEC_GET_KEY_FN}
- TSecGetKeyFn = SEC_GET_KEY_FN;
-
-//
-// Flags for ExportSecurityContext
-//
-
-const
- SECPKG_CONTEXT_EXPORT_RESET_NEW = $00000001; // New context is reset to initial state
- {$EXTERNALSYM SECPKG_CONTEXT_EXPORT_RESET_NEW}
- SECPKG_CONTEXT_EXPORT_DELETE_OLD = $00000002; // Old context is deleted during export
- {$EXTERNALSYM SECPKG_CONTEXT_EXPORT_DELETE_OLD}
-
-function AcquireCredentialsHandleW(pszPrincipal, pszPackage: PSecWChar;
- fCredentialUse: Cardinal; pvLogonId, pAuthData: Pointer;
- pGetKeyFn: SEC_GET_KEY_FN; pvGetKeyArgument: Pointer; phCredential: PCredHandle;
- var ptsExpiry: TTimeStamp): SECURITY_STATUS; stdcall;
-{$EXTERNALSYM AcquireCredentialsHandleW}
-
-type
- ACQUIRE_CREDENTIALS_HANDLE_FN_W = function(
- pszPrincipal: PSecWChar;
- pszPackage: PSecWChar;
- fCredentialsUse: Cardinal;
- pvLogonId: Pointer;
- pAuthData: Pointer;
- pGetKeyFn: SEC_GET_KEY_FN;
- pvGetKeyArgument: Pointer;
- phCredential: PCredHandle;
- ptsExpiry: PTimeStamp): SECURITY_STATUS; stdcall;
- {$EXTERNALSYM ACQUIRE_CREDENTIALS_HANDLE_FN_W}
- TAcquireCredentialsHandleFnW = ACQUIRE_CREDENTIALS_HANDLE_FN_W;
-
-function AcquireCredentialsHandleA(pszPrincipal, pszPackage: PSecChar;
- fCredentialUse: Cardinal; pvLogonId, pAuthData: Pointer;
- pGetKeyFn: SEC_GET_KEY_FN; pvGetKeyArgument: Pointer; phCredential: PCredHandle;
- var ptsExpiry: TTimeStamp): SECURITY_STATUS; stdcall;
-{$EXTERNALSYM AcquireCredentialsHandleA}
-
-type
- ACQUIRE_CREDENTIALS_HANDLE_FN_A = function(
- pszPrincipal: PSecChar;
- pszPackage: PSecChar;
- fCredentialsUse: Cardinal;
- pvLogonId: Pointer;
- pAuthData: Pointer;
- pGetKeyFn: SEC_GET_KEY_FN;
- pvGetKeyArgument: Pointer;
- phCredential: PCredHandle;
- ptsExpiry: PTimeStamp): SECURITY_STATUS; stdcall;
- {$EXTERNALSYM ACQUIRE_CREDENTIALS_HANDLE_FN_A}
- TAcquireCredentialsHandleFnA = ACQUIRE_CREDENTIALS_HANDLE_FN_A;
-
-{$IFDEF UNICODE}
-function AcquireCredentialsHandle(pszPrincipal, pszPackage: PSecWChar;
- fCredentialUse: Cardinal; pvLogonId, pAuthData: Pointer;
- pGetKeyFn: SEC_GET_KEY_FN; pvGetKeyArgument: Pointer; phCredential: PCredHandle;
- var ptsExpiry: TTimeStamp): SECURITY_STATUS; stdcall;
-{$EXTERNALSYM AcquireCredentialsHandle}
-type
- ACQUIRE_CREDENTIALS_HANDLE_FN = ACQUIRE_CREDENTIALS_HANDLE_FN_W;
- {$EXTERNALSYM ACQUIRE_CREDENTIALS_HANDLE_FN}
- TAcquireCredentialsHandleFn = TAcquireCredentialsHandleFnW;
-{$ELSE}
-function AcquireCredentialsHandle(pszPrincipal, pszPackage: PSecChar;
- fCredentialUse: Cardinal; pvLogonId, pAuthData: Pointer;
- pGetKeyFn: SEC_GET_KEY_FN; pvGetKeyArgument: Pointer; phCredential: PCredHandle;
- var ptsExpiry: TTimeStamp): SECURITY_STATUS; stdcall;
-{$EXTERNALSYM AcquireCredentialsHandle}
-type
- ACQUIRE_CREDENTIALS_HANDLE_FN = ACQUIRE_CREDENTIALS_HANDLE_FN_A;
- {$EXTERNALSYM ACQUIRE_CREDENTIALS_HANDLE_FN}
- TAcquireCredentialsHandleFn = TAcquireCredentialsHandleFnA;
-{$ENDIF UNICODE}
-
-function FreeCredentialsHandle(phCredential: PCredHandle): SECURITY_STATUS; stdcall;
-{$EXTERNALSYM FreeCredentialsHandle}
-
-type
- FREE_CREDENTIALS_HANDLE_FN = function(phCredential: PCredHandle): SECURITY_STATUS; stdcall;
- {$EXTERNALSYM FREE_CREDENTIALS_HANDLE_FN}
-
-function AddCredentialsW(hCredentials: PCredHandle; pszPrincipal: PSecWChar;
- pszPackage: PSecWChar; fCredentialUse: Cardinal; pAuthData: Pointer;
- pGetKeyFn: SEC_GET_KEY_FN; pvGetKeyArgument: Pointer;
- ptsExpiry: PTimeStamp): SECURITY_STATUS; stdcall;
-{$EXTERNALSYM AddCredentialsW}
-
-type
- ADD_CREDENTIALS_FN_W = function(hCredentials: PCredHandle; pszPrincipal: PSecWChar;
- pszPackage: PSecWChar; fCredentialUse: Cardinal; pAuthData: Pointer;
- pGetKeyFn: SEC_GET_KEY_FN; pvGetKeyArgument: Pointer;
- ptsExpiry: PTimeStamp): SECURITY_STATUS; stdcall;
- {$EXTERNALSYM ADD_CREDENTIALS_FN_W}
-
-function AddCredentialsA(hCredentials: PCredHandle; pszPrincipal: PSecChar;
- pszPackage: PSecChar; fCredentialUse: Cardinal; pAuthData: Pointer;
- pGetKeyFn: SEC_GET_KEY_FN; pvGetKeyArgument: Pointer; ptsExpiry: PTimeStamp): SECURITY_STATUS; stdcall;
-{$EXTERNALSYM AddCredentialsA}
-
-type
- ADD_CREDENTIALS_FN_A = function(hCredentials: PCredHandle; pszPrincipal: PSecChar;
- pszPackage: PSecChar; fCredentialUse: Cardinal; pAuthData: Pointer;
- pGetKeyFn: SEC_GET_KEY_FN; pvGetKeyArgument: Pointer; ptsExpiry: PTimeStamp): SECURITY_STATUS; stdcall;
- {$EXTERNALSYM ADD_CREDENTIALS_FN_A}
-
-{$IFDEF UNICODE}
-function AddCredentials(hCredentials: PCredHandle; pszPrincipal: PSecWChar;
- pszPackage: PSecWChar; fCredentialUse: Cardinal; pAuthData: Pointer;
- pGetKeyFn: SEC_GET_KEY_FN; pvGetKeyArgument: Pointer;
- ptsExpiry: PTimeStamp): SECURITY_STATUS; stdcall;
-{$EXTERNALSYM AddCredentials}
-
-type
- ADD_CREDENTIALS_FN = function(hCredentials: PCredHandle; pszPrincipal: PSecWChar;
- pszPackage: PSecWChar; fCredentialUse: Cardinal; pAuthData: Pointer;
- pGetKeyFn: SEC_GET_KEY_FN; pvGetKeyArgument: Pointer;
- ptsExpiry: PTimeStamp): SECURITY_STATUS; stdcall;
- {$EXTERNALSYM ADD_CREDENTIALS_FN}
-{$ELSE}
-function AddCredentials(hCredentials: PCredHandle; pszPrincipal: PSecChar;
- pszPackage: PSecChar; fCredentialUse: Cardinal; pAuthData: Pointer;
- pGetKeyFn: SEC_GET_KEY_FN; pvGetKeyArgument: Pointer; ptsExpiry: PTimeStamp): SECURITY_STATUS; stdcall;
-{$EXTERNALSYM AddCredentials}
-
-type
- ADD_CREDENTIALS_FN = function(hCredentials: PCredHandle; pszPrincipal: PSecChar;
- pszPackage: PSecChar; fCredentialUse: Cardinal; pAuthData: Pointer;
- pGetKeyFn: SEC_GET_KEY_FN; pvGetKeyArgument: Pointer; ptsExpiry: PTimeStamp): SECURITY_STATUS; stdcall;
- {$EXTERNALSYM ADD_CREDENTIALS_FN}
-{$ENDIF UNICODE}
-
-////////////////////////////////////////////////////////////////////////
-///
-/// Context Management Functions
-///
-////////////////////////////////////////////////////////////////////////
-
-function InitializeSecurityContextW(phCredential: PCredHandle; phContext: PCtxtHandle;
- pszTargetName: PSecWChar; fContextReq, Reserved1, TargetDataRep: Cardinal;
- pInput: PSecBufferDesc; Reserved2: Cardinal; phNewContext: PCtxtHandle;
- pOutput: PSecBufferDesc; var pfContextAttr: Cardinal; ptsExpiry: PTimeStamp): SECURITY_STATUS; stdcall;
-{$EXTERNALSYM InitializeSecurityContextW}
-
-type
- INITIALIZE_SECURITY_CONTEXT_FN_W = function(phCredential: PCredHandle; phContext: PCtxtHandle;
- pszTargetName: PSecWChar; fContextReq, Reserved1, TargetDataRep: Cardinal;
- pInput: PSecBufferDesc; Reserved2: Cardinal; phNewContext: PCtxtHandle;
- pOutput: PSecBufferDesc; var pfContextAttr: Cardinal; ptsExpiry: PTimeStamp): SECURITY_STATUS; stdcall;
- {$EXTERNALSYM INITIALIZE_SECURITY_CONTEXT_FN_W}
-
-function InitializeSecurityContextA(phCredential: PCredHandle; phContext: PCtxtHandle;
- pszTargetName: PSecChar; fContextReq, Reserved1, TargetDataRep: Cardinal;
- pInput: PSecBufferDesc; Reserved2: Cardinal; phNewContext: PCtxtHandle;
- pOutput: PSecBufferDesc; var pfContextAttr: Cardinal; ptsExpiry: PTimeStamp): SECURITY_STATUS; stdcall;
-{$EXTERNALSYM InitializeSecurityContextA}
-
-type
- INITIALIZE_SECURITY_CONTEXT_FN_A = function(phCredential: PCredHandle; phContext: PCtxtHandle;
- pszTargetName: PSecChar; fContextReq, Reserved1, TargetDataRep: Cardinal;
- pInput: PSecBufferDesc; Reserved2: Cardinal; phNewContext: PCtxtHandle;
- pOutput: PSecBufferDesc; var pfContextAttr: Cardinal; ptsExpiry: PTimeStamp): SECURITY_STATUS; stdcall;
- {$EXTERNALSYM INITIALIZE_SECURITY_CONTEXT_FN_A}
-
-{$IFDEF UNICODE}
-function InitializeSecurityContext(phCredential: PCredHandle; phContext: PCtxtHandle;
- pszTargetName: PSecWChar; fContextReq, Reserved1, TargetDataRep: Cardinal;
- pInput: PSecBufferDesc; Reserved2: Cardinal; phNewContext: PCtxtHandle;
- pOutput: PSecBufferDesc; var pfContextAttr: Cardinal; ptsExpiry: PTimeStamp): SECURITY_STATUS; stdcall;
-{$EXTERNALSYM InitializeSecurityContext}
-
-type
- INITIALIZE_SECURITY_CONTEXT_FN = function(phCredential: PCredHandle; phContext: PCtxtHandle;
- pszTargetName: PSecWChar; fContextReq, Reserved1, TargetDataRep: Cardinal;
- pInput: PSecBufferDesc; Reserved2: Cardinal; phNewContext: PCtxtHandle;
- pOutput: PSecBufferDesc; var pfContextAttr: Cardinal; ptsExpiry: PTimeStamp): SECURITY_STATUS; stdcall;
- {$EXTERNALSYM INITIALIZE_SECURITY_CONTEXT_FN}
-{$ELSE}
-function InitializeSecurityContext(phCredential: PCredHandle; phContext: PCtxtHandle;
- pszTargetName: PSecChar; fContextReq, Reserved1, TargetDataRep: Cardinal;
- pInput: PSecBufferDesc; Reserved2: Cardinal; phNewContext: PCtxtHandle;
- pOutput: PSecBufferDesc; var pfContextAttr: Cardinal; ptsExpiry: PTimeStamp): SECURITY_STATUS; stdcall;
-{$EXTERNALSYM InitializeSecurityContext}
-
-type
- INITIALIZE_SECURITY_CONTEXT_FN = function(phCredential: PCredHandle; phContext: PCtxtHandle;
- pszTargetName: PSecChar; fContextReq, Reserved1, TargetDataRep: Cardinal;
- pInput: PSecBufferDesc; Reserved2: Cardinal; phNewContext: PCtxtHandle;
- pOutput: PSecBufferDesc; var pfContextAttr: Cardinal; ptsExpiry: PTimeStamp): SECURITY_STATUS; stdcall;
- {$EXTERNALSYM INITIALIZE_SECURITY_CONTEXT_FN}
-{$ENDIF UNICODE}
-
-function AcceptSecurityContext(phCredential: PCredHandle; phContext: PCtxtHandle;
- pInput: PSecBufferDesc; fContextReq, TargetDataRep: Cardinal;
- phNewContext: PCtxtHandle; pOutput: PSecBufferDesc; var pfContextAttr: Cardinal;
- ptsExpiry: PTimeStamp): SECURITY_STATUS; stdcall;
-{$EXTERNALSYM AcceptSecurityContext}
-
-type
- ACCEPT_SECURITY_CONTEXT_FN = function(phCredential: PCredHandle; phContext: PCtxtHandle;
- pInput: PSecBufferDesc; fContextReq, TargetDataRep: Cardinal;
- phNewContext: PCtxtHandle; pOutput: PSecBufferDesc; var pfContextAttr: Cardinal;
- ptsExpiry: PTimeStamp): SECURITY_STATUS; stdcall;
- {$EXTERNALSYM ACCEPT_SECURITY_CONTEXT_FN}
-
-function CompleteAuthToken(phContext: PCtxtHandle; pToken: PSecBufferDesc): SECURITY_STATUS; stdcall;
-{$EXTERNALSYM CompleteAuthToken}
-
-type
- COMPLETE_AUTH_TOKEN_FN = function(phContext: PCtxtHandle; pToken: PSecBufferDesc): SECURITY_STATUS; stdcall;
- {$EXTERNALSYM COMPLETE_AUTH_TOKEN_FN}
-
-function ImpersonateSecurityContext(phContext: PCtxtHandle): SECURITY_STATUS; stdcall;
-{$EXTERNALSYM ImpersonateSecurityContext}
-
-type
- IMPERSONATE_SECURITY_CONTEXT_FN = function(phContext: PCtxtHandle): SECURITY_STATUS; stdcall;
- {$EXTERNALSYM IMPERSONATE_SECURITY_CONTEXT_FN}
-
-function RevertSecurityContext(phContext: PCtxtHandle): SECURITY_STATUS; stdcall;
-{$EXTERNALSYM RevertSecurityContext}
-
-type
- REVERT_SECURITY_CONTEXT_FN = function(phContext: PCtxtHandle): SECURITY_STATUS; stdcall;
- {$EXTERNALSYM REVERT_SECURITY_CONTEXT_FN}
-
-function QuerySecurityContextToken(phContext: PCtxtHandle; var Token: Pointer): SECURITY_STATUS; stdcall;
-{$EXTERNALSYM QuerySecurityContextToken}
-
-type
- QUERY_SECURITY_CONTEXT_TOKEN_FN = function(phContext: PCtxtHandle;
- var Token: Pointer): SECURITY_STATUS; stdcall;
- {$EXTERNALSYM QUERY_SECURITY_CONTEXT_TOKEN_FN}
-
-function DeleteSecurityContext(phContext: PCtxtHandle): SECURITY_STATUS; stdcall;
-{$EXTERNALSYM DeleteSecurityContext}
-
-type
- DELETE_SECURITY_CONTEXT_FN = function(phContext: PCtxtHandle): SECURITY_STATUS; stdcall;
- {$EXTERNALSYM DELETE_SECURITY_CONTEXT_FN}
-
-function ApplyControlToken(phContext: PCtxtHandle; pInput: PSecBufferDesc): SECURITY_STATUS; stdcall;
-{$EXTERNALSYM ApplyControlToken}
-
-type
- APPLY_CONTROL_TOKEN_FN = function(phContext: PCtxtHandle; pInput: PSecBufferDesc): SECURITY_STATUS; stdcall;
- {$EXTERNALSYM APPLY_CONTROL_TOKEN_FN}
-
-function QueryContextAttributesW(phContext: PCtxtHandle; ulAttribute: Cardinal;
- pBuffer: Pointer): SECURITY_STATUS; stdcall;
-{$EXTERNALSYM QueryContextAttributesW}
-
-type
- QUERY_CONTEXT_ATTRIBUTES_FN_W = function(phContext: PCtxtHandle;
- ulAttribute: Cardinal; pBuffer: Pointer): SECURITY_STATUS; stdcall;
- {$EXTERNALSYM QUERY_CONTEXT_ATTRIBUTES_FN_W}
-
-function QueryContextAttributesA(phContext: PCtxtHandle; ulAttribute: Cardinal;
- pBuffer: Pointer): SECURITY_STATUS; stdcall;
-{$EXTERNALSYM QueryContextAttributesA}
-
-type
- QUERY_CONTEXT_ATTRIBUTES_FN_A = function(phContext: PCtxtHandle;
- ulAttribute: Cardinal; pBuffer: Pointer): SECURITY_STATUS; stdcall;
- {$EXTERNALSYM QUERY_CONTEXT_ATTRIBUTES_FN_A}
-
-{$IFDEF UNICODE}
-function QueryContextAttributes(phContext: PCtxtHandle; ulAttribute: Cardinal;
- pBuffer: Pointer): SECURITY_STATUS; stdcall;
-{$EXTERNALSYM QueryContextAttributes}
-
-type
- QUERY_CONTEXT_ATTRIBUTES_FN = function(phContext: PCtxtHandle;
- ulAttribute: Cardinal; pBuffer: Pointer): SECURITY_STATUS; stdcall;
- {$EXTERNALSYM QUERY_CONTEXT_ATTRIBUTES_FN}
-{$ELSE}
-function QueryContextAttributes(phContext: PCtxtHandle; ulAttribute: Cardinal;
- pBuffer: Pointer): SECURITY_STATUS; stdcall;
-{$EXTERNALSYM QueryContextAttributes}
-
-type
- QUERY_CONTEXT_ATTRIBUTES_FN = function(phContext: PCtxtHandle;
- ulAttribute: Cardinal; pBuffer: Pointer): SECURITY_STATUS; stdcall;
- {$EXTERNALSYM QUERY_CONTEXT_ATTRIBUTES_FN}
-{$ENDIF UNICODE}
-
-function SetContextAttributesW(phContext: PCtxtHandle; ulAttribute: Cardinal;
- pBuffer: Pointer; cbBuffer: Cardinal): SECURITY_STATUS; stdcall;
-{$EXTERNALSYM SetContextAttributesW}
-
-type
- SET_CONTEXT_ATTRIBUTES_FN_W = function(phContext: PCtxtHandle; ulAttribute: Cardinal;
- pBuffer: Pointer; cbBuffer: Cardinal): SECURITY_STATUS; stdcall;
- {$EXTERNALSYM SET_CONTEXT_ATTRIBUTES_FN_W}
-
-function SetContextAttributesA(phContext: PCtxtHandle; ulAttribute: Cardinal;
- pBuffer: Pointer; cbBuffer: Cardinal): SECURITY_STATUS; stdcall;
-{$EXTERNALSYM SetContextAttributesA}
-
-type
- SET_CONTEXT_ATTRIBUTES_FN_A = function(phContext: PCtxtHandle; ulAttribute: Cardinal;
- pBuffer: Pointer; cbBuffer: Cardinal): SECURITY_STATUS; stdcall;
- {$EXTERNALSYM SET_CONTEXT_ATTRIBUTES_FN_A}
-
-{$IFDEF UNICODE}
-function SetContextAttributes(phContext: PCtxtHandle; ulAttribute: Cardinal;
- pBuffer: Pointer; cbBuffer: Cardinal): SECURITY_STATUS; stdcall;
-{$EXTERNALSYM SetContextAttributes}
-
-type
- SET_CONTEXT_ATTRIBUTES_FN = SET_CONTEXT_ATTRIBUTES_FN_W;
- {$EXTERNALSYM SET_CONTEXT_ATTRIBUTES_FN}
-{$ELSE}
-function SetContextAttributes(phContext: PCtxtHandle; ulAttribute: Cardinal;
- pBuffer: Pointer; cbBuffer: Cardinal): SECURITY_STATUS; stdcall;
-{$EXTERNALSYM SetContextAttributes}
-
-type
- SET_CONTEXT_ATTRIBUTES_FN = SET_CONTEXT_ATTRIBUTES_FN_A;
- {$EXTERNALSYM SET_CONTEXT_ATTRIBUTES_FN}
-{$ENDIF UNICODE}
-
-function QueryCredentialsAttributesW(phCredential: PCredHandle;
- ulAttribute: Cardinal; pBuffer: Pointer): SECURITY_STATUS; stdcall;
-{$EXTERNALSYM QueryCredentialsAttributesW}
-
-type
- QUERY_CREDENTIALS_ATTRIBUTES_FN_W = function(phCredential: PCredHandle;
- ulAttribute: Cardinal; pBuffer: Pointer): SECURITY_STATUS; stdcall;
- {$EXTERNALSYM QUERY_CREDENTIALS_ATTRIBUTES_FN_W}
-
-function QueryCredentialsAttributesA(phCredential: PCredHandle;
- ulAttribute: Cardinal; pBuffer: Pointer): SECURITY_STATUS; stdcall;
-{$EXTERNALSYM QueryCredentialsAttributesA}
-
-type
- QUERY_CREDENTIALS_ATTRIBUTES_FN_A = function(phCredential: PCredHandle;
- ulAttribute: Cardinal; pBuffer: Pointer): SECURITY_STATUS; stdcall;
- {$EXTERNALSYM QUERY_CREDENTIALS_ATTRIBUTES_FN_A}
-
-{$IFDEF UNICODE}
-function QueryCredentialsAttributes(phCredential: PCredHandle;
- ulAttribute: Cardinal; pBuffer: Pointer): SECURITY_STATUS; stdcall;
-{$EXTERNALSYM QueryCredentialsAttributes}
-
-type
- QUERY_CREDENTIALS_ATTRIBUTES_FN = function(phCredential: PCredHandle;
- ulAttribute: Cardinal; pBuffer: Pointer): SECURITY_STATUS; stdcall;
- {$EXTERNALSYM QUERY_CREDENTIALS_ATTRIBUTES_FN}
-{$ELSE}
-function QueryCredentialsAttributes(phCredential: PCredHandle;
- ulAttribute: Cardinal; pBuffer: Pointer): SECURITY_STATUS; stdcall;
-{$EXTERNALSYM QueryCredentialsAttributes}
-
-type
- QUERY_CREDENTIALS_ATTRIBUTES_FN = function(phCredential: PCredHandle;
- ulAttribute: Cardinal; pBuffer: Pointer): SECURITY_STATUS; stdcall;
- {$EXTERNALSYM QUERY_CREDENTIALS_ATTRIBUTES_FN}
-{$ENDIF UNICODE}
-
-function FreeContextBuffer(pvContextBuffer: Pointer): SECURITY_STATUS; stdcall;
-{$EXTERNALSYM FreeContextBuffer}
-
-type
- FREE_CONTEXT_BUFFER_FN = function(pvContextBuffer: Pointer): SECURITY_STATUS; stdcall;
- {$EXTERNALSYM FREE_CONTEXT_BUFFER_FN}
-
-///////////////////////////////////////////////////////////////////
-////
-//// Message Support API
-////
-//////////////////////////////////////////////////////////////////
-
-function MakeSignature(phContext: PCtxtHandle; fQOP: Cardinal;
- pMessage: PSecBufferDesc; MessageSeqNo: Cardinal): SECURITY_STATUS; stdcall;
-{$EXTERNALSYM MakeSignature}
-
-type
- MAKE_SIGNATURE_FN = function(phContext: PCtxtHandle; fQOP: Cardinal;
- pMessage: PSecBufferDesc; MessageSeqNo: Cardinal): SECURITY_STATUS; stdcall;
- {$EXTERNALSYM MAKE_SIGNATURE_FN}
-
-function VerifySignature(phContext: PCtxtHandle; pMessage: PSecBufferDesc;
- MessageSeqNo: Cardinal; var pfQOP: Cardinal): SECURITY_STATUS; stdcall;
-{$EXTERNALSYM VerifySignature}
-
-type
- VERIFY_SIGNATURE_FN = function(phContext: PCtxtHandle; pMessage: PSecBufferDesc;
- MessageSeqNo: Cardinal; var pfQOP: Cardinal): SECURITY_STATUS; stdcall;
- {$EXTERNALSYM VERIFY_SIGNATURE_FN}
-
-const
- SECQOP_WRAP_NO_ENCRYPT = DWORD($80000001);
- {$EXTERNALSYM SECQOP_WRAP_NO_ENCRYPT}
-
-function EncryptMessage(phContext: PCtxtHandle; fQOP: Cardinal;
- pMessage: PSecBufferDesc; MessageSeqNo: Cardinal): SECURITY_STATUS; stdcall;
-{$EXTERNALSYM EncryptMessage}
-
-type
- ENCRYPT_MESSAGE_FN = function(phContext: PCtxtHandle; fQOP: Cardinal;
- pMessage: PSecBufferDesc; MessageSeqNo: Cardinal): SECURITY_STATUS; stdcall;
- {$EXTERNALSYM ENCRYPT_MESSAGE_FN}
-
-function DecryptMessage(phContext: PCtxtHandle; pMessage: PSecBufferDesc;
- MessageSeqNo: Cardinal; var pfQOP: Cardinal): SECURITY_STATUS; stdcall;
-{$EXTERNALSYM DecryptMessage}
-
-type
- DECRYPT_MESSAGE_FN = function(phContext: PCtxtHandle; pMessage: PSecBufferDesc;
- MessageSeqNo: Cardinal; var pfQOP: Cardinal): SECURITY_STATUS; stdcall;
- {$EXTERNALSYM DECRYPT_MESSAGE_FN}
-
-///////////////////////////////////////////////////////////////////////////
-////
-//// Misc.
-////
-///////////////////////////////////////////////////////////////////////////
-
-function EnumerateSecurityPackagesW(var pcPackages: Cardinal;
- var ppPackageInfo: PSecPkgInfoW): SECURITY_STATUS; stdcall;
-{$EXTERNALSYM EnumerateSecurityPackagesW}
-
-type
- ENUMERATE_SECURITY_PACKAGES_FN_W = function(var pcPackages: Cardinal;
- var ppPackageInfo: PSecPkgInfoW): SECURITY_STATUS; stdcall;
- {$EXTERNALSYM ENUMERATE_SECURITY_PACKAGES_FN_W}
-
-function EnumerateSecurityPackagesA(var pcPackages: Cardinal;
- var ppPackageInfo: PSecPkgInfoA): SECURITY_STATUS; stdcall;
-{$EXTERNALSYM EnumerateSecurityPackagesA}
-
-type
- ENUMERATE_SECURITY_PACKAGES_FN_A = function(var pcPackages: Cardinal;
- var ppPackageInfo: PSecPkgInfoA): SECURITY_STATUS; stdcall;
- {$EXTERNALSYM ENUMERATE_SECURITY_PACKAGES_FN_A}
-
-{$IFDEF UNICODE}
-function EnumerateSecurityPackages(var pcPackages: Cardinal;
- var ppPackageInfo: PSecPkgInfoW): SECURITY_STATUS; stdcall;
-{$EXTERNALSYM EnumerateSecurityPackages}
-
-type
- ENUMERATE_SECURITY_PACKAGES_FN = function(var pcPackages: Cardinal;
- var ppPackageInfo: PSecPkgInfoW): SECURITY_STATUS; stdcall;
- {$EXTERNALSYM ENUMERATE_SECURITY_PACKAGES_FN}
-{$ELSE}
-function EnumerateSecurityPackages(var pcPackages: Cardinal;
- var ppPackageInfo: PSecPkgInfoA): SECURITY_STATUS; stdcall;
-{$EXTERNALSYM EnumerateSecurityPackages}
-
-type
- ENUMERATE_SECURITY_PACKAGES_FN = function(var pcPackages: Cardinal;
- var ppPackageInfo: PSecPkgInfoA): SECURITY_STATUS; stdcall;
- {$EXTERNALSYM ENUMERATE_SECURITY_PACKAGES_FN}
-{$ENDIF UNICODE}
-
-function QuerySecurityPackageInfoW(pszPackageName: PSecWChar;
- var ppPackageInfo: PSecPkgInfoW): SECURITY_STATUS; stdcall;
-{$EXTERNALSYM QuerySecurityPackageInfoW}
-
-type
- QUERY_SECURITY_PACKAGE_INFO_FN_W = function(pszPackageName: PSecWChar;
- var ppPackageInfo: PSecPkgInfoW): SECURITY_STATUS; stdcall;
- {$EXTERNALSYM QUERY_SECURITY_PACKAGE_INFO_FN_W}
-
-function QuerySecurityPackageInfoA(pszPackageName: PSecChar;
- var ppPackageInfo: PSecPkgInfoA): SECURITY_STATUS; stdcall;
-{$EXTERNALSYM QuerySecurityPackageInfoA}
-
-type
- QUERY_SECURITY_PACKAGE_INFO_FN_A = function(pszPackageName: PSecChar;
- var ppPackageInfo: PSecPkgInfoA): SECURITY_STATUS; stdcall;
- {$EXTERNALSYM QUERY_SECURITY_PACKAGE_INFO_FN_A}
-
-{$IFDEF UNICODE}
-function QuerySecurityPackageInfo(pszPackageName: PSecWChar;
- var ppPackageInfo: PSecPkgInfoW): SECURITY_STATUS; stdcall;
-{$EXTERNALSYM QuerySecurityPackageInfo}
-
-type
- QUERY_SECURITY_PACKAGE_INFO_FN = function(pszPackageName: PSecWChar;
- var ppPackageInfo: PSecPkgInfoW): SECURITY_STATUS; stdcall;
- {$EXTERNALSYM QUERY_SECURITY_PACKAGE_INFO_FN}
-{$ELSE}
-function QuerySecurityPackageInfo(pszPackageName: PSecChar;
- var ppPackageInfo: PSecPkgInfoA): SECURITY_STATUS; stdcall;
-{$EXTERNALSYM QuerySecurityPackageInfo}
-
-type
- QUERY_SECURITY_PACKAGE_INFO_FN = function(pszPackageName: PSecChar;
- var ppPackageInfo: PSecPkgInfoA): SECURITY_STATUS; stdcall;
- {$EXTERNALSYM QUERY_SECURITY_PACKAGE_INFO_FN}
-{$ENDIF UNICODE}
-
-type
- _SecDelegationType = (
- SecFull,
- SecService,
- SecTree,
- SecDirectory,
- SecObject);
- {$EXTERNALSYM _SecDelegationType}
- SecDelegationType = _SecDelegationType;
- {$EXTERNALSYM SecDelegationType}
- PSecDelegationType = ^SecDelegationType;
- {$EXTERNALSYM PSecDelegationType}
- TSecDelegationType = SecDelegationType;
-
-//function DelegateSecurityContext(phContext: PCtxtHandle; pszTarget: PSecChar;
-// DelegationType: SecDelegationType; pExpiry: PTimeStamp;
-// pPackageParameters: PSecBuffer; pOutput: PSecBufferDesc): SECURITY_STATUS; stdcall;
-//{$EXTERNALSYM DelegateSecurityContext}
-
-///////////////////////////////////////////////////////////////////////////
-////
-//// Proxies
-////
-///////////////////////////////////////////////////////////////////////////
-
-//
-// Proxies are only available on NT platforms
-//
-
-///////////////////////////////////////////////////////////////////////////
-////
-//// Context export/import
-////
-///////////////////////////////////////////////////////////////////////////
-
-function ExportSecurityContext(phContext: PCtxtHandle; fFlags: ULONG;
- pPackedContext: PSecBuffer; var pToken: Pointer): SECURITY_STATUS; stdcall;
-{$EXTERNALSYM ExportSecurityContext}
-
-type
- EXPORT_SECURITY_CONTEXT_FN = function(phContext: PCtxtHandle; fFlags: ULONG;
- pPackedContext: PSecBuffer; var pToken: Pointer): SECURITY_STATUS; stdcall;
- {$EXTERNALSYM EXPORT_SECURITY_CONTEXT_FN}
-
-function ImportSecurityContextW(pszPackage: PSecWChar; pPackedContext: PSecBuffer;
- Token: Pointer; phContext: PCtxtHandle): SECURITY_STATUS; stdcall;
-{$EXTERNALSYM ImportSecurityContextW}
-
-type
- IMPORT_SECURITY_CONTEXT_FN_W = function(pszPackage: PSecWChar; pPackedContext: PSecBuffer;
- Token: Pointer; phContext: PCtxtHandle): SECURITY_STATUS; stdcall;
- {$EXTERNALSYM IMPORT_SECURITY_CONTEXT_FN_W}
-
-function ImportSecurityContextA(pszPackage: PSecChar; pPackedContext: PSecBuffer;
- Token: Pointer; phContext: PCtxtHandle): SECURITY_STATUS; stdcall;
-{$EXTERNALSYM ImportSecurityContextA}
-
-type
- IMPORT_SECURITY_CONTEXT_FN_A = function(pszPackage: PSecChar; pPackedContext: PSecBuffer;
- Token: Pointer; phContext: PCtxtHandle): SECURITY_STATUS; stdcall;
- {$EXTERNALSYM IMPORT_SECURITY_CONTEXT_FN_A}
-
-{$IFDEF UNICODE}
-function ImportSecurityContext(pszPackage: PSecWChar; pPackedContext: PSecBuffer;
- Token: Pointer; phContext: PCtxtHandle): SECURITY_STATUS; stdcall;
-{$EXTERNALSYM ImportSecurityContext}
-
-type
- IMPORT_SECURITY_CONTEXT_FN = function(pszPackage: PSecWChar; pPackedContext: PSecBuffer;
- Token: Pointer; phContext: PCtxtHandle): SECURITY_STATUS; stdcall;
- {$EXTERNALSYM IMPORT_SECURITY_CONTEXT_FN}
-{$ELSE}
-function ImportSecurityContext(pszPackage: PSecChar; pPackedContext: PSecBuffer;
- Token: Pointer; phContext: PCtxtHandle): SECURITY_STATUS; stdcall;
-{$EXTERNALSYM ImportSecurityContext}
-
-type
- IMPORT_SECURITY_CONTEXT_FN = function(pszPackage: PSecChar; pPackedContext: PSecBuffer;
- Token: Pointer; phContext: PCtxtHandle): SECURITY_STATUS; stdcall;
- {$EXTERNALSYM IMPORT_SECURITY_CONTEXT_FN}
-{$ENDIF UNICODE}
-
-(*
-
-#if ISSP_MODE == 0
-
-NTSTATUS
-NTAPI
-SecMakeSPN(
- IN PUNICODE_STRING ServiceClass,
- IN PUNICODE_STRING ServiceName,
- IN PUNICODE_STRING InstanceName OPTIONAL,
- IN USHORT InstancePort OPTIONAL,
- IN PUNICODE_STRING Referrer OPTIONAL,
- IN OUT PUNICODE_STRING Spn,
- OUT PULONG Length OPTIONAL,
- IN BOOLEAN Allocate
- );
-
-NTSTATUS
-NTAPI
-SecMakeSPNEx(
- IN PUNICODE_STRING ServiceClass,
- IN PUNICODE_STRING ServiceName,
- IN PUNICODE_STRING InstanceName OPTIONAL,
- IN USHORT InstancePort OPTIONAL,
- IN PUNICODE_STRING Referrer OPTIONAL,
- IN PUNICODE_STRING TargetInfo OPTIONAL,
- IN OUT PUNICODE_STRING Spn,
- OUT PULONG Length OPTIONAL,
- IN BOOLEAN Allocate
- );
-
-NTSTATUS
-SEC_ENTRY
-SecLookupAccountSid(
- IN PSID Sid,
- IN OUT PULONG NameSize,
- OUT PUNICODE_STRING NameBuffer,
- IN OUT PULONG DomainSize OPTIONAL,
- OUT PUNICODE_STRING DomainBuffer OPTIONAL,
- OUT PSID_NAME_USE NameUse
- );
-
-NTSTATUS
-SEC_ENTRY
-SecLookupAccountName(
- IN PUNICODE_STRING Name,
- IN OUT PULONG SidSize,
- OUT PSID Sid,
- OUT PSID_NAME_USE NameUse,
- IN OUT PULONG DomainSize OPTIONAL,
- OUT PUNICODE_STRING ReferencedDomain OPTIONAL
- );
-
-NTSTATUS
-SEC_ENTRY
-SecLookupWellKnownSid(
- IN WELL_KNOWN_SID_TYPE SidType,
- OUT PSID Sid,
- ULONG SidBufferSize,
- OUT PULONG SidSize OPTIONAL
- );
-
-#endif
-
-*)
-
-///////////////////////////////////////////////////////////////////////////////
-////
-//// Fast access for RPC:
-////
-///////////////////////////////////////////////////////////////////////////////
-
-const
- SECURITY_ENTRYPOINT_ANSIW = 'InitSecurityInterfaceW';
- {$EXTERNALSYM SECURITY_ENTRYPOINT_ANSIW}
- SECURITY_ENTRYPOINT_ANSIA = 'InitSecurityInterfaceA';
- {$EXTERNALSYM SECURITY_ENTRYPOINT_ANSIA}
- SECURITY_ENTRYPOINTW = 'InitSecurityInterfaceW';
- {$EXTERNALSYM SECURITY_ENTRYPOINTW}
- SECURITY_ENTRYPOINTA = 'InitSecurityInterfaceA';
- {$EXTERNALSYM SECURITY_ENTRYPOINTA}
- SECURITY_ENTRYPOINT16 = 'INITSECURITYINTERFACEA';
- {$EXTERNALSYM SECURITY_ENTRYPOINT16}
-
- {$IFDEF UNICODE}
- SECURITY_ENTRYPOINT = SECURITY_ENTRYPOINTW;
- {$EXTERNALSYM SECURITY_ENTRYPOINT}
- SECURITY_ENTRYPOINT_ANSI = SECURITY_ENTRYPOINT_ANSIW;
- {$EXTERNALSYM SECURITY_ENTRYPOINT_ANSI}
- {$ELSE}
- SECURITY_ENTRYPOINT = SECURITY_ENTRYPOINTA;
- {$EXTERNALSYM SECURITY_ENTRYPOINT}
- SECURITY_ENTRYPOINT_ANSI = SECURITY_ENTRYPOINT_ANSIA;
- {$EXTERNALSYM SECURITY_ENTRYPOINT_ANSI}
- {$ENDIF UNICODE}
-
-function FreeCredentialHandle(phCredential: PCredHandle): SECURITY_STATUS;
-{$EXTERNALSYM FreeCredentialHandle}
-
-type
- PSecurityFunctionTableW = ^SecurityFunctionTableW;
- {$EXTERNALSYM PSecurityFunctionTableW}
- _SECURITY_FUNCTION_TABLE_W = record
- dwVersion: Cardinal;
- EnumerateSecurityPackagesW: ENUMERATE_SECURITY_PACKAGES_FN_W;
- QueryCredentialsAttributesW: QUERY_CREDENTIALS_ATTRIBUTES_FN_W;
- AcquireCredentialsHandleW: ACQUIRE_CREDENTIALS_HANDLE_FN_W;
- FreeCredentialsHandle: FREE_CREDENTIALS_HANDLE_FN;
- Reserved2: Pointer;
- InitializeSecurityContextW: INITIALIZE_SECURITY_CONTEXT_FN_W;
- AcceptSecurityContext: ACCEPT_SECURITY_CONTEXT_FN;
- CompleteAuthToken: COMPLETE_AUTH_TOKEN_FN;
- DeleteSecurityContext: DELETE_SECURITY_CONTEXT_FN;
- ApplyControlToken: APPLY_CONTROL_TOKEN_FN;
- QueryContextAttributesW: QUERY_CONTEXT_ATTRIBUTES_FN_W;
- ImpersonateSecurityContext: IMPERSONATE_SECURITY_CONTEXT_FN;
- RevertSecurityContext: REVERT_SECURITY_CONTEXT_FN;
- MakeSignature: MAKE_SIGNATURE_FN;
- VerifySignature: VERIFY_SIGNATURE_FN;
- FreeContextBuffer: FREE_CONTEXT_BUFFER_FN;
- QuerySecurityPackageInfoW: QUERY_SECURITY_PACKAGE_INFO_FN_W;
- Reserved3: Pointer;
- Reserved4: Pointer;
- ExportSecurityContext: EXPORT_SECURITY_CONTEXT_FN;
- ImportSecurityContextW: IMPORT_SECURITY_CONTEXT_FN_W;
- AddCredentialsW: ADD_CREDENTIALS_FN_W;
- Reserved8: Pointer;
- QuerySecurityContextToken: QUERY_SECURITY_CONTEXT_TOKEN_FN;
- EncryptMessage: ENCRYPT_MESSAGE_FN;
- DecryptMessage: DECRYPT_MESSAGE_FN;
- SetContextAttributesW: SET_CONTEXT_ATTRIBUTES_FN_W;
- end;
- {$EXTERNALSYM _SECURITY_FUNCTION_TABLE_W}
- SecurityFunctionTableW = _SECURITY_FUNCTION_TABLE_W;
- {$EXTERNALSYM SecurityFunctionTableW}
- TSecurityFunctionTableW = SecurityFunctionTableW;
-
- PSecurityFunctionTableA = ^SecurityFunctionTableA;
- {$EXTERNALSYM PSecurityFunctionTableA}
- _SECURITY_FUNCTION_TABLE_A = record
- dwVersion: Cardinal;
- EnumerateSecurityPackagesA: ENUMERATE_SECURITY_PACKAGES_FN_A;
- QueryCredentialsAttributesA: QUERY_CREDENTIALS_ATTRIBUTES_FN_A;
- AcquireCredentialsHandleA: ACQUIRE_CREDENTIALS_HANDLE_FN_A;
- FreeCredentialHandle: FREE_CREDENTIALS_HANDLE_FN;
- Reserved2: Pointer;
- InitializeSecurityContextA: INITIALIZE_SECURITY_CONTEXT_FN_A;
- AcceptSecurityContext: ACCEPT_SECURITY_CONTEXT_FN;
- CompleteAuthToken: COMPLETE_AUTH_TOKEN_FN;
- DeleteSecurityContext: DELETE_SECURITY_CONTEXT_FN;
- ApplyControlToken: APPLY_CONTROL_TOKEN_FN;
- QueryContextAttributesA: QUERY_CONTEXT_ATTRIBUTES_FN_A;
- ImpersonateSecurityContext: IMPERSONATE_SECURITY_CONTEXT_FN;
- RevertSecurityContext: REVERT_SECURITY_CONTEXT_FN;
- MakeSignature: MAKE_SIGNATURE_FN;
- VerifySignature: VERIFY_SIGNATURE_FN;
- FreeContextBuffer: FREE_CONTEXT_BUFFER_FN;
- QuerySecurityPackageInfoA: QUERY_SECURITY_PACKAGE_INFO_FN_A;
- Reserved3: Pointer;
- Reserved4: Pointer;
- ExportSecurityContext: EXPORT_SECURITY_CONTEXT_FN;
- ImportSecurityContextA: IMPORT_SECURITY_CONTEXT_FN_A;
- AddCredentialsA: ADD_CREDENTIALS_FN_A;
- Reserved8: Pointer;
- QuerySecurityContextToken: QUERY_SECURITY_CONTEXT_TOKEN_FN;
- EncryptMessage: ENCRYPT_MESSAGE_FN;
- DecryptMessage: DECRYPT_MESSAGE_FN;
- SetContextAttributesA: SET_CONTEXT_ATTRIBUTES_FN_A;
- end;
- {$EXTERNALSYM _SECURITY_FUNCTION_TABLE_A}
- SecurityFunctionTableA = _SECURITY_FUNCTION_TABLE_A;
- {$EXTERNALSYM SecurityFunctionTableA}
- TSecurityFunctionTableA = SecurityFunctionTableA;
-
- {$IFDEF UNICODE}
- SecurityFunctionTable = SecurityFunctionTableW;
- {$EXTERNALSYM SecurityFunctionTable}
- PSecurityFunctionTable = PSecurityFunctionTableW;
- {$EXTERNALSYM PSecurityFunctionTable}
- TSecurityFunctionTable = TSecurityFunctionTableW;
- {$ELSE}
- SecurityFunctionTable = SecurityFunctionTableA;
- {$EXTERNALSYM SecurityFunctionTable}
- PSecurityFunctionTable = PSecurityFunctionTableA;
- {$EXTERNALSYM PSecurityFunctionTable}
- TSecurityFunctionTable = TSecurityFunctionTableA;
- {$ENDIF UNICODE}
-
-const
- // Function table has all routines through DecryptMessage
- SECURITY_SUPPORT_PROVIDER_INTERFACE_VERSION = 1;
- {$EXTERNALSYM SECURITY_SUPPORT_PROVIDER_INTERFACE_VERSION}
-
- // Function table has all routines through SetContextAttributes
- SECURITY_SUPPORT_PROVIDER_INTERFACE_VERSION_2 = 2;
- {$EXTERNALSYM SECURITY_SUPPORT_PROVIDER_INTERFACE_VERSION_2}
-
-function InitSecurityInterfaceA: PSecurityFunctionTableA; stdcall;
-{$EXTERNALSYM InitSecurityInterfaceA}
-
-type
- INIT_SECURITY_INTERFACE_A = function: PSecurityFunctionTableA; stdcall;
- {$EXTERNALSYM INIT_SECURITY_INTERFACE_A}
-
-function InitSecurityInterfaceW: PSecurityFunctionTableW; stdcall;
-{$EXTERNALSYM InitSecurityInterfaceW}
-
-type
- INIT_SECURITY_INTERFACE_W = function: PSecurityFunctionTableW; stdcall;
- {$EXTERNALSYM INIT_SECURITY_INTERFACE_W}
-
-{$IFDEF UNICODE}
-function InitSecurityInterface: PSecurityFunctionTableW; stdcall;
-{$EXTERNALSYM InitSecurityInterface}
-
-type
- INIT_SECURITY_INTERFACE = function: PSecurityFunctionTableW; stdcall;
- {$EXTERNALSYM INIT_SECURITY_INTERFACE}
-{$ELSE}
-function InitSecurityInterface: PSecurityFunctionTableA; stdcall;
-{$EXTERNALSYM InitSecurityInterface}
-
-type
- INIT_SECURITY_INTERFACE = function: PSecurityFunctionTableA; stdcall;
- {$EXTERNALSYM INIT_SECURITY_INTERFACE}
-{$ENDIF UNICODE}
-
-//
-// SASL Profile Support
-//
-
-function SaslEnumerateProfilesA(var ProfileList: LPSTR;
- var ProfileCount: ULONG): SECURITY_STATUS; stdcall;
-{$EXTERNALSYM SaslEnumerateProfilesA}
-function SaslEnumerateProfilesW(var ProfileList: LPWSTR;
- var ProfileCount: ULONG): SECURITY_STATUS; stdcall;
-{$EXTERNALSYM SaslEnumerateProfilesW}
-
-{$IFDEF UNICODE}
-function SaslEnumerateProfiles(var ProfileList: LPWSTR;
- var ProfileCount: ULONG): SECURITY_STATUS; stdcall;
-{$EXTERNALSYM SaslEnumerateProfiles}
-{$ELSE}
-function SaslEnumerateProfiles(var ProfileList: LPSTR;
- var ProfileCount: ULONG): SECURITY_STATUS; stdcall;
-{$EXTERNALSYM SaslEnumerateProfiles}
-{$ENDIF UNICODE}
-
-function SaslGetProfilePackageA(ProfileName: LPSTR;
- var PackageInfo: PSecPkgInfoA): SECURITY_STATUS; stdcall;
-{$EXTERNALSYM SaslGetProfilePackageA}
-function SaslGetProfilePackageW(ProfileName: LPWSTR;
- var PackageInfo: PSecPkgInfoW): SECURITY_STATUS; stdcall;
-{$EXTERNALSYM SaslGetProfilePackageW}
-
-{$IFDEF UNICODE}
-function SaslGetProfilePackage(ProfileName: LPWSTR;
- var PackageInfo: PSecPkgInfoW): SECURITY_STATUS; stdcall;
-{$EXTERNALSYM SaslGetProfilePackage}
-{$ELSE}
-function SaslGetProfilePackage(ProfileName: LPSTR;
- var PackageInfo: PSecPkgInfoA): SECURITY_STATUS; stdcall;
-{$EXTERNALSYM SaslGetProfilePackage}
-{$ENDIF UNICODE}
-
-function SaslIdentifyPackageA(pInput: PSecBufferDesc;
- var PackageInfo: PSecPkgInfoA): SECURITY_STATUS; stdcall;
-{$EXTERNALSYM SaslIdentifyPackageA}
-function SaslIdentifyPackageW(pInput: PSecBufferDesc;
- var PackageInfo: PSecPkgInfoW): SECURITY_STATUS; stdcall;
-{$EXTERNALSYM SaslIdentifyPackageW}
-
-{$IFDEF UNICODE}
-function SaslIdentifyPackage(pInput: PSecBufferDesc;
- var PackageInfo: PSecPkgInfoW): SECURITY_STATUS; stdcall;
-{$EXTERNALSYM SaslIdentifyPackage}
-{$ELSE}
-function SaslIdentifyPackage(pInput: PSecBufferDesc;
- var PackageInfo: PSecPkgInfoA): SECURITY_STATUS; stdcall;
-{$EXTERNALSYM SaslIdentifyPackage}
-{$ENDIF UNICODE}
-
-function SaslInitializeSecurityContextW(phCredential: PCredHandle;
- phContext: PCtxtHandle; pszTargetName: LPWSTR; fContextReq, Reserved1: Cardinal;
- TargetDataRep: Cardinal; pInput: PSecBufferDesc; Reserved2: Cardinal;
- phNewContext: PCtxtHandle; pOutput: PSecBufferDesc; var pfContextAttr: Cardinal;
- ptsExpiry: PTimeStamp): SECURITY_STATUS; stdcall;
-{$EXTERNALSYM SaslInitializeSecurityContextW}
-function SaslInitializeSecurityContextA(phCredential: PCredHandle;
- phContext: PCtxtHandle; pszTargetName: LPSTR; fContextReq, Reserved1: Cardinal;
- TargetDataRep: Cardinal; pInput: PSecBufferDesc; Reserved2: Cardinal;
- phNewContext: PCtxtHandle; pOutput: PSecBufferDesc; var pfContextAttr: Cardinal;
- ptsExpiry: PTimeStamp): SECURITY_STATUS; stdcall;
-{$EXTERNALSYM SaslInitializeSecurityContextA}
-
-{$IFDEF UNICODE}
-function SaslInitializeSecurityContext(phCredential: PCredHandle;
- phContext: PCtxtHandle; pszTargetName: LPWSTR; fContextReq, Reserved1: Cardinal;
- TargetDataRep: Cardinal; pInput: PSecBufferDesc; Reserved2: Cardinal;
- phNewContext: PCtxtHandle; pOutput: PSecBufferDesc; var pfContextAttr: Cardinal;
- ptsExpiry: PTimeStamp): SECURITY_STATUS; stdcall;
-{$EXTERNALSYM SaslInitializeSecurityContext}
-{$ELSE}
-function SaslInitializeSecurityContext(phCredential: PCredHandle;
- phContext: PCtxtHandle; pszTargetName: LPSTR; fContextReq, Reserved1: Cardinal;
- TargetDataRep: Cardinal; pInput: PSecBufferDesc; Reserved2: Cardinal;
- phNewContext: PCtxtHandle; pOutput: PSecBufferDesc; var pfContextAttr: Cardinal;
- ptsExpiry: PTimeStamp): SECURITY_STATUS; stdcall;
-{$EXTERNALSYM SaslInitializeSecurityContext}
-{$ENDIF UNICODE}
-
-function SaslAcceptSecurityContext(phCredential: PCredHandle;
- phContext: PCtxtHandle; pInput: PSecBufferDesc; fContextReq: Cardinal;
- TargetDataRep: Cardinal; phNewContext: PCtxtHandle; pOutput: PSecBufferDesc;
- var pfContextAttr: Cardinal; ptsExpiry: PTimeStamp): SECURITY_STATUS; stdcall;
-{$EXTERNALSYM SaslAcceptSecurityContext}
-
-const
- SASL_OPTION_SEND_SIZE = 1; // Maximum size to send to peer
- {$EXTERNALSYM SASL_OPTION_SEND_SIZE}
- SASL_OPTION_RECV_SIZE = 2; // Maximum size willing to receive
- {$EXTERNALSYM SASL_OPTION_RECV_SIZE}
- SASL_OPTION_AUTHZ_STRING = 3; // Authorization string
- {$EXTERNALSYM SASL_OPTION_AUTHZ_STRING}
- SASL_OPTION_AUTHZ_PROCESSING = 4; // Authorization string processing
- {$EXTERNALSYM SASL_OPTION_AUTHZ_PROCESSING}
-
-type
- _SASL_AUTHZID_STATE = (
- Sasl_AuthZIDForbidden, // allow no AuthZID strings to be specified - error out (default)
- Sasl_AuthZIDProcessed); // AuthZID Strings processed by Application or SSP
- {$EXTERNALSYM _SASL_AUTHZID_STATE}
- SASL_AUTHZID_STATE = _SASL_AUTHZID_STATE;
- {$EXTERNALSYM SASL_AUTHZID_STATE}
- TSaslAuthzIDState = SASL_AUTHZID_STATE;
-
-function SaslSetContextOption(ContextHandle: PCtxtHandle; Option: ULONG; Value: PVOID; Size: ULONG): SECURITY_STATUS; stdcall;
-{$EXTERNALSYM SaslSetContextOption}
-
-function SaslGetContextOption(ContextHandle: PCtxtHandle; Option: ULONG; Value: PVOID;
- Size: ULONG; Needed: PULONG): SECURITY_STATUS; stdcall;
-{$EXTERNALSYM SaslGetContextOption}
-
-//
-// This is the legacy credentials structure.
-// The EX version below is preferred.
-
-const
- SEC_WINNT_AUTH_IDENTITY_ANSI = $1;
- {$EXTERNALSYM SEC_WINNT_AUTH_IDENTITY_ANSI}
- SEC_WINNT_AUTH_IDENTITY_UNICODE = $2;
- {$EXTERNALSYM SEC_WINNT_AUTH_IDENTITY_UNICODE}
-
-type
- _SEC_WINNT_AUTH_IDENTITY_W = record
- User: PWideChar;
- UserLength: Cardinal;
- Domain: PWideChar;
- DomainLength: Cardinal;
- Password: PWideChar;
- PasswordLength: Cardinal;
- Flags: Cardinal;
- end;
- {$EXTERNALSYM _SEC_WINNT_AUTH_IDENTITY_W}
- SEC_WINNT_AUTH_IDENTITY_W = _SEC_WINNT_AUTH_IDENTITY_W;
- {$EXTERNALSYM SEC_WINNT_AUTH_IDENTITY_W}
- PSEC_WINNT_AUTH_IDENTITY_W = ^SEC_WINNT_AUTH_IDENTITY_W;
- {$EXTERNALSYM PSEC_WINNT_AUTH_IDENTITY_W}
- TSecWinNTAuthIdentityW = SEC_WINNT_AUTH_IDENTITY_W;
- PSecWinNTAuthIdentityW = PSEC_WINNT_AUTH_IDENTITY_W;
-
- _SEC_WINNT_AUTH_IDENTITY_A = record
- User: PChar;
- UserLength: Cardinal;
- Domain: PChar;
- DomainLength: Cardinal;
- Password: PChar;
- PasswordLength: Cardinal;
- Flags: Cardinal;
- end;
- {$EXTERNALSYM _SEC_WINNT_AUTH_IDENTITY_A}
- SEC_WINNT_AUTH_IDENTITY_A = _SEC_WINNT_AUTH_IDENTITY_A;
- {$EXTERNALSYM SEC_WINNT_AUTH_IDENTITY_A}
- PSEC_WINNT_AUTH_IDENTITY_A = ^SEC_WINNT_AUTH_IDENTITY_A;
- {$EXTERNALSYM PSEC_WINNT_AUTH_IDENTITY_A}
- TSecWinNTAuthIdentityA = SEC_WINNT_AUTH_IDENTITY_A;
- PSecWinNTAuthIdentityA = PSEC_WINNT_AUTH_IDENTITY_A;
-
- {$IFDEF UNICODE}
- SEC_WINNT_AUTH_IDENTITY = SEC_WINNT_AUTH_IDENTITY_W;
- {$EXTERNALSYM SEC_WINNT_AUTH_IDENTITY}
- PSEC_WINNT_AUTH_IDENTITY = PSEC_WINNT_AUTH_IDENTITY_W;
- {$EXTERNALSYM PSEC_WINNT_AUTH_IDENTITY}
- _SEC_WINNT_AUTH_IDENTITY = _SEC_WINNT_AUTH_IDENTITY_W;
- {$EXTERNALSYM _SEC_WINNT_AUTH_IDENTITY}
- TSecWinNTAuthIdentity = TSecWinNTAuthIdentityW;
- PSecWinNTAuthIdentity = PSecWinNTAuthIdentityW;
- {$ELSE}
- SEC_WINNT_AUTH_IDENTITY = SEC_WINNT_AUTH_IDENTITY_A;
- {$EXTERNALSYM SEC_WINNT_AUTH_IDENTITY}
- PSEC_WINNT_AUTH_IDENTITY = PSEC_WINNT_AUTH_IDENTITY_A;
- {$EXTERNALSYM PSEC_WINNT_AUTH_IDENTITY}
- _SEC_WINNT_AUTH_IDENTITY = _SEC_WINNT_AUTH_IDENTITY_A;
- {$EXTERNALSYM _SEC_WINNT_AUTH_IDENTITY}
- TSecWinNTAuthIdentity = TSecWinNTAuthIdentityA;
- PSecWinNTAuthIdentity = PSecWinNTAuthIdentityA;
- {$ENDIF UNICODE}
-
-//
-// This is the combined authentication identity structure that may be
-// used with the negotiate package, NTLM, Kerberos, or SCHANNEL
-//
-
-const
- SEC_WINNT_AUTH_IDENTITY_VERSION = $200;
-
-type
- _SEC_WINNT_AUTH_IDENTITY_EXW = record
- Version: Cardinal;
- Length: Cardinal;
- User: PWideChar;
- UserLength: Cardinal;
- Domain: PWideChar;
- DomainLength: Cardinal;
- Password: PWideChar;
- PasswordLength: Cardinal;
- Flags: Cardinal;
- PackageList: PWideChar;
- PackageListLength: Cardinal;
- end;
- {$EXTERNALSYM _SEC_WINNT_AUTH_IDENTITY_EXW}
- SEC_WINNT_AUTH_IDENTITY_EXW = _SEC_WINNT_AUTH_IDENTITY_EXW;
- {$EXTERNALSYM SEC_WINNT_AUTH_IDENTITY_EXW}
- PSEC_WINNT_AUTH_IDENTITY_EXW = ^SEC_WINNT_AUTH_IDENTITY_EXW;
- {$EXTERNALSYM PSEC_WINNT_AUTH_IDENTITY_EXW}
- TSecWinNTAuthIdentityExW = SEC_WINNT_AUTH_IDENTITY_EXW;
- PSecWinNTAuthIdentityExW = PSEC_WINNT_AUTH_IDENTITY_EXW;
-
- _SEC_WINNT_AUTH_IDENTITY_EXA = record
- Version: Cardinal;
- Length: Cardinal;
- User: PChar;
- UserLength: Cardinal;
- Domain: PChar;
- DomainLength: Cardinal;
- Password: PChar;
- PasswordLength: Cardinal;
- Flags: Cardinal;
- PackageList: PChar;
- PackageListLength: Cardinal;
- end;
- {$EXTERNALSYM _SEC_WINNT_AUTH_IDENTITY_EXA}
- SEC_WINNT_AUTH_IDENTITY_EXA = _SEC_WINNT_AUTH_IDENTITY_EXA;
- {$EXTERNALSYM SEC_WINNT_AUTH_IDENTITY_EXA}
- PSEC_WINNT_AUTH_IDENTITY_EXA = ^SEC_WINNT_AUTH_IDENTITY_EXA;
- {$EXTERNALSYM PSEC_WINNT_AUTH_IDENTITY_EXA}
- TSecWinNTAuthIdentityExA = SEC_WINNT_AUTH_IDENTITY_EXA;
- PSecWinNTAuthIdentityExA = PSEC_WINNT_AUTH_IDENTITY_EXA;
-
- {$IFDEF UNICODE}
- SEC_WINNT_AUTH_IDENTITY_EX = SEC_WINNT_AUTH_IDENTITY_EXW;
- {$EXTERNALSYM SEC_WINNT_AUTH_IDENTITY_EX}
- PSEC_WINNT_AUTH_IDENTITY_EX = PSEC_WINNT_AUTH_IDENTITY_EXW;
- {$EXTERNALSYM PSEC_WINNT_AUTH_IDENTITY_EX}
- TSecWinNTAuthIdentityEx = TSecWinNTAuthIdentityExW;
- PSecWinNTAuthIdentityEx = PSecWinNTAuthIdentityExW;
- {$ELSE}
- SEC_WINNT_AUTH_IDENTITY_EX = SEC_WINNT_AUTH_IDENTITY_EXA;
- {$EXTERNALSYM SEC_WINNT_AUTH_IDENTITY_EX}
- PSEC_WINNT_AUTH_IDENTITY_EX = PSEC_WINNT_AUTH_IDENTITY_EXA;
- {$EXTERNALSYM PSEC_WINNT_AUTH_IDENTITY_EX}
- TSecWinNTAuthIdentityEx = TSecWinNTAuthIdentityExA;
- PSecWinNTAuthIdentityEx = PSecWinNTAuthIdentityExA;
- {$ENDIF UNICODE}
-
-//
-// Common types used by negotiable security packages
-//
-
-const
- SEC_WINNT_AUTH_IDENTITY_MARSHALLED = $4; // all data is in one buffer
- {$EXTERNALSYM SEC_WINNT_AUTH_IDENTITY_MARSHALLED}
- SEC_WINNT_AUTH_IDENTITY_ONLY = $8; // these credentials are for identity only - no PAC needed
- {$EXTERNALSYM SEC_WINNT_AUTH_IDENTITY_ONLY}
-
-//
-// Routines for manipulating packages
-//
-
-type
- _SECURITY_PACKAGE_OPTIONS = record
- Size: Cardinal;
- Type_: Cardinal;
- Flags: Cardinal;
- SignatureSize: Cardinal;
- Signature: Pointer;
- end;
- {$EXTERNALSYM _SECURITY_PACKAGE_OPTIONS}
- SECURITY_PACKAGE_OPTIONS = _SECURITY_PACKAGE_OPTIONS;
- {$EXTERNALSYM SECURITY_PACKAGE_OPTIONS}
- PSECURITY_PACKAGE_OPTIONS = ^SECURITY_PACKAGE_OPTIONS;
- TSecurityPackageOptions = SECURITY_PACKAGE_OPTIONS;
- PSecurityPackageOptions = PSECURITY_PACKAGE_OPTIONS;
-
-const
- SECPKG_OPTIONS_TYPE_UNKNOWN = 0;
- {$EXTERNALSYM SECPKG_OPTIONS_TYPE_UNKNOWN}
- SECPKG_OPTIONS_TYPE_LSA = 1;
- {$EXTERNALSYM SECPKG_OPTIONS_TYPE_LSA}
- SECPKG_OPTIONS_TYPE_SSPI = 2;
- {$EXTERNALSYM SECPKG_OPTIONS_TYPE_SSPI}
-
- SECPKG_OPTIONS_PERMANENT = $00000001;
- {$EXTERNALSYM SECPKG_OPTIONS_PERMANENT}
-
-function AddSecurityPackageA(pszPackageName: PSEC_CHAR; Options: PSECURITY_PACKAGE_OPTIONS): SECURITY_STATUS; stdcall;
-{$EXTERNALSYM AddSecurityPackageA}
-
-function AddSecurityPackageW(pszPackageName: PSEC_WCHAR; Options: PSECURITY_PACKAGE_OPTIONS): SECURITY_STATUS; stdcall;
-{$EXTERNALSYM AddSecurityPackageW}
-
-{$IFDEF UNICODE}
-function AddSecurityPackage(pszPackageName: PSEC_WCHAR; Options: PSECURITY_PACKAGE_OPTIONS): SECURITY_STATUS; stdcall;
-{$EXTERNALSYM AddSecurityPackage}
-{$ELSE}
-function AddSecurityPackage(pszPackageName: PSEC_CHAR; Options: PSECURITY_PACKAGE_OPTIONS): SECURITY_STATUS; stdcall;
-{$EXTERNALSYM AddSecurityPackage}
-{$ENDIF UNICODE}
-
-function DeleteSecurityPackageA(pszPackageName: PSEC_CHAR): SECURITY_STATUS; stdcall;
-{$EXTERNALSYM DeleteSecurityPackageA}
-
-function DeleteSecurityPackageW(pszPackageName: PSEC_WCHAR): SECURITY_STATUS; stdcall;
-{$EXTERNALSYM DeleteSecurityPackageW}
-
-{$IFDEF UNICODE}
-function DeleteSecurityPackage(pszPackageName: PSEC_WCHAR): SECURITY_STATUS; stdcall;
-{$EXTERNALSYM DeleteSecurityPackage}
-{$ELSE}
-function DeleteSecurityPackage(pszPackageName: PSEC_CHAR): SECURITY_STATUS; stdcall;
-{$EXTERNALSYM DeleteSecurityPackage}
-{$ENDIF UNICODE}
-
-implementation
-
-const
- secur32 = 'secur32.dll';
- {$IFDEF UNICODE}
- AWSuffix = 'W';
- {$ELSE}
- AWSuffix = 'A';
- {$ENDIF UNICODE}
-
-procedure SecInvalidateHandle(var x: SecHandle);
-begin
- x.dwLower := ULONG_PTR(-1);
- x.dwUpper := ULONG_PTR(-1);
-end;
-
-function SecIsValidHandle(x: SecHandle): Boolean;
-begin
- Result := (x.dwLower <> ULONG_PTR(-1)) and (x.dwUpper <> ULONG_PTR(-1));
-end;
-
-function FreeCredentialHandle(phCredential: PCredHandle): SECURITY_STATUS;
-begin
- Result := FreeCredentialsHandle(phCredential);
-end;
-
-//function SspiLogonUserW; external secur32 name 'SspiLogonUserW';
-//function SspiLogonUserA; external secur32 name 'SspiLogonUserA';
-//{$IFDEF UNICODE}
-//function SspiLogonUser; external secur32 name 'SspiLogonUserW';
-//{$ELSE}
-//function SspiLogonUser; external secur32 name 'SspiLogonUserA';
-//{$ENDIF UNICODE}
-
-//function DelegateSecurityContext; external secur32 name 'DelegateSecurityContext';
-
-{$IFDEF DYNAMIC_LINK}
-
-var
- _AcquireCredentialsHandleW: Pointer;
-
-function AcquireCredentialsHandleW;
-begin
- GetProcedureAddress(_AcquireCredentialsHandleW, secur32, 'AcquireCredentialsHandleW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_AcquireCredentialsHandleW]
- end;
-end;
-
-var
- _AcquireCredentialsHandleA: Pointer;
-
-function AcquireCredentialsHandleA;
-begin
- GetProcedureAddress(_AcquireCredentialsHandleA, secur32, 'AcquireCredentialsHandleA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_AcquireCredentialsHandleA]
- end;
-end;
-
-var
- _AcquireCredentialsHandle: Pointer;
-
-function AcquireCredentialsHandle;
-begin
- GetProcedureAddress(_AcquireCredentialsHandle, secur32, 'AcquireCredentialsHandle' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_AcquireCredentialsHandle]
- end;
-end;
-
-var
- _FreeCredentialsHandle: Pointer;
-
-function FreeCredentialsHandle;
-begin
- GetProcedureAddress(_FreeCredentialsHandle, secur32, 'FreeCredentialsHandle');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_FreeCredentialsHandle]
- end;
-end;
-
-var
- _AddCredentialsW: Pointer;
-
-function AddCredentialsW;
-begin
- GetProcedureAddress(_AddCredentialsW, secur32, 'AddCredentialsW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_AddCredentialsW]
- end;
-end;
-
-var
- _AddCredentialsA: Pointer;
-
-function AddCredentialsA;
-begin
- GetProcedureAddress(_AddCredentialsA, secur32, 'AddCredentialsA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_AddCredentialsA]
- end;
-end;
-
-var
- _AddCredentials: Pointer;
-
-function AddCredentials;
-begin
- GetProcedureAddress(_AddCredentials, secur32, 'AddCredentials' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_AddCredentials]
- end;
-end;
-
-var
- _InitializeSecurityContextW: Pointer;
-
-function InitializeSecurityContextW;
-begin
- GetProcedureAddress(_InitializeSecurityContextW, secur32, 'InitializeSecurityContextW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_InitializeSecurityContextW]
- end;
-end;
-
-var
- _InitializeSecurityContextA: Pointer;
-
-function InitializeSecurityContextA;
-begin
- GetProcedureAddress(_InitializeSecurityContextA, secur32, 'InitializeSecurityContextA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_InitializeSecurityContextA]
- end;
-end;
-
-var
- _InitializeSecurityContext: Pointer;
-
-function InitializeSecurityContext;
-begin
- GetProcedureAddress(_InitializeSecurityContext, secur32, 'InitializeSecurityContext' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_InitializeSecurityContext]
- end;
-end;
-
-var
- _AcceptSecurityContext: Pointer;
-
-function AcceptSecurityContext;
-begin
- GetProcedureAddress(_AcceptSecurityContext, secur32, 'AcceptSecurityContext');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_AcceptSecurityContext]
- end;
-end;
-
-var
- _CompleteAuthToken: Pointer;
-
-function CompleteAuthToken;
-begin
- GetProcedureAddress(_CompleteAuthToken, secur32, 'CompleteAuthToken');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CompleteAuthToken]
- end;
-end;
-
-var
- _ImpersonateSecurityContext: Pointer;
-
-function ImpersonateSecurityContext;
-begin
- GetProcedureAddress(_ImpersonateSecurityContext, secur32, 'ImpersonateSecurityContext');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ImpersonateSecurityContext]
- end;
-end;
-
-var
- _RevertSecurityContext: Pointer;
-
-function RevertSecurityContext;
-begin
- GetProcedureAddress(_RevertSecurityContext, secur32, 'RevertSecurityContext');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RevertSecurityContext]
- end;
-end;
-
-var
- _QuerySecurityContextToken: Pointer;
-
-function QuerySecurityContextToken;
-begin
- GetProcedureAddress(_QuerySecurityContextToken, secur32, 'QuerySecurityContextToken');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_QuerySecurityContextToken]
- end;
-end;
-
-var
- _DeleteSecurityContext: Pointer;
-
-function DeleteSecurityContext;
-begin
- GetProcedureAddress(_DeleteSecurityContext, secur32, 'DeleteSecurityContext');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DeleteSecurityContext]
- end;
-end;
-
-var
- _ApplyControlToken: Pointer;
-
-function ApplyControlToken;
-begin
- GetProcedureAddress(_ApplyControlToken, secur32, 'ApplyControlToken');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ApplyControlToken]
- end;
-end;
-
-var
- _QueryContextAttributesW: Pointer;
-
-function QueryContextAttributesW;
-begin
- GetProcedureAddress(_QueryContextAttributesW, secur32, 'QueryContextAttributesW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_QueryContextAttributesW]
- end;
-end;
-
-var
- _QueryContextAttributesA: Pointer;
-
-function QueryContextAttributesA;
-begin
- GetProcedureAddress(_QueryContextAttributesA, secur32, 'QueryContextAttributesA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_QueryContextAttributesA]
- end;
-end;
-
-var
- _QueryContextAttributes: Pointer;
-
-function QueryContextAttributes;
-begin
- GetProcedureAddress(_QueryContextAttributes, secur32, 'QueryContextAttributes' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_QueryContextAttributes]
- end;
-end;
-
-var
- _SetContextAttributesW: Pointer;
-
-function SetContextAttributesW;
-begin
- GetProcedureAddress(_SetContextAttributesW, secur32, 'SetContextAttributesW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetContextAttributesW]
- end;
-end;
-
-var
- _SetContextAttributesA: Pointer;
-
-function SetContextAttributesA;
-begin
- GetProcedureAddress(_SetContextAttributesA, secur32, 'SetContextAttributesA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetContextAttributesA]
- end;
-end;
-
-var
- _SetContextAttributes: Pointer;
-
-function SetContextAttributes;
-begin
- GetProcedureAddress(_SetContextAttributes, secur32, 'SetContextAttributes' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetContextAttributes]
- end;
-end;
-
-var
- _QueryCredentialsAttributesW: Pointer;
-
-function QueryCredentialsAttributesW;
-begin
- GetProcedureAddress(_QueryCredentialsAttributesW, secur32, 'QueryCredentialsAttributesW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_QueryCredentialsAttributesW]
- end;
-end;
-
-var
- _QueryCredentialsAttributesA: Pointer;
-
-function QueryCredentialsAttributesA;
-begin
- GetProcedureAddress(_QueryCredentialsAttributesA, secur32, 'QueryCredentialsAttributesA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_QueryCredentialsAttributesA]
- end;
-end;
-
-var
- _QueryCredentialsAttributes: Pointer;
-
-function QueryCredentialsAttributes;
-begin
- GetProcedureAddress(_QueryCredentialsAttributes, secur32, 'QueryCredentialsAttributes' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_QueryCredentialsAttributes]
- end;
-end;
-
-var
- _FreeContextBuffer: Pointer;
-
-function FreeContextBuffer;
-begin
- GetProcedureAddress(_FreeContextBuffer, secur32, 'FreeContextBuffer');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_FreeContextBuffer]
- end;
-end;
-
-var
- _MakeSignature: Pointer;
-
-function MakeSignature;
-begin
- GetProcedureAddress(_MakeSignature, secur32, 'MakeSignature');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MakeSignature]
- end;
-end;
-
-var
- _VerifySignature: Pointer;
-
-function VerifySignature;
-begin
- GetProcedureAddress(_VerifySignature, secur32, 'VerifySignature');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_VerifySignature]
- end;
-end;
-
-var
- _EncryptMessage: Pointer;
-
-function EncryptMessage;
-begin
- GetProcedureAddress(_EncryptMessage, secur32, 'EncryptMessage');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_EncryptMessage]
- end;
-end;
-
-var
- _DecryptMessage: Pointer;
-
-function DecryptMessage;
-begin
- GetProcedureAddress(_DecryptMessage, secur32, 'DecryptMessage');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DecryptMessage]
- end;
-end;
-
-var
- _EnumerateSecurityPackagesW: Pointer;
-
-function EnumerateSecurityPackagesW;
-begin
- GetProcedureAddress(_EnumerateSecurityPackagesW, secur32, 'EnumerateSecurityPackagesW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_EnumerateSecurityPackagesW]
- end;
-end;
-
-var
- _EnumerateSecurityPackagesA: Pointer;
-
-function EnumerateSecurityPackagesA;
-begin
- GetProcedureAddress(_EnumerateSecurityPackagesA, secur32, 'EnumerateSecurityPackagesA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_EnumerateSecurityPackagesA]
- end;
-end;
-
-var
- _EnumerateSecurityPackages: Pointer;
-
-function EnumerateSecurityPackages;
-begin
- GetProcedureAddress(_EnumerateSecurityPackages, secur32, 'EnumerateSecurityPackages' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_EnumerateSecurityPackages]
- end;
-end;
-
-var
- _QuerySecurityPackageInfoW: Pointer;
-
-function QuerySecurityPackageInfoW;
-begin
- GetProcedureAddress(_QuerySecurityPackageInfoW, secur32, 'QuerySecurityPackageInfoW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_QuerySecurityPackageInfoW]
- end;
-end;
-
-var
- _QuerySecurityPackageInfoA: Pointer;
-
-function QuerySecurityPackageInfoA;
-begin
- GetProcedureAddress(_QuerySecurityPackageInfoA, secur32, 'QuerySecurityPackageInfoA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_QuerySecurityPackageInfoA]
- end;
-end;
-
-var
- _QuerySecurityPackageInfo: Pointer;
-
-function QuerySecurityPackageInfo;
-begin
- GetProcedureAddress(_QuerySecurityPackageInfo, secur32, 'QuerySecurityPackageInfo' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_QuerySecurityPackageInfo]
- end;
-end;
-
-var
- _ExportSecurityContext: Pointer;
-
-function ExportSecurityContext;
-begin
- GetProcedureAddress(_ExportSecurityContext, secur32, 'ExportSecurityContext');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ExportSecurityContext]
- end;
-end;
-
-var
- _ImportSecurityContextW: Pointer;
-
-function ImportSecurityContextW;
-begin
- GetProcedureAddress(_ImportSecurityContextW, secur32, 'ImportSecurityContextW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ImportSecurityContextW]
- end;
-end;
-
-var
- _ImportSecurityContextA: Pointer;
-
-function ImportSecurityContextA;
-begin
- GetProcedureAddress(_ImportSecurityContextA, secur32, 'ImportSecurityContextA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ImportSecurityContextA]
- end;
-end;
-
-var
- _ImportSecurityContext: Pointer;
-
-function ImportSecurityContext;
-begin
- GetProcedureAddress(_ImportSecurityContext, secur32, 'ImportSecurityContext' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ImportSecurityContext]
- end;
-end;
-
-var
- _InitSecurityInterfaceA: Pointer;
-
-function InitSecurityInterfaceA;
-begin
- GetProcedureAddress(_InitSecurityInterfaceA, secur32, 'InitSecurityInterfaceA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_InitSecurityInterfaceA]
- end;
-end;
-
-var
- _InitSecurityInterfaceW: Pointer;
-
-function InitSecurityInterfaceW;
-begin
- GetProcedureAddress(_InitSecurityInterfaceW, secur32, 'InitSecurityInterfaceW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_InitSecurityInterfaceW]
- end;
-end;
-
-var
- _InitSecurityInterface: Pointer;
-
-function InitSecurityInterface;
-begin
- GetProcedureAddress(_InitSecurityInterface, secur32, 'InitSecurityInterface' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_InitSecurityInterface]
- end;
-end;
-
-var
- _SaslEnumerateProfilesA: Pointer;
-
-function SaslEnumerateProfilesA;
-begin
- GetProcedureAddress(_SaslEnumerateProfilesA, secur32, 'SaslEnumerateProfilesA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SaslEnumerateProfilesA]
- end;
-end;
-
-var
- _SaslEnumerateProfilesW: Pointer;
-
-function SaslEnumerateProfilesW;
-begin
- GetProcedureAddress(_SaslEnumerateProfilesW, secur32, 'SaslEnumerateProfilesW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SaslEnumerateProfilesW]
- end;
-end;
-
-var
- _SaslEnumerateProfiles: Pointer;
-
-function SaslEnumerateProfiles;
-begin
- GetProcedureAddress(_SaslEnumerateProfiles, secur32, 'SaslEnumerateProfiles' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SaslEnumerateProfiles]
- end;
-end;
-
-var
- _SaslGetProfilePackageA: Pointer;
-
-function SaslGetProfilePackageA;
-begin
- GetProcedureAddress(_SaslGetProfilePackageA, secur32, 'SaslGetProfilePackageA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SaslGetProfilePackageA]
- end;
-end;
-
-var
- _SaslGetProfilePackageW: Pointer;
-
-function SaslGetProfilePackageW;
-begin
- GetProcedureAddress(_SaslGetProfilePackageW, secur32, 'SaslGetProfilePackageW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SaslGetProfilePackageW]
- end;
-end;
-
-var
- _SaslGetProfilePackage: Pointer;
-
-function SaslGetProfilePackage;
-begin
- GetProcedureAddress(_SaslGetProfilePackage, secur32, 'SaslGetProfilePackage' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SaslGetProfilePackage]
- end;
-end;
-
-var
- _SaslIdentifyPackageA: Pointer;
-
-function SaslIdentifyPackageA;
-begin
- GetProcedureAddress(_SaslIdentifyPackageA, secur32, 'SaslIdentifyPackageA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SaslIdentifyPackageA]
- end;
-end;
-
-var
- _SaslIdentifyPackageW: Pointer;
-
-function SaslIdentifyPackageW;
-begin
- GetProcedureAddress(_SaslIdentifyPackageW, secur32, 'SaslIdentifyPackageW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SaslIdentifyPackageW]
- end;
-end;
-
-var
- _SaslIdentifyPackage: Pointer;
-
-function SaslIdentifyPackage;
-begin
- GetProcedureAddress(_SaslIdentifyPackage, secur32, 'SaslIdentifyPackage' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SaslIdentifyPackage]
- end;
-end;
-
-var
- _SaslInitializeSecurityContextW: Pointer;
-
-function SaslInitializeSecurityContextW;
-begin
- GetProcedureAddress(_SaslInitializeSecurityContextW, secur32, 'SaslInitializeSecurityContextW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SaslInitializeSecurityContextW]
- end;
-end;
-
-var
- _SaslInitializeSecurityContextA: Pointer;
-
-function SaslInitializeSecurityContextA;
-begin
- GetProcedureAddress(_SaslInitializeSecurityContextA, secur32, 'SaslInitializeSecurityContextA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SaslInitializeSecurityContextA]
- end;
-end;
-
-var
- _SaslInitializeSecurityContext: Pointer;
-
-function SaslInitializeSecurityContext;
-begin
- GetProcedureAddress(_SaslInitializeSecurityContext, secur32, 'SaslInitializeSecurityContext' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SaslInitializeSecurityContext]
- end;
-end;
-
-var
- _SaslAcceptSecurityContext: Pointer;
-
-function SaslAcceptSecurityContext;
-begin
- GetProcedureAddress(_SaslAcceptSecurityContext, secur32, 'SaslAcceptSecurityContext');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SaslAcceptSecurityContext]
- end;
-end;
-
-var
- _SaslSetContextOption: Pointer;
-
-function SaslSetContextOption;
-begin
- GetProcedureAddress(_SaslSetContextOption, secur32, 'SaslSetContextOption');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SaslSetContextOption]
- end;
-end;
-
-var
- _SaslGetContextOption: Pointer;
-
-function SaslGetContextOption;
-begin
- GetProcedureAddress(_SaslGetContextOption, secur32, 'SaslGetContextOption');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SaslGetContextOption]
- end;
-end;
-
-var
- _AddSecurityPackageA: Pointer;
-
-function AddSecurityPackageA;
-begin
- GetProcedureAddress(_AddSecurityPackageA, secur32, 'AddSecurityPackageA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_AddSecurityPackageA]
- end;
-end;
-
-var
- _AddSecurityPackageW: Pointer;
-
-function AddSecurityPackageW;
-begin
- GetProcedureAddress(_AddSecurityPackageW, secur32, 'AddSecurityPackageW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_AddSecurityPackageW]
- end;
-end;
-
-var
- _AddSecurityPackage: Pointer;
-
-function AddSecurityPackage;
-begin
- GetProcedureAddress(_AddSecurityPackage, secur32, 'AddSecurityPackage' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_AddSecurityPackage]
- end;
-end;
-
-var
- _DeleteSecurityPackageA: Pointer;
-
-function DeleteSecurityPackageA;
-begin
- GetProcedureAddress(_DeleteSecurityPackageA, secur32, 'DeleteSecurityPackageA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DeleteSecurityPackageA]
- end;
-end;
-
-var
- _DeleteSecurityPackageW: Pointer;
-
-function DeleteSecurityPackageW;
-begin
- GetProcedureAddress(_DeleteSecurityPackageW, secur32, 'DeleteSecurityPackageW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DeleteSecurityPackageW]
- end;
-end;
-
-var
- _DeleteSecurityPackage: Pointer;
-
-function DeleteSecurityPackage;
-begin
- GetProcedureAddress(_DeleteSecurityPackage, secur32, 'DeleteSecurityPackage' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DeleteSecurityPackage]
- end;
-end;
-
-{$ELSE}
-
-function AcquireCredentialsHandleW; external secur32 name 'AcquireCredentialsHandleW';
-function AcquireCredentialsHandleA; external secur32 name 'AcquireCredentialsHandleA';
-function AcquireCredentialsHandle; external secur32 name 'AcquireCredentialsHandle' + AWSuffix;
-function FreeCredentialsHandle; external secur32 name 'FreeCredentialsHandle';
-function AddCredentialsW; external secur32 name 'AddCredentialsW';
-function AddCredentialsA; external secur32 name 'AddCredentialsA';
-function AddCredentials; external secur32 name 'AddCredentials' + AWSuffix;
-function InitializeSecurityContextW; external secur32 name 'InitializeSecurityContextW';
-function InitializeSecurityContextA; external secur32 name 'InitializeSecurityContextA';
-function InitializeSecurityContext; external secur32 name 'InitializeSecurityContext' + AWSuffix;
-function AcceptSecurityContext; external secur32 name 'AcceptSecurityContext';
-function CompleteAuthToken; external secur32 name 'CompleteAuthToken';
-function ImpersonateSecurityContext; external secur32 name 'ImpersonateSecurityContext';
-function RevertSecurityContext; external secur32 name 'RevertSecurityContext';
-function QuerySecurityContextToken; external secur32 name 'QuerySecurityContextToken';
-function DeleteSecurityContext; external secur32 name 'DeleteSecurityContext';
-function ApplyControlToken; external secur32 name 'ApplyControlToken';
-function QueryContextAttributesW; external secur32 name 'QueryContextAttributesW';
-function QueryContextAttributesA; external secur32 name 'QueryContextAttributesA';
-function QueryContextAttributes; external secur32 name 'QueryContextAttributes' + AWSuffix;
-function SetContextAttributesW; external secur32 name 'SetContextAttributesW';
-function SetContextAttributesA; external secur32 name 'SetContextAttributesA';
-function SetContextAttributes; external secur32 name 'SetContextAttributes' + AWSuffix;
-function QueryCredentialsAttributesW; external secur32 name 'QueryCredentialsAttributesW';
-function QueryCredentialsAttributesA; external secur32 name 'QueryCredentialsAttributesA';
-function QueryCredentialsAttributes; external secur32 name 'QueryCredentialsAttributes' + AWSuffix;
-function FreeContextBuffer; external secur32 name 'FreeContextBuffer';
-function MakeSignature; external secur32 name 'MakeSignature';
-function VerifySignature; external secur32 name 'VerifySignature';
-function EncryptMessage; external secur32 name 'EncryptMessage';
-function DecryptMessage; external secur32 name 'DecryptMessage';
-function EnumerateSecurityPackagesW; external secur32 name 'EnumerateSecurityPackagesW';
-function EnumerateSecurityPackagesA; external secur32 name 'EnumerateSecurityPackagesA';
-function EnumerateSecurityPackages; external secur32 name 'EnumerateSecurityPackages' + AWSuffix;
-function QuerySecurityPackageInfoW; external secur32 name 'QuerySecurityPackageInfoW';
-function QuerySecurityPackageInfoA; external secur32 name 'QuerySecurityPackageInfoA';
-function QuerySecurityPackageInfo; external secur32 name 'QuerySecurityPackageInfo' + AWSuffix;
-function ExportSecurityContext; external secur32 name 'ExportSecurityContext';
-function ImportSecurityContextW; external secur32 name 'ImportSecurityContextW';
-function ImportSecurityContextA; external secur32 name 'ImportSecurityContextA';
-function ImportSecurityContext; external secur32 name 'ImportSecurityContext' + AWSuffix;
-function InitSecurityInterfaceA; external secur32 name 'InitSecurityInterfaceA';
-function InitSecurityInterfaceW; external secur32 name 'InitSecurityInterfaceW';
-function InitSecurityInterface; external secur32 name 'InitSecurityInterface' + AWSuffix;
-function SaslEnumerateProfilesA; external secur32 name 'SaslEnumerateProfilesA';
-function SaslEnumerateProfilesW; external secur32 name 'SaslEnumerateProfilesW';
-function SaslEnumerateProfiles; external secur32 name 'SaslEnumerateProfiles' + AWSuffix;
-function SaslGetProfilePackageA; external secur32 name 'SaslGetProfilePackageA';
-function SaslGetProfilePackageW; external secur32 name 'SaslGetProfilePackageW';
-function SaslGetProfilePackage; external secur32 name 'SaslGetProfilePackage' + AWSuffix;
-function SaslIdentifyPackageA; external secur32 name 'SaslIdentifyPackageA';
-function SaslIdentifyPackageW; external secur32 name 'SaslIdentifyPackageW';
-function SaslIdentifyPackage; external secur32 name 'SaslIdentifyPackage' + AWSuffix;
-function SaslInitializeSecurityContextW; external secur32 name 'SaslInitializeSecurityContextW';
-function SaslInitializeSecurityContextA; external secur32 name 'SaslInitializeSecurityContextA';
-function SaslInitializeSecurityContext; external secur32 name 'SaslInitializeSecurityContext' + AWSuffix;
-function SaslAcceptSecurityContext; external secur32 name 'SaslAcceptSecurityContext';
-function SaslSetContextOption; external secur32 name 'SaslSetContextOption';
-function SaslGetContextOption; external secur32 name 'SaslGetContextOption';
-function AddSecurityPackageA; external secur32 name 'AddSecurityPackageA';
-function AddSecurityPackageW; external secur32 name 'AddSecurityPackageW';
-function AddSecurityPackage; external secur32 name 'AddSecurityPackage' + AWSuffix;
-function DeleteSecurityPackageA; external secur32 name 'DeleteSecurityPackageA';
-function DeleteSecurityPackageW; external secur32 name 'DeleteSecurityPackageW';
-function DeleteSecurityPackage; external secur32 name 'DeleteSecurityPackage' + AWSuffix;
-
-{$ENDIF DYNAMIC_LINK}
-
-end.
+{******************************************************************************}
+{ }
+{ Security Service Provider API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: sspi.h, released June 2000. The original Pascal }
+{ code is: Sspi.pas, released December 2000. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwasspi.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaSspi;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "sspi.h"'}
+{$HPPEMIT ''}
+{$HPPEMIT '#typedef SEC_CHAR *PSEC_CHAR'}
+{$HPPEMIT '#typedef SEC_WCHAR *PSEC_WCHAR'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaWinType;
+
+//
+// Determine environment:
+//
+
+const
+ ISSP_LEVEL = 32;
+ {$EXTERNALSYM ISSP_LEVEL}
+ ISSP_MODE = 1;
+ {$EXTERNALSYM ISSP_MODE}
+
+//
+// Now, define platform specific mappings:
+//
+
+//
+// For NT-2 and up, wtypes will define HRESULT to be long.
+//
+
+type
+ SEC_WCHAR = WCHAR;
+ {$EXTERNALSYM SEC_WCHAR}
+ PSEC_WCHAR = ^SEC_CHAR;
+ {$NODEFINE PSEC_WCHAR}
+ PSecWChar = ^TSecWChar;
+ TSecWChar = SEC_WCHAR;
+
+ SEC_CHAR = CHAR;
+ {$EXTERNALSYM SEC_CHAR}
+ PSEC_CHAR = ^SEC_CHAR;
+ {$NODEFINE PSEC_CHAR}
+ PSecChar = ^TSecChar;
+ TSecChar = SEC_CHAR;
+
+ SECURITY_STATUS = LONG;
+ {$EXTERNALSYM SECURITY_STATUS}
+ PSecurityStatus = ^TSecurityStatus;
+ TSecurityStatus = SECURITY_STATUS;
+
+//
+// Decide what a string - 32 bits only since for 16 bits it is clear.
+//
+
+ {$IFDEF UNICODE}
+ SECURITY_PSTR = ^SEC_WCHAR;
+ {$EXTERNALSYM SECURITY_PSTR}
+ SECURITY_PCSTR = ^SEC_WCHAR;
+ {$EXTERNALSYM SECURITY_PCSTR}
+ {$ELSE}
+ SECURITY_PSTR = ^SEC_CHAR;
+ {$EXTERNALSYM SECURITY_PSTR}
+ SECURITY_PCSTR = ^SEC_CHAR;
+ {$EXTERNALSYM SECURITY_PCSTR}
+ {$ENDIF UNICODE}
+
+//
+// Okay, security specific types:
+//
+
+ PSecHandle = ^SecHandle;
+ {$EXTERNALSYM PSecHandle}
+ _SecHandle = record
+ dwLower: ULONG_PTR;
+ dwUpper: ULONG_PTR;
+ end;
+ {$EXTERNALSYM _SecHandle}
+ SecHandle = _SecHandle;
+ {$EXTERNALSYM SecHandle}
+ TSecHandle = SecHandle;
+
+procedure SecInvalidateHandle(var x: SecHandle);
+{$EXTERNALSYM SecInvalidateHandle}
+
+function SecIsValidHandle(x: SecHandle): Boolean;
+{$EXTERNALSYM SecIsValidHandle}
+
+type
+ CredHandle = SecHandle;
+ {$EXTERNALSYM CredHandle}
+ PCredHandle = ^CredHandle;
+ {$EXTERNALSYM PCredHandle}
+ TCredHandle = CredHandle;
+
+ CtxtHandle = SecHandle;
+ {$EXTERNALSYM CtxtHandle}
+ PCtxtHandle = ^CtxtHandle;
+ {$EXTERNALSYM PCtxthandle}
+ TCtxthandle = CtxtHandle;
+
+ _SECURITY_INTEGER = LARGE_INTEGER;
+ {$EXTERNALSYM _SECURITY_INTEGER}
+ SECURITY_INTEGER = _SECURITY_INTEGER;
+ {$EXTERNALSYM SECURITY_INTEGER}
+ PSECURITY_INTEGER = ^SECURITY_INTEGER;
+ {$EXTERNALSYM PSECURITY_INTEGER}
+
+// todo Timestamp was removed from SSPI in August 2001 PSDK, where is it now?!
+
+ TimeStamp = SECURITY_INTEGER;
+ {$EXTERNALSYM TimeStamp}
+ PTimeStamp = ^SECURITY_INTEGER;
+ {$EXTERNALSYM PTimeStamp}
+ TTimeStamp = TimeStamp;
+
+//
+// If we are in 32 bit mode, define the SECURITY_STRING structure,
+// as a clone of the base UNICODE_STRING structure. This is used
+// internally in security components, an as the string interface
+// for kernel components (e.g. FSPs)
+//
+
+ SECURITY_STRING = UNICODE_STRING;
+ {$EXTERNALSYM SECURITY_STRING}
+ PSECURITY_STRING = ^SECURITY_STRING;
+ {$EXTERNALSYM PSECURITY_STRING}
+ TSecurityString = SECURITY_STRING;
+ PSecurityString = PSECURITY_STRING;
+
+//
+// SecPkgInfo structure
+//
+// Provides general information about a security provider
+//
+
+ PSecPkgInfoW = ^SecPkgInfoW;
+ {$EXTERNALSYM PSecPkgInfoW}
+ _SecPkgInfoW = record
+ fCapabilities: Cardinal; // Capability bitmask
+ wVersion: Word; // Version of driver
+ wRPCID: Word; // ID for RPC Runtime
+ cbMaxToken: Cardinal; // Size of authentication token (max)
+ Name: PSecWChar; // Text name
+ Comment: PSecWChar; // Comment
+ end;
+ {$EXTERNALSYM _SecPkgInfoW}
+ SecPkgInfoW = _SecPkgInfoW;
+ {$EXTERNALSYM SecPkgInfoW}
+ TSecPkgInfoW = SecPkgInfoW;
+
+ PSecPkgInfoA = ^SecPkgInfoA;
+ {$EXTERNALSYM PSecPkgInfoA}
+ _SecPkgInfoA = record
+ fCapabilities: Cardinal; // Capability bitmask
+ wVersion: Word; // Version of driver
+ wRPCID: Word; // ID for RPC Runtime
+ cbMaxToken: Cardinal; // Size of authentication token (max)
+ Name: PSecChar; // Text name
+ Comment: PSecChar; // Comment
+ end;
+ {$EXTERNALSYM _SecPkgInfoA}
+ SecPkgInfoA = _SecPkgInfoA;
+ {$EXTERNALSYM SecPkgInfoA}
+ TSecPkgInfoA = SecPkgInfoA;
+
+ {$IFDEF UNICODE}
+ SecPkgInfo = SecPkgInfoW;
+ {$EXTERNALSYM SecPkgInfo}
+ PSecPkgInfo = PSecPkgInfoW;
+ {$EXTERNALSYM PSecPkgInfo}
+ TSecPkgInfo = TSecPkgInfoW;
+ {$ELSE}
+ SecPkgInfo = SecPkgInfoA;
+ {$EXTERNALSYM SecPkgInfo}
+ PSecPkgInfo = PSecPkgInfoA;
+ {$EXTERNALSYM PSecPkgInfo}
+ TSecPkgInfo = TSecPkgInfoA;
+ {$ENDIF UNICODE}
+
+//
+// Security Package Capabilities
+//
+
+const
+ SECPKG_FLAG_INTEGRITY = $00000001; // Supports integrity on messages
+ {$EXTERNALSYM SECPKG_FLAG_INTEGRITY}
+ SECPKG_FLAG_PRIVACY = $00000002; // Supports privacy (confidentiality)
+ {$EXTERNALSYM SECPKG_FLAG_PRIVACY}
+ SECPKG_FLAG_TOKEN_ONLY = $00000004; // Only security token needed
+ {$EXTERNALSYM SECPKG_FLAG_TOKEN_ONLY}
+ SECPKG_FLAG_DATAGRAM = $00000008; // Datagram RPC support
+ {$EXTERNALSYM SECPKG_FLAG_DATAGRAM}
+ SECPKG_FLAG_CONNECTION = $00000010; // Connection oriented RPC support
+ {$EXTERNALSYM SECPKG_FLAG_CONNECTION}
+ SECPKG_FLAG_MULTI_REQUIRED = $00000020; // Full 3-leg required for re-auth.
+ {$EXTERNALSYM SECPKG_FLAG_MULTI_REQUIRED}
+ SECPKG_FLAG_CLIENT_ONLY = $00000040; // Server side functionality not available
+ {$EXTERNALSYM SECPKG_FLAG_CLIENT_ONLY}
+ SECPKG_FLAG_EXTENDED_ERROR = $00000080; // Supports extended error msgs
+ {$EXTERNALSYM SECPKG_FLAG_EXTENDED_ERROR}
+ SECPKG_FLAG_IMPERSONATION = $00000100; // Supports impersonation
+ {$EXTERNALSYM SECPKG_FLAG_IMPERSONATION}
+ SECPKG_FLAG_ACCEPT_WIN32_NAME = $00000200; // Accepts Win32 names
+ {$EXTERNALSYM SECPKG_FLAG_ACCEPT_WIN32_NAME}
+ SECPKG_FLAG_STREAM = $00000400; // Supports stream semantics
+ {$EXTERNALSYM SECPKG_FLAG_STREAM}
+ SECPKG_FLAG_NEGOTIABLE = $00000800; // Can be used by the negotiate package
+ {$EXTERNALSYM SECPKG_FLAG_NEGOTIABLE}
+ SECPKG_FLAG_GSS_COMPATIBLE = $00001000; // GSS Compatibility Available
+ {$EXTERNALSYM SECPKG_FLAG_GSS_COMPATIBLE}
+ SECPKG_FLAG_LOGON = $00002000; // Supports common LsaLogonUser
+ {$EXTERNALSYM SECPKG_FLAG_LOGON}
+ SECPKG_FLAG_ASCII_BUFFERS = $00004000; // Token Buffers are in ASCII
+ {$EXTERNALSYM SECPKG_FLAG_ASCII_BUFFERS}
+ SECPKG_FLAG_FRAGMENT = $00008000; // Package can fragment to fit
+ {$EXTERNALSYM SECPKG_FLAG_FRAGMENT}
+ SECPKG_FLAG_MUTUAL_AUTH = $00010000; // Package can perform mutual authentication
+ {$EXTERNALSYM SECPKG_FLAG_MUTUAL_AUTH}
+ SECPKG_FLAG_DELEGATION = $00020000; // Package can delegate
+ {$EXTERNALSYM SECPKG_FLAG_DELEGATION}
+
+ SECPKG_ID_NONE = $FFFF;
+ {$EXTERNALSYM SECPKG_ID_NONE}
+
+//
+// SecBuffer
+//
+// Generic memory descriptors for buffers passed in to the security
+// API
+//
+
+type
+ PSecBuffer = ^SecBuffer;
+ {$EXTERNALSYM PSecBuffer}
+ _SecBuffer = record
+ cbBuffer: Cardinal; // Size of the buffer, in bytes
+ BufferType: Cardinal; // Type of the buffer (below)
+ pvBuffer: Pointer; // Pointer to the buffer
+ end;
+ {$EXTERNALSYM _SecBuffer}
+ SecBuffer = _SecBuffer;
+ {$EXTERNALSYM SecBuffer}
+ TSecBuffer = SecBuffer;
+
+ PSecBufferDesc = ^SecBufferDesc;
+ {$EXTERNALSYM PSecBufferDesc}
+ _SecBufferDesc = record
+ ulVersion: Cardinal; // Version number
+ cBuffers: Cardinal; // Number of buffers
+ pBuffers: PSecBuffer; // Pointer to array of buffers
+ end;
+ {$EXTERNALSYM _SecBufferDesc}
+ SecBufferDesc = _SecBufferDesc;
+ {$EXTERNALSYM SecBufferDesc}
+ TSecBufferDesc = SecBufferDesc;
+
+const
+ SECBUFFER_VERSION = 0;
+ {$EXTERNALSYM SECBUFFER_VERSION}
+
+ SECBUFFER_EMPTY = 0; // Undefined, replaced by provider
+ {$EXTERNALSYM SECBUFFER_EMPTY}
+ SECBUFFER_DATA = 1; // Packet data
+ {$EXTERNALSYM SECBUFFER_DATA}
+ SECBUFFER_TOKEN = 2; // Security token
+ {$EXTERNALSYM SECBUFFER_TOKEN}
+ SECBUFFER_PKG_PARAMS = 3; // Package specific parameters
+ {$EXTERNALSYM SECBUFFER_PKG_PARAMS}
+ SECBUFFER_MISSING = 4; // Missing Data indicator
+ {$EXTERNALSYM SECBUFFER_MISSING}
+ SECBUFFER_EXTRA = 5; // Extra data
+ {$EXTERNALSYM SECBUFFER_EXTRA}
+ SECBUFFER_STREAM_TRAILER = 6; // Security Trailer
+ {$EXTERNALSYM SECBUFFER_STREAM_TRAILER}
+ SECBUFFER_STREAM_HEADER = 7; // Security Header
+ {$EXTERNALSYM SECBUFFER_STREAM_HEADER}
+ SECBUFFER_NEGOTIATION_INFO = 8; // Hints from the negotiation pkg
+ {$EXTERNALSYM SECBUFFER_NEGOTIATION_INFO}
+ SECBUFFER_PADDING = 9; // non-data padding
+ {$EXTERNALSYM SECBUFFER_PADDING}
+ SECBUFFER_STREAM = 10; // whole encrypted message
+ {$EXTERNALSYM SECBUFFER_STREAM}
+ SECBUFFER_MECHLIST = 11;
+ {$EXTERNALSYM SECBUFFER_MECHLIST}
+ SECBUFFER_MECHLIST_SIGNATURE = 12;
+ {$EXTERNALSYM SECBUFFER_MECHLIST_SIGNATURE}
+ SECBUFFER_TARGET = 13;
+ {$EXTERNALSYM SECBUFFER_TARGET}
+ SECBUFFER_CHANNEL_BINDINGS = 14;
+ {$EXTERNALSYM SECBUFFER_CHANNEL_BINDINGS}
+
+ SECBUFFER_ATTRMASK = DWORD($F0000000);
+ {$EXTERNALSYM SECBUFFER_ATTRMASK}
+ SECBUFFER_READONLY = DWORD($80000000); // Buffer is read-only
+ {$EXTERNALSYM SECBUFFER_READONLY}
+ SECBUFFER_READONLY_WITH_CHECKSUM = $10000000; // Buffer is read-only, and checksummed
+ {$EXTERNALSYM SECBUFFER_READONLY_WITH_CHECKSUM}
+ SECBUFFER_RESERVED = DWORD($60000000); // Flags reserved to security system
+ {$EXTERNALSYM SECBUFFER_RESERVED}
+
+type
+ PSEC_NEGOTIATION_INFO = ^SEC_NEGOTIATION_INFO;
+ {$EXTERNALSYM PSEC_NEGOTIATION_INFO}
+ _SEC_NEGOTIATION_INFO = record
+ Size: Cardinal; // Size of this structure
+ NameLength: Cardinal; // Length of name hint
+ Name: PSecWChar; // Name hint
+ Reserved: Pointer; // Reserved
+ end;
+ {$EXTERNALSYM _SEC_NEGOTIATION_INFO}
+ SEC_NEGOTIATION_INFO = _SEC_NEGOTIATION_INFO;
+ {$EXTERNALSYM SEC_NEGOTIATION_INFO}
+ TSecNegotiationInfo = SEC_NEGOTIATION_INFO;
+ PSecNegotiationInfo = PSEC_NEGOTIATION_INFO;
+
+ _SEC_CHANNEL_BINDINGS = record
+ dwInitiatorAddrType: Cardinal;
+ cbInitiatorLength: Cardinal;
+ dwInitiatorOffset: Cardinal;
+ dwAcceptorAddrType: Cardinal;
+ cbAcceptorLength: Cardinal;
+ dwAcceptorOffset: Cardinal;
+ cbApplicationDataLength: Cardinal;
+ dwApplicationDataOffset: Cardinal;
+ end;
+ {$EXTERNALSYM _SEC_CHANNEL_BINDINGS}
+ SEC_CHANNEL_BINDINGS = _SEC_CHANNEL_BINDINGS;
+ {$EXTERNALSYM SEC_CHANNEL_BINDINGS}
+ PSEC_CHANNEL_BINDINGS = ^SEC_CHANNEL_BINDINGS;
+ {$EXTERNALSYM PSEC_CHANNEL_BINDINGS}
+ TSecChannelBindings = SEC_CHANNEL_BINDINGS;
+ PSecChannelBindings = PSEC_CHANNEL_BINDINGS;
+
+//
+// Data Representation Constant:
+//
+
+const
+ SECURITY_NATIVE_DREP = $00000010;
+ {$EXTERNALSYM SECURITY_NATIVE_DREP}
+ SECURITY_NETWORK_DREP = $00000000;
+ {$EXTERNALSYM SECURITY_NETWORK_DREP}
+
+//
+// Credential Use Flags
+//
+
+ SECPKG_CRED_INBOUND = $00000001;
+ {$EXTERNALSYM SECPKG_CRED_INBOUND}
+ SECPKG_CRED_OUTBOUND = $00000002;
+ {$EXTERNALSYM SECPKG_CRED_OUTBOUND}
+ SECPKG_CRED_BOTH = $00000003;
+ {$EXTERNALSYM SECPKG_CRED_BOTH}
+ SECPKG_CRED_DEFAULT = $00000004;
+ {$EXTERNALSYM SECPKG_CRED_DEFAULT}
+ SECPKG_CRED_RESERVED = DWORD($F0000000);
+ {$EXTERNALSYM SECPKG_CRED_RESERVED}
+
+//
+// InitializeSecurityContext Requirement and return flags:
+//
+
+ ISC_REQ_DELEGATE = $00000001;
+ {$EXTERNALSYM ISC_REQ_DELEGATE}
+ ISC_REQ_MUTUAL_AUTH = $00000002;
+ {$EXTERNALSYM ISC_REQ_MUTUAL_AUTH}
+ ISC_REQ_REPLAY_DETECT = $00000004;
+ {$EXTERNALSYM ISC_REQ_REPLAY_DETECT}
+ ISC_REQ_SEQUENCE_DETECT = $00000008;
+ {$EXTERNALSYM ISC_REQ_SEQUENCE_DETECT}
+ ISC_REQ_CONFIDENTIALITY = $00000010;
+ {$EXTERNALSYM ISC_REQ_CONFIDENTIALITY}
+ ISC_REQ_USE_SESSION_KEY = $00000020;
+ {$EXTERNALSYM ISC_REQ_USE_SESSION_KEY}
+ ISC_REQ_PROMPT_FOR_CREDS = $00000040;
+ {$EXTERNALSYM ISC_REQ_PROMPT_FOR_CREDS}
+ ISC_REQ_USE_SUPPLIED_CREDS = $00000080;
+ {$EXTERNALSYM ISC_REQ_USE_SUPPLIED_CREDS}
+ ISC_REQ_ALLOCATE_MEMORY = $00000100;
+ {$EXTERNALSYM ISC_REQ_ALLOCATE_MEMORY}
+ ISC_REQ_USE_DCE_STYLE = $00000200;
+ {$EXTERNALSYM ISC_REQ_USE_DCE_STYLE}
+ ISC_REQ_DATAGRAM = $00000400;
+ {$EXTERNALSYM ISC_REQ_DATAGRAM}
+ ISC_REQ_CONNECTION = $00000800;
+ {$EXTERNALSYM ISC_REQ_CONNECTION}
+ ISC_REQ_CALL_LEVEL = $00001000;
+ {$EXTERNALSYM ISC_REQ_CALL_LEVEL}
+ ISC_REQ_FRAGMENT_SUPPLIED = $00002000;
+ {$EXTERNALSYM ISC_REQ_FRAGMENT_SUPPLIED}
+ ISC_REQ_EXTENDED_ERROR = $00004000;
+ {$EXTERNALSYM ISC_REQ_EXTENDED_ERROR}
+ ISC_REQ_STREAM = $00008000;
+ {$EXTERNALSYM ISC_REQ_STREAM}
+ ISC_REQ_INTEGRITY = $00010000;
+ {$EXTERNALSYM ISC_REQ_INTEGRITY}
+ ISC_REQ_IDENTIFY = $00020000;
+ {$EXTERNALSYM ISC_REQ_IDENTIFY}
+ ISC_REQ_NULL_SESSION = $00040000;
+ {$EXTERNALSYM ISC_REQ_NULL_SESSION}
+ ISC_REQ_MANUAL_CRED_VALIDATION = $00080000;
+ {$EXTERNALSYM ISC_REQ_MANUAL_CRED_VALIDATION}
+ ISC_REQ_RESERVED1 = $00100000;
+ {$EXTERNALSYM ISC_REQ_RESERVED1}
+ ISC_REQ_FRAGMENT_TO_FIT = $00200000;
+ {$EXTERNALSYM ISC_REQ_FRAGMENT_TO_FIT}
+
+ ISC_RET_DELEGATE = $00000001;
+ {$EXTERNALSYM ISC_RET_DELEGATE}
+ ISC_RET_MUTUAL_AUTH = $00000002;
+ {$EXTERNALSYM ISC_RET_MUTUAL_AUTH}
+ ISC_RET_REPLAY_DETECT = $00000004;
+ {$EXTERNALSYM ISC_RET_REPLAY_DETECT}
+ ISC_RET_SEQUENCE_DETECT = $00000008;
+ {$EXTERNALSYM ISC_RET_SEQUENCE_DETECT}
+ ISC_RET_CONFIDENTIALITY = $00000010;
+ {$EXTERNALSYM ISC_RET_CONFIDENTIALITY}
+ ISC_RET_USE_SESSION_KEY = $00000020;
+ {$EXTERNALSYM ISC_RET_USE_SESSION_KEY}
+ ISC_RET_USED_COLLECTED_CREDS = $00000040;
+ {$EXTERNALSYM ISC_RET_USED_COLLECTED_CREDS}
+ ISC_RET_USED_SUPPLIED_CREDS = $00000080;
+ {$EXTERNALSYM ISC_RET_USED_SUPPLIED_CREDS}
+ ISC_RET_ALLOCATED_MEMORY = $00000100;
+ {$EXTERNALSYM ISC_RET_ALLOCATED_MEMORY}
+ ISC_RET_USED_DCE_STYLE = $00000200;
+ {$EXTERNALSYM ISC_RET_USED_DCE_STYLE}
+ ISC_RET_DATAGRAM = $00000400;
+ {$EXTERNALSYM ISC_RET_DATAGRAM}
+ ISC_RET_CONNECTION = $00000800;
+ {$EXTERNALSYM ISC_RET_CONNECTION}
+ ISC_RET_INTERMEDIATE_RETURN = $00001000;
+ {$EXTERNALSYM ISC_RET_INTERMEDIATE_RETURN}
+ ISC_RET_CALL_LEVEL = $00002000;
+ {$EXTERNALSYM ISC_RET_CALL_LEVEL}
+ ISC_RET_EXTENDED_ERROR = $00004000;
+ {$EXTERNALSYM ISC_RET_EXTENDED_ERROR}
+ ISC_RET_STREAM = $00008000;
+ {$EXTERNALSYM ISC_RET_STREAM}
+ ISC_RET_INTEGRITY = $00010000;
+ {$EXTERNALSYM ISC_RET_INTEGRITY}
+ ISC_RET_IDENTIFY = $00020000;
+ {$EXTERNALSYM ISC_RET_IDENTIFY}
+ ISC_RET_NULL_SESSION = $00040000;
+ {$EXTERNALSYM ISC_RET_NULL_SESSION}
+ ISC_RET_MANUAL_CRED_VALIDATION = $00080000;
+ {$EXTERNALSYM ISC_RET_MANUAL_CRED_VALIDATION}
+ ISC_RET_RESERVED1 = $00100000;
+ {$EXTERNALSYM ISC_RET_RESERVED1}
+ ISC_RET_FRAGMENT_ONLY = $00200000;
+ {$EXTERNALSYM ISC_RET_FRAGMENT_ONLY}
+
+ ASC_REQ_DELEGATE = $00000001;
+ {$EXTERNALSYM ASC_REQ_DELEGATE}
+ ASC_REQ_MUTUAL_AUTH = $00000002;
+ {$EXTERNALSYM ASC_REQ_MUTUAL_AUTH}
+ ASC_REQ_REPLAY_DETECT = $00000004;
+ {$EXTERNALSYM ASC_REQ_REPLAY_DETECT}
+ ASC_REQ_SEQUENCE_DETECT = $00000008;
+ {$EXTERNALSYM ASC_REQ_SEQUENCE_DETECT}
+ ASC_REQ_CONFIDENTIALITY = $00000010;
+ {$EXTERNALSYM ASC_REQ_CONFIDENTIALITY}
+ ASC_REQ_USE_SESSION_KEY = $00000020;
+ {$EXTERNALSYM ASC_REQ_USE_SESSION_KEY}
+ ASC_REQ_ALLOCATE_MEMORY = $00000100;
+ {$EXTERNALSYM ASC_REQ_ALLOCATE_MEMORY}
+ ASC_REQ_USE_DCE_STYLE = $00000200;
+ {$EXTERNALSYM ASC_REQ_USE_DCE_STYLE}
+ ASC_REQ_DATAGRAM = $00000400;
+ {$EXTERNALSYM ASC_REQ_DATAGRAM}
+ ASC_REQ_CONNECTION = $00000800;
+ {$EXTERNALSYM ASC_REQ_CONNECTION}
+ ASC_REQ_CALL_LEVEL = $00001000;
+ {$EXTERNALSYM ASC_REQ_CALL_LEVEL}
+ ASC_REQ_EXTENDED_ERROR = $00008000;
+ {$EXTERNALSYM ASC_REQ_EXTENDED_ERROR}
+ ASC_REQ_STREAM = $00010000;
+ {$EXTERNALSYM ASC_REQ_STREAM}
+ ASC_REQ_INTEGRITY = $00020000;
+ {$EXTERNALSYM ASC_REQ_INTEGRITY}
+ ASC_REQ_LICENSING = $00040000;
+ {$EXTERNALSYM ASC_REQ_LICENSING}
+ ASC_REQ_IDENTIFY = $00080000;
+ {$EXTERNALSYM ASC_REQ_IDENTIFY}
+ ASC_REQ_ALLOW_NULL_SESSION = $00100000;
+ {$EXTERNALSYM ASC_REQ_ALLOW_NULL_SESSION}
+ ASC_REQ_ALLOW_NON_USER_LOGONS = $00200000;
+ {$EXTERNALSYM ASC_REQ_ALLOW_NON_USER_LOGONS}
+ ASC_REQ_ALLOW_CONTEXT_REPLAY = $00400000;
+ {$EXTERNALSYM ASC_REQ_ALLOW_CONTEXT_REPLAY}
+ ASC_REQ_FRAGMENT_TO_FIT = $00800000;
+ {$EXTERNALSYM ASC_REQ_FRAGMENT_TO_FIT}
+ ASC_REQ_FRAGMENT_SUPPLIED = $00002000;
+ {$EXTERNALSYM ASC_REQ_FRAGMENT_SUPPLIED}
+ ASC_REQ_NO_TOKEN = $01000000;
+ {$EXTERNALSYM ASC_REQ_NO_TOKEN}
+
+ ASC_RET_DELEGATE = $00000001;
+ {$EXTERNALSYM ASC_RET_DELEGATE}
+ ASC_RET_MUTUAL_AUTH = $00000002;
+ {$EXTERNALSYM ASC_RET_MUTUAL_AUTH}
+ ASC_RET_REPLAY_DETECT = $00000004;
+ {$EXTERNALSYM ASC_RET_REPLAY_DETECT}
+ ASC_RET_SEQUENCE_DETECT = $00000008;
+ {$EXTERNALSYM ASC_RET_SEQUENCE_DETECT}
+ ASC_RET_CONFIDENTIALITY = $00000010;
+ {$EXTERNALSYM ASC_RET_CONFIDENTIALITY}
+ ASC_RET_USE_SESSION_KEY = $00000020;
+ {$EXTERNALSYM ASC_RET_USE_SESSION_KEY}
+ ASC_RET_ALLOCATED_MEMORY = $00000100;
+ {$EXTERNALSYM ASC_RET_ALLOCATED_MEMORY}
+ ASC_RET_USED_DCE_STYLE = $00000200;
+ {$EXTERNALSYM ASC_RET_USED_DCE_STYLE}
+ ASC_RET_DATAGRAM = $00000400;
+ {$EXTERNALSYM ASC_RET_DATAGRAM}
+ ASC_RET_CONNECTION = $00000800;
+ {$EXTERNALSYM ASC_RET_CONNECTION}
+ ASC_RET_CALL_LEVEL = $00002000; // skipped 1000 to be like ISC_
+ {$EXTERNALSYM ASC_RET_CALL_LEVEL}
+ ASC_RET_THIRD_LEG_FAILED = $00004000;
+ {$EXTERNALSYM ASC_RET_THIRD_LEG_FAILED}
+ ASC_RET_EXTENDED_ERROR = $00008000;
+ {$EXTERNALSYM ASC_RET_EXTENDED_ERROR}
+ ASC_RET_STREAM = $00010000;
+ {$EXTERNALSYM ASC_RET_STREAM}
+ ASC_RET_INTEGRITY = $00020000;
+ {$EXTERNALSYM ASC_RET_INTEGRITY}
+ ASC_RET_LICENSING = $00040000;
+ {$EXTERNALSYM ASC_RET_LICENSING}
+ ASC_RET_IDENTIFY = $00080000;
+ {$EXTERNALSYM ASC_RET_IDENTIFY}
+ ASC_RET_NULL_SESSION = $00100000;
+ {$EXTERNALSYM ASC_RET_NULL_SESSION}
+ ASC_RET_ALLOW_NON_USER_LOGONS = $00200000;
+ {$EXTERNALSYM ASC_RET_ALLOW_NON_USER_LOGONS}
+ ASC_RET_ALLOW_CONTEXT_REPLAY = $00400000;
+ {$EXTERNALSYM ASC_RET_ALLOW_CONTEXT_REPLAY}
+ ASC_RET_FRAGMENT_ONLY = $00800000;
+ {$EXTERNALSYM ASC_RET_FRAGMENT_ONLY}
+ ASC_RET_NO_TOKEN = $01000000;
+ {$EXTERNALSYM ASC_RET_NO_TOKEN}
+
+//
+// Security Credentials Attributes:
+//
+
+ SECPKG_CRED_ATTR_NAMES = 1;
+ {$EXTERNALSYM SECPKG_CRED_ATTR_NAMES}
+
+type
+ PSecPkgCredentials_NamesW = ^SecPkgCredentials_NamesW;
+ {$EXTERNALSYM PSecPkgCredentials_NamesW}
+ _SecPkgCredentials_NamesW = record
+ sUserName: PSecWChar;
+ end;
+ {$EXTERNALSYM _SecPkgCredentials_NamesW}
+ SecPkgCredentials_NamesW = _SecPkgCredentials_NamesW;
+ {$EXTERNALSYM SecPkgCredentials_NamesW}
+ TSecPkgCredentialsNamesW = SecPkgCredentials_NamesW;
+ PSecPkgCredentialsNamesW = PSecPkgCredentials_NamesW;
+
+ PSecPkgCredentials_NamesA = ^SecPkgCredentials_NamesA;
+ {$EXTERNALSYM PSecPkgCredentials_NamesA}
+ _SecPkgCredentials_NamesA = record
+ sUserName: PSecChar;
+ end;
+ {$EXTERNALSYM _SecPkgCredentials_NamesA}
+ SecPkgCredentials_NamesA = _SecPkgCredentials_NamesA;
+ {$EXTERNALSYM SecPkgCredentials_NamesA}
+ TSecPkgCredentialsNamesA = SecPkgCredentials_NamesA;
+ PSecPkgCredentialsNamesA = PSecPkgCredentials_NamesA;
+
+ {$IFDEF UNICODE}
+ SecPkgCredentials_Names = SecPkgCredentials_NamesW;
+ {$EXTERNALSYM SecPkgCredentials_Names}
+ PSecPkgCredentials_Names = PSecPkgCredentials_NamesW;
+ {$EXTERNALSYM PSecPkgCredentials_Names}
+ TSecPkgCredentialsNames = TSecPkgCredentialsNamesW;
+ PSecPkgCredentialsNames = PSecPkgCredentialsNamesW;
+ {$ELSE}
+ SecPkgCredentials_Names = SecPkgCredentials_NamesA;
+ {$EXTERNALSYM SecPkgCredentials_Names}
+ PSecPkgCredentials_Names = PSecPkgCredentials_NamesA;
+ {$EXTERNALSYM PSecPkgCredentials_Names}
+ TSecPkgCredentialsNames = TSecPkgCredentialsNamesA;
+ PSecPkgCredentialsNames = PSecPkgCredentialsNamesA;
+ {$ENDIF UNICODE}
+
+//
+// Security Context Attributes:
+//
+
+const
+ SECPKG_ATTR_SIZES = 0;
+ {$EXTERNALSYM SECPKG_ATTR_SIZES}
+ SECPKG_ATTR_NAMES = 1;
+ {$EXTERNALSYM SECPKG_ATTR_NAMES}
+ SECPKG_ATTR_LIFESPAN = 2;
+ {$EXTERNALSYM SECPKG_ATTR_LIFESPAN}
+ SECPKG_ATTR_DCE_INFO = 3;
+ {$EXTERNALSYM SECPKG_ATTR_DCE_INFO}
+ SECPKG_ATTR_STREAM_SIZES = 4;
+ {$EXTERNALSYM SECPKG_ATTR_STREAM_SIZES}
+ SECPKG_ATTR_KEY_INFO = 5;
+ {$EXTERNALSYM SECPKG_ATTR_KEY_INFO}
+ SECPKG_ATTR_AUTHORITY = 6;
+ {$EXTERNALSYM SECPKG_ATTR_AUTHORITY}
+ SECPKG_ATTR_PROTO_INFO = 7;
+ {$EXTERNALSYM SECPKG_ATTR_PROTO_INFO}
+ SECPKG_ATTR_PASSWORD_EXPIRY = 8;
+ {$EXTERNALSYM SECPKG_ATTR_PASSWORD_EXPIRY}
+ SECPKG_ATTR_SESSION_KEY = 9;
+ {$EXTERNALSYM SECPKG_ATTR_SESSION_KEY}
+ SECPKG_ATTR_PACKAGE_INFO = 10;
+ {$EXTERNALSYM SECPKG_ATTR_PACKAGE_INFO}
+ SECPKG_ATTR_USER_FLAGS = 11;
+ {$EXTERNALSYM SECPKG_ATTR_USER_FLAGS}
+ SECPKG_ATTR_NEGOTIATION_INFO = 12;
+ {$EXTERNALSYM SECPKG_ATTR_NEGOTIATION_INFO}
+ SECPKG_ATTR_NATIVE_NAMES = 13;
+ {$EXTERNALSYM SECPKG_ATTR_NATIVE_NAMES}
+ SECPKG_ATTR_FLAGS = 14;
+ {$EXTERNALSYM SECPKG_ATTR_FLAGS}
+ SECPKG_ATTR_USE_VALIDATED = 15;
+ {$EXTERNALSYM SECPKG_ATTR_USE_VALIDATED}
+ SECPKG_ATTR_CREDENTIAL_NAME = 16;
+ {$EXTERNALSYM SECPKG_ATTR_CREDENTIAL_NAME}
+ SECPKG_ATTR_TARGET_INFORMATION = 17;
+ {$EXTERNALSYM SECPKG_ATTR_TARGET_INFORMATION}
+ SECPKG_ATTR_ACCESS_TOKEN = 18;
+ {$EXTERNALSYM SECPKG_ATTR_ACCESS_TOKEN}
+ SECPKG_ATTR_TARGET = 19;
+ {$EXTERNALSYM SECPKG_ATTR_TARGET}
+ SECPKG_ATTR_AUTHENTICATION_ID = 20;
+ {$EXTERNALSYM SECPKG_ATTR_AUTHENTICATION_ID}
+
+type
+ PSecPkgContext_Sizes = ^SecPkgContext_Sizes;
+ {$EXTERNALSYM PSecPkgContext_Sizes}
+ _SecPkgContext_Sizes = record
+ cbMaxToken: Cardinal;
+ cbMaxSignature: Cardinal;
+ cbBlockSize: Cardinal;
+ cbSecurityTrailer: Cardinal;
+ end;
+ {$EXTERNALSYM _SecPkgContext_Sizes}
+ SecPkgContext_Sizes = _SecPkgContext_Sizes;
+ {$EXTERNALSYM SecPkgContext_Sizes}
+ TSecPkgContextSizes = SecPkgContext_Sizes;
+ PSecPkgContextSizes = PSecPkgContext_Sizes;
+
+ PSecPkgContext_StreamSizes = ^SecPkgContext_StreamSizes;
+ {$EXTERNALSYM PSecPkgContext_StreamSizes}
+ _SecPkgContext_StreamSizes = record
+ cbHeader: Cardinal;
+ cbTrailer: Cardinal;
+ cbMaximumMessage: Cardinal;
+ cBuffers: Cardinal;
+ cbBlockSize: Cardinal;
+ end;
+ {$EXTERNALSYM _SecPkgContext_StreamSizes}
+ SecPkgContext_StreamSizes = _SecPkgContext_StreamSizes;
+ {$EXTERNALSYM SecPkgContext_StreamSizes}
+ TSecPkgContextStreamSizes = SecPkgContext_StreamSizes;
+ PSecPkgContextStreamSizes = PSecPkgContext_StreamSizes;
+
+ PSecPkgContext_NamesW = ^SecPkgContext_NamesW;
+ {$EXTERNALSYM PSecPkgContext_NamesW}
+ _SecPkgContext_NamesW = record
+ sUserName: PSecWChar;
+ end;
+ {$EXTERNALSYM _SecPkgContext_NamesW}
+ SecPkgContext_NamesW = _SecPkgContext_NamesW;
+ {$EXTERNALSYM SecPkgContext_NamesW}
+ TSecPkgContextNamesW = SecPkgContext_NamesW;
+ PSecPkgContextNamesW = PSecPkgContext_NamesW;
+
+ PSecPkgContext_NamesA = ^SecPkgContext_NamesA;
+ {$EXTERNALSYM PSecPkgContext_NamesA}
+ _SecPkgContext_NamesA = record
+ sUserName: PSecChar;
+ end;
+ {$EXTERNALSYM _SecPkgContext_NamesA}
+ SecPkgContext_NamesA = _SecPkgContext_NamesA;
+ {$EXTERNALSYM SecPkgContext_NamesA}
+ TSecPkgContextNamesA = SecPkgContext_NamesA;
+ PSecPkgContextNamesA = PSecPkgContext_NamesA;
+
+ {$IFDEF UNICODE}
+ SecPkgContext_Names = SecPkgContext_NamesW;
+ {$EXTERNALSYM SecPkgContext_Names}
+ PSecPkgContext_Names = PSecPkgContext_NamesW;
+ {$EXTERNALSYM PSecPkgContext_Names}
+ TSecPkgContextNames = TSecPkgContextNamesW;
+ PSecPkgContextNames = PSecPkgContextNamesW;
+ {$ELSE}
+ SecPkgContext_Names = SecPkgContext_NamesA;
+ {$EXTERNALSYM SecPkgContext_Names}
+ PSecPkgContext_Names = PSecPkgContext_NamesA;
+ {$EXTERNALSYM PSecPkgContext_Names}
+ TSecPkgContextNames = TSecPkgContextNamesA;
+ PSecPkgContextNames = PSecPkgContextNamesA;
+ {$ENDIF UNICODE}
+
+ PSecPkgContext_LifeSpan = ^SecPkgContext_LifeSpan;
+ {$EXTERNALSYM PSecPkgContext_LifeSpan}
+ _SecPkgContext_Lifespan = record
+ tsStart: TimeStamp;
+ tsExpiry: TimeStamp;
+ end;
+ {$EXTERNALSYM _SecPkgContext_Lifespan}
+ SecPkgContext_Lifespan = _SecPkgContext_Lifespan;
+ {$EXTERNALSYM SecPkgContext_Lifespan}
+ TSecPkgContextLifeSpan = SecPkgContext_Lifespan;
+ PSecPkgContextLifeSpan = PSecPkgContext_LifeSpan;
+
+ PSecPkgContext_DceInfo = ^SecPkgContext_DceInfo;
+ {$EXTERNALSYM PSecPkgContext_DceInfo}
+ _SecPkgContext_DceInfo = record
+ AuthzSvc: Cardinal;
+ pPac: Pointer;
+ end;
+ {$EXTERNALSYM _SecPkgContext_DceInfo}
+ SecPkgContext_DceInfo = _SecPkgContext_DceInfo;
+ {$EXTERNALSYM SecPkgContext_DceInfo}
+ TSecPkgContextDceInfo = SecPkgContext_DceInfo;
+ PSecPkgContextDceInfo = PSecPkgContext_DceInfo;
+
+ PSecPkgContext_KeyInfoA = ^SecPkgContext_KeyInfoA;
+ {$EXTERNALSYM PSecPkgContext_KeyInfoA}
+ _SecPkgContext_KeyInfoA = record
+ sSignatureAlgorithmName: PSecChar;
+ sEncryptAlgorithmName: PSecChar;
+ KeySize: Cardinal;
+ SignatureAlgorithm: Cardinal;
+ EncryptAlgorithm: Cardinal;
+ end;
+ {$EXTERNALSYM _SecPkgContext_KeyInfoA}
+ SecPkgContext_KeyInfoA = _SecPkgContext_KeyInfoA;
+ {$EXTERNALSYM SecPkgContext_KeyInfoA}
+ TSecPkgContextKeyInfoA = SecPkgContext_KeyInfoA;
+ PSecPkgContextKeyInfoA = PSecPkgContext_KeyInfoA;
+
+ PSecPkgContext_KeyInfoW = ^SecPkgContext_KeyInfoW;
+ {$EXTERNALSYM PSecPkgContext_KeyInfoW}
+ _SecPkgContext_KeyInfoW = record
+ sSignatureAlgorithmName: PSecWChar;
+ sEncryptAlgorithmName: PSecWChar;
+ KeySize: Cardinal;
+ SignatureAlgorithm: Cardinal;
+ EncryptAlgorithm: Cardinal;
+ end;
+ {$EXTERNALSYM _SecPkgContext_KeyInfoW}
+ SecPkgContext_KeyInfoW = _SecPkgContext_KeyInfoW;
+ {$EXTERNALSYM SecPkgContext_KeyInfoW}
+ TSecPkgContextKeyInfoW = SecPkgContext_KeyInfoW;
+ PSecPkgContextKeyInfoW = PSecPkgContext_KeyInfoW;
+
+ {$IFDEF UNICODE}
+ SecPkgContext_KeyInfo = SecPkgContext_KeyInfoW;
+ {$EXTERNALSYM SecPkgContext_KeyInfo}
+ PSecPkgContext_KeyInfo = PSecPkgContext_KeyInfoW;
+ {$EXTERNALSYM PSecPkgContext_KeyInfo}
+ TSecPkgContextKeyInfo = TSecPkgContextKeyInfoW;
+ PSecPkgContextKeyInfo = PSecPkgContextKeyInfoW;
+ {$ELSE}
+ SecPkgContext_KeyInfo = SecPkgContext_KeyInfoA;
+ {$EXTERNALSYM SecPkgContext_KeyInfo}
+ PSecPkgContext_KeyInfo = PSecPkgContext_KeyInfoA;
+ {$EXTERNALSYM PSecPkgContext_KeyInfo}
+ TSecPkgContextKeyInfo = TSecPkgContextKeyInfoA;
+ PSecPkgContextKeyInfo = PSecPkgContextKeyInfoA;
+ {$ENDIF UNICODE}
+
+ PSecPkgContext_AuthorityA = ^SecPkgContext_AuthorityA;
+ {$EXTERNALSYM PSecPkgContext_AuthorityA}
+ _SecPkgContext_AuthorityA = record
+ sAuthorityName: PSecChar;
+ end;
+ {$EXTERNALSYM _SecPkgContext_AuthorityA}
+ SecPkgContext_AuthorityA = _SecPkgContext_AuthorityA;
+ {$EXTERNALSYM SecPkgContext_AuthorityA}
+ TSecPkgContextAuthorityA = SecPkgContext_AuthorityA;
+ PSecPkgContextAuthorityA = PSecPkgContext_AuthorityA;
+
+ PSecPkgContext_AuthorityW = ^SecPkgContext_AuthorityW;
+ {$EXTERNALSYM PSecPkgContext_AuthorityW}
+ _SecPkgContext_AuthorityW = record
+ sAuthorityName: PSecWChar;
+ end;
+ {$EXTERNALSYM _SecPkgContext_AuthorityW}
+ SecPkgContext_AuthorityW = _SecPkgContext_AuthorityW;
+ {$EXTERNALSYM SecPkgContext_AuthorityW}
+ TSecPkgContextAuthorityW = SecPkgContext_AuthorityW;
+ PSecPkgContextAuthorityW = PSecPkgContext_AuthorityW;
+
+ {$IFDEF UNICODE}
+ SecPkgContext_Authority = SecPkgContext_AuthorityW;
+ {$EXTERNALSYM SecPkgContext_Authority}
+ PSecPkgContext_Authority = PSecPkgContext_AuthorityW;
+ {$EXTERNALSYM PSecPkgContext_Authority}
+ TSecPkgContextAuthority = TSecPkgContextAuthorityW;
+ PSecPkgContextAuthority = PSecPkgContextAuthorityW;
+ {$ELSE}
+ SecPkgContext_Authority = SecPkgContext_AuthorityA;
+ {$EXTERNALSYM SecPkgContext_Authority}
+ PSecPkgContext_Authority = PSecPkgContext_AuthorityA;
+ {$EXTERNALSYM PSecPkgContext_Authority}
+ TSecPkgContextAuthority = SecPkgContext_AuthorityA;
+ PSecPkgContextAuthority = PSecPkgContext_AuthorityA;
+ {$ENDIF UNICODE}
+
+ PSecPkgContext_ProtoInfoA = ^SecPkgContext_ProtoInfoA;
+ {$EXTERNALSYM PSecPkgContext_ProtoInfoA}
+ _SecPkgContext_ProtoInfoA = record
+ sProtocolName: PSecChar;
+ majorVersion: Cardinal;
+ minorVersion: Cardinal;
+ end;
+ {$EXTERNALSYM _SecPkgContext_ProtoInfoA}
+ SecPkgContext_ProtoInfoA = _SecPkgContext_ProtoInfoA;
+ {$EXTERNALSYM SecPkgContext_ProtoInfoA}
+ TSecPkgContextProtoInfoA = SecPkgContext_ProtoInfoA;
+ PSecPkgContextProtoInfoA = PSecPkgContext_ProtoInfoA;
+
+ PSecPkgContext_ProtoInfoW = ^SecPkgContext_ProtoInfoW;
+ {$EXTERNALSYM PSecPkgContext_ProtoInfoW}
+ _SecPkgContext_ProtoInfoW = record
+ sProtocolName: PSecWChar;
+ majorVersion: Cardinal;
+ minorVersion: Cardinal;
+ end;
+ {$EXTERNALSYM _SecPkgContext_ProtoInfoW}
+ SecPkgContext_ProtoInfoW = _SecPkgContext_ProtoInfoW;
+ {$EXTERNALSYM SecPkgContext_ProtoInfoW}
+ TSecPkgContextProtoInfoW = SecPkgContext_ProtoInfoW;
+ PSecPkgContextProtoInfoW = PSecPkgContext_ProtoInfoW;
+
+ {$IFDEF UNICODE}
+ SecPkgContext_ProtoInfo = SecPkgContext_ProtoInfoW;
+ {$EXTERNALSYM SecPkgContext_ProtoInfo}
+ PSecPkgContext_ProtoInfo = PSecPkgContext_ProtoInfoW;
+ {$EXTERNALSYM PSecPkgContext_ProtoInfo}
+ TSecPkgContextProtoInfo = TSecPkgContextProtoInfoW;
+ PSecPkgContextProtoInfo = PSecPkgContextProtoInfoW;
+ {$ELSE}
+ SecPkgContext_ProtoInfo = SecPkgContext_ProtoInfoA;
+ {$EXTERNALSYM SecPkgContext_ProtoInfo}
+ PSecPkgContext_ProtoInfo = PSecPkgContext_ProtoInfoA;
+ {$EXTERNALSYM PSecPkgContext_ProtoInfo}
+ TSecPkgContextProtoInfo = TSecPkgContextProtoInfoA;
+ PSecPkgContextProtoInfo = PSecPkgContextProtoInfoA;
+ {$ENDIF UNICODE}
+
+ PSecPkgContext_PasswordExpiry = ^SecPkgContext_PasswordExpiry;
+ {$EXTERNALSYM PSecPkgContext_PasswordExpiry}
+ _SecPkgContext_PasswordExpiry = record
+ tsPasswordExpires: TimeStamp;
+ end;
+ {$EXTERNALSYM _SecPkgContext_PasswordExpiry}
+ SecPkgContext_PasswordExpiry = _SecPkgContext_PasswordExpiry;
+ {$EXTERNALSYM SecPkgContext_PasswordExpiry}
+ TSecPkgContextPasswordExpiry = SecPkgContext_PasswordExpiry;
+ PSecPkgContextPasswordExpiry = PSecPkgContext_PasswordExpiry;
+
+ PSecPkgContext_SessionKey = ^SecPkgContext_SessionKey;
+ {$EXTERNALSYM PSecPkgContext_SessionKey}
+ _SecPkgContext_SessionKey = record
+ SessionKeyLength: Cardinal;
+ SessionKey: PByte;
+ end;
+ {$EXTERNALSYM _SecPkgContext_SessionKey}
+ SecPkgContext_SessionKey = _SecPkgContext_SessionKey;
+ {$EXTERNALSYM SecPkgContext_SessionKey}
+ TSecPkgContextSessionKey = SecPkgContext_SessionKey;
+ PSecPkgContextSessionKey = PSecPkgContext_SessionKey;
+
+ PSecPkgContext_PackageInfoW = ^SecPkgContext_PackageInfoW;
+ {$EXTERNALSYM PSecPkgContext_PackageInfoW}
+ _SecPkgContext_PackageInfoW = record
+ PackageInfo: PSecPkgInfoW;
+ end;
+ {$EXTERNALSYM _SecPkgContext_PackageInfoW}
+ SecPkgContext_PackageInfoW = _SecPkgContext_PackageInfoW;
+ {$EXTERNALSYM SecPkgContext_PackageInfoW}
+ TSecPkgContextPackageInfoW = SecPkgContext_PackageInfoW;
+ PSecPkgContextPackageInfoW = PSecPkgContext_PackageInfoW;
+
+ PSecPkgContext_PackageInfoA = ^SecPkgContext_PackageInfoA;
+ {$EXTERNALSYM PSecPkgContext_PackageInfoA}
+ _SecPkgContext_PackageInfoA = record
+ PackageInfo: PSecPkgInfoA;
+ end;
+ {$EXTERNALSYM _SecPkgContext_PackageInfoA}
+ SecPkgContext_PackageInfoA = _SecPkgContext_PackageInfoA;
+ {$EXTERNALSYM SecPkgContext_PackageInfoA}
+ TSecPkgContextPackageInfoA = SecPkgContext_PackageInfoA;
+ PSecPkgContextPackageInfoA = PSecPkgContext_PackageInfoA;
+
+ PSecPkgContext_UserFlags = ^SecPkgContext_UserFlags;
+ {$EXTERNALSYM PSecPkgContext_UserFlags}
+ _SecPkgContext_UserFlags = record
+ UserFlags: Cardinal;
+ end;
+ {$EXTERNALSYM _SecPkgContext_UserFlags}
+ SecPkgContext_UserFlags = _SecPkgContext_UserFlags;
+ {$EXTERNALSYM SecPkgContext_UserFlags}
+ TSecPkgContextUserFlags = SecPkgContext_UserFlags;
+ PSecPkgContextUserFlags = PSecPkgContext_UserFlags;
+
+ PSecPkgContext_Flags = ^SecPkgContext_Flags;
+ {$EXTERNALSYM PSecPkgContext_Flags}
+ _SecPkgContext_Flags = record
+ Flags: Cardinal;
+ end;
+ {$EXTERNALSYM _SecPkgContext_Flags}
+ SecPkgContext_Flags = _SecPkgContext_Flags;
+ {$EXTERNALSYM SecPkgContext_Flags}
+ TSecPkgContextFlags = SecPkgContext_Flags;
+ PSecPkgContextFlags = PSecPkgContext_Flags;
+
+ {$IFDEF UNICODE}
+ SecPkgContext_PackageInfo = SecPkgContext_PackageInfoW;
+ {$EXTERNALSYM SecPkgContext_PackageInfo}
+ PSecPkgContext_PackageInfo = PSecPkgContext_PackageInfoW;
+ {$EXTERNALSYM PSecPkgContext_PackageInfo}
+ TSecPkgContextPackageInfo = TSecPkgContextPackageInfoW;
+ PSecPkgContextPackageInfo = PSecPkgContextPackageInfoW;
+ {$ELSE}
+ SecPkgContext_PackageInfo = SecPkgContext_PackageInfoA;
+ {$EXTERNALSYM SecPkgContext_PackageInfo}
+ PSecPkgContext_PackageInfo = PSecPkgContext_PackageInfoA;
+ {$EXTERNALSYM PSecPkgContext_PackageInfo}
+ TSecPkgContextPackageInfo = TSecPkgContextPackageInfoA;
+ PSecPkgContextPackageInfo = PSecPkgContextPackageInfoA;
+ {$ENDIF UNICODE}
+
+ PSecPkgContext_NegotiationInfoA = ^SecPkgContext_NegotiationInfoA;
+ {$EXTERNALSYM PSecPkgContext_NegotiationInfoA}
+ _SecPkgContext_NegotiationInfoA = record
+ PackageInfo: PSecPkgInfoA;
+ NegotiationState: Cardinal;
+ end;
+ {$EXTERNALSYM _SecPkgContext_NegotiationInfoA}
+ SecPkgContext_NegotiationInfoA = _SecPkgContext_NegotiationInfoA;
+ {$EXTERNALSYM SecPkgContext_NegotiationInfoA}
+ TSecPkgContextNegotiationInfoA = SecPkgContext_NegotiationInfoA;
+ PSecPkgContextNegotiationInfoA = PSecPkgContext_NegotiationInfoA;
+
+ PSecPkgContext_NegotiationInfoW = ^SecPkgContext_NegotiationInfoW;
+ {$EXTERNALSYM PSecPkgContext_NegotiationInfoW}
+ _SecPkgContext_NegotiationInfoW = record
+ PackageInfo: PSecPkgInfoW;
+ NegotiationState: Cardinal;
+ end;
+ {$EXTERNALSYM _SecPkgContext_NegotiationInfoW}
+ SecPkgContext_NegotiationInfoW = _SecPkgContext_NegotiationInfoW;
+ {$EXTERNALSYM SecPkgContext_NegotiationInfoW}
+ TSecPkgContextNegotiationInfoW = SecPkgContext_NegotiationInfoW;
+ PSecPkgContextNegotiationInfoW = PSecPkgContext_NegotiationInfoW ;
+
+ {$IFDEF UNICODE}
+ SecPkgContext_NegotiationInfo = SecPkgContext_NegotiationInfoW;
+ {$EXTERNALSYM SecPkgContext_NegotiationInfo}
+ PSecPkgContext_NegotiationInfo = PSecPkgContext_NegotiationInfoW;
+ {$EXTERNALSYM PSecPkgContext_NegotiationInfo}
+ TSecPkgContextNegotiationInfo = TSecPkgContextNegotiationInfoW;
+ PSecPkgContextNegotiationInfo = PSecPkgContextNegotiationInfoW;
+ {$ELSE}
+ SecPkgContext_NegotiationInfo = SecPkgContext_NegotiationInfoA;
+ {$EXTERNALSYM SecPkgContext_NegotiationInfo}
+ PSecPkgContext_NegotiationInfo = PSecPkgContext_NegotiationInfoA;
+ {$EXTERNALSYM PSecPkgContext_NegotiationInfo}
+ TSecPkgContextNegotiationInfo = TSecPkgContextNegotiationInfoA;
+ PSecPkgContextNegotiationInfo = PSecPkgContextNegotiationInfoA;
+ {$ENDIF UNICODE}
+
+const
+ SECPKG_NEGOTIATION_COMPLETE = 0;
+ {$EXTERNALSYM SECPKG_NEGOTIATION_COMPLETE}
+ SECPKG_NEGOTIATION_OPTIMISTIC = 1;
+ {$EXTERNALSYM SECPKG_NEGOTIATION_OPTIMISTIC}
+ SECPKG_NEGOTIATION_IN_PROGRESS = 2;
+ {$EXTERNALSYM SECPKG_NEGOTIATION_IN_PROGRESS}
+ SECPKG_NEGOTIATION_DIRECT = 3;
+ {$EXTERNALSYM SECPKG_NEGOTIATION_DIRECT}
+ SECPKG_NEGOTIATION_TRY_MULTICRED = 4;
+ {$EXTERNALSYM SECPKG_NEGOTIATION_TRY_MULTICRED}
+
+type
+ PSecPkgContext_NativeNamesW = ^SecPkgContext_NativeNamesW;
+ {$EXTERNALSYM PSecPkgContext_NativeNamesW}
+ _SecPkgContext_NativeNamesW = record
+ sClientName: PSecWChar;
+ sServerName: PSecWChar;
+ end;
+ {$EXTERNALSYM _SecPkgContext_NativeNamesW}
+ SecPkgContext_NativeNamesW = _SecPkgContext_NativeNamesW;
+ {$EXTERNALSYM SecPkgContext_NativeNamesW}
+ TSecPkgContextNativeNamesW = SecPkgContext_NativeNamesW;
+ PSecPkgContextNativeNamesW = PSecPkgContext_NativeNamesW;
+
+ PSecPkgContext_NativeNamesA = ^SecPkgContext_NativeNamesA;
+ {$EXTERNALSYM PSecPkgContext_NativeNamesA}
+ _SecPkgContext_NativeNamesA = record
+ sClientName: PSecChar;
+ sServerName: PSecChar;
+ end;
+ {$EXTERNALSYM _SecPkgContext_NativeNamesA}
+ SecPkgContext_NativeNamesA = _SecPkgContext_NativeNamesA;
+ {$EXTERNALSYM SecPkgContext_NativeNamesA}
+ TSecPkgContextNativeNamesA = SecPkgContext_NativeNamesA;
+ PSecPkgContextNativeNamesA = PSecPkgContext_NativeNamesA;
+
+ {$IFDEF UNICODE}
+ SecPkgContext_NativeNames = SecPkgContext_NativeNamesW;
+ {$EXTERNALSYM SecPkgContext_NativeNames}
+ PSecPkgContext_NativeNames = PSecPkgContext_NativeNamesW;
+ {$EXTERNALSYM PSecPkgContext_NativeNames}
+ TSecPkgContextNativeNames = TSecPkgContextNativeNamesW;
+ PSecPkgContextNativeNames = PSecPkgContextNativeNamesW;
+ {$ELSE}
+ SecPkgContext_NativeNames = SecPkgContext_NativeNamesA;
+ {$EXTERNALSYM SecPkgContext_NativeNames}
+ PSecPkgContext_NativeNames = PSecPkgContext_NativeNamesA;
+ {$EXTERNALSYM PSecPkgContext_NativeNames}
+ TSecPkgContextNativeNames = TSecPkgContextNativeNamesA;
+ PSecPkgContextNativeNames = PSecPkgContextNativeNamesA;
+ {$ENDIF UNICODE}
+
+ _SecPkgContext_CredentialNameW = record
+ CredentialType: Cardinal;
+ sCredentialName: PSEC_WCHAR;
+ end;
+ {$EXTERNALSYM _SecPkgContext_CredentialNameW}
+ SecPkgContext_CredentialNameW = _SecPkgContext_CredentialNameW;
+ {$EXTERNALSYM SecPkgContext_CredentialNameW}
+ PSecPkgContext_CredentialNameW = ^SecPkgContext_CredentialNameW;
+ {$EXTERNALSYM PSecPkgContext_CredentialNameW}
+ TSecPkgContextCredentialNameW = SecPkgContext_CredentialNameW;
+ PSecPkgContextCredentialNameW = PSecPkgContext_CredentialNameW;
+
+ _SecPkgContext_CredentialNameA = record
+ CredentialType: Cardinal;
+ sCredentialName: PSEC_CHAR;
+ end;
+ {$EXTERNALSYM _SecPkgContext_CredentialNameA}
+ SecPkgContext_CredentialNameA = _SecPkgContext_CredentialNameA;
+ {$EXTERNALSYM SecPkgContext_CredentialNameA}
+ PSecPkgContext_CredentialNameA = ^SecPkgContext_CredentialNameA;
+ {$EXTERNALSYM PSecPkgContext_CredentialNameA}
+ TSecPkgContextCredentialNameA = SecPkgContext_CredentialNameA;
+ PSecPkgContextCredentialNameA = PSecPkgContext_CredentialNameA;
+
+ {$IFDEF UNICODE}
+ SecPkgContext_CredentialName = SecPkgContext_CredentialNameW;
+ {$EXTERNALSYM SecPkgContext_CredentialName}
+ PSecPkgContext_CredentialName = PSecPkgContext_CredentialNameW;
+ {$EXTERNALSYM PSecPkgContext_CredentialName}
+ TSecPkgContextCredentialName = TSecPkgContextCredentialNameW;
+ PSecPkgContextCredentialName = PSecPkgContextCredentialNameW;
+ {$ELSE}
+ SecPkgContext_CredentialName = SecPkgContext_CredentialNameA;
+ {$EXTERNALSYM SecPkgContext_CredentialName}
+ PSecPkgContext_CredentialName = PSecPkgContext_CredentialNameA;
+ {$EXTERNALSYM PSecPkgContext_CredentialName}
+ TSecPkgContextCredentialName = TSecPkgContextCredentialNameA;
+ PSecPkgContextCredentialName = PSecPkgContextCredentialNameA;
+ {$ENDIF UNICODE}
+
+ _SecPkgContext_AccessToken = record
+ AccessToken: Pointer;
+ end;
+ {$EXTERNALSYM _SecPkgContext_AccessToken}
+ SecPkgContext_AccessToken = _SecPkgContext_AccessToken;
+ {$EXTERNALSYM SecPkgContext_AccessToken}
+ PSecPkgContext_AccessToken = ^SecPkgContext_AccessToken;
+ {$EXTERNALSYM PSecPkgContext_AccessToken}
+ TSecPkgContextAccessToken = SecPkgContext_AccessToken;
+ PSecPkgContextAccessToken = PSecPkgContext_AccessToken;
+
+ _SecPkgContext_TargetInformation = record
+ MarshalledTargetInfoLength: Cardinal;
+ MarshalledTargetInfo: PWideChar;
+ end;
+ {$EXTERNALSYM _SecPkgContext_TargetInformation}
+ SecPkgContext_TargetInformation = _SecPkgContext_TargetInformation;
+ {$EXTERNALSYM SecPkgContext_TargetInformation}
+ PSecPkgContext_TargetInformation = ^SecPkgContext_TargetInformation;
+ {$EXTERNALSYM PSecPkgContext_TargetInformation}
+ TSecPkgContextTargetInformation = SecPkgContext_TargetInformation;
+ PSecPkgContextTargetInformation = PSecPkgContext_TargetInformation;
+
+ _SecPkgContext_AuthzID = record
+ AuthzIDLength: Cardinal;
+ AuthzID: PChar;
+ end;
+ {$EXTERNALSYM _SecPkgContext_AuthzID}
+ SecPkgContext_AuthzID = _SecPkgContext_AuthzID;
+ {$EXTERNALSYM SecPkgContext_AuthzID}
+ PSecPkgContext_AuthzID = ^SecPkgContext_AuthzID;
+ {$EXTERNALSYM PSecPkgContext_AuthzID}
+ TSecPkgContextAuthzID = SecPkgContext_AuthzID;
+ PSecPkgContextAuthzID = PSecPkgContext_AuthzID;
+
+ _SecPkgContext_Target = record
+ TargetLength: Cardinal;
+ Target: PChar;
+ end;
+ {$EXTERNALSYM _SecPkgContext_Target}
+ SecPkgContext_Target = _SecPkgContext_Target;
+ {$EXTERNALSYM SecPkgContext_Target}
+ PSecPkgContext_Target = ^SecPkgContext_Target;
+ {$EXTERNALSYM PSecPkgContext_Target}
+ TSecPkgContextTarget = SecPkgContext_Target;
+ PSecPkgContextTarget = PSecPkgContext_Target;
+
+ SEC_GET_KEY_FN = procedure(
+ Arg: Pointer; // Argument passed in
+ Principal: Pointer; // Principal ID
+ KeyVer: Cardinal; // Key Version
+ var Key: Pointer; // Returned ptr to key
+ var Status: SECURITY_STATUS); stdcall; // returned status
+ {$EXTERNALSYM SEC_GET_KEY_FN}
+ TSecGetKeyFn = SEC_GET_KEY_FN;
+
+//
+// Flags for ExportSecurityContext
+//
+
+const
+ SECPKG_CONTEXT_EXPORT_RESET_NEW = $00000001; // New context is reset to initial state
+ {$EXTERNALSYM SECPKG_CONTEXT_EXPORT_RESET_NEW}
+ SECPKG_CONTEXT_EXPORT_DELETE_OLD = $00000002; // Old context is deleted during export
+ {$EXTERNALSYM SECPKG_CONTEXT_EXPORT_DELETE_OLD}
+
+function AcquireCredentialsHandleW(pszPrincipal, pszPackage: PSecWChar;
+ fCredentialUse: Cardinal; pvLogonId, pAuthData: Pointer;
+ pGetKeyFn: SEC_GET_KEY_FN; pvGetKeyArgument: Pointer; phCredential: PCredHandle;
+ var ptsExpiry: TTimeStamp): SECURITY_STATUS; stdcall;
+{$EXTERNALSYM AcquireCredentialsHandleW}
+
+type
+ ACQUIRE_CREDENTIALS_HANDLE_FN_W = function(
+ pszPrincipal: PSecWChar;
+ pszPackage: PSecWChar;
+ fCredentialsUse: Cardinal;
+ pvLogonId: Pointer;
+ pAuthData: Pointer;
+ pGetKeyFn: SEC_GET_KEY_FN;
+ pvGetKeyArgument: Pointer;
+ phCredential: PCredHandle;
+ ptsExpiry: PTimeStamp): SECURITY_STATUS; stdcall;
+ {$EXTERNALSYM ACQUIRE_CREDENTIALS_HANDLE_FN_W}
+ TAcquireCredentialsHandleFnW = ACQUIRE_CREDENTIALS_HANDLE_FN_W;
+
+function AcquireCredentialsHandleA(pszPrincipal, pszPackage: PSecChar;
+ fCredentialUse: Cardinal; pvLogonId, pAuthData: Pointer;
+ pGetKeyFn: SEC_GET_KEY_FN; pvGetKeyArgument: Pointer; phCredential: PCredHandle;
+ var ptsExpiry: TTimeStamp): SECURITY_STATUS; stdcall;
+{$EXTERNALSYM AcquireCredentialsHandleA}
+
+type
+ ACQUIRE_CREDENTIALS_HANDLE_FN_A = function(
+ pszPrincipal: PSecChar;
+ pszPackage: PSecChar;
+ fCredentialsUse: Cardinal;
+ pvLogonId: Pointer;
+ pAuthData: Pointer;
+ pGetKeyFn: SEC_GET_KEY_FN;
+ pvGetKeyArgument: Pointer;
+ phCredential: PCredHandle;
+ ptsExpiry: PTimeStamp): SECURITY_STATUS; stdcall;
+ {$EXTERNALSYM ACQUIRE_CREDENTIALS_HANDLE_FN_A}
+ TAcquireCredentialsHandleFnA = ACQUIRE_CREDENTIALS_HANDLE_FN_A;
+
+{$IFDEF UNICODE}
+function AcquireCredentialsHandle(pszPrincipal, pszPackage: PSecWChar;
+ fCredentialUse: Cardinal; pvLogonId, pAuthData: Pointer;
+ pGetKeyFn: SEC_GET_KEY_FN; pvGetKeyArgument: Pointer; phCredential: PCredHandle;
+ var ptsExpiry: TTimeStamp): SECURITY_STATUS; stdcall;
+{$EXTERNALSYM AcquireCredentialsHandle}
+type
+ ACQUIRE_CREDENTIALS_HANDLE_FN = ACQUIRE_CREDENTIALS_HANDLE_FN_W;
+ {$EXTERNALSYM ACQUIRE_CREDENTIALS_HANDLE_FN}
+ TAcquireCredentialsHandleFn = TAcquireCredentialsHandleFnW;
+{$ELSE}
+function AcquireCredentialsHandle(pszPrincipal, pszPackage: PSecChar;
+ fCredentialUse: Cardinal; pvLogonId, pAuthData: Pointer;
+ pGetKeyFn: SEC_GET_KEY_FN; pvGetKeyArgument: Pointer; phCredential: PCredHandle;
+ var ptsExpiry: TTimeStamp): SECURITY_STATUS; stdcall;
+{$EXTERNALSYM AcquireCredentialsHandle}
+type
+ ACQUIRE_CREDENTIALS_HANDLE_FN = ACQUIRE_CREDENTIALS_HANDLE_FN_A;
+ {$EXTERNALSYM ACQUIRE_CREDENTIALS_HANDLE_FN}
+ TAcquireCredentialsHandleFn = TAcquireCredentialsHandleFnA;
+{$ENDIF UNICODE}
+
+function FreeCredentialsHandle(phCredential: PCredHandle): SECURITY_STATUS; stdcall;
+{$EXTERNALSYM FreeCredentialsHandle}
+
+type
+ FREE_CREDENTIALS_HANDLE_FN = function(phCredential: PCredHandle): SECURITY_STATUS; stdcall;
+ {$EXTERNALSYM FREE_CREDENTIALS_HANDLE_FN}
+
+function AddCredentialsW(hCredentials: PCredHandle; pszPrincipal: PSecWChar;
+ pszPackage: PSecWChar; fCredentialUse: Cardinal; pAuthData: Pointer;
+ pGetKeyFn: SEC_GET_KEY_FN; pvGetKeyArgument: Pointer;
+ ptsExpiry: PTimeStamp): SECURITY_STATUS; stdcall;
+{$EXTERNALSYM AddCredentialsW}
+
+type
+ ADD_CREDENTIALS_FN_W = function(hCredentials: PCredHandle; pszPrincipal: PSecWChar;
+ pszPackage: PSecWChar; fCredentialUse: Cardinal; pAuthData: Pointer;
+ pGetKeyFn: SEC_GET_KEY_FN; pvGetKeyArgument: Pointer;
+ ptsExpiry: PTimeStamp): SECURITY_STATUS; stdcall;
+ {$EXTERNALSYM ADD_CREDENTIALS_FN_W}
+
+function AddCredentialsA(hCredentials: PCredHandle; pszPrincipal: PSecChar;
+ pszPackage: PSecChar; fCredentialUse: Cardinal; pAuthData: Pointer;
+ pGetKeyFn: SEC_GET_KEY_FN; pvGetKeyArgument: Pointer; ptsExpiry: PTimeStamp): SECURITY_STATUS; stdcall;
+{$EXTERNALSYM AddCredentialsA}
+
+type
+ ADD_CREDENTIALS_FN_A = function(hCredentials: PCredHandle; pszPrincipal: PSecChar;
+ pszPackage: PSecChar; fCredentialUse: Cardinal; pAuthData: Pointer;
+ pGetKeyFn: SEC_GET_KEY_FN; pvGetKeyArgument: Pointer; ptsExpiry: PTimeStamp): SECURITY_STATUS; stdcall;
+ {$EXTERNALSYM ADD_CREDENTIALS_FN_A}
+
+{$IFDEF UNICODE}
+function AddCredentials(hCredentials: PCredHandle; pszPrincipal: PSecWChar;
+ pszPackage: PSecWChar; fCredentialUse: Cardinal; pAuthData: Pointer;
+ pGetKeyFn: SEC_GET_KEY_FN; pvGetKeyArgument: Pointer;
+ ptsExpiry: PTimeStamp): SECURITY_STATUS; stdcall;
+{$EXTERNALSYM AddCredentials}
+
+type
+ ADD_CREDENTIALS_FN = function(hCredentials: PCredHandle; pszPrincipal: PSecWChar;
+ pszPackage: PSecWChar; fCredentialUse: Cardinal; pAuthData: Pointer;
+ pGetKeyFn: SEC_GET_KEY_FN; pvGetKeyArgument: Pointer;
+ ptsExpiry: PTimeStamp): SECURITY_STATUS; stdcall;
+ {$EXTERNALSYM ADD_CREDENTIALS_FN}
+{$ELSE}
+function AddCredentials(hCredentials: PCredHandle; pszPrincipal: PSecChar;
+ pszPackage: PSecChar; fCredentialUse: Cardinal; pAuthData: Pointer;
+ pGetKeyFn: SEC_GET_KEY_FN; pvGetKeyArgument: Pointer; ptsExpiry: PTimeStamp): SECURITY_STATUS; stdcall;
+{$EXTERNALSYM AddCredentials}
+
+type
+ ADD_CREDENTIALS_FN = function(hCredentials: PCredHandle; pszPrincipal: PSecChar;
+ pszPackage: PSecChar; fCredentialUse: Cardinal; pAuthData: Pointer;
+ pGetKeyFn: SEC_GET_KEY_FN; pvGetKeyArgument: Pointer; ptsExpiry: PTimeStamp): SECURITY_STATUS; stdcall;
+ {$EXTERNALSYM ADD_CREDENTIALS_FN}
+{$ENDIF UNICODE}
+
+////////////////////////////////////////////////////////////////////////
+///
+/// Context Management Functions
+///
+////////////////////////////////////////////////////////////////////////
+
+function InitializeSecurityContextW(phCredential: PCredHandle; phContext: PCtxtHandle;
+ pszTargetName: PSecWChar; fContextReq, Reserved1, TargetDataRep: Cardinal;
+ pInput: PSecBufferDesc; Reserved2: Cardinal; phNewContext: PCtxtHandle;
+ pOutput: PSecBufferDesc; var pfContextAttr: Cardinal; ptsExpiry: PTimeStamp): SECURITY_STATUS; stdcall;
+{$EXTERNALSYM InitializeSecurityContextW}
+
+type
+ INITIALIZE_SECURITY_CONTEXT_FN_W = function(phCredential: PCredHandle; phContext: PCtxtHandle;
+ pszTargetName: PSecWChar; fContextReq, Reserved1, TargetDataRep: Cardinal;
+ pInput: PSecBufferDesc; Reserved2: Cardinal; phNewContext: PCtxtHandle;
+ pOutput: PSecBufferDesc; var pfContextAttr: Cardinal; ptsExpiry: PTimeStamp): SECURITY_STATUS; stdcall;
+ {$EXTERNALSYM INITIALIZE_SECURITY_CONTEXT_FN_W}
+
+function InitializeSecurityContextA(phCredential: PCredHandle; phContext: PCtxtHandle;
+ pszTargetName: PSecChar; fContextReq, Reserved1, TargetDataRep: Cardinal;
+ pInput: PSecBufferDesc; Reserved2: Cardinal; phNewContext: PCtxtHandle;
+ pOutput: PSecBufferDesc; var pfContextAttr: Cardinal; ptsExpiry: PTimeStamp): SECURITY_STATUS; stdcall;
+{$EXTERNALSYM InitializeSecurityContextA}
+
+type
+ INITIALIZE_SECURITY_CONTEXT_FN_A = function(phCredential: PCredHandle; phContext: PCtxtHandle;
+ pszTargetName: PSecChar; fContextReq, Reserved1, TargetDataRep: Cardinal;
+ pInput: PSecBufferDesc; Reserved2: Cardinal; phNewContext: PCtxtHandle;
+ pOutput: PSecBufferDesc; var pfContextAttr: Cardinal; ptsExpiry: PTimeStamp): SECURITY_STATUS; stdcall;
+ {$EXTERNALSYM INITIALIZE_SECURITY_CONTEXT_FN_A}
+
+{$IFDEF UNICODE}
+function InitializeSecurityContext(phCredential: PCredHandle; phContext: PCtxtHandle;
+ pszTargetName: PSecWChar; fContextReq, Reserved1, TargetDataRep: Cardinal;
+ pInput: PSecBufferDesc; Reserved2: Cardinal; phNewContext: PCtxtHandle;
+ pOutput: PSecBufferDesc; var pfContextAttr: Cardinal; ptsExpiry: PTimeStamp): SECURITY_STATUS; stdcall;
+{$EXTERNALSYM InitializeSecurityContext}
+
+type
+ INITIALIZE_SECURITY_CONTEXT_FN = function(phCredential: PCredHandle; phContext: PCtxtHandle;
+ pszTargetName: PSecWChar; fContextReq, Reserved1, TargetDataRep: Cardinal;
+ pInput: PSecBufferDesc; Reserved2: Cardinal; phNewContext: PCtxtHandle;
+ pOutput: PSecBufferDesc; var pfContextAttr: Cardinal; ptsExpiry: PTimeStamp): SECURITY_STATUS; stdcall;
+ {$EXTERNALSYM INITIALIZE_SECURITY_CONTEXT_FN}
+{$ELSE}
+function InitializeSecurityContext(phCredential: PCredHandle; phContext: PCtxtHandle;
+ pszTargetName: PSecChar; fContextReq, Reserved1, TargetDataRep: Cardinal;
+ pInput: PSecBufferDesc; Reserved2: Cardinal; phNewContext: PCtxtHandle;
+ pOutput: PSecBufferDesc; var pfContextAttr: Cardinal; ptsExpiry: PTimeStamp): SECURITY_STATUS; stdcall;
+{$EXTERNALSYM InitializeSecurityContext}
+
+type
+ INITIALIZE_SECURITY_CONTEXT_FN = function(phCredential: PCredHandle; phContext: PCtxtHandle;
+ pszTargetName: PSecChar; fContextReq, Reserved1, TargetDataRep: Cardinal;
+ pInput: PSecBufferDesc; Reserved2: Cardinal; phNewContext: PCtxtHandle;
+ pOutput: PSecBufferDesc; var pfContextAttr: Cardinal; ptsExpiry: PTimeStamp): SECURITY_STATUS; stdcall;
+ {$EXTERNALSYM INITIALIZE_SECURITY_CONTEXT_FN}
+{$ENDIF UNICODE}
+
+function AcceptSecurityContext(phCredential: PCredHandle; phContext: PCtxtHandle;
+ pInput: PSecBufferDesc; fContextReq, TargetDataRep: Cardinal;
+ phNewContext: PCtxtHandle; pOutput: PSecBufferDesc; var pfContextAttr: Cardinal;
+ ptsExpiry: PTimeStamp): SECURITY_STATUS; stdcall;
+{$EXTERNALSYM AcceptSecurityContext}
+
+type
+ ACCEPT_SECURITY_CONTEXT_FN = function(phCredential: PCredHandle; phContext: PCtxtHandle;
+ pInput: PSecBufferDesc; fContextReq, TargetDataRep: Cardinal;
+ phNewContext: PCtxtHandle; pOutput: PSecBufferDesc; var pfContextAttr: Cardinal;
+ ptsExpiry: PTimeStamp): SECURITY_STATUS; stdcall;
+ {$EXTERNALSYM ACCEPT_SECURITY_CONTEXT_FN}
+
+function CompleteAuthToken(phContext: PCtxtHandle; pToken: PSecBufferDesc): SECURITY_STATUS; stdcall;
+{$EXTERNALSYM CompleteAuthToken}
+
+type
+ COMPLETE_AUTH_TOKEN_FN = function(phContext: PCtxtHandle; pToken: PSecBufferDesc): SECURITY_STATUS; stdcall;
+ {$EXTERNALSYM COMPLETE_AUTH_TOKEN_FN}
+
+function ImpersonateSecurityContext(phContext: PCtxtHandle): SECURITY_STATUS; stdcall;
+{$EXTERNALSYM ImpersonateSecurityContext}
+
+type
+ IMPERSONATE_SECURITY_CONTEXT_FN = function(phContext: PCtxtHandle): SECURITY_STATUS; stdcall;
+ {$EXTERNALSYM IMPERSONATE_SECURITY_CONTEXT_FN}
+
+function RevertSecurityContext(phContext: PCtxtHandle): SECURITY_STATUS; stdcall;
+{$EXTERNALSYM RevertSecurityContext}
+
+type
+ REVERT_SECURITY_CONTEXT_FN = function(phContext: PCtxtHandle): SECURITY_STATUS; stdcall;
+ {$EXTERNALSYM REVERT_SECURITY_CONTEXT_FN}
+
+function QuerySecurityContextToken(phContext: PCtxtHandle; var Token: Pointer): SECURITY_STATUS; stdcall;
+{$EXTERNALSYM QuerySecurityContextToken}
+
+type
+ QUERY_SECURITY_CONTEXT_TOKEN_FN = function(phContext: PCtxtHandle;
+ var Token: Pointer): SECURITY_STATUS; stdcall;
+ {$EXTERNALSYM QUERY_SECURITY_CONTEXT_TOKEN_FN}
+
+function DeleteSecurityContext(phContext: PCtxtHandle): SECURITY_STATUS; stdcall;
+{$EXTERNALSYM DeleteSecurityContext}
+
+type
+ DELETE_SECURITY_CONTEXT_FN = function(phContext: PCtxtHandle): SECURITY_STATUS; stdcall;
+ {$EXTERNALSYM DELETE_SECURITY_CONTEXT_FN}
+
+function ApplyControlToken(phContext: PCtxtHandle; pInput: PSecBufferDesc): SECURITY_STATUS; stdcall;
+{$EXTERNALSYM ApplyControlToken}
+
+type
+ APPLY_CONTROL_TOKEN_FN = function(phContext: PCtxtHandle; pInput: PSecBufferDesc): SECURITY_STATUS; stdcall;
+ {$EXTERNALSYM APPLY_CONTROL_TOKEN_FN}
+
+function QueryContextAttributesW(phContext: PCtxtHandle; ulAttribute: Cardinal;
+ pBuffer: Pointer): SECURITY_STATUS; stdcall;
+{$EXTERNALSYM QueryContextAttributesW}
+
+type
+ QUERY_CONTEXT_ATTRIBUTES_FN_W = function(phContext: PCtxtHandle;
+ ulAttribute: Cardinal; pBuffer: Pointer): SECURITY_STATUS; stdcall;
+ {$EXTERNALSYM QUERY_CONTEXT_ATTRIBUTES_FN_W}
+
+function QueryContextAttributesA(phContext: PCtxtHandle; ulAttribute: Cardinal;
+ pBuffer: Pointer): SECURITY_STATUS; stdcall;
+{$EXTERNALSYM QueryContextAttributesA}
+
+type
+ QUERY_CONTEXT_ATTRIBUTES_FN_A = function(phContext: PCtxtHandle;
+ ulAttribute: Cardinal; pBuffer: Pointer): SECURITY_STATUS; stdcall;
+ {$EXTERNALSYM QUERY_CONTEXT_ATTRIBUTES_FN_A}
+
+{$IFDEF UNICODE}
+function QueryContextAttributes(phContext: PCtxtHandle; ulAttribute: Cardinal;
+ pBuffer: Pointer): SECURITY_STATUS; stdcall;
+{$EXTERNALSYM QueryContextAttributes}
+
+type
+ QUERY_CONTEXT_ATTRIBUTES_FN = function(phContext: PCtxtHandle;
+ ulAttribute: Cardinal; pBuffer: Pointer): SECURITY_STATUS; stdcall;
+ {$EXTERNALSYM QUERY_CONTEXT_ATTRIBUTES_FN}
+{$ELSE}
+function QueryContextAttributes(phContext: PCtxtHandle; ulAttribute: Cardinal;
+ pBuffer: Pointer): SECURITY_STATUS; stdcall;
+{$EXTERNALSYM QueryContextAttributes}
+
+type
+ QUERY_CONTEXT_ATTRIBUTES_FN = function(phContext: PCtxtHandle;
+ ulAttribute: Cardinal; pBuffer: Pointer): SECURITY_STATUS; stdcall;
+ {$EXTERNALSYM QUERY_CONTEXT_ATTRIBUTES_FN}
+{$ENDIF UNICODE}
+
+function SetContextAttributesW(phContext: PCtxtHandle; ulAttribute: Cardinal;
+ pBuffer: Pointer; cbBuffer: Cardinal): SECURITY_STATUS; stdcall;
+{$EXTERNALSYM SetContextAttributesW}
+
+type
+ SET_CONTEXT_ATTRIBUTES_FN_W = function(phContext: PCtxtHandle; ulAttribute: Cardinal;
+ pBuffer: Pointer; cbBuffer: Cardinal): SECURITY_STATUS; stdcall;
+ {$EXTERNALSYM SET_CONTEXT_ATTRIBUTES_FN_W}
+
+function SetContextAttributesA(phContext: PCtxtHandle; ulAttribute: Cardinal;
+ pBuffer: Pointer; cbBuffer: Cardinal): SECURITY_STATUS; stdcall;
+{$EXTERNALSYM SetContextAttributesA}
+
+type
+ SET_CONTEXT_ATTRIBUTES_FN_A = function(phContext: PCtxtHandle; ulAttribute: Cardinal;
+ pBuffer: Pointer; cbBuffer: Cardinal): SECURITY_STATUS; stdcall;
+ {$EXTERNALSYM SET_CONTEXT_ATTRIBUTES_FN_A}
+
+{$IFDEF UNICODE}
+function SetContextAttributes(phContext: PCtxtHandle; ulAttribute: Cardinal;
+ pBuffer: Pointer; cbBuffer: Cardinal): SECURITY_STATUS; stdcall;
+{$EXTERNALSYM SetContextAttributes}
+
+type
+ SET_CONTEXT_ATTRIBUTES_FN = SET_CONTEXT_ATTRIBUTES_FN_W;
+ {$EXTERNALSYM SET_CONTEXT_ATTRIBUTES_FN}
+{$ELSE}
+function SetContextAttributes(phContext: PCtxtHandle; ulAttribute: Cardinal;
+ pBuffer: Pointer; cbBuffer: Cardinal): SECURITY_STATUS; stdcall;
+{$EXTERNALSYM SetContextAttributes}
+
+type
+ SET_CONTEXT_ATTRIBUTES_FN = SET_CONTEXT_ATTRIBUTES_FN_A;
+ {$EXTERNALSYM SET_CONTEXT_ATTRIBUTES_FN}
+{$ENDIF UNICODE}
+
+function QueryCredentialsAttributesW(phCredential: PCredHandle;
+ ulAttribute: Cardinal; pBuffer: Pointer): SECURITY_STATUS; stdcall;
+{$EXTERNALSYM QueryCredentialsAttributesW}
+
+type
+ QUERY_CREDENTIALS_ATTRIBUTES_FN_W = function(phCredential: PCredHandle;
+ ulAttribute: Cardinal; pBuffer: Pointer): SECURITY_STATUS; stdcall;
+ {$EXTERNALSYM QUERY_CREDENTIALS_ATTRIBUTES_FN_W}
+
+function QueryCredentialsAttributesA(phCredential: PCredHandle;
+ ulAttribute: Cardinal; pBuffer: Pointer): SECURITY_STATUS; stdcall;
+{$EXTERNALSYM QueryCredentialsAttributesA}
+
+type
+ QUERY_CREDENTIALS_ATTRIBUTES_FN_A = function(phCredential: PCredHandle;
+ ulAttribute: Cardinal; pBuffer: Pointer): SECURITY_STATUS; stdcall;
+ {$EXTERNALSYM QUERY_CREDENTIALS_ATTRIBUTES_FN_A}
+
+{$IFDEF UNICODE}
+function QueryCredentialsAttributes(phCredential: PCredHandle;
+ ulAttribute: Cardinal; pBuffer: Pointer): SECURITY_STATUS; stdcall;
+{$EXTERNALSYM QueryCredentialsAttributes}
+
+type
+ QUERY_CREDENTIALS_ATTRIBUTES_FN = function(phCredential: PCredHandle;
+ ulAttribute: Cardinal; pBuffer: Pointer): SECURITY_STATUS; stdcall;
+ {$EXTERNALSYM QUERY_CREDENTIALS_ATTRIBUTES_FN}
+{$ELSE}
+function QueryCredentialsAttributes(phCredential: PCredHandle;
+ ulAttribute: Cardinal; pBuffer: Pointer): SECURITY_STATUS; stdcall;
+{$EXTERNALSYM QueryCredentialsAttributes}
+
+type
+ QUERY_CREDENTIALS_ATTRIBUTES_FN = function(phCredential: PCredHandle;
+ ulAttribute: Cardinal; pBuffer: Pointer): SECURITY_STATUS; stdcall;
+ {$EXTERNALSYM QUERY_CREDENTIALS_ATTRIBUTES_FN}
+{$ENDIF UNICODE}
+
+function FreeContextBuffer(pvContextBuffer: Pointer): SECURITY_STATUS; stdcall;
+{$EXTERNALSYM FreeContextBuffer}
+
+type
+ FREE_CONTEXT_BUFFER_FN = function(pvContextBuffer: Pointer): SECURITY_STATUS; stdcall;
+ {$EXTERNALSYM FREE_CONTEXT_BUFFER_FN}
+
+///////////////////////////////////////////////////////////////////
+////
+//// Message Support API
+////
+//////////////////////////////////////////////////////////////////
+
+function MakeSignature(phContext: PCtxtHandle; fQOP: Cardinal;
+ pMessage: PSecBufferDesc; MessageSeqNo: Cardinal): SECURITY_STATUS; stdcall;
+{$EXTERNALSYM MakeSignature}
+
+type
+ MAKE_SIGNATURE_FN = function(phContext: PCtxtHandle; fQOP: Cardinal;
+ pMessage: PSecBufferDesc; MessageSeqNo: Cardinal): SECURITY_STATUS; stdcall;
+ {$EXTERNALSYM MAKE_SIGNATURE_FN}
+
+function VerifySignature(phContext: PCtxtHandle; pMessage: PSecBufferDesc;
+ MessageSeqNo: Cardinal; var pfQOP: Cardinal): SECURITY_STATUS; stdcall;
+{$EXTERNALSYM VerifySignature}
+
+type
+ VERIFY_SIGNATURE_FN = function(phContext: PCtxtHandle; pMessage: PSecBufferDesc;
+ MessageSeqNo: Cardinal; var pfQOP: Cardinal): SECURITY_STATUS; stdcall;
+ {$EXTERNALSYM VERIFY_SIGNATURE_FN}
+
+const
+ SECQOP_WRAP_NO_ENCRYPT = DWORD($80000001);
+ {$EXTERNALSYM SECQOP_WRAP_NO_ENCRYPT}
+
+function EncryptMessage(phContext: PCtxtHandle; fQOP: Cardinal;
+ pMessage: PSecBufferDesc; MessageSeqNo: Cardinal): SECURITY_STATUS; stdcall;
+{$EXTERNALSYM EncryptMessage}
+
+type
+ ENCRYPT_MESSAGE_FN = function(phContext: PCtxtHandle; fQOP: Cardinal;
+ pMessage: PSecBufferDesc; MessageSeqNo: Cardinal): SECURITY_STATUS; stdcall;
+ {$EXTERNALSYM ENCRYPT_MESSAGE_FN}
+
+function DecryptMessage(phContext: PCtxtHandle; pMessage: PSecBufferDesc;
+ MessageSeqNo: Cardinal; var pfQOP: Cardinal): SECURITY_STATUS; stdcall;
+{$EXTERNALSYM DecryptMessage}
+
+type
+ DECRYPT_MESSAGE_FN = function(phContext: PCtxtHandle; pMessage: PSecBufferDesc;
+ MessageSeqNo: Cardinal; var pfQOP: Cardinal): SECURITY_STATUS; stdcall;
+ {$EXTERNALSYM DECRYPT_MESSAGE_FN}
+
+///////////////////////////////////////////////////////////////////////////
+////
+//// Misc.
+////
+///////////////////////////////////////////////////////////////////////////
+
+function EnumerateSecurityPackagesW(var pcPackages: Cardinal;
+ var ppPackageInfo: PSecPkgInfoW): SECURITY_STATUS; stdcall;
+{$EXTERNALSYM EnumerateSecurityPackagesW}
+
+type
+ ENUMERATE_SECURITY_PACKAGES_FN_W = function(var pcPackages: Cardinal;
+ var ppPackageInfo: PSecPkgInfoW): SECURITY_STATUS; stdcall;
+ {$EXTERNALSYM ENUMERATE_SECURITY_PACKAGES_FN_W}
+
+function EnumerateSecurityPackagesA(var pcPackages: Cardinal;
+ var ppPackageInfo: PSecPkgInfoA): SECURITY_STATUS; stdcall;
+{$EXTERNALSYM EnumerateSecurityPackagesA}
+
+type
+ ENUMERATE_SECURITY_PACKAGES_FN_A = function(var pcPackages: Cardinal;
+ var ppPackageInfo: PSecPkgInfoA): SECURITY_STATUS; stdcall;
+ {$EXTERNALSYM ENUMERATE_SECURITY_PACKAGES_FN_A}
+
+{$IFDEF UNICODE}
+function EnumerateSecurityPackages(var pcPackages: Cardinal;
+ var ppPackageInfo: PSecPkgInfoW): SECURITY_STATUS; stdcall;
+{$EXTERNALSYM EnumerateSecurityPackages}
+
+type
+ ENUMERATE_SECURITY_PACKAGES_FN = function(var pcPackages: Cardinal;
+ var ppPackageInfo: PSecPkgInfoW): SECURITY_STATUS; stdcall;
+ {$EXTERNALSYM ENUMERATE_SECURITY_PACKAGES_FN}
+{$ELSE}
+function EnumerateSecurityPackages(var pcPackages: Cardinal;
+ var ppPackageInfo: PSecPkgInfoA): SECURITY_STATUS; stdcall;
+{$EXTERNALSYM EnumerateSecurityPackages}
+
+type
+ ENUMERATE_SECURITY_PACKAGES_FN = function(var pcPackages: Cardinal;
+ var ppPackageInfo: PSecPkgInfoA): SECURITY_STATUS; stdcall;
+ {$EXTERNALSYM ENUMERATE_SECURITY_PACKAGES_FN}
+{$ENDIF UNICODE}
+
+function QuerySecurityPackageInfoW(pszPackageName: PSecWChar;
+ var ppPackageInfo: PSecPkgInfoW): SECURITY_STATUS; stdcall;
+{$EXTERNALSYM QuerySecurityPackageInfoW}
+
+type
+ QUERY_SECURITY_PACKAGE_INFO_FN_W = function(pszPackageName: PSecWChar;
+ var ppPackageInfo: PSecPkgInfoW): SECURITY_STATUS; stdcall;
+ {$EXTERNALSYM QUERY_SECURITY_PACKAGE_INFO_FN_W}
+
+function QuerySecurityPackageInfoA(pszPackageName: PSecChar;
+ var ppPackageInfo: PSecPkgInfoA): SECURITY_STATUS; stdcall;
+{$EXTERNALSYM QuerySecurityPackageInfoA}
+
+type
+ QUERY_SECURITY_PACKAGE_INFO_FN_A = function(pszPackageName: PSecChar;
+ var ppPackageInfo: PSecPkgInfoA): SECURITY_STATUS; stdcall;
+ {$EXTERNALSYM QUERY_SECURITY_PACKAGE_INFO_FN_A}
+
+{$IFDEF UNICODE}
+function QuerySecurityPackageInfo(pszPackageName: PSecWChar;
+ var ppPackageInfo: PSecPkgInfoW): SECURITY_STATUS; stdcall;
+{$EXTERNALSYM QuerySecurityPackageInfo}
+
+type
+ QUERY_SECURITY_PACKAGE_INFO_FN = function(pszPackageName: PSecWChar;
+ var ppPackageInfo: PSecPkgInfoW): SECURITY_STATUS; stdcall;
+ {$EXTERNALSYM QUERY_SECURITY_PACKAGE_INFO_FN}
+{$ELSE}
+function QuerySecurityPackageInfo(pszPackageName: PSecChar;
+ var ppPackageInfo: PSecPkgInfoA): SECURITY_STATUS; stdcall;
+{$EXTERNALSYM QuerySecurityPackageInfo}
+
+type
+ QUERY_SECURITY_PACKAGE_INFO_FN = function(pszPackageName: PSecChar;
+ var ppPackageInfo: PSecPkgInfoA): SECURITY_STATUS; stdcall;
+ {$EXTERNALSYM QUERY_SECURITY_PACKAGE_INFO_FN}
+{$ENDIF UNICODE}
+
+type
+ _SecDelegationType = (
+ SecFull,
+ SecService,
+ SecTree,
+ SecDirectory,
+ SecObject);
+ {$EXTERNALSYM _SecDelegationType}
+ SecDelegationType = _SecDelegationType;
+ {$EXTERNALSYM SecDelegationType}
+ PSecDelegationType = ^SecDelegationType;
+ {$EXTERNALSYM PSecDelegationType}
+ TSecDelegationType = SecDelegationType;
+
+//function DelegateSecurityContext(phContext: PCtxtHandle; pszTarget: PSecChar;
+// DelegationType: SecDelegationType; pExpiry: PTimeStamp;
+// pPackageParameters: PSecBuffer; pOutput: PSecBufferDesc): SECURITY_STATUS; stdcall;
+//{$EXTERNALSYM DelegateSecurityContext}
+
+///////////////////////////////////////////////////////////////////////////
+////
+//// Proxies
+////
+///////////////////////////////////////////////////////////////////////////
+
+//
+// Proxies are only available on NT platforms
+//
+
+///////////////////////////////////////////////////////////////////////////
+////
+//// Context export/import
+////
+///////////////////////////////////////////////////////////////////////////
+
+function ExportSecurityContext(phContext: PCtxtHandle; fFlags: ULONG;
+ pPackedContext: PSecBuffer; var pToken: Pointer): SECURITY_STATUS; stdcall;
+{$EXTERNALSYM ExportSecurityContext}
+
+type
+ EXPORT_SECURITY_CONTEXT_FN = function(phContext: PCtxtHandle; fFlags: ULONG;
+ pPackedContext: PSecBuffer; var pToken: Pointer): SECURITY_STATUS; stdcall;
+ {$EXTERNALSYM EXPORT_SECURITY_CONTEXT_FN}
+
+function ImportSecurityContextW(pszPackage: PSecWChar; pPackedContext: PSecBuffer;
+ Token: Pointer; phContext: PCtxtHandle): SECURITY_STATUS; stdcall;
+{$EXTERNALSYM ImportSecurityContextW}
+
+type
+ IMPORT_SECURITY_CONTEXT_FN_W = function(pszPackage: PSecWChar; pPackedContext: PSecBuffer;
+ Token: Pointer; phContext: PCtxtHandle): SECURITY_STATUS; stdcall;
+ {$EXTERNALSYM IMPORT_SECURITY_CONTEXT_FN_W}
+
+function ImportSecurityContextA(pszPackage: PSecChar; pPackedContext: PSecBuffer;
+ Token: Pointer; phContext: PCtxtHandle): SECURITY_STATUS; stdcall;
+{$EXTERNALSYM ImportSecurityContextA}
+
+type
+ IMPORT_SECURITY_CONTEXT_FN_A = function(pszPackage: PSecChar; pPackedContext: PSecBuffer;
+ Token: Pointer; phContext: PCtxtHandle): SECURITY_STATUS; stdcall;
+ {$EXTERNALSYM IMPORT_SECURITY_CONTEXT_FN_A}
+
+{$IFDEF UNICODE}
+function ImportSecurityContext(pszPackage: PSecWChar; pPackedContext: PSecBuffer;
+ Token: Pointer; phContext: PCtxtHandle): SECURITY_STATUS; stdcall;
+{$EXTERNALSYM ImportSecurityContext}
+
+type
+ IMPORT_SECURITY_CONTEXT_FN = function(pszPackage: PSecWChar; pPackedContext: PSecBuffer;
+ Token: Pointer; phContext: PCtxtHandle): SECURITY_STATUS; stdcall;
+ {$EXTERNALSYM IMPORT_SECURITY_CONTEXT_FN}
+{$ELSE}
+function ImportSecurityContext(pszPackage: PSecChar; pPackedContext: PSecBuffer;
+ Token: Pointer; phContext: PCtxtHandle): SECURITY_STATUS; stdcall;
+{$EXTERNALSYM ImportSecurityContext}
+
+type
+ IMPORT_SECURITY_CONTEXT_FN = function(pszPackage: PSecChar; pPackedContext: PSecBuffer;
+ Token: Pointer; phContext: PCtxtHandle): SECURITY_STATUS; stdcall;
+ {$EXTERNALSYM IMPORT_SECURITY_CONTEXT_FN}
+{$ENDIF UNICODE}
+
+(*
+
+#if ISSP_MODE == 0
+
+NTSTATUS
+NTAPI
+SecMakeSPN(
+ IN PUNICODE_STRING ServiceClass,
+ IN PUNICODE_STRING ServiceName,
+ IN PUNICODE_STRING InstanceName OPTIONAL,
+ IN USHORT InstancePort OPTIONAL,
+ IN PUNICODE_STRING Referrer OPTIONAL,
+ IN OUT PUNICODE_STRING Spn,
+ OUT PULONG Length OPTIONAL,
+ IN BOOLEAN Allocate
+ );
+
+NTSTATUS
+NTAPI
+SecMakeSPNEx(
+ IN PUNICODE_STRING ServiceClass,
+ IN PUNICODE_STRING ServiceName,
+ IN PUNICODE_STRING InstanceName OPTIONAL,
+ IN USHORT InstancePort OPTIONAL,
+ IN PUNICODE_STRING Referrer OPTIONAL,
+ IN PUNICODE_STRING TargetInfo OPTIONAL,
+ IN OUT PUNICODE_STRING Spn,
+ OUT PULONG Length OPTIONAL,
+ IN BOOLEAN Allocate
+ );
+
+NTSTATUS
+SEC_ENTRY
+SecLookupAccountSid(
+ IN PSID Sid,
+ IN OUT PULONG NameSize,
+ OUT PUNICODE_STRING NameBuffer,
+ IN OUT PULONG DomainSize OPTIONAL,
+ OUT PUNICODE_STRING DomainBuffer OPTIONAL,
+ OUT PSID_NAME_USE NameUse
+ );
+
+NTSTATUS
+SEC_ENTRY
+SecLookupAccountName(
+ IN PUNICODE_STRING Name,
+ IN OUT PULONG SidSize,
+ OUT PSID Sid,
+ OUT PSID_NAME_USE NameUse,
+ IN OUT PULONG DomainSize OPTIONAL,
+ OUT PUNICODE_STRING ReferencedDomain OPTIONAL
+ );
+
+NTSTATUS
+SEC_ENTRY
+SecLookupWellKnownSid(
+ IN WELL_KNOWN_SID_TYPE SidType,
+ OUT PSID Sid,
+ ULONG SidBufferSize,
+ OUT PULONG SidSize OPTIONAL
+ );
+
+#endif
+
+*)
+
+///////////////////////////////////////////////////////////////////////////////
+////
+//// Fast access for RPC:
+////
+///////////////////////////////////////////////////////////////////////////////
+
+const
+ SECURITY_ENTRYPOINT_ANSIW = 'InitSecurityInterfaceW';
+ {$EXTERNALSYM SECURITY_ENTRYPOINT_ANSIW}
+ SECURITY_ENTRYPOINT_ANSIA = 'InitSecurityInterfaceA';
+ {$EXTERNALSYM SECURITY_ENTRYPOINT_ANSIA}
+ SECURITY_ENTRYPOINTW = 'InitSecurityInterfaceW';
+ {$EXTERNALSYM SECURITY_ENTRYPOINTW}
+ SECURITY_ENTRYPOINTA = 'InitSecurityInterfaceA';
+ {$EXTERNALSYM SECURITY_ENTRYPOINTA}
+ SECURITY_ENTRYPOINT16 = 'INITSECURITYINTERFACEA';
+ {$EXTERNALSYM SECURITY_ENTRYPOINT16}
+
+ {$IFDEF UNICODE}
+ SECURITY_ENTRYPOINT = SECURITY_ENTRYPOINTW;
+ {$EXTERNALSYM SECURITY_ENTRYPOINT}
+ SECURITY_ENTRYPOINT_ANSI = SECURITY_ENTRYPOINT_ANSIW;
+ {$EXTERNALSYM SECURITY_ENTRYPOINT_ANSI}
+ {$ELSE}
+ SECURITY_ENTRYPOINT = SECURITY_ENTRYPOINTA;
+ {$EXTERNALSYM SECURITY_ENTRYPOINT}
+ SECURITY_ENTRYPOINT_ANSI = SECURITY_ENTRYPOINT_ANSIA;
+ {$EXTERNALSYM SECURITY_ENTRYPOINT_ANSI}
+ {$ENDIF UNICODE}
+
+function FreeCredentialHandle(phCredential: PCredHandle): SECURITY_STATUS;
+{$EXTERNALSYM FreeCredentialHandle}
+
+type
+ PSecurityFunctionTableW = ^SecurityFunctionTableW;
+ {$EXTERNALSYM PSecurityFunctionTableW}
+ _SECURITY_FUNCTION_TABLE_W = record
+ dwVersion: Cardinal;
+ EnumerateSecurityPackagesW: ENUMERATE_SECURITY_PACKAGES_FN_W;
+ QueryCredentialsAttributesW: QUERY_CREDENTIALS_ATTRIBUTES_FN_W;
+ AcquireCredentialsHandleW: ACQUIRE_CREDENTIALS_HANDLE_FN_W;
+ FreeCredentialsHandle: FREE_CREDENTIALS_HANDLE_FN;
+ Reserved2: Pointer;
+ InitializeSecurityContextW: INITIALIZE_SECURITY_CONTEXT_FN_W;
+ AcceptSecurityContext: ACCEPT_SECURITY_CONTEXT_FN;
+ CompleteAuthToken: COMPLETE_AUTH_TOKEN_FN;
+ DeleteSecurityContext: DELETE_SECURITY_CONTEXT_FN;
+ ApplyControlToken: APPLY_CONTROL_TOKEN_FN;
+ QueryContextAttributesW: QUERY_CONTEXT_ATTRIBUTES_FN_W;
+ ImpersonateSecurityContext: IMPERSONATE_SECURITY_CONTEXT_FN;
+ RevertSecurityContext: REVERT_SECURITY_CONTEXT_FN;
+ MakeSignature: MAKE_SIGNATURE_FN;
+ VerifySignature: VERIFY_SIGNATURE_FN;
+ FreeContextBuffer: FREE_CONTEXT_BUFFER_FN;
+ QuerySecurityPackageInfoW: QUERY_SECURITY_PACKAGE_INFO_FN_W;
+ Reserved3: Pointer;
+ Reserved4: Pointer;
+ ExportSecurityContext: EXPORT_SECURITY_CONTEXT_FN;
+ ImportSecurityContextW: IMPORT_SECURITY_CONTEXT_FN_W;
+ AddCredentialsW: ADD_CREDENTIALS_FN_W;
+ Reserved8: Pointer;
+ QuerySecurityContextToken: QUERY_SECURITY_CONTEXT_TOKEN_FN;
+ EncryptMessage: ENCRYPT_MESSAGE_FN;
+ DecryptMessage: DECRYPT_MESSAGE_FN;
+ SetContextAttributesW: SET_CONTEXT_ATTRIBUTES_FN_W;
+ end;
+ {$EXTERNALSYM _SECURITY_FUNCTION_TABLE_W}
+ SecurityFunctionTableW = _SECURITY_FUNCTION_TABLE_W;
+ {$EXTERNALSYM SecurityFunctionTableW}
+ TSecurityFunctionTableW = SecurityFunctionTableW;
+
+ PSecurityFunctionTableA = ^SecurityFunctionTableA;
+ {$EXTERNALSYM PSecurityFunctionTableA}
+ _SECURITY_FUNCTION_TABLE_A = record
+ dwVersion: Cardinal;
+ EnumerateSecurityPackagesA: ENUMERATE_SECURITY_PACKAGES_FN_A;
+ QueryCredentialsAttributesA: QUERY_CREDENTIALS_ATTRIBUTES_FN_A;
+ AcquireCredentialsHandleA: ACQUIRE_CREDENTIALS_HANDLE_FN_A;
+ FreeCredentialHandle: FREE_CREDENTIALS_HANDLE_FN;
+ Reserved2: Pointer;
+ InitializeSecurityContextA: INITIALIZE_SECURITY_CONTEXT_FN_A;
+ AcceptSecurityContext: ACCEPT_SECURITY_CONTEXT_FN;
+ CompleteAuthToken: COMPLETE_AUTH_TOKEN_FN;
+ DeleteSecurityContext: DELETE_SECURITY_CONTEXT_FN;
+ ApplyControlToken: APPLY_CONTROL_TOKEN_FN;
+ QueryContextAttributesA: QUERY_CONTEXT_ATTRIBUTES_FN_A;
+ ImpersonateSecurityContext: IMPERSONATE_SECURITY_CONTEXT_FN;
+ RevertSecurityContext: REVERT_SECURITY_CONTEXT_FN;
+ MakeSignature: MAKE_SIGNATURE_FN;
+ VerifySignature: VERIFY_SIGNATURE_FN;
+ FreeContextBuffer: FREE_CONTEXT_BUFFER_FN;
+ QuerySecurityPackageInfoA: QUERY_SECURITY_PACKAGE_INFO_FN_A;
+ Reserved3: Pointer;
+ Reserved4: Pointer;
+ ExportSecurityContext: EXPORT_SECURITY_CONTEXT_FN;
+ ImportSecurityContextA: IMPORT_SECURITY_CONTEXT_FN_A;
+ AddCredentialsA: ADD_CREDENTIALS_FN_A;
+ Reserved8: Pointer;
+ QuerySecurityContextToken: QUERY_SECURITY_CONTEXT_TOKEN_FN;
+ EncryptMessage: ENCRYPT_MESSAGE_FN;
+ DecryptMessage: DECRYPT_MESSAGE_FN;
+ SetContextAttributesA: SET_CONTEXT_ATTRIBUTES_FN_A;
+ end;
+ {$EXTERNALSYM _SECURITY_FUNCTION_TABLE_A}
+ SecurityFunctionTableA = _SECURITY_FUNCTION_TABLE_A;
+ {$EXTERNALSYM SecurityFunctionTableA}
+ TSecurityFunctionTableA = SecurityFunctionTableA;
+
+ {$IFDEF UNICODE}
+ SecurityFunctionTable = SecurityFunctionTableW;
+ {$EXTERNALSYM SecurityFunctionTable}
+ PSecurityFunctionTable = PSecurityFunctionTableW;
+ {$EXTERNALSYM PSecurityFunctionTable}
+ TSecurityFunctionTable = TSecurityFunctionTableW;
+ {$ELSE}
+ SecurityFunctionTable = SecurityFunctionTableA;
+ {$EXTERNALSYM SecurityFunctionTable}
+ PSecurityFunctionTable = PSecurityFunctionTableA;
+ {$EXTERNALSYM PSecurityFunctionTable}
+ TSecurityFunctionTable = TSecurityFunctionTableA;
+ {$ENDIF UNICODE}
+
+const
+ // Function table has all routines through DecryptMessage
+ SECURITY_SUPPORT_PROVIDER_INTERFACE_VERSION = 1;
+ {$EXTERNALSYM SECURITY_SUPPORT_PROVIDER_INTERFACE_VERSION}
+
+ // Function table has all routines through SetContextAttributes
+ SECURITY_SUPPORT_PROVIDER_INTERFACE_VERSION_2 = 2;
+ {$EXTERNALSYM SECURITY_SUPPORT_PROVIDER_INTERFACE_VERSION_2}
+
+function InitSecurityInterfaceA: PSecurityFunctionTableA; stdcall;
+{$EXTERNALSYM InitSecurityInterfaceA}
+
+type
+ INIT_SECURITY_INTERFACE_A = function: PSecurityFunctionTableA; stdcall;
+ {$EXTERNALSYM INIT_SECURITY_INTERFACE_A}
+
+function InitSecurityInterfaceW: PSecurityFunctionTableW; stdcall;
+{$EXTERNALSYM InitSecurityInterfaceW}
+
+type
+ INIT_SECURITY_INTERFACE_W = function: PSecurityFunctionTableW; stdcall;
+ {$EXTERNALSYM INIT_SECURITY_INTERFACE_W}
+
+{$IFDEF UNICODE}
+function InitSecurityInterface: PSecurityFunctionTableW; stdcall;
+{$EXTERNALSYM InitSecurityInterface}
+
+type
+ INIT_SECURITY_INTERFACE = function: PSecurityFunctionTableW; stdcall;
+ {$EXTERNALSYM INIT_SECURITY_INTERFACE}
+{$ELSE}
+function InitSecurityInterface: PSecurityFunctionTableA; stdcall;
+{$EXTERNALSYM InitSecurityInterface}
+
+type
+ INIT_SECURITY_INTERFACE = function: PSecurityFunctionTableA; stdcall;
+ {$EXTERNALSYM INIT_SECURITY_INTERFACE}
+{$ENDIF UNICODE}
+
+//
+// SASL Profile Support
+//
+
+function SaslEnumerateProfilesA(var ProfileList: LPSTR;
+ var ProfileCount: ULONG): SECURITY_STATUS; stdcall;
+{$EXTERNALSYM SaslEnumerateProfilesA}
+function SaslEnumerateProfilesW(var ProfileList: LPWSTR;
+ var ProfileCount: ULONG): SECURITY_STATUS; stdcall;
+{$EXTERNALSYM SaslEnumerateProfilesW}
+
+{$IFDEF UNICODE}
+function SaslEnumerateProfiles(var ProfileList: LPWSTR;
+ var ProfileCount: ULONG): SECURITY_STATUS; stdcall;
+{$EXTERNALSYM SaslEnumerateProfiles}
+{$ELSE}
+function SaslEnumerateProfiles(var ProfileList: LPSTR;
+ var ProfileCount: ULONG): SECURITY_STATUS; stdcall;
+{$EXTERNALSYM SaslEnumerateProfiles}
+{$ENDIF UNICODE}
+
+function SaslGetProfilePackageA(ProfileName: LPSTR;
+ var PackageInfo: PSecPkgInfoA): SECURITY_STATUS; stdcall;
+{$EXTERNALSYM SaslGetProfilePackageA}
+function SaslGetProfilePackageW(ProfileName: LPWSTR;
+ var PackageInfo: PSecPkgInfoW): SECURITY_STATUS; stdcall;
+{$EXTERNALSYM SaslGetProfilePackageW}
+
+{$IFDEF UNICODE}
+function SaslGetProfilePackage(ProfileName: LPWSTR;
+ var PackageInfo: PSecPkgInfoW): SECURITY_STATUS; stdcall;
+{$EXTERNALSYM SaslGetProfilePackage}
+{$ELSE}
+function SaslGetProfilePackage(ProfileName: LPSTR;
+ var PackageInfo: PSecPkgInfoA): SECURITY_STATUS; stdcall;
+{$EXTERNALSYM SaslGetProfilePackage}
+{$ENDIF UNICODE}
+
+function SaslIdentifyPackageA(pInput: PSecBufferDesc;
+ var PackageInfo: PSecPkgInfoA): SECURITY_STATUS; stdcall;
+{$EXTERNALSYM SaslIdentifyPackageA}
+function SaslIdentifyPackageW(pInput: PSecBufferDesc;
+ var PackageInfo: PSecPkgInfoW): SECURITY_STATUS; stdcall;
+{$EXTERNALSYM SaslIdentifyPackageW}
+
+{$IFDEF UNICODE}
+function SaslIdentifyPackage(pInput: PSecBufferDesc;
+ var PackageInfo: PSecPkgInfoW): SECURITY_STATUS; stdcall;
+{$EXTERNALSYM SaslIdentifyPackage}
+{$ELSE}
+function SaslIdentifyPackage(pInput: PSecBufferDesc;
+ var PackageInfo: PSecPkgInfoA): SECURITY_STATUS; stdcall;
+{$EXTERNALSYM SaslIdentifyPackage}
+{$ENDIF UNICODE}
+
+function SaslInitializeSecurityContextW(phCredential: PCredHandle;
+ phContext: PCtxtHandle; pszTargetName: LPWSTR; fContextReq, Reserved1: Cardinal;
+ TargetDataRep: Cardinal; pInput: PSecBufferDesc; Reserved2: Cardinal;
+ phNewContext: PCtxtHandle; pOutput: PSecBufferDesc; var pfContextAttr: Cardinal;
+ ptsExpiry: PTimeStamp): SECURITY_STATUS; stdcall;
+{$EXTERNALSYM SaslInitializeSecurityContextW}
+function SaslInitializeSecurityContextA(phCredential: PCredHandle;
+ phContext: PCtxtHandle; pszTargetName: LPSTR; fContextReq, Reserved1: Cardinal;
+ TargetDataRep: Cardinal; pInput: PSecBufferDesc; Reserved2: Cardinal;
+ phNewContext: PCtxtHandle; pOutput: PSecBufferDesc; var pfContextAttr: Cardinal;
+ ptsExpiry: PTimeStamp): SECURITY_STATUS; stdcall;
+{$EXTERNALSYM SaslInitializeSecurityContextA}
+
+{$IFDEF UNICODE}
+function SaslInitializeSecurityContext(phCredential: PCredHandle;
+ phContext: PCtxtHandle; pszTargetName: LPWSTR; fContextReq, Reserved1: Cardinal;
+ TargetDataRep: Cardinal; pInput: PSecBufferDesc; Reserved2: Cardinal;
+ phNewContext: PCtxtHandle; pOutput: PSecBufferDesc; var pfContextAttr: Cardinal;
+ ptsExpiry: PTimeStamp): SECURITY_STATUS; stdcall;
+{$EXTERNALSYM SaslInitializeSecurityContext}
+{$ELSE}
+function SaslInitializeSecurityContext(phCredential: PCredHandle;
+ phContext: PCtxtHandle; pszTargetName: LPSTR; fContextReq, Reserved1: Cardinal;
+ TargetDataRep: Cardinal; pInput: PSecBufferDesc; Reserved2: Cardinal;
+ phNewContext: PCtxtHandle; pOutput: PSecBufferDesc; var pfContextAttr: Cardinal;
+ ptsExpiry: PTimeStamp): SECURITY_STATUS; stdcall;
+{$EXTERNALSYM SaslInitializeSecurityContext}
+{$ENDIF UNICODE}
+
+function SaslAcceptSecurityContext(phCredential: PCredHandle;
+ phContext: PCtxtHandle; pInput: PSecBufferDesc; fContextReq: Cardinal;
+ TargetDataRep: Cardinal; phNewContext: PCtxtHandle; pOutput: PSecBufferDesc;
+ var pfContextAttr: Cardinal; ptsExpiry: PTimeStamp): SECURITY_STATUS; stdcall;
+{$EXTERNALSYM SaslAcceptSecurityContext}
+
+const
+ SASL_OPTION_SEND_SIZE = 1; // Maximum size to send to peer
+ {$EXTERNALSYM SASL_OPTION_SEND_SIZE}
+ SASL_OPTION_RECV_SIZE = 2; // Maximum size willing to receive
+ {$EXTERNALSYM SASL_OPTION_RECV_SIZE}
+ SASL_OPTION_AUTHZ_STRING = 3; // Authorization string
+ {$EXTERNALSYM SASL_OPTION_AUTHZ_STRING}
+ SASL_OPTION_AUTHZ_PROCESSING = 4; // Authorization string processing
+ {$EXTERNALSYM SASL_OPTION_AUTHZ_PROCESSING}
+
+type
+ _SASL_AUTHZID_STATE = (
+ Sasl_AuthZIDForbidden, // allow no AuthZID strings to be specified - error out (default)
+ Sasl_AuthZIDProcessed); // AuthZID Strings processed by Application or SSP
+ {$EXTERNALSYM _SASL_AUTHZID_STATE}
+ SASL_AUTHZID_STATE = _SASL_AUTHZID_STATE;
+ {$EXTERNALSYM SASL_AUTHZID_STATE}
+ TSaslAuthzIDState = SASL_AUTHZID_STATE;
+
+function SaslSetContextOption(ContextHandle: PCtxtHandle; Option: ULONG; Value: PVOID; Size: ULONG): SECURITY_STATUS; stdcall;
+{$EXTERNALSYM SaslSetContextOption}
+
+function SaslGetContextOption(ContextHandle: PCtxtHandle; Option: ULONG; Value: PVOID;
+ Size: ULONG; Needed: PULONG): SECURITY_STATUS; stdcall;
+{$EXTERNALSYM SaslGetContextOption}
+
+//
+// This is the legacy credentials structure.
+// The EX version below is preferred.
+
+const
+ SEC_WINNT_AUTH_IDENTITY_ANSI = $1;
+ {$EXTERNALSYM SEC_WINNT_AUTH_IDENTITY_ANSI}
+ SEC_WINNT_AUTH_IDENTITY_UNICODE = $2;
+ {$EXTERNALSYM SEC_WINNT_AUTH_IDENTITY_UNICODE}
+
+type
+ _SEC_WINNT_AUTH_IDENTITY_W = record
+ User: PWideChar;
+ UserLength: Cardinal;
+ Domain: PWideChar;
+ DomainLength: Cardinal;
+ Password: PWideChar;
+ PasswordLength: Cardinal;
+ Flags: Cardinal;
+ end;
+ {$EXTERNALSYM _SEC_WINNT_AUTH_IDENTITY_W}
+ SEC_WINNT_AUTH_IDENTITY_W = _SEC_WINNT_AUTH_IDENTITY_W;
+ {$EXTERNALSYM SEC_WINNT_AUTH_IDENTITY_W}
+ PSEC_WINNT_AUTH_IDENTITY_W = ^SEC_WINNT_AUTH_IDENTITY_W;
+ {$EXTERNALSYM PSEC_WINNT_AUTH_IDENTITY_W}
+ TSecWinNTAuthIdentityW = SEC_WINNT_AUTH_IDENTITY_W;
+ PSecWinNTAuthIdentityW = PSEC_WINNT_AUTH_IDENTITY_W;
+
+ _SEC_WINNT_AUTH_IDENTITY_A = record
+ User: PChar;
+ UserLength: Cardinal;
+ Domain: PChar;
+ DomainLength: Cardinal;
+ Password: PChar;
+ PasswordLength: Cardinal;
+ Flags: Cardinal;
+ end;
+ {$EXTERNALSYM _SEC_WINNT_AUTH_IDENTITY_A}
+ SEC_WINNT_AUTH_IDENTITY_A = _SEC_WINNT_AUTH_IDENTITY_A;
+ {$EXTERNALSYM SEC_WINNT_AUTH_IDENTITY_A}
+ PSEC_WINNT_AUTH_IDENTITY_A = ^SEC_WINNT_AUTH_IDENTITY_A;
+ {$EXTERNALSYM PSEC_WINNT_AUTH_IDENTITY_A}
+ TSecWinNTAuthIdentityA = SEC_WINNT_AUTH_IDENTITY_A;
+ PSecWinNTAuthIdentityA = PSEC_WINNT_AUTH_IDENTITY_A;
+
+ {$IFDEF UNICODE}
+ SEC_WINNT_AUTH_IDENTITY = SEC_WINNT_AUTH_IDENTITY_W;
+ {$EXTERNALSYM SEC_WINNT_AUTH_IDENTITY}
+ PSEC_WINNT_AUTH_IDENTITY = PSEC_WINNT_AUTH_IDENTITY_W;
+ {$EXTERNALSYM PSEC_WINNT_AUTH_IDENTITY}
+ _SEC_WINNT_AUTH_IDENTITY = _SEC_WINNT_AUTH_IDENTITY_W;
+ {$EXTERNALSYM _SEC_WINNT_AUTH_IDENTITY}
+ TSecWinNTAuthIdentity = TSecWinNTAuthIdentityW;
+ PSecWinNTAuthIdentity = PSecWinNTAuthIdentityW;
+ {$ELSE}
+ SEC_WINNT_AUTH_IDENTITY = SEC_WINNT_AUTH_IDENTITY_A;
+ {$EXTERNALSYM SEC_WINNT_AUTH_IDENTITY}
+ PSEC_WINNT_AUTH_IDENTITY = PSEC_WINNT_AUTH_IDENTITY_A;
+ {$EXTERNALSYM PSEC_WINNT_AUTH_IDENTITY}
+ _SEC_WINNT_AUTH_IDENTITY = _SEC_WINNT_AUTH_IDENTITY_A;
+ {$EXTERNALSYM _SEC_WINNT_AUTH_IDENTITY}
+ TSecWinNTAuthIdentity = TSecWinNTAuthIdentityA;
+ PSecWinNTAuthIdentity = PSecWinNTAuthIdentityA;
+ {$ENDIF UNICODE}
+
+//
+// This is the combined authentication identity structure that may be
+// used with the negotiate package, NTLM, Kerberos, or SCHANNEL
+//
+
+const
+ SEC_WINNT_AUTH_IDENTITY_VERSION = $200;
+
+type
+ _SEC_WINNT_AUTH_IDENTITY_EXW = record
+ Version: Cardinal;
+ Length: Cardinal;
+ User: PWideChar;
+ UserLength: Cardinal;
+ Domain: PWideChar;
+ DomainLength: Cardinal;
+ Password: PWideChar;
+ PasswordLength: Cardinal;
+ Flags: Cardinal;
+ PackageList: PWideChar;
+ PackageListLength: Cardinal;
+ end;
+ {$EXTERNALSYM _SEC_WINNT_AUTH_IDENTITY_EXW}
+ SEC_WINNT_AUTH_IDENTITY_EXW = _SEC_WINNT_AUTH_IDENTITY_EXW;
+ {$EXTERNALSYM SEC_WINNT_AUTH_IDENTITY_EXW}
+ PSEC_WINNT_AUTH_IDENTITY_EXW = ^SEC_WINNT_AUTH_IDENTITY_EXW;
+ {$EXTERNALSYM PSEC_WINNT_AUTH_IDENTITY_EXW}
+ TSecWinNTAuthIdentityExW = SEC_WINNT_AUTH_IDENTITY_EXW;
+ PSecWinNTAuthIdentityExW = PSEC_WINNT_AUTH_IDENTITY_EXW;
+
+ _SEC_WINNT_AUTH_IDENTITY_EXA = record
+ Version: Cardinal;
+ Length: Cardinal;
+ User: PChar;
+ UserLength: Cardinal;
+ Domain: PChar;
+ DomainLength: Cardinal;
+ Password: PChar;
+ PasswordLength: Cardinal;
+ Flags: Cardinal;
+ PackageList: PChar;
+ PackageListLength: Cardinal;
+ end;
+ {$EXTERNALSYM _SEC_WINNT_AUTH_IDENTITY_EXA}
+ SEC_WINNT_AUTH_IDENTITY_EXA = _SEC_WINNT_AUTH_IDENTITY_EXA;
+ {$EXTERNALSYM SEC_WINNT_AUTH_IDENTITY_EXA}
+ PSEC_WINNT_AUTH_IDENTITY_EXA = ^SEC_WINNT_AUTH_IDENTITY_EXA;
+ {$EXTERNALSYM PSEC_WINNT_AUTH_IDENTITY_EXA}
+ TSecWinNTAuthIdentityExA = SEC_WINNT_AUTH_IDENTITY_EXA;
+ PSecWinNTAuthIdentityExA = PSEC_WINNT_AUTH_IDENTITY_EXA;
+
+ {$IFDEF UNICODE}
+ SEC_WINNT_AUTH_IDENTITY_EX = SEC_WINNT_AUTH_IDENTITY_EXW;
+ {$EXTERNALSYM SEC_WINNT_AUTH_IDENTITY_EX}
+ PSEC_WINNT_AUTH_IDENTITY_EX = PSEC_WINNT_AUTH_IDENTITY_EXW;
+ {$EXTERNALSYM PSEC_WINNT_AUTH_IDENTITY_EX}
+ TSecWinNTAuthIdentityEx = TSecWinNTAuthIdentityExW;
+ PSecWinNTAuthIdentityEx = PSecWinNTAuthIdentityExW;
+ {$ELSE}
+ SEC_WINNT_AUTH_IDENTITY_EX = SEC_WINNT_AUTH_IDENTITY_EXA;
+ {$EXTERNALSYM SEC_WINNT_AUTH_IDENTITY_EX}
+ PSEC_WINNT_AUTH_IDENTITY_EX = PSEC_WINNT_AUTH_IDENTITY_EXA;
+ {$EXTERNALSYM PSEC_WINNT_AUTH_IDENTITY_EX}
+ TSecWinNTAuthIdentityEx = TSecWinNTAuthIdentityExA;
+ PSecWinNTAuthIdentityEx = PSecWinNTAuthIdentityExA;
+ {$ENDIF UNICODE}
+
+//
+// Common types used by negotiable security packages
+//
+
+const
+ SEC_WINNT_AUTH_IDENTITY_MARSHALLED = $4; // all data is in one buffer
+ {$EXTERNALSYM SEC_WINNT_AUTH_IDENTITY_MARSHALLED}
+ SEC_WINNT_AUTH_IDENTITY_ONLY = $8; // these credentials are for identity only - no PAC needed
+ {$EXTERNALSYM SEC_WINNT_AUTH_IDENTITY_ONLY}
+
+//
+// Routines for manipulating packages
+//
+
+type
+ _SECURITY_PACKAGE_OPTIONS = record
+ Size: Cardinal;
+ Type_: Cardinal;
+ Flags: Cardinal;
+ SignatureSize: Cardinal;
+ Signature: Pointer;
+ end;
+ {$EXTERNALSYM _SECURITY_PACKAGE_OPTIONS}
+ SECURITY_PACKAGE_OPTIONS = _SECURITY_PACKAGE_OPTIONS;
+ {$EXTERNALSYM SECURITY_PACKAGE_OPTIONS}
+ PSECURITY_PACKAGE_OPTIONS = ^SECURITY_PACKAGE_OPTIONS;
+ TSecurityPackageOptions = SECURITY_PACKAGE_OPTIONS;
+ PSecurityPackageOptions = PSECURITY_PACKAGE_OPTIONS;
+
+const
+ SECPKG_OPTIONS_TYPE_UNKNOWN = 0;
+ {$EXTERNALSYM SECPKG_OPTIONS_TYPE_UNKNOWN}
+ SECPKG_OPTIONS_TYPE_LSA = 1;
+ {$EXTERNALSYM SECPKG_OPTIONS_TYPE_LSA}
+ SECPKG_OPTIONS_TYPE_SSPI = 2;
+ {$EXTERNALSYM SECPKG_OPTIONS_TYPE_SSPI}
+
+ SECPKG_OPTIONS_PERMANENT = $00000001;
+ {$EXTERNALSYM SECPKG_OPTIONS_PERMANENT}
+
+function AddSecurityPackageA(pszPackageName: PSEC_CHAR; Options: PSECURITY_PACKAGE_OPTIONS): SECURITY_STATUS; stdcall;
+{$EXTERNALSYM AddSecurityPackageA}
+
+function AddSecurityPackageW(pszPackageName: PSEC_WCHAR; Options: PSECURITY_PACKAGE_OPTIONS): SECURITY_STATUS; stdcall;
+{$EXTERNALSYM AddSecurityPackageW}
+
+{$IFDEF UNICODE}
+function AddSecurityPackage(pszPackageName: PSEC_WCHAR; Options: PSECURITY_PACKAGE_OPTIONS): SECURITY_STATUS; stdcall;
+{$EXTERNALSYM AddSecurityPackage}
+{$ELSE}
+function AddSecurityPackage(pszPackageName: PSEC_CHAR; Options: PSECURITY_PACKAGE_OPTIONS): SECURITY_STATUS; stdcall;
+{$EXTERNALSYM AddSecurityPackage}
+{$ENDIF UNICODE}
+
+function DeleteSecurityPackageA(pszPackageName: PSEC_CHAR): SECURITY_STATUS; stdcall;
+{$EXTERNALSYM DeleteSecurityPackageA}
+
+function DeleteSecurityPackageW(pszPackageName: PSEC_WCHAR): SECURITY_STATUS; stdcall;
+{$EXTERNALSYM DeleteSecurityPackageW}
+
+{$IFDEF UNICODE}
+function DeleteSecurityPackage(pszPackageName: PSEC_WCHAR): SECURITY_STATUS; stdcall;
+{$EXTERNALSYM DeleteSecurityPackage}
+{$ELSE}
+function DeleteSecurityPackage(pszPackageName: PSEC_CHAR): SECURITY_STATUS; stdcall;
+{$EXTERNALSYM DeleteSecurityPackage}
+{$ENDIF UNICODE}
+
+implementation
+
+const
+ secur32 = 'secur32.dll';
+ {$IFDEF UNICODE}
+ AWSuffix = 'W';
+ {$ELSE}
+ AWSuffix = 'A';
+ {$ENDIF UNICODE}
+
+procedure SecInvalidateHandle(var x: SecHandle);
+begin
+ x.dwLower := ULONG_PTR(-1);
+ x.dwUpper := ULONG_PTR(-1);
+end;
+
+function SecIsValidHandle(x: SecHandle): Boolean;
+begin
+ Result := (x.dwLower <> ULONG_PTR(-1)) and (x.dwUpper <> ULONG_PTR(-1));
+end;
+
+function FreeCredentialHandle(phCredential: PCredHandle): SECURITY_STATUS;
+begin
+ Result := FreeCredentialsHandle(phCredential);
+end;
+
+//function SspiLogonUserW; external secur32 name 'SspiLogonUserW';
+//function SspiLogonUserA; external secur32 name 'SspiLogonUserA';
+//{$IFDEF UNICODE}
+//function SspiLogonUser; external secur32 name 'SspiLogonUserW';
+//{$ELSE}
+//function SspiLogonUser; external secur32 name 'SspiLogonUserA';
+//{$ENDIF UNICODE}
+
+//function DelegateSecurityContext; external secur32 name 'DelegateSecurityContext';
+
+{$IFDEF DYNAMIC_LINK}
+
+var
+ _AcquireCredentialsHandleW: Pointer;
+
+function AcquireCredentialsHandleW;
+begin
+ GetProcedureAddress(_AcquireCredentialsHandleW, secur32, 'AcquireCredentialsHandleW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_AcquireCredentialsHandleW]
+ end;
+end;
+
+var
+ _AcquireCredentialsHandleA: Pointer;
+
+function AcquireCredentialsHandleA;
+begin
+ GetProcedureAddress(_AcquireCredentialsHandleA, secur32, 'AcquireCredentialsHandleA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_AcquireCredentialsHandleA]
+ end;
+end;
+
+var
+ _AcquireCredentialsHandle: Pointer;
+
+function AcquireCredentialsHandle;
+begin
+ GetProcedureAddress(_AcquireCredentialsHandle, secur32, 'AcquireCredentialsHandle' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_AcquireCredentialsHandle]
+ end;
+end;
+
+var
+ _FreeCredentialsHandle: Pointer;
+
+function FreeCredentialsHandle;
+begin
+ GetProcedureAddress(_FreeCredentialsHandle, secur32, 'FreeCredentialsHandle');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_FreeCredentialsHandle]
+ end;
+end;
+
+var
+ _AddCredentialsW: Pointer;
+
+function AddCredentialsW;
+begin
+ GetProcedureAddress(_AddCredentialsW, secur32, 'AddCredentialsW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_AddCredentialsW]
+ end;
+end;
+
+var
+ _AddCredentialsA: Pointer;
+
+function AddCredentialsA;
+begin
+ GetProcedureAddress(_AddCredentialsA, secur32, 'AddCredentialsA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_AddCredentialsA]
+ end;
+end;
+
+var
+ _AddCredentials: Pointer;
+
+function AddCredentials;
+begin
+ GetProcedureAddress(_AddCredentials, secur32, 'AddCredentials' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_AddCredentials]
+ end;
+end;
+
+var
+ _InitializeSecurityContextW: Pointer;
+
+function InitializeSecurityContextW;
+begin
+ GetProcedureAddress(_InitializeSecurityContextW, secur32, 'InitializeSecurityContextW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_InitializeSecurityContextW]
+ end;
+end;
+
+var
+ _InitializeSecurityContextA: Pointer;
+
+function InitializeSecurityContextA;
+begin
+ GetProcedureAddress(_InitializeSecurityContextA, secur32, 'InitializeSecurityContextA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_InitializeSecurityContextA]
+ end;
+end;
+
+var
+ _InitializeSecurityContext: Pointer;
+
+function InitializeSecurityContext;
+begin
+ GetProcedureAddress(_InitializeSecurityContext, secur32, 'InitializeSecurityContext' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_InitializeSecurityContext]
+ end;
+end;
+
+var
+ _AcceptSecurityContext: Pointer;
+
+function AcceptSecurityContext;
+begin
+ GetProcedureAddress(_AcceptSecurityContext, secur32, 'AcceptSecurityContext');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_AcceptSecurityContext]
+ end;
+end;
+
+var
+ _CompleteAuthToken: Pointer;
+
+function CompleteAuthToken;
+begin
+ GetProcedureAddress(_CompleteAuthToken, secur32, 'CompleteAuthToken');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CompleteAuthToken]
+ end;
+end;
+
+var
+ _ImpersonateSecurityContext: Pointer;
+
+function ImpersonateSecurityContext;
+begin
+ GetProcedureAddress(_ImpersonateSecurityContext, secur32, 'ImpersonateSecurityContext');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ImpersonateSecurityContext]
+ end;
+end;
+
+var
+ _RevertSecurityContext: Pointer;
+
+function RevertSecurityContext;
+begin
+ GetProcedureAddress(_RevertSecurityContext, secur32, 'RevertSecurityContext');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RevertSecurityContext]
+ end;
+end;
+
+var
+ _QuerySecurityContextToken: Pointer;
+
+function QuerySecurityContextToken;
+begin
+ GetProcedureAddress(_QuerySecurityContextToken, secur32, 'QuerySecurityContextToken');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_QuerySecurityContextToken]
+ end;
+end;
+
+var
+ _DeleteSecurityContext: Pointer;
+
+function DeleteSecurityContext;
+begin
+ GetProcedureAddress(_DeleteSecurityContext, secur32, 'DeleteSecurityContext');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DeleteSecurityContext]
+ end;
+end;
+
+var
+ _ApplyControlToken: Pointer;
+
+function ApplyControlToken;
+begin
+ GetProcedureAddress(_ApplyControlToken, secur32, 'ApplyControlToken');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ApplyControlToken]
+ end;
+end;
+
+var
+ _QueryContextAttributesW: Pointer;
+
+function QueryContextAttributesW;
+begin
+ GetProcedureAddress(_QueryContextAttributesW, secur32, 'QueryContextAttributesW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_QueryContextAttributesW]
+ end;
+end;
+
+var
+ _QueryContextAttributesA: Pointer;
+
+function QueryContextAttributesA;
+begin
+ GetProcedureAddress(_QueryContextAttributesA, secur32, 'QueryContextAttributesA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_QueryContextAttributesA]
+ end;
+end;
+
+var
+ _QueryContextAttributes: Pointer;
+
+function QueryContextAttributes;
+begin
+ GetProcedureAddress(_QueryContextAttributes, secur32, 'QueryContextAttributes' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_QueryContextAttributes]
+ end;
+end;
+
+var
+ _SetContextAttributesW: Pointer;
+
+function SetContextAttributesW;
+begin
+ GetProcedureAddress(_SetContextAttributesW, secur32, 'SetContextAttributesW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetContextAttributesW]
+ end;
+end;
+
+var
+ _SetContextAttributesA: Pointer;
+
+function SetContextAttributesA;
+begin
+ GetProcedureAddress(_SetContextAttributesA, secur32, 'SetContextAttributesA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetContextAttributesA]
+ end;
+end;
+
+var
+ _SetContextAttributes: Pointer;
+
+function SetContextAttributes;
+begin
+ GetProcedureAddress(_SetContextAttributes, secur32, 'SetContextAttributes' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetContextAttributes]
+ end;
+end;
+
+var
+ _QueryCredentialsAttributesW: Pointer;
+
+function QueryCredentialsAttributesW;
+begin
+ GetProcedureAddress(_QueryCredentialsAttributesW, secur32, 'QueryCredentialsAttributesW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_QueryCredentialsAttributesW]
+ end;
+end;
+
+var
+ _QueryCredentialsAttributesA: Pointer;
+
+function QueryCredentialsAttributesA;
+begin
+ GetProcedureAddress(_QueryCredentialsAttributesA, secur32, 'QueryCredentialsAttributesA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_QueryCredentialsAttributesA]
+ end;
+end;
+
+var
+ _QueryCredentialsAttributes: Pointer;
+
+function QueryCredentialsAttributes;
+begin
+ GetProcedureAddress(_QueryCredentialsAttributes, secur32, 'QueryCredentialsAttributes' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_QueryCredentialsAttributes]
+ end;
+end;
+
+var
+ _FreeContextBuffer: Pointer;
+
+function FreeContextBuffer;
+begin
+ GetProcedureAddress(_FreeContextBuffer, secur32, 'FreeContextBuffer');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_FreeContextBuffer]
+ end;
+end;
+
+var
+ _MakeSignature: Pointer;
+
+function MakeSignature;
+begin
+ GetProcedureAddress(_MakeSignature, secur32, 'MakeSignature');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MakeSignature]
+ end;
+end;
+
+var
+ _VerifySignature: Pointer;
+
+function VerifySignature;
+begin
+ GetProcedureAddress(_VerifySignature, secur32, 'VerifySignature');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_VerifySignature]
+ end;
+end;
+
+var
+ _EncryptMessage: Pointer;
+
+function EncryptMessage;
+begin
+ GetProcedureAddress(_EncryptMessage, secur32, 'EncryptMessage');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_EncryptMessage]
+ end;
+end;
+
+var
+ _DecryptMessage: Pointer;
+
+function DecryptMessage;
+begin
+ GetProcedureAddress(_DecryptMessage, secur32, 'DecryptMessage');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DecryptMessage]
+ end;
+end;
+
+var
+ _EnumerateSecurityPackagesW: Pointer;
+
+function EnumerateSecurityPackagesW;
+begin
+ GetProcedureAddress(_EnumerateSecurityPackagesW, secur32, 'EnumerateSecurityPackagesW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_EnumerateSecurityPackagesW]
+ end;
+end;
+
+var
+ _EnumerateSecurityPackagesA: Pointer;
+
+function EnumerateSecurityPackagesA;
+begin
+ GetProcedureAddress(_EnumerateSecurityPackagesA, secur32, 'EnumerateSecurityPackagesA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_EnumerateSecurityPackagesA]
+ end;
+end;
+
+var
+ _EnumerateSecurityPackages: Pointer;
+
+function EnumerateSecurityPackages;
+begin
+ GetProcedureAddress(_EnumerateSecurityPackages, secur32, 'EnumerateSecurityPackages' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_EnumerateSecurityPackages]
+ end;
+end;
+
+var
+ _QuerySecurityPackageInfoW: Pointer;
+
+function QuerySecurityPackageInfoW;
+begin
+ GetProcedureAddress(_QuerySecurityPackageInfoW, secur32, 'QuerySecurityPackageInfoW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_QuerySecurityPackageInfoW]
+ end;
+end;
+
+var
+ _QuerySecurityPackageInfoA: Pointer;
+
+function QuerySecurityPackageInfoA;
+begin
+ GetProcedureAddress(_QuerySecurityPackageInfoA, secur32, 'QuerySecurityPackageInfoA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_QuerySecurityPackageInfoA]
+ end;
+end;
+
+var
+ _QuerySecurityPackageInfo: Pointer;
+
+function QuerySecurityPackageInfo;
+begin
+ GetProcedureAddress(_QuerySecurityPackageInfo, secur32, 'QuerySecurityPackageInfo' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_QuerySecurityPackageInfo]
+ end;
+end;
+
+var
+ _ExportSecurityContext: Pointer;
+
+function ExportSecurityContext;
+begin
+ GetProcedureAddress(_ExportSecurityContext, secur32, 'ExportSecurityContext');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ExportSecurityContext]
+ end;
+end;
+
+var
+ _ImportSecurityContextW: Pointer;
+
+function ImportSecurityContextW;
+begin
+ GetProcedureAddress(_ImportSecurityContextW, secur32, 'ImportSecurityContextW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ImportSecurityContextW]
+ end;
+end;
+
+var
+ _ImportSecurityContextA: Pointer;
+
+function ImportSecurityContextA;
+begin
+ GetProcedureAddress(_ImportSecurityContextA, secur32, 'ImportSecurityContextA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ImportSecurityContextA]
+ end;
+end;
+
+var
+ _ImportSecurityContext: Pointer;
+
+function ImportSecurityContext;
+begin
+ GetProcedureAddress(_ImportSecurityContext, secur32, 'ImportSecurityContext' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ImportSecurityContext]
+ end;
+end;
+
+var
+ _InitSecurityInterfaceA: Pointer;
+
+function InitSecurityInterfaceA;
+begin
+ GetProcedureAddress(_InitSecurityInterfaceA, secur32, 'InitSecurityInterfaceA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_InitSecurityInterfaceA]
+ end;
+end;
+
+var
+ _InitSecurityInterfaceW: Pointer;
+
+function InitSecurityInterfaceW;
+begin
+ GetProcedureAddress(_InitSecurityInterfaceW, secur32, 'InitSecurityInterfaceW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_InitSecurityInterfaceW]
+ end;
+end;
+
+var
+ _InitSecurityInterface: Pointer;
+
+function InitSecurityInterface;
+begin
+ GetProcedureAddress(_InitSecurityInterface, secur32, 'InitSecurityInterface' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_InitSecurityInterface]
+ end;
+end;
+
+var
+ _SaslEnumerateProfilesA: Pointer;
+
+function SaslEnumerateProfilesA;
+begin
+ GetProcedureAddress(_SaslEnumerateProfilesA, secur32, 'SaslEnumerateProfilesA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SaslEnumerateProfilesA]
+ end;
+end;
+
+var
+ _SaslEnumerateProfilesW: Pointer;
+
+function SaslEnumerateProfilesW;
+begin
+ GetProcedureAddress(_SaslEnumerateProfilesW, secur32, 'SaslEnumerateProfilesW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SaslEnumerateProfilesW]
+ end;
+end;
+
+var
+ _SaslEnumerateProfiles: Pointer;
+
+function SaslEnumerateProfiles;
+begin
+ GetProcedureAddress(_SaslEnumerateProfiles, secur32, 'SaslEnumerateProfiles' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SaslEnumerateProfiles]
+ end;
+end;
+
+var
+ _SaslGetProfilePackageA: Pointer;
+
+function SaslGetProfilePackageA;
+begin
+ GetProcedureAddress(_SaslGetProfilePackageA, secur32, 'SaslGetProfilePackageA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SaslGetProfilePackageA]
+ end;
+end;
+
+var
+ _SaslGetProfilePackageW: Pointer;
+
+function SaslGetProfilePackageW;
+begin
+ GetProcedureAddress(_SaslGetProfilePackageW, secur32, 'SaslGetProfilePackageW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SaslGetProfilePackageW]
+ end;
+end;
+
+var
+ _SaslGetProfilePackage: Pointer;
+
+function SaslGetProfilePackage;
+begin
+ GetProcedureAddress(_SaslGetProfilePackage, secur32, 'SaslGetProfilePackage' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SaslGetProfilePackage]
+ end;
+end;
+
+var
+ _SaslIdentifyPackageA: Pointer;
+
+function SaslIdentifyPackageA;
+begin
+ GetProcedureAddress(_SaslIdentifyPackageA, secur32, 'SaslIdentifyPackageA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SaslIdentifyPackageA]
+ end;
+end;
+
+var
+ _SaslIdentifyPackageW: Pointer;
+
+function SaslIdentifyPackageW;
+begin
+ GetProcedureAddress(_SaslIdentifyPackageW, secur32, 'SaslIdentifyPackageW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SaslIdentifyPackageW]
+ end;
+end;
+
+var
+ _SaslIdentifyPackage: Pointer;
+
+function SaslIdentifyPackage;
+begin
+ GetProcedureAddress(_SaslIdentifyPackage, secur32, 'SaslIdentifyPackage' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SaslIdentifyPackage]
+ end;
+end;
+
+var
+ _SaslInitializeSecurityContextW: Pointer;
+
+function SaslInitializeSecurityContextW;
+begin
+ GetProcedureAddress(_SaslInitializeSecurityContextW, secur32, 'SaslInitializeSecurityContextW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SaslInitializeSecurityContextW]
+ end;
+end;
+
+var
+ _SaslInitializeSecurityContextA: Pointer;
+
+function SaslInitializeSecurityContextA;
+begin
+ GetProcedureAddress(_SaslInitializeSecurityContextA, secur32, 'SaslInitializeSecurityContextA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SaslInitializeSecurityContextA]
+ end;
+end;
+
+var
+ _SaslInitializeSecurityContext: Pointer;
+
+function SaslInitializeSecurityContext;
+begin
+ GetProcedureAddress(_SaslInitializeSecurityContext, secur32, 'SaslInitializeSecurityContext' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SaslInitializeSecurityContext]
+ end;
+end;
+
+var
+ _SaslAcceptSecurityContext: Pointer;
+
+function SaslAcceptSecurityContext;
+begin
+ GetProcedureAddress(_SaslAcceptSecurityContext, secur32, 'SaslAcceptSecurityContext');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SaslAcceptSecurityContext]
+ end;
+end;
+
+var
+ _SaslSetContextOption: Pointer;
+
+function SaslSetContextOption;
+begin
+ GetProcedureAddress(_SaslSetContextOption, secur32, 'SaslSetContextOption');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SaslSetContextOption]
+ end;
+end;
+
+var
+ _SaslGetContextOption: Pointer;
+
+function SaslGetContextOption;
+begin
+ GetProcedureAddress(_SaslGetContextOption, secur32, 'SaslGetContextOption');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SaslGetContextOption]
+ end;
+end;
+
+var
+ _AddSecurityPackageA: Pointer;
+
+function AddSecurityPackageA;
+begin
+ GetProcedureAddress(_AddSecurityPackageA, secur32, 'AddSecurityPackageA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_AddSecurityPackageA]
+ end;
+end;
+
+var
+ _AddSecurityPackageW: Pointer;
+
+function AddSecurityPackageW;
+begin
+ GetProcedureAddress(_AddSecurityPackageW, secur32, 'AddSecurityPackageW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_AddSecurityPackageW]
+ end;
+end;
+
+var
+ _AddSecurityPackage: Pointer;
+
+function AddSecurityPackage;
+begin
+ GetProcedureAddress(_AddSecurityPackage, secur32, 'AddSecurityPackage' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_AddSecurityPackage]
+ end;
+end;
+
+var
+ _DeleteSecurityPackageA: Pointer;
+
+function DeleteSecurityPackageA;
+begin
+ GetProcedureAddress(_DeleteSecurityPackageA, secur32, 'DeleteSecurityPackageA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DeleteSecurityPackageA]
+ end;
+end;
+
+var
+ _DeleteSecurityPackageW: Pointer;
+
+function DeleteSecurityPackageW;
+begin
+ GetProcedureAddress(_DeleteSecurityPackageW, secur32, 'DeleteSecurityPackageW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DeleteSecurityPackageW]
+ end;
+end;
+
+var
+ _DeleteSecurityPackage: Pointer;
+
+function DeleteSecurityPackage;
+begin
+ GetProcedureAddress(_DeleteSecurityPackage, secur32, 'DeleteSecurityPackage' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DeleteSecurityPackage]
+ end;
+end;
+
+{$ELSE}
+
+function AcquireCredentialsHandleW; external secur32 name 'AcquireCredentialsHandleW';
+function AcquireCredentialsHandleA; external secur32 name 'AcquireCredentialsHandleA';
+function AcquireCredentialsHandle; external secur32 name 'AcquireCredentialsHandle' + AWSuffix;
+function FreeCredentialsHandle; external secur32 name 'FreeCredentialsHandle';
+function AddCredentialsW; external secur32 name 'AddCredentialsW';
+function AddCredentialsA; external secur32 name 'AddCredentialsA';
+function AddCredentials; external secur32 name 'AddCredentials' + AWSuffix;
+function InitializeSecurityContextW; external secur32 name 'InitializeSecurityContextW';
+function InitializeSecurityContextA; external secur32 name 'InitializeSecurityContextA';
+function InitializeSecurityContext; external secur32 name 'InitializeSecurityContext' + AWSuffix;
+function AcceptSecurityContext; external secur32 name 'AcceptSecurityContext';
+function CompleteAuthToken; external secur32 name 'CompleteAuthToken';
+function ImpersonateSecurityContext; external secur32 name 'ImpersonateSecurityContext';
+function RevertSecurityContext; external secur32 name 'RevertSecurityContext';
+function QuerySecurityContextToken; external secur32 name 'QuerySecurityContextToken';
+function DeleteSecurityContext; external secur32 name 'DeleteSecurityContext';
+function ApplyControlToken; external secur32 name 'ApplyControlToken';
+function QueryContextAttributesW; external secur32 name 'QueryContextAttributesW';
+function QueryContextAttributesA; external secur32 name 'QueryContextAttributesA';
+function QueryContextAttributes; external secur32 name 'QueryContextAttributes' + AWSuffix;
+function SetContextAttributesW; external secur32 name 'SetContextAttributesW';
+function SetContextAttributesA; external secur32 name 'SetContextAttributesA';
+function SetContextAttributes; external secur32 name 'SetContextAttributes' + AWSuffix;
+function QueryCredentialsAttributesW; external secur32 name 'QueryCredentialsAttributesW';
+function QueryCredentialsAttributesA; external secur32 name 'QueryCredentialsAttributesA';
+function QueryCredentialsAttributes; external secur32 name 'QueryCredentialsAttributes' + AWSuffix;
+function FreeContextBuffer; external secur32 name 'FreeContextBuffer';
+function MakeSignature; external secur32 name 'MakeSignature';
+function VerifySignature; external secur32 name 'VerifySignature';
+function EncryptMessage; external secur32 name 'EncryptMessage';
+function DecryptMessage; external secur32 name 'DecryptMessage';
+function EnumerateSecurityPackagesW; external secur32 name 'EnumerateSecurityPackagesW';
+function EnumerateSecurityPackagesA; external secur32 name 'EnumerateSecurityPackagesA';
+function EnumerateSecurityPackages; external secur32 name 'EnumerateSecurityPackages' + AWSuffix;
+function QuerySecurityPackageInfoW; external secur32 name 'QuerySecurityPackageInfoW';
+function QuerySecurityPackageInfoA; external secur32 name 'QuerySecurityPackageInfoA';
+function QuerySecurityPackageInfo; external secur32 name 'QuerySecurityPackageInfo' + AWSuffix;
+function ExportSecurityContext; external secur32 name 'ExportSecurityContext';
+function ImportSecurityContextW; external secur32 name 'ImportSecurityContextW';
+function ImportSecurityContextA; external secur32 name 'ImportSecurityContextA';
+function ImportSecurityContext; external secur32 name 'ImportSecurityContext' + AWSuffix;
+function InitSecurityInterfaceA; external secur32 name 'InitSecurityInterfaceA';
+function InitSecurityInterfaceW; external secur32 name 'InitSecurityInterfaceW';
+function InitSecurityInterface; external secur32 name 'InitSecurityInterface' + AWSuffix;
+function SaslEnumerateProfilesA; external secur32 name 'SaslEnumerateProfilesA';
+function SaslEnumerateProfilesW; external secur32 name 'SaslEnumerateProfilesW';
+function SaslEnumerateProfiles; external secur32 name 'SaslEnumerateProfiles' + AWSuffix;
+function SaslGetProfilePackageA; external secur32 name 'SaslGetProfilePackageA';
+function SaslGetProfilePackageW; external secur32 name 'SaslGetProfilePackageW';
+function SaslGetProfilePackage; external secur32 name 'SaslGetProfilePackage' + AWSuffix;
+function SaslIdentifyPackageA; external secur32 name 'SaslIdentifyPackageA';
+function SaslIdentifyPackageW; external secur32 name 'SaslIdentifyPackageW';
+function SaslIdentifyPackage; external secur32 name 'SaslIdentifyPackage' + AWSuffix;
+function SaslInitializeSecurityContextW; external secur32 name 'SaslInitializeSecurityContextW';
+function SaslInitializeSecurityContextA; external secur32 name 'SaslInitializeSecurityContextA';
+function SaslInitializeSecurityContext; external secur32 name 'SaslInitializeSecurityContext' + AWSuffix;
+function SaslAcceptSecurityContext; external secur32 name 'SaslAcceptSecurityContext';
+function SaslSetContextOption; external secur32 name 'SaslSetContextOption';
+function SaslGetContextOption; external secur32 name 'SaslGetContextOption';
+function AddSecurityPackageA; external secur32 name 'AddSecurityPackageA';
+function AddSecurityPackageW; external secur32 name 'AddSecurityPackageW';
+function AddSecurityPackage; external secur32 name 'AddSecurityPackage' + AWSuffix;
+function DeleteSecurityPackageA; external secur32 name 'DeleteSecurityPackageA';
+function DeleteSecurityPackageW; external secur32 name 'DeleteSecurityPackageW';
+function DeleteSecurityPackage; external secur32 name 'DeleteSecurityPackage' + AWSuffix;
+
+{$ENDIF DYNAMIC_LINK}
+
+end.
diff --git a/packages/extra/winunits/jwasubauth.pas b/packages/extra/winunits/jwasubauth.pas
index 3acbf0cf85..ff9fd67fa2 100644
--- a/packages/extra/winunits/jwasubauth.pas
+++ b/packages/extra/winunits/jwasubauth.pas
@@ -1,511 +1,511 @@
-{******************************************************************************}
-{ }
-{ Subauthentication packages API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: subauth.h, released June 2000. The original Pascal }
-{ code is: SubAuth.pas, released December 2000. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwasubauth.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaSubAuth;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "subauth.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaWinType;
-
-type
- SAM_HANDLE = PVOID;
- {$EXTERNALSYM SAM_HANDLE}
- PSAM_HANDLE = ^SAM_HANDLE;
- {$EXTERNALSYM PSAM_HANDLE}
-
- POLD_LARGE_INTEGER = ^OLD_LARGE_INTEGER;
- {$EXTERNALSYM POLD_LARGE_INTEGER}
- _OLD_LARGE_INTEGER = record
- LowPart: ULONG;
- HighPart: LONG;
- end;
- {$EXTERNALSYM _OLD_LARGE_INTEGER}
- OLD_LARGE_INTEGER = _OLD_LARGE_INTEGER;
- {$EXTERNALSYM OLD_LARGE_INTEGER}
- TOldLargeInteger = OLD_LARGE_INTEGER;
- POldLargeInteger = POLD_LARGE_INTEGER;
-
-//
-// User account control flags...
-//
-
-const
- USER_ACCOUNT_DISABLED = $00000001;
- {$EXTERNALSYM USER_ACCOUNT_DISABLED}
- USER_HOME_DIRECTORY_REQUIRED = $00000002;
- {$EXTERNALSYM USER_HOME_DIRECTORY_REQUIRED}
- USER_PASSWORD_NOT_REQUIRED = $00000004;
- {$EXTERNALSYM USER_PASSWORD_NOT_REQUIRED}
- USER_TEMP_DUPLICATE_ACCOUNT = $00000008;
- {$EXTERNALSYM USER_TEMP_DUPLICATE_ACCOUNT}
- USER_NORMAL_ACCOUNT = $00000010;
- {$EXTERNALSYM USER_NORMAL_ACCOUNT}
- USER_MNS_LOGON_ACCOUNT = $00000020;
- {$EXTERNALSYM USER_MNS_LOGON_ACCOUNT}
- USER_INTERDOMAIN_TRUST_ACCOUNT = $00000040;
- {$EXTERNALSYM USER_INTERDOMAIN_TRUST_ACCOUNT}
- USER_WORKSTATION_TRUST_ACCOUNT = $00000080;
- {$EXTERNALSYM USER_WORKSTATION_TRUST_ACCOUNT}
- USER_SERVER_TRUST_ACCOUNT = $00000100;
- {$EXTERNALSYM USER_SERVER_TRUST_ACCOUNT}
- USER_DONT_EXPIRE_PASSWORD = $00000200;
- {$EXTERNALSYM USER_DONT_EXPIRE_PASSWORD}
- USER_ACCOUNT_AUTO_LOCKED = $00000400;
- {$EXTERNALSYM USER_ACCOUNT_AUTO_LOCKED}
- USER_ENCRYPTED_TEXT_PASSWORD_ALLOWED = $00000800;
- {$EXTERNALSYM USER_ENCRYPTED_TEXT_PASSWORD_ALLOWED}
- USER_SMARTCARD_REQUIRED = $00001000;
- {$EXTERNALSYM USER_SMARTCARD_REQUIRED}
- USER_TRUSTED_FOR_DELEGATION = $00002000;
- {$EXTERNALSYM USER_TRUSTED_FOR_DELEGATION}
- USER_NOT_DELEGATED = $00004000;
- {$EXTERNALSYM USER_NOT_DELEGATED}
- USER_USE_DES_KEY_ONLY = $00008000;
- {$EXTERNALSYM USER_USE_DES_KEY_ONLY}
- USER_DONT_REQUIRE_PREAUTH = $00010000;
- {$EXTERNALSYM USER_DONT_REQUIRE_PREAUTH}
- USER_PASSWORD_EXPIRED = $00020000;
- {$EXTERNALSYM USER_PASSWORD_EXPIRED}
- USER_TRUSTED_TO_AUTHENTICATE_FOR_DELEGATION = $00040000;
- {$EXTERNALSYM USER_TRUSTED_TO_AUTHENTICATE_FOR_DELEGATION}
- NEXT_FREE_ACCOUNT_CONTROL_BIT = USER_TRUSTED_TO_AUTHENTICATE_FOR_DELEGATION shl 1;
- {$EXTERNALSYM NEXT_FREE_ACCOUNT_CONTROL_BIT}
-
- USER_MACHINE_ACCOUNT_MASK = USER_INTERDOMAIN_TRUST_ACCOUNT or USER_WORKSTATION_TRUST_ACCOUNT or USER_SERVER_TRUST_ACCOUNT;
- {$EXTERNALSYM USER_MACHINE_ACCOUNT_MASK}
- USER_ACCOUNT_TYPE_MASK = USER_TEMP_DUPLICATE_ACCOUNT or USER_NORMAL_ACCOUNT or USER_MACHINE_ACCOUNT_MASK;
- {$EXTERNALSYM USER_ACCOUNT_TYPE_MASK}
-
- USER_COMPUTED_ACCOUNT_CONTROL_BITS = USER_ACCOUNT_AUTO_LOCKED or USER_PASSWORD_EXPIRED;
- {$EXTERNALSYM USER_COMPUTED_ACCOUNT_CONTROL_BITS}
-
-//
-// Logon times may be expressed in day, hour, or minute granularity.
-//
-// Days per week = 7
-// Hours per week = 168
-// Minutes per week = 10080
-//
-
- SAM_DAYS_PER_WEEK = 7;
- {$EXTERNALSYM SAM_DAYS_PER_WEEK}
- SAM_HOURS_PER_WEEK = 24 * SAM_DAYS_PER_WEEK;
- {$EXTERNALSYM SAM_HOURS_PER_WEEK}
- SAM_MINUTES_PER_WEEK = 60 * SAM_HOURS_PER_WEEK;
- {$EXTERNALSYM SAM_MINUTES_PER_WEEK}
-
-type
- PLOGON_HOURS = ^LOGON_HOURS;
- {$EXTERNALSYM PLOGON_HOURS}
- _LOGON_HOURS = record
- UnitsPerWeek: USHORT;
- //
- // UnitsPerWeek is the number of equal length time units the week is
- // divided into. This value is used to compute the length of the bit
- // string in logon_hours. Must be less than or equal to
- // SAM_UNITS_PER_WEEK (10080) for this release.
- //
- // LogonHours is a bit map of valid logon times. Each bit represents
- // a unique division in a week. The largest bit map supported is 1260
- // bytes (10080 bits), which represents minutes per week. In this case
- // the first bit (bit 0, byte 0) is Sunday, 00:00:00 - 00-00:59; bit 1,
- // byte 0 is Sunday, 00:01:00 - 00:01:59, etc. A NULL pointer means
- // DONT_CHANGE for SamSetInformationUser() calls.
- //
- LogonHours: PUCHAR;
- end;
- {$EXTERNALSYM _LOGON_HOURS}
- LOGON_HOURS = _LOGON_HOURS;
- {$EXTERNALSYM LOGON_HOURS}
- TLogonHours = LOGON_HOURS;
- PLogonHours = PLOGON_HOURS;
-
- PSR_SECURITY_DESCRIPTOR = ^SR_SECURITY_DESCRIPTOR;
- {$EXTERNALSYM PSR_SECURITY_DESCRIPTOR}
- _SR_SECURITY_DESCRIPTOR = record
- Length: ULONG;
- SecurityDescriptor: PUCHAR;
- end;
- {$EXTERNALSYM _SR_SECURITY_DESCRIPTOR}
- SR_SECURITY_DESCRIPTOR = _SR_SECURITY_DESCRIPTOR;
- {$EXTERNALSYM SR_SECURITY_DESCRIPTOR}
- TSrSecurityDescriptor = SR_SECURITY_DESCRIPTOR;
- PSrSecurityDescriptor = PSR_SECURITY_DESCRIPTOR;
-
-// #include "pshpack4.h"
-
- PUSER_ALL_INFORMATION = ^USER_ALL_INFORMATION;
- {$EXTERNALSYM PUSER_ALL_INFORMATION}
- _USER_ALL_INFORMATION = record
- LastLogon: LARGE_INTEGER;
- LastLogoff: LARGE_INTEGER;
- PasswordLastSet: LARGE_INTEGER;
- AccountExpires: LARGE_INTEGER;
- PasswordCanChange: LARGE_INTEGER;
- PasswordMustChange: LARGE_INTEGER;
- UserName: UNICODE_STRING;
- FullName: UNICODE_STRING;
- HomeDirectory: UNICODE_STRING;
- HomeDirectoryDrive: UNICODE_STRING;
- ScriptPath: UNICODE_STRING;
- ProfilePath: UNICODE_STRING;
- AdminComment: UNICODE_STRING;
- WorkStations: UNICODE_STRING;
- UserComment: UNICODE_STRING;
- Parameters: UNICODE_STRING;
- LmPassword: UNICODE_STRING;
- NtPassword: UNICODE_STRING;
- PrivateData: UNICODE_STRING;
- SecurityDescriptor: SR_SECURITY_DESCRIPTOR;
- UserId: ULONG;
- PrimaryGroupId: ULONG;
- UserAccountControl: ULONG;
- WhichFields: ULONG;
- LogonHours: LOGON_HOURS;
- BadPasswordCount: USHORT;
- LogonCount: USHORT;
- CountryCode: USHORT;
- CodePage: USHORT;
- LmPasswordPresent: ByteBool;
- NtPasswordPresent: ByteBool;
- PasswordExpired: ByteBool;
- PrivateDataSensitive: ByteBool;
- end;
- {$EXTERNALSYM _USER_ALL_INFORMATION}
- USER_ALL_INFORMATION = _USER_ALL_INFORMATION;
- {$EXTERNALSYM USER_ALL_INFORMATION}
- TUserAllInformation = USER_ALL_INFORMATION;
- PUserAllInformation = PUSER_ALL_INFORMATION;
-
-// #include "poppack.h"
-
-const
- USER_ALL_PARAMETERS = $00200000;
- {$EXTERNALSYM USER_ALL_PARAMETERS}
-
- CLEAR_BLOCK_LENGTH = 8;
- {$EXTERNALSYM CLEAR_BLOCK_LENGTH}
-
-type
- PCLEAR_BLOCK = ^CLEAR_BLOCK;
- {$EXTERNALSYM PCLEAR_BLOCK}
- _CLEAR_BLOCK = record
- data: array [0..CLEAR_BLOCK_LENGTH - 1] of CHAR;
- end;
- {$EXTERNALSYM _CLEAR_BLOCK}
- CLEAR_BLOCK = _CLEAR_BLOCK;
- {$EXTERNALSYM CLEAR_BLOCK}
- TClearBlock = CLEAR_BLOCK;
- PClearBlock = PCLEAR_BLOCK;
-
-const
- CYPHER_BLOCK_LENGTH = 8;
- {$EXTERNALSYM CYPHER_BLOCK_LENGTH}
-
-type
- PCYPHER_BLOCK = ^CYPHER_BLOCK;
- {$EXTERNALSYM PCYPHER_BLOCK}
- _CYPHER_BLOCK = record
- data: array [0..CYPHER_BLOCK_LENGTH - 1] of CHAR;
- end;
- {$EXTERNALSYM _CYPHER_BLOCK}
- CYPHER_BLOCK = _CYPHER_BLOCK;
- {$EXTERNALSYM CYPHER_BLOCK}
- TCypherBlock = CYPHER_BLOCK;
- PCypherBlock = PCYPHER_BLOCK;
-
- PLM_OWF_PASSWORD = ^LM_OWF_PASSWORD;
- {$EXTERNALSYM PLM_OWF_PASSWORD}
- _LM_OWF_PASSWORD = record
- data: array [0..1] of CYPHER_BLOCK;
- end;
- {$EXTERNALSYM _LM_OWF_PASSWORD}
- LM_OWF_PASSWORD = _LM_OWF_PASSWORD;
- {$EXTERNALSYM LM_OWF_PASSWORD}
- TLmOwfPassword = LM_OWF_PASSWORD;
- PLmOwfPassword = PLM_OWF_PASSWORD;
-
- LM_CHALLENGE = CLEAR_BLOCK;
- {$EXTERNALSYM LM_CHALLENGE}
- PLM_CHALLENGE = ^LM_CHALLENGE;
- {$EXTERNALSYM PLM_CHALLENGE}
- NT_OWF_PASSWORD = LM_OWF_PASSWORD;
- {$EXTERNALSYM NT_OWF_PASSWORD}
- PNT_OWF_PASSWORD = ^NT_OWF_PASSWORD;
- {$EXTERNALSYM PNT_OWF_PASSWORD}
- NT_CHALLENGE = LM_CHALLENGE;
- {$EXTERNALSYM NT_CHALLENGE}
- PNT_CHALLENGE = ^NT_CHALLENGE;
- {$EXTERNALSYM PNT_CHALLENGE}
-
-const
- USER_SESSION_KEY_LENGTH = CYPHER_BLOCK_LENGTH * 2;
- {$EXTERNALSYM USER_SESSION_KEY_LENGTH}
-
-type
- PUSER_SESSION_KEY = ^USER_SESSION_KEY;
- {$EXTERNALSYM PUSER_SESSION_KEY}
- _USER_SESSION_KEY = record
- data: array [0..1] of CYPHER_BLOCK;
- end;
- {$EXTERNALSYM _USER_SESSION_KEY}
- USER_SESSION_KEY = _USER_SESSION_KEY;
- {$EXTERNALSYM USER_SESSION_KEY}
- TUserSessionKey = USER_SESSION_KEY;
- PUserSessionKey = PUSER_SESSION_KEY;
-
- _NETLOGON_LOGON_INFO_CLASS = (
- NetlogonFiller0,
- NetlogonInteractiveInformation,
- NetlogonNetworkInformation,
- NetlogonServiceInformation,
- NetlogonGenericInformation,
- NetlogonInteractiveTransitiveInformation,
- NetlogonNetworkTransitiveInformation,
- NetlogonServiceTransitiveInformation);
- {$EXTERNALSYM _NETLOGON_LOGON_INFO_CLASS}
- NETLOGON_LOGON_INFO_CLASS = _NETLOGON_LOGON_INFO_CLASS;
- {$EXTERNALSYM NETLOGON_LOGON_INFO_CLASS}
-
- PNETLOGON_LOGON_IDENTITY_INFO = ^NETLOGON_LOGON_IDENTITY_INFO;
- {$EXTERNALSYM PNETLOGON_LOGON_IDENTITY_INFO}
- _NETLOGON_LOGON_IDENTITY_INFO = record
- LogonDomainName: UNICODE_STRING;
- ParameterControl: ULONG;
- LogonId: OLD_LARGE_INTEGER;
- UserName: UNICODE_STRING;
- Workstation: UNICODE_STRING;
- end;
- {$EXTERNALSYM _NETLOGON_LOGON_IDENTITY_INFO}
- NETLOGON_LOGON_IDENTITY_INFO = _NETLOGON_LOGON_IDENTITY_INFO;
- {$EXTERNALSYM NETLOGON_LOGON_IDENTITY_INFO}
- TNetlogonLogonIdentityInfo = NETLOGON_LOGON_IDENTITY_INFO;
- PNetlogonLogonIdentityInfo = PNETLOGON_LOGON_IDENTITY_INFO;
-
- PNETLOGON_INTERACTIVE_INFO = ^NETLOGON_INTERACTIVE_INFO;
- {$EXTERNALSYM PNETLOGON_INTERACTIVE_INFO}
- _NETLOGON_INTERACTIVE_INFO = record
- Identity: NETLOGON_LOGON_IDENTITY_INFO;
- LmOwfPassword: LM_OWF_PASSWORD;
- NtOwfPassword: NT_OWF_PASSWORD;
- end;
- {$EXTERNALSYM _NETLOGON_INTERACTIVE_INFO}
- NETLOGON_INTERACTIVE_INFO = _NETLOGON_INTERACTIVE_INFO;
- {$EXTERNALSYM NETLOGON_INTERACTIVE_INFO}
- TNetlogonInteractiveInfo = NETLOGON_INTERACTIVE_INFO;
- PNetlogonInteractiveInfo = PNETLOGON_INTERACTIVE_INFO;
-
- PNETLOGON_SERVICE_INFO = ^NETLOGON_SERVICE_INFO;
- {$EXTERNALSYM PNETLOGON_SERVICE_INFO}
- _NETLOGON_SERVICE_INFO = record
- Identity: NETLOGON_LOGON_IDENTITY_INFO;
- LmOwfPassword: LM_OWF_PASSWORD;
- NtOwfPassword: NT_OWF_PASSWORD;
- end;
- {$EXTERNALSYM _NETLOGON_SERVICE_INFO}
- NETLOGON_SERVICE_INFO = _NETLOGON_SERVICE_INFO;
- {$EXTERNALSYM NETLOGON_SERVICE_INFO}
- TNetlogonServiceInfo = NETLOGON_SERVICE_INFO;
- PNetlogonServiceInfo = PNETLOGON_SERVICE_INFO;
-
- PNETLOGON_NETWORK_INFO = ^NETLOGON_NETWORK_INFO;
- {$EXTERNALSYM PNETLOGON_NETWORK_INFO}
- _NETLOGON_NETWORK_INFO = record
- Identity: NETLOGON_LOGON_IDENTITY_INFO;
- LmChallenge: LM_CHALLENGE;
- NtChallengeResponse: STRING;
- LmChallengeResponse: STRING;
- end;
- {$EXTERNALSYM _NETLOGON_NETWORK_INFO}
- NETLOGON_NETWORK_INFO = _NETLOGON_NETWORK_INFO;
- {$EXTERNALSYM NETLOGON_NETWORK_INFO}
- TNetlogonNetworkInfo = NETLOGON_NETWORK_INFO;
- PNetlogonNetworkInfo = PNETLOGON_NETWORK_INFO;
-
- PNETLOGON_GENERIC_INFO = ^NETLOGON_GENERIC_INFO;
- {$EXTERNALSYM PNETLOGON_GENERIC_INFO}
- _NETLOGON_GENERIC_INFO = record
- Identity: NETLOGON_LOGON_IDENTITY_INFO;
- PackageName: UNICODE_STRING;
- DataLength: ULONG;
- LogonData: PUCHAR;
- end;
- {$EXTERNALSYM _NETLOGON_GENERIC_INFO}
- NETLOGON_GENERIC_INFO = _NETLOGON_GENERIC_INFO;
- {$EXTERNALSYM NETLOGON_GENERIC_INFO}
- TNetlogonGenericInfo = NETLOGON_GENERIC_INFO;
- PNetlogonGenericInfo = PNETLOGON_GENERIC_INFO;
-
-// Values for Flags
-
-const
- MSV1_0_PASSTHRU = $01;
- {$EXTERNALSYM MSV1_0_PASSTHRU}
- MSV1_0_GUEST_LOGON = $02;
- {$EXTERNALSYM MSV1_0_GUEST_LOGON}
-
-//function Msv1_0SubAuthenticationRoutine(LogonLevel: NETLOGON_LOGON_INFO_CLASS;
-// LogonInformation: PVOID; Flags: ULONG; UserAll: PUSER_ALL_INFORMATION;
-// WhichFields, UserFlags: PULONG; Authoritative: PBOOLEAN; LogoffTime,
-// KickoffTime: PLARGE_INTEGER): NTSTATUS; stdcall;
-//{$EXTERNALSYM Msv1_0SubAuthenticationRoutine}
-
-type
- PMSV1_0_VALIDATION_INFO = ^MSV1_0_VALIDATION_INFO;
- {$EXTERNALSYM PMSV1_0_VALIDATION_INFO}
- _MSV1_0_VALIDATION_INFO = record
- LogoffTime: LARGE_INTEGER;
- KickoffTime: LARGE_INTEGER;
- LogonServer: UNICODE_STRING;
- LogonDomainName: UNICODE_STRING;
- SessionKey: USER_SESSION_KEY;
- Authoritative: ByteBool;
- UserFlags: ULONG;
- WhichFields: ULONG;
- UserId: ULONG;
- end;
- {$EXTERNALSYM _MSV1_0_VALIDATION_INFO}
- MSV1_0_VALIDATION_INFO = _MSV1_0_VALIDATION_INFO;
- {$EXTERNALSYM MSV1_0_VALIDATION_INFO}
- TMsv10ValidationInfo = MSV1_0_VALIDATION_INFO;
- PMsv10ValidationInfo = PMSV1_0_VALIDATION_INFO;
-
-// values for WhichFields
-
-const
- MSV1_0_VALIDATION_LOGOFF_TIME = $00000001;
- {$EXTERNALSYM MSV1_0_VALIDATION_LOGOFF_TIME}
- MSV1_0_VALIDATION_KICKOFF_TIME = $00000002;
- {$EXTERNALSYM MSV1_0_VALIDATION_KICKOFF_TIME}
- MSV1_0_VALIDATION_LOGON_SERVER = $00000004;
- {$EXTERNALSYM MSV1_0_VALIDATION_LOGON_SERVER}
- MSV1_0_VALIDATION_LOGON_DOMAIN = $00000008;
- {$EXTERNALSYM MSV1_0_VALIDATION_LOGON_DOMAIN}
- MSV1_0_VALIDATION_SESSION_KEY = $00000010;
- {$EXTERNALSYM MSV1_0_VALIDATION_SESSION_KEY}
- MSV1_0_VALIDATION_USER_FLAGS = $00000020;
- {$EXTERNALSYM MSV1_0_VALIDATION_USER_FLAGS}
- MSV1_0_VALIDATION_USER_ID = $00000040;
- {$EXTERNALSYM MSV1_0_VALIDATION_USER_ID}
-
-// legal values for ActionsPerformed
-
- MSV1_0_SUBAUTH_ACCOUNT_DISABLED = $00000001;
- {$EXTERNALSYM MSV1_0_SUBAUTH_ACCOUNT_DISABLED}
- MSV1_0_SUBAUTH_PASSWORD = $00000002;
- {$EXTERNALSYM MSV1_0_SUBAUTH_PASSWORD}
- MSV1_0_SUBAUTH_WORKSTATIONS = $00000004;
- {$EXTERNALSYM MSV1_0_SUBAUTH_WORKSTATIONS}
- MSV1_0_SUBAUTH_LOGON_HOURS = $00000008;
- {$EXTERNALSYM MSV1_0_SUBAUTH_LOGON_HOURS}
- MSV1_0_SUBAUTH_ACCOUNT_EXPIRY = $00000010;
- {$EXTERNALSYM MSV1_0_SUBAUTH_ACCOUNT_EXPIRY}
- MSV1_0_SUBAUTH_PASSWORD_EXPIRY = $00000020;
- {$EXTERNALSYM MSV1_0_SUBAUTH_PASSWORD_EXPIRY}
- MSV1_0_SUBAUTH_ACCOUNT_TYPE = $00000040;
- {$EXTERNALSYM MSV1_0_SUBAUTH_ACCOUNT_TYPE}
- MSV1_0_SUBAUTH_LOCKOUT = $00000080;
- {$EXTERNALSYM MSV1_0_SUBAUTH_LOCKOUT}
-
-//function Msv1_0SubAuthenticationRoutineEx(LogonLevel: NETLOGON_LOGON_INFO_CLASS;
-// LogonInformation: PVOID; Flags: ULONG; UserAll: PUSER_ALL_INFORMATION;
-// UserHandle: SAM_HANDLE; ValidationInfo: PMSV1_0_VALIDATION_INFO;
-// ActionsPerformed: PULONG): NTSTATUS; stdcall;
-//{$EXTERNALSYM Msv1_0SubAuthenticationRoutineEx}
-
-//function Msv1_0SubAuthenticationRoutineGeneric(SubmitBuffer: PVOID;
-// SubmitBufferLength: ULONG; ReturnBufferLength: PULONG;
-// ReturnBuffer: PPVOID): NTSTATUS; stdcall;
-//{$EXTERNALSYM Msv1_0SubAuthenticationRoutineGeneric}
-
-//function Msv1_0SubAuthenticationFilter(LogonLevel: NETLOGON_LOGON_INFO_CLASS;
-// LogonInformation: PVOID; Flags: ULONG; UserAll: PUSER_ALL_INFORMATION;
-// WhichFields, UserFlags: PULONG; Authoritative: PBOOLEAN; LogoffTime,
-// KickoffTime: PLARGE_INTEGER): NTSTATUS; stdcall;
-//{$EXTERNALSYM Msv1_0SubAuthenticationFilter}
-
-const
- STATUS_SUCCESS = NTSTATUS($00000000);
- {$EXTERNALSYM STATUS_SUCCESS}
- STATUS_INVALID_INFO_CLASS = NTSTATUS($C0000003);
- {$EXTERNALSYM STATUS_INVALID_INFO_CLASS}
- STATUS_NO_SUCH_USER = NTSTATUS($C0000064);
- {$EXTERNALSYM STATUS_NO_SUCH_USER}
- STATUS_WRONG_PASSWORD = NTSTATUS($C000006A);
- {$EXTERNALSYM STATUS_WRONG_PASSWORD}
- STATUS_PASSWORD_RESTRICTION = NTSTATUS($C000006C);
- {$EXTERNALSYM STATUS_PASSWORD_RESTRICTION}
- STATUS_LOGON_FAILURE = NTSTATUS($C000006D);
- {$EXTERNALSYM STATUS_LOGON_FAILURE}
- STATUS_ACCOUNT_RESTRICTION = NTSTATUS($C000006E);
- {$EXTERNALSYM STATUS_ACCOUNT_RESTRICTION}
- STATUS_INVALID_LOGON_HOURS = NTSTATUS($C000006F);
- {$EXTERNALSYM STATUS_INVALID_LOGON_HOURS}
- STATUS_INVALID_WORKSTATION = NTSTATUS($C0000070);
- {$EXTERNALSYM STATUS_INVALID_WORKSTATION}
- STATUS_PASSWORD_EXPIRED = NTSTATUS($C0000071);
- {$EXTERNALSYM STATUS_PASSWORD_EXPIRED}
- STATUS_ACCOUNT_DISABLED = NTSTATUS($C0000072);
- {$EXTERNALSYM STATUS_ACCOUNT_DISABLED}
- STATUS_INSUFFICIENT_RESOURCES = NTSTATUS($C000009A);
- {$EXTERNALSYM STATUS_INSUFFICIENT_RESOURCES}
- STATUS_ACCOUNT_EXPIRED = NTSTATUS($C0000193);
- {$EXTERNALSYM STATUS_ACCOUNT_EXPIRED}
- STATUS_PASSWORD_MUST_CHANGE = NTSTATUS($C0000224);
- {$EXTERNALSYM STATUS_PASSWORD_MUST_CHANGE}
- STATUS_ACCOUNT_LOCKED_OUT = NTSTATUS($C0000234);
- {$EXTERNALSYM STATUS_ACCOUNT_LOCKED_OUT}
-
-implementation
-
-end.
+{******************************************************************************}
+{ }
+{ Subauthentication packages API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: subauth.h, released June 2000. The original Pascal }
+{ code is: SubAuth.pas, released December 2000. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwasubauth.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaSubAuth;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "subauth.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaWinType;
+
+type
+ SAM_HANDLE = PVOID;
+ {$EXTERNALSYM SAM_HANDLE}
+ PSAM_HANDLE = ^SAM_HANDLE;
+ {$EXTERNALSYM PSAM_HANDLE}
+
+ POLD_LARGE_INTEGER = ^OLD_LARGE_INTEGER;
+ {$EXTERNALSYM POLD_LARGE_INTEGER}
+ _OLD_LARGE_INTEGER = record
+ LowPart: ULONG;
+ HighPart: LONG;
+ end;
+ {$EXTERNALSYM _OLD_LARGE_INTEGER}
+ OLD_LARGE_INTEGER = _OLD_LARGE_INTEGER;
+ {$EXTERNALSYM OLD_LARGE_INTEGER}
+ TOldLargeInteger = OLD_LARGE_INTEGER;
+ POldLargeInteger = POLD_LARGE_INTEGER;
+
+//
+// User account control flags...
+//
+
+const
+ USER_ACCOUNT_DISABLED = $00000001;
+ {$EXTERNALSYM USER_ACCOUNT_DISABLED}
+ USER_HOME_DIRECTORY_REQUIRED = $00000002;
+ {$EXTERNALSYM USER_HOME_DIRECTORY_REQUIRED}
+ USER_PASSWORD_NOT_REQUIRED = $00000004;
+ {$EXTERNALSYM USER_PASSWORD_NOT_REQUIRED}
+ USER_TEMP_DUPLICATE_ACCOUNT = $00000008;
+ {$EXTERNALSYM USER_TEMP_DUPLICATE_ACCOUNT}
+ USER_NORMAL_ACCOUNT = $00000010;
+ {$EXTERNALSYM USER_NORMAL_ACCOUNT}
+ USER_MNS_LOGON_ACCOUNT = $00000020;
+ {$EXTERNALSYM USER_MNS_LOGON_ACCOUNT}
+ USER_INTERDOMAIN_TRUST_ACCOUNT = $00000040;
+ {$EXTERNALSYM USER_INTERDOMAIN_TRUST_ACCOUNT}
+ USER_WORKSTATION_TRUST_ACCOUNT = $00000080;
+ {$EXTERNALSYM USER_WORKSTATION_TRUST_ACCOUNT}
+ USER_SERVER_TRUST_ACCOUNT = $00000100;
+ {$EXTERNALSYM USER_SERVER_TRUST_ACCOUNT}
+ USER_DONT_EXPIRE_PASSWORD = $00000200;
+ {$EXTERNALSYM USER_DONT_EXPIRE_PASSWORD}
+ USER_ACCOUNT_AUTO_LOCKED = $00000400;
+ {$EXTERNALSYM USER_ACCOUNT_AUTO_LOCKED}
+ USER_ENCRYPTED_TEXT_PASSWORD_ALLOWED = $00000800;
+ {$EXTERNALSYM USER_ENCRYPTED_TEXT_PASSWORD_ALLOWED}
+ USER_SMARTCARD_REQUIRED = $00001000;
+ {$EXTERNALSYM USER_SMARTCARD_REQUIRED}
+ USER_TRUSTED_FOR_DELEGATION = $00002000;
+ {$EXTERNALSYM USER_TRUSTED_FOR_DELEGATION}
+ USER_NOT_DELEGATED = $00004000;
+ {$EXTERNALSYM USER_NOT_DELEGATED}
+ USER_USE_DES_KEY_ONLY = $00008000;
+ {$EXTERNALSYM USER_USE_DES_KEY_ONLY}
+ USER_DONT_REQUIRE_PREAUTH = $00010000;
+ {$EXTERNALSYM USER_DONT_REQUIRE_PREAUTH}
+ USER_PASSWORD_EXPIRED = $00020000;
+ {$EXTERNALSYM USER_PASSWORD_EXPIRED}
+ USER_TRUSTED_TO_AUTHENTICATE_FOR_DELEGATION = $00040000;
+ {$EXTERNALSYM USER_TRUSTED_TO_AUTHENTICATE_FOR_DELEGATION}
+ NEXT_FREE_ACCOUNT_CONTROL_BIT = USER_TRUSTED_TO_AUTHENTICATE_FOR_DELEGATION shl 1;
+ {$EXTERNALSYM NEXT_FREE_ACCOUNT_CONTROL_BIT}
+
+ USER_MACHINE_ACCOUNT_MASK = USER_INTERDOMAIN_TRUST_ACCOUNT or USER_WORKSTATION_TRUST_ACCOUNT or USER_SERVER_TRUST_ACCOUNT;
+ {$EXTERNALSYM USER_MACHINE_ACCOUNT_MASK}
+ USER_ACCOUNT_TYPE_MASK = USER_TEMP_DUPLICATE_ACCOUNT or USER_NORMAL_ACCOUNT or USER_MACHINE_ACCOUNT_MASK;
+ {$EXTERNALSYM USER_ACCOUNT_TYPE_MASK}
+
+ USER_COMPUTED_ACCOUNT_CONTROL_BITS = USER_ACCOUNT_AUTO_LOCKED or USER_PASSWORD_EXPIRED;
+ {$EXTERNALSYM USER_COMPUTED_ACCOUNT_CONTROL_BITS}
+
+//
+// Logon times may be expressed in day, hour, or minute granularity.
+//
+// Days per week = 7
+// Hours per week = 168
+// Minutes per week = 10080
+//
+
+ SAM_DAYS_PER_WEEK = 7;
+ {$EXTERNALSYM SAM_DAYS_PER_WEEK}
+ SAM_HOURS_PER_WEEK = 24 * SAM_DAYS_PER_WEEK;
+ {$EXTERNALSYM SAM_HOURS_PER_WEEK}
+ SAM_MINUTES_PER_WEEK = 60 * SAM_HOURS_PER_WEEK;
+ {$EXTERNALSYM SAM_MINUTES_PER_WEEK}
+
+type
+ PLOGON_HOURS = ^LOGON_HOURS;
+ {$EXTERNALSYM PLOGON_HOURS}
+ _LOGON_HOURS = record
+ UnitsPerWeek: USHORT;
+ //
+ // UnitsPerWeek is the number of equal length time units the week is
+ // divided into. This value is used to compute the length of the bit
+ // string in logon_hours. Must be less than or equal to
+ // SAM_UNITS_PER_WEEK (10080) for this release.
+ //
+ // LogonHours is a bit map of valid logon times. Each bit represents
+ // a unique division in a week. The largest bit map supported is 1260
+ // bytes (10080 bits), which represents minutes per week. In this case
+ // the first bit (bit 0, byte 0) is Sunday, 00:00:00 - 00-00:59; bit 1,
+ // byte 0 is Sunday, 00:01:00 - 00:01:59, etc. A NULL pointer means
+ // DONT_CHANGE for SamSetInformationUser() calls.
+ //
+ LogonHours: PUCHAR;
+ end;
+ {$EXTERNALSYM _LOGON_HOURS}
+ LOGON_HOURS = _LOGON_HOURS;
+ {$EXTERNALSYM LOGON_HOURS}
+ TLogonHours = LOGON_HOURS;
+ PLogonHours = PLOGON_HOURS;
+
+ PSR_SECURITY_DESCRIPTOR = ^SR_SECURITY_DESCRIPTOR;
+ {$EXTERNALSYM PSR_SECURITY_DESCRIPTOR}
+ _SR_SECURITY_DESCRIPTOR = record
+ Length: ULONG;
+ SecurityDescriptor: PUCHAR;
+ end;
+ {$EXTERNALSYM _SR_SECURITY_DESCRIPTOR}
+ SR_SECURITY_DESCRIPTOR = _SR_SECURITY_DESCRIPTOR;
+ {$EXTERNALSYM SR_SECURITY_DESCRIPTOR}
+ TSrSecurityDescriptor = SR_SECURITY_DESCRIPTOR;
+ PSrSecurityDescriptor = PSR_SECURITY_DESCRIPTOR;
+
+// #include "pshpack4.h"
+
+ PUSER_ALL_INFORMATION = ^USER_ALL_INFORMATION;
+ {$EXTERNALSYM PUSER_ALL_INFORMATION}
+ _USER_ALL_INFORMATION = record
+ LastLogon: LARGE_INTEGER;
+ LastLogoff: LARGE_INTEGER;
+ PasswordLastSet: LARGE_INTEGER;
+ AccountExpires: LARGE_INTEGER;
+ PasswordCanChange: LARGE_INTEGER;
+ PasswordMustChange: LARGE_INTEGER;
+ UserName: UNICODE_STRING;
+ FullName: UNICODE_STRING;
+ HomeDirectory: UNICODE_STRING;
+ HomeDirectoryDrive: UNICODE_STRING;
+ ScriptPath: UNICODE_STRING;
+ ProfilePath: UNICODE_STRING;
+ AdminComment: UNICODE_STRING;
+ WorkStations: UNICODE_STRING;
+ UserComment: UNICODE_STRING;
+ Parameters: UNICODE_STRING;
+ LmPassword: UNICODE_STRING;
+ NtPassword: UNICODE_STRING;
+ PrivateData: UNICODE_STRING;
+ SecurityDescriptor: SR_SECURITY_DESCRIPTOR;
+ UserId: ULONG;
+ PrimaryGroupId: ULONG;
+ UserAccountControl: ULONG;
+ WhichFields: ULONG;
+ LogonHours: LOGON_HOURS;
+ BadPasswordCount: USHORT;
+ LogonCount: USHORT;
+ CountryCode: USHORT;
+ CodePage: USHORT;
+ LmPasswordPresent: ByteBool;
+ NtPasswordPresent: ByteBool;
+ PasswordExpired: ByteBool;
+ PrivateDataSensitive: ByteBool;
+ end;
+ {$EXTERNALSYM _USER_ALL_INFORMATION}
+ USER_ALL_INFORMATION = _USER_ALL_INFORMATION;
+ {$EXTERNALSYM USER_ALL_INFORMATION}
+ TUserAllInformation = USER_ALL_INFORMATION;
+ PUserAllInformation = PUSER_ALL_INFORMATION;
+
+// #include "poppack.h"
+
+const
+ USER_ALL_PARAMETERS = $00200000;
+ {$EXTERNALSYM USER_ALL_PARAMETERS}
+
+ CLEAR_BLOCK_LENGTH = 8;
+ {$EXTERNALSYM CLEAR_BLOCK_LENGTH}
+
+type
+ PCLEAR_BLOCK = ^CLEAR_BLOCK;
+ {$EXTERNALSYM PCLEAR_BLOCK}
+ _CLEAR_BLOCK = record
+ data: array [0..CLEAR_BLOCK_LENGTH - 1] of CHAR;
+ end;
+ {$EXTERNALSYM _CLEAR_BLOCK}
+ CLEAR_BLOCK = _CLEAR_BLOCK;
+ {$EXTERNALSYM CLEAR_BLOCK}
+ TClearBlock = CLEAR_BLOCK;
+ PClearBlock = PCLEAR_BLOCK;
+
+const
+ CYPHER_BLOCK_LENGTH = 8;
+ {$EXTERNALSYM CYPHER_BLOCK_LENGTH}
+
+type
+ PCYPHER_BLOCK = ^CYPHER_BLOCK;
+ {$EXTERNALSYM PCYPHER_BLOCK}
+ _CYPHER_BLOCK = record
+ data: array [0..CYPHER_BLOCK_LENGTH - 1] of CHAR;
+ end;
+ {$EXTERNALSYM _CYPHER_BLOCK}
+ CYPHER_BLOCK = _CYPHER_BLOCK;
+ {$EXTERNALSYM CYPHER_BLOCK}
+ TCypherBlock = CYPHER_BLOCK;
+ PCypherBlock = PCYPHER_BLOCK;
+
+ PLM_OWF_PASSWORD = ^LM_OWF_PASSWORD;
+ {$EXTERNALSYM PLM_OWF_PASSWORD}
+ _LM_OWF_PASSWORD = record
+ data: array [0..1] of CYPHER_BLOCK;
+ end;
+ {$EXTERNALSYM _LM_OWF_PASSWORD}
+ LM_OWF_PASSWORD = _LM_OWF_PASSWORD;
+ {$EXTERNALSYM LM_OWF_PASSWORD}
+ TLmOwfPassword = LM_OWF_PASSWORD;
+ PLmOwfPassword = PLM_OWF_PASSWORD;
+
+ LM_CHALLENGE = CLEAR_BLOCK;
+ {$EXTERNALSYM LM_CHALLENGE}
+ PLM_CHALLENGE = ^LM_CHALLENGE;
+ {$EXTERNALSYM PLM_CHALLENGE}
+ NT_OWF_PASSWORD = LM_OWF_PASSWORD;
+ {$EXTERNALSYM NT_OWF_PASSWORD}
+ PNT_OWF_PASSWORD = ^NT_OWF_PASSWORD;
+ {$EXTERNALSYM PNT_OWF_PASSWORD}
+ NT_CHALLENGE = LM_CHALLENGE;
+ {$EXTERNALSYM NT_CHALLENGE}
+ PNT_CHALLENGE = ^NT_CHALLENGE;
+ {$EXTERNALSYM PNT_CHALLENGE}
+
+const
+ USER_SESSION_KEY_LENGTH = CYPHER_BLOCK_LENGTH * 2;
+ {$EXTERNALSYM USER_SESSION_KEY_LENGTH}
+
+type
+ PUSER_SESSION_KEY = ^USER_SESSION_KEY;
+ {$EXTERNALSYM PUSER_SESSION_KEY}
+ _USER_SESSION_KEY = record
+ data: array [0..1] of CYPHER_BLOCK;
+ end;
+ {$EXTERNALSYM _USER_SESSION_KEY}
+ USER_SESSION_KEY = _USER_SESSION_KEY;
+ {$EXTERNALSYM USER_SESSION_KEY}
+ TUserSessionKey = USER_SESSION_KEY;
+ PUserSessionKey = PUSER_SESSION_KEY;
+
+ _NETLOGON_LOGON_INFO_CLASS = (
+ NetlogonFiller0,
+ NetlogonInteractiveInformation,
+ NetlogonNetworkInformation,
+ NetlogonServiceInformation,
+ NetlogonGenericInformation,
+ NetlogonInteractiveTransitiveInformation,
+ NetlogonNetworkTransitiveInformation,
+ NetlogonServiceTransitiveInformation);
+ {$EXTERNALSYM _NETLOGON_LOGON_INFO_CLASS}
+ NETLOGON_LOGON_INFO_CLASS = _NETLOGON_LOGON_INFO_CLASS;
+ {$EXTERNALSYM NETLOGON_LOGON_INFO_CLASS}
+
+ PNETLOGON_LOGON_IDENTITY_INFO = ^NETLOGON_LOGON_IDENTITY_INFO;
+ {$EXTERNALSYM PNETLOGON_LOGON_IDENTITY_INFO}
+ _NETLOGON_LOGON_IDENTITY_INFO = record
+ LogonDomainName: UNICODE_STRING;
+ ParameterControl: ULONG;
+ LogonId: OLD_LARGE_INTEGER;
+ UserName: UNICODE_STRING;
+ Workstation: UNICODE_STRING;
+ end;
+ {$EXTERNALSYM _NETLOGON_LOGON_IDENTITY_INFO}
+ NETLOGON_LOGON_IDENTITY_INFO = _NETLOGON_LOGON_IDENTITY_INFO;
+ {$EXTERNALSYM NETLOGON_LOGON_IDENTITY_INFO}
+ TNetlogonLogonIdentityInfo = NETLOGON_LOGON_IDENTITY_INFO;
+ PNetlogonLogonIdentityInfo = PNETLOGON_LOGON_IDENTITY_INFO;
+
+ PNETLOGON_INTERACTIVE_INFO = ^NETLOGON_INTERACTIVE_INFO;
+ {$EXTERNALSYM PNETLOGON_INTERACTIVE_INFO}
+ _NETLOGON_INTERACTIVE_INFO = record
+ Identity: NETLOGON_LOGON_IDENTITY_INFO;
+ LmOwfPassword: LM_OWF_PASSWORD;
+ NtOwfPassword: NT_OWF_PASSWORD;
+ end;
+ {$EXTERNALSYM _NETLOGON_INTERACTIVE_INFO}
+ NETLOGON_INTERACTIVE_INFO = _NETLOGON_INTERACTIVE_INFO;
+ {$EXTERNALSYM NETLOGON_INTERACTIVE_INFO}
+ TNetlogonInteractiveInfo = NETLOGON_INTERACTIVE_INFO;
+ PNetlogonInteractiveInfo = PNETLOGON_INTERACTIVE_INFO;
+
+ PNETLOGON_SERVICE_INFO = ^NETLOGON_SERVICE_INFO;
+ {$EXTERNALSYM PNETLOGON_SERVICE_INFO}
+ _NETLOGON_SERVICE_INFO = record
+ Identity: NETLOGON_LOGON_IDENTITY_INFO;
+ LmOwfPassword: LM_OWF_PASSWORD;
+ NtOwfPassword: NT_OWF_PASSWORD;
+ end;
+ {$EXTERNALSYM _NETLOGON_SERVICE_INFO}
+ NETLOGON_SERVICE_INFO = _NETLOGON_SERVICE_INFO;
+ {$EXTERNALSYM NETLOGON_SERVICE_INFO}
+ TNetlogonServiceInfo = NETLOGON_SERVICE_INFO;
+ PNetlogonServiceInfo = PNETLOGON_SERVICE_INFO;
+
+ PNETLOGON_NETWORK_INFO = ^NETLOGON_NETWORK_INFO;
+ {$EXTERNALSYM PNETLOGON_NETWORK_INFO}
+ _NETLOGON_NETWORK_INFO = record
+ Identity: NETLOGON_LOGON_IDENTITY_INFO;
+ LmChallenge: LM_CHALLENGE;
+ NtChallengeResponse: STRING;
+ LmChallengeResponse: STRING;
+ end;
+ {$EXTERNALSYM _NETLOGON_NETWORK_INFO}
+ NETLOGON_NETWORK_INFO = _NETLOGON_NETWORK_INFO;
+ {$EXTERNALSYM NETLOGON_NETWORK_INFO}
+ TNetlogonNetworkInfo = NETLOGON_NETWORK_INFO;
+ PNetlogonNetworkInfo = PNETLOGON_NETWORK_INFO;
+
+ PNETLOGON_GENERIC_INFO = ^NETLOGON_GENERIC_INFO;
+ {$EXTERNALSYM PNETLOGON_GENERIC_INFO}
+ _NETLOGON_GENERIC_INFO = record
+ Identity: NETLOGON_LOGON_IDENTITY_INFO;
+ PackageName: UNICODE_STRING;
+ DataLength: ULONG;
+ LogonData: PUCHAR;
+ end;
+ {$EXTERNALSYM _NETLOGON_GENERIC_INFO}
+ NETLOGON_GENERIC_INFO = _NETLOGON_GENERIC_INFO;
+ {$EXTERNALSYM NETLOGON_GENERIC_INFO}
+ TNetlogonGenericInfo = NETLOGON_GENERIC_INFO;
+ PNetlogonGenericInfo = PNETLOGON_GENERIC_INFO;
+
+// Values for Flags
+
+const
+ MSV1_0_PASSTHRU = $01;
+ {$EXTERNALSYM MSV1_0_PASSTHRU}
+ MSV1_0_GUEST_LOGON = $02;
+ {$EXTERNALSYM MSV1_0_GUEST_LOGON}
+
+//function Msv1_0SubAuthenticationRoutine(LogonLevel: NETLOGON_LOGON_INFO_CLASS;
+// LogonInformation: PVOID; Flags: ULONG; UserAll: PUSER_ALL_INFORMATION;
+// WhichFields, UserFlags: PULONG; Authoritative: PBOOLEAN; LogoffTime,
+// KickoffTime: PLARGE_INTEGER): NTSTATUS; stdcall;
+//{$EXTERNALSYM Msv1_0SubAuthenticationRoutine}
+
+type
+ PMSV1_0_VALIDATION_INFO = ^MSV1_0_VALIDATION_INFO;
+ {$EXTERNALSYM PMSV1_0_VALIDATION_INFO}
+ _MSV1_0_VALIDATION_INFO = record
+ LogoffTime: LARGE_INTEGER;
+ KickoffTime: LARGE_INTEGER;
+ LogonServer: UNICODE_STRING;
+ LogonDomainName: UNICODE_STRING;
+ SessionKey: USER_SESSION_KEY;
+ Authoritative: ByteBool;
+ UserFlags: ULONG;
+ WhichFields: ULONG;
+ UserId: ULONG;
+ end;
+ {$EXTERNALSYM _MSV1_0_VALIDATION_INFO}
+ MSV1_0_VALIDATION_INFO = _MSV1_0_VALIDATION_INFO;
+ {$EXTERNALSYM MSV1_0_VALIDATION_INFO}
+ TMsv10ValidationInfo = MSV1_0_VALIDATION_INFO;
+ PMsv10ValidationInfo = PMSV1_0_VALIDATION_INFO;
+
+// values for WhichFields
+
+const
+ MSV1_0_VALIDATION_LOGOFF_TIME = $00000001;
+ {$EXTERNALSYM MSV1_0_VALIDATION_LOGOFF_TIME}
+ MSV1_0_VALIDATION_KICKOFF_TIME = $00000002;
+ {$EXTERNALSYM MSV1_0_VALIDATION_KICKOFF_TIME}
+ MSV1_0_VALIDATION_LOGON_SERVER = $00000004;
+ {$EXTERNALSYM MSV1_0_VALIDATION_LOGON_SERVER}
+ MSV1_0_VALIDATION_LOGON_DOMAIN = $00000008;
+ {$EXTERNALSYM MSV1_0_VALIDATION_LOGON_DOMAIN}
+ MSV1_0_VALIDATION_SESSION_KEY = $00000010;
+ {$EXTERNALSYM MSV1_0_VALIDATION_SESSION_KEY}
+ MSV1_0_VALIDATION_USER_FLAGS = $00000020;
+ {$EXTERNALSYM MSV1_0_VALIDATION_USER_FLAGS}
+ MSV1_0_VALIDATION_USER_ID = $00000040;
+ {$EXTERNALSYM MSV1_0_VALIDATION_USER_ID}
+
+// legal values for ActionsPerformed
+
+ MSV1_0_SUBAUTH_ACCOUNT_DISABLED = $00000001;
+ {$EXTERNALSYM MSV1_0_SUBAUTH_ACCOUNT_DISABLED}
+ MSV1_0_SUBAUTH_PASSWORD = $00000002;
+ {$EXTERNALSYM MSV1_0_SUBAUTH_PASSWORD}
+ MSV1_0_SUBAUTH_WORKSTATIONS = $00000004;
+ {$EXTERNALSYM MSV1_0_SUBAUTH_WORKSTATIONS}
+ MSV1_0_SUBAUTH_LOGON_HOURS = $00000008;
+ {$EXTERNALSYM MSV1_0_SUBAUTH_LOGON_HOURS}
+ MSV1_0_SUBAUTH_ACCOUNT_EXPIRY = $00000010;
+ {$EXTERNALSYM MSV1_0_SUBAUTH_ACCOUNT_EXPIRY}
+ MSV1_0_SUBAUTH_PASSWORD_EXPIRY = $00000020;
+ {$EXTERNALSYM MSV1_0_SUBAUTH_PASSWORD_EXPIRY}
+ MSV1_0_SUBAUTH_ACCOUNT_TYPE = $00000040;
+ {$EXTERNALSYM MSV1_0_SUBAUTH_ACCOUNT_TYPE}
+ MSV1_0_SUBAUTH_LOCKOUT = $00000080;
+ {$EXTERNALSYM MSV1_0_SUBAUTH_LOCKOUT}
+
+//function Msv1_0SubAuthenticationRoutineEx(LogonLevel: NETLOGON_LOGON_INFO_CLASS;
+// LogonInformation: PVOID; Flags: ULONG; UserAll: PUSER_ALL_INFORMATION;
+// UserHandle: SAM_HANDLE; ValidationInfo: PMSV1_0_VALIDATION_INFO;
+// ActionsPerformed: PULONG): NTSTATUS; stdcall;
+//{$EXTERNALSYM Msv1_0SubAuthenticationRoutineEx}
+
+//function Msv1_0SubAuthenticationRoutineGeneric(SubmitBuffer: PVOID;
+// SubmitBufferLength: ULONG; ReturnBufferLength: PULONG;
+// ReturnBuffer: PPVOID): NTSTATUS; stdcall;
+//{$EXTERNALSYM Msv1_0SubAuthenticationRoutineGeneric}
+
+//function Msv1_0SubAuthenticationFilter(LogonLevel: NETLOGON_LOGON_INFO_CLASS;
+// LogonInformation: PVOID; Flags: ULONG; UserAll: PUSER_ALL_INFORMATION;
+// WhichFields, UserFlags: PULONG; Authoritative: PBOOLEAN; LogoffTime,
+// KickoffTime: PLARGE_INTEGER): NTSTATUS; stdcall;
+//{$EXTERNALSYM Msv1_0SubAuthenticationFilter}
+
+const
+ STATUS_SUCCESS = NTSTATUS($00000000);
+ {$EXTERNALSYM STATUS_SUCCESS}
+ STATUS_INVALID_INFO_CLASS = NTSTATUS($C0000003);
+ {$EXTERNALSYM STATUS_INVALID_INFO_CLASS}
+ STATUS_NO_SUCH_USER = NTSTATUS($C0000064);
+ {$EXTERNALSYM STATUS_NO_SUCH_USER}
+ STATUS_WRONG_PASSWORD = NTSTATUS($C000006A);
+ {$EXTERNALSYM STATUS_WRONG_PASSWORD}
+ STATUS_PASSWORD_RESTRICTION = NTSTATUS($C000006C);
+ {$EXTERNALSYM STATUS_PASSWORD_RESTRICTION}
+ STATUS_LOGON_FAILURE = NTSTATUS($C000006D);
+ {$EXTERNALSYM STATUS_LOGON_FAILURE}
+ STATUS_ACCOUNT_RESTRICTION = NTSTATUS($C000006E);
+ {$EXTERNALSYM STATUS_ACCOUNT_RESTRICTION}
+ STATUS_INVALID_LOGON_HOURS = NTSTATUS($C000006F);
+ {$EXTERNALSYM STATUS_INVALID_LOGON_HOURS}
+ STATUS_INVALID_WORKSTATION = NTSTATUS($C0000070);
+ {$EXTERNALSYM STATUS_INVALID_WORKSTATION}
+ STATUS_PASSWORD_EXPIRED = NTSTATUS($C0000071);
+ {$EXTERNALSYM STATUS_PASSWORD_EXPIRED}
+ STATUS_ACCOUNT_DISABLED = NTSTATUS($C0000072);
+ {$EXTERNALSYM STATUS_ACCOUNT_DISABLED}
+ STATUS_INSUFFICIENT_RESOURCES = NTSTATUS($C000009A);
+ {$EXTERNALSYM STATUS_INSUFFICIENT_RESOURCES}
+ STATUS_ACCOUNT_EXPIRED = NTSTATUS($C0000193);
+ {$EXTERNALSYM STATUS_ACCOUNT_EXPIRED}
+ STATUS_PASSWORD_MUST_CHANGE = NTSTATUS($C0000224);
+ {$EXTERNALSYM STATUS_PASSWORD_MUST_CHANGE}
+ STATUS_ACCOUNT_LOCKED_OUT = NTSTATUS($C0000234);
+ {$EXTERNALSYM STATUS_ACCOUNT_LOCKED_OUT}
+
+implementation
+
+end.
diff --git a/packages/extra/winunits/jwasvcguid.pas b/packages/extra/winunits/jwasvcguid.pas
index 557437c753..a8169d61ba 100644
--- a/packages/extra/winunits/jwasvcguid.pas
+++ b/packages/extra/winunits/jwasvcguid.pas
@@ -1,736 +1,736 @@
-{******************************************************************************}
-{ }
-{ Winsock2 Service GUIDs API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: svcguid.h, released June 2000. The original Pascal }
-{ code is: SvcGuid.pas, released December 2000. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwasvcguid.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaSvcGuid;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "svguid.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- {$IFDEF USE_DELPHI_TYPES}
- Windows;
- {$ELSE}
- JwaWinType;
- {$ENDIF USE_DELPHI_TYPES}
-
-// Defines GUIDs for well-known services including:
-//
-// HOSTNAME
-// RFC 1060 (Assigned Numbers) from IANA (All TCP/IP Services)
-// NetWare services
-
-//
-// HOSTNAME--special GUID which refers to the name of a host as opposed
-// to any particular service on that host.
-//
-
-const
- SVCID_HOSTNAME: TGUID = '{0002a800-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_HOSTNAME}
-
-//
-// GUIDs for dealing with AF_INET address spaces alone. These are
-// intended to be used when fetching hostent or servent information
-// from such a provider. These are not general-purpose types and
-// should be used only when the intent is getting at down-level
-// information.
-//
-
- SVCID_INET_HOSTADDRBYINETSTRING: TGUID = '{0002a801-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_INET_HOSTADDRBYINETSTRING}
- SVCID_INET_SERVICEBYNAME: TGUID = '{0002a802-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_INET_SERVICEBYNAME}
- SVCID_INET_HOSTADDRBYNAME: TGUID = '{0002a803-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_INET_HOSTADDRBYNAME}
-
-//
-// Macros for defining and testing TCP and UDP GUIDs from a well-known
-// port.
-//
-
-function SVCID_TCP_RR(Port, RR: Word): TGUID;
-{$EXTERNALSYM SVCID_TCP_RR}
-
-function SVCID_TCP(Port: Word): TGUID;
-{$EXTERNALSYM SVCID_TCP}
-
-function SVCID_DNS(RecordType: Word): TGUID;
-{$EXTERNALSYM SVCID_DNS}
-
-function IS_SVCID_DNS(const Guid: TGUID): Boolean;
-{$EXTERNALSYM IS_SVCID_DNS}
-
-function IS_SVCID_TCP(const Guid: TGUID): Boolean;
-{$EXTERNALSYM IS_SVCID_TCP}
-
-function PORT_FROM_SVCID_TCP(const Guid: TGUID): Word;
-{$EXTERNALSYM PORT_FROM_SVCID_TCP}
-
-function RR_FROM_SVCID(const Guid: TGUID): Word;
-{$EXTERNALSYM RR_FROM_SVCID}
-
-procedure SET_TCP_SVCID_RR(var Guid: TGUID; _Port, _RR: Word);
-{$EXTERNALSYM SET_TCP_SVCID_RR}
-
-procedure SET_TCP_SVCID(var Guid: TGUID; Port: Word);
-{$EXTERNALSYM SET_TCP_SVCID}
-
-function SVCID_UDP_RR(Port, RR: Word): TGUID;
-{$EXTERNALSYM SVCID_UDP_RR}
-
-function SVCID_UDP(Port: Word): TGUID;
-{$EXTERNALSYM SVCID_UDP}
-
-function IS_SVCID_UDP(const Guid: TGUID): Boolean;
-{$EXTERNALSYM IS_SVCID_UDP}
-
-function PORT_FROM_SVCID_UDP(const Guid: TGUID): WORD;
-{$EXTERNALSYM PORT_FROM_SVCID_UDP}
-
-procedure SET_UDP_SVCID_RR(var Guid: TGUID; Port, RR: WORD);
-{$EXTERNALSYM SET_UDP_SVCID_RR}
-
-procedure SET_UDP_SVCID(var Guid: TGUID; Port: WORD);
-{$EXTERNALSYM SET_UDP_SVCID}
-
-//
-// Macros for defining and testing Netware (SAP) services based on the
-// SAP ID.
-//
-
-function SVCID_NETWARE(SapId: WORD): TGUID;
-{$EXTERNALSYM SVCID_NETWARE}
-
-function IS_SVCID_NETWARE(const Guid: TGUID): Boolean;
-{$EXTERNALSYM IS_SVCID_NETWARE}
-
-function SAPID_FROM_SVCID_NETWARE(const Guid: TGUID): WORD;
-{$EXTERNALSYM SAPID_FROM_SVCID_NETWARE}
-
-procedure SET_NETWARE_SVCID(var Guid: TGUID; SapId: WORD);
-{$EXTERNALSYM SET_NETWARE_SVCID}
-
-//
-// RFC 1060 services as defined by the IANA
-// GUID block = 0009xxxx-0000-0000-C0000-000000000046
-//
-
-const
- SVCID_ECHO_TCP: TGUID = '{00090007-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_ECHO_TCP}
- SVCID_DISCARD_TCP: TGUID = '{00090009-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_DISCARD_TCP}
- SVCID_SYSTAT_TCP: TGUID = '{0009000B-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_SYSTAT_TCP}
- SVCID_DAYTIME_TCP: TGUID = '{0009000D-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_DAYTIME_TCP}
- SVCID_NETSTAT_TCP: TGUID = '{0009000F-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_NETSTAT_TCP}
- SVCID_QOTD_TCP: TGUID = '{00090011-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_QOTD_TCP}
- SVCID_CHARGEN_TCP: TGUID = '{00090013-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_CHARGEN_TCP}
- SVCID_FTP_DATA_TCP: TGUID = '{00090014-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_FTP_DATA_TCP}
- SVCID_FTP_TCP: TGUID = '{00090015-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_FTP_TCP}
- SVCID_TELNET_TCP: TGUID = '{00090017-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_TELNET_TCP}
- SVCID_SMTP_TCP: TGUID = '{00090019-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_SMTP_TCP}
- SVCID_TIME_TCP: TGUID = '{00090025-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_TIME_TCP}
- SVCID_NAME_TCP: TGUID = '{0009002A-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_NAME_TCP}
- SVCID_WHOIS_TCP: TGUID = '{0009002B-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_WHOIS_TCP}
- SVCID_DOMAIN_TCP: TGUID = '{00090035-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_DOMAIN_TCP}
- SVCID_NAMESERVER_TCP: TGUID = '{00090035-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_NAMESERVER_TCP}
- SVCID_MTP_TCP: TGUID = '{00090039-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_MTP_TCP}
- SVCID_RJE_TCP: TGUID = '{0009004D-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_RJE_TCP}
- SVCID_FINGER_TCP: TGUID = '{0009004F-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_FINGER_TCP}
- SVCID_LINK_TCP: TGUID = '{00090057-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_LINK_TCP}
- SVCID_SUPDUP_TCP: TGUID = '{0009005F-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_SUPDUP_TCP}
- SVCID_HOSTNAMES_TCP: TGUID = '{00090065-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_HOSTNAMES_TCP}
- SVCID_ISO_TSAP_TCP: TGUID = '{00090066-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_ISO_TSAP_TCP}
- SVCID_DICTIONARY_TCP: TGUID = '{00090067-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_DICTIONARY_TCP}
- SVCID_X400_TCP: TGUID = '{00090067-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_X400_TCP}
- SVCID_X400_SND_TCP: TGUID = '{00090068-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_X400_SND_TCP}
- SVCID_CSNET_NS_TCP: TGUID = '{00090069-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_CSNET_NS_TCP}
- SVCID_POP_TCP: TGUID = '{0009006D-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_POP_TCP}
- SVCID_POP2_TCP: TGUID = '{0009006D-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_POP2_TCP}
- SVCID_POP3_TCP: TGUID = '{0009006E-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_POP3_TCP}
- SVCID_PORTMAP_TCP: TGUID = '{0009006F-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_PORTMAP_TCP}
- SVCID_SUNRPC_TCP: TGUID = '{0009006F-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_SUNRPC_TCP}
- SVCID_AUTH_TCP: TGUID = '{00090071-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_AUTH_TCP}
- SVCID_SFTP_TCP: TGUID = '{00090073-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_SFTP_TCP}
- SVCID_PATH_TCP: TGUID = '{00090075-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_PATH_TCP}
- SVCID_UUCP_PATH_TCP: TGUID = '{00090075-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_UUCP_PATH_TCP}
- SVCID_NNTP_TCP: TGUID = '{00090077-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_NNTP_TCP}
- SVCID_NBSESSION_TCP: TGUID = '{0009008B-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_NBSESSION_TCP}
- SVCID_NEWS_TCP: TGUID = '{00090090-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_NEWS_TCP}
- SVCID_TCPREPO_TCP: TGUID = '{0009009E-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_TCPREPO_TCP}
- SVCID_PRINT_SRV_TCP: TGUID = '{000900AA-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_PRINT_SRV_TCP}
- SVCID_VMNET_TCP: TGUID = '{000900AF-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_VMNET_TCP}
- SVCID_VMNET0_TCP: TGUID = '{00090190-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_VMNET0_TCP}
- SVCID_EXEC_TCP: TGUID = '{00090200-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_EXEC_TCP}
- SVCID_LOGIN_TCP: TGUID = '{00090201-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_LOGIN_TCP}
- SVCID_SHELL_TCP: TGUID = '{00090202-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_SHELL_TCP}
- SVCID_PRINTER_TCP: TGUID = '{00090203-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_PRINTER_TCP}
- SVCID_EFS_TCP: TGUID = '{00090208-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_EFS_TCP}
- SVCID_TEMPO_TCP: TGUID = '{0009020E-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_TEMPO_TCP}
- SVCID_COURIER_TCP: TGUID = '{00090212-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_COURIER_TCP}
- SVCID_CONFERENCE_TCP: TGUID = '{00090213-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_CONFERENCE_TCP}
- SVCID_NETNEWS_TCP: TGUID = '{00090214-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_NETNEWS_TCP}
- SVCID_UUCP_TCP: TGUID = '{0009021C-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_UUCP_TCP}
- SVCID_KLOGIN_TCP: TGUID = '{0009021F-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_KLOGIN_TCP}
- SVCID_KSHELL_TCP: TGUID = '{00090220-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_KSHELL_TCP}
- SVCID_REMOTEFS_TCP: TGUID = '{0009022C-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_REMOTEFS_TCP}
- SVCID_GARCON_TCP: TGUID = '{00090258-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_GARCON_TCP}
- SVCID_MAITRD_TCP: TGUID = '{00090259-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_MAITRD_TCP}
- SVCID_BUSBOY_TCP: TGUID = '{0009025A-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_BUSBOY_TCP}
- SVCID_KERBEROS_TCP: TGUID = '{000902EE-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_KERBEROS_TCP}
- SVCID_KERBEROS_MASTER_TCP: TGUID = '{000902EF-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_KERBEROS_MASTER_TCP}
- SVCID_KRB_PROP_TCP: TGUID = '{000902F2-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_KRB_PROP_TCP}
- SVCID_ERLOGIN_TCP: TGUID = '{00090378-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_ERLOGIN_TCP}
- SVCID_KPOP_TCP: TGUID = '{00090455-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_KPOP_TCP}
- SVCID_INGRESLOCK_TCP: TGUID = '{000905F4-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_INGRESLOCK_TCP}
- SVCID_KNETD_TCP: TGUID = '{00090805-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_KNETD_TCP}
- SVCID_EKLOGIN_TCP: TGUID = '{00090839-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_EKLOGIN_TCP}
- SVCID_RMT_TCP: TGUID = '{000915B3-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_RMT_TCP}
- SVCID_MTB_TCP: TGUID = '{000915B4-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_MTB_TCP}
- SVCID_MAN_TCP: TGUID = '{0009253F-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_MAN_TCP}
- SVCID_W_TCP: TGUID = '{00092540-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_W_TCP}
- SVCID_MANTST_TCP: TGUID = '{00092541-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_MANTST_TCP}
- SVCID_BNEWS_TCP: TGUID = '{00092710-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_BNEWS_TCP}
- SVCID_QUEUE_TCP: TGUID = '{00092711-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_QUEUE_TCP}
- SVCID_POKER_TCP: TGUID = '{00092712-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_POKER_TCP}
- SVCID_GATEWAY_TCP: TGUID = '{00092713-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_GATEWAY_TCP}
- SVCID_REMP_TCP: TGUID = '{00092714-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_REMP_TCP}
- SVCID_QMASTER_TCP: TGUID = '{0009271C-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_QMASTER_TCP}
-
- SVCID_ECHO_UDP: TGUID = '{000A0007-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_ECHO_UDP}
- SVCID_DISCARD_UDP: TGUID = '{000A0009-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_DISCARD_UDP}
- SVCID_DAYTIME_UDP: TGUID = '{000A000D-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_DAYTIME_UDP}
- SVCID_QOTD_UDP: TGUID = '{000A0011-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_QOTD_UDP}
- SVCID_CHARGEN_UDP: TGUID = '{000A0013-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_CHARGEN_UDP}
- SVCID_TIME_UDP: TGUID = '{000A0025-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_TIME_UDP}
- SVCID_RLP_UDP: TGUID = '{000A0027-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_RLP_UDP}
- SVCID_NAME_UDP: TGUID = '{000A002A-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_NAME_UDP}
- SVCID_DOMAIN_UDP: TGUID = '{000A0035-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_DOMAIN_UDP}
- SVCID_NAMESERVER_UDP: TGUID = '{000A0035-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_NAMESERVER_UDP}
- SVCID_BOOTP_UDP: TGUID = '{000A0043-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_BOOTP_UDP}
- SVCID_TFTP_UDP: TGUID = '{000A0045-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_TFTP_UDP}
- SVCID_PORTMAP_UDP: TGUID = '{000A006F-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_PORTMAP_UDP}
- SVCID_SUNRPC_UDP: TGUID = '{000A006F-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_SUNRPC_UDP}
- SVCID_NTP_UDP: TGUID = '{000A007B-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_NTP_UDP}
- SVCID_NBNAME_UDP: TGUID = '{000A0089-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_NBNAME_UDP}
- SVCID_NBDATAGRAM_UDP: TGUID = '{000A008A-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_NBDATAGRAM_UDP}
- SVCID_SGMP_UDP: TGUID = '{000A0099-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_SGMP_UDP}
- SVCID_SNMP_UDP: TGUID = '{000A00A1-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_SNMP_UDP}
- SVCID_SNMP_TRAP_UDP: TGUID = '{000A00A2-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_SNMP_TRAP_UDP}
- SVCID_LOAD_UDP: TGUID = '{000A013B-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_LOAD_UDP}
- SVCID_SYTEK_UDP: TGUID = '{000A01F4-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_SYTEK_UDP}
- SVCID_BIFF_UDP: TGUID = '{000A0200-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_BIFF_UDP}
- SVCID_WHO_UDP: TGUID = '{000A0201-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_WHO_UDP}
- SVCID_SYSLOG_UDP: TGUID = '{000A0202-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_SYSLOG_UDP}
- SVCID_TALK_UDP: TGUID = '{000A0205-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_TALK_UDP}
- SVCID_NTALK_UDP: TGUID = '{000A0206-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_NTALK_UDP}
- SVCID_ROUTE_UDP: TGUID = '{000A0208-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_ROUTE_UDP}
- SVCID_TIMED_UDP: TGUID = '{000A020D-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_TIMED_UDP}
- SVCID_RVD_CONTROL_UDP: TGUID = '{000A0213-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_RVD_CONTROL_UDP}
- SVCID_NETWALL_UDP: TGUID = '{000A0215-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_NETWALL_UDP}
- SVCID_NEW_RWHO_UDP: TGUID = '{000A0226-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_NEW_RWHO_UDP}
- SVCID_RMONITOR_UDP: TGUID = '{000A0230-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_RMONITOR_UDP}
- SVCID_MONITOR_UDP: TGUID = '{000A0231-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_MONITOR_UDP}
- SVCID_ACCTMASTER_UDP: TGUID = '{000A02BC-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_ACCTMASTER_UDP}
- SVCID_ACCTSLAVE_UDP: TGUID = '{000A02BD-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_ACCTSLAVE_UDP}
- SVCID_ACCT_UDP: TGUID = '{000A02BE-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_ACCT_UDP}
- SVCID_ACCTLOGIN_UDP: TGUID = '{000A02BF-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_ACCTLOGIN_UDP}
- SVCID_ACCTPRINTER_UDP: TGUID = '{000A02C0-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_ACCTPRINTER_UDP}
- SVCID_ELCSD_UDP: TGUID = '{000A02C0-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_ELCSD_UDP}
- SVCID_ACCTINFO_UDP: TGUID = '{000A02C1-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_ACCTINFO_UDP}
- SVCID_ACCTSLAVE2_UDP: TGUID = '{000A02C2-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_ACCTSLAVE2_UDP}
- SVCID_ACCTDISK_UDP: TGUID = '{000A02C3-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_ACCTDISK_UDP}
- SVCID_KERBEROS_UDP: TGUID = '{000A02EE-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_KERBEROS_UDP}
- SVCID_KERBEROS_MASTER_UDP: TGUID = '{000A02EF-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_KERBEROS_MASTER_UDP}
- SVCID_PASSWD_SERVER_UDP: TGUID = '{000A02F0-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_PASSWD_SERVER_UDP}
- SVCID_USERREG_SERVER_UDP: TGUID = '{000A02F1-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_USERREG_SERVER_UDP}
- SVCID_PHONE_UDP: TGUID = '{000A048F-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_PHONE_UDP}
- SVCID_MAZE_UDP: TGUID = '{000A0682-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_MAZE_UDP}
- SVCID_NFS_UDP: TGUID = '{000A0801-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_NFS_UDP}
- SVCID_RSCS0_UDP: TGUID = '{000A2710-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_RSCS0_UDP}
- SVCID_RSCS1_UDP: TGUID = '{000A2711-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_RSCS1_UDP}
- SVCID_RSCS2_UDP: TGUID = '{000A2712-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_RSCS2_UDP}
- SVCID_RSCS3_UDP: TGUID = '{000A2713-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_RSCS3_UDP}
- SVCID_RSCS4_UDP: TGUID = '{000A2714-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_RSCS4_UDP}
- SVCID_RSCS5_UDP: TGUID = '{000A2715-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_RSCS5_UDP}
- SVCID_RSCS6_UDP: TGUID = '{000A2716-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_RSCS6_UDP}
- SVCID_RSCS7_UDP: TGUID = '{000A2717-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_RSCS7_UDP}
- SVCID_RSCS8_UDP: TGUID = '{000A2718-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_RSCS8_UDP}
- SVCID_RSCS9_UDP: TGUID = '{000A2719-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_RSCS9_UDP}
- SVCID_RSCSA_UDP: TGUID = '{000A271A-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_RSCSA_UDP}
- SVCID_RSCSB_UDP: TGUID = '{000A271B-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_RSCSB_UDP}
- SVCID_QMASTER_UDP: TGUID = '{000A271C-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_QMASTER_UDP}
-
-//
-// NetWare services
-// GUID block = 000axxxx-0000-0000-C0000-000000000046
-//
-
- SVCID_PRINT_QUEUE: TGUID = '{000B0003-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_PRINT_QUEUE}
- SVCID_FILE_SERVER: TGUID = '{000B0004-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_FILE_SERVER}
- SVCID_JOB_SERVER: TGUID = '{000B0005-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_JOB_SERVER}
- SVCID_GATEWAY: TGUID = '{000B0006-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_GATEWAY}
- SVCID_PRINT_SERVER: TGUID = '{000B0007-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_PRINT_SERVER}
- SVCID_ARCHIVE_QUEUE: TGUID = '{000B0008-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_ARCHIVE_QUEUE}
- SVCID_ARCHIVE_SERVER: TGUID = '{000B0009-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_ARCHIVE_SERVER}
- SVCID_JOB_QUEUE: TGUID = '{000B000A-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_JOB_QUEUE}
- SVCID_ADMINISTRATION: TGUID = '{000B000B-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_ADMINISTRATION}
- SVCID_NAS_SNA_GATEWAY: TGUID = '{000B0021-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_NAS_SNA_GATEWAY}
- SVCID_REMOTE_BRIDGE_SERVER: TGUID = '{000B0024-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_REMOTE_BRIDGE_SERVER}
- SVCID_TIME_SYNCHRONIZATION_SERVER: TGUID = '{000B002D-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_TIME_SYNCHRONIZATION_SERVER}
- SVCID_ARCHIVE_SERVER_DYNAMIC_SAP: TGUID = '{000B002E-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_ARCHIVE_SERVER_DYNAMIC_SAP}
- SVCID_ADVERTISING_PRINT_SERVER: TGUID = '{000B0047-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_ADVERTISING_PRINT_SERVER}
- SVCID_BTRIEVE_VAP: TGUID = '{000B004B-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_BTRIEVE_VAP}
- SVCID_DIRECTORY_SERVER: TGUID = '{000B0278-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_DIRECTORY_SERVER}
- SVCID_NETWARE_386: TGUID = '{000B0107-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_NETWARE_386}
- SVCID_HP_PRINT_SERVER: TGUID = '{000B030C-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_HP_PRINT_SERVER}
- SVCID_SNA_SERVER: TGUID = '{000B0444-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_SNA_SERVER}
- SVCID_SAA_SERVER: TGUID = '{000B0130-0000-0000-C000-000000000046}';
- {$EXTERNALSYM SVCID_SAA_SERVER}
-//
-// DNS services by record type
-// GUID block = 00090035-0000-xxxx-C0000-000000000046
-//
-
- SVCID_DNS_TYPE_A: TGUID = '{00090035-0000-0001-C000-000000000046}';
- {$EXTERNALSYM SVCID_DNS_TYPE_A}
- SVCID_DNS_TYPE_NS: TGUID = '{00090035-0000-0002-C000-000000000046}';
- {$EXTERNALSYM SVCID_DNS_TYPE_NS}
- SVCID_DNS_TYPE_MD: TGUID = '{00090035-0000-0003-C000-000000000046}';
- {$EXTERNALSYM SVCID_DNS_TYPE_MD}
- SVCID_DNS_TYPE_MF: TGUID = '{00090035-0000-0004-C000-000000000046}';
- {$EXTERNALSYM SVCID_DNS_TYPE_MF}
- SVCID_DNS_TYPE_CNAME: TGUID = '{00090035-0000-0005-C000-000000000046}';
- {$EXTERNALSYM SVCID_DNS_TYPE_CNAME}
- SVCID_DNS_TYPE_SOA: TGUID = '{00090035-0000-0006-C000-000000000046}';
- {$EXTERNALSYM SVCID_DNS_TYPE_SOA}
- SVCID_DNS_TYPE_MB: TGUID = '{00090035-0000-0007-C000-000000000046}';
- {$EXTERNALSYM SVCID_DNS_TYPE_MB}
- SVCID_DNS_TYPE_MG: TGUID = '{00090035-0000-0008-C000-000000000046}';
- {$EXTERNALSYM SVCID_DNS_TYPE_MG}
- SVCID_DNS_TYPE_MR: TGUID = '{00090035-0000-0009-C000-000000000046}';
- {$EXTERNALSYM SVCID_DNS_TYPE_MR}
- SVCID_DNS_TYPE_NULL: TGUID = '{00090035-0000-000A-C000-000000000046}';
- {$EXTERNALSYM SVCID_DNS_TYPE_NULL}
- SVCID_DNS_TYPE_WKS: TGUID = '{00090035-0000-000B-C000-000000000046}';
- {$EXTERNALSYM SVCID_DNS_TYPE_WKS}
- SVCID_DNS_TYPE_PTR: TGUID = '{00090035-0000-000C-C000-000000000046}';
- {$EXTERNALSYM SVCID_DNS_TYPE_PTR}
- SVCID_DNS_TYPE_HINFO: TGUID = '{00090035-0000-000D-C000-000000000046}';
- {$EXTERNALSYM SVCID_DNS_TYPE_HINFO}
- SVCID_DNS_TYPE_MINFO: TGUID = '{00090035-0000-000E-C000-000000000046}';
- {$EXTERNALSYM SVCID_DNS_TYPE_MINFO}
- SVCID_DNS_TYPE_MX: TGUID = '{00090035-0000-000F-C000-000000000046}';
- {$EXTERNALSYM SVCID_DNS_TYPE_MX}
- SVCID_DNS_TYPE_TEXT: TGUID = '{00090035-0000-0010-C000-000000000046}';
- {$EXTERNALSYM SVCID_DNS_TYPE_TEXT}
- SVCID_DNS_TYPE_RP: TGUID = '{00090035-0000-0011-C000-000000000046}';
- {$EXTERNALSYM SVCID_DNS_TYPE_RP}
- SVCID_DNS_TYPE_AFSDB: TGUID = '{00090035-0000-0012-C000-000000000046}';
- {$EXTERNALSYM SVCID_DNS_TYPE_AFSDB}
- SVCID_DNS_TYPE_X25: TGUID = '{00090035-0000-0013-C000-000000000046}';
- {$EXTERNALSYM SVCID_DNS_TYPE_X25}
- SVCID_DNS_TYPE_ISDN: TGUID = '{00090035-0000-0014-C000-000000000046}';
- {$EXTERNALSYM SVCID_DNS_TYPE_ISDN}
- SVCID_DNS_TYPE_RT: TGUID = '{00090035-0000-0015-C000-000000000046}';
- {$EXTERNALSYM SVCID_DNS_TYPE_RT}
- SVCID_DNS_TYPE_NSAP: TGUID = '{00090035-0000-0016-C000-000000000046}';
- {$EXTERNALSYM SVCID_DNS_TYPE_NSAP}
- SVCID_DNS_TYPE_NSAPPTR: TGUID = '{00090035-0000-0017-C000-000000000046}';
- {$EXTERNALSYM SVCID_DNS_TYPE_NSAPPTR}
- SVCID_DNS_TYPE_SIG: TGUID = '{00090035-0000-0018-C000-000000000046}';
- {$EXTERNALSYM SVCID_DNS_TYPE_SIG}
- SVCID_DNS_TYPE_KEY: TGUID = '{00090035-0000-0019-C000-000000000046}';
- {$EXTERNALSYM SVCID_DNS_TYPE_KEY}
- SVCID_DNS_TYPE_PX: TGUID = '{00090035-0000-001A-C000-000000000046}';
- {$EXTERNALSYM SVCID_DNS_TYPE_PX}
- SVCID_DNS_TYPE_GPOS: TGUID = '{00090035-0000-001B-C000-000000000046}';
- {$EXTERNALSYM SVCID_DNS_TYPE_GPOS}
- SVCID_DNS_TYPE_AAAA: TGUID = '{00090035-0000-001C-C000-000000000046}';
- {$EXTERNALSYM SVCID_DNS_TYPE_AAAA}
- SVCID_DNS_TYPE_LOC: TGUID = '{00090035-0000-001D-C000-000000000046}';
- {$EXTERNALSYM SVCID_DNS_TYPE_LOC}
- SVCID_DNS_TYPE_NXT: TGUID = '{00090035-0000-001E-C000-000000000046}';
- {$EXTERNALSYM SVCID_DNS_TYPE_NXT}
- SVCID_DNS_TYPE_SRV: TGUID = '{00090035-0000-0021-C000-000000000046}';
- {$EXTERNALSYM SVCID_DNS_TYPE_SRV}
- SVCID_DNS_TYPE_ATMA: TGUID = '{00090035-0000-0022-C000-000000000046}';
- {$EXTERNALSYM SVCID_DNS_TYPE_ATMA}
-
-implementation
-
-function SVCID_TCP_RR(Port, RR: Word): TGUID;
-begin
- Result.D1 := ($0009 shl 16) or Port;
- Result.D2 := $0;
- Result.D3 := RR;
- Result.D4[0] := $C0;
- Result.D4[1] := $00;
- Result.D4[2] := $00;
- Result.D4[3] := $00;
- Result.D4[4] := $00;
- Result.D4[5] := $00;
- Result.D4[6] := $00;
- Result.D4[7] := $46;
-end;
-
-function SVCID_TCP(Port: Word): TGUID;
-begin
- Result := SVCID_TCP_RR(Port, 0)
-end;
-
-function SVCID_DNS(RecordType: Word): TGUID;
-begin
- Result := SVCID_TCP_RR(53, RecordType);
-end;
-
-function IS_SVCID_DNS(const Guid: TGUID): Boolean;
-begin
- Result := (Guid.D1 = $00090035) and (Guid.D2 = $0) and
- (Guid.D4[0] = $C0) and (Guid.D4[1] = $00) and (Guid.D4[2] = $00) and
- (Guid.D4[3] = $00) and (Guid.D4[4] = $00) and (Guid.D4[5] = $00) and
- (Guid.D4[6] = $00) and (Guid.D4[7] = $46);
-end;
-
-function IS_SVCID_TCP(const Guid: TGUID): Boolean;
-begin
- Result :=
- ((Guid.D1 and DWORD($FFFF0000)) = $00090000) and (Guid.D2 = $0) and
- (Guid.D4[0] = $C0) and (Guid.D4[1] = $00) and (Guid.D4[2] = $00) and
- (Guid.D4[3] = $00) and (Guid.D4[4] = $00) and (Guid.D4[5] = $00) and
- (Guid.D4[6] = $00) and (Guid.D4[7] = $46);
-end;
-
-function PORT_FROM_SVCID_TCP(const Guid: TGUID): Word;
-begin
- Result := WORD(Guid.D1 and $FFFF);
-end;
-
-function RR_FROM_SVCID(const Guid: TGUID): Word;
-begin
- Result := Guid.D3;
-end;
-
-procedure SET_TCP_SVCID_RR(var Guid: TGUID; _Port, _RR: Word);
-begin
- Guid.D1 := ($0009 shl 16) or _Port;
- Guid.D2 := $0;
- Guid.D3 := _RR;
- Guid.D4[0] := $C0;
- Guid.D4[1] := $00;
- Guid.D4[2] := $00;
- Guid.D4[3] := $00;
- Guid.D4[4] := $00;
- Guid.D4[5] := $00;
- Guid.D4[6] := $00;
- Guid.D4[7] := $46;
-end;
-
-procedure SET_TCP_SVCID(var Guid: TGUID; Port: Word);
-begin
- SET_TCP_SVCID_RR(Guid, Port, 0);
-end;
-
-function SVCID_UDP_RR(Port, RR: Word): TGUID;
-begin
- Result.D1 := ($000A shl 16) or Port;
- Result.D2 := $0;
- Result.D3 := RR;
- Result.D4[0] := $C0;
- Result.D4[1] := $00;
- Result.D4[2] := $00;
- Result.D4[3] := $00;
- Result.D4[4] := $00;
- Result.D4[5] := $00;
- Result.D4[6] := $00;
- Result.D4[7] := $46;
-end;
-
-function SVCID_UDP(Port: Word): TGUID;
-begin
- Result := SVCID_UDP_RR(Port, 0);
-end;
-
-function IS_SVCID_UDP(const Guid: TGUID): Boolean;
-begin
- Result := (Guid.D1 and DWORD($FFFF0000) = $000A0000) and (Guid.D2 = $0) and
- (Guid.D4[0] = $C0) and (Guid.D4[1] = $00) and (Guid.D4[2] = $00) and
- (Guid.D4[3] = $00) and (Guid.D4[4] = $00) and (Guid.D4[5] = $00) and
- (Guid.D4[6] = $00) and (Guid.D4[7] = $46);
-end;
-
-function PORT_FROM_SVCID_UDP(const Guid: TGUID): WORD;
-begin
- Result := WORD(Guid.D1 and $FFFF);
-end;
-
-procedure SET_UDP_SVCID_RR(var Guid: TGUID; Port, RR: WORD);
-begin
- Guid.D1 := ($000A shl 16) or Port;
- Guid.D2 := $0;
- Guid.D3 := RR;
- Guid.D4[0] := $C0;
- Guid.D4[1] := $00;
- Guid.D4[2] := $00;
- Guid.D4[3] := $00;
- Guid.D4[4] := $00;
- Guid.D4[5] := $00;
- Guid.D4[6] := $00;
- Guid.D4[7] := $46;
-end;
-
-procedure SET_UDP_SVCID(var Guid: TGUID; Port: WORD);
-begin
- SET_UDP_SVCID_RR(Guid, Port, 0);
-end;
-
-function SVCID_NETWARE(SapId: WORD): TGUID;
-begin
- Result.D1 := ($000B shl 16) or SapId;
- Result.D2 := $0;
- Result.D3 := $0;
- Result.D4[0] := $C0;
- Result.D4[1] := $00;
- Result.D4[2] := $00;
- Result.D4[3] := $00;
- Result.D4[4] := $00;
- Result.D4[5] := $00;
- Result.D4[6] := $00;
- Result.D4[7] := $46;
-end;
-
-function IS_SVCID_NETWARE(const Guid: TGUID): Boolean;
-begin
- Result := (Guid.D1 and DWORD($FFFF0000) = $000B0000) and (Guid.D2 = $0) and
- (Guid.D4[0] = $C0) and (Guid.D4[1] = $00) and (Guid.D4[2] = $00) and
- (Guid.D4[3] = $00) and (Guid.D4[4] = $00) and (Guid.D4[5] = $00) and
- (Guid.D4[6] = $00) and (Guid.D4[7] = $46);
-end;
-
-function SAPID_FROM_SVCID_NETWARE(const Guid: TGUID): WORD;
-begin
- Result := WORD(Guid.D1 and $FFFF);
-end;
-
-procedure SET_NETWARE_SVCID(var Guid: TGUID; SapId: WORD);
-begin
- Guid.D1 := ($000B shl 16) or SapId;
- Guid.D2 := $0;
- Guid.D3 := $0;
- Guid.D4[0] := $C0;
- Guid.D4[1] := $00;
- Guid.D4[2] := $00;
- Guid.D4[3] := $00;
- Guid.D4[4] := $00;
- Guid.D4[5] := $00;
- Guid.D4[6] := $00;
- Guid.D4[7] := $46;
-end;
-
-end.
+{******************************************************************************}
+{ }
+{ Winsock2 Service GUIDs API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: svcguid.h, released June 2000. The original Pascal }
+{ code is: SvcGuid.pas, released December 2000. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwasvcguid.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaSvcGuid;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "svguid.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ {$IFDEF USE_DELPHI_TYPES}
+ Windows;
+ {$ELSE}
+ JwaWinType;
+ {$ENDIF USE_DELPHI_TYPES}
+
+// Defines GUIDs for well-known services including:
+//
+// HOSTNAME
+// RFC 1060 (Assigned Numbers) from IANA (All TCP/IP Services)
+// NetWare services
+
+//
+// HOSTNAME--special GUID which refers to the name of a host as opposed
+// to any particular service on that host.
+//
+
+const
+ SVCID_HOSTNAME: TGUID = '{0002a800-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_HOSTNAME}
+
+//
+// GUIDs for dealing with AF_INET address spaces alone. These are
+// intended to be used when fetching hostent or servent information
+// from such a provider. These are not general-purpose types and
+// should be used only when the intent is getting at down-level
+// information.
+//
+
+ SVCID_INET_HOSTADDRBYINETSTRING: TGUID = '{0002a801-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_INET_HOSTADDRBYINETSTRING}
+ SVCID_INET_SERVICEBYNAME: TGUID = '{0002a802-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_INET_SERVICEBYNAME}
+ SVCID_INET_HOSTADDRBYNAME: TGUID = '{0002a803-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_INET_HOSTADDRBYNAME}
+
+//
+// Macros for defining and testing TCP and UDP GUIDs from a well-known
+// port.
+//
+
+function SVCID_TCP_RR(Port, RR: Word): TGUID;
+{$EXTERNALSYM SVCID_TCP_RR}
+
+function SVCID_TCP(Port: Word): TGUID;
+{$EXTERNALSYM SVCID_TCP}
+
+function SVCID_DNS(RecordType: Word): TGUID;
+{$EXTERNALSYM SVCID_DNS}
+
+function IS_SVCID_DNS(const Guid: TGUID): Boolean;
+{$EXTERNALSYM IS_SVCID_DNS}
+
+function IS_SVCID_TCP(const Guid: TGUID): Boolean;
+{$EXTERNALSYM IS_SVCID_TCP}
+
+function PORT_FROM_SVCID_TCP(const Guid: TGUID): Word;
+{$EXTERNALSYM PORT_FROM_SVCID_TCP}
+
+function RR_FROM_SVCID(const Guid: TGUID): Word;
+{$EXTERNALSYM RR_FROM_SVCID}
+
+procedure SET_TCP_SVCID_RR(var Guid: TGUID; _Port, _RR: Word);
+{$EXTERNALSYM SET_TCP_SVCID_RR}
+
+procedure SET_TCP_SVCID(var Guid: TGUID; Port: Word);
+{$EXTERNALSYM SET_TCP_SVCID}
+
+function SVCID_UDP_RR(Port, RR: Word): TGUID;
+{$EXTERNALSYM SVCID_UDP_RR}
+
+function SVCID_UDP(Port: Word): TGUID;
+{$EXTERNALSYM SVCID_UDP}
+
+function IS_SVCID_UDP(const Guid: TGUID): Boolean;
+{$EXTERNALSYM IS_SVCID_UDP}
+
+function PORT_FROM_SVCID_UDP(const Guid: TGUID): WORD;
+{$EXTERNALSYM PORT_FROM_SVCID_UDP}
+
+procedure SET_UDP_SVCID_RR(var Guid: TGUID; Port, RR: WORD);
+{$EXTERNALSYM SET_UDP_SVCID_RR}
+
+procedure SET_UDP_SVCID(var Guid: TGUID; Port: WORD);
+{$EXTERNALSYM SET_UDP_SVCID}
+
+//
+// Macros for defining and testing Netware (SAP) services based on the
+// SAP ID.
+//
+
+function SVCID_NETWARE(SapId: WORD): TGUID;
+{$EXTERNALSYM SVCID_NETWARE}
+
+function IS_SVCID_NETWARE(const Guid: TGUID): Boolean;
+{$EXTERNALSYM IS_SVCID_NETWARE}
+
+function SAPID_FROM_SVCID_NETWARE(const Guid: TGUID): WORD;
+{$EXTERNALSYM SAPID_FROM_SVCID_NETWARE}
+
+procedure SET_NETWARE_SVCID(var Guid: TGUID; SapId: WORD);
+{$EXTERNALSYM SET_NETWARE_SVCID}
+
+//
+// RFC 1060 services as defined by the IANA
+// GUID block = 0009xxxx-0000-0000-C0000-000000000046
+//
+
+const
+ SVCID_ECHO_TCP: TGUID = '{00090007-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_ECHO_TCP}
+ SVCID_DISCARD_TCP: TGUID = '{00090009-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_DISCARD_TCP}
+ SVCID_SYSTAT_TCP: TGUID = '{0009000B-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_SYSTAT_TCP}
+ SVCID_DAYTIME_TCP: TGUID = '{0009000D-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_DAYTIME_TCP}
+ SVCID_NETSTAT_TCP: TGUID = '{0009000F-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_NETSTAT_TCP}
+ SVCID_QOTD_TCP: TGUID = '{00090011-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_QOTD_TCP}
+ SVCID_CHARGEN_TCP: TGUID = '{00090013-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_CHARGEN_TCP}
+ SVCID_FTP_DATA_TCP: TGUID = '{00090014-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_FTP_DATA_TCP}
+ SVCID_FTP_TCP: TGUID = '{00090015-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_FTP_TCP}
+ SVCID_TELNET_TCP: TGUID = '{00090017-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_TELNET_TCP}
+ SVCID_SMTP_TCP: TGUID = '{00090019-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_SMTP_TCP}
+ SVCID_TIME_TCP: TGUID = '{00090025-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_TIME_TCP}
+ SVCID_NAME_TCP: TGUID = '{0009002A-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_NAME_TCP}
+ SVCID_WHOIS_TCP: TGUID = '{0009002B-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_WHOIS_TCP}
+ SVCID_DOMAIN_TCP: TGUID = '{00090035-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_DOMAIN_TCP}
+ SVCID_NAMESERVER_TCP: TGUID = '{00090035-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_NAMESERVER_TCP}
+ SVCID_MTP_TCP: TGUID = '{00090039-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_MTP_TCP}
+ SVCID_RJE_TCP: TGUID = '{0009004D-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_RJE_TCP}
+ SVCID_FINGER_TCP: TGUID = '{0009004F-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_FINGER_TCP}
+ SVCID_LINK_TCP: TGUID = '{00090057-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_LINK_TCP}
+ SVCID_SUPDUP_TCP: TGUID = '{0009005F-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_SUPDUP_TCP}
+ SVCID_HOSTNAMES_TCP: TGUID = '{00090065-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_HOSTNAMES_TCP}
+ SVCID_ISO_TSAP_TCP: TGUID = '{00090066-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_ISO_TSAP_TCP}
+ SVCID_DICTIONARY_TCP: TGUID = '{00090067-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_DICTIONARY_TCP}
+ SVCID_X400_TCP: TGUID = '{00090067-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_X400_TCP}
+ SVCID_X400_SND_TCP: TGUID = '{00090068-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_X400_SND_TCP}
+ SVCID_CSNET_NS_TCP: TGUID = '{00090069-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_CSNET_NS_TCP}
+ SVCID_POP_TCP: TGUID = '{0009006D-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_POP_TCP}
+ SVCID_POP2_TCP: TGUID = '{0009006D-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_POP2_TCP}
+ SVCID_POP3_TCP: TGUID = '{0009006E-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_POP3_TCP}
+ SVCID_PORTMAP_TCP: TGUID = '{0009006F-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_PORTMAP_TCP}
+ SVCID_SUNRPC_TCP: TGUID = '{0009006F-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_SUNRPC_TCP}
+ SVCID_AUTH_TCP: TGUID = '{00090071-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_AUTH_TCP}
+ SVCID_SFTP_TCP: TGUID = '{00090073-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_SFTP_TCP}
+ SVCID_PATH_TCP: TGUID = '{00090075-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_PATH_TCP}
+ SVCID_UUCP_PATH_TCP: TGUID = '{00090075-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_UUCP_PATH_TCP}
+ SVCID_NNTP_TCP: TGUID = '{00090077-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_NNTP_TCP}
+ SVCID_NBSESSION_TCP: TGUID = '{0009008B-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_NBSESSION_TCP}
+ SVCID_NEWS_TCP: TGUID = '{00090090-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_NEWS_TCP}
+ SVCID_TCPREPO_TCP: TGUID = '{0009009E-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_TCPREPO_TCP}
+ SVCID_PRINT_SRV_TCP: TGUID = '{000900AA-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_PRINT_SRV_TCP}
+ SVCID_VMNET_TCP: TGUID = '{000900AF-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_VMNET_TCP}
+ SVCID_VMNET0_TCP: TGUID = '{00090190-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_VMNET0_TCP}
+ SVCID_EXEC_TCP: TGUID = '{00090200-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_EXEC_TCP}
+ SVCID_LOGIN_TCP: TGUID = '{00090201-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_LOGIN_TCP}
+ SVCID_SHELL_TCP: TGUID = '{00090202-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_SHELL_TCP}
+ SVCID_PRINTER_TCP: TGUID = '{00090203-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_PRINTER_TCP}
+ SVCID_EFS_TCP: TGUID = '{00090208-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_EFS_TCP}
+ SVCID_TEMPO_TCP: TGUID = '{0009020E-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_TEMPO_TCP}
+ SVCID_COURIER_TCP: TGUID = '{00090212-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_COURIER_TCP}
+ SVCID_CONFERENCE_TCP: TGUID = '{00090213-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_CONFERENCE_TCP}
+ SVCID_NETNEWS_TCP: TGUID = '{00090214-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_NETNEWS_TCP}
+ SVCID_UUCP_TCP: TGUID = '{0009021C-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_UUCP_TCP}
+ SVCID_KLOGIN_TCP: TGUID = '{0009021F-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_KLOGIN_TCP}
+ SVCID_KSHELL_TCP: TGUID = '{00090220-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_KSHELL_TCP}
+ SVCID_REMOTEFS_TCP: TGUID = '{0009022C-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_REMOTEFS_TCP}
+ SVCID_GARCON_TCP: TGUID = '{00090258-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_GARCON_TCP}
+ SVCID_MAITRD_TCP: TGUID = '{00090259-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_MAITRD_TCP}
+ SVCID_BUSBOY_TCP: TGUID = '{0009025A-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_BUSBOY_TCP}
+ SVCID_KERBEROS_TCP: TGUID = '{000902EE-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_KERBEROS_TCP}
+ SVCID_KERBEROS_MASTER_TCP: TGUID = '{000902EF-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_KERBEROS_MASTER_TCP}
+ SVCID_KRB_PROP_TCP: TGUID = '{000902F2-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_KRB_PROP_TCP}
+ SVCID_ERLOGIN_TCP: TGUID = '{00090378-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_ERLOGIN_TCP}
+ SVCID_KPOP_TCP: TGUID = '{00090455-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_KPOP_TCP}
+ SVCID_INGRESLOCK_TCP: TGUID = '{000905F4-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_INGRESLOCK_TCP}
+ SVCID_KNETD_TCP: TGUID = '{00090805-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_KNETD_TCP}
+ SVCID_EKLOGIN_TCP: TGUID = '{00090839-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_EKLOGIN_TCP}
+ SVCID_RMT_TCP: TGUID = '{000915B3-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_RMT_TCP}
+ SVCID_MTB_TCP: TGUID = '{000915B4-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_MTB_TCP}
+ SVCID_MAN_TCP: TGUID = '{0009253F-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_MAN_TCP}
+ SVCID_W_TCP: TGUID = '{00092540-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_W_TCP}
+ SVCID_MANTST_TCP: TGUID = '{00092541-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_MANTST_TCP}
+ SVCID_BNEWS_TCP: TGUID = '{00092710-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_BNEWS_TCP}
+ SVCID_QUEUE_TCP: TGUID = '{00092711-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_QUEUE_TCP}
+ SVCID_POKER_TCP: TGUID = '{00092712-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_POKER_TCP}
+ SVCID_GATEWAY_TCP: TGUID = '{00092713-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_GATEWAY_TCP}
+ SVCID_REMP_TCP: TGUID = '{00092714-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_REMP_TCP}
+ SVCID_QMASTER_TCP: TGUID = '{0009271C-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_QMASTER_TCP}
+
+ SVCID_ECHO_UDP: TGUID = '{000A0007-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_ECHO_UDP}
+ SVCID_DISCARD_UDP: TGUID = '{000A0009-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_DISCARD_UDP}
+ SVCID_DAYTIME_UDP: TGUID = '{000A000D-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_DAYTIME_UDP}
+ SVCID_QOTD_UDP: TGUID = '{000A0011-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_QOTD_UDP}
+ SVCID_CHARGEN_UDP: TGUID = '{000A0013-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_CHARGEN_UDP}
+ SVCID_TIME_UDP: TGUID = '{000A0025-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_TIME_UDP}
+ SVCID_RLP_UDP: TGUID = '{000A0027-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_RLP_UDP}
+ SVCID_NAME_UDP: TGUID = '{000A002A-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_NAME_UDP}
+ SVCID_DOMAIN_UDP: TGUID = '{000A0035-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_DOMAIN_UDP}
+ SVCID_NAMESERVER_UDP: TGUID = '{000A0035-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_NAMESERVER_UDP}
+ SVCID_BOOTP_UDP: TGUID = '{000A0043-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_BOOTP_UDP}
+ SVCID_TFTP_UDP: TGUID = '{000A0045-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_TFTP_UDP}
+ SVCID_PORTMAP_UDP: TGUID = '{000A006F-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_PORTMAP_UDP}
+ SVCID_SUNRPC_UDP: TGUID = '{000A006F-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_SUNRPC_UDP}
+ SVCID_NTP_UDP: TGUID = '{000A007B-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_NTP_UDP}
+ SVCID_NBNAME_UDP: TGUID = '{000A0089-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_NBNAME_UDP}
+ SVCID_NBDATAGRAM_UDP: TGUID = '{000A008A-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_NBDATAGRAM_UDP}
+ SVCID_SGMP_UDP: TGUID = '{000A0099-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_SGMP_UDP}
+ SVCID_SNMP_UDP: TGUID = '{000A00A1-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_SNMP_UDP}
+ SVCID_SNMP_TRAP_UDP: TGUID = '{000A00A2-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_SNMP_TRAP_UDP}
+ SVCID_LOAD_UDP: TGUID = '{000A013B-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_LOAD_UDP}
+ SVCID_SYTEK_UDP: TGUID = '{000A01F4-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_SYTEK_UDP}
+ SVCID_BIFF_UDP: TGUID = '{000A0200-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_BIFF_UDP}
+ SVCID_WHO_UDP: TGUID = '{000A0201-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_WHO_UDP}
+ SVCID_SYSLOG_UDP: TGUID = '{000A0202-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_SYSLOG_UDP}
+ SVCID_TALK_UDP: TGUID = '{000A0205-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_TALK_UDP}
+ SVCID_NTALK_UDP: TGUID = '{000A0206-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_NTALK_UDP}
+ SVCID_ROUTE_UDP: TGUID = '{000A0208-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_ROUTE_UDP}
+ SVCID_TIMED_UDP: TGUID = '{000A020D-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_TIMED_UDP}
+ SVCID_RVD_CONTROL_UDP: TGUID = '{000A0213-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_RVD_CONTROL_UDP}
+ SVCID_NETWALL_UDP: TGUID = '{000A0215-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_NETWALL_UDP}
+ SVCID_NEW_RWHO_UDP: TGUID = '{000A0226-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_NEW_RWHO_UDP}
+ SVCID_RMONITOR_UDP: TGUID = '{000A0230-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_RMONITOR_UDP}
+ SVCID_MONITOR_UDP: TGUID = '{000A0231-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_MONITOR_UDP}
+ SVCID_ACCTMASTER_UDP: TGUID = '{000A02BC-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_ACCTMASTER_UDP}
+ SVCID_ACCTSLAVE_UDP: TGUID = '{000A02BD-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_ACCTSLAVE_UDP}
+ SVCID_ACCT_UDP: TGUID = '{000A02BE-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_ACCT_UDP}
+ SVCID_ACCTLOGIN_UDP: TGUID = '{000A02BF-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_ACCTLOGIN_UDP}
+ SVCID_ACCTPRINTER_UDP: TGUID = '{000A02C0-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_ACCTPRINTER_UDP}
+ SVCID_ELCSD_UDP: TGUID = '{000A02C0-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_ELCSD_UDP}
+ SVCID_ACCTINFO_UDP: TGUID = '{000A02C1-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_ACCTINFO_UDP}
+ SVCID_ACCTSLAVE2_UDP: TGUID = '{000A02C2-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_ACCTSLAVE2_UDP}
+ SVCID_ACCTDISK_UDP: TGUID = '{000A02C3-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_ACCTDISK_UDP}
+ SVCID_KERBEROS_UDP: TGUID = '{000A02EE-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_KERBEROS_UDP}
+ SVCID_KERBEROS_MASTER_UDP: TGUID = '{000A02EF-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_KERBEROS_MASTER_UDP}
+ SVCID_PASSWD_SERVER_UDP: TGUID = '{000A02F0-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_PASSWD_SERVER_UDP}
+ SVCID_USERREG_SERVER_UDP: TGUID = '{000A02F1-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_USERREG_SERVER_UDP}
+ SVCID_PHONE_UDP: TGUID = '{000A048F-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_PHONE_UDP}
+ SVCID_MAZE_UDP: TGUID = '{000A0682-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_MAZE_UDP}
+ SVCID_NFS_UDP: TGUID = '{000A0801-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_NFS_UDP}
+ SVCID_RSCS0_UDP: TGUID = '{000A2710-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_RSCS0_UDP}
+ SVCID_RSCS1_UDP: TGUID = '{000A2711-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_RSCS1_UDP}
+ SVCID_RSCS2_UDP: TGUID = '{000A2712-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_RSCS2_UDP}
+ SVCID_RSCS3_UDP: TGUID = '{000A2713-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_RSCS3_UDP}
+ SVCID_RSCS4_UDP: TGUID = '{000A2714-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_RSCS4_UDP}
+ SVCID_RSCS5_UDP: TGUID = '{000A2715-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_RSCS5_UDP}
+ SVCID_RSCS6_UDP: TGUID = '{000A2716-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_RSCS6_UDP}
+ SVCID_RSCS7_UDP: TGUID = '{000A2717-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_RSCS7_UDP}
+ SVCID_RSCS8_UDP: TGUID = '{000A2718-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_RSCS8_UDP}
+ SVCID_RSCS9_UDP: TGUID = '{000A2719-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_RSCS9_UDP}
+ SVCID_RSCSA_UDP: TGUID = '{000A271A-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_RSCSA_UDP}
+ SVCID_RSCSB_UDP: TGUID = '{000A271B-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_RSCSB_UDP}
+ SVCID_QMASTER_UDP: TGUID = '{000A271C-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_QMASTER_UDP}
+
+//
+// NetWare services
+// GUID block = 000axxxx-0000-0000-C0000-000000000046
+//
+
+ SVCID_PRINT_QUEUE: TGUID = '{000B0003-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_PRINT_QUEUE}
+ SVCID_FILE_SERVER: TGUID = '{000B0004-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_FILE_SERVER}
+ SVCID_JOB_SERVER: TGUID = '{000B0005-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_JOB_SERVER}
+ SVCID_GATEWAY: TGUID = '{000B0006-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_GATEWAY}
+ SVCID_PRINT_SERVER: TGUID = '{000B0007-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_PRINT_SERVER}
+ SVCID_ARCHIVE_QUEUE: TGUID = '{000B0008-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_ARCHIVE_QUEUE}
+ SVCID_ARCHIVE_SERVER: TGUID = '{000B0009-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_ARCHIVE_SERVER}
+ SVCID_JOB_QUEUE: TGUID = '{000B000A-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_JOB_QUEUE}
+ SVCID_ADMINISTRATION: TGUID = '{000B000B-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_ADMINISTRATION}
+ SVCID_NAS_SNA_GATEWAY: TGUID = '{000B0021-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_NAS_SNA_GATEWAY}
+ SVCID_REMOTE_BRIDGE_SERVER: TGUID = '{000B0024-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_REMOTE_BRIDGE_SERVER}
+ SVCID_TIME_SYNCHRONIZATION_SERVER: TGUID = '{000B002D-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_TIME_SYNCHRONIZATION_SERVER}
+ SVCID_ARCHIVE_SERVER_DYNAMIC_SAP: TGUID = '{000B002E-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_ARCHIVE_SERVER_DYNAMIC_SAP}
+ SVCID_ADVERTISING_PRINT_SERVER: TGUID = '{000B0047-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_ADVERTISING_PRINT_SERVER}
+ SVCID_BTRIEVE_VAP: TGUID = '{000B004B-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_BTRIEVE_VAP}
+ SVCID_DIRECTORY_SERVER: TGUID = '{000B0278-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_DIRECTORY_SERVER}
+ SVCID_NETWARE_386: TGUID = '{000B0107-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_NETWARE_386}
+ SVCID_HP_PRINT_SERVER: TGUID = '{000B030C-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_HP_PRINT_SERVER}
+ SVCID_SNA_SERVER: TGUID = '{000B0444-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_SNA_SERVER}
+ SVCID_SAA_SERVER: TGUID = '{000B0130-0000-0000-C000-000000000046}';
+ {$EXTERNALSYM SVCID_SAA_SERVER}
+//
+// DNS services by record type
+// GUID block = 00090035-0000-xxxx-C0000-000000000046
+//
+
+ SVCID_DNS_TYPE_A: TGUID = '{00090035-0000-0001-C000-000000000046}';
+ {$EXTERNALSYM SVCID_DNS_TYPE_A}
+ SVCID_DNS_TYPE_NS: TGUID = '{00090035-0000-0002-C000-000000000046}';
+ {$EXTERNALSYM SVCID_DNS_TYPE_NS}
+ SVCID_DNS_TYPE_MD: TGUID = '{00090035-0000-0003-C000-000000000046}';
+ {$EXTERNALSYM SVCID_DNS_TYPE_MD}
+ SVCID_DNS_TYPE_MF: TGUID = '{00090035-0000-0004-C000-000000000046}';
+ {$EXTERNALSYM SVCID_DNS_TYPE_MF}
+ SVCID_DNS_TYPE_CNAME: TGUID = '{00090035-0000-0005-C000-000000000046}';
+ {$EXTERNALSYM SVCID_DNS_TYPE_CNAME}
+ SVCID_DNS_TYPE_SOA: TGUID = '{00090035-0000-0006-C000-000000000046}';
+ {$EXTERNALSYM SVCID_DNS_TYPE_SOA}
+ SVCID_DNS_TYPE_MB: TGUID = '{00090035-0000-0007-C000-000000000046}';
+ {$EXTERNALSYM SVCID_DNS_TYPE_MB}
+ SVCID_DNS_TYPE_MG: TGUID = '{00090035-0000-0008-C000-000000000046}';
+ {$EXTERNALSYM SVCID_DNS_TYPE_MG}
+ SVCID_DNS_TYPE_MR: TGUID = '{00090035-0000-0009-C000-000000000046}';
+ {$EXTERNALSYM SVCID_DNS_TYPE_MR}
+ SVCID_DNS_TYPE_NULL: TGUID = '{00090035-0000-000A-C000-000000000046}';
+ {$EXTERNALSYM SVCID_DNS_TYPE_NULL}
+ SVCID_DNS_TYPE_WKS: TGUID = '{00090035-0000-000B-C000-000000000046}';
+ {$EXTERNALSYM SVCID_DNS_TYPE_WKS}
+ SVCID_DNS_TYPE_PTR: TGUID = '{00090035-0000-000C-C000-000000000046}';
+ {$EXTERNALSYM SVCID_DNS_TYPE_PTR}
+ SVCID_DNS_TYPE_HINFO: TGUID = '{00090035-0000-000D-C000-000000000046}';
+ {$EXTERNALSYM SVCID_DNS_TYPE_HINFO}
+ SVCID_DNS_TYPE_MINFO: TGUID = '{00090035-0000-000E-C000-000000000046}';
+ {$EXTERNALSYM SVCID_DNS_TYPE_MINFO}
+ SVCID_DNS_TYPE_MX: TGUID = '{00090035-0000-000F-C000-000000000046}';
+ {$EXTERNALSYM SVCID_DNS_TYPE_MX}
+ SVCID_DNS_TYPE_TEXT: TGUID = '{00090035-0000-0010-C000-000000000046}';
+ {$EXTERNALSYM SVCID_DNS_TYPE_TEXT}
+ SVCID_DNS_TYPE_RP: TGUID = '{00090035-0000-0011-C000-000000000046}';
+ {$EXTERNALSYM SVCID_DNS_TYPE_RP}
+ SVCID_DNS_TYPE_AFSDB: TGUID = '{00090035-0000-0012-C000-000000000046}';
+ {$EXTERNALSYM SVCID_DNS_TYPE_AFSDB}
+ SVCID_DNS_TYPE_X25: TGUID = '{00090035-0000-0013-C000-000000000046}';
+ {$EXTERNALSYM SVCID_DNS_TYPE_X25}
+ SVCID_DNS_TYPE_ISDN: TGUID = '{00090035-0000-0014-C000-000000000046}';
+ {$EXTERNALSYM SVCID_DNS_TYPE_ISDN}
+ SVCID_DNS_TYPE_RT: TGUID = '{00090035-0000-0015-C000-000000000046}';
+ {$EXTERNALSYM SVCID_DNS_TYPE_RT}
+ SVCID_DNS_TYPE_NSAP: TGUID = '{00090035-0000-0016-C000-000000000046}';
+ {$EXTERNALSYM SVCID_DNS_TYPE_NSAP}
+ SVCID_DNS_TYPE_NSAPPTR: TGUID = '{00090035-0000-0017-C000-000000000046}';
+ {$EXTERNALSYM SVCID_DNS_TYPE_NSAPPTR}
+ SVCID_DNS_TYPE_SIG: TGUID = '{00090035-0000-0018-C000-000000000046}';
+ {$EXTERNALSYM SVCID_DNS_TYPE_SIG}
+ SVCID_DNS_TYPE_KEY: TGUID = '{00090035-0000-0019-C000-000000000046}';
+ {$EXTERNALSYM SVCID_DNS_TYPE_KEY}
+ SVCID_DNS_TYPE_PX: TGUID = '{00090035-0000-001A-C000-000000000046}';
+ {$EXTERNALSYM SVCID_DNS_TYPE_PX}
+ SVCID_DNS_TYPE_GPOS: TGUID = '{00090035-0000-001B-C000-000000000046}';
+ {$EXTERNALSYM SVCID_DNS_TYPE_GPOS}
+ SVCID_DNS_TYPE_AAAA: TGUID = '{00090035-0000-001C-C000-000000000046}';
+ {$EXTERNALSYM SVCID_DNS_TYPE_AAAA}
+ SVCID_DNS_TYPE_LOC: TGUID = '{00090035-0000-001D-C000-000000000046}';
+ {$EXTERNALSYM SVCID_DNS_TYPE_LOC}
+ SVCID_DNS_TYPE_NXT: TGUID = '{00090035-0000-001E-C000-000000000046}';
+ {$EXTERNALSYM SVCID_DNS_TYPE_NXT}
+ SVCID_DNS_TYPE_SRV: TGUID = '{00090035-0000-0021-C000-000000000046}';
+ {$EXTERNALSYM SVCID_DNS_TYPE_SRV}
+ SVCID_DNS_TYPE_ATMA: TGUID = '{00090035-0000-0022-C000-000000000046}';
+ {$EXTERNALSYM SVCID_DNS_TYPE_ATMA}
+
+implementation
+
+function SVCID_TCP_RR(Port, RR: Word): TGUID;
+begin
+ Result.D1 := ($0009 shl 16) or Port;
+ Result.D2 := $0;
+ Result.D3 := RR;
+ Result.D4[0] := $C0;
+ Result.D4[1] := $00;
+ Result.D4[2] := $00;
+ Result.D4[3] := $00;
+ Result.D4[4] := $00;
+ Result.D4[5] := $00;
+ Result.D4[6] := $00;
+ Result.D4[7] := $46;
+end;
+
+function SVCID_TCP(Port: Word): TGUID;
+begin
+ Result := SVCID_TCP_RR(Port, 0)
+end;
+
+function SVCID_DNS(RecordType: Word): TGUID;
+begin
+ Result := SVCID_TCP_RR(53, RecordType);
+end;
+
+function IS_SVCID_DNS(const Guid: TGUID): Boolean;
+begin
+ Result := (Guid.D1 = $00090035) and (Guid.D2 = $0) and
+ (Guid.D4[0] = $C0) and (Guid.D4[1] = $00) and (Guid.D4[2] = $00) and
+ (Guid.D4[3] = $00) and (Guid.D4[4] = $00) and (Guid.D4[5] = $00) and
+ (Guid.D4[6] = $00) and (Guid.D4[7] = $46);
+end;
+
+function IS_SVCID_TCP(const Guid: TGUID): Boolean;
+begin
+ Result :=
+ ((Guid.D1 and DWORD($FFFF0000)) = $00090000) and (Guid.D2 = $0) and
+ (Guid.D4[0] = $C0) and (Guid.D4[1] = $00) and (Guid.D4[2] = $00) and
+ (Guid.D4[3] = $00) and (Guid.D4[4] = $00) and (Guid.D4[5] = $00) and
+ (Guid.D4[6] = $00) and (Guid.D4[7] = $46);
+end;
+
+function PORT_FROM_SVCID_TCP(const Guid: TGUID): Word;
+begin
+ Result := WORD(Guid.D1 and $FFFF);
+end;
+
+function RR_FROM_SVCID(const Guid: TGUID): Word;
+begin
+ Result := Guid.D3;
+end;
+
+procedure SET_TCP_SVCID_RR(var Guid: TGUID; _Port, _RR: Word);
+begin
+ Guid.D1 := ($0009 shl 16) or _Port;
+ Guid.D2 := $0;
+ Guid.D3 := _RR;
+ Guid.D4[0] := $C0;
+ Guid.D4[1] := $00;
+ Guid.D4[2] := $00;
+ Guid.D4[3] := $00;
+ Guid.D4[4] := $00;
+ Guid.D4[5] := $00;
+ Guid.D4[6] := $00;
+ Guid.D4[7] := $46;
+end;
+
+procedure SET_TCP_SVCID(var Guid: TGUID; Port: Word);
+begin
+ SET_TCP_SVCID_RR(Guid, Port, 0);
+end;
+
+function SVCID_UDP_RR(Port, RR: Word): TGUID;
+begin
+ Result.D1 := ($000A shl 16) or Port;
+ Result.D2 := $0;
+ Result.D3 := RR;
+ Result.D4[0] := $C0;
+ Result.D4[1] := $00;
+ Result.D4[2] := $00;
+ Result.D4[3] := $00;
+ Result.D4[4] := $00;
+ Result.D4[5] := $00;
+ Result.D4[6] := $00;
+ Result.D4[7] := $46;
+end;
+
+function SVCID_UDP(Port: Word): TGUID;
+begin
+ Result := SVCID_UDP_RR(Port, 0);
+end;
+
+function IS_SVCID_UDP(const Guid: TGUID): Boolean;
+begin
+ Result := (Guid.D1 and DWORD($FFFF0000) = $000A0000) and (Guid.D2 = $0) and
+ (Guid.D4[0] = $C0) and (Guid.D4[1] = $00) and (Guid.D4[2] = $00) and
+ (Guid.D4[3] = $00) and (Guid.D4[4] = $00) and (Guid.D4[5] = $00) and
+ (Guid.D4[6] = $00) and (Guid.D4[7] = $46);
+end;
+
+function PORT_FROM_SVCID_UDP(const Guid: TGUID): WORD;
+begin
+ Result := WORD(Guid.D1 and $FFFF);
+end;
+
+procedure SET_UDP_SVCID_RR(var Guid: TGUID; Port, RR: WORD);
+begin
+ Guid.D1 := ($000A shl 16) or Port;
+ Guid.D2 := $0;
+ Guid.D3 := RR;
+ Guid.D4[0] := $C0;
+ Guid.D4[1] := $00;
+ Guid.D4[2] := $00;
+ Guid.D4[3] := $00;
+ Guid.D4[4] := $00;
+ Guid.D4[5] := $00;
+ Guid.D4[6] := $00;
+ Guid.D4[7] := $46;
+end;
+
+procedure SET_UDP_SVCID(var Guid: TGUID; Port: WORD);
+begin
+ SET_UDP_SVCID_RR(Guid, Port, 0);
+end;
+
+function SVCID_NETWARE(SapId: WORD): TGUID;
+begin
+ Result.D1 := ($000B shl 16) or SapId;
+ Result.D2 := $0;
+ Result.D3 := $0;
+ Result.D4[0] := $C0;
+ Result.D4[1] := $00;
+ Result.D4[2] := $00;
+ Result.D4[3] := $00;
+ Result.D4[4] := $00;
+ Result.D4[5] := $00;
+ Result.D4[6] := $00;
+ Result.D4[7] := $46;
+end;
+
+function IS_SVCID_NETWARE(const Guid: TGUID): Boolean;
+begin
+ Result := (Guid.D1 and DWORD($FFFF0000) = $000B0000) and (Guid.D2 = $0) and
+ (Guid.D4[0] = $C0) and (Guid.D4[1] = $00) and (Guid.D4[2] = $00) and
+ (Guid.D4[3] = $00) and (Guid.D4[4] = $00) and (Guid.D4[5] = $00) and
+ (Guid.D4[6] = $00) and (Guid.D4[7] = $46);
+end;
+
+function SAPID_FROM_SVCID_NETWARE(const Guid: TGUID): WORD;
+begin
+ Result := WORD(Guid.D1 and $FFFF);
+end;
+
+procedure SET_NETWARE_SVCID(var Guid: TGUID; SapId: WORD);
+begin
+ Guid.D1 := ($000B shl 16) or SapId;
+ Guid.D2 := $0;
+ Guid.D3 := $0;
+ Guid.D4[0] := $C0;
+ Guid.D4[1] := $00;
+ Guid.D4[2] := $00;
+ Guid.D4[3] := $00;
+ Guid.D4[4] := $00;
+ Guid.D4[5] := $00;
+ Guid.D4[6] := $00;
+ Guid.D4[7] := $46;
+end;
+
+end.
diff --git a/packages/extra/winunits/jwatlhelp32.pas b/packages/extra/winunits/jwatlhelp32.pas
index dfea6fbce2..fb5e5be5aa 100644
--- a/packages/extra/winunits/jwatlhelp32.pas
+++ b/packages/extra/winunits/jwatlhelp32.pas
@@ -1,590 +1,590 @@
-{******************************************************************************}
-{ }
-{ ToolHelp API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: tlhelp32.h, released June 2000. The original Pascal }
-{ code is: TlHelp32.pas, released December 2000. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwatlhelp32.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaTlHelp32;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "tlhelp32.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaWinType;
-
-const
- MAX_MODULE_NAME32 = 255;
- {$EXTERNALSYM MAX_MODULE_NAME32}
-
-// Snapshot function
-
-function CreateToolhelp32Snapshot(dwFlags, th32ProcessID: DWORD): HANDLE; stdcall;
-{$EXTERNALSYM CreateToolhelp32Snapshot}
-
-//
-// The th32ProcessID argument is only used if TH32CS_SNAPHEAPLIST or
-// TH32CS_SNAPMODULE is specified. th32ProcessID == 0 means the current
-// process.
-//
-// NOTE that all of the snapshots are global except for the heap and module
-// lists which are process specific. To enumerate the heap or module
-// state for all WIN32 processes call with TH32CS_SNAPALL and the
-// current process. Then for each process in the TH32CS_SNAPPROCESS
-// list that isn't the current process, do a call with just
-// TH32CS_SNAPHEAPLIST and/or TH32CS_SNAPMODULE.
-//
-// dwFlags
-//
-
-const
- TH32CS_SNAPHEAPLIST = $00000001;
- {$EXTERNALSYM TH32CS_SNAPHEAPLIST}
- TH32CS_SNAPPROCESS = $00000002;
- {$EXTERNALSYM TH32CS_SNAPPROCESS}
- TH32CS_SNAPTHREAD = $00000004;
- {$EXTERNALSYM TH32CS_SNAPTHREAD}
- TH32CS_SNAPMODULE = $00000008;
- {$EXTERNALSYM TH32CS_SNAPMODULE}
- TH32CS_SNAPMODULE32 = $00000010;
- {$EXTERNALSYM TH32CS_SNAPMODULE32}
- TH32CS_SNAPALL = TH32CS_SNAPHEAPLIST or TH32CS_SNAPPROCESS or
- TH32CS_SNAPTHREAD or TH32CS_SNAPMODULE;
- {$EXTERNALSYM TH32CS_SNAPALL}
- TH32CS_INHERIT = $80000000;
- {$EXTERNALSYM TH32CS_INHERIT}
-
-//
-// Use CloseHandle to destroy the snapshot
-//
-
-// Heap walking
-
-type
- PHEAPLIST32 = ^HEAPLIST32;
- {$EXTERNALSYM PHEAPLIST32}
- tagHEAPLIST32 = record
- dwSize: SIZE_T;
- th32ProcessID: DWORD; // owning process
- th32HeapID: ULONG_PTR; // heap (in owning process's context!)
- dwFlags: DWORD;
- end;
- {$EXTERNALSYM tagHEAPLIST32}
- HEAPLIST32 = tagHEAPLIST32;
- {$EXTERNALSYM HEAPLIST32}
- LPHEAPLIST32 = ^HEAPLIST32;
- {$EXTERNALSYM LPHEAPLIST32}
- THeapList32 = HEAPLIST32;
-
-//
-// dwFlags
-//
-
-const
- HF32_DEFAULT = 1; // process's default heap
- {$EXTERNALSYM HF32_DEFAULT}
- HF32_SHARED = 2; // is shared heap
- {$EXTERNALSYM HF32_SHARED}
-
-function Heap32ListFirst(hSnapshot: HANDLE; var lphl: HEAPLIST32): BOOL; stdcall;
-{$EXTERNALSYM Heap32ListFirst}
-function Heap32ListNext(hSnapshot: HANDLE; var lphl: HEAPLIST32): BOOL; stdcall;
-{$EXTERNALSYM Heap32ListNext}
-
-type
- PHEAPENTRY32 = ^HEAPENTRY32;
- {$EXTERNALSYM PHEAPENTRY32}
- tagHEAPENTRY32 = record
- dwSize: SIZE_T;
- hHandle: HANDLE; // Handle of this heap block
- dwAddress: ULONG_PTR; // Linear address of start of block
- dwBlockSize: SIZE_T; // Size of block in bytes
- dwFlags: DWORD;
- dwLockCount: DWORD;
- dwResvd: DWORD;
- th32ProcessID: DWORD; // owning process
- th32HeapID: ULONG_PTR; // heap block is in
- end;
- {$EXTERNALSYM tagHEAPENTRY32}
- HEAPENTRY32 = tagHEAPENTRY32;
- {$EXTERNALSYM HEAPENTRY32}
- LPHEAPENTRY32 = ^HEAPENTRY32;
- {$EXTERNALSYM LPHEAPENTRY32}
- THeapEntry32 = HEAPENTRY32;
-
-//
-// dwFlags
-//
-
-const
- LF32_FIXED = $00000001;
- {$EXTERNALSYM LF32_FIXED}
- LF32_FREE = $00000002;
- {$EXTERNALSYM LF32_FREE}
- LF32_MOVEABLE = $00000004;
- {$EXTERNALSYM LF32_MOVEABLE}
-
-function Heap32First(var lphe: HEAPENTRY32; th32ProcessID: DWORD;
- th32HeapID: ULONG_PTR): BOOL; stdcall;
-{$EXTERNALSYM Heap32First}
-function Heap32Next(var lphe: HEAPENTRY32): BOOL; stdcall;
-{$EXTERNALSYM Heap32Next}
-
-function Toolhelp32ReadProcessMemory(th32ProcessID: DWORD; lpBaseAddress: LPCVOID;
- lpBuffer: LPVOID; cbRead: DWORD; lpNumberOfBytesRead: LPDWORD): BOOL; stdcall;
-{$EXTERNALSYM Toolhelp32ReadProcessMemory}
-
-// Process walking
-
-type
- PPROCESSENTRY32W = ^PROCESSENTRY32W;
- {$EXTERNALSYM PPROCESSENTRY32W}
- tagPROCESSENTRY32W = record
- dwSize: DWORD;
- cntUsage: DWORD;
- th32ProcessID: DWORD; // this process
- th32DefaultHeapID: ULONG_PTR;
- th32ModuleID:DWORD; // associated exe
- cntThreads: DWORD;
- th32ParentProcessID: DWORD; // this process's parent process
- pcPriClassBase: LONG; // Base priority of process's threads
- dwFlags: DWORD;
- szExeFile: array [0..MAX_PATH - 1] of WCHAR; // Path
- end;
- {$EXTERNALSYM tagPROCESSENTRY32W}
- PROCESSENTRY32W = tagPROCESSENTRY32W;
- {$EXTERNALSYM PROCESSENTRY32W}
- LPPROCESSENTRY32W = ^PROCESSENTRY32W;
- {$EXTERNALSYM LPPROCESSENTRY32W}
- TProcessEntry32W = PROCESSENTRY32W;
-
- {$IFDEF UNICODE}
-
- PROCESSENTRY32 = PROCESSENTRY32W;
- {$EXTERNALSYM PROCESSENTRY32}
- PPROCESSENTRY32 = PPROCESSENTRY32W;
- {$EXTERNALSYM PPROCESSENTRY32}
- LPPROCESSENTRY32 = LPPROCESSENTRY32W;
- {$EXTERNALSYM LPPROCESSENTRY32}
- TProcessEntry32 = TProcessEntry32W;
-
- {$ELSE}
-
- PPROCESSENTRY32 = ^PROCESSENTRY32;
- {$EXTERNALSYM PPROCESSENTRY32}
- tagPROCESSENTRY32 = record
- dwSize: DWORD;
- cntUsage: DWORD;
- th32ProcessID: DWORD; // this process
- th32DefaultHeapID: ULONG_PTR;
- th32ModuleID: DWORD; // associated exe
- cntThreads: DWORD;
- th32ParentProcessID: DWORD; // this process's parent process
- pcPriClassBase: LONG; // Base priority of process's threads
- dwFlags: DWORD;
- szExeFile: array [0..MAX_PATH - 1] of Char; // Path
- end;
- {$EXTERNALSYM tagPROCESSENTRY32}
- PROCESSENTRY32 = tagPROCESSENTRY32;
- {$EXTERNALSYM PROCESSENTRY32}
- LPPROCESSENTRY32 = ^PROCESSENTRY32;
- {$EXTERNALSYM LPPROCESSENTRY32}
- TProcessEntry32 = PROCESSENTRY32;
-
- {$ENDIF UNICODE}
-
-function Process32FirstW(hSnapshot: HANDLE; var lppe: PROCESSENTRY32W): BOOL; stdcall;
-{$EXTERNALSYM Process32FirstW}
-function Process32NextW(hSnapshot: HANDLE; var lppe: PROCESSENTRY32W): BOOL; stdcall;
-{$EXTERNALSYM Process32NextW}
-
-function Process32First(hSnapshot: HANDLE; var lppe: PROCESSENTRY32): BOOL; stdcall;
-{$EXTERNALSYM Process32First}
-function Process32Next(hSnapshot: HANDLE; var lppe: PROCESSENTRY32): BOOL; stdcall;
-{$EXTERNALSYM Process32Next}
-
-// Thread walking
-
-type
- PTHREADENTRY32 = ^THREADENTRY32;
- {$EXTERNALSYM PTHREADENTRY32}
- tagTHREADENTRY32 = record
- dwSize: DWORD;
- cntUsage: DWORD;
- th32ThreadID: DWORD; // this thread
- th32OwnerProcessID: DWORD; // Process this thread is associated with
- tpBasePri: LONG;
- tpDeltaPri: LONG;
- dwFlags: DWORD;
- end;
- {$EXTERNALSYM tagTHREADENTRY32}
- THREADENTRY32 = tagTHREADENTRY32;
- {$EXTERNALSYM THREADENTRY32}
- LPTHREADENTRY32 = ^THREADENTRY32;
- {$EXTERNALSYM LPTHREADENTRY32}
- TThreadEntry32 = THREADENTRY32;
-
-function Thread32First(hSnapshot: HANDLE; var lpte: THREADENTRY32): BOOL; stdcall;
-{$EXTERNALSYM Thread32First}
-function Thread32Next(hSnapshot: HANDLE; var lpte: THREADENTRY32): BOOL; stdcall;
-{$EXTERNALSYM Thread32Next}
-
-// Module walking
-
-type
- PMODULEENTRY32W = ^MODULEENTRY32W;
- {$EXTERNALSYM PMODULEENTRY32W}
- tagMODULEENTRY32W = record
- dwSize: DWORD;
- th32ModuleID: DWORD; // This module
- th32ProcessID: DWORD; // owning process
- GlblcntUsage: DWORD; // Global usage count on the module
- ProccntUsage: DWORD; // Module usage count in th32ProcessID's context
- modBaseAddr: LPBYTE; // Base address of module in th32ProcessID's context
- modBaseSize: DWORD; // Size in bytes of module starting at modBaseAddr
- hModule: HMODULE; // The hModule of this module in th32ProcessID's context
- szModule: array [0..MAX_MODULE_NAME32] of WCHAR;
- szExePath: array [0..MAX_PATH - 1] of WCHAR;
- end;
- {$EXTERNALSYM tagMODULEENTRY32W}
- MODULEENTRY32W = tagMODULEENTRY32W;
- {$EXTERNALSYM MODULEENTRY32W}
- LPMODULEENTRY32W = ^MODULEENTRY32W;
- {$EXTERNALSYM LPMODULEENTRY32W}
- TModuleEntry32W = MODULEENTRY32W;
-
- {$IFDEF UNICODE}
-
- MODULEENTRY32 = MODULEENTRY32W;
- {$EXTERNALSYM MODULEENTRY32}
- PMODULEENTRY32 = PMODULEENTRY32W;
- {$EXTERNALSYM PMODULEENTRY32}
- LPMODULEENTRY32 = LPMODULEENTRY32W;
- {$EXTERNALSYM LPMODULEENTRY32}
- TModuleEntry32 = TModuleEntry32W;
-
- {$ELSE}
-
- PMODULEENTRY32 = ^MODULEENTRY32;
- {$EXTERNALSYM PMODULEENTRY32}
- tagMODULEENTRY32 = record
- dwSize: DWORD;
- th32ModuleID: DWORD; // This module
- th32ProcessID: DWORD; // owning process
- GlblcntUsage: DWORD; // Global usage count on the module
- ProccntUsage: DWORD; // Module usage count in th32ProcessID's context
- modBaseAddr: LPBYTE; // Base address of module in th32ProcessID's context
- modBaseSize: DWORD; // Size in bytes of module starting at modBaseAddr
- hModule: HMODULE; // The hModule of this module in th32ProcessID's context
- szModule: array [0..MAX_MODULE_NAME32] of Char;
- szExePath: array [0..MAX_PATH - 1] of Char;
- end;
- {$EXTERNALSYM tagMODULEENTRY32}
- MODULEENTRY32 = tagMODULEENTRY32;
- {$EXTERNALSYM MODULEENTRY32}
- LPMODULEENTRY32 = ^MODULEENTRY32;
- {$EXTERNALSYM LPMODULEENTRY32}
- TModuleEntry32 = MODULEENTRY32;
-
- {$ENDIF UNICODE}
-
-function Module32FirstW(hSnapshot: HANDLE; var lpme: MODULEENTRY32W): BOOL; stdcall;
-{$EXTERNALSYM Module32FirstW}
-function Module32NextW(hSnapshot: HANDLE; var lpme: MODULEENTRY32W): BOOL; stdcall;
-{$EXTERNALSYM Module32NextW}
-
-//
-// NOTE CAREFULLY that the modBaseAddr and hModule fields are valid ONLY
-// in th32ProcessID's process context.
-//
-function Module32First(hSnapshot: HANDLE; var lpme: MODULEENTRY32): BOOL; stdcall;
-{$EXTERNALSYM Module32First}
-function Module32Next(hSnapshot: HANDLE; var lpme: MODULEENTRY32): BOOL; stdcall;
-{$EXTERNALSYM Module32Next}
-
-implementation
-
-const
- kernel32 = 'kernel32.dll';
- {$IFDEF UNICODE}
- AWSuffix = 'W';
- {$ELSE}
- AWSuffix = 'A';
- {$ENDIF UNICODE}
-
-{$IFDEF DYNAMIC_LINK}
-
-var
- _CreateToolhelp32Snapshot: Pointer;
-
-function CreateToolhelp32Snapshot;
-begin
- GetProcedureAddress(_CreateToolhelp32Snapshot, kernel32, 'CreateToolhelp32Snapshot');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreateToolhelp32Snapshot]
- end;
-end;
-
-var
- _Heap32ListFirst: Pointer;
-
-function Heap32ListFirst;
-begin
- GetProcedureAddress(_Heap32ListFirst, kernel32, 'Heap32ListFirst');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_Heap32ListFirst]
- end;
-end;
-
-var
- _Heap32ListNext: Pointer;
-
-function Heap32ListNext;
-begin
- GetProcedureAddress(_Heap32ListNext, kernel32, 'Heap32ListNext');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_Heap32ListNext]
- end;
-end;
-
-var
- _Heap32First: Pointer;
-
-function Heap32First;
-begin
- GetProcedureAddress(_Heap32First, kernel32, 'Heap32First');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_Heap32First]
- end;
-end;
-
-var
- _Heap32Next: Pointer;
-
-function Heap32Next;
-begin
- GetProcedureAddress(_Heap32Next, kernel32, 'Heap32Next');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_Heap32Next]
- end;
-end;
-
-var
- _Toolhelp32ReadProcessMemory: Pointer;
-
-function Toolhelp32ReadProcessMemory;
-begin
- GetProcedureAddress(_Toolhelp32ReadProcessMemory, kernel32, 'Toolhelp32ReadProcessMemory');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_Toolhelp32ReadProcessMemory]
- end;
-end;
-
-var
- _Process32FirstW: Pointer;
-
-function Process32FirstW;
-begin
- GetProcedureAddress(_Process32FirstW, kernel32, 'Process32FirstW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_Process32FirstW]
- end;
-end;
-
-var
- _Process32NextW: Pointer;
-
-function Process32NextW;
-begin
- GetProcedureAddress(_Process32NextW, kernel32, 'Process32NextW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_Process32NextW]
- end;
-end;
-
-var
- _Process32First: Pointer;
-
-function Process32First;
-begin
- GetProcedureAddress(_Process32First, kernel32, 'Process32First' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_Process32First]
- end;
-end;
-
-var
- _Process32Next: Pointer;
-
-function Process32Next;
-begin
- GetProcedureAddress(_Process32Next, kernel32, 'Process32Next' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_Process32Next]
- end;
-end;
-
-var
- _Thread32First: Pointer;
-
-function Thread32First;
-begin
- GetProcedureAddress(_Thread32First, kernel32, 'Thread32First');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_Thread32First]
- end;
-end;
-
-var
- _Thread32Next: Pointer;
-
-function Thread32Next;
-begin
- GetProcedureAddress(_Thread32Next, kernel32, 'Thread32Next');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_Thread32Next]
- end;
-end;
-
-var
- _Module32FirstW: Pointer;
-
-function Module32FirstW;
-begin
- GetProcedureAddress(_Module32FirstW, kernel32, 'Module32FirstW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_Module32FirstW]
- end;
-end;
-
-var
- _Module32NextW: Pointer;
-
-function Module32NextW;
-begin
- GetProcedureAddress(_Module32NextW, kernel32, 'Module32NextW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_Module32NextW]
- end;
-end;
-
-var
- _Module32First: Pointer;
-
-function Module32First;
-begin
- GetProcedureAddress(_Module32First, kernel32, 'Module32First' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_Module32First]
- end;
-end;
-
-var
- _Module32Next: Pointer;
-
-function Module32Next;
-begin
- GetProcedureAddress(_Module32Next, kernel32, 'Module32Next' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_Module32Next]
- end;
-end;
-
-{$ELSE}
-
-function CreateToolhelp32Snapshot; external kernel32 name 'CreateToolhelp32Snapshot';
-function Heap32ListFirst; external kernel32 name 'Heap32ListFirst';
-function Heap32ListNext; external kernel32 name 'Heap32ListNext';
-function Heap32First; external kernel32 name 'Heap32First';
-function Heap32Next; external kernel32 name 'Heap32Next';
-function Toolhelp32ReadProcessMemory; external kernel32 name 'Toolhelp32ReadProcessMemory';
-function Process32FirstW; external kernel32 name 'Process32FirstW';
-function Process32NextW; external kernel32 name 'Process32NextW';
-function Process32First; external kernel32 name 'Process32First' + AWSuffix;
-function Process32Next; external kernel32 name 'Process32Next' + AWSuffix;
-function Thread32First; external kernel32 name 'Thread32First';
-function Thread32Next; external kernel32 name 'Thread32Next';
-function Module32FirstW; external kernel32 name 'Module32FirstW';
-function Module32NextW; external kernel32 name 'Module32NextW';
-function Module32First; external kernel32 name 'Module32First' + AWSuffix;
-function Module32Next; external kernel32 name 'Module32Next' + AWSuffix;
-
-{$ENDIF DYNAMIC_LINK}
-
-end.
+{******************************************************************************}
+{ }
+{ ToolHelp API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: tlhelp32.h, released June 2000. The original Pascal }
+{ code is: TlHelp32.pas, released December 2000. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwatlhelp32.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaTlHelp32;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "tlhelp32.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaWinType;
+
+const
+ MAX_MODULE_NAME32 = 255;
+ {$EXTERNALSYM MAX_MODULE_NAME32}
+
+// Snapshot function
+
+function CreateToolhelp32Snapshot(dwFlags, th32ProcessID: DWORD): HANDLE; stdcall;
+{$EXTERNALSYM CreateToolhelp32Snapshot}
+
+//
+// The th32ProcessID argument is only used if TH32CS_SNAPHEAPLIST or
+// TH32CS_SNAPMODULE is specified. th32ProcessID == 0 means the current
+// process.
+//
+// NOTE that all of the snapshots are global except for the heap and module
+// lists which are process specific. To enumerate the heap or module
+// state for all WIN32 processes call with TH32CS_SNAPALL and the
+// current process. Then for each process in the TH32CS_SNAPPROCESS
+// list that isn't the current process, do a call with just
+// TH32CS_SNAPHEAPLIST and/or TH32CS_SNAPMODULE.
+//
+// dwFlags
+//
+
+const
+ TH32CS_SNAPHEAPLIST = $00000001;
+ {$EXTERNALSYM TH32CS_SNAPHEAPLIST}
+ TH32CS_SNAPPROCESS = $00000002;
+ {$EXTERNALSYM TH32CS_SNAPPROCESS}
+ TH32CS_SNAPTHREAD = $00000004;
+ {$EXTERNALSYM TH32CS_SNAPTHREAD}
+ TH32CS_SNAPMODULE = $00000008;
+ {$EXTERNALSYM TH32CS_SNAPMODULE}
+ TH32CS_SNAPMODULE32 = $00000010;
+ {$EXTERNALSYM TH32CS_SNAPMODULE32}
+ TH32CS_SNAPALL = TH32CS_SNAPHEAPLIST or TH32CS_SNAPPROCESS or
+ TH32CS_SNAPTHREAD or TH32CS_SNAPMODULE;
+ {$EXTERNALSYM TH32CS_SNAPALL}
+ TH32CS_INHERIT = $80000000;
+ {$EXTERNALSYM TH32CS_INHERIT}
+
+//
+// Use CloseHandle to destroy the snapshot
+//
+
+// Heap walking
+
+type
+ PHEAPLIST32 = ^HEAPLIST32;
+ {$EXTERNALSYM PHEAPLIST32}
+ tagHEAPLIST32 = record
+ dwSize: SIZE_T;
+ th32ProcessID: DWORD; // owning process
+ th32HeapID: ULONG_PTR; // heap (in owning process's context!)
+ dwFlags: DWORD;
+ end;
+ {$EXTERNALSYM tagHEAPLIST32}
+ HEAPLIST32 = tagHEAPLIST32;
+ {$EXTERNALSYM HEAPLIST32}
+ LPHEAPLIST32 = ^HEAPLIST32;
+ {$EXTERNALSYM LPHEAPLIST32}
+ THeapList32 = HEAPLIST32;
+
+//
+// dwFlags
+//
+
+const
+ HF32_DEFAULT = 1; // process's default heap
+ {$EXTERNALSYM HF32_DEFAULT}
+ HF32_SHARED = 2; // is shared heap
+ {$EXTERNALSYM HF32_SHARED}
+
+function Heap32ListFirst(hSnapshot: HANDLE; var lphl: HEAPLIST32): BOOL; stdcall;
+{$EXTERNALSYM Heap32ListFirst}
+function Heap32ListNext(hSnapshot: HANDLE; var lphl: HEAPLIST32): BOOL; stdcall;
+{$EXTERNALSYM Heap32ListNext}
+
+type
+ PHEAPENTRY32 = ^HEAPENTRY32;
+ {$EXTERNALSYM PHEAPENTRY32}
+ tagHEAPENTRY32 = record
+ dwSize: SIZE_T;
+ hHandle: HANDLE; // Handle of this heap block
+ dwAddress: ULONG_PTR; // Linear address of start of block
+ dwBlockSize: SIZE_T; // Size of block in bytes
+ dwFlags: DWORD;
+ dwLockCount: DWORD;
+ dwResvd: DWORD;
+ th32ProcessID: DWORD; // owning process
+ th32HeapID: ULONG_PTR; // heap block is in
+ end;
+ {$EXTERNALSYM tagHEAPENTRY32}
+ HEAPENTRY32 = tagHEAPENTRY32;
+ {$EXTERNALSYM HEAPENTRY32}
+ LPHEAPENTRY32 = ^HEAPENTRY32;
+ {$EXTERNALSYM LPHEAPENTRY32}
+ THeapEntry32 = HEAPENTRY32;
+
+//
+// dwFlags
+//
+
+const
+ LF32_FIXED = $00000001;
+ {$EXTERNALSYM LF32_FIXED}
+ LF32_FREE = $00000002;
+ {$EXTERNALSYM LF32_FREE}
+ LF32_MOVEABLE = $00000004;
+ {$EXTERNALSYM LF32_MOVEABLE}
+
+function Heap32First(var lphe: HEAPENTRY32; th32ProcessID: DWORD;
+ th32HeapID: ULONG_PTR): BOOL; stdcall;
+{$EXTERNALSYM Heap32First}
+function Heap32Next(var lphe: HEAPENTRY32): BOOL; stdcall;
+{$EXTERNALSYM Heap32Next}
+
+function Toolhelp32ReadProcessMemory(th32ProcessID: DWORD; lpBaseAddress: LPCVOID;
+ lpBuffer: LPVOID; cbRead: DWORD; lpNumberOfBytesRead: LPDWORD): BOOL; stdcall;
+{$EXTERNALSYM Toolhelp32ReadProcessMemory}
+
+// Process walking
+
+type
+ PPROCESSENTRY32W = ^PROCESSENTRY32W;
+ {$EXTERNALSYM PPROCESSENTRY32W}
+ tagPROCESSENTRY32W = record
+ dwSize: DWORD;
+ cntUsage: DWORD;
+ th32ProcessID: DWORD; // this process
+ th32DefaultHeapID: ULONG_PTR;
+ th32ModuleID:DWORD; // associated exe
+ cntThreads: DWORD;
+ th32ParentProcessID: DWORD; // this process's parent process
+ pcPriClassBase: LONG; // Base priority of process's threads
+ dwFlags: DWORD;
+ szExeFile: array [0..MAX_PATH - 1] of WCHAR; // Path
+ end;
+ {$EXTERNALSYM tagPROCESSENTRY32W}
+ PROCESSENTRY32W = tagPROCESSENTRY32W;
+ {$EXTERNALSYM PROCESSENTRY32W}
+ LPPROCESSENTRY32W = ^PROCESSENTRY32W;
+ {$EXTERNALSYM LPPROCESSENTRY32W}
+ TProcessEntry32W = PROCESSENTRY32W;
+
+ {$IFDEF UNICODE}
+
+ PROCESSENTRY32 = PROCESSENTRY32W;
+ {$EXTERNALSYM PROCESSENTRY32}
+ PPROCESSENTRY32 = PPROCESSENTRY32W;
+ {$EXTERNALSYM PPROCESSENTRY32}
+ LPPROCESSENTRY32 = LPPROCESSENTRY32W;
+ {$EXTERNALSYM LPPROCESSENTRY32}
+ TProcessEntry32 = TProcessEntry32W;
+
+ {$ELSE}
+
+ PPROCESSENTRY32 = ^PROCESSENTRY32;
+ {$EXTERNALSYM PPROCESSENTRY32}
+ tagPROCESSENTRY32 = record
+ dwSize: DWORD;
+ cntUsage: DWORD;
+ th32ProcessID: DWORD; // this process
+ th32DefaultHeapID: ULONG_PTR;
+ th32ModuleID: DWORD; // associated exe
+ cntThreads: DWORD;
+ th32ParentProcessID: DWORD; // this process's parent process
+ pcPriClassBase: LONG; // Base priority of process's threads
+ dwFlags: DWORD;
+ szExeFile: array [0..MAX_PATH - 1] of Char; // Path
+ end;
+ {$EXTERNALSYM tagPROCESSENTRY32}
+ PROCESSENTRY32 = tagPROCESSENTRY32;
+ {$EXTERNALSYM PROCESSENTRY32}
+ LPPROCESSENTRY32 = ^PROCESSENTRY32;
+ {$EXTERNALSYM LPPROCESSENTRY32}
+ TProcessEntry32 = PROCESSENTRY32;
+
+ {$ENDIF UNICODE}
+
+function Process32FirstW(hSnapshot: HANDLE; var lppe: PROCESSENTRY32W): BOOL; stdcall;
+{$EXTERNALSYM Process32FirstW}
+function Process32NextW(hSnapshot: HANDLE; var lppe: PROCESSENTRY32W): BOOL; stdcall;
+{$EXTERNALSYM Process32NextW}
+
+function Process32First(hSnapshot: HANDLE; var lppe: PROCESSENTRY32): BOOL; stdcall;
+{$EXTERNALSYM Process32First}
+function Process32Next(hSnapshot: HANDLE; var lppe: PROCESSENTRY32): BOOL; stdcall;
+{$EXTERNALSYM Process32Next}
+
+// Thread walking
+
+type
+ PTHREADENTRY32 = ^THREADENTRY32;
+ {$EXTERNALSYM PTHREADENTRY32}
+ tagTHREADENTRY32 = record
+ dwSize: DWORD;
+ cntUsage: DWORD;
+ th32ThreadID: DWORD; // this thread
+ th32OwnerProcessID: DWORD; // Process this thread is associated with
+ tpBasePri: LONG;
+ tpDeltaPri: LONG;
+ dwFlags: DWORD;
+ end;
+ {$EXTERNALSYM tagTHREADENTRY32}
+ THREADENTRY32 = tagTHREADENTRY32;
+ {$EXTERNALSYM THREADENTRY32}
+ LPTHREADENTRY32 = ^THREADENTRY32;
+ {$EXTERNALSYM LPTHREADENTRY32}
+ TThreadEntry32 = THREADENTRY32;
+
+function Thread32First(hSnapshot: HANDLE; var lpte: THREADENTRY32): BOOL; stdcall;
+{$EXTERNALSYM Thread32First}
+function Thread32Next(hSnapshot: HANDLE; var lpte: THREADENTRY32): BOOL; stdcall;
+{$EXTERNALSYM Thread32Next}
+
+// Module walking
+
+type
+ PMODULEENTRY32W = ^MODULEENTRY32W;
+ {$EXTERNALSYM PMODULEENTRY32W}
+ tagMODULEENTRY32W = record
+ dwSize: DWORD;
+ th32ModuleID: DWORD; // This module
+ th32ProcessID: DWORD; // owning process
+ GlblcntUsage: DWORD; // Global usage count on the module
+ ProccntUsage: DWORD; // Module usage count in th32ProcessID's context
+ modBaseAddr: LPBYTE; // Base address of module in th32ProcessID's context
+ modBaseSize: DWORD; // Size in bytes of module starting at modBaseAddr
+ hModule: HMODULE; // The hModule of this module in th32ProcessID's context
+ szModule: array [0..MAX_MODULE_NAME32] of WCHAR;
+ szExePath: array [0..MAX_PATH - 1] of WCHAR;
+ end;
+ {$EXTERNALSYM tagMODULEENTRY32W}
+ MODULEENTRY32W = tagMODULEENTRY32W;
+ {$EXTERNALSYM MODULEENTRY32W}
+ LPMODULEENTRY32W = ^MODULEENTRY32W;
+ {$EXTERNALSYM LPMODULEENTRY32W}
+ TModuleEntry32W = MODULEENTRY32W;
+
+ {$IFDEF UNICODE}
+
+ MODULEENTRY32 = MODULEENTRY32W;
+ {$EXTERNALSYM MODULEENTRY32}
+ PMODULEENTRY32 = PMODULEENTRY32W;
+ {$EXTERNALSYM PMODULEENTRY32}
+ LPMODULEENTRY32 = LPMODULEENTRY32W;
+ {$EXTERNALSYM LPMODULEENTRY32}
+ TModuleEntry32 = TModuleEntry32W;
+
+ {$ELSE}
+
+ PMODULEENTRY32 = ^MODULEENTRY32;
+ {$EXTERNALSYM PMODULEENTRY32}
+ tagMODULEENTRY32 = record
+ dwSize: DWORD;
+ th32ModuleID: DWORD; // This module
+ th32ProcessID: DWORD; // owning process
+ GlblcntUsage: DWORD; // Global usage count on the module
+ ProccntUsage: DWORD; // Module usage count in th32ProcessID's context
+ modBaseAddr: LPBYTE; // Base address of module in th32ProcessID's context
+ modBaseSize: DWORD; // Size in bytes of module starting at modBaseAddr
+ hModule: HMODULE; // The hModule of this module in th32ProcessID's context
+ szModule: array [0..MAX_MODULE_NAME32] of Char;
+ szExePath: array [0..MAX_PATH - 1] of Char;
+ end;
+ {$EXTERNALSYM tagMODULEENTRY32}
+ MODULEENTRY32 = tagMODULEENTRY32;
+ {$EXTERNALSYM MODULEENTRY32}
+ LPMODULEENTRY32 = ^MODULEENTRY32;
+ {$EXTERNALSYM LPMODULEENTRY32}
+ TModuleEntry32 = MODULEENTRY32;
+
+ {$ENDIF UNICODE}
+
+function Module32FirstW(hSnapshot: HANDLE; var lpme: MODULEENTRY32W): BOOL; stdcall;
+{$EXTERNALSYM Module32FirstW}
+function Module32NextW(hSnapshot: HANDLE; var lpme: MODULEENTRY32W): BOOL; stdcall;
+{$EXTERNALSYM Module32NextW}
+
+//
+// NOTE CAREFULLY that the modBaseAddr and hModule fields are valid ONLY
+// in th32ProcessID's process context.
+//
+function Module32First(hSnapshot: HANDLE; var lpme: MODULEENTRY32): BOOL; stdcall;
+{$EXTERNALSYM Module32First}
+function Module32Next(hSnapshot: HANDLE; var lpme: MODULEENTRY32): BOOL; stdcall;
+{$EXTERNALSYM Module32Next}
+
+implementation
+
+const
+ kernel32 = 'kernel32.dll';
+ {$IFDEF UNICODE}
+ AWSuffix = 'W';
+ {$ELSE}
+ AWSuffix = 'A';
+ {$ENDIF UNICODE}
+
+{$IFDEF DYNAMIC_LINK}
+
+var
+ _CreateToolhelp32Snapshot: Pointer;
+
+function CreateToolhelp32Snapshot;
+begin
+ GetProcedureAddress(_CreateToolhelp32Snapshot, kernel32, 'CreateToolhelp32Snapshot');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreateToolhelp32Snapshot]
+ end;
+end;
+
+var
+ _Heap32ListFirst: Pointer;
+
+function Heap32ListFirst;
+begin
+ GetProcedureAddress(_Heap32ListFirst, kernel32, 'Heap32ListFirst');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_Heap32ListFirst]
+ end;
+end;
+
+var
+ _Heap32ListNext: Pointer;
+
+function Heap32ListNext;
+begin
+ GetProcedureAddress(_Heap32ListNext, kernel32, 'Heap32ListNext');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_Heap32ListNext]
+ end;
+end;
+
+var
+ _Heap32First: Pointer;
+
+function Heap32First;
+begin
+ GetProcedureAddress(_Heap32First, kernel32, 'Heap32First');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_Heap32First]
+ end;
+end;
+
+var
+ _Heap32Next: Pointer;
+
+function Heap32Next;
+begin
+ GetProcedureAddress(_Heap32Next, kernel32, 'Heap32Next');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_Heap32Next]
+ end;
+end;
+
+var
+ _Toolhelp32ReadProcessMemory: Pointer;
+
+function Toolhelp32ReadProcessMemory;
+begin
+ GetProcedureAddress(_Toolhelp32ReadProcessMemory, kernel32, 'Toolhelp32ReadProcessMemory');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_Toolhelp32ReadProcessMemory]
+ end;
+end;
+
+var
+ _Process32FirstW: Pointer;
+
+function Process32FirstW;
+begin
+ GetProcedureAddress(_Process32FirstW, kernel32, 'Process32FirstW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_Process32FirstW]
+ end;
+end;
+
+var
+ _Process32NextW: Pointer;
+
+function Process32NextW;
+begin
+ GetProcedureAddress(_Process32NextW, kernel32, 'Process32NextW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_Process32NextW]
+ end;
+end;
+
+var
+ _Process32First: Pointer;
+
+function Process32First;
+begin
+ GetProcedureAddress(_Process32First, kernel32, 'Process32First' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_Process32First]
+ end;
+end;
+
+var
+ _Process32Next: Pointer;
+
+function Process32Next;
+begin
+ GetProcedureAddress(_Process32Next, kernel32, 'Process32Next' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_Process32Next]
+ end;
+end;
+
+var
+ _Thread32First: Pointer;
+
+function Thread32First;
+begin
+ GetProcedureAddress(_Thread32First, kernel32, 'Thread32First');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_Thread32First]
+ end;
+end;
+
+var
+ _Thread32Next: Pointer;
+
+function Thread32Next;
+begin
+ GetProcedureAddress(_Thread32Next, kernel32, 'Thread32Next');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_Thread32Next]
+ end;
+end;
+
+var
+ _Module32FirstW: Pointer;
+
+function Module32FirstW;
+begin
+ GetProcedureAddress(_Module32FirstW, kernel32, 'Module32FirstW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_Module32FirstW]
+ end;
+end;
+
+var
+ _Module32NextW: Pointer;
+
+function Module32NextW;
+begin
+ GetProcedureAddress(_Module32NextW, kernel32, 'Module32NextW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_Module32NextW]
+ end;
+end;
+
+var
+ _Module32First: Pointer;
+
+function Module32First;
+begin
+ GetProcedureAddress(_Module32First, kernel32, 'Module32First' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_Module32First]
+ end;
+end;
+
+var
+ _Module32Next: Pointer;
+
+function Module32Next;
+begin
+ GetProcedureAddress(_Module32Next, kernel32, 'Module32Next' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_Module32Next]
+ end;
+end;
+
+{$ELSE}
+
+function CreateToolhelp32Snapshot; external kernel32 name 'CreateToolhelp32Snapshot';
+function Heap32ListFirst; external kernel32 name 'Heap32ListFirst';
+function Heap32ListNext; external kernel32 name 'Heap32ListNext';
+function Heap32First; external kernel32 name 'Heap32First';
+function Heap32Next; external kernel32 name 'Heap32Next';
+function Toolhelp32ReadProcessMemory; external kernel32 name 'Toolhelp32ReadProcessMemory';
+function Process32FirstW; external kernel32 name 'Process32FirstW';
+function Process32NextW; external kernel32 name 'Process32NextW';
+function Process32First; external kernel32 name 'Process32First' + AWSuffix;
+function Process32Next; external kernel32 name 'Process32Next' + AWSuffix;
+function Thread32First; external kernel32 name 'Thread32First';
+function Thread32Next; external kernel32 name 'Thread32Next';
+function Module32FirstW; external kernel32 name 'Module32FirstW';
+function Module32NextW; external kernel32 name 'Module32NextW';
+function Module32First; external kernel32 name 'Module32First' + AWSuffix;
+function Module32Next; external kernel32 name 'Module32Next' + AWSuffix;
+
+{$ENDIF DYNAMIC_LINK}
+
+end.
diff --git a/packages/extra/winunits/jwatmschema.pas b/packages/extra/winunits/jwatmschema.pas
index a0cea11ba3..d91d2e4797 100644
--- a/packages/extra/winunits/jwatmschema.pas
+++ b/packages/extra/winunits/jwatmschema.pas
@@ -1,2531 +1,2531 @@
-{******************************************************************************}
-{ }
-{ Visual Styles (Themes) API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: tmschema.h, released June 2001. The original Pascal }
-{ code is: TmSchema.pas, released July 2001. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwatmschema.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaTmSchema;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "tmschema.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaWinType;
-
-//-----------------------------------------------------------------
-// TmSchema.h - Theme Manager schema (properties, parts, etc)
-//-----------------------------------------------------------------
-
-const
- THEMEMGR_VERSION = 1; // increment if order of props changes or
- // any props are deleted (will prevent loading
- // of controlsets that use older version
- {$EXTERNALSYM THEMEMGR_VERSION}
-
-//-----------------------------------------------------------------
-// TM_ENUM (must also be declared in PROPERTIES section)
-//
-// these cannot be renumbered (part of uxtheme API)
-//-----------------------------------------------------------------
-
-type
- BGTYPE = DWORD;
- {$EXTERNALSYM BGTYPE}
-
-const
- BT_IMAGEFILE = 0;
- {$EXTERNALSYM BT_IMAGEFILE}
- BT_BORDERFILL = 1;
- {$EXTERNALSYM BT_BORDERFILL}
- BT_NONE = 2;
- {$EXTERNALSYM BT_NONE}
-
-type
- IMAGELAYOUT = DWORD;
- {$EXTERNALSYM IMAGELAYOUT}
-
-const
- IL_VERTICAL = 0;
- {$EXTERNALSYM IL_VERTICAL}
- IL_HORIZONTAL = 1;
- {$EXTERNALSYM IL_HORIZONTAL}
-
-type
- BORDERTYPE = DWORD;
- {$EXTERNALSYM BORDERTYPE}
-
-const
- BT_RECT = 0;
- {$EXTERNALSYM BT_RECT}
- BT_ROUNDRECT = 1;
- {$EXTERNALSYM BT_ROUNDRECT}
- BT_ELLIPSE = 2;
- {$EXTERNALSYM BT_ELLIPSE}
-
-type
- FILLTYPE = DWORD;
- {$EXTERNALSYM FILLTYPE}
-
-const
- FT_SOLID = 0;
- {$EXTERNALSYM FT_SOLID}
- FT_VERTGRADIENT = 1;
- {$EXTERNALSYM FT_VERTGRADIENT}
- FT_HORZGRADIENT = 2;
- {$EXTERNALSYM FT_HORZGRADIENT}
- FT_RADIALGRADIENT = 3;
- {$EXTERNALSYM FT_RADIALGRADIENT}
- FT_TILEIMAGE = 4;
- {$EXTERNALSYM FT_TILEIMAGE}
-
-type
- SIZINGTYPE = DWORD;
- {$EXTERNALSYM SIZINGTYPE}
-
-const
- ST_TRUESIZE = 0;
- {$EXTERNALSYM ST_TRUESIZE}
- ST_STRETCH = 1;
- {$EXTERNALSYM ST_STRETCH}
- ST_TILE = 2;
- {$EXTERNALSYM ST_TILE}
-
-type
- HALIGN = DWORD;
- {$EXTERNALSYM HALIGN}
-
-const
- HA_LEFT = 0;
- {$EXTERNALSYM HA_LEFT}
- HA_CENTER = 1;
- {$EXTERNALSYM HA_CENTER}
- HA_RIGHT = 2;
- {$EXTERNALSYM HA_RIGHT}
-
-type
- CONTENTALIGNMENT = DWORD;
- {$EXTERNALSYM CONTENTALIGNMENT}
-
-const
- CA_LEFT = 0;
- {$EXTERNALSYM CA_LEFT}
- CA_CENTER = 1;
- {$EXTERNALSYM CA_CENTER}
- CA_RIGHT = 2;
- {$EXTERNALSYM CA_RIGHT}
-
-type
- VALIGN = DWORD;
- {$EXTERNALSYM VALIGN}
-
-const
- VA_TOP = 0;
- {$EXTERNALSYM VA_TOP}
- VA_CENTER = 1;
- {$EXTERNALSYM VA_CENTER}
- VA_BOTTOM = 2;
- {$EXTERNALSYM VA_BOTTOM}
-
-type
- OFFSETTYPE = DWORD;
- {$EXTERNALSYM OFFSETTYPE}
-
-const
- OT_TOPLEFT = 0;
- {$EXTERNALSYM OT_TOPLEFT}
- OT_TOPRIGHT = 1;
- {$EXTERNALSYM OT_TOPRIGHT}
- OT_TOPMIDDLE = 2;
- {$EXTERNALSYM OT_TOPMIDDLE}
- OT_BOTTOMLEFT = 3;
- {$EXTERNALSYM OT_BOTTOMLEFT}
- OT_BOTTOMRIGHT = 4;
- {$EXTERNALSYM OT_BOTTOMRIGHT}
- OT_BOTTOMMIDDLE = 5;
- {$EXTERNALSYM OT_BOTTOMMIDDLE}
- OT_MIDDLELEFT = 6;
- {$EXTERNALSYM OT_MIDDLELEFT}
- OT_MIDDLERIGHT = 7;
- {$EXTERNALSYM OT_MIDDLERIGHT}
- OT_LEFTOFCAPTION = 8;
- {$EXTERNALSYM OT_LEFTOFCAPTION}
- OT_RIGHTOFCAPTION = 9;
- {$EXTERNALSYM OT_RIGHTOFCAPTION}
- OT_LEFTOFLASTBUTTON = 10;
- {$EXTERNALSYM OT_LEFTOFLASTBUTTON}
- OT_RIGHTOFLASTBUTTON = 11;
- {$EXTERNALSYM OT_RIGHTOFLASTBUTTON}
- OT_ABOVELASTBUTTON = 12;
- {$EXTERNALSYM OT_ABOVELASTBUTTON}
- OT_BELOWLASTBUTTON = 13;
- {$EXTERNALSYM OT_BELOWLASTBUTTON}
-
-type
- ICONEFFECT = DWORD;
- {$EXTERNALSYM ICONEFFECT}
-
-const
- ICE_NONE = 0;
- {$EXTERNALSYM ICE_NONE}
- ICE_GLOW = 1;
- {$EXTERNALSYM ICE_GLOW}
- ICE_SHADOW = 2;
- {$EXTERNALSYM ICE_SHADOW}
- ICE_PULSE = 3;
- {$EXTERNALSYM ICE_PULSE}
- ICE_ALPHA = 4;
- {$EXTERNALSYM ICE_ALPHA}
-
-type
- TEXTSHADOWTYPE = DWORD;
- {$EXTERNALSYM TEXTSHADOWTYPE}
-
-const
- TST_NONE = 0;
- {$EXTERNALSYM TST_NONE}
- TST_SINGLE = 1;
- {$EXTERNALSYM TST_SINGLE}
- TST_CONTINUOUS = 2;
- {$EXTERNALSYM TST_CONTINUOUS}
-
-type
- GLYPHTYPE = DWORD;
- {$EXTERNALSYM GLYPHTYPE}
-
-const
- GT_NONE = 0;
- {$EXTERNALSYM GT_NONE}
- GT_IMAGEGLYPH = 1;
- {$EXTERNALSYM GT_IMAGEGLYPH}
- GT_FONTGLYPH = 2;
- {$EXTERNALSYM GT_FONTGLYPH}
-
-type
- IMAGESELECTTYPE = DWORD;
- {$EXTERNALSYM IMAGESELECTTYPE}
-
-const
- IST_NONE = 0;
- {$EXTERNALSYM IST_NONE}
- IST_SIZE = 1;
- {$EXTERNALSYM IST_SIZE}
- IST_DPI = 2;
- {$EXTERNALSYM IST_DPI}
-
-type
- TRUESIZESCALINGTYPE = DWORD;
- {$EXTERNALSYM TRUESIZESCALINGTYPE}
-
-const
- TSST_NONE = 0;
- {$EXTERNALSYM TSST_NONE}
- TSST_SIZE = 1;
- {$EXTERNALSYM TSST_SIZE}
- TSST_DPI = 2;
- {$EXTERNALSYM TSST_DPI}
-
-type
- GLYPHFONTSIZINGTYPE = DWORD;
- {$EXTERNALSYM GLYPHFONTSIZINGTYPE}
-
-const
- GFST_NONE = 0;
- {$EXTERNALSYM GFST_NONE}
- GFST_SIZE = 1;
- {$EXTERNALSYM GFST_SIZE}
- GFST_DPI = 2;
- {$EXTERNALSYM GFST_DPI}
-
-//-----------------------------------------------------------------
-// PROPERTIES - used by uxtheme rendering and controls
-//
-// these cannot be renumbered (part of uxtheme API)
-//-----------------------------------------------------------------
-
-const
-
- //---- primitive types ----
-
- TMT_STRING = 201;
- {$EXTERNALSYM TMT_STRING}
- TMT_INT = 202;
- {$EXTERNALSYM TMT_INT}
- TMT_BOOL = 203;
- {$EXTERNALSYM TMT_BOOL}
- TMT_COLOR = 204;
- {$EXTERNALSYM TMT_COLOR}
- TMT_MARGINS = 205;
- {$EXTERNALSYM TMT_MARGINS}
- TMT_FILENAME = 206;
- {$EXTERNALSYM TMT_FILENAME}
- TMT_SIZE = 207;
- {$EXTERNALSYM TMT_SIZE}
- TMT_POSITION = 208;
- {$EXTERNALSYM TMT_POSITION}
- TMT_RECT = 209;
- {$EXTERNALSYM TMT_RECT}
- TMT_FONT = 210;
- {$EXTERNALSYM TMT_FONT}
- TMT_INTLIST = 211;
- {$EXTERNALSYM TMT_INTLIST}
-
- //---- special misc. properties ----
-
- TMT_COLORSCHEMES = 401;
- {$EXTERNALSYM TMT_COLORSCHEMES}
- TMT_SIZES = 402;
- {$EXTERNALSYM TMT_SIZES}
- TMT_CHARSET = 403;
- {$EXTERNALSYM TMT_CHARSET}
-
- //---- [documentation] properties ----
-
- TMT_DISPLAYNAME = 601;
- {$EXTERNALSYM TMT_DISPLAYNAME}
- TMT_TOOLTIP = 602;
- {$EXTERNALSYM TMT_TOOLTIP}
- TMT_COMPANY = 603;
- {$EXTERNALSYM TMT_COMPANY}
- TMT_AUTHOR = 604;
- {$EXTERNALSYM TMT_AUTHOR}
- TMT_COPYRIGHT = 605;
- {$EXTERNALSYM TMT_COPYRIGHT}
- TMT_URL = 606;
- {$EXTERNALSYM TMT_URL}
- TMT_VERSION = 607;
- {$EXTERNALSYM TMT_VERSION}
- TMT_DESCRIPTION = 608;
- {$EXTERNALSYM TMT_DESCRIPTION}
-
- TMT_FIRST_RCSTRING_NAME = TMT_DISPLAYNAME;
- {$EXTERNALSYM TMT_FIRST_RCSTRING_NAME}
- TMT_LAST_RCSTRING_NAME = TMT_DESCRIPTION;
- {$EXTERNALSYM TMT_LAST_RCSTRING_NAME}
-
- //---- theme metrics: fonts ----
-
- TMT_CAPTIONFONT = 801;
- {$EXTERNALSYM TMT_CAPTIONFONT}
- TMT_SMALLCAPTIONFONT = 802;
- {$EXTERNALSYM TMT_SMALLCAPTIONFONT}
- TMT_MENUFONT = 803;
- {$EXTERNALSYM TMT_MENUFONT}
- TMT_STATUSFONT = 804;
- {$EXTERNALSYM TMT_STATUSFONT}
- TMT_MSGBOXFONT = 805;
- {$EXTERNALSYM TMT_MSGBOXFONT}
- TMT_ICONTITLEFONT = 806;
- {$EXTERNALSYM TMT_ICONTITLEFONT}
-
- TMT_FIRSTFONT = TMT_CAPTIONFONT;
- {$EXTERNALSYM TMT_FIRSTFONT}
- TMT_LASTFONT = TMT_ICONTITLEFONT;
- {$EXTERNALSYM TMT_LASTFONT}
-
- //---- theme metrics: bools ----
-
- TMT_FLATMENUS = 1001;
- {$EXTERNALSYM TMT_FLATMENUS}
-
- TMT_FIRSTBOOL = TMT_FLATMENUS;
- {$EXTERNALSYM TMT_FIRSTBOOL}
- TMT_LASTBOOL = TMT_FLATMENUS;
- {$EXTERNALSYM TMT_LASTBOOL}
-
- //---- theme metrics: sizes ----
-
- TMT_SIZINGBORDERWIDTH = 1201;
- {$EXTERNALSYM TMT_SIZINGBORDERWIDTH}
- TMT_SCROLLBARWIDTH = 1202;
- {$EXTERNALSYM TMT_SCROLLBARWIDTH}
- TMT_SCROLLBARHEIGHT = 1203;
- {$EXTERNALSYM TMT_SCROLLBARHEIGHT}
- TMT_CAPTIONBARWIDTH = 1204;
- {$EXTERNALSYM TMT_CAPTIONBARWIDTH}
- TMT_CAPTIONBARHEIGHT = 1205;
- {$EXTERNALSYM TMT_CAPTIONBARHEIGHT}
- TMT_SMCAPTIONBARWIDTH = 1206;
- {$EXTERNALSYM TMT_SMCAPTIONBARWIDTH}
- TMT_SMCAPTIONBARHEIGHT = 1207;
- {$EXTERNALSYM TMT_SMCAPTIONBARHEIGHT}
- TMT_MENUBARWIDTH = 1208;
- {$EXTERNALSYM TMT_MENUBARWIDTH}
- TMT_MENUBARHEIGHT = 1209;
- {$EXTERNALSYM TMT_MENUBARHEIGHT}
-
- TMT_FIRSTSIZE = TMT_SIZINGBORDERWIDTH;
- {$EXTERNALSYM TMT_FIRSTSIZE}
- TMT_LASTSIZE = TMT_MENUBARHEIGHT;
- {$EXTERNALSYM TMT_LASTSIZE}
-
- //---- theme metrics: ints ----
-
- TMT_MINCOLORDEPTH = 1301;
- {$EXTERNALSYM TMT_MINCOLORDEPTH}
-
- TMT_FIRSTINT = TMT_MINCOLORDEPTH;
- {$EXTERNALSYM TMT_FIRSTINT}
- TMT_LASTINT = TMT_MINCOLORDEPTH;
- {$EXTERNALSYM TMT_LASTINT}
-
- //---- theme metrics: strings ----
-
- TMT_CSSNAME = 1401;
- {$EXTERNALSYM TMT_CSSNAME}
- TMT_XMLNAME = 1402;
- {$EXTERNALSYM TMT_XMLNAME}
-
- TMT_FIRSTSTRING = TMT_CSSNAME;
- {$EXTERNALSYM TMT_FIRSTSTRING}
- TMT_LASTSTRING = TMT_XMLNAME;
- {$EXTERNALSYM TMT_LASTSTRING}
-
- //---- theme metrics: colors ----
-
- TMT_SCROLLBAR = 1601;
- {$EXTERNALSYM TMT_SCROLLBAR}
- TMT_BACKGROUND = 1602;
- {$EXTERNALSYM TMT_BACKGROUND}
- TMT_ACTIVECAPTION = 1603;
- {$EXTERNALSYM TMT_ACTIVECAPTION}
- TMT_INACTIVECAPTION = 1604;
- {$EXTERNALSYM TMT_INACTIVECAPTION}
- TMT_MENU = 1605;
- {$EXTERNALSYM TMT_MENU}
- TMT_WINDOW = 1606;
- {$EXTERNALSYM TMT_WINDOW}
- TMT_WINDOWFRAME = 1607;
- {$EXTERNALSYM TMT_WINDOWFRAME}
- TMT_MENUTEXT = 1608;
- {$EXTERNALSYM TMT_MENUTEXT}
- TMT_WINDOWTEXT = 1609;
- {$EXTERNALSYM TMT_WINDOWTEXT}
- TMT_CAPTIONTEXT = 1610;
- {$EXTERNALSYM TMT_CAPTIONTEXT}
- TMT_ACTIVEBORDER = 1611;
- {$EXTERNALSYM TMT_ACTIVEBORDER}
- TMT_INACTIVEBORDER = 1612;
- {$EXTERNALSYM TMT_INACTIVEBORDER}
- TMT_APPWORKSPACE = 1613;
- {$EXTERNALSYM TMT_APPWORKSPACE}
- TMT_HIGHLIGHT = 1614;
- {$EXTERNALSYM TMT_HIGHLIGHT}
- TMT_HIGHLIGHTTEXT = 1615;
- {$EXTERNALSYM TMT_HIGHLIGHTTEXT}
- TMT_BTNFACE = 1616;
- {$EXTERNALSYM TMT_BTNFACE}
- TMT_BTNSHADOW = 1617;
- {$EXTERNALSYM TMT_BTNSHADOW}
- TMT_GRAYTEXT = 1618;
- {$EXTERNALSYM TMT_GRAYTEXT}
- TMT_BTNTEXT = 1619;
- {$EXTERNALSYM TMT_BTNTEXT}
- TMT_INACTIVECAPTIONTEXT = 1620;
- {$EXTERNALSYM TMT_INACTIVECAPTIONTEXT}
- TMT_BTNHIGHLIGHT = 1621;
- {$EXTERNALSYM TMT_BTNHIGHLIGHT}
- TMT_DKSHADOW3D = 1622;
- {$EXTERNALSYM TMT_DKSHADOW3D}
- TMT_LIGHT3D = 1623;
- {$EXTERNALSYM TMT_LIGHT3D}
- TMT_INFOTEXT = 1624;
- {$EXTERNALSYM TMT_INFOTEXT}
- TMT_INFOBK = 1625;
- {$EXTERNALSYM TMT_INFOBK}
- TMT_BUTTONALTERNATEFACE = 1626;
- {$EXTERNALSYM TMT_BUTTONALTERNATEFACE}
- TMT_HOTTRACKING = 1627;
- {$EXTERNALSYM TMT_HOTTRACKING}
- TMT_GRADIENTACTIVECAPTION = 1628;
- {$EXTERNALSYM TMT_GRADIENTACTIVECAPTION}
- TMT_GRADIENTINACTIVECAPTION = 1629;
- {$EXTERNALSYM TMT_GRADIENTINACTIVECAPTION}
- TMT_MENUHILIGHT = 1630;
- {$EXTERNALSYM TMT_MENUHILIGHT}
- TMT_MENUBAR = 1631;
- {$EXTERNALSYM TMT_MENUBAR}
-
- TMT_FIRSTCOLOR = TMT_SCROLLBAR;
- {$EXTERNALSYM TMT_FIRSTCOLOR}
- TMT_LASTCOLOR = TMT_MENUBAR;
- {$EXTERNALSYM TMT_LASTCOLOR}
-
- //---- hue substitutions ----
-
- TMT_FROMHUE1 = 1801;
- {$EXTERNALSYM TMT_FROMHUE1}
- TMT_FROMHUE2 = 1802;
- {$EXTERNALSYM TMT_FROMHUE2}
- TMT_FROMHUE3 = 1803;
- {$EXTERNALSYM TMT_FROMHUE3}
- TMT_FROMHUE4 = 1804;
- {$EXTERNALSYM TMT_FROMHUE4}
- TMT_FROMHUE5 = 1805;
- {$EXTERNALSYM TMT_FROMHUE5}
- TMT_TOHUE1 = 1806;
- {$EXTERNALSYM TMT_TOHUE1}
- TMT_TOHUE2 = 1807;
- {$EXTERNALSYM TMT_TOHUE2}
- TMT_TOHUE3 = 1808;
- {$EXTERNALSYM TMT_TOHUE3}
- TMT_TOHUE4 = 1809;
- {$EXTERNALSYM TMT_TOHUE4}
- TMT_TOHUE5 = 1810;
- {$EXTERNALSYM TMT_TOHUE5}
-
- //---- color substitutions ----
-
- TMT_FROMCOLOR1 = 2001;
- {$EXTERNALSYM TMT_FROMCOLOR1}
- TMT_FROMCOLOR2 = 2002;
- {$EXTERNALSYM TMT_FROMCOLOR2}
- TMT_FROMCOLOR3 = 2003;
- {$EXTERNALSYM TMT_FROMCOLOR3}
- TMT_FROMCOLOR4 = 2004;
- {$EXTERNALSYM TMT_FROMCOLOR4}
- TMT_FROMCOLOR5 = 2005;
- {$EXTERNALSYM TMT_FROMCOLOR5}
- TMT_TOCOLOR1 = 2006;
- {$EXTERNALSYM TMT_TOCOLOR1}
- TMT_TOCOLOR2 = 2007;
- {$EXTERNALSYM TMT_TOCOLOR2}
- TMT_TOCOLOR3 = 2008;
- {$EXTERNALSYM TMT_TOCOLOR3}
- TMT_TOCOLOR4 = 2009;
- {$EXTERNALSYM TMT_TOCOLOR4}
- TMT_TOCOLOR5 = 2010;
- {$EXTERNALSYM TMT_TOCOLOR5}
-
- //---- rendering BOOL properties ----
-
- TMT_TRANSPARENT = 2201;
- {$EXTERNALSYM TMT_TRANSPARENT}
- TMT_AUTOSIZE = 2202;
- {$EXTERNALSYM TMT_AUTOSIZE}
- TMT_BORDERONLY = 2203;
- {$EXTERNALSYM TMT_BORDERONLY}
- TMT_COMPOSITED = 2204;
- {$EXTERNALSYM TMT_COMPOSITED}
- TMT_BGFILL = 2205;
- {$EXTERNALSYM TMT_BGFILL}
- TMT_GLYPHTRANSPARENT = 2206;
- {$EXTERNALSYM TMT_GLYPHTRANSPARENT}
- TMT_GLYPHONLY = 2207;
- {$EXTERNALSYM TMT_GLYPHONLY}
- TMT_ALWAYSSHOWSIZINGBAR = 2208;
- {$EXTERNALSYM TMT_ALWAYSSHOWSIZINGBAR}
- TMT_MIRRORIMAGE = 2209;
- {$EXTERNALSYM TMT_MIRRORIMAGE}
- TMT_UNIFORMSIZING = 2210;
- {$EXTERNALSYM TMT_UNIFORMSIZING}
- TMT_INTEGRALSIZING = 2211;
- {$EXTERNALSYM TMT_INTEGRALSIZING}
- TMT_SOURCEGROW = 2212;
- {$EXTERNALSYM TMT_SOURCEGROW}
- TMT_SOURCESHRINK = 2213;
- {$EXTERNALSYM TMT_SOURCESHRINK}
-
- //---- rendering INT properties ----
-
- TMT_IMAGECOUNT = 2401;
- {$EXTERNALSYM TMT_IMAGECOUNT}
- TMT_ALPHALEVEL = 2402;
- {$EXTERNALSYM TMT_ALPHALEVEL}
- TMT_BORDERSIZE = 2403;
- {$EXTERNALSYM TMT_BORDERSIZE}
- TMT_ROUNDCORNERWIDTH = 2404;
- {$EXTERNALSYM TMT_ROUNDCORNERWIDTH}
- TMT_ROUNDCORNERHEIGHT = 2405;
- {$EXTERNALSYM TMT_ROUNDCORNERHEIGHT}
- TMT_GRADIENTRATIO1 = 2406;
- {$EXTERNALSYM TMT_GRADIENTRATIO1}
- TMT_GRADIENTRATIO2 = 2407;
- {$EXTERNALSYM TMT_GRADIENTRATIO2}
- TMT_GRADIENTRATIO3 = 2408;
- {$EXTERNALSYM TMT_GRADIENTRATIO3}
- TMT_GRADIENTRATIO4 = 2409;
- {$EXTERNALSYM TMT_GRADIENTRATIO4}
- TMT_GRADIENTRATIO5 = 2410;
- {$EXTERNALSYM TMT_GRADIENTRATIO5}
- TMT_PROGRESSCHUNKSIZE = 2411;
- {$EXTERNALSYM TMT_PROGRESSCHUNKSIZE}
- TMT_PROGRESSSPACESIZE = 2412;
- {$EXTERNALSYM TMT_PROGRESSSPACESIZE}
- TMT_SATURATION = 2413;
- {$EXTERNALSYM TMT_SATURATION}
- TMT_TEXTBORDERSIZE = 2414;
- {$EXTERNALSYM TMT_TEXTBORDERSIZE}
- TMT_ALPHATHRESHOLD = 2415;
- {$EXTERNALSYM TMT_ALPHATHRESHOLD}
- TMT_WIDTH = 2416;
- {$EXTERNALSYM TMT_WIDTH}
- TMT_HEIGHT = 2417;
- {$EXTERNALSYM TMT_HEIGHT}
- TMT_GLYPHINDEX = 2418;
- {$EXTERNALSYM TMT_GLYPHINDEX}
- TMT_TRUESIZESTRETCHMARK = 2419;
- {$EXTERNALSYM TMT_TRUESIZESTRETCHMARK}
- TMT_MINDPI1 = 2420;
- {$EXTERNALSYM TMT_MINDPI1}
- TMT_MINDPI2 = 2421;
- {$EXTERNALSYM TMT_MINDPI2}
- TMT_MINDPI3 = 2422;
- {$EXTERNALSYM TMT_MINDPI3}
- TMT_MINDPI4 = 2423;
- {$EXTERNALSYM TMT_MINDPI4}
- TMT_MINDPI5 = 2424;
- {$EXTERNALSYM TMT_MINDPI5}
-
- //---- rendering FONT properties ----
-
- TMT_GLYPHFONT = 2601;
- {$EXTERNALSYM TMT_GLYPHFONT}
-
- //---- rendering INTLIST properties ----
- // start with 2801
- // (from smallest to largest)
- //---- rendering FILENAME properties ----
-
- TMT_IMAGEFILE = 3001;
- {$EXTERNALSYM TMT_IMAGEFILE}
- TMT_IMAGEFILE1 = 3002;
- {$EXTERNALSYM TMT_IMAGEFILE1}
- TMT_IMAGEFILE2 = 3003;
- {$EXTERNALSYM TMT_IMAGEFILE2}
- TMT_IMAGEFILE3 = 3004;
- {$EXTERNALSYM TMT_IMAGEFILE3}
- TMT_IMAGEFILE4 = 3005;
- {$EXTERNALSYM TMT_IMAGEFILE4}
- TMT_IMAGEFILE5 = 3006;
- {$EXTERNALSYM TMT_IMAGEFILE5}
- TMT_STOCKIMAGEFILE = 3007;
- {$EXTERNALSYM TMT_STOCKIMAGEFILE}
- TMT_GLYPHIMAGEFILE = 3008;
- {$EXTERNALSYM TMT_GLYPHIMAGEFILE}
-
- //---- rendering STRING properties ----
-
- TMT_TEXT = 3201;
- {$EXTERNALSYM TMT_TEXT}
-
- //---- rendering POSITION (x and y values) properties ----
-
- TMT_OFFSET = 3401;
- {$EXTERNALSYM TMT_OFFSET}
- TMT_TEXTSHADOWOFFSET = 3402;
- {$EXTERNALSYM TMT_TEXTSHADOWOFFSET}
- TMT_MINSIZE = 3403;
- {$EXTERNALSYM TMT_MINSIZE}
- TMT_MINSIZE1 = 3404;
- {$EXTERNALSYM TMT_MINSIZE1}
- TMT_MINSIZE2 = 3405;
- {$EXTERNALSYM TMT_MINSIZE2}
- TMT_MINSIZE3 = 3406;
- {$EXTERNALSYM TMT_MINSIZE3}
- TMT_MINSIZE4 = 3407;
- {$EXTERNALSYM TMT_MINSIZE4}
- TMT_MINSIZE5 = 3408;
- {$EXTERNALSYM TMT_MINSIZE5}
- TMT_NORMALSIZE = 3409;
- {$EXTERNALSYM TMT_NORMALSIZE}
-
- //---- rendering MARGIN properties ----
-
- TMT_SIZINGMARGINS = 3601;
- {$EXTERNALSYM TMT_SIZINGMARGINS}
- TMT_CONTENTMARGINS = 3602;
- {$EXTERNALSYM TMT_CONTENTMARGINS}
- TMT_CAPTIONMARGINS = 3603;
- {$EXTERNALSYM TMT_CAPTIONMARGINS}
-
- //---- rendering COLOR properties ----
-
- TMT_BORDERCOLOR = 3801;
- {$EXTERNALSYM TMT_BORDERCOLOR}
- TMT_FILLCOLOR = 3802;
- {$EXTERNALSYM TMT_FILLCOLOR}
- TMT_TEXTCOLOR = 3803;
- {$EXTERNALSYM TMT_TEXTCOLOR}
- TMT_EDGELIGHTCOLOR = 3804;
- {$EXTERNALSYM TMT_EDGELIGHTCOLOR}
- TMT_EDGEHIGHLIGHTCOLOR = 3805;
- {$EXTERNALSYM TMT_EDGEHIGHLIGHTCOLOR}
- TMT_EDGESHADOWCOLOR = 3806;
- {$EXTERNALSYM TMT_EDGESHADOWCOLOR}
- TMT_EDGEDKSHADOWCOLOR = 3807;
- {$EXTERNALSYM TMT_EDGEDKSHADOWCOLOR}
- TMT_EDGEFILLCOLOR = 3808;
- {$EXTERNALSYM TMT_EDGEFILLCOLOR}
- TMT_TRANSPARENTCOLOR = 3809;
- {$EXTERNALSYM TMT_TRANSPARENTCOLOR}
- TMT_GRADIENTCOLOR1 = 3810;
- {$EXTERNALSYM TMT_GRADIENTCOLOR1}
- TMT_GRADIENTCOLOR2 = 3811;
- {$EXTERNALSYM TMT_GRADIENTCOLOR2}
- TMT_GRADIENTCOLOR3 = 3812;
- {$EXTERNALSYM TMT_GRADIENTCOLOR3}
- TMT_GRADIENTCOLOR4 = 3813;
- {$EXTERNALSYM TMT_GRADIENTCOLOR4}
- TMT_GRADIENTCOLOR5 = 3814;
- {$EXTERNALSYM TMT_GRADIENTCOLOR5}
- TMT_SHADOWCOLOR = 3815;
- {$EXTERNALSYM TMT_SHADOWCOLOR}
- TMT_GLOWCOLOR = 3816;
- {$EXTERNALSYM TMT_GLOWCOLOR}
- TMT_TEXTBORDERCOLOR = 3817;
- {$EXTERNALSYM TMT_TEXTBORDERCOLOR}
- TMT_TEXTSHADOWCOLOR = 3818;
- {$EXTERNALSYM TMT_TEXTSHADOWCOLOR}
- TMT_GLYPHTEXTCOLOR = 3819;
- {$EXTERNALSYM TMT_GLYPHTEXTCOLOR}
- TMT_GLYPHTRANSPARENTCOLOR = 3820;
- {$EXTERNALSYM TMT_GLYPHTRANSPARENTCOLOR}
- TMT_FILLCOLORHINT = 3821;
- {$EXTERNALSYM TMT_FILLCOLORHINT}
- TMT_BORDERCOLORHINT = 3822;
- {$EXTERNALSYM TMT_BORDERCOLORHINT}
- TMT_ACCENTCOLORHINT = 3823;
- {$EXTERNALSYM TMT_ACCENTCOLORHINT}
-
- //---- rendering enum properties (must be declared in TM_ENUM section above) ----
-
- TMT_BGTYPE = 4001;
- {$EXTERNALSYM TMT_BGTYPE}
- TMT_BORDERTYPE = 4002;
- {$EXTERNALSYM TMT_BORDERTYPE}
- TMT_FILLTYPE = 4003;
- {$EXTERNALSYM TMT_FILLTYPE}
- TMT_SIZINGTYPE = 4004;
- {$EXTERNALSYM TMT_SIZINGTYPE}
- TMT_HALIGN = 4005;
- {$EXTERNALSYM TMT_HALIGN}
- TMT_CONTENTALIGNMENT = 4006;
- {$EXTERNALSYM TMT_CONTENTALIGNMENT}
- TMT_VALIGN = 4007;
- {$EXTERNALSYM TMT_VALIGN}
- TMT_OFFSETTYPE = 4008;
- {$EXTERNALSYM TMT_OFFSETTYPE}
- TMT_ICONEFFECT = 4009;
- {$EXTERNALSYM TMT_ICONEFFECT}
- TMT_TEXTSHADOWTYPE = 4010;
- {$EXTERNALSYM TMT_TEXTSHADOWTYPE}
- TMT_IMAGELAYOUT = 4011;
- {$EXTERNALSYM TMT_IMAGELAYOUT}
- TMT_GLYPHTYPE = 4012;
- {$EXTERNALSYM TMT_GLYPHTYPE}
- TMT_IMAGESELECTTYPE = 4013;
- {$EXTERNALSYM TMT_IMAGESELECTTYPE}
- TMT_GLYPHFONTSIZINGTYPE = 4014;
- {$EXTERNALSYM TMT_GLYPHFONTSIZINGTYPE}
- TMT_TRUESIZESCALINGTYPE = 4015;
- {$EXTERNALSYM TMT_TRUESIZESCALINGTYPE}
-
- //---- custom properties (used only by controls/shell) ----
-
- TMT_USERPICTURE = 5001;
- {$EXTERNALSYM TMT_USERPICTURE}
- TMT_DEFAULTPANESIZE = 5002;
- {$EXTERNALSYM TMT_DEFAULTPANESIZE}
- TMT_BLENDCOLOR = 5003;
- {$EXTERNALSYM TMT_BLENDCOLOR}
-
-//---------------------------------------------------------------------------------------
-// "Window" (i.e., non-client) Parts & States
-//
-// these cannot be renumbered (part of uxtheme API)
-//---------------------------------------------------------------------------------------
-
-type
- WINDOWPARTS = DWORD;
- {$EXTERNALSYM WINDOWPARTS}
-
-const
- WINDOWPartFiller0 = 0;
- {$EXTERNALSYM WINDOWPartFiller0}
- WP_CAPTION = 1;
- {$EXTERNALSYM WP_CAPTION}
- WP_SMALLCAPTION = 2;
- {$EXTERNALSYM WP_SMALLCAPTION}
- WP_MINCAPTION = 3;
- {$EXTERNALSYM WP_MINCAPTION}
- WP_SMALLMINCAPTION = 4;
- {$EXTERNALSYM WP_SMALLMINCAPTION}
- WP_MAXCAPTION = 5;
- {$EXTERNALSYM WP_MAXCAPTION}
- WP_SMALLMAXCAPTION = 6;
- {$EXTERNALSYM WP_SMALLMAXCAPTION}
- WP_FRAMELEFT = 7;
- {$EXTERNALSYM WP_FRAMELEFT}
- WP_FRAMERIGHT = 8;
- {$EXTERNALSYM WP_FRAMERIGHT}
- WP_FRAMEBOTTOM = 9;
- {$EXTERNALSYM WP_FRAMEBOTTOM}
- WP_SMALLFRAMELEFT = 10;
- {$EXTERNALSYM WP_SMALLFRAMELEFT}
- WP_SMALLFRAMERIGHT = 11;
- {$EXTERNALSYM WP_SMALLFRAMERIGHT}
- WP_SMALLFRAMEBOTTOM = 12;
- {$EXTERNALSYM WP_SMALLFRAMEBOTTOM}
- WP_SYSBUTTON = 13;
- {$EXTERNALSYM WP_SYSBUTTON}
- WP_MDISYSBUTTON = 14;
- {$EXTERNALSYM WP_MDISYSBUTTON}
- WP_MINBUTTON = 15;
- {$EXTERNALSYM WP_MINBUTTON}
- WP_MDIMINBUTTON = 16;
- {$EXTERNALSYM WP_MDIMINBUTTON}
- WP_MAXBUTTON = 17;
- {$EXTERNALSYM WP_MAXBUTTON}
- WP_CLOSEBUTTON = 18;
- {$EXTERNALSYM WP_CLOSEBUTTON}
- WP_SMALLCLOSEBUTTON = 19;
- {$EXTERNALSYM WP_SMALLCLOSEBUTTON}
- WP_MDICLOSEBUTTON = 20;
- {$EXTERNALSYM WP_MDICLOSEBUTTON}
- WP_RESTOREBUTTON = 21;
- {$EXTERNALSYM WP_RESTOREBUTTON}
- WP_MDIRESTOREBUTTON = 22;
- {$EXTERNALSYM WP_MDIRESTOREBUTTON}
- WP_HELPBUTTON = 23;
- {$EXTERNALSYM WP_HELPBUTTON}
- WP_MDIHELPBUTTON = 24;
- {$EXTERNALSYM WP_MDIHELPBUTTON}
- WP_HORZSCROLL = 25;
- {$EXTERNALSYM WP_HORZSCROLL}
- WP_HORZTHUMB = 26;
- {$EXTERNALSYM WP_HORZTHUMB}
- WP_VERTSCROLL = 27;
- {$EXTERNALSYM WP_VERTSCROLL}
- WP_VERTTHUMB = 28;
- {$EXTERNALSYM WP_VERTTHUMB}
- WP_DIALOG = 29;
- {$EXTERNALSYM WP_DIALOG}
- WP_CAPTIONSIZINGTEMPLATE = 30;
- {$EXTERNALSYM WP_CAPTIONSIZINGTEMPLATE}
- WP_SMALLCAPTIONSIZINGTEMPLATE = 31;
- {$EXTERNALSYM WP_SMALLCAPTIONSIZINGTEMPLATE}
- WP_FRAMELEFTSIZINGTEMPLATE = 32;
- {$EXTERNALSYM WP_FRAMELEFTSIZINGTEMPLATE}
- WP_SMALLFRAMELEFTSIZINGTEMPLATE = 33;
- {$EXTERNALSYM WP_SMALLFRAMELEFTSIZINGTEMPLATE}
- WP_FRAMERIGHTSIZINGTEMPLATE = 34;
- {$EXTERNALSYM WP_FRAMERIGHTSIZINGTEMPLATE}
- WP_SMALLFRAMERIGHTSIZINGTEMPLATE = 35;
- {$EXTERNALSYM WP_SMALLFRAMERIGHTSIZINGTEMPLATE}
- WP_FRAMEBOTTOMSIZINGTEMPLATE = 36;
- {$EXTERNALSYM WP_FRAMEBOTTOMSIZINGTEMPLATE}
- WP_SMALLFRAMEBOTTOMSIZINGTEMPLATE = 37;
- {$EXTERNALSYM WP_SMALLFRAMEBOTTOMSIZINGTEMPLATE}
-
-type
- FRAMESTATES = DWORD;
- {$EXTERNALSYM FRAMESTATES}
-
-const
- FRAMEStateFiller0 = 0;
- {$EXTERNALSYM FRAMEStateFiller0}
- FS_ACTIVE = 1;
- {$EXTERNALSYM FS_ACTIVE}
- FS_INACTIVE = 2;
- {$EXTERNALSYM FS_INACTIVE}
-
-type
- CAPTIONSTATES = DWORD;
- {$EXTERNALSYM CAPTIONSTATES}
-
-const
- CAPTIONStateFiller0 = 0;
- {$EXTERNALSYM CAPTIONStateFiller0}
- CS_ACTIVE = 1;
- {$EXTERNALSYM CS_ACTIVE}
- CS_INACTIVE = 2;
- {$EXTERNALSYM CS_INACTIVE}
- CS_DISABLED = 3;
- {$EXTERNALSYM CS_DISABLED}
-
-type
- MAXCAPTIONSTATES = DWORD;
- {$EXTERNALSYM MAXCAPTIONSTATES}
-
-const
- MAXCAPTIONStateFiller0 = 0;
- {$EXTERNALSYM MAXCAPTIONStateFiller0}
- MXCS_ACTIVE = 1;
- {$EXTERNALSYM MXCS_ACTIVE}
- MXCS_INACTIVE = 2;
- {$EXTERNALSYM MXCS_INACTIVE}
- MXCS_DISABLED = 3;
- {$EXTERNALSYM MXCS_DISABLED}
-
-type
- MINCAPTIONSTATES = DWORD;
- {$EXTERNALSYM MINCAPTIONSTATES}
-
-const
- MINCAPTIONStateFiller0 = 0;
- {$EXTERNALSYM MINCAPTIONStateFiller0}
- MNCS_ACTIVE = 1;
- {$EXTERNALSYM MNCS_ACTIVE}
- MNCS_INACTIVE = 2;
- {$EXTERNALSYM MNCS_INACTIVE}
- MNCS_DISABLED = 3;
- {$EXTERNALSYM MNCS_DISABLED}
-
-type
- HORZSCROLLSTATES = DWORD;
- {$EXTERNALSYM HORZSCROLLSTATES}
-
-const
- HORZSCROLLStateFiller0 = 0;
- {$EXTERNALSYM HORZSCROLLStateFiller0}
- HSS_NORMAL = 1;
- {$EXTERNALSYM HSS_NORMAL}
- HSS_HOT = 2;
- {$EXTERNALSYM HSS_HOT}
- HSS_PUSHED = 3;
- {$EXTERNALSYM HSS_PUSHED}
- HSS_DISABLED = 4;
- {$EXTERNALSYM HSS_DISABLED}
-
-type
- HORZTHUMBSTATES = DWORD;
- {$EXTERNALSYM HORZTHUMBSTATES}
-
-const
- HORZTHUMBStateFiller0 = 0;
- {$EXTERNALSYM HORZTHUMBStateFiller0}
- HTS_NORMAL = 1;
- {$EXTERNALSYM HTS_NORMAL}
- HTS_HOT = 2;
- {$EXTERNALSYM HTS_HOT}
- HTS_PUSHED = 3;
- {$EXTERNALSYM HTS_PUSHED}
- HTS_DISABLED = 4;
- {$EXTERNALSYM HTS_DISABLED}
-
-type
- VERTSCROLLSTATES = DWORD;
- {$EXTERNALSYM VERTSCROLLSTATES}
-
-const
- VERTSCROLLStateFiller0 = 0;
- {$EXTERNALSYM VERTSCROLLStateFiller0}
- VSS_NORMAL = 1;
- {$EXTERNALSYM VSS_NORMAL}
- VSS_HOT = 2;
- {$EXTERNALSYM VSS_HOT}
- VSS_PUSHED = 3;
- {$EXTERNALSYM VSS_PUSHED}
- VSS_DISABLED = 4;
- {$EXTERNALSYM VSS_DISABLED}
-
-type
- VERTTHUMBSTATES = DWORD;
- {$EXTERNALSYM VERTTHUMBSTATES}
-
-const
- VERTTHUMBStateFiller0 = 0;
- {$EXTERNALSYM VERTTHUMBStateFiller0}
- VTS_NORMAL = 1;
- {$EXTERNALSYM VTS_NORMAL}
- VTS_HOT = 2;
- {$EXTERNALSYM VTS_HOT}
- VTS_PUSHED = 3;
- {$EXTERNALSYM VTS_PUSHED}
- VTS_DISABLED = 4;
- {$EXTERNALSYM VTS_DISABLED}
-
-type
- SYSBUTTONSTATES = DWORD;
- {$EXTERNALSYM SYSBUTTONSTATES}
-
-const
- SYSBUTTONStateFiller0 = 0;
- {$EXTERNALSYM SYSBUTTONStateFiller0}
- SBS_NORMAL = 1;
- {$EXTERNALSYM SBS_NORMAL}
- SBS_HOT = 2;
- {$EXTERNALSYM SBS_HOT}
- SBS_PUSHED = 3;
- {$EXTERNALSYM SBS_PUSHED}
- SBS_DISABLED = 4;
- {$EXTERNALSYM SBS_DISABLED}
-
-type
- MINBUTTONSTATES = DWORD;
- {$EXTERNALSYM MINBUTTONSTATES}
-
-const
- MINBUTTONStateFiller0 = 0;
- {$EXTERNALSYM MINBUTTONStateFiller0}
- MINBS_NORMAL = 1;
- {$EXTERNALSYM MINBS_NORMAL}
- MINBS_HOT = 2;
- {$EXTERNALSYM MINBS_HOT}
- MINBS_PUSHED = 3;
- {$EXTERNALSYM MINBS_PUSHED}
- MINBS_DISABLED = 4;
- {$EXTERNALSYM MINBS_DISABLED}
-
-type
- MAXBUTTONSTATES = DWORD;
- {$EXTERNALSYM MAXBUTTONSTATES}
-
-const
- MAXBUTTONStateFiller0 = 0;
- {$EXTERNALSYM MAXBUTTONStateFiller0}
- MAXBS_NORMAL = 1;
- {$EXTERNALSYM MAXBS_NORMAL}
- MAXBS_HOT = 2;
- {$EXTERNALSYM MAXBS_HOT}
- MAXBS_PUSHED = 3;
- {$EXTERNALSYM MAXBS_PUSHED}
- MAXBS_DISABLED = 4;
- {$EXTERNALSYM MAXBS_DISABLED}
-
-type
- RESTOREBUTTONSTATES = DWORD;
- {$EXTERNALSYM RESTOREBUTTONSTATES}
-
-const
- RESTOREBUTTONStateFiller0 = 0;
- {$EXTERNALSYM RESTOREBUTTONStateFiller0}
- RBS_NORMAL = 1;
- {$EXTERNALSYM RBS_NORMAL}
- RBS_HOT = 2;
- {$EXTERNALSYM RBS_HOT}
- RBS_PUSHED = 3;
- {$EXTERNALSYM RBS_PUSHED}
- RBS_DISABLED = 4;
- {$EXTERNALSYM RBS_DISABLED}
-
-type
- HELPBUTTONSTATES = DWORD;
- {$EXTERNALSYM HELPBUTTONSTATES}
-
-const
- HELPBUTTONStateFiller0 = 0;
- {$EXTERNALSYM HELPBUTTONStateFiller0}
- HBS_NORMAL = 1;
- {$EXTERNALSYM HBS_NORMAL}
- HBS_HOT = 2;
- {$EXTERNALSYM HBS_HOT}
- HBS_PUSHED = 3;
- {$EXTERNALSYM HBS_PUSHED}
- HBS_DISABLED = 4;
- {$EXTERNALSYM HBS_DISABLED}
-
-type
- CLOSEBUTTONSTATES = DWORD;
- {$EXTERNALSYM CLOSEBUTTONSTATES}
-
-const
- CLOSEBUTTONStateFiller0 = 0;
- {$EXTERNALSYM CLOSEBUTTONStateFiller0}
- CBS_NORMAL = 1;
- {$EXTERNALSYM CBS_NORMAL}
- CBS_HOT = 2;
- {$EXTERNALSYM CBS_HOT}
- CBS_PUSHED = 3;
- {$EXTERNALSYM CBS_PUSHED}
- CBS_DISABLED = 4;
- {$EXTERNALSYM CBS_DISABLED}
-
-//---------------------------------------------------------------------------------------
-// "Button" Parts & States
-//---------------------------------------------------------------------------------------
-
-type
- BUTTONPARTS = DWORD;
- {$EXTERNALSYM BUTTONPARTS}
-
-const
- BUTTONPartFiller0 = 0;
- {$EXTERNALSYM BUTTONPartFiller0}
- BP_PUSHBUTTON = 1;
- {$EXTERNALSYM BP_PUSHBUTTON}
- BP_RADIOBUTTON = 2;
- {$EXTERNALSYM BP_RADIOBUTTON}
- BP_CHECKBOX = 3;
- {$EXTERNALSYM BP_CHECKBOX}
- BP_GROUPBOX = 4;
- {$EXTERNALSYM BP_GROUPBOX}
- BP_USERBUTTON = 5;
- {$EXTERNALSYM BP_USERBUTTON}
-
-type
- PUSHBUTTONSTATES = DWORD;
- {$EXTERNALSYM PUSHBUTTONSTATES}
-
-const
- PUSHBUTTONStateFiller0 = 0;
- {$EXTERNALSYM PUSHBUTTONStateFiller0}
- PBS_NORMAL = 1;
- {$EXTERNALSYM PBS_NORMAL}
- PBS_HOT = 2;
- {$EXTERNALSYM PBS_HOT}
- PBS_PRESSED = 3;
- {$EXTERNALSYM PBS_PRESSED}
- PBS_DISABLED = 4;
- {$EXTERNALSYM PBS_DISABLED}
- PBS_DEFAULTED = 5;
- {$EXTERNALSYM PBS_DEFAULTED}
-
-type
- RADIOBUTTONSTATES = DWORD;
- {$EXTERNALSYM RADIOBUTTONSTATES}
-
-const
- RADIOBUTTONStateFiller0 = 0;
- {$EXTERNALSYM RADIOBUTTONStateFiller0}
- RBS_UNCHECKEDNORMAL = 1;
- {$EXTERNALSYM RBS_UNCHECKEDNORMAL}
- RBS_UNCHECKEDHOT = 2;
- {$EXTERNALSYM RBS_UNCHECKEDHOT}
- RBS_UNCHECKEDPRESSED = 3;
- {$EXTERNALSYM RBS_UNCHECKEDPRESSED}
- RBS_UNCHECKEDDISABLED = 4;
- {$EXTERNALSYM RBS_UNCHECKEDDISABLED}
- RBS_CHECKEDNORMAL = 5;
- {$EXTERNALSYM RBS_CHECKEDNORMAL}
- RBS_CHECKEDHOT = 6;
- {$EXTERNALSYM RBS_CHECKEDHOT}
- RBS_CHECKEDPRESSED = 7;
- {$EXTERNALSYM RBS_CHECKEDPRESSED}
- RBS_CHECKEDDISABLED = 8;
- {$EXTERNALSYM RBS_CHECKEDDISABLED}
-
-type
- CHECKBOXSTATES = DWORD;
- {$EXTERNALSYM CHECKBOXSTATES}
-
-const
- CHECKBOXStateFiller0 = 0;
- {$EXTERNALSYM CHECKBOXStateFiller0}
- CBS_UNCHECKEDNORMAL = 1;
- {$EXTERNALSYM CBS_UNCHECKEDNORMAL}
- CBS_UNCHECKEDHOT = 2;
- {$EXTERNALSYM CBS_UNCHECKEDHOT}
- CBS_UNCHECKEDPRESSED = 3;
- {$EXTERNALSYM CBS_UNCHECKEDPRESSED}
- CBS_UNCHECKEDDISABLED = 4;
- {$EXTERNALSYM CBS_UNCHECKEDDISABLED}
- CBS_CHECKEDNORMAL = 5;
- {$EXTERNALSYM CBS_CHECKEDNORMAL}
- CBS_CHECKEDHOT = 6;
- {$EXTERNALSYM CBS_CHECKEDHOT}
- CBS_CHECKEDPRESSED = 7;
- {$EXTERNALSYM CBS_CHECKEDPRESSED}
- CBS_CHECKEDDISABLED = 8;
- {$EXTERNALSYM CBS_CHECKEDDISABLED}
- CBS_MIXEDNORMAL = 9;
- {$EXTERNALSYM CBS_MIXEDNORMAL}
- CBS_MIXEDHOT = 10;
- {$EXTERNALSYM CBS_MIXEDHOT}
- CBS_MIXEDPRESSED = 11;
- {$EXTERNALSYM CBS_MIXEDPRESSED}
- CBS_MIXEDDISABLED = 12;
- {$EXTERNALSYM CBS_MIXEDDISABLED}
-
-type
- GROUPBOXSTATES = DWORD;
- {$EXTERNALSYM GROUPBOXSTATES}
-
-const
- GROUPBOXStateFiller0 = 0;
- {$EXTERNALSYM GROUPBOXStateFiller0}
- GBS_NORMAL = 1;
- {$EXTERNALSYM GBS_NORMAL}
- GBS_DISABLED = 2;
- {$EXTERNALSYM GBS_DISABLED}
-
-//---------------------------------------------------------------------------------------
-// "Rebar" Parts & States
-//---------------------------------------------------------------------------------------
-
-type
- REBARPARTS = DWORD;
- {$EXTERNALSYM REBARPARTS}
-
-const
- REBARPartFiller0 = 0;
- {$EXTERNALSYM REBARPartFiller0}
- RP_GRIPPER = 1;
- {$EXTERNALSYM RP_GRIPPER}
- RP_GRIPPERVERT = 2;
- {$EXTERNALSYM RP_GRIPPERVERT}
- RP_BAND = 3;
- {$EXTERNALSYM RP_BAND}
- RP_CHEVRON = 4;
- {$EXTERNALSYM RP_CHEVRON}
- RP_CHEVRONVERT = 5;
- {$EXTERNALSYM RP_CHEVRONVERT}
-
-type
- CHEVRONSTATES = DWORD;
- {$EXTERNALSYM CHEVRONSTATES}
-
-const
- CHEVRONStateFiller0 = 0;
- {$EXTERNALSYM CHEVRONStateFiller0}
- CHEVS_NORMAL = 1;
- {$EXTERNALSYM CHEVS_NORMAL}
- CHEVS_HOT = 2;
- {$EXTERNALSYM CHEVS_HOT}
- CHEVS_PRESSED = 3;
- {$EXTERNALSYM CHEVS_PRESSED}
-
-//---------------------------------------------------------------------------------------
-// "Toolbar" Parts & States
-//---------------------------------------------------------------------------------------
-
-type
- TOOLBARPARTS = DWORD;
- {$EXTERNALSYM TOOLBARPARTS}
-
-const
- TOOLBARPartFiller0 = 0;
- {$EXTERNALSYM TOOLBARPartFiller0}
- TP_BUTTON = 1;
- {$EXTERNALSYM TP_BUTTON}
- TP_DROPDOWNBUTTON = 2;
- {$EXTERNALSYM TP_DROPDOWNBUTTON}
- TP_SPLITBUTTON = 3;
- {$EXTERNALSYM TP_SPLITBUTTON}
- TP_SPLITBUTTONDROPDOWN = 4;
- {$EXTERNALSYM TP_SPLITBUTTONDROPDOWN}
- TP_SEPARATOR = 5;
- {$EXTERNALSYM TP_SEPARATOR}
- TP_SEPARATORVERT = 6;
- {$EXTERNALSYM TP_SEPARATORVERT}
-
-type
- TOOLBARSTATES = DWORD;
- {$EXTERNALSYM TOOLBARSTATES}
-
-const
- TOOLBARStateFiller0 = 0;
- {$EXTERNALSYM TOOLBARStateFiller0}
- TS_NORMAL = 1;
- {$EXTERNALSYM TS_NORMAL}
- TS_HOT = 2;
- {$EXTERNALSYM TS_HOT}
- TS_PRESSED = 3;
- {$EXTERNALSYM TS_PRESSED}
- TS_DISABLED = 4;
- {$EXTERNALSYM TS_DISABLED}
- TS_CHECKED = 5;
- {$EXTERNALSYM TS_CHECKED}
- TS_HOTCHECKED = 6;
- {$EXTERNALSYM TS_HOTCHECKED}
-
-//---------------------------------------------------------------------------------------
-// "Status" Parts & States
-//---------------------------------------------------------------------------------------
-
-type
- STATUSPARTS = DWORD;
- {$EXTERNALSYM STATUSPARTS}
-
-const
- STATUSPartFiller0 = 0;
- {$EXTERNALSYM STATUSPartFiller0}
- SP_PANE = 1;
- {$EXTERNALSYM SP_PANE}
- SP_GRIPPERPANE = 2;
- {$EXTERNALSYM SP_GRIPPERPANE}
- SP_GRIPPER = 3;
- {$EXTERNALSYM SP_GRIPPER}
-
-//---------------------------------------------------------------------------------------
-// "Menu" Parts & States
-//---------------------------------------------------------------------------------------
-
-type
- MENUPARTS = DWORD;
- {$EXTERNALSYM MENUPARTS}
-
-const
- MENUPartFiller0 = 0;
- {$EXTERNALSYM MENUPartFiller0}
- MP_MENUITEM = 1;
- {$EXTERNALSYM MP_MENUITEM}
- MP_MENUDROPDOWN = 2;
- {$EXTERNALSYM MP_MENUDROPDOWN}
- MP_MENUBARITEM = 3;
- {$EXTERNALSYM MP_MENUBARITEM}
- MP_MENUBARDROPDOWN = 4;
- {$EXTERNALSYM MP_MENUBARDROPDOWN}
- MP_CHEVRON = 5;
- {$EXTERNALSYM MP_CHEVRON}
- MP_SEPARATOR = 6;
- {$EXTERNALSYM MP_SEPARATOR}
-
-type
- MENUSTATES = DWORD;
- {$EXTERNALSYM MENUSTATES}
-
-const
- MENUStateFiller0 = 0;
- {$EXTERNALSYM MENUStateFiller0}
- MS_NORMAL = 1;
- {$EXTERNALSYM MS_NORMAL}
- MS_SELECTED = 2;
- {$EXTERNALSYM MS_SELECTED}
- MS_DEMOTED = 3;
- {$EXTERNALSYM MS_DEMOTED}
-
-//---------------------------------------------------------------------------------------
-// "ListView" Parts & States
-//---------------------------------------------------------------------------------------
-
-type
- LISTVIEWPARTS = DWORD;
- {$EXTERNALSYM LISTVIEWPARTS}
-
-const
- LISTVIEWPartFiller0 = 0;
- {$EXTERNALSYM LISTVIEWPartFiller0}
- LVP_LISTITEM = 1;
- {$EXTERNALSYM LVP_LISTITEM}
- LVP_LISTGROUP = 2;
- {$EXTERNALSYM LVP_LISTGROUP}
- LVP_LISTDETAIL = 3;
- {$EXTERNALSYM LVP_LISTDETAIL}
- LVP_LISTSORTEDDETAIL = 4;
- {$EXTERNALSYM LVP_LISTSORTEDDETAIL}
- LVP_EMPTYTEXT = 5;
- {$EXTERNALSYM LVP_EMPTYTEXT}
-
-type
- LISTITEMSTATES = DWORD;
- {$EXTERNALSYM LISTITEMSTATES}
-
-const
- LISTITEMStateFiller0 = 0;
- {$EXTERNALSYM LISTITEMStateFiller0}
- LIS_NORMAL = 1;
- {$EXTERNALSYM LIS_NORMAL}
- LIS_HOT = 2;
- {$EXTERNALSYM LIS_HOT}
- LIS_SELECTED = 3;
- {$EXTERNALSYM LIS_SELECTED}
- LIS_DISABLED = 4;
- {$EXTERNALSYM LIS_DISABLED}
- LIS_SELECTEDNOTFOCUS = 5;
- {$EXTERNALSYM LIS_SELECTEDNOTFOCUS}
-
-//---------------------------------------------------------------------------------------
-// "Header" Parts & States
-//---------------------------------------------------------------------------------------
-
-type
- HEADERPARTS = DWORD;
- {$EXTERNALSYM HEADERPARTS}
-
-const
- HEADERPartFiller0 = 0;
- {$EXTERNALSYM HEADERPartFiller0}
- HP_HEADERITEM = 1;
- {$EXTERNALSYM HP_HEADERITEM}
- HP_HEADERITEMLEFT = 2;
- {$EXTERNALSYM HP_HEADERITEMLEFT}
- HP_HEADERITEMRIGHT = 3;
- {$EXTERNALSYM HP_HEADERITEMRIGHT}
- HP_HEADERSORTARROW = 4;
- {$EXTERNALSYM HP_HEADERSORTARROW}
-
-type
- HEADERITEMSTATES = DWORD;
- {$EXTERNALSYM HEADERITEMSTATES}
-
-const
- HEADERITEMStateFiller0 = 0;
- {$EXTERNALSYM HEADERITEMStateFiller0}
- HIS_NORMAL = 1;
- {$EXTERNALSYM HIS_NORMAL}
- HIS_HOT = 2;
- {$EXTERNALSYM HIS_HOT}
- HIS_PRESSED = 3;
- {$EXTERNALSYM HIS_PRESSED}
-
-type
- HEADERITEMLEFTSTATES = DWORD;
- {$EXTERNALSYM HEADERITEMLEFTSTATES}
-
-const
- HEADERITEMLEFTStateFiller0 = 0;
- {$EXTERNALSYM HEADERITEMLEFTStateFiller0}
- HILS_NORMAL = 1;
- {$EXTERNALSYM HILS_NORMAL}
- HILS_HOT = 2;
- {$EXTERNALSYM HILS_HOT}
- HILS_PRESSED = 3;
- {$EXTERNALSYM HILS_PRESSED}
-
-type
- HEADERITEMRIGHTSTATES = DWORD;
- {$EXTERNALSYM HEADERITEMRIGHTSTATES}
-
-const
- HEADERITEMRIGHTStateFiller0 = 0;
- {$EXTERNALSYM HEADERITEMRIGHTStateFiller0}
- HIRS_NORMAL = 1;
- {$EXTERNALSYM HIRS_NORMAL}
- HIRS_HOT = 2;
- {$EXTERNALSYM HIRS_HOT}
- HIRS_PRESSED = 3;
- {$EXTERNALSYM HIRS_PRESSED}
-
-type
- HEADERSORTARROWSTATES = DWORD;
- {$EXTERNALSYM HEADERSORTARROWSTATES}
-
-const
- HEADERSORTARROWStateFiller0 = 0;
- {$EXTERNALSYM HEADERSORTARROWStateFiller0}
- HSAS_SORTEDUP = 1;
- {$EXTERNALSYM HSAS_SORTEDUP}
- HSAS_SORTEDDOWN = 2;
- {$EXTERNALSYM HSAS_SORTEDDOWN}
-
-//---------------------------------------------------------------------------------------
-// "Progress" Parts & States
-//---------------------------------------------------------------------------------------
-
-type
- PROGRESSPARTS = DWORD;
- {$EXTERNALSYM PROGRESSPARTS}
-
-const
- PROGRESSPartFiller0 = 0;
- {$EXTERNALSYM PROGRESSPartFiller0}
- PP_BAR = 1;
- {$EXTERNALSYM PP_BAR}
- PP_BARVERT = 2;
- {$EXTERNALSYM PP_BARVERT}
- PP_CHUNK = 3;
- {$EXTERNALSYM PP_CHUNK}
- PP_CHUNKVERT = 4;
- {$EXTERNALSYM PP_CHUNKVERT}
-
-//---------------------------------------------------------------------------------------
-// "Tab" Parts & States
-//---------------------------------------------------------------------------------------
-
-type
- TABPARTS = DWORD;
- {$EXTERNALSYM TABPARTS}
-
-const
- TABPartFiller0 = 0;
- {$EXTERNALSYM TABPartFiller0}
- TABP_TABITEM = 1;
- {$EXTERNALSYM TABP_TABITEM}
- TABP_TABITEMLEFTEDGE = 2;
- {$EXTERNALSYM TABP_TABITEMLEFTEDGE}
- TABP_TABITEMRIGHTEDGE = 3;
- {$EXTERNALSYM TABP_TABITEMRIGHTEDGE}
- TABP_TABITEMBOTHEDGE = 4;
- {$EXTERNALSYM TABP_TABITEMBOTHEDGE}
- TABP_TOPTABITEM = 5;
- {$EXTERNALSYM TABP_TOPTABITEM}
- TABP_TOPTABITEMLEFTEDGE = 6;
- {$EXTERNALSYM TABP_TOPTABITEMLEFTEDGE}
- TABP_TOPTABITEMRIGHTEDGE = 7;
- {$EXTERNALSYM TABP_TOPTABITEMRIGHTEDGE}
- TABP_TOPTABITEMBOTHEDGE = 8;
- {$EXTERNALSYM TABP_TOPTABITEMBOTHEDGE}
- TABP_PANE = 9;
- {$EXTERNALSYM TABP_PANE}
- TABP_BODY = 10;
- {$EXTERNALSYM TABP_BODY}
-
-type
- TABITEMSTATES = DWORD;
- {$EXTERNALSYM TABITEMSTATES}
-
-const
- TABITEMStateFiller0 = 0;
- {$EXTERNALSYM TABITEMStateFiller0}
- TIS_NORMAL = 1;
- {$EXTERNALSYM TIS_NORMAL}
- TIS_HOT = 2;
- {$EXTERNALSYM TIS_HOT}
- TIS_SELECTED = 3;
- {$EXTERNALSYM TIS_SELECTED}
- TIS_DISABLED = 4;
- {$EXTERNALSYM TIS_DISABLED}
- TIS_FOCUSED = 5;
- {$EXTERNALSYM TIS_FOCUSED}
-
-type
- TABITEMLEFTEDGESTATES = DWORD;
- {$EXTERNALSYM TABITEMLEFTEDGESTATES}
-
-const
- TABITEMLEFTEDGEStateFiller0 = 0;
- {$EXTERNALSYM TABITEMLEFTEDGEStateFiller0}
- TILES_NORMAL = 1;
- {$EXTERNALSYM TILES_NORMAL}
- TILES_HOT = 2;
- {$EXTERNALSYM TILES_HOT}
- TILES_SELECTED = 3;
- {$EXTERNALSYM TILES_SELECTED}
- TILES_DISABLED = 4;
- {$EXTERNALSYM TILES_DISABLED}
- TILES_FOCUSED = 5;
- {$EXTERNALSYM TILES_FOCUSED}
-
-type
- TABITEMRIGHTEDGESTATES = DWORD;
- {$EXTERNALSYM TABITEMRIGHTEDGESTATES}
-
-const
- TABITEMRIGHTEDGEStateFiller0 = 0;
- {$EXTERNALSYM TABITEMRIGHTEDGEStateFiller0}
- TIRES_NORMAL = 1;
- {$EXTERNALSYM TIRES_NORMAL}
- TIRES_HOT = 2;
- {$EXTERNALSYM TIRES_HOT}
- TIRES_SELECTED = 3;
- {$EXTERNALSYM TIRES_SELECTED}
- TIRES_DISABLED = 4;
- {$EXTERNALSYM TIRES_DISABLED}
- TIRES_FOCUSED = 5;
- {$EXTERNALSYM TIRES_FOCUSED}
-
-type
- TABITEMBOTHEDGESSTATES = DWORD;
- {$EXTERNALSYM TABITEMBOTHEDGESSTATES}
-
-const
- TABITEMBOTHEDGESStateFiller0 = 0;
- {$EXTERNALSYM TABITEMBOTHEDGESStateFiller0}
- TIBES_NORMAL = 1;
- {$EXTERNALSYM TIBES_NORMAL}
- TIBES_HOT = 2;
- {$EXTERNALSYM TIBES_HOT}
- TIBES_SELECTED = 3;
- {$EXTERNALSYM TIBES_SELECTED}
- TIBES_DISABLED = 4;
- {$EXTERNALSYM TIBES_DISABLED}
- TIBES_FOCUSED = 5;
- {$EXTERNALSYM TIBES_FOCUSED}
-
-type
- TOPTABITEMSTATES = DWORD;
- {$EXTERNALSYM TOPTABITEMSTATES}
-
-const
- TOPTABITEMStateFiller0 = 0;
- {$EXTERNALSYM TOPTABITEMStateFiller0}
- TTIS_NORMAL = 1;
- {$EXTERNALSYM TTIS_NORMAL}
- TTIS_HOT = 2;
- {$EXTERNALSYM TTIS_HOT}
- TTIS_SELECTED = 3;
- {$EXTERNALSYM TTIS_SELECTED}
- TTIS_DISABLED = 4;
- {$EXTERNALSYM TTIS_DISABLED}
- TTIS_FOCUSED = 5;
- {$EXTERNALSYM TTIS_FOCUSED}
-
-type
- TOPTABITEMLEFTEDGESTATES = DWORD;
- {$EXTERNALSYM TOPTABITEMLEFTEDGESTATES}
-
-const
- TOPTABITEMLEFTEDGEStateFiller0 = 0;
- {$EXTERNALSYM TOPTABITEMLEFTEDGEStateFiller0}
- TTILES_NORMAL = 1;
- {$EXTERNALSYM TTILES_NORMAL}
- TTILES_HOT = 2;
- {$EXTERNALSYM TTILES_HOT}
- TTILES_SELECTED = 3;
- {$EXTERNALSYM TTILES_SELECTED}
- TTILES_DISABLED = 4;
- {$EXTERNALSYM TTILES_DISABLED}
- TTILES_FOCUSED = 5;
- {$EXTERNALSYM TTILES_FOCUSED}
-
-type
- TOPTABITEMRIGHTEDGESTATES = DWORD;
- {$EXTERNALSYM TOPTABITEMRIGHTEDGESTATES}
-
-const
- TOPTABITEMRIGHTEDGEStateFiller0 = 0;
- {$EXTERNALSYM TOPTABITEMRIGHTEDGEStateFiller0}
- TTIRES_NORMAL = 1;
- {$EXTERNALSYM TTIRES_NORMAL}
- TTIRES_HOT = 2;
- {$EXTERNALSYM TTIRES_HOT}
- TTIRES_SELECTED = 3;
- {$EXTERNALSYM TTIRES_SELECTED}
- TTIRES_DISABLED = 4;
- {$EXTERNALSYM TTIRES_DISABLED}
- TTIRES_FOCUSED = 5;
- {$EXTERNALSYM TTIRES_FOCUSED}
-
-type
- TOPTABITEMBOTHEDGESSTATES = DWORD;
- {$EXTERNALSYM TOPTABITEMBOTHEDGESSTATES}
-
-const
- TOPTABITEMBOTHEDGESStateFiller0 = 0;
- {$EXTERNALSYM TOPTABITEMBOTHEDGESStateFiller0}
- TTIBES_NORMAL = 1;
- {$EXTERNALSYM TTIBES_NORMAL}
- TTIBES_HOT = 2;
- {$EXTERNALSYM TTIBES_HOT}
- TTIBES_SELECTED = 3;
- {$EXTERNALSYM TTIBES_SELECTED}
- TTIBES_DISABLED = 4;
- {$EXTERNALSYM TTIBES_DISABLED}
- TTIBES_FOCUSED = 5;
- {$EXTERNALSYM TTIBES_FOCUSED}
-
-//---------------------------------------------------------------------------------------
-// "Trackbar" Parts & States
-//---------------------------------------------------------------------------------------
-
-type
- TRACKBARPARTS = DWORD;
- {$EXTERNALSYM TRACKBARPARTS}
-
-const
- TRACKBARPartFiller0 = 0;
- {$EXTERNALSYM TRACKBARPartFiller0}
- TKP_TRACK = 1;
- {$EXTERNALSYM TKP_TRACK}
- TKP_TRACKVERT = 2;
- {$EXTERNALSYM TKP_TRACKVERT}
- TKP_THUMB = 3;
- {$EXTERNALSYM TKP_THUMB}
- TKP_THUMBBOTTOM = 4;
- {$EXTERNALSYM TKP_THUMBBOTTOM}
- TKP_THUMBTOP = 5;
- {$EXTERNALSYM TKP_THUMBTOP}
- TKP_THUMBVERT = 6;
- {$EXTERNALSYM TKP_THUMBVERT}
- TKP_THUMBLEFT = 7;
- {$EXTERNALSYM TKP_THUMBLEFT}
- TKP_THUMBRIGHT = 8;
- {$EXTERNALSYM TKP_THUMBRIGHT}
- TKP_TICS = 9;
- {$EXTERNALSYM TKP_TICS}
- TKP_TICSVERT = 10;
- {$EXTERNALSYM TKP_TICSVERT}
-
-type
- TRACKBARSTATES = DWORD;
- {$EXTERNALSYM TRACKBARSTATES}
-
-const
- TRACKBARStateFiller0 = 0;
- {$EXTERNALSYM TRACKBARStateFiller0}
- TKS_NORMAL = 1;
- {$EXTERNALSYM TKS_NORMAL}
-
-type
- TRACKSTATES = DWORD;
- {$EXTERNALSYM TRACKSTATES}
-
-const
- TRACKStateFiller0 = 0;
- {$EXTERNALSYM TRACKStateFiller0}
- TRS_NORMAL = 1;
- {$EXTERNALSYM TRS_NORMAL}
-
-type
- TRACKVERTSTATES = DWORD;
- {$EXTERNALSYM TRACKVERTSTATES}
-
-const
- TRACKVERTStateFiller0 = 0;
- {$EXTERNALSYM TRACKVERTStateFiller0}
- TRVS_NORMAL = 1;
- {$EXTERNALSYM TRVS_NORMAL}
-
-type
- THUMBSTATES = DWORD;
- {$EXTERNALSYM THUMBSTATES}
-
-const
- THUMBStateFiller0 = 0;
- {$EXTERNALSYM THUMBStateFiller0}
- TUS_NORMAL = 1;
- {$EXTERNALSYM TUS_NORMAL}
- TUS_HOT = 2;
- {$EXTERNALSYM TUS_HOT}
- TUS_PRESSED = 3;
- {$EXTERNALSYM TUS_PRESSED}
- TUS_FOCUSED = 4;
- {$EXTERNALSYM TUS_FOCUSED}
- TUS_DISABLED = 5;
- {$EXTERNALSYM TUS_DISABLED}
-
-type
- THUMBBOTTOMSTATES = DWORD;
- {$EXTERNALSYM THUMBBOTTOMSTATES}
-
-const
- THUMBBOTTOMStateFiller0 = 0;
- {$EXTERNALSYM THUMBBOTTOMStateFiller0}
- TUBS_NORMAL = 1;
- {$EXTERNALSYM TUBS_NORMAL}
- TUBS_HOT = 2;
- {$EXTERNALSYM TUBS_HOT}
- TUBS_PRESSED = 3;
- {$EXTERNALSYM TUBS_PRESSED}
- TUBS_FOCUSED = 4;
- {$EXTERNALSYM TUBS_FOCUSED}
- TUBS_DISABLED = 5;
- {$EXTERNALSYM TUBS_DISABLED}
-
-type
- THUMBTOPSTATES = DWORD;
- {$EXTERNALSYM THUMBTOPSTATES}
-
-const
- THUMBTOPStateFiller0 = 0;
- {$EXTERNALSYM THUMBTOPStateFiller0}
- TUTS_NORMAL = 1;
- {$EXTERNALSYM TUTS_NORMAL}
- TUTS_HOT = 2;
- {$EXTERNALSYM TUTS_HOT}
- TUTS_PRESSED = 3;
- {$EXTERNALSYM TUTS_PRESSED}
- TUTS_FOCUSED = 4;
- {$EXTERNALSYM TUTS_FOCUSED}
- TUTS_DISABLED = 5;
- {$EXTERNALSYM TUTS_DISABLED}
-
-type
- THUMBVERTSTATES = DWORD;
- {$EXTERNALSYM THUMBVERTSTATES}
-
-const
- THUMBVERTStateFiller0 = 0;
- {$EXTERNALSYM THUMBVERTStateFiller0}
- TUVS_NORMAL = 1;
- {$EXTERNALSYM TUVS_NORMAL}
- TUVS_HOT = 2;
- {$EXTERNALSYM TUVS_HOT}
- TUVS_PRESSED = 3;
- {$EXTERNALSYM TUVS_PRESSED}
- TUVS_FOCUSED = 4;
- {$EXTERNALSYM TUVS_FOCUSED}
- TUVS_DISABLED = 5;
- {$EXTERNALSYM TUVS_DISABLED}
-
-type
- THUMBLEFTSTATES = DWORD;
- {$EXTERNALSYM THUMBLEFTSTATES}
-
-const
- THUMBLEFTStateFiller0 = 0;
- {$EXTERNALSYM THUMBLEFTStateFiller0}
- TUVLS_NORMAL = 1;
- {$EXTERNALSYM TUVLS_NORMAL}
- TUVLS_HOT = 2;
- {$EXTERNALSYM TUVLS_HOT}
- TUVLS_PRESSED = 3;
- {$EXTERNALSYM TUVLS_PRESSED}
- TUVLS_FOCUSED = 4;
- {$EXTERNALSYM TUVLS_FOCUSED}
- TUVLS_DISABLED = 5;
- {$EXTERNALSYM TUVLS_DISABLED}
-
-type
- THUMBRIGHTSTATES = DWORD;
- {$EXTERNALSYM THUMBRIGHTSTATES}
-
-const
- THUMBRIGHTStateFiller0 = 0;
- {$EXTERNALSYM THUMBRIGHTStateFiller0}
- TUVRS_NORMAL = 1;
- {$EXTERNALSYM TUVRS_NORMAL}
- TUVRS_HOT = 2;
- {$EXTERNALSYM TUVRS_HOT}
- TUVRS_PRESSED = 3;
- {$EXTERNALSYM TUVRS_PRESSED}
- TUVRS_FOCUSED = 4;
- {$EXTERNALSYM TUVRS_FOCUSED}
- TUVRS_DISABLED = 5;
- {$EXTERNALSYM TUVRS_DISABLED}
-
-type
- TICSSTATES = DWORD;
- {$EXTERNALSYM TICSSTATES}
-
-const
- TICSStateFiller0 = 0;
- {$EXTERNALSYM TICSStateFiller0}
- TSS_NORMAL = 1;
- {$EXTERNALSYM TSS_NORMAL}
-
-type
- TICSVERTSTATES = DWORD;
- {$EXTERNALSYM TICSVERTSTATES}
-
-const
- TICSVERTStateFiller0 = 0;
- {$EXTERNALSYM TICSVERTStateFiller0}
- TSVS_NORMAL = 1;
- {$EXTERNALSYM TSVS_NORMAL}
-
-//---------------------------------------------------------------------------------------
-// "Tooltips" Parts & States
-//---------------------------------------------------------------------------------------
-
-type
- TOOLTIPPARTS = DWORD;
- {$EXTERNALSYM TOOLTIPPARTS}
-
-const
- TOOLTIPPartFiller0 = 0;
- {$EXTERNALSYM TOOLTIPPartFiller0}
- TTP_STANDARD = 1;
- {$EXTERNALSYM TTP_STANDARD}
- TTP_STANDARDTITLE = 2;
- {$EXTERNALSYM TTP_STANDARDTITLE}
- TTP_BALLOON = 3;
- {$EXTERNALSYM TTP_BALLOON}
- TTP_BALLOONTITLE = 4;
- {$EXTERNALSYM TTP_BALLOONTITLE}
- TTP_CLOSE = 5;
- {$EXTERNALSYM TTP_CLOSE}
-
-type
- CLOSESTATES = DWORD;
- {$EXTERNALSYM CLOSESTATES}
-
-const
- CLOSEStateFiller0 = 0;
- {$EXTERNALSYM CLOSEStateFiller0}
- TTCS_NORMAL = 1;
- {$EXTERNALSYM TTCS_NORMAL}
- TTCS_HOT = 2;
- {$EXTERNALSYM TTCS_HOT}
- TTCS_PRESSED = 3;
- {$EXTERNALSYM TTCS_PRESSED}
-
-type
- STANDARDSTATES = DWORD;
- {$EXTERNALSYM STANDARDSTATES}
-
-const
- STANDARDStateFiller0 = 0;
- {$EXTERNALSYM STANDARDStateFiller0}
- TTSS_NORMAL = 1;
- {$EXTERNALSYM TTSS_NORMAL}
- TTSS_LINK = 2;
- {$EXTERNALSYM TTSS_LINK}
-
-type
- BALLOONSTATES = DWORD;
- {$EXTERNALSYM BALLOONSTATES}
-
-const
- BALLOONStateFiller0 = 0;
- {$EXTERNALSYM BALLOONStateFiller0}
- TTBS_NORMAL = 1;
- {$EXTERNALSYM TTBS_NORMAL}
- TTBS_LINK = 2;
- {$EXTERNALSYM TTBS_LINK}
-
-//---------------------------------------------------------------------------------------
-// "TreeView" Parts & States
-//---------------------------------------------------------------------------------------
-
-type
- TREEVIEWPARTS = DWORD;
- {$EXTERNALSYM TREEVIEWPARTS}
-
-const
- TREEVIEWPartFiller0 = 0;
- {$EXTERNALSYM TREEVIEWPartFiller0}
- TVP_TREEITEM = 1;
- {$EXTERNALSYM TVP_TREEITEM}
- TVP_GLYPH = 2;
- {$EXTERNALSYM TVP_GLYPH}
- TVP_BRANCH = 3;
- {$EXTERNALSYM TVP_BRANCH}
-
-type
- TREEITEMSTATES = DWORD;
- {$EXTERNALSYM TREEITEMSTATES}
-
-const
- TREEITEMStateFiller0 = 0;
- {$EXTERNALSYM TREEITEMStateFiller0}
- TREIS_NORMAL = 1;
- {$EXTERNALSYM TREIS_NORMAL}
- TREIS_HOT = 2;
- {$EXTERNALSYM TREIS_HOT}
- TREIS_SELECTED = 3;
- {$EXTERNALSYM TREIS_SELECTED}
- TREIS_DISABLED = 4;
- {$EXTERNALSYM TREIS_DISABLED}
- TREIS_SELECTEDNOTFOCUS = 5;
- {$EXTERNALSYM TREIS_SELECTEDNOTFOCUS}
-
-type
- GLYPHSTATES = DWORD;
- {$EXTERNALSYM GLYPHSTATES}
-
-const
- GLYPHStateFiller0 = 0;
- {$EXTERNALSYM GLYPHStateFiller0}
- GLPS_CLOSED = 1;
- {$EXTERNALSYM GLPS_CLOSED}
- GLPS_OPENED = 2;
- {$EXTERNALSYM GLPS_OPENED}
-
-//---------------------------------------------------------------------------------------
-// "Spin" Parts & States
-//---------------------------------------------------------------------------------------
-
-type
- SPINPARTS = DWORD;
- {$EXTERNALSYM SPINPARTS}
-
-const
- SPINPartFiller0 = 0;
- {$EXTERNALSYM SPINPartFiller0}
- SPNP_UP = 1;
- {$EXTERNALSYM SPNP_UP}
- SPNP_DOWN = 2;
- {$EXTERNALSYM SPNP_DOWN}
- SPNP_UPHORZ = 3;
- {$EXTERNALSYM SPNP_UPHORZ}
- SPNP_DOWNHORZ = 4;
- {$EXTERNALSYM SPNP_DOWNHORZ}
-
-type
- UPSTATES = DWORD;
- {$EXTERNALSYM UPSTATES}
-
-const
- UPStateFiller0 = 0;
- {$EXTERNALSYM UPStateFiller0}
- UPS_NORMAL = 1;
- {$EXTERNALSYM UPS_NORMAL}
- UPS_HOT = 2;
- {$EXTERNALSYM UPS_HOT}
- UPS_PRESSED = 3;
- {$EXTERNALSYM UPS_PRESSED}
- UPS_DISABLED = 4;
- {$EXTERNALSYM UPS_DISABLED}
-
-type
- DOWNSTATES = DWORD;
- {$EXTERNALSYM DOWNSTATES}
-
-const
- DOWNStateFiller0 = 0;
- {$EXTERNALSYM DOWNStateFiller0}
- DNS_NORMAL = 1;
- {$EXTERNALSYM DNS_NORMAL}
- DNS_HOT = 2;
- {$EXTERNALSYM DNS_HOT}
- DNS_PRESSED = 3;
- {$EXTERNALSYM DNS_PRESSED}
- DNS_DISABLED = 4;
- {$EXTERNALSYM DNS_DISABLED}
-
-type
- UPHORZSTATES = DWORD;
- {$EXTERNALSYM UPHORZSTATES}
-
-const
- UPHORZStateFiller0 = 0;
- {$EXTERNALSYM UPHORZStateFiller0}
- UPHZS_NORMAL = 1;
- {$EXTERNALSYM UPHZS_NORMAL}
- UPHZS_HOT = 2;
- {$EXTERNALSYM UPHZS_HOT}
- UPHZS_PRESSED = 3;
- {$EXTERNALSYM UPHZS_PRESSED}
- UPHZS_DISABLED = 4;
- {$EXTERNALSYM UPHZS_DISABLED}
-
-type
- DOWNHORZSTATES = DWORD;
- {$EXTERNALSYM DOWNHORZSTATES}
-
-const
- DOWNHORZStateFiller0 = 0;
- {$EXTERNALSYM DOWNHORZStateFiller0}
- DNHZS_NORMAL = 1;
- {$EXTERNALSYM DNHZS_NORMAL}
- DNHZS_HOT = 2;
- {$EXTERNALSYM DNHZS_HOT}
- DNHZS_PRESSED = 3;
- {$EXTERNALSYM DNHZS_PRESSED}
- DNHZS_DISABLED = 4;
- {$EXTERNALSYM DNHZS_DISABLED}
-
-//---------------------------------------------------------------------------------------
-// "Page" Parts & States
-//---------------------------------------------------------------------------------------
-
-type
- PAGEPARTS = DWORD;
- {$EXTERNALSYM PAGEPARTS}
-
-const
- PAGEPartFiller0 = 0;
- {$EXTERNALSYM PAGEPartFiller0}
- PGRP_UP = 1;
- {$EXTERNALSYM PGRP_UP}
- PGRP_DOWN = 2;
- {$EXTERNALSYM PGRP_DOWN}
- PGRP_UPHORZ = 3;
- {$EXTERNALSYM PGRP_UPHORZ}
- PGRP_DOWNHORZ = 4;
- {$EXTERNALSYM PGRP_DOWNHORZ}
-
-//--- Pager uses same states as Spin ---
-
-//---------------------------------------------------------------------------------------
-// "Scrollbar" Parts & States
-//---------------------------------------------------------------------------------------
-
-type
- SCROLLBARPARTS = DWORD;
- {$EXTERNALSYM SCROLLBARPARTS}
-
-const
- SCROLLBARPartFiller0 = 0;
- {$EXTERNALSYM SCROLLBARPartFiller0}
- SBP_ARROWBTN = 1;
- {$EXTERNALSYM SBP_ARROWBTN}
- SBP_THUMBBTNHORZ = 2;
- {$EXTERNALSYM SBP_THUMBBTNHORZ}
- SBP_THUMBBTNVERT = 3;
- {$EXTERNALSYM SBP_THUMBBTNVERT}
- SBP_LOWERTRACKHORZ = 4;
- {$EXTERNALSYM SBP_LOWERTRACKHORZ}
- SBP_UPPERTRACKHORZ = 5;
- {$EXTERNALSYM SBP_UPPERTRACKHORZ}
- SBP_LOWERTRACKVERT = 6;
- {$EXTERNALSYM SBP_LOWERTRACKVERT}
- SBP_UPPERTRACKVERT = 7;
- {$EXTERNALSYM SBP_UPPERTRACKVERT}
- SBP_GRIPPERHORZ = 8;
- {$EXTERNALSYM SBP_GRIPPERHORZ}
- SBP_GRIPPERVERT = 9;
- {$EXTERNALSYM SBP_GRIPPERVERT}
- SBP_SIZEBOX = 10;
- {$EXTERNALSYM SBP_SIZEBOX}
-
-type
- ARROWBTNSTATES = DWORD;
- {$EXTERNALSYM ARROWBTNSTATES}
-
-const
- ARROWBTNStateFiller0 = 0;
- {$EXTERNALSYM ARROWBTNStateFiller0}
- ABS_UPNORMAL = 1;
- {$EXTERNALSYM ABS_UPNORMAL}
- ABS_UPHOT = 2;
- {$EXTERNALSYM ABS_UPHOT}
- ABS_UPPRESSED = 3;
- {$EXTERNALSYM ABS_UPPRESSED}
- ABS_UPDISABLED = 4;
- {$EXTERNALSYM ABS_UPDISABLED}
- ABS_DOWNNORMAL = 5;
- {$EXTERNALSYM ABS_DOWNNORMAL}
- ABS_DOWNHOT = 6;
- {$EXTERNALSYM ABS_DOWNHOT}
- ABS_DOWNPRESSED = 7;
- {$EXTERNALSYM ABS_DOWNPRESSED}
- ABS_DOWNDISABLED = 8;
- {$EXTERNALSYM ABS_DOWNDISABLED}
- ABS_LEFTNORMAL = 9;
- {$EXTERNALSYM ABS_LEFTNORMAL}
- ABS_LEFTHOT = 10;
- {$EXTERNALSYM ABS_LEFTHOT}
- ABS_LEFTPRESSED = 11;
- {$EXTERNALSYM ABS_LEFTPRESSED}
- ABS_LEFTDISABLED = 12;
- {$EXTERNALSYM ABS_LEFTDISABLED}
- ABS_RIGHTNORMAL = 13;
- {$EXTERNALSYM ABS_RIGHTNORMAL}
- ABS_RIGHTHOT = 14;
- {$EXTERNALSYM ABS_RIGHTHOT}
- ABS_RIGHTPRESSED = 15;
- {$EXTERNALSYM ABS_RIGHTPRESSED}
- ABS_RIGHTDISABLED = 16;
- {$EXTERNALSYM ABS_RIGHTDISABLED}
-
-type
- SCROLLBARSTATES = DWORD;
- {$EXTERNALSYM SCROLLBARSTATES}
-
-const
- SCROLLBARStateFiller0 = 0;
- {$EXTERNALSYM SCROLLBARStateFiller0}
- SCRBS_NORMAL = 1;
- {$EXTERNALSYM SCRBS_NORMAL}
- SCRBS_HOT = 2;
- {$EXTERNALSYM SCRBS_HOT}
- SCRBS_PRESSED = 3;
- {$EXTERNALSYM SCRBS_PRESSED}
- SCRBS_DISABLED = 4;
- {$EXTERNALSYM SCRBS_DISABLED}
-
-type
- SIZEBOXSTATES = DWORD;
- {$EXTERNALSYM SIZEBOXSTATES}
-
-const
- SIZEBOXStateFiller0 = 0;
- {$EXTERNALSYM SIZEBOXStateFiller0}
- SZB_RIGHTALIGN = 1;
- {$EXTERNALSYM SZB_RIGHTALIGN}
- SZB_LEFTALIGN = 2;
- {$EXTERNALSYM SZB_LEFTALIGN}
-
-//---------------------------------------------------------------------------------------
-// "Edit" Parts & States
-//---------------------------------------------------------------------------------------
-
-type
- EDITPARTS = DWORD;
- {$EXTERNALSYM EDITPARTS}
-
-const
- EDITPartFiller0 = 0;
- {$EXTERNALSYM EDITPartFiller0}
- EP_EDITTEXT = 1;
- {$EXTERNALSYM EP_EDITTEXT}
- EP_CARET = 2;
- {$EXTERNALSYM EP_CARET}
-
-type
- EDITTEXTSTATES = DWORD;
- {$EXTERNALSYM EDITTEXTSTATES}
-
-const
- EDITTEXTStateFiller0 = 0;
- {$EXTERNALSYM EDITTEXTStateFiller0}
- ETS_NORMAL = 1;
- {$EXTERNALSYM ETS_NORMAL}
- ETS_HOT = 2;
- {$EXTERNALSYM ETS_HOT}
- ETS_SELECTED = 3;
- {$EXTERNALSYM ETS_SELECTED}
- ETS_DISABLED = 4;
- {$EXTERNALSYM ETS_DISABLED}
- ETS_FOCUSED = 5;
- {$EXTERNALSYM ETS_FOCUSED}
- ETS_READONLY = 6;
- {$EXTERNALSYM ETS_READONLY}
- ETS_ASSIST = 7;
- {$EXTERNALSYM ETS_ASSIST}
-
-//---------------------------------------------------------------------------------------
-// "ComboBox" Parts & States
-//---------------------------------------------------------------------------------------
-
-type
- COMBOBOXPARTS = DWORD;
- {$EXTERNALSYM COMBOBOXPARTS}
-
-const
- COMBOBOXPartFiller0 = 0;
- {$EXTERNALSYM COMBOBOXPartFiller0}
- CP_DROPDOWNBUTTON = 1;
- {$EXTERNALSYM CP_DROPDOWNBUTTON}
-
-type
- COMBOBOXSTATES = DWORD;
- {$EXTERNALSYM COMBOBOXSTATES}
-
-const
- COMBOBOXStateFiller0 = 0;
- {$EXTERNALSYM COMBOBOXStateFiller0}
- CBXS_NORMAL = 1;
- {$EXTERNALSYM CBXS_NORMAL}
- CBXS_HOT = 2;
- {$EXTERNALSYM CBXS_HOT}
- CBXS_PRESSED = 3;
- {$EXTERNALSYM CBXS_PRESSED}
- CBXS_DISABLED = 4;
- {$EXTERNALSYM CBXS_DISABLED}
-
-//---------------------------------------------------------------------------------------
-// "Taskbar Clock" Parts & States
-//---------------------------------------------------------------------------------------
-
-type
- CLOCKPARTS = DWORD;
- {$EXTERNALSYM CLOCKPARTS}
-
-const
- CLOCKPartFiller0 = 0;
- {$EXTERNALSYM CLOCKPartFiller0}
- CLP_TIME = 1;
- {$EXTERNALSYM CLP_TIME}
-
-type
- CLOCKSTATES = DWORD;
- {$EXTERNALSYM CLOCKSTATES}
-
-const
- CLOCKStateFiller0 = 0;
- {$EXTERNALSYM CLOCKStateFiller0}
- CLS_NORMAL = 1;
- {$EXTERNALSYM CLS_NORMAL}
-
-//---------------------------------------------------------------------------------------
-// "Tray Notify" Parts & States
-//---------------------------------------------------------------------------------------
-
-type
- TRAYNOTIFYPARTS = DWORD;
- {$EXTERNALSYM TRAYNOTIFYPARTS}
-
-const
- TRAYNOTIFYPartFiller0 = 0;
- {$EXTERNALSYM TRAYNOTIFYPartFiller0}
- TNP_BACKGROUND = 1;
- {$EXTERNALSYM TNP_BACKGROUND}
- TNP_ANIMBACKGROUND = 2;
- {$EXTERNALSYM TNP_ANIMBACKGROUND}
-
-//---------------------------------------------------------------------------------------
-// "TaskBar" Parts & States
-//---------------------------------------------------------------------------------------
-
-type
- TASKBARPARTS = DWORD;
- {$EXTERNALSYM TASKBARPARTS}
-
-const
- TASKBARPartFiller0 = 0;
- {$EXTERNALSYM TASKBARPartFiller0}
- TBP_BACKGROUNDBOTTOM = 1;
- {$EXTERNALSYM TBP_BACKGROUNDBOTTOM}
- TBP_BACKGROUNDRIGHT = 2;
- {$EXTERNALSYM TBP_BACKGROUNDRIGHT}
- TBP_BACKGROUNDTOP = 3;
- {$EXTERNALSYM TBP_BACKGROUNDTOP}
- TBP_BACKGROUNDLEFT = 4;
- {$EXTERNALSYM TBP_BACKGROUNDLEFT}
- TBP_SIZINGBARBOTTOM = 5;
- {$EXTERNALSYM TBP_SIZINGBARBOTTOM}
- TBP_SIZINGBARRIGHT = 6;
- {$EXTERNALSYM TBP_SIZINGBARRIGHT}
- TBP_SIZINGBARTOP = 7;
- {$EXTERNALSYM TBP_SIZINGBARTOP}
- TBP_SIZINGBARLEFT = 8;
- {$EXTERNALSYM TBP_SIZINGBARLEFT}
-
-//---------------------------------------------------------------------------------------
-// "TaskBand" Parts & States
-//---------------------------------------------------------------------------------------
-
-type
- TASKBANDPARTS = DWORD;
- {$EXTERNALSYM TASKBANDPARTS}
-
-const
- TASKBANDPartFiller0 = 0;
- {$EXTERNALSYM TASKBANDPartFiller0}
- TDP_GROUPCOUNT = 1;
- {$EXTERNALSYM TDP_GROUPCOUNT}
- TDP_FLASHBUTTON = 2;
- {$EXTERNALSYM TDP_FLASHBUTTON}
- TDP_FLASHBUTTONGROUPMENU = 3;
- {$EXTERNALSYM TDP_FLASHBUTTONGROUPMENU}
-
-//---------------------------------------------------------------------------------------
-// "StartPanel" Parts & States
-//---------------------------------------------------------------------------------------
-
-type
- STARTPANELPARTS = DWORD;
- {$EXTERNALSYM STARTPANELPARTS}
-
-const
- STARTPANELPartFiller0 = 0;
- {$EXTERNALSYM STARTPANELPartFiller0}
- SPP_USERPANE = 1;
- {$EXTERNALSYM SPP_USERPANE}
- SPP_MOREPROGRAMS = 2;
- {$EXTERNALSYM SPP_MOREPROGRAMS}
- SPP_MOREPROGRAMSARROW = 3;
- {$EXTERNALSYM SPP_MOREPROGRAMSARROW}
- SPP_PROGLIST = 4;
- {$EXTERNALSYM SPP_PROGLIST}
- SPP_PROGLISTSEPARATOR = 5;
- {$EXTERNALSYM SPP_PROGLISTSEPARATOR}
- SPP_PLACESLIST = 6;
- {$EXTERNALSYM SPP_PLACESLIST}
- SPP_PLACESLISTSEPARATOR = 7;
- {$EXTERNALSYM SPP_PLACESLISTSEPARATOR}
- SPP_LOGOFF = 8;
- {$EXTERNALSYM SPP_LOGOFF}
- SPP_LOGOFFBUTTONS = 9;
- {$EXTERNALSYM SPP_LOGOFFBUTTONS}
- SPP_USERPICTURE = 10;
- {$EXTERNALSYM SPP_USERPICTURE}
- SPP_PREVIEW = 11;
- {$EXTERNALSYM SPP_PREVIEW}
-
-type
- MOREPROGRAMSARROWSTATES = DWORD;
- {$EXTERNALSYM MOREPROGRAMSARROWSTATES}
-
-const
- MOREPROGRAMSARROWStateFiller0 = 0;
- {$EXTERNALSYM MOREPROGRAMSARROWStateFiller0}
- SPS_NORMAL = 1;
- {$EXTERNALSYM SPS_NORMAL}
- SPS_HOT = 2;
- {$EXTERNALSYM SPS_HOT}
- SPS_PRESSED = 3;
- {$EXTERNALSYM SPS_PRESSED}
-
-type
- LOGOFFBUTTONSSTATES = DWORD;
- {$EXTERNALSYM LOGOFFBUTTONSSTATES}
-
-const
- LOGOFFBUTTONSStateFiller0 = 0;
- {$EXTERNALSYM LOGOFFBUTTONSStateFiller0}
- SPLS_NORMAL = 1;
- {$EXTERNALSYM SPLS_NORMAL}
- SPLS_HOT = 2;
- {$EXTERNALSYM SPLS_HOT}
- SPLS_PRESSED = 3;
- {$EXTERNALSYM SPLS_PRESSED}
-
-//---------------------------------------------------------------------------------------
-// "ExplorerBar" Parts & States
-//---------------------------------------------------------------------------------------
-
-type
- EXPLORERBARPARTS = DWORD;
- {$EXTERNALSYM EXPLORERBARPARTS}
-
-const
- EXPLORERBARPartFiller0 = 0;
- {$EXTERNALSYM EXPLORERBARPartFiller0}
- EBP_HEADERBACKGROUND = 1;
- {$EXTERNALSYM EBP_HEADERBACKGROUND}
- EBP_HEADERCLOSE = 2;
- {$EXTERNALSYM EBP_HEADERCLOSE}
- EBP_HEADERPIN = 3;
- {$EXTERNALSYM EBP_HEADERPIN}
- EBP_IEBARMENU = 4;
- {$EXTERNALSYM EBP_IEBARMENU}
- EBP_NORMALGROUPBACKGROUND = 5;
- {$EXTERNALSYM EBP_NORMALGROUPBACKGROUND}
- EBP_NORMALGROUPCOLLAPSE = 6;
- {$EXTERNALSYM EBP_NORMALGROUPCOLLAPSE}
- EBP_NORMALGROUPEXPAND = 7;
- {$EXTERNALSYM EBP_NORMALGROUPEXPAND}
- EBP_NORMALGROUPHEAD = 8;
- {$EXTERNALSYM EBP_NORMALGROUPHEAD}
- EBP_SPECIALGROUPBACKGROUND = 9;
- {$EXTERNALSYM EBP_SPECIALGROUPBACKGROUND}
- EBP_SPECIALGROUPCOLLAPSE = 10;
- {$EXTERNALSYM EBP_SPECIALGROUPCOLLAPSE}
- EBP_SPECIALGROUPEXPAND = 11;
- {$EXTERNALSYM EBP_SPECIALGROUPEXPAND}
- EBP_SPECIALGROUPHEAD = 12;
- {$EXTERNALSYM EBP_SPECIALGROUPHEAD}
-
-type
- HEADERCLOSESTATES = DWORD;
- {$EXTERNALSYM HEADERCLOSESTATES}
-
-const
- HEADERCLOSEStateFiller0 = 0;
- {$EXTERNALSYM HEADERCLOSEStateFiller0}
- EBHC_NORMAL = 1;
- {$EXTERNALSYM EBHC_NORMAL}
- EBHC_HOT = 2;
- {$EXTERNALSYM EBHC_HOT}
- EBHC_PRESSED = 3;
- {$EXTERNALSYM EBHC_PRESSED}
-
-type
- HEADERPINSTATES = DWORD;
- {$EXTERNALSYM HEADERPINSTATES}
-
-const
- HEADERPINStateFiller0 = 0;
- {$EXTERNALSYM HEADERPINStateFiller0}
- EBHP_NORMAL = 1;
- {$EXTERNALSYM EBHP_NORMAL}
- EBHP_HOT = 2;
- {$EXTERNALSYM EBHP_HOT}
- EBHP_PRESSED = 3;
- {$EXTERNALSYM EBHP_PRESSED}
- EBHP_SELECTEDNORMAL = 4;
- {$EXTERNALSYM EBHP_SELECTEDNORMAL}
- EBHP_SELECTEDHOT = 5;
- {$EXTERNALSYM EBHP_SELECTEDHOT}
- EBHP_SELECTEDPRESSED = 6;
- {$EXTERNALSYM EBHP_SELECTEDPRESSED}
-
-type
- IEBARMENUSTATES = DWORD;
- {$EXTERNALSYM IEBARMENUSTATES}
-
-const
- IEBARMENUStateFiller0 = 0;
- {$EXTERNALSYM IEBARMENUStateFiller0}
- EBM_NORMAL = 1;
- {$EXTERNALSYM EBM_NORMAL}
- EBM_HOT = 2;
- {$EXTERNALSYM EBM_HOT}
- EBM_PRESSED = 3;
- {$EXTERNALSYM EBM_PRESSED}
-
-type
- NORMALGROUPCOLLAPSESTATES = DWORD;
- {$EXTERNALSYM NORMALGROUPCOLLAPSESTATES}
-
-const
- NORMALGROUPCOLLAPSEStateFiller0 = 0;
- {$EXTERNALSYM NORMALGROUPCOLLAPSEStateFiller0}
- EBNGC_NORMAL = 1;
- {$EXTERNALSYM EBNGC_NORMAL}
- EBNGC_HOT = 2;
- {$EXTERNALSYM EBNGC_HOT}
- EBNGC_PRESSED = 3;
- {$EXTERNALSYM EBNGC_PRESSED}
-
-type
- NORMALGROUPEXPANDSTATES = DWORD;
- {$EXTERNALSYM NORMALGROUPEXPANDSTATES}
-
-const
- NORMALGROUPEXPANDStateFiller0 = 0;
- {$EXTERNALSYM NORMALGROUPEXPANDStateFiller0}
- EBNGE_NORMAL = 1;
- {$EXTERNALSYM EBNGE_NORMAL}
- EBNGE_HOT = 2;
- {$EXTERNALSYM EBNGE_HOT}
- EBNGE_PRESSED = 3;
- {$EXTERNALSYM EBNGE_PRESSED}
-
-type
- SPECIALGROUPCOLLAPSESTATES = DWORD;
- {$EXTERNALSYM SPECIALGROUPCOLLAPSESTATES}
-
-const
- SPECIALGROUPCOLLAPSEStateFiller0 = 0;
- {$EXTERNALSYM SPECIALGROUPCOLLAPSEStateFiller0}
- EBSGC_NORMAL = 1;
- {$EXTERNALSYM EBSGC_NORMAL}
- EBSGC_HOT = 2;
- {$EXTERNALSYM EBSGC_HOT}
- EBSGC_PRESSED = 3;
- {$EXTERNALSYM EBSGC_PRESSED}
-
-type
- SPECIALGROUPEXPANDSTATES = DWORD;
- {$EXTERNALSYM SPECIALGROUPEXPANDSTATES}
-
-const
- SPECIALGROUPEXPANDStateFiller0 = 0;
- {$EXTERNALSYM SPECIALGROUPEXPANDStateFiller0}
- EBSGE_NORMAL = 1;
- {$EXTERNALSYM EBSGE_NORMAL}
- EBSGE_HOT = 2;
- {$EXTERNALSYM EBSGE_HOT}
- EBSGE_PRESSED = 3;
- {$EXTERNALSYM EBSGE_PRESSED}
-
-//---------------------------------------------------------------------------------------
-// "TaskBand" Parts & States
-//---------------------------------------------------------------------------------------
-
-type
- MENUBANDPARTS = DWORD;
- {$EXTERNALSYM MENUBANDPARTS}
-
-const
- MENUBANDPartFiller0 = 0;
- {$EXTERNALSYM MENUBANDPartFiller0}
- MDP_NEWAPPBUTTON = 1;
- {$EXTERNALSYM MDP_NEWAPPBUTTON}
- MDP_SEPERATOR = 2;
- {$EXTERNALSYM MDP_SEPERATOR}
-
-type
- MENUBANDSTATES = DWORD;
- {$EXTERNALSYM MENUBANDSTATES}
-
-const
- MENUBANDStateFiller0 = 0;
- {$EXTERNALSYM MENUBANDStateFiller0}
- MDS_NORMAL = 1;
- {$EXTERNALSYM MDS_NORMAL}
- MDS_HOT = 2;
- {$EXTERNALSYM MDS_HOT}
- MDS_PRESSED = 3;
- {$EXTERNALSYM MDS_PRESSED}
- MDS_DISABLED = 4;
- {$EXTERNALSYM MDS_DISABLED}
- MDS_CHECKED = 5;
- {$EXTERNALSYM MDS_CHECKED}
- MDS_HOTCHECKED = 6;
- {$EXTERNALSYM MDS_HOTCHECKED}
-
-implementation
-
-end.
+{******************************************************************************}
+{ }
+{ Visual Styles (Themes) API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: tmschema.h, released June 2001. The original Pascal }
+{ code is: TmSchema.pas, released July 2001. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwatmschema.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaTmSchema;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "tmschema.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaWinType;
+
+//-----------------------------------------------------------------
+// TmSchema.h - Theme Manager schema (properties, parts, etc)
+//-----------------------------------------------------------------
+
+const
+ THEMEMGR_VERSION = 1; // increment if order of props changes or
+ // any props are deleted (will prevent loading
+ // of controlsets that use older version
+ {$EXTERNALSYM THEMEMGR_VERSION}
+
+//-----------------------------------------------------------------
+// TM_ENUM (must also be declared in PROPERTIES section)
+//
+// these cannot be renumbered (part of uxtheme API)
+//-----------------------------------------------------------------
+
+type
+ BGTYPE = DWORD;
+ {$EXTERNALSYM BGTYPE}
+
+const
+ BT_IMAGEFILE = 0;
+ {$EXTERNALSYM BT_IMAGEFILE}
+ BT_BORDERFILL = 1;
+ {$EXTERNALSYM BT_BORDERFILL}
+ BT_NONE = 2;
+ {$EXTERNALSYM BT_NONE}
+
+type
+ IMAGELAYOUT = DWORD;
+ {$EXTERNALSYM IMAGELAYOUT}
+
+const
+ IL_VERTICAL = 0;
+ {$EXTERNALSYM IL_VERTICAL}
+ IL_HORIZONTAL = 1;
+ {$EXTERNALSYM IL_HORIZONTAL}
+
+type
+ BORDERTYPE = DWORD;
+ {$EXTERNALSYM BORDERTYPE}
+
+const
+ BT_RECT = 0;
+ {$EXTERNALSYM BT_RECT}
+ BT_ROUNDRECT = 1;
+ {$EXTERNALSYM BT_ROUNDRECT}
+ BT_ELLIPSE = 2;
+ {$EXTERNALSYM BT_ELLIPSE}
+
+type
+ FILLTYPE = DWORD;
+ {$EXTERNALSYM FILLTYPE}
+
+const
+ FT_SOLID = 0;
+ {$EXTERNALSYM FT_SOLID}
+ FT_VERTGRADIENT = 1;
+ {$EXTERNALSYM FT_VERTGRADIENT}
+ FT_HORZGRADIENT = 2;
+ {$EXTERNALSYM FT_HORZGRADIENT}
+ FT_RADIALGRADIENT = 3;
+ {$EXTERNALSYM FT_RADIALGRADIENT}
+ FT_TILEIMAGE = 4;
+ {$EXTERNALSYM FT_TILEIMAGE}
+
+type
+ SIZINGTYPE = DWORD;
+ {$EXTERNALSYM SIZINGTYPE}
+
+const
+ ST_TRUESIZE = 0;
+ {$EXTERNALSYM ST_TRUESIZE}
+ ST_STRETCH = 1;
+ {$EXTERNALSYM ST_STRETCH}
+ ST_TILE = 2;
+ {$EXTERNALSYM ST_TILE}
+
+type
+ HALIGN = DWORD;
+ {$EXTERNALSYM HALIGN}
+
+const
+ HA_LEFT = 0;
+ {$EXTERNALSYM HA_LEFT}
+ HA_CENTER = 1;
+ {$EXTERNALSYM HA_CENTER}
+ HA_RIGHT = 2;
+ {$EXTERNALSYM HA_RIGHT}
+
+type
+ CONTENTALIGNMENT = DWORD;
+ {$EXTERNALSYM CONTENTALIGNMENT}
+
+const
+ CA_LEFT = 0;
+ {$EXTERNALSYM CA_LEFT}
+ CA_CENTER = 1;
+ {$EXTERNALSYM CA_CENTER}
+ CA_RIGHT = 2;
+ {$EXTERNALSYM CA_RIGHT}
+
+type
+ VALIGN = DWORD;
+ {$EXTERNALSYM VALIGN}
+
+const
+ VA_TOP = 0;
+ {$EXTERNALSYM VA_TOP}
+ VA_CENTER = 1;
+ {$EXTERNALSYM VA_CENTER}
+ VA_BOTTOM = 2;
+ {$EXTERNALSYM VA_BOTTOM}
+
+type
+ OFFSETTYPE = DWORD;
+ {$EXTERNALSYM OFFSETTYPE}
+
+const
+ OT_TOPLEFT = 0;
+ {$EXTERNALSYM OT_TOPLEFT}
+ OT_TOPRIGHT = 1;
+ {$EXTERNALSYM OT_TOPRIGHT}
+ OT_TOPMIDDLE = 2;
+ {$EXTERNALSYM OT_TOPMIDDLE}
+ OT_BOTTOMLEFT = 3;
+ {$EXTERNALSYM OT_BOTTOMLEFT}
+ OT_BOTTOMRIGHT = 4;
+ {$EXTERNALSYM OT_BOTTOMRIGHT}
+ OT_BOTTOMMIDDLE = 5;
+ {$EXTERNALSYM OT_BOTTOMMIDDLE}
+ OT_MIDDLELEFT = 6;
+ {$EXTERNALSYM OT_MIDDLELEFT}
+ OT_MIDDLERIGHT = 7;
+ {$EXTERNALSYM OT_MIDDLERIGHT}
+ OT_LEFTOFCAPTION = 8;
+ {$EXTERNALSYM OT_LEFTOFCAPTION}
+ OT_RIGHTOFCAPTION = 9;
+ {$EXTERNALSYM OT_RIGHTOFCAPTION}
+ OT_LEFTOFLASTBUTTON = 10;
+ {$EXTERNALSYM OT_LEFTOFLASTBUTTON}
+ OT_RIGHTOFLASTBUTTON = 11;
+ {$EXTERNALSYM OT_RIGHTOFLASTBUTTON}
+ OT_ABOVELASTBUTTON = 12;
+ {$EXTERNALSYM OT_ABOVELASTBUTTON}
+ OT_BELOWLASTBUTTON = 13;
+ {$EXTERNALSYM OT_BELOWLASTBUTTON}
+
+type
+ ICONEFFECT = DWORD;
+ {$EXTERNALSYM ICONEFFECT}
+
+const
+ ICE_NONE = 0;
+ {$EXTERNALSYM ICE_NONE}
+ ICE_GLOW = 1;
+ {$EXTERNALSYM ICE_GLOW}
+ ICE_SHADOW = 2;
+ {$EXTERNALSYM ICE_SHADOW}
+ ICE_PULSE = 3;
+ {$EXTERNALSYM ICE_PULSE}
+ ICE_ALPHA = 4;
+ {$EXTERNALSYM ICE_ALPHA}
+
+type
+ TEXTSHADOWTYPE = DWORD;
+ {$EXTERNALSYM TEXTSHADOWTYPE}
+
+const
+ TST_NONE = 0;
+ {$EXTERNALSYM TST_NONE}
+ TST_SINGLE = 1;
+ {$EXTERNALSYM TST_SINGLE}
+ TST_CONTINUOUS = 2;
+ {$EXTERNALSYM TST_CONTINUOUS}
+
+type
+ GLYPHTYPE = DWORD;
+ {$EXTERNALSYM GLYPHTYPE}
+
+const
+ GT_NONE = 0;
+ {$EXTERNALSYM GT_NONE}
+ GT_IMAGEGLYPH = 1;
+ {$EXTERNALSYM GT_IMAGEGLYPH}
+ GT_FONTGLYPH = 2;
+ {$EXTERNALSYM GT_FONTGLYPH}
+
+type
+ IMAGESELECTTYPE = DWORD;
+ {$EXTERNALSYM IMAGESELECTTYPE}
+
+const
+ IST_NONE = 0;
+ {$EXTERNALSYM IST_NONE}
+ IST_SIZE = 1;
+ {$EXTERNALSYM IST_SIZE}
+ IST_DPI = 2;
+ {$EXTERNALSYM IST_DPI}
+
+type
+ TRUESIZESCALINGTYPE = DWORD;
+ {$EXTERNALSYM TRUESIZESCALINGTYPE}
+
+const
+ TSST_NONE = 0;
+ {$EXTERNALSYM TSST_NONE}
+ TSST_SIZE = 1;
+ {$EXTERNALSYM TSST_SIZE}
+ TSST_DPI = 2;
+ {$EXTERNALSYM TSST_DPI}
+
+type
+ GLYPHFONTSIZINGTYPE = DWORD;
+ {$EXTERNALSYM GLYPHFONTSIZINGTYPE}
+
+const
+ GFST_NONE = 0;
+ {$EXTERNALSYM GFST_NONE}
+ GFST_SIZE = 1;
+ {$EXTERNALSYM GFST_SIZE}
+ GFST_DPI = 2;
+ {$EXTERNALSYM GFST_DPI}
+
+//-----------------------------------------------------------------
+// PROPERTIES - used by uxtheme rendering and controls
+//
+// these cannot be renumbered (part of uxtheme API)
+//-----------------------------------------------------------------
+
+const
+
+ //---- primitive types ----
+
+ TMT_STRING = 201;
+ {$EXTERNALSYM TMT_STRING}
+ TMT_INT = 202;
+ {$EXTERNALSYM TMT_INT}
+ TMT_BOOL = 203;
+ {$EXTERNALSYM TMT_BOOL}
+ TMT_COLOR = 204;
+ {$EXTERNALSYM TMT_COLOR}
+ TMT_MARGINS = 205;
+ {$EXTERNALSYM TMT_MARGINS}
+ TMT_FILENAME = 206;
+ {$EXTERNALSYM TMT_FILENAME}
+ TMT_SIZE = 207;
+ {$EXTERNALSYM TMT_SIZE}
+ TMT_POSITION = 208;
+ {$EXTERNALSYM TMT_POSITION}
+ TMT_RECT = 209;
+ {$EXTERNALSYM TMT_RECT}
+ TMT_FONT = 210;
+ {$EXTERNALSYM TMT_FONT}
+ TMT_INTLIST = 211;
+ {$EXTERNALSYM TMT_INTLIST}
+
+ //---- special misc. properties ----
+
+ TMT_COLORSCHEMES = 401;
+ {$EXTERNALSYM TMT_COLORSCHEMES}
+ TMT_SIZES = 402;
+ {$EXTERNALSYM TMT_SIZES}
+ TMT_CHARSET = 403;
+ {$EXTERNALSYM TMT_CHARSET}
+
+ //---- [documentation] properties ----
+
+ TMT_DISPLAYNAME = 601;
+ {$EXTERNALSYM TMT_DISPLAYNAME}
+ TMT_TOOLTIP = 602;
+ {$EXTERNALSYM TMT_TOOLTIP}
+ TMT_COMPANY = 603;
+ {$EXTERNALSYM TMT_COMPANY}
+ TMT_AUTHOR = 604;
+ {$EXTERNALSYM TMT_AUTHOR}
+ TMT_COPYRIGHT = 605;
+ {$EXTERNALSYM TMT_COPYRIGHT}
+ TMT_URL = 606;
+ {$EXTERNALSYM TMT_URL}
+ TMT_VERSION = 607;
+ {$EXTERNALSYM TMT_VERSION}
+ TMT_DESCRIPTION = 608;
+ {$EXTERNALSYM TMT_DESCRIPTION}
+
+ TMT_FIRST_RCSTRING_NAME = TMT_DISPLAYNAME;
+ {$EXTERNALSYM TMT_FIRST_RCSTRING_NAME}
+ TMT_LAST_RCSTRING_NAME = TMT_DESCRIPTION;
+ {$EXTERNALSYM TMT_LAST_RCSTRING_NAME}
+
+ //---- theme metrics: fonts ----
+
+ TMT_CAPTIONFONT = 801;
+ {$EXTERNALSYM TMT_CAPTIONFONT}
+ TMT_SMALLCAPTIONFONT = 802;
+ {$EXTERNALSYM TMT_SMALLCAPTIONFONT}
+ TMT_MENUFONT = 803;
+ {$EXTERNALSYM TMT_MENUFONT}
+ TMT_STATUSFONT = 804;
+ {$EXTERNALSYM TMT_STATUSFONT}
+ TMT_MSGBOXFONT = 805;
+ {$EXTERNALSYM TMT_MSGBOXFONT}
+ TMT_ICONTITLEFONT = 806;
+ {$EXTERNALSYM TMT_ICONTITLEFONT}
+
+ TMT_FIRSTFONT = TMT_CAPTIONFONT;
+ {$EXTERNALSYM TMT_FIRSTFONT}
+ TMT_LASTFONT = TMT_ICONTITLEFONT;
+ {$EXTERNALSYM TMT_LASTFONT}
+
+ //---- theme metrics: bools ----
+
+ TMT_FLATMENUS = 1001;
+ {$EXTERNALSYM TMT_FLATMENUS}
+
+ TMT_FIRSTBOOL = TMT_FLATMENUS;
+ {$EXTERNALSYM TMT_FIRSTBOOL}
+ TMT_LASTBOOL = TMT_FLATMENUS;
+ {$EXTERNALSYM TMT_LASTBOOL}
+
+ //---- theme metrics: sizes ----
+
+ TMT_SIZINGBORDERWIDTH = 1201;
+ {$EXTERNALSYM TMT_SIZINGBORDERWIDTH}
+ TMT_SCROLLBARWIDTH = 1202;
+ {$EXTERNALSYM TMT_SCROLLBARWIDTH}
+ TMT_SCROLLBARHEIGHT = 1203;
+ {$EXTERNALSYM TMT_SCROLLBARHEIGHT}
+ TMT_CAPTIONBARWIDTH = 1204;
+ {$EXTERNALSYM TMT_CAPTIONBARWIDTH}
+ TMT_CAPTIONBARHEIGHT = 1205;
+ {$EXTERNALSYM TMT_CAPTIONBARHEIGHT}
+ TMT_SMCAPTIONBARWIDTH = 1206;
+ {$EXTERNALSYM TMT_SMCAPTIONBARWIDTH}
+ TMT_SMCAPTIONBARHEIGHT = 1207;
+ {$EXTERNALSYM TMT_SMCAPTIONBARHEIGHT}
+ TMT_MENUBARWIDTH = 1208;
+ {$EXTERNALSYM TMT_MENUBARWIDTH}
+ TMT_MENUBARHEIGHT = 1209;
+ {$EXTERNALSYM TMT_MENUBARHEIGHT}
+
+ TMT_FIRSTSIZE = TMT_SIZINGBORDERWIDTH;
+ {$EXTERNALSYM TMT_FIRSTSIZE}
+ TMT_LASTSIZE = TMT_MENUBARHEIGHT;
+ {$EXTERNALSYM TMT_LASTSIZE}
+
+ //---- theme metrics: ints ----
+
+ TMT_MINCOLORDEPTH = 1301;
+ {$EXTERNALSYM TMT_MINCOLORDEPTH}
+
+ TMT_FIRSTINT = TMT_MINCOLORDEPTH;
+ {$EXTERNALSYM TMT_FIRSTINT}
+ TMT_LASTINT = TMT_MINCOLORDEPTH;
+ {$EXTERNALSYM TMT_LASTINT}
+
+ //---- theme metrics: strings ----
+
+ TMT_CSSNAME = 1401;
+ {$EXTERNALSYM TMT_CSSNAME}
+ TMT_XMLNAME = 1402;
+ {$EXTERNALSYM TMT_XMLNAME}
+
+ TMT_FIRSTSTRING = TMT_CSSNAME;
+ {$EXTERNALSYM TMT_FIRSTSTRING}
+ TMT_LASTSTRING = TMT_XMLNAME;
+ {$EXTERNALSYM TMT_LASTSTRING}
+
+ //---- theme metrics: colors ----
+
+ TMT_SCROLLBAR = 1601;
+ {$EXTERNALSYM TMT_SCROLLBAR}
+ TMT_BACKGROUND = 1602;
+ {$EXTERNALSYM TMT_BACKGROUND}
+ TMT_ACTIVECAPTION = 1603;
+ {$EXTERNALSYM TMT_ACTIVECAPTION}
+ TMT_INACTIVECAPTION = 1604;
+ {$EXTERNALSYM TMT_INACTIVECAPTION}
+ TMT_MENU = 1605;
+ {$EXTERNALSYM TMT_MENU}
+ TMT_WINDOW = 1606;
+ {$EXTERNALSYM TMT_WINDOW}
+ TMT_WINDOWFRAME = 1607;
+ {$EXTERNALSYM TMT_WINDOWFRAME}
+ TMT_MENUTEXT = 1608;
+ {$EXTERNALSYM TMT_MENUTEXT}
+ TMT_WINDOWTEXT = 1609;
+ {$EXTERNALSYM TMT_WINDOWTEXT}
+ TMT_CAPTIONTEXT = 1610;
+ {$EXTERNALSYM TMT_CAPTIONTEXT}
+ TMT_ACTIVEBORDER = 1611;
+ {$EXTERNALSYM TMT_ACTIVEBORDER}
+ TMT_INACTIVEBORDER = 1612;
+ {$EXTERNALSYM TMT_INACTIVEBORDER}
+ TMT_APPWORKSPACE = 1613;
+ {$EXTERNALSYM TMT_APPWORKSPACE}
+ TMT_HIGHLIGHT = 1614;
+ {$EXTERNALSYM TMT_HIGHLIGHT}
+ TMT_HIGHLIGHTTEXT = 1615;
+ {$EXTERNALSYM TMT_HIGHLIGHTTEXT}
+ TMT_BTNFACE = 1616;
+ {$EXTERNALSYM TMT_BTNFACE}
+ TMT_BTNSHADOW = 1617;
+ {$EXTERNALSYM TMT_BTNSHADOW}
+ TMT_GRAYTEXT = 1618;
+ {$EXTERNALSYM TMT_GRAYTEXT}
+ TMT_BTNTEXT = 1619;
+ {$EXTERNALSYM TMT_BTNTEXT}
+ TMT_INACTIVECAPTIONTEXT = 1620;
+ {$EXTERNALSYM TMT_INACTIVECAPTIONTEXT}
+ TMT_BTNHIGHLIGHT = 1621;
+ {$EXTERNALSYM TMT_BTNHIGHLIGHT}
+ TMT_DKSHADOW3D = 1622;
+ {$EXTERNALSYM TMT_DKSHADOW3D}
+ TMT_LIGHT3D = 1623;
+ {$EXTERNALSYM TMT_LIGHT3D}
+ TMT_INFOTEXT = 1624;
+ {$EXTERNALSYM TMT_INFOTEXT}
+ TMT_INFOBK = 1625;
+ {$EXTERNALSYM TMT_INFOBK}
+ TMT_BUTTONALTERNATEFACE = 1626;
+ {$EXTERNALSYM TMT_BUTTONALTERNATEFACE}
+ TMT_HOTTRACKING = 1627;
+ {$EXTERNALSYM TMT_HOTTRACKING}
+ TMT_GRADIENTACTIVECAPTION = 1628;
+ {$EXTERNALSYM TMT_GRADIENTACTIVECAPTION}
+ TMT_GRADIENTINACTIVECAPTION = 1629;
+ {$EXTERNALSYM TMT_GRADIENTINACTIVECAPTION}
+ TMT_MENUHILIGHT = 1630;
+ {$EXTERNALSYM TMT_MENUHILIGHT}
+ TMT_MENUBAR = 1631;
+ {$EXTERNALSYM TMT_MENUBAR}
+
+ TMT_FIRSTCOLOR = TMT_SCROLLBAR;
+ {$EXTERNALSYM TMT_FIRSTCOLOR}
+ TMT_LASTCOLOR = TMT_MENUBAR;
+ {$EXTERNALSYM TMT_LASTCOLOR}
+
+ //---- hue substitutions ----
+
+ TMT_FROMHUE1 = 1801;
+ {$EXTERNALSYM TMT_FROMHUE1}
+ TMT_FROMHUE2 = 1802;
+ {$EXTERNALSYM TMT_FROMHUE2}
+ TMT_FROMHUE3 = 1803;
+ {$EXTERNALSYM TMT_FROMHUE3}
+ TMT_FROMHUE4 = 1804;
+ {$EXTERNALSYM TMT_FROMHUE4}
+ TMT_FROMHUE5 = 1805;
+ {$EXTERNALSYM TMT_FROMHUE5}
+ TMT_TOHUE1 = 1806;
+ {$EXTERNALSYM TMT_TOHUE1}
+ TMT_TOHUE2 = 1807;
+ {$EXTERNALSYM TMT_TOHUE2}
+ TMT_TOHUE3 = 1808;
+ {$EXTERNALSYM TMT_TOHUE3}
+ TMT_TOHUE4 = 1809;
+ {$EXTERNALSYM TMT_TOHUE4}
+ TMT_TOHUE5 = 1810;
+ {$EXTERNALSYM TMT_TOHUE5}
+
+ //---- color substitutions ----
+
+ TMT_FROMCOLOR1 = 2001;
+ {$EXTERNALSYM TMT_FROMCOLOR1}
+ TMT_FROMCOLOR2 = 2002;
+ {$EXTERNALSYM TMT_FROMCOLOR2}
+ TMT_FROMCOLOR3 = 2003;
+ {$EXTERNALSYM TMT_FROMCOLOR3}
+ TMT_FROMCOLOR4 = 2004;
+ {$EXTERNALSYM TMT_FROMCOLOR4}
+ TMT_FROMCOLOR5 = 2005;
+ {$EXTERNALSYM TMT_FROMCOLOR5}
+ TMT_TOCOLOR1 = 2006;
+ {$EXTERNALSYM TMT_TOCOLOR1}
+ TMT_TOCOLOR2 = 2007;
+ {$EXTERNALSYM TMT_TOCOLOR2}
+ TMT_TOCOLOR3 = 2008;
+ {$EXTERNALSYM TMT_TOCOLOR3}
+ TMT_TOCOLOR4 = 2009;
+ {$EXTERNALSYM TMT_TOCOLOR4}
+ TMT_TOCOLOR5 = 2010;
+ {$EXTERNALSYM TMT_TOCOLOR5}
+
+ //---- rendering BOOL properties ----
+
+ TMT_TRANSPARENT = 2201;
+ {$EXTERNALSYM TMT_TRANSPARENT}
+ TMT_AUTOSIZE = 2202;
+ {$EXTERNALSYM TMT_AUTOSIZE}
+ TMT_BORDERONLY = 2203;
+ {$EXTERNALSYM TMT_BORDERONLY}
+ TMT_COMPOSITED = 2204;
+ {$EXTERNALSYM TMT_COMPOSITED}
+ TMT_BGFILL = 2205;
+ {$EXTERNALSYM TMT_BGFILL}
+ TMT_GLYPHTRANSPARENT = 2206;
+ {$EXTERNALSYM TMT_GLYPHTRANSPARENT}
+ TMT_GLYPHONLY = 2207;
+ {$EXTERNALSYM TMT_GLYPHONLY}
+ TMT_ALWAYSSHOWSIZINGBAR = 2208;
+ {$EXTERNALSYM TMT_ALWAYSSHOWSIZINGBAR}
+ TMT_MIRRORIMAGE = 2209;
+ {$EXTERNALSYM TMT_MIRRORIMAGE}
+ TMT_UNIFORMSIZING = 2210;
+ {$EXTERNALSYM TMT_UNIFORMSIZING}
+ TMT_INTEGRALSIZING = 2211;
+ {$EXTERNALSYM TMT_INTEGRALSIZING}
+ TMT_SOURCEGROW = 2212;
+ {$EXTERNALSYM TMT_SOURCEGROW}
+ TMT_SOURCESHRINK = 2213;
+ {$EXTERNALSYM TMT_SOURCESHRINK}
+
+ //---- rendering INT properties ----
+
+ TMT_IMAGECOUNT = 2401;
+ {$EXTERNALSYM TMT_IMAGECOUNT}
+ TMT_ALPHALEVEL = 2402;
+ {$EXTERNALSYM TMT_ALPHALEVEL}
+ TMT_BORDERSIZE = 2403;
+ {$EXTERNALSYM TMT_BORDERSIZE}
+ TMT_ROUNDCORNERWIDTH = 2404;
+ {$EXTERNALSYM TMT_ROUNDCORNERWIDTH}
+ TMT_ROUNDCORNERHEIGHT = 2405;
+ {$EXTERNALSYM TMT_ROUNDCORNERHEIGHT}
+ TMT_GRADIENTRATIO1 = 2406;
+ {$EXTERNALSYM TMT_GRADIENTRATIO1}
+ TMT_GRADIENTRATIO2 = 2407;
+ {$EXTERNALSYM TMT_GRADIENTRATIO2}
+ TMT_GRADIENTRATIO3 = 2408;
+ {$EXTERNALSYM TMT_GRADIENTRATIO3}
+ TMT_GRADIENTRATIO4 = 2409;
+ {$EXTERNALSYM TMT_GRADIENTRATIO4}
+ TMT_GRADIENTRATIO5 = 2410;
+ {$EXTERNALSYM TMT_GRADIENTRATIO5}
+ TMT_PROGRESSCHUNKSIZE = 2411;
+ {$EXTERNALSYM TMT_PROGRESSCHUNKSIZE}
+ TMT_PROGRESSSPACESIZE = 2412;
+ {$EXTERNALSYM TMT_PROGRESSSPACESIZE}
+ TMT_SATURATION = 2413;
+ {$EXTERNALSYM TMT_SATURATION}
+ TMT_TEXTBORDERSIZE = 2414;
+ {$EXTERNALSYM TMT_TEXTBORDERSIZE}
+ TMT_ALPHATHRESHOLD = 2415;
+ {$EXTERNALSYM TMT_ALPHATHRESHOLD}
+ TMT_WIDTH = 2416;
+ {$EXTERNALSYM TMT_WIDTH}
+ TMT_HEIGHT = 2417;
+ {$EXTERNALSYM TMT_HEIGHT}
+ TMT_GLYPHINDEX = 2418;
+ {$EXTERNALSYM TMT_GLYPHINDEX}
+ TMT_TRUESIZESTRETCHMARK = 2419;
+ {$EXTERNALSYM TMT_TRUESIZESTRETCHMARK}
+ TMT_MINDPI1 = 2420;
+ {$EXTERNALSYM TMT_MINDPI1}
+ TMT_MINDPI2 = 2421;
+ {$EXTERNALSYM TMT_MINDPI2}
+ TMT_MINDPI3 = 2422;
+ {$EXTERNALSYM TMT_MINDPI3}
+ TMT_MINDPI4 = 2423;
+ {$EXTERNALSYM TMT_MINDPI4}
+ TMT_MINDPI5 = 2424;
+ {$EXTERNALSYM TMT_MINDPI5}
+
+ //---- rendering FONT properties ----
+
+ TMT_GLYPHFONT = 2601;
+ {$EXTERNALSYM TMT_GLYPHFONT}
+
+ //---- rendering INTLIST properties ----
+ // start with 2801
+ // (from smallest to largest)
+ //---- rendering FILENAME properties ----
+
+ TMT_IMAGEFILE = 3001;
+ {$EXTERNALSYM TMT_IMAGEFILE}
+ TMT_IMAGEFILE1 = 3002;
+ {$EXTERNALSYM TMT_IMAGEFILE1}
+ TMT_IMAGEFILE2 = 3003;
+ {$EXTERNALSYM TMT_IMAGEFILE2}
+ TMT_IMAGEFILE3 = 3004;
+ {$EXTERNALSYM TMT_IMAGEFILE3}
+ TMT_IMAGEFILE4 = 3005;
+ {$EXTERNALSYM TMT_IMAGEFILE4}
+ TMT_IMAGEFILE5 = 3006;
+ {$EXTERNALSYM TMT_IMAGEFILE5}
+ TMT_STOCKIMAGEFILE = 3007;
+ {$EXTERNALSYM TMT_STOCKIMAGEFILE}
+ TMT_GLYPHIMAGEFILE = 3008;
+ {$EXTERNALSYM TMT_GLYPHIMAGEFILE}
+
+ //---- rendering STRING properties ----
+
+ TMT_TEXT = 3201;
+ {$EXTERNALSYM TMT_TEXT}
+
+ //---- rendering POSITION (x and y values) properties ----
+
+ TMT_OFFSET = 3401;
+ {$EXTERNALSYM TMT_OFFSET}
+ TMT_TEXTSHADOWOFFSET = 3402;
+ {$EXTERNALSYM TMT_TEXTSHADOWOFFSET}
+ TMT_MINSIZE = 3403;
+ {$EXTERNALSYM TMT_MINSIZE}
+ TMT_MINSIZE1 = 3404;
+ {$EXTERNALSYM TMT_MINSIZE1}
+ TMT_MINSIZE2 = 3405;
+ {$EXTERNALSYM TMT_MINSIZE2}
+ TMT_MINSIZE3 = 3406;
+ {$EXTERNALSYM TMT_MINSIZE3}
+ TMT_MINSIZE4 = 3407;
+ {$EXTERNALSYM TMT_MINSIZE4}
+ TMT_MINSIZE5 = 3408;
+ {$EXTERNALSYM TMT_MINSIZE5}
+ TMT_NORMALSIZE = 3409;
+ {$EXTERNALSYM TMT_NORMALSIZE}
+
+ //---- rendering MARGIN properties ----
+
+ TMT_SIZINGMARGINS = 3601;
+ {$EXTERNALSYM TMT_SIZINGMARGINS}
+ TMT_CONTENTMARGINS = 3602;
+ {$EXTERNALSYM TMT_CONTENTMARGINS}
+ TMT_CAPTIONMARGINS = 3603;
+ {$EXTERNALSYM TMT_CAPTIONMARGINS}
+
+ //---- rendering COLOR properties ----
+
+ TMT_BORDERCOLOR = 3801;
+ {$EXTERNALSYM TMT_BORDERCOLOR}
+ TMT_FILLCOLOR = 3802;
+ {$EXTERNALSYM TMT_FILLCOLOR}
+ TMT_TEXTCOLOR = 3803;
+ {$EXTERNALSYM TMT_TEXTCOLOR}
+ TMT_EDGELIGHTCOLOR = 3804;
+ {$EXTERNALSYM TMT_EDGELIGHTCOLOR}
+ TMT_EDGEHIGHLIGHTCOLOR = 3805;
+ {$EXTERNALSYM TMT_EDGEHIGHLIGHTCOLOR}
+ TMT_EDGESHADOWCOLOR = 3806;
+ {$EXTERNALSYM TMT_EDGESHADOWCOLOR}
+ TMT_EDGEDKSHADOWCOLOR = 3807;
+ {$EXTERNALSYM TMT_EDGEDKSHADOWCOLOR}
+ TMT_EDGEFILLCOLOR = 3808;
+ {$EXTERNALSYM TMT_EDGEFILLCOLOR}
+ TMT_TRANSPARENTCOLOR = 3809;
+ {$EXTERNALSYM TMT_TRANSPARENTCOLOR}
+ TMT_GRADIENTCOLOR1 = 3810;
+ {$EXTERNALSYM TMT_GRADIENTCOLOR1}
+ TMT_GRADIENTCOLOR2 = 3811;
+ {$EXTERNALSYM TMT_GRADIENTCOLOR2}
+ TMT_GRADIENTCOLOR3 = 3812;
+ {$EXTERNALSYM TMT_GRADIENTCOLOR3}
+ TMT_GRADIENTCOLOR4 = 3813;
+ {$EXTERNALSYM TMT_GRADIENTCOLOR4}
+ TMT_GRADIENTCOLOR5 = 3814;
+ {$EXTERNALSYM TMT_GRADIENTCOLOR5}
+ TMT_SHADOWCOLOR = 3815;
+ {$EXTERNALSYM TMT_SHADOWCOLOR}
+ TMT_GLOWCOLOR = 3816;
+ {$EXTERNALSYM TMT_GLOWCOLOR}
+ TMT_TEXTBORDERCOLOR = 3817;
+ {$EXTERNALSYM TMT_TEXTBORDERCOLOR}
+ TMT_TEXTSHADOWCOLOR = 3818;
+ {$EXTERNALSYM TMT_TEXTSHADOWCOLOR}
+ TMT_GLYPHTEXTCOLOR = 3819;
+ {$EXTERNALSYM TMT_GLYPHTEXTCOLOR}
+ TMT_GLYPHTRANSPARENTCOLOR = 3820;
+ {$EXTERNALSYM TMT_GLYPHTRANSPARENTCOLOR}
+ TMT_FILLCOLORHINT = 3821;
+ {$EXTERNALSYM TMT_FILLCOLORHINT}
+ TMT_BORDERCOLORHINT = 3822;
+ {$EXTERNALSYM TMT_BORDERCOLORHINT}
+ TMT_ACCENTCOLORHINT = 3823;
+ {$EXTERNALSYM TMT_ACCENTCOLORHINT}
+
+ //---- rendering enum properties (must be declared in TM_ENUM section above) ----
+
+ TMT_BGTYPE = 4001;
+ {$EXTERNALSYM TMT_BGTYPE}
+ TMT_BORDERTYPE = 4002;
+ {$EXTERNALSYM TMT_BORDERTYPE}
+ TMT_FILLTYPE = 4003;
+ {$EXTERNALSYM TMT_FILLTYPE}
+ TMT_SIZINGTYPE = 4004;
+ {$EXTERNALSYM TMT_SIZINGTYPE}
+ TMT_HALIGN = 4005;
+ {$EXTERNALSYM TMT_HALIGN}
+ TMT_CONTENTALIGNMENT = 4006;
+ {$EXTERNALSYM TMT_CONTENTALIGNMENT}
+ TMT_VALIGN = 4007;
+ {$EXTERNALSYM TMT_VALIGN}
+ TMT_OFFSETTYPE = 4008;
+ {$EXTERNALSYM TMT_OFFSETTYPE}
+ TMT_ICONEFFECT = 4009;
+ {$EXTERNALSYM TMT_ICONEFFECT}
+ TMT_TEXTSHADOWTYPE = 4010;
+ {$EXTERNALSYM TMT_TEXTSHADOWTYPE}
+ TMT_IMAGELAYOUT = 4011;
+ {$EXTERNALSYM TMT_IMAGELAYOUT}
+ TMT_GLYPHTYPE = 4012;
+ {$EXTERNALSYM TMT_GLYPHTYPE}
+ TMT_IMAGESELECTTYPE = 4013;
+ {$EXTERNALSYM TMT_IMAGESELECTTYPE}
+ TMT_GLYPHFONTSIZINGTYPE = 4014;
+ {$EXTERNALSYM TMT_GLYPHFONTSIZINGTYPE}
+ TMT_TRUESIZESCALINGTYPE = 4015;
+ {$EXTERNALSYM TMT_TRUESIZESCALINGTYPE}
+
+ //---- custom properties (used only by controls/shell) ----
+
+ TMT_USERPICTURE = 5001;
+ {$EXTERNALSYM TMT_USERPICTURE}
+ TMT_DEFAULTPANESIZE = 5002;
+ {$EXTERNALSYM TMT_DEFAULTPANESIZE}
+ TMT_BLENDCOLOR = 5003;
+ {$EXTERNALSYM TMT_BLENDCOLOR}
+
+//---------------------------------------------------------------------------------------
+// "Window" (i.e., non-client) Parts & States
+//
+// these cannot be renumbered (part of uxtheme API)
+//---------------------------------------------------------------------------------------
+
+type
+ WINDOWPARTS = DWORD;
+ {$EXTERNALSYM WINDOWPARTS}
+
+const
+ WINDOWPartFiller0 = 0;
+ {$EXTERNALSYM WINDOWPartFiller0}
+ WP_CAPTION = 1;
+ {$EXTERNALSYM WP_CAPTION}
+ WP_SMALLCAPTION = 2;
+ {$EXTERNALSYM WP_SMALLCAPTION}
+ WP_MINCAPTION = 3;
+ {$EXTERNALSYM WP_MINCAPTION}
+ WP_SMALLMINCAPTION = 4;
+ {$EXTERNALSYM WP_SMALLMINCAPTION}
+ WP_MAXCAPTION = 5;
+ {$EXTERNALSYM WP_MAXCAPTION}
+ WP_SMALLMAXCAPTION = 6;
+ {$EXTERNALSYM WP_SMALLMAXCAPTION}
+ WP_FRAMELEFT = 7;
+ {$EXTERNALSYM WP_FRAMELEFT}
+ WP_FRAMERIGHT = 8;
+ {$EXTERNALSYM WP_FRAMERIGHT}
+ WP_FRAMEBOTTOM = 9;
+ {$EXTERNALSYM WP_FRAMEBOTTOM}
+ WP_SMALLFRAMELEFT = 10;
+ {$EXTERNALSYM WP_SMALLFRAMELEFT}
+ WP_SMALLFRAMERIGHT = 11;
+ {$EXTERNALSYM WP_SMALLFRAMERIGHT}
+ WP_SMALLFRAMEBOTTOM = 12;
+ {$EXTERNALSYM WP_SMALLFRAMEBOTTOM}
+ WP_SYSBUTTON = 13;
+ {$EXTERNALSYM WP_SYSBUTTON}
+ WP_MDISYSBUTTON = 14;
+ {$EXTERNALSYM WP_MDISYSBUTTON}
+ WP_MINBUTTON = 15;
+ {$EXTERNALSYM WP_MINBUTTON}
+ WP_MDIMINBUTTON = 16;
+ {$EXTERNALSYM WP_MDIMINBUTTON}
+ WP_MAXBUTTON = 17;
+ {$EXTERNALSYM WP_MAXBUTTON}
+ WP_CLOSEBUTTON = 18;
+ {$EXTERNALSYM WP_CLOSEBUTTON}
+ WP_SMALLCLOSEBUTTON = 19;
+ {$EXTERNALSYM WP_SMALLCLOSEBUTTON}
+ WP_MDICLOSEBUTTON = 20;
+ {$EXTERNALSYM WP_MDICLOSEBUTTON}
+ WP_RESTOREBUTTON = 21;
+ {$EXTERNALSYM WP_RESTOREBUTTON}
+ WP_MDIRESTOREBUTTON = 22;
+ {$EXTERNALSYM WP_MDIRESTOREBUTTON}
+ WP_HELPBUTTON = 23;
+ {$EXTERNALSYM WP_HELPBUTTON}
+ WP_MDIHELPBUTTON = 24;
+ {$EXTERNALSYM WP_MDIHELPBUTTON}
+ WP_HORZSCROLL = 25;
+ {$EXTERNALSYM WP_HORZSCROLL}
+ WP_HORZTHUMB = 26;
+ {$EXTERNALSYM WP_HORZTHUMB}
+ WP_VERTSCROLL = 27;
+ {$EXTERNALSYM WP_VERTSCROLL}
+ WP_VERTTHUMB = 28;
+ {$EXTERNALSYM WP_VERTTHUMB}
+ WP_DIALOG = 29;
+ {$EXTERNALSYM WP_DIALOG}
+ WP_CAPTIONSIZINGTEMPLATE = 30;
+ {$EXTERNALSYM WP_CAPTIONSIZINGTEMPLATE}
+ WP_SMALLCAPTIONSIZINGTEMPLATE = 31;
+ {$EXTERNALSYM WP_SMALLCAPTIONSIZINGTEMPLATE}
+ WP_FRAMELEFTSIZINGTEMPLATE = 32;
+ {$EXTERNALSYM WP_FRAMELEFTSIZINGTEMPLATE}
+ WP_SMALLFRAMELEFTSIZINGTEMPLATE = 33;
+ {$EXTERNALSYM WP_SMALLFRAMELEFTSIZINGTEMPLATE}
+ WP_FRAMERIGHTSIZINGTEMPLATE = 34;
+ {$EXTERNALSYM WP_FRAMERIGHTSIZINGTEMPLATE}
+ WP_SMALLFRAMERIGHTSIZINGTEMPLATE = 35;
+ {$EXTERNALSYM WP_SMALLFRAMERIGHTSIZINGTEMPLATE}
+ WP_FRAMEBOTTOMSIZINGTEMPLATE = 36;
+ {$EXTERNALSYM WP_FRAMEBOTTOMSIZINGTEMPLATE}
+ WP_SMALLFRAMEBOTTOMSIZINGTEMPLATE = 37;
+ {$EXTERNALSYM WP_SMALLFRAMEBOTTOMSIZINGTEMPLATE}
+
+type
+ FRAMESTATES = DWORD;
+ {$EXTERNALSYM FRAMESTATES}
+
+const
+ FRAMEStateFiller0 = 0;
+ {$EXTERNALSYM FRAMEStateFiller0}
+ FS_ACTIVE = 1;
+ {$EXTERNALSYM FS_ACTIVE}
+ FS_INACTIVE = 2;
+ {$EXTERNALSYM FS_INACTIVE}
+
+type
+ CAPTIONSTATES = DWORD;
+ {$EXTERNALSYM CAPTIONSTATES}
+
+const
+ CAPTIONStateFiller0 = 0;
+ {$EXTERNALSYM CAPTIONStateFiller0}
+ CS_ACTIVE = 1;
+ {$EXTERNALSYM CS_ACTIVE}
+ CS_INACTIVE = 2;
+ {$EXTERNALSYM CS_INACTIVE}
+ CS_DISABLED = 3;
+ {$EXTERNALSYM CS_DISABLED}
+
+type
+ MAXCAPTIONSTATES = DWORD;
+ {$EXTERNALSYM MAXCAPTIONSTATES}
+
+const
+ MAXCAPTIONStateFiller0 = 0;
+ {$EXTERNALSYM MAXCAPTIONStateFiller0}
+ MXCS_ACTIVE = 1;
+ {$EXTERNALSYM MXCS_ACTIVE}
+ MXCS_INACTIVE = 2;
+ {$EXTERNALSYM MXCS_INACTIVE}
+ MXCS_DISABLED = 3;
+ {$EXTERNALSYM MXCS_DISABLED}
+
+type
+ MINCAPTIONSTATES = DWORD;
+ {$EXTERNALSYM MINCAPTIONSTATES}
+
+const
+ MINCAPTIONStateFiller0 = 0;
+ {$EXTERNALSYM MINCAPTIONStateFiller0}
+ MNCS_ACTIVE = 1;
+ {$EXTERNALSYM MNCS_ACTIVE}
+ MNCS_INACTIVE = 2;
+ {$EXTERNALSYM MNCS_INACTIVE}
+ MNCS_DISABLED = 3;
+ {$EXTERNALSYM MNCS_DISABLED}
+
+type
+ HORZSCROLLSTATES = DWORD;
+ {$EXTERNALSYM HORZSCROLLSTATES}
+
+const
+ HORZSCROLLStateFiller0 = 0;
+ {$EXTERNALSYM HORZSCROLLStateFiller0}
+ HSS_NORMAL = 1;
+ {$EXTERNALSYM HSS_NORMAL}
+ HSS_HOT = 2;
+ {$EXTERNALSYM HSS_HOT}
+ HSS_PUSHED = 3;
+ {$EXTERNALSYM HSS_PUSHED}
+ HSS_DISABLED = 4;
+ {$EXTERNALSYM HSS_DISABLED}
+
+type
+ HORZTHUMBSTATES = DWORD;
+ {$EXTERNALSYM HORZTHUMBSTATES}
+
+const
+ HORZTHUMBStateFiller0 = 0;
+ {$EXTERNALSYM HORZTHUMBStateFiller0}
+ HTS_NORMAL = 1;
+ {$EXTERNALSYM HTS_NORMAL}
+ HTS_HOT = 2;
+ {$EXTERNALSYM HTS_HOT}
+ HTS_PUSHED = 3;
+ {$EXTERNALSYM HTS_PUSHED}
+ HTS_DISABLED = 4;
+ {$EXTERNALSYM HTS_DISABLED}
+
+type
+ VERTSCROLLSTATES = DWORD;
+ {$EXTERNALSYM VERTSCROLLSTATES}
+
+const
+ VERTSCROLLStateFiller0 = 0;
+ {$EXTERNALSYM VERTSCROLLStateFiller0}
+ VSS_NORMAL = 1;
+ {$EXTERNALSYM VSS_NORMAL}
+ VSS_HOT = 2;
+ {$EXTERNALSYM VSS_HOT}
+ VSS_PUSHED = 3;
+ {$EXTERNALSYM VSS_PUSHED}
+ VSS_DISABLED = 4;
+ {$EXTERNALSYM VSS_DISABLED}
+
+type
+ VERTTHUMBSTATES = DWORD;
+ {$EXTERNALSYM VERTTHUMBSTATES}
+
+const
+ VERTTHUMBStateFiller0 = 0;
+ {$EXTERNALSYM VERTTHUMBStateFiller0}
+ VTS_NORMAL = 1;
+ {$EXTERNALSYM VTS_NORMAL}
+ VTS_HOT = 2;
+ {$EXTERNALSYM VTS_HOT}
+ VTS_PUSHED = 3;
+ {$EXTERNALSYM VTS_PUSHED}
+ VTS_DISABLED = 4;
+ {$EXTERNALSYM VTS_DISABLED}
+
+type
+ SYSBUTTONSTATES = DWORD;
+ {$EXTERNALSYM SYSBUTTONSTATES}
+
+const
+ SYSBUTTONStateFiller0 = 0;
+ {$EXTERNALSYM SYSBUTTONStateFiller0}
+ SBS_NORMAL = 1;
+ {$EXTERNALSYM SBS_NORMAL}
+ SBS_HOT = 2;
+ {$EXTERNALSYM SBS_HOT}
+ SBS_PUSHED = 3;
+ {$EXTERNALSYM SBS_PUSHED}
+ SBS_DISABLED = 4;
+ {$EXTERNALSYM SBS_DISABLED}
+
+type
+ MINBUTTONSTATES = DWORD;
+ {$EXTERNALSYM MINBUTTONSTATES}
+
+const
+ MINBUTTONStateFiller0 = 0;
+ {$EXTERNALSYM MINBUTTONStateFiller0}
+ MINBS_NORMAL = 1;
+ {$EXTERNALSYM MINBS_NORMAL}
+ MINBS_HOT = 2;
+ {$EXTERNALSYM MINBS_HOT}
+ MINBS_PUSHED = 3;
+ {$EXTERNALSYM MINBS_PUSHED}
+ MINBS_DISABLED = 4;
+ {$EXTERNALSYM MINBS_DISABLED}
+
+type
+ MAXBUTTONSTATES = DWORD;
+ {$EXTERNALSYM MAXBUTTONSTATES}
+
+const
+ MAXBUTTONStateFiller0 = 0;
+ {$EXTERNALSYM MAXBUTTONStateFiller0}
+ MAXBS_NORMAL = 1;
+ {$EXTERNALSYM MAXBS_NORMAL}
+ MAXBS_HOT = 2;
+ {$EXTERNALSYM MAXBS_HOT}
+ MAXBS_PUSHED = 3;
+ {$EXTERNALSYM MAXBS_PUSHED}
+ MAXBS_DISABLED = 4;
+ {$EXTERNALSYM MAXBS_DISABLED}
+
+type
+ RESTOREBUTTONSTATES = DWORD;
+ {$EXTERNALSYM RESTOREBUTTONSTATES}
+
+const
+ RESTOREBUTTONStateFiller0 = 0;
+ {$EXTERNALSYM RESTOREBUTTONStateFiller0}
+ RBS_NORMAL = 1;
+ {$EXTERNALSYM RBS_NORMAL}
+ RBS_HOT = 2;
+ {$EXTERNALSYM RBS_HOT}
+ RBS_PUSHED = 3;
+ {$EXTERNALSYM RBS_PUSHED}
+ RBS_DISABLED = 4;
+ {$EXTERNALSYM RBS_DISABLED}
+
+type
+ HELPBUTTONSTATES = DWORD;
+ {$EXTERNALSYM HELPBUTTONSTATES}
+
+const
+ HELPBUTTONStateFiller0 = 0;
+ {$EXTERNALSYM HELPBUTTONStateFiller0}
+ HBS_NORMAL = 1;
+ {$EXTERNALSYM HBS_NORMAL}
+ HBS_HOT = 2;
+ {$EXTERNALSYM HBS_HOT}
+ HBS_PUSHED = 3;
+ {$EXTERNALSYM HBS_PUSHED}
+ HBS_DISABLED = 4;
+ {$EXTERNALSYM HBS_DISABLED}
+
+type
+ CLOSEBUTTONSTATES = DWORD;
+ {$EXTERNALSYM CLOSEBUTTONSTATES}
+
+const
+ CLOSEBUTTONStateFiller0 = 0;
+ {$EXTERNALSYM CLOSEBUTTONStateFiller0}
+ CBS_NORMAL = 1;
+ {$EXTERNALSYM CBS_NORMAL}
+ CBS_HOT = 2;
+ {$EXTERNALSYM CBS_HOT}
+ CBS_PUSHED = 3;
+ {$EXTERNALSYM CBS_PUSHED}
+ CBS_DISABLED = 4;
+ {$EXTERNALSYM CBS_DISABLED}
+
+//---------------------------------------------------------------------------------------
+// "Button" Parts & States
+//---------------------------------------------------------------------------------------
+
+type
+ BUTTONPARTS = DWORD;
+ {$EXTERNALSYM BUTTONPARTS}
+
+const
+ BUTTONPartFiller0 = 0;
+ {$EXTERNALSYM BUTTONPartFiller0}
+ BP_PUSHBUTTON = 1;
+ {$EXTERNALSYM BP_PUSHBUTTON}
+ BP_RADIOBUTTON = 2;
+ {$EXTERNALSYM BP_RADIOBUTTON}
+ BP_CHECKBOX = 3;
+ {$EXTERNALSYM BP_CHECKBOX}
+ BP_GROUPBOX = 4;
+ {$EXTERNALSYM BP_GROUPBOX}
+ BP_USERBUTTON = 5;
+ {$EXTERNALSYM BP_USERBUTTON}
+
+type
+ PUSHBUTTONSTATES = DWORD;
+ {$EXTERNALSYM PUSHBUTTONSTATES}
+
+const
+ PUSHBUTTONStateFiller0 = 0;
+ {$EXTERNALSYM PUSHBUTTONStateFiller0}
+ PBS_NORMAL = 1;
+ {$EXTERNALSYM PBS_NORMAL}
+ PBS_HOT = 2;
+ {$EXTERNALSYM PBS_HOT}
+ PBS_PRESSED = 3;
+ {$EXTERNALSYM PBS_PRESSED}
+ PBS_DISABLED = 4;
+ {$EXTERNALSYM PBS_DISABLED}
+ PBS_DEFAULTED = 5;
+ {$EXTERNALSYM PBS_DEFAULTED}
+
+type
+ RADIOBUTTONSTATES = DWORD;
+ {$EXTERNALSYM RADIOBUTTONSTATES}
+
+const
+ RADIOBUTTONStateFiller0 = 0;
+ {$EXTERNALSYM RADIOBUTTONStateFiller0}
+ RBS_UNCHECKEDNORMAL = 1;
+ {$EXTERNALSYM RBS_UNCHECKEDNORMAL}
+ RBS_UNCHECKEDHOT = 2;
+ {$EXTERNALSYM RBS_UNCHECKEDHOT}
+ RBS_UNCHECKEDPRESSED = 3;
+ {$EXTERNALSYM RBS_UNCHECKEDPRESSED}
+ RBS_UNCHECKEDDISABLED = 4;
+ {$EXTERNALSYM RBS_UNCHECKEDDISABLED}
+ RBS_CHECKEDNORMAL = 5;
+ {$EXTERNALSYM RBS_CHECKEDNORMAL}
+ RBS_CHECKEDHOT = 6;
+ {$EXTERNALSYM RBS_CHECKEDHOT}
+ RBS_CHECKEDPRESSED = 7;
+ {$EXTERNALSYM RBS_CHECKEDPRESSED}
+ RBS_CHECKEDDISABLED = 8;
+ {$EXTERNALSYM RBS_CHECKEDDISABLED}
+
+type
+ CHECKBOXSTATES = DWORD;
+ {$EXTERNALSYM CHECKBOXSTATES}
+
+const
+ CHECKBOXStateFiller0 = 0;
+ {$EXTERNALSYM CHECKBOXStateFiller0}
+ CBS_UNCHECKEDNORMAL = 1;
+ {$EXTERNALSYM CBS_UNCHECKEDNORMAL}
+ CBS_UNCHECKEDHOT = 2;
+ {$EXTERNALSYM CBS_UNCHECKEDHOT}
+ CBS_UNCHECKEDPRESSED = 3;
+ {$EXTERNALSYM CBS_UNCHECKEDPRESSED}
+ CBS_UNCHECKEDDISABLED = 4;
+ {$EXTERNALSYM CBS_UNCHECKEDDISABLED}
+ CBS_CHECKEDNORMAL = 5;
+ {$EXTERNALSYM CBS_CHECKEDNORMAL}
+ CBS_CHECKEDHOT = 6;
+ {$EXTERNALSYM CBS_CHECKEDHOT}
+ CBS_CHECKEDPRESSED = 7;
+ {$EXTERNALSYM CBS_CHECKEDPRESSED}
+ CBS_CHECKEDDISABLED = 8;
+ {$EXTERNALSYM CBS_CHECKEDDISABLED}
+ CBS_MIXEDNORMAL = 9;
+ {$EXTERNALSYM CBS_MIXEDNORMAL}
+ CBS_MIXEDHOT = 10;
+ {$EXTERNALSYM CBS_MIXEDHOT}
+ CBS_MIXEDPRESSED = 11;
+ {$EXTERNALSYM CBS_MIXEDPRESSED}
+ CBS_MIXEDDISABLED = 12;
+ {$EXTERNALSYM CBS_MIXEDDISABLED}
+
+type
+ GROUPBOXSTATES = DWORD;
+ {$EXTERNALSYM GROUPBOXSTATES}
+
+const
+ GROUPBOXStateFiller0 = 0;
+ {$EXTERNALSYM GROUPBOXStateFiller0}
+ GBS_NORMAL = 1;
+ {$EXTERNALSYM GBS_NORMAL}
+ GBS_DISABLED = 2;
+ {$EXTERNALSYM GBS_DISABLED}
+
+//---------------------------------------------------------------------------------------
+// "Rebar" Parts & States
+//---------------------------------------------------------------------------------------
+
+type
+ REBARPARTS = DWORD;
+ {$EXTERNALSYM REBARPARTS}
+
+const
+ REBARPartFiller0 = 0;
+ {$EXTERNALSYM REBARPartFiller0}
+ RP_GRIPPER = 1;
+ {$EXTERNALSYM RP_GRIPPER}
+ RP_GRIPPERVERT = 2;
+ {$EXTERNALSYM RP_GRIPPERVERT}
+ RP_BAND = 3;
+ {$EXTERNALSYM RP_BAND}
+ RP_CHEVRON = 4;
+ {$EXTERNALSYM RP_CHEVRON}
+ RP_CHEVRONVERT = 5;
+ {$EXTERNALSYM RP_CHEVRONVERT}
+
+type
+ CHEVRONSTATES = DWORD;
+ {$EXTERNALSYM CHEVRONSTATES}
+
+const
+ CHEVRONStateFiller0 = 0;
+ {$EXTERNALSYM CHEVRONStateFiller0}
+ CHEVS_NORMAL = 1;
+ {$EXTERNALSYM CHEVS_NORMAL}
+ CHEVS_HOT = 2;
+ {$EXTERNALSYM CHEVS_HOT}
+ CHEVS_PRESSED = 3;
+ {$EXTERNALSYM CHEVS_PRESSED}
+
+//---------------------------------------------------------------------------------------
+// "Toolbar" Parts & States
+//---------------------------------------------------------------------------------------
+
+type
+ TOOLBARPARTS = DWORD;
+ {$EXTERNALSYM TOOLBARPARTS}
+
+const
+ TOOLBARPartFiller0 = 0;
+ {$EXTERNALSYM TOOLBARPartFiller0}
+ TP_BUTTON = 1;
+ {$EXTERNALSYM TP_BUTTON}
+ TP_DROPDOWNBUTTON = 2;
+ {$EXTERNALSYM TP_DROPDOWNBUTTON}
+ TP_SPLITBUTTON = 3;
+ {$EXTERNALSYM TP_SPLITBUTTON}
+ TP_SPLITBUTTONDROPDOWN = 4;
+ {$EXTERNALSYM TP_SPLITBUTTONDROPDOWN}
+ TP_SEPARATOR = 5;
+ {$EXTERNALSYM TP_SEPARATOR}
+ TP_SEPARATORVERT = 6;
+ {$EXTERNALSYM TP_SEPARATORVERT}
+
+type
+ TOOLBARSTATES = DWORD;
+ {$EXTERNALSYM TOOLBARSTATES}
+
+const
+ TOOLBARStateFiller0 = 0;
+ {$EXTERNALSYM TOOLBARStateFiller0}
+ TS_NORMAL = 1;
+ {$EXTERNALSYM TS_NORMAL}
+ TS_HOT = 2;
+ {$EXTERNALSYM TS_HOT}
+ TS_PRESSED = 3;
+ {$EXTERNALSYM TS_PRESSED}
+ TS_DISABLED = 4;
+ {$EXTERNALSYM TS_DISABLED}
+ TS_CHECKED = 5;
+ {$EXTERNALSYM TS_CHECKED}
+ TS_HOTCHECKED = 6;
+ {$EXTERNALSYM TS_HOTCHECKED}
+
+//---------------------------------------------------------------------------------------
+// "Status" Parts & States
+//---------------------------------------------------------------------------------------
+
+type
+ STATUSPARTS = DWORD;
+ {$EXTERNALSYM STATUSPARTS}
+
+const
+ STATUSPartFiller0 = 0;
+ {$EXTERNALSYM STATUSPartFiller0}
+ SP_PANE = 1;
+ {$EXTERNALSYM SP_PANE}
+ SP_GRIPPERPANE = 2;
+ {$EXTERNALSYM SP_GRIPPERPANE}
+ SP_GRIPPER = 3;
+ {$EXTERNALSYM SP_GRIPPER}
+
+//---------------------------------------------------------------------------------------
+// "Menu" Parts & States
+//---------------------------------------------------------------------------------------
+
+type
+ MENUPARTS = DWORD;
+ {$EXTERNALSYM MENUPARTS}
+
+const
+ MENUPartFiller0 = 0;
+ {$EXTERNALSYM MENUPartFiller0}
+ MP_MENUITEM = 1;
+ {$EXTERNALSYM MP_MENUITEM}
+ MP_MENUDROPDOWN = 2;
+ {$EXTERNALSYM MP_MENUDROPDOWN}
+ MP_MENUBARITEM = 3;
+ {$EXTERNALSYM MP_MENUBARITEM}
+ MP_MENUBARDROPDOWN = 4;
+ {$EXTERNALSYM MP_MENUBARDROPDOWN}
+ MP_CHEVRON = 5;
+ {$EXTERNALSYM MP_CHEVRON}
+ MP_SEPARATOR = 6;
+ {$EXTERNALSYM MP_SEPARATOR}
+
+type
+ MENUSTATES = DWORD;
+ {$EXTERNALSYM MENUSTATES}
+
+const
+ MENUStateFiller0 = 0;
+ {$EXTERNALSYM MENUStateFiller0}
+ MS_NORMAL = 1;
+ {$EXTERNALSYM MS_NORMAL}
+ MS_SELECTED = 2;
+ {$EXTERNALSYM MS_SELECTED}
+ MS_DEMOTED = 3;
+ {$EXTERNALSYM MS_DEMOTED}
+
+//---------------------------------------------------------------------------------------
+// "ListView" Parts & States
+//---------------------------------------------------------------------------------------
+
+type
+ LISTVIEWPARTS = DWORD;
+ {$EXTERNALSYM LISTVIEWPARTS}
+
+const
+ LISTVIEWPartFiller0 = 0;
+ {$EXTERNALSYM LISTVIEWPartFiller0}
+ LVP_LISTITEM = 1;
+ {$EXTERNALSYM LVP_LISTITEM}
+ LVP_LISTGROUP = 2;
+ {$EXTERNALSYM LVP_LISTGROUP}
+ LVP_LISTDETAIL = 3;
+ {$EXTERNALSYM LVP_LISTDETAIL}
+ LVP_LISTSORTEDDETAIL = 4;
+ {$EXTERNALSYM LVP_LISTSORTEDDETAIL}
+ LVP_EMPTYTEXT = 5;
+ {$EXTERNALSYM LVP_EMPTYTEXT}
+
+type
+ LISTITEMSTATES = DWORD;
+ {$EXTERNALSYM LISTITEMSTATES}
+
+const
+ LISTITEMStateFiller0 = 0;
+ {$EXTERNALSYM LISTITEMStateFiller0}
+ LIS_NORMAL = 1;
+ {$EXTERNALSYM LIS_NORMAL}
+ LIS_HOT = 2;
+ {$EXTERNALSYM LIS_HOT}
+ LIS_SELECTED = 3;
+ {$EXTERNALSYM LIS_SELECTED}
+ LIS_DISABLED = 4;
+ {$EXTERNALSYM LIS_DISABLED}
+ LIS_SELECTEDNOTFOCUS = 5;
+ {$EXTERNALSYM LIS_SELECTEDNOTFOCUS}
+
+//---------------------------------------------------------------------------------------
+// "Header" Parts & States
+//---------------------------------------------------------------------------------------
+
+type
+ HEADERPARTS = DWORD;
+ {$EXTERNALSYM HEADERPARTS}
+
+const
+ HEADERPartFiller0 = 0;
+ {$EXTERNALSYM HEADERPartFiller0}
+ HP_HEADERITEM = 1;
+ {$EXTERNALSYM HP_HEADERITEM}
+ HP_HEADERITEMLEFT = 2;
+ {$EXTERNALSYM HP_HEADERITEMLEFT}
+ HP_HEADERITEMRIGHT = 3;
+ {$EXTERNALSYM HP_HEADERITEMRIGHT}
+ HP_HEADERSORTARROW = 4;
+ {$EXTERNALSYM HP_HEADERSORTARROW}
+
+type
+ HEADERITEMSTATES = DWORD;
+ {$EXTERNALSYM HEADERITEMSTATES}
+
+const
+ HEADERITEMStateFiller0 = 0;
+ {$EXTERNALSYM HEADERITEMStateFiller0}
+ HIS_NORMAL = 1;
+ {$EXTERNALSYM HIS_NORMAL}
+ HIS_HOT = 2;
+ {$EXTERNALSYM HIS_HOT}
+ HIS_PRESSED = 3;
+ {$EXTERNALSYM HIS_PRESSED}
+
+type
+ HEADERITEMLEFTSTATES = DWORD;
+ {$EXTERNALSYM HEADERITEMLEFTSTATES}
+
+const
+ HEADERITEMLEFTStateFiller0 = 0;
+ {$EXTERNALSYM HEADERITEMLEFTStateFiller0}
+ HILS_NORMAL = 1;
+ {$EXTERNALSYM HILS_NORMAL}
+ HILS_HOT = 2;
+ {$EXTERNALSYM HILS_HOT}
+ HILS_PRESSED = 3;
+ {$EXTERNALSYM HILS_PRESSED}
+
+type
+ HEADERITEMRIGHTSTATES = DWORD;
+ {$EXTERNALSYM HEADERITEMRIGHTSTATES}
+
+const
+ HEADERITEMRIGHTStateFiller0 = 0;
+ {$EXTERNALSYM HEADERITEMRIGHTStateFiller0}
+ HIRS_NORMAL = 1;
+ {$EXTERNALSYM HIRS_NORMAL}
+ HIRS_HOT = 2;
+ {$EXTERNALSYM HIRS_HOT}
+ HIRS_PRESSED = 3;
+ {$EXTERNALSYM HIRS_PRESSED}
+
+type
+ HEADERSORTARROWSTATES = DWORD;
+ {$EXTERNALSYM HEADERSORTARROWSTATES}
+
+const
+ HEADERSORTARROWStateFiller0 = 0;
+ {$EXTERNALSYM HEADERSORTARROWStateFiller0}
+ HSAS_SORTEDUP = 1;
+ {$EXTERNALSYM HSAS_SORTEDUP}
+ HSAS_SORTEDDOWN = 2;
+ {$EXTERNALSYM HSAS_SORTEDDOWN}
+
+//---------------------------------------------------------------------------------------
+// "Progress" Parts & States
+//---------------------------------------------------------------------------------------
+
+type
+ PROGRESSPARTS = DWORD;
+ {$EXTERNALSYM PROGRESSPARTS}
+
+const
+ PROGRESSPartFiller0 = 0;
+ {$EXTERNALSYM PROGRESSPartFiller0}
+ PP_BAR = 1;
+ {$EXTERNALSYM PP_BAR}
+ PP_BARVERT = 2;
+ {$EXTERNALSYM PP_BARVERT}
+ PP_CHUNK = 3;
+ {$EXTERNALSYM PP_CHUNK}
+ PP_CHUNKVERT = 4;
+ {$EXTERNALSYM PP_CHUNKVERT}
+
+//---------------------------------------------------------------------------------------
+// "Tab" Parts & States
+//---------------------------------------------------------------------------------------
+
+type
+ TABPARTS = DWORD;
+ {$EXTERNALSYM TABPARTS}
+
+const
+ TABPartFiller0 = 0;
+ {$EXTERNALSYM TABPartFiller0}
+ TABP_TABITEM = 1;
+ {$EXTERNALSYM TABP_TABITEM}
+ TABP_TABITEMLEFTEDGE = 2;
+ {$EXTERNALSYM TABP_TABITEMLEFTEDGE}
+ TABP_TABITEMRIGHTEDGE = 3;
+ {$EXTERNALSYM TABP_TABITEMRIGHTEDGE}
+ TABP_TABITEMBOTHEDGE = 4;
+ {$EXTERNALSYM TABP_TABITEMBOTHEDGE}
+ TABP_TOPTABITEM = 5;
+ {$EXTERNALSYM TABP_TOPTABITEM}
+ TABP_TOPTABITEMLEFTEDGE = 6;
+ {$EXTERNALSYM TABP_TOPTABITEMLEFTEDGE}
+ TABP_TOPTABITEMRIGHTEDGE = 7;
+ {$EXTERNALSYM TABP_TOPTABITEMRIGHTEDGE}
+ TABP_TOPTABITEMBOTHEDGE = 8;
+ {$EXTERNALSYM TABP_TOPTABITEMBOTHEDGE}
+ TABP_PANE = 9;
+ {$EXTERNALSYM TABP_PANE}
+ TABP_BODY = 10;
+ {$EXTERNALSYM TABP_BODY}
+
+type
+ TABITEMSTATES = DWORD;
+ {$EXTERNALSYM TABITEMSTATES}
+
+const
+ TABITEMStateFiller0 = 0;
+ {$EXTERNALSYM TABITEMStateFiller0}
+ TIS_NORMAL = 1;
+ {$EXTERNALSYM TIS_NORMAL}
+ TIS_HOT = 2;
+ {$EXTERNALSYM TIS_HOT}
+ TIS_SELECTED = 3;
+ {$EXTERNALSYM TIS_SELECTED}
+ TIS_DISABLED = 4;
+ {$EXTERNALSYM TIS_DISABLED}
+ TIS_FOCUSED = 5;
+ {$EXTERNALSYM TIS_FOCUSED}
+
+type
+ TABITEMLEFTEDGESTATES = DWORD;
+ {$EXTERNALSYM TABITEMLEFTEDGESTATES}
+
+const
+ TABITEMLEFTEDGEStateFiller0 = 0;
+ {$EXTERNALSYM TABITEMLEFTEDGEStateFiller0}
+ TILES_NORMAL = 1;
+ {$EXTERNALSYM TILES_NORMAL}
+ TILES_HOT = 2;
+ {$EXTERNALSYM TILES_HOT}
+ TILES_SELECTED = 3;
+ {$EXTERNALSYM TILES_SELECTED}
+ TILES_DISABLED = 4;
+ {$EXTERNALSYM TILES_DISABLED}
+ TILES_FOCUSED = 5;
+ {$EXTERNALSYM TILES_FOCUSED}
+
+type
+ TABITEMRIGHTEDGESTATES = DWORD;
+ {$EXTERNALSYM TABITEMRIGHTEDGESTATES}
+
+const
+ TABITEMRIGHTEDGEStateFiller0 = 0;
+ {$EXTERNALSYM TABITEMRIGHTEDGEStateFiller0}
+ TIRES_NORMAL = 1;
+ {$EXTERNALSYM TIRES_NORMAL}
+ TIRES_HOT = 2;
+ {$EXTERNALSYM TIRES_HOT}
+ TIRES_SELECTED = 3;
+ {$EXTERNALSYM TIRES_SELECTED}
+ TIRES_DISABLED = 4;
+ {$EXTERNALSYM TIRES_DISABLED}
+ TIRES_FOCUSED = 5;
+ {$EXTERNALSYM TIRES_FOCUSED}
+
+type
+ TABITEMBOTHEDGESSTATES = DWORD;
+ {$EXTERNALSYM TABITEMBOTHEDGESSTATES}
+
+const
+ TABITEMBOTHEDGESStateFiller0 = 0;
+ {$EXTERNALSYM TABITEMBOTHEDGESStateFiller0}
+ TIBES_NORMAL = 1;
+ {$EXTERNALSYM TIBES_NORMAL}
+ TIBES_HOT = 2;
+ {$EXTERNALSYM TIBES_HOT}
+ TIBES_SELECTED = 3;
+ {$EXTERNALSYM TIBES_SELECTED}
+ TIBES_DISABLED = 4;
+ {$EXTERNALSYM TIBES_DISABLED}
+ TIBES_FOCUSED = 5;
+ {$EXTERNALSYM TIBES_FOCUSED}
+
+type
+ TOPTABITEMSTATES = DWORD;
+ {$EXTERNALSYM TOPTABITEMSTATES}
+
+const
+ TOPTABITEMStateFiller0 = 0;
+ {$EXTERNALSYM TOPTABITEMStateFiller0}
+ TTIS_NORMAL = 1;
+ {$EXTERNALSYM TTIS_NORMAL}
+ TTIS_HOT = 2;
+ {$EXTERNALSYM TTIS_HOT}
+ TTIS_SELECTED = 3;
+ {$EXTERNALSYM TTIS_SELECTED}
+ TTIS_DISABLED = 4;
+ {$EXTERNALSYM TTIS_DISABLED}
+ TTIS_FOCUSED = 5;
+ {$EXTERNALSYM TTIS_FOCUSED}
+
+type
+ TOPTABITEMLEFTEDGESTATES = DWORD;
+ {$EXTERNALSYM TOPTABITEMLEFTEDGESTATES}
+
+const
+ TOPTABITEMLEFTEDGEStateFiller0 = 0;
+ {$EXTERNALSYM TOPTABITEMLEFTEDGEStateFiller0}
+ TTILES_NORMAL = 1;
+ {$EXTERNALSYM TTILES_NORMAL}
+ TTILES_HOT = 2;
+ {$EXTERNALSYM TTILES_HOT}
+ TTILES_SELECTED = 3;
+ {$EXTERNALSYM TTILES_SELECTED}
+ TTILES_DISABLED = 4;
+ {$EXTERNALSYM TTILES_DISABLED}
+ TTILES_FOCUSED = 5;
+ {$EXTERNALSYM TTILES_FOCUSED}
+
+type
+ TOPTABITEMRIGHTEDGESTATES = DWORD;
+ {$EXTERNALSYM TOPTABITEMRIGHTEDGESTATES}
+
+const
+ TOPTABITEMRIGHTEDGEStateFiller0 = 0;
+ {$EXTERNALSYM TOPTABITEMRIGHTEDGEStateFiller0}
+ TTIRES_NORMAL = 1;
+ {$EXTERNALSYM TTIRES_NORMAL}
+ TTIRES_HOT = 2;
+ {$EXTERNALSYM TTIRES_HOT}
+ TTIRES_SELECTED = 3;
+ {$EXTERNALSYM TTIRES_SELECTED}
+ TTIRES_DISABLED = 4;
+ {$EXTERNALSYM TTIRES_DISABLED}
+ TTIRES_FOCUSED = 5;
+ {$EXTERNALSYM TTIRES_FOCUSED}
+
+type
+ TOPTABITEMBOTHEDGESSTATES = DWORD;
+ {$EXTERNALSYM TOPTABITEMBOTHEDGESSTATES}
+
+const
+ TOPTABITEMBOTHEDGESStateFiller0 = 0;
+ {$EXTERNALSYM TOPTABITEMBOTHEDGESStateFiller0}
+ TTIBES_NORMAL = 1;
+ {$EXTERNALSYM TTIBES_NORMAL}
+ TTIBES_HOT = 2;
+ {$EXTERNALSYM TTIBES_HOT}
+ TTIBES_SELECTED = 3;
+ {$EXTERNALSYM TTIBES_SELECTED}
+ TTIBES_DISABLED = 4;
+ {$EXTERNALSYM TTIBES_DISABLED}
+ TTIBES_FOCUSED = 5;
+ {$EXTERNALSYM TTIBES_FOCUSED}
+
+//---------------------------------------------------------------------------------------
+// "Trackbar" Parts & States
+//---------------------------------------------------------------------------------------
+
+type
+ TRACKBARPARTS = DWORD;
+ {$EXTERNALSYM TRACKBARPARTS}
+
+const
+ TRACKBARPartFiller0 = 0;
+ {$EXTERNALSYM TRACKBARPartFiller0}
+ TKP_TRACK = 1;
+ {$EXTERNALSYM TKP_TRACK}
+ TKP_TRACKVERT = 2;
+ {$EXTERNALSYM TKP_TRACKVERT}
+ TKP_THUMB = 3;
+ {$EXTERNALSYM TKP_THUMB}
+ TKP_THUMBBOTTOM = 4;
+ {$EXTERNALSYM TKP_THUMBBOTTOM}
+ TKP_THUMBTOP = 5;
+ {$EXTERNALSYM TKP_THUMBTOP}
+ TKP_THUMBVERT = 6;
+ {$EXTERNALSYM TKP_THUMBVERT}
+ TKP_THUMBLEFT = 7;
+ {$EXTERNALSYM TKP_THUMBLEFT}
+ TKP_THUMBRIGHT = 8;
+ {$EXTERNALSYM TKP_THUMBRIGHT}
+ TKP_TICS = 9;
+ {$EXTERNALSYM TKP_TICS}
+ TKP_TICSVERT = 10;
+ {$EXTERNALSYM TKP_TICSVERT}
+
+type
+ TRACKBARSTATES = DWORD;
+ {$EXTERNALSYM TRACKBARSTATES}
+
+const
+ TRACKBARStateFiller0 = 0;
+ {$EXTERNALSYM TRACKBARStateFiller0}
+ TKS_NORMAL = 1;
+ {$EXTERNALSYM TKS_NORMAL}
+
+type
+ TRACKSTATES = DWORD;
+ {$EXTERNALSYM TRACKSTATES}
+
+const
+ TRACKStateFiller0 = 0;
+ {$EXTERNALSYM TRACKStateFiller0}
+ TRS_NORMAL = 1;
+ {$EXTERNALSYM TRS_NORMAL}
+
+type
+ TRACKVERTSTATES = DWORD;
+ {$EXTERNALSYM TRACKVERTSTATES}
+
+const
+ TRACKVERTStateFiller0 = 0;
+ {$EXTERNALSYM TRACKVERTStateFiller0}
+ TRVS_NORMAL = 1;
+ {$EXTERNALSYM TRVS_NORMAL}
+
+type
+ THUMBSTATES = DWORD;
+ {$EXTERNALSYM THUMBSTATES}
+
+const
+ THUMBStateFiller0 = 0;
+ {$EXTERNALSYM THUMBStateFiller0}
+ TUS_NORMAL = 1;
+ {$EXTERNALSYM TUS_NORMAL}
+ TUS_HOT = 2;
+ {$EXTERNALSYM TUS_HOT}
+ TUS_PRESSED = 3;
+ {$EXTERNALSYM TUS_PRESSED}
+ TUS_FOCUSED = 4;
+ {$EXTERNALSYM TUS_FOCUSED}
+ TUS_DISABLED = 5;
+ {$EXTERNALSYM TUS_DISABLED}
+
+type
+ THUMBBOTTOMSTATES = DWORD;
+ {$EXTERNALSYM THUMBBOTTOMSTATES}
+
+const
+ THUMBBOTTOMStateFiller0 = 0;
+ {$EXTERNALSYM THUMBBOTTOMStateFiller0}
+ TUBS_NORMAL = 1;
+ {$EXTERNALSYM TUBS_NORMAL}
+ TUBS_HOT = 2;
+ {$EXTERNALSYM TUBS_HOT}
+ TUBS_PRESSED = 3;
+ {$EXTERNALSYM TUBS_PRESSED}
+ TUBS_FOCUSED = 4;
+ {$EXTERNALSYM TUBS_FOCUSED}
+ TUBS_DISABLED = 5;
+ {$EXTERNALSYM TUBS_DISABLED}
+
+type
+ THUMBTOPSTATES = DWORD;
+ {$EXTERNALSYM THUMBTOPSTATES}
+
+const
+ THUMBTOPStateFiller0 = 0;
+ {$EXTERNALSYM THUMBTOPStateFiller0}
+ TUTS_NORMAL = 1;
+ {$EXTERNALSYM TUTS_NORMAL}
+ TUTS_HOT = 2;
+ {$EXTERNALSYM TUTS_HOT}
+ TUTS_PRESSED = 3;
+ {$EXTERNALSYM TUTS_PRESSED}
+ TUTS_FOCUSED = 4;
+ {$EXTERNALSYM TUTS_FOCUSED}
+ TUTS_DISABLED = 5;
+ {$EXTERNALSYM TUTS_DISABLED}
+
+type
+ THUMBVERTSTATES = DWORD;
+ {$EXTERNALSYM THUMBVERTSTATES}
+
+const
+ THUMBVERTStateFiller0 = 0;
+ {$EXTERNALSYM THUMBVERTStateFiller0}
+ TUVS_NORMAL = 1;
+ {$EXTERNALSYM TUVS_NORMAL}
+ TUVS_HOT = 2;
+ {$EXTERNALSYM TUVS_HOT}
+ TUVS_PRESSED = 3;
+ {$EXTERNALSYM TUVS_PRESSED}
+ TUVS_FOCUSED = 4;
+ {$EXTERNALSYM TUVS_FOCUSED}
+ TUVS_DISABLED = 5;
+ {$EXTERNALSYM TUVS_DISABLED}
+
+type
+ THUMBLEFTSTATES = DWORD;
+ {$EXTERNALSYM THUMBLEFTSTATES}
+
+const
+ THUMBLEFTStateFiller0 = 0;
+ {$EXTERNALSYM THUMBLEFTStateFiller0}
+ TUVLS_NORMAL = 1;
+ {$EXTERNALSYM TUVLS_NORMAL}
+ TUVLS_HOT = 2;
+ {$EXTERNALSYM TUVLS_HOT}
+ TUVLS_PRESSED = 3;
+ {$EXTERNALSYM TUVLS_PRESSED}
+ TUVLS_FOCUSED = 4;
+ {$EXTERNALSYM TUVLS_FOCUSED}
+ TUVLS_DISABLED = 5;
+ {$EXTERNALSYM TUVLS_DISABLED}
+
+type
+ THUMBRIGHTSTATES = DWORD;
+ {$EXTERNALSYM THUMBRIGHTSTATES}
+
+const
+ THUMBRIGHTStateFiller0 = 0;
+ {$EXTERNALSYM THUMBRIGHTStateFiller0}
+ TUVRS_NORMAL = 1;
+ {$EXTERNALSYM TUVRS_NORMAL}
+ TUVRS_HOT = 2;
+ {$EXTERNALSYM TUVRS_HOT}
+ TUVRS_PRESSED = 3;
+ {$EXTERNALSYM TUVRS_PRESSED}
+ TUVRS_FOCUSED = 4;
+ {$EXTERNALSYM TUVRS_FOCUSED}
+ TUVRS_DISABLED = 5;
+ {$EXTERNALSYM TUVRS_DISABLED}
+
+type
+ TICSSTATES = DWORD;
+ {$EXTERNALSYM TICSSTATES}
+
+const
+ TICSStateFiller0 = 0;
+ {$EXTERNALSYM TICSStateFiller0}
+ TSS_NORMAL = 1;
+ {$EXTERNALSYM TSS_NORMAL}
+
+type
+ TICSVERTSTATES = DWORD;
+ {$EXTERNALSYM TICSVERTSTATES}
+
+const
+ TICSVERTStateFiller0 = 0;
+ {$EXTERNALSYM TICSVERTStateFiller0}
+ TSVS_NORMAL = 1;
+ {$EXTERNALSYM TSVS_NORMAL}
+
+//---------------------------------------------------------------------------------------
+// "Tooltips" Parts & States
+//---------------------------------------------------------------------------------------
+
+type
+ TOOLTIPPARTS = DWORD;
+ {$EXTERNALSYM TOOLTIPPARTS}
+
+const
+ TOOLTIPPartFiller0 = 0;
+ {$EXTERNALSYM TOOLTIPPartFiller0}
+ TTP_STANDARD = 1;
+ {$EXTERNALSYM TTP_STANDARD}
+ TTP_STANDARDTITLE = 2;
+ {$EXTERNALSYM TTP_STANDARDTITLE}
+ TTP_BALLOON = 3;
+ {$EXTERNALSYM TTP_BALLOON}
+ TTP_BALLOONTITLE = 4;
+ {$EXTERNALSYM TTP_BALLOONTITLE}
+ TTP_CLOSE = 5;
+ {$EXTERNALSYM TTP_CLOSE}
+
+type
+ CLOSESTATES = DWORD;
+ {$EXTERNALSYM CLOSESTATES}
+
+const
+ CLOSEStateFiller0 = 0;
+ {$EXTERNALSYM CLOSEStateFiller0}
+ TTCS_NORMAL = 1;
+ {$EXTERNALSYM TTCS_NORMAL}
+ TTCS_HOT = 2;
+ {$EXTERNALSYM TTCS_HOT}
+ TTCS_PRESSED = 3;
+ {$EXTERNALSYM TTCS_PRESSED}
+
+type
+ STANDARDSTATES = DWORD;
+ {$EXTERNALSYM STANDARDSTATES}
+
+const
+ STANDARDStateFiller0 = 0;
+ {$EXTERNALSYM STANDARDStateFiller0}
+ TTSS_NORMAL = 1;
+ {$EXTERNALSYM TTSS_NORMAL}
+ TTSS_LINK = 2;
+ {$EXTERNALSYM TTSS_LINK}
+
+type
+ BALLOONSTATES = DWORD;
+ {$EXTERNALSYM BALLOONSTATES}
+
+const
+ BALLOONStateFiller0 = 0;
+ {$EXTERNALSYM BALLOONStateFiller0}
+ TTBS_NORMAL = 1;
+ {$EXTERNALSYM TTBS_NORMAL}
+ TTBS_LINK = 2;
+ {$EXTERNALSYM TTBS_LINK}
+
+//---------------------------------------------------------------------------------------
+// "TreeView" Parts & States
+//---------------------------------------------------------------------------------------
+
+type
+ TREEVIEWPARTS = DWORD;
+ {$EXTERNALSYM TREEVIEWPARTS}
+
+const
+ TREEVIEWPartFiller0 = 0;
+ {$EXTERNALSYM TREEVIEWPartFiller0}
+ TVP_TREEITEM = 1;
+ {$EXTERNALSYM TVP_TREEITEM}
+ TVP_GLYPH = 2;
+ {$EXTERNALSYM TVP_GLYPH}
+ TVP_BRANCH = 3;
+ {$EXTERNALSYM TVP_BRANCH}
+
+type
+ TREEITEMSTATES = DWORD;
+ {$EXTERNALSYM TREEITEMSTATES}
+
+const
+ TREEITEMStateFiller0 = 0;
+ {$EXTERNALSYM TREEITEMStateFiller0}
+ TREIS_NORMAL = 1;
+ {$EXTERNALSYM TREIS_NORMAL}
+ TREIS_HOT = 2;
+ {$EXTERNALSYM TREIS_HOT}
+ TREIS_SELECTED = 3;
+ {$EXTERNALSYM TREIS_SELECTED}
+ TREIS_DISABLED = 4;
+ {$EXTERNALSYM TREIS_DISABLED}
+ TREIS_SELECTEDNOTFOCUS = 5;
+ {$EXTERNALSYM TREIS_SELECTEDNOTFOCUS}
+
+type
+ GLYPHSTATES = DWORD;
+ {$EXTERNALSYM GLYPHSTATES}
+
+const
+ GLYPHStateFiller0 = 0;
+ {$EXTERNALSYM GLYPHStateFiller0}
+ GLPS_CLOSED = 1;
+ {$EXTERNALSYM GLPS_CLOSED}
+ GLPS_OPENED = 2;
+ {$EXTERNALSYM GLPS_OPENED}
+
+//---------------------------------------------------------------------------------------
+// "Spin" Parts & States
+//---------------------------------------------------------------------------------------
+
+type
+ SPINPARTS = DWORD;
+ {$EXTERNALSYM SPINPARTS}
+
+const
+ SPINPartFiller0 = 0;
+ {$EXTERNALSYM SPINPartFiller0}
+ SPNP_UP = 1;
+ {$EXTERNALSYM SPNP_UP}
+ SPNP_DOWN = 2;
+ {$EXTERNALSYM SPNP_DOWN}
+ SPNP_UPHORZ = 3;
+ {$EXTERNALSYM SPNP_UPHORZ}
+ SPNP_DOWNHORZ = 4;
+ {$EXTERNALSYM SPNP_DOWNHORZ}
+
+type
+ UPSTATES = DWORD;
+ {$EXTERNALSYM UPSTATES}
+
+const
+ UPStateFiller0 = 0;
+ {$EXTERNALSYM UPStateFiller0}
+ UPS_NORMAL = 1;
+ {$EXTERNALSYM UPS_NORMAL}
+ UPS_HOT = 2;
+ {$EXTERNALSYM UPS_HOT}
+ UPS_PRESSED = 3;
+ {$EXTERNALSYM UPS_PRESSED}
+ UPS_DISABLED = 4;
+ {$EXTERNALSYM UPS_DISABLED}
+
+type
+ DOWNSTATES = DWORD;
+ {$EXTERNALSYM DOWNSTATES}
+
+const
+ DOWNStateFiller0 = 0;
+ {$EXTERNALSYM DOWNStateFiller0}
+ DNS_NORMAL = 1;
+ {$EXTERNALSYM DNS_NORMAL}
+ DNS_HOT = 2;
+ {$EXTERNALSYM DNS_HOT}
+ DNS_PRESSED = 3;
+ {$EXTERNALSYM DNS_PRESSED}
+ DNS_DISABLED = 4;
+ {$EXTERNALSYM DNS_DISABLED}
+
+type
+ UPHORZSTATES = DWORD;
+ {$EXTERNALSYM UPHORZSTATES}
+
+const
+ UPHORZStateFiller0 = 0;
+ {$EXTERNALSYM UPHORZStateFiller0}
+ UPHZS_NORMAL = 1;
+ {$EXTERNALSYM UPHZS_NORMAL}
+ UPHZS_HOT = 2;
+ {$EXTERNALSYM UPHZS_HOT}
+ UPHZS_PRESSED = 3;
+ {$EXTERNALSYM UPHZS_PRESSED}
+ UPHZS_DISABLED = 4;
+ {$EXTERNALSYM UPHZS_DISABLED}
+
+type
+ DOWNHORZSTATES = DWORD;
+ {$EXTERNALSYM DOWNHORZSTATES}
+
+const
+ DOWNHORZStateFiller0 = 0;
+ {$EXTERNALSYM DOWNHORZStateFiller0}
+ DNHZS_NORMAL = 1;
+ {$EXTERNALSYM DNHZS_NORMAL}
+ DNHZS_HOT = 2;
+ {$EXTERNALSYM DNHZS_HOT}
+ DNHZS_PRESSED = 3;
+ {$EXTERNALSYM DNHZS_PRESSED}
+ DNHZS_DISABLED = 4;
+ {$EXTERNALSYM DNHZS_DISABLED}
+
+//---------------------------------------------------------------------------------------
+// "Page" Parts & States
+//---------------------------------------------------------------------------------------
+
+type
+ PAGEPARTS = DWORD;
+ {$EXTERNALSYM PAGEPARTS}
+
+const
+ PAGEPartFiller0 = 0;
+ {$EXTERNALSYM PAGEPartFiller0}
+ PGRP_UP = 1;
+ {$EXTERNALSYM PGRP_UP}
+ PGRP_DOWN = 2;
+ {$EXTERNALSYM PGRP_DOWN}
+ PGRP_UPHORZ = 3;
+ {$EXTERNALSYM PGRP_UPHORZ}
+ PGRP_DOWNHORZ = 4;
+ {$EXTERNALSYM PGRP_DOWNHORZ}
+
+//--- Pager uses same states as Spin ---
+
+//---------------------------------------------------------------------------------------
+// "Scrollbar" Parts & States
+//---------------------------------------------------------------------------------------
+
+type
+ SCROLLBARPARTS = DWORD;
+ {$EXTERNALSYM SCROLLBARPARTS}
+
+const
+ SCROLLBARPartFiller0 = 0;
+ {$EXTERNALSYM SCROLLBARPartFiller0}
+ SBP_ARROWBTN = 1;
+ {$EXTERNALSYM SBP_ARROWBTN}
+ SBP_THUMBBTNHORZ = 2;
+ {$EXTERNALSYM SBP_THUMBBTNHORZ}
+ SBP_THUMBBTNVERT = 3;
+ {$EXTERNALSYM SBP_THUMBBTNVERT}
+ SBP_LOWERTRACKHORZ = 4;
+ {$EXTERNALSYM SBP_LOWERTRACKHORZ}
+ SBP_UPPERTRACKHORZ = 5;
+ {$EXTERNALSYM SBP_UPPERTRACKHORZ}
+ SBP_LOWERTRACKVERT = 6;
+ {$EXTERNALSYM SBP_LOWERTRACKVERT}
+ SBP_UPPERTRACKVERT = 7;
+ {$EXTERNALSYM SBP_UPPERTRACKVERT}
+ SBP_GRIPPERHORZ = 8;
+ {$EXTERNALSYM SBP_GRIPPERHORZ}
+ SBP_GRIPPERVERT = 9;
+ {$EXTERNALSYM SBP_GRIPPERVERT}
+ SBP_SIZEBOX = 10;
+ {$EXTERNALSYM SBP_SIZEBOX}
+
+type
+ ARROWBTNSTATES = DWORD;
+ {$EXTERNALSYM ARROWBTNSTATES}
+
+const
+ ARROWBTNStateFiller0 = 0;
+ {$EXTERNALSYM ARROWBTNStateFiller0}
+ ABS_UPNORMAL = 1;
+ {$EXTERNALSYM ABS_UPNORMAL}
+ ABS_UPHOT = 2;
+ {$EXTERNALSYM ABS_UPHOT}
+ ABS_UPPRESSED = 3;
+ {$EXTERNALSYM ABS_UPPRESSED}
+ ABS_UPDISABLED = 4;
+ {$EXTERNALSYM ABS_UPDISABLED}
+ ABS_DOWNNORMAL = 5;
+ {$EXTERNALSYM ABS_DOWNNORMAL}
+ ABS_DOWNHOT = 6;
+ {$EXTERNALSYM ABS_DOWNHOT}
+ ABS_DOWNPRESSED = 7;
+ {$EXTERNALSYM ABS_DOWNPRESSED}
+ ABS_DOWNDISABLED = 8;
+ {$EXTERNALSYM ABS_DOWNDISABLED}
+ ABS_LEFTNORMAL = 9;
+ {$EXTERNALSYM ABS_LEFTNORMAL}
+ ABS_LEFTHOT = 10;
+ {$EXTERNALSYM ABS_LEFTHOT}
+ ABS_LEFTPRESSED = 11;
+ {$EXTERNALSYM ABS_LEFTPRESSED}
+ ABS_LEFTDISABLED = 12;
+ {$EXTERNALSYM ABS_LEFTDISABLED}
+ ABS_RIGHTNORMAL = 13;
+ {$EXTERNALSYM ABS_RIGHTNORMAL}
+ ABS_RIGHTHOT = 14;
+ {$EXTERNALSYM ABS_RIGHTHOT}
+ ABS_RIGHTPRESSED = 15;
+ {$EXTERNALSYM ABS_RIGHTPRESSED}
+ ABS_RIGHTDISABLED = 16;
+ {$EXTERNALSYM ABS_RIGHTDISABLED}
+
+type
+ SCROLLBARSTATES = DWORD;
+ {$EXTERNALSYM SCROLLBARSTATES}
+
+const
+ SCROLLBARStateFiller0 = 0;
+ {$EXTERNALSYM SCROLLBARStateFiller0}
+ SCRBS_NORMAL = 1;
+ {$EXTERNALSYM SCRBS_NORMAL}
+ SCRBS_HOT = 2;
+ {$EXTERNALSYM SCRBS_HOT}
+ SCRBS_PRESSED = 3;
+ {$EXTERNALSYM SCRBS_PRESSED}
+ SCRBS_DISABLED = 4;
+ {$EXTERNALSYM SCRBS_DISABLED}
+
+type
+ SIZEBOXSTATES = DWORD;
+ {$EXTERNALSYM SIZEBOXSTATES}
+
+const
+ SIZEBOXStateFiller0 = 0;
+ {$EXTERNALSYM SIZEBOXStateFiller0}
+ SZB_RIGHTALIGN = 1;
+ {$EXTERNALSYM SZB_RIGHTALIGN}
+ SZB_LEFTALIGN = 2;
+ {$EXTERNALSYM SZB_LEFTALIGN}
+
+//---------------------------------------------------------------------------------------
+// "Edit" Parts & States
+//---------------------------------------------------------------------------------------
+
+type
+ EDITPARTS = DWORD;
+ {$EXTERNALSYM EDITPARTS}
+
+const
+ EDITPartFiller0 = 0;
+ {$EXTERNALSYM EDITPartFiller0}
+ EP_EDITTEXT = 1;
+ {$EXTERNALSYM EP_EDITTEXT}
+ EP_CARET = 2;
+ {$EXTERNALSYM EP_CARET}
+
+type
+ EDITTEXTSTATES = DWORD;
+ {$EXTERNALSYM EDITTEXTSTATES}
+
+const
+ EDITTEXTStateFiller0 = 0;
+ {$EXTERNALSYM EDITTEXTStateFiller0}
+ ETS_NORMAL = 1;
+ {$EXTERNALSYM ETS_NORMAL}
+ ETS_HOT = 2;
+ {$EXTERNALSYM ETS_HOT}
+ ETS_SELECTED = 3;
+ {$EXTERNALSYM ETS_SELECTED}
+ ETS_DISABLED = 4;
+ {$EXTERNALSYM ETS_DISABLED}
+ ETS_FOCUSED = 5;
+ {$EXTERNALSYM ETS_FOCUSED}
+ ETS_READONLY = 6;
+ {$EXTERNALSYM ETS_READONLY}
+ ETS_ASSIST = 7;
+ {$EXTERNALSYM ETS_ASSIST}
+
+//---------------------------------------------------------------------------------------
+// "ComboBox" Parts & States
+//---------------------------------------------------------------------------------------
+
+type
+ COMBOBOXPARTS = DWORD;
+ {$EXTERNALSYM COMBOBOXPARTS}
+
+const
+ COMBOBOXPartFiller0 = 0;
+ {$EXTERNALSYM COMBOBOXPartFiller0}
+ CP_DROPDOWNBUTTON = 1;
+ {$EXTERNALSYM CP_DROPDOWNBUTTON}
+
+type
+ COMBOBOXSTATES = DWORD;
+ {$EXTERNALSYM COMBOBOXSTATES}
+
+const
+ COMBOBOXStateFiller0 = 0;
+ {$EXTERNALSYM COMBOBOXStateFiller0}
+ CBXS_NORMAL = 1;
+ {$EXTERNALSYM CBXS_NORMAL}
+ CBXS_HOT = 2;
+ {$EXTERNALSYM CBXS_HOT}
+ CBXS_PRESSED = 3;
+ {$EXTERNALSYM CBXS_PRESSED}
+ CBXS_DISABLED = 4;
+ {$EXTERNALSYM CBXS_DISABLED}
+
+//---------------------------------------------------------------------------------------
+// "Taskbar Clock" Parts & States
+//---------------------------------------------------------------------------------------
+
+type
+ CLOCKPARTS = DWORD;
+ {$EXTERNALSYM CLOCKPARTS}
+
+const
+ CLOCKPartFiller0 = 0;
+ {$EXTERNALSYM CLOCKPartFiller0}
+ CLP_TIME = 1;
+ {$EXTERNALSYM CLP_TIME}
+
+type
+ CLOCKSTATES = DWORD;
+ {$EXTERNALSYM CLOCKSTATES}
+
+const
+ CLOCKStateFiller0 = 0;
+ {$EXTERNALSYM CLOCKStateFiller0}
+ CLS_NORMAL = 1;
+ {$EXTERNALSYM CLS_NORMAL}
+
+//---------------------------------------------------------------------------------------
+// "Tray Notify" Parts & States
+//---------------------------------------------------------------------------------------
+
+type
+ TRAYNOTIFYPARTS = DWORD;
+ {$EXTERNALSYM TRAYNOTIFYPARTS}
+
+const
+ TRAYNOTIFYPartFiller0 = 0;
+ {$EXTERNALSYM TRAYNOTIFYPartFiller0}
+ TNP_BACKGROUND = 1;
+ {$EXTERNALSYM TNP_BACKGROUND}
+ TNP_ANIMBACKGROUND = 2;
+ {$EXTERNALSYM TNP_ANIMBACKGROUND}
+
+//---------------------------------------------------------------------------------------
+// "TaskBar" Parts & States
+//---------------------------------------------------------------------------------------
+
+type
+ TASKBARPARTS = DWORD;
+ {$EXTERNALSYM TASKBARPARTS}
+
+const
+ TASKBARPartFiller0 = 0;
+ {$EXTERNALSYM TASKBARPartFiller0}
+ TBP_BACKGROUNDBOTTOM = 1;
+ {$EXTERNALSYM TBP_BACKGROUNDBOTTOM}
+ TBP_BACKGROUNDRIGHT = 2;
+ {$EXTERNALSYM TBP_BACKGROUNDRIGHT}
+ TBP_BACKGROUNDTOP = 3;
+ {$EXTERNALSYM TBP_BACKGROUNDTOP}
+ TBP_BACKGROUNDLEFT = 4;
+ {$EXTERNALSYM TBP_BACKGROUNDLEFT}
+ TBP_SIZINGBARBOTTOM = 5;
+ {$EXTERNALSYM TBP_SIZINGBARBOTTOM}
+ TBP_SIZINGBARRIGHT = 6;
+ {$EXTERNALSYM TBP_SIZINGBARRIGHT}
+ TBP_SIZINGBARTOP = 7;
+ {$EXTERNALSYM TBP_SIZINGBARTOP}
+ TBP_SIZINGBARLEFT = 8;
+ {$EXTERNALSYM TBP_SIZINGBARLEFT}
+
+//---------------------------------------------------------------------------------------
+// "TaskBand" Parts & States
+//---------------------------------------------------------------------------------------
+
+type
+ TASKBANDPARTS = DWORD;
+ {$EXTERNALSYM TASKBANDPARTS}
+
+const
+ TASKBANDPartFiller0 = 0;
+ {$EXTERNALSYM TASKBANDPartFiller0}
+ TDP_GROUPCOUNT = 1;
+ {$EXTERNALSYM TDP_GROUPCOUNT}
+ TDP_FLASHBUTTON = 2;
+ {$EXTERNALSYM TDP_FLASHBUTTON}
+ TDP_FLASHBUTTONGROUPMENU = 3;
+ {$EXTERNALSYM TDP_FLASHBUTTONGROUPMENU}
+
+//---------------------------------------------------------------------------------------
+// "StartPanel" Parts & States
+//---------------------------------------------------------------------------------------
+
+type
+ STARTPANELPARTS = DWORD;
+ {$EXTERNALSYM STARTPANELPARTS}
+
+const
+ STARTPANELPartFiller0 = 0;
+ {$EXTERNALSYM STARTPANELPartFiller0}
+ SPP_USERPANE = 1;
+ {$EXTERNALSYM SPP_USERPANE}
+ SPP_MOREPROGRAMS = 2;
+ {$EXTERNALSYM SPP_MOREPROGRAMS}
+ SPP_MOREPROGRAMSARROW = 3;
+ {$EXTERNALSYM SPP_MOREPROGRAMSARROW}
+ SPP_PROGLIST = 4;
+ {$EXTERNALSYM SPP_PROGLIST}
+ SPP_PROGLISTSEPARATOR = 5;
+ {$EXTERNALSYM SPP_PROGLISTSEPARATOR}
+ SPP_PLACESLIST = 6;
+ {$EXTERNALSYM SPP_PLACESLIST}
+ SPP_PLACESLISTSEPARATOR = 7;
+ {$EXTERNALSYM SPP_PLACESLISTSEPARATOR}
+ SPP_LOGOFF = 8;
+ {$EXTERNALSYM SPP_LOGOFF}
+ SPP_LOGOFFBUTTONS = 9;
+ {$EXTERNALSYM SPP_LOGOFFBUTTONS}
+ SPP_USERPICTURE = 10;
+ {$EXTERNALSYM SPP_USERPICTURE}
+ SPP_PREVIEW = 11;
+ {$EXTERNALSYM SPP_PREVIEW}
+
+type
+ MOREPROGRAMSARROWSTATES = DWORD;
+ {$EXTERNALSYM MOREPROGRAMSARROWSTATES}
+
+const
+ MOREPROGRAMSARROWStateFiller0 = 0;
+ {$EXTERNALSYM MOREPROGRAMSARROWStateFiller0}
+ SPS_NORMAL = 1;
+ {$EXTERNALSYM SPS_NORMAL}
+ SPS_HOT = 2;
+ {$EXTERNALSYM SPS_HOT}
+ SPS_PRESSED = 3;
+ {$EXTERNALSYM SPS_PRESSED}
+
+type
+ LOGOFFBUTTONSSTATES = DWORD;
+ {$EXTERNALSYM LOGOFFBUTTONSSTATES}
+
+const
+ LOGOFFBUTTONSStateFiller0 = 0;
+ {$EXTERNALSYM LOGOFFBUTTONSStateFiller0}
+ SPLS_NORMAL = 1;
+ {$EXTERNALSYM SPLS_NORMAL}
+ SPLS_HOT = 2;
+ {$EXTERNALSYM SPLS_HOT}
+ SPLS_PRESSED = 3;
+ {$EXTERNALSYM SPLS_PRESSED}
+
+//---------------------------------------------------------------------------------------
+// "ExplorerBar" Parts & States
+//---------------------------------------------------------------------------------------
+
+type
+ EXPLORERBARPARTS = DWORD;
+ {$EXTERNALSYM EXPLORERBARPARTS}
+
+const
+ EXPLORERBARPartFiller0 = 0;
+ {$EXTERNALSYM EXPLORERBARPartFiller0}
+ EBP_HEADERBACKGROUND = 1;
+ {$EXTERNALSYM EBP_HEADERBACKGROUND}
+ EBP_HEADERCLOSE = 2;
+ {$EXTERNALSYM EBP_HEADERCLOSE}
+ EBP_HEADERPIN = 3;
+ {$EXTERNALSYM EBP_HEADERPIN}
+ EBP_IEBARMENU = 4;
+ {$EXTERNALSYM EBP_IEBARMENU}
+ EBP_NORMALGROUPBACKGROUND = 5;
+ {$EXTERNALSYM EBP_NORMALGROUPBACKGROUND}
+ EBP_NORMALGROUPCOLLAPSE = 6;
+ {$EXTERNALSYM EBP_NORMALGROUPCOLLAPSE}
+ EBP_NORMALGROUPEXPAND = 7;
+ {$EXTERNALSYM EBP_NORMALGROUPEXPAND}
+ EBP_NORMALGROUPHEAD = 8;
+ {$EXTERNALSYM EBP_NORMALGROUPHEAD}
+ EBP_SPECIALGROUPBACKGROUND = 9;
+ {$EXTERNALSYM EBP_SPECIALGROUPBACKGROUND}
+ EBP_SPECIALGROUPCOLLAPSE = 10;
+ {$EXTERNALSYM EBP_SPECIALGROUPCOLLAPSE}
+ EBP_SPECIALGROUPEXPAND = 11;
+ {$EXTERNALSYM EBP_SPECIALGROUPEXPAND}
+ EBP_SPECIALGROUPHEAD = 12;
+ {$EXTERNALSYM EBP_SPECIALGROUPHEAD}
+
+type
+ HEADERCLOSESTATES = DWORD;
+ {$EXTERNALSYM HEADERCLOSESTATES}
+
+const
+ HEADERCLOSEStateFiller0 = 0;
+ {$EXTERNALSYM HEADERCLOSEStateFiller0}
+ EBHC_NORMAL = 1;
+ {$EXTERNALSYM EBHC_NORMAL}
+ EBHC_HOT = 2;
+ {$EXTERNALSYM EBHC_HOT}
+ EBHC_PRESSED = 3;
+ {$EXTERNALSYM EBHC_PRESSED}
+
+type
+ HEADERPINSTATES = DWORD;
+ {$EXTERNALSYM HEADERPINSTATES}
+
+const
+ HEADERPINStateFiller0 = 0;
+ {$EXTERNALSYM HEADERPINStateFiller0}
+ EBHP_NORMAL = 1;
+ {$EXTERNALSYM EBHP_NORMAL}
+ EBHP_HOT = 2;
+ {$EXTERNALSYM EBHP_HOT}
+ EBHP_PRESSED = 3;
+ {$EXTERNALSYM EBHP_PRESSED}
+ EBHP_SELECTEDNORMAL = 4;
+ {$EXTERNALSYM EBHP_SELECTEDNORMAL}
+ EBHP_SELECTEDHOT = 5;
+ {$EXTERNALSYM EBHP_SELECTEDHOT}
+ EBHP_SELECTEDPRESSED = 6;
+ {$EXTERNALSYM EBHP_SELECTEDPRESSED}
+
+type
+ IEBARMENUSTATES = DWORD;
+ {$EXTERNALSYM IEBARMENUSTATES}
+
+const
+ IEBARMENUStateFiller0 = 0;
+ {$EXTERNALSYM IEBARMENUStateFiller0}
+ EBM_NORMAL = 1;
+ {$EXTERNALSYM EBM_NORMAL}
+ EBM_HOT = 2;
+ {$EXTERNALSYM EBM_HOT}
+ EBM_PRESSED = 3;
+ {$EXTERNALSYM EBM_PRESSED}
+
+type
+ NORMALGROUPCOLLAPSESTATES = DWORD;
+ {$EXTERNALSYM NORMALGROUPCOLLAPSESTATES}
+
+const
+ NORMALGROUPCOLLAPSEStateFiller0 = 0;
+ {$EXTERNALSYM NORMALGROUPCOLLAPSEStateFiller0}
+ EBNGC_NORMAL = 1;
+ {$EXTERNALSYM EBNGC_NORMAL}
+ EBNGC_HOT = 2;
+ {$EXTERNALSYM EBNGC_HOT}
+ EBNGC_PRESSED = 3;
+ {$EXTERNALSYM EBNGC_PRESSED}
+
+type
+ NORMALGROUPEXPANDSTATES = DWORD;
+ {$EXTERNALSYM NORMALGROUPEXPANDSTATES}
+
+const
+ NORMALGROUPEXPANDStateFiller0 = 0;
+ {$EXTERNALSYM NORMALGROUPEXPANDStateFiller0}
+ EBNGE_NORMAL = 1;
+ {$EXTERNALSYM EBNGE_NORMAL}
+ EBNGE_HOT = 2;
+ {$EXTERNALSYM EBNGE_HOT}
+ EBNGE_PRESSED = 3;
+ {$EXTERNALSYM EBNGE_PRESSED}
+
+type
+ SPECIALGROUPCOLLAPSESTATES = DWORD;
+ {$EXTERNALSYM SPECIALGROUPCOLLAPSESTATES}
+
+const
+ SPECIALGROUPCOLLAPSEStateFiller0 = 0;
+ {$EXTERNALSYM SPECIALGROUPCOLLAPSEStateFiller0}
+ EBSGC_NORMAL = 1;
+ {$EXTERNALSYM EBSGC_NORMAL}
+ EBSGC_HOT = 2;
+ {$EXTERNALSYM EBSGC_HOT}
+ EBSGC_PRESSED = 3;
+ {$EXTERNALSYM EBSGC_PRESSED}
+
+type
+ SPECIALGROUPEXPANDSTATES = DWORD;
+ {$EXTERNALSYM SPECIALGROUPEXPANDSTATES}
+
+const
+ SPECIALGROUPEXPANDStateFiller0 = 0;
+ {$EXTERNALSYM SPECIALGROUPEXPANDStateFiller0}
+ EBSGE_NORMAL = 1;
+ {$EXTERNALSYM EBSGE_NORMAL}
+ EBSGE_HOT = 2;
+ {$EXTERNALSYM EBSGE_HOT}
+ EBSGE_PRESSED = 3;
+ {$EXTERNALSYM EBSGE_PRESSED}
+
+//---------------------------------------------------------------------------------------
+// "TaskBand" Parts & States
+//---------------------------------------------------------------------------------------
+
+type
+ MENUBANDPARTS = DWORD;
+ {$EXTERNALSYM MENUBANDPARTS}
+
+const
+ MENUBANDPartFiller0 = 0;
+ {$EXTERNALSYM MENUBANDPartFiller0}
+ MDP_NEWAPPBUTTON = 1;
+ {$EXTERNALSYM MDP_NEWAPPBUTTON}
+ MDP_SEPERATOR = 2;
+ {$EXTERNALSYM MDP_SEPERATOR}
+
+type
+ MENUBANDSTATES = DWORD;
+ {$EXTERNALSYM MENUBANDSTATES}
+
+const
+ MENUBANDStateFiller0 = 0;
+ {$EXTERNALSYM MENUBANDStateFiller0}
+ MDS_NORMAL = 1;
+ {$EXTERNALSYM MDS_NORMAL}
+ MDS_HOT = 2;
+ {$EXTERNALSYM MDS_HOT}
+ MDS_PRESSED = 3;
+ {$EXTERNALSYM MDS_PRESSED}
+ MDS_DISABLED = 4;
+ {$EXTERNALSYM MDS_DISABLED}
+ MDS_CHECKED = 5;
+ {$EXTERNALSYM MDS_CHECKED}
+ MDS_HOTCHECKED = 6;
+ {$EXTERNALSYM MDS_HOTCHECKED}
+
+implementation
+
+end.
diff --git a/packages/extra/winunits/jwatraffic.pas b/packages/extra/winunits/jwatraffic.pas
index 857cf6bea7..58b21ae142 100644
--- a/packages/extra/winunits/jwatraffic.pas
+++ b/packages/extra/winunits/jwatraffic.pas
@@ -1,897 +1,897 @@
-{******************************************************************************}
-{ }
-{ Traffic Control API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: traffic.h, released June 2000. The original Pascal }
-{ code is: Traffic.pas, released December 2000. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwatraffic.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaTraffic;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "traffic.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaWinType, JwaQos;
-
-//---------------------------------------------------------------------------
-//
-// Define's
-//
-
-const
- CURRENT_TCI_VERSION = $0002;
- {$EXTERNALSYM CURRENT_TCI_VERSION}
-
-//
-// Definitions of notification events. These may be passed
-// to the client's notification handler, to identify the
-// notification type
-//
-
-//
-// A TC interface has come up
-//
-
- TC_NOTIFY_IFC_UP = 1;
- {$EXTERNALSYM TC_NOTIFY_IFC_UP}
-
-//
-// A TC interface has come down
-//
-
- TC_NOTIFY_IFC_CLOSE = 2;
- {$EXTERNALSYM TC_NOTIFY_IFC_CLOSE}
-
-//
-// A change on a TC interface, typically a change in the
-// list of supported network addresses
-//
-
- TC_NOTIFY_IFC_CHANGE = 3;
- {$EXTERNALSYM TC_NOTIFY_IFC_CHANGE}
-
-//
-// A TC parameter has changed
-//
-
- TC_NOTIFY_PARAM_CHANGED = 4;
- {$EXTERNALSYM TC_NOTIFY_PARAM_CHANGED}
-
-//
-// A flow has been closed by the TC interface
-// for example: after a remote call close, or the whole interface
-// is going down
-//
-
- TC_NOTIFY_FLOW_CLOSE = 5;
- {$EXTERNALSYM TC_NOTIFY_FLOW_CLOSE}
-
- TC_INVALID_HANDLE = HANDLE(0);
- {$EXTERNALSYM TC_INVALID_HANDLE}
-
- MAX_STRING_LENGTH = 256;
- {$EXTERNALSYM MAX_STRING_LENGTH}
-
-//---------------------------------------------------------------------------
-//
-// Typedef's and structures
-//
-
-//
-// Handlers registered by the TCI client
-//
-
-type
- TCI_NOTIFY_HANDLER = procedure(ClRegCtx, ClIfcCtx: HANDLE; Event: ULONG;
- SubCode: HANDLE; BufSize: ULONG; Buffer: PVOID); stdcall;
- {$EXTERNALSYM TCI_NOTIFY_HANDLER}
- TTciNotifyHandler = TCI_NOTIFY_HANDLER;
-
- TCI_ADD_FLOW_COMPLETE_HANDLER = procedure(ClFlowCtx: HANDLE; Status: ULONG); stdcall;
- {$EXTERNALSYM TCI_ADD_FLOW_COMPLETE_HANDLER}
- TTciAddFlowCompleteHandler = TCI_ADD_FLOW_COMPLETE_HANDLER;
-
- TCI_MOD_FLOW_COMPLETE_HANDLER = procedure(ClFlowCtx: HANDLE; Status: ULONG); stdcall;
- {$EXTERNALSYM TCI_MOD_FLOW_COMPLETE_HANDLER}
- TTciModFlowCompleteHandler = TCI_MOD_FLOW_COMPLETE_HANDLER;
-
- TCI_DEL_FLOW_COMPLETE_HANDLER = procedure(ClFlowCtx: HANDLE; Status: ULONG); stdcall;
- {$EXTERNALSYM TCI_DEL_FLOW_COMPLETE_HANDLER}
- TTciDelFlowComlpeteHandler = TCI_DEL_FLOW_COMPLETE_HANDLER;
-
-type
- PTCI_CLIENT_FUNC_LIST = ^TCI_CLIENT_FUNC_LIST;
- {$EXTERNALSYM PTCI_CLIENT_FUNC_LIST}
- _TCI_CLIENT_FUNC_LIST = record
- ClNotifyHandler: TCI_NOTIFY_HANDLER;
- ClAddFlowCompleteHandler: TCI_ADD_FLOW_COMPLETE_HANDLER;
- ClModifyFlowCompleteHandler: TCI_MOD_FLOW_COMPLETE_HANDLER;
- ClDeleteFlowCompleteHandler: TCI_DEL_FLOW_COMPLETE_HANDLER;
- end;
- {$EXTERNALSYM _TCI_CLIENT_FUNC_LIST}
- TCI_CLIENT_FUNC_LIST = _TCI_CLIENT_FUNC_LIST;
- {$EXTERNALSYM TCI_CLIENT_FUNC_LIST}
- TTciClientFuncList = TCI_CLIENT_FUNC_LIST;
- PTciClientFuncList = PTCI_CLIENT_FUNC_LIST;
-
- // TODO NETWORD_ADDRESS and NETWORK_ADDRESS_LIST are from NtDDNdis.h
-
- _NETWORK_ADDRESS = record
- AddressLength: USHORT; // length in bytes of Address[] in this
- AddressType: USHORT; // type of this address (NDIS_PROTOCOL_ID_XXX above)
- Address: array [0..0] of UCHAR; // actually AddressLength bytes long
- end;
- NETWORK_ADDRESS = _NETWORK_ADDRESS;
- PNETWORK_ADDRESS = ^NETWORK_ADDRESS;
-
- _NETWORK_ADDRESS_LIST = record
- AddressCount: LONG; // number of addresses following
- AddressType: USHORT; // type of this address (NDIS_PROTOCOL_ID_XXX above)
- Address: array [0..0] of NETWORK_ADDRESS; // actually AddressCount elements long
- end;
- NETWORK_ADDRESS_LIST = _NETWORK_ADDRESS_LIST;
- PNETWORK_ADDRESS_LIST = ^NETWORK_ADDRESS_LIST;
-
-//
-// Network address descriptor
-//
-
- PADDRESS_LIST_DESCRIPTOR = ^ADDRESS_LIST_DESCRIPTOR;
- {$EXTERNALSYM PADDRESS_LIST_DESCRIPTOR}
- _ADDRESS_LIST_DESCRIPTOR = record
- MediaType: ULONG;
- AddressList: NETWORK_ADDRESS_LIST;
- end;
- {$EXTERNALSYM _ADDRESS_LIST_DESCRIPTOR}
- ADDRESS_LIST_DESCRIPTOR = _ADDRESS_LIST_DESCRIPTOR;
- {$EXTERNALSYM ADDRESS_LIST_DESCRIPTOR}
- TAddressListDescriptor = ADDRESS_LIST_DESCRIPTOR;
- PAddressListDescriptor = PADDRESS_LIST_DESCRIPTOR;
-
-//
-// An interface ID that is returned by the enumerator
-//
-
- PTC_IFC_DESCRIPTOR = ^TC_IFC_DESCRIPTOR;
- {$EXTERNALSYM PTC_IFC_DESCRIPTOR}
- _TC_IFC_DESCRIPTOR = record
- Length: ULONG;
- pInterfaceName: LPWSTR;
- pInterfaceID: LPWSTR;
- AddressListDesc: ADDRESS_LIST_DESCRIPTOR;
- end;
- {$EXTERNALSYM _TC_IFC_DESCRIPTOR}
- TC_IFC_DESCRIPTOR = _TC_IFC_DESCRIPTOR;
- {$EXTERNALSYM TC_IFC_DESCRIPTOR}
- TTcIfcDescriptor = TC_IFC_DESCRIPTOR;
- PTcIfcDescriptor = PTC_IFC_DESCRIPTOR;
-
-//
-// This structure is returned by a QoS data provider in reply to
-// GUID_QOS_SUPPORTED query or with an interface UP notification
-//
-
- PTC_SUPPORTED_INFO_BUFFER = ^TC_SUPPORTED_INFO_BUFFER;
- {$EXTERNALSYM PTC_SUPPORTED_INFO_BUFFER}
- _TC_SUPPORTED_INFO_BUFFER = record
- InstanceIDLength: USHORT;
- // device or interface ID
- InstanceID: array [0..MAX_STRING_LENGTH - 1] of WCHAR;
- // address list
- AddrListDesc: ADDRESS_LIST_DESCRIPTOR;
- end;
- {$EXTERNALSYM _TC_SUPPORTED_INFO_BUFFER}
- TC_SUPPORTED_INFO_BUFFER = _TC_SUPPORTED_INFO_BUFFER;
- {$EXTERNALSYM TC_SUPPORTED_INFO_BUFFER}
- TTcSupportedInfoBuffer = TC_SUPPORTED_INFO_BUFFER;
- PTcSupportedInfoBuffer = PTC_SUPPORTED_INFO_BUFFER;
-
-//
-// Filters are used to match packets. The Pattern field
-// indicates the values to which bits in corresponding
-// positions in candidate packets should be compared. The
-// Mask field indicates which bits are to be compared and
-// which bits are don't cares.
-//
-// Different filters can be submitted on the TCI interface.
-// The generic filter structure is defined to include an
-// AddressType, which indicates the specific type of filter to
-// follow.
-//
-
- PTC_GEN_FILTER = ^TC_GEN_FILTER;
- {$EXTERNALSYM PTC_GEN_FILTER}
- _TC_GEN_FILTER = record
- AddressType: USHORT; // IP, IPX, etc.
- PatternSize: ULONG; // byte count of the pattern
- Pattern: PVOID; // specific format, e.g. IP_PATTERN
- Mask: PVOID; // same type as Pattern
- end;
- {$EXTERNALSYM _TC_GEN_FILTER}
- TC_GEN_FILTER = _TC_GEN_FILTER;
- {$EXTERNALSYM TC_GEN_FILTER}
- TTcGenFilter = TC_GEN_FILTER;
- PTcGenFilter = PTC_GEN_FILTER;
-
-//
-// A generic flow includes two flowspecs and a freeform
-// buffer which contains flow specific TC objects.
-//
-
- PTC_GEN_FLOW = ^TC_GEN_FLOW;
- {$EXTERNALSYM PTC_GEN_FLOW}
- _TC_GEN_FLOW = record
- SendingFlowspec: FLOWSPEC;
- ReceivingFlowspec: FLOWSPEC;
- TcObjectsLength: ULONG; // number of optional bytes
- TcObjects: array [0..0] of QOS_OBJECT_HDR;
- end;
- {$EXTERNALSYM _TC_GEN_FLOW}
- TC_GEN_FLOW = _TC_GEN_FLOW;
- {$EXTERNALSYM TC_GEN_FLOW}
- TTcGenFlow = TC_GEN_FLOW;
- PTcGenFlow = PTC_GEN_FLOW;
-
-//
-// Format of specific pattern or mask used by GPC for the IP protocol
-//
-
- PIP_PATTERN = ^IP_PATTERN;
- {$EXTERNALSYM PIP_PATTERN}
- _IP_PATTERN = record
- Reserved1: ULONG;
- Reserved2: ULONG;
- SrcAddr: ULONG;
- DstAddr: ULONG;
- S_un: record
- case Integer of
- 0: (
- s_srcport: USHORT;
- s_dstport: USHORT);
- 1: (
- s_type: UCHAR;
- s_code: UCHAR;
- filler: USHORT);
- 2: (
- S_Spi: ULONG);
- end;
- ProtocolId: UCHAR;
- Reserved3: array [0..3 - 1] of UCHAR;
- end;
- {$EXTERNALSYM _IP_PATTERN}
- IP_PATTERN = _IP_PATTERN;
- {$EXTERNALSYM IP_PATTERN}
- TIpPattern = IP_PATTERN;
- PIpPattern = PIP_PATTERN;
-
-//
-// Format of specific pattern or mask used by GPC for the IPX protocol
-//
-
- TIpxPatternAddress = record
- NetworkAddress: ULONG;
- NodeAddress: array [0..5] of UCHAR;
- Socket: USHORT;
- end;
-
- PIPX_PATTERN = ^IPX_PATTERN;
- {$EXTERNALSYM PIPX_PATTERN}
- _IPX_PATTERN = record
- Src: TIpxPatternAddress;
- Dest: TIpxPatternAddress;
- end;
- {$EXTERNALSYM _IPX_PATTERN}
- IPX_PATTERN = _IPX_PATTERN;
- {$EXTERNALSYM IPX_PATTERN}
- TIpxPattern = IPX_PATTERN;
- PIpxPattern = PIPX_PATTERN;
-
-//
-// The enumeration buffer is the flow parameters + a list of filters
-//
-
- PENUMERATION_BUFFER = ^ENUMERATION_BUFFER;
- {$EXTERNALSYM PENUMERATION_BUFFER}
- _ENUMERATION_BUFFER = record
- Length: ULONG;
- OwnerProcessId: ULONG;
- FlowNameLength: USHORT;
- FlowName: array [0..MAX_STRING_LENGTH - 1] of WCHAR;
- pFlow: PTC_GEN_FLOW;
- NumberOfFilters: ULONG;
- GenericFilter: array [0..0] of TC_GEN_FILTER; // one for each filter
- end;
- {$EXTERNALSYM _ENUMERATION_BUFFER}
- ENUMERATION_BUFFER = _ENUMERATION_BUFFER;
- {$EXTERNALSYM ENUMERATION_BUFFER}
- TEnumerationBuffer = ENUMERATION_BUFFER;
- PEnumerationBuffer = PENUMERATION_BUFFER;
-
-//
-// QoS objects supported by traffic
-//
-
-const
- QOS_TRAFFIC_GENERAL_ID_BASE = 4000;
- {$EXTERNALSYM QOS_TRAFFIC_GENERAL_ID_BASE}
-
- QOS_OBJECT_DS_CLASS = $00000001 + QOS_TRAFFIC_GENERAL_ID_BASE;
- {$EXTERNALSYM QOS_OBJECT_DS_CLASS}
- QOS_OBJECT_TRAFFIC_CLASS = $00000002 + QOS_TRAFFIC_GENERAL_ID_BASE;
- {$EXTERNALSYM QOS_OBJECT_TRAFFIC_CLASS}
- QOS_OBJECT_DIFFSERV = $00000003 + QOS_TRAFFIC_GENERAL_ID_BASE;
- {$EXTERNALSYM QOS_OBJECT_DIFFSERV}
- QOS_OBJECT_TCP_TRAFFIC = $00000004 + QOS_TRAFFIC_GENERAL_ID_BASE;
- {$EXTERNALSYM QOS_OBJECT_TCP_TRAFFIC}
- QOS_OBJECT_FRIENDLY_NAME = $00000005 + QOS_TRAFFIC_GENERAL_ID_BASE;
- {$EXTERNALSYM QOS_OBJECT_FRIENDLY_NAME}
-
-//
-// This structure is used to associate a friendly name with the flow
-//
-
-type
- LPQOS_FRIENDLY_NAME = ^QOS_FRIENDLY_NAME;
- {$EXTERNALSYM LPQOS_FRIENDLY_NAME}
- _QOS_FRIENDLY_NAME = record
- ObjectHdr: QOS_OBJECT_HDR;
- FriendlyName: array [0..MAX_STRING_LENGTH - 1] of WCHAR;
- end;
- {$EXTERNALSYM _QOS_FRIENDLY_NAME}
- QOS_FRIENDLY_NAME = _QOS_FRIENDLY_NAME;
- {$EXTERNALSYM QOS_FRIENDLY_NAME}
- TQosFriendlyName = QOS_FRIENDLY_NAME;
- PQosFriendlyName = LPQOS_FRIENDLY_NAME;
-
-//
-// This structure may carry an 802.1 TrafficClass parameter which
-// has been provided to the host by a layer 2 network, for example,
-// in an 802.1 extended RSVP RESV message. If this object is obtained
-// from the network, hosts will stamp the MAC headers of corresponding
-// transmitted packets, with the value in the object. Otherwise, hosts
-// may select a value based on the standard Intserv mapping of
-// ServiceType to 802.1 TrafficClass.
-//
-//
-
- LPQOS_TRAFFIC_CLASS = ^QOS_TRAFFIC_CLASS;
- {$EXTERNALSYM LPQOS_TRAFFIC_CLASS}
- _QOS_TRAFFIC_CLASS = record
- ObjectHdr: QOS_OBJECT_HDR;
- TrafficClass: ULONG;
- end;
- {$EXTERNALSYM _QOS_TRAFFIC_CLASS}
- QOS_TRAFFIC_CLASS = _QOS_TRAFFIC_CLASS;
- {$EXTERNALSYM QOS_TRAFFIC_CLASS}
- TQosTrafficClass = QOS_TRAFFIC_CLASS;
- PQosTrafficClass = LPQOS_TRAFFIC_CLASS;
-
-//
-// This structure may carry an DSField parameter which has been provided to
-// the host by a layer 3 network, for example, in an extended RSVP RESV message.
-// If this object is obtained from the network, hosts will stamp the DS Field on the
-// IP header of transmitted packets, with the value in the object. Otherwise, hosts
-// may select a value based on the standard Intserv mapping of ServiceType to DS Field
-//
-
- LPQOS_DS_CLASS = ^QOS_DS_CLASS;
- {$EXTERNALSYM LPQOS_DS_CLASS}
- _QOS_DS_CLASS = record
- ObjectHdr: QOS_OBJECT_HDR;
- DSField: ULONG;
- end;
- {$EXTERNALSYM _QOS_DS_CLASS}
- QOS_DS_CLASS = _QOS_DS_CLASS;
- {$EXTERNALSYM QOS_DS_CLASS}
- TQosDsClass = QOS_DS_CLASS;
- PQosDsClass = LPQOS_DS_CLASS;
-
-//
-// This structure is used to create DiffServ Flows. This creates flows in the packet scheduler
-// and allows it to classify to packets based on a particular DS field. This structure takes
-// a variable length array of QOS_DIFFSERV_RULE, where each DS field is specified by a
-// QOS_DIFFSERV_RULE
-//
- LPQOS_DIFFSERV = ^QOS_DIFFSERV;
- {$EXTERNALSYM LPQOS_DIFFSERV}
- _QOS_DIFFSERV = record
- ObjectHdr: QOS_OBJECT_HDR;
- DSFieldCount: ULONG;
- DiffservRule: array [0..0] of UCHAR;
- end;
- {$EXTERNALSYM _QOS_DIFFSERV}
- QOS_DIFFSERV = _QOS_DIFFSERV;
- {$EXTERNALSYM QOS_DIFFSERV}
- TQosDiffserv = QOS_DIFFSERV;
- PQosDiffserv = LPQOS_DIFFSERV;
-
-//
-// The rule for a Diffserv DS codepoint.
-//
-
- LPQOS_DIFFSERV_RULE = ^QOS_DIFFSERV_RULE;
- {$EXTERNALSYM LPQOS_DIFFSERV_RULE}
- _QOS_DIFFSERV_RULE = record
- InboundDSField: UCHAR;
- ConformingOutboundDSField: UCHAR;
- NonConformingOutboundDSField: UCHAR;
- ConformingUserPriority: UCHAR;
- NonConformingUserPriority: UCHAR;
- end;
- {$EXTERNALSYM _QOS_DIFFSERV_RULE}
- QOS_DIFFSERV_RULE = _QOS_DIFFSERV_RULE;
- {$EXTERNALSYM QOS_DIFFSERV_RULE}
- TQosDiffservRule = QOS_DIFFSERV_RULE;
- PQosDiffservRule = LPQOS_DIFFSERV_RULE;
-
-//
-// This structure is passed to indicate that the IP Precedence and UserPriority mappings for the flow
-// have to be set to the system defaults for TCP traffic. If this object is passed,
-// the ServiceType ==> DSField mapping, ServiceType ==> UserPriorityMapping, QOS_OBJECT_DS_CLASS
-// and QOS_OBJECT_TRAFFIC_CLASS will be ignored.
-//
-
- LPQOS_TCP_TRAFFIC = ^QOS_TCP_TRAFFIC;
- {$EXTERNALSYM LPQOS_TCP_TRAFFIC}
- _QOS_TCP_TRAFFIC = record
- ObjectHdr: QOS_OBJECT_HDR;
- end;
- {$EXTERNALSYM _QOS_TCP_TRAFFIC}
- QOS_TCP_TRAFFIC = _QOS_TCP_TRAFFIC;
- {$EXTERNALSYM QOS_TCP_TRAFFIC}
- TQosTcpTraffic = QOS_TCP_TRAFFIC;
- PQosTcpTraffic = LPQOS_TCP_TRAFFIC;
-
-//---------------------------------------------------------------------------
-//
-// Interface Function Definitions
-//
-
-function TcRegisterClient(TciVersion: ULONG; ClRegCtx: HANDLE; const ClientHandlerList: TCI_CLIENT_FUNC_LIST; var pClientHandle: HANDLE): ULONG; stdcall;
-{$EXTERNALSYM TcRegisterClient}
-function TcEnumerateInterfaces(ClientHandle: HANDLE; var pBufferSize: ULONG; var InterfaceBuffer: TC_IFC_DESCRIPTOR): ULONG; stdcall;
-{$EXTERNALSYM TcEnumerateInterfaces}
-function TcOpenInterfaceA(pInterfaceName: LPSTR; ClientHandle, ClIfcCtx: HANDLE; var pIfcHandle: HANDLE): ULONG; stdcall;
-{$EXTERNALSYM TcOpenInterfaceA}
-function TcOpenInterfaceW(pInterfaceName: LPWSTR; ClientHandle, ClIfcCtx: HANDLE; var pIfcHandle: HANDLE): ULONG; stdcall;
-{$EXTERNALSYM TcOpenInterfaceW}
-function TcCloseInterface(IfcHandle: HANDLE): ULONG; stdcall;
-{$EXTERNALSYM TcCloseInterface}
-function TcQueryInterface(IfcHandle: HANDLE; const pGuidParam: GUID; NotifyChange: Longbool; var pBufferSize: ULONG; Buffer: PVOID): ULONG; stdcall;
-{$EXTERNALSYM TcQueryInterface}
-function TcSetInterface(IfcHandle: HANDLE; const pGuidParam: GUID; BufferSize: ULONG; Buffer: PVOID): ULONG; stdcall;
-{$EXTERNALSYM TcSetInterface}
-function TcQueryFlowA(pFlowName: LPSTR; const pGuidParam: GUID; var pBufferSize: ULONG; Buffer: PVOID): ULONG; stdcall;
-{$EXTERNALSYM TcQueryFlowA}
-function TcQueryFlowW(pFlowName: LPWSTR; const pGuidParam: GUID; var pBufferSize: ULONG; Buffer: PVOID): ULONG; stdcall;
-{$EXTERNALSYM TcQueryFlowW}
-function TcSetFlowA(pFlowName: LPSTR; const pGuidParam: GUID; BufferSize: GUID; Buffer: PVOID): ULONG; stdcall;
-{$EXTERNALSYM TcSetFlowA}
-function TcSetFlowW(pFlowName: LPWSTR; const pGuidParam: GUID; BufferSize: GUID; Buffer: PVOID): ULONG; stdcall;
-{$EXTERNALSYM TcSetFlowW}
-function TcAddFlow(IfcHandle, ClFlowCtx: HANDLE; Flags: ULONG; const pGenericFlow: TC_GEN_FLOW; var pFlowHandle: HANDLE): ULONG; stdcall;
-{$EXTERNALSYM TcAddFlow}
-function TcGetFlowNameA(FlowHandle: HANDLE; StrSize: ULONG; pFlowName: LPSTR): ULONG; stdcall;
-{$EXTERNALSYM TcGetFlowNameA}
-function TcGetFlowNameW(FlowHandle: HANDLE; StrSize: ULONG; pFlowName: LPWSTR): ULONG; stdcall;
-{$EXTERNALSYM TcGetFlowNameW}
-function TcModifyFlow(FlowHandle: HANDLE; const pGenericFlow: TC_GEN_FLOW): ULONG; stdcall;
-{$EXTERNALSYM TcModifyFlow}
-function TcAddFilter(FlowHandle: HANDLE; const pGenericFilter: TC_GEN_FILTER; var pFilterHandle: HANDLE): ULONG; stdcall;
-{$EXTERNALSYM TcAddFilter}
-function TcDeregisterClient(ClientHandle: HANDLE): ULONG; stdcall;
-{$EXTERNALSYM TcDeregisterClient}
-function TcDeleteFlow(FlowHandle: HANDLE): ULONG; stdcall;
-{$EXTERNALSYM TcDeleteFlow}
-function TcDeleteFilter(FilterHandle: HANDLE): ULONG; stdcall;
-{$EXTERNALSYM TcDeleteFilter}
-function TcEnumerateFlows(IfcHandle: HANDLE; var pEnumHandle: HANDLE; var pFlowCount, pBufSize: ULONG; var Buffer: ENUMERATION_BUFFER): ULONG; stdcall;
-{$EXTERNALSYM TcEnumerateFlows}
-
-function TcOpenInterface(pInterfaceName: LPTSTR; ClientHandle, ClIfcCtx: HANDLE; var pIfcHandle: HANDLE): ULONG; stdcall;
-{$EXTERNALSYM TcOpenInterface}
-function TcQueryFlow(pFlowName: LPTSTR; const pGuidParam: GUID; var pBufferSize: ULONG; Buffer: PVOID): ULONG; stdcall;
-{$EXTERNALSYM TcQueryFlow}
-function TcSetFlow(pFlowName: LPTSTR; const pGuidParam: GUID; BufferSize: GUID; Buffer: PVOID): ULONG; stdcall;
-{$EXTERNALSYM TcSetFlow}
-function TcGetFlowName(FlowHandle: HANDLE; StrSize: ULONG; pFlowName: LPTSTR): ULONG; stdcall;
-{$EXTERNALSYM TcGetFlowName}
-
-implementation
-
-const
- trafficlib = 'traffic.dll';
- {$IFDEF UNICODE}
- AWSuffix = 'W';
- {$ELSE}
- AWSuffix = 'A';
- {$ENDIF UNICODE}
-
-{$IFDEF DYNAMIC_LINK}
-
-var
- _TcRegisterClient: Pointer;
-
-function TcRegisterClient;
-begin
- GetProcedureAddress(_TcRegisterClient, trafficlib, 'TcRegisterClient');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_TcRegisterClient]
- end;
-end;
-
-var
- _TcEnumerateInterfaces: Pointer;
-
-function TcEnumerateInterfaces;
-begin
- GetProcedureAddress(_TcEnumerateInterfaces, trafficlib, 'TcEnumerateInterfaces');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_TcEnumerateInterfaces]
- end;
-end;
-
-var
- _TcOpenInterfaceA: Pointer;
-
-function TcOpenInterfaceA;
-begin
- GetProcedureAddress(_TcOpenInterfaceA, trafficlib, 'TcOpenInterfaceA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_TcOpenInterfaceA]
- end;
-end;
-
-var
- _TcOpenInterfaceW: Pointer;
-
-function TcOpenInterfaceW;
-begin
- GetProcedureAddress(_TcOpenInterfaceW, trafficlib, 'TcOpenInterfaceW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_TcOpenInterfaceW]
- end;
-end;
-
-var
- _TcCloseInterface: Pointer;
-
-function TcCloseInterface;
-begin
- GetProcedureAddress(_TcCloseInterface, trafficlib, 'TcCloseInterface');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_TcCloseInterface]
- end;
-end;
-
-var
- _TcQueryInterface: Pointer;
-
-function TcQueryInterface;
-begin
- GetProcedureAddress(_TcQueryInterface, trafficlib, 'TcQueryInterface');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_TcQueryInterface]
- end;
-end;
-
-var
- _TcSetInterface: Pointer;
-
-function TcSetInterface;
-begin
- GetProcedureAddress(_TcSetInterface, trafficlib, 'TcSetInterface');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_TcSetInterface]
- end;
-end;
-
-var
- _TcQueryFlowA: Pointer;
-
-function TcQueryFlowA;
-begin
- GetProcedureAddress(_TcQueryFlowA, trafficlib, 'TcQueryFlowA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_TcQueryFlowA]
- end;
-end;
-
-var
- _TcQueryFlowW: Pointer;
-
-function TcQueryFlowW;
-begin
- GetProcedureAddress(_TcQueryFlowW, trafficlib, 'TcQueryFlowW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_TcQueryFlowW]
- end;
-end;
-
-var
- _TcSetFlowA: Pointer;
-
-function TcSetFlowA;
-begin
- GetProcedureAddress(_TcSetFlowA, trafficlib, 'TcSetFlowA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_TcSetFlowA]
- end;
-end;
-
-var
- _TcSetFlowW: Pointer;
-
-function TcSetFlowW;
-begin
- GetProcedureAddress(_TcSetFlowW, trafficlib, 'TcSetFlowW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_TcSetFlowW]
- end;
-end;
-
-var
- _TcAddFlow: Pointer;
-
-function TcAddFlow;
-begin
- GetProcedureAddress(_TcAddFlow, trafficlib, 'TcAddFlow');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_TcAddFlow]
- end;
-end;
-
-var
- _TcGetFlowNameA: Pointer;
-
-function TcGetFlowNameA;
-begin
- GetProcedureAddress(_TcGetFlowNameA, trafficlib, 'TcGetFlowNameA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_TcGetFlowNameA]
- end;
-end;
-
-var
- _TcGetFlowNameW: Pointer;
-
-function TcGetFlowNameW;
-begin
- GetProcedureAddress(_TcGetFlowNameW, trafficlib, 'TcGetFlowNameW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_TcGetFlowNameW]
- end;
-end;
-
-var
- _TcModifyFlow: Pointer;
-
-function TcModifyFlow;
-begin
- GetProcedureAddress(_TcModifyFlow, trafficlib, 'TcModifyFlow');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_TcModifyFlow]
- end;
-end;
-
-var
- _TcAddFilter: Pointer;
-
-function TcAddFilter;
-begin
- GetProcedureAddress(_TcAddFilter, trafficlib, 'TcAddFilter');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_TcAddFilter]
- end;
-end;
-
-var
- _TcDeregisterClient: Pointer;
-
-function TcDeregisterClient;
-begin
- GetProcedureAddress(_TcDeregisterClient, trafficlib, 'TcDeregisterClient');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_TcDeregisterClient]
- end;
-end;
-
-var
- _TcDeleteFlow: Pointer;
-
-function TcDeleteFlow;
-begin
- GetProcedureAddress(_TcDeleteFlow, trafficlib, 'TcDeleteFlow');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_TcDeleteFlow]
- end;
-end;
-
-var
- _TcDeleteFilter: Pointer;
-
-function TcDeleteFilter;
-begin
- GetProcedureAddress(_TcDeleteFilter, trafficlib, 'TcDeleteFilter');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_TcDeleteFilter]
- end;
-end;
-
-var
- _TcEnumerateFlows: Pointer;
-
-function TcEnumerateFlows;
-begin
- GetProcedureAddress(_TcEnumerateFlows, trafficlib, 'TcEnumerateFlows');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_TcEnumerateFlows]
- end;
-end;
-
-var
- _TcOpenInterface: Pointer;
-
-function TcOpenInterface;
-begin
- GetProcedureAddress(_TcOpenInterface, trafficlib, 'TcOpenInterface' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_TcOpenInterface]
- end;
-end;
-
-var
- _TcQueryFlow: Pointer;
-
-function TcQueryFlow;
-begin
- GetProcedureAddress(_TcQueryFlow, trafficlib, 'TcQueryFlow' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_TcQueryFlow]
- end;
-end;
-
-var
- _TcSetFlow: Pointer;
-
-function TcSetFlow;
-begin
- GetProcedureAddress(_TcSetFlow, trafficlib, 'TcSetFlow' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_TcSetFlow]
- end;
-end;
-
-var
- _TcGetFlowName: Pointer;
-
-function TcGetFlowName;
-begin
- GetProcedureAddress(_TcGetFlowName, trafficlib, 'TcGetFlowName' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_TcGetFlowName]
- end;
-end;
-
-{$ELSE}
-
-function TcRegisterClient; external trafficlib name 'TcRegisterClient';
-function TcEnumerateInterfaces; external trafficlib name 'TcEnumerateInterfaces';
-function TcOpenInterfaceA; external trafficlib name 'TcOpenInterfaceA';
-function TcOpenInterfaceW; external trafficlib name 'TcOpenInterfaceW';
-function TcCloseInterface; external trafficlib name 'TcCloseInterface';
-function TcQueryInterface; external trafficlib name 'TcQueryInterface';
-function TcSetInterface; external trafficlib name 'TcSetInterface';
-function TcQueryFlowA; external trafficlib name 'TcQueryFlowA';
-function TcQueryFlowW; external trafficlib name 'TcQueryFlowW';
-function TcSetFlowA; external trafficlib name 'TcSetFlowA';
-function TcSetFlowW; external trafficlib name 'TcSetFlowW';
-function TcAddFlow; external trafficlib name 'TcAddFlow';
-function TcGetFlowNameA; external trafficlib name 'TcGetFlowNameA';
-function TcGetFlowNameW; external trafficlib name 'TcGetFlowNameW';
-function TcModifyFlow; external trafficlib name 'TcModifyFlow';
-function TcAddFilter; external trafficlib name 'TcAddFilter';
-function TcDeregisterClient; external trafficlib name 'TcDeregisterClient';
-function TcDeleteFlow; external trafficlib name 'TcDeleteFlow';
-function TcDeleteFilter; external trafficlib name 'TcDeleteFilter';
-function TcEnumerateFlows; external trafficlib name 'TcEnumerateFlows';
-function TcOpenInterface; external trafficlib name 'TcOpenInterface' + AWSuffix;
-function TcQueryFlow; external trafficlib name 'TcQueryFlow' + AWSuffix;
-function TcSetFlow; external trafficlib name 'TcSetFlow' + AWSuffix;
-function TcGetFlowName; external trafficlib name 'TcGetFlowName' + AWSuffix;
-
-{$ENDIF DYNAMIC_LINK}
-
-end.
+{******************************************************************************}
+{ }
+{ Traffic Control API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: traffic.h, released June 2000. The original Pascal }
+{ code is: Traffic.pas, released December 2000. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwatraffic.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaTraffic;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "traffic.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaWinType, JwaQos;
+
+//---------------------------------------------------------------------------
+//
+// Define's
+//
+
+const
+ CURRENT_TCI_VERSION = $0002;
+ {$EXTERNALSYM CURRENT_TCI_VERSION}
+
+//
+// Definitions of notification events. These may be passed
+// to the client's notification handler, to identify the
+// notification type
+//
+
+//
+// A TC interface has come up
+//
+
+ TC_NOTIFY_IFC_UP = 1;
+ {$EXTERNALSYM TC_NOTIFY_IFC_UP}
+
+//
+// A TC interface has come down
+//
+
+ TC_NOTIFY_IFC_CLOSE = 2;
+ {$EXTERNALSYM TC_NOTIFY_IFC_CLOSE}
+
+//
+// A change on a TC interface, typically a change in the
+// list of supported network addresses
+//
+
+ TC_NOTIFY_IFC_CHANGE = 3;
+ {$EXTERNALSYM TC_NOTIFY_IFC_CHANGE}
+
+//
+// A TC parameter has changed
+//
+
+ TC_NOTIFY_PARAM_CHANGED = 4;
+ {$EXTERNALSYM TC_NOTIFY_PARAM_CHANGED}
+
+//
+// A flow has been closed by the TC interface
+// for example: after a remote call close, or the whole interface
+// is going down
+//
+
+ TC_NOTIFY_FLOW_CLOSE = 5;
+ {$EXTERNALSYM TC_NOTIFY_FLOW_CLOSE}
+
+ TC_INVALID_HANDLE = HANDLE(0);
+ {$EXTERNALSYM TC_INVALID_HANDLE}
+
+ MAX_STRING_LENGTH = 256;
+ {$EXTERNALSYM MAX_STRING_LENGTH}
+
+//---------------------------------------------------------------------------
+//
+// Typedef's and structures
+//
+
+//
+// Handlers registered by the TCI client
+//
+
+type
+ TCI_NOTIFY_HANDLER = procedure(ClRegCtx, ClIfcCtx: HANDLE; Event: ULONG;
+ SubCode: HANDLE; BufSize: ULONG; Buffer: PVOID); stdcall;
+ {$EXTERNALSYM TCI_NOTIFY_HANDLER}
+ TTciNotifyHandler = TCI_NOTIFY_HANDLER;
+
+ TCI_ADD_FLOW_COMPLETE_HANDLER = procedure(ClFlowCtx: HANDLE; Status: ULONG); stdcall;
+ {$EXTERNALSYM TCI_ADD_FLOW_COMPLETE_HANDLER}
+ TTciAddFlowCompleteHandler = TCI_ADD_FLOW_COMPLETE_HANDLER;
+
+ TCI_MOD_FLOW_COMPLETE_HANDLER = procedure(ClFlowCtx: HANDLE; Status: ULONG); stdcall;
+ {$EXTERNALSYM TCI_MOD_FLOW_COMPLETE_HANDLER}
+ TTciModFlowCompleteHandler = TCI_MOD_FLOW_COMPLETE_HANDLER;
+
+ TCI_DEL_FLOW_COMPLETE_HANDLER = procedure(ClFlowCtx: HANDLE; Status: ULONG); stdcall;
+ {$EXTERNALSYM TCI_DEL_FLOW_COMPLETE_HANDLER}
+ TTciDelFlowComlpeteHandler = TCI_DEL_FLOW_COMPLETE_HANDLER;
+
+type
+ PTCI_CLIENT_FUNC_LIST = ^TCI_CLIENT_FUNC_LIST;
+ {$EXTERNALSYM PTCI_CLIENT_FUNC_LIST}
+ _TCI_CLIENT_FUNC_LIST = record
+ ClNotifyHandler: TCI_NOTIFY_HANDLER;
+ ClAddFlowCompleteHandler: TCI_ADD_FLOW_COMPLETE_HANDLER;
+ ClModifyFlowCompleteHandler: TCI_MOD_FLOW_COMPLETE_HANDLER;
+ ClDeleteFlowCompleteHandler: TCI_DEL_FLOW_COMPLETE_HANDLER;
+ end;
+ {$EXTERNALSYM _TCI_CLIENT_FUNC_LIST}
+ TCI_CLIENT_FUNC_LIST = _TCI_CLIENT_FUNC_LIST;
+ {$EXTERNALSYM TCI_CLIENT_FUNC_LIST}
+ TTciClientFuncList = TCI_CLIENT_FUNC_LIST;
+ PTciClientFuncList = PTCI_CLIENT_FUNC_LIST;
+
+ // TODO NETWORD_ADDRESS and NETWORK_ADDRESS_LIST are from NtDDNdis.h
+
+ _NETWORK_ADDRESS = record
+ AddressLength: USHORT; // length in bytes of Address[] in this
+ AddressType: USHORT; // type of this address (NDIS_PROTOCOL_ID_XXX above)
+ Address: array [0..0] of UCHAR; // actually AddressLength bytes long
+ end;
+ NETWORK_ADDRESS = _NETWORK_ADDRESS;
+ PNETWORK_ADDRESS = ^NETWORK_ADDRESS;
+
+ _NETWORK_ADDRESS_LIST = record
+ AddressCount: LONG; // number of addresses following
+ AddressType: USHORT; // type of this address (NDIS_PROTOCOL_ID_XXX above)
+ Address: array [0..0] of NETWORK_ADDRESS; // actually AddressCount elements long
+ end;
+ NETWORK_ADDRESS_LIST = _NETWORK_ADDRESS_LIST;
+ PNETWORK_ADDRESS_LIST = ^NETWORK_ADDRESS_LIST;
+
+//
+// Network address descriptor
+//
+
+ PADDRESS_LIST_DESCRIPTOR = ^ADDRESS_LIST_DESCRIPTOR;
+ {$EXTERNALSYM PADDRESS_LIST_DESCRIPTOR}
+ _ADDRESS_LIST_DESCRIPTOR = record
+ MediaType: ULONG;
+ AddressList: NETWORK_ADDRESS_LIST;
+ end;
+ {$EXTERNALSYM _ADDRESS_LIST_DESCRIPTOR}
+ ADDRESS_LIST_DESCRIPTOR = _ADDRESS_LIST_DESCRIPTOR;
+ {$EXTERNALSYM ADDRESS_LIST_DESCRIPTOR}
+ TAddressListDescriptor = ADDRESS_LIST_DESCRIPTOR;
+ PAddressListDescriptor = PADDRESS_LIST_DESCRIPTOR;
+
+//
+// An interface ID that is returned by the enumerator
+//
+
+ PTC_IFC_DESCRIPTOR = ^TC_IFC_DESCRIPTOR;
+ {$EXTERNALSYM PTC_IFC_DESCRIPTOR}
+ _TC_IFC_DESCRIPTOR = record
+ Length: ULONG;
+ pInterfaceName: LPWSTR;
+ pInterfaceID: LPWSTR;
+ AddressListDesc: ADDRESS_LIST_DESCRIPTOR;
+ end;
+ {$EXTERNALSYM _TC_IFC_DESCRIPTOR}
+ TC_IFC_DESCRIPTOR = _TC_IFC_DESCRIPTOR;
+ {$EXTERNALSYM TC_IFC_DESCRIPTOR}
+ TTcIfcDescriptor = TC_IFC_DESCRIPTOR;
+ PTcIfcDescriptor = PTC_IFC_DESCRIPTOR;
+
+//
+// This structure is returned by a QoS data provider in reply to
+// GUID_QOS_SUPPORTED query or with an interface UP notification
+//
+
+ PTC_SUPPORTED_INFO_BUFFER = ^TC_SUPPORTED_INFO_BUFFER;
+ {$EXTERNALSYM PTC_SUPPORTED_INFO_BUFFER}
+ _TC_SUPPORTED_INFO_BUFFER = record
+ InstanceIDLength: USHORT;
+ // device or interface ID
+ InstanceID: array [0..MAX_STRING_LENGTH - 1] of WCHAR;
+ // address list
+ AddrListDesc: ADDRESS_LIST_DESCRIPTOR;
+ end;
+ {$EXTERNALSYM _TC_SUPPORTED_INFO_BUFFER}
+ TC_SUPPORTED_INFO_BUFFER = _TC_SUPPORTED_INFO_BUFFER;
+ {$EXTERNALSYM TC_SUPPORTED_INFO_BUFFER}
+ TTcSupportedInfoBuffer = TC_SUPPORTED_INFO_BUFFER;
+ PTcSupportedInfoBuffer = PTC_SUPPORTED_INFO_BUFFER;
+
+//
+// Filters are used to match packets. The Pattern field
+// indicates the values to which bits in corresponding
+// positions in candidate packets should be compared. The
+// Mask field indicates which bits are to be compared and
+// which bits are don't cares.
+//
+// Different filters can be submitted on the TCI interface.
+// The generic filter structure is defined to include an
+// AddressType, which indicates the specific type of filter to
+// follow.
+//
+
+ PTC_GEN_FILTER = ^TC_GEN_FILTER;
+ {$EXTERNALSYM PTC_GEN_FILTER}
+ _TC_GEN_FILTER = record
+ AddressType: USHORT; // IP, IPX, etc.
+ PatternSize: ULONG; // byte count of the pattern
+ Pattern: PVOID; // specific format, e.g. IP_PATTERN
+ Mask: PVOID; // same type as Pattern
+ end;
+ {$EXTERNALSYM _TC_GEN_FILTER}
+ TC_GEN_FILTER = _TC_GEN_FILTER;
+ {$EXTERNALSYM TC_GEN_FILTER}
+ TTcGenFilter = TC_GEN_FILTER;
+ PTcGenFilter = PTC_GEN_FILTER;
+
+//
+// A generic flow includes two flowspecs and a freeform
+// buffer which contains flow specific TC objects.
+//
+
+ PTC_GEN_FLOW = ^TC_GEN_FLOW;
+ {$EXTERNALSYM PTC_GEN_FLOW}
+ _TC_GEN_FLOW = record
+ SendingFlowspec: FLOWSPEC;
+ ReceivingFlowspec: FLOWSPEC;
+ TcObjectsLength: ULONG; // number of optional bytes
+ TcObjects: array [0..0] of QOS_OBJECT_HDR;
+ end;
+ {$EXTERNALSYM _TC_GEN_FLOW}
+ TC_GEN_FLOW = _TC_GEN_FLOW;
+ {$EXTERNALSYM TC_GEN_FLOW}
+ TTcGenFlow = TC_GEN_FLOW;
+ PTcGenFlow = PTC_GEN_FLOW;
+
+//
+// Format of specific pattern or mask used by GPC for the IP protocol
+//
+
+ PIP_PATTERN = ^IP_PATTERN;
+ {$EXTERNALSYM PIP_PATTERN}
+ _IP_PATTERN = record
+ Reserved1: ULONG;
+ Reserved2: ULONG;
+ SrcAddr: ULONG;
+ DstAddr: ULONG;
+ S_un: record
+ case Integer of
+ 0: (
+ s_srcport: USHORT;
+ s_dstport: USHORT);
+ 1: (
+ s_type: UCHAR;
+ s_code: UCHAR;
+ filler: USHORT);
+ 2: (
+ S_Spi: ULONG);
+ end;
+ ProtocolId: UCHAR;
+ Reserved3: array [0..3 - 1] of UCHAR;
+ end;
+ {$EXTERNALSYM _IP_PATTERN}
+ IP_PATTERN = _IP_PATTERN;
+ {$EXTERNALSYM IP_PATTERN}
+ TIpPattern = IP_PATTERN;
+ PIpPattern = PIP_PATTERN;
+
+//
+// Format of specific pattern or mask used by GPC for the IPX protocol
+//
+
+ TIpxPatternAddress = record
+ NetworkAddress: ULONG;
+ NodeAddress: array [0..5] of UCHAR;
+ Socket: USHORT;
+ end;
+
+ PIPX_PATTERN = ^IPX_PATTERN;
+ {$EXTERNALSYM PIPX_PATTERN}
+ _IPX_PATTERN = record
+ Src: TIpxPatternAddress;
+ Dest: TIpxPatternAddress;
+ end;
+ {$EXTERNALSYM _IPX_PATTERN}
+ IPX_PATTERN = _IPX_PATTERN;
+ {$EXTERNALSYM IPX_PATTERN}
+ TIpxPattern = IPX_PATTERN;
+ PIpxPattern = PIPX_PATTERN;
+
+//
+// The enumeration buffer is the flow parameters + a list of filters
+//
+
+ PENUMERATION_BUFFER = ^ENUMERATION_BUFFER;
+ {$EXTERNALSYM PENUMERATION_BUFFER}
+ _ENUMERATION_BUFFER = record
+ Length: ULONG;
+ OwnerProcessId: ULONG;
+ FlowNameLength: USHORT;
+ FlowName: array [0..MAX_STRING_LENGTH - 1] of WCHAR;
+ pFlow: PTC_GEN_FLOW;
+ NumberOfFilters: ULONG;
+ GenericFilter: array [0..0] of TC_GEN_FILTER; // one for each filter
+ end;
+ {$EXTERNALSYM _ENUMERATION_BUFFER}
+ ENUMERATION_BUFFER = _ENUMERATION_BUFFER;
+ {$EXTERNALSYM ENUMERATION_BUFFER}
+ TEnumerationBuffer = ENUMERATION_BUFFER;
+ PEnumerationBuffer = PENUMERATION_BUFFER;
+
+//
+// QoS objects supported by traffic
+//
+
+const
+ QOS_TRAFFIC_GENERAL_ID_BASE = 4000;
+ {$EXTERNALSYM QOS_TRAFFIC_GENERAL_ID_BASE}
+
+ QOS_OBJECT_DS_CLASS = $00000001 + QOS_TRAFFIC_GENERAL_ID_BASE;
+ {$EXTERNALSYM QOS_OBJECT_DS_CLASS}
+ QOS_OBJECT_TRAFFIC_CLASS = $00000002 + QOS_TRAFFIC_GENERAL_ID_BASE;
+ {$EXTERNALSYM QOS_OBJECT_TRAFFIC_CLASS}
+ QOS_OBJECT_DIFFSERV = $00000003 + QOS_TRAFFIC_GENERAL_ID_BASE;
+ {$EXTERNALSYM QOS_OBJECT_DIFFSERV}
+ QOS_OBJECT_TCP_TRAFFIC = $00000004 + QOS_TRAFFIC_GENERAL_ID_BASE;
+ {$EXTERNALSYM QOS_OBJECT_TCP_TRAFFIC}
+ QOS_OBJECT_FRIENDLY_NAME = $00000005 + QOS_TRAFFIC_GENERAL_ID_BASE;
+ {$EXTERNALSYM QOS_OBJECT_FRIENDLY_NAME}
+
+//
+// This structure is used to associate a friendly name with the flow
+//
+
+type
+ LPQOS_FRIENDLY_NAME = ^QOS_FRIENDLY_NAME;
+ {$EXTERNALSYM LPQOS_FRIENDLY_NAME}
+ _QOS_FRIENDLY_NAME = record
+ ObjectHdr: QOS_OBJECT_HDR;
+ FriendlyName: array [0..MAX_STRING_LENGTH - 1] of WCHAR;
+ end;
+ {$EXTERNALSYM _QOS_FRIENDLY_NAME}
+ QOS_FRIENDLY_NAME = _QOS_FRIENDLY_NAME;
+ {$EXTERNALSYM QOS_FRIENDLY_NAME}
+ TQosFriendlyName = QOS_FRIENDLY_NAME;
+ PQosFriendlyName = LPQOS_FRIENDLY_NAME;
+
+//
+// This structure may carry an 802.1 TrafficClass parameter which
+// has been provided to the host by a layer 2 network, for example,
+// in an 802.1 extended RSVP RESV message. If this object is obtained
+// from the network, hosts will stamp the MAC headers of corresponding
+// transmitted packets, with the value in the object. Otherwise, hosts
+// may select a value based on the standard Intserv mapping of
+// ServiceType to 802.1 TrafficClass.
+//
+//
+
+ LPQOS_TRAFFIC_CLASS = ^QOS_TRAFFIC_CLASS;
+ {$EXTERNALSYM LPQOS_TRAFFIC_CLASS}
+ _QOS_TRAFFIC_CLASS = record
+ ObjectHdr: QOS_OBJECT_HDR;
+ TrafficClass: ULONG;
+ end;
+ {$EXTERNALSYM _QOS_TRAFFIC_CLASS}
+ QOS_TRAFFIC_CLASS = _QOS_TRAFFIC_CLASS;
+ {$EXTERNALSYM QOS_TRAFFIC_CLASS}
+ TQosTrafficClass = QOS_TRAFFIC_CLASS;
+ PQosTrafficClass = LPQOS_TRAFFIC_CLASS;
+
+//
+// This structure may carry an DSField parameter which has been provided to
+// the host by a layer 3 network, for example, in an extended RSVP RESV message.
+// If this object is obtained from the network, hosts will stamp the DS Field on the
+// IP header of transmitted packets, with the value in the object. Otherwise, hosts
+// may select a value based on the standard Intserv mapping of ServiceType to DS Field
+//
+
+ LPQOS_DS_CLASS = ^QOS_DS_CLASS;
+ {$EXTERNALSYM LPQOS_DS_CLASS}
+ _QOS_DS_CLASS = record
+ ObjectHdr: QOS_OBJECT_HDR;
+ DSField: ULONG;
+ end;
+ {$EXTERNALSYM _QOS_DS_CLASS}
+ QOS_DS_CLASS = _QOS_DS_CLASS;
+ {$EXTERNALSYM QOS_DS_CLASS}
+ TQosDsClass = QOS_DS_CLASS;
+ PQosDsClass = LPQOS_DS_CLASS;
+
+//
+// This structure is used to create DiffServ Flows. This creates flows in the packet scheduler
+// and allows it to classify to packets based on a particular DS field. This structure takes
+// a variable length array of QOS_DIFFSERV_RULE, where each DS field is specified by a
+// QOS_DIFFSERV_RULE
+//
+ LPQOS_DIFFSERV = ^QOS_DIFFSERV;
+ {$EXTERNALSYM LPQOS_DIFFSERV}
+ _QOS_DIFFSERV = record
+ ObjectHdr: QOS_OBJECT_HDR;
+ DSFieldCount: ULONG;
+ DiffservRule: array [0..0] of UCHAR;
+ end;
+ {$EXTERNALSYM _QOS_DIFFSERV}
+ QOS_DIFFSERV = _QOS_DIFFSERV;
+ {$EXTERNALSYM QOS_DIFFSERV}
+ TQosDiffserv = QOS_DIFFSERV;
+ PQosDiffserv = LPQOS_DIFFSERV;
+
+//
+// The rule for a Diffserv DS codepoint.
+//
+
+ LPQOS_DIFFSERV_RULE = ^QOS_DIFFSERV_RULE;
+ {$EXTERNALSYM LPQOS_DIFFSERV_RULE}
+ _QOS_DIFFSERV_RULE = record
+ InboundDSField: UCHAR;
+ ConformingOutboundDSField: UCHAR;
+ NonConformingOutboundDSField: UCHAR;
+ ConformingUserPriority: UCHAR;
+ NonConformingUserPriority: UCHAR;
+ end;
+ {$EXTERNALSYM _QOS_DIFFSERV_RULE}
+ QOS_DIFFSERV_RULE = _QOS_DIFFSERV_RULE;
+ {$EXTERNALSYM QOS_DIFFSERV_RULE}
+ TQosDiffservRule = QOS_DIFFSERV_RULE;
+ PQosDiffservRule = LPQOS_DIFFSERV_RULE;
+
+//
+// This structure is passed to indicate that the IP Precedence and UserPriority mappings for the flow
+// have to be set to the system defaults for TCP traffic. If this object is passed,
+// the ServiceType ==> DSField mapping, ServiceType ==> UserPriorityMapping, QOS_OBJECT_DS_CLASS
+// and QOS_OBJECT_TRAFFIC_CLASS will be ignored.
+//
+
+ LPQOS_TCP_TRAFFIC = ^QOS_TCP_TRAFFIC;
+ {$EXTERNALSYM LPQOS_TCP_TRAFFIC}
+ _QOS_TCP_TRAFFIC = record
+ ObjectHdr: QOS_OBJECT_HDR;
+ end;
+ {$EXTERNALSYM _QOS_TCP_TRAFFIC}
+ QOS_TCP_TRAFFIC = _QOS_TCP_TRAFFIC;
+ {$EXTERNALSYM QOS_TCP_TRAFFIC}
+ TQosTcpTraffic = QOS_TCP_TRAFFIC;
+ PQosTcpTraffic = LPQOS_TCP_TRAFFIC;
+
+//---------------------------------------------------------------------------
+//
+// Interface Function Definitions
+//
+
+function TcRegisterClient(TciVersion: ULONG; ClRegCtx: HANDLE; const ClientHandlerList: TCI_CLIENT_FUNC_LIST; var pClientHandle: HANDLE): ULONG; stdcall;
+{$EXTERNALSYM TcRegisterClient}
+function TcEnumerateInterfaces(ClientHandle: HANDLE; var pBufferSize: ULONG; var InterfaceBuffer: TC_IFC_DESCRIPTOR): ULONG; stdcall;
+{$EXTERNALSYM TcEnumerateInterfaces}
+function TcOpenInterfaceA(pInterfaceName: LPSTR; ClientHandle, ClIfcCtx: HANDLE; var pIfcHandle: HANDLE): ULONG; stdcall;
+{$EXTERNALSYM TcOpenInterfaceA}
+function TcOpenInterfaceW(pInterfaceName: LPWSTR; ClientHandle, ClIfcCtx: HANDLE; var pIfcHandle: HANDLE): ULONG; stdcall;
+{$EXTERNALSYM TcOpenInterfaceW}
+function TcCloseInterface(IfcHandle: HANDLE): ULONG; stdcall;
+{$EXTERNALSYM TcCloseInterface}
+function TcQueryInterface(IfcHandle: HANDLE; const pGuidParam: GUID; NotifyChange: Longbool; var pBufferSize: ULONG; Buffer: PVOID): ULONG; stdcall;
+{$EXTERNALSYM TcQueryInterface}
+function TcSetInterface(IfcHandle: HANDLE; const pGuidParam: GUID; BufferSize: ULONG; Buffer: PVOID): ULONG; stdcall;
+{$EXTERNALSYM TcSetInterface}
+function TcQueryFlowA(pFlowName: LPSTR; const pGuidParam: GUID; var pBufferSize: ULONG; Buffer: PVOID): ULONG; stdcall;
+{$EXTERNALSYM TcQueryFlowA}
+function TcQueryFlowW(pFlowName: LPWSTR; const pGuidParam: GUID; var pBufferSize: ULONG; Buffer: PVOID): ULONG; stdcall;
+{$EXTERNALSYM TcQueryFlowW}
+function TcSetFlowA(pFlowName: LPSTR; const pGuidParam: GUID; BufferSize: GUID; Buffer: PVOID): ULONG; stdcall;
+{$EXTERNALSYM TcSetFlowA}
+function TcSetFlowW(pFlowName: LPWSTR; const pGuidParam: GUID; BufferSize: GUID; Buffer: PVOID): ULONG; stdcall;
+{$EXTERNALSYM TcSetFlowW}
+function TcAddFlow(IfcHandle, ClFlowCtx: HANDLE; Flags: ULONG; const pGenericFlow: TC_GEN_FLOW; var pFlowHandle: HANDLE): ULONG; stdcall;
+{$EXTERNALSYM TcAddFlow}
+function TcGetFlowNameA(FlowHandle: HANDLE; StrSize: ULONG; pFlowName: LPSTR): ULONG; stdcall;
+{$EXTERNALSYM TcGetFlowNameA}
+function TcGetFlowNameW(FlowHandle: HANDLE; StrSize: ULONG; pFlowName: LPWSTR): ULONG; stdcall;
+{$EXTERNALSYM TcGetFlowNameW}
+function TcModifyFlow(FlowHandle: HANDLE; const pGenericFlow: TC_GEN_FLOW): ULONG; stdcall;
+{$EXTERNALSYM TcModifyFlow}
+function TcAddFilter(FlowHandle: HANDLE; const pGenericFilter: TC_GEN_FILTER; var pFilterHandle: HANDLE): ULONG; stdcall;
+{$EXTERNALSYM TcAddFilter}
+function TcDeregisterClient(ClientHandle: HANDLE): ULONG; stdcall;
+{$EXTERNALSYM TcDeregisterClient}
+function TcDeleteFlow(FlowHandle: HANDLE): ULONG; stdcall;
+{$EXTERNALSYM TcDeleteFlow}
+function TcDeleteFilter(FilterHandle: HANDLE): ULONG; stdcall;
+{$EXTERNALSYM TcDeleteFilter}
+function TcEnumerateFlows(IfcHandle: HANDLE; var pEnumHandle: HANDLE; var pFlowCount, pBufSize: ULONG; var Buffer: ENUMERATION_BUFFER): ULONG; stdcall;
+{$EXTERNALSYM TcEnumerateFlows}
+
+function TcOpenInterface(pInterfaceName: LPTSTR; ClientHandle, ClIfcCtx: HANDLE; var pIfcHandle: HANDLE): ULONG; stdcall;
+{$EXTERNALSYM TcOpenInterface}
+function TcQueryFlow(pFlowName: LPTSTR; const pGuidParam: GUID; var pBufferSize: ULONG; Buffer: PVOID): ULONG; stdcall;
+{$EXTERNALSYM TcQueryFlow}
+function TcSetFlow(pFlowName: LPTSTR; const pGuidParam: GUID; BufferSize: GUID; Buffer: PVOID): ULONG; stdcall;
+{$EXTERNALSYM TcSetFlow}
+function TcGetFlowName(FlowHandle: HANDLE; StrSize: ULONG; pFlowName: LPTSTR): ULONG; stdcall;
+{$EXTERNALSYM TcGetFlowName}
+
+implementation
+
+const
+ trafficlib = 'traffic.dll';
+ {$IFDEF UNICODE}
+ AWSuffix = 'W';
+ {$ELSE}
+ AWSuffix = 'A';
+ {$ENDIF UNICODE}
+
+{$IFDEF DYNAMIC_LINK}
+
+var
+ _TcRegisterClient: Pointer;
+
+function TcRegisterClient;
+begin
+ GetProcedureAddress(_TcRegisterClient, trafficlib, 'TcRegisterClient');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_TcRegisterClient]
+ end;
+end;
+
+var
+ _TcEnumerateInterfaces: Pointer;
+
+function TcEnumerateInterfaces;
+begin
+ GetProcedureAddress(_TcEnumerateInterfaces, trafficlib, 'TcEnumerateInterfaces');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_TcEnumerateInterfaces]
+ end;
+end;
+
+var
+ _TcOpenInterfaceA: Pointer;
+
+function TcOpenInterfaceA;
+begin
+ GetProcedureAddress(_TcOpenInterfaceA, trafficlib, 'TcOpenInterfaceA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_TcOpenInterfaceA]
+ end;
+end;
+
+var
+ _TcOpenInterfaceW: Pointer;
+
+function TcOpenInterfaceW;
+begin
+ GetProcedureAddress(_TcOpenInterfaceW, trafficlib, 'TcOpenInterfaceW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_TcOpenInterfaceW]
+ end;
+end;
+
+var
+ _TcCloseInterface: Pointer;
+
+function TcCloseInterface;
+begin
+ GetProcedureAddress(_TcCloseInterface, trafficlib, 'TcCloseInterface');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_TcCloseInterface]
+ end;
+end;
+
+var
+ _TcQueryInterface: Pointer;
+
+function TcQueryInterface;
+begin
+ GetProcedureAddress(_TcQueryInterface, trafficlib, 'TcQueryInterface');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_TcQueryInterface]
+ end;
+end;
+
+var
+ _TcSetInterface: Pointer;
+
+function TcSetInterface;
+begin
+ GetProcedureAddress(_TcSetInterface, trafficlib, 'TcSetInterface');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_TcSetInterface]
+ end;
+end;
+
+var
+ _TcQueryFlowA: Pointer;
+
+function TcQueryFlowA;
+begin
+ GetProcedureAddress(_TcQueryFlowA, trafficlib, 'TcQueryFlowA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_TcQueryFlowA]
+ end;
+end;
+
+var
+ _TcQueryFlowW: Pointer;
+
+function TcQueryFlowW;
+begin
+ GetProcedureAddress(_TcQueryFlowW, trafficlib, 'TcQueryFlowW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_TcQueryFlowW]
+ end;
+end;
+
+var
+ _TcSetFlowA: Pointer;
+
+function TcSetFlowA;
+begin
+ GetProcedureAddress(_TcSetFlowA, trafficlib, 'TcSetFlowA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_TcSetFlowA]
+ end;
+end;
+
+var
+ _TcSetFlowW: Pointer;
+
+function TcSetFlowW;
+begin
+ GetProcedureAddress(_TcSetFlowW, trafficlib, 'TcSetFlowW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_TcSetFlowW]
+ end;
+end;
+
+var
+ _TcAddFlow: Pointer;
+
+function TcAddFlow;
+begin
+ GetProcedureAddress(_TcAddFlow, trafficlib, 'TcAddFlow');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_TcAddFlow]
+ end;
+end;
+
+var
+ _TcGetFlowNameA: Pointer;
+
+function TcGetFlowNameA;
+begin
+ GetProcedureAddress(_TcGetFlowNameA, trafficlib, 'TcGetFlowNameA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_TcGetFlowNameA]
+ end;
+end;
+
+var
+ _TcGetFlowNameW: Pointer;
+
+function TcGetFlowNameW;
+begin
+ GetProcedureAddress(_TcGetFlowNameW, trafficlib, 'TcGetFlowNameW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_TcGetFlowNameW]
+ end;
+end;
+
+var
+ _TcModifyFlow: Pointer;
+
+function TcModifyFlow;
+begin
+ GetProcedureAddress(_TcModifyFlow, trafficlib, 'TcModifyFlow');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_TcModifyFlow]
+ end;
+end;
+
+var
+ _TcAddFilter: Pointer;
+
+function TcAddFilter;
+begin
+ GetProcedureAddress(_TcAddFilter, trafficlib, 'TcAddFilter');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_TcAddFilter]
+ end;
+end;
+
+var
+ _TcDeregisterClient: Pointer;
+
+function TcDeregisterClient;
+begin
+ GetProcedureAddress(_TcDeregisterClient, trafficlib, 'TcDeregisterClient');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_TcDeregisterClient]
+ end;
+end;
+
+var
+ _TcDeleteFlow: Pointer;
+
+function TcDeleteFlow;
+begin
+ GetProcedureAddress(_TcDeleteFlow, trafficlib, 'TcDeleteFlow');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_TcDeleteFlow]
+ end;
+end;
+
+var
+ _TcDeleteFilter: Pointer;
+
+function TcDeleteFilter;
+begin
+ GetProcedureAddress(_TcDeleteFilter, trafficlib, 'TcDeleteFilter');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_TcDeleteFilter]
+ end;
+end;
+
+var
+ _TcEnumerateFlows: Pointer;
+
+function TcEnumerateFlows;
+begin
+ GetProcedureAddress(_TcEnumerateFlows, trafficlib, 'TcEnumerateFlows');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_TcEnumerateFlows]
+ end;
+end;
+
+var
+ _TcOpenInterface: Pointer;
+
+function TcOpenInterface;
+begin
+ GetProcedureAddress(_TcOpenInterface, trafficlib, 'TcOpenInterface' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_TcOpenInterface]
+ end;
+end;
+
+var
+ _TcQueryFlow: Pointer;
+
+function TcQueryFlow;
+begin
+ GetProcedureAddress(_TcQueryFlow, trafficlib, 'TcQueryFlow' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_TcQueryFlow]
+ end;
+end;
+
+var
+ _TcSetFlow: Pointer;
+
+function TcSetFlow;
+begin
+ GetProcedureAddress(_TcSetFlow, trafficlib, 'TcSetFlow' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_TcSetFlow]
+ end;
+end;
+
+var
+ _TcGetFlowName: Pointer;
+
+function TcGetFlowName;
+begin
+ GetProcedureAddress(_TcGetFlowName, trafficlib, 'TcGetFlowName' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_TcGetFlowName]
+ end;
+end;
+
+{$ELSE}
+
+function TcRegisterClient; external trafficlib name 'TcRegisterClient';
+function TcEnumerateInterfaces; external trafficlib name 'TcEnumerateInterfaces';
+function TcOpenInterfaceA; external trafficlib name 'TcOpenInterfaceA';
+function TcOpenInterfaceW; external trafficlib name 'TcOpenInterfaceW';
+function TcCloseInterface; external trafficlib name 'TcCloseInterface';
+function TcQueryInterface; external trafficlib name 'TcQueryInterface';
+function TcSetInterface; external trafficlib name 'TcSetInterface';
+function TcQueryFlowA; external trafficlib name 'TcQueryFlowA';
+function TcQueryFlowW; external trafficlib name 'TcQueryFlowW';
+function TcSetFlowA; external trafficlib name 'TcSetFlowA';
+function TcSetFlowW; external trafficlib name 'TcSetFlowW';
+function TcAddFlow; external trafficlib name 'TcAddFlow';
+function TcGetFlowNameA; external trafficlib name 'TcGetFlowNameA';
+function TcGetFlowNameW; external trafficlib name 'TcGetFlowNameW';
+function TcModifyFlow; external trafficlib name 'TcModifyFlow';
+function TcAddFilter; external trafficlib name 'TcAddFilter';
+function TcDeregisterClient; external trafficlib name 'TcDeregisterClient';
+function TcDeleteFlow; external trafficlib name 'TcDeleteFlow';
+function TcDeleteFilter; external trafficlib name 'TcDeleteFilter';
+function TcEnumerateFlows; external trafficlib name 'TcEnumerateFlows';
+function TcOpenInterface; external trafficlib name 'TcOpenInterface' + AWSuffix;
+function TcQueryFlow; external trafficlib name 'TcQueryFlow' + AWSuffix;
+function TcSetFlow; external trafficlib name 'TcSetFlow' + AWSuffix;
+function TcGetFlowName; external trafficlib name 'TcGetFlowName' + AWSuffix;
+
+{$ENDIF DYNAMIC_LINK}
+
+end.
diff --git a/packages/extra/winunits/jwauserenv.pas b/packages/extra/winunits/jwauserenv.pas
index 831e914ec5..847a9f6b7e 100644
--- a/packages/extra/winunits/jwauserenv.pas
+++ b/packages/extra/winunits/jwauserenv.pas
@@ -1,1866 +1,1866 @@
-{******************************************************************************}
-{ }
-{ User Profile API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: userenv.h, released June 2000. The original Pascal }
-{ code is: UserEnv.pas, released December 2000. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwauserenv.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaUserEnv;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "userenv.h"'}
-{$HPPEMIT ''}
-{$HPPEMIT 'typedef PGROUP_POLICY_OBJECTA *PPGROUP_POLICY_OBJECTA'}
-{$HPPEMIT 'typedef PGROUP_POLICY_OBJECTW *PPGROUP_POLICY_OBJECTW'}
-{$HPPEMIT ''}
-{$HPPEMIT 'typedef #ifdef UNICODE'}
-{$HPPEMIT 'typedef PPGROUP_POLICY_OBJECTW PPGROUP_POLICY_OBJECT'}
-{$HPPEMIT 'typedef #else'}
-{$HPPEMIT 'typedef PPGROUP_POLICY_OBJECTA PPGROUP_POLICY_OBJECT'}
-{$HPPEMIT 'typedef #endif'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- ActiveX, {TODO}
- JwaProfInfo, JwaWbemCli, JwaWinType, JWaWinBase, JwaWinNT;
-
-//=============================================================================
-//
-// LoadUserProfile
-//
-// Loads the specified user's profile.
-//
-// Most applications should not need to use this function. It's used
-// when a user has logged onto the system or a service starts in a named
-// user account.
-//
-// hToken - Token for the user, returned from LogonUser()
-// lpProfileInfo - Address of a PROFILEINFO structure
-//
-// Returns: TRUE if successful
-// FALSE if not. Call GetLastError() for more details
-//
-// Note: The caller of this function must have admin privileges on the machine.
-//
-// Upon successful return, the hProfile member of the PROFILEINFO
-// structure is a registry key handle opened to the root
-// of the user's hive. It has been opened with full access. If
-// you need to read or write to the user's registry file, use
-// this key instead of HKEY_CURRENT_USER. Do not close this
-// handle. Instead pass it to UnloadUserProfile to close
-// the handle.
-//
-//=============================================================================
-
-//
-// Flags that can be set in the dwFlags field
-//
-
-const
- PI_NOUI = $00000001; // Prevents displaying of messages
- {$EXTERNALSYM PI_NOUI}
- PI_APPLYPOLICY = $00000002; // Apply NT4 style policy
- {$EXTERNALSYM PI_APPLYPOLICY}
-
-function LoadUserProfileA(hToken: HANDLE; var lpProfileInfo: PROFILEINFOA): BOOL; stdcall;
-{$EXTERNALSYM LoadUserProfileA}
-function LoadUserProfileW(hToken: HANDLE; var lpProfileInfo: PROFILEINFOW): BOOL; stdcall;
-{$EXTERNALSYM LoadUserProfileW}
-function LoadUserProfile(hToken: HANDLE; var lpProfileInfo: PROFILEINFO): BOOL; stdcall;
-{$EXTERNALSYM LoadUserProfile}
-
-//=============================================================================
-//
-// UnloadUserProfile
-//
-// Unloads a user's profile that was loaded by LoadUserProfile()
-//
-// hToken - Token for the user, returned from LogonUser()
-// hProfile - hProfile member of the PROFILEINFO structure
-//
-// Returns: TRUE if successful
-// FALSE if not. Call GetLastError() for more details
-//
-// Note: The caller of this function must have admin privileges on the machine.
-//
-//=============================================================================
-
-function UnloadUserProfile(hToken: HANDLE; hProfile: HANDLE): BOOL; stdcall;
-{$EXTERNALSYM UnloadUserProfile}
-
-//=============================================================================
-//
-// GetProfilesDirectory
-//
-// Returns the path to the root of where all user profiles are stored.
-//
-// lpProfilesDir - Receives the path
-// lpcchSize - Size of lpProfilesDir
-//
-// Returns: TRUE if successful
-// FALSE if not. Call GetLastError() for more details
-//
-// Note: If lpProfilesDir is not large enough, the function will fail,
-// and lpcchSize will contain the necessary buffer size.
-//
-// Example return value: C:\Documents and Settings
-//
-//=============================================================================
-
-function GetProfilesDirectoryA(lpProfilesDir: LPSTR; var lpcchSize: DWORD): BOOL; stdcall;
-{$EXTERNALSYM GetProfilesDirectoryA}
-function GetProfilesDirectoryW(lpProfilesDir: LPWSTR; var lpcchSize: DWORD): BOOL; stdcall;
-{$EXTERNALSYM GetProfilesDirectoryW}
-function GetProfilesDirectory(lpProfilesDir: LPTSTR; var lpcchSize: DWORD): BOOL; stdcall;
-{$EXTERNALSYM GetProfilesDirectory}
-
-//=============================================================================
-//
-// GetProfileType()
-//
-// Returns the type of the profile that is loaded for a user.
-//
-// dwFlags - Returns the profile flags
-//
-// Return: TRUE if successful
-// FALSE if an error occurs. Call GetLastError for more details
-//
-// Comments: if profile is not already loaded the function will return an error.
-// The caller needs to have access to HKLM part of the registry.
-// (exists by default)
-//
-//=============================================================================
-
-//
-// Flags that can be set in the dwFlags field
-//
-
-const
- PT_TEMPORARY = $00000001; // A profile has been allocated that will be deleted at logoff.
- {$EXTERNALSYM PT_TEMPORARY}
- PT_ROAMING = $00000002; // The loaded profile is a roaming profile.
- {$EXTERNALSYM PT_ROAMING}
- PT_MANDATORY = $00000004; // The loaded profile is mandatory.
- {$EXTERNALSYM PT_MANDATORY}
-
-function GetProfileType(var dwFlags: DWORD): BOOL; stdcall;
-{$EXTERNALSYM GetProfileType}
-
-//=============================================================================
-//
-// DeleteProfile()
-//
-// Deletes the profile and all other user related settings from the machine
-//
-// lpSidString - String form of the user sid.
-// lpProfilePath - ProfilePath (if Null, lookup in the registry)
-// lpComputerName - Computer Name from which profile has to be deleted
-//
-// Return: TRUE if successful
-// FALSE if an error occurs. Call GetLastError for more details
-//
-// Comments: Deletes the profile directory, registry and appmgmt stuff
-//=============================================================================
-
-function DeleteProfileA(lpSidString: LPCSTR; lpProfilePath: LPCSTR;
- lpComputerName: LPCSTR): BOOL; stdcall;
-{$EXTERNALSYM DeleteProfileA}
-function DeleteProfileW(lpSidString: LPCWSTR; lpProfilePath: LPCWSTR;
- lpComputerName: LPCWSTR): BOOL; stdcall;
-{$EXTERNALSYM DeleteProfileW}
-function DeleteProfile(lpSidString: LPCTSTR; lpProfilePath: LPCTSTR;
- lpComputerName: LPCTSTR): BOOL; stdcall;
-{$EXTERNALSYM DeleteProfile}
-
-//=============================================================================
-//
-// GetDefaultUserProfilesDirectory
-//
-// Returns the path to the root of the default user profile
-//
-// lpProfileDir - Receives the path
-// lpcchSize - Size of lpProfileDir
-//
-// Returns: TRUE if successful
-// FALSE if not. Call GetLastError() for more details
-//
-// Note: If lpProfileDir is not large enough, the function will fail,
-// and lpcchSize will contain the necessary buffer size.
-//
-// Example return value: C:\Documents and Settings\Default User
-//
-//=============================================================================
-
-function GetDefaultUserProfileDirectoryA(lpProfileDir: LPSTR; var lpcchSize: DWORD): BOOL; stdcall;
-{$EXTERNALSYM GetDefaultUserProfileDirectoryA}
-function GetDefaultUserProfileDirectoryW(lpProfileDir: LPWSTR; var lpcchSize: DWORD): BOOL; stdcall;
-{$EXTERNALSYM GetDefaultUserProfileDirectoryW}
-function GetDefaultUserProfileDirectory(lpProfileDir: LPTSTR; var lpcchSize: DWORD): BOOL; stdcall;
-{$EXTERNALSYM GetDefaultUserProfileDirectory}
-
-//=============================================================================
-//
-// GetAllUsersProfilesDirectory
-//
-// Returns the path to the root of the All Users profile
-//
-// lpProfileDir - Receives the path
-// lpcchSize - Size of lpProfileDir
-//
-// Returns: TRUE if successful
-// FALSE if not. Call GetLastError() for more details
-//
-// Note: If lpProfileDir is not large enough, the function will fail,
-// and lpcchSize will contain the necessary buffer size.
-//
-// Example return value: C:\Documents and Settings\All Users
-//
-//=============================================================================
-
-function GetAllUsersProfileDirectoryA(lpProfileDir: LPSTR; var lpcchSize: DWORD): BOOL; stdcall;
-{$EXTERNALSYM GetAllUsersProfileDirectoryA}
-function GetAllUsersProfileDirectoryW(lpProfileDir: LPWSTR; var lpcchSize: DWORD): BOOL; stdcall;
-{$EXTERNALSYM GetAllUsersProfileDirectoryW}
-function GetAllUsersProfileDirectory(lpProfileDir: LPTSTR; var lpcchSize: DWORD): BOOL; stdcall;
-{$EXTERNALSYM GetAllUsersProfileDirectory}
-
-//=============================================================================
-//
-// GetUserProfileDirectory
-//
-// Returns the path to the root of the requested user's profile
-//
-// hToken - User's token returned from LogonUser()
-// lpProfileDir - Receives the path
-// lpcchSize - Size of lpProfileDir
-//
-// Returns: TRUE if successful
-// FALSE if not. Call GetLastError() for more details
-//
-// Note: If lpProfileDir is not large enough, the function will fail,
-// and lpcchSize will contain the necessary buffer size.
-//
-// Example return value: C:\Documents and Settings\Joe
-//
-//=============================================================================
-
-function GetUserProfileDirectoryA(hToken: HANDLE; lpProfileDir: LPSTR;
- var lpcchSize: DWORD): BOOL; stdcall;
-{$EXTERNALSYM GetUserProfileDirectoryA}
-function GetUserProfileDirectoryW(hToken: HANDLE; lpProfileDir: LPWSTR;
- var lpcchSize: DWORD): BOOL; stdcall;
-{$EXTERNALSYM GetUserProfileDirectoryW}
-function GetUserProfileDirectory(hToken: HANDLE; lpProfileDir: LPTSTR;
- var lpcchSize: DWORD): BOOL; stdcall;
-{$EXTERNALSYM GetUserProfileDirectory}
-
-//=============================================================================
-//
-// CreateEnvironmentBlock
-//
-// Returns the environment variables for the specified user. This block
-// can then be passed to CreateProcessAsUser().
-//
-// lpEnvironment - Receives a pointer to the new environment block
-// hToken - User's token returned from LogonUser() (optional, can be NULL)
-// bInherit - Inherit from the current process's environment block
-// or start from a clean state.
-//
-// Returns: TRUE if successful
-// FALSE if not. Call GetLastError() for more details
-//
-// Note: If hToken is NULL, the returned environment block will contain
-// system variables only.
-//
-// Call DestroyEnvironmentBlock to free the buffer when finished.
-//
-// If this block is passed to CreateProcessAsUser, the
-// CREATE_UNICODE_ENVIRONMENT flag must also be set.
-//
-//=============================================================================
-
-function CreateEnvironmentBlock(lpEnvironment: LPLPVOID; hToken: HANDLE;
- bInherit: BOOL): BOOL; stdcall;
-{$EXTERNALSYM CreateEnvironmentBlock}
-
-//=============================================================================
-//
-// DestroyEnvironmentBlock
-//
-// Frees environment variables created by CreateEnvironmentBlock
-//
-// lpEnvironment - A pointer to the environment block
-//
-// Returns: TRUE if successful
-// FALSE if not. Call GetLastError() for more details
-//
-//=============================================================================
-
-function DestroyEnvironmentBlock(lpEnvironment: LPVOID): BOOL; stdcall;
-{$EXTERNALSYM DestroyEnvironmentBlock}
-
-//=============================================================================
-//
-// ExpandEnvironmentStringsForUser
-//
-// Expands the source string using the environment block for the
-// specified user. If hToken is null, the system environment block
-// will be used (no user environment variables).
-//
-// hToken - User's token returned from LogonUser() (optional, can be NULL)
-// lpSrc - Pointer to the string with environment variables
-// lpDest - Buffer that receives the expanded string
-// dwSize - Size of lpDest in characters (max chars)
-//
-// Returns: TRUE if successful
-// FALSE if not. Call GetLastError() for more details
-//
-// Note: If the user profile for hToken is not loaded, this api will fail.
-//
-//=============================================================================
-
-function ExpandEnvironmentStringsForUserA(hToken: HANDLE; lpSrc: LPCSTR;
- lpDest: LPSTR; dwSize: DWORD): BOOL; stdcall;
-{$EXTERNALSYM ExpandEnvironmentStringsForUserA}
-function ExpandEnvironmentStringsForUserW(hToken: HANDLE; lpSrc: LPCWSTR;
- lpDest: LPWSTR; dwSize: DWORD): BOOL; stdcall;
-{$EXTERNALSYM ExpandEnvironmentStringsForUserW}
-function ExpandEnvironmentStringsForUser(hToken: HANDLE; lpSrc: LPCTSTR;
- lpDest: LPTSTR; dwSize: DWORD): BOOL; stdcall;
-{$EXTERNALSYM ExpandEnvironmentStringsForUser}
-
-//=============================================================================
-//
-// RefreshPolicy()
-//
-// Causes group policy to be applied immediately on the client machine
-//
-// bMachine - Refresh machine or user policy
-//
-// Returns: TRUE if successful
-// FALSE if not. Call GetLastError() for more details
-//
-//=============================================================================
-
-function RefreshPolicy(bMachine: BOOL): BOOL; stdcall;
-{$EXTERNALSYM RefreshPolicy}
-
-//=============================================================================
-//
-// RefreshPolicyEx()
-//
-// Causes group policy to be applied immediately on the client machine.
-//
-// bMachine - Refresh machine or user policy
-// dwOptions - Option specifying the kind of refresh that needs to be done.
-//
-// Returns: TRUE if successful
-// FALSE if not. Call GetLastError() for more details
-//
-//=============================================================================
-
-const
- RP_FORCE = 1; // Refresh policies without any optimisations.
- {$EXTERNALSYM RP_FORCE}
-
-function RefreshPolicyEx(bMachine: BOOL; dwOptions: DWORD): BOOL; stdcall;
-{$EXTERNALSYM RefreshPolicyEx}
-
-//=============================================================================
-//
-// EnterCriticalPolicySection
-//
-// Pauses the background application of group policy to allow safe
-// reading of the registry. Applications that need to read multiple
-// policy entries and ensure that the values are not changed while reading
-// them should use this function.
-//
-// The maximum amount of time an application can hold a critical section
-// is 10 minutes. After 10 minutes, policy can be applied again.
-//
-// bMachine - Pause machine or user policy
-//
-// Returns: Handle if successful
-// NULL if not. Call GetLastError() for more details
-//
-// Note 1: The handle returned should be passed to LeaveCriticalPolicySection
-// when finished. Do not close this handle, LeaveCriticalPolicySection
-// will do that.
-//
-// Note 2: If both user and machine critical sections need to be acquired then
-// they should be done in this order: first acquire user critical section and
-// then acquire machine critical section.
-//
-//=============================================================================
-
-function EnterCriticalPolicySection(bMachine: BOOL): HANDLE; stdcall;
-{$EXTERNALSYM EnterCriticalPolicySection}
-
-//=============================================================================
-//
-// LeaveCriticalPolicySection
-//
-// Resumes the background application of group policy. See
-// EnterCriticalPolicySection for more details.
-//
-// hSection - Handle returned from EnterCriticalPolicySection
-//
-// Returns: TRUE if successful
-// FALSE if not. Call GetLastError() for more details
-//
-// Note: This function will close the handle.
-//
-//=============================================================================
-
-function LeaveCriticalPolicySection(hSection: HANDLE): BOOL; stdcall;
-{$EXTERNALSYM LeaveCriticalPolicySection}
-
-//=============================================================================
-//
-// RegisterGPNotification
-//
-// Entry point for registering for Group Policy change notification.
-//
-// Parameters: hEvent - Event to be notified, by calling SetEvent(hEvent)
-// bMachine - If true, then register machine policy notification
-// else register user policy notification
-//
-// Returns: True if successful
-// False if error occurs
-//
-// Notes: Group Policy Notifications. There are 2 ways an application can
-// be notify when Group Policy is finished being applied.
-//
-// 1) Using the RegisterGPNotifcation function and waiting for the
-// event to be signalled.
-//
-// 2) A WM_SETTINGCHANGE message is broadcast to all desktops.
-// wParam - 1 if machine policy was applied, 0 if user policy was applied.
-// lParam - Points to the string "Policy"
-//
-//=============================================================================
-
-function RegisterGPNotification(hEvent: HANDLE; bMachine: BOOL): BOOL; stdcall;
-{$EXTERNALSYM RegisterGPNotification}
-
-//=============================================================================
-//
-// UnregisterGPNotification
-//
-// Removes registration for a Group Policy change notification.
-//
-// Parameters: hEvent - Event to be removed
-//
-// Returns: True if successful
-// False if error occurs
-//
-//=============================================================================
-
-function UnregisterGPNotification(hEvent: HANDLE): BOOL; stdcall;
-{$EXTERNALSYM UnregisterGPNotification}
-
-//=============================================================================
-//
-// GPOptions flags
-//
-// These are the flags found in the GPOptions property of a DS object
-//
-// For a given DS object (Site, Domain, OU), the GPOptions property
-// contains options that effect all the GPOs link to this SDOU.
-//
-// This is a DWORD type
-//
-//=============================================================================
-
-const
- GPC_BLOCK_POLICY = $00000001; // Block all non-forced policy from above
- {$EXTERNALSYM GPC_BLOCK_POLICY}
-
-//=============================================================================
-//
-// GPLink flags
-//
-// These are the flags found on the GPLink property of a DS object after
-// the GPO path.
-//
-// For a given DS object (Site, Domain, OU), the GPLink property will
-// be in this text format
-//
-// [LDAP://CN={E615A0E3-C4F1-11D1-A3A7-00AA00615092},CN=Policies,CN=System,DC=mydomain,DC=Microsoft,DC=Com;1]
-//
-// The GUID is the GPO name, and the number following the LDAP path are the options
-// for that link from this DS object. Note, there can be multiple GPOs
-// each in their own square brackets in a prioritized list.
-//
-//=============================================================================
-
-//
-// Options for a GPO link
-//
-
-const
- GPO_FLAG_DISABLE = $00000001; // This GPO is disabled
- {$EXTERNALSYM GPO_FLAG_DISABLE}
- GPO_FLAG_FORCE = $00000002; // Don't override the settings in
- {$EXTERNALSYM GPO_FLAG_FORCE} // this GPO with settings from a GPO below it.
-
-//=============================================================================
-//
-// GetGPOList
-//
-//
-// Queries for the list of Group Policy Objects for the specified
-// user or machine. This function will return a link list
-// of Group Policy Objects. Call FreeGPOList to free the list.
-//
-// Note, most applications will not need to call this function.
-// This will primarily be used by services acting on behalf of
-// another user or machine. The caller of this function will
-// need to look in each GPO for their specific policy
-//
-// This function can be called in two different ways. Either the hToken for
-// a user or machine can be supplied and the correct name and domain
-// controller name will be generated, or hToken is NULL and the caller
-// must supply the name and the domain controller name.
-//
-// Calling this function with an hToken ensures the list of Group Policy
-// Objects is correct for the user or machine since security access checking
-// can be perfomed. If hToken is not supplied, the security of the caller
-// is used instead which means that list may or may not be 100% correct
-// for the intended user / machine. However, this is the fastest way
-// to call this function.
-//
-// hToken - User or machine token, if NULL, lpName and lpHostName must be supplied
-// lpName - User or machine name in DN format, if hToken is supplied, this must be NULL
-// lpHostName - Domain DN name or domain controller name. If hToken is supplied, this must be NULL
-// lpComputerName - Computer name to use to determine site location. If NULL,
-// the local computer is used as the reference. Format: \\machinename
-// dwFlags - Flags field. See flags definition below
-// pGPOList - Address of a pointer which receives the link list of GPOs
-//
-//
-// Returns: TRUE if successful
-// FALSE if not. Use GetLastError() for more details.
-//
-// Examples:
-//
-// Here's how this function will typically be called for
-// looking up the list of GPOs for a user:
-//
-// LPGROUP_POLICY_OBJECT pGPOList;
-//
-// if (GetGPOList (hToken, NULL, NULL, NULL, 0, &pGPOList))
-// {
-// // do processing here...
-// FreeGPOList (pGPOList);
-// }
-//
-//
-// Here's how this function will typically be called for
-// looking up the list of GPOs for a machine:
-//
-// LPGROUP_POLICY_OBJECT pGPOList;
-//
-// if (GetGPOList (NULL, lpMachineName, lpHostName, lpMachineName,
-// GPO_LIST_FLAG_MACHINE, &pGPOList))
-// {
-// // do processing here...
-// FreeGPOList (pGPOList);
-// }
-//
-//=============================================================================
-
-//
-// Each Group Policy Object is associated (linked) with a site, domain,
-// organizational unit, or machine.
-//
-
-type
- _GPO_LINK = (
- GPLinkUnknown, // No link information available
- GPLinkMachine, // GPO linked to a machine (local or remote)
- GPLinkSite, // GPO linked to a site
- GPLinkDomain, // GPO linked to a domain
- GPLinkOrganizationalUnit); // GPO linked to a organizational unit
- {$EXTERNALSYM _GPO_LINK}
- GPO_LINK = _GPO_LINK;
- {$EXTERNALSYM GPO_LINK}
- PGPO_LINK = ^GPO_LINK;
- {$EXTERNALSYM PGPO_LINK}
- TGpoLink = GPO_LINK;
- PGpoLink = PGPO_LINK;
-
- PGROUP_POLICY_OBJECTA = ^GROUP_POLICY_OBJECTA;
- {$EXTERNALSYM PGROUP_POLICY_OBJECTA}
- _GROUP_POLICY_OBJECTA = record
- dwOptions: DWORD; // See GPLink option flags above
- dwVersion: DWORD; // Revision number of the GPO
- lpDSPath: LPSTR; // Path to the Active Directory portion of the GPO
- lpFileSysPath: LPSTR; // Path to the file system portion of the GPO
- lpDisplayName: LPSTR; // Friendly display name
- szGPOName: array [0..49] of CHAR; // Unique name
- GPOLink: GPO_LINK; // Link information
- lParam: LPARAM; // Free space for the caller to store GPO specific information
- pNext: PGROUP_POLICY_OBJECTA; // Next GPO in the list
- pPrev: PGROUP_POLICY_OBJECTA; // Previous GPO in the list
- lpExtensions: LPSTR; // Extensions that are relevant for this GPO
- lParam2: LPARAM; // Free space for the caller to store GPO specific information
- lpLink: LPSTR; // Path to the Active Directory site, domain, or organizational unit this GPO is linked to
- // If this is the local GPO, this points to the word "Local"
- end;
- {$EXTERNALSYM _GROUP_POLICY_OBJECTA}
- GROUP_POLICY_OBJECTA = _GROUP_POLICY_OBJECTA;
- {$EXTERNALSYM GROUP_POLICY_OBJECTA}
- TGroupPolicyObjectA = GROUP_POLICY_OBJECTA;
- PGroupPolicyObjectA = PGROUP_POLICY_OBJECTA;
-
- PGROUP_POLICY_OBJECTW = ^GROUP_POLICY_OBJECTW;
- {$EXTERNALSYM PGROUP_POLICY_OBJECTW}
- _GROUP_POLICY_OBJECTW = record
- dwOptions: DWORD; // See GPLink option flags above
- dwVersion: DWORD; // Revision number of the GPO
- lpDSPath: LPWSTR; // Path to the Active Directory portion of the GPO
- lpFileSysPath: LPWSTR; // Path to the file system portion of the GPO
- lpDisplayName: LPWSTR; // Friendly display name
- szGPOName: array [0..49] of WCHAR; // Unique name
- GPOLink: GPO_LINK; // Link information
- lParam: LPARAM; // Free space for the caller to store GPO specific information
- pNext: PGROUP_POLICY_OBJECTW; // Next GPO in the list
- pPrev: PGROUP_POLICY_OBJECTW; // Previous GPO in the list
- lpExtensions: LPWSTR; // Extensions that are relevant for this GPO
- lParam2: LPARAM; // Free space for the caller to store GPO specific information
- lpLink: LPWSTR; // Path to the Active Directory site, domain, or organizational unit this GPO is linked to
- // If this is the local GPO, this points to the word "Local"
- end;
- {$EXTERNALSYM _GROUP_POLICY_OBJECTW}
- GROUP_POLICY_OBJECTW = _GROUP_POLICY_OBJECTW;
- {$EXTERNALSYM GROUP_POLICY_OBJECTW}
- TGroupPolicyObjectW = GROUP_POLICY_OBJECTW;
- PGroupPolicyObjectW = PGROUP_POLICY_OBJECTW;
-
- PPGROUP_POLICY_OBJECTA = ^PGROUP_POLICY_OBJECTA;
- {$NODEFINE PPGROUP_POLICY_OBJECTA}
- PPGROUP_POLICY_OBJECTW = ^PGROUP_POLICY_OBJECTW;
- {$NODEFINE PPGROUP_POLICY_OBJECTW}
-
- {$IFDEF UNICODE}
- GROUP_POLICY_OBJECT = GROUP_POLICY_OBJECTW;
- {$EXTERNALSYM GROUP_POLICY_OBJECT}
- PGROUP_POLICY_OBJECT = PGROUP_POLICY_OBJECTW;
- {$EXTERNALSYM PGROUP_POLICY_OBJECT}
- PPGROUP_POLICY_OBJECT = PPGROUP_POLICY_OBJECTW;
- {$NODEFINE PPGROUP_POLICY_OBJECT}
- TGroupPolicyObject = TGroupPolicyObjectW;
- PGroupPolicyObject = PGroupPolicyObjectW;
- {$ELSE}
- GROUP_POLICY_OBJECT = GROUP_POLICY_OBJECTA;
- {$EXTERNALSYM GROUP_POLICY_OBJECT}
- PGROUP_POLICY_OBJECT = PGROUP_POLICY_OBJECTA;
- {$EXTERNALSYM PGROUP_POLICY_OBJECT}
- PPGROUP_POLICY_OBJECT = PPGROUP_POLICY_OBJECTA;
- {$NODEFINE PPGROUP_POLICY_OBJECT}
- TGroupPolicyObject = TGroupPolicyObjectA;
- PGroupPolicyObject = PGroupPolicyObjectA;
- {$ENDIF UNICODE}
-
-//
-// dwFlags for GetGPOList()
-//
-
-const
- GPO_LIST_FLAG_MACHINE = $00000001; // Return machine policy information
- {$EXTERNALSYM GPO_LIST_FLAG_MACHINE}
- GPO_LIST_FLAG_SITEONLY = $00000002; // Return site policy information only
- {$EXTERNALSYM GPO_LIST_FLAG_SITEONLY}
-
-function GetGPOListA(hToken: HANDLE; lpName: LPCSTR; lpHostName: LPCSTR;
- lpComputerName: LPCSTR; dwFlags: DWORD; pGPOList: PPGROUP_POLICY_OBJECTA): BOOL; stdcall;
-{$EXTERNALSYM GetGPOListA}
-function GetGPOListW(hToken: HANDLE; lpName: LPCWSTR; lpHostName: LPCWSTR;
- lpComputerName: LPCWSTR; dwFlags: DWORD; pGPOList: PPGROUP_POLICY_OBJECTW): BOOL; stdcall;
-{$EXTERNALSYM GetGPOListW}
-function GetGPOList(hToken: HANDLE; lpName: LPCTSTR; lpHostName: LPCTSTR;
- lpComputerName: LPCTSTR; dwFlags: DWORD; pGPOList: PPGROUP_POLICY_OBJECT): BOOL; stdcall;
-{$EXTERNALSYM GetGPOList}
-
-//=============================================================================
-//
-// FreeGPOList
-//
-//
-// Frees the linked list returned from GetGPOList
-//
-// pGPOList - Pointer to the linked list of GPOs
-//
-//
-// Returns: TRUE if successful
-// FALSE if not
-//
-//=============================================================================
-
-function FreeGPOListA(pGPOList: PGROUP_POLICY_OBJECTA): BOOL; stdcall;
-{$EXTERNALSYM FreeGPOListA}
-function FreeGPOListW(pGPOList: PGROUP_POLICY_OBJECTW): BOOL; stdcall;
-{$EXTERNALSYM FreeGPOListW}
-function FreeGPOList(pGPOList: PGROUP_POLICY_OBJECT): BOOL; stdcall;
-{$EXTERNALSYM FreeGPOList}
-
-//=============================================================================
-//
-// GetAppliedGPOList
-//
-// Queries for the list of applied Group Policy Objects for the specified
-// user or machine and specified client side extension. This function will return
-// a linked listof Group Policy Objects. Call FreeGPOList to free the list.
-//
-// dwFlags - User or machine policy, if it is GPO_LIST_FLAG_MACHINE then
-// return machine policy information
-// pMachineName - Name of remote computer in the form \\computername. If null
-// then local computer is used.
-// pSidUser - Security id of user (relevant for user policy). If pMachineName is
-// null and pSidUser is null then it means current logged on user.
-// If pMachine is null and pSidUser is non-null then it means user
-// represented by pSidUser on local machine. If pMachineName is non-null
-// then and if dwFlags specifies user policy, then pSidUser must be
-// non-null.
-// pGuidExtension - Guid of the specified extension
-// ppGPOList - Address of a pointer which receives the link list of GPOs
-//
-// The return value is a Win32 error code. ERROR_SUCCESS means the GetAppliedGPOList
-// function completed successfully. Otherwise it indicates that the function failed.
-//
-//=============================================================================
-
-function GetAppliedGPOListA(dwFlags: DWORD; pMachineName: LPCSTR; pSidUser: PSID;
- pGuidExtension: LPGUID; ppGPOList: PPGROUP_POLICY_OBJECTA): DWORD; stdcall;
-{$EXTERNALSYM GetAppliedGPOListA}
-function GetAppliedGPOListW(dwFlags: DWORD; pMachineName: LPCWSTR; pSidUser: PSID;
- pGuidExtension: LPGUID; ppGPOList: PPGROUP_POLICY_OBJECTW): DWORD; stdcall;
-{$EXTERNALSYM GetAppliedGPOListW}
-function GetAppliedGPOList(dwFlags: DWORD; pMachineName: LPCTSTR; pSidUser: PSID;
- pGuidExtension: LPGUID; ppGPOList: PPGROUP_POLICY_OBJECT): DWORD; stdcall;
-{$EXTERNALSYM GetAppliedGPOList}
-
-//=============================================================================
-//
-// Group Policy Object client side extension support
-//
-// Flags, data structures and function prototype
-//
-// To register your extension, create a subkey under this key
-//
-// Software\Microsoft\Windows NT\CurrentVersion\Winlogon\GPExtensions
-//
-// The subkey needs to be a guid so that it is unique. The noname value of the subkey
-// can be the friendly name of the extension. Then add these values:
-//
-// DllName REG_EXPAND_SZ Path to your DLL
-// ProcessGroupPolicy REG_SZ Function name (see PFNPROCESSGROUPPOLICY prototype). This
-// is obsolete, it has been superseded by ProcessGroupPolicyEx.
-// It's here for backward compatibility reasons only.
-// ProcessGroupPolicyEx REG_SZ Function name (see PFNPROCESSGROUPPOLICYEX prototype)
-// GenerateGroupPolicy REG_SZ Function name for Rsop (see PFNGENERATEGROUPPOLICY prototype)
-// NoMachinePolicy REG_DWORD True, if extension does not have to be called when
-// machine policies are being processed.
-// NoUserPolicy REG_DWORD True, if extension does not have to be called when
-// user policies are being processed.
-// NoSlowLink REG_DWORD True, if extension does not have to be called on a slow link
-// NoBackgroundPolicy REG_DWORD True, if extension does not have to be called
-// for background policy processing.
-// NoGPOListChanges REG_DWORD True, if extension does not have to be called when
-// there are no changes between cached and current GPO lists.
-// PerUserLocalSettings REG_DWORD True, if user policies have to be cached on a per user and
-// per machine basis.
-// RequiresSuccessfulRegistry REG_DWORD True, if extension should be called only if registry extension
-// was successfully processed.
-// EnableAsynchronousProcessing REG_DWORD True, if registry extension will complete its processing
-// asynchronously.
-// NotifyLinkTransition REG_DWORD True, if extension should be called when a change in link
-// speed is detected between previous policy application and
-// current policy application.
-//
-// The return value is a Win32 error code. ERROR_SUCCESS means the ProcessGroupPolicy
-// function completed successfully. If return value is ERROR_OVERRIDE_NOCHANGES then it
-// means that the extension will be called the next time even if NoGPOListChanges is set
-// and there are no changes to the GPO list. Any other return value indicates that the
-// ProcessGroupPolicy or ProcessGroupPolicyEx function failed.
-//
-//=============================================================================
-
-const
- GP_DLLNAME = 'DllName';
- {$EXTERNALSYM GP_DLLNAME}
- GP_ENABLEASYNCHRONOUSPROCESSING = 'EnableAsynchronousProcessing';
- {$EXTERNALSYM GP_ENABLEASYNCHRONOUSPROCESSING}
- GP_MAXNOGPOLISTCHANGESINTERVAL = 'MaxNoGPOListChangesInterval';
- {$EXTERNALSYM GP_MAXNOGPOLISTCHANGESINTERVAL}
- GP_NOBACKGROUNDPOLICY = 'NoBackgroundPolicy';
- {$EXTERNALSYM GP_NOBACKGROUNDPOLICY}
- GP_NOGPOLISTCHANGES = 'NoGPOListChanges';
- {$EXTERNALSYM GP_NOGPOLISTCHANGES}
- GP_NOMACHINEPOLICY = 'NoMachinePolicy';
- {$EXTERNALSYM GP_NOMACHINEPOLICY}
- GP_NOSLOWLINK = 'NoSlowLink';
- {$EXTERNALSYM GP_NOSLOWLINK}
- GP_NOTIFYLINKTRANSITION = 'NotifyLinkTransition';
- {$EXTERNALSYM GP_NOTIFYLINKTRANSITION}
- GP_NOUSERPOLICY = 'NoUserPolicy';
- {$EXTERNALSYM GP_NOUSERPOLICY}
- GP_PERUSERLOCALSETTINGS = 'PerUserLocalSettings';
- {$EXTERNALSYM GP_PERUSERLOCALSETTINGS}
- GP_PROCESSGROUPPOLICY = 'ProcessGroupPolicy';
- {$EXTERNALSYM GP_PROCESSGROUPPOLICY}
- GP_REQUIRESSUCCESSFULREGISTRY = 'RequiresSuccessfulRegistry';
- {$EXTERNALSYM GP_REQUIRESSUCCESSFULREGISTRY}
-
- GPO_INFO_FLAG_MACHINE = $00000001; // Apply machine policy rather than user policy
- {$EXTERNALSYM GPO_INFO_FLAG_MACHINE}
- GPO_INFO_FLAG_BACKGROUND = $00000010; // Background refresh of policy (ok to do slow stuff)
- {$EXTERNALSYM GPO_INFO_FLAG_BACKGROUND}
- GPO_INFO_FLAG_SLOWLINK = $00000020; // Policy is being applied across a slow link
- {$EXTERNALSYM GPO_INFO_FLAG_SLOWLINK}
- GPO_INFO_FLAG_VERBOSE = $00000040; // Verbose output to the eventlog
- {$EXTERNALSYM GPO_INFO_FLAG_VERBOSE}
- GPO_INFO_FLAG_NOCHANGES = $00000080; // No changes were detected to the Group Policy Objects
- {$EXTERNALSYM GPO_INFO_FLAG_NOCHANGES}
- GPO_INFO_FLAG_LINKTRANSITION = $00000100; // A change in link speed was detected between previous policy
- {$EXTERNALSYM GPO_INFO_FLAG_LINKTRANSITION} // application and current policy application
-
- GPO_INFO_FLAG_LOGRSOP_TRANSITION = $00000200; // A Change in Rsop Logging was detected between previous policy
- {$EXTERNALSYM GPO_INFO_FLAG_LOGRSOP_TRANSITION} // application and current policy application, (new intf only)
-
- GPO_INFO_FLAG_FORCED_REFRESH = $00000400; // Forced Refresh is being applied. redo policies.
- {$EXTERNALSYM GPO_INFO_FLAG_FORCED_REFRESH}
- GPO_INFO_FLAG_SAFEMODE_BOOT = $00000800; // windows safe mode boot flag
- {$EXTERNALSYM GPO_INFO_FLAG_SAFEMODE_BOOT}
- GPO_INFO_FLAG_ASYNC_FOREGROUND = $00001000; // Asynchronous foreground refresh of policy
- {$EXTERNALSYM GPO_INFO_FLAG_ASYNC_FOREGROUND}
- GPO_INFO_FLAG_REPORT = $00002000; // Report all settings for one GPO rather than the resultant settings across multiple GPOs
- {$EXTERNALSYM GPO_INFO_FLAG_REPORT}
-
-type
- ASYNCCOMPLETIONHANDLE = UINT_PTR;
- {$EXTERNALSYM ASYNCCOMPLETIONHANDLE}
-
- PFNSTATUSMESSAGECALLBACK = function(bVerbose: BOOL; lpMessage: LPWSTR): DWORD; stdcall;
- {$EXTERNALSYM PFNSTATUSMESSAGECALLBACK}
-
- PFNPROCESSGROUPPOLICY = function(
- dwFlags: DWORD; // GPO_INFO_FLAGS
- hToken: HANDLE; // User or machine token
- hKeyRoot: HKEY; // Root of registry
- pDeletedGPOList: PGROUP_POLICY_OBJECT; // Linked list of deleted GPOs
- pChangedGPOList: PGROUP_POLICY_OBJECT; // Linked list of changed GPOs
- pHandle: ASYNCCOMPLETIONHANDLE; // For asynchronous completion
- pbAbort: LPBOOL; // If true, then abort GPO processing
- pStatusCallback: PFNSTATUSMESSAGECALLBACK // Callback function for displaying status messages
- ): DWORD; stdcall; // Note, this can be NULL
- {$EXTERNALSYM PFNPROCESSGROUPPOLICY}
-
- PFNPROCESSGROUPPOLICYEX = function(
- dwFlags: DWORD; // GPO_INFO_FLAGS
- hToken: HANDLE; // User or machine token
- hKeyRoot: HKEY; // Root of registry
- pDeletedGPOList: PGROUP_POLICY_OBJECT; // Linked list of deleted GPOs
- pChangedGPOList: PGROUP_POLICY_OBJECT; // Linked list of changed GPOs
- pHandle: ASYNCCOMPLETIONHANDLE; // For asynchronous completion
- pbAbort: PBOOL; // If true, then abort GPO processing
- pStatusCallback: PFNSTATUSMESSAGECALLBACK; // Callback function for displaying status messages
- // Note, this can be NULL
- pWbemServices: IWbemServices; // Pointer to namespace to log diagnostic mode data
- // Note, this will be NULL when Rsop logging is disabled
- var pRsopStatus: HRESULT // RSOP Logging succeeded or not.
- ): DWORD; stdcall;
- {$EXTERNALSYM PFNPROCESSGROUPPOLICYEX}
-
- PRSOPTOKEN = PVOID;
- {$EXTERNALSYM PRSOPTOKEN}
-
- _RSOP_TARGET = record
- pwszAccountName: PWCHAR; // Account name
- pwszNewSOM: PWCHAR; // New domain or OU location for account
- psaSecurityGroups: PSafeArray; // New security groups
- pRsopToken: PRSOPTOKEN; // Rsop token for use with Rsop security Api's
- pGPOList: PGROUP_POLICY_OBJECT; // Linked list of GPOs
- pWbemServices: IWbemServices; // Pointer to namespace to log planning mode data
- end;
- {$EXTERNALSYM _RSOP_TARGET}
- RSOP_TARGET = _RSOP_TARGET;
- {$EXTERNALSYM RSOP_TARGET}
- PRSOP_TARGET = ^RSOP_TARGET;
- {$EXTERNALSYM PRSOP_TARGET}
- TRsopTarget = RSOP_TARGET;
- PRsopTarget = PRSOP_TARGET;
-
- PFNGENERATEGROUPPOLICY = function(
- dwFlags: DWORD; // GPO_INFO_FLAGS
- var pbAbort: BOOL; // If true, then abort GPO processing
- pwszSite: PWCHAR; // Site the target computer is in
- pComputerTarget: PRSOP_TARGET; // Computer target info, can be null
- pUserTarget: PRSOP_TARGET // User target info, can be null
- ): DWORD; stdcall;
- {$EXTERNALSYM PFNGENERATEGROUPPOLICY}
-
-//
-// GUID that identifies the registry extension
-//
-
-const
- REGISTRY_EXTENSION_GUID: GUID = (
- D1: $35378EAC; D2:$683F; D3:$11D2; D4:($A8, $9A, $00, $C0, $4F, $BB, $CF, $A2));
- {$EXTERNALSYM REGISTRY_EXTENSION_GUID}
-
-//=============================================================================
-//
-// Group Policy Object client side asynchronous extension processing
-//
-// extensionId - Unique guid identifying the extension
-// pAsyncHandle - Asynchronous completion handle that was passed to extension in
-// ProcessGroupPolicy call
-// dwStatus - Completion status of asynchronous processing
-//
-// The return value is a Win32 error code. ERROR_SUCCESS means the ProcessGroupPolicyCompleted
-// function completed successfully. Otherwise it indicates that the function failed.
-//
-//=============================================================================
-
-type
- REFGPEXTENSIONID = LPGUID;
- {$EXTERNALSYM REFGPEXTENSIONID}
-
-function ProcessGroupPolicyCompleted(extensionId: REFGPEXTENSIONID;
- pAsyncHandle: ASYNCCOMPLETIONHANDLE; dwStatus: DWORD): DWORD; stdcall;
-{$EXTERNALSYM ProcessGroupPolicyCompleted}
-
-//=============================================================================
-//
-// Group Policy Object client side asynchronous extension processing
-//
-// extensionId - Unique guid identifying the extension
-// pAsyncHandle - Asynchronous completion handle that was passed to extension in
-// ProcessGroupPolicy call
-// dwStatus - Completion status of asynchronous processing
-// RsopStatus - RSoP Logging status
-//
-// The return value is a Win32 error code. ERROR_SUCCESS means the ProcessGroupPolicyCompleted
-// function completed successfully. Otherwise it indicates that the function failed.
-//
-//=============================================================================
-
-function ProcessGroupPolicyCompletedEx(extensionId: REFGPEXTENSIONID; pAsyncHandle: ASYNCCOMPLETIONHANDLE;
- dwStatus: DWORD; RsopStatus: HRESULT): DWORD; stdcall;
-{$EXTERNALSYM ProcessGroupPolicyCompletedEx}
-
-//=============================================================================
-//
-// Function: RsopAccessCheckByType
-//
-// Description: Determines whether the security descriptor pointed to by pSecurityDescriptor
-// grants the set of access rights specified in dwDesiredAccessMask
-// to the client identified by the RSOPTOKEN pointed to by pRsopToken.
-//
-// pSecurityDescriptor - Security Descriptor on the object
-// pPrincipalSelfSid - Principal Sid
-// pRsopToken - Pointer to a valid RSOPTOKEN against which access needs to be checked
-// dwDesiredAccessMask - Mask of requested generic and/or standard and or specific access rights
-// pObjectTypeList - Object Type List
-// ObjectTypeListLength - Object Type List Length
-// pGenericMapping - Generic Mapping
-// pPrivilegeSet - privilege set
-// pdwPrivilegeSetLength- privilege set length
-// pdwGrantedAccessMask - On success, if pbAccessStatus is true, it contains
-// the mask of standard and specific rights granted.
-// If pbAccessStatus is false, it is set to 0.
-// On failure, it is not modified.
-// pbAccessStatus - On success, indicates wether the requested set
-// of access rights was granted.
-// On failure, it is not modified
-//
-// Returns S_OK on success or appropriate error code.
-// For additional details, look at the documentation of AccessCheckByType
-//=============================================================================
-
-function RsopAccessCheckByType(pSecurityDescriptor: PSECURITY_DESCRIPTOR; pPrincipalSelfSid: PSID;
- pRsopToken: PRSOPTOKEN; dwDesiredAccessMask: DWORD; pObjectTypeList: POBJECT_TYPE_LIST;
- ObjectTypeListLength: DWORD; pGenericMapping: PGENERIC_MAPPING; pPrivilegeSet: PPRIVILEGE_SET;
- pdwPrivilegeSetLength: LPDWORD; pdwGrantedAccessMask: LPDWORD; pbAccessStatus: LPBOOL): HRESULT; stdcall;
-{$EXTERNALSYM RsopAccessCheckByType}
-
-//=============================================================================
-//
-// Function: RsopFileAccessCheck
-//
-// Description: Determines whether the security descriptor on the file grants the set of file access
-// rights specified in dwDesiredAccessMask
-// to the client identified by the RSOPTOKEN pointed to by pRsopToken.
-//
-// pszFileName - Name of an existing filename
-// pRsopToken - Pointer to a valid RSOPTOKEN against which access needs to be checked
-// dwDesiredAccessMask - Mask of requested generic and/or standard and or specific access rights
-// pdwGrantedAccessMask - On success, if pbAccessStatus is true, it contains
-// the mask of standard and specific rights granted.
-// If pbAccessStatus is false, it is set to 0.
-// On failure, it is not modified.
-// pbAccessStatus - On success, indicates wether the requested set
-// of access rights was granted.
-// On failure, it is not modified
-//
-// Returns S_OK on success or appropriate error code
-//=============================================================================
-
-function RsopFileAccessCheck(pszFileName: LPWSTR; pRsopToken: PRSOPTOKEN; dwDesiredAccessMask: DWORD;
- pdwGrantedAccessMask: LPDWORD; pbAccessStatus: LPBOOL): HRESULT; stdcall;
-{$EXTERNALSYM RsopFileAccessCheck}
-
-type
- _SETTINGSTATUS = (
- RSOPUnspecified,
- RSOPApplied,
- RSOPIgnored,
- RSOPFailed,
- RSOPSubsettingFailed);
- {$EXTERNALSYM _SETTINGSTATUS}
- SETTINGSTATUS = _SETTINGSTATUS;
- {$EXTERNALSYM SETTINGSTATUS}
- TSettingStatus = SETTINGSTATUS;
-
-//=============================================================================
-//
-// POLICYSETTINGSTATUSINFO
-//
-// Describes the instance of RSOP_PolicySettingStatus
-//
-// szKey - OPTIONAL, if NULL, the key is generated on the fly
-// szEventSource - name of the source generation event log messages
-// szEventLogName - name of the event log database where the messages are logged
-// dwEventID - event log message ID
-// status - status of the policy setting
-// timeLogged - time at which the event log message was logged
-//
-//=============================================================================
-
-type
- _POLICYSETTINGSTATUSINFO = record
- szKey: LPWSTR;
- szEventSource: LPWSTR;
- szEventLogName: LPWSTR;
- dwEventID: DWORD;
- dwErrorCode: DWORD;
- status: SETTINGSTATUS;
- timeLogged: SYSTEMTIME;
- end;
- {$EXTERNALSYM _POLICYSETTINGSTATUSINFO}
- POLICYSETTINGSTATUSINFO = _POLICYSETTINGSTATUSINFO;
- {$EXTERNALSYM POLICYSETTINGSTATUSINFO}
- LPPOLICYSETTINGSTATUSINFO = ^POLICYSETTINGSTATUSINFO;
- {$EXTERNALSYM LPPOLICYSETTINGSTATUSINFO}
- TPolicySettingStatusInfo = POLICYSETTINGSTATUSINFO;
- PPolicySettingStatusInfo = LPPOLICYSETTINGSTATUSINFO;
-
-//=============================================================================
-//
-// RsopSetPolicySettingStatus
-//
-// Creates an instance of RSOP_PolicySettingStatus and RSOP_PolicySettingLink
-// and links RSOP_PolicySettingStatus to RSOP_PolicySetting
-//
-// dwFlags - flags
-// pServices - RSOP namespace
-// pSettingInstance - instance of RSOP_PolicySetting or its children
-// nInfo - number of PolicySettingStatusInfo
-// pStatus - array of PolicySettingStatusInfo
-//
-// Return: S_OK if successful, HRESULT otherwise
-//
-//=============================================================================
-
-function RsopSetPolicySettingStatus(dwFlags: DWORD; pServices: IWbemServices;
- pSettingInstance: IWbemClassObject; nInfo: DWORD;
- pStatus: LPPOLICYSETTINGSTATUSINFO): HRESULT; stdcall;
-{$EXTERNALSYM RsopSetPolicySettingStatus}
-
-//=============================================================================
-//
-// RsopResetPolicySettingStatus
-//
-// Unlinks RSOP_PolicySettingStatus from RSOP_PolicySetting,
-// deletes the instance of RSOP_PolicySettingStatus and RSOP_PolicySettingLink
-// and optionally deletes the instance of RSOP_PolicySetting
-//
-// dwFlags - flags
-// pServices - RSOP namespace
-// pSettingInstance - instance of RSOP_PolicySetting or its children
-//
-// Return: S_OK if successful, HRESULT otherwise
-//
-//=============================================================================
-
-function RsopResetPolicySettingStatus(dwFlags: DWORD; pServices: IWbemServices;
- pSettingInstance: IWbemClassObject): HRESULT; stdcall;
-{$EXTERNALSYM RsopResetPolicySettingStatus}
-
-//=============================================================================
-//
-// Flags for RSoP WMI providers
-//
-//=============================================================================
-
-// planning mode provider flags
-
-const
- FLAG_NO_GPO_FILTER = DWORD($80000000); // GPOs are not filtered, implies FLAG_NO_CSE_INVOKE
- {$EXTERNALSYM FLAG_NO_GPO_FILTER}
- FLAG_NO_CSE_INVOKE = $40000000; // only GP processing done for planning mode
- {$EXTERNALSYM FLAG_NO_CSE_INVOKE}
- FLAG_ASSUME_SLOW_LINK = $20000000; // planning mode RSoP assumes slow link
- {$EXTERNALSYM FLAG_ASSUME_SLOW_LINK}
- FLAG_LOOPBACK_MERGE = $10000000; // planning mode RSoP assumes merge loop back
- {$EXTERNALSYM FLAG_LOOPBACK_MERGE}
- FLAG_LOOPBACK_REPLACE = $08000000; // planning mode RSoP assumes replace loop back
- {$EXTERNALSYM FLAG_LOOPBACK_REPLACE}
-
- FLAG_ASSUME_USER_WQLFILTER_TRUE = $04000000; // planning mode RSoP assumes all comp filters to be true
- {$EXTERNALSYM FLAG_ASSUME_USER_WQLFILTER_TRUE}
- FLAG_ASSUME_COMP_WQLFILTER_TRUE = $02000000; // planning mode RSoP assumes all user filters to be true
- {$EXTERNALSYM FLAG_ASSUME_COMP_WQLFILTER_TRUE}
-
- FLAG_PLANNING_MODE = $01000000; // flag that indicates that a given namespace was created
- {$EXTERNALSYM FLAG_PLANNING_MODE} // for planning mode. This flag cannot be passed in but the
- // relevant subnamespace will be marked with this flag
-
-// diagnostic mode provider flags
-
- FLAG_NO_USER = $00000001; // Don't get any user data
- {$EXTERNALSYM FLAG_NO_USER}
- FLAG_NO_COMPUTER = $00000002; // Don't get any machine data
- {$EXTERNALSYM FLAG_NO_COMPUTER}
- FLAG_FORCE_CREATENAMESPACE = $00000004; // Delete and recreate the namespace for this snapshot.
- {$EXTERNALSYM FLAG_FORCE_CREATENAMESPACE}
-
-//=============================================================================
-//
-// Extended Errors returned by RSoP WMI Providers
-//
-//=============================================================================
-
-// User accessing the rsop provider doesn't have access to user data.
-
- RSOP_USER_ACCESS_DENIED = $00000001;
- {$EXTERNALSYM RSOP_USER_ACCESS_DENIED}
-
-// User accessing the rsop provider doesn't have access to computer data.
-
- RSOP_COMPUTER_ACCESS_DENIED = $00000002;
- {$EXTERNALSYM RSOP_COMPUTER_ACCESS_DENIED}
-
-// This user is an interactive non admin user, the temp snapshot namespace already exists
-// and the FLAG_FORCE_CREATENAMESPACE was not passed in
-
- RSOP_TEMPNAMESPACE_EXISTS = $00000004;
- {$EXTERNALSYM RSOP_TEMPNAMESPACE_EXISTS}
-
-implementation
-
-const
- userenvlib = 'userenv.dll';
- {$IFDEF UNICODE}
- AWSuffix = 'W';
- {$ELSE}
- AWSuffix = 'A';
- {$ENDIF UNICODE}
-
-{$IFDEF DYNAMIC_LINK}
-
-var
- _LoadUserProfileA: Pointer;
-
-function LoadUserProfileA;
-begin
- GetProcedureAddress(_LoadUserProfileA, userenvlib, 'LoadUserProfileA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_LoadUserProfileA]
- end;
-end;
-
-var
- _LoadUserProfileW: Pointer;
-
-function LoadUserProfileW;
-begin
- GetProcedureAddress(_LoadUserProfileW, userenvlib, 'LoadUserProfileW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_LoadUserProfileW]
- end;
-end;
-
-var
- _LoadUserProfile: Pointer;
-
-function LoadUserProfile;
-begin
- GetProcedureAddress(_LoadUserProfile, userenvlib, 'LoadUserProfile' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_LoadUserProfile]
- end;
-end;
-
-var
- _UnloadUserProfile: Pointer;
-
-function UnloadUserProfile;
-begin
- GetProcedureAddress(_UnloadUserProfile, userenvlib, 'UnloadUserProfile');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_UnloadUserProfile]
- end;
-end;
-
-var
- _GetProfilesDirectoryA: Pointer;
-
-function GetProfilesDirectoryA;
-begin
- GetProcedureAddress(_GetProfilesDirectoryA, userenvlib, 'GetProfilesDirectoryA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetProfilesDirectoryA]
- end;
-end;
-
-var
- _GetProfilesDirectoryW: Pointer;
-
-function GetProfilesDirectoryW;
-begin
- GetProcedureAddress(_GetProfilesDirectoryW, userenvlib, 'GetProfilesDirectoryW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetProfilesDirectoryW]
- end;
-end;
-
-var
- _GetProfilesDirectory: Pointer;
-
-function GetProfilesDirectory;
-begin
- GetProcedureAddress(_GetProfilesDirectory, userenvlib, 'GetProfilesDirectory' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetProfilesDirectory]
- end;
-end;
-
-var
- _GetProfileType: Pointer;
-
-function GetProfileType;
-begin
- GetProcedureAddress(_GetProfileType, userenvlib, 'GetProfileType');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetProfileType]
- end;
-end;
-
-var
- _DeleteProfileA: Pointer;
-
-function DeleteProfileA;
-begin
- GetProcedureAddress(_DeleteProfileA, userenvlib, 'DeleteProfileA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DeleteProfileA]
- end;
-end;
-
-var
- _DeleteProfileW: Pointer;
-
-function DeleteProfileW;
-begin
- GetProcedureAddress(_DeleteProfileW, userenvlib, 'DeleteProfileW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DeleteProfileW]
- end;
-end;
-
-var
- _DeleteProfile: Pointer;
-
-function DeleteProfile;
-begin
- GetProcedureAddress(_DeleteProfile, userenvlib, 'DeleteProfile' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DeleteProfile]
- end;
-end;
-
-var
- _GetDefaultUserProfileDirectoryA: Pointer;
-
-function GetDefaultUserProfileDirectoryA;
-begin
- GetProcedureAddress(_GetDefaultUserProfileDirectoryA, userenvlib, 'GetDefaultUserProfileDirectoryA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetDefaultUserProfileDirectoryA]
- end;
-end;
-
-var
- _GetDefaultUserProfileDirectoryW: Pointer;
-
-function GetDefaultUserProfileDirectoryW;
-begin
- GetProcedureAddress(_GetDefaultUserProfileDirectoryW, userenvlib, 'GetDefaultUserProfileDirectoryW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetDefaultUserProfileDirectoryW]
- end;
-end;
-
-var
- _GetDefaultUserProfileDirectory: Pointer;
-
-function GetDefaultUserProfileDirectory;
-begin
- GetProcedureAddress(_GetDefaultUserProfileDirectory, userenvlib, 'GetDefaultUserProfileDirectory' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetDefaultUserProfileDirectory]
- end;
-end;
-
-var
- _GetAllUsersProfileDirectoryA: Pointer;
-
-function GetAllUsersProfileDirectoryA;
-begin
- GetProcedureAddress(_GetAllUsersProfileDirectoryA, userenvlib, 'GetAllUsersProfileDirectoryA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetAllUsersProfileDirectoryA]
- end;
-end;
-
-var
- _GetAllUsersProfileDirectoryW: Pointer;
-
-function GetAllUsersProfileDirectoryW;
-begin
- GetProcedureAddress(_GetAllUsersProfileDirectoryW, userenvlib, 'GetAllUsersProfileDirectoryW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetAllUsersProfileDirectoryW]
- end;
-end;
-
-var
- _GetAllUsersProfileDirectory: Pointer;
-
-function GetAllUsersProfileDirectory;
-begin
- GetProcedureAddress(_GetAllUsersProfileDirectory, userenvlib, 'GetAllUsersProfileDirectory' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetAllUsersProfileDirectory]
- end;
-end;
-
-var
- _GetUserProfileDirectoryA: Pointer;
-
-function GetUserProfileDirectoryA;
-begin
- GetProcedureAddress(_GetUserProfileDirectoryA, userenvlib, 'GetUserProfileDirectoryA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetUserProfileDirectoryA]
- end;
-end;
-
-var
- _GetUserProfileDirectoryW: Pointer;
-
-function GetUserProfileDirectoryW;
-begin
- GetProcedureAddress(_GetUserProfileDirectoryW, userenvlib, 'GetUserProfileDirectoryW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetUserProfileDirectoryW]
- end;
-end;
-
-var
- _GetUserProfileDirectory: Pointer;
-
-function GetUserProfileDirectory;
-begin
- GetProcedureAddress(_GetUserProfileDirectory, userenvlib, 'GetUserProfileDirectory' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetUserProfileDirectory]
- end;
-end;
-
-var
- _CreateEnvironmentBlock: Pointer;
-
-function CreateEnvironmentBlock;
-begin
- GetProcedureAddress(_CreateEnvironmentBlock, userenvlib, 'CreateEnvironmentBlock');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreateEnvironmentBlock]
- end;
-end;
-
-var
- _DestroyEnvironmentBlock: Pointer;
-
-function DestroyEnvironmentBlock;
-begin
- GetProcedureAddress(_DestroyEnvironmentBlock, userenvlib, 'DestroyEnvironmentBlock');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DestroyEnvironmentBlock]
- end;
-end;
-
-var
- _ExpandEnvStringsForUserA: Pointer;
-
-function ExpandEnvironmentStringsForUserA;
-begin
- GetProcedureAddress(_ExpandEnvStringsForUserA, userenvlib, 'ExpandEnvironmentStringsForUserA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ExpandEnvStringsForUserA]
- end;
-end;
-
-var
- _ExpandEnvStringsForUserW: Pointer;
-
-function ExpandEnvironmentStringsForUserW;
-begin
- GetProcedureAddress(_ExpandEnvStringsForUserW, userenvlib, 'ExpandEnvironmentStringsForUserW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ExpandEnvStringsForUserW]
- end;
-end;
-
-var
- _ExpandEnvironmentStringsForUser: Pointer;
-
-function ExpandEnvironmentStringsForUser;
-begin
- GetProcedureAddress(_ExpandEnvironmentStringsForUser, userenvlib, 'ExpandEnvironmentStringsForUser' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ExpandEnvironmentStringsForUser]
- end;
-end;
-
-var
- _RefreshPolicy: Pointer;
-
-function RefreshPolicy;
-begin
- GetProcedureAddress(_RefreshPolicy, userenvlib, 'RefreshPolicy');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RefreshPolicy]
- end;
-end;
-
-var
- _RefreshPolicyEx: Pointer;
-
-function RefreshPolicyEx;
-begin
- GetProcedureAddress(_RefreshPolicyEx, userenvlib, 'RefreshPolicyEx');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RefreshPolicyEx]
- end;
-end;
-
-var
- _EnterCriticalPolicySection: Pointer;
-
-function EnterCriticalPolicySection;
-begin
- GetProcedureAddress(_EnterCriticalPolicySection, userenvlib, 'EnterCriticalPolicySection');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_EnterCriticalPolicySection]
- end;
-end;
-
-var
- _LeaveCriticalPolicySection: Pointer;
-
-function LeaveCriticalPolicySection;
-begin
- GetProcedureAddress(_LeaveCriticalPolicySection, userenvlib, 'LeaveCriticalPolicySection');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_LeaveCriticalPolicySection]
- end;
-end;
-
-var
- _RegisterGPNotification: Pointer;
-
-function RegisterGPNotification;
-begin
- GetProcedureAddress(_RegisterGPNotification, userenvlib, 'RegisterGPNotification');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RegisterGPNotification]
- end;
-end;
-
-var
- _UnregisterGPNotification: Pointer;
-
-function UnregisterGPNotification;
-begin
- GetProcedureAddress(_UnregisterGPNotification, userenvlib, 'UnregisterGPNotification');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_UnregisterGPNotification]
- end;
-end;
-
-var
- _GetGPOListA: Pointer;
-
-function GetGPOListA;
-begin
- GetProcedureAddress(_GetGPOListA, userenvlib, 'GetGPOListA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetGPOListA]
- end;
-end;
-
-var
- _GetGPOListW: Pointer;
-
-function GetGPOListW;
-begin
- GetProcedureAddress(_GetGPOListW, userenvlib, 'GetGPOListW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetGPOListW]
- end;
-end;
-
-var
- _GetGPOList: Pointer;
-
-function GetGPOList;
-begin
- GetProcedureAddress(_GetGPOList, userenvlib, 'GetGPOList' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetGPOList]
- end;
-end;
-
-var
- _FreeGPOListA: Pointer;
-
-function FreeGPOListA;
-begin
- GetProcedureAddress(_FreeGPOListA, userenvlib, 'FreeGPOListA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_FreeGPOListA]
- end;
-end;
-
-var
- _FreeGPOListW: Pointer;
-
-function FreeGPOListW;
-begin
- GetProcedureAddress(_FreeGPOListW, userenvlib, 'FreeGPOListW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_FreeGPOListW]
- end;
-end;
-
-var
- _FreeGPOList: Pointer;
-
-function FreeGPOList;
-begin
- GetProcedureAddress(_FreeGPOList, userenvlib, 'FreeGPOList' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_FreeGPOList]
- end;
-end;
-
-var
- _GetAppliedGPOListA: Pointer;
-
-function GetAppliedGPOListA;
-begin
- GetProcedureAddress(_GetAppliedGPOListA, userenvlib, 'GetAppliedGPOListA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetAppliedGPOListA]
- end;
-end;
-
-var
- _GetAppliedGPOListW: Pointer;
-
-function GetAppliedGPOListW;
-begin
- GetProcedureAddress(_GetAppliedGPOListW, userenvlib, 'GetAppliedGPOListW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetAppliedGPOListW]
- end;
-end;
-
-var
- _GetAppliedGPOList: Pointer;
-
-function GetAppliedGPOList;
-begin
- GetProcedureAddress(_GetAppliedGPOList, userenvlib, 'GetAppliedGPOList' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetAppliedGPOList]
- end;
-end;
-
-var
- _ProcessGroupPolicyCompleted: Pointer;
-
-function ProcessGroupPolicyCompleted;
-begin
- GetProcedureAddress(_ProcessGroupPolicyCompleted, userenvlib, 'ProcessGroupPolicyCompleted');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ProcessGroupPolicyCompleted]
- end;
-end;
-
-var
- _ProcessGroupPolicyCompletedEx: Pointer;
-
-function ProcessGroupPolicyCompletedEx;
-begin
- GetProcedureAddress(_ProcessGroupPolicyCompletedEx, userenvlib, 'ProcessGroupPolicyCompletedEx');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ProcessGroupPolicyCompletedEx]
- end;
-end;
-
-var
- _RsopAccessCheckByType: Pointer;
-
-function RsopAccessCheckByType;
-begin
- GetProcedureAddress(_RsopAccessCheckByType, userenvlib, 'RsopAccessCheckByType');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RsopAccessCheckByType]
- end;
-end;
-
-var
- _RsopFileAccessCheck: Pointer;
-
-function RsopFileAccessCheck;
-begin
- GetProcedureAddress(_RsopFileAccessCheck, userenvlib, 'RsopFileAccessCheck');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RsopFileAccessCheck]
- end;
-end;
-
-var
- _RsopSetPolicySettingStatus: Pointer;
-
-function RsopSetPolicySettingStatus;
-begin
- GetProcedureAddress(_RsopSetPolicySettingStatus, userenvlib, 'RsopSetPolicySettingStatus');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RsopSetPolicySettingStatus]
- end;
-end;
-
-var
- _RsopResetPolicySettingStatus: Pointer;
-
-function RsopResetPolicySettingStatus;
-begin
- GetProcedureAddress(_RsopResetPolicySettingStatus, userenvlib, 'RsopResetPolicySettingStatus');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RsopResetPolicySettingStatus]
- end;
-end;
-
-{$ELSE}
-
-function LoadUserProfileA; external userenvlib name 'LoadUserProfileA';
-function LoadUserProfileW; external userenvlib name 'LoadUserProfileW';
-function LoadUserProfile; external userenvlib name 'LoadUserProfile' + AWSuffix;
-function UnloadUserProfile; external userenvlib name 'UnloadUserProfile';
-function GetProfilesDirectoryA; external userenvlib name 'GetProfilesDirectoryA';
-function GetProfilesDirectoryW; external userenvlib name 'GetProfilesDirectoryW';
-function GetProfilesDirectory; external userenvlib name 'GetProfilesDirectory' + AWSuffix;
-function GetProfileType; external userenvlib name 'GetProfileType';
-function DeleteProfileA; external userenvlib name 'DeleteProfileA';
-function DeleteProfileW; external userenvlib name 'DeleteProfileW';
-function DeleteProfile; external userenvlib name 'DeleteProfile' + AWSuffix;
-function GetDefaultUserProfileDirectoryA; external userenvlib name 'GetDefaultUserProfileDirectoryA';
-function GetDefaultUserProfileDirectoryW; external userenvlib name 'GetDefaultUserProfileDirectoryW';
-function GetDefaultUserProfileDirectory; external userenvlib name 'GetDefaultUserProfileDirectory' + AWSuffix;
-function GetAllUsersProfileDirectoryA; external userenvlib name 'GetAllUsersProfileDirectoryA';
-function GetAllUsersProfileDirectoryW; external userenvlib name 'GetAllUsersProfileDirectoryW';
-function GetAllUsersProfileDirectory; external userenvlib name 'GetAllUsersProfileDirectory' + AWSuffix;
-function GetUserProfileDirectoryA; external userenvlib name 'GetUserProfileDirectoryA';
-function GetUserProfileDirectoryW; external userenvlib name 'GetUserProfileDirectoryW';
-function GetUserProfileDirectory; external userenvlib name 'GetUserProfileDirectory' + AWSuffix;
-function CreateEnvironmentBlock; external userenvlib name 'CreateEnvironmentBlock';
-function DestroyEnvironmentBlock; external userenvlib name 'DestroyEnvironmentBlock';
-function ExpandEnvironmentStringsForUserA; external userenvlib name 'ExpandEnvironmentStringsForUserA';
-function ExpandEnvironmentStringsForUserW; external userenvlib name 'ExpandEnvironmentStringsForUserW';
-function ExpandEnvironmentStringsForUser; external userenvlib name 'ExpandEnvironmentStringsForUser' + AWSuffix;
-function RefreshPolicy; external userenvlib name 'RefreshPolicy';
-function RefreshPolicyEx; external userenvlib name 'RefreshPolicyEx';
-function EnterCriticalPolicySection; external userenvlib name 'EnterCriticalPolicySection';
-function LeaveCriticalPolicySection; external userenvlib name 'LeaveCriticalPolicySection';
-function RegisterGPNotification; external userenvlib name 'RegisterGPNotification';
-function UnregisterGPNotification; external userenvlib name 'UnregisterGPNotification';
-function GetGPOListA; external userenvlib name 'GetGPOListA';
-function GetGPOListW; external userenvlib name 'GetGPOListW';
-function GetGPOList; external userenvlib name 'GetGPOList' + AWSuffix;
-function FreeGPOListA; external userenvlib name 'FreeGPOListA';
-function FreeGPOListW; external userenvlib name 'FreeGPOListW';
-function FreeGPOList; external userenvlib name 'FreeGPOList' + AWSuffix;
-function GetAppliedGPOListA; external userenvlib name 'GetAppliedGPOListA';
-function GetAppliedGPOListW; external userenvlib name 'GetAppliedGPOListW';
-function GetAppliedGPOList; external userenvlib name 'GetAppliedGPOList' + AWSuffix;
-function ProcessGroupPolicyCompleted; external userenvlib name 'ProcessGroupPolicyCompleted';
-function ProcessGroupPolicyCompletedEx; external userenvlib name 'ProcessGroupPolicyCompletedEx';
-function RsopAccessCheckByType; external userenvlib name 'RsopAccessCheckByType';
-function RsopFileAccessCheck; external userenvlib name 'RsopFileAccessCheck';
-function RsopSetPolicySettingStatus; external userenvlib name 'RsopSetPolicySettingStatus';
-function RsopResetPolicySettingStatus; external userenvlib name 'RsopResetPolicySettingStatus';
-
-{$ENDIF DYNAMIC_LINK}
-
-end.
+{******************************************************************************}
+{ }
+{ User Profile API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: userenv.h, released June 2000. The original Pascal }
+{ code is: UserEnv.pas, released December 2000. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwauserenv.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaUserEnv;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "userenv.h"'}
+{$HPPEMIT ''}
+{$HPPEMIT 'typedef PGROUP_POLICY_OBJECTA *PPGROUP_POLICY_OBJECTA'}
+{$HPPEMIT 'typedef PGROUP_POLICY_OBJECTW *PPGROUP_POLICY_OBJECTW'}
+{$HPPEMIT ''}
+{$HPPEMIT 'typedef #ifdef UNICODE'}
+{$HPPEMIT 'typedef PPGROUP_POLICY_OBJECTW PPGROUP_POLICY_OBJECT'}
+{$HPPEMIT 'typedef #else'}
+{$HPPEMIT 'typedef PPGROUP_POLICY_OBJECTA PPGROUP_POLICY_OBJECT'}
+{$HPPEMIT 'typedef #endif'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ ActiveX, {TODO}
+ JwaProfInfo, JwaWbemCli, JwaWinType, JWaWinBase, JwaWinNT;
+
+//=============================================================================
+//
+// LoadUserProfile
+//
+// Loads the specified user's profile.
+//
+// Most applications should not need to use this function. It's used
+// when a user has logged onto the system or a service starts in a named
+// user account.
+//
+// hToken - Token for the user, returned from LogonUser()
+// lpProfileInfo - Address of a PROFILEINFO structure
+//
+// Returns: TRUE if successful
+// FALSE if not. Call GetLastError() for more details
+//
+// Note: The caller of this function must have admin privileges on the machine.
+//
+// Upon successful return, the hProfile member of the PROFILEINFO
+// structure is a registry key handle opened to the root
+// of the user's hive. It has been opened with full access. If
+// you need to read or write to the user's registry file, use
+// this key instead of HKEY_CURRENT_USER. Do not close this
+// handle. Instead pass it to UnloadUserProfile to close
+// the handle.
+//
+//=============================================================================
+
+//
+// Flags that can be set in the dwFlags field
+//
+
+const
+ PI_NOUI = $00000001; // Prevents displaying of messages
+ {$EXTERNALSYM PI_NOUI}
+ PI_APPLYPOLICY = $00000002; // Apply NT4 style policy
+ {$EXTERNALSYM PI_APPLYPOLICY}
+
+function LoadUserProfileA(hToken: HANDLE; var lpProfileInfo: PROFILEINFOA): BOOL; stdcall;
+{$EXTERNALSYM LoadUserProfileA}
+function LoadUserProfileW(hToken: HANDLE; var lpProfileInfo: PROFILEINFOW): BOOL; stdcall;
+{$EXTERNALSYM LoadUserProfileW}
+function LoadUserProfile(hToken: HANDLE; var lpProfileInfo: PROFILEINFO): BOOL; stdcall;
+{$EXTERNALSYM LoadUserProfile}
+
+//=============================================================================
+//
+// UnloadUserProfile
+//
+// Unloads a user's profile that was loaded by LoadUserProfile()
+//
+// hToken - Token for the user, returned from LogonUser()
+// hProfile - hProfile member of the PROFILEINFO structure
+//
+// Returns: TRUE if successful
+// FALSE if not. Call GetLastError() for more details
+//
+// Note: The caller of this function must have admin privileges on the machine.
+//
+//=============================================================================
+
+function UnloadUserProfile(hToken: HANDLE; hProfile: HANDLE): BOOL; stdcall;
+{$EXTERNALSYM UnloadUserProfile}
+
+//=============================================================================
+//
+// GetProfilesDirectory
+//
+// Returns the path to the root of where all user profiles are stored.
+//
+// lpProfilesDir - Receives the path
+// lpcchSize - Size of lpProfilesDir
+//
+// Returns: TRUE if successful
+// FALSE if not. Call GetLastError() for more details
+//
+// Note: If lpProfilesDir is not large enough, the function will fail,
+// and lpcchSize will contain the necessary buffer size.
+//
+// Example return value: C:\Documents and Settings
+//
+//=============================================================================
+
+function GetProfilesDirectoryA(lpProfilesDir: LPSTR; var lpcchSize: DWORD): BOOL; stdcall;
+{$EXTERNALSYM GetProfilesDirectoryA}
+function GetProfilesDirectoryW(lpProfilesDir: LPWSTR; var lpcchSize: DWORD): BOOL; stdcall;
+{$EXTERNALSYM GetProfilesDirectoryW}
+function GetProfilesDirectory(lpProfilesDir: LPTSTR; var lpcchSize: DWORD): BOOL; stdcall;
+{$EXTERNALSYM GetProfilesDirectory}
+
+//=============================================================================
+//
+// GetProfileType()
+//
+// Returns the type of the profile that is loaded for a user.
+//
+// dwFlags - Returns the profile flags
+//
+// Return: TRUE if successful
+// FALSE if an error occurs. Call GetLastError for more details
+//
+// Comments: if profile is not already loaded the function will return an error.
+// The caller needs to have access to HKLM part of the registry.
+// (exists by default)
+//
+//=============================================================================
+
+//
+// Flags that can be set in the dwFlags field
+//
+
+const
+ PT_TEMPORARY = $00000001; // A profile has been allocated that will be deleted at logoff.
+ {$EXTERNALSYM PT_TEMPORARY}
+ PT_ROAMING = $00000002; // The loaded profile is a roaming profile.
+ {$EXTERNALSYM PT_ROAMING}
+ PT_MANDATORY = $00000004; // The loaded profile is mandatory.
+ {$EXTERNALSYM PT_MANDATORY}
+
+function GetProfileType(var dwFlags: DWORD): BOOL; stdcall;
+{$EXTERNALSYM GetProfileType}
+
+//=============================================================================
+//
+// DeleteProfile()
+//
+// Deletes the profile and all other user related settings from the machine
+//
+// lpSidString - String form of the user sid.
+// lpProfilePath - ProfilePath (if Null, lookup in the registry)
+// lpComputerName - Computer Name from which profile has to be deleted
+//
+// Return: TRUE if successful
+// FALSE if an error occurs. Call GetLastError for more details
+//
+// Comments: Deletes the profile directory, registry and appmgmt stuff
+//=============================================================================
+
+function DeleteProfileA(lpSidString: LPCSTR; lpProfilePath: LPCSTR;
+ lpComputerName: LPCSTR): BOOL; stdcall;
+{$EXTERNALSYM DeleteProfileA}
+function DeleteProfileW(lpSidString: LPCWSTR; lpProfilePath: LPCWSTR;
+ lpComputerName: LPCWSTR): BOOL; stdcall;
+{$EXTERNALSYM DeleteProfileW}
+function DeleteProfile(lpSidString: LPCTSTR; lpProfilePath: LPCTSTR;
+ lpComputerName: LPCTSTR): BOOL; stdcall;
+{$EXTERNALSYM DeleteProfile}
+
+//=============================================================================
+//
+// GetDefaultUserProfilesDirectory
+//
+// Returns the path to the root of the default user profile
+//
+// lpProfileDir - Receives the path
+// lpcchSize - Size of lpProfileDir
+//
+// Returns: TRUE if successful
+// FALSE if not. Call GetLastError() for more details
+//
+// Note: If lpProfileDir is not large enough, the function will fail,
+// and lpcchSize will contain the necessary buffer size.
+//
+// Example return value: C:\Documents and Settings\Default User
+//
+//=============================================================================
+
+function GetDefaultUserProfileDirectoryA(lpProfileDir: LPSTR; var lpcchSize: DWORD): BOOL; stdcall;
+{$EXTERNALSYM GetDefaultUserProfileDirectoryA}
+function GetDefaultUserProfileDirectoryW(lpProfileDir: LPWSTR; var lpcchSize: DWORD): BOOL; stdcall;
+{$EXTERNALSYM GetDefaultUserProfileDirectoryW}
+function GetDefaultUserProfileDirectory(lpProfileDir: LPTSTR; var lpcchSize: DWORD): BOOL; stdcall;
+{$EXTERNALSYM GetDefaultUserProfileDirectory}
+
+//=============================================================================
+//
+// GetAllUsersProfilesDirectory
+//
+// Returns the path to the root of the All Users profile
+//
+// lpProfileDir - Receives the path
+// lpcchSize - Size of lpProfileDir
+//
+// Returns: TRUE if successful
+// FALSE if not. Call GetLastError() for more details
+//
+// Note: If lpProfileDir is not large enough, the function will fail,
+// and lpcchSize will contain the necessary buffer size.
+//
+// Example return value: C:\Documents and Settings\All Users
+//
+//=============================================================================
+
+function GetAllUsersProfileDirectoryA(lpProfileDir: LPSTR; var lpcchSize: DWORD): BOOL; stdcall;
+{$EXTERNALSYM GetAllUsersProfileDirectoryA}
+function GetAllUsersProfileDirectoryW(lpProfileDir: LPWSTR; var lpcchSize: DWORD): BOOL; stdcall;
+{$EXTERNALSYM GetAllUsersProfileDirectoryW}
+function GetAllUsersProfileDirectory(lpProfileDir: LPTSTR; var lpcchSize: DWORD): BOOL; stdcall;
+{$EXTERNALSYM GetAllUsersProfileDirectory}
+
+//=============================================================================
+//
+// GetUserProfileDirectory
+//
+// Returns the path to the root of the requested user's profile
+//
+// hToken - User's token returned from LogonUser()
+// lpProfileDir - Receives the path
+// lpcchSize - Size of lpProfileDir
+//
+// Returns: TRUE if successful
+// FALSE if not. Call GetLastError() for more details
+//
+// Note: If lpProfileDir is not large enough, the function will fail,
+// and lpcchSize will contain the necessary buffer size.
+//
+// Example return value: C:\Documents and Settings\Joe
+//
+//=============================================================================
+
+function GetUserProfileDirectoryA(hToken: HANDLE; lpProfileDir: LPSTR;
+ var lpcchSize: DWORD): BOOL; stdcall;
+{$EXTERNALSYM GetUserProfileDirectoryA}
+function GetUserProfileDirectoryW(hToken: HANDLE; lpProfileDir: LPWSTR;
+ var lpcchSize: DWORD): BOOL; stdcall;
+{$EXTERNALSYM GetUserProfileDirectoryW}
+function GetUserProfileDirectory(hToken: HANDLE; lpProfileDir: LPTSTR;
+ var lpcchSize: DWORD): BOOL; stdcall;
+{$EXTERNALSYM GetUserProfileDirectory}
+
+//=============================================================================
+//
+// CreateEnvironmentBlock
+//
+// Returns the environment variables for the specified user. This block
+// can then be passed to CreateProcessAsUser().
+//
+// lpEnvironment - Receives a pointer to the new environment block
+// hToken - User's token returned from LogonUser() (optional, can be NULL)
+// bInherit - Inherit from the current process's environment block
+// or start from a clean state.
+//
+// Returns: TRUE if successful
+// FALSE if not. Call GetLastError() for more details
+//
+// Note: If hToken is NULL, the returned environment block will contain
+// system variables only.
+//
+// Call DestroyEnvironmentBlock to free the buffer when finished.
+//
+// If this block is passed to CreateProcessAsUser, the
+// CREATE_UNICODE_ENVIRONMENT flag must also be set.
+//
+//=============================================================================
+
+function CreateEnvironmentBlock(lpEnvironment: LPLPVOID; hToken: HANDLE;
+ bInherit: BOOL): BOOL; stdcall;
+{$EXTERNALSYM CreateEnvironmentBlock}
+
+//=============================================================================
+//
+// DestroyEnvironmentBlock
+//
+// Frees environment variables created by CreateEnvironmentBlock
+//
+// lpEnvironment - A pointer to the environment block
+//
+// Returns: TRUE if successful
+// FALSE if not. Call GetLastError() for more details
+//
+//=============================================================================
+
+function DestroyEnvironmentBlock(lpEnvironment: LPVOID): BOOL; stdcall;
+{$EXTERNALSYM DestroyEnvironmentBlock}
+
+//=============================================================================
+//
+// ExpandEnvironmentStringsForUser
+//
+// Expands the source string using the environment block for the
+// specified user. If hToken is null, the system environment block
+// will be used (no user environment variables).
+//
+// hToken - User's token returned from LogonUser() (optional, can be NULL)
+// lpSrc - Pointer to the string with environment variables
+// lpDest - Buffer that receives the expanded string
+// dwSize - Size of lpDest in characters (max chars)
+//
+// Returns: TRUE if successful
+// FALSE if not. Call GetLastError() for more details
+//
+// Note: If the user profile for hToken is not loaded, this api will fail.
+//
+//=============================================================================
+
+function ExpandEnvironmentStringsForUserA(hToken: HANDLE; lpSrc: LPCSTR;
+ lpDest: LPSTR; dwSize: DWORD): BOOL; stdcall;
+{$EXTERNALSYM ExpandEnvironmentStringsForUserA}
+function ExpandEnvironmentStringsForUserW(hToken: HANDLE; lpSrc: LPCWSTR;
+ lpDest: LPWSTR; dwSize: DWORD): BOOL; stdcall;
+{$EXTERNALSYM ExpandEnvironmentStringsForUserW}
+function ExpandEnvironmentStringsForUser(hToken: HANDLE; lpSrc: LPCTSTR;
+ lpDest: LPTSTR; dwSize: DWORD): BOOL; stdcall;
+{$EXTERNALSYM ExpandEnvironmentStringsForUser}
+
+//=============================================================================
+//
+// RefreshPolicy()
+//
+// Causes group policy to be applied immediately on the client machine
+//
+// bMachine - Refresh machine or user policy
+//
+// Returns: TRUE if successful
+// FALSE if not. Call GetLastError() for more details
+//
+//=============================================================================
+
+function RefreshPolicy(bMachine: BOOL): BOOL; stdcall;
+{$EXTERNALSYM RefreshPolicy}
+
+//=============================================================================
+//
+// RefreshPolicyEx()
+//
+// Causes group policy to be applied immediately on the client machine.
+//
+// bMachine - Refresh machine or user policy
+// dwOptions - Option specifying the kind of refresh that needs to be done.
+//
+// Returns: TRUE if successful
+// FALSE if not. Call GetLastError() for more details
+//
+//=============================================================================
+
+const
+ RP_FORCE = 1; // Refresh policies without any optimisations.
+ {$EXTERNALSYM RP_FORCE}
+
+function RefreshPolicyEx(bMachine: BOOL; dwOptions: DWORD): BOOL; stdcall;
+{$EXTERNALSYM RefreshPolicyEx}
+
+//=============================================================================
+//
+// EnterCriticalPolicySection
+//
+// Pauses the background application of group policy to allow safe
+// reading of the registry. Applications that need to read multiple
+// policy entries and ensure that the values are not changed while reading
+// them should use this function.
+//
+// The maximum amount of time an application can hold a critical section
+// is 10 minutes. After 10 minutes, policy can be applied again.
+//
+// bMachine - Pause machine or user policy
+//
+// Returns: Handle if successful
+// NULL if not. Call GetLastError() for more details
+//
+// Note 1: The handle returned should be passed to LeaveCriticalPolicySection
+// when finished. Do not close this handle, LeaveCriticalPolicySection
+// will do that.
+//
+// Note 2: If both user and machine critical sections need to be acquired then
+// they should be done in this order: first acquire user critical section and
+// then acquire machine critical section.
+//
+//=============================================================================
+
+function EnterCriticalPolicySection(bMachine: BOOL): HANDLE; stdcall;
+{$EXTERNALSYM EnterCriticalPolicySection}
+
+//=============================================================================
+//
+// LeaveCriticalPolicySection
+//
+// Resumes the background application of group policy. See
+// EnterCriticalPolicySection for more details.
+//
+// hSection - Handle returned from EnterCriticalPolicySection
+//
+// Returns: TRUE if successful
+// FALSE if not. Call GetLastError() for more details
+//
+// Note: This function will close the handle.
+//
+//=============================================================================
+
+function LeaveCriticalPolicySection(hSection: HANDLE): BOOL; stdcall;
+{$EXTERNALSYM LeaveCriticalPolicySection}
+
+//=============================================================================
+//
+// RegisterGPNotification
+//
+// Entry point for registering for Group Policy change notification.
+//
+// Parameters: hEvent - Event to be notified, by calling SetEvent(hEvent)
+// bMachine - If true, then register machine policy notification
+// else register user policy notification
+//
+// Returns: True if successful
+// False if error occurs
+//
+// Notes: Group Policy Notifications. There are 2 ways an application can
+// be notify when Group Policy is finished being applied.
+//
+// 1) Using the RegisterGPNotifcation function and waiting for the
+// event to be signalled.
+//
+// 2) A WM_SETTINGCHANGE message is broadcast to all desktops.
+// wParam - 1 if machine policy was applied, 0 if user policy was applied.
+// lParam - Points to the string "Policy"
+//
+//=============================================================================
+
+function RegisterGPNotification(hEvent: HANDLE; bMachine: BOOL): BOOL; stdcall;
+{$EXTERNALSYM RegisterGPNotification}
+
+//=============================================================================
+//
+// UnregisterGPNotification
+//
+// Removes registration for a Group Policy change notification.
+//
+// Parameters: hEvent - Event to be removed
+//
+// Returns: True if successful
+// False if error occurs
+//
+//=============================================================================
+
+function UnregisterGPNotification(hEvent: HANDLE): BOOL; stdcall;
+{$EXTERNALSYM UnregisterGPNotification}
+
+//=============================================================================
+//
+// GPOptions flags
+//
+// These are the flags found in the GPOptions property of a DS object
+//
+// For a given DS object (Site, Domain, OU), the GPOptions property
+// contains options that effect all the GPOs link to this SDOU.
+//
+// This is a DWORD type
+//
+//=============================================================================
+
+const
+ GPC_BLOCK_POLICY = $00000001; // Block all non-forced policy from above
+ {$EXTERNALSYM GPC_BLOCK_POLICY}
+
+//=============================================================================
+//
+// GPLink flags
+//
+// These are the flags found on the GPLink property of a DS object after
+// the GPO path.
+//
+// For a given DS object (Site, Domain, OU), the GPLink property will
+// be in this text format
+//
+// [LDAP://CN={E615A0E3-C4F1-11D1-A3A7-00AA00615092},CN=Policies,CN=System,DC=mydomain,DC=Microsoft,DC=Com;1]
+//
+// The GUID is the GPO name, and the number following the LDAP path are the options
+// for that link from this DS object. Note, there can be multiple GPOs
+// each in their own square brackets in a prioritized list.
+//
+//=============================================================================
+
+//
+// Options for a GPO link
+//
+
+const
+ GPO_FLAG_DISABLE = $00000001; // This GPO is disabled
+ {$EXTERNALSYM GPO_FLAG_DISABLE}
+ GPO_FLAG_FORCE = $00000002; // Don't override the settings in
+ {$EXTERNALSYM GPO_FLAG_FORCE} // this GPO with settings from a GPO below it.
+
+//=============================================================================
+//
+// GetGPOList
+//
+//
+// Queries for the list of Group Policy Objects for the specified
+// user or machine. This function will return a link list
+// of Group Policy Objects. Call FreeGPOList to free the list.
+//
+// Note, most applications will not need to call this function.
+// This will primarily be used by services acting on behalf of
+// another user or machine. The caller of this function will
+// need to look in each GPO for their specific policy
+//
+// This function can be called in two different ways. Either the hToken for
+// a user or machine can be supplied and the correct name and domain
+// controller name will be generated, or hToken is NULL and the caller
+// must supply the name and the domain controller name.
+//
+// Calling this function with an hToken ensures the list of Group Policy
+// Objects is correct for the user or machine since security access checking
+// can be perfomed. If hToken is not supplied, the security of the caller
+// is used instead which means that list may or may not be 100% correct
+// for the intended user / machine. However, this is the fastest way
+// to call this function.
+//
+// hToken - User or machine token, if NULL, lpName and lpHostName must be supplied
+// lpName - User or machine name in DN format, if hToken is supplied, this must be NULL
+// lpHostName - Domain DN name or domain controller name. If hToken is supplied, this must be NULL
+// lpComputerName - Computer name to use to determine site location. If NULL,
+// the local computer is used as the reference. Format: \\machinename
+// dwFlags - Flags field. See flags definition below
+// pGPOList - Address of a pointer which receives the link list of GPOs
+//
+//
+// Returns: TRUE if successful
+// FALSE if not. Use GetLastError() for more details.
+//
+// Examples:
+//
+// Here's how this function will typically be called for
+// looking up the list of GPOs for a user:
+//
+// LPGROUP_POLICY_OBJECT pGPOList;
+//
+// if (GetGPOList (hToken, NULL, NULL, NULL, 0, &pGPOList))
+// {
+// // do processing here...
+// FreeGPOList (pGPOList);
+// }
+//
+//
+// Here's how this function will typically be called for
+// looking up the list of GPOs for a machine:
+//
+// LPGROUP_POLICY_OBJECT pGPOList;
+//
+// if (GetGPOList (NULL, lpMachineName, lpHostName, lpMachineName,
+// GPO_LIST_FLAG_MACHINE, &pGPOList))
+// {
+// // do processing here...
+// FreeGPOList (pGPOList);
+// }
+//
+//=============================================================================
+
+//
+// Each Group Policy Object is associated (linked) with a site, domain,
+// organizational unit, or machine.
+//
+
+type
+ _GPO_LINK = (
+ GPLinkUnknown, // No link information available
+ GPLinkMachine, // GPO linked to a machine (local or remote)
+ GPLinkSite, // GPO linked to a site
+ GPLinkDomain, // GPO linked to a domain
+ GPLinkOrganizationalUnit); // GPO linked to a organizational unit
+ {$EXTERNALSYM _GPO_LINK}
+ GPO_LINK = _GPO_LINK;
+ {$EXTERNALSYM GPO_LINK}
+ PGPO_LINK = ^GPO_LINK;
+ {$EXTERNALSYM PGPO_LINK}
+ TGpoLink = GPO_LINK;
+ PGpoLink = PGPO_LINK;
+
+ PGROUP_POLICY_OBJECTA = ^GROUP_POLICY_OBJECTA;
+ {$EXTERNALSYM PGROUP_POLICY_OBJECTA}
+ _GROUP_POLICY_OBJECTA = record
+ dwOptions: DWORD; // See GPLink option flags above
+ dwVersion: DWORD; // Revision number of the GPO
+ lpDSPath: LPSTR; // Path to the Active Directory portion of the GPO
+ lpFileSysPath: LPSTR; // Path to the file system portion of the GPO
+ lpDisplayName: LPSTR; // Friendly display name
+ szGPOName: array [0..49] of CHAR; // Unique name
+ GPOLink: GPO_LINK; // Link information
+ lParam: LPARAM; // Free space for the caller to store GPO specific information
+ pNext: PGROUP_POLICY_OBJECTA; // Next GPO in the list
+ pPrev: PGROUP_POLICY_OBJECTA; // Previous GPO in the list
+ lpExtensions: LPSTR; // Extensions that are relevant for this GPO
+ lParam2: LPARAM; // Free space for the caller to store GPO specific information
+ lpLink: LPSTR; // Path to the Active Directory site, domain, or organizational unit this GPO is linked to
+ // If this is the local GPO, this points to the word "Local"
+ end;
+ {$EXTERNALSYM _GROUP_POLICY_OBJECTA}
+ GROUP_POLICY_OBJECTA = _GROUP_POLICY_OBJECTA;
+ {$EXTERNALSYM GROUP_POLICY_OBJECTA}
+ TGroupPolicyObjectA = GROUP_POLICY_OBJECTA;
+ PGroupPolicyObjectA = PGROUP_POLICY_OBJECTA;
+
+ PGROUP_POLICY_OBJECTW = ^GROUP_POLICY_OBJECTW;
+ {$EXTERNALSYM PGROUP_POLICY_OBJECTW}
+ _GROUP_POLICY_OBJECTW = record
+ dwOptions: DWORD; // See GPLink option flags above
+ dwVersion: DWORD; // Revision number of the GPO
+ lpDSPath: LPWSTR; // Path to the Active Directory portion of the GPO
+ lpFileSysPath: LPWSTR; // Path to the file system portion of the GPO
+ lpDisplayName: LPWSTR; // Friendly display name
+ szGPOName: array [0..49] of WCHAR; // Unique name
+ GPOLink: GPO_LINK; // Link information
+ lParam: LPARAM; // Free space for the caller to store GPO specific information
+ pNext: PGROUP_POLICY_OBJECTW; // Next GPO in the list
+ pPrev: PGROUP_POLICY_OBJECTW; // Previous GPO in the list
+ lpExtensions: LPWSTR; // Extensions that are relevant for this GPO
+ lParam2: LPARAM; // Free space for the caller to store GPO specific information
+ lpLink: LPWSTR; // Path to the Active Directory site, domain, or organizational unit this GPO is linked to
+ // If this is the local GPO, this points to the word "Local"
+ end;
+ {$EXTERNALSYM _GROUP_POLICY_OBJECTW}
+ GROUP_POLICY_OBJECTW = _GROUP_POLICY_OBJECTW;
+ {$EXTERNALSYM GROUP_POLICY_OBJECTW}
+ TGroupPolicyObjectW = GROUP_POLICY_OBJECTW;
+ PGroupPolicyObjectW = PGROUP_POLICY_OBJECTW;
+
+ PPGROUP_POLICY_OBJECTA = ^PGROUP_POLICY_OBJECTA;
+ {$NODEFINE PPGROUP_POLICY_OBJECTA}
+ PPGROUP_POLICY_OBJECTW = ^PGROUP_POLICY_OBJECTW;
+ {$NODEFINE PPGROUP_POLICY_OBJECTW}
+
+ {$IFDEF UNICODE}
+ GROUP_POLICY_OBJECT = GROUP_POLICY_OBJECTW;
+ {$EXTERNALSYM GROUP_POLICY_OBJECT}
+ PGROUP_POLICY_OBJECT = PGROUP_POLICY_OBJECTW;
+ {$EXTERNALSYM PGROUP_POLICY_OBJECT}
+ PPGROUP_POLICY_OBJECT = PPGROUP_POLICY_OBJECTW;
+ {$NODEFINE PPGROUP_POLICY_OBJECT}
+ TGroupPolicyObject = TGroupPolicyObjectW;
+ PGroupPolicyObject = PGroupPolicyObjectW;
+ {$ELSE}
+ GROUP_POLICY_OBJECT = GROUP_POLICY_OBJECTA;
+ {$EXTERNALSYM GROUP_POLICY_OBJECT}
+ PGROUP_POLICY_OBJECT = PGROUP_POLICY_OBJECTA;
+ {$EXTERNALSYM PGROUP_POLICY_OBJECT}
+ PPGROUP_POLICY_OBJECT = PPGROUP_POLICY_OBJECTA;
+ {$NODEFINE PPGROUP_POLICY_OBJECT}
+ TGroupPolicyObject = TGroupPolicyObjectA;
+ PGroupPolicyObject = PGroupPolicyObjectA;
+ {$ENDIF UNICODE}
+
+//
+// dwFlags for GetGPOList()
+//
+
+const
+ GPO_LIST_FLAG_MACHINE = $00000001; // Return machine policy information
+ {$EXTERNALSYM GPO_LIST_FLAG_MACHINE}
+ GPO_LIST_FLAG_SITEONLY = $00000002; // Return site policy information only
+ {$EXTERNALSYM GPO_LIST_FLAG_SITEONLY}
+
+function GetGPOListA(hToken: HANDLE; lpName: LPCSTR; lpHostName: LPCSTR;
+ lpComputerName: LPCSTR; dwFlags: DWORD; pGPOList: PPGROUP_POLICY_OBJECTA): BOOL; stdcall;
+{$EXTERNALSYM GetGPOListA}
+function GetGPOListW(hToken: HANDLE; lpName: LPCWSTR; lpHostName: LPCWSTR;
+ lpComputerName: LPCWSTR; dwFlags: DWORD; pGPOList: PPGROUP_POLICY_OBJECTW): BOOL; stdcall;
+{$EXTERNALSYM GetGPOListW}
+function GetGPOList(hToken: HANDLE; lpName: LPCTSTR; lpHostName: LPCTSTR;
+ lpComputerName: LPCTSTR; dwFlags: DWORD; pGPOList: PPGROUP_POLICY_OBJECT): BOOL; stdcall;
+{$EXTERNALSYM GetGPOList}
+
+//=============================================================================
+//
+// FreeGPOList
+//
+//
+// Frees the linked list returned from GetGPOList
+//
+// pGPOList - Pointer to the linked list of GPOs
+//
+//
+// Returns: TRUE if successful
+// FALSE if not
+//
+//=============================================================================
+
+function FreeGPOListA(pGPOList: PGROUP_POLICY_OBJECTA): BOOL; stdcall;
+{$EXTERNALSYM FreeGPOListA}
+function FreeGPOListW(pGPOList: PGROUP_POLICY_OBJECTW): BOOL; stdcall;
+{$EXTERNALSYM FreeGPOListW}
+function FreeGPOList(pGPOList: PGROUP_POLICY_OBJECT): BOOL; stdcall;
+{$EXTERNALSYM FreeGPOList}
+
+//=============================================================================
+//
+// GetAppliedGPOList
+//
+// Queries for the list of applied Group Policy Objects for the specified
+// user or machine and specified client side extension. This function will return
+// a linked listof Group Policy Objects. Call FreeGPOList to free the list.
+//
+// dwFlags - User or machine policy, if it is GPO_LIST_FLAG_MACHINE then
+// return machine policy information
+// pMachineName - Name of remote computer in the form \\computername. If null
+// then local computer is used.
+// pSidUser - Security id of user (relevant for user policy). If pMachineName is
+// null and pSidUser is null then it means current logged on user.
+// If pMachine is null and pSidUser is non-null then it means user
+// represented by pSidUser on local machine. If pMachineName is non-null
+// then and if dwFlags specifies user policy, then pSidUser must be
+// non-null.
+// pGuidExtension - Guid of the specified extension
+// ppGPOList - Address of a pointer which receives the link list of GPOs
+//
+// The return value is a Win32 error code. ERROR_SUCCESS means the GetAppliedGPOList
+// function completed successfully. Otherwise it indicates that the function failed.
+//
+//=============================================================================
+
+function GetAppliedGPOListA(dwFlags: DWORD; pMachineName: LPCSTR; pSidUser: PSID;
+ pGuidExtension: LPGUID; ppGPOList: PPGROUP_POLICY_OBJECTA): DWORD; stdcall;
+{$EXTERNALSYM GetAppliedGPOListA}
+function GetAppliedGPOListW(dwFlags: DWORD; pMachineName: LPCWSTR; pSidUser: PSID;
+ pGuidExtension: LPGUID; ppGPOList: PPGROUP_POLICY_OBJECTW): DWORD; stdcall;
+{$EXTERNALSYM GetAppliedGPOListW}
+function GetAppliedGPOList(dwFlags: DWORD; pMachineName: LPCTSTR; pSidUser: PSID;
+ pGuidExtension: LPGUID; ppGPOList: PPGROUP_POLICY_OBJECT): DWORD; stdcall;
+{$EXTERNALSYM GetAppliedGPOList}
+
+//=============================================================================
+//
+// Group Policy Object client side extension support
+//
+// Flags, data structures and function prototype
+//
+// To register your extension, create a subkey under this key
+//
+// Software\Microsoft\Windows NT\CurrentVersion\Winlogon\GPExtensions
+//
+// The subkey needs to be a guid so that it is unique. The noname value of the subkey
+// can be the friendly name of the extension. Then add these values:
+//
+// DllName REG_EXPAND_SZ Path to your DLL
+// ProcessGroupPolicy REG_SZ Function name (see PFNPROCESSGROUPPOLICY prototype). This
+// is obsolete, it has been superseded by ProcessGroupPolicyEx.
+// It's here for backward compatibility reasons only.
+// ProcessGroupPolicyEx REG_SZ Function name (see PFNPROCESSGROUPPOLICYEX prototype)
+// GenerateGroupPolicy REG_SZ Function name for Rsop (see PFNGENERATEGROUPPOLICY prototype)
+// NoMachinePolicy REG_DWORD True, if extension does not have to be called when
+// machine policies are being processed.
+// NoUserPolicy REG_DWORD True, if extension does not have to be called when
+// user policies are being processed.
+// NoSlowLink REG_DWORD True, if extension does not have to be called on a slow link
+// NoBackgroundPolicy REG_DWORD True, if extension does not have to be called
+// for background policy processing.
+// NoGPOListChanges REG_DWORD True, if extension does not have to be called when
+// there are no changes between cached and current GPO lists.
+// PerUserLocalSettings REG_DWORD True, if user policies have to be cached on a per user and
+// per machine basis.
+// RequiresSuccessfulRegistry REG_DWORD True, if extension should be called only if registry extension
+// was successfully processed.
+// EnableAsynchronousProcessing REG_DWORD True, if registry extension will complete its processing
+// asynchronously.
+// NotifyLinkTransition REG_DWORD True, if extension should be called when a change in link
+// speed is detected between previous policy application and
+// current policy application.
+//
+// The return value is a Win32 error code. ERROR_SUCCESS means the ProcessGroupPolicy
+// function completed successfully. If return value is ERROR_OVERRIDE_NOCHANGES then it
+// means that the extension will be called the next time even if NoGPOListChanges is set
+// and there are no changes to the GPO list. Any other return value indicates that the
+// ProcessGroupPolicy or ProcessGroupPolicyEx function failed.
+//
+//=============================================================================
+
+const
+ GP_DLLNAME = 'DllName';
+ {$EXTERNALSYM GP_DLLNAME}
+ GP_ENABLEASYNCHRONOUSPROCESSING = 'EnableAsynchronousProcessing';
+ {$EXTERNALSYM GP_ENABLEASYNCHRONOUSPROCESSING}
+ GP_MAXNOGPOLISTCHANGESINTERVAL = 'MaxNoGPOListChangesInterval';
+ {$EXTERNALSYM GP_MAXNOGPOLISTCHANGESINTERVAL}
+ GP_NOBACKGROUNDPOLICY = 'NoBackgroundPolicy';
+ {$EXTERNALSYM GP_NOBACKGROUNDPOLICY}
+ GP_NOGPOLISTCHANGES = 'NoGPOListChanges';
+ {$EXTERNALSYM GP_NOGPOLISTCHANGES}
+ GP_NOMACHINEPOLICY = 'NoMachinePolicy';
+ {$EXTERNALSYM GP_NOMACHINEPOLICY}
+ GP_NOSLOWLINK = 'NoSlowLink';
+ {$EXTERNALSYM GP_NOSLOWLINK}
+ GP_NOTIFYLINKTRANSITION = 'NotifyLinkTransition';
+ {$EXTERNALSYM GP_NOTIFYLINKTRANSITION}
+ GP_NOUSERPOLICY = 'NoUserPolicy';
+ {$EXTERNALSYM GP_NOUSERPOLICY}
+ GP_PERUSERLOCALSETTINGS = 'PerUserLocalSettings';
+ {$EXTERNALSYM GP_PERUSERLOCALSETTINGS}
+ GP_PROCESSGROUPPOLICY = 'ProcessGroupPolicy';
+ {$EXTERNALSYM GP_PROCESSGROUPPOLICY}
+ GP_REQUIRESSUCCESSFULREGISTRY = 'RequiresSuccessfulRegistry';
+ {$EXTERNALSYM GP_REQUIRESSUCCESSFULREGISTRY}
+
+ GPO_INFO_FLAG_MACHINE = $00000001; // Apply machine policy rather than user policy
+ {$EXTERNALSYM GPO_INFO_FLAG_MACHINE}
+ GPO_INFO_FLAG_BACKGROUND = $00000010; // Background refresh of policy (ok to do slow stuff)
+ {$EXTERNALSYM GPO_INFO_FLAG_BACKGROUND}
+ GPO_INFO_FLAG_SLOWLINK = $00000020; // Policy is being applied across a slow link
+ {$EXTERNALSYM GPO_INFO_FLAG_SLOWLINK}
+ GPO_INFO_FLAG_VERBOSE = $00000040; // Verbose output to the eventlog
+ {$EXTERNALSYM GPO_INFO_FLAG_VERBOSE}
+ GPO_INFO_FLAG_NOCHANGES = $00000080; // No changes were detected to the Group Policy Objects
+ {$EXTERNALSYM GPO_INFO_FLAG_NOCHANGES}
+ GPO_INFO_FLAG_LINKTRANSITION = $00000100; // A change in link speed was detected between previous policy
+ {$EXTERNALSYM GPO_INFO_FLAG_LINKTRANSITION} // application and current policy application
+
+ GPO_INFO_FLAG_LOGRSOP_TRANSITION = $00000200; // A Change in Rsop Logging was detected between previous policy
+ {$EXTERNALSYM GPO_INFO_FLAG_LOGRSOP_TRANSITION} // application and current policy application, (new intf only)
+
+ GPO_INFO_FLAG_FORCED_REFRESH = $00000400; // Forced Refresh is being applied. redo policies.
+ {$EXTERNALSYM GPO_INFO_FLAG_FORCED_REFRESH}
+ GPO_INFO_FLAG_SAFEMODE_BOOT = $00000800; // windows safe mode boot flag
+ {$EXTERNALSYM GPO_INFO_FLAG_SAFEMODE_BOOT}
+ GPO_INFO_FLAG_ASYNC_FOREGROUND = $00001000; // Asynchronous foreground refresh of policy
+ {$EXTERNALSYM GPO_INFO_FLAG_ASYNC_FOREGROUND}
+ GPO_INFO_FLAG_REPORT = $00002000; // Report all settings for one GPO rather than the resultant settings across multiple GPOs
+ {$EXTERNALSYM GPO_INFO_FLAG_REPORT}
+
+type
+ ASYNCCOMPLETIONHANDLE = UINT_PTR;
+ {$EXTERNALSYM ASYNCCOMPLETIONHANDLE}
+
+ PFNSTATUSMESSAGECALLBACK = function(bVerbose: BOOL; lpMessage: LPWSTR): DWORD; stdcall;
+ {$EXTERNALSYM PFNSTATUSMESSAGECALLBACK}
+
+ PFNPROCESSGROUPPOLICY = function(
+ dwFlags: DWORD; // GPO_INFO_FLAGS
+ hToken: HANDLE; // User or machine token
+ hKeyRoot: HKEY; // Root of registry
+ pDeletedGPOList: PGROUP_POLICY_OBJECT; // Linked list of deleted GPOs
+ pChangedGPOList: PGROUP_POLICY_OBJECT; // Linked list of changed GPOs
+ pHandle: ASYNCCOMPLETIONHANDLE; // For asynchronous completion
+ pbAbort: LPBOOL; // If true, then abort GPO processing
+ pStatusCallback: PFNSTATUSMESSAGECALLBACK // Callback function for displaying status messages
+ ): DWORD; stdcall; // Note, this can be NULL
+ {$EXTERNALSYM PFNPROCESSGROUPPOLICY}
+
+ PFNPROCESSGROUPPOLICYEX = function(
+ dwFlags: DWORD; // GPO_INFO_FLAGS
+ hToken: HANDLE; // User or machine token
+ hKeyRoot: HKEY; // Root of registry
+ pDeletedGPOList: PGROUP_POLICY_OBJECT; // Linked list of deleted GPOs
+ pChangedGPOList: PGROUP_POLICY_OBJECT; // Linked list of changed GPOs
+ pHandle: ASYNCCOMPLETIONHANDLE; // For asynchronous completion
+ pbAbort: PBOOL; // If true, then abort GPO processing
+ pStatusCallback: PFNSTATUSMESSAGECALLBACK; // Callback function for displaying status messages
+ // Note, this can be NULL
+ pWbemServices: IWbemServices; // Pointer to namespace to log diagnostic mode data
+ // Note, this will be NULL when Rsop logging is disabled
+ var pRsopStatus: HRESULT // RSOP Logging succeeded or not.
+ ): DWORD; stdcall;
+ {$EXTERNALSYM PFNPROCESSGROUPPOLICYEX}
+
+ PRSOPTOKEN = PVOID;
+ {$EXTERNALSYM PRSOPTOKEN}
+
+ _RSOP_TARGET = record
+ pwszAccountName: PWCHAR; // Account name
+ pwszNewSOM: PWCHAR; // New domain or OU location for account
+ psaSecurityGroups: PSafeArray; // New security groups
+ pRsopToken: PRSOPTOKEN; // Rsop token for use with Rsop security Api's
+ pGPOList: PGROUP_POLICY_OBJECT; // Linked list of GPOs
+ pWbemServices: IWbemServices; // Pointer to namespace to log planning mode data
+ end;
+ {$EXTERNALSYM _RSOP_TARGET}
+ RSOP_TARGET = _RSOP_TARGET;
+ {$EXTERNALSYM RSOP_TARGET}
+ PRSOP_TARGET = ^RSOP_TARGET;
+ {$EXTERNALSYM PRSOP_TARGET}
+ TRsopTarget = RSOP_TARGET;
+ PRsopTarget = PRSOP_TARGET;
+
+ PFNGENERATEGROUPPOLICY = function(
+ dwFlags: DWORD; // GPO_INFO_FLAGS
+ var pbAbort: BOOL; // If true, then abort GPO processing
+ pwszSite: PWCHAR; // Site the target computer is in
+ pComputerTarget: PRSOP_TARGET; // Computer target info, can be null
+ pUserTarget: PRSOP_TARGET // User target info, can be null
+ ): DWORD; stdcall;
+ {$EXTERNALSYM PFNGENERATEGROUPPOLICY}
+
+//
+// GUID that identifies the registry extension
+//
+
+const
+ REGISTRY_EXTENSION_GUID: GUID = (
+ D1: $35378EAC; D2:$683F; D3:$11D2; D4:($A8, $9A, $00, $C0, $4F, $BB, $CF, $A2));
+ {$EXTERNALSYM REGISTRY_EXTENSION_GUID}
+
+//=============================================================================
+//
+// Group Policy Object client side asynchronous extension processing
+//
+// extensionId - Unique guid identifying the extension
+// pAsyncHandle - Asynchronous completion handle that was passed to extension in
+// ProcessGroupPolicy call
+// dwStatus - Completion status of asynchronous processing
+//
+// The return value is a Win32 error code. ERROR_SUCCESS means the ProcessGroupPolicyCompleted
+// function completed successfully. Otherwise it indicates that the function failed.
+//
+//=============================================================================
+
+type
+ REFGPEXTENSIONID = LPGUID;
+ {$EXTERNALSYM REFGPEXTENSIONID}
+
+function ProcessGroupPolicyCompleted(extensionId: REFGPEXTENSIONID;
+ pAsyncHandle: ASYNCCOMPLETIONHANDLE; dwStatus: DWORD): DWORD; stdcall;
+{$EXTERNALSYM ProcessGroupPolicyCompleted}
+
+//=============================================================================
+//
+// Group Policy Object client side asynchronous extension processing
+//
+// extensionId - Unique guid identifying the extension
+// pAsyncHandle - Asynchronous completion handle that was passed to extension in
+// ProcessGroupPolicy call
+// dwStatus - Completion status of asynchronous processing
+// RsopStatus - RSoP Logging status
+//
+// The return value is a Win32 error code. ERROR_SUCCESS means the ProcessGroupPolicyCompleted
+// function completed successfully. Otherwise it indicates that the function failed.
+//
+//=============================================================================
+
+function ProcessGroupPolicyCompletedEx(extensionId: REFGPEXTENSIONID; pAsyncHandle: ASYNCCOMPLETIONHANDLE;
+ dwStatus: DWORD; RsopStatus: HRESULT): DWORD; stdcall;
+{$EXTERNALSYM ProcessGroupPolicyCompletedEx}
+
+//=============================================================================
+//
+// Function: RsopAccessCheckByType
+//
+// Description: Determines whether the security descriptor pointed to by pSecurityDescriptor
+// grants the set of access rights specified in dwDesiredAccessMask
+// to the client identified by the RSOPTOKEN pointed to by pRsopToken.
+//
+// pSecurityDescriptor - Security Descriptor on the object
+// pPrincipalSelfSid - Principal Sid
+// pRsopToken - Pointer to a valid RSOPTOKEN against which access needs to be checked
+// dwDesiredAccessMask - Mask of requested generic and/or standard and or specific access rights
+// pObjectTypeList - Object Type List
+// ObjectTypeListLength - Object Type List Length
+// pGenericMapping - Generic Mapping
+// pPrivilegeSet - privilege set
+// pdwPrivilegeSetLength- privilege set length
+// pdwGrantedAccessMask - On success, if pbAccessStatus is true, it contains
+// the mask of standard and specific rights granted.
+// If pbAccessStatus is false, it is set to 0.
+// On failure, it is not modified.
+// pbAccessStatus - On success, indicates wether the requested set
+// of access rights was granted.
+// On failure, it is not modified
+//
+// Returns S_OK on success or appropriate error code.
+// For additional details, look at the documentation of AccessCheckByType
+//=============================================================================
+
+function RsopAccessCheckByType(pSecurityDescriptor: PSECURITY_DESCRIPTOR; pPrincipalSelfSid: PSID;
+ pRsopToken: PRSOPTOKEN; dwDesiredAccessMask: DWORD; pObjectTypeList: POBJECT_TYPE_LIST;
+ ObjectTypeListLength: DWORD; pGenericMapping: PGENERIC_MAPPING; pPrivilegeSet: PPRIVILEGE_SET;
+ pdwPrivilegeSetLength: LPDWORD; pdwGrantedAccessMask: LPDWORD; pbAccessStatus: LPBOOL): HRESULT; stdcall;
+{$EXTERNALSYM RsopAccessCheckByType}
+
+//=============================================================================
+//
+// Function: RsopFileAccessCheck
+//
+// Description: Determines whether the security descriptor on the file grants the set of file access
+// rights specified in dwDesiredAccessMask
+// to the client identified by the RSOPTOKEN pointed to by pRsopToken.
+//
+// pszFileName - Name of an existing filename
+// pRsopToken - Pointer to a valid RSOPTOKEN against which access needs to be checked
+// dwDesiredAccessMask - Mask of requested generic and/or standard and or specific access rights
+// pdwGrantedAccessMask - On success, if pbAccessStatus is true, it contains
+// the mask of standard and specific rights granted.
+// If pbAccessStatus is false, it is set to 0.
+// On failure, it is not modified.
+// pbAccessStatus - On success, indicates wether the requested set
+// of access rights was granted.
+// On failure, it is not modified
+//
+// Returns S_OK on success or appropriate error code
+//=============================================================================
+
+function RsopFileAccessCheck(pszFileName: LPWSTR; pRsopToken: PRSOPTOKEN; dwDesiredAccessMask: DWORD;
+ pdwGrantedAccessMask: LPDWORD; pbAccessStatus: LPBOOL): HRESULT; stdcall;
+{$EXTERNALSYM RsopFileAccessCheck}
+
+type
+ _SETTINGSTATUS = (
+ RSOPUnspecified,
+ RSOPApplied,
+ RSOPIgnored,
+ RSOPFailed,
+ RSOPSubsettingFailed);
+ {$EXTERNALSYM _SETTINGSTATUS}
+ SETTINGSTATUS = _SETTINGSTATUS;
+ {$EXTERNALSYM SETTINGSTATUS}
+ TSettingStatus = SETTINGSTATUS;
+
+//=============================================================================
+//
+// POLICYSETTINGSTATUSINFO
+//
+// Describes the instance of RSOP_PolicySettingStatus
+//
+// szKey - OPTIONAL, if NULL, the key is generated on the fly
+// szEventSource - name of the source generation event log messages
+// szEventLogName - name of the event log database where the messages are logged
+// dwEventID - event log message ID
+// status - status of the policy setting
+// timeLogged - time at which the event log message was logged
+//
+//=============================================================================
+
+type
+ _POLICYSETTINGSTATUSINFO = record
+ szKey: LPWSTR;
+ szEventSource: LPWSTR;
+ szEventLogName: LPWSTR;
+ dwEventID: DWORD;
+ dwErrorCode: DWORD;
+ status: SETTINGSTATUS;
+ timeLogged: SYSTEMTIME;
+ end;
+ {$EXTERNALSYM _POLICYSETTINGSTATUSINFO}
+ POLICYSETTINGSTATUSINFO = _POLICYSETTINGSTATUSINFO;
+ {$EXTERNALSYM POLICYSETTINGSTATUSINFO}
+ LPPOLICYSETTINGSTATUSINFO = ^POLICYSETTINGSTATUSINFO;
+ {$EXTERNALSYM LPPOLICYSETTINGSTATUSINFO}
+ TPolicySettingStatusInfo = POLICYSETTINGSTATUSINFO;
+ PPolicySettingStatusInfo = LPPOLICYSETTINGSTATUSINFO;
+
+//=============================================================================
+//
+// RsopSetPolicySettingStatus
+//
+// Creates an instance of RSOP_PolicySettingStatus and RSOP_PolicySettingLink
+// and links RSOP_PolicySettingStatus to RSOP_PolicySetting
+//
+// dwFlags - flags
+// pServices - RSOP namespace
+// pSettingInstance - instance of RSOP_PolicySetting or its children
+// nInfo - number of PolicySettingStatusInfo
+// pStatus - array of PolicySettingStatusInfo
+//
+// Return: S_OK if successful, HRESULT otherwise
+//
+//=============================================================================
+
+function RsopSetPolicySettingStatus(dwFlags: DWORD; pServices: IWbemServices;
+ pSettingInstance: IWbemClassObject; nInfo: DWORD;
+ pStatus: LPPOLICYSETTINGSTATUSINFO): HRESULT; stdcall;
+{$EXTERNALSYM RsopSetPolicySettingStatus}
+
+//=============================================================================
+//
+// RsopResetPolicySettingStatus
+//
+// Unlinks RSOP_PolicySettingStatus from RSOP_PolicySetting,
+// deletes the instance of RSOP_PolicySettingStatus and RSOP_PolicySettingLink
+// and optionally deletes the instance of RSOP_PolicySetting
+//
+// dwFlags - flags
+// pServices - RSOP namespace
+// pSettingInstance - instance of RSOP_PolicySetting or its children
+//
+// Return: S_OK if successful, HRESULT otherwise
+//
+//=============================================================================
+
+function RsopResetPolicySettingStatus(dwFlags: DWORD; pServices: IWbemServices;
+ pSettingInstance: IWbemClassObject): HRESULT; stdcall;
+{$EXTERNALSYM RsopResetPolicySettingStatus}
+
+//=============================================================================
+//
+// Flags for RSoP WMI providers
+//
+//=============================================================================
+
+// planning mode provider flags
+
+const
+ FLAG_NO_GPO_FILTER = DWORD($80000000); // GPOs are not filtered, implies FLAG_NO_CSE_INVOKE
+ {$EXTERNALSYM FLAG_NO_GPO_FILTER}
+ FLAG_NO_CSE_INVOKE = $40000000; // only GP processing done for planning mode
+ {$EXTERNALSYM FLAG_NO_CSE_INVOKE}
+ FLAG_ASSUME_SLOW_LINK = $20000000; // planning mode RSoP assumes slow link
+ {$EXTERNALSYM FLAG_ASSUME_SLOW_LINK}
+ FLAG_LOOPBACK_MERGE = $10000000; // planning mode RSoP assumes merge loop back
+ {$EXTERNALSYM FLAG_LOOPBACK_MERGE}
+ FLAG_LOOPBACK_REPLACE = $08000000; // planning mode RSoP assumes replace loop back
+ {$EXTERNALSYM FLAG_LOOPBACK_REPLACE}
+
+ FLAG_ASSUME_USER_WQLFILTER_TRUE = $04000000; // planning mode RSoP assumes all comp filters to be true
+ {$EXTERNALSYM FLAG_ASSUME_USER_WQLFILTER_TRUE}
+ FLAG_ASSUME_COMP_WQLFILTER_TRUE = $02000000; // planning mode RSoP assumes all user filters to be true
+ {$EXTERNALSYM FLAG_ASSUME_COMP_WQLFILTER_TRUE}
+
+ FLAG_PLANNING_MODE = $01000000; // flag that indicates that a given namespace was created
+ {$EXTERNALSYM FLAG_PLANNING_MODE} // for planning mode. This flag cannot be passed in but the
+ // relevant subnamespace will be marked with this flag
+
+// diagnostic mode provider flags
+
+ FLAG_NO_USER = $00000001; // Don't get any user data
+ {$EXTERNALSYM FLAG_NO_USER}
+ FLAG_NO_COMPUTER = $00000002; // Don't get any machine data
+ {$EXTERNALSYM FLAG_NO_COMPUTER}
+ FLAG_FORCE_CREATENAMESPACE = $00000004; // Delete and recreate the namespace for this snapshot.
+ {$EXTERNALSYM FLAG_FORCE_CREATENAMESPACE}
+
+//=============================================================================
+//
+// Extended Errors returned by RSoP WMI Providers
+//
+//=============================================================================
+
+// User accessing the rsop provider doesn't have access to user data.
+
+ RSOP_USER_ACCESS_DENIED = $00000001;
+ {$EXTERNALSYM RSOP_USER_ACCESS_DENIED}
+
+// User accessing the rsop provider doesn't have access to computer data.
+
+ RSOP_COMPUTER_ACCESS_DENIED = $00000002;
+ {$EXTERNALSYM RSOP_COMPUTER_ACCESS_DENIED}
+
+// This user is an interactive non admin user, the temp snapshot namespace already exists
+// and the FLAG_FORCE_CREATENAMESPACE was not passed in
+
+ RSOP_TEMPNAMESPACE_EXISTS = $00000004;
+ {$EXTERNALSYM RSOP_TEMPNAMESPACE_EXISTS}
+
+implementation
+
+const
+ userenvlib = 'userenv.dll';
+ {$IFDEF UNICODE}
+ AWSuffix = 'W';
+ {$ELSE}
+ AWSuffix = 'A';
+ {$ENDIF UNICODE}
+
+{$IFDEF DYNAMIC_LINK}
+
+var
+ _LoadUserProfileA: Pointer;
+
+function LoadUserProfileA;
+begin
+ GetProcedureAddress(_LoadUserProfileA, userenvlib, 'LoadUserProfileA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_LoadUserProfileA]
+ end;
+end;
+
+var
+ _LoadUserProfileW: Pointer;
+
+function LoadUserProfileW;
+begin
+ GetProcedureAddress(_LoadUserProfileW, userenvlib, 'LoadUserProfileW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_LoadUserProfileW]
+ end;
+end;
+
+var
+ _LoadUserProfile: Pointer;
+
+function LoadUserProfile;
+begin
+ GetProcedureAddress(_LoadUserProfile, userenvlib, 'LoadUserProfile' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_LoadUserProfile]
+ end;
+end;
+
+var
+ _UnloadUserProfile: Pointer;
+
+function UnloadUserProfile;
+begin
+ GetProcedureAddress(_UnloadUserProfile, userenvlib, 'UnloadUserProfile');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_UnloadUserProfile]
+ end;
+end;
+
+var
+ _GetProfilesDirectoryA: Pointer;
+
+function GetProfilesDirectoryA;
+begin
+ GetProcedureAddress(_GetProfilesDirectoryA, userenvlib, 'GetProfilesDirectoryA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetProfilesDirectoryA]
+ end;
+end;
+
+var
+ _GetProfilesDirectoryW: Pointer;
+
+function GetProfilesDirectoryW;
+begin
+ GetProcedureAddress(_GetProfilesDirectoryW, userenvlib, 'GetProfilesDirectoryW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetProfilesDirectoryW]
+ end;
+end;
+
+var
+ _GetProfilesDirectory: Pointer;
+
+function GetProfilesDirectory;
+begin
+ GetProcedureAddress(_GetProfilesDirectory, userenvlib, 'GetProfilesDirectory' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetProfilesDirectory]
+ end;
+end;
+
+var
+ _GetProfileType: Pointer;
+
+function GetProfileType;
+begin
+ GetProcedureAddress(_GetProfileType, userenvlib, 'GetProfileType');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetProfileType]
+ end;
+end;
+
+var
+ _DeleteProfileA: Pointer;
+
+function DeleteProfileA;
+begin
+ GetProcedureAddress(_DeleteProfileA, userenvlib, 'DeleteProfileA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DeleteProfileA]
+ end;
+end;
+
+var
+ _DeleteProfileW: Pointer;
+
+function DeleteProfileW;
+begin
+ GetProcedureAddress(_DeleteProfileW, userenvlib, 'DeleteProfileW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DeleteProfileW]
+ end;
+end;
+
+var
+ _DeleteProfile: Pointer;
+
+function DeleteProfile;
+begin
+ GetProcedureAddress(_DeleteProfile, userenvlib, 'DeleteProfile' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DeleteProfile]
+ end;
+end;
+
+var
+ _GetDefaultUserProfileDirectoryA: Pointer;
+
+function GetDefaultUserProfileDirectoryA;
+begin
+ GetProcedureAddress(_GetDefaultUserProfileDirectoryA, userenvlib, 'GetDefaultUserProfileDirectoryA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetDefaultUserProfileDirectoryA]
+ end;
+end;
+
+var
+ _GetDefaultUserProfileDirectoryW: Pointer;
+
+function GetDefaultUserProfileDirectoryW;
+begin
+ GetProcedureAddress(_GetDefaultUserProfileDirectoryW, userenvlib, 'GetDefaultUserProfileDirectoryW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetDefaultUserProfileDirectoryW]
+ end;
+end;
+
+var
+ _GetDefaultUserProfileDirectory: Pointer;
+
+function GetDefaultUserProfileDirectory;
+begin
+ GetProcedureAddress(_GetDefaultUserProfileDirectory, userenvlib, 'GetDefaultUserProfileDirectory' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetDefaultUserProfileDirectory]
+ end;
+end;
+
+var
+ _GetAllUsersProfileDirectoryA: Pointer;
+
+function GetAllUsersProfileDirectoryA;
+begin
+ GetProcedureAddress(_GetAllUsersProfileDirectoryA, userenvlib, 'GetAllUsersProfileDirectoryA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetAllUsersProfileDirectoryA]
+ end;
+end;
+
+var
+ _GetAllUsersProfileDirectoryW: Pointer;
+
+function GetAllUsersProfileDirectoryW;
+begin
+ GetProcedureAddress(_GetAllUsersProfileDirectoryW, userenvlib, 'GetAllUsersProfileDirectoryW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetAllUsersProfileDirectoryW]
+ end;
+end;
+
+var
+ _GetAllUsersProfileDirectory: Pointer;
+
+function GetAllUsersProfileDirectory;
+begin
+ GetProcedureAddress(_GetAllUsersProfileDirectory, userenvlib, 'GetAllUsersProfileDirectory' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetAllUsersProfileDirectory]
+ end;
+end;
+
+var
+ _GetUserProfileDirectoryA: Pointer;
+
+function GetUserProfileDirectoryA;
+begin
+ GetProcedureAddress(_GetUserProfileDirectoryA, userenvlib, 'GetUserProfileDirectoryA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetUserProfileDirectoryA]
+ end;
+end;
+
+var
+ _GetUserProfileDirectoryW: Pointer;
+
+function GetUserProfileDirectoryW;
+begin
+ GetProcedureAddress(_GetUserProfileDirectoryW, userenvlib, 'GetUserProfileDirectoryW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetUserProfileDirectoryW]
+ end;
+end;
+
+var
+ _GetUserProfileDirectory: Pointer;
+
+function GetUserProfileDirectory;
+begin
+ GetProcedureAddress(_GetUserProfileDirectory, userenvlib, 'GetUserProfileDirectory' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetUserProfileDirectory]
+ end;
+end;
+
+var
+ _CreateEnvironmentBlock: Pointer;
+
+function CreateEnvironmentBlock;
+begin
+ GetProcedureAddress(_CreateEnvironmentBlock, userenvlib, 'CreateEnvironmentBlock');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreateEnvironmentBlock]
+ end;
+end;
+
+var
+ _DestroyEnvironmentBlock: Pointer;
+
+function DestroyEnvironmentBlock;
+begin
+ GetProcedureAddress(_DestroyEnvironmentBlock, userenvlib, 'DestroyEnvironmentBlock');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DestroyEnvironmentBlock]
+ end;
+end;
+
+var
+ _ExpandEnvStringsForUserA: Pointer;
+
+function ExpandEnvironmentStringsForUserA;
+begin
+ GetProcedureAddress(_ExpandEnvStringsForUserA, userenvlib, 'ExpandEnvironmentStringsForUserA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ExpandEnvStringsForUserA]
+ end;
+end;
+
+var
+ _ExpandEnvStringsForUserW: Pointer;
+
+function ExpandEnvironmentStringsForUserW;
+begin
+ GetProcedureAddress(_ExpandEnvStringsForUserW, userenvlib, 'ExpandEnvironmentStringsForUserW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ExpandEnvStringsForUserW]
+ end;
+end;
+
+var
+ _ExpandEnvironmentStringsForUser: Pointer;
+
+function ExpandEnvironmentStringsForUser;
+begin
+ GetProcedureAddress(_ExpandEnvironmentStringsForUser, userenvlib, 'ExpandEnvironmentStringsForUser' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ExpandEnvironmentStringsForUser]
+ end;
+end;
+
+var
+ _RefreshPolicy: Pointer;
+
+function RefreshPolicy;
+begin
+ GetProcedureAddress(_RefreshPolicy, userenvlib, 'RefreshPolicy');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RefreshPolicy]
+ end;
+end;
+
+var
+ _RefreshPolicyEx: Pointer;
+
+function RefreshPolicyEx;
+begin
+ GetProcedureAddress(_RefreshPolicyEx, userenvlib, 'RefreshPolicyEx');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RefreshPolicyEx]
+ end;
+end;
+
+var
+ _EnterCriticalPolicySection: Pointer;
+
+function EnterCriticalPolicySection;
+begin
+ GetProcedureAddress(_EnterCriticalPolicySection, userenvlib, 'EnterCriticalPolicySection');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_EnterCriticalPolicySection]
+ end;
+end;
+
+var
+ _LeaveCriticalPolicySection: Pointer;
+
+function LeaveCriticalPolicySection;
+begin
+ GetProcedureAddress(_LeaveCriticalPolicySection, userenvlib, 'LeaveCriticalPolicySection');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_LeaveCriticalPolicySection]
+ end;
+end;
+
+var
+ _RegisterGPNotification: Pointer;
+
+function RegisterGPNotification;
+begin
+ GetProcedureAddress(_RegisterGPNotification, userenvlib, 'RegisterGPNotification');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RegisterGPNotification]
+ end;
+end;
+
+var
+ _UnregisterGPNotification: Pointer;
+
+function UnregisterGPNotification;
+begin
+ GetProcedureAddress(_UnregisterGPNotification, userenvlib, 'UnregisterGPNotification');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_UnregisterGPNotification]
+ end;
+end;
+
+var
+ _GetGPOListA: Pointer;
+
+function GetGPOListA;
+begin
+ GetProcedureAddress(_GetGPOListA, userenvlib, 'GetGPOListA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetGPOListA]
+ end;
+end;
+
+var
+ _GetGPOListW: Pointer;
+
+function GetGPOListW;
+begin
+ GetProcedureAddress(_GetGPOListW, userenvlib, 'GetGPOListW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetGPOListW]
+ end;
+end;
+
+var
+ _GetGPOList: Pointer;
+
+function GetGPOList;
+begin
+ GetProcedureAddress(_GetGPOList, userenvlib, 'GetGPOList' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetGPOList]
+ end;
+end;
+
+var
+ _FreeGPOListA: Pointer;
+
+function FreeGPOListA;
+begin
+ GetProcedureAddress(_FreeGPOListA, userenvlib, 'FreeGPOListA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_FreeGPOListA]
+ end;
+end;
+
+var
+ _FreeGPOListW: Pointer;
+
+function FreeGPOListW;
+begin
+ GetProcedureAddress(_FreeGPOListW, userenvlib, 'FreeGPOListW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_FreeGPOListW]
+ end;
+end;
+
+var
+ _FreeGPOList: Pointer;
+
+function FreeGPOList;
+begin
+ GetProcedureAddress(_FreeGPOList, userenvlib, 'FreeGPOList' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_FreeGPOList]
+ end;
+end;
+
+var
+ _GetAppliedGPOListA: Pointer;
+
+function GetAppliedGPOListA;
+begin
+ GetProcedureAddress(_GetAppliedGPOListA, userenvlib, 'GetAppliedGPOListA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetAppliedGPOListA]
+ end;
+end;
+
+var
+ _GetAppliedGPOListW: Pointer;
+
+function GetAppliedGPOListW;
+begin
+ GetProcedureAddress(_GetAppliedGPOListW, userenvlib, 'GetAppliedGPOListW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetAppliedGPOListW]
+ end;
+end;
+
+var
+ _GetAppliedGPOList: Pointer;
+
+function GetAppliedGPOList;
+begin
+ GetProcedureAddress(_GetAppliedGPOList, userenvlib, 'GetAppliedGPOList' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetAppliedGPOList]
+ end;
+end;
+
+var
+ _ProcessGroupPolicyCompleted: Pointer;
+
+function ProcessGroupPolicyCompleted;
+begin
+ GetProcedureAddress(_ProcessGroupPolicyCompleted, userenvlib, 'ProcessGroupPolicyCompleted');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ProcessGroupPolicyCompleted]
+ end;
+end;
+
+var
+ _ProcessGroupPolicyCompletedEx: Pointer;
+
+function ProcessGroupPolicyCompletedEx;
+begin
+ GetProcedureAddress(_ProcessGroupPolicyCompletedEx, userenvlib, 'ProcessGroupPolicyCompletedEx');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ProcessGroupPolicyCompletedEx]
+ end;
+end;
+
+var
+ _RsopAccessCheckByType: Pointer;
+
+function RsopAccessCheckByType;
+begin
+ GetProcedureAddress(_RsopAccessCheckByType, userenvlib, 'RsopAccessCheckByType');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RsopAccessCheckByType]
+ end;
+end;
+
+var
+ _RsopFileAccessCheck: Pointer;
+
+function RsopFileAccessCheck;
+begin
+ GetProcedureAddress(_RsopFileAccessCheck, userenvlib, 'RsopFileAccessCheck');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RsopFileAccessCheck]
+ end;
+end;
+
+var
+ _RsopSetPolicySettingStatus: Pointer;
+
+function RsopSetPolicySettingStatus;
+begin
+ GetProcedureAddress(_RsopSetPolicySettingStatus, userenvlib, 'RsopSetPolicySettingStatus');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RsopSetPolicySettingStatus]
+ end;
+end;
+
+var
+ _RsopResetPolicySettingStatus: Pointer;
+
+function RsopResetPolicySettingStatus;
+begin
+ GetProcedureAddress(_RsopResetPolicySettingStatus, userenvlib, 'RsopResetPolicySettingStatus');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RsopResetPolicySettingStatus]
+ end;
+end;
+
+{$ELSE}
+
+function LoadUserProfileA; external userenvlib name 'LoadUserProfileA';
+function LoadUserProfileW; external userenvlib name 'LoadUserProfileW';
+function LoadUserProfile; external userenvlib name 'LoadUserProfile' + AWSuffix;
+function UnloadUserProfile; external userenvlib name 'UnloadUserProfile';
+function GetProfilesDirectoryA; external userenvlib name 'GetProfilesDirectoryA';
+function GetProfilesDirectoryW; external userenvlib name 'GetProfilesDirectoryW';
+function GetProfilesDirectory; external userenvlib name 'GetProfilesDirectory' + AWSuffix;
+function GetProfileType; external userenvlib name 'GetProfileType';
+function DeleteProfileA; external userenvlib name 'DeleteProfileA';
+function DeleteProfileW; external userenvlib name 'DeleteProfileW';
+function DeleteProfile; external userenvlib name 'DeleteProfile' + AWSuffix;
+function GetDefaultUserProfileDirectoryA; external userenvlib name 'GetDefaultUserProfileDirectoryA';
+function GetDefaultUserProfileDirectoryW; external userenvlib name 'GetDefaultUserProfileDirectoryW';
+function GetDefaultUserProfileDirectory; external userenvlib name 'GetDefaultUserProfileDirectory' + AWSuffix;
+function GetAllUsersProfileDirectoryA; external userenvlib name 'GetAllUsersProfileDirectoryA';
+function GetAllUsersProfileDirectoryW; external userenvlib name 'GetAllUsersProfileDirectoryW';
+function GetAllUsersProfileDirectory; external userenvlib name 'GetAllUsersProfileDirectory' + AWSuffix;
+function GetUserProfileDirectoryA; external userenvlib name 'GetUserProfileDirectoryA';
+function GetUserProfileDirectoryW; external userenvlib name 'GetUserProfileDirectoryW';
+function GetUserProfileDirectory; external userenvlib name 'GetUserProfileDirectory' + AWSuffix;
+function CreateEnvironmentBlock; external userenvlib name 'CreateEnvironmentBlock';
+function DestroyEnvironmentBlock; external userenvlib name 'DestroyEnvironmentBlock';
+function ExpandEnvironmentStringsForUserA; external userenvlib name 'ExpandEnvironmentStringsForUserA';
+function ExpandEnvironmentStringsForUserW; external userenvlib name 'ExpandEnvironmentStringsForUserW';
+function ExpandEnvironmentStringsForUser; external userenvlib name 'ExpandEnvironmentStringsForUser' + AWSuffix;
+function RefreshPolicy; external userenvlib name 'RefreshPolicy';
+function RefreshPolicyEx; external userenvlib name 'RefreshPolicyEx';
+function EnterCriticalPolicySection; external userenvlib name 'EnterCriticalPolicySection';
+function LeaveCriticalPolicySection; external userenvlib name 'LeaveCriticalPolicySection';
+function RegisterGPNotification; external userenvlib name 'RegisterGPNotification';
+function UnregisterGPNotification; external userenvlib name 'UnregisterGPNotification';
+function GetGPOListA; external userenvlib name 'GetGPOListA';
+function GetGPOListW; external userenvlib name 'GetGPOListW';
+function GetGPOList; external userenvlib name 'GetGPOList' + AWSuffix;
+function FreeGPOListA; external userenvlib name 'FreeGPOListA';
+function FreeGPOListW; external userenvlib name 'FreeGPOListW';
+function FreeGPOList; external userenvlib name 'FreeGPOList' + AWSuffix;
+function GetAppliedGPOListA; external userenvlib name 'GetAppliedGPOListA';
+function GetAppliedGPOListW; external userenvlib name 'GetAppliedGPOListW';
+function GetAppliedGPOList; external userenvlib name 'GetAppliedGPOList' + AWSuffix;
+function ProcessGroupPolicyCompleted; external userenvlib name 'ProcessGroupPolicyCompleted';
+function ProcessGroupPolicyCompletedEx; external userenvlib name 'ProcessGroupPolicyCompletedEx';
+function RsopAccessCheckByType; external userenvlib name 'RsopAccessCheckByType';
+function RsopFileAccessCheck; external userenvlib name 'RsopFileAccessCheck';
+function RsopSetPolicySettingStatus; external userenvlib name 'RsopSetPolicySettingStatus';
+function RsopResetPolicySettingStatus; external userenvlib name 'RsopResetPolicySettingStatus';
+
+{$ENDIF DYNAMIC_LINK}
+
+end.
diff --git a/packages/extra/winunits/jwauxtheme.pas b/packages/extra/winunits/jwauxtheme.pas
index d4d59a4828..908fab2c58 100644
--- a/packages/extra/winunits/jwauxtheme.pas
+++ b/packages/extra/winunits/jwauxtheme.pas
@@ -1,1792 +1,1792 @@
-{******************************************************************************}
-{ }
-{ Visual Styles (Themes) API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: uxtheme.h, released June 2001. The original Pascal }
-{ code is: UxTheme.pas, released July 2001. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwauxtheme.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaUxTheme;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "uxtheme.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaWinType, JwaWinGDI;
-
-type
- HIMAGELIST = HANDLE; // TODO TEMPORARY
-
-type
- HTHEME = HANDLE; // handle to a section of theme data for class
- {$EXTERNALSYM HTHEME}
-
-//---------------------------------------------------------------------------
-// NOTE: PartId's and StateId's used in the theme API are defined in the
-// hdr file <tmschema.h> using the TM_PART and TM_STATE macros. For
-// example, "TM_PART(BP, PUSHBUTTON)" defines the PartId "BP_PUSHBUTTON".
-
-//---------------------------------------------------------------------------
-// OpenThemeData() - Open the theme data for the specified HWND and
-// semi-colon separated list of class names.
-//
-// OpenThemeData() will try each class name, one at
-// a time, and use the first matching theme info
-// found. If a match is found, a theme handle
-// to the data is returned. If no match is found,
-// a "NULL" handle is returned.
-//
-// When the window is destroyed or a WM_THEMECHANGED
-// msg is received, "CloseThemeData()" should be
-// called to close the theme handle.
-//
-// hwnd - window handle of the control/window to be themed
-//
-// pszClassList - class name (or list of names) to match to theme data
-// section. if the list contains more than one name,
-// the names are tested one at a time for a match.
-// If a match is found, OpenThemeData() returns a
-// theme handle associated with the matching class.
-// This param is a list (instead of just a single
-// class name) to provide the class an opportunity
-// to get the "best" match between the class and
-// the current theme. For example, a button might
-// pass L"OkButton, Button" if its ID=ID_OK. If
-// the current theme has an entry for OkButton,
-// that will be used. Otherwise, we fall back on
-// the normal Button entry.
-//---------------------------------------------------------------------------
-
-function OpenThemeData(hwnd: HWND; pszClassList: LPCWSTR): HTHEME; stdcall;
-{$EXTERNALSYM OpenThemeData}
-
-//---------------------------------------------------------------------------
-// CloseTHemeData() - closes the theme data handle. This should be done
-// when the window being themed is destroyed or
-// whenever a WM_THEMECHANGED msg is received
-// (followed by an attempt to create a new Theme data
-// handle).
-//
-// hTheme - open theme data handle (returned from prior call
-// to OpenThemeData() API).
-//---------------------------------------------------------------------------
-
-function CloseThemeData(hTheme: HTHEME): HRESULT; stdcall;
-{$EXTERNALSYM CloseThemeData}
-
-//---------------------------------------------------------------------------
-// functions for basic drawing support
-//---------------------------------------------------------------------------
-// The following methods are the theme-aware drawing services.
-// Controls/Windows are defined in drawable "parts" by their author: a
-// parent part and 0 or more child parts. Each of the parts can be
-// described in "states" (ex: disabled, hot, pressed).
-//---------------------------------------------------------------------------
-// For the list of all themed classes and the definition of all
-// parts and states, see the file "tmschmea.h".
-//---------------------------------------------------------------------------
-// Each of the below methods takes a "iPartId" param to specify the
-// part and a "iStateId" to specify the state of the part.
-// "iStateId=0" refers to the root part. "iPartId" = "0" refers to
-// the root class.
-//-----------------------------------------------------------------------
-// Note: draw operations are always scaled to fit (and not to exceed)
-// the specified "Rect".
-//-----------------------------------------------------------------------
-
-//------------------------------------------------------------------------
-// DrawThemeBackground()
-// - draws the theme-specified border and fill for
-// the "iPartId" and "iStateId". This could be
-// based on a bitmap file, a border and fill, or
-// other image description.
-//
-// hTheme - theme data handle
-// hdc - HDC to draw into
-// iPartId - part number to draw
-// iStateId - state number (of the part) to draw
-// pRect - defines the size/location of the part
-// pClipRect - optional clipping rect (don't draw outside it)
-//------------------------------------------------------------------------
-
-function DrawThemeBackground(hTheme: HTHEME; hdc: HDC; iPartId, iStateId: Integer;
- const pRect: RECT; pClipRect: PRECT): HRESULT; stdcall;
-{$EXTERNALSYM DrawThemeBackground}
-
-//---------------------------------------------------------------------------
-//----- DrawThemeText() flags ----
-
-const
- DTT_GRAYED = $1; // draw a grayed-out string
- {$EXTERNALSYM DTT_GRAYED}
-
-//-------------------------------------------------------------------------
-// DrawThemeText() - draws the text using the theme-specified
-// color and font for the "iPartId" and
-// "iStateId".
-//
-// hTheme - theme data handle
-// hdc - HDC to draw into
-// iPartId - part number to draw
-// iStateId - state number (of the part) to draw
-// pszText - actual text to draw
-// dwCharCount - number of chars to draw (-1 for all)
-// dwTextFlags - same as DrawText() "uFormat" param
-// dwTextFlags2 - additional drawing options
-// pRect - defines the size/location of the part
-//-------------------------------------------------------------------------
-
-function DrawThemeText(hTheme: HTHEME; hdc: HDC; iPartId, iStateId: Integer;
- pszText: LPCWSTR; iCharCount: Integer; dwTextFlags, dwTextFlags2: DWORD;
- const pRect: RECT): HRESULT; stdcall;
-{$EXTERNALSYM DrawThemeText}
-
-//-------------------------------------------------------------------------
-// GetThemeBackgroundContentRect()
-// - gets the size of the content for the theme-defined
-// background. This is usually the area inside
-// the borders or Margins.
-//
-// hTheme - theme data handle
-// hdc - (optional) device content to be used for drawing
-// iPartId - part number to draw
-// iStateId - state number (of the part) to draw
-// pBoundingRect - the outer RECT of the part being drawn
-// pContentRect - RECT to receive the content area
-//-------------------------------------------------------------------------
-
-function GetThemeBackgroundContentRect(hTheme: HTHEME; hdc: HDC; iPartId, iStateId: Integer;
- const pBoundingRect: RECT; pContentRect: PRECT): HRESULT; stdcall;
-{$EXTERNALSYM GetThemeBackgroundContentRect}
-
-//-------------------------------------------------------------------------
-// GetThemeBackgroundExtent() - calculates the size/location of the theme-
-// specified background based on the
-// "pContentRect".
-//
-// hTheme - theme data handle
-// hdc - (optional) device content to be used for drawing
-// iPartId - part number to draw
-// iStateId - state number (of the part) to draw
-// pContentRect - RECT that defines the content area
-// pBoundingRect - RECT to receive the overall size/location of part
-//-------------------------------------------------------------------------
-
-function GetThemeBackgroundExtent(hTheme: HTHEME; hdc: HDC; iPartId, iStateId: Integer;
- const pContentRect: RECT; var pExtentRect: RECT): HRESULT; stdcall;
-{$EXTERNALSYM GetThemeBackgroundExtent}
-
-//-------------------------------------------------------------------------
-
-type
- THEMESIZE = (
- TS_MIN, // minimum size
- TS_TRUE, // size without stretching
- TS_DRAW); // size that theme mgr will use to draw part
- {$EXTERNALSYM THEMESIZE}
- TThemeSize = THEMESIZE;
-
-//-------------------------------------------------------------------------
-// GetThemePartSize() - returns the specified size of the theme part
-//
-// hTheme - theme data handle
-// hdc - HDC to select font into & measure against
-// iPartId - part number to retrieve size for
-// iStateId - state number (of the part)
-// prc - (optional) rect for part drawing destination
-// eSize - the type of size to be retreived
-// psz - receives the specified size of the part
-//-------------------------------------------------------------------------
-
-function GetThemePartSize(hTheme: HTHEME; hdc: HDC; iPartId, iStateId: Integer;
- prc: PRECT; eSize: THEMESIZE; var psz: TSize): HRESULT; stdcall;
-{$EXTERNALSYM GetThemePartSize}
-
-//-------------------------------------------------------------------------
-// GetThemeTextExtent() - calculates the size/location of the specified
-// text when rendered in the Theme Font.
-//
-// hTheme - theme data handle
-// hdc - HDC to select font & measure into
-// iPartId - part number to draw
-// iStateId - state number (of the part)
-// pszText - the text to be measured
-// dwCharCount - number of chars to draw (-1 for all)
-// dwTextFlags - same as DrawText() "uFormat" param
-// pszBoundingRect - optional: to control layout of text
-// pszExtentRect - receives the RECT for text size/location
-//-------------------------------------------------------------------------
-
-function GetThemeTextExtent(hTheme: HTHEME; hdc: HDC; iPartId, iStateId: Integer;
- pszText: LPCWSTR; iCharCount: Integer; dwTextFlags: DWORD; pBoundingRect: PRECT;
- var pExtentRect: RECT): HRESULT; stdcall;
-{$EXTERNALSYM GetThemeTextExtent}
-
-//-------------------------------------------------------------------------
-// GetThemeTextMetrics()
-// - returns info about the theme-specified font
-// for the part/state passed in.
-//
-// hTheme - theme data handle
-// hdc - optional: HDC for screen context
-// iPartId - part number to draw
-// iStateId - state number (of the part)
-// ptm - receives the font info
-//-------------------------------------------------------------------------
-
-function GetThemeTextMetrics(hTheme: HTHEME; hdc: HDC; iPartId, iStateId: Integer;
- var ptm: TEXTMETRIC): HRESULT; stdcall;
-{$EXTERNALSYM GetThemeTextMetrics}
-
-//-------------------------------------------------------------------------
-// GetThemeBackgroundRegion()
-// - computes the region for a regular or partially
-// transparent theme-specified background that is
-// bound by the specified "pRect".
-// If the rectangle is empty, sets the HRGN to NULL
-// and return S_FALSE.
-//
-// hTheme - theme data handle
-// hdc - optional HDC to draw into (DPI scaling)
-// iPartId - part number to draw
-// iStateId - state number (of the part)
-// pRect - the RECT used to draw the part
-// pRegion - receives handle to calculated region
-//-------------------------------------------------------------------------
-
-function GetThemeBackgroundRegion(hTheme: HTHEME; hdc: HDC; iPartId, iStateId: Integer;
- const pRect: RECT; var pRegion: HRGN): HRESULT; stdcall;
-{$EXTERNALSYM GetThemeBackgroundRegion}
-
-//-------------------------------------------------------------------------
-//----- HitTestThemeBackground, HitTestThemeBackgroundRegion flags ----
-
-// Theme background segment hit test flag (default). possible return values are:
-// HTCLIENT: hit test succeeded in the middle background segment
-// HTTOP, HTLEFT, HTTOPLEFT, etc: // hit test succeeded in the the respective theme background segment.
-
-const
- HTTB_BACKGROUNDSEG = $0000;
- {$EXTERNALSYM HTTB_BACKGROUNDSEG}
-
-// Fixed border hit test option. possible return values are:
-// HTCLIENT: hit test succeeded in the middle background segment
-// HTBORDER: hit test succeeded in any other background segment
-
- HTTB_FIXEDBORDER = $0002; // Return code may be either HTCLIENT or HTBORDER.
- {$EXTERNALSYM HTTB_FIXEDBORDER}
-
-// Caption hit test option. Possible return values are:
-// HTCAPTION: hit test succeeded in the top, top left, or top right background segments
-// HTNOWHERE or another return code, depending on absence or presence of accompanying flags, resp.
-
- HTTB_CAPTION = $0004;
- {$EXTERNALSYM HTTB_CAPTION}
-
-// Resizing border hit test flags. Possible return values are:
-// HTCLIENT: hit test succeeded in middle background segment
-// HTTOP, HTTOPLEFT, HTLEFT, HTRIGHT, etc: hit test succeeded in the respective system resizing zone
-// HTBORDER: hit test failed in middle segment and resizing zones, but succeeded in a background border segment
-
- HTTB_RESIZINGBORDER_LEFT = $0010; // Hit test left resizing border,
- {$EXTERNALSYM HTTB_RESIZINGBORDER_LEFT}
- HTTB_RESIZINGBORDER_TOP = $0020; // Hit test top resizing border
- {$EXTERNALSYM HTTB_RESIZINGBORDER_TOP}
- HTTB_RESIZINGBORDER_RIGHT = $0040; // Hit test right resizing border
- {$EXTERNALSYM HTTB_RESIZINGBORDER_RIGHT}
- HTTB_RESIZINGBORDER_BOTTOM = $0080; // Hit test bottom resizing border
- {$EXTERNALSYM HTTB_RESIZINGBORDER_BOTTOM}
-
- HTTB_RESIZINGBORDER = (HTTB_RESIZINGBORDER_LEFT or HTTB_RESIZINGBORDER_TOP or
- HTTB_RESIZINGBORDER_RIGHT or HTTB_RESIZINGBORDER_BOTTOM);
- {$EXTERNALSYM HTTB_RESIZINGBORDER}
-
-// Resizing border is specified as a template, not just window edges.
-// This option is mutually exclusive with HTTB_SYSTEMSIZINGWIDTH; HTTB_SIZINGTEMPLATE takes precedence
-
- HTTB_SIZINGTEMPLATE = $0100;
- {$EXTERNALSYM HTTB_SIZINGTEMPLATE}
-
-// Use system resizing border width rather than theme content margins.
-// This option is mutually exclusive with HTTB_SIZINGTEMPLATE, which takes precedence.
-
- HTTB_SYSTEMSIZINGMARGINS = $0200;
- {$EXTERNALSYM HTTB_SYSTEMSIZINGMARGINS}
-
-//-------------------------------------------------------------------------
-// HitTestThemeBackground()
-// - returns a HitTestCode (a subset of the values
-// returned by WM_NCHITTEST) for the point "ptTest"
-// within the theme-specified background
-// (bound by pRect). "pRect" and "ptTest" should
-// both be in the same coordinate system
-// (client, screen, etc).
-//
-// hTheme - theme data handle
-// hdc - HDC to draw into
-// iPartId - part number to test against
-// iStateId - state number (of the part)
-// pRect - the RECT used to draw the part
-// hrgn - optional region to use; must be in same coordinates as
-// - pRect and pTest.
-// ptTest - the hit point to be tested
-// dwOptions - HTTB_xxx constants
-// pwHitTestCode - receives the returned hit test code - one of:
-//
-// HTNOWHERE, HTLEFT, HTTOPLEFT, HTBOTTOMLEFT,
-// HTRIGHT, HTTOPRIGHT, HTBOTTOMRIGHT,
-// HTTOP, HTBOTTOM, HTCLIENT
-//-------------------------------------------------------------------------
-
-function HitTestThemeBackground(hTheme: HTHEME; hdc: HDC; iPartId, iStateId: Integer;
- dwOptions: DWORD; const pRect: RECT; hrgn: HRGN; ptTest: POINT; var pwHitTestCode: WORD): HRESULT; stdcall;
-{$EXTERNALSYM HitTestThemeBackground}
-
-//------------------------------------------------------------------------
-// DrawThemeEdge() - Similar to the DrawEdge() API, but uses part colors
-// and is high-DPI aware
-// hTheme - theme data handle
-// hdc - HDC to draw into
-// iPartId - part number to draw
-// iStateId - state number of part
-// pDestRect - the RECT used to draw the line(s)
-// uEdge - Same as DrawEdge() API
-// uFlags - Same as DrawEdge() API
-// pContentRect - Receives the interior rect if (uFlags & BF_ADJUST)
-//------------------------------------------------------------------------
-
-function DrawThemeEdge(hTheme: HTHEME; hdc: HDC; iPartId, iStateId: Integer;
- const pDestRect: RECT; uEdge, uFlags: UINT; pContentRect: PRECT): HRESULT; stdcall;
-{$EXTERNALSYM DrawThemeEdge}
-
-//------------------------------------------------------------------------
-// DrawThemeIcon() - draws an image within an imagelist based on
-// a (possible) theme-defined effect.
-//
-// hTheme - theme data handle
-// hdc - HDC to draw into
-// iPartId - part number to draw
-// iStateId - state number of part
-// pRect - the RECT to draw the image within
-// himl - handle to IMAGELIST
-// iImageIndex - index into IMAGELIST (which icon to draw)
-//------------------------------------------------------------------------
-
-function DrawThemeIcon(hTheme: HTHEME; hdc: HDC; iPartId, iStateId: Integer;
- const pRect: RECT; himl: HIMAGELIST; iImageIndex: Integer): HRESULT; stdcall;
-{$EXTERNALSYM DrawThemeIcon}
-
-//---------------------------------------------------------------------------
-// IsThemePartDefined() - returns TRUE if the theme has defined parameters
-// for the specified "iPartId" and "iStateId".
-//
-// hTheme - theme data handle
-// iPartId - part number to find definition for
-// iStateId - state number of part
-//---------------------------------------------------------------------------
-
-function IsThemePartDefined(hTheme: HTHEME; iPartId, iStateId: Integer): BOOL; stdcall;
-{$EXTERNALSYM IsThemePartDefined}
-
-//---------------------------------------------------------------------------
-// IsThemeBackgroundPartiallyTransparent()
-// - returns TRUE if the theme specified background for
-// the part/state has transparent pieces or
-// alpha-blended pieces.
-//
-// hTheme - theme data handle
-// iPartId - part number
-// iStateId - state number of part
-//---------------------------------------------------------------------------
-
-function IsThemeBackgroundPartiallyTransparent(hTheme: HTHEME; iPartId, iStateId: Integer): BOOL; stdcall;
-{$EXTERNALSYM IsThemeBackgroundPartiallyTransparent}
-
-//---------------------------------------------------------------------------
-// lower-level theme information services
-//---------------------------------------------------------------------------
-// The following methods are getter routines for each of the Theme Data types.
-// Controls/Windows are defined in drawable "parts" by their author: a
-// parent part and 0 or more child parts. Each of the parts can be
-// described in "states" (ex: disabled, hot, pressed).
-//---------------------------------------------------------------------------
-// Each of the below methods takes a "iPartId" param to specify the
-// part and a "iStateId" to specify the state of the part.
-// "iStateId=0" refers to the root part. "iPartId" = "0" refers to
-// the root class.
-//-----------------------------------------------------------------------
-// Each method also take a "iPropId" param because multiple instances of
-// the same primitive type can be defined in the theme schema.
-//-----------------------------------------------------------------------
-
-//-----------------------------------------------------------------------
-// GetThemeColor() - Get the value for the specified COLOR property
-//
-// hTheme - theme data handle
-// iPartId - part number
-// iStateId - state number of part
-// iPropId - the property number to get the value for
-// pColor - receives the value of the property
-//-----------------------------------------------------------------------
-
-function GetThemeColor(hTheme: HTHEME; iPartId, iStateId, iPropId: Integer;
- var pColor: COLORREF): HRESULT; stdcall;
-{$EXTERNALSYM GetThemeColor}
-
-//-----------------------------------------------------------------------
-// GetThemeMetric() - Get the value for the specified metric/size
-// property
-//
-// hTheme - theme data handle
-// hdc - (optional) hdc to be drawn into (DPI scaling)
-// iPartId - part number
-// iStateId - state number of part
-// iPropId - the property number to get the value for
-// piVal - receives the value of the property
-//-----------------------------------------------------------------------
-
-function GetThemeMetric(hTheme: HTHEME; hdc: HDC; iPartId, iStateId, iPropId: Integer;
- var piVal: Integer): HRESULT; stdcall;
-{$EXTERNALSYM GetThemeMetric}
-
-//-----------------------------------------------------------------------
-// GetThemeString() - Get the value for the specified string property
-//
-// hTheme - theme data handle
-// iPartId - part number
-// iStateId - state number of part
-// iPropId - the property number to get the value for
-// pszBuff - receives the string property value
-// cchMaxBuffChars - max. number of chars allowed in pszBuff
-//-----------------------------------------------------------------------
-
-function GetThemeString(hTheme: HTHEME; iPartId, iStateId, iPropId: Integer;
- pszBuff: LPWSTR; cchMaxBuffChars: Integer): HRESULT; stdcall;
-{$EXTERNALSYM GetThemeString}
-
-//-----------------------------------------------------------------------
-// GetThemeBool() - Get the value for the specified BOOL property
-//
-// hTheme - theme data handle
-// iPartId - part number
-// iStateId - state number of part
-// iPropId - the property number to get the value for
-// pfVal - receives the value of the property
-//-----------------------------------------------------------------------
-
-function GetThemeBool(hTheme: HTHEME; iPartId, iStateId, iPropId: Integer;
- var pfVal: BOOL): HRESULT; stdcall;
-{$EXTERNALSYM GetThemeBool}
-
-//-----------------------------------------------------------------------
-// GetThemeInt() - Get the value for the specified int property
-//
-// hTheme - theme data handle
-// iPartId - part number
-// iStateId - state number of part
-// iPropId - the property number to get the value for
-// piVal - receives the value of the property
-//-----------------------------------------------------------------------
-
-function GetThemeInt(hTheme: HTHEME; iPartId, iStateId, iPropId: Integer;
- var piVal: Integer): HRESULT; stdcall;
-{$EXTERNALSYM GetThemeInt}
-
-//-----------------------------------------------------------------------
-// GetThemeEnumValue() - Get the value for the specified ENUM property
-//
-// hTheme - theme data handle
-// iPartId - part number
-// iStateId - state number of part
-// iPropId - the property number to get the value for
-// piVal - receives the value of the enum (cast to int*)
-//-----------------------------------------------------------------------
-
-function GetThemeEnumValue(hTheme: HTHEME; iPartId, iStateId, iPropId: Integer;
- var piVal: Integer): HRESULT; stdcall;
-{$EXTERNALSYM GetThemeEnumValue}
-
-//-----------------------------------------------------------------------
-// GetThemePosition() - Get the value for the specified position
-// property
-//
-// hTheme - theme data handle
-// iPartId - part number
-// iStateId - state number of part
-// iPropId - the property number to get the value for
-// pPoint - receives the value of the position property
-//-----------------------------------------------------------------------
-
-function GetThemePosition(hTheme: HTHEME; iPartId, iStateId, iPropId: Integer;
- var pPoint: POINT): HRESULT; stdcall;
-{$EXTERNALSYM GetThemePosition}
-
-//-----------------------------------------------------------------------
-// GetThemeFont() - Get the value for the specified font property
-//
-// hTheme - theme data handle
-// hdc - (optional) hdc to be drawn to (DPI scaling)
-// iPartId - part number
-// iStateId - state number of part
-// iPropId - the property number to get the value for
-// pFont - receives the value of the LOGFONT property
-// (scaled for the current logical screen dpi)
-//-----------------------------------------------------------------------
-
-function GetThemeFont(hTheme: HTHEME; hdc: HDC; iPartId, iStateId, iPropId: Integer;
- var pFont: LOGFONT): HRESULT; stdcall;
-{$EXTERNALSYM GetThemeFont}
-
-//-----------------------------------------------------------------------
-// GetThemeRect() - Get the value for the specified RECT property
-//
-// hTheme - theme data handle
-// iPartId - part number
-// iStateId - state number of part
-// iPropId - the property number to get the value for
-// pRect - receives the value of the RECT property
-//-----------------------------------------------------------------------
-
-function GetThemeRect(hTheme: HTHEME; iPartId, iStateId, iPropId: Integer;
- var pRect: RECT): HRESULT; stdcall;
-{$EXTERNALSYM GetThemeRect}
-
-//-----------------------------------------------------------------------
-
-type
- _MARGINS = record
- cxLeftWidth: Integer; // width of left border that retains its size
- cxRightWidth: Integer; // width of right border that retains its size
- cyTopHeight: Integer; // height of top border that retains its size
- cyBottomHeight: Integer; // height of bottom border that retains its size
- end;
- {$EXTERNALSYM _MARGINS}
- MARGINS = _MARGINS;
- {$EXTERNALSYM MARGINS}
- PMARGINS = ^MARGINS;
- {$EXTERNALSYM PMARGINS}
- TMargins = MARGINS;
-
-//-----------------------------------------------------------------------
-// GetThemeMargins() - Get the value for the specified MARGINS property
-//
-// hTheme - theme data handle
-// hdc - (optional) hdc to be used for drawing
-// iPartId - part number
-// iStateId - state number of part
-// iPropId - the property number to get the value for
-// prc - RECT for area to be drawn into
-// pMargins - receives the value of the MARGINS property
-//-----------------------------------------------------------------------
-
-function GetThemeMargins(hTheme: HTHEME; hdc: HDC; iPartId, iStateId, iPropId: Integer;
- prc: PRECT; var pMargins: MARGINS): HRESULT; stdcall;
-{$EXTERNALSYM GetThemeMargins}
-
-//-----------------------------------------------------------------------
-
-const
- MAX_INTLIST_COUNT = 10;
- {$EXTERNALSYM MAX_INTLIST_COUNT}
-
-type
- _INTLIST = record
- iValueCount: Integer; // number of values in iValues
- iValues: array [0..MAX_INTLIST_COUNT - 1] of Integer;
- end;
- {$EXTERNALSYM _INTLIST}
- INTLIST = _INTLIST;
- {$EXTERNALSYM INTLIST}
- PINTLIST = ^INTLIST;
- {$EXTERNALSYM PINTLIST}
- TIntList = INTLIST;
-
-//-----------------------------------------------------------------------
-// GetThemeIntList() - Get the value for the specified INTLIST struct
-//
-// hTheme - theme data handle
-// iPartId - part number
-// iStateId - state number of part
-// iPropId - the property number to get the value for
-// pIntList - receives the value of the INTLIST property
-//-----------------------------------------------------------------------
-
-function GetThemeIntList(hTheme: HTHEME; iPartId, iStateId, iPropId: Integer;
- var pIntList: INTLIST): HRESULT; stdcall;
-{$EXTERNALSYM GetThemeIntList}
-
-//-----------------------------------------------------------------------
-
-type
- PROPERTYORIGIN = (
- PO_STATE, // property was found in the state section
- PO_PART, // property was found in the part section
- PO_CLASS, // property was found in the class section
- PO_GLOBAL, // property was found in [globals] section
- PO_NOTFOUND); // property was not found
- {$EXTERNALSYM PROPERTYORIGIN}
- TPropertyOrigin = PROPERTYORIGIN;
-
-//-----------------------------------------------------------------------
-// GetThemePropertyOrigin()
-// - searches for the specified theme property
-// and sets "pOrigin" to indicate where it was
-// found (or not found)
-//
-// hTheme - theme data handle
-// iPartId - part number
-// iStateId - state number of part
-// iPropId - the property number to search for
-// pOrigin - receives the value of the property origin
-//-----------------------------------------------------------------------
-
-function GetThemePropertyOrigin(hTheme: HTHEME; iPartId, iStateId, iPropId: Integer;
- var pOrigin: PROPERTYORIGIN): HRESULT; stdcall;
-{$EXTERNALSYM GetThemePropertyOrigin}
-
-//---------------------------------------------------------------------------
-// SetWindowTheme()
-// - redirects an existing Window to use a different
-// section of the current theme information than its
-// class normally asks for.
-//
-// hwnd - the handle of the window (cannot be NULL)
-//
-// pszSubAppName - app (group) name to use in place of the calling
-// app's name. If NULL, the actual calling app
-// name will be used.
-//
-// pszSubIdList - semicolon separated list of class Id names to
-// use in place of actual list passed by the
-// window's class. if NULL, the id list from the
-// calling class is used.
-//---------------------------------------------------------------------------
-// The Theme Manager will remember the "pszSubAppName" and the
-// "pszSubIdList" associations thru the lifetime of the window (even
-// if themes are subsequently changed). The window is sent a
-// "WM_THEMECHANGED" msg at the end of this call, so that the new
-// theme can be found and applied.
-//---------------------------------------------------------------------------
-// When "pszSubAppName" or "pszSubIdList" are NULL, the Theme Manager
-// removes the previously remember association. To turn off theme-ing for
-// the specified window, you can pass an empty string (L"") so it
-// won't match any section entries.
-//---------------------------------------------------------------------------
-
-function SetWindowTheme(hwnd: HWND; pszSubAppName: LPCWSTR; pszSubIdList: LPCWSTR): HRESULT; stdcall;
-{$EXTERNALSYM SetWindowTheme}
-
-//---------------------------------------------------------------------------
-// GetThemeFilename() - Get the value for the specified FILENAME property.
-//
-// hTheme - theme data handle
-// iPartId - part number
-// iStateId - state number of part
-// iPropId - the property number to search for
-// pszThemeFileName - output buffer to receive the filename
-// cchMaxBuffChars - the size of the return buffer, in chars
-//---------------------------------------------------------------------------
-
-function GetThemeFilename(hTheme: HTHEME; iPartId, iStateId, iPropId: Integer;
- pszThemeFileName: LPWSTR; cchMaxBuffChars: Integer): HRESULT; stdcall;
-{$EXTERNALSYM GetThemeFilename}
-
-//---------------------------------------------------------------------------
-// GetThemeSysColor() - Get the value of the specified System color.
-//
-// hTheme - the theme data handle. if non-NULL, will return
-// color from [SysMetrics] section of theme.
-// if NULL, will return the global system color.
-//
-// iColorId - the system color index defined in winuser.h
-//---------------------------------------------------------------------------
-
-function GetThemeSysColor(hTheme: HTHEME; iColorId: Integer): COLORREF; stdcall;
-{$EXTERNALSYM GetThemeSysColor}
-
-//---------------------------------------------------------------------------
-// GetThemeSysColorBrush()
-// - Get the brush for the specified System color.
-//
-// hTheme - the theme data handle. if non-NULL, will return
-// brush matching color from [SysMetrics] section of
-// theme. if NULL, will return the brush matching
-// global system color.
-//
-// iColorId - the system color index defined in winuser.h
-//---------------------------------------------------------------------------
-
-function GetThemeSysColorBrush(hTheme: HTHEME; iColorId: Integer): HBRUSH; stdcall;
-{$EXTERNALSYM GetThemeSysColorBrush}
-
-//---------------------------------------------------------------------------
-// GetThemeSysBool() - Get the boolean value of specified System metric.
-//
-// hTheme - the theme data handle. if non-NULL, will return
-// BOOL from [SysMetrics] section of theme.
-// if NULL, will return the specified system boolean.
-//
-// iBoolId - the TMT_XXX BOOL number (first BOOL
-// is TMT_FLATMENUS)
-//---------------------------------------------------------------------------
-
-function GetThemeSysBool(hTheme: HTHEME; iBoolId: Integer): BOOL; stdcall;
-{$EXTERNALSYM GetThemeSysBool}
-
-//---------------------------------------------------------------------------
-// GetThemeSysSize() - Get the value of the specified System size metric.
-// (scaled for the current logical screen dpi)
-//
-// hTheme - the theme data handle. if non-NULL, will return
-// size from [SysMetrics] section of theme.
-// if NULL, will return the global system metric.
-//
-// iSizeId - the following values are supported when
-// hTheme is non-NULL:
-//
-// SM_CXBORDER (border width)
-// SM_CXVSCROLL (scrollbar width)
-// SM_CYHSCROLL (scrollbar height)
-// SM_CXSIZE (caption width)
-// SM_CYSIZE (caption height)
-// SM_CXSMSIZE (small caption width)
-// SM_CYSMSIZE (small caption height)
-// SM_CXMENUSIZE (menubar width)
-// SM_CYMENUSIZE (menubar height)
-//
-// when hTheme is NULL, iSizeId is passed directly
-// to the GetSystemMetrics() function
-//---------------------------------------------------------------------------
-
-function GetThemeSysSize(hTheme: HTHEME; iSizeId: Integer): Integer; stdcall;
-{$EXTERNALSYM GetThemeSysSize}
-
-//---------------------------------------------------------------------------
-// GetThemeSysFont() - Get the LOGFONT for the specified System font.
-//
-// hTheme - the theme data handle. if non-NULL, will return
-// font from [SysMetrics] section of theme.
-// if NULL, will return the specified system font.
-//
-// iFontId - the TMT_XXX font number (first font
-// is TMT_CAPTIONFONT)
-//
-// plf - ptr to LOGFONT to receive the font value.
-// (scaled for the current logical screen dpi)
-//---------------------------------------------------------------------------
-
-function GetThemeSysFont(hTheme: HTHEME; iFontId: Integer; var plf: LOGFONT): HRESULT; stdcall;
-{$EXTERNALSYM GetThemeSysFont}
-
-//---------------------------------------------------------------------------
-// GetThemeSysString() - Get the value of specified System string metric.
-//
-// hTheme - the theme data handle (required)
-//
-// iStringId - must be one of the following values:
-//
-// TMT_CSSNAME
-// TMT_XMLNAME
-//
-// pszStringBuff - the buffer to receive the string value
-//
-// cchMaxStringChars - max. number of chars that pszStringBuff can hold
-//---------------------------------------------------------------------------
-
-function GetThemeSysString(hTheme: HTHEME; iStringId: Integer;
- pszStringBuff: LPWSTR; cchMaxStringChars: Integer): HRESULT; stdcall;
-{$EXTERNALSYM GetThemeSysString}
-
-//---------------------------------------------------------------------------
-// GetThemeSysInt() - Get the value of specified System int.
-//
-// hTheme - the theme data handle (required)
-//
-// iIntId - must be one of the following values:
-//
-// TMT_DPIX
-// TMT_DPIY
-// TMT_MINCOLORDEPTH
-//
-// piValue - ptr to int to receive value
-//---------------------------------------------------------------------------
-
-function GetThemeSysInt(hTheme: HTHEME; iIntId: Integer; var piValue: Integer): HRESULT; stdcall;
-{$EXTERNALSYM GetThemeSysInt}
-
-//---------------------------------------------------------------------------
-// IsThemeActive() - can be used to test if a system theme is active
-// for the current user session.
-//
-// use the API "IsAppThemed()" to test if a theme is
-// active for the calling process.
-//---------------------------------------------------------------------------
-
-function IsThemeActive: BOOL; stdcall;
-{$EXTERNALSYM IsThemeActive}
-
-//---------------------------------------------------------------------------
-// IsAppThemed() - returns TRUE if a theme is active and available to
-// the current process
-//---------------------------------------------------------------------------
-
-function IsAppThemed: BOOL; stdcall;
-{$EXTERNALSYM IsAppThemed}
-
-//---------------------------------------------------------------------------
-// GetWindowTheme() - if window is themed, returns its most recent
-// HTHEME from OpenThemeData() - otherwise, returns
-// NULL.
-//
-// hwnd - the window to get the HTHEME of
-//---------------------------------------------------------------------------
-
-function GetWindowTheme(hwnd: HWND): HTHEME; stdcall;
-{$EXTERNALSYM GetWindowTheme}
-
-//---------------------------------------------------------------------------
-// EnableThemeDialogTexture()
-//
-// - Enables/disables dialog background theme. This method can be used to
-// tailor dialog compatibility with child windows and controls that
-// may or may not coordinate the rendering of their client area backgrounds
-// with that of their parent dialog in a manner that supports seamless
-// background texturing.
-//
-// hdlg - the window handle of the target dialog
-// dwFlags - ETDT_ENABLE to enable the theme-defined dialog background texturing,
-// ETDT_DISABLE to disable background texturing,
-// ETDT_ENABLETAB to enable the theme-defined background
-// texturing using the Tab texture
-//---------------------------------------------------------------------------
-
-const
- ETDT_DISABLE = $00000001;
- {$EXTERNALSYM ETDT_DISABLE}
- ETDT_ENABLE = $00000002;
- {$EXTERNALSYM ETDT_ENABLE}
- ETDT_USETABTEXTURE = $00000004;
- {$EXTERNALSYM ETDT_USETABTEXTURE}
- ETDT_ENABLETAB = ETDT_ENABLE or ETDT_USETABTEXTURE;
- {$EXTERNALSYM ETDT_ENABLETAB}
-
-function EnableThemeDialogTexture(hwnd: HWND; dwFlags: DWORD): HRESULT; stdcall;
-{$EXTERNALSYM EnableThemeDialogTexture}
-
-//---------------------------------------------------------------------------
-// IsThemeDialogTextureEnabled()
-//
-// - Reports whether the dialog supports background texturing.
-//
-// hdlg - the window handle of the target dialog
-//---------------------------------------------------------------------------
-
-function IsThemeDialogTextureEnabled(hwnd: HWND): BOOL; stdcall;
-{$EXTERNALSYM IsThemeDialogTextureEnabled}
-
-//---------------------------------------------------------------------------
-//---- flags to control theming within an app ----
-
-const
- STAP_ALLOW_NONCLIENT = 1 shl 0;
- {$EXTERNALSYM STAP_ALLOW_NONCLIENT}
- STAP_ALLOW_CONTROLS = 1 shl 1;
- {$EXTERNALSYM STAP_ALLOW_CONTROLS}
- STAP_ALLOW_WEBCONTENT = 1 shl 2;
- {$EXTERNALSYM STAP_ALLOW_WEBCONTENT}
-
-//---------------------------------------------------------------------------
-// GetThemeAppProperties()
-// - returns the app property flags that control theming
-//---------------------------------------------------------------------------
-
-function GetThemeAppProperties: DWORD; stdcall;
-{$EXTERNALSYM GetThemeAppProperties}
-
-//---------------------------------------------------------------------------
-// SetThemeAppProperties()
-// - sets the flags that control theming within the app
-//
-// dwFlags - the flag values to be set
-//---------------------------------------------------------------------------
-
-procedure SetThemeAppProperties(dwFlags: DWORD); stdcall;
-{$EXTERNALSYM SetThemeAppProperties}
-
-//---------------------------------------------------------------------------
-// GetCurrentThemeName()
-// - Get the name of the current theme in-use.
-// Optionally, return the ColorScheme name and the
-// Size name of the theme.
-//
-// pszThemeFileName - receives the theme path & filename
-// cchMaxNameChars - max chars allowed in pszNameBuff
-//
-// pszColorBuff - (optional) receives the canonical color scheme name
-// (not the display name)
-// cchMaxColorChars - max chars allowed in pszColorBuff
-//
-// pszSizeBuff - (optional) receives the canonical size name
-// (not the display name)
-// cchMaxSizeChars - max chars allowed in pszSizeBuff
-//---------------------------------------------------------------------------
-
-function GetCurrentThemeName(pszThemeFileName: LPWSTR; cchMaxNameChars: Integer; pszColorBuff: LPWSTR;
- cchMaxColorChars: Integer; pszSizeBuff: LPWSTR; cchMaxSizeChars: Integer): HRESULT; stdcall;
-{$EXTERNALSYM GetCurrentThemeName}
-
-//---------------------------------------------------------------------------
-// GetThemeDocumentationProperty()
-// - Get the value for the specified property name from
-// the [documentation] section of the themes.ini file
-// for the specified theme. If the property has been
-// localized in the theme files string table, the
-// localized version of the property value is returned.
-//
-// pszThemeFileName - filename of the theme file to query
-// pszPropertyName - name of the string property to retreive a value for
-// pszValueBuff - receives the property string value
-// cchMaxValChars - max chars allowed in pszValueBuff
-//---------------------------------------------------------------------------
-
-const
- SZ_THDOCPROP_DISPLAYNAME = WideString('DisplayName');
- {$EXTERNALSYM SZ_THDOCPROP_DISPLAYNAME}
- SZ_THDOCPROP_CANONICALNAME = WideString('ThemeName');
- {$EXTERNALSYM SZ_THDOCPROP_CANONICALNAME}
- SZ_THDOCPROP_TOOLTIP = WideString('ToolTip');
- {$EXTERNALSYM SZ_THDOCPROP_TOOLTIP}
- SZ_THDOCPROP_AUTHOR = WideString('author');
- {$EXTERNALSYM SZ_THDOCPROP_AUTHOR}
-
-function GetThemeDocumentationProperty(pszThemeName, pszPropertyName: LPCWSTR;
- pszValueBuff: LPWSTR; cchMaxValChars: Integer): HRESULT; stdcall;
-{$EXTERNALSYM GetThemeDocumentationProperty}
-
-//---------------------------------------------------------------------------
-// Theme API Error Handling
-//
-// All functions in the Theme API not returning an HRESULT (THEMEAPI_)
-// use the WIN32 function "SetLastError()" to record any call failures.
-//
-// To retreive the error code of the last failure on the
-// current thread for these type of API's, use the WIN32 function
-// "GetLastError()".
-//
-// All Theme API error codes (HRESULT's and GetLastError() values)
-// should be normal win32 errors which can be formatted into
-// strings using the Win32 API FormatMessage().
-//---------------------------------------------------------------------------
-
-//---------------------------------------------------------------------------
-// DrawThemeParentBackground()
-// - used by partially-transparent or alpha-blended
-// child controls to draw the part of their parent
-// that they appear in front of.
-//
-// hwnd - handle of the child control
-
-// hdc - hdc of the child control
-
-// prc - (optional) rect that defines the area to be
-// drawn (CHILD coordinates)
-//---------------------------------------------------------------------------
-
-function DrawThemeParentBackground(hwnd: HWND; hdc: HDC; prc: PRECT): HRESULT; stdcall;
-{$EXTERNALSYM DrawThemeParentBackground}
-
-//---------------------------------------------------------------------------
-// EnableTheming() - enables or disables themeing for the current user
-// in the current and future sessions.
-//
-// fEnable - if FALSE, disable theming & turn themes off.
-// - if TRUE, enable themeing and, if user previously
-// had a theme active, make it active now.
-//---------------------------------------------------------------------------
-
-function EnableTheming(fEnable: BOOL): HRESULT; stdcall;
-{$EXTERNALSYM EnableTheming}
-
-//------------------------------------------------------------------------
-//---- bits used in dwFlags of DTBGOPTS ----
-
-const
- DTBG_CLIPRECT = $00000001; // rcClip has been specified
- {$EXTERNALSYM DTBG_CLIPRECT}
- DTBG_DRAWSOLID = $00000002; // draw transparent/alpha images as solid
- {$EXTERNALSYM DTBG_DRAWSOLID}
- DTBG_OMITBORDER = $00000004; // don't draw border of part
- {$EXTERNALSYM DTBG_OMITBORDER}
- DTBG_OMITCONTENT = $00000008; // don't draw content area of part
- {$EXTERNALSYM DTBG_OMITCONTENT}
-
- DTBG_COMPUTINGREGION = $00000010; // TRUE if calling to compute region
- {$EXTERNALSYM DTBG_COMPUTINGREGION}
-
- DTBG_MIRRORDC = $00000020; // assume the hdc is mirrorred and
- // flip images as appropriate (currently
- // only supported for bgtype=imagefile)
- {$EXTERNALSYM DTBG_MIRRORDC}
-
-//------------------------------------------------------------------------
-
-type
- _DTBGOPTS = record
- dwSize: DWORD; // size of the struct
- dwFlags: DWORD; // which options have been specified
- rcClip: RECT; // clipping rectangle
- end;
- {$EXTERNALSYM _DTBGOPTS}
- DTBGOPTS = _DTBGOPTS;
- {$EXTERNALSYM DTBGOPTS}
- PDTBGOPTS = ^DTBGOPTS;
- TDtbgOpts = DTBGOPTS;
-
-//------------------------------------------------------------------------
-// DrawThemeBackgroundEx()
-// - draws the theme-specified border and fill for
-// the "iPartId" and "iStateId". This could be
-// based on a bitmap file, a border and fill, or
-// other image description. NOTE: This will be
-// merged back into DrawThemeBackground() after
-// BETA 2.
-//
-// hTheme - theme data handle
-// hdc - HDC to draw into
-// iPartId - part number to draw
-// iStateId - state number (of the part) to draw
-// pRect - defines the size/location of the part
-// pOptions - ptr to optional params
-//------------------------------------------------------------------------
-
-function DrawThemeBackgroundEx(hTheme: HTHEME; hdc: HDC; iPartId, iStateId: Integer; pRect: LPRECT; pOptions: PDTBGOPTS): HRESULT; stdcall;
-{$EXTERNALSYM DrawThemeBackgroundEx}
-
-implementation
-
-const
- themelib = 'uxtheme.dll';
-
-{$IFDEF DYNAMIC_LINK}
-
-var
- _OpenThemeData: Pointer;
-
-function OpenThemeData;
-begin
- GetProcedureAddress(_OpenThemeData, themelib, 'OpenThemeData');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_OpenThemeData]
- end;
-end;
-
-var
- _CloseThemeData: Pointer;
-
-function CloseThemeData;
-begin
- GetProcedureAddress(_CloseThemeData, themelib, 'CloseThemeData');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CloseThemeData]
- end;
-end;
-
-var
- _DrawThemeBackground: Pointer;
-
-function DrawThemeBackground;
-begin
- GetProcedureAddress(_DrawThemeBackground, themelib, 'DrawThemeBackground');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DrawThemeBackground]
- end;
-end;
-
-var
- _DrawThemeText: Pointer;
-
-function DrawThemeText;
-begin
- GetProcedureAddress(_DrawThemeText, themelib, 'DrawThemeText');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DrawThemeText]
- end;
-end;
-
-var
- _GetThemeBackgroundContentRect: Pointer;
-
-function GetThemeBackgroundContentRect;
-begin
- GetProcedureAddress(_GetThemeBackgroundContentRect, themelib, 'GetThemeBackgroundContentRect');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetThemeBackgroundContentRect]
- end;
-end;
-
-var
- _GetThemeBackgroundExtent: Pointer;
-
-function GetThemeBackgroundExtent;
-begin
- GetProcedureAddress(_GetThemeBackgroundExtent, themelib, 'GetThemeBackgroundContentRect');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetThemeBackgroundExtent]
- end;
-end;
-
-var
- _GetThemePartSize: Pointer;
-
-function GetThemePartSize;
-begin
- GetProcedureAddress(_GetThemePartSize, themelib, 'GetThemePartSize');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetThemePartSize]
- end;
-end;
-
-var
- _GetThemeTextExtent: Pointer;
-
-function GetThemeTextExtent;
-begin
- GetProcedureAddress(_GetThemeTextExtent, themelib, 'GetThemeTextExtent');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetThemeTextExtent]
- end;
-end;
-
-var
- _GetThemeTextMetrics: Pointer;
-
-function GetThemeTextMetrics;
-begin
- GetProcedureAddress(_GetThemeTextMetrics, themelib, 'GetThemeTextMetrics');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetThemeTextMetrics]
- end;
-end;
-
-var
- _GetThemeBackgroundRegion: Pointer;
-
-function GetThemeBackgroundRegion;
-begin
- GetProcedureAddress(_GetThemeBackgroundRegion, themelib, 'GetThemeBackgroundRegion');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetThemeBackgroundRegion]
- end;
-end;
-
-var
- _HitTestThemeBackground: Pointer;
-
-function HitTestThemeBackground;
-begin
- GetProcedureAddress(_HitTestThemeBackground, themelib, 'HitTestThemeBackground');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_HitTestThemeBackground]
- end;
-end;
-
-var
- _DrawThemeEdge: Pointer;
-
-function DrawThemeEdge;
-begin
- GetProcedureAddress(_DrawThemeEdge, themelib, 'DrawThemeEdge');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DrawThemeEdge]
- end;
-end;
-
-var
- _DrawThemeIcon: Pointer;
-
-function DrawThemeIcon;
-begin
- GetProcedureAddress(_DrawThemeIcon, themelib, 'DrawThemeIcon');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DrawThemeIcon]
- end;
-end;
-
-var
- _IsThemePartDefined: Pointer;
-
-function IsThemePartDefined;
-begin
- GetProcedureAddress(_IsThemePartDefined, themelib, 'IsThemePartDefined');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_IsThemePartDefined]
- end;
-end;
-
-var
- _IsThemeBackgroundPartialTrans: Pointer;
-
-function IsThemeBackgroundPartiallyTransparent;
-begin
- GetProcedureAddress(_IsThemeBackgroundPartialTrans, themelib, 'IsThemeBackgroundPartiallyTransparent');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_IsThemeBackgroundPartialTrans]
- end;
-end;
-
-var
- _GetThemeColor: Pointer;
-
-function GetThemeColor;
-begin
- GetProcedureAddress(_GetThemeColor, themelib, 'GetThemeColor');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetThemeColor]
- end;
-end;
-
-var
- _GetThemeMetric: Pointer;
-
-function GetThemeMetric;
-begin
- GetProcedureAddress(_GetThemeMetric, themelib, 'GetThemeMetric');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetThemeMetric]
- end;
-end;
-
-var
- _GetThemeString: Pointer;
-
-function GetThemeString;
-begin
- GetProcedureAddress(_GetThemeString, themelib, 'GetThemeString');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetThemeString]
- end;
-end;
-
-var
- _GetThemeBool: Pointer;
-
-function GetThemeBool;
-begin
- GetProcedureAddress(_GetThemeBool, themelib, 'GetThemeBool');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetThemeBool]
- end;
-end;
-
-var
- _GetThemeInt: Pointer;
-
-function GetThemeInt;
-begin
- GetProcedureAddress(_GetThemeInt, themelib, 'GetThemeInt');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetThemeInt]
- end;
-end;
-
-var
- _GetThemeEnumValue: Pointer;
-
-function GetThemeEnumValue;
-begin
- GetProcedureAddress(_GetThemeEnumValue, themelib, 'GetThemeEnumValue');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetThemeEnumValue]
- end;
-end;
-
-var
- _GetThemePosition: Pointer;
-
-function GetThemePosition;
-begin
- GetProcedureAddress(_GetThemePosition, themelib, 'GetThemePosition');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetThemePosition]
- end;
-end;
-
-var
- _GetThemeFont: Pointer;
-
-function GetThemeFont;
-begin
- GetProcedureAddress(_GetThemeFont, themelib, 'GetThemeFont');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetThemeFont]
- end;
-end;
-
-var
- _GetThemeRect: Pointer;
-
-function GetThemeRect;
-begin
- GetProcedureAddress(_GetThemeRect, themelib, 'GetThemeRect');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetThemeRect]
- end;
-end;
-
-var
- _GetThemeMargins: Pointer;
-
-function GetThemeMargins;
-begin
- GetProcedureAddress(_GetThemeMargins, themelib, 'GetThemeMargins');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetThemeMargins]
- end;
-end;
-
-var
- _GetThemeIntList: Pointer;
-
-function GetThemeIntList;
-begin
- GetProcedureAddress(_GetThemeIntList, themelib, 'GetThemeIntList');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetThemeIntList]
- end;
-end;
-
-var
- _GetThemePropertyOrigin: Pointer;
-
-function GetThemePropertyOrigin;
-begin
- GetProcedureAddress(_GetThemePropertyOrigin, themelib, 'GetThemePropertyOrigin');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetThemePropertyOrigin]
- end;
-end;
-
-var
- _SetWindowTheme: Pointer;
-
-function SetWindowTheme;
-begin
- GetProcedureAddress(_SetWindowTheme, themelib, 'SetWindowTheme');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetWindowTheme]
- end;
-end;
-
-var
- _GetThemeFilename: Pointer;
-
-function GetThemeFilename;
-begin
- GetProcedureAddress(_GetThemeFilename, themelib, 'GetThemeFilename');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetThemeFilename]
- end;
-end;
-
-var
- _GetThemeSysColor: Pointer;
-
-function GetThemeSysColor;
-begin
- GetProcedureAddress(_GetThemeSysColor, themelib, 'GetThemeSysColor');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetThemeSysColor]
- end;
-end;
-
-var
- _GetThemeSysColorBrush: Pointer;
-
-function GetThemeSysColorBrush;
-begin
- GetProcedureAddress(_GetThemeSysColorBrush, themelib, 'GetThemeSysColorBrush');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetThemeSysColorBrush]
- end;
-end;
-
-var
- _GetThemeSysBool: Pointer;
-
-function GetThemeSysBool;
-begin
- GetProcedureAddress(_GetThemeSysBool, themelib, 'GetThemeSysBool');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetThemeSysBool]
- end;
-end;
-
-var
- _GetThemeSysSize: Pointer;
-
-function GetThemeSysSize;
-begin
- GetProcedureAddress(_GetThemeSysSize, themelib, 'GetThemeSysSize');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetThemeSysSize]
- end;
-end;
-
-var
- _GetThemeSysFont: Pointer;
-
-function GetThemeSysFont;
-begin
- GetProcedureAddress(_GetThemeSysFont, themelib, 'GetThemeSysFont');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetThemeSysFont]
- end;
-end;
-
-var
- _GetThemeSysString: Pointer;
-
-function GetThemeSysString;
-begin
- GetProcedureAddress(_GetThemeSysString, themelib, 'GetThemeSysString');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetThemeSysString]
- end;
-end;
-
-var
- _GetThemeSysInt: Pointer;
-
-function GetThemeSysInt;
-begin
- GetProcedureAddress(_GetThemeSysInt, themelib, 'GetThemeSysInt');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetThemeSysInt]
- end;
-end;
-
-var
- _IsThemeActive: Pointer;
-
-function IsThemeActive;
-begin
- GetProcedureAddress(_IsThemeActive, themelib, 'IsThemeActive');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_IsThemeActive]
- end;
-end;
-
-var
- _IsAppThemed: Pointer;
-
-function IsAppThemed;
-begin
- GetProcedureAddress(_IsAppThemed, themelib, 'IsAppThemed');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_IsAppThemed]
- end;
-end;
-
-var
- _GetWindowTheme: Pointer;
-
-function GetWindowTheme;
-begin
- GetProcedureAddress(_GetWindowTheme, themelib, 'GetWindowTheme');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetWindowTheme]
- end;
-end;
-
-var
- _EnableThemeDialogTexture: Pointer;
-
-function EnableThemeDialogTexture;
-begin
- GetProcedureAddress(_EnableThemeDialogTexture, themelib, 'EnableThemeDialogTexture');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_EnableThemeDialogTexture]
- end;
-end;
-
-var
- _IsThemeDialogTextureEnabled: Pointer;
-
-function IsThemeDialogTextureEnabled;
-begin
- GetProcedureAddress(_IsThemeDialogTextureEnabled, themelib, 'IsThemeDialogTextureEnabled');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_IsThemeDialogTextureEnabled]
- end;
-end;
-
-var
- _GetThemeAppProperties: Pointer;
-
-function GetThemeAppProperties;
-begin
- GetProcedureAddress(_GetThemeAppProperties, themelib, 'GetThemeAppProperties');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetThemeAppProperties]
- end;
-end;
-
-var
- _SetThemeAppProperties: Pointer;
-
-procedure SetThemeAppProperties;
-begin
- GetProcedureAddress(_SetThemeAppProperties, themelib, 'SetThemeAppProperties');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetThemeAppProperties]
- end;
-end;
-
-var
- _GetCurrentThemeName: Pointer;
-
-function GetCurrentThemeName;
-begin
- GetProcedureAddress(_GetCurrentThemeName, themelib, 'GetCurrentThemeName');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetCurrentThemeName]
- end;
-end;
-
-var
- _GetThemeDocumentationProperty: Pointer;
-
-function GetThemeDocumentationProperty;
-begin
- GetProcedureAddress(_GetThemeDocumentationProperty, themelib, 'GetThemeDocumentationProperty');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetThemeDocumentationProperty]
- end;
-end;
-
-var
- _DrawThemeParentBackground: Pointer;
-
-function DrawThemeParentBackground;
-begin
- GetProcedureAddress(_DrawThemeParentBackground, themelib, 'DrawThemeParentBackground');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DrawThemeParentBackground]
- end;
-end;
-
-var
- _EnableTheming: Pointer;
-
-function EnableTheming;
-begin
- GetProcedureAddress(_EnableTheming, themelib, 'EnableTheming');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_EnableTheming]
- end;
-end;
-
-var
- _DrawThemeBackgroundEx: Pointer;
-
-function DrawThemeBackgroundEx;
-begin
- GetProcedureAddress(_DrawThemeBackgroundEx, themelib, 'DrawThemeBackgroundEx');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DrawThemeBackgroundEx]
- end;
-end;
-
-{$ELSE}
-
-function OpenThemeData; external themelib name 'OpenThemeData';
-function CloseThemeData; external themelib name 'CloseThemeData';
-function DrawThemeBackground; external themelib name 'DrawThemeBackground';
-function DrawThemeText; external themelib name 'DrawThemeText';
-function GetThemeBackgroundContentRect; external themelib name 'GetThemeBackgroundContentRect';
-function GetThemeBackgroundExtent; external themelib name 'GetThemeBackgroundContentRect';
-function GetThemePartSize; external themelib name 'GetThemePartSize';
-function GetThemeTextExtent; external themelib name 'GetThemeTextExtent';
-function GetThemeTextMetrics; external themelib name 'GetThemeTextMetrics';
-function GetThemeBackgroundRegion; external themelib name 'GetThemeBackgroundRegion';
-function HitTestThemeBackground; external themelib name 'HitTestThemeBackground';
-function DrawThemeEdge; external themelib name 'DrawThemeEdge';
-function DrawThemeIcon; external themelib name 'DrawThemeIcon';
-function IsThemePartDefined; external themelib name 'IsThemePartDefined';
-function IsThemeBackgroundPartiallyTransparent; external themelib name 'IsThemeBackgroundPartiallyTransparent';
-function GetThemeColor; external themelib name 'GetThemeColor';
-function GetThemeMetric; external themelib name 'GetThemeMetric';
-function GetThemeString; external themelib name 'GetThemeString';
-function GetThemeBool; external themelib name 'GetThemeBool';
-function GetThemeInt; external themelib name 'GetThemeInt';
-function GetThemeEnumValue; external themelib name 'GetThemeEnumValue';
-function GetThemePosition; external themelib name 'GetThemePosition';
-function GetThemeFont; external themelib name 'GetThemeFont';
-function GetThemeRect; external themelib name 'GetThemeRect';
-function GetThemeMargins; external themelib name 'GetThemeMargins';
-function GetThemeIntList; external themelib name 'GetThemeIntList';
-function GetThemePropertyOrigin; external themelib name 'GetThemePropertyOrigin';
-function SetWindowTheme; external themelib name 'SetWindowTheme';
-function GetThemeFilename; external themelib name 'GetThemeFilename';
-function GetThemeSysColor; external themelib name 'GetThemeSysColor';
-function GetThemeSysColorBrush; external themelib name 'GetThemeSysColorBrush';
-function GetThemeSysBool; external themelib name 'GetThemeSysBool';
-function GetThemeSysSize; external themelib name 'GetThemeSysSize';
-function GetThemeSysFont; external themelib name 'GetThemeSysFont';
-function GetThemeSysString; external themelib name 'GetThemeSysString';
-function GetThemeSysInt; external themelib name 'GetThemeSysInt';
-function IsThemeActive; external themelib name 'IsThemeActive';
-function IsAppThemed; external themelib name 'IsAppThemed';
-function GetWindowTheme; external themelib name 'GetWindowTheme';
-function EnableThemeDialogTexture; external themelib name 'EnableThemeDialogTexture';
-function IsThemeDialogTextureEnabled; external themelib name 'IsThemeDialogTextureEnabled';
-function GetThemeAppProperties; external themelib name 'GetThemeAppProperties';
-procedure SetThemeAppProperties; external themelib name 'SetThemeAppProperties';
-function GetCurrentThemeName; external themelib name 'GetCurrentThemeName';
-function GetThemeDocumentationProperty; external themelib name 'GetThemeDocumentationProperty';
-function DrawThemeParentBackground; external themelib name 'DrawThemeParentBackground';
-function EnableTheming; external themelib name 'EnableTheming';
-function DrawThemeBackgroundEx; external themelib name 'DrawThemeBackgroundEx';
-
-{$ENDIF DYNAMIC_LINK}
-
-end.
+{******************************************************************************}
+{ }
+{ Visual Styles (Themes) API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: uxtheme.h, released June 2001. The original Pascal }
+{ code is: UxTheme.pas, released July 2001. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwauxtheme.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaUxTheme;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "uxtheme.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaWinType, JwaWinGDI;
+
+type
+ HIMAGELIST = HANDLE; // TODO TEMPORARY
+
+type
+ HTHEME = HANDLE; // handle to a section of theme data for class
+ {$EXTERNALSYM HTHEME}
+
+//---------------------------------------------------------------------------
+// NOTE: PartId's and StateId's used in the theme API are defined in the
+// hdr file <tmschema.h> using the TM_PART and TM_STATE macros. For
+// example, "TM_PART(BP, PUSHBUTTON)" defines the PartId "BP_PUSHBUTTON".
+
+//---------------------------------------------------------------------------
+// OpenThemeData() - Open the theme data for the specified HWND and
+// semi-colon separated list of class names.
+//
+// OpenThemeData() will try each class name, one at
+// a time, and use the first matching theme info
+// found. If a match is found, a theme handle
+// to the data is returned. If no match is found,
+// a "NULL" handle is returned.
+//
+// When the window is destroyed or a WM_THEMECHANGED
+// msg is received, "CloseThemeData()" should be
+// called to close the theme handle.
+//
+// hwnd - window handle of the control/window to be themed
+//
+// pszClassList - class name (or list of names) to match to theme data
+// section. if the list contains more than one name,
+// the names are tested one at a time for a match.
+// If a match is found, OpenThemeData() returns a
+// theme handle associated with the matching class.
+// This param is a list (instead of just a single
+// class name) to provide the class an opportunity
+// to get the "best" match between the class and
+// the current theme. For example, a button might
+// pass L"OkButton, Button" if its ID=ID_OK. If
+// the current theme has an entry for OkButton,
+// that will be used. Otherwise, we fall back on
+// the normal Button entry.
+//---------------------------------------------------------------------------
+
+function OpenThemeData(hwnd: HWND; pszClassList: LPCWSTR): HTHEME; stdcall;
+{$EXTERNALSYM OpenThemeData}
+
+//---------------------------------------------------------------------------
+// CloseTHemeData() - closes the theme data handle. This should be done
+// when the window being themed is destroyed or
+// whenever a WM_THEMECHANGED msg is received
+// (followed by an attempt to create a new Theme data
+// handle).
+//
+// hTheme - open theme data handle (returned from prior call
+// to OpenThemeData() API).
+//---------------------------------------------------------------------------
+
+function CloseThemeData(hTheme: HTHEME): HRESULT; stdcall;
+{$EXTERNALSYM CloseThemeData}
+
+//---------------------------------------------------------------------------
+// functions for basic drawing support
+//---------------------------------------------------------------------------
+// The following methods are the theme-aware drawing services.
+// Controls/Windows are defined in drawable "parts" by their author: a
+// parent part and 0 or more child parts. Each of the parts can be
+// described in "states" (ex: disabled, hot, pressed).
+//---------------------------------------------------------------------------
+// For the list of all themed classes and the definition of all
+// parts and states, see the file "tmschmea.h".
+//---------------------------------------------------------------------------
+// Each of the below methods takes a "iPartId" param to specify the
+// part and a "iStateId" to specify the state of the part.
+// "iStateId=0" refers to the root part. "iPartId" = "0" refers to
+// the root class.
+//-----------------------------------------------------------------------
+// Note: draw operations are always scaled to fit (and not to exceed)
+// the specified "Rect".
+//-----------------------------------------------------------------------
+
+//------------------------------------------------------------------------
+// DrawThemeBackground()
+// - draws the theme-specified border and fill for
+// the "iPartId" and "iStateId". This could be
+// based on a bitmap file, a border and fill, or
+// other image description.
+//
+// hTheme - theme data handle
+// hdc - HDC to draw into
+// iPartId - part number to draw
+// iStateId - state number (of the part) to draw
+// pRect - defines the size/location of the part
+// pClipRect - optional clipping rect (don't draw outside it)
+//------------------------------------------------------------------------
+
+function DrawThemeBackground(hTheme: HTHEME; hdc: HDC; iPartId, iStateId: Integer;
+ const pRect: RECT; pClipRect: PRECT): HRESULT; stdcall;
+{$EXTERNALSYM DrawThemeBackground}
+
+//---------------------------------------------------------------------------
+//----- DrawThemeText() flags ----
+
+const
+ DTT_GRAYED = $1; // draw a grayed-out string
+ {$EXTERNALSYM DTT_GRAYED}
+
+//-------------------------------------------------------------------------
+// DrawThemeText() - draws the text using the theme-specified
+// color and font for the "iPartId" and
+// "iStateId".
+//
+// hTheme - theme data handle
+// hdc - HDC to draw into
+// iPartId - part number to draw
+// iStateId - state number (of the part) to draw
+// pszText - actual text to draw
+// dwCharCount - number of chars to draw (-1 for all)
+// dwTextFlags - same as DrawText() "uFormat" param
+// dwTextFlags2 - additional drawing options
+// pRect - defines the size/location of the part
+//-------------------------------------------------------------------------
+
+function DrawThemeText(hTheme: HTHEME; hdc: HDC; iPartId, iStateId: Integer;
+ pszText: LPCWSTR; iCharCount: Integer; dwTextFlags, dwTextFlags2: DWORD;
+ const pRect: RECT): HRESULT; stdcall;
+{$EXTERNALSYM DrawThemeText}
+
+//-------------------------------------------------------------------------
+// GetThemeBackgroundContentRect()
+// - gets the size of the content for the theme-defined
+// background. This is usually the area inside
+// the borders or Margins.
+//
+// hTheme - theme data handle
+// hdc - (optional) device content to be used for drawing
+// iPartId - part number to draw
+// iStateId - state number (of the part) to draw
+// pBoundingRect - the outer RECT of the part being drawn
+// pContentRect - RECT to receive the content area
+//-------------------------------------------------------------------------
+
+function GetThemeBackgroundContentRect(hTheme: HTHEME; hdc: HDC; iPartId, iStateId: Integer;
+ const pBoundingRect: RECT; pContentRect: PRECT): HRESULT; stdcall;
+{$EXTERNALSYM GetThemeBackgroundContentRect}
+
+//-------------------------------------------------------------------------
+// GetThemeBackgroundExtent() - calculates the size/location of the theme-
+// specified background based on the
+// "pContentRect".
+//
+// hTheme - theme data handle
+// hdc - (optional) device content to be used for drawing
+// iPartId - part number to draw
+// iStateId - state number (of the part) to draw
+// pContentRect - RECT that defines the content area
+// pBoundingRect - RECT to receive the overall size/location of part
+//-------------------------------------------------------------------------
+
+function GetThemeBackgroundExtent(hTheme: HTHEME; hdc: HDC; iPartId, iStateId: Integer;
+ const pContentRect: RECT; var pExtentRect: RECT): HRESULT; stdcall;
+{$EXTERNALSYM GetThemeBackgroundExtent}
+
+//-------------------------------------------------------------------------
+
+type
+ THEMESIZE = (
+ TS_MIN, // minimum size
+ TS_TRUE, // size without stretching
+ TS_DRAW); // size that theme mgr will use to draw part
+ {$EXTERNALSYM THEMESIZE}
+ TThemeSize = THEMESIZE;
+
+//-------------------------------------------------------------------------
+// GetThemePartSize() - returns the specified size of the theme part
+//
+// hTheme - theme data handle
+// hdc - HDC to select font into & measure against
+// iPartId - part number to retrieve size for
+// iStateId - state number (of the part)
+// prc - (optional) rect for part drawing destination
+// eSize - the type of size to be retreived
+// psz - receives the specified size of the part
+//-------------------------------------------------------------------------
+
+function GetThemePartSize(hTheme: HTHEME; hdc: HDC; iPartId, iStateId: Integer;
+ prc: PRECT; eSize: THEMESIZE; var psz: TSize): HRESULT; stdcall;
+{$EXTERNALSYM GetThemePartSize}
+
+//-------------------------------------------------------------------------
+// GetThemeTextExtent() - calculates the size/location of the specified
+// text when rendered in the Theme Font.
+//
+// hTheme - theme data handle
+// hdc - HDC to select font & measure into
+// iPartId - part number to draw
+// iStateId - state number (of the part)
+// pszText - the text to be measured
+// dwCharCount - number of chars to draw (-1 for all)
+// dwTextFlags - same as DrawText() "uFormat" param
+// pszBoundingRect - optional: to control layout of text
+// pszExtentRect - receives the RECT for text size/location
+//-------------------------------------------------------------------------
+
+function GetThemeTextExtent(hTheme: HTHEME; hdc: HDC; iPartId, iStateId: Integer;
+ pszText: LPCWSTR; iCharCount: Integer; dwTextFlags: DWORD; pBoundingRect: PRECT;
+ var pExtentRect: RECT): HRESULT; stdcall;
+{$EXTERNALSYM GetThemeTextExtent}
+
+//-------------------------------------------------------------------------
+// GetThemeTextMetrics()
+// - returns info about the theme-specified font
+// for the part/state passed in.
+//
+// hTheme - theme data handle
+// hdc - optional: HDC for screen context
+// iPartId - part number to draw
+// iStateId - state number (of the part)
+// ptm - receives the font info
+//-------------------------------------------------------------------------
+
+function GetThemeTextMetrics(hTheme: HTHEME; hdc: HDC; iPartId, iStateId: Integer;
+ var ptm: TEXTMETRIC): HRESULT; stdcall;
+{$EXTERNALSYM GetThemeTextMetrics}
+
+//-------------------------------------------------------------------------
+// GetThemeBackgroundRegion()
+// - computes the region for a regular or partially
+// transparent theme-specified background that is
+// bound by the specified "pRect".
+// If the rectangle is empty, sets the HRGN to NULL
+// and return S_FALSE.
+//
+// hTheme - theme data handle
+// hdc - optional HDC to draw into (DPI scaling)
+// iPartId - part number to draw
+// iStateId - state number (of the part)
+// pRect - the RECT used to draw the part
+// pRegion - receives handle to calculated region
+//-------------------------------------------------------------------------
+
+function GetThemeBackgroundRegion(hTheme: HTHEME; hdc: HDC; iPartId, iStateId: Integer;
+ const pRect: RECT; var pRegion: HRGN): HRESULT; stdcall;
+{$EXTERNALSYM GetThemeBackgroundRegion}
+
+//-------------------------------------------------------------------------
+//----- HitTestThemeBackground, HitTestThemeBackgroundRegion flags ----
+
+// Theme background segment hit test flag (default). possible return values are:
+// HTCLIENT: hit test succeeded in the middle background segment
+// HTTOP, HTLEFT, HTTOPLEFT, etc: // hit test succeeded in the the respective theme background segment.
+
+const
+ HTTB_BACKGROUNDSEG = $0000;
+ {$EXTERNALSYM HTTB_BACKGROUNDSEG}
+
+// Fixed border hit test option. possible return values are:
+// HTCLIENT: hit test succeeded in the middle background segment
+// HTBORDER: hit test succeeded in any other background segment
+
+ HTTB_FIXEDBORDER = $0002; // Return code may be either HTCLIENT or HTBORDER.
+ {$EXTERNALSYM HTTB_FIXEDBORDER}
+
+// Caption hit test option. Possible return values are:
+// HTCAPTION: hit test succeeded in the top, top left, or top right background segments
+// HTNOWHERE or another return code, depending on absence or presence of accompanying flags, resp.
+
+ HTTB_CAPTION = $0004;
+ {$EXTERNALSYM HTTB_CAPTION}
+
+// Resizing border hit test flags. Possible return values are:
+// HTCLIENT: hit test succeeded in middle background segment
+// HTTOP, HTTOPLEFT, HTLEFT, HTRIGHT, etc: hit test succeeded in the respective system resizing zone
+// HTBORDER: hit test failed in middle segment and resizing zones, but succeeded in a background border segment
+
+ HTTB_RESIZINGBORDER_LEFT = $0010; // Hit test left resizing border,
+ {$EXTERNALSYM HTTB_RESIZINGBORDER_LEFT}
+ HTTB_RESIZINGBORDER_TOP = $0020; // Hit test top resizing border
+ {$EXTERNALSYM HTTB_RESIZINGBORDER_TOP}
+ HTTB_RESIZINGBORDER_RIGHT = $0040; // Hit test right resizing border
+ {$EXTERNALSYM HTTB_RESIZINGBORDER_RIGHT}
+ HTTB_RESIZINGBORDER_BOTTOM = $0080; // Hit test bottom resizing border
+ {$EXTERNALSYM HTTB_RESIZINGBORDER_BOTTOM}
+
+ HTTB_RESIZINGBORDER = (HTTB_RESIZINGBORDER_LEFT or HTTB_RESIZINGBORDER_TOP or
+ HTTB_RESIZINGBORDER_RIGHT or HTTB_RESIZINGBORDER_BOTTOM);
+ {$EXTERNALSYM HTTB_RESIZINGBORDER}
+
+// Resizing border is specified as a template, not just window edges.
+// This option is mutually exclusive with HTTB_SYSTEMSIZINGWIDTH; HTTB_SIZINGTEMPLATE takes precedence
+
+ HTTB_SIZINGTEMPLATE = $0100;
+ {$EXTERNALSYM HTTB_SIZINGTEMPLATE}
+
+// Use system resizing border width rather than theme content margins.
+// This option is mutually exclusive with HTTB_SIZINGTEMPLATE, which takes precedence.
+
+ HTTB_SYSTEMSIZINGMARGINS = $0200;
+ {$EXTERNALSYM HTTB_SYSTEMSIZINGMARGINS}
+
+//-------------------------------------------------------------------------
+// HitTestThemeBackground()
+// - returns a HitTestCode (a subset of the values
+// returned by WM_NCHITTEST) for the point "ptTest"
+// within the theme-specified background
+// (bound by pRect). "pRect" and "ptTest" should
+// both be in the same coordinate system
+// (client, screen, etc).
+//
+// hTheme - theme data handle
+// hdc - HDC to draw into
+// iPartId - part number to test against
+// iStateId - state number (of the part)
+// pRect - the RECT used to draw the part
+// hrgn - optional region to use; must be in same coordinates as
+// - pRect and pTest.
+// ptTest - the hit point to be tested
+// dwOptions - HTTB_xxx constants
+// pwHitTestCode - receives the returned hit test code - one of:
+//
+// HTNOWHERE, HTLEFT, HTTOPLEFT, HTBOTTOMLEFT,
+// HTRIGHT, HTTOPRIGHT, HTBOTTOMRIGHT,
+// HTTOP, HTBOTTOM, HTCLIENT
+//-------------------------------------------------------------------------
+
+function HitTestThemeBackground(hTheme: HTHEME; hdc: HDC; iPartId, iStateId: Integer;
+ dwOptions: DWORD; const pRect: RECT; hrgn: HRGN; ptTest: POINT; var pwHitTestCode: WORD): HRESULT; stdcall;
+{$EXTERNALSYM HitTestThemeBackground}
+
+//------------------------------------------------------------------------
+// DrawThemeEdge() - Similar to the DrawEdge() API, but uses part colors
+// and is high-DPI aware
+// hTheme - theme data handle
+// hdc - HDC to draw into
+// iPartId - part number to draw
+// iStateId - state number of part
+// pDestRect - the RECT used to draw the line(s)
+// uEdge - Same as DrawEdge() API
+// uFlags - Same as DrawEdge() API
+// pContentRect - Receives the interior rect if (uFlags & BF_ADJUST)
+//------------------------------------------------------------------------
+
+function DrawThemeEdge(hTheme: HTHEME; hdc: HDC; iPartId, iStateId: Integer;
+ const pDestRect: RECT; uEdge, uFlags: UINT; pContentRect: PRECT): HRESULT; stdcall;
+{$EXTERNALSYM DrawThemeEdge}
+
+//------------------------------------------------------------------------
+// DrawThemeIcon() - draws an image within an imagelist based on
+// a (possible) theme-defined effect.
+//
+// hTheme - theme data handle
+// hdc - HDC to draw into
+// iPartId - part number to draw
+// iStateId - state number of part
+// pRect - the RECT to draw the image within
+// himl - handle to IMAGELIST
+// iImageIndex - index into IMAGELIST (which icon to draw)
+//------------------------------------------------------------------------
+
+function DrawThemeIcon(hTheme: HTHEME; hdc: HDC; iPartId, iStateId: Integer;
+ const pRect: RECT; himl: HIMAGELIST; iImageIndex: Integer): HRESULT; stdcall;
+{$EXTERNALSYM DrawThemeIcon}
+
+//---------------------------------------------------------------------------
+// IsThemePartDefined() - returns TRUE if the theme has defined parameters
+// for the specified "iPartId" and "iStateId".
+//
+// hTheme - theme data handle
+// iPartId - part number to find definition for
+// iStateId - state number of part
+//---------------------------------------------------------------------------
+
+function IsThemePartDefined(hTheme: HTHEME; iPartId, iStateId: Integer): BOOL; stdcall;
+{$EXTERNALSYM IsThemePartDefined}
+
+//---------------------------------------------------------------------------
+// IsThemeBackgroundPartiallyTransparent()
+// - returns TRUE if the theme specified background for
+// the part/state has transparent pieces or
+// alpha-blended pieces.
+//
+// hTheme - theme data handle
+// iPartId - part number
+// iStateId - state number of part
+//---------------------------------------------------------------------------
+
+function IsThemeBackgroundPartiallyTransparent(hTheme: HTHEME; iPartId, iStateId: Integer): BOOL; stdcall;
+{$EXTERNALSYM IsThemeBackgroundPartiallyTransparent}
+
+//---------------------------------------------------------------------------
+// lower-level theme information services
+//---------------------------------------------------------------------------
+// The following methods are getter routines for each of the Theme Data types.
+// Controls/Windows are defined in drawable "parts" by their author: a
+// parent part and 0 or more child parts. Each of the parts can be
+// described in "states" (ex: disabled, hot, pressed).
+//---------------------------------------------------------------------------
+// Each of the below methods takes a "iPartId" param to specify the
+// part and a "iStateId" to specify the state of the part.
+// "iStateId=0" refers to the root part. "iPartId" = "0" refers to
+// the root class.
+//-----------------------------------------------------------------------
+// Each method also take a "iPropId" param because multiple instances of
+// the same primitive type can be defined in the theme schema.
+//-----------------------------------------------------------------------
+
+//-----------------------------------------------------------------------
+// GetThemeColor() - Get the value for the specified COLOR property
+//
+// hTheme - theme data handle
+// iPartId - part number
+// iStateId - state number of part
+// iPropId - the property number to get the value for
+// pColor - receives the value of the property
+//-----------------------------------------------------------------------
+
+function GetThemeColor(hTheme: HTHEME; iPartId, iStateId, iPropId: Integer;
+ var pColor: COLORREF): HRESULT; stdcall;
+{$EXTERNALSYM GetThemeColor}
+
+//-----------------------------------------------------------------------
+// GetThemeMetric() - Get the value for the specified metric/size
+// property
+//
+// hTheme - theme data handle
+// hdc - (optional) hdc to be drawn into (DPI scaling)
+// iPartId - part number
+// iStateId - state number of part
+// iPropId - the property number to get the value for
+// piVal - receives the value of the property
+//-----------------------------------------------------------------------
+
+function GetThemeMetric(hTheme: HTHEME; hdc: HDC; iPartId, iStateId, iPropId: Integer;
+ var piVal: Integer): HRESULT; stdcall;
+{$EXTERNALSYM GetThemeMetric}
+
+//-----------------------------------------------------------------------
+// GetThemeString() - Get the value for the specified string property
+//
+// hTheme - theme data handle
+// iPartId - part number
+// iStateId - state number of part
+// iPropId - the property number to get the value for
+// pszBuff - receives the string property value
+// cchMaxBuffChars - max. number of chars allowed in pszBuff
+//-----------------------------------------------------------------------
+
+function GetThemeString(hTheme: HTHEME; iPartId, iStateId, iPropId: Integer;
+ pszBuff: LPWSTR; cchMaxBuffChars: Integer): HRESULT; stdcall;
+{$EXTERNALSYM GetThemeString}
+
+//-----------------------------------------------------------------------
+// GetThemeBool() - Get the value for the specified BOOL property
+//
+// hTheme - theme data handle
+// iPartId - part number
+// iStateId - state number of part
+// iPropId - the property number to get the value for
+// pfVal - receives the value of the property
+//-----------------------------------------------------------------------
+
+function GetThemeBool(hTheme: HTHEME; iPartId, iStateId, iPropId: Integer;
+ var pfVal: BOOL): HRESULT; stdcall;
+{$EXTERNALSYM GetThemeBool}
+
+//-----------------------------------------------------------------------
+// GetThemeInt() - Get the value for the specified int property
+//
+// hTheme - theme data handle
+// iPartId - part number
+// iStateId - state number of part
+// iPropId - the property number to get the value for
+// piVal - receives the value of the property
+//-----------------------------------------------------------------------
+
+function GetThemeInt(hTheme: HTHEME; iPartId, iStateId, iPropId: Integer;
+ var piVal: Integer): HRESULT; stdcall;
+{$EXTERNALSYM GetThemeInt}
+
+//-----------------------------------------------------------------------
+// GetThemeEnumValue() - Get the value for the specified ENUM property
+//
+// hTheme - theme data handle
+// iPartId - part number
+// iStateId - state number of part
+// iPropId - the property number to get the value for
+// piVal - receives the value of the enum (cast to int*)
+//-----------------------------------------------------------------------
+
+function GetThemeEnumValue(hTheme: HTHEME; iPartId, iStateId, iPropId: Integer;
+ var piVal: Integer): HRESULT; stdcall;
+{$EXTERNALSYM GetThemeEnumValue}
+
+//-----------------------------------------------------------------------
+// GetThemePosition() - Get the value for the specified position
+// property
+//
+// hTheme - theme data handle
+// iPartId - part number
+// iStateId - state number of part
+// iPropId - the property number to get the value for
+// pPoint - receives the value of the position property
+//-----------------------------------------------------------------------
+
+function GetThemePosition(hTheme: HTHEME; iPartId, iStateId, iPropId: Integer;
+ var pPoint: POINT): HRESULT; stdcall;
+{$EXTERNALSYM GetThemePosition}
+
+//-----------------------------------------------------------------------
+// GetThemeFont() - Get the value for the specified font property
+//
+// hTheme - theme data handle
+// hdc - (optional) hdc to be drawn to (DPI scaling)
+// iPartId - part number
+// iStateId - state number of part
+// iPropId - the property number to get the value for
+// pFont - receives the value of the LOGFONT property
+// (scaled for the current logical screen dpi)
+//-----------------------------------------------------------------------
+
+function GetThemeFont(hTheme: HTHEME; hdc: HDC; iPartId, iStateId, iPropId: Integer;
+ var pFont: LOGFONT): HRESULT; stdcall;
+{$EXTERNALSYM GetThemeFont}
+
+//-----------------------------------------------------------------------
+// GetThemeRect() - Get the value for the specified RECT property
+//
+// hTheme - theme data handle
+// iPartId - part number
+// iStateId - state number of part
+// iPropId - the property number to get the value for
+// pRect - receives the value of the RECT property
+//-----------------------------------------------------------------------
+
+function GetThemeRect(hTheme: HTHEME; iPartId, iStateId, iPropId: Integer;
+ var pRect: RECT): HRESULT; stdcall;
+{$EXTERNALSYM GetThemeRect}
+
+//-----------------------------------------------------------------------
+
+type
+ _MARGINS = record
+ cxLeftWidth: Integer; // width of left border that retains its size
+ cxRightWidth: Integer; // width of right border that retains its size
+ cyTopHeight: Integer; // height of top border that retains its size
+ cyBottomHeight: Integer; // height of bottom border that retains its size
+ end;
+ {$EXTERNALSYM _MARGINS}
+ MARGINS = _MARGINS;
+ {$EXTERNALSYM MARGINS}
+ PMARGINS = ^MARGINS;
+ {$EXTERNALSYM PMARGINS}
+ TMargins = MARGINS;
+
+//-----------------------------------------------------------------------
+// GetThemeMargins() - Get the value for the specified MARGINS property
+//
+// hTheme - theme data handle
+// hdc - (optional) hdc to be used for drawing
+// iPartId - part number
+// iStateId - state number of part
+// iPropId - the property number to get the value for
+// prc - RECT for area to be drawn into
+// pMargins - receives the value of the MARGINS property
+//-----------------------------------------------------------------------
+
+function GetThemeMargins(hTheme: HTHEME; hdc: HDC; iPartId, iStateId, iPropId: Integer;
+ prc: PRECT; var pMargins: MARGINS): HRESULT; stdcall;
+{$EXTERNALSYM GetThemeMargins}
+
+//-----------------------------------------------------------------------
+
+const
+ MAX_INTLIST_COUNT = 10;
+ {$EXTERNALSYM MAX_INTLIST_COUNT}
+
+type
+ _INTLIST = record
+ iValueCount: Integer; // number of values in iValues
+ iValues: array [0..MAX_INTLIST_COUNT - 1] of Integer;
+ end;
+ {$EXTERNALSYM _INTLIST}
+ INTLIST = _INTLIST;
+ {$EXTERNALSYM INTLIST}
+ PINTLIST = ^INTLIST;
+ {$EXTERNALSYM PINTLIST}
+ TIntList = INTLIST;
+
+//-----------------------------------------------------------------------
+// GetThemeIntList() - Get the value for the specified INTLIST struct
+//
+// hTheme - theme data handle
+// iPartId - part number
+// iStateId - state number of part
+// iPropId - the property number to get the value for
+// pIntList - receives the value of the INTLIST property
+//-----------------------------------------------------------------------
+
+function GetThemeIntList(hTheme: HTHEME; iPartId, iStateId, iPropId: Integer;
+ var pIntList: INTLIST): HRESULT; stdcall;
+{$EXTERNALSYM GetThemeIntList}
+
+//-----------------------------------------------------------------------
+
+type
+ PROPERTYORIGIN = (
+ PO_STATE, // property was found in the state section
+ PO_PART, // property was found in the part section
+ PO_CLASS, // property was found in the class section
+ PO_GLOBAL, // property was found in [globals] section
+ PO_NOTFOUND); // property was not found
+ {$EXTERNALSYM PROPERTYORIGIN}
+ TPropertyOrigin = PROPERTYORIGIN;
+
+//-----------------------------------------------------------------------
+// GetThemePropertyOrigin()
+// - searches for the specified theme property
+// and sets "pOrigin" to indicate where it was
+// found (or not found)
+//
+// hTheme - theme data handle
+// iPartId - part number
+// iStateId - state number of part
+// iPropId - the property number to search for
+// pOrigin - receives the value of the property origin
+//-----------------------------------------------------------------------
+
+function GetThemePropertyOrigin(hTheme: HTHEME; iPartId, iStateId, iPropId: Integer;
+ var pOrigin: PROPERTYORIGIN): HRESULT; stdcall;
+{$EXTERNALSYM GetThemePropertyOrigin}
+
+//---------------------------------------------------------------------------
+// SetWindowTheme()
+// - redirects an existing Window to use a different
+// section of the current theme information than its
+// class normally asks for.
+//
+// hwnd - the handle of the window (cannot be NULL)
+//
+// pszSubAppName - app (group) name to use in place of the calling
+// app's name. If NULL, the actual calling app
+// name will be used.
+//
+// pszSubIdList - semicolon separated list of class Id names to
+// use in place of actual list passed by the
+// window's class. if NULL, the id list from the
+// calling class is used.
+//---------------------------------------------------------------------------
+// The Theme Manager will remember the "pszSubAppName" and the
+// "pszSubIdList" associations thru the lifetime of the window (even
+// if themes are subsequently changed). The window is sent a
+// "WM_THEMECHANGED" msg at the end of this call, so that the new
+// theme can be found and applied.
+//---------------------------------------------------------------------------
+// When "pszSubAppName" or "pszSubIdList" are NULL, the Theme Manager
+// removes the previously remember association. To turn off theme-ing for
+// the specified window, you can pass an empty string (L"") so it
+// won't match any section entries.
+//---------------------------------------------------------------------------
+
+function SetWindowTheme(hwnd: HWND; pszSubAppName: LPCWSTR; pszSubIdList: LPCWSTR): HRESULT; stdcall;
+{$EXTERNALSYM SetWindowTheme}
+
+//---------------------------------------------------------------------------
+// GetThemeFilename() - Get the value for the specified FILENAME property.
+//
+// hTheme - theme data handle
+// iPartId - part number
+// iStateId - state number of part
+// iPropId - the property number to search for
+// pszThemeFileName - output buffer to receive the filename
+// cchMaxBuffChars - the size of the return buffer, in chars
+//---------------------------------------------------------------------------
+
+function GetThemeFilename(hTheme: HTHEME; iPartId, iStateId, iPropId: Integer;
+ pszThemeFileName: LPWSTR; cchMaxBuffChars: Integer): HRESULT; stdcall;
+{$EXTERNALSYM GetThemeFilename}
+
+//---------------------------------------------------------------------------
+// GetThemeSysColor() - Get the value of the specified System color.
+//
+// hTheme - the theme data handle. if non-NULL, will return
+// color from [SysMetrics] section of theme.
+// if NULL, will return the global system color.
+//
+// iColorId - the system color index defined in winuser.h
+//---------------------------------------------------------------------------
+
+function GetThemeSysColor(hTheme: HTHEME; iColorId: Integer): COLORREF; stdcall;
+{$EXTERNALSYM GetThemeSysColor}
+
+//---------------------------------------------------------------------------
+// GetThemeSysColorBrush()
+// - Get the brush for the specified System color.
+//
+// hTheme - the theme data handle. if non-NULL, will return
+// brush matching color from [SysMetrics] section of
+// theme. if NULL, will return the brush matching
+// global system color.
+//
+// iColorId - the system color index defined in winuser.h
+//---------------------------------------------------------------------------
+
+function GetThemeSysColorBrush(hTheme: HTHEME; iColorId: Integer): HBRUSH; stdcall;
+{$EXTERNALSYM GetThemeSysColorBrush}
+
+//---------------------------------------------------------------------------
+// GetThemeSysBool() - Get the boolean value of specified System metric.
+//
+// hTheme - the theme data handle. if non-NULL, will return
+// BOOL from [SysMetrics] section of theme.
+// if NULL, will return the specified system boolean.
+//
+// iBoolId - the TMT_XXX BOOL number (first BOOL
+// is TMT_FLATMENUS)
+//---------------------------------------------------------------------------
+
+function GetThemeSysBool(hTheme: HTHEME; iBoolId: Integer): BOOL; stdcall;
+{$EXTERNALSYM GetThemeSysBool}
+
+//---------------------------------------------------------------------------
+// GetThemeSysSize() - Get the value of the specified System size metric.
+// (scaled for the current logical screen dpi)
+//
+// hTheme - the theme data handle. if non-NULL, will return
+// size from [SysMetrics] section of theme.
+// if NULL, will return the global system metric.
+//
+// iSizeId - the following values are supported when
+// hTheme is non-NULL:
+//
+// SM_CXBORDER (border width)
+// SM_CXVSCROLL (scrollbar width)
+// SM_CYHSCROLL (scrollbar height)
+// SM_CXSIZE (caption width)
+// SM_CYSIZE (caption height)
+// SM_CXSMSIZE (small caption width)
+// SM_CYSMSIZE (small caption height)
+// SM_CXMENUSIZE (menubar width)
+// SM_CYMENUSIZE (menubar height)
+//
+// when hTheme is NULL, iSizeId is passed directly
+// to the GetSystemMetrics() function
+//---------------------------------------------------------------------------
+
+function GetThemeSysSize(hTheme: HTHEME; iSizeId: Integer): Integer; stdcall;
+{$EXTERNALSYM GetThemeSysSize}
+
+//---------------------------------------------------------------------------
+// GetThemeSysFont() - Get the LOGFONT for the specified System font.
+//
+// hTheme - the theme data handle. if non-NULL, will return
+// font from [SysMetrics] section of theme.
+// if NULL, will return the specified system font.
+//
+// iFontId - the TMT_XXX font number (first font
+// is TMT_CAPTIONFONT)
+//
+// plf - ptr to LOGFONT to receive the font value.
+// (scaled for the current logical screen dpi)
+//---------------------------------------------------------------------------
+
+function GetThemeSysFont(hTheme: HTHEME; iFontId: Integer; var plf: LOGFONT): HRESULT; stdcall;
+{$EXTERNALSYM GetThemeSysFont}
+
+//---------------------------------------------------------------------------
+// GetThemeSysString() - Get the value of specified System string metric.
+//
+// hTheme - the theme data handle (required)
+//
+// iStringId - must be one of the following values:
+//
+// TMT_CSSNAME
+// TMT_XMLNAME
+//
+// pszStringBuff - the buffer to receive the string value
+//
+// cchMaxStringChars - max. number of chars that pszStringBuff can hold
+//---------------------------------------------------------------------------
+
+function GetThemeSysString(hTheme: HTHEME; iStringId: Integer;
+ pszStringBuff: LPWSTR; cchMaxStringChars: Integer): HRESULT; stdcall;
+{$EXTERNALSYM GetThemeSysString}
+
+//---------------------------------------------------------------------------
+// GetThemeSysInt() - Get the value of specified System int.
+//
+// hTheme - the theme data handle (required)
+//
+// iIntId - must be one of the following values:
+//
+// TMT_DPIX
+// TMT_DPIY
+// TMT_MINCOLORDEPTH
+//
+// piValue - ptr to int to receive value
+//---------------------------------------------------------------------------
+
+function GetThemeSysInt(hTheme: HTHEME; iIntId: Integer; var piValue: Integer): HRESULT; stdcall;
+{$EXTERNALSYM GetThemeSysInt}
+
+//---------------------------------------------------------------------------
+// IsThemeActive() - can be used to test if a system theme is active
+// for the current user session.
+//
+// use the API "IsAppThemed()" to test if a theme is
+// active for the calling process.
+//---------------------------------------------------------------------------
+
+function IsThemeActive: BOOL; stdcall;
+{$EXTERNALSYM IsThemeActive}
+
+//---------------------------------------------------------------------------
+// IsAppThemed() - returns TRUE if a theme is active and available to
+// the current process
+//---------------------------------------------------------------------------
+
+function IsAppThemed: BOOL; stdcall;
+{$EXTERNALSYM IsAppThemed}
+
+//---------------------------------------------------------------------------
+// GetWindowTheme() - if window is themed, returns its most recent
+// HTHEME from OpenThemeData() - otherwise, returns
+// NULL.
+//
+// hwnd - the window to get the HTHEME of
+//---------------------------------------------------------------------------
+
+function GetWindowTheme(hwnd: HWND): HTHEME; stdcall;
+{$EXTERNALSYM GetWindowTheme}
+
+//---------------------------------------------------------------------------
+// EnableThemeDialogTexture()
+//
+// - Enables/disables dialog background theme. This method can be used to
+// tailor dialog compatibility with child windows and controls that
+// may or may not coordinate the rendering of their client area backgrounds
+// with that of their parent dialog in a manner that supports seamless
+// background texturing.
+//
+// hdlg - the window handle of the target dialog
+// dwFlags - ETDT_ENABLE to enable the theme-defined dialog background texturing,
+// ETDT_DISABLE to disable background texturing,
+// ETDT_ENABLETAB to enable the theme-defined background
+// texturing using the Tab texture
+//---------------------------------------------------------------------------
+
+const
+ ETDT_DISABLE = $00000001;
+ {$EXTERNALSYM ETDT_DISABLE}
+ ETDT_ENABLE = $00000002;
+ {$EXTERNALSYM ETDT_ENABLE}
+ ETDT_USETABTEXTURE = $00000004;
+ {$EXTERNALSYM ETDT_USETABTEXTURE}
+ ETDT_ENABLETAB = ETDT_ENABLE or ETDT_USETABTEXTURE;
+ {$EXTERNALSYM ETDT_ENABLETAB}
+
+function EnableThemeDialogTexture(hwnd: HWND; dwFlags: DWORD): HRESULT; stdcall;
+{$EXTERNALSYM EnableThemeDialogTexture}
+
+//---------------------------------------------------------------------------
+// IsThemeDialogTextureEnabled()
+//
+// - Reports whether the dialog supports background texturing.
+//
+// hdlg - the window handle of the target dialog
+//---------------------------------------------------------------------------
+
+function IsThemeDialogTextureEnabled(hwnd: HWND): BOOL; stdcall;
+{$EXTERNALSYM IsThemeDialogTextureEnabled}
+
+//---------------------------------------------------------------------------
+//---- flags to control theming within an app ----
+
+const
+ STAP_ALLOW_NONCLIENT = 1 shl 0;
+ {$EXTERNALSYM STAP_ALLOW_NONCLIENT}
+ STAP_ALLOW_CONTROLS = 1 shl 1;
+ {$EXTERNALSYM STAP_ALLOW_CONTROLS}
+ STAP_ALLOW_WEBCONTENT = 1 shl 2;
+ {$EXTERNALSYM STAP_ALLOW_WEBCONTENT}
+
+//---------------------------------------------------------------------------
+// GetThemeAppProperties()
+// - returns the app property flags that control theming
+//---------------------------------------------------------------------------
+
+function GetThemeAppProperties: DWORD; stdcall;
+{$EXTERNALSYM GetThemeAppProperties}
+
+//---------------------------------------------------------------------------
+// SetThemeAppProperties()
+// - sets the flags that control theming within the app
+//
+// dwFlags - the flag values to be set
+//---------------------------------------------------------------------------
+
+procedure SetThemeAppProperties(dwFlags: DWORD); stdcall;
+{$EXTERNALSYM SetThemeAppProperties}
+
+//---------------------------------------------------------------------------
+// GetCurrentThemeName()
+// - Get the name of the current theme in-use.
+// Optionally, return the ColorScheme name and the
+// Size name of the theme.
+//
+// pszThemeFileName - receives the theme path & filename
+// cchMaxNameChars - max chars allowed in pszNameBuff
+//
+// pszColorBuff - (optional) receives the canonical color scheme name
+// (not the display name)
+// cchMaxColorChars - max chars allowed in pszColorBuff
+//
+// pszSizeBuff - (optional) receives the canonical size name
+// (not the display name)
+// cchMaxSizeChars - max chars allowed in pszSizeBuff
+//---------------------------------------------------------------------------
+
+function GetCurrentThemeName(pszThemeFileName: LPWSTR; cchMaxNameChars: Integer; pszColorBuff: LPWSTR;
+ cchMaxColorChars: Integer; pszSizeBuff: LPWSTR; cchMaxSizeChars: Integer): HRESULT; stdcall;
+{$EXTERNALSYM GetCurrentThemeName}
+
+//---------------------------------------------------------------------------
+// GetThemeDocumentationProperty()
+// - Get the value for the specified property name from
+// the [documentation] section of the themes.ini file
+// for the specified theme. If the property has been
+// localized in the theme files string table, the
+// localized version of the property value is returned.
+//
+// pszThemeFileName - filename of the theme file to query
+// pszPropertyName - name of the string property to retreive a value for
+// pszValueBuff - receives the property string value
+// cchMaxValChars - max chars allowed in pszValueBuff
+//---------------------------------------------------------------------------
+
+const
+ SZ_THDOCPROP_DISPLAYNAME = WideString('DisplayName');
+ {$EXTERNALSYM SZ_THDOCPROP_DISPLAYNAME}
+ SZ_THDOCPROP_CANONICALNAME = WideString('ThemeName');
+ {$EXTERNALSYM SZ_THDOCPROP_CANONICALNAME}
+ SZ_THDOCPROP_TOOLTIP = WideString('ToolTip');
+ {$EXTERNALSYM SZ_THDOCPROP_TOOLTIP}
+ SZ_THDOCPROP_AUTHOR = WideString('author');
+ {$EXTERNALSYM SZ_THDOCPROP_AUTHOR}
+
+function GetThemeDocumentationProperty(pszThemeName, pszPropertyName: LPCWSTR;
+ pszValueBuff: LPWSTR; cchMaxValChars: Integer): HRESULT; stdcall;
+{$EXTERNALSYM GetThemeDocumentationProperty}
+
+//---------------------------------------------------------------------------
+// Theme API Error Handling
+//
+// All functions in the Theme API not returning an HRESULT (THEMEAPI_)
+// use the WIN32 function "SetLastError()" to record any call failures.
+//
+// To retreive the error code of the last failure on the
+// current thread for these type of API's, use the WIN32 function
+// "GetLastError()".
+//
+// All Theme API error codes (HRESULT's and GetLastError() values)
+// should be normal win32 errors which can be formatted into
+// strings using the Win32 API FormatMessage().
+//---------------------------------------------------------------------------
+
+//---------------------------------------------------------------------------
+// DrawThemeParentBackground()
+// - used by partially-transparent or alpha-blended
+// child controls to draw the part of their parent
+// that they appear in front of.
+//
+// hwnd - handle of the child control
+
+// hdc - hdc of the child control
+
+// prc - (optional) rect that defines the area to be
+// drawn (CHILD coordinates)
+//---------------------------------------------------------------------------
+
+function DrawThemeParentBackground(hwnd: HWND; hdc: HDC; prc: PRECT): HRESULT; stdcall;
+{$EXTERNALSYM DrawThemeParentBackground}
+
+//---------------------------------------------------------------------------
+// EnableTheming() - enables or disables themeing for the current user
+// in the current and future sessions.
+//
+// fEnable - if FALSE, disable theming & turn themes off.
+// - if TRUE, enable themeing and, if user previously
+// had a theme active, make it active now.
+//---------------------------------------------------------------------------
+
+function EnableTheming(fEnable: BOOL): HRESULT; stdcall;
+{$EXTERNALSYM EnableTheming}
+
+//------------------------------------------------------------------------
+//---- bits used in dwFlags of DTBGOPTS ----
+
+const
+ DTBG_CLIPRECT = $00000001; // rcClip has been specified
+ {$EXTERNALSYM DTBG_CLIPRECT}
+ DTBG_DRAWSOLID = $00000002; // draw transparent/alpha images as solid
+ {$EXTERNALSYM DTBG_DRAWSOLID}
+ DTBG_OMITBORDER = $00000004; // don't draw border of part
+ {$EXTERNALSYM DTBG_OMITBORDER}
+ DTBG_OMITCONTENT = $00000008; // don't draw content area of part
+ {$EXTERNALSYM DTBG_OMITCONTENT}
+
+ DTBG_COMPUTINGREGION = $00000010; // TRUE if calling to compute region
+ {$EXTERNALSYM DTBG_COMPUTINGREGION}
+
+ DTBG_MIRRORDC = $00000020; // assume the hdc is mirrorred and
+ // flip images as appropriate (currently
+ // only supported for bgtype=imagefile)
+ {$EXTERNALSYM DTBG_MIRRORDC}
+
+//------------------------------------------------------------------------
+
+type
+ _DTBGOPTS = record
+ dwSize: DWORD; // size of the struct
+ dwFlags: DWORD; // which options have been specified
+ rcClip: RECT; // clipping rectangle
+ end;
+ {$EXTERNALSYM _DTBGOPTS}
+ DTBGOPTS = _DTBGOPTS;
+ {$EXTERNALSYM DTBGOPTS}
+ PDTBGOPTS = ^DTBGOPTS;
+ TDtbgOpts = DTBGOPTS;
+
+//------------------------------------------------------------------------
+// DrawThemeBackgroundEx()
+// - draws the theme-specified border and fill for
+// the "iPartId" and "iStateId". This could be
+// based on a bitmap file, a border and fill, or
+// other image description. NOTE: This will be
+// merged back into DrawThemeBackground() after
+// BETA 2.
+//
+// hTheme - theme data handle
+// hdc - HDC to draw into
+// iPartId - part number to draw
+// iStateId - state number (of the part) to draw
+// pRect - defines the size/location of the part
+// pOptions - ptr to optional params
+//------------------------------------------------------------------------
+
+function DrawThemeBackgroundEx(hTheme: HTHEME; hdc: HDC; iPartId, iStateId: Integer; pRect: LPRECT; pOptions: PDTBGOPTS): HRESULT; stdcall;
+{$EXTERNALSYM DrawThemeBackgroundEx}
+
+implementation
+
+const
+ themelib = 'uxtheme.dll';
+
+{$IFDEF DYNAMIC_LINK}
+
+var
+ _OpenThemeData: Pointer;
+
+function OpenThemeData;
+begin
+ GetProcedureAddress(_OpenThemeData, themelib, 'OpenThemeData');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_OpenThemeData]
+ end;
+end;
+
+var
+ _CloseThemeData: Pointer;
+
+function CloseThemeData;
+begin
+ GetProcedureAddress(_CloseThemeData, themelib, 'CloseThemeData');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CloseThemeData]
+ end;
+end;
+
+var
+ _DrawThemeBackground: Pointer;
+
+function DrawThemeBackground;
+begin
+ GetProcedureAddress(_DrawThemeBackground, themelib, 'DrawThemeBackground');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DrawThemeBackground]
+ end;
+end;
+
+var
+ _DrawThemeText: Pointer;
+
+function DrawThemeText;
+begin
+ GetProcedureAddress(_DrawThemeText, themelib, 'DrawThemeText');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DrawThemeText]
+ end;
+end;
+
+var
+ _GetThemeBackgroundContentRect: Pointer;
+
+function GetThemeBackgroundContentRect;
+begin
+ GetProcedureAddress(_GetThemeBackgroundContentRect, themelib, 'GetThemeBackgroundContentRect');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetThemeBackgroundContentRect]
+ end;
+end;
+
+var
+ _GetThemeBackgroundExtent: Pointer;
+
+function GetThemeBackgroundExtent;
+begin
+ GetProcedureAddress(_GetThemeBackgroundExtent, themelib, 'GetThemeBackgroundContentRect');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetThemeBackgroundExtent]
+ end;
+end;
+
+var
+ _GetThemePartSize: Pointer;
+
+function GetThemePartSize;
+begin
+ GetProcedureAddress(_GetThemePartSize, themelib, 'GetThemePartSize');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetThemePartSize]
+ end;
+end;
+
+var
+ _GetThemeTextExtent: Pointer;
+
+function GetThemeTextExtent;
+begin
+ GetProcedureAddress(_GetThemeTextExtent, themelib, 'GetThemeTextExtent');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetThemeTextExtent]
+ end;
+end;
+
+var
+ _GetThemeTextMetrics: Pointer;
+
+function GetThemeTextMetrics;
+begin
+ GetProcedureAddress(_GetThemeTextMetrics, themelib, 'GetThemeTextMetrics');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetThemeTextMetrics]
+ end;
+end;
+
+var
+ _GetThemeBackgroundRegion: Pointer;
+
+function GetThemeBackgroundRegion;
+begin
+ GetProcedureAddress(_GetThemeBackgroundRegion, themelib, 'GetThemeBackgroundRegion');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetThemeBackgroundRegion]
+ end;
+end;
+
+var
+ _HitTestThemeBackground: Pointer;
+
+function HitTestThemeBackground;
+begin
+ GetProcedureAddress(_HitTestThemeBackground, themelib, 'HitTestThemeBackground');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_HitTestThemeBackground]
+ end;
+end;
+
+var
+ _DrawThemeEdge: Pointer;
+
+function DrawThemeEdge;
+begin
+ GetProcedureAddress(_DrawThemeEdge, themelib, 'DrawThemeEdge');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DrawThemeEdge]
+ end;
+end;
+
+var
+ _DrawThemeIcon: Pointer;
+
+function DrawThemeIcon;
+begin
+ GetProcedureAddress(_DrawThemeIcon, themelib, 'DrawThemeIcon');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DrawThemeIcon]
+ end;
+end;
+
+var
+ _IsThemePartDefined: Pointer;
+
+function IsThemePartDefined;
+begin
+ GetProcedureAddress(_IsThemePartDefined, themelib, 'IsThemePartDefined');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_IsThemePartDefined]
+ end;
+end;
+
+var
+ _IsThemeBackgroundPartialTrans: Pointer;
+
+function IsThemeBackgroundPartiallyTransparent;
+begin
+ GetProcedureAddress(_IsThemeBackgroundPartialTrans, themelib, 'IsThemeBackgroundPartiallyTransparent');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_IsThemeBackgroundPartialTrans]
+ end;
+end;
+
+var
+ _GetThemeColor: Pointer;
+
+function GetThemeColor;
+begin
+ GetProcedureAddress(_GetThemeColor, themelib, 'GetThemeColor');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetThemeColor]
+ end;
+end;
+
+var
+ _GetThemeMetric: Pointer;
+
+function GetThemeMetric;
+begin
+ GetProcedureAddress(_GetThemeMetric, themelib, 'GetThemeMetric');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetThemeMetric]
+ end;
+end;
+
+var
+ _GetThemeString: Pointer;
+
+function GetThemeString;
+begin
+ GetProcedureAddress(_GetThemeString, themelib, 'GetThemeString');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetThemeString]
+ end;
+end;
+
+var
+ _GetThemeBool: Pointer;
+
+function GetThemeBool;
+begin
+ GetProcedureAddress(_GetThemeBool, themelib, 'GetThemeBool');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetThemeBool]
+ end;
+end;
+
+var
+ _GetThemeInt: Pointer;
+
+function GetThemeInt;
+begin
+ GetProcedureAddress(_GetThemeInt, themelib, 'GetThemeInt');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetThemeInt]
+ end;
+end;
+
+var
+ _GetThemeEnumValue: Pointer;
+
+function GetThemeEnumValue;
+begin
+ GetProcedureAddress(_GetThemeEnumValue, themelib, 'GetThemeEnumValue');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetThemeEnumValue]
+ end;
+end;
+
+var
+ _GetThemePosition: Pointer;
+
+function GetThemePosition;
+begin
+ GetProcedureAddress(_GetThemePosition, themelib, 'GetThemePosition');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetThemePosition]
+ end;
+end;
+
+var
+ _GetThemeFont: Pointer;
+
+function GetThemeFont;
+begin
+ GetProcedureAddress(_GetThemeFont, themelib, 'GetThemeFont');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetThemeFont]
+ end;
+end;
+
+var
+ _GetThemeRect: Pointer;
+
+function GetThemeRect;
+begin
+ GetProcedureAddress(_GetThemeRect, themelib, 'GetThemeRect');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetThemeRect]
+ end;
+end;
+
+var
+ _GetThemeMargins: Pointer;
+
+function GetThemeMargins;
+begin
+ GetProcedureAddress(_GetThemeMargins, themelib, 'GetThemeMargins');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetThemeMargins]
+ end;
+end;
+
+var
+ _GetThemeIntList: Pointer;
+
+function GetThemeIntList;
+begin
+ GetProcedureAddress(_GetThemeIntList, themelib, 'GetThemeIntList');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetThemeIntList]
+ end;
+end;
+
+var
+ _GetThemePropertyOrigin: Pointer;
+
+function GetThemePropertyOrigin;
+begin
+ GetProcedureAddress(_GetThemePropertyOrigin, themelib, 'GetThemePropertyOrigin');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetThemePropertyOrigin]
+ end;
+end;
+
+var
+ _SetWindowTheme: Pointer;
+
+function SetWindowTheme;
+begin
+ GetProcedureAddress(_SetWindowTheme, themelib, 'SetWindowTheme');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetWindowTheme]
+ end;
+end;
+
+var
+ _GetThemeFilename: Pointer;
+
+function GetThemeFilename;
+begin
+ GetProcedureAddress(_GetThemeFilename, themelib, 'GetThemeFilename');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetThemeFilename]
+ end;
+end;
+
+var
+ _GetThemeSysColor: Pointer;
+
+function GetThemeSysColor;
+begin
+ GetProcedureAddress(_GetThemeSysColor, themelib, 'GetThemeSysColor');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetThemeSysColor]
+ end;
+end;
+
+var
+ _GetThemeSysColorBrush: Pointer;
+
+function GetThemeSysColorBrush;
+begin
+ GetProcedureAddress(_GetThemeSysColorBrush, themelib, 'GetThemeSysColorBrush');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetThemeSysColorBrush]
+ end;
+end;
+
+var
+ _GetThemeSysBool: Pointer;
+
+function GetThemeSysBool;
+begin
+ GetProcedureAddress(_GetThemeSysBool, themelib, 'GetThemeSysBool');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetThemeSysBool]
+ end;
+end;
+
+var
+ _GetThemeSysSize: Pointer;
+
+function GetThemeSysSize;
+begin
+ GetProcedureAddress(_GetThemeSysSize, themelib, 'GetThemeSysSize');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetThemeSysSize]
+ end;
+end;
+
+var
+ _GetThemeSysFont: Pointer;
+
+function GetThemeSysFont;
+begin
+ GetProcedureAddress(_GetThemeSysFont, themelib, 'GetThemeSysFont');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetThemeSysFont]
+ end;
+end;
+
+var
+ _GetThemeSysString: Pointer;
+
+function GetThemeSysString;
+begin
+ GetProcedureAddress(_GetThemeSysString, themelib, 'GetThemeSysString');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetThemeSysString]
+ end;
+end;
+
+var
+ _GetThemeSysInt: Pointer;
+
+function GetThemeSysInt;
+begin
+ GetProcedureAddress(_GetThemeSysInt, themelib, 'GetThemeSysInt');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetThemeSysInt]
+ end;
+end;
+
+var
+ _IsThemeActive: Pointer;
+
+function IsThemeActive;
+begin
+ GetProcedureAddress(_IsThemeActive, themelib, 'IsThemeActive');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_IsThemeActive]
+ end;
+end;
+
+var
+ _IsAppThemed: Pointer;
+
+function IsAppThemed;
+begin
+ GetProcedureAddress(_IsAppThemed, themelib, 'IsAppThemed');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_IsAppThemed]
+ end;
+end;
+
+var
+ _GetWindowTheme: Pointer;
+
+function GetWindowTheme;
+begin
+ GetProcedureAddress(_GetWindowTheme, themelib, 'GetWindowTheme');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetWindowTheme]
+ end;
+end;
+
+var
+ _EnableThemeDialogTexture: Pointer;
+
+function EnableThemeDialogTexture;
+begin
+ GetProcedureAddress(_EnableThemeDialogTexture, themelib, 'EnableThemeDialogTexture');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_EnableThemeDialogTexture]
+ end;
+end;
+
+var
+ _IsThemeDialogTextureEnabled: Pointer;
+
+function IsThemeDialogTextureEnabled;
+begin
+ GetProcedureAddress(_IsThemeDialogTextureEnabled, themelib, 'IsThemeDialogTextureEnabled');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_IsThemeDialogTextureEnabled]
+ end;
+end;
+
+var
+ _GetThemeAppProperties: Pointer;
+
+function GetThemeAppProperties;
+begin
+ GetProcedureAddress(_GetThemeAppProperties, themelib, 'GetThemeAppProperties');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetThemeAppProperties]
+ end;
+end;
+
+var
+ _SetThemeAppProperties: Pointer;
+
+procedure SetThemeAppProperties;
+begin
+ GetProcedureAddress(_SetThemeAppProperties, themelib, 'SetThemeAppProperties');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetThemeAppProperties]
+ end;
+end;
+
+var
+ _GetCurrentThemeName: Pointer;
+
+function GetCurrentThemeName;
+begin
+ GetProcedureAddress(_GetCurrentThemeName, themelib, 'GetCurrentThemeName');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetCurrentThemeName]
+ end;
+end;
+
+var
+ _GetThemeDocumentationProperty: Pointer;
+
+function GetThemeDocumentationProperty;
+begin
+ GetProcedureAddress(_GetThemeDocumentationProperty, themelib, 'GetThemeDocumentationProperty');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetThemeDocumentationProperty]
+ end;
+end;
+
+var
+ _DrawThemeParentBackground: Pointer;
+
+function DrawThemeParentBackground;
+begin
+ GetProcedureAddress(_DrawThemeParentBackground, themelib, 'DrawThemeParentBackground');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DrawThemeParentBackground]
+ end;
+end;
+
+var
+ _EnableTheming: Pointer;
+
+function EnableTheming;
+begin
+ GetProcedureAddress(_EnableTheming, themelib, 'EnableTheming');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_EnableTheming]
+ end;
+end;
+
+var
+ _DrawThemeBackgroundEx: Pointer;
+
+function DrawThemeBackgroundEx;
+begin
+ GetProcedureAddress(_DrawThemeBackgroundEx, themelib, 'DrawThemeBackgroundEx');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DrawThemeBackgroundEx]
+ end;
+end;
+
+{$ELSE}
+
+function OpenThemeData; external themelib name 'OpenThemeData';
+function CloseThemeData; external themelib name 'CloseThemeData';
+function DrawThemeBackground; external themelib name 'DrawThemeBackground';
+function DrawThemeText; external themelib name 'DrawThemeText';
+function GetThemeBackgroundContentRect; external themelib name 'GetThemeBackgroundContentRect';
+function GetThemeBackgroundExtent; external themelib name 'GetThemeBackgroundContentRect';
+function GetThemePartSize; external themelib name 'GetThemePartSize';
+function GetThemeTextExtent; external themelib name 'GetThemeTextExtent';
+function GetThemeTextMetrics; external themelib name 'GetThemeTextMetrics';
+function GetThemeBackgroundRegion; external themelib name 'GetThemeBackgroundRegion';
+function HitTestThemeBackground; external themelib name 'HitTestThemeBackground';
+function DrawThemeEdge; external themelib name 'DrawThemeEdge';
+function DrawThemeIcon; external themelib name 'DrawThemeIcon';
+function IsThemePartDefined; external themelib name 'IsThemePartDefined';
+function IsThemeBackgroundPartiallyTransparent; external themelib name 'IsThemeBackgroundPartiallyTransparent';
+function GetThemeColor; external themelib name 'GetThemeColor';
+function GetThemeMetric; external themelib name 'GetThemeMetric';
+function GetThemeString; external themelib name 'GetThemeString';
+function GetThemeBool; external themelib name 'GetThemeBool';
+function GetThemeInt; external themelib name 'GetThemeInt';
+function GetThemeEnumValue; external themelib name 'GetThemeEnumValue';
+function GetThemePosition; external themelib name 'GetThemePosition';
+function GetThemeFont; external themelib name 'GetThemeFont';
+function GetThemeRect; external themelib name 'GetThemeRect';
+function GetThemeMargins; external themelib name 'GetThemeMargins';
+function GetThemeIntList; external themelib name 'GetThemeIntList';
+function GetThemePropertyOrigin; external themelib name 'GetThemePropertyOrigin';
+function SetWindowTheme; external themelib name 'SetWindowTheme';
+function GetThemeFilename; external themelib name 'GetThemeFilename';
+function GetThemeSysColor; external themelib name 'GetThemeSysColor';
+function GetThemeSysColorBrush; external themelib name 'GetThemeSysColorBrush';
+function GetThemeSysBool; external themelib name 'GetThemeSysBool';
+function GetThemeSysSize; external themelib name 'GetThemeSysSize';
+function GetThemeSysFont; external themelib name 'GetThemeSysFont';
+function GetThemeSysString; external themelib name 'GetThemeSysString';
+function GetThemeSysInt; external themelib name 'GetThemeSysInt';
+function IsThemeActive; external themelib name 'IsThemeActive';
+function IsAppThemed; external themelib name 'IsAppThemed';
+function GetWindowTheme; external themelib name 'GetWindowTheme';
+function EnableThemeDialogTexture; external themelib name 'EnableThemeDialogTexture';
+function IsThemeDialogTextureEnabled; external themelib name 'IsThemeDialogTextureEnabled';
+function GetThemeAppProperties; external themelib name 'GetThemeAppProperties';
+procedure SetThemeAppProperties; external themelib name 'SetThemeAppProperties';
+function GetCurrentThemeName; external themelib name 'GetCurrentThemeName';
+function GetThemeDocumentationProperty; external themelib name 'GetThemeDocumentationProperty';
+function DrawThemeParentBackground; external themelib name 'DrawThemeParentBackground';
+function EnableTheming; external themelib name 'EnableTheming';
+function DrawThemeBackgroundEx; external themelib name 'DrawThemeBackgroundEx';
+
+{$ENDIF DYNAMIC_LINK}
+
+end.
diff --git a/packages/extra/winunits/jwawbemcli.pas b/packages/extra/winunits/jwawbemcli.pas
index 0c3f729df8..38bf5af30e 100644
--- a/packages/extra/winunits/jwawbemcli.pas
+++ b/packages/extra/winunits/jwawbemcli.pas
@@ -1,1305 +1,1305 @@
-{******************************************************************************}
-{ }
-{ WBEM Client interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: wbemcli.idl, released Nov 2002. The original Pascal }
-{ code is: WbemCli.pas, released April 2002. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwawbemcli.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaWbemCli;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "wbemcli.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- ActiveX,
- JwaWinType;
-
-{$IFDEF FPC}
-Type PSafeArray=PVarArray;
-{$ENDIF}
-
-type
- tag_WBEM_GENUS_TYPE = DWORD;
- {$EXTERNALSYM tag_WBEM_GENUS_TYPE}
- WBEM_GENUS_TYPE = tag_WBEM_GENUS_TYPE;
- {$EXTERNALSYM WBEM_GENUS_TYPE}
- TWbemGenusType = WBEM_GENUS_TYPE;
- {$EXTERNALSYM TWbemGenusType}
-
-const
- WBEM_GENUS_CLASS = 1;
- {$EXTERNALSYM WBEM_GENUS_CLASS}
- WBEM_GENUS_INSTANCE = 2;
- {$EXTERNALSYM WBEM_GENUS_INSTANCE}
-
-type
- tag_WBEM_CHANGE_FLAG_TYPE = DWORD;
- {$EXTERNALSYM tag_WBEM_CHANGE_FLAG_TYPE}
- WBEM_CHANGE_FLAG_TYPE = tag_WBEM_CHANGE_FLAG_TYPE;
- {$EXTERNALSYM WBEM_CHANGE_FLAG_TYPE}
- TWbemChangeFlagType = WBEM_CHANGE_FLAG_TYPE;
- {$EXTERNALSYM TWbemChangeFlagType}
-
-const
- WBEM_FLAG_CREATE_OR_UPDATE = $0;
- {$EXTERNALSYM WBEM_FLAG_CREATE_OR_UPDATE}
- WBEM_FLAG_UPDATE_ONLY = $1;
- {$EXTERNALSYM WBEM_FLAG_UPDATE_ONLY}
- WBEM_FLAG_CREATE_ONLY = $2;
- {$EXTERNALSYM WBEM_FLAG_CREATE_ONLY}
- WBEM_FLAG_UPDATE_COMPATIBLE = $0;
- {$EXTERNALSYM WBEM_FLAG_UPDATE_COMPATIBLE}
- WBEM_FLAG_UPDATE_SAFE_MODE = $20;
- {$EXTERNALSYM WBEM_FLAG_UPDATE_SAFE_MODE}
- WBEM_FLAG_UPDATE_FORCE_MODE = $40;
- {$EXTERNALSYM WBEM_FLAG_UPDATE_FORCE_MODE}
- WBEM_MASK_UPDATE_MODE = $60;
- {$EXTERNALSYM WBEM_MASK_UPDATE_MODE}
- WBEM_FLAG_ADVISORY = $10000;
- {$EXTERNALSYM WBEM_FLAG_ADVISORY}
-
-type
- tag_WBEM_GENERIC_FLAG_TYPE = DWORD;
- {$EXTERNALSYM tag_WBEM_GENERIC_FLAG_TYPE}
- WBEM_GENERIC_FLAG_TYPE = tag_WBEM_GENERIC_FLAG_TYPE;
- {$EXTERNALSYM WBEM_GENERIC_FLAG_TYPE}
- TWbemGenericFlagType = WBEM_GENERIC_FLAG_TYPE;
- {$EXTERNALSYM TWbemGenericFlagType}
-
-const
- WBEM_FLAG_RETURN_IMMEDIATELY = $10;
- {$EXTERNALSYM WBEM_FLAG_RETURN_IMMEDIATELY}
- WBEM_FLAG_RETURN_WBEM_COMPLETE = $0;
- {$EXTERNALSYM WBEM_FLAG_RETURN_WBEM_COMPLETE}
- WBEM_FLAG_BIDIRECTIONAL = $0;
- {$EXTERNALSYM WBEM_FLAG_BIDIRECTIONAL}
- WBEM_FLAG_FORWARD_ONLY = $20;
- {$EXTERNALSYM WBEM_FLAG_FORWARD_ONLY}
- WBEM_FLAG_NO_ERROR_OBJECT = $40;
- {$EXTERNALSYM WBEM_FLAG_NO_ERROR_OBJECT}
- WBEM_FLAG_RETURN_ERROR_OBJECT = $0;
- {$EXTERNALSYM WBEM_FLAG_RETURN_ERROR_OBJECT}
- WBEM_FLAG_SEND_STATUS = $80;
- {$EXTERNALSYM WBEM_FLAG_SEND_STATUS}
- WBEM_FLAG_DONT_SEND_STATUS = $0;
- {$EXTERNALSYM WBEM_FLAG_DONT_SEND_STATUS}
- WBEM_FLAG_ENSURE_LOCATABLE = $100;
- {$EXTERNALSYM WBEM_FLAG_ENSURE_LOCATABLE}
- WBEM_FLAG_DIRECT_READ = $200;
- {$EXTERNALSYM WBEM_FLAG_DIRECT_READ}
- WBEM_FLAG_SEND_ONLY_SELECTED = $0;
- {$EXTERNALSYM WBEM_FLAG_SEND_ONLY_SELECTED}
- WBEM_RETURN_WHEN_COMPLETE = $0;
- {$EXTERNALSYM WBEM_RETURN_WHEN_COMPLETE}
- WBEM_RETURN_IMMEDIATELY = $10;
- {$EXTERNALSYM WBEM_RETURN_IMMEDIATELY}
- WBEM_MASK_RESERVED_FLAGS = $1f000;
- {$EXTERNALSYM WBEM_MASK_RESERVED_FLAGS}
- WBEM_FLAG_USE_AMENDED_QUALIFIERS = $20000;
- {$EXTERNALSYM WBEM_FLAG_USE_AMENDED_QUALIFIERS}
- WBEM_FLAG_STRONG_VALIDATION = $100000;
- {$EXTERNALSYM WBEM_FLAG_STRONG_VALIDATION}
-
-type
- tag_WBEM_STATUS_TYPE = DWORD;
- {$EXTERNALSYM tag_WBEM_STATUS_TYPE}
- WBEM_STATUS_TYPE = tag_WBEM_STATUS_TYPE;
- {$EXTERNALSYM WBEM_STATUS_TYPE}
- TWbemStatusType = WBEM_STATUS_TYPE;
- {$EXTERNALSYM TWbemStatusType}
-
-const
- WBEM_STATUS_COMPLETE = 0;
- {$EXTERNALSYM WBEM_STATUS_COMPLETE}
- WBEM_STATUS_REQUIREMENTS = 1;
- {$EXTERNALSYM WBEM_STATUS_REQUIREMENTS}
- WBEM_STATUS_PROGRESS = 2;
- {$EXTERNALSYM WBEM_STATUS_PROGRESS}
-
-type
- tag_WBEM_TIMEOUT_TYPE = DWORD;
- {$EXTERNALSYM tag_WBEM_TIMEOUT_TYPE}
- WBEM_TIMEOUT_TYPE = tag_WBEM_TIMEOUT_TYPE;
- {$EXTERNALSYM WBEM_TIMEOUT_TYPE}
- TWbemTimeoutType = WBEM_TIMEOUT_TYPE;
- {$EXTERNALSYM TWbemTimeoutType}
-
-const
- WBEM_NO_WAIT = 0;
- {$EXTERNALSYM WBEM_NO_WAIT}
- WBEM_INFINITE = DWORD($ffffffff);
- {$EXTERNALSYM WBEM_INFINITE}
-
-type
- tag_WBEM_CONDITION_FLAG_TYPE = DWORD;
- {$EXTERNALSYM tag_WBEM_CONDITION_FLAG_TYPE}
- WBEM_CONDITION_FLAG_TYPE = tag_WBEM_CONDITION_FLAG_TYPE;
- {$EXTERNALSYM WBEM_CONDITION_FLAG_TYPE}
- TWbemConditionFlagType = WBEM_CONDITION_FLAG_TYPE;
- {$EXTERNALSYM TWbemConditionFlagType}
-
-const
- WBEM_FLAG_ALWAYS = $0;
- {$EXTERNALSYM WBEM_FLAG_ALWAYS}
- WBEM_FLAG_ONLY_IF_TRUE = $1;
- {$EXTERNALSYM WBEM_FLAG_ONLY_IF_TRUE}
- WBEM_FLAG_ONLY_IF_FALSE = $2;
- {$EXTERNALSYM WBEM_FLAG_ONLY_IF_FALSE}
- WBEM_FLAG_ONLY_IF_IDENTICAL = $3;
- {$EXTERNALSYM WBEM_FLAG_ONLY_IF_IDENTICAL}
- WBEM_MASK_PRIMARY_CONDITION = $3;
- {$EXTERNALSYM WBEM_MASK_PRIMARY_CONDITION}
- WBEM_FLAG_KEYS_ONLY = $4;
- {$EXTERNALSYM WBEM_FLAG_KEYS_ONLY}
- WBEM_FLAG_REFS_ONLY = $8;
- {$EXTERNALSYM WBEM_FLAG_REFS_ONLY}
- WBEM_FLAG_LOCAL_ONLY = $10;
- {$EXTERNALSYM WBEM_FLAG_LOCAL_ONLY}
- WBEM_FLAG_PROPAGATED_ONLY = $20;
- {$EXTERNALSYM WBEM_FLAG_PROPAGATED_ONLY}
- WBEM_FLAG_SYSTEM_ONLY = $30;
- {$EXTERNALSYM WBEM_FLAG_SYSTEM_ONLY}
- WBEM_FLAG_NONSYSTEM_ONLY = $40;
- {$EXTERNALSYM WBEM_FLAG_NONSYSTEM_ONLY}
- WBEM_MASK_CONDITION_ORIGIN = $70;
- {$EXTERNALSYM WBEM_MASK_CONDITION_ORIGIN}
- WBEM_FLAG_CLASS_OVERRIDES_ONLY = $100;
- {$EXTERNALSYM WBEM_FLAG_CLASS_OVERRIDES_ONLY}
- WBEM_FLAG_CLASS_LOCAL_AND_OVERRIDES = $200;
- {$EXTERNALSYM WBEM_FLAG_CLASS_LOCAL_AND_OVERRIDES}
- WBEM_MASK_CLASS_CONDITION = $300;
- {$EXTERNALSYM WBEM_MASK_CLASS_CONDITION}
-
-type
- tag_WBEM_FLAVOR_TYPE = DWORD;
- {$EXTERNALSYM tag_WBEM_FLAVOR_TYPE}
- WBEM_FLAVOR_TYPE = tag_WBEM_FLAVOR_TYPE;
- {$EXTERNALSYM WBEM_FLAVOR_TYPE}
- TWbemFlavorType = WBEM_FLAVOR_TYPE;
- {$EXTERNALSYM TWbemFlavorType}
-
-const
- WBEM_FLAVOR_DONT_PROPAGATE = $0;
- {$EXTERNALSYM WBEM_FLAVOR_DONT_PROPAGATE}
- WBEM_FLAVOR_FLAG_PROPAGATE_TO_INSTANCE = $1;
- {$EXTERNALSYM WBEM_FLAVOR_FLAG_PROPAGATE_TO_INSTANCE}
- WBEM_FLAVOR_FLAG_PROPAGATE_TO_DERIVED_CLASS = $2;
- {$EXTERNALSYM WBEM_FLAVOR_FLAG_PROPAGATE_TO_DERIVED_CLASS}
- WBEM_FLAVOR_MASK_PROPAGATION = $f;
- {$EXTERNALSYM WBEM_FLAVOR_MASK_PROPAGATION}
- WBEM_FLAVOR_OVERRIDABLE = $0;
- {$EXTERNALSYM WBEM_FLAVOR_OVERRIDABLE}
- WBEM_FLAVOR_NOT_OVERRIDABLE = $10;
- {$EXTERNALSYM WBEM_FLAVOR_NOT_OVERRIDABLE}
- WBEM_FLAVOR_MASK_PERMISSIONS = $10;
- {$EXTERNALSYM WBEM_FLAVOR_MASK_PERMISSIONS}
- WBEM_FLAVOR_ORIGIN_LOCAL = $0;
- {$EXTERNALSYM WBEM_FLAVOR_ORIGIN_LOCAL}
- WBEM_FLAVOR_ORIGIN_PROPAGATED = $20;
- {$EXTERNALSYM WBEM_FLAVOR_ORIGIN_PROPAGATED}
- WBEM_FLAVOR_ORIGIN_SYSTEM = $40;
- {$EXTERNALSYM WBEM_FLAVOR_ORIGIN_SYSTEM}
- WBEM_FLAVOR_MASK_ORIGIN = $60;
- {$EXTERNALSYM WBEM_FLAVOR_MASK_ORIGIN}
- WBEM_FLAVOR_NOT_AMENDED = $0;
- {$EXTERNALSYM WBEM_FLAVOR_NOT_AMENDED}
- WBEM_FLAVOR_AMENDED = $80;
- {$EXTERNALSYM WBEM_FLAVOR_AMENDED}
- WBEM_FLAVOR_MASK_AMENDED = $80;
- {$EXTERNALSYM WBEM_FLAVOR_MASK_AMENDED}
-
-type
- tag_WBEM_QUERY_FLAG_TYPE = DWORD;
- {$EXTERNALSYM tag_WBEM_QUERY_FLAG_TYPE}
- WBEM_QUERY_FLAG_TYPE = tag_WBEM_QUERY_FLAG_TYPE;
- {$EXTERNALSYM WBEM_QUERY_FLAG_TYPE}
- TWbemQueryFlagType = WBEM_QUERY_FLAG_TYPE;
- {$EXTERNALSYM TWbemQueryFlagType}
-
-const
- WBEM_FLAG_DEEP = 0;
- {$EXTERNALSYM WBEM_FLAG_DEEP}
- WBEM_FLAG_SHALLOW = 1;
- {$EXTERNALSYM WBEM_FLAG_SHALLOW}
- WBEM_FLAG_PROTOTYPE = 2;
- {$EXTERNALSYM WBEM_FLAG_PROTOTYPE}
-
-type
- tag_WBEM_SECURITY_FLAGS = DWORD;
- {$EXTERNALSYM tag_WBEM_SECURITY_FLAGS}
- WBEM_SECURITY_FLAGS = tag_WBEM_SECURITY_FLAGS;
- {$EXTERNALSYM WBEM_SECURITY_FLAGS}
- TWbemSecurityFlags = WBEM_SECURITY_FLAGS;
- {$EXTERNALSYM TWbemSecurityFlags}
-
-const
- WBEM_ENABLE = $1;
- {$EXTERNALSYM WBEM_ENABLE}
- WBEM_METHOD_EXECUTE = $2;
- {$EXTERNALSYM WBEM_METHOD_EXECUTE}
- WBEM_FULL_WRITE_REP = $4;
- {$EXTERNALSYM WBEM_FULL_WRITE_REP}
- WBEM_PARTIAL_WRITE_REP = $8;
- {$EXTERNALSYM WBEM_PARTIAL_WRITE_REP}
- WBEM_WRITE_PROVIDER = $10;
- {$EXTERNALSYM WBEM_WRITE_PROVIDER}
- WBEM_REMOTE_ACCESS = $20;
- {$EXTERNALSYM WBEM_REMOTE_ACCESS}
- WBEM_RIGHT_SUBSCRIBE = $40;
- {$EXTERNALSYM WBEM_RIGHT_SUBSCRIBE}
- WBEM_RIGHT_PUBLISH = $80;
- {$EXTERNALSYM WBEM_RIGHT_PUBLISH}
-
-type
- tag_WBEM_LIMITATION_FLAG_TYPE = DWORD;
- {$EXTERNALSYM tag_WBEM_LIMITATION_FLAG_TYPE}
- WBEM_LIMITATION_FLAG_TYPE = tag_WBEM_LIMITATION_FLAG_TYPE;
- {$EXTERNALSYM WBEM_LIMITATION_FLAG_TYPE}
- TWbemLimitationFlagType = WBEM_LIMITATION_FLAG_TYPE;
- {$EXTERNALSYM TWbemLimitationFlagType}
-
-const
- WBEM_FLAG_EXCLUDE_OBJECT_QUALIFIERS = $10;
- {$EXTERNALSYM WBEM_FLAG_EXCLUDE_OBJECT_QUALIFIERS}
- WBEM_FLAG_EXCLUDE_PROPERTY_QUALIFIERS = $20;
- {$EXTERNALSYM WBEM_FLAG_EXCLUDE_PROPERTY_QUALIFIERS}
-
-type
- tag_WBEM_TEXT_FLAG_TYPE = DWORD;
- {$EXTERNALSYM tag_WBEM_TEXT_FLAG_TYPE}
- WBEM_TEXT_FLAG_TYPE = tag_WBEM_TEXT_FLAG_TYPE;
- {$EXTERNALSYM WBEM_TEXT_FLAG_TYPE}
- TWbemTextFlagType = WBEM_TEXT_FLAG_TYPE;
- {$EXTERNALSYM TWbemTextFlagType}
-
-const
- WBEM_FLAG_NO_FLAVORS = $1;
- {$EXTERNALSYM WBEM_FLAG_NO_FLAVORS}
-
-type
- tag_WBEM_COMPARISON_FLAG = DWORD;
- {$EXTERNALSYM tag_WBEM_COMPARISON_FLAG}
- WBEM_COMPARISON_FLAG = tag_WBEM_COMPARISON_FLAG;
- {$EXTERNALSYM WBEM_COMPARISON_FLAG}
- TWbemComparisonFlag = WBEM_COMPARISON_FLAG;
- {$EXTERNALSYM TWbemComparisonFlag}
-
-const
- WBEM_COMPARISON_INCLUDE_ALL = $0;
- {$EXTERNALSYM WBEM_COMPARISON_INCLUDE_ALL}
- WBEM_FLAG_IGNORE_QUALIFIERS = $1;
- {$EXTERNALSYM WBEM_FLAG_IGNORE_QUALIFIERS}
- WBEM_FLAG_IGNORE_OBJECT_SOURCE = $2;
- {$EXTERNALSYM WBEM_FLAG_IGNORE_OBJECT_SOURCE}
- WBEM_FLAG_IGNORE_DEFAULT_VALUES = $4;
- {$EXTERNALSYM WBEM_FLAG_IGNORE_DEFAULT_VALUES}
- WBEM_FLAG_IGNORE_CLASS = $8;
- {$EXTERNALSYM WBEM_FLAG_IGNORE_CLASS}
- WBEM_FLAG_IGNORE_CASE = $10;
- {$EXTERNALSYM WBEM_FLAG_IGNORE_CASE}
- WBEM_FLAG_IGNORE_FLAVOR = $20;
- {$EXTERNALSYM WBEM_FLAG_IGNORE_FLAVOR}
-
-type
- tag_WBEM_LOCKING = DWORD;
- {$EXTERNALSYM tag_WBEM_LOCKING}
- WBEM_LOCKING_FLAG_TYPE = tag_WBEM_LOCKING;
- {$EXTERNALSYM WBEM_LOCKING_FLAG_TYPE}
- TWbemLockingFlagType = WBEM_LOCKING_FLAG_TYPE;
- {$EXTERNALSYM TWbemLockingFlagType}
-
-const
- WBEM_FLAG_ALLOW_READ = $1;
- {$EXTERNALSYM WBEM_FLAG_ALLOW_READ}
-
-type
- tag_CIMTYPE_ENUMERATION = DWORD;
- {$EXTERNALSYM tag_CIMTYPE_ENUMERATION}
- CIMTYPE_ENUMERATION = tag_CIMTYPE_ENUMERATION;
- {$EXTERNALSYM CIMTYPE_ENUMERATION}
- TCimTypeEnumeration = CIMTYPE_ENUMERATION;
- {$EXTERNALSYM TCimTypeEnumeration}
-
-const
- CIM_ILLEGAL = $fff;
- {$EXTERNALSYM CIM_ILLEGAL}
- CIM_EMPTY = 0;
- {$EXTERNALSYM CIM_EMPTY}
- CIM_SINT8 = 16;
- {$EXTERNALSYM CIM_SINT8}
- CIM_UINT8 = 17;
- {$EXTERNALSYM CIM_UINT8}
- CIM_SINT16 = 2;
- {$EXTERNALSYM CIM_SINT16}
- CIM_UINT16 = 18;
- {$EXTERNALSYM CIM_UINT16}
- CIM_SINT32 = 3;
- {$EXTERNALSYM CIM_SINT32}
- CIM_UINT32 = 19;
- {$EXTERNALSYM CIM_UINT32}
- CIM_SINT64 = 20;
- {$EXTERNALSYM CIM_SINT64}
- CIM_UINT64 = 21;
- {$EXTERNALSYM CIM_UINT64}
- CIM_REAL32 = 4;
- {$EXTERNALSYM CIM_REAL32}
- CIM_REAL64 = 5;
- {$EXTERNALSYM CIM_REAL64}
- CIM_BOOLEAN = 11;
- {$EXTERNALSYM CIM_BOOLEAN}
- CIM_STRING = 8;
- {$EXTERNALSYM CIM_STRING}
- CIM_DATETIME = 101;
- {$EXTERNALSYM CIM_DATETIME}
- CIM_REFERENCE = 102;
- {$EXTERNALSYM CIM_REFERENCE}
- CIM_CHAR16 = 103;
- {$EXTERNALSYM CIM_CHAR16}
- CIM_OBJECT = 13;
- {$EXTERNALSYM CIM_OBJECT}
- CIM_FLAG_ARRAY = $2000;
- {$EXTERNALSYM CIM_FLAG_ARRAY}
-
-type
- tag_WBEM_BACKUP_RESTORE_FLAGS = DWORD;
- {$EXTERNALSYM tag_WBEM_BACKUP_RESTORE_FLAGS}
- WBEM_BACKUP_RESTORE_FLAGS = tag_WBEM_BACKUP_RESTORE_FLAGS;
- {$EXTERNALSYM WBEM_BACKUP_RESTORE_FLAGS}
- TWbemBackupRestoreFlags = WBEM_BACKUP_RESTORE_FLAGS;
- {$EXTERNALSYM TWbemBackupRestoreFlags}
-
-const
- WBEM_FLAG_BACKUP_RESTORE_DEFAULT = 0;
- {$EXTERNALSYM WBEM_FLAG_BACKUP_RESTORE_DEFAULT}
- WBEM_FLAG_BACKUP_RESTORE_FORCE_SHUTDOWN = 1;
- {$EXTERNALSYM WBEM_FLAG_BACKUP_RESTORE_FORCE_SHUTDOWN}
-
-type
- tag_WBEM_REFRESHER_FLAGS = DWORD;
- {$EXTERNALSYM tag_WBEM_REFRESHER_FLAGS}
- WBEM_REFRESHER_FLAGS = tag_WBEM_REFRESHER_FLAGS;
- {$EXTERNALSYM WBEM_REFRESHER_FLAGS}
- TWbemRefresherFlags = WBEM_REFRESHER_FLAGS;
- {$EXTERNALSYM TWbemRefresherFlags}
-
-const
- WBEM_FLAG_REFRESH_AUTO_RECONNECT = 0;
- {$EXTERNALSYM WBEM_FLAG_REFRESH_AUTO_RECONNECT}
- WBEM_FLAG_REFRESH_NO_AUTO_RECONNECT = 1;
- {$EXTERNALSYM WBEM_FLAG_REFRESH_NO_AUTO_RECONNECT}
-
-type
- tag_WBEM_SHUTDOWN_FLAGS = DWORD;
- {$EXTERNALSYM tag_WBEM_SHUTDOWN_FLAGS}
- WBEM_SHUTDOWN_FLAGS = tag_WBEM_SHUTDOWN_FLAGS;
- {$EXTERNALSYM WBEM_SHUTDOWN_FLAGS}
- TWbemShutdownFlags = WBEM_SHUTDOWN_FLAGS;
- {$EXTERNALSYM TWbemShutdownFlags}
-
-const
- WBEM_SHUTDOWN_UNLOAD_COMPONENT = 1;
- {$EXTERNALSYM WBEM_SHUTDOWN_UNLOAD_COMPONENT}
- WBEM_SHUTDOWN_WMI = 2;
- {$EXTERNALSYM WBEM_SHUTDOWN_WMI}
- WBEM_SHUTDOWN_OS = 3;
- {$EXTERNALSYM WBEM_SHUTDOWN_OS}
-
-type
- CIMTYPE = LONG;
- {$EXTERNALSYM CIMTYPE}
-
-type
- tag_WBEMSTATUS_FORMAT = DWORD;
- {$EXTERNALSYM tag_WBEMSTATUS_FORMAT}
- WBEMSTATUS_FORMAT = tag_WBEMSTATUS_FORMAT;
- {$EXTERNALSYM WBEMSTATUS_FORMAT}
- TWbemStatusFormat = WBEMSTATUS_FORMAT;
- {$EXTERNALSYM TWbemStatusFormat}
-
-const
- WBEMSTATUS_FORMAT_NEWLINE = 0;
- {$EXTERNALSYM WBEMSTATUS_FORMAT_NEWLINE}
- WBEMSTATUS_FORMAT_NO_NEWLINE = 1;
- {$EXTERNALSYM WBEMSTATUS_FORMAT_NO_NEWLINE}
-
-type
- tag_WBEM_LIMITS = DWORD;
- {$EXTERNALSYM tag_WBEM_LIMITS}
- WBEM_LIMITS = tag_WBEM_LIMITS;
- {$EXTERNALSYM WBEM_LIMITS}
- TWbemLimits = WBEM_LIMITS;
-
-const
- WBEM_MAX_IDENTIFIER = $1000;
- {$EXTERNALSYM WBEM_MAX_IDENTIFIER}
- WBEM_MAX_QUERY = $4000;
- {$EXTERNALSYM WBEM_MAX_QUERY}
- WBEM_MAX_PATH = $2000;
- {$EXTERNALSYM WBEM_MAX_PATH}
- WBEM_MAX_OBJECT_NESTING = 64;
- {$EXTERNALSYM WBEM_MAX_OBJECT_NESTING}
- WBEM_MAX_USER_PROPERTIES = 1024;
- {$EXTERNALSYM WBEM_MAX_USER_PROPERTIES}
-
-type
- tag_WBEMSTATUS = DWORD;
- {$EXTERNALSYM tag_WBEMSTATUS}
- WBEMSTATUS = tag_WBEMSTATUS;
- {$EXTERNALSYM WBEMSTATUS}
- TWbemStatus = WBEMSTATUS;
- {$EXTERNALSYM TWbemStatus}
-
-const
- WBEM_NO_ERROR = 0;
- {$EXTERNALSYM WBEM_NO_ERROR}
- WBEM_S_NO_ERROR = 0;
- {$EXTERNALSYM WBEM_S_NO_ERROR}
- WBEM_S_SAME = 0;
- {$EXTERNALSYM WBEM_S_SAME}
- WBEM_S_FALSE = 1;
- {$EXTERNALSYM WBEM_S_FALSE}
- WBEM_S_ALREADY_EXISTS = DWORD($40001);
- {$EXTERNALSYM WBEM_S_ALREADY_EXISTS}
- WBEM_S_RESET_TO_DEFAULT = DWORD($40002);
- {$EXTERNALSYM WBEM_S_RESET_TO_DEFAULT}
- WBEM_S_DIFFERENT = DWORD($40003);
- {$EXTERNALSYM WBEM_S_DIFFERENT}
- WBEM_S_TIMEDOUT = DWORD($40004);
- {$EXTERNALSYM WBEM_S_TIMEDOUT}
- WBEM_S_NO_MORE_DATA = DWORD($40005);
- {$EXTERNALSYM WBEM_S_NO_MORE_DATA}
- WBEM_S_OPERATION_CANCELLED = DWORD($40006);
- {$EXTERNALSYM WBEM_S_OPERATION_CANCELLED}
- WBEM_S_PENDING = DWORD($40007);
- {$EXTERNALSYM WBEM_S_PENDING}
- WBEM_S_DUPLICATE_OBJECTS = DWORD($40008);
- {$EXTERNALSYM WBEM_S_DUPLICATE_OBJECTS}
- WBEM_S_ACCESS_DENIED = DWORD($40009);
- {$EXTERNALSYM WBEM_S_ACCESS_DENIED}
- WBEM_S_PARTIAL_RESULTS = DWORD($40010);
- {$EXTERNALSYM WBEM_S_PARTIAL_RESULTS}
- WBEM_S_SOURCE_NOT_AVAILABLE = DWORD($40017);
- {$EXTERNALSYM WBEM_S_SOURCE_NOT_AVAILABLE}
- WBEM_E_FAILED = DWORD($80041001);
- {$EXTERNALSYM WBEM_E_FAILED}
- WBEM_E_NOT_FOUND = DWORD($80041002);
- {$EXTERNALSYM WBEM_E_NOT_FOUND}
- WBEM_E_ACCESS_DENIED = DWORD($80041003);
- {$EXTERNALSYM WBEM_E_ACCESS_DENIED}
- WBEM_E_PROVIDER_FAILURE = DWORD($80041004);
- {$EXTERNALSYM WBEM_E_PROVIDER_FAILURE}
- WBEM_E_TYPE_MISMATCH = DWORD($80041005);
- {$EXTERNALSYM WBEM_E_TYPE_MISMATCH}
- WBEM_E_OUT_OF_MEMORY = DWORD($80041006);
- {$EXTERNALSYM WBEM_E_OUT_OF_MEMORY}
- WBEM_E_INVALID_CONTEXT = DWORD($80041007);
- {$EXTERNALSYM WBEM_E_INVALID_CONTEXT}
- WBEM_E_INVALID_PARAMETER = DWORD($80041008);
- {$EXTERNALSYM WBEM_E_INVALID_PARAMETER}
- WBEM_E_NOT_AVAILABLE = DWORD($80041009);
- {$EXTERNALSYM WBEM_E_NOT_AVAILABLE}
- WBEM_E_CRITICAL_ERROR = DWORD($8004100a);
- {$EXTERNALSYM WBEM_E_CRITICAL_ERROR}
- WBEM_E_INVALID_STREAM = DWORD($8004100b);
- {$EXTERNALSYM WBEM_E_INVALID_STREAM}
- WBEM_E_NOT_SUPPORTED = DWORD($8004100c);
- {$EXTERNALSYM WBEM_E_NOT_SUPPORTED}
- WBEM_E_INVALID_SUPERCLASS = DWORD($8004100d);
- {$EXTERNALSYM WBEM_E_INVALID_SUPERCLASS}
- WBEM_E_INVALID_NAMESPACE = DWORD($8004100e);
- {$EXTERNALSYM WBEM_E_INVALID_NAMESPACE}
- WBEM_E_INVALID_OBJECT = DWORD($8004100f);
- {$EXTERNALSYM WBEM_E_INVALID_OBJECT}
- WBEM_E_INVALID_CLASS = DWORD($80041010);
- {$EXTERNALSYM WBEM_E_INVALID_CLASS}
- WBEM_E_PROVIDER_NOT_FOUND = DWORD($80041011);
- {$EXTERNALSYM WBEM_E_PROVIDER_NOT_FOUND}
- WBEM_E_INVALID_PROVIDER_REGISTRATION = DWORD($80041012);
- {$EXTERNALSYM WBEM_E_INVALID_PROVIDER_REGISTRATION}
- WBEM_E_PROVIDER_LOAD_FAILURE = DWORD($80041013);
- {$EXTERNALSYM WBEM_E_PROVIDER_LOAD_FAILURE}
- WBEM_E_INITIALIZATION_FAILURE = DWORD($80041014);
- {$EXTERNALSYM WBEM_E_INITIALIZATION_FAILURE}
- WBEM_E_TRANSPORT_FAILURE = DWORD($80041015);
- {$EXTERNALSYM WBEM_E_TRANSPORT_FAILURE}
- WBEM_E_INVALID_OPERATION = DWORD($80041016);
- {$EXTERNALSYM WBEM_E_INVALID_OPERATION}
- WBEM_E_INVALID_QUERY = DWORD($80041017);
- {$EXTERNALSYM WBEM_E_INVALID_QUERY}
- WBEM_E_INVALID_QUERY_TYPE = DWORD($80041018);
- {$EXTERNALSYM WBEM_E_INVALID_QUERY_TYPE}
- WBEM_E_ALREADY_EXISTS = DWORD($80041019);
- {$EXTERNALSYM WBEM_E_ALREADY_EXISTS}
- WBEM_E_OVERRIDE_NOT_ALLOWED = DWORD($8004101a);
- {$EXTERNALSYM WBEM_E_OVERRIDE_NOT_ALLOWED}
- WBEM_E_PROPAGATED_QUALIFIER = DWORD($8004101b);
- {$EXTERNALSYM WBEM_E_PROPAGATED_QUALIFIER}
- WBEM_E_PROPAGATED_PROPERTY = DWORD($8004101c);
- {$EXTERNALSYM WBEM_E_PROPAGATED_PROPERTY}
- WBEM_E_UNEXPECTED = DWORD($8004101d);
- {$EXTERNALSYM WBEM_E_UNEXPECTED}
- WBEM_E_ILLEGAL_OPERATION = DWORD($8004101e);
- {$EXTERNALSYM WBEM_E_ILLEGAL_OPERATION}
- WBEM_E_CANNOT_BE_KEY = DWORD($8004101f);
- {$EXTERNALSYM WBEM_E_CANNOT_BE_KEY}
- WBEM_E_INCOMPLETE_CLASS = DWORD($80041020);
- {$EXTERNALSYM WBEM_E_INCOMPLETE_CLASS}
- WBEM_E_INVALID_SYNTAX = DWORD($80041021);
- {$EXTERNALSYM WBEM_E_INVALID_SYNTAX}
- WBEM_E_NONDECORATED_OBJECT = DWORD($80041022);
- {$EXTERNALSYM WBEM_E_NONDECORATED_OBJECT}
- WBEM_E_READ_ONLY = DWORD($80041023);
- {$EXTERNALSYM WBEM_E_READ_ONLY}
- WBEM_E_PROVIDER_NOT_CAPABLE = DWORD($80041024);
- {$EXTERNALSYM WBEM_E_PROVIDER_NOT_CAPABLE}
- WBEM_E_CLASS_HAS_CHILDREN = DWORD($80041025);
- {$EXTERNALSYM WBEM_E_CLASS_HAS_CHILDREN}
- WBEM_E_CLASS_HAS_INSTANCES = DWORD($80041026);
- {$EXTERNALSYM WBEM_E_CLASS_HAS_INSTANCES}
- WBEM_E_QUERY_NOT_IMPLEMENTED = DWORD($80041027);
- {$EXTERNALSYM WBEM_E_QUERY_NOT_IMPLEMENTED}
- WBEM_E_ILLEGAL_NULL = DWORD($80041028);
- {$EXTERNALSYM WBEM_E_ILLEGAL_NULL}
- WBEM_E_INVALID_QUALIFIER_TYPE = DWORD($80041029);
- {$EXTERNALSYM WBEM_E_INVALID_QUALIFIER_TYPE}
- WBEM_E_INVALID_PROPERTY_TYPE = DWORD($8004102a);
- {$EXTERNALSYM WBEM_E_INVALID_PROPERTY_TYPE}
- WBEM_E_VALUE_OUT_OF_RANGE = DWORD($8004102b);
- {$EXTERNALSYM WBEM_E_VALUE_OUT_OF_RANGE}
- WBEM_E_CANNOT_BE_SINGLETON = DWORD($8004102c);
- {$EXTERNALSYM WBEM_E_CANNOT_BE_SINGLETON}
- WBEM_E_INVALID_CIM_TYPE = DWORD($8004102d);
- {$EXTERNALSYM WBEM_E_INVALID_CIM_TYPE}
- WBEM_E_INVALID_METHOD = DWORD($8004102e);
- {$EXTERNALSYM WBEM_E_INVALID_METHOD}
- WBEM_E_INVALID_METHOD_PARAMETERS = DWORD($8004102f);
- {$EXTERNALSYM WBEM_E_INVALID_METHOD_PARAMETERS}
- WBEM_E_SYSTEM_PROPERTY = DWORD($80041030);
- {$EXTERNALSYM WBEM_E_SYSTEM_PROPERTY}
- WBEM_E_INVALID_PROPERTY = DWORD($80041031);
- {$EXTERNALSYM WBEM_E_INVALID_PROPERTY}
- WBEM_E_CALL_CANCELLED = DWORD($80041032);
- {$EXTERNALSYM WBEM_E_CALL_CANCELLED}
- WBEM_E_SHUTTING_DOWN = DWORD($80041033);
- {$EXTERNALSYM WBEM_E_SHUTTING_DOWN}
- WBEM_E_PROPAGATED_METHOD = DWORD($80041034);
- {$EXTERNALSYM WBEM_E_PROPAGATED_METHOD}
- WBEM_E_UNSUPPORTED_PARAMETER = DWORD($80041035);
- {$EXTERNALSYM WBEM_E_UNSUPPORTED_PARAMETER}
- WBEM_E_MISSING_PARAMETER_ID = DWORD($80041036);
- {$EXTERNALSYM WBEM_E_MISSING_PARAMETER_ID}
- WBEM_E_INVALID_PARAMETER_ID = DWORD($80041037);
- {$EXTERNALSYM WBEM_E_INVALID_PARAMETER_ID}
- WBEM_E_NONCONSECUTIVE_PARAMETER_IDS = DWORD($80041038);
- {$EXTERNALSYM WBEM_E_NONCONSECUTIVE_PARAMETER_IDS}
- WBEM_E_PARAMETER_ID_ON_RETVAL = DWORD($80041039);
- {$EXTERNALSYM WBEM_E_PARAMETER_ID_ON_RETVAL}
- WBEM_E_INVALID_OBJECT_PATH = DWORD($8004103a);
- {$EXTERNALSYM WBEM_E_INVALID_OBJECT_PATH}
- WBEM_E_OUT_OF_DISK_SPACE = DWORD($8004103b);
- {$EXTERNALSYM WBEM_E_OUT_OF_DISK_SPACE}
- WBEM_E_BUFFER_TOO_SMALL = DWORD($8004103c);
- {$EXTERNALSYM WBEM_E_BUFFER_TOO_SMALL}
- WBEM_E_UNSUPPORTED_PUT_EXTENSION = DWORD($8004103d);
- {$EXTERNALSYM WBEM_E_UNSUPPORTED_PUT_EXTENSION}
- WBEM_E_UNKNOWN_OBJECT_TYPE = DWORD($8004103e);
- {$EXTERNALSYM WBEM_E_UNKNOWN_OBJECT_TYPE}
- WBEM_E_UNKNOWN_PACKET_TYPE = DWORD($8004103f);
- {$EXTERNALSYM WBEM_E_UNKNOWN_PACKET_TYPE}
- WBEM_E_MARSHAL_VERSION_MISMATCH = DWORD($80041040);
- {$EXTERNALSYM WBEM_E_MARSHAL_VERSION_MISMATCH}
- WBEM_E_MARSHAL_INVALID_SIGNATURE = DWORD($80041041);
- {$EXTERNALSYM WBEM_E_MARSHAL_INVALID_SIGNATURE}
- WBEM_E_INVALID_QUALIFIER = DWORD($80041042);
- {$EXTERNALSYM WBEM_E_INVALID_QUALIFIER}
- WBEM_E_INVALID_DUPLICATE_PARAMETER = DWORD($80041043);
- {$EXTERNALSYM WBEM_E_INVALID_DUPLICATE_PARAMETER}
- WBEM_E_TOO_MUCH_DATA = DWORD($80041044);
- {$EXTERNALSYM WBEM_E_TOO_MUCH_DATA}
- WBEM_E_SERVER_TOO_BUSY = DWORD($80041045);
- {$EXTERNALSYM WBEM_E_SERVER_TOO_BUSY}
- WBEM_E_INVALID_FLAVOR = DWORD($80041046);
- {$EXTERNALSYM WBEM_E_INVALID_FLAVOR}
- WBEM_E_CIRCULAR_REFERENCE = DWORD($80041047);
- {$EXTERNALSYM WBEM_E_CIRCULAR_REFERENCE}
- WBEM_E_UNSUPPORTED_CLASS_UPDATE = DWORD($80041048);
- {$EXTERNALSYM WBEM_E_UNSUPPORTED_CLASS_UPDATE}
- WBEM_E_CANNOT_CHANGE_KEY_INHERITANCE = DWORD($80041049);
- {$EXTERNALSYM WBEM_E_CANNOT_CHANGE_KEY_INHERITANCE}
- WBEM_E_CANNOT_CHANGE_INDEX_INHERITANCE = DWORD($80041050);
- {$EXTERNALSYM WBEM_E_CANNOT_CHANGE_INDEX_INHERITANCE}
- WBEM_E_TOO_MANY_PROPERTIES = DWORD($80041051);
- {$EXTERNALSYM WBEM_E_TOO_MANY_PROPERTIES}
- WBEM_E_UPDATE_TYPE_MISMATCH = DWORD($80041052);
- {$EXTERNALSYM WBEM_E_UPDATE_TYPE_MISMATCH}
- WBEM_E_UPDATE_OVERRIDE_NOT_ALLOWED = DWORD($80041053);
- {$EXTERNALSYM WBEM_E_UPDATE_OVERRIDE_NOT_ALLOWED}
- WBEM_E_UPDATE_PROPAGATED_METHOD = DWORD($80041054);
- {$EXTERNALSYM WBEM_E_UPDATE_PROPAGATED_METHOD}
- WBEM_E_METHOD_NOT_IMPLEMENTED = DWORD($80041055);
- {$EXTERNALSYM WBEM_E_METHOD_NOT_IMPLEMENTED}
- WBEM_E_METHOD_DISABLED = DWORD($80041056);
- {$EXTERNALSYM WBEM_E_METHOD_DISABLED}
- WBEM_E_REFRESHER_BUSY = DWORD($80041057);
- {$EXTERNALSYM WBEM_E_REFRESHER_BUSY}
- WBEM_E_UNPARSABLE_QUERY = DWORD($80041058);
- {$EXTERNALSYM WBEM_E_UNPARSABLE_QUERY}
- WBEM_E_NOT_EVENT_CLASS = DWORD($80041059);
- {$EXTERNALSYM WBEM_E_NOT_EVENT_CLASS}
- WBEM_E_MISSING_GROUP_WITHIN = DWORD($8004105a);
- {$EXTERNALSYM WBEM_E_MISSING_GROUP_WITHIN}
- WBEM_E_MISSING_AGGREGATION_LIST = DWORD($8004105b);
- {$EXTERNALSYM WBEM_E_MISSING_AGGREGATION_LIST}
- WBEM_E_PROPERTY_NOT_AN_OBJECT = DWORD($8004105c);
- {$EXTERNALSYM WBEM_E_PROPERTY_NOT_AN_OBJECT}
- WBEM_E_AGGREGATING_BY_OBJECT = DWORD($8004105d);
- {$EXTERNALSYM WBEM_E_AGGREGATING_BY_OBJECT}
- WBEM_E_UNINTERPRETABLE_PROVIDER_QUERY = DWORD($8004105f);
- {$EXTERNALSYM WBEM_E_UNINTERPRETABLE_PROVIDER_QUERY}
- WBEM_E_BACKUP_RESTORE_WINMGMT_RUNNING = DWORD($80041060);
- {$EXTERNALSYM WBEM_E_BACKUP_RESTORE_WINMGMT_RUNNING}
- WBEM_E_QUEUE_OVERFLOW = DWORD($80041061);
- {$EXTERNALSYM WBEM_E_QUEUE_OVERFLOW}
- WBEM_E_PRIVILEGE_NOT_HELD = DWORD($80041062);
- {$EXTERNALSYM WBEM_E_PRIVILEGE_NOT_HELD}
- WBEM_E_INVALID_OPERATOR = DWORD($80041063);
- {$EXTERNALSYM WBEM_E_INVALID_OPERATOR}
- WBEM_E_LOCAL_CREDENTIALS = DWORD($80041064);
- {$EXTERNALSYM WBEM_E_LOCAL_CREDENTIALS}
- WBEM_E_CANNOT_BE_ABSTRACT = DWORD($80041065);
- {$EXTERNALSYM WBEM_E_CANNOT_BE_ABSTRACT}
- WBEM_E_AMENDED_OBJECT = DWORD($80041066);
- {$EXTERNALSYM WBEM_E_AMENDED_OBJECT}
- WBEM_E_CLIENT_TOO_SLOW = DWORD($80041067);
- {$EXTERNALSYM WBEM_E_CLIENT_TOO_SLOW}
- WBEM_E_NULL_SECURITY_DESCRIPTOR = DWORD($80041068);
- {$EXTERNALSYM WBEM_E_NULL_SECURITY_DESCRIPTOR}
- WBEM_E_TIMED_OUT = DWORD($80041069);
- {$EXTERNALSYM WBEM_E_TIMED_OUT}
- WBEM_E_INVALID_ASSOCIATION = DWORD($8004106a);
- {$EXTERNALSYM WBEM_E_INVALID_ASSOCIATION}
- WBEM_E_AMBIGUOUS_OPERATION = DWORD($8004106b);
- {$EXTERNALSYM WBEM_E_AMBIGUOUS_OPERATION}
- WBEM_E_QUOTA_VIOLATION = DWORD($8004106c);
- {$EXTERNALSYM WBEM_E_QUOTA_VIOLATION}
- WBEM_E_RESERVED_001 = DWORD($8004106d);
- {$EXTERNALSYM WBEM_E_RESERVED_001}
- WBEM_E_RESERVED_002 = DWORD($8004106e);
- {$EXTERNALSYM WBEM_E_RESERVED_002}
- WBEM_E_UNSUPPORTED_LOCALE = DWORD($8004106f);
- {$EXTERNALSYM WBEM_E_UNSUPPORTED_LOCALE}
- WBEM_E_HANDLE_OUT_OF_DATE = DWORD($80041070);
- {$EXTERNALSYM WBEM_E_HANDLE_OUT_OF_DATE}
- WBEM_E_CONNECTION_FAILED = DWORD($80041071);
- {$EXTERNALSYM WBEM_E_CONNECTION_FAILED}
- WBEM_E_INVALID_HANDLE_REQUEST = DWORD($80041072);
- {$EXTERNALSYM WBEM_E_INVALID_HANDLE_REQUEST}
- WBEM_E_PROPERTY_NAME_TOO_WIDE = DWORD($80041073);
- {$EXTERNALSYM WBEM_E_PROPERTY_NAME_TOO_WIDE}
- WBEM_E_CLASS_NAME_TOO_WIDE = DWORD($80041074);
- {$EXTERNALSYM WBEM_E_CLASS_NAME_TOO_WIDE}
- WBEM_E_METHOD_NAME_TOO_WIDE = DWORD($80041075);
- {$EXTERNALSYM WBEM_E_METHOD_NAME_TOO_WIDE}
- WBEM_E_QUALIFIER_NAME_TOO_WIDE = DWORD($80041076);
- {$EXTERNALSYM WBEM_E_QUALIFIER_NAME_TOO_WIDE}
- WBEM_E_RERUN_COMMAND = DWORD($80041077);
- {$EXTERNALSYM WBEM_E_RERUN_COMMAND}
- WBEM_E_DATABASE_VER_MISMATCH = DWORD($80041078);
- {$EXTERNALSYM WBEM_E_DATABASE_VER_MISMATCH}
- WBEM_E_VETO_DELETE = DWORD($80041079);
- {$EXTERNALSYM WBEM_E_VETO_DELETE}
- WBEM_E_VETO_PUT = DWORD($8004107a);
- {$EXTERNALSYM WBEM_E_VETO_PUT}
- WBEM_E_INVALID_LOCALE = DWORD($80041080);
- {$EXTERNALSYM WBEM_E_INVALID_LOCALE}
- WBEM_E_PROVIDER_SUSPENDED = DWORD($80041081);
- {$EXTERNALSYM WBEM_E_PROVIDER_SUSPENDED}
- WBEM_E_SYNCHRONIZATION_REQUIRED = DWORD($80041082);
- {$EXTERNALSYM WBEM_E_SYNCHRONIZATION_REQUIRED}
- WBEM_E_NO_SCHEMA = DWORD($80041083);
- {$EXTERNALSYM WBEM_E_NO_SCHEMA}
- WBEM_E_PROVIDER_ALREADY_REGISTERED = DWORD($80041084);
- {$EXTERNALSYM WBEM_E_PROVIDER_ALREADY_REGISTERED}
- WBEM_E_PROVIDER_NOT_REGISTERED = DWORD($80041085);
- {$EXTERNALSYM WBEM_E_PROVIDER_NOT_REGISTERED}
- WBEM_E_FATAL_TRANSPORT_ERROR = DWORD($80041086);
- {$EXTERNALSYM WBEM_E_FATAL_TRANSPORT_ERROR}
- WBEM_E_ENCRYPTED_CONNECTION_REQUIRED = DWORD($80041087);
- {$EXTERNALSYM WBEM_E_ENCRYPTED_CONNECTION_REQUIRED}
- WBEM_E_PROVIDER_TIMED_OUT = DWORD($80041088);
- {$EXTERNALSYM WBEM_E_PROVIDER_TIMED_OUT}
- WBEM_E_NO_KEY = DWORD($80041089);
- {$EXTERNALSYM WBEM_E_NO_KEY}
- WBEM_E_PROVIDER_DISABLED = DWORD($8004108a);
- {$EXTERNALSYM WBEM_E_PROVIDER_DISABLED}
- WBEMESS_E_REGISTRATION_TOO_BROAD = DWORD($80042001);
- {$EXTERNALSYM WBEMESS_E_REGISTRATION_TOO_BROAD}
- WBEMESS_E_REGISTRATION_TOO_PRECISE = DWORD($80042002);
- {$EXTERNALSYM WBEMESS_E_REGISTRATION_TOO_PRECISE}
- WBEMMOF_E_EXPECTED_QUALIFIER_NAME = DWORD($80044001);
- {$EXTERNALSYM WBEMMOF_E_EXPECTED_QUALIFIER_NAME}
- WBEMMOF_E_EXPECTED_SEMI = DWORD($80044002);
- {$EXTERNALSYM WBEMMOF_E_EXPECTED_SEMI}
- WBEMMOF_E_EXPECTED_OPEN_BRACE = DWORD($80044003);
- {$EXTERNALSYM WBEMMOF_E_EXPECTED_OPEN_BRACE}
- WBEMMOF_E_EXPECTED_CLOSE_BRACE = DWORD($80044004);
- {$EXTERNALSYM WBEMMOF_E_EXPECTED_CLOSE_BRACE}
- WBEMMOF_E_EXPECTED_CLOSE_BRACKET = DWORD($80044005);
- {$EXTERNALSYM WBEMMOF_E_EXPECTED_CLOSE_BRACKET}
- WBEMMOF_E_EXPECTED_CLOSE_PAREN = DWORD($80044006);
- {$EXTERNALSYM WBEMMOF_E_EXPECTED_CLOSE_PAREN}
- WBEMMOF_E_ILLEGAL_CONSTANT_VALUE = DWORD($80044007);
- {$EXTERNALSYM WBEMMOF_E_ILLEGAL_CONSTANT_VALUE}
- WBEMMOF_E_EXPECTED_TYPE_IDENTIFIER = DWORD($80044008);
- {$EXTERNALSYM WBEMMOF_E_EXPECTED_TYPE_IDENTIFIER}
- WBEMMOF_E_EXPECTED_OPEN_PAREN = DWORD($80044009);
- {$EXTERNALSYM WBEMMOF_E_EXPECTED_OPEN_PAREN}
- WBEMMOF_E_UNRECOGNIZED_TOKEN = DWORD($8004400a);
- {$EXTERNALSYM WBEMMOF_E_UNRECOGNIZED_TOKEN}
- WBEMMOF_E_UNRECOGNIZED_TYPE = DWORD($8004400b);
- {$EXTERNALSYM WBEMMOF_E_UNRECOGNIZED_TYPE}
- WBEMMOF_E_EXPECTED_PROPERTY_NAME = DWORD($8004400c);
- {$EXTERNALSYM WBEMMOF_E_EXPECTED_PROPERTY_NAME}
- WBEMMOF_E_TYPEDEF_NOT_SUPPORTED = DWORD($8004400d);
- {$EXTERNALSYM WBEMMOF_E_TYPEDEF_NOT_SUPPORTED}
- WBEMMOF_E_UNEXPECTED_ALIAS = DWORD($8004400e);
- {$EXTERNALSYM WBEMMOF_E_UNEXPECTED_ALIAS}
- WBEMMOF_E_UNEXPECTED_ARRAY_INIT = DWORD($8004400f);
- {$EXTERNALSYM WBEMMOF_E_UNEXPECTED_ARRAY_INIT}
- WBEMMOF_E_INVALID_AMENDMENT_SYNTAX = DWORD($80044010);
- {$EXTERNALSYM WBEMMOF_E_INVALID_AMENDMENT_SYNTAX}
- WBEMMOF_E_INVALID_DUPLICATE_AMENDMENT = DWORD($80044011);
- {$EXTERNALSYM WBEMMOF_E_INVALID_DUPLICATE_AMENDMENT}
- WBEMMOF_E_INVALID_PRAGMA = DWORD($80044012);
- {$EXTERNALSYM WBEMMOF_E_INVALID_PRAGMA}
- WBEMMOF_E_INVALID_NAMESPACE_SYNTAX = DWORD($80044013);
- {$EXTERNALSYM WBEMMOF_E_INVALID_NAMESPACE_SYNTAX}
- WBEMMOF_E_EXPECTED_CLASS_NAME = DWORD($80044014);
- {$EXTERNALSYM WBEMMOF_E_EXPECTED_CLASS_NAME}
- WBEMMOF_E_TYPE_MISMATCH = DWORD($80044015);
- {$EXTERNALSYM WBEMMOF_E_TYPE_MISMATCH}
- WBEMMOF_E_EXPECTED_ALIAS_NAME = DWORD($80044016);
- {$EXTERNALSYM WBEMMOF_E_EXPECTED_ALIAS_NAME}
- WBEMMOF_E_INVALID_CLASS_DECLARATION = DWORD($80044017);
- {$EXTERNALSYM WBEMMOF_E_INVALID_CLASS_DECLARATION}
- WBEMMOF_E_INVALID_INSTANCE_DECLARATION = DWORD($80044018);
- {$EXTERNALSYM WBEMMOF_E_INVALID_INSTANCE_DECLARATION}
- WBEMMOF_E_EXPECTED_DOLLAR = DWORD($80044019);
- {$EXTERNALSYM WBEMMOF_E_EXPECTED_DOLLAR}
- WBEMMOF_E_CIMTYPE_QUALIFIER = DWORD($8004401a);
- {$EXTERNALSYM WBEMMOF_E_CIMTYPE_QUALIFIER}
- WBEMMOF_E_DUPLICATE_PROPERTY = DWORD($8004401b);
- {$EXTERNALSYM WBEMMOF_E_DUPLICATE_PROPERTY}
- WBEMMOF_E_INVALID_NAMESPACE_SPECIFICATION = DWORD($8004401c);
- {$EXTERNALSYM WBEMMOF_E_INVALID_NAMESPACE_SPECIFICATION}
- WBEMMOF_E_OUT_OF_RANGE = DWORD($8004401d);
- {$EXTERNALSYM WBEMMOF_E_OUT_OF_RANGE}
- WBEMMOF_E_INVALID_FILE = DWORD($8004401e);
- {$EXTERNALSYM WBEMMOF_E_INVALID_FILE}
- WBEMMOF_E_ALIASES_IN_EMBEDDED = DWORD($8004401f);
- {$EXTERNALSYM WBEMMOF_E_ALIASES_IN_EMBEDDED}
- WBEMMOF_E_NULL_ARRAY_ELEM = DWORD($80044020);
- {$EXTERNALSYM WBEMMOF_E_NULL_ARRAY_ELEM}
- WBEMMOF_E_DUPLICATE_QUALIFIER = DWORD($80044021);
- {$EXTERNALSYM WBEMMOF_E_DUPLICATE_QUALIFIER}
- WBEMMOF_E_EXPECTED_FLAVOR_TYPE = DWORD($80044022);
- {$EXTERNALSYM WBEMMOF_E_EXPECTED_FLAVOR_TYPE}
- WBEMMOF_E_INCOMPATIBLE_FLAVOR_TYPES = DWORD($80044023);
- {$EXTERNALSYM WBEMMOF_E_INCOMPATIBLE_FLAVOR_TYPES}
- WBEMMOF_E_MULTIPLE_ALIASES = DWORD($80044024);
- {$EXTERNALSYM WBEMMOF_E_MULTIPLE_ALIASES}
- WBEMMOF_E_INCOMPATIBLE_FLAVOR_TYPES2 = DWORD($80044025);
- {$EXTERNALSYM WBEMMOF_E_INCOMPATIBLE_FLAVOR_TYPES2}
- WBEMMOF_E_NO_ARRAYS_RETURNED = DWORD($80044026);
- {$EXTERNALSYM WBEMMOF_E_NO_ARRAYS_RETURNED}
- WBEMMOF_E_MUST_BE_IN_OR_OUT = DWORD($80044027);
- {$EXTERNALSYM WBEMMOF_E_MUST_BE_IN_OR_OUT}
- WBEMMOF_E_INVALID_FLAGS_SYNTAX = DWORD($80044028);
- {$EXTERNALSYM WBEMMOF_E_INVALID_FLAGS_SYNTAX}
- WBEMMOF_E_EXPECTED_BRACE_OR_BAD_TYPE = DWORD($80044029);
- {$EXTERNALSYM WBEMMOF_E_EXPECTED_BRACE_OR_BAD_TYPE}
- WBEMMOF_E_UNSUPPORTED_CIMV22_QUAL_VALUE = DWORD($8004402a);
- {$EXTERNALSYM WBEMMOF_E_UNSUPPORTED_CIMV22_QUAL_VALUE}
- WBEMMOF_E_UNSUPPORTED_CIMV22_DATA_TYPE = DWORD($8004402b);
- {$EXTERNALSYM WBEMMOF_E_UNSUPPORTED_CIMV22_DATA_TYPE}
- WBEMMOF_E_INVALID_DELETEINSTANCE_SYNTAX = DWORD($8004402c);
- {$EXTERNALSYM WBEMMOF_E_INVALID_DELETEINSTANCE_SYNTAX}
- WBEMMOF_E_INVALID_QUALIFIER_SYNTAX = DWORD($8004402d);
- {$EXTERNALSYM WBEMMOF_E_INVALID_QUALIFIER_SYNTAX}
- WBEMMOF_E_QUALIFIER_USED_OUTSIDE_SCOPE = DWORD($8004402e);
- {$EXTERNALSYM WBEMMOF_E_QUALIFIER_USED_OUTSIDE_SCOPE}
- WBEMMOF_E_ERROR_CREATING_TEMP_FILE = DWORD($8004402f);
- {$EXTERNALSYM WBEMMOF_E_ERROR_CREATING_TEMP_FILE}
- WBEMMOF_E_ERROR_INVALID_INCLUDE_FILE = DWORD($80044030);
- {$EXTERNALSYM WBEMMOF_E_ERROR_INVALID_INCLUDE_FILE}
- WBEMMOF_E_INVALID_DELETECLASS_SYNTAX = DWORD($80044031);
- {$EXTERNALSYM WBEMMOF_E_INVALID_DELETECLASS_SYNTAX}
-
-//const
-//EXTERN_C const IID LIBID_WbemClient_v1;
-
-const
- IID_IWbemClassObject: TGUID = '{dc12a681-737f-11cf-884d-00aa004b2e24}';
- {$EXTERNALSYM IID_IWbemClassObject}
- IID_IWbemObjectAccess: TGUID = '{49353c9a-516b-11d1-aea6-00c04fb68820}';
- {$EXTERNALSYM IID_IWbemObjectAccess}
- IID_IWbemQualifierSet: TGUID = '{dc12a680-737f-11cf-884d-00aa004b2e24}';
- {$EXTERNALSYM IID_IWbemQualifierSet}
- IID_IWbemServices: TGUID = '{9556dc99-828c-11cf-a37e-00aa003240c7}';
- {$EXTERNALSYM IID_IWbemServices}
- IID_IWbemLocator: TGUID = '{dc12a687-737f-11cf-884d-00aa004b2e24}';
- {$EXTERNALSYM IID_IWbemLocator}
- IID_IWbemObjectSink: TGUID = '{7c857801-7381-11cf-884d-00aa004b2e24}';
- {$EXTERNALSYM IID_IWbemObjectSink}
- IID_IEnumWbemClassObject: TGUID = '{027947e1-d731-11ce-a357-000000000001}';
- {$EXTERNALSYM IID_IEnumWbemClassObject}
- IID_IWbemCallResult: TGUID = '{44aca675-e8fc-11d0-a07c-00c04fb68820}';
- {$EXTERNALSYM IID_IWbemCallResult}
- IID_IWbemContext: TGUID = '{44aca674-e8fc-11d0-a07c-00c04fb68820}';
- {$EXTERNALSYM IID_IWbemContext}
- IID_IUnsecuredApartment: TGUID = '{1cfaba8c-1523-11d1-ad79-00c04fd8fdff}';
- {$EXTERNALSYM IID_IUnsecuredApartment}
- IID_IWbemUnsecuredApartment: TGUID = '{31739d04-3471-4cf4-9a7c-57a44ae71956}';
- {$EXTERNALSYM IID_IWbemUnsecuredApartment}
- IID_IWbemStatusCodeText: TGUID = '{eb87e1bc-3233-11d2-aec9-00c04fb68820}';
- {$EXTERNALSYM IID_IWbemStatusCodeText}
- IID_IWbemBackupRestore: TGUID = '{C49E32C7-BC8B-11d2-85D4-00105A1F8304}';
- {$EXTERNALSYM IID_IWbemBackupRestore}
- IID_IWbemBackupRestoreEx: TGUID = '{A359DEC5-E813-4834-8A2A-BA7F1D777D76}';
- {$EXTERNALSYM IID_IWbemBackupRestoreEx}
- IID_IWbemRefresher: TGUID = '{49353c99-516b-11d1-aea6-00c04fb68820}';
- {$EXTERNALSYM IID_IWbemRefresher}
- IID_IWbemHiPerfEnum: TGUID = '{2705C288-79AE-11d2-B348-00105A1F8177}';
- {$EXTERNALSYM IID_IWbemHiPerfEnum}
- IID_IWbemConfigureRefresher: TGUID = '{49353c92-516b-11d1-aea6-00c04fb68820}';
- {$EXTERNALSYM IID_IWbemConfigureRefresher}
-
-type
- // forward declarations
-
- IWbemQualifierSet = interface;
- IWbemContext = interface;
- IWbemCallResult = interface;
- IWbemObjectSink = interface;
- IEnumWbemClassObject = interface;
-
- IWbemClassObject = interface(IUnknown)
- ['{dc12a681-737f-11cf-884d-00aa004b2e24}']
- function GetQualifierSet(out ppQualSet: IWbemQualifierSet): HRESULT; stdcall;
- function Get(wszName: LPCWSTR; lFlags: Longint; var pVal: OleVariant; var pType: CIMTYPE; var plFlavor: Longint): HRESULT; stdcall;
- function Put(wszName: LPCWSTR; lFlags: Longint; pVal: POleVariant; Type_: CIMTYPE): HRESULT; stdcall;
- function Delete(wszName: LPCWSTR): HRESULT; stdcall;
- function GetNames(wszQualifierName: LPCWSTR; lFlags: Longint; pQualifierVal: POleVariant; out pNames: PSafeArray): HRESULT; stdcall;
- function BeginEnumeration(lEnumFlags: Longint): HRESULT; stdcall;
- function Next(lFlags: Longint; var strName: WideString; var pVal: OleVariant; var pType: CIMTYPE; var plFlavor: Longint): HRESULT; stdcall;
- function EndEnumeration: HRESULT; stdcall;
- function GetPropertyQualifierSet(wszProperty: LPCWSTR; out ppQualSet: IWbemQualifierSet): HRESULT; stdcall;
- function Clone(out ppCopy: IWbemClassObject): HRESULT; stdcall;
- function GetObjectText(lFlags: Longint; out pstrObjectText: WideString): HRESULT; stdcall;
- function SpawnDerivedClass(lFlags: Longint; out ppNewClass: IWbemClassObject): HRESULT; stdcall;
- function SpawnInstance(lFlags: Longint; out ppNewInstance: IWbemClassObject): HRESULT; stdcall;
- function CompareTo(lFlags: Longint; pCompareTo: IWbemClassObject): HRESULT; stdcall;
- function GetPropertyOrigin(wszName: LPCWSTR; out pstrClassName: WideString): HRESULT; stdcall;
- function InheritsFrom(strAncestor: LPCWSTR): HRESULT; stdcall;
- function GetMethod(wszName: LPCWSTR; lFlags: Longint; out ppInSignature, ppOutSignature: IWbemClassObject): HRESULT; stdcall;
- function PutMethod(wszName: LPCWSTR; lFlags: Longint; pInSignature, pOutSignature: IWbemClassObject): HRESULT; stdcall;
- function DeleteMethod(wszName: LPCWSTR): HRESULT; stdcall;
- function BeginMethodEnumeration(lEnumFlags: Longint): HRESULT; stdcall;
- function NextMethod(lFlags: Longint; var pstrName: WideString; var ppInSignature, ppOutSignature: IWbemClassObject): HRESULT; stdcall;
- function EndMethodEnumeration: HRESULT; stdcall;
- function GetMethodQualifierSet(wszMethod: LPCWSTR; out ppQualSet: IWbemQualifierSet): HRESULT; stdcall;
- function GetMethodOrigin(wszMethodName: LPCWSTR; out pstrClassName: WideString): HRESULT; stdcall;
- end;
- {$EXTERNALSYM IWbemClassObject}
-
- IWbemObjectAccess = interface(IWbemClassObject)
- ['{49353c9a-516b-11d1-aea6-00c04fb68820}']
- function GetPropertyHandle(wszPropertyName: LPCWSTR; out pType: CIMTYPE; out plHandle: Longint): HRESULT; stdcall;
- function WritePropertyValue(lHandle, lNumBytes: Longint; aData: LPBYTE): HRESULT; stdcall;
- function ReadPropertyValue(lHandle, lBufferSize: Longint; out plNumBytes: Longint; aData: LPBYTE): HRESULT; stdcall;
- function ReadDWORD(lHandle: Longint; out pdw: DWORD): HRESULT; stdcall;
- function WriteDWORD(lHandle: Longint; dw: DWORD): HRESULT; stdcall;
- function ReadQWORD(lHandle: Longint; out pqw: Int64): HRESULT; stdcall;
- function WriteQWORD(lHandle: Longint; pw: Int64): HRESULT; stdcall;
- function GetPropertyInfoByHandle(lHandle: Longint; out pstrName: WideString; out pType: CIMTYPE): HRESULT; stdcall;
- function Lock(lFlags: Longint): HRESULT; stdcall;
- function Unlock(lFlags: Longint): HRESULT; stdcall;
- end;
- {$EXTERNALSYM IWbemObjectAccess}
-
- IWbemQualifierSet = interface(IUnknown)
- ['{dc12a680-737f-11cf-884d-00aa004b2e24}']
- function Get(wszName: LPCWSTR; lFlags: Longint; var pVal: OleVariant; var plFlavor: Longint): HRESULT; stdcall;
- function Put(wszName: LPCWSTR; pVal: POleVariant; lFlavor: Longint): HRESULT; stdcall;
- function Delete(wszName: LPCWSTR): HRESULT; stdcall;
- function GetNames(lFlags: Longint; out pNames: PSafeArray): HRESULT; stdcall;
- function BeginEnumeration(lFlags: Longint): HRESULT; stdcall;
- function Next(lFlags: Longint; var pstrName: WideString; var pVal: OleVariant; var plFlavor: Longint): HRESULT; stdcall;
- function EndEnumeration: HRESULT; stdcall;
- end;
- {$EXTERNALSYM IWbemQualifierSet}
-
- IWbemServices = interface(IUnknown)
- ['{9556dc99-828c-11cf-a37e-00aa003240c7}']
- function OpenNamespace(strNamespace: WideString; lFlags: Longint; pCtx: IWbemContext; out ppWorkingNamespace: IWbemServices; out ppResult: IWbemCallResult): HRESULT; stdcall;
- function CancelAsyncCall(pSink: IWbemObjectSink): HRESULT; stdcall;
- function QueryObjectSink(lFlags: Longint; out ppResponseHandler: IWbemObjectSink): HRESULT; stdcall;
- function GetObject(strObjectPath: WideString; lFlags: Longint; pCtx: IWbemContext; out ppObject: IWbemClassObject; out ppCallResult: IWbemCallResult): HRESULT; stdcall;
- function GetObjectAsync(strObjectPath: WideString; lFlags: Longint; pCtx: IWbemContext; pResponseHandler: IWbemObjectSink): HRESULT; stdcall;
- function PutClass(pObject: IWbemClassObject; lFlags: Longint; pCtx: IWbemContext; out ppCallResult: IWbemCallResult): HRESULT; stdcall;
- function PutClassAsync(pObject: IWbemClassObject; lFlags: Longint; pCtx: IWbemContext; pResponseHandler: IWbemObjectSink): HRESULT; stdcall;
- function DeleteClass(strClass: WideString; lFlags: Longint; pCtx: IWbemContext; out ppCallResult: IWbemCallResult): HRESULT; stdcall;
- function DeleteClassAsync(strClass: WideString; lFlags: Longint; pCtx: IWbemContext; pResponseHandler: IWbemObjectSink): HRESULT; stdcall;
- function CreateClassEnum(strSuperclass: WideString; lFlags: Longint; pCtx: IWbemContext; out ppEnum: IEnumWbemClassObject): HRESULT; stdcall;
- function CreateClassEnumAsync(strSuperclass: WideString; lFlags: Longint; pCtx: IWbemContext; pResponseHandler: IWbemObjectSink): HRESULT; stdcall;
- function PutInstance(pInst: IWbemClassObject; lFlags: Longint; pCtx: IWbemContext; out ppCallResult: IWbemCallResult): HRESULT; stdcall;
- function PutInstanceAsync(pInst: IWbemClassObject; lFlags: Longint; pCtx: IWbemContext; pResponseHandler: IWbemObjectSink): HRESULT; stdcall;
- function DeleteInstance(strObjectPath: WideString; lFlags: Longint; pCtx: IWbemContext; out ppCallResult: IWbemCallResult): HRESULT; stdcall;
- function DeleteInstanceAsync(strObjectPath: WideString; lFlags: Longint; pCtx: IWbemContext; pResponseHandler: IWbemObjectSink): HRESULT; stdcall;
- function CreateInstanceEnum(strFilter: WideString; lFlags: Longint; pCtx: IWbemContext; out ppEnum: IEnumWbemClassObject): HRESULT; stdcall;
- function CreateInstanceEnumAsync(strFilter: WideString; lFlags: Longint; pCtx: IWbemContext; pResponseHandler: IWbemObjectSink): HRESULT; stdcall;
- function ExecQuery(strQueryLanguage, strQuery: WideString; lFlags: Longint; pCtx: IWbemContext; out ppEnum: IEnumWbemClassObject): HRESULT; stdcall;
- function ExecQueryAsync(strQueryLanguage, strQuery: WideString; lFlags: Longint; pCtx: IWbemContext; pResponseHandler: IWbemObjectSink): HRESULT; stdcall;
- function ExecNotificationQuery(strQueryLanguage, strQuery: WideString; lFlags: Longint; pCtx: IWbemContext; out ppEnum: IEnumWbemClassObject): HRESULT; stdcall;
- function ExecNotificationQueryAsync(strQueryLanguage, strQuery: WideString; lFlags: Longint; pCtx: IWbemContext; pResponseHandler: IWbemObjectSink): HRESULT; stdcall;
- function ExecMethod(strObjectPath, strMethodName: WideString; lFlags: Longint; pCtx: IWbemContext; pInParams: IWbemClassObject; out ppOutParams: IWbemClassObject; out ppCallResult: IWbemCallResult): HRESULT; stdcall;
- function ExecMethodAsync(strObjectPath, strMethodName: WideString; lFlags: Longint; pCtx: IWbemContext; pInParams: IWbemClassObject; pResponseHandler: IWbemObjectSink): HRESULT; stdcall;
- end;
- {$EXTERNALSYM IWbemServices}
-
- IWbemLocator = interface(IUnknown)
- ['{dc12a687-737f-11cf-884d-00aa004b2e24}']
- function ConnectServer(strNetworkResource, strUser, strPassword, strLocale: WideString; lSecurityFlags: Longint;
- strAuthority: WideString; pCtx: IWbemContext; out ppNamespace: IWbemServices): HRESULT; stdcall;
- end;
- {$EXTERNALSYM IWbemLocator}
-
- IWbemObjectSink = interface(IUnknown)
- ['{7c857801-7381-11cf-884d-00aa004b2e24}']
- function Indicate(lObjectCount: Longint; var apObjArray: IWbemClassObject{todo}): HRESULT; stdcall;
- function SetStatus(lFlags: Longint; hResult: HRESULT; strParam: WideString; pObjParam: IWbemClassObject): HRESULT; stdcall;
- end;
- {$EXTERNALSYM IWbemObjectSink}
-
- IEnumWbemClassObject = interface(IUnknown)
- ['{027947e1-d731-11ce-a357-000000000001}']
- function Reset: HRESULT; stdcall;
- function Next(lTimeout: Longint; uCount: ULONG; out apObjects: IWbemClassObject; out puReturned: ULONG): HRESULT; stdcall;
- function NextAsync(uCount: ULONG; pSink: IWbemObjectSink): HRESULT; stdcall;
- function Clone(out ppEnum: IEnumWbemClassObject): HRESULT; stdcall;
- function Skip(lTimeout: Longint; nCount: ULONG): HRESULT; stdcall;
- end;
- {$EXTERNALSYM IEnumWbemClassObject}
-
- IWbemCallResult = interface(IUnknown)
- ['{44aca675-e8fc-11d0-a07c-00c04fb68820}']
- function GetResultObject(lTimeout: Longint; out ppResultObject: IWbemClassObject): HRESULT; stdcall;
- function GetResultString(lTimeout: Longint; out pstrResultString: WideString): HRESULT; stdcall;
- function GetResultServices(lTimeout: Longint; out ppServices: IWbemServices): HRESULT; stdcall;
- function GetCallStatus(lTimeout: Longint; out plStatus: Longint): HRESULT; stdcall;
- end;
- {$EXTERNALSYM IWbemCallResult}
-
- IWbemContext = interface(IUnknown)
- ['{44aca674-e8fc-11d0-a07c-00c04fb68820}']
- function Clone(out ppNewCopy: IWbemContext): HRESULT; stdcall;
- function GetNames(lFlags: Longint; out pNames: PSafeArray): HRESULT; stdcall;
- function BeginEnumeration(lFlags: Longint): HRESULT; stdcall;
- function Next(lFlags: Longint; out pstrName: WideString; out pValue: OleVariant): HRESULT; stdcall;
- function EndEnumeration: HRESULT; stdcall;
- function SetValue(wszName: LPCWSTR; lFlags: Longint; pValue: POleVariant): HRESULT; stdcall;
- function GetValue(wszName: LPCWSTR; lFlags: Longint; out pValue: OleVariant): HRESULT; stdcall;
- function DeleteValue(wszName: LPCWSTR; lFlags: Longint): HRESULT; stdcall;
- function DeleteAll: HRESULT; stdcall;
- end;
- {$EXTERNALSYM IWbemContext}
-
- IUnsecuredApartment = interface(IUnknown)
- ['{1cfaba8c-1523-11d1-ad79-00c04fd8fdff}']
- function CreateObjectStub(pObject: IUnknown; out ppStub: IUnknown): HRESULT; stdcall;
- end;
- {$EXTERNALSYM IUnsecuredApartment}
-
- IWbemUnsecuredApartment = interface(IUnsecuredApartment)
- ['{31739d04-3471-4cf4-9a7c-57a44ae71956}']
- function CreateSinkStub(pSink: IWbemObjectSink; dwFlags: DWORD; wszReserved: LPCWSTR; out ppStub: IWbemObjectSink): HRESULT; stdcall;
- end;
- {$EXTERNALSYM IWbemUnsecuredApartment}
-
- IWbemStatusCodeText = interface(IUnknown)
- ['{eb87e1bc-3233-11d2-aec9-00c04fb68820}']
- function GetErrorCodeText(hRes: HRESULT; LocaleId: LCID; lFlags: Longint; out MessageText: WideString): HRESULT; stdcall;
- function GetFacilityCodeText(hRes: HRESULT; LocaleId: LCID; lFlags: Longint; out MessageText: WideString): HRESULT; stdcall;
- end;
- {$EXTERNALSYM IWbemStatusCodeText}
-
- IWbemBackupRestore = interface(IUnknown)
- ['{C49E32C7-BC8B-11d2-85D4-00105A1F8304}']
- function Backup(strBackupToFile: LPCWSTR; lFlags: Longint): HRESULT; stdcall;
- function Restore(strRestoreFromFile: LPCWSTR; lFlags: Longint): HRESULT; stdcall;
- end;
- {$EXTERNALSYM IWbemBackupRestore}
-
- IWbemBackupRestoreEx = interface(IWbemBackupRestore)
- ['{A359DEC5-E813-4834-8A2A-BA7F1D777D76}']
- function Pause: HRESULT; stdcall;
- function Resume: HRESULT; stdcall;
- end;
- {$EXTERNALSYM IWbemBackupRestoreEx}
-
- IWbemRefresher = interface(IUnknown)
- ['{49353c99-516b-11d1-aea6-00c04fb68820}']
- function Refresh(lFlags: Longint): HRESULT; stdcall;
- end;
- {$EXTERNALSYM IWbemRefresher}
-
- PIWbemObjectAccess = ^IWbemObjectAccess;
-
- PLongint = ^Longint; // TODO PLongint introduced in Delphi 6
-
- IWbemHiPerfEnum = interface(IUnknown)
- ['{2705C288-79AE-11d2-B348-00105A1F8177}']
- function AddObjects(lFlags: Longint; uNumObjects: ULONG; apIds: PLongint; apObj: PIWbemObjectAccess): HRESULT; stdcall;
- function RemoveObjects(lFlags: Longint; uNumObjects: ULONG; apIds: PLongint): HRESULT; stdcall;
- function GetObjects(lFlags: Longint; uNumObjects: ULONG; out apObj: IWbemObjectAccess; out puReturned: ULONG): HRESULT; stdcall;
- function RemoveAll(lFlags: Longint): HRESULT; stdcall;
- end;
- {$EXTERNALSYM IWbemHiPerfEnum}
-
- IWbemConfigureRefresher = interface(IUnknown)
- ['{49353c92-516b-11d1-aea6-00c04fb68820}']
- function AddObjectByPath(pNamespace: IWbemServices; wszPath: LPCWSTR; lFlags: Longint; pContext: IWbemContext; out ppRefreshable: IWbemClassObject; var plId: Longint): HRESULT; stdcall;
- function AddObjectByTemplate(pNamespace: IWbemServices; pTemplate: IWbemClassObject; lFlags: Longint; pContext: IWbemContext; out ppRefreshable: IWbemClassObject; var plId: Longint): HRESULT; stdcall;
- function AddRefresher(pRefresher: IWbemRefresher; lFlags: Longint; var plId: Longint): HRESULT; stdcall;
- function Remove(lId, lFlags: Longint): HRESULT; stdcall;
- function AddEnum(pNamespace: IWbemServices; wszClassName: LPCWSTR; lFlags: Longint; pContext: IWbemContext; out ppEnum: IWbemHiPerfEnum; var plId: Longint): HRESULT; stdcall;
- end;
- {$EXTERNALSYM IWbemConfigureRefresher}
-
-const
- CLSID_WbemLocator: TGUID = '{4590f811-1d3a-11d0-891f-00aa004b2e24}';
- {$EXTERNALSYM CLSID_WbemLocator}
- CLSID_WbemContext: TGUID = '{674B6698-EE92-11d0-AD71-00C04FD8FDFF}';
- {$EXTERNALSYM CLSID_WbemContext}
- CLSID_UnsecuredApartment: TGUID = '{49bd2028-1523-11d1-ad79-00c04fd8fdff}';
- {$EXTERNALSYM CLSID_UnsecuredApartment}
- CLSID_WbemClassObject: TGUID = '{9A653086-174F-11d2-B5F9-00104B703EFD}';
- {$EXTERNALSYM CLSID_WbemClassObject}
- CLSID_MofCompiler: TGUID = '{6daf9757-2e37-11d2-aec9-00c04fb68820}';
- {$EXTERNALSYM CLSID_MofCompiler}
- CLSID_WbemStatusCodeText: TGUID = '{eb87e1bd-3233-11d2-aec9-00c04fb68820}';
- {$EXTERNALSYM CLSID_WbemStatusCodeText}
- CLSID_WbemBackupRestore: TGUID = '{C49E32C6-BC8B-11d2-85D4-00105A1F8304}';
- {$EXTERNALSYM CLSID_WbemBackupRestore}
- CLSID_WbemRefresher: TGUID = '{c71566f2-561e-11d1-ad87-00c04fd8fdff}';
- {$EXTERNALSYM CLSID_WbemRefresher}
- CLSID_WbemObjectTextSrc: TGUID = '{8D1C559D-84F0-4bb3-A7D5-56A7435A9BA6}';
- {$EXTERNALSYM CLSID_WbemObjectTextSrc}
-
-const
- IID_IWbemShutdown: TGUID = '{b7b31df9-d515-11d3-a11c-00105a1f515a}';
- {$EXTERNALSYM IID_IWbemShutdown}
-
-type
- IWbemShutdown = interface(IUnknown)
- ['{b7b31df9-d515-11d3-a11c-00105a1f515a}']
- function Shutdown(uReason: LONG; uMaxMilliseconds: ULONG; pCtx: IWbemContext): HRESULT; stdcall;
- end;
- {$EXTERNALSYM IWbemShutdown}
-
-type
- tag_WMI_OBJ_TEXT = DWORD;
- {$EXTERNALSYM tag_WMI_OBJ_TEXT}
- WMI_OBJ_TEXT = tag_WMI_OBJ_TEXT;
- {$EXTERNALSYM WMI_OBJ_TEXT}
- TWmiObjText = WMI_OBJ_TEXT;
-
-const
- WMI_OBJ_TEXT_CIM_DTD_2_0 = 1;
- {$EXTERNALSYM WMI_OBJ_TEXT_CIM_DTD_2_0}
- WMI_OBJ_TEXT_WMI_DTD_2_0 = 2;
- {$EXTERNALSYM WMI_OBJ_TEXT_WMI_DTD_2_0}
- WMI_OBJ_TEXT_WMI_EXT1 = 3;
- {$EXTERNALSYM WMI_OBJ_TEXT_WMI_EXT1}
- WMI_OBJ_TEXT_WMI_EXT2 = 4;
- {$EXTERNALSYM WMI_OBJ_TEXT_WMI_EXT2}
- WMI_OBJ_TEXT_WMI_EXT3 = 5;
- {$EXTERNALSYM WMI_OBJ_TEXT_WMI_EXT3}
- WMI_OBJ_TEXT_WMI_EXT4 = 6;
- {$EXTERNALSYM WMI_OBJ_TEXT_WMI_EXT4}
- WMI_OBJ_TEXT_WMI_EXT5 = 7;
- {$EXTERNALSYM WMI_OBJ_TEXT_WMI_EXT5}
- WMI_OBJ_TEXT_WMI_EXT6 = 8;
- {$EXTERNALSYM WMI_OBJ_TEXT_WMI_EXT6}
- WMI_OBJ_TEXT_WMI_EXT7 = 9;
- {$EXTERNALSYM WMI_OBJ_TEXT_WMI_EXT7}
- WMI_OBJ_TEXT_WMI_EXT8 = 10;
- {$EXTERNALSYM WMI_OBJ_TEXT_WMI_EXT8}
- WMI_OBJ_TEXT_WMI_EXT9 = 11;
- {$EXTERNALSYM WMI_OBJ_TEXT_WMI_EXT9}
- WMI_OBJ_TEXT_WMI_EXT10 = 12;
- {$EXTERNALSYM WMI_OBJ_TEXT_WMI_EXT10}
- WMI_OBJ_TEXT_LAST = 13;
- {$EXTERNALSYM WMI_OBJ_TEXT_LAST}
-
-const
- IID_IWbemObjectTextSrc: TGUID = '{bfbf883a-cad7-11d3-a11b-00105a1f515a}';
- {$EXTERNALSYM IID_IWbemObjectTextSrc}
-
-type
- IWbemObjectTextSrc = interface(IUnknown)
- ['{bfbf883a-cad7-11d3-a11b-00105a1f515a}']
- function GetText(lFlags: Longint; pObj: IWbemClassObject; uObjTextFormat: ULONG; pCtx: IWbemContext; out strText: WideString): HRESULT; stdcall;
- function CreateFromText(lFlags: Longint; strText: WideString; uObjTextFormat: ULONG; pCtx: IWbemContext; out pNewObj:IWbemClassObject): HRESULT; stdcall;
- end;
- {$EXTERNALSYM IWbemObjectTextSrc}
-
-const
- IID_IMofCompiler: TGUID = '{6daf974e-2e37-11d2-aec9-00c04fb68820}';
- {$EXTERNALSYM IID_IMofCompiler}
-
-type
- tag_CompileStatusInfo = record
- lPhaseError: Longint;
- hRes: HRESULT;
- ObjectNum: Longint;
- FirstLine: Longint;
- LastLine: Longint;
- dwOutFlags: DWORD;
- end;
- {$EXTERNALSYM tag_CompileStatusInfo}
- WBEM_COMPILE_STATUS_INFO = tag_CompileStatusInfo;
- {$EXTERNALSYM WBEM_COMPILE_STATUS_INFO}
- TWbemCompileStatusInfo = WBEM_COMPILE_STATUS_INFO;
-
-type
- tag_WBEM_COMPILER_OPTIONS = DWORD;
- {$EXTERNALSYM tag_WBEM_COMPILER_OPTIONS}
- WBEM_COMPILER_OPTIONS = tag_WBEM_COMPILER_OPTIONS;
- {$EXTERNALSYM WBEM_COMPILER_OPTIONS}
- TWbemCompilerOptions = WBEM_COMPILER_OPTIONS;
-
-const
- WBEM_FLAG_CHECK_ONLY = $1;
- {$EXTERNALSYM WBEM_FLAG_CHECK_ONLY}
- WBEM_FLAG_AUTORECOVER = $2;
- {$EXTERNALSYM WBEM_FLAG_AUTORECOVER}
- WBEM_FLAG_WMI_CHECK = $4;
- {$EXTERNALSYM WBEM_FLAG_WMI_CHECK}
- WBEM_FLAG_CONSOLE_PRINT = $8;
- {$EXTERNALSYM WBEM_FLAG_CONSOLE_PRINT}
- WBEM_FLAG_DONT_ADD_TO_LIST = $10;
- {$EXTERNALSYM WBEM_FLAG_DONT_ADD_TO_LIST}
- WBEM_FLAG_SPLIT_FILES = $20;
- {$EXTERNALSYM WBEM_FLAG_SPLIT_FILES}
- WBEM_FLAG_STORE_FILE = $100;
- {$EXTERNALSYM WBEM_FLAG_STORE_FILE}
-
-type
- tag_WBEM_CONNECT_OPTIONS = DWORD;
- {$EXTERNALSYM tag_WBEM_CONNECT_OPTIONS}
- WBEM_CONNECT_OPTIONS = tag_WBEM_CONNECT_OPTIONS;
- {$EXTERNALSYM WBEM_CONNECT_OPTIONS}
- TWbemConnectOptions = WBEM_CONNECT_OPTIONS;
-
-const
- WBEM_FLAG_CONNECT_REPOSITORY_ONLY = $40;
- {$EXTERNALSYM WBEM_FLAG_CONNECT_REPOSITORY_ONLY}
- WBEM_FLAG_CONNECT_USE_MAX_WAIT = $80;
- {$EXTERNALSYM WBEM_FLAG_CONNECT_USE_MAX_WAIT}
-
-type
- IMofCompiler = interface(IUnknown)
- ['{6daf974e-2e37-11d2-aec9-00c04fb68820}']
- function CompileFile(FileName, ServerAndNamespace, User, Authority, Password: LPWSTR;
- lOptionFlags, lClassFlags, lInstanceFlags: LONG; var pInfo: WBEM_COMPILE_STATUS_INFO): HRESULT; stdcall;
- function CompileBuffer(buffSize: Longint; pBuffer: LPBYTE; ServerAndNamespace, User, Authority, Password: LPWSTR;
- lOptionFlags, lClassFlags, lInstanceFlags: LONG; var pInfo: WBEM_COMPILE_STATUS_INFO): HRESULT; stdcall;
- function CreateBMOF(TextFileName, BMOFFileName, ServerAndNamespace: LPWSTR;
- lOptionFlags, lClassFlags, lInstanceFlags: LONG; var pInfo: WBEM_COMPILE_STATUS_INFO): HRESULT; stdcall;
- end;
-
-type
- tag_WBEM_UNSECAPP_FLAG_TYPE = DWORD;
- {$EXTERNALSYM tag_WBEM_UNSECAPP_FLAG_TYPE}
- WBEM_UNSECAPP_FLAG_TYPE = tag_WBEM_UNSECAPP_FLAG_TYPE;
- {$EXTERNALSYM WBEM_UNSECAPP_FLAG_TYPE}
- TWbemUnsecAppFlagType = WBEM_UNSECAPP_FLAG_TYPE;
-
-const
- WBEM_FLAG_UNSECAPP_DEFAULT_CHECK_ACCESS = 0;
- {$EXTERNALSYM WBEM_FLAG_UNSECAPP_DEFAULT_CHECK_ACCESS}
- WBEM_FLAG_UNSECAPP_CHECK_ACCESS = 1;
- {$EXTERNALSYM WBEM_FLAG_UNSECAPP_CHECK_ACCESS}
- WBEM_FLAG_UNSECAPP_DONT_CHECK_ACCESS = 2;
- {$EXTERNALSYM WBEM_FLAG_UNSECAPP_DONT_CHECK_ACCESS}
-
-type
- tag_WBEM_INFORMATION_FLAG_TYPE = DWORD;
- {$EXTERNALSYM tag_WBEM_INFORMATION_FLAG_TYPE}
- WBEM_INFORMATION_FLAG_TYPE = tag_WBEM_INFORMATION_FLAG_TYPE;
- {$EXTERNALSYM WBEM_INFORMATION_FLAG_TYPE}
- TWbemInformationFlagType = WBEM_INFORMATION_FLAG_TYPE;
-
-const
- WBEM_FLAG_SHORT_NAME = $1;
- {$EXTERNALSYM WBEM_FLAG_SHORT_NAME}
- WBEM_FLAG_LONG_NAME = $2;
- {$EXTERNALSYM WBEM_FLAG_LONG_NAME}
-
-// Additional Prototypes for ALL interfaces
-
-//unsigned long __RPC_USER WideString_UserSize( unsigned long *, unsigned long , WideString * );
-//unsigned char * __RPC_USER WideString_UserMarshal( unsigned long *, unsigned char *, WideString * );
-//unsigned char * __RPC_USER WideString_UserUnmarshal(unsigned long *, unsigned char *, WideString * );
-//void __RPC_USER WideString_UserFree( unsigned long *, WideString * );
-
-// end of Additional Prototypes
-
-implementation
-
-end.
+{******************************************************************************}
+{ }
+{ WBEM Client interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: wbemcli.idl, released Nov 2002. The original Pascal }
+{ code is: WbemCli.pas, released April 2002. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwawbemcli.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaWbemCli;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "wbemcli.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ ActiveX,
+ JwaWinType;
+
+{$IFDEF FPC}
+Type PSafeArray=PVarArray;
+{$ENDIF}
+
+type
+ tag_WBEM_GENUS_TYPE = DWORD;
+ {$EXTERNALSYM tag_WBEM_GENUS_TYPE}
+ WBEM_GENUS_TYPE = tag_WBEM_GENUS_TYPE;
+ {$EXTERNALSYM WBEM_GENUS_TYPE}
+ TWbemGenusType = WBEM_GENUS_TYPE;
+ {$EXTERNALSYM TWbemGenusType}
+
+const
+ WBEM_GENUS_CLASS = 1;
+ {$EXTERNALSYM WBEM_GENUS_CLASS}
+ WBEM_GENUS_INSTANCE = 2;
+ {$EXTERNALSYM WBEM_GENUS_INSTANCE}
+
+type
+ tag_WBEM_CHANGE_FLAG_TYPE = DWORD;
+ {$EXTERNALSYM tag_WBEM_CHANGE_FLAG_TYPE}
+ WBEM_CHANGE_FLAG_TYPE = tag_WBEM_CHANGE_FLAG_TYPE;
+ {$EXTERNALSYM WBEM_CHANGE_FLAG_TYPE}
+ TWbemChangeFlagType = WBEM_CHANGE_FLAG_TYPE;
+ {$EXTERNALSYM TWbemChangeFlagType}
+
+const
+ WBEM_FLAG_CREATE_OR_UPDATE = $0;
+ {$EXTERNALSYM WBEM_FLAG_CREATE_OR_UPDATE}
+ WBEM_FLAG_UPDATE_ONLY = $1;
+ {$EXTERNALSYM WBEM_FLAG_UPDATE_ONLY}
+ WBEM_FLAG_CREATE_ONLY = $2;
+ {$EXTERNALSYM WBEM_FLAG_CREATE_ONLY}
+ WBEM_FLAG_UPDATE_COMPATIBLE = $0;
+ {$EXTERNALSYM WBEM_FLAG_UPDATE_COMPATIBLE}
+ WBEM_FLAG_UPDATE_SAFE_MODE = $20;
+ {$EXTERNALSYM WBEM_FLAG_UPDATE_SAFE_MODE}
+ WBEM_FLAG_UPDATE_FORCE_MODE = $40;
+ {$EXTERNALSYM WBEM_FLAG_UPDATE_FORCE_MODE}
+ WBEM_MASK_UPDATE_MODE = $60;
+ {$EXTERNALSYM WBEM_MASK_UPDATE_MODE}
+ WBEM_FLAG_ADVISORY = $10000;
+ {$EXTERNALSYM WBEM_FLAG_ADVISORY}
+
+type
+ tag_WBEM_GENERIC_FLAG_TYPE = DWORD;
+ {$EXTERNALSYM tag_WBEM_GENERIC_FLAG_TYPE}
+ WBEM_GENERIC_FLAG_TYPE = tag_WBEM_GENERIC_FLAG_TYPE;
+ {$EXTERNALSYM WBEM_GENERIC_FLAG_TYPE}
+ TWbemGenericFlagType = WBEM_GENERIC_FLAG_TYPE;
+ {$EXTERNALSYM TWbemGenericFlagType}
+
+const
+ WBEM_FLAG_RETURN_IMMEDIATELY = $10;
+ {$EXTERNALSYM WBEM_FLAG_RETURN_IMMEDIATELY}
+ WBEM_FLAG_RETURN_WBEM_COMPLETE = $0;
+ {$EXTERNALSYM WBEM_FLAG_RETURN_WBEM_COMPLETE}
+ WBEM_FLAG_BIDIRECTIONAL = $0;
+ {$EXTERNALSYM WBEM_FLAG_BIDIRECTIONAL}
+ WBEM_FLAG_FORWARD_ONLY = $20;
+ {$EXTERNALSYM WBEM_FLAG_FORWARD_ONLY}
+ WBEM_FLAG_NO_ERROR_OBJECT = $40;
+ {$EXTERNALSYM WBEM_FLAG_NO_ERROR_OBJECT}
+ WBEM_FLAG_RETURN_ERROR_OBJECT = $0;
+ {$EXTERNALSYM WBEM_FLAG_RETURN_ERROR_OBJECT}
+ WBEM_FLAG_SEND_STATUS = $80;
+ {$EXTERNALSYM WBEM_FLAG_SEND_STATUS}
+ WBEM_FLAG_DONT_SEND_STATUS = $0;
+ {$EXTERNALSYM WBEM_FLAG_DONT_SEND_STATUS}
+ WBEM_FLAG_ENSURE_LOCATABLE = $100;
+ {$EXTERNALSYM WBEM_FLAG_ENSURE_LOCATABLE}
+ WBEM_FLAG_DIRECT_READ = $200;
+ {$EXTERNALSYM WBEM_FLAG_DIRECT_READ}
+ WBEM_FLAG_SEND_ONLY_SELECTED = $0;
+ {$EXTERNALSYM WBEM_FLAG_SEND_ONLY_SELECTED}
+ WBEM_RETURN_WHEN_COMPLETE = $0;
+ {$EXTERNALSYM WBEM_RETURN_WHEN_COMPLETE}
+ WBEM_RETURN_IMMEDIATELY = $10;
+ {$EXTERNALSYM WBEM_RETURN_IMMEDIATELY}
+ WBEM_MASK_RESERVED_FLAGS = $1f000;
+ {$EXTERNALSYM WBEM_MASK_RESERVED_FLAGS}
+ WBEM_FLAG_USE_AMENDED_QUALIFIERS = $20000;
+ {$EXTERNALSYM WBEM_FLAG_USE_AMENDED_QUALIFIERS}
+ WBEM_FLAG_STRONG_VALIDATION = $100000;
+ {$EXTERNALSYM WBEM_FLAG_STRONG_VALIDATION}
+
+type
+ tag_WBEM_STATUS_TYPE = DWORD;
+ {$EXTERNALSYM tag_WBEM_STATUS_TYPE}
+ WBEM_STATUS_TYPE = tag_WBEM_STATUS_TYPE;
+ {$EXTERNALSYM WBEM_STATUS_TYPE}
+ TWbemStatusType = WBEM_STATUS_TYPE;
+ {$EXTERNALSYM TWbemStatusType}
+
+const
+ WBEM_STATUS_COMPLETE = 0;
+ {$EXTERNALSYM WBEM_STATUS_COMPLETE}
+ WBEM_STATUS_REQUIREMENTS = 1;
+ {$EXTERNALSYM WBEM_STATUS_REQUIREMENTS}
+ WBEM_STATUS_PROGRESS = 2;
+ {$EXTERNALSYM WBEM_STATUS_PROGRESS}
+
+type
+ tag_WBEM_TIMEOUT_TYPE = DWORD;
+ {$EXTERNALSYM tag_WBEM_TIMEOUT_TYPE}
+ WBEM_TIMEOUT_TYPE = tag_WBEM_TIMEOUT_TYPE;
+ {$EXTERNALSYM WBEM_TIMEOUT_TYPE}
+ TWbemTimeoutType = WBEM_TIMEOUT_TYPE;
+ {$EXTERNALSYM TWbemTimeoutType}
+
+const
+ WBEM_NO_WAIT = 0;
+ {$EXTERNALSYM WBEM_NO_WAIT}
+ WBEM_INFINITE = DWORD($ffffffff);
+ {$EXTERNALSYM WBEM_INFINITE}
+
+type
+ tag_WBEM_CONDITION_FLAG_TYPE = DWORD;
+ {$EXTERNALSYM tag_WBEM_CONDITION_FLAG_TYPE}
+ WBEM_CONDITION_FLAG_TYPE = tag_WBEM_CONDITION_FLAG_TYPE;
+ {$EXTERNALSYM WBEM_CONDITION_FLAG_TYPE}
+ TWbemConditionFlagType = WBEM_CONDITION_FLAG_TYPE;
+ {$EXTERNALSYM TWbemConditionFlagType}
+
+const
+ WBEM_FLAG_ALWAYS = $0;
+ {$EXTERNALSYM WBEM_FLAG_ALWAYS}
+ WBEM_FLAG_ONLY_IF_TRUE = $1;
+ {$EXTERNALSYM WBEM_FLAG_ONLY_IF_TRUE}
+ WBEM_FLAG_ONLY_IF_FALSE = $2;
+ {$EXTERNALSYM WBEM_FLAG_ONLY_IF_FALSE}
+ WBEM_FLAG_ONLY_IF_IDENTICAL = $3;
+ {$EXTERNALSYM WBEM_FLAG_ONLY_IF_IDENTICAL}
+ WBEM_MASK_PRIMARY_CONDITION = $3;
+ {$EXTERNALSYM WBEM_MASK_PRIMARY_CONDITION}
+ WBEM_FLAG_KEYS_ONLY = $4;
+ {$EXTERNALSYM WBEM_FLAG_KEYS_ONLY}
+ WBEM_FLAG_REFS_ONLY = $8;
+ {$EXTERNALSYM WBEM_FLAG_REFS_ONLY}
+ WBEM_FLAG_LOCAL_ONLY = $10;
+ {$EXTERNALSYM WBEM_FLAG_LOCAL_ONLY}
+ WBEM_FLAG_PROPAGATED_ONLY = $20;
+ {$EXTERNALSYM WBEM_FLAG_PROPAGATED_ONLY}
+ WBEM_FLAG_SYSTEM_ONLY = $30;
+ {$EXTERNALSYM WBEM_FLAG_SYSTEM_ONLY}
+ WBEM_FLAG_NONSYSTEM_ONLY = $40;
+ {$EXTERNALSYM WBEM_FLAG_NONSYSTEM_ONLY}
+ WBEM_MASK_CONDITION_ORIGIN = $70;
+ {$EXTERNALSYM WBEM_MASK_CONDITION_ORIGIN}
+ WBEM_FLAG_CLASS_OVERRIDES_ONLY = $100;
+ {$EXTERNALSYM WBEM_FLAG_CLASS_OVERRIDES_ONLY}
+ WBEM_FLAG_CLASS_LOCAL_AND_OVERRIDES = $200;
+ {$EXTERNALSYM WBEM_FLAG_CLASS_LOCAL_AND_OVERRIDES}
+ WBEM_MASK_CLASS_CONDITION = $300;
+ {$EXTERNALSYM WBEM_MASK_CLASS_CONDITION}
+
+type
+ tag_WBEM_FLAVOR_TYPE = DWORD;
+ {$EXTERNALSYM tag_WBEM_FLAVOR_TYPE}
+ WBEM_FLAVOR_TYPE = tag_WBEM_FLAVOR_TYPE;
+ {$EXTERNALSYM WBEM_FLAVOR_TYPE}
+ TWbemFlavorType = WBEM_FLAVOR_TYPE;
+ {$EXTERNALSYM TWbemFlavorType}
+
+const
+ WBEM_FLAVOR_DONT_PROPAGATE = $0;
+ {$EXTERNALSYM WBEM_FLAVOR_DONT_PROPAGATE}
+ WBEM_FLAVOR_FLAG_PROPAGATE_TO_INSTANCE = $1;
+ {$EXTERNALSYM WBEM_FLAVOR_FLAG_PROPAGATE_TO_INSTANCE}
+ WBEM_FLAVOR_FLAG_PROPAGATE_TO_DERIVED_CLASS = $2;
+ {$EXTERNALSYM WBEM_FLAVOR_FLAG_PROPAGATE_TO_DERIVED_CLASS}
+ WBEM_FLAVOR_MASK_PROPAGATION = $f;
+ {$EXTERNALSYM WBEM_FLAVOR_MASK_PROPAGATION}
+ WBEM_FLAVOR_OVERRIDABLE = $0;
+ {$EXTERNALSYM WBEM_FLAVOR_OVERRIDABLE}
+ WBEM_FLAVOR_NOT_OVERRIDABLE = $10;
+ {$EXTERNALSYM WBEM_FLAVOR_NOT_OVERRIDABLE}
+ WBEM_FLAVOR_MASK_PERMISSIONS = $10;
+ {$EXTERNALSYM WBEM_FLAVOR_MASK_PERMISSIONS}
+ WBEM_FLAVOR_ORIGIN_LOCAL = $0;
+ {$EXTERNALSYM WBEM_FLAVOR_ORIGIN_LOCAL}
+ WBEM_FLAVOR_ORIGIN_PROPAGATED = $20;
+ {$EXTERNALSYM WBEM_FLAVOR_ORIGIN_PROPAGATED}
+ WBEM_FLAVOR_ORIGIN_SYSTEM = $40;
+ {$EXTERNALSYM WBEM_FLAVOR_ORIGIN_SYSTEM}
+ WBEM_FLAVOR_MASK_ORIGIN = $60;
+ {$EXTERNALSYM WBEM_FLAVOR_MASK_ORIGIN}
+ WBEM_FLAVOR_NOT_AMENDED = $0;
+ {$EXTERNALSYM WBEM_FLAVOR_NOT_AMENDED}
+ WBEM_FLAVOR_AMENDED = $80;
+ {$EXTERNALSYM WBEM_FLAVOR_AMENDED}
+ WBEM_FLAVOR_MASK_AMENDED = $80;
+ {$EXTERNALSYM WBEM_FLAVOR_MASK_AMENDED}
+
+type
+ tag_WBEM_QUERY_FLAG_TYPE = DWORD;
+ {$EXTERNALSYM tag_WBEM_QUERY_FLAG_TYPE}
+ WBEM_QUERY_FLAG_TYPE = tag_WBEM_QUERY_FLAG_TYPE;
+ {$EXTERNALSYM WBEM_QUERY_FLAG_TYPE}
+ TWbemQueryFlagType = WBEM_QUERY_FLAG_TYPE;
+ {$EXTERNALSYM TWbemQueryFlagType}
+
+const
+ WBEM_FLAG_DEEP = 0;
+ {$EXTERNALSYM WBEM_FLAG_DEEP}
+ WBEM_FLAG_SHALLOW = 1;
+ {$EXTERNALSYM WBEM_FLAG_SHALLOW}
+ WBEM_FLAG_PROTOTYPE = 2;
+ {$EXTERNALSYM WBEM_FLAG_PROTOTYPE}
+
+type
+ tag_WBEM_SECURITY_FLAGS = DWORD;
+ {$EXTERNALSYM tag_WBEM_SECURITY_FLAGS}
+ WBEM_SECURITY_FLAGS = tag_WBEM_SECURITY_FLAGS;
+ {$EXTERNALSYM WBEM_SECURITY_FLAGS}
+ TWbemSecurityFlags = WBEM_SECURITY_FLAGS;
+ {$EXTERNALSYM TWbemSecurityFlags}
+
+const
+ WBEM_ENABLE = $1;
+ {$EXTERNALSYM WBEM_ENABLE}
+ WBEM_METHOD_EXECUTE = $2;
+ {$EXTERNALSYM WBEM_METHOD_EXECUTE}
+ WBEM_FULL_WRITE_REP = $4;
+ {$EXTERNALSYM WBEM_FULL_WRITE_REP}
+ WBEM_PARTIAL_WRITE_REP = $8;
+ {$EXTERNALSYM WBEM_PARTIAL_WRITE_REP}
+ WBEM_WRITE_PROVIDER = $10;
+ {$EXTERNALSYM WBEM_WRITE_PROVIDER}
+ WBEM_REMOTE_ACCESS = $20;
+ {$EXTERNALSYM WBEM_REMOTE_ACCESS}
+ WBEM_RIGHT_SUBSCRIBE = $40;
+ {$EXTERNALSYM WBEM_RIGHT_SUBSCRIBE}
+ WBEM_RIGHT_PUBLISH = $80;
+ {$EXTERNALSYM WBEM_RIGHT_PUBLISH}
+
+type
+ tag_WBEM_LIMITATION_FLAG_TYPE = DWORD;
+ {$EXTERNALSYM tag_WBEM_LIMITATION_FLAG_TYPE}
+ WBEM_LIMITATION_FLAG_TYPE = tag_WBEM_LIMITATION_FLAG_TYPE;
+ {$EXTERNALSYM WBEM_LIMITATION_FLAG_TYPE}
+ TWbemLimitationFlagType = WBEM_LIMITATION_FLAG_TYPE;
+ {$EXTERNALSYM TWbemLimitationFlagType}
+
+const
+ WBEM_FLAG_EXCLUDE_OBJECT_QUALIFIERS = $10;
+ {$EXTERNALSYM WBEM_FLAG_EXCLUDE_OBJECT_QUALIFIERS}
+ WBEM_FLAG_EXCLUDE_PROPERTY_QUALIFIERS = $20;
+ {$EXTERNALSYM WBEM_FLAG_EXCLUDE_PROPERTY_QUALIFIERS}
+
+type
+ tag_WBEM_TEXT_FLAG_TYPE = DWORD;
+ {$EXTERNALSYM tag_WBEM_TEXT_FLAG_TYPE}
+ WBEM_TEXT_FLAG_TYPE = tag_WBEM_TEXT_FLAG_TYPE;
+ {$EXTERNALSYM WBEM_TEXT_FLAG_TYPE}
+ TWbemTextFlagType = WBEM_TEXT_FLAG_TYPE;
+ {$EXTERNALSYM TWbemTextFlagType}
+
+const
+ WBEM_FLAG_NO_FLAVORS = $1;
+ {$EXTERNALSYM WBEM_FLAG_NO_FLAVORS}
+
+type
+ tag_WBEM_COMPARISON_FLAG = DWORD;
+ {$EXTERNALSYM tag_WBEM_COMPARISON_FLAG}
+ WBEM_COMPARISON_FLAG = tag_WBEM_COMPARISON_FLAG;
+ {$EXTERNALSYM WBEM_COMPARISON_FLAG}
+ TWbemComparisonFlag = WBEM_COMPARISON_FLAG;
+ {$EXTERNALSYM TWbemComparisonFlag}
+
+const
+ WBEM_COMPARISON_INCLUDE_ALL = $0;
+ {$EXTERNALSYM WBEM_COMPARISON_INCLUDE_ALL}
+ WBEM_FLAG_IGNORE_QUALIFIERS = $1;
+ {$EXTERNALSYM WBEM_FLAG_IGNORE_QUALIFIERS}
+ WBEM_FLAG_IGNORE_OBJECT_SOURCE = $2;
+ {$EXTERNALSYM WBEM_FLAG_IGNORE_OBJECT_SOURCE}
+ WBEM_FLAG_IGNORE_DEFAULT_VALUES = $4;
+ {$EXTERNALSYM WBEM_FLAG_IGNORE_DEFAULT_VALUES}
+ WBEM_FLAG_IGNORE_CLASS = $8;
+ {$EXTERNALSYM WBEM_FLAG_IGNORE_CLASS}
+ WBEM_FLAG_IGNORE_CASE = $10;
+ {$EXTERNALSYM WBEM_FLAG_IGNORE_CASE}
+ WBEM_FLAG_IGNORE_FLAVOR = $20;
+ {$EXTERNALSYM WBEM_FLAG_IGNORE_FLAVOR}
+
+type
+ tag_WBEM_LOCKING = DWORD;
+ {$EXTERNALSYM tag_WBEM_LOCKING}
+ WBEM_LOCKING_FLAG_TYPE = tag_WBEM_LOCKING;
+ {$EXTERNALSYM WBEM_LOCKING_FLAG_TYPE}
+ TWbemLockingFlagType = WBEM_LOCKING_FLAG_TYPE;
+ {$EXTERNALSYM TWbemLockingFlagType}
+
+const
+ WBEM_FLAG_ALLOW_READ = $1;
+ {$EXTERNALSYM WBEM_FLAG_ALLOW_READ}
+
+type
+ tag_CIMTYPE_ENUMERATION = DWORD;
+ {$EXTERNALSYM tag_CIMTYPE_ENUMERATION}
+ CIMTYPE_ENUMERATION = tag_CIMTYPE_ENUMERATION;
+ {$EXTERNALSYM CIMTYPE_ENUMERATION}
+ TCimTypeEnumeration = CIMTYPE_ENUMERATION;
+ {$EXTERNALSYM TCimTypeEnumeration}
+
+const
+ CIM_ILLEGAL = $fff;
+ {$EXTERNALSYM CIM_ILLEGAL}
+ CIM_EMPTY = 0;
+ {$EXTERNALSYM CIM_EMPTY}
+ CIM_SINT8 = 16;
+ {$EXTERNALSYM CIM_SINT8}
+ CIM_UINT8 = 17;
+ {$EXTERNALSYM CIM_UINT8}
+ CIM_SINT16 = 2;
+ {$EXTERNALSYM CIM_SINT16}
+ CIM_UINT16 = 18;
+ {$EXTERNALSYM CIM_UINT16}
+ CIM_SINT32 = 3;
+ {$EXTERNALSYM CIM_SINT32}
+ CIM_UINT32 = 19;
+ {$EXTERNALSYM CIM_UINT32}
+ CIM_SINT64 = 20;
+ {$EXTERNALSYM CIM_SINT64}
+ CIM_UINT64 = 21;
+ {$EXTERNALSYM CIM_UINT64}
+ CIM_REAL32 = 4;
+ {$EXTERNALSYM CIM_REAL32}
+ CIM_REAL64 = 5;
+ {$EXTERNALSYM CIM_REAL64}
+ CIM_BOOLEAN = 11;
+ {$EXTERNALSYM CIM_BOOLEAN}
+ CIM_STRING = 8;
+ {$EXTERNALSYM CIM_STRING}
+ CIM_DATETIME = 101;
+ {$EXTERNALSYM CIM_DATETIME}
+ CIM_REFERENCE = 102;
+ {$EXTERNALSYM CIM_REFERENCE}
+ CIM_CHAR16 = 103;
+ {$EXTERNALSYM CIM_CHAR16}
+ CIM_OBJECT = 13;
+ {$EXTERNALSYM CIM_OBJECT}
+ CIM_FLAG_ARRAY = $2000;
+ {$EXTERNALSYM CIM_FLAG_ARRAY}
+
+type
+ tag_WBEM_BACKUP_RESTORE_FLAGS = DWORD;
+ {$EXTERNALSYM tag_WBEM_BACKUP_RESTORE_FLAGS}
+ WBEM_BACKUP_RESTORE_FLAGS = tag_WBEM_BACKUP_RESTORE_FLAGS;
+ {$EXTERNALSYM WBEM_BACKUP_RESTORE_FLAGS}
+ TWbemBackupRestoreFlags = WBEM_BACKUP_RESTORE_FLAGS;
+ {$EXTERNALSYM TWbemBackupRestoreFlags}
+
+const
+ WBEM_FLAG_BACKUP_RESTORE_DEFAULT = 0;
+ {$EXTERNALSYM WBEM_FLAG_BACKUP_RESTORE_DEFAULT}
+ WBEM_FLAG_BACKUP_RESTORE_FORCE_SHUTDOWN = 1;
+ {$EXTERNALSYM WBEM_FLAG_BACKUP_RESTORE_FORCE_SHUTDOWN}
+
+type
+ tag_WBEM_REFRESHER_FLAGS = DWORD;
+ {$EXTERNALSYM tag_WBEM_REFRESHER_FLAGS}
+ WBEM_REFRESHER_FLAGS = tag_WBEM_REFRESHER_FLAGS;
+ {$EXTERNALSYM WBEM_REFRESHER_FLAGS}
+ TWbemRefresherFlags = WBEM_REFRESHER_FLAGS;
+ {$EXTERNALSYM TWbemRefresherFlags}
+
+const
+ WBEM_FLAG_REFRESH_AUTO_RECONNECT = 0;
+ {$EXTERNALSYM WBEM_FLAG_REFRESH_AUTO_RECONNECT}
+ WBEM_FLAG_REFRESH_NO_AUTO_RECONNECT = 1;
+ {$EXTERNALSYM WBEM_FLAG_REFRESH_NO_AUTO_RECONNECT}
+
+type
+ tag_WBEM_SHUTDOWN_FLAGS = DWORD;
+ {$EXTERNALSYM tag_WBEM_SHUTDOWN_FLAGS}
+ WBEM_SHUTDOWN_FLAGS = tag_WBEM_SHUTDOWN_FLAGS;
+ {$EXTERNALSYM WBEM_SHUTDOWN_FLAGS}
+ TWbemShutdownFlags = WBEM_SHUTDOWN_FLAGS;
+ {$EXTERNALSYM TWbemShutdownFlags}
+
+const
+ WBEM_SHUTDOWN_UNLOAD_COMPONENT = 1;
+ {$EXTERNALSYM WBEM_SHUTDOWN_UNLOAD_COMPONENT}
+ WBEM_SHUTDOWN_WMI = 2;
+ {$EXTERNALSYM WBEM_SHUTDOWN_WMI}
+ WBEM_SHUTDOWN_OS = 3;
+ {$EXTERNALSYM WBEM_SHUTDOWN_OS}
+
+type
+ CIMTYPE = LONG;
+ {$EXTERNALSYM CIMTYPE}
+
+type
+ tag_WBEMSTATUS_FORMAT = DWORD;
+ {$EXTERNALSYM tag_WBEMSTATUS_FORMAT}
+ WBEMSTATUS_FORMAT = tag_WBEMSTATUS_FORMAT;
+ {$EXTERNALSYM WBEMSTATUS_FORMAT}
+ TWbemStatusFormat = WBEMSTATUS_FORMAT;
+ {$EXTERNALSYM TWbemStatusFormat}
+
+const
+ WBEMSTATUS_FORMAT_NEWLINE = 0;
+ {$EXTERNALSYM WBEMSTATUS_FORMAT_NEWLINE}
+ WBEMSTATUS_FORMAT_NO_NEWLINE = 1;
+ {$EXTERNALSYM WBEMSTATUS_FORMAT_NO_NEWLINE}
+
+type
+ tag_WBEM_LIMITS = DWORD;
+ {$EXTERNALSYM tag_WBEM_LIMITS}
+ WBEM_LIMITS = tag_WBEM_LIMITS;
+ {$EXTERNALSYM WBEM_LIMITS}
+ TWbemLimits = WBEM_LIMITS;
+
+const
+ WBEM_MAX_IDENTIFIER = $1000;
+ {$EXTERNALSYM WBEM_MAX_IDENTIFIER}
+ WBEM_MAX_QUERY = $4000;
+ {$EXTERNALSYM WBEM_MAX_QUERY}
+ WBEM_MAX_PATH = $2000;
+ {$EXTERNALSYM WBEM_MAX_PATH}
+ WBEM_MAX_OBJECT_NESTING = 64;
+ {$EXTERNALSYM WBEM_MAX_OBJECT_NESTING}
+ WBEM_MAX_USER_PROPERTIES = 1024;
+ {$EXTERNALSYM WBEM_MAX_USER_PROPERTIES}
+
+type
+ tag_WBEMSTATUS = DWORD;
+ {$EXTERNALSYM tag_WBEMSTATUS}
+ WBEMSTATUS = tag_WBEMSTATUS;
+ {$EXTERNALSYM WBEMSTATUS}
+ TWbemStatus = WBEMSTATUS;
+ {$EXTERNALSYM TWbemStatus}
+
+const
+ WBEM_NO_ERROR = 0;
+ {$EXTERNALSYM WBEM_NO_ERROR}
+ WBEM_S_NO_ERROR = 0;
+ {$EXTERNALSYM WBEM_S_NO_ERROR}
+ WBEM_S_SAME = 0;
+ {$EXTERNALSYM WBEM_S_SAME}
+ WBEM_S_FALSE = 1;
+ {$EXTERNALSYM WBEM_S_FALSE}
+ WBEM_S_ALREADY_EXISTS = DWORD($40001);
+ {$EXTERNALSYM WBEM_S_ALREADY_EXISTS}
+ WBEM_S_RESET_TO_DEFAULT = DWORD($40002);
+ {$EXTERNALSYM WBEM_S_RESET_TO_DEFAULT}
+ WBEM_S_DIFFERENT = DWORD($40003);
+ {$EXTERNALSYM WBEM_S_DIFFERENT}
+ WBEM_S_TIMEDOUT = DWORD($40004);
+ {$EXTERNALSYM WBEM_S_TIMEDOUT}
+ WBEM_S_NO_MORE_DATA = DWORD($40005);
+ {$EXTERNALSYM WBEM_S_NO_MORE_DATA}
+ WBEM_S_OPERATION_CANCELLED = DWORD($40006);
+ {$EXTERNALSYM WBEM_S_OPERATION_CANCELLED}
+ WBEM_S_PENDING = DWORD($40007);
+ {$EXTERNALSYM WBEM_S_PENDING}
+ WBEM_S_DUPLICATE_OBJECTS = DWORD($40008);
+ {$EXTERNALSYM WBEM_S_DUPLICATE_OBJECTS}
+ WBEM_S_ACCESS_DENIED = DWORD($40009);
+ {$EXTERNALSYM WBEM_S_ACCESS_DENIED}
+ WBEM_S_PARTIAL_RESULTS = DWORD($40010);
+ {$EXTERNALSYM WBEM_S_PARTIAL_RESULTS}
+ WBEM_S_SOURCE_NOT_AVAILABLE = DWORD($40017);
+ {$EXTERNALSYM WBEM_S_SOURCE_NOT_AVAILABLE}
+ WBEM_E_FAILED = DWORD($80041001);
+ {$EXTERNALSYM WBEM_E_FAILED}
+ WBEM_E_NOT_FOUND = DWORD($80041002);
+ {$EXTERNALSYM WBEM_E_NOT_FOUND}
+ WBEM_E_ACCESS_DENIED = DWORD($80041003);
+ {$EXTERNALSYM WBEM_E_ACCESS_DENIED}
+ WBEM_E_PROVIDER_FAILURE = DWORD($80041004);
+ {$EXTERNALSYM WBEM_E_PROVIDER_FAILURE}
+ WBEM_E_TYPE_MISMATCH = DWORD($80041005);
+ {$EXTERNALSYM WBEM_E_TYPE_MISMATCH}
+ WBEM_E_OUT_OF_MEMORY = DWORD($80041006);
+ {$EXTERNALSYM WBEM_E_OUT_OF_MEMORY}
+ WBEM_E_INVALID_CONTEXT = DWORD($80041007);
+ {$EXTERNALSYM WBEM_E_INVALID_CONTEXT}
+ WBEM_E_INVALID_PARAMETER = DWORD($80041008);
+ {$EXTERNALSYM WBEM_E_INVALID_PARAMETER}
+ WBEM_E_NOT_AVAILABLE = DWORD($80041009);
+ {$EXTERNALSYM WBEM_E_NOT_AVAILABLE}
+ WBEM_E_CRITICAL_ERROR = DWORD($8004100a);
+ {$EXTERNALSYM WBEM_E_CRITICAL_ERROR}
+ WBEM_E_INVALID_STREAM = DWORD($8004100b);
+ {$EXTERNALSYM WBEM_E_INVALID_STREAM}
+ WBEM_E_NOT_SUPPORTED = DWORD($8004100c);
+ {$EXTERNALSYM WBEM_E_NOT_SUPPORTED}
+ WBEM_E_INVALID_SUPERCLASS = DWORD($8004100d);
+ {$EXTERNALSYM WBEM_E_INVALID_SUPERCLASS}
+ WBEM_E_INVALID_NAMESPACE = DWORD($8004100e);
+ {$EXTERNALSYM WBEM_E_INVALID_NAMESPACE}
+ WBEM_E_INVALID_OBJECT = DWORD($8004100f);
+ {$EXTERNALSYM WBEM_E_INVALID_OBJECT}
+ WBEM_E_INVALID_CLASS = DWORD($80041010);
+ {$EXTERNALSYM WBEM_E_INVALID_CLASS}
+ WBEM_E_PROVIDER_NOT_FOUND = DWORD($80041011);
+ {$EXTERNALSYM WBEM_E_PROVIDER_NOT_FOUND}
+ WBEM_E_INVALID_PROVIDER_REGISTRATION = DWORD($80041012);
+ {$EXTERNALSYM WBEM_E_INVALID_PROVIDER_REGISTRATION}
+ WBEM_E_PROVIDER_LOAD_FAILURE = DWORD($80041013);
+ {$EXTERNALSYM WBEM_E_PROVIDER_LOAD_FAILURE}
+ WBEM_E_INITIALIZATION_FAILURE = DWORD($80041014);
+ {$EXTERNALSYM WBEM_E_INITIALIZATION_FAILURE}
+ WBEM_E_TRANSPORT_FAILURE = DWORD($80041015);
+ {$EXTERNALSYM WBEM_E_TRANSPORT_FAILURE}
+ WBEM_E_INVALID_OPERATION = DWORD($80041016);
+ {$EXTERNALSYM WBEM_E_INVALID_OPERATION}
+ WBEM_E_INVALID_QUERY = DWORD($80041017);
+ {$EXTERNALSYM WBEM_E_INVALID_QUERY}
+ WBEM_E_INVALID_QUERY_TYPE = DWORD($80041018);
+ {$EXTERNALSYM WBEM_E_INVALID_QUERY_TYPE}
+ WBEM_E_ALREADY_EXISTS = DWORD($80041019);
+ {$EXTERNALSYM WBEM_E_ALREADY_EXISTS}
+ WBEM_E_OVERRIDE_NOT_ALLOWED = DWORD($8004101a);
+ {$EXTERNALSYM WBEM_E_OVERRIDE_NOT_ALLOWED}
+ WBEM_E_PROPAGATED_QUALIFIER = DWORD($8004101b);
+ {$EXTERNALSYM WBEM_E_PROPAGATED_QUALIFIER}
+ WBEM_E_PROPAGATED_PROPERTY = DWORD($8004101c);
+ {$EXTERNALSYM WBEM_E_PROPAGATED_PROPERTY}
+ WBEM_E_UNEXPECTED = DWORD($8004101d);
+ {$EXTERNALSYM WBEM_E_UNEXPECTED}
+ WBEM_E_ILLEGAL_OPERATION = DWORD($8004101e);
+ {$EXTERNALSYM WBEM_E_ILLEGAL_OPERATION}
+ WBEM_E_CANNOT_BE_KEY = DWORD($8004101f);
+ {$EXTERNALSYM WBEM_E_CANNOT_BE_KEY}
+ WBEM_E_INCOMPLETE_CLASS = DWORD($80041020);
+ {$EXTERNALSYM WBEM_E_INCOMPLETE_CLASS}
+ WBEM_E_INVALID_SYNTAX = DWORD($80041021);
+ {$EXTERNALSYM WBEM_E_INVALID_SYNTAX}
+ WBEM_E_NONDECORATED_OBJECT = DWORD($80041022);
+ {$EXTERNALSYM WBEM_E_NONDECORATED_OBJECT}
+ WBEM_E_READ_ONLY = DWORD($80041023);
+ {$EXTERNALSYM WBEM_E_READ_ONLY}
+ WBEM_E_PROVIDER_NOT_CAPABLE = DWORD($80041024);
+ {$EXTERNALSYM WBEM_E_PROVIDER_NOT_CAPABLE}
+ WBEM_E_CLASS_HAS_CHILDREN = DWORD($80041025);
+ {$EXTERNALSYM WBEM_E_CLASS_HAS_CHILDREN}
+ WBEM_E_CLASS_HAS_INSTANCES = DWORD($80041026);
+ {$EXTERNALSYM WBEM_E_CLASS_HAS_INSTANCES}
+ WBEM_E_QUERY_NOT_IMPLEMENTED = DWORD($80041027);
+ {$EXTERNALSYM WBEM_E_QUERY_NOT_IMPLEMENTED}
+ WBEM_E_ILLEGAL_NULL = DWORD($80041028);
+ {$EXTERNALSYM WBEM_E_ILLEGAL_NULL}
+ WBEM_E_INVALID_QUALIFIER_TYPE = DWORD($80041029);
+ {$EXTERNALSYM WBEM_E_INVALID_QUALIFIER_TYPE}
+ WBEM_E_INVALID_PROPERTY_TYPE = DWORD($8004102a);
+ {$EXTERNALSYM WBEM_E_INVALID_PROPERTY_TYPE}
+ WBEM_E_VALUE_OUT_OF_RANGE = DWORD($8004102b);
+ {$EXTERNALSYM WBEM_E_VALUE_OUT_OF_RANGE}
+ WBEM_E_CANNOT_BE_SINGLETON = DWORD($8004102c);
+ {$EXTERNALSYM WBEM_E_CANNOT_BE_SINGLETON}
+ WBEM_E_INVALID_CIM_TYPE = DWORD($8004102d);
+ {$EXTERNALSYM WBEM_E_INVALID_CIM_TYPE}
+ WBEM_E_INVALID_METHOD = DWORD($8004102e);
+ {$EXTERNALSYM WBEM_E_INVALID_METHOD}
+ WBEM_E_INVALID_METHOD_PARAMETERS = DWORD($8004102f);
+ {$EXTERNALSYM WBEM_E_INVALID_METHOD_PARAMETERS}
+ WBEM_E_SYSTEM_PROPERTY = DWORD($80041030);
+ {$EXTERNALSYM WBEM_E_SYSTEM_PROPERTY}
+ WBEM_E_INVALID_PROPERTY = DWORD($80041031);
+ {$EXTERNALSYM WBEM_E_INVALID_PROPERTY}
+ WBEM_E_CALL_CANCELLED = DWORD($80041032);
+ {$EXTERNALSYM WBEM_E_CALL_CANCELLED}
+ WBEM_E_SHUTTING_DOWN = DWORD($80041033);
+ {$EXTERNALSYM WBEM_E_SHUTTING_DOWN}
+ WBEM_E_PROPAGATED_METHOD = DWORD($80041034);
+ {$EXTERNALSYM WBEM_E_PROPAGATED_METHOD}
+ WBEM_E_UNSUPPORTED_PARAMETER = DWORD($80041035);
+ {$EXTERNALSYM WBEM_E_UNSUPPORTED_PARAMETER}
+ WBEM_E_MISSING_PARAMETER_ID = DWORD($80041036);
+ {$EXTERNALSYM WBEM_E_MISSING_PARAMETER_ID}
+ WBEM_E_INVALID_PARAMETER_ID = DWORD($80041037);
+ {$EXTERNALSYM WBEM_E_INVALID_PARAMETER_ID}
+ WBEM_E_NONCONSECUTIVE_PARAMETER_IDS = DWORD($80041038);
+ {$EXTERNALSYM WBEM_E_NONCONSECUTIVE_PARAMETER_IDS}
+ WBEM_E_PARAMETER_ID_ON_RETVAL = DWORD($80041039);
+ {$EXTERNALSYM WBEM_E_PARAMETER_ID_ON_RETVAL}
+ WBEM_E_INVALID_OBJECT_PATH = DWORD($8004103a);
+ {$EXTERNALSYM WBEM_E_INVALID_OBJECT_PATH}
+ WBEM_E_OUT_OF_DISK_SPACE = DWORD($8004103b);
+ {$EXTERNALSYM WBEM_E_OUT_OF_DISK_SPACE}
+ WBEM_E_BUFFER_TOO_SMALL = DWORD($8004103c);
+ {$EXTERNALSYM WBEM_E_BUFFER_TOO_SMALL}
+ WBEM_E_UNSUPPORTED_PUT_EXTENSION = DWORD($8004103d);
+ {$EXTERNALSYM WBEM_E_UNSUPPORTED_PUT_EXTENSION}
+ WBEM_E_UNKNOWN_OBJECT_TYPE = DWORD($8004103e);
+ {$EXTERNALSYM WBEM_E_UNKNOWN_OBJECT_TYPE}
+ WBEM_E_UNKNOWN_PACKET_TYPE = DWORD($8004103f);
+ {$EXTERNALSYM WBEM_E_UNKNOWN_PACKET_TYPE}
+ WBEM_E_MARSHAL_VERSION_MISMATCH = DWORD($80041040);
+ {$EXTERNALSYM WBEM_E_MARSHAL_VERSION_MISMATCH}
+ WBEM_E_MARSHAL_INVALID_SIGNATURE = DWORD($80041041);
+ {$EXTERNALSYM WBEM_E_MARSHAL_INVALID_SIGNATURE}
+ WBEM_E_INVALID_QUALIFIER = DWORD($80041042);
+ {$EXTERNALSYM WBEM_E_INVALID_QUALIFIER}
+ WBEM_E_INVALID_DUPLICATE_PARAMETER = DWORD($80041043);
+ {$EXTERNALSYM WBEM_E_INVALID_DUPLICATE_PARAMETER}
+ WBEM_E_TOO_MUCH_DATA = DWORD($80041044);
+ {$EXTERNALSYM WBEM_E_TOO_MUCH_DATA}
+ WBEM_E_SERVER_TOO_BUSY = DWORD($80041045);
+ {$EXTERNALSYM WBEM_E_SERVER_TOO_BUSY}
+ WBEM_E_INVALID_FLAVOR = DWORD($80041046);
+ {$EXTERNALSYM WBEM_E_INVALID_FLAVOR}
+ WBEM_E_CIRCULAR_REFERENCE = DWORD($80041047);
+ {$EXTERNALSYM WBEM_E_CIRCULAR_REFERENCE}
+ WBEM_E_UNSUPPORTED_CLASS_UPDATE = DWORD($80041048);
+ {$EXTERNALSYM WBEM_E_UNSUPPORTED_CLASS_UPDATE}
+ WBEM_E_CANNOT_CHANGE_KEY_INHERITANCE = DWORD($80041049);
+ {$EXTERNALSYM WBEM_E_CANNOT_CHANGE_KEY_INHERITANCE}
+ WBEM_E_CANNOT_CHANGE_INDEX_INHERITANCE = DWORD($80041050);
+ {$EXTERNALSYM WBEM_E_CANNOT_CHANGE_INDEX_INHERITANCE}
+ WBEM_E_TOO_MANY_PROPERTIES = DWORD($80041051);
+ {$EXTERNALSYM WBEM_E_TOO_MANY_PROPERTIES}
+ WBEM_E_UPDATE_TYPE_MISMATCH = DWORD($80041052);
+ {$EXTERNALSYM WBEM_E_UPDATE_TYPE_MISMATCH}
+ WBEM_E_UPDATE_OVERRIDE_NOT_ALLOWED = DWORD($80041053);
+ {$EXTERNALSYM WBEM_E_UPDATE_OVERRIDE_NOT_ALLOWED}
+ WBEM_E_UPDATE_PROPAGATED_METHOD = DWORD($80041054);
+ {$EXTERNALSYM WBEM_E_UPDATE_PROPAGATED_METHOD}
+ WBEM_E_METHOD_NOT_IMPLEMENTED = DWORD($80041055);
+ {$EXTERNALSYM WBEM_E_METHOD_NOT_IMPLEMENTED}
+ WBEM_E_METHOD_DISABLED = DWORD($80041056);
+ {$EXTERNALSYM WBEM_E_METHOD_DISABLED}
+ WBEM_E_REFRESHER_BUSY = DWORD($80041057);
+ {$EXTERNALSYM WBEM_E_REFRESHER_BUSY}
+ WBEM_E_UNPARSABLE_QUERY = DWORD($80041058);
+ {$EXTERNALSYM WBEM_E_UNPARSABLE_QUERY}
+ WBEM_E_NOT_EVENT_CLASS = DWORD($80041059);
+ {$EXTERNALSYM WBEM_E_NOT_EVENT_CLASS}
+ WBEM_E_MISSING_GROUP_WITHIN = DWORD($8004105a);
+ {$EXTERNALSYM WBEM_E_MISSING_GROUP_WITHIN}
+ WBEM_E_MISSING_AGGREGATION_LIST = DWORD($8004105b);
+ {$EXTERNALSYM WBEM_E_MISSING_AGGREGATION_LIST}
+ WBEM_E_PROPERTY_NOT_AN_OBJECT = DWORD($8004105c);
+ {$EXTERNALSYM WBEM_E_PROPERTY_NOT_AN_OBJECT}
+ WBEM_E_AGGREGATING_BY_OBJECT = DWORD($8004105d);
+ {$EXTERNALSYM WBEM_E_AGGREGATING_BY_OBJECT}
+ WBEM_E_UNINTERPRETABLE_PROVIDER_QUERY = DWORD($8004105f);
+ {$EXTERNALSYM WBEM_E_UNINTERPRETABLE_PROVIDER_QUERY}
+ WBEM_E_BACKUP_RESTORE_WINMGMT_RUNNING = DWORD($80041060);
+ {$EXTERNALSYM WBEM_E_BACKUP_RESTORE_WINMGMT_RUNNING}
+ WBEM_E_QUEUE_OVERFLOW = DWORD($80041061);
+ {$EXTERNALSYM WBEM_E_QUEUE_OVERFLOW}
+ WBEM_E_PRIVILEGE_NOT_HELD = DWORD($80041062);
+ {$EXTERNALSYM WBEM_E_PRIVILEGE_NOT_HELD}
+ WBEM_E_INVALID_OPERATOR = DWORD($80041063);
+ {$EXTERNALSYM WBEM_E_INVALID_OPERATOR}
+ WBEM_E_LOCAL_CREDENTIALS = DWORD($80041064);
+ {$EXTERNALSYM WBEM_E_LOCAL_CREDENTIALS}
+ WBEM_E_CANNOT_BE_ABSTRACT = DWORD($80041065);
+ {$EXTERNALSYM WBEM_E_CANNOT_BE_ABSTRACT}
+ WBEM_E_AMENDED_OBJECT = DWORD($80041066);
+ {$EXTERNALSYM WBEM_E_AMENDED_OBJECT}
+ WBEM_E_CLIENT_TOO_SLOW = DWORD($80041067);
+ {$EXTERNALSYM WBEM_E_CLIENT_TOO_SLOW}
+ WBEM_E_NULL_SECURITY_DESCRIPTOR = DWORD($80041068);
+ {$EXTERNALSYM WBEM_E_NULL_SECURITY_DESCRIPTOR}
+ WBEM_E_TIMED_OUT = DWORD($80041069);
+ {$EXTERNALSYM WBEM_E_TIMED_OUT}
+ WBEM_E_INVALID_ASSOCIATION = DWORD($8004106a);
+ {$EXTERNALSYM WBEM_E_INVALID_ASSOCIATION}
+ WBEM_E_AMBIGUOUS_OPERATION = DWORD($8004106b);
+ {$EXTERNALSYM WBEM_E_AMBIGUOUS_OPERATION}
+ WBEM_E_QUOTA_VIOLATION = DWORD($8004106c);
+ {$EXTERNALSYM WBEM_E_QUOTA_VIOLATION}
+ WBEM_E_RESERVED_001 = DWORD($8004106d);
+ {$EXTERNALSYM WBEM_E_RESERVED_001}
+ WBEM_E_RESERVED_002 = DWORD($8004106e);
+ {$EXTERNALSYM WBEM_E_RESERVED_002}
+ WBEM_E_UNSUPPORTED_LOCALE = DWORD($8004106f);
+ {$EXTERNALSYM WBEM_E_UNSUPPORTED_LOCALE}
+ WBEM_E_HANDLE_OUT_OF_DATE = DWORD($80041070);
+ {$EXTERNALSYM WBEM_E_HANDLE_OUT_OF_DATE}
+ WBEM_E_CONNECTION_FAILED = DWORD($80041071);
+ {$EXTERNALSYM WBEM_E_CONNECTION_FAILED}
+ WBEM_E_INVALID_HANDLE_REQUEST = DWORD($80041072);
+ {$EXTERNALSYM WBEM_E_INVALID_HANDLE_REQUEST}
+ WBEM_E_PROPERTY_NAME_TOO_WIDE = DWORD($80041073);
+ {$EXTERNALSYM WBEM_E_PROPERTY_NAME_TOO_WIDE}
+ WBEM_E_CLASS_NAME_TOO_WIDE = DWORD($80041074);
+ {$EXTERNALSYM WBEM_E_CLASS_NAME_TOO_WIDE}
+ WBEM_E_METHOD_NAME_TOO_WIDE = DWORD($80041075);
+ {$EXTERNALSYM WBEM_E_METHOD_NAME_TOO_WIDE}
+ WBEM_E_QUALIFIER_NAME_TOO_WIDE = DWORD($80041076);
+ {$EXTERNALSYM WBEM_E_QUALIFIER_NAME_TOO_WIDE}
+ WBEM_E_RERUN_COMMAND = DWORD($80041077);
+ {$EXTERNALSYM WBEM_E_RERUN_COMMAND}
+ WBEM_E_DATABASE_VER_MISMATCH = DWORD($80041078);
+ {$EXTERNALSYM WBEM_E_DATABASE_VER_MISMATCH}
+ WBEM_E_VETO_DELETE = DWORD($80041079);
+ {$EXTERNALSYM WBEM_E_VETO_DELETE}
+ WBEM_E_VETO_PUT = DWORD($8004107a);
+ {$EXTERNALSYM WBEM_E_VETO_PUT}
+ WBEM_E_INVALID_LOCALE = DWORD($80041080);
+ {$EXTERNALSYM WBEM_E_INVALID_LOCALE}
+ WBEM_E_PROVIDER_SUSPENDED = DWORD($80041081);
+ {$EXTERNALSYM WBEM_E_PROVIDER_SUSPENDED}
+ WBEM_E_SYNCHRONIZATION_REQUIRED = DWORD($80041082);
+ {$EXTERNALSYM WBEM_E_SYNCHRONIZATION_REQUIRED}
+ WBEM_E_NO_SCHEMA = DWORD($80041083);
+ {$EXTERNALSYM WBEM_E_NO_SCHEMA}
+ WBEM_E_PROVIDER_ALREADY_REGISTERED = DWORD($80041084);
+ {$EXTERNALSYM WBEM_E_PROVIDER_ALREADY_REGISTERED}
+ WBEM_E_PROVIDER_NOT_REGISTERED = DWORD($80041085);
+ {$EXTERNALSYM WBEM_E_PROVIDER_NOT_REGISTERED}
+ WBEM_E_FATAL_TRANSPORT_ERROR = DWORD($80041086);
+ {$EXTERNALSYM WBEM_E_FATAL_TRANSPORT_ERROR}
+ WBEM_E_ENCRYPTED_CONNECTION_REQUIRED = DWORD($80041087);
+ {$EXTERNALSYM WBEM_E_ENCRYPTED_CONNECTION_REQUIRED}
+ WBEM_E_PROVIDER_TIMED_OUT = DWORD($80041088);
+ {$EXTERNALSYM WBEM_E_PROVIDER_TIMED_OUT}
+ WBEM_E_NO_KEY = DWORD($80041089);
+ {$EXTERNALSYM WBEM_E_NO_KEY}
+ WBEM_E_PROVIDER_DISABLED = DWORD($8004108a);
+ {$EXTERNALSYM WBEM_E_PROVIDER_DISABLED}
+ WBEMESS_E_REGISTRATION_TOO_BROAD = DWORD($80042001);
+ {$EXTERNALSYM WBEMESS_E_REGISTRATION_TOO_BROAD}
+ WBEMESS_E_REGISTRATION_TOO_PRECISE = DWORD($80042002);
+ {$EXTERNALSYM WBEMESS_E_REGISTRATION_TOO_PRECISE}
+ WBEMMOF_E_EXPECTED_QUALIFIER_NAME = DWORD($80044001);
+ {$EXTERNALSYM WBEMMOF_E_EXPECTED_QUALIFIER_NAME}
+ WBEMMOF_E_EXPECTED_SEMI = DWORD($80044002);
+ {$EXTERNALSYM WBEMMOF_E_EXPECTED_SEMI}
+ WBEMMOF_E_EXPECTED_OPEN_BRACE = DWORD($80044003);
+ {$EXTERNALSYM WBEMMOF_E_EXPECTED_OPEN_BRACE}
+ WBEMMOF_E_EXPECTED_CLOSE_BRACE = DWORD($80044004);
+ {$EXTERNALSYM WBEMMOF_E_EXPECTED_CLOSE_BRACE}
+ WBEMMOF_E_EXPECTED_CLOSE_BRACKET = DWORD($80044005);
+ {$EXTERNALSYM WBEMMOF_E_EXPECTED_CLOSE_BRACKET}
+ WBEMMOF_E_EXPECTED_CLOSE_PAREN = DWORD($80044006);
+ {$EXTERNALSYM WBEMMOF_E_EXPECTED_CLOSE_PAREN}
+ WBEMMOF_E_ILLEGAL_CONSTANT_VALUE = DWORD($80044007);
+ {$EXTERNALSYM WBEMMOF_E_ILLEGAL_CONSTANT_VALUE}
+ WBEMMOF_E_EXPECTED_TYPE_IDENTIFIER = DWORD($80044008);
+ {$EXTERNALSYM WBEMMOF_E_EXPECTED_TYPE_IDENTIFIER}
+ WBEMMOF_E_EXPECTED_OPEN_PAREN = DWORD($80044009);
+ {$EXTERNALSYM WBEMMOF_E_EXPECTED_OPEN_PAREN}
+ WBEMMOF_E_UNRECOGNIZED_TOKEN = DWORD($8004400a);
+ {$EXTERNALSYM WBEMMOF_E_UNRECOGNIZED_TOKEN}
+ WBEMMOF_E_UNRECOGNIZED_TYPE = DWORD($8004400b);
+ {$EXTERNALSYM WBEMMOF_E_UNRECOGNIZED_TYPE}
+ WBEMMOF_E_EXPECTED_PROPERTY_NAME = DWORD($8004400c);
+ {$EXTERNALSYM WBEMMOF_E_EXPECTED_PROPERTY_NAME}
+ WBEMMOF_E_TYPEDEF_NOT_SUPPORTED = DWORD($8004400d);
+ {$EXTERNALSYM WBEMMOF_E_TYPEDEF_NOT_SUPPORTED}
+ WBEMMOF_E_UNEXPECTED_ALIAS = DWORD($8004400e);
+ {$EXTERNALSYM WBEMMOF_E_UNEXPECTED_ALIAS}
+ WBEMMOF_E_UNEXPECTED_ARRAY_INIT = DWORD($8004400f);
+ {$EXTERNALSYM WBEMMOF_E_UNEXPECTED_ARRAY_INIT}
+ WBEMMOF_E_INVALID_AMENDMENT_SYNTAX = DWORD($80044010);
+ {$EXTERNALSYM WBEMMOF_E_INVALID_AMENDMENT_SYNTAX}
+ WBEMMOF_E_INVALID_DUPLICATE_AMENDMENT = DWORD($80044011);
+ {$EXTERNALSYM WBEMMOF_E_INVALID_DUPLICATE_AMENDMENT}
+ WBEMMOF_E_INVALID_PRAGMA = DWORD($80044012);
+ {$EXTERNALSYM WBEMMOF_E_INVALID_PRAGMA}
+ WBEMMOF_E_INVALID_NAMESPACE_SYNTAX = DWORD($80044013);
+ {$EXTERNALSYM WBEMMOF_E_INVALID_NAMESPACE_SYNTAX}
+ WBEMMOF_E_EXPECTED_CLASS_NAME = DWORD($80044014);
+ {$EXTERNALSYM WBEMMOF_E_EXPECTED_CLASS_NAME}
+ WBEMMOF_E_TYPE_MISMATCH = DWORD($80044015);
+ {$EXTERNALSYM WBEMMOF_E_TYPE_MISMATCH}
+ WBEMMOF_E_EXPECTED_ALIAS_NAME = DWORD($80044016);
+ {$EXTERNALSYM WBEMMOF_E_EXPECTED_ALIAS_NAME}
+ WBEMMOF_E_INVALID_CLASS_DECLARATION = DWORD($80044017);
+ {$EXTERNALSYM WBEMMOF_E_INVALID_CLASS_DECLARATION}
+ WBEMMOF_E_INVALID_INSTANCE_DECLARATION = DWORD($80044018);
+ {$EXTERNALSYM WBEMMOF_E_INVALID_INSTANCE_DECLARATION}
+ WBEMMOF_E_EXPECTED_DOLLAR = DWORD($80044019);
+ {$EXTERNALSYM WBEMMOF_E_EXPECTED_DOLLAR}
+ WBEMMOF_E_CIMTYPE_QUALIFIER = DWORD($8004401a);
+ {$EXTERNALSYM WBEMMOF_E_CIMTYPE_QUALIFIER}
+ WBEMMOF_E_DUPLICATE_PROPERTY = DWORD($8004401b);
+ {$EXTERNALSYM WBEMMOF_E_DUPLICATE_PROPERTY}
+ WBEMMOF_E_INVALID_NAMESPACE_SPECIFICATION = DWORD($8004401c);
+ {$EXTERNALSYM WBEMMOF_E_INVALID_NAMESPACE_SPECIFICATION}
+ WBEMMOF_E_OUT_OF_RANGE = DWORD($8004401d);
+ {$EXTERNALSYM WBEMMOF_E_OUT_OF_RANGE}
+ WBEMMOF_E_INVALID_FILE = DWORD($8004401e);
+ {$EXTERNALSYM WBEMMOF_E_INVALID_FILE}
+ WBEMMOF_E_ALIASES_IN_EMBEDDED = DWORD($8004401f);
+ {$EXTERNALSYM WBEMMOF_E_ALIASES_IN_EMBEDDED}
+ WBEMMOF_E_NULL_ARRAY_ELEM = DWORD($80044020);
+ {$EXTERNALSYM WBEMMOF_E_NULL_ARRAY_ELEM}
+ WBEMMOF_E_DUPLICATE_QUALIFIER = DWORD($80044021);
+ {$EXTERNALSYM WBEMMOF_E_DUPLICATE_QUALIFIER}
+ WBEMMOF_E_EXPECTED_FLAVOR_TYPE = DWORD($80044022);
+ {$EXTERNALSYM WBEMMOF_E_EXPECTED_FLAVOR_TYPE}
+ WBEMMOF_E_INCOMPATIBLE_FLAVOR_TYPES = DWORD($80044023);
+ {$EXTERNALSYM WBEMMOF_E_INCOMPATIBLE_FLAVOR_TYPES}
+ WBEMMOF_E_MULTIPLE_ALIASES = DWORD($80044024);
+ {$EXTERNALSYM WBEMMOF_E_MULTIPLE_ALIASES}
+ WBEMMOF_E_INCOMPATIBLE_FLAVOR_TYPES2 = DWORD($80044025);
+ {$EXTERNALSYM WBEMMOF_E_INCOMPATIBLE_FLAVOR_TYPES2}
+ WBEMMOF_E_NO_ARRAYS_RETURNED = DWORD($80044026);
+ {$EXTERNALSYM WBEMMOF_E_NO_ARRAYS_RETURNED}
+ WBEMMOF_E_MUST_BE_IN_OR_OUT = DWORD($80044027);
+ {$EXTERNALSYM WBEMMOF_E_MUST_BE_IN_OR_OUT}
+ WBEMMOF_E_INVALID_FLAGS_SYNTAX = DWORD($80044028);
+ {$EXTERNALSYM WBEMMOF_E_INVALID_FLAGS_SYNTAX}
+ WBEMMOF_E_EXPECTED_BRACE_OR_BAD_TYPE = DWORD($80044029);
+ {$EXTERNALSYM WBEMMOF_E_EXPECTED_BRACE_OR_BAD_TYPE}
+ WBEMMOF_E_UNSUPPORTED_CIMV22_QUAL_VALUE = DWORD($8004402a);
+ {$EXTERNALSYM WBEMMOF_E_UNSUPPORTED_CIMV22_QUAL_VALUE}
+ WBEMMOF_E_UNSUPPORTED_CIMV22_DATA_TYPE = DWORD($8004402b);
+ {$EXTERNALSYM WBEMMOF_E_UNSUPPORTED_CIMV22_DATA_TYPE}
+ WBEMMOF_E_INVALID_DELETEINSTANCE_SYNTAX = DWORD($8004402c);
+ {$EXTERNALSYM WBEMMOF_E_INVALID_DELETEINSTANCE_SYNTAX}
+ WBEMMOF_E_INVALID_QUALIFIER_SYNTAX = DWORD($8004402d);
+ {$EXTERNALSYM WBEMMOF_E_INVALID_QUALIFIER_SYNTAX}
+ WBEMMOF_E_QUALIFIER_USED_OUTSIDE_SCOPE = DWORD($8004402e);
+ {$EXTERNALSYM WBEMMOF_E_QUALIFIER_USED_OUTSIDE_SCOPE}
+ WBEMMOF_E_ERROR_CREATING_TEMP_FILE = DWORD($8004402f);
+ {$EXTERNALSYM WBEMMOF_E_ERROR_CREATING_TEMP_FILE}
+ WBEMMOF_E_ERROR_INVALID_INCLUDE_FILE = DWORD($80044030);
+ {$EXTERNALSYM WBEMMOF_E_ERROR_INVALID_INCLUDE_FILE}
+ WBEMMOF_E_INVALID_DELETECLASS_SYNTAX = DWORD($80044031);
+ {$EXTERNALSYM WBEMMOF_E_INVALID_DELETECLASS_SYNTAX}
+
+//const
+//EXTERN_C const IID LIBID_WbemClient_v1;
+
+const
+ IID_IWbemClassObject: TGUID = '{dc12a681-737f-11cf-884d-00aa004b2e24}';
+ {$EXTERNALSYM IID_IWbemClassObject}
+ IID_IWbemObjectAccess: TGUID = '{49353c9a-516b-11d1-aea6-00c04fb68820}';
+ {$EXTERNALSYM IID_IWbemObjectAccess}
+ IID_IWbemQualifierSet: TGUID = '{dc12a680-737f-11cf-884d-00aa004b2e24}';
+ {$EXTERNALSYM IID_IWbemQualifierSet}
+ IID_IWbemServices: TGUID = '{9556dc99-828c-11cf-a37e-00aa003240c7}';
+ {$EXTERNALSYM IID_IWbemServices}
+ IID_IWbemLocator: TGUID = '{dc12a687-737f-11cf-884d-00aa004b2e24}';
+ {$EXTERNALSYM IID_IWbemLocator}
+ IID_IWbemObjectSink: TGUID = '{7c857801-7381-11cf-884d-00aa004b2e24}';
+ {$EXTERNALSYM IID_IWbemObjectSink}
+ IID_IEnumWbemClassObject: TGUID = '{027947e1-d731-11ce-a357-000000000001}';
+ {$EXTERNALSYM IID_IEnumWbemClassObject}
+ IID_IWbemCallResult: TGUID = '{44aca675-e8fc-11d0-a07c-00c04fb68820}';
+ {$EXTERNALSYM IID_IWbemCallResult}
+ IID_IWbemContext: TGUID = '{44aca674-e8fc-11d0-a07c-00c04fb68820}';
+ {$EXTERNALSYM IID_IWbemContext}
+ IID_IUnsecuredApartment: TGUID = '{1cfaba8c-1523-11d1-ad79-00c04fd8fdff}';
+ {$EXTERNALSYM IID_IUnsecuredApartment}
+ IID_IWbemUnsecuredApartment: TGUID = '{31739d04-3471-4cf4-9a7c-57a44ae71956}';
+ {$EXTERNALSYM IID_IWbemUnsecuredApartment}
+ IID_IWbemStatusCodeText: TGUID = '{eb87e1bc-3233-11d2-aec9-00c04fb68820}';
+ {$EXTERNALSYM IID_IWbemStatusCodeText}
+ IID_IWbemBackupRestore: TGUID = '{C49E32C7-BC8B-11d2-85D4-00105A1F8304}';
+ {$EXTERNALSYM IID_IWbemBackupRestore}
+ IID_IWbemBackupRestoreEx: TGUID = '{A359DEC5-E813-4834-8A2A-BA7F1D777D76}';
+ {$EXTERNALSYM IID_IWbemBackupRestoreEx}
+ IID_IWbemRefresher: TGUID = '{49353c99-516b-11d1-aea6-00c04fb68820}';
+ {$EXTERNALSYM IID_IWbemRefresher}
+ IID_IWbemHiPerfEnum: TGUID = '{2705C288-79AE-11d2-B348-00105A1F8177}';
+ {$EXTERNALSYM IID_IWbemHiPerfEnum}
+ IID_IWbemConfigureRefresher: TGUID = '{49353c92-516b-11d1-aea6-00c04fb68820}';
+ {$EXTERNALSYM IID_IWbemConfigureRefresher}
+
+type
+ // forward declarations
+
+ IWbemQualifierSet = interface;
+ IWbemContext = interface;
+ IWbemCallResult = interface;
+ IWbemObjectSink = interface;
+ IEnumWbemClassObject = interface;
+
+ IWbemClassObject = interface(IUnknown)
+ ['{dc12a681-737f-11cf-884d-00aa004b2e24}']
+ function GetQualifierSet(out ppQualSet: IWbemQualifierSet): HRESULT; stdcall;
+ function Get(wszName: LPCWSTR; lFlags: Longint; var pVal: OleVariant; var pType: CIMTYPE; var plFlavor: Longint): HRESULT; stdcall;
+ function Put(wszName: LPCWSTR; lFlags: Longint; pVal: POleVariant; Type_: CIMTYPE): HRESULT; stdcall;
+ function Delete(wszName: LPCWSTR): HRESULT; stdcall;
+ function GetNames(wszQualifierName: LPCWSTR; lFlags: Longint; pQualifierVal: POleVariant; out pNames: PSafeArray): HRESULT; stdcall;
+ function BeginEnumeration(lEnumFlags: Longint): HRESULT; stdcall;
+ function Next(lFlags: Longint; var strName: WideString; var pVal: OleVariant; var pType: CIMTYPE; var plFlavor: Longint): HRESULT; stdcall;
+ function EndEnumeration: HRESULT; stdcall;
+ function GetPropertyQualifierSet(wszProperty: LPCWSTR; out ppQualSet: IWbemQualifierSet): HRESULT; stdcall;
+ function Clone(out ppCopy: IWbemClassObject): HRESULT; stdcall;
+ function GetObjectText(lFlags: Longint; out pstrObjectText: WideString): HRESULT; stdcall;
+ function SpawnDerivedClass(lFlags: Longint; out ppNewClass: IWbemClassObject): HRESULT; stdcall;
+ function SpawnInstance(lFlags: Longint; out ppNewInstance: IWbemClassObject): HRESULT; stdcall;
+ function CompareTo(lFlags: Longint; pCompareTo: IWbemClassObject): HRESULT; stdcall;
+ function GetPropertyOrigin(wszName: LPCWSTR; out pstrClassName: WideString): HRESULT; stdcall;
+ function InheritsFrom(strAncestor: LPCWSTR): HRESULT; stdcall;
+ function GetMethod(wszName: LPCWSTR; lFlags: Longint; out ppInSignature, ppOutSignature: IWbemClassObject): HRESULT; stdcall;
+ function PutMethod(wszName: LPCWSTR; lFlags: Longint; pInSignature, pOutSignature: IWbemClassObject): HRESULT; stdcall;
+ function DeleteMethod(wszName: LPCWSTR): HRESULT; stdcall;
+ function BeginMethodEnumeration(lEnumFlags: Longint): HRESULT; stdcall;
+ function NextMethod(lFlags: Longint; var pstrName: WideString; var ppInSignature, ppOutSignature: IWbemClassObject): HRESULT; stdcall;
+ function EndMethodEnumeration: HRESULT; stdcall;
+ function GetMethodQualifierSet(wszMethod: LPCWSTR; out ppQualSet: IWbemQualifierSet): HRESULT; stdcall;
+ function GetMethodOrigin(wszMethodName: LPCWSTR; out pstrClassName: WideString): HRESULT; stdcall;
+ end;
+ {$EXTERNALSYM IWbemClassObject}
+
+ IWbemObjectAccess = interface(IWbemClassObject)
+ ['{49353c9a-516b-11d1-aea6-00c04fb68820}']
+ function GetPropertyHandle(wszPropertyName: LPCWSTR; out pType: CIMTYPE; out plHandle: Longint): HRESULT; stdcall;
+ function WritePropertyValue(lHandle, lNumBytes: Longint; aData: LPBYTE): HRESULT; stdcall;
+ function ReadPropertyValue(lHandle, lBufferSize: Longint; out plNumBytes: Longint; aData: LPBYTE): HRESULT; stdcall;
+ function ReadDWORD(lHandle: Longint; out pdw: DWORD): HRESULT; stdcall;
+ function WriteDWORD(lHandle: Longint; dw: DWORD): HRESULT; stdcall;
+ function ReadQWORD(lHandle: Longint; out pqw: Int64): HRESULT; stdcall;
+ function WriteQWORD(lHandle: Longint; pw: Int64): HRESULT; stdcall;
+ function GetPropertyInfoByHandle(lHandle: Longint; out pstrName: WideString; out pType: CIMTYPE): HRESULT; stdcall;
+ function Lock(lFlags: Longint): HRESULT; stdcall;
+ function Unlock(lFlags: Longint): HRESULT; stdcall;
+ end;
+ {$EXTERNALSYM IWbemObjectAccess}
+
+ IWbemQualifierSet = interface(IUnknown)
+ ['{dc12a680-737f-11cf-884d-00aa004b2e24}']
+ function Get(wszName: LPCWSTR; lFlags: Longint; var pVal: OleVariant; var plFlavor: Longint): HRESULT; stdcall;
+ function Put(wszName: LPCWSTR; pVal: POleVariant; lFlavor: Longint): HRESULT; stdcall;
+ function Delete(wszName: LPCWSTR): HRESULT; stdcall;
+ function GetNames(lFlags: Longint; out pNames: PSafeArray): HRESULT; stdcall;
+ function BeginEnumeration(lFlags: Longint): HRESULT; stdcall;
+ function Next(lFlags: Longint; var pstrName: WideString; var pVal: OleVariant; var plFlavor: Longint): HRESULT; stdcall;
+ function EndEnumeration: HRESULT; stdcall;
+ end;
+ {$EXTERNALSYM IWbemQualifierSet}
+
+ IWbemServices = interface(IUnknown)
+ ['{9556dc99-828c-11cf-a37e-00aa003240c7}']
+ function OpenNamespace(strNamespace: WideString; lFlags: Longint; pCtx: IWbemContext; out ppWorkingNamespace: IWbemServices; out ppResult: IWbemCallResult): HRESULT; stdcall;
+ function CancelAsyncCall(pSink: IWbemObjectSink): HRESULT; stdcall;
+ function QueryObjectSink(lFlags: Longint; out ppResponseHandler: IWbemObjectSink): HRESULT; stdcall;
+ function GetObject(strObjectPath: WideString; lFlags: Longint; pCtx: IWbemContext; out ppObject: IWbemClassObject; out ppCallResult: IWbemCallResult): HRESULT; stdcall;
+ function GetObjectAsync(strObjectPath: WideString; lFlags: Longint; pCtx: IWbemContext; pResponseHandler: IWbemObjectSink): HRESULT; stdcall;
+ function PutClass(pObject: IWbemClassObject; lFlags: Longint; pCtx: IWbemContext; out ppCallResult: IWbemCallResult): HRESULT; stdcall;
+ function PutClassAsync(pObject: IWbemClassObject; lFlags: Longint; pCtx: IWbemContext; pResponseHandler: IWbemObjectSink): HRESULT; stdcall;
+ function DeleteClass(strClass: WideString; lFlags: Longint; pCtx: IWbemContext; out ppCallResult: IWbemCallResult): HRESULT; stdcall;
+ function DeleteClassAsync(strClass: WideString; lFlags: Longint; pCtx: IWbemContext; pResponseHandler: IWbemObjectSink): HRESULT; stdcall;
+ function CreateClassEnum(strSuperclass: WideString; lFlags: Longint; pCtx: IWbemContext; out ppEnum: IEnumWbemClassObject): HRESULT; stdcall;
+ function CreateClassEnumAsync(strSuperclass: WideString; lFlags: Longint; pCtx: IWbemContext; pResponseHandler: IWbemObjectSink): HRESULT; stdcall;
+ function PutInstance(pInst: IWbemClassObject; lFlags: Longint; pCtx: IWbemContext; out ppCallResult: IWbemCallResult): HRESULT; stdcall;
+ function PutInstanceAsync(pInst: IWbemClassObject; lFlags: Longint; pCtx: IWbemContext; pResponseHandler: IWbemObjectSink): HRESULT; stdcall;
+ function DeleteInstance(strObjectPath: WideString; lFlags: Longint; pCtx: IWbemContext; out ppCallResult: IWbemCallResult): HRESULT; stdcall;
+ function DeleteInstanceAsync(strObjectPath: WideString; lFlags: Longint; pCtx: IWbemContext; pResponseHandler: IWbemObjectSink): HRESULT; stdcall;
+ function CreateInstanceEnum(strFilter: WideString; lFlags: Longint; pCtx: IWbemContext; out ppEnum: IEnumWbemClassObject): HRESULT; stdcall;
+ function CreateInstanceEnumAsync(strFilter: WideString; lFlags: Longint; pCtx: IWbemContext; pResponseHandler: IWbemObjectSink): HRESULT; stdcall;
+ function ExecQuery(strQueryLanguage, strQuery: WideString; lFlags: Longint; pCtx: IWbemContext; out ppEnum: IEnumWbemClassObject): HRESULT; stdcall;
+ function ExecQueryAsync(strQueryLanguage, strQuery: WideString; lFlags: Longint; pCtx: IWbemContext; pResponseHandler: IWbemObjectSink): HRESULT; stdcall;
+ function ExecNotificationQuery(strQueryLanguage, strQuery: WideString; lFlags: Longint; pCtx: IWbemContext; out ppEnum: IEnumWbemClassObject): HRESULT; stdcall;
+ function ExecNotificationQueryAsync(strQueryLanguage, strQuery: WideString; lFlags: Longint; pCtx: IWbemContext; pResponseHandler: IWbemObjectSink): HRESULT; stdcall;
+ function ExecMethod(strObjectPath, strMethodName: WideString; lFlags: Longint; pCtx: IWbemContext; pInParams: IWbemClassObject; out ppOutParams: IWbemClassObject; out ppCallResult: IWbemCallResult): HRESULT; stdcall;
+ function ExecMethodAsync(strObjectPath, strMethodName: WideString; lFlags: Longint; pCtx: IWbemContext; pInParams: IWbemClassObject; pResponseHandler: IWbemObjectSink): HRESULT; stdcall;
+ end;
+ {$EXTERNALSYM IWbemServices}
+
+ IWbemLocator = interface(IUnknown)
+ ['{dc12a687-737f-11cf-884d-00aa004b2e24}']
+ function ConnectServer(strNetworkResource, strUser, strPassword, strLocale: WideString; lSecurityFlags: Longint;
+ strAuthority: WideString; pCtx: IWbemContext; out ppNamespace: IWbemServices): HRESULT; stdcall;
+ end;
+ {$EXTERNALSYM IWbemLocator}
+
+ IWbemObjectSink = interface(IUnknown)
+ ['{7c857801-7381-11cf-884d-00aa004b2e24}']
+ function Indicate(lObjectCount: Longint; var apObjArray: IWbemClassObject{todo}): HRESULT; stdcall;
+ function SetStatus(lFlags: Longint; hResult: HRESULT; strParam: WideString; pObjParam: IWbemClassObject): HRESULT; stdcall;
+ end;
+ {$EXTERNALSYM IWbemObjectSink}
+
+ IEnumWbemClassObject = interface(IUnknown)
+ ['{027947e1-d731-11ce-a357-000000000001}']
+ function Reset: HRESULT; stdcall;
+ function Next(lTimeout: Longint; uCount: ULONG; out apObjects: IWbemClassObject; out puReturned: ULONG): HRESULT; stdcall;
+ function NextAsync(uCount: ULONG; pSink: IWbemObjectSink): HRESULT; stdcall;
+ function Clone(out ppEnum: IEnumWbemClassObject): HRESULT; stdcall;
+ function Skip(lTimeout: Longint; nCount: ULONG): HRESULT; stdcall;
+ end;
+ {$EXTERNALSYM IEnumWbemClassObject}
+
+ IWbemCallResult = interface(IUnknown)
+ ['{44aca675-e8fc-11d0-a07c-00c04fb68820}']
+ function GetResultObject(lTimeout: Longint; out ppResultObject: IWbemClassObject): HRESULT; stdcall;
+ function GetResultString(lTimeout: Longint; out pstrResultString: WideString): HRESULT; stdcall;
+ function GetResultServices(lTimeout: Longint; out ppServices: IWbemServices): HRESULT; stdcall;
+ function GetCallStatus(lTimeout: Longint; out plStatus: Longint): HRESULT; stdcall;
+ end;
+ {$EXTERNALSYM IWbemCallResult}
+
+ IWbemContext = interface(IUnknown)
+ ['{44aca674-e8fc-11d0-a07c-00c04fb68820}']
+ function Clone(out ppNewCopy: IWbemContext): HRESULT; stdcall;
+ function GetNames(lFlags: Longint; out pNames: PSafeArray): HRESULT; stdcall;
+ function BeginEnumeration(lFlags: Longint): HRESULT; stdcall;
+ function Next(lFlags: Longint; out pstrName: WideString; out pValue: OleVariant): HRESULT; stdcall;
+ function EndEnumeration: HRESULT; stdcall;
+ function SetValue(wszName: LPCWSTR; lFlags: Longint; pValue: POleVariant): HRESULT; stdcall;
+ function GetValue(wszName: LPCWSTR; lFlags: Longint; out pValue: OleVariant): HRESULT; stdcall;
+ function DeleteValue(wszName: LPCWSTR; lFlags: Longint): HRESULT; stdcall;
+ function DeleteAll: HRESULT; stdcall;
+ end;
+ {$EXTERNALSYM IWbemContext}
+
+ IUnsecuredApartment = interface(IUnknown)
+ ['{1cfaba8c-1523-11d1-ad79-00c04fd8fdff}']
+ function CreateObjectStub(pObject: IUnknown; out ppStub: IUnknown): HRESULT; stdcall;
+ end;
+ {$EXTERNALSYM IUnsecuredApartment}
+
+ IWbemUnsecuredApartment = interface(IUnsecuredApartment)
+ ['{31739d04-3471-4cf4-9a7c-57a44ae71956}']
+ function CreateSinkStub(pSink: IWbemObjectSink; dwFlags: DWORD; wszReserved: LPCWSTR; out ppStub: IWbemObjectSink): HRESULT; stdcall;
+ end;
+ {$EXTERNALSYM IWbemUnsecuredApartment}
+
+ IWbemStatusCodeText = interface(IUnknown)
+ ['{eb87e1bc-3233-11d2-aec9-00c04fb68820}']
+ function GetErrorCodeText(hRes: HRESULT; LocaleId: LCID; lFlags: Longint; out MessageText: WideString): HRESULT; stdcall;
+ function GetFacilityCodeText(hRes: HRESULT; LocaleId: LCID; lFlags: Longint; out MessageText: WideString): HRESULT; stdcall;
+ end;
+ {$EXTERNALSYM IWbemStatusCodeText}
+
+ IWbemBackupRestore = interface(IUnknown)
+ ['{C49E32C7-BC8B-11d2-85D4-00105A1F8304}']
+ function Backup(strBackupToFile: LPCWSTR; lFlags: Longint): HRESULT; stdcall;
+ function Restore(strRestoreFromFile: LPCWSTR; lFlags: Longint): HRESULT; stdcall;
+ end;
+ {$EXTERNALSYM IWbemBackupRestore}
+
+ IWbemBackupRestoreEx = interface(IWbemBackupRestore)
+ ['{A359DEC5-E813-4834-8A2A-BA7F1D777D76}']
+ function Pause: HRESULT; stdcall;
+ function Resume: HRESULT; stdcall;
+ end;
+ {$EXTERNALSYM IWbemBackupRestoreEx}
+
+ IWbemRefresher = interface(IUnknown)
+ ['{49353c99-516b-11d1-aea6-00c04fb68820}']
+ function Refresh(lFlags: Longint): HRESULT; stdcall;
+ end;
+ {$EXTERNALSYM IWbemRefresher}
+
+ PIWbemObjectAccess = ^IWbemObjectAccess;
+
+ PLongint = ^Longint; // TODO PLongint introduced in Delphi 6
+
+ IWbemHiPerfEnum = interface(IUnknown)
+ ['{2705C288-79AE-11d2-B348-00105A1F8177}']
+ function AddObjects(lFlags: Longint; uNumObjects: ULONG; apIds: PLongint; apObj: PIWbemObjectAccess): HRESULT; stdcall;
+ function RemoveObjects(lFlags: Longint; uNumObjects: ULONG; apIds: PLongint): HRESULT; stdcall;
+ function GetObjects(lFlags: Longint; uNumObjects: ULONG; out apObj: IWbemObjectAccess; out puReturned: ULONG): HRESULT; stdcall;
+ function RemoveAll(lFlags: Longint): HRESULT; stdcall;
+ end;
+ {$EXTERNALSYM IWbemHiPerfEnum}
+
+ IWbemConfigureRefresher = interface(IUnknown)
+ ['{49353c92-516b-11d1-aea6-00c04fb68820}']
+ function AddObjectByPath(pNamespace: IWbemServices; wszPath: LPCWSTR; lFlags: Longint; pContext: IWbemContext; out ppRefreshable: IWbemClassObject; var plId: Longint): HRESULT; stdcall;
+ function AddObjectByTemplate(pNamespace: IWbemServices; pTemplate: IWbemClassObject; lFlags: Longint; pContext: IWbemContext; out ppRefreshable: IWbemClassObject; var plId: Longint): HRESULT; stdcall;
+ function AddRefresher(pRefresher: IWbemRefresher; lFlags: Longint; var plId: Longint): HRESULT; stdcall;
+ function Remove(lId, lFlags: Longint): HRESULT; stdcall;
+ function AddEnum(pNamespace: IWbemServices; wszClassName: LPCWSTR; lFlags: Longint; pContext: IWbemContext; out ppEnum: IWbemHiPerfEnum; var plId: Longint): HRESULT; stdcall;
+ end;
+ {$EXTERNALSYM IWbemConfigureRefresher}
+
+const
+ CLSID_WbemLocator: TGUID = '{4590f811-1d3a-11d0-891f-00aa004b2e24}';
+ {$EXTERNALSYM CLSID_WbemLocator}
+ CLSID_WbemContext: TGUID = '{674B6698-EE92-11d0-AD71-00C04FD8FDFF}';
+ {$EXTERNALSYM CLSID_WbemContext}
+ CLSID_UnsecuredApartment: TGUID = '{49bd2028-1523-11d1-ad79-00c04fd8fdff}';
+ {$EXTERNALSYM CLSID_UnsecuredApartment}
+ CLSID_WbemClassObject: TGUID = '{9A653086-174F-11d2-B5F9-00104B703EFD}';
+ {$EXTERNALSYM CLSID_WbemClassObject}
+ CLSID_MofCompiler: TGUID = '{6daf9757-2e37-11d2-aec9-00c04fb68820}';
+ {$EXTERNALSYM CLSID_MofCompiler}
+ CLSID_WbemStatusCodeText: TGUID = '{eb87e1bd-3233-11d2-aec9-00c04fb68820}';
+ {$EXTERNALSYM CLSID_WbemStatusCodeText}
+ CLSID_WbemBackupRestore: TGUID = '{C49E32C6-BC8B-11d2-85D4-00105A1F8304}';
+ {$EXTERNALSYM CLSID_WbemBackupRestore}
+ CLSID_WbemRefresher: TGUID = '{c71566f2-561e-11d1-ad87-00c04fd8fdff}';
+ {$EXTERNALSYM CLSID_WbemRefresher}
+ CLSID_WbemObjectTextSrc: TGUID = '{8D1C559D-84F0-4bb3-A7D5-56A7435A9BA6}';
+ {$EXTERNALSYM CLSID_WbemObjectTextSrc}
+
+const
+ IID_IWbemShutdown: TGUID = '{b7b31df9-d515-11d3-a11c-00105a1f515a}';
+ {$EXTERNALSYM IID_IWbemShutdown}
+
+type
+ IWbemShutdown = interface(IUnknown)
+ ['{b7b31df9-d515-11d3-a11c-00105a1f515a}']
+ function Shutdown(uReason: LONG; uMaxMilliseconds: ULONG; pCtx: IWbemContext): HRESULT; stdcall;
+ end;
+ {$EXTERNALSYM IWbemShutdown}
+
+type
+ tag_WMI_OBJ_TEXT = DWORD;
+ {$EXTERNALSYM tag_WMI_OBJ_TEXT}
+ WMI_OBJ_TEXT = tag_WMI_OBJ_TEXT;
+ {$EXTERNALSYM WMI_OBJ_TEXT}
+ TWmiObjText = WMI_OBJ_TEXT;
+
+const
+ WMI_OBJ_TEXT_CIM_DTD_2_0 = 1;
+ {$EXTERNALSYM WMI_OBJ_TEXT_CIM_DTD_2_0}
+ WMI_OBJ_TEXT_WMI_DTD_2_0 = 2;
+ {$EXTERNALSYM WMI_OBJ_TEXT_WMI_DTD_2_0}
+ WMI_OBJ_TEXT_WMI_EXT1 = 3;
+ {$EXTERNALSYM WMI_OBJ_TEXT_WMI_EXT1}
+ WMI_OBJ_TEXT_WMI_EXT2 = 4;
+ {$EXTERNALSYM WMI_OBJ_TEXT_WMI_EXT2}
+ WMI_OBJ_TEXT_WMI_EXT3 = 5;
+ {$EXTERNALSYM WMI_OBJ_TEXT_WMI_EXT3}
+ WMI_OBJ_TEXT_WMI_EXT4 = 6;
+ {$EXTERNALSYM WMI_OBJ_TEXT_WMI_EXT4}
+ WMI_OBJ_TEXT_WMI_EXT5 = 7;
+ {$EXTERNALSYM WMI_OBJ_TEXT_WMI_EXT5}
+ WMI_OBJ_TEXT_WMI_EXT6 = 8;
+ {$EXTERNALSYM WMI_OBJ_TEXT_WMI_EXT6}
+ WMI_OBJ_TEXT_WMI_EXT7 = 9;
+ {$EXTERNALSYM WMI_OBJ_TEXT_WMI_EXT7}
+ WMI_OBJ_TEXT_WMI_EXT8 = 10;
+ {$EXTERNALSYM WMI_OBJ_TEXT_WMI_EXT8}
+ WMI_OBJ_TEXT_WMI_EXT9 = 11;
+ {$EXTERNALSYM WMI_OBJ_TEXT_WMI_EXT9}
+ WMI_OBJ_TEXT_WMI_EXT10 = 12;
+ {$EXTERNALSYM WMI_OBJ_TEXT_WMI_EXT10}
+ WMI_OBJ_TEXT_LAST = 13;
+ {$EXTERNALSYM WMI_OBJ_TEXT_LAST}
+
+const
+ IID_IWbemObjectTextSrc: TGUID = '{bfbf883a-cad7-11d3-a11b-00105a1f515a}';
+ {$EXTERNALSYM IID_IWbemObjectTextSrc}
+
+type
+ IWbemObjectTextSrc = interface(IUnknown)
+ ['{bfbf883a-cad7-11d3-a11b-00105a1f515a}']
+ function GetText(lFlags: Longint; pObj: IWbemClassObject; uObjTextFormat: ULONG; pCtx: IWbemContext; out strText: WideString): HRESULT; stdcall;
+ function CreateFromText(lFlags: Longint; strText: WideString; uObjTextFormat: ULONG; pCtx: IWbemContext; out pNewObj:IWbemClassObject): HRESULT; stdcall;
+ end;
+ {$EXTERNALSYM IWbemObjectTextSrc}
+
+const
+ IID_IMofCompiler: TGUID = '{6daf974e-2e37-11d2-aec9-00c04fb68820}';
+ {$EXTERNALSYM IID_IMofCompiler}
+
+type
+ tag_CompileStatusInfo = record
+ lPhaseError: Longint;
+ hRes: HRESULT;
+ ObjectNum: Longint;
+ FirstLine: Longint;
+ LastLine: Longint;
+ dwOutFlags: DWORD;
+ end;
+ {$EXTERNALSYM tag_CompileStatusInfo}
+ WBEM_COMPILE_STATUS_INFO = tag_CompileStatusInfo;
+ {$EXTERNALSYM WBEM_COMPILE_STATUS_INFO}
+ TWbemCompileStatusInfo = WBEM_COMPILE_STATUS_INFO;
+
+type
+ tag_WBEM_COMPILER_OPTIONS = DWORD;
+ {$EXTERNALSYM tag_WBEM_COMPILER_OPTIONS}
+ WBEM_COMPILER_OPTIONS = tag_WBEM_COMPILER_OPTIONS;
+ {$EXTERNALSYM WBEM_COMPILER_OPTIONS}
+ TWbemCompilerOptions = WBEM_COMPILER_OPTIONS;
+
+const
+ WBEM_FLAG_CHECK_ONLY = $1;
+ {$EXTERNALSYM WBEM_FLAG_CHECK_ONLY}
+ WBEM_FLAG_AUTORECOVER = $2;
+ {$EXTERNALSYM WBEM_FLAG_AUTORECOVER}
+ WBEM_FLAG_WMI_CHECK = $4;
+ {$EXTERNALSYM WBEM_FLAG_WMI_CHECK}
+ WBEM_FLAG_CONSOLE_PRINT = $8;
+ {$EXTERNALSYM WBEM_FLAG_CONSOLE_PRINT}
+ WBEM_FLAG_DONT_ADD_TO_LIST = $10;
+ {$EXTERNALSYM WBEM_FLAG_DONT_ADD_TO_LIST}
+ WBEM_FLAG_SPLIT_FILES = $20;
+ {$EXTERNALSYM WBEM_FLAG_SPLIT_FILES}
+ WBEM_FLAG_STORE_FILE = $100;
+ {$EXTERNALSYM WBEM_FLAG_STORE_FILE}
+
+type
+ tag_WBEM_CONNECT_OPTIONS = DWORD;
+ {$EXTERNALSYM tag_WBEM_CONNECT_OPTIONS}
+ WBEM_CONNECT_OPTIONS = tag_WBEM_CONNECT_OPTIONS;
+ {$EXTERNALSYM WBEM_CONNECT_OPTIONS}
+ TWbemConnectOptions = WBEM_CONNECT_OPTIONS;
+
+const
+ WBEM_FLAG_CONNECT_REPOSITORY_ONLY = $40;
+ {$EXTERNALSYM WBEM_FLAG_CONNECT_REPOSITORY_ONLY}
+ WBEM_FLAG_CONNECT_USE_MAX_WAIT = $80;
+ {$EXTERNALSYM WBEM_FLAG_CONNECT_USE_MAX_WAIT}
+
+type
+ IMofCompiler = interface(IUnknown)
+ ['{6daf974e-2e37-11d2-aec9-00c04fb68820}']
+ function CompileFile(FileName, ServerAndNamespace, User, Authority, Password: LPWSTR;
+ lOptionFlags, lClassFlags, lInstanceFlags: LONG; var pInfo: WBEM_COMPILE_STATUS_INFO): HRESULT; stdcall;
+ function CompileBuffer(buffSize: Longint; pBuffer: LPBYTE; ServerAndNamespace, User, Authority, Password: LPWSTR;
+ lOptionFlags, lClassFlags, lInstanceFlags: LONG; var pInfo: WBEM_COMPILE_STATUS_INFO): HRESULT; stdcall;
+ function CreateBMOF(TextFileName, BMOFFileName, ServerAndNamespace: LPWSTR;
+ lOptionFlags, lClassFlags, lInstanceFlags: LONG; var pInfo: WBEM_COMPILE_STATUS_INFO): HRESULT; stdcall;
+ end;
+
+type
+ tag_WBEM_UNSECAPP_FLAG_TYPE = DWORD;
+ {$EXTERNALSYM tag_WBEM_UNSECAPP_FLAG_TYPE}
+ WBEM_UNSECAPP_FLAG_TYPE = tag_WBEM_UNSECAPP_FLAG_TYPE;
+ {$EXTERNALSYM WBEM_UNSECAPP_FLAG_TYPE}
+ TWbemUnsecAppFlagType = WBEM_UNSECAPP_FLAG_TYPE;
+
+const
+ WBEM_FLAG_UNSECAPP_DEFAULT_CHECK_ACCESS = 0;
+ {$EXTERNALSYM WBEM_FLAG_UNSECAPP_DEFAULT_CHECK_ACCESS}
+ WBEM_FLAG_UNSECAPP_CHECK_ACCESS = 1;
+ {$EXTERNALSYM WBEM_FLAG_UNSECAPP_CHECK_ACCESS}
+ WBEM_FLAG_UNSECAPP_DONT_CHECK_ACCESS = 2;
+ {$EXTERNALSYM WBEM_FLAG_UNSECAPP_DONT_CHECK_ACCESS}
+
+type
+ tag_WBEM_INFORMATION_FLAG_TYPE = DWORD;
+ {$EXTERNALSYM tag_WBEM_INFORMATION_FLAG_TYPE}
+ WBEM_INFORMATION_FLAG_TYPE = tag_WBEM_INFORMATION_FLAG_TYPE;
+ {$EXTERNALSYM WBEM_INFORMATION_FLAG_TYPE}
+ TWbemInformationFlagType = WBEM_INFORMATION_FLAG_TYPE;
+
+const
+ WBEM_FLAG_SHORT_NAME = $1;
+ {$EXTERNALSYM WBEM_FLAG_SHORT_NAME}
+ WBEM_FLAG_LONG_NAME = $2;
+ {$EXTERNALSYM WBEM_FLAG_LONG_NAME}
+
+// Additional Prototypes for ALL interfaces
+
+//unsigned long __RPC_USER WideString_UserSize( unsigned long *, unsigned long , WideString * );
+//unsigned char * __RPC_USER WideString_UserMarshal( unsigned long *, unsigned char *, WideString * );
+//unsigned char * __RPC_USER WideString_UserUnmarshal(unsigned long *, unsigned char *, WideString * );
+//void __RPC_USER WideString_UserFree( unsigned long *, WideString * );
+
+// end of Additional Prototypes
+
+implementation
+
+end.
diff --git a/packages/extra/winunits/jwawinable.pas b/packages/extra/winunits/jwawinable.pas
index 0e55655e8a..3451b652f9 100644
--- a/packages/extra/winunits/jwawinable.pas
+++ b/packages/extra/winunits/jwawinable.pas
@@ -1,753 +1,753 @@
-{******************************************************************************}
-{ }
-{ Hooking mechanism to receive system events interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: winable.h, released June 2000. The original Pascal }
-{ code is: WinAble.pas, released December 2000. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwawinable.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaWinAble;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "WinAble.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaWinType;
-
-//
-// This gets GUI information out of context. If you pass in a NULL thread ID,
-// we will get the 'global' information, using the foreground thread. This
-// is guaranteed to be the real active window, focus window, etc. Yes, you
-// could do it yourself by calling GetForegorundWindow, getting the thread ID
-// of that window via GetWindowThreadProcessId, then passing the ID into
-// GetGUIThreadInfo(). However, that takes three calls and aside from being
-// a pain, anything could happen in the middle. So passing in NULL gets
-// you stuff in one call and hence also works right.
-//
-
-type
- LPGUITHREADINFO = ^GUITHREADINFO;
- {$EXTERNALSYM LPGUITHREADINFO}
- tagGUITHREADINFO = record
- cbSize: DWORD;
- flags: DWORD;
- hwndActive: HWND;
- hwndFocus: HWND;
- hwndCapture: HWND;
- hwndMenuOwner: HWND;
- hwndMoveSize: HWND;
- hwndCaret: HWND;
- rcCaret: RECT;
- end;
- {$EXTERNALSYM tagGUITHREADINFO}
- GUITHREADINFO = tagGUITHREADINFO;
- {$EXTERNALSYM GUITHREADINFO}
- TGuiThreadInfo = GUITHREADINFO;
- PGuiThreadInfo = LPGUITHREADINFO;
-
-const
- GUI_CARETBLINKING = $00000001;
- {$EXTERNALSYM GUI_CARETBLINKING}
- GUI_INMOVESIZE = $00000002;
- {$EXTERNALSYM GUI_INMOVESIZE}
- GUI_INMENUMODE = $00000004;
- {$EXTERNALSYM GUI_INMENUMODE}
- GUI_SYSTEMMENUMODE = $00000008;
- {$EXTERNALSYM GUI_SYSTEMMENUMODE}
- GUI_POPUPMENUMODE = $00000010;
- {$EXTERNALSYM GUI_POPUPMENUMODE}
-
-function GetGUIThreadInfo(idThread: DWORD; var lpgui: GUITHREADINFO): BOOL; stdcall;
-{$EXTERNALSYM GetGUIThreadInfo}
-
-function GetWindowModuleFileNameW(hwnd: HWND; lpFileName: LPWSTR; cchFileName: UINT): UINT; stdcall;
-{$EXTERNALSYM GetWindowModuleFileNameW}
-function GetWindowModuleFileNameA(hwnd: HWND; lpFileName: LPSTR; cchFileName: UINT): UINT; stdcall;
-{$EXTERNALSYM GetWindowModuleFileNameA}
-function GetWindowModuleFileName(hwnd: HWND; lpFileName: LPTSTR; cchFileName: UINT): UINT; stdcall;
-{$EXTERNALSYM GetWindowModuleFileName}
-
-//
-// This returns FALSE if the caller doesn't have permissions to do this
-// esp. if someone else is dorking with input. I.E., if some other thread
-// disabled input, and thread 2 tries to diable/enable it, the call will
-// fail since thread 1 has the cookie.
-//
-
-function BlockInput(fBlockIt: BOOL): BOOL; stdcall;
-{$EXTERNALSYM BlockInput}
-
-//
-// Note that the dwFlags field uses the same flags as keybd_event and
-// mouse_event, depending on what type of input this is.
-//
-
-type
- LPMOUSEINPUT = ^MOUSEINPUT;
- {$EXTERNALSYM LPMOUSEINPUT}
- PMOUSEINPUT = ^MOUSEINPUT;
- {$EXTERNALSYM PMOUSEINPUT}
- tagMOUSEINPUT = record
- dx: LONG;
- dy: LONG;
- mouseData: DWORD;
- dwFlags: DWORD;
- time: DWORD;
- dwExtraInfo: DWORD;
- end;
- {$EXTERNALSYM tagMOUSEINPUT}
- MOUSEINPUT = tagMOUSEINPUT;
- {$EXTERNALSYM MOUSEINPUT}
- TMouseInput = MOUSEINPUT;
-
- LPKEYBDINPUT = ^KEYBDINPUT;
- {$EXTERNALSYM LPKEYBDINPUT}
- PKEYBDINPUT = ^KEYBDINPUT;
- {$EXTERNALSYM PKEYBDINPUT}
- tagKEYBDINPUT = record
- wVk: WORD;
- wScan: WORD;
- dwFlags: DWORD;
- time: DWORD;
- dwExtraInfo: DWORD;
- end;
- {$EXTERNALSYM tagKEYBDINPUT}
- KEYBDINPUT = tagKEYBDINPUT;
- {$EXTERNALSYM KEYBDINPUT}
- TKeybdInput = KEYBDINPUT;
-
- LPHARDWAREINPUT = ^HARDWAREINPUT;
- {$EXTERNALSYM LPHARDWAREINPUT}
- PHARDWAREINPUT = ^HARDWAREINPUT;
- {$EXTERNALSYM PHARDWAREINPUT}
- tagHARDWAREINPUT = record
- uMsg: DWORD;
- wParamL: WORD;
- wParamH: WORD;
- dwExtraInfo: DWORD;
- end;
- {$EXTERNALSYM tagHARDWAREINPUT}
- HARDWAREINPUT = tagHARDWAREINPUT;
- {$EXTERNALSYM HARDWAREINPUT}
- THardwareInput = HARDWAREINPUT;
-
-const
- INPUT_MOUSE = 0;
- {$EXTERNALSYM INPUT_MOUSE}
- INPUT_KEYBOARD = 1;
- {$EXTERNALSYM INPUT_KEYBOARD}
- INPUT_HARDWARE = 2;
- {$EXTERNALSYM INPUT_HARDWARE}
-
-type
- LPINPUT = ^INPUT;
- {$EXTERNALSYM LPINPUT}
- PINPUT = ^INPUT;
- {$EXTERNALSYM PINPUT}
- tagINPUT = record
- type_: DWORD;
- case Integer of
- 0: (mi: MOUSEINPUT);
- 1: (ki: KEYBDINPUT);
- 2: (hi: HARDWAREINPUT);
- end;
- {$EXTERNALSYM tagINPUT}
- INPUT = tagINPUT;
- {$EXTERNALSYM INPUT}
- TInput = INPUT;
-
-//
-// This returns the number of inputs played back. It will disable input
-// first, play back as many as possible, then reenable input. In the middle
-// it will pulse the RIT to make sure that the fixed input queue doesn't
-// fill up.
-//
-
-function SendInput(cInputs: UINT; pInputs: LPINPUT; cbSize: Integer): UINT; stdcall;
-{$EXTERNALSYM SendInput}
-
-const
- CCHILDREN_FRAME = 7;
- {$EXTERNALSYM CCHILDREN_FRAME}
-
-//
-// This generates a notification that anyone watching for it will get.
-// This call is superfast if nobody is hooking anything.
-//
-
-procedure NotifyWinEvent(event: DWORD; hwnd: HWND; idObject, idChild: LONG); stdcall;
-{$EXTERNALSYM NotifyWinEvent}
-
-//
-// hwnd + idObject can be used with OLEACC.DLL's OleGetObjectFromWindow()
-// to get an interface pointer to the container. indexChild is the item
-// within the container in question. Setup a VARIANT with vt VT_I4 and
-// lVal the indexChild and pass that in to all methods. Then you
-// are raring to go.
-//
-
-//
-// Common object IDs (cookies, only for sending WM_GETOBJECT to get at the
-// thing in question). Positive IDs are reserved for apps (app specific),
-// negative IDs are system things and are global, 0 means "just little old
-// me".
-//
-
-const
- CHILDID_SELF = 0;
- {$EXTERNALSYM CHILDID_SELF}
-
-// Reserved IDs for system objects
-
- OBJID_WINDOW = DWORD($00000000);
- {$EXTERNALSYM OBJID_WINDOW}
- OBJID_SYSMENU = DWORD($FFFFFFFF);
- {$EXTERNALSYM OBJID_SYSMENU}
- OBJID_TITLEBAR = DWORD($FFFFFFFE);
- {$EXTERNALSYM OBJID_TITLEBAR}
- OBJID_MENU = DWORD($FFFFFFFD);
- {$EXTERNALSYM OBJID_MENU}
- OBJID_CLIENT = DWORD($FFFFFFFC);
- {$EXTERNALSYM OBJID_CLIENT}
- OBJID_VSCROLL = DWORD($FFFFFFFB);
- {$EXTERNALSYM OBJID_VSCROLL}
- OBJID_HSCROLL = DWORD($FFFFFFFA);
- {$EXTERNALSYM OBJID_HSCROLL}
- OBJID_SIZEGRIP = DWORD($FFFFFFF9);
- {$EXTERNALSYM OBJID_SIZEGRIP}
- OBJID_CARET = DWORD($FFFFFFF8);
- {$EXTERNALSYM OBJID_CARET}
- OBJID_CURSOR = DWORD($FFFFFFF7);
- {$EXTERNALSYM OBJID_CURSOR}
- OBJID_ALERT = DWORD($FFFFFFF6);
- {$EXTERNALSYM OBJID_ALERT}
- OBJID_SOUND = DWORD($FFFFFFF5);
- {$EXTERNALSYM OBJID_SOUND}
-
-//
-// System Alerts (indexChild of system ALERT notification)
-//
-
- ALERT_SYSTEM_INFORMATIONAL = 1; // MB_INFORMATION
- {$EXTERNALSYM ALERT_SYSTEM_INFORMATIONAL}
- ALERT_SYSTEM_WARNING = 2; // MB_WARNING
- {$EXTERNALSYM ALERT_SYSTEM_WARNING}
- ALERT_SYSTEM_ERROR = 3; // MB_ERROR
- {$EXTERNALSYM ALERT_SYSTEM_ERROR}
- ALERT_SYSTEM_QUERY = 4; // MB_QUESTION
- {$EXTERNALSYM ALERT_SYSTEM_QUERY}
- ALERT_SYSTEM_CRITICAL = 5; // HardSysErrBox
- {$EXTERNALSYM ALERT_SYSTEM_CRITICAL}
- CALERT_SYSTEM = 6;
- {$EXTERNALSYM CALERT_SYSTEM}
-
-type
- HWINEVENTHOOK = DWORD;
- {$EXTERNALSYM HWINEVENTHOOK}
-
- WINEVENTPROC = procedure(
- hEvent: HWINEVENTHOOK;
- event: DWORD;
- hwnd: HWND;
- idObject: LONG;
- idChild: LONG;
- idEventThread: DWORD;
- dwmsEventTime: DWORD); stdcall;
- {$EXTERNALSYM WINEVENTPROC}
- TWinEventProc = WINEVENTPROC;
-
-const
- WINEVENT_OUTOFCONTEXT = $0000; // Events are ASYNC
- {$EXTERNALSYM WINEVENT_OUTOFCONTEXT}
- WINEVENT_SKIPOWNTHREAD = $0001; // Don't call back for events on installer's thread
- {$EXTERNALSYM WINEVENT_SKIPOWNTHREAD}
- WINEVENT_SKIPOWNPROCESS = $0002; // Don't call back for events on installer's process
- {$EXTERNALSYM WINEVENT_SKIPOWNPROCESS}
- WINEVENT_INCONTEXT = $0004; // Events are SYNC, this causes your dll to be injected into every process
- {$EXTERNALSYM WINEVENT_INCONTEXT}
- WINEVENT_32BITCALLER = $8000; // ;Internal
- {$EXTERNALSYM WINEVENT_32BITCALLER}
- WINEVENT_VALID = $8007; // ;Internal
- {$EXTERNALSYM WINEVENT_VALID}
-
-function SetWinEventHook(eventMin, eventMax: DWORD; hmodWinEventProc: HMODULE;
- lpfnWinEventProc: WINEVENTPROC; idProcess, idThread, dwFlags: DWORD): HWINEVENTHOOK; stdcall;
-{$EXTERNALSYM SetWinEventHook}
-
-//
-// Returns zero on failure, or a DWORD ID if success. We will clean up any
-// event hooks installed by the current process when it goes away, if it
-// hasn't cleaned the hooks up itself. But to dynamically unhook, call
-// UnhookWinEvents().
-//
-
-function UnhookWinEvent(hEvent: HWINEVENTHOOK): BOOL; stdcall;
-{$EXTERNALSYM UnhookWinEvent}
-
-//
-// If idProcess isn't zero but idThread is, will hook all threads in that
-// process.
-// If idThread isn't zero but idProcess is, will hook idThread only.
-// If both are zero, will hook everything
-//
-
-//
-// EVENT DEFINITION
-//
-
-const
- EVENT_MIN = $00000001;
- {$EXTERNALSYM EVENT_MIN}
- EVENT_MAX = $7FFFFFFF;
- {$EXTERNALSYM EVENT_MAX}
-
-//
-// EVENT_SYSTEM_SOUND
-// Sent when a sound is played. Currently nothing is generating this, we
-// are going to be cleaning up the SOUNDSENTRY feature in the control panel
-// and will use this at that time. Applications implementing WinEvents
-// are perfectly welcome to use it. Clients of IAccessible* will simply
-// turn around and get back a non-visual object that describes the sound.
-//
-
- EVENT_SYSTEM_SOUND = $0001;
- {$EXTERNALSYM EVENT_SYSTEM_SOUND}
-
-//
-// EVENT_SYSTEM_ALERT
-// Sent when an alert needs to be given to the user. MessageBoxes generate
-// alerts for example.
-//
-
- EVENT_SYSTEM_ALERT = $0002;
- {$EXTERNALSYM EVENT_SYSTEM_ALERT}
-
-//
-// EVENT_SYSTEM_FOREGROUND
-// Sent when the foreground (active) window changes, even if it is changing
-// to another window in the same thread as the previous one.
-//
-
- EVENT_SYSTEM_FOREGROUND = $0003;
- {$EXTERNALSYM EVENT_SYSTEM_FOREGROUND}
-
-//
-// EVENT_SYSTEM_MENUSTART
-// EVENT_SYSTEM_MENUEND
-// Sent when entering into and leaving from menu mode (system, app bar, and
-// track popups).
-//
-
- EVENT_SYSTEM_MENUSTART = $0004;
- {$EXTERNALSYM EVENT_SYSTEM_MENUSTART}
- EVENT_SYSTEM_MENUEND = $0005;
- {$EXTERNALSYM EVENT_SYSTEM_MENUEND}
-
-//
-// EVENT_SYSTEM_MENUPOPUPSTART
-// EVENT_SYSTEM_MENUPOPUPEND
-// Sent when a menu popup comes up and just before it is taken down. Note
-// that for a call to TrackPopupMenu(), a client will see EVENT_SYSTEM_MENUSTART
-// followed almost immediately by EVENT_SYSTEM_MENUPOPUPSTART for the popup
-// being shown.
-//
-
- EVENT_SYSTEM_MENUPOPUPSTART = $0006;
- {$EXTERNALSYM EVENT_SYSTEM_MENUPOPUPSTART}
- EVENT_SYSTEM_MENUPOPUPEND = $0007;
- {$EXTERNALSYM EVENT_SYSTEM_MENUPOPUPEND}
-
-//
-// EVENT_SYSTEM_CAPTURESTART
-// EVENT_SYSTEM_CAPTUREEND
-// Sent when a window takes the capture and releases the capture.
-//
-
- EVENT_SYSTEM_CAPTURESTART = $0008;
- {$EXTERNALSYM EVENT_SYSTEM_CAPTURESTART}
- EVENT_SYSTEM_CAPTUREEND = $0009;
- {$EXTERNALSYM EVENT_SYSTEM_CAPTUREEND}
-
-//
-// EVENT_SYSTEM_MOVESIZESTART
-// EVENT_SYSTEM_MOVESIZEEND
-// Sent when a window enters and leaves move-size dragging mode.
-//
-
- EVENT_SYSTEM_MOVESIZESTART = $000A;
- {$EXTERNALSYM EVENT_SYSTEM_MOVESIZESTART}
- EVENT_SYSTEM_MOVESIZEEND = $000B;
- {$EXTERNALSYM EVENT_SYSTEM_MOVESIZEEND}
-
-//
-// EVENT_SYSTEM_CONTEXTHELPSTART
-// EVENT_SYSTEM_CONTEXTHELPEND
-// Sent when a window enters and leaves context sensitive help mode.
-//
-
- EVENT_SYSTEM_CONTEXTHELPSTART = $000C;
- {$EXTERNALSYM EVENT_SYSTEM_CONTEXTHELPSTART}
- EVENT_SYSTEM_CONTEXTHELPEND = $000D;
- {$EXTERNALSYM EVENT_SYSTEM_CONTEXTHELPEND}
-
-//
-// EVENT_SYSTEM_DRAGDROPSTART
-// EVENT_SYSTEM_DRAGDROPEND
-// Sent when a window enters and leaves drag drop mode. Note that it is up
-// to apps and OLE to generate this, since the system doesn't know. Like
-// EVENT_SYSTEM_SOUND, it will be a while before this is prevalent.
-//
-
- EVENT_SYSTEM_DRAGDROPSTART = $000E;
- {$EXTERNALSYM EVENT_SYSTEM_DRAGDROPSTART}
- EVENT_SYSTEM_DRAGDROPEND = $000F;
- {$EXTERNALSYM EVENT_SYSTEM_DRAGDROPEND}
-
-//
-// EVENT_SYSTEM_DIALOGSTART
-// EVENT_SYSTEM_DIALOGEND
-// Sent when a dialog comes up and just before it goes away.
-//
-
- EVENT_SYSTEM_DIALOGSTART = $0010;
- {$EXTERNALSYM EVENT_SYSTEM_DIALOGSTART}
- EVENT_SYSTEM_DIALOGEND = $0011;
- {$EXTERNALSYM EVENT_SYSTEM_DIALOGEND}
-
-//
-// EVENT_SYSTEM_SCROLLINGSTART
-// EVENT_SYSTEM_SCROLLINGEND
-// Sent when beginning and ending the tracking of a scrollbar in a window,
-// and also for scrollbar controls.
-//
-
- EVENT_SYSTEM_SCROLLINGSTART = $0012;
- {$EXTERNALSYM EVENT_SYSTEM_SCROLLINGSTART}
- EVENT_SYSTEM_SCROLLINGEND = $0013;
- {$EXTERNALSYM EVENT_SYSTEM_SCROLLINGEND}
-
-//
-// EVENT_SYSTEM_SWITCHSTART
-// EVENT_SYSTEM_SWITCHEND
-// Sent when beginning and ending alt-tab mode with the switch window.
-//
-
- EVENT_SYSTEM_SWITCHSTART = $0014;
- {$EXTERNALSYM EVENT_SYSTEM_SWITCHSTART}
- EVENT_SYSTEM_SWITCHEND = $0015;
- {$EXTERNALSYM EVENT_SYSTEM_SWITCHEND}
-
-//
-// EVENT_SYSTEM_MINIMIZESTART
-// EVENT_SYSTEM_MINIMIZEEND
-// Sent when a window minimizes and just before it restores.
-//
-
- EVENT_SYSTEM_MINIMIZESTART = $0016;
- {$EXTERNALSYM EVENT_SYSTEM_MINIMIZESTART}
- EVENT_SYSTEM_MINIMIZEEND = $0017;
- {$EXTERNALSYM EVENT_SYSTEM_MINIMIZEEND}
-
-//
-// Object events
-//
-// The system AND apps generate these. The system generates these for
-// real windows. Apps generate these for objects within their window which
-// act like a separate control, e.g. an item in a list view.
-//
-// For all events, if you want detailed accessibility information, callers
-// should
-// * Call AccessibleObjectFromWindow() with the hwnd, idObject parameters
-// of the event, and IID_IAccessible as the REFIID, to get back an
-// IAccessible* to talk to
-// * Initialize and fill in a VARIANT as VT_I4 with lVal the idChild
-// parameter of the event.
-// * If idChild isn't zero, call get_accChild() in the container to see
-// if the child is an object in its own right. If so, you will get
-// back an IDispatch* object for the child. You should release the
-// parent, and call QueryInterface() on the child object to get its
-// IAccessible*. Then you talk directly to the child. Otherwise,
-// if get_accChild() returns you nothing, you should continue to
-// use the child VARIANT. You will ask the container for the properties
-// of the child identified by the VARIANT. In other words, the
-// child in this case is accessible but not a full-blown object.
-// Like a button on a titlebar which is 'small' and has no children.
-//
-
-//
-
- EVENT_OBJECT_CREATE = $8000; // hwnd + ID + idChild is created item
- {$EXTERNALSYM EVENT_OBJECT_CREATE}
- EVENT_OBJECT_DESTROY = $8001; // hwnd + ID + idChild is destroyed item
- {$EXTERNALSYM EVENT_OBJECT_DESTROY}
- EVENT_OBJECT_SHOW = $8002; // hwnd + ID + idChild is shown item
- {$EXTERNALSYM EVENT_OBJECT_SHOW}
- EVENT_OBJECT_HIDE = $8003; // hwnd + ID + idChild is hidden item
- {$EXTERNALSYM EVENT_OBJECT_HIDE}
- EVENT_OBJECT_REORDER = $8004; // hwnd + ID + idChild is parent of zordering children
- {$EXTERNALSYM EVENT_OBJECT_REORDER}
-
-//
-// NOTE:
-// Minimize the number of notifications!
-//
-// When you are hiding a parent object, obviously all child objects are no
-// longer visible on screen. They still have the same "visible" status,
-// but are not truly visible. Hence do not send HIDE notifications for the
-// children also. One implies all. The same goes for SHOW.
-//
-
- EVENT_OBJECT_FOCUS = $8005; // hwnd + ID + idChild is focused item
- {$EXTERNALSYM EVENT_OBJECT_FOCUS}
- EVENT_OBJECT_SELECTION = $8006; // hwnd + ID + idChild is selected item (if only one), or idChild is OBJID_WINDOW if complex
- {$EXTERNALSYM EVENT_OBJECT_SELECTION}
- EVENT_OBJECT_SELECTIONADD = $8007; // hwnd + ID + idChild is item added
- {$EXTERNALSYM EVENT_OBJECT_SELECTIONADD}
- EVENT_OBJECT_SELECTIONREMOVE = $8008; // hwnd + ID + idChild is item removed
- {$EXTERNALSYM EVENT_OBJECT_SELECTIONREMOVE}
- EVENT_OBJECT_SELECTIONWITHIN = $8009; // hwnd + ID + idChild is parent of changed selected items
- {$EXTERNALSYM EVENT_OBJECT_SELECTIONWITHIN}
-
-//
-// NOTES:
-// There is only one "focused" child item in a parent. This is the place
-// keystrokes are going at a given moment. Hence only send a notification
-// about where the NEW focus is going. A NEW item getting the focus already
-// implies that the OLD item is losing it.
-//
-// SELECTION however can be multiple. Hence the different SELECTION
-// notifications. Here's when to use each:
-//
-// (1) Send a SELECTION notification in the simple single selection
-// case (like the focus) when the item with the selection is
-// merely moving to a different item within a container. hwnd + ID
-// is the container control, idChildItem is the new child with the
-// selection.
-//
-// (2) Send a SELECTIONADD notification when a new item has simply been added
-// to the selection within a container. This is appropriate when the
-// number of newly selected items is very small. hwnd + ID is the
-// container control, idChildItem is the new child added to the selection.
-//
-// (3) Send a SELECTIONREMOVE notification when a new item has simply been
-// removed from the selection within a container. This is appropriate
-// when the number of newly selected items is very small, just like
-// SELECTIONADD. hwnd + ID is the container control, idChildItem is the
-// new child removed from the selection.
-//
-// (4) Send a SELECTIONWITHIN notification when the selected items within a
-// control have changed substantially. Rather than propagate a large
-// number of changes to reflect removal for some items, addition of
-// others, just tell somebody who cares that a lot happened. It will
-// be faster an easier for somebody watching to just turn around and
-// query the container control what the new bunch of selected items
-// are.
-//
-
- EVENT_OBJECT_STATECHANGE = $800A; // hwnd + ID + idChild is item w/ state change
- {$EXTERNALSYM EVENT_OBJECT_STATECHANGE}
- EVENT_OBJECT_LOCATIONCHANGE = $800B; // hwnd + ID + idChild is moved/sized item
- {$EXTERNALSYM EVENT_OBJECT_LOCATIONCHANGE}
-
- EVENT_OBJECT_NAMECHANGE = $800C; // hwnd + ID + idChild is item w/ name change
- {$EXTERNALSYM EVENT_OBJECT_NAMECHANGE}
- EVENT_OBJECT_DESCRIPTIONCHANGE = $800D; // hwnd + ID + idChild is item w/ desc change
- {$EXTERNALSYM EVENT_OBJECT_DESCRIPTIONCHANGE}
- EVENT_OBJECT_VALUECHANGE = $800E; // hwnd + ID + idChild is item w/ value change
- {$EXTERNALSYM EVENT_OBJECT_VALUECHANGE}
- EVENT_OBJECT_PARENTCHANGE = $800F; // hwnd + ID + idChild is item w/ new parent
- {$EXTERNALSYM EVENT_OBJECT_PARENTCHANGE}
- EVENT_OBJECT_HELPCHANGE = $8010; // hwnd + ID + idChild is item w/ help change
- {$EXTERNALSYM EVENT_OBJECT_HELPCHANGE}
- EVENT_OBJECT_DEFACTIONCHANGE = $8011; // hwnd + ID + idChild is item w/ def action change
- {$EXTERNALSYM EVENT_OBJECT_DEFACTIONCHANGE}
- EVENT_OBJECT_ACCELERATORCHANGE = $8012; // hwnd + ID + idChild is item w/ keybd accel change
- {$EXTERNALSYM EVENT_OBJECT_ACCELERATORCHANGE}
-
-implementation
-
-const
- user32 = 'user32.dll';
- {$IFDEF UNICODE}
- AWSuffix = 'W';
- {$ELSE}
- AWSuffix = 'A';
- {$ENDIF UNICODE}
-
-{$IFDEF DYNAMIC_LINK}
-
-var
- _GetGUIThreadInfo: Pointer;
-
-function GetGUIThreadInfo;
-begin
- GetProcedureAddress(_GetGUIThreadInfo, user32, 'GetGUIThreadInfo');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetGUIThreadInfo]
- end;
-end;
-
-var
- _GetWindowModuleFileNameW: Pointer;
-
-function GetWindowModuleFileNameW;
-begin
- GetProcedureAddress(_GetWindowModuleFileNameW, user32, 'GetWindowModuleFileNameW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetWindowModuleFileNameW]
- end;
-end;
-
-var
- _GetWindowModuleFileNameA: Pointer;
-
-function GetWindowModuleFileNameA;
-begin
- GetProcedureAddress(_GetWindowModuleFileNameA, user32, 'GetWindowModuleFileNameA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetWindowModuleFileNameA]
- end;
-end;
-
-var
- _GetWindowModuleFileName: Pointer;
-
-function GetWindowModuleFileName;
-begin
- GetProcedureAddress(_GetWindowModuleFileName, user32, 'GetWindowModuleFileName' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetWindowModuleFileName]
- end;
-end;
-
-var
- _BlockInput: Pointer;
-
-function BlockInput;
-begin
- GetProcedureAddress(_BlockInput, user32, 'BlockInput');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_BlockInput]
- end;
-end;
-
-var
- _SendInput: Pointer;
-
-function SendInput;
-begin
- GetProcedureAddress(_SendInput, user32, 'SendInput');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SendInput]
- end;
-end;
-
-var
- _NotifyWinEvent: Pointer;
-
-procedure NotifyWinEvent;
-begin
- GetProcedureAddress(_NotifyWinEvent, user32, 'NotifyWinEvent');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NotifyWinEvent]
- end;
-end;
-
-var
- _SetWinEventHook: Pointer;
-
-function SetWinEventHook;
-begin
- GetProcedureAddress(_SetWinEventHook, user32, 'SetWinEventHook');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetWinEventHook]
- end;
-end;
-
-var
- _UnhookWinEvent: Pointer;
-
-function UnhookWinEvent;
-begin
- GetProcedureAddress(_UnhookWinEvent, user32, 'UnhookWinEvent');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_UnhookWinEvent]
- end;
-end;
-
-{$ELSE}
-
-function GetGUIThreadInfo; external user32 name 'GetGUIThreadInfo';
-function GetWindowModuleFileNameW; external user32 name 'GetWindowModuleFileNameW';
-function GetWindowModuleFileNameA; external user32 name 'GetWindowModuleFileNameA';
-function GetWindowModuleFileName; external user32 name 'GetWindowModuleFileName' + AWSuffix;
-function BlockInput; external user32 name 'BlockInput';
-function SendInput; external user32 name 'SendInput';
-procedure NotifyWinEvent; external user32 name 'NotifyWinEvent';
-function SetWinEventHook; external user32 name 'SetWinEventHook';
-function UnhookWinEvent; external user32 name 'UnhookWinEvent';
-
-{$ENDIF DYNAMIC_LINK}
-
-end.
+{******************************************************************************}
+{ }
+{ Hooking mechanism to receive system events interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: winable.h, released June 2000. The original Pascal }
+{ code is: WinAble.pas, released December 2000. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwawinable.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaWinAble;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "WinAble.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaWinType;
+
+//
+// This gets GUI information out of context. If you pass in a NULL thread ID,
+// we will get the 'global' information, using the foreground thread. This
+// is guaranteed to be the real active window, focus window, etc. Yes, you
+// could do it yourself by calling GetForegorundWindow, getting the thread ID
+// of that window via GetWindowThreadProcessId, then passing the ID into
+// GetGUIThreadInfo(). However, that takes three calls and aside from being
+// a pain, anything could happen in the middle. So passing in NULL gets
+// you stuff in one call and hence also works right.
+//
+
+type
+ LPGUITHREADINFO = ^GUITHREADINFO;
+ {$EXTERNALSYM LPGUITHREADINFO}
+ tagGUITHREADINFO = record
+ cbSize: DWORD;
+ flags: DWORD;
+ hwndActive: HWND;
+ hwndFocus: HWND;
+ hwndCapture: HWND;
+ hwndMenuOwner: HWND;
+ hwndMoveSize: HWND;
+ hwndCaret: HWND;
+ rcCaret: RECT;
+ end;
+ {$EXTERNALSYM tagGUITHREADINFO}
+ GUITHREADINFO = tagGUITHREADINFO;
+ {$EXTERNALSYM GUITHREADINFO}
+ TGuiThreadInfo = GUITHREADINFO;
+ PGuiThreadInfo = LPGUITHREADINFO;
+
+const
+ GUI_CARETBLINKING = $00000001;
+ {$EXTERNALSYM GUI_CARETBLINKING}
+ GUI_INMOVESIZE = $00000002;
+ {$EXTERNALSYM GUI_INMOVESIZE}
+ GUI_INMENUMODE = $00000004;
+ {$EXTERNALSYM GUI_INMENUMODE}
+ GUI_SYSTEMMENUMODE = $00000008;
+ {$EXTERNALSYM GUI_SYSTEMMENUMODE}
+ GUI_POPUPMENUMODE = $00000010;
+ {$EXTERNALSYM GUI_POPUPMENUMODE}
+
+function GetGUIThreadInfo(idThread: DWORD; var lpgui: GUITHREADINFO): BOOL; stdcall;
+{$EXTERNALSYM GetGUIThreadInfo}
+
+function GetWindowModuleFileNameW(hwnd: HWND; lpFileName: LPWSTR; cchFileName: UINT): UINT; stdcall;
+{$EXTERNALSYM GetWindowModuleFileNameW}
+function GetWindowModuleFileNameA(hwnd: HWND; lpFileName: LPSTR; cchFileName: UINT): UINT; stdcall;
+{$EXTERNALSYM GetWindowModuleFileNameA}
+function GetWindowModuleFileName(hwnd: HWND; lpFileName: LPTSTR; cchFileName: UINT): UINT; stdcall;
+{$EXTERNALSYM GetWindowModuleFileName}
+
+//
+// This returns FALSE if the caller doesn't have permissions to do this
+// esp. if someone else is dorking with input. I.E., if some other thread
+// disabled input, and thread 2 tries to diable/enable it, the call will
+// fail since thread 1 has the cookie.
+//
+
+function BlockInput(fBlockIt: BOOL): BOOL; stdcall;
+{$EXTERNALSYM BlockInput}
+
+//
+// Note that the dwFlags field uses the same flags as keybd_event and
+// mouse_event, depending on what type of input this is.
+//
+
+type
+ LPMOUSEINPUT = ^MOUSEINPUT;
+ {$EXTERNALSYM LPMOUSEINPUT}
+ PMOUSEINPUT = ^MOUSEINPUT;
+ {$EXTERNALSYM PMOUSEINPUT}
+ tagMOUSEINPUT = record
+ dx: LONG;
+ dy: LONG;
+ mouseData: DWORD;
+ dwFlags: DWORD;
+ time: DWORD;
+ dwExtraInfo: DWORD;
+ end;
+ {$EXTERNALSYM tagMOUSEINPUT}
+ MOUSEINPUT = tagMOUSEINPUT;
+ {$EXTERNALSYM MOUSEINPUT}
+ TMouseInput = MOUSEINPUT;
+
+ LPKEYBDINPUT = ^KEYBDINPUT;
+ {$EXTERNALSYM LPKEYBDINPUT}
+ PKEYBDINPUT = ^KEYBDINPUT;
+ {$EXTERNALSYM PKEYBDINPUT}
+ tagKEYBDINPUT = record
+ wVk: WORD;
+ wScan: WORD;
+ dwFlags: DWORD;
+ time: DWORD;
+ dwExtraInfo: DWORD;
+ end;
+ {$EXTERNALSYM tagKEYBDINPUT}
+ KEYBDINPUT = tagKEYBDINPUT;
+ {$EXTERNALSYM KEYBDINPUT}
+ TKeybdInput = KEYBDINPUT;
+
+ LPHARDWAREINPUT = ^HARDWAREINPUT;
+ {$EXTERNALSYM LPHARDWAREINPUT}
+ PHARDWAREINPUT = ^HARDWAREINPUT;
+ {$EXTERNALSYM PHARDWAREINPUT}
+ tagHARDWAREINPUT = record
+ uMsg: DWORD;
+ wParamL: WORD;
+ wParamH: WORD;
+ dwExtraInfo: DWORD;
+ end;
+ {$EXTERNALSYM tagHARDWAREINPUT}
+ HARDWAREINPUT = tagHARDWAREINPUT;
+ {$EXTERNALSYM HARDWAREINPUT}
+ THardwareInput = HARDWAREINPUT;
+
+const
+ INPUT_MOUSE = 0;
+ {$EXTERNALSYM INPUT_MOUSE}
+ INPUT_KEYBOARD = 1;
+ {$EXTERNALSYM INPUT_KEYBOARD}
+ INPUT_HARDWARE = 2;
+ {$EXTERNALSYM INPUT_HARDWARE}
+
+type
+ LPINPUT = ^INPUT;
+ {$EXTERNALSYM LPINPUT}
+ PINPUT = ^INPUT;
+ {$EXTERNALSYM PINPUT}
+ tagINPUT = record
+ type_: DWORD;
+ case Integer of
+ 0: (mi: MOUSEINPUT);
+ 1: (ki: KEYBDINPUT);
+ 2: (hi: HARDWAREINPUT);
+ end;
+ {$EXTERNALSYM tagINPUT}
+ INPUT = tagINPUT;
+ {$EXTERNALSYM INPUT}
+ TInput = INPUT;
+
+//
+// This returns the number of inputs played back. It will disable input
+// first, play back as many as possible, then reenable input. In the middle
+// it will pulse the RIT to make sure that the fixed input queue doesn't
+// fill up.
+//
+
+function SendInput(cInputs: UINT; pInputs: LPINPUT; cbSize: Integer): UINT; stdcall;
+{$EXTERNALSYM SendInput}
+
+const
+ CCHILDREN_FRAME = 7;
+ {$EXTERNALSYM CCHILDREN_FRAME}
+
+//
+// This generates a notification that anyone watching for it will get.
+// This call is superfast if nobody is hooking anything.
+//
+
+procedure NotifyWinEvent(event: DWORD; hwnd: HWND; idObject, idChild: LONG); stdcall;
+{$EXTERNALSYM NotifyWinEvent}
+
+//
+// hwnd + idObject can be used with OLEACC.DLL's OleGetObjectFromWindow()
+// to get an interface pointer to the container. indexChild is the item
+// within the container in question. Setup a VARIANT with vt VT_I4 and
+// lVal the indexChild and pass that in to all methods. Then you
+// are raring to go.
+//
+
+//
+// Common object IDs (cookies, only for sending WM_GETOBJECT to get at the
+// thing in question). Positive IDs are reserved for apps (app specific),
+// negative IDs are system things and are global, 0 means "just little old
+// me".
+//
+
+const
+ CHILDID_SELF = 0;
+ {$EXTERNALSYM CHILDID_SELF}
+
+// Reserved IDs for system objects
+
+ OBJID_WINDOW = DWORD($00000000);
+ {$EXTERNALSYM OBJID_WINDOW}
+ OBJID_SYSMENU = DWORD($FFFFFFFF);
+ {$EXTERNALSYM OBJID_SYSMENU}
+ OBJID_TITLEBAR = DWORD($FFFFFFFE);
+ {$EXTERNALSYM OBJID_TITLEBAR}
+ OBJID_MENU = DWORD($FFFFFFFD);
+ {$EXTERNALSYM OBJID_MENU}
+ OBJID_CLIENT = DWORD($FFFFFFFC);
+ {$EXTERNALSYM OBJID_CLIENT}
+ OBJID_VSCROLL = DWORD($FFFFFFFB);
+ {$EXTERNALSYM OBJID_VSCROLL}
+ OBJID_HSCROLL = DWORD($FFFFFFFA);
+ {$EXTERNALSYM OBJID_HSCROLL}
+ OBJID_SIZEGRIP = DWORD($FFFFFFF9);
+ {$EXTERNALSYM OBJID_SIZEGRIP}
+ OBJID_CARET = DWORD($FFFFFFF8);
+ {$EXTERNALSYM OBJID_CARET}
+ OBJID_CURSOR = DWORD($FFFFFFF7);
+ {$EXTERNALSYM OBJID_CURSOR}
+ OBJID_ALERT = DWORD($FFFFFFF6);
+ {$EXTERNALSYM OBJID_ALERT}
+ OBJID_SOUND = DWORD($FFFFFFF5);
+ {$EXTERNALSYM OBJID_SOUND}
+
+//
+// System Alerts (indexChild of system ALERT notification)
+//
+
+ ALERT_SYSTEM_INFORMATIONAL = 1; // MB_INFORMATION
+ {$EXTERNALSYM ALERT_SYSTEM_INFORMATIONAL}
+ ALERT_SYSTEM_WARNING = 2; // MB_WARNING
+ {$EXTERNALSYM ALERT_SYSTEM_WARNING}
+ ALERT_SYSTEM_ERROR = 3; // MB_ERROR
+ {$EXTERNALSYM ALERT_SYSTEM_ERROR}
+ ALERT_SYSTEM_QUERY = 4; // MB_QUESTION
+ {$EXTERNALSYM ALERT_SYSTEM_QUERY}
+ ALERT_SYSTEM_CRITICAL = 5; // HardSysErrBox
+ {$EXTERNALSYM ALERT_SYSTEM_CRITICAL}
+ CALERT_SYSTEM = 6;
+ {$EXTERNALSYM CALERT_SYSTEM}
+
+type
+ HWINEVENTHOOK = DWORD;
+ {$EXTERNALSYM HWINEVENTHOOK}
+
+ WINEVENTPROC = procedure(
+ hEvent: HWINEVENTHOOK;
+ event: DWORD;
+ hwnd: HWND;
+ idObject: LONG;
+ idChild: LONG;
+ idEventThread: DWORD;
+ dwmsEventTime: DWORD); stdcall;
+ {$EXTERNALSYM WINEVENTPROC}
+ TWinEventProc = WINEVENTPROC;
+
+const
+ WINEVENT_OUTOFCONTEXT = $0000; // Events are ASYNC
+ {$EXTERNALSYM WINEVENT_OUTOFCONTEXT}
+ WINEVENT_SKIPOWNTHREAD = $0001; // Don't call back for events on installer's thread
+ {$EXTERNALSYM WINEVENT_SKIPOWNTHREAD}
+ WINEVENT_SKIPOWNPROCESS = $0002; // Don't call back for events on installer's process
+ {$EXTERNALSYM WINEVENT_SKIPOWNPROCESS}
+ WINEVENT_INCONTEXT = $0004; // Events are SYNC, this causes your dll to be injected into every process
+ {$EXTERNALSYM WINEVENT_INCONTEXT}
+ WINEVENT_32BITCALLER = $8000; // ;Internal
+ {$EXTERNALSYM WINEVENT_32BITCALLER}
+ WINEVENT_VALID = $8007; // ;Internal
+ {$EXTERNALSYM WINEVENT_VALID}
+
+function SetWinEventHook(eventMin, eventMax: DWORD; hmodWinEventProc: HMODULE;
+ lpfnWinEventProc: WINEVENTPROC; idProcess, idThread, dwFlags: DWORD): HWINEVENTHOOK; stdcall;
+{$EXTERNALSYM SetWinEventHook}
+
+//
+// Returns zero on failure, or a DWORD ID if success. We will clean up any
+// event hooks installed by the current process when it goes away, if it
+// hasn't cleaned the hooks up itself. But to dynamically unhook, call
+// UnhookWinEvents().
+//
+
+function UnhookWinEvent(hEvent: HWINEVENTHOOK): BOOL; stdcall;
+{$EXTERNALSYM UnhookWinEvent}
+
+//
+// If idProcess isn't zero but idThread is, will hook all threads in that
+// process.
+// If idThread isn't zero but idProcess is, will hook idThread only.
+// If both are zero, will hook everything
+//
+
+//
+// EVENT DEFINITION
+//
+
+const
+ EVENT_MIN = $00000001;
+ {$EXTERNALSYM EVENT_MIN}
+ EVENT_MAX = $7FFFFFFF;
+ {$EXTERNALSYM EVENT_MAX}
+
+//
+// EVENT_SYSTEM_SOUND
+// Sent when a sound is played. Currently nothing is generating this, we
+// are going to be cleaning up the SOUNDSENTRY feature in the control panel
+// and will use this at that time. Applications implementing WinEvents
+// are perfectly welcome to use it. Clients of IAccessible* will simply
+// turn around and get back a non-visual object that describes the sound.
+//
+
+ EVENT_SYSTEM_SOUND = $0001;
+ {$EXTERNALSYM EVENT_SYSTEM_SOUND}
+
+//
+// EVENT_SYSTEM_ALERT
+// Sent when an alert needs to be given to the user. MessageBoxes generate
+// alerts for example.
+//
+
+ EVENT_SYSTEM_ALERT = $0002;
+ {$EXTERNALSYM EVENT_SYSTEM_ALERT}
+
+//
+// EVENT_SYSTEM_FOREGROUND
+// Sent when the foreground (active) window changes, even if it is changing
+// to another window in the same thread as the previous one.
+//
+
+ EVENT_SYSTEM_FOREGROUND = $0003;
+ {$EXTERNALSYM EVENT_SYSTEM_FOREGROUND}
+
+//
+// EVENT_SYSTEM_MENUSTART
+// EVENT_SYSTEM_MENUEND
+// Sent when entering into and leaving from menu mode (system, app bar, and
+// track popups).
+//
+
+ EVENT_SYSTEM_MENUSTART = $0004;
+ {$EXTERNALSYM EVENT_SYSTEM_MENUSTART}
+ EVENT_SYSTEM_MENUEND = $0005;
+ {$EXTERNALSYM EVENT_SYSTEM_MENUEND}
+
+//
+// EVENT_SYSTEM_MENUPOPUPSTART
+// EVENT_SYSTEM_MENUPOPUPEND
+// Sent when a menu popup comes up and just before it is taken down. Note
+// that for a call to TrackPopupMenu(), a client will see EVENT_SYSTEM_MENUSTART
+// followed almost immediately by EVENT_SYSTEM_MENUPOPUPSTART for the popup
+// being shown.
+//
+
+ EVENT_SYSTEM_MENUPOPUPSTART = $0006;
+ {$EXTERNALSYM EVENT_SYSTEM_MENUPOPUPSTART}
+ EVENT_SYSTEM_MENUPOPUPEND = $0007;
+ {$EXTERNALSYM EVENT_SYSTEM_MENUPOPUPEND}
+
+//
+// EVENT_SYSTEM_CAPTURESTART
+// EVENT_SYSTEM_CAPTUREEND
+// Sent when a window takes the capture and releases the capture.
+//
+
+ EVENT_SYSTEM_CAPTURESTART = $0008;
+ {$EXTERNALSYM EVENT_SYSTEM_CAPTURESTART}
+ EVENT_SYSTEM_CAPTUREEND = $0009;
+ {$EXTERNALSYM EVENT_SYSTEM_CAPTUREEND}
+
+//
+// EVENT_SYSTEM_MOVESIZESTART
+// EVENT_SYSTEM_MOVESIZEEND
+// Sent when a window enters and leaves move-size dragging mode.
+//
+
+ EVENT_SYSTEM_MOVESIZESTART = $000A;
+ {$EXTERNALSYM EVENT_SYSTEM_MOVESIZESTART}
+ EVENT_SYSTEM_MOVESIZEEND = $000B;
+ {$EXTERNALSYM EVENT_SYSTEM_MOVESIZEEND}
+
+//
+// EVENT_SYSTEM_CONTEXTHELPSTART
+// EVENT_SYSTEM_CONTEXTHELPEND
+// Sent when a window enters and leaves context sensitive help mode.
+//
+
+ EVENT_SYSTEM_CONTEXTHELPSTART = $000C;
+ {$EXTERNALSYM EVENT_SYSTEM_CONTEXTHELPSTART}
+ EVENT_SYSTEM_CONTEXTHELPEND = $000D;
+ {$EXTERNALSYM EVENT_SYSTEM_CONTEXTHELPEND}
+
+//
+// EVENT_SYSTEM_DRAGDROPSTART
+// EVENT_SYSTEM_DRAGDROPEND
+// Sent when a window enters and leaves drag drop mode. Note that it is up
+// to apps and OLE to generate this, since the system doesn't know. Like
+// EVENT_SYSTEM_SOUND, it will be a while before this is prevalent.
+//
+
+ EVENT_SYSTEM_DRAGDROPSTART = $000E;
+ {$EXTERNALSYM EVENT_SYSTEM_DRAGDROPSTART}
+ EVENT_SYSTEM_DRAGDROPEND = $000F;
+ {$EXTERNALSYM EVENT_SYSTEM_DRAGDROPEND}
+
+//
+// EVENT_SYSTEM_DIALOGSTART
+// EVENT_SYSTEM_DIALOGEND
+// Sent when a dialog comes up and just before it goes away.
+//
+
+ EVENT_SYSTEM_DIALOGSTART = $0010;
+ {$EXTERNALSYM EVENT_SYSTEM_DIALOGSTART}
+ EVENT_SYSTEM_DIALOGEND = $0011;
+ {$EXTERNALSYM EVENT_SYSTEM_DIALOGEND}
+
+//
+// EVENT_SYSTEM_SCROLLINGSTART
+// EVENT_SYSTEM_SCROLLINGEND
+// Sent when beginning and ending the tracking of a scrollbar in a window,
+// and also for scrollbar controls.
+//
+
+ EVENT_SYSTEM_SCROLLINGSTART = $0012;
+ {$EXTERNALSYM EVENT_SYSTEM_SCROLLINGSTART}
+ EVENT_SYSTEM_SCROLLINGEND = $0013;
+ {$EXTERNALSYM EVENT_SYSTEM_SCROLLINGEND}
+
+//
+// EVENT_SYSTEM_SWITCHSTART
+// EVENT_SYSTEM_SWITCHEND
+// Sent when beginning and ending alt-tab mode with the switch window.
+//
+
+ EVENT_SYSTEM_SWITCHSTART = $0014;
+ {$EXTERNALSYM EVENT_SYSTEM_SWITCHSTART}
+ EVENT_SYSTEM_SWITCHEND = $0015;
+ {$EXTERNALSYM EVENT_SYSTEM_SWITCHEND}
+
+//
+// EVENT_SYSTEM_MINIMIZESTART
+// EVENT_SYSTEM_MINIMIZEEND
+// Sent when a window minimizes and just before it restores.
+//
+
+ EVENT_SYSTEM_MINIMIZESTART = $0016;
+ {$EXTERNALSYM EVENT_SYSTEM_MINIMIZESTART}
+ EVENT_SYSTEM_MINIMIZEEND = $0017;
+ {$EXTERNALSYM EVENT_SYSTEM_MINIMIZEEND}
+
+//
+// Object events
+//
+// The system AND apps generate these. The system generates these for
+// real windows. Apps generate these for objects within their window which
+// act like a separate control, e.g. an item in a list view.
+//
+// For all events, if you want detailed accessibility information, callers
+// should
+// * Call AccessibleObjectFromWindow() with the hwnd, idObject parameters
+// of the event, and IID_IAccessible as the REFIID, to get back an
+// IAccessible* to talk to
+// * Initialize and fill in a VARIANT as VT_I4 with lVal the idChild
+// parameter of the event.
+// * If idChild isn't zero, call get_accChild() in the container to see
+// if the child is an object in its own right. If so, you will get
+// back an IDispatch* object for the child. You should release the
+// parent, and call QueryInterface() on the child object to get its
+// IAccessible*. Then you talk directly to the child. Otherwise,
+// if get_accChild() returns you nothing, you should continue to
+// use the child VARIANT. You will ask the container for the properties
+// of the child identified by the VARIANT. In other words, the
+// child in this case is accessible but not a full-blown object.
+// Like a button on a titlebar which is 'small' and has no children.
+//
+
+//
+
+ EVENT_OBJECT_CREATE = $8000; // hwnd + ID + idChild is created item
+ {$EXTERNALSYM EVENT_OBJECT_CREATE}
+ EVENT_OBJECT_DESTROY = $8001; // hwnd + ID + idChild is destroyed item
+ {$EXTERNALSYM EVENT_OBJECT_DESTROY}
+ EVENT_OBJECT_SHOW = $8002; // hwnd + ID + idChild is shown item
+ {$EXTERNALSYM EVENT_OBJECT_SHOW}
+ EVENT_OBJECT_HIDE = $8003; // hwnd + ID + idChild is hidden item
+ {$EXTERNALSYM EVENT_OBJECT_HIDE}
+ EVENT_OBJECT_REORDER = $8004; // hwnd + ID + idChild is parent of zordering children
+ {$EXTERNALSYM EVENT_OBJECT_REORDER}
+
+//
+// NOTE:
+// Minimize the number of notifications!
+//
+// When you are hiding a parent object, obviously all child objects are no
+// longer visible on screen. They still have the same "visible" status,
+// but are not truly visible. Hence do not send HIDE notifications for the
+// children also. One implies all. The same goes for SHOW.
+//
+
+ EVENT_OBJECT_FOCUS = $8005; // hwnd + ID + idChild is focused item
+ {$EXTERNALSYM EVENT_OBJECT_FOCUS}
+ EVENT_OBJECT_SELECTION = $8006; // hwnd + ID + idChild is selected item (if only one), or idChild is OBJID_WINDOW if complex
+ {$EXTERNALSYM EVENT_OBJECT_SELECTION}
+ EVENT_OBJECT_SELECTIONADD = $8007; // hwnd + ID + idChild is item added
+ {$EXTERNALSYM EVENT_OBJECT_SELECTIONADD}
+ EVENT_OBJECT_SELECTIONREMOVE = $8008; // hwnd + ID + idChild is item removed
+ {$EXTERNALSYM EVENT_OBJECT_SELECTIONREMOVE}
+ EVENT_OBJECT_SELECTIONWITHIN = $8009; // hwnd + ID + idChild is parent of changed selected items
+ {$EXTERNALSYM EVENT_OBJECT_SELECTIONWITHIN}
+
+//
+// NOTES:
+// There is only one "focused" child item in a parent. This is the place
+// keystrokes are going at a given moment. Hence only send a notification
+// about where the NEW focus is going. A NEW item getting the focus already
+// implies that the OLD item is losing it.
+//
+// SELECTION however can be multiple. Hence the different SELECTION
+// notifications. Here's when to use each:
+//
+// (1) Send a SELECTION notification in the simple single selection
+// case (like the focus) when the item with the selection is
+// merely moving to a different item within a container. hwnd + ID
+// is the container control, idChildItem is the new child with the
+// selection.
+//
+// (2) Send a SELECTIONADD notification when a new item has simply been added
+// to the selection within a container. This is appropriate when the
+// number of newly selected items is very small. hwnd + ID is the
+// container control, idChildItem is the new child added to the selection.
+//
+// (3) Send a SELECTIONREMOVE notification when a new item has simply been
+// removed from the selection within a container. This is appropriate
+// when the number of newly selected items is very small, just like
+// SELECTIONADD. hwnd + ID is the container control, idChildItem is the
+// new child removed from the selection.
+//
+// (4) Send a SELECTIONWITHIN notification when the selected items within a
+// control have changed substantially. Rather than propagate a large
+// number of changes to reflect removal for some items, addition of
+// others, just tell somebody who cares that a lot happened. It will
+// be faster an easier for somebody watching to just turn around and
+// query the container control what the new bunch of selected items
+// are.
+//
+
+ EVENT_OBJECT_STATECHANGE = $800A; // hwnd + ID + idChild is item w/ state change
+ {$EXTERNALSYM EVENT_OBJECT_STATECHANGE}
+ EVENT_OBJECT_LOCATIONCHANGE = $800B; // hwnd + ID + idChild is moved/sized item
+ {$EXTERNALSYM EVENT_OBJECT_LOCATIONCHANGE}
+
+ EVENT_OBJECT_NAMECHANGE = $800C; // hwnd + ID + idChild is item w/ name change
+ {$EXTERNALSYM EVENT_OBJECT_NAMECHANGE}
+ EVENT_OBJECT_DESCRIPTIONCHANGE = $800D; // hwnd + ID + idChild is item w/ desc change
+ {$EXTERNALSYM EVENT_OBJECT_DESCRIPTIONCHANGE}
+ EVENT_OBJECT_VALUECHANGE = $800E; // hwnd + ID + idChild is item w/ value change
+ {$EXTERNALSYM EVENT_OBJECT_VALUECHANGE}
+ EVENT_OBJECT_PARENTCHANGE = $800F; // hwnd + ID + idChild is item w/ new parent
+ {$EXTERNALSYM EVENT_OBJECT_PARENTCHANGE}
+ EVENT_OBJECT_HELPCHANGE = $8010; // hwnd + ID + idChild is item w/ help change
+ {$EXTERNALSYM EVENT_OBJECT_HELPCHANGE}
+ EVENT_OBJECT_DEFACTIONCHANGE = $8011; // hwnd + ID + idChild is item w/ def action change
+ {$EXTERNALSYM EVENT_OBJECT_DEFACTIONCHANGE}
+ EVENT_OBJECT_ACCELERATORCHANGE = $8012; // hwnd + ID + idChild is item w/ keybd accel change
+ {$EXTERNALSYM EVENT_OBJECT_ACCELERATORCHANGE}
+
+implementation
+
+const
+ user32 = 'user32.dll';
+ {$IFDEF UNICODE}
+ AWSuffix = 'W';
+ {$ELSE}
+ AWSuffix = 'A';
+ {$ENDIF UNICODE}
+
+{$IFDEF DYNAMIC_LINK}
+
+var
+ _GetGUIThreadInfo: Pointer;
+
+function GetGUIThreadInfo;
+begin
+ GetProcedureAddress(_GetGUIThreadInfo, user32, 'GetGUIThreadInfo');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetGUIThreadInfo]
+ end;
+end;
+
+var
+ _GetWindowModuleFileNameW: Pointer;
+
+function GetWindowModuleFileNameW;
+begin
+ GetProcedureAddress(_GetWindowModuleFileNameW, user32, 'GetWindowModuleFileNameW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetWindowModuleFileNameW]
+ end;
+end;
+
+var
+ _GetWindowModuleFileNameA: Pointer;
+
+function GetWindowModuleFileNameA;
+begin
+ GetProcedureAddress(_GetWindowModuleFileNameA, user32, 'GetWindowModuleFileNameA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetWindowModuleFileNameA]
+ end;
+end;
+
+var
+ _GetWindowModuleFileName: Pointer;
+
+function GetWindowModuleFileName;
+begin
+ GetProcedureAddress(_GetWindowModuleFileName, user32, 'GetWindowModuleFileName' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetWindowModuleFileName]
+ end;
+end;
+
+var
+ _BlockInput: Pointer;
+
+function BlockInput;
+begin
+ GetProcedureAddress(_BlockInput, user32, 'BlockInput');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_BlockInput]
+ end;
+end;
+
+var
+ _SendInput: Pointer;
+
+function SendInput;
+begin
+ GetProcedureAddress(_SendInput, user32, 'SendInput');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SendInput]
+ end;
+end;
+
+var
+ _NotifyWinEvent: Pointer;
+
+procedure NotifyWinEvent;
+begin
+ GetProcedureAddress(_NotifyWinEvent, user32, 'NotifyWinEvent');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NotifyWinEvent]
+ end;
+end;
+
+var
+ _SetWinEventHook: Pointer;
+
+function SetWinEventHook;
+begin
+ GetProcedureAddress(_SetWinEventHook, user32, 'SetWinEventHook');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetWinEventHook]
+ end;
+end;
+
+var
+ _UnhookWinEvent: Pointer;
+
+function UnhookWinEvent;
+begin
+ GetProcedureAddress(_UnhookWinEvent, user32, 'UnhookWinEvent');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_UnhookWinEvent]
+ end;
+end;
+
+{$ELSE}
+
+function GetGUIThreadInfo; external user32 name 'GetGUIThreadInfo';
+function GetWindowModuleFileNameW; external user32 name 'GetWindowModuleFileNameW';
+function GetWindowModuleFileNameA; external user32 name 'GetWindowModuleFileNameA';
+function GetWindowModuleFileName; external user32 name 'GetWindowModuleFileName' + AWSuffix;
+function BlockInput; external user32 name 'BlockInput';
+function SendInput; external user32 name 'SendInput';
+procedure NotifyWinEvent; external user32 name 'NotifyWinEvent';
+function SetWinEventHook; external user32 name 'SetWinEventHook';
+function UnhookWinEvent; external user32 name 'UnhookWinEvent';
+
+{$ENDIF DYNAMIC_LINK}
+
+end.
diff --git a/packages/extra/winunits/jwawinbase.pas b/packages/extra/winunits/jwawinbase.pas
index f32b90bff9..3649679642 100644
--- a/packages/extra/winunits/jwawinbase.pas
+++ b/packages/extra/winunits/jwawinbase.pas
@@ -1,19925 +1,19925 @@
-{******************************************************************************}
-{ }
-{ Windows Base Services API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: winbase.h, released August 2001. The original Pascal }
-{ code is: WinBase.pas, released December 2000. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwawinbase.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
-
-unit JwaWinBase;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "WinBase.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-{$STACKFRAMES ON}
-
-interface
-
-uses
- {$IFDEF USE_DELPHI_TYPES}
- Windows,
- {$ENDIF USE_DELPHI_TYPES}
- JwaNtStatus, JwaWinNT, JwaWinType;
-
-const
- INVALID_HANDLE_VALUE = HANDLE(-1);
- {$EXTERNALSYM INVALID_HANDLE_VALUE}
- INVALID_FILE_SIZE = DWORD($FFFFFFFF);
- {$EXTERNALSYM INVALID_FILE_SIZE}
- INVALID_SET_FILE_POINTER = DWORD(-1);
- {$EXTERNALSYM INVALID_SET_FILE_POINTER}
- INVALID_FILE_ATTRIBUTES = DWORD(-1);
- {$EXTERNALSYM INVALID_FILE_ATTRIBUTES}
-
- FILE_BEGIN = 0;
- {$EXTERNALSYM FILE_BEGIN}
- FILE_CURRENT = 1;
- {$EXTERNALSYM FILE_CURRENT}
- FILE_END = 2;
- {$EXTERNALSYM FILE_END}
-
- TIME_ZONE_ID_INVALID = DWORD($FFFFFFFF);
- {$EXTERNALSYM TIME_ZONE_ID_INVALID}
-
- WAIT_FAILED = DWORD($FFFFFFFF);
- {$EXTERNALSYM WAIT_FAILED}
- WAIT_OBJECT_0 = STATUS_WAIT_0 + 0;
- {$EXTERNALSYM WAIT_OBJECT_0}
-
- WAIT_ABANDONED = STATUS_ABANDONED_WAIT_0 + 0;
- {$EXTERNALSYM WAIT_ABANDONED}
- WAIT_ABANDONED_0 = STATUS_ABANDONED_WAIT_0 + 0;
- {$EXTERNALSYM WAIT_ABANDONED_0}
-
- WAIT_IO_COMPLETION = STATUS_USER_APC;
- {$EXTERNALSYM WAIT_IO_COMPLETION}
- STILL_ACTIVE = STATUS_PENDING;
- {$EXTERNALSYM STILL_ACTIVE}
- EXCEPTION_ACCESS_VIOLATION = STATUS_ACCESS_VIOLATION;
- {$EXTERNALSYM EXCEPTION_ACCESS_VIOLATION}
- EXCEPTION_DATATYPE_MISALIGNMENT = STATUS_DATATYPE_MISALIGNMENT;
- {$EXTERNALSYM EXCEPTION_DATATYPE_MISALIGNMENT}
- EXCEPTION_BREAKPOINT = STATUS_BREAKPOINT;
- {$EXTERNALSYM EXCEPTION_BREAKPOINT}
- EXCEPTION_SINGLE_STEP = STATUS_SINGLE_STEP;
- {$EXTERNALSYM EXCEPTION_SINGLE_STEP}
- EXCEPTION_ARRAY_BOUNDS_EXCEEDED = STATUS_ARRAY_BOUNDS_EXCEEDED;
- {$EXTERNALSYM EXCEPTION_ARRAY_BOUNDS_EXCEEDED}
- EXCEPTION_FLT_DENORMAL_OPERAND = STATUS_FLOAT_DENORMAL_OPERAND;
- {$EXTERNALSYM EXCEPTION_FLT_DENORMAL_OPERAND}
- EXCEPTION_FLT_DIVIDE_BY_ZERO = STATUS_FLOAT_DIVIDE_BY_ZERO;
- {$EXTERNALSYM EXCEPTION_FLT_DIVIDE_BY_ZERO}
- EXCEPTION_FLT_INEXACT_RESULT = STATUS_FLOAT_INEXACT_RESULT;
- {$EXTERNALSYM EXCEPTION_FLT_INEXACT_RESULT}
- EXCEPTION_FLT_INVALID_OPERATION = STATUS_FLOAT_INVALID_OPERATION;
- {$EXTERNALSYM EXCEPTION_FLT_INVALID_OPERATION}
- EXCEPTION_FLT_OVERFLOW = STATUS_FLOAT_OVERFLOW;
- {$EXTERNALSYM EXCEPTION_FLT_OVERFLOW}
- EXCEPTION_FLT_STACK_CHECK = STATUS_FLOAT_STACK_CHECK;
- {$EXTERNALSYM EXCEPTION_FLT_STACK_CHECK}
- EXCEPTION_FLT_UNDERFLOW = STATUS_FLOAT_UNDERFLOW;
- {$EXTERNALSYM EXCEPTION_FLT_UNDERFLOW}
- EXCEPTION_INT_DIVIDE_BY_ZERO = STATUS_INTEGER_DIVIDE_BY_ZERO;
- {$EXTERNALSYM EXCEPTION_INT_DIVIDE_BY_ZERO}
- EXCEPTION_INT_OVERFLOW = STATUS_INTEGER_OVERFLOW;
- {$EXTERNALSYM EXCEPTION_INT_OVERFLOW}
- EXCEPTION_PRIV_INSTRUCTION = STATUS_PRIVILEGED_INSTRUCTION;
- {$EXTERNALSYM EXCEPTION_PRIV_INSTRUCTION}
- EXCEPTION_IN_PAGE_ERROR = STATUS_IN_PAGE_ERROR;
- {$EXTERNALSYM EXCEPTION_IN_PAGE_ERROR}
- EXCEPTION_ILLEGAL_INSTRUCTION = STATUS_ILLEGAL_INSTRUCTION;
- {$EXTERNALSYM EXCEPTION_ILLEGAL_INSTRUCTION}
- EXCEPTION_NONCONTINUABLE_EXCEPTION = STATUS_NONCONTINUABLE_EXCEPTION;
- {$EXTERNALSYM EXCEPTION_NONCONTINUABLE_EXCEPTION}
- EXCEPTION_STACK_OVERFLOW = STATUS_STACK_OVERFLOW;
- {$EXTERNALSYM EXCEPTION_STACK_OVERFLOW}
- EXCEPTION_INVALID_DISPOSITION = STATUS_INVALID_DISPOSITION;
- {$EXTERNALSYM EXCEPTION_INVALID_DISPOSITION}
- EXCEPTION_GUARD_PAGE = STATUS_GUARD_PAGE_VIOLATION;
- {$EXTERNALSYM EXCEPTION_GUARD_PAGE}
- EXCEPTION_INVALID_HANDLE = STATUS_INVALID_HANDLE;
- {$EXTERNALSYM EXCEPTION_INVALID_HANDLE}
- EXCEPTION_POSSIBLE_DEADLOCK = STATUS_POSSIBLE_DEADLOCK;
- {$EXTERNALSYM EXCEPTION_POSSIBLE_DEADLOCK}
- CONTROL_C_EXIT = STATUS_CONTROL_C_EXIT;
- {$EXTERNALSYM CONTROL_C_EXIT}
-
-procedure MoveMemory(Destination, Source: PVOID; Length: SIZE_T);
-{$EXTERNALSYM MoveMemory}
-procedure CopyMemory(Destination, Source: PVOID; Length: SIZE_T);
-{$EXTERNALSYM CopyMemory}
-procedure FillMemory(Destination: PVOID; Length: SIZE_T; Fill: BYTE);
-{$EXTERNALSYM FillMemory}
-procedure ZeroMemory(Destination: PVOID; Length: SIZE_T);
-{$EXTERNALSYM ZeroMemory}
-//#define SecureZeroMemory RtlSecureZeroMemory TODO
-
-//
-// File creation flags must start at the high end since they
-// are combined with the attributes
-//
-
-const
- FILE_FLAG_WRITE_THROUGH = DWORD($80000000);
- {$EXTERNALSYM FILE_FLAG_WRITE_THROUGH}
- FILE_FLAG_OVERLAPPED = $40000000;
- {$EXTERNALSYM FILE_FLAG_OVERLAPPED}
- FILE_FLAG_NO_BUFFERING = $20000000;
- {$EXTERNALSYM FILE_FLAG_NO_BUFFERING}
- FILE_FLAG_RANDOM_ACCESS = $10000000;
- {$EXTERNALSYM FILE_FLAG_RANDOM_ACCESS}
- FILE_FLAG_SEQUENTIAL_SCAN = $08000000;
- {$EXTERNALSYM FILE_FLAG_SEQUENTIAL_SCAN}
- FILE_FLAG_DELETE_ON_CLOSE = $04000000;
- {$EXTERNALSYM FILE_FLAG_DELETE_ON_CLOSE}
- FILE_FLAG_BACKUP_SEMANTICS = $02000000;
- {$EXTERNALSYM FILE_FLAG_BACKUP_SEMANTICS}
- FILE_FLAG_POSIX_SEMANTICS = $01000000;
- {$EXTERNALSYM FILE_FLAG_POSIX_SEMANTICS}
- FILE_FLAG_OPEN_REPARSE_POINT = $00200000;
- {$EXTERNALSYM FILE_FLAG_OPEN_REPARSE_POINT}
- FILE_FLAG_OPEN_NO_RECALL = $00100000;
- {$EXTERNALSYM FILE_FLAG_OPEN_NO_RECALL}
- FILE_FLAG_FIRST_PIPE_INSTANCE = $00080000;
- {$EXTERNALSYM FILE_FLAG_FIRST_PIPE_INSTANCE}
-
- CREATE_NEW = 1;
- {$EXTERNALSYM CREATE_NEW}
- CREATE_ALWAYS = 2;
- {$EXTERNALSYM CREATE_ALWAYS}
- OPEN_EXISTING = 3;
- {$EXTERNALSYM OPEN_EXISTING}
- OPEN_ALWAYS = 4;
- {$EXTERNALSYM OPEN_ALWAYS}
- TRUNCATE_EXISTING = 5;
- {$EXTERNALSYM TRUNCATE_EXISTING}
-
-//
-// Define possible return codes from the CopyFileEx callback routine
-//
-
- PROGRESS_CONTINUE = 0;
- {$EXTERNALSYM PROGRESS_CONTINUE}
- PROGRESS_CANCEL = 1;
- {$EXTERNALSYM PROGRESS_CANCEL}
- PROGRESS_STOP = 2;
- {$EXTERNALSYM PROGRESS_STOP}
- PROGRESS_QUIET = 3;
- {$EXTERNALSYM PROGRESS_QUIET}
-
-//
-// Define CopyFileEx callback routine state change values
-//
-
- CALLBACK_CHUNK_FINISHED = $00000000;
- {$EXTERNALSYM CALLBACK_CHUNK_FINISHED}
- CALLBACK_STREAM_SWITCH = $00000001;
- {$EXTERNALSYM CALLBACK_STREAM_SWITCH}
-
-//
-// Define CopyFileEx option flags
-//
-
- COPY_FILE_FAIL_IF_EXISTS = $00000001;
- {$EXTERNALSYM COPY_FILE_FAIL_IF_EXISTS}
- COPY_FILE_RESTARTABLE = $00000002;
- {$EXTERNALSYM COPY_FILE_RESTARTABLE}
- COPY_FILE_OPEN_SOURCE_FOR_WRITE = $00000004;
- {$EXTERNALSYM COPY_FILE_OPEN_SOURCE_FOR_WRITE}
- COPY_FILE_ALLOW_DECRYPTED_DESTINATION = $00000008;
- {$EXTERNALSYM COPY_FILE_ALLOW_DECRYPTED_DESTINATION}
-
-//
-// Define ReplaceFile option flags
-//
-
- REPLACEFILE_WRITE_THROUGH = $00000001;
- {$EXTERNALSYM REPLACEFILE_WRITE_THROUGH}
- REPLACEFILE_IGNORE_MERGE_ERRORS = $00000002;
- {$EXTERNALSYM REPLACEFILE_IGNORE_MERGE_ERRORS}
-
-//
-// Define the NamedPipe definitions
-//
-
-//
-// Define the dwOpenMode values for CreateNamedPipe
-//
-
- PIPE_ACCESS_INBOUND = $00000001;
- {$EXTERNALSYM PIPE_ACCESS_INBOUND}
- PIPE_ACCESS_OUTBOUND = $00000002;
- {$EXTERNALSYM PIPE_ACCESS_OUTBOUND}
- PIPE_ACCESS_DUPLEX = $00000003;
- {$EXTERNALSYM PIPE_ACCESS_DUPLEX}
-
-//
-// Define the Named Pipe End flags for GetNamedPipeInfo
-//
-
- PIPE_CLIENT_END = $00000000;
- {$EXTERNALSYM PIPE_CLIENT_END}
- PIPE_SERVER_END = $00000001;
- {$EXTERNALSYM PIPE_SERVER_END}
-
-//
-// Define the dwPipeMode values for CreateNamedPipe
-//
-
- PIPE_WAIT = $00000000;
- {$EXTERNALSYM PIPE_WAIT}
- PIPE_NOWAIT = $00000001;
- {$EXTERNALSYM PIPE_NOWAIT}
- PIPE_READMODE_BYTE = $00000000;
- {$EXTERNALSYM PIPE_READMODE_BYTE}
- PIPE_READMODE_MESSAGE = $00000002;
- {$EXTERNALSYM PIPE_READMODE_MESSAGE}
- PIPE_TYPE_BYTE = $00000000;
- {$EXTERNALSYM PIPE_TYPE_BYTE}
- PIPE_TYPE_MESSAGE = $00000004;
- {$EXTERNALSYM PIPE_TYPE_MESSAGE}
-
-//
-// Define the well known values for CreateNamedPipe nMaxInstances
-//
-
- PIPE_UNLIMITED_INSTANCES = 255;
- {$EXTERNALSYM PIPE_UNLIMITED_INSTANCES}
-
-//
-// Define the Security Quality of Service bits to be passed
-// into CreateFile
-//
-
- SECURITY_ANONYMOUS = Ord(SecurityAnonymous) shl 16;
- {$EXTERNALSYM SECURITY_ANONYMOUS}
- SECURITY_IDENTIFICATION = Ord(SecurityIdentification) shl 16;
- {$EXTERNALSYM SECURITY_IDENTIFICATION}
- SECURITY_IMPERSONATION = Ord(SecurityImpersonation) shl 16;
- {$EXTERNALSYM SECURITY_IMPERSONATION}
- SECURITY_DELEGATION = Ord(SecurityDelegation) shl 16;
- {$EXTERNALSYM SECURITY_DELEGATION}
-
- SECURITY_CONTEXT_TRACKING = $00040000;
- {$EXTERNALSYM SECURITY_CONTEXT_TRACKING}
- SECURITY_EFFECTIVE_ONLY = $00080000;
- {$EXTERNALSYM SECURITY_EFFECTIVE_ONLY}
-
- SECURITY_SQOS_PRESENT = $00100000;
- {$EXTERNALSYM SECURITY_SQOS_PRESENT}
- SECURITY_VALID_SQOS_FLAGS = $001F0000;
- {$EXTERNALSYM SECURITY_VALID_SQOS_FLAGS}
-
-//
-// File structures
-//
-
-type
- LPOVERLAPPED = ^OVERLAPPED;
- {$EXTERNALSYM LPOVERLAPPED}
- _OVERLAPPED = record
- Internal: ULONG_PTR;
- InternalHigh: ULONG_PTR;
- Union: record
- case Integer of
- 0: (
- Offset: DWORD;
- OffsetHigh: DWORD);
- 1: (
- Pointer: PVOID);
- end;
- hEvent: HANDLE;
- end;
- {$EXTERNALSYM _OVERLAPPED}
- OVERLAPPED = _OVERLAPPED;
- {$EXTERNALSYM OVERLAPPED}
- TOverlapped = OVERLAPPED;
- POverlapped = LPOVERLAPPED;
-
- PSECURITY_ATTRIBUTES = ^SECURITY_ATTRIBUTES;
- {$EXTERNALSYM PSECURITY_ATTRIBUTES}
- _SECURITY_ATTRIBUTES = record
- nLength: DWORD;
- lpSecurityDescriptor: LPVOID;
- bInheritHandle: BOOL;
- end;
- {$EXTERNALSYM _SECURITY_ATTRIBUTES}
- SECURITY_ATTRIBUTES = _SECURITY_ATTRIBUTES;
- {$EXTERNALSYM SECURITY_ATTRIBUTES}
- LPSECURITY_ATTRIBUTES = ^SECURITY_ATTRIBUTES;
- {$EXTERNALSYM LPSECURITY_ATTRIBUTES}
- TSecurityAttributes = SECURITY_ATTRIBUTES;
- PSecurityAttributes = PSECURITY_ATTRIBUTES;
-
- PPROCESS_INFORMATION = ^PROCESS_INFORMATION;
- {$EXTERNALSYM PPROCESS_INFORMATION}
- _PROCESS_INFORMATION = record
- hProcess: HANDLE;
- hThread: HANDLE;
- dwProcessId: DWORD;
- dwThreadId: DWORD;
- end;
- {$EXTERNALSYM _PROCESS_INFORMATION}
- PROCESS_INFORMATION = _PROCESS_INFORMATION;
- {$EXTERNALSYM PROCESS_INFORMATION}
- LPPROCESS_INFORMATION = ^PROCESS_INFORMATION;
- {$EXTERNALSYM LPPROCESS_INFORMATION}
- TProcessInformation = PROCESS_INFORMATION;
- PProcessInformation = PPROCESS_INFORMATION;
-
-//
-// File System time stamps are represented with the following structure:
-//
-
- LPFILETIME = ^FILETIME;
- {$EXTERNALSYM LPFILETIME}
- _FILETIME = record
- dwLowDateTime: DWORD;
- dwHighDateTime: DWORD;
- end;
- {$EXTERNALSYM _FILETIME}
- FILETIME = _FILETIME;
- {$EXTERNALSYM FILETIME}
- TFileTime = FILETIME;
- PFileTime = LPFILETIME;
-
-//
-// System time is represented with the following structure:
-//
-
- LPSYSTEMTIME = ^SYSTEMTIME;
- {$EXTERNALSYM LPSYSTEMTIME}
- {$IFDEF USE_DELPHI_TYPES}
- _SYSTEMTIME = Windows._SYSTEMTIME;
- SYSTEMTIME = Windows.SYSTEMTIME;
- TSystemTime = Windows.TSystemTime;
- PSystemtime = Windows.PSystemTime;
- {$ELSE}
- _SYSTEMTIME = record
- wYear: Word;
- wMonth: Word;
- wDayOfWeek: Word;
- wDay: Word;
- wHour: Word;
- wMinute: Word;
- wSecond: Word;
- wMilliseconds: Word;
- end;
- {$EXTERNALSYM _SYSTEMTIME}
- SYSTEMTIME = _SYSTEMTIME;
- {$EXTERNALSYM SYSTEMTIME}
- TSystemTime = SYSTEMTIME;
- PSystemTime = LPSYSTEMTIME;
- {$ENDIF USE_DELPHI_TYPES}
-
- PTHREAD_START_ROUTINE = function(lpThreadParameter: LPVOID): DWORD; stdcall;
- {$EXTERNALSYM PTHREAD_START_ROUTINE}
- LPTHREAD_START_ROUTINE = PTHREAD_START_ROUTINE;
- {$EXTERNALSYM LPTHREAD_START_ROUTINE}
- TThreadStartRoutine = PTHREAD_START_ROUTINE;
-
- PFIBER_START_ROUTINE = procedure(lpFiberParameter: LPVOID); stdcall;
- {$EXTERNALSYM PFIBER_START_ROUTINE}
- LPFIBER_START_ROUTINE = PFIBER_START_ROUTINE;
- {$EXTERNALSYM LPFIBER_START_ROUTINE}
- TFiberStartRoutine = PFIBER_START_ROUTINE;
-
- CRITICAL_SECTION = RTL_CRITICAL_SECTION;
- {$EXTERNALSYM CRITICAL_SECTION}
- PCRITICAL_SECTION = PRTL_CRITICAL_SECTION;
- {$EXTERNALSYM PCRITICAL_SECTION}
- LPCRITICAL_SECTION = PRTL_CRITICAL_SECTION;
- {$EXTERNALSYM LPCRITICAL_SECTION}
- TCriticalSection = CRITICAL_SECTION;
- PCriticalSection = PCRITICAL_SECTION;
-
- CRITICAL_SECTION_DEBUG = RTL_CRITICAL_SECTION_DEBUG;
- {$EXTERNALSYM CRITICAL_SECTION_DEBUG}
- PCRITICAL_SECTION_DEBUG = PRTL_CRITICAL_SECTION_DEBUG;
- {$EXTERNALSYM PCRITICAL_SECTION_DEBUG}
- LPCRITICAL_SECTION_DEBUG = PRTL_CRITICAL_SECTION_DEBUG;
- {$EXTERNALSYM LPCRITICAL_SECTION_DEBUG}
- TCriticalSectionDebug = CRITICAL_SECTION_DEBUG;
- PCriticalSectionDebug = PCRITICAL_SECTION_DEBUG;
-
- LPLDT_ENTRY = PLDT_ENTRY;
- {$EXTERNALSYM LPLDT_ENTRY}
- PLdtEntry = LPLDT_ENTRY;
-
-const
- MUTEX_MODIFY_STATE = MUTANT_QUERY_STATE;
- {$EXTERNALSYM MUTEX_MODIFY_STATE}
- MUTEX_ALL_ACCESS = MUTANT_ALL_ACCESS;
- {$EXTERNALSYM MUTEX_ALL_ACCESS}
-
-//
-// Serial provider type.
-//
-
- SP_SERIALCOMM = DWORD($00000001);
- {$EXTERNALSYM SP_SERIALCOMM}
-
-//
-// Provider SubTypes
-//
-
- PST_UNSPECIFIED = DWORD($00000000);
- {$EXTERNALSYM PST_UNSPECIFIED}
- PST_RS232 = DWORD($00000001);
- {$EXTERNALSYM PST_RS232}
- PST_PARALLELPORT = DWORD($00000002);
- {$EXTERNALSYM PST_PARALLELPORT}
- PST_RS422 = DWORD($00000003);
- {$EXTERNALSYM PST_RS422}
- PST_RS423 = DWORD($00000004);
- {$EXTERNALSYM PST_RS423}
- PST_RS449 = DWORD($00000005);
- {$EXTERNALSYM PST_RS449}
- PST_MODEM = DWORD($00000006);
- {$EXTERNALSYM PST_MODEM}
- PST_FAX = DWORD($00000021);
- {$EXTERNALSYM PST_FAX}
- PST_SCANNER = DWORD($00000022);
- {$EXTERNALSYM PST_SCANNER}
- PST_NETWORK_BRIDGE = DWORD($00000100);
- {$EXTERNALSYM PST_NETWORK_BRIDGE}
- PST_LAT = DWORD($00000101);
- {$EXTERNALSYM PST_LAT}
- PST_TCPIP_TELNET = DWORD($00000102);
- {$EXTERNALSYM PST_TCPIP_TELNET}
- PST_X25 = DWORD($00000103);
- {$EXTERNALSYM PST_X25}
-
-//
-// Provider capabilities flags.
-//
-
- PCF_DTRDSR = DWORD($0001);
- {$EXTERNALSYM PCF_DTRDSR}
- PCF_RTSCTS = DWORD($0002);
- {$EXTERNALSYM PCF_RTSCTS}
- PCF_RLSD = DWORD($0004);
- {$EXTERNALSYM PCF_RLSD}
- PCF_PARITY_CHECK = DWORD($0008);
- {$EXTERNALSYM PCF_PARITY_CHECK}
- PCF_XONXOFF = DWORD($0010);
- {$EXTERNALSYM PCF_XONXOFF}
- PCF_SETXCHAR = DWORD($0020);
- {$EXTERNALSYM PCF_SETXCHAR}
- PCF_TOTALTIMEOUTS = DWORD($0040);
- {$EXTERNALSYM PCF_TOTALTIMEOUTS}
- PCF_INTTIMEOUTS = DWORD($0080);
- {$EXTERNALSYM PCF_INTTIMEOUTS}
- PCF_SPECIALCHARS = DWORD($0100);
- {$EXTERNALSYM PCF_SPECIALCHARS}
- PCF_16BITMODE = DWORD($0200);
- {$EXTERNALSYM PCF_16BITMODE}
-
-//
-// Comm provider settable parameters.
-//
-
- SP_PARITY = DWORD($0001);
- {$EXTERNALSYM SP_PARITY}
- SP_BAUD = DWORD($0002);
- {$EXTERNALSYM SP_BAUD}
- SP_DATABITS = DWORD($0004);
- {$EXTERNALSYM SP_DATABITS}
- SP_STOPBITS = DWORD($0008);
- {$EXTERNALSYM SP_STOPBITS}
- SP_HANDSHAKING = DWORD($0010);
- {$EXTERNALSYM SP_HANDSHAKING}
- SP_PARITY_CHECK = DWORD($0020);
- {$EXTERNALSYM SP_PARITY_CHECK}
- SP_RLSD = DWORD($0040);
- {$EXTERNALSYM SP_RLSD}
-
-//
-// Settable baud rates in the provider.
-//
-
- BAUD_075 = DWORD($00000001);
- {$EXTERNALSYM BAUD_075}
- BAUD_110 = DWORD($00000002);
- {$EXTERNALSYM BAUD_110}
- BAUD_134_5 = DWORD($00000004);
- {$EXTERNALSYM BAUD_134_5}
- BAUD_150 = DWORD($00000008);
- {$EXTERNALSYM BAUD_150}
- BAUD_300 = DWORD($00000010);
- {$EXTERNALSYM BAUD_300}
- BAUD_600 = DWORD($00000020);
- {$EXTERNALSYM BAUD_600}
- BAUD_1200 = DWORD($00000040);
- {$EXTERNALSYM BAUD_1200}
- BAUD_1800 = DWORD($00000080);
- {$EXTERNALSYM BAUD_1800}
- BAUD_2400 = DWORD($00000100);
- {$EXTERNALSYM BAUD_2400}
- BAUD_4800 = DWORD($00000200);
- {$EXTERNALSYM BAUD_4800}
- BAUD_7200 = DWORD($00000400);
- {$EXTERNALSYM BAUD_7200}
- BAUD_9600 = DWORD($00000800);
- {$EXTERNALSYM BAUD_9600}
- BAUD_14400 = DWORD($00001000);
- {$EXTERNALSYM BAUD_14400}
- BAUD_19200 = DWORD($00002000);
- {$EXTERNALSYM BAUD_19200}
- BAUD_38400 = DWORD($00004000);
- {$EXTERNALSYM BAUD_38400}
- BAUD_56K = DWORD($00008000);
- {$EXTERNALSYM BAUD_56K}
- BAUD_128K = DWORD($00010000);
- {$EXTERNALSYM BAUD_128K}
- BAUD_115200 = DWORD($00020000);
- {$EXTERNALSYM BAUD_115200}
- BAUD_57600 = DWORD($00040000);
- {$EXTERNALSYM BAUD_57600}
- BAUD_USER = DWORD($10000000);
- {$EXTERNALSYM BAUD_USER}
-
-//
-// Settable Data Bits
-//
-
- DATABITS_5 = WORD($0001);
- {$EXTERNALSYM DATABITS_5}
- DATABITS_6 = WORD($0002);
- {$EXTERNALSYM DATABITS_6}
- DATABITS_7 = WORD($0004);
- {$EXTERNALSYM DATABITS_7}
- DATABITS_8 = WORD($0008);
- {$EXTERNALSYM DATABITS_8}
- DATABITS_16 = WORD($0010);
- {$EXTERNALSYM DATABITS_16}
- DATABITS_16X = WORD($0020);
- {$EXTERNALSYM DATABITS_16X}
-
-//
-// Settable Stop and Parity bits.
-//
-
- STOPBITS_10 = WORD($0001);
- {$EXTERNALSYM STOPBITS_10}
- STOPBITS_15 = WORD($0002);
- {$EXTERNALSYM STOPBITS_15}
- STOPBITS_20 = WORD($0004);
- {$EXTERNALSYM STOPBITS_20}
- PARITY_NONE = WORD($0100);
- {$EXTERNALSYM PARITY_NONE}
- PARITY_ODD = WORD($0200);
- {$EXTERNALSYM PARITY_ODD}
- PARITY_EVEN = WORD($0400);
- {$EXTERNALSYM PARITY_EVEN}
- PARITY_MARK = WORD($0800);
- {$EXTERNALSYM PARITY_MARK}
- PARITY_SPACE = WORD($1000);
- {$EXTERNALSYM PARITY_SPACE}
-
-type
- LPCOMMPROP = ^COMMPROP;
- {$EXTERNALSYM LPCOMMPROP}
- _COMMPROP = record
- wPacketLength: Word;
- wPacketVersion: Word;
- dwServiceMask: DWORD;
- dwReserved1: DWORD;
- dwMaxTxQueue: DWORD;
- dwMaxRxQueue: DWORD;
- dwMaxBaud: DWORD;
- dwProvSubType: DWORD;
- dwProvCapabilities: DWORD;
- dwSettableParams: DWORD;
- dwSettableBaud: DWORD;
- wSettableData: Word;
- wSettableStopParity: Word;
- dwCurrentTxQueue: DWORD;
- dwCurrentRxQueue: DWORD;
- dwProvSpec1: DWORD;
- dwProvSpec2: DWORD;
- wcProvChar: array [0..0] of WCHAR;
- end;
- {$EXTERNALSYM _COMMPROP}
- COMMPROP = _COMMPROP;
- {$EXTERNALSYM COMMPROP}
- TCommProp = COMMPROP;
- PCommProp = LPCOMMPROP;
-
-//
-// Set dwProvSpec1 to COMMPROP_INITIALIZED to indicate that wPacketLength
-// is valid before a call to GetCommProperties().
-//
-
-const
- COMMPROP_INITIALIZED = DWORD($E73CF52E);
- {$EXTERNALSYM COMMPROP_INITIALIZED}
-
-//_COMSTAT Flags (bitfield)
-
- COMSTAT_CTS_HOLD = 1 shl 0;
- COMSTAT_DSR_HOLD = 1 shl 1;
- COMSTAT_RLSD_HOLD = 1 shl 2;
- COMSTAT_XOFF_HOLD = 1 shl 3;
- COMSTAT_XOFF_SENT = 1 shl 4;
- COMSTAT_F_EOF = 1 shl 5;
- COMSTAT_F_TXIM = 1 shl 6;
-
-type
- LPCOMSTAT = ^COMSTAT;
- {$EXTERNALSYM LPCOMSTAT}
- _COMSTAT = record
- Flags: DWORD;
- cbInQue: DWORD;
- cbOutQue: DWORD;
- end;
- {$EXTERNALSYM _COMSTAT}
- COMSTAT = _COMSTAT;
- {$EXTERNALSYM COMSTAT}
- TComstat = COMSTAT;
- PComstat = LPCOMSTAT;
-
-//
-// DTR Control Flow Values.
-//
-
-const
- DTR_CONTROL_DISABLE = $00;
- {$EXTERNALSYM DTR_CONTROL_DISABLE}
- DTR_CONTROL_ENABLE = $01;
- {$EXTERNALSYM DTR_CONTROL_ENABLE}
- DTR_CONTROL_HANDSHAKE = $02;
- {$EXTERNALSYM DTR_CONTROL_HANDSHAKE}
-
-//
-// RTS Control Flow Values
-//
-
- RTS_CONTROL_DISABLE = $00;
- {$EXTERNALSYM RTS_CONTROL_DISABLE}
- RTS_CONTROL_ENABLE = $01;
- {$EXTERNALSYM RTS_CONTROL_ENABLE}
- RTS_CONTROL_HANDSHAKE = $02;
- {$EXTERNALSYM RTS_CONTROL_HANDSHAKE}
- RTS_CONTROL_TOGGLE = $03;
- {$EXTERNALSYM RTS_CONTROL_TOGGLE}
-
-// _DCB.Flags
-
-const
- fDcbBinary = 1 shl 0; // Binary Mode (skip EOF check)
- fDcbParity = 1 shl 1; // Enable parity checking
- fDcbOutxCtsFlow = 1 shl 2; // CTS handshaking on output
- fDcbOutxDsrFlow = 1 shl 3; // DSR handshaking on output
- fDcbDtrControl = $0030; // DTR Flow control
- fDcbDsrSensitivity = 1 shl 6; // DSR Sensitivity
- fDcbTXContinueOnXoff = 1 shl 7; // Continue TX when Xoff sent
- fDcbOutX = 1 shl 8; // Enable output X-ON/X-OFF
- fDcbInX = 1 shl 9; // Enable input X-ON/X-OFF
- fDcbErrorChar = 1 shl 10; // Enable Err Replacement
- fDcbNull = 1 shl 11; // Enable Null stripping
- fDcbRtsControl = $3000; // Rts Flow control
- fAbortOnError = 1 shl 14; // Abort all reads and writes on Error
-
-type
- LPDCB = ^DCB;
- {$EXTERNALSYM LPDCB}
- _DCB = record
- DCBlength: DWORD; // sizeof(DCB)
- BaudRate: DWORD; // Baudrate at which running
- Flags: DWORD; // See constants above
- wReserved: WORD; // Not currently used
- XonLim: WORD; // Transmit X-ON threshold
- XoffLim: WORD; // Transmit X-OFF threshold
- ByteSize: BYTE; // Number of bits/byte, 4-8
- Parity: BYTE; // 0-4=None,Odd,Even,Mark,Space
- StopBits: BYTE; // 0,1,2 = 1, 1.5, 2
- XonChar: Char; // Tx and Rx X-ON character
- XoffChar: Char; // Tx and Rx X-OFF character
- ErrorChar: Char; // Error replacement char
- EofChar: Char; // End of Input character
- EvtChar: Char; // Received Event character
- wReserved1: WORD; // Fill for now.
- end;
- {$EXTERNALSYM _DCB}
- DCB = _DCB;
- {$EXTERNALSYM DCB}
- TDCB = DCB;
- PDCB = LPDCB;
-
- LPCOMMTIMEOUTS = ^COMMTIMEOUTS;
- {$EXTERNALSYM LPCOMMTIMEOUTS}
- _COMMTIMEOUTS = record
- ReadIntervalTimeout: DWORD; // Maximum time between read chars.
- ReadTotalTimeoutMultiplier: DWORD; // Multiplier of characters.
- ReadTotalTimeoutConstant: DWORD; // Constant in milliseconds.
- WriteTotalTimeoutMultiplier: DWORD; // Multiplier of characters.
- WriteTotalTimeoutConstant: DWORD; // Constant in milliseconds.
- end;
- {$EXTERNALSYM _COMMTIMEOUTS}
- COMMTIMEOUTS = _COMMTIMEOUTS;
- {$EXTERNALSYM COMMTIMEOUTS}
- TCommTimeouts = COMMTIMEOUTS;
- PCommTimeouts = LPCOMMTIMEOUTS;
-
- LPCOMMCONFIG = ^COMMCONFIG;
- {$EXTERNALSYM LPCOMMCONFIG}
- _COMMCONFIG = record
- dwSize: DWORD; // Size of the entire struct
- wVersion: Word; // version of the structure
- wReserved: Word; // alignment
- dcb: DCB; // device control block
- dwProviderSubType: DWORD; // ordinal value for identifying
- // provider-defined data structure format
- dwProviderOffset: DWORD; // Specifies the offset of provider specific
- // data field in bytes from the start
- dwProviderSize: DWORD; // size of the provider-specific data field
- wcProviderData: array [0..0] of WCHAR; // provider-specific data
- end;
- {$EXTERNALSYM _COMMCONFIG}
- COMMCONFIG = _COMMCONFIG;
- {$EXTERNALSYM COMMCONFIG}
- TCommConfig = COMMCONFIG;
- PCommConfig = LPCOMMCONFIG;
-
- LPSYSTEM_INFO = ^SYSTEM_INFO;
- {$EXTERNALSYM LPSYSTEM_INFO}
- _SYSTEM_INFO = record
- case Integer of
- 0: (
- dwOemId: DWORD); // absolete, do not use
- 1: (
- wProcessorArchitecture: WORD;
- wReserved: WORD;
- dwPageSize: DWORD;
- lpMinimumApplicationAddress: LPVOID;
- lpMaximumApplicationAddress: LPVOID;
- dwActiveProcessorMask: DWORD_PTR;
- dwNumberOfProcessors: DWORD;
- dwProcessorType: DWORD;
- dwAllocationGranularity: DWORD;
- wProcessorLevel: WORD;
- wProcessorRevision: WORD);
- end;
- {$EXTERNALSYM _SYSTEM_INFO}
- SYSTEM_INFO = _SYSTEM_INFO;
- {$EXTERNALSYM SYSTEM_INFO}
- TSystemInfo = SYSTEM_INFO;
- PSystemInfo = LPSYSTEM_INFO;
-
-//
-//
-
-function FreeModule(hLibModule: HMODULE): BOOL;
-{$EXTERNALSYM FreeModule}
-function MakeProcInstance(lpProc: FARPROC; hInstance: HINSTANCE): FARPROC;
-{$EXTERNALSYM MakeProcInstance}
-procedure FreeProcInstance(lpProc: FARPROC);
-{$EXTERNALSYM FreeProcInstance}
-
-// Global Memory Flags
-
-const
- GMEM_FIXED = $0000;
- {$EXTERNALSYM GMEM_FIXED}
- GMEM_MOVEABLE = $0002;
- {$EXTERNALSYM GMEM_MOVEABLE}
- GMEM_NOCOMPACT = $0010;
- {$EXTERNALSYM GMEM_NOCOMPACT}
- GMEM_NODISCARD = $0020;
- {$EXTERNALSYM GMEM_NODISCARD}
- GMEM_ZEROINIT = $0040;
- {$EXTERNALSYM GMEM_ZEROINIT}
- GMEM_MODIFY = $0080;
- {$EXTERNALSYM GMEM_MODIFY}
- GMEM_DISCARDABLE = $0100;
- {$EXTERNALSYM GMEM_DISCARDABLE}
- GMEM_NOT_BANKED = $1000;
- {$EXTERNALSYM GMEM_NOT_BANKED}
- GMEM_SHARE = $2000;
- {$EXTERNALSYM GMEM_SHARE}
- GMEM_DDESHARE = $2000;
- {$EXTERNALSYM GMEM_DDESHARE}
- GMEM_NOTIFY = $4000;
- {$EXTERNALSYM GMEM_NOTIFY}
- GMEM_LOWER = GMEM_NOT_BANKED;
- {$EXTERNALSYM GMEM_LOWER}
- GMEM_VALID_FLAGS = $7F72;
- {$EXTERNALSYM GMEM_VALID_FLAGS}
- GMEM_INVALID_HANDLE = $8000;
- {$EXTERNALSYM GMEM_INVALID_HANDLE}
-
- GHND = GMEM_MOVEABLE or GMEM_ZEROINIT;
- {$EXTERNALSYM GHND}
- GPTR = GMEM_FIXED or GMEM_ZEROINIT;
- {$EXTERNALSYM GPTR}
-
-function GlobalLRUNewest(h: HANDLE): HANDLE;
-{$EXTERNALSYM GlobalLRUNewest}
-function GlobalLRUOldest(h: HANDLE): HANDLE;
-{$EXTERNALSYM GlobalLRUOldest}
-function GlobalDiscard(h: HANDLE): HANDLE;
-{$EXTERNALSYM GlobalDiscard}
-
-// Flags returned by GlobalFlags (in addition to GMEM_DISCARDABLE)
-
-const
- GMEM_DISCARDED = $4000;
- {$EXTERNALSYM GMEM_DISCARDED}
- GMEM_LOCKCOUNT = $00FF;
- {$EXTERNALSYM GMEM_LOCKCOUNT}
-
-type
- LPMEMORYSTATUS = ^MEMORYSTATUS;
- {$EXTERNALSYM LPMEMORYSTATUS}
- _MEMORYSTATUS = record
- dwLength: DWORD;
- dwMemoryLoad: DWORD;
- dwTotalPhys: SIZE_T;
- dwAvailPhys: SIZE_T;
- dwTotalPageFile: SIZE_T;
- dwAvailPageFile: SIZE_T;
- dwTotalVirtual: SIZE_T;
- dwAvailVirtual: SIZE_T;
- end;
- {$EXTERNALSYM _MEMORYSTATUS}
- MEMORYSTATUS = _MEMORYSTATUS;
- {$EXTERNALSYM MEMORYSTATUS}
- TMemoryStatus = MEMORYSTATUS;
- PMemoryStatus = LPMEMORYSTATUS;
-
-// Local Memory Flags
-
-const
- LMEM_FIXED = $0000;
- {$EXTERNALSYM LMEM_FIXED}
- LMEM_MOVEABLE = $0002;
- {$EXTERNALSYM LMEM_MOVEABLE}
- LMEM_NOCOMPACT = $0010;
- {$EXTERNALSYM LMEM_NOCOMPACT}
- LMEM_NODISCARD = $0020;
- {$EXTERNALSYM LMEM_NODISCARD}
- LMEM_ZEROINIT = $0040;
- {$EXTERNALSYM LMEM_ZEROINIT}
- LMEM_MODIFY = $0080;
- {$EXTERNALSYM LMEM_MODIFY}
- LMEM_DISCARDABLE = $0F00;
- {$EXTERNALSYM LMEM_DISCARDABLE}
- LMEM_VALID_FLAGS = $0F72;
- {$EXTERNALSYM LMEM_VALID_FLAGS}
- LMEM_INVALID_HANDLE = $8000;
- {$EXTERNALSYM LMEM_INVALID_HANDLE}
-
- LHND = LMEM_MOVEABLE or LMEM_ZEROINIT;
- {$EXTERNALSYM LHND}
- LPTR = LMEM_FIXED or LMEM_ZEROINIT;
- {$EXTERNALSYM LPTR}
-
- NONZEROLHND = LMEM_MOVEABLE;
- {$EXTERNALSYM NONZEROLHND}
- NONZEROLPTR = LMEM_FIXED;
- {$EXTERNALSYM NONZEROLPTR}
-
-function LocalDiscard(h: HLOCAL): HLOCAL;
-{$EXTERNALSYM LocalDiscard}
-
-// Flags returned by LocalFlags (in addition to LMEM_DISCARDABLE)
-
-const
- LMEM_DISCARDED = $4000;
- {$EXTERNALSYM LMEM_DISCARDED}
- LMEM_LOCKCOUNT = $00FF;
- {$EXTERNALSYM LMEM_LOCKCOUNT}
-
-//
-// dwCreationFlag values
-//
-
- DEBUG_PROCESS = $00000001;
- {$EXTERNALSYM DEBUG_PROCESS}
- DEBUG_ONLY_THIS_PROCESS = $00000002;
- {$EXTERNALSYM DEBUG_ONLY_THIS_PROCESS}
-
- CREATE_SUSPENDED = $00000004;
- {$EXTERNALSYM CREATE_SUSPENDED}
-
- DETACHED_PROCESS = $00000008;
- {$EXTERNALSYM DETACHED_PROCESS}
-
- CREATE_NEW_CONSOLE = $00000010;
- {$EXTERNALSYM CREATE_NEW_CONSOLE}
-
- NORMAL_PRIORITY_CLASS = $00000020;
- {$EXTERNALSYM NORMAL_PRIORITY_CLASS}
- IDLE_PRIORITY_CLASS = $00000040;
- {$EXTERNALSYM IDLE_PRIORITY_CLASS}
- HIGH_PRIORITY_CLASS = $00000080;
- {$EXTERNALSYM HIGH_PRIORITY_CLASS}
- REALTIME_PRIORITY_CLASS = $00000100;
- {$EXTERNALSYM REALTIME_PRIORITY_CLASS}
-
- CREATE_NEW_PROCESS_GROUP = $00000200;
- {$EXTERNALSYM CREATE_NEW_PROCESS_GROUP}
- CREATE_UNICODE_ENVIRONMENT = $00000400;
- {$EXTERNALSYM CREATE_UNICODE_ENVIRONMENT}
-
- CREATE_SEPARATE_WOW_VDM = $00000800;
- {$EXTERNALSYM CREATE_SEPARATE_WOW_VDM}
- CREATE_SHARED_WOW_VDM = $00001000;
- {$EXTERNALSYM CREATE_SHARED_WOW_VDM}
- CREATE_FORCEDOS = $00002000;
- {$EXTERNALSYM CREATE_FORCEDOS}
-
- BELOW_NORMAL_PRIORITY_CLASS = $00004000;
- {$EXTERNALSYM BELOW_NORMAL_PRIORITY_CLASS}
- ABOVE_NORMAL_PRIORITY_CLASS = $00008000;
- {$EXTERNALSYM ABOVE_NORMAL_PRIORITY_CLASS}
- STACK_SIZE_PARAM_IS_A_RESERVATION = $00010000;
- {$EXTERNALSYM STACK_SIZE_PARAM_IS_A_RESERVATION}
-
- CREATE_BREAKAWAY_FROM_JOB = $01000000;
- {$EXTERNALSYM CREATE_BREAKAWAY_FROM_JOB}
- CREATE_PRESERVE_CODE_AUTHZ_LEVEL = $02000000;
- {$EXTERNALSYM CREATE_PRESERVE_CODE_AUTHZ_LEVEL}
-
- CREATE_DEFAULT_ERROR_MODE = $04000000;
- {$EXTERNALSYM CREATE_DEFAULT_ERROR_MODE}
- CREATE_NO_WINDOW = $08000000;
- {$EXTERNALSYM CREATE_NO_WINDOW}
-
- PROFILE_USER = $10000000;
- {$EXTERNALSYM PROFILE_USER}
- PROFILE_KERNEL = $20000000;
- {$EXTERNALSYM PROFILE_KERNEL}
- PROFILE_SERVER = $40000000;
- {$EXTERNALSYM PROFILE_SERVER}
-
- CREATE_IGNORE_SYSTEM_DEFAULT = DWORD($80000000);
- {$EXTERNALSYM CREATE_IGNORE_SYSTEM_DEFAULT}
-
- THREAD_PRIORITY_LOWEST = THREAD_BASE_PRIORITY_MIN;
- {$EXTERNALSYM THREAD_PRIORITY_LOWEST}
- THREAD_PRIORITY_BELOW_NORMAL = THREAD_PRIORITY_LOWEST + 1;
- {$EXTERNALSYM THREAD_PRIORITY_BELOW_NORMAL}
- THREAD_PRIORITY_NORMAL = 0;
- {$EXTERNALSYM THREAD_PRIORITY_NORMAL}
- THREAD_PRIORITY_HIGHEST = THREAD_BASE_PRIORITY_MAX;
- {$EXTERNALSYM THREAD_PRIORITY_HIGHEST}
- THREAD_PRIORITY_ABOVE_NORMAL = THREAD_PRIORITY_HIGHEST - 1;
- {$EXTERNALSYM THREAD_PRIORITY_ABOVE_NORMAL}
- THREAD_PRIORITY_ERROR_RETURN = MAXLONG;
- {$EXTERNALSYM THREAD_PRIORITY_ERROR_RETURN}
-
- THREAD_PRIORITY_TIME_CRITICAL = THREAD_BASE_PRIORITY_LOWRT;
- {$EXTERNALSYM THREAD_PRIORITY_TIME_CRITICAL}
- THREAD_PRIORITY_IDLE = THREAD_BASE_PRIORITY_IDLE;
- {$EXTERNALSYM THREAD_PRIORITY_IDLE}
-
-//
-// Debug APIs
-//
-
- EXCEPTION_DEBUG_EVENT = 1;
- {$EXTERNALSYM EXCEPTION_DEBUG_EVENT}
- CREATE_THREAD_DEBUG_EVENT = 2;
- {$EXTERNALSYM CREATE_THREAD_DEBUG_EVENT}
- CREATE_PROCESS_DEBUG_EVENT = 3;
- {$EXTERNALSYM CREATE_PROCESS_DEBUG_EVENT}
- EXIT_THREAD_DEBUG_EVENT = 4;
- {$EXTERNALSYM EXIT_THREAD_DEBUG_EVENT}
- EXIT_PROCESS_DEBUG_EVENT = 5;
- {$EXTERNALSYM EXIT_PROCESS_DEBUG_EVENT}
- LOAD_DLL_DEBUG_EVENT = 6;
- {$EXTERNALSYM LOAD_DLL_DEBUG_EVENT}
- UNLOAD_DLL_DEBUG_EVENT = 7;
- {$EXTERNALSYM UNLOAD_DLL_DEBUG_EVENT}
- OUTPUT_DEBUG_STRING_EVENT = 8;
- {$EXTERNALSYM OUTPUT_DEBUG_STRING_EVENT}
- RIP_EVENT = 9;
- {$EXTERNALSYM RIP_EVENT}
-
-type
- LPEXCEPTION_DEBUG_INFO = ^EXCEPTION_DEBUG_INFO;
- {$EXTERNALSYM LPEXCEPTION_DEBUG_INFO}
- _EXCEPTION_DEBUG_INFO = record
- ExceptionRecord: EXCEPTION_RECORD;
- dwFirstChance: DWORD;
- end;
- {$EXTERNALSYM _EXCEPTION_DEBUG_INFO}
- EXCEPTION_DEBUG_INFO = _EXCEPTION_DEBUG_INFO;
- {$EXTERNALSYM EXCEPTION_DEBUG_INFO}
- TExceptionDebugInfo = EXCEPTION_DEBUG_INFO;
- PExceptionDebugInfo = LPEXCEPTION_DEBUG_INFO;
-
- LPCREATE_THREAD_DEBUG_INFO = ^CREATE_THREAD_DEBUG_INFO;
- {$EXTERNALSYM LPCREATE_THREAD_DEBUG_INFO}
- _CREATE_THREAD_DEBUG_INFO = record
- hThread: HANDLE;
- lpThreadLocalBase: LPVOID;
- lpStartAddress: LPTHREAD_START_ROUTINE;
- end;
- {$EXTERNALSYM _CREATE_THREAD_DEBUG_INFO}
- CREATE_THREAD_DEBUG_INFO = _CREATE_THREAD_DEBUG_INFO;
- {$EXTERNALSYM CREATE_THREAD_DEBUG_INFO}
- TCreateThreadDebugInfo = CREATE_THREAD_DEBUG_INFO;
- PCreateThreadDebugInfo = LPCREATE_THREAD_DEBUG_INFO;
-
- LPCREATE_PROCESS_DEBUG_INFO = ^CREATE_PROCESS_DEBUG_INFO;
- {$EXTERNALSYM LPCREATE_PROCESS_DEBUG_INFO}
- _CREATE_PROCESS_DEBUG_INFO = record
- hFile: HANDLE;
- hProcess: HANDLE;
- hThread: HANDLE;
- lpBaseOfImage: LPVOID;
- dwDebugInfoFileOffset: DWORD;
- nDebugInfoSize: DWORD;
- lpThreadLocalBase: LPVOID;
- lpStartAddress: LPTHREAD_START_ROUTINE;
- lpImageName: LPVOID;
- fUnicode: Word;
- end;
- {$EXTERNALSYM _CREATE_PROCESS_DEBUG_INFO}
- CREATE_PROCESS_DEBUG_INFO = _CREATE_PROCESS_DEBUG_INFO;
- {$EXTERNALSYM CREATE_PROCESS_DEBUG_INFO}
- TCreateProcessDebugInfo = CREATE_PROCESS_DEBUG_INFO;
- PCreateProcessDebugInfo = LPCREATE_PROCESS_DEBUG_INFO;
-
- LPEXIT_THREAD_DEBUG_INFO = ^EXIT_THREAD_DEBUG_INFO;
- {$EXTERNALSYM LPEXIT_THREAD_DEBUG_INFO}
- _EXIT_THREAD_DEBUG_INFO = record
- dwExitCode: DWORD;
- end;
- {$EXTERNALSYM _EXIT_THREAD_DEBUG_INFO}
- EXIT_THREAD_DEBUG_INFO = _EXIT_THREAD_DEBUG_INFO;
- {$EXTERNALSYM EXIT_THREAD_DEBUG_INFO}
- TExitThreadDebugInfo = EXIT_THREAD_DEBUG_INFO;
- PExitThreadDebugInfo = LPEXIT_THREAD_DEBUG_INFO;
-
- LPEXIT_PROCESS_DEBUG_INFO = ^EXIT_PROCESS_DEBUG_INFO;
- {$EXTERNALSYM LPEXIT_PROCESS_DEBUG_INFO}
- _EXIT_PROCESS_DEBUG_INFO = record
- dwExitCode: DWORD;
- end;
- {$EXTERNALSYM _EXIT_PROCESS_DEBUG_INFO}
- EXIT_PROCESS_DEBUG_INFO = _EXIT_PROCESS_DEBUG_INFO;
- {$EXTERNALSYM EXIT_PROCESS_DEBUG_INFO}
- TExitProcessDebugInfo = EXIT_PROCESS_DEBUG_INFO;
- PExitProcessDebugInfo = LPEXIT_PROCESS_DEBUG_INFO;
-
- LPLOAD_DLL_DEBUG_INFO = ^LOAD_DLL_DEBUG_INFO;
- {$EXTERNALSYM LPLOAD_DLL_DEBUG_INFO}
- _LOAD_DLL_DEBUG_INFO = record
- hFile: HANDLE;
- lpBaseOfDll: LPVOID;
- dwDebugInfoFileOffset: DWORD;
- nDebugInfoSize: DWORD;
- lpImageName: LPVOID;
- fUnicode: Word;
- end;
- {$EXTERNALSYM _LOAD_DLL_DEBUG_INFO}
- LOAD_DLL_DEBUG_INFO = _LOAD_DLL_DEBUG_INFO;
- {$EXTERNALSYM LOAD_DLL_DEBUG_INFO}
- TLoadDllDebugInfo = LOAD_DLL_DEBUG_INFO;
- PLoadDllDebugInfo = LPLOAD_DLL_DEBUG_INFO;
-
- LPUNLOAD_DLL_DEBUG_INFO = ^UNLOAD_DLL_DEBUG_INFO;
- {$EXTERNALSYM LPUNLOAD_DLL_DEBUG_INFO}
- _UNLOAD_DLL_DEBUG_INFO = record
- lpBaseOfDll: LPVOID;
- end;
- {$EXTERNALSYM _UNLOAD_DLL_DEBUG_INFO}
- UNLOAD_DLL_DEBUG_INFO = _UNLOAD_DLL_DEBUG_INFO;
- {$EXTERNALSYM UNLOAD_DLL_DEBUG_INFO}
- TUnloadDllDebugInfo = UNLOAD_DLL_DEBUG_INFO;
- PUnloadDllDebugInfo = LPUNLOAD_DLL_DEBUG_INFO;
-
- LPOUTPUT_DEBUG_STRING_INFO = ^OUTPUT_DEBUG_STRING_INFO;
- {$EXTERNALSYM LPOUTPUT_DEBUG_STRING_INFO}
- _OUTPUT_DEBUG_STRING_INFO = record
- lpDebugStringData: LPSTR;
- fUnicode: Word;
- nDebugStringLength: Word;
- end;
- {$EXTERNALSYM _OUTPUT_DEBUG_STRING_INFO}
- OUTPUT_DEBUG_STRING_INFO = _OUTPUT_DEBUG_STRING_INFO;
- {$EXTERNALSYM OUTPUT_DEBUG_STRING_INFO}
- TOutputDebugStringInfo = OUTPUT_DEBUG_STRING_INFO;
- POutputDebugStringInfo = LPOUTPUT_DEBUG_STRING_INFO;
-
- LPRIP_INFO = ^RIP_INFO;
- {$EXTERNALSYM LPRIP_INFO}
- _RIP_INFO = record
- dwError: DWORD;
- dwType: DWORD;
- end;
- {$EXTERNALSYM _RIP_INFO}
- RIP_INFO = _RIP_INFO;
- {$EXTERNALSYM RIP_INFO}
- TRipInfo = RIP_INFO;
- PRipInfo = LPRIP_INFO;
-
- LPDEBUG_EVENT = ^DEBUG_EVENT;
- {$EXTERNALSYM LPDEBUG_EVENT}
- _DEBUG_EVENT = record
- dwDebugEventCode: DWORD;
- dwProcessId: DWORD;
- dwThreadId: DWORD;
- case Integer of
- 0: (Exception: EXCEPTION_DEBUG_INFO);
- 1: (CreateThread: CREATE_THREAD_DEBUG_INFO);
- 2: (CreateProcessInfo: CREATE_PROCESS_DEBUG_INFO);
- 3: (ExitThread: EXIT_THREAD_DEBUG_INFO);
- 4: (ExitProcess: EXIT_PROCESS_DEBUG_INFO);
- 5: (LoadDll: LOAD_DLL_DEBUG_INFO);
- 6: (UnloadDll: UNLOAD_DLL_DEBUG_INFO);
- 7: (DebugString: OUTPUT_DEBUG_STRING_INFO);
- 8: (RipInfo: RIP_INFO);
- end;
- {$EXTERNALSYM _DEBUG_EVENT}
- DEBUG_EVENT = _DEBUG_EVENT;
- {$EXTERNALSYM DEBUG_EVENT}
- TDebugEvent = DEBUG_EVENT;
- PDebugEvent = LPDEBUG_EVENT;
-
- LPCONTEXT = PCONTEXT;
- {$EXTERNALSYM LPCONTEXT}
- LPEXCEPTION_RECORD = PEXCEPTION_RECORD;
- {$EXTERNALSYM LPEXCEPTION_RECORD}
- LPEXCEPTION_POINTERS = PEXCEPTION_POINTERS;
- {$EXTERNALSYM LPEXCEPTION_POINTERS}
-
-const
- DRIVE_UNKNOWN = 0;
- {$EXTERNALSYM DRIVE_UNKNOWN}
- DRIVE_NO_ROOT_DIR = 1;
- {$EXTERNALSYM DRIVE_NO_ROOT_DIR}
- DRIVE_REMOVABLE = 2;
- {$EXTERNALSYM DRIVE_REMOVABLE}
- DRIVE_FIXED = 3;
- {$EXTERNALSYM DRIVE_FIXED}
- DRIVE_REMOTE = 4;
- {$EXTERNALSYM DRIVE_REMOTE}
- DRIVE_CDROM = 5;
- {$EXTERNALSYM DRIVE_CDROM}
- DRIVE_RAMDISK = 6;
- {$EXTERNALSYM DRIVE_RAMDISK}
-
-function GetFreeSpace(w: WORD): DWORD;
-{$EXTERNALSYM GetFreeSpace}
-
-const
- FILE_TYPE_UNKNOWN = $0000;
- {$EXTERNALSYM FILE_TYPE_UNKNOWN}
- FILE_TYPE_DISK = $0001;
- {$EXTERNALSYM FILE_TYPE_DISK}
- FILE_TYPE_CHAR = $0002;
- {$EXTERNALSYM FILE_TYPE_CHAR}
- FILE_TYPE_PIPE = $0003;
- {$EXTERNALSYM FILE_TYPE_PIPE}
- FILE_TYPE_REMOTE = $8000;
- {$EXTERNALSYM FILE_TYPE_REMOTE}
-
- STD_INPUT_HANDLE = DWORD(-10);
- {$EXTERNALSYM STD_INPUT_HANDLE}
- STD_OUTPUT_HANDLE = DWORD(-11);
- {$EXTERNALSYM STD_OUTPUT_HANDLE}
- STD_ERROR_HANDLE = DWORD(-12);
- {$EXTERNALSYM STD_ERROR_HANDLE}
-
- NOPARITY = 0;
- {$EXTERNALSYM NOPARITY}
- ODDPARITY = 1;
- {$EXTERNALSYM ODDPARITY}
- EVENPARITY = 2;
- {$EXTERNALSYM EVENPARITY}
- MARKPARITY = 3;
- {$EXTERNALSYM MARKPARITY}
- SPACEPARITY = 4;
- {$EXTERNALSYM SPACEPARITY}
-
- ONESTOPBIT = 0;
- {$EXTERNALSYM ONESTOPBIT}
- ONE5STOPBITS = 1;
- {$EXTERNALSYM ONE5STOPBITS}
- TWOSTOPBITS = 2;
- {$EXTERNALSYM TWOSTOPBITS}
-
- IGNORE = 0; // Ignore signal
- {$EXTERNALSYM IGNORE}
- INFINITE = DWORD($FFFFFFFF); // Infinite timeout
- {$EXTERNALSYM INFINITE}
-
-//
-// Baud rates at which the communication device operates
-//
-
- CBR_110 = 110;
- {$EXTERNALSYM CBR_110}
- CBR_300 = 300;
- {$EXTERNALSYM CBR_300}
- CBR_600 = 600;
- {$EXTERNALSYM CBR_600}
- CBR_1200 = 1200;
- {$EXTERNALSYM CBR_1200}
- CBR_2400 = 2400;
- {$EXTERNALSYM CBR_2400}
- CBR_4800 = 4800;
- {$EXTERNALSYM CBR_4800}
- CBR_9600 = 9600;
- {$EXTERNALSYM CBR_9600}
- CBR_14400 = 14400;
- {$EXTERNALSYM CBR_14400}
- CBR_19200 = 19200;
- {$EXTERNALSYM CBR_19200}
- CBR_38400 = 38400;
- {$EXTERNALSYM CBR_38400}
- CBR_56000 = 56000;
- {$EXTERNALSYM CBR_56000}
- CBR_57600 = 57600;
- {$EXTERNALSYM CBR_57600}
- CBR_115200 = 115200;
- {$EXTERNALSYM CBR_115200}
- CBR_128000 = 128000;
- {$EXTERNALSYM CBR_128000}
- CBR_256000 = 256000;
- {$EXTERNALSYM CBR_256000}
-
-//
-// Error Flags
-//
-
- CE_RXOVER = $0001; // Receive Queue overflow
- {$EXTERNALSYM CE_RXOVER}
- CE_OVERRUN = $0002; // Receive Overrun Error
- {$EXTERNALSYM CE_OVERRUN}
- CE_RXPARITY = $0004; // Receive Parity Error
- {$EXTERNALSYM CE_RXPARITY}
- CE_FRAME = $0008; // Receive Framing error
- {$EXTERNALSYM CE_FRAME}
- CE_BREAK = $0010; // Break Detected
- {$EXTERNALSYM CE_BREAK}
- CE_TXFULL = $0100; // TX Queue is full
- {$EXTERNALSYM CE_TXFULL}
- CE_PTO = $0200; // LPTx Timeout
- {$EXTERNALSYM CE_PTO}
- CE_IOE = $0400; // LPTx I/O Error
- {$EXTERNALSYM CE_IOE}
- CE_DNS = $0800; // LPTx Device not selected
- {$EXTERNALSYM CE_DNS}
- CE_OOP = $1000; // LPTx Out-Of-Paper
- {$EXTERNALSYM CE_OOP}
- CE_MODE = $8000; // Requested mode unsupported
- {$EXTERNALSYM CE_MODE}
-
- IE_BADID = DWORD(-1); // Invalid or unsupported id
- {$EXTERNALSYM IE_BADID}
- IE_OPEN = DWORD(-2); // Device Already Open
- {$EXTERNALSYM IE_OPEN}
- IE_NOPEN = DWORD(-3); // Device Not Open
- {$EXTERNALSYM IE_NOPEN}
- IE_MEMORY = DWORD(-4); // Unable to allocate queues
- {$EXTERNALSYM IE_MEMORY}
- IE_DEFAULT = DWORD(-5); // Error in default parameters
- {$EXTERNALSYM IE_DEFAULT}
- IE_HARDWARE = DWORD(-10); // Hardware Not Present
- {$EXTERNALSYM IE_HARDWARE}
- IE_BYTESIZE = DWORD(-11); // Illegal Byte Size
- {$EXTERNALSYM IE_BYTESIZE}
- IE_BAUDRATE = DWORD(-12); // Unsupported BaudRate
- {$EXTERNALSYM IE_BAUDRATE}
-
-//
-// Events
-//
-
- EV_RXCHAR = $0001; // Any Character received
- {$EXTERNALSYM EV_RXCHAR}
- EV_RXFLAG = $0002; // Received certain character
- {$EXTERNALSYM EV_RXFLAG}
- EV_TXEMPTY = $0004; // Transmitt Queue Empty
- {$EXTERNALSYM EV_TXEMPTY}
- EV_CTS = $0008; // CTS changed state
- {$EXTERNALSYM EV_CTS}
- EV_DSR = $0010; // DSR changed state
- {$EXTERNALSYM EV_DSR}
- EV_RLSD = $0020; // RLSD changed state
- {$EXTERNALSYM EV_RLSD}
- EV_BREAK = $0040; // BREAK received
- {$EXTERNALSYM EV_BREAK}
- EV_ERR = $0080; // Line status error occurred
- {$EXTERNALSYM EV_ERR}
- EV_RING = $0100; // Ring signal detected
- {$EXTERNALSYM EV_RING}
- EV_PERR = $0200; // Printer error occured
- {$EXTERNALSYM EV_PERR}
- EV_RX80FULL = $0400; // Receive buffer is 80 percent full
- {$EXTERNALSYM EV_RX80FULL}
- EV_EVENT1 = $0800; // Provider specific event 1
- {$EXTERNALSYM EV_EVENT1}
- EV_EVENT2 = $1000; // Provider specific event 2
- {$EXTERNALSYM EV_EVENT2}
-
-//
-// Escape Functions
-//
-
- SETXOFF = 1; // Simulate XOFF received
- {$EXTERNALSYM SETXOFF}
- SETXON = 2; // Simulate XON received
- {$EXTERNALSYM SETXON}
- SETRTS = 3; // Set RTS high
- {$EXTERNALSYM SETRTS}
- CLRRTS = 4; // Set RTS low
- {$EXTERNALSYM CLRRTS}
- SETDTR = 5; // Set DTR high
- {$EXTERNALSYM SETDTR}
- CLRDTR = 6; // Set DTR low
- {$EXTERNALSYM CLRDTR}
- RESETDEV = 7; // Reset device if possible
- {$EXTERNALSYM RESETDEV}
- SETBREAK = 8; // Set the device break line.
- {$EXTERNALSYM SETBREAK}
- CLRBREAK = 9; // Clear the device break line.
- {$EXTERNALSYM CLRBREAK}
-
-//
-// PURGE function flags.
-//
-
- PURGE_TXABORT = $0001; // Kill the pending/current writes to the comm port.
- {$EXTERNALSYM PURGE_TXABORT}
- PURGE_RXABORT = $0002; // Kill the pending/current reads to the comm port.
- {$EXTERNALSYM PURGE_RXABORT}
- PURGE_TXCLEAR = $0004; // Kill the transmit queue if there.
- {$EXTERNALSYM PURGE_TXCLEAR}
- PURGE_RXCLEAR = $0008; // Kill the typeahead buffer if there.
- {$EXTERNALSYM PURGE_RXCLEAR}
-
- LPTx = $80; // Set if ID is for LPT device
- {$EXTERNALSYM LPTx}
-
-//
-// Modem Status Flags
-//
-
- MS_CTS_ON = DWORD($0010);
- {$EXTERNALSYM MS_CTS_ON}
- MS_DSR_ON = DWORD($0020);
- {$EXTERNALSYM MS_DSR_ON}
- MS_RING_ON = DWORD($0040);
- {$EXTERNALSYM MS_RING_ON}
- MS_RLSD_ON = DWORD($0080);
- {$EXTERNALSYM MS_RLSD_ON}
-
-//
-// WaitSoundState() Constants
-//
-
- S_QUEUEEMPTY = 0;
- {$EXTERNALSYM S_QUEUEEMPTY}
- S_THRESHOLD = 1;
- {$EXTERNALSYM S_THRESHOLD}
- S_ALLTHRESHOLD = 2;
- {$EXTERNALSYM S_ALLTHRESHOLD}
-
-//
-// Accent Modes
-//
-
- S_NORMAL = 0;
- {$EXTERNALSYM S_NORMAL}
- S_LEGATO = 1;
- {$EXTERNALSYM S_LEGATO}
- S_STACCATO = 2;
- {$EXTERNALSYM S_STACCATO}
-
-//
-// SetSoundNoise() Sources
-//
-
- S_PERIOD512 = 0; // Freq = N/512 high pitch, less coarse hiss
- {$EXTERNALSYM S_PERIOD512}
- S_PERIOD1024 = 1; // Freq = N/1024
- {$EXTERNALSYM S_PERIOD1024}
- S_PERIOD2048 = 2; // Freq = N/2048 low pitch, more coarse hiss
- {$EXTERNALSYM S_PERIOD2048}
- S_PERIODVOICE = 3; // Source is frequency from voice channel (3)
- {$EXTERNALSYM S_PERIODVOICE}
- S_WHITE512 = 4; // Freq = N/512 high pitch, less coarse hiss
- {$EXTERNALSYM S_WHITE512}
- S_WHITE1024 = 5; // Freq = N/1024
- {$EXTERNALSYM S_WHITE1024}
- S_WHITE2048 = 6; // Freq = N/2048 low pitch, more coarse hiss
- {$EXTERNALSYM S_WHITE2048}
- S_WHITEVOICE = 7; // Source is frequency from voice channel (3)
- {$EXTERNALSYM S_WHITEVOICE}
-
- S_SERDVNA = DWORD(-1); // Device not available
- {$EXTERNALSYM S_SERDVNA}
- S_SEROFM = DWORD(-2); // Out of memory
- {$EXTERNALSYM S_SEROFM}
- S_SERMACT = DWORD(-3); // Music active
- {$EXTERNALSYM S_SERMACT}
- S_SERQFUL = DWORD(-4); // Queue full
- {$EXTERNALSYM S_SERQFUL}
- S_SERBDNT = DWORD(-5); // Invalid note
- {$EXTERNALSYM S_SERBDNT}
- S_SERDLN = DWORD(-6); // Invalid note length
- {$EXTERNALSYM S_SERDLN}
- S_SERDCC = DWORD(-7); // Invalid note count
- {$EXTERNALSYM S_SERDCC}
- S_SERDTP = DWORD(-8); // Invalid tempo
- {$EXTERNALSYM S_SERDTP}
- S_SERDVL = DWORD(-9); // Invalid volume
- {$EXTERNALSYM S_SERDVL}
- S_SERDMD = DWORD(-10); // Invalid mode
- {$EXTERNALSYM S_SERDMD}
- S_SERDSH = DWORD(-11); // Invalid shape
- {$EXTERNALSYM S_SERDSH}
- S_SERDPT = DWORD(-12); // Invalid pitch
- {$EXTERNALSYM S_SERDPT}
- S_SERDFQ = DWORD(-13); // Invalid frequency
- {$EXTERNALSYM S_SERDFQ}
- S_SERDDR = DWORD(-14); // Invalid duration
- {$EXTERNALSYM S_SERDDR}
- S_SERDSR = DWORD(-15); // Invalid source
- {$EXTERNALSYM S_SERDSR}
- S_SERDST = DWORD(-16); // Invalid state
- {$EXTERNALSYM S_SERDST}
-
- NMPWAIT_WAIT_FOREVER = DWORD($ffffffff);
- {$EXTERNALSYM NMPWAIT_WAIT_FOREVER}
- NMPWAIT_NOWAIT = $00000001;
- {$EXTERNALSYM NMPWAIT_NOWAIT}
- NMPWAIT_USE_DEFAULT_WAIT = $00000000;
- {$EXTERNALSYM NMPWAIT_USE_DEFAULT_WAIT}
-
- FS_CASE_IS_PRESERVED = FILE_CASE_PRESERVED_NAMES;
- {$EXTERNALSYM FS_CASE_IS_PRESERVED}
- FS_CASE_SENSITIVE = FILE_CASE_SENSITIVE_SEARCH;
- {$EXTERNALSYM FS_CASE_SENSITIVE}
- FS_UNICODE_STORED_ON_DISK = FILE_UNICODE_ON_DISK;
- {$EXTERNALSYM FS_UNICODE_STORED_ON_DISK}
- FS_PERSISTENT_ACLS = FILE_PERSISTENT_ACLS;
- {$EXTERNALSYM FS_PERSISTENT_ACLS}
- FS_VOL_IS_COMPRESSED = FILE_VOLUME_IS_COMPRESSED;
- {$EXTERNALSYM FS_VOL_IS_COMPRESSED}
- FS_FILE_COMPRESSION = FILE_FILE_COMPRESSION;
- {$EXTERNALSYM FS_FILE_COMPRESSION}
- FS_FILE_ENCRYPTION = FILE_SUPPORTS_ENCRYPTION;
- {$EXTERNALSYM FS_FILE_ENCRYPTION}
-
- FILE_MAP_COPY = SECTION_QUERY;
- {$EXTERNALSYM FILE_MAP_COPY}
- FILE_MAP_WRITE = SECTION_MAP_WRITE;
- {$EXTERNALSYM FILE_MAP_WRITE}
- FILE_MAP_READ = SECTION_MAP_READ;
- {$EXTERNALSYM FILE_MAP_READ}
- FILE_MAP_ALL_ACCESS = SECTION_ALL_ACCESS;
- {$EXTERNALSYM FILE_MAP_ALL_ACCESS}
-
- OF_READ = $00000000;
- {$EXTERNALSYM OF_READ}
- OF_WRITE = $00000001;
- {$EXTERNALSYM OF_WRITE}
- OF_READWRITE = $00000002;
- {$EXTERNALSYM OF_READWRITE}
- OF_SHARE_COMPAT = $00000000;
- {$EXTERNALSYM OF_SHARE_COMPAT}
- OF_SHARE_EXCLUSIVE = $00000010;
- {$EXTERNALSYM OF_SHARE_EXCLUSIVE}
- OF_SHARE_DENY_WRITE = $00000020;
- {$EXTERNALSYM OF_SHARE_DENY_WRITE}
- OF_SHARE_DENY_READ = $00000030;
- {$EXTERNALSYM OF_SHARE_DENY_READ}
- OF_SHARE_DENY_NONE = $00000040;
- {$EXTERNALSYM OF_SHARE_DENY_NONE}
- OF_PARSE = $00000100;
- {$EXTERNALSYM OF_PARSE}
- OF_DELETE = $00000200;
- {$EXTERNALSYM OF_DELETE}
- OF_VERIFY = $00000400;
- {$EXTERNALSYM OF_VERIFY}
- OF_CANCEL = $00000800;
- {$EXTERNALSYM OF_CANCEL}
- OF_CREATE = $00001000;
- {$EXTERNALSYM OF_CREATE}
- OF_PROMPT = $00002000;
- {$EXTERNALSYM OF_PROMPT}
- OF_EXIST = $00004000;
- {$EXTERNALSYM OF_EXIST}
- OF_REOPEN = $00008000;
- {$EXTERNALSYM OF_REOPEN}
-
- OFS_MAXPATHNAME = 128;
- {$EXTERNALSYM OFS_MAXPATHNAME}
-
-type
- LPOFSTRUCT = ^OFSTRUCT;
- {$EXTERNALSYM LPOFSTRUCT}
- _OFSTRUCT = record
- cBytes: Byte;
- fFixedDisk: Byte;
- nErrCode: Word;
- Reserved1: Word;
- Reserved2: Word;
- szPathName: array [0..OFS_MAXPATHNAME - 1] of CHAR;
- end;
- {$EXTERNALSYM _OFSTRUCT}
- OFSTRUCT = _OFSTRUCT;
- {$EXTERNALSYM OFSTRUCT}
- TOfStruct = OFSTRUCT;
- POfStruct = LPOFSTRUCT;
-
-// 64 bit interlocked functions, donated by Will DeWitt Jr.
-
-function InterlockedCompareExchange64(var Destination: LONGLONG; Exchange, Comperand: LONGLONG): LONGLONG; stdcall;
-{$EXTERNALSYM InterlockedCompareExchange64}
-
-function InterlockedAnd64(var Destination: LONGLONG; Value: LONGLONG): LONGLONG;
-{$EXTERNALSYM InterlockedAnd64}
-
-function InterlockedOr64(var Destination: LONGLONG; Value: LONGLONG): LONGLONG;
-{$EXTERNALSYM InterlockedOr64}
-
-function InterlockedXor64(var Destination: LONGLONG; Value: LONGLONG): LONGLONG;
-{$EXTERNALSYM InterlockedXor64}
-
-function InterlockedIncrement64(var Addend: LONGLONG): LONGLONG;
-{$EXTERNALSYM InterlockedIncrement64}
-
-function InterlockedDecrement64(var Addend: LONGLONG): LONGLONG;
-{$EXTERNALSYM InterlockedDecrement}
-
-function InterlockedExchange64(var Target: LONGLONG; Value: LONGLONG): LONGLONG;
-{$EXTERNALSYM InterlockedExchange64}
-
-function InterlockedExchangeAdd64(var Addend: LONGLONG; Value: LONGLONG): LONGLONG;
-{$EXTERNALSYM InterlockedExchangeAdd64}
-
-//
-// The Risc compilers support intrinsic functions for interlocked
-// increment, decrement, and exchange.
-//
-
-function InterlockedIncrement(var lpAddend: LONG): LONG; stdcall;
-{$EXTERNALSYM InterlockedIncrement}
-
-function InterlockedDecrement(var lpAddend: LONG): LONG; stdcall;
-{$EXTERNALSYM InterlockedDecrement}
-
-function InterlockedExchange(var Target: LONG; Value: LONG): LONG; stdcall;
-{$EXTERNALSYM InterlockedExchange}
-
-function InterlockedExchangePointer(var Target: PVOID; Value: PVOID): PVOID;
-{$EXTERNALSYM InterlockedExchangePointer}
-
-function InterlockedExchangeAdd(var Addend: LONG; Value: LONG): LONG; stdcall;
-{$EXTERNALSYM InterlockedExchangeAdd}
-
-function InterlockedCompareExchange(var Destination: LONG; Exchange: LONG;
- Comperand: LONG): LONG; stdcall;
-{$EXTERNALSYM InterlockedCompareExchange}
-
-function InterlockedCompareExchangePointer(var Destination: PVOID;
- Exchange, Comperand: PVOID): PVOID;
-{$EXTERNALSYM InterlockedCompareExchangePointer}
-
-{
-#define InterlockedIncrementAcquire InterlockedIncrement
-#define InterlockedIncrementRelease InterlockedIncrement
-#define InterlockedDecrementAcquire InterlockedDecrement
-#define InterlockedDecrementRelease InterlockedDecrement
-#define InterlockedIncrementAcquire InterlockedIncrement
-#define InterlockedIncrementRelease InterlockedIncrement
-#define InterlockedCompareExchangeAcquire InterlockedCompareExchange
-#define InterlockedCompareExchangeRelease InterlockedCompareExchange
-#define InterlockedCompareExchangeAcquire64 InterlockedCompareExchange64
-#define InterlockedCompareExchangeRelease64 InterlockedCompareExchange64
-}
-
-procedure InitializeSListHead(ListHead: PSLIST_HEADER); stdcall;
-{$EXTERNALSYM InitializeSListHead}
-
-function InterlockedPopEntrySList(ListHead: PSLIST_HEADER): PSLIST_ENTRY; stdcall;
-{$EXTERNALSYM InterlockedPopEntrySList}
-
-function InterlockedPushEntrySList(ListHead: PSLIST_HEADER; ListEntry: PSLIST_ENTRY): PSLIST_ENTRY; stdcall;
-{$EXTERNALSYM InterlockedPushEntrySList}
-
-function InterlockedFlushSList(ListHead: PSLIST_HEADER): PSLIST_ENTRY; stdcall;
-{$EXTERNALSYM InterlockedFlushSList}
-
-function QueryDepthSList(ListHead: PSLIST_HEADER): USHORT; stdcall;
-{$EXTERNALSYM QueryDepthSList}
-
-function FreeResource(hResData: HGLOBAL): BOOL; stdcall;
-{$EXTERNALSYM FreeResource}
-
-function LockResource(hResData: HGLOBAL): LPVOID; stdcall;
-{$EXTERNALSYM LockResource}
-
-function UnlockResource(hResData: HANDLE): BOOL;
-{$EXTERNALSYM UnlockResource}
-
-const
- MAXINTATOM = $C000;
- {$EXTERNALSYM MAXINTATOM}
- INVALID_ATOM = ATOM(0);
- {$EXTERNALSYM INVALID_ATOM}
-
-type
- MAKEINTATOMA = PAnsiChar;
- MAKEINTATOMW = PWideChar;
- {$IFDEF UNICODE}
- MAKEINTATOM = MAKEINTATOMW;
- {$EXTERNALSYM MAKEINTATOM}
- {$ELSE}
- MAKEINTATOM = MAKEINTATOMA;
- {$EXTERNALSYM MAKEINTATOM}
- {$ENDIF UNICODE}
-
-function FreeLibrary(hLibModule: HMODULE): BOOL; stdcall;
-{$EXTERNALSYM FreeLibrary}
-
-procedure FreeLibraryAndExitThread(hLibModule: HMODULE; dwExitCode: DWORD); stdcall;
-{$EXTERNALSYM FreeLibraryAndExitThread}
-
-function DisableThreadLibraryCalls(hLibModule: HMODULE): BOOL; stdcall;
-{$EXTERNALSYM DisableThreadLibraryCalls}
-
-function GetProcAddress(hModule: HMODULE; lpProcName: LPCSTR): FARPROC; stdcall;
-{$EXTERNALSYM GetProcAddress}
-
-function GetVersion: DWORD; stdcall;
-{$EXTERNALSYM GetVersion)}
-
-function GlobalAlloc(uFlags: UINT; dwBytes: SIZE_T): HGLOBAL; stdcall;
-{$EXTERNALSYM GlobalAlloc}
-
-function GlobalReAlloc(hMem: HGLOBAL; dwBytes: SIZE_T; uFlags: UINT): HGLOBAL; stdcall;
-{$EXTERNALSYM GlobalReAlloc}
-
-function GlobalSize(hMem: HGLOBAL): SIZE_T; stdcall;
-{$EXTERNALSYM GlobalSize}
-
-function GlobalFlags(hMem: HGLOBAL): UINT; stdcall;
-{$EXTERNALSYM GlobalFlags}
-
-function GlobalLock(hMem: HGLOBAL): LPVOID; stdcall;
-{$EXTERNALSYM GlobalLock}
-
-//!!!MWH My version win31 = DWORD WINAPI GlobalHandle(UINT)
-
-function GlobalHandle(pMem: LPCVOID): HGLOBAL; stdcall;
-{$EXTERNALSYM GlobalHandle}
-
-function GlobalUnlock(hMem: HGLOBAL): BOOL; stdcall;
-{$EXTERNALSYM GlobalUnlock}
-
-function GlobalFree(hMem: HGLOBAL): HGLOBAL; stdcall;
-{$EXTERNALSYM GlobalFree}
-
-function GlobalCompact(dwMinFree: DWORD): SIZE_T; stdcall;
-{$EXTERNALSYM GlobalCompact}
-
-procedure GlobalFix(hMem: HGLOBAL); stdcall;
-{$EXTERNALSYM GlobalFix}
-
-procedure GlobalUnfix(hMem: HGLOBAL); stdcall;
-{$EXTERNALSYM GlobalUnfix}
-
-function GlobalWire(hMem: HGLOBAL): LPVOID; stdcall;
-{$EXTERNALSYM GlobalWire}
-
-function GlobalUnWire(hMem: HGLOBAL): BOOL; stdcall;
-{$EXTERNALSYM GlobalUnWire}
-
-procedure GlobalMemoryStatus(var lpBuffer: MEMORYSTATUS); stdcall;
-{$EXTERNALSYM GlobalMemoryStatus}
-
-type
- LPMEMORYSTATUSEX = ^MEMORYSTATUSEX;
- {$EXTERNALSYM LPMEMORYSTATUSEX}
- _MEMORYSTATUSEX = record
- dwLength: DWORD;
- dwMemoryLoad: DWORD;
- ullTotalPhys: DWORDLONG;
- ullAvailPhys: DWORDLONG;
- ullTotalPageFile: DWORDLONG;
- ullAvailPageFile: DWORDLONG;
- ullTotalVirtual: DWORDLONG;
- ullAvailVirtual: DWORDLONG;
- ullAvailExtendedVirtual: DWORDLONG;
- end;
- {$EXTERNALSYM _MEMORYSTATUSEX}
- MEMORYSTATUSEX = _MEMORYSTATUSEX;
- {$EXTERNALSYM MEMORYSTATUSEX}
- TMemoryStatusEx = MEMORYSTATUSEX;
- PMemoryStatusEx = LPMEMORYSTATUSEX;
-
-function GlobalMemoryStatusEx(var lpBuffer: MEMORYSTATUSEX): BOOL; stdcall;
-{$EXTERNALSYM GlobalMemoryStatusEx}
-
-function LocalAlloc(uFlags: UINT; uBytes: SIZE_T): HLOCAL; stdcall;
-{$EXTERNALSYM LocalAlloc}
-
-function LocalReAlloc(hMem: HLOCAL; uBytes: SIZE_T; uFlags: UINT): HLOCAL; stdcall;
-{$EXTERNALSYM LocalReAlloc}
-
-function LocalLock(hMem: HLOCAL): LPVOID; stdcall;
-{$EXTERNALSYM LocalLock}
-
-function LocalHandle(pMem: LPCVOID): HLOCAL; stdcall;
-{$EXTERNALSYM LocalHandle}
-
-function LocalUnlock(hMem: HLOCAL): BOOL; stdcall;
-{$EXTERNALSYM LocalUnlock}
-
-function LocalSize(hMem: HLOCAL): SIZE_T; stdcall;
-{$EXTERNALSYM LocalSize}
-
-function LocalFlags(hMem: HLOCAL): UINT; stdcall;
-{$EXTERNALSYM LocalFlags}
-
-function LocalFree(hMem: HLOCAL): HLOCAL; stdcall;
-{$EXTERNALSYM LocalFree}
-
-function LocalShrink(hMem: HLOCAL; cbNewSize: UINT): SIZE_T; stdcall;
-{$EXTERNALSYM LocalShrink}
-
-function LocalCompact(uMinFree: UINT): SIZE_T; stdcall;
-{$EXTERNALSYM LocalCompact}
-
-function FlushInstructionCache(hProcess: HANDLE; lpBaseAddress: LPCVOID;
- dwSize: DWORD): BOOL; stdcall;
-{$EXTERNALSYM FlushInstructionCache}
-
-function VirtualAlloc(lpAddress: LPVOID; dwSize: SIZE_T; flAllocationType: DWORD;
- flProtect: DWORD): LPVOID; stdcall;
-{$EXTERNALSYM VirtualAlloc}
-
-function VirtualFree(lpAddress: LPVOID; dwSize: SIZE_T; dwFreeType: DWORD): BOOL; stdcall;
-{$EXTERNALSYM VirtualFree}
-
-function VirtualProtect(lpAddress: LPVOID; dwSize: SIZE_T; flNewProtect: DWORD;
- lpflOldProtect: PDWORD): BOOL; stdcall;
-{$EXTERNALSYM VirtualProtect}
-
-function VirtualQuery(lpAddress: LPCVOID; var lpBuffer: MEMORY_BASIC_INFORMATION;
- dwLength: DWORD): DWORD; stdcall;
-{$EXTERNALSYM VirtualQuery}
-
-function VirtualAllocEx(hProcess: HANDLE; lpAddress: LPVOID; dwSize: SIZE_T;
- flAllocationType: DWORD; flProtect: DWORD): LPVOID; stdcall;
-{$EXTERNALSYM VirtualAllocEx}
-
-function GetWriteWatch(dwFlags: DWORD; lpBaseAddress: PVOID;
- dwRegionSize: SIZE_T; var lpAddresses: PVOID; var lpdwCount: ULONG_PTR;
- var lpdwGranularity: ULONG): UINT; stdcall;
-{$EXTERNALSYM GetWriteWatch}
-
-function ResetWriteWatch(lpBaseAddress: LPVOID; dwRegionSize: SIZE_T): UINT; stdcall;
-{$EXTERNALSYM ResetWriteWatch}
-
-function GetLargePageMinimum: SIZE_T; stdcall;
-{$EXTERNALSYM GetLargePageMinimum}
-
-function VirtualFreeEx(hProcess: HANDLE; lpAddress: LPVOID; dwSize: SIZE_T;
- dwFreeType: DWORD): BOOL; stdcall;
-{$EXTERNALSYM VirtualFreeEx}
-
-function VirtualProtectEx(hProcess: HANDLE; lpAddress: LPVOID; dwSize: SIZE_T;
- flNewProtect: DWORD; lpflOldProtect: PDWORD): BOOL; stdcall;
-{$EXTERNALSYM VirtualProtectEx}
-
-function VirtualQueryEx(hProcess: HANDLE; lpAddress: LPCVOID;
- var lpBuffer: MEMORY_BASIC_INFORMATION; dwLength: DWORD): DWORD; stdcall;
-{$EXTERNALSYM VirtualQueryEx}
-
-function HeapCreate(flOptions: DWORD; dwInitialSize: SIZE_T;
- dwMaximumSize: SIZE_T): HANDLE; stdcall;
-{$EXTERNALSYM HeapCreate}
-
-function HeapDestroy(hHeap: HANDLE): BOOL; stdcall;
-{$EXTERNALSYM HeapDestroy}
-
-function HeapAlloc(hHeap: HANDLE; dwFlags: DWORD; dwBytes: SIZE_T): LPVOID; stdcall;
-{$EXTERNALSYM HeapAlloc}
-
-function HeapReAlloc(hHeap: HANDLE; dwFlags: DWORD; lpMem: LPVOID; dwBytes: SIZE_T): LPVOID; stdcall;
-{$EXTERNALSYM HeapReAlloc}
-
-function HeapFree(hHeap: HANDLE; dwFlags: DWORD; lpMem: LPVOID): BOOL; stdcall;
-{$EXTERNALSYM HeapFree}
-
-function HeapSize(hHeap: HANDLE; dwFlags: DWORD; lpMem: LPCVOID): SIZE_T; stdcall;
-{$EXTERNALSYM HeapSize}
-
-function HeapValidate(hHeap: HANDLE; dwFlags: DWORD; lpMem: LPCVOID): BOOL; stdcall;
-{$EXTERNALSYM HeapValidate}
-
-function HeapCompact(hHeap: HANDLE; dwFlags: DWORD): SIZE_T; stdcall;
-{$EXTERNALSYM HeapCompact}
-
-function GetProcessHeap: HANDLE; stdcall;
-{$EXTERNALSYM GetProcessHeap)}
-
-function GetProcessHeaps(NumberOfHeaps: DWORD; var ProcessHeaps: HANDLE): DWORD; stdcall;
-{$EXTERNALSYM GetProcessHeaps}
-
-type
- PPROCESS_HEAP_ENTRY = ^PROCESS_HEAP_ENTRY;
- {$EXTERNALSYM PPROCESS_HEAP_ENTRY}
- _PROCESS_HEAP_ENTRY = record
- lpData: PVOID;
- cbData: DWORD;
- cbOverhead: BYTE;
- iRegionIndex: BYTE;
- wFlags: WORD;
- case Integer of
- 0: (
- hMem: HANDLE;
- dwReserved: array [0..2] of DWORD);
- 1: (
- dwComittedSize: DWORD;
- dwUnComittedSize: DWORD;
- lpFirstBlock: LPVOID;
- lpLastBlock: LPVOID);
- end;
- {$EXTERNALSYM _PROCESS_HEAP_ENTRY}
- PROCESS_HEAP_ENTRY = _PROCESS_HEAP_ENTRY;
- {$EXTERNALSYM PROCESS_HEAP_ENTRY}
- LPPROCESS_HEAP_ENTRY = ^PROCESS_HEAP_ENTRY;
- {$EXTERNALSYM LPPROCESS_HEAP_ENTRY}
- TProcessHeapEntry = PROCESS_HEAP_ENTRY;
- PProcessHeapEntry = PPROCESS_HEAP_ENTRY;
-
-const
- PROCESS_HEAP_REGION = $0001;
- {$EXTERNALSYM PROCESS_HEAP_REGION}
- PROCESS_HEAP_UNCOMMITTED_RANGE = $0002;
- {$EXTERNALSYM PROCESS_HEAP_UNCOMMITTED_RANGE}
- PROCESS_HEAP_ENTRY_BUSY = $0004;
- {$EXTERNALSYM PROCESS_HEAP_ENTRY_BUSY}
- PROCESS_HEAP_ENTRY_MOVEABLE = $0010;
- {$EXTERNALSYM PROCESS_HEAP_ENTRY_MOVEABLE}
- PROCESS_HEAP_ENTRY_DDESHARE = $0020;
- {$EXTERNALSYM PROCESS_HEAP_ENTRY_DDESHARE}
-
-function HeapLock(hHeap: HANDLE): BOOL; stdcall;
-{$EXTERNALSYM HeapLock}
-
-function HeapUnlock(hHeap: HANDLE): BOOL; stdcall;
-{$EXTERNALSYM HeapUnlock}
-
-function HeapWalk(hHeap: HANDLE; var lpEntry: PROCESS_HEAP_ENTRY): BOOL; stdcall;
-{$EXTERNALSYM HeapWalk}
-
-function HeapSetInformation(HeapHandle: HANDLE; HeapInformationClass: HEAP_INFORMATION_CLASS;
- HeapInformation: PVOID; HeapInformationLength: SIZE_T): BOOL; stdcall;
-{$EXTERNALSYM HeapSetInformation}
-
-function HeapQueryInformation(HeapHandle: HANDLE; HeapInformationClass: HEAP_INFORMATION_CLASS;
- HeapInformation: PVOID; HeapInformationLength: SIZE_T; ReturnLength: PSIZE_T): BOOL; stdcall;
-{$EXTERNALSYM HeapQueryInformation}
-
-// GetBinaryType return values.
-
-const
- SCS_32BIT_BINARY = 0;
- {$EXTERNALSYM SCS_32BIT_BINARY}
- SCS_DOS_BINARY = 1;
- {$EXTERNALSYM SCS_DOS_BINARY}
- SCS_WOW_BINARY = 2;
- {$EXTERNALSYM SCS_WOW_BINARY}
- SCS_PIF_BINARY = 3;
- {$EXTERNALSYM SCS_PIF_BINARY}
- SCS_POSIX_BINARY = 4;
- {$EXTERNALSYM SCS_POSIX_BINARY}
- SCS_OS216_BINARY = 5;
- {$EXTERNALSYM SCS_OS216_BINARY}
- SCS_64BIT_BINARY = 6;
- {$EXTERNALSYM SCS_64BIT_BINARY}
-
- SCS_THIS_PLATFORM_BINARY = SCS_32BIT_BINARY;
- {$EXTERNALSYM SCS_THIS_PLATFORM_BINARY}
-
-function GetBinaryTypeA(lpApplicationName: LPCSTR; var lpBinaryType: DWORD): BOOL; stdcall;
-{$EXTERNALSYM GetBinaryTypeA}
-function GetBinaryTypeW(lpApplicationName: LPCWSTR; var lpBinaryType: DWORD): BOOL; stdcall;
-{$EXTERNALSYM GetBinaryTypeW}
-function GetBinaryType(lpApplicationName: LPCTSTR; var lpBinaryType: DWORD): BOOL; stdcall;
-{$EXTERNALSYM GetBinaryType}
-
-function GetShortPathNameA(lpszLongPath: LPCSTR; lpszShortPath: LPSTR;
- cchBuffer: DWORD): DWORD; stdcall;
-{$EXTERNALSYM GetShortPathNameA}
-function GetShortPathNameW(lpszLongPath: LPCWSTR; lpszShortPath: LPWSTR;
- cchBuffer: DWORD): DWORD; stdcall;
-{$EXTERNALSYM GetShortPathNameW}
-function GetShortPathName(lpszLongPath: LPCTSTR; lpszShortPath: LPTSTR;
- cchBuffer: DWORD): DWORD; stdcall;
-{$EXTERNALSYM GetShortPathName}
-
-function GetLongPathNameA(lpszShortPath: LPCSTR; lpszLongPath: LPSTR;
- cchBuffer: DWORD): DWORD; stdcall;
-{$EXTERNALSYM GetLongPathNameA}
-function GetLongPathNameW(lpszShortPath: LPCWSTR; lpszLongPath: LPWSTR;
- cchBuffer: DWORD): DWORD; stdcall;
-{$EXTERNALSYM GetLongPathNameW}
-function GetLongPathName(lpszShortPath: LPCTSTR; lpszLongPath: LPTSTR;
- cchBuffer: DWORD): DWORD; stdcall;
-{$EXTERNALSYM GetLongPathName}
-
-function GetProcessAffinityMask(hProcess: HANDLE;
- var lpProcessAffinityMask, lpSystemAffinityMask: DWORD_PTR): BOOL; stdcall;
-{$EXTERNALSYM GetProcessAffinityMask}
-
-function SetProcessAffinityMask(hProcess: HANDLE;
- dwProcessAffinityMask: DWORD_PTR): BOOL; stdcall;
-{$EXTERNALSYM SetProcessAffinityMask}
-
-function GetProcessHandleCount(hProcess: HANDLE; out pdwHandleCount: DWORD): BOOL; stdcall;
-{$EXTERNALSYM GetProcessHandleCount}
-
-function GetProcessTimes(hProcess: HANDLE; var lpCreationTime, lpExitTime,
- lpKernelTime, lpUserTime: FILETIME): BOOL; stdcall;
-{$EXTERNALSYM GetProcessTimes}
-
-function GetProcessIoCounters(hProcess: HANDLE; var lpIoCounters: IO_COUNTERS): BOOL; stdcall;
-{$EXTERNALSYM GetProcessIoCounters}
-
-function GetProcessWorkingSetSize(hProcess: HANDLE;
- var lpMinimumWorkingSetSize, lpMaximumWorkingSetSize: SIZE_T): BOOL; stdcall;
-{$EXTERNALSYM GetProcessWorkingSetSize}
-
-function GetProcessWorkingSetSizeEx(hProcess: HANDLE; out lpMinimumWorkingSetSize, lpMaximumWorkingSetSize: SIZE_T; out Flags: DWORD): BOOL; stdcall;
-{$EXTERNALSYM GetProcessWorkingSetSizeEx}
-
-function SetProcessWorkingSetSize(hProcess: HANDLE; dwMinimumWorkingSetSize,
- dwMaximumWorkingSetSize: SIZE_T): BOOL; stdcall;
-{$EXTERNALSYM SetProcessWorkingSetSize}
-
-function SetProcessWorkingSetSizeEx(hProcess: HANDLE; dwMinimumWorkingSetSize, dwMaximumWorkingSetSize: SIZE_T; Flags: DWORD): BOOL; stdcall;
-{$EXTERNALSYM SetProcessWorkingSetSizeEx}
-
-function OpenProcess(dwDesiredAccess: DWORD; bInheritHandle: BOOL;
- dwProcessId: DWORD): HANDLE; stdcall;
-{$EXTERNALSYM OpenProcess}
-
-function GetCurrentProcess: HANDLE; stdcall;
-{$EXTERNALSYM GetCurrentProcess}
-
-function GetCurrentProcessId: DWORD; stdcall;
-{$EXTERNALSYM GetCurrentProcessId}
-
-procedure ExitProcess(uExitCode: UINT); stdcall;
-{$EXTERNALSYM ExitProcess}
-
-function TerminateProcess(hProcess: HANDLE; uExitCode: UINT): BOOL; stdcall;
-{$EXTERNALSYM TerminateProcess}
-
-function GetExitCodeProcess(hProcess: HANDLE; var lpExitCode: DWORD): BOOL; stdcall;
-{$EXTERNALSYM GetExitCodeProcess}
-
-procedure FatalExit(ExitCode: Integer); stdcall;
-{$EXTERNALSYM FatalExit}
-
-function GetEnvironmentStringsW: LPWSTR; stdcall;
-{$EXTERNALSYM GetEnvironmentStringsW}
-
-function GetEnvironmentStrings: LPSTR; stdcall;
-{$EXTERNALSYM GetEnvironmentStrings}
-
-{$IFNDEF UNICODE}
-function GetEnvironmentStringsA: LPSTR; stdcall;
-{$EXTERNALSYM GetEnvironmentStringsA}
-{$ENDIF !UNICODE}
-
-function SetEnvironmentStringsA(NewEnvironment: LPSTR): BOOL; stdcall;
-{$EXTERNALSYM SetEnvironmentStringsA}
-
-function SetEnvironmentStringsW(NewEnvironment: LPWSTR): BOOL; stdcall;
-{$EXTERNALSYM SetEnvironmentStringsW}
-function SetEnvironmentStrings(NewEnvironment: LPTSTR): BOOL; stdcall;
-{$EXTERNALSYM SetEnvironmentStrings}
-
-function FreeEnvironmentStringsA(pstr: LPSTR): BOOL; stdcall;
-{$EXTERNALSYM FreeEnvironmentStringsA}
-function FreeEnvironmentStringsW(pstr: LPWSTR): BOOL; stdcall;
-{$EXTERNALSYM FreeEnvironmentStringsW}
-function FreeEnvironmentStrings(pstr: LPTSTR): BOOL; stdcall;
-{$EXTERNALSYM FreeEnvironmentStrings}
-
-procedure RaiseException(dwExceptionCode: DWORD; dwExceptionFlags: DWORD;
- nNumberOfArguments: DWORD; lpArguments: PULONG_PTR); stdcall;
-{$EXTERNALSYM RaiseException}
-
-function UnhandledExceptionFilter(ExceptionInfo: PEXCEPTION_POINTERS): LONG; stdcall;
-{$EXTERNALSYM UnhandledExceptionFilter}
-
-type
- PTOP_LEVEL_EXCEPTION_FILTER = function(ExceptionInfo: PEXCEPTION_POINTERS): LONG; stdcall;
- {$EXTERNALSYM PTOP_LEVEL_EXCEPTION_FILTER}
- LPTOP_LEVEL_EXCEPTION_FILTER = PTOP_LEVEL_EXCEPTION_FILTER;
- {$EXTERNALSYM LPTOP_LEVEL_EXCEPTION_FILTER}
- TTopLevelExceptionFilter = PTOP_LEVEL_EXCEPTION_FILTER;
-
-function SetUnhandledExceptionFilter(lpTopLevelExceptionFilter: LPTOP_LEVEL_EXCEPTION_FILTER): LPTOP_LEVEL_EXCEPTION_FILTER; stdcall;
-{$EXTERNALSYM SetUnhandledExceptionFilter}
-
-//
-// Fiber creation flags
-//
-
-const
- FIBER_FLAG_FLOAT_SWITCH = $1; // context switch floating point
- {$EXTERNALSYM FIBER_FLAG_FLOAT_SWITCH}
-
-function CreateFiber(dwStackSize: DWORD; lpStartAddress: LPFIBER_START_ROUTINE;
- lpParameter: LPVOID): LPVOID; stdcall;
-{$EXTERNALSYM CreateFiber}
-
-function CreateFiberEx(dwStackCommitSize, dwStackReserveSize: SIZE_T; dwFlags: DWORD;
- lpStartAddress: LPFIBER_START_ROUTINE; lpParameter: LPVOID): LPVOID; stdcall;
-{$EXTERNALSYM CreateFiberEx}
-
-procedure DeleteFiber(lpFiber: LPVOID); stdcall;
-{$EXTERNALSYM DeleteFiber}
-
-function ConvertThreadToFiber(lpParameter: LPVOID): LPVOID; stdcall;
-{$EXTERNALSYM ConvertThreadToFiber}
-
-function ConvertThreadToFiberEx(lpParameter: LPVOID; dwFlags: DWORD): LPVOID; stdcall;
-{$EXTERNALSYM ConvertThreadToFiberEx}
-
-function ConvertFiberToThread: BOOL; stdcall;
-{$EXTERNALSYM ConvertFiberToThread}
-
-procedure SwitchToFiber(lpFiber: LPVOID); stdcall;
-{$EXTERNALSYM SwitchToFiber}
-
-function SwitchToThread: BOOL; stdcall;
-{$EXTERNALSYM SwitchToThread}
-
-function CreateThread(lpThreadAttributes: LPSECURITY_ATTRIBUTES;
- dwStackSize: DWORD; lpStartAddress: LPTHREAD_START_ROUTINE; lpParameter: LPVOID;
- dwCreationFlags: DWORD; lpThreadId: LPDWORD): HANDLE; stdcall;
-{$EXTERNALSYM CreateThread}
-
-function CreateRemoteThread(hProcess: HANDLE;
- lpThreadAttributes: LPSECURITY_ATTRIBUTES; dwStackSize: DWORD;
- lpStartAddress: LPTHREAD_START_ROUTINE; lpParameter: LPVOID;
- dwCreationFlags: DWORD; lpThreadId: LPDWORD): HANDLE; stdcall;
-{$EXTERNALSYM CreateRemoteThread}
-
-function GetCurrentThread: HANDLE; stdcall;
-{$EXTERNALSYM GetCurrentThread}
-
-function GetCurrentThreadId: DWORD; stdcall;
-{$EXTERNALSYM GetCurrentThreadId}
-
-function GetProcessIdOfThread(Thread: HANDLE): DWORD; stdcall;
-{$EXTERNALSYM GetProcessIdOfThread}
-
-function GetThreadId(Thread: HANDLE): DWORD; stdcall;
-{$EXTERNALSYM GetThreadId}
-
-function GetProcessId(Process: HANDLE): DWORD; stdcall;
-{$EXTERNALSYM GetProcessId}
-
-function GetCurrentProcessorNumber: DWORD; stdcall;
-{$EXTERNALSYM GetCurrentProcessorNumber}
-
-function SetThreadAffinityMask(hThread: HANDLE;
- dwThreadAffinityMask: DWORD_PTR): DWORD_PTR; stdcall;
-{$EXTERNALSYM SetThreadAffinityMask}
-
-function SetThreadIdealProcessor(hThread: HANDLE; dwIdealProcessor: DWORD): DWORD; stdcall;
-{$EXTERNALSYM SetThreadIdealProcessor}
-
-function SetProcessPriorityBoost(hProcess: HANDLE;
- bDisablePriorityBoost: BOOL): BOOL; stdcall;
-{$EXTERNALSYM SetProcessPriorityBoost}
-
-function GetProcessPriorityBoost(hProcess: HANDLE;
- var pDisablePriorityBoost: BOOL): BOOL; stdcall;
-{$EXTERNALSYM GetProcessPriorityBoost}
-
-function RequestWakeupLatency(latency: LATENCY_TIME): BOOL; stdcall;
-{$EXTERNALSYM RequestWakeupLatency}
-
-function IsSystemResumeAutomatic: BOOL; stdcall;
-{$EXTERNALSYM IsSystemResumeAutomatic}
-
-function OpenThread(dwDesiredAccess: DWORD; bInheritHandle: BOOL;
- dwThreadId: DWORD): HANDLE; stdcall;
-{$EXTERNALSYM OpenThread}
-
-function SetThreadPriority(hThread: HANDLE; nPriority: Integer): BOOL; stdcall;
-{$EXTERNALSYM SetThreadPriority}
-
-function SetThreadPriorityBoost(hThread: HANDLE; bDisablePriorityBoost: BOOL): BOOL; stdcall;
-{$EXTERNALSYM SetThreadPriorityBoost}
-
-function GetThreadPriorityBoost(hThread: HANDLE;
- var pDisablePriorityBoost: BOOL): BOOL; stdcall;
-{$EXTERNALSYM GetThreadPriorityBoost}
-
-function GetThreadPriority(hThread: HANDLE): Integer; stdcall;
-{$EXTERNALSYM GetThreadPriority}
-
-function GetThreadTimes(hThread: HANDLE; var lpCreationTime, lpExitTime,
- lpKernelTime, lpUserTime: FILETIME): BOOL; stdcall;
-{$EXTERNALSYM GetThreadTimes}
-
-function GetThreadIOPendingFlag(hThread: HANDLE; out lpIOIsPending: BOOL): BOOL; stdcall;
-{$EXTERNALSYM GetThreadIOPendingFlag}
-
-procedure ExitThread(dwExitCode: DWORD); stdcall;
-{$EXTERNALSYM ExitThread}
-
-function TerminateThread(hThread: HANDLE; dwExitCode: DWORD): BOOL; stdcall;
-{$EXTERNALSYM TerminateThread}
-
-function GetExitCodeThread(hThread: HANDLE; var lpExitCode: DWORD): BOOL; stdcall;
-{$EXTERNALSYM GetExitCodeThread}
-
-function GetThreadSelectorEntry(hThread: HANDLE; dwSelector: DWORD;
- var lpSelectorEntry: LDT_ENTRY): BOOL; stdcall;
-{$EXTERNALSYM GetThreadSelectorEntry}
-
-function SetThreadExecutionState(esFlags: EXECUTION_STATE): EXECUTION_STATE; stdcall;
-{$EXTERNALSYM SetThreadExecutionState}
-
-function GetLastError: DWORD; stdcall;
-{$EXTERNALSYM GetLastError}
-
-procedure SetLastError(dwErrCode: DWORD); stdcall;
-{$EXTERNALSYM SetLastError}
-
-procedure RestoreLastError(dwErrCode: DWORD); stdcall;
-{$EXTERNALSYM RestoreLastError}
-
-type
- PRESTORE_LAST_ERROR = procedure(dwErrCode: DWORD); stdcall;
- {$EXTERNALSYM PRESTORE_LAST_ERROR}
-
-const
- RESTORE_LAST_ERROR_NAME_A = 'RestoreLastError';
- {$EXTERNALSYM RESTORE_LAST_ERROR_NAME_A}
- RESTORE_LAST_ERROR_NAME_W = WideString('RestoreLastError');
- {$EXTERNALSYM RESTORE_LAST_ERROR_NAME_W}
- RESTORE_LAST_ERROR_NAME = __TEXT('RestoreLastError');
- {$EXTERNALSYM RESTORE_LAST_ERROR_NAME}
-
-function HasOverlappedIoCompleted(const lpOverlapped: OVERLAPPED): BOOL;
-{$EXTERNALSYM HasOverlappedIoCompleted}
-
-function GetOverlappedResult(hFile: HANDLE; const lpOverlapped: OVERLAPPED;
- var lpNumberOfBytesTransferred: DWORD; bWait: BOOL): BOOL; stdcall;
-{$EXTERNALSYM GetOverlappedResult}
-
-function CreateIoCompletionPort(FileHandle: HANDLE; ExistingCompletionPort: HANDLE;
- CompletionKey: ULONG_PTR; NumberOfConcurrentThreads: DWORD): HANDLE; stdcall;
-{$EXTERNALSYM CreateIoCompletionPort}
-
-function GetQueuedCompletionStatus(CompletionPort: HANDLE;
- var lpNumberOfBytesTransferred: DWORD; var lpCompletionKey: ULONG_PTR;
- var lpOverlapped: LPOVERLAPPED; dwMilliseconds: DWORD): BOOL; stdcall;
-{$EXTERNALSYM GetQueuedCompletionStatus}
-
-function PostQueuedCompletionStatus(CompletionPort: HANDLE;
- dwNumberOfBytesTransferred: DWORD; dwCompletionKey: ULONG_PTR;
- lpOverlapped: LPOVERLAPPED): BOOL; stdcall;
-{$EXTERNALSYM PostQueuedCompletionStatus}
-
-const
- SEM_FAILCRITICALERRORS = $0001;
- {$EXTERNALSYM SEM_FAILCRITICALERRORS}
- SEM_NOGPFAULTERRORBOX = $0002;
- {$EXTERNALSYM SEM_NOGPFAULTERRORBOX}
- SEM_NOALIGNMENTFAULTEXCEPT = $0004;
- {$EXTERNALSYM SEM_NOALIGNMENTFAULTEXCEPT}
- SEM_NOOPENFILEERRORBOX = $8000;
- {$EXTERNALSYM SEM_NOOPENFILEERRORBOX}
-
-function SetErrorMode(uMode: UINT): UINT; stdcall;
-{$EXTERNALSYM SetErrorMode}
-
-function ReadProcessMemory(hProcess: HANDLE; lpBaseAddress: LPCVOID;
- lpBuffer: LPVOID; nSize: DWORD; lpNumberOfBytesRead: LPDWORD): BOOL; stdcall;
-{$EXTERNALSYM ReadProcessMemory}
-
-function WriteProcessMemory(hProcess: HANDLE; lpBaseAddress: LPVOID;
- lpBuffer: LPVOID; nSize: DWORD; lpNumberOfBytesWritten: LPDWORD): BOOL; stdcall;
-{$EXTERNALSYM WriteProcessMemory}
-
-function GetThreadContext(hThread: HANDLE; var lpContext: CONTEXT): BOOL; stdcall;
-{$EXTERNALSYM GetThreadContext}
-
-function SetThreadContext(hThread: HANDLE; const lpContext: CONTEXT): BOOL; stdcall;
-{$EXTERNALSYM SetThreadContext}
-
-function SuspendThread(hThread: HANDLE): DWORD; stdcall;
-{$EXTERNALSYM SuspendThread}
-
-function ResumeThread(hThread: HANDLE): DWORD; stdcall;
-{$EXTERNALSYM ResumeThread}
-
-type
- PAPCFUNC = procedure(dwParam: ULONG_PTR); stdcall;
- {$EXTERNALSYM PAPCFUNC}
- TApcFunc = PAPCFUNC;
-
-function QueueUserAPC(pfnAPC: PAPCFUNC; hThread: HANDLE; dwData: ULONG_PTR): DWORD; stdcall;
-{$EXTERNALSYM QueueUserAPC}
-
-function IsDebuggerPresent: BOOL; stdcall;
-{$EXTERNALSYM IsDebuggerPresent}
-
-function CheckRemoteDebuggerPresent(hProcess: HANDLE; out pbDebuggerPresent: BOOL): BOOL; stdcall;
-{$EXTERNALSYM CheckRemoteDebuggerPresent}
-
-procedure DebugBreak; stdcall;
-{$EXTERNALSYM DebugBreak}
-
-function WaitForDebugEvent(var lpDebugEvent: DEBUG_EVENT; dwMilliseconds: DWORD): BOOL; stdcall;
-{$EXTERNALSYM WaitForDebugEvent}
-
-function ContinueDebugEvent(dwProcessId: DWORD; dwThreadId: DWORD;
- dwContinueStatus: DWORD): BOOL; stdcall;
-{$EXTERNALSYM ContinueDebugEvent}
-
-function DebugActiveProcess(dwProcessId: DWORD): BOOL; stdcall;
-{$EXTERNALSYM DebugActiveProcess}
-
-function DebugActiveProcessStop(dwProcessId: DWORD): BOOL; stdcall;
-{$EXTERNALSYM DebugActiveProcessStop}
-
-function DebugSetProcessKillOnExit(KillOnExit: BOOL): BOOL; stdcall;
-{$EXTERNALSYM DebugSetProcessKillOnExit}
-
-function DebugBreakProcess(Process: HANDLE): BOOL; stdcall;
-{$EXTERNALSYM DebugBreakProcess}
-
-procedure InitializeCriticalSection(var lpCriticalSection: CRITICAL_SECTION); stdcall;
-{$EXTERNALSYM InitializeCriticalSection}
-
-procedure EnterCriticalSection(var lpCriticalSection: CRITICAL_SECTION); stdcall;
-{$EXTERNALSYM EnterCriticalSection}
-
-procedure LeaveCriticalSection(var lpCriticalSection: CRITICAL_SECTION); stdcall;
-{$EXTERNALSYM LeaveCriticalSection}
-
-function InitializeCriticalSectionAndSpinCount(var lpCriticalSection: CRITICAL_SECTION;
- dwSpinCount: DWORD): BOOL; stdcall;
-{$EXTERNALSYM InitializeCriticalSectionAndSpinCount}
-
-function SetCriticalSectionSpinCount(var lpCriticalSection: CRITICAL_SECTION;
- dwSpinCount: DWORD): DWORD; stdcall;
-{$EXTERNALSYM SetCriticalSectionSpinCount}
-
-function TryEnterCriticalSection(var lpCriticalSection: CRITICAL_SECTION): BOOL; stdcall;
-{$EXTERNALSYM TryEnterCriticalSection}
-
-procedure DeleteCriticalSection(var lpCriticalSection: CRITICAL_SECTION); stdcall;
-{$EXTERNALSYM DeleteCriticalSection}
-
-function SetEvent(hEvent: HANDLE): BOOL; stdcall;
-{$EXTERNALSYM SetEvent}
-
-function ResetEvent(hEvent: HANDLE): BOOL; stdcall;
-{$EXTERNALSYM ResetEvent}
-
-function PulseEvent(hEvent: HANDLE): BOOL; stdcall;
-{$EXTERNALSYM PulseEvent}
-
-function ReleaseSemaphore(hSemaphore: HANDLE; lReleaseCount: LONG;
- lpPreviousCount: LPLONG): BOOL; stdcall;
-{$EXTERNALSYM ReleaseSemaphore}
-
-function ReleaseMutex(hMutex: HANDLE): BOOL; stdcall;
-{$EXTERNALSYM ReleaseMutex}
-
-function WaitForSingleObject(hHandle: HANDLE; dwMilliseconds: DWORD): DWORD; stdcall;
-{$EXTERNALSYM WaitForSingleObject}
-
-function WaitForMultipleObjects(nCount: DWORD; lpHandles: PHANDLE; bWaitAll: BOOL;
- dwMilliseconds: DWORD): DWORD; stdcall;
-{$EXTERNALSYM WaitForMultipleObjects}
-
-procedure Sleep(dwMilliseconds: DWORD); stdcall;
-{$EXTERNALSYM Sleep}
-
-function LoadResource(hModule: HMODULE; hResInfo: HRSRC): HGLOBAL; stdcall;
-{$EXTERNALSYM LoadResource}
-
-function SizeofResource(hModule: HMODULE; hResInfo: HRSRC): DWORD; stdcall;
-{$EXTERNALSYM SizeofResource}
-
-function GlobalDeleteAtom(nAtom: ATOM): ATOM; stdcall;
-{$EXTERNALSYM GlobalDeleteAtom}
-
-function InitAtomTable(nSize: DWORD): BOOL; stdcall;
-{$EXTERNALSYM InitAtomTable}
-
-function DeleteAtom(nAtom: ATOM): ATOM; stdcall;
-{$EXTERNALSYM DeleteAtom}
-
-function SetHandleCount(uNumber: UINT): UINT; stdcall;
-{$EXTERNALSYM SetHandleCount}
-
-function GetLogicalDrives: DWORD; stdcall;
-{$EXTERNALSYM GetLogicalDrives}
-
-function LockFile(hFile: HANDLE; dwFileOffsetLow: DWORD; dwFileOffsetHigh: DWORD;
- nNumberOfBytesToLockLow: DWORD; nNumberOfBytesToLockHigh: DWORD): BOOL; stdcall;
-{$EXTERNALSYM LockFile}
-
-function UnlockFile(hFile: HANDLE; dwFileOffsetLow: DWORD; dwFileOffsetHigh: DWORD;
- nNumberOfBytesToUnlockLow: DWORD; nNumberOfBytesToUnlockHigh: DWORD): BOOL; stdcall;
-{$EXTERNALSYM UnlockFile}
-
-function LockFileEx(hFile: HANDLE; dwFlags: DWORD; dwReserved: DWORD;
- nNumberOfBytesToLockLow: DWORD; nNumberOfBytesToLockHigh: DWORD;
- const lpOverlapped: OVERLAPPED): BOOL; stdcall;
-{$EXTERNALSYM LockFileEx}
-
-const
- LOCKFILE_FAIL_IMMEDIATELY = $00000001;
- {$EXTERNALSYM LOCKFILE_FAIL_IMMEDIATELY}
- LOCKFILE_EXCLUSIVE_LOCK = $00000002;
- {$EXTERNALSYM LOCKFILE_EXCLUSIVE_LOCK}
-
-function UnlockFileEx(hFile: HANDLE; dwReserved: DWORD;
- nNumberOfBytesToUnlockLow: DWORD; nNumberOfBytesToUnlockHigh: DWORD;
- const lpOverlapped: OVERLAPPED): BOOL; stdcall;
-{$EXTERNALSYM UnlockFileEx}
-
-type
- PBY_HANDLE_FILE_INFORMATION = ^BY_HANDLE_FILE_INFORMATION;
- {$EXTERNALSYM PBY_HANDLE_FILE_INFORMATION}
- _BY_HANDLE_FILE_INFORMATION = record
- dwFileAttributes: DWORD;
- ftCreationTime: FILETIME;
- ftLastAccessTime: FILETIME;
- ftLastWriteTime: FILETIME;
- dwVolumeSerialNumber: DWORD;
- nFileSizeHigh: DWORD;
- nFileSizeLow: DWORD;
- nNumberOfLinks: DWORD;
- nFileIndexHigh: DWORD;
- nFileIndexLow: DWORD;
- end;
- {$EXTERNALSYM _BY_HANDLE_FILE_INFORMATION}
- BY_HANDLE_FILE_INFORMATION = _BY_HANDLE_FILE_INFORMATION;
- {$EXTERNALSYM BY_HANDLE_FILE_INFORMATION}
- LPBY_HANDLE_FILE_INFORMATION = ^BY_HANDLE_FILE_INFORMATION;
- {$EXTERNALSYM LPBY_HANDLE_FILE_INFORMATION}
- TByHandleFileInformation = BY_HANDLE_FILE_INFORMATION;
- PByHandleFileInformation = PBY_HANDLE_FILE_INFORMATION;
-
-function GetFileInformationByHandle(hFile: HANDLE;
- var lpFileInformation: BY_HANDLE_FILE_INFORMATION): BOOL; stdcall;
-{$EXTERNALSYM GetFileInformationByHandle}
-
-function GetFileType(hFile: HANDLE): DWORD; stdcall;
-{$EXTERNALSYM GetFileType}
-
-function GetFileSize(hFile: HANDLE; lpFileSizeHigh: LPDWORD): DWORD; stdcall;
-{$EXTERNALSYM GetFileSize}
-
-function GetFileSizeEx(hFile: HANDLE; var lpFileSize: LARGE_INTEGER): BOOL; stdcall;
-{$EXTERNALSYM GetFileSizeEx}
-
-function GetStdHandle(nStdHandle: DWORD): HANDLE; stdcall;
-{$EXTERNALSYM GetStdHandle}
-
-function SetStdHandle(nStdHandle: DWORD; hHandle: HANDLE): BOOL; stdcall;
-{$EXTERNALSYM SetStdHandle}
-
-function WriteFile(hFile: HANDLE; lpBuffer: LPCVOID; nNumberOfBytesToWrite: DWORD;
- lpNumberOfBytesWritten: LPDWORD; lpOverlapped: LPOVERLAPPED): BOOL; stdcall;
-{$EXTERNALSYM WriteFile}
-
-function ReadFile(hFile: HANDLE; lpBuffer: LPVOID; nNumberOfBytesToRead: DWORD;
- lpNumberOfBytesRead: LPDWORD; lpOverlapped: LPOVERLAPPED): BOOL; stdcall;
-{$EXTERNALSYM ReadFile}
-
-function FlushFileBuffers(hFile: HANDLE): BOOL; stdcall;
-{$EXTERNALSYM FlushFileBuffers}
-
-function DeviceIoControl(hDevice: HANDLE; dwIoControlCode: DWORD;
- lpInBuffer: LPVOID; nInBufferSize: DWORD; lpOutBuffer: LPVOID;
- nOutBufferSize: DWORD; lpBytesReturned: LPDWORD;
- lpOverlapped: LPOVERLAPPED): BOOL; stdcall;
-{$EXTERNALSYM DeviceIoControl}
-
-function RequestDeviceWakeup(hDevice: HANDLE): BOOL; stdcall;
-{$EXTERNALSYM RequestDeviceWakeup}
-
-function CancelDeviceWakeupRequest(hDevice: HANDLE): BOOL; stdcall;
-{$EXTERNALSYM CancelDeviceWakeupRequest}
-
-function GetDevicePowerState(hDevice: HANDLE; var pfOn: BOOL): BOOL; stdcall;
-{$EXTERNALSYM GetDevicePowerState}
-
-function SetMessageWaitingIndicator(hMsgIndicator: HANDLE; ulMsgCount: ULONG): BOOL; stdcall;
-{$EXTERNALSYM SetMessageWaitingIndicator}
-
-function SetEndOfFile(hFile: HANDLE): BOOL; stdcall;
-{$EXTERNALSYM SetEndOfFile}
-
-function SetFilePointer(hFile: HANDLE; lDistanceToMove: LONG;
- lpDistanceToMoveHigh: PLONG; dwMoveMethod: DWORD): DWORD; stdcall;
-{$EXTERNALSYM SetFilePointer}
-
-function SetFilePointerEx(hFile: HANDLE; liDistanceToMove: LARGE_INTEGER;
- lpNewFilePointer: PLARGE_INTEGER; dwMoveMethod: DWORD): BOOL; stdcall;
-{$EXTERNALSYM SetFilePointerEx}
-
-function FindClose(hFindFile: HANDLE): BOOL; stdcall;
-{$EXTERNALSYM FindClose}
-
-function GetFileTime(hFile: HANDLE; lpCreationTime, lpLastAccessTime,
- lpLastWriteTime: PFILETIME): BOOL; stdcall;
-{$EXTERNALSYM GetFileTime}
-
-function SetFileTime(hFile: HANDLE; lpCreationTime, lpLastAccessTime,
- lpLastWriteTime: PFILETIME): BOOL; stdcall;
-{$EXTERNALSYM SetFileTime}
-
-function SetFileValidData(hFile: HANDLE; ValidDataLength: LONGLONG): BOOL; stdcall;
-{$EXTERNALSYM SetFileValidData}
-
-function SetFileShortNameA(hFile: HANDLE; lpShortName: LPCSTR): BOOL; stdcall;
-{$EXTERNALSYM SetFileShortNameA}
-function SetFileShortNameW(hFile: HANDLE; lpShortName: LPCWSTR): BOOL; stdcall;
-{$EXTERNALSYM SetFileShortNameW}
-function SetFileShortName(hFile: HANDLE; lpShortName: LPCTSTR): BOOL; stdcall;
-{$EXTERNALSYM SetFileShortName}
-
-function CloseHandle(hObject: HANDLE): BOOL; stdcall;
-{$EXTERNALSYM CloseHandle}
-
-function DuplicateHandle(hSourceProcessHandle: HANDLE; hSourceHandle: HANDLE;
- hTargetProcessHandle: HANDLE; lpTargetHandle: LPHANDLE;
- dwDesiredAccess: DWORD; bInheritHandle: BOOL; dwOptions: DWORD): BOOL; stdcall;
-{$EXTERNALSYM DuplicateHandle}
-
-function GetHandleInformation(hObject: HANDLE; var lpdwFlags: DWORD): BOOL; stdcall;
-{$EXTERNALSYM GetHandleInformation}
-
-function SetHandleInformation(hObject: HANDLE; dwMask: DWORD; dwFlags: DWORD): BOOL; stdcall;
-{$EXTERNALSYM SetHandleInformation}
-
-const
- HANDLE_FLAG_INHERIT = $00000001;
- {$EXTERNALSYM HANDLE_FLAG_INHERIT}
- HANDLE_FLAG_PROTECT_FROM_CLOSE = $00000002;
- {$EXTERNALSYM HANDLE_FLAG_PROTECT_FROM_CLOSE}
-
- HINSTANCE_ERROR = 32;
- {$EXTERNALSYM HINSTANCE_ERROR}
-
-function LoadModule(lpModuleName: LPCSTR; lpParameterBlock: LPVOID): DWORD; stdcall;
-{$EXTERNALSYM LoadModule}
-
-function WinExec(lpCmdLine: LPCSTR; uCmdShow: UINT): UINT; stdcall;
-{$EXTERNALSYM WinExec}
-
-function ClearCommBreak(hFile: HANDLE): BOOL; stdcall;
-{$EXTERNALSYM ClearCommBreak}
-
-function ClearCommError(hFile: HANDLE; var lpErrors: DWORD;
- lpStat: LPCOMSTAT): BOOL; stdcall;
-{$EXTERNALSYM ClearCommError}
-
-function SetupComm(hFile: HANDLE; dwInQueue: DWORD; dwOutQueue: DWORD): BOOL; stdcall;
-{$EXTERNALSYM SetupComm}
-
-function EscapeCommFunction(hFile: HANDLE; dwFunc: DWORD): BOOL; stdcall;
-{$EXTERNALSYM EscapeCommFunction}
-
-function GetCommConfig(hCommDev: HANDLE; var lpCC: COMMCONFIG;
- var lpdwSize: DWORD): BOOL; stdcall;
-{$EXTERNALSYM GetCommConfig}
-
-function GetCommMask(hFile: HANDLE; var lpEvtMask: DWORD): BOOL; stdcall;
-{$EXTERNALSYM GetCommMask}
-
-function GetCommProperties(hFile: HANDLE; var lpCommProp: COMMPROP): BOOL; stdcall;
-{$EXTERNALSYM GetCommProperties}
-
-function GetCommModemStatus(hFile: HANDLE; var lpModemStat: DWORD): BOOL; stdcall;
-{$EXTERNALSYM GetCommModemStatus}
-
-function GetCommState(hFile: HANDLE; var lpDCB: DCB): BOOL; stdcall;
-{$EXTERNALSYM GetCommState}
-
-function GetCommTimeouts(hFile: HANDLE; var lpCommTimeouts: COMMTIMEOUTS): BOOL; stdcall;
-{$EXTERNALSYM GetCommTimeouts}
-
-function PurgeComm(hFile: HANDLE; dwFlags: DWORD): BOOL; stdcall;
-{$EXTERNALSYM PurgeComm}
-
-function SetCommBreak(hFile: HANDLE): BOOL; stdcall;
-{$EXTERNALSYM SetCommBreak}
-
-function SetCommConfig(hCommDev: HANDLE; const lpCC: COMMCONFIG; dwSize: DWORD): BOOL; stdcall;
-{$EXTERNALSYM SetCommConfig}
-
-function SetCommMask(hFile: HANDLE; dwEvtMask: DWORD): BOOL; stdcall;
-{$EXTERNALSYM SetCommMask}
-
-function SetCommState(hFile: HANDLE; const lpDCB: DCB): BOOL; stdcall;
-{$EXTERNALSYM SetCommState}
-
-function SetCommTimeouts(hFile: HANDLE; const lpCommTimeouts: COMMTIMEOUTS): BOOL; stdcall;
-{$EXTERNALSYM SetCommTimeouts}
-
-function TransmitCommChar(hFile: HANDLE; cChar: Char): BOOL; stdcall;
-{$EXTERNALSYM TransmitCommChar}
-
-function WaitCommEvent(hFile: HANDLE; var lpEvtMask: DWORD;
- lpOverlapped: LPOVERLAPPED): BOOL; stdcall;
-{$EXTERNALSYM WaitCommEvent}
-
-function SetTapePosition(hDevice: HANDLE; dwPositionMethod, dwPartition,
- dwOffsetLow, dwOffsetHigh: DWORD; bImmediate: BOOL): DWORD; stdcall;
-{$EXTERNALSYM SetTapePosition}
-
-function GetTapePosition(hDevice: HANDLE; dwPositionType: DWORD;
- var lpdwPartition, lpdwOffsetLow: LPDWORD; lpdwOffsetHigh: LPDWORD): DWORD; stdcall;
-{$EXTERNALSYM GetTapePosition}
-
-function PrepareTape(hDevice: HANDLE; dwOperation: DWORD; bImmediate: BOOL): DWORD; stdcall;
-{$EXTERNALSYM PrepareTape}
-
-function EraseTape(hDevice: HANDLE; dwEraseType: DWORD; bImmediate: BOOL): DWORD; stdcall;
-{$EXTERNALSYM EraseTape}
-
-function CreateTapePartition(hDevice: HANDLE; dwPartitionMethod: DWORD;
- dwCount: DWORD; dwSize: DWORD): DWORD; stdcall;
-{$EXTERNALSYM CreateTapePartition}
-
-function WriteTapemark(hDevice: HANDLE; dwTapemarkType: DWORD;
- dwTapemarkCount: DWORD; bImmediate: BOOL): DWORD; stdcall;
-{$EXTERNALSYM WriteTapemark}
-
-function GetTapeStatus(hDevice: HANDLE): DWORD; stdcall;
-{$EXTERNALSYM GetTapeStatus}
-
-function GetTapeParameters(hDevice: HANDLE; dwOperation: DWORD;
- var lpdwSize: DWORD; lpTapeInformation: LPVOID): DWORD; stdcall;
-{$EXTERNALSYM GetTapeParameters}
-
-const
- GET_TAPE_MEDIA_INFORMATION = 0;
- {$EXTERNALSYM GET_TAPE_MEDIA_INFORMATION}
- GET_TAPE_DRIVE_INFORMATION = 1;
- {$EXTERNALSYM GET_TAPE_DRIVE_INFORMATION}
-
-function SetTapeParameters(hDevice: HANDLE; dwOperation: DWORD; lpTapeInformation: LPVOID): DWORD; stdcall;
-{$EXTERNALSYM SetTapeParameters}
-
-const
- SET_TAPE_MEDIA_INFORMATION = 0;
- {$EXTERNALSYM SET_TAPE_MEDIA_INFORMATION}
- SET_TAPE_DRIVE_INFORMATION = 1;
- {$EXTERNALSYM SET_TAPE_DRIVE_INFORMATION}
-
-function Beep(dwFreq: DWORD; dwDuration: DWORD): BOOL; stdcall;
-{$EXTERNALSYM Beep}
-
-function MulDiv(nNumber, nNumerator, nDenominator: Integer): Integer; stdcall;
-{$EXTERNALSYM MulDiv}
-
-procedure GetSystemTime(var lpSystemTime: SYSTEMTIME); stdcall;
-{$EXTERNALSYM GetSystemTime}
-
-procedure GetSystemTimeAsFileTime(var lpSystemTimeAsFileTime: FILETIME); stdcall;
-{$EXTERNALSYM GetSystemTimeAsFileTime}
-
-function SetSystemTime(var lpSystemTime: SYSTEMTIME): BOOL; stdcall;
-{$EXTERNALSYM SetSystemTime}
-
-procedure GetLocalTime(var lpSystemTime: SYSTEMTIME); stdcall;
-{$EXTERNALSYM GetLocalTime}
-
-function SetLocalTime(var lpSystemTime: SYSTEMTIME): BOOL; stdcall;
-{$EXTERNALSYM SetLocalTime}
-
-procedure GetSystemInfo(var lpSystemInfo: SYSTEM_INFO); stdcall;
-{$EXTERNALSYM GetSystemInfo}
-
-function GetSystemRegistryQuota(out pdwQuotaAllowed, pdwQuotaUsed: DWORD): BOOL; stdcall;
-{$EXTERNALSYM GetSystemRegistryQuota}
-
-function GetSystemTimes(lpIdleTime, lpKernelTime, lpUserTime: LPFILETIME): BOOL; stdcall;
-{$EXTERNALSYM GetSystemTimes}
-
-procedure GetNativeSystemInfo(lpSystemInfo: LPSYSTEM_INFO); stdcall;
-{$EXTERNALSYM GetNativeSystemInfo}
-
-function IsProcessorFeaturePresent(ProcessorFeature: DWORD): BOOL; stdcall;
-{$EXTERNALSYM IsProcessorFeaturePresent}
-
-type
- PTIME_ZONE_INFORMATION = ^TIME_ZONE_INFORMATION;
- {$EXTERNALSYM PTIME_ZONE_INFORMATION}
- _TIME_ZONE_INFORMATION = record
- Bias: LONG;
- StandardName: array [0..31] of WCHAR;
- StandardDate: SYSTEMTIME;
- StandardBias: LONG;
- DaylightName: array [0..31] of WCHAR;
- DaylightDate: SYSTEMTIME;
- DaylightBias: LONG;
- end;
- {$EXTERNALSYM _TIME_ZONE_INFORMATION}
- TIME_ZONE_INFORMATION = _TIME_ZONE_INFORMATION;
- {$EXTERNALSYM TIME_ZONE_INFORMATION}
- LPTIME_ZONE_INFORMATION = ^TIME_ZONE_INFORMATION;
- {$EXTERNALSYM LPTIME_ZONE_INFORMATION}
- TTimeZoneInformation = TIME_ZONE_INFORMATION;
- PTimeZoneInformation = PTIME_ZONE_INFORMATION;
-
-function SystemTimeToTzSpecificLocalTime(lpTimeZoneInformation: LPTIME_ZONE_INFORMATION;
- var lpUniversalTime, lpLocalTime: SYSTEMTIME): BOOL; stdcall;
-{$EXTERNALSYM SystemTimeToTzSpecificLocalTime}
-
-function TzSpecificLocalTimeToSystemTime(const lpTimeZoneInformation: TIME_ZONE_INFORMATION;
- const lpLocalTime: SYSTEMTIME; var lpUniversalTime: SYSTEMTIME): BOOL; stdcall;
-{$EXTERNALSYM TzSpecificLocalTimeToSystemTime}
-
-function GetTimeZoneInformation(var lpTimeZoneInformation: TIME_ZONE_INFORMATION): DWORD; stdcall;
-{$EXTERNALSYM GetTimeZoneInformation}
-
-function SetTimeZoneInformation(const lpTimeZoneInformation: TIME_ZONE_INFORMATION): BOOL; stdcall;
-{$EXTERNALSYM SetTimeZoneInformation}
-
-//
-// Routines to convert back and forth between system time and file time
-//
-
-function SystemTimeToFileTime(const lpSystemTime: SYSTEMTIME; var lpFileTime: FILETIME): BOOL; stdcall;
-{$EXTERNALSYM SystemTimeToFileTime}
-
-function FileTimeToLocalFileTime(const lpFileTime: FILETIME; var lpLocalFileTime: FILETIME): BOOL; stdcall;
-{$EXTERNALSYM FileTimeToLocalFileTime}
-
-function LocalFileTimeToFileTime(const lpLocalFileTime: FILETIME; var lpFileTime: FILETIME): BOOL; stdcall;
-{$EXTERNALSYM LocalFileTimeToFileTime}
-
-function FileTimeToSystemTime(const lpFileTime: FILETIME; var lpSystemTime: SYSTEMTIME): BOOL; stdcall;
-{$EXTERNALSYM FileTimeToSystemTime}
-
-function CompareFileTime(const lpFileTime1, lpFileTime2: FILETIME): LONG; stdcall;
-{$EXTERNALSYM CompareFileTime}
-
-function FileTimeToDosDateTime(const lpFileTime: FILETIME; var lpFatDate,
- lpFatTime: WORD): BOOL; stdcall;
-{$EXTERNALSYM FileTimeToDosDateTime}
-
-function DosDateTimeToFileTime(wFatDate, wFatTime: WORD; var lpFileTime: FILETIME): BOOL; stdcall;
-{$EXTERNALSYM DosDateTimeToFileTime}
-
-function GetTickCount: DWORD; stdcall;
-{$EXTERNALSYM GetTickCount}
-
-function SetSystemTimeAdjustment(dwTimeAdjustment: DWORD;
- bTimeAdjustmentDisabled: BOOL): BOOL; stdcall;
-{$EXTERNALSYM SetSystemTimeAdjustment}
-
-function GetSystemTimeAdjustment(var lpTimeAdjustment, lpTimeIncrement: DWORD;
- var lpTimeAdjustmentDisabled: BOOL): BOOL; stdcall;
-{$EXTERNALSYM GetSystemTimeAdjustment}
-
-function FormatMessageA(dwFlags: DWORD; lpSource: LPCVOID; dwMessageId: DWORD;
- dwLanguageId: DWORD; lpBuffer: LPSTR; nSize: DWORD; Arguments: Pointer): DWORD; stdcall;
-{$EXTERNALSYM FormatMessageA}
-function FormatMessageW(dwFlags: DWORD; lpSource: LPCVOID; dwMessageId: DWORD;
- dwLanguageId: DWORD; lpBuffer: LPWSTR; nSize: DWORD; Arguments: Pointer): DWORD; stdcall;
-{$EXTERNALSYM FormatMessageW}
-function FormatMessage(dwFlags: DWORD; lpSource: LPCVOID; dwMessageId: DWORD;
- dwLanguageId: DWORD; lpBuffer: LPTSTR; nSize: DWORD; Arguments: Pointer): DWORD; stdcall;
-{$EXTERNALSYM FormatMessage}
-
-const
- FORMAT_MESSAGE_ALLOCATE_BUFFER = $00000100;
- {$EXTERNALSYM FORMAT_MESSAGE_ALLOCATE_BUFFER}
- FORMAT_MESSAGE_IGNORE_INSERTS = $00000200;
- {$EXTERNALSYM FORMAT_MESSAGE_IGNORE_INSERTS}
- FORMAT_MESSAGE_FROM_STRING = $00000400;
- {$EXTERNALSYM FORMAT_MESSAGE_FROM_STRING}
- FORMAT_MESSAGE_FROM_HMODULE = $00000800;
- {$EXTERNALSYM FORMAT_MESSAGE_FROM_HMODULE}
- FORMAT_MESSAGE_FROM_SYSTEM = $00001000;
- {$EXTERNALSYM FORMAT_MESSAGE_FROM_SYSTEM}
- FORMAT_MESSAGE_ARGUMENT_ARRAY = $00002000;
- {$EXTERNALSYM FORMAT_MESSAGE_ARGUMENT_ARRAY}
- FORMAT_MESSAGE_MAX_WIDTH_MASK = $000000FF;
- {$EXTERNALSYM FORMAT_MESSAGE_MAX_WIDTH_MASK}
-
-function CreatePipe(var hReadPipe, hWritePipe: HANDLE;
- lpPipeAttributes: LPSECURITY_ATTRIBUTES; nSize: DWORD): BOOL; stdcall;
-{$EXTERNALSYM CreatePipe}
-
-function ConnectNamedPipe(hNamedPipe: HANDLE; lpOverlapped: LPOVERLAPPED): BOOL; stdcall;
-{$EXTERNALSYM ConnectNamedPipe}
-
-function DisconnectNamedPipe(hNamedPipe: HANDLE): BOOL; stdcall;
-{$EXTERNALSYM DisconnectNamedPipe}
-
-function SetNamedPipeHandleState(hNamedPipe: HANDLE; var lpMode: DWORD;
- lpMaxCollectionCount: LPDWORD; lpCollectDataTimeout: LPDWORD): BOOL; stdcall;
-{$EXTERNALSYM SetNamedPipeHandleState}
-
-function GetNamedPipeInfo(hNamedPipe: HANDLE; lpFlags, lpOutBufferSize,
- lpInBufferSize, lpMaxInstances: LPDWORD): BOOL; stdcall;
-{$EXTERNALSYM GetNamedPipeInfo}
-
-function PeekNamedPipe(hNamedPipe: HANDLE; lpBuffer: LPVOID; nBufferSize: DWORD;
- lpBytesRead, lpTotalBytesAvail, lpBytesLeftThisMessage: LPDWORD): BOOL; stdcall;
-{$EXTERNALSYM PeekNamedPipe}
-
-function TransactNamedPipe(hNamedPipe: HANDLE; lpInBuffer: LPVOID;
- nInBufferSize: DWORD; lpOutBuffer: LPVOID; nOutBufferSize: DWORD;
- lpBytesRead: LPDWORD; lpOverlapped: LPOVERLAPPED): BOOL; stdcall;
-{$EXTERNALSYM TransactNamedPipe}
-
-function CreateMailslotA(lpName: LPCSTR; nMaxMessageSize, lReadTimeout: DWORD;
- lpSecurityAttributes: LPSECURITY_ATTRIBUTES): HANDLE; stdcall;
-{$EXTERNALSYM CreateMailslotA}
-function CreateMailslotW(lpName: LPCWSTR; nMaxMessageSize, lReadTimeout: DWORD;
- lpSecurityAttributes: LPSECURITY_ATTRIBUTES): HANDLE; stdcall;
-{$EXTERNALSYM CreateMailslotW}
-function CreateMailslot(lpName: LPCTSTR; nMaxMessageSize, lReadTimeout: DWORD;
- lpSecurityAttributes: LPSECURITY_ATTRIBUTES): HANDLE; stdcall;
-{$EXTERNALSYM CreateMailslot}
-
-function GetMailslotInfo(hMailslot: HANDLE; lpMaxMessageSize, lpNextSize,
- lpMessageCount, lpReadTimeout: LPDWORD): BOOL; stdcall;
-{$EXTERNALSYM GetMailslotInfo}
-
-function SetMailslotInfo(hMailslot: HANDLE; lReadTimeout: DWORD): BOOL; stdcall;
-{$EXTERNALSYM SetMailslotInfo}
-
-function MapViewOfFile(hFileMappingObject: HANDLE; dwDesiredAccess: DWORD;
- dwFileOffsetHigh, dwFileOffsetLow: DWORD; dwNumberOfBytesToMap: SIZE_T): LPVOID; stdcall;
-{$EXTERNALSYM MapViewOfFile}
-
-function FlushViewOfFile(lpBaseAddress: LPCVOID; dwNumberOfBytesToFlush: SIZE_T): BOOL; stdcall;
-{$EXTERNALSYM FlushViewOfFile}
-
-function UnmapViewOfFile(lpBaseAddress: LPCVOID): BOOL; stdcall;
-{$EXTERNALSYM UnmapViewOfFile}
-
-//
-// File Encryption API
-//
-
-function EncryptFileA(lpFileName: LPCSTR): BOOL; stdcall;
-{$EXTERNALSYM EncryptFileA}
-function EncryptFileW(lpFileName: LPCWSTR): BOOL; stdcall;
-{$EXTERNALSYM EncryptFileW}
-function EncryptFile(lpFileName: LPCTSTR): BOOL; stdcall;
-{$EXTERNALSYM EncryptFile}
-
-function DecryptFileA(lpFileName: LPCSTR; dwReserved: DWORD): BOOL; stdcall;
-{$EXTERNALSYM DecryptFileA}
-function DecryptFileW(lpFileName: LPCWSTR; dwReserved: DWORD): BOOL; stdcall;
-{$EXTERNALSYM DecryptFileW}
-function DecryptFile(lpFileName: LPCTSTR; dwReserved: DWORD): BOOL; stdcall;
-{$EXTERNALSYM DecryptFile}
-
-//
-// Encryption Status Value
-//
-
-const
- FILE_ENCRYPTABLE = 0;
- {$EXTERNALSYM FILE_ENCRYPTABLE}
- FILE_IS_ENCRYPTED = 1;
- {$EXTERNALSYM FILE_IS_ENCRYPTED}
- FILE_SYSTEM_ATTR = 2;
- {$EXTERNALSYM FILE_SYSTEM_ATTR}
- FILE_ROOT_DIR = 3;
- {$EXTERNALSYM FILE_ROOT_DIR}
- FILE_SYSTEM_DIR = 4;
- {$EXTERNALSYM FILE_SYSTEM_DIR}
- FILE_UNKNOWN = 5;
- {$EXTERNALSYM FILE_UNKNOWN}
- FILE_SYSTEM_NOT_SUPPORT = 6;
- {$EXTERNALSYM FILE_SYSTEM_NOT_SUPPORT}
- FILE_USER_DISALLOWED = 7;
- {$EXTERNALSYM FILE_USER_DISALLOWED}
- FILE_READ_ONLY = 8;
- {$EXTERNALSYM FILE_READ_ONLY}
- FILE_DIR_DISALLOWED = 9;
- {$EXTERNALSYM FILE_DIR_DISALLOWED}
-
-function FileEncryptionStatusA(lpFileName: LPCSTR; var lpStatus: DWORD): BOOL; stdcall;
-{$EXTERNALSYM FileEncryptionStatusA}
-function FileEncryptionStatusW(lpFileName: LPCWSTR; var lpStatus: DWORD): BOOL; stdcall;
-{$EXTERNALSYM FileEncryptionStatusW}
-function FileEncryptionStatus(lpFileName: LPCTSTR; var lpStatus: DWORD): BOOL; stdcall;
-{$EXTERNALSYM FileEncryptionStatus}
-
-//
-// Currently defined recovery flags
-//
-
-const
- EFS_USE_RECOVERY_KEYS = $1;
- {$EXTERNALSYM EFS_USE_RECOVERY_KEYS}
-
-type
- PFE_EXPORT_FUNC = function(pbData: PBYTE; pvCallbackContext: PVOID;
- ulLength: ULONG): DWORD; stdcall;
- {$EXTERNALSYM PFE_EXPORT_FUNC}
-
- PFE_IMPORT_FUNC = function(pbData: PBYTE; pvCallbackContext: PVOID;
- ulLength: PULONG): DWORD; stdcall;
- {$EXTERNALSYM PFE_IMPORT_FUNC}
-
-//
-// OpenRaw flag values
-//
-
-const
- CREATE_FOR_IMPORT = 1;
- {$EXTERNALSYM CREATE_FOR_IMPORT}
- CREATE_FOR_DIR = 2;
- {$EXTERNALSYM CREATE_FOR_DIR}
- OVERWRITE_HIDDEN = 4;
- {$EXTERNALSYM OVERWRITE_HIDDEN}
-
-function OpenEncryptedFileRawA(lpFileName: LPCSTR; ulFlags: ULONG;
- pvContext: PVOID): DWORD; stdcall;
-{$EXTERNALSYM OpenEncryptedFileRawA}
-function OpenEncryptedFileRawW(lpFileName: LPCWSTR; ulFlags: ULONG;
- pvContext: PVOID): DWORD; stdcall;
-{$EXTERNALSYM OpenEncryptedFileRawW}
-function OpenEncryptedFileRaw(lpFileName: LPCTSTR; ulFlags: ULONG;
- pvContext: PVOID): DWORD; stdcall;
-{$EXTERNALSYM OpenEncryptedFileRaw}
-
-function ReadEncryptedFileRaw(pfExportCallback: PFE_EXPORT_FUNC;
- pvCallbackContext: PVOID; pvContext: PVOID): DWORD; stdcall;
-{$EXTERNALSYM ReadEncryptedFileRaw}
-
-function WriteEncryptedFileRaw(pfImportCallback: PFE_IMPORT_FUNC;
- pvCallbackContext: PVOID; pvContext: PVOID): DWORD; stdcall;
-{$EXTERNALSYM WriteEncryptedFileRaw}
-
-procedure CloseEncryptedFileRaw(pvContext: PVOID); stdcall;
-{$EXTERNALSYM CloseEncryptedFileRaw}
-
-//
-// _l Compat Functions
-//
-
-function lstrcmpA(lpString1, lpString2: LPCSTR): Integer; stdcall;
-{$EXTERNALSYM lstrcmpA}
-function lstrcmpW(lpString1, lpString2: LPCWSTR): Integer; stdcall;
-{$EXTERNALSYM lstrcmpW}
-function lstrcmp(lpString1, lpString2: LPCTSTR): Integer; stdcall;
-{$EXTERNALSYM lstrcmp}
-
-function lstrcmpiA(lpString1, lpString2: LPCSTR): Integer; stdcall;
-{$EXTERNALSYM lstrcmpiA}
-function lstrcmpiW(lpString1, lpString2: LPCWSTR): Integer; stdcall;
-{$EXTERNALSYM lstrcmpiW}
-function lstrcmpi(lpString1, lpString2: LPCTSTR): Integer; stdcall;
-{$EXTERNALSYM lstrcmpi}
-
-function lstrcpynA(lpString1: LPSTR; lpString2: LPCSTR; iMaxLength: Integer): LPSTR; stdcall;
-{$EXTERNALSYM lstrcpynA}
-function lstrcpynW(lpString1: LPWSTR; lpString2: LPCWSTR; iMaxLength: Integer): LPWSTR; stdcall;
-{$EXTERNALSYM lstrcpynW}
-function lstrcpyn(lpString1: LPTSTR; lpString2: LPCTSTR; iMaxLength: Integer): LPTSTR; stdcall;
-{$EXTERNALSYM lstrcpyn}
-
-function lstrcpyA(lpString1: LPSTR; lpString2: LPCSTR): LPSTR; stdcall;
-{$EXTERNALSYM lstrcpyA}
-function lstrcpyW(lpString1: LPWSTR; lpString2: LPCWSTR): LPWSTR; stdcall;
-{$EXTERNALSYM lstrcpyW}
-function lstrcpy(lpString1: LPTSTR; lpString2: LPCTSTR): LPTSTR; stdcall;
-{$EXTERNALSYM lstrcpy}
-
-function lstrcatA(lpString1: LPSTR; lpString2: LPCSTR): LPSTR; stdcall;
-{$EXTERNALSYM lstrcatA}
-function lstrcatW(lpString1: LPWSTR; lpString2: LPCWSTR): LPWSTR; stdcall;
-{$EXTERNALSYM lstrcatW}
-function lstrcat(lpString1: LPTSTR; lpString2: LPCTSTR): LPTSTR; stdcall;
-{$EXTERNALSYM lstrcat}
-
-function lstrlenA(lpString: LPCSTR): Integer; stdcall;
-{$EXTERNALSYM lstrlenA}
-function lstrlenW(lpString: LPCWSTR): Integer; stdcall;
-{$EXTERNALSYM lstrlenW}
-function lstrlen(lpString: LPCTSTR): Integer; stdcall;
-{$EXTERNALSYM lstrlen}
-
-function OpenFile(lpFileName: LPCSTR; var lpReOpenBuff: OFSTRUCT; uStyle: UINT): HFILE; stdcall;
-{$EXTERNALSYM OpenFile}
-
-function _lopen(lpPathName: LPCSTR; iReadWrite: Integer): HFILE; stdcall;
-{$EXTERNALSYM _lopen}
-
-function _lcreat(lpPathName: LPCSTR; iAttribute: Integer): HFILE; stdcall;
-{$EXTERNALSYM _lcreat}
-
-function _lread(hFile: HFILE; lpBuffer: LPVOID; uBytes: UINT): UINT; stdcall;
-{$EXTERNALSYM _lread}
-
-function _lwrite(hFile: HFILE; lpBuffer: LPCSTR; uBytes: UINT): UINT; stdcall;
-{$EXTERNALSYM _lwrite}
-
-function _hread(hFile: HFILE; lpBuffer: LPVOID; lBytes: Longint): Longint; stdcall;
-{$EXTERNALSYM _hread}
-
-function _hwrite(hFile: HFILE; lpBuffer: LPCSTR; lBytes: Longint): Longint; stdcall;
-{$EXTERNALSYM _hwrite}
-
-function _lclose(hFile: HFILE): HFILE; stdcall;
-{$EXTERNALSYM _lclose}
-
-function _llseek(hFile: HFILE; lOffset: LONG; iOrigin: Integer): LONG; stdcall;
-{$EXTERNALSYM _llseek}
-
-function IsTextUnicode(lpBuffer: LPVOID; cb: Integer; lpi: LPINT): BOOL; stdcall;
-{$EXTERNALSYM IsTextUnicode}
-
-type
- PFLS_CALLBACK_FUNCTION = procedure(lpFlsData: PVOID); stdcall;
- {$EXTERNALSYM PFLS_CALLBACK_FUNCTION}
- TFlsCallbackFunction = PFLS_CALLBACK_FUNCTION;
-
-const
- FLS_OUT_OF_INDEXES = DWORD($FFFFFFFF);
- {$EXTERNALSYM FLS_OUT_OF_INDEXES}
-
-function FlsAlloc(lpCallback: PFLS_CALLBACK_FUNCTION): DWORD; stdcall;
-{$EXTERNALSYM FlsAlloc}
-
-function FlsGetValue(dwFlsIndex: DWORD): DWORD; stdcall;
-{$EXTERNALSYM FlsGetValue}
-
-function FlsSetValue(dwFlsIndex: DWORD; lpFlsData: PVOID): DWORD; stdcall;
-{$EXTERNALSYM FlsSetValue}
-
-function FlsFree(dwFlsIndex: DWORD): DWORD; stdcall;
-{$EXTERNALSYM FlsFree}
-
-const
- TLS_OUT_OF_INDEXES = DWORD($FFFFFFFF);
- {$EXTERNALSYM TLS_OUT_OF_INDEXES}
-
-function TlsAlloc: DWORD; stdcall;
-{$EXTERNALSYM TlsAlloc}
-
-function TlsGetValue(dwTlsIndex: DWORD): LPVOID; stdcall;
-{$EXTERNALSYM TlsGetValue}
-
-function TlsSetValue(dwTlsIndex: DWORD; lpTlsValue: LPVOID): BOOL; stdcall;
-{$EXTERNALSYM TlsSetValue}
-
-function TlsFree(dwTlsIndex: DWORD): BOOL; stdcall;
-{$EXTERNALSYM TlsFree}
-
-type
- LPOVERLAPPED_COMPLETION_ROUTINE = procedure(dwErrorCode: DWORD;
- dwNumberOfBytesTransfered: DWORD; lpOverlapped: LPOVERLAPPED); stdcall;
- {$EXTERNALSYM LPOVERLAPPED_COMPLETION_ROUTINE}
- TOverlappedCompletionRoutine = LPOVERLAPPED_COMPLETION_ROUTINE;
-
-function SleepEx(dwMilliseconds: DWORD; bAlertable: BOOL): DWORD; stdcall;
-{$EXTERNALSYM SleepEx}
-
-function WaitForSingleObjectEx(hHandle: HANDLE; dwMilliseconds: DWORD;
- bAlertable: BOOL): DWORD; stdcall;
-{$EXTERNALSYM WaitForSingleObjectEx}
-
-function WaitForMultipleObjectsEx(nCount: DWORD; lpHandles: PHANDLE;
- bWaitAll: BOOL; dwMilliseconds: DWORD; bAlertable: BOOL): DWORD; stdcall;
-{$EXTERNALSYM WaitForMultipleObjectsEx}
-
-function SignalObjectAndWait(hObjectToSignal: HANDLE; hObjectToWaitOn: HANDLE;
- dwMilliseconds: DWORD; bAlertable: BOOL): DWORD; stdcall;
-{$EXTERNALSYM SignalObjectAndWait}
-
-function ReadFileEx(hFile: HANDLE; lpBuffer: LPVOID; nNumberOfBytesToRead: DWORD;
- lpOverlapped: LPOVERLAPPED; lpCompletionRoutine: LPOVERLAPPED_COMPLETION_ROUTINE): BOOL; stdcall;
-{$EXTERNALSYM ReadFileEx}
-
-function WriteFileEx(hFile: HANDLE; lpBuffer: LPCVOID; nNumberOfBytesToWrite: DWORD;
- lpOverlapped: LPOVERLAPPED; lpCompletionRoutine: LPOVERLAPPED_COMPLETION_ROUTINE): BOOL; stdcall;
-{$EXTERNALSYM WriteFileEx}
-
-function BackupRead(hFile: HANDLE; lpBuffer: LPBYTE;
- nNumberOfBytesToRead: DWORD; var lpNumberOfBytesRead: DWORD;
- bAbort, bProcessSecurity: BOOL; var lpContext: LPVOID): BOOL; stdcall;
-{$EXTERNALSYM BackupRead}
-
-function BackupSeek(hFile: HANDLE; dwLowBytesToSeek, dwHighBytesToSeek: DWORD;
- var lpdwLowByteSeeked, lpdwHighByteSeeked: DWORD; var lpContext: LPVOID): BOOL; stdcall;
-{$EXTERNALSYM BackupSeek}
-
-function BackupWrite(hFile: HANDLE; lpBuffer: LPBYTE; nNumberOfBytesToWrite: DWORD;
- var lpNumberOfBytesWritten: DWORD; bAbort, bProcessSecurity: BOOL;
- var lpContext: LPVOID): BOOL; stdcall;
-{$EXTERNALSYM BackupWrite}
-
-//
-// Stream id structure
-//
-
-type
- LPWIN32_STREAM_ID = ^WIN32_STREAM_ID;
- {$EXTERNALSYM LPWIN32_STREAM_ID}
- _WIN32_STREAM_ID = record
- dwStreamId: DWORD;
- dwStreamAttributes: DWORD;
- Size: TLargeInteger;
- dwStreamNameSize: DWORD;
- cStreamName: array [0..ANYSIZE_ARRAY - 1] of WCHAR;
- end;
- {$EXTERNALSYM _WIN32_STREAM_ID}
- WIN32_STREAM_ID = _WIN32_STREAM_ID;
- {$EXTERNALSYM WIN32_STREAM_ID}
- TWin32StreamId = WIN32_STREAM_ID;
- PWin32StreamId = LPWIN32_STREAM_ID;
-
-//
-// Stream Ids
-//
-
-const
- BACKUP_INVALID = $00000000;
- {$EXTERNALSYM BACKUP_INVALID}
- BACKUP_DATA = $00000001;
- {$EXTERNALSYM BACKUP_DATA}
- BACKUP_EA_DATA = $00000002;
- {$EXTERNALSYM BACKUP_EA_DATA}
- BACKUP_SECURITY_DATA = $00000003;
- {$EXTERNALSYM BACKUP_SECURITY_DATA}
- BACKUP_ALTERNATE_DATA = $00000004;
- {$EXTERNALSYM BACKUP_ALTERNATE_DATA}
- BACKUP_LINK = $00000005;
- {$EXTERNALSYM BACKUP_LINK}
- BACKUP_PROPERTY_DATA = $00000006;
- {$EXTERNALSYM BACKUP_PROPERTY_DATA}
- BACKUP_OBJECT_ID = $00000007;
- {$EXTERNALSYM BACKUP_OBJECT_ID}
- BACKUP_REPARSE_DATA = $00000008;
- {$EXTERNALSYM BACKUP_REPARSE_DATA}
- BACKUP_SPARSE_BLOCK = $00000009;
- {$EXTERNALSYM BACKUP_SPARSE_BLOCK}
-
-//
-// Stream Attributes
-//
-
-const
- STREAM_NORMAL_ATTRIBUTE = $00000000;
- {$EXTERNALSYM STREAM_NORMAL_ATTRIBUTE}
- STREAM_MODIFIED_WHEN_READ = $00000001;
- {$EXTERNALSYM STREAM_MODIFIED_WHEN_READ}
- STREAM_CONTAINS_SECURITY = $00000002;
- {$EXTERNALSYM STREAM_CONTAINS_SECURITY}
- STREAM_CONTAINS_PROPERTIES = $00000004;
- {$EXTERNALSYM STREAM_CONTAINS_PROPERTIES}
- STREAM_SPARSE_ATTRIBUTE = $00000008;
- {$EXTERNALSYM STREAM_SPARSE_ATTRIBUTE}
-
-function ReadFileScatter(hFile: HANDLE; aSegmentArray: PFILE_SEGMENT_ELEMENT;
- nNumberOfBytesToRead: DWORD; lpReserved: LPDWORD; lpOverlapped: LPOVERLAPPED): BOOL; stdcall;
-{$EXTERNALSYM ReadFileScatter}
-
-function WriteFileGather(hFile: HANDLE; aSegmentArray: PFILE_SEGMENT_ELEMENT;
- nNumberOfBytesToWrite: DWORD; lpReserved: LPDWORD; lpOverlapped: LPOVERLAPPED): BOOL; stdcall;
-{$EXTERNALSYM WriteFileGather}
-
-//
-// Dual Mode API below this line. Dual Mode Structures also included.
-//
-
-const
- STARTF_USESHOWWINDOW = $00000001;
- {$EXTERNALSYM STARTF_USESHOWWINDOW}
- STARTF_USESIZE = $00000002;
- {$EXTERNALSYM STARTF_USESIZE}
- STARTF_USEPOSITION = $00000004;
- {$EXTERNALSYM STARTF_USEPOSITION}
- STARTF_USECOUNTCHARS = $00000008;
- {$EXTERNALSYM STARTF_USECOUNTCHARS}
- STARTF_USEFILLATTRIBUTE = $00000010;
- {$EXTERNALSYM STARTF_USEFILLATTRIBUTE}
- STARTF_RUNFULLSCREEN = $00000020; // ignored for non-x86 platforms
- {$EXTERNALSYM STARTF_RUNFULLSCREEN}
- STARTF_FORCEONFEEDBACK = $00000040;
- {$EXTERNALSYM STARTF_FORCEONFEEDBACK}
- STARTF_FORCEOFFFEEDBACK = $00000080;
- {$EXTERNALSYM STARTF_FORCEOFFFEEDBACK}
- STARTF_USESTDHANDLES = $00000100;
- {$EXTERNALSYM STARTF_USESTDHANDLES}
-
- STARTF_USEHOTKEY = $00000200;
- {$EXTERNALSYM STARTF_USEHOTKEY}
-
-type
- LPSTARTUPINFOA = ^STARTUPINFOA;
- {$EXTERNALSYM LPSTARTUPINFOA}
- _STARTUPINFOA = record
- cb: DWORD;
- lpReserved: LPSTR;
- lpDesktop: LPSTR;
- lpTitle: LPSTR;
- dwX: DWORD;
- dwY: DWORD;
- dwXSize: DWORD;
- dwYSize: DWORD;
- dwXCountChars: DWORD;
- dwYCountChars: DWORD;
- dwFillAttribute: DWORD;
- dwFlags: DWORD;
- wShowWindow: WORD;
- cbReserved2: WORD;
- lpReserved2: LPBYTE;
- hStdInput: HANDLE;
- hStdOutput: HANDLE;
- hStdError: HANDLE;
- end;
- {$EXTERNALSYM _STARTUPINFOA}
- STARTUPINFOA = _STARTUPINFOA;
- {$EXTERNALSYM STARTUPINFOA}
- TStartupInfoA = STARTUPINFOA;
- PStartupInfoA = LPSTARTUPINFOA;
-
- LPSTARTUPINFOW = ^STARTUPINFOW;
- {$EXTERNALSYM LPSTARTUPINFOW}
- _STARTUPINFOW = record
- cb: DWORD;
- lpReserved: LPWSTR;
- lpDesktop: LPWSTR;
- lpTitle: LPWSTR;
- dwX: DWORD;
- dwY: DWORD;
- dwXSize: DWORD;
- dwYSize: DWORD;
- dwXCountChars: DWORD;
- dwYCountChars: DWORD;
- dwFillAttribute: DWORD;
- dwFlags: DWORD;
- wShowWindow: WORD;
- cbReserved2: WORD;
- lpReserved2: LPBYTE;
- hStdInput: HANDLE;
- hStdOutput: HANDLE;
- hStdError: HANDLE;
- end;
- {$EXTERNALSYM _STARTUPINFOW}
- STARTUPINFOW = _STARTUPINFOW;
- {$EXTERNALSYM STARTUPINFOW}
- TStartupInfoW = STARTUPINFOW;
- PStartupInfoW = LPSTARTUPINFOW;
-
- {$IFDEF UNICODE}
- STARTUPINFO = STARTUPINFOW;
- {$EXTERNALSYM STARTUPINFO}
- LPSTARTUPINFO = LPSTARTUPINFOW;
- {$EXTERNALSYM LPSTARTUPINFO}
- TStartupInfo = TStartupInfoW;
- PStartupInfo = PStartupInfoW;
- {$ELSE}
- STARTUPINFO = STARTUPINFOA;
- {$EXTERNALSYM STARTUPINFO}
- LPSTARTUPINFO = LPSTARTUPINFOA;
- {$EXTERNALSYM LPSTARTUPINFO}
- TStartupInfo = TStartupInfoA;
- PStartupInfo = PStartupInfoA;
- {$ENDIF UNICODE}
-
-const
- SHUTDOWN_NORETRY = $00000001;
- {$EXTERNALSYM SHUTDOWN_NORETRY}
-
-type
- PWIN32_FIND_DATAA = ^WIN32_FIND_DATAA;
- {$EXTERNALSYM PWIN32_FIND_DATAA}
- _WIN32_FIND_DATAA = record
- dwFileAttributes: DWORD;
- ftCreationTime: FILETIME;
- ftLastAccessTime: FILETIME;
- ftLastWriteTime: FILETIME;
- nFileSizeHigh: DWORD;
- nFileSizeLow: DWORD;
- dwReserved0: DWORD;
- dwReserved1: DWORD;
- cFileName: array [0..MAX_PATH - 1] of CHAR;
- cAlternateFileName: array [0..13] of CHAR;
- end;
- {$EXTERNALSYM _WIN32_FIND_DATAA}
- WIN32_FIND_DATAA = _WIN32_FIND_DATAA;
- {$EXTERNALSYM WIN32_FIND_DATAA}
- LPWIN32_FIND_DATAA = ^WIN32_FIND_DATAA;
- {$EXTERNALSYM LPWIN32_FIND_DATAA}
- TWin32FindDataA = WIN32_FIND_DATAA;
- PWin32FindDataA = PWIN32_FIND_DATAA;
-
- PWIN32_FIND_DATAW = ^WIN32_FIND_DATAW;
- {$EXTERNALSYM PWIN32_FIND_DATAW}
- _WIN32_FIND_DATAW = record
- dwFileAttributes: DWORD;
- ftCreationTime: FILETIME;
- ftLastAccessTime: FILETIME;
- ftLastWriteTime: FILETIME;
- nFileSizeHigh: DWORD;
- nFileSizeLow: DWORD;
- dwReserved0: DWORD;
- dwReserved1: DWORD;
- cFileName: array [0..MAX_PATH - 1] of WCHAR;
- cAlternateFileName: array [0..13] of WCHAR;
- end;
- {$EXTERNALSYM _WIN32_FIND_DATAW}
- WIN32_FIND_DATAW = _WIN32_FIND_DATAW;
- {$EXTERNALSYM WIN32_FIND_DATAW}
- LPWIN32_FIND_DATAW = ^WIN32_FIND_DATAW;
- {$EXTERNALSYM LPWIN32_FIND_DATAW}
- TWin32FindDataW = WIN32_FIND_DATAW;
- PWin32FindDataW = PWIN32_FIND_DATAW;
-
- {$IFDEF UNICODE}
- WIN32_FIND_DATA = WIN32_FIND_DATAW;
- {$EXTERNALSYM WIN32_FIND_DATA}
- PWIN32_FIND_DATA = PWIN32_FIND_DATAW;
- {$EXTERNALSYM PWIN32_FIND_DATA}
- LPWIN32_FIND_DATA = LPWIN32_FIND_DATAW;
- {$EXTERNALSYM LPWIN32_FIND_DATA}
- TWin32FindData = TWin32FindDataW;
- PWin32FindData = PWin32FindDataW;
- {$ELSE}
- WIN32_FIND_DATA = WIN32_FIND_DATAA;
- {$EXTERNALSYM WIN32_FIND_DATA}
- PWIN32_FIND_DATA = PWIN32_FIND_DATAA;
- {$EXTERNALSYM PWIN32_FIND_DATA}
- LPWIN32_FIND_DATA = LPWIN32_FIND_DATAA;
- {$EXTERNALSYM LPWIN32_FIND_DATA}
- TWin32FindData = TWin32FindDataA;
- PWin32FindData = PWin32FindDataA;
- {$ENDIF UNICODE}
-
- LPWIN32_FILE_ATTRIBUTE_DATA = ^WIN32_FILE_ATTRIBUTE_DATA;
- {$EXTERNALSYM LPWIN32_FILE_ATTRIBUTE_DATA}
- _WIN32_FILE_ATTRIBUTE_DATA = record
- dwFileAttributes: DWORD;
- ftCreationTime: FILETIME;
- ftLastAccessTime: FILETIME;
- ftLastWriteTime: FILETIME;
- nFileSizeHigh: DWORD;
- nFileSizeLow: DWORD;
- end;
- {$EXTERNALSYM _WIN32_FILE_ATTRIBUTE_DATA}
- WIN32_FILE_ATTRIBUTE_DATA = _WIN32_FILE_ATTRIBUTE_DATA;
- {$EXTERNALSYM WIN32_FILE_ATTRIBUTE_DATA}
- TWin32FileAttributeData = WIN32_FILE_ATTRIBUTE_DATA;
- PWin32FileAttributeData = LPWIN32_FILE_ATTRIBUTE_DATA;
-
-function CreateMutexA(lpMutexAttributes: LPSECURITY_ATTRIBUTES; bInitialOwner: BOOL; lpName: LPCSTR): HANDLE;
-{$EXTERNALSYM CreateMutexA}
-function CreateMutexW(lpMutexAttributes: LPSECURITY_ATTRIBUTES; bInitialOwner: BOOL; lpName: LPCWSTR): HANDLE;
-{$EXTERNALSYM CreateMutexW}
-function CreateMutex(lpMutexAttributes: LPSECURITY_ATTRIBUTES;
- bInitialOwner: BOOL; lpName: LPCTSTR): HANDLE;
-{$EXTERNALSYM CreateMutex}
-
-function OpenMutexA(dwDesiredAccess: DWORD; bInheritHandle: BOOL; lpName: LPCSTR): HANDLE; stdcall;
-{$EXTERNALSYM OpenMutexA}
-function OpenMutexW(dwDesiredAccess: DWORD; bInheritHandle: BOOL; lpName: LPCWSTR): HANDLE; stdcall;
-{$EXTERNALSYM OpenMutexW}
-function OpenMutex(dwDesiredAccess: DWORD; bInheritHandle: BOOL; lpName: LPCTSTR): HANDLE; stdcall;
-{$EXTERNALSYM OpenMutex}
-
-function CreateEventA(lpEventAttributes: LPSECURITY_ATTRIBUTES;
- bManualReset, bInitialState: BOOL; lpName: LPCSTR): HANDLE; stdcall;
-{$EXTERNALSYM CreateEventA}
-function CreateEventW(lpEventAttributes: LPSECURITY_ATTRIBUTES;
- bManualReset, bInitialState: BOOL; lpName: LPCWSTR): HANDLE; stdcall;
-{$EXTERNALSYM CreateEventW}
-function CreateEvent(lpEventAttributes: LPSECURITY_ATTRIBUTES;
- bManualReset, bInitialState: BOOL; lpName: LPCTSTR): HANDLE; stdcall;
-{$EXTERNALSYM CreateEvent}
-
-function OpenEventA(dwDesiredAccess: DWORD; bInheritHandle: BOOL; lpName: LPCSTR): HANDLE; stdcall;
-{$EXTERNALSYM OpenEventA}
-function OpenEventW(dwDesiredAccess: DWORD; bInheritHandle: BOOL; lpName: LPCWSTR): HANDLE; stdcall;
-{$EXTERNALSYM OpenEventW}
-function OpenEvent(dwDesiredAccess: DWORD; bInheritHandle: BOOL; lpName: LPCTSTR): HANDLE; stdcall;
-{$EXTERNALSYM OpenEvent}
-
-function CreateSemaphoreA(lpSemaphoreAttributes: LPSECURITY_ATTRIBUTES;
- lInitialCount, lMaximumCount: LONG; lpName: LPCSTR): HANDLE; stdcall;
-{$EXTERNALSYM CreateSemaphoreA}
-function CreateSemaphoreW(lpSemaphoreAttributes: LPSECURITY_ATTRIBUTES;
- lInitialCount, lMaximumCount: LONG; lpName: LPCWSTR): HANDLE; stdcall;
-{$EXTERNALSYM CreateSemaphoreW}
-function CreateSemaphore(lpSemaphoreAttributes: LPSECURITY_ATTRIBUTES;
- lInitialCount, lMaximumCount: LONG; lpName: LPCTSTR): HANDLE; stdcall;
-{$EXTERNALSYM CreateSemaphore}
-
-function OpenSemaphoreA(dwDesiredAccess: DWORD; bInheritHandle: BOOL;
- lpName: LPCSTR): HANDLE; stdcall;
-{$EXTERNALSYM OpenSemaphoreA}
-function OpenSemaphoreW(dwDesiredAccess: DWORD; bInheritHandle: BOOL;
- lpName: LPCWSTR): HANDLE; stdcall;
-{$EXTERNALSYM OpenSemaphoreW}
-function OpenSemaphore(dwDesiredAccess: DWORD; bInheritHandle: BOOL;
- lpName: LPCTSTR): HANDLE; stdcall;
-{$EXTERNALSYM OpenSemaphore}
-
-type
- PTIMERAPCROUTINE = procedure(lpArgToCompletionRoutine: LPVOID;
- dwTimerLowValue, dwTimerHighValue: DWORD); stdcall;
- {$EXTERNALSYM PTIMERAPCROUTINE}
- TTimerApcRoutine = PTIMERAPCROUTINE;
-
-function CreateWaitableTimerA(lpTimerAttributes: LPSECURITY_ATTRIBUTES;
- bManualReset: BOOL; lpTimerName: LPCSTR): HANDLE; stdcall;
-{$EXTERNALSYM CreateWaitableTimerA}
-function CreateWaitableTimerW(lpTimerAttributes: LPSECURITY_ATTRIBUTES;
- bManualReset: BOOL; lpTimerName: LPCWSTR): HANDLE; stdcall;
-{$EXTERNALSYM CreateWaitableTimerW}
-function CreateWaitableTimer(lpTimerAttributes: LPSECURITY_ATTRIBUTES;
- bManualReset: BOOL; lpTimerName: LPCTSTR): HANDLE; stdcall;
-{$EXTERNALSYM CreateWaitableTimer}
-
-function OpenWaitableTimerA(dwDesiredAccess: DWORD; bInheritHandle: BOOL;
- lpTimerName: LPCSTR): HANDLE; stdcall;
-{$EXTERNALSYM OpenWaitableTimerA}
-function OpenWaitableTimerW(dwDesiredAccess: DWORD; bInheritHandle: BOOL;
- lpTimerName: LPCWSTR): HANDLE; stdcall;
-{$EXTERNALSYM OpenWaitableTimerW}
-function OpenWaitableTimer(dwDesiredAccess: DWORD; bInheritHandle: BOOL;
- lpTimerName: LPCTSTR): HANDLE; stdcall;
-{$EXTERNALSYM OpenWaitableTimer}
-
-function SetWaitableTimer(hTimer: HANDLE; var lpDueTime: LARGE_INTEGER;
- lPeriod: LONG; pfnCompletionRoutine: PTIMERAPCROUTINE;
- lpArgToCompletionRoutine: LPVOID; fResume: BOOL): BOOL; stdcall;
-{$EXTERNALSYM SetWaitableTimer}
-
-function CancelWaitableTimer(hTimer: HANDLE): BOOL; stdcall;
-{$EXTERNALSYM CancelWaitableTimer}
-
-function CreateFileMappingA(hFile: HANDLE; lpFileMappingAttributes: LPSECURITY_ATTRIBUTES;
- flProtect, dwMaximumSizeHigh, dwMaximumSizeLow: DWORD; lpName: LPCSTR): HANDLE; stdcall;
-{$EXTERNALSYM CreateFileMappingA}
-function CreateFileMappingW(hFile: HANDLE; lpFileMappingAttributes: LPSECURITY_ATTRIBUTES;
- flProtect, dwMaximumSizeHigh, dwMaximumSizeLow: DWORD; lpName: LPCWSTR): HANDLE; stdcall;
-{$EXTERNALSYM CreateFileMappingW}
-function CreateFileMapping(hFile: HANDLE; lpFileMappingAttributes: LPSECURITY_ATTRIBUTES;
- flProtect, dwMaximumSizeHigh, dwMaximumSizeLow: DWORD; lpName: LPCTSTR): HANDLE; stdcall;
-{$EXTERNALSYM CreateFileMapping}
-
-function OpenFileMappingA(dwDesiredAccess: DWORD; bInheritHandle: BOOL;
- lpName: LPCSTR): HANDLE; stdcall;
-{$EXTERNALSYM OpenFileMappingA}
-function OpenFileMappingW(dwDesiredAccess: DWORD; bInheritHandle: BOOL;
- lpName: LPCWSTR): HANDLE; stdcall;
-{$EXTERNALSYM OpenFileMappingW}
-function OpenFileMapping(dwDesiredAccess: DWORD; bInheritHandle: BOOL;
- lpName: LPCTSTR): HANDLE; stdcall;
-{$EXTERNALSYM OpenFileMapping}
-
-function GetLogicalDriveStringsA(nBufferLength: DWORD; lpBuffer: LPSTR): DWORD; stdcall;
-{$EXTERNALSYM GetLogicalDriveStringsA}
-function GetLogicalDriveStringsW(nBufferLength: DWORD; lpBuffer: LPWSTR): DWORD; stdcall;
-{$EXTERNALSYM GetLogicalDriveStringsW}
-function GetLogicalDriveStrings(nBufferLength: DWORD; lpBuffer: LPTSTR): DWORD; stdcall;
-{$EXTERNALSYM GetLogicalDriveStrings}
-
-type
- _MEMORY_RESOURCE_NOTIFICATION_TYPE = (
- LowMemoryResourceNotification,
- HighMemoryResourceNotification);
- {$EXTERNALSYM _MEMORY_RESOURCE_NOTIFICATION_TYPE}
- MEMORY_RESOURCE_NOTIFICATION_TYPE = _MEMORY_RESOURCE_NOTIFICATION_TYPE;
- {$EXTERNALSYM MEMORY_RESOURCE_NOTIFICATION_TYPE}
- TMemoryResourceNotification = MEMORY_RESOURCE_NOTIFICATION_TYPE;
-
-function CreateMemoryResourceNotification(NotificationType: MEMORY_RESOURCE_NOTIFICATION_TYPE): HANDLE; stdcall;
-{$EXTERNALSYM CreateMemoryResourceNotification}
-
-function QueryMemoryResourceNotification(ResourceNotificationHandle: HANDLE;
- ResourceState: BOOL): BOOL; stdcall;
-{$EXTERNALSYM QueryMemoryResourceNotification}
-
-function LoadLibraryA(lpLibFileName: LPCSTR): HMODULE; stdcall;
-{$EXTERNALSYM LoadLibraryA}
-function LoadLibraryW(lpLibFileName: LPCWSTR): HMODULE; stdcall;
-{$EXTERNALSYM LoadLibraryW}
-function LoadLibrary(lpLibFileName: LPCTSTR): HMODULE; stdcall;
-{$EXTERNALSYM LoadLibrary}
-
-function LoadLibraryExA(lpLibFileName: LPCSTR; hFile: HANDLE; dwFlags: DWORD): HMODULE; stdcall;
-{$EXTERNALSYM LoadLibraryExA}
-function LoadLibraryExW(lpLibFileName: LPCWSTR; hFile: HANDLE; dwFlags: DWORD): HMODULE; stdcall;
-{$EXTERNALSYM LoadLibraryExW}
-function LoadLibraryEx(lpLibFileName: LPCTSTR; hFile: HANDLE; dwFlags: DWORD): HMODULE; stdcall;
-{$EXTERNALSYM LoadLibraryEx}
-
-const
- DONT_RESOLVE_DLL_REFERENCES = $00000001;
- {$EXTERNALSYM DONT_RESOLVE_DLL_REFERENCES}
- LOAD_LIBRARY_AS_DATAFILE = $00000002;
- {$EXTERNALSYM LOAD_LIBRARY_AS_DATAFILE}
- LOAD_WITH_ALTERED_SEARCH_PATH = $00000008;
- {$EXTERNALSYM LOAD_WITH_ALTERED_SEARCH_PATH}
- LOAD_IGNORE_CODE_AUTHZ_LEVEL = $00000010;
- {$EXTERNALSYM LOAD_IGNORE_CODE_AUTHZ_LEVEL}
-
-function GetModuleFileNameA(hModule: HMODULE; lpFilename: LPSTR; nSize: DWORD): DWORD; stdcall;
-{$EXTERNALSYM GetModuleFileNameA}
-function GetModuleFileNameW(hModule: HMODULE; lpFilename: LPWSTR; nSize: DWORD): DWORD; stdcall;
-{$EXTERNALSYM GetModuleFileNameW}
-function GetModuleFileName(hModule: HMODULE; lpFilename: LPTSTR; nSize: DWORD): DWORD; stdcall;
-{$EXTERNALSYM GetModuleFileName}
-
-function GetModuleHandleA(lpModuleName: LPCSTR): HMODULE; stdcall;
-{$EXTERNALSYM GetModuleHandleA}
-function GetModuleHandleW(lpModuleName: LPCWSTR): HMODULE; stdcall;
-{$EXTERNALSYM GetModuleHandleW}
-function GetModuleHandle(lpModuleName: LPCTSTR): HMODULE; stdcall;
-{$EXTERNALSYM GetModuleHandle}
-
-const
- GET_MODULE_HANDLE_EX_FLAG_PIN = $00000001;
- {$EXTERNALSYM GET_MODULE_HANDLE_EX_FLAG_PIN}
- GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT = $00000002;
- {$EXTERNALSYM GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT}
- GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS = $00000004;
- {$EXTERNALSYM GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS}
-
-type
- PGET_MODULE_HANDLE_EXA = function(dwFlags: DWORD; lpModuleName: LPCSTR; var phModule: HMODULE): BOOL; stdcall;
- {$EXTERNALSYM PGET_MODULE_HANDLE_EXA}
- PGET_MODULE_HANDLE_EXW = function(dwFlags: DWORD; lpModuleName: LPCWSTR; var phModule: HMODULE): BOOL; stdcall;
- {$EXTERNALSYM PGET_MODULE_HANDLE_EXW}
-
- {$IFDEF UNICODE}
- PGET_MODULE_HANDLE_EX = PGET_MODULE_HANDLE_EXW;
- {$EXTERNALSYM PGET_MODULE_HANDLE_EX}
- {$ELSE}
- PGET_MODULE_HANDLE_EX = PGET_MODULE_HANDLE_EXA;
- {$EXTERNALSYM PGET_MODULE_HANDLE_EX}
- {$ENDIF UNICODE}
-
-function GetModuleHandleExA(dwFlags: DWORD; lpModuleName: LPCSTR; var phModule: HMODULE): BOOL; stdcall;
-{$EXTERNALSYM GetModuleHandleExA}
-function GetModuleHandleExW(dwFlags: DWORD; lpModuleName: LPCWSTR; var phModule: HMODULE): BOOL; stdcall;
-{$EXTERNALSYM GetModuleHandleExW}
-function GetModuleHandleEx(dwFlags: DWORD; lpModuleName: LPCTSTR; var phModule: HMODULE): BOOL; stdcall;
-{$EXTERNALSYM GetModuleHandleEx}
-
-function NeedCurrentDirectoryForExePathA(ExeName: LPCSTR): BOOL; stdcall;
-{$EXTERNALSYM NeedCurrentDirectoryForExePathA}
-function NeedCurrentDirectoryForExePathW(ExeName: LPCWSTR): BOOL; stdcall;
-{$EXTERNALSYM NeedCurrentDirectoryForExePathW}
-function NeedCurrentDirectoryForExePath(ExeName: LPCTSTR): BOOL; stdcall;
-{$EXTERNALSYM NeedCurrentDirectoryForExePath}
-
-function CreateProcessA(lpApplicationName: LPCSTR; lpCommandLine: LPSTR;
- lpProcessAttributes, lpThreadAttributes: LPSECURITY_ATTRIBUTES;
- bInheritHandles: BOOL; dwCreationFlags: DWORD; lpEnvironment: LPVOID;
- lpCurrentDirectory: LPCSTR; const lpStartupInfo: STARTUPINFOA;
- var lpProcessInformation: PROCESS_INFORMATION): BOOL; stdcall;
-{$EXTERNALSYM CreateProcessA}
-function CreateProcessW(lpApplicationName: LPCWSTR; lpCommandLine: LPWSTR;
- lpProcessAttributes, lpThreadAttributes: LPSECURITY_ATTRIBUTES;
- bInheritHandles: BOOL; dwCreationFlags: DWORD; lpEnvironment: LPVOID;
- lpCurrentDirectory: LPCWSTR; const lpStartupInfo: STARTUPINFOW;
- var lpProcessInformation: PROCESS_INFORMATION): BOOL; stdcall;
-{$EXTERNALSYM CreateProcessW}
-function CreateProcess(lpApplicationName: LPCTSTR; lpCommandLine: LPTSTR;
- lpProcessAttributes, lpThreadAttributes: LPSECURITY_ATTRIBUTES;
- bInheritHandles: BOOL; dwCreationFlags: DWORD; lpEnvironment: LPVOID;
- lpCurrentDirectory: LPCTSTR; const lpStartupInfo: STARTUPINFO;
- var lpProcessInformation: PROCESS_INFORMATION): BOOL; stdcall;
-{$EXTERNALSYM CreateProcess}
-
-function SetProcessShutdownParameters(dwLevel, dwFlags: DWORD): BOOL; stdcall;
-{$EXTERNALSYM SetProcessShutdownParameters}
-
-function GetProcessShutdownParameters(var lpdwLevel, lpdwFlags: DWORD): BOOL; stdcall;
-{$EXTERNALSYM GetProcessShutdownParameters}
-
-function GetProcessVersion(ProcessId: DWORD): DWORD; stdcall;
-{$EXTERNALSYM GetProcessVersion}
-
-procedure FatalAppExitA(uAction: UINT; lpMessageText: LPCSTR); stdcall;
-{$EXTERNALSYM FatalAppExitA}
-procedure FatalAppExitW(uAction: UINT; lpMessageText: LPCWSTR); stdcall;
-{$EXTERNALSYM FatalAppExitW}
-procedure FatalAppExit(uAction: UINT; lpMessageText: LPCTSTR); stdcall;
-{$EXTERNALSYM FatalAppExit}
-
-procedure GetStartupInfoA(var lpStartupInfo: STARTUPINFOA); stdcall;
-{$EXTERNALSYM GetStartupInfoA}
-procedure GetStartupInfoW(var lpStartupInfo: STARTUPINFOW); stdcall;
-{$EXTERNALSYM GetStartupInfoW}
-procedure GetStartupInfo(var lpStartupInfo: STARTUPINFO); stdcall;
-{$EXTERNALSYM GetStartupInfo}
-
-function GetCommandLineA: LPSTR; stdcall;
-{$EXTERNALSYM GetCommandLineA}
-function GetCommandLineW: LPWSTR; stdcall;
-{$EXTERNALSYM GetCommandLineW}
-function GetCommandLine: LPTSTR; stdcall;
-{$EXTERNALSYM GetCommandLine}
-
-function GetEnvironmentVariableA(lpName: LPCSTR; lpBuffer: LPSTR; nSize: DWORD): DWORD; stdcall;
-{$EXTERNALSYM GetEnvironmentVariableA}
-function GetEnvironmentVariableW(lpName: LPCWSTR; lpBuffer: LPWSTR; nSize: DWORD): DWORD; stdcall;
-{$EXTERNALSYM GetEnvironmentVariableW}
-function GetEnvironmentVariable(lpName: LPCTSTR; lpBuffer: LPTSTR; nSize: DWORD): DWORD; stdcall;
-{$EXTERNALSYM GetEnvironmentVariable}
-
-function SetEnvironmentVariableA(lpName, lpValue: LPCSTR): BOOL; stdcall;
-{$EXTERNALSYM SetEnvironmentVariableA}
-function SetEnvironmentVariableW(lpName, lpValue: LPCWSTR): BOOL; stdcall;
-{$EXTERNALSYM SetEnvironmentVariableW}
-function SetEnvironmentVariable(lpName, lpValue: LPCTSTR): BOOL; stdcall;
-{$EXTERNALSYM SetEnvironmentVariable}
-
-function ExpandEnvironmentStringsA(lpSrc: LPCSTR; lpDst: LPSTR; nSize: DWORD): DWORD; stdcall;
-{$EXTERNALSYM ExpandEnvironmentStringsA}
-function ExpandEnvironmentStringsW(lpSrc: LPCWSTR; lpDst: LPWSTR; nSize: DWORD): DWORD; stdcall;
-{$EXTERNALSYM ExpandEnvironmentStringsW}
-function ExpandEnvironmentStrings(lpSrc: LPCTSTR; lpDst: LPTSTR; nSize: DWORD): DWORD; stdcall;
-{$EXTERNALSYM ExpandEnvironmentStrings}
-
-function GetFirmwareEnvironmentVariableA(lpName, lpGuid: LPCSTR; pBuffer: PVOID;
- nSize: DWORD): DWORD; stdcall;
-{$EXTERNALSYM GetFirmwareEnvironmentVariableA}
-function GetFirmwareEnvironmentVariableW(lpName, lpGuid: LPCWSTR; pBuffer: PVOID;
- nSize: DWORD): DWORD; stdcall;
-{$EXTERNALSYM GetFirmwareEnvironmentVariableW}
-function GetFirmwareEnvironmentVariable(lpName, lpGuid: LPCTSTR; pBuffer: PVOID;
- nSize: DWORD): DWORD; stdcall;
-{$EXTERNALSYM GetFirmwareEnvironmentVariable}
-
-function SetFirmwareEnvironmentVariableA(lpName, lpGuid: LPCSTR; pValue: PVOID;
- nSize: DWORD): BOOL; stdcall;
-{$EXTERNALSYM SetFirmwareEnvironmentVariableA}
-function SetFirmwareEnvironmentVariableW(lpName, lpGuid: LPCWSTR; pValue: PVOID;
- nSize: DWORD): BOOL; stdcall;
-{$EXTERNALSYM SetFirmwareEnvironmentVariableW}
-function SetFirmwareEnvironmentVariable(lpName, lpGuid: LPCTSTR; pValue: PVOID;
- nSize: DWORD): BOOL; stdcall;
-{$EXTERNALSYM SetFirmwareEnvironmentVariable}
-
-procedure OutputDebugStringA(lpOutputString: LPCSTR); stdcall;
-{$EXTERNALSYM OutputDebugStringA}
-procedure OutputDebugStringW(lpOutputString: LPCWSTR); stdcall;
-{$EXTERNALSYM OutputDebugStringW}
-procedure OutputDebugString(lpOutputString: LPCTSTR); stdcall;
-{$EXTERNALSYM OutputDebugString}
-
-function FindResourceA(hModule: HMODULE; lpName, lpType: LPCSTR): HRSRC; stdcall;
-{$EXTERNALSYM FindResourceA}
-function FindResourceW(hModule: HMODULE; lpName, lpType: LPCWSTR): HRSRC; stdcall;
-{$EXTERNALSYM FindResourceW}
-function FindResource(hModule: HMODULE; lpName, lpType: LPCTSTR): HRSRC; stdcall;
-{$EXTERNALSYM FindResource}
-
-function FindResourceExA(hModule: HMODULE; lpType, lpName: LPCSTR; wLanguage: WORD): HRSRC; stdcall;
-{$EXTERNALSYM FindResourceExA}
-function FindResourceExW(hModule: HMODULE; lpType, lpName: LPCWSTR; wLanguage: WORD): HRSRC; stdcall;
-{$EXTERNALSYM FindResourceExW}
-function FindResourceEx(hModule: HMODULE; lpType, lpName: LPCTSTR; wLanguage: WORD): HRSRC; stdcall;
-{$EXTERNALSYM FindResourceEx}
-
-type
- ENUMRESTYPEPROCA = function(hModule: HMODULE; lpType: LPSTR; lParam: LONG_PTR): BOOL; stdcall;
- {$EXTERNALSYM ENUMRESTYPEPROCA}
- ENUMRESTYPEPROCW = function(hModule: HMODULE; lpType: LPWSTR; lParam: LONG_PTR): BOOL; stdcall;
- {$EXTERNALSYM ENUMRESTYPEPROCW}
- ENUMRESTYPEPROC = function(hModule: HMODULE; lpType: LPTSTR; lParam: LONG_PTR): BOOL; stdcall;
- {$EXTERNALSYM ENUMRESTYPEPROC}
- TEnumResTypeProcA = ENUMRESTYPEPROCA;
- TEnumResTypeProcW = ENUMRESTYPEPROCW;
- TEnumResTypeProc = ENUMRESTYPEPROC;
-
- ENUMRESNAMEPROCA = function(hModule: HMODULE; lpType: LPCSTR; lpName: LPSTR;
- lParam: LONG_PTR): BOOL; stdcall;
- {$EXTERNALSYM ENUMRESNAMEPROCA}
- ENUMRESNAMEPROCW = function(hModule: HMODULE; lpType: LPCWSTR; lpName: LPWSTR;
- lParam: LONG_PTR): BOOL; stdcall;
- {$EXTERNALSYM ENUMRESNAMEPROCW}
- ENUMRESNAMEPROC = function(hModule: HMODULE; lpType: LPCTSTR; lpName: LPTSTR;
- lParam: LONG_PTR): BOOL; stdcall;
- {$EXTERNALSYM ENUMRESNAMEPROC}
- TEnumResNameProcA = ENUMRESNAMEPROCA;
- TEnumResNameProcW = ENUMRESNAMEPROCW;
- TEnumResNameProc = ENUMRESNAMEPROC;
-
- ENUMRESLANGPROCA = function(hModule: HMODULE; lpType, lpName: LPCSTR;
- wLanguage: WORD; lParam: LONG_PTR): BOOL; stdcall;
- {$EXTERNALSYM ENUMRESLANGPROCA}
- ENUMRESLANGPROCW = function(hModule: HMODULE; lpType, lpName: LPCWSTR;
- wLanguage: WORD; lParam: LONG_PTR): BOOL; stdcall;
- {$EXTERNALSYM ENUMRESLANGPROCW}
- ENUMRESLANGPROC = function(hModule: HMODULE; lpType, lpName: LPCTSTR;
- wLanguage: WORD; lParam: LONG_PTR): BOOL; stdcall;
- {$EXTERNALSYM ENUMRESLANGPROC}
- TEnumResLangProcA = ENUMRESLANGPROCA;
- TEnumResLangProcW = ENUMRESLANGPROCW;
- TEnumResLangProc = ENUMRESLANGPROC;
-
-function EnumResourceTypesA(hModule: HMODULE; lpEnumFunc: ENUMRESTYPEPROCA;
- lParam: LONG_PTR): BOOL; stdcall;
-{$EXTERNALSYM EnumResourceTypesA}
-function EnumResourceTypesW(hModule: HMODULE; lpEnumFunc: ENUMRESTYPEPROCW;
- lParam: LONG_PTR): BOOL; stdcall;
-{$EXTERNALSYM EnumResourceTypesW}
-function EnumResourceTypes(hModule: HMODULE; lpEnumFunc: ENUMRESTYPEPROC;
- lParam: LONG_PTR): BOOL; stdcall;
-{$EXTERNALSYM EnumResourceTypes}
-
-function EnumResourceNamesA(hModule: HMODULE; lpType: LPCSTR;
- lpEnumFunc: ENUMRESNAMEPROCA; lParam: LONG_PTR): BOOL; stdcall;
-{$EXTERNALSYM EnumResourceNamesA}
-function EnumResourceNamesW(hModule: HMODULE; lpType: LPCWSTR;
- lpEnumFunc: ENUMRESNAMEPROCW; lParam: LONG_PTR): BOOL; stdcall;
-{$EXTERNALSYM EnumResourceNamesW}
-function EnumResourceNames(hModule: HMODULE; lpType: LPCTSTR;
- lpEnumFunc: ENUMRESNAMEPROC; lParam: LONG_PTR): BOOL; stdcall;
-{$EXTERNALSYM EnumResourceNames}
-
-function EnumResourceLanguagesA(hModule: HMODULE; lpType, lpName: LPCSTR;
- lpEnumFunc: ENUMRESLANGPROCA; lParam: LONG_PTR): BOOL; stdcall;
-{$EXTERNALSYM EnumResourceLanguagesA}
-function EnumResourceLanguagesW(hModule: HMODULE; lpType, lpName: LPCWSTR;
- lpEnumFunc: ENUMRESLANGPROCW; lParam: LONG_PTR): BOOL; stdcall;
-{$EXTERNALSYM EnumResourceLanguagesW}
-function EnumResourceLanguages(hModule: HMODULE; lpType, lpName: LPCTSTR;
- lpEnumFunc: ENUMRESLANGPROC; lParam: LONG_PTR): BOOL; stdcall;
-{$EXTERNALSYM EnumResourceLanguages}
-
-function BeginUpdateResourceA(pFileName: LPCSTR; bDeleteExistingResources: BOOL): HANDLE; stdcall;
-{$EXTERNALSYM BeginUpdateResourceA}
-function BeginUpdateResourceW(pFileName: LPCWSTR; bDeleteExistingResources: BOOL): HANDLE; stdcall;
-{$EXTERNALSYM BeginUpdateResourceW}
-function BeginUpdateResource(pFileName: LPCTSTR; bDeleteExistingResources: BOOL): HANDLE; stdcall;
-{$EXTERNALSYM BeginUpdateResource}
-
-function UpdateResourceA(hUpdate: HANDLE; lpType, lpName: LPCSTR;
- wLanguage: WORD; lpData: LPVOID; cbData: DWORD): BOOL; stdcall;
-{$EXTERNALSYM UpdateResourceA}
-function UpdateResourceW(hUpdate: HANDLE; lpType, lpName: LPCWSTR;
- wLanguage: WORD; lpData: LPVOID; cbData: DWORD): BOOL; stdcall;
-{$EXTERNALSYM UpdateResourceW}
-function UpdateResource(hUpdate: HANDLE; lpType, lpName: LPCTSTR;
- wLanguage: WORD; lpData: LPVOID; cbData: DWORD): BOOL; stdcall;
-{$EXTERNALSYM UpdateResource}
-
-function EndUpdateResourceA(hUpdate: HANDLE; fDiscard: BOOL): BOOL; stdcall;
-{$EXTERNALSYM EndUpdateResourceA}
-function EndUpdateResourceW(hUpdate: HANDLE; fDiscard: BOOL): BOOL; stdcall;
-{$EXTERNALSYM EndUpdateResourceW}
-function EndUpdateResource(hUpdate: HANDLE; fDiscard: BOOL): BOOL; stdcall;
-{$EXTERNALSYM EndUpdateResource}
-
-function GlobalAddAtomA(lpString: LPCSTR): ATOM; stdcall;
-{$EXTERNALSYM GlobalAddAtomA}
-function GlobalAddAtomW(lpString: LPCWSTR): ATOM; stdcall;
-{$EXTERNALSYM GlobalAddAtomW}
-function GlobalAddAtom(lpString: LPCTSTR): ATOM; stdcall;
-{$EXTERNALSYM GlobalAddAtom}
-
-function GlobalFindAtomA(lpString: LPCSTR): ATOM; stdcall;
-{$EXTERNALSYM GlobalFindAtomA}
-function GlobalFindAtomW(lpString: LPCWSTR): ATOM; stdcall;
-{$EXTERNALSYM GlobalFindAtomW}
-function GlobalFindAtom(lpString: LPCTSTR): ATOM; stdcall;
-{$EXTERNALSYM GlobalFindAtom}
-
-function GlobalGetAtomNameA(nAtom: ATOM; lpBuffer: LPSTR; nSize: Integer): UINT; stdcall;
-{$EXTERNALSYM GlobalGetAtomNameA}
-function GlobalGetAtomNameW(nAtom: ATOM; lpBuffer: LPWSTR; nSize: Integer): UINT; stdcall;
-{$EXTERNALSYM GlobalGetAtomNameW}
-function GlobalGetAtomName(nAtom: ATOM; lpBuffer: LPTSTR; nSize: Integer): UINT; stdcall;
-{$EXTERNALSYM GlobalGetAtomName}
-
-function AddAtomA(lpString: LPCSTR): ATOM; stdcall;
-{$EXTERNALSYM AddAtomA}
-function AddAtomW(lpString: LPCWSTR): ATOM; stdcall;
-{$EXTERNALSYM AddAtomW}
-function AddAtom(lpString: LPCTSTR): ATOM; stdcall;
-{$EXTERNALSYM AddAtom}
-
-function FindAtomA(lpString: LPCSTR): ATOM; stdcall;
-{$EXTERNALSYM FindAtomA}
-function FindAtomW(lpString: LPCWSTR): ATOM; stdcall;
-{$EXTERNALSYM FindAtomW}
-function FindAtom(lpString: LPCTSTR): ATOM; stdcall;
-{$EXTERNALSYM FindAtom}
-
-function GetAtomNameA(nAtom: ATOM; lpBuffer: LPSTR; nSize: Integer): UINT; stdcall;
-{$EXTERNALSYM GetAtomNameA}
-function GetAtomNameW(nAtom: ATOM; lpBuffer: LPWSTR; nSize: Integer): UINT; stdcall;
-{$EXTERNALSYM GetAtomNameW}
-function GetAtomName(nAtom: ATOM; lpBuffer: LPTSTR; nSize: Integer): UINT; stdcall;
-{$EXTERNALSYM GetAtomName}
-
-function GetProfileIntA(lpAppName, lpKeyName: LPCSTR; nDefault: Integer): UINT; stdcall;
-{$EXTERNALSYM GetProfileIntA}
-function GetProfileIntW(lpAppName, lpKeyName: LPCWSTR; nDefault: Integer): UINT; stdcall;
-{$EXTERNALSYM GetProfileIntW}
-function GetProfileInt(lpAppName, lpKeyName: LPCTSTR; nDefault: Integer): UINT; stdcall;
-{$EXTERNALSYM GetProfileInt}
-
-function GetProfileStringA(lpAppName, lpKeyName, lpDefault: LPCSTR;
- lpReturnedString: LPSTR; nSize: DWORD): DWORD; stdcall;
-{$EXTERNALSYM GetProfileStringA}
-function GetProfileStringW(lpAppName, lpKeyName, lpDefault: LPCWSTR;
- lpReturnedString: LPWSTR; nSize: DWORD): DWORD; stdcall;
-{$EXTERNALSYM GetProfileStringW}
-function GetProfileString(lpAppName, lpKeyName, lpDefault: LPCTSTR;
- lpReturnedString: LPTSTR; nSize: DWORD): DWORD; stdcall;
-{$EXTERNALSYM GetProfileString}
-
-function WriteProfileStringA(lpAppName, lpKeyName, lpString: LPCSTR): BOOL; stdcall;
-{$EXTERNALSYM WriteProfileStringA}
-function WriteProfileStringW(lpAppName, lpKeyName, lpString: LPCWSTR): BOOL; stdcall;
-{$EXTERNALSYM WriteProfileStringW}
-function WriteProfileString(lpAppName, lpKeyName, lpString: LPCTSTR): BOOL; stdcall;
-{$EXTERNALSYM WriteProfileString}
-
-function GetProfileSectionA(lpAppName: LPCSTR; lpReturnedString: LPSTR;
- nSize: DWORD): DWORD; stdcall;
-{$EXTERNALSYM GetProfileSectionA}
-function GetProfileSectionW(lpAppName: LPCWSTR; lpReturnedString: LPWSTR;
- nSize: DWORD): DWORD; stdcall;
-{$EXTERNALSYM GetProfileSectionW}
-function GetProfileSection(lpAppName: LPCTSTR; lpReturnedString: LPTSTR;
- nSize: DWORD): DWORD; stdcall;
-{$EXTERNALSYM GetProfileSection}
-
-function WriteProfileSectionA(lpAppName, lpString: LPCSTR): BOOL; stdcall;
-{$EXTERNALSYM WriteProfileSectionA}
-function WriteProfileSectionW(lpAppName, lpString: LPCWSTR): BOOL; stdcall;
-{$EXTERNALSYM WriteProfileSectionW}
-function WriteProfileSection(lpAppName, lpString: LPCTSTR): BOOL; stdcall;
-{$EXTERNALSYM WriteProfileSection}
-
-function GetPrivateProfileIntA(lpAppName, lpKeyName: LPCSTR; nDefault: Integer;
- lpFileName: LPCSTR): UINT; stdcall;
-{$EXTERNALSYM GetPrivateProfileIntA}
-function GetPrivateProfileIntW(lpAppName, lpKeyName: LPCWSTR; nDefault: Integer;
- lpFileName: LPCWSTR): UINT; stdcall;
-{$EXTERNALSYM GetPrivateProfileIntW}
-function GetPrivateProfileInt(lpAppName, lpKeyName: LPCTSTR; nDefault: Integer;
- lpFileName: LPCTSTR): UINT; stdcall;
-{$EXTERNALSYM GetPrivateProfileInt}
-
-function GetPrivateProfileStringA(lpAppName, lpKeyName, lpDefault: LPCSTR;
- lpReturnedString: LPSTR; nSize: DWORD; lpFileName: LPCSTR): DWORD; stdcall;
-{$EXTERNALSYM GetPrivateProfileStringA}
-function GetPrivateProfileStringW(lpAppName, lpKeyName, lpDefault: LPCWSTR;
- lpReturnedString: LPWSTR; nSize: DWORD; lpFileName: LPCWSTR): DWORD; stdcall;
-{$EXTERNALSYM GetPrivateProfileStringW}
-function GetPrivateProfileString(lpAppName, lpKeyName, lpDefault: LPCTSTR;
- lpReturnedString: LPTSTR; nSize: DWORD; lpFileName: LPCTSTR): DWORD; stdcall;
-{$EXTERNALSYM GetPrivateProfileString}
-
-function WritePrivateProfileStringA(lpAppName, lpKeyName, lpString,
- lpFileName: LPCSTR): BOOL; stdcall;
-{$EXTERNALSYM WritePrivateProfileStringA}
-function WritePrivateProfileStringW(lpAppName, lpKeyName, lpString,
- lpFileName: LPCWSTR): BOOL; stdcall;
-{$EXTERNALSYM WritePrivateProfileStringW}
-function WritePrivateProfileString(lpAppName, lpKeyName, lpString,
- lpFileName: LPCTSTR): BOOL; stdcall;
-{$EXTERNALSYM WritePrivateProfileString}
-
-function GetPrivateProfileSectionA(lpAppName: LPCSTR; lpReturnedString: LPSTR;
- nSize: DWORD; lpFileName: LPCSTR): DWORD; stdcall;
-{$EXTERNALSYM GetPrivateProfileSectionA}
-function GetPrivateProfileSectionW(lpAppName: LPCWSTR; lpReturnedString: LPWSTR;
- nSize: DWORD; lpFileName: LPCWSTR): DWORD; stdcall;
-{$EXTERNALSYM GetPrivateProfileSectionW}
-function GetPrivateProfileSection(lpAppName: LPCTSTR; lpReturnedString: LPTSTR;
- nSize: DWORD; lpFileName: LPCTSTR): DWORD; stdcall;
-{$EXTERNALSYM GetPrivateProfileSection}
-
-function WritePrivateProfileSectionA(lpAppName, lpString, lpFileName: LPCSTR): BOOL; stdcall;
-{$EXTERNALSYM WritePrivateProfileSectionA}
-function WritePrivateProfileSectionW(lpAppName, lpString, lpFileName: LPCWSTR): BOOL; stdcall;
-{$EXTERNALSYM WritePrivateProfileSectionW}
-function WritePrivateProfileSection(lpAppName, lpString, lpFileName: LPCTSTR): BOOL; stdcall;
-{$EXTERNALSYM WritePrivateProfileSection}
-
-function GetPrivateProfileSectionNamesA(lpszReturnBuffer: LPSTR; nSize: DWORD;
- lpFileName: LPCSTR): DWORD; stdcall;
-{$EXTERNALSYM GetPrivateProfileSectionNamesA}
-function GetPrivateProfileSectionNamesW(lpszReturnBuffer: LPWSTR; nSize: DWORD;
- lpFileName: LPCWSTR): DWORD; stdcall;
-{$EXTERNALSYM GetPrivateProfileSectionNamesW}
-function GetPrivateProfileSectionNames(lpszReturnBuffer: LPTSTR; nSize: DWORD;
- lpFileName: LPCTSTR): DWORD; stdcall;
-{$EXTERNALSYM GetPrivateProfileSectionNames}
-
-function GetPrivateProfileStructA(lpszSection, lpszKey: LPCSTR; lpStruct: LPVOID;
- uSizeStruct: UINT; szFile: LPCSTR): BOOL; stdcall;
-{$EXTERNALSYM GetPrivateProfileStructA}
-function GetPrivateProfileStructW(lpszSection, lpszKey: LPCWSTR; lpStruct: LPVOID;
- uSizeStruct: UINT; szFile: LPCWSTR): BOOL; stdcall;
-{$EXTERNALSYM GetPrivateProfileStructW}
-function GetPrivateProfileStruct(lpszSection, lpszKey: LPCTSTR; lpStruct: LPVOID;
- uSizeStruct: UINT; szFile: LPCTSTR): BOOL; stdcall;
-{$EXTERNALSYM GetPrivateProfileStruct}
-
-function WritePrivateProfileStructA(lpszSection, lpszKey: LPCSTR; lpStruct: LPVOID;
- uSizeStruct: UINT; szFile: LPCSTR): BOOL; stdcall;
-{$EXTERNALSYM WritePrivateProfileStructA}
-function WritePrivateProfileStructW(lpszSection, lpszKey: LPCWSTR; lpStruct: LPVOID;
- uSizeStruct: UINT; szFile: LPCWSTR): BOOL; stdcall;
-{$EXTERNALSYM WritePrivateProfileStructW}
-function WritePrivateProfileStruct(lpszSection, lpszKey: LPCTSTR; lpStruct: LPVOID;
- uSizeStruct: UINT; szFile: LPCTSTR): BOOL; stdcall;
-{$EXTERNALSYM WritePrivateProfileStruct}
-
-function GetDriveTypeA(lpRootPathName: LPCSTR): UINT; stdcall;
-{$EXTERNALSYM GetDriveTypeA}
-function GetDriveTypeW(lpRootPathName: LPCWSTR): UINT; stdcall;
-{$EXTERNALSYM GetDriveTypeW}
-function GetDriveType(lpRootPathName: LPCTSTR): UINT; stdcall;
-{$EXTERNALSYM GetDriveType}
-
-function GetSystemDirectoryA(lpBuffer: LPSTR; uSize: UINT): UINT; stdcall;
-{$EXTERNALSYM GetSystemDirectoryA}
-function GetSystemDirectoryW(lpBuffer: LPWSTR; uSize: UINT): UINT; stdcall;
-{$EXTERNALSYM GetSystemDirectoryW}
-function GetSystemDirectory(lpBuffer: LPTSTR; uSize: UINT): UINT; stdcall;
-{$EXTERNALSYM GetSystemDirectory}
-
-function GetTempPathA(nBufferLength: DWORD; lpBuffer: LPSTR): DWORD; stdcall;
-{$EXTERNALSYM GetTempPathA}
-function GetTempPathW(nBufferLength: DWORD; lpBuffer: LPWSTR): DWORD; stdcall;
-{$EXTERNALSYM GetTempPathW}
-function GetTempPath(nBufferLength: DWORD; lpBuffer: LPTSTR): DWORD; stdcall;
-{$EXTERNALSYM GetTempPath}
-
-function GetTempFileNameA(lpPathName, lpPrefixString: LPCSTR; uUnique: UINT;
- lpTempFileName: LPSTR): UINT; stdcall;
-{$EXTERNALSYM GetTempFileNameA}
-function GetTempFileNameW(lpPathName, lpPrefixString: LPCWSTR; uUnique: UINT;
- lpTempFileName: LPWSTR): UINT; stdcall;
-{$EXTERNALSYM GetTempFileNameW}
-function GetTempFileName(lpPathName, lpPrefixString: LPCTSTR; uUnique: UINT;
- lpTempFileName: LPTSTR): UINT; stdcall;
-{$EXTERNALSYM GetTempFileName}
-
-function GetWindowsDirectoryA(lpBuffer: LPSTR; uSize: UINT): UINT; stdcall;
-{$EXTERNALSYM GetWindowsDirectoryA}
-function GetWindowsDirectoryW(lpBuffer: LPWSTR; uSize: UINT): UINT; stdcall;
-{$EXTERNALSYM GetWindowsDirectoryW}
-function GetWindowsDirectory(lpBuffer: LPTSTR; uSize: UINT): UINT; stdcall;
-{$EXTERNALSYM GetWindowsDirectory}
-
-function GetSystemWindowsDirectoryA(lpBuffer: LPSTR; uSize: UINT): UINT; stdcall;
-{$EXTERNALSYM GetSystemWindowsDirectoryA}
-function GetSystemWindowsDirectoryW(lpBuffer: LPWSTR; uSize: UINT): UINT; stdcall;
-{$EXTERNALSYM GetSystemWindowsDirectoryW}
-function GetSystemWindowsDirectory(lpBuffer: LPTSTR; uSize: UINT): UINT; stdcall;
-{$EXTERNALSYM GetSystemWindowsDirectory}
-
-function GetSystemWow64DirectoryA(lpBuffer: LPSTR; uSize: UINT): UINT; stdcall;
-{$EXTERNALSYM GetSystemWow64DirectoryA}
-function GetSystemWow64DirectoryW(lpBuffer: LPWSTR; uSize: UINT): UINT; stdcall;
-{$EXTERNALSYM GetSystemWow64DirectoryW}
-function GetSystemWow64Directory(lpBuffer: LPTSTR; uSize: UINT): UINT; stdcall;
-{$EXTERNALSYM GetSystemWow64Directory}
-
-function Wow64EnableWow64FsRedirection(Wow64FsEnableRedirection: BOOL): BOOL; stdcall;
-{$EXTERNALSYM Wow64EnableWow64FsRedirection}
-
-//
-// for GetProcAddress
-//
-
-type
- PGET_SYSTEM_WOW64_DIRECTORY_A = function(lpBuffer: LPSTR; uSize: UINT): UINT; stdcall;
- {$EXTERNALSYM PGET_SYSTEM_WOW64_DIRECTORY_A}
- PGET_SYSTEM_WOW64_DIRECTORY_W = function(lpBuffer: LPWSTR; uSize: UINT): UINT; stdcall;
- {$EXTERNALSYM PGET_SYSTEM_WOW64_DIRECTORY_W}
-
-//
-// GetProcAddress only accepts GET_SYSTEM_WOW64_DIRECTORY_NAME_A_A,
-// GET_SYSTEM_WOW64_DIRECTORY_NAME_W_A, GET_SYSTEM_WOW64_DIRECTORY_NAME_T_A.
-// The others are if you want to use the strings in some other way.
-//
-
-const
- GET_SYSTEM_WOW64_DIRECTORY_NAME_A_A = 'GetSystemWow64DirectoryA';
- {$EXTERNALSYM GET_SYSTEM_WOW64_DIRECTORY_NAME_A_A}
- GET_SYSTEM_WOW64_DIRECTORY_NAME_A_W = WideString('GetSystemWow64DirectoryA');
- {$EXTERNALSYM GET_SYSTEM_WOW64_DIRECTORY_NAME_A_W}
- GET_SYSTEM_WOW64_DIRECTORY_NAME_A_T = __TEXT('GetSystemWow64DirectoryA');
- {$EXTERNALSYM GET_SYSTEM_WOW64_DIRECTORY_NAME_A_T}
- GET_SYSTEM_WOW64_DIRECTORY_NAME_W_A = 'GetSystemWow64DirectoryW';
- {$EXTERNALSYM GET_SYSTEM_WOW64_DIRECTORY_NAME_W_A}
- GET_SYSTEM_WOW64_DIRECTORY_NAME_W_W = WideString('GetSystemWow64DirectoryW');
- {$EXTERNALSYM GET_SYSTEM_WOW64_DIRECTORY_NAME_W_W}
- GET_SYSTEM_WOW64_DIRECTORY_NAME_W_T = __TEXT('GetSystemWow64DirectoryW');
- {$EXTERNALSYM GET_SYSTEM_WOW64_DIRECTORY_NAME_W_T}
-
- {$IFDEF UNICODE}
- GET_SYSTEM_WOW64_DIRECTORY_NAME_T_A = GET_SYSTEM_WOW64_DIRECTORY_NAME_W_A;
- {$EXTERNALSYM GET_SYSTEM_WOW64_DIRECTORY_NAME_T_A}
- GET_SYSTEM_WOW64_DIRECTORY_NAME_T_W = GET_SYSTEM_WOW64_DIRECTORY_NAME_W_W;
- {$EXTERNALSYM GET_SYSTEM_WOW64_DIRECTORY_NAME_T_W}
- GET_SYSTEM_WOW64_DIRECTORY_NAME_T_T = GET_SYSTEM_WOW64_DIRECTORY_NAME_W_T;
- {$EXTERNALSYM GET_SYSTEM_WOW64_DIRECTORY_NAME_T_T}
- {$ELSE}
- GET_SYSTEM_WOW64_DIRECTORY_NAME_T_A = GET_SYSTEM_WOW64_DIRECTORY_NAME_A_A;
- {$EXTERNALSYM GET_SYSTEM_WOW64_DIRECTORY_NAME_T_A}
- GET_SYSTEM_WOW64_DIRECTORY_NAME_T_W = GET_SYSTEM_WOW64_DIRECTORY_NAME_A_W;
- {$EXTERNALSYM GET_SYSTEM_WOW64_DIRECTORY_NAME_T_W}
- GET_SYSTEM_WOW64_DIRECTORY_NAME_T_T = GET_SYSTEM_WOW64_DIRECTORY_NAME_A_T;
- {$EXTERNALSYM GET_SYSTEM_WOW64_DIRECTORY_NAME_T_T}
- {$ENDIF UNICODE}
-
-function SetCurrentDirectoryA(lpPathName: LPCSTR): BOOL; stdcall;
-{$EXTERNALSYM SetCurrentDirectoryA}
-function SetCurrentDirectoryW(lpPathName: LPCWSTR): BOOL; stdcall;
-{$EXTERNALSYM SetCurrentDirectoryW}
-function SetCurrentDirectory(lpPathName: LPCTSTR): BOOL; stdcall;
-{$EXTERNALSYM SetCurrentDirectory}
-
-function GetCurrentDirectoryA(nBufferLength: DWORD; lpBuffer: LPSTR): DWORD; stdcall;
-{$EXTERNALSYM GetCurrentDirectoryA}
-function GetCurrentDirectoryW(nBufferLength: DWORD; lpBuffer: LPWSTR): DWORD; stdcall;
-{$EXTERNALSYM GetCurrentDirectoryW}
-function GetCurrentDirectory(nBufferLength: DWORD; lpBuffer: LPTSTR): DWORD; stdcall;
-{$EXTERNALSYM GetCurrentDirectory}
-
-//#if _WIN32_WINNT >= 0x0502
-
-function SetDllDirectoryA(lpPathName: LPCSTR): BOOL; stdcall;
-{$EXTERNALSYM SetDllDirectoryA}
-function SetDllDirectoryW(lpPathName: LPCWSTR): BOOL; stdcall;
-{$EXTERNALSYM SetDllDirectoryW}
-function SetDllDirectory(lpPathName: LPCTSTR): BOOL; stdcall;
-{$EXTERNALSYM SetDllDirectory}
-
-function GetDllDirectoryA(nBufferLength: DWORD; lpBuffer: LPSTR): DWORD; stdcall;
-{$EXTERNALSYM GetDllDirectoryA}
-function GetDllDirectoryW(nBufferLength: DWORD; lpBuffer: LPWSTR): DWORD; stdcall;
-{$EXTERNALSYM GetDllDirectoryW}
-function GetDllDirectory(nBufferLength: DWORD; lpBuffer: LPTSTR): DWORD; stdcall;
-{$EXTERNALSYM GetDllDirectory}
-
-//#endif // _WIN32_WINNT >= 0x0502
-
-function GetDiskFreeSpaceA(lpRootPathName: LPCSTR; var lpSectorsPerCluster,
- lpBytesPerSector, lpNumberOfFreeClusters, lpTotalNumberOfClusters: DWORD): BOOL; stdcall;
-{$EXTERNALSYM GetDiskFreeSpaceA}
-function GetDiskFreeSpaceW(lpRootPathName: LPCWSTR; var lpSectorsPerCluster,
- lpBytesPerSector, lpNumberOfFreeClusters, lpTotalNumberOfClusters: DWORD): BOOL; stdcall;
-{$EXTERNALSYM GetDiskFreeSpaceW}
-function GetDiskFreeSpace(lpRootPathName: LPCTSTR; var lpSectorsPerCluster,
- lpBytesPerSector, lpNumberOfFreeClusters, lpTotalNumberOfClusters: DWORD): BOOL; stdcall;
-{$EXTERNALSYM GetDiskFreeSpace}
-
-function GetDiskFreeSpaceExA(lpDirectoryName: LPCSTR; var lpFreeBytesAvailableToCaller,
- lpTotalNumberOfBytes: ULARGE_INTEGER; lpTotalNumberOfFreeBytes: PULARGE_INTEGER): BOOL; stdcall;
-{$EXTERNALSYM GetDiskFreeSpaceExA}
-function GetDiskFreeSpaceExW(lpDirectoryName: LPCWSTR; var lpFreeBytesAvailableToCaller,
- lpTotalNumberOfBytes: ULARGE_INTEGER; lpTotalNumberOfFreeBytes: PULARGE_INTEGER): BOOL; stdcall;
-{$EXTERNALSYM GetDiskFreeSpaceExW}
-function GetDiskFreeSpaceEx(lpDirectoryName: LPCTSTR; var lpFreeBytesAvailableToCaller,
- lpTotalNumberOfBytes: ULARGE_INTEGER; lpTotalNumberOfFreeBytes: PULARGE_INTEGER): BOOL; stdcall;
-{$EXTERNALSYM GetDiskFreeSpaceEx}
-
-function CreateDirectoryA(lpPathName: LPCSTR; lpSecurityAttributes: LPSECURITY_ATTRIBUTES): BOOL; stdcall;
-{$EXTERNALSYM CreateDirectoryA}
-function CreateDirectoryW(lpPathName: LPCWSTR; lpSecurityAttributes: LPSECURITY_ATTRIBUTES): BOOL; stdcall;
-{$EXTERNALSYM CreateDirectoryW}
-function CreateDirectory(lpPathName: LPCTSTR; lpSecurityAttributes: LPSECURITY_ATTRIBUTES): BOOL; stdcall;
-{$EXTERNALSYM CreateDirectory}
-
-function CreateDirectoryExA(lpTemplateDirectory: LPCSTR; lpNewDirectory: LPCSTR;
- lpSecurityAttributes: LPSECURITY_ATTRIBUTES): BOOL; stdcall;
-{$EXTERNALSYM CreateDirectoryExA}
-function CreateDirectoryExW(lpTemplateDirectory: LPCWSTR; lpNewDirectory: LPCWSTR;
- lpSecurityAttributes: LPSECURITY_ATTRIBUTES): BOOL; stdcall;
-{$EXTERNALSYM CreateDirectoryExW}
-function CreateDirectoryEx(lpTemplateDirectory: LPCTSTR; lpNewDirectory: LPCTSTR;
- lpSecurityAttributes: LPSECURITY_ATTRIBUTES): BOOL; stdcall;
-{$EXTERNALSYM CreateDirectoryEx}
-
-function RemoveDirectoryA(lpPathName: LPCSTR): BOOL; stdcall;
-{$EXTERNALSYM RemoveDirectoryA}
-function RemoveDirectoryW(lpPathName: LPCWSTR): BOOL; stdcall;
-{$EXTERNALSYM RemoveDirectoryW}
-function RemoveDirectory(lpPathName: LPCTSTR): BOOL; stdcall;
-{$EXTERNALSYM RemoveDirectory}
-
-function GetFullPathNameA(lpFileName: LPCSTR; nBufferLength: DWORD;
- lpBuffer: LPSTR; var lpFilePart: LPSTR): DWORD; stdcall;
-{$EXTERNALSYM GetFullPathNameA}
-function GetFullPathNameW(lpFileName: LPCWSTR; nBufferLength: DWORD;
- lpBuffer: LPWSTR; var lpFilePart: LPWSTR): DWORD; stdcall;
-{$EXTERNALSYM GetFullPathNameA}
-function GetFullPathName(lpFileName: LPCTSTR; nBufferLength: DWORD;
- lpBuffer: LPTSTR; var lpFilePart: LPTSTR): DWORD; stdcall;
-{$EXTERNALSYM GetFullPathName}
-
-const
- DDD_RAW_TARGET_PATH = $00000001;
- {$EXTERNALSYM DDD_RAW_TARGET_PATH}
- DDD_REMOVE_DEFINITION = $00000002;
- {$EXTERNALSYM DDD_REMOVE_DEFINITION}
- DDD_EXACT_MATCH_ON_REMOVE = $00000004;
- {$EXTERNALSYM DDD_EXACT_MATCH_ON_REMOVE}
- DDD_NO_BROADCAST_SYSTEM = $00000008;
- {$EXTERNALSYM DDD_NO_BROADCAST_SYSTEM}
- DDD_LUID_BROADCAST_DRIVE = $00000010;
- {$EXTERNALSYM DDD_LUID_BROADCAST_DRIVE}
-
-function DefineDosDeviceA(dwFlags: DWORD; lpDeviceName, lpTargetPath: LPCSTR): BOOL; stdcall;
-{$EXTERNALSYM DefineDosDeviceA}
-function DefineDosDeviceW(dwFlags: DWORD; lpDeviceName, lpTargetPath: LPCWSTR): BOOL; stdcall;
-{$EXTERNALSYM DefineDosDeviceW}
-function DefineDosDevice(dwFlags: DWORD; lpDeviceName, lpTargetPath: LPCTSTR): BOOL; stdcall;
-{$EXTERNALSYM DefineDosDevice}
-
-function QueryDosDeviceA(lpDeviceName, lpTargetPath: LPSTR; ucchMax: DWORD): DWORD; stdcall;
-{$EXTERNALSYM QueryDosDeviceA}
-function QueryDosDeviceW(lpDeviceName, lpTargetPath: LPWSTR; ucchMax: DWORD): DWORD; stdcall;
-{$EXTERNALSYM QueryDosDeviceW}
-function QueryDosDevice(lpDeviceName, lpTargetPath: LPTSTR; ucchMax: DWORD): DWORD; stdcall;
-{$EXTERNALSYM QueryDosDevice}
-
-function CreateFileA(lpFileName: LPCSTR; dwDesiredAccess, dwShareMode: DWORD;
- lpSecurityAttributes: LPSECURITY_ATTRIBUTES; dwCreationDisposition: DWORD;
- dwFlagsAndAttributes: DWORD; hTemplateFile: HANDLE): HANDLE; stdcall;
-{$EXTERNALSYM CreateFileA}
-function CreateFileW(lpFileName: LPCWSTR; dwDesiredAccess, dwShareMode: DWORD;
- lpSecurityAttributes: LPSECURITY_ATTRIBUTES; dwCreationDisposition: DWORD;
- dwFlagsAndAttributes: DWORD; hTemplateFile: HANDLE): HANDLE; stdcall;
-{$EXTERNALSYM CreateFileW}
-function CreateFile(lpFileName: LPCTSTR; dwDesiredAccess, dwShareMode: DWORD;
- lpSecurityAttributes: LPSECURITY_ATTRIBUTES; dwCreationDisposition: DWORD;
- dwFlagsAndAttributes: DWORD; hTemplateFile: HANDLE): HANDLE; stdcall;
-{$EXTERNALSYM CreateFile}
-
-function ReOpenFile(hOriginalFile: HANDLE; dwDesiredAccess, dwShareMode, dwFlagsAndAttributes: DWORD): HANDLE; stdcall;
-{$EXTERNALSYM ReOpenFile}
-
-function SetFileAttributesA(lpFileName: LPCSTR; dwFileAttributes: DWORD): BOOL; stdcall;
-{$EXTERNALSYM SetFileAttributesA}
-function SetFileAttributesW(lpFileName: LPCWSTR; dwFileAttributes: DWORD): BOOL; stdcall;
-{$EXTERNALSYM SetFileAttributesW}
-function SetFileAttributes(lpFileName: LPCTSTR; dwFileAttributes: DWORD): BOOL; stdcall;
-{$EXTERNALSYM SetFileAttributes}
-
-function GetFileAttributesA(lpFileName: LPCSTR): DWORD; stdcall;
-{$EXTERNALSYM GetFileAttributesA}
-function GetFileAttributesW(lpFileName: LPCWSTR): DWORD; stdcall;
-{$EXTERNALSYM GetFileAttributesW}
-function GetFileAttributes(lpFileName: LPCTSTR): DWORD; stdcall;
-{$EXTERNALSYM GetFileAttributes}
-
-type
- _GET_FILEEX_INFO_LEVELS = (GetFileExInfoStandard, GetFileExMaxInfoLevel);
- {$EXTERNALSYM _GET_FILEEX_INFO_LEVELS}
- GET_FILEEX_INFO_LEVELS = _GET_FILEEX_INFO_LEVELS;
- {$EXTERNALSYM GET_FILEEX_INFO_LEVELS}
- TGetFileExInfoLevels = GET_FILEEX_INFO_LEVELS;
-
-function GetFileAttributesExA(lpFileName: LPCSTR;
- fInfoLevelId: GET_FILEEX_INFO_LEVELS; lpFileInformation: LPVOID): BOOL; stdcall;
-{$EXTERNALSYM GetFileAttributesExA}
-function GetFileAttributesExW(lpFileName: LPCWSTR;
- fInfoLevelId: GET_FILEEX_INFO_LEVELS; lpFileInformation: LPVOID): BOOL; stdcall;
-{$EXTERNALSYM GetFileAttributesExW}
-function GetFileAttributesEx(lpFileName: LPCTSTR;
- fInfoLevelId: GET_FILEEX_INFO_LEVELS; lpFileInformation: LPVOID): BOOL; stdcall;
-{$EXTERNALSYM GetFileAttributesEx}
-
-function GetCompressedFileSizeA(lpFileName: LPCSTR; lpFileSizeHigh: LPDWORD): DWORD; stdcall;
-{$EXTERNALSYM GetCompressedFileSizeA}
-function GetCompressedFileSizeW(lpFileName: LPCWSTR; lpFileSizeHigh: LPDWORD): DWORD; stdcall;
-{$EXTERNALSYM GetCompressedFileSizeW}
-function GetCompressedFileSize(lpFileName: LPCTSTR; lpFileSizeHigh: LPDWORD): DWORD; stdcall;
-{$EXTERNALSYM GetCompressedFileSize}
-
-function DeleteFileA(lpFileName: LPCSTR): BOOL; stdcall;
-{$EXTERNALSYM DeleteFileA}
-function DeleteFileW(lpFileName: LPCWSTR): BOOL; stdcall;
-{$EXTERNALSYM DeleteFileW}
-function DeleteFile(lpFileName: LPCTSTR): BOOL; stdcall;
-{$EXTERNALSYM DeleteFile}
-
-(* todo
-WINBASEAPI
-BOOL
-WINAPI
-CheckNameLegalDOS8Dot3A(
- IN LPCSTR lpName,
- OUT LPSTR lpOemName OPTIONAL,
- IN DWORD OemNameSize OPTIONAL,
- OUT PBOOL pbNameContainsSpaces OPTIONAL,
- OUT PBOOL pbNameLegal
- );
-WINBASEAPI
-BOOL
-WINAPI
-CheckNameLegalDOS8Dot3W(
- IN LPCWSTR lpName,
- OUT LPSTR lpOemName OPTIONAL,
- IN DWORD OemNameSize OPTIONAL,
- OUT PBOOL pbNameContainsSpaces OPTIONAL,
- OUT PBOOL pbNameLegal
- );
-#ifdef UNICODE
-#define CheckNameLegalDOS8Dot3 CheckNameLegalDOS8Dot3W
-#else
-#define CheckNameLegalDOS8Dot3 CheckNameLegalDOS8Dot3A
-#endif // !UNICODE
-*)
-
-type
- _FINDEX_INFO_LEVELS = (FindExInfoStandard, FindExInfoMaxInfoLevel);
- {$EXTERNALSYM _FINDEX_INFO_LEVELS}
- FINDEX_INFO_LEVELS = _FINDEX_INFO_LEVELS;
- {$EXTERNALSYM FINDEX_INFO_LEVELS}
- TFindExInfoLevels = FINDEX_INFO_LEVELS;
-
- _FINDEX_SEARCH_OPS = (
- FindExSearchNameMatch,
- FindExSearchLimitToDirectories,
- FindExSearchLimitToDevices,
- FindExSearchMaxSearchOp);
- {$EXTERNALSYM _FINDEX_SEARCH_OPS}
- FINDEX_SEARCH_OPS = _FINDEX_SEARCH_OPS;
- {$EXTERNALSYM FINDEX_SEARCH_OPS}
- TFindExSearchOps = FINDEX_SEARCH_OPS;
-
-const
- FIND_FIRST_EX_CASE_SENSITIVE = $00000001;
- {$EXTERNALSYM FIND_FIRST_EX_CASE_SENSITIVE}
-
-function FindFirstFileExA(lpFileName: LPCSTR; fInfoLevelId: FINDEX_INFO_LEVELS;
- lpFindFileData: LPVOID; fSearchOp: FINDEX_SEARCH_OPS; lpSearchFilter: LPVOID;
- dwAdditionalFlags: DWORD): HANDLE; stdcall;
-{$EXTERNALSYM FindFirstFileExA}
-function FindFirstFileExW(lpFileName: LPCWSTR; fInfoLevelId: FINDEX_INFO_LEVELS;
- lpFindFileData: LPVOID; fSearchOp: FINDEX_SEARCH_OPS; lpSearchFilter: LPVOID;
- dwAdditionalFlags: DWORD): HANDLE; stdcall;
-{$EXTERNALSYM FindFirstFileExW}
-function FindFirstFileEx(lpFileName: LPCTSTR; fInfoLevelId: FINDEX_INFO_LEVELS;
- lpFindFileData: LPVOID; fSearchOp: FINDEX_SEARCH_OPS; lpSearchFilter: LPVOID;
- dwAdditionalFlags: DWORD): HANDLE; stdcall;
-{$EXTERNALSYM FindFirstFileEx}
-
-function FindFirstFileA(lpFileName: LPCSTR; var lpFindFileData: WIN32_FIND_DATAA): HANDLE; stdcall;
-{$EXTERNALSYM FindFirstFileA}
-function FindFirstFileW(lpFileName: LPCWSTR; var lpFindFileData: WIN32_FIND_DATAW): HANDLE; stdcall;
-{$EXTERNALSYM FindFirstFileW}
-function FindFirstFile(lpFileName: LPCTSTR; var lpFindFileData: WIN32_FIND_DATA): HANDLE; stdcall;
-{$EXTERNALSYM FindFirstFile}
-
-function FindNextFileA(hFindFile: HANDLE; var FindFileData: WIN32_FIND_DATAA): BOOL; stdcall;
-{$EXTERNALSYM FindNextFileA}
-function FindNextFileW(hFindFile: HANDLE; var lpFindFileData: WIN32_FIND_DATAW): BOOL; stdcall;
-{$EXTERNALSYM FindNextFileW}
-function FindNextFile(hFindFile: HANDLE; var lpFindFileData: WIN32_FIND_DATA): BOOL; stdcall;
-{$EXTERNALSYM FindNextFile}
-
-function SearchPathA(lpPath, lpFileName, lpExtension: LPCSTR; nBufferLength: DWORD;
- lpBuffer: LPSTR; var lpFilePart: LPSTR): DWORD; stdcall;
-{$EXTERNALSYM SearchPathA}
-function SearchPathW(lpPath, lpFileName, lpExtension: LPCWSTR; nBufferLength: DWORD;
- lpBuffer: LPWSTR; var lpFilePart: LPWSTR): DWORD; stdcall;
-{$EXTERNALSYM SearchPathW}
-function SearchPath(lpPath, lpFileName, lpExtension: LPCTSTR; nBufferLength: DWORD;
- lpBuffer: LPTSTR; var lpFilePart: LPTSTR): DWORD; stdcall;
-{$EXTERNALSYM SearchPath}
-
-function CopyFileA(lpExistingFileName, lpNewFileName: LPCSTR; bFailIfExists: BOOL): BOOL; stdcall;
-{$EXTERNALSYM CopyFileA}
-function CopyFileW(lpExistingFileName, lpNewFileName: LPCWSTR; bFailIfExists: BOOL): BOOL; stdcall;
-{$EXTERNALSYM CopyFileW}
-function CopyFile(lpExistingFileName, lpNewFileName: LPCTSTR; bFailIfExists: BOOL): BOOL; stdcall;
-{$EXTERNALSYM CopyFile}
-
-type
- LPPROGRESS_ROUTINE = function(
- TotalFileSize: LARGE_INTEGER;
- TotalBytesTransferred: LARGE_INTEGER;
- StreamSize: LARGE_INTEGER;
- StreamBytesTransferred: LARGE_INTEGER;
- dwStreamNumber: DWORD;
- dwCallbackReason: DWORD;
- hSourceFile: HANDLE;
- hDestinationFile: HANDLE;
- lpData: LPVOID): DWORD; stdcall;
- {$EXTERNALSYM LPPROGRESS_ROUTINE}
- TProgressRoutine = LPPROGRESS_ROUTINE;
-
-function CopyFileExA(lpExistingFileName, lpNewFileName: LPCSTR;
- lpProgressRoutine: LPPROGRESS_ROUTINE; lpData: LPVOID; var pbCancel: BOOL;
- dwCopyFlags: DWORD): BOOL; stdcall;
-{$EXTERNALSYM CopyFileExA}
-function CopyFileExW(lpExistingFileName, lpNewFileName: LPCWSTR;
- lpProgressRoutine: LPPROGRESS_ROUTINE; lpData: LPVOID; var pbCancel: BOOL;
- dwCopyFlags: DWORD): BOOL; stdcall;
-{$EXTERNALSYM CopyFileExW}
-function CopyFileEx(lpExistingFileName, lpNewFileName: LPCTSTR;
- lpProgressRoutine: LPPROGRESS_ROUTINE; lpData: LPVOID; var pbCancel: BOOL;
- dwCopyFlags: DWORD): BOOL; stdcall;
-{$EXTERNALSYM CopyFileEx}
-
-function MoveFileA(lpExistingFileName, lpNewFileName: LPCSTR): BOOL; stdcall;
-{$EXTERNALSYM MoveFileA}
-function MoveFileW(lpExistingFileName, lpNewFileName: LPCWSTR): BOOL; stdcall;
-{$EXTERNALSYM MoveFileW}
-function MoveFile(lpExistingFileName, lpNewFileName: LPCTSTR): BOOL; stdcall;
-{$EXTERNALSYM MoveFile}
-
-function MoveFileExA(lpExistingFileName, lpNewFileName: LPCSTR; dwFlags: DWORD): BOOL; stdcall;
-{$EXTERNALSYM MoveFileExA}
-function MoveFileExW(lpExistingFileName, lpNewFileName: LPCWSTR; dwFlags: DWORD): BOOL; stdcall;
-{$EXTERNALSYM MoveFileExW}
-function MoveFileEx(lpExistingFileName, lpNewFileName: LPCTSTR; dwFlags: DWORD): BOOL; stdcall;
-{$EXTERNALSYM MoveFileEx}
-
-function MoveFileWithProgressA(lpExistingFileName, lpNewFileName: LPCSTR;
- lpProgressRoutine: LPPROGRESS_ROUTINE; lpData: LPVOID; dwFlags: DWORD): BOOL; stdcall;
-{$EXTERNALSYM MoveFileWithProgressA}
-function MoveFileWithProgressW(lpExistingFileName, lpNewFileName: LPCWSTR;
- lpProgressRoutine: LPPROGRESS_ROUTINE; lpData: LPVOID; dwFlags: DWORD): BOOL; stdcall;
-{$EXTERNALSYM MoveFileWithProgressW}
-function MoveFileWithProgress(lpExistingFileName, lpNewFileName: LPCTSTR;
- lpProgressRoutine: LPPROGRESS_ROUTINE; lpData: LPVOID; dwFlags: DWORD): BOOL; stdcall;
-{$EXTERNALSYM MoveFileWithProgress}
-
-const
- MOVEFILE_REPLACE_EXISTING = $00000001;
- {$EXTERNALSYM MOVEFILE_REPLACE_EXISTING}
- MOVEFILE_COPY_ALLOWED = $00000002;
- {$EXTERNALSYM MOVEFILE_COPY_ALLOWED}
- MOVEFILE_DELAY_UNTIL_REBOOT = $00000004;
- {$EXTERNALSYM MOVEFILE_DELAY_UNTIL_REBOOT}
- MOVEFILE_WRITE_THROUGH = $00000008;
- {$EXTERNALSYM MOVEFILE_WRITE_THROUGH}
- MOVEFILE_CREATE_HARDLINK = $00000010;
- {$EXTERNALSYM MOVEFILE_CREATE_HARDLINK}
- MOVEFILE_FAIL_IF_NOT_TRACKABLE = $00000020;
- {$EXTERNALSYM MOVEFILE_FAIL_IF_NOT_TRACKABLE}
-
-function ReplaceFileA(lpReplacedFileName, lpReplacementFileName,
- lpBackupFileName: LPCSTR; dwReplaceFlags: DWORD; lpExclude: LPVOID;
- lpReserved: LPVOID): BOOL; stdcall;
-{$EXTERNALSYM ReplaceFileA}
-function ReplaceFileW(lpReplacedFileName, lpReplacementFileName,
- lpBackupFileName: LPCWSTR; dwReplaceFlags: DWORD; lpExclude: LPVOID;
- lpReserved: LPVOID): BOOL; stdcall;
-{$EXTERNALSYM ReplaceFileW}
-function ReplaceFile(lpReplacedFileName, lpReplacementFileName,
- lpBackupFileName: LPCTSTR; dwReplaceFlags: DWORD; lpExclude: LPVOID;
- lpReserved: LPVOID): BOOL; stdcall;
-{$EXTERNALSYM ReplaceFile}
-
-//
-// API call to create hard links.
-//
-
-function CreateHardLinkA(lpFileName, lpExistingFileName: LPCSTR;
- lpSecurityAttributes: LPSECURITY_ATTRIBUTES): BOOL; stdcall;
-{$EXTERNALSYM CreateHardLinkA}
-function CreateHardLinkW(lpFileName, lpExistingFileName: LPCWSTR;
- lpSecurityAttributes: LPSECURITY_ATTRIBUTES): BOOL; stdcall;
-{$EXTERNALSYM CreateHardLinkW}
-function CreateHardLink(lpFileName, lpExistingFileName: LPCTSTR;
- lpSecurityAttributes: LPSECURITY_ATTRIBUTES): BOOL; stdcall;
-{$EXTERNALSYM CreateHardLink}
-
-//#if (_WIN32_WINNT >= 0x0501)
-
-//
-// API call to enumerate for streams within a file
-//
-
-type
- _STREAM_INFO_LEVELS = (FindStreamInfoStandard, FindStreamInfoMaxInfoLevel);
- {$EXTERNALSYM _STREAM_INFO_LEVELS}
- STREAM_INFO_LEVELS = _STREAM_INFO_LEVELS;
- {$EXTERNALSYM STREAM_INFO_LEVELS}
- TStreamInfoLevels = STREAM_INFO_LEVELS;
-
- _WIN32_FIND_STREAM_DATA = record
- StreamSize: LARGE_INTEGER;
- cStreamName: array [0..MAX_PATH + 35] of WCHAR;
- end;
- {$EXTERNALSYM _WIN32_FIND_STREAM_DATA}
- WIN32_FIND_STREAM_DATA = _WIN32_FIND_STREAM_DATA;
- {$EXTERNALSYM WIN32_FIND_STREAM_DATA}
- PWIN32_FIND_STREAM_DATA = ^WIN32_FIND_STREAM_DATA;
- {$EXTERNALSYM PWIN32_FIND_STREAM_DATA}
- TWin32FindStreamData = WIN32_FIND_STREAM_DATA;
- PWin32FindStreamData = PWIN32_FIND_STREAM_DATA;
-
-function FindFirstStreamW(lpFileName: LPCWSTR; InfoLevel: STREAM_INFO_LEVELS; lpFindStreamData: LPVOID; dwFlags: DWORD): HANDLE; stdcall;
-{$EXTERNALSYM FindFirstStreamW}
-
-function FindNextStreamW(hFindStream: HANDLE; lpFindStreamData: LPVOID): BOOL; stdcall;
-{$EXTERNALSYM FindNextStreamW}
-
-//#endif // (_WIN32_WINNT >= 0x0500)
-
-function CreateNamedPipeA(lpName: LPCSTR; dwOpenMode, dwPipeMode, nMaxInstances,
- nOutBufferSize, nInBufferSize, nDefaultTimeOut: DWORD;
- lpSecurityAttributes: LPSECURITY_ATTRIBUTES): HANDLE; stdcall;
-{$EXTERNALSYM CreateNamedPipeA}
-function CreateNamedPipeW(lpName: LPCWSTR; dwOpenMode, dwPipeMode, nMaxInstances,
- nOutBufferSize, nInBufferSize, nDefaultTimeOut: DWORD;
- lpSecurityAttributes: LPSECURITY_ATTRIBUTES): HANDLE; stdcall;
-{$EXTERNALSYM CreateNamedPipeW}
-function CreateNamedPipe(lpName: LPCTSTR; dwOpenMode, dwPipeMode, nMaxInstances,
- nOutBufferSize, nInBufferSize, nDefaultTimeOut: DWORD;
- lpSecurityAttributes: LPSECURITY_ATTRIBUTES): HANDLE; stdcall;
-{$EXTERNALSYM CreateNamedPipe}
-
-function GetNamedPipeHandleStateA(hNamedPipe: HANDLE; lpState, lpCurInstances,
- lpMaxCollectionCount, lpCollectDataTimeout: LPDWORD; lpUserName: LPSTR;
- nMaxUserNameSize: DWORD): BOOL; stdcall;
-{$EXTERNALSYM GetNamedPipeHandleStateA}
-function GetNamedPipeHandleStateW(hNamedPipe: HANDLE; lpState, lpCurInstances,
- lpMaxCollectionCount, lpCollectDataTimeout: LPDWORD; lpUserName: LPWSTR;
- nMaxUserNameSize: DWORD): BOOL; stdcall;
-{$EXTERNALSYM GetNamedPipeHandleStateW}
-function GetNamedPipeHandleState(hNamedPipe: HANDLE; lpState, lpCurInstances,
- lpMaxCollectionCount, lpCollectDataTimeout: LPDWORD; lpUserName: LPTSTR;
- nMaxUserNameSize: DWORD): BOOL; stdcall;
-{$EXTERNALSYM GetNamedPipeHandleState}
-
-function CallNamedPipeA(lpNamedPipeName: LPCSTR; lpInBuffer: LPVOID;
- nInBufferSize: DWORD; lpOutBuffer: LPVOID; nOutBufferSize: DWORD;
- var lpBytesRead: DWORD; nTimeOut: DWORD): BOOL; stdcall;
-{$EXTERNALSYM CallNamedPipeA}
-function CallNamedPipeW(lpNamedPipeName: LPCWSTR; lpInBuffer: LPVOID;
- nInBufferSize: DWORD; lpOutBuffer: LPVOID; nOutBufferSize: DWORD;
- var lpBytesRead: DWORD; nTimeOut: DWORD): BOOL; stdcall;
-{$EXTERNALSYM CallNamedPipeW}
-function CallNamedPipe(lpNamedPipeName: LPCTSTR; lpInBuffer: LPVOID;
- nInBufferSize: DWORD; lpOutBuffer: LPVOID; nOutBufferSize: DWORD;
- var lpBytesRead: DWORD; nTimeOut: DWORD): BOOL; stdcall;
-{$EXTERNALSYM CallNamedPipe}
-
-function WaitNamedPipeA(lpNamedPipeName: LPCSTR; nTimeOut: DWORD): BOOL; stdcall;
-{$EXTERNALSYM WaitNamedPipeA}
-function WaitNamedPipeW(lpNamedPipeName: LPCWSTR; nTimeOut: DWORD): BOOL; stdcall;
-{$EXTERNALSYM WaitNamedPipeW}
-function WaitNamedPipe(lpNamedPipeName: LPCTSTR; nTimeOut: DWORD): BOOL; stdcall;
-{$EXTERNALSYM WaitNamedPipe}
-
-function SetVolumeLabelA(lpRootPathName, lpVolumeName: LPCSTR): BOOL; stdcall;
-{$EXTERNALSYM SetVolumeLabelA}
-function SetVolumeLabelW(lpRootPathName, lpVolumeName: LPCWSTR): BOOL; stdcall;
-{$EXTERNALSYM SetVolumeLabelW}
-function SetVolumeLabel(lpRootPathName, lpVolumeName: LPCTSTR): BOOL; stdcall;
-{$EXTERNALSYM SetVolumeLabel}
-
-procedure SetFileApisToOEM; stdcall;
-{$EXTERNALSYM SetFileApisToOEM}
-
-procedure SetFileApisToANSI; stdcall;
-{$EXTERNALSYM SetFileApisToANSI}
-
-function AreFileApisANSI: BOOL; stdcall;
-{$EXTERNALSYM AreFileApisANSI}
-
-function GetVolumeInformationA(lpRootPathName: LPCSTR; lpVolumeNameBuffer: LPSTR;
- nVolumeNameSize: DWORD; lpVolumeSerialNumber: LPDWORD;
- var lpMaximumComponentLength, lpFileSystemFlags: DWORD;
- lpFileSystemNameBuffer: LPSTR; nFileSystemNameSize: DWORD): BOOL; stdcall;
-{$EXTERNALSYM GetVolumeInformationA}
-function GetVolumeInformationW(lpRootPathName: LPCWSTR; lpVolumeNameBuffer: LPWSTR;
- nVolumeNameSize: DWORD; lpVolumeSerialNumber: LPDWORD;
- var lpMaximumComponentLength, lpFileSystemFlags: DWORD;
- lpFileSystemNameBuffer: LPWSTR; nFileSystemNameSize: DWORD): BOOL; stdcall;
-{$EXTERNALSYM GetVolumeInformationW}
-function GetVolumeInformation(lpRootPathName: LPCTSTR; lpVolumeNameBuffer: LPTSTR;
- nVolumeNameSize: DWORD; lpVolumeSerialNumber: LPDWORD;
- var lpMaximumComponentLength, lpFileSystemFlags: DWORD;
- lpFileSystemNameBuffer: LPTSTR; nFileSystemNameSize: DWORD): BOOL; stdcall;
-{$EXTERNALSYM GetVolumeInformation}
-
-function CancelIo(hFile: HANDLE): BOOL; stdcall;
-{$EXTERNALSYM CancelIo}
-
-//
-// Event logging APIs
-//
-
-function ClearEventLogA(hEventLog: HANDLE; lpBackupFileName: LPCSTR): BOOL; stdcall;
-{$EXTERNALSYM ClearEventLogA}
-function ClearEventLogW(hEventLog: HANDLE; lpBackupFileName: LPCWSTR): BOOL; stdcall;
-{$EXTERNALSYM ClearEventLogW}
-function ClearEventLog(hEventLog: HANDLE; lpBackupFileName: LPCTSTR): BOOL; stdcall;
-{$EXTERNALSYM ClearEventLogA}
-
-function BackupEventLogA(hEventLog: HANDLE; lpBackupFileName: LPCSTR): BOOL; stdcall;
-{$EXTERNALSYM BackupEventLogA}
-function BackupEventLogW(hEventLog: HANDLE; lpBackupFileName: LPCWSTR): BOOL; stdcall;
-{$EXTERNALSYM BackupEventLogW}
-function BackupEventLog(hEventLog: HANDLE; lpBackupFileName: LPCTSTR): BOOL; stdcall;
-{$EXTERNALSYM BackupEventLogA}
-
-function CloseEventLog(hEventLog: HANDLE): BOOL; stdcall;
-{$EXTERNALSYM CloseEventLog}
-
-function DeregisterEventSource(hEventLog: HANDLE): BOOL; stdcall;
-{$EXTERNALSYM DeregisterEventSource}
-
-function NotifyChangeEventLog(hEventLog, hEvent: HANDLE): BOOL; stdcall;
-{$EXTERNALSYM NotifyChangeEventLog}
-
-function GetNumberOfEventLogRecords(hEventLog: HANDLE; var NumberOfRecords: DWORD): BOOL; stdcall;
-{$EXTERNALSYM GetNumberOfEventLogRecords}
-
-function GetOldestEventLogRecord(hEventLog: HANDLE; var OldestRecord: DWORD): BOOL; stdcall;
-{$EXTERNALSYM GetOldestEventLogRecord}
-
-function OpenEventLogA(lpUNCServerName, lpSourceName: LPCSTR): HANDLE; stdcall;
-{$EXTERNALSYM OpenEventLogA}
-function OpenEventLogW(lpUNCServerName, lpSourceName: LPCWSTR): HANDLE; stdcall;
-{$EXTERNALSYM OpenEventLogW}
-function OpenEventLog(lpUNCServerName, lpSourceName: LPCTSTR): HANDLE; stdcall;
-{$EXTERNALSYM OpenEventLogA}
-
-function RegisterEventSourceA(lpUNCServerName, lpSourceName: LPCSTR): HANDLE; stdcall;
-{$EXTERNALSYM RegisterEventSourceA}
-function RegisterEventSourceW(lpUNCServerName, lpSourceName: LPCWSTR): HANDLE; stdcall;
-{$EXTERNALSYM RegisterEventSourceW}
-function RegisterEventSource(lpUNCServerName, lpSourceName: LPCTSTR): HANDLE; stdcall;
-{$EXTERNALSYM RegisterEventSourceA}
-
-function OpenBackupEventLogA(lpUNCServerName, lpFileName: LPCSTR): HANDLE; stdcall;
-{$EXTERNALSYM OpenBackupEventLogA}
-function OpenBackupEventLogW(lpUNCServerName, lpFileName: LPCWSTR): HANDLE; stdcall;
-{$EXTERNALSYM OpenBackupEventLogW}
-function OpenBackupEventLog(lpUNCServerName, lpFileName: LPCTSTR): HANDLE; stdcall;
-{$EXTERNALSYM OpenBackupEventLogA}
-
-function ReadEventLogA(hEventLog: HANDLE; dwReadFlags, dwRecordOffset: DWORD;
- lpBuffer: LPVOID; nNumberOfBytesToRead: DWORD;
- var pnBytesRead, pnMinNumberOfBytesNeeded: DWORD): BOOL; stdcall;
-{$EXTERNALSYM ReadEventLogA}
-function ReadEventLogW(hEventLog: HANDLE; dwReadFlags, dwRecordOffset: DWORD;
- lpBuffer: LPVOID; nNumberOfBytesToRead: DWORD;
- var pnBytesRead, pnMinNumberOfBytesNeeded: DWORD): BOOL; stdcall;
-{$EXTERNALSYM ReadEventLogW}
-function ReadEventLog(hEventLog: HANDLE; dwReadFlags, dwRecordOffset: DWORD;
- lpBuffer: LPVOID; nNumberOfBytesToRead: DWORD;
- var pnBytesRead, pnMinNumberOfBytesNeeded: DWORD): BOOL; stdcall;
-{$EXTERNALSYM ReadEventLog}
-
-function ReportEventA(hEventLog: HANDLE; wType, wCategory: WORD; dwEventID: DWORD;
- lpUserSid: PSID; wNumStrings: WORD; dwDataSize: DWORD; lpStrings: LPCSTR;
- lpRawData: LPVOID): BOOL; stdcall;
-{$EXTERNALSYM ReportEventA}
-function ReportEventW(hEventLog: HANDLE; wType, wCategory: WORD; dwEventID: DWORD;
- lpUserSid: PSID; wNumStrings: WORD; dwDataSize: DWORD; lpStrings: LPCWSTR;
- lpRawData: LPVOID): BOOL; stdcall;
-{$EXTERNALSYM ReportEventW}
-function ReportEvent(hEventLog: HANDLE; wType, wCategory: WORD; dwEventID: DWORD;
- lpUserSid: PSID; wNumStrings: WORD; dwDataSize: DWORD; lpStrings: LPCTSTR;
- lpRawData: LPVOID): BOOL; stdcall;
-{$EXTERNALSYM ReportEvent}
-
-const
- EVENTLOG_FULL_INFO = 0;
- {$EXTERNALSYM EVENTLOG_FULL_INFO}
-
-type
- LPEVENTLOG_FULL_INFORMATION = ^EVENTLOG_FULL_INFORMATION;
- {$EXTERNALSYM LPEVENTLOG_FULL_INFORMATION}
- _EVENTLOG_FULL_INFORMATION = record
- dwFull: DWORD;
- end;
- {$EXTERNALSYM _EVENTLOG_FULL_INFORMATION}
- EVENTLOG_FULL_INFORMATION = _EVENTLOG_FULL_INFORMATION;
- {$EXTERNALSYM EVENTLOG_FULL_INFORMATION}
- TEventlogFullInformation = EVENTLOG_FULL_INFORMATION;
- PEventlogFullInformation = LPEVENTLOG_FULL_INFORMATION;
-
-function GetEventLogInformation(hEventLog: HANDLE; dwInfoLevel: DWORD;
- lpBuffer: LPVOID; cbBufSize: DWORD; var pcbBytesNeeded: DWORD): BOOL; stdcall;
-{$EXTERNALSYM GetEventLogInformation}
-
-//
-// Security APIs
-//
-
-function DuplicateToken(ExistingTokenHandle: HANDLE;
- ImpersonationLevel: SECURITY_IMPERSONATION_LEVEL; DuplicateTokenHandle: PHANDLE): BOOL; stdcall;
-{$EXTERNALSYM DuplicateToken}
-
-function GetKernelObjectSecurity(Handle: HANDLE;
- RequestedInformation: SECURITY_INFORMATION;
- pSecurityDescriptor: PSECURITY_DESCRIPTOR; nLength: DWORD;
- var lpnLengthNeeded: DWORD): BOOL; stdcall;
-{$EXTERNALSYM GetKernelObjectSecurity}
-
-function ImpersonateNamedPipeClient(hNamedPipe: HANDLE): BOOL; stdcall;
-{$EXTERNALSYM ImpersonateNamedPipeClient}
-
-function ImpersonateSelf(ImpersonationLevel: SECURITY_IMPERSONATION_LEVEL): BOOL; stdcall;
-{$EXTERNALSYM ImpersonateSelf}
-
-function RevertToSelf : BOOL; stdcall;
-{$EXTERNALSYM RevertToSelf}
-
-function SetThreadToken(Thread: PHANDLE; Token: HANDLE): BOOL; stdcall;
-{$EXTERNALSYM SetThreadToken}
-
-function AccessCheck(pSecurityDescriptor: PSECURITY_DESCRIPTOR;
- ClientToken: HANDLE; DesiredAccess: DWORD; const GenericMapping: GENERIC_MAPPING;
- var PrivilegeSet: PRIVILEGE_SET; var PrivilegeSetLength,
- GrantedAccess: DWORD; var AccessStatus: BOOL): BOOL; stdcall;
-{$EXTERNALSYM AccessCheck}
-
-function AccessCheckByType(pSecurityDescriptor: PSECURITY_DESCRIPTOR;
- PrincipalSelfSid: PSID; ClientToken: HANDLE; DesiredAccess: DWORD;
- ObjectTypeList: POBJECT_TYPE_LIST; ObjectTypeListLength: DWORD;
- const GenericMapping: GENERIC_MAPPING; var PrivilegeSet: PRIVILEGE_SET;
- var PrivilegeSetLength, GrantedAccess: DWORD; var AccessStatus: BOOL): BOOL; stdcall;
-{$EXTERNALSYM AccessCheckByType}
-
-function AccessCheckByTypeResultList(pSecurityDescriptor: PSECURITY_DESCRIPTOR;
- PrincipalSelfSid: PSID; ClientToken: HANDLE; DesiredAccess: DWORD;
- ObjectTypeList: POBJECT_TYPE_LIST; ObjectTypeListLength: DWORD;
- const GenericMapping: GENERIC_MAPPING; var PrivilegeSet: PRIVILEGE_SET;
- var PrivilegeSetLength, GrantedAccessList: DWORD;
- var AccessStatusList: DWORD): BOOL; stdcall;
-{$EXTERNALSYM AccessCheckByTypeResultList}
-
-function OpenProcessToken(ProcessHandle: HANDLE; DesiredAccess: DWORD;
- var TokenHandle: HANDLE): BOOL; stdcall;
-{$EXTERNALSYM OpenProcessToken}
-
-function OpenThreadToken(ThreadHandle: HANDLE; DesiredAccess: DWORD;
- OpenAsSelf: BOOL; var TokenHandle: HANDLE): BOOL; stdcall;
-{$EXTERNALSYM OpenThreadToken}
-
-function GetTokenInformation(TokenHandle: HANDLE;
- TokenInformationClass: TOKEN_INFORMATION_CLASS; TokenInformation: LPVOID;
- TokenInformationLength: DWORD; var ReturnLength: DWORD): BOOL; stdcall;
-{$EXTERNALSYM GetTokenInformation}
-
-function SetTokenInformation(TokenHandle: HANDLE;
- TokenInformationClass: TOKEN_INFORMATION_CLASS; TokenInformation: LPVOID;
- TokenInformationLength: DWORD): BOOL; stdcall;
-{$EXTERNALSYM SetTokenInformation}
-
-function AdjustTokenPrivileges(TokenHandle: HANDLE; DisableAllPrivileges: BOOL;
- NewState: PTOKEN_PRIVILEGES; BufferLength: DWORD;
- PreviousState: PTOKEN_PRIVILEGES; ReturnLength: LPDWORD): BOOL; stdcall;
-{$EXTERNALSYM AdjustTokenPrivileges}
-
-function AdjustTokenGroups(TokenHandle: HANDLE; ResetToDefault: BOOL;
- NewState: PTOKEN_GROUPS; BufferLength: DWORD; PreviousState: PTOKEN_GROUPS;
- ReturnLength: PDWORD): BOOL; stdcall;
-{$EXTERNALSYM AdjustTokenGroups}
-
-function PrivilegeCheck(ClientToken: HANDLE;
- RequiredPrivileges: PPRIVILEGE_SET; var pfResult: BOOL): BOOL; stdcall;
-{$EXTERNALSYM PrivilegeCheck}
-
-function AccessCheckAndAuditAlarmA(SubsystemName: LPCSTR; HandleId: LPVOID;
- ObjectTypeName, ObjectName: LPSTR; SecurityDescriptor: PSECURITY_DESCRIPTOR;
- DesiredAccess: DWORD; const GenericMapping: GENERIC_MAPPING;
- ObjectCreation: BOOL; var GrantedAccess: DWORD;
- var AccessStatus, pfGenerateOnClose: BOOL): BOOL; stdcall;
-{$EXTERNALSYM AccessCheckAndAuditAlarmA}
-function AccessCheckAndAuditAlarmW(SubsystemName: LPCWSTR; HandleId: LPVOID;
- ObjectTypeName, ObjectName: LPWSTR; SecurityDescriptor: PSECURITY_DESCRIPTOR;
- DesiredAccess: DWORD; const GenericMapping: GENERIC_MAPPING;
- ObjectCreation: BOOL; var GrantedAccess: DWORD;
- var AccessStatus, pfGenerateOnClose: BOOL): BOOL; stdcall;
-{$EXTERNALSYM AccessCheckAndAuditAlarmW}
-function AccessCheckAndAuditAlarm(SubsystemName: LPCTSTR; HandleId: LPVOID;
- ObjectTypeName, ObjectName: LPTSTR; SecurityDescriptor: PSECURITY_DESCRIPTOR;
- DesiredAccess: DWORD; const GenericMapping: GENERIC_MAPPING;
- ObjectCreation: BOOL; var GrantedAccess: DWORD;
- var AccessStatus, pfGenerateOnClose: BOOL): BOOL; stdcall;
-{$EXTERNALSYM AccessCheckAndAuditAlarmA}
-
-function AccessCheckByTypeAndAuditAlarmA(SubsystemName: LPCSTR; HandleId: LPVOID;
- ObjectTypeName: LPCSTR; ObjectName: LPCSTR; SecurityDescriptor: PSECURITY_DESCRIPTOR;
- PrincipalSelfSid: PSID; DesiredAccess: DWORD; AuditType: AUDIT_EVENT_TYPE;
- Flags: DWORD; ObjectTypeList: POBJECT_TYPE_LIST; ObjectTypeListLength: DWORD;
- GenericMapping: PGENERIC_MAPPING; ObjectCreation: BOOL; GrantedAccess: LPDWORD;
- AccessStatus: LPBOOL; pfGenerateOnClose: LPBOOL): BOOL; stdcall;
-{$EXTERNALSYM AccessCheckByTypeAndAuditAlarmA}
-function AccessCheckByTypeAndAuditAlarmW(SubsystemName: LPCWSTR; HandleId: LPVOID;
-ObjectTypeName: LPCWSTR; ObjectName: LPCWSTR; SecurityDescriptor: PSECURITY_DESCRIPTOR;
-PrincipalSelfSid: PSID; DesiredAccess: DWORD; AuditType: AUDIT_EVENT_TYPE;
-Flags: DWORD; ObjectTypeList: POBJECT_TYPE_LIST; ObjectTypeListLength: DWORD;
-GenericMapping: PGENERIC_MAPPING; ObjectCreation: BOOL; GrantedAccess: LPDWORD;
-AccessStatus: LPBOOL; pfGenerateOnClose: LPBOOL): BOOL; stdcall;
-{$EXTERNALSYM AccessCheckByTypeAndAuditAlarmW}
-function AccessCheckByTypeAndAuditAlarm(SubsystemName: LPCTSTR; HandleId: LPVOID;
- ObjectTypeName, ObjectName: LPCTSTR; SecurityDescriptor: PSECURITY_DESCRIPTOR;
- PrincipalSelfSid: PSID; DesiredAccess: DWORD; AuditType: AUDIT_EVENT_TYPE;
- Flags: DWORD; ObjectTypeList: POBJECT_TYPE_LIST; ObjectTypeListLength: DWORD;
- const GenericMapping: GENERIC_MAPPING; ObjectCreation: BOOL;
- var GrantedAccess: DWORD; var AccessStatus, pfGenerateOnClose: BOOL): BOOL; stdcall;
-{$EXTERNALSYM AccessCheckByTypeAndAuditAlarmA}
-
-function AccessCheckByTypeResultListAndAuditAlarmA(SubsystemName: LPCSTR;
- HandleId: LPVOID; ObjectTypeName, ObjectName: LPCSTR;
- SecurityDescriptor: PSECURITY_DESCRIPTOR; PrincipalSelfSid: PSID;
- DesiredAccess: DWORD; AuditType: AUDIT_EVENT_TYPE; Flags: DWORD;
- ObjectTypeList: POBJECT_TYPE_LIST; ObjectTypeListLength: DWORD;
- const GenericMapping: GENERIC_MAPPING; ObjectCreation: BOOL;
- var GrantedAccess, AccessStatusList: DWORD; var pfGenerateOnClose: BOOL): BOOL; stdcall;
-{$EXTERNALSYM AccessCheckByTypeResultListAndAuditAlarmA}
-function AccessCheckByTypeResultListAndAuditAlarmW(SubsystemName: LPCWSTR;
- HandleId: LPVOID; ObjectTypeName, ObjectName: LPCWSTR;
- SecurityDescriptor: PSECURITY_DESCRIPTOR; PrincipalSelfSid: PSID;
- DesiredAccess: DWORD; AuditType: AUDIT_EVENT_TYPE; Flags: DWORD;
- ObjectTypeList: POBJECT_TYPE_LIST; ObjectTypeListLength: DWORD;
- const GenericMapping: GENERIC_MAPPING; ObjectCreation: BOOL;
- var GrantedAccess, AccessStatusList: DWORD; var pfGenerateOnClose: BOOL): BOOL; stdcall;
-{$EXTERNALSYM AccessCheckByTypeResultListAndAuditAlarmW}
-function AccessCheckByTypeResultListAndAuditAlarm(SubsystemName: LPCTSTR;
- HandleId: LPVOID; ObjectTypeName, ObjectName: LPCTSTR;
- SecurityDescriptor: PSECURITY_DESCRIPTOR; PrincipalSelfSid: PSID;
- DesiredAccess: DWORD; AuditType: AUDIT_EVENT_TYPE; Flags: DWORD;
- ObjectTypeList: POBJECT_TYPE_LIST; ObjectTypeListLength: DWORD;
- const GenericMapping: GENERIC_MAPPING; ObjectCreation: BOOL;
- var GrantedAccess, AccessStatusList: DWORD; var pfGenerateOnClose: BOOL): BOOL; stdcall;
-{$EXTERNALSYM AccessCheckByTypeResultListAndAuditAlarmA}
-
-function AccessCheckByTypeResultListAndAuditAlarmByHandleA(SubsystemName: LPCSTR;
- HandleId: LPVOID; ClientToken: HANDLE; ObjectTypeName, ObjectName: LPCSTR;
- SecurityDescriptor: PSECURITY_DESCRIPTOR; PrincipalSelfSid: PSID;
- DesiredAccess: DWORD; AuditType: AUDIT_EVENT_TYPE; Flags: DWORD;
- ObjectTypeList: POBJECT_TYPE_LIST; ObjectTypeListLength: DWORD;
- const GenericMapping: GENERIC_MAPPING; ObjectCreation: BOOL;
- var GrantedAccess, AccessStatusList: DWORD; var pfGenerateOnClose: BOOL): BOOL; stdcall;
-{$EXTERNALSYM AccessCheckByTypeResultListAndAuditAlarmByHandleA}
-function AccessCheckByTypeResultListAndAuditAlarmByHandleW(SubsystemName: LPCWSTR;
- HandleId: LPVOID; ClientToken: HANDLE; ObjectTypeName, ObjectName: LPCWSTR;
- SecurityDescriptor: PSECURITY_DESCRIPTOR; PrincipalSelfSid: PSID;
- DesiredAccess: DWORD; AuditType: AUDIT_EVENT_TYPE; Flags: DWORD;
- ObjectTypeList: POBJECT_TYPE_LIST; ObjectTypeListLength: DWORD;
- const GenericMapping: PGENERIC_MAPPING; ObjectCreation: BOOL;
- var GrantedAccess, AccessStatusList: DWORD; var pfGenerateOnClose: BOOL): BOOL; stdcall;
-{$EXTERNALSYM AccessCheckByTypeResultListAndAuditAlarmByHandleW}
-function AccessCheckByTypeResultListAndAuditAlarmByHandle(SubsystemName: LPCTSTR;
- HandleId: LPVOID; ClientToken: HANDLE; ObjectTypeName, ObjectName: LPCTSTR;
- SecurityDescriptor: PSECURITY_DESCRIPTOR; PrincipalSelfSid: PSID;
- DesiredAccess: DWORD; AuditType: AUDIT_EVENT_TYPE; Flags: DWORD;
- ObjectTypeList: POBJECT_TYPE_LIST; ObjectTypeListLength: DWORD;
- const GenericMapping: PGENERIC_MAPPING; ObjectCreation: BOOL;
- var GrantedAccess, AccessStatusList: DWORD; var pfGenerateOnClose: BOOL): BOOL; stdcall;
-{$EXTERNALSYM AccessCheckByTypeResultListAndAuditAlarmByHandle}
-
-function ObjectOpenAuditAlarmA(SubsystemName: LPCSTR; HandleId: LPVOID;
- ObjectTypeName: LPSTR; ObjectName: LPSTR; pSecurityDescriptor: PSECURITY_DESCRIPTOR;
- ClientToken: HANDLE; DesiredAccess, GrantedAccess: DWORD;
- Privileges: PPRIVILEGE_SET; ObjectCreation: BOOL; AccessGranted: BOOL;
- var GenerateOnClose: BOOL): BOOL; stdcall;
-{$EXTERNALSYM ObjectOpenAuditAlarmA}
-function ObjectOpenAuditAlarmW(SubsystemName: LPCWSTR; HandleId: LPVOID;
- ObjectTypeName, ObjectName: LPWSTR; pSecurityDescriptor: PSECURITY_DESCRIPTOR;
- ClientToken: HANDLE; DesiredAccess: DWORD; GrantedAccess: DWORD;
- Privileges: PPRIVILEGE_SET; ObjectCreation: BOOL; AccessGranted: BOOL;
- var GenerateOnClose: BOOL): BOOL; stdcall;
-{$EXTERNALSYM ObjectOpenAuditAlarmW}
-function ObjectOpenAuditAlarm(SubsystemName: LPCTSTR; HandleId: LPVOID;
- ObjectTypeName: LPTSTR; ObjectName: LPTSTR; pSecurityDescriptor: PSECURITY_DESCRIPTOR;
- ClientToken: HANDLE; DesiredAccess: DWORD; GrantedAccess: DWORD;
- Privileges: PPRIVILEGE_SET; ObjectCreation: BOOL; AccessGranted: BOOL;
- var GenerateOnClose: BOOL): BOOL; stdcall;
-{$EXTERNALSYM ObjectOpenAuditAlarmA}
-
-function ObjectPrivilegeAuditAlarmA(SubsystemName: LPCSTR; HandleId: LPVOID;
- ClientToken: HANDLE; DesiredAccess: DWORD; const Privileges: PRIVILEGE_SET;
- AccessGranted: BOOL): BOOL; stdcall;
-{$EXTERNALSYM ObjectPrivilegeAuditAlarmA}
-function ObjectPrivilegeAuditAlarmW(SubsystemName: LPCWSTR; HandleId: LPVOID;
- ClientToken: HANDLE; DesiredAccess: DWORD; const Privileges: PRIVILEGE_SET;
- AccessGranted: BOOL): BOOL; stdcall;
-{$EXTERNALSYM ObjectPrivilegeAuditAlarmW}
-function ObjectPrivilegeAuditAlarm(SubsystemName: LPCTSTR; HandleId: LPVOID;
- ClientToken: HANDLE; DesiredAccess: DWORD; const Privileges: PRIVILEGE_SET;
- AccessGranted: BOOL): BOOL; stdcall;
-{$EXTERNALSYM ObjectPrivilegeAuditAlarmA}
-
-function ObjectCloseAuditAlarmA(SubsystemName: LPCSTR; HandleId: LPVOID;
- GenerateOnClose: BOOL): BOOL; stdcall;
-{$EXTERNALSYM ObjectCloseAuditAlarmA}
-function ObjectCloseAuditAlarmW(SubsystemName: LPCWSTR; HandleId: LPVOID;
- GenerateOnClose: BOOL): BOOL; stdcall;
-{$EXTERNALSYM ObjectCloseAuditAlarmW}
-function ObjectCloseAuditAlarm(SubsystemName: LPCTSTR; HandleId: LPVOID;
- GenerateOnClose: BOOL): BOOL; stdcall;
-{$EXTERNALSYM ObjectCloseAuditAlarmA}
-
-function ObjectDeleteAuditAlarmA(SubsystemName: LPCSTR; HandleId: LPVOID;
- GenerateOnClose: BOOL): BOOL; stdcall;
-{$EXTERNALSYM ObjectDeleteAuditAlarmA}
-function ObjectDeleteAuditAlarmW(SubsystemName: LPCWSTR; HandleId: LPVOID;
- GenerateOnClose: BOOL): BOOL; stdcall;
-{$EXTERNALSYM ObjectDeleteAuditAlarmW}
-function ObjectDeleteAuditAlarm(SubsystemName: LPCTSTR; HandleId: LPVOID;
- GenerateOnClose: BOOL): BOOL; stdcall;
-{$EXTERNALSYM ObjectDeleteAuditAlarmA}
-
-function PrivilegedServiceAuditAlarmA(SubsystemName, ServiceName: LPCSTR;
- ClientToken: HANDLE; const Privileges: PRIVILEGE_SET; AccessGranted: BOOL): BOOL; stdcall;
-{$EXTERNALSYM PrivilegedServiceAuditAlarmA}
-function PrivilegedServiceAuditAlarmW(SubsystemName, ServiceName: LPCWSTR;
- ClientToken: HANDLE; const Privileges: PRIVILEGE_SET; AccessGranted: BOOL): BOOL; stdcall;
-{$EXTERNALSYM PrivilegedServiceAuditAlarmW}
-function PrivilegedServiceAuditAlarm(SubsystemName, ServiceName: LPCTSTR;
- ClientToken: HANDLE; const Privileges: PRIVILEGE_SET; AccessGranted: BOOL): BOOL; stdcall;
-{$EXTERNALSYM PrivilegedServiceAuditAlarmA}
-
-function IsWellKnownSid(pSid: PSID; WellKnownSidType: WELL_KNOWN_SID_TYPE): BOOL; stdcall;
-{$EXTERNALSYM IsWellKnownSid}
-
-function CreateWellKnownSid(WellKnownSidType: WELL_KNOWN_SID_TYPE; DomainSid: PSID;
- pSid: PSID; var cbSid: DWORD): BOOL; stdcall;
-{$EXTERNALSYM CreateWellKnownSid}
-
-function EqualDomainSid(pSid1, pSid2: PSID; pfEqual: PBOOL): BOOL; stdcall;
-{$EXTERNALSYM EqualDomainSid}
-
-function GetWindowsAccountDomainSid(pSid, ppDomainSid: PSID; var cbSid: DWORD): BOOL; stdcall;
-{$EXTERNALSYM GetWindowsAccountDomainSid}
-
-function IsValidSid(pSid: PSID): BOOL; stdcall;
-{$EXTERNALSYM IsValidSid}
-
-function EqualSid(pSid1, pSid2: PSID): BOOL; stdcall;
-{$EXTERNALSYM EqualSid}
-
-function EqualPrefixSid(pSid1, pSid2: PSID): BOOL; stdcall;
-{$EXTERNALSYM EqualPrefixSid}
-
-function GetSidLengthRequired(nSubAuthorityCount: UCHAR): DWORD; stdcall;
-{$EXTERNALSYM GetSidLengthRequired}
-
-function AllocateAndInitializeSid(pIdentifierAuthority: PSID_IDENTIFIER_AUTHORITY;
- SubAuthorityCount: BYTE; nSubAuthority0, nSubAuthority1, nSubAuthority2,
- nSubAuthority3, nSubAuthority4, nSubAuthority5, nSubAuthority6,
- nSubAuthority7: DWORD; var pSid: PSID): BOOL; stdcall;
-{$EXTERNALSYM AllocateAndInitializeSid}
-
-function FreeSid(pSid: PSID): PVOID; stdcall;
-{$EXTERNALSYM FreeSid}
-
-function InitializeSid(Sid: PSID; pIdentifierAuthority: PSID_IDENTIFIER_AUTHORITY;
- nSubAuthorityCount: BYTE): BOOL; stdcall;
-{$EXTERNALSYM InitializeSid}
-
-function GetSidIdentifierAuthority(pSid: PSID): PSID_IDENTIFIER_AUTHORITY; stdcall;
-{$EXTERNALSYM GetSidIdentifierAuthority}
-
-function GetSidSubAuthority(pSid: PSID; nSubAuthority: DWORD): PDWORD; stdcall;
-{$EXTERNALSYM GetSidSubAuthority}
-
-function GetSidSubAuthorityCount(pSid: PSID): PUCHAR; stdcall;
-{$EXTERNALSYM GetSidSubAuthorityCount}
-
-function GetLengthSid(pSid: PSID): DWORD; stdcall;
-{$EXTERNALSYM GetLengthSid}
-
-function CopySid(nDestinationSidLength: DWORD; pDestinationSid: PSID;
- pSourceSid: PSID): BOOL; stdcall;
-{$EXTERNALSYM CopySid}
-
-function AreAllAccessesGranted(GrantedAccess, DesiredAccess: DWORD): BOOL; stdcall;
-{$EXTERNALSYM AreAllAccessesGranted}
-
-function AreAnyAccessesGranted(GrantedAccess, DesiredAccess: DWORD): BOOL; stdcall;
-{$EXTERNALSYM AreAnyAccessesGranted}
-
-procedure MapGenericMask(var AccessMask: DWORD; var GenericMapping: GENERIC_MAPPING); stdcall;
-{$EXTERNALSYM MapGenericMask}
-
-function IsValidAcl(pAcl: PACL): BOOL; stdcall;
-{$EXTERNALSYM IsValidAcl}
-
-function InitializeAcl(pAcl: PACL; nAclLength: DWORD; dwAclRevision: DWORD): BOOL; stdcall;
-{$EXTERNALSYM InitializeAcl}
-
-function GetAclInformation(pAcl: PACL; pAclInformation: LPVOID;
- nAclInformationLength: DWORD; dwAclInformationClass: ACL_INFORMATION_CLASS): BOOL; stdcall;
-{$EXTERNALSYM GetAclInformation}
-
-function SetAclInformation(pAcl: PACL; pAclInformation: LPVOID;
- nAclInformationLength: DWORD; dwAclInformationClass: ACL_INFORMATION_CLASS): BOOL; stdcall;
-{$EXTERNALSYM SetAclInformation}
-
-function AddAce(pAcl: PACL; dwAceRevision: DWORD; dwStartingAceIndex: DWORD;
- pAceList: LPVOID; nAceListLength: DWORD): BOOL; stdcall;
-{$EXTERNALSYM AddAce}
-
-function DeleteAce(pAcl: PACL; dwAceIndex: DWORD): BOOL; stdcall;
-{$EXTERNALSYM DeleteAce}
-
-function GetAce(pAcl: PACL; dwAceIndex: DWORD; var pAce: LPVOID): BOOL; stdcall;
-{$EXTERNALSYM GetAce}
-
-function AddAccessAllowedAce(pAcl: PACL; dwAceRevision, AccessMask: DWORD; pSid: PSID): BOOL; stdcall;
-{$EXTERNALSYM AddAccessAllowedAce}
-
-function AddAccessAllowedAceEx(pAcl: PACL; dwAceRevision, AceFlags,
- AccessMask: DWORD; pSid: PSID): BOOL; stdcall;
-{$EXTERNALSYM AddAccessAllowedAceEx}
-
-function AddAccessDeniedAce(pAcl: PACL; dwAceRevision, AccessMask: DWORD; pSid: PSID): BOOL; stdcall;
-{$EXTERNALSYM AddAccessDeniedAce}
-
-function AddAccessDeniedAceEx(pAcl: PACL; dwAceRevision, AceFlags: DWORD;
- AccessMask: DWORD; pSid: PSID): BOOL; stdcall;
-{$EXTERNALSYM AddAccessDeniedAceEx}
-
-function AddAuditAccessAce(pAcl: PACL; dwAceRevision, dwAccessMask: DWORD;
- pSid: PSID; bAuditSuccess, bAuditFailure: BOOL): BOOL; stdcall;
-{$EXTERNALSYM AddAuditAccessAce}
-
-function AddAuditAccessAceEx(pAcl: PACL; dwAceRevision, AceFlags,
- dwAccessMask: DWORD; pSid: PSID; bAuditSuccess, bAuditFailure: BOOL): BOOL; stdcall;
-{$EXTERNALSYM AddAuditAccessAceEx}
-
-function AddAccessAllowedObjectAce(pAcl: PACL; dwAceRevision, AceFlags,
- AccessMask: DWORD; ObjectTypeGuid, InheritedObjectTypeGuid: LPGUID; pSid: PSID): BOOL; stdcall;
-{$EXTERNALSYM AddAccessAllowedObjectAce}
-
-function AddAccessDeniedObjectAce(pAcl: PACL; dwAceRevision, AceFlags,
- AccessMask: DWORD; ObjectTypeGuid, InheritedObjectTypeGuid: LPGUID; pSid: PSID): BOOL; stdcall;
-{$EXTERNALSYM AddAccessDeniedObjectAce}
-
-function AddAuditAccessObjectAce(pAcl: PACL; dwAceRevision, AceFlags,
- AccessMask: DWORD; ObjectTypeGuid, InheritedObjectTypeGuid: LPGUID; pSid: PSID;
- bAuditSuccess, bAuditFailure: BOOL): BOOL; stdcall;
-{$EXTERNALSYM AddAuditAccessObjectAce}
-
-function FindFirstFreeAce(pAcl: PACL; var pAce: LPVOID): BOOL; stdcall;
-{$EXTERNALSYM FindFirstFreeAce}
-
-function InitializeSecurityDescriptor(pSecurityDescriptor: PSECURITY_DESCRIPTOR;
- dwRevision: DWORD): BOOL; stdcall;
-{$EXTERNALSYM InitializeSecurityDescriptor}
-
-function IsValidSecurityDescriptor(pSecurityDescriptor: PSECURITY_DESCRIPTOR): BOOL; stdcall;
-{$EXTERNALSYM IsValidSecurityDescriptor}
-
-function GetSecurityDescriptorLength(pSecurityDescriptor: PSECURITY_DESCRIPTOR): DWORD; stdcall;
-{$EXTERNALSYM GetSecurityDescriptorLength}
-
-function GetSecurityDescriptorControl(pSecurityDescriptor: PSECURITY_DESCRIPTOR;
- var pControl: SECURITY_DESCRIPTOR_CONTROL; var lpdwRevision: DWORD): BOOL; stdcall;
-{$EXTERNALSYM GetSecurityDescriptorControl}
-
-function SetSecurityDescriptorControl(pSecurityDescriptor: PSECURITY_DESCRIPTOR;
- ControlBitsOfInterest, ControlBitsToSet: SECURITY_DESCRIPTOR_CONTROL): BOOL; stdcall;
-{$EXTERNALSYM SetSecurityDescriptorControl}
-
-function SetSecurityDescriptorDacl(pSecurityDescriptor: PSECURITY_DESCRIPTOR;
- bDaclPresent: BOOL; pDacl: PACL; bDaclDefaulted: BOOL): BOOL; stdcall;
-{$EXTERNALSYM SetSecurityDescriptorDacl}
-
-function GetSecurityDescriptorDacl(pSecurityDescriptor: PSECURITY_DESCRIPTOR;
- var lpbDaclPresent: BOOL; var pDacl: PACL; var lpbDaclDefaulted: BOOL): BOOL; stdcall;
-{$EXTERNALSYM GetSecurityDescriptorDacl}
-
-function SetSecurityDescriptorSacl(pSecurityDescriptor: PSECURITY_DESCRIPTOR;
- bSaclPresent: BOOL; pSacl: PACL; bSaclDefaulted: BOOL): BOOL; stdcall;
-{$EXTERNALSYM SetSecurityDescriptorSacl}
-
-function GetSecurityDescriptorSacl(pSecurityDescriptor: PSECURITY_DESCRIPTOR;
- var lpbSaclPresent: BOOL; var pSacl: PACL; var lpbSaclDefaulted: BOOL): BOOL; stdcall;
-{$EXTERNALSYM GetSecurityDescriptorSacl}
-
-function SetSecurityDescriptorOwner(pSecurityDescriptor: PSECURITY_DESCRIPTOR;
- pOwner: PSID; bOwnerDefaulted: BOOL): BOOL; stdcall;
-{$EXTERNALSYM SetSecurityDescriptorOwner}
-
-function GetSecurityDescriptorOwner(pSecurityDescriptor: PSECURITY_DESCRIPTOR;
- var pOwner: PSID; lpbOwnerDefaulted: PBOOL): BOOL; stdcall;
-{$EXTERNALSYM GetSecurityDescriptorOwner}
-
-function SetSecurityDescriptorGroup(pSecurityDescriptor: PSECURITY_DESCRIPTOR;
- pGroup: PSID; bGroupDefaulted: BOOL): BOOL; stdcall;
-{$EXTERNALSYM SetSecurityDescriptorGroup}
-
-function GetSecurityDescriptorGroup(pSecurityDescriptor: PSECURITY_DESCRIPTOR;
- var pGroup: PSID; lpbGroupDefaulted: PBOOL): BOOL; stdcall;
-{$EXTERNALSYM GetSecurityDescriptorGroup}
-
-function SetSecurityDescriptorRMControl(SecurityDescriptor: PSECURITY_DESCRIPTOR;
- RMControl: PUCHAR): DWORD; stdcall;
-{$EXTERNALSYM SetSecurityDescriptorRMControl}
-
-function GetSecurityDescriptorRMControl(SecurityDescriptor: PSECURITY_DESCRIPTOR;
- var RMControl: UCHAR): DWORD; stdcall;
-{$EXTERNALSYM GetSecurityDescriptorRMControl}
-
-function CreatePrivateObjectSecurity(ParentDescriptor, CreatorDescriptor: PSECURITY_DESCRIPTOR;
- var NewDescriptor: PSECURITY_DESCRIPTOR; IsDirectoryObject: BOOL; Token: HANDLE;
- const GenericMapping: GENERIC_MAPPING): BOOL; stdcall;
-{$EXTERNALSYM CreatePrivateObjectSecurity}
-
-function ConvertToAutoInheritPrivateObjectSecurity(ParentDescriptor,
- CurrentSecurityDescriptor: PSECURITY_DESCRIPTOR;
- var NewSecurityDescriptor: PSECURITY_DESCRIPTOR; ObjectType: LPGUID;
- IsDirectoryObject: ByteBool; const GenericMapping: GENERIC_MAPPING): BOOL; stdcall;
-{$EXTERNALSYM ConvertToAutoInheritPrivateObjectSecurity}
-
-function CreatePrivateObjectSecurityEx(ParentDescriptor,
- CreatorDescriptor: PSECURITY_DESCRIPTOR;
- var NewDescriptor: PSECURITY_DESCRIPTOR; ObjectType: LPGUID;
- IsContainerObject: BOOL; AutoInheritFlags: ULONG; Token: HANDLE;
- const GenericMapping: GENERIC_MAPPING): BOOL; stdcall;
-{$EXTERNALSYM CreatePrivateObjectSecurityEx}
-
-function SetPrivateObjectSecurity(SecurityInformation: SECURITY_INFORMATION;
- ModificationDescriptor: PSECURITY_DESCRIPTOR;
- var ObjectsSecurityDescriptor: PSECURITY_DESCRIPTOR;
- const GenericMapping: GENERIC_MAPPING; Token: HANDLE): BOOL; stdcall;
-{$EXTERNALSYM SetPrivateObjectSecurity}
-
-function SetPrivateObjectSecurityEx(SecurityInformation: SECURITY_INFORMATION;
- ModificationDescriptor: PSECURITY_DESCRIPTOR;
- var ObjectsSecurityDescriptor: PSECURITY_DESCRIPTOR; AutoInheritFlags: ULONG;
- const GenericMapping: GENERIC_MAPPING; Token: HANDLE): BOOL; stdcall;
-{$EXTERNALSYM SetPrivateObjectSecurityEx}
-
-function GetPrivateObjectSecurity(ObjectDescriptor: PSECURITY_DESCRIPTOR;
- SecurityInformation: SECURITY_INFORMATION;
- ResultantDescriptor: PSECURITY_DESCRIPTOR; DescriptorLength: DWORD;
- var ReturnLength: DWORD): BOOL; stdcall;
-{$EXTERNALSYM GetPrivateObjectSecurity}
-
-function DestroyPrivateObjectSecurity(var ObjectDescriptor: PSECURITY_DESCRIPTOR): BOOL; stdcall;
-{$EXTERNALSYM DestroyPrivateObjectSecurity}
-
-function MakeSelfRelativeSD(pAbsoluteSecurityDescriptor: PSECURITY_DESCRIPTOR;
- pSelfRelativeSecurityDescriptor: PSECURITY_DESCRIPTOR; var lpdwBufferLength: DWORD): BOOL; stdcall;
-{$EXTERNALSYM MakeSelfRelativeSD}
-
-function MakeAbsoluteSD(pSelfRelativeSecurityDescriptor: PSECURITY_DESCRIPTOR;
- pAbsoluteSecurityDescriptor: PSECURITY_DESCRIPTOR;
- var lpdwAbsoluteSecurityDescriptorSize: DWORD; pDacl: PACL;
- var lpdwDaclSize: DWORD; pSacl: PACL; var lpdwSaclSize: DWORD; pOwner: PSID;
- var lpdwOwnerSize: DWORD; pPrimaryGroup: PSID; var lpdwPrimaryGroupSize: DWORD): BOOL; stdcall;
-{$EXTERNALSYM MakeAbsoluteSD}
-
-function MakeAbsoluteSD2(pSelfRelativeSecurityDescriptor: PSECURITY_DESCRIPTOR;
- var lpdwBufferSize: DWORD): BOOL; stdcall;
-{$EXTERNALSYM MakeAbsoluteSD2}
-
-function SetFileSecurityA(lpFileName: LPCSTR; SecurityInformation: SECURITY_INFORMATION;
- pSecurityDescriptor: PSECURITY_DESCRIPTOR): BOOL; stdcall;
-{$EXTERNALSYM SetFileSecurityA}
-function SetFileSecurityW(lpFileName: LPCWSTR; SecurityInformation: SECURITY_INFORMATION;
- pSecurityDescriptor: PSECURITY_DESCRIPTOR): BOOL; stdcall;
-{$EXTERNALSYM SetFileSecurityW}
-function SetFileSecurity(lpFileName: LPCTSTR; SecurityInformation: SECURITY_INFORMATION;
- pSecurityDescriptor: PSECURITY_DESCRIPTOR): BOOL; stdcall;
-{$EXTERNALSYM SetFileSecurityA}
-
-function GetFileSecurityA(lpFileName: LPCSTR; RequestedInformation: SECURITY_INFORMATION;
- pSecurityDescriptor: PSECURITY_DESCRIPTOR; nLength: DWORD;
- var lpnLengthNeeded: DWORD): BOOL; stdcall;
-{$EXTERNALSYM GetFileSecurityA}
-function GetFileSecurityW(lpFileName: LPCWSTR; RequestedInformation: SECURITY_INFORMATION;
- pSecurityDescriptor: PSECURITY_DESCRIPTOR; nLength: DWORD;
- var lpnLengthNeeded: DWORD): BOOL; stdcall;
-{$EXTERNALSYM GetFileSecurityW}
-function GetFileSecurity(lpFileName: LPCTSTR; RequestedInformation: SECURITY_INFORMATION;
- pSecurityDescriptor: PSECURITY_DESCRIPTOR; nLength: DWORD;
- var lpnLengthNeeded: DWORD): BOOL; stdcall;
-{$EXTERNALSYM GetFileSecurityA}
-
-function SetKernelObjectSecurity(Handle: HANDLE; SecurityInformation: SECURITY_INFORMATION;
- SecurityDescriptor: PSECURITY_DESCRIPTOR): BOOL; stdcall;
-{$EXTERNALSYM SetKernelObjectSecurity}
-
-function FindFirstChangeNotificationA(lpPathName: LPCSTR; bWatchSubtree: Cardinal;
- dwNotifyFilter: DWORD): HANDLE; stdcall;
-{$EXTERNALSYM FindFirstChangeNotificationA}
-function FindFirstChangeNotificationW(lpPathName: LPCWSTR; bWatchSubtree: Cardinal;
- dwNotifyFilter: DWORD): HANDLE; stdcall;
-{$EXTERNALSYM FindFirstChangeNotificationW}
-function FindFirstChangeNotification(lpPathName: LPCTSTR; bWatchSubtree: Cardinal;
- dwNotifyFilter: DWORD): HANDLE; stdcall;
-{$EXTERNALSYM FindFirstChangeNotification}
-
-function FindNextChangeNotification(hChangeHandle: HANDLE): BOOL; stdcall;
-{$EXTERNALSYM FindNextChangeNotification}
-
-function FindCloseChangeNotification(hChangeHandle: HANDLE): BOOL; stdcall;
-{$EXTERNALSYM FindCloseChangeNotification}
-
-function ReadDirectoryChangesW(hDirectory: HANDLE; lpBuffer: LPVOID;
- nBufferLength: DWORD; bWatchSubtree: BOOL; dwNotifyFilter: DWORD;
- lpBytesReturned: LPDWORD; lpOverlapped: LPOVERLAPPED;
- lpCompletionRoutine: LPOVERLAPPED_COMPLETION_ROUTINE): BOOL; stdcall;
-{$EXTERNALSYM ReadDirectoryChangesW}
-
-function VirtualLock(lpAddress: LPVOID; dwSize: SIZE_T): BOOL; stdcall;
-{$EXTERNALSYM VirtualLock}
-
-function VirtualUnlock(lpAddress: LPVOID; dwSize: SIZE_T): BOOL; stdcall;
-{$EXTERNALSYM VirtualUnlock}
-
-function MapViewOfFileEx(hFileMappingObject: HANDLE; dwDesiredAccess: DWORD;
- dwFileOffsetHigh: DWORD; dwFileOffsetLow: DWORD; dwNumberOfBytesToMap: SIZE_T;
- lpBaseAddress: LPVOID): LPVOID; stdcall;
-{$EXTERNALSYM MapViewOfFileEx}
-
-function SetPriorityClass(hProcess: HANDLE; dwPriorityClass: DWORD): BOOL; stdcall;
-{$EXTERNALSYM SetPriorityClass}
-
-function GetPriorityClass(hProcess: HANDLE): DWORD; stdcall;
-{$EXTERNALSYM GetPriorityClass}
-
-function IsBadReadPtr(lp: LPVOID; ucb: UINT_PTR): BOOL; stdcall;
-{$EXTERNALSYM IsBadReadPtr}
-
-function IsBadWritePtr(lp: LPVOID; ucb: UINT_PTR): BOOL; stdcall;
-{$EXTERNALSYM IsBadWritePtr}
-
-function IsBadHugeReadPtr(lp: LPVOID; ucb: UINT_PTR): BOOL; stdcall;
-{$EXTERNALSYM IsBadHugeReadPtr}
-
-function IsBadHugeWritePtr(lp: LPVOID; ucb: UINT_PTR): BOOL; stdcall;
-{$EXTERNALSYM IsBadHugeWritePtr}
-
-function IsBadCodePtr(lpfn: FARPROC): BOOL; stdcall;
-{$EXTERNALSYM IsBadCodePtr}
-
-function IsBadStringPtrA(lpsz: LPCSTR; ucchMax: UINT_PTR): BOOL; stdcall;
-{$EXTERNALSYM IsBadStringPtrA}
-function IsBadStringPtrW(lpsz: LPCWSTR; ucchMax: UINT_PTR): BOOL; stdcall;
-{$EXTERNALSYM IsBadStringPtrW}
-function IsBadStringPtr(lpsz: LPCTSTR; ucchMax: UINT_PTR): BOOL; stdcall;
-{$EXTERNALSYM IsBadStringPtr}
-
-function LookupAccountSidA(lpSystemName: LPCSTR; Sid: PSID; Name: LPSTR;
- var cchName: DWORD; ReferencedDomainName: LPSTR; var cchReferencedDomainName: DWORD;
- var peUse: SID_NAME_USE): BOOL; stdcall;
-{$EXTERNALSYM LookupAccountSidA}
-function LookupAccountSidW(lpSystemName: LPCWSTR; Sid: PSID; Name: LPWSTR;
- var cchName: DWORD; ReferencedDomainName: LPWSTR; var cchReferencedDomainName: DWORD;
- var peUse: SID_NAME_USE): BOOL; stdcall;
-{$EXTERNALSYM LookupAccountSidW}
-function LookupAccountSid(lpSystemName: LPCTSTR; Sid: PSID; Name: LPTSTR;
- var cchName: DWORD; ReferencedDomainName: LPTSTR; var cchReferencedDomainName: DWORD;
- var peUse: SID_NAME_USE): BOOL; stdcall;
-{$EXTERNALSYM LookupAccountSid}
-
-function LookupAccountNameA(lpSystemName, lpAccountName: LPCSTR; Sid: PSID;
- var cbSid: DWORD; ReferencedDomainName: LPSTR; var cchReferencedDomainName: DWORD;
- var peUse: SID_NAME_USE): BOOL; stdcall;
-{$EXTERNALSYM LookupAccountNameA}
-function LookupAccountNameW(lpSystemName, lpAccountName: LPCWSTR; Sid: PSID;
- var cbSid: DWORD; ReferencedDomainName: LPWSTR; var cchReferencedDomainName: DWORD;
- var peUse: SID_NAME_USE): BOOL; stdcall;
-{$EXTERNALSYM LookupAccountNameW}
-function LookupAccountName(lpSystemName: LPCTSTR; lpAccountName: LPCTSTR; Sid: PSID;
- var cbSid: DWORD; ReferencedDomainName: LPTSTR; var cchReferencedDomainName: DWORD;
- var peUse: SID_NAME_USE): BOOL; stdcall;
-{$EXTERNALSYM LookupAccountName}
-
-function LookupPrivilegeValueA(lpSystemName, lpName: LPCSTR; var lpLuid: LUID): BOOL; stdcall;
-{$EXTERNALSYM LookupPrivilegeValueA}
-function LookupPrivilegeValueW(lpSystemName, lpName: LPCWSTR; var lpLuid: LUID): BOOL; stdcall;
-{$EXTERNALSYM LookupPrivilegeValueW}
-function LookupPrivilegeValue(lpSystemName, lpName: LPCTSTR; var lpLuid: LUID): BOOL; stdcall;
-{$EXTERNALSYM LookupPrivilegeValue}
-
-function LookupPrivilegeNameA(lpSystemName: LPCSTR; const lpLuid: LUID;
- lpName: LPSTR; var cbName: DWORD): BOOL; stdcall;
-{$EXTERNALSYM LookupPrivilegeNameA}
-function LookupPrivilegeNameW(lpSystemName: LPCWSTR; const lpLuid: LUID;
- lpName: LPWSTR; var cbName: DWORD): BOOL; stdcall;
-{$EXTERNALSYM LookupPrivilegeNameW}
-function LookupPrivilegeName(lpSystemName: LPCTSTR; const lpLuid: LUID;
- lpName: LPTSTR; var cbName: DWORD): BOOL; stdcall;
-{$EXTERNALSYM LookupPrivilegeName}
-
-function LookupPrivilegeDisplayNameA(lpSystemName, lpName: LPCSTR;
- lpDisplayName: LPSTR; var cbDisplayName, lpLanguageId: DWORD): BOOL; stdcall;
-{$EXTERNALSYM LookupPrivilegeDisplayNameA}
-function LookupPrivilegeDisplayNameW(lpSystemName, lpName: LPCWSTR;
- lpDisplayName: LPWSTR; var cbDisplayName, lpLanguageId: DWORD): BOOL; stdcall;
-{$EXTERNALSYM LookupPrivilegeDisplayNameW}
-function LookupPrivilegeDisplayName(lpSystemName, lpName: LPCTSTR;
- lpDisplayName: LPTSTR; var cbDisplayName, lpLanguageId: DWORD): BOOL; stdcall;
-{$EXTERNALSYM LookupPrivilegeDisplayName}
-
-function AllocateLocallyUniqueId(var Luid: LUID): BOOL; stdcall;
-{$EXTERNALSYM AllocateLocallyUniqueId}
-
-function BuildCommDCBA(lpDef: LPCSTR; var lpDCB: DCB): BOOL; stdcall;
-{$EXTERNALSYM BuildCommDCBA}
-function BuildCommDCBW(lpDef: LPCWSTR; var lpDCB: DCB): BOOL; stdcall;
-{$EXTERNALSYM BuildCommDCBW}
-function BuildCommDCB(lpDef: LPCTSTR; var lpDCB: DCB): BOOL; stdcall;
-{$EXTERNALSYM BuildCommDCB}
-
-function BuildCommDCBAndTimeoutsA(lpDef: LPCSTR; var lpDCB: DCB;
- var lpCommTimeouts: COMMTIMEOUTS): BOOL; stdcall;
-{$EXTERNALSYM BuildCommDCBAndTimeoutsA}
-function BuildCommDCBAndTimeoutsW(lpDef: LPCWSTR; var lpDCB: DCB;
- var lpCommTimeouts: COMMTIMEOUTS): BOOL; stdcall;
-{$EXTERNALSYM BuildCommDCBAndTimeoutsW}
-function BuildCommDCBAndTimeouts(lpDef: LPCTSTR; var lpDCB: DCB;
- var lpCommTimeouts: COMMTIMEOUTS): BOOL; stdcall;
-{$EXTERNALSYM BuildCommDCBAndTimeouts}
-
-function CommConfigDialogA(lpszName: LPCSTR; hWnd: HWND; var lpCC: COMMCONFIG): BOOL; stdcall;
-{$EXTERNALSYM CommConfigDialogA}
-function CommConfigDialogW(lpszName: LPCWSTR; hWnd: HWND; var lpCC: COMMCONFIG): BOOL; stdcall;
-{$EXTERNALSYM CommConfigDialogW}
-function CommConfigDialog(lpszName: LPCTSTR; hWnd: HWND; var lpCC: COMMCONFIG): BOOL; stdcall;
-{$EXTERNALSYM CommConfigDialog}
-
-function GetDefaultCommConfigA(lpszName: LPCSTR; var lpCC: COMMCONFIG;
- var lpdwSize: DWORD): BOOL; stdcall;
-{$EXTERNALSYM GetDefaultCommConfigA}
-function GetDefaultCommConfigW(lpszName: LPCWSTR; var lpCC: COMMCONFIG;
- var lpdwSize: DWORD): BOOL; stdcall;
-{$EXTERNALSYM GetDefaultCommConfigW}
-function GetDefaultCommConfig(lpszName: LPCTSTR; var lpCC: COMMCONFIG;
- var lpdwSize: DWORD): BOOL; stdcall;
-{$EXTERNALSYM GetDefaultCommConfig}
-
-function SetDefaultCommConfigA(lpszName: LPCSTR; const lpCC: COMMCONFIG;
- dwSize: DWORD): BOOL; stdcall;
-{$EXTERNALSYM SetDefaultCommConfigA}
-function SetDefaultCommConfigW(lpszName: LPCWSTR; const lpCC: COMMCONFIG;
- dwSize: DWORD): BOOL; stdcall;
-{$EXTERNALSYM SetDefaultCommConfigW}
-function SetDefaultCommConfig(lpszName: LPCTSTR; const lpCC: COMMCONFIG;
- dwSize: DWORD): BOOL; stdcall;
-{$EXTERNALSYM SetDefaultCommConfig}
-
-const
- MAX_COMPUTERNAME_LENGTH = 15;
- {$EXTERNALSYM MAX_COMPUTERNAME_LENGTH}
-
-function GetComputerNameA(lpBuffer: LPSTR; var nSize: DWORD): BOOL; stdcall;
-{$EXTERNALSYM GetComputerNameA}
-function GetComputerNameW(lpBuffer: LPWSTR; var nSize: DWORD): BOOL; stdcall;
-{$EXTERNALSYM GetComputerNameW}
-function GetComputerName(lpBuffer: LPTSTR; var nSize: DWORD): BOOL; stdcall;
-{$EXTERNALSYM GetComputerName}
-
-function SetComputerNameA(lpComputerName: LPCSTR): BOOL; stdcall;
-{$EXTERNALSYM SetComputerNameA}
-function SetComputerNameW(lpComputerName: LPCWSTR): BOOL; stdcall;
-{$EXTERNALSYM SetComputerNameW}
-function SetComputerName(lpComputerName: LPCTSTR): BOOL; stdcall;
-{$EXTERNALSYM SetComputerName}
-
-type
- _COMPUTER_NAME_FORMAT = (
- ComputerNameNetBIOS,
- ComputerNameDnsHostname,
- ComputerNameDnsDomain,
- ComputerNameDnsFullyQualified,
- ComputerNamePhysicalNetBIOS,
- ComputerNamePhysicalDnsHostname,
- ComputerNamePhysicalDnsDomain,
- ComputerNamePhysicalDnsFullyQualified,
- ComputerNameMax);
- {$EXTERNALSYM _COMPUTER_NAME_FORMAT}
- COMPUTER_NAME_FORMAT = _COMPUTER_NAME_FORMAT;
- {$EXTERNALSYM COMPUTER_NAME_FORMAT}
- TComputerNameFormat = COMPUTER_NAME_FORMAT;
-
-function GetComputerNameExA(NameType: COMPUTER_NAME_FORMAT; lpBuffer: LPSTR;
- var nSize: DWORD): BOOL; stdcall;
-{$EXTERNALSYM GetComputerNameExA}
-function GetComputerNameExW(NameType: COMPUTER_NAME_FORMAT; lpBuffer: LPWSTR;
- var nSize: DWORD): BOOL; stdcall;
-{$EXTERNALSYM GetComputerNameExW}
-function GetComputerNameEx(NameType: COMPUTER_NAME_FORMAT; lpBuffer: LPTSTR;
- varnSize: DWORD): BOOL; stdcall;
-{$EXTERNALSYM GetComputerNameEx}
-
-function SetComputerNameExA(NameType: COMPUTER_NAME_FORMAT; lpBuffer: LPCSTR): BOOL; stdcall;
-{$EXTERNALSYM SetComputerNameExA}
-function SetComputerNameExW(NameType: COMPUTER_NAME_FORMAT; lpBuffer: LPCWSTR): BOOL; stdcall;
-{$EXTERNALSYM SetComputerNameExW}
-function SetComputerNameEx(NameType: COMPUTER_NAME_FORMAT; lpBuffer: LPCTSTR): BOOL; stdcall;
-{$EXTERNALSYM SetComputerNameEx}
-
-function DnsHostnameToComputerNameA(Hostname, ComputerName: LPSTR; var nSize: DWORD): BOOL; stdcall;
-{$EXTERNALSYM DnsHostnameToComputerNameA}
-function DnsHostnameToComputerNameW(Hostname, ComputerName: LPWSTR; var nSize: DWORD): BOOL; stdcall;
-{$EXTERNALSYM DnsHostnameToComputerNameW}
-function DnsHostnameToComputerName(Hostname, ComputerName: LPTSTR; var nSize: DWORD): BOOL; stdcall;
-{$EXTERNALSYM DnsHostnameToComputerName}
-
-function GetUserNameA(lpBuffer: LPSTR; var nSize: DWORD): BOOL; stdcall;
-{$EXTERNALSYM GetUserNameA}
-function GetUserNameW(lpBuffer: LPWSTR; var nSize: DWORD): BOOL; stdcall;
-{$EXTERNALSYM GetUserNameW}
-function GetUserName(lpBuffer: LPTSTR; var nSize: DWORD): BOOL; stdcall;
-{$EXTERNALSYM GetUserName}
-
-//
-// Logon Support APIs
-//
-
-const
- LOGON32_LOGON_INTERACTIVE = 2;
- {$EXTERNALSYM LOGON32_LOGON_INTERACTIVE}
- LOGON32_LOGON_NETWORK = 3;
- {$EXTERNALSYM LOGON32_LOGON_NETWORK}
- LOGON32_LOGON_BATCH = 4;
- {$EXTERNALSYM LOGON32_LOGON_BATCH}
- LOGON32_LOGON_SERVICE = 5;
- {$EXTERNALSYM LOGON32_LOGON_SERVICE}
- LOGON32_LOGON_UNLOCK = 7;
- {$EXTERNALSYM LOGON32_LOGON_UNLOCK}
- LOGON32_LOGON_NETWORK_CLEARTEXT = 8;
- {$EXTERNALSYM LOGON32_LOGON_NETWORK_CLEARTEXT}
- LOGON32_LOGON_NEW_CREDENTIALS = 9;
- {$EXTERNALSYM LOGON32_LOGON_NEW_CREDENTIALS}
-
- LOGON32_PROVIDER_DEFAULT = 0;
- {$EXTERNALSYM LOGON32_PROVIDER_DEFAULT}
- LOGON32_PROVIDER_WINNT35 = 1;
- {$EXTERNALSYM LOGON32_PROVIDER_WINNT35}
- LOGON32_PROVIDER_WINNT40 = 2;
- {$EXTERNALSYM LOGON32_PROVIDER_WINNT40}
- LOGON32_PROVIDER_WINNT50 = 3;
- {$EXTERNALSYM LOGON32_PROVIDER_WINNT50}
-
-function LogonUserA(lpszUsername, lpszDomain, lpszPassword: LPCSTR;
- dwLogonType, dwLogonProvider: DWORD; var phToken: HANDLE): BOOL; stdcall;
-{$EXTERNALSYM LogonUserA}
-function LogonUserW(lpszUsername, lpszDomain, lpszPassword: LPCWSTR;
- dwLogonType, dwLogonProvider: DWORD; var phToken: HANDLE): BOOL; stdcall;
-{$EXTERNALSYM LogonUserW}
-function LogonUser(lpszUsername, lpszDomain, lpszPassword: LPCTSTR;
- dwLogonType, dwLogonProvider: DWORD; var phToken: HANDLE): BOOL; stdcall;
-{$EXTERNALSYM LogonUser}
-
-function LogonUserExA(lpszUsername, lpszDomain, lpszPassword: LPCSTR;
- dwLogonType, dwLogonProvider: DWORD; var phToken: HANDLE; ppLogonSid: PPSID;
- ppProfileBuffer: PPVOID; pdwProfileLength: LPDWORD; pQuotaLimits: PQUOTA_LIMITS): BOOL; stdcall;
-{$EXTERNALSYM LogonUserExA}
-function LogonUserExW(lpszUsername, lpszDomain, lpszPassword: LPCWSTR;
- dwLogonType, dwLogonProvider: DWORD; var phToken: HANDLE; ppLogonSid: PPSID;
- ppProfileBuffer: PPVOID; pdwProfileLength: LPDWORD; pQuotaLimits: PQUOTA_LIMITS): BOOL; stdcall;
-{$EXTERNALSYM LogonUserExW}
-function LogonUserEx(lpszUsername, lpszDomain, lpszPassword: LPCTSTR;
- dwLogonType, dwLogonProvider: DWORD; var phToken: HANDLE; ppLogonSid: PPSID;
- ppProfileBuffer: PPVOID; pdwProfileLength: LPDWORD; pQuotaLimits: PQUOTA_LIMITS): BOOL; stdcall;
-{$EXTERNALSYM LogonUserEx}
-
-function ImpersonateLoggedOnUser(hToken: HANDLE): BOOL; stdcall;
-{$EXTERNALSYM ImpersonateLoggedOnUser}
-
-function CreateProcessAsUserA(hToken: HANDLE; lpApplicationName: LPCSTR;
- lpCommandLine: LPSTR; lpProcessAttributes: LPSECURITY_ATTRIBUTES;
- lpThreadAttributes: LPSECURITY_ATTRIBUTES; bInheritHandles: BOOL;
- dwCreationFlags: DWORD; lpEnvironment: LPVOID; lpCurrentDirectory: LPCSTR;
- const lpStartupInfo: STARTUPINFOA; var lpProcessInformation: PROCESS_INFORMATION): BOOL; stdcall;
-{$EXTERNALSYM CreateProcessAsUserA}
-function CreateProcessAsUserW(hToken: HANDLE; lpApplicationName: LPCWSTR;
- lpCommandLine: LPWSTR; lpProcessAttributes: LPSECURITY_ATTRIBUTES;
- lpThreadAttributes: LPSECURITY_ATTRIBUTES; bInheritHandles: BOOL;
- dwCreationFlags: DWORD; lpEnvironment: LPVOID; lpCurrentDirectory: LPCWSTR;
- const lpStartupInfo: STARTUPINFOW; var lpProcessInformation: PROCESS_INFORMATION): BOOL; stdcall;
-{$EXTERNALSYM CreateProcessAsUserW}
-function CreateProcessAsUser(hToken: HANDLE; lpApplicationName: LPCTSTR;
- lpCommandLine: LPTSTR; lpProcessAttributes: LPSECURITY_ATTRIBUTES;
- lpThreadAttributes: LPSECURITY_ATTRIBUTES; bInheritHandles: BOOL;
- dwCreationFlags: DWORD; lpEnvironment: LPVOID; lpCurrentDirectory: LPCTSTR;
- const lpStartupInfo: STARTUPINFO; var lpProcessInformation: PROCESS_INFORMATION): BOOL; stdcall;
-{$EXTERNALSYM CreateProcessAsUser}
-
-//
-// LogonFlags
-//
-
-const
- LOGON_WITH_PROFILE = $00000001;
- {$EXTERNALSYM LOGON_WITH_PROFILE}
- LOGON_NETCREDENTIALS_ONLY = $00000002;
- {$EXTERNALSYM LOGON_NETCREDENTIALS_ONLY}
- LOGON_ZERO_PASSWORD_BUFFER = DWORD($80000000);
- {$EXTERNALSYM LOGON_ZERO_PASSWORD_BUFFER}
-
-function CreateProcessWithLogonW(lpUsername, lpDomain, lpPassword: LPCWSTR;
- dwLogonFlags: DWORD; lpApplicationName: LPCWSTR; lpCommandLine: LPWSTR;
- dwCreationFlags: DWORD; lpEnvironment: LPVOID; lpCurrentDirectory: LPCWSTR;
- const lpStartupInfo: STARTUPINFOW; var lpProcessInformation: PROCESS_INFORMATION): BOOL; stdcall;
-{$EXTERNALSYM CreateProcessWithLogonW}
-
-function CreateProcessWithTokenW(hToken: HANDLE; dwLogonFlags: DWORD; lpApplicationName: LPCWSTR; lpCommandLine: LPWSTR;
- dwCreationFlags: DWORD; lpEnvironment: LPVOID; lpCurrentDirectory: LPCWSTR; lpStartupInfo: LPSTARTUPINFOW;
- lpProcessInformation: LPPROCESS_INFORMATION): BOOL; stdcall;
-{$EXTERNALSYM CreateProcessWithTokenW}
-
-function ImpersonateAnonymousToken(ThreadHandle: HANDLE): BOOL; stdcall;
-{$EXTERNALSYM ImpersonateAnonymousToken}
-
-function DuplicateTokenEx(hExistingToken: HANDLE; dwDesiredAccess: DWORD;
- lpTokenAttributes: LPSECURITY_ATTRIBUTES; ImpersonationLevel: SECURITY_IMPERSONATION_LEVEL;
- TokenType: TOKEN_TYPE; var phNewToken: HANDLE): BOOL; stdcall;
-{$EXTERNALSYM DuplicateTokenEx}
-
-function CreateRestrictedToken(ExistingTokenHandle: HANDLE; Flags: DWORD;
- DisableSidCount: DWORD; SidsToDisable: PSID_AND_ATTRIBUTES;
- DeletePrivilegeCount: DWORD; PrivilegesToDelete: PLUID_AND_ATTRIBUTES;
- RestrictedSidCount: DWORD; SidsToRestrict: PSID_AND_ATTRIBUTES;
- var NewTokenHandle: HANDLE): BOOL; stdcall;
-{$EXTERNALSYM CreateRestrictedToken}
-
-function IsTokenRestricted(TokenHandle: HANDLE): BOOL; stdcall;
-{$EXTERNALSYM IsTokenRestricted}
-
-function CheckTokenMembership(TokenHandle: HANDLE; SidToCheck: PSID; var IsMember: BOOL): BOOL; stdcall;
-{$EXTERNALSYM CheckTokenMembership}
-
-function IsTokenUntrusted(TokenHandle: HANDLE): BOOL; stdcall;
-{$EXTERNALSYM IsTokenUntrusted}
-
-//
-// Thread pool API's
-//
-
-type
- WAITORTIMERCALLBACK = WAITORTIMERCALLBACKFUNC;
- {$EXTERNALSYM WAITORTIMERCALLBACK}
- TWaitOrTimerCallback = WAITORTIMERCALLBACKFUNC;
-
-function RegisterWaitForSingleObject(var phNewWaitObject: HANDLE; hObject: HANDLE;
- Callback: WAITORTIMERCALLBACK; Context: PVOID; dwMilliseconds, dwFlags: ULONG): BOOL; stdcall;
-{$EXTERNALSYM RegisterWaitForSingleObject}
-
-function RegisterWaitForSingleObjectEx(hObject: HANDLE;
- Callback: WAITORTIMERCALLBACK; Context: PVOID; dwMilliseconds, dwFlags: ULONG): HANDLE; stdcall;
-{$EXTERNALSYM RegisterWaitForSingleObjectEx}
-
-function UnregisterWait(WaitHandle: HANDLE): BOOL; stdcall;
-{$EXTERNALSYM UnregisterWait}
-
-function UnregisterWaitEx(WaitHandle, CompletionEvent: HANDLE): BOOL; stdcall;
-{$EXTERNALSYM UnregisterWaitEx}
-
-function QueueUserWorkItem(Function_: LPTHREAD_START_ROUTINE; Context: PVOID;
- Flags: ULONG): BOOL; stdcall;
-{$EXTERNALSYM QueueUserWorkItem}
-
-function BindIoCompletionCallback(FileHandle: HANDLE;
- Function_: LPOVERLAPPED_COMPLETION_ROUTINE; Flags: ULONG): BOOL; stdcall;
-{$EXTERNALSYM BindIoCompletionCallback}
-
-function CreateTimerQueue: HANDLE; stdcall;
-{$EXTERNALSYM CreateTimerQueue}
-
-function CreateTimerQueueTimer(var phNewTimer: HANDLE; TimerQueue: HANDLE;
- Callback: WAITORTIMERCALLBACK; Parameter: PVOID; DueTime, Period: DWORD;
- Flags: ULONG): BOOL; stdcall;
-{$EXTERNALSYM CreateTimerQueueTimer}
-
-function ChangeTimerQueueTimer(TimerQueue, Timer: HANDLE; DueTime, Period: ULONG): BOOL; stdcall;
-{$EXTERNALSYM ChangeTimerQueueTimer}
-
-function DeleteTimerQueueTimer(TimerQueue, Timer, CompletionEvent: HANDLE): BOOL; stdcall;
-{$EXTERNALSYM DeleteTimerQueueTimer}
-
-function DeleteTimerQueueEx(TimerQueue, CompletionEvent: HANDLE): BOOL; stdcall;
-{$EXTERNALSYM DeleteTimerQueueEx}
-
-function SetTimerQueueTimer(TimerQueue, Callback: WAITORTIMERCALLBACK;
- Parameter: PVOID; DueTime, Period: DWORD; PreferIo: BOOL): HANDLE; stdcall;
-{$EXTERNALSYM SetTimerQueueTimer}
-
-function CancelTimerQueueTimer(TimerQueue, Timer: HANDLE): BOOL; stdcall;
-{$EXTERNALSYM CancelTimerQueueTimer}
-
-function DeleteTimerQueue(TimerQueue: HANDLE): BOOL; stdcall;
-{$EXTERNALSYM DeleteTimerQueue}
-
-//
-// Plug-and-Play API's
-//
-
-const
- HW_PROFILE_GUIDLEN = 39; // 36-characters plus NULL terminator
- {$EXTERNALSYM HW_PROFILE_GUIDLEN}
- MAX_PROFILE_LEN = 80;
- {$EXTERNALSYM MAX_PROFILE_LEN}
-
- DOCKINFO_UNDOCKED = $1;
- {$EXTERNALSYM DOCKINFO_UNDOCKED}
- DOCKINFO_DOCKED = $2;
- {$EXTERNALSYM DOCKINFO_DOCKED}
- DOCKINFO_USER_SUPPLIED = $4;
- {$EXTERNALSYM DOCKINFO_USER_SUPPLIED}
- DOCKINFO_USER_UNDOCKED = DOCKINFO_USER_SUPPLIED or DOCKINFO_UNDOCKED;
- {$EXTERNALSYM DOCKINFO_USER_UNDOCKED}
- DOCKINFO_USER_DOCKED = DOCKINFO_USER_SUPPLIED or DOCKINFO_DOCKED;
- {$EXTERNALSYM DOCKINFO_USER_DOCKED}
-
-type
- LPHW_PROFILE_INFOA = ^HW_PROFILE_INFOA;
- {$EXTERNALSYM LPHW_PROFILE_INFOA}
- tagHW_PROFILE_INFOA = record
- dwDockInfo: DWORD;
- szHwProfileGuid: array [0..HW_PROFILE_GUIDLEN - 1] of CHAR;
- szHwProfileName: array [0..MAX_PROFILE_LEN - 1] of CHAR;
- end;
- {$EXTERNALSYM tagHW_PROFILE_INFOA}
- HW_PROFILE_INFOA = tagHW_PROFILE_INFOA;
- {$EXTERNALSYM HW_PROFILE_INFOA}
- THWProfileInfoA = HW_PROFILE_INFOA;
- PHWProfileInfoA = LPHW_PROFILE_INFOA;
-
- LPHW_PROFILE_INFOW = ^HW_PROFILE_INFOW;
- {$EXTERNALSYM LPHW_PROFILE_INFOW}
- tagHW_PROFILE_INFOW = record
- dwDockInfo: DWORD;
- szHwProfileGuid: array [0..HW_PROFILE_GUIDLEN - 1] of WCHAR;
- szHwProfileName: array [0..MAX_PROFILE_LEN - 1] of WCHAR;
- end;
- {$EXTERNALSYM tagHW_PROFILE_INFOW}
- HW_PROFILE_INFOW = tagHW_PROFILE_INFOW;
- {$EXTERNALSYM HW_PROFILE_INFOW}
- THWProfileInfoW = HW_PROFILE_INFOW;
- PHWProfileInfoW = LPHW_PROFILE_INFOW;
-
- {$IFDEF UNICODE}
- HW_PROFILE_INFO = HW_PROFILE_INFOW;
- {$EXTERNALSYM HW_PROFILE_INFO}
- LPHW_PROFILE_INFO = LPHW_PROFILE_INFOW;
- {$EXTERNALSYM LPHW_PROFILE_INFO}
- THWProfileInfo = THWProfileInfoW;
- PHWProfileInfo = PHWProfileInfoW;
- {$ELSE}
- HW_PROFILE_INFO = HW_PROFILE_INFOA;
- {$EXTERNALSYM HW_PROFILE_INFO}
- LPHW_PROFILE_INFO = LPHW_PROFILE_INFOA;
- {$EXTERNALSYM LPHW_PROFILE_INFO}
- THWProfileInfo = THWProfileInfoA;
- PHWProfileInfo = PHWProfileInfoA;
- {$ENDIF UNICODE}
-
-function GetCurrentHwProfileA(var lpHwProfileInfo: HW_PROFILE_INFOA): BOOL; stdcall;
-{$EXTERNALSYM GetCurrentHwProfileA}
-function GetCurrentHwProfileW(var lpHwProfileInfo: HW_PROFILE_INFOW): BOOL; stdcall;
-{$EXTERNALSYM GetCurrentHwProfileW}
-function GetCurrentHwProfile(var lpHwProfileInfo: HW_PROFILE_INFO): BOOL; stdcall;
-{$EXTERNALSYM GetCurrentHwProfile}
-
-//
-// Performance counter API's
-//
-
-function QueryPerformanceCounter(var lpPerformanceCount: LARGE_INTEGER): BOOL; stdcall;
-{$EXTERNALSYM QueryPerformanceCounter}
-
-function QueryPerformanceFrequency(var lpFrequency: LARGE_INTEGER): BOOL; stdcall;
-{$EXTERNALSYM QueryPerformanceFrequency}
-
-function GetVersionExA(lpVersionInformation: LPOSVERSIONINFOA): BOOL; stdcall;
-{$EXTERNALSYM GetVersionExA}
-function GetVersionExW(lpVersionInformation: LPOSVERSIONINFOW): BOOL; stdcall;
-{$EXTERNALSYM GetVersionExW}
-function GetVersionEx(lpVersionInformation: LPOSVERSIONINFO): BOOL; stdcall;
-{$EXTERNALSYM GetVersionEx}
-
-function VerifyVersionInfoA(var lpVersionInformation: OSVERSIONINFOEXA;
- dwTypeMask: DWORD; dwlConditionMask: DWORDLONG): BOOL; stdcall;
-{$EXTERNALSYM VerifyVersionInfoA}
-function VerifyVersionInfoW(var lpVersionInformation: OSVERSIONINFOEXW;
- dwTypeMask: DWORD; dwlConditionMask: DWORDLONG): BOOL; stdcall;
-{$EXTERNALSYM VerifyVersionInfoW}
-function VerifyVersionInfo(var lpVersionInformation: OSVERSIONINFOEX;
- dwTypeMask: DWORD; dwlConditionMask: DWORDLONG): BOOL; stdcall;
-{$EXTERNALSYM VerifyVersionInfo}
-
-// DOS and OS/2 Compatible Error Code definitions returned by the Win32 Base
-// API functions.
-//
-
-// #include <winerror.h>
-
-// Abnormal termination codes
-
-const
- TC_NORMAL = 0;
- {$EXTERNALSYM TC_NORMAL}
- TC_HARDERR = 1;
- {$EXTERNALSYM TC_HARDERR}
- TC_GP_TRAP = 2;
- {$EXTERNALSYM TC_GP_TRAP}
- TC_SIGNAL = 3;
- {$EXTERNALSYM TC_SIGNAL}
-
-//
-// Power Management APIs
-//
-
- AC_LINE_OFFLINE = $00;
- {$EXTERNALSYM AC_LINE_OFFLINE}
- AC_LINE_ONLINE = $01;
- {$EXTERNALSYM AC_LINE_ONLINE}
- AC_LINE_BACKUP_POWER = $02;
- {$EXTERNALSYM AC_LINE_BACKUP_POWER}
- AC_LINE_UNKNOWN = $FF;
- {$EXTERNALSYM AC_LINE_UNKNOWN}
-
- BATTERY_FLAG_HIGH = $01;
- {$EXTERNALSYM BATTERY_FLAG_HIGH}
- BATTERY_FLAG_LOW = $02;
- {$EXTERNALSYM BATTERY_FLAG_LOW}
- BATTERY_FLAG_CRITICAL = $04;
- {$EXTERNALSYM BATTERY_FLAG_CRITICAL}
- BATTERY_FLAG_CHARGING = $08;
- {$EXTERNALSYM BATTERY_FLAG_CHARGING}
- BATTERY_FLAG_NO_BATTERY = $80;
- {$EXTERNALSYM BATTERY_FLAG_NO_BATTERY}
- BATTERY_FLAG_UNKNOWN = $FF;
- {$EXTERNALSYM BATTERY_FLAG_UNKNOWN}
-
- BATTERY_PERCENTAGE_UNKNOWN = $FF;
- {$EXTERNALSYM BATTERY_PERCENTAGE_UNKNOWN}
-
- BATTERY_LIFE_UNKNOWN = DWORD($FFFFFFFF);
- {$EXTERNALSYM BATTERY_LIFE_UNKNOWN}
-
-type
- LPSYSTEM_POWER_STATUS = ^SYSTEM_POWER_STATUS;
- {$EXTERNALSYM LPSYSTEM_POWER_STATUS}
- _SYSTEM_POWER_STATUS = record
- ACLineStatus: BYTE;
- BatteryFlag: BYTE;
- BatteryLifePercent: BYTE;
- Reserved1: BYTE;
- BatteryLifeTime: DWORD;
- BatteryFullLifeTime: DWORD;
- end;
- {$EXTERNALSYM _SYSTEM_POWER_STATUS}
- SYSTEM_POWER_STATUS = _SYSTEM_POWER_STATUS;
- {$EXTERNALSYM SYSTEM_POWER_STATUS}
- TSystemPowerStatus = SYSTEM_POWER_STATUS;
- PSystemPowerStatus = LPSYSTEM_POWER_STATUS;
-
-function GetSystemPowerStatus(var lpSystemPowerStatus: SYSTEM_POWER_STATUS): BOOL; stdcall;
-{$EXTERNALSYM GetSystemPowerStatus}
-
-function SetSystemPowerState(fSuspend, fForce: BOOL): BOOL; stdcall;
-{$EXTERNALSYM SetSystemPowerState}
-
-//
-// Very Large Memory API Subset
-//
-
-function AllocateUserPhysicalPages(hProcess: HANDLE; var NumberOfPages: ULONG_PTR;
- PageArray: PULONG_PTR): BOOL; stdcall;
-{$EXTERNALSYM AllocateUserPhysicalPages}
-
-function FreeUserPhysicalPages(hProcess: HANDLE; var NumberOfPages: ULONG_PTR;
- PageArray: PULONG_PTR): BOOL; stdcall;
-{$EXTERNALSYM FreeUserPhysicalPages}
-
-function MapUserPhysicalPages(VirtualAddress: PVOID; NumberOfPages: ULONG_PTR;
- PageArray: PULONG_PTR): BOOL; stdcall;
-{$EXTERNALSYM MapUserPhysicalPages}
-
-function MapUserPhysicalPagesScatter(VirtualAddresses: PVOID; NumberOfPages: ULONG_PTR;
- PageArray: PULONG_PTR): BOOL; stdcall;
-{$EXTERNALSYM MapUserPhysicalPagesScatter}
-
-function CreateJobObjectA(lpJobAttributes: LPSECURITY_ATTRIBUTES; lpName: LPCSTR): HANDLE; stdcall;
-{$EXTERNALSYM CreateJobObjectA}
-function CreateJobObjectW(lpJobAttributes: LPSECURITY_ATTRIBUTES; lpName: LPCWSTR): HANDLE; stdcall;
-{$EXTERNALSYM CreateJobObjectW}
-function CreateJobObject(lpJobAttributes: LPSECURITY_ATTRIBUTES; lpName: LPCTSTR): HANDLE; stdcall;
-{$EXTERNALSYM CreateJobObject}
-
-function OpenJobObjectA(dwDesiredAccess: DWORD; bInheritHandle: BOOL; lpName: LPCSTR): HANDLE; stdcall;
-{$EXTERNALSYM OpenJobObjectA}
-function OpenJobObjectW(dwDesiredAccess: DWORD; bInheritHandle: BOOL; lpName: LPCWSTR): HANDLE; stdcall;
-{$EXTERNALSYM OpenJobObjectW}
-function OpenJobObject(dwDesiredAccess: DWORD; bInheritHandle: BOOL; lpName: LPCTSTR): HANDLE; stdcall;
-{$EXTERNALSYM OpenJobObject}
-
-function AssignProcessToJobObject(hJob, hProcess: HANDLE): BOOL; stdcall;
-{$EXTERNALSYM AssignProcessToJobObject}
-
-function TerminateJobObject(hJob: HANDLE; uExitCode: UINT): BOOL; stdcall;
-{$EXTERNALSYM TerminateJobObject}
-
-function QueryInformationJobObject(hJob: HANDLE; JobObjectInformationClass: JOBOBJECTINFOCLASS;
- lpJobObjectInformation: LPVOID; cbJobObjectInformationLength: DWORD;
- lpReturnLength: LPDWORD): BOOL; stdcall;
-{$EXTERNALSYM QueryInformationJobObject}
-
-function SetInformationJobObject(hJob: HANDLE; JobObjectInformationClass: JOBOBJECTINFOCLASS;
- lpJobObjectInformation: LPVOID; cbJobObjectInformationLength: DWORD): BOOL; stdcall;
-{$EXTERNALSYM SetInformationJobObject}
-
-function IsProcessInJob(ProcessHandle, JobHandle: HANDLE; var Result_: BOOL): BOOL; stdcall;
-{$EXTERNALSYM IsProcessInJob}
-
-function CreateJobSet(NumJob: ULONG; UserJobSet: PJOB_SET_ARRAY; Flags: ULONG): BOOL; stdcall;
-{$EXTERNALSYM CreateJobSet}
-
-function AddVectoredExceptionHandler(FirstHandler: ULONG;
- VectoredHandler: PVECTORED_EXCEPTION_HANDLER): PVOID; stdcall;
-{$EXTERNALSYM AddVectoredExceptionHandler}
-
-function RemoveVectoredExceptionHandler(VectoredHandlerHandle: PVOID): ULONG; stdcall;
-{$EXTERNALSYM RemoveVectoredExceptionHandler}
-
-//
-// New Volume Mount Point API.
-//
-
-function FindFirstVolumeA(lpszVolumeName: LPSTR; cchBufferLength: DWORD): HANDLE; stdcall;
-{$EXTERNALSYM FindFirstVolumeA}
-function FindFirstVolumeW(lpszVolumeName: LPWSTR; cchBufferLength: DWORD): HANDLE; stdcall;
-{$EXTERNALSYM FindFirstVolumeW}
-function FindFirstVolume(lpszVolumeName: LPTSTR; cchBufferLength: DWORD): HANDLE; stdcall;
-{$EXTERNALSYM FindFirstVolume}
-
-function FindNextVolumeA(hFindVolume: HANDLE; lpszVolumeName: LPSTR;
- cchBufferLength: DWORD): BOOL; stdcall;
-{$EXTERNALSYM FindNextVolumeA}
-function FindNextVolumeW(hFindVolume: HANDLE; lpszVolumeName: LPWSTR;
- cchBufferLength: DWORD): BOOL; stdcall;
-{$EXTERNALSYM FindNextVolumeW}
-function FindNextVolume(hFindVolume: HANDLE; lpszVolumeName: LPTSTR;
- cchBufferLength: DWORD): BOOL; stdcall;
-{$EXTERNALSYM FindNextVolume}
-
-function FindVolumeClose(hFindVolume: HANDLE): BOOL; stdcall;
-{$EXTERNALSYM FindVolumeClose}
-
-function FindFirstVolumeMountPointA(lpszRootPathName: LPCSTR;
- lpszVolumeMountPoint: LPSTR; cchBufferLength: DWORD): HANDLE; stdcall;
-{$EXTERNALSYM FindFirstVolumeMountPointA}
-function FindFirstVolumeMountPointW(lpszRootPathName: LPCWSTR;
- lpszVolumeMountPoint: LPWSTR; cchBufferLength: DWORD): HANDLE; stdcall;
-{$EXTERNALSYM FindFirstVolumeMountPointW}
-function FindFirstVolumeMountPoint(lpszRootPathName: LPCTSTR;
- lpszVolumeMountPoint: LPTSTR; cchBufferLength: DWORD): HANDLE; stdcall;
-{$EXTERNALSYM FindFirstVolumeMountPoint}
-
-function FindNextVolumeMountPointA(hFindVolumeMountPoint: HANDLE;
- lpszVolumeMountPoint: LPSTR; cchBufferLength: DWORD): BOOL; stdcall;
-{$EXTERNALSYM FindNextVolumeMountPointA}
-function FindNextVolumeMountPointW(hFindVolumeMountPoint: HANDLE;
- lpszVolumeMountPoint: LPWSTR; cchBufferLength: DWORD): BOOL; stdcall;
-{$EXTERNALSYM FindNextVolumeMountPointW}
-function FindNextVolumeMountPoint(hFindVolumeMountPoint: HANDLE;
- lpszVolumeMountPoint: LPTSTR; cchBufferLength: DWORD): BOOL; stdcall;
-{$EXTERNALSYM FindNextVolumeMountPoint}
-
-function FindVolumeMountPointClose(hFindVolumeMountPoint: HANDLE): BOOL; stdcall;
-{$EXTERNALSYM FindVolumeMountPointClose}
-
-function SetVolumeMountPointA(lpszVolumeMountPoint, lpszVolumeName: LPCSTR): BOOL; stdcall;
-{$EXTERNALSYM SetVolumeMountPointA}
-function SetVolumeMountPointW(lpszVolumeMountPoint, lpszVolumeName: LPCWSTR): BOOL; stdcall;
-{$EXTERNALSYM SetVolumeMountPointW}
-function SetVolumeMountPoint(lpszVolumeMountPoint, lpszVolumeName: LPCTSTR): BOOL; stdcall;
-{$EXTERNALSYM SetVolumeMountPoint}
-
-function DeleteVolumeMountPointA(lpszVolumeMountPoint: LPCSTR): BOOL; stdcall;
-{$EXTERNALSYM DeleteVolumeMountPointA}
-function DeleteVolumeMountPointW(lpszVolumeMountPoint: LPCWSTR): BOOL; stdcall;
-{$EXTERNALSYM DeleteVolumeMountPointW}
-function DeleteVolumeMountPoint(lpszVolumeMountPoint: LPCTSTR): BOOL; stdcall;
-{$EXTERNALSYM DeleteVolumeMountPoint}
-
-function GetVolumeNameForVolumeMountPointA(lpszVolumeMountPoint: LPCSTR;
- lpszVolumeName: LPSTR; cchBufferLength: DWORD): BOOL; stdcall;
-{$EXTERNALSYM GetVolumeNameForVolumeMountPointA}
-function GetVolumeNameForVolumeMountPointW(lpszVolumeMountPoint: LPCWSTR;
- lpszVolumeName: LPWSTR; cchBufferLength: DWORD): BOOL; stdcall;
-{$EXTERNALSYM GetVolumeNameForVolumeMountPointW}
-function GetVolumeNameForVolumeMountPoint(lpszVolumeMountPoint: LPCTSTR;
- lpszVolumeName: LPTSTR; cchBufferLength: DWORD): BOOL; stdcall;
-{$EXTERNALSYM GetVolumeNameForVolumeMountPoint}
-
-function GetVolumePathNameA(lpszFileName: LPCSTR; lpszVolumePathName: LPSTR;
- cchBufferLength: DWORD): BOOL; stdcall;
-{$EXTERNALSYM GetVolumePathNameA}
-function GetVolumePathNameW(lpszFileName: LPCWSTR; lpszVolumePathName: LPWSTR;
- cchBufferLength: DWORD): BOOL; stdcall;
-{$EXTERNALSYM GetVolumePathNameW}
-function GetVolumePathName(lpszFileName: LPCTSTR; lpszVolumePathName: LPTSTR;
- cchBufferLength: DWORD): BOOL; stdcall;
-{$EXTERNALSYM GetVolumePathName}
-
-function GetVolumePathNamesForVolumeNameA(lpszVolumeName, lpszVolumePathNames: LPCSTR;
- cchBufferLength: DWORD; var lpcchReturnLength: DWORD): BOOL; stdcall;
-{$EXTERNALSYM GetVolumePathNamesForVolumeNameA}
-function GetVolumePathNamesForVolumeNameW(lpszVolumeName, lpszVolumePathNames: LPCWSTR;
- cchBufferLength: DWORD; var lpcchReturnLength: DWORD): BOOL; stdcall;
-{$EXTERNALSYM GetVolumePathNamesForVolumeNameW}
-function GetVolumePathNamesForVolumeName(lpszVolumeName, lpszVolumePathNames: LPCTSTR;
- cchBufferLength: DWORD; var lpcchReturnLength: DWORD): BOOL; stdcall;
-{$EXTERNALSYM GetVolumePathNamesForVolumeName}
-
-const
- ACTCTX_FLAG_PROCESSOR_ARCHITECTURE_VALID = $00000001;
- {$EXTERNALSYM ACTCTX_FLAG_PROCESSOR_ARCHITECTURE_VALID}
- ACTCTX_FLAG_LANGID_VALID = $00000002;
- {$EXTERNALSYM ACTCTX_FLAG_LANGID_VALID}
- ACTCTX_FLAG_ASSEMBLY_DIRECTORY_VALID = $00000004;
- {$EXTERNALSYM ACTCTX_FLAG_ASSEMBLY_DIRECTORY_VALID}
- ACTCTX_FLAG_RESOURCE_NAME_VALID = $00000008;
- {$EXTERNALSYM ACTCTX_FLAG_RESOURCE_NAME_VALID}
- ACTCTX_FLAG_SET_PROCESS_DEFAULT = $00000010;
- {$EXTERNALSYM ACTCTX_FLAG_SET_PROCESS_DEFAULT}
- ACTCTX_FLAG_APPLICATION_NAME_VALID = $00000020;
- {$EXTERNALSYM ACTCTX_FLAG_APPLICATION_NAME_VALID}
- ACTCTX_FLAG_SOURCE_IS_ASSEMBLYREF = $00000040;
- {$EXTERNALSYM ACTCTX_FLAG_SOURCE_IS_ASSEMBLYREF}
- ACTCTX_FLAG_HMODULE_VALID = $00000080;
- {$EXTERNALSYM ACTCTX_FLAG_HMODULE_VALID}
-
-type
- tagACTCTXA = record
- cbSize: ULONG;
- dwFlags: DWORD;
- lpSource: LPCSTR;
- wProcessorArchitecture: USHORT;
- wLangId: LANGID;
- lpAssemblyDirectory: LPCSTR;
- lpResourceName: LPCSTR;
- lpApplicationName: LPCSTR;
- hModule: HMODULE;
- end;
- {$EXTERNALSYM tagACTCTXA}
- ACTCTXA = tagACTCTXA;
- {$EXTERNALSYM ACTCTXA}
- PACTCTXA = ^ACTCTXA;
- {$EXTERNALSYM PACTCTXA}
- TActCtxA = ACTCTXA;
-
- tagACTCTXW = record
- cbSize: ULONG;
- dwFlags: DWORD;
- lpSource: LPCWSTR;
- wProcessorArchitecture: USHORT;
- wLangId: LANGID;
- lpAssemblyDirectory: LPCWSTR;
- lpResourceName: LPCWSTR;
- lpApplicationName: LPCWSTR;
- hModule: HMODULE;
- end;
- {$EXTERNALSYM tagACTCTXW}
- ACTCTXW = tagACTCTXW;
- {$EXTERNALSYM ACTCTXW}
- PACTCTXW = ^ACTCTXW;
- {$EXTERNALSYM PACTCTXW}
- TActCtxW = ACTCTXW;
-
- {$IFDEF UNICODE}
- ACTCTX = ACTCTXW;
- {$EXTERNALSYM ACTCTX}
- PACTCTX = PACTCTXW;
- {$EXTERNALSYM PACTCTX}
- TActCtx = TActCtxW;
- {$ELSE}
- ACTCTX = ACTCTXA;
- {$EXTERNALSYM ACTCTX}
- PACTCTX = PACTCTXA;
- {$EXTERNALSYM PACTCTX}
- TActCtx = TActCtxA;
- {$ENDIF UNICODE}
-
-function CreateActCtxA(var pActCtx: ACTCTXA): HANDLE; stdcall;
-{$EXTERNALSYM CreateActCtxA}
-function CreateActCtxW(var pActCtx: ACTCTXW): HANDLE; stdcall;
-{$EXTERNALSYM CreateActCtxW}
-function CreateActCtx(var pActCtx: ACTCTX): HANDLE; stdcall;
-{$EXTERNALSYM CreateActCtx}
-
-procedure AddRefActCtx(hActCtx: HANDLE); stdcall;
-{$EXTERNALSYM AddRefActCtx}
-
-procedure ReleaseActCtx(hActCtx: HANDLE); stdcall;
-{$EXTERNALSYM ReleaseActCtx}
-
-function ZombifyActCtx(hActCtx: HANDLE): BOOL; stdcall;
-{$EXTERNALSYM ZombifyActCtx}
-
-function ActivateActCtx(hActCtx: HANDLE; var lpCookie: ULONG_PTR): BOOL; stdcall;
-{$EXTERNALSYM ActivateActCtx}
-
-const
- DEACTIVATE_ACTCTX_FLAG_FORCE_EARLY_DEACTIVATION = $00000001;
- {$EXTERNALSYM DEACTIVATE_ACTCTX_FLAG_FORCE_EARLY_DEACTIVATION}
-
-function DeactivateActCtx(dwFlags: DWORD; ulCookie: ULONG_PTR): BOOL; stdcall;
-{$EXTERNALSYM DeactivateActCtx}
-
-function GetCurrentActCtx(var lphActCtx: HANDLE): BOOL; stdcall;
-{$EXTERNALSYM GetCurrentActCtx}
-
-type
- tagACTCTX_SECTION_KEYED_DATA_2600 = record
- cbSize: ULONG;
- ulDataFormatVersion: ULONG;
- lpData: PVOID;
- ulLength: ULONG;
- lpSectionGlobalData: PVOID;
- ulSectionGlobalDataLength: ULONG;
- lpSectionBase: PVOID;
- ulSectionTotalLength: ULONG;
- hActCtx: HANDLE;
- ulAssemblyRosterIndex: ULONG;
- end;
- {$EXTERNALSYM tagACTCTX_SECTION_KEYED_DATA_2600}
- ACTCTX_SECTION_KEYED_DATA_2600 = tagACTCTX_SECTION_KEYED_DATA_2600;
- {$EXTERNALSYM ACTCTX_SECTION_KEYED_DATA_2600}
- PACTCTX_SECTION_KEYED_DATA_2600 = ^ACTCTX_SECTION_KEYED_DATA_2600;
- {$EXTERNALSYM PACTCTX_SECTION_KEYED_DATA_2600}
- PCACTCTX_SECTION_KEYED_DATA_2600 = ^ACTCTX_SECTION_KEYED_DATA_2600;
- {$EXTERNALSYM PCACTCTX_SECTION_KEYED_DATA_2600}
- TActCtxSectionKeyedData2600 = ACTCTX_SECTION_KEYED_DATA_2600;
- PActCtxSectionKeyedData2600 = PACTCTX_SECTION_KEYED_DATA_2600;
-
- tagACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA = record
- lpInformation: PVOID;
- lpSectionBase: PVOID;
- ulSectionLength: ULONG;
- lpSectionGlobalDataBase: PVOID;
- ulSectionGlobalDataLength: ULONG;
- end;
- {$EXTERNALSYM tagACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA}
- ACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA = tagACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA;
- {$EXTERNALSYM ACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA}
- PACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA = ^ACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA;
- {$EXTERNALSYM PACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA}
- PCACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA = ^ACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA;
- {$EXTERNALSYM PCACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA}
- TActCtxSectionKeyedDataAssemblyMetadata = ACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA;
- PActCtxSectionKeyedDataAssemblyMetadata = PACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA;
-
- tagACTCTX_SECTION_KEYED_DATA = record
- cbSize: ULONG;
- ulDataFormatVersion: ULONG;
- lpData: PVOID;
- ulLength: ULONG;
- lpSectionGlobalData: PVOID;
- ulSectionGlobalDataLength: ULONG;
- lpSectionBase: PVOID;
- ulSectionTotalLength: ULONG;
- hActCtx: HANDLE;
- ulAssemblyRosterIndex: ULONG;
- // 2600 stops here
- ulFlags: ULONG;
- AssemblyMetadata: ACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA;
- end;
- {$EXTERNALSYM tagACTCTX_SECTION_KEYED_DATA}
- ACTCTX_SECTION_KEYED_DATA = tagACTCTX_SECTION_KEYED_DATA;
- {$EXTERNALSYM ACTCTX_SECTION_KEYED_DATA}
- PACTCTX_SECTION_KEYED_DATA = ^ACTCTX_SECTION_KEYED_DATA;
- {$EXTERNALSYM PACTCTX_SECTION_KEYED_DATA}
- PCACTCTX_SECTION_KEYED_DATA = ^ACTCTX_SECTION_KEYED_DATA;
- {$EXTERNALSYM PCACTCTX_SECTION_KEYED_DATA}
- TActCtxSectionKeyedData = ACTCTX_SECTION_KEYED_DATA;
- PActCtxSectionKeyedData = PACTCTX_SECTION_KEYED_DATA;
-
-const
- FIND_ACTCTX_SECTION_KEY_RETURN_HACTCTX = $00000001;
- {$EXTERNALSYM FIND_ACTCTX_SECTION_KEY_RETURN_HACTCTX}
- FIND_ACTCTX_SECTION_KEY_RETURN_FLAGS = $00000002;
- {$EXTERNALSYM FIND_ACTCTX_SECTION_KEY_RETURN_FLAGS}
- FIND_ACTCTX_SECTION_KEY_RETURN_ASSEMBLY_METADATA = $00000004;
- {$EXTERNALSYM FIND_ACTCTX_SECTION_KEY_RETURN_ASSEMBLY_METADATA}
-
-function FindActCtxSectionStringA(dwFlags: DWORD; const lpExtensionGuid: TGUID;
- ulSectionId: ULONG; lpStringToFind: LPCSTR; ReturnedData: PACTCTX_SECTION_KEYED_DATA): BOOL; stdcall;
-{$EXTERNALSYM FindActCtxSectionStringA}
-function FindActCtxSectionStringW(dwFlags: DWORD; const lpExtensionGuid: TGUID;
- ulSectionId: ULONG; lpStringToFind: LPCWSTR; ReturnedData: PACTCTX_SECTION_KEYED_DATA): BOOL; stdcall;
-{$EXTERNALSYM FindActCtxSectionStringW}
-function FindActCtxSectionString(dwFlags: DWORD; const lpExtensionGuid: TGUID;
- ulSectionId: ULONG; lpStringToFind: LPCTSTR; ReturnedData: PACTCTX_SECTION_KEYED_DATA): BOOL; stdcall;
-{$EXTERNALSYM FindActCtxSectionString}
-
-function FindActCtxSectionGuid(dwFlags: DWORD; const lpExtensionGuid: TGUID;
- ulSectionId: ULONG; const lpGuidToFind: TGUID; ReturnedData: PACTCTX_SECTION_KEYED_DATA): BOOL; stdcall;
-{$EXTERNALSYM FindActCtxSectionGuid}
-
-type
- _ACTIVATION_CONTEXT_BASIC_INFORMATION = record
- hActCtx: HANDLE;
- dwFlags: DWORD;
- end;
- {$EXTERNALSYM _ACTIVATION_CONTEXT_BASIC_INFORMATION}
- ACTIVATION_CONTEXT_BASIC_INFORMATION = _ACTIVATION_CONTEXT_BASIC_INFORMATION;
- {$EXTERNALSYM ACTIVATION_CONTEXT_BASIC_INFORMATION}
- PACTIVATION_CONTEXT_BASIC_INFORMATION = ^ACTIVATION_CONTEXT_BASIC_INFORMATION;
- {$EXTERNALSYM PACTIVATION_CONTEXT_BASIC_INFORMATION}
- TActivationContextBasicInformation = ACTIVATION_CONTEXT_BASIC_INFORMATION;
- PActivationContextBasicInformation = PACTIVATION_CONTEXT_BASIC_INFORMATION;
-
- PCACTIVATION_CONTEXT_BASIC_INFORMATION = ^_ACTIVATION_CONTEXT_BASIC_INFORMATION;
- {$EXTERNALSYM PCACTIVATION_CONTEXT_BASIC_INFORMATION}
-
-const
- ACTIVATION_CONTEXT_BASIC_INFORMATION_DEFINED = 1;
- {$EXTERNALSYM ACTIVATION_CONTEXT_BASIC_INFORMATION_DEFINED}
-
- QUERY_ACTCTX_FLAG_USE_ACTIVE_ACTCTX = $00000004;
- {$EXTERNALSYM QUERY_ACTCTX_FLAG_USE_ACTIVE_ACTCTX}
- QUERY_ACTCTX_FLAG_ACTCTX_IS_HMODULE = $00000008;
- {$EXTERNALSYM QUERY_ACTCTX_FLAG_ACTCTX_IS_HMODULE}
- QUERY_ACTCTX_FLAG_ACTCTX_IS_ADDRESS = $00000010;
- {$EXTERNALSYM QUERY_ACTCTX_FLAG_ACTCTX_IS_ADDRESS}
- QUERY_ACTCTX_FLAG_NO_ADDREF = $80000000;
- {$EXTERNALSYM QUERY_ACTCTX_FLAG_NO_ADDREF}
-
-//
-// switch (ulInfoClass)
-//
-// case ActivationContextBasicInformation:
-// pvSubInstance == NULL
-// pvBuffer is of type PACTIVATION_CONTEXT_BASIC_INFORMATION
-//
-// case ActivationContextDetailedInformation:
-// pvSubInstance == NULL
-// pvBuffer is of type PACTIVATION_CONTEXT_DETAILED_INFORMATION
-//
-// case AssemblyDetailedInformationInActivationContext:
-// pvSubInstance is of type PULONG
-// *pvSubInstance < ACTIVATION_CONTEXT_DETAILED_INFORMATION::ulAssemblyCount
-// pvBuffer is of type PACTIVATION_CONTEXT_ASSEMBLY_DETAILED_INFORMATION
-//
-// case FileInformationInAssemblyOfAssemblyInActivationContext:
-// pvSubInstance is of type PACTIVATION_CONTEXT_QUERY_INDEX
-// pvSubInstance->ulAssemblyIndex < ACTIVATION_CONTEXT_DETAILED_INFORMATION::ulAssemblyCount
-// pvSubInstance->ulFileIndexInAssembly < ACTIVATION_CONTEXT_ASSEMBLY_DETAILED_INFORMATION::ulFileCount
-// pvBuffer is of type PASSEMBLY_FILE_DETAILED_INFORMATION
-//
-// String are placed after the structs.
-//
-
-function QueryActCtxW(dwFlags: DWORD; hActCtx: HANDLE; pvSubInstance: PVOID;
- ulInfoClass: ULONG; pvBuffer: PVOID; cbBuffer: SIZE_T;
- pcbWrittenOrRequired: PSIZE_T): BOOL; stdcall;
-{$EXTERNALSYM QueryActCtxW}
-
-type
- PQUERYACTCTXW_FUNC = function(dwFlags: DWORD; hActCtx: HANDLE;
- pvSubInstance: PVOID; ulInfoClass: ULONG; pvBuffer: PVOID; cbBuffer: SIZE_T;
- pcbWrittenOrRequired: PSIZE_T): BOOL; stdcall;
- {$EXTERNALSYM PQUERYACTCTXW_FUNC}
-
-function ProcessIdToSessionId(dwProcessId: DWORD; var pSessionId: DWORD): BOOL; stdcall;
-{$EXTERNALSYM ProcessIdToSessionId}
-
-function WTSGetActiveConsoleSessionId: DWORD; stdcall;
-{$EXTERNALSYM WTSGetActiveConsoleSessionId}
-
-function IsWow64Process(hProcess: HANDLE; var Wow64Process: BOOL): BOOL; stdcall;
-{$EXTERNALSYM IsWow64Process}
-
-function GetLogicalProcessorInformation(Buffer: PSYSTEM_LOGICAL_PROCESSOR_INFORMATION; ReturnedLength: PDWORD): BOOL; stdcall;
-{$EXTERNALSYM GetLogicalProcessorInformation}
-
-//
-// NUMA Information routines.
-//
-
-function GetNumaHighestNodeNumber(var HighestNodeNumber: ULONG): BOOL; stdcall;
-{$EXTERNALSYM GetNumaHighestNodeNumber}
-
-function GetNumaProcessorNode(Processor: UCHAR; var NodeNumber: UCHAR): BOOL; stdcall;
-{$EXTERNALSYM GetNumaProcessorNode}
-
-function GetNumaNodeProcessorMask(Node: UCHAR; ProcessorMask: ULONGLONG): BOOL; stdcall;
-{$EXTERNALSYM GetNumaNodeProcessorMask}
-
-function GetNumaAvailableMemoryNode(Node: UCHAR; var AvailableBytes: ULONGLONG): BOOL; stdcall;
-{$EXTERNALSYM GetNumaAvailableMemoryNode}
-
-implementation
-
-const
- kernel32 = 'kernel32.dll';
- advapi32 = 'advapi32.dll';
- {$IFDEF UNICODE}
- AWSuffix = 'W';
- {$ELSE}
- AWSuffix = 'A';
- {$ENDIF UNICODE}
-
-procedure MoveMemory(Destination, Source: PVOID; Length: SIZE_T);
-begin
- Move(Source^, Destination^, Length);
-end;
-
-procedure CopyMemory(Destination, Source: PVOID; Length: SIZE_T);
-begin
- Move(Source^, Destination^, Length);
-end;
-
-procedure FillMemory(Destination: PVOID; Length: SIZE_T; Fill: BYTE);
-begin
- FillChar(Destination^, Length, Fill);
-end;
-
-procedure ZeroMemory(Destination: PVOID; Length: SIZE_T);
-begin
- FillChar(Destination^, Length, 0);
-end;
-
-function FreeModule(hLibModule: HMODULE): BOOL;
-begin
- Result := FreeLibrary(hLibModule);
-end;
-
-function MakeProcInstance(lpProc: FARPROC; hInstance: HINSTANCE): FARPROC;
-begin
- Result := lpProc;
-end;
-
-procedure FreeProcInstance(lpProc: FARPROC);
-begin
- { nothing }
-end;
-
-function GlobalLRUNewest(h: HANDLE): HANDLE;
-begin
- Result := H;
-end;
-
-function GlobalLRUOldest(h: HANDLE): HANDLE;
-begin
- Result := H;
-end;
-
-function GlobalDiscard(h: HANDLE): HANDLE;
-begin
- Result := GlobalReAlloc(h, 0, GMEM_MOVEABLE);
-end;
-
-function LocalDiscard(h: HLOCAL): HLOCAL;
-begin
- Result := LocalReAlloc(h, 0, LMEM_MOVEABLE);
-end;
-
-function GetFreeSpace(w: WORD): DWORD;
-begin
- Result := $100000;
-end;
-
-function InterlockedExchangePointer(var Target: PVOID; Value: PVOID): PVOID;
-begin
- Result := PVOID(InterlockedExchange(LONG(Target), LONG(Value)));
-end;
-
-function InterlockedCompareExchangePointer(var Destination: PVOID; Exchange, Comperand: PVOID): PVOID;
-begin
- Result := PVOID(InterlockedCompareExchange(LONG(Destination), LONG(Exchange), LONG(Comperand)));
-end;
-
-function UnlockResource(hResData: HANDLE): BOOL;
-begin
- Result := False;
-end;
-
-function HasOverlappedIoCompleted(const lpOverlapped: OVERLAPPED): BOOL;
-begin
- Result := NTSTATUS(lpOverlapped.Internal) <> STATUS_PENDING;
-end;
-
-// 64 bit interlocked functions from Will
-
-function InterlockedAnd64(var Destination: LONGLONG; Value: LONGLONG): LONGLONG;
-begin
- repeat
- Result := Destination;
- until (InterlockedCompareExchange64(Destination, Result and Value, Result) = Result);
-end;
-
-function InterlockedOr64(var Destination: LONGLONG; Value: LONGLONG): LONGLONG;
-begin
- repeat
- Result := Destination;
- until (InterlockedCompareExchange64(Destination, Result or Value, Result) = Result);
-end;
-
-function InterlockedXor64(var Destination: LONGLONG; Value: LONGLONG): LONGLONG;
-begin
- repeat
- Result := Destination;
- until (InterlockedCompareExchange64(Destination, Result xor Value, Result) = Result);
-end;
-
-function InterlockedIncrement64(var Addend: LONGLONG): LONGLONG;
-begin
- repeat
- Result := Addend;
- until (InterlockedCompareExchange64(Addend, Result + 1, Result) = Result);
- Inc(Result);
-end;
-
-function InterlockedDecrement64(var Addend: LONGLONG): LONGLONG;
-begin
- repeat
- Result := Addend;
- until (InterlockedCompareExchange64(Addend, Result - 1, Result) = Result);
- Dec(Result);
-end;
-
-function InterlockedExchange64(var Target: LONGLONG; Value: LONGLONG): LONGLONG;
-begin
- repeat
- Result := Target;
- until (InterlockedCompareExchange64(Target, Value, Result) = Result);
-end;
-
-function InterlockedExchangeAdd64(var Addend: LONGLONG; Value: LONGLONG): LONGLONG;
-begin
- repeat
- Result := Addend;
- until (InterlockedCompareExchange64(Addend, Result + Value, Result) = Result);
-end;
-
-{ MVB:
- The implementation of CreateMutex only interpretes bInitialOwner as True if
- it's ordinal value is 1, all other values are interpreted as False. Delphi
- compiles Longbool(True) as $FFFFFFFF which is consequently interpreted as
- False. Changing the bInitalOwner parameter type to Boolean fixes the problem
- (Boolean(True) = 1) but that would be implementation specific and might break
- in the future, though unlikely. Hence the CreateMutex function here which
- explicitly passes LongBool(1) instead of LongBool(True). }
-
-type
- TCreateMutexA = function(lpMutexAttributes: LPSECURITY_ATTRIBUTES; bInitialOwner: LongBool; lpName: LPCSTR): HANDLE; stdcall;
- TCreateMutexW = function(lpMutexAttributes: LPSECURITY_ATTRIBUTES; bInitialOwner: LongBool; lpName: LPCWSTR): HANDLE; stdcall;
-
-var
- _CreateMutexA: Pointer;
- _CreateMutexW: Pointer;
-
-function CreateMutexA(lpMutexAttributes: LPSECURITY_ATTRIBUTES; bInitialOwner: BOOL; lpName: LPCSTR): HANDLE;
-begin
- GetProcedureAddress(_CreateMutexA, kernel32, 'CreateMutexA');
- if bInitialOwner then
- Result := TCreateMutexA(_CreateMutexA)(lpMutexAttributes, LongBool(1), lpName)
- else
- Result := TCreateMutexA(_CreateMutexA)(lpMutexAttributes, LongBool(0), lpName)
-end;
-
-function CreateMutexW(lpMutexAttributes: LPSECURITY_ATTRIBUTES; bInitialOwner: BOOL; lpName: LPCWSTR): HANDLE;
-begin
- GetProcedureAddress(_CreateMutexW, kernel32, 'CreateMutexW');
- if bInitialOwner then
- Result := TCreateMutexW(_CreateMutexW)(lpMutexAttributes, LongBool(1), lpName)
- else
- Result := TCreateMutexW(_CreateMutexW)(lpMutexAttributes, LongBool(0), lpName)
-end;
-
-{$IFDEF UNICODE}
-function CreateMutex(lpMutexAttributes: LPSECURITY_ATTRIBUTES; bInitialOwner: BOOL; lpName: LPCWSTR): HANDLE;
-begin
- GetProcedureAddress(_CreateMutexW, kernel32, 'CreateMutexW');
- if bInitialOwner then
- Result := TCreateMutexW(_CreateMutexW)(lpMutexAttributes, LongBool(1), lpName)
- else
- Result := TCreateMutexW(_CreateMutexW)(lpMutexAttributes, LongBool(0), lpName)
-end;
-{$ELSE}
-function CreateMutex(lpMutexAttributes: LPSECURITY_ATTRIBUTES; bInitialOwner: BOOL; lpName: LPCSTR): HANDLE;
-begin
- GetProcedureAddress(_CreateMutexA, kernel32, 'CreateMutexA');
- if bInitialOwner then
- Result := TCreateMutexA(_CreateMutexA)(lpMutexAttributes, LongBool(1), lpName)
- else
- Result := TCreateMutexA(_CreateMutexA)(lpMutexAttributes, LongBool(0), lpName)
-end;
-{$ENDIF UNICODE}
-
-{$IFDEF DYNAMIC_LINK}
-
-var
- _InterlockedCompareExchange64: Pointer;
-
-function InterlockedCompareExchange64;
-begin
- GetProcedureAddress(_InterlockedCompareExchange64, kernel32, 'InterlockedCompareExchange64');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_InterlockedCompareExchange64]
- end;
-end;
-
-var
- _InterlockedIncrement: Pointer;
-
-function InterlockedIncrement;
-begin
- GetProcedureAddress(_InterlockedIncrement, kernel32, 'InterlockedIncrement');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_InterlockedIncrement]
- end;
-end;
-
-var
- _InterlockedDecrement: Pointer;
-
-function InterlockedDecrement;
-begin
- GetProcedureAddress(_InterlockedDecrement, kernel32, 'InterlockedDecrement');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_InterlockedDecrement]
- end;
-end;
-
-var
- _InterlockedExchange: Pointer;
-
-function InterlockedExchange;
-begin
- GetProcedureAddress(_InterlockedExchange, kernel32, 'InterlockedExchange');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_InterlockedExchange]
- end;
-end;
-
-var
- _InterlockedExchangeAdd: Pointer;
-
-function InterlockedExchangeAdd;
-begin
- GetProcedureAddress(_InterlockedExchangeAdd, kernel32, 'InterlockedExchangeAdd');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_InterlockedExchangeAdd]
- end;
-end;
-
-var
- _InterlockedCompareExchange: Pointer;
-
-function InterlockedCompareExchange;
-begin
- GetProcedureAddress(_InterlockedCompareExchange, kernel32, 'InterlockedCompareExchange');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_InterlockedCompareExchange]
- end;
-end;
-
-var
- _InitializeSListHead: Pointer;
-
-procedure InitializeSListHead;
-begin
- GetProcedureAddress(_InitializeSListHead, kernel32, 'InitializeSListHead');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_InitializeSListHead]
- end;
-end;
-
-var
- _InterlockedPopEntrySList: Pointer;
-
-function InterlockedPopEntrySList;
-begin
- GetProcedureAddress(_InterlockedPopEntrySList, kernel32, 'InterlockedPopEntrySList');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_InterlockedPopEntrySList]
- end;
-end;
-
-var
- _InterlockedPushEntrySList: Pointer;
-
-function InterlockedPushEntrySList;
-begin
- GetProcedureAddress(_InterlockedPushEntrySList, kernel32, 'InterlockedPushEntrySList');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_InterlockedPushEntrySList]
- end;
-end;
-
-var
- _InterlockedFlushSList: Pointer;
-
-function InterlockedFlushSList;
-begin
- GetProcedureAddress(_InterlockedFlushSList, kernel32, 'InterlockedFlushSList');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_InterlockedFlushSList]
- end;
-end;
-
-var
- _QueryDepthSList: Pointer;
-
-function QueryDepthSList;
-begin
- GetProcedureAddress(_QueryDepthSList, kernel32, 'QueryDepthSList');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_QueryDepthSList]
- end;
-end;
-
-var
- _FreeResource: Pointer;
-
-function FreeResource;
-begin
- GetProcedureAddress(_FreeResource, kernel32, 'FreeResource');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_FreeResource]
- end;
-end;
-
-var
- _LockResource: Pointer;
-
-function LockResource;
-begin
- GetProcedureAddress(_LockResource, kernel32, 'LockResource');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_LockResource]
- end;
-end;
-
-var
- _FreeLibrary: Pointer;
-
-function FreeLibrary;
-begin
- GetProcedureAddress(_FreeLibrary, kernel32, 'FreeLibrary');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_FreeLibrary]
- end;
-end;
-
-var
- _FreeLibraryAndExitThread: Pointer;
-
-procedure FreeLibraryAndExitThread;
-begin
- GetProcedureAddress(_FreeLibraryAndExitThread, kernel32, 'FreeLibraryAndExitThread');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_FreeLibraryAndExitThread]
- end;
-end;
-
-var
- _DisableThreadLibraryCalls: Pointer;
-
-function DisableThreadLibraryCalls;
-begin
- GetProcedureAddress(_DisableThreadLibraryCalls, kernel32, 'DisableThreadLibraryCalls');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DisableThreadLibraryCalls]
- end;
-end;
-
-// MVB TODO Dynamic linking for GetProcAddress doesn't make much sense, does it? Same for LoadLibrary.
-
-var
- _GetProcAddress: Pointer;
-
-function GetProcAddress;
-begin
- GetProcedureAddress(_GetProcAddress, kernel32, 'GetProcAddress');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetProcAddress]
- end;
-end;
-
-var
- _GetVersion: Pointer;
-
-function GetVersion;
-begin
- GetProcedureAddress(_GetVersion, kernel32, 'GetVersion');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetVersion]
- end;
-end;
-
-var
- _GlobalAlloc: Pointer;
-
-function GlobalAlloc;
-begin
- GetProcedureAddress(_GlobalAlloc, kernel32, 'GlobalAlloc');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GlobalAlloc]
- end;
-end;
-
-var
- _GlobalReAlloc: Pointer;
-
-function GlobalReAlloc;
-begin
- GetProcedureAddress(_GlobalReAlloc, kernel32, 'GlobalReAlloc');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GlobalReAlloc]
- end;
-end;
-
-var
- _GlobalSize: Pointer;
-
-function GlobalSize;
-begin
- GetProcedureAddress(_GlobalSize, kernel32, 'GlobalSize');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GlobalSize]
- end;
-end;
-
-var
- _GlobalFlags: Pointer;
-
-function GlobalFlags;
-begin
- GetProcedureAddress(_GlobalFlags, kernel32, 'GlobalFlags');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GlobalFlags]
- end;
-end;
-
-var
- _GlobalLock: Pointer;
-
-function GlobalLock;
-begin
- GetProcedureAddress(_GlobalLock, kernel32, 'GlobalLock');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GlobalLock]
- end;
-end;
-
-var
- _GlobalHandle: Pointer;
-
-function GlobalHandle;
-begin
- GetProcedureAddress(_GlobalHandle, kernel32, 'GlobalHandle');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GlobalHandle]
- end;
-end;
-
-var
- _GlobalUnlock: Pointer;
-
-function GlobalUnlock;
-begin
- GetProcedureAddress(_GlobalUnlock, kernel32, 'GlobalUnlock');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GlobalUnlock]
- end;
-end;
-
-var
- _GlobalFree: Pointer;
-
-function GlobalFree;
-begin
- GetProcedureAddress(_GlobalFree, kernel32, 'GlobalFree');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GlobalFree]
- end;
-end;
-
-var
- _GlobalCompact: Pointer;
-
-function GlobalCompact;
-begin
- GetProcedureAddress(_GlobalCompact, kernel32, 'GlobalCompact');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GlobalCompact]
- end;
-end;
-
-var
- _GlobalFix: Pointer;
-
-procedure GlobalFix;
-begin
- GetProcedureAddress(_GlobalFix, kernel32, 'GlobalFix');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GlobalFix]
- end;
-end;
-
-var
- _GlobalUnfix: Pointer;
-
-procedure GlobalUnfix;
-begin
- GetProcedureAddress(_GlobalUnfix, kernel32, 'GlobalUnfix');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GlobalUnfix]
- end;
-end;
-
-var
- _GlobalWire: Pointer;
-
-function GlobalWire;
-begin
- GetProcedureAddress(_GlobalWire, kernel32, 'GlobalWire');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GlobalWire]
- end;
-end;
-
-var
- _GlobalUnWire: Pointer;
-
-function GlobalUnWire;
-begin
- GetProcedureAddress(_GlobalUnWire, kernel32, 'GlobalUnWire');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GlobalUnWire]
- end;
-end;
-
-var
- _GlobalMemoryStatus: Pointer;
-
-procedure GlobalMemoryStatus;
-begin
- GetProcedureAddress(_GlobalMemoryStatus, kernel32, 'GlobalMemoryStatus');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GlobalMemoryStatus]
- end;
-end;
-
-var
- _GlobalMemoryStatusEx: Pointer;
-
-function GlobalMemoryStatusEx;
-begin
- GetProcedureAddress(_GlobalMemoryStatusEx, kernel32, 'GlobalMemoryStatusEx');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GlobalMemoryStatusEx]
- end;
-end;
-
-var
- _LocalAlloc: Pointer;
-
-function LocalAlloc;
-begin
- GetProcedureAddress(_LocalAlloc, kernel32, 'LocalAlloc');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_LocalAlloc]
- end;
-end;
-
-var
- _LocalReAlloc: Pointer;
-
-function LocalReAlloc;
-begin
- GetProcedureAddress(_LocalReAlloc, kernel32, 'LocalReAlloc');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_LocalReAlloc]
- end;
-end;
-
-var
- _LocalLock: Pointer;
-
-function LocalLock;
-begin
- GetProcedureAddress(_LocalLock, kernel32, 'LocalLock');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_LocalLock]
- end;
-end;
-
-var
- _LocalHandle: Pointer;
-
-function LocalHandle;
-begin
- GetProcedureAddress(_LocalHandle, kernel32, 'LocalHandle');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_LocalHandle]
- end;
-end;
-
-var
- _LocalUnlock: Pointer;
-
-function LocalUnlock;
-begin
- GetProcedureAddress(_LocalUnlock, kernel32, 'LocalUnlock');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_LocalUnlock]
- end;
-end;
-
-var
- _LocalSize: Pointer;
-
-function LocalSize;
-begin
- GetProcedureAddress(_LocalSize, kernel32, 'LocalSize');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_LocalSize]
- end;
-end;
-
-var
- _LocalFlags: Pointer;
-
-function LocalFlags;
-begin
- GetProcedureAddress(_LocalFlags, kernel32, 'LocalFlags');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_LocalFlags]
- end;
-end;
-
-var
- _LocalFree: Pointer;
-
-function LocalFree;
-begin
- GetProcedureAddress(_LocalFree, kernel32, 'LocalFree');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_LocalFree]
- end;
-end;
-
-var
- _LocalShrink: Pointer;
-
-function LocalShrink;
-begin
- GetProcedureAddress(_LocalShrink, kernel32, 'LocalShrink');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_LocalShrink]
- end;
-end;
-
-var
- _LocalCompact: Pointer;
-
-function LocalCompact;
-begin
- GetProcedureAddress(_LocalCompact, kernel32, 'LocalCompact');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_LocalCompact]
- end;
-end;
-
-var
- _FlushInstructionCache: Pointer;
-
-function FlushInstructionCache;
-begin
- GetProcedureAddress(_FlushInstructionCache, kernel32, 'FlushInstructionCache');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_FlushInstructionCache]
- end;
-end;
-
-var
- _VirtualAlloc: Pointer;
-
-function VirtualAlloc;
-begin
- GetProcedureAddress(_VirtualAlloc, kernel32, 'VirtualAlloc');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_VirtualAlloc]
- end;
-end;
-
-var
- _VirtualFree: Pointer;
-
-function VirtualFree;
-begin
- GetProcedureAddress(_VirtualFree, kernel32, 'VirtualFree');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_VirtualFree]
- end;
-end;
-
-var
- _VirtualProtect: Pointer;
-
-function VirtualProtect;
-begin
- GetProcedureAddress(_VirtualProtect, kernel32, 'VirtualProtect');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_VirtualProtect]
- end;
-end;
-
-var
- _VirtualQuery: Pointer;
-
-function VirtualQuery;
-begin
- GetProcedureAddress(_VirtualQuery, kernel32, 'VirtualQuery');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_VirtualQuery]
- end;
-end;
-
-var
- _VirtualAllocEx: Pointer;
-
-function VirtualAllocEx;
-begin
- GetProcedureAddress(_VirtualAllocEx, kernel32, 'VirtualAllocEx');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_VirtualAllocEx]
- end;
-end;
-
-var
- _GetWriteWatch: Pointer;
-
-function GetWriteWatch;
-begin
- GetProcedureAddress(_GetWriteWatch, kernel32, 'GetWriteWatch');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetWriteWatch]
- end;
-end;
-
-var
- _ResetWriteWatch: Pointer;
-
-function ResetWriteWatch;
-begin
- GetProcedureAddress(_ResetWriteWatch, kernel32, 'ResetWriteWatch');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ResetWriteWatch]
- end;
-end;
-
-var
- _GetLargePageMinimum: Pointer;
-
-function GetLargePageMinimum;
-begin
- GetProcedureAddress(_GetLargePageMinimum, kernel32, 'GetLargePageMinimum');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetLargePageMinimum]
- end;
-end;
-
-var
- _VirtualFreeEx: Pointer;
-
-function VirtualFreeEx;
-begin
- GetProcedureAddress(_VirtualFreeEx, kernel32, 'VirtualFreeEx');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_VirtualFreeEx]
- end;
-end;
-
-var
- _VirtualProtectEx: Pointer;
-
-function VirtualProtectEx;
-begin
- GetProcedureAddress(_VirtualProtectEx, kernel32, 'VirtualProtectEx');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_VirtualProtectEx]
- end;
-end;
-
-var
- _VirtualQueryEx: Pointer;
-
-function VirtualQueryEx;
-begin
- GetProcedureAddress(_VirtualQueryEx, kernel32, 'VirtualQueryEx');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_VirtualQueryEx]
- end;
-end;
-
-var
- _HeapCreate: Pointer;
-
-function HeapCreate;
-begin
- GetProcedureAddress(_HeapCreate, kernel32, 'HeapCreate');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_HeapCreate]
- end;
-end;
-
-var
- _HeapDestroy: Pointer;
-
-function HeapDestroy;
-begin
- GetProcedureAddress(_HeapDestroy, kernel32, 'HeapDestroy');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_HeapDestroy]
- end;
-end;
-
-var
- _HeapAlloc: Pointer;
-
-function HeapAlloc;
-begin
- GetProcedureAddress(_HeapAlloc, kernel32, 'HeapAlloc');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_HeapAlloc]
- end;
-end;
-
-var
- _HeapReAlloc: Pointer;
-
-function HeapReAlloc;
-begin
- GetProcedureAddress(_HeapReAlloc, kernel32, 'HeapReAlloc');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_HeapReAlloc]
- end;
-end;
-
-var
- _HeapFree: Pointer;
-
-function HeapFree;
-begin
- GetProcedureAddress(_HeapFree, kernel32, 'HeapFree');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_HeapFree]
- end;
-end;
-
-var
- _HeapSize: Pointer;
-
-function HeapSize;
-begin
- GetProcedureAddress(_HeapSize, kernel32, 'HeapSize');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_HeapSize]
- end;
-end;
-
-var
- _HeapValidate: Pointer;
-
-function HeapValidate;
-begin
- GetProcedureAddress(_HeapValidate, kernel32, 'HeapValidate');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_HeapValidate]
- end;
-end;
-
-var
- _HeapCompact: Pointer;
-
-function HeapCompact;
-begin
- GetProcedureAddress(_HeapCompact, kernel32, 'HeapCompact');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_HeapCompact]
- end;
-end;
-
-var
- _GetProcessHeap: Pointer;
-
-function GetProcessHeap;
-begin
- GetProcedureAddress(_GetProcessHeap, kernel32, 'GetProcessHeap');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetProcessHeap]
- end;
-end;
-
-var
- _GetProcessHeaps: Pointer;
-
-function GetProcessHeaps;
-begin
- GetProcedureAddress(_GetProcessHeaps, kernel32, 'GetProcessHeaps');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetProcessHeaps]
- end;
-end;
-
-var
- _HeapLock: Pointer;
-
-function HeapLock;
-begin
- GetProcedureAddress(_HeapLock, kernel32, 'HeapLock');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_HeapLock]
- end;
-end;
-
-var
- _HeapUnlock: Pointer;
-
-function HeapUnlock;
-begin
- GetProcedureAddress(_HeapUnlock, kernel32, 'HeapUnlock');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_HeapUnlock]
- end;
-end;
-
-var
- _HeapWalk: Pointer;
-
-function HeapWalk;
-begin
- GetProcedureAddress(_HeapWalk, kernel32, 'HeapWalk');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_HeapWalk]
- end;
-end;
-
-var
- _HeapSetInformation: Pointer;
-
-function HeapSetInformation;
-begin
- GetProcedureAddress(_HeapSetInformation, kernel32, 'HeapSetInformation');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_HeapSetInformation]
- end;
-end;
-
-var
- _HeapQueryInformation: Pointer;
-
-function HeapQueryInformation;
-begin
- GetProcedureAddress(_HeapQueryInformation, kernel32, 'HeapQueryInformation');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_HeapQueryInformation]
- end;
-end;
-
-var
- _GetBinaryTypeA: Pointer;
-
-function GetBinaryTypeA;
-begin
- GetProcedureAddress(_GetBinaryTypeA, kernel32, 'GetBinaryTypeA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetBinaryTypeA]
- end;
-end;
-
-var
- _GetBinaryTypeW: Pointer;
-
-function GetBinaryTypeW;
-begin
- GetProcedureAddress(_GetBinaryTypeW, kernel32, 'GetBinaryTypeW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetBinaryTypeW]
- end;
-end;
-
-var
- _GetBinaryType: Pointer;
-
-function GetBinaryType;
-begin
- GetProcedureAddress(_GetBinaryType, kernel32, 'GetBinaryType' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetBinaryType]
- end;
-end;
-
-var
- _GetShortPathNameA: Pointer;
-
-function GetShortPathNameA;
-begin
- GetProcedureAddress(_GetShortPathNameA, kernel32, 'GetShortPathNameA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetShortPathNameA]
- end;
-end;
-
-var
- _GetShortPathNameW: Pointer;
-
-function GetShortPathNameW;
-begin
- GetProcedureAddress(_GetShortPathNameW, kernel32, 'GetShortPathNameW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetShortPathNameW]
- end;
-end;
-
-var
- _GetShortPathName: Pointer;
-
-function GetShortPathName;
-begin
- GetProcedureAddress(_GetShortPathName, kernel32, 'GetShortPathName' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetShortPathName]
- end;
-end;
-
-var
- _GetLongPathNameA: Pointer;
-
-function GetLongPathNameA;
-begin
- GetProcedureAddress(_GetLongPathNameA, kernel32, 'GetLongPathNameA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetLongPathNameA]
- end;
-end;
-
-var
- _GetLongPathNameW: Pointer;
-
-function GetLongPathNameW;
-begin
- GetProcedureAddress(_GetLongPathNameW, kernel32, 'GetLongPathNameW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetLongPathNameW]
- end;
-end;
-
-var
- _GetLongPathName: Pointer;
-
-function GetLongPathName;
-begin
- GetProcedureAddress(_GetLongPathName, kernel32, 'GetLongPathName' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetLongPathName]
- end;
-end;
-
-var
- _GetProcessAffinityMask: Pointer;
-
-function GetProcessAffinityMask;
-begin
- GetProcedureAddress(_GetProcessAffinityMask, kernel32, 'GetProcessAffinityMask');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetProcessAffinityMask]
- end;
-end;
-
-var
- _SetProcessAffinityMask: Pointer;
-
-function SetProcessAffinityMask;
-begin
- GetProcedureAddress(_SetProcessAffinityMask, kernel32, 'SetProcessAffinityMask');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetProcessAffinityMask]
- end;
-end;
-
-var
- _GetProcessHandleCount: Pointer;
-
-function GetProcessHandleCount;
-begin
- GetProcedureAddress(_GetProcessHandleCount, kernel32, 'GetProcessHandleCount');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetProcessHandleCount]
- end;
-end;
-
-var
- _GetProcessTimes: Pointer;
-
-function GetProcessTimes;
-begin
- GetProcedureAddress(_GetProcessTimes, kernel32, 'GetProcessTimes');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetProcessTimes]
- end;
-end;
-
-var
- _GetProcessIoCounters: Pointer;
-
-function GetProcessIoCounters;
-begin
- GetProcedureAddress(_GetProcessIoCounters, kernel32, 'GetProcessIoCounters');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetProcessIoCounters]
- end;
-end;
-
-var
- _GetProcessWorkingSetSize: Pointer;
-
-function GetProcessWorkingSetSize;
-begin
- GetProcedureAddress(_GetProcessWorkingSetSize, kernel32, 'GetProcessWorkingSetSize');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetProcessWorkingSetSize]
- end;
-end;
-
-var
- _GetProcessWorkingSetSizeEx: Pointer;
-
-function GetProcessWorkingSetSizeEx;
-begin
- GetProcedureAddress(_GetProcessWorkingSetSizeEx, kernel32, 'GetProcessWorkingSetSizeEx');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetProcessWorkingSetSizeEx]
- end;
-end;
-
-var
- _SetProcessWorkingSetSize: Pointer;
-
-function SetProcessWorkingSetSize;
-begin
- GetProcedureAddress(_SetProcessWorkingSetSize, kernel32, 'SetProcessWorkingSetSize');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetProcessWorkingSetSize]
- end;
-end;
-
-var
- _SetProcessWorkingSetSizeEx: Pointer;
-
-function SetProcessWorkingSetSizeEx;
-begin
- GetProcedureAddress(_SetProcessWorkingSetSizeEx, kernel32, 'SetProcessWorkingSetSizeEx');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetProcessWorkingSetSizeEx]
- end;
-end;
-
-var
- _OpenProcess: Pointer;
-
-function OpenProcess;
-begin
- GetProcedureAddress(_OpenProcess, kernel32, 'OpenProcess');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_OpenProcess]
- end;
-end;
-
-var
- _GetCurrentProcess: Pointer;
-
-function GetCurrentProcess;
-begin
- GetProcedureAddress(_GetCurrentProcess, kernel32, 'GetCurrentProcess');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetCurrentProcess]
- end;
-end;
-
-var
- _GetCurrentProcessId: Pointer;
-
-function GetCurrentProcessId;
-begin
- GetProcedureAddress(_GetCurrentProcessId, kernel32, 'GetCurrentProcessId');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetCurrentProcessId]
- end;
-end;
-
-var
- _ExitProcess: Pointer;
-
-procedure ExitProcess;
-begin
- GetProcedureAddress(_ExitProcess, kernel32, 'ExitProcess');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ExitProcess]
- end;
-end;
-
-var
- _TerminateProcess: Pointer;
-
-function TerminateProcess;
-begin
- GetProcedureAddress(_TerminateProcess, kernel32, 'TerminateProcess');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_TerminateProcess]
- end;
-end;
-
-var
- _GetExitCodeProcess: Pointer;
-
-function GetExitCodeProcess;
-begin
- GetProcedureAddress(_GetExitCodeProcess, kernel32, 'GetExitCodeProcess');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetExitCodeProcess]
- end;
-end;
-
-var
- _FatalExit: Pointer;
-
-procedure FatalExit;
-begin
- GetProcedureAddress(_FatalExit, kernel32, 'FatalExit');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_FatalExit]
- end;
-end;
-
-var
- _GetEnvironmentStringsW: Pointer;
-
-function GetEnvironmentStringsW;
-begin
- GetProcedureAddress(_GetEnvironmentStringsW, kernel32, 'GetEnvironmentStringsW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetEnvironmentStringsW]
- end;
-end;
-
-var
- _GetEnvironmentStrings: Pointer;
-
-function GetEnvironmentStrings;
-begin
- GetProcedureAddress(_GetEnvironmentStrings, kernel32, 'GetEnvironmentStrings' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetEnvironmentStrings]
- end;
-end;
-
-{$IFNDEF UNICODE}
-
-var
- _GetEnvironmentStringsA: Pointer;
-
-function GetEnvironmentStringsA;
-begin
- GetProcedureAddress(_GetEnvironmentStringsA, kernel32, 'GetEnvironmentStringsA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetEnvironmentStringsA]
- end;
-end;
-
-{$ENDIF !UNICODE}
-
-var
- _SetEnvironmentStringsA: Pointer;
-
-function SetEnvironmentStringsA;
-begin
- GetProcedureAddress(_SetEnvironmentStringsA, kernel32, 'SetEnvironmentStringsA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetEnvironmentStringsA]
- end;
-end;
-
-var
- _SetEnvironmentStringsW: Pointer;
-
-function SetEnvironmentStringsW;
-begin
- GetProcedureAddress(_SetEnvironmentStringsW, kernel32, 'SetEnvironmentStringsW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetEnvironmentStringsW]
- end;
-end;
-
-var
- _SetEnvironmentStrings: Pointer;
-
-function SetEnvironmentStrings;
-begin
- GetProcedureAddress(_SetEnvironmentStrings, kernel32, 'SetEnvironmentStrings' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetEnvironmentStrings]
- end;
-end;
-
-var
- _FreeEnvironmentStringsA: Pointer;
-
-function FreeEnvironmentStringsA;
-begin
- GetProcedureAddress(_FreeEnvironmentStringsA, kernel32, 'FreeEnvironmentStringsA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_FreeEnvironmentStringsA]
- end;
-end;
-
-var
- _FreeEnvironmentStringsW: Pointer;
-
-function FreeEnvironmentStringsW;
-begin
- GetProcedureAddress(_FreeEnvironmentStringsW, kernel32, 'FreeEnvironmentStringsW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_FreeEnvironmentStringsW]
- end;
-end;
-
-var
- _FreeEnvironmentStrings: Pointer;
-
-function FreeEnvironmentStrings;
-begin
- GetProcedureAddress(_FreeEnvironmentStrings, kernel32, 'FreeEnvironmentStrings' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_FreeEnvironmentStrings]
- end;
-end;
-
-var
- _RaiseException: Pointer;
-
-procedure RaiseException;
-begin
- GetProcedureAddress(_RaiseException, kernel32, 'RaiseException');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RaiseException]
- end;
-end;
-
-var
- _UnhandledExceptionFilter: Pointer;
-
-function UnhandledExceptionFilter;
-begin
- GetProcedureAddress(_UnhandledExceptionFilter, kernel32, 'UnhandledExceptionFilter');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_UnhandledExceptionFilter]
- end;
-end;
-
-var
- _SetUnhandledExceptionFilter: Pointer;
-
-function SetUnhandledExceptionFilter;
-begin
- GetProcedureAddress(_SetUnhandledExceptionFilter, kernel32, 'SetUnhandledExceptionFilter');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetUnhandledExceptionFilter]
- end;
-end;
-
-var
- _CreateFiber: Pointer;
-
-function CreateFiber;
-begin
- GetProcedureAddress(_CreateFiber, kernel32, 'CreateFiber');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreateFiber]
- end;
-end;
-
-var
- _CreateFiberEx: Pointer;
-
-function CreateFiberEx;
-begin
- GetProcedureAddress(_CreateFiberEx, kernel32, 'CreateFiberEx');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreateFiberEx]
- end;
-end;
-
-var
- _DeleteFiber: Pointer;
-
-procedure DeleteFiber;
-begin
- GetProcedureAddress(_DeleteFiber, kernel32, 'DeleteFiber');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DeleteFiber]
- end;
-end;
-
-var
- _ConvertThreadToFiber: Pointer;
-
-function ConvertThreadToFiber;
-begin
- GetProcedureAddress(_ConvertThreadToFiber, kernel32, 'ConvertThreadToFiber');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ConvertThreadToFiber]
- end;
-end;
-
-var
- _ConvertThreadToFiberEx: Pointer;
-
-function ConvertThreadToFiberEx;
-begin
- GetProcedureAddress(_ConvertThreadToFiberEx, kernel32, 'ConvertThreadToFiberEx');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ConvertThreadToFiberEx]
- end;
-end;
-
-var
- _ConvertFiberToThread: Pointer;
-
-function ConvertFiberToThread;
-begin
- GetProcedureAddress(_ConvertFiberToThread, kernel32, 'ConvertFiberToThread');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ConvertFiberToThread]
- end;
-end;
-
-var
- _SwitchToFiber: Pointer;
-
-procedure SwitchToFiber;
-begin
- GetProcedureAddress(_SwitchToFiber, kernel32, 'SwitchToFiber');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SwitchToFiber]
- end;
-end;
-
-var
- _SwitchToThread: Pointer;
-
-function SwitchToThread;
-begin
- GetProcedureAddress(_SwitchToThread, kernel32, 'SwitchToThread');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SwitchToThread]
- end;
-end;
-
-var
- _CreateThread: Pointer;
-
-function CreateThread;
-begin
- GetProcedureAddress(_CreateThread, kernel32, 'CreateThread');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreateThread]
- end;
-end;
-
-var
- _CreateRemoteThread: Pointer;
-
-function CreateRemoteThread;
-begin
- GetProcedureAddress(_CreateRemoteThread, kernel32, 'CreateRemoteThread');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreateRemoteThread]
- end;
-end;
-
-var
- _GetCurrentThread: Pointer;
-
-function GetCurrentThread;
-begin
- GetProcedureAddress(_GetCurrentThread, kernel32, 'GetCurrentThread');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetCurrentThread]
- end;
-end;
-
-var
- _GetCurrentThreadId: Pointer;
-
-function GetCurrentThreadId;
-begin
- GetProcedureAddress(_GetCurrentThreadId, kernel32, 'GetCurrentThreadId');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetCurrentThreadId]
- end;
-end;
-
-var
- _GetProcessIdOfThread: Pointer;
-
-function GetProcessIdOfThread;
-begin
- GetProcedureAddress(_GetProcessIdOfThread, kernel32, 'GetProcessIdOfThread');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetProcessIdOfThread]
- end;
-end;
-
-var
- _GetThreadId: Pointer;
-
-function GetThreadId;
-begin
- GetProcedureAddress(_GetThreadId, kernel32, 'GetThreadId');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetThreadId]
- end;
-end;
-
-var
- _GetProcessId: Pointer;
-
-function GetProcessId;
-begin
- GetProcedureAddress(_GetProcessId, kernel32, 'GetProcessId');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetProcessId]
- end;
-end;
-
-var
- _GetCurrentProcessorNumber: Pointer;
-
-function GetCurrentProcessorNumber;
-begin
- GetProcedureAddress(_GetCurrentProcessorNumber, kernel32, 'GetCurrentProcessorNumber');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetCurrentProcessorNumber]
- end;
-end;
-
-var
- _SetThreadAffinityMask: Pointer;
-
-function SetThreadAffinityMask;
-begin
- GetProcedureAddress(_SetThreadAffinityMask, kernel32, 'SetThreadAffinityMask');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetThreadAffinityMask]
- end;
-end;
-
-var
- _SetThreadIdealProcessor: Pointer;
-
-function SetThreadIdealProcessor;
-begin
- GetProcedureAddress(_SetThreadIdealProcessor, kernel32, 'SetThreadIdealProcessor');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetThreadIdealProcessor]
- end;
-end;
-
-var
- _SetProcessPriorityBoost: Pointer;
-
-function SetProcessPriorityBoost;
-begin
- GetProcedureAddress(_SetProcessPriorityBoost, kernel32, 'SetProcessPriorityBoost');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetProcessPriorityBoost]
- end;
-end;
-
-var
- _GetProcessPriorityBoost: Pointer;
-
-function GetProcessPriorityBoost;
-begin
- GetProcedureAddress(_GetProcessPriorityBoost, kernel32, 'GetProcessPriorityBoost');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetProcessPriorityBoost]
- end;
-end;
-
-var
- _RequestWakeupLatency: Pointer;
-
-function RequestWakeupLatency;
-begin
- GetProcedureAddress(_RequestWakeupLatency, kernel32, 'RequestWakeupLatency');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RequestWakeupLatency]
- end;
-end;
-
-var
- _IsSystemResumeAutomatic: Pointer;
-
-function IsSystemResumeAutomatic;
-begin
- GetProcedureAddress(_IsSystemResumeAutomatic, kernel32, 'IsSystemResumeAutomatic');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_IsSystemResumeAutomatic]
- end;
-end;
-
-var
- _OpenThread: Pointer;
-
-function OpenThread;
-begin
- GetProcedureAddress(_OpenThread, kernel32, 'OpenThread');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_OpenThread]
- end;
-end;
-
-var
- _SetThreadPriority: Pointer;
-
-function SetThreadPriority;
-begin
- GetProcedureAddress(_SetThreadPriority, kernel32, 'SetThreadPriority');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetThreadPriority]
- end;
-end;
-
-var
- _SetThreadPriorityBoost: Pointer;
-
-function SetThreadPriorityBoost;
-begin
- GetProcedureAddress(_SetThreadPriorityBoost, kernel32, 'SetThreadPriorityBoost');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetThreadPriorityBoost]
- end;
-end;
-
-var
- _GetThreadPriorityBoost: Pointer;
-
-function GetThreadPriorityBoost;
-begin
- GetProcedureAddress(_GetThreadPriorityBoost, kernel32, 'GetThreadPriorityBoost');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetThreadPriorityBoost]
- end;
-end;
-
-var
- _GetThreadPriority: Pointer;
-
-function GetThreadPriority;
-begin
- GetProcedureAddress(_GetThreadPriority, kernel32, 'GetThreadPriority');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetThreadPriority]
- end;
-end;
-
-var
- _GetThreadTimes: Pointer;
-
-function GetThreadTimes;
-begin
- GetProcedureAddress(_GetThreadTimes, kernel32, 'GetThreadTimes');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetThreadTimes]
- end;
-end;
-
-var
- _GetThreadIOPendingFlag: Pointer;
-
-function GetThreadIOPendingFlag;
-begin
- GetProcedureAddress(_GetThreadIOPendingFlag, kernel32, 'GetThreadIOPendingFlag');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetThreadIOPendingFlag]
- end;
-end;
-
-var
- _ExitThread: Pointer;
-
-procedure ExitThread;
-begin
- GetProcedureAddress(_ExitThread, kernel32, 'ExitThread');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ExitThread]
- end;
-end;
-
-var
- _TerminateThread: Pointer;
-
-function TerminateThread;
-begin
- GetProcedureAddress(_TerminateThread, kernel32, 'TerminateThread');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_TerminateThread]
- end;
-end;
-
-var
- _GetExitCodeThread: Pointer;
-
-function GetExitCodeThread;
-begin
- GetProcedureAddress(_GetExitCodeThread, kernel32, 'GetExitCodeThread');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetExitCodeThread]
- end;
-end;
-
-var
- _GetThreadSelectorEntry: Pointer;
-
-function GetThreadSelectorEntry;
-begin
- GetProcedureAddress(_GetThreadSelectorEntry, kernel32, 'GetThreadSelectorEntry');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetThreadSelectorEntry]
- end;
-end;
-
-var
- _SetThreadExecutionState: Pointer;
-
-function SetThreadExecutionState;
-begin
- GetProcedureAddress(_SetThreadExecutionState, kernel32, 'SetThreadExecutionState');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetThreadExecutionState]
- end;
-end;
-
-var
- _GetLastError: Pointer;
-
-function GetLastError;
-begin
- GetProcedureAddress(_GetLastError, kernel32, 'GetLastError');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetLastError]
- end;
-end;
-
-var
- _SetLastError: Pointer;
-
-procedure SetLastError;
-begin
- GetProcedureAddress(_SetLastError, kernel32, 'SetLastError');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetLastError]
- end;
-end;
-
-var
- _RestoreLastError: Pointer;
-
-procedure RestoreLastError;
-begin
- GetProcedureAddress(_RestoreLastError, kernel32, 'RestoreLastError');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RestoreLastError]
- end;
-end;
-
-var
- _GetOverlappedResult: Pointer;
-
-function GetOverlappedResult;
-begin
- GetProcedureAddress(_GetOverlappedResult, kernel32, 'GetOverlappedResult');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetOverlappedResult]
- end;
-end;
-
-var
- _CreateIoCompletionPort: Pointer;
-
-function CreateIoCompletionPort;
-begin
- GetProcedureAddress(_CreateIoCompletionPort, kernel32, 'CreateIoCompletionPort');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreateIoCompletionPort]
- end;
-end;
-
-var
- _GetQueuedCompletionStatus: Pointer;
-
-function GetQueuedCompletionStatus;
-begin
- GetProcedureAddress(_GetQueuedCompletionStatus, kernel32, 'GetQueuedCompletionStatus');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetQueuedCompletionStatus]
- end;
-end;
-
-var
- _PostQueuedCompletionStatus: Pointer;
-
-function PostQueuedCompletionStatus;
-begin
- GetProcedureAddress(_PostQueuedCompletionStatus, kernel32, 'PostQueuedCompletionStatus');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PostQueuedCompletionStatus]
- end;
-end;
-
-var
- _SetErrorMode: Pointer;
-
-function SetErrorMode;
-begin
- GetProcedureAddress(_SetErrorMode, kernel32, 'SetErrorMode');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetErrorMode]
- end;
-end;
-
-var
- _ReadProcessMemory: Pointer;
-
-function ReadProcessMemory;
-begin
- GetProcedureAddress(_ReadProcessMemory, kernel32, 'ReadProcessMemory');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ReadProcessMemory]
- end;
-end;
-
-var
- _WriteProcessMemory: Pointer;
-
-function WriteProcessMemory;
-begin
- GetProcedureAddress(_WriteProcessMemory, kernel32, 'WriteProcessMemory');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WriteProcessMemory]
- end;
-end;
-
-var
- _GetThreadContext: Pointer;
-
-function GetThreadContext;
-begin
- GetProcedureAddress(_GetThreadContext, kernel32, 'GetThreadContext');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetThreadContext]
- end;
-end;
-
-var
- _SetThreadContext: Pointer;
-
-function SetThreadContext;
-begin
- GetProcedureAddress(_SetThreadContext, kernel32, 'SetThreadContext');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetThreadContext]
- end;
-end;
-
-var
- _SuspendThread: Pointer;
-
-function SuspendThread;
-begin
- GetProcedureAddress(_SuspendThread, kernel32, 'SuspendThread');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SuspendThread]
- end;
-end;
-
-var
- _ResumeThread: Pointer;
-
-function ResumeThread;
-begin
- GetProcedureAddress(_ResumeThread, kernel32, 'ResumeThread');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ResumeThread]
- end;
-end;
-
-var
- _QueueUserAPC: Pointer;
-
-function QueueUserAPC;
-begin
- GetProcedureAddress(_QueueUserAPC, kernel32, 'QueueUserAPC');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_QueueUserAPC]
- end;
-end;
-
-var
- _IsDebuggerPresent: Pointer;
-
-function IsDebuggerPresent;
-begin
- GetProcedureAddress(_IsDebuggerPresent, kernel32, 'IsDebuggerPresent');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_IsDebuggerPresent]
- end;
-end;
-
-var
- _CheckRemoteDebuggerPresent: Pointer;
-
-function CheckRemoteDebuggerPresent;
-begin
- GetProcedureAddress(_CheckRemoteDebuggerPresent, kernel32, 'CheckRemoteDebuggerPresent');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CheckRemoteDebuggerPresent]
- end;
-end;
-
-var
- _DebugBreak: Pointer;
-
-procedure DebugBreak;
-begin
- GetProcedureAddress(_DebugBreak, kernel32, 'DebugBreak');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DebugBreak]
- end;
-end;
-
-var
- _WaitForDebugEvent: Pointer;
-
-function WaitForDebugEvent;
-begin
- GetProcedureAddress(_WaitForDebugEvent, kernel32, 'WaitForDebugEvent');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WaitForDebugEvent]
- end;
-end;
-
-var
- _ContinueDebugEvent: Pointer;
-
-function ContinueDebugEvent;
-begin
- GetProcedureAddress(_ContinueDebugEvent, kernel32, 'ContinueDebugEvent');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ContinueDebugEvent]
- end;
-end;
-
-var
- _DebugActiveProcess: Pointer;
-
-function DebugActiveProcess;
-begin
- GetProcedureAddress(_DebugActiveProcess, kernel32, 'DebugActiveProcess');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DebugActiveProcess]
- end;
-end;
-
-var
- _DebugActiveProcessStop: Pointer;
-
-function DebugActiveProcessStop;
-begin
- GetProcedureAddress(_DebugActiveProcessStop, kernel32, 'DebugActiveProcessStop');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DebugActiveProcessStop]
- end;
-end;
-
-var
- _DebugSetProcessKillOnExit: Pointer;
-
-function DebugSetProcessKillOnExit;
-begin
- GetProcedureAddress(_DebugSetProcessKillOnExit, kernel32, 'DebugSetProcessKillOnExit');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DebugSetProcessKillOnExit]
- end;
-end;
-
-var
- _DebugBreakProcess: Pointer;
-
-function DebugBreakProcess;
-begin
- GetProcedureAddress(_DebugBreakProcess, kernel32, 'DebugBreakProcess');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DebugBreakProcess]
- end;
-end;
-
-var
- _InitializeCriticalSection: Pointer;
-
-procedure InitializeCriticalSection;
-begin
- GetProcedureAddress(_InitializeCriticalSection, kernel32, 'InitializeCriticalSection');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_InitializeCriticalSection]
- end;
-end;
-
-var
- _EnterCriticalSection: Pointer;
-
-procedure EnterCriticalSection;
-begin
- GetProcedureAddress(_EnterCriticalSection, kernel32, 'EnterCriticalSection');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_EnterCriticalSection]
- end;
-end;
-
-var
- _LeaveCriticalSection: Pointer;
-
-procedure LeaveCriticalSection;
-begin
- GetProcedureAddress(_LeaveCriticalSection, kernel32, 'LeaveCriticalSection');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_LeaveCriticalSection]
- end;
-end;
-
-var
- _InitCritSectAndSpinCount: Pointer;
-
-function InitializeCriticalSectionAndSpinCount;
-begin
- GetProcedureAddress(_InitCritSectAndSpinCount, kernel32, 'InitializeCriticalSectionAndSpinCount');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_InitCritSectAndSpinCount]
- end;
-end;
-
-var
- _SetCriticalSectionSpinCount: Pointer;
-
-function SetCriticalSectionSpinCount;
-begin
- GetProcedureAddress(_SetCriticalSectionSpinCount, kernel32, 'SetCriticalSectionSpinCount');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetCriticalSectionSpinCount]
- end;
-end;
-
-var
- _TryEnterCriticalSection: Pointer;
-
-function TryEnterCriticalSection;
-begin
- GetProcedureAddress(_TryEnterCriticalSection, kernel32, 'TryEnterCriticalSection');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_TryEnterCriticalSection]
- end;
-end;
-
-var
- _DeleteCriticalSection: Pointer;
-
-procedure DeleteCriticalSection;
-begin
- GetProcedureAddress(_DeleteCriticalSection, kernel32, 'DeleteCriticalSection');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DeleteCriticalSection]
- end;
-end;
-
-var
- _SetEvent: Pointer;
-
-function SetEvent;
-begin
- GetProcedureAddress(_SetEvent, kernel32, 'SetEvent');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetEvent]
- end;
-end;
-
-var
- _ResetEvent: Pointer;
-
-function ResetEvent;
-begin
- GetProcedureAddress(_ResetEvent, kernel32, 'ResetEvent');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ResetEvent]
- end;
-end;
-
-var
- _PulseEvent: Pointer;
-
-function PulseEvent;
-begin
- GetProcedureAddress(_PulseEvent, kernel32, 'PulseEvent');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PulseEvent]
- end;
-end;
-
-var
- _ReleaseSemaphore: Pointer;
-
-function ReleaseSemaphore;
-begin
- GetProcedureAddress(_ReleaseSemaphore, kernel32, 'ReleaseSemaphore');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ReleaseSemaphore]
- end;
-end;
-
-var
- _ReleaseMutex: Pointer;
-
-function ReleaseMutex;
-begin
- GetProcedureAddress(_ReleaseMutex, kernel32, 'ReleaseMutex');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ReleaseMutex]
- end;
-end;
-
-var
- _WaitForSingleObject: Pointer;
-
-function WaitForSingleObject;
-begin
- GetProcedureAddress(_WaitForSingleObject, kernel32, 'WaitForSingleObject');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WaitForSingleObject]
- end;
-end;
-
-var
- _WaitForMultipleObjects: Pointer;
-
-function WaitForMultipleObjects;
-begin
- GetProcedureAddress(_WaitForMultipleObjects, kernel32, 'WaitForMultipleObjects');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WaitForMultipleObjects]
- end;
-end;
-
-var
- _Sleep: Pointer;
-
-procedure Sleep;
-begin
- GetProcedureAddress(_Sleep, kernel32, 'Sleep');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_Sleep]
- end;
-end;
-
-var
- _LoadResource: Pointer;
-
-function LoadResource;
-begin
- GetProcedureAddress(_LoadResource, kernel32, 'LoadResource');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_LoadResource]
- end;
-end;
-
-var
- _SizeofResource: Pointer;
-
-function SizeofResource;
-begin
- GetProcedureAddress(_SizeofResource, kernel32, 'SizeofResource');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SizeofResource]
- end;
-end;
-
-var
- _GlobalDeleteAtom: Pointer;
-
-function GlobalDeleteAtom;
-begin
- GetProcedureAddress(_GlobalDeleteAtom, kernel32, 'GlobalDeleteAtom');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GlobalDeleteAtom]
- end;
-end;
-
-var
- _InitAtomTable: Pointer;
-
-function InitAtomTable;
-begin
- GetProcedureAddress(_InitAtomTable, kernel32, 'InitAtomTable');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_InitAtomTable]
- end;
-end;
-
-var
- _DeleteAtom: Pointer;
-
-function DeleteAtom;
-begin
- GetProcedureAddress(_DeleteAtom, kernel32, 'DeleteAtom');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DeleteAtom]
- end;
-end;
-
-var
- _SetHandleCount: Pointer;
-
-function SetHandleCount;
-begin
- GetProcedureAddress(_SetHandleCount, kernel32, 'SetHandleCount');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetHandleCount]
- end;
-end;
-
-var
- _GetLogicalDrives: Pointer;
-
-function GetLogicalDrives;
-begin
- GetProcedureAddress(_GetLogicalDrives, kernel32, 'GetLogicalDrives');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetLogicalDrives]
- end;
-end;
-
-var
- _LockFile: Pointer;
-
-function LockFile;
-begin
- GetProcedureAddress(_LockFile, kernel32, 'LockFile');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_LockFile]
- end;
-end;
-
-var
- _UnlockFile: Pointer;
-
-function UnlockFile;
-begin
- GetProcedureAddress(_UnlockFile, kernel32, 'UnlockFile');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_UnlockFile]
- end;
-end;
-
-var
- _LockFileEx: Pointer;
-
-function LockFileEx;
-begin
- GetProcedureAddress(_LockFileEx, kernel32, 'LockFileEx');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_LockFileEx]
- end;
-end;
-
-var
- _UnlockFileEx: Pointer;
-
-function UnlockFileEx;
-begin
- GetProcedureAddress(_UnlockFileEx, kernel32, 'UnlockFileEx');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_UnlockFileEx]
- end;
-end;
-
-var
- _GetFileInformationByHandle: Pointer;
-
-function GetFileInformationByHandle;
-begin
- GetProcedureAddress(_GetFileInformationByHandle, kernel32, 'GetFileInformationByHandle');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetFileInformationByHandle]
- end;
-end;
-
-var
- _GetFileType: Pointer;
-
-function GetFileType;
-begin
- GetProcedureAddress(_GetFileType, kernel32, 'GetFileType');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetFileType]
- end;
-end;
-
-var
- _GetFileSize: Pointer;
-
-function GetFileSize;
-begin
- GetProcedureAddress(_GetFileSize, kernel32, 'GetFileSize');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetFileSize]
- end;
-end;
-
-var
- _GetFileSizeEx: Pointer;
-
-function GetFileSizeEx;
-begin
- GetProcedureAddress(_GetFileSizeEx, kernel32, 'GetFileSizeEx');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetFileSizeEx]
- end;
-end;
-
-var
- _GetStdHandle: Pointer;
-
-function GetStdHandle;
-begin
- GetProcedureAddress(_GetStdHandle, kernel32, 'GetStdHandle');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetStdHandle]
- end;
-end;
-
-var
- _SetStdHandle: Pointer;
-
-function SetStdHandle;
-begin
- GetProcedureAddress(_SetStdHandle, kernel32, 'SetStdHandle');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetStdHandle]
- end;
-end;
-
-var
- _WriteFile: Pointer;
-
-function WriteFile;
-begin
- GetProcedureAddress(_WriteFile, kernel32, 'WriteFile');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WriteFile]
- end;
-end;
-
-var
- _ReadFile: Pointer;
-
-function ReadFile;
-begin
- GetProcedureAddress(_ReadFile, kernel32, 'ReadFile');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ReadFile]
- end;
-end;
-
-var
- _FlushFileBuffers: Pointer;
-
-function FlushFileBuffers;
-begin
- GetProcedureAddress(_FlushFileBuffers, kernel32, 'FlushFileBuffers');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_FlushFileBuffers]
- end;
-end;
-
-var
- _DeviceIoControl: Pointer;
-
-function DeviceIoControl;
-begin
- GetProcedureAddress(_DeviceIoControl, kernel32, 'DeviceIoControl');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DeviceIoControl]
- end;
-end;
-
-var
- _RequestDeviceWakeup: Pointer;
-
-function RequestDeviceWakeup;
-begin
- GetProcedureAddress(_RequestDeviceWakeup, kernel32, 'RequestDeviceWakeup');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RequestDeviceWakeup]
- end;
-end;
-
-var
- _CancelDeviceWakeupRequest: Pointer;
-
-function CancelDeviceWakeupRequest;
-begin
- GetProcedureAddress(_CancelDeviceWakeupRequest, kernel32, 'CancelDeviceWakeupRequest');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CancelDeviceWakeupRequest]
- end;
-end;
-
-var
- _GetDevicePowerState: Pointer;
-
-function GetDevicePowerState;
-begin
- GetProcedureAddress(_GetDevicePowerState, kernel32, 'GetDevicePowerState');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetDevicePowerState]
- end;
-end;
-
-var
- _SetMessageWaitingIndicator: Pointer;
-
-function SetMessageWaitingIndicator;
-begin
- GetProcedureAddress(_SetMessageWaitingIndicator, kernel32, 'SetMessageWaitingIndicator');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetMessageWaitingIndicator]
- end;
-end;
-
-var
- _SetEndOfFile: Pointer;
-
-function SetEndOfFile;
-begin
- GetProcedureAddress(_SetEndOfFile, kernel32, 'SetEndOfFile');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetEndOfFile]
- end;
-end;
-
-var
- _SetFilePointer: Pointer;
-
-function SetFilePointer;
-begin
- GetProcedureAddress(_SetFilePointer, kernel32, 'SetFilePointer');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetFilePointer]
- end;
-end;
-
-var
- _SetFilePointerEx: Pointer;
-
-function SetFilePointerEx;
-begin
- GetProcedureAddress(_SetFilePointerEx, kernel32, 'SetFilePointerEx');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetFilePointerEx]
- end;
-end;
-
-var
- _FindClose: Pointer;
-
-function FindClose;
-begin
- GetProcedureAddress(_FindClose, kernel32, 'FindClose');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_FindClose]
- end;
-end;
-
-var
- _GetFileTime: Pointer;
-
-function GetFileTime;
-begin
- GetProcedureAddress(_GetFileTime, kernel32, 'GetFileTime');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetFileTime]
- end;
-end;
-
-var
- _SetFileTime: Pointer;
-
-function SetFileTime;
-begin
- GetProcedureAddress(_SetFileTime, kernel32, 'SetFileTime');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetFileTime]
- end;
-end;
-
-var
- _SetFileValidData: Pointer;
-
-function SetFileValidData;
-begin
- GetProcedureAddress(_SetFileValidData, kernel32, 'SetFileValidData');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetFileValidData]
- end;
-end;
-
-var
- _SetFileShortNameA: Pointer;
-
-function SetFileShortNameA;
-begin
- GetProcedureAddress(_SetFileShortNameA, kernel32, 'SetFileShortNameA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetFileShortNameA]
- end;
-end;
-
-var
- _SetFileShortNameW: Pointer;
-
-function SetFileShortNameW;
-begin
- GetProcedureAddress(_SetFileShortNameW, kernel32, 'SetFileShortNameW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetFileShortNameW]
- end;
-end;
-
-var
- _SetFileShortName: Pointer;
-
-function SetFileShortName;
-begin
- GetProcedureAddress(_SetFileShortName, kernel32, 'SetFileShortName' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetFileShortName]
- end;
-end;
-
-var
- _CloseHandle: Pointer;
-
-function CloseHandle;
-begin
- GetProcedureAddress(_CloseHandle, kernel32, 'CloseHandle');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CloseHandle]
- end;
-end;
-
-var
- _DuplicateHandle: Pointer;
-
-function DuplicateHandle;
-begin
- GetProcedureAddress(_DuplicateHandle, kernel32, 'DuplicateHandle');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DuplicateHandle]
- end;
-end;
-
-var
- _GetHandleInformation: Pointer;
-
-function GetHandleInformation;
-begin
- GetProcedureAddress(_GetHandleInformation, kernel32, 'GetHandleInformation');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetHandleInformation]
- end;
-end;
-
-var
- _SetHandleInformation: Pointer;
-
-function SetHandleInformation;
-begin
- GetProcedureAddress(_SetHandleInformation, kernel32, 'SetHandleInformation');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetHandleInformation]
- end;
-end;
-
-var
- _LoadModule: Pointer;
-
-function LoadModule;
-begin
- GetProcedureAddress(_LoadModule, kernel32, 'LoadModule');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_LoadModule]
- end;
-end;
-
-var
- _WinExec: Pointer;
-
-function WinExec;
-begin
- GetProcedureAddress(_WinExec, kernel32, 'WinExec');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WinExec]
- end;
-end;
-
-var
- _ClearCommBreak: Pointer;
-
-function ClearCommBreak;
-begin
- GetProcedureAddress(_ClearCommBreak, kernel32, 'ClearCommBreak');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ClearCommBreak]
- end;
-end;
-
-var
- _ClearCommError: Pointer;
-
-function ClearCommError;
-begin
- GetProcedureAddress(_ClearCommError, kernel32, 'ClearCommError');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ClearCommError]
- end;
-end;
-
-var
- _SetupComm: Pointer;
-
-function SetupComm;
-begin
- GetProcedureAddress(_SetupComm, kernel32, 'SetupComm');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetupComm]
- end;
-end;
-
-var
- _EscapeCommFunction: Pointer;
-
-function EscapeCommFunction;
-begin
- GetProcedureAddress(_EscapeCommFunction, kernel32, 'EscapeCommFunction');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_EscapeCommFunction]
- end;
-end;
-
-var
- _GetCommConfig: Pointer;
-
-function GetCommConfig;
-begin
- GetProcedureAddress(_GetCommConfig, kernel32, 'GetCommConfig');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetCommConfig]
- end;
-end;
-
-var
- _GetCommMask: Pointer;
-
-function GetCommMask;
-begin
- GetProcedureAddress(_GetCommMask, kernel32, 'GetCommMask');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetCommMask]
- end;
-end;
-
-var
- _GetCommProperties: Pointer;
-
-function GetCommProperties;
-begin
- GetProcedureAddress(_GetCommProperties, kernel32, 'GetCommProperties');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetCommProperties]
- end;
-end;
-
-var
- _GetCommModemStatus: Pointer;
-
-function GetCommModemStatus;
-begin
- GetProcedureAddress(_GetCommModemStatus, kernel32, 'GetCommModemStatus');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetCommModemStatus]
- end;
-end;
-
-var
- _GetCommState: Pointer;
-
-function GetCommState;
-begin
- GetProcedureAddress(_GetCommState, kernel32, 'GetCommState');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetCommState]
- end;
-end;
-
-var
- _GetCommTimeouts: Pointer;
-
-function GetCommTimeouts;
-begin
- GetProcedureAddress(_GetCommTimeouts, kernel32, 'GetCommTimeouts');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetCommTimeouts]
- end;
-end;
-
-var
- _PurgeComm: Pointer;
-
-function PurgeComm;
-begin
- GetProcedureAddress(_PurgeComm, kernel32, 'PurgeComm');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PurgeComm]
- end;
-end;
-
-var
- _SetCommBreak: Pointer;
-
-function SetCommBreak;
-begin
- GetProcedureAddress(_SetCommBreak, kernel32, 'SetCommBreak');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetCommBreak]
- end;
-end;
-
-var
- _SetCommConfig: Pointer;
-
-function SetCommConfig;
-begin
- GetProcedureAddress(_SetCommConfig, kernel32, 'SetCommConfig');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetCommConfig]
- end;
-end;
-
-var
- _SetCommMask: Pointer;
-
-function SetCommMask;
-begin
- GetProcedureAddress(_SetCommMask, kernel32, 'SetCommMask');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetCommMask]
- end;
-end;
-
-var
- _SetCommState: Pointer;
-
-function SetCommState;
-begin
- GetProcedureAddress(_SetCommState, kernel32, 'SetCommState');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetCommState]
- end;
-end;
-
-var
- _SetCommTimeouts: Pointer;
-
-function SetCommTimeouts;
-begin
- GetProcedureAddress(_SetCommTimeouts, kernel32, 'SetCommTimeouts');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetCommTimeouts]
- end;
-end;
-
-var
- _TransmitCommChar: Pointer;
-
-function TransmitCommChar;
-begin
- GetProcedureAddress(_TransmitCommChar, kernel32, 'TransmitCommChar');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_TransmitCommChar]
- end;
-end;
-
-var
- _WaitCommEvent: Pointer;
-
-function WaitCommEvent;
-begin
- GetProcedureAddress(_WaitCommEvent, kernel32, 'WaitCommEvent');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WaitCommEvent]
- end;
-end;
-
-var
- _SetTapePosition: Pointer;
-
-function SetTapePosition;
-begin
- GetProcedureAddress(_SetTapePosition, kernel32, 'SetTapePosition');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetTapePosition]
- end;
-end;
-
-var
- _GetTapePosition: Pointer;
-
-function GetTapePosition;
-begin
- GetProcedureAddress(_GetTapePosition, kernel32, 'GetTapePosition');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetTapePosition]
- end;
-end;
-
-var
- _PrepareTape: Pointer;
-
-function PrepareTape;
-begin
- GetProcedureAddress(_PrepareTape, kernel32, 'PrepareTape');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PrepareTape]
- end;
-end;
-
-var
- _EraseTape: Pointer;
-
-function EraseTape;
-begin
- GetProcedureAddress(_EraseTape, kernel32, 'EraseTape');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_EraseTape]
- end;
-end;
-
-var
- _CreateTapePartition: Pointer;
-
-function CreateTapePartition;
-begin
- GetProcedureAddress(_CreateTapePartition, kernel32, 'CreateTapePartition');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreateTapePartition]
- end;
-end;
-
-var
- _WriteTapemark: Pointer;
-
-function WriteTapemark;
-begin
- GetProcedureAddress(_WriteTapemark, kernel32, 'WriteTapemark');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WriteTapemark]
- end;
-end;
-
-var
- _GetTapeStatus: Pointer;
-
-function GetTapeStatus;
-begin
- GetProcedureAddress(_GetTapeStatus, kernel32, 'GetTapeStatus');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetTapeStatus]
- end;
-end;
-
-var
- _GetTapeParameters: Pointer;
-
-function GetTapeParameters;
-begin
- GetProcedureAddress(_GetTapeParameters, kernel32, 'GetTapeParameters');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetTapeParameters]
- end;
-end;
-
-var
- _SetTapeParameters: Pointer;
-
-function SetTapeParameters;
-begin
- GetProcedureAddress(_SetTapeParameters, kernel32, 'SetTapeParameters');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetTapeParameters]
- end;
-end;
-
-var
- _Beep: Pointer;
-
-function Beep;
-begin
- GetProcedureAddress(_Beep, kernel32, 'Beep');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_Beep]
- end;
-end;
-
-var
- _MulDiv: Pointer;
-
-function MulDiv;
-begin
- GetProcedureAddress(_MulDiv, kernel32, 'MulDiv');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MulDiv]
- end;
-end;
-
-var
- _GetSystemTime: Pointer;
-
-procedure GetSystemTime;
-begin
- GetProcedureAddress(_GetSystemTime, kernel32, 'GetSystemTime');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetSystemTime]
- end;
-end;
-
-var
- _GetSystemTimeAsFileTime: Pointer;
-
-procedure GetSystemTimeAsFileTime;
-begin
- GetProcedureAddress(_GetSystemTimeAsFileTime, kernel32, 'GetSystemTimeAsFileTime');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetSystemTimeAsFileTime]
- end;
-end;
-
-var
- _SetSystemTime: Pointer;
-
-function SetSystemTime;
-begin
- GetProcedureAddress(_SetSystemTime, kernel32, 'SetSystemTime');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetSystemTime]
- end;
-end;
-
-var
- _GetLocalTime: Pointer;
-
-procedure GetLocalTime;
-begin
- GetProcedureAddress(_GetLocalTime, kernel32, 'GetLocalTime');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetLocalTime]
- end;
-end;
-
-var
- _SetLocalTime: Pointer;
-
-function SetLocalTime;
-begin
- GetProcedureAddress(_SetLocalTime, kernel32, 'SetLocalTime');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetLocalTime]
- end;
-end;
-
-var
- _GetSystemInfo: Pointer;
-
-procedure GetSystemInfo;
-begin
- GetProcedureAddress(_GetSystemInfo, kernel32, 'GetSystemInfo');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetSystemInfo]
- end;
-end;
-
-var
- _GetSystemRegistryQuota: Pointer;
-
-function GetSystemRegistryQuota;
-begin
- GetProcedureAddress(_GetSystemRegistryQuota, kernel32, 'GetSystemRegistryQuota');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetSystemRegistryQuota]
- end;
-end;
-
-var
- _GetSystemTimes: Pointer;
-
-function GetSystemTimes;
-begin
- GetProcedureAddress(_GetSystemTimes, kernel32, 'GetSystemTimes');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetSystemTimes]
- end;
-end;
-
-var
- _GetNativeSystemInfo: Pointer;
-
-procedure GetNativeSystemInfo;
-begin
- GetProcedureAddress(_GetNativeSystemInfo, kernel32, 'GetNativeSystemInfo');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetNativeSystemInfo]
- end;
-end;
-
-var
- _IsProcessorFeaturePresent: Pointer;
-
-function IsProcessorFeaturePresent;
-begin
- GetProcedureAddress(_IsProcessorFeaturePresent, kernel32, 'IsProcessorFeaturePresent');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_IsProcessorFeaturePresent]
- end;
-end;
-
-var
- _SystemTimeToTzSpecificLocalTime: Pointer;
-
-function SystemTimeToTzSpecificLocalTime;
-begin
- GetProcedureAddress(_SystemTimeToTzSpecificLocalTime, kernel32, 'SystemTimeToTzSpecificLocalTime');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SystemTimeToTzSpecificLocalTime]
- end;
-end;
-
-var
- _TzSpecificLocalTimeToSystemTime: Pointer;
-
-function TzSpecificLocalTimeToSystemTime;
-begin
- GetProcedureAddress(_TzSpecificLocalTimeToSystemTime, kernel32, 'TzSpecificLocalTimeToSystemTime');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_TzSpecificLocalTimeToSystemTime]
- end;
-end;
-
-var
- _GetTimeZoneInformation: Pointer;
-
-function GetTimeZoneInformation;
-begin
- GetProcedureAddress(_GetTimeZoneInformation, kernel32, 'GetTimeZoneInformation');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetTimeZoneInformation]
- end;
-end;
-
-var
- _SetTimeZoneInformation: Pointer;
-
-function SetTimeZoneInformation;
-begin
- GetProcedureAddress(_SetTimeZoneInformation, kernel32, 'SetTimeZoneInformation');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetTimeZoneInformation]
- end;
-end;
-
-var
- _SystemTimeToFileTime: Pointer;
-
-function SystemTimeToFileTime;
-begin
- GetProcedureAddress(_SystemTimeToFileTime, kernel32, 'SystemTimeToFileTime');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SystemTimeToFileTime]
- end;
-end;
-
-var
- _FileTimeToLocalFileTime: Pointer;
-
-function FileTimeToLocalFileTime;
-begin
- GetProcedureAddress(_FileTimeToLocalFileTime, kernel32, 'FileTimeToLocalFileTime');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_FileTimeToLocalFileTime]
- end;
-end;
-
-var
- _LocalFileTimeToFileTime: Pointer;
-
-function LocalFileTimeToFileTime;
-begin
- GetProcedureAddress(_LocalFileTimeToFileTime, kernel32, 'LocalFileTimeToFileTime');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_LocalFileTimeToFileTime]
- end;
-end;
-
-var
- _FileTimeToSystemTime: Pointer;
-
-function FileTimeToSystemTime;
-begin
- GetProcedureAddress(_FileTimeToSystemTime, kernel32, 'FileTimeToSystemTime');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_FileTimeToSystemTime]
- end;
-end;
-
-var
- _CompareFileTime: Pointer;
-
-function CompareFileTime;
-begin
- GetProcedureAddress(_CompareFileTime, kernel32, 'CompareFileTime');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CompareFileTime]
- end;
-end;
-
-var
- _FileTimeToDosDateTime: Pointer;
-
-function FileTimeToDosDateTime;
-begin
- GetProcedureAddress(_FileTimeToDosDateTime, kernel32, 'FileTimeToDosDateTime');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_FileTimeToDosDateTime]
- end;
-end;
-
-var
- _DosDateTimeToFileTime: Pointer;
-
-function DosDateTimeToFileTime;
-begin
- GetProcedureAddress(_DosDateTimeToFileTime, kernel32, 'DosDateTimeToFileTime');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DosDateTimeToFileTime]
- end;
-end;
-
-var
- _GetTickCount: Pointer;
-
-function GetTickCount;
-begin
- GetProcedureAddress(_GetTickCount, kernel32, 'GetTickCount');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetTickCount]
- end;
-end;
-
-var
- _SetSystemTimeAdjustment: Pointer;
-
-function SetSystemTimeAdjustment;
-begin
- GetProcedureAddress(_SetSystemTimeAdjustment, kernel32, 'SetSystemTimeAdjustment');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetSystemTimeAdjustment]
- end;
-end;
-
-var
- _GetSystemTimeAdjustment: Pointer;
-
-function GetSystemTimeAdjustment;
-begin
- GetProcedureAddress(_GetSystemTimeAdjustment, kernel32, 'GetSystemTimeAdjustment');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetSystemTimeAdjustment]
- end;
-end;
-
-var
- _FormatMessageA: Pointer;
-
-function FormatMessageA;
-begin
- GetProcedureAddress(_FormatMessageA, kernel32, 'FormatMessageA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_FormatMessageA]
- end;
-end;
-
-var
- _FormatMessageW: Pointer;
-
-function FormatMessageW;
-begin
- GetProcedureAddress(_FormatMessageW, kernel32, 'FormatMessageW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_FormatMessageW]
- end;
-end;
-
-var
- _FormatMessage: Pointer;
-
-function FormatMessage;
-begin
- GetProcedureAddress(_FormatMessage, kernel32, 'FormatMessage' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_FormatMessage]
- end;
-end;
-
-var
- _CreatePipe: Pointer;
-
-function CreatePipe;
-begin
- GetProcedureAddress(_CreatePipe, kernel32, 'CreatePipe');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreatePipe]
- end;
-end;
-
-var
- _ConnectNamedPipe: Pointer;
-
-function ConnectNamedPipe;
-begin
- GetProcedureAddress(_ConnectNamedPipe, kernel32, 'ConnectNamedPipe');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ConnectNamedPipe]
- end;
-end;
-
-var
- _DisconnectNamedPipe: Pointer;
-
-function DisconnectNamedPipe;
-begin
- GetProcedureAddress(_DisconnectNamedPipe, kernel32, 'DisconnectNamedPipe');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DisconnectNamedPipe]
- end;
-end;
-
-var
- _SetNamedPipeHandleState: Pointer;
-
-function SetNamedPipeHandleState;
-begin
- GetProcedureAddress(_SetNamedPipeHandleState, kernel32, 'SetNamedPipeHandleState');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetNamedPipeHandleState]
- end;
-end;
-
-var
- _GetNamedPipeInfo: Pointer;
-
-function GetNamedPipeInfo;
-begin
- GetProcedureAddress(_GetNamedPipeInfo, kernel32, 'GetNamedPipeInfo');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetNamedPipeInfo]
- end;
-end;
-
-var
- _PeekNamedPipe: Pointer;
-
-function PeekNamedPipe;
-begin
- GetProcedureAddress(_PeekNamedPipe, kernel32, 'PeekNamedPipe');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PeekNamedPipe]
- end;
-end;
-
-var
- _TransactNamedPipe: Pointer;
-
-function TransactNamedPipe;
-begin
- GetProcedureAddress(_TransactNamedPipe, kernel32, 'TransactNamedPipe');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_TransactNamedPipe]
- end;
-end;
-
-var
- _CreateMailslotA: Pointer;
-
-function CreateMailslotA;
-begin
- GetProcedureAddress(_CreateMailslotA, kernel32, 'CreateMailslotA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreateMailslotA]
- end;
-end;
-
-var
- _CreateMailslotW: Pointer;
-
-function CreateMailslotW;
-begin
- GetProcedureAddress(_CreateMailslotW, kernel32, 'CreateMailslotW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreateMailslotW]
- end;
-end;
-
-var
- _CreateMailslot: Pointer;
-
-function CreateMailslot;
-begin
- GetProcedureAddress(_CreateMailslot, kernel32, 'CreateMailslot' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreateMailslot]
- end;
-end;
-
-var
- _GetMailslotInfo: Pointer;
-
-function GetMailslotInfo;
-begin
- GetProcedureAddress(_GetMailslotInfo, kernel32, 'GetMailslotInfo');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetMailslotInfo]
- end;
-end;
-
-var
- _SetMailslotInfo: Pointer;
-
-function SetMailslotInfo;
-begin
- GetProcedureAddress(_SetMailslotInfo, kernel32, 'SetMailslotInfo');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetMailslotInfo]
- end;
-end;
-
-var
- _MapViewOfFile: Pointer;
-
-function MapViewOfFile;
-begin
- GetProcedureAddress(_MapViewOfFile, kernel32, 'MapViewOfFile');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MapViewOfFile]
- end;
-end;
-
-var
- _FlushViewOfFile: Pointer;
-
-function FlushViewOfFile;
-begin
- GetProcedureAddress(_FlushViewOfFile, kernel32, 'FlushViewOfFile');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_FlushViewOfFile]
- end;
-end;
-
-var
- _UnmapViewOfFile: Pointer;
-
-function UnmapViewOfFile;
-begin
- GetProcedureAddress(_UnmapViewOfFile, kernel32, 'UnmapViewOfFile');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_UnmapViewOfFile]
- end;
-end;
-
-var
- _EncryptFileA: Pointer;
-
-function EncryptFileA;
-begin
- GetProcedureAddress(_EncryptFileA, advapi32, 'EncryptFileA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_EncryptFileA]
- end;
-end;
-
-var
- _EncryptFileW: Pointer;
-
-function EncryptFileW;
-begin
- GetProcedureAddress(_EncryptFileW, advapi32, 'EncryptFileW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_EncryptFileW]
- end;
-end;
-
-var
- _EncryptFile: Pointer;
-
-function EncryptFile;
-begin
- GetProcedureAddress(_EncryptFile, advapi32, 'EncryptFile' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_EncryptFile]
- end;
-end;
-
-var
- _DecryptFileA: Pointer;
-
-function DecryptFileA;
-begin
- GetProcedureAddress(_DecryptFileA, advapi32, 'DecryptFileA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DecryptFileA]
- end;
-end;
-
-var
- _DecryptFileW: Pointer;
-
-function DecryptFileW;
-begin
- GetProcedureAddress(_DecryptFileW, advapi32, 'DecryptFileW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DecryptFileW]
- end;
-end;
-
-var
- _DecryptFile: Pointer;
-
-function DecryptFile;
-begin
- GetProcedureAddress(_DecryptFile, advapi32, 'DecryptFile' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DecryptFile]
- end;
-end;
-
-var
- _FileEncryptionStatusA: Pointer;
-
-function FileEncryptionStatusA;
-begin
- GetProcedureAddress(_FileEncryptionStatusA, advapi32, 'FileEncryptionStatusA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_FileEncryptionStatusA]
- end;
-end;
-
-var
- _FileEncryptionStatusW: Pointer;
-
-function FileEncryptionStatusW;
-begin
- GetProcedureAddress(_FileEncryptionStatusW, advapi32, 'FileEncryptionStatusW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_FileEncryptionStatusW]
- end;
-end;
-
-var
- _FileEncryptionStatus: Pointer;
-
-function FileEncryptionStatus;
-begin
- GetProcedureAddress(_FileEncryptionStatus, advapi32, 'FileEncryptionStatus' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_FileEncryptionStatus]
- end;
-end;
-
-var
- _OpenEncryptedFileRawA: Pointer;
-
-function OpenEncryptedFileRawA;
-begin
- GetProcedureAddress(_OpenEncryptedFileRawA, advapi32, 'OpenEncryptedFileRawA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_OpenEncryptedFileRawA]
- end;
-end;
-
-var
- _OpenEncryptedFileRawW: Pointer;
-
-function OpenEncryptedFileRawW;
-begin
- GetProcedureAddress(_OpenEncryptedFileRawW, advapi32, 'OpenEncryptedFileRawW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_OpenEncryptedFileRawW]
- end;
-end;
-
-var
- _OpenEncryptedFileRaw: Pointer;
-
-function OpenEncryptedFileRaw;
-begin
- GetProcedureAddress(_OpenEncryptedFileRaw, advapi32, 'OpenEncryptedFileRaw' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_OpenEncryptedFileRaw]
- end;
-end;
-
-var
- _ReadEncryptedFileRaw: Pointer;
-
-function ReadEncryptedFileRaw;
-begin
- GetProcedureAddress(_ReadEncryptedFileRaw, advapi32, 'ReadEncryptedFileRaw');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ReadEncryptedFileRaw]
- end;
-end;
-
-var
- _WriteEncryptedFileRaw: Pointer;
-
-function WriteEncryptedFileRaw;
-begin
- GetProcedureAddress(_WriteEncryptedFileRaw, advapi32, 'WriteEncryptedFileRaw');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WriteEncryptedFileRaw]
- end;
-end;
-
-var
- _CloseEncryptedFileRaw: Pointer;
-
-procedure CloseEncryptedFileRaw;
-begin
- GetProcedureAddress(_CloseEncryptedFileRaw, advapi32, 'CloseEncryptedFileRaw');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CloseEncryptedFileRaw]
- end;
-end;
-
-var
- _lstrcmpA: Pointer;
-
-function lstrcmpA;
-begin
- GetProcedureAddress(_lstrcmpA, kernel32, 'lstrcmpA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_lstrcmpA]
- end;
-end;
-
-var
- _lstrcmpW: Pointer;
-
-function lstrcmpW;
-begin
- GetProcedureAddress(_lstrcmpW, kernel32, 'lstrcmpW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_lstrcmpW]
- end;
-end;
-
-var
- _lstrcmp: Pointer;
-
-function lstrcmp;
-begin
- GetProcedureAddress(_lstrcmp, kernel32, 'lstrcmp' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_lstrcmp]
- end;
-end;
-
-var
- _lstrcmpiA: Pointer;
-
-function lstrcmpiA;
-begin
- GetProcedureAddress(_lstrcmpiA, kernel32, 'lstrcmpiA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_lstrcmpiA]
- end;
-end;
-
-var
- _lstrcmpiW: Pointer;
-
-function lstrcmpiW;
-begin
- GetProcedureAddress(_lstrcmpiW, kernel32, 'lstrcmpiW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_lstrcmpiW]
- end;
-end;
-
-var
- _lstrcmpi: Pointer;
-
-function lstrcmpi;
-begin
- GetProcedureAddress(_lstrcmpi, kernel32, 'lstrcmpi' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_lstrcmpi]
- end;
-end;
-
-var
- _lstrcpynA: Pointer;
-
-function lstrcpynA;
-begin
- GetProcedureAddress(_lstrcpynA, kernel32, 'lstrcpynA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_lstrcpynA]
- end;
-end;
-
-var
- _lstrcpynW: Pointer;
-
-function lstrcpynW;
-begin
- GetProcedureAddress(_lstrcpynW, kernel32, 'lstrcpynW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_lstrcpynW]
- end;
-end;
-
-var
- _lstrcpyn: Pointer;
-
-function lstrcpyn;
-begin
- GetProcedureAddress(_lstrcpyn, kernel32, 'lstrcpyn' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_lstrcpyn]
- end;
-end;
-
-var
- _lstrcpyA: Pointer;
-
-function lstrcpyA;
-begin
- GetProcedureAddress(_lstrcpyA, kernel32, 'lstrcpyA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_lstrcpyA]
- end;
-end;
-
-var
- _lstrcpyW: Pointer;
-
-function lstrcpyW;
-begin
- GetProcedureAddress(_lstrcpyW, kernel32, 'lstrcpyW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_lstrcpyW]
- end;
-end;
-
-var
- _lstrcpy: Pointer;
-
-function lstrcpy;
-begin
- GetProcedureAddress(_lstrcpy, kernel32, 'lstrcpy' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_lstrcpy]
- end;
-end;
-
-var
- _lstrcatA: Pointer;
-
-function lstrcatA;
-begin
- GetProcedureAddress(_lstrcatA, kernel32, 'lstrcatA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_lstrcatA]
- end;
-end;
-
-var
- _lstrcatW: Pointer;
-
-function lstrcatW;
-begin
- GetProcedureAddress(_lstrcatW, kernel32, 'lstrcatW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_lstrcatW]
- end;
-end;
-
-var
- _lstrcat: Pointer;
-
-function lstrcat;
-begin
- GetProcedureAddress(_lstrcat, kernel32, 'lstrcat' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_lstrcat]
- end;
-end;
-
-var
- _lstrlenA: Pointer;
-
-function lstrlenA;
-begin
- GetProcedureAddress(_lstrlenA, kernel32, 'lstrlenA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_lstrlenA]
- end;
-end;
-
-var
- _lstrlenW: Pointer;
-
-function lstrlenW;
-begin
- GetProcedureAddress(_lstrlenW, kernel32, 'lstrlenW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_lstrlenW]
- end;
-end;
-
-var
- _lstrlen: Pointer;
-
-function lstrlen;
-begin
- GetProcedureAddress(_lstrlen, kernel32, 'lstrlen' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_lstrlen]
- end;
-end;
-
-var
- _OpenFile: Pointer;
-
-function OpenFile;
-begin
- GetProcedureAddress(_OpenFile, kernel32, 'OpenFile');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_OpenFile]
- end;
-end;
-
-var
- __lopen: Pointer;
-
-function _lopen;
-begin
- GetProcedureAddress(__lopen, kernel32, '_lopen');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [__lopen]
- end;
-end;
-
-var
- __lcreat: Pointer;
-
-function _lcreat;
-begin
- GetProcedureAddress(__lcreat, kernel32, '_lcreat');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [__lcreat]
- end;
-end;
-
-var
- __lread: Pointer;
-
-function _lread;
-begin
- GetProcedureAddress(__lread, kernel32, '_lread');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [__lread]
- end;
-end;
-
-var
- __lwrite: Pointer;
-
-function _lwrite;
-begin
- GetProcedureAddress(__lwrite, kernel32, '_lwrite');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [__lwrite]
- end;
-end;
-
-var
- __hread: Pointer;
-
-function _hread;
-begin
- GetProcedureAddress(__hread, kernel32, '_hread');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [__hread]
- end;
-end;
-
-var
- __hwrite: Pointer;
-
-function _hwrite;
-begin
- GetProcedureAddress(__hwrite, kernel32, '_hwrite');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [__hwrite]
- end;
-end;
-
-var
- __lclose: Pointer;
-
-function _lclose;
-begin
- GetProcedureAddress(__lclose, kernel32, '_lclose');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [__lclose]
- end;
-end;
-
-var
- __llseek: Pointer;
-
-function _llseek;
-begin
- GetProcedureAddress(__llseek, kernel32, '_llseek');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [__llseek]
- end;
-end;
-
-var
- _IsTextUnicode: Pointer;
-
-function IsTextUnicode;
-begin
- GetProcedureAddress(_IsTextUnicode, advapi32, 'IsTextUnicode');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_IsTextUnicode]
- end;
-end;
-
-var
- _FlsAlloc: Pointer;
-
-function FlsAlloc;
-begin
- GetProcedureAddress(_FlsAlloc, kernel32, 'FlsAlloc');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_FlsAlloc]
- end;
-end;
-
-var
- _FlsGetValue: Pointer;
-
-function FlsGetValue;
-begin
- GetProcedureAddress(_FlsGetValue, kernel32, 'FlsGetValue');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_FlsGetValue]
- end;
-end;
-
-var
- _FlsSetValue: Pointer;
-
-function FlsSetValue;
-begin
- GetProcedureAddress(_FlsSetValue, kernel32, 'FlsSetValue');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_FlsSetValue]
- end;
-end;
-
-var
- _FlsFree: Pointer;
-
-function FlsFree;
-begin
- GetProcedureAddress(_FlsFree, kernel32, 'FlsFree');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_FlsFree]
- end;
-end;
-
-var
- _TlsAlloc: Pointer;
-
-function TlsAlloc;
-begin
- GetProcedureAddress(_TlsAlloc, kernel32, 'TlsAlloc');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_TlsAlloc]
- end;
-end;
-
-var
- _TlsGetValue: Pointer;
-
-function TlsGetValue;
-begin
- GetProcedureAddress(_TlsGetValue, kernel32, 'TlsGetValue');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_TlsGetValue]
- end;
-end;
-
-var
- _TlsSetValue: Pointer;
-
-function TlsSetValue;
-begin
- GetProcedureAddress(_TlsSetValue, kernel32, 'TlsSetValue');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_TlsSetValue]
- end;
-end;
-
-var
- _TlsFree: Pointer;
-
-function TlsFree;
-begin
- GetProcedureAddress(_TlsFree, kernel32, 'TlsFree');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_TlsFree]
- end;
-end;
-
-var
- _SleepEx: Pointer;
-
-function SleepEx;
-begin
- GetProcedureAddress(_SleepEx, kernel32, 'SleepEx');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SleepEx]
- end;
-end;
-
-var
- _WaitForSingleObjectEx: Pointer;
-
-function WaitForSingleObjectEx;
-begin
- GetProcedureAddress(_WaitForSingleObjectEx, kernel32, 'WaitForSingleObjectEx');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WaitForSingleObjectEx]
- end;
-end;
-
-var
- _WaitForMultipleObjectsEx: Pointer;
-
-function WaitForMultipleObjectsEx;
-begin
- GetProcedureAddress(_WaitForMultipleObjectsEx, kernel32, 'WaitForMultipleObjectsEx');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WaitForMultipleObjectsEx]
- end;
-end;
-
-var
- _SignalObjectAndWait: Pointer;
-
-function SignalObjectAndWait;
-begin
- GetProcedureAddress(_SignalObjectAndWait, kernel32, 'SignalObjectAndWait');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SignalObjectAndWait]
- end;
-end;
-
-var
- _ReadFileEx: Pointer;
-
-function ReadFileEx;
-begin
- GetProcedureAddress(_ReadFileEx, kernel32, 'ReadFileEx');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ReadFileEx]
- end;
-end;
-
-var
- _WriteFileEx: Pointer;
-
-function WriteFileEx;
-begin
- GetProcedureAddress(_WriteFileEx, kernel32, 'WriteFileEx');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WriteFileEx]
- end;
-end;
-
-var
- _BackupRead: Pointer;
-
-function BackupRead;
-begin
- GetProcedureAddress(_BackupRead, kernel32, 'BackupRead');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_BackupRead]
- end;
-end;
-
-var
- _BackupSeek: Pointer;
-
-function BackupSeek;
-begin
- GetProcedureAddress(_BackupSeek, kernel32, 'BackupSeek');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_BackupSeek]
- end;
-end;
-
-var
- _BackupWrite: Pointer;
-
-function BackupWrite;
-begin
- GetProcedureAddress(_BackupWrite, kernel32, 'BackupWrite');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_BackupWrite]
- end;
-end;
-
-var
- _ReadFileScatter: Pointer;
-
-function ReadFileScatter;
-begin
- GetProcedureAddress(_ReadFileScatter, kernel32, 'ReadFileScatter');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ReadFileScatter]
- end;
-end;
-
-var
- _WriteFileGather: Pointer;
-
-function WriteFileGather;
-begin
- GetProcedureAddress(_WriteFileGather, kernel32, 'WriteFileGather');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WriteFileGather]
- end;
-end;
-
-var
- _OpenMutexA: Pointer;
-
-function OpenMutexA;
-begin
- GetProcedureAddress(_OpenMutexA, kernel32, 'OpenMutexA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_OpenMutexA]
- end;
-end;
-
-var
- _OpenMutexW: Pointer;
-
-function OpenMutexW;
-begin
- GetProcedureAddress(_OpenMutexW, kernel32, 'OpenMutexW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_OpenMutexW]
- end;
-end;
-
-var
- _OpenMutex: Pointer;
-
-function OpenMutex;
-begin
- GetProcedureAddress(_OpenMutex, kernel32, 'OpenMutex' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_OpenMutex]
- end;
-end;
-
-var
- _CreateEventA: Pointer;
-
-function CreateEventA;
-begin
- GetProcedureAddress(_CreateEventA, kernel32, 'CreateEventA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreateEventA]
- end;
-end;
-
-var
- _CreateEventW: Pointer;
-
-function CreateEventW;
-begin
- GetProcedureAddress(_CreateEventW, kernel32, 'CreateEventW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreateEventW]
- end;
-end;
-
-var
- _CreateEvent: Pointer;
-
-function CreateEvent;
-begin
- GetProcedureAddress(_CreateEvent, kernel32, 'CreateEvent' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreateEvent]
- end;
-end;
-
-var
- _OpenEventA: Pointer;
-
-function OpenEventA;
-begin
- GetProcedureAddress(_OpenEventA, kernel32, 'OpenEventA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_OpenEventA]
- end;
-end;
-
-var
- _OpenEventW: Pointer;
-
-function OpenEventW;
-begin
- GetProcedureAddress(_OpenEventW, kernel32, 'OpenEventW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_OpenEventW]
- end;
-end;
-
-var
- _OpenEvent: Pointer;
-
-function OpenEvent;
-begin
- GetProcedureAddress(_OpenEvent, kernel32, 'OpenEvent' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_OpenEvent]
- end;
-end;
-
-var
- _CreateSemaphoreA: Pointer;
-
-function CreateSemaphoreA;
-begin
- GetProcedureAddress(_CreateSemaphoreA, kernel32, 'CreateSemaphoreA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreateSemaphoreA]
- end;
-end;
-
-var
- _CreateSemaphoreW: Pointer;
-
-function CreateSemaphoreW;
-begin
- GetProcedureAddress(_CreateSemaphoreW, kernel32, 'CreateSemaphoreW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreateSemaphoreW]
- end;
-end;
-
-var
- _CreateSemaphore: Pointer;
-
-function CreateSemaphore;
-begin
- GetProcedureAddress(_CreateSemaphore, kernel32, 'CreateSemaphore' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreateSemaphore]
- end;
-end;
-
-var
- _OpenSemaphoreA: Pointer;
-
-function OpenSemaphoreA;
-begin
- GetProcedureAddress(_OpenSemaphoreA, kernel32, 'OpenSemaphoreA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_OpenSemaphoreA]
- end;
-end;
-
-var
- _OpenSemaphoreW: Pointer;
-
-function OpenSemaphoreW;
-begin
- GetProcedureAddress(_OpenSemaphoreW, kernel32, 'OpenSemaphoreW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_OpenSemaphoreW]
- end;
-end;
-
-var
- _OpenSemaphore: Pointer;
-
-function OpenSemaphore;
-begin
- GetProcedureAddress(_OpenSemaphore, kernel32, 'OpenSemaphore' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_OpenSemaphore]
- end;
-end;
-
-var
- _CreateWaitableTimerA: Pointer;
-
-function CreateWaitableTimerA;
-begin
- GetProcedureAddress(_CreateWaitableTimerA, kernel32, 'CreateWaitableTimerA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreateWaitableTimerA]
- end;
-end;
-
-var
- _CreateWaitableTimerW: Pointer;
-
-function CreateWaitableTimerW;
-begin
- GetProcedureAddress(_CreateWaitableTimerW, kernel32, 'CreateWaitableTimerW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreateWaitableTimerW]
- end;
-end;
-
-var
- _CreateWaitableTimer: Pointer;
-
-function CreateWaitableTimer;
-begin
- GetProcedureAddress(_CreateWaitableTimer, kernel32, 'CreateWaitableTimer' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreateWaitableTimer]
- end;
-end;
-
-var
- _OpenWaitableTimerA: Pointer;
-
-function OpenWaitableTimerA;
-begin
- GetProcedureAddress(_OpenWaitableTimerA, kernel32, 'OpenWaitableTimerA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_OpenWaitableTimerA]
- end;
-end;
-
-var
- _OpenWaitableTimerW: Pointer;
-
-function OpenWaitableTimerW;
-begin
- GetProcedureAddress(_OpenWaitableTimerW, kernel32, 'OpenWaitableTimerW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_OpenWaitableTimerW]
- end;
-end;
-
-var
- _OpenWaitableTimer: Pointer;
-
-function OpenWaitableTimer;
-begin
- GetProcedureAddress(_OpenWaitableTimer, kernel32, 'OpenWaitableTimer' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_OpenWaitableTimer]
- end;
-end;
-
-var
- _SetWaitableTimer: Pointer;
-
-function SetWaitableTimer;
-begin
- GetProcedureAddress(_SetWaitableTimer, kernel32, 'SetWaitableTimer');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetWaitableTimer]
- end;
-end;
-
-var
- _CancelWaitableTimer: Pointer;
-
-function CancelWaitableTimer;
-begin
- GetProcedureAddress(_CancelWaitableTimer, kernel32, 'CancelWaitableTimer');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CancelWaitableTimer]
- end;
-end;
-
-var
- _CreateFileMappingA: Pointer;
-
-function CreateFileMappingA;
-begin
- GetProcedureAddress(_CreateFileMappingA, kernel32, 'CreateFileMappingA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreateFileMappingA]
- end;
-end;
-
-var
- _CreateFileMappingW: Pointer;
-
-function CreateFileMappingW;
-begin
- GetProcedureAddress(_CreateFileMappingW, kernel32, 'CreateFileMappingW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreateFileMappingW]
- end;
-end;
-
-var
- _CreateFileMapping: Pointer;
-
-function CreateFileMapping;
-begin
- GetProcedureAddress(_CreateFileMapping, kernel32, 'CreateFileMapping' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreateFileMapping]
- end;
-end;
-
-var
- _OpenFileMappingA: Pointer;
-
-function OpenFileMappingA;
-begin
- GetProcedureAddress(_OpenFileMappingA, kernel32, 'OpenFileMappingA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_OpenFileMappingA]
- end;
-end;
-
-var
- _OpenFileMappingW: Pointer;
-
-function OpenFileMappingW;
-begin
- GetProcedureAddress(_OpenFileMappingW, kernel32, 'OpenFileMappingW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_OpenFileMappingW]
- end;
-end;
-
-var
- _OpenFileMapping: Pointer;
-
-function OpenFileMapping;
-begin
- GetProcedureAddress(_OpenFileMapping, kernel32, 'OpenFileMapping' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_OpenFileMapping]
- end;
-end;
-
-var
- _GetLogicalDriveStringsA: Pointer;
-
-function GetLogicalDriveStringsA;
-begin
- GetProcedureAddress(_GetLogicalDriveStringsA, kernel32, 'GetLogicalDriveStringsA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetLogicalDriveStringsA]
- end;
-end;
-
-var
- _GetLogicalDriveStringsW: Pointer;
-
-function GetLogicalDriveStringsW;
-begin
- GetProcedureAddress(_GetLogicalDriveStringsW, kernel32, 'GetLogicalDriveStringsW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetLogicalDriveStringsW]
- end;
-end;
-
-var
- _GetLogicalDriveStrings: Pointer;
-
-function GetLogicalDriveStrings;
-begin
- GetProcedureAddress(_GetLogicalDriveStrings, kernel32, 'GetLogicalDriveStrings' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetLogicalDriveStrings]
- end;
-end;
-
-var
- _CreateMemResNotification: Pointer;
-
-function CreateMemoryResourceNotification;
-begin
- GetProcedureAddress(_CreateMemResNotification, kernel32, 'CreateMemoryResourceNotification');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreateMemResNotification]
- end;
-end;
-
-var
- _QueryMemoryResourceNotification: Pointer;
-
-function QueryMemoryResourceNotification;
-begin
- GetProcedureAddress(_QueryMemoryResourceNotification, kernel32, 'QueryMemoryResourceNotification');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_QueryMemoryResourceNotification]
- end;
-end;
-
-var
- _LoadLibraryA: Pointer;
-
-function LoadLibraryA;
-begin
- GetProcedureAddress(_LoadLibraryA, kernel32, 'LoadLibraryA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_LoadLibraryA]
- end;
-end;
-
-var
- _LoadLibraryW: Pointer;
-
-function LoadLibraryW;
-begin
- GetProcedureAddress(_LoadLibraryW, kernel32, 'LoadLibraryW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_LoadLibraryW]
- end;
-end;
-
-var
- _LoadLibrary: Pointer;
-
-function LoadLibrary;
-begin
- GetProcedureAddress(_LoadLibrary, kernel32, 'LoadLibrary' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_LoadLibrary]
- end;
-end;
-
-var
- _LoadLibraryExA: Pointer;
-
-function LoadLibraryExA;
-begin
- GetProcedureAddress(_LoadLibraryExA, kernel32, 'LoadLibraryExA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_LoadLibraryExA]
- end;
-end;
-
-var
- _LoadLibraryExW: Pointer;
-
-function LoadLibraryExW;
-begin
- GetProcedureAddress(_LoadLibraryExW, kernel32, 'LoadLibraryExW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_LoadLibraryExW]
- end;
-end;
-
-var
- _LoadLibraryEx: Pointer;
-
-function LoadLibraryEx;
-begin
- GetProcedureAddress(_LoadLibraryEx, kernel32, 'LoadLibraryEx' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_LoadLibraryEx]
- end;
-end;
-
-var
- _GetModuleFileNameA: Pointer;
-
-function GetModuleFileNameA;
-begin
- GetProcedureAddress(_GetModuleFileNameA, kernel32, 'GetModuleFileNameA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetModuleFileNameA]
- end;
-end;
-
-var
- _GetModuleFileNameW: Pointer;
-
-function GetModuleFileNameW;
-begin
- GetProcedureAddress(_GetModuleFileNameW, kernel32, 'GetModuleFileNameW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetModuleFileNameW]
- end;
-end;
-
-var
- _GetModuleFileName: Pointer;
-
-function GetModuleFileName;
-begin
- GetProcedureAddress(_GetModuleFileName, kernel32, 'GetModuleFileName' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetModuleFileName]
- end;
-end;
-
-var
- _GetModuleHandleA: Pointer;
-
-function GetModuleHandleA;
-begin
- GetProcedureAddress(_GetModuleHandleA, kernel32, 'GetModuleHandleA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetModuleHandleA]
- end;
-end;
-
-var
- _GetModuleHandleW: Pointer;
-
-function GetModuleHandleW;
-begin
- GetProcedureAddress(_GetModuleHandleW, kernel32, 'GetModuleHandleW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetModuleHandleW]
- end;
-end;
-
-var
- _GetModuleHandle: Pointer;
-
-function GetModuleHandle;
-begin
- GetProcedureAddress(_GetModuleHandle, kernel32, 'GetModuleHandle' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetModuleHandle]
- end;
-end;
-
-var
- _CreateProcessA: Pointer;
-
-function CreateProcessA;
-begin
- GetProcedureAddress(_CreateProcessA, kernel32, 'CreateProcessA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreateProcessA]
- end;
-end;
-
-var
- _CreateProcessW: Pointer;
-
-function CreateProcessW;
-begin
- GetProcedureAddress(_CreateProcessW, kernel32, 'CreateProcessW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreateProcessW]
- end;
-end;
-
-var
- _CreateProcess: Pointer;
-
-function CreateProcess;
-begin
- GetProcedureAddress(_CreateProcess, kernel32, 'CreateProcess' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreateProcess]
- end;
-end;
-
-var
- _GetModuleHandleExA: Pointer;
-
-function GetModuleHandleExA;
-begin
- GetProcedureAddress(_GetModuleHandleExA, kernel32, 'GetModuleHandleExA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetModuleHandleExA]
- end;
-end;
-
-var
- _GetModuleHandleExW: Pointer;
-
-function GetModuleHandleExW;
-begin
- GetProcedureAddress(_GetModuleHandleExW, kernel32, 'GetModuleHandleExW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetModuleHandleExW]
- end;
-end;
-
-var
- _GetModuleHandleEx: Pointer;
-
-function GetModuleHandleEx;
-begin
- GetProcedureAddress(_GetModuleHandleEx, kernel32, 'GetModuleHandleEx' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetModuleHandleEx]
- end;
-end;
-
-var
- _NeedCurrentDirectoryForExePathA: Pointer;
-
-function NeedCurrentDirectoryForExePathA;
-begin
- GetProcedureAddress(_NeedCurrentDirectoryForExePathA, kernel32, 'NeedCurrentDirectoryForExePathA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NeedCurrentDirectoryForExePathA]
- end;
-end;
-
-var
- _NeedCurrentDirectoryForExePathW: Pointer;
-
-function NeedCurrentDirectoryForExePathW;
-begin
- GetProcedureAddress(_NeedCurrentDirectoryForExePathW, kernel32, 'NeedCurrentDirectoryForExePathW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NeedCurrentDirectoryForExePathW]
- end;
-end;
-
-var
- _NeedCurrentDirectoryForExePath: Pointer;
-
-function NeedCurrentDirectoryForExePath;
-begin
- GetProcedureAddress(_NeedCurrentDirectoryForExePath, kernel32, 'NeedCurrentDirectoryForExePath' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NeedCurrentDirectoryForExePath]
- end;
-end;
-
-var
- _SetProcessShutdownParameters: Pointer;
-
-function SetProcessShutdownParameters;
-begin
- GetProcedureAddress(_SetProcessShutdownParameters, kernel32, 'SetProcessShutdownParameters');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetProcessShutdownParameters]
- end;
-end;
-
-var
- _GetProcessShutdownParameters: Pointer;
-
-function GetProcessShutdownParameters;
-begin
- GetProcedureAddress(_GetProcessShutdownParameters, kernel32, 'GetProcessShutdownParameters');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetProcessShutdownParameters]
- end;
-end;
-
-var
- _GetProcessVersion: Pointer;
-
-function GetProcessVersion;
-begin
- GetProcedureAddress(_GetProcessVersion, kernel32, 'GetProcessVersion');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetProcessVersion]
- end;
-end;
-
-var
- _FatalAppExitA: Pointer;
-
-procedure FatalAppExitA;
-begin
- GetProcedureAddress(_FatalAppExitA, kernel32, 'FatalAppExitA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_FatalAppExitA]
- end;
-end;
-
-var
- _FatalAppExitW: Pointer;
-
-procedure FatalAppExitW;
-begin
- GetProcedureAddress(_FatalAppExitW, kernel32, 'FatalAppExitW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_FatalAppExitW]
- end;
-end;
-
-var
- _FatalAppExit: Pointer;
-
-procedure FatalAppExit;
-begin
- GetProcedureAddress(_FatalAppExit, kernel32, 'FatalAppExit' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_FatalAppExit]
- end;
-end;
-
-var
- _GetStartupInfoA: Pointer;
-
-procedure GetStartupInfoA;
-begin
- GetProcedureAddress(_GetStartupInfoA, kernel32, 'GetStartupInfoA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetStartupInfoA]
- end;
-end;
-
-var
- _GetStartupInfoW: Pointer;
-
-procedure GetStartupInfoW;
-begin
- GetProcedureAddress(_GetStartupInfoW, kernel32, 'GetStartupInfoW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetStartupInfoW]
- end;
-end;
-
-var
- _GetStartupInfo: Pointer;
-
-procedure GetStartupInfo;
-begin
- GetProcedureAddress(_GetStartupInfo, kernel32, 'GetStartupInfo' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetStartupInfo]
- end;
-end;
-
-var
- _GetCommandLineA: Pointer;
-
-function GetCommandLineA;
-begin
- GetProcedureAddress(_GetCommandLineA, kernel32, 'GetCommandLineA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetCommandLineA]
- end;
-end;
-
-var
- _GetCommandLineW: Pointer;
-
-function GetCommandLineW;
-begin
- GetProcedureAddress(_GetCommandLineW, kernel32, 'GetCommandLineW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetCommandLineW]
- end;
-end;
-
-var
- _GetCommandLine: Pointer;
-
-function GetCommandLine;
-begin
- GetProcedureAddress(_GetCommandLine, kernel32, 'GetCommandLine' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetCommandLine]
- end;
-end;
-
-var
- _GetEnvironmentVariableA: Pointer;
-
-function GetEnvironmentVariableA;
-begin
- GetProcedureAddress(_GetEnvironmentVariableA, kernel32, 'GetEnvironmentVariableA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetEnvironmentVariableA]
- end;
-end;
-
-var
- _GetEnvironmentVariableW: Pointer;
-
-function GetEnvironmentVariableW;
-begin
- GetProcedureAddress(_GetEnvironmentVariableW, kernel32, 'GetEnvironmentVariableW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetEnvironmentVariableW]
- end;
-end;
-
-var
- _GetEnvironmentVariable: Pointer;
-
-function GetEnvironmentVariable;
-begin
- GetProcedureAddress(_GetEnvironmentVariable, kernel32, 'GetEnvironmentVariable' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetEnvironmentVariable]
- end;
-end;
-
-var
- _SetEnvironmentVariableA: Pointer;
-
-function SetEnvironmentVariableA;
-begin
- GetProcedureAddress(_SetEnvironmentVariableA, kernel32, 'SetEnvironmentVariableA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetEnvironmentVariableA]
- end;
-end;
-
-var
- _SetEnvironmentVariableW: Pointer;
-
-function SetEnvironmentVariableW;
-begin
- GetProcedureAddress(_SetEnvironmentVariableW, kernel32, 'SetEnvironmentVariableW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetEnvironmentVariableW]
- end;
-end;
-
-var
- _SetEnvironmentVariable: Pointer;
-
-function SetEnvironmentVariable;
-begin
- GetProcedureAddress(_SetEnvironmentVariable, kernel32, 'SetEnvironmentVariable' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetEnvironmentVariable]
- end;
-end;
-
-var
- _ExpandEnvironmentStringsA: Pointer;
-
-function ExpandEnvironmentStringsA;
-begin
- GetProcedureAddress(_ExpandEnvironmentStringsA, kernel32, 'ExpandEnvironmentStringsA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ExpandEnvironmentStringsA]
- end;
-end;
-
-var
- _ExpandEnvironmentStringsW: Pointer;
-
-function ExpandEnvironmentStringsW;
-begin
- GetProcedureAddress(_ExpandEnvironmentStringsW, kernel32, 'ExpandEnvironmentStringsW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ExpandEnvironmentStringsW]
- end;
-end;
-
-var
- _ExpandEnvironmentStrings: Pointer;
-
-function ExpandEnvironmentStrings;
-begin
- GetProcedureAddress(_ExpandEnvironmentStrings, kernel32, 'ExpandEnvironmentStrings' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ExpandEnvironmentStrings]
- end;
-end;
-
-var
- _GetFirmwareEnvironmentVariableA: Pointer;
-
-function GetFirmwareEnvironmentVariableA;
-begin
- GetProcedureAddress(_GetFirmwareEnvironmentVariableA, kernel32, 'GetFirmwareEnvironmentVariableA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetFirmwareEnvironmentVariableA]
- end;
-end;
-
-var
- _GetFirmwareEnvironmentVariableW: Pointer;
-
-function GetFirmwareEnvironmentVariableW;
-begin
- GetProcedureAddress(_GetFirmwareEnvironmentVariableW, kernel32, 'GetFirmwareEnvironmentVariableW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetFirmwareEnvironmentVariableW]
- end;
-end;
-
-var
- _GetFirmwareEnvironmentVariable: Pointer;
-
-function GetFirmwareEnvironmentVariable;
-begin
- GetProcedureAddress(_GetFirmwareEnvironmentVariable, kernel32, 'GetFirmwareEnvironmentVariable' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetFirmwareEnvironmentVariable]
- end;
-end;
-
-var
- _SetFirmwareEnvironmentVariableA: Pointer;
-
-function SetFirmwareEnvironmentVariableA;
-begin
- GetProcedureAddress(_SetFirmwareEnvironmentVariableA, kernel32, 'SetFirmwareEnvironmentVariableA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetFirmwareEnvironmentVariableA]
- end;
-end;
-
-var
- _SetFirmwareEnvironmentVariableW: Pointer;
-
-function SetFirmwareEnvironmentVariableW;
-begin
- GetProcedureAddress(_SetFirmwareEnvironmentVariableW, kernel32, 'SetFirmwareEnvironmentVariableW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetFirmwareEnvironmentVariableW]
- end;
-end;
-
-var
- _SetFirmwareEnvironmentVariable: Pointer;
-
-function SetFirmwareEnvironmentVariable;
-begin
- GetProcedureAddress(_SetFirmwareEnvironmentVariable, kernel32, 'SetFirmwareEnvironmentVariable' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetFirmwareEnvironmentVariable]
- end;
-end;
-
-var
- _OutputDebugStringA: Pointer;
-
-procedure OutputDebugStringA;
-begin
- GetProcedureAddress(_OutputDebugStringA, kernel32, 'OutputDebugStringA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_OutputDebugStringA]
- end;
-end;
-
-var
- _OutputDebugStringW: Pointer;
-
-procedure OutputDebugStringW;
-begin
- GetProcedureAddress(_OutputDebugStringW, kernel32, 'OutputDebugStringW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_OutputDebugStringW]
- end;
-end;
-
-var
- _OutputDebugString: Pointer;
-
-procedure OutputDebugString;
-begin
- GetProcedureAddress(_OutputDebugString, kernel32, 'OutputDebugString' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_OutputDebugString]
- end;
-end;
-
-var
- _FindResourceA: Pointer;
-
-function FindResourceA;
-begin
- GetProcedureAddress(_FindResourceA, kernel32, 'FindResourceA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_FindResourceA]
- end;
-end;
-
-var
- _FindResourceW: Pointer;
-
-function FindResourceW;
-begin
- GetProcedureAddress(_FindResourceW, kernel32, 'FindResourceW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_FindResourceW]
- end;
-end;
-
-var
- _FindResource: Pointer;
-
-function FindResource;
-begin
- GetProcedureAddress(_FindResource, kernel32, 'FindResource' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_FindResource]
- end;
-end;
-
-var
- _FindResourceExA: Pointer;
-
-function FindResourceExA;
-begin
- GetProcedureAddress(_FindResourceExA, kernel32, 'FindResourceExA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_FindResourceExA]
- end;
-end;
-
-var
- _FindResourceExW: Pointer;
-
-function FindResourceExW;
-begin
- GetProcedureAddress(_FindResourceExW, kernel32, 'FindResourceExW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_FindResourceExW]
- end;
-end;
-
-var
- _FindResourceEx: Pointer;
-
-function FindResourceEx;
-begin
- GetProcedureAddress(_FindResourceEx, kernel32, 'FindResourceEx' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_FindResourceEx]
- end;
-end;
-
-var
- _EnumResourceTypesA: Pointer;
-
-function EnumResourceTypesA;
-begin
- GetProcedureAddress(_EnumResourceTypesA, kernel32, 'EnumResourceTypesA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_EnumResourceTypesA]
- end;
-end;
-
-var
- _EnumResourceTypesW: Pointer;
-
-function EnumResourceTypesW;
-begin
- GetProcedureAddress(_EnumResourceTypesW, kernel32, 'EnumResourceTypesW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_EnumResourceTypesW]
- end;
-end;
-
-var
- _EnumResourceTypes: Pointer;
-
-function EnumResourceTypes;
-begin
- GetProcedureAddress(_EnumResourceTypes, kernel32, 'EnumResourceTypes' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_EnumResourceTypes]
- end;
-end;
-
-var
- _EnumResourceNamesA: Pointer;
-
-function EnumResourceNamesA;
-begin
- GetProcedureAddress(_EnumResourceNamesA, kernel32, 'EnumResourceNamesA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_EnumResourceNamesA]
- end;
-end;
-
-var
- _EnumResourceNamesW: Pointer;
-
-function EnumResourceNamesW;
-begin
- GetProcedureAddress(_EnumResourceNamesW, kernel32, 'EnumResourceNamesW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_EnumResourceNamesW]
- end;
-end;
-
-var
- _EnumResourceNames: Pointer;
-
-function EnumResourceNames;
-begin
- GetProcedureAddress(_EnumResourceNames, kernel32, 'EnumResourceNames' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_EnumResourceNames]
- end;
-end;
-
-var
- _EnumResourceLanguagesA: Pointer;
-
-function EnumResourceLanguagesA;
-begin
- GetProcedureAddress(_EnumResourceLanguagesA, kernel32, 'EnumResourceLanguagesA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_EnumResourceLanguagesA]
- end;
-end;
-
-var
- _EnumResourceLanguagesW: Pointer;
-
-function EnumResourceLanguagesW;
-begin
- GetProcedureAddress(_EnumResourceLanguagesW, kernel32, 'EnumResourceLanguagesW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_EnumResourceLanguagesW]
- end;
-end;
-
-var
- _EnumResourceLanguages: Pointer;
-
-function EnumResourceLanguages;
-begin
- GetProcedureAddress(_EnumResourceLanguages, kernel32, 'EnumResourceLanguages' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_EnumResourceLanguages]
- end;
-end;
-
-var
- _BeginUpdateResourceA: Pointer;
-
-function BeginUpdateResourceA;
-begin
- GetProcedureAddress(_BeginUpdateResourceA, kernel32, 'BeginUpdateResourceA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_BeginUpdateResourceA]
- end;
-end;
-
-var
- _BeginUpdateResourceW: Pointer;
-
-function BeginUpdateResourceW;
-begin
- GetProcedureAddress(_BeginUpdateResourceW, kernel32, 'BeginUpdateResourceW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_BeginUpdateResourceW]
- end;
-end;
-
-var
- _BeginUpdateResource: Pointer;
-
-function BeginUpdateResource;
-begin
- GetProcedureAddress(_BeginUpdateResource, kernel32, 'BeginUpdateResource' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_BeginUpdateResource]
- end;
-end;
-
-var
- _UpdateResourceA: Pointer;
-
-function UpdateResourceA;
-begin
- GetProcedureAddress(_UpdateResourceA, kernel32, 'UpdateResourceA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_UpdateResourceA]
- end;
-end;
-
-var
- _UpdateResourceW: Pointer;
-
-function UpdateResourceW;
-begin
- GetProcedureAddress(_UpdateResourceW, kernel32, 'UpdateResourceW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_UpdateResourceW]
- end;
-end;
-
-var
- _UpdateResource: Pointer;
-
-function UpdateResource;
-begin
- GetProcedureAddress(_UpdateResource, kernel32, 'UpdateResource' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_UpdateResource]
- end;
-end;
-
-var
- _EndUpdateResourceA: Pointer;
-
-function EndUpdateResourceA;
-begin
- GetProcedureAddress(_EndUpdateResourceA, kernel32, 'EndUpdateResourceA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_EndUpdateResourceA]
- end;
-end;
-
-var
- _EndUpdateResourceW: Pointer;
-
-function EndUpdateResourceW;
-begin
- GetProcedureAddress(_EndUpdateResourceW, kernel32, 'EndUpdateResourceW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_EndUpdateResourceW]
- end;
-end;
-
-var
- _EndUpdateResource: Pointer;
-
-function EndUpdateResource;
-begin
- GetProcedureAddress(_EndUpdateResource, kernel32, 'EndUpdateResource' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_EndUpdateResource]
- end;
-end;
-
-var
- _GlobalAddAtomA: Pointer;
-
-function GlobalAddAtomA;
-begin
- GetProcedureAddress(_GlobalAddAtomA, kernel32, 'GlobalAddAtomA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GlobalAddAtomA]
- end;
-end;
-
-var
- _GlobalAddAtomW: Pointer;
-
-function GlobalAddAtomW;
-begin
- GetProcedureAddress(_GlobalAddAtomW, kernel32, 'GlobalAddAtomW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GlobalAddAtomW]
- end;
-end;
-
-var
- _GlobalAddAtom: Pointer;
-
-function GlobalAddAtom;
-begin
- GetProcedureAddress(_GlobalAddAtom, kernel32, 'GlobalAddAtom' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GlobalAddAtom]
- end;
-end;
-
-var
- _GlobalFindAtomA: Pointer;
-
-function GlobalFindAtomA;
-begin
- GetProcedureAddress(_GlobalFindAtomA, kernel32, 'GlobalFindAtomA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GlobalFindAtomA]
- end;
-end;
-
-var
- _GlobalFindAtomW: Pointer;
-
-function GlobalFindAtomW;
-begin
- GetProcedureAddress(_GlobalFindAtomW, kernel32, 'GlobalFindAtomW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GlobalFindAtomW]
- end;
-end;
-
-var
- _GlobalFindAtom: Pointer;
-
-function GlobalFindAtom;
-begin
- GetProcedureAddress(_GlobalFindAtom, kernel32, 'GlobalFindAtom' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GlobalFindAtom]
- end;
-end;
-
-var
- _GlobalGetAtomNameA: Pointer;
-
-function GlobalGetAtomNameA;
-begin
- GetProcedureAddress(_GlobalGetAtomNameA, kernel32, 'GlobalGetAtomNameA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GlobalGetAtomNameA]
- end;
-end;
-
-var
- _GlobalGetAtomNameW: Pointer;
-
-function GlobalGetAtomNameW;
-begin
- GetProcedureAddress(_GlobalGetAtomNameW, kernel32, 'GlobalGetAtomNameW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GlobalGetAtomNameW]
- end;
-end;
-
-var
- _GlobalGetAtomName: Pointer;
-
-function GlobalGetAtomName;
-begin
- GetProcedureAddress(_GlobalGetAtomName, kernel32, 'GlobalGetAtomName' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GlobalGetAtomName]
- end;
-end;
-
-var
- _AddAtomA: Pointer;
-
-function AddAtomA;
-begin
- GetProcedureAddress(_AddAtomA, kernel32, 'AddAtomA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_AddAtomA]
- end;
-end;
-
-var
- _AddAtomW: Pointer;
-
-function AddAtomW;
-begin
- GetProcedureAddress(_AddAtomW, kernel32, 'AddAtomW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_AddAtomW]
- end;
-end;
-
-var
- _AddAtom: Pointer;
-
-function AddAtom;
-begin
- GetProcedureAddress(_AddAtom, kernel32, 'AddAtom' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_AddAtom]
- end;
-end;
-
-var
- _FindAtomA: Pointer;
-
-function FindAtomA;
-begin
- GetProcedureAddress(_FindAtomA, kernel32, 'FindAtomA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_FindAtomA]
- end;
-end;
-
-var
- _FindAtomW: Pointer;
-
-function FindAtomW;
-begin
- GetProcedureAddress(_FindAtomW, kernel32, 'FindAtomW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_FindAtomW]
- end;
-end;
-
-var
- _FindAtom: Pointer;
-
-function FindAtom;
-begin
- GetProcedureAddress(_FindAtom, kernel32, 'FindAtom' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_FindAtom]
- end;
-end;
-
-var
- _GetAtomNameA: Pointer;
-
-function GetAtomNameA;
-begin
- GetProcedureAddress(_GetAtomNameA, kernel32, 'GetAtomNameA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetAtomNameA]
- end;
-end;
-
-var
- _GetAtomNameW: Pointer;
-
-function GetAtomNameW;
-begin
- GetProcedureAddress(_GetAtomNameW, kernel32, 'GetAtomNameW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetAtomNameW]
- end;
-end;
-
-var
- _GetAtomName: Pointer;
-
-function GetAtomName;
-begin
- GetProcedureAddress(_GetAtomName, kernel32, 'GetAtomName' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetAtomName]
- end;
-end;
-
-var
- _GetProfileIntA: Pointer;
-
-function GetProfileIntA;
-begin
- GetProcedureAddress(_GetProfileIntA, kernel32, 'GetProfileIntA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetProfileIntA]
- end;
-end;
-
-var
- _GetProfileIntW: Pointer;
-
-function GetProfileIntW;
-begin
- GetProcedureAddress(_GetProfileIntW, kernel32, 'GetProfileIntW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetProfileIntW]
- end;
-end;
-
-var
- _GetProfileInt: Pointer;
-
-function GetProfileInt;
-begin
- GetProcedureAddress(_GetProfileInt, kernel32, 'GetProfileInt' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetProfileInt]
- end;
-end;
-
-var
- _GetProfileStringA: Pointer;
-
-function GetProfileStringA;
-begin
- GetProcedureAddress(_GetProfileStringA, kernel32, 'GetProfileStringA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetProfileStringA]
- end;
-end;
-
-var
- _GetProfileStringW: Pointer;
-
-function GetProfileStringW;
-begin
- GetProcedureAddress(_GetProfileStringW, kernel32, 'GetProfileStringW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetProfileStringW]
- end;
-end;
-
-var
- _GetProfileString: Pointer;
-
-function GetProfileString;
-begin
- GetProcedureAddress(_GetProfileString, kernel32, 'GetProfileString' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetProfileString]
- end;
-end;
-
-var
- _WriteProfileStringA: Pointer;
-
-function WriteProfileStringA;
-begin
- GetProcedureAddress(_WriteProfileStringA, kernel32, 'WriteProfileStringA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WriteProfileStringA]
- end;
-end;
-
-var
- _WriteProfileStringW: Pointer;
-
-function WriteProfileStringW;
-begin
- GetProcedureAddress(_WriteProfileStringW, kernel32, 'WriteProfileStringW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WriteProfileStringW]
- end;
-end;
-
-var
- _WriteProfileString: Pointer;
-
-function WriteProfileString;
-begin
- GetProcedureAddress(_WriteProfileString, kernel32, 'WriteProfileString' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WriteProfileString]
- end;
-end;
-
-var
- _GetProfileSectionA: Pointer;
-
-function GetProfileSectionA;
-begin
- GetProcedureAddress(_GetProfileSectionA, kernel32, 'GetProfileSectionA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetProfileSectionA]
- end;
-end;
-
-var
- _GetProfileSectionW: Pointer;
-
-function GetProfileSectionW;
-begin
- GetProcedureAddress(_GetProfileSectionW, kernel32, 'GetProfileSectionW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetProfileSectionW]
- end;
-end;
-
-var
- _GetProfileSection: Pointer;
-
-function GetProfileSection;
-begin
- GetProcedureAddress(_GetProfileSection, kernel32, 'GetProfileSection' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetProfileSection]
- end;
-end;
-
-var
- _WriteProfileSectionA: Pointer;
-
-function WriteProfileSectionA;
-begin
- GetProcedureAddress(_WriteProfileSectionA, kernel32, 'WriteProfileSectionA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WriteProfileSectionA]
- end;
-end;
-
-var
- _WriteProfileSectionW: Pointer;
-
-function WriteProfileSectionW;
-begin
- GetProcedureAddress(_WriteProfileSectionW, kernel32, 'WriteProfileSectionW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WriteProfileSectionW]
- end;
-end;
-
-var
- _WriteProfileSection: Pointer;
-
-function WriteProfileSection;
-begin
- GetProcedureAddress(_WriteProfileSection, kernel32, 'WriteProfileSection' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WriteProfileSection]
- end;
-end;
-
-var
- _GetPrivateProfileIntA: Pointer;
-
-function GetPrivateProfileIntA;
-begin
- GetProcedureAddress(_GetPrivateProfileIntA, kernel32, 'GetPrivateProfileIntA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetPrivateProfileIntA]
- end;
-end;
-
-var
- _GetPrivateProfileIntW: Pointer;
-
-function GetPrivateProfileIntW;
-begin
- GetProcedureAddress(_GetPrivateProfileIntW, kernel32, 'GetPrivateProfileIntW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetPrivateProfileIntW]
- end;
-end;
-
-var
- _GetPrivateProfileInt: Pointer;
-
-function GetPrivateProfileInt;
-begin
- GetProcedureAddress(_GetPrivateProfileInt, kernel32, 'GetPrivateProfileInt' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetPrivateProfileInt]
- end;
-end;
-
-var
- _GetPrivateProfileStringA: Pointer;
-
-function GetPrivateProfileStringA;
-begin
- GetProcedureAddress(_GetPrivateProfileStringA, kernel32, 'GetPrivateProfileStringA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetPrivateProfileStringA]
- end;
-end;
-
-var
- _GetPrivateProfileStringW: Pointer;
-
-function GetPrivateProfileStringW;
-begin
- GetProcedureAddress(_GetPrivateProfileStringW, kernel32, 'GetPrivateProfileStringW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetPrivateProfileStringW]
- end;
-end;
-
-var
- _GetPrivateProfileString: Pointer;
-
-function GetPrivateProfileString;
-begin
- GetProcedureAddress(_GetPrivateProfileString, kernel32, 'GetPrivateProfileString' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetPrivateProfileString]
- end;
-end;
-
-var
- _WritePrivateProfileStringA: Pointer;
-
-function WritePrivateProfileStringA;
-begin
- GetProcedureAddress(_WritePrivateProfileStringA, kernel32, 'WritePrivateProfileStringA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WritePrivateProfileStringA]
- end;
-end;
-
-var
- _WritePrivateProfileStringW: Pointer;
-
-function WritePrivateProfileStringW;
-begin
- GetProcedureAddress(_WritePrivateProfileStringW, kernel32, 'WritePrivateProfileStringW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WritePrivateProfileStringW]
- end;
-end;
-
-var
- _WritePrivateProfileString: Pointer;
-
-function WritePrivateProfileString;
-begin
- GetProcedureAddress(_WritePrivateProfileString, kernel32, 'WritePrivateProfileString' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WritePrivateProfileString]
- end;
-end;
-
-var
- _GetPrivateProfileSectionA: Pointer;
-
-function GetPrivateProfileSectionA;
-begin
- GetProcedureAddress(_GetPrivateProfileSectionA, kernel32, 'GetPrivateProfileSectionA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetPrivateProfileSectionA]
- end;
-end;
-
-var
- _GetPrivateProfileSectionW: Pointer;
-
-function GetPrivateProfileSectionW;
-begin
- GetProcedureAddress(_GetPrivateProfileSectionW, kernel32, 'GetPrivateProfileSectionW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetPrivateProfileSectionW]
- end;
-end;
-
-var
- _GetPrivateProfileSection: Pointer;
-
-function GetPrivateProfileSection;
-begin
- GetProcedureAddress(_GetPrivateProfileSection, kernel32, 'GetPrivateProfileSection' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetPrivateProfileSection]
- end;
-end;
-
-var
- _WritePrivateProfileSectionA: Pointer;
-
-function WritePrivateProfileSectionA;
-begin
- GetProcedureAddress(_WritePrivateProfileSectionA, kernel32, 'WritePrivateProfileSectionA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WritePrivateProfileSectionA]
- end;
-end;
-
-var
- _WritePrivateProfileSectionW: Pointer;
-
-function WritePrivateProfileSectionW;
-begin
- GetProcedureAddress(_WritePrivateProfileSectionW, kernel32, 'WritePrivateProfileSectionW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WritePrivateProfileSectionW]
- end;
-end;
-
-var
- _WritePrivateProfileSection: Pointer;
-
-function WritePrivateProfileSection;
-begin
- GetProcedureAddress(_WritePrivateProfileSection, kernel32, 'WritePrivateProfileSection' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WritePrivateProfileSection]
- end;
-end;
-
-var
- _GetPrivateProfileSectionNamesA: Pointer;
-
-function GetPrivateProfileSectionNamesA;
-begin
- GetProcedureAddress(_GetPrivateProfileSectionNamesA, kernel32, 'GetPrivateProfileSectionNamesA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetPrivateProfileSectionNamesA]
- end;
-end;
-
-var
- _GetPrivateProfileSectionNamesW: Pointer;
-
-function GetPrivateProfileSectionNamesW;
-begin
- GetProcedureAddress(_GetPrivateProfileSectionNamesW, kernel32, 'GetPrivateProfileSectionNamesW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetPrivateProfileSectionNamesW]
- end;
-end;
-
-var
- _GetPrivateProfileSectionNames: Pointer;
-
-function GetPrivateProfileSectionNames;
-begin
- GetProcedureAddress(_GetPrivateProfileSectionNames, kernel32, 'GetPrivateProfileSectionNames' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetPrivateProfileSectionNames]
- end;
-end;
-
-var
- _GetPrivateProfileStructA: Pointer;
-
-function GetPrivateProfileStructA;
-begin
- GetProcedureAddress(_GetPrivateProfileStructA, kernel32, 'GetPrivateProfileStructA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetPrivateProfileStructA]
- end;
-end;
-
-var
- _GetPrivateProfileStructW: Pointer;
-
-function GetPrivateProfileStructW;
-begin
- GetProcedureAddress(_GetPrivateProfileStructW, kernel32, 'GetPrivateProfileStructW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetPrivateProfileStructW]
- end;
-end;
-
-var
- _GetPrivateProfileStruct: Pointer;
-
-function GetPrivateProfileStruct;
-begin
- GetProcedureAddress(_GetPrivateProfileStruct, kernel32, 'GetPrivateProfileStruct' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetPrivateProfileStruct]
- end;
-end;
-
-var
- _WritePrivateProfileStructA: Pointer;
-
-function WritePrivateProfileStructA;
-begin
- GetProcedureAddress(_WritePrivateProfileStructA, kernel32, 'WritePrivateProfileStructA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WritePrivateProfileStructA]
- end;
-end;
-
-var
- _WritePrivateProfileStructW: Pointer;
-
-function WritePrivateProfileStructW;
-begin
- GetProcedureAddress(_WritePrivateProfileStructW, kernel32, 'WritePrivateProfileStructW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WritePrivateProfileStructW]
- end;
-end;
-
-var
- _WritePrivateProfileStruct: Pointer;
-
-function WritePrivateProfileStruct;
-begin
- GetProcedureAddress(_WritePrivateProfileStruct, kernel32, 'WritePrivateProfileStruct' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WritePrivateProfileStruct]
- end;
-end;
-
-var
- _GetDriveTypeA: Pointer;
-
-function GetDriveTypeA;
-begin
- GetProcedureAddress(_GetDriveTypeA, kernel32, 'GetDriveTypeA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetDriveTypeA]
- end;
-end;
-
-var
- _GetDriveTypeW: Pointer;
-
-function GetDriveTypeW;
-begin
- GetProcedureAddress(_GetDriveTypeW, kernel32, 'GetDriveTypeW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetDriveTypeW]
- end;
-end;
-
-var
- _GetDriveType: Pointer;
-
-function GetDriveType;
-begin
- GetProcedureAddress(_GetDriveType, kernel32, 'GetDriveType' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetDriveType]
- end;
-end;
-
-var
- _GetSystemDirectoryA: Pointer;
-
-function GetSystemDirectoryA;
-begin
- GetProcedureAddress(_GetSystemDirectoryA, kernel32, 'GetSystemDirectoryA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetSystemDirectoryA]
- end;
-end;
-
-var
- _GetSystemDirectoryW: Pointer;
-
-function GetSystemDirectoryW;
-begin
- GetProcedureAddress(_GetSystemDirectoryW, kernel32, 'GetSystemDirectoryW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetSystemDirectoryW]
- end;
-end;
-
-var
- _GetSystemDirectory: Pointer;
-
-function GetSystemDirectory;
-begin
- GetProcedureAddress(_GetSystemDirectory, kernel32, 'GetSystemDirectory' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetSystemDirectory]
- end;
-end;
-
-var
- _GetTempPathA: Pointer;
-
-function GetTempPathA;
-begin
- GetProcedureAddress(_GetTempPathA, kernel32, 'GetTempPathA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetTempPathA]
- end;
-end;
-
-var
- _GetTempPathW: Pointer;
-
-function GetTempPathW;
-begin
- GetProcedureAddress(_GetTempPathW, kernel32, 'GetTempPathW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetTempPathW]
- end;
-end;
-
-var
- _GetTempPath: Pointer;
-
-function GetTempPath;
-begin
- GetProcedureAddress(_GetTempPath, kernel32, 'GetTempPath' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetTempPath]
- end;
-end;
-
-var
- _GetTempFileNameA: Pointer;
-
-function GetTempFileNameA;
-begin
- GetProcedureAddress(_GetTempFileNameA, kernel32, 'GetTempFileNameA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetTempFileNameA]
- end;
-end;
-
-var
- _GetTempFileNameW: Pointer;
-
-function GetTempFileNameW;
-begin
- GetProcedureAddress(_GetTempFileNameW, kernel32, 'GetTempFileNameW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetTempFileNameW]
- end;
-end;
-
-var
- _GetTempFileName: Pointer;
-
-function GetTempFileName;
-begin
- GetProcedureAddress(_GetTempFileName, kernel32, 'GetTempFileName' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetTempFileName]
- end;
-end;
-
-var
- _GetWindowsDirectoryA: Pointer;
-
-function GetWindowsDirectoryA;
-begin
- GetProcedureAddress(_GetWindowsDirectoryA, kernel32, 'GetWindowsDirectoryA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetWindowsDirectoryA]
- end;
-end;
-
-var
- _GetWindowsDirectoryW: Pointer;
-
-function GetWindowsDirectoryW;
-begin
- GetProcedureAddress(_GetWindowsDirectoryW, kernel32, 'GetWindowsDirectoryW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetWindowsDirectoryW]
- end;
-end;
-
-var
- _GetWindowsDirectory: Pointer;
-
-function GetWindowsDirectory;
-begin
- GetProcedureAddress(_GetWindowsDirectory, kernel32, 'GetWindowsDirectory' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetWindowsDirectory]
- end;
-end;
-
-var
- _GetSystemWindowsDirectoryA: Pointer;
-
-function GetSystemWindowsDirectoryA;
-begin
- GetProcedureAddress(_GetSystemWindowsDirectoryA, kernel32, 'GetSystemWindowsDirectoryA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetSystemWindowsDirectoryA]
- end;
-end;
-
-var
- _GetSystemWindowsDirectoryW: Pointer;
-
-function GetSystemWindowsDirectoryW;
-begin
- GetProcedureAddress(_GetSystemWindowsDirectoryW, kernel32, 'GetSystemWindowsDirectoryW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetSystemWindowsDirectoryW]
- end;
-end;
-
-var
- _GetSystemWindowsDirectory: Pointer;
-
-function GetSystemWindowsDirectory;
-begin
- GetProcedureAddress(_GetSystemWindowsDirectory, kernel32, 'GetSystemWindowsDirectory' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetSystemWindowsDirectory]
- end;
-end;
-
-var
- _GetSystemWow64DirectoryA: Pointer;
-
-function GetSystemWow64DirectoryA;
-begin
- GetProcedureAddress(_GetSystemWow64DirectoryA, kernel32, 'GetSystemWow64DirectoryA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetSystemWow64DirectoryA]
- end;
-end;
-
-var
- _GetSystemWow64DirectoryW: Pointer;
-
-function GetSystemWow64DirectoryW;
-begin
- GetProcedureAddress(_GetSystemWow64DirectoryW, kernel32, 'GetSystemWow64DirectoryW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetSystemWow64DirectoryW]
- end;
-end;
-
-var
- _GetSystemWow64Directory: Pointer;
-
-function GetSystemWow64Directory;
-begin
- GetProcedureAddress(_GetSystemWow64Directory, kernel32, 'GetSystemWow64Directory' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetSystemWow64Directory]
- end;
-end;
-
-var
- _Wow64EnableWow64FsRedirection: Pointer;
-
-function Wow64EnableWow64FsRedirection;
-begin
- GetProcedureAddress(_Wow64EnableWow64FsRedirection, kernel32, 'Wow64EnableWow64FsRedirection');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_Wow64EnableWow64FsRedirection]
- end;
-end;
-
-var
- _SetCurrentDirectoryA: Pointer;
-
-function SetCurrentDirectoryA;
-begin
- GetProcedureAddress(_SetCurrentDirectoryA, kernel32, 'SetCurrentDirectoryA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetCurrentDirectoryA]
- end;
-end;
-
-var
- _SetCurrentDirectoryW: Pointer;
-
-function SetCurrentDirectoryW;
-begin
- GetProcedureAddress(_SetCurrentDirectoryW, kernel32, 'SetCurrentDirectoryW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetCurrentDirectoryW]
- end;
-end;
-
-var
- _SetCurrentDirectory: Pointer;
-
-function SetCurrentDirectory;
-begin
- GetProcedureAddress(_SetCurrentDirectory, kernel32, 'SetCurrentDirectory' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetCurrentDirectory]
- end;
-end;
-
-var
- _GetCurrentDirectoryA: Pointer;
-
-function GetCurrentDirectoryA;
-begin
- GetProcedureAddress(_GetCurrentDirectoryA, kernel32, 'GetCurrentDirectoryA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetCurrentDirectoryA]
- end;
-end;
-
-var
- _GetCurrentDirectoryW: Pointer;
-
-function GetCurrentDirectoryW;
-begin
- GetProcedureAddress(_GetCurrentDirectoryW, kernel32, 'GetCurrentDirectoryW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetCurrentDirectoryW]
- end;
-end;
-
-var
- _GetCurrentDirectory: Pointer;
-
-function GetCurrentDirectory;
-begin
- GetProcedureAddress(_GetCurrentDirectory, kernel32, 'GetCurrentDirectory' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetCurrentDirectory]
- end;
-end;
-
-var
- _SetDllDirectoryA: Pointer;
-
-function SetDllDirectoryA;
-begin
- GetProcedureAddress(_SetDllDirectoryA, kernel32, 'SetDllDirectoryA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetDllDirectoryA]
- end;
-end;
-
-var
- _SetDllDirectoryW: Pointer;
-
-function SetDllDirectoryW;
-begin
- GetProcedureAddress(_SetDllDirectoryW, kernel32, 'SetDllDirectoryW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetDllDirectoryW]
- end;
-end;
-
-var
- _SetDllDirectory: Pointer;
-
-function SetDllDirectory;
-begin
- GetProcedureAddress(_SetDllDirectory, kernel32, 'SetDllDirectory' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetDllDirectory]
- end;
-end;
-
-var
- _GetDllDirectoryA: Pointer;
-
-function GetDllDirectoryA;
-begin
- GetProcedureAddress(_GetDllDirectoryA, kernel32, 'GetDllDirectoryA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetDllDirectoryA]
- end;
-end;
-
-var
- _GetDllDirectoryW: Pointer;
-
-function GetDllDirectoryW;
-begin
- GetProcedureAddress(_GetDllDirectoryW, kernel32, 'GetDllDirectoryW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetDllDirectoryW]
- end;
-end;
-
-var
- _GetDllDirectory: Pointer;
-
-function GetDllDirectory;
-begin
- GetProcedureAddress(_GetDllDirectory, kernel32, 'GetDllDirectory' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetDllDirectory]
- end;
-end;
-
-var
- _GetDiskFreeSpaceA: Pointer;
-
-function GetDiskFreeSpaceA;
-begin
- GetProcedureAddress(_GetDiskFreeSpaceA, kernel32, 'GetDiskFreeSpaceA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetDiskFreeSpaceA]
- end;
-end;
-
-var
- _GetDiskFreeSpaceW: Pointer;
-
-function GetDiskFreeSpaceW;
-begin
- GetProcedureAddress(_GetDiskFreeSpaceW, kernel32, 'GetDiskFreeSpaceW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetDiskFreeSpaceW]
- end;
-end;
-
-var
- _GetDiskFreeSpace: Pointer;
-
-function GetDiskFreeSpace;
-begin
- GetProcedureAddress(_GetDiskFreeSpace, kernel32, 'GetDiskFreeSpace' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetDiskFreeSpace]
- end;
-end;
-
-var
- _GetDiskFreeSpaceExA: Pointer;
-
-function GetDiskFreeSpaceExA;
-begin
- GetProcedureAddress(_GetDiskFreeSpaceExA, kernel32, 'GetDiskFreeSpaceExA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetDiskFreeSpaceExA]
- end;
-end;
-
-var
- _GetDiskFreeSpaceExW: Pointer;
-
-function GetDiskFreeSpaceExW;
-begin
- GetProcedureAddress(_GetDiskFreeSpaceExW, kernel32, 'GetDiskFreeSpaceExW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetDiskFreeSpaceExW]
- end;
-end;
-
-var
- _GetDiskFreeSpaceEx: Pointer;
-
-function GetDiskFreeSpaceEx;
-begin
- GetProcedureAddress(_GetDiskFreeSpaceEx, kernel32, 'GetDiskFreeSpaceEx' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetDiskFreeSpaceEx]
- end;
-end;
-
-var
- _CreateDirectoryA: Pointer;
-
-function CreateDirectoryA;
-begin
- GetProcedureAddress(_CreateDirectoryA, kernel32, 'CreateDirectoryA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreateDirectoryA]
- end;
-end;
-
-var
- _CreateDirectoryW: Pointer;
-
-function CreateDirectoryW;
-begin
- GetProcedureAddress(_CreateDirectoryW, kernel32, 'CreateDirectoryW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreateDirectoryW]
- end;
-end;
-
-var
- _CreateDirectory: Pointer;
-
-function CreateDirectory;
-begin
- GetProcedureAddress(_CreateDirectory, kernel32, 'CreateDirectory' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreateDirectory]
- end;
-end;
-
-var
- _CreateDirectoryExA: Pointer;
-
-function CreateDirectoryExA;
-begin
- GetProcedureAddress(_CreateDirectoryExA, kernel32, 'CreateDirectoryExA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreateDirectoryExA]
- end;
-end;
-
-var
- _CreateDirectoryExW: Pointer;
-
-function CreateDirectoryExW;
-begin
- GetProcedureAddress(_CreateDirectoryExW, kernel32, 'CreateDirectoryExW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreateDirectoryExW]
- end;
-end;
-
-var
- _CreateDirectoryEx: Pointer;
-
-function CreateDirectoryEx;
-begin
- GetProcedureAddress(_CreateDirectoryEx, kernel32, 'CreateDirectoryEx' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreateDirectoryEx]
- end;
-end;
-
-var
- _RemoveDirectoryA: Pointer;
-
-function RemoveDirectoryA;
-begin
- GetProcedureAddress(_RemoveDirectoryA, kernel32, 'RemoveDirectoryA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RemoveDirectoryA]
- end;
-end;
-
-var
- _RemoveDirectoryW: Pointer;
-
-function RemoveDirectoryW;
-begin
- GetProcedureAddress(_RemoveDirectoryW, kernel32, 'RemoveDirectoryW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RemoveDirectoryW]
- end;
-end;
-
-var
- _RemoveDirectory: Pointer;
-
-function RemoveDirectory;
-begin
- GetProcedureAddress(_RemoveDirectory, kernel32, 'RemoveDirectory' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RemoveDirectory]
- end;
-end;
-
-var
- _GetFullPathNameA: Pointer;
-
-function GetFullPathNameA;
-begin
- GetProcedureAddress(_GetFullPathNameA, kernel32, 'GetFullPathNameA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetFullPathNameA]
- end;
-end;
-
-var
- _GetFullPathNameW: Pointer;
-
-function GetFullPathNameW;
-begin
- GetProcedureAddress(_GetFullPathNameW, kernel32, 'GetFullPathNameW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetFullPathNameW]
- end;
-end;
-
-var
- _GetFullPathName: Pointer;
-
-function GetFullPathName;
-begin
- GetProcedureAddress(_GetFullPathName, kernel32, 'GetFullPathName' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetFullPathName]
- end;
-end;
-
-var
- _DefineDosDeviceA: Pointer;
-
-function DefineDosDeviceA;
-begin
- GetProcedureAddress(_DefineDosDeviceA, kernel32, 'DefineDosDeviceA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DefineDosDeviceA]
- end;
-end;
-
-var
- _DefineDosDeviceW: Pointer;
-
-function DefineDosDeviceW;
-begin
- GetProcedureAddress(_DefineDosDeviceW, kernel32, 'DefineDosDeviceW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DefineDosDeviceW]
- end;
-end;
-
-var
- _DefineDosDevice: Pointer;
-
-function DefineDosDevice;
-begin
- GetProcedureAddress(_DefineDosDevice, kernel32, 'DefineDosDevice' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DefineDosDevice]
- end;
-end;
-
-var
- _QueryDosDeviceA: Pointer;
-
-function QueryDosDeviceA;
-begin
- GetProcedureAddress(_QueryDosDeviceA, kernel32, 'QueryDosDeviceA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_QueryDosDeviceA]
- end;
-end;
-
-var
- _QueryDosDeviceW: Pointer;
-
-function QueryDosDeviceW;
-begin
- GetProcedureAddress(_QueryDosDeviceW, kernel32, 'QueryDosDeviceW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_QueryDosDeviceW]
- end;
-end;
-
-var
- _QueryDosDevice: Pointer;
-
-function QueryDosDevice;
-begin
- GetProcedureAddress(_QueryDosDevice, kernel32, 'QueryDosDevice' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_QueryDosDevice]
- end;
-end;
-
-var
- _CreateFileA: Pointer;
-
-function CreateFileA;
-begin
- GetProcedureAddress(_CreateFileA, kernel32, 'CreateFileA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreateFileA]
- end;
-end;
-
-var
- _CreateFileW: Pointer;
-
-function CreateFileW;
-begin
- GetProcedureAddress(_CreateFileW, kernel32, 'CreateFileW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreateFileW]
- end;
-end;
-
-var
- _CreateFile: Pointer;
-
-function CreateFile;
-begin
- GetProcedureAddress(_CreateFile, kernel32, 'CreateFile' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreateFile]
- end;
-end;
-
-var
- _ReOpenFile: Pointer;
-
-function ReOpenFile;
-begin
- GetProcedureAddress(_ReOpenFile, kernel32, 'ReOpenFile');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ReOpenFile]
- end;
-end;
-
-var
- _SetFileAttributesA: Pointer;
-
-function SetFileAttributesA;
-begin
- GetProcedureAddress(_SetFileAttributesA, kernel32, 'SetFileAttributesA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetFileAttributesA]
- end;
-end;
-
-var
- _SetFileAttributesW: Pointer;
-
-function SetFileAttributesW;
-begin
- GetProcedureAddress(_SetFileAttributesW, kernel32, 'SetFileAttributesW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetFileAttributesW]
- end;
-end;
-
-var
- _SetFileAttributes: Pointer;
-
-function SetFileAttributes;
-begin
- GetProcedureAddress(_SetFileAttributes, kernel32, 'SetFileAttributes' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetFileAttributes]
- end;
-end;
-
-var
- _GetFileAttributesA: Pointer;
-
-function GetFileAttributesA;
-begin
- GetProcedureAddress(_GetFileAttributesA, kernel32, 'GetFileAttributesA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetFileAttributesA]
- end;
-end;
-
-var
- _GetFileAttributesW: Pointer;
-
-function GetFileAttributesW;
-begin
- GetProcedureAddress(_GetFileAttributesW, kernel32, 'GetFileAttributesW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetFileAttributesW]
- end;
-end;
-
-var
- _GetFileAttributes: Pointer;
-
-function GetFileAttributes;
-begin
- GetProcedureAddress(_GetFileAttributes, kernel32, 'GetFileAttributes' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetFileAttributes]
- end;
-end;
-
-var
- _GetFileAttributesExA: Pointer;
-
-function GetFileAttributesExA;
-begin
- GetProcedureAddress(_GetFileAttributesExA, kernel32, 'GetFileAttributesExA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetFileAttributesExA]
- end;
-end;
-
-var
- _GetFileAttributesExW: Pointer;
-
-function GetFileAttributesExW;
-begin
- GetProcedureAddress(_GetFileAttributesExW, kernel32, 'GetFileAttributesExW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetFileAttributesExW]
- end;
-end;
-
-var
- _GetFileAttributesEx: Pointer;
-
-function GetFileAttributesEx;
-begin
- GetProcedureAddress(_GetFileAttributesEx, kernel32, 'GetFileAttributesEx' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetFileAttributesEx]
- end;
-end;
-
-var
- _GetCompressedFileSizeA: Pointer;
-
-function GetCompressedFileSizeA;
-begin
- GetProcedureAddress(_GetCompressedFileSizeA, kernel32, 'GetCompressedFileSizeA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetCompressedFileSizeA]
- end;
-end;
-
-var
- _GetCompressedFileSizeW: Pointer;
-
-function GetCompressedFileSizeW;
-begin
- GetProcedureAddress(_GetCompressedFileSizeW, kernel32, 'GetCompressedFileSizeW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetCompressedFileSizeW]
- end;
-end;
-
-var
- _GetCompressedFileSize: Pointer;
-
-function GetCompressedFileSize;
-begin
- GetProcedureAddress(_GetCompressedFileSize, kernel32, 'GetCompressedFileSize' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetCompressedFileSize]
- end;
-end;
-
-var
- _DeleteFileA: Pointer;
-
-function DeleteFileA;
-begin
- GetProcedureAddress(_DeleteFileA, kernel32, 'DeleteFileA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DeleteFileA]
- end;
-end;
-
-var
- _DeleteFileW: Pointer;
-
-function DeleteFileW;
-begin
- GetProcedureAddress(_DeleteFileW, kernel32, 'DeleteFileW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DeleteFileW]
- end;
-end;
-
-var
- _DeleteFile: Pointer;
-
-function DeleteFile;
-begin
- GetProcedureAddress(_DeleteFile, kernel32, 'DeleteFile' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DeleteFile]
- end;
-end;
-
-var
- _FindFirstFileExA: Pointer;
-
-function FindFirstFileExA;
-begin
- GetProcedureAddress(_FindFirstFileExA, kernel32, 'FindFirstFileExA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_FindFirstFileExA]
- end;
-end;
-
-var
- _FindFirstFileExW: Pointer;
-
-function FindFirstFileExW;
-begin
- GetProcedureAddress(_FindFirstFileExW, kernel32, 'FindFirstFileExW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_FindFirstFileExW]
- end;
-end;
-
-var
- _FindFirstFileEx: Pointer;
-
-function FindFirstFileEx;
-begin
- GetProcedureAddress(_FindFirstFileEx, kernel32, 'FindFirstFileEx' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_FindFirstFileEx]
- end;
-end;
-
-var
- _FindFirstFileA: Pointer;
-
-function FindFirstFileA;
-begin
- GetProcedureAddress(_FindFirstFileA, kernel32, 'FindFirstFileA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_FindFirstFileA]
- end;
-end;
-
-var
- _FindFirstFileW: Pointer;
-
-function FindFirstFileW;
-begin
- GetProcedureAddress(_FindFirstFileW, kernel32, 'FindFirstFileW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_FindFirstFileW]
- end;
-end;
-
-var
- _FindFirstFile: Pointer;
-
-function FindFirstFile;
-begin
- GetProcedureAddress(_FindFirstFile, kernel32, 'FindFirstFile' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_FindFirstFile]
- end;
-end;
-
-var
- _FindNextFileA: Pointer;
-
-function FindNextFileA;
-begin
- GetProcedureAddress(_FindNextFileA, kernel32, 'FindNextFileA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_FindNextFileA]
- end;
-end;
-
-var
- _FindNextFileW: Pointer;
-
-function FindNextFileW;
-begin
- GetProcedureAddress(_FindNextFileW, kernel32, 'FindNextFileW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_FindNextFileW]
- end;
-end;
-
-var
- _FindNextFile: Pointer;
-
-function FindNextFile;
-begin
- GetProcedureAddress(_FindNextFile, kernel32, 'FindNextFile' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_FindNextFile]
- end;
-end;
-
-var
- _SearchPathA: Pointer;
-
-function SearchPathA;
-begin
- GetProcedureAddress(_SearchPathA, kernel32, 'SearchPathA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SearchPathA]
- end;
-end;
-
-var
- _SearchPathW: Pointer;
-
-function SearchPathW;
-begin
- GetProcedureAddress(_SearchPathW, kernel32, 'SearchPathW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SearchPathW]
- end;
-end;
-
-var
- _SearchPath: Pointer;
-
-function SearchPath;
-begin
- GetProcedureAddress(_SearchPath, kernel32, 'SearchPath' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SearchPath]
- end;
-end;
-
-var
- _CopyFileA: Pointer;
-
-function CopyFileA;
-begin
- GetProcedureAddress(_CopyFileA, kernel32, 'CopyFileA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CopyFileA]
- end;
-end;
-
-var
- _CopyFileW: Pointer;
-
-function CopyFileW;
-begin
- GetProcedureAddress(_CopyFileW, kernel32, 'CopyFileW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CopyFileW]
- end;
-end;
-
-var
- _CopyFile: Pointer;
-
-function CopyFile;
-begin
- GetProcedureAddress(_CopyFile, kernel32, 'CopyFile' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CopyFile]
- end;
-end;
-
-var
- _CopyFileExA: Pointer;
-
-function CopyFileExA;
-begin
- GetProcedureAddress(_CopyFileExA, kernel32, 'CopyFileExA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CopyFileExA]
- end;
-end;
-
-var
- _CopyFileExW: Pointer;
-
-function CopyFileExW;
-begin
- GetProcedureAddress(_CopyFileExW, kernel32, 'CopyFileExW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CopyFileExW]
- end;
-end;
-
-var
- _CopyFileEx: Pointer;
-
-function CopyFileEx;
-begin
- GetProcedureAddress(_CopyFileEx, kernel32, 'CopyFileEx' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CopyFileEx]
- end;
-end;
-
-var
- _MoveFileA: Pointer;
-
-function MoveFileA;
-begin
- GetProcedureAddress(_MoveFileA, kernel32, 'MoveFileA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MoveFileA]
- end;
-end;
-
-var
- _MoveFileW: Pointer;
-
-function MoveFileW;
-begin
- GetProcedureAddress(_MoveFileW, kernel32, 'MoveFileW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MoveFileW]
- end;
-end;
-
-var
- _MoveFile: Pointer;
-
-function MoveFile;
-begin
- GetProcedureAddress(_MoveFile, kernel32, 'MoveFile' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MoveFile]
- end;
-end;
-
-var
- _MoveFileExA: Pointer;
-
-function MoveFileExA;
-begin
- GetProcedureAddress(_MoveFileExA, kernel32, 'MoveFileExA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MoveFileExA]
- end;
-end;
-
-var
- _MoveFileExW: Pointer;
-
-function MoveFileExW;
-begin
- GetProcedureAddress(_MoveFileExW, kernel32, 'MoveFileExW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MoveFileExW]
- end;
-end;
-
-var
- _MoveFileEx: Pointer;
-
-function MoveFileEx;
-begin
- GetProcedureAddress(_MoveFileEx, kernel32, 'MoveFileEx' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MoveFileEx]
- end;
-end;
-
-var
- _MoveFileWithProgressA: Pointer;
-
-function MoveFileWithProgressA;
-begin
- GetProcedureAddress(_MoveFileWithProgressA, kernel32, 'MoveFileWithProgressA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MoveFileWithProgressA]
- end;
-end;
-
-var
- _MoveFileWithProgressW: Pointer;
-
-function MoveFileWithProgressW;
-begin
- GetProcedureAddress(_MoveFileWithProgressW, kernel32, 'MoveFileWithProgressW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MoveFileWithProgressW]
- end;
-end;
-
-var
- _MoveFileWithProgress: Pointer;
-
-function MoveFileWithProgress;
-begin
- GetProcedureAddress(_MoveFileWithProgress, kernel32, 'MoveFileWithProgress' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MoveFileWithProgress]
- end;
-end;
-
-var
- _ReplaceFileA: Pointer;
-
-function ReplaceFileA;
-begin
- GetProcedureAddress(_ReplaceFileA, kernel32, 'ReplaceFileA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ReplaceFileA]
- end;
-end;
-
-var
- _ReplaceFileW: Pointer;
-
-function ReplaceFileW;
-begin
- GetProcedureAddress(_ReplaceFileW, kernel32, 'ReplaceFileW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ReplaceFileW]
- end;
-end;
-
-var
- _ReplaceFile: Pointer;
-
-function ReplaceFile;
-begin
- GetProcedureAddress(_ReplaceFile, kernel32, 'ReplaceFile' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ReplaceFile]
- end;
-end;
-
-var
- _CreateHardLinkA: Pointer;
-
-function CreateHardLinkA;
-begin
- GetProcedureAddress(_CreateHardLinkA, kernel32, 'CreateHardLinkA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreateHardLinkA]
- end;
-end;
-
-var
- _CreateHardLinkW: Pointer;
-
-function CreateHardLinkW;
-begin
- GetProcedureAddress(_CreateHardLinkW, kernel32, 'CreateHardLinkW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreateHardLinkW]
- end;
-end;
-
-var
- _CreateHardLink: Pointer;
-
-function CreateHardLink;
-begin
- GetProcedureAddress(_CreateHardLink, kernel32, 'CreateHardLink' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreateHardLink]
- end;
-end;
-
-var
- _FindFirstStreamW: Pointer;
-
-function FindFirstStreamW;
-begin
- GetProcedureAddress(_FindFirstStreamW, kernel32, 'FindFirstStreamW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_FindFirstStreamW]
- end;
-end;
-
-var
- _FindNextStreamW: Pointer;
-
-function FindNextStreamW;
-begin
- GetProcedureAddress(_FindNextStreamW, kernel32, 'FindNextStreamW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_FindNextStreamW]
- end;
-end;
-
-var
- _CreateNamedPipeA: Pointer;
-
-function CreateNamedPipeA;
-begin
- GetProcedureAddress(_CreateNamedPipeA, kernel32, 'CreateNamedPipeA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreateNamedPipeA]
- end;
-end;
-
-var
- _CreateNamedPipeW: Pointer;
-
-function CreateNamedPipeW;
-begin
- GetProcedureAddress(_CreateNamedPipeW, kernel32, 'CreateNamedPipeW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreateNamedPipeW]
- end;
-end;
-
-var
- _CreateNamedPipe: Pointer;
-
-function CreateNamedPipe;
-begin
- GetProcedureAddress(_CreateNamedPipe, kernel32, 'CreateNamedPipe' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreateNamedPipe]
- end;
-end;
-
-var
- _GetNamedPipeHandleStateA: Pointer;
-
-function GetNamedPipeHandleStateA;
-begin
- GetProcedureAddress(_GetNamedPipeHandleStateA, kernel32, 'GetNamedPipeHandleStateA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetNamedPipeHandleStateA]
- end;
-end;
-
-var
- _GetNamedPipeHandleStateW: Pointer;
-
-function GetNamedPipeHandleStateW;
-begin
- GetProcedureAddress(_GetNamedPipeHandleStateW, kernel32, 'GetNamedPipeHandleStateW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetNamedPipeHandleStateW]
- end;
-end;
-
-var
- _GetNamedPipeHandleState: Pointer;
-
-function GetNamedPipeHandleState;
-begin
- GetProcedureAddress(_GetNamedPipeHandleState, kernel32, 'GetNamedPipeHandleState' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetNamedPipeHandleState]
- end;
-end;
-
-var
- _CallNamedPipeA: Pointer;
-
-function CallNamedPipeA;
-begin
- GetProcedureAddress(_CallNamedPipeA, kernel32, 'CallNamedPipeA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CallNamedPipeA]
- end;
-end;
-
-var
- _CallNamedPipeW: Pointer;
-
-function CallNamedPipeW;
-begin
- GetProcedureAddress(_CallNamedPipeW, kernel32, 'CallNamedPipeW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CallNamedPipeW]
- end;
-end;
-
-var
- _CallNamedPipe: Pointer;
-
-function CallNamedPipe;
-begin
- GetProcedureAddress(_CallNamedPipe, kernel32, 'CallNamedPipe' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CallNamedPipe]
- end;
-end;
-
-var
- _WaitNamedPipeA: Pointer;
-
-function WaitNamedPipeA;
-begin
- GetProcedureAddress(_WaitNamedPipeA, kernel32, 'WaitNamedPipeA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WaitNamedPipeA]
- end;
-end;
-
-var
- _WaitNamedPipeW: Pointer;
-
-function WaitNamedPipeW;
-begin
- GetProcedureAddress(_WaitNamedPipeW, kernel32, 'WaitNamedPipeW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WaitNamedPipeW]
- end;
-end;
-
-var
- _WaitNamedPipe: Pointer;
-
-function WaitNamedPipe;
-begin
- GetProcedureAddress(_WaitNamedPipe, kernel32, 'WaitNamedPipe' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WaitNamedPipe]
- end;
-end;
-
-var
- _SetVolumeLabelA: Pointer;
-
-function SetVolumeLabelA;
-begin
- GetProcedureAddress(_SetVolumeLabelA, kernel32, 'SetVolumeLabelA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetVolumeLabelA]
- end;
-end;
-
-var
- _SetVolumeLabelW: Pointer;
-
-function SetVolumeLabelW;
-begin
- GetProcedureAddress(_SetVolumeLabelW, kernel32, 'SetVolumeLabelW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetVolumeLabelW]
- end;
-end;
-
-var
- _SetVolumeLabel: Pointer;
-
-function SetVolumeLabel;
-begin
- GetProcedureAddress(_SetVolumeLabel, kernel32, 'SetVolumeLabel' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetVolumeLabel]
- end;
-end;
-
-var
- _SetFileApisToOEM: Pointer;
-
-procedure SetFileApisToOEM;
-begin
- GetProcedureAddress(_SetFileApisToOEM, kernel32, 'SetFileApisToOEM');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetFileApisToOEM]
- end;
-end;
-
-var
- _SetFileApisToANSI: Pointer;
-
-procedure SetFileApisToANSI;
-begin
- GetProcedureAddress(_SetFileApisToANSI, kernel32, 'SetFileApisToANSI');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetFileApisToANSI]
- end;
-end;
-
-var
- _AreFileApisANSI: Pointer;
-
-function AreFileApisANSI;
-begin
- GetProcedureAddress(_AreFileApisANSI, kernel32, 'AreFileApisANSI');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_AreFileApisANSI]
- end;
-end;
-
-var
- _GetVolumeInformationA: Pointer;
-
-function GetVolumeInformationA;
-begin
- GetProcedureAddress(_GetVolumeInformationA, kernel32, 'GetVolumeInformationA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetVolumeInformationA]
- end;
-end;
-
-var
- _GetVolumeInformationW: Pointer;
-
-function GetVolumeInformationW;
-begin
- GetProcedureAddress(_GetVolumeInformationW, kernel32, 'GetVolumeInformationW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetVolumeInformationW]
- end;
-end;
-
-var
- _GetVolumeInformation: Pointer;
-
-function GetVolumeInformation;
-begin
- GetProcedureAddress(_GetVolumeInformation, kernel32, 'GetVolumeInformation' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetVolumeInformation]
- end;
-end;
-
-var
- _CancelIo: Pointer;
-
-function CancelIo;
-begin
- GetProcedureAddress(_CancelIo, kernel32, 'CancelIo');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CancelIo]
- end;
-end;
-
-var
- _ClearEventLogA: Pointer;
-
-function ClearEventLogA;
-begin
- GetProcedureAddress(_ClearEventLogA, advapi32, 'ClearEventLogA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ClearEventLogA]
- end;
-end;
-
-var
- _ClearEventLogW: Pointer;
-
-function ClearEventLogW;
-begin
- GetProcedureAddress(_ClearEventLogW, advapi32, 'ClearEventLogW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ClearEventLogW]
- end;
-end;
-
-var
- _ClearEventLog: Pointer;
-
-function ClearEventLog;
-begin
- GetProcedureAddress(_ClearEventLog, advapi32, 'ClearEventLog' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ClearEventLog]
- end;
-end;
-
-var
- _BackupEventLogA: Pointer;
-
-function BackupEventLogA;
-begin
- GetProcedureAddress(_BackupEventLogA, advapi32, 'BackupEventLogA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_BackupEventLogA]
- end;
-end;
-
-var
- _BackupEventLogW: Pointer;
-
-function BackupEventLogW;
-begin
- GetProcedureAddress(_BackupEventLogW, advapi32, 'BackupEventLogW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_BackupEventLogW]
- end;
-end;
-
-var
- _BackupEventLog: Pointer;
-
-function BackupEventLog;
-begin
- GetProcedureAddress(_BackupEventLog, advapi32, 'BackupEventLog' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_BackupEventLog]
- end;
-end;
-
-var
- _CloseEventLog: Pointer;
-
-function CloseEventLog;
-begin
- GetProcedureAddress(_CloseEventLog, advapi32, 'CloseEventLog');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CloseEventLog]
- end;
-end;
-
-var
- _DeregisterEventSource: Pointer;
-
-function DeregisterEventSource;
-begin
- GetProcedureAddress(_DeregisterEventSource, advapi32, 'DeregisterEventSource');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DeregisterEventSource]
- end;
-end;
-
-var
- _NotifyChangeEventLog: Pointer;
-
-function NotifyChangeEventLog;
-begin
- GetProcedureAddress(_NotifyChangeEventLog, advapi32, 'NotifyChangeEventLog');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NotifyChangeEventLog]
- end;
-end;
-
-var
- _GetNumberOfEventLogRecords: Pointer;
-
-function GetNumberOfEventLogRecords;
-begin
- GetProcedureAddress(_GetNumberOfEventLogRecords, advapi32, 'GetNumberOfEventLogRecords');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetNumberOfEventLogRecords]
- end;
-end;
-
-var
- _GetOldestEventLogRecord: Pointer;
-
-function GetOldestEventLogRecord;
-begin
- GetProcedureAddress(_GetOldestEventLogRecord, advapi32, 'GetOldestEventLogRecord');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetOldestEventLogRecord]
- end;
-end;
-
-var
- _OpenEventLogA: Pointer;
-
-function OpenEventLogA;
-begin
- GetProcedureAddress(_OpenEventLogA, advapi32, 'OpenEventLogA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_OpenEventLogA]
- end;
-end;
-
-var
- _OpenEventLogW: Pointer;
-
-function OpenEventLogW;
-begin
- GetProcedureAddress(_OpenEventLogW, advapi32, 'OpenEventLogW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_OpenEventLogW]
- end;
-end;
-
-var
- _OpenEventLog: Pointer;
-
-function OpenEventLog;
-begin
- GetProcedureAddress(_OpenEventLog, advapi32, 'OpenEventLog' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_OpenEventLog]
- end;
-end;
-
-var
- _RegisterEventSourceA: Pointer;
-
-function RegisterEventSourceA;
-begin
- GetProcedureAddress(_RegisterEventSourceA, advapi32, 'RegisterEventSourceA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RegisterEventSourceA]
- end;
-end;
-
-var
- _RegisterEventSourceW: Pointer;
-
-function RegisterEventSourceW;
-begin
- GetProcedureAddress(_RegisterEventSourceW, advapi32, 'RegisterEventSourceW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RegisterEventSourceW]
- end;
-end;
-
-var
- _RegisterEventSource: Pointer;
-
-function RegisterEventSource;
-begin
- GetProcedureAddress(_RegisterEventSource, advapi32, 'RegisterEventSource' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RegisterEventSource]
- end;
-end;
-
-var
- _OpenBackupEventLogA: Pointer;
-
-function OpenBackupEventLogA;
-begin
- GetProcedureAddress(_OpenBackupEventLogA, advapi32, 'OpenBackupEventLogA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_OpenBackupEventLogA]
- end;
-end;
-
-var
- _OpenBackupEventLogW: Pointer;
-
-function OpenBackupEventLogW;
-begin
- GetProcedureAddress(_OpenBackupEventLogW, advapi32, 'OpenBackupEventLogW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_OpenBackupEventLogW]
- end;
-end;
-
-var
- _OpenBackupEventLog: Pointer;
-
-function OpenBackupEventLog;
-begin
- GetProcedureAddress(_OpenBackupEventLog, advapi32, 'OpenBackupEventLog' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_OpenBackupEventLog]
- end;
-end;
-
-var
- _ReadEventLogA: Pointer;
-
-function ReadEventLogA;
-begin
- GetProcedureAddress(_ReadEventLogA, advapi32, 'ReadEventLogA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ReadEventLogA]
- end;
-end;
-
-var
- _ReadEventLogW: Pointer;
-
-function ReadEventLogW;
-begin
- GetProcedureAddress(_ReadEventLogW, advapi32, 'ReadEventLogW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ReadEventLogW]
- end;
-end;
-
-var
- _ReadEventLog: Pointer;
-
-function ReadEventLog;
-begin
- GetProcedureAddress(_ReadEventLog, advapi32, 'ReadEventLog' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ReadEventLog]
- end;
-end;
-
-var
- _ReportEventA: Pointer;
-
-function ReportEventA;
-begin
- GetProcedureAddress(_ReportEventA, advapi32, 'ReportEventA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ReportEventA]
- end;
-end;
-
-var
- _ReportEventW: Pointer;
-
-function ReportEventW;
-begin
- GetProcedureAddress(_ReportEventW, advapi32, 'ReportEventW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ReportEventW]
- end;
-end;
-
-var
- _ReportEvent: Pointer;
-
-function ReportEvent;
-begin
- GetProcedureAddress(_ReportEvent, advapi32, 'ReportEvent' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ReportEvent]
- end;
-end;
-
-var
- _GetEventLogInformation: Pointer;
-
-function GetEventLogInformation;
-begin
- GetProcedureAddress(_GetEventLogInformation, advapi32, 'GetEventLogInformation');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetEventLogInformation]
- end;
-end;
-
-var
- _DuplicateToken: Pointer;
-
-function DuplicateToken;
-begin
- GetProcedureAddress(_DuplicateToken, advapi32, 'DuplicateToken');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DuplicateToken]
- end;
-end;
-
-var
- _GetKernelObjectSecurity: Pointer;
-
-function GetKernelObjectSecurity;
-begin
- GetProcedureAddress(_GetKernelObjectSecurity, advapi32, 'GetKernelObjectSecurity');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetKernelObjectSecurity]
- end;
-end;
-
-var
- _ImpersonateNamedPipeClient: Pointer;
-
-function ImpersonateNamedPipeClient;
-begin
- GetProcedureAddress(_ImpersonateNamedPipeClient, advapi32, 'ImpersonateNamedPipeClient');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ImpersonateNamedPipeClient]
- end;
-end;
-
-var
- _ImpersonateSelf: Pointer;
-
-function ImpersonateSelf;
-begin
- GetProcedureAddress(_ImpersonateSelf, advapi32, 'ImpersonateSelf');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ImpersonateSelf]
- end;
-end;
-
-var
- _RevertToSelf: Pointer;
-
-function RevertToSelf;
-begin
- GetProcedureAddress(_RevertToSelf, advapi32, 'RevertToSelf');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RevertToSelf]
- end;
-end;
-
-var
- _SetThreadToken: Pointer;
-
-function SetThreadToken;
-begin
- GetProcedureAddress(_SetThreadToken, advapi32, 'SetThreadToken');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetThreadToken]
- end;
-end;
-
-var
- _AccessCheck: Pointer;
-
-function AccessCheck;
-begin
- GetProcedureAddress(_AccessCheck, advapi32, 'AccessCheck');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_AccessCheck]
- end;
-end;
-
-var
- _AccessCheckByType: Pointer;
-
-function AccessCheckByType;
-begin
- GetProcedureAddress(_AccessCheckByType, advapi32, 'AccessCheckByType');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_AccessCheckByType]
- end;
-end;
-
-var
- _AccessCheckByTypeResultList: Pointer;
-
-function AccessCheckByTypeResultList;
-begin
- GetProcedureAddress(_AccessCheckByTypeResultList, advapi32, 'AccessCheckByTypeResultList');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_AccessCheckByTypeResultList]
- end;
-end;
-
-var
- _OpenProcessToken: Pointer;
-
-function OpenProcessToken;
-begin
- GetProcedureAddress(_OpenProcessToken, advapi32, 'OpenProcessToken');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_OpenProcessToken]
- end;
-end;
-
-var
- _OpenThreadToken: Pointer;
-
-function OpenThreadToken;
-begin
- GetProcedureAddress(_OpenThreadToken, advapi32, 'OpenThreadToken');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_OpenThreadToken]
- end;
-end;
-
-var
- _GetTokenInformation: Pointer;
-
-function GetTokenInformation;
-begin
- GetProcedureAddress(_GetTokenInformation, advapi32, 'GetTokenInformation');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetTokenInformation]
- end;
-end;
-
-var
- _SetTokenInformation: Pointer;
-
-function SetTokenInformation;
-begin
- GetProcedureAddress(_SetTokenInformation, advapi32, 'SetTokenInformation');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetTokenInformation]
- end;
-end;
-
-var
- _AdjustTokenPrivileges: Pointer;
-
-function AdjustTokenPrivileges;
-begin
- GetProcedureAddress(_AdjustTokenPrivileges, advapi32, 'AdjustTokenPrivileges');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_AdjustTokenPrivileges]
- end;
-end;
-
-var
- _AdjustTokenGroups: Pointer;
-
-function AdjustTokenGroups;
-begin
- GetProcedureAddress(_AdjustTokenGroups, advapi32, 'AdjustTokenGroups');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_AdjustTokenGroups]
- end;
-end;
-
-var
- _PrivilegeCheck: Pointer;
-
-function PrivilegeCheck;
-begin
- GetProcedureAddress(_PrivilegeCheck, advapi32, 'PrivilegeCheck');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PrivilegeCheck]
- end;
-end;
-
-var
- _AccessCheckAndAuditAlarmA: Pointer;
-
-function AccessCheckAndAuditAlarmA;
-begin
- GetProcedureAddress(_AccessCheckAndAuditAlarmA, advapi32, 'AccessCheckAndAuditAlarmA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_AccessCheckAndAuditAlarmA]
- end;
-end;
-
-var
- _AccessCheckAndAuditAlarmW: Pointer;
-
-function AccessCheckAndAuditAlarmW;
-begin
- GetProcedureAddress(_AccessCheckAndAuditAlarmW, advapi32, 'AccessCheckAndAuditAlarmW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_AccessCheckAndAuditAlarmW]
- end;
-end;
-
-var
- _AccessCheckAndAuditAlarm: Pointer;
-
-function AccessCheckAndAuditAlarm;
-begin
- GetProcedureAddress(_AccessCheckAndAuditAlarm, advapi32, 'AccessCheckAndAuditAlarm' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_AccessCheckAndAuditAlarm]
- end;
-end;
-
-var
- _AccessCheckByTypeAndAuditAlarmA: Pointer;
-
-function AccessCheckByTypeAndAuditAlarmA;
-begin
- GetProcedureAddress(_AccessCheckByTypeAndAuditAlarmA, advapi32, 'AccessCheckByTypeAndAuditAlarmA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_AccessCheckByTypeAndAuditAlarmA]
- end;
-end;
-
-var
- _AccessCheckByTypeAndAuditAlarmW: Pointer;
-
-function AccessCheckByTypeAndAuditAlarmW;
-begin
- GetProcedureAddress(_AccessCheckByTypeAndAuditAlarmW, advapi32, 'AccessCheckByTypeAndAuditAlarmW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_AccessCheckByTypeAndAuditAlarmW]
- end;
-end;
-
-var
- _AccessCheckByTypeAndAuditAlarm: Pointer;
-
-function AccessCheckByTypeAndAuditAlarm;
-begin
- GetProcedureAddress(_AccessCheckByTypeAndAuditAlarm, advapi32, 'AccessCheckByTypeAndAuditAlarm' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_AccessCheckByTypeAndAuditAlarm]
- end;
-end;
-
-var
- _AccessCheckByTypeResultListAndA: Pointer;
-
-function AccessCheckByTypeResultListAndAuditAlarmA;
-begin
- GetProcedureAddress(_AccessCheckByTypeResultListAndA, advapi32, 'AccessCheckByTypeResultListAndAuditAlarmA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_AccessCheckByTypeResultListAndA]
- end;
-end;
-
-var
- _AccessCheckByTypeResultListAndW: Pointer;
-
-function AccessCheckByTypeResultListAndAuditAlarmW;
-begin
- GetProcedureAddress(_AccessCheckByTypeResultListAndW, advapi32, 'AccessCheckByTypeResultListAndAuditAlarmW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_AccessCheckByTypeResultListAndW]
- end;
-end;
-
-var
- _AccessCheckByTypeResultListAnd: Pointer;
-
-function AccessCheckByTypeResultListAndAuditAlarm;
-begin
- GetProcedureAddress(_AccessCheckByTypeResultListAnd, advapi32, 'AccessCheckByTypeResultListAndAuditAlarm' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_AccessCheckByTypeResultListAnd]
- end;
-end;
-
-var
- _AccessCheckByTRLAndAAByHA: Pointer;
-
-function AccessCheckByTypeResultListAndAuditAlarmByHandleA;
-begin
- GetProcedureAddress(_AccessCheckByTRLAndAAByHA, advapi32, 'AccessCheckByTypeResultListAndAuditAlarmByHandleA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_AccessCheckByTRLAndAAByHA]
- end;
-end;
-
-var
- _AccessCheckByTRLAndAAByHW: Pointer;
-
-function AccessCheckByTypeResultListAndAuditAlarmByHandleW;
-begin
- GetProcedureAddress(_AccessCheckByTRLAndAAByHW, advapi32, 'AccessCheckByTypeResultListAndAuditAlarmByHandleW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_AccessCheckByTRLAndAAByHW]
- end;
-end;
-
-var
- _AccessCheckByTRLAndAAByH: Pointer;
-
-function AccessCheckByTypeResultListAndAuditAlarmByHandle;
-begin
- GetProcedureAddress(_AccessCheckByTRLAndAAByH, advapi32, 'AccessCheckByTypeResultListAndAuditAlarmByHandle' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_AccessCheckByTRLAndAAByH]
- end;
-end;
-
-var
- _ObjectOpenAuditAlarmA: Pointer;
-
-function ObjectOpenAuditAlarmA;
-begin
- GetProcedureAddress(_ObjectOpenAuditAlarmA, advapi32, 'ObjectOpenAuditAlarmA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ObjectOpenAuditAlarmA]
- end;
-end;
-
-var
- _ObjectOpenAuditAlarmW: Pointer;
-
-function ObjectOpenAuditAlarmW;
-begin
- GetProcedureAddress(_ObjectOpenAuditAlarmW, advapi32, 'ObjectOpenAuditAlarmW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ObjectOpenAuditAlarmW]
- end;
-end;
-
-var
- _ObjectOpenAuditAlarm: Pointer;
-
-function ObjectOpenAuditAlarm;
-begin
- GetProcedureAddress(_ObjectOpenAuditAlarm, advapi32, 'ObjectOpenAuditAlarm' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ObjectOpenAuditAlarm]
- end;
-end;
-
-var
- _ObjectPrivilegeAuditAlarmA: Pointer;
-
-function ObjectPrivilegeAuditAlarmA;
-begin
- GetProcedureAddress(_ObjectPrivilegeAuditAlarmA, advapi32, 'ObjectPrivilegeAuditAlarmA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ObjectPrivilegeAuditAlarmA]
- end;
-end;
-
-var
- _ObjectPrivilegeAuditAlarmW: Pointer;
-
-function ObjectPrivilegeAuditAlarmW;
-begin
- GetProcedureAddress(_ObjectPrivilegeAuditAlarmW, advapi32, 'ObjectPrivilegeAuditAlarmW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ObjectPrivilegeAuditAlarmW]
- end;
-end;
-
-var
- _ObjectPrivilegeAuditAlarm: Pointer;
-
-function ObjectPrivilegeAuditAlarm;
-begin
- GetProcedureAddress(_ObjectPrivilegeAuditAlarm, advapi32, 'ObjectPrivilegeAuditAlarm' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ObjectPrivilegeAuditAlarm]
- end;
-end;
-
-var
- _ObjectCloseAuditAlarmA: Pointer;
-
-function ObjectCloseAuditAlarmA;
-begin
- GetProcedureAddress(_ObjectCloseAuditAlarmA, advapi32, 'ObjectCloseAuditAlarmA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ObjectCloseAuditAlarmA]
- end;
-end;
-
-var
- _ObjectCloseAuditAlarmW: Pointer;
-
-function ObjectCloseAuditAlarmW;
-begin
- GetProcedureAddress(_ObjectCloseAuditAlarmW, advapi32, 'ObjectCloseAuditAlarmW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ObjectCloseAuditAlarmW]
- end;
-end;
-
-var
- _ObjectCloseAuditAlarm: Pointer;
-
-function ObjectCloseAuditAlarm;
-begin
- GetProcedureAddress(_ObjectCloseAuditAlarm, advapi32, 'ObjectCloseAuditAlarm' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ObjectCloseAuditAlarm]
- end;
-end;
-
-var
- _ObjectDeleteAuditAlarmA: Pointer;
-
-function ObjectDeleteAuditAlarmA;
-begin
- GetProcedureAddress(_ObjectDeleteAuditAlarmA, advapi32, 'ObjectDeleteAuditAlarmA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ObjectDeleteAuditAlarmA]
- end;
-end;
-
-var
- _ObjectDeleteAuditAlarmW: Pointer;
-
-function ObjectDeleteAuditAlarmW;
-begin
- GetProcedureAddress(_ObjectDeleteAuditAlarmW, advapi32, 'ObjectDeleteAuditAlarmW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ObjectDeleteAuditAlarmW]
- end;
-end;
-
-var
- _ObjectDeleteAuditAlarm: Pointer;
-
-function ObjectDeleteAuditAlarm;
-begin
- GetProcedureAddress(_ObjectDeleteAuditAlarm, advapi32, 'ObjectDeleteAuditAlarm' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ObjectDeleteAuditAlarm]
- end;
-end;
-
-var
- _PrivilegedServiceAuditAlarmA: Pointer;
-
-function PrivilegedServiceAuditAlarmA;
-begin
- GetProcedureAddress(_PrivilegedServiceAuditAlarmA, advapi32, 'PrivilegedServiceAuditAlarmA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PrivilegedServiceAuditAlarmA]
- end;
-end;
-
-var
- _PrivilegedServiceAuditAlarmW: Pointer;
-
-function PrivilegedServiceAuditAlarmW;
-begin
- GetProcedureAddress(_PrivilegedServiceAuditAlarmW, advapi32, 'PrivilegedServiceAuditAlarmW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PrivilegedServiceAuditAlarmW]
- end;
-end;
-
-var
- _PrivilegedServiceAuditAlarm: Pointer;
-
-function PrivilegedServiceAuditAlarm;
-begin
- GetProcedureAddress(_PrivilegedServiceAuditAlarm, advapi32, 'PrivilegedServiceAuditAlarm' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PrivilegedServiceAuditAlarm]
- end;
-end;
-
-var
- _IsWellKnownSid: Pointer;
-
-function IsWellKnownSid;
-begin
- GetProcedureAddress(_IsWellKnownSid, advapi32, 'IsWellKnownSid');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_IsWellKnownSid]
- end;
-end;
-
-var
- _CreateWellKnownSid: Pointer;
-
-function CreateWellKnownSid;
-begin
- GetProcedureAddress(_CreateWellKnownSid, advapi32, 'CreateWellKnownSid');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreateWellKnownSid]
- end;
-end;
-
-var
- _EqualDomainSid: Pointer;
-
-function EqualDomainSid;
-begin
- GetProcedureAddress(_EqualDomainSid, advapi32, 'EqualDomainSid');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_EqualDomainSid]
- end;
-end;
-
-var
- _GetWindowsAccountDomainSid: Pointer;
-
-function GetWindowsAccountDomainSid;
-begin
- GetProcedureAddress(_GetWindowsAccountDomainSid, advapi32, 'GetWindowsAccountDomainSid');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetWindowsAccountDomainSid]
- end;
-end;
-
-var
- _IsValidSid: Pointer;
-
-function IsValidSid;
-begin
- GetProcedureAddress(_IsValidSid, advapi32, 'IsValidSid');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_IsValidSid]
- end;
-end;
-
-var
- _EqualSid: Pointer;
-
-function EqualSid;
-begin
- GetProcedureAddress(_EqualSid, advapi32, 'EqualSid');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_EqualSid]
- end;
-end;
-
-var
- _EqualPrefixSid: Pointer;
-
-function EqualPrefixSid;
-begin
- GetProcedureAddress(_EqualPrefixSid, advapi32, 'EqualPrefixSid');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_EqualPrefixSid]
- end;
-end;
-
-var
- _GetSidLengthRequired: Pointer;
-
-function GetSidLengthRequired;
-begin
- GetProcedureAddress(_GetSidLengthRequired, advapi32, 'GetSidLengthRequired');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetSidLengthRequired]
- end;
-end;
-
-var
- _AllocateAndInitializeSid: Pointer;
-
-function AllocateAndInitializeSid;
-begin
- GetProcedureAddress(_AllocateAndInitializeSid, advapi32, 'AllocateAndInitializeSid');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_AllocateAndInitializeSid]
- end;
-end;
-
-var
- _FreeSid: Pointer;
-
-function FreeSid;
-begin
- GetProcedureAddress(_FreeSid, advapi32, 'FreeSid');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_FreeSid]
- end;
-end;
-
-var
- _InitializeSid: Pointer;
-
-function InitializeSid;
-begin
- GetProcedureAddress(_InitializeSid, advapi32, 'InitializeSid');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_InitializeSid]
- end;
-end;
-
-var
- _GetSidIdentifierAuthority: Pointer;
-
-function GetSidIdentifierAuthority;
-begin
- GetProcedureAddress(_GetSidIdentifierAuthority, advapi32, 'GetSidIdentifierAuthority');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetSidIdentifierAuthority]
- end;
-end;
-
-var
- _GetSidSubAuthority: Pointer;
-
-function GetSidSubAuthority;
-begin
- GetProcedureAddress(_GetSidSubAuthority, advapi32, 'GetSidSubAuthority');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetSidSubAuthority]
- end;
-end;
-
-var
- _GetSidSubAuthorityCount: Pointer;
-
-function GetSidSubAuthorityCount;
-begin
- GetProcedureAddress(_GetSidSubAuthorityCount, advapi32, 'GetSidSubAuthorityCount');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetSidSubAuthorityCount]
- end;
-end;
-
-var
- _GetLengthSid: Pointer;
-
-function GetLengthSid;
-begin
- GetProcedureAddress(_GetLengthSid, advapi32, 'GetLengthSid');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetLengthSid]
- end;
-end;
-
-var
- _CopySid: Pointer;
-
-function CopySid;
-begin
- GetProcedureAddress(_CopySid, advapi32, 'CopySid');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CopySid]
- end;
-end;
-
-var
- _AreAllAccessesGranted: Pointer;
-
-function AreAllAccessesGranted;
-begin
- GetProcedureAddress(_AreAllAccessesGranted, advapi32, 'AreAllAccessesGranted');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_AreAllAccessesGranted]
- end;
-end;
-
-var
- _AreAnyAccessesGranted: Pointer;
-
-function AreAnyAccessesGranted;
-begin
- GetProcedureAddress(_AreAnyAccessesGranted, advapi32, 'AreAnyAccessesGranted');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_AreAnyAccessesGranted]
- end;
-end;
-
-var
- _MapGenericMask: Pointer;
-
-procedure MapGenericMask;
-begin
- GetProcedureAddress(_MapGenericMask, advapi32, 'MapGenericMask');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MapGenericMask]
- end;
-end;
-
-var
- _IsValidAcl: Pointer;
-
-function IsValidAcl;
-begin
- GetProcedureAddress(_IsValidAcl, advapi32, 'IsValidAcl');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_IsValidAcl]
- end;
-end;
-
-var
- _InitializeAcl: Pointer;
-
-function InitializeAcl;
-begin
- GetProcedureAddress(_InitializeAcl, advapi32, 'InitializeAcl');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_InitializeAcl]
- end;
-end;
-
-var
- _GetAclInformation: Pointer;
-
-function GetAclInformation;
-begin
- GetProcedureAddress(_GetAclInformation, advapi32, 'GetAclInformation');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetAclInformation]
- end;
-end;
-
-var
- _SetAclInformation: Pointer;
-
-function SetAclInformation;
-begin
- GetProcedureAddress(_SetAclInformation, advapi32, 'SetAclInformation');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetAclInformation]
- end;
-end;
-
-var
- _AddAce: Pointer;
-
-function AddAce;
-begin
- GetProcedureAddress(_AddAce, advapi32, 'AddAce');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_AddAce]
- end;
-end;
-
-var
- _DeleteAce: Pointer;
-
-function DeleteAce;
-begin
- GetProcedureAddress(_DeleteAce, advapi32, 'DeleteAce');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DeleteAce]
- end;
-end;
-
-var
- _GetAce: Pointer;
-
-function GetAce;
-begin
- GetProcedureAddress(_GetAce, advapi32, 'GetAce');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetAce]
- end;
-end;
-
-var
- _AddAccessAllowedAce: Pointer;
-
-function AddAccessAllowedAce;
-begin
- GetProcedureAddress(_AddAccessAllowedAce, advapi32, 'AddAccessAllowedAce');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_AddAccessAllowedAce]
- end;
-end;
-
-var
- _AddAccessAllowedAceEx: Pointer;
-
-function AddAccessAllowedAceEx;
-begin
- GetProcedureAddress(_AddAccessAllowedAceEx, advapi32, 'AddAccessAllowedAceEx');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_AddAccessAllowedAceEx]
- end;
-end;
-
-var
- _AddAccessDeniedAce: Pointer;
-
-function AddAccessDeniedAce;
-begin
- GetProcedureAddress(_AddAccessDeniedAce, advapi32, 'AddAccessDeniedAce');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_AddAccessDeniedAce]
- end;
-end;
-
-var
- _AddAccessDeniedAceEx: Pointer;
-
-function AddAccessDeniedAceEx;
-begin
- GetProcedureAddress(_AddAccessDeniedAceEx, advapi32, 'AddAccessDeniedAceEx');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_AddAccessDeniedAceEx]
- end;
-end;
-
-var
- _AddAuditAccessAce: Pointer;
-
-function AddAuditAccessAce;
-begin
- GetProcedureAddress(_AddAuditAccessAce, advapi32, 'AddAuditAccessAce');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_AddAuditAccessAce]
- end;
-end;
-
-var
- _AddAuditAccessAceEx: Pointer;
-
-function AddAuditAccessAceEx;
-begin
- GetProcedureAddress(_AddAuditAccessAceEx, advapi32, 'AddAuditAccessAceEx');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_AddAuditAccessAceEx]
- end;
-end;
-
-var
- _AddAccessAllowedObjectAce: Pointer;
-
-function AddAccessAllowedObjectAce;
-begin
- GetProcedureAddress(_AddAccessAllowedObjectAce, advapi32, 'AddAccessAllowedObjectAce');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_AddAccessAllowedObjectAce]
- end;
-end;
-
-var
- _AddAccessDeniedObjectAce: Pointer;
-
-function AddAccessDeniedObjectAce;
-begin
- GetProcedureAddress(_AddAccessDeniedObjectAce, advapi32, 'AddAccessDeniedObjectAce');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_AddAccessDeniedObjectAce]
- end;
-end;
-
-var
- _AddAuditAccessObjectAce: Pointer;
-
-function AddAuditAccessObjectAce;
-begin
- GetProcedureAddress(_AddAuditAccessObjectAce, advapi32, 'AddAuditAccessObjectAce');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_AddAuditAccessObjectAce]
- end;
-end;
-
-var
- _FindFirstFreeAce: Pointer;
-
-function FindFirstFreeAce;
-begin
- GetProcedureAddress(_FindFirstFreeAce, advapi32, 'FindFirstFreeAce');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_FindFirstFreeAce]
- end;
-end;
-
-var
- _InitializeSecurityDescriptor: Pointer;
-
-function InitializeSecurityDescriptor;
-begin
- GetProcedureAddress(_InitializeSecurityDescriptor, advapi32, 'InitializeSecurityDescriptor');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_InitializeSecurityDescriptor]
- end;
-end;
-
-var
- _IsValidSecurityDescriptor: Pointer;
-
-function IsValidSecurityDescriptor;
-begin
- GetProcedureAddress(_IsValidSecurityDescriptor, advapi32, 'IsValidSecurityDescriptor');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_IsValidSecurityDescriptor]
- end;
-end;
-
-var
- _GetSecurityDescriptorLength: Pointer;
-
-function GetSecurityDescriptorLength;
-begin
- GetProcedureAddress(_GetSecurityDescriptorLength, advapi32, 'GetSecurityDescriptorLength');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetSecurityDescriptorLength]
- end;
-end;
-
-var
- _GetSecurityDescriptorControl: Pointer;
-
-function GetSecurityDescriptorControl;
-begin
- GetProcedureAddress(_GetSecurityDescriptorControl, advapi32, 'GetSecurityDescriptorControl');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetSecurityDescriptorControl]
- end;
-end;
-
-var
- _SetSecurityDescriptorControl: Pointer;
-
-function SetSecurityDescriptorControl;
-begin
- GetProcedureAddress(_SetSecurityDescriptorControl, advapi32, 'SetSecurityDescriptorControl');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetSecurityDescriptorControl]
- end;
-end;
-
-var
- _SetSecurityDescriptorDacl: Pointer;
-
-function SetSecurityDescriptorDacl;
-begin
- GetProcedureAddress(_SetSecurityDescriptorDacl, advapi32, 'SetSecurityDescriptorDacl');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetSecurityDescriptorDacl]
- end;
-end;
-
-var
- _GetSecurityDescriptorDacl: Pointer;
-
-function GetSecurityDescriptorDacl;
-begin
- GetProcedureAddress(_GetSecurityDescriptorDacl, advapi32, 'GetSecurityDescriptorDacl');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetSecurityDescriptorDacl]
- end;
-end;
-
-var
- _SetSecurityDescriptorSacl: Pointer;
-
-function SetSecurityDescriptorSacl;
-begin
- GetProcedureAddress(_SetSecurityDescriptorSacl, advapi32, 'SetSecurityDescriptorSacl');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetSecurityDescriptorSacl]
- end;
-end;
-
-var
- _GetSecurityDescriptorSacl: Pointer;
-
-function GetSecurityDescriptorSacl;
-begin
- GetProcedureAddress(_GetSecurityDescriptorSacl, advapi32, 'GetSecurityDescriptorSacl');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetSecurityDescriptorSacl]
- end;
-end;
-
-var
- _SetSecurityDescriptorOwner: Pointer;
-
-function SetSecurityDescriptorOwner;
-begin
- GetProcedureAddress(_SetSecurityDescriptorOwner, advapi32, 'SetSecurityDescriptorOwner');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetSecurityDescriptorOwner]
- end;
-end;
-
-var
- _GetSecurityDescriptorOwner: Pointer;
-
-function GetSecurityDescriptorOwner;
-begin
- GetProcedureAddress(_GetSecurityDescriptorOwner, advapi32, 'GetSecurityDescriptorOwner');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetSecurityDescriptorOwner]
- end;
-end;
-
-var
- _SetSecurityDescriptorGroup: Pointer;
-
-function SetSecurityDescriptorGroup;
-begin
- GetProcedureAddress(_SetSecurityDescriptorGroup, advapi32, 'SetSecurityDescriptorGroup');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetSecurityDescriptorGroup]
- end;
-end;
-
-var
- _GetSecurityDescriptorGroup: Pointer;
-
-function GetSecurityDescriptorGroup;
-begin
- GetProcedureAddress(_GetSecurityDescriptorGroup, advapi32, 'GetSecurityDescriptorGroup');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetSecurityDescriptorGroup]
- end;
-end;
-
-var
- _SetSecurityDescriptorRMControl: Pointer;
-
-function SetSecurityDescriptorRMControl;
-begin
- GetProcedureAddress(_SetSecurityDescriptorRMControl, advapi32, 'SetSecurityDescriptorRMControl');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetSecurityDescriptorRMControl]
- end;
-end;
-
-var
- _GetSecurityDescriptorRMControl: Pointer;
-
-function GetSecurityDescriptorRMControl;
-begin
- GetProcedureAddress(_GetSecurityDescriptorRMControl, advapi32, 'GetSecurityDescriptorRMControl');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetSecurityDescriptorRMControl]
- end;
-end;
-
-var
- _CreatePrivateObjectSecurity: Pointer;
-
-function CreatePrivateObjectSecurity;
-begin
- GetProcedureAddress(_CreatePrivateObjectSecurity, advapi32, 'CreatePrivateObjectSecurity');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreatePrivateObjectSecurity]
- end;
-end;
-
-var
- _ConvertToAutoInheritPrObjSec: Pointer;
-
-function ConvertToAutoInheritPrivateObjectSecurity;
-begin
- GetProcedureAddress(_ConvertToAutoInheritPrObjSec, advapi32, 'ConvertToAutoInheritPrivateObjectSecurity');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ConvertToAutoInheritPrObjSec]
- end;
-end;
-
-var
- _CreatePrivateObjectSecurityEx: Pointer;
-
-function CreatePrivateObjectSecurityEx;
-begin
- GetProcedureAddress(_CreatePrivateObjectSecurityEx, advapi32, 'CreatePrivateObjectSecurityEx');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreatePrivateObjectSecurityEx]
- end;
-end;
-
-var
- _SetPrivateObjectSecurity: Pointer;
-
-function SetPrivateObjectSecurity;
-begin
- GetProcedureAddress(_SetPrivateObjectSecurity, advapi32, 'SetPrivateObjectSecurity');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetPrivateObjectSecurity]
- end;
-end;
-
-var
- _SetPrivateObjectSecurityEx: Pointer;
-
-function SetPrivateObjectSecurityEx;
-begin
- GetProcedureAddress(_SetPrivateObjectSecurityEx, advapi32, 'SetPrivateObjectSecurityEx');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetPrivateObjectSecurityEx]
- end;
-end;
-
-var
- _GetPrivateObjectSecurity: Pointer;
-
-function GetPrivateObjectSecurity;
-begin
- GetProcedureAddress(_GetPrivateObjectSecurity, advapi32, 'GetPrivateObjectSecurity');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetPrivateObjectSecurity]
- end;
-end;
-
-var
- _DestroyPrivateObjectSecurity: Pointer;
-
-function DestroyPrivateObjectSecurity;
-begin
- GetProcedureAddress(_DestroyPrivateObjectSecurity, advapi32, 'DestroyPrivateObjectSecurity');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DestroyPrivateObjectSecurity]
- end;
-end;
-
-var
- _MakeSelfRelativeSD: Pointer;
-
-function MakeSelfRelativeSD;
-begin
- GetProcedureAddress(_MakeSelfRelativeSD, advapi32, 'MakeSelfRelativeSD');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MakeSelfRelativeSD]
- end;
-end;
-
-var
- _MakeAbsoluteSD: Pointer;
-
-function MakeAbsoluteSD;
-begin
- GetProcedureAddress(_MakeAbsoluteSD, advapi32, 'MakeAbsoluteSD');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MakeAbsoluteSD]
- end;
-end;
-
-var
- _MakeAbsoluteSD2: Pointer;
-
-function MakeAbsoluteSD2;
-begin
- GetProcedureAddress(_MakeAbsoluteSD2, advapi32, 'MakeAbsoluteSD2');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MakeAbsoluteSD2]
- end;
-end;
-
-var
- _SetFileSecurityA: Pointer;
-
-function SetFileSecurityA;
-begin
- GetProcedureAddress(_SetFileSecurityA, advapi32, 'SetFileSecurityA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetFileSecurityA]
- end;
-end;
-
-var
- _SetFileSecurityW: Pointer;
-
-function SetFileSecurityW;
-begin
- GetProcedureAddress(_SetFileSecurityW, advapi32, 'SetFileSecurityW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetFileSecurityW]
- end;
-end;
-
-var
- _SetFileSecurity: Pointer;
-
-function SetFileSecurity;
-begin
- GetProcedureAddress(_SetFileSecurity, advapi32, 'SetFileSecurity' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetFileSecurity]
- end;
-end;
-
-var
- _GetFileSecurityA: Pointer;
-
-function GetFileSecurityA;
-begin
- GetProcedureAddress(_GetFileSecurityA, advapi32, 'GetFileSecurityA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetFileSecurityA]
- end;
-end;
-
-var
- _GetFileSecurityW: Pointer;
-
-function GetFileSecurityW;
-begin
- GetProcedureAddress(_GetFileSecurityW, advapi32, 'GetFileSecurityW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetFileSecurityW]
- end;
-end;
-
-var
- _GetFileSecurity: Pointer;
-
-function GetFileSecurity;
-begin
- GetProcedureAddress(_GetFileSecurity, advapi32, 'GetFileSecurity' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetFileSecurity]
- end;
-end;
-
-var
- _SetKernelObjectSecurity: Pointer;
-
-function SetKernelObjectSecurity;
-begin
- GetProcedureAddress(_SetKernelObjectSecurity, advapi32, 'SetKernelObjectSecurity');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetKernelObjectSecurity]
- end;
-end;
-
-var
- _FindFirstChangeNotificationA: Pointer;
-
-function FindFirstChangeNotificationA;
-begin
- GetProcedureAddress(_FindFirstChangeNotificationA, kernel32, 'FindFirstChangeNotificationA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_FindFirstChangeNotificationA]
- end;
-end;
-
-var
- _FindFirstChangeNotificationW: Pointer;
-
-function FindFirstChangeNotificationW;
-begin
- GetProcedureAddress(_FindFirstChangeNotificationW, kernel32, 'FindFirstChangeNotificationW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_FindFirstChangeNotificationW]
- end;
-end;
-
-var
- _FindFirstChangeNotification: Pointer;
-
-function FindFirstChangeNotification;
-begin
- GetProcedureAddress(_FindFirstChangeNotification, kernel32, 'FindFirstChangeNotification' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_FindFirstChangeNotification]
- end;
-end;
-
-var
- _FindNextChangeNotification: Pointer;
-
-function FindNextChangeNotification;
-begin
- GetProcedureAddress(_FindNextChangeNotification, kernel32, 'FindNextChangeNotification');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_FindNextChangeNotification]
- end;
-end;
-
-var
- _FindCloseChangeNotification: Pointer;
-
-function FindCloseChangeNotification;
-begin
- GetProcedureAddress(_FindCloseChangeNotification, kernel32, 'FindCloseChangeNotification');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_FindCloseChangeNotification]
- end;
-end;
-
-var
- _ReadDirectoryChangesW: Pointer;
-
-function ReadDirectoryChangesW;
-begin
- GetProcedureAddress(_ReadDirectoryChangesW, kernel32, 'ReadDirectoryChangesW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ReadDirectoryChangesW]
- end;
-end;
-
-var
- _VirtualLock: Pointer;
-
-function VirtualLock;
-begin
- GetProcedureAddress(_VirtualLock, kernel32, 'VirtualLock');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_VirtualLock]
- end;
-end;
-
-var
- _VirtualUnlock: Pointer;
-
-function VirtualUnlock;
-begin
- GetProcedureAddress(_VirtualUnlock, kernel32, 'VirtualUnlock');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_VirtualUnlock]
- end;
-end;
-
-var
- _MapViewOfFileEx: Pointer;
-
-function MapViewOfFileEx;
-begin
- GetProcedureAddress(_MapViewOfFileEx, kernel32, 'MapViewOfFileEx');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MapViewOfFileEx]
- end;
-end;
-
-var
- _SetPriorityClass: Pointer;
-
-function SetPriorityClass;
-begin
- GetProcedureAddress(_SetPriorityClass, kernel32, 'SetPriorityClass');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetPriorityClass]
- end;
-end;
-
-var
- _GetPriorityClass: Pointer;
-
-function GetPriorityClass;
-begin
- GetProcedureAddress(_GetPriorityClass, kernel32, 'GetPriorityClass');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetPriorityClass]
- end;
-end;
-
-var
- _IsBadReadPtr: Pointer;
-
-function IsBadReadPtr;
-begin
- GetProcedureAddress(_IsBadReadPtr, kernel32, 'IsBadReadPtr');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_IsBadReadPtr]
- end;
-end;
-
-var
- _IsBadWritePtr: Pointer;
-
-function IsBadWritePtr;
-begin
- GetProcedureAddress(_IsBadWritePtr, kernel32, 'IsBadWritePtr');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_IsBadWritePtr]
- end;
-end;
-
-var
- _IsBadHugeReadPtr: Pointer;
-
-function IsBadHugeReadPtr;
-begin
- GetProcedureAddress(_IsBadHugeReadPtr, kernel32, 'IsBadHugeReadPtr');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_IsBadHugeReadPtr]
- end;
-end;
-
-var
- _IsBadHugeWritePtr: Pointer;
-
-function IsBadHugeWritePtr;
-begin
- GetProcedureAddress(_IsBadHugeWritePtr, kernel32, 'IsBadHugeWritePtr');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_IsBadHugeWritePtr]
- end;
-end;
-
-var
- _IsBadCodePtr: Pointer;
-
-function IsBadCodePtr;
-begin
- GetProcedureAddress(_IsBadCodePtr, kernel32, 'IsBadCodePtr');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_IsBadCodePtr]
- end;
-end;
-
-var
- _IsBadStringPtrA: Pointer;
-
-function IsBadStringPtrA;
-begin
- GetProcedureAddress(_IsBadStringPtrA, kernel32, 'IsBadStringPtrA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_IsBadStringPtrA]
- end;
-end;
-
-var
- _IsBadStringPtrW: Pointer;
-
-function IsBadStringPtrW;
-begin
- GetProcedureAddress(_IsBadStringPtrW, kernel32, 'IsBadStringPtrW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_IsBadStringPtrW]
- end;
-end;
-
-var
- _IsBadStringPtr: Pointer;
-
-function IsBadStringPtr;
-begin
- GetProcedureAddress(_IsBadStringPtr, kernel32, 'IsBadStringPtr' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_IsBadStringPtr]
- end;
-end;
-
-var
- _LookupAccountSidA: Pointer;
-
-function LookupAccountSidA;
-begin
- GetProcedureAddress(_LookupAccountSidA, advapi32, 'LookupAccountSidA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_LookupAccountSidA]
- end;
-end;
-
-var
- _LookupAccountSidW: Pointer;
-
-function LookupAccountSidW;
-begin
- GetProcedureAddress(_LookupAccountSidW, advapi32, 'LookupAccountSidW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_LookupAccountSidW]
- end;
-end;
-
-var
- _LookupAccountSid: Pointer;
-
-function LookupAccountSid;
-begin
- GetProcedureAddress(_LookupAccountSid, advapi32, 'LookupAccountSid' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_LookupAccountSid]
- end;
-end;
-
-var
- _LookupAccountNameA: Pointer;
-
-function LookupAccountNameA;
-begin
- GetProcedureAddress(_LookupAccountNameA, advapi32, 'LookupAccountNameA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_LookupAccountNameA]
- end;
-end;
-
-var
- _LookupAccountNameW: Pointer;
-
-function LookupAccountNameW;
-begin
- GetProcedureAddress(_LookupAccountNameW, advapi32, 'LookupAccountNameW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_LookupAccountNameW]
- end;
-end;
-
-var
- _LookupAccountName: Pointer;
-
-function LookupAccountName;
-begin
- GetProcedureAddress(_LookupAccountName, advapi32, 'LookupAccountName' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_LookupAccountName]
- end;
-end;
-
-var
- _LookupPrivilegeValueA: Pointer;
-
-function LookupPrivilegeValueA;
-begin
- GetProcedureAddress(_LookupPrivilegeValueA, advapi32, 'LookupPrivilegeValueA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_LookupPrivilegeValueA]
- end;
-end;
-
-var
- _LookupPrivilegeValueW: Pointer;
-
-function LookupPrivilegeValueW;
-begin
- GetProcedureAddress(_LookupPrivilegeValueW, advapi32, 'LookupPrivilegeValueW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_LookupPrivilegeValueW]
- end;
-end;
-
-var
- _LookupPrivilegeValue: Pointer;
-
-function LookupPrivilegeValue;
-begin
- GetProcedureAddress(_LookupPrivilegeValue, advapi32, 'LookupPrivilegeValue' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_LookupPrivilegeValue]
- end;
-end;
-
-var
- _LookupPrivilegeNameA: Pointer;
-
-function LookupPrivilegeNameA;
-begin
- GetProcedureAddress(_LookupPrivilegeNameA, advapi32, 'LookupPrivilegeNameA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_LookupPrivilegeNameA]
- end;
-end;
-
-var
- _LookupPrivilegeNameW: Pointer;
-
-function LookupPrivilegeNameW;
-begin
- GetProcedureAddress(_LookupPrivilegeNameW, advapi32, 'LookupPrivilegeNameW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_LookupPrivilegeNameW]
- end;
-end;
-
-var
- _LookupPrivilegeName: Pointer;
-
-function LookupPrivilegeName;
-begin
- GetProcedureAddress(_LookupPrivilegeName, advapi32, 'LookupPrivilegeName' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_LookupPrivilegeName]
- end;
-end;
-
-var
- _LookupPrivilegeDisplayNameA: Pointer;
-
-function LookupPrivilegeDisplayNameA;
-begin
- GetProcedureAddress(_LookupPrivilegeDisplayNameA, advapi32, 'LookupPrivilegeDisplayNameA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_LookupPrivilegeDisplayNameA]
- end;
-end;
-
-var
- _LookupPrivilegeDisplayNameW: Pointer;
-
-function LookupPrivilegeDisplayNameW;
-begin
- GetProcedureAddress(_LookupPrivilegeDisplayNameW, advapi32, 'LookupPrivilegeDisplayNameW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_LookupPrivilegeDisplayNameW]
- end;
-end;
-
-var
- _LookupPrivilegeDisplayName: Pointer;
-
-function LookupPrivilegeDisplayName;
-begin
- GetProcedureAddress(_LookupPrivilegeDisplayName, advapi32, 'LookupPrivilegeDisplayName' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_LookupPrivilegeDisplayName]
- end;
-end;
-
-var
- _AllocateLocallyUniqueId: Pointer;
-
-function AllocateLocallyUniqueId;
-begin
- GetProcedureAddress(_AllocateLocallyUniqueId, advapi32, 'AllocateLocallyUniqueId');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_AllocateLocallyUniqueId]
- end;
-end;
-
-var
- _BuildCommDCBA: Pointer;
-
-function BuildCommDCBA;
-begin
- GetProcedureAddress(_BuildCommDCBA, kernel32, 'BuildCommDCBA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_BuildCommDCBA]
- end;
-end;
-
-var
- _BuildCommDCBW: Pointer;
-
-function BuildCommDCBW;
-begin
- GetProcedureAddress(_BuildCommDCBW, kernel32, 'BuildCommDCBW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_BuildCommDCBW]
- end;
-end;
-
-var
- _BuildCommDCB: Pointer;
-
-function BuildCommDCB;
-begin
- GetProcedureAddress(_BuildCommDCB, kernel32, 'BuildCommDCB' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_BuildCommDCB]
- end;
-end;
-
-var
- _BuildCommDCBAndTimeoutsA: Pointer;
-
-function BuildCommDCBAndTimeoutsA;
-begin
- GetProcedureAddress(_BuildCommDCBAndTimeoutsA, kernel32, 'BuildCommDCBAndTimeoutsA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_BuildCommDCBAndTimeoutsA]
- end;
-end;
-
-var
- _BuildCommDCBAndTimeoutsW: Pointer;
-
-function BuildCommDCBAndTimeoutsW;
-begin
- GetProcedureAddress(_BuildCommDCBAndTimeoutsW, kernel32, 'BuildCommDCBAndTimeoutsW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_BuildCommDCBAndTimeoutsW]
- end;
-end;
-
-var
- _BuildCommDCBAndTimeouts: Pointer;
-
-function BuildCommDCBAndTimeouts;
-begin
- GetProcedureAddress(_BuildCommDCBAndTimeouts, kernel32, 'BuildCommDCBAndTimeouts' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_BuildCommDCBAndTimeouts]
- end;
-end;
-
-var
- _CommConfigDialogA: Pointer;
-
-function CommConfigDialogA;
-begin
- GetProcedureAddress(_CommConfigDialogA, kernel32, 'CommConfigDialogA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CommConfigDialogA]
- end;
-end;
-
-var
- _CommConfigDialogW: Pointer;
-
-function CommConfigDialogW;
-begin
- GetProcedureAddress(_CommConfigDialogW, kernel32, 'CommConfigDialogW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CommConfigDialogW]
- end;
-end;
-
-var
- _CommConfigDialog: Pointer;
-
-function CommConfigDialog;
-begin
- GetProcedureAddress(_CommConfigDialog, kernel32, 'CommConfigDialog' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CommConfigDialog]
- end;
-end;
-
-var
- _GetDefaultCommConfigA: Pointer;
-
-function GetDefaultCommConfigA;
-begin
- GetProcedureAddress(_GetDefaultCommConfigA, kernel32, 'GetDefaultCommConfigA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetDefaultCommConfigA]
- end;
-end;
-
-var
- _GetDefaultCommConfigW: Pointer;
-
-function GetDefaultCommConfigW;
-begin
- GetProcedureAddress(_GetDefaultCommConfigW, kernel32, 'GetDefaultCommConfigW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetDefaultCommConfigW]
- end;
-end;
-
-var
- _GetDefaultCommConfig: Pointer;
-
-function GetDefaultCommConfig;
-begin
- GetProcedureAddress(_GetDefaultCommConfig, kernel32, 'GetDefaultCommConfig' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetDefaultCommConfig]
- end;
-end;
-
-var
- _SetDefaultCommConfigA: Pointer;
-
-function SetDefaultCommConfigA;
-begin
- GetProcedureAddress(_SetDefaultCommConfigA, kernel32, 'SetDefaultCommConfigA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetDefaultCommConfigA]
- end;
-end;
-
-var
- _SetDefaultCommConfigW: Pointer;
-
-function SetDefaultCommConfigW;
-begin
- GetProcedureAddress(_SetDefaultCommConfigW, kernel32, 'SetDefaultCommConfigW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetDefaultCommConfigW]
- end;
-end;
-
-var
- _SetDefaultCommConfig: Pointer;
-
-function SetDefaultCommConfig;
-begin
- GetProcedureAddress(_SetDefaultCommConfig, kernel32, 'SetDefaultCommConfig' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetDefaultCommConfig]
- end;
-end;
-
-var
- _GetComputerNameA: Pointer;
-
-function GetComputerNameA;
-begin
- GetProcedureAddress(_GetComputerNameA, kernel32, 'GetComputerNameA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetComputerNameA]
- end;
-end;
-
-var
- _GetComputerNameW: Pointer;
-
-function GetComputerNameW;
-begin
- GetProcedureAddress(_GetComputerNameW, kernel32, 'GetComputerNameW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetComputerNameW]
- end;
-end;
-
-var
- _GetComputerName: Pointer;
-
-function GetComputerName;
-begin
- GetProcedureAddress(_GetComputerName, kernel32, 'GetComputerName' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetComputerName]
- end;
-end;
-
-var
- _SetComputerNameA: Pointer;
-
-function SetComputerNameA;
-begin
- GetProcedureAddress(_SetComputerNameA, kernel32, 'SetComputerNameA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetComputerNameA]
- end;
-end;
-
-var
- _SetComputerNameW: Pointer;
-
-function SetComputerNameW;
-begin
- GetProcedureAddress(_SetComputerNameW, kernel32, 'SetComputerNameW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetComputerNameW]
- end;
-end;
-
-var
- _SetComputerName: Pointer;
-
-function SetComputerName;
-begin
- GetProcedureAddress(_SetComputerName, kernel32, 'SetComputerName' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetComputerName]
- end;
-end;
-
-var
- _GetComputerNameExA: Pointer;
-
-function GetComputerNameExA;
-begin
- GetProcedureAddress(_GetComputerNameExA, kernel32, 'GetComputerNameExA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetComputerNameExA]
- end;
-end;
-
-var
- _GetComputerNameExW: Pointer;
-
-function GetComputerNameExW;
-begin
- GetProcedureAddress(_GetComputerNameExW, kernel32, 'GetComputerNameExW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetComputerNameExW]
- end;
-end;
-
-var
- _GetComputerNameEx: Pointer;
-
-function GetComputerNameEx;
-begin
- GetProcedureAddress(_GetComputerNameEx, kernel32, 'GetComputerNameEx' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetComputerNameEx]
- end;
-end;
-
-var
- _SetComputerNameExA: Pointer;
-
-function SetComputerNameExA;
-begin
- GetProcedureAddress(_SetComputerNameExA, kernel32, 'SetComputerNameExA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetComputerNameExA]
- end;
-end;
-
-var
- _SetComputerNameExW: Pointer;
-
-function SetComputerNameExW;
-begin
- GetProcedureAddress(_SetComputerNameExW, kernel32, 'SetComputerNameExW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetComputerNameExW]
- end;
-end;
-
-var
- _SetComputerNameEx: Pointer;
-
-function SetComputerNameEx;
-begin
- GetProcedureAddress(_SetComputerNameEx, kernel32, 'SetComputerNameEx' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetComputerNameEx]
- end;
-end;
-
-var
- _DnsHostnameToComputerNameA: Pointer;
-
-function DnsHostnameToComputerNameA;
-begin
- GetProcedureAddress(_DnsHostnameToComputerNameA, kernel32, 'DnsHostnameToComputerNameA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DnsHostnameToComputerNameA]
- end;
-end;
-
-var
- _DnsHostnameToComputerNameW: Pointer;
-
-function DnsHostnameToComputerNameW;
-begin
- GetProcedureAddress(_DnsHostnameToComputerNameW, kernel32, 'DnsHostnameToComputerNameW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DnsHostnameToComputerNameW]
- end;
-end;
-
-var
- _DnsHostnameToComputerName: Pointer;
-
-function DnsHostnameToComputerName;
-begin
- GetProcedureAddress(_DnsHostnameToComputerName, kernel32, 'DnsHostnameToComputerName' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DnsHostnameToComputerName]
- end;
-end;
-
-var
- _GetUserNameA: Pointer;
-
-function GetUserNameA;
-begin
- GetProcedureAddress(_GetUserNameA, advapi32, 'GetUserNameA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetUserNameA]
- end;
-end;
-
-var
- _GetUserNameW: Pointer;
-
-function GetUserNameW;
-begin
- GetProcedureAddress(_GetUserNameW, advapi32, 'GetUserNameW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetUserNameW]
- end;
-end;
-
-var
- _GetUserName: Pointer;
-
-function GetUserName;
-begin
- GetProcedureAddress(_GetUserName, advapi32, 'GetUserName' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetUserName]
- end;
-end;
-
-var
- _LogonUserA: Pointer;
-
-function LogonUserA;
-begin
- GetProcedureAddress(_LogonUserA, advapi32, 'LogonUserA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_LogonUserA]
- end;
-end;
-
-var
- _LogonUserW: Pointer;
-
-function LogonUserW;
-begin
- GetProcedureAddress(_LogonUserW, advapi32, 'LogonUserW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_LogonUserW]
- end;
-end;
-
-var
- _LogonUser: Pointer;
-
-function LogonUser;
-begin
- GetProcedureAddress(_LogonUser, advapi32, 'LogonUser' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_LogonUser]
- end;
-end;
-
-var
- _LogonUserExA: Pointer;
-
-function LogonUserExA;
-begin
- GetProcedureAddress(_LogonUserExA, advapi32, 'LogonUserExA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_LogonUserExA]
- end;
-end;
-
-var
- _LogonUserExW: Pointer;
-
-function LogonUserExW;
-begin
- GetProcedureAddress(_LogonUserExW, advapi32, 'LogonUserExW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_LogonUserExW]
- end;
-end;
-
-var
- _LogonUserEx: Pointer;
-
-function LogonUserEx;
-begin
- GetProcedureAddress(_LogonUserEx, advapi32, 'LogonUserEx' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_LogonUserEx]
- end;
-end;
-
-var
- _ImpersonateLoggedOnUser: Pointer;
-
-function ImpersonateLoggedOnUser;
-begin
- GetProcedureAddress(_ImpersonateLoggedOnUser, advapi32, 'ImpersonateLoggedOnUser');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ImpersonateLoggedOnUser]
- end;
-end;
-
-var
- _CreateProcessAsUserA: Pointer;
-
-function CreateProcessAsUserA;
-begin
- GetProcedureAddress(_CreateProcessAsUserA, advapi32, 'CreateProcessAsUserA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreateProcessAsUserA]
- end;
-end;
-
-var
- _CreateProcessAsUserW: Pointer;
-
-function CreateProcessAsUserW;
-begin
- GetProcedureAddress(_CreateProcessAsUserW, advapi32, 'CreateProcessAsUserW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreateProcessAsUserW]
- end;
-end;
-
-var
- _CreateProcessAsUser: Pointer;
-
-function CreateProcessAsUser;
-begin
- GetProcedureAddress(_CreateProcessAsUser, advapi32, 'CreateProcessAsUser' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreateProcessAsUser]
- end;
-end;
-
-var
- _CreateProcessWithLogonW: Pointer;
-
-function CreateProcessWithLogonW;
-begin
- GetProcedureAddress(_CreateProcessWithLogonW, advapi32, 'CreateProcessWithLogonW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreateProcessWithLogonW]
- end;
-end;
-
-var
- _CreateProcessWithTokenW: Pointer;
-
-function CreateProcessWithTokenW;
-begin
- GetProcedureAddress(_CreateProcessWithTokenW, advapi32, 'CreateProcessWithTokenW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreateProcessWithTokenW]
- end;
-end;
-
-var
- _ImpersonateAnonymousToken: Pointer;
-
-function ImpersonateAnonymousToken;
-begin
- GetProcedureAddress(_ImpersonateAnonymousToken, advapi32, 'ImpersonateAnonymousToken');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ImpersonateAnonymousToken]
- end;
-end;
-
-var
- _DuplicateTokenEx: Pointer;
-
-function DuplicateTokenEx;
-begin
- GetProcedureAddress(_DuplicateTokenEx, advapi32, 'DuplicateTokenEx');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DuplicateTokenEx]
- end;
-end;
-
-var
- _CreateRestrictedToken: Pointer;
-
-function CreateRestrictedToken;
-begin
- GetProcedureAddress(_CreateRestrictedToken, advapi32, 'CreateRestrictedToken');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreateRestrictedToken]
- end;
-end;
-
-var
- _IsTokenRestricted: Pointer;
-
-function IsTokenRestricted;
-begin
- GetProcedureAddress(_IsTokenRestricted, advapi32, 'IsTokenRestricted');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_IsTokenRestricted]
- end;
-end;
-
-var
- _CheckTokenMembership: Pointer;
-
-function CheckTokenMembership;
-begin
- GetProcedureAddress(_CheckTokenMembership, advapi32, 'CheckTokenMembership');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CheckTokenMembership]
- end;
-end;
-
-var
- _IsTokenUntrusted: Pointer;
-
-function IsTokenUntrusted;
-begin
- GetProcedureAddress(_IsTokenUntrusted, advapi32, 'IsTokenUntrusted');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_IsTokenUntrusted]
- end;
-end;
-
-var
- _RegisterWaitForSingleObject: Pointer;
-
-function RegisterWaitForSingleObject;
-begin
- GetProcedureAddress(_RegisterWaitForSingleObject, kernel32, 'RegisterWaitForSingleObject');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RegisterWaitForSingleObject]
- end;
-end;
-
-var
- _RegisterWaitForSingleObjectEx: Pointer;
-
-function RegisterWaitForSingleObjectEx;
-begin
- GetProcedureAddress(_RegisterWaitForSingleObjectEx, kernel32, 'RegisterWaitForSingleObjectEx');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RegisterWaitForSingleObjectEx]
- end;
-end;
-
-var
- _UnregisterWait: Pointer;
-
-function UnregisterWait;
-begin
- GetProcedureAddress(_UnregisterWait, kernel32, 'UnregisterWait');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_UnregisterWait]
- end;
-end;
-
-var
- _UnregisterWaitEx: Pointer;
-
-function UnregisterWaitEx;
-begin
- GetProcedureAddress(_UnregisterWaitEx, kernel32, 'UnregisterWaitEx');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_UnregisterWaitEx]
- end;
-end;
-
-var
- _QueueUserWorkItem: Pointer;
-
-function QueueUserWorkItem;
-begin
- GetProcedureAddress(_QueueUserWorkItem, kernel32, 'QueueUserWorkItem');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_QueueUserWorkItem]
- end;
-end;
-
-var
- _BindIoCompletionCallback: Pointer;
-
-function BindIoCompletionCallback;
-begin
- GetProcedureAddress(_BindIoCompletionCallback, kernel32, 'BindIoCompletionCallback');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_BindIoCompletionCallback]
- end;
-end;
-
-var
- _CreateTimerQueue: Pointer;
-
-function CreateTimerQueue;
-begin
- GetProcedureAddress(_CreateTimerQueue, kernel32, 'CreateTimerQueue');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreateTimerQueue]
- end;
-end;
-
-var
- _CreateTimerQueueTimer: Pointer;
-
-function CreateTimerQueueTimer;
-begin
- GetProcedureAddress(_CreateTimerQueueTimer, kernel32, 'CreateTimerQueueTimer');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreateTimerQueueTimer]
- end;
-end;
-
-var
- _ChangeTimerQueueTimer: Pointer;
-
-function ChangeTimerQueueTimer;
-begin
- GetProcedureAddress(_ChangeTimerQueueTimer, kernel32, 'ChangeTimerQueueTimer');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ChangeTimerQueueTimer]
- end;
-end;
-
-var
- _DeleteTimerQueueTimer: Pointer;
-
-function DeleteTimerQueueTimer;
-begin
- GetProcedureAddress(_DeleteTimerQueueTimer, kernel32, 'DeleteTimerQueueTimer');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DeleteTimerQueueTimer]
- end;
-end;
-
-var
- _DeleteTimerQueueEx: Pointer;
-
-function DeleteTimerQueueEx;
-begin
- GetProcedureAddress(_DeleteTimerQueueEx, kernel32, 'DeleteTimerQueueEx');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DeleteTimerQueueEx]
- end;
-end;
-
-var
- _SetTimerQueueTimer: Pointer;
-
-function SetTimerQueueTimer;
-begin
- GetProcedureAddress(_SetTimerQueueTimer, kernel32, 'SetTimerQueueTimer');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetTimerQueueTimer]
- end;
-end;
-
-var
- _CancelTimerQueueTimer: Pointer;
-
-function CancelTimerQueueTimer;
-begin
- GetProcedureAddress(_CancelTimerQueueTimer, kernel32, 'CancelTimerQueueTimer');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CancelTimerQueueTimer]
- end;
-end;
-
-var
- _DeleteTimerQueue: Pointer;
-
-function DeleteTimerQueue;
-begin
- GetProcedureAddress(_DeleteTimerQueue, kernel32, 'DeleteTimerQueue');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DeleteTimerQueue]
- end;
-end;
-
-var
- _GetCurrentHwProfileA: Pointer;
-
-function GetCurrentHwProfileA;
-begin
- GetProcedureAddress(_GetCurrentHwProfileA, advapi32, 'GetCurrentHwProfileA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetCurrentHwProfileA]
- end;
-end;
-
-var
- _GetCurrentHwProfileW: Pointer;
-
-function GetCurrentHwProfileW;
-begin
- GetProcedureAddress(_GetCurrentHwProfileW, advapi32, 'GetCurrentHwProfileW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetCurrentHwProfileW]
- end;
-end;
-
-var
- _GetCurrentHwProfile: Pointer;
-
-function GetCurrentHwProfile;
-begin
- GetProcedureAddress(_GetCurrentHwProfile, advapi32, 'GetCurrentHwProfile' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetCurrentHwProfile]
- end;
-end;
-
-var
- _QueryPerformanceCounter: Pointer;
-
-function QueryPerformanceCounter;
-begin
- GetProcedureAddress(_QueryPerformanceCounter, kernel32, 'QueryPerformanceCounter');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_QueryPerformanceCounter]
- end;
-end;
-
-var
- _QueryPerformanceFrequency: Pointer;
-
-function QueryPerformanceFrequency;
-begin
- GetProcedureAddress(_QueryPerformanceFrequency, kernel32, 'QueryPerformanceFrequency');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_QueryPerformanceFrequency]
- end;
-end;
-
-var
- _GetVersionExA: Pointer;
-
-function GetVersionExA;
-begin
- GetProcedureAddress(_GetVersionExA, kernel32, 'GetVersionExA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetVersionExA]
- end;
-end;
-
-var
- _GetVersionExW: Pointer;
-
-function GetVersionExW;
-begin
- GetProcedureAddress(_GetVersionExW, kernel32, 'GetVersionExW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetVersionExW]
- end;
-end;
-
-var
- _GetVersionEx: Pointer;
-
-function GetVersionEx;
-begin
- GetProcedureAddress(_GetVersionEx, kernel32, 'GetVersionEx' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetVersionEx]
- end;
-end;
-
-var
- _VerifyVersionInfoA: Pointer;
-
-function VerifyVersionInfoA;
-begin
- GetProcedureAddress(_VerifyVersionInfoA, kernel32, 'VerifyVersionInfoA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_VerifyVersionInfoA]
- end;
-end;
-
-var
- _VerifyVersionInfoW: Pointer;
-
-function VerifyVersionInfoW;
-begin
- GetProcedureAddress(_VerifyVersionInfoW, kernel32, 'VerifyVersionInfoW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_VerifyVersionInfoW]
- end;
-end;
-
-var
- _VerifyVersionInfo: Pointer;
-
-function VerifyVersionInfo;
-begin
- GetProcedureAddress(_VerifyVersionInfo, kernel32, 'VerifyVersionInfo' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_VerifyVersionInfo]
- end;
-end;
-
-var
- _GetSystemPowerStatus: Pointer;
-
-function GetSystemPowerStatus;
-begin
- GetProcedureAddress(_GetSystemPowerStatus, kernel32, 'GetSystemPowerStatus');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetSystemPowerStatus]
- end;
-end;
-
-var
- _SetSystemPowerState: Pointer;
-
-function SetSystemPowerState;
-begin
- GetProcedureAddress(_SetSystemPowerState, kernel32, 'SetSystemPowerState');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetSystemPowerState]
- end;
-end;
-
-var
- _AllocateUserPhysicalPages: Pointer;
-
-function AllocateUserPhysicalPages;
-begin
- GetProcedureAddress(_AllocateUserPhysicalPages, kernel32, 'AllocateUserPhysicalPages');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_AllocateUserPhysicalPages]
- end;
-end;
-
-var
- _FreeUserPhysicalPages: Pointer;
-
-function FreeUserPhysicalPages;
-begin
- GetProcedureAddress(_FreeUserPhysicalPages, kernel32, 'FreeUserPhysicalPages');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_FreeUserPhysicalPages]
- end;
-end;
-
-var
- _MapUserPhysicalPages: Pointer;
-
-function MapUserPhysicalPages;
-begin
- GetProcedureAddress(_MapUserPhysicalPages, kernel32, 'MapUserPhysicalPages');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MapUserPhysicalPages]
- end;
-end;
-
-var
- _MapUserPhysicalPagesScatter: Pointer;
-
-function MapUserPhysicalPagesScatter;
-begin
- GetProcedureAddress(_MapUserPhysicalPagesScatter, kernel32, 'MapUserPhysicalPagesScatter');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MapUserPhysicalPagesScatter]
- end;
-end;
-
-var
- _CreateJobObjectA: Pointer;
-
-function CreateJobObjectA;
-begin
- GetProcedureAddress(_CreateJobObjectA, kernel32, 'CreateJobObjectA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreateJobObjectA]
- end;
-end;
-
-var
- _CreateJobObjectW: Pointer;
-
-function CreateJobObjectW;
-begin
- GetProcedureAddress(_CreateJobObjectW, kernel32, 'CreateJobObjectW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreateJobObjectW]
- end;
-end;
-
-var
- _CreateJobObject: Pointer;
-
-function CreateJobObject;
-begin
- GetProcedureAddress(_CreateJobObject, kernel32, 'CreateJobObject' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreateJobObject]
- end;
-end;
-
-var
- _OpenJobObjectA: Pointer;
-
-function OpenJobObjectA;
-begin
- GetProcedureAddress(_OpenJobObjectA, kernel32, 'OpenJobObjectA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_OpenJobObjectA]
- end;
-end;
-
-var
- _OpenJobObjectW: Pointer;
-
-function OpenJobObjectW;
-begin
- GetProcedureAddress(_OpenJobObjectW, kernel32, 'OpenJobObjectW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_OpenJobObjectW]
- end;
-end;
-
-var
- _OpenJobObject: Pointer;
-
-function OpenJobObject;
-begin
- GetProcedureAddress(_OpenJobObject, kernel32, 'OpenJobObject' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_OpenJobObject]
- end;
-end;
-
-var
- _AssignProcessToJobObject: Pointer;
-
-function AssignProcessToJobObject;
-begin
- GetProcedureAddress(_AssignProcessToJobObject, kernel32, 'AssignProcessToJobObject');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_AssignProcessToJobObject]
- end;
-end;
-
-var
- _TerminateJobObject: Pointer;
-
-function TerminateJobObject;
-begin
- GetProcedureAddress(_TerminateJobObject, kernel32, 'TerminateJobObject');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_TerminateJobObject]
- end;
-end;
-
-var
- _QueryInformationJobObject: Pointer;
-
-function QueryInformationJobObject;
-begin
- GetProcedureAddress(_QueryInformationJobObject, kernel32, 'QueryInformationJobObject');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_QueryInformationJobObject]
- end;
-end;
-
-var
- _SetInformationJobObject: Pointer;
-
-function SetInformationJobObject;
-begin
- GetProcedureAddress(_SetInformationJobObject, kernel32, 'SetInformationJobObject');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetInformationJobObject]
- end;
-end;
-
-var
- _IsProcessInJob: Pointer;
-
-function IsProcessInJob;
-begin
- GetProcedureAddress(_IsProcessInJob, kernel32, 'IsProcessInJob');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_IsProcessInJob]
- end;
-end;
-
-var
- _CreateJobSet: Pointer;
-
-function CreateJobSet;
-begin
- GetProcedureAddress(_CreateJobSet, kernel32, 'CreateJobSet');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreateJobSet]
- end;
-end;
-
-var
- _AddVectoredExceptionHandler: Pointer;
-
-function AddVectoredExceptionHandler;
-begin
- GetProcedureAddress(_AddVectoredExceptionHandler, kernel32, 'AddVectoredExceptionHandler');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_AddVectoredExceptionHandler]
- end;
-end;
-
-var
- _RemoveVectoredExceptionHandler: Pointer;
-
-function RemoveVectoredExceptionHandler;
-begin
- GetProcedureAddress(_RemoveVectoredExceptionHandler, kernel32, 'RemoveVectoredExceptionHandler');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RemoveVectoredExceptionHandler]
- end;
-end;
-
-var
- _FindFirstVolumeA: Pointer;
-
-function FindFirstVolumeA;
-begin
- GetProcedureAddress(_FindFirstVolumeA, kernel32, 'FindFirstVolumeA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_FindFirstVolumeA]
- end;
-end;
-
-var
- _FindFirstVolumeW: Pointer;
-
-function FindFirstVolumeW;
-begin
- GetProcedureAddress(_FindFirstVolumeW, kernel32, 'FindFirstVolumeW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_FindFirstVolumeW]
- end;
-end;
-
-var
- _FindFirstVolume: Pointer;
-
-function FindFirstVolume;
-begin
- GetProcedureAddress(_FindFirstVolume, kernel32, 'FindFirstVolume' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_FindFirstVolume]
- end;
-end;
-
-var
- _FindNextVolumeA: Pointer;
-
-function FindNextVolumeA;
-begin
- GetProcedureAddress(_FindNextVolumeA, kernel32, 'FindNextVolumeA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_FindNextVolumeA]
- end;
-end;
-
-var
- _FindNextVolumeW: Pointer;
-
-function FindNextVolumeW;
-begin
- GetProcedureAddress(_FindNextVolumeW, kernel32, 'FindNextVolumeW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_FindNextVolumeW]
- end;
-end;
-
-var
- _FindNextVolume: Pointer;
-
-function FindNextVolume;
-begin
- GetProcedureAddress(_FindNextVolume, kernel32, 'FindNextVolume' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_FindNextVolume]
- end;
-end;
-
-var
- _FindVolumeClose: Pointer;
-
-function FindVolumeClose;
-begin
- GetProcedureAddress(_FindVolumeClose, kernel32, 'FindVolumeClose');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_FindVolumeClose]
- end;
-end;
-
-var
- _FindFirstVolumeMountPointA: Pointer;
-
-function FindFirstVolumeMountPointA;
-begin
- GetProcedureAddress(_FindFirstVolumeMountPointA, kernel32, 'FindFirstVolumeMountPointA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_FindFirstVolumeMountPointA]
- end;
-end;
-
-var
- _FindFirstVolumeMountPointW: Pointer;
-
-function FindFirstVolumeMountPointW;
-begin
- GetProcedureAddress(_FindFirstVolumeMountPointW, kernel32, 'FindFirstVolumeMountPointW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_FindFirstVolumeMountPointW]
- end;
-end;
-
-var
- _FindFirstVolumeMountPoint: Pointer;
-
-function FindFirstVolumeMountPoint;
-begin
- GetProcedureAddress(_FindFirstVolumeMountPoint, kernel32, 'FindFirstVolumeMountPoint' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_FindFirstVolumeMountPoint]
- end;
-end;
-
-var
- _FindNextVolumeMountPointA: Pointer;
-
-function FindNextVolumeMountPointA;
-begin
- GetProcedureAddress(_FindNextVolumeMountPointA, kernel32, 'FindNextVolumeMountPointA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_FindNextVolumeMountPointA]
- end;
-end;
-
-var
- _FindNextVolumeMountPointW: Pointer;
-
-function FindNextVolumeMountPointW;
-begin
- GetProcedureAddress(_FindNextVolumeMountPointW, kernel32, 'FindNextVolumeMountPointW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_FindNextVolumeMountPointW]
- end;
-end;
-
-var
- _FindNextVolumeMountPoint: Pointer;
-
-function FindNextVolumeMountPoint;
-begin
- GetProcedureAddress(_FindNextVolumeMountPoint, kernel32, 'FindNextVolumeMountPoint' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_FindNextVolumeMountPoint]
- end;
-end;
-
-var
- _FindVolumeMountPointClose: Pointer;
-
-function FindVolumeMountPointClose;
-begin
- GetProcedureAddress(_FindVolumeMountPointClose, kernel32, 'FindVolumeMountPointClose');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_FindVolumeMountPointClose]
- end;
-end;
-
-var
- _SetVolumeMountPointA: Pointer;
-
-function SetVolumeMountPointA;
-begin
- GetProcedureAddress(_SetVolumeMountPointA, kernel32, 'SetVolumeMountPointA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetVolumeMountPointA]
- end;
-end;
-
-var
- _SetVolumeMountPointW: Pointer;
-
-function SetVolumeMountPointW;
-begin
- GetProcedureAddress(_SetVolumeMountPointW, kernel32, 'SetVolumeMountPointW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetVolumeMountPointW]
- end;
-end;
-
-var
- _SetVolumeMountPoint: Pointer;
-
-function SetVolumeMountPoint;
-begin
- GetProcedureAddress(_SetVolumeMountPoint, kernel32, 'SetVolumeMountPoint' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetVolumeMountPoint]
- end;
-end;
-
-var
- _DeleteVolumeMountPointA: Pointer;
-
-function DeleteVolumeMountPointA;
-begin
- GetProcedureAddress(_DeleteVolumeMountPointA, kernel32, 'DeleteVolumeMountPointA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DeleteVolumeMountPointA]
- end;
-end;
-
-var
- _DeleteVolumeMountPointW: Pointer;
-
-function DeleteVolumeMountPointW;
-begin
- GetProcedureAddress(_DeleteVolumeMountPointW, kernel32, 'DeleteVolumeMountPointW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DeleteVolumeMountPointW]
- end;
-end;
-
-var
- _DeleteVolumeMountPoint: Pointer;
-
-function DeleteVolumeMountPoint;
-begin
- GetProcedureAddress(_DeleteVolumeMountPoint, kernel32, 'DeleteVolumeMountPoint' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DeleteVolumeMountPoint]
- end;
-end;
-
-var
- _GetVolumeNameForVolMountPointA: Pointer;
-
-function GetVolumeNameForVolumeMountPointA;
-begin
- GetProcedureAddress(_GetVolumeNameForVolMountPointA, kernel32, 'GetVolumeNameForVolumeMountPointA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetVolumeNameForVolMountPointA]
- end;
-end;
-
-var
- _GetVolumeNameForVolMountPointW: Pointer;
-
-function GetVolumeNameForVolumeMountPointW;
-begin
- GetProcedureAddress(_GetVolumeNameForVolMountPointW, kernel32, 'GetVolumeNameForVolumeMountPointW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetVolumeNameForVolMountPointW]
- end;
-end;
-
-var
- _GetVolumeNameForVolMountPoint: Pointer;
-
-function GetVolumeNameForVolumeMountPoint;
-begin
- GetProcedureAddress(_GetVolumeNameForVolMountPoint, kernel32, 'GetVolumeNameForVolumeMountPoint' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetVolumeNameForVolMountPoint]
- end;
-end;
-
-var
- _GetVolumePathNameA: Pointer;
-
-function GetVolumePathNameA;
-begin
- GetProcedureAddress(_GetVolumePathNameA, kernel32, 'GetVolumePathNameA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetVolumePathNameA]
- end;
-end;
-
-var
- _GetVolumePathNameW: Pointer;
-
-function GetVolumePathNameW;
-begin
- GetProcedureAddress(_GetVolumePathNameW, kernel32, 'GetVolumePathNameW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetVolumePathNameW]
- end;
-end;
-
-var
- _GetVolumePathName: Pointer;
-
-function GetVolumePathName;
-begin
- GetProcedureAddress(_GetVolumePathName, kernel32, 'GetVolumePathName' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetVolumePathName]
- end;
-end;
-
-var
- _GetVolumePathNamesForVolNameA: Pointer;
-
-function GetVolumePathNamesForVolumeNameA;
-begin
- GetProcedureAddress(_GetVolumePathNamesForVolNameA, kernel32, 'GetVolumePathNamesForVolumeNameA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetVolumePathNamesForVolNameA]
- end;
-end;
-
-var
- _GetVolumePathNamesForVolNameW: Pointer;
-
-function GetVolumePathNamesForVolumeNameW;
-begin
- GetProcedureAddress(_GetVolumePathNamesForVolNameW, kernel32, 'GetVolumePathNamesForVolumeNameW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetVolumePathNamesForVolNameW]
- end;
-end;
-
-var
- _GetVolumePathNamesForVolName: Pointer;
-
-function GetVolumePathNamesForVolumeName;
-begin
- GetProcedureAddress(_GetVolumePathNamesForVolName, kernel32, 'GetVolumePathNamesForVolumeName' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetVolumePathNamesForVolName]
- end;
-end;
-
-var
- _CreateActCtxA: Pointer;
-
-function CreateActCtxA;
-begin
- GetProcedureAddress(_CreateActCtxA, kernel32, 'CreateActCtxA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreateActCtxA]
- end;
-end;
-
-var
- _CreateActCtxW: Pointer;
-
-function CreateActCtxW;
-begin
- GetProcedureAddress(_CreateActCtxW, kernel32, 'CreateActCtxW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreateActCtxW]
- end;
-end;
-
-var
- _CreateActCtx: Pointer;
-
-function CreateActCtx;
-begin
- GetProcedureAddress(_CreateActCtx, kernel32, 'CreateActCtx' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreateActCtx]
- end;
-end;
-
-var
- _AddRefActCtx: Pointer;
-
-procedure AddRefActCtx;
-begin
- GetProcedureAddress(_AddRefActCtx, kernel32, 'AddRefActCtx');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_AddRefActCtx]
- end;
-end;
-
-var
- _ReleaseActCtx: Pointer;
-
-procedure ReleaseActCtx;
-begin
- GetProcedureAddress(_ReleaseActCtx, kernel32, 'ReleaseActCtx');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ReleaseActCtx]
- end;
-end;
-
-var
- _ZombifyActCtx: Pointer;
-
-function ZombifyActCtx;
-begin
- GetProcedureAddress(_ZombifyActCtx, kernel32, 'ZombifyActCtx');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ZombifyActCtx]
- end;
-end;
-
-var
- _ActivateActCtx: Pointer;
-
-function ActivateActCtx;
-begin
- GetProcedureAddress(_ActivateActCtx, kernel32, 'ActivateActCtx');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ActivateActCtx]
- end;
-end;
-
-var
- _DeactivateActCtx: Pointer;
-
-function DeactivateActCtx;
-begin
- GetProcedureAddress(_DeactivateActCtx, kernel32, 'DeactivateActCtx');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DeactivateActCtx]
- end;
-end;
-
-var
- _GetCurrentActCtx: Pointer;
-
-function GetCurrentActCtx;
-begin
- GetProcedureAddress(_GetCurrentActCtx, kernel32, 'GetCurrentActCtx');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetCurrentActCtx]
- end;
-end;
-
-var
- _FindActCtxSectionStringA: Pointer;
-
-function FindActCtxSectionStringA;
-begin
- GetProcedureAddress(_FindActCtxSectionStringA, kernel32, 'FindActCtxSectionStringA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_FindActCtxSectionStringA]
- end;
-end;
-
-var
- _FindActCtxSectionStringW: Pointer;
-
-function FindActCtxSectionStringW;
-begin
- GetProcedureAddress(_FindActCtxSectionStringW, kernel32, 'FindActCtxSectionStringW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_FindActCtxSectionStringW]
- end;
-end;
-
-var
- _FindActCtxSectionString: Pointer;
-
-function FindActCtxSectionString;
-begin
- GetProcedureAddress(_FindActCtxSectionString, kernel32, 'FindActCtxSectionString' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_FindActCtxSectionString]
- end;
-end;
-
-var
- _FindActCtxSectionGuid: Pointer;
-
-function FindActCtxSectionGuid;
-begin
- GetProcedureAddress(_FindActCtxSectionGuid, kernel32, 'FindActCtxSectionGuid');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_FindActCtxSectionGuid]
- end;
-end;
-
-var
- _QueryActCtxW: Pointer;
-
-function QueryActCtxW;
-begin
- GetProcedureAddress(_QueryActCtxW, kernel32, 'QueryActCtxW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_QueryActCtxW]
- end;
-end;
-
-var
- _ProcessIdToSessionId: Pointer;
-
-function ProcessIdToSessionId;
-begin
- GetProcedureAddress(_ProcessIdToSessionId, kernel32, 'ProcessIdToSessionId');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ProcessIdToSessionId]
- end;
-end;
-
-var
- _WTSGetActiveConsoleSessionId: Pointer;
-
-function WTSGetActiveConsoleSessionId;
-begin
- GetProcedureAddress(_WTSGetActiveConsoleSessionId, kernel32, 'WTSGetActiveConsoleSessionId');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WTSGetActiveConsoleSessionId]
- end;
-end;
-
-var
- _IsWow64Process: Pointer;
-
-function IsWow64Process;
-begin
- GetProcedureAddress(_IsWow64Process, kernel32, 'IsWow64Process');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_IsWow64Process]
- end;
-end;
-
-var
- _GetLogicalProcessorInformation: Pointer;
-
-function GetLogicalProcessorInformation;
-begin
- GetProcedureAddress(_GetLogicalProcessorInformation, kernel32, 'GetLogicalProcessorInformation');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetLogicalProcessorInformation]
- end;
-end;
-
-var
- _GetNumaHighestNodeNumber: Pointer;
-
-function GetNumaHighestNodeNumber;
-begin
- GetProcedureAddress(_GetNumaHighestNodeNumber, kernel32, 'GetNumaHighestNodeNumber');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetNumaHighestNodeNumber]
- end;
-end;
-
-var
- _GetNumaProcessorNode: Pointer;
-
-function GetNumaProcessorNode;
-begin
- GetProcedureAddress(_GetNumaProcessorNode, kernel32, 'GetNumaProcessorNode');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetNumaProcessorNode]
- end;
-end;
-
-var
- _GetNumaNodeProcessorMask: Pointer;
-
-function GetNumaNodeProcessorMask;
-begin
- GetProcedureAddress(_GetNumaNodeProcessorMask, kernel32, 'GetNumaNodeProcessorMask');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetNumaNodeProcessorMask]
- end;
-end;
-
-var
- _GetNumaAvailableMemoryNode: Pointer;
-
-function GetNumaAvailableMemoryNode;
-begin
- GetProcedureAddress(_GetNumaAvailableMemoryNode, kernel32, 'GetNumaAvailableMemoryNode');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetNumaAvailableMemoryNode]
- end;
-end;
-
-{$ELSE}
-
-function InterlockedCompareExchange64; external kernel32 name 'InterlockedCompareExchange64';
-function InterlockedIncrement; external kernel32 name 'InterlockedIncrement';
-function InterlockedDecrement; external kernel32 name 'InterlockedDecrement';
-function InterlockedExchange; external kernel32 name 'InterlockedExchange';
-function InterlockedExchangeAdd; external kernel32 name 'InterlockedExchangeAdd';
-function InterlockedCompareExchange; external kernel32 name 'InterlockedCompareExchange';
-procedure InitializeSListHead; external kernel32 name 'InitializeSListHead';
-function InterlockedPopEntrySList; external kernel32 name 'InterlockedPopEntrySList';
-function InterlockedPushEntrySList; external kernel32 name 'InterlockedPushEntrySList';
-function InterlockedFlushSList; external kernel32 name 'InterlockedFlushSList';
-function QueryDepthSList; external kernel32 name 'QueryDepthSList';
-function FreeResource; external kernel32 name 'FreeResource';
-function LockResource; external kernel32 name 'LockResource';
-function FreeLibrary; external kernel32 name 'FreeLibrary';
-procedure FreeLibraryAndExitThread; external kernel32 name 'FreeLibraryAndExitThread';
-function DisableThreadLibraryCalls; external kernel32 name 'DisableThreadLibraryCalls';
-function GetProcAddress; external kernel32 name 'GetProcAddress';
-function GetVersion; external kernel32 name 'GetVersion';
-function GlobalAlloc; external kernel32 name 'GlobalAlloc';
-function GlobalReAlloc; external kernel32 name 'GlobalReAlloc';
-function GlobalSize; external kernel32 name 'GlobalSize';
-function GlobalFlags; external kernel32 name 'GlobalFlags';
-function GlobalLock; external kernel32 name 'GlobalLock';
-function GlobalHandle; external kernel32 name 'GlobalHandle';
-function GlobalUnlock; external kernel32 name 'GlobalUnlock';
-function GlobalFree; external kernel32 name 'GlobalFree';
-function GlobalCompact; external kernel32 name 'GlobalCompact';
-procedure GlobalFix; external kernel32 name 'GlobalFix';
-procedure GlobalUnfix; external kernel32 name 'GlobalUnfix';
-function GlobalWire; external kernel32 name 'GlobalWire';
-function GlobalUnWire; external kernel32 name 'GlobalUnWire';
-procedure GlobalMemoryStatus; external kernel32 name 'GlobalMemoryStatus';
-function GlobalMemoryStatusEx; external kernel32 name 'GlobalMemoryStatusEx';
-function LocalAlloc; external kernel32 name 'LocalAlloc';
-function LocalReAlloc; external kernel32 name 'LocalReAlloc';
-function LocalLock; external kernel32 name 'LocalLock';
-function LocalHandle; external kernel32 name 'LocalHandle';
-function LocalUnlock; external kernel32 name 'LocalUnlock';
-function LocalSize; external kernel32 name 'LocalSize';
-function LocalFlags; external kernel32 name 'LocalFlags';
-function LocalFree; external kernel32 name 'LocalFree';
-function LocalShrink; external kernel32 name 'LocalShrink';
-function LocalCompact; external kernel32 name 'LocalCompact';
-function FlushInstructionCache; external kernel32 name 'FlushInstructionCache';
-function VirtualAlloc; external kernel32 name 'VirtualAlloc';
-function VirtualFree; external kernel32 name 'VirtualFree';
-function VirtualProtect; external kernel32 name 'VirtualProtect';
-function VirtualQuery; external kernel32 name 'VirtualQuery';
-function VirtualAllocEx; external kernel32 name 'VirtualAllocEx';
-function GetWriteWatch; external kernel32 name 'GetWriteWatch';
-function ResetWriteWatch; external kernel32 name 'ResetWriteWatch';
-function GetLargePageMinimum; external kernel32 name 'GetLargePageMinimum';
-function VirtualFreeEx; external kernel32 name 'VirtualFreeEx';
-function VirtualProtectEx; external kernel32 name 'VirtualProtectEx';
-function VirtualQueryEx; external kernel32 name 'VirtualQueryEx';
-function HeapCreate; external kernel32 name 'HeapCreate';
-function HeapDestroy; external kernel32 name 'HeapDestroy';
-function HeapAlloc; external kernel32 name 'HeapAlloc';
-function HeapReAlloc; external kernel32 name 'HeapReAlloc';
-function HeapFree; external kernel32 name 'HeapFree';
-function HeapSize; external kernel32 name 'HeapSize';
-function HeapValidate; external kernel32 name 'HeapValidate';
-function HeapCompact; external kernel32 name 'HeapCompact';
-function GetProcessHeap; external kernel32 name 'GetProcessHeap';
-function GetProcessHeaps; external kernel32 name 'GetProcessHeaps';
-function HeapLock; external kernel32 name 'HeapLock';
-function HeapUnlock; external kernel32 name 'HeapUnlock';
-function HeapWalk; external kernel32 name 'HeapWalk';
-function HeapSetInformation; external kernel32 name 'HeapSetInformation';
-function HeapQueryInformation; external kernel32 name 'HeapQueryInformation';
-function GetBinaryTypeA; external kernel32 name 'GetBinaryTypeA';
-function GetBinaryTypeW; external kernel32 name 'GetBinaryTypeW';
-function GetBinaryType; external kernel32 name 'GetBinaryType' + AWSuffix;
-function GetShortPathNameA; external kernel32 name 'GetShortPathNameA';
-function GetShortPathNameW; external kernel32 name 'GetShortPathNameW';
-function GetShortPathName; external kernel32 name 'GetShortPathName' + AWSuffix;
-function GetLongPathNameA; external kernel32 name 'GetLongPathNameA';
-function GetLongPathNameW; external kernel32 name 'GetLongPathNameW';
-function GetLongPathName; external kernel32 name 'GetLongPathName' + AWSuffix;
-function GetProcessAffinityMask; external kernel32 name 'GetProcessAffinityMask';
-function SetProcessAffinityMask; external kernel32 name 'SetProcessAffinityMask';
-function GetProcessHandleCount; external kernel32 name 'GetProcessHandleCount';
-function GetProcessTimes; external kernel32 name 'GetProcessTimes';
-function GetProcessIoCounters; external kernel32 name 'GetProcessIoCounters';
-function GetProcessWorkingSetSize; external kernel32 name 'GetProcessWorkingSetSize';
-function GetProcessWorkingSetSizeEx; external kernel32 name 'GetProcessWorkingSetSizeEx';
-function SetProcessWorkingSetSize; external kernel32 name 'SetProcessWorkingSetSize';
-function SetProcessWorkingSetSizeEx; external kernel32 name 'SetProcessWorkingSetSizeEx';
-function OpenProcess; external kernel32 name 'OpenProcess';
-function GetCurrentProcess; external kernel32 name 'GetCurrentProcess';
-function GetCurrentProcessId; external kernel32 name 'GetCurrentProcessId';
-procedure ExitProcess; external kernel32 name 'ExitProcess';
-function TerminateProcess; external kernel32 name 'TerminateProcess';
-function GetExitCodeProcess; external kernel32 name 'GetExitCodeProcess';
-procedure FatalExit; external kernel32 name 'FatalExit';
-function GetEnvironmentStringsW; external kernel32 name 'GetEnvironmentStringsW';
-function GetEnvironmentStrings; external kernel32 name 'GetEnvironmentStrings' + AWSuffix;
-{$IFNDEF UNICODE}
-function GetEnvironmentStringsA; external kernel32 name 'GetEnvironmentStringsA';
-{$ENDIF !UNICODE}
-function SetEnvironmentStringsA; external kernel32 name 'SetEnvironmentStringsA';
-function SetEnvironmentStringsW; external kernel32 name 'SetEnvironmentStringsW';
-function SetEnvironmentStrings; external kernel32 name 'SetEnvironmentStrings' + AWSuffix;
-function FreeEnvironmentStringsA; external kernel32 name 'FreeEnvironmentStringsA';
-function FreeEnvironmentStringsW; external kernel32 name 'FreeEnvironmentStringsW';
-function FreeEnvironmentStrings; external kernel32 name 'FreeEnvironmentStrings' + AWSuffix;
-procedure RaiseException; external kernel32 name 'RaiseException';
-function UnhandledExceptionFilter; external kernel32 name 'UnhandledExceptionFilter';
-function SetUnhandledExceptionFilter; external kernel32 name 'SetUnhandledExceptionFilter';
-function CreateFiber; external kernel32 name 'CreateFiber';
-function CreateFiberEx; external kernel32 name 'CreateFiberEx';
-procedure DeleteFiber; external kernel32 name 'DeleteFiber';
-function ConvertThreadToFiber; external kernel32 name 'ConvertThreadToFiber';
-function ConvertThreadToFiberEx; external kernel32 name 'ConvertThreadToFiberEx';
-function ConvertFiberToThread; external kernel32 name 'ConvertFiberToThread';
-procedure SwitchToFiber; external kernel32 name 'SwitchToFiber';
-function SwitchToThread; external kernel32 name 'SwitchToThread';
-function CreateThread; external kernel32 name 'CreateThread';
-function CreateRemoteThread; external kernel32 name 'CreateRemoteThread';
-function GetCurrentThread; external kernel32 name 'GetCurrentThread';
-function GetCurrentThreadId; external kernel32 name 'GetCurrentThreadId';
-function GetProcessIdOfThread; external kernel32 name 'GetProcessIdOfThread';
-function GetThreadId; external kernel32 name 'GetThreadId';
-function GetProcessId; external kernel32 name 'GetProcessId';
-function GetCurrentProcessorNumber; external kernel32 name 'GetCurrentProcessorNumber';
-function SetThreadAffinityMask; external kernel32 name 'SetThreadAffinityMask';
-function SetThreadIdealProcessor; external kernel32 name 'SetThreadIdealProcessor';
-function SetProcessPriorityBoost; external kernel32 name 'SetProcessPriorityBoost';
-function GetProcessPriorityBoost; external kernel32 name 'GetProcessPriorityBoost';
-function RequestWakeupLatency; external kernel32 name 'RequestWakeupLatency';
-function IsSystemResumeAutomatic; external kernel32 name 'IsSystemResumeAutomatic';
-function OpenThread; external kernel32 name 'OpenThread';
-function SetThreadPriority; external kernel32 name 'SetThreadPriority';
-function SetThreadPriorityBoost; external kernel32 name 'SetThreadPriorityBoost';
-function GetThreadPriorityBoost; external kernel32 name 'GetThreadPriorityBoost';
-function GetThreadPriority; external kernel32 name 'GetThreadPriority';
-function GetThreadTimes; external kernel32 name 'GetThreadTimes';
-function GetThreadIOPendingFlag; external kernel32 name 'GetThreadIOPendingFlag';
-procedure ExitThread; external kernel32 name 'ExitThread';
-function TerminateThread; external kernel32 name 'TerminateThread';
-function GetExitCodeThread; external kernel32 name 'GetExitCodeThread';
-function GetThreadSelectorEntry; external kernel32 name 'GetThreadSelectorEntry';
-function SetThreadExecutionState; external kernel32 name 'SetThreadExecutionState';
-function GetLastError; external kernel32 name 'GetLastError';
-procedure SetLastError; external kernel32 name 'SetLastError';
-procedure RestoreLastError; external kernel32 name 'RestoreLastError';
-function GetOverlappedResult; external kernel32 name 'GetOverlappedResult';
-function CreateIoCompletionPort; external kernel32 name 'CreateIoCompletionPort';
-function GetQueuedCompletionStatus; external kernel32 name 'GetQueuedCompletionStatus';
-function PostQueuedCompletionStatus; external kernel32 name 'PostQueuedCompletionStatus';
-function SetErrorMode; external kernel32 name 'SetErrorMode';
-function ReadProcessMemory; external kernel32 name 'ReadProcessMemory';
-function WriteProcessMemory; external kernel32 name 'WriteProcessMemory';
-function GetThreadContext; external kernel32 name 'GetThreadContext';
-function SetThreadContext; external kernel32 name 'SetThreadContext';
-function SuspendThread; external kernel32 name 'SuspendThread';
-function ResumeThread; external kernel32 name 'ResumeThread';
-function QueueUserAPC; external kernel32 name 'QueueUserAPC';
-function IsDebuggerPresent; external kernel32 name 'IsDebuggerPresent';
-function CheckRemoteDebuggerPresent; external kernel32 name 'CheckRemoteDebuggerPresent';
-procedure DebugBreak; external kernel32 name 'DebugBreak';
-function WaitForDebugEvent; external kernel32 name 'WaitForDebugEvent';
-function ContinueDebugEvent; external kernel32 name 'ContinueDebugEvent';
-function DebugActiveProcess; external kernel32 name 'DebugActiveProcess';
-function DebugActiveProcessStop; external kernel32 name 'DebugActiveProcessStop';
-function DebugSetProcessKillOnExit; external kernel32 name 'DebugSetProcessKillOnExit';
-function DebugBreakProcess; external kernel32 name 'DebugBreakProcess';
-procedure InitializeCriticalSection; external kernel32 name 'InitializeCriticalSection';
-procedure EnterCriticalSection; external kernel32 name 'EnterCriticalSection';
-procedure LeaveCriticalSection; external kernel32 name 'LeaveCriticalSection';
-function InitializeCriticalSectionAndSpinCount; external kernel32 name 'InitializeCriticalSectionAndSpinCount';
-function SetCriticalSectionSpinCount; external kernel32 name 'SetCriticalSectionSpinCount';
-function TryEnterCriticalSection; external kernel32 name 'TryEnterCriticalSection';
-procedure DeleteCriticalSection; external kernel32 name 'DeleteCriticalSection';
-function SetEvent; external kernel32 name 'SetEvent';
-function ResetEvent; external kernel32 name 'ResetEvent';
-function PulseEvent; external kernel32 name 'PulseEvent';
-function ReleaseSemaphore; external kernel32 name 'ReleaseSemaphore';
-function ReleaseMutex; external kernel32 name 'ReleaseMutex';
-function WaitForSingleObject; external kernel32 name 'WaitForSingleObject';
-function WaitForMultipleObjects; external kernel32 name 'WaitForMultipleObjects';
-procedure Sleep; external kernel32 name 'Sleep';
-function LoadResource; external kernel32 name 'LoadResource';
-function SizeofResource; external kernel32 name 'SizeofResource';
-function GlobalDeleteAtom; external kernel32 name 'GlobalDeleteAtom';
-function InitAtomTable; external kernel32 name 'InitAtomTable';
-function DeleteAtom; external kernel32 name 'DeleteAtom';
-function SetHandleCount; external kernel32 name 'SetHandleCount';
-function GetLogicalDrives; external kernel32 name 'GetLogicalDrives';
-function LockFile; external kernel32 name 'LockFile';
-function UnlockFile; external kernel32 name 'UnlockFile';
-function LockFileEx; external kernel32 name 'LockFileEx';
-function UnlockFileEx; external kernel32 name 'UnlockFileEx';
-function GetFileInformationByHandle; external kernel32 name 'GetFileInformationByHandle';
-function GetFileType; external kernel32 name 'GetFileType';
-function GetFileSize; external kernel32 name 'GetFileSize';
-function GetFileSizeEx; external kernel32 name 'GetFileSizeEx';
-function GetStdHandle; external kernel32 name 'GetStdHandle';
-function SetStdHandle; external kernel32 name 'SetStdHandle';
-function WriteFile; external kernel32 name 'WriteFile';
-function ReadFile; external kernel32 name 'ReadFile';
-function FlushFileBuffers; external kernel32 name 'FlushFileBuffers';
-function DeviceIoControl; external kernel32 name 'DeviceIoControl';
-function RequestDeviceWakeup; external kernel32 name 'RequestDeviceWakeup';
-function CancelDeviceWakeupRequest; external kernel32 name 'CancelDeviceWakeupRequest';
-function GetDevicePowerState; external kernel32 name 'GetDevicePowerState';
-function SetMessageWaitingIndicator; external kernel32 name 'SetMessageWaitingIndicator';
-function SetEndOfFile; external kernel32 name 'SetEndOfFile';
-function SetFilePointer; external kernel32 name 'SetFilePointer';
-function SetFilePointerEx; external kernel32 name 'SetFilePointerEx';
-function FindClose; external kernel32 name 'FindClose';
-function GetFileTime; external kernel32 name 'GetFileTime';
-function SetFileTime; external kernel32 name 'SetFileTime';
-function SetFileValidData; external kernel32 name 'SetFileValidData';
-function SetFileShortNameA; external kernel32 name 'SetFileShortNameA';
-function SetFileShortNameW; external kernel32 name 'SetFileShortNameW';
-function SetFileShortName; external kernel32 name 'SetFileShortName' + AWSuffix;
-function CloseHandle; external kernel32 name 'CloseHandle';
-function DuplicateHandle; external kernel32 name 'DuplicateHandle';
-function GetHandleInformation; external kernel32 name 'GetHandleInformation';
-function SetHandleInformation; external kernel32 name 'SetHandleInformation';
-function LoadModule; external kernel32 name 'LoadModule';
-function WinExec; external kernel32 name 'WinExec';
-function ClearCommBreak; external kernel32 name 'ClearCommBreak';
-function ClearCommError; external kernel32 name 'ClearCommError';
-function SetupComm; external kernel32 name 'SetupComm';
-function EscapeCommFunction; external kernel32 name 'EscapeCommFunction';
-function GetCommConfig; external kernel32 name 'GetCommConfig';
-function GetCommMask; external kernel32 name 'GetCommMask';
-function GetCommProperties; external kernel32 name 'GetCommProperties';
-function GetCommModemStatus; external kernel32 name 'GetCommModemStatus';
-function GetCommState; external kernel32 name 'GetCommState';
-function GetCommTimeouts; external kernel32 name 'GetCommTimeouts';
-function PurgeComm; external kernel32 name 'PurgeComm';
-function SetCommBreak; external kernel32 name 'SetCommBreak';
-function SetCommConfig; external kernel32 name 'SetCommConfig';
-function SetCommMask; external kernel32 name 'SetCommMask';
-function SetCommState; external kernel32 name 'SetCommState';
-function SetCommTimeouts; external kernel32 name 'SetCommTimeouts';
-function TransmitCommChar; external kernel32 name 'TransmitCommChar';
-function WaitCommEvent; external kernel32 name 'WaitCommEvent';
-function SetTapePosition; external kernel32 name 'SetTapePosition';
-function GetTapePosition; external kernel32 name 'GetTapePosition';
-function PrepareTape; external kernel32 name 'PrepareTape';
-function EraseTape; external kernel32 name 'EraseTape';
-function CreateTapePartition; external kernel32 name 'CreateTapePartition';
-function WriteTapemark; external kernel32 name 'WriteTapemark';
-function GetTapeStatus; external kernel32 name 'GetTapeStatus';
-function GetTapeParameters; external kernel32 name 'GetTapeParameters';
-function SetTapeParameters; external kernel32 name 'SetTapeParameters';
-function Beep; external kernel32 name 'Beep';
-function MulDiv; external kernel32 name 'MulDiv';
-procedure GetSystemTime; external kernel32 name 'GetSystemTime';
-procedure GetSystemTimeAsFileTime; external kernel32 name 'GetSystemTimeAsFileTime';
-function SetSystemTime; external kernel32 name 'SetSystemTime';
-procedure GetLocalTime; external kernel32 name 'GetLocalTime';
-function SetLocalTime; external kernel32 name 'SetLocalTime';
-procedure GetSystemInfo; external kernel32 name 'GetSystemInfo';
-function GetSystemRegistryQuota; external kernel32 name 'GetSystemRegistryQuota';
-function GetSystemTimes; external kernel32 name 'GetSystemTimes';
-procedure GetNativeSystemInfo; external kernel32 name 'GetNativeSystemInfo';
-function IsProcessorFeaturePresent; external kernel32 name 'IsProcessorFeaturePresent';
-function SystemTimeToTzSpecificLocalTime; external kernel32 name 'SystemTimeToTzSpecificLocalTime';
-function TzSpecificLocalTimeToSystemTime; external kernel32 name 'TzSpecificLocalTimeToSystemTime';
-function GetTimeZoneInformation; external kernel32 name 'GetTimeZoneInformation';
-function SetTimeZoneInformation; external kernel32 name 'SetTimeZoneInformation';
-function SystemTimeToFileTime; external kernel32 name 'SystemTimeToFileTime';
-function FileTimeToLocalFileTime; external kernel32 name 'FileTimeToLocalFileTime';
-function LocalFileTimeToFileTime; external kernel32 name 'LocalFileTimeToFileTime';
-function FileTimeToSystemTime; external kernel32 name 'FileTimeToSystemTime';
-function CompareFileTime; external kernel32 name 'CompareFileTime';
-function FileTimeToDosDateTime; external kernel32 name 'FileTimeToDosDateTime';
-function DosDateTimeToFileTime; external kernel32 name 'DosDateTimeToFileTime';
-function GetTickCount; external kernel32 name 'GetTickCount';
-function SetSystemTimeAdjustment; external kernel32 name 'SetSystemTimeAdjustment';
-function GetSystemTimeAdjustment; external kernel32 name 'GetSystemTimeAdjustment';
-function FormatMessageA; external kernel32 name 'FormatMessageA';
-function FormatMessageW; external kernel32 name 'FormatMessageW';
-function FormatMessage; external kernel32 name 'FormatMessage' + AWSuffix;
-function CreatePipe; external kernel32 name 'CreatePipe';
-function ConnectNamedPipe; external kernel32 name 'ConnectNamedPipe';
-function DisconnectNamedPipe; external kernel32 name 'DisconnectNamedPipe';
-function SetNamedPipeHandleState; external kernel32 name 'SetNamedPipeHandleState';
-function GetNamedPipeInfo; external kernel32 name 'GetNamedPipeInfo';
-function PeekNamedPipe; external kernel32 name 'PeekNamedPipe';
-function TransactNamedPipe; external kernel32 name 'TransactNamedPipe';
-function CreateMailslotA; external kernel32 name 'CreateMailslotA';
-function CreateMailslotW; external kernel32 name 'CreateMailslotW';
-function CreateMailslot; external kernel32 name 'CreateMailslot' + AWSuffix;
-function GetMailslotInfo; external kernel32 name 'GetMailslotInfo';
-function SetMailslotInfo; external kernel32 name 'SetMailslotInfo';
-function MapViewOfFile; external kernel32 name 'MapViewOfFile';
-function FlushViewOfFile; external kernel32 name 'FlushViewOfFile';
-function UnmapViewOfFile; external kernel32 name 'UnmapViewOfFile';
-function EncryptFileA; external advapi32 name 'EncryptFileA';
-function EncryptFileW; external advapi32 name 'EncryptFileW';
-function EncryptFile; external advapi32 name 'EncryptFile' + AWSuffix;
-function DecryptFileA; external advapi32 name 'DecryptFileA';
-function DecryptFileW; external advapi32 name 'DecryptFileW';
-function DecryptFile; external advapi32 name 'DecryptFile' + AWSuffix;
-function FileEncryptionStatusA; external advapi32 name 'FileEncryptionStatusA';
-function FileEncryptionStatusW; external advapi32 name 'FileEncryptionStatusW';
-function FileEncryptionStatus; external advapi32 name 'FileEncryptionStatus' + AWSuffix;
-function OpenEncryptedFileRawA; external advapi32 name 'OpenEncryptedFileRawA';
-function OpenEncryptedFileRawW; external advapi32 name 'OpenEncryptedFileRawW';
-function OpenEncryptedFileRaw; external advapi32 name 'OpenEncryptedFileRaw' + AWSuffix;
-function ReadEncryptedFileRaw; external advapi32 name 'ReadEncryptedFileRaw';
-function WriteEncryptedFileRaw; external advapi32 name 'WriteEncryptedFileRaw';
-procedure CloseEncryptedFileRaw; external advapi32 name 'CloseEncryptedFileRaw';
-function lstrcmpA; external kernel32 name 'lstrcmpA';
-function lstrcmpW; external kernel32 name 'lstrcmpW';
-function lstrcmp; external kernel32 name 'lstrcmp' + AWSuffix;
-function lstrcmpiA; external kernel32 name 'lstrcmpiA';
-function lstrcmpiW; external kernel32 name 'lstrcmpiW';
-function lstrcmpi; external kernel32 name 'lstrcmpi' + AWSuffix;
-function lstrcpynA; external kernel32 name 'lstrcpynA';
-function lstrcpynW; external kernel32 name 'lstrcpynW';
-function lstrcpyn; external kernel32 name 'lstrcpyn' + AWSuffix;
-function lstrcpyA; external kernel32 name 'lstrcpyA';
-function lstrcpyW; external kernel32 name 'lstrcpyW';
-function lstrcpy; external kernel32 name 'lstrcpy' + AWSuffix;
-function lstrcatA; external kernel32 name 'lstrcatA';
-function lstrcatW; external kernel32 name 'lstrcatW';
-function lstrcat; external kernel32 name 'lstrcat' + AWSuffix;
-function lstrlenA; external kernel32 name 'lstrlenA';
-function lstrlenW; external kernel32 name 'lstrlenW';
-function lstrlen; external kernel32 name 'lstrlen' + AWSuffix;
-function OpenFile; external kernel32 name 'OpenFile';
-function _lopen; external kernel32 name '_lopen';
-function _lcreat; external kernel32 name '_lcreat';
-function _lread; external kernel32 name '_lread';
-function _lwrite; external kernel32 name '_lwrite';
-function _hread; external kernel32 name '_hread';
-function _hwrite; external kernel32 name '_hwrite';
-function _lclose; external kernel32 name '_lclose';
-function _llseek; external kernel32 name '_llseek';
-function IsTextUnicode; external advapi32 name 'IsTextUnicode';
-function FlsAlloc; external kernel32 name 'FlsAlloc';
-function FlsGetValue; external kernel32 name 'FlsGetValue';
-function FlsSetValue; external kernel32 name 'FlsSetValue';
-function FlsFree; external kernel32 name 'FlsFree';
-function TlsAlloc; external kernel32 name 'TlsAlloc';
-function TlsGetValue; external kernel32 name 'TlsGetValue';
-function TlsSetValue; external kernel32 name 'TlsSetValue';
-function TlsFree; external kernel32 name 'TlsFree';
-function SleepEx; external kernel32 name 'SleepEx';
-function WaitForSingleObjectEx; external kernel32 name 'WaitForSingleObjectEx';
-function WaitForMultipleObjectsEx; external kernel32 name 'WaitForMultipleObjectsEx';
-function SignalObjectAndWait; external kernel32 name 'SignalObjectAndWait';
-function ReadFileEx; external kernel32 name 'ReadFileEx';
-function WriteFileEx; external kernel32 name 'WriteFileEx';
-function BackupRead; external kernel32 name 'BackupRead';
-function BackupSeek; external kernel32 name 'BackupSeek';
-function BackupWrite; external kernel32 name 'BackupWrite';
-function ReadFileScatter; external kernel32 name 'ReadFileScatter';
-function WriteFileGather; external kernel32 name 'WriteFileGather';
-function OpenMutexA; external kernel32 name 'OpenMutexA';
-function OpenMutexW; external kernel32 name 'OpenMutexW';
-function OpenMutex; external kernel32 name 'OpenMutex' + AWSuffix;
-function CreateEventA; external kernel32 name 'CreateEventA';
-function CreateEventW; external kernel32 name 'CreateEventW';
-function CreateEvent; external kernel32 name 'CreateEvent' + AWSuffix;
-function OpenEventA; external kernel32 name 'OpenEventA';
-function OpenEventW; external kernel32 name 'OpenEventW';
-function OpenEvent; external kernel32 name 'OpenEvent' + AWSuffix;
-function CreateSemaphoreA; external kernel32 name 'CreateSemaphoreA';
-function CreateSemaphoreW; external kernel32 name 'CreateSemaphoreW';
-function CreateSemaphore; external kernel32 name 'CreateSemaphore' + AWSuffix;
-function OpenSemaphoreA; external kernel32 name 'OpenSemaphoreA';
-function OpenSemaphoreW; external kernel32 name 'OpenSemaphoreW';
-function OpenSemaphore; external kernel32 name 'OpenSemaphore' + AWSuffix;
-function CreateWaitableTimerA; external kernel32 name 'CreateWaitableTimerA';
-function CreateWaitableTimerW; external kernel32 name 'CreateWaitableTimerW';
-function CreateWaitableTimer; external kernel32 name 'CreateWaitableTimer' + AWSuffix;
-function OpenWaitableTimerA; external kernel32 name 'OpenWaitableTimerA';
-function OpenWaitableTimerW; external kernel32 name 'OpenWaitableTimerW';
-function OpenWaitableTimer; external kernel32 name 'OpenWaitableTimer' + AWSuffix;
-function SetWaitableTimer; external kernel32 name 'SetWaitableTimer';
-function CancelWaitableTimer; external kernel32 name 'CancelWaitableTimer';
-function CreateFileMappingA; external kernel32 name 'CreateFileMappingA';
-function CreateFileMappingW; external kernel32 name 'CreateFileMappingW';
-function CreateFileMapping; external kernel32 name 'CreateFileMapping' + AWSuffix;
-function OpenFileMappingA; external kernel32 name 'OpenFileMappingA';
-function OpenFileMappingW; external kernel32 name 'OpenFileMappingW';
-function OpenFileMapping; external kernel32 name 'OpenFileMapping' + AWSuffix;
-function GetLogicalDriveStringsA; external kernel32 name 'GetLogicalDriveStringsA';
-function GetLogicalDriveStringsW; external kernel32 name 'GetLogicalDriveStringsW';
-function GetLogicalDriveStrings; external kernel32 name 'GetLogicalDriveStrings' + AWSuffix;
-function CreateMemoryResourceNotification; external kernel32 name 'CreateMemoryResourceNotification';
-function QueryMemoryResourceNotification; external kernel32 name 'QueryMemoryResourceNotification';
-function LoadLibraryA; external kernel32 name 'LoadLibraryA';
-function LoadLibraryW; external kernel32 name 'LoadLibraryW';
-function LoadLibrary; external kernel32 name 'LoadLibrary' + AWSuffix;
-function LoadLibraryExA; external kernel32 name 'LoadLibraryExA';
-function LoadLibraryExW; external kernel32 name 'LoadLibraryExW';
-function LoadLibraryEx; external kernel32 name 'LoadLibraryEx' + AWSuffix;
-function GetModuleFileNameA; external kernel32 name 'GetModuleFileNameA';
-function GetModuleFileNameW; external kernel32 name 'GetModuleFileNameW';
-function GetModuleFileName; external kernel32 name 'GetModuleFileName' + AWSuffix;
-function GetModuleHandleA; external kernel32 name 'GetModuleHandleA';
-function GetModuleHandleW; external kernel32 name 'GetModuleHandleW';
-function GetModuleHandle; external kernel32 name 'GetModuleHandle' + AWSuffix;
-function CreateProcessA; external kernel32 name 'CreateProcessA';
-function CreateProcessW; external kernel32 name 'CreateProcessW';
-function CreateProcess; external kernel32 name 'CreateProcess' + AWSuffix;
-function GetModuleHandleExA; external kernel32 name 'GetModuleHandleExA';
-function GetModuleHandleExW; external kernel32 name 'GetModuleHandleExW';
-function GetModuleHandleEx; external kernel32 name 'GetModuleHandleEx' + AWSuffix;
-function NeedCurrentDirectoryForExePathA; external kernel32 name 'NeedCurrentDirectoryForExePathA';
-function NeedCurrentDirectoryForExePathW; external kernel32 name 'NeedCurrentDirectoryForExePathW';
-function NeedCurrentDirectoryForExePath; external kernel32 name 'NeedCurrentDirectoryForExePath' + AWSuffix;
-function SetProcessShutdownParameters; external kernel32 name 'SetProcessShutdownParameters';
-function GetProcessShutdownParameters; external kernel32 name 'GetProcessShutdownParameters';
-function GetProcessVersion; external kernel32 name 'GetProcessVersion';
-procedure FatalAppExitA; external kernel32 name 'FatalAppExitA';
-procedure FatalAppExitW; external kernel32 name 'FatalAppExitW';
-procedure FatalAppExit; external kernel32 name 'FatalAppExit' + AWSuffix;
-procedure GetStartupInfoA; external kernel32 name 'GetStartupInfoA';
-procedure GetStartupInfoW; external kernel32 name 'GetStartupInfoW';
-procedure GetStartupInfo; external kernel32 name 'GetStartupInfo' + AWSuffix;
-function GetCommandLineA; external kernel32 name 'GetCommandLineA';
-function GetCommandLineW; external kernel32 name 'GetCommandLineW';
-function GetCommandLine; external kernel32 name 'GetCommandLine' + AWSuffix;
-function GetEnvironmentVariableA; external kernel32 name 'GetEnvironmentVariableA';
-function GetEnvironmentVariableW; external kernel32 name 'GetEnvironmentVariableW';
-function GetEnvironmentVariable; external kernel32 name 'GetEnvironmentVariable' + AWSuffix;
-function SetEnvironmentVariableA; external kernel32 name 'SetEnvironmentVariableA';
-function SetEnvironmentVariableW; external kernel32 name 'SetEnvironmentVariableW';
-function SetEnvironmentVariable; external kernel32 name 'SetEnvironmentVariable' + AWSuffix;
-function ExpandEnvironmentStringsA; external kernel32 name 'ExpandEnvironmentStringsA';
-function ExpandEnvironmentStringsW; external kernel32 name 'ExpandEnvironmentStringsW';
-function ExpandEnvironmentStrings; external kernel32 name 'ExpandEnvironmentStrings' + AWSuffix;
-function GetFirmwareEnvironmentVariableA; external kernel32 name 'GetFirmwareEnvironmentVariableA';
-function GetFirmwareEnvironmentVariableW; external kernel32 name 'GetFirmwareEnvironmentVariableW';
-function GetFirmwareEnvironmentVariable; external kernel32 name 'GetFirmwareEnvironmentVariable' + AWSuffix;
-function SetFirmwareEnvironmentVariableA; external kernel32 name 'SetFirmwareEnvironmentVariableA';
-function SetFirmwareEnvironmentVariableW; external kernel32 name 'SetFirmwareEnvironmentVariableW';
-function SetFirmwareEnvironmentVariable; external kernel32 name 'SetFirmwareEnvironmentVariable' + AWSuffix;
-procedure OutputDebugStringA; external kernel32 name 'OutputDebugStringA';
-procedure OutputDebugStringW; external kernel32 name 'OutputDebugStringW';
-procedure OutputDebugString; external kernel32 name 'OutputDebugString' + AWSuffix;
-function FindResourceA; external kernel32 name 'FindResourceA';
-function FindResourceW; external kernel32 name 'FindResourceW';
-function FindResource; external kernel32 name 'FindResource' + AWSuffix;
-function FindResourceExA; external kernel32 name 'FindResourceExA';
-function FindResourceExW; external kernel32 name 'FindResourceExW';
-function FindResourceEx; external kernel32 name 'FindResourceEx' + AWSuffix;
-function EnumResourceTypesA; external kernel32 name 'EnumResourceTypesA';
-function EnumResourceTypesW; external kernel32 name 'EnumResourceTypesW';
-function EnumResourceTypes; external kernel32 name 'EnumResourceTypes' + AWSuffix;
-function EnumResourceNamesA; external kernel32 name 'EnumResourceNamesA';
-function EnumResourceNamesW; external kernel32 name 'EnumResourceNamesW';
-function EnumResourceNames; external kernel32 name 'EnumResourceNames' + AWSuffix;
-function EnumResourceLanguagesA; external kernel32 name 'EnumResourceLanguagesA';
-function EnumResourceLanguagesW; external kernel32 name 'EnumResourceLanguagesW';
-function EnumResourceLanguages; external kernel32 name 'EnumResourceLanguages' + AWSuffix;
-function BeginUpdateResourceA; external kernel32 name 'BeginUpdateResourceA';
-function BeginUpdateResourceW; external kernel32 name 'BeginUpdateResourceW';
-function BeginUpdateResource; external kernel32 name 'BeginUpdateResource' + AWSuffix;
-function UpdateResourceA; external kernel32 name 'UpdateResourceA';
-function UpdateResourceW; external kernel32 name 'UpdateResourceW';
-function UpdateResource; external kernel32 name 'UpdateResource' + AWSuffix;
-function EndUpdateResourceA; external kernel32 name 'EndUpdateResourceA';
-function EndUpdateResourceW; external kernel32 name 'EndUpdateResourceW';
-function EndUpdateResource; external kernel32 name 'EndUpdateResource' + AWSuffix;
-function GlobalAddAtomA; external kernel32 name 'GlobalAddAtomA';
-function GlobalAddAtomW; external kernel32 name 'GlobalAddAtomW';
-function GlobalAddAtom; external kernel32 name 'GlobalAddAtom' + AWSuffix;
-function GlobalFindAtomA; external kernel32 name 'GlobalFindAtomA';
-function GlobalFindAtomW; external kernel32 name 'GlobalFindAtomW';
-function GlobalFindAtom; external kernel32 name 'GlobalFindAtom' + AWSuffix;
-function GlobalGetAtomNameA; external kernel32 name 'GlobalGetAtomNameA';
-function GlobalGetAtomNameW; external kernel32 name 'GlobalGetAtomNameW';
-function GlobalGetAtomName; external kernel32 name 'GlobalGetAtomName' + AWSuffix;
-function AddAtomA; external kernel32 name 'AddAtomA';
-function AddAtomW; external kernel32 name 'AddAtomW';
-function AddAtom; external kernel32 name 'AddAtom' + AWSuffix;
-function FindAtomA; external kernel32 name 'FindAtomA';
-function FindAtomW; external kernel32 name 'FindAtomW';
-function FindAtom; external kernel32 name 'FindAtom' + AWSuffix;
-function GetAtomNameA; external kernel32 name 'GetAtomNameA';
-function GetAtomNameW; external kernel32 name 'GetAtomNameW';
-function GetAtomName; external kernel32 name 'GetAtomName' + AWSuffix;
-function GetProfileIntA; external kernel32 name 'GetProfileIntA';
-function GetProfileIntW; external kernel32 name 'GetProfileIntW';
-function GetProfileInt; external kernel32 name 'GetProfileInt' + AWSuffix;
-function GetProfileStringA; external kernel32 name 'GetProfileStringA';
-function GetProfileStringW; external kernel32 name 'GetProfileStringW';
-function GetProfileString; external kernel32 name 'GetProfileString' + AWSuffix;
-function WriteProfileStringA; external kernel32 name 'WriteProfileStringA';
-function WriteProfileStringW; external kernel32 name 'WriteProfileStringW';
-function WriteProfileString; external kernel32 name 'WriteProfileString' + AWSuffix;
-function GetProfileSectionA; external kernel32 name 'GetProfileSectionA';
-function GetProfileSectionW; external kernel32 name 'GetProfileSectionW';
-function GetProfileSection; external kernel32 name 'GetProfileSection' + AWSuffix;
-function WriteProfileSectionA; external kernel32 name 'WriteProfileSectionA';
-function WriteProfileSectionW; external kernel32 name 'WriteProfileSectionW';
-function WriteProfileSection; external kernel32 name 'WriteProfileSection' + AWSuffix;
-function GetPrivateProfileIntA; external kernel32 name 'GetPrivateProfileIntA';
-function GetPrivateProfileIntW; external kernel32 name 'GetPrivateProfileIntW';
-function GetPrivateProfileInt; external kernel32 name 'GetPrivateProfileInt' + AWSuffix;
-function GetPrivateProfileStringA; external kernel32 name 'GetPrivateProfileStringA';
-function GetPrivateProfileStringW; external kernel32 name 'GetPrivateProfileStringW';
-function GetPrivateProfileString; external kernel32 name 'GetPrivateProfileString' + AWSuffix;
-function WritePrivateProfileStringA; external kernel32 name 'WritePrivateProfileStringA';
-function WritePrivateProfileStringW; external kernel32 name 'WritePrivateProfileStringW';
-function WritePrivateProfileString; external kernel32 name 'WritePrivateProfileString' + AWSuffix;
-function GetPrivateProfileSectionA; external kernel32 name 'GetPrivateProfileSectionA';
-function GetPrivateProfileSectionW; external kernel32 name 'GetPrivateProfileSectionW';
-function GetPrivateProfileSection; external kernel32 name 'GetPrivateProfileSection' + AWSuffix;
-function WritePrivateProfileSectionA; external kernel32 name 'WritePrivateProfileSectionA';
-function WritePrivateProfileSectionW; external kernel32 name 'WritePrivateProfileSectionW';
-function WritePrivateProfileSection; external kernel32 name 'WritePrivateProfileSection' + AWSuffix;
-function GetPrivateProfileSectionNamesA; external kernel32 name 'GetPrivateProfileSectionNamesA';
-function GetPrivateProfileSectionNamesW; external kernel32 name 'GetPrivateProfileSectionNamesW';
-function GetPrivateProfileSectionNames; external kernel32 name 'GetPrivateProfileSectionNames' + AWSuffix;
-function GetPrivateProfileStructA; external kernel32 name 'GetPrivateProfileStructA';
-function GetPrivateProfileStructW; external kernel32 name 'GetPrivateProfileStructW';
-function GetPrivateProfileStruct; external kernel32 name 'GetPrivateProfileStruct' + AWSuffix;
-function WritePrivateProfileStructA; external kernel32 name 'WritePrivateProfileStructA';
-function WritePrivateProfileStructW; external kernel32 name 'WritePrivateProfileStructW';
-function WritePrivateProfileStruct; external kernel32 name 'WritePrivateProfileStruct' + AWSuffix;
-function GetDriveTypeA; external kernel32 name 'GetDriveTypeA';
-function GetDriveTypeW; external kernel32 name 'GetDriveTypeW';
-function GetDriveType; external kernel32 name 'GetDriveType' + AWSuffix;
-function GetSystemDirectoryA; external kernel32 name 'GetSystemDirectoryA';
-function GetSystemDirectoryW; external kernel32 name 'GetSystemDirectoryW';
-function GetSystemDirectory; external kernel32 name 'GetSystemDirectory' + AWSuffix;
-function GetTempPathA; external kernel32 name 'GetTempPathA';
-function GetTempPathW; external kernel32 name 'GetTempPathW';
-function GetTempPath; external kernel32 name 'GetTempPath' + AWSuffix;
-function GetTempFileNameA; external kernel32 name 'GetTempFileNameA';
-function GetTempFileNameW; external kernel32 name 'GetTempFileNameW';
-function GetTempFileName; external kernel32 name 'GetTempFileName' + AWSuffix;
-function GetWindowsDirectoryA; external kernel32 name 'GetWindowsDirectoryA';
-function GetWindowsDirectoryW; external kernel32 name 'GetWindowsDirectoryW';
-function GetWindowsDirectory; external kernel32 name 'GetWindowsDirectory' + AWSuffix;
-function GetSystemWindowsDirectoryA; external kernel32 name 'GetSystemWindowsDirectoryA';
-function GetSystemWindowsDirectoryW; external kernel32 name 'GetSystemWindowsDirectoryW';
-function GetSystemWindowsDirectory; external kernel32 name 'GetSystemWindowsDirectory' + AWSuffix;
-function GetSystemWow64DirectoryA; external kernel32 name 'GetSystemWow64DirectoryA';
-function GetSystemWow64DirectoryW; external kernel32 name 'GetSystemWow64DirectoryW';
-function GetSystemWow64Directory; external kernel32 name 'GetSystemWow64Directory' + AWSuffix;
-function Wow64EnableWow64FsRedirection; external kernel32 name 'Wow64EnableWow64FsRedirection';
-function SetCurrentDirectoryA; external kernel32 name 'SetCurrentDirectoryA';
-function SetCurrentDirectoryW; external kernel32 name 'SetCurrentDirectoryW';
-function SetCurrentDirectory; external kernel32 name 'SetCurrentDirectory' + AWSuffix;
-function GetCurrentDirectoryA; external kernel32 name 'GetCurrentDirectoryA';
-function GetCurrentDirectoryW; external kernel32 name 'GetCurrentDirectoryW';
-function GetCurrentDirectory; external kernel32 name 'GetCurrentDirectory' + AWSuffix;
-function SetDllDirectoryA; external kernel32 name 'SetDllDirectoryA';
-function SetDllDirectoryW; external kernel32 name 'SetDllDirectoryW';
-function SetDllDirectory; external kernel32 name 'SetDllDirectory' + AWSuffix;
-function GetDllDirectoryA; external kernel32 name 'GetDllDirectoryA';
-function GetDllDirectoryW; external kernel32 name 'GetDllDirectoryW';
-function GetDllDirectory; external kernel32 name 'GetDllDirectory' + AWSuffix;
-function GetDiskFreeSpaceA; external kernel32 name 'GetDiskFreeSpaceA';
-function GetDiskFreeSpaceW; external kernel32 name 'GetDiskFreeSpaceW';
-function GetDiskFreeSpace; external kernel32 name 'GetDiskFreeSpace' + AWSuffix;
-function GetDiskFreeSpaceExA; external kernel32 name 'GetDiskFreeSpaceExA';
-function GetDiskFreeSpaceExW; external kernel32 name 'GetDiskFreeSpaceExW';
-function GetDiskFreeSpaceEx; external kernel32 name 'GetDiskFreeSpaceEx' + AWSuffix;
-function CreateDirectoryA; external kernel32 name 'CreateDirectoryA';
-function CreateDirectoryW; external kernel32 name 'CreateDirectoryW';
-function CreateDirectory; external kernel32 name 'CreateDirectory' + AWSuffix;
-function CreateDirectoryExA; external kernel32 name 'CreateDirectoryExA';
-function CreateDirectoryExW; external kernel32 name 'CreateDirectoryExW';
-function CreateDirectoryEx; external kernel32 name 'CreateDirectoryEx' + AWSuffix;
-function RemoveDirectoryA; external kernel32 name 'RemoveDirectoryA';
-function RemoveDirectoryW; external kernel32 name 'RemoveDirectoryW';
-function RemoveDirectory; external kernel32 name 'RemoveDirectory' + AWSuffix;
-function GetFullPathNameA; external kernel32 name 'GetFullPathNameA';
-function GetFullPathNameW; external kernel32 name 'GetFullPathNameW';
-function GetFullPathName; external kernel32 name 'GetFullPathName' + AWSuffix;
-function DefineDosDeviceA; external kernel32 name 'DefineDosDeviceA';
-function DefineDosDeviceW; external kernel32 name 'DefineDosDeviceW';
-function DefineDosDevice; external kernel32 name 'DefineDosDevice' + AWSuffix;
-function QueryDosDeviceA; external kernel32 name 'QueryDosDeviceA';
-function QueryDosDeviceW; external kernel32 name 'QueryDosDeviceW';
-function QueryDosDevice; external kernel32 name 'QueryDosDevice' + AWSuffix;
-function CreateFileA; external kernel32 name 'CreateFileA';
-function CreateFileW; external kernel32 name 'CreateFileW';
-function CreateFile; external kernel32 name 'CreateFile' + AWSuffix;
-function ReOpenFile; external kernel32 name 'ReOpenFile';
-function SetFileAttributesA; external kernel32 name 'SetFileAttributesA';
-function SetFileAttributesW; external kernel32 name 'SetFileAttributesW';
-function SetFileAttributes; external kernel32 name 'SetFileAttributes' + AWSuffix;
-function GetFileAttributesA; external kernel32 name 'GetFileAttributesA';
-function GetFileAttributesW; external kernel32 name 'GetFileAttributesW';
-function GetFileAttributes; external kernel32 name 'GetFileAttributes' + AWSuffix;
-function GetFileAttributesExA; external kernel32 name 'GetFileAttributesExA';
-function GetFileAttributesExW; external kernel32 name 'GetFileAttributesExW';
-function GetFileAttributesEx; external kernel32 name 'GetFileAttributesEx' + AWSuffix;
-function GetCompressedFileSizeA; external kernel32 name 'GetCompressedFileSizeA';
-function GetCompressedFileSizeW; external kernel32 name 'GetCompressedFileSizeW';
-function GetCompressedFileSize; external kernel32 name 'GetCompressedFileSize' + AWSuffix;
-function DeleteFileA; external kernel32 name 'DeleteFileA';
-function DeleteFileW; external kernel32 name 'DeleteFileW';
-function DeleteFile; external kernel32 name 'DeleteFile' + AWSuffix;
-function FindFirstFileExA; external kernel32 name 'FindFirstFileExA';
-function FindFirstFileExW; external kernel32 name 'FindFirstFileExW';
-function FindFirstFileEx; external kernel32 name 'FindFirstFileEx' + AWSuffix;
-function FindFirstFileA; external kernel32 name 'FindFirstFileA';
-function FindFirstFileW; external kernel32 name 'FindFirstFileW';
-function FindFirstFile; external kernel32 name 'FindFirstFile' + AWSuffix;
-function FindNextFileA; external kernel32 name 'FindNextFileA';
-function FindNextFileW; external kernel32 name 'FindNextFileW';
-function FindNextFile; external kernel32 name 'FindNextFile' + AWSuffix;
-function SearchPathA; external kernel32 name 'SearchPathA';
-function SearchPathW; external kernel32 name 'SearchPathW';
-function SearchPath; external kernel32 name 'SearchPath' + AWSuffix;
-function CopyFileA; external kernel32 name 'CopyFileA';
-function CopyFileW; external kernel32 name 'CopyFileW';
-function CopyFile; external kernel32 name 'CopyFile' + AWSuffix;
-function CopyFileExA; external kernel32 name 'CopyFileExA';
-function CopyFileExW; external kernel32 name 'CopyFileExW';
-function CopyFileEx; external kernel32 name 'CopyFileEx' + AWSuffix;
-function MoveFileA; external kernel32 name 'MoveFileA';
-function MoveFileW; external kernel32 name 'MoveFileW';
-function MoveFile; external kernel32 name 'MoveFile' + AWSuffix;
-function MoveFileExA; external kernel32 name 'MoveFileExA';
-function MoveFileExW; external kernel32 name 'MoveFileExW';
-function MoveFileEx; external kernel32 name 'MoveFileEx' + AWSuffix;
-function MoveFileWithProgressA; external kernel32 name 'MoveFileWithProgressA';
-function MoveFileWithProgressW; external kernel32 name 'MoveFileWithProgressW';
-function MoveFileWithProgress; external kernel32 name 'MoveFileWithProgress' + AWSuffix;
-function ReplaceFileA; external kernel32 name 'ReplaceFileA';
-function ReplaceFileW; external kernel32 name 'ReplaceFileW';
-function ReplaceFile; external kernel32 name 'ReplaceFile' + AWSuffix;
-function CreateHardLinkA; external kernel32 name 'CreateHardLinkA';
-function CreateHardLinkW; external kernel32 name 'CreateHardLinkW';
-function CreateHardLink; external kernel32 name 'CreateHardLink' + AWSuffix;
-function FindFirstStreamW; external kernel32 name 'FindFirstStreamW';
-function FindNextStreamW; external kernel32 name 'FindNextStreamW';
-function CreateNamedPipeA; external kernel32 name 'CreateNamedPipeA';
-function CreateNamedPipeW; external kernel32 name 'CreateNamedPipeW';
-function CreateNamedPipe; external kernel32 name 'CreateNamedPipe' + AWSuffix;
-function GetNamedPipeHandleStateA; external kernel32 name 'GetNamedPipeHandleStateA';
-function GetNamedPipeHandleStateW; external kernel32 name 'GetNamedPipeHandleStateW';
-function GetNamedPipeHandleState; external kernel32 name 'GetNamedPipeHandleState' + AWSuffix;
-function CallNamedPipeA; external kernel32 name 'CallNamedPipeA';
-function CallNamedPipeW; external kernel32 name 'CallNamedPipeW';
-function CallNamedPipe; external kernel32 name 'CallNamedPipe' + AWSuffix;
-function WaitNamedPipeA; external kernel32 name 'WaitNamedPipeA';
-function WaitNamedPipeW; external kernel32 name 'WaitNamedPipeW';
-function WaitNamedPipe; external kernel32 name 'WaitNamedPipe' + AWSuffix;
-function SetVolumeLabelA; external kernel32 name 'SetVolumeLabelA';
-function SetVolumeLabelW; external kernel32 name 'SetVolumeLabelW';
-function SetVolumeLabel; external kernel32 name 'SetVolumeLabel' + AWSuffix;
-procedure SetFileApisToOEM; external kernel32 name 'SetFileApisToOEM';
-procedure SetFileApisToANSI; external kernel32 name 'SetFileApisToANSI';
-function AreFileApisANSI; external kernel32 name 'AreFileApisANSI';
-function GetVolumeInformationA; external kernel32 name 'GetVolumeInformationA';
-function GetVolumeInformationW; external kernel32 name 'GetVolumeInformationW';
-function GetVolumeInformation; external kernel32 name 'GetVolumeInformation' + AWSuffix;
-function CancelIo; external kernel32 name 'CancelIo';
-function ClearEventLogA; external advapi32 name 'ClearEventLogA';
-function ClearEventLogW; external advapi32 name 'ClearEventLogW';
-function ClearEventLog; external advapi32 name 'ClearEventLog' + AWSuffix;
-function BackupEventLogA; external advapi32 name 'BackupEventLogA';
-function BackupEventLogW; external advapi32 name 'BackupEventLogW';
-function BackupEventLog; external advapi32 name 'BackupEventLog' + AWSuffix;
-function CloseEventLog; external advapi32 name 'CloseEventLog';
-function DeregisterEventSource; external advapi32 name 'DeregisterEventSource';
-function NotifyChangeEventLog; external advapi32 name 'NotifyChangeEventLog';
-function GetNumberOfEventLogRecords; external advapi32 name 'GetNumberOfEventLogRecords';
-function GetOldestEventLogRecord; external advapi32 name 'GetOldestEventLogRecord';
-function OpenEventLogA; external advapi32 name 'OpenEventLogA';
-function OpenEventLogW; external advapi32 name 'OpenEventLogW';
-function OpenEventLog; external advapi32 name 'OpenEventLog' + AWSuffix;
-function RegisterEventSourceA; external advapi32 name 'RegisterEventSourceA';
-function RegisterEventSourceW; external advapi32 name 'RegisterEventSourceW';
-function RegisterEventSource; external advapi32 name 'RegisterEventSource' + AWSuffix;
-function OpenBackupEventLogA; external advapi32 name 'OpenBackupEventLogA';
-function OpenBackupEventLogW; external advapi32 name 'OpenBackupEventLogW';
-function OpenBackupEventLog; external advapi32 name 'OpenBackupEventLog' + AWSuffix;
-function ReadEventLogA; external advapi32 name 'ReadEventLogA';
-function ReadEventLogW; external advapi32 name 'ReadEventLogW';
-function ReadEventLog; external advapi32 name 'ReadEventLog' + AWSuffix;
-function ReportEventA; external advapi32 name 'ReportEventA';
-function ReportEventW; external advapi32 name 'ReportEventW';
-function ReportEvent; external advapi32 name 'ReportEvent' + AWSuffix;
-function GetEventLogInformation; external advapi32 name 'GetEventLogInformation';
-function DuplicateToken; external advapi32 name 'DuplicateToken';
-function GetKernelObjectSecurity; external advapi32 name 'GetKernelObjectSecurity';
-function ImpersonateNamedPipeClient; external advapi32 name 'ImpersonateNamedPipeClient';
-function ImpersonateSelf; external advapi32 name 'ImpersonateSelf';
-function RevertToSelf; external advapi32 name 'RevertToSelf';
-function SetThreadToken; external advapi32 name 'SetThreadToken';
-function AccessCheck; external advapi32 name 'AccessCheck';
-function AccessCheckByType; external advapi32 name 'AccessCheckByType';
-function AccessCheckByTypeResultList; external advapi32 name 'AccessCheckByTypeResultList';
-function OpenProcessToken; external advapi32 name 'OpenProcessToken';
-function OpenThreadToken; external advapi32 name 'OpenThreadToken';
-function GetTokenInformation; external advapi32 name 'GetTokenInformation';
-function SetTokenInformation; external advapi32 name 'SetTokenInformation';
-function AdjustTokenPrivileges; external advapi32 name 'AdjustTokenPrivileges';
-function AdjustTokenGroups; external advapi32 name 'AdjustTokenGroups';
-function PrivilegeCheck; external advapi32 name 'PrivilegeCheck';
-function AccessCheckAndAuditAlarmA; external advapi32 name 'AccessCheckAndAuditAlarmA';
-function AccessCheckAndAuditAlarmW; external advapi32 name 'AccessCheckAndAuditAlarmW';
-function AccessCheckAndAuditAlarm; external advapi32 name 'AccessCheckAndAuditAlarm' + AWSuffix;
-function AccessCheckByTypeAndAuditAlarmA; external advapi32 name 'AccessCheckByTypeAndAuditAlarmA';
-function AccessCheckByTypeAndAuditAlarmW; external advapi32 name 'AccessCheckByTypeAndAuditAlarmW';
-function AccessCheckByTypeAndAuditAlarm; external advapi32 name 'AccessCheckByTypeAndAuditAlarm' + AWSuffix;
-function AccessCheckByTypeResultListAndAuditAlarmA; external advapi32 name 'AccessCheckByTypeResultListAndAuditAlarmA';
-function AccessCheckByTypeResultListAndAuditAlarmW; external advapi32 name 'AccessCheckByTypeResultListAndAuditAlarmW';
-function AccessCheckByTypeResultListAndAuditAlarm; external advapi32 name 'AccessCheckByTypeResultListAndAuditAlarm' + AWSuffix;
-function AccessCheckByTypeResultListAndAuditAlarmByHandleA; external advapi32 name 'AccessCheckByTypeResultListAndAuditAlarmByHandleA';
-function AccessCheckByTypeResultListAndAuditAlarmByHandleW; external advapi32 name 'AccessCheckByTypeResultListAndAuditAlarmByHandleW';
-function AccessCheckByTypeResultListAndAuditAlarmByHandle; external advapi32 name 'AccessCheckByTypeResultListAndAuditAlarmByHandle' + AWSuffix;
-function ObjectOpenAuditAlarmA; external advapi32 name 'ObjectOpenAuditAlarmA';
-function ObjectOpenAuditAlarmW; external advapi32 name 'ObjectOpenAuditAlarmW';
-function ObjectOpenAuditAlarm; external advapi32 name 'ObjectOpenAuditAlarm' + AWSuffix;
-function ObjectPrivilegeAuditAlarmA; external advapi32 name 'ObjectPrivilegeAuditAlarmA';
-function ObjectPrivilegeAuditAlarmW; external advapi32 name 'ObjectPrivilegeAuditAlarmW';
-function ObjectPrivilegeAuditAlarm; external advapi32 name 'ObjectPrivilegeAuditAlarm' + AWSuffix;
-function ObjectCloseAuditAlarmA; external advapi32 name 'ObjectCloseAuditAlarmA';
-function ObjectCloseAuditAlarmW; external advapi32 name 'ObjectCloseAuditAlarmW';
-function ObjectCloseAuditAlarm; external advapi32 name 'ObjectCloseAuditAlarm' + AWSuffix;
-function ObjectDeleteAuditAlarmA; external advapi32 name 'ObjectDeleteAuditAlarmA';
-function ObjectDeleteAuditAlarmW; external advapi32 name 'ObjectDeleteAuditAlarmW';
-function ObjectDeleteAuditAlarm; external advapi32 name 'ObjectDeleteAuditAlarm' + AWSuffix;
-function PrivilegedServiceAuditAlarmA; external advapi32 name 'PrivilegedServiceAuditAlarmA';
-function PrivilegedServiceAuditAlarmW; external advapi32 name 'PrivilegedServiceAuditAlarmW';
-function PrivilegedServiceAuditAlarm; external advapi32 name 'PrivilegedServiceAuditAlarm' + AWSuffix;
-function IsWellKnownSid; external advapi32 name 'IsWellKnownSid';
-function CreateWellKnownSid; external advapi32 name 'CreateWellKnownSid';
-function EqualDomainSid; external advapi32 name 'EqualDomainSid';
-function GetWindowsAccountDomainSid; external advapi32 name 'GetWindowsAccountDomainSid';
-function IsValidSid; external advapi32 name 'IsValidSid';
-function EqualSid; external advapi32 name 'EqualSid';
-function EqualPrefixSid; external advapi32 name 'EqualPrefixSid';
-function GetSidLengthRequired; external advapi32 name 'GetSidLengthRequired';
-function AllocateAndInitializeSid; external advapi32 name 'AllocateAndInitializeSid';
-function FreeSid; external advapi32 name 'FreeSid';
-function InitializeSid; external advapi32 name 'InitializeSid';
-function GetSidIdentifierAuthority; external advapi32 name 'GetSidIdentifierAuthority';
-function GetSidSubAuthority; external advapi32 name 'GetSidSubAuthority';
-function GetSidSubAuthorityCount; external advapi32 name 'GetSidSubAuthorityCount';
-function GetLengthSid; external advapi32 name 'GetLengthSid';
-function CopySid; external advapi32 name 'CopySid';
-function AreAllAccessesGranted; external advapi32 name 'AreAllAccessesGranted';
-function AreAnyAccessesGranted; external advapi32 name 'AreAnyAccessesGranted';
-procedure MapGenericMask; external advapi32 name 'MapGenericMask';
-function IsValidAcl; external advapi32 name 'IsValidAcl';
-function InitializeAcl; external advapi32 name 'InitializeAcl';
-function GetAclInformation; external advapi32 name 'GetAclInformation';
-function SetAclInformation; external advapi32 name 'SetAclInformation';
-function AddAce; external advapi32 name 'AddAce';
-function DeleteAce; external advapi32 name 'DeleteAce';
-function GetAce; external advapi32 name 'GetAce';
-function AddAccessAllowedAce; external advapi32 name 'AddAccessAllowedAce';
-function AddAccessAllowedAceEx; external advapi32 name 'AddAccessAllowedAceEx';
-function AddAccessDeniedAce; external advapi32 name 'AddAccessDeniedAce';
-function AddAccessDeniedAceEx; external advapi32 name 'AddAccessDeniedAceEx';
-function AddAuditAccessAce; external advapi32 name 'AddAuditAccessAce';
-function AddAuditAccessAceEx; external advapi32 name 'AddAuditAccessAceEx';
-function AddAccessAllowedObjectAce; external advapi32 name 'AddAccessAllowedObjectAce';
-function AddAccessDeniedObjectAce; external advapi32 name 'AddAccessDeniedObjectAce';
-function AddAuditAccessObjectAce; external advapi32 name 'AddAuditAccessObjectAce';
-function FindFirstFreeAce; external advapi32 name 'FindFirstFreeAce';
-function InitializeSecurityDescriptor; external advapi32 name 'InitializeSecurityDescriptor';
-function IsValidSecurityDescriptor; external advapi32 name 'IsValidSecurityDescriptor';
-function GetSecurityDescriptorLength; external advapi32 name 'GetSecurityDescriptorLength';
-function GetSecurityDescriptorControl; external advapi32 name 'GetSecurityDescriptorControl';
-function SetSecurityDescriptorControl; external advapi32 name 'SetSecurityDescriptorControl';
-function SetSecurityDescriptorDacl; external advapi32 name 'SetSecurityDescriptorDacl';
-function GetSecurityDescriptorDacl; external advapi32 name 'GetSecurityDescriptorDacl';
-function SetSecurityDescriptorSacl; external advapi32 name 'SetSecurityDescriptorSacl';
-function GetSecurityDescriptorSacl; external advapi32 name 'GetSecurityDescriptorSacl';
-function SetSecurityDescriptorOwner; external advapi32 name 'SetSecurityDescriptorOwner';
-function GetSecurityDescriptorOwner; external advapi32 name 'GetSecurityDescriptorOwner';
-function SetSecurityDescriptorGroup; external advapi32 name 'SetSecurityDescriptorGroup';
-function GetSecurityDescriptorGroup; external advapi32 name 'GetSecurityDescriptorGroup';
-function SetSecurityDescriptorRMControl; external advapi32 name 'SetSecurityDescriptorRMControl';
-function GetSecurityDescriptorRMControl; external advapi32 name 'GetSecurityDescriptorRMControl';
-function CreatePrivateObjectSecurity; external advapi32 name 'CreatePrivateObjectSecurity';
-function ConvertToAutoInheritPrivateObjectSecurity; external advapi32 name 'ConvertToAutoInheritPrivateObjectSecurity';
-function CreatePrivateObjectSecurityEx; external advapi32 name 'CreatePrivateObjectSecurityEx';
-function SetPrivateObjectSecurity; external advapi32 name 'SetPrivateObjectSecurity';
-function SetPrivateObjectSecurityEx; external advapi32 name 'SetPrivateObjectSecurityEx';
-function GetPrivateObjectSecurity; external advapi32 name 'GetPrivateObjectSecurity';
-function DestroyPrivateObjectSecurity; external advapi32 name 'DestroyPrivateObjectSecurity';
-function MakeSelfRelativeSD; external advapi32 name 'MakeSelfRelativeSD';
-function MakeAbsoluteSD; external advapi32 name 'MakeAbsoluteSD';
-function MakeAbsoluteSD2; external advapi32 name 'MakeAbsoluteSD2';
-function SetFileSecurityA; external advapi32 name 'SetFileSecurityA';
-function SetFileSecurityW; external advapi32 name 'SetFileSecurityW';
-function SetFileSecurity; external advapi32 name 'SetFileSecurity' + AWSuffix;
-function GetFileSecurityA; external advapi32 name 'GetFileSecurityA';
-function GetFileSecurityW; external advapi32 name 'GetFileSecurityW';
-function GetFileSecurity; external advapi32 name 'GetFileSecurity' + AWSuffix;
-function SetKernelObjectSecurity; external advapi32 name 'SetKernelObjectSecurity';
-function FindFirstChangeNotificationA; external kernel32 name 'FindFirstChangeNotificationA';
-function FindFirstChangeNotificationW; external kernel32 name 'FindFirstChangeNotificationW';
-function FindFirstChangeNotification; external kernel32 name 'FindFirstChangeNotification' + AWSuffix;
-function FindNextChangeNotification; external kernel32 name 'FindNextChangeNotification';
-function FindCloseChangeNotification; external kernel32 name 'FindCloseChangeNotification';
-function ReadDirectoryChangesW; external kernel32 name 'ReadDirectoryChangesW';
-function VirtualLock; external kernel32 name 'VirtualLock';
-function VirtualUnlock; external kernel32 name 'VirtualUnlock';
-function MapViewOfFileEx; external kernel32 name 'MapViewOfFileEx';
-function SetPriorityClass; external kernel32 name 'SetPriorityClass';
-function GetPriorityClass; external kernel32 name 'GetPriorityClass';
-function IsBadReadPtr; external kernel32 name 'IsBadReadPtr';
-function IsBadWritePtr; external kernel32 name 'IsBadWritePtr';
-function IsBadHugeReadPtr; external kernel32 name 'IsBadHugeReadPtr';
-function IsBadHugeWritePtr; external kernel32 name 'IsBadHugeWritePtr';
-function IsBadCodePtr; external kernel32 name 'IsBadCodePtr';
-function IsBadStringPtrA; external kernel32 name 'IsBadStringPtrA';
-function IsBadStringPtrW; external kernel32 name 'IsBadStringPtrW';
-function IsBadStringPtr; external kernel32 name 'IsBadStringPtr' + AWSuffix;
-function LookupAccountSidA; external advapi32 name 'LookupAccountSidA';
-function LookupAccountSidW; external advapi32 name 'LookupAccountSidW';
-function LookupAccountSid; external advapi32 name 'LookupAccountSid' + AWSuffix;
-function LookupAccountNameA; external advapi32 name 'LookupAccountNameA';
-function LookupAccountNameW; external advapi32 name 'LookupAccountNameW';
-function LookupAccountName; external advapi32 name 'LookupAccountName' + AWSuffix;
-function LookupPrivilegeValueA; external advapi32 name 'LookupPrivilegeValueA';
-function LookupPrivilegeValueW; external advapi32 name 'LookupPrivilegeValueW';
-function LookupPrivilegeValue; external advapi32 name 'LookupPrivilegeValue' + AWSuffix;
-function LookupPrivilegeNameA; external advapi32 name 'LookupPrivilegeNameA';
-function LookupPrivilegeNameW; external advapi32 name 'LookupPrivilegeNameW';
-function LookupPrivilegeName; external advapi32 name 'LookupPrivilegeName' + AWSuffix;
-function LookupPrivilegeDisplayNameA; external advapi32 name 'LookupPrivilegeDisplayNameA';
-function LookupPrivilegeDisplayNameW; external advapi32 name 'LookupPrivilegeDisplayNameW';
-function LookupPrivilegeDisplayName; external advapi32 name 'LookupPrivilegeDisplayName' + AWSuffix;
-function AllocateLocallyUniqueId; external advapi32 name 'AllocateLocallyUniqueId';
-function BuildCommDCBA; external kernel32 name 'BuildCommDCBA';
-function BuildCommDCBW; external kernel32 name 'BuildCommDCBW';
-function BuildCommDCB; external kernel32 name 'BuildCommDCB' + AWSuffix;
-function BuildCommDCBAndTimeoutsA; external kernel32 name 'BuildCommDCBAndTimeoutsA';
-function BuildCommDCBAndTimeoutsW; external kernel32 name 'BuildCommDCBAndTimeoutsW';
-function BuildCommDCBAndTimeouts; external kernel32 name 'BuildCommDCBAndTimeouts' + AWSuffix;
-function CommConfigDialogA; external kernel32 name 'CommConfigDialogA';
-function CommConfigDialogW; external kernel32 name 'CommConfigDialogW';
-function CommConfigDialog; external kernel32 name 'CommConfigDialog' + AWSuffix;
-function GetDefaultCommConfigA; external kernel32 name 'GetDefaultCommConfigA';
-function GetDefaultCommConfigW; external kernel32 name 'GetDefaultCommConfigW';
-function GetDefaultCommConfig; external kernel32 name 'GetDefaultCommConfig' + AWSuffix;
-function SetDefaultCommConfigA; external kernel32 name 'SetDefaultCommConfigA';
-function SetDefaultCommConfigW; external kernel32 name 'SetDefaultCommConfigW';
-function SetDefaultCommConfig; external kernel32 name 'SetDefaultCommConfig' + AWSuffix;
-function GetComputerNameA; external kernel32 name 'GetComputerNameA';
-function GetComputerNameW; external kernel32 name 'GetComputerNameW';
-function GetComputerName; external kernel32 name 'GetComputerName' + AWSuffix;
-function SetComputerNameA; external kernel32 name 'SetComputerNameA';
-function SetComputerNameW; external kernel32 name 'SetComputerNameW';
-function SetComputerName; external kernel32 name 'SetComputerName' + AWSuffix;
-function GetComputerNameExA; external kernel32 name 'GetComputerNameExA';
-function GetComputerNameExW; external kernel32 name 'GetComputerNameExW';
-function GetComputerNameEx; external kernel32 name 'GetComputerNameEx' + AWSuffix;
-function SetComputerNameExA; external kernel32 name 'SetComputerNameExA';
-function SetComputerNameExW; external kernel32 name 'SetComputerNameExW';
-function SetComputerNameEx; external kernel32 name 'SetComputerNameEx' + AWSuffix;
-function DnsHostnameToComputerNameA; external kernel32 name 'DnsHostnameToComputerNameA';
-function DnsHostnameToComputerNameW; external kernel32 name 'DnsHostnameToComputerNameW';
-function DnsHostnameToComputerName; external kernel32 name 'DnsHostnameToComputerName' + AWSuffix;
-function GetUserNameA; external advapi32 name 'GetUserNameA';
-function GetUserNameW; external advapi32 name 'GetUserNameW';
-function GetUserName; external advapi32 name 'GetUserName' + AWSuffix;
-function LogonUserA; external advapi32 name 'LogonUserA';
-function LogonUserW; external advapi32 name 'LogonUserW';
-function LogonUser; external advapi32 name 'LogonUser' + AWSuffix;
-function LogonUserExA; external advapi32 name 'LogonUserExA';
-function LogonUserExW; external advapi32 name 'LogonUserExW';
-function LogonUserEx; external advapi32 name 'LogonUserEx' + AWSuffix;
-function ImpersonateLoggedOnUser; external advapi32 name 'ImpersonateLoggedOnUser';
-function CreateProcessAsUserA; external advapi32 name 'CreateProcessAsUserA';
-function CreateProcessAsUserW; external advapi32 name 'CreateProcessAsUserW';
-function CreateProcessAsUser; external advapi32 name 'CreateProcessAsUser' + AWSuffix;
-function CreateProcessWithLogonW; external advapi32 name 'CreateProcessWithLogonW';
-function CreateProcessWithTokenW; external advapi32 name 'CreateProcessWithTokenW';
-function ImpersonateAnonymousToken; external advapi32 name 'ImpersonateAnonymousToken';
-function DuplicateTokenEx; external advapi32 name 'DuplicateTokenEx';
-function CreateRestrictedToken; external advapi32 name 'CreateRestrictedToken';
-function IsTokenRestricted; external advapi32 name 'IsTokenRestricted';
-function CheckTokenMembership; external advapi32 name 'CheckTokenMembership';
-function IsTokenUntrusted; external advapi32 name 'IsTokenUntrusted';
-function RegisterWaitForSingleObject; external kernel32 name 'RegisterWaitForSingleObject';
-function RegisterWaitForSingleObjectEx; external kernel32 name 'RegisterWaitForSingleObjectEx';
-function UnregisterWait; external kernel32 name 'UnregisterWait';
-function UnregisterWaitEx; external kernel32 name 'UnregisterWaitEx';
-function QueueUserWorkItem; external kernel32 name 'QueueUserWorkItem';
-function BindIoCompletionCallback; external kernel32 name 'BindIoCompletionCallback';
-function CreateTimerQueue; external kernel32 name 'CreateTimerQueue';
-function CreateTimerQueueTimer; external kernel32 name 'CreateTimerQueueTimer';
-function ChangeTimerQueueTimer; external kernel32 name 'ChangeTimerQueueTimer';
-function DeleteTimerQueueTimer; external kernel32 name 'DeleteTimerQueueTimer';
-function DeleteTimerQueueEx; external kernel32 name 'DeleteTimerQueueEx';
-function SetTimerQueueTimer; external kernel32 name 'SetTimerQueueTimer';
-function CancelTimerQueueTimer; external kernel32 name 'CancelTimerQueueTimer';
-function DeleteTimerQueue; external kernel32 name 'DeleteTimerQueue';
-function GetCurrentHwProfileA; external advapi32 name 'GetCurrentHwProfileA';
-function GetCurrentHwProfileW; external advapi32 name 'GetCurrentHwProfileW';
-function GetCurrentHwProfile; external advapi32 name 'GetCurrentHwProfile' + AWSuffix;
-function QueryPerformanceCounter; external kernel32 name 'QueryPerformanceCounter';
-function QueryPerformanceFrequency; external kernel32 name 'QueryPerformanceFrequency';
-function GetVersionExA; external kernel32 name 'GetVersionExA';
-function GetVersionExW; external kernel32 name 'GetVersionExW';
-function GetVersionEx; external kernel32 name 'GetVersionEx' + AWSuffix;
-function VerifyVersionInfoA; external kernel32 name 'VerifyVersionInfoA';
-function VerifyVersionInfoW; external kernel32 name 'VerifyVersionInfoW';
-function VerifyVersionInfo; external kernel32 name 'VerifyVersionInfo' + AWSuffix;
-function GetSystemPowerStatus; external kernel32 name 'GetSystemPowerStatus';
-function SetSystemPowerState; external kernel32 name 'SetSystemPowerState';
-function AllocateUserPhysicalPages; external kernel32 name 'AllocateUserPhysicalPages';
-function FreeUserPhysicalPages; external kernel32 name 'FreeUserPhysicalPages';
-function MapUserPhysicalPages; external kernel32 name 'MapUserPhysicalPages';
-function MapUserPhysicalPagesScatter; external kernel32 name 'MapUserPhysicalPagesScatter';
-function CreateJobObjectA; external kernel32 name 'CreateJobObjectA';
-function CreateJobObjectW; external kernel32 name 'CreateJobObjectW';
-function CreateJobObject; external kernel32 name 'CreateJobObject' + AWSuffix;
-function OpenJobObjectA; external kernel32 name 'OpenJobObjectA';
-function OpenJobObjectW; external kernel32 name 'OpenJobObjectW';
-function OpenJobObject; external kernel32 name 'OpenJobObject' + AWSuffix;
-function AssignProcessToJobObject; external kernel32 name 'AssignProcessToJobObject';
-function TerminateJobObject; external kernel32 name 'TerminateJobObject';
-function QueryInformationJobObject; external kernel32 name 'QueryInformationJobObject';
-function SetInformationJobObject; external kernel32 name 'SetInformationJobObject';
-function IsProcessInJob; external kernel32 name 'IsProcessInJob';
-function CreateJobSet; external kernel32 name 'CreateJobSet';
-function AddVectoredExceptionHandler; external kernel32 name 'AddVectoredExceptionHandler';
-function RemoveVectoredExceptionHandler; external kernel32 name 'RemoveVectoredExceptionHandler';
-function FindFirstVolumeA; external kernel32 name 'FindFirstVolumeA';
-function FindFirstVolumeW; external kernel32 name 'FindFirstVolumeW';
-function FindFirstVolume; external kernel32 name 'FindFirstVolume' + AWSuffix;
-function FindNextVolumeA; external kernel32 name 'FindNextVolumeA';
-function FindNextVolumeW; external kernel32 name 'FindNextVolumeW';
-function FindNextVolume; external kernel32 name 'FindNextVolume' + AWSuffix;
-function FindVolumeClose; external kernel32 name 'FindVolumeClose';
-function FindFirstVolumeMountPointA; external kernel32 name 'FindFirstVolumeMountPointA';
-function FindFirstVolumeMountPointW; external kernel32 name 'FindFirstVolumeMountPointW';
-function FindFirstVolumeMountPoint; external kernel32 name 'FindFirstVolumeMountPoint' + AWSuffix;
-function FindNextVolumeMountPointA; external kernel32 name 'FindNextVolumeMountPointA';
-function FindNextVolumeMountPointW; external kernel32 name 'FindNextVolumeMountPointW';
-function FindNextVolumeMountPoint; external kernel32 name 'FindNextVolumeMountPoint' + AWSuffix;
-function FindVolumeMountPointClose; external kernel32 name 'FindVolumeMountPointClose';
-function SetVolumeMountPointA; external kernel32 name 'SetVolumeMountPointA';
-function SetVolumeMountPointW; external kernel32 name 'SetVolumeMountPointW';
-function SetVolumeMountPoint; external kernel32 name 'SetVolumeMountPoint' + AWSuffix;
-function DeleteVolumeMountPointA; external kernel32 name 'DeleteVolumeMountPointA';
-function DeleteVolumeMountPointW; external kernel32 name 'DeleteVolumeMountPointW';
-function DeleteVolumeMountPoint; external kernel32 name 'DeleteVolumeMountPoint' + AWSuffix;
-function GetVolumeNameForVolumeMountPointA; external kernel32 name 'GetVolumeNameForVolumeMountPointA';
-function GetVolumeNameForVolumeMountPointW; external kernel32 name 'GetVolumeNameForVolumeMountPointW';
-function GetVolumeNameForVolumeMountPoint; external kernel32 name 'GetVolumeNameForVolumeMountPoint' + AWSuffix;
-function GetVolumePathNameA; external kernel32 name 'GetVolumePathNameA';
-function GetVolumePathNameW; external kernel32 name 'GetVolumePathNameW';
-function GetVolumePathName; external kernel32 name 'GetVolumePathName' + AWSuffix;
-function GetVolumePathNamesForVolumeNameA; external kernel32 name 'GetVolumePathNamesForVolumeNameA';
-function GetVolumePathNamesForVolumeNameW; external kernel32 name 'GetVolumePathNamesForVolumeNameW';
-function GetVolumePathNamesForVolumeName; external kernel32 name 'GetVolumePathNamesForVolumeName' + AWSuffix;
-function CreateActCtxA; external kernel32 name 'CreateActCtxA';
-function CreateActCtxW; external kernel32 name 'CreateActCtxW';
-function CreateActCtx; external kernel32 name 'CreateActCtx' + AWSuffix;
-procedure AddRefActCtx; external kernel32 name 'AddRefActCtx';
-procedure ReleaseActCtx; external kernel32 name 'ReleaseActCtx';
-function ZombifyActCtx; external kernel32 name 'ZombifyActCtx';
-function ActivateActCtx; external kernel32 name 'ActivateActCtx';
-function DeactivateActCtx; external kernel32 name 'DeactivateActCtx';
-function GetCurrentActCtx; external kernel32 name 'GetCurrentActCtx';
-function FindActCtxSectionStringA; external kernel32 name 'FindActCtxSectionStringA';
-function FindActCtxSectionStringW; external kernel32 name 'FindActCtxSectionStringW';
-function FindActCtxSectionString; external kernel32 name 'FindActCtxSectionString' + AWSuffix;
-function FindActCtxSectionGuid; external kernel32 name 'FindActCtxSectionGuid';
-function QueryActCtxW; external kernel32 name 'QueryActCtxW';
-function ProcessIdToSessionId; external kernel32 name 'ProcessIdToSessionId';
-function WTSGetActiveConsoleSessionId; external kernel32 name 'WTSGetActiveConsoleSessionId';
-function IsWow64Process; external kernel32 name 'IsWow64Process';
-function GetLogicalProcessorInformation; external kernel32 name 'GetLogicalProcessorInformation';
-function GetNumaHighestNodeNumber; external kernel32 name 'GetNumaHighestNodeNumber';
-function GetNumaProcessorNode; external kernel32 name 'GetNumaProcessorNode';
-function GetNumaNodeProcessorMask; external kernel32 name 'GetNumaNodeProcessorMask';
-function GetNumaAvailableMemoryNode; external kernel32 name 'GetNumaAvailableMemoryNode';
-
-{$ENDIF DYNAMIC_LINK}
-
-end.
+{******************************************************************************}
+{ }
+{ Windows Base Services API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: winbase.h, released August 2001. The original Pascal }
+{ code is: WinBase.pas, released December 2000. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwawinbase.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
+
+unit JwaWinBase;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "WinBase.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+{$STACKFRAMES ON}
+
+interface
+
+uses
+ {$IFDEF USE_DELPHI_TYPES}
+ Windows,
+ {$ENDIF USE_DELPHI_TYPES}
+ JwaNtStatus, JwaWinNT, JwaWinType;
+
+const
+ INVALID_HANDLE_VALUE = HANDLE(-1);
+ {$EXTERNALSYM INVALID_HANDLE_VALUE}
+ INVALID_FILE_SIZE = DWORD($FFFFFFFF);
+ {$EXTERNALSYM INVALID_FILE_SIZE}
+ INVALID_SET_FILE_POINTER = DWORD(-1);
+ {$EXTERNALSYM INVALID_SET_FILE_POINTER}
+ INVALID_FILE_ATTRIBUTES = DWORD(-1);
+ {$EXTERNALSYM INVALID_FILE_ATTRIBUTES}
+
+ FILE_BEGIN = 0;
+ {$EXTERNALSYM FILE_BEGIN}
+ FILE_CURRENT = 1;
+ {$EXTERNALSYM FILE_CURRENT}
+ FILE_END = 2;
+ {$EXTERNALSYM FILE_END}
+
+ TIME_ZONE_ID_INVALID = DWORD($FFFFFFFF);
+ {$EXTERNALSYM TIME_ZONE_ID_INVALID}
+
+ WAIT_FAILED = DWORD($FFFFFFFF);
+ {$EXTERNALSYM WAIT_FAILED}
+ WAIT_OBJECT_0 = STATUS_WAIT_0 + 0;
+ {$EXTERNALSYM WAIT_OBJECT_0}
+
+ WAIT_ABANDONED = STATUS_ABANDONED_WAIT_0 + 0;
+ {$EXTERNALSYM WAIT_ABANDONED}
+ WAIT_ABANDONED_0 = STATUS_ABANDONED_WAIT_0 + 0;
+ {$EXTERNALSYM WAIT_ABANDONED_0}
+
+ WAIT_IO_COMPLETION = STATUS_USER_APC;
+ {$EXTERNALSYM WAIT_IO_COMPLETION}
+ STILL_ACTIVE = STATUS_PENDING;
+ {$EXTERNALSYM STILL_ACTIVE}
+ EXCEPTION_ACCESS_VIOLATION = STATUS_ACCESS_VIOLATION;
+ {$EXTERNALSYM EXCEPTION_ACCESS_VIOLATION}
+ EXCEPTION_DATATYPE_MISALIGNMENT = STATUS_DATATYPE_MISALIGNMENT;
+ {$EXTERNALSYM EXCEPTION_DATATYPE_MISALIGNMENT}
+ EXCEPTION_BREAKPOINT = STATUS_BREAKPOINT;
+ {$EXTERNALSYM EXCEPTION_BREAKPOINT}
+ EXCEPTION_SINGLE_STEP = STATUS_SINGLE_STEP;
+ {$EXTERNALSYM EXCEPTION_SINGLE_STEP}
+ EXCEPTION_ARRAY_BOUNDS_EXCEEDED = STATUS_ARRAY_BOUNDS_EXCEEDED;
+ {$EXTERNALSYM EXCEPTION_ARRAY_BOUNDS_EXCEEDED}
+ EXCEPTION_FLT_DENORMAL_OPERAND = STATUS_FLOAT_DENORMAL_OPERAND;
+ {$EXTERNALSYM EXCEPTION_FLT_DENORMAL_OPERAND}
+ EXCEPTION_FLT_DIVIDE_BY_ZERO = STATUS_FLOAT_DIVIDE_BY_ZERO;
+ {$EXTERNALSYM EXCEPTION_FLT_DIVIDE_BY_ZERO}
+ EXCEPTION_FLT_INEXACT_RESULT = STATUS_FLOAT_INEXACT_RESULT;
+ {$EXTERNALSYM EXCEPTION_FLT_INEXACT_RESULT}
+ EXCEPTION_FLT_INVALID_OPERATION = STATUS_FLOAT_INVALID_OPERATION;
+ {$EXTERNALSYM EXCEPTION_FLT_INVALID_OPERATION}
+ EXCEPTION_FLT_OVERFLOW = STATUS_FLOAT_OVERFLOW;
+ {$EXTERNALSYM EXCEPTION_FLT_OVERFLOW}
+ EXCEPTION_FLT_STACK_CHECK = STATUS_FLOAT_STACK_CHECK;
+ {$EXTERNALSYM EXCEPTION_FLT_STACK_CHECK}
+ EXCEPTION_FLT_UNDERFLOW = STATUS_FLOAT_UNDERFLOW;
+ {$EXTERNALSYM EXCEPTION_FLT_UNDERFLOW}
+ EXCEPTION_INT_DIVIDE_BY_ZERO = STATUS_INTEGER_DIVIDE_BY_ZERO;
+ {$EXTERNALSYM EXCEPTION_INT_DIVIDE_BY_ZERO}
+ EXCEPTION_INT_OVERFLOW = STATUS_INTEGER_OVERFLOW;
+ {$EXTERNALSYM EXCEPTION_INT_OVERFLOW}
+ EXCEPTION_PRIV_INSTRUCTION = STATUS_PRIVILEGED_INSTRUCTION;
+ {$EXTERNALSYM EXCEPTION_PRIV_INSTRUCTION}
+ EXCEPTION_IN_PAGE_ERROR = STATUS_IN_PAGE_ERROR;
+ {$EXTERNALSYM EXCEPTION_IN_PAGE_ERROR}
+ EXCEPTION_ILLEGAL_INSTRUCTION = STATUS_ILLEGAL_INSTRUCTION;
+ {$EXTERNALSYM EXCEPTION_ILLEGAL_INSTRUCTION}
+ EXCEPTION_NONCONTINUABLE_EXCEPTION = STATUS_NONCONTINUABLE_EXCEPTION;
+ {$EXTERNALSYM EXCEPTION_NONCONTINUABLE_EXCEPTION}
+ EXCEPTION_STACK_OVERFLOW = STATUS_STACK_OVERFLOW;
+ {$EXTERNALSYM EXCEPTION_STACK_OVERFLOW}
+ EXCEPTION_INVALID_DISPOSITION = STATUS_INVALID_DISPOSITION;
+ {$EXTERNALSYM EXCEPTION_INVALID_DISPOSITION}
+ EXCEPTION_GUARD_PAGE = STATUS_GUARD_PAGE_VIOLATION;
+ {$EXTERNALSYM EXCEPTION_GUARD_PAGE}
+ EXCEPTION_INVALID_HANDLE = STATUS_INVALID_HANDLE;
+ {$EXTERNALSYM EXCEPTION_INVALID_HANDLE}
+ EXCEPTION_POSSIBLE_DEADLOCK = STATUS_POSSIBLE_DEADLOCK;
+ {$EXTERNALSYM EXCEPTION_POSSIBLE_DEADLOCK}
+ CONTROL_C_EXIT = STATUS_CONTROL_C_EXIT;
+ {$EXTERNALSYM CONTROL_C_EXIT}
+
+procedure MoveMemory(Destination, Source: PVOID; Length: SIZE_T);
+{$EXTERNALSYM MoveMemory}
+procedure CopyMemory(Destination, Source: PVOID; Length: SIZE_T);
+{$EXTERNALSYM CopyMemory}
+procedure FillMemory(Destination: PVOID; Length: SIZE_T; Fill: BYTE);
+{$EXTERNALSYM FillMemory}
+procedure ZeroMemory(Destination: PVOID; Length: SIZE_T);
+{$EXTERNALSYM ZeroMemory}
+//#define SecureZeroMemory RtlSecureZeroMemory TODO
+
+//
+// File creation flags must start at the high end since they
+// are combined with the attributes
+//
+
+const
+ FILE_FLAG_WRITE_THROUGH = DWORD($80000000);
+ {$EXTERNALSYM FILE_FLAG_WRITE_THROUGH}
+ FILE_FLAG_OVERLAPPED = $40000000;
+ {$EXTERNALSYM FILE_FLAG_OVERLAPPED}
+ FILE_FLAG_NO_BUFFERING = $20000000;
+ {$EXTERNALSYM FILE_FLAG_NO_BUFFERING}
+ FILE_FLAG_RANDOM_ACCESS = $10000000;
+ {$EXTERNALSYM FILE_FLAG_RANDOM_ACCESS}
+ FILE_FLAG_SEQUENTIAL_SCAN = $08000000;
+ {$EXTERNALSYM FILE_FLAG_SEQUENTIAL_SCAN}
+ FILE_FLAG_DELETE_ON_CLOSE = $04000000;
+ {$EXTERNALSYM FILE_FLAG_DELETE_ON_CLOSE}
+ FILE_FLAG_BACKUP_SEMANTICS = $02000000;
+ {$EXTERNALSYM FILE_FLAG_BACKUP_SEMANTICS}
+ FILE_FLAG_POSIX_SEMANTICS = $01000000;
+ {$EXTERNALSYM FILE_FLAG_POSIX_SEMANTICS}
+ FILE_FLAG_OPEN_REPARSE_POINT = $00200000;
+ {$EXTERNALSYM FILE_FLAG_OPEN_REPARSE_POINT}
+ FILE_FLAG_OPEN_NO_RECALL = $00100000;
+ {$EXTERNALSYM FILE_FLAG_OPEN_NO_RECALL}
+ FILE_FLAG_FIRST_PIPE_INSTANCE = $00080000;
+ {$EXTERNALSYM FILE_FLAG_FIRST_PIPE_INSTANCE}
+
+ CREATE_NEW = 1;
+ {$EXTERNALSYM CREATE_NEW}
+ CREATE_ALWAYS = 2;
+ {$EXTERNALSYM CREATE_ALWAYS}
+ OPEN_EXISTING = 3;
+ {$EXTERNALSYM OPEN_EXISTING}
+ OPEN_ALWAYS = 4;
+ {$EXTERNALSYM OPEN_ALWAYS}
+ TRUNCATE_EXISTING = 5;
+ {$EXTERNALSYM TRUNCATE_EXISTING}
+
+//
+// Define possible return codes from the CopyFileEx callback routine
+//
+
+ PROGRESS_CONTINUE = 0;
+ {$EXTERNALSYM PROGRESS_CONTINUE}
+ PROGRESS_CANCEL = 1;
+ {$EXTERNALSYM PROGRESS_CANCEL}
+ PROGRESS_STOP = 2;
+ {$EXTERNALSYM PROGRESS_STOP}
+ PROGRESS_QUIET = 3;
+ {$EXTERNALSYM PROGRESS_QUIET}
+
+//
+// Define CopyFileEx callback routine state change values
+//
+
+ CALLBACK_CHUNK_FINISHED = $00000000;
+ {$EXTERNALSYM CALLBACK_CHUNK_FINISHED}
+ CALLBACK_STREAM_SWITCH = $00000001;
+ {$EXTERNALSYM CALLBACK_STREAM_SWITCH}
+
+//
+// Define CopyFileEx option flags
+//
+
+ COPY_FILE_FAIL_IF_EXISTS = $00000001;
+ {$EXTERNALSYM COPY_FILE_FAIL_IF_EXISTS}
+ COPY_FILE_RESTARTABLE = $00000002;
+ {$EXTERNALSYM COPY_FILE_RESTARTABLE}
+ COPY_FILE_OPEN_SOURCE_FOR_WRITE = $00000004;
+ {$EXTERNALSYM COPY_FILE_OPEN_SOURCE_FOR_WRITE}
+ COPY_FILE_ALLOW_DECRYPTED_DESTINATION = $00000008;
+ {$EXTERNALSYM COPY_FILE_ALLOW_DECRYPTED_DESTINATION}
+
+//
+// Define ReplaceFile option flags
+//
+
+ REPLACEFILE_WRITE_THROUGH = $00000001;
+ {$EXTERNALSYM REPLACEFILE_WRITE_THROUGH}
+ REPLACEFILE_IGNORE_MERGE_ERRORS = $00000002;
+ {$EXTERNALSYM REPLACEFILE_IGNORE_MERGE_ERRORS}
+
+//
+// Define the NamedPipe definitions
+//
+
+//
+// Define the dwOpenMode values for CreateNamedPipe
+//
+
+ PIPE_ACCESS_INBOUND = $00000001;
+ {$EXTERNALSYM PIPE_ACCESS_INBOUND}
+ PIPE_ACCESS_OUTBOUND = $00000002;
+ {$EXTERNALSYM PIPE_ACCESS_OUTBOUND}
+ PIPE_ACCESS_DUPLEX = $00000003;
+ {$EXTERNALSYM PIPE_ACCESS_DUPLEX}
+
+//
+// Define the Named Pipe End flags for GetNamedPipeInfo
+//
+
+ PIPE_CLIENT_END = $00000000;
+ {$EXTERNALSYM PIPE_CLIENT_END}
+ PIPE_SERVER_END = $00000001;
+ {$EXTERNALSYM PIPE_SERVER_END}
+
+//
+// Define the dwPipeMode values for CreateNamedPipe
+//
+
+ PIPE_WAIT = $00000000;
+ {$EXTERNALSYM PIPE_WAIT}
+ PIPE_NOWAIT = $00000001;
+ {$EXTERNALSYM PIPE_NOWAIT}
+ PIPE_READMODE_BYTE = $00000000;
+ {$EXTERNALSYM PIPE_READMODE_BYTE}
+ PIPE_READMODE_MESSAGE = $00000002;
+ {$EXTERNALSYM PIPE_READMODE_MESSAGE}
+ PIPE_TYPE_BYTE = $00000000;
+ {$EXTERNALSYM PIPE_TYPE_BYTE}
+ PIPE_TYPE_MESSAGE = $00000004;
+ {$EXTERNALSYM PIPE_TYPE_MESSAGE}
+
+//
+// Define the well known values for CreateNamedPipe nMaxInstances
+//
+
+ PIPE_UNLIMITED_INSTANCES = 255;
+ {$EXTERNALSYM PIPE_UNLIMITED_INSTANCES}
+
+//
+// Define the Security Quality of Service bits to be passed
+// into CreateFile
+//
+
+ SECURITY_ANONYMOUS = Ord(SecurityAnonymous) shl 16;
+ {$EXTERNALSYM SECURITY_ANONYMOUS}
+ SECURITY_IDENTIFICATION = Ord(SecurityIdentification) shl 16;
+ {$EXTERNALSYM SECURITY_IDENTIFICATION}
+ SECURITY_IMPERSONATION = Ord(SecurityImpersonation) shl 16;
+ {$EXTERNALSYM SECURITY_IMPERSONATION}
+ SECURITY_DELEGATION = Ord(SecurityDelegation) shl 16;
+ {$EXTERNALSYM SECURITY_DELEGATION}
+
+ SECURITY_CONTEXT_TRACKING = $00040000;
+ {$EXTERNALSYM SECURITY_CONTEXT_TRACKING}
+ SECURITY_EFFECTIVE_ONLY = $00080000;
+ {$EXTERNALSYM SECURITY_EFFECTIVE_ONLY}
+
+ SECURITY_SQOS_PRESENT = $00100000;
+ {$EXTERNALSYM SECURITY_SQOS_PRESENT}
+ SECURITY_VALID_SQOS_FLAGS = $001F0000;
+ {$EXTERNALSYM SECURITY_VALID_SQOS_FLAGS}
+
+//
+// File structures
+//
+
+type
+ LPOVERLAPPED = ^OVERLAPPED;
+ {$EXTERNALSYM LPOVERLAPPED}
+ _OVERLAPPED = record
+ Internal: ULONG_PTR;
+ InternalHigh: ULONG_PTR;
+ Union: record
+ case Integer of
+ 0: (
+ Offset: DWORD;
+ OffsetHigh: DWORD);
+ 1: (
+ Pointer: PVOID);
+ end;
+ hEvent: HANDLE;
+ end;
+ {$EXTERNALSYM _OVERLAPPED}
+ OVERLAPPED = _OVERLAPPED;
+ {$EXTERNALSYM OVERLAPPED}
+ TOverlapped = OVERLAPPED;
+ POverlapped = LPOVERLAPPED;
+
+ PSECURITY_ATTRIBUTES = ^SECURITY_ATTRIBUTES;
+ {$EXTERNALSYM PSECURITY_ATTRIBUTES}
+ _SECURITY_ATTRIBUTES = record
+ nLength: DWORD;
+ lpSecurityDescriptor: LPVOID;
+ bInheritHandle: BOOL;
+ end;
+ {$EXTERNALSYM _SECURITY_ATTRIBUTES}
+ SECURITY_ATTRIBUTES = _SECURITY_ATTRIBUTES;
+ {$EXTERNALSYM SECURITY_ATTRIBUTES}
+ LPSECURITY_ATTRIBUTES = ^SECURITY_ATTRIBUTES;
+ {$EXTERNALSYM LPSECURITY_ATTRIBUTES}
+ TSecurityAttributes = SECURITY_ATTRIBUTES;
+ PSecurityAttributes = PSECURITY_ATTRIBUTES;
+
+ PPROCESS_INFORMATION = ^PROCESS_INFORMATION;
+ {$EXTERNALSYM PPROCESS_INFORMATION}
+ _PROCESS_INFORMATION = record
+ hProcess: HANDLE;
+ hThread: HANDLE;
+ dwProcessId: DWORD;
+ dwThreadId: DWORD;
+ end;
+ {$EXTERNALSYM _PROCESS_INFORMATION}
+ PROCESS_INFORMATION = _PROCESS_INFORMATION;
+ {$EXTERNALSYM PROCESS_INFORMATION}
+ LPPROCESS_INFORMATION = ^PROCESS_INFORMATION;
+ {$EXTERNALSYM LPPROCESS_INFORMATION}
+ TProcessInformation = PROCESS_INFORMATION;
+ PProcessInformation = PPROCESS_INFORMATION;
+
+//
+// File System time stamps are represented with the following structure:
+//
+
+ LPFILETIME = ^FILETIME;
+ {$EXTERNALSYM LPFILETIME}
+ _FILETIME = record
+ dwLowDateTime: DWORD;
+ dwHighDateTime: DWORD;
+ end;
+ {$EXTERNALSYM _FILETIME}
+ FILETIME = _FILETIME;
+ {$EXTERNALSYM FILETIME}
+ TFileTime = FILETIME;
+ PFileTime = LPFILETIME;
+
+//
+// System time is represented with the following structure:
+//
+
+ LPSYSTEMTIME = ^SYSTEMTIME;
+ {$EXTERNALSYM LPSYSTEMTIME}
+ {$IFDEF USE_DELPHI_TYPES}
+ _SYSTEMTIME = Windows._SYSTEMTIME;
+ SYSTEMTIME = Windows.SYSTEMTIME;
+ TSystemTime = Windows.TSystemTime;
+ PSystemtime = Windows.PSystemTime;
+ {$ELSE}
+ _SYSTEMTIME = record
+ wYear: Word;
+ wMonth: Word;
+ wDayOfWeek: Word;
+ wDay: Word;
+ wHour: Word;
+ wMinute: Word;
+ wSecond: Word;
+ wMilliseconds: Word;
+ end;
+ {$EXTERNALSYM _SYSTEMTIME}
+ SYSTEMTIME = _SYSTEMTIME;
+ {$EXTERNALSYM SYSTEMTIME}
+ TSystemTime = SYSTEMTIME;
+ PSystemTime = LPSYSTEMTIME;
+ {$ENDIF USE_DELPHI_TYPES}
+
+ PTHREAD_START_ROUTINE = function(lpThreadParameter: LPVOID): DWORD; stdcall;
+ {$EXTERNALSYM PTHREAD_START_ROUTINE}
+ LPTHREAD_START_ROUTINE = PTHREAD_START_ROUTINE;
+ {$EXTERNALSYM LPTHREAD_START_ROUTINE}
+ TThreadStartRoutine = PTHREAD_START_ROUTINE;
+
+ PFIBER_START_ROUTINE = procedure(lpFiberParameter: LPVOID); stdcall;
+ {$EXTERNALSYM PFIBER_START_ROUTINE}
+ LPFIBER_START_ROUTINE = PFIBER_START_ROUTINE;
+ {$EXTERNALSYM LPFIBER_START_ROUTINE}
+ TFiberStartRoutine = PFIBER_START_ROUTINE;
+
+ CRITICAL_SECTION = RTL_CRITICAL_SECTION;
+ {$EXTERNALSYM CRITICAL_SECTION}
+ PCRITICAL_SECTION = PRTL_CRITICAL_SECTION;
+ {$EXTERNALSYM PCRITICAL_SECTION}
+ LPCRITICAL_SECTION = PRTL_CRITICAL_SECTION;
+ {$EXTERNALSYM LPCRITICAL_SECTION}
+ TCriticalSection = CRITICAL_SECTION;
+ PCriticalSection = PCRITICAL_SECTION;
+
+ CRITICAL_SECTION_DEBUG = RTL_CRITICAL_SECTION_DEBUG;
+ {$EXTERNALSYM CRITICAL_SECTION_DEBUG}
+ PCRITICAL_SECTION_DEBUG = PRTL_CRITICAL_SECTION_DEBUG;
+ {$EXTERNALSYM PCRITICAL_SECTION_DEBUG}
+ LPCRITICAL_SECTION_DEBUG = PRTL_CRITICAL_SECTION_DEBUG;
+ {$EXTERNALSYM LPCRITICAL_SECTION_DEBUG}
+ TCriticalSectionDebug = CRITICAL_SECTION_DEBUG;
+ PCriticalSectionDebug = PCRITICAL_SECTION_DEBUG;
+
+ LPLDT_ENTRY = PLDT_ENTRY;
+ {$EXTERNALSYM LPLDT_ENTRY}
+ PLdtEntry = LPLDT_ENTRY;
+
+const
+ MUTEX_MODIFY_STATE = MUTANT_QUERY_STATE;
+ {$EXTERNALSYM MUTEX_MODIFY_STATE}
+ MUTEX_ALL_ACCESS = MUTANT_ALL_ACCESS;
+ {$EXTERNALSYM MUTEX_ALL_ACCESS}
+
+//
+// Serial provider type.
+//
+
+ SP_SERIALCOMM = DWORD($00000001);
+ {$EXTERNALSYM SP_SERIALCOMM}
+
+//
+// Provider SubTypes
+//
+
+ PST_UNSPECIFIED = DWORD($00000000);
+ {$EXTERNALSYM PST_UNSPECIFIED}
+ PST_RS232 = DWORD($00000001);
+ {$EXTERNALSYM PST_RS232}
+ PST_PARALLELPORT = DWORD($00000002);
+ {$EXTERNALSYM PST_PARALLELPORT}
+ PST_RS422 = DWORD($00000003);
+ {$EXTERNALSYM PST_RS422}
+ PST_RS423 = DWORD($00000004);
+ {$EXTERNALSYM PST_RS423}
+ PST_RS449 = DWORD($00000005);
+ {$EXTERNALSYM PST_RS449}
+ PST_MODEM = DWORD($00000006);
+ {$EXTERNALSYM PST_MODEM}
+ PST_FAX = DWORD($00000021);
+ {$EXTERNALSYM PST_FAX}
+ PST_SCANNER = DWORD($00000022);
+ {$EXTERNALSYM PST_SCANNER}
+ PST_NETWORK_BRIDGE = DWORD($00000100);
+ {$EXTERNALSYM PST_NETWORK_BRIDGE}
+ PST_LAT = DWORD($00000101);
+ {$EXTERNALSYM PST_LAT}
+ PST_TCPIP_TELNET = DWORD($00000102);
+ {$EXTERNALSYM PST_TCPIP_TELNET}
+ PST_X25 = DWORD($00000103);
+ {$EXTERNALSYM PST_X25}
+
+//
+// Provider capabilities flags.
+//
+
+ PCF_DTRDSR = DWORD($0001);
+ {$EXTERNALSYM PCF_DTRDSR}
+ PCF_RTSCTS = DWORD($0002);
+ {$EXTERNALSYM PCF_RTSCTS}
+ PCF_RLSD = DWORD($0004);
+ {$EXTERNALSYM PCF_RLSD}
+ PCF_PARITY_CHECK = DWORD($0008);
+ {$EXTERNALSYM PCF_PARITY_CHECK}
+ PCF_XONXOFF = DWORD($0010);
+ {$EXTERNALSYM PCF_XONXOFF}
+ PCF_SETXCHAR = DWORD($0020);
+ {$EXTERNALSYM PCF_SETXCHAR}
+ PCF_TOTALTIMEOUTS = DWORD($0040);
+ {$EXTERNALSYM PCF_TOTALTIMEOUTS}
+ PCF_INTTIMEOUTS = DWORD($0080);
+ {$EXTERNALSYM PCF_INTTIMEOUTS}
+ PCF_SPECIALCHARS = DWORD($0100);
+ {$EXTERNALSYM PCF_SPECIALCHARS}
+ PCF_16BITMODE = DWORD($0200);
+ {$EXTERNALSYM PCF_16BITMODE}
+
+//
+// Comm provider settable parameters.
+//
+
+ SP_PARITY = DWORD($0001);
+ {$EXTERNALSYM SP_PARITY}
+ SP_BAUD = DWORD($0002);
+ {$EXTERNALSYM SP_BAUD}
+ SP_DATABITS = DWORD($0004);
+ {$EXTERNALSYM SP_DATABITS}
+ SP_STOPBITS = DWORD($0008);
+ {$EXTERNALSYM SP_STOPBITS}
+ SP_HANDSHAKING = DWORD($0010);
+ {$EXTERNALSYM SP_HANDSHAKING}
+ SP_PARITY_CHECK = DWORD($0020);
+ {$EXTERNALSYM SP_PARITY_CHECK}
+ SP_RLSD = DWORD($0040);
+ {$EXTERNALSYM SP_RLSD}
+
+//
+// Settable baud rates in the provider.
+//
+
+ BAUD_075 = DWORD($00000001);
+ {$EXTERNALSYM BAUD_075}
+ BAUD_110 = DWORD($00000002);
+ {$EXTERNALSYM BAUD_110}
+ BAUD_134_5 = DWORD($00000004);
+ {$EXTERNALSYM BAUD_134_5}
+ BAUD_150 = DWORD($00000008);
+ {$EXTERNALSYM BAUD_150}
+ BAUD_300 = DWORD($00000010);
+ {$EXTERNALSYM BAUD_300}
+ BAUD_600 = DWORD($00000020);
+ {$EXTERNALSYM BAUD_600}
+ BAUD_1200 = DWORD($00000040);
+ {$EXTERNALSYM BAUD_1200}
+ BAUD_1800 = DWORD($00000080);
+ {$EXTERNALSYM BAUD_1800}
+ BAUD_2400 = DWORD($00000100);
+ {$EXTERNALSYM BAUD_2400}
+ BAUD_4800 = DWORD($00000200);
+ {$EXTERNALSYM BAUD_4800}
+ BAUD_7200 = DWORD($00000400);
+ {$EXTERNALSYM BAUD_7200}
+ BAUD_9600 = DWORD($00000800);
+ {$EXTERNALSYM BAUD_9600}
+ BAUD_14400 = DWORD($00001000);
+ {$EXTERNALSYM BAUD_14400}
+ BAUD_19200 = DWORD($00002000);
+ {$EXTERNALSYM BAUD_19200}
+ BAUD_38400 = DWORD($00004000);
+ {$EXTERNALSYM BAUD_38400}
+ BAUD_56K = DWORD($00008000);
+ {$EXTERNALSYM BAUD_56K}
+ BAUD_128K = DWORD($00010000);
+ {$EXTERNALSYM BAUD_128K}
+ BAUD_115200 = DWORD($00020000);
+ {$EXTERNALSYM BAUD_115200}
+ BAUD_57600 = DWORD($00040000);
+ {$EXTERNALSYM BAUD_57600}
+ BAUD_USER = DWORD($10000000);
+ {$EXTERNALSYM BAUD_USER}
+
+//
+// Settable Data Bits
+//
+
+ DATABITS_5 = WORD($0001);
+ {$EXTERNALSYM DATABITS_5}
+ DATABITS_6 = WORD($0002);
+ {$EXTERNALSYM DATABITS_6}
+ DATABITS_7 = WORD($0004);
+ {$EXTERNALSYM DATABITS_7}
+ DATABITS_8 = WORD($0008);
+ {$EXTERNALSYM DATABITS_8}
+ DATABITS_16 = WORD($0010);
+ {$EXTERNALSYM DATABITS_16}
+ DATABITS_16X = WORD($0020);
+ {$EXTERNALSYM DATABITS_16X}
+
+//
+// Settable Stop and Parity bits.
+//
+
+ STOPBITS_10 = WORD($0001);
+ {$EXTERNALSYM STOPBITS_10}
+ STOPBITS_15 = WORD($0002);
+ {$EXTERNALSYM STOPBITS_15}
+ STOPBITS_20 = WORD($0004);
+ {$EXTERNALSYM STOPBITS_20}
+ PARITY_NONE = WORD($0100);
+ {$EXTERNALSYM PARITY_NONE}
+ PARITY_ODD = WORD($0200);
+ {$EXTERNALSYM PARITY_ODD}
+ PARITY_EVEN = WORD($0400);
+ {$EXTERNALSYM PARITY_EVEN}
+ PARITY_MARK = WORD($0800);
+ {$EXTERNALSYM PARITY_MARK}
+ PARITY_SPACE = WORD($1000);
+ {$EXTERNALSYM PARITY_SPACE}
+
+type
+ LPCOMMPROP = ^COMMPROP;
+ {$EXTERNALSYM LPCOMMPROP}
+ _COMMPROP = record
+ wPacketLength: Word;
+ wPacketVersion: Word;
+ dwServiceMask: DWORD;
+ dwReserved1: DWORD;
+ dwMaxTxQueue: DWORD;
+ dwMaxRxQueue: DWORD;
+ dwMaxBaud: DWORD;
+ dwProvSubType: DWORD;
+ dwProvCapabilities: DWORD;
+ dwSettableParams: DWORD;
+ dwSettableBaud: DWORD;
+ wSettableData: Word;
+ wSettableStopParity: Word;
+ dwCurrentTxQueue: DWORD;
+ dwCurrentRxQueue: DWORD;
+ dwProvSpec1: DWORD;
+ dwProvSpec2: DWORD;
+ wcProvChar: array [0..0] of WCHAR;
+ end;
+ {$EXTERNALSYM _COMMPROP}
+ COMMPROP = _COMMPROP;
+ {$EXTERNALSYM COMMPROP}
+ TCommProp = COMMPROP;
+ PCommProp = LPCOMMPROP;
+
+//
+// Set dwProvSpec1 to COMMPROP_INITIALIZED to indicate that wPacketLength
+// is valid before a call to GetCommProperties().
+//
+
+const
+ COMMPROP_INITIALIZED = DWORD($E73CF52E);
+ {$EXTERNALSYM COMMPROP_INITIALIZED}
+
+//_COMSTAT Flags (bitfield)
+
+ COMSTAT_CTS_HOLD = 1 shl 0;
+ COMSTAT_DSR_HOLD = 1 shl 1;
+ COMSTAT_RLSD_HOLD = 1 shl 2;
+ COMSTAT_XOFF_HOLD = 1 shl 3;
+ COMSTAT_XOFF_SENT = 1 shl 4;
+ COMSTAT_F_EOF = 1 shl 5;
+ COMSTAT_F_TXIM = 1 shl 6;
+
+type
+ LPCOMSTAT = ^COMSTAT;
+ {$EXTERNALSYM LPCOMSTAT}
+ _COMSTAT = record
+ Flags: DWORD;
+ cbInQue: DWORD;
+ cbOutQue: DWORD;
+ end;
+ {$EXTERNALSYM _COMSTAT}
+ COMSTAT = _COMSTAT;
+ {$EXTERNALSYM COMSTAT}
+ TComstat = COMSTAT;
+ PComstat = LPCOMSTAT;
+
+//
+// DTR Control Flow Values.
+//
+
+const
+ DTR_CONTROL_DISABLE = $00;
+ {$EXTERNALSYM DTR_CONTROL_DISABLE}
+ DTR_CONTROL_ENABLE = $01;
+ {$EXTERNALSYM DTR_CONTROL_ENABLE}
+ DTR_CONTROL_HANDSHAKE = $02;
+ {$EXTERNALSYM DTR_CONTROL_HANDSHAKE}
+
+//
+// RTS Control Flow Values
+//
+
+ RTS_CONTROL_DISABLE = $00;
+ {$EXTERNALSYM RTS_CONTROL_DISABLE}
+ RTS_CONTROL_ENABLE = $01;
+ {$EXTERNALSYM RTS_CONTROL_ENABLE}
+ RTS_CONTROL_HANDSHAKE = $02;
+ {$EXTERNALSYM RTS_CONTROL_HANDSHAKE}
+ RTS_CONTROL_TOGGLE = $03;
+ {$EXTERNALSYM RTS_CONTROL_TOGGLE}
+
+// _DCB.Flags
+
+const
+ fDcbBinary = 1 shl 0; // Binary Mode (skip EOF check)
+ fDcbParity = 1 shl 1; // Enable parity checking
+ fDcbOutxCtsFlow = 1 shl 2; // CTS handshaking on output
+ fDcbOutxDsrFlow = 1 shl 3; // DSR handshaking on output
+ fDcbDtrControl = $0030; // DTR Flow control
+ fDcbDsrSensitivity = 1 shl 6; // DSR Sensitivity
+ fDcbTXContinueOnXoff = 1 shl 7; // Continue TX when Xoff sent
+ fDcbOutX = 1 shl 8; // Enable output X-ON/X-OFF
+ fDcbInX = 1 shl 9; // Enable input X-ON/X-OFF
+ fDcbErrorChar = 1 shl 10; // Enable Err Replacement
+ fDcbNull = 1 shl 11; // Enable Null stripping
+ fDcbRtsControl = $3000; // Rts Flow control
+ fAbortOnError = 1 shl 14; // Abort all reads and writes on Error
+
+type
+ LPDCB = ^DCB;
+ {$EXTERNALSYM LPDCB}
+ _DCB = record
+ DCBlength: DWORD; // sizeof(DCB)
+ BaudRate: DWORD; // Baudrate at which running
+ Flags: DWORD; // See constants above
+ wReserved: WORD; // Not currently used
+ XonLim: WORD; // Transmit X-ON threshold
+ XoffLim: WORD; // Transmit X-OFF threshold
+ ByteSize: BYTE; // Number of bits/byte, 4-8
+ Parity: BYTE; // 0-4=None,Odd,Even,Mark,Space
+ StopBits: BYTE; // 0,1,2 = 1, 1.5, 2
+ XonChar: Char; // Tx and Rx X-ON character
+ XoffChar: Char; // Tx and Rx X-OFF character
+ ErrorChar: Char; // Error replacement char
+ EofChar: Char; // End of Input character
+ EvtChar: Char; // Received Event character
+ wReserved1: WORD; // Fill for now.
+ end;
+ {$EXTERNALSYM _DCB}
+ DCB = _DCB;
+ {$EXTERNALSYM DCB}
+ TDCB = DCB;
+ PDCB = LPDCB;
+
+ LPCOMMTIMEOUTS = ^COMMTIMEOUTS;
+ {$EXTERNALSYM LPCOMMTIMEOUTS}
+ _COMMTIMEOUTS = record
+ ReadIntervalTimeout: DWORD; // Maximum time between read chars.
+ ReadTotalTimeoutMultiplier: DWORD; // Multiplier of characters.
+ ReadTotalTimeoutConstant: DWORD; // Constant in milliseconds.
+ WriteTotalTimeoutMultiplier: DWORD; // Multiplier of characters.
+ WriteTotalTimeoutConstant: DWORD; // Constant in milliseconds.
+ end;
+ {$EXTERNALSYM _COMMTIMEOUTS}
+ COMMTIMEOUTS = _COMMTIMEOUTS;
+ {$EXTERNALSYM COMMTIMEOUTS}
+ TCommTimeouts = COMMTIMEOUTS;
+ PCommTimeouts = LPCOMMTIMEOUTS;
+
+ LPCOMMCONFIG = ^COMMCONFIG;
+ {$EXTERNALSYM LPCOMMCONFIG}
+ _COMMCONFIG = record
+ dwSize: DWORD; // Size of the entire struct
+ wVersion: Word; // version of the structure
+ wReserved: Word; // alignment
+ dcb: DCB; // device control block
+ dwProviderSubType: DWORD; // ordinal value for identifying
+ // provider-defined data structure format
+ dwProviderOffset: DWORD; // Specifies the offset of provider specific
+ // data field in bytes from the start
+ dwProviderSize: DWORD; // size of the provider-specific data field
+ wcProviderData: array [0..0] of WCHAR; // provider-specific data
+ end;
+ {$EXTERNALSYM _COMMCONFIG}
+ COMMCONFIG = _COMMCONFIG;
+ {$EXTERNALSYM COMMCONFIG}
+ TCommConfig = COMMCONFIG;
+ PCommConfig = LPCOMMCONFIG;
+
+ LPSYSTEM_INFO = ^SYSTEM_INFO;
+ {$EXTERNALSYM LPSYSTEM_INFO}
+ _SYSTEM_INFO = record
+ case Integer of
+ 0: (
+ dwOemId: DWORD); // absolete, do not use
+ 1: (
+ wProcessorArchitecture: WORD;
+ wReserved: WORD;
+ dwPageSize: DWORD;
+ lpMinimumApplicationAddress: LPVOID;
+ lpMaximumApplicationAddress: LPVOID;
+ dwActiveProcessorMask: DWORD_PTR;
+ dwNumberOfProcessors: DWORD;
+ dwProcessorType: DWORD;
+ dwAllocationGranularity: DWORD;
+ wProcessorLevel: WORD;
+ wProcessorRevision: WORD);
+ end;
+ {$EXTERNALSYM _SYSTEM_INFO}
+ SYSTEM_INFO = _SYSTEM_INFO;
+ {$EXTERNALSYM SYSTEM_INFO}
+ TSystemInfo = SYSTEM_INFO;
+ PSystemInfo = LPSYSTEM_INFO;
+
+//
+//
+
+function FreeModule(hLibModule: HMODULE): BOOL;
+{$EXTERNALSYM FreeModule}
+function MakeProcInstance(lpProc: FARPROC; hInstance: HINSTANCE): FARPROC;
+{$EXTERNALSYM MakeProcInstance}
+procedure FreeProcInstance(lpProc: FARPROC);
+{$EXTERNALSYM FreeProcInstance}
+
+// Global Memory Flags
+
+const
+ GMEM_FIXED = $0000;
+ {$EXTERNALSYM GMEM_FIXED}
+ GMEM_MOVEABLE = $0002;
+ {$EXTERNALSYM GMEM_MOVEABLE}
+ GMEM_NOCOMPACT = $0010;
+ {$EXTERNALSYM GMEM_NOCOMPACT}
+ GMEM_NODISCARD = $0020;
+ {$EXTERNALSYM GMEM_NODISCARD}
+ GMEM_ZEROINIT = $0040;
+ {$EXTERNALSYM GMEM_ZEROINIT}
+ GMEM_MODIFY = $0080;
+ {$EXTERNALSYM GMEM_MODIFY}
+ GMEM_DISCARDABLE = $0100;
+ {$EXTERNALSYM GMEM_DISCARDABLE}
+ GMEM_NOT_BANKED = $1000;
+ {$EXTERNALSYM GMEM_NOT_BANKED}
+ GMEM_SHARE = $2000;
+ {$EXTERNALSYM GMEM_SHARE}
+ GMEM_DDESHARE = $2000;
+ {$EXTERNALSYM GMEM_DDESHARE}
+ GMEM_NOTIFY = $4000;
+ {$EXTERNALSYM GMEM_NOTIFY}
+ GMEM_LOWER = GMEM_NOT_BANKED;
+ {$EXTERNALSYM GMEM_LOWER}
+ GMEM_VALID_FLAGS = $7F72;
+ {$EXTERNALSYM GMEM_VALID_FLAGS}
+ GMEM_INVALID_HANDLE = $8000;
+ {$EXTERNALSYM GMEM_INVALID_HANDLE}
+
+ GHND = GMEM_MOVEABLE or GMEM_ZEROINIT;
+ {$EXTERNALSYM GHND}
+ GPTR = GMEM_FIXED or GMEM_ZEROINIT;
+ {$EXTERNALSYM GPTR}
+
+function GlobalLRUNewest(h: HANDLE): HANDLE;
+{$EXTERNALSYM GlobalLRUNewest}
+function GlobalLRUOldest(h: HANDLE): HANDLE;
+{$EXTERNALSYM GlobalLRUOldest}
+function GlobalDiscard(h: HANDLE): HANDLE;
+{$EXTERNALSYM GlobalDiscard}
+
+// Flags returned by GlobalFlags (in addition to GMEM_DISCARDABLE)
+
+const
+ GMEM_DISCARDED = $4000;
+ {$EXTERNALSYM GMEM_DISCARDED}
+ GMEM_LOCKCOUNT = $00FF;
+ {$EXTERNALSYM GMEM_LOCKCOUNT}
+
+type
+ LPMEMORYSTATUS = ^MEMORYSTATUS;
+ {$EXTERNALSYM LPMEMORYSTATUS}
+ _MEMORYSTATUS = record
+ dwLength: DWORD;
+ dwMemoryLoad: DWORD;
+ dwTotalPhys: SIZE_T;
+ dwAvailPhys: SIZE_T;
+ dwTotalPageFile: SIZE_T;
+ dwAvailPageFile: SIZE_T;
+ dwTotalVirtual: SIZE_T;
+ dwAvailVirtual: SIZE_T;
+ end;
+ {$EXTERNALSYM _MEMORYSTATUS}
+ MEMORYSTATUS = _MEMORYSTATUS;
+ {$EXTERNALSYM MEMORYSTATUS}
+ TMemoryStatus = MEMORYSTATUS;
+ PMemoryStatus = LPMEMORYSTATUS;
+
+// Local Memory Flags
+
+const
+ LMEM_FIXED = $0000;
+ {$EXTERNALSYM LMEM_FIXED}
+ LMEM_MOVEABLE = $0002;
+ {$EXTERNALSYM LMEM_MOVEABLE}
+ LMEM_NOCOMPACT = $0010;
+ {$EXTERNALSYM LMEM_NOCOMPACT}
+ LMEM_NODISCARD = $0020;
+ {$EXTERNALSYM LMEM_NODISCARD}
+ LMEM_ZEROINIT = $0040;
+ {$EXTERNALSYM LMEM_ZEROINIT}
+ LMEM_MODIFY = $0080;
+ {$EXTERNALSYM LMEM_MODIFY}
+ LMEM_DISCARDABLE = $0F00;
+ {$EXTERNALSYM LMEM_DISCARDABLE}
+ LMEM_VALID_FLAGS = $0F72;
+ {$EXTERNALSYM LMEM_VALID_FLAGS}
+ LMEM_INVALID_HANDLE = $8000;
+ {$EXTERNALSYM LMEM_INVALID_HANDLE}
+
+ LHND = LMEM_MOVEABLE or LMEM_ZEROINIT;
+ {$EXTERNALSYM LHND}
+ LPTR = LMEM_FIXED or LMEM_ZEROINIT;
+ {$EXTERNALSYM LPTR}
+
+ NONZEROLHND = LMEM_MOVEABLE;
+ {$EXTERNALSYM NONZEROLHND}
+ NONZEROLPTR = LMEM_FIXED;
+ {$EXTERNALSYM NONZEROLPTR}
+
+function LocalDiscard(h: HLOCAL): HLOCAL;
+{$EXTERNALSYM LocalDiscard}
+
+// Flags returned by LocalFlags (in addition to LMEM_DISCARDABLE)
+
+const
+ LMEM_DISCARDED = $4000;
+ {$EXTERNALSYM LMEM_DISCARDED}
+ LMEM_LOCKCOUNT = $00FF;
+ {$EXTERNALSYM LMEM_LOCKCOUNT}
+
+//
+// dwCreationFlag values
+//
+
+ DEBUG_PROCESS = $00000001;
+ {$EXTERNALSYM DEBUG_PROCESS}
+ DEBUG_ONLY_THIS_PROCESS = $00000002;
+ {$EXTERNALSYM DEBUG_ONLY_THIS_PROCESS}
+
+ CREATE_SUSPENDED = $00000004;
+ {$EXTERNALSYM CREATE_SUSPENDED}
+
+ DETACHED_PROCESS = $00000008;
+ {$EXTERNALSYM DETACHED_PROCESS}
+
+ CREATE_NEW_CONSOLE = $00000010;
+ {$EXTERNALSYM CREATE_NEW_CONSOLE}
+
+ NORMAL_PRIORITY_CLASS = $00000020;
+ {$EXTERNALSYM NORMAL_PRIORITY_CLASS}
+ IDLE_PRIORITY_CLASS = $00000040;
+ {$EXTERNALSYM IDLE_PRIORITY_CLASS}
+ HIGH_PRIORITY_CLASS = $00000080;
+ {$EXTERNALSYM HIGH_PRIORITY_CLASS}
+ REALTIME_PRIORITY_CLASS = $00000100;
+ {$EXTERNALSYM REALTIME_PRIORITY_CLASS}
+
+ CREATE_NEW_PROCESS_GROUP = $00000200;
+ {$EXTERNALSYM CREATE_NEW_PROCESS_GROUP}
+ CREATE_UNICODE_ENVIRONMENT = $00000400;
+ {$EXTERNALSYM CREATE_UNICODE_ENVIRONMENT}
+
+ CREATE_SEPARATE_WOW_VDM = $00000800;
+ {$EXTERNALSYM CREATE_SEPARATE_WOW_VDM}
+ CREATE_SHARED_WOW_VDM = $00001000;
+ {$EXTERNALSYM CREATE_SHARED_WOW_VDM}
+ CREATE_FORCEDOS = $00002000;
+ {$EXTERNALSYM CREATE_FORCEDOS}
+
+ BELOW_NORMAL_PRIORITY_CLASS = $00004000;
+ {$EXTERNALSYM BELOW_NORMAL_PRIORITY_CLASS}
+ ABOVE_NORMAL_PRIORITY_CLASS = $00008000;
+ {$EXTERNALSYM ABOVE_NORMAL_PRIORITY_CLASS}
+ STACK_SIZE_PARAM_IS_A_RESERVATION = $00010000;
+ {$EXTERNALSYM STACK_SIZE_PARAM_IS_A_RESERVATION}
+
+ CREATE_BREAKAWAY_FROM_JOB = $01000000;
+ {$EXTERNALSYM CREATE_BREAKAWAY_FROM_JOB}
+ CREATE_PRESERVE_CODE_AUTHZ_LEVEL = $02000000;
+ {$EXTERNALSYM CREATE_PRESERVE_CODE_AUTHZ_LEVEL}
+
+ CREATE_DEFAULT_ERROR_MODE = $04000000;
+ {$EXTERNALSYM CREATE_DEFAULT_ERROR_MODE}
+ CREATE_NO_WINDOW = $08000000;
+ {$EXTERNALSYM CREATE_NO_WINDOW}
+
+ PROFILE_USER = $10000000;
+ {$EXTERNALSYM PROFILE_USER}
+ PROFILE_KERNEL = $20000000;
+ {$EXTERNALSYM PROFILE_KERNEL}
+ PROFILE_SERVER = $40000000;
+ {$EXTERNALSYM PROFILE_SERVER}
+
+ CREATE_IGNORE_SYSTEM_DEFAULT = DWORD($80000000);
+ {$EXTERNALSYM CREATE_IGNORE_SYSTEM_DEFAULT}
+
+ THREAD_PRIORITY_LOWEST = THREAD_BASE_PRIORITY_MIN;
+ {$EXTERNALSYM THREAD_PRIORITY_LOWEST}
+ THREAD_PRIORITY_BELOW_NORMAL = THREAD_PRIORITY_LOWEST + 1;
+ {$EXTERNALSYM THREAD_PRIORITY_BELOW_NORMAL}
+ THREAD_PRIORITY_NORMAL = 0;
+ {$EXTERNALSYM THREAD_PRIORITY_NORMAL}
+ THREAD_PRIORITY_HIGHEST = THREAD_BASE_PRIORITY_MAX;
+ {$EXTERNALSYM THREAD_PRIORITY_HIGHEST}
+ THREAD_PRIORITY_ABOVE_NORMAL = THREAD_PRIORITY_HIGHEST - 1;
+ {$EXTERNALSYM THREAD_PRIORITY_ABOVE_NORMAL}
+ THREAD_PRIORITY_ERROR_RETURN = MAXLONG;
+ {$EXTERNALSYM THREAD_PRIORITY_ERROR_RETURN}
+
+ THREAD_PRIORITY_TIME_CRITICAL = THREAD_BASE_PRIORITY_LOWRT;
+ {$EXTERNALSYM THREAD_PRIORITY_TIME_CRITICAL}
+ THREAD_PRIORITY_IDLE = THREAD_BASE_PRIORITY_IDLE;
+ {$EXTERNALSYM THREAD_PRIORITY_IDLE}
+
+//
+// Debug APIs
+//
+
+ EXCEPTION_DEBUG_EVENT = 1;
+ {$EXTERNALSYM EXCEPTION_DEBUG_EVENT}
+ CREATE_THREAD_DEBUG_EVENT = 2;
+ {$EXTERNALSYM CREATE_THREAD_DEBUG_EVENT}
+ CREATE_PROCESS_DEBUG_EVENT = 3;
+ {$EXTERNALSYM CREATE_PROCESS_DEBUG_EVENT}
+ EXIT_THREAD_DEBUG_EVENT = 4;
+ {$EXTERNALSYM EXIT_THREAD_DEBUG_EVENT}
+ EXIT_PROCESS_DEBUG_EVENT = 5;
+ {$EXTERNALSYM EXIT_PROCESS_DEBUG_EVENT}
+ LOAD_DLL_DEBUG_EVENT = 6;
+ {$EXTERNALSYM LOAD_DLL_DEBUG_EVENT}
+ UNLOAD_DLL_DEBUG_EVENT = 7;
+ {$EXTERNALSYM UNLOAD_DLL_DEBUG_EVENT}
+ OUTPUT_DEBUG_STRING_EVENT = 8;
+ {$EXTERNALSYM OUTPUT_DEBUG_STRING_EVENT}
+ RIP_EVENT = 9;
+ {$EXTERNALSYM RIP_EVENT}
+
+type
+ LPEXCEPTION_DEBUG_INFO = ^EXCEPTION_DEBUG_INFO;
+ {$EXTERNALSYM LPEXCEPTION_DEBUG_INFO}
+ _EXCEPTION_DEBUG_INFO = record
+ ExceptionRecord: EXCEPTION_RECORD;
+ dwFirstChance: DWORD;
+ end;
+ {$EXTERNALSYM _EXCEPTION_DEBUG_INFO}
+ EXCEPTION_DEBUG_INFO = _EXCEPTION_DEBUG_INFO;
+ {$EXTERNALSYM EXCEPTION_DEBUG_INFO}
+ TExceptionDebugInfo = EXCEPTION_DEBUG_INFO;
+ PExceptionDebugInfo = LPEXCEPTION_DEBUG_INFO;
+
+ LPCREATE_THREAD_DEBUG_INFO = ^CREATE_THREAD_DEBUG_INFO;
+ {$EXTERNALSYM LPCREATE_THREAD_DEBUG_INFO}
+ _CREATE_THREAD_DEBUG_INFO = record
+ hThread: HANDLE;
+ lpThreadLocalBase: LPVOID;
+ lpStartAddress: LPTHREAD_START_ROUTINE;
+ end;
+ {$EXTERNALSYM _CREATE_THREAD_DEBUG_INFO}
+ CREATE_THREAD_DEBUG_INFO = _CREATE_THREAD_DEBUG_INFO;
+ {$EXTERNALSYM CREATE_THREAD_DEBUG_INFO}
+ TCreateThreadDebugInfo = CREATE_THREAD_DEBUG_INFO;
+ PCreateThreadDebugInfo = LPCREATE_THREAD_DEBUG_INFO;
+
+ LPCREATE_PROCESS_DEBUG_INFO = ^CREATE_PROCESS_DEBUG_INFO;
+ {$EXTERNALSYM LPCREATE_PROCESS_DEBUG_INFO}
+ _CREATE_PROCESS_DEBUG_INFO = record
+ hFile: HANDLE;
+ hProcess: HANDLE;
+ hThread: HANDLE;
+ lpBaseOfImage: LPVOID;
+ dwDebugInfoFileOffset: DWORD;
+ nDebugInfoSize: DWORD;
+ lpThreadLocalBase: LPVOID;
+ lpStartAddress: LPTHREAD_START_ROUTINE;
+ lpImageName: LPVOID;
+ fUnicode: Word;
+ end;
+ {$EXTERNALSYM _CREATE_PROCESS_DEBUG_INFO}
+ CREATE_PROCESS_DEBUG_INFO = _CREATE_PROCESS_DEBUG_INFO;
+ {$EXTERNALSYM CREATE_PROCESS_DEBUG_INFO}
+ TCreateProcessDebugInfo = CREATE_PROCESS_DEBUG_INFO;
+ PCreateProcessDebugInfo = LPCREATE_PROCESS_DEBUG_INFO;
+
+ LPEXIT_THREAD_DEBUG_INFO = ^EXIT_THREAD_DEBUG_INFO;
+ {$EXTERNALSYM LPEXIT_THREAD_DEBUG_INFO}
+ _EXIT_THREAD_DEBUG_INFO = record
+ dwExitCode: DWORD;
+ end;
+ {$EXTERNALSYM _EXIT_THREAD_DEBUG_INFO}
+ EXIT_THREAD_DEBUG_INFO = _EXIT_THREAD_DEBUG_INFO;
+ {$EXTERNALSYM EXIT_THREAD_DEBUG_INFO}
+ TExitThreadDebugInfo = EXIT_THREAD_DEBUG_INFO;
+ PExitThreadDebugInfo = LPEXIT_THREAD_DEBUG_INFO;
+
+ LPEXIT_PROCESS_DEBUG_INFO = ^EXIT_PROCESS_DEBUG_INFO;
+ {$EXTERNALSYM LPEXIT_PROCESS_DEBUG_INFO}
+ _EXIT_PROCESS_DEBUG_INFO = record
+ dwExitCode: DWORD;
+ end;
+ {$EXTERNALSYM _EXIT_PROCESS_DEBUG_INFO}
+ EXIT_PROCESS_DEBUG_INFO = _EXIT_PROCESS_DEBUG_INFO;
+ {$EXTERNALSYM EXIT_PROCESS_DEBUG_INFO}
+ TExitProcessDebugInfo = EXIT_PROCESS_DEBUG_INFO;
+ PExitProcessDebugInfo = LPEXIT_PROCESS_DEBUG_INFO;
+
+ LPLOAD_DLL_DEBUG_INFO = ^LOAD_DLL_DEBUG_INFO;
+ {$EXTERNALSYM LPLOAD_DLL_DEBUG_INFO}
+ _LOAD_DLL_DEBUG_INFO = record
+ hFile: HANDLE;
+ lpBaseOfDll: LPVOID;
+ dwDebugInfoFileOffset: DWORD;
+ nDebugInfoSize: DWORD;
+ lpImageName: LPVOID;
+ fUnicode: Word;
+ end;
+ {$EXTERNALSYM _LOAD_DLL_DEBUG_INFO}
+ LOAD_DLL_DEBUG_INFO = _LOAD_DLL_DEBUG_INFO;
+ {$EXTERNALSYM LOAD_DLL_DEBUG_INFO}
+ TLoadDllDebugInfo = LOAD_DLL_DEBUG_INFO;
+ PLoadDllDebugInfo = LPLOAD_DLL_DEBUG_INFO;
+
+ LPUNLOAD_DLL_DEBUG_INFO = ^UNLOAD_DLL_DEBUG_INFO;
+ {$EXTERNALSYM LPUNLOAD_DLL_DEBUG_INFO}
+ _UNLOAD_DLL_DEBUG_INFO = record
+ lpBaseOfDll: LPVOID;
+ end;
+ {$EXTERNALSYM _UNLOAD_DLL_DEBUG_INFO}
+ UNLOAD_DLL_DEBUG_INFO = _UNLOAD_DLL_DEBUG_INFO;
+ {$EXTERNALSYM UNLOAD_DLL_DEBUG_INFO}
+ TUnloadDllDebugInfo = UNLOAD_DLL_DEBUG_INFO;
+ PUnloadDllDebugInfo = LPUNLOAD_DLL_DEBUG_INFO;
+
+ LPOUTPUT_DEBUG_STRING_INFO = ^OUTPUT_DEBUG_STRING_INFO;
+ {$EXTERNALSYM LPOUTPUT_DEBUG_STRING_INFO}
+ _OUTPUT_DEBUG_STRING_INFO = record
+ lpDebugStringData: LPSTR;
+ fUnicode: Word;
+ nDebugStringLength: Word;
+ end;
+ {$EXTERNALSYM _OUTPUT_DEBUG_STRING_INFO}
+ OUTPUT_DEBUG_STRING_INFO = _OUTPUT_DEBUG_STRING_INFO;
+ {$EXTERNALSYM OUTPUT_DEBUG_STRING_INFO}
+ TOutputDebugStringInfo = OUTPUT_DEBUG_STRING_INFO;
+ POutputDebugStringInfo = LPOUTPUT_DEBUG_STRING_INFO;
+
+ LPRIP_INFO = ^RIP_INFO;
+ {$EXTERNALSYM LPRIP_INFO}
+ _RIP_INFO = record
+ dwError: DWORD;
+ dwType: DWORD;
+ end;
+ {$EXTERNALSYM _RIP_INFO}
+ RIP_INFO = _RIP_INFO;
+ {$EXTERNALSYM RIP_INFO}
+ TRipInfo = RIP_INFO;
+ PRipInfo = LPRIP_INFO;
+
+ LPDEBUG_EVENT = ^DEBUG_EVENT;
+ {$EXTERNALSYM LPDEBUG_EVENT}
+ _DEBUG_EVENT = record
+ dwDebugEventCode: DWORD;
+ dwProcessId: DWORD;
+ dwThreadId: DWORD;
+ case Integer of
+ 0: (Exception: EXCEPTION_DEBUG_INFO);
+ 1: (CreateThread: CREATE_THREAD_DEBUG_INFO);
+ 2: (CreateProcessInfo: CREATE_PROCESS_DEBUG_INFO);
+ 3: (ExitThread: EXIT_THREAD_DEBUG_INFO);
+ 4: (ExitProcess: EXIT_PROCESS_DEBUG_INFO);
+ 5: (LoadDll: LOAD_DLL_DEBUG_INFO);
+ 6: (UnloadDll: UNLOAD_DLL_DEBUG_INFO);
+ 7: (DebugString: OUTPUT_DEBUG_STRING_INFO);
+ 8: (RipInfo: RIP_INFO);
+ end;
+ {$EXTERNALSYM _DEBUG_EVENT}
+ DEBUG_EVENT = _DEBUG_EVENT;
+ {$EXTERNALSYM DEBUG_EVENT}
+ TDebugEvent = DEBUG_EVENT;
+ PDebugEvent = LPDEBUG_EVENT;
+
+ LPCONTEXT = PCONTEXT;
+ {$EXTERNALSYM LPCONTEXT}
+ LPEXCEPTION_RECORD = PEXCEPTION_RECORD;
+ {$EXTERNALSYM LPEXCEPTION_RECORD}
+ LPEXCEPTION_POINTERS = PEXCEPTION_POINTERS;
+ {$EXTERNALSYM LPEXCEPTION_POINTERS}
+
+const
+ DRIVE_UNKNOWN = 0;
+ {$EXTERNALSYM DRIVE_UNKNOWN}
+ DRIVE_NO_ROOT_DIR = 1;
+ {$EXTERNALSYM DRIVE_NO_ROOT_DIR}
+ DRIVE_REMOVABLE = 2;
+ {$EXTERNALSYM DRIVE_REMOVABLE}
+ DRIVE_FIXED = 3;
+ {$EXTERNALSYM DRIVE_FIXED}
+ DRIVE_REMOTE = 4;
+ {$EXTERNALSYM DRIVE_REMOTE}
+ DRIVE_CDROM = 5;
+ {$EXTERNALSYM DRIVE_CDROM}
+ DRIVE_RAMDISK = 6;
+ {$EXTERNALSYM DRIVE_RAMDISK}
+
+function GetFreeSpace(w: WORD): DWORD;
+{$EXTERNALSYM GetFreeSpace}
+
+const
+ FILE_TYPE_UNKNOWN = $0000;
+ {$EXTERNALSYM FILE_TYPE_UNKNOWN}
+ FILE_TYPE_DISK = $0001;
+ {$EXTERNALSYM FILE_TYPE_DISK}
+ FILE_TYPE_CHAR = $0002;
+ {$EXTERNALSYM FILE_TYPE_CHAR}
+ FILE_TYPE_PIPE = $0003;
+ {$EXTERNALSYM FILE_TYPE_PIPE}
+ FILE_TYPE_REMOTE = $8000;
+ {$EXTERNALSYM FILE_TYPE_REMOTE}
+
+ STD_INPUT_HANDLE = DWORD(-10);
+ {$EXTERNALSYM STD_INPUT_HANDLE}
+ STD_OUTPUT_HANDLE = DWORD(-11);
+ {$EXTERNALSYM STD_OUTPUT_HANDLE}
+ STD_ERROR_HANDLE = DWORD(-12);
+ {$EXTERNALSYM STD_ERROR_HANDLE}
+
+ NOPARITY = 0;
+ {$EXTERNALSYM NOPARITY}
+ ODDPARITY = 1;
+ {$EXTERNALSYM ODDPARITY}
+ EVENPARITY = 2;
+ {$EXTERNALSYM EVENPARITY}
+ MARKPARITY = 3;
+ {$EXTERNALSYM MARKPARITY}
+ SPACEPARITY = 4;
+ {$EXTERNALSYM SPACEPARITY}
+
+ ONESTOPBIT = 0;
+ {$EXTERNALSYM ONESTOPBIT}
+ ONE5STOPBITS = 1;
+ {$EXTERNALSYM ONE5STOPBITS}
+ TWOSTOPBITS = 2;
+ {$EXTERNALSYM TWOSTOPBITS}
+
+ IGNORE = 0; // Ignore signal
+ {$EXTERNALSYM IGNORE}
+ INFINITE = DWORD($FFFFFFFF); // Infinite timeout
+ {$EXTERNALSYM INFINITE}
+
+//
+// Baud rates at which the communication device operates
+//
+
+ CBR_110 = 110;
+ {$EXTERNALSYM CBR_110}
+ CBR_300 = 300;
+ {$EXTERNALSYM CBR_300}
+ CBR_600 = 600;
+ {$EXTERNALSYM CBR_600}
+ CBR_1200 = 1200;
+ {$EXTERNALSYM CBR_1200}
+ CBR_2400 = 2400;
+ {$EXTERNALSYM CBR_2400}
+ CBR_4800 = 4800;
+ {$EXTERNALSYM CBR_4800}
+ CBR_9600 = 9600;
+ {$EXTERNALSYM CBR_9600}
+ CBR_14400 = 14400;
+ {$EXTERNALSYM CBR_14400}
+ CBR_19200 = 19200;
+ {$EXTERNALSYM CBR_19200}
+ CBR_38400 = 38400;
+ {$EXTERNALSYM CBR_38400}
+ CBR_56000 = 56000;
+ {$EXTERNALSYM CBR_56000}
+ CBR_57600 = 57600;
+ {$EXTERNALSYM CBR_57600}
+ CBR_115200 = 115200;
+ {$EXTERNALSYM CBR_115200}
+ CBR_128000 = 128000;
+ {$EXTERNALSYM CBR_128000}
+ CBR_256000 = 256000;
+ {$EXTERNALSYM CBR_256000}
+
+//
+// Error Flags
+//
+
+ CE_RXOVER = $0001; // Receive Queue overflow
+ {$EXTERNALSYM CE_RXOVER}
+ CE_OVERRUN = $0002; // Receive Overrun Error
+ {$EXTERNALSYM CE_OVERRUN}
+ CE_RXPARITY = $0004; // Receive Parity Error
+ {$EXTERNALSYM CE_RXPARITY}
+ CE_FRAME = $0008; // Receive Framing error
+ {$EXTERNALSYM CE_FRAME}
+ CE_BREAK = $0010; // Break Detected
+ {$EXTERNALSYM CE_BREAK}
+ CE_TXFULL = $0100; // TX Queue is full
+ {$EXTERNALSYM CE_TXFULL}
+ CE_PTO = $0200; // LPTx Timeout
+ {$EXTERNALSYM CE_PTO}
+ CE_IOE = $0400; // LPTx I/O Error
+ {$EXTERNALSYM CE_IOE}
+ CE_DNS = $0800; // LPTx Device not selected
+ {$EXTERNALSYM CE_DNS}
+ CE_OOP = $1000; // LPTx Out-Of-Paper
+ {$EXTERNALSYM CE_OOP}
+ CE_MODE = $8000; // Requested mode unsupported
+ {$EXTERNALSYM CE_MODE}
+
+ IE_BADID = DWORD(-1); // Invalid or unsupported id
+ {$EXTERNALSYM IE_BADID}
+ IE_OPEN = DWORD(-2); // Device Already Open
+ {$EXTERNALSYM IE_OPEN}
+ IE_NOPEN = DWORD(-3); // Device Not Open
+ {$EXTERNALSYM IE_NOPEN}
+ IE_MEMORY = DWORD(-4); // Unable to allocate queues
+ {$EXTERNALSYM IE_MEMORY}
+ IE_DEFAULT = DWORD(-5); // Error in default parameters
+ {$EXTERNALSYM IE_DEFAULT}
+ IE_HARDWARE = DWORD(-10); // Hardware Not Present
+ {$EXTERNALSYM IE_HARDWARE}
+ IE_BYTESIZE = DWORD(-11); // Illegal Byte Size
+ {$EXTERNALSYM IE_BYTESIZE}
+ IE_BAUDRATE = DWORD(-12); // Unsupported BaudRate
+ {$EXTERNALSYM IE_BAUDRATE}
+
+//
+// Events
+//
+
+ EV_RXCHAR = $0001; // Any Character received
+ {$EXTERNALSYM EV_RXCHAR}
+ EV_RXFLAG = $0002; // Received certain character
+ {$EXTERNALSYM EV_RXFLAG}
+ EV_TXEMPTY = $0004; // Transmitt Queue Empty
+ {$EXTERNALSYM EV_TXEMPTY}
+ EV_CTS = $0008; // CTS changed state
+ {$EXTERNALSYM EV_CTS}
+ EV_DSR = $0010; // DSR changed state
+ {$EXTERNALSYM EV_DSR}
+ EV_RLSD = $0020; // RLSD changed state
+ {$EXTERNALSYM EV_RLSD}
+ EV_BREAK = $0040; // BREAK received
+ {$EXTERNALSYM EV_BREAK}
+ EV_ERR = $0080; // Line status error occurred
+ {$EXTERNALSYM EV_ERR}
+ EV_RING = $0100; // Ring signal detected
+ {$EXTERNALSYM EV_RING}
+ EV_PERR = $0200; // Printer error occured
+ {$EXTERNALSYM EV_PERR}
+ EV_RX80FULL = $0400; // Receive buffer is 80 percent full
+ {$EXTERNALSYM EV_RX80FULL}
+ EV_EVENT1 = $0800; // Provider specific event 1
+ {$EXTERNALSYM EV_EVENT1}
+ EV_EVENT2 = $1000; // Provider specific event 2
+ {$EXTERNALSYM EV_EVENT2}
+
+//
+// Escape Functions
+//
+
+ SETXOFF = 1; // Simulate XOFF received
+ {$EXTERNALSYM SETXOFF}
+ SETXON = 2; // Simulate XON received
+ {$EXTERNALSYM SETXON}
+ SETRTS = 3; // Set RTS high
+ {$EXTERNALSYM SETRTS}
+ CLRRTS = 4; // Set RTS low
+ {$EXTERNALSYM CLRRTS}
+ SETDTR = 5; // Set DTR high
+ {$EXTERNALSYM SETDTR}
+ CLRDTR = 6; // Set DTR low
+ {$EXTERNALSYM CLRDTR}
+ RESETDEV = 7; // Reset device if possible
+ {$EXTERNALSYM RESETDEV}
+ SETBREAK = 8; // Set the device break line.
+ {$EXTERNALSYM SETBREAK}
+ CLRBREAK = 9; // Clear the device break line.
+ {$EXTERNALSYM CLRBREAK}
+
+//
+// PURGE function flags.
+//
+
+ PURGE_TXABORT = $0001; // Kill the pending/current writes to the comm port.
+ {$EXTERNALSYM PURGE_TXABORT}
+ PURGE_RXABORT = $0002; // Kill the pending/current reads to the comm port.
+ {$EXTERNALSYM PURGE_RXABORT}
+ PURGE_TXCLEAR = $0004; // Kill the transmit queue if there.
+ {$EXTERNALSYM PURGE_TXCLEAR}
+ PURGE_RXCLEAR = $0008; // Kill the typeahead buffer if there.
+ {$EXTERNALSYM PURGE_RXCLEAR}
+
+ LPTx = $80; // Set if ID is for LPT device
+ {$EXTERNALSYM LPTx}
+
+//
+// Modem Status Flags
+//
+
+ MS_CTS_ON = DWORD($0010);
+ {$EXTERNALSYM MS_CTS_ON}
+ MS_DSR_ON = DWORD($0020);
+ {$EXTERNALSYM MS_DSR_ON}
+ MS_RING_ON = DWORD($0040);
+ {$EXTERNALSYM MS_RING_ON}
+ MS_RLSD_ON = DWORD($0080);
+ {$EXTERNALSYM MS_RLSD_ON}
+
+//
+// WaitSoundState() Constants
+//
+
+ S_QUEUEEMPTY = 0;
+ {$EXTERNALSYM S_QUEUEEMPTY}
+ S_THRESHOLD = 1;
+ {$EXTERNALSYM S_THRESHOLD}
+ S_ALLTHRESHOLD = 2;
+ {$EXTERNALSYM S_ALLTHRESHOLD}
+
+//
+// Accent Modes
+//
+
+ S_NORMAL = 0;
+ {$EXTERNALSYM S_NORMAL}
+ S_LEGATO = 1;
+ {$EXTERNALSYM S_LEGATO}
+ S_STACCATO = 2;
+ {$EXTERNALSYM S_STACCATO}
+
+//
+// SetSoundNoise() Sources
+//
+
+ S_PERIOD512 = 0; // Freq = N/512 high pitch, less coarse hiss
+ {$EXTERNALSYM S_PERIOD512}
+ S_PERIOD1024 = 1; // Freq = N/1024
+ {$EXTERNALSYM S_PERIOD1024}
+ S_PERIOD2048 = 2; // Freq = N/2048 low pitch, more coarse hiss
+ {$EXTERNALSYM S_PERIOD2048}
+ S_PERIODVOICE = 3; // Source is frequency from voice channel (3)
+ {$EXTERNALSYM S_PERIODVOICE}
+ S_WHITE512 = 4; // Freq = N/512 high pitch, less coarse hiss
+ {$EXTERNALSYM S_WHITE512}
+ S_WHITE1024 = 5; // Freq = N/1024
+ {$EXTERNALSYM S_WHITE1024}
+ S_WHITE2048 = 6; // Freq = N/2048 low pitch, more coarse hiss
+ {$EXTERNALSYM S_WHITE2048}
+ S_WHITEVOICE = 7; // Source is frequency from voice channel (3)
+ {$EXTERNALSYM S_WHITEVOICE}
+
+ S_SERDVNA = DWORD(-1); // Device not available
+ {$EXTERNALSYM S_SERDVNA}
+ S_SEROFM = DWORD(-2); // Out of memory
+ {$EXTERNALSYM S_SEROFM}
+ S_SERMACT = DWORD(-3); // Music active
+ {$EXTERNALSYM S_SERMACT}
+ S_SERQFUL = DWORD(-4); // Queue full
+ {$EXTERNALSYM S_SERQFUL}
+ S_SERBDNT = DWORD(-5); // Invalid note
+ {$EXTERNALSYM S_SERBDNT}
+ S_SERDLN = DWORD(-6); // Invalid note length
+ {$EXTERNALSYM S_SERDLN}
+ S_SERDCC = DWORD(-7); // Invalid note count
+ {$EXTERNALSYM S_SERDCC}
+ S_SERDTP = DWORD(-8); // Invalid tempo
+ {$EXTERNALSYM S_SERDTP}
+ S_SERDVL = DWORD(-9); // Invalid volume
+ {$EXTERNALSYM S_SERDVL}
+ S_SERDMD = DWORD(-10); // Invalid mode
+ {$EXTERNALSYM S_SERDMD}
+ S_SERDSH = DWORD(-11); // Invalid shape
+ {$EXTERNALSYM S_SERDSH}
+ S_SERDPT = DWORD(-12); // Invalid pitch
+ {$EXTERNALSYM S_SERDPT}
+ S_SERDFQ = DWORD(-13); // Invalid frequency
+ {$EXTERNALSYM S_SERDFQ}
+ S_SERDDR = DWORD(-14); // Invalid duration
+ {$EXTERNALSYM S_SERDDR}
+ S_SERDSR = DWORD(-15); // Invalid source
+ {$EXTERNALSYM S_SERDSR}
+ S_SERDST = DWORD(-16); // Invalid state
+ {$EXTERNALSYM S_SERDST}
+
+ NMPWAIT_WAIT_FOREVER = DWORD($ffffffff);
+ {$EXTERNALSYM NMPWAIT_WAIT_FOREVER}
+ NMPWAIT_NOWAIT = $00000001;
+ {$EXTERNALSYM NMPWAIT_NOWAIT}
+ NMPWAIT_USE_DEFAULT_WAIT = $00000000;
+ {$EXTERNALSYM NMPWAIT_USE_DEFAULT_WAIT}
+
+ FS_CASE_IS_PRESERVED = FILE_CASE_PRESERVED_NAMES;
+ {$EXTERNALSYM FS_CASE_IS_PRESERVED}
+ FS_CASE_SENSITIVE = FILE_CASE_SENSITIVE_SEARCH;
+ {$EXTERNALSYM FS_CASE_SENSITIVE}
+ FS_UNICODE_STORED_ON_DISK = FILE_UNICODE_ON_DISK;
+ {$EXTERNALSYM FS_UNICODE_STORED_ON_DISK}
+ FS_PERSISTENT_ACLS = FILE_PERSISTENT_ACLS;
+ {$EXTERNALSYM FS_PERSISTENT_ACLS}
+ FS_VOL_IS_COMPRESSED = FILE_VOLUME_IS_COMPRESSED;
+ {$EXTERNALSYM FS_VOL_IS_COMPRESSED}
+ FS_FILE_COMPRESSION = FILE_FILE_COMPRESSION;
+ {$EXTERNALSYM FS_FILE_COMPRESSION}
+ FS_FILE_ENCRYPTION = FILE_SUPPORTS_ENCRYPTION;
+ {$EXTERNALSYM FS_FILE_ENCRYPTION}
+
+ FILE_MAP_COPY = SECTION_QUERY;
+ {$EXTERNALSYM FILE_MAP_COPY}
+ FILE_MAP_WRITE = SECTION_MAP_WRITE;
+ {$EXTERNALSYM FILE_MAP_WRITE}
+ FILE_MAP_READ = SECTION_MAP_READ;
+ {$EXTERNALSYM FILE_MAP_READ}
+ FILE_MAP_ALL_ACCESS = SECTION_ALL_ACCESS;
+ {$EXTERNALSYM FILE_MAP_ALL_ACCESS}
+
+ OF_READ = $00000000;
+ {$EXTERNALSYM OF_READ}
+ OF_WRITE = $00000001;
+ {$EXTERNALSYM OF_WRITE}
+ OF_READWRITE = $00000002;
+ {$EXTERNALSYM OF_READWRITE}
+ OF_SHARE_COMPAT = $00000000;
+ {$EXTERNALSYM OF_SHARE_COMPAT}
+ OF_SHARE_EXCLUSIVE = $00000010;
+ {$EXTERNALSYM OF_SHARE_EXCLUSIVE}
+ OF_SHARE_DENY_WRITE = $00000020;
+ {$EXTERNALSYM OF_SHARE_DENY_WRITE}
+ OF_SHARE_DENY_READ = $00000030;
+ {$EXTERNALSYM OF_SHARE_DENY_READ}
+ OF_SHARE_DENY_NONE = $00000040;
+ {$EXTERNALSYM OF_SHARE_DENY_NONE}
+ OF_PARSE = $00000100;
+ {$EXTERNALSYM OF_PARSE}
+ OF_DELETE = $00000200;
+ {$EXTERNALSYM OF_DELETE}
+ OF_VERIFY = $00000400;
+ {$EXTERNALSYM OF_VERIFY}
+ OF_CANCEL = $00000800;
+ {$EXTERNALSYM OF_CANCEL}
+ OF_CREATE = $00001000;
+ {$EXTERNALSYM OF_CREATE}
+ OF_PROMPT = $00002000;
+ {$EXTERNALSYM OF_PROMPT}
+ OF_EXIST = $00004000;
+ {$EXTERNALSYM OF_EXIST}
+ OF_REOPEN = $00008000;
+ {$EXTERNALSYM OF_REOPEN}
+
+ OFS_MAXPATHNAME = 128;
+ {$EXTERNALSYM OFS_MAXPATHNAME}
+
+type
+ LPOFSTRUCT = ^OFSTRUCT;
+ {$EXTERNALSYM LPOFSTRUCT}
+ _OFSTRUCT = record
+ cBytes: Byte;
+ fFixedDisk: Byte;
+ nErrCode: Word;
+ Reserved1: Word;
+ Reserved2: Word;
+ szPathName: array [0..OFS_MAXPATHNAME - 1] of CHAR;
+ end;
+ {$EXTERNALSYM _OFSTRUCT}
+ OFSTRUCT = _OFSTRUCT;
+ {$EXTERNALSYM OFSTRUCT}
+ TOfStruct = OFSTRUCT;
+ POfStruct = LPOFSTRUCT;
+
+// 64 bit interlocked functions, donated by Will DeWitt Jr.
+
+function InterlockedCompareExchange64(var Destination: LONGLONG; Exchange, Comperand: LONGLONG): LONGLONG; stdcall;
+{$EXTERNALSYM InterlockedCompareExchange64}
+
+function InterlockedAnd64(var Destination: LONGLONG; Value: LONGLONG): LONGLONG;
+{$EXTERNALSYM InterlockedAnd64}
+
+function InterlockedOr64(var Destination: LONGLONG; Value: LONGLONG): LONGLONG;
+{$EXTERNALSYM InterlockedOr64}
+
+function InterlockedXor64(var Destination: LONGLONG; Value: LONGLONG): LONGLONG;
+{$EXTERNALSYM InterlockedXor64}
+
+function InterlockedIncrement64(var Addend: LONGLONG): LONGLONG;
+{$EXTERNALSYM InterlockedIncrement64}
+
+function InterlockedDecrement64(var Addend: LONGLONG): LONGLONG;
+{$EXTERNALSYM InterlockedDecrement}
+
+function InterlockedExchange64(var Target: LONGLONG; Value: LONGLONG): LONGLONG;
+{$EXTERNALSYM InterlockedExchange64}
+
+function InterlockedExchangeAdd64(var Addend: LONGLONG; Value: LONGLONG): LONGLONG;
+{$EXTERNALSYM InterlockedExchangeAdd64}
+
+//
+// The Risc compilers support intrinsic functions for interlocked
+// increment, decrement, and exchange.
+//
+
+function InterlockedIncrement(var lpAddend: LONG): LONG; stdcall;
+{$EXTERNALSYM InterlockedIncrement}
+
+function InterlockedDecrement(var lpAddend: LONG): LONG; stdcall;
+{$EXTERNALSYM InterlockedDecrement}
+
+function InterlockedExchange(var Target: LONG; Value: LONG): LONG; stdcall;
+{$EXTERNALSYM InterlockedExchange}
+
+function InterlockedExchangePointer(var Target: PVOID; Value: PVOID): PVOID;
+{$EXTERNALSYM InterlockedExchangePointer}
+
+function InterlockedExchangeAdd(var Addend: LONG; Value: LONG): LONG; stdcall;
+{$EXTERNALSYM InterlockedExchangeAdd}
+
+function InterlockedCompareExchange(var Destination: LONG; Exchange: LONG;
+ Comperand: LONG): LONG; stdcall;
+{$EXTERNALSYM InterlockedCompareExchange}
+
+function InterlockedCompareExchangePointer(var Destination: PVOID;
+ Exchange, Comperand: PVOID): PVOID;
+{$EXTERNALSYM InterlockedCompareExchangePointer}
+
+{
+#define InterlockedIncrementAcquire InterlockedIncrement
+#define InterlockedIncrementRelease InterlockedIncrement
+#define InterlockedDecrementAcquire InterlockedDecrement
+#define InterlockedDecrementRelease InterlockedDecrement
+#define InterlockedIncrementAcquire InterlockedIncrement
+#define InterlockedIncrementRelease InterlockedIncrement
+#define InterlockedCompareExchangeAcquire InterlockedCompareExchange
+#define InterlockedCompareExchangeRelease InterlockedCompareExchange
+#define InterlockedCompareExchangeAcquire64 InterlockedCompareExchange64
+#define InterlockedCompareExchangeRelease64 InterlockedCompareExchange64
+}
+
+procedure InitializeSListHead(ListHead: PSLIST_HEADER); stdcall;
+{$EXTERNALSYM InitializeSListHead}
+
+function InterlockedPopEntrySList(ListHead: PSLIST_HEADER): PSLIST_ENTRY; stdcall;
+{$EXTERNALSYM InterlockedPopEntrySList}
+
+function InterlockedPushEntrySList(ListHead: PSLIST_HEADER; ListEntry: PSLIST_ENTRY): PSLIST_ENTRY; stdcall;
+{$EXTERNALSYM InterlockedPushEntrySList}
+
+function InterlockedFlushSList(ListHead: PSLIST_HEADER): PSLIST_ENTRY; stdcall;
+{$EXTERNALSYM InterlockedFlushSList}
+
+function QueryDepthSList(ListHead: PSLIST_HEADER): USHORT; stdcall;
+{$EXTERNALSYM QueryDepthSList}
+
+function FreeResource(hResData: HGLOBAL): BOOL; stdcall;
+{$EXTERNALSYM FreeResource}
+
+function LockResource(hResData: HGLOBAL): LPVOID; stdcall;
+{$EXTERNALSYM LockResource}
+
+function UnlockResource(hResData: HANDLE): BOOL;
+{$EXTERNALSYM UnlockResource}
+
+const
+ MAXINTATOM = $C000;
+ {$EXTERNALSYM MAXINTATOM}
+ INVALID_ATOM = ATOM(0);
+ {$EXTERNALSYM INVALID_ATOM}
+
+type
+ MAKEINTATOMA = PAnsiChar;
+ MAKEINTATOMW = PWideChar;
+ {$IFDEF UNICODE}
+ MAKEINTATOM = MAKEINTATOMW;
+ {$EXTERNALSYM MAKEINTATOM}
+ {$ELSE}
+ MAKEINTATOM = MAKEINTATOMA;
+ {$EXTERNALSYM MAKEINTATOM}
+ {$ENDIF UNICODE}
+
+function FreeLibrary(hLibModule: HMODULE): BOOL; stdcall;
+{$EXTERNALSYM FreeLibrary}
+
+procedure FreeLibraryAndExitThread(hLibModule: HMODULE; dwExitCode: DWORD); stdcall;
+{$EXTERNALSYM FreeLibraryAndExitThread}
+
+function DisableThreadLibraryCalls(hLibModule: HMODULE): BOOL; stdcall;
+{$EXTERNALSYM DisableThreadLibraryCalls}
+
+function GetProcAddress(hModule: HMODULE; lpProcName: LPCSTR): FARPROC; stdcall;
+{$EXTERNALSYM GetProcAddress}
+
+function GetVersion: DWORD; stdcall;
+{$EXTERNALSYM GetVersion)}
+
+function GlobalAlloc(uFlags: UINT; dwBytes: SIZE_T): HGLOBAL; stdcall;
+{$EXTERNALSYM GlobalAlloc}
+
+function GlobalReAlloc(hMem: HGLOBAL; dwBytes: SIZE_T; uFlags: UINT): HGLOBAL; stdcall;
+{$EXTERNALSYM GlobalReAlloc}
+
+function GlobalSize(hMem: HGLOBAL): SIZE_T; stdcall;
+{$EXTERNALSYM GlobalSize}
+
+function GlobalFlags(hMem: HGLOBAL): UINT; stdcall;
+{$EXTERNALSYM GlobalFlags}
+
+function GlobalLock(hMem: HGLOBAL): LPVOID; stdcall;
+{$EXTERNALSYM GlobalLock}
+
+//!!!MWH My version win31 = DWORD WINAPI GlobalHandle(UINT)
+
+function GlobalHandle(pMem: LPCVOID): HGLOBAL; stdcall;
+{$EXTERNALSYM GlobalHandle}
+
+function GlobalUnlock(hMem: HGLOBAL): BOOL; stdcall;
+{$EXTERNALSYM GlobalUnlock}
+
+function GlobalFree(hMem: HGLOBAL): HGLOBAL; stdcall;
+{$EXTERNALSYM GlobalFree}
+
+function GlobalCompact(dwMinFree: DWORD): SIZE_T; stdcall;
+{$EXTERNALSYM GlobalCompact}
+
+procedure GlobalFix(hMem: HGLOBAL); stdcall;
+{$EXTERNALSYM GlobalFix}
+
+procedure GlobalUnfix(hMem: HGLOBAL); stdcall;
+{$EXTERNALSYM GlobalUnfix}
+
+function GlobalWire(hMem: HGLOBAL): LPVOID; stdcall;
+{$EXTERNALSYM GlobalWire}
+
+function GlobalUnWire(hMem: HGLOBAL): BOOL; stdcall;
+{$EXTERNALSYM GlobalUnWire}
+
+procedure GlobalMemoryStatus(var lpBuffer: MEMORYSTATUS); stdcall;
+{$EXTERNALSYM GlobalMemoryStatus}
+
+type
+ LPMEMORYSTATUSEX = ^MEMORYSTATUSEX;
+ {$EXTERNALSYM LPMEMORYSTATUSEX}
+ _MEMORYSTATUSEX = record
+ dwLength: DWORD;
+ dwMemoryLoad: DWORD;
+ ullTotalPhys: DWORDLONG;
+ ullAvailPhys: DWORDLONG;
+ ullTotalPageFile: DWORDLONG;
+ ullAvailPageFile: DWORDLONG;
+ ullTotalVirtual: DWORDLONG;
+ ullAvailVirtual: DWORDLONG;
+ ullAvailExtendedVirtual: DWORDLONG;
+ end;
+ {$EXTERNALSYM _MEMORYSTATUSEX}
+ MEMORYSTATUSEX = _MEMORYSTATUSEX;
+ {$EXTERNALSYM MEMORYSTATUSEX}
+ TMemoryStatusEx = MEMORYSTATUSEX;
+ PMemoryStatusEx = LPMEMORYSTATUSEX;
+
+function GlobalMemoryStatusEx(var lpBuffer: MEMORYSTATUSEX): BOOL; stdcall;
+{$EXTERNALSYM GlobalMemoryStatusEx}
+
+function LocalAlloc(uFlags: UINT; uBytes: SIZE_T): HLOCAL; stdcall;
+{$EXTERNALSYM LocalAlloc}
+
+function LocalReAlloc(hMem: HLOCAL; uBytes: SIZE_T; uFlags: UINT): HLOCAL; stdcall;
+{$EXTERNALSYM LocalReAlloc}
+
+function LocalLock(hMem: HLOCAL): LPVOID; stdcall;
+{$EXTERNALSYM LocalLock}
+
+function LocalHandle(pMem: LPCVOID): HLOCAL; stdcall;
+{$EXTERNALSYM LocalHandle}
+
+function LocalUnlock(hMem: HLOCAL): BOOL; stdcall;
+{$EXTERNALSYM LocalUnlock}
+
+function LocalSize(hMem: HLOCAL): SIZE_T; stdcall;
+{$EXTERNALSYM LocalSize}
+
+function LocalFlags(hMem: HLOCAL): UINT; stdcall;
+{$EXTERNALSYM LocalFlags}
+
+function LocalFree(hMem: HLOCAL): HLOCAL; stdcall;
+{$EXTERNALSYM LocalFree}
+
+function LocalShrink(hMem: HLOCAL; cbNewSize: UINT): SIZE_T; stdcall;
+{$EXTERNALSYM LocalShrink}
+
+function LocalCompact(uMinFree: UINT): SIZE_T; stdcall;
+{$EXTERNALSYM LocalCompact}
+
+function FlushInstructionCache(hProcess: HANDLE; lpBaseAddress: LPCVOID;
+ dwSize: DWORD): BOOL; stdcall;
+{$EXTERNALSYM FlushInstructionCache}
+
+function VirtualAlloc(lpAddress: LPVOID; dwSize: SIZE_T; flAllocationType: DWORD;
+ flProtect: DWORD): LPVOID; stdcall;
+{$EXTERNALSYM VirtualAlloc}
+
+function VirtualFree(lpAddress: LPVOID; dwSize: SIZE_T; dwFreeType: DWORD): BOOL; stdcall;
+{$EXTERNALSYM VirtualFree}
+
+function VirtualProtect(lpAddress: LPVOID; dwSize: SIZE_T; flNewProtect: DWORD;
+ lpflOldProtect: PDWORD): BOOL; stdcall;
+{$EXTERNALSYM VirtualProtect}
+
+function VirtualQuery(lpAddress: LPCVOID; var lpBuffer: MEMORY_BASIC_INFORMATION;
+ dwLength: DWORD): DWORD; stdcall;
+{$EXTERNALSYM VirtualQuery}
+
+function VirtualAllocEx(hProcess: HANDLE; lpAddress: LPVOID; dwSize: SIZE_T;
+ flAllocationType: DWORD; flProtect: DWORD): LPVOID; stdcall;
+{$EXTERNALSYM VirtualAllocEx}
+
+function GetWriteWatch(dwFlags: DWORD; lpBaseAddress: PVOID;
+ dwRegionSize: SIZE_T; var lpAddresses: PVOID; var lpdwCount: ULONG_PTR;
+ var lpdwGranularity: ULONG): UINT; stdcall;
+{$EXTERNALSYM GetWriteWatch}
+
+function ResetWriteWatch(lpBaseAddress: LPVOID; dwRegionSize: SIZE_T): UINT; stdcall;
+{$EXTERNALSYM ResetWriteWatch}
+
+function GetLargePageMinimum: SIZE_T; stdcall;
+{$EXTERNALSYM GetLargePageMinimum}
+
+function VirtualFreeEx(hProcess: HANDLE; lpAddress: LPVOID; dwSize: SIZE_T;
+ dwFreeType: DWORD): BOOL; stdcall;
+{$EXTERNALSYM VirtualFreeEx}
+
+function VirtualProtectEx(hProcess: HANDLE; lpAddress: LPVOID; dwSize: SIZE_T;
+ flNewProtect: DWORD; lpflOldProtect: PDWORD): BOOL; stdcall;
+{$EXTERNALSYM VirtualProtectEx}
+
+function VirtualQueryEx(hProcess: HANDLE; lpAddress: LPCVOID;
+ var lpBuffer: MEMORY_BASIC_INFORMATION; dwLength: DWORD): DWORD; stdcall;
+{$EXTERNALSYM VirtualQueryEx}
+
+function HeapCreate(flOptions: DWORD; dwInitialSize: SIZE_T;
+ dwMaximumSize: SIZE_T): HANDLE; stdcall;
+{$EXTERNALSYM HeapCreate}
+
+function HeapDestroy(hHeap: HANDLE): BOOL; stdcall;
+{$EXTERNALSYM HeapDestroy}
+
+function HeapAlloc(hHeap: HANDLE; dwFlags: DWORD; dwBytes: SIZE_T): LPVOID; stdcall;
+{$EXTERNALSYM HeapAlloc}
+
+function HeapReAlloc(hHeap: HANDLE; dwFlags: DWORD; lpMem: LPVOID; dwBytes: SIZE_T): LPVOID; stdcall;
+{$EXTERNALSYM HeapReAlloc}
+
+function HeapFree(hHeap: HANDLE; dwFlags: DWORD; lpMem: LPVOID): BOOL; stdcall;
+{$EXTERNALSYM HeapFree}
+
+function HeapSize(hHeap: HANDLE; dwFlags: DWORD; lpMem: LPCVOID): SIZE_T; stdcall;
+{$EXTERNALSYM HeapSize}
+
+function HeapValidate(hHeap: HANDLE; dwFlags: DWORD; lpMem: LPCVOID): BOOL; stdcall;
+{$EXTERNALSYM HeapValidate}
+
+function HeapCompact(hHeap: HANDLE; dwFlags: DWORD): SIZE_T; stdcall;
+{$EXTERNALSYM HeapCompact}
+
+function GetProcessHeap: HANDLE; stdcall;
+{$EXTERNALSYM GetProcessHeap)}
+
+function GetProcessHeaps(NumberOfHeaps: DWORD; var ProcessHeaps: HANDLE): DWORD; stdcall;
+{$EXTERNALSYM GetProcessHeaps}
+
+type
+ PPROCESS_HEAP_ENTRY = ^PROCESS_HEAP_ENTRY;
+ {$EXTERNALSYM PPROCESS_HEAP_ENTRY}
+ _PROCESS_HEAP_ENTRY = record
+ lpData: PVOID;
+ cbData: DWORD;
+ cbOverhead: BYTE;
+ iRegionIndex: BYTE;
+ wFlags: WORD;
+ case Integer of
+ 0: (
+ hMem: HANDLE;
+ dwReserved: array [0..2] of DWORD);
+ 1: (
+ dwComittedSize: DWORD;
+ dwUnComittedSize: DWORD;
+ lpFirstBlock: LPVOID;
+ lpLastBlock: LPVOID);
+ end;
+ {$EXTERNALSYM _PROCESS_HEAP_ENTRY}
+ PROCESS_HEAP_ENTRY = _PROCESS_HEAP_ENTRY;
+ {$EXTERNALSYM PROCESS_HEAP_ENTRY}
+ LPPROCESS_HEAP_ENTRY = ^PROCESS_HEAP_ENTRY;
+ {$EXTERNALSYM LPPROCESS_HEAP_ENTRY}
+ TProcessHeapEntry = PROCESS_HEAP_ENTRY;
+ PProcessHeapEntry = PPROCESS_HEAP_ENTRY;
+
+const
+ PROCESS_HEAP_REGION = $0001;
+ {$EXTERNALSYM PROCESS_HEAP_REGION}
+ PROCESS_HEAP_UNCOMMITTED_RANGE = $0002;
+ {$EXTERNALSYM PROCESS_HEAP_UNCOMMITTED_RANGE}
+ PROCESS_HEAP_ENTRY_BUSY = $0004;
+ {$EXTERNALSYM PROCESS_HEAP_ENTRY_BUSY}
+ PROCESS_HEAP_ENTRY_MOVEABLE = $0010;
+ {$EXTERNALSYM PROCESS_HEAP_ENTRY_MOVEABLE}
+ PROCESS_HEAP_ENTRY_DDESHARE = $0020;
+ {$EXTERNALSYM PROCESS_HEAP_ENTRY_DDESHARE}
+
+function HeapLock(hHeap: HANDLE): BOOL; stdcall;
+{$EXTERNALSYM HeapLock}
+
+function HeapUnlock(hHeap: HANDLE): BOOL; stdcall;
+{$EXTERNALSYM HeapUnlock}
+
+function HeapWalk(hHeap: HANDLE; var lpEntry: PROCESS_HEAP_ENTRY): BOOL; stdcall;
+{$EXTERNALSYM HeapWalk}
+
+function HeapSetInformation(HeapHandle: HANDLE; HeapInformationClass: HEAP_INFORMATION_CLASS;
+ HeapInformation: PVOID; HeapInformationLength: SIZE_T): BOOL; stdcall;
+{$EXTERNALSYM HeapSetInformation}
+
+function HeapQueryInformation(HeapHandle: HANDLE; HeapInformationClass: HEAP_INFORMATION_CLASS;
+ HeapInformation: PVOID; HeapInformationLength: SIZE_T; ReturnLength: PSIZE_T): BOOL; stdcall;
+{$EXTERNALSYM HeapQueryInformation}
+
+// GetBinaryType return values.
+
+const
+ SCS_32BIT_BINARY = 0;
+ {$EXTERNALSYM SCS_32BIT_BINARY}
+ SCS_DOS_BINARY = 1;
+ {$EXTERNALSYM SCS_DOS_BINARY}
+ SCS_WOW_BINARY = 2;
+ {$EXTERNALSYM SCS_WOW_BINARY}
+ SCS_PIF_BINARY = 3;
+ {$EXTERNALSYM SCS_PIF_BINARY}
+ SCS_POSIX_BINARY = 4;
+ {$EXTERNALSYM SCS_POSIX_BINARY}
+ SCS_OS216_BINARY = 5;
+ {$EXTERNALSYM SCS_OS216_BINARY}
+ SCS_64BIT_BINARY = 6;
+ {$EXTERNALSYM SCS_64BIT_BINARY}
+
+ SCS_THIS_PLATFORM_BINARY = SCS_32BIT_BINARY;
+ {$EXTERNALSYM SCS_THIS_PLATFORM_BINARY}
+
+function GetBinaryTypeA(lpApplicationName: LPCSTR; var lpBinaryType: DWORD): BOOL; stdcall;
+{$EXTERNALSYM GetBinaryTypeA}
+function GetBinaryTypeW(lpApplicationName: LPCWSTR; var lpBinaryType: DWORD): BOOL; stdcall;
+{$EXTERNALSYM GetBinaryTypeW}
+function GetBinaryType(lpApplicationName: LPCTSTR; var lpBinaryType: DWORD): BOOL; stdcall;
+{$EXTERNALSYM GetBinaryType}
+
+function GetShortPathNameA(lpszLongPath: LPCSTR; lpszShortPath: LPSTR;
+ cchBuffer: DWORD): DWORD; stdcall;
+{$EXTERNALSYM GetShortPathNameA}
+function GetShortPathNameW(lpszLongPath: LPCWSTR; lpszShortPath: LPWSTR;
+ cchBuffer: DWORD): DWORD; stdcall;
+{$EXTERNALSYM GetShortPathNameW}
+function GetShortPathName(lpszLongPath: LPCTSTR; lpszShortPath: LPTSTR;
+ cchBuffer: DWORD): DWORD; stdcall;
+{$EXTERNALSYM GetShortPathName}
+
+function GetLongPathNameA(lpszShortPath: LPCSTR; lpszLongPath: LPSTR;
+ cchBuffer: DWORD): DWORD; stdcall;
+{$EXTERNALSYM GetLongPathNameA}
+function GetLongPathNameW(lpszShortPath: LPCWSTR; lpszLongPath: LPWSTR;
+ cchBuffer: DWORD): DWORD; stdcall;
+{$EXTERNALSYM GetLongPathNameW}
+function GetLongPathName(lpszShortPath: LPCTSTR; lpszLongPath: LPTSTR;
+ cchBuffer: DWORD): DWORD; stdcall;
+{$EXTERNALSYM GetLongPathName}
+
+function GetProcessAffinityMask(hProcess: HANDLE;
+ var lpProcessAffinityMask, lpSystemAffinityMask: DWORD_PTR): BOOL; stdcall;
+{$EXTERNALSYM GetProcessAffinityMask}
+
+function SetProcessAffinityMask(hProcess: HANDLE;
+ dwProcessAffinityMask: DWORD_PTR): BOOL; stdcall;
+{$EXTERNALSYM SetProcessAffinityMask}
+
+function GetProcessHandleCount(hProcess: HANDLE; out pdwHandleCount: DWORD): BOOL; stdcall;
+{$EXTERNALSYM GetProcessHandleCount}
+
+function GetProcessTimes(hProcess: HANDLE; var lpCreationTime, lpExitTime,
+ lpKernelTime, lpUserTime: FILETIME): BOOL; stdcall;
+{$EXTERNALSYM GetProcessTimes}
+
+function GetProcessIoCounters(hProcess: HANDLE; var lpIoCounters: IO_COUNTERS): BOOL; stdcall;
+{$EXTERNALSYM GetProcessIoCounters}
+
+function GetProcessWorkingSetSize(hProcess: HANDLE;
+ var lpMinimumWorkingSetSize, lpMaximumWorkingSetSize: SIZE_T): BOOL; stdcall;
+{$EXTERNALSYM GetProcessWorkingSetSize}
+
+function GetProcessWorkingSetSizeEx(hProcess: HANDLE; out lpMinimumWorkingSetSize, lpMaximumWorkingSetSize: SIZE_T; out Flags: DWORD): BOOL; stdcall;
+{$EXTERNALSYM GetProcessWorkingSetSizeEx}
+
+function SetProcessWorkingSetSize(hProcess: HANDLE; dwMinimumWorkingSetSize,
+ dwMaximumWorkingSetSize: SIZE_T): BOOL; stdcall;
+{$EXTERNALSYM SetProcessWorkingSetSize}
+
+function SetProcessWorkingSetSizeEx(hProcess: HANDLE; dwMinimumWorkingSetSize, dwMaximumWorkingSetSize: SIZE_T; Flags: DWORD): BOOL; stdcall;
+{$EXTERNALSYM SetProcessWorkingSetSizeEx}
+
+function OpenProcess(dwDesiredAccess: DWORD; bInheritHandle: BOOL;
+ dwProcessId: DWORD): HANDLE; stdcall;
+{$EXTERNALSYM OpenProcess}
+
+function GetCurrentProcess: HANDLE; stdcall;
+{$EXTERNALSYM GetCurrentProcess}
+
+function GetCurrentProcessId: DWORD; stdcall;
+{$EXTERNALSYM GetCurrentProcessId}
+
+procedure ExitProcess(uExitCode: UINT); stdcall;
+{$EXTERNALSYM ExitProcess}
+
+function TerminateProcess(hProcess: HANDLE; uExitCode: UINT): BOOL; stdcall;
+{$EXTERNALSYM TerminateProcess}
+
+function GetExitCodeProcess(hProcess: HANDLE; var lpExitCode: DWORD): BOOL; stdcall;
+{$EXTERNALSYM GetExitCodeProcess}
+
+procedure FatalExit(ExitCode: Integer); stdcall;
+{$EXTERNALSYM FatalExit}
+
+function GetEnvironmentStringsW: LPWSTR; stdcall;
+{$EXTERNALSYM GetEnvironmentStringsW}
+
+function GetEnvironmentStrings: LPSTR; stdcall;
+{$EXTERNALSYM GetEnvironmentStrings}
+
+{$IFNDEF UNICODE}
+function GetEnvironmentStringsA: LPSTR; stdcall;
+{$EXTERNALSYM GetEnvironmentStringsA}
+{$ENDIF !UNICODE}
+
+function SetEnvironmentStringsA(NewEnvironment: LPSTR): BOOL; stdcall;
+{$EXTERNALSYM SetEnvironmentStringsA}
+
+function SetEnvironmentStringsW(NewEnvironment: LPWSTR): BOOL; stdcall;
+{$EXTERNALSYM SetEnvironmentStringsW}
+function SetEnvironmentStrings(NewEnvironment: LPTSTR): BOOL; stdcall;
+{$EXTERNALSYM SetEnvironmentStrings}
+
+function FreeEnvironmentStringsA(pstr: LPSTR): BOOL; stdcall;
+{$EXTERNALSYM FreeEnvironmentStringsA}
+function FreeEnvironmentStringsW(pstr: LPWSTR): BOOL; stdcall;
+{$EXTERNALSYM FreeEnvironmentStringsW}
+function FreeEnvironmentStrings(pstr: LPTSTR): BOOL; stdcall;
+{$EXTERNALSYM FreeEnvironmentStrings}
+
+procedure RaiseException(dwExceptionCode: DWORD; dwExceptionFlags: DWORD;
+ nNumberOfArguments: DWORD; lpArguments: PULONG_PTR); stdcall;
+{$EXTERNALSYM RaiseException}
+
+function UnhandledExceptionFilter(ExceptionInfo: PEXCEPTION_POINTERS): LONG; stdcall;
+{$EXTERNALSYM UnhandledExceptionFilter}
+
+type
+ PTOP_LEVEL_EXCEPTION_FILTER = function(ExceptionInfo: PEXCEPTION_POINTERS): LONG; stdcall;
+ {$EXTERNALSYM PTOP_LEVEL_EXCEPTION_FILTER}
+ LPTOP_LEVEL_EXCEPTION_FILTER = PTOP_LEVEL_EXCEPTION_FILTER;
+ {$EXTERNALSYM LPTOP_LEVEL_EXCEPTION_FILTER}
+ TTopLevelExceptionFilter = PTOP_LEVEL_EXCEPTION_FILTER;
+
+function SetUnhandledExceptionFilter(lpTopLevelExceptionFilter: LPTOP_LEVEL_EXCEPTION_FILTER): LPTOP_LEVEL_EXCEPTION_FILTER; stdcall;
+{$EXTERNALSYM SetUnhandledExceptionFilter}
+
+//
+// Fiber creation flags
+//
+
+const
+ FIBER_FLAG_FLOAT_SWITCH = $1; // context switch floating point
+ {$EXTERNALSYM FIBER_FLAG_FLOAT_SWITCH}
+
+function CreateFiber(dwStackSize: DWORD; lpStartAddress: LPFIBER_START_ROUTINE;
+ lpParameter: LPVOID): LPVOID; stdcall;
+{$EXTERNALSYM CreateFiber}
+
+function CreateFiberEx(dwStackCommitSize, dwStackReserveSize: SIZE_T; dwFlags: DWORD;
+ lpStartAddress: LPFIBER_START_ROUTINE; lpParameter: LPVOID): LPVOID; stdcall;
+{$EXTERNALSYM CreateFiberEx}
+
+procedure DeleteFiber(lpFiber: LPVOID); stdcall;
+{$EXTERNALSYM DeleteFiber}
+
+function ConvertThreadToFiber(lpParameter: LPVOID): LPVOID; stdcall;
+{$EXTERNALSYM ConvertThreadToFiber}
+
+function ConvertThreadToFiberEx(lpParameter: LPVOID; dwFlags: DWORD): LPVOID; stdcall;
+{$EXTERNALSYM ConvertThreadToFiberEx}
+
+function ConvertFiberToThread: BOOL; stdcall;
+{$EXTERNALSYM ConvertFiberToThread}
+
+procedure SwitchToFiber(lpFiber: LPVOID); stdcall;
+{$EXTERNALSYM SwitchToFiber}
+
+function SwitchToThread: BOOL; stdcall;
+{$EXTERNALSYM SwitchToThread}
+
+function CreateThread(lpThreadAttributes: LPSECURITY_ATTRIBUTES;
+ dwStackSize: DWORD; lpStartAddress: LPTHREAD_START_ROUTINE; lpParameter: LPVOID;
+ dwCreationFlags: DWORD; lpThreadId: LPDWORD): HANDLE; stdcall;
+{$EXTERNALSYM CreateThread}
+
+function CreateRemoteThread(hProcess: HANDLE;
+ lpThreadAttributes: LPSECURITY_ATTRIBUTES; dwStackSize: DWORD;
+ lpStartAddress: LPTHREAD_START_ROUTINE; lpParameter: LPVOID;
+ dwCreationFlags: DWORD; lpThreadId: LPDWORD): HANDLE; stdcall;
+{$EXTERNALSYM CreateRemoteThread}
+
+function GetCurrentThread: HANDLE; stdcall;
+{$EXTERNALSYM GetCurrentThread}
+
+function GetCurrentThreadId: DWORD; stdcall;
+{$EXTERNALSYM GetCurrentThreadId}
+
+function GetProcessIdOfThread(Thread: HANDLE): DWORD; stdcall;
+{$EXTERNALSYM GetProcessIdOfThread}
+
+function GetThreadId(Thread: HANDLE): DWORD; stdcall;
+{$EXTERNALSYM GetThreadId}
+
+function GetProcessId(Process: HANDLE): DWORD; stdcall;
+{$EXTERNALSYM GetProcessId}
+
+function GetCurrentProcessorNumber: DWORD; stdcall;
+{$EXTERNALSYM GetCurrentProcessorNumber}
+
+function SetThreadAffinityMask(hThread: HANDLE;
+ dwThreadAffinityMask: DWORD_PTR): DWORD_PTR; stdcall;
+{$EXTERNALSYM SetThreadAffinityMask}
+
+function SetThreadIdealProcessor(hThread: HANDLE; dwIdealProcessor: DWORD): DWORD; stdcall;
+{$EXTERNALSYM SetThreadIdealProcessor}
+
+function SetProcessPriorityBoost(hProcess: HANDLE;
+ bDisablePriorityBoost: BOOL): BOOL; stdcall;
+{$EXTERNALSYM SetProcessPriorityBoost}
+
+function GetProcessPriorityBoost(hProcess: HANDLE;
+ var pDisablePriorityBoost: BOOL): BOOL; stdcall;
+{$EXTERNALSYM GetProcessPriorityBoost}
+
+function RequestWakeupLatency(latency: LATENCY_TIME): BOOL; stdcall;
+{$EXTERNALSYM RequestWakeupLatency}
+
+function IsSystemResumeAutomatic: BOOL; stdcall;
+{$EXTERNALSYM IsSystemResumeAutomatic}
+
+function OpenThread(dwDesiredAccess: DWORD; bInheritHandle: BOOL;
+ dwThreadId: DWORD): HANDLE; stdcall;
+{$EXTERNALSYM OpenThread}
+
+function SetThreadPriority(hThread: HANDLE; nPriority: Integer): BOOL; stdcall;
+{$EXTERNALSYM SetThreadPriority}
+
+function SetThreadPriorityBoost(hThread: HANDLE; bDisablePriorityBoost: BOOL): BOOL; stdcall;
+{$EXTERNALSYM SetThreadPriorityBoost}
+
+function GetThreadPriorityBoost(hThread: HANDLE;
+ var pDisablePriorityBoost: BOOL): BOOL; stdcall;
+{$EXTERNALSYM GetThreadPriorityBoost}
+
+function GetThreadPriority(hThread: HANDLE): Integer; stdcall;
+{$EXTERNALSYM GetThreadPriority}
+
+function GetThreadTimes(hThread: HANDLE; var lpCreationTime, lpExitTime,
+ lpKernelTime, lpUserTime: FILETIME): BOOL; stdcall;
+{$EXTERNALSYM GetThreadTimes}
+
+function GetThreadIOPendingFlag(hThread: HANDLE; out lpIOIsPending: BOOL): BOOL; stdcall;
+{$EXTERNALSYM GetThreadIOPendingFlag}
+
+procedure ExitThread(dwExitCode: DWORD); stdcall;
+{$EXTERNALSYM ExitThread}
+
+function TerminateThread(hThread: HANDLE; dwExitCode: DWORD): BOOL; stdcall;
+{$EXTERNALSYM TerminateThread}
+
+function GetExitCodeThread(hThread: HANDLE; var lpExitCode: DWORD): BOOL; stdcall;
+{$EXTERNALSYM GetExitCodeThread}
+
+function GetThreadSelectorEntry(hThread: HANDLE; dwSelector: DWORD;
+ var lpSelectorEntry: LDT_ENTRY): BOOL; stdcall;
+{$EXTERNALSYM GetThreadSelectorEntry}
+
+function SetThreadExecutionState(esFlags: EXECUTION_STATE): EXECUTION_STATE; stdcall;
+{$EXTERNALSYM SetThreadExecutionState}
+
+function GetLastError: DWORD; stdcall;
+{$EXTERNALSYM GetLastError}
+
+procedure SetLastError(dwErrCode: DWORD); stdcall;
+{$EXTERNALSYM SetLastError}
+
+procedure RestoreLastError(dwErrCode: DWORD); stdcall;
+{$EXTERNALSYM RestoreLastError}
+
+type
+ PRESTORE_LAST_ERROR = procedure(dwErrCode: DWORD); stdcall;
+ {$EXTERNALSYM PRESTORE_LAST_ERROR}
+
+const
+ RESTORE_LAST_ERROR_NAME_A = 'RestoreLastError';
+ {$EXTERNALSYM RESTORE_LAST_ERROR_NAME_A}
+ RESTORE_LAST_ERROR_NAME_W = WideString('RestoreLastError');
+ {$EXTERNALSYM RESTORE_LAST_ERROR_NAME_W}
+ RESTORE_LAST_ERROR_NAME = __TEXT('RestoreLastError');
+ {$EXTERNALSYM RESTORE_LAST_ERROR_NAME}
+
+function HasOverlappedIoCompleted(const lpOverlapped: OVERLAPPED): BOOL;
+{$EXTERNALSYM HasOverlappedIoCompleted}
+
+function GetOverlappedResult(hFile: HANDLE; const lpOverlapped: OVERLAPPED;
+ var lpNumberOfBytesTransferred: DWORD; bWait: BOOL): BOOL; stdcall;
+{$EXTERNALSYM GetOverlappedResult}
+
+function CreateIoCompletionPort(FileHandle: HANDLE; ExistingCompletionPort: HANDLE;
+ CompletionKey: ULONG_PTR; NumberOfConcurrentThreads: DWORD): HANDLE; stdcall;
+{$EXTERNALSYM CreateIoCompletionPort}
+
+function GetQueuedCompletionStatus(CompletionPort: HANDLE;
+ var lpNumberOfBytesTransferred: DWORD; var lpCompletionKey: ULONG_PTR;
+ var lpOverlapped: LPOVERLAPPED; dwMilliseconds: DWORD): BOOL; stdcall;
+{$EXTERNALSYM GetQueuedCompletionStatus}
+
+function PostQueuedCompletionStatus(CompletionPort: HANDLE;
+ dwNumberOfBytesTransferred: DWORD; dwCompletionKey: ULONG_PTR;
+ lpOverlapped: LPOVERLAPPED): BOOL; stdcall;
+{$EXTERNALSYM PostQueuedCompletionStatus}
+
+const
+ SEM_FAILCRITICALERRORS = $0001;
+ {$EXTERNALSYM SEM_FAILCRITICALERRORS}
+ SEM_NOGPFAULTERRORBOX = $0002;
+ {$EXTERNALSYM SEM_NOGPFAULTERRORBOX}
+ SEM_NOALIGNMENTFAULTEXCEPT = $0004;
+ {$EXTERNALSYM SEM_NOALIGNMENTFAULTEXCEPT}
+ SEM_NOOPENFILEERRORBOX = $8000;
+ {$EXTERNALSYM SEM_NOOPENFILEERRORBOX}
+
+function SetErrorMode(uMode: UINT): UINT; stdcall;
+{$EXTERNALSYM SetErrorMode}
+
+function ReadProcessMemory(hProcess: HANDLE; lpBaseAddress: LPCVOID;
+ lpBuffer: LPVOID; nSize: DWORD; lpNumberOfBytesRead: LPDWORD): BOOL; stdcall;
+{$EXTERNALSYM ReadProcessMemory}
+
+function WriteProcessMemory(hProcess: HANDLE; lpBaseAddress: LPVOID;
+ lpBuffer: LPVOID; nSize: DWORD; lpNumberOfBytesWritten: LPDWORD): BOOL; stdcall;
+{$EXTERNALSYM WriteProcessMemory}
+
+function GetThreadContext(hThread: HANDLE; var lpContext: CONTEXT): BOOL; stdcall;
+{$EXTERNALSYM GetThreadContext}
+
+function SetThreadContext(hThread: HANDLE; const lpContext: CONTEXT): BOOL; stdcall;
+{$EXTERNALSYM SetThreadContext}
+
+function SuspendThread(hThread: HANDLE): DWORD; stdcall;
+{$EXTERNALSYM SuspendThread}
+
+function ResumeThread(hThread: HANDLE): DWORD; stdcall;
+{$EXTERNALSYM ResumeThread}
+
+type
+ PAPCFUNC = procedure(dwParam: ULONG_PTR); stdcall;
+ {$EXTERNALSYM PAPCFUNC}
+ TApcFunc = PAPCFUNC;
+
+function QueueUserAPC(pfnAPC: PAPCFUNC; hThread: HANDLE; dwData: ULONG_PTR): DWORD; stdcall;
+{$EXTERNALSYM QueueUserAPC}
+
+function IsDebuggerPresent: BOOL; stdcall;
+{$EXTERNALSYM IsDebuggerPresent}
+
+function CheckRemoteDebuggerPresent(hProcess: HANDLE; out pbDebuggerPresent: BOOL): BOOL; stdcall;
+{$EXTERNALSYM CheckRemoteDebuggerPresent}
+
+procedure DebugBreak; stdcall;
+{$EXTERNALSYM DebugBreak}
+
+function WaitForDebugEvent(var lpDebugEvent: DEBUG_EVENT; dwMilliseconds: DWORD): BOOL; stdcall;
+{$EXTERNALSYM WaitForDebugEvent}
+
+function ContinueDebugEvent(dwProcessId: DWORD; dwThreadId: DWORD;
+ dwContinueStatus: DWORD): BOOL; stdcall;
+{$EXTERNALSYM ContinueDebugEvent}
+
+function DebugActiveProcess(dwProcessId: DWORD): BOOL; stdcall;
+{$EXTERNALSYM DebugActiveProcess}
+
+function DebugActiveProcessStop(dwProcessId: DWORD): BOOL; stdcall;
+{$EXTERNALSYM DebugActiveProcessStop}
+
+function DebugSetProcessKillOnExit(KillOnExit: BOOL): BOOL; stdcall;
+{$EXTERNALSYM DebugSetProcessKillOnExit}
+
+function DebugBreakProcess(Process: HANDLE): BOOL; stdcall;
+{$EXTERNALSYM DebugBreakProcess}
+
+procedure InitializeCriticalSection(var lpCriticalSection: CRITICAL_SECTION); stdcall;
+{$EXTERNALSYM InitializeCriticalSection}
+
+procedure EnterCriticalSection(var lpCriticalSection: CRITICAL_SECTION); stdcall;
+{$EXTERNALSYM EnterCriticalSection}
+
+procedure LeaveCriticalSection(var lpCriticalSection: CRITICAL_SECTION); stdcall;
+{$EXTERNALSYM LeaveCriticalSection}
+
+function InitializeCriticalSectionAndSpinCount(var lpCriticalSection: CRITICAL_SECTION;
+ dwSpinCount: DWORD): BOOL; stdcall;
+{$EXTERNALSYM InitializeCriticalSectionAndSpinCount}
+
+function SetCriticalSectionSpinCount(var lpCriticalSection: CRITICAL_SECTION;
+ dwSpinCount: DWORD): DWORD; stdcall;
+{$EXTERNALSYM SetCriticalSectionSpinCount}
+
+function TryEnterCriticalSection(var lpCriticalSection: CRITICAL_SECTION): BOOL; stdcall;
+{$EXTERNALSYM TryEnterCriticalSection}
+
+procedure DeleteCriticalSection(var lpCriticalSection: CRITICAL_SECTION); stdcall;
+{$EXTERNALSYM DeleteCriticalSection}
+
+function SetEvent(hEvent: HANDLE): BOOL; stdcall;
+{$EXTERNALSYM SetEvent}
+
+function ResetEvent(hEvent: HANDLE): BOOL; stdcall;
+{$EXTERNALSYM ResetEvent}
+
+function PulseEvent(hEvent: HANDLE): BOOL; stdcall;
+{$EXTERNALSYM PulseEvent}
+
+function ReleaseSemaphore(hSemaphore: HANDLE; lReleaseCount: LONG;
+ lpPreviousCount: LPLONG): BOOL; stdcall;
+{$EXTERNALSYM ReleaseSemaphore}
+
+function ReleaseMutex(hMutex: HANDLE): BOOL; stdcall;
+{$EXTERNALSYM ReleaseMutex}
+
+function WaitForSingleObject(hHandle: HANDLE; dwMilliseconds: DWORD): DWORD; stdcall;
+{$EXTERNALSYM WaitForSingleObject}
+
+function WaitForMultipleObjects(nCount: DWORD; lpHandles: PHANDLE; bWaitAll: BOOL;
+ dwMilliseconds: DWORD): DWORD; stdcall;
+{$EXTERNALSYM WaitForMultipleObjects}
+
+procedure Sleep(dwMilliseconds: DWORD); stdcall;
+{$EXTERNALSYM Sleep}
+
+function LoadResource(hModule: HMODULE; hResInfo: HRSRC): HGLOBAL; stdcall;
+{$EXTERNALSYM LoadResource}
+
+function SizeofResource(hModule: HMODULE; hResInfo: HRSRC): DWORD; stdcall;
+{$EXTERNALSYM SizeofResource}
+
+function GlobalDeleteAtom(nAtom: ATOM): ATOM; stdcall;
+{$EXTERNALSYM GlobalDeleteAtom}
+
+function InitAtomTable(nSize: DWORD): BOOL; stdcall;
+{$EXTERNALSYM InitAtomTable}
+
+function DeleteAtom(nAtom: ATOM): ATOM; stdcall;
+{$EXTERNALSYM DeleteAtom}
+
+function SetHandleCount(uNumber: UINT): UINT; stdcall;
+{$EXTERNALSYM SetHandleCount}
+
+function GetLogicalDrives: DWORD; stdcall;
+{$EXTERNALSYM GetLogicalDrives}
+
+function LockFile(hFile: HANDLE; dwFileOffsetLow: DWORD; dwFileOffsetHigh: DWORD;
+ nNumberOfBytesToLockLow: DWORD; nNumberOfBytesToLockHigh: DWORD): BOOL; stdcall;
+{$EXTERNALSYM LockFile}
+
+function UnlockFile(hFile: HANDLE; dwFileOffsetLow: DWORD; dwFileOffsetHigh: DWORD;
+ nNumberOfBytesToUnlockLow: DWORD; nNumberOfBytesToUnlockHigh: DWORD): BOOL; stdcall;
+{$EXTERNALSYM UnlockFile}
+
+function LockFileEx(hFile: HANDLE; dwFlags: DWORD; dwReserved: DWORD;
+ nNumberOfBytesToLockLow: DWORD; nNumberOfBytesToLockHigh: DWORD;
+ const lpOverlapped: OVERLAPPED): BOOL; stdcall;
+{$EXTERNALSYM LockFileEx}
+
+const
+ LOCKFILE_FAIL_IMMEDIATELY = $00000001;
+ {$EXTERNALSYM LOCKFILE_FAIL_IMMEDIATELY}
+ LOCKFILE_EXCLUSIVE_LOCK = $00000002;
+ {$EXTERNALSYM LOCKFILE_EXCLUSIVE_LOCK}
+
+function UnlockFileEx(hFile: HANDLE; dwReserved: DWORD;
+ nNumberOfBytesToUnlockLow: DWORD; nNumberOfBytesToUnlockHigh: DWORD;
+ const lpOverlapped: OVERLAPPED): BOOL; stdcall;
+{$EXTERNALSYM UnlockFileEx}
+
+type
+ PBY_HANDLE_FILE_INFORMATION = ^BY_HANDLE_FILE_INFORMATION;
+ {$EXTERNALSYM PBY_HANDLE_FILE_INFORMATION}
+ _BY_HANDLE_FILE_INFORMATION = record
+ dwFileAttributes: DWORD;
+ ftCreationTime: FILETIME;
+ ftLastAccessTime: FILETIME;
+ ftLastWriteTime: FILETIME;
+ dwVolumeSerialNumber: DWORD;
+ nFileSizeHigh: DWORD;
+ nFileSizeLow: DWORD;
+ nNumberOfLinks: DWORD;
+ nFileIndexHigh: DWORD;
+ nFileIndexLow: DWORD;
+ end;
+ {$EXTERNALSYM _BY_HANDLE_FILE_INFORMATION}
+ BY_HANDLE_FILE_INFORMATION = _BY_HANDLE_FILE_INFORMATION;
+ {$EXTERNALSYM BY_HANDLE_FILE_INFORMATION}
+ LPBY_HANDLE_FILE_INFORMATION = ^BY_HANDLE_FILE_INFORMATION;
+ {$EXTERNALSYM LPBY_HANDLE_FILE_INFORMATION}
+ TByHandleFileInformation = BY_HANDLE_FILE_INFORMATION;
+ PByHandleFileInformation = PBY_HANDLE_FILE_INFORMATION;
+
+function GetFileInformationByHandle(hFile: HANDLE;
+ var lpFileInformation: BY_HANDLE_FILE_INFORMATION): BOOL; stdcall;
+{$EXTERNALSYM GetFileInformationByHandle}
+
+function GetFileType(hFile: HANDLE): DWORD; stdcall;
+{$EXTERNALSYM GetFileType}
+
+function GetFileSize(hFile: HANDLE; lpFileSizeHigh: LPDWORD): DWORD; stdcall;
+{$EXTERNALSYM GetFileSize}
+
+function GetFileSizeEx(hFile: HANDLE; var lpFileSize: LARGE_INTEGER): BOOL; stdcall;
+{$EXTERNALSYM GetFileSizeEx}
+
+function GetStdHandle(nStdHandle: DWORD): HANDLE; stdcall;
+{$EXTERNALSYM GetStdHandle}
+
+function SetStdHandle(nStdHandle: DWORD; hHandle: HANDLE): BOOL; stdcall;
+{$EXTERNALSYM SetStdHandle}
+
+function WriteFile(hFile: HANDLE; lpBuffer: LPCVOID; nNumberOfBytesToWrite: DWORD;
+ lpNumberOfBytesWritten: LPDWORD; lpOverlapped: LPOVERLAPPED): BOOL; stdcall;
+{$EXTERNALSYM WriteFile}
+
+function ReadFile(hFile: HANDLE; lpBuffer: LPVOID; nNumberOfBytesToRead: DWORD;
+ lpNumberOfBytesRead: LPDWORD; lpOverlapped: LPOVERLAPPED): BOOL; stdcall;
+{$EXTERNALSYM ReadFile}
+
+function FlushFileBuffers(hFile: HANDLE): BOOL; stdcall;
+{$EXTERNALSYM FlushFileBuffers}
+
+function DeviceIoControl(hDevice: HANDLE; dwIoControlCode: DWORD;
+ lpInBuffer: LPVOID; nInBufferSize: DWORD; lpOutBuffer: LPVOID;
+ nOutBufferSize: DWORD; lpBytesReturned: LPDWORD;
+ lpOverlapped: LPOVERLAPPED): BOOL; stdcall;
+{$EXTERNALSYM DeviceIoControl}
+
+function RequestDeviceWakeup(hDevice: HANDLE): BOOL; stdcall;
+{$EXTERNALSYM RequestDeviceWakeup}
+
+function CancelDeviceWakeupRequest(hDevice: HANDLE): BOOL; stdcall;
+{$EXTERNALSYM CancelDeviceWakeupRequest}
+
+function GetDevicePowerState(hDevice: HANDLE; var pfOn: BOOL): BOOL; stdcall;
+{$EXTERNALSYM GetDevicePowerState}
+
+function SetMessageWaitingIndicator(hMsgIndicator: HANDLE; ulMsgCount: ULONG): BOOL; stdcall;
+{$EXTERNALSYM SetMessageWaitingIndicator}
+
+function SetEndOfFile(hFile: HANDLE): BOOL; stdcall;
+{$EXTERNALSYM SetEndOfFile}
+
+function SetFilePointer(hFile: HANDLE; lDistanceToMove: LONG;
+ lpDistanceToMoveHigh: PLONG; dwMoveMethod: DWORD): DWORD; stdcall;
+{$EXTERNALSYM SetFilePointer}
+
+function SetFilePointerEx(hFile: HANDLE; liDistanceToMove: LARGE_INTEGER;
+ lpNewFilePointer: PLARGE_INTEGER; dwMoveMethod: DWORD): BOOL; stdcall;
+{$EXTERNALSYM SetFilePointerEx}
+
+function FindClose(hFindFile: HANDLE): BOOL; stdcall;
+{$EXTERNALSYM FindClose}
+
+function GetFileTime(hFile: HANDLE; lpCreationTime, lpLastAccessTime,
+ lpLastWriteTime: PFILETIME): BOOL; stdcall;
+{$EXTERNALSYM GetFileTime}
+
+function SetFileTime(hFile: HANDLE; lpCreationTime, lpLastAccessTime,
+ lpLastWriteTime: PFILETIME): BOOL; stdcall;
+{$EXTERNALSYM SetFileTime}
+
+function SetFileValidData(hFile: HANDLE; ValidDataLength: LONGLONG): BOOL; stdcall;
+{$EXTERNALSYM SetFileValidData}
+
+function SetFileShortNameA(hFile: HANDLE; lpShortName: LPCSTR): BOOL; stdcall;
+{$EXTERNALSYM SetFileShortNameA}
+function SetFileShortNameW(hFile: HANDLE; lpShortName: LPCWSTR): BOOL; stdcall;
+{$EXTERNALSYM SetFileShortNameW}
+function SetFileShortName(hFile: HANDLE; lpShortName: LPCTSTR): BOOL; stdcall;
+{$EXTERNALSYM SetFileShortName}
+
+function CloseHandle(hObject: HANDLE): BOOL; stdcall;
+{$EXTERNALSYM CloseHandle}
+
+function DuplicateHandle(hSourceProcessHandle: HANDLE; hSourceHandle: HANDLE;
+ hTargetProcessHandle: HANDLE; lpTargetHandle: LPHANDLE;
+ dwDesiredAccess: DWORD; bInheritHandle: BOOL; dwOptions: DWORD): BOOL; stdcall;
+{$EXTERNALSYM DuplicateHandle}
+
+function GetHandleInformation(hObject: HANDLE; var lpdwFlags: DWORD): BOOL; stdcall;
+{$EXTERNALSYM GetHandleInformation}
+
+function SetHandleInformation(hObject: HANDLE; dwMask: DWORD; dwFlags: DWORD): BOOL; stdcall;
+{$EXTERNALSYM SetHandleInformation}
+
+const
+ HANDLE_FLAG_INHERIT = $00000001;
+ {$EXTERNALSYM HANDLE_FLAG_INHERIT}
+ HANDLE_FLAG_PROTECT_FROM_CLOSE = $00000002;
+ {$EXTERNALSYM HANDLE_FLAG_PROTECT_FROM_CLOSE}
+
+ HINSTANCE_ERROR = 32;
+ {$EXTERNALSYM HINSTANCE_ERROR}
+
+function LoadModule(lpModuleName: LPCSTR; lpParameterBlock: LPVOID): DWORD; stdcall;
+{$EXTERNALSYM LoadModule}
+
+function WinExec(lpCmdLine: LPCSTR; uCmdShow: UINT): UINT; stdcall;
+{$EXTERNALSYM WinExec}
+
+function ClearCommBreak(hFile: HANDLE): BOOL; stdcall;
+{$EXTERNALSYM ClearCommBreak}
+
+function ClearCommError(hFile: HANDLE; var lpErrors: DWORD;
+ lpStat: LPCOMSTAT): BOOL; stdcall;
+{$EXTERNALSYM ClearCommError}
+
+function SetupComm(hFile: HANDLE; dwInQueue: DWORD; dwOutQueue: DWORD): BOOL; stdcall;
+{$EXTERNALSYM SetupComm}
+
+function EscapeCommFunction(hFile: HANDLE; dwFunc: DWORD): BOOL; stdcall;
+{$EXTERNALSYM EscapeCommFunction}
+
+function GetCommConfig(hCommDev: HANDLE; var lpCC: COMMCONFIG;
+ var lpdwSize: DWORD): BOOL; stdcall;
+{$EXTERNALSYM GetCommConfig}
+
+function GetCommMask(hFile: HANDLE; var lpEvtMask: DWORD): BOOL; stdcall;
+{$EXTERNALSYM GetCommMask}
+
+function GetCommProperties(hFile: HANDLE; var lpCommProp: COMMPROP): BOOL; stdcall;
+{$EXTERNALSYM GetCommProperties}
+
+function GetCommModemStatus(hFile: HANDLE; var lpModemStat: DWORD): BOOL; stdcall;
+{$EXTERNALSYM GetCommModemStatus}
+
+function GetCommState(hFile: HANDLE; var lpDCB: DCB): BOOL; stdcall;
+{$EXTERNALSYM GetCommState}
+
+function GetCommTimeouts(hFile: HANDLE; var lpCommTimeouts: COMMTIMEOUTS): BOOL; stdcall;
+{$EXTERNALSYM GetCommTimeouts}
+
+function PurgeComm(hFile: HANDLE; dwFlags: DWORD): BOOL; stdcall;
+{$EXTERNALSYM PurgeComm}
+
+function SetCommBreak(hFile: HANDLE): BOOL; stdcall;
+{$EXTERNALSYM SetCommBreak}
+
+function SetCommConfig(hCommDev: HANDLE; const lpCC: COMMCONFIG; dwSize: DWORD): BOOL; stdcall;
+{$EXTERNALSYM SetCommConfig}
+
+function SetCommMask(hFile: HANDLE; dwEvtMask: DWORD): BOOL; stdcall;
+{$EXTERNALSYM SetCommMask}
+
+function SetCommState(hFile: HANDLE; const lpDCB: DCB): BOOL; stdcall;
+{$EXTERNALSYM SetCommState}
+
+function SetCommTimeouts(hFile: HANDLE; const lpCommTimeouts: COMMTIMEOUTS): BOOL; stdcall;
+{$EXTERNALSYM SetCommTimeouts}
+
+function TransmitCommChar(hFile: HANDLE; cChar: Char): BOOL; stdcall;
+{$EXTERNALSYM TransmitCommChar}
+
+function WaitCommEvent(hFile: HANDLE; var lpEvtMask: DWORD;
+ lpOverlapped: LPOVERLAPPED): BOOL; stdcall;
+{$EXTERNALSYM WaitCommEvent}
+
+function SetTapePosition(hDevice: HANDLE; dwPositionMethod, dwPartition,
+ dwOffsetLow, dwOffsetHigh: DWORD; bImmediate: BOOL): DWORD; stdcall;
+{$EXTERNALSYM SetTapePosition}
+
+function GetTapePosition(hDevice: HANDLE; dwPositionType: DWORD;
+ var lpdwPartition, lpdwOffsetLow: LPDWORD; lpdwOffsetHigh: LPDWORD): DWORD; stdcall;
+{$EXTERNALSYM GetTapePosition}
+
+function PrepareTape(hDevice: HANDLE; dwOperation: DWORD; bImmediate: BOOL): DWORD; stdcall;
+{$EXTERNALSYM PrepareTape}
+
+function EraseTape(hDevice: HANDLE; dwEraseType: DWORD; bImmediate: BOOL): DWORD; stdcall;
+{$EXTERNALSYM EraseTape}
+
+function CreateTapePartition(hDevice: HANDLE; dwPartitionMethod: DWORD;
+ dwCount: DWORD; dwSize: DWORD): DWORD; stdcall;
+{$EXTERNALSYM CreateTapePartition}
+
+function WriteTapemark(hDevice: HANDLE; dwTapemarkType: DWORD;
+ dwTapemarkCount: DWORD; bImmediate: BOOL): DWORD; stdcall;
+{$EXTERNALSYM WriteTapemark}
+
+function GetTapeStatus(hDevice: HANDLE): DWORD; stdcall;
+{$EXTERNALSYM GetTapeStatus}
+
+function GetTapeParameters(hDevice: HANDLE; dwOperation: DWORD;
+ var lpdwSize: DWORD; lpTapeInformation: LPVOID): DWORD; stdcall;
+{$EXTERNALSYM GetTapeParameters}
+
+const
+ GET_TAPE_MEDIA_INFORMATION = 0;
+ {$EXTERNALSYM GET_TAPE_MEDIA_INFORMATION}
+ GET_TAPE_DRIVE_INFORMATION = 1;
+ {$EXTERNALSYM GET_TAPE_DRIVE_INFORMATION}
+
+function SetTapeParameters(hDevice: HANDLE; dwOperation: DWORD; lpTapeInformation: LPVOID): DWORD; stdcall;
+{$EXTERNALSYM SetTapeParameters}
+
+const
+ SET_TAPE_MEDIA_INFORMATION = 0;
+ {$EXTERNALSYM SET_TAPE_MEDIA_INFORMATION}
+ SET_TAPE_DRIVE_INFORMATION = 1;
+ {$EXTERNALSYM SET_TAPE_DRIVE_INFORMATION}
+
+function Beep(dwFreq: DWORD; dwDuration: DWORD): BOOL; stdcall;
+{$EXTERNALSYM Beep}
+
+function MulDiv(nNumber, nNumerator, nDenominator: Integer): Integer; stdcall;
+{$EXTERNALSYM MulDiv}
+
+procedure GetSystemTime(var lpSystemTime: SYSTEMTIME); stdcall;
+{$EXTERNALSYM GetSystemTime}
+
+procedure GetSystemTimeAsFileTime(var lpSystemTimeAsFileTime: FILETIME); stdcall;
+{$EXTERNALSYM GetSystemTimeAsFileTime}
+
+function SetSystemTime(var lpSystemTime: SYSTEMTIME): BOOL; stdcall;
+{$EXTERNALSYM SetSystemTime}
+
+procedure GetLocalTime(var lpSystemTime: SYSTEMTIME); stdcall;
+{$EXTERNALSYM GetLocalTime}
+
+function SetLocalTime(var lpSystemTime: SYSTEMTIME): BOOL; stdcall;
+{$EXTERNALSYM SetLocalTime}
+
+procedure GetSystemInfo(var lpSystemInfo: SYSTEM_INFO); stdcall;
+{$EXTERNALSYM GetSystemInfo}
+
+function GetSystemRegistryQuota(out pdwQuotaAllowed, pdwQuotaUsed: DWORD): BOOL; stdcall;
+{$EXTERNALSYM GetSystemRegistryQuota}
+
+function GetSystemTimes(lpIdleTime, lpKernelTime, lpUserTime: LPFILETIME): BOOL; stdcall;
+{$EXTERNALSYM GetSystemTimes}
+
+procedure GetNativeSystemInfo(lpSystemInfo: LPSYSTEM_INFO); stdcall;
+{$EXTERNALSYM GetNativeSystemInfo}
+
+function IsProcessorFeaturePresent(ProcessorFeature: DWORD): BOOL; stdcall;
+{$EXTERNALSYM IsProcessorFeaturePresent}
+
+type
+ PTIME_ZONE_INFORMATION = ^TIME_ZONE_INFORMATION;
+ {$EXTERNALSYM PTIME_ZONE_INFORMATION}
+ _TIME_ZONE_INFORMATION = record
+ Bias: LONG;
+ StandardName: array [0..31] of WCHAR;
+ StandardDate: SYSTEMTIME;
+ StandardBias: LONG;
+ DaylightName: array [0..31] of WCHAR;
+ DaylightDate: SYSTEMTIME;
+ DaylightBias: LONG;
+ end;
+ {$EXTERNALSYM _TIME_ZONE_INFORMATION}
+ TIME_ZONE_INFORMATION = _TIME_ZONE_INFORMATION;
+ {$EXTERNALSYM TIME_ZONE_INFORMATION}
+ LPTIME_ZONE_INFORMATION = ^TIME_ZONE_INFORMATION;
+ {$EXTERNALSYM LPTIME_ZONE_INFORMATION}
+ TTimeZoneInformation = TIME_ZONE_INFORMATION;
+ PTimeZoneInformation = PTIME_ZONE_INFORMATION;
+
+function SystemTimeToTzSpecificLocalTime(lpTimeZoneInformation: LPTIME_ZONE_INFORMATION;
+ var lpUniversalTime, lpLocalTime: SYSTEMTIME): BOOL; stdcall;
+{$EXTERNALSYM SystemTimeToTzSpecificLocalTime}
+
+function TzSpecificLocalTimeToSystemTime(const lpTimeZoneInformation: TIME_ZONE_INFORMATION;
+ const lpLocalTime: SYSTEMTIME; var lpUniversalTime: SYSTEMTIME): BOOL; stdcall;
+{$EXTERNALSYM TzSpecificLocalTimeToSystemTime}
+
+function GetTimeZoneInformation(var lpTimeZoneInformation: TIME_ZONE_INFORMATION): DWORD; stdcall;
+{$EXTERNALSYM GetTimeZoneInformation}
+
+function SetTimeZoneInformation(const lpTimeZoneInformation: TIME_ZONE_INFORMATION): BOOL; stdcall;
+{$EXTERNALSYM SetTimeZoneInformation}
+
+//
+// Routines to convert back and forth between system time and file time
+//
+
+function SystemTimeToFileTime(const lpSystemTime: SYSTEMTIME; var lpFileTime: FILETIME): BOOL; stdcall;
+{$EXTERNALSYM SystemTimeToFileTime}
+
+function FileTimeToLocalFileTime(const lpFileTime: FILETIME; var lpLocalFileTime: FILETIME): BOOL; stdcall;
+{$EXTERNALSYM FileTimeToLocalFileTime}
+
+function LocalFileTimeToFileTime(const lpLocalFileTime: FILETIME; var lpFileTime: FILETIME): BOOL; stdcall;
+{$EXTERNALSYM LocalFileTimeToFileTime}
+
+function FileTimeToSystemTime(const lpFileTime: FILETIME; var lpSystemTime: SYSTEMTIME): BOOL; stdcall;
+{$EXTERNALSYM FileTimeToSystemTime}
+
+function CompareFileTime(const lpFileTime1, lpFileTime2: FILETIME): LONG; stdcall;
+{$EXTERNALSYM CompareFileTime}
+
+function FileTimeToDosDateTime(const lpFileTime: FILETIME; var lpFatDate,
+ lpFatTime: WORD): BOOL; stdcall;
+{$EXTERNALSYM FileTimeToDosDateTime}
+
+function DosDateTimeToFileTime(wFatDate, wFatTime: WORD; var lpFileTime: FILETIME): BOOL; stdcall;
+{$EXTERNALSYM DosDateTimeToFileTime}
+
+function GetTickCount: DWORD; stdcall;
+{$EXTERNALSYM GetTickCount}
+
+function SetSystemTimeAdjustment(dwTimeAdjustment: DWORD;
+ bTimeAdjustmentDisabled: BOOL): BOOL; stdcall;
+{$EXTERNALSYM SetSystemTimeAdjustment}
+
+function GetSystemTimeAdjustment(var lpTimeAdjustment, lpTimeIncrement: DWORD;
+ var lpTimeAdjustmentDisabled: BOOL): BOOL; stdcall;
+{$EXTERNALSYM GetSystemTimeAdjustment}
+
+function FormatMessageA(dwFlags: DWORD; lpSource: LPCVOID; dwMessageId: DWORD;
+ dwLanguageId: DWORD; lpBuffer: LPSTR; nSize: DWORD; Arguments: Pointer): DWORD; stdcall;
+{$EXTERNALSYM FormatMessageA}
+function FormatMessageW(dwFlags: DWORD; lpSource: LPCVOID; dwMessageId: DWORD;
+ dwLanguageId: DWORD; lpBuffer: LPWSTR; nSize: DWORD; Arguments: Pointer): DWORD; stdcall;
+{$EXTERNALSYM FormatMessageW}
+function FormatMessage(dwFlags: DWORD; lpSource: LPCVOID; dwMessageId: DWORD;
+ dwLanguageId: DWORD; lpBuffer: LPTSTR; nSize: DWORD; Arguments: Pointer): DWORD; stdcall;
+{$EXTERNALSYM FormatMessage}
+
+const
+ FORMAT_MESSAGE_ALLOCATE_BUFFER = $00000100;
+ {$EXTERNALSYM FORMAT_MESSAGE_ALLOCATE_BUFFER}
+ FORMAT_MESSAGE_IGNORE_INSERTS = $00000200;
+ {$EXTERNALSYM FORMAT_MESSAGE_IGNORE_INSERTS}
+ FORMAT_MESSAGE_FROM_STRING = $00000400;
+ {$EXTERNALSYM FORMAT_MESSAGE_FROM_STRING}
+ FORMAT_MESSAGE_FROM_HMODULE = $00000800;
+ {$EXTERNALSYM FORMAT_MESSAGE_FROM_HMODULE}
+ FORMAT_MESSAGE_FROM_SYSTEM = $00001000;
+ {$EXTERNALSYM FORMAT_MESSAGE_FROM_SYSTEM}
+ FORMAT_MESSAGE_ARGUMENT_ARRAY = $00002000;
+ {$EXTERNALSYM FORMAT_MESSAGE_ARGUMENT_ARRAY}
+ FORMAT_MESSAGE_MAX_WIDTH_MASK = $000000FF;
+ {$EXTERNALSYM FORMAT_MESSAGE_MAX_WIDTH_MASK}
+
+function CreatePipe(var hReadPipe, hWritePipe: HANDLE;
+ lpPipeAttributes: LPSECURITY_ATTRIBUTES; nSize: DWORD): BOOL; stdcall;
+{$EXTERNALSYM CreatePipe}
+
+function ConnectNamedPipe(hNamedPipe: HANDLE; lpOverlapped: LPOVERLAPPED): BOOL; stdcall;
+{$EXTERNALSYM ConnectNamedPipe}
+
+function DisconnectNamedPipe(hNamedPipe: HANDLE): BOOL; stdcall;
+{$EXTERNALSYM DisconnectNamedPipe}
+
+function SetNamedPipeHandleState(hNamedPipe: HANDLE; var lpMode: DWORD;
+ lpMaxCollectionCount: LPDWORD; lpCollectDataTimeout: LPDWORD): BOOL; stdcall;
+{$EXTERNALSYM SetNamedPipeHandleState}
+
+function GetNamedPipeInfo(hNamedPipe: HANDLE; lpFlags, lpOutBufferSize,
+ lpInBufferSize, lpMaxInstances: LPDWORD): BOOL; stdcall;
+{$EXTERNALSYM GetNamedPipeInfo}
+
+function PeekNamedPipe(hNamedPipe: HANDLE; lpBuffer: LPVOID; nBufferSize: DWORD;
+ lpBytesRead, lpTotalBytesAvail, lpBytesLeftThisMessage: LPDWORD): BOOL; stdcall;
+{$EXTERNALSYM PeekNamedPipe}
+
+function TransactNamedPipe(hNamedPipe: HANDLE; lpInBuffer: LPVOID;
+ nInBufferSize: DWORD; lpOutBuffer: LPVOID; nOutBufferSize: DWORD;
+ lpBytesRead: LPDWORD; lpOverlapped: LPOVERLAPPED): BOOL; stdcall;
+{$EXTERNALSYM TransactNamedPipe}
+
+function CreateMailslotA(lpName: LPCSTR; nMaxMessageSize, lReadTimeout: DWORD;
+ lpSecurityAttributes: LPSECURITY_ATTRIBUTES): HANDLE; stdcall;
+{$EXTERNALSYM CreateMailslotA}
+function CreateMailslotW(lpName: LPCWSTR; nMaxMessageSize, lReadTimeout: DWORD;
+ lpSecurityAttributes: LPSECURITY_ATTRIBUTES): HANDLE; stdcall;
+{$EXTERNALSYM CreateMailslotW}
+function CreateMailslot(lpName: LPCTSTR; nMaxMessageSize, lReadTimeout: DWORD;
+ lpSecurityAttributes: LPSECURITY_ATTRIBUTES): HANDLE; stdcall;
+{$EXTERNALSYM CreateMailslot}
+
+function GetMailslotInfo(hMailslot: HANDLE; lpMaxMessageSize, lpNextSize,
+ lpMessageCount, lpReadTimeout: LPDWORD): BOOL; stdcall;
+{$EXTERNALSYM GetMailslotInfo}
+
+function SetMailslotInfo(hMailslot: HANDLE; lReadTimeout: DWORD): BOOL; stdcall;
+{$EXTERNALSYM SetMailslotInfo}
+
+function MapViewOfFile(hFileMappingObject: HANDLE; dwDesiredAccess: DWORD;
+ dwFileOffsetHigh, dwFileOffsetLow: DWORD; dwNumberOfBytesToMap: SIZE_T): LPVOID; stdcall;
+{$EXTERNALSYM MapViewOfFile}
+
+function FlushViewOfFile(lpBaseAddress: LPCVOID; dwNumberOfBytesToFlush: SIZE_T): BOOL; stdcall;
+{$EXTERNALSYM FlushViewOfFile}
+
+function UnmapViewOfFile(lpBaseAddress: LPCVOID): BOOL; stdcall;
+{$EXTERNALSYM UnmapViewOfFile}
+
+//
+// File Encryption API
+//
+
+function EncryptFileA(lpFileName: LPCSTR): BOOL; stdcall;
+{$EXTERNALSYM EncryptFileA}
+function EncryptFileW(lpFileName: LPCWSTR): BOOL; stdcall;
+{$EXTERNALSYM EncryptFileW}
+function EncryptFile(lpFileName: LPCTSTR): BOOL; stdcall;
+{$EXTERNALSYM EncryptFile}
+
+function DecryptFileA(lpFileName: LPCSTR; dwReserved: DWORD): BOOL; stdcall;
+{$EXTERNALSYM DecryptFileA}
+function DecryptFileW(lpFileName: LPCWSTR; dwReserved: DWORD): BOOL; stdcall;
+{$EXTERNALSYM DecryptFileW}
+function DecryptFile(lpFileName: LPCTSTR; dwReserved: DWORD): BOOL; stdcall;
+{$EXTERNALSYM DecryptFile}
+
+//
+// Encryption Status Value
+//
+
+const
+ FILE_ENCRYPTABLE = 0;
+ {$EXTERNALSYM FILE_ENCRYPTABLE}
+ FILE_IS_ENCRYPTED = 1;
+ {$EXTERNALSYM FILE_IS_ENCRYPTED}
+ FILE_SYSTEM_ATTR = 2;
+ {$EXTERNALSYM FILE_SYSTEM_ATTR}
+ FILE_ROOT_DIR = 3;
+ {$EXTERNALSYM FILE_ROOT_DIR}
+ FILE_SYSTEM_DIR = 4;
+ {$EXTERNALSYM FILE_SYSTEM_DIR}
+ FILE_UNKNOWN = 5;
+ {$EXTERNALSYM FILE_UNKNOWN}
+ FILE_SYSTEM_NOT_SUPPORT = 6;
+ {$EXTERNALSYM FILE_SYSTEM_NOT_SUPPORT}
+ FILE_USER_DISALLOWED = 7;
+ {$EXTERNALSYM FILE_USER_DISALLOWED}
+ FILE_READ_ONLY = 8;
+ {$EXTERNALSYM FILE_READ_ONLY}
+ FILE_DIR_DISALLOWED = 9;
+ {$EXTERNALSYM FILE_DIR_DISALLOWED}
+
+function FileEncryptionStatusA(lpFileName: LPCSTR; var lpStatus: DWORD): BOOL; stdcall;
+{$EXTERNALSYM FileEncryptionStatusA}
+function FileEncryptionStatusW(lpFileName: LPCWSTR; var lpStatus: DWORD): BOOL; stdcall;
+{$EXTERNALSYM FileEncryptionStatusW}
+function FileEncryptionStatus(lpFileName: LPCTSTR; var lpStatus: DWORD): BOOL; stdcall;
+{$EXTERNALSYM FileEncryptionStatus}
+
+//
+// Currently defined recovery flags
+//
+
+const
+ EFS_USE_RECOVERY_KEYS = $1;
+ {$EXTERNALSYM EFS_USE_RECOVERY_KEYS}
+
+type
+ PFE_EXPORT_FUNC = function(pbData: PBYTE; pvCallbackContext: PVOID;
+ ulLength: ULONG): DWORD; stdcall;
+ {$EXTERNALSYM PFE_EXPORT_FUNC}
+
+ PFE_IMPORT_FUNC = function(pbData: PBYTE; pvCallbackContext: PVOID;
+ ulLength: PULONG): DWORD; stdcall;
+ {$EXTERNALSYM PFE_IMPORT_FUNC}
+
+//
+// OpenRaw flag values
+//
+
+const
+ CREATE_FOR_IMPORT = 1;
+ {$EXTERNALSYM CREATE_FOR_IMPORT}
+ CREATE_FOR_DIR = 2;
+ {$EXTERNALSYM CREATE_FOR_DIR}
+ OVERWRITE_HIDDEN = 4;
+ {$EXTERNALSYM OVERWRITE_HIDDEN}
+
+function OpenEncryptedFileRawA(lpFileName: LPCSTR; ulFlags: ULONG;
+ pvContext: PVOID): DWORD; stdcall;
+{$EXTERNALSYM OpenEncryptedFileRawA}
+function OpenEncryptedFileRawW(lpFileName: LPCWSTR; ulFlags: ULONG;
+ pvContext: PVOID): DWORD; stdcall;
+{$EXTERNALSYM OpenEncryptedFileRawW}
+function OpenEncryptedFileRaw(lpFileName: LPCTSTR; ulFlags: ULONG;
+ pvContext: PVOID): DWORD; stdcall;
+{$EXTERNALSYM OpenEncryptedFileRaw}
+
+function ReadEncryptedFileRaw(pfExportCallback: PFE_EXPORT_FUNC;
+ pvCallbackContext: PVOID; pvContext: PVOID): DWORD; stdcall;
+{$EXTERNALSYM ReadEncryptedFileRaw}
+
+function WriteEncryptedFileRaw(pfImportCallback: PFE_IMPORT_FUNC;
+ pvCallbackContext: PVOID; pvContext: PVOID): DWORD; stdcall;
+{$EXTERNALSYM WriteEncryptedFileRaw}
+
+procedure CloseEncryptedFileRaw(pvContext: PVOID); stdcall;
+{$EXTERNALSYM CloseEncryptedFileRaw}
+
+//
+// _l Compat Functions
+//
+
+function lstrcmpA(lpString1, lpString2: LPCSTR): Integer; stdcall;
+{$EXTERNALSYM lstrcmpA}
+function lstrcmpW(lpString1, lpString2: LPCWSTR): Integer; stdcall;
+{$EXTERNALSYM lstrcmpW}
+function lstrcmp(lpString1, lpString2: LPCTSTR): Integer; stdcall;
+{$EXTERNALSYM lstrcmp}
+
+function lstrcmpiA(lpString1, lpString2: LPCSTR): Integer; stdcall;
+{$EXTERNALSYM lstrcmpiA}
+function lstrcmpiW(lpString1, lpString2: LPCWSTR): Integer; stdcall;
+{$EXTERNALSYM lstrcmpiW}
+function lstrcmpi(lpString1, lpString2: LPCTSTR): Integer; stdcall;
+{$EXTERNALSYM lstrcmpi}
+
+function lstrcpynA(lpString1: LPSTR; lpString2: LPCSTR; iMaxLength: Integer): LPSTR; stdcall;
+{$EXTERNALSYM lstrcpynA}
+function lstrcpynW(lpString1: LPWSTR; lpString2: LPCWSTR; iMaxLength: Integer): LPWSTR; stdcall;
+{$EXTERNALSYM lstrcpynW}
+function lstrcpyn(lpString1: LPTSTR; lpString2: LPCTSTR; iMaxLength: Integer): LPTSTR; stdcall;
+{$EXTERNALSYM lstrcpyn}
+
+function lstrcpyA(lpString1: LPSTR; lpString2: LPCSTR): LPSTR; stdcall;
+{$EXTERNALSYM lstrcpyA}
+function lstrcpyW(lpString1: LPWSTR; lpString2: LPCWSTR): LPWSTR; stdcall;
+{$EXTERNALSYM lstrcpyW}
+function lstrcpy(lpString1: LPTSTR; lpString2: LPCTSTR): LPTSTR; stdcall;
+{$EXTERNALSYM lstrcpy}
+
+function lstrcatA(lpString1: LPSTR; lpString2: LPCSTR): LPSTR; stdcall;
+{$EXTERNALSYM lstrcatA}
+function lstrcatW(lpString1: LPWSTR; lpString2: LPCWSTR): LPWSTR; stdcall;
+{$EXTERNALSYM lstrcatW}
+function lstrcat(lpString1: LPTSTR; lpString2: LPCTSTR): LPTSTR; stdcall;
+{$EXTERNALSYM lstrcat}
+
+function lstrlenA(lpString: LPCSTR): Integer; stdcall;
+{$EXTERNALSYM lstrlenA}
+function lstrlenW(lpString: LPCWSTR): Integer; stdcall;
+{$EXTERNALSYM lstrlenW}
+function lstrlen(lpString: LPCTSTR): Integer; stdcall;
+{$EXTERNALSYM lstrlen}
+
+function OpenFile(lpFileName: LPCSTR; var lpReOpenBuff: OFSTRUCT; uStyle: UINT): HFILE; stdcall;
+{$EXTERNALSYM OpenFile}
+
+function _lopen(lpPathName: LPCSTR; iReadWrite: Integer): HFILE; stdcall;
+{$EXTERNALSYM _lopen}
+
+function _lcreat(lpPathName: LPCSTR; iAttribute: Integer): HFILE; stdcall;
+{$EXTERNALSYM _lcreat}
+
+function _lread(hFile: HFILE; lpBuffer: LPVOID; uBytes: UINT): UINT; stdcall;
+{$EXTERNALSYM _lread}
+
+function _lwrite(hFile: HFILE; lpBuffer: LPCSTR; uBytes: UINT): UINT; stdcall;
+{$EXTERNALSYM _lwrite}
+
+function _hread(hFile: HFILE; lpBuffer: LPVOID; lBytes: Longint): Longint; stdcall;
+{$EXTERNALSYM _hread}
+
+function _hwrite(hFile: HFILE; lpBuffer: LPCSTR; lBytes: Longint): Longint; stdcall;
+{$EXTERNALSYM _hwrite}
+
+function _lclose(hFile: HFILE): HFILE; stdcall;
+{$EXTERNALSYM _lclose}
+
+function _llseek(hFile: HFILE; lOffset: LONG; iOrigin: Integer): LONG; stdcall;
+{$EXTERNALSYM _llseek}
+
+function IsTextUnicode(lpBuffer: LPVOID; cb: Integer; lpi: LPINT): BOOL; stdcall;
+{$EXTERNALSYM IsTextUnicode}
+
+type
+ PFLS_CALLBACK_FUNCTION = procedure(lpFlsData: PVOID); stdcall;
+ {$EXTERNALSYM PFLS_CALLBACK_FUNCTION}
+ TFlsCallbackFunction = PFLS_CALLBACK_FUNCTION;
+
+const
+ FLS_OUT_OF_INDEXES = DWORD($FFFFFFFF);
+ {$EXTERNALSYM FLS_OUT_OF_INDEXES}
+
+function FlsAlloc(lpCallback: PFLS_CALLBACK_FUNCTION): DWORD; stdcall;
+{$EXTERNALSYM FlsAlloc}
+
+function FlsGetValue(dwFlsIndex: DWORD): DWORD; stdcall;
+{$EXTERNALSYM FlsGetValue}
+
+function FlsSetValue(dwFlsIndex: DWORD; lpFlsData: PVOID): DWORD; stdcall;
+{$EXTERNALSYM FlsSetValue}
+
+function FlsFree(dwFlsIndex: DWORD): DWORD; stdcall;
+{$EXTERNALSYM FlsFree}
+
+const
+ TLS_OUT_OF_INDEXES = DWORD($FFFFFFFF);
+ {$EXTERNALSYM TLS_OUT_OF_INDEXES}
+
+function TlsAlloc: DWORD; stdcall;
+{$EXTERNALSYM TlsAlloc}
+
+function TlsGetValue(dwTlsIndex: DWORD): LPVOID; stdcall;
+{$EXTERNALSYM TlsGetValue}
+
+function TlsSetValue(dwTlsIndex: DWORD; lpTlsValue: LPVOID): BOOL; stdcall;
+{$EXTERNALSYM TlsSetValue}
+
+function TlsFree(dwTlsIndex: DWORD): BOOL; stdcall;
+{$EXTERNALSYM TlsFree}
+
+type
+ LPOVERLAPPED_COMPLETION_ROUTINE = procedure(dwErrorCode: DWORD;
+ dwNumberOfBytesTransfered: DWORD; lpOverlapped: LPOVERLAPPED); stdcall;
+ {$EXTERNALSYM LPOVERLAPPED_COMPLETION_ROUTINE}
+ TOverlappedCompletionRoutine = LPOVERLAPPED_COMPLETION_ROUTINE;
+
+function SleepEx(dwMilliseconds: DWORD; bAlertable: BOOL): DWORD; stdcall;
+{$EXTERNALSYM SleepEx}
+
+function WaitForSingleObjectEx(hHandle: HANDLE; dwMilliseconds: DWORD;
+ bAlertable: BOOL): DWORD; stdcall;
+{$EXTERNALSYM WaitForSingleObjectEx}
+
+function WaitForMultipleObjectsEx(nCount: DWORD; lpHandles: PHANDLE;
+ bWaitAll: BOOL; dwMilliseconds: DWORD; bAlertable: BOOL): DWORD; stdcall;
+{$EXTERNALSYM WaitForMultipleObjectsEx}
+
+function SignalObjectAndWait(hObjectToSignal: HANDLE; hObjectToWaitOn: HANDLE;
+ dwMilliseconds: DWORD; bAlertable: BOOL): DWORD; stdcall;
+{$EXTERNALSYM SignalObjectAndWait}
+
+function ReadFileEx(hFile: HANDLE; lpBuffer: LPVOID; nNumberOfBytesToRead: DWORD;
+ lpOverlapped: LPOVERLAPPED; lpCompletionRoutine: LPOVERLAPPED_COMPLETION_ROUTINE): BOOL; stdcall;
+{$EXTERNALSYM ReadFileEx}
+
+function WriteFileEx(hFile: HANDLE; lpBuffer: LPCVOID; nNumberOfBytesToWrite: DWORD;
+ lpOverlapped: LPOVERLAPPED; lpCompletionRoutine: LPOVERLAPPED_COMPLETION_ROUTINE): BOOL; stdcall;
+{$EXTERNALSYM WriteFileEx}
+
+function BackupRead(hFile: HANDLE; lpBuffer: LPBYTE;
+ nNumberOfBytesToRead: DWORD; var lpNumberOfBytesRead: DWORD;
+ bAbort, bProcessSecurity: BOOL; var lpContext: LPVOID): BOOL; stdcall;
+{$EXTERNALSYM BackupRead}
+
+function BackupSeek(hFile: HANDLE; dwLowBytesToSeek, dwHighBytesToSeek: DWORD;
+ var lpdwLowByteSeeked, lpdwHighByteSeeked: DWORD; var lpContext: LPVOID): BOOL; stdcall;
+{$EXTERNALSYM BackupSeek}
+
+function BackupWrite(hFile: HANDLE; lpBuffer: LPBYTE; nNumberOfBytesToWrite: DWORD;
+ var lpNumberOfBytesWritten: DWORD; bAbort, bProcessSecurity: BOOL;
+ var lpContext: LPVOID): BOOL; stdcall;
+{$EXTERNALSYM BackupWrite}
+
+//
+// Stream id structure
+//
+
+type
+ LPWIN32_STREAM_ID = ^WIN32_STREAM_ID;
+ {$EXTERNALSYM LPWIN32_STREAM_ID}
+ _WIN32_STREAM_ID = record
+ dwStreamId: DWORD;
+ dwStreamAttributes: DWORD;
+ Size: TLargeInteger;
+ dwStreamNameSize: DWORD;
+ cStreamName: array [0..ANYSIZE_ARRAY - 1] of WCHAR;
+ end;
+ {$EXTERNALSYM _WIN32_STREAM_ID}
+ WIN32_STREAM_ID = _WIN32_STREAM_ID;
+ {$EXTERNALSYM WIN32_STREAM_ID}
+ TWin32StreamId = WIN32_STREAM_ID;
+ PWin32StreamId = LPWIN32_STREAM_ID;
+
+//
+// Stream Ids
+//
+
+const
+ BACKUP_INVALID = $00000000;
+ {$EXTERNALSYM BACKUP_INVALID}
+ BACKUP_DATA = $00000001;
+ {$EXTERNALSYM BACKUP_DATA}
+ BACKUP_EA_DATA = $00000002;
+ {$EXTERNALSYM BACKUP_EA_DATA}
+ BACKUP_SECURITY_DATA = $00000003;
+ {$EXTERNALSYM BACKUP_SECURITY_DATA}
+ BACKUP_ALTERNATE_DATA = $00000004;
+ {$EXTERNALSYM BACKUP_ALTERNATE_DATA}
+ BACKUP_LINK = $00000005;
+ {$EXTERNALSYM BACKUP_LINK}
+ BACKUP_PROPERTY_DATA = $00000006;
+ {$EXTERNALSYM BACKUP_PROPERTY_DATA}
+ BACKUP_OBJECT_ID = $00000007;
+ {$EXTERNALSYM BACKUP_OBJECT_ID}
+ BACKUP_REPARSE_DATA = $00000008;
+ {$EXTERNALSYM BACKUP_REPARSE_DATA}
+ BACKUP_SPARSE_BLOCK = $00000009;
+ {$EXTERNALSYM BACKUP_SPARSE_BLOCK}
+
+//
+// Stream Attributes
+//
+
+const
+ STREAM_NORMAL_ATTRIBUTE = $00000000;
+ {$EXTERNALSYM STREAM_NORMAL_ATTRIBUTE}
+ STREAM_MODIFIED_WHEN_READ = $00000001;
+ {$EXTERNALSYM STREAM_MODIFIED_WHEN_READ}
+ STREAM_CONTAINS_SECURITY = $00000002;
+ {$EXTERNALSYM STREAM_CONTAINS_SECURITY}
+ STREAM_CONTAINS_PROPERTIES = $00000004;
+ {$EXTERNALSYM STREAM_CONTAINS_PROPERTIES}
+ STREAM_SPARSE_ATTRIBUTE = $00000008;
+ {$EXTERNALSYM STREAM_SPARSE_ATTRIBUTE}
+
+function ReadFileScatter(hFile: HANDLE; aSegmentArray: PFILE_SEGMENT_ELEMENT;
+ nNumberOfBytesToRead: DWORD; lpReserved: LPDWORD; lpOverlapped: LPOVERLAPPED): BOOL; stdcall;
+{$EXTERNALSYM ReadFileScatter}
+
+function WriteFileGather(hFile: HANDLE; aSegmentArray: PFILE_SEGMENT_ELEMENT;
+ nNumberOfBytesToWrite: DWORD; lpReserved: LPDWORD; lpOverlapped: LPOVERLAPPED): BOOL; stdcall;
+{$EXTERNALSYM WriteFileGather}
+
+//
+// Dual Mode API below this line. Dual Mode Structures also included.
+//
+
+const
+ STARTF_USESHOWWINDOW = $00000001;
+ {$EXTERNALSYM STARTF_USESHOWWINDOW}
+ STARTF_USESIZE = $00000002;
+ {$EXTERNALSYM STARTF_USESIZE}
+ STARTF_USEPOSITION = $00000004;
+ {$EXTERNALSYM STARTF_USEPOSITION}
+ STARTF_USECOUNTCHARS = $00000008;
+ {$EXTERNALSYM STARTF_USECOUNTCHARS}
+ STARTF_USEFILLATTRIBUTE = $00000010;
+ {$EXTERNALSYM STARTF_USEFILLATTRIBUTE}
+ STARTF_RUNFULLSCREEN = $00000020; // ignored for non-x86 platforms
+ {$EXTERNALSYM STARTF_RUNFULLSCREEN}
+ STARTF_FORCEONFEEDBACK = $00000040;
+ {$EXTERNALSYM STARTF_FORCEONFEEDBACK}
+ STARTF_FORCEOFFFEEDBACK = $00000080;
+ {$EXTERNALSYM STARTF_FORCEOFFFEEDBACK}
+ STARTF_USESTDHANDLES = $00000100;
+ {$EXTERNALSYM STARTF_USESTDHANDLES}
+
+ STARTF_USEHOTKEY = $00000200;
+ {$EXTERNALSYM STARTF_USEHOTKEY}
+
+type
+ LPSTARTUPINFOA = ^STARTUPINFOA;
+ {$EXTERNALSYM LPSTARTUPINFOA}
+ _STARTUPINFOA = record
+ cb: DWORD;
+ lpReserved: LPSTR;
+ lpDesktop: LPSTR;
+ lpTitle: LPSTR;
+ dwX: DWORD;
+ dwY: DWORD;
+ dwXSize: DWORD;
+ dwYSize: DWORD;
+ dwXCountChars: DWORD;
+ dwYCountChars: DWORD;
+ dwFillAttribute: DWORD;
+ dwFlags: DWORD;
+ wShowWindow: WORD;
+ cbReserved2: WORD;
+ lpReserved2: LPBYTE;
+ hStdInput: HANDLE;
+ hStdOutput: HANDLE;
+ hStdError: HANDLE;
+ end;
+ {$EXTERNALSYM _STARTUPINFOA}
+ STARTUPINFOA = _STARTUPINFOA;
+ {$EXTERNALSYM STARTUPINFOA}
+ TStartupInfoA = STARTUPINFOA;
+ PStartupInfoA = LPSTARTUPINFOA;
+
+ LPSTARTUPINFOW = ^STARTUPINFOW;
+ {$EXTERNALSYM LPSTARTUPINFOW}
+ _STARTUPINFOW = record
+ cb: DWORD;
+ lpReserved: LPWSTR;
+ lpDesktop: LPWSTR;
+ lpTitle: LPWSTR;
+ dwX: DWORD;
+ dwY: DWORD;
+ dwXSize: DWORD;
+ dwYSize: DWORD;
+ dwXCountChars: DWORD;
+ dwYCountChars: DWORD;
+ dwFillAttribute: DWORD;
+ dwFlags: DWORD;
+ wShowWindow: WORD;
+ cbReserved2: WORD;
+ lpReserved2: LPBYTE;
+ hStdInput: HANDLE;
+ hStdOutput: HANDLE;
+ hStdError: HANDLE;
+ end;
+ {$EXTERNALSYM _STARTUPINFOW}
+ STARTUPINFOW = _STARTUPINFOW;
+ {$EXTERNALSYM STARTUPINFOW}
+ TStartupInfoW = STARTUPINFOW;
+ PStartupInfoW = LPSTARTUPINFOW;
+
+ {$IFDEF UNICODE}
+ STARTUPINFO = STARTUPINFOW;
+ {$EXTERNALSYM STARTUPINFO}
+ LPSTARTUPINFO = LPSTARTUPINFOW;
+ {$EXTERNALSYM LPSTARTUPINFO}
+ TStartupInfo = TStartupInfoW;
+ PStartupInfo = PStartupInfoW;
+ {$ELSE}
+ STARTUPINFO = STARTUPINFOA;
+ {$EXTERNALSYM STARTUPINFO}
+ LPSTARTUPINFO = LPSTARTUPINFOA;
+ {$EXTERNALSYM LPSTARTUPINFO}
+ TStartupInfo = TStartupInfoA;
+ PStartupInfo = PStartupInfoA;
+ {$ENDIF UNICODE}
+
+const
+ SHUTDOWN_NORETRY = $00000001;
+ {$EXTERNALSYM SHUTDOWN_NORETRY}
+
+type
+ PWIN32_FIND_DATAA = ^WIN32_FIND_DATAA;
+ {$EXTERNALSYM PWIN32_FIND_DATAA}
+ _WIN32_FIND_DATAA = record
+ dwFileAttributes: DWORD;
+ ftCreationTime: FILETIME;
+ ftLastAccessTime: FILETIME;
+ ftLastWriteTime: FILETIME;
+ nFileSizeHigh: DWORD;
+ nFileSizeLow: DWORD;
+ dwReserved0: DWORD;
+ dwReserved1: DWORD;
+ cFileName: array [0..MAX_PATH - 1] of CHAR;
+ cAlternateFileName: array [0..13] of CHAR;
+ end;
+ {$EXTERNALSYM _WIN32_FIND_DATAA}
+ WIN32_FIND_DATAA = _WIN32_FIND_DATAA;
+ {$EXTERNALSYM WIN32_FIND_DATAA}
+ LPWIN32_FIND_DATAA = ^WIN32_FIND_DATAA;
+ {$EXTERNALSYM LPWIN32_FIND_DATAA}
+ TWin32FindDataA = WIN32_FIND_DATAA;
+ PWin32FindDataA = PWIN32_FIND_DATAA;
+
+ PWIN32_FIND_DATAW = ^WIN32_FIND_DATAW;
+ {$EXTERNALSYM PWIN32_FIND_DATAW}
+ _WIN32_FIND_DATAW = record
+ dwFileAttributes: DWORD;
+ ftCreationTime: FILETIME;
+ ftLastAccessTime: FILETIME;
+ ftLastWriteTime: FILETIME;
+ nFileSizeHigh: DWORD;
+ nFileSizeLow: DWORD;
+ dwReserved0: DWORD;
+ dwReserved1: DWORD;
+ cFileName: array [0..MAX_PATH - 1] of WCHAR;
+ cAlternateFileName: array [0..13] of WCHAR;
+ end;
+ {$EXTERNALSYM _WIN32_FIND_DATAW}
+ WIN32_FIND_DATAW = _WIN32_FIND_DATAW;
+ {$EXTERNALSYM WIN32_FIND_DATAW}
+ LPWIN32_FIND_DATAW = ^WIN32_FIND_DATAW;
+ {$EXTERNALSYM LPWIN32_FIND_DATAW}
+ TWin32FindDataW = WIN32_FIND_DATAW;
+ PWin32FindDataW = PWIN32_FIND_DATAW;
+
+ {$IFDEF UNICODE}
+ WIN32_FIND_DATA = WIN32_FIND_DATAW;
+ {$EXTERNALSYM WIN32_FIND_DATA}
+ PWIN32_FIND_DATA = PWIN32_FIND_DATAW;
+ {$EXTERNALSYM PWIN32_FIND_DATA}
+ LPWIN32_FIND_DATA = LPWIN32_FIND_DATAW;
+ {$EXTERNALSYM LPWIN32_FIND_DATA}
+ TWin32FindData = TWin32FindDataW;
+ PWin32FindData = PWin32FindDataW;
+ {$ELSE}
+ WIN32_FIND_DATA = WIN32_FIND_DATAA;
+ {$EXTERNALSYM WIN32_FIND_DATA}
+ PWIN32_FIND_DATA = PWIN32_FIND_DATAA;
+ {$EXTERNALSYM PWIN32_FIND_DATA}
+ LPWIN32_FIND_DATA = LPWIN32_FIND_DATAA;
+ {$EXTERNALSYM LPWIN32_FIND_DATA}
+ TWin32FindData = TWin32FindDataA;
+ PWin32FindData = PWin32FindDataA;
+ {$ENDIF UNICODE}
+
+ LPWIN32_FILE_ATTRIBUTE_DATA = ^WIN32_FILE_ATTRIBUTE_DATA;
+ {$EXTERNALSYM LPWIN32_FILE_ATTRIBUTE_DATA}
+ _WIN32_FILE_ATTRIBUTE_DATA = record
+ dwFileAttributes: DWORD;
+ ftCreationTime: FILETIME;
+ ftLastAccessTime: FILETIME;
+ ftLastWriteTime: FILETIME;
+ nFileSizeHigh: DWORD;
+ nFileSizeLow: DWORD;
+ end;
+ {$EXTERNALSYM _WIN32_FILE_ATTRIBUTE_DATA}
+ WIN32_FILE_ATTRIBUTE_DATA = _WIN32_FILE_ATTRIBUTE_DATA;
+ {$EXTERNALSYM WIN32_FILE_ATTRIBUTE_DATA}
+ TWin32FileAttributeData = WIN32_FILE_ATTRIBUTE_DATA;
+ PWin32FileAttributeData = LPWIN32_FILE_ATTRIBUTE_DATA;
+
+function CreateMutexA(lpMutexAttributes: LPSECURITY_ATTRIBUTES; bInitialOwner: BOOL; lpName: LPCSTR): HANDLE;
+{$EXTERNALSYM CreateMutexA}
+function CreateMutexW(lpMutexAttributes: LPSECURITY_ATTRIBUTES; bInitialOwner: BOOL; lpName: LPCWSTR): HANDLE;
+{$EXTERNALSYM CreateMutexW}
+function CreateMutex(lpMutexAttributes: LPSECURITY_ATTRIBUTES;
+ bInitialOwner: BOOL; lpName: LPCTSTR): HANDLE;
+{$EXTERNALSYM CreateMutex}
+
+function OpenMutexA(dwDesiredAccess: DWORD; bInheritHandle: BOOL; lpName: LPCSTR): HANDLE; stdcall;
+{$EXTERNALSYM OpenMutexA}
+function OpenMutexW(dwDesiredAccess: DWORD; bInheritHandle: BOOL; lpName: LPCWSTR): HANDLE; stdcall;
+{$EXTERNALSYM OpenMutexW}
+function OpenMutex(dwDesiredAccess: DWORD; bInheritHandle: BOOL; lpName: LPCTSTR): HANDLE; stdcall;
+{$EXTERNALSYM OpenMutex}
+
+function CreateEventA(lpEventAttributes: LPSECURITY_ATTRIBUTES;
+ bManualReset, bInitialState: BOOL; lpName: LPCSTR): HANDLE; stdcall;
+{$EXTERNALSYM CreateEventA}
+function CreateEventW(lpEventAttributes: LPSECURITY_ATTRIBUTES;
+ bManualReset, bInitialState: BOOL; lpName: LPCWSTR): HANDLE; stdcall;
+{$EXTERNALSYM CreateEventW}
+function CreateEvent(lpEventAttributes: LPSECURITY_ATTRIBUTES;
+ bManualReset, bInitialState: BOOL; lpName: LPCTSTR): HANDLE; stdcall;
+{$EXTERNALSYM CreateEvent}
+
+function OpenEventA(dwDesiredAccess: DWORD; bInheritHandle: BOOL; lpName: LPCSTR): HANDLE; stdcall;
+{$EXTERNALSYM OpenEventA}
+function OpenEventW(dwDesiredAccess: DWORD; bInheritHandle: BOOL; lpName: LPCWSTR): HANDLE; stdcall;
+{$EXTERNALSYM OpenEventW}
+function OpenEvent(dwDesiredAccess: DWORD; bInheritHandle: BOOL; lpName: LPCTSTR): HANDLE; stdcall;
+{$EXTERNALSYM OpenEvent}
+
+function CreateSemaphoreA(lpSemaphoreAttributes: LPSECURITY_ATTRIBUTES;
+ lInitialCount, lMaximumCount: LONG; lpName: LPCSTR): HANDLE; stdcall;
+{$EXTERNALSYM CreateSemaphoreA}
+function CreateSemaphoreW(lpSemaphoreAttributes: LPSECURITY_ATTRIBUTES;
+ lInitialCount, lMaximumCount: LONG; lpName: LPCWSTR): HANDLE; stdcall;
+{$EXTERNALSYM CreateSemaphoreW}
+function CreateSemaphore(lpSemaphoreAttributes: LPSECURITY_ATTRIBUTES;
+ lInitialCount, lMaximumCount: LONG; lpName: LPCTSTR): HANDLE; stdcall;
+{$EXTERNALSYM CreateSemaphore}
+
+function OpenSemaphoreA(dwDesiredAccess: DWORD; bInheritHandle: BOOL;
+ lpName: LPCSTR): HANDLE; stdcall;
+{$EXTERNALSYM OpenSemaphoreA}
+function OpenSemaphoreW(dwDesiredAccess: DWORD; bInheritHandle: BOOL;
+ lpName: LPCWSTR): HANDLE; stdcall;
+{$EXTERNALSYM OpenSemaphoreW}
+function OpenSemaphore(dwDesiredAccess: DWORD; bInheritHandle: BOOL;
+ lpName: LPCTSTR): HANDLE; stdcall;
+{$EXTERNALSYM OpenSemaphore}
+
+type
+ PTIMERAPCROUTINE = procedure(lpArgToCompletionRoutine: LPVOID;
+ dwTimerLowValue, dwTimerHighValue: DWORD); stdcall;
+ {$EXTERNALSYM PTIMERAPCROUTINE}
+ TTimerApcRoutine = PTIMERAPCROUTINE;
+
+function CreateWaitableTimerA(lpTimerAttributes: LPSECURITY_ATTRIBUTES;
+ bManualReset: BOOL; lpTimerName: LPCSTR): HANDLE; stdcall;
+{$EXTERNALSYM CreateWaitableTimerA}
+function CreateWaitableTimerW(lpTimerAttributes: LPSECURITY_ATTRIBUTES;
+ bManualReset: BOOL; lpTimerName: LPCWSTR): HANDLE; stdcall;
+{$EXTERNALSYM CreateWaitableTimerW}
+function CreateWaitableTimer(lpTimerAttributes: LPSECURITY_ATTRIBUTES;
+ bManualReset: BOOL; lpTimerName: LPCTSTR): HANDLE; stdcall;
+{$EXTERNALSYM CreateWaitableTimer}
+
+function OpenWaitableTimerA(dwDesiredAccess: DWORD; bInheritHandle: BOOL;
+ lpTimerName: LPCSTR): HANDLE; stdcall;
+{$EXTERNALSYM OpenWaitableTimerA}
+function OpenWaitableTimerW(dwDesiredAccess: DWORD; bInheritHandle: BOOL;
+ lpTimerName: LPCWSTR): HANDLE; stdcall;
+{$EXTERNALSYM OpenWaitableTimerW}
+function OpenWaitableTimer(dwDesiredAccess: DWORD; bInheritHandle: BOOL;
+ lpTimerName: LPCTSTR): HANDLE; stdcall;
+{$EXTERNALSYM OpenWaitableTimer}
+
+function SetWaitableTimer(hTimer: HANDLE; var lpDueTime: LARGE_INTEGER;
+ lPeriod: LONG; pfnCompletionRoutine: PTIMERAPCROUTINE;
+ lpArgToCompletionRoutine: LPVOID; fResume: BOOL): BOOL; stdcall;
+{$EXTERNALSYM SetWaitableTimer}
+
+function CancelWaitableTimer(hTimer: HANDLE): BOOL; stdcall;
+{$EXTERNALSYM CancelWaitableTimer}
+
+function CreateFileMappingA(hFile: HANDLE; lpFileMappingAttributes: LPSECURITY_ATTRIBUTES;
+ flProtect, dwMaximumSizeHigh, dwMaximumSizeLow: DWORD; lpName: LPCSTR): HANDLE; stdcall;
+{$EXTERNALSYM CreateFileMappingA}
+function CreateFileMappingW(hFile: HANDLE; lpFileMappingAttributes: LPSECURITY_ATTRIBUTES;
+ flProtect, dwMaximumSizeHigh, dwMaximumSizeLow: DWORD; lpName: LPCWSTR): HANDLE; stdcall;
+{$EXTERNALSYM CreateFileMappingW}
+function CreateFileMapping(hFile: HANDLE; lpFileMappingAttributes: LPSECURITY_ATTRIBUTES;
+ flProtect, dwMaximumSizeHigh, dwMaximumSizeLow: DWORD; lpName: LPCTSTR): HANDLE; stdcall;
+{$EXTERNALSYM CreateFileMapping}
+
+function OpenFileMappingA(dwDesiredAccess: DWORD; bInheritHandle: BOOL;
+ lpName: LPCSTR): HANDLE; stdcall;
+{$EXTERNALSYM OpenFileMappingA}
+function OpenFileMappingW(dwDesiredAccess: DWORD; bInheritHandle: BOOL;
+ lpName: LPCWSTR): HANDLE; stdcall;
+{$EXTERNALSYM OpenFileMappingW}
+function OpenFileMapping(dwDesiredAccess: DWORD; bInheritHandle: BOOL;
+ lpName: LPCTSTR): HANDLE; stdcall;
+{$EXTERNALSYM OpenFileMapping}
+
+function GetLogicalDriveStringsA(nBufferLength: DWORD; lpBuffer: LPSTR): DWORD; stdcall;
+{$EXTERNALSYM GetLogicalDriveStringsA}
+function GetLogicalDriveStringsW(nBufferLength: DWORD; lpBuffer: LPWSTR): DWORD; stdcall;
+{$EXTERNALSYM GetLogicalDriveStringsW}
+function GetLogicalDriveStrings(nBufferLength: DWORD; lpBuffer: LPTSTR): DWORD; stdcall;
+{$EXTERNALSYM GetLogicalDriveStrings}
+
+type
+ _MEMORY_RESOURCE_NOTIFICATION_TYPE = (
+ LowMemoryResourceNotification,
+ HighMemoryResourceNotification);
+ {$EXTERNALSYM _MEMORY_RESOURCE_NOTIFICATION_TYPE}
+ MEMORY_RESOURCE_NOTIFICATION_TYPE = _MEMORY_RESOURCE_NOTIFICATION_TYPE;
+ {$EXTERNALSYM MEMORY_RESOURCE_NOTIFICATION_TYPE}
+ TMemoryResourceNotification = MEMORY_RESOURCE_NOTIFICATION_TYPE;
+
+function CreateMemoryResourceNotification(NotificationType: MEMORY_RESOURCE_NOTIFICATION_TYPE): HANDLE; stdcall;
+{$EXTERNALSYM CreateMemoryResourceNotification}
+
+function QueryMemoryResourceNotification(ResourceNotificationHandle: HANDLE;
+ ResourceState: BOOL): BOOL; stdcall;
+{$EXTERNALSYM QueryMemoryResourceNotification}
+
+function LoadLibraryA(lpLibFileName: LPCSTR): HMODULE; stdcall;
+{$EXTERNALSYM LoadLibraryA}
+function LoadLibraryW(lpLibFileName: LPCWSTR): HMODULE; stdcall;
+{$EXTERNALSYM LoadLibraryW}
+function LoadLibrary(lpLibFileName: LPCTSTR): HMODULE; stdcall;
+{$EXTERNALSYM LoadLibrary}
+
+function LoadLibraryExA(lpLibFileName: LPCSTR; hFile: HANDLE; dwFlags: DWORD): HMODULE; stdcall;
+{$EXTERNALSYM LoadLibraryExA}
+function LoadLibraryExW(lpLibFileName: LPCWSTR; hFile: HANDLE; dwFlags: DWORD): HMODULE; stdcall;
+{$EXTERNALSYM LoadLibraryExW}
+function LoadLibraryEx(lpLibFileName: LPCTSTR; hFile: HANDLE; dwFlags: DWORD): HMODULE; stdcall;
+{$EXTERNALSYM LoadLibraryEx}
+
+const
+ DONT_RESOLVE_DLL_REFERENCES = $00000001;
+ {$EXTERNALSYM DONT_RESOLVE_DLL_REFERENCES}
+ LOAD_LIBRARY_AS_DATAFILE = $00000002;
+ {$EXTERNALSYM LOAD_LIBRARY_AS_DATAFILE}
+ LOAD_WITH_ALTERED_SEARCH_PATH = $00000008;
+ {$EXTERNALSYM LOAD_WITH_ALTERED_SEARCH_PATH}
+ LOAD_IGNORE_CODE_AUTHZ_LEVEL = $00000010;
+ {$EXTERNALSYM LOAD_IGNORE_CODE_AUTHZ_LEVEL}
+
+function GetModuleFileNameA(hModule: HMODULE; lpFilename: LPSTR; nSize: DWORD): DWORD; stdcall;
+{$EXTERNALSYM GetModuleFileNameA}
+function GetModuleFileNameW(hModule: HMODULE; lpFilename: LPWSTR; nSize: DWORD): DWORD; stdcall;
+{$EXTERNALSYM GetModuleFileNameW}
+function GetModuleFileName(hModule: HMODULE; lpFilename: LPTSTR; nSize: DWORD): DWORD; stdcall;
+{$EXTERNALSYM GetModuleFileName}
+
+function GetModuleHandleA(lpModuleName: LPCSTR): HMODULE; stdcall;
+{$EXTERNALSYM GetModuleHandleA}
+function GetModuleHandleW(lpModuleName: LPCWSTR): HMODULE; stdcall;
+{$EXTERNALSYM GetModuleHandleW}
+function GetModuleHandle(lpModuleName: LPCTSTR): HMODULE; stdcall;
+{$EXTERNALSYM GetModuleHandle}
+
+const
+ GET_MODULE_HANDLE_EX_FLAG_PIN = $00000001;
+ {$EXTERNALSYM GET_MODULE_HANDLE_EX_FLAG_PIN}
+ GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT = $00000002;
+ {$EXTERNALSYM GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT}
+ GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS = $00000004;
+ {$EXTERNALSYM GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS}
+
+type
+ PGET_MODULE_HANDLE_EXA = function(dwFlags: DWORD; lpModuleName: LPCSTR; var phModule: HMODULE): BOOL; stdcall;
+ {$EXTERNALSYM PGET_MODULE_HANDLE_EXA}
+ PGET_MODULE_HANDLE_EXW = function(dwFlags: DWORD; lpModuleName: LPCWSTR; var phModule: HMODULE): BOOL; stdcall;
+ {$EXTERNALSYM PGET_MODULE_HANDLE_EXW}
+
+ {$IFDEF UNICODE}
+ PGET_MODULE_HANDLE_EX = PGET_MODULE_HANDLE_EXW;
+ {$EXTERNALSYM PGET_MODULE_HANDLE_EX}
+ {$ELSE}
+ PGET_MODULE_HANDLE_EX = PGET_MODULE_HANDLE_EXA;
+ {$EXTERNALSYM PGET_MODULE_HANDLE_EX}
+ {$ENDIF UNICODE}
+
+function GetModuleHandleExA(dwFlags: DWORD; lpModuleName: LPCSTR; var phModule: HMODULE): BOOL; stdcall;
+{$EXTERNALSYM GetModuleHandleExA}
+function GetModuleHandleExW(dwFlags: DWORD; lpModuleName: LPCWSTR; var phModule: HMODULE): BOOL; stdcall;
+{$EXTERNALSYM GetModuleHandleExW}
+function GetModuleHandleEx(dwFlags: DWORD; lpModuleName: LPCTSTR; var phModule: HMODULE): BOOL; stdcall;
+{$EXTERNALSYM GetModuleHandleEx}
+
+function NeedCurrentDirectoryForExePathA(ExeName: LPCSTR): BOOL; stdcall;
+{$EXTERNALSYM NeedCurrentDirectoryForExePathA}
+function NeedCurrentDirectoryForExePathW(ExeName: LPCWSTR): BOOL; stdcall;
+{$EXTERNALSYM NeedCurrentDirectoryForExePathW}
+function NeedCurrentDirectoryForExePath(ExeName: LPCTSTR): BOOL; stdcall;
+{$EXTERNALSYM NeedCurrentDirectoryForExePath}
+
+function CreateProcessA(lpApplicationName: LPCSTR; lpCommandLine: LPSTR;
+ lpProcessAttributes, lpThreadAttributes: LPSECURITY_ATTRIBUTES;
+ bInheritHandles: BOOL; dwCreationFlags: DWORD; lpEnvironment: LPVOID;
+ lpCurrentDirectory: LPCSTR; const lpStartupInfo: STARTUPINFOA;
+ var lpProcessInformation: PROCESS_INFORMATION): BOOL; stdcall;
+{$EXTERNALSYM CreateProcessA}
+function CreateProcessW(lpApplicationName: LPCWSTR; lpCommandLine: LPWSTR;
+ lpProcessAttributes, lpThreadAttributes: LPSECURITY_ATTRIBUTES;
+ bInheritHandles: BOOL; dwCreationFlags: DWORD; lpEnvironment: LPVOID;
+ lpCurrentDirectory: LPCWSTR; const lpStartupInfo: STARTUPINFOW;
+ var lpProcessInformation: PROCESS_INFORMATION): BOOL; stdcall;
+{$EXTERNALSYM CreateProcessW}
+function CreateProcess(lpApplicationName: LPCTSTR; lpCommandLine: LPTSTR;
+ lpProcessAttributes, lpThreadAttributes: LPSECURITY_ATTRIBUTES;
+ bInheritHandles: BOOL; dwCreationFlags: DWORD; lpEnvironment: LPVOID;
+ lpCurrentDirectory: LPCTSTR; const lpStartupInfo: STARTUPINFO;
+ var lpProcessInformation: PROCESS_INFORMATION): BOOL; stdcall;
+{$EXTERNALSYM CreateProcess}
+
+function SetProcessShutdownParameters(dwLevel, dwFlags: DWORD): BOOL; stdcall;
+{$EXTERNALSYM SetProcessShutdownParameters}
+
+function GetProcessShutdownParameters(var lpdwLevel, lpdwFlags: DWORD): BOOL; stdcall;
+{$EXTERNALSYM GetProcessShutdownParameters}
+
+function GetProcessVersion(ProcessId: DWORD): DWORD; stdcall;
+{$EXTERNALSYM GetProcessVersion}
+
+procedure FatalAppExitA(uAction: UINT; lpMessageText: LPCSTR); stdcall;
+{$EXTERNALSYM FatalAppExitA}
+procedure FatalAppExitW(uAction: UINT; lpMessageText: LPCWSTR); stdcall;
+{$EXTERNALSYM FatalAppExitW}
+procedure FatalAppExit(uAction: UINT; lpMessageText: LPCTSTR); stdcall;
+{$EXTERNALSYM FatalAppExit}
+
+procedure GetStartupInfoA(var lpStartupInfo: STARTUPINFOA); stdcall;
+{$EXTERNALSYM GetStartupInfoA}
+procedure GetStartupInfoW(var lpStartupInfo: STARTUPINFOW); stdcall;
+{$EXTERNALSYM GetStartupInfoW}
+procedure GetStartupInfo(var lpStartupInfo: STARTUPINFO); stdcall;
+{$EXTERNALSYM GetStartupInfo}
+
+function GetCommandLineA: LPSTR; stdcall;
+{$EXTERNALSYM GetCommandLineA}
+function GetCommandLineW: LPWSTR; stdcall;
+{$EXTERNALSYM GetCommandLineW}
+function GetCommandLine: LPTSTR; stdcall;
+{$EXTERNALSYM GetCommandLine}
+
+function GetEnvironmentVariableA(lpName: LPCSTR; lpBuffer: LPSTR; nSize: DWORD): DWORD; stdcall;
+{$EXTERNALSYM GetEnvironmentVariableA}
+function GetEnvironmentVariableW(lpName: LPCWSTR; lpBuffer: LPWSTR; nSize: DWORD): DWORD; stdcall;
+{$EXTERNALSYM GetEnvironmentVariableW}
+function GetEnvironmentVariable(lpName: LPCTSTR; lpBuffer: LPTSTR; nSize: DWORD): DWORD; stdcall;
+{$EXTERNALSYM GetEnvironmentVariable}
+
+function SetEnvironmentVariableA(lpName, lpValue: LPCSTR): BOOL; stdcall;
+{$EXTERNALSYM SetEnvironmentVariableA}
+function SetEnvironmentVariableW(lpName, lpValue: LPCWSTR): BOOL; stdcall;
+{$EXTERNALSYM SetEnvironmentVariableW}
+function SetEnvironmentVariable(lpName, lpValue: LPCTSTR): BOOL; stdcall;
+{$EXTERNALSYM SetEnvironmentVariable}
+
+function ExpandEnvironmentStringsA(lpSrc: LPCSTR; lpDst: LPSTR; nSize: DWORD): DWORD; stdcall;
+{$EXTERNALSYM ExpandEnvironmentStringsA}
+function ExpandEnvironmentStringsW(lpSrc: LPCWSTR; lpDst: LPWSTR; nSize: DWORD): DWORD; stdcall;
+{$EXTERNALSYM ExpandEnvironmentStringsW}
+function ExpandEnvironmentStrings(lpSrc: LPCTSTR; lpDst: LPTSTR; nSize: DWORD): DWORD; stdcall;
+{$EXTERNALSYM ExpandEnvironmentStrings}
+
+function GetFirmwareEnvironmentVariableA(lpName, lpGuid: LPCSTR; pBuffer: PVOID;
+ nSize: DWORD): DWORD; stdcall;
+{$EXTERNALSYM GetFirmwareEnvironmentVariableA}
+function GetFirmwareEnvironmentVariableW(lpName, lpGuid: LPCWSTR; pBuffer: PVOID;
+ nSize: DWORD): DWORD; stdcall;
+{$EXTERNALSYM GetFirmwareEnvironmentVariableW}
+function GetFirmwareEnvironmentVariable(lpName, lpGuid: LPCTSTR; pBuffer: PVOID;
+ nSize: DWORD): DWORD; stdcall;
+{$EXTERNALSYM GetFirmwareEnvironmentVariable}
+
+function SetFirmwareEnvironmentVariableA(lpName, lpGuid: LPCSTR; pValue: PVOID;
+ nSize: DWORD): BOOL; stdcall;
+{$EXTERNALSYM SetFirmwareEnvironmentVariableA}
+function SetFirmwareEnvironmentVariableW(lpName, lpGuid: LPCWSTR; pValue: PVOID;
+ nSize: DWORD): BOOL; stdcall;
+{$EXTERNALSYM SetFirmwareEnvironmentVariableW}
+function SetFirmwareEnvironmentVariable(lpName, lpGuid: LPCTSTR; pValue: PVOID;
+ nSize: DWORD): BOOL; stdcall;
+{$EXTERNALSYM SetFirmwareEnvironmentVariable}
+
+procedure OutputDebugStringA(lpOutputString: LPCSTR); stdcall;
+{$EXTERNALSYM OutputDebugStringA}
+procedure OutputDebugStringW(lpOutputString: LPCWSTR); stdcall;
+{$EXTERNALSYM OutputDebugStringW}
+procedure OutputDebugString(lpOutputString: LPCTSTR); stdcall;
+{$EXTERNALSYM OutputDebugString}
+
+function FindResourceA(hModule: HMODULE; lpName, lpType: LPCSTR): HRSRC; stdcall;
+{$EXTERNALSYM FindResourceA}
+function FindResourceW(hModule: HMODULE; lpName, lpType: LPCWSTR): HRSRC; stdcall;
+{$EXTERNALSYM FindResourceW}
+function FindResource(hModule: HMODULE; lpName, lpType: LPCTSTR): HRSRC; stdcall;
+{$EXTERNALSYM FindResource}
+
+function FindResourceExA(hModule: HMODULE; lpType, lpName: LPCSTR; wLanguage: WORD): HRSRC; stdcall;
+{$EXTERNALSYM FindResourceExA}
+function FindResourceExW(hModule: HMODULE; lpType, lpName: LPCWSTR; wLanguage: WORD): HRSRC; stdcall;
+{$EXTERNALSYM FindResourceExW}
+function FindResourceEx(hModule: HMODULE; lpType, lpName: LPCTSTR; wLanguage: WORD): HRSRC; stdcall;
+{$EXTERNALSYM FindResourceEx}
+
+type
+ ENUMRESTYPEPROCA = function(hModule: HMODULE; lpType: LPSTR; lParam: LONG_PTR): BOOL; stdcall;
+ {$EXTERNALSYM ENUMRESTYPEPROCA}
+ ENUMRESTYPEPROCW = function(hModule: HMODULE; lpType: LPWSTR; lParam: LONG_PTR): BOOL; stdcall;
+ {$EXTERNALSYM ENUMRESTYPEPROCW}
+ ENUMRESTYPEPROC = function(hModule: HMODULE; lpType: LPTSTR; lParam: LONG_PTR): BOOL; stdcall;
+ {$EXTERNALSYM ENUMRESTYPEPROC}
+ TEnumResTypeProcA = ENUMRESTYPEPROCA;
+ TEnumResTypeProcW = ENUMRESTYPEPROCW;
+ TEnumResTypeProc = ENUMRESTYPEPROC;
+
+ ENUMRESNAMEPROCA = function(hModule: HMODULE; lpType: LPCSTR; lpName: LPSTR;
+ lParam: LONG_PTR): BOOL; stdcall;
+ {$EXTERNALSYM ENUMRESNAMEPROCA}
+ ENUMRESNAMEPROCW = function(hModule: HMODULE; lpType: LPCWSTR; lpName: LPWSTR;
+ lParam: LONG_PTR): BOOL; stdcall;
+ {$EXTERNALSYM ENUMRESNAMEPROCW}
+ ENUMRESNAMEPROC = function(hModule: HMODULE; lpType: LPCTSTR; lpName: LPTSTR;
+ lParam: LONG_PTR): BOOL; stdcall;
+ {$EXTERNALSYM ENUMRESNAMEPROC}
+ TEnumResNameProcA = ENUMRESNAMEPROCA;
+ TEnumResNameProcW = ENUMRESNAMEPROCW;
+ TEnumResNameProc = ENUMRESNAMEPROC;
+
+ ENUMRESLANGPROCA = function(hModule: HMODULE; lpType, lpName: LPCSTR;
+ wLanguage: WORD; lParam: LONG_PTR): BOOL; stdcall;
+ {$EXTERNALSYM ENUMRESLANGPROCA}
+ ENUMRESLANGPROCW = function(hModule: HMODULE; lpType, lpName: LPCWSTR;
+ wLanguage: WORD; lParam: LONG_PTR): BOOL; stdcall;
+ {$EXTERNALSYM ENUMRESLANGPROCW}
+ ENUMRESLANGPROC = function(hModule: HMODULE; lpType, lpName: LPCTSTR;
+ wLanguage: WORD; lParam: LONG_PTR): BOOL; stdcall;
+ {$EXTERNALSYM ENUMRESLANGPROC}
+ TEnumResLangProcA = ENUMRESLANGPROCA;
+ TEnumResLangProcW = ENUMRESLANGPROCW;
+ TEnumResLangProc = ENUMRESLANGPROC;
+
+function EnumResourceTypesA(hModule: HMODULE; lpEnumFunc: ENUMRESTYPEPROCA;
+ lParam: LONG_PTR): BOOL; stdcall;
+{$EXTERNALSYM EnumResourceTypesA}
+function EnumResourceTypesW(hModule: HMODULE; lpEnumFunc: ENUMRESTYPEPROCW;
+ lParam: LONG_PTR): BOOL; stdcall;
+{$EXTERNALSYM EnumResourceTypesW}
+function EnumResourceTypes(hModule: HMODULE; lpEnumFunc: ENUMRESTYPEPROC;
+ lParam: LONG_PTR): BOOL; stdcall;
+{$EXTERNALSYM EnumResourceTypes}
+
+function EnumResourceNamesA(hModule: HMODULE; lpType: LPCSTR;
+ lpEnumFunc: ENUMRESNAMEPROCA; lParam: LONG_PTR): BOOL; stdcall;
+{$EXTERNALSYM EnumResourceNamesA}
+function EnumResourceNamesW(hModule: HMODULE; lpType: LPCWSTR;
+ lpEnumFunc: ENUMRESNAMEPROCW; lParam: LONG_PTR): BOOL; stdcall;
+{$EXTERNALSYM EnumResourceNamesW}
+function EnumResourceNames(hModule: HMODULE; lpType: LPCTSTR;
+ lpEnumFunc: ENUMRESNAMEPROC; lParam: LONG_PTR): BOOL; stdcall;
+{$EXTERNALSYM EnumResourceNames}
+
+function EnumResourceLanguagesA(hModule: HMODULE; lpType, lpName: LPCSTR;
+ lpEnumFunc: ENUMRESLANGPROCA; lParam: LONG_PTR): BOOL; stdcall;
+{$EXTERNALSYM EnumResourceLanguagesA}
+function EnumResourceLanguagesW(hModule: HMODULE; lpType, lpName: LPCWSTR;
+ lpEnumFunc: ENUMRESLANGPROCW; lParam: LONG_PTR): BOOL; stdcall;
+{$EXTERNALSYM EnumResourceLanguagesW}
+function EnumResourceLanguages(hModule: HMODULE; lpType, lpName: LPCTSTR;
+ lpEnumFunc: ENUMRESLANGPROC; lParam: LONG_PTR): BOOL; stdcall;
+{$EXTERNALSYM EnumResourceLanguages}
+
+function BeginUpdateResourceA(pFileName: LPCSTR; bDeleteExistingResources: BOOL): HANDLE; stdcall;
+{$EXTERNALSYM BeginUpdateResourceA}
+function BeginUpdateResourceW(pFileName: LPCWSTR; bDeleteExistingResources: BOOL): HANDLE; stdcall;
+{$EXTERNALSYM BeginUpdateResourceW}
+function BeginUpdateResource(pFileName: LPCTSTR; bDeleteExistingResources: BOOL): HANDLE; stdcall;
+{$EXTERNALSYM BeginUpdateResource}
+
+function UpdateResourceA(hUpdate: HANDLE; lpType, lpName: LPCSTR;
+ wLanguage: WORD; lpData: LPVOID; cbData: DWORD): BOOL; stdcall;
+{$EXTERNALSYM UpdateResourceA}
+function UpdateResourceW(hUpdate: HANDLE; lpType, lpName: LPCWSTR;
+ wLanguage: WORD; lpData: LPVOID; cbData: DWORD): BOOL; stdcall;
+{$EXTERNALSYM UpdateResourceW}
+function UpdateResource(hUpdate: HANDLE; lpType, lpName: LPCTSTR;
+ wLanguage: WORD; lpData: LPVOID; cbData: DWORD): BOOL; stdcall;
+{$EXTERNALSYM UpdateResource}
+
+function EndUpdateResourceA(hUpdate: HANDLE; fDiscard: BOOL): BOOL; stdcall;
+{$EXTERNALSYM EndUpdateResourceA}
+function EndUpdateResourceW(hUpdate: HANDLE; fDiscard: BOOL): BOOL; stdcall;
+{$EXTERNALSYM EndUpdateResourceW}
+function EndUpdateResource(hUpdate: HANDLE; fDiscard: BOOL): BOOL; stdcall;
+{$EXTERNALSYM EndUpdateResource}
+
+function GlobalAddAtomA(lpString: LPCSTR): ATOM; stdcall;
+{$EXTERNALSYM GlobalAddAtomA}
+function GlobalAddAtomW(lpString: LPCWSTR): ATOM; stdcall;
+{$EXTERNALSYM GlobalAddAtomW}
+function GlobalAddAtom(lpString: LPCTSTR): ATOM; stdcall;
+{$EXTERNALSYM GlobalAddAtom}
+
+function GlobalFindAtomA(lpString: LPCSTR): ATOM; stdcall;
+{$EXTERNALSYM GlobalFindAtomA}
+function GlobalFindAtomW(lpString: LPCWSTR): ATOM; stdcall;
+{$EXTERNALSYM GlobalFindAtomW}
+function GlobalFindAtom(lpString: LPCTSTR): ATOM; stdcall;
+{$EXTERNALSYM GlobalFindAtom}
+
+function GlobalGetAtomNameA(nAtom: ATOM; lpBuffer: LPSTR; nSize: Integer): UINT; stdcall;
+{$EXTERNALSYM GlobalGetAtomNameA}
+function GlobalGetAtomNameW(nAtom: ATOM; lpBuffer: LPWSTR; nSize: Integer): UINT; stdcall;
+{$EXTERNALSYM GlobalGetAtomNameW}
+function GlobalGetAtomName(nAtom: ATOM; lpBuffer: LPTSTR; nSize: Integer): UINT; stdcall;
+{$EXTERNALSYM GlobalGetAtomName}
+
+function AddAtomA(lpString: LPCSTR): ATOM; stdcall;
+{$EXTERNALSYM AddAtomA}
+function AddAtomW(lpString: LPCWSTR): ATOM; stdcall;
+{$EXTERNALSYM AddAtomW}
+function AddAtom(lpString: LPCTSTR): ATOM; stdcall;
+{$EXTERNALSYM AddAtom}
+
+function FindAtomA(lpString: LPCSTR): ATOM; stdcall;
+{$EXTERNALSYM FindAtomA}
+function FindAtomW(lpString: LPCWSTR): ATOM; stdcall;
+{$EXTERNALSYM FindAtomW}
+function FindAtom(lpString: LPCTSTR): ATOM; stdcall;
+{$EXTERNALSYM FindAtom}
+
+function GetAtomNameA(nAtom: ATOM; lpBuffer: LPSTR; nSize: Integer): UINT; stdcall;
+{$EXTERNALSYM GetAtomNameA}
+function GetAtomNameW(nAtom: ATOM; lpBuffer: LPWSTR; nSize: Integer): UINT; stdcall;
+{$EXTERNALSYM GetAtomNameW}
+function GetAtomName(nAtom: ATOM; lpBuffer: LPTSTR; nSize: Integer): UINT; stdcall;
+{$EXTERNALSYM GetAtomName}
+
+function GetProfileIntA(lpAppName, lpKeyName: LPCSTR; nDefault: Integer): UINT; stdcall;
+{$EXTERNALSYM GetProfileIntA}
+function GetProfileIntW(lpAppName, lpKeyName: LPCWSTR; nDefault: Integer): UINT; stdcall;
+{$EXTERNALSYM GetProfileIntW}
+function GetProfileInt(lpAppName, lpKeyName: LPCTSTR; nDefault: Integer): UINT; stdcall;
+{$EXTERNALSYM GetProfileInt}
+
+function GetProfileStringA(lpAppName, lpKeyName, lpDefault: LPCSTR;
+ lpReturnedString: LPSTR; nSize: DWORD): DWORD; stdcall;
+{$EXTERNALSYM GetProfileStringA}
+function GetProfileStringW(lpAppName, lpKeyName, lpDefault: LPCWSTR;
+ lpReturnedString: LPWSTR; nSize: DWORD): DWORD; stdcall;
+{$EXTERNALSYM GetProfileStringW}
+function GetProfileString(lpAppName, lpKeyName, lpDefault: LPCTSTR;
+ lpReturnedString: LPTSTR; nSize: DWORD): DWORD; stdcall;
+{$EXTERNALSYM GetProfileString}
+
+function WriteProfileStringA(lpAppName, lpKeyName, lpString: LPCSTR): BOOL; stdcall;
+{$EXTERNALSYM WriteProfileStringA}
+function WriteProfileStringW(lpAppName, lpKeyName, lpString: LPCWSTR): BOOL; stdcall;
+{$EXTERNALSYM WriteProfileStringW}
+function WriteProfileString(lpAppName, lpKeyName, lpString: LPCTSTR): BOOL; stdcall;
+{$EXTERNALSYM WriteProfileString}
+
+function GetProfileSectionA(lpAppName: LPCSTR; lpReturnedString: LPSTR;
+ nSize: DWORD): DWORD; stdcall;
+{$EXTERNALSYM GetProfileSectionA}
+function GetProfileSectionW(lpAppName: LPCWSTR; lpReturnedString: LPWSTR;
+ nSize: DWORD): DWORD; stdcall;
+{$EXTERNALSYM GetProfileSectionW}
+function GetProfileSection(lpAppName: LPCTSTR; lpReturnedString: LPTSTR;
+ nSize: DWORD): DWORD; stdcall;
+{$EXTERNALSYM GetProfileSection}
+
+function WriteProfileSectionA(lpAppName, lpString: LPCSTR): BOOL; stdcall;
+{$EXTERNALSYM WriteProfileSectionA}
+function WriteProfileSectionW(lpAppName, lpString: LPCWSTR): BOOL; stdcall;
+{$EXTERNALSYM WriteProfileSectionW}
+function WriteProfileSection(lpAppName, lpString: LPCTSTR): BOOL; stdcall;
+{$EXTERNALSYM WriteProfileSection}
+
+function GetPrivateProfileIntA(lpAppName, lpKeyName: LPCSTR; nDefault: Integer;
+ lpFileName: LPCSTR): UINT; stdcall;
+{$EXTERNALSYM GetPrivateProfileIntA}
+function GetPrivateProfileIntW(lpAppName, lpKeyName: LPCWSTR; nDefault: Integer;
+ lpFileName: LPCWSTR): UINT; stdcall;
+{$EXTERNALSYM GetPrivateProfileIntW}
+function GetPrivateProfileInt(lpAppName, lpKeyName: LPCTSTR; nDefault: Integer;
+ lpFileName: LPCTSTR): UINT; stdcall;
+{$EXTERNALSYM GetPrivateProfileInt}
+
+function GetPrivateProfileStringA(lpAppName, lpKeyName, lpDefault: LPCSTR;
+ lpReturnedString: LPSTR; nSize: DWORD; lpFileName: LPCSTR): DWORD; stdcall;
+{$EXTERNALSYM GetPrivateProfileStringA}
+function GetPrivateProfileStringW(lpAppName, lpKeyName, lpDefault: LPCWSTR;
+ lpReturnedString: LPWSTR; nSize: DWORD; lpFileName: LPCWSTR): DWORD; stdcall;
+{$EXTERNALSYM GetPrivateProfileStringW}
+function GetPrivateProfileString(lpAppName, lpKeyName, lpDefault: LPCTSTR;
+ lpReturnedString: LPTSTR; nSize: DWORD; lpFileName: LPCTSTR): DWORD; stdcall;
+{$EXTERNALSYM GetPrivateProfileString}
+
+function WritePrivateProfileStringA(lpAppName, lpKeyName, lpString,
+ lpFileName: LPCSTR): BOOL; stdcall;
+{$EXTERNALSYM WritePrivateProfileStringA}
+function WritePrivateProfileStringW(lpAppName, lpKeyName, lpString,
+ lpFileName: LPCWSTR): BOOL; stdcall;
+{$EXTERNALSYM WritePrivateProfileStringW}
+function WritePrivateProfileString(lpAppName, lpKeyName, lpString,
+ lpFileName: LPCTSTR): BOOL; stdcall;
+{$EXTERNALSYM WritePrivateProfileString}
+
+function GetPrivateProfileSectionA(lpAppName: LPCSTR; lpReturnedString: LPSTR;
+ nSize: DWORD; lpFileName: LPCSTR): DWORD; stdcall;
+{$EXTERNALSYM GetPrivateProfileSectionA}
+function GetPrivateProfileSectionW(lpAppName: LPCWSTR; lpReturnedString: LPWSTR;
+ nSize: DWORD; lpFileName: LPCWSTR): DWORD; stdcall;
+{$EXTERNALSYM GetPrivateProfileSectionW}
+function GetPrivateProfileSection(lpAppName: LPCTSTR; lpReturnedString: LPTSTR;
+ nSize: DWORD; lpFileName: LPCTSTR): DWORD; stdcall;
+{$EXTERNALSYM GetPrivateProfileSection}
+
+function WritePrivateProfileSectionA(lpAppName, lpString, lpFileName: LPCSTR): BOOL; stdcall;
+{$EXTERNALSYM WritePrivateProfileSectionA}
+function WritePrivateProfileSectionW(lpAppName, lpString, lpFileName: LPCWSTR): BOOL; stdcall;
+{$EXTERNALSYM WritePrivateProfileSectionW}
+function WritePrivateProfileSection(lpAppName, lpString, lpFileName: LPCTSTR): BOOL; stdcall;
+{$EXTERNALSYM WritePrivateProfileSection}
+
+function GetPrivateProfileSectionNamesA(lpszReturnBuffer: LPSTR; nSize: DWORD;
+ lpFileName: LPCSTR): DWORD; stdcall;
+{$EXTERNALSYM GetPrivateProfileSectionNamesA}
+function GetPrivateProfileSectionNamesW(lpszReturnBuffer: LPWSTR; nSize: DWORD;
+ lpFileName: LPCWSTR): DWORD; stdcall;
+{$EXTERNALSYM GetPrivateProfileSectionNamesW}
+function GetPrivateProfileSectionNames(lpszReturnBuffer: LPTSTR; nSize: DWORD;
+ lpFileName: LPCTSTR): DWORD; stdcall;
+{$EXTERNALSYM GetPrivateProfileSectionNames}
+
+function GetPrivateProfileStructA(lpszSection, lpszKey: LPCSTR; lpStruct: LPVOID;
+ uSizeStruct: UINT; szFile: LPCSTR): BOOL; stdcall;
+{$EXTERNALSYM GetPrivateProfileStructA}
+function GetPrivateProfileStructW(lpszSection, lpszKey: LPCWSTR; lpStruct: LPVOID;
+ uSizeStruct: UINT; szFile: LPCWSTR): BOOL; stdcall;
+{$EXTERNALSYM GetPrivateProfileStructW}
+function GetPrivateProfileStruct(lpszSection, lpszKey: LPCTSTR; lpStruct: LPVOID;
+ uSizeStruct: UINT; szFile: LPCTSTR): BOOL; stdcall;
+{$EXTERNALSYM GetPrivateProfileStruct}
+
+function WritePrivateProfileStructA(lpszSection, lpszKey: LPCSTR; lpStruct: LPVOID;
+ uSizeStruct: UINT; szFile: LPCSTR): BOOL; stdcall;
+{$EXTERNALSYM WritePrivateProfileStructA}
+function WritePrivateProfileStructW(lpszSection, lpszKey: LPCWSTR; lpStruct: LPVOID;
+ uSizeStruct: UINT; szFile: LPCWSTR): BOOL; stdcall;
+{$EXTERNALSYM WritePrivateProfileStructW}
+function WritePrivateProfileStruct(lpszSection, lpszKey: LPCTSTR; lpStruct: LPVOID;
+ uSizeStruct: UINT; szFile: LPCTSTR): BOOL; stdcall;
+{$EXTERNALSYM WritePrivateProfileStruct}
+
+function GetDriveTypeA(lpRootPathName: LPCSTR): UINT; stdcall;
+{$EXTERNALSYM GetDriveTypeA}
+function GetDriveTypeW(lpRootPathName: LPCWSTR): UINT; stdcall;
+{$EXTERNALSYM GetDriveTypeW}
+function GetDriveType(lpRootPathName: LPCTSTR): UINT; stdcall;
+{$EXTERNALSYM GetDriveType}
+
+function GetSystemDirectoryA(lpBuffer: LPSTR; uSize: UINT): UINT; stdcall;
+{$EXTERNALSYM GetSystemDirectoryA}
+function GetSystemDirectoryW(lpBuffer: LPWSTR; uSize: UINT): UINT; stdcall;
+{$EXTERNALSYM GetSystemDirectoryW}
+function GetSystemDirectory(lpBuffer: LPTSTR; uSize: UINT): UINT; stdcall;
+{$EXTERNALSYM GetSystemDirectory}
+
+function GetTempPathA(nBufferLength: DWORD; lpBuffer: LPSTR): DWORD; stdcall;
+{$EXTERNALSYM GetTempPathA}
+function GetTempPathW(nBufferLength: DWORD; lpBuffer: LPWSTR): DWORD; stdcall;
+{$EXTERNALSYM GetTempPathW}
+function GetTempPath(nBufferLength: DWORD; lpBuffer: LPTSTR): DWORD; stdcall;
+{$EXTERNALSYM GetTempPath}
+
+function GetTempFileNameA(lpPathName, lpPrefixString: LPCSTR; uUnique: UINT;
+ lpTempFileName: LPSTR): UINT; stdcall;
+{$EXTERNALSYM GetTempFileNameA}
+function GetTempFileNameW(lpPathName, lpPrefixString: LPCWSTR; uUnique: UINT;
+ lpTempFileName: LPWSTR): UINT; stdcall;
+{$EXTERNALSYM GetTempFileNameW}
+function GetTempFileName(lpPathName, lpPrefixString: LPCTSTR; uUnique: UINT;
+ lpTempFileName: LPTSTR): UINT; stdcall;
+{$EXTERNALSYM GetTempFileName}
+
+function GetWindowsDirectoryA(lpBuffer: LPSTR; uSize: UINT): UINT; stdcall;
+{$EXTERNALSYM GetWindowsDirectoryA}
+function GetWindowsDirectoryW(lpBuffer: LPWSTR; uSize: UINT): UINT; stdcall;
+{$EXTERNALSYM GetWindowsDirectoryW}
+function GetWindowsDirectory(lpBuffer: LPTSTR; uSize: UINT): UINT; stdcall;
+{$EXTERNALSYM GetWindowsDirectory}
+
+function GetSystemWindowsDirectoryA(lpBuffer: LPSTR; uSize: UINT): UINT; stdcall;
+{$EXTERNALSYM GetSystemWindowsDirectoryA}
+function GetSystemWindowsDirectoryW(lpBuffer: LPWSTR; uSize: UINT): UINT; stdcall;
+{$EXTERNALSYM GetSystemWindowsDirectoryW}
+function GetSystemWindowsDirectory(lpBuffer: LPTSTR; uSize: UINT): UINT; stdcall;
+{$EXTERNALSYM GetSystemWindowsDirectory}
+
+function GetSystemWow64DirectoryA(lpBuffer: LPSTR; uSize: UINT): UINT; stdcall;
+{$EXTERNALSYM GetSystemWow64DirectoryA}
+function GetSystemWow64DirectoryW(lpBuffer: LPWSTR; uSize: UINT): UINT; stdcall;
+{$EXTERNALSYM GetSystemWow64DirectoryW}
+function GetSystemWow64Directory(lpBuffer: LPTSTR; uSize: UINT): UINT; stdcall;
+{$EXTERNALSYM GetSystemWow64Directory}
+
+function Wow64EnableWow64FsRedirection(Wow64FsEnableRedirection: BOOL): BOOL; stdcall;
+{$EXTERNALSYM Wow64EnableWow64FsRedirection}
+
+//
+// for GetProcAddress
+//
+
+type
+ PGET_SYSTEM_WOW64_DIRECTORY_A = function(lpBuffer: LPSTR; uSize: UINT): UINT; stdcall;
+ {$EXTERNALSYM PGET_SYSTEM_WOW64_DIRECTORY_A}
+ PGET_SYSTEM_WOW64_DIRECTORY_W = function(lpBuffer: LPWSTR; uSize: UINT): UINT; stdcall;
+ {$EXTERNALSYM PGET_SYSTEM_WOW64_DIRECTORY_W}
+
+//
+// GetProcAddress only accepts GET_SYSTEM_WOW64_DIRECTORY_NAME_A_A,
+// GET_SYSTEM_WOW64_DIRECTORY_NAME_W_A, GET_SYSTEM_WOW64_DIRECTORY_NAME_T_A.
+// The others are if you want to use the strings in some other way.
+//
+
+const
+ GET_SYSTEM_WOW64_DIRECTORY_NAME_A_A = 'GetSystemWow64DirectoryA';
+ {$EXTERNALSYM GET_SYSTEM_WOW64_DIRECTORY_NAME_A_A}
+ GET_SYSTEM_WOW64_DIRECTORY_NAME_A_W = WideString('GetSystemWow64DirectoryA');
+ {$EXTERNALSYM GET_SYSTEM_WOW64_DIRECTORY_NAME_A_W}
+ GET_SYSTEM_WOW64_DIRECTORY_NAME_A_T = __TEXT('GetSystemWow64DirectoryA');
+ {$EXTERNALSYM GET_SYSTEM_WOW64_DIRECTORY_NAME_A_T}
+ GET_SYSTEM_WOW64_DIRECTORY_NAME_W_A = 'GetSystemWow64DirectoryW';
+ {$EXTERNALSYM GET_SYSTEM_WOW64_DIRECTORY_NAME_W_A}
+ GET_SYSTEM_WOW64_DIRECTORY_NAME_W_W = WideString('GetSystemWow64DirectoryW');
+ {$EXTERNALSYM GET_SYSTEM_WOW64_DIRECTORY_NAME_W_W}
+ GET_SYSTEM_WOW64_DIRECTORY_NAME_W_T = __TEXT('GetSystemWow64DirectoryW');
+ {$EXTERNALSYM GET_SYSTEM_WOW64_DIRECTORY_NAME_W_T}
+
+ {$IFDEF UNICODE}
+ GET_SYSTEM_WOW64_DIRECTORY_NAME_T_A = GET_SYSTEM_WOW64_DIRECTORY_NAME_W_A;
+ {$EXTERNALSYM GET_SYSTEM_WOW64_DIRECTORY_NAME_T_A}
+ GET_SYSTEM_WOW64_DIRECTORY_NAME_T_W = GET_SYSTEM_WOW64_DIRECTORY_NAME_W_W;
+ {$EXTERNALSYM GET_SYSTEM_WOW64_DIRECTORY_NAME_T_W}
+ GET_SYSTEM_WOW64_DIRECTORY_NAME_T_T = GET_SYSTEM_WOW64_DIRECTORY_NAME_W_T;
+ {$EXTERNALSYM GET_SYSTEM_WOW64_DIRECTORY_NAME_T_T}
+ {$ELSE}
+ GET_SYSTEM_WOW64_DIRECTORY_NAME_T_A = GET_SYSTEM_WOW64_DIRECTORY_NAME_A_A;
+ {$EXTERNALSYM GET_SYSTEM_WOW64_DIRECTORY_NAME_T_A}
+ GET_SYSTEM_WOW64_DIRECTORY_NAME_T_W = GET_SYSTEM_WOW64_DIRECTORY_NAME_A_W;
+ {$EXTERNALSYM GET_SYSTEM_WOW64_DIRECTORY_NAME_T_W}
+ GET_SYSTEM_WOW64_DIRECTORY_NAME_T_T = GET_SYSTEM_WOW64_DIRECTORY_NAME_A_T;
+ {$EXTERNALSYM GET_SYSTEM_WOW64_DIRECTORY_NAME_T_T}
+ {$ENDIF UNICODE}
+
+function SetCurrentDirectoryA(lpPathName: LPCSTR): BOOL; stdcall;
+{$EXTERNALSYM SetCurrentDirectoryA}
+function SetCurrentDirectoryW(lpPathName: LPCWSTR): BOOL; stdcall;
+{$EXTERNALSYM SetCurrentDirectoryW}
+function SetCurrentDirectory(lpPathName: LPCTSTR): BOOL; stdcall;
+{$EXTERNALSYM SetCurrentDirectory}
+
+function GetCurrentDirectoryA(nBufferLength: DWORD; lpBuffer: LPSTR): DWORD; stdcall;
+{$EXTERNALSYM GetCurrentDirectoryA}
+function GetCurrentDirectoryW(nBufferLength: DWORD; lpBuffer: LPWSTR): DWORD; stdcall;
+{$EXTERNALSYM GetCurrentDirectoryW}
+function GetCurrentDirectory(nBufferLength: DWORD; lpBuffer: LPTSTR): DWORD; stdcall;
+{$EXTERNALSYM GetCurrentDirectory}
+
+//#if _WIN32_WINNT >= 0x0502
+
+function SetDllDirectoryA(lpPathName: LPCSTR): BOOL; stdcall;
+{$EXTERNALSYM SetDllDirectoryA}
+function SetDllDirectoryW(lpPathName: LPCWSTR): BOOL; stdcall;
+{$EXTERNALSYM SetDllDirectoryW}
+function SetDllDirectory(lpPathName: LPCTSTR): BOOL; stdcall;
+{$EXTERNALSYM SetDllDirectory}
+
+function GetDllDirectoryA(nBufferLength: DWORD; lpBuffer: LPSTR): DWORD; stdcall;
+{$EXTERNALSYM GetDllDirectoryA}
+function GetDllDirectoryW(nBufferLength: DWORD; lpBuffer: LPWSTR): DWORD; stdcall;
+{$EXTERNALSYM GetDllDirectoryW}
+function GetDllDirectory(nBufferLength: DWORD; lpBuffer: LPTSTR): DWORD; stdcall;
+{$EXTERNALSYM GetDllDirectory}
+
+//#endif // _WIN32_WINNT >= 0x0502
+
+function GetDiskFreeSpaceA(lpRootPathName: LPCSTR; var lpSectorsPerCluster,
+ lpBytesPerSector, lpNumberOfFreeClusters, lpTotalNumberOfClusters: DWORD): BOOL; stdcall;
+{$EXTERNALSYM GetDiskFreeSpaceA}
+function GetDiskFreeSpaceW(lpRootPathName: LPCWSTR; var lpSectorsPerCluster,
+ lpBytesPerSector, lpNumberOfFreeClusters, lpTotalNumberOfClusters: DWORD): BOOL; stdcall;
+{$EXTERNALSYM GetDiskFreeSpaceW}
+function GetDiskFreeSpace(lpRootPathName: LPCTSTR; var lpSectorsPerCluster,
+ lpBytesPerSector, lpNumberOfFreeClusters, lpTotalNumberOfClusters: DWORD): BOOL; stdcall;
+{$EXTERNALSYM GetDiskFreeSpace}
+
+function GetDiskFreeSpaceExA(lpDirectoryName: LPCSTR; var lpFreeBytesAvailableToCaller,
+ lpTotalNumberOfBytes: ULARGE_INTEGER; lpTotalNumberOfFreeBytes: PULARGE_INTEGER): BOOL; stdcall;
+{$EXTERNALSYM GetDiskFreeSpaceExA}
+function GetDiskFreeSpaceExW(lpDirectoryName: LPCWSTR; var lpFreeBytesAvailableToCaller,
+ lpTotalNumberOfBytes: ULARGE_INTEGER; lpTotalNumberOfFreeBytes: PULARGE_INTEGER): BOOL; stdcall;
+{$EXTERNALSYM GetDiskFreeSpaceExW}
+function GetDiskFreeSpaceEx(lpDirectoryName: LPCTSTR; var lpFreeBytesAvailableToCaller,
+ lpTotalNumberOfBytes: ULARGE_INTEGER; lpTotalNumberOfFreeBytes: PULARGE_INTEGER): BOOL; stdcall;
+{$EXTERNALSYM GetDiskFreeSpaceEx}
+
+function CreateDirectoryA(lpPathName: LPCSTR; lpSecurityAttributes: LPSECURITY_ATTRIBUTES): BOOL; stdcall;
+{$EXTERNALSYM CreateDirectoryA}
+function CreateDirectoryW(lpPathName: LPCWSTR; lpSecurityAttributes: LPSECURITY_ATTRIBUTES): BOOL; stdcall;
+{$EXTERNALSYM CreateDirectoryW}
+function CreateDirectory(lpPathName: LPCTSTR; lpSecurityAttributes: LPSECURITY_ATTRIBUTES): BOOL; stdcall;
+{$EXTERNALSYM CreateDirectory}
+
+function CreateDirectoryExA(lpTemplateDirectory: LPCSTR; lpNewDirectory: LPCSTR;
+ lpSecurityAttributes: LPSECURITY_ATTRIBUTES): BOOL; stdcall;
+{$EXTERNALSYM CreateDirectoryExA}
+function CreateDirectoryExW(lpTemplateDirectory: LPCWSTR; lpNewDirectory: LPCWSTR;
+ lpSecurityAttributes: LPSECURITY_ATTRIBUTES): BOOL; stdcall;
+{$EXTERNALSYM CreateDirectoryExW}
+function CreateDirectoryEx(lpTemplateDirectory: LPCTSTR; lpNewDirectory: LPCTSTR;
+ lpSecurityAttributes: LPSECURITY_ATTRIBUTES): BOOL; stdcall;
+{$EXTERNALSYM CreateDirectoryEx}
+
+function RemoveDirectoryA(lpPathName: LPCSTR): BOOL; stdcall;
+{$EXTERNALSYM RemoveDirectoryA}
+function RemoveDirectoryW(lpPathName: LPCWSTR): BOOL; stdcall;
+{$EXTERNALSYM RemoveDirectoryW}
+function RemoveDirectory(lpPathName: LPCTSTR): BOOL; stdcall;
+{$EXTERNALSYM RemoveDirectory}
+
+function GetFullPathNameA(lpFileName: LPCSTR; nBufferLength: DWORD;
+ lpBuffer: LPSTR; var lpFilePart: LPSTR): DWORD; stdcall;
+{$EXTERNALSYM GetFullPathNameA}
+function GetFullPathNameW(lpFileName: LPCWSTR; nBufferLength: DWORD;
+ lpBuffer: LPWSTR; var lpFilePart: LPWSTR): DWORD; stdcall;
+{$EXTERNALSYM GetFullPathNameA}
+function GetFullPathName(lpFileName: LPCTSTR; nBufferLength: DWORD;
+ lpBuffer: LPTSTR; var lpFilePart: LPTSTR): DWORD; stdcall;
+{$EXTERNALSYM GetFullPathName}
+
+const
+ DDD_RAW_TARGET_PATH = $00000001;
+ {$EXTERNALSYM DDD_RAW_TARGET_PATH}
+ DDD_REMOVE_DEFINITION = $00000002;
+ {$EXTERNALSYM DDD_REMOVE_DEFINITION}
+ DDD_EXACT_MATCH_ON_REMOVE = $00000004;
+ {$EXTERNALSYM DDD_EXACT_MATCH_ON_REMOVE}
+ DDD_NO_BROADCAST_SYSTEM = $00000008;
+ {$EXTERNALSYM DDD_NO_BROADCAST_SYSTEM}
+ DDD_LUID_BROADCAST_DRIVE = $00000010;
+ {$EXTERNALSYM DDD_LUID_BROADCAST_DRIVE}
+
+function DefineDosDeviceA(dwFlags: DWORD; lpDeviceName, lpTargetPath: LPCSTR): BOOL; stdcall;
+{$EXTERNALSYM DefineDosDeviceA}
+function DefineDosDeviceW(dwFlags: DWORD; lpDeviceName, lpTargetPath: LPCWSTR): BOOL; stdcall;
+{$EXTERNALSYM DefineDosDeviceW}
+function DefineDosDevice(dwFlags: DWORD; lpDeviceName, lpTargetPath: LPCTSTR): BOOL; stdcall;
+{$EXTERNALSYM DefineDosDevice}
+
+function QueryDosDeviceA(lpDeviceName, lpTargetPath: LPSTR; ucchMax: DWORD): DWORD; stdcall;
+{$EXTERNALSYM QueryDosDeviceA}
+function QueryDosDeviceW(lpDeviceName, lpTargetPath: LPWSTR; ucchMax: DWORD): DWORD; stdcall;
+{$EXTERNALSYM QueryDosDeviceW}
+function QueryDosDevice(lpDeviceName, lpTargetPath: LPTSTR; ucchMax: DWORD): DWORD; stdcall;
+{$EXTERNALSYM QueryDosDevice}
+
+function CreateFileA(lpFileName: LPCSTR; dwDesiredAccess, dwShareMode: DWORD;
+ lpSecurityAttributes: LPSECURITY_ATTRIBUTES; dwCreationDisposition: DWORD;
+ dwFlagsAndAttributes: DWORD; hTemplateFile: HANDLE): HANDLE; stdcall;
+{$EXTERNALSYM CreateFileA}
+function CreateFileW(lpFileName: LPCWSTR; dwDesiredAccess, dwShareMode: DWORD;
+ lpSecurityAttributes: LPSECURITY_ATTRIBUTES; dwCreationDisposition: DWORD;
+ dwFlagsAndAttributes: DWORD; hTemplateFile: HANDLE): HANDLE; stdcall;
+{$EXTERNALSYM CreateFileW}
+function CreateFile(lpFileName: LPCTSTR; dwDesiredAccess, dwShareMode: DWORD;
+ lpSecurityAttributes: LPSECURITY_ATTRIBUTES; dwCreationDisposition: DWORD;
+ dwFlagsAndAttributes: DWORD; hTemplateFile: HANDLE): HANDLE; stdcall;
+{$EXTERNALSYM CreateFile}
+
+function ReOpenFile(hOriginalFile: HANDLE; dwDesiredAccess, dwShareMode, dwFlagsAndAttributes: DWORD): HANDLE; stdcall;
+{$EXTERNALSYM ReOpenFile}
+
+function SetFileAttributesA(lpFileName: LPCSTR; dwFileAttributes: DWORD): BOOL; stdcall;
+{$EXTERNALSYM SetFileAttributesA}
+function SetFileAttributesW(lpFileName: LPCWSTR; dwFileAttributes: DWORD): BOOL; stdcall;
+{$EXTERNALSYM SetFileAttributesW}
+function SetFileAttributes(lpFileName: LPCTSTR; dwFileAttributes: DWORD): BOOL; stdcall;
+{$EXTERNALSYM SetFileAttributes}
+
+function GetFileAttributesA(lpFileName: LPCSTR): DWORD; stdcall;
+{$EXTERNALSYM GetFileAttributesA}
+function GetFileAttributesW(lpFileName: LPCWSTR): DWORD; stdcall;
+{$EXTERNALSYM GetFileAttributesW}
+function GetFileAttributes(lpFileName: LPCTSTR): DWORD; stdcall;
+{$EXTERNALSYM GetFileAttributes}
+
+type
+ _GET_FILEEX_INFO_LEVELS = (GetFileExInfoStandard, GetFileExMaxInfoLevel);
+ {$EXTERNALSYM _GET_FILEEX_INFO_LEVELS}
+ GET_FILEEX_INFO_LEVELS = _GET_FILEEX_INFO_LEVELS;
+ {$EXTERNALSYM GET_FILEEX_INFO_LEVELS}
+ TGetFileExInfoLevels = GET_FILEEX_INFO_LEVELS;
+
+function GetFileAttributesExA(lpFileName: LPCSTR;
+ fInfoLevelId: GET_FILEEX_INFO_LEVELS; lpFileInformation: LPVOID): BOOL; stdcall;
+{$EXTERNALSYM GetFileAttributesExA}
+function GetFileAttributesExW(lpFileName: LPCWSTR;
+ fInfoLevelId: GET_FILEEX_INFO_LEVELS; lpFileInformation: LPVOID): BOOL; stdcall;
+{$EXTERNALSYM GetFileAttributesExW}
+function GetFileAttributesEx(lpFileName: LPCTSTR;
+ fInfoLevelId: GET_FILEEX_INFO_LEVELS; lpFileInformation: LPVOID): BOOL; stdcall;
+{$EXTERNALSYM GetFileAttributesEx}
+
+function GetCompressedFileSizeA(lpFileName: LPCSTR; lpFileSizeHigh: LPDWORD): DWORD; stdcall;
+{$EXTERNALSYM GetCompressedFileSizeA}
+function GetCompressedFileSizeW(lpFileName: LPCWSTR; lpFileSizeHigh: LPDWORD): DWORD; stdcall;
+{$EXTERNALSYM GetCompressedFileSizeW}
+function GetCompressedFileSize(lpFileName: LPCTSTR; lpFileSizeHigh: LPDWORD): DWORD; stdcall;
+{$EXTERNALSYM GetCompressedFileSize}
+
+function DeleteFileA(lpFileName: LPCSTR): BOOL; stdcall;
+{$EXTERNALSYM DeleteFileA}
+function DeleteFileW(lpFileName: LPCWSTR): BOOL; stdcall;
+{$EXTERNALSYM DeleteFileW}
+function DeleteFile(lpFileName: LPCTSTR): BOOL; stdcall;
+{$EXTERNALSYM DeleteFile}
+
+(* todo
+WINBASEAPI
+BOOL
+WINAPI
+CheckNameLegalDOS8Dot3A(
+ IN LPCSTR lpName,
+ OUT LPSTR lpOemName OPTIONAL,
+ IN DWORD OemNameSize OPTIONAL,
+ OUT PBOOL pbNameContainsSpaces OPTIONAL,
+ OUT PBOOL pbNameLegal
+ );
+WINBASEAPI
+BOOL
+WINAPI
+CheckNameLegalDOS8Dot3W(
+ IN LPCWSTR lpName,
+ OUT LPSTR lpOemName OPTIONAL,
+ IN DWORD OemNameSize OPTIONAL,
+ OUT PBOOL pbNameContainsSpaces OPTIONAL,
+ OUT PBOOL pbNameLegal
+ );
+#ifdef UNICODE
+#define CheckNameLegalDOS8Dot3 CheckNameLegalDOS8Dot3W
+#else
+#define CheckNameLegalDOS8Dot3 CheckNameLegalDOS8Dot3A
+#endif // !UNICODE
+*)
+
+type
+ _FINDEX_INFO_LEVELS = (FindExInfoStandard, FindExInfoMaxInfoLevel);
+ {$EXTERNALSYM _FINDEX_INFO_LEVELS}
+ FINDEX_INFO_LEVELS = _FINDEX_INFO_LEVELS;
+ {$EXTERNALSYM FINDEX_INFO_LEVELS}
+ TFindExInfoLevels = FINDEX_INFO_LEVELS;
+
+ _FINDEX_SEARCH_OPS = (
+ FindExSearchNameMatch,
+ FindExSearchLimitToDirectories,
+ FindExSearchLimitToDevices,
+ FindExSearchMaxSearchOp);
+ {$EXTERNALSYM _FINDEX_SEARCH_OPS}
+ FINDEX_SEARCH_OPS = _FINDEX_SEARCH_OPS;
+ {$EXTERNALSYM FINDEX_SEARCH_OPS}
+ TFindExSearchOps = FINDEX_SEARCH_OPS;
+
+const
+ FIND_FIRST_EX_CASE_SENSITIVE = $00000001;
+ {$EXTERNALSYM FIND_FIRST_EX_CASE_SENSITIVE}
+
+function FindFirstFileExA(lpFileName: LPCSTR; fInfoLevelId: FINDEX_INFO_LEVELS;
+ lpFindFileData: LPVOID; fSearchOp: FINDEX_SEARCH_OPS; lpSearchFilter: LPVOID;
+ dwAdditionalFlags: DWORD): HANDLE; stdcall;
+{$EXTERNALSYM FindFirstFileExA}
+function FindFirstFileExW(lpFileName: LPCWSTR; fInfoLevelId: FINDEX_INFO_LEVELS;
+ lpFindFileData: LPVOID; fSearchOp: FINDEX_SEARCH_OPS; lpSearchFilter: LPVOID;
+ dwAdditionalFlags: DWORD): HANDLE; stdcall;
+{$EXTERNALSYM FindFirstFileExW}
+function FindFirstFileEx(lpFileName: LPCTSTR; fInfoLevelId: FINDEX_INFO_LEVELS;
+ lpFindFileData: LPVOID; fSearchOp: FINDEX_SEARCH_OPS; lpSearchFilter: LPVOID;
+ dwAdditionalFlags: DWORD): HANDLE; stdcall;
+{$EXTERNALSYM FindFirstFileEx}
+
+function FindFirstFileA(lpFileName: LPCSTR; var lpFindFileData: WIN32_FIND_DATAA): HANDLE; stdcall;
+{$EXTERNALSYM FindFirstFileA}
+function FindFirstFileW(lpFileName: LPCWSTR; var lpFindFileData: WIN32_FIND_DATAW): HANDLE; stdcall;
+{$EXTERNALSYM FindFirstFileW}
+function FindFirstFile(lpFileName: LPCTSTR; var lpFindFileData: WIN32_FIND_DATA): HANDLE; stdcall;
+{$EXTERNALSYM FindFirstFile}
+
+function FindNextFileA(hFindFile: HANDLE; var FindFileData: WIN32_FIND_DATAA): BOOL; stdcall;
+{$EXTERNALSYM FindNextFileA}
+function FindNextFileW(hFindFile: HANDLE; var lpFindFileData: WIN32_FIND_DATAW): BOOL; stdcall;
+{$EXTERNALSYM FindNextFileW}
+function FindNextFile(hFindFile: HANDLE; var lpFindFileData: WIN32_FIND_DATA): BOOL; stdcall;
+{$EXTERNALSYM FindNextFile}
+
+function SearchPathA(lpPath, lpFileName, lpExtension: LPCSTR; nBufferLength: DWORD;
+ lpBuffer: LPSTR; var lpFilePart: LPSTR): DWORD; stdcall;
+{$EXTERNALSYM SearchPathA}
+function SearchPathW(lpPath, lpFileName, lpExtension: LPCWSTR; nBufferLength: DWORD;
+ lpBuffer: LPWSTR; var lpFilePart: LPWSTR): DWORD; stdcall;
+{$EXTERNALSYM SearchPathW}
+function SearchPath(lpPath, lpFileName, lpExtension: LPCTSTR; nBufferLength: DWORD;
+ lpBuffer: LPTSTR; var lpFilePart: LPTSTR): DWORD; stdcall;
+{$EXTERNALSYM SearchPath}
+
+function CopyFileA(lpExistingFileName, lpNewFileName: LPCSTR; bFailIfExists: BOOL): BOOL; stdcall;
+{$EXTERNALSYM CopyFileA}
+function CopyFileW(lpExistingFileName, lpNewFileName: LPCWSTR; bFailIfExists: BOOL): BOOL; stdcall;
+{$EXTERNALSYM CopyFileW}
+function CopyFile(lpExistingFileName, lpNewFileName: LPCTSTR; bFailIfExists: BOOL): BOOL; stdcall;
+{$EXTERNALSYM CopyFile}
+
+type
+ LPPROGRESS_ROUTINE = function(
+ TotalFileSize: LARGE_INTEGER;
+ TotalBytesTransferred: LARGE_INTEGER;
+ StreamSize: LARGE_INTEGER;
+ StreamBytesTransferred: LARGE_INTEGER;
+ dwStreamNumber: DWORD;
+ dwCallbackReason: DWORD;
+ hSourceFile: HANDLE;
+ hDestinationFile: HANDLE;
+ lpData: LPVOID): DWORD; stdcall;
+ {$EXTERNALSYM LPPROGRESS_ROUTINE}
+ TProgressRoutine = LPPROGRESS_ROUTINE;
+
+function CopyFileExA(lpExistingFileName, lpNewFileName: LPCSTR;
+ lpProgressRoutine: LPPROGRESS_ROUTINE; lpData: LPVOID; var pbCancel: BOOL;
+ dwCopyFlags: DWORD): BOOL; stdcall;
+{$EXTERNALSYM CopyFileExA}
+function CopyFileExW(lpExistingFileName, lpNewFileName: LPCWSTR;
+ lpProgressRoutine: LPPROGRESS_ROUTINE; lpData: LPVOID; var pbCancel: BOOL;
+ dwCopyFlags: DWORD): BOOL; stdcall;
+{$EXTERNALSYM CopyFileExW}
+function CopyFileEx(lpExistingFileName, lpNewFileName: LPCTSTR;
+ lpProgressRoutine: LPPROGRESS_ROUTINE; lpData: LPVOID; var pbCancel: BOOL;
+ dwCopyFlags: DWORD): BOOL; stdcall;
+{$EXTERNALSYM CopyFileEx}
+
+function MoveFileA(lpExistingFileName, lpNewFileName: LPCSTR): BOOL; stdcall;
+{$EXTERNALSYM MoveFileA}
+function MoveFileW(lpExistingFileName, lpNewFileName: LPCWSTR): BOOL; stdcall;
+{$EXTERNALSYM MoveFileW}
+function MoveFile(lpExistingFileName, lpNewFileName: LPCTSTR): BOOL; stdcall;
+{$EXTERNALSYM MoveFile}
+
+function MoveFileExA(lpExistingFileName, lpNewFileName: LPCSTR; dwFlags: DWORD): BOOL; stdcall;
+{$EXTERNALSYM MoveFileExA}
+function MoveFileExW(lpExistingFileName, lpNewFileName: LPCWSTR; dwFlags: DWORD): BOOL; stdcall;
+{$EXTERNALSYM MoveFileExW}
+function MoveFileEx(lpExistingFileName, lpNewFileName: LPCTSTR; dwFlags: DWORD): BOOL; stdcall;
+{$EXTERNALSYM MoveFileEx}
+
+function MoveFileWithProgressA(lpExistingFileName, lpNewFileName: LPCSTR;
+ lpProgressRoutine: LPPROGRESS_ROUTINE; lpData: LPVOID; dwFlags: DWORD): BOOL; stdcall;
+{$EXTERNALSYM MoveFileWithProgressA}
+function MoveFileWithProgressW(lpExistingFileName, lpNewFileName: LPCWSTR;
+ lpProgressRoutine: LPPROGRESS_ROUTINE; lpData: LPVOID; dwFlags: DWORD): BOOL; stdcall;
+{$EXTERNALSYM MoveFileWithProgressW}
+function MoveFileWithProgress(lpExistingFileName, lpNewFileName: LPCTSTR;
+ lpProgressRoutine: LPPROGRESS_ROUTINE; lpData: LPVOID; dwFlags: DWORD): BOOL; stdcall;
+{$EXTERNALSYM MoveFileWithProgress}
+
+const
+ MOVEFILE_REPLACE_EXISTING = $00000001;
+ {$EXTERNALSYM MOVEFILE_REPLACE_EXISTING}
+ MOVEFILE_COPY_ALLOWED = $00000002;
+ {$EXTERNALSYM MOVEFILE_COPY_ALLOWED}
+ MOVEFILE_DELAY_UNTIL_REBOOT = $00000004;
+ {$EXTERNALSYM MOVEFILE_DELAY_UNTIL_REBOOT}
+ MOVEFILE_WRITE_THROUGH = $00000008;
+ {$EXTERNALSYM MOVEFILE_WRITE_THROUGH}
+ MOVEFILE_CREATE_HARDLINK = $00000010;
+ {$EXTERNALSYM MOVEFILE_CREATE_HARDLINK}
+ MOVEFILE_FAIL_IF_NOT_TRACKABLE = $00000020;
+ {$EXTERNALSYM MOVEFILE_FAIL_IF_NOT_TRACKABLE}
+
+function ReplaceFileA(lpReplacedFileName, lpReplacementFileName,
+ lpBackupFileName: LPCSTR; dwReplaceFlags: DWORD; lpExclude: LPVOID;
+ lpReserved: LPVOID): BOOL; stdcall;
+{$EXTERNALSYM ReplaceFileA}
+function ReplaceFileW(lpReplacedFileName, lpReplacementFileName,
+ lpBackupFileName: LPCWSTR; dwReplaceFlags: DWORD; lpExclude: LPVOID;
+ lpReserved: LPVOID): BOOL; stdcall;
+{$EXTERNALSYM ReplaceFileW}
+function ReplaceFile(lpReplacedFileName, lpReplacementFileName,
+ lpBackupFileName: LPCTSTR; dwReplaceFlags: DWORD; lpExclude: LPVOID;
+ lpReserved: LPVOID): BOOL; stdcall;
+{$EXTERNALSYM ReplaceFile}
+
+//
+// API call to create hard links.
+//
+
+function CreateHardLinkA(lpFileName, lpExistingFileName: LPCSTR;
+ lpSecurityAttributes: LPSECURITY_ATTRIBUTES): BOOL; stdcall;
+{$EXTERNALSYM CreateHardLinkA}
+function CreateHardLinkW(lpFileName, lpExistingFileName: LPCWSTR;
+ lpSecurityAttributes: LPSECURITY_ATTRIBUTES): BOOL; stdcall;
+{$EXTERNALSYM CreateHardLinkW}
+function CreateHardLink(lpFileName, lpExistingFileName: LPCTSTR;
+ lpSecurityAttributes: LPSECURITY_ATTRIBUTES): BOOL; stdcall;
+{$EXTERNALSYM CreateHardLink}
+
+//#if (_WIN32_WINNT >= 0x0501)
+
+//
+// API call to enumerate for streams within a file
+//
+
+type
+ _STREAM_INFO_LEVELS = (FindStreamInfoStandard, FindStreamInfoMaxInfoLevel);
+ {$EXTERNALSYM _STREAM_INFO_LEVELS}
+ STREAM_INFO_LEVELS = _STREAM_INFO_LEVELS;
+ {$EXTERNALSYM STREAM_INFO_LEVELS}
+ TStreamInfoLevels = STREAM_INFO_LEVELS;
+
+ _WIN32_FIND_STREAM_DATA = record
+ StreamSize: LARGE_INTEGER;
+ cStreamName: array [0..MAX_PATH + 35] of WCHAR;
+ end;
+ {$EXTERNALSYM _WIN32_FIND_STREAM_DATA}
+ WIN32_FIND_STREAM_DATA = _WIN32_FIND_STREAM_DATA;
+ {$EXTERNALSYM WIN32_FIND_STREAM_DATA}
+ PWIN32_FIND_STREAM_DATA = ^WIN32_FIND_STREAM_DATA;
+ {$EXTERNALSYM PWIN32_FIND_STREAM_DATA}
+ TWin32FindStreamData = WIN32_FIND_STREAM_DATA;
+ PWin32FindStreamData = PWIN32_FIND_STREAM_DATA;
+
+function FindFirstStreamW(lpFileName: LPCWSTR; InfoLevel: STREAM_INFO_LEVELS; lpFindStreamData: LPVOID; dwFlags: DWORD): HANDLE; stdcall;
+{$EXTERNALSYM FindFirstStreamW}
+
+function FindNextStreamW(hFindStream: HANDLE; lpFindStreamData: LPVOID): BOOL; stdcall;
+{$EXTERNALSYM FindNextStreamW}
+
+//#endif // (_WIN32_WINNT >= 0x0500)
+
+function CreateNamedPipeA(lpName: LPCSTR; dwOpenMode, dwPipeMode, nMaxInstances,
+ nOutBufferSize, nInBufferSize, nDefaultTimeOut: DWORD;
+ lpSecurityAttributes: LPSECURITY_ATTRIBUTES): HANDLE; stdcall;
+{$EXTERNALSYM CreateNamedPipeA}
+function CreateNamedPipeW(lpName: LPCWSTR; dwOpenMode, dwPipeMode, nMaxInstances,
+ nOutBufferSize, nInBufferSize, nDefaultTimeOut: DWORD;
+ lpSecurityAttributes: LPSECURITY_ATTRIBUTES): HANDLE; stdcall;
+{$EXTERNALSYM CreateNamedPipeW}
+function CreateNamedPipe(lpName: LPCTSTR; dwOpenMode, dwPipeMode, nMaxInstances,
+ nOutBufferSize, nInBufferSize, nDefaultTimeOut: DWORD;
+ lpSecurityAttributes: LPSECURITY_ATTRIBUTES): HANDLE; stdcall;
+{$EXTERNALSYM CreateNamedPipe}
+
+function GetNamedPipeHandleStateA(hNamedPipe: HANDLE; lpState, lpCurInstances,
+ lpMaxCollectionCount, lpCollectDataTimeout: LPDWORD; lpUserName: LPSTR;
+ nMaxUserNameSize: DWORD): BOOL; stdcall;
+{$EXTERNALSYM GetNamedPipeHandleStateA}
+function GetNamedPipeHandleStateW(hNamedPipe: HANDLE; lpState, lpCurInstances,
+ lpMaxCollectionCount, lpCollectDataTimeout: LPDWORD; lpUserName: LPWSTR;
+ nMaxUserNameSize: DWORD): BOOL; stdcall;
+{$EXTERNALSYM GetNamedPipeHandleStateW}
+function GetNamedPipeHandleState(hNamedPipe: HANDLE; lpState, lpCurInstances,
+ lpMaxCollectionCount, lpCollectDataTimeout: LPDWORD; lpUserName: LPTSTR;
+ nMaxUserNameSize: DWORD): BOOL; stdcall;
+{$EXTERNALSYM GetNamedPipeHandleState}
+
+function CallNamedPipeA(lpNamedPipeName: LPCSTR; lpInBuffer: LPVOID;
+ nInBufferSize: DWORD; lpOutBuffer: LPVOID; nOutBufferSize: DWORD;
+ var lpBytesRead: DWORD; nTimeOut: DWORD): BOOL; stdcall;
+{$EXTERNALSYM CallNamedPipeA}
+function CallNamedPipeW(lpNamedPipeName: LPCWSTR; lpInBuffer: LPVOID;
+ nInBufferSize: DWORD; lpOutBuffer: LPVOID; nOutBufferSize: DWORD;
+ var lpBytesRead: DWORD; nTimeOut: DWORD): BOOL; stdcall;
+{$EXTERNALSYM CallNamedPipeW}
+function CallNamedPipe(lpNamedPipeName: LPCTSTR; lpInBuffer: LPVOID;
+ nInBufferSize: DWORD; lpOutBuffer: LPVOID; nOutBufferSize: DWORD;
+ var lpBytesRead: DWORD; nTimeOut: DWORD): BOOL; stdcall;
+{$EXTERNALSYM CallNamedPipe}
+
+function WaitNamedPipeA(lpNamedPipeName: LPCSTR; nTimeOut: DWORD): BOOL; stdcall;
+{$EXTERNALSYM WaitNamedPipeA}
+function WaitNamedPipeW(lpNamedPipeName: LPCWSTR; nTimeOut: DWORD): BOOL; stdcall;
+{$EXTERNALSYM WaitNamedPipeW}
+function WaitNamedPipe(lpNamedPipeName: LPCTSTR; nTimeOut: DWORD): BOOL; stdcall;
+{$EXTERNALSYM WaitNamedPipe}
+
+function SetVolumeLabelA(lpRootPathName, lpVolumeName: LPCSTR): BOOL; stdcall;
+{$EXTERNALSYM SetVolumeLabelA}
+function SetVolumeLabelW(lpRootPathName, lpVolumeName: LPCWSTR): BOOL; stdcall;
+{$EXTERNALSYM SetVolumeLabelW}
+function SetVolumeLabel(lpRootPathName, lpVolumeName: LPCTSTR): BOOL; stdcall;
+{$EXTERNALSYM SetVolumeLabel}
+
+procedure SetFileApisToOEM; stdcall;
+{$EXTERNALSYM SetFileApisToOEM}
+
+procedure SetFileApisToANSI; stdcall;
+{$EXTERNALSYM SetFileApisToANSI}
+
+function AreFileApisANSI: BOOL; stdcall;
+{$EXTERNALSYM AreFileApisANSI}
+
+function GetVolumeInformationA(lpRootPathName: LPCSTR; lpVolumeNameBuffer: LPSTR;
+ nVolumeNameSize: DWORD; lpVolumeSerialNumber: LPDWORD;
+ var lpMaximumComponentLength, lpFileSystemFlags: DWORD;
+ lpFileSystemNameBuffer: LPSTR; nFileSystemNameSize: DWORD): BOOL; stdcall;
+{$EXTERNALSYM GetVolumeInformationA}
+function GetVolumeInformationW(lpRootPathName: LPCWSTR; lpVolumeNameBuffer: LPWSTR;
+ nVolumeNameSize: DWORD; lpVolumeSerialNumber: LPDWORD;
+ var lpMaximumComponentLength, lpFileSystemFlags: DWORD;
+ lpFileSystemNameBuffer: LPWSTR; nFileSystemNameSize: DWORD): BOOL; stdcall;
+{$EXTERNALSYM GetVolumeInformationW}
+function GetVolumeInformation(lpRootPathName: LPCTSTR; lpVolumeNameBuffer: LPTSTR;
+ nVolumeNameSize: DWORD; lpVolumeSerialNumber: LPDWORD;
+ var lpMaximumComponentLength, lpFileSystemFlags: DWORD;
+ lpFileSystemNameBuffer: LPTSTR; nFileSystemNameSize: DWORD): BOOL; stdcall;
+{$EXTERNALSYM GetVolumeInformation}
+
+function CancelIo(hFile: HANDLE): BOOL; stdcall;
+{$EXTERNALSYM CancelIo}
+
+//
+// Event logging APIs
+//
+
+function ClearEventLogA(hEventLog: HANDLE; lpBackupFileName: LPCSTR): BOOL; stdcall;
+{$EXTERNALSYM ClearEventLogA}
+function ClearEventLogW(hEventLog: HANDLE; lpBackupFileName: LPCWSTR): BOOL; stdcall;
+{$EXTERNALSYM ClearEventLogW}
+function ClearEventLog(hEventLog: HANDLE; lpBackupFileName: LPCTSTR): BOOL; stdcall;
+{$EXTERNALSYM ClearEventLogA}
+
+function BackupEventLogA(hEventLog: HANDLE; lpBackupFileName: LPCSTR): BOOL; stdcall;
+{$EXTERNALSYM BackupEventLogA}
+function BackupEventLogW(hEventLog: HANDLE; lpBackupFileName: LPCWSTR): BOOL; stdcall;
+{$EXTERNALSYM BackupEventLogW}
+function BackupEventLog(hEventLog: HANDLE; lpBackupFileName: LPCTSTR): BOOL; stdcall;
+{$EXTERNALSYM BackupEventLogA}
+
+function CloseEventLog(hEventLog: HANDLE): BOOL; stdcall;
+{$EXTERNALSYM CloseEventLog}
+
+function DeregisterEventSource(hEventLog: HANDLE): BOOL; stdcall;
+{$EXTERNALSYM DeregisterEventSource}
+
+function NotifyChangeEventLog(hEventLog, hEvent: HANDLE): BOOL; stdcall;
+{$EXTERNALSYM NotifyChangeEventLog}
+
+function GetNumberOfEventLogRecords(hEventLog: HANDLE; var NumberOfRecords: DWORD): BOOL; stdcall;
+{$EXTERNALSYM GetNumberOfEventLogRecords}
+
+function GetOldestEventLogRecord(hEventLog: HANDLE; var OldestRecord: DWORD): BOOL; stdcall;
+{$EXTERNALSYM GetOldestEventLogRecord}
+
+function OpenEventLogA(lpUNCServerName, lpSourceName: LPCSTR): HANDLE; stdcall;
+{$EXTERNALSYM OpenEventLogA}
+function OpenEventLogW(lpUNCServerName, lpSourceName: LPCWSTR): HANDLE; stdcall;
+{$EXTERNALSYM OpenEventLogW}
+function OpenEventLog(lpUNCServerName, lpSourceName: LPCTSTR): HANDLE; stdcall;
+{$EXTERNALSYM OpenEventLogA}
+
+function RegisterEventSourceA(lpUNCServerName, lpSourceName: LPCSTR): HANDLE; stdcall;
+{$EXTERNALSYM RegisterEventSourceA}
+function RegisterEventSourceW(lpUNCServerName, lpSourceName: LPCWSTR): HANDLE; stdcall;
+{$EXTERNALSYM RegisterEventSourceW}
+function RegisterEventSource(lpUNCServerName, lpSourceName: LPCTSTR): HANDLE; stdcall;
+{$EXTERNALSYM RegisterEventSourceA}
+
+function OpenBackupEventLogA(lpUNCServerName, lpFileName: LPCSTR): HANDLE; stdcall;
+{$EXTERNALSYM OpenBackupEventLogA}
+function OpenBackupEventLogW(lpUNCServerName, lpFileName: LPCWSTR): HANDLE; stdcall;
+{$EXTERNALSYM OpenBackupEventLogW}
+function OpenBackupEventLog(lpUNCServerName, lpFileName: LPCTSTR): HANDLE; stdcall;
+{$EXTERNALSYM OpenBackupEventLogA}
+
+function ReadEventLogA(hEventLog: HANDLE; dwReadFlags, dwRecordOffset: DWORD;
+ lpBuffer: LPVOID; nNumberOfBytesToRead: DWORD;
+ var pnBytesRead, pnMinNumberOfBytesNeeded: DWORD): BOOL; stdcall;
+{$EXTERNALSYM ReadEventLogA}
+function ReadEventLogW(hEventLog: HANDLE; dwReadFlags, dwRecordOffset: DWORD;
+ lpBuffer: LPVOID; nNumberOfBytesToRead: DWORD;
+ var pnBytesRead, pnMinNumberOfBytesNeeded: DWORD): BOOL; stdcall;
+{$EXTERNALSYM ReadEventLogW}
+function ReadEventLog(hEventLog: HANDLE; dwReadFlags, dwRecordOffset: DWORD;
+ lpBuffer: LPVOID; nNumberOfBytesToRead: DWORD;
+ var pnBytesRead, pnMinNumberOfBytesNeeded: DWORD): BOOL; stdcall;
+{$EXTERNALSYM ReadEventLog}
+
+function ReportEventA(hEventLog: HANDLE; wType, wCategory: WORD; dwEventID: DWORD;
+ lpUserSid: PSID; wNumStrings: WORD; dwDataSize: DWORD; lpStrings: LPCSTR;
+ lpRawData: LPVOID): BOOL; stdcall;
+{$EXTERNALSYM ReportEventA}
+function ReportEventW(hEventLog: HANDLE; wType, wCategory: WORD; dwEventID: DWORD;
+ lpUserSid: PSID; wNumStrings: WORD; dwDataSize: DWORD; lpStrings: LPCWSTR;
+ lpRawData: LPVOID): BOOL; stdcall;
+{$EXTERNALSYM ReportEventW}
+function ReportEvent(hEventLog: HANDLE; wType, wCategory: WORD; dwEventID: DWORD;
+ lpUserSid: PSID; wNumStrings: WORD; dwDataSize: DWORD; lpStrings: LPCTSTR;
+ lpRawData: LPVOID): BOOL; stdcall;
+{$EXTERNALSYM ReportEvent}
+
+const
+ EVENTLOG_FULL_INFO = 0;
+ {$EXTERNALSYM EVENTLOG_FULL_INFO}
+
+type
+ LPEVENTLOG_FULL_INFORMATION = ^EVENTLOG_FULL_INFORMATION;
+ {$EXTERNALSYM LPEVENTLOG_FULL_INFORMATION}
+ _EVENTLOG_FULL_INFORMATION = record
+ dwFull: DWORD;
+ end;
+ {$EXTERNALSYM _EVENTLOG_FULL_INFORMATION}
+ EVENTLOG_FULL_INFORMATION = _EVENTLOG_FULL_INFORMATION;
+ {$EXTERNALSYM EVENTLOG_FULL_INFORMATION}
+ TEventlogFullInformation = EVENTLOG_FULL_INFORMATION;
+ PEventlogFullInformation = LPEVENTLOG_FULL_INFORMATION;
+
+function GetEventLogInformation(hEventLog: HANDLE; dwInfoLevel: DWORD;
+ lpBuffer: LPVOID; cbBufSize: DWORD; var pcbBytesNeeded: DWORD): BOOL; stdcall;
+{$EXTERNALSYM GetEventLogInformation}
+
+//
+// Security APIs
+//
+
+function DuplicateToken(ExistingTokenHandle: HANDLE;
+ ImpersonationLevel: SECURITY_IMPERSONATION_LEVEL; DuplicateTokenHandle: PHANDLE): BOOL; stdcall;
+{$EXTERNALSYM DuplicateToken}
+
+function GetKernelObjectSecurity(Handle: HANDLE;
+ RequestedInformation: SECURITY_INFORMATION;
+ pSecurityDescriptor: PSECURITY_DESCRIPTOR; nLength: DWORD;
+ var lpnLengthNeeded: DWORD): BOOL; stdcall;
+{$EXTERNALSYM GetKernelObjectSecurity}
+
+function ImpersonateNamedPipeClient(hNamedPipe: HANDLE): BOOL; stdcall;
+{$EXTERNALSYM ImpersonateNamedPipeClient}
+
+function ImpersonateSelf(ImpersonationLevel: SECURITY_IMPERSONATION_LEVEL): BOOL; stdcall;
+{$EXTERNALSYM ImpersonateSelf}
+
+function RevertToSelf : BOOL; stdcall;
+{$EXTERNALSYM RevertToSelf}
+
+function SetThreadToken(Thread: PHANDLE; Token: HANDLE): BOOL; stdcall;
+{$EXTERNALSYM SetThreadToken}
+
+function AccessCheck(pSecurityDescriptor: PSECURITY_DESCRIPTOR;
+ ClientToken: HANDLE; DesiredAccess: DWORD; const GenericMapping: GENERIC_MAPPING;
+ var PrivilegeSet: PRIVILEGE_SET; var PrivilegeSetLength,
+ GrantedAccess: DWORD; var AccessStatus: BOOL): BOOL; stdcall;
+{$EXTERNALSYM AccessCheck}
+
+function AccessCheckByType(pSecurityDescriptor: PSECURITY_DESCRIPTOR;
+ PrincipalSelfSid: PSID; ClientToken: HANDLE; DesiredAccess: DWORD;
+ ObjectTypeList: POBJECT_TYPE_LIST; ObjectTypeListLength: DWORD;
+ const GenericMapping: GENERIC_MAPPING; var PrivilegeSet: PRIVILEGE_SET;
+ var PrivilegeSetLength, GrantedAccess: DWORD; var AccessStatus: BOOL): BOOL; stdcall;
+{$EXTERNALSYM AccessCheckByType}
+
+function AccessCheckByTypeResultList(pSecurityDescriptor: PSECURITY_DESCRIPTOR;
+ PrincipalSelfSid: PSID; ClientToken: HANDLE; DesiredAccess: DWORD;
+ ObjectTypeList: POBJECT_TYPE_LIST; ObjectTypeListLength: DWORD;
+ const GenericMapping: GENERIC_MAPPING; var PrivilegeSet: PRIVILEGE_SET;
+ var PrivilegeSetLength, GrantedAccessList: DWORD;
+ var AccessStatusList: DWORD): BOOL; stdcall;
+{$EXTERNALSYM AccessCheckByTypeResultList}
+
+function OpenProcessToken(ProcessHandle: HANDLE; DesiredAccess: DWORD;
+ var TokenHandle: HANDLE): BOOL; stdcall;
+{$EXTERNALSYM OpenProcessToken}
+
+function OpenThreadToken(ThreadHandle: HANDLE; DesiredAccess: DWORD;
+ OpenAsSelf: BOOL; var TokenHandle: HANDLE): BOOL; stdcall;
+{$EXTERNALSYM OpenThreadToken}
+
+function GetTokenInformation(TokenHandle: HANDLE;
+ TokenInformationClass: TOKEN_INFORMATION_CLASS; TokenInformation: LPVOID;
+ TokenInformationLength: DWORD; var ReturnLength: DWORD): BOOL; stdcall;
+{$EXTERNALSYM GetTokenInformation}
+
+function SetTokenInformation(TokenHandle: HANDLE;
+ TokenInformationClass: TOKEN_INFORMATION_CLASS; TokenInformation: LPVOID;
+ TokenInformationLength: DWORD): BOOL; stdcall;
+{$EXTERNALSYM SetTokenInformation}
+
+function AdjustTokenPrivileges(TokenHandle: HANDLE; DisableAllPrivileges: BOOL;
+ NewState: PTOKEN_PRIVILEGES; BufferLength: DWORD;
+ PreviousState: PTOKEN_PRIVILEGES; ReturnLength: LPDWORD): BOOL; stdcall;
+{$EXTERNALSYM AdjustTokenPrivileges}
+
+function AdjustTokenGroups(TokenHandle: HANDLE; ResetToDefault: BOOL;
+ NewState: PTOKEN_GROUPS; BufferLength: DWORD; PreviousState: PTOKEN_GROUPS;
+ ReturnLength: PDWORD): BOOL; stdcall;
+{$EXTERNALSYM AdjustTokenGroups}
+
+function PrivilegeCheck(ClientToken: HANDLE;
+ RequiredPrivileges: PPRIVILEGE_SET; var pfResult: BOOL): BOOL; stdcall;
+{$EXTERNALSYM PrivilegeCheck}
+
+function AccessCheckAndAuditAlarmA(SubsystemName: LPCSTR; HandleId: LPVOID;
+ ObjectTypeName, ObjectName: LPSTR; SecurityDescriptor: PSECURITY_DESCRIPTOR;
+ DesiredAccess: DWORD; const GenericMapping: GENERIC_MAPPING;
+ ObjectCreation: BOOL; var GrantedAccess: DWORD;
+ var AccessStatus, pfGenerateOnClose: BOOL): BOOL; stdcall;
+{$EXTERNALSYM AccessCheckAndAuditAlarmA}
+function AccessCheckAndAuditAlarmW(SubsystemName: LPCWSTR; HandleId: LPVOID;
+ ObjectTypeName, ObjectName: LPWSTR; SecurityDescriptor: PSECURITY_DESCRIPTOR;
+ DesiredAccess: DWORD; const GenericMapping: GENERIC_MAPPING;
+ ObjectCreation: BOOL; var GrantedAccess: DWORD;
+ var AccessStatus, pfGenerateOnClose: BOOL): BOOL; stdcall;
+{$EXTERNALSYM AccessCheckAndAuditAlarmW}
+function AccessCheckAndAuditAlarm(SubsystemName: LPCTSTR; HandleId: LPVOID;
+ ObjectTypeName, ObjectName: LPTSTR; SecurityDescriptor: PSECURITY_DESCRIPTOR;
+ DesiredAccess: DWORD; const GenericMapping: GENERIC_MAPPING;
+ ObjectCreation: BOOL; var GrantedAccess: DWORD;
+ var AccessStatus, pfGenerateOnClose: BOOL): BOOL; stdcall;
+{$EXTERNALSYM AccessCheckAndAuditAlarmA}
+
+function AccessCheckByTypeAndAuditAlarmA(SubsystemName: LPCSTR; HandleId: LPVOID;
+ ObjectTypeName: LPCSTR; ObjectName: LPCSTR; SecurityDescriptor: PSECURITY_DESCRIPTOR;
+ PrincipalSelfSid: PSID; DesiredAccess: DWORD; AuditType: AUDIT_EVENT_TYPE;
+ Flags: DWORD; ObjectTypeList: POBJECT_TYPE_LIST; ObjectTypeListLength: DWORD;
+ GenericMapping: PGENERIC_MAPPING; ObjectCreation: BOOL; GrantedAccess: LPDWORD;
+ AccessStatus: LPBOOL; pfGenerateOnClose: LPBOOL): BOOL; stdcall;
+{$EXTERNALSYM AccessCheckByTypeAndAuditAlarmA}
+function AccessCheckByTypeAndAuditAlarmW(SubsystemName: LPCWSTR; HandleId: LPVOID;
+ObjectTypeName: LPCWSTR; ObjectName: LPCWSTR; SecurityDescriptor: PSECURITY_DESCRIPTOR;
+PrincipalSelfSid: PSID; DesiredAccess: DWORD; AuditType: AUDIT_EVENT_TYPE;
+Flags: DWORD; ObjectTypeList: POBJECT_TYPE_LIST; ObjectTypeListLength: DWORD;
+GenericMapping: PGENERIC_MAPPING; ObjectCreation: BOOL; GrantedAccess: LPDWORD;
+AccessStatus: LPBOOL; pfGenerateOnClose: LPBOOL): BOOL; stdcall;
+{$EXTERNALSYM AccessCheckByTypeAndAuditAlarmW}
+function AccessCheckByTypeAndAuditAlarm(SubsystemName: LPCTSTR; HandleId: LPVOID;
+ ObjectTypeName, ObjectName: LPCTSTR; SecurityDescriptor: PSECURITY_DESCRIPTOR;
+ PrincipalSelfSid: PSID; DesiredAccess: DWORD; AuditType: AUDIT_EVENT_TYPE;
+ Flags: DWORD; ObjectTypeList: POBJECT_TYPE_LIST; ObjectTypeListLength: DWORD;
+ const GenericMapping: GENERIC_MAPPING; ObjectCreation: BOOL;
+ var GrantedAccess: DWORD; var AccessStatus, pfGenerateOnClose: BOOL): BOOL; stdcall;
+{$EXTERNALSYM AccessCheckByTypeAndAuditAlarmA}
+
+function AccessCheckByTypeResultListAndAuditAlarmA(SubsystemName: LPCSTR;
+ HandleId: LPVOID; ObjectTypeName, ObjectName: LPCSTR;
+ SecurityDescriptor: PSECURITY_DESCRIPTOR; PrincipalSelfSid: PSID;
+ DesiredAccess: DWORD; AuditType: AUDIT_EVENT_TYPE; Flags: DWORD;
+ ObjectTypeList: POBJECT_TYPE_LIST; ObjectTypeListLength: DWORD;
+ const GenericMapping: GENERIC_MAPPING; ObjectCreation: BOOL;
+ var GrantedAccess, AccessStatusList: DWORD; var pfGenerateOnClose: BOOL): BOOL; stdcall;
+{$EXTERNALSYM AccessCheckByTypeResultListAndAuditAlarmA}
+function AccessCheckByTypeResultListAndAuditAlarmW(SubsystemName: LPCWSTR;
+ HandleId: LPVOID; ObjectTypeName, ObjectName: LPCWSTR;
+ SecurityDescriptor: PSECURITY_DESCRIPTOR; PrincipalSelfSid: PSID;
+ DesiredAccess: DWORD; AuditType: AUDIT_EVENT_TYPE; Flags: DWORD;
+ ObjectTypeList: POBJECT_TYPE_LIST; ObjectTypeListLength: DWORD;
+ const GenericMapping: GENERIC_MAPPING; ObjectCreation: BOOL;
+ var GrantedAccess, AccessStatusList: DWORD; var pfGenerateOnClose: BOOL): BOOL; stdcall;
+{$EXTERNALSYM AccessCheckByTypeResultListAndAuditAlarmW}
+function AccessCheckByTypeResultListAndAuditAlarm(SubsystemName: LPCTSTR;
+ HandleId: LPVOID; ObjectTypeName, ObjectName: LPCTSTR;
+ SecurityDescriptor: PSECURITY_DESCRIPTOR; PrincipalSelfSid: PSID;
+ DesiredAccess: DWORD; AuditType: AUDIT_EVENT_TYPE; Flags: DWORD;
+ ObjectTypeList: POBJECT_TYPE_LIST; ObjectTypeListLength: DWORD;
+ const GenericMapping: GENERIC_MAPPING; ObjectCreation: BOOL;
+ var GrantedAccess, AccessStatusList: DWORD; var pfGenerateOnClose: BOOL): BOOL; stdcall;
+{$EXTERNALSYM AccessCheckByTypeResultListAndAuditAlarmA}
+
+function AccessCheckByTypeResultListAndAuditAlarmByHandleA(SubsystemName: LPCSTR;
+ HandleId: LPVOID; ClientToken: HANDLE; ObjectTypeName, ObjectName: LPCSTR;
+ SecurityDescriptor: PSECURITY_DESCRIPTOR; PrincipalSelfSid: PSID;
+ DesiredAccess: DWORD; AuditType: AUDIT_EVENT_TYPE; Flags: DWORD;
+ ObjectTypeList: POBJECT_TYPE_LIST; ObjectTypeListLength: DWORD;
+ const GenericMapping: GENERIC_MAPPING; ObjectCreation: BOOL;
+ var GrantedAccess, AccessStatusList: DWORD; var pfGenerateOnClose: BOOL): BOOL; stdcall;
+{$EXTERNALSYM AccessCheckByTypeResultListAndAuditAlarmByHandleA}
+function AccessCheckByTypeResultListAndAuditAlarmByHandleW(SubsystemName: LPCWSTR;
+ HandleId: LPVOID; ClientToken: HANDLE; ObjectTypeName, ObjectName: LPCWSTR;
+ SecurityDescriptor: PSECURITY_DESCRIPTOR; PrincipalSelfSid: PSID;
+ DesiredAccess: DWORD; AuditType: AUDIT_EVENT_TYPE; Flags: DWORD;
+ ObjectTypeList: POBJECT_TYPE_LIST; ObjectTypeListLength: DWORD;
+ const GenericMapping: PGENERIC_MAPPING; ObjectCreation: BOOL;
+ var GrantedAccess, AccessStatusList: DWORD; var pfGenerateOnClose: BOOL): BOOL; stdcall;
+{$EXTERNALSYM AccessCheckByTypeResultListAndAuditAlarmByHandleW}
+function AccessCheckByTypeResultListAndAuditAlarmByHandle(SubsystemName: LPCTSTR;
+ HandleId: LPVOID; ClientToken: HANDLE; ObjectTypeName, ObjectName: LPCTSTR;
+ SecurityDescriptor: PSECURITY_DESCRIPTOR; PrincipalSelfSid: PSID;
+ DesiredAccess: DWORD; AuditType: AUDIT_EVENT_TYPE; Flags: DWORD;
+ ObjectTypeList: POBJECT_TYPE_LIST; ObjectTypeListLength: DWORD;
+ const GenericMapping: PGENERIC_MAPPING; ObjectCreation: BOOL;
+ var GrantedAccess, AccessStatusList: DWORD; var pfGenerateOnClose: BOOL): BOOL; stdcall;
+{$EXTERNALSYM AccessCheckByTypeResultListAndAuditAlarmByHandle}
+
+function ObjectOpenAuditAlarmA(SubsystemName: LPCSTR; HandleId: LPVOID;
+ ObjectTypeName: LPSTR; ObjectName: LPSTR; pSecurityDescriptor: PSECURITY_DESCRIPTOR;
+ ClientToken: HANDLE; DesiredAccess, GrantedAccess: DWORD;
+ Privileges: PPRIVILEGE_SET; ObjectCreation: BOOL; AccessGranted: BOOL;
+ var GenerateOnClose: BOOL): BOOL; stdcall;
+{$EXTERNALSYM ObjectOpenAuditAlarmA}
+function ObjectOpenAuditAlarmW(SubsystemName: LPCWSTR; HandleId: LPVOID;
+ ObjectTypeName, ObjectName: LPWSTR; pSecurityDescriptor: PSECURITY_DESCRIPTOR;
+ ClientToken: HANDLE; DesiredAccess: DWORD; GrantedAccess: DWORD;
+ Privileges: PPRIVILEGE_SET; ObjectCreation: BOOL; AccessGranted: BOOL;
+ var GenerateOnClose: BOOL): BOOL; stdcall;
+{$EXTERNALSYM ObjectOpenAuditAlarmW}
+function ObjectOpenAuditAlarm(SubsystemName: LPCTSTR; HandleId: LPVOID;
+ ObjectTypeName: LPTSTR; ObjectName: LPTSTR; pSecurityDescriptor: PSECURITY_DESCRIPTOR;
+ ClientToken: HANDLE; DesiredAccess: DWORD; GrantedAccess: DWORD;
+ Privileges: PPRIVILEGE_SET; ObjectCreation: BOOL; AccessGranted: BOOL;
+ var GenerateOnClose: BOOL): BOOL; stdcall;
+{$EXTERNALSYM ObjectOpenAuditAlarmA}
+
+function ObjectPrivilegeAuditAlarmA(SubsystemName: LPCSTR; HandleId: LPVOID;
+ ClientToken: HANDLE; DesiredAccess: DWORD; const Privileges: PRIVILEGE_SET;
+ AccessGranted: BOOL): BOOL; stdcall;
+{$EXTERNALSYM ObjectPrivilegeAuditAlarmA}
+function ObjectPrivilegeAuditAlarmW(SubsystemName: LPCWSTR; HandleId: LPVOID;
+ ClientToken: HANDLE; DesiredAccess: DWORD; const Privileges: PRIVILEGE_SET;
+ AccessGranted: BOOL): BOOL; stdcall;
+{$EXTERNALSYM ObjectPrivilegeAuditAlarmW}
+function ObjectPrivilegeAuditAlarm(SubsystemName: LPCTSTR; HandleId: LPVOID;
+ ClientToken: HANDLE; DesiredAccess: DWORD; const Privileges: PRIVILEGE_SET;
+ AccessGranted: BOOL): BOOL; stdcall;
+{$EXTERNALSYM ObjectPrivilegeAuditAlarmA}
+
+function ObjectCloseAuditAlarmA(SubsystemName: LPCSTR; HandleId: LPVOID;
+ GenerateOnClose: BOOL): BOOL; stdcall;
+{$EXTERNALSYM ObjectCloseAuditAlarmA}
+function ObjectCloseAuditAlarmW(SubsystemName: LPCWSTR; HandleId: LPVOID;
+ GenerateOnClose: BOOL): BOOL; stdcall;
+{$EXTERNALSYM ObjectCloseAuditAlarmW}
+function ObjectCloseAuditAlarm(SubsystemName: LPCTSTR; HandleId: LPVOID;
+ GenerateOnClose: BOOL): BOOL; stdcall;
+{$EXTERNALSYM ObjectCloseAuditAlarmA}
+
+function ObjectDeleteAuditAlarmA(SubsystemName: LPCSTR; HandleId: LPVOID;
+ GenerateOnClose: BOOL): BOOL; stdcall;
+{$EXTERNALSYM ObjectDeleteAuditAlarmA}
+function ObjectDeleteAuditAlarmW(SubsystemName: LPCWSTR; HandleId: LPVOID;
+ GenerateOnClose: BOOL): BOOL; stdcall;
+{$EXTERNALSYM ObjectDeleteAuditAlarmW}
+function ObjectDeleteAuditAlarm(SubsystemName: LPCTSTR; HandleId: LPVOID;
+ GenerateOnClose: BOOL): BOOL; stdcall;
+{$EXTERNALSYM ObjectDeleteAuditAlarmA}
+
+function PrivilegedServiceAuditAlarmA(SubsystemName, ServiceName: LPCSTR;
+ ClientToken: HANDLE; const Privileges: PRIVILEGE_SET; AccessGranted: BOOL): BOOL; stdcall;
+{$EXTERNALSYM PrivilegedServiceAuditAlarmA}
+function PrivilegedServiceAuditAlarmW(SubsystemName, ServiceName: LPCWSTR;
+ ClientToken: HANDLE; const Privileges: PRIVILEGE_SET; AccessGranted: BOOL): BOOL; stdcall;
+{$EXTERNALSYM PrivilegedServiceAuditAlarmW}
+function PrivilegedServiceAuditAlarm(SubsystemName, ServiceName: LPCTSTR;
+ ClientToken: HANDLE; const Privileges: PRIVILEGE_SET; AccessGranted: BOOL): BOOL; stdcall;
+{$EXTERNALSYM PrivilegedServiceAuditAlarmA}
+
+function IsWellKnownSid(pSid: PSID; WellKnownSidType: WELL_KNOWN_SID_TYPE): BOOL; stdcall;
+{$EXTERNALSYM IsWellKnownSid}
+
+function CreateWellKnownSid(WellKnownSidType: WELL_KNOWN_SID_TYPE; DomainSid: PSID;
+ pSid: PSID; var cbSid: DWORD): BOOL; stdcall;
+{$EXTERNALSYM CreateWellKnownSid}
+
+function EqualDomainSid(pSid1, pSid2: PSID; pfEqual: PBOOL): BOOL; stdcall;
+{$EXTERNALSYM EqualDomainSid}
+
+function GetWindowsAccountDomainSid(pSid, ppDomainSid: PSID; var cbSid: DWORD): BOOL; stdcall;
+{$EXTERNALSYM GetWindowsAccountDomainSid}
+
+function IsValidSid(pSid: PSID): BOOL; stdcall;
+{$EXTERNALSYM IsValidSid}
+
+function EqualSid(pSid1, pSid2: PSID): BOOL; stdcall;
+{$EXTERNALSYM EqualSid}
+
+function EqualPrefixSid(pSid1, pSid2: PSID): BOOL; stdcall;
+{$EXTERNALSYM EqualPrefixSid}
+
+function GetSidLengthRequired(nSubAuthorityCount: UCHAR): DWORD; stdcall;
+{$EXTERNALSYM GetSidLengthRequired}
+
+function AllocateAndInitializeSid(pIdentifierAuthority: PSID_IDENTIFIER_AUTHORITY;
+ SubAuthorityCount: BYTE; nSubAuthority0, nSubAuthority1, nSubAuthority2,
+ nSubAuthority3, nSubAuthority4, nSubAuthority5, nSubAuthority6,
+ nSubAuthority7: DWORD; var pSid: PSID): BOOL; stdcall;
+{$EXTERNALSYM AllocateAndInitializeSid}
+
+function FreeSid(pSid: PSID): PVOID; stdcall;
+{$EXTERNALSYM FreeSid}
+
+function InitializeSid(Sid: PSID; pIdentifierAuthority: PSID_IDENTIFIER_AUTHORITY;
+ nSubAuthorityCount: BYTE): BOOL; stdcall;
+{$EXTERNALSYM InitializeSid}
+
+function GetSidIdentifierAuthority(pSid: PSID): PSID_IDENTIFIER_AUTHORITY; stdcall;
+{$EXTERNALSYM GetSidIdentifierAuthority}
+
+function GetSidSubAuthority(pSid: PSID; nSubAuthority: DWORD): PDWORD; stdcall;
+{$EXTERNALSYM GetSidSubAuthority}
+
+function GetSidSubAuthorityCount(pSid: PSID): PUCHAR; stdcall;
+{$EXTERNALSYM GetSidSubAuthorityCount}
+
+function GetLengthSid(pSid: PSID): DWORD; stdcall;
+{$EXTERNALSYM GetLengthSid}
+
+function CopySid(nDestinationSidLength: DWORD; pDestinationSid: PSID;
+ pSourceSid: PSID): BOOL; stdcall;
+{$EXTERNALSYM CopySid}
+
+function AreAllAccessesGranted(GrantedAccess, DesiredAccess: DWORD): BOOL; stdcall;
+{$EXTERNALSYM AreAllAccessesGranted}
+
+function AreAnyAccessesGranted(GrantedAccess, DesiredAccess: DWORD): BOOL; stdcall;
+{$EXTERNALSYM AreAnyAccessesGranted}
+
+procedure MapGenericMask(var AccessMask: DWORD; var GenericMapping: GENERIC_MAPPING); stdcall;
+{$EXTERNALSYM MapGenericMask}
+
+function IsValidAcl(pAcl: PACL): BOOL; stdcall;
+{$EXTERNALSYM IsValidAcl}
+
+function InitializeAcl(pAcl: PACL; nAclLength: DWORD; dwAclRevision: DWORD): BOOL; stdcall;
+{$EXTERNALSYM InitializeAcl}
+
+function GetAclInformation(pAcl: PACL; pAclInformation: LPVOID;
+ nAclInformationLength: DWORD; dwAclInformationClass: ACL_INFORMATION_CLASS): BOOL; stdcall;
+{$EXTERNALSYM GetAclInformation}
+
+function SetAclInformation(pAcl: PACL; pAclInformation: LPVOID;
+ nAclInformationLength: DWORD; dwAclInformationClass: ACL_INFORMATION_CLASS): BOOL; stdcall;
+{$EXTERNALSYM SetAclInformation}
+
+function AddAce(pAcl: PACL; dwAceRevision: DWORD; dwStartingAceIndex: DWORD;
+ pAceList: LPVOID; nAceListLength: DWORD): BOOL; stdcall;
+{$EXTERNALSYM AddAce}
+
+function DeleteAce(pAcl: PACL; dwAceIndex: DWORD): BOOL; stdcall;
+{$EXTERNALSYM DeleteAce}
+
+function GetAce(pAcl: PACL; dwAceIndex: DWORD; var pAce: LPVOID): BOOL; stdcall;
+{$EXTERNALSYM GetAce}
+
+function AddAccessAllowedAce(pAcl: PACL; dwAceRevision, AccessMask: DWORD; pSid: PSID): BOOL; stdcall;
+{$EXTERNALSYM AddAccessAllowedAce}
+
+function AddAccessAllowedAceEx(pAcl: PACL; dwAceRevision, AceFlags,
+ AccessMask: DWORD; pSid: PSID): BOOL; stdcall;
+{$EXTERNALSYM AddAccessAllowedAceEx}
+
+function AddAccessDeniedAce(pAcl: PACL; dwAceRevision, AccessMask: DWORD; pSid: PSID): BOOL; stdcall;
+{$EXTERNALSYM AddAccessDeniedAce}
+
+function AddAccessDeniedAceEx(pAcl: PACL; dwAceRevision, AceFlags: DWORD;
+ AccessMask: DWORD; pSid: PSID): BOOL; stdcall;
+{$EXTERNALSYM AddAccessDeniedAceEx}
+
+function AddAuditAccessAce(pAcl: PACL; dwAceRevision, dwAccessMask: DWORD;
+ pSid: PSID; bAuditSuccess, bAuditFailure: BOOL): BOOL; stdcall;
+{$EXTERNALSYM AddAuditAccessAce}
+
+function AddAuditAccessAceEx(pAcl: PACL; dwAceRevision, AceFlags,
+ dwAccessMask: DWORD; pSid: PSID; bAuditSuccess, bAuditFailure: BOOL): BOOL; stdcall;
+{$EXTERNALSYM AddAuditAccessAceEx}
+
+function AddAccessAllowedObjectAce(pAcl: PACL; dwAceRevision, AceFlags,
+ AccessMask: DWORD; ObjectTypeGuid, InheritedObjectTypeGuid: LPGUID; pSid: PSID): BOOL; stdcall;
+{$EXTERNALSYM AddAccessAllowedObjectAce}
+
+function AddAccessDeniedObjectAce(pAcl: PACL; dwAceRevision, AceFlags,
+ AccessMask: DWORD; ObjectTypeGuid, InheritedObjectTypeGuid: LPGUID; pSid: PSID): BOOL; stdcall;
+{$EXTERNALSYM AddAccessDeniedObjectAce}
+
+function AddAuditAccessObjectAce(pAcl: PACL; dwAceRevision, AceFlags,
+ AccessMask: DWORD; ObjectTypeGuid, InheritedObjectTypeGuid: LPGUID; pSid: PSID;
+ bAuditSuccess, bAuditFailure: BOOL): BOOL; stdcall;
+{$EXTERNALSYM AddAuditAccessObjectAce}
+
+function FindFirstFreeAce(pAcl: PACL; var pAce: LPVOID): BOOL; stdcall;
+{$EXTERNALSYM FindFirstFreeAce}
+
+function InitializeSecurityDescriptor(pSecurityDescriptor: PSECURITY_DESCRIPTOR;
+ dwRevision: DWORD): BOOL; stdcall;
+{$EXTERNALSYM InitializeSecurityDescriptor}
+
+function IsValidSecurityDescriptor(pSecurityDescriptor: PSECURITY_DESCRIPTOR): BOOL; stdcall;
+{$EXTERNALSYM IsValidSecurityDescriptor}
+
+function GetSecurityDescriptorLength(pSecurityDescriptor: PSECURITY_DESCRIPTOR): DWORD; stdcall;
+{$EXTERNALSYM GetSecurityDescriptorLength}
+
+function GetSecurityDescriptorControl(pSecurityDescriptor: PSECURITY_DESCRIPTOR;
+ var pControl: SECURITY_DESCRIPTOR_CONTROL; var lpdwRevision: DWORD): BOOL; stdcall;
+{$EXTERNALSYM GetSecurityDescriptorControl}
+
+function SetSecurityDescriptorControl(pSecurityDescriptor: PSECURITY_DESCRIPTOR;
+ ControlBitsOfInterest, ControlBitsToSet: SECURITY_DESCRIPTOR_CONTROL): BOOL; stdcall;
+{$EXTERNALSYM SetSecurityDescriptorControl}
+
+function SetSecurityDescriptorDacl(pSecurityDescriptor: PSECURITY_DESCRIPTOR;
+ bDaclPresent: BOOL; pDacl: PACL; bDaclDefaulted: BOOL): BOOL; stdcall;
+{$EXTERNALSYM SetSecurityDescriptorDacl}
+
+function GetSecurityDescriptorDacl(pSecurityDescriptor: PSECURITY_DESCRIPTOR;
+ var lpbDaclPresent: BOOL; var pDacl: PACL; var lpbDaclDefaulted: BOOL): BOOL; stdcall;
+{$EXTERNALSYM GetSecurityDescriptorDacl}
+
+function SetSecurityDescriptorSacl(pSecurityDescriptor: PSECURITY_DESCRIPTOR;
+ bSaclPresent: BOOL; pSacl: PACL; bSaclDefaulted: BOOL): BOOL; stdcall;
+{$EXTERNALSYM SetSecurityDescriptorSacl}
+
+function GetSecurityDescriptorSacl(pSecurityDescriptor: PSECURITY_DESCRIPTOR;
+ var lpbSaclPresent: BOOL; var pSacl: PACL; var lpbSaclDefaulted: BOOL): BOOL; stdcall;
+{$EXTERNALSYM GetSecurityDescriptorSacl}
+
+function SetSecurityDescriptorOwner(pSecurityDescriptor: PSECURITY_DESCRIPTOR;
+ pOwner: PSID; bOwnerDefaulted: BOOL): BOOL; stdcall;
+{$EXTERNALSYM SetSecurityDescriptorOwner}
+
+function GetSecurityDescriptorOwner(pSecurityDescriptor: PSECURITY_DESCRIPTOR;
+ var pOwner: PSID; lpbOwnerDefaulted: PBOOL): BOOL; stdcall;
+{$EXTERNALSYM GetSecurityDescriptorOwner}
+
+function SetSecurityDescriptorGroup(pSecurityDescriptor: PSECURITY_DESCRIPTOR;
+ pGroup: PSID; bGroupDefaulted: BOOL): BOOL; stdcall;
+{$EXTERNALSYM SetSecurityDescriptorGroup}
+
+function GetSecurityDescriptorGroup(pSecurityDescriptor: PSECURITY_DESCRIPTOR;
+ var pGroup: PSID; lpbGroupDefaulted: PBOOL): BOOL; stdcall;
+{$EXTERNALSYM GetSecurityDescriptorGroup}
+
+function SetSecurityDescriptorRMControl(SecurityDescriptor: PSECURITY_DESCRIPTOR;
+ RMControl: PUCHAR): DWORD; stdcall;
+{$EXTERNALSYM SetSecurityDescriptorRMControl}
+
+function GetSecurityDescriptorRMControl(SecurityDescriptor: PSECURITY_DESCRIPTOR;
+ var RMControl: UCHAR): DWORD; stdcall;
+{$EXTERNALSYM GetSecurityDescriptorRMControl}
+
+function CreatePrivateObjectSecurity(ParentDescriptor, CreatorDescriptor: PSECURITY_DESCRIPTOR;
+ var NewDescriptor: PSECURITY_DESCRIPTOR; IsDirectoryObject: BOOL; Token: HANDLE;
+ const GenericMapping: GENERIC_MAPPING): BOOL; stdcall;
+{$EXTERNALSYM CreatePrivateObjectSecurity}
+
+function ConvertToAutoInheritPrivateObjectSecurity(ParentDescriptor,
+ CurrentSecurityDescriptor: PSECURITY_DESCRIPTOR;
+ var NewSecurityDescriptor: PSECURITY_DESCRIPTOR; ObjectType: LPGUID;
+ IsDirectoryObject: ByteBool; const GenericMapping: GENERIC_MAPPING): BOOL; stdcall;
+{$EXTERNALSYM ConvertToAutoInheritPrivateObjectSecurity}
+
+function CreatePrivateObjectSecurityEx(ParentDescriptor,
+ CreatorDescriptor: PSECURITY_DESCRIPTOR;
+ var NewDescriptor: PSECURITY_DESCRIPTOR; ObjectType: LPGUID;
+ IsContainerObject: BOOL; AutoInheritFlags: ULONG; Token: HANDLE;
+ const GenericMapping: GENERIC_MAPPING): BOOL; stdcall;
+{$EXTERNALSYM CreatePrivateObjectSecurityEx}
+
+function SetPrivateObjectSecurity(SecurityInformation: SECURITY_INFORMATION;
+ ModificationDescriptor: PSECURITY_DESCRIPTOR;
+ var ObjectsSecurityDescriptor: PSECURITY_DESCRIPTOR;
+ const GenericMapping: GENERIC_MAPPING; Token: HANDLE): BOOL; stdcall;
+{$EXTERNALSYM SetPrivateObjectSecurity}
+
+function SetPrivateObjectSecurityEx(SecurityInformation: SECURITY_INFORMATION;
+ ModificationDescriptor: PSECURITY_DESCRIPTOR;
+ var ObjectsSecurityDescriptor: PSECURITY_DESCRIPTOR; AutoInheritFlags: ULONG;
+ const GenericMapping: GENERIC_MAPPING; Token: HANDLE): BOOL; stdcall;
+{$EXTERNALSYM SetPrivateObjectSecurityEx}
+
+function GetPrivateObjectSecurity(ObjectDescriptor: PSECURITY_DESCRIPTOR;
+ SecurityInformation: SECURITY_INFORMATION;
+ ResultantDescriptor: PSECURITY_DESCRIPTOR; DescriptorLength: DWORD;
+ var ReturnLength: DWORD): BOOL; stdcall;
+{$EXTERNALSYM GetPrivateObjectSecurity}
+
+function DestroyPrivateObjectSecurity(var ObjectDescriptor: PSECURITY_DESCRIPTOR): BOOL; stdcall;
+{$EXTERNALSYM DestroyPrivateObjectSecurity}
+
+function MakeSelfRelativeSD(pAbsoluteSecurityDescriptor: PSECURITY_DESCRIPTOR;
+ pSelfRelativeSecurityDescriptor: PSECURITY_DESCRIPTOR; var lpdwBufferLength: DWORD): BOOL; stdcall;
+{$EXTERNALSYM MakeSelfRelativeSD}
+
+function MakeAbsoluteSD(pSelfRelativeSecurityDescriptor: PSECURITY_DESCRIPTOR;
+ pAbsoluteSecurityDescriptor: PSECURITY_DESCRIPTOR;
+ var lpdwAbsoluteSecurityDescriptorSize: DWORD; pDacl: PACL;
+ var lpdwDaclSize: DWORD; pSacl: PACL; var lpdwSaclSize: DWORD; pOwner: PSID;
+ var lpdwOwnerSize: DWORD; pPrimaryGroup: PSID; var lpdwPrimaryGroupSize: DWORD): BOOL; stdcall;
+{$EXTERNALSYM MakeAbsoluteSD}
+
+function MakeAbsoluteSD2(pSelfRelativeSecurityDescriptor: PSECURITY_DESCRIPTOR;
+ var lpdwBufferSize: DWORD): BOOL; stdcall;
+{$EXTERNALSYM MakeAbsoluteSD2}
+
+function SetFileSecurityA(lpFileName: LPCSTR; SecurityInformation: SECURITY_INFORMATION;
+ pSecurityDescriptor: PSECURITY_DESCRIPTOR): BOOL; stdcall;
+{$EXTERNALSYM SetFileSecurityA}
+function SetFileSecurityW(lpFileName: LPCWSTR; SecurityInformation: SECURITY_INFORMATION;
+ pSecurityDescriptor: PSECURITY_DESCRIPTOR): BOOL; stdcall;
+{$EXTERNALSYM SetFileSecurityW}
+function SetFileSecurity(lpFileName: LPCTSTR; SecurityInformation: SECURITY_INFORMATION;
+ pSecurityDescriptor: PSECURITY_DESCRIPTOR): BOOL; stdcall;
+{$EXTERNALSYM SetFileSecurityA}
+
+function GetFileSecurityA(lpFileName: LPCSTR; RequestedInformation: SECURITY_INFORMATION;
+ pSecurityDescriptor: PSECURITY_DESCRIPTOR; nLength: DWORD;
+ var lpnLengthNeeded: DWORD): BOOL; stdcall;
+{$EXTERNALSYM GetFileSecurityA}
+function GetFileSecurityW(lpFileName: LPCWSTR; RequestedInformation: SECURITY_INFORMATION;
+ pSecurityDescriptor: PSECURITY_DESCRIPTOR; nLength: DWORD;
+ var lpnLengthNeeded: DWORD): BOOL; stdcall;
+{$EXTERNALSYM GetFileSecurityW}
+function GetFileSecurity(lpFileName: LPCTSTR; RequestedInformation: SECURITY_INFORMATION;
+ pSecurityDescriptor: PSECURITY_DESCRIPTOR; nLength: DWORD;
+ var lpnLengthNeeded: DWORD): BOOL; stdcall;
+{$EXTERNALSYM GetFileSecurityA}
+
+function SetKernelObjectSecurity(Handle: HANDLE; SecurityInformation: SECURITY_INFORMATION;
+ SecurityDescriptor: PSECURITY_DESCRIPTOR): BOOL; stdcall;
+{$EXTERNALSYM SetKernelObjectSecurity}
+
+function FindFirstChangeNotificationA(lpPathName: LPCSTR; bWatchSubtree: Cardinal;
+ dwNotifyFilter: DWORD): HANDLE; stdcall;
+{$EXTERNALSYM FindFirstChangeNotificationA}
+function FindFirstChangeNotificationW(lpPathName: LPCWSTR; bWatchSubtree: Cardinal;
+ dwNotifyFilter: DWORD): HANDLE; stdcall;
+{$EXTERNALSYM FindFirstChangeNotificationW}
+function FindFirstChangeNotification(lpPathName: LPCTSTR; bWatchSubtree: Cardinal;
+ dwNotifyFilter: DWORD): HANDLE; stdcall;
+{$EXTERNALSYM FindFirstChangeNotification}
+
+function FindNextChangeNotification(hChangeHandle: HANDLE): BOOL; stdcall;
+{$EXTERNALSYM FindNextChangeNotification}
+
+function FindCloseChangeNotification(hChangeHandle: HANDLE): BOOL; stdcall;
+{$EXTERNALSYM FindCloseChangeNotification}
+
+function ReadDirectoryChangesW(hDirectory: HANDLE; lpBuffer: LPVOID;
+ nBufferLength: DWORD; bWatchSubtree: BOOL; dwNotifyFilter: DWORD;
+ lpBytesReturned: LPDWORD; lpOverlapped: LPOVERLAPPED;
+ lpCompletionRoutine: LPOVERLAPPED_COMPLETION_ROUTINE): BOOL; stdcall;
+{$EXTERNALSYM ReadDirectoryChangesW}
+
+function VirtualLock(lpAddress: LPVOID; dwSize: SIZE_T): BOOL; stdcall;
+{$EXTERNALSYM VirtualLock}
+
+function VirtualUnlock(lpAddress: LPVOID; dwSize: SIZE_T): BOOL; stdcall;
+{$EXTERNALSYM VirtualUnlock}
+
+function MapViewOfFileEx(hFileMappingObject: HANDLE; dwDesiredAccess: DWORD;
+ dwFileOffsetHigh: DWORD; dwFileOffsetLow: DWORD; dwNumberOfBytesToMap: SIZE_T;
+ lpBaseAddress: LPVOID): LPVOID; stdcall;
+{$EXTERNALSYM MapViewOfFileEx}
+
+function SetPriorityClass(hProcess: HANDLE; dwPriorityClass: DWORD): BOOL; stdcall;
+{$EXTERNALSYM SetPriorityClass}
+
+function GetPriorityClass(hProcess: HANDLE): DWORD; stdcall;
+{$EXTERNALSYM GetPriorityClass}
+
+function IsBadReadPtr(lp: LPVOID; ucb: UINT_PTR): BOOL; stdcall;
+{$EXTERNALSYM IsBadReadPtr}
+
+function IsBadWritePtr(lp: LPVOID; ucb: UINT_PTR): BOOL; stdcall;
+{$EXTERNALSYM IsBadWritePtr}
+
+function IsBadHugeReadPtr(lp: LPVOID; ucb: UINT_PTR): BOOL; stdcall;
+{$EXTERNALSYM IsBadHugeReadPtr}
+
+function IsBadHugeWritePtr(lp: LPVOID; ucb: UINT_PTR): BOOL; stdcall;
+{$EXTERNALSYM IsBadHugeWritePtr}
+
+function IsBadCodePtr(lpfn: FARPROC): BOOL; stdcall;
+{$EXTERNALSYM IsBadCodePtr}
+
+function IsBadStringPtrA(lpsz: LPCSTR; ucchMax: UINT_PTR): BOOL; stdcall;
+{$EXTERNALSYM IsBadStringPtrA}
+function IsBadStringPtrW(lpsz: LPCWSTR; ucchMax: UINT_PTR): BOOL; stdcall;
+{$EXTERNALSYM IsBadStringPtrW}
+function IsBadStringPtr(lpsz: LPCTSTR; ucchMax: UINT_PTR): BOOL; stdcall;
+{$EXTERNALSYM IsBadStringPtr}
+
+function LookupAccountSidA(lpSystemName: LPCSTR; Sid: PSID; Name: LPSTR;
+ var cchName: DWORD; ReferencedDomainName: LPSTR; var cchReferencedDomainName: DWORD;
+ var peUse: SID_NAME_USE): BOOL; stdcall;
+{$EXTERNALSYM LookupAccountSidA}
+function LookupAccountSidW(lpSystemName: LPCWSTR; Sid: PSID; Name: LPWSTR;
+ var cchName: DWORD; ReferencedDomainName: LPWSTR; var cchReferencedDomainName: DWORD;
+ var peUse: SID_NAME_USE): BOOL; stdcall;
+{$EXTERNALSYM LookupAccountSidW}
+function LookupAccountSid(lpSystemName: LPCTSTR; Sid: PSID; Name: LPTSTR;
+ var cchName: DWORD; ReferencedDomainName: LPTSTR; var cchReferencedDomainName: DWORD;
+ var peUse: SID_NAME_USE): BOOL; stdcall;
+{$EXTERNALSYM LookupAccountSid}
+
+function LookupAccountNameA(lpSystemName, lpAccountName: LPCSTR; Sid: PSID;
+ var cbSid: DWORD; ReferencedDomainName: LPSTR; var cchReferencedDomainName: DWORD;
+ var peUse: SID_NAME_USE): BOOL; stdcall;
+{$EXTERNALSYM LookupAccountNameA}
+function LookupAccountNameW(lpSystemName, lpAccountName: LPCWSTR; Sid: PSID;
+ var cbSid: DWORD; ReferencedDomainName: LPWSTR; var cchReferencedDomainName: DWORD;
+ var peUse: SID_NAME_USE): BOOL; stdcall;
+{$EXTERNALSYM LookupAccountNameW}
+function LookupAccountName(lpSystemName: LPCTSTR; lpAccountName: LPCTSTR; Sid: PSID;
+ var cbSid: DWORD; ReferencedDomainName: LPTSTR; var cchReferencedDomainName: DWORD;
+ var peUse: SID_NAME_USE): BOOL; stdcall;
+{$EXTERNALSYM LookupAccountName}
+
+function LookupPrivilegeValueA(lpSystemName, lpName: LPCSTR; var lpLuid: LUID): BOOL; stdcall;
+{$EXTERNALSYM LookupPrivilegeValueA}
+function LookupPrivilegeValueW(lpSystemName, lpName: LPCWSTR; var lpLuid: LUID): BOOL; stdcall;
+{$EXTERNALSYM LookupPrivilegeValueW}
+function LookupPrivilegeValue(lpSystemName, lpName: LPCTSTR; var lpLuid: LUID): BOOL; stdcall;
+{$EXTERNALSYM LookupPrivilegeValue}
+
+function LookupPrivilegeNameA(lpSystemName: LPCSTR; const lpLuid: LUID;
+ lpName: LPSTR; var cbName: DWORD): BOOL; stdcall;
+{$EXTERNALSYM LookupPrivilegeNameA}
+function LookupPrivilegeNameW(lpSystemName: LPCWSTR; const lpLuid: LUID;
+ lpName: LPWSTR; var cbName: DWORD): BOOL; stdcall;
+{$EXTERNALSYM LookupPrivilegeNameW}
+function LookupPrivilegeName(lpSystemName: LPCTSTR; const lpLuid: LUID;
+ lpName: LPTSTR; var cbName: DWORD): BOOL; stdcall;
+{$EXTERNALSYM LookupPrivilegeName}
+
+function LookupPrivilegeDisplayNameA(lpSystemName, lpName: LPCSTR;
+ lpDisplayName: LPSTR; var cbDisplayName, lpLanguageId: DWORD): BOOL; stdcall;
+{$EXTERNALSYM LookupPrivilegeDisplayNameA}
+function LookupPrivilegeDisplayNameW(lpSystemName, lpName: LPCWSTR;
+ lpDisplayName: LPWSTR; var cbDisplayName, lpLanguageId: DWORD): BOOL; stdcall;
+{$EXTERNALSYM LookupPrivilegeDisplayNameW}
+function LookupPrivilegeDisplayName(lpSystemName, lpName: LPCTSTR;
+ lpDisplayName: LPTSTR; var cbDisplayName, lpLanguageId: DWORD): BOOL; stdcall;
+{$EXTERNALSYM LookupPrivilegeDisplayName}
+
+function AllocateLocallyUniqueId(var Luid: LUID): BOOL; stdcall;
+{$EXTERNALSYM AllocateLocallyUniqueId}
+
+function BuildCommDCBA(lpDef: LPCSTR; var lpDCB: DCB): BOOL; stdcall;
+{$EXTERNALSYM BuildCommDCBA}
+function BuildCommDCBW(lpDef: LPCWSTR; var lpDCB: DCB): BOOL; stdcall;
+{$EXTERNALSYM BuildCommDCBW}
+function BuildCommDCB(lpDef: LPCTSTR; var lpDCB: DCB): BOOL; stdcall;
+{$EXTERNALSYM BuildCommDCB}
+
+function BuildCommDCBAndTimeoutsA(lpDef: LPCSTR; var lpDCB: DCB;
+ var lpCommTimeouts: COMMTIMEOUTS): BOOL; stdcall;
+{$EXTERNALSYM BuildCommDCBAndTimeoutsA}
+function BuildCommDCBAndTimeoutsW(lpDef: LPCWSTR; var lpDCB: DCB;
+ var lpCommTimeouts: COMMTIMEOUTS): BOOL; stdcall;
+{$EXTERNALSYM BuildCommDCBAndTimeoutsW}
+function BuildCommDCBAndTimeouts(lpDef: LPCTSTR; var lpDCB: DCB;
+ var lpCommTimeouts: COMMTIMEOUTS): BOOL; stdcall;
+{$EXTERNALSYM BuildCommDCBAndTimeouts}
+
+function CommConfigDialogA(lpszName: LPCSTR; hWnd: HWND; var lpCC: COMMCONFIG): BOOL; stdcall;
+{$EXTERNALSYM CommConfigDialogA}
+function CommConfigDialogW(lpszName: LPCWSTR; hWnd: HWND; var lpCC: COMMCONFIG): BOOL; stdcall;
+{$EXTERNALSYM CommConfigDialogW}
+function CommConfigDialog(lpszName: LPCTSTR; hWnd: HWND; var lpCC: COMMCONFIG): BOOL; stdcall;
+{$EXTERNALSYM CommConfigDialog}
+
+function GetDefaultCommConfigA(lpszName: LPCSTR; var lpCC: COMMCONFIG;
+ var lpdwSize: DWORD): BOOL; stdcall;
+{$EXTERNALSYM GetDefaultCommConfigA}
+function GetDefaultCommConfigW(lpszName: LPCWSTR; var lpCC: COMMCONFIG;
+ var lpdwSize: DWORD): BOOL; stdcall;
+{$EXTERNALSYM GetDefaultCommConfigW}
+function GetDefaultCommConfig(lpszName: LPCTSTR; var lpCC: COMMCONFIG;
+ var lpdwSize: DWORD): BOOL; stdcall;
+{$EXTERNALSYM GetDefaultCommConfig}
+
+function SetDefaultCommConfigA(lpszName: LPCSTR; const lpCC: COMMCONFIG;
+ dwSize: DWORD): BOOL; stdcall;
+{$EXTERNALSYM SetDefaultCommConfigA}
+function SetDefaultCommConfigW(lpszName: LPCWSTR; const lpCC: COMMCONFIG;
+ dwSize: DWORD): BOOL; stdcall;
+{$EXTERNALSYM SetDefaultCommConfigW}
+function SetDefaultCommConfig(lpszName: LPCTSTR; const lpCC: COMMCONFIG;
+ dwSize: DWORD): BOOL; stdcall;
+{$EXTERNALSYM SetDefaultCommConfig}
+
+const
+ MAX_COMPUTERNAME_LENGTH = 15;
+ {$EXTERNALSYM MAX_COMPUTERNAME_LENGTH}
+
+function GetComputerNameA(lpBuffer: LPSTR; var nSize: DWORD): BOOL; stdcall;
+{$EXTERNALSYM GetComputerNameA}
+function GetComputerNameW(lpBuffer: LPWSTR; var nSize: DWORD): BOOL; stdcall;
+{$EXTERNALSYM GetComputerNameW}
+function GetComputerName(lpBuffer: LPTSTR; var nSize: DWORD): BOOL; stdcall;
+{$EXTERNALSYM GetComputerName}
+
+function SetComputerNameA(lpComputerName: LPCSTR): BOOL; stdcall;
+{$EXTERNALSYM SetComputerNameA}
+function SetComputerNameW(lpComputerName: LPCWSTR): BOOL; stdcall;
+{$EXTERNALSYM SetComputerNameW}
+function SetComputerName(lpComputerName: LPCTSTR): BOOL; stdcall;
+{$EXTERNALSYM SetComputerName}
+
+type
+ _COMPUTER_NAME_FORMAT = (
+ ComputerNameNetBIOS,
+ ComputerNameDnsHostname,
+ ComputerNameDnsDomain,
+ ComputerNameDnsFullyQualified,
+ ComputerNamePhysicalNetBIOS,
+ ComputerNamePhysicalDnsHostname,
+ ComputerNamePhysicalDnsDomain,
+ ComputerNamePhysicalDnsFullyQualified,
+ ComputerNameMax);
+ {$EXTERNALSYM _COMPUTER_NAME_FORMAT}
+ COMPUTER_NAME_FORMAT = _COMPUTER_NAME_FORMAT;
+ {$EXTERNALSYM COMPUTER_NAME_FORMAT}
+ TComputerNameFormat = COMPUTER_NAME_FORMAT;
+
+function GetComputerNameExA(NameType: COMPUTER_NAME_FORMAT; lpBuffer: LPSTR;
+ var nSize: DWORD): BOOL; stdcall;
+{$EXTERNALSYM GetComputerNameExA}
+function GetComputerNameExW(NameType: COMPUTER_NAME_FORMAT; lpBuffer: LPWSTR;
+ var nSize: DWORD): BOOL; stdcall;
+{$EXTERNALSYM GetComputerNameExW}
+function GetComputerNameEx(NameType: COMPUTER_NAME_FORMAT; lpBuffer: LPTSTR;
+ varnSize: DWORD): BOOL; stdcall;
+{$EXTERNALSYM GetComputerNameEx}
+
+function SetComputerNameExA(NameType: COMPUTER_NAME_FORMAT; lpBuffer: LPCSTR): BOOL; stdcall;
+{$EXTERNALSYM SetComputerNameExA}
+function SetComputerNameExW(NameType: COMPUTER_NAME_FORMAT; lpBuffer: LPCWSTR): BOOL; stdcall;
+{$EXTERNALSYM SetComputerNameExW}
+function SetComputerNameEx(NameType: COMPUTER_NAME_FORMAT; lpBuffer: LPCTSTR): BOOL; stdcall;
+{$EXTERNALSYM SetComputerNameEx}
+
+function DnsHostnameToComputerNameA(Hostname, ComputerName: LPSTR; var nSize: DWORD): BOOL; stdcall;
+{$EXTERNALSYM DnsHostnameToComputerNameA}
+function DnsHostnameToComputerNameW(Hostname, ComputerName: LPWSTR; var nSize: DWORD): BOOL; stdcall;
+{$EXTERNALSYM DnsHostnameToComputerNameW}
+function DnsHostnameToComputerName(Hostname, ComputerName: LPTSTR; var nSize: DWORD): BOOL; stdcall;
+{$EXTERNALSYM DnsHostnameToComputerName}
+
+function GetUserNameA(lpBuffer: LPSTR; var nSize: DWORD): BOOL; stdcall;
+{$EXTERNALSYM GetUserNameA}
+function GetUserNameW(lpBuffer: LPWSTR; var nSize: DWORD): BOOL; stdcall;
+{$EXTERNALSYM GetUserNameW}
+function GetUserName(lpBuffer: LPTSTR; var nSize: DWORD): BOOL; stdcall;
+{$EXTERNALSYM GetUserName}
+
+//
+// Logon Support APIs
+//
+
+const
+ LOGON32_LOGON_INTERACTIVE = 2;
+ {$EXTERNALSYM LOGON32_LOGON_INTERACTIVE}
+ LOGON32_LOGON_NETWORK = 3;
+ {$EXTERNALSYM LOGON32_LOGON_NETWORK}
+ LOGON32_LOGON_BATCH = 4;
+ {$EXTERNALSYM LOGON32_LOGON_BATCH}
+ LOGON32_LOGON_SERVICE = 5;
+ {$EXTERNALSYM LOGON32_LOGON_SERVICE}
+ LOGON32_LOGON_UNLOCK = 7;
+ {$EXTERNALSYM LOGON32_LOGON_UNLOCK}
+ LOGON32_LOGON_NETWORK_CLEARTEXT = 8;
+ {$EXTERNALSYM LOGON32_LOGON_NETWORK_CLEARTEXT}
+ LOGON32_LOGON_NEW_CREDENTIALS = 9;
+ {$EXTERNALSYM LOGON32_LOGON_NEW_CREDENTIALS}
+
+ LOGON32_PROVIDER_DEFAULT = 0;
+ {$EXTERNALSYM LOGON32_PROVIDER_DEFAULT}
+ LOGON32_PROVIDER_WINNT35 = 1;
+ {$EXTERNALSYM LOGON32_PROVIDER_WINNT35}
+ LOGON32_PROVIDER_WINNT40 = 2;
+ {$EXTERNALSYM LOGON32_PROVIDER_WINNT40}
+ LOGON32_PROVIDER_WINNT50 = 3;
+ {$EXTERNALSYM LOGON32_PROVIDER_WINNT50}
+
+function LogonUserA(lpszUsername, lpszDomain, lpszPassword: LPCSTR;
+ dwLogonType, dwLogonProvider: DWORD; var phToken: HANDLE): BOOL; stdcall;
+{$EXTERNALSYM LogonUserA}
+function LogonUserW(lpszUsername, lpszDomain, lpszPassword: LPCWSTR;
+ dwLogonType, dwLogonProvider: DWORD; var phToken: HANDLE): BOOL; stdcall;
+{$EXTERNALSYM LogonUserW}
+function LogonUser(lpszUsername, lpszDomain, lpszPassword: LPCTSTR;
+ dwLogonType, dwLogonProvider: DWORD; var phToken: HANDLE): BOOL; stdcall;
+{$EXTERNALSYM LogonUser}
+
+function LogonUserExA(lpszUsername, lpszDomain, lpszPassword: LPCSTR;
+ dwLogonType, dwLogonProvider: DWORD; var phToken: HANDLE; ppLogonSid: PPSID;
+ ppProfileBuffer: PPVOID; pdwProfileLength: LPDWORD; pQuotaLimits: PQUOTA_LIMITS): BOOL; stdcall;
+{$EXTERNALSYM LogonUserExA}
+function LogonUserExW(lpszUsername, lpszDomain, lpszPassword: LPCWSTR;
+ dwLogonType, dwLogonProvider: DWORD; var phToken: HANDLE; ppLogonSid: PPSID;
+ ppProfileBuffer: PPVOID; pdwProfileLength: LPDWORD; pQuotaLimits: PQUOTA_LIMITS): BOOL; stdcall;
+{$EXTERNALSYM LogonUserExW}
+function LogonUserEx(lpszUsername, lpszDomain, lpszPassword: LPCTSTR;
+ dwLogonType, dwLogonProvider: DWORD; var phToken: HANDLE; ppLogonSid: PPSID;
+ ppProfileBuffer: PPVOID; pdwProfileLength: LPDWORD; pQuotaLimits: PQUOTA_LIMITS): BOOL; stdcall;
+{$EXTERNALSYM LogonUserEx}
+
+function ImpersonateLoggedOnUser(hToken: HANDLE): BOOL; stdcall;
+{$EXTERNALSYM ImpersonateLoggedOnUser}
+
+function CreateProcessAsUserA(hToken: HANDLE; lpApplicationName: LPCSTR;
+ lpCommandLine: LPSTR; lpProcessAttributes: LPSECURITY_ATTRIBUTES;
+ lpThreadAttributes: LPSECURITY_ATTRIBUTES; bInheritHandles: BOOL;
+ dwCreationFlags: DWORD; lpEnvironment: LPVOID; lpCurrentDirectory: LPCSTR;
+ const lpStartupInfo: STARTUPINFOA; var lpProcessInformation: PROCESS_INFORMATION): BOOL; stdcall;
+{$EXTERNALSYM CreateProcessAsUserA}
+function CreateProcessAsUserW(hToken: HANDLE; lpApplicationName: LPCWSTR;
+ lpCommandLine: LPWSTR; lpProcessAttributes: LPSECURITY_ATTRIBUTES;
+ lpThreadAttributes: LPSECURITY_ATTRIBUTES; bInheritHandles: BOOL;
+ dwCreationFlags: DWORD; lpEnvironment: LPVOID; lpCurrentDirectory: LPCWSTR;
+ const lpStartupInfo: STARTUPINFOW; var lpProcessInformation: PROCESS_INFORMATION): BOOL; stdcall;
+{$EXTERNALSYM CreateProcessAsUserW}
+function CreateProcessAsUser(hToken: HANDLE; lpApplicationName: LPCTSTR;
+ lpCommandLine: LPTSTR; lpProcessAttributes: LPSECURITY_ATTRIBUTES;
+ lpThreadAttributes: LPSECURITY_ATTRIBUTES; bInheritHandles: BOOL;
+ dwCreationFlags: DWORD; lpEnvironment: LPVOID; lpCurrentDirectory: LPCTSTR;
+ const lpStartupInfo: STARTUPINFO; var lpProcessInformation: PROCESS_INFORMATION): BOOL; stdcall;
+{$EXTERNALSYM CreateProcessAsUser}
+
+//
+// LogonFlags
+//
+
+const
+ LOGON_WITH_PROFILE = $00000001;
+ {$EXTERNALSYM LOGON_WITH_PROFILE}
+ LOGON_NETCREDENTIALS_ONLY = $00000002;
+ {$EXTERNALSYM LOGON_NETCREDENTIALS_ONLY}
+ LOGON_ZERO_PASSWORD_BUFFER = DWORD($80000000);
+ {$EXTERNALSYM LOGON_ZERO_PASSWORD_BUFFER}
+
+function CreateProcessWithLogonW(lpUsername, lpDomain, lpPassword: LPCWSTR;
+ dwLogonFlags: DWORD; lpApplicationName: LPCWSTR; lpCommandLine: LPWSTR;
+ dwCreationFlags: DWORD; lpEnvironment: LPVOID; lpCurrentDirectory: LPCWSTR;
+ const lpStartupInfo: STARTUPINFOW; var lpProcessInformation: PROCESS_INFORMATION): BOOL; stdcall;
+{$EXTERNALSYM CreateProcessWithLogonW}
+
+function CreateProcessWithTokenW(hToken: HANDLE; dwLogonFlags: DWORD; lpApplicationName: LPCWSTR; lpCommandLine: LPWSTR;
+ dwCreationFlags: DWORD; lpEnvironment: LPVOID; lpCurrentDirectory: LPCWSTR; lpStartupInfo: LPSTARTUPINFOW;
+ lpProcessInformation: LPPROCESS_INFORMATION): BOOL; stdcall;
+{$EXTERNALSYM CreateProcessWithTokenW}
+
+function ImpersonateAnonymousToken(ThreadHandle: HANDLE): BOOL; stdcall;
+{$EXTERNALSYM ImpersonateAnonymousToken}
+
+function DuplicateTokenEx(hExistingToken: HANDLE; dwDesiredAccess: DWORD;
+ lpTokenAttributes: LPSECURITY_ATTRIBUTES; ImpersonationLevel: SECURITY_IMPERSONATION_LEVEL;
+ TokenType: TOKEN_TYPE; var phNewToken: HANDLE): BOOL; stdcall;
+{$EXTERNALSYM DuplicateTokenEx}
+
+function CreateRestrictedToken(ExistingTokenHandle: HANDLE; Flags: DWORD;
+ DisableSidCount: DWORD; SidsToDisable: PSID_AND_ATTRIBUTES;
+ DeletePrivilegeCount: DWORD; PrivilegesToDelete: PLUID_AND_ATTRIBUTES;
+ RestrictedSidCount: DWORD; SidsToRestrict: PSID_AND_ATTRIBUTES;
+ var NewTokenHandle: HANDLE): BOOL; stdcall;
+{$EXTERNALSYM CreateRestrictedToken}
+
+function IsTokenRestricted(TokenHandle: HANDLE): BOOL; stdcall;
+{$EXTERNALSYM IsTokenRestricted}
+
+function CheckTokenMembership(TokenHandle: HANDLE; SidToCheck: PSID; var IsMember: BOOL): BOOL; stdcall;
+{$EXTERNALSYM CheckTokenMembership}
+
+function IsTokenUntrusted(TokenHandle: HANDLE): BOOL; stdcall;
+{$EXTERNALSYM IsTokenUntrusted}
+
+//
+// Thread pool API's
+//
+
+type
+ WAITORTIMERCALLBACK = WAITORTIMERCALLBACKFUNC;
+ {$EXTERNALSYM WAITORTIMERCALLBACK}
+ TWaitOrTimerCallback = WAITORTIMERCALLBACKFUNC;
+
+function RegisterWaitForSingleObject(var phNewWaitObject: HANDLE; hObject: HANDLE;
+ Callback: WAITORTIMERCALLBACK; Context: PVOID; dwMilliseconds, dwFlags: ULONG): BOOL; stdcall;
+{$EXTERNALSYM RegisterWaitForSingleObject}
+
+function RegisterWaitForSingleObjectEx(hObject: HANDLE;
+ Callback: WAITORTIMERCALLBACK; Context: PVOID; dwMilliseconds, dwFlags: ULONG): HANDLE; stdcall;
+{$EXTERNALSYM RegisterWaitForSingleObjectEx}
+
+function UnregisterWait(WaitHandle: HANDLE): BOOL; stdcall;
+{$EXTERNALSYM UnregisterWait}
+
+function UnregisterWaitEx(WaitHandle, CompletionEvent: HANDLE): BOOL; stdcall;
+{$EXTERNALSYM UnregisterWaitEx}
+
+function QueueUserWorkItem(Function_: LPTHREAD_START_ROUTINE; Context: PVOID;
+ Flags: ULONG): BOOL; stdcall;
+{$EXTERNALSYM QueueUserWorkItem}
+
+function BindIoCompletionCallback(FileHandle: HANDLE;
+ Function_: LPOVERLAPPED_COMPLETION_ROUTINE; Flags: ULONG): BOOL; stdcall;
+{$EXTERNALSYM BindIoCompletionCallback}
+
+function CreateTimerQueue: HANDLE; stdcall;
+{$EXTERNALSYM CreateTimerQueue}
+
+function CreateTimerQueueTimer(var phNewTimer: HANDLE; TimerQueue: HANDLE;
+ Callback: WAITORTIMERCALLBACK; Parameter: PVOID; DueTime, Period: DWORD;
+ Flags: ULONG): BOOL; stdcall;
+{$EXTERNALSYM CreateTimerQueueTimer}
+
+function ChangeTimerQueueTimer(TimerQueue, Timer: HANDLE; DueTime, Period: ULONG): BOOL; stdcall;
+{$EXTERNALSYM ChangeTimerQueueTimer}
+
+function DeleteTimerQueueTimer(TimerQueue, Timer, CompletionEvent: HANDLE): BOOL; stdcall;
+{$EXTERNALSYM DeleteTimerQueueTimer}
+
+function DeleteTimerQueueEx(TimerQueue, CompletionEvent: HANDLE): BOOL; stdcall;
+{$EXTERNALSYM DeleteTimerQueueEx}
+
+function SetTimerQueueTimer(TimerQueue, Callback: WAITORTIMERCALLBACK;
+ Parameter: PVOID; DueTime, Period: DWORD; PreferIo: BOOL): HANDLE; stdcall;
+{$EXTERNALSYM SetTimerQueueTimer}
+
+function CancelTimerQueueTimer(TimerQueue, Timer: HANDLE): BOOL; stdcall;
+{$EXTERNALSYM CancelTimerQueueTimer}
+
+function DeleteTimerQueue(TimerQueue: HANDLE): BOOL; stdcall;
+{$EXTERNALSYM DeleteTimerQueue}
+
+//
+// Plug-and-Play API's
+//
+
+const
+ HW_PROFILE_GUIDLEN = 39; // 36-characters plus NULL terminator
+ {$EXTERNALSYM HW_PROFILE_GUIDLEN}
+ MAX_PROFILE_LEN = 80;
+ {$EXTERNALSYM MAX_PROFILE_LEN}
+
+ DOCKINFO_UNDOCKED = $1;
+ {$EXTERNALSYM DOCKINFO_UNDOCKED}
+ DOCKINFO_DOCKED = $2;
+ {$EXTERNALSYM DOCKINFO_DOCKED}
+ DOCKINFO_USER_SUPPLIED = $4;
+ {$EXTERNALSYM DOCKINFO_USER_SUPPLIED}
+ DOCKINFO_USER_UNDOCKED = DOCKINFO_USER_SUPPLIED or DOCKINFO_UNDOCKED;
+ {$EXTERNALSYM DOCKINFO_USER_UNDOCKED}
+ DOCKINFO_USER_DOCKED = DOCKINFO_USER_SUPPLIED or DOCKINFO_DOCKED;
+ {$EXTERNALSYM DOCKINFO_USER_DOCKED}
+
+type
+ LPHW_PROFILE_INFOA = ^HW_PROFILE_INFOA;
+ {$EXTERNALSYM LPHW_PROFILE_INFOA}
+ tagHW_PROFILE_INFOA = record
+ dwDockInfo: DWORD;
+ szHwProfileGuid: array [0..HW_PROFILE_GUIDLEN - 1] of CHAR;
+ szHwProfileName: array [0..MAX_PROFILE_LEN - 1] of CHAR;
+ end;
+ {$EXTERNALSYM tagHW_PROFILE_INFOA}
+ HW_PROFILE_INFOA = tagHW_PROFILE_INFOA;
+ {$EXTERNALSYM HW_PROFILE_INFOA}
+ THWProfileInfoA = HW_PROFILE_INFOA;
+ PHWProfileInfoA = LPHW_PROFILE_INFOA;
+
+ LPHW_PROFILE_INFOW = ^HW_PROFILE_INFOW;
+ {$EXTERNALSYM LPHW_PROFILE_INFOW}
+ tagHW_PROFILE_INFOW = record
+ dwDockInfo: DWORD;
+ szHwProfileGuid: array [0..HW_PROFILE_GUIDLEN - 1] of WCHAR;
+ szHwProfileName: array [0..MAX_PROFILE_LEN - 1] of WCHAR;
+ end;
+ {$EXTERNALSYM tagHW_PROFILE_INFOW}
+ HW_PROFILE_INFOW = tagHW_PROFILE_INFOW;
+ {$EXTERNALSYM HW_PROFILE_INFOW}
+ THWProfileInfoW = HW_PROFILE_INFOW;
+ PHWProfileInfoW = LPHW_PROFILE_INFOW;
+
+ {$IFDEF UNICODE}
+ HW_PROFILE_INFO = HW_PROFILE_INFOW;
+ {$EXTERNALSYM HW_PROFILE_INFO}
+ LPHW_PROFILE_INFO = LPHW_PROFILE_INFOW;
+ {$EXTERNALSYM LPHW_PROFILE_INFO}
+ THWProfileInfo = THWProfileInfoW;
+ PHWProfileInfo = PHWProfileInfoW;
+ {$ELSE}
+ HW_PROFILE_INFO = HW_PROFILE_INFOA;
+ {$EXTERNALSYM HW_PROFILE_INFO}
+ LPHW_PROFILE_INFO = LPHW_PROFILE_INFOA;
+ {$EXTERNALSYM LPHW_PROFILE_INFO}
+ THWProfileInfo = THWProfileInfoA;
+ PHWProfileInfo = PHWProfileInfoA;
+ {$ENDIF UNICODE}
+
+function GetCurrentHwProfileA(var lpHwProfileInfo: HW_PROFILE_INFOA): BOOL; stdcall;
+{$EXTERNALSYM GetCurrentHwProfileA}
+function GetCurrentHwProfileW(var lpHwProfileInfo: HW_PROFILE_INFOW): BOOL; stdcall;
+{$EXTERNALSYM GetCurrentHwProfileW}
+function GetCurrentHwProfile(var lpHwProfileInfo: HW_PROFILE_INFO): BOOL; stdcall;
+{$EXTERNALSYM GetCurrentHwProfile}
+
+//
+// Performance counter API's
+//
+
+function QueryPerformanceCounter(var lpPerformanceCount: LARGE_INTEGER): BOOL; stdcall;
+{$EXTERNALSYM QueryPerformanceCounter}
+
+function QueryPerformanceFrequency(var lpFrequency: LARGE_INTEGER): BOOL; stdcall;
+{$EXTERNALSYM QueryPerformanceFrequency}
+
+function GetVersionExA(lpVersionInformation: LPOSVERSIONINFOA): BOOL; stdcall;
+{$EXTERNALSYM GetVersionExA}
+function GetVersionExW(lpVersionInformation: LPOSVERSIONINFOW): BOOL; stdcall;
+{$EXTERNALSYM GetVersionExW}
+function GetVersionEx(lpVersionInformation: LPOSVERSIONINFO): BOOL; stdcall;
+{$EXTERNALSYM GetVersionEx}
+
+function VerifyVersionInfoA(var lpVersionInformation: OSVERSIONINFOEXA;
+ dwTypeMask: DWORD; dwlConditionMask: DWORDLONG): BOOL; stdcall;
+{$EXTERNALSYM VerifyVersionInfoA}
+function VerifyVersionInfoW(var lpVersionInformation: OSVERSIONINFOEXW;
+ dwTypeMask: DWORD; dwlConditionMask: DWORDLONG): BOOL; stdcall;
+{$EXTERNALSYM VerifyVersionInfoW}
+function VerifyVersionInfo(var lpVersionInformation: OSVERSIONINFOEX;
+ dwTypeMask: DWORD; dwlConditionMask: DWORDLONG): BOOL; stdcall;
+{$EXTERNALSYM VerifyVersionInfo}
+
+// DOS and OS/2 Compatible Error Code definitions returned by the Win32 Base
+// API functions.
+//
+
+// #include <winerror.h>
+
+// Abnormal termination codes
+
+const
+ TC_NORMAL = 0;
+ {$EXTERNALSYM TC_NORMAL}
+ TC_HARDERR = 1;
+ {$EXTERNALSYM TC_HARDERR}
+ TC_GP_TRAP = 2;
+ {$EXTERNALSYM TC_GP_TRAP}
+ TC_SIGNAL = 3;
+ {$EXTERNALSYM TC_SIGNAL}
+
+//
+// Power Management APIs
+//
+
+ AC_LINE_OFFLINE = $00;
+ {$EXTERNALSYM AC_LINE_OFFLINE}
+ AC_LINE_ONLINE = $01;
+ {$EXTERNALSYM AC_LINE_ONLINE}
+ AC_LINE_BACKUP_POWER = $02;
+ {$EXTERNALSYM AC_LINE_BACKUP_POWER}
+ AC_LINE_UNKNOWN = $FF;
+ {$EXTERNALSYM AC_LINE_UNKNOWN}
+
+ BATTERY_FLAG_HIGH = $01;
+ {$EXTERNALSYM BATTERY_FLAG_HIGH}
+ BATTERY_FLAG_LOW = $02;
+ {$EXTERNALSYM BATTERY_FLAG_LOW}
+ BATTERY_FLAG_CRITICAL = $04;
+ {$EXTERNALSYM BATTERY_FLAG_CRITICAL}
+ BATTERY_FLAG_CHARGING = $08;
+ {$EXTERNALSYM BATTERY_FLAG_CHARGING}
+ BATTERY_FLAG_NO_BATTERY = $80;
+ {$EXTERNALSYM BATTERY_FLAG_NO_BATTERY}
+ BATTERY_FLAG_UNKNOWN = $FF;
+ {$EXTERNALSYM BATTERY_FLAG_UNKNOWN}
+
+ BATTERY_PERCENTAGE_UNKNOWN = $FF;
+ {$EXTERNALSYM BATTERY_PERCENTAGE_UNKNOWN}
+
+ BATTERY_LIFE_UNKNOWN = DWORD($FFFFFFFF);
+ {$EXTERNALSYM BATTERY_LIFE_UNKNOWN}
+
+type
+ LPSYSTEM_POWER_STATUS = ^SYSTEM_POWER_STATUS;
+ {$EXTERNALSYM LPSYSTEM_POWER_STATUS}
+ _SYSTEM_POWER_STATUS = record
+ ACLineStatus: BYTE;
+ BatteryFlag: BYTE;
+ BatteryLifePercent: BYTE;
+ Reserved1: BYTE;
+ BatteryLifeTime: DWORD;
+ BatteryFullLifeTime: DWORD;
+ end;
+ {$EXTERNALSYM _SYSTEM_POWER_STATUS}
+ SYSTEM_POWER_STATUS = _SYSTEM_POWER_STATUS;
+ {$EXTERNALSYM SYSTEM_POWER_STATUS}
+ TSystemPowerStatus = SYSTEM_POWER_STATUS;
+ PSystemPowerStatus = LPSYSTEM_POWER_STATUS;
+
+function GetSystemPowerStatus(var lpSystemPowerStatus: SYSTEM_POWER_STATUS): BOOL; stdcall;
+{$EXTERNALSYM GetSystemPowerStatus}
+
+function SetSystemPowerState(fSuspend, fForce: BOOL): BOOL; stdcall;
+{$EXTERNALSYM SetSystemPowerState}
+
+//
+// Very Large Memory API Subset
+//
+
+function AllocateUserPhysicalPages(hProcess: HANDLE; var NumberOfPages: ULONG_PTR;
+ PageArray: PULONG_PTR): BOOL; stdcall;
+{$EXTERNALSYM AllocateUserPhysicalPages}
+
+function FreeUserPhysicalPages(hProcess: HANDLE; var NumberOfPages: ULONG_PTR;
+ PageArray: PULONG_PTR): BOOL; stdcall;
+{$EXTERNALSYM FreeUserPhysicalPages}
+
+function MapUserPhysicalPages(VirtualAddress: PVOID; NumberOfPages: ULONG_PTR;
+ PageArray: PULONG_PTR): BOOL; stdcall;
+{$EXTERNALSYM MapUserPhysicalPages}
+
+function MapUserPhysicalPagesScatter(VirtualAddresses: PVOID; NumberOfPages: ULONG_PTR;
+ PageArray: PULONG_PTR): BOOL; stdcall;
+{$EXTERNALSYM MapUserPhysicalPagesScatter}
+
+function CreateJobObjectA(lpJobAttributes: LPSECURITY_ATTRIBUTES; lpName: LPCSTR): HANDLE; stdcall;
+{$EXTERNALSYM CreateJobObjectA}
+function CreateJobObjectW(lpJobAttributes: LPSECURITY_ATTRIBUTES; lpName: LPCWSTR): HANDLE; stdcall;
+{$EXTERNALSYM CreateJobObjectW}
+function CreateJobObject(lpJobAttributes: LPSECURITY_ATTRIBUTES; lpName: LPCTSTR): HANDLE; stdcall;
+{$EXTERNALSYM CreateJobObject}
+
+function OpenJobObjectA(dwDesiredAccess: DWORD; bInheritHandle: BOOL; lpName: LPCSTR): HANDLE; stdcall;
+{$EXTERNALSYM OpenJobObjectA}
+function OpenJobObjectW(dwDesiredAccess: DWORD; bInheritHandle: BOOL; lpName: LPCWSTR): HANDLE; stdcall;
+{$EXTERNALSYM OpenJobObjectW}
+function OpenJobObject(dwDesiredAccess: DWORD; bInheritHandle: BOOL; lpName: LPCTSTR): HANDLE; stdcall;
+{$EXTERNALSYM OpenJobObject}
+
+function AssignProcessToJobObject(hJob, hProcess: HANDLE): BOOL; stdcall;
+{$EXTERNALSYM AssignProcessToJobObject}
+
+function TerminateJobObject(hJob: HANDLE; uExitCode: UINT): BOOL; stdcall;
+{$EXTERNALSYM TerminateJobObject}
+
+function QueryInformationJobObject(hJob: HANDLE; JobObjectInformationClass: JOBOBJECTINFOCLASS;
+ lpJobObjectInformation: LPVOID; cbJobObjectInformationLength: DWORD;
+ lpReturnLength: LPDWORD): BOOL; stdcall;
+{$EXTERNALSYM QueryInformationJobObject}
+
+function SetInformationJobObject(hJob: HANDLE; JobObjectInformationClass: JOBOBJECTINFOCLASS;
+ lpJobObjectInformation: LPVOID; cbJobObjectInformationLength: DWORD): BOOL; stdcall;
+{$EXTERNALSYM SetInformationJobObject}
+
+function IsProcessInJob(ProcessHandle, JobHandle: HANDLE; var Result_: BOOL): BOOL; stdcall;
+{$EXTERNALSYM IsProcessInJob}
+
+function CreateJobSet(NumJob: ULONG; UserJobSet: PJOB_SET_ARRAY; Flags: ULONG): BOOL; stdcall;
+{$EXTERNALSYM CreateJobSet}
+
+function AddVectoredExceptionHandler(FirstHandler: ULONG;
+ VectoredHandler: PVECTORED_EXCEPTION_HANDLER): PVOID; stdcall;
+{$EXTERNALSYM AddVectoredExceptionHandler}
+
+function RemoveVectoredExceptionHandler(VectoredHandlerHandle: PVOID): ULONG; stdcall;
+{$EXTERNALSYM RemoveVectoredExceptionHandler}
+
+//
+// New Volume Mount Point API.
+//
+
+function FindFirstVolumeA(lpszVolumeName: LPSTR; cchBufferLength: DWORD): HANDLE; stdcall;
+{$EXTERNALSYM FindFirstVolumeA}
+function FindFirstVolumeW(lpszVolumeName: LPWSTR; cchBufferLength: DWORD): HANDLE; stdcall;
+{$EXTERNALSYM FindFirstVolumeW}
+function FindFirstVolume(lpszVolumeName: LPTSTR; cchBufferLength: DWORD): HANDLE; stdcall;
+{$EXTERNALSYM FindFirstVolume}
+
+function FindNextVolumeA(hFindVolume: HANDLE; lpszVolumeName: LPSTR;
+ cchBufferLength: DWORD): BOOL; stdcall;
+{$EXTERNALSYM FindNextVolumeA}
+function FindNextVolumeW(hFindVolume: HANDLE; lpszVolumeName: LPWSTR;
+ cchBufferLength: DWORD): BOOL; stdcall;
+{$EXTERNALSYM FindNextVolumeW}
+function FindNextVolume(hFindVolume: HANDLE; lpszVolumeName: LPTSTR;
+ cchBufferLength: DWORD): BOOL; stdcall;
+{$EXTERNALSYM FindNextVolume}
+
+function FindVolumeClose(hFindVolume: HANDLE): BOOL; stdcall;
+{$EXTERNALSYM FindVolumeClose}
+
+function FindFirstVolumeMountPointA(lpszRootPathName: LPCSTR;
+ lpszVolumeMountPoint: LPSTR; cchBufferLength: DWORD): HANDLE; stdcall;
+{$EXTERNALSYM FindFirstVolumeMountPointA}
+function FindFirstVolumeMountPointW(lpszRootPathName: LPCWSTR;
+ lpszVolumeMountPoint: LPWSTR; cchBufferLength: DWORD): HANDLE; stdcall;
+{$EXTERNALSYM FindFirstVolumeMountPointW}
+function FindFirstVolumeMountPoint(lpszRootPathName: LPCTSTR;
+ lpszVolumeMountPoint: LPTSTR; cchBufferLength: DWORD): HANDLE; stdcall;
+{$EXTERNALSYM FindFirstVolumeMountPoint}
+
+function FindNextVolumeMountPointA(hFindVolumeMountPoint: HANDLE;
+ lpszVolumeMountPoint: LPSTR; cchBufferLength: DWORD): BOOL; stdcall;
+{$EXTERNALSYM FindNextVolumeMountPointA}
+function FindNextVolumeMountPointW(hFindVolumeMountPoint: HANDLE;
+ lpszVolumeMountPoint: LPWSTR; cchBufferLength: DWORD): BOOL; stdcall;
+{$EXTERNALSYM FindNextVolumeMountPointW}
+function FindNextVolumeMountPoint(hFindVolumeMountPoint: HANDLE;
+ lpszVolumeMountPoint: LPTSTR; cchBufferLength: DWORD): BOOL; stdcall;
+{$EXTERNALSYM FindNextVolumeMountPoint}
+
+function FindVolumeMountPointClose(hFindVolumeMountPoint: HANDLE): BOOL; stdcall;
+{$EXTERNALSYM FindVolumeMountPointClose}
+
+function SetVolumeMountPointA(lpszVolumeMountPoint, lpszVolumeName: LPCSTR): BOOL; stdcall;
+{$EXTERNALSYM SetVolumeMountPointA}
+function SetVolumeMountPointW(lpszVolumeMountPoint, lpszVolumeName: LPCWSTR): BOOL; stdcall;
+{$EXTERNALSYM SetVolumeMountPointW}
+function SetVolumeMountPoint(lpszVolumeMountPoint, lpszVolumeName: LPCTSTR): BOOL; stdcall;
+{$EXTERNALSYM SetVolumeMountPoint}
+
+function DeleteVolumeMountPointA(lpszVolumeMountPoint: LPCSTR): BOOL; stdcall;
+{$EXTERNALSYM DeleteVolumeMountPointA}
+function DeleteVolumeMountPointW(lpszVolumeMountPoint: LPCWSTR): BOOL; stdcall;
+{$EXTERNALSYM DeleteVolumeMountPointW}
+function DeleteVolumeMountPoint(lpszVolumeMountPoint: LPCTSTR): BOOL; stdcall;
+{$EXTERNALSYM DeleteVolumeMountPoint}
+
+function GetVolumeNameForVolumeMountPointA(lpszVolumeMountPoint: LPCSTR;
+ lpszVolumeName: LPSTR; cchBufferLength: DWORD): BOOL; stdcall;
+{$EXTERNALSYM GetVolumeNameForVolumeMountPointA}
+function GetVolumeNameForVolumeMountPointW(lpszVolumeMountPoint: LPCWSTR;
+ lpszVolumeName: LPWSTR; cchBufferLength: DWORD): BOOL; stdcall;
+{$EXTERNALSYM GetVolumeNameForVolumeMountPointW}
+function GetVolumeNameForVolumeMountPoint(lpszVolumeMountPoint: LPCTSTR;
+ lpszVolumeName: LPTSTR; cchBufferLength: DWORD): BOOL; stdcall;
+{$EXTERNALSYM GetVolumeNameForVolumeMountPoint}
+
+function GetVolumePathNameA(lpszFileName: LPCSTR; lpszVolumePathName: LPSTR;
+ cchBufferLength: DWORD): BOOL; stdcall;
+{$EXTERNALSYM GetVolumePathNameA}
+function GetVolumePathNameW(lpszFileName: LPCWSTR; lpszVolumePathName: LPWSTR;
+ cchBufferLength: DWORD): BOOL; stdcall;
+{$EXTERNALSYM GetVolumePathNameW}
+function GetVolumePathName(lpszFileName: LPCTSTR; lpszVolumePathName: LPTSTR;
+ cchBufferLength: DWORD): BOOL; stdcall;
+{$EXTERNALSYM GetVolumePathName}
+
+function GetVolumePathNamesForVolumeNameA(lpszVolumeName, lpszVolumePathNames: LPCSTR;
+ cchBufferLength: DWORD; var lpcchReturnLength: DWORD): BOOL; stdcall;
+{$EXTERNALSYM GetVolumePathNamesForVolumeNameA}
+function GetVolumePathNamesForVolumeNameW(lpszVolumeName, lpszVolumePathNames: LPCWSTR;
+ cchBufferLength: DWORD; var lpcchReturnLength: DWORD): BOOL; stdcall;
+{$EXTERNALSYM GetVolumePathNamesForVolumeNameW}
+function GetVolumePathNamesForVolumeName(lpszVolumeName, lpszVolumePathNames: LPCTSTR;
+ cchBufferLength: DWORD; var lpcchReturnLength: DWORD): BOOL; stdcall;
+{$EXTERNALSYM GetVolumePathNamesForVolumeName}
+
+const
+ ACTCTX_FLAG_PROCESSOR_ARCHITECTURE_VALID = $00000001;
+ {$EXTERNALSYM ACTCTX_FLAG_PROCESSOR_ARCHITECTURE_VALID}
+ ACTCTX_FLAG_LANGID_VALID = $00000002;
+ {$EXTERNALSYM ACTCTX_FLAG_LANGID_VALID}
+ ACTCTX_FLAG_ASSEMBLY_DIRECTORY_VALID = $00000004;
+ {$EXTERNALSYM ACTCTX_FLAG_ASSEMBLY_DIRECTORY_VALID}
+ ACTCTX_FLAG_RESOURCE_NAME_VALID = $00000008;
+ {$EXTERNALSYM ACTCTX_FLAG_RESOURCE_NAME_VALID}
+ ACTCTX_FLAG_SET_PROCESS_DEFAULT = $00000010;
+ {$EXTERNALSYM ACTCTX_FLAG_SET_PROCESS_DEFAULT}
+ ACTCTX_FLAG_APPLICATION_NAME_VALID = $00000020;
+ {$EXTERNALSYM ACTCTX_FLAG_APPLICATION_NAME_VALID}
+ ACTCTX_FLAG_SOURCE_IS_ASSEMBLYREF = $00000040;
+ {$EXTERNALSYM ACTCTX_FLAG_SOURCE_IS_ASSEMBLYREF}
+ ACTCTX_FLAG_HMODULE_VALID = $00000080;
+ {$EXTERNALSYM ACTCTX_FLAG_HMODULE_VALID}
+
+type
+ tagACTCTXA = record
+ cbSize: ULONG;
+ dwFlags: DWORD;
+ lpSource: LPCSTR;
+ wProcessorArchitecture: USHORT;
+ wLangId: LANGID;
+ lpAssemblyDirectory: LPCSTR;
+ lpResourceName: LPCSTR;
+ lpApplicationName: LPCSTR;
+ hModule: HMODULE;
+ end;
+ {$EXTERNALSYM tagACTCTXA}
+ ACTCTXA = tagACTCTXA;
+ {$EXTERNALSYM ACTCTXA}
+ PACTCTXA = ^ACTCTXA;
+ {$EXTERNALSYM PACTCTXA}
+ TActCtxA = ACTCTXA;
+
+ tagACTCTXW = record
+ cbSize: ULONG;
+ dwFlags: DWORD;
+ lpSource: LPCWSTR;
+ wProcessorArchitecture: USHORT;
+ wLangId: LANGID;
+ lpAssemblyDirectory: LPCWSTR;
+ lpResourceName: LPCWSTR;
+ lpApplicationName: LPCWSTR;
+ hModule: HMODULE;
+ end;
+ {$EXTERNALSYM tagACTCTXW}
+ ACTCTXW = tagACTCTXW;
+ {$EXTERNALSYM ACTCTXW}
+ PACTCTXW = ^ACTCTXW;
+ {$EXTERNALSYM PACTCTXW}
+ TActCtxW = ACTCTXW;
+
+ {$IFDEF UNICODE}
+ ACTCTX = ACTCTXW;
+ {$EXTERNALSYM ACTCTX}
+ PACTCTX = PACTCTXW;
+ {$EXTERNALSYM PACTCTX}
+ TActCtx = TActCtxW;
+ {$ELSE}
+ ACTCTX = ACTCTXA;
+ {$EXTERNALSYM ACTCTX}
+ PACTCTX = PACTCTXA;
+ {$EXTERNALSYM PACTCTX}
+ TActCtx = TActCtxA;
+ {$ENDIF UNICODE}
+
+function CreateActCtxA(var pActCtx: ACTCTXA): HANDLE; stdcall;
+{$EXTERNALSYM CreateActCtxA}
+function CreateActCtxW(var pActCtx: ACTCTXW): HANDLE; stdcall;
+{$EXTERNALSYM CreateActCtxW}
+function CreateActCtx(var pActCtx: ACTCTX): HANDLE; stdcall;
+{$EXTERNALSYM CreateActCtx}
+
+procedure AddRefActCtx(hActCtx: HANDLE); stdcall;
+{$EXTERNALSYM AddRefActCtx}
+
+procedure ReleaseActCtx(hActCtx: HANDLE); stdcall;
+{$EXTERNALSYM ReleaseActCtx}
+
+function ZombifyActCtx(hActCtx: HANDLE): BOOL; stdcall;
+{$EXTERNALSYM ZombifyActCtx}
+
+function ActivateActCtx(hActCtx: HANDLE; var lpCookie: ULONG_PTR): BOOL; stdcall;
+{$EXTERNALSYM ActivateActCtx}
+
+const
+ DEACTIVATE_ACTCTX_FLAG_FORCE_EARLY_DEACTIVATION = $00000001;
+ {$EXTERNALSYM DEACTIVATE_ACTCTX_FLAG_FORCE_EARLY_DEACTIVATION}
+
+function DeactivateActCtx(dwFlags: DWORD; ulCookie: ULONG_PTR): BOOL; stdcall;
+{$EXTERNALSYM DeactivateActCtx}
+
+function GetCurrentActCtx(var lphActCtx: HANDLE): BOOL; stdcall;
+{$EXTERNALSYM GetCurrentActCtx}
+
+type
+ tagACTCTX_SECTION_KEYED_DATA_2600 = record
+ cbSize: ULONG;
+ ulDataFormatVersion: ULONG;
+ lpData: PVOID;
+ ulLength: ULONG;
+ lpSectionGlobalData: PVOID;
+ ulSectionGlobalDataLength: ULONG;
+ lpSectionBase: PVOID;
+ ulSectionTotalLength: ULONG;
+ hActCtx: HANDLE;
+ ulAssemblyRosterIndex: ULONG;
+ end;
+ {$EXTERNALSYM tagACTCTX_SECTION_KEYED_DATA_2600}
+ ACTCTX_SECTION_KEYED_DATA_2600 = tagACTCTX_SECTION_KEYED_DATA_2600;
+ {$EXTERNALSYM ACTCTX_SECTION_KEYED_DATA_2600}
+ PACTCTX_SECTION_KEYED_DATA_2600 = ^ACTCTX_SECTION_KEYED_DATA_2600;
+ {$EXTERNALSYM PACTCTX_SECTION_KEYED_DATA_2600}
+ PCACTCTX_SECTION_KEYED_DATA_2600 = ^ACTCTX_SECTION_KEYED_DATA_2600;
+ {$EXTERNALSYM PCACTCTX_SECTION_KEYED_DATA_2600}
+ TActCtxSectionKeyedData2600 = ACTCTX_SECTION_KEYED_DATA_2600;
+ PActCtxSectionKeyedData2600 = PACTCTX_SECTION_KEYED_DATA_2600;
+
+ tagACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA = record
+ lpInformation: PVOID;
+ lpSectionBase: PVOID;
+ ulSectionLength: ULONG;
+ lpSectionGlobalDataBase: PVOID;
+ ulSectionGlobalDataLength: ULONG;
+ end;
+ {$EXTERNALSYM tagACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA}
+ ACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA = tagACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA;
+ {$EXTERNALSYM ACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA}
+ PACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA = ^ACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA;
+ {$EXTERNALSYM PACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA}
+ PCACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA = ^ACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA;
+ {$EXTERNALSYM PCACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA}
+ TActCtxSectionKeyedDataAssemblyMetadata = ACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA;
+ PActCtxSectionKeyedDataAssemblyMetadata = PACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA;
+
+ tagACTCTX_SECTION_KEYED_DATA = record
+ cbSize: ULONG;
+ ulDataFormatVersion: ULONG;
+ lpData: PVOID;
+ ulLength: ULONG;
+ lpSectionGlobalData: PVOID;
+ ulSectionGlobalDataLength: ULONG;
+ lpSectionBase: PVOID;
+ ulSectionTotalLength: ULONG;
+ hActCtx: HANDLE;
+ ulAssemblyRosterIndex: ULONG;
+ // 2600 stops here
+ ulFlags: ULONG;
+ AssemblyMetadata: ACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA;
+ end;
+ {$EXTERNALSYM tagACTCTX_SECTION_KEYED_DATA}
+ ACTCTX_SECTION_KEYED_DATA = tagACTCTX_SECTION_KEYED_DATA;
+ {$EXTERNALSYM ACTCTX_SECTION_KEYED_DATA}
+ PACTCTX_SECTION_KEYED_DATA = ^ACTCTX_SECTION_KEYED_DATA;
+ {$EXTERNALSYM PACTCTX_SECTION_KEYED_DATA}
+ PCACTCTX_SECTION_KEYED_DATA = ^ACTCTX_SECTION_KEYED_DATA;
+ {$EXTERNALSYM PCACTCTX_SECTION_KEYED_DATA}
+ TActCtxSectionKeyedData = ACTCTX_SECTION_KEYED_DATA;
+ PActCtxSectionKeyedData = PACTCTX_SECTION_KEYED_DATA;
+
+const
+ FIND_ACTCTX_SECTION_KEY_RETURN_HACTCTX = $00000001;
+ {$EXTERNALSYM FIND_ACTCTX_SECTION_KEY_RETURN_HACTCTX}
+ FIND_ACTCTX_SECTION_KEY_RETURN_FLAGS = $00000002;
+ {$EXTERNALSYM FIND_ACTCTX_SECTION_KEY_RETURN_FLAGS}
+ FIND_ACTCTX_SECTION_KEY_RETURN_ASSEMBLY_METADATA = $00000004;
+ {$EXTERNALSYM FIND_ACTCTX_SECTION_KEY_RETURN_ASSEMBLY_METADATA}
+
+function FindActCtxSectionStringA(dwFlags: DWORD; const lpExtensionGuid: TGUID;
+ ulSectionId: ULONG; lpStringToFind: LPCSTR; ReturnedData: PACTCTX_SECTION_KEYED_DATA): BOOL; stdcall;
+{$EXTERNALSYM FindActCtxSectionStringA}
+function FindActCtxSectionStringW(dwFlags: DWORD; const lpExtensionGuid: TGUID;
+ ulSectionId: ULONG; lpStringToFind: LPCWSTR; ReturnedData: PACTCTX_SECTION_KEYED_DATA): BOOL; stdcall;
+{$EXTERNALSYM FindActCtxSectionStringW}
+function FindActCtxSectionString(dwFlags: DWORD; const lpExtensionGuid: TGUID;
+ ulSectionId: ULONG; lpStringToFind: LPCTSTR; ReturnedData: PACTCTX_SECTION_KEYED_DATA): BOOL; stdcall;
+{$EXTERNALSYM FindActCtxSectionString}
+
+function FindActCtxSectionGuid(dwFlags: DWORD; const lpExtensionGuid: TGUID;
+ ulSectionId: ULONG; const lpGuidToFind: TGUID; ReturnedData: PACTCTX_SECTION_KEYED_DATA): BOOL; stdcall;
+{$EXTERNALSYM FindActCtxSectionGuid}
+
+type
+ _ACTIVATION_CONTEXT_BASIC_INFORMATION = record
+ hActCtx: HANDLE;
+ dwFlags: DWORD;
+ end;
+ {$EXTERNALSYM _ACTIVATION_CONTEXT_BASIC_INFORMATION}
+ ACTIVATION_CONTEXT_BASIC_INFORMATION = _ACTIVATION_CONTEXT_BASIC_INFORMATION;
+ {$EXTERNALSYM ACTIVATION_CONTEXT_BASIC_INFORMATION}
+ PACTIVATION_CONTEXT_BASIC_INFORMATION = ^ACTIVATION_CONTEXT_BASIC_INFORMATION;
+ {$EXTERNALSYM PACTIVATION_CONTEXT_BASIC_INFORMATION}
+ TActivationContextBasicInformation = ACTIVATION_CONTEXT_BASIC_INFORMATION;
+ PActivationContextBasicInformation = PACTIVATION_CONTEXT_BASIC_INFORMATION;
+
+ PCACTIVATION_CONTEXT_BASIC_INFORMATION = ^_ACTIVATION_CONTEXT_BASIC_INFORMATION;
+ {$EXTERNALSYM PCACTIVATION_CONTEXT_BASIC_INFORMATION}
+
+const
+ ACTIVATION_CONTEXT_BASIC_INFORMATION_DEFINED = 1;
+ {$EXTERNALSYM ACTIVATION_CONTEXT_BASIC_INFORMATION_DEFINED}
+
+ QUERY_ACTCTX_FLAG_USE_ACTIVE_ACTCTX = $00000004;
+ {$EXTERNALSYM QUERY_ACTCTX_FLAG_USE_ACTIVE_ACTCTX}
+ QUERY_ACTCTX_FLAG_ACTCTX_IS_HMODULE = $00000008;
+ {$EXTERNALSYM QUERY_ACTCTX_FLAG_ACTCTX_IS_HMODULE}
+ QUERY_ACTCTX_FLAG_ACTCTX_IS_ADDRESS = $00000010;
+ {$EXTERNALSYM QUERY_ACTCTX_FLAG_ACTCTX_IS_ADDRESS}
+ QUERY_ACTCTX_FLAG_NO_ADDREF = $80000000;
+ {$EXTERNALSYM QUERY_ACTCTX_FLAG_NO_ADDREF}
+
+//
+// switch (ulInfoClass)
+//
+// case ActivationContextBasicInformation:
+// pvSubInstance == NULL
+// pvBuffer is of type PACTIVATION_CONTEXT_BASIC_INFORMATION
+//
+// case ActivationContextDetailedInformation:
+// pvSubInstance == NULL
+// pvBuffer is of type PACTIVATION_CONTEXT_DETAILED_INFORMATION
+//
+// case AssemblyDetailedInformationInActivationContext:
+// pvSubInstance is of type PULONG
+// *pvSubInstance < ACTIVATION_CONTEXT_DETAILED_INFORMATION::ulAssemblyCount
+// pvBuffer is of type PACTIVATION_CONTEXT_ASSEMBLY_DETAILED_INFORMATION
+//
+// case FileInformationInAssemblyOfAssemblyInActivationContext:
+// pvSubInstance is of type PACTIVATION_CONTEXT_QUERY_INDEX
+// pvSubInstance->ulAssemblyIndex < ACTIVATION_CONTEXT_DETAILED_INFORMATION::ulAssemblyCount
+// pvSubInstance->ulFileIndexInAssembly < ACTIVATION_CONTEXT_ASSEMBLY_DETAILED_INFORMATION::ulFileCount
+// pvBuffer is of type PASSEMBLY_FILE_DETAILED_INFORMATION
+//
+// String are placed after the structs.
+//
+
+function QueryActCtxW(dwFlags: DWORD; hActCtx: HANDLE; pvSubInstance: PVOID;
+ ulInfoClass: ULONG; pvBuffer: PVOID; cbBuffer: SIZE_T;
+ pcbWrittenOrRequired: PSIZE_T): BOOL; stdcall;
+{$EXTERNALSYM QueryActCtxW}
+
+type
+ PQUERYACTCTXW_FUNC = function(dwFlags: DWORD; hActCtx: HANDLE;
+ pvSubInstance: PVOID; ulInfoClass: ULONG; pvBuffer: PVOID; cbBuffer: SIZE_T;
+ pcbWrittenOrRequired: PSIZE_T): BOOL; stdcall;
+ {$EXTERNALSYM PQUERYACTCTXW_FUNC}
+
+function ProcessIdToSessionId(dwProcessId: DWORD; var pSessionId: DWORD): BOOL; stdcall;
+{$EXTERNALSYM ProcessIdToSessionId}
+
+function WTSGetActiveConsoleSessionId: DWORD; stdcall;
+{$EXTERNALSYM WTSGetActiveConsoleSessionId}
+
+function IsWow64Process(hProcess: HANDLE; var Wow64Process: BOOL): BOOL; stdcall;
+{$EXTERNALSYM IsWow64Process}
+
+function GetLogicalProcessorInformation(Buffer: PSYSTEM_LOGICAL_PROCESSOR_INFORMATION; ReturnedLength: PDWORD): BOOL; stdcall;
+{$EXTERNALSYM GetLogicalProcessorInformation}
+
+//
+// NUMA Information routines.
+//
+
+function GetNumaHighestNodeNumber(var HighestNodeNumber: ULONG): BOOL; stdcall;
+{$EXTERNALSYM GetNumaHighestNodeNumber}
+
+function GetNumaProcessorNode(Processor: UCHAR; var NodeNumber: UCHAR): BOOL; stdcall;
+{$EXTERNALSYM GetNumaProcessorNode}
+
+function GetNumaNodeProcessorMask(Node: UCHAR; ProcessorMask: ULONGLONG): BOOL; stdcall;
+{$EXTERNALSYM GetNumaNodeProcessorMask}
+
+function GetNumaAvailableMemoryNode(Node: UCHAR; var AvailableBytes: ULONGLONG): BOOL; stdcall;
+{$EXTERNALSYM GetNumaAvailableMemoryNode}
+
+implementation
+
+const
+ kernel32 = 'kernel32.dll';
+ advapi32 = 'advapi32.dll';
+ {$IFDEF UNICODE}
+ AWSuffix = 'W';
+ {$ELSE}
+ AWSuffix = 'A';
+ {$ENDIF UNICODE}
+
+procedure MoveMemory(Destination, Source: PVOID; Length: SIZE_T);
+begin
+ Move(Source^, Destination^, Length);
+end;
+
+procedure CopyMemory(Destination, Source: PVOID; Length: SIZE_T);
+begin
+ Move(Source^, Destination^, Length);
+end;
+
+procedure FillMemory(Destination: PVOID; Length: SIZE_T; Fill: BYTE);
+begin
+ FillChar(Destination^, Length, Fill);
+end;
+
+procedure ZeroMemory(Destination: PVOID; Length: SIZE_T);
+begin
+ FillChar(Destination^, Length, 0);
+end;
+
+function FreeModule(hLibModule: HMODULE): BOOL;
+begin
+ Result := FreeLibrary(hLibModule);
+end;
+
+function MakeProcInstance(lpProc: FARPROC; hInstance: HINSTANCE): FARPROC;
+begin
+ Result := lpProc;
+end;
+
+procedure FreeProcInstance(lpProc: FARPROC);
+begin
+ { nothing }
+end;
+
+function GlobalLRUNewest(h: HANDLE): HANDLE;
+begin
+ Result := H;
+end;
+
+function GlobalLRUOldest(h: HANDLE): HANDLE;
+begin
+ Result := H;
+end;
+
+function GlobalDiscard(h: HANDLE): HANDLE;
+begin
+ Result := GlobalReAlloc(h, 0, GMEM_MOVEABLE);
+end;
+
+function LocalDiscard(h: HLOCAL): HLOCAL;
+begin
+ Result := LocalReAlloc(h, 0, LMEM_MOVEABLE);
+end;
+
+function GetFreeSpace(w: WORD): DWORD;
+begin
+ Result := $100000;
+end;
+
+function InterlockedExchangePointer(var Target: PVOID; Value: PVOID): PVOID;
+begin
+ Result := PVOID(InterlockedExchange(LONG(Target), LONG(Value)));
+end;
+
+function InterlockedCompareExchangePointer(var Destination: PVOID; Exchange, Comperand: PVOID): PVOID;
+begin
+ Result := PVOID(InterlockedCompareExchange(LONG(Destination), LONG(Exchange), LONG(Comperand)));
+end;
+
+function UnlockResource(hResData: HANDLE): BOOL;
+begin
+ Result := False;
+end;
+
+function HasOverlappedIoCompleted(const lpOverlapped: OVERLAPPED): BOOL;
+begin
+ Result := NTSTATUS(lpOverlapped.Internal) <> STATUS_PENDING;
+end;
+
+// 64 bit interlocked functions from Will
+
+function InterlockedAnd64(var Destination: LONGLONG; Value: LONGLONG): LONGLONG;
+begin
+ repeat
+ Result := Destination;
+ until (InterlockedCompareExchange64(Destination, Result and Value, Result) = Result);
+end;
+
+function InterlockedOr64(var Destination: LONGLONG; Value: LONGLONG): LONGLONG;
+begin
+ repeat
+ Result := Destination;
+ until (InterlockedCompareExchange64(Destination, Result or Value, Result) = Result);
+end;
+
+function InterlockedXor64(var Destination: LONGLONG; Value: LONGLONG): LONGLONG;
+begin
+ repeat
+ Result := Destination;
+ until (InterlockedCompareExchange64(Destination, Result xor Value, Result) = Result);
+end;
+
+function InterlockedIncrement64(var Addend: LONGLONG): LONGLONG;
+begin
+ repeat
+ Result := Addend;
+ until (InterlockedCompareExchange64(Addend, Result + 1, Result) = Result);
+ Inc(Result);
+end;
+
+function InterlockedDecrement64(var Addend: LONGLONG): LONGLONG;
+begin
+ repeat
+ Result := Addend;
+ until (InterlockedCompareExchange64(Addend, Result - 1, Result) = Result);
+ Dec(Result);
+end;
+
+function InterlockedExchange64(var Target: LONGLONG; Value: LONGLONG): LONGLONG;
+begin
+ repeat
+ Result := Target;
+ until (InterlockedCompareExchange64(Target, Value, Result) = Result);
+end;
+
+function InterlockedExchangeAdd64(var Addend: LONGLONG; Value: LONGLONG): LONGLONG;
+begin
+ repeat
+ Result := Addend;
+ until (InterlockedCompareExchange64(Addend, Result + Value, Result) = Result);
+end;
+
+{ MVB:
+ The implementation of CreateMutex only interpretes bInitialOwner as True if
+ it's ordinal value is 1, all other values are interpreted as False. Delphi
+ compiles Longbool(True) as $FFFFFFFF which is consequently interpreted as
+ False. Changing the bInitalOwner parameter type to Boolean fixes the problem
+ (Boolean(True) = 1) but that would be implementation specific and might break
+ in the future, though unlikely. Hence the CreateMutex function here which
+ explicitly passes LongBool(1) instead of LongBool(True). }
+
+type
+ TCreateMutexA = function(lpMutexAttributes: LPSECURITY_ATTRIBUTES; bInitialOwner: LongBool; lpName: LPCSTR): HANDLE; stdcall;
+ TCreateMutexW = function(lpMutexAttributes: LPSECURITY_ATTRIBUTES; bInitialOwner: LongBool; lpName: LPCWSTR): HANDLE; stdcall;
+
+var
+ _CreateMutexA: Pointer;
+ _CreateMutexW: Pointer;
+
+function CreateMutexA(lpMutexAttributes: LPSECURITY_ATTRIBUTES; bInitialOwner: BOOL; lpName: LPCSTR): HANDLE;
+begin
+ GetProcedureAddress(_CreateMutexA, kernel32, 'CreateMutexA');
+ if bInitialOwner then
+ Result := TCreateMutexA(_CreateMutexA)(lpMutexAttributes, LongBool(1), lpName)
+ else
+ Result := TCreateMutexA(_CreateMutexA)(lpMutexAttributes, LongBool(0), lpName)
+end;
+
+function CreateMutexW(lpMutexAttributes: LPSECURITY_ATTRIBUTES; bInitialOwner: BOOL; lpName: LPCWSTR): HANDLE;
+begin
+ GetProcedureAddress(_CreateMutexW, kernel32, 'CreateMutexW');
+ if bInitialOwner then
+ Result := TCreateMutexW(_CreateMutexW)(lpMutexAttributes, LongBool(1), lpName)
+ else
+ Result := TCreateMutexW(_CreateMutexW)(lpMutexAttributes, LongBool(0), lpName)
+end;
+
+{$IFDEF UNICODE}
+function CreateMutex(lpMutexAttributes: LPSECURITY_ATTRIBUTES; bInitialOwner: BOOL; lpName: LPCWSTR): HANDLE;
+begin
+ GetProcedureAddress(_CreateMutexW, kernel32, 'CreateMutexW');
+ if bInitialOwner then
+ Result := TCreateMutexW(_CreateMutexW)(lpMutexAttributes, LongBool(1), lpName)
+ else
+ Result := TCreateMutexW(_CreateMutexW)(lpMutexAttributes, LongBool(0), lpName)
+end;
+{$ELSE}
+function CreateMutex(lpMutexAttributes: LPSECURITY_ATTRIBUTES; bInitialOwner: BOOL; lpName: LPCSTR): HANDLE;
+begin
+ GetProcedureAddress(_CreateMutexA, kernel32, 'CreateMutexA');
+ if bInitialOwner then
+ Result := TCreateMutexA(_CreateMutexA)(lpMutexAttributes, LongBool(1), lpName)
+ else
+ Result := TCreateMutexA(_CreateMutexA)(lpMutexAttributes, LongBool(0), lpName)
+end;
+{$ENDIF UNICODE}
+
+{$IFDEF DYNAMIC_LINK}
+
+var
+ _InterlockedCompareExchange64: Pointer;
+
+function InterlockedCompareExchange64;
+begin
+ GetProcedureAddress(_InterlockedCompareExchange64, kernel32, 'InterlockedCompareExchange64');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_InterlockedCompareExchange64]
+ end;
+end;
+
+var
+ _InterlockedIncrement: Pointer;
+
+function InterlockedIncrement;
+begin
+ GetProcedureAddress(_InterlockedIncrement, kernel32, 'InterlockedIncrement');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_InterlockedIncrement]
+ end;
+end;
+
+var
+ _InterlockedDecrement: Pointer;
+
+function InterlockedDecrement;
+begin
+ GetProcedureAddress(_InterlockedDecrement, kernel32, 'InterlockedDecrement');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_InterlockedDecrement]
+ end;
+end;
+
+var
+ _InterlockedExchange: Pointer;
+
+function InterlockedExchange;
+begin
+ GetProcedureAddress(_InterlockedExchange, kernel32, 'InterlockedExchange');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_InterlockedExchange]
+ end;
+end;
+
+var
+ _InterlockedExchangeAdd: Pointer;
+
+function InterlockedExchangeAdd;
+begin
+ GetProcedureAddress(_InterlockedExchangeAdd, kernel32, 'InterlockedExchangeAdd');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_InterlockedExchangeAdd]
+ end;
+end;
+
+var
+ _InterlockedCompareExchange: Pointer;
+
+function InterlockedCompareExchange;
+begin
+ GetProcedureAddress(_InterlockedCompareExchange, kernel32, 'InterlockedCompareExchange');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_InterlockedCompareExchange]
+ end;
+end;
+
+var
+ _InitializeSListHead: Pointer;
+
+procedure InitializeSListHead;
+begin
+ GetProcedureAddress(_InitializeSListHead, kernel32, 'InitializeSListHead');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_InitializeSListHead]
+ end;
+end;
+
+var
+ _InterlockedPopEntrySList: Pointer;
+
+function InterlockedPopEntrySList;
+begin
+ GetProcedureAddress(_InterlockedPopEntrySList, kernel32, 'InterlockedPopEntrySList');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_InterlockedPopEntrySList]
+ end;
+end;
+
+var
+ _InterlockedPushEntrySList: Pointer;
+
+function InterlockedPushEntrySList;
+begin
+ GetProcedureAddress(_InterlockedPushEntrySList, kernel32, 'InterlockedPushEntrySList');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_InterlockedPushEntrySList]
+ end;
+end;
+
+var
+ _InterlockedFlushSList: Pointer;
+
+function InterlockedFlushSList;
+begin
+ GetProcedureAddress(_InterlockedFlushSList, kernel32, 'InterlockedFlushSList');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_InterlockedFlushSList]
+ end;
+end;
+
+var
+ _QueryDepthSList: Pointer;
+
+function QueryDepthSList;
+begin
+ GetProcedureAddress(_QueryDepthSList, kernel32, 'QueryDepthSList');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_QueryDepthSList]
+ end;
+end;
+
+var
+ _FreeResource: Pointer;
+
+function FreeResource;
+begin
+ GetProcedureAddress(_FreeResource, kernel32, 'FreeResource');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_FreeResource]
+ end;
+end;
+
+var
+ _LockResource: Pointer;
+
+function LockResource;
+begin
+ GetProcedureAddress(_LockResource, kernel32, 'LockResource');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_LockResource]
+ end;
+end;
+
+var
+ _FreeLibrary: Pointer;
+
+function FreeLibrary;
+begin
+ GetProcedureAddress(_FreeLibrary, kernel32, 'FreeLibrary');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_FreeLibrary]
+ end;
+end;
+
+var
+ _FreeLibraryAndExitThread: Pointer;
+
+procedure FreeLibraryAndExitThread;
+begin
+ GetProcedureAddress(_FreeLibraryAndExitThread, kernel32, 'FreeLibraryAndExitThread');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_FreeLibraryAndExitThread]
+ end;
+end;
+
+var
+ _DisableThreadLibraryCalls: Pointer;
+
+function DisableThreadLibraryCalls;
+begin
+ GetProcedureAddress(_DisableThreadLibraryCalls, kernel32, 'DisableThreadLibraryCalls');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DisableThreadLibraryCalls]
+ end;
+end;
+
+// MVB TODO Dynamic linking for GetProcAddress doesn't make much sense, does it? Same for LoadLibrary.
+
+var
+ _GetProcAddress: Pointer;
+
+function GetProcAddress;
+begin
+ GetProcedureAddress(_GetProcAddress, kernel32, 'GetProcAddress');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetProcAddress]
+ end;
+end;
+
+var
+ _GetVersion: Pointer;
+
+function GetVersion;
+begin
+ GetProcedureAddress(_GetVersion, kernel32, 'GetVersion');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetVersion]
+ end;
+end;
+
+var
+ _GlobalAlloc: Pointer;
+
+function GlobalAlloc;
+begin
+ GetProcedureAddress(_GlobalAlloc, kernel32, 'GlobalAlloc');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GlobalAlloc]
+ end;
+end;
+
+var
+ _GlobalReAlloc: Pointer;
+
+function GlobalReAlloc;
+begin
+ GetProcedureAddress(_GlobalReAlloc, kernel32, 'GlobalReAlloc');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GlobalReAlloc]
+ end;
+end;
+
+var
+ _GlobalSize: Pointer;
+
+function GlobalSize;
+begin
+ GetProcedureAddress(_GlobalSize, kernel32, 'GlobalSize');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GlobalSize]
+ end;
+end;
+
+var
+ _GlobalFlags: Pointer;
+
+function GlobalFlags;
+begin
+ GetProcedureAddress(_GlobalFlags, kernel32, 'GlobalFlags');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GlobalFlags]
+ end;
+end;
+
+var
+ _GlobalLock: Pointer;
+
+function GlobalLock;
+begin
+ GetProcedureAddress(_GlobalLock, kernel32, 'GlobalLock');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GlobalLock]
+ end;
+end;
+
+var
+ _GlobalHandle: Pointer;
+
+function GlobalHandle;
+begin
+ GetProcedureAddress(_GlobalHandle, kernel32, 'GlobalHandle');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GlobalHandle]
+ end;
+end;
+
+var
+ _GlobalUnlock: Pointer;
+
+function GlobalUnlock;
+begin
+ GetProcedureAddress(_GlobalUnlock, kernel32, 'GlobalUnlock');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GlobalUnlock]
+ end;
+end;
+
+var
+ _GlobalFree: Pointer;
+
+function GlobalFree;
+begin
+ GetProcedureAddress(_GlobalFree, kernel32, 'GlobalFree');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GlobalFree]
+ end;
+end;
+
+var
+ _GlobalCompact: Pointer;
+
+function GlobalCompact;
+begin
+ GetProcedureAddress(_GlobalCompact, kernel32, 'GlobalCompact');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GlobalCompact]
+ end;
+end;
+
+var
+ _GlobalFix: Pointer;
+
+procedure GlobalFix;
+begin
+ GetProcedureAddress(_GlobalFix, kernel32, 'GlobalFix');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GlobalFix]
+ end;
+end;
+
+var
+ _GlobalUnfix: Pointer;
+
+procedure GlobalUnfix;
+begin
+ GetProcedureAddress(_GlobalUnfix, kernel32, 'GlobalUnfix');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GlobalUnfix]
+ end;
+end;
+
+var
+ _GlobalWire: Pointer;
+
+function GlobalWire;
+begin
+ GetProcedureAddress(_GlobalWire, kernel32, 'GlobalWire');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GlobalWire]
+ end;
+end;
+
+var
+ _GlobalUnWire: Pointer;
+
+function GlobalUnWire;
+begin
+ GetProcedureAddress(_GlobalUnWire, kernel32, 'GlobalUnWire');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GlobalUnWire]
+ end;
+end;
+
+var
+ _GlobalMemoryStatus: Pointer;
+
+procedure GlobalMemoryStatus;
+begin
+ GetProcedureAddress(_GlobalMemoryStatus, kernel32, 'GlobalMemoryStatus');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GlobalMemoryStatus]
+ end;
+end;
+
+var
+ _GlobalMemoryStatusEx: Pointer;
+
+function GlobalMemoryStatusEx;
+begin
+ GetProcedureAddress(_GlobalMemoryStatusEx, kernel32, 'GlobalMemoryStatusEx');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GlobalMemoryStatusEx]
+ end;
+end;
+
+var
+ _LocalAlloc: Pointer;
+
+function LocalAlloc;
+begin
+ GetProcedureAddress(_LocalAlloc, kernel32, 'LocalAlloc');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_LocalAlloc]
+ end;
+end;
+
+var
+ _LocalReAlloc: Pointer;
+
+function LocalReAlloc;
+begin
+ GetProcedureAddress(_LocalReAlloc, kernel32, 'LocalReAlloc');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_LocalReAlloc]
+ end;
+end;
+
+var
+ _LocalLock: Pointer;
+
+function LocalLock;
+begin
+ GetProcedureAddress(_LocalLock, kernel32, 'LocalLock');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_LocalLock]
+ end;
+end;
+
+var
+ _LocalHandle: Pointer;
+
+function LocalHandle;
+begin
+ GetProcedureAddress(_LocalHandle, kernel32, 'LocalHandle');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_LocalHandle]
+ end;
+end;
+
+var
+ _LocalUnlock: Pointer;
+
+function LocalUnlock;
+begin
+ GetProcedureAddress(_LocalUnlock, kernel32, 'LocalUnlock');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_LocalUnlock]
+ end;
+end;
+
+var
+ _LocalSize: Pointer;
+
+function LocalSize;
+begin
+ GetProcedureAddress(_LocalSize, kernel32, 'LocalSize');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_LocalSize]
+ end;
+end;
+
+var
+ _LocalFlags: Pointer;
+
+function LocalFlags;
+begin
+ GetProcedureAddress(_LocalFlags, kernel32, 'LocalFlags');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_LocalFlags]
+ end;
+end;
+
+var
+ _LocalFree: Pointer;
+
+function LocalFree;
+begin
+ GetProcedureAddress(_LocalFree, kernel32, 'LocalFree');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_LocalFree]
+ end;
+end;
+
+var
+ _LocalShrink: Pointer;
+
+function LocalShrink;
+begin
+ GetProcedureAddress(_LocalShrink, kernel32, 'LocalShrink');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_LocalShrink]
+ end;
+end;
+
+var
+ _LocalCompact: Pointer;
+
+function LocalCompact;
+begin
+ GetProcedureAddress(_LocalCompact, kernel32, 'LocalCompact');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_LocalCompact]
+ end;
+end;
+
+var
+ _FlushInstructionCache: Pointer;
+
+function FlushInstructionCache;
+begin
+ GetProcedureAddress(_FlushInstructionCache, kernel32, 'FlushInstructionCache');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_FlushInstructionCache]
+ end;
+end;
+
+var
+ _VirtualAlloc: Pointer;
+
+function VirtualAlloc;
+begin
+ GetProcedureAddress(_VirtualAlloc, kernel32, 'VirtualAlloc');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_VirtualAlloc]
+ end;
+end;
+
+var
+ _VirtualFree: Pointer;
+
+function VirtualFree;
+begin
+ GetProcedureAddress(_VirtualFree, kernel32, 'VirtualFree');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_VirtualFree]
+ end;
+end;
+
+var
+ _VirtualProtect: Pointer;
+
+function VirtualProtect;
+begin
+ GetProcedureAddress(_VirtualProtect, kernel32, 'VirtualProtect');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_VirtualProtect]
+ end;
+end;
+
+var
+ _VirtualQuery: Pointer;
+
+function VirtualQuery;
+begin
+ GetProcedureAddress(_VirtualQuery, kernel32, 'VirtualQuery');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_VirtualQuery]
+ end;
+end;
+
+var
+ _VirtualAllocEx: Pointer;
+
+function VirtualAllocEx;
+begin
+ GetProcedureAddress(_VirtualAllocEx, kernel32, 'VirtualAllocEx');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_VirtualAllocEx]
+ end;
+end;
+
+var
+ _GetWriteWatch: Pointer;
+
+function GetWriteWatch;
+begin
+ GetProcedureAddress(_GetWriteWatch, kernel32, 'GetWriteWatch');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetWriteWatch]
+ end;
+end;
+
+var
+ _ResetWriteWatch: Pointer;
+
+function ResetWriteWatch;
+begin
+ GetProcedureAddress(_ResetWriteWatch, kernel32, 'ResetWriteWatch');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ResetWriteWatch]
+ end;
+end;
+
+var
+ _GetLargePageMinimum: Pointer;
+
+function GetLargePageMinimum;
+begin
+ GetProcedureAddress(_GetLargePageMinimum, kernel32, 'GetLargePageMinimum');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetLargePageMinimum]
+ end;
+end;
+
+var
+ _VirtualFreeEx: Pointer;
+
+function VirtualFreeEx;
+begin
+ GetProcedureAddress(_VirtualFreeEx, kernel32, 'VirtualFreeEx');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_VirtualFreeEx]
+ end;
+end;
+
+var
+ _VirtualProtectEx: Pointer;
+
+function VirtualProtectEx;
+begin
+ GetProcedureAddress(_VirtualProtectEx, kernel32, 'VirtualProtectEx');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_VirtualProtectEx]
+ end;
+end;
+
+var
+ _VirtualQueryEx: Pointer;
+
+function VirtualQueryEx;
+begin
+ GetProcedureAddress(_VirtualQueryEx, kernel32, 'VirtualQueryEx');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_VirtualQueryEx]
+ end;
+end;
+
+var
+ _HeapCreate: Pointer;
+
+function HeapCreate;
+begin
+ GetProcedureAddress(_HeapCreate, kernel32, 'HeapCreate');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_HeapCreate]
+ end;
+end;
+
+var
+ _HeapDestroy: Pointer;
+
+function HeapDestroy;
+begin
+ GetProcedureAddress(_HeapDestroy, kernel32, 'HeapDestroy');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_HeapDestroy]
+ end;
+end;
+
+var
+ _HeapAlloc: Pointer;
+
+function HeapAlloc;
+begin
+ GetProcedureAddress(_HeapAlloc, kernel32, 'HeapAlloc');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_HeapAlloc]
+ end;
+end;
+
+var
+ _HeapReAlloc: Pointer;
+
+function HeapReAlloc;
+begin
+ GetProcedureAddress(_HeapReAlloc, kernel32, 'HeapReAlloc');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_HeapReAlloc]
+ end;
+end;
+
+var
+ _HeapFree: Pointer;
+
+function HeapFree;
+begin
+ GetProcedureAddress(_HeapFree, kernel32, 'HeapFree');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_HeapFree]
+ end;
+end;
+
+var
+ _HeapSize: Pointer;
+
+function HeapSize;
+begin
+ GetProcedureAddress(_HeapSize, kernel32, 'HeapSize');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_HeapSize]
+ end;
+end;
+
+var
+ _HeapValidate: Pointer;
+
+function HeapValidate;
+begin
+ GetProcedureAddress(_HeapValidate, kernel32, 'HeapValidate');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_HeapValidate]
+ end;
+end;
+
+var
+ _HeapCompact: Pointer;
+
+function HeapCompact;
+begin
+ GetProcedureAddress(_HeapCompact, kernel32, 'HeapCompact');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_HeapCompact]
+ end;
+end;
+
+var
+ _GetProcessHeap: Pointer;
+
+function GetProcessHeap;
+begin
+ GetProcedureAddress(_GetProcessHeap, kernel32, 'GetProcessHeap');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetProcessHeap]
+ end;
+end;
+
+var
+ _GetProcessHeaps: Pointer;
+
+function GetProcessHeaps;
+begin
+ GetProcedureAddress(_GetProcessHeaps, kernel32, 'GetProcessHeaps');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetProcessHeaps]
+ end;
+end;
+
+var
+ _HeapLock: Pointer;
+
+function HeapLock;
+begin
+ GetProcedureAddress(_HeapLock, kernel32, 'HeapLock');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_HeapLock]
+ end;
+end;
+
+var
+ _HeapUnlock: Pointer;
+
+function HeapUnlock;
+begin
+ GetProcedureAddress(_HeapUnlock, kernel32, 'HeapUnlock');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_HeapUnlock]
+ end;
+end;
+
+var
+ _HeapWalk: Pointer;
+
+function HeapWalk;
+begin
+ GetProcedureAddress(_HeapWalk, kernel32, 'HeapWalk');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_HeapWalk]
+ end;
+end;
+
+var
+ _HeapSetInformation: Pointer;
+
+function HeapSetInformation;
+begin
+ GetProcedureAddress(_HeapSetInformation, kernel32, 'HeapSetInformation');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_HeapSetInformation]
+ end;
+end;
+
+var
+ _HeapQueryInformation: Pointer;
+
+function HeapQueryInformation;
+begin
+ GetProcedureAddress(_HeapQueryInformation, kernel32, 'HeapQueryInformation');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_HeapQueryInformation]
+ end;
+end;
+
+var
+ _GetBinaryTypeA: Pointer;
+
+function GetBinaryTypeA;
+begin
+ GetProcedureAddress(_GetBinaryTypeA, kernel32, 'GetBinaryTypeA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetBinaryTypeA]
+ end;
+end;
+
+var
+ _GetBinaryTypeW: Pointer;
+
+function GetBinaryTypeW;
+begin
+ GetProcedureAddress(_GetBinaryTypeW, kernel32, 'GetBinaryTypeW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetBinaryTypeW]
+ end;
+end;
+
+var
+ _GetBinaryType: Pointer;
+
+function GetBinaryType;
+begin
+ GetProcedureAddress(_GetBinaryType, kernel32, 'GetBinaryType' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetBinaryType]
+ end;
+end;
+
+var
+ _GetShortPathNameA: Pointer;
+
+function GetShortPathNameA;
+begin
+ GetProcedureAddress(_GetShortPathNameA, kernel32, 'GetShortPathNameA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetShortPathNameA]
+ end;
+end;
+
+var
+ _GetShortPathNameW: Pointer;
+
+function GetShortPathNameW;
+begin
+ GetProcedureAddress(_GetShortPathNameW, kernel32, 'GetShortPathNameW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetShortPathNameW]
+ end;
+end;
+
+var
+ _GetShortPathName: Pointer;
+
+function GetShortPathName;
+begin
+ GetProcedureAddress(_GetShortPathName, kernel32, 'GetShortPathName' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetShortPathName]
+ end;
+end;
+
+var
+ _GetLongPathNameA: Pointer;
+
+function GetLongPathNameA;
+begin
+ GetProcedureAddress(_GetLongPathNameA, kernel32, 'GetLongPathNameA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetLongPathNameA]
+ end;
+end;
+
+var
+ _GetLongPathNameW: Pointer;
+
+function GetLongPathNameW;
+begin
+ GetProcedureAddress(_GetLongPathNameW, kernel32, 'GetLongPathNameW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetLongPathNameW]
+ end;
+end;
+
+var
+ _GetLongPathName: Pointer;
+
+function GetLongPathName;
+begin
+ GetProcedureAddress(_GetLongPathName, kernel32, 'GetLongPathName' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetLongPathName]
+ end;
+end;
+
+var
+ _GetProcessAffinityMask: Pointer;
+
+function GetProcessAffinityMask;
+begin
+ GetProcedureAddress(_GetProcessAffinityMask, kernel32, 'GetProcessAffinityMask');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetProcessAffinityMask]
+ end;
+end;
+
+var
+ _SetProcessAffinityMask: Pointer;
+
+function SetProcessAffinityMask;
+begin
+ GetProcedureAddress(_SetProcessAffinityMask, kernel32, 'SetProcessAffinityMask');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetProcessAffinityMask]
+ end;
+end;
+
+var
+ _GetProcessHandleCount: Pointer;
+
+function GetProcessHandleCount;
+begin
+ GetProcedureAddress(_GetProcessHandleCount, kernel32, 'GetProcessHandleCount');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetProcessHandleCount]
+ end;
+end;
+
+var
+ _GetProcessTimes: Pointer;
+
+function GetProcessTimes;
+begin
+ GetProcedureAddress(_GetProcessTimes, kernel32, 'GetProcessTimes');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetProcessTimes]
+ end;
+end;
+
+var
+ _GetProcessIoCounters: Pointer;
+
+function GetProcessIoCounters;
+begin
+ GetProcedureAddress(_GetProcessIoCounters, kernel32, 'GetProcessIoCounters');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetProcessIoCounters]
+ end;
+end;
+
+var
+ _GetProcessWorkingSetSize: Pointer;
+
+function GetProcessWorkingSetSize;
+begin
+ GetProcedureAddress(_GetProcessWorkingSetSize, kernel32, 'GetProcessWorkingSetSize');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetProcessWorkingSetSize]
+ end;
+end;
+
+var
+ _GetProcessWorkingSetSizeEx: Pointer;
+
+function GetProcessWorkingSetSizeEx;
+begin
+ GetProcedureAddress(_GetProcessWorkingSetSizeEx, kernel32, 'GetProcessWorkingSetSizeEx');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetProcessWorkingSetSizeEx]
+ end;
+end;
+
+var
+ _SetProcessWorkingSetSize: Pointer;
+
+function SetProcessWorkingSetSize;
+begin
+ GetProcedureAddress(_SetProcessWorkingSetSize, kernel32, 'SetProcessWorkingSetSize');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetProcessWorkingSetSize]
+ end;
+end;
+
+var
+ _SetProcessWorkingSetSizeEx: Pointer;
+
+function SetProcessWorkingSetSizeEx;
+begin
+ GetProcedureAddress(_SetProcessWorkingSetSizeEx, kernel32, 'SetProcessWorkingSetSizeEx');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetProcessWorkingSetSizeEx]
+ end;
+end;
+
+var
+ _OpenProcess: Pointer;
+
+function OpenProcess;
+begin
+ GetProcedureAddress(_OpenProcess, kernel32, 'OpenProcess');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_OpenProcess]
+ end;
+end;
+
+var
+ _GetCurrentProcess: Pointer;
+
+function GetCurrentProcess;
+begin
+ GetProcedureAddress(_GetCurrentProcess, kernel32, 'GetCurrentProcess');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetCurrentProcess]
+ end;
+end;
+
+var
+ _GetCurrentProcessId: Pointer;
+
+function GetCurrentProcessId;
+begin
+ GetProcedureAddress(_GetCurrentProcessId, kernel32, 'GetCurrentProcessId');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetCurrentProcessId]
+ end;
+end;
+
+var
+ _ExitProcess: Pointer;
+
+procedure ExitProcess;
+begin
+ GetProcedureAddress(_ExitProcess, kernel32, 'ExitProcess');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ExitProcess]
+ end;
+end;
+
+var
+ _TerminateProcess: Pointer;
+
+function TerminateProcess;
+begin
+ GetProcedureAddress(_TerminateProcess, kernel32, 'TerminateProcess');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_TerminateProcess]
+ end;
+end;
+
+var
+ _GetExitCodeProcess: Pointer;
+
+function GetExitCodeProcess;
+begin
+ GetProcedureAddress(_GetExitCodeProcess, kernel32, 'GetExitCodeProcess');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetExitCodeProcess]
+ end;
+end;
+
+var
+ _FatalExit: Pointer;
+
+procedure FatalExit;
+begin
+ GetProcedureAddress(_FatalExit, kernel32, 'FatalExit');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_FatalExit]
+ end;
+end;
+
+var
+ _GetEnvironmentStringsW: Pointer;
+
+function GetEnvironmentStringsW;
+begin
+ GetProcedureAddress(_GetEnvironmentStringsW, kernel32, 'GetEnvironmentStringsW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetEnvironmentStringsW]
+ end;
+end;
+
+var
+ _GetEnvironmentStrings: Pointer;
+
+function GetEnvironmentStrings;
+begin
+ GetProcedureAddress(_GetEnvironmentStrings, kernel32, 'GetEnvironmentStrings' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetEnvironmentStrings]
+ end;
+end;
+
+{$IFNDEF UNICODE}
+
+var
+ _GetEnvironmentStringsA: Pointer;
+
+function GetEnvironmentStringsA;
+begin
+ GetProcedureAddress(_GetEnvironmentStringsA, kernel32, 'GetEnvironmentStringsA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetEnvironmentStringsA]
+ end;
+end;
+
+{$ENDIF !UNICODE}
+
+var
+ _SetEnvironmentStringsA: Pointer;
+
+function SetEnvironmentStringsA;
+begin
+ GetProcedureAddress(_SetEnvironmentStringsA, kernel32, 'SetEnvironmentStringsA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetEnvironmentStringsA]
+ end;
+end;
+
+var
+ _SetEnvironmentStringsW: Pointer;
+
+function SetEnvironmentStringsW;
+begin
+ GetProcedureAddress(_SetEnvironmentStringsW, kernel32, 'SetEnvironmentStringsW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetEnvironmentStringsW]
+ end;
+end;
+
+var
+ _SetEnvironmentStrings: Pointer;
+
+function SetEnvironmentStrings;
+begin
+ GetProcedureAddress(_SetEnvironmentStrings, kernel32, 'SetEnvironmentStrings' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetEnvironmentStrings]
+ end;
+end;
+
+var
+ _FreeEnvironmentStringsA: Pointer;
+
+function FreeEnvironmentStringsA;
+begin
+ GetProcedureAddress(_FreeEnvironmentStringsA, kernel32, 'FreeEnvironmentStringsA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_FreeEnvironmentStringsA]
+ end;
+end;
+
+var
+ _FreeEnvironmentStringsW: Pointer;
+
+function FreeEnvironmentStringsW;
+begin
+ GetProcedureAddress(_FreeEnvironmentStringsW, kernel32, 'FreeEnvironmentStringsW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_FreeEnvironmentStringsW]
+ end;
+end;
+
+var
+ _FreeEnvironmentStrings: Pointer;
+
+function FreeEnvironmentStrings;
+begin
+ GetProcedureAddress(_FreeEnvironmentStrings, kernel32, 'FreeEnvironmentStrings' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_FreeEnvironmentStrings]
+ end;
+end;
+
+var
+ _RaiseException: Pointer;
+
+procedure RaiseException;
+begin
+ GetProcedureAddress(_RaiseException, kernel32, 'RaiseException');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RaiseException]
+ end;
+end;
+
+var
+ _UnhandledExceptionFilter: Pointer;
+
+function UnhandledExceptionFilter;
+begin
+ GetProcedureAddress(_UnhandledExceptionFilter, kernel32, 'UnhandledExceptionFilter');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_UnhandledExceptionFilter]
+ end;
+end;
+
+var
+ _SetUnhandledExceptionFilter: Pointer;
+
+function SetUnhandledExceptionFilter;
+begin
+ GetProcedureAddress(_SetUnhandledExceptionFilter, kernel32, 'SetUnhandledExceptionFilter');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetUnhandledExceptionFilter]
+ end;
+end;
+
+var
+ _CreateFiber: Pointer;
+
+function CreateFiber;
+begin
+ GetProcedureAddress(_CreateFiber, kernel32, 'CreateFiber');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreateFiber]
+ end;
+end;
+
+var
+ _CreateFiberEx: Pointer;
+
+function CreateFiberEx;
+begin
+ GetProcedureAddress(_CreateFiberEx, kernel32, 'CreateFiberEx');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreateFiberEx]
+ end;
+end;
+
+var
+ _DeleteFiber: Pointer;
+
+procedure DeleteFiber;
+begin
+ GetProcedureAddress(_DeleteFiber, kernel32, 'DeleteFiber');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DeleteFiber]
+ end;
+end;
+
+var
+ _ConvertThreadToFiber: Pointer;
+
+function ConvertThreadToFiber;
+begin
+ GetProcedureAddress(_ConvertThreadToFiber, kernel32, 'ConvertThreadToFiber');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ConvertThreadToFiber]
+ end;
+end;
+
+var
+ _ConvertThreadToFiberEx: Pointer;
+
+function ConvertThreadToFiberEx;
+begin
+ GetProcedureAddress(_ConvertThreadToFiberEx, kernel32, 'ConvertThreadToFiberEx');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ConvertThreadToFiberEx]
+ end;
+end;
+
+var
+ _ConvertFiberToThread: Pointer;
+
+function ConvertFiberToThread;
+begin
+ GetProcedureAddress(_ConvertFiberToThread, kernel32, 'ConvertFiberToThread');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ConvertFiberToThread]
+ end;
+end;
+
+var
+ _SwitchToFiber: Pointer;
+
+procedure SwitchToFiber;
+begin
+ GetProcedureAddress(_SwitchToFiber, kernel32, 'SwitchToFiber');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SwitchToFiber]
+ end;
+end;
+
+var
+ _SwitchToThread: Pointer;
+
+function SwitchToThread;
+begin
+ GetProcedureAddress(_SwitchToThread, kernel32, 'SwitchToThread');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SwitchToThread]
+ end;
+end;
+
+var
+ _CreateThread: Pointer;
+
+function CreateThread;
+begin
+ GetProcedureAddress(_CreateThread, kernel32, 'CreateThread');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreateThread]
+ end;
+end;
+
+var
+ _CreateRemoteThread: Pointer;
+
+function CreateRemoteThread;
+begin
+ GetProcedureAddress(_CreateRemoteThread, kernel32, 'CreateRemoteThread');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreateRemoteThread]
+ end;
+end;
+
+var
+ _GetCurrentThread: Pointer;
+
+function GetCurrentThread;
+begin
+ GetProcedureAddress(_GetCurrentThread, kernel32, 'GetCurrentThread');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetCurrentThread]
+ end;
+end;
+
+var
+ _GetCurrentThreadId: Pointer;
+
+function GetCurrentThreadId;
+begin
+ GetProcedureAddress(_GetCurrentThreadId, kernel32, 'GetCurrentThreadId');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetCurrentThreadId]
+ end;
+end;
+
+var
+ _GetProcessIdOfThread: Pointer;
+
+function GetProcessIdOfThread;
+begin
+ GetProcedureAddress(_GetProcessIdOfThread, kernel32, 'GetProcessIdOfThread');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetProcessIdOfThread]
+ end;
+end;
+
+var
+ _GetThreadId: Pointer;
+
+function GetThreadId;
+begin
+ GetProcedureAddress(_GetThreadId, kernel32, 'GetThreadId');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetThreadId]
+ end;
+end;
+
+var
+ _GetProcessId: Pointer;
+
+function GetProcessId;
+begin
+ GetProcedureAddress(_GetProcessId, kernel32, 'GetProcessId');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetProcessId]
+ end;
+end;
+
+var
+ _GetCurrentProcessorNumber: Pointer;
+
+function GetCurrentProcessorNumber;
+begin
+ GetProcedureAddress(_GetCurrentProcessorNumber, kernel32, 'GetCurrentProcessorNumber');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetCurrentProcessorNumber]
+ end;
+end;
+
+var
+ _SetThreadAffinityMask: Pointer;
+
+function SetThreadAffinityMask;
+begin
+ GetProcedureAddress(_SetThreadAffinityMask, kernel32, 'SetThreadAffinityMask');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetThreadAffinityMask]
+ end;
+end;
+
+var
+ _SetThreadIdealProcessor: Pointer;
+
+function SetThreadIdealProcessor;
+begin
+ GetProcedureAddress(_SetThreadIdealProcessor, kernel32, 'SetThreadIdealProcessor');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetThreadIdealProcessor]
+ end;
+end;
+
+var
+ _SetProcessPriorityBoost: Pointer;
+
+function SetProcessPriorityBoost;
+begin
+ GetProcedureAddress(_SetProcessPriorityBoost, kernel32, 'SetProcessPriorityBoost');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetProcessPriorityBoost]
+ end;
+end;
+
+var
+ _GetProcessPriorityBoost: Pointer;
+
+function GetProcessPriorityBoost;
+begin
+ GetProcedureAddress(_GetProcessPriorityBoost, kernel32, 'GetProcessPriorityBoost');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetProcessPriorityBoost]
+ end;
+end;
+
+var
+ _RequestWakeupLatency: Pointer;
+
+function RequestWakeupLatency;
+begin
+ GetProcedureAddress(_RequestWakeupLatency, kernel32, 'RequestWakeupLatency');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RequestWakeupLatency]
+ end;
+end;
+
+var
+ _IsSystemResumeAutomatic: Pointer;
+
+function IsSystemResumeAutomatic;
+begin
+ GetProcedureAddress(_IsSystemResumeAutomatic, kernel32, 'IsSystemResumeAutomatic');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_IsSystemResumeAutomatic]
+ end;
+end;
+
+var
+ _OpenThread: Pointer;
+
+function OpenThread;
+begin
+ GetProcedureAddress(_OpenThread, kernel32, 'OpenThread');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_OpenThread]
+ end;
+end;
+
+var
+ _SetThreadPriority: Pointer;
+
+function SetThreadPriority;
+begin
+ GetProcedureAddress(_SetThreadPriority, kernel32, 'SetThreadPriority');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetThreadPriority]
+ end;
+end;
+
+var
+ _SetThreadPriorityBoost: Pointer;
+
+function SetThreadPriorityBoost;
+begin
+ GetProcedureAddress(_SetThreadPriorityBoost, kernel32, 'SetThreadPriorityBoost');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetThreadPriorityBoost]
+ end;
+end;
+
+var
+ _GetThreadPriorityBoost: Pointer;
+
+function GetThreadPriorityBoost;
+begin
+ GetProcedureAddress(_GetThreadPriorityBoost, kernel32, 'GetThreadPriorityBoost');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetThreadPriorityBoost]
+ end;
+end;
+
+var
+ _GetThreadPriority: Pointer;
+
+function GetThreadPriority;
+begin
+ GetProcedureAddress(_GetThreadPriority, kernel32, 'GetThreadPriority');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetThreadPriority]
+ end;
+end;
+
+var
+ _GetThreadTimes: Pointer;
+
+function GetThreadTimes;
+begin
+ GetProcedureAddress(_GetThreadTimes, kernel32, 'GetThreadTimes');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetThreadTimes]
+ end;
+end;
+
+var
+ _GetThreadIOPendingFlag: Pointer;
+
+function GetThreadIOPendingFlag;
+begin
+ GetProcedureAddress(_GetThreadIOPendingFlag, kernel32, 'GetThreadIOPendingFlag');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetThreadIOPendingFlag]
+ end;
+end;
+
+var
+ _ExitThread: Pointer;
+
+procedure ExitThread;
+begin
+ GetProcedureAddress(_ExitThread, kernel32, 'ExitThread');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ExitThread]
+ end;
+end;
+
+var
+ _TerminateThread: Pointer;
+
+function TerminateThread;
+begin
+ GetProcedureAddress(_TerminateThread, kernel32, 'TerminateThread');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_TerminateThread]
+ end;
+end;
+
+var
+ _GetExitCodeThread: Pointer;
+
+function GetExitCodeThread;
+begin
+ GetProcedureAddress(_GetExitCodeThread, kernel32, 'GetExitCodeThread');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetExitCodeThread]
+ end;
+end;
+
+var
+ _GetThreadSelectorEntry: Pointer;
+
+function GetThreadSelectorEntry;
+begin
+ GetProcedureAddress(_GetThreadSelectorEntry, kernel32, 'GetThreadSelectorEntry');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetThreadSelectorEntry]
+ end;
+end;
+
+var
+ _SetThreadExecutionState: Pointer;
+
+function SetThreadExecutionState;
+begin
+ GetProcedureAddress(_SetThreadExecutionState, kernel32, 'SetThreadExecutionState');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetThreadExecutionState]
+ end;
+end;
+
+var
+ _GetLastError: Pointer;
+
+function GetLastError;
+begin
+ GetProcedureAddress(_GetLastError, kernel32, 'GetLastError');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetLastError]
+ end;
+end;
+
+var
+ _SetLastError: Pointer;
+
+procedure SetLastError;
+begin
+ GetProcedureAddress(_SetLastError, kernel32, 'SetLastError');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetLastError]
+ end;
+end;
+
+var
+ _RestoreLastError: Pointer;
+
+procedure RestoreLastError;
+begin
+ GetProcedureAddress(_RestoreLastError, kernel32, 'RestoreLastError');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RestoreLastError]
+ end;
+end;
+
+var
+ _GetOverlappedResult: Pointer;
+
+function GetOverlappedResult;
+begin
+ GetProcedureAddress(_GetOverlappedResult, kernel32, 'GetOverlappedResult');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetOverlappedResult]
+ end;
+end;
+
+var
+ _CreateIoCompletionPort: Pointer;
+
+function CreateIoCompletionPort;
+begin
+ GetProcedureAddress(_CreateIoCompletionPort, kernel32, 'CreateIoCompletionPort');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreateIoCompletionPort]
+ end;
+end;
+
+var
+ _GetQueuedCompletionStatus: Pointer;
+
+function GetQueuedCompletionStatus;
+begin
+ GetProcedureAddress(_GetQueuedCompletionStatus, kernel32, 'GetQueuedCompletionStatus');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetQueuedCompletionStatus]
+ end;
+end;
+
+var
+ _PostQueuedCompletionStatus: Pointer;
+
+function PostQueuedCompletionStatus;
+begin
+ GetProcedureAddress(_PostQueuedCompletionStatus, kernel32, 'PostQueuedCompletionStatus');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PostQueuedCompletionStatus]
+ end;
+end;
+
+var
+ _SetErrorMode: Pointer;
+
+function SetErrorMode;
+begin
+ GetProcedureAddress(_SetErrorMode, kernel32, 'SetErrorMode');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetErrorMode]
+ end;
+end;
+
+var
+ _ReadProcessMemory: Pointer;
+
+function ReadProcessMemory;
+begin
+ GetProcedureAddress(_ReadProcessMemory, kernel32, 'ReadProcessMemory');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ReadProcessMemory]
+ end;
+end;
+
+var
+ _WriteProcessMemory: Pointer;
+
+function WriteProcessMemory;
+begin
+ GetProcedureAddress(_WriteProcessMemory, kernel32, 'WriteProcessMemory');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WriteProcessMemory]
+ end;
+end;
+
+var
+ _GetThreadContext: Pointer;
+
+function GetThreadContext;
+begin
+ GetProcedureAddress(_GetThreadContext, kernel32, 'GetThreadContext');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetThreadContext]
+ end;
+end;
+
+var
+ _SetThreadContext: Pointer;
+
+function SetThreadContext;
+begin
+ GetProcedureAddress(_SetThreadContext, kernel32, 'SetThreadContext');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetThreadContext]
+ end;
+end;
+
+var
+ _SuspendThread: Pointer;
+
+function SuspendThread;
+begin
+ GetProcedureAddress(_SuspendThread, kernel32, 'SuspendThread');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SuspendThread]
+ end;
+end;
+
+var
+ _ResumeThread: Pointer;
+
+function ResumeThread;
+begin
+ GetProcedureAddress(_ResumeThread, kernel32, 'ResumeThread');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ResumeThread]
+ end;
+end;
+
+var
+ _QueueUserAPC: Pointer;
+
+function QueueUserAPC;
+begin
+ GetProcedureAddress(_QueueUserAPC, kernel32, 'QueueUserAPC');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_QueueUserAPC]
+ end;
+end;
+
+var
+ _IsDebuggerPresent: Pointer;
+
+function IsDebuggerPresent;
+begin
+ GetProcedureAddress(_IsDebuggerPresent, kernel32, 'IsDebuggerPresent');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_IsDebuggerPresent]
+ end;
+end;
+
+var
+ _CheckRemoteDebuggerPresent: Pointer;
+
+function CheckRemoteDebuggerPresent;
+begin
+ GetProcedureAddress(_CheckRemoteDebuggerPresent, kernel32, 'CheckRemoteDebuggerPresent');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CheckRemoteDebuggerPresent]
+ end;
+end;
+
+var
+ _DebugBreak: Pointer;
+
+procedure DebugBreak;
+begin
+ GetProcedureAddress(_DebugBreak, kernel32, 'DebugBreak');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DebugBreak]
+ end;
+end;
+
+var
+ _WaitForDebugEvent: Pointer;
+
+function WaitForDebugEvent;
+begin
+ GetProcedureAddress(_WaitForDebugEvent, kernel32, 'WaitForDebugEvent');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WaitForDebugEvent]
+ end;
+end;
+
+var
+ _ContinueDebugEvent: Pointer;
+
+function ContinueDebugEvent;
+begin
+ GetProcedureAddress(_ContinueDebugEvent, kernel32, 'ContinueDebugEvent');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ContinueDebugEvent]
+ end;
+end;
+
+var
+ _DebugActiveProcess: Pointer;
+
+function DebugActiveProcess;
+begin
+ GetProcedureAddress(_DebugActiveProcess, kernel32, 'DebugActiveProcess');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DebugActiveProcess]
+ end;
+end;
+
+var
+ _DebugActiveProcessStop: Pointer;
+
+function DebugActiveProcessStop;
+begin
+ GetProcedureAddress(_DebugActiveProcessStop, kernel32, 'DebugActiveProcessStop');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DebugActiveProcessStop]
+ end;
+end;
+
+var
+ _DebugSetProcessKillOnExit: Pointer;
+
+function DebugSetProcessKillOnExit;
+begin
+ GetProcedureAddress(_DebugSetProcessKillOnExit, kernel32, 'DebugSetProcessKillOnExit');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DebugSetProcessKillOnExit]
+ end;
+end;
+
+var
+ _DebugBreakProcess: Pointer;
+
+function DebugBreakProcess;
+begin
+ GetProcedureAddress(_DebugBreakProcess, kernel32, 'DebugBreakProcess');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DebugBreakProcess]
+ end;
+end;
+
+var
+ _InitializeCriticalSection: Pointer;
+
+procedure InitializeCriticalSection;
+begin
+ GetProcedureAddress(_InitializeCriticalSection, kernel32, 'InitializeCriticalSection');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_InitializeCriticalSection]
+ end;
+end;
+
+var
+ _EnterCriticalSection: Pointer;
+
+procedure EnterCriticalSection;
+begin
+ GetProcedureAddress(_EnterCriticalSection, kernel32, 'EnterCriticalSection');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_EnterCriticalSection]
+ end;
+end;
+
+var
+ _LeaveCriticalSection: Pointer;
+
+procedure LeaveCriticalSection;
+begin
+ GetProcedureAddress(_LeaveCriticalSection, kernel32, 'LeaveCriticalSection');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_LeaveCriticalSection]
+ end;
+end;
+
+var
+ _InitCritSectAndSpinCount: Pointer;
+
+function InitializeCriticalSectionAndSpinCount;
+begin
+ GetProcedureAddress(_InitCritSectAndSpinCount, kernel32, 'InitializeCriticalSectionAndSpinCount');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_InitCritSectAndSpinCount]
+ end;
+end;
+
+var
+ _SetCriticalSectionSpinCount: Pointer;
+
+function SetCriticalSectionSpinCount;
+begin
+ GetProcedureAddress(_SetCriticalSectionSpinCount, kernel32, 'SetCriticalSectionSpinCount');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetCriticalSectionSpinCount]
+ end;
+end;
+
+var
+ _TryEnterCriticalSection: Pointer;
+
+function TryEnterCriticalSection;
+begin
+ GetProcedureAddress(_TryEnterCriticalSection, kernel32, 'TryEnterCriticalSection');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_TryEnterCriticalSection]
+ end;
+end;
+
+var
+ _DeleteCriticalSection: Pointer;
+
+procedure DeleteCriticalSection;
+begin
+ GetProcedureAddress(_DeleteCriticalSection, kernel32, 'DeleteCriticalSection');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DeleteCriticalSection]
+ end;
+end;
+
+var
+ _SetEvent: Pointer;
+
+function SetEvent;
+begin
+ GetProcedureAddress(_SetEvent, kernel32, 'SetEvent');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetEvent]
+ end;
+end;
+
+var
+ _ResetEvent: Pointer;
+
+function ResetEvent;
+begin
+ GetProcedureAddress(_ResetEvent, kernel32, 'ResetEvent');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ResetEvent]
+ end;
+end;
+
+var
+ _PulseEvent: Pointer;
+
+function PulseEvent;
+begin
+ GetProcedureAddress(_PulseEvent, kernel32, 'PulseEvent');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PulseEvent]
+ end;
+end;
+
+var
+ _ReleaseSemaphore: Pointer;
+
+function ReleaseSemaphore;
+begin
+ GetProcedureAddress(_ReleaseSemaphore, kernel32, 'ReleaseSemaphore');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ReleaseSemaphore]
+ end;
+end;
+
+var
+ _ReleaseMutex: Pointer;
+
+function ReleaseMutex;
+begin
+ GetProcedureAddress(_ReleaseMutex, kernel32, 'ReleaseMutex');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ReleaseMutex]
+ end;
+end;
+
+var
+ _WaitForSingleObject: Pointer;
+
+function WaitForSingleObject;
+begin
+ GetProcedureAddress(_WaitForSingleObject, kernel32, 'WaitForSingleObject');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WaitForSingleObject]
+ end;
+end;
+
+var
+ _WaitForMultipleObjects: Pointer;
+
+function WaitForMultipleObjects;
+begin
+ GetProcedureAddress(_WaitForMultipleObjects, kernel32, 'WaitForMultipleObjects');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WaitForMultipleObjects]
+ end;
+end;
+
+var
+ _Sleep: Pointer;
+
+procedure Sleep;
+begin
+ GetProcedureAddress(_Sleep, kernel32, 'Sleep');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_Sleep]
+ end;
+end;
+
+var
+ _LoadResource: Pointer;
+
+function LoadResource;
+begin
+ GetProcedureAddress(_LoadResource, kernel32, 'LoadResource');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_LoadResource]
+ end;
+end;
+
+var
+ _SizeofResource: Pointer;
+
+function SizeofResource;
+begin
+ GetProcedureAddress(_SizeofResource, kernel32, 'SizeofResource');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SizeofResource]
+ end;
+end;
+
+var
+ _GlobalDeleteAtom: Pointer;
+
+function GlobalDeleteAtom;
+begin
+ GetProcedureAddress(_GlobalDeleteAtom, kernel32, 'GlobalDeleteAtom');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GlobalDeleteAtom]
+ end;
+end;
+
+var
+ _InitAtomTable: Pointer;
+
+function InitAtomTable;
+begin
+ GetProcedureAddress(_InitAtomTable, kernel32, 'InitAtomTable');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_InitAtomTable]
+ end;
+end;
+
+var
+ _DeleteAtom: Pointer;
+
+function DeleteAtom;
+begin
+ GetProcedureAddress(_DeleteAtom, kernel32, 'DeleteAtom');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DeleteAtom]
+ end;
+end;
+
+var
+ _SetHandleCount: Pointer;
+
+function SetHandleCount;
+begin
+ GetProcedureAddress(_SetHandleCount, kernel32, 'SetHandleCount');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetHandleCount]
+ end;
+end;
+
+var
+ _GetLogicalDrives: Pointer;
+
+function GetLogicalDrives;
+begin
+ GetProcedureAddress(_GetLogicalDrives, kernel32, 'GetLogicalDrives');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetLogicalDrives]
+ end;
+end;
+
+var
+ _LockFile: Pointer;
+
+function LockFile;
+begin
+ GetProcedureAddress(_LockFile, kernel32, 'LockFile');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_LockFile]
+ end;
+end;
+
+var
+ _UnlockFile: Pointer;
+
+function UnlockFile;
+begin
+ GetProcedureAddress(_UnlockFile, kernel32, 'UnlockFile');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_UnlockFile]
+ end;
+end;
+
+var
+ _LockFileEx: Pointer;
+
+function LockFileEx;
+begin
+ GetProcedureAddress(_LockFileEx, kernel32, 'LockFileEx');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_LockFileEx]
+ end;
+end;
+
+var
+ _UnlockFileEx: Pointer;
+
+function UnlockFileEx;
+begin
+ GetProcedureAddress(_UnlockFileEx, kernel32, 'UnlockFileEx');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_UnlockFileEx]
+ end;
+end;
+
+var
+ _GetFileInformationByHandle: Pointer;
+
+function GetFileInformationByHandle;
+begin
+ GetProcedureAddress(_GetFileInformationByHandle, kernel32, 'GetFileInformationByHandle');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetFileInformationByHandle]
+ end;
+end;
+
+var
+ _GetFileType: Pointer;
+
+function GetFileType;
+begin
+ GetProcedureAddress(_GetFileType, kernel32, 'GetFileType');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetFileType]
+ end;
+end;
+
+var
+ _GetFileSize: Pointer;
+
+function GetFileSize;
+begin
+ GetProcedureAddress(_GetFileSize, kernel32, 'GetFileSize');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetFileSize]
+ end;
+end;
+
+var
+ _GetFileSizeEx: Pointer;
+
+function GetFileSizeEx;
+begin
+ GetProcedureAddress(_GetFileSizeEx, kernel32, 'GetFileSizeEx');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetFileSizeEx]
+ end;
+end;
+
+var
+ _GetStdHandle: Pointer;
+
+function GetStdHandle;
+begin
+ GetProcedureAddress(_GetStdHandle, kernel32, 'GetStdHandle');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetStdHandle]
+ end;
+end;
+
+var
+ _SetStdHandle: Pointer;
+
+function SetStdHandle;
+begin
+ GetProcedureAddress(_SetStdHandle, kernel32, 'SetStdHandle');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetStdHandle]
+ end;
+end;
+
+var
+ _WriteFile: Pointer;
+
+function WriteFile;
+begin
+ GetProcedureAddress(_WriteFile, kernel32, 'WriteFile');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WriteFile]
+ end;
+end;
+
+var
+ _ReadFile: Pointer;
+
+function ReadFile;
+begin
+ GetProcedureAddress(_ReadFile, kernel32, 'ReadFile');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ReadFile]
+ end;
+end;
+
+var
+ _FlushFileBuffers: Pointer;
+
+function FlushFileBuffers;
+begin
+ GetProcedureAddress(_FlushFileBuffers, kernel32, 'FlushFileBuffers');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_FlushFileBuffers]
+ end;
+end;
+
+var
+ _DeviceIoControl: Pointer;
+
+function DeviceIoControl;
+begin
+ GetProcedureAddress(_DeviceIoControl, kernel32, 'DeviceIoControl');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DeviceIoControl]
+ end;
+end;
+
+var
+ _RequestDeviceWakeup: Pointer;
+
+function RequestDeviceWakeup;
+begin
+ GetProcedureAddress(_RequestDeviceWakeup, kernel32, 'RequestDeviceWakeup');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RequestDeviceWakeup]
+ end;
+end;
+
+var
+ _CancelDeviceWakeupRequest: Pointer;
+
+function CancelDeviceWakeupRequest;
+begin
+ GetProcedureAddress(_CancelDeviceWakeupRequest, kernel32, 'CancelDeviceWakeupRequest');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CancelDeviceWakeupRequest]
+ end;
+end;
+
+var
+ _GetDevicePowerState: Pointer;
+
+function GetDevicePowerState;
+begin
+ GetProcedureAddress(_GetDevicePowerState, kernel32, 'GetDevicePowerState');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetDevicePowerState]
+ end;
+end;
+
+var
+ _SetMessageWaitingIndicator: Pointer;
+
+function SetMessageWaitingIndicator;
+begin
+ GetProcedureAddress(_SetMessageWaitingIndicator, kernel32, 'SetMessageWaitingIndicator');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetMessageWaitingIndicator]
+ end;
+end;
+
+var
+ _SetEndOfFile: Pointer;
+
+function SetEndOfFile;
+begin
+ GetProcedureAddress(_SetEndOfFile, kernel32, 'SetEndOfFile');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetEndOfFile]
+ end;
+end;
+
+var
+ _SetFilePointer: Pointer;
+
+function SetFilePointer;
+begin
+ GetProcedureAddress(_SetFilePointer, kernel32, 'SetFilePointer');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetFilePointer]
+ end;
+end;
+
+var
+ _SetFilePointerEx: Pointer;
+
+function SetFilePointerEx;
+begin
+ GetProcedureAddress(_SetFilePointerEx, kernel32, 'SetFilePointerEx');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetFilePointerEx]
+ end;
+end;
+
+var
+ _FindClose: Pointer;
+
+function FindClose;
+begin
+ GetProcedureAddress(_FindClose, kernel32, 'FindClose');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_FindClose]
+ end;
+end;
+
+var
+ _GetFileTime: Pointer;
+
+function GetFileTime;
+begin
+ GetProcedureAddress(_GetFileTime, kernel32, 'GetFileTime');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetFileTime]
+ end;
+end;
+
+var
+ _SetFileTime: Pointer;
+
+function SetFileTime;
+begin
+ GetProcedureAddress(_SetFileTime, kernel32, 'SetFileTime');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetFileTime]
+ end;
+end;
+
+var
+ _SetFileValidData: Pointer;
+
+function SetFileValidData;
+begin
+ GetProcedureAddress(_SetFileValidData, kernel32, 'SetFileValidData');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetFileValidData]
+ end;
+end;
+
+var
+ _SetFileShortNameA: Pointer;
+
+function SetFileShortNameA;
+begin
+ GetProcedureAddress(_SetFileShortNameA, kernel32, 'SetFileShortNameA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetFileShortNameA]
+ end;
+end;
+
+var
+ _SetFileShortNameW: Pointer;
+
+function SetFileShortNameW;
+begin
+ GetProcedureAddress(_SetFileShortNameW, kernel32, 'SetFileShortNameW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetFileShortNameW]
+ end;
+end;
+
+var
+ _SetFileShortName: Pointer;
+
+function SetFileShortName;
+begin
+ GetProcedureAddress(_SetFileShortName, kernel32, 'SetFileShortName' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetFileShortName]
+ end;
+end;
+
+var
+ _CloseHandle: Pointer;
+
+function CloseHandle;
+begin
+ GetProcedureAddress(_CloseHandle, kernel32, 'CloseHandle');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CloseHandle]
+ end;
+end;
+
+var
+ _DuplicateHandle: Pointer;
+
+function DuplicateHandle;
+begin
+ GetProcedureAddress(_DuplicateHandle, kernel32, 'DuplicateHandle');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DuplicateHandle]
+ end;
+end;
+
+var
+ _GetHandleInformation: Pointer;
+
+function GetHandleInformation;
+begin
+ GetProcedureAddress(_GetHandleInformation, kernel32, 'GetHandleInformation');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetHandleInformation]
+ end;
+end;
+
+var
+ _SetHandleInformation: Pointer;
+
+function SetHandleInformation;
+begin
+ GetProcedureAddress(_SetHandleInformation, kernel32, 'SetHandleInformation');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetHandleInformation]
+ end;
+end;
+
+var
+ _LoadModule: Pointer;
+
+function LoadModule;
+begin
+ GetProcedureAddress(_LoadModule, kernel32, 'LoadModule');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_LoadModule]
+ end;
+end;
+
+var
+ _WinExec: Pointer;
+
+function WinExec;
+begin
+ GetProcedureAddress(_WinExec, kernel32, 'WinExec');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WinExec]
+ end;
+end;
+
+var
+ _ClearCommBreak: Pointer;
+
+function ClearCommBreak;
+begin
+ GetProcedureAddress(_ClearCommBreak, kernel32, 'ClearCommBreak');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ClearCommBreak]
+ end;
+end;
+
+var
+ _ClearCommError: Pointer;
+
+function ClearCommError;
+begin
+ GetProcedureAddress(_ClearCommError, kernel32, 'ClearCommError');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ClearCommError]
+ end;
+end;
+
+var
+ _SetupComm: Pointer;
+
+function SetupComm;
+begin
+ GetProcedureAddress(_SetupComm, kernel32, 'SetupComm');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetupComm]
+ end;
+end;
+
+var
+ _EscapeCommFunction: Pointer;
+
+function EscapeCommFunction;
+begin
+ GetProcedureAddress(_EscapeCommFunction, kernel32, 'EscapeCommFunction');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_EscapeCommFunction]
+ end;
+end;
+
+var
+ _GetCommConfig: Pointer;
+
+function GetCommConfig;
+begin
+ GetProcedureAddress(_GetCommConfig, kernel32, 'GetCommConfig');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetCommConfig]
+ end;
+end;
+
+var
+ _GetCommMask: Pointer;
+
+function GetCommMask;
+begin
+ GetProcedureAddress(_GetCommMask, kernel32, 'GetCommMask');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetCommMask]
+ end;
+end;
+
+var
+ _GetCommProperties: Pointer;
+
+function GetCommProperties;
+begin
+ GetProcedureAddress(_GetCommProperties, kernel32, 'GetCommProperties');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetCommProperties]
+ end;
+end;
+
+var
+ _GetCommModemStatus: Pointer;
+
+function GetCommModemStatus;
+begin
+ GetProcedureAddress(_GetCommModemStatus, kernel32, 'GetCommModemStatus');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetCommModemStatus]
+ end;
+end;
+
+var
+ _GetCommState: Pointer;
+
+function GetCommState;
+begin
+ GetProcedureAddress(_GetCommState, kernel32, 'GetCommState');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetCommState]
+ end;
+end;
+
+var
+ _GetCommTimeouts: Pointer;
+
+function GetCommTimeouts;
+begin
+ GetProcedureAddress(_GetCommTimeouts, kernel32, 'GetCommTimeouts');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetCommTimeouts]
+ end;
+end;
+
+var
+ _PurgeComm: Pointer;
+
+function PurgeComm;
+begin
+ GetProcedureAddress(_PurgeComm, kernel32, 'PurgeComm');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PurgeComm]
+ end;
+end;
+
+var
+ _SetCommBreak: Pointer;
+
+function SetCommBreak;
+begin
+ GetProcedureAddress(_SetCommBreak, kernel32, 'SetCommBreak');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetCommBreak]
+ end;
+end;
+
+var
+ _SetCommConfig: Pointer;
+
+function SetCommConfig;
+begin
+ GetProcedureAddress(_SetCommConfig, kernel32, 'SetCommConfig');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetCommConfig]
+ end;
+end;
+
+var
+ _SetCommMask: Pointer;
+
+function SetCommMask;
+begin
+ GetProcedureAddress(_SetCommMask, kernel32, 'SetCommMask');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetCommMask]
+ end;
+end;
+
+var
+ _SetCommState: Pointer;
+
+function SetCommState;
+begin
+ GetProcedureAddress(_SetCommState, kernel32, 'SetCommState');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetCommState]
+ end;
+end;
+
+var
+ _SetCommTimeouts: Pointer;
+
+function SetCommTimeouts;
+begin
+ GetProcedureAddress(_SetCommTimeouts, kernel32, 'SetCommTimeouts');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetCommTimeouts]
+ end;
+end;
+
+var
+ _TransmitCommChar: Pointer;
+
+function TransmitCommChar;
+begin
+ GetProcedureAddress(_TransmitCommChar, kernel32, 'TransmitCommChar');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_TransmitCommChar]
+ end;
+end;
+
+var
+ _WaitCommEvent: Pointer;
+
+function WaitCommEvent;
+begin
+ GetProcedureAddress(_WaitCommEvent, kernel32, 'WaitCommEvent');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WaitCommEvent]
+ end;
+end;
+
+var
+ _SetTapePosition: Pointer;
+
+function SetTapePosition;
+begin
+ GetProcedureAddress(_SetTapePosition, kernel32, 'SetTapePosition');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetTapePosition]
+ end;
+end;
+
+var
+ _GetTapePosition: Pointer;
+
+function GetTapePosition;
+begin
+ GetProcedureAddress(_GetTapePosition, kernel32, 'GetTapePosition');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetTapePosition]
+ end;
+end;
+
+var
+ _PrepareTape: Pointer;
+
+function PrepareTape;
+begin
+ GetProcedureAddress(_PrepareTape, kernel32, 'PrepareTape');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PrepareTape]
+ end;
+end;
+
+var
+ _EraseTape: Pointer;
+
+function EraseTape;
+begin
+ GetProcedureAddress(_EraseTape, kernel32, 'EraseTape');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_EraseTape]
+ end;
+end;
+
+var
+ _CreateTapePartition: Pointer;
+
+function CreateTapePartition;
+begin
+ GetProcedureAddress(_CreateTapePartition, kernel32, 'CreateTapePartition');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreateTapePartition]
+ end;
+end;
+
+var
+ _WriteTapemark: Pointer;
+
+function WriteTapemark;
+begin
+ GetProcedureAddress(_WriteTapemark, kernel32, 'WriteTapemark');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WriteTapemark]
+ end;
+end;
+
+var
+ _GetTapeStatus: Pointer;
+
+function GetTapeStatus;
+begin
+ GetProcedureAddress(_GetTapeStatus, kernel32, 'GetTapeStatus');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetTapeStatus]
+ end;
+end;
+
+var
+ _GetTapeParameters: Pointer;
+
+function GetTapeParameters;
+begin
+ GetProcedureAddress(_GetTapeParameters, kernel32, 'GetTapeParameters');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetTapeParameters]
+ end;
+end;
+
+var
+ _SetTapeParameters: Pointer;
+
+function SetTapeParameters;
+begin
+ GetProcedureAddress(_SetTapeParameters, kernel32, 'SetTapeParameters');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetTapeParameters]
+ end;
+end;
+
+var
+ _Beep: Pointer;
+
+function Beep;
+begin
+ GetProcedureAddress(_Beep, kernel32, 'Beep');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_Beep]
+ end;
+end;
+
+var
+ _MulDiv: Pointer;
+
+function MulDiv;
+begin
+ GetProcedureAddress(_MulDiv, kernel32, 'MulDiv');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MulDiv]
+ end;
+end;
+
+var
+ _GetSystemTime: Pointer;
+
+procedure GetSystemTime;
+begin
+ GetProcedureAddress(_GetSystemTime, kernel32, 'GetSystemTime');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetSystemTime]
+ end;
+end;
+
+var
+ _GetSystemTimeAsFileTime: Pointer;
+
+procedure GetSystemTimeAsFileTime;
+begin
+ GetProcedureAddress(_GetSystemTimeAsFileTime, kernel32, 'GetSystemTimeAsFileTime');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetSystemTimeAsFileTime]
+ end;
+end;
+
+var
+ _SetSystemTime: Pointer;
+
+function SetSystemTime;
+begin
+ GetProcedureAddress(_SetSystemTime, kernel32, 'SetSystemTime');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetSystemTime]
+ end;
+end;
+
+var
+ _GetLocalTime: Pointer;
+
+procedure GetLocalTime;
+begin
+ GetProcedureAddress(_GetLocalTime, kernel32, 'GetLocalTime');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetLocalTime]
+ end;
+end;
+
+var
+ _SetLocalTime: Pointer;
+
+function SetLocalTime;
+begin
+ GetProcedureAddress(_SetLocalTime, kernel32, 'SetLocalTime');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetLocalTime]
+ end;
+end;
+
+var
+ _GetSystemInfo: Pointer;
+
+procedure GetSystemInfo;
+begin
+ GetProcedureAddress(_GetSystemInfo, kernel32, 'GetSystemInfo');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetSystemInfo]
+ end;
+end;
+
+var
+ _GetSystemRegistryQuota: Pointer;
+
+function GetSystemRegistryQuota;
+begin
+ GetProcedureAddress(_GetSystemRegistryQuota, kernel32, 'GetSystemRegistryQuota');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetSystemRegistryQuota]
+ end;
+end;
+
+var
+ _GetSystemTimes: Pointer;
+
+function GetSystemTimes;
+begin
+ GetProcedureAddress(_GetSystemTimes, kernel32, 'GetSystemTimes');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetSystemTimes]
+ end;
+end;
+
+var
+ _GetNativeSystemInfo: Pointer;
+
+procedure GetNativeSystemInfo;
+begin
+ GetProcedureAddress(_GetNativeSystemInfo, kernel32, 'GetNativeSystemInfo');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetNativeSystemInfo]
+ end;
+end;
+
+var
+ _IsProcessorFeaturePresent: Pointer;
+
+function IsProcessorFeaturePresent;
+begin
+ GetProcedureAddress(_IsProcessorFeaturePresent, kernel32, 'IsProcessorFeaturePresent');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_IsProcessorFeaturePresent]
+ end;
+end;
+
+var
+ _SystemTimeToTzSpecificLocalTime: Pointer;
+
+function SystemTimeToTzSpecificLocalTime;
+begin
+ GetProcedureAddress(_SystemTimeToTzSpecificLocalTime, kernel32, 'SystemTimeToTzSpecificLocalTime');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SystemTimeToTzSpecificLocalTime]
+ end;
+end;
+
+var
+ _TzSpecificLocalTimeToSystemTime: Pointer;
+
+function TzSpecificLocalTimeToSystemTime;
+begin
+ GetProcedureAddress(_TzSpecificLocalTimeToSystemTime, kernel32, 'TzSpecificLocalTimeToSystemTime');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_TzSpecificLocalTimeToSystemTime]
+ end;
+end;
+
+var
+ _GetTimeZoneInformation: Pointer;
+
+function GetTimeZoneInformation;
+begin
+ GetProcedureAddress(_GetTimeZoneInformation, kernel32, 'GetTimeZoneInformation');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetTimeZoneInformation]
+ end;
+end;
+
+var
+ _SetTimeZoneInformation: Pointer;
+
+function SetTimeZoneInformation;
+begin
+ GetProcedureAddress(_SetTimeZoneInformation, kernel32, 'SetTimeZoneInformation');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetTimeZoneInformation]
+ end;
+end;
+
+var
+ _SystemTimeToFileTime: Pointer;
+
+function SystemTimeToFileTime;
+begin
+ GetProcedureAddress(_SystemTimeToFileTime, kernel32, 'SystemTimeToFileTime');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SystemTimeToFileTime]
+ end;
+end;
+
+var
+ _FileTimeToLocalFileTime: Pointer;
+
+function FileTimeToLocalFileTime;
+begin
+ GetProcedureAddress(_FileTimeToLocalFileTime, kernel32, 'FileTimeToLocalFileTime');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_FileTimeToLocalFileTime]
+ end;
+end;
+
+var
+ _LocalFileTimeToFileTime: Pointer;
+
+function LocalFileTimeToFileTime;
+begin
+ GetProcedureAddress(_LocalFileTimeToFileTime, kernel32, 'LocalFileTimeToFileTime');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_LocalFileTimeToFileTime]
+ end;
+end;
+
+var
+ _FileTimeToSystemTime: Pointer;
+
+function FileTimeToSystemTime;
+begin
+ GetProcedureAddress(_FileTimeToSystemTime, kernel32, 'FileTimeToSystemTime');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_FileTimeToSystemTime]
+ end;
+end;
+
+var
+ _CompareFileTime: Pointer;
+
+function CompareFileTime;
+begin
+ GetProcedureAddress(_CompareFileTime, kernel32, 'CompareFileTime');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CompareFileTime]
+ end;
+end;
+
+var
+ _FileTimeToDosDateTime: Pointer;
+
+function FileTimeToDosDateTime;
+begin
+ GetProcedureAddress(_FileTimeToDosDateTime, kernel32, 'FileTimeToDosDateTime');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_FileTimeToDosDateTime]
+ end;
+end;
+
+var
+ _DosDateTimeToFileTime: Pointer;
+
+function DosDateTimeToFileTime;
+begin
+ GetProcedureAddress(_DosDateTimeToFileTime, kernel32, 'DosDateTimeToFileTime');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DosDateTimeToFileTime]
+ end;
+end;
+
+var
+ _GetTickCount: Pointer;
+
+function GetTickCount;
+begin
+ GetProcedureAddress(_GetTickCount, kernel32, 'GetTickCount');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetTickCount]
+ end;
+end;
+
+var
+ _SetSystemTimeAdjustment: Pointer;
+
+function SetSystemTimeAdjustment;
+begin
+ GetProcedureAddress(_SetSystemTimeAdjustment, kernel32, 'SetSystemTimeAdjustment');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetSystemTimeAdjustment]
+ end;
+end;
+
+var
+ _GetSystemTimeAdjustment: Pointer;
+
+function GetSystemTimeAdjustment;
+begin
+ GetProcedureAddress(_GetSystemTimeAdjustment, kernel32, 'GetSystemTimeAdjustment');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetSystemTimeAdjustment]
+ end;
+end;
+
+var
+ _FormatMessageA: Pointer;
+
+function FormatMessageA;
+begin
+ GetProcedureAddress(_FormatMessageA, kernel32, 'FormatMessageA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_FormatMessageA]
+ end;
+end;
+
+var
+ _FormatMessageW: Pointer;
+
+function FormatMessageW;
+begin
+ GetProcedureAddress(_FormatMessageW, kernel32, 'FormatMessageW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_FormatMessageW]
+ end;
+end;
+
+var
+ _FormatMessage: Pointer;
+
+function FormatMessage;
+begin
+ GetProcedureAddress(_FormatMessage, kernel32, 'FormatMessage' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_FormatMessage]
+ end;
+end;
+
+var
+ _CreatePipe: Pointer;
+
+function CreatePipe;
+begin
+ GetProcedureAddress(_CreatePipe, kernel32, 'CreatePipe');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreatePipe]
+ end;
+end;
+
+var
+ _ConnectNamedPipe: Pointer;
+
+function ConnectNamedPipe;
+begin
+ GetProcedureAddress(_ConnectNamedPipe, kernel32, 'ConnectNamedPipe');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ConnectNamedPipe]
+ end;
+end;
+
+var
+ _DisconnectNamedPipe: Pointer;
+
+function DisconnectNamedPipe;
+begin
+ GetProcedureAddress(_DisconnectNamedPipe, kernel32, 'DisconnectNamedPipe');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DisconnectNamedPipe]
+ end;
+end;
+
+var
+ _SetNamedPipeHandleState: Pointer;
+
+function SetNamedPipeHandleState;
+begin
+ GetProcedureAddress(_SetNamedPipeHandleState, kernel32, 'SetNamedPipeHandleState');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetNamedPipeHandleState]
+ end;
+end;
+
+var
+ _GetNamedPipeInfo: Pointer;
+
+function GetNamedPipeInfo;
+begin
+ GetProcedureAddress(_GetNamedPipeInfo, kernel32, 'GetNamedPipeInfo');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetNamedPipeInfo]
+ end;
+end;
+
+var
+ _PeekNamedPipe: Pointer;
+
+function PeekNamedPipe;
+begin
+ GetProcedureAddress(_PeekNamedPipe, kernel32, 'PeekNamedPipe');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PeekNamedPipe]
+ end;
+end;
+
+var
+ _TransactNamedPipe: Pointer;
+
+function TransactNamedPipe;
+begin
+ GetProcedureAddress(_TransactNamedPipe, kernel32, 'TransactNamedPipe');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_TransactNamedPipe]
+ end;
+end;
+
+var
+ _CreateMailslotA: Pointer;
+
+function CreateMailslotA;
+begin
+ GetProcedureAddress(_CreateMailslotA, kernel32, 'CreateMailslotA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreateMailslotA]
+ end;
+end;
+
+var
+ _CreateMailslotW: Pointer;
+
+function CreateMailslotW;
+begin
+ GetProcedureAddress(_CreateMailslotW, kernel32, 'CreateMailslotW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreateMailslotW]
+ end;
+end;
+
+var
+ _CreateMailslot: Pointer;
+
+function CreateMailslot;
+begin
+ GetProcedureAddress(_CreateMailslot, kernel32, 'CreateMailslot' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreateMailslot]
+ end;
+end;
+
+var
+ _GetMailslotInfo: Pointer;
+
+function GetMailslotInfo;
+begin
+ GetProcedureAddress(_GetMailslotInfo, kernel32, 'GetMailslotInfo');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetMailslotInfo]
+ end;
+end;
+
+var
+ _SetMailslotInfo: Pointer;
+
+function SetMailslotInfo;
+begin
+ GetProcedureAddress(_SetMailslotInfo, kernel32, 'SetMailslotInfo');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetMailslotInfo]
+ end;
+end;
+
+var
+ _MapViewOfFile: Pointer;
+
+function MapViewOfFile;
+begin
+ GetProcedureAddress(_MapViewOfFile, kernel32, 'MapViewOfFile');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MapViewOfFile]
+ end;
+end;
+
+var
+ _FlushViewOfFile: Pointer;
+
+function FlushViewOfFile;
+begin
+ GetProcedureAddress(_FlushViewOfFile, kernel32, 'FlushViewOfFile');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_FlushViewOfFile]
+ end;
+end;
+
+var
+ _UnmapViewOfFile: Pointer;
+
+function UnmapViewOfFile;
+begin
+ GetProcedureAddress(_UnmapViewOfFile, kernel32, 'UnmapViewOfFile');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_UnmapViewOfFile]
+ end;
+end;
+
+var
+ _EncryptFileA: Pointer;
+
+function EncryptFileA;
+begin
+ GetProcedureAddress(_EncryptFileA, advapi32, 'EncryptFileA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_EncryptFileA]
+ end;
+end;
+
+var
+ _EncryptFileW: Pointer;
+
+function EncryptFileW;
+begin
+ GetProcedureAddress(_EncryptFileW, advapi32, 'EncryptFileW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_EncryptFileW]
+ end;
+end;
+
+var
+ _EncryptFile: Pointer;
+
+function EncryptFile;
+begin
+ GetProcedureAddress(_EncryptFile, advapi32, 'EncryptFile' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_EncryptFile]
+ end;
+end;
+
+var
+ _DecryptFileA: Pointer;
+
+function DecryptFileA;
+begin
+ GetProcedureAddress(_DecryptFileA, advapi32, 'DecryptFileA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DecryptFileA]
+ end;
+end;
+
+var
+ _DecryptFileW: Pointer;
+
+function DecryptFileW;
+begin
+ GetProcedureAddress(_DecryptFileW, advapi32, 'DecryptFileW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DecryptFileW]
+ end;
+end;
+
+var
+ _DecryptFile: Pointer;
+
+function DecryptFile;
+begin
+ GetProcedureAddress(_DecryptFile, advapi32, 'DecryptFile' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DecryptFile]
+ end;
+end;
+
+var
+ _FileEncryptionStatusA: Pointer;
+
+function FileEncryptionStatusA;
+begin
+ GetProcedureAddress(_FileEncryptionStatusA, advapi32, 'FileEncryptionStatusA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_FileEncryptionStatusA]
+ end;
+end;
+
+var
+ _FileEncryptionStatusW: Pointer;
+
+function FileEncryptionStatusW;
+begin
+ GetProcedureAddress(_FileEncryptionStatusW, advapi32, 'FileEncryptionStatusW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_FileEncryptionStatusW]
+ end;
+end;
+
+var
+ _FileEncryptionStatus: Pointer;
+
+function FileEncryptionStatus;
+begin
+ GetProcedureAddress(_FileEncryptionStatus, advapi32, 'FileEncryptionStatus' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_FileEncryptionStatus]
+ end;
+end;
+
+var
+ _OpenEncryptedFileRawA: Pointer;
+
+function OpenEncryptedFileRawA;
+begin
+ GetProcedureAddress(_OpenEncryptedFileRawA, advapi32, 'OpenEncryptedFileRawA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_OpenEncryptedFileRawA]
+ end;
+end;
+
+var
+ _OpenEncryptedFileRawW: Pointer;
+
+function OpenEncryptedFileRawW;
+begin
+ GetProcedureAddress(_OpenEncryptedFileRawW, advapi32, 'OpenEncryptedFileRawW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_OpenEncryptedFileRawW]
+ end;
+end;
+
+var
+ _OpenEncryptedFileRaw: Pointer;
+
+function OpenEncryptedFileRaw;
+begin
+ GetProcedureAddress(_OpenEncryptedFileRaw, advapi32, 'OpenEncryptedFileRaw' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_OpenEncryptedFileRaw]
+ end;
+end;
+
+var
+ _ReadEncryptedFileRaw: Pointer;
+
+function ReadEncryptedFileRaw;
+begin
+ GetProcedureAddress(_ReadEncryptedFileRaw, advapi32, 'ReadEncryptedFileRaw');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ReadEncryptedFileRaw]
+ end;
+end;
+
+var
+ _WriteEncryptedFileRaw: Pointer;
+
+function WriteEncryptedFileRaw;
+begin
+ GetProcedureAddress(_WriteEncryptedFileRaw, advapi32, 'WriteEncryptedFileRaw');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WriteEncryptedFileRaw]
+ end;
+end;
+
+var
+ _CloseEncryptedFileRaw: Pointer;
+
+procedure CloseEncryptedFileRaw;
+begin
+ GetProcedureAddress(_CloseEncryptedFileRaw, advapi32, 'CloseEncryptedFileRaw');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CloseEncryptedFileRaw]
+ end;
+end;
+
+var
+ _lstrcmpA: Pointer;
+
+function lstrcmpA;
+begin
+ GetProcedureAddress(_lstrcmpA, kernel32, 'lstrcmpA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_lstrcmpA]
+ end;
+end;
+
+var
+ _lstrcmpW: Pointer;
+
+function lstrcmpW;
+begin
+ GetProcedureAddress(_lstrcmpW, kernel32, 'lstrcmpW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_lstrcmpW]
+ end;
+end;
+
+var
+ _lstrcmp: Pointer;
+
+function lstrcmp;
+begin
+ GetProcedureAddress(_lstrcmp, kernel32, 'lstrcmp' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_lstrcmp]
+ end;
+end;
+
+var
+ _lstrcmpiA: Pointer;
+
+function lstrcmpiA;
+begin
+ GetProcedureAddress(_lstrcmpiA, kernel32, 'lstrcmpiA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_lstrcmpiA]
+ end;
+end;
+
+var
+ _lstrcmpiW: Pointer;
+
+function lstrcmpiW;
+begin
+ GetProcedureAddress(_lstrcmpiW, kernel32, 'lstrcmpiW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_lstrcmpiW]
+ end;
+end;
+
+var
+ _lstrcmpi: Pointer;
+
+function lstrcmpi;
+begin
+ GetProcedureAddress(_lstrcmpi, kernel32, 'lstrcmpi' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_lstrcmpi]
+ end;
+end;
+
+var
+ _lstrcpynA: Pointer;
+
+function lstrcpynA;
+begin
+ GetProcedureAddress(_lstrcpynA, kernel32, 'lstrcpynA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_lstrcpynA]
+ end;
+end;
+
+var
+ _lstrcpynW: Pointer;
+
+function lstrcpynW;
+begin
+ GetProcedureAddress(_lstrcpynW, kernel32, 'lstrcpynW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_lstrcpynW]
+ end;
+end;
+
+var
+ _lstrcpyn: Pointer;
+
+function lstrcpyn;
+begin
+ GetProcedureAddress(_lstrcpyn, kernel32, 'lstrcpyn' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_lstrcpyn]
+ end;
+end;
+
+var
+ _lstrcpyA: Pointer;
+
+function lstrcpyA;
+begin
+ GetProcedureAddress(_lstrcpyA, kernel32, 'lstrcpyA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_lstrcpyA]
+ end;
+end;
+
+var
+ _lstrcpyW: Pointer;
+
+function lstrcpyW;
+begin
+ GetProcedureAddress(_lstrcpyW, kernel32, 'lstrcpyW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_lstrcpyW]
+ end;
+end;
+
+var
+ _lstrcpy: Pointer;
+
+function lstrcpy;
+begin
+ GetProcedureAddress(_lstrcpy, kernel32, 'lstrcpy' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_lstrcpy]
+ end;
+end;
+
+var
+ _lstrcatA: Pointer;
+
+function lstrcatA;
+begin
+ GetProcedureAddress(_lstrcatA, kernel32, 'lstrcatA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_lstrcatA]
+ end;
+end;
+
+var
+ _lstrcatW: Pointer;
+
+function lstrcatW;
+begin
+ GetProcedureAddress(_lstrcatW, kernel32, 'lstrcatW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_lstrcatW]
+ end;
+end;
+
+var
+ _lstrcat: Pointer;
+
+function lstrcat;
+begin
+ GetProcedureAddress(_lstrcat, kernel32, 'lstrcat' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_lstrcat]
+ end;
+end;
+
+var
+ _lstrlenA: Pointer;
+
+function lstrlenA;
+begin
+ GetProcedureAddress(_lstrlenA, kernel32, 'lstrlenA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_lstrlenA]
+ end;
+end;
+
+var
+ _lstrlenW: Pointer;
+
+function lstrlenW;
+begin
+ GetProcedureAddress(_lstrlenW, kernel32, 'lstrlenW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_lstrlenW]
+ end;
+end;
+
+var
+ _lstrlen: Pointer;
+
+function lstrlen;
+begin
+ GetProcedureAddress(_lstrlen, kernel32, 'lstrlen' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_lstrlen]
+ end;
+end;
+
+var
+ _OpenFile: Pointer;
+
+function OpenFile;
+begin
+ GetProcedureAddress(_OpenFile, kernel32, 'OpenFile');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_OpenFile]
+ end;
+end;
+
+var
+ __lopen: Pointer;
+
+function _lopen;
+begin
+ GetProcedureAddress(__lopen, kernel32, '_lopen');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [__lopen]
+ end;
+end;
+
+var
+ __lcreat: Pointer;
+
+function _lcreat;
+begin
+ GetProcedureAddress(__lcreat, kernel32, '_lcreat');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [__lcreat]
+ end;
+end;
+
+var
+ __lread: Pointer;
+
+function _lread;
+begin
+ GetProcedureAddress(__lread, kernel32, '_lread');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [__lread]
+ end;
+end;
+
+var
+ __lwrite: Pointer;
+
+function _lwrite;
+begin
+ GetProcedureAddress(__lwrite, kernel32, '_lwrite');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [__lwrite]
+ end;
+end;
+
+var
+ __hread: Pointer;
+
+function _hread;
+begin
+ GetProcedureAddress(__hread, kernel32, '_hread');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [__hread]
+ end;
+end;
+
+var
+ __hwrite: Pointer;
+
+function _hwrite;
+begin
+ GetProcedureAddress(__hwrite, kernel32, '_hwrite');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [__hwrite]
+ end;
+end;
+
+var
+ __lclose: Pointer;
+
+function _lclose;
+begin
+ GetProcedureAddress(__lclose, kernel32, '_lclose');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [__lclose]
+ end;
+end;
+
+var
+ __llseek: Pointer;
+
+function _llseek;
+begin
+ GetProcedureAddress(__llseek, kernel32, '_llseek');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [__llseek]
+ end;
+end;
+
+var
+ _IsTextUnicode: Pointer;
+
+function IsTextUnicode;
+begin
+ GetProcedureAddress(_IsTextUnicode, advapi32, 'IsTextUnicode');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_IsTextUnicode]
+ end;
+end;
+
+var
+ _FlsAlloc: Pointer;
+
+function FlsAlloc;
+begin
+ GetProcedureAddress(_FlsAlloc, kernel32, 'FlsAlloc');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_FlsAlloc]
+ end;
+end;
+
+var
+ _FlsGetValue: Pointer;
+
+function FlsGetValue;
+begin
+ GetProcedureAddress(_FlsGetValue, kernel32, 'FlsGetValue');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_FlsGetValue]
+ end;
+end;
+
+var
+ _FlsSetValue: Pointer;
+
+function FlsSetValue;
+begin
+ GetProcedureAddress(_FlsSetValue, kernel32, 'FlsSetValue');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_FlsSetValue]
+ end;
+end;
+
+var
+ _FlsFree: Pointer;
+
+function FlsFree;
+begin
+ GetProcedureAddress(_FlsFree, kernel32, 'FlsFree');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_FlsFree]
+ end;
+end;
+
+var
+ _TlsAlloc: Pointer;
+
+function TlsAlloc;
+begin
+ GetProcedureAddress(_TlsAlloc, kernel32, 'TlsAlloc');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_TlsAlloc]
+ end;
+end;
+
+var
+ _TlsGetValue: Pointer;
+
+function TlsGetValue;
+begin
+ GetProcedureAddress(_TlsGetValue, kernel32, 'TlsGetValue');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_TlsGetValue]
+ end;
+end;
+
+var
+ _TlsSetValue: Pointer;
+
+function TlsSetValue;
+begin
+ GetProcedureAddress(_TlsSetValue, kernel32, 'TlsSetValue');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_TlsSetValue]
+ end;
+end;
+
+var
+ _TlsFree: Pointer;
+
+function TlsFree;
+begin
+ GetProcedureAddress(_TlsFree, kernel32, 'TlsFree');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_TlsFree]
+ end;
+end;
+
+var
+ _SleepEx: Pointer;
+
+function SleepEx;
+begin
+ GetProcedureAddress(_SleepEx, kernel32, 'SleepEx');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SleepEx]
+ end;
+end;
+
+var
+ _WaitForSingleObjectEx: Pointer;
+
+function WaitForSingleObjectEx;
+begin
+ GetProcedureAddress(_WaitForSingleObjectEx, kernel32, 'WaitForSingleObjectEx');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WaitForSingleObjectEx]
+ end;
+end;
+
+var
+ _WaitForMultipleObjectsEx: Pointer;
+
+function WaitForMultipleObjectsEx;
+begin
+ GetProcedureAddress(_WaitForMultipleObjectsEx, kernel32, 'WaitForMultipleObjectsEx');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WaitForMultipleObjectsEx]
+ end;
+end;
+
+var
+ _SignalObjectAndWait: Pointer;
+
+function SignalObjectAndWait;
+begin
+ GetProcedureAddress(_SignalObjectAndWait, kernel32, 'SignalObjectAndWait');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SignalObjectAndWait]
+ end;
+end;
+
+var
+ _ReadFileEx: Pointer;
+
+function ReadFileEx;
+begin
+ GetProcedureAddress(_ReadFileEx, kernel32, 'ReadFileEx');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ReadFileEx]
+ end;
+end;
+
+var
+ _WriteFileEx: Pointer;
+
+function WriteFileEx;
+begin
+ GetProcedureAddress(_WriteFileEx, kernel32, 'WriteFileEx');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WriteFileEx]
+ end;
+end;
+
+var
+ _BackupRead: Pointer;
+
+function BackupRead;
+begin
+ GetProcedureAddress(_BackupRead, kernel32, 'BackupRead');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_BackupRead]
+ end;
+end;
+
+var
+ _BackupSeek: Pointer;
+
+function BackupSeek;
+begin
+ GetProcedureAddress(_BackupSeek, kernel32, 'BackupSeek');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_BackupSeek]
+ end;
+end;
+
+var
+ _BackupWrite: Pointer;
+
+function BackupWrite;
+begin
+ GetProcedureAddress(_BackupWrite, kernel32, 'BackupWrite');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_BackupWrite]
+ end;
+end;
+
+var
+ _ReadFileScatter: Pointer;
+
+function ReadFileScatter;
+begin
+ GetProcedureAddress(_ReadFileScatter, kernel32, 'ReadFileScatter');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ReadFileScatter]
+ end;
+end;
+
+var
+ _WriteFileGather: Pointer;
+
+function WriteFileGather;
+begin
+ GetProcedureAddress(_WriteFileGather, kernel32, 'WriteFileGather');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WriteFileGather]
+ end;
+end;
+
+var
+ _OpenMutexA: Pointer;
+
+function OpenMutexA;
+begin
+ GetProcedureAddress(_OpenMutexA, kernel32, 'OpenMutexA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_OpenMutexA]
+ end;
+end;
+
+var
+ _OpenMutexW: Pointer;
+
+function OpenMutexW;
+begin
+ GetProcedureAddress(_OpenMutexW, kernel32, 'OpenMutexW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_OpenMutexW]
+ end;
+end;
+
+var
+ _OpenMutex: Pointer;
+
+function OpenMutex;
+begin
+ GetProcedureAddress(_OpenMutex, kernel32, 'OpenMutex' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_OpenMutex]
+ end;
+end;
+
+var
+ _CreateEventA: Pointer;
+
+function CreateEventA;
+begin
+ GetProcedureAddress(_CreateEventA, kernel32, 'CreateEventA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreateEventA]
+ end;
+end;
+
+var
+ _CreateEventW: Pointer;
+
+function CreateEventW;
+begin
+ GetProcedureAddress(_CreateEventW, kernel32, 'CreateEventW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreateEventW]
+ end;
+end;
+
+var
+ _CreateEvent: Pointer;
+
+function CreateEvent;
+begin
+ GetProcedureAddress(_CreateEvent, kernel32, 'CreateEvent' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreateEvent]
+ end;
+end;
+
+var
+ _OpenEventA: Pointer;
+
+function OpenEventA;
+begin
+ GetProcedureAddress(_OpenEventA, kernel32, 'OpenEventA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_OpenEventA]
+ end;
+end;
+
+var
+ _OpenEventW: Pointer;
+
+function OpenEventW;
+begin
+ GetProcedureAddress(_OpenEventW, kernel32, 'OpenEventW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_OpenEventW]
+ end;
+end;
+
+var
+ _OpenEvent: Pointer;
+
+function OpenEvent;
+begin
+ GetProcedureAddress(_OpenEvent, kernel32, 'OpenEvent' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_OpenEvent]
+ end;
+end;
+
+var
+ _CreateSemaphoreA: Pointer;
+
+function CreateSemaphoreA;
+begin
+ GetProcedureAddress(_CreateSemaphoreA, kernel32, 'CreateSemaphoreA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreateSemaphoreA]
+ end;
+end;
+
+var
+ _CreateSemaphoreW: Pointer;
+
+function CreateSemaphoreW;
+begin
+ GetProcedureAddress(_CreateSemaphoreW, kernel32, 'CreateSemaphoreW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreateSemaphoreW]
+ end;
+end;
+
+var
+ _CreateSemaphore: Pointer;
+
+function CreateSemaphore;
+begin
+ GetProcedureAddress(_CreateSemaphore, kernel32, 'CreateSemaphore' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreateSemaphore]
+ end;
+end;
+
+var
+ _OpenSemaphoreA: Pointer;
+
+function OpenSemaphoreA;
+begin
+ GetProcedureAddress(_OpenSemaphoreA, kernel32, 'OpenSemaphoreA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_OpenSemaphoreA]
+ end;
+end;
+
+var
+ _OpenSemaphoreW: Pointer;
+
+function OpenSemaphoreW;
+begin
+ GetProcedureAddress(_OpenSemaphoreW, kernel32, 'OpenSemaphoreW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_OpenSemaphoreW]
+ end;
+end;
+
+var
+ _OpenSemaphore: Pointer;
+
+function OpenSemaphore;
+begin
+ GetProcedureAddress(_OpenSemaphore, kernel32, 'OpenSemaphore' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_OpenSemaphore]
+ end;
+end;
+
+var
+ _CreateWaitableTimerA: Pointer;
+
+function CreateWaitableTimerA;
+begin
+ GetProcedureAddress(_CreateWaitableTimerA, kernel32, 'CreateWaitableTimerA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreateWaitableTimerA]
+ end;
+end;
+
+var
+ _CreateWaitableTimerW: Pointer;
+
+function CreateWaitableTimerW;
+begin
+ GetProcedureAddress(_CreateWaitableTimerW, kernel32, 'CreateWaitableTimerW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreateWaitableTimerW]
+ end;
+end;
+
+var
+ _CreateWaitableTimer: Pointer;
+
+function CreateWaitableTimer;
+begin
+ GetProcedureAddress(_CreateWaitableTimer, kernel32, 'CreateWaitableTimer' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreateWaitableTimer]
+ end;
+end;
+
+var
+ _OpenWaitableTimerA: Pointer;
+
+function OpenWaitableTimerA;
+begin
+ GetProcedureAddress(_OpenWaitableTimerA, kernel32, 'OpenWaitableTimerA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_OpenWaitableTimerA]
+ end;
+end;
+
+var
+ _OpenWaitableTimerW: Pointer;
+
+function OpenWaitableTimerW;
+begin
+ GetProcedureAddress(_OpenWaitableTimerW, kernel32, 'OpenWaitableTimerW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_OpenWaitableTimerW]
+ end;
+end;
+
+var
+ _OpenWaitableTimer: Pointer;
+
+function OpenWaitableTimer;
+begin
+ GetProcedureAddress(_OpenWaitableTimer, kernel32, 'OpenWaitableTimer' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_OpenWaitableTimer]
+ end;
+end;
+
+var
+ _SetWaitableTimer: Pointer;
+
+function SetWaitableTimer;
+begin
+ GetProcedureAddress(_SetWaitableTimer, kernel32, 'SetWaitableTimer');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetWaitableTimer]
+ end;
+end;
+
+var
+ _CancelWaitableTimer: Pointer;
+
+function CancelWaitableTimer;
+begin
+ GetProcedureAddress(_CancelWaitableTimer, kernel32, 'CancelWaitableTimer');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CancelWaitableTimer]
+ end;
+end;
+
+var
+ _CreateFileMappingA: Pointer;
+
+function CreateFileMappingA;
+begin
+ GetProcedureAddress(_CreateFileMappingA, kernel32, 'CreateFileMappingA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreateFileMappingA]
+ end;
+end;
+
+var
+ _CreateFileMappingW: Pointer;
+
+function CreateFileMappingW;
+begin
+ GetProcedureAddress(_CreateFileMappingW, kernel32, 'CreateFileMappingW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreateFileMappingW]
+ end;
+end;
+
+var
+ _CreateFileMapping: Pointer;
+
+function CreateFileMapping;
+begin
+ GetProcedureAddress(_CreateFileMapping, kernel32, 'CreateFileMapping' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreateFileMapping]
+ end;
+end;
+
+var
+ _OpenFileMappingA: Pointer;
+
+function OpenFileMappingA;
+begin
+ GetProcedureAddress(_OpenFileMappingA, kernel32, 'OpenFileMappingA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_OpenFileMappingA]
+ end;
+end;
+
+var
+ _OpenFileMappingW: Pointer;
+
+function OpenFileMappingW;
+begin
+ GetProcedureAddress(_OpenFileMappingW, kernel32, 'OpenFileMappingW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_OpenFileMappingW]
+ end;
+end;
+
+var
+ _OpenFileMapping: Pointer;
+
+function OpenFileMapping;
+begin
+ GetProcedureAddress(_OpenFileMapping, kernel32, 'OpenFileMapping' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_OpenFileMapping]
+ end;
+end;
+
+var
+ _GetLogicalDriveStringsA: Pointer;
+
+function GetLogicalDriveStringsA;
+begin
+ GetProcedureAddress(_GetLogicalDriveStringsA, kernel32, 'GetLogicalDriveStringsA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetLogicalDriveStringsA]
+ end;
+end;
+
+var
+ _GetLogicalDriveStringsW: Pointer;
+
+function GetLogicalDriveStringsW;
+begin
+ GetProcedureAddress(_GetLogicalDriveStringsW, kernel32, 'GetLogicalDriveStringsW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetLogicalDriveStringsW]
+ end;
+end;
+
+var
+ _GetLogicalDriveStrings: Pointer;
+
+function GetLogicalDriveStrings;
+begin
+ GetProcedureAddress(_GetLogicalDriveStrings, kernel32, 'GetLogicalDriveStrings' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetLogicalDriveStrings]
+ end;
+end;
+
+var
+ _CreateMemResNotification: Pointer;
+
+function CreateMemoryResourceNotification;
+begin
+ GetProcedureAddress(_CreateMemResNotification, kernel32, 'CreateMemoryResourceNotification');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreateMemResNotification]
+ end;
+end;
+
+var
+ _QueryMemoryResourceNotification: Pointer;
+
+function QueryMemoryResourceNotification;
+begin
+ GetProcedureAddress(_QueryMemoryResourceNotification, kernel32, 'QueryMemoryResourceNotification');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_QueryMemoryResourceNotification]
+ end;
+end;
+
+var
+ _LoadLibraryA: Pointer;
+
+function LoadLibraryA;
+begin
+ GetProcedureAddress(_LoadLibraryA, kernel32, 'LoadLibraryA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_LoadLibraryA]
+ end;
+end;
+
+var
+ _LoadLibraryW: Pointer;
+
+function LoadLibraryW;
+begin
+ GetProcedureAddress(_LoadLibraryW, kernel32, 'LoadLibraryW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_LoadLibraryW]
+ end;
+end;
+
+var
+ _LoadLibrary: Pointer;
+
+function LoadLibrary;
+begin
+ GetProcedureAddress(_LoadLibrary, kernel32, 'LoadLibrary' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_LoadLibrary]
+ end;
+end;
+
+var
+ _LoadLibraryExA: Pointer;
+
+function LoadLibraryExA;
+begin
+ GetProcedureAddress(_LoadLibraryExA, kernel32, 'LoadLibraryExA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_LoadLibraryExA]
+ end;
+end;
+
+var
+ _LoadLibraryExW: Pointer;
+
+function LoadLibraryExW;
+begin
+ GetProcedureAddress(_LoadLibraryExW, kernel32, 'LoadLibraryExW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_LoadLibraryExW]
+ end;
+end;
+
+var
+ _LoadLibraryEx: Pointer;
+
+function LoadLibraryEx;
+begin
+ GetProcedureAddress(_LoadLibraryEx, kernel32, 'LoadLibraryEx' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_LoadLibraryEx]
+ end;
+end;
+
+var
+ _GetModuleFileNameA: Pointer;
+
+function GetModuleFileNameA;
+begin
+ GetProcedureAddress(_GetModuleFileNameA, kernel32, 'GetModuleFileNameA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetModuleFileNameA]
+ end;
+end;
+
+var
+ _GetModuleFileNameW: Pointer;
+
+function GetModuleFileNameW;
+begin
+ GetProcedureAddress(_GetModuleFileNameW, kernel32, 'GetModuleFileNameW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetModuleFileNameW]
+ end;
+end;
+
+var
+ _GetModuleFileName: Pointer;
+
+function GetModuleFileName;
+begin
+ GetProcedureAddress(_GetModuleFileName, kernel32, 'GetModuleFileName' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetModuleFileName]
+ end;
+end;
+
+var
+ _GetModuleHandleA: Pointer;
+
+function GetModuleHandleA;
+begin
+ GetProcedureAddress(_GetModuleHandleA, kernel32, 'GetModuleHandleA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetModuleHandleA]
+ end;
+end;
+
+var
+ _GetModuleHandleW: Pointer;
+
+function GetModuleHandleW;
+begin
+ GetProcedureAddress(_GetModuleHandleW, kernel32, 'GetModuleHandleW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetModuleHandleW]
+ end;
+end;
+
+var
+ _GetModuleHandle: Pointer;
+
+function GetModuleHandle;
+begin
+ GetProcedureAddress(_GetModuleHandle, kernel32, 'GetModuleHandle' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetModuleHandle]
+ end;
+end;
+
+var
+ _CreateProcessA: Pointer;
+
+function CreateProcessA;
+begin
+ GetProcedureAddress(_CreateProcessA, kernel32, 'CreateProcessA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreateProcessA]
+ end;
+end;
+
+var
+ _CreateProcessW: Pointer;
+
+function CreateProcessW;
+begin
+ GetProcedureAddress(_CreateProcessW, kernel32, 'CreateProcessW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreateProcessW]
+ end;
+end;
+
+var
+ _CreateProcess: Pointer;
+
+function CreateProcess;
+begin
+ GetProcedureAddress(_CreateProcess, kernel32, 'CreateProcess' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreateProcess]
+ end;
+end;
+
+var
+ _GetModuleHandleExA: Pointer;
+
+function GetModuleHandleExA;
+begin
+ GetProcedureAddress(_GetModuleHandleExA, kernel32, 'GetModuleHandleExA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetModuleHandleExA]
+ end;
+end;
+
+var
+ _GetModuleHandleExW: Pointer;
+
+function GetModuleHandleExW;
+begin
+ GetProcedureAddress(_GetModuleHandleExW, kernel32, 'GetModuleHandleExW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetModuleHandleExW]
+ end;
+end;
+
+var
+ _GetModuleHandleEx: Pointer;
+
+function GetModuleHandleEx;
+begin
+ GetProcedureAddress(_GetModuleHandleEx, kernel32, 'GetModuleHandleEx' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetModuleHandleEx]
+ end;
+end;
+
+var
+ _NeedCurrentDirectoryForExePathA: Pointer;
+
+function NeedCurrentDirectoryForExePathA;
+begin
+ GetProcedureAddress(_NeedCurrentDirectoryForExePathA, kernel32, 'NeedCurrentDirectoryForExePathA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NeedCurrentDirectoryForExePathA]
+ end;
+end;
+
+var
+ _NeedCurrentDirectoryForExePathW: Pointer;
+
+function NeedCurrentDirectoryForExePathW;
+begin
+ GetProcedureAddress(_NeedCurrentDirectoryForExePathW, kernel32, 'NeedCurrentDirectoryForExePathW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NeedCurrentDirectoryForExePathW]
+ end;
+end;
+
+var
+ _NeedCurrentDirectoryForExePath: Pointer;
+
+function NeedCurrentDirectoryForExePath;
+begin
+ GetProcedureAddress(_NeedCurrentDirectoryForExePath, kernel32, 'NeedCurrentDirectoryForExePath' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NeedCurrentDirectoryForExePath]
+ end;
+end;
+
+var
+ _SetProcessShutdownParameters: Pointer;
+
+function SetProcessShutdownParameters;
+begin
+ GetProcedureAddress(_SetProcessShutdownParameters, kernel32, 'SetProcessShutdownParameters');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetProcessShutdownParameters]
+ end;
+end;
+
+var
+ _GetProcessShutdownParameters: Pointer;
+
+function GetProcessShutdownParameters;
+begin
+ GetProcedureAddress(_GetProcessShutdownParameters, kernel32, 'GetProcessShutdownParameters');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetProcessShutdownParameters]
+ end;
+end;
+
+var
+ _GetProcessVersion: Pointer;
+
+function GetProcessVersion;
+begin
+ GetProcedureAddress(_GetProcessVersion, kernel32, 'GetProcessVersion');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetProcessVersion]
+ end;
+end;
+
+var
+ _FatalAppExitA: Pointer;
+
+procedure FatalAppExitA;
+begin
+ GetProcedureAddress(_FatalAppExitA, kernel32, 'FatalAppExitA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_FatalAppExitA]
+ end;
+end;
+
+var
+ _FatalAppExitW: Pointer;
+
+procedure FatalAppExitW;
+begin
+ GetProcedureAddress(_FatalAppExitW, kernel32, 'FatalAppExitW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_FatalAppExitW]
+ end;
+end;
+
+var
+ _FatalAppExit: Pointer;
+
+procedure FatalAppExit;
+begin
+ GetProcedureAddress(_FatalAppExit, kernel32, 'FatalAppExit' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_FatalAppExit]
+ end;
+end;
+
+var
+ _GetStartupInfoA: Pointer;
+
+procedure GetStartupInfoA;
+begin
+ GetProcedureAddress(_GetStartupInfoA, kernel32, 'GetStartupInfoA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetStartupInfoA]
+ end;
+end;
+
+var
+ _GetStartupInfoW: Pointer;
+
+procedure GetStartupInfoW;
+begin
+ GetProcedureAddress(_GetStartupInfoW, kernel32, 'GetStartupInfoW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetStartupInfoW]
+ end;
+end;
+
+var
+ _GetStartupInfo: Pointer;
+
+procedure GetStartupInfo;
+begin
+ GetProcedureAddress(_GetStartupInfo, kernel32, 'GetStartupInfo' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetStartupInfo]
+ end;
+end;
+
+var
+ _GetCommandLineA: Pointer;
+
+function GetCommandLineA;
+begin
+ GetProcedureAddress(_GetCommandLineA, kernel32, 'GetCommandLineA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetCommandLineA]
+ end;
+end;
+
+var
+ _GetCommandLineW: Pointer;
+
+function GetCommandLineW;
+begin
+ GetProcedureAddress(_GetCommandLineW, kernel32, 'GetCommandLineW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetCommandLineW]
+ end;
+end;
+
+var
+ _GetCommandLine: Pointer;
+
+function GetCommandLine;
+begin
+ GetProcedureAddress(_GetCommandLine, kernel32, 'GetCommandLine' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetCommandLine]
+ end;
+end;
+
+var
+ _GetEnvironmentVariableA: Pointer;
+
+function GetEnvironmentVariableA;
+begin
+ GetProcedureAddress(_GetEnvironmentVariableA, kernel32, 'GetEnvironmentVariableA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetEnvironmentVariableA]
+ end;
+end;
+
+var
+ _GetEnvironmentVariableW: Pointer;
+
+function GetEnvironmentVariableW;
+begin
+ GetProcedureAddress(_GetEnvironmentVariableW, kernel32, 'GetEnvironmentVariableW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetEnvironmentVariableW]
+ end;
+end;
+
+var
+ _GetEnvironmentVariable: Pointer;
+
+function GetEnvironmentVariable;
+begin
+ GetProcedureAddress(_GetEnvironmentVariable, kernel32, 'GetEnvironmentVariable' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetEnvironmentVariable]
+ end;
+end;
+
+var
+ _SetEnvironmentVariableA: Pointer;
+
+function SetEnvironmentVariableA;
+begin
+ GetProcedureAddress(_SetEnvironmentVariableA, kernel32, 'SetEnvironmentVariableA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetEnvironmentVariableA]
+ end;
+end;
+
+var
+ _SetEnvironmentVariableW: Pointer;
+
+function SetEnvironmentVariableW;
+begin
+ GetProcedureAddress(_SetEnvironmentVariableW, kernel32, 'SetEnvironmentVariableW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetEnvironmentVariableW]
+ end;
+end;
+
+var
+ _SetEnvironmentVariable: Pointer;
+
+function SetEnvironmentVariable;
+begin
+ GetProcedureAddress(_SetEnvironmentVariable, kernel32, 'SetEnvironmentVariable' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetEnvironmentVariable]
+ end;
+end;
+
+var
+ _ExpandEnvironmentStringsA: Pointer;
+
+function ExpandEnvironmentStringsA;
+begin
+ GetProcedureAddress(_ExpandEnvironmentStringsA, kernel32, 'ExpandEnvironmentStringsA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ExpandEnvironmentStringsA]
+ end;
+end;
+
+var
+ _ExpandEnvironmentStringsW: Pointer;
+
+function ExpandEnvironmentStringsW;
+begin
+ GetProcedureAddress(_ExpandEnvironmentStringsW, kernel32, 'ExpandEnvironmentStringsW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ExpandEnvironmentStringsW]
+ end;
+end;
+
+var
+ _ExpandEnvironmentStrings: Pointer;
+
+function ExpandEnvironmentStrings;
+begin
+ GetProcedureAddress(_ExpandEnvironmentStrings, kernel32, 'ExpandEnvironmentStrings' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ExpandEnvironmentStrings]
+ end;
+end;
+
+var
+ _GetFirmwareEnvironmentVariableA: Pointer;
+
+function GetFirmwareEnvironmentVariableA;
+begin
+ GetProcedureAddress(_GetFirmwareEnvironmentVariableA, kernel32, 'GetFirmwareEnvironmentVariableA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetFirmwareEnvironmentVariableA]
+ end;
+end;
+
+var
+ _GetFirmwareEnvironmentVariableW: Pointer;
+
+function GetFirmwareEnvironmentVariableW;
+begin
+ GetProcedureAddress(_GetFirmwareEnvironmentVariableW, kernel32, 'GetFirmwareEnvironmentVariableW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetFirmwareEnvironmentVariableW]
+ end;
+end;
+
+var
+ _GetFirmwareEnvironmentVariable: Pointer;
+
+function GetFirmwareEnvironmentVariable;
+begin
+ GetProcedureAddress(_GetFirmwareEnvironmentVariable, kernel32, 'GetFirmwareEnvironmentVariable' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetFirmwareEnvironmentVariable]
+ end;
+end;
+
+var
+ _SetFirmwareEnvironmentVariableA: Pointer;
+
+function SetFirmwareEnvironmentVariableA;
+begin
+ GetProcedureAddress(_SetFirmwareEnvironmentVariableA, kernel32, 'SetFirmwareEnvironmentVariableA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetFirmwareEnvironmentVariableA]
+ end;
+end;
+
+var
+ _SetFirmwareEnvironmentVariableW: Pointer;
+
+function SetFirmwareEnvironmentVariableW;
+begin
+ GetProcedureAddress(_SetFirmwareEnvironmentVariableW, kernel32, 'SetFirmwareEnvironmentVariableW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetFirmwareEnvironmentVariableW]
+ end;
+end;
+
+var
+ _SetFirmwareEnvironmentVariable: Pointer;
+
+function SetFirmwareEnvironmentVariable;
+begin
+ GetProcedureAddress(_SetFirmwareEnvironmentVariable, kernel32, 'SetFirmwareEnvironmentVariable' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetFirmwareEnvironmentVariable]
+ end;
+end;
+
+var
+ _OutputDebugStringA: Pointer;
+
+procedure OutputDebugStringA;
+begin
+ GetProcedureAddress(_OutputDebugStringA, kernel32, 'OutputDebugStringA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_OutputDebugStringA]
+ end;
+end;
+
+var
+ _OutputDebugStringW: Pointer;
+
+procedure OutputDebugStringW;
+begin
+ GetProcedureAddress(_OutputDebugStringW, kernel32, 'OutputDebugStringW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_OutputDebugStringW]
+ end;
+end;
+
+var
+ _OutputDebugString: Pointer;
+
+procedure OutputDebugString;
+begin
+ GetProcedureAddress(_OutputDebugString, kernel32, 'OutputDebugString' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_OutputDebugString]
+ end;
+end;
+
+var
+ _FindResourceA: Pointer;
+
+function FindResourceA;
+begin
+ GetProcedureAddress(_FindResourceA, kernel32, 'FindResourceA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_FindResourceA]
+ end;
+end;
+
+var
+ _FindResourceW: Pointer;
+
+function FindResourceW;
+begin
+ GetProcedureAddress(_FindResourceW, kernel32, 'FindResourceW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_FindResourceW]
+ end;
+end;
+
+var
+ _FindResource: Pointer;
+
+function FindResource;
+begin
+ GetProcedureAddress(_FindResource, kernel32, 'FindResource' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_FindResource]
+ end;
+end;
+
+var
+ _FindResourceExA: Pointer;
+
+function FindResourceExA;
+begin
+ GetProcedureAddress(_FindResourceExA, kernel32, 'FindResourceExA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_FindResourceExA]
+ end;
+end;
+
+var
+ _FindResourceExW: Pointer;
+
+function FindResourceExW;
+begin
+ GetProcedureAddress(_FindResourceExW, kernel32, 'FindResourceExW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_FindResourceExW]
+ end;
+end;
+
+var
+ _FindResourceEx: Pointer;
+
+function FindResourceEx;
+begin
+ GetProcedureAddress(_FindResourceEx, kernel32, 'FindResourceEx' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_FindResourceEx]
+ end;
+end;
+
+var
+ _EnumResourceTypesA: Pointer;
+
+function EnumResourceTypesA;
+begin
+ GetProcedureAddress(_EnumResourceTypesA, kernel32, 'EnumResourceTypesA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_EnumResourceTypesA]
+ end;
+end;
+
+var
+ _EnumResourceTypesW: Pointer;
+
+function EnumResourceTypesW;
+begin
+ GetProcedureAddress(_EnumResourceTypesW, kernel32, 'EnumResourceTypesW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_EnumResourceTypesW]
+ end;
+end;
+
+var
+ _EnumResourceTypes: Pointer;
+
+function EnumResourceTypes;
+begin
+ GetProcedureAddress(_EnumResourceTypes, kernel32, 'EnumResourceTypes' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_EnumResourceTypes]
+ end;
+end;
+
+var
+ _EnumResourceNamesA: Pointer;
+
+function EnumResourceNamesA;
+begin
+ GetProcedureAddress(_EnumResourceNamesA, kernel32, 'EnumResourceNamesA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_EnumResourceNamesA]
+ end;
+end;
+
+var
+ _EnumResourceNamesW: Pointer;
+
+function EnumResourceNamesW;
+begin
+ GetProcedureAddress(_EnumResourceNamesW, kernel32, 'EnumResourceNamesW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_EnumResourceNamesW]
+ end;
+end;
+
+var
+ _EnumResourceNames: Pointer;
+
+function EnumResourceNames;
+begin
+ GetProcedureAddress(_EnumResourceNames, kernel32, 'EnumResourceNames' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_EnumResourceNames]
+ end;
+end;
+
+var
+ _EnumResourceLanguagesA: Pointer;
+
+function EnumResourceLanguagesA;
+begin
+ GetProcedureAddress(_EnumResourceLanguagesA, kernel32, 'EnumResourceLanguagesA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_EnumResourceLanguagesA]
+ end;
+end;
+
+var
+ _EnumResourceLanguagesW: Pointer;
+
+function EnumResourceLanguagesW;
+begin
+ GetProcedureAddress(_EnumResourceLanguagesW, kernel32, 'EnumResourceLanguagesW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_EnumResourceLanguagesW]
+ end;
+end;
+
+var
+ _EnumResourceLanguages: Pointer;
+
+function EnumResourceLanguages;
+begin
+ GetProcedureAddress(_EnumResourceLanguages, kernel32, 'EnumResourceLanguages' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_EnumResourceLanguages]
+ end;
+end;
+
+var
+ _BeginUpdateResourceA: Pointer;
+
+function BeginUpdateResourceA;
+begin
+ GetProcedureAddress(_BeginUpdateResourceA, kernel32, 'BeginUpdateResourceA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_BeginUpdateResourceA]
+ end;
+end;
+
+var
+ _BeginUpdateResourceW: Pointer;
+
+function BeginUpdateResourceW;
+begin
+ GetProcedureAddress(_BeginUpdateResourceW, kernel32, 'BeginUpdateResourceW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_BeginUpdateResourceW]
+ end;
+end;
+
+var
+ _BeginUpdateResource: Pointer;
+
+function BeginUpdateResource;
+begin
+ GetProcedureAddress(_BeginUpdateResource, kernel32, 'BeginUpdateResource' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_BeginUpdateResource]
+ end;
+end;
+
+var
+ _UpdateResourceA: Pointer;
+
+function UpdateResourceA;
+begin
+ GetProcedureAddress(_UpdateResourceA, kernel32, 'UpdateResourceA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_UpdateResourceA]
+ end;
+end;
+
+var
+ _UpdateResourceW: Pointer;
+
+function UpdateResourceW;
+begin
+ GetProcedureAddress(_UpdateResourceW, kernel32, 'UpdateResourceW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_UpdateResourceW]
+ end;
+end;
+
+var
+ _UpdateResource: Pointer;
+
+function UpdateResource;
+begin
+ GetProcedureAddress(_UpdateResource, kernel32, 'UpdateResource' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_UpdateResource]
+ end;
+end;
+
+var
+ _EndUpdateResourceA: Pointer;
+
+function EndUpdateResourceA;
+begin
+ GetProcedureAddress(_EndUpdateResourceA, kernel32, 'EndUpdateResourceA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_EndUpdateResourceA]
+ end;
+end;
+
+var
+ _EndUpdateResourceW: Pointer;
+
+function EndUpdateResourceW;
+begin
+ GetProcedureAddress(_EndUpdateResourceW, kernel32, 'EndUpdateResourceW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_EndUpdateResourceW]
+ end;
+end;
+
+var
+ _EndUpdateResource: Pointer;
+
+function EndUpdateResource;
+begin
+ GetProcedureAddress(_EndUpdateResource, kernel32, 'EndUpdateResource' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_EndUpdateResource]
+ end;
+end;
+
+var
+ _GlobalAddAtomA: Pointer;
+
+function GlobalAddAtomA;
+begin
+ GetProcedureAddress(_GlobalAddAtomA, kernel32, 'GlobalAddAtomA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GlobalAddAtomA]
+ end;
+end;
+
+var
+ _GlobalAddAtomW: Pointer;
+
+function GlobalAddAtomW;
+begin
+ GetProcedureAddress(_GlobalAddAtomW, kernel32, 'GlobalAddAtomW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GlobalAddAtomW]
+ end;
+end;
+
+var
+ _GlobalAddAtom: Pointer;
+
+function GlobalAddAtom;
+begin
+ GetProcedureAddress(_GlobalAddAtom, kernel32, 'GlobalAddAtom' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GlobalAddAtom]
+ end;
+end;
+
+var
+ _GlobalFindAtomA: Pointer;
+
+function GlobalFindAtomA;
+begin
+ GetProcedureAddress(_GlobalFindAtomA, kernel32, 'GlobalFindAtomA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GlobalFindAtomA]
+ end;
+end;
+
+var
+ _GlobalFindAtomW: Pointer;
+
+function GlobalFindAtomW;
+begin
+ GetProcedureAddress(_GlobalFindAtomW, kernel32, 'GlobalFindAtomW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GlobalFindAtomW]
+ end;
+end;
+
+var
+ _GlobalFindAtom: Pointer;
+
+function GlobalFindAtom;
+begin
+ GetProcedureAddress(_GlobalFindAtom, kernel32, 'GlobalFindAtom' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GlobalFindAtom]
+ end;
+end;
+
+var
+ _GlobalGetAtomNameA: Pointer;
+
+function GlobalGetAtomNameA;
+begin
+ GetProcedureAddress(_GlobalGetAtomNameA, kernel32, 'GlobalGetAtomNameA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GlobalGetAtomNameA]
+ end;
+end;
+
+var
+ _GlobalGetAtomNameW: Pointer;
+
+function GlobalGetAtomNameW;
+begin
+ GetProcedureAddress(_GlobalGetAtomNameW, kernel32, 'GlobalGetAtomNameW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GlobalGetAtomNameW]
+ end;
+end;
+
+var
+ _GlobalGetAtomName: Pointer;
+
+function GlobalGetAtomName;
+begin
+ GetProcedureAddress(_GlobalGetAtomName, kernel32, 'GlobalGetAtomName' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GlobalGetAtomName]
+ end;
+end;
+
+var
+ _AddAtomA: Pointer;
+
+function AddAtomA;
+begin
+ GetProcedureAddress(_AddAtomA, kernel32, 'AddAtomA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_AddAtomA]
+ end;
+end;
+
+var
+ _AddAtomW: Pointer;
+
+function AddAtomW;
+begin
+ GetProcedureAddress(_AddAtomW, kernel32, 'AddAtomW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_AddAtomW]
+ end;
+end;
+
+var
+ _AddAtom: Pointer;
+
+function AddAtom;
+begin
+ GetProcedureAddress(_AddAtom, kernel32, 'AddAtom' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_AddAtom]
+ end;
+end;
+
+var
+ _FindAtomA: Pointer;
+
+function FindAtomA;
+begin
+ GetProcedureAddress(_FindAtomA, kernel32, 'FindAtomA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_FindAtomA]
+ end;
+end;
+
+var
+ _FindAtomW: Pointer;
+
+function FindAtomW;
+begin
+ GetProcedureAddress(_FindAtomW, kernel32, 'FindAtomW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_FindAtomW]
+ end;
+end;
+
+var
+ _FindAtom: Pointer;
+
+function FindAtom;
+begin
+ GetProcedureAddress(_FindAtom, kernel32, 'FindAtom' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_FindAtom]
+ end;
+end;
+
+var
+ _GetAtomNameA: Pointer;
+
+function GetAtomNameA;
+begin
+ GetProcedureAddress(_GetAtomNameA, kernel32, 'GetAtomNameA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetAtomNameA]
+ end;
+end;
+
+var
+ _GetAtomNameW: Pointer;
+
+function GetAtomNameW;
+begin
+ GetProcedureAddress(_GetAtomNameW, kernel32, 'GetAtomNameW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetAtomNameW]
+ end;
+end;
+
+var
+ _GetAtomName: Pointer;
+
+function GetAtomName;
+begin
+ GetProcedureAddress(_GetAtomName, kernel32, 'GetAtomName' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetAtomName]
+ end;
+end;
+
+var
+ _GetProfileIntA: Pointer;
+
+function GetProfileIntA;
+begin
+ GetProcedureAddress(_GetProfileIntA, kernel32, 'GetProfileIntA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetProfileIntA]
+ end;
+end;
+
+var
+ _GetProfileIntW: Pointer;
+
+function GetProfileIntW;
+begin
+ GetProcedureAddress(_GetProfileIntW, kernel32, 'GetProfileIntW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetProfileIntW]
+ end;
+end;
+
+var
+ _GetProfileInt: Pointer;
+
+function GetProfileInt;
+begin
+ GetProcedureAddress(_GetProfileInt, kernel32, 'GetProfileInt' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetProfileInt]
+ end;
+end;
+
+var
+ _GetProfileStringA: Pointer;
+
+function GetProfileStringA;
+begin
+ GetProcedureAddress(_GetProfileStringA, kernel32, 'GetProfileStringA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetProfileStringA]
+ end;
+end;
+
+var
+ _GetProfileStringW: Pointer;
+
+function GetProfileStringW;
+begin
+ GetProcedureAddress(_GetProfileStringW, kernel32, 'GetProfileStringW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetProfileStringW]
+ end;
+end;
+
+var
+ _GetProfileString: Pointer;
+
+function GetProfileString;
+begin
+ GetProcedureAddress(_GetProfileString, kernel32, 'GetProfileString' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetProfileString]
+ end;
+end;
+
+var
+ _WriteProfileStringA: Pointer;
+
+function WriteProfileStringA;
+begin
+ GetProcedureAddress(_WriteProfileStringA, kernel32, 'WriteProfileStringA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WriteProfileStringA]
+ end;
+end;
+
+var
+ _WriteProfileStringW: Pointer;
+
+function WriteProfileStringW;
+begin
+ GetProcedureAddress(_WriteProfileStringW, kernel32, 'WriteProfileStringW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WriteProfileStringW]
+ end;
+end;
+
+var
+ _WriteProfileString: Pointer;
+
+function WriteProfileString;
+begin
+ GetProcedureAddress(_WriteProfileString, kernel32, 'WriteProfileString' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WriteProfileString]
+ end;
+end;
+
+var
+ _GetProfileSectionA: Pointer;
+
+function GetProfileSectionA;
+begin
+ GetProcedureAddress(_GetProfileSectionA, kernel32, 'GetProfileSectionA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetProfileSectionA]
+ end;
+end;
+
+var
+ _GetProfileSectionW: Pointer;
+
+function GetProfileSectionW;
+begin
+ GetProcedureAddress(_GetProfileSectionW, kernel32, 'GetProfileSectionW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetProfileSectionW]
+ end;
+end;
+
+var
+ _GetProfileSection: Pointer;
+
+function GetProfileSection;
+begin
+ GetProcedureAddress(_GetProfileSection, kernel32, 'GetProfileSection' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetProfileSection]
+ end;
+end;
+
+var
+ _WriteProfileSectionA: Pointer;
+
+function WriteProfileSectionA;
+begin
+ GetProcedureAddress(_WriteProfileSectionA, kernel32, 'WriteProfileSectionA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WriteProfileSectionA]
+ end;
+end;
+
+var
+ _WriteProfileSectionW: Pointer;
+
+function WriteProfileSectionW;
+begin
+ GetProcedureAddress(_WriteProfileSectionW, kernel32, 'WriteProfileSectionW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WriteProfileSectionW]
+ end;
+end;
+
+var
+ _WriteProfileSection: Pointer;
+
+function WriteProfileSection;
+begin
+ GetProcedureAddress(_WriteProfileSection, kernel32, 'WriteProfileSection' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WriteProfileSection]
+ end;
+end;
+
+var
+ _GetPrivateProfileIntA: Pointer;
+
+function GetPrivateProfileIntA;
+begin
+ GetProcedureAddress(_GetPrivateProfileIntA, kernel32, 'GetPrivateProfileIntA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetPrivateProfileIntA]
+ end;
+end;
+
+var
+ _GetPrivateProfileIntW: Pointer;
+
+function GetPrivateProfileIntW;
+begin
+ GetProcedureAddress(_GetPrivateProfileIntW, kernel32, 'GetPrivateProfileIntW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetPrivateProfileIntW]
+ end;
+end;
+
+var
+ _GetPrivateProfileInt: Pointer;
+
+function GetPrivateProfileInt;
+begin
+ GetProcedureAddress(_GetPrivateProfileInt, kernel32, 'GetPrivateProfileInt' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetPrivateProfileInt]
+ end;
+end;
+
+var
+ _GetPrivateProfileStringA: Pointer;
+
+function GetPrivateProfileStringA;
+begin
+ GetProcedureAddress(_GetPrivateProfileStringA, kernel32, 'GetPrivateProfileStringA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetPrivateProfileStringA]
+ end;
+end;
+
+var
+ _GetPrivateProfileStringW: Pointer;
+
+function GetPrivateProfileStringW;
+begin
+ GetProcedureAddress(_GetPrivateProfileStringW, kernel32, 'GetPrivateProfileStringW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetPrivateProfileStringW]
+ end;
+end;
+
+var
+ _GetPrivateProfileString: Pointer;
+
+function GetPrivateProfileString;
+begin
+ GetProcedureAddress(_GetPrivateProfileString, kernel32, 'GetPrivateProfileString' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetPrivateProfileString]
+ end;
+end;
+
+var
+ _WritePrivateProfileStringA: Pointer;
+
+function WritePrivateProfileStringA;
+begin
+ GetProcedureAddress(_WritePrivateProfileStringA, kernel32, 'WritePrivateProfileStringA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WritePrivateProfileStringA]
+ end;
+end;
+
+var
+ _WritePrivateProfileStringW: Pointer;
+
+function WritePrivateProfileStringW;
+begin
+ GetProcedureAddress(_WritePrivateProfileStringW, kernel32, 'WritePrivateProfileStringW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WritePrivateProfileStringW]
+ end;
+end;
+
+var
+ _WritePrivateProfileString: Pointer;
+
+function WritePrivateProfileString;
+begin
+ GetProcedureAddress(_WritePrivateProfileString, kernel32, 'WritePrivateProfileString' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WritePrivateProfileString]
+ end;
+end;
+
+var
+ _GetPrivateProfileSectionA: Pointer;
+
+function GetPrivateProfileSectionA;
+begin
+ GetProcedureAddress(_GetPrivateProfileSectionA, kernel32, 'GetPrivateProfileSectionA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetPrivateProfileSectionA]
+ end;
+end;
+
+var
+ _GetPrivateProfileSectionW: Pointer;
+
+function GetPrivateProfileSectionW;
+begin
+ GetProcedureAddress(_GetPrivateProfileSectionW, kernel32, 'GetPrivateProfileSectionW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetPrivateProfileSectionW]
+ end;
+end;
+
+var
+ _GetPrivateProfileSection: Pointer;
+
+function GetPrivateProfileSection;
+begin
+ GetProcedureAddress(_GetPrivateProfileSection, kernel32, 'GetPrivateProfileSection' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetPrivateProfileSection]
+ end;
+end;
+
+var
+ _WritePrivateProfileSectionA: Pointer;
+
+function WritePrivateProfileSectionA;
+begin
+ GetProcedureAddress(_WritePrivateProfileSectionA, kernel32, 'WritePrivateProfileSectionA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WritePrivateProfileSectionA]
+ end;
+end;
+
+var
+ _WritePrivateProfileSectionW: Pointer;
+
+function WritePrivateProfileSectionW;
+begin
+ GetProcedureAddress(_WritePrivateProfileSectionW, kernel32, 'WritePrivateProfileSectionW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WritePrivateProfileSectionW]
+ end;
+end;
+
+var
+ _WritePrivateProfileSection: Pointer;
+
+function WritePrivateProfileSection;
+begin
+ GetProcedureAddress(_WritePrivateProfileSection, kernel32, 'WritePrivateProfileSection' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WritePrivateProfileSection]
+ end;
+end;
+
+var
+ _GetPrivateProfileSectionNamesA: Pointer;
+
+function GetPrivateProfileSectionNamesA;
+begin
+ GetProcedureAddress(_GetPrivateProfileSectionNamesA, kernel32, 'GetPrivateProfileSectionNamesA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetPrivateProfileSectionNamesA]
+ end;
+end;
+
+var
+ _GetPrivateProfileSectionNamesW: Pointer;
+
+function GetPrivateProfileSectionNamesW;
+begin
+ GetProcedureAddress(_GetPrivateProfileSectionNamesW, kernel32, 'GetPrivateProfileSectionNamesW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetPrivateProfileSectionNamesW]
+ end;
+end;
+
+var
+ _GetPrivateProfileSectionNames: Pointer;
+
+function GetPrivateProfileSectionNames;
+begin
+ GetProcedureAddress(_GetPrivateProfileSectionNames, kernel32, 'GetPrivateProfileSectionNames' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetPrivateProfileSectionNames]
+ end;
+end;
+
+var
+ _GetPrivateProfileStructA: Pointer;
+
+function GetPrivateProfileStructA;
+begin
+ GetProcedureAddress(_GetPrivateProfileStructA, kernel32, 'GetPrivateProfileStructA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetPrivateProfileStructA]
+ end;
+end;
+
+var
+ _GetPrivateProfileStructW: Pointer;
+
+function GetPrivateProfileStructW;
+begin
+ GetProcedureAddress(_GetPrivateProfileStructW, kernel32, 'GetPrivateProfileStructW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetPrivateProfileStructW]
+ end;
+end;
+
+var
+ _GetPrivateProfileStruct: Pointer;
+
+function GetPrivateProfileStruct;
+begin
+ GetProcedureAddress(_GetPrivateProfileStruct, kernel32, 'GetPrivateProfileStruct' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetPrivateProfileStruct]
+ end;
+end;
+
+var
+ _WritePrivateProfileStructA: Pointer;
+
+function WritePrivateProfileStructA;
+begin
+ GetProcedureAddress(_WritePrivateProfileStructA, kernel32, 'WritePrivateProfileStructA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WritePrivateProfileStructA]
+ end;
+end;
+
+var
+ _WritePrivateProfileStructW: Pointer;
+
+function WritePrivateProfileStructW;
+begin
+ GetProcedureAddress(_WritePrivateProfileStructW, kernel32, 'WritePrivateProfileStructW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WritePrivateProfileStructW]
+ end;
+end;
+
+var
+ _WritePrivateProfileStruct: Pointer;
+
+function WritePrivateProfileStruct;
+begin
+ GetProcedureAddress(_WritePrivateProfileStruct, kernel32, 'WritePrivateProfileStruct' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WritePrivateProfileStruct]
+ end;
+end;
+
+var
+ _GetDriveTypeA: Pointer;
+
+function GetDriveTypeA;
+begin
+ GetProcedureAddress(_GetDriveTypeA, kernel32, 'GetDriveTypeA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetDriveTypeA]
+ end;
+end;
+
+var
+ _GetDriveTypeW: Pointer;
+
+function GetDriveTypeW;
+begin
+ GetProcedureAddress(_GetDriveTypeW, kernel32, 'GetDriveTypeW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetDriveTypeW]
+ end;
+end;
+
+var
+ _GetDriveType: Pointer;
+
+function GetDriveType;
+begin
+ GetProcedureAddress(_GetDriveType, kernel32, 'GetDriveType' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetDriveType]
+ end;
+end;
+
+var
+ _GetSystemDirectoryA: Pointer;
+
+function GetSystemDirectoryA;
+begin
+ GetProcedureAddress(_GetSystemDirectoryA, kernel32, 'GetSystemDirectoryA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetSystemDirectoryA]
+ end;
+end;
+
+var
+ _GetSystemDirectoryW: Pointer;
+
+function GetSystemDirectoryW;
+begin
+ GetProcedureAddress(_GetSystemDirectoryW, kernel32, 'GetSystemDirectoryW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetSystemDirectoryW]
+ end;
+end;
+
+var
+ _GetSystemDirectory: Pointer;
+
+function GetSystemDirectory;
+begin
+ GetProcedureAddress(_GetSystemDirectory, kernel32, 'GetSystemDirectory' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetSystemDirectory]
+ end;
+end;
+
+var
+ _GetTempPathA: Pointer;
+
+function GetTempPathA;
+begin
+ GetProcedureAddress(_GetTempPathA, kernel32, 'GetTempPathA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetTempPathA]
+ end;
+end;
+
+var
+ _GetTempPathW: Pointer;
+
+function GetTempPathW;
+begin
+ GetProcedureAddress(_GetTempPathW, kernel32, 'GetTempPathW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetTempPathW]
+ end;
+end;
+
+var
+ _GetTempPath: Pointer;
+
+function GetTempPath;
+begin
+ GetProcedureAddress(_GetTempPath, kernel32, 'GetTempPath' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetTempPath]
+ end;
+end;
+
+var
+ _GetTempFileNameA: Pointer;
+
+function GetTempFileNameA;
+begin
+ GetProcedureAddress(_GetTempFileNameA, kernel32, 'GetTempFileNameA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetTempFileNameA]
+ end;
+end;
+
+var
+ _GetTempFileNameW: Pointer;
+
+function GetTempFileNameW;
+begin
+ GetProcedureAddress(_GetTempFileNameW, kernel32, 'GetTempFileNameW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetTempFileNameW]
+ end;
+end;
+
+var
+ _GetTempFileName: Pointer;
+
+function GetTempFileName;
+begin
+ GetProcedureAddress(_GetTempFileName, kernel32, 'GetTempFileName' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetTempFileName]
+ end;
+end;
+
+var
+ _GetWindowsDirectoryA: Pointer;
+
+function GetWindowsDirectoryA;
+begin
+ GetProcedureAddress(_GetWindowsDirectoryA, kernel32, 'GetWindowsDirectoryA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetWindowsDirectoryA]
+ end;
+end;
+
+var
+ _GetWindowsDirectoryW: Pointer;
+
+function GetWindowsDirectoryW;
+begin
+ GetProcedureAddress(_GetWindowsDirectoryW, kernel32, 'GetWindowsDirectoryW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetWindowsDirectoryW]
+ end;
+end;
+
+var
+ _GetWindowsDirectory: Pointer;
+
+function GetWindowsDirectory;
+begin
+ GetProcedureAddress(_GetWindowsDirectory, kernel32, 'GetWindowsDirectory' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetWindowsDirectory]
+ end;
+end;
+
+var
+ _GetSystemWindowsDirectoryA: Pointer;
+
+function GetSystemWindowsDirectoryA;
+begin
+ GetProcedureAddress(_GetSystemWindowsDirectoryA, kernel32, 'GetSystemWindowsDirectoryA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetSystemWindowsDirectoryA]
+ end;
+end;
+
+var
+ _GetSystemWindowsDirectoryW: Pointer;
+
+function GetSystemWindowsDirectoryW;
+begin
+ GetProcedureAddress(_GetSystemWindowsDirectoryW, kernel32, 'GetSystemWindowsDirectoryW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetSystemWindowsDirectoryW]
+ end;
+end;
+
+var
+ _GetSystemWindowsDirectory: Pointer;
+
+function GetSystemWindowsDirectory;
+begin
+ GetProcedureAddress(_GetSystemWindowsDirectory, kernel32, 'GetSystemWindowsDirectory' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetSystemWindowsDirectory]
+ end;
+end;
+
+var
+ _GetSystemWow64DirectoryA: Pointer;
+
+function GetSystemWow64DirectoryA;
+begin
+ GetProcedureAddress(_GetSystemWow64DirectoryA, kernel32, 'GetSystemWow64DirectoryA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetSystemWow64DirectoryA]
+ end;
+end;
+
+var
+ _GetSystemWow64DirectoryW: Pointer;
+
+function GetSystemWow64DirectoryW;
+begin
+ GetProcedureAddress(_GetSystemWow64DirectoryW, kernel32, 'GetSystemWow64DirectoryW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetSystemWow64DirectoryW]
+ end;
+end;
+
+var
+ _GetSystemWow64Directory: Pointer;
+
+function GetSystemWow64Directory;
+begin
+ GetProcedureAddress(_GetSystemWow64Directory, kernel32, 'GetSystemWow64Directory' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetSystemWow64Directory]
+ end;
+end;
+
+var
+ _Wow64EnableWow64FsRedirection: Pointer;
+
+function Wow64EnableWow64FsRedirection;
+begin
+ GetProcedureAddress(_Wow64EnableWow64FsRedirection, kernel32, 'Wow64EnableWow64FsRedirection');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_Wow64EnableWow64FsRedirection]
+ end;
+end;
+
+var
+ _SetCurrentDirectoryA: Pointer;
+
+function SetCurrentDirectoryA;
+begin
+ GetProcedureAddress(_SetCurrentDirectoryA, kernel32, 'SetCurrentDirectoryA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetCurrentDirectoryA]
+ end;
+end;
+
+var
+ _SetCurrentDirectoryW: Pointer;
+
+function SetCurrentDirectoryW;
+begin
+ GetProcedureAddress(_SetCurrentDirectoryW, kernel32, 'SetCurrentDirectoryW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetCurrentDirectoryW]
+ end;
+end;
+
+var
+ _SetCurrentDirectory: Pointer;
+
+function SetCurrentDirectory;
+begin
+ GetProcedureAddress(_SetCurrentDirectory, kernel32, 'SetCurrentDirectory' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetCurrentDirectory]
+ end;
+end;
+
+var
+ _GetCurrentDirectoryA: Pointer;
+
+function GetCurrentDirectoryA;
+begin
+ GetProcedureAddress(_GetCurrentDirectoryA, kernel32, 'GetCurrentDirectoryA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetCurrentDirectoryA]
+ end;
+end;
+
+var
+ _GetCurrentDirectoryW: Pointer;
+
+function GetCurrentDirectoryW;
+begin
+ GetProcedureAddress(_GetCurrentDirectoryW, kernel32, 'GetCurrentDirectoryW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetCurrentDirectoryW]
+ end;
+end;
+
+var
+ _GetCurrentDirectory: Pointer;
+
+function GetCurrentDirectory;
+begin
+ GetProcedureAddress(_GetCurrentDirectory, kernel32, 'GetCurrentDirectory' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetCurrentDirectory]
+ end;
+end;
+
+var
+ _SetDllDirectoryA: Pointer;
+
+function SetDllDirectoryA;
+begin
+ GetProcedureAddress(_SetDllDirectoryA, kernel32, 'SetDllDirectoryA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetDllDirectoryA]
+ end;
+end;
+
+var
+ _SetDllDirectoryW: Pointer;
+
+function SetDllDirectoryW;
+begin
+ GetProcedureAddress(_SetDllDirectoryW, kernel32, 'SetDllDirectoryW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetDllDirectoryW]
+ end;
+end;
+
+var
+ _SetDllDirectory: Pointer;
+
+function SetDllDirectory;
+begin
+ GetProcedureAddress(_SetDllDirectory, kernel32, 'SetDllDirectory' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetDllDirectory]
+ end;
+end;
+
+var
+ _GetDllDirectoryA: Pointer;
+
+function GetDllDirectoryA;
+begin
+ GetProcedureAddress(_GetDllDirectoryA, kernel32, 'GetDllDirectoryA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetDllDirectoryA]
+ end;
+end;
+
+var
+ _GetDllDirectoryW: Pointer;
+
+function GetDllDirectoryW;
+begin
+ GetProcedureAddress(_GetDllDirectoryW, kernel32, 'GetDllDirectoryW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetDllDirectoryW]
+ end;
+end;
+
+var
+ _GetDllDirectory: Pointer;
+
+function GetDllDirectory;
+begin
+ GetProcedureAddress(_GetDllDirectory, kernel32, 'GetDllDirectory' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetDllDirectory]
+ end;
+end;
+
+var
+ _GetDiskFreeSpaceA: Pointer;
+
+function GetDiskFreeSpaceA;
+begin
+ GetProcedureAddress(_GetDiskFreeSpaceA, kernel32, 'GetDiskFreeSpaceA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetDiskFreeSpaceA]
+ end;
+end;
+
+var
+ _GetDiskFreeSpaceW: Pointer;
+
+function GetDiskFreeSpaceW;
+begin
+ GetProcedureAddress(_GetDiskFreeSpaceW, kernel32, 'GetDiskFreeSpaceW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetDiskFreeSpaceW]
+ end;
+end;
+
+var
+ _GetDiskFreeSpace: Pointer;
+
+function GetDiskFreeSpace;
+begin
+ GetProcedureAddress(_GetDiskFreeSpace, kernel32, 'GetDiskFreeSpace' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetDiskFreeSpace]
+ end;
+end;
+
+var
+ _GetDiskFreeSpaceExA: Pointer;
+
+function GetDiskFreeSpaceExA;
+begin
+ GetProcedureAddress(_GetDiskFreeSpaceExA, kernel32, 'GetDiskFreeSpaceExA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetDiskFreeSpaceExA]
+ end;
+end;
+
+var
+ _GetDiskFreeSpaceExW: Pointer;
+
+function GetDiskFreeSpaceExW;
+begin
+ GetProcedureAddress(_GetDiskFreeSpaceExW, kernel32, 'GetDiskFreeSpaceExW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetDiskFreeSpaceExW]
+ end;
+end;
+
+var
+ _GetDiskFreeSpaceEx: Pointer;
+
+function GetDiskFreeSpaceEx;
+begin
+ GetProcedureAddress(_GetDiskFreeSpaceEx, kernel32, 'GetDiskFreeSpaceEx' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetDiskFreeSpaceEx]
+ end;
+end;
+
+var
+ _CreateDirectoryA: Pointer;
+
+function CreateDirectoryA;
+begin
+ GetProcedureAddress(_CreateDirectoryA, kernel32, 'CreateDirectoryA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreateDirectoryA]
+ end;
+end;
+
+var
+ _CreateDirectoryW: Pointer;
+
+function CreateDirectoryW;
+begin
+ GetProcedureAddress(_CreateDirectoryW, kernel32, 'CreateDirectoryW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreateDirectoryW]
+ end;
+end;
+
+var
+ _CreateDirectory: Pointer;
+
+function CreateDirectory;
+begin
+ GetProcedureAddress(_CreateDirectory, kernel32, 'CreateDirectory' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreateDirectory]
+ end;
+end;
+
+var
+ _CreateDirectoryExA: Pointer;
+
+function CreateDirectoryExA;
+begin
+ GetProcedureAddress(_CreateDirectoryExA, kernel32, 'CreateDirectoryExA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreateDirectoryExA]
+ end;
+end;
+
+var
+ _CreateDirectoryExW: Pointer;
+
+function CreateDirectoryExW;
+begin
+ GetProcedureAddress(_CreateDirectoryExW, kernel32, 'CreateDirectoryExW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreateDirectoryExW]
+ end;
+end;
+
+var
+ _CreateDirectoryEx: Pointer;
+
+function CreateDirectoryEx;
+begin
+ GetProcedureAddress(_CreateDirectoryEx, kernel32, 'CreateDirectoryEx' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreateDirectoryEx]
+ end;
+end;
+
+var
+ _RemoveDirectoryA: Pointer;
+
+function RemoveDirectoryA;
+begin
+ GetProcedureAddress(_RemoveDirectoryA, kernel32, 'RemoveDirectoryA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RemoveDirectoryA]
+ end;
+end;
+
+var
+ _RemoveDirectoryW: Pointer;
+
+function RemoveDirectoryW;
+begin
+ GetProcedureAddress(_RemoveDirectoryW, kernel32, 'RemoveDirectoryW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RemoveDirectoryW]
+ end;
+end;
+
+var
+ _RemoveDirectory: Pointer;
+
+function RemoveDirectory;
+begin
+ GetProcedureAddress(_RemoveDirectory, kernel32, 'RemoveDirectory' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RemoveDirectory]
+ end;
+end;
+
+var
+ _GetFullPathNameA: Pointer;
+
+function GetFullPathNameA;
+begin
+ GetProcedureAddress(_GetFullPathNameA, kernel32, 'GetFullPathNameA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetFullPathNameA]
+ end;
+end;
+
+var
+ _GetFullPathNameW: Pointer;
+
+function GetFullPathNameW;
+begin
+ GetProcedureAddress(_GetFullPathNameW, kernel32, 'GetFullPathNameW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetFullPathNameW]
+ end;
+end;
+
+var
+ _GetFullPathName: Pointer;
+
+function GetFullPathName;
+begin
+ GetProcedureAddress(_GetFullPathName, kernel32, 'GetFullPathName' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetFullPathName]
+ end;
+end;
+
+var
+ _DefineDosDeviceA: Pointer;
+
+function DefineDosDeviceA;
+begin
+ GetProcedureAddress(_DefineDosDeviceA, kernel32, 'DefineDosDeviceA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DefineDosDeviceA]
+ end;
+end;
+
+var
+ _DefineDosDeviceW: Pointer;
+
+function DefineDosDeviceW;
+begin
+ GetProcedureAddress(_DefineDosDeviceW, kernel32, 'DefineDosDeviceW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DefineDosDeviceW]
+ end;
+end;
+
+var
+ _DefineDosDevice: Pointer;
+
+function DefineDosDevice;
+begin
+ GetProcedureAddress(_DefineDosDevice, kernel32, 'DefineDosDevice' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DefineDosDevice]
+ end;
+end;
+
+var
+ _QueryDosDeviceA: Pointer;
+
+function QueryDosDeviceA;
+begin
+ GetProcedureAddress(_QueryDosDeviceA, kernel32, 'QueryDosDeviceA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_QueryDosDeviceA]
+ end;
+end;
+
+var
+ _QueryDosDeviceW: Pointer;
+
+function QueryDosDeviceW;
+begin
+ GetProcedureAddress(_QueryDosDeviceW, kernel32, 'QueryDosDeviceW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_QueryDosDeviceW]
+ end;
+end;
+
+var
+ _QueryDosDevice: Pointer;
+
+function QueryDosDevice;
+begin
+ GetProcedureAddress(_QueryDosDevice, kernel32, 'QueryDosDevice' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_QueryDosDevice]
+ end;
+end;
+
+var
+ _CreateFileA: Pointer;
+
+function CreateFileA;
+begin
+ GetProcedureAddress(_CreateFileA, kernel32, 'CreateFileA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreateFileA]
+ end;
+end;
+
+var
+ _CreateFileW: Pointer;
+
+function CreateFileW;
+begin
+ GetProcedureAddress(_CreateFileW, kernel32, 'CreateFileW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreateFileW]
+ end;
+end;
+
+var
+ _CreateFile: Pointer;
+
+function CreateFile;
+begin
+ GetProcedureAddress(_CreateFile, kernel32, 'CreateFile' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreateFile]
+ end;
+end;
+
+var
+ _ReOpenFile: Pointer;
+
+function ReOpenFile;
+begin
+ GetProcedureAddress(_ReOpenFile, kernel32, 'ReOpenFile');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ReOpenFile]
+ end;
+end;
+
+var
+ _SetFileAttributesA: Pointer;
+
+function SetFileAttributesA;
+begin
+ GetProcedureAddress(_SetFileAttributesA, kernel32, 'SetFileAttributesA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetFileAttributesA]
+ end;
+end;
+
+var
+ _SetFileAttributesW: Pointer;
+
+function SetFileAttributesW;
+begin
+ GetProcedureAddress(_SetFileAttributesW, kernel32, 'SetFileAttributesW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetFileAttributesW]
+ end;
+end;
+
+var
+ _SetFileAttributes: Pointer;
+
+function SetFileAttributes;
+begin
+ GetProcedureAddress(_SetFileAttributes, kernel32, 'SetFileAttributes' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetFileAttributes]
+ end;
+end;
+
+var
+ _GetFileAttributesA: Pointer;
+
+function GetFileAttributesA;
+begin
+ GetProcedureAddress(_GetFileAttributesA, kernel32, 'GetFileAttributesA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetFileAttributesA]
+ end;
+end;
+
+var
+ _GetFileAttributesW: Pointer;
+
+function GetFileAttributesW;
+begin
+ GetProcedureAddress(_GetFileAttributesW, kernel32, 'GetFileAttributesW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetFileAttributesW]
+ end;
+end;
+
+var
+ _GetFileAttributes: Pointer;
+
+function GetFileAttributes;
+begin
+ GetProcedureAddress(_GetFileAttributes, kernel32, 'GetFileAttributes' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetFileAttributes]
+ end;
+end;
+
+var
+ _GetFileAttributesExA: Pointer;
+
+function GetFileAttributesExA;
+begin
+ GetProcedureAddress(_GetFileAttributesExA, kernel32, 'GetFileAttributesExA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetFileAttributesExA]
+ end;
+end;
+
+var
+ _GetFileAttributesExW: Pointer;
+
+function GetFileAttributesExW;
+begin
+ GetProcedureAddress(_GetFileAttributesExW, kernel32, 'GetFileAttributesExW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetFileAttributesExW]
+ end;
+end;
+
+var
+ _GetFileAttributesEx: Pointer;
+
+function GetFileAttributesEx;
+begin
+ GetProcedureAddress(_GetFileAttributesEx, kernel32, 'GetFileAttributesEx' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetFileAttributesEx]
+ end;
+end;
+
+var
+ _GetCompressedFileSizeA: Pointer;
+
+function GetCompressedFileSizeA;
+begin
+ GetProcedureAddress(_GetCompressedFileSizeA, kernel32, 'GetCompressedFileSizeA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetCompressedFileSizeA]
+ end;
+end;
+
+var
+ _GetCompressedFileSizeW: Pointer;
+
+function GetCompressedFileSizeW;
+begin
+ GetProcedureAddress(_GetCompressedFileSizeW, kernel32, 'GetCompressedFileSizeW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetCompressedFileSizeW]
+ end;
+end;
+
+var
+ _GetCompressedFileSize: Pointer;
+
+function GetCompressedFileSize;
+begin
+ GetProcedureAddress(_GetCompressedFileSize, kernel32, 'GetCompressedFileSize' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetCompressedFileSize]
+ end;
+end;
+
+var
+ _DeleteFileA: Pointer;
+
+function DeleteFileA;
+begin
+ GetProcedureAddress(_DeleteFileA, kernel32, 'DeleteFileA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DeleteFileA]
+ end;
+end;
+
+var
+ _DeleteFileW: Pointer;
+
+function DeleteFileW;
+begin
+ GetProcedureAddress(_DeleteFileW, kernel32, 'DeleteFileW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DeleteFileW]
+ end;
+end;
+
+var
+ _DeleteFile: Pointer;
+
+function DeleteFile;
+begin
+ GetProcedureAddress(_DeleteFile, kernel32, 'DeleteFile' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DeleteFile]
+ end;
+end;
+
+var
+ _FindFirstFileExA: Pointer;
+
+function FindFirstFileExA;
+begin
+ GetProcedureAddress(_FindFirstFileExA, kernel32, 'FindFirstFileExA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_FindFirstFileExA]
+ end;
+end;
+
+var
+ _FindFirstFileExW: Pointer;
+
+function FindFirstFileExW;
+begin
+ GetProcedureAddress(_FindFirstFileExW, kernel32, 'FindFirstFileExW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_FindFirstFileExW]
+ end;
+end;
+
+var
+ _FindFirstFileEx: Pointer;
+
+function FindFirstFileEx;
+begin
+ GetProcedureAddress(_FindFirstFileEx, kernel32, 'FindFirstFileEx' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_FindFirstFileEx]
+ end;
+end;
+
+var
+ _FindFirstFileA: Pointer;
+
+function FindFirstFileA;
+begin
+ GetProcedureAddress(_FindFirstFileA, kernel32, 'FindFirstFileA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_FindFirstFileA]
+ end;
+end;
+
+var
+ _FindFirstFileW: Pointer;
+
+function FindFirstFileW;
+begin
+ GetProcedureAddress(_FindFirstFileW, kernel32, 'FindFirstFileW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_FindFirstFileW]
+ end;
+end;
+
+var
+ _FindFirstFile: Pointer;
+
+function FindFirstFile;
+begin
+ GetProcedureAddress(_FindFirstFile, kernel32, 'FindFirstFile' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_FindFirstFile]
+ end;
+end;
+
+var
+ _FindNextFileA: Pointer;
+
+function FindNextFileA;
+begin
+ GetProcedureAddress(_FindNextFileA, kernel32, 'FindNextFileA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_FindNextFileA]
+ end;
+end;
+
+var
+ _FindNextFileW: Pointer;
+
+function FindNextFileW;
+begin
+ GetProcedureAddress(_FindNextFileW, kernel32, 'FindNextFileW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_FindNextFileW]
+ end;
+end;
+
+var
+ _FindNextFile: Pointer;
+
+function FindNextFile;
+begin
+ GetProcedureAddress(_FindNextFile, kernel32, 'FindNextFile' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_FindNextFile]
+ end;
+end;
+
+var
+ _SearchPathA: Pointer;
+
+function SearchPathA;
+begin
+ GetProcedureAddress(_SearchPathA, kernel32, 'SearchPathA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SearchPathA]
+ end;
+end;
+
+var
+ _SearchPathW: Pointer;
+
+function SearchPathW;
+begin
+ GetProcedureAddress(_SearchPathW, kernel32, 'SearchPathW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SearchPathW]
+ end;
+end;
+
+var
+ _SearchPath: Pointer;
+
+function SearchPath;
+begin
+ GetProcedureAddress(_SearchPath, kernel32, 'SearchPath' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SearchPath]
+ end;
+end;
+
+var
+ _CopyFileA: Pointer;
+
+function CopyFileA;
+begin
+ GetProcedureAddress(_CopyFileA, kernel32, 'CopyFileA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CopyFileA]
+ end;
+end;
+
+var
+ _CopyFileW: Pointer;
+
+function CopyFileW;
+begin
+ GetProcedureAddress(_CopyFileW, kernel32, 'CopyFileW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CopyFileW]
+ end;
+end;
+
+var
+ _CopyFile: Pointer;
+
+function CopyFile;
+begin
+ GetProcedureAddress(_CopyFile, kernel32, 'CopyFile' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CopyFile]
+ end;
+end;
+
+var
+ _CopyFileExA: Pointer;
+
+function CopyFileExA;
+begin
+ GetProcedureAddress(_CopyFileExA, kernel32, 'CopyFileExA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CopyFileExA]
+ end;
+end;
+
+var
+ _CopyFileExW: Pointer;
+
+function CopyFileExW;
+begin
+ GetProcedureAddress(_CopyFileExW, kernel32, 'CopyFileExW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CopyFileExW]
+ end;
+end;
+
+var
+ _CopyFileEx: Pointer;
+
+function CopyFileEx;
+begin
+ GetProcedureAddress(_CopyFileEx, kernel32, 'CopyFileEx' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CopyFileEx]
+ end;
+end;
+
+var
+ _MoveFileA: Pointer;
+
+function MoveFileA;
+begin
+ GetProcedureAddress(_MoveFileA, kernel32, 'MoveFileA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MoveFileA]
+ end;
+end;
+
+var
+ _MoveFileW: Pointer;
+
+function MoveFileW;
+begin
+ GetProcedureAddress(_MoveFileW, kernel32, 'MoveFileW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MoveFileW]
+ end;
+end;
+
+var
+ _MoveFile: Pointer;
+
+function MoveFile;
+begin
+ GetProcedureAddress(_MoveFile, kernel32, 'MoveFile' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MoveFile]
+ end;
+end;
+
+var
+ _MoveFileExA: Pointer;
+
+function MoveFileExA;
+begin
+ GetProcedureAddress(_MoveFileExA, kernel32, 'MoveFileExA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MoveFileExA]
+ end;
+end;
+
+var
+ _MoveFileExW: Pointer;
+
+function MoveFileExW;
+begin
+ GetProcedureAddress(_MoveFileExW, kernel32, 'MoveFileExW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MoveFileExW]
+ end;
+end;
+
+var
+ _MoveFileEx: Pointer;
+
+function MoveFileEx;
+begin
+ GetProcedureAddress(_MoveFileEx, kernel32, 'MoveFileEx' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MoveFileEx]
+ end;
+end;
+
+var
+ _MoveFileWithProgressA: Pointer;
+
+function MoveFileWithProgressA;
+begin
+ GetProcedureAddress(_MoveFileWithProgressA, kernel32, 'MoveFileWithProgressA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MoveFileWithProgressA]
+ end;
+end;
+
+var
+ _MoveFileWithProgressW: Pointer;
+
+function MoveFileWithProgressW;
+begin
+ GetProcedureAddress(_MoveFileWithProgressW, kernel32, 'MoveFileWithProgressW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MoveFileWithProgressW]
+ end;
+end;
+
+var
+ _MoveFileWithProgress: Pointer;
+
+function MoveFileWithProgress;
+begin
+ GetProcedureAddress(_MoveFileWithProgress, kernel32, 'MoveFileWithProgress' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MoveFileWithProgress]
+ end;
+end;
+
+var
+ _ReplaceFileA: Pointer;
+
+function ReplaceFileA;
+begin
+ GetProcedureAddress(_ReplaceFileA, kernel32, 'ReplaceFileA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ReplaceFileA]
+ end;
+end;
+
+var
+ _ReplaceFileW: Pointer;
+
+function ReplaceFileW;
+begin
+ GetProcedureAddress(_ReplaceFileW, kernel32, 'ReplaceFileW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ReplaceFileW]
+ end;
+end;
+
+var
+ _ReplaceFile: Pointer;
+
+function ReplaceFile;
+begin
+ GetProcedureAddress(_ReplaceFile, kernel32, 'ReplaceFile' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ReplaceFile]
+ end;
+end;
+
+var
+ _CreateHardLinkA: Pointer;
+
+function CreateHardLinkA;
+begin
+ GetProcedureAddress(_CreateHardLinkA, kernel32, 'CreateHardLinkA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreateHardLinkA]
+ end;
+end;
+
+var
+ _CreateHardLinkW: Pointer;
+
+function CreateHardLinkW;
+begin
+ GetProcedureAddress(_CreateHardLinkW, kernel32, 'CreateHardLinkW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreateHardLinkW]
+ end;
+end;
+
+var
+ _CreateHardLink: Pointer;
+
+function CreateHardLink;
+begin
+ GetProcedureAddress(_CreateHardLink, kernel32, 'CreateHardLink' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreateHardLink]
+ end;
+end;
+
+var
+ _FindFirstStreamW: Pointer;
+
+function FindFirstStreamW;
+begin
+ GetProcedureAddress(_FindFirstStreamW, kernel32, 'FindFirstStreamW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_FindFirstStreamW]
+ end;
+end;
+
+var
+ _FindNextStreamW: Pointer;
+
+function FindNextStreamW;
+begin
+ GetProcedureAddress(_FindNextStreamW, kernel32, 'FindNextStreamW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_FindNextStreamW]
+ end;
+end;
+
+var
+ _CreateNamedPipeA: Pointer;
+
+function CreateNamedPipeA;
+begin
+ GetProcedureAddress(_CreateNamedPipeA, kernel32, 'CreateNamedPipeA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreateNamedPipeA]
+ end;
+end;
+
+var
+ _CreateNamedPipeW: Pointer;
+
+function CreateNamedPipeW;
+begin
+ GetProcedureAddress(_CreateNamedPipeW, kernel32, 'CreateNamedPipeW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreateNamedPipeW]
+ end;
+end;
+
+var
+ _CreateNamedPipe: Pointer;
+
+function CreateNamedPipe;
+begin
+ GetProcedureAddress(_CreateNamedPipe, kernel32, 'CreateNamedPipe' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreateNamedPipe]
+ end;
+end;
+
+var
+ _GetNamedPipeHandleStateA: Pointer;
+
+function GetNamedPipeHandleStateA;
+begin
+ GetProcedureAddress(_GetNamedPipeHandleStateA, kernel32, 'GetNamedPipeHandleStateA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetNamedPipeHandleStateA]
+ end;
+end;
+
+var
+ _GetNamedPipeHandleStateW: Pointer;
+
+function GetNamedPipeHandleStateW;
+begin
+ GetProcedureAddress(_GetNamedPipeHandleStateW, kernel32, 'GetNamedPipeHandleStateW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetNamedPipeHandleStateW]
+ end;
+end;
+
+var
+ _GetNamedPipeHandleState: Pointer;
+
+function GetNamedPipeHandleState;
+begin
+ GetProcedureAddress(_GetNamedPipeHandleState, kernel32, 'GetNamedPipeHandleState' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetNamedPipeHandleState]
+ end;
+end;
+
+var
+ _CallNamedPipeA: Pointer;
+
+function CallNamedPipeA;
+begin
+ GetProcedureAddress(_CallNamedPipeA, kernel32, 'CallNamedPipeA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CallNamedPipeA]
+ end;
+end;
+
+var
+ _CallNamedPipeW: Pointer;
+
+function CallNamedPipeW;
+begin
+ GetProcedureAddress(_CallNamedPipeW, kernel32, 'CallNamedPipeW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CallNamedPipeW]
+ end;
+end;
+
+var
+ _CallNamedPipe: Pointer;
+
+function CallNamedPipe;
+begin
+ GetProcedureAddress(_CallNamedPipe, kernel32, 'CallNamedPipe' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CallNamedPipe]
+ end;
+end;
+
+var
+ _WaitNamedPipeA: Pointer;
+
+function WaitNamedPipeA;
+begin
+ GetProcedureAddress(_WaitNamedPipeA, kernel32, 'WaitNamedPipeA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WaitNamedPipeA]
+ end;
+end;
+
+var
+ _WaitNamedPipeW: Pointer;
+
+function WaitNamedPipeW;
+begin
+ GetProcedureAddress(_WaitNamedPipeW, kernel32, 'WaitNamedPipeW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WaitNamedPipeW]
+ end;
+end;
+
+var
+ _WaitNamedPipe: Pointer;
+
+function WaitNamedPipe;
+begin
+ GetProcedureAddress(_WaitNamedPipe, kernel32, 'WaitNamedPipe' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WaitNamedPipe]
+ end;
+end;
+
+var
+ _SetVolumeLabelA: Pointer;
+
+function SetVolumeLabelA;
+begin
+ GetProcedureAddress(_SetVolumeLabelA, kernel32, 'SetVolumeLabelA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetVolumeLabelA]
+ end;
+end;
+
+var
+ _SetVolumeLabelW: Pointer;
+
+function SetVolumeLabelW;
+begin
+ GetProcedureAddress(_SetVolumeLabelW, kernel32, 'SetVolumeLabelW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetVolumeLabelW]
+ end;
+end;
+
+var
+ _SetVolumeLabel: Pointer;
+
+function SetVolumeLabel;
+begin
+ GetProcedureAddress(_SetVolumeLabel, kernel32, 'SetVolumeLabel' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetVolumeLabel]
+ end;
+end;
+
+var
+ _SetFileApisToOEM: Pointer;
+
+procedure SetFileApisToOEM;
+begin
+ GetProcedureAddress(_SetFileApisToOEM, kernel32, 'SetFileApisToOEM');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetFileApisToOEM]
+ end;
+end;
+
+var
+ _SetFileApisToANSI: Pointer;
+
+procedure SetFileApisToANSI;
+begin
+ GetProcedureAddress(_SetFileApisToANSI, kernel32, 'SetFileApisToANSI');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetFileApisToANSI]
+ end;
+end;
+
+var
+ _AreFileApisANSI: Pointer;
+
+function AreFileApisANSI;
+begin
+ GetProcedureAddress(_AreFileApisANSI, kernel32, 'AreFileApisANSI');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_AreFileApisANSI]
+ end;
+end;
+
+var
+ _GetVolumeInformationA: Pointer;
+
+function GetVolumeInformationA;
+begin
+ GetProcedureAddress(_GetVolumeInformationA, kernel32, 'GetVolumeInformationA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetVolumeInformationA]
+ end;
+end;
+
+var
+ _GetVolumeInformationW: Pointer;
+
+function GetVolumeInformationW;
+begin
+ GetProcedureAddress(_GetVolumeInformationW, kernel32, 'GetVolumeInformationW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetVolumeInformationW]
+ end;
+end;
+
+var
+ _GetVolumeInformation: Pointer;
+
+function GetVolumeInformation;
+begin
+ GetProcedureAddress(_GetVolumeInformation, kernel32, 'GetVolumeInformation' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetVolumeInformation]
+ end;
+end;
+
+var
+ _CancelIo: Pointer;
+
+function CancelIo;
+begin
+ GetProcedureAddress(_CancelIo, kernel32, 'CancelIo');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CancelIo]
+ end;
+end;
+
+var
+ _ClearEventLogA: Pointer;
+
+function ClearEventLogA;
+begin
+ GetProcedureAddress(_ClearEventLogA, advapi32, 'ClearEventLogA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ClearEventLogA]
+ end;
+end;
+
+var
+ _ClearEventLogW: Pointer;
+
+function ClearEventLogW;
+begin
+ GetProcedureAddress(_ClearEventLogW, advapi32, 'ClearEventLogW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ClearEventLogW]
+ end;
+end;
+
+var
+ _ClearEventLog: Pointer;
+
+function ClearEventLog;
+begin
+ GetProcedureAddress(_ClearEventLog, advapi32, 'ClearEventLog' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ClearEventLog]
+ end;
+end;
+
+var
+ _BackupEventLogA: Pointer;
+
+function BackupEventLogA;
+begin
+ GetProcedureAddress(_BackupEventLogA, advapi32, 'BackupEventLogA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_BackupEventLogA]
+ end;
+end;
+
+var
+ _BackupEventLogW: Pointer;
+
+function BackupEventLogW;
+begin
+ GetProcedureAddress(_BackupEventLogW, advapi32, 'BackupEventLogW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_BackupEventLogW]
+ end;
+end;
+
+var
+ _BackupEventLog: Pointer;
+
+function BackupEventLog;
+begin
+ GetProcedureAddress(_BackupEventLog, advapi32, 'BackupEventLog' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_BackupEventLog]
+ end;
+end;
+
+var
+ _CloseEventLog: Pointer;
+
+function CloseEventLog;
+begin
+ GetProcedureAddress(_CloseEventLog, advapi32, 'CloseEventLog');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CloseEventLog]
+ end;
+end;
+
+var
+ _DeregisterEventSource: Pointer;
+
+function DeregisterEventSource;
+begin
+ GetProcedureAddress(_DeregisterEventSource, advapi32, 'DeregisterEventSource');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DeregisterEventSource]
+ end;
+end;
+
+var
+ _NotifyChangeEventLog: Pointer;
+
+function NotifyChangeEventLog;
+begin
+ GetProcedureAddress(_NotifyChangeEventLog, advapi32, 'NotifyChangeEventLog');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NotifyChangeEventLog]
+ end;
+end;
+
+var
+ _GetNumberOfEventLogRecords: Pointer;
+
+function GetNumberOfEventLogRecords;
+begin
+ GetProcedureAddress(_GetNumberOfEventLogRecords, advapi32, 'GetNumberOfEventLogRecords');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetNumberOfEventLogRecords]
+ end;
+end;
+
+var
+ _GetOldestEventLogRecord: Pointer;
+
+function GetOldestEventLogRecord;
+begin
+ GetProcedureAddress(_GetOldestEventLogRecord, advapi32, 'GetOldestEventLogRecord');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetOldestEventLogRecord]
+ end;
+end;
+
+var
+ _OpenEventLogA: Pointer;
+
+function OpenEventLogA;
+begin
+ GetProcedureAddress(_OpenEventLogA, advapi32, 'OpenEventLogA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_OpenEventLogA]
+ end;
+end;
+
+var
+ _OpenEventLogW: Pointer;
+
+function OpenEventLogW;
+begin
+ GetProcedureAddress(_OpenEventLogW, advapi32, 'OpenEventLogW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_OpenEventLogW]
+ end;
+end;
+
+var
+ _OpenEventLog: Pointer;
+
+function OpenEventLog;
+begin
+ GetProcedureAddress(_OpenEventLog, advapi32, 'OpenEventLog' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_OpenEventLog]
+ end;
+end;
+
+var
+ _RegisterEventSourceA: Pointer;
+
+function RegisterEventSourceA;
+begin
+ GetProcedureAddress(_RegisterEventSourceA, advapi32, 'RegisterEventSourceA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RegisterEventSourceA]
+ end;
+end;
+
+var
+ _RegisterEventSourceW: Pointer;
+
+function RegisterEventSourceW;
+begin
+ GetProcedureAddress(_RegisterEventSourceW, advapi32, 'RegisterEventSourceW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RegisterEventSourceW]
+ end;
+end;
+
+var
+ _RegisterEventSource: Pointer;
+
+function RegisterEventSource;
+begin
+ GetProcedureAddress(_RegisterEventSource, advapi32, 'RegisterEventSource' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RegisterEventSource]
+ end;
+end;
+
+var
+ _OpenBackupEventLogA: Pointer;
+
+function OpenBackupEventLogA;
+begin
+ GetProcedureAddress(_OpenBackupEventLogA, advapi32, 'OpenBackupEventLogA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_OpenBackupEventLogA]
+ end;
+end;
+
+var
+ _OpenBackupEventLogW: Pointer;
+
+function OpenBackupEventLogW;
+begin
+ GetProcedureAddress(_OpenBackupEventLogW, advapi32, 'OpenBackupEventLogW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_OpenBackupEventLogW]
+ end;
+end;
+
+var
+ _OpenBackupEventLog: Pointer;
+
+function OpenBackupEventLog;
+begin
+ GetProcedureAddress(_OpenBackupEventLog, advapi32, 'OpenBackupEventLog' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_OpenBackupEventLog]
+ end;
+end;
+
+var
+ _ReadEventLogA: Pointer;
+
+function ReadEventLogA;
+begin
+ GetProcedureAddress(_ReadEventLogA, advapi32, 'ReadEventLogA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ReadEventLogA]
+ end;
+end;
+
+var
+ _ReadEventLogW: Pointer;
+
+function ReadEventLogW;
+begin
+ GetProcedureAddress(_ReadEventLogW, advapi32, 'ReadEventLogW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ReadEventLogW]
+ end;
+end;
+
+var
+ _ReadEventLog: Pointer;
+
+function ReadEventLog;
+begin
+ GetProcedureAddress(_ReadEventLog, advapi32, 'ReadEventLog' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ReadEventLog]
+ end;
+end;
+
+var
+ _ReportEventA: Pointer;
+
+function ReportEventA;
+begin
+ GetProcedureAddress(_ReportEventA, advapi32, 'ReportEventA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ReportEventA]
+ end;
+end;
+
+var
+ _ReportEventW: Pointer;
+
+function ReportEventW;
+begin
+ GetProcedureAddress(_ReportEventW, advapi32, 'ReportEventW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ReportEventW]
+ end;
+end;
+
+var
+ _ReportEvent: Pointer;
+
+function ReportEvent;
+begin
+ GetProcedureAddress(_ReportEvent, advapi32, 'ReportEvent' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ReportEvent]
+ end;
+end;
+
+var
+ _GetEventLogInformation: Pointer;
+
+function GetEventLogInformation;
+begin
+ GetProcedureAddress(_GetEventLogInformation, advapi32, 'GetEventLogInformation');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetEventLogInformation]
+ end;
+end;
+
+var
+ _DuplicateToken: Pointer;
+
+function DuplicateToken;
+begin
+ GetProcedureAddress(_DuplicateToken, advapi32, 'DuplicateToken');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DuplicateToken]
+ end;
+end;
+
+var
+ _GetKernelObjectSecurity: Pointer;
+
+function GetKernelObjectSecurity;
+begin
+ GetProcedureAddress(_GetKernelObjectSecurity, advapi32, 'GetKernelObjectSecurity');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetKernelObjectSecurity]
+ end;
+end;
+
+var
+ _ImpersonateNamedPipeClient: Pointer;
+
+function ImpersonateNamedPipeClient;
+begin
+ GetProcedureAddress(_ImpersonateNamedPipeClient, advapi32, 'ImpersonateNamedPipeClient');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ImpersonateNamedPipeClient]
+ end;
+end;
+
+var
+ _ImpersonateSelf: Pointer;
+
+function ImpersonateSelf;
+begin
+ GetProcedureAddress(_ImpersonateSelf, advapi32, 'ImpersonateSelf');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ImpersonateSelf]
+ end;
+end;
+
+var
+ _RevertToSelf: Pointer;
+
+function RevertToSelf;
+begin
+ GetProcedureAddress(_RevertToSelf, advapi32, 'RevertToSelf');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RevertToSelf]
+ end;
+end;
+
+var
+ _SetThreadToken: Pointer;
+
+function SetThreadToken;
+begin
+ GetProcedureAddress(_SetThreadToken, advapi32, 'SetThreadToken');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetThreadToken]
+ end;
+end;
+
+var
+ _AccessCheck: Pointer;
+
+function AccessCheck;
+begin
+ GetProcedureAddress(_AccessCheck, advapi32, 'AccessCheck');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_AccessCheck]
+ end;
+end;
+
+var
+ _AccessCheckByType: Pointer;
+
+function AccessCheckByType;
+begin
+ GetProcedureAddress(_AccessCheckByType, advapi32, 'AccessCheckByType');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_AccessCheckByType]
+ end;
+end;
+
+var
+ _AccessCheckByTypeResultList: Pointer;
+
+function AccessCheckByTypeResultList;
+begin
+ GetProcedureAddress(_AccessCheckByTypeResultList, advapi32, 'AccessCheckByTypeResultList');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_AccessCheckByTypeResultList]
+ end;
+end;
+
+var
+ _OpenProcessToken: Pointer;
+
+function OpenProcessToken;
+begin
+ GetProcedureAddress(_OpenProcessToken, advapi32, 'OpenProcessToken');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_OpenProcessToken]
+ end;
+end;
+
+var
+ _OpenThreadToken: Pointer;
+
+function OpenThreadToken;
+begin
+ GetProcedureAddress(_OpenThreadToken, advapi32, 'OpenThreadToken');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_OpenThreadToken]
+ end;
+end;
+
+var
+ _GetTokenInformation: Pointer;
+
+function GetTokenInformation;
+begin
+ GetProcedureAddress(_GetTokenInformation, advapi32, 'GetTokenInformation');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetTokenInformation]
+ end;
+end;
+
+var
+ _SetTokenInformation: Pointer;
+
+function SetTokenInformation;
+begin
+ GetProcedureAddress(_SetTokenInformation, advapi32, 'SetTokenInformation');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetTokenInformation]
+ end;
+end;
+
+var
+ _AdjustTokenPrivileges: Pointer;
+
+function AdjustTokenPrivileges;
+begin
+ GetProcedureAddress(_AdjustTokenPrivileges, advapi32, 'AdjustTokenPrivileges');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_AdjustTokenPrivileges]
+ end;
+end;
+
+var
+ _AdjustTokenGroups: Pointer;
+
+function AdjustTokenGroups;
+begin
+ GetProcedureAddress(_AdjustTokenGroups, advapi32, 'AdjustTokenGroups');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_AdjustTokenGroups]
+ end;
+end;
+
+var
+ _PrivilegeCheck: Pointer;
+
+function PrivilegeCheck;
+begin
+ GetProcedureAddress(_PrivilegeCheck, advapi32, 'PrivilegeCheck');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PrivilegeCheck]
+ end;
+end;
+
+var
+ _AccessCheckAndAuditAlarmA: Pointer;
+
+function AccessCheckAndAuditAlarmA;
+begin
+ GetProcedureAddress(_AccessCheckAndAuditAlarmA, advapi32, 'AccessCheckAndAuditAlarmA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_AccessCheckAndAuditAlarmA]
+ end;
+end;
+
+var
+ _AccessCheckAndAuditAlarmW: Pointer;
+
+function AccessCheckAndAuditAlarmW;
+begin
+ GetProcedureAddress(_AccessCheckAndAuditAlarmW, advapi32, 'AccessCheckAndAuditAlarmW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_AccessCheckAndAuditAlarmW]
+ end;
+end;
+
+var
+ _AccessCheckAndAuditAlarm: Pointer;
+
+function AccessCheckAndAuditAlarm;
+begin
+ GetProcedureAddress(_AccessCheckAndAuditAlarm, advapi32, 'AccessCheckAndAuditAlarm' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_AccessCheckAndAuditAlarm]
+ end;
+end;
+
+var
+ _AccessCheckByTypeAndAuditAlarmA: Pointer;
+
+function AccessCheckByTypeAndAuditAlarmA;
+begin
+ GetProcedureAddress(_AccessCheckByTypeAndAuditAlarmA, advapi32, 'AccessCheckByTypeAndAuditAlarmA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_AccessCheckByTypeAndAuditAlarmA]
+ end;
+end;
+
+var
+ _AccessCheckByTypeAndAuditAlarmW: Pointer;
+
+function AccessCheckByTypeAndAuditAlarmW;
+begin
+ GetProcedureAddress(_AccessCheckByTypeAndAuditAlarmW, advapi32, 'AccessCheckByTypeAndAuditAlarmW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_AccessCheckByTypeAndAuditAlarmW]
+ end;
+end;
+
+var
+ _AccessCheckByTypeAndAuditAlarm: Pointer;
+
+function AccessCheckByTypeAndAuditAlarm;
+begin
+ GetProcedureAddress(_AccessCheckByTypeAndAuditAlarm, advapi32, 'AccessCheckByTypeAndAuditAlarm' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_AccessCheckByTypeAndAuditAlarm]
+ end;
+end;
+
+var
+ _AccessCheckByTypeResultListAndA: Pointer;
+
+function AccessCheckByTypeResultListAndAuditAlarmA;
+begin
+ GetProcedureAddress(_AccessCheckByTypeResultListAndA, advapi32, 'AccessCheckByTypeResultListAndAuditAlarmA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_AccessCheckByTypeResultListAndA]
+ end;
+end;
+
+var
+ _AccessCheckByTypeResultListAndW: Pointer;
+
+function AccessCheckByTypeResultListAndAuditAlarmW;
+begin
+ GetProcedureAddress(_AccessCheckByTypeResultListAndW, advapi32, 'AccessCheckByTypeResultListAndAuditAlarmW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_AccessCheckByTypeResultListAndW]
+ end;
+end;
+
+var
+ _AccessCheckByTypeResultListAnd: Pointer;
+
+function AccessCheckByTypeResultListAndAuditAlarm;
+begin
+ GetProcedureAddress(_AccessCheckByTypeResultListAnd, advapi32, 'AccessCheckByTypeResultListAndAuditAlarm' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_AccessCheckByTypeResultListAnd]
+ end;
+end;
+
+var
+ _AccessCheckByTRLAndAAByHA: Pointer;
+
+function AccessCheckByTypeResultListAndAuditAlarmByHandleA;
+begin
+ GetProcedureAddress(_AccessCheckByTRLAndAAByHA, advapi32, 'AccessCheckByTypeResultListAndAuditAlarmByHandleA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_AccessCheckByTRLAndAAByHA]
+ end;
+end;
+
+var
+ _AccessCheckByTRLAndAAByHW: Pointer;
+
+function AccessCheckByTypeResultListAndAuditAlarmByHandleW;
+begin
+ GetProcedureAddress(_AccessCheckByTRLAndAAByHW, advapi32, 'AccessCheckByTypeResultListAndAuditAlarmByHandleW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_AccessCheckByTRLAndAAByHW]
+ end;
+end;
+
+var
+ _AccessCheckByTRLAndAAByH: Pointer;
+
+function AccessCheckByTypeResultListAndAuditAlarmByHandle;
+begin
+ GetProcedureAddress(_AccessCheckByTRLAndAAByH, advapi32, 'AccessCheckByTypeResultListAndAuditAlarmByHandle' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_AccessCheckByTRLAndAAByH]
+ end;
+end;
+
+var
+ _ObjectOpenAuditAlarmA: Pointer;
+
+function ObjectOpenAuditAlarmA;
+begin
+ GetProcedureAddress(_ObjectOpenAuditAlarmA, advapi32, 'ObjectOpenAuditAlarmA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ObjectOpenAuditAlarmA]
+ end;
+end;
+
+var
+ _ObjectOpenAuditAlarmW: Pointer;
+
+function ObjectOpenAuditAlarmW;
+begin
+ GetProcedureAddress(_ObjectOpenAuditAlarmW, advapi32, 'ObjectOpenAuditAlarmW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ObjectOpenAuditAlarmW]
+ end;
+end;
+
+var
+ _ObjectOpenAuditAlarm: Pointer;
+
+function ObjectOpenAuditAlarm;
+begin
+ GetProcedureAddress(_ObjectOpenAuditAlarm, advapi32, 'ObjectOpenAuditAlarm' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ObjectOpenAuditAlarm]
+ end;
+end;
+
+var
+ _ObjectPrivilegeAuditAlarmA: Pointer;
+
+function ObjectPrivilegeAuditAlarmA;
+begin
+ GetProcedureAddress(_ObjectPrivilegeAuditAlarmA, advapi32, 'ObjectPrivilegeAuditAlarmA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ObjectPrivilegeAuditAlarmA]
+ end;
+end;
+
+var
+ _ObjectPrivilegeAuditAlarmW: Pointer;
+
+function ObjectPrivilegeAuditAlarmW;
+begin
+ GetProcedureAddress(_ObjectPrivilegeAuditAlarmW, advapi32, 'ObjectPrivilegeAuditAlarmW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ObjectPrivilegeAuditAlarmW]
+ end;
+end;
+
+var
+ _ObjectPrivilegeAuditAlarm: Pointer;
+
+function ObjectPrivilegeAuditAlarm;
+begin
+ GetProcedureAddress(_ObjectPrivilegeAuditAlarm, advapi32, 'ObjectPrivilegeAuditAlarm' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ObjectPrivilegeAuditAlarm]
+ end;
+end;
+
+var
+ _ObjectCloseAuditAlarmA: Pointer;
+
+function ObjectCloseAuditAlarmA;
+begin
+ GetProcedureAddress(_ObjectCloseAuditAlarmA, advapi32, 'ObjectCloseAuditAlarmA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ObjectCloseAuditAlarmA]
+ end;
+end;
+
+var
+ _ObjectCloseAuditAlarmW: Pointer;
+
+function ObjectCloseAuditAlarmW;
+begin
+ GetProcedureAddress(_ObjectCloseAuditAlarmW, advapi32, 'ObjectCloseAuditAlarmW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ObjectCloseAuditAlarmW]
+ end;
+end;
+
+var
+ _ObjectCloseAuditAlarm: Pointer;
+
+function ObjectCloseAuditAlarm;
+begin
+ GetProcedureAddress(_ObjectCloseAuditAlarm, advapi32, 'ObjectCloseAuditAlarm' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ObjectCloseAuditAlarm]
+ end;
+end;
+
+var
+ _ObjectDeleteAuditAlarmA: Pointer;
+
+function ObjectDeleteAuditAlarmA;
+begin
+ GetProcedureAddress(_ObjectDeleteAuditAlarmA, advapi32, 'ObjectDeleteAuditAlarmA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ObjectDeleteAuditAlarmA]
+ end;
+end;
+
+var
+ _ObjectDeleteAuditAlarmW: Pointer;
+
+function ObjectDeleteAuditAlarmW;
+begin
+ GetProcedureAddress(_ObjectDeleteAuditAlarmW, advapi32, 'ObjectDeleteAuditAlarmW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ObjectDeleteAuditAlarmW]
+ end;
+end;
+
+var
+ _ObjectDeleteAuditAlarm: Pointer;
+
+function ObjectDeleteAuditAlarm;
+begin
+ GetProcedureAddress(_ObjectDeleteAuditAlarm, advapi32, 'ObjectDeleteAuditAlarm' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ObjectDeleteAuditAlarm]
+ end;
+end;
+
+var
+ _PrivilegedServiceAuditAlarmA: Pointer;
+
+function PrivilegedServiceAuditAlarmA;
+begin
+ GetProcedureAddress(_PrivilegedServiceAuditAlarmA, advapi32, 'PrivilegedServiceAuditAlarmA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PrivilegedServiceAuditAlarmA]
+ end;
+end;
+
+var
+ _PrivilegedServiceAuditAlarmW: Pointer;
+
+function PrivilegedServiceAuditAlarmW;
+begin
+ GetProcedureAddress(_PrivilegedServiceAuditAlarmW, advapi32, 'PrivilegedServiceAuditAlarmW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PrivilegedServiceAuditAlarmW]
+ end;
+end;
+
+var
+ _PrivilegedServiceAuditAlarm: Pointer;
+
+function PrivilegedServiceAuditAlarm;
+begin
+ GetProcedureAddress(_PrivilegedServiceAuditAlarm, advapi32, 'PrivilegedServiceAuditAlarm' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PrivilegedServiceAuditAlarm]
+ end;
+end;
+
+var
+ _IsWellKnownSid: Pointer;
+
+function IsWellKnownSid;
+begin
+ GetProcedureAddress(_IsWellKnownSid, advapi32, 'IsWellKnownSid');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_IsWellKnownSid]
+ end;
+end;
+
+var
+ _CreateWellKnownSid: Pointer;
+
+function CreateWellKnownSid;
+begin
+ GetProcedureAddress(_CreateWellKnownSid, advapi32, 'CreateWellKnownSid');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreateWellKnownSid]
+ end;
+end;
+
+var
+ _EqualDomainSid: Pointer;
+
+function EqualDomainSid;
+begin
+ GetProcedureAddress(_EqualDomainSid, advapi32, 'EqualDomainSid');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_EqualDomainSid]
+ end;
+end;
+
+var
+ _GetWindowsAccountDomainSid: Pointer;
+
+function GetWindowsAccountDomainSid;
+begin
+ GetProcedureAddress(_GetWindowsAccountDomainSid, advapi32, 'GetWindowsAccountDomainSid');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetWindowsAccountDomainSid]
+ end;
+end;
+
+var
+ _IsValidSid: Pointer;
+
+function IsValidSid;
+begin
+ GetProcedureAddress(_IsValidSid, advapi32, 'IsValidSid');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_IsValidSid]
+ end;
+end;
+
+var
+ _EqualSid: Pointer;
+
+function EqualSid;
+begin
+ GetProcedureAddress(_EqualSid, advapi32, 'EqualSid');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_EqualSid]
+ end;
+end;
+
+var
+ _EqualPrefixSid: Pointer;
+
+function EqualPrefixSid;
+begin
+ GetProcedureAddress(_EqualPrefixSid, advapi32, 'EqualPrefixSid');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_EqualPrefixSid]
+ end;
+end;
+
+var
+ _GetSidLengthRequired: Pointer;
+
+function GetSidLengthRequired;
+begin
+ GetProcedureAddress(_GetSidLengthRequired, advapi32, 'GetSidLengthRequired');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetSidLengthRequired]
+ end;
+end;
+
+var
+ _AllocateAndInitializeSid: Pointer;
+
+function AllocateAndInitializeSid;
+begin
+ GetProcedureAddress(_AllocateAndInitializeSid, advapi32, 'AllocateAndInitializeSid');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_AllocateAndInitializeSid]
+ end;
+end;
+
+var
+ _FreeSid: Pointer;
+
+function FreeSid;
+begin
+ GetProcedureAddress(_FreeSid, advapi32, 'FreeSid');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_FreeSid]
+ end;
+end;
+
+var
+ _InitializeSid: Pointer;
+
+function InitializeSid;
+begin
+ GetProcedureAddress(_InitializeSid, advapi32, 'InitializeSid');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_InitializeSid]
+ end;
+end;
+
+var
+ _GetSidIdentifierAuthority: Pointer;
+
+function GetSidIdentifierAuthority;
+begin
+ GetProcedureAddress(_GetSidIdentifierAuthority, advapi32, 'GetSidIdentifierAuthority');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetSidIdentifierAuthority]
+ end;
+end;
+
+var
+ _GetSidSubAuthority: Pointer;
+
+function GetSidSubAuthority;
+begin
+ GetProcedureAddress(_GetSidSubAuthority, advapi32, 'GetSidSubAuthority');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetSidSubAuthority]
+ end;
+end;
+
+var
+ _GetSidSubAuthorityCount: Pointer;
+
+function GetSidSubAuthorityCount;
+begin
+ GetProcedureAddress(_GetSidSubAuthorityCount, advapi32, 'GetSidSubAuthorityCount');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetSidSubAuthorityCount]
+ end;
+end;
+
+var
+ _GetLengthSid: Pointer;
+
+function GetLengthSid;
+begin
+ GetProcedureAddress(_GetLengthSid, advapi32, 'GetLengthSid');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetLengthSid]
+ end;
+end;
+
+var
+ _CopySid: Pointer;
+
+function CopySid;
+begin
+ GetProcedureAddress(_CopySid, advapi32, 'CopySid');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CopySid]
+ end;
+end;
+
+var
+ _AreAllAccessesGranted: Pointer;
+
+function AreAllAccessesGranted;
+begin
+ GetProcedureAddress(_AreAllAccessesGranted, advapi32, 'AreAllAccessesGranted');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_AreAllAccessesGranted]
+ end;
+end;
+
+var
+ _AreAnyAccessesGranted: Pointer;
+
+function AreAnyAccessesGranted;
+begin
+ GetProcedureAddress(_AreAnyAccessesGranted, advapi32, 'AreAnyAccessesGranted');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_AreAnyAccessesGranted]
+ end;
+end;
+
+var
+ _MapGenericMask: Pointer;
+
+procedure MapGenericMask;
+begin
+ GetProcedureAddress(_MapGenericMask, advapi32, 'MapGenericMask');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MapGenericMask]
+ end;
+end;
+
+var
+ _IsValidAcl: Pointer;
+
+function IsValidAcl;
+begin
+ GetProcedureAddress(_IsValidAcl, advapi32, 'IsValidAcl');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_IsValidAcl]
+ end;
+end;
+
+var
+ _InitializeAcl: Pointer;
+
+function InitializeAcl;
+begin
+ GetProcedureAddress(_InitializeAcl, advapi32, 'InitializeAcl');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_InitializeAcl]
+ end;
+end;
+
+var
+ _GetAclInformation: Pointer;
+
+function GetAclInformation;
+begin
+ GetProcedureAddress(_GetAclInformation, advapi32, 'GetAclInformation');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetAclInformation]
+ end;
+end;
+
+var
+ _SetAclInformation: Pointer;
+
+function SetAclInformation;
+begin
+ GetProcedureAddress(_SetAclInformation, advapi32, 'SetAclInformation');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetAclInformation]
+ end;
+end;
+
+var
+ _AddAce: Pointer;
+
+function AddAce;
+begin
+ GetProcedureAddress(_AddAce, advapi32, 'AddAce');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_AddAce]
+ end;
+end;
+
+var
+ _DeleteAce: Pointer;
+
+function DeleteAce;
+begin
+ GetProcedureAddress(_DeleteAce, advapi32, 'DeleteAce');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DeleteAce]
+ end;
+end;
+
+var
+ _GetAce: Pointer;
+
+function GetAce;
+begin
+ GetProcedureAddress(_GetAce, advapi32, 'GetAce');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetAce]
+ end;
+end;
+
+var
+ _AddAccessAllowedAce: Pointer;
+
+function AddAccessAllowedAce;
+begin
+ GetProcedureAddress(_AddAccessAllowedAce, advapi32, 'AddAccessAllowedAce');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_AddAccessAllowedAce]
+ end;
+end;
+
+var
+ _AddAccessAllowedAceEx: Pointer;
+
+function AddAccessAllowedAceEx;
+begin
+ GetProcedureAddress(_AddAccessAllowedAceEx, advapi32, 'AddAccessAllowedAceEx');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_AddAccessAllowedAceEx]
+ end;
+end;
+
+var
+ _AddAccessDeniedAce: Pointer;
+
+function AddAccessDeniedAce;
+begin
+ GetProcedureAddress(_AddAccessDeniedAce, advapi32, 'AddAccessDeniedAce');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_AddAccessDeniedAce]
+ end;
+end;
+
+var
+ _AddAccessDeniedAceEx: Pointer;
+
+function AddAccessDeniedAceEx;
+begin
+ GetProcedureAddress(_AddAccessDeniedAceEx, advapi32, 'AddAccessDeniedAceEx');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_AddAccessDeniedAceEx]
+ end;
+end;
+
+var
+ _AddAuditAccessAce: Pointer;
+
+function AddAuditAccessAce;
+begin
+ GetProcedureAddress(_AddAuditAccessAce, advapi32, 'AddAuditAccessAce');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_AddAuditAccessAce]
+ end;
+end;
+
+var
+ _AddAuditAccessAceEx: Pointer;
+
+function AddAuditAccessAceEx;
+begin
+ GetProcedureAddress(_AddAuditAccessAceEx, advapi32, 'AddAuditAccessAceEx');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_AddAuditAccessAceEx]
+ end;
+end;
+
+var
+ _AddAccessAllowedObjectAce: Pointer;
+
+function AddAccessAllowedObjectAce;
+begin
+ GetProcedureAddress(_AddAccessAllowedObjectAce, advapi32, 'AddAccessAllowedObjectAce');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_AddAccessAllowedObjectAce]
+ end;
+end;
+
+var
+ _AddAccessDeniedObjectAce: Pointer;
+
+function AddAccessDeniedObjectAce;
+begin
+ GetProcedureAddress(_AddAccessDeniedObjectAce, advapi32, 'AddAccessDeniedObjectAce');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_AddAccessDeniedObjectAce]
+ end;
+end;
+
+var
+ _AddAuditAccessObjectAce: Pointer;
+
+function AddAuditAccessObjectAce;
+begin
+ GetProcedureAddress(_AddAuditAccessObjectAce, advapi32, 'AddAuditAccessObjectAce');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_AddAuditAccessObjectAce]
+ end;
+end;
+
+var
+ _FindFirstFreeAce: Pointer;
+
+function FindFirstFreeAce;
+begin
+ GetProcedureAddress(_FindFirstFreeAce, advapi32, 'FindFirstFreeAce');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_FindFirstFreeAce]
+ end;
+end;
+
+var
+ _InitializeSecurityDescriptor: Pointer;
+
+function InitializeSecurityDescriptor;
+begin
+ GetProcedureAddress(_InitializeSecurityDescriptor, advapi32, 'InitializeSecurityDescriptor');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_InitializeSecurityDescriptor]
+ end;
+end;
+
+var
+ _IsValidSecurityDescriptor: Pointer;
+
+function IsValidSecurityDescriptor;
+begin
+ GetProcedureAddress(_IsValidSecurityDescriptor, advapi32, 'IsValidSecurityDescriptor');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_IsValidSecurityDescriptor]
+ end;
+end;
+
+var
+ _GetSecurityDescriptorLength: Pointer;
+
+function GetSecurityDescriptorLength;
+begin
+ GetProcedureAddress(_GetSecurityDescriptorLength, advapi32, 'GetSecurityDescriptorLength');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetSecurityDescriptorLength]
+ end;
+end;
+
+var
+ _GetSecurityDescriptorControl: Pointer;
+
+function GetSecurityDescriptorControl;
+begin
+ GetProcedureAddress(_GetSecurityDescriptorControl, advapi32, 'GetSecurityDescriptorControl');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetSecurityDescriptorControl]
+ end;
+end;
+
+var
+ _SetSecurityDescriptorControl: Pointer;
+
+function SetSecurityDescriptorControl;
+begin
+ GetProcedureAddress(_SetSecurityDescriptorControl, advapi32, 'SetSecurityDescriptorControl');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetSecurityDescriptorControl]
+ end;
+end;
+
+var
+ _SetSecurityDescriptorDacl: Pointer;
+
+function SetSecurityDescriptorDacl;
+begin
+ GetProcedureAddress(_SetSecurityDescriptorDacl, advapi32, 'SetSecurityDescriptorDacl');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetSecurityDescriptorDacl]
+ end;
+end;
+
+var
+ _GetSecurityDescriptorDacl: Pointer;
+
+function GetSecurityDescriptorDacl;
+begin
+ GetProcedureAddress(_GetSecurityDescriptorDacl, advapi32, 'GetSecurityDescriptorDacl');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetSecurityDescriptorDacl]
+ end;
+end;
+
+var
+ _SetSecurityDescriptorSacl: Pointer;
+
+function SetSecurityDescriptorSacl;
+begin
+ GetProcedureAddress(_SetSecurityDescriptorSacl, advapi32, 'SetSecurityDescriptorSacl');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetSecurityDescriptorSacl]
+ end;
+end;
+
+var
+ _GetSecurityDescriptorSacl: Pointer;
+
+function GetSecurityDescriptorSacl;
+begin
+ GetProcedureAddress(_GetSecurityDescriptorSacl, advapi32, 'GetSecurityDescriptorSacl');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetSecurityDescriptorSacl]
+ end;
+end;
+
+var
+ _SetSecurityDescriptorOwner: Pointer;
+
+function SetSecurityDescriptorOwner;
+begin
+ GetProcedureAddress(_SetSecurityDescriptorOwner, advapi32, 'SetSecurityDescriptorOwner');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetSecurityDescriptorOwner]
+ end;
+end;
+
+var
+ _GetSecurityDescriptorOwner: Pointer;
+
+function GetSecurityDescriptorOwner;
+begin
+ GetProcedureAddress(_GetSecurityDescriptorOwner, advapi32, 'GetSecurityDescriptorOwner');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetSecurityDescriptorOwner]
+ end;
+end;
+
+var
+ _SetSecurityDescriptorGroup: Pointer;
+
+function SetSecurityDescriptorGroup;
+begin
+ GetProcedureAddress(_SetSecurityDescriptorGroup, advapi32, 'SetSecurityDescriptorGroup');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetSecurityDescriptorGroup]
+ end;
+end;
+
+var
+ _GetSecurityDescriptorGroup: Pointer;
+
+function GetSecurityDescriptorGroup;
+begin
+ GetProcedureAddress(_GetSecurityDescriptorGroup, advapi32, 'GetSecurityDescriptorGroup');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetSecurityDescriptorGroup]
+ end;
+end;
+
+var
+ _SetSecurityDescriptorRMControl: Pointer;
+
+function SetSecurityDescriptorRMControl;
+begin
+ GetProcedureAddress(_SetSecurityDescriptorRMControl, advapi32, 'SetSecurityDescriptorRMControl');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetSecurityDescriptorRMControl]
+ end;
+end;
+
+var
+ _GetSecurityDescriptorRMControl: Pointer;
+
+function GetSecurityDescriptorRMControl;
+begin
+ GetProcedureAddress(_GetSecurityDescriptorRMControl, advapi32, 'GetSecurityDescriptorRMControl');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetSecurityDescriptorRMControl]
+ end;
+end;
+
+var
+ _CreatePrivateObjectSecurity: Pointer;
+
+function CreatePrivateObjectSecurity;
+begin
+ GetProcedureAddress(_CreatePrivateObjectSecurity, advapi32, 'CreatePrivateObjectSecurity');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreatePrivateObjectSecurity]
+ end;
+end;
+
+var
+ _ConvertToAutoInheritPrObjSec: Pointer;
+
+function ConvertToAutoInheritPrivateObjectSecurity;
+begin
+ GetProcedureAddress(_ConvertToAutoInheritPrObjSec, advapi32, 'ConvertToAutoInheritPrivateObjectSecurity');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ConvertToAutoInheritPrObjSec]
+ end;
+end;
+
+var
+ _CreatePrivateObjectSecurityEx: Pointer;
+
+function CreatePrivateObjectSecurityEx;
+begin
+ GetProcedureAddress(_CreatePrivateObjectSecurityEx, advapi32, 'CreatePrivateObjectSecurityEx');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreatePrivateObjectSecurityEx]
+ end;
+end;
+
+var
+ _SetPrivateObjectSecurity: Pointer;
+
+function SetPrivateObjectSecurity;
+begin
+ GetProcedureAddress(_SetPrivateObjectSecurity, advapi32, 'SetPrivateObjectSecurity');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetPrivateObjectSecurity]
+ end;
+end;
+
+var
+ _SetPrivateObjectSecurityEx: Pointer;
+
+function SetPrivateObjectSecurityEx;
+begin
+ GetProcedureAddress(_SetPrivateObjectSecurityEx, advapi32, 'SetPrivateObjectSecurityEx');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetPrivateObjectSecurityEx]
+ end;
+end;
+
+var
+ _GetPrivateObjectSecurity: Pointer;
+
+function GetPrivateObjectSecurity;
+begin
+ GetProcedureAddress(_GetPrivateObjectSecurity, advapi32, 'GetPrivateObjectSecurity');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetPrivateObjectSecurity]
+ end;
+end;
+
+var
+ _DestroyPrivateObjectSecurity: Pointer;
+
+function DestroyPrivateObjectSecurity;
+begin
+ GetProcedureAddress(_DestroyPrivateObjectSecurity, advapi32, 'DestroyPrivateObjectSecurity');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DestroyPrivateObjectSecurity]
+ end;
+end;
+
+var
+ _MakeSelfRelativeSD: Pointer;
+
+function MakeSelfRelativeSD;
+begin
+ GetProcedureAddress(_MakeSelfRelativeSD, advapi32, 'MakeSelfRelativeSD');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MakeSelfRelativeSD]
+ end;
+end;
+
+var
+ _MakeAbsoluteSD: Pointer;
+
+function MakeAbsoluteSD;
+begin
+ GetProcedureAddress(_MakeAbsoluteSD, advapi32, 'MakeAbsoluteSD');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MakeAbsoluteSD]
+ end;
+end;
+
+var
+ _MakeAbsoluteSD2: Pointer;
+
+function MakeAbsoluteSD2;
+begin
+ GetProcedureAddress(_MakeAbsoluteSD2, advapi32, 'MakeAbsoluteSD2');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MakeAbsoluteSD2]
+ end;
+end;
+
+var
+ _SetFileSecurityA: Pointer;
+
+function SetFileSecurityA;
+begin
+ GetProcedureAddress(_SetFileSecurityA, advapi32, 'SetFileSecurityA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetFileSecurityA]
+ end;
+end;
+
+var
+ _SetFileSecurityW: Pointer;
+
+function SetFileSecurityW;
+begin
+ GetProcedureAddress(_SetFileSecurityW, advapi32, 'SetFileSecurityW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetFileSecurityW]
+ end;
+end;
+
+var
+ _SetFileSecurity: Pointer;
+
+function SetFileSecurity;
+begin
+ GetProcedureAddress(_SetFileSecurity, advapi32, 'SetFileSecurity' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetFileSecurity]
+ end;
+end;
+
+var
+ _GetFileSecurityA: Pointer;
+
+function GetFileSecurityA;
+begin
+ GetProcedureAddress(_GetFileSecurityA, advapi32, 'GetFileSecurityA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetFileSecurityA]
+ end;
+end;
+
+var
+ _GetFileSecurityW: Pointer;
+
+function GetFileSecurityW;
+begin
+ GetProcedureAddress(_GetFileSecurityW, advapi32, 'GetFileSecurityW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetFileSecurityW]
+ end;
+end;
+
+var
+ _GetFileSecurity: Pointer;
+
+function GetFileSecurity;
+begin
+ GetProcedureAddress(_GetFileSecurity, advapi32, 'GetFileSecurity' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetFileSecurity]
+ end;
+end;
+
+var
+ _SetKernelObjectSecurity: Pointer;
+
+function SetKernelObjectSecurity;
+begin
+ GetProcedureAddress(_SetKernelObjectSecurity, advapi32, 'SetKernelObjectSecurity');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetKernelObjectSecurity]
+ end;
+end;
+
+var
+ _FindFirstChangeNotificationA: Pointer;
+
+function FindFirstChangeNotificationA;
+begin
+ GetProcedureAddress(_FindFirstChangeNotificationA, kernel32, 'FindFirstChangeNotificationA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_FindFirstChangeNotificationA]
+ end;
+end;
+
+var
+ _FindFirstChangeNotificationW: Pointer;
+
+function FindFirstChangeNotificationW;
+begin
+ GetProcedureAddress(_FindFirstChangeNotificationW, kernel32, 'FindFirstChangeNotificationW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_FindFirstChangeNotificationW]
+ end;
+end;
+
+var
+ _FindFirstChangeNotification: Pointer;
+
+function FindFirstChangeNotification;
+begin
+ GetProcedureAddress(_FindFirstChangeNotification, kernel32, 'FindFirstChangeNotification' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_FindFirstChangeNotification]
+ end;
+end;
+
+var
+ _FindNextChangeNotification: Pointer;
+
+function FindNextChangeNotification;
+begin
+ GetProcedureAddress(_FindNextChangeNotification, kernel32, 'FindNextChangeNotification');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_FindNextChangeNotification]
+ end;
+end;
+
+var
+ _FindCloseChangeNotification: Pointer;
+
+function FindCloseChangeNotification;
+begin
+ GetProcedureAddress(_FindCloseChangeNotification, kernel32, 'FindCloseChangeNotification');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_FindCloseChangeNotification]
+ end;
+end;
+
+var
+ _ReadDirectoryChangesW: Pointer;
+
+function ReadDirectoryChangesW;
+begin
+ GetProcedureAddress(_ReadDirectoryChangesW, kernel32, 'ReadDirectoryChangesW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ReadDirectoryChangesW]
+ end;
+end;
+
+var
+ _VirtualLock: Pointer;
+
+function VirtualLock;
+begin
+ GetProcedureAddress(_VirtualLock, kernel32, 'VirtualLock');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_VirtualLock]
+ end;
+end;
+
+var
+ _VirtualUnlock: Pointer;
+
+function VirtualUnlock;
+begin
+ GetProcedureAddress(_VirtualUnlock, kernel32, 'VirtualUnlock');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_VirtualUnlock]
+ end;
+end;
+
+var
+ _MapViewOfFileEx: Pointer;
+
+function MapViewOfFileEx;
+begin
+ GetProcedureAddress(_MapViewOfFileEx, kernel32, 'MapViewOfFileEx');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MapViewOfFileEx]
+ end;
+end;
+
+var
+ _SetPriorityClass: Pointer;
+
+function SetPriorityClass;
+begin
+ GetProcedureAddress(_SetPriorityClass, kernel32, 'SetPriorityClass');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetPriorityClass]
+ end;
+end;
+
+var
+ _GetPriorityClass: Pointer;
+
+function GetPriorityClass;
+begin
+ GetProcedureAddress(_GetPriorityClass, kernel32, 'GetPriorityClass');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetPriorityClass]
+ end;
+end;
+
+var
+ _IsBadReadPtr: Pointer;
+
+function IsBadReadPtr;
+begin
+ GetProcedureAddress(_IsBadReadPtr, kernel32, 'IsBadReadPtr');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_IsBadReadPtr]
+ end;
+end;
+
+var
+ _IsBadWritePtr: Pointer;
+
+function IsBadWritePtr;
+begin
+ GetProcedureAddress(_IsBadWritePtr, kernel32, 'IsBadWritePtr');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_IsBadWritePtr]
+ end;
+end;
+
+var
+ _IsBadHugeReadPtr: Pointer;
+
+function IsBadHugeReadPtr;
+begin
+ GetProcedureAddress(_IsBadHugeReadPtr, kernel32, 'IsBadHugeReadPtr');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_IsBadHugeReadPtr]
+ end;
+end;
+
+var
+ _IsBadHugeWritePtr: Pointer;
+
+function IsBadHugeWritePtr;
+begin
+ GetProcedureAddress(_IsBadHugeWritePtr, kernel32, 'IsBadHugeWritePtr');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_IsBadHugeWritePtr]
+ end;
+end;
+
+var
+ _IsBadCodePtr: Pointer;
+
+function IsBadCodePtr;
+begin
+ GetProcedureAddress(_IsBadCodePtr, kernel32, 'IsBadCodePtr');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_IsBadCodePtr]
+ end;
+end;
+
+var
+ _IsBadStringPtrA: Pointer;
+
+function IsBadStringPtrA;
+begin
+ GetProcedureAddress(_IsBadStringPtrA, kernel32, 'IsBadStringPtrA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_IsBadStringPtrA]
+ end;
+end;
+
+var
+ _IsBadStringPtrW: Pointer;
+
+function IsBadStringPtrW;
+begin
+ GetProcedureAddress(_IsBadStringPtrW, kernel32, 'IsBadStringPtrW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_IsBadStringPtrW]
+ end;
+end;
+
+var
+ _IsBadStringPtr: Pointer;
+
+function IsBadStringPtr;
+begin
+ GetProcedureAddress(_IsBadStringPtr, kernel32, 'IsBadStringPtr' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_IsBadStringPtr]
+ end;
+end;
+
+var
+ _LookupAccountSidA: Pointer;
+
+function LookupAccountSidA;
+begin
+ GetProcedureAddress(_LookupAccountSidA, advapi32, 'LookupAccountSidA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_LookupAccountSidA]
+ end;
+end;
+
+var
+ _LookupAccountSidW: Pointer;
+
+function LookupAccountSidW;
+begin
+ GetProcedureAddress(_LookupAccountSidW, advapi32, 'LookupAccountSidW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_LookupAccountSidW]
+ end;
+end;
+
+var
+ _LookupAccountSid: Pointer;
+
+function LookupAccountSid;
+begin
+ GetProcedureAddress(_LookupAccountSid, advapi32, 'LookupAccountSid' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_LookupAccountSid]
+ end;
+end;
+
+var
+ _LookupAccountNameA: Pointer;
+
+function LookupAccountNameA;
+begin
+ GetProcedureAddress(_LookupAccountNameA, advapi32, 'LookupAccountNameA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_LookupAccountNameA]
+ end;
+end;
+
+var
+ _LookupAccountNameW: Pointer;
+
+function LookupAccountNameW;
+begin
+ GetProcedureAddress(_LookupAccountNameW, advapi32, 'LookupAccountNameW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_LookupAccountNameW]
+ end;
+end;
+
+var
+ _LookupAccountName: Pointer;
+
+function LookupAccountName;
+begin
+ GetProcedureAddress(_LookupAccountName, advapi32, 'LookupAccountName' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_LookupAccountName]
+ end;
+end;
+
+var
+ _LookupPrivilegeValueA: Pointer;
+
+function LookupPrivilegeValueA;
+begin
+ GetProcedureAddress(_LookupPrivilegeValueA, advapi32, 'LookupPrivilegeValueA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_LookupPrivilegeValueA]
+ end;
+end;
+
+var
+ _LookupPrivilegeValueW: Pointer;
+
+function LookupPrivilegeValueW;
+begin
+ GetProcedureAddress(_LookupPrivilegeValueW, advapi32, 'LookupPrivilegeValueW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_LookupPrivilegeValueW]
+ end;
+end;
+
+var
+ _LookupPrivilegeValue: Pointer;
+
+function LookupPrivilegeValue;
+begin
+ GetProcedureAddress(_LookupPrivilegeValue, advapi32, 'LookupPrivilegeValue' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_LookupPrivilegeValue]
+ end;
+end;
+
+var
+ _LookupPrivilegeNameA: Pointer;
+
+function LookupPrivilegeNameA;
+begin
+ GetProcedureAddress(_LookupPrivilegeNameA, advapi32, 'LookupPrivilegeNameA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_LookupPrivilegeNameA]
+ end;
+end;
+
+var
+ _LookupPrivilegeNameW: Pointer;
+
+function LookupPrivilegeNameW;
+begin
+ GetProcedureAddress(_LookupPrivilegeNameW, advapi32, 'LookupPrivilegeNameW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_LookupPrivilegeNameW]
+ end;
+end;
+
+var
+ _LookupPrivilegeName: Pointer;
+
+function LookupPrivilegeName;
+begin
+ GetProcedureAddress(_LookupPrivilegeName, advapi32, 'LookupPrivilegeName' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_LookupPrivilegeName]
+ end;
+end;
+
+var
+ _LookupPrivilegeDisplayNameA: Pointer;
+
+function LookupPrivilegeDisplayNameA;
+begin
+ GetProcedureAddress(_LookupPrivilegeDisplayNameA, advapi32, 'LookupPrivilegeDisplayNameA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_LookupPrivilegeDisplayNameA]
+ end;
+end;
+
+var
+ _LookupPrivilegeDisplayNameW: Pointer;
+
+function LookupPrivilegeDisplayNameW;
+begin
+ GetProcedureAddress(_LookupPrivilegeDisplayNameW, advapi32, 'LookupPrivilegeDisplayNameW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_LookupPrivilegeDisplayNameW]
+ end;
+end;
+
+var
+ _LookupPrivilegeDisplayName: Pointer;
+
+function LookupPrivilegeDisplayName;
+begin
+ GetProcedureAddress(_LookupPrivilegeDisplayName, advapi32, 'LookupPrivilegeDisplayName' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_LookupPrivilegeDisplayName]
+ end;
+end;
+
+var
+ _AllocateLocallyUniqueId: Pointer;
+
+function AllocateLocallyUniqueId;
+begin
+ GetProcedureAddress(_AllocateLocallyUniqueId, advapi32, 'AllocateLocallyUniqueId');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_AllocateLocallyUniqueId]
+ end;
+end;
+
+var
+ _BuildCommDCBA: Pointer;
+
+function BuildCommDCBA;
+begin
+ GetProcedureAddress(_BuildCommDCBA, kernel32, 'BuildCommDCBA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_BuildCommDCBA]
+ end;
+end;
+
+var
+ _BuildCommDCBW: Pointer;
+
+function BuildCommDCBW;
+begin
+ GetProcedureAddress(_BuildCommDCBW, kernel32, 'BuildCommDCBW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_BuildCommDCBW]
+ end;
+end;
+
+var
+ _BuildCommDCB: Pointer;
+
+function BuildCommDCB;
+begin
+ GetProcedureAddress(_BuildCommDCB, kernel32, 'BuildCommDCB' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_BuildCommDCB]
+ end;
+end;
+
+var
+ _BuildCommDCBAndTimeoutsA: Pointer;
+
+function BuildCommDCBAndTimeoutsA;
+begin
+ GetProcedureAddress(_BuildCommDCBAndTimeoutsA, kernel32, 'BuildCommDCBAndTimeoutsA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_BuildCommDCBAndTimeoutsA]
+ end;
+end;
+
+var
+ _BuildCommDCBAndTimeoutsW: Pointer;
+
+function BuildCommDCBAndTimeoutsW;
+begin
+ GetProcedureAddress(_BuildCommDCBAndTimeoutsW, kernel32, 'BuildCommDCBAndTimeoutsW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_BuildCommDCBAndTimeoutsW]
+ end;
+end;
+
+var
+ _BuildCommDCBAndTimeouts: Pointer;
+
+function BuildCommDCBAndTimeouts;
+begin
+ GetProcedureAddress(_BuildCommDCBAndTimeouts, kernel32, 'BuildCommDCBAndTimeouts' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_BuildCommDCBAndTimeouts]
+ end;
+end;
+
+var
+ _CommConfigDialogA: Pointer;
+
+function CommConfigDialogA;
+begin
+ GetProcedureAddress(_CommConfigDialogA, kernel32, 'CommConfigDialogA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CommConfigDialogA]
+ end;
+end;
+
+var
+ _CommConfigDialogW: Pointer;
+
+function CommConfigDialogW;
+begin
+ GetProcedureAddress(_CommConfigDialogW, kernel32, 'CommConfigDialogW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CommConfigDialogW]
+ end;
+end;
+
+var
+ _CommConfigDialog: Pointer;
+
+function CommConfigDialog;
+begin
+ GetProcedureAddress(_CommConfigDialog, kernel32, 'CommConfigDialog' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CommConfigDialog]
+ end;
+end;
+
+var
+ _GetDefaultCommConfigA: Pointer;
+
+function GetDefaultCommConfigA;
+begin
+ GetProcedureAddress(_GetDefaultCommConfigA, kernel32, 'GetDefaultCommConfigA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetDefaultCommConfigA]
+ end;
+end;
+
+var
+ _GetDefaultCommConfigW: Pointer;
+
+function GetDefaultCommConfigW;
+begin
+ GetProcedureAddress(_GetDefaultCommConfigW, kernel32, 'GetDefaultCommConfigW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetDefaultCommConfigW]
+ end;
+end;
+
+var
+ _GetDefaultCommConfig: Pointer;
+
+function GetDefaultCommConfig;
+begin
+ GetProcedureAddress(_GetDefaultCommConfig, kernel32, 'GetDefaultCommConfig' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetDefaultCommConfig]
+ end;
+end;
+
+var
+ _SetDefaultCommConfigA: Pointer;
+
+function SetDefaultCommConfigA;
+begin
+ GetProcedureAddress(_SetDefaultCommConfigA, kernel32, 'SetDefaultCommConfigA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetDefaultCommConfigA]
+ end;
+end;
+
+var
+ _SetDefaultCommConfigW: Pointer;
+
+function SetDefaultCommConfigW;
+begin
+ GetProcedureAddress(_SetDefaultCommConfigW, kernel32, 'SetDefaultCommConfigW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetDefaultCommConfigW]
+ end;
+end;
+
+var
+ _SetDefaultCommConfig: Pointer;
+
+function SetDefaultCommConfig;
+begin
+ GetProcedureAddress(_SetDefaultCommConfig, kernel32, 'SetDefaultCommConfig' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetDefaultCommConfig]
+ end;
+end;
+
+var
+ _GetComputerNameA: Pointer;
+
+function GetComputerNameA;
+begin
+ GetProcedureAddress(_GetComputerNameA, kernel32, 'GetComputerNameA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetComputerNameA]
+ end;
+end;
+
+var
+ _GetComputerNameW: Pointer;
+
+function GetComputerNameW;
+begin
+ GetProcedureAddress(_GetComputerNameW, kernel32, 'GetComputerNameW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetComputerNameW]
+ end;
+end;
+
+var
+ _GetComputerName: Pointer;
+
+function GetComputerName;
+begin
+ GetProcedureAddress(_GetComputerName, kernel32, 'GetComputerName' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetComputerName]
+ end;
+end;
+
+var
+ _SetComputerNameA: Pointer;
+
+function SetComputerNameA;
+begin
+ GetProcedureAddress(_SetComputerNameA, kernel32, 'SetComputerNameA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetComputerNameA]
+ end;
+end;
+
+var
+ _SetComputerNameW: Pointer;
+
+function SetComputerNameW;
+begin
+ GetProcedureAddress(_SetComputerNameW, kernel32, 'SetComputerNameW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetComputerNameW]
+ end;
+end;
+
+var
+ _SetComputerName: Pointer;
+
+function SetComputerName;
+begin
+ GetProcedureAddress(_SetComputerName, kernel32, 'SetComputerName' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetComputerName]
+ end;
+end;
+
+var
+ _GetComputerNameExA: Pointer;
+
+function GetComputerNameExA;
+begin
+ GetProcedureAddress(_GetComputerNameExA, kernel32, 'GetComputerNameExA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetComputerNameExA]
+ end;
+end;
+
+var
+ _GetComputerNameExW: Pointer;
+
+function GetComputerNameExW;
+begin
+ GetProcedureAddress(_GetComputerNameExW, kernel32, 'GetComputerNameExW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetComputerNameExW]
+ end;
+end;
+
+var
+ _GetComputerNameEx: Pointer;
+
+function GetComputerNameEx;
+begin
+ GetProcedureAddress(_GetComputerNameEx, kernel32, 'GetComputerNameEx' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetComputerNameEx]
+ end;
+end;
+
+var
+ _SetComputerNameExA: Pointer;
+
+function SetComputerNameExA;
+begin
+ GetProcedureAddress(_SetComputerNameExA, kernel32, 'SetComputerNameExA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetComputerNameExA]
+ end;
+end;
+
+var
+ _SetComputerNameExW: Pointer;
+
+function SetComputerNameExW;
+begin
+ GetProcedureAddress(_SetComputerNameExW, kernel32, 'SetComputerNameExW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetComputerNameExW]
+ end;
+end;
+
+var
+ _SetComputerNameEx: Pointer;
+
+function SetComputerNameEx;
+begin
+ GetProcedureAddress(_SetComputerNameEx, kernel32, 'SetComputerNameEx' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetComputerNameEx]
+ end;
+end;
+
+var
+ _DnsHostnameToComputerNameA: Pointer;
+
+function DnsHostnameToComputerNameA;
+begin
+ GetProcedureAddress(_DnsHostnameToComputerNameA, kernel32, 'DnsHostnameToComputerNameA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DnsHostnameToComputerNameA]
+ end;
+end;
+
+var
+ _DnsHostnameToComputerNameW: Pointer;
+
+function DnsHostnameToComputerNameW;
+begin
+ GetProcedureAddress(_DnsHostnameToComputerNameW, kernel32, 'DnsHostnameToComputerNameW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DnsHostnameToComputerNameW]
+ end;
+end;
+
+var
+ _DnsHostnameToComputerName: Pointer;
+
+function DnsHostnameToComputerName;
+begin
+ GetProcedureAddress(_DnsHostnameToComputerName, kernel32, 'DnsHostnameToComputerName' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DnsHostnameToComputerName]
+ end;
+end;
+
+var
+ _GetUserNameA: Pointer;
+
+function GetUserNameA;
+begin
+ GetProcedureAddress(_GetUserNameA, advapi32, 'GetUserNameA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetUserNameA]
+ end;
+end;
+
+var
+ _GetUserNameW: Pointer;
+
+function GetUserNameW;
+begin
+ GetProcedureAddress(_GetUserNameW, advapi32, 'GetUserNameW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetUserNameW]
+ end;
+end;
+
+var
+ _GetUserName: Pointer;
+
+function GetUserName;
+begin
+ GetProcedureAddress(_GetUserName, advapi32, 'GetUserName' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetUserName]
+ end;
+end;
+
+var
+ _LogonUserA: Pointer;
+
+function LogonUserA;
+begin
+ GetProcedureAddress(_LogonUserA, advapi32, 'LogonUserA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_LogonUserA]
+ end;
+end;
+
+var
+ _LogonUserW: Pointer;
+
+function LogonUserW;
+begin
+ GetProcedureAddress(_LogonUserW, advapi32, 'LogonUserW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_LogonUserW]
+ end;
+end;
+
+var
+ _LogonUser: Pointer;
+
+function LogonUser;
+begin
+ GetProcedureAddress(_LogonUser, advapi32, 'LogonUser' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_LogonUser]
+ end;
+end;
+
+var
+ _LogonUserExA: Pointer;
+
+function LogonUserExA;
+begin
+ GetProcedureAddress(_LogonUserExA, advapi32, 'LogonUserExA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_LogonUserExA]
+ end;
+end;
+
+var
+ _LogonUserExW: Pointer;
+
+function LogonUserExW;
+begin
+ GetProcedureAddress(_LogonUserExW, advapi32, 'LogonUserExW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_LogonUserExW]
+ end;
+end;
+
+var
+ _LogonUserEx: Pointer;
+
+function LogonUserEx;
+begin
+ GetProcedureAddress(_LogonUserEx, advapi32, 'LogonUserEx' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_LogonUserEx]
+ end;
+end;
+
+var
+ _ImpersonateLoggedOnUser: Pointer;
+
+function ImpersonateLoggedOnUser;
+begin
+ GetProcedureAddress(_ImpersonateLoggedOnUser, advapi32, 'ImpersonateLoggedOnUser');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ImpersonateLoggedOnUser]
+ end;
+end;
+
+var
+ _CreateProcessAsUserA: Pointer;
+
+function CreateProcessAsUserA;
+begin
+ GetProcedureAddress(_CreateProcessAsUserA, advapi32, 'CreateProcessAsUserA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreateProcessAsUserA]
+ end;
+end;
+
+var
+ _CreateProcessAsUserW: Pointer;
+
+function CreateProcessAsUserW;
+begin
+ GetProcedureAddress(_CreateProcessAsUserW, advapi32, 'CreateProcessAsUserW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreateProcessAsUserW]
+ end;
+end;
+
+var
+ _CreateProcessAsUser: Pointer;
+
+function CreateProcessAsUser;
+begin
+ GetProcedureAddress(_CreateProcessAsUser, advapi32, 'CreateProcessAsUser' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreateProcessAsUser]
+ end;
+end;
+
+var
+ _CreateProcessWithLogonW: Pointer;
+
+function CreateProcessWithLogonW;
+begin
+ GetProcedureAddress(_CreateProcessWithLogonW, advapi32, 'CreateProcessWithLogonW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreateProcessWithLogonW]
+ end;
+end;
+
+var
+ _CreateProcessWithTokenW: Pointer;
+
+function CreateProcessWithTokenW;
+begin
+ GetProcedureAddress(_CreateProcessWithTokenW, advapi32, 'CreateProcessWithTokenW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreateProcessWithTokenW]
+ end;
+end;
+
+var
+ _ImpersonateAnonymousToken: Pointer;
+
+function ImpersonateAnonymousToken;
+begin
+ GetProcedureAddress(_ImpersonateAnonymousToken, advapi32, 'ImpersonateAnonymousToken');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ImpersonateAnonymousToken]
+ end;
+end;
+
+var
+ _DuplicateTokenEx: Pointer;
+
+function DuplicateTokenEx;
+begin
+ GetProcedureAddress(_DuplicateTokenEx, advapi32, 'DuplicateTokenEx');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DuplicateTokenEx]
+ end;
+end;
+
+var
+ _CreateRestrictedToken: Pointer;
+
+function CreateRestrictedToken;
+begin
+ GetProcedureAddress(_CreateRestrictedToken, advapi32, 'CreateRestrictedToken');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreateRestrictedToken]
+ end;
+end;
+
+var
+ _IsTokenRestricted: Pointer;
+
+function IsTokenRestricted;
+begin
+ GetProcedureAddress(_IsTokenRestricted, advapi32, 'IsTokenRestricted');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_IsTokenRestricted]
+ end;
+end;
+
+var
+ _CheckTokenMembership: Pointer;
+
+function CheckTokenMembership;
+begin
+ GetProcedureAddress(_CheckTokenMembership, advapi32, 'CheckTokenMembership');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CheckTokenMembership]
+ end;
+end;
+
+var
+ _IsTokenUntrusted: Pointer;
+
+function IsTokenUntrusted;
+begin
+ GetProcedureAddress(_IsTokenUntrusted, advapi32, 'IsTokenUntrusted');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_IsTokenUntrusted]
+ end;
+end;
+
+var
+ _RegisterWaitForSingleObject: Pointer;
+
+function RegisterWaitForSingleObject;
+begin
+ GetProcedureAddress(_RegisterWaitForSingleObject, kernel32, 'RegisterWaitForSingleObject');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RegisterWaitForSingleObject]
+ end;
+end;
+
+var
+ _RegisterWaitForSingleObjectEx: Pointer;
+
+function RegisterWaitForSingleObjectEx;
+begin
+ GetProcedureAddress(_RegisterWaitForSingleObjectEx, kernel32, 'RegisterWaitForSingleObjectEx');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RegisterWaitForSingleObjectEx]
+ end;
+end;
+
+var
+ _UnregisterWait: Pointer;
+
+function UnregisterWait;
+begin
+ GetProcedureAddress(_UnregisterWait, kernel32, 'UnregisterWait');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_UnregisterWait]
+ end;
+end;
+
+var
+ _UnregisterWaitEx: Pointer;
+
+function UnregisterWaitEx;
+begin
+ GetProcedureAddress(_UnregisterWaitEx, kernel32, 'UnregisterWaitEx');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_UnregisterWaitEx]
+ end;
+end;
+
+var
+ _QueueUserWorkItem: Pointer;
+
+function QueueUserWorkItem;
+begin
+ GetProcedureAddress(_QueueUserWorkItem, kernel32, 'QueueUserWorkItem');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_QueueUserWorkItem]
+ end;
+end;
+
+var
+ _BindIoCompletionCallback: Pointer;
+
+function BindIoCompletionCallback;
+begin
+ GetProcedureAddress(_BindIoCompletionCallback, kernel32, 'BindIoCompletionCallback');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_BindIoCompletionCallback]
+ end;
+end;
+
+var
+ _CreateTimerQueue: Pointer;
+
+function CreateTimerQueue;
+begin
+ GetProcedureAddress(_CreateTimerQueue, kernel32, 'CreateTimerQueue');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreateTimerQueue]
+ end;
+end;
+
+var
+ _CreateTimerQueueTimer: Pointer;
+
+function CreateTimerQueueTimer;
+begin
+ GetProcedureAddress(_CreateTimerQueueTimer, kernel32, 'CreateTimerQueueTimer');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreateTimerQueueTimer]
+ end;
+end;
+
+var
+ _ChangeTimerQueueTimer: Pointer;
+
+function ChangeTimerQueueTimer;
+begin
+ GetProcedureAddress(_ChangeTimerQueueTimer, kernel32, 'ChangeTimerQueueTimer');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ChangeTimerQueueTimer]
+ end;
+end;
+
+var
+ _DeleteTimerQueueTimer: Pointer;
+
+function DeleteTimerQueueTimer;
+begin
+ GetProcedureAddress(_DeleteTimerQueueTimer, kernel32, 'DeleteTimerQueueTimer');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DeleteTimerQueueTimer]
+ end;
+end;
+
+var
+ _DeleteTimerQueueEx: Pointer;
+
+function DeleteTimerQueueEx;
+begin
+ GetProcedureAddress(_DeleteTimerQueueEx, kernel32, 'DeleteTimerQueueEx');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DeleteTimerQueueEx]
+ end;
+end;
+
+var
+ _SetTimerQueueTimer: Pointer;
+
+function SetTimerQueueTimer;
+begin
+ GetProcedureAddress(_SetTimerQueueTimer, kernel32, 'SetTimerQueueTimer');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetTimerQueueTimer]
+ end;
+end;
+
+var
+ _CancelTimerQueueTimer: Pointer;
+
+function CancelTimerQueueTimer;
+begin
+ GetProcedureAddress(_CancelTimerQueueTimer, kernel32, 'CancelTimerQueueTimer');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CancelTimerQueueTimer]
+ end;
+end;
+
+var
+ _DeleteTimerQueue: Pointer;
+
+function DeleteTimerQueue;
+begin
+ GetProcedureAddress(_DeleteTimerQueue, kernel32, 'DeleteTimerQueue');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DeleteTimerQueue]
+ end;
+end;
+
+var
+ _GetCurrentHwProfileA: Pointer;
+
+function GetCurrentHwProfileA;
+begin
+ GetProcedureAddress(_GetCurrentHwProfileA, advapi32, 'GetCurrentHwProfileA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetCurrentHwProfileA]
+ end;
+end;
+
+var
+ _GetCurrentHwProfileW: Pointer;
+
+function GetCurrentHwProfileW;
+begin
+ GetProcedureAddress(_GetCurrentHwProfileW, advapi32, 'GetCurrentHwProfileW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetCurrentHwProfileW]
+ end;
+end;
+
+var
+ _GetCurrentHwProfile: Pointer;
+
+function GetCurrentHwProfile;
+begin
+ GetProcedureAddress(_GetCurrentHwProfile, advapi32, 'GetCurrentHwProfile' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetCurrentHwProfile]
+ end;
+end;
+
+var
+ _QueryPerformanceCounter: Pointer;
+
+function QueryPerformanceCounter;
+begin
+ GetProcedureAddress(_QueryPerformanceCounter, kernel32, 'QueryPerformanceCounter');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_QueryPerformanceCounter]
+ end;
+end;
+
+var
+ _QueryPerformanceFrequency: Pointer;
+
+function QueryPerformanceFrequency;
+begin
+ GetProcedureAddress(_QueryPerformanceFrequency, kernel32, 'QueryPerformanceFrequency');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_QueryPerformanceFrequency]
+ end;
+end;
+
+var
+ _GetVersionExA: Pointer;
+
+function GetVersionExA;
+begin
+ GetProcedureAddress(_GetVersionExA, kernel32, 'GetVersionExA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetVersionExA]
+ end;
+end;
+
+var
+ _GetVersionExW: Pointer;
+
+function GetVersionExW;
+begin
+ GetProcedureAddress(_GetVersionExW, kernel32, 'GetVersionExW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetVersionExW]
+ end;
+end;
+
+var
+ _GetVersionEx: Pointer;
+
+function GetVersionEx;
+begin
+ GetProcedureAddress(_GetVersionEx, kernel32, 'GetVersionEx' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetVersionEx]
+ end;
+end;
+
+var
+ _VerifyVersionInfoA: Pointer;
+
+function VerifyVersionInfoA;
+begin
+ GetProcedureAddress(_VerifyVersionInfoA, kernel32, 'VerifyVersionInfoA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_VerifyVersionInfoA]
+ end;
+end;
+
+var
+ _VerifyVersionInfoW: Pointer;
+
+function VerifyVersionInfoW;
+begin
+ GetProcedureAddress(_VerifyVersionInfoW, kernel32, 'VerifyVersionInfoW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_VerifyVersionInfoW]
+ end;
+end;
+
+var
+ _VerifyVersionInfo: Pointer;
+
+function VerifyVersionInfo;
+begin
+ GetProcedureAddress(_VerifyVersionInfo, kernel32, 'VerifyVersionInfo' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_VerifyVersionInfo]
+ end;
+end;
+
+var
+ _GetSystemPowerStatus: Pointer;
+
+function GetSystemPowerStatus;
+begin
+ GetProcedureAddress(_GetSystemPowerStatus, kernel32, 'GetSystemPowerStatus');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetSystemPowerStatus]
+ end;
+end;
+
+var
+ _SetSystemPowerState: Pointer;
+
+function SetSystemPowerState;
+begin
+ GetProcedureAddress(_SetSystemPowerState, kernel32, 'SetSystemPowerState');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetSystemPowerState]
+ end;
+end;
+
+var
+ _AllocateUserPhysicalPages: Pointer;
+
+function AllocateUserPhysicalPages;
+begin
+ GetProcedureAddress(_AllocateUserPhysicalPages, kernel32, 'AllocateUserPhysicalPages');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_AllocateUserPhysicalPages]
+ end;
+end;
+
+var
+ _FreeUserPhysicalPages: Pointer;
+
+function FreeUserPhysicalPages;
+begin
+ GetProcedureAddress(_FreeUserPhysicalPages, kernel32, 'FreeUserPhysicalPages');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_FreeUserPhysicalPages]
+ end;
+end;
+
+var
+ _MapUserPhysicalPages: Pointer;
+
+function MapUserPhysicalPages;
+begin
+ GetProcedureAddress(_MapUserPhysicalPages, kernel32, 'MapUserPhysicalPages');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MapUserPhysicalPages]
+ end;
+end;
+
+var
+ _MapUserPhysicalPagesScatter: Pointer;
+
+function MapUserPhysicalPagesScatter;
+begin
+ GetProcedureAddress(_MapUserPhysicalPagesScatter, kernel32, 'MapUserPhysicalPagesScatter');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MapUserPhysicalPagesScatter]
+ end;
+end;
+
+var
+ _CreateJobObjectA: Pointer;
+
+function CreateJobObjectA;
+begin
+ GetProcedureAddress(_CreateJobObjectA, kernel32, 'CreateJobObjectA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreateJobObjectA]
+ end;
+end;
+
+var
+ _CreateJobObjectW: Pointer;
+
+function CreateJobObjectW;
+begin
+ GetProcedureAddress(_CreateJobObjectW, kernel32, 'CreateJobObjectW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreateJobObjectW]
+ end;
+end;
+
+var
+ _CreateJobObject: Pointer;
+
+function CreateJobObject;
+begin
+ GetProcedureAddress(_CreateJobObject, kernel32, 'CreateJobObject' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreateJobObject]
+ end;
+end;
+
+var
+ _OpenJobObjectA: Pointer;
+
+function OpenJobObjectA;
+begin
+ GetProcedureAddress(_OpenJobObjectA, kernel32, 'OpenJobObjectA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_OpenJobObjectA]
+ end;
+end;
+
+var
+ _OpenJobObjectW: Pointer;
+
+function OpenJobObjectW;
+begin
+ GetProcedureAddress(_OpenJobObjectW, kernel32, 'OpenJobObjectW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_OpenJobObjectW]
+ end;
+end;
+
+var
+ _OpenJobObject: Pointer;
+
+function OpenJobObject;
+begin
+ GetProcedureAddress(_OpenJobObject, kernel32, 'OpenJobObject' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_OpenJobObject]
+ end;
+end;
+
+var
+ _AssignProcessToJobObject: Pointer;
+
+function AssignProcessToJobObject;
+begin
+ GetProcedureAddress(_AssignProcessToJobObject, kernel32, 'AssignProcessToJobObject');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_AssignProcessToJobObject]
+ end;
+end;
+
+var
+ _TerminateJobObject: Pointer;
+
+function TerminateJobObject;
+begin
+ GetProcedureAddress(_TerminateJobObject, kernel32, 'TerminateJobObject');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_TerminateJobObject]
+ end;
+end;
+
+var
+ _QueryInformationJobObject: Pointer;
+
+function QueryInformationJobObject;
+begin
+ GetProcedureAddress(_QueryInformationJobObject, kernel32, 'QueryInformationJobObject');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_QueryInformationJobObject]
+ end;
+end;
+
+var
+ _SetInformationJobObject: Pointer;
+
+function SetInformationJobObject;
+begin
+ GetProcedureAddress(_SetInformationJobObject, kernel32, 'SetInformationJobObject');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetInformationJobObject]
+ end;
+end;
+
+var
+ _IsProcessInJob: Pointer;
+
+function IsProcessInJob;
+begin
+ GetProcedureAddress(_IsProcessInJob, kernel32, 'IsProcessInJob');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_IsProcessInJob]
+ end;
+end;
+
+var
+ _CreateJobSet: Pointer;
+
+function CreateJobSet;
+begin
+ GetProcedureAddress(_CreateJobSet, kernel32, 'CreateJobSet');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreateJobSet]
+ end;
+end;
+
+var
+ _AddVectoredExceptionHandler: Pointer;
+
+function AddVectoredExceptionHandler;
+begin
+ GetProcedureAddress(_AddVectoredExceptionHandler, kernel32, 'AddVectoredExceptionHandler');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_AddVectoredExceptionHandler]
+ end;
+end;
+
+var
+ _RemoveVectoredExceptionHandler: Pointer;
+
+function RemoveVectoredExceptionHandler;
+begin
+ GetProcedureAddress(_RemoveVectoredExceptionHandler, kernel32, 'RemoveVectoredExceptionHandler');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RemoveVectoredExceptionHandler]
+ end;
+end;
+
+var
+ _FindFirstVolumeA: Pointer;
+
+function FindFirstVolumeA;
+begin
+ GetProcedureAddress(_FindFirstVolumeA, kernel32, 'FindFirstVolumeA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_FindFirstVolumeA]
+ end;
+end;
+
+var
+ _FindFirstVolumeW: Pointer;
+
+function FindFirstVolumeW;
+begin
+ GetProcedureAddress(_FindFirstVolumeW, kernel32, 'FindFirstVolumeW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_FindFirstVolumeW]
+ end;
+end;
+
+var
+ _FindFirstVolume: Pointer;
+
+function FindFirstVolume;
+begin
+ GetProcedureAddress(_FindFirstVolume, kernel32, 'FindFirstVolume' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_FindFirstVolume]
+ end;
+end;
+
+var
+ _FindNextVolumeA: Pointer;
+
+function FindNextVolumeA;
+begin
+ GetProcedureAddress(_FindNextVolumeA, kernel32, 'FindNextVolumeA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_FindNextVolumeA]
+ end;
+end;
+
+var
+ _FindNextVolumeW: Pointer;
+
+function FindNextVolumeW;
+begin
+ GetProcedureAddress(_FindNextVolumeW, kernel32, 'FindNextVolumeW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_FindNextVolumeW]
+ end;
+end;
+
+var
+ _FindNextVolume: Pointer;
+
+function FindNextVolume;
+begin
+ GetProcedureAddress(_FindNextVolume, kernel32, 'FindNextVolume' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_FindNextVolume]
+ end;
+end;
+
+var
+ _FindVolumeClose: Pointer;
+
+function FindVolumeClose;
+begin
+ GetProcedureAddress(_FindVolumeClose, kernel32, 'FindVolumeClose');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_FindVolumeClose]
+ end;
+end;
+
+var
+ _FindFirstVolumeMountPointA: Pointer;
+
+function FindFirstVolumeMountPointA;
+begin
+ GetProcedureAddress(_FindFirstVolumeMountPointA, kernel32, 'FindFirstVolumeMountPointA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_FindFirstVolumeMountPointA]
+ end;
+end;
+
+var
+ _FindFirstVolumeMountPointW: Pointer;
+
+function FindFirstVolumeMountPointW;
+begin
+ GetProcedureAddress(_FindFirstVolumeMountPointW, kernel32, 'FindFirstVolumeMountPointW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_FindFirstVolumeMountPointW]
+ end;
+end;
+
+var
+ _FindFirstVolumeMountPoint: Pointer;
+
+function FindFirstVolumeMountPoint;
+begin
+ GetProcedureAddress(_FindFirstVolumeMountPoint, kernel32, 'FindFirstVolumeMountPoint' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_FindFirstVolumeMountPoint]
+ end;
+end;
+
+var
+ _FindNextVolumeMountPointA: Pointer;
+
+function FindNextVolumeMountPointA;
+begin
+ GetProcedureAddress(_FindNextVolumeMountPointA, kernel32, 'FindNextVolumeMountPointA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_FindNextVolumeMountPointA]
+ end;
+end;
+
+var
+ _FindNextVolumeMountPointW: Pointer;
+
+function FindNextVolumeMountPointW;
+begin
+ GetProcedureAddress(_FindNextVolumeMountPointW, kernel32, 'FindNextVolumeMountPointW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_FindNextVolumeMountPointW]
+ end;
+end;
+
+var
+ _FindNextVolumeMountPoint: Pointer;
+
+function FindNextVolumeMountPoint;
+begin
+ GetProcedureAddress(_FindNextVolumeMountPoint, kernel32, 'FindNextVolumeMountPoint' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_FindNextVolumeMountPoint]
+ end;
+end;
+
+var
+ _FindVolumeMountPointClose: Pointer;
+
+function FindVolumeMountPointClose;
+begin
+ GetProcedureAddress(_FindVolumeMountPointClose, kernel32, 'FindVolumeMountPointClose');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_FindVolumeMountPointClose]
+ end;
+end;
+
+var
+ _SetVolumeMountPointA: Pointer;
+
+function SetVolumeMountPointA;
+begin
+ GetProcedureAddress(_SetVolumeMountPointA, kernel32, 'SetVolumeMountPointA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetVolumeMountPointA]
+ end;
+end;
+
+var
+ _SetVolumeMountPointW: Pointer;
+
+function SetVolumeMountPointW;
+begin
+ GetProcedureAddress(_SetVolumeMountPointW, kernel32, 'SetVolumeMountPointW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetVolumeMountPointW]
+ end;
+end;
+
+var
+ _SetVolumeMountPoint: Pointer;
+
+function SetVolumeMountPoint;
+begin
+ GetProcedureAddress(_SetVolumeMountPoint, kernel32, 'SetVolumeMountPoint' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetVolumeMountPoint]
+ end;
+end;
+
+var
+ _DeleteVolumeMountPointA: Pointer;
+
+function DeleteVolumeMountPointA;
+begin
+ GetProcedureAddress(_DeleteVolumeMountPointA, kernel32, 'DeleteVolumeMountPointA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DeleteVolumeMountPointA]
+ end;
+end;
+
+var
+ _DeleteVolumeMountPointW: Pointer;
+
+function DeleteVolumeMountPointW;
+begin
+ GetProcedureAddress(_DeleteVolumeMountPointW, kernel32, 'DeleteVolumeMountPointW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DeleteVolumeMountPointW]
+ end;
+end;
+
+var
+ _DeleteVolumeMountPoint: Pointer;
+
+function DeleteVolumeMountPoint;
+begin
+ GetProcedureAddress(_DeleteVolumeMountPoint, kernel32, 'DeleteVolumeMountPoint' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DeleteVolumeMountPoint]
+ end;
+end;
+
+var
+ _GetVolumeNameForVolMountPointA: Pointer;
+
+function GetVolumeNameForVolumeMountPointA;
+begin
+ GetProcedureAddress(_GetVolumeNameForVolMountPointA, kernel32, 'GetVolumeNameForVolumeMountPointA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetVolumeNameForVolMountPointA]
+ end;
+end;
+
+var
+ _GetVolumeNameForVolMountPointW: Pointer;
+
+function GetVolumeNameForVolumeMountPointW;
+begin
+ GetProcedureAddress(_GetVolumeNameForVolMountPointW, kernel32, 'GetVolumeNameForVolumeMountPointW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetVolumeNameForVolMountPointW]
+ end;
+end;
+
+var
+ _GetVolumeNameForVolMountPoint: Pointer;
+
+function GetVolumeNameForVolumeMountPoint;
+begin
+ GetProcedureAddress(_GetVolumeNameForVolMountPoint, kernel32, 'GetVolumeNameForVolumeMountPoint' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetVolumeNameForVolMountPoint]
+ end;
+end;
+
+var
+ _GetVolumePathNameA: Pointer;
+
+function GetVolumePathNameA;
+begin
+ GetProcedureAddress(_GetVolumePathNameA, kernel32, 'GetVolumePathNameA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetVolumePathNameA]
+ end;
+end;
+
+var
+ _GetVolumePathNameW: Pointer;
+
+function GetVolumePathNameW;
+begin
+ GetProcedureAddress(_GetVolumePathNameW, kernel32, 'GetVolumePathNameW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetVolumePathNameW]
+ end;
+end;
+
+var
+ _GetVolumePathName: Pointer;
+
+function GetVolumePathName;
+begin
+ GetProcedureAddress(_GetVolumePathName, kernel32, 'GetVolumePathName' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetVolumePathName]
+ end;
+end;
+
+var
+ _GetVolumePathNamesForVolNameA: Pointer;
+
+function GetVolumePathNamesForVolumeNameA;
+begin
+ GetProcedureAddress(_GetVolumePathNamesForVolNameA, kernel32, 'GetVolumePathNamesForVolumeNameA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetVolumePathNamesForVolNameA]
+ end;
+end;
+
+var
+ _GetVolumePathNamesForVolNameW: Pointer;
+
+function GetVolumePathNamesForVolumeNameW;
+begin
+ GetProcedureAddress(_GetVolumePathNamesForVolNameW, kernel32, 'GetVolumePathNamesForVolumeNameW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetVolumePathNamesForVolNameW]
+ end;
+end;
+
+var
+ _GetVolumePathNamesForVolName: Pointer;
+
+function GetVolumePathNamesForVolumeName;
+begin
+ GetProcedureAddress(_GetVolumePathNamesForVolName, kernel32, 'GetVolumePathNamesForVolumeName' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetVolumePathNamesForVolName]
+ end;
+end;
+
+var
+ _CreateActCtxA: Pointer;
+
+function CreateActCtxA;
+begin
+ GetProcedureAddress(_CreateActCtxA, kernel32, 'CreateActCtxA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreateActCtxA]
+ end;
+end;
+
+var
+ _CreateActCtxW: Pointer;
+
+function CreateActCtxW;
+begin
+ GetProcedureAddress(_CreateActCtxW, kernel32, 'CreateActCtxW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreateActCtxW]
+ end;
+end;
+
+var
+ _CreateActCtx: Pointer;
+
+function CreateActCtx;
+begin
+ GetProcedureAddress(_CreateActCtx, kernel32, 'CreateActCtx' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreateActCtx]
+ end;
+end;
+
+var
+ _AddRefActCtx: Pointer;
+
+procedure AddRefActCtx;
+begin
+ GetProcedureAddress(_AddRefActCtx, kernel32, 'AddRefActCtx');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_AddRefActCtx]
+ end;
+end;
+
+var
+ _ReleaseActCtx: Pointer;
+
+procedure ReleaseActCtx;
+begin
+ GetProcedureAddress(_ReleaseActCtx, kernel32, 'ReleaseActCtx');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ReleaseActCtx]
+ end;
+end;
+
+var
+ _ZombifyActCtx: Pointer;
+
+function ZombifyActCtx;
+begin
+ GetProcedureAddress(_ZombifyActCtx, kernel32, 'ZombifyActCtx');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ZombifyActCtx]
+ end;
+end;
+
+var
+ _ActivateActCtx: Pointer;
+
+function ActivateActCtx;
+begin
+ GetProcedureAddress(_ActivateActCtx, kernel32, 'ActivateActCtx');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ActivateActCtx]
+ end;
+end;
+
+var
+ _DeactivateActCtx: Pointer;
+
+function DeactivateActCtx;
+begin
+ GetProcedureAddress(_DeactivateActCtx, kernel32, 'DeactivateActCtx');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DeactivateActCtx]
+ end;
+end;
+
+var
+ _GetCurrentActCtx: Pointer;
+
+function GetCurrentActCtx;
+begin
+ GetProcedureAddress(_GetCurrentActCtx, kernel32, 'GetCurrentActCtx');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetCurrentActCtx]
+ end;
+end;
+
+var
+ _FindActCtxSectionStringA: Pointer;
+
+function FindActCtxSectionStringA;
+begin
+ GetProcedureAddress(_FindActCtxSectionStringA, kernel32, 'FindActCtxSectionStringA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_FindActCtxSectionStringA]
+ end;
+end;
+
+var
+ _FindActCtxSectionStringW: Pointer;
+
+function FindActCtxSectionStringW;
+begin
+ GetProcedureAddress(_FindActCtxSectionStringW, kernel32, 'FindActCtxSectionStringW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_FindActCtxSectionStringW]
+ end;
+end;
+
+var
+ _FindActCtxSectionString: Pointer;
+
+function FindActCtxSectionString;
+begin
+ GetProcedureAddress(_FindActCtxSectionString, kernel32, 'FindActCtxSectionString' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_FindActCtxSectionString]
+ end;
+end;
+
+var
+ _FindActCtxSectionGuid: Pointer;
+
+function FindActCtxSectionGuid;
+begin
+ GetProcedureAddress(_FindActCtxSectionGuid, kernel32, 'FindActCtxSectionGuid');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_FindActCtxSectionGuid]
+ end;
+end;
+
+var
+ _QueryActCtxW: Pointer;
+
+function QueryActCtxW;
+begin
+ GetProcedureAddress(_QueryActCtxW, kernel32, 'QueryActCtxW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_QueryActCtxW]
+ end;
+end;
+
+var
+ _ProcessIdToSessionId: Pointer;
+
+function ProcessIdToSessionId;
+begin
+ GetProcedureAddress(_ProcessIdToSessionId, kernel32, 'ProcessIdToSessionId');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ProcessIdToSessionId]
+ end;
+end;
+
+var
+ _WTSGetActiveConsoleSessionId: Pointer;
+
+function WTSGetActiveConsoleSessionId;
+begin
+ GetProcedureAddress(_WTSGetActiveConsoleSessionId, kernel32, 'WTSGetActiveConsoleSessionId');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WTSGetActiveConsoleSessionId]
+ end;
+end;
+
+var
+ _IsWow64Process: Pointer;
+
+function IsWow64Process;
+begin
+ GetProcedureAddress(_IsWow64Process, kernel32, 'IsWow64Process');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_IsWow64Process]
+ end;
+end;
+
+var
+ _GetLogicalProcessorInformation: Pointer;
+
+function GetLogicalProcessorInformation;
+begin
+ GetProcedureAddress(_GetLogicalProcessorInformation, kernel32, 'GetLogicalProcessorInformation');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetLogicalProcessorInformation]
+ end;
+end;
+
+var
+ _GetNumaHighestNodeNumber: Pointer;
+
+function GetNumaHighestNodeNumber;
+begin
+ GetProcedureAddress(_GetNumaHighestNodeNumber, kernel32, 'GetNumaHighestNodeNumber');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetNumaHighestNodeNumber]
+ end;
+end;
+
+var
+ _GetNumaProcessorNode: Pointer;
+
+function GetNumaProcessorNode;
+begin
+ GetProcedureAddress(_GetNumaProcessorNode, kernel32, 'GetNumaProcessorNode');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetNumaProcessorNode]
+ end;
+end;
+
+var
+ _GetNumaNodeProcessorMask: Pointer;
+
+function GetNumaNodeProcessorMask;
+begin
+ GetProcedureAddress(_GetNumaNodeProcessorMask, kernel32, 'GetNumaNodeProcessorMask');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetNumaNodeProcessorMask]
+ end;
+end;
+
+var
+ _GetNumaAvailableMemoryNode: Pointer;
+
+function GetNumaAvailableMemoryNode;
+begin
+ GetProcedureAddress(_GetNumaAvailableMemoryNode, kernel32, 'GetNumaAvailableMemoryNode');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetNumaAvailableMemoryNode]
+ end;
+end;
+
+{$ELSE}
+
+function InterlockedCompareExchange64; external kernel32 name 'InterlockedCompareExchange64';
+function InterlockedIncrement; external kernel32 name 'InterlockedIncrement';
+function InterlockedDecrement; external kernel32 name 'InterlockedDecrement';
+function InterlockedExchange; external kernel32 name 'InterlockedExchange';
+function InterlockedExchangeAdd; external kernel32 name 'InterlockedExchangeAdd';
+function InterlockedCompareExchange; external kernel32 name 'InterlockedCompareExchange';
+procedure InitializeSListHead; external kernel32 name 'InitializeSListHead';
+function InterlockedPopEntrySList; external kernel32 name 'InterlockedPopEntrySList';
+function InterlockedPushEntrySList; external kernel32 name 'InterlockedPushEntrySList';
+function InterlockedFlushSList; external kernel32 name 'InterlockedFlushSList';
+function QueryDepthSList; external kernel32 name 'QueryDepthSList';
+function FreeResource; external kernel32 name 'FreeResource';
+function LockResource; external kernel32 name 'LockResource';
+function FreeLibrary; external kernel32 name 'FreeLibrary';
+procedure FreeLibraryAndExitThread; external kernel32 name 'FreeLibraryAndExitThread';
+function DisableThreadLibraryCalls; external kernel32 name 'DisableThreadLibraryCalls';
+function GetProcAddress; external kernel32 name 'GetProcAddress';
+function GetVersion; external kernel32 name 'GetVersion';
+function GlobalAlloc; external kernel32 name 'GlobalAlloc';
+function GlobalReAlloc; external kernel32 name 'GlobalReAlloc';
+function GlobalSize; external kernel32 name 'GlobalSize';
+function GlobalFlags; external kernel32 name 'GlobalFlags';
+function GlobalLock; external kernel32 name 'GlobalLock';
+function GlobalHandle; external kernel32 name 'GlobalHandle';
+function GlobalUnlock; external kernel32 name 'GlobalUnlock';
+function GlobalFree; external kernel32 name 'GlobalFree';
+function GlobalCompact; external kernel32 name 'GlobalCompact';
+procedure GlobalFix; external kernel32 name 'GlobalFix';
+procedure GlobalUnfix; external kernel32 name 'GlobalUnfix';
+function GlobalWire; external kernel32 name 'GlobalWire';
+function GlobalUnWire; external kernel32 name 'GlobalUnWire';
+procedure GlobalMemoryStatus; external kernel32 name 'GlobalMemoryStatus';
+function GlobalMemoryStatusEx; external kernel32 name 'GlobalMemoryStatusEx';
+function LocalAlloc; external kernel32 name 'LocalAlloc';
+function LocalReAlloc; external kernel32 name 'LocalReAlloc';
+function LocalLock; external kernel32 name 'LocalLock';
+function LocalHandle; external kernel32 name 'LocalHandle';
+function LocalUnlock; external kernel32 name 'LocalUnlock';
+function LocalSize; external kernel32 name 'LocalSize';
+function LocalFlags; external kernel32 name 'LocalFlags';
+function LocalFree; external kernel32 name 'LocalFree';
+function LocalShrink; external kernel32 name 'LocalShrink';
+function LocalCompact; external kernel32 name 'LocalCompact';
+function FlushInstructionCache; external kernel32 name 'FlushInstructionCache';
+function VirtualAlloc; external kernel32 name 'VirtualAlloc';
+function VirtualFree; external kernel32 name 'VirtualFree';
+function VirtualProtect; external kernel32 name 'VirtualProtect';
+function VirtualQuery; external kernel32 name 'VirtualQuery';
+function VirtualAllocEx; external kernel32 name 'VirtualAllocEx';
+function GetWriteWatch; external kernel32 name 'GetWriteWatch';
+function ResetWriteWatch; external kernel32 name 'ResetWriteWatch';
+function GetLargePageMinimum; external kernel32 name 'GetLargePageMinimum';
+function VirtualFreeEx; external kernel32 name 'VirtualFreeEx';
+function VirtualProtectEx; external kernel32 name 'VirtualProtectEx';
+function VirtualQueryEx; external kernel32 name 'VirtualQueryEx';
+function HeapCreate; external kernel32 name 'HeapCreate';
+function HeapDestroy; external kernel32 name 'HeapDestroy';
+function HeapAlloc; external kernel32 name 'HeapAlloc';
+function HeapReAlloc; external kernel32 name 'HeapReAlloc';
+function HeapFree; external kernel32 name 'HeapFree';
+function HeapSize; external kernel32 name 'HeapSize';
+function HeapValidate; external kernel32 name 'HeapValidate';
+function HeapCompact; external kernel32 name 'HeapCompact';
+function GetProcessHeap; external kernel32 name 'GetProcessHeap';
+function GetProcessHeaps; external kernel32 name 'GetProcessHeaps';
+function HeapLock; external kernel32 name 'HeapLock';
+function HeapUnlock; external kernel32 name 'HeapUnlock';
+function HeapWalk; external kernel32 name 'HeapWalk';
+function HeapSetInformation; external kernel32 name 'HeapSetInformation';
+function HeapQueryInformation; external kernel32 name 'HeapQueryInformation';
+function GetBinaryTypeA; external kernel32 name 'GetBinaryTypeA';
+function GetBinaryTypeW; external kernel32 name 'GetBinaryTypeW';
+function GetBinaryType; external kernel32 name 'GetBinaryType' + AWSuffix;
+function GetShortPathNameA; external kernel32 name 'GetShortPathNameA';
+function GetShortPathNameW; external kernel32 name 'GetShortPathNameW';
+function GetShortPathName; external kernel32 name 'GetShortPathName' + AWSuffix;
+function GetLongPathNameA; external kernel32 name 'GetLongPathNameA';
+function GetLongPathNameW; external kernel32 name 'GetLongPathNameW';
+function GetLongPathName; external kernel32 name 'GetLongPathName' + AWSuffix;
+function GetProcessAffinityMask; external kernel32 name 'GetProcessAffinityMask';
+function SetProcessAffinityMask; external kernel32 name 'SetProcessAffinityMask';
+function GetProcessHandleCount; external kernel32 name 'GetProcessHandleCount';
+function GetProcessTimes; external kernel32 name 'GetProcessTimes';
+function GetProcessIoCounters; external kernel32 name 'GetProcessIoCounters';
+function GetProcessWorkingSetSize; external kernel32 name 'GetProcessWorkingSetSize';
+function GetProcessWorkingSetSizeEx; external kernel32 name 'GetProcessWorkingSetSizeEx';
+function SetProcessWorkingSetSize; external kernel32 name 'SetProcessWorkingSetSize';
+function SetProcessWorkingSetSizeEx; external kernel32 name 'SetProcessWorkingSetSizeEx';
+function OpenProcess; external kernel32 name 'OpenProcess';
+function GetCurrentProcess; external kernel32 name 'GetCurrentProcess';
+function GetCurrentProcessId; external kernel32 name 'GetCurrentProcessId';
+procedure ExitProcess; external kernel32 name 'ExitProcess';
+function TerminateProcess; external kernel32 name 'TerminateProcess';
+function GetExitCodeProcess; external kernel32 name 'GetExitCodeProcess';
+procedure FatalExit; external kernel32 name 'FatalExit';
+function GetEnvironmentStringsW; external kernel32 name 'GetEnvironmentStringsW';
+function GetEnvironmentStrings; external kernel32 name 'GetEnvironmentStrings' + AWSuffix;
+{$IFNDEF UNICODE}
+function GetEnvironmentStringsA; external kernel32 name 'GetEnvironmentStringsA';
+{$ENDIF !UNICODE}
+function SetEnvironmentStringsA; external kernel32 name 'SetEnvironmentStringsA';
+function SetEnvironmentStringsW; external kernel32 name 'SetEnvironmentStringsW';
+function SetEnvironmentStrings; external kernel32 name 'SetEnvironmentStrings' + AWSuffix;
+function FreeEnvironmentStringsA; external kernel32 name 'FreeEnvironmentStringsA';
+function FreeEnvironmentStringsW; external kernel32 name 'FreeEnvironmentStringsW';
+function FreeEnvironmentStrings; external kernel32 name 'FreeEnvironmentStrings' + AWSuffix;
+procedure RaiseException; external kernel32 name 'RaiseException';
+function UnhandledExceptionFilter; external kernel32 name 'UnhandledExceptionFilter';
+function SetUnhandledExceptionFilter; external kernel32 name 'SetUnhandledExceptionFilter';
+function CreateFiber; external kernel32 name 'CreateFiber';
+function CreateFiberEx; external kernel32 name 'CreateFiberEx';
+procedure DeleteFiber; external kernel32 name 'DeleteFiber';
+function ConvertThreadToFiber; external kernel32 name 'ConvertThreadToFiber';
+function ConvertThreadToFiberEx; external kernel32 name 'ConvertThreadToFiberEx';
+function ConvertFiberToThread; external kernel32 name 'ConvertFiberToThread';
+procedure SwitchToFiber; external kernel32 name 'SwitchToFiber';
+function SwitchToThread; external kernel32 name 'SwitchToThread';
+function CreateThread; external kernel32 name 'CreateThread';
+function CreateRemoteThread; external kernel32 name 'CreateRemoteThread';
+function GetCurrentThread; external kernel32 name 'GetCurrentThread';
+function GetCurrentThreadId; external kernel32 name 'GetCurrentThreadId';
+function GetProcessIdOfThread; external kernel32 name 'GetProcessIdOfThread';
+function GetThreadId; external kernel32 name 'GetThreadId';
+function GetProcessId; external kernel32 name 'GetProcessId';
+function GetCurrentProcessorNumber; external kernel32 name 'GetCurrentProcessorNumber';
+function SetThreadAffinityMask; external kernel32 name 'SetThreadAffinityMask';
+function SetThreadIdealProcessor; external kernel32 name 'SetThreadIdealProcessor';
+function SetProcessPriorityBoost; external kernel32 name 'SetProcessPriorityBoost';
+function GetProcessPriorityBoost; external kernel32 name 'GetProcessPriorityBoost';
+function RequestWakeupLatency; external kernel32 name 'RequestWakeupLatency';
+function IsSystemResumeAutomatic; external kernel32 name 'IsSystemResumeAutomatic';
+function OpenThread; external kernel32 name 'OpenThread';
+function SetThreadPriority; external kernel32 name 'SetThreadPriority';
+function SetThreadPriorityBoost; external kernel32 name 'SetThreadPriorityBoost';
+function GetThreadPriorityBoost; external kernel32 name 'GetThreadPriorityBoost';
+function GetThreadPriority; external kernel32 name 'GetThreadPriority';
+function GetThreadTimes; external kernel32 name 'GetThreadTimes';
+function GetThreadIOPendingFlag; external kernel32 name 'GetThreadIOPendingFlag';
+procedure ExitThread; external kernel32 name 'ExitThread';
+function TerminateThread; external kernel32 name 'TerminateThread';
+function GetExitCodeThread; external kernel32 name 'GetExitCodeThread';
+function GetThreadSelectorEntry; external kernel32 name 'GetThreadSelectorEntry';
+function SetThreadExecutionState; external kernel32 name 'SetThreadExecutionState';
+function GetLastError; external kernel32 name 'GetLastError';
+procedure SetLastError; external kernel32 name 'SetLastError';
+procedure RestoreLastError; external kernel32 name 'RestoreLastError';
+function GetOverlappedResult; external kernel32 name 'GetOverlappedResult';
+function CreateIoCompletionPort; external kernel32 name 'CreateIoCompletionPort';
+function GetQueuedCompletionStatus; external kernel32 name 'GetQueuedCompletionStatus';
+function PostQueuedCompletionStatus; external kernel32 name 'PostQueuedCompletionStatus';
+function SetErrorMode; external kernel32 name 'SetErrorMode';
+function ReadProcessMemory; external kernel32 name 'ReadProcessMemory';
+function WriteProcessMemory; external kernel32 name 'WriteProcessMemory';
+function GetThreadContext; external kernel32 name 'GetThreadContext';
+function SetThreadContext; external kernel32 name 'SetThreadContext';
+function SuspendThread; external kernel32 name 'SuspendThread';
+function ResumeThread; external kernel32 name 'ResumeThread';
+function QueueUserAPC; external kernel32 name 'QueueUserAPC';
+function IsDebuggerPresent; external kernel32 name 'IsDebuggerPresent';
+function CheckRemoteDebuggerPresent; external kernel32 name 'CheckRemoteDebuggerPresent';
+procedure DebugBreak; external kernel32 name 'DebugBreak';
+function WaitForDebugEvent; external kernel32 name 'WaitForDebugEvent';
+function ContinueDebugEvent; external kernel32 name 'ContinueDebugEvent';
+function DebugActiveProcess; external kernel32 name 'DebugActiveProcess';
+function DebugActiveProcessStop; external kernel32 name 'DebugActiveProcessStop';
+function DebugSetProcessKillOnExit; external kernel32 name 'DebugSetProcessKillOnExit';
+function DebugBreakProcess; external kernel32 name 'DebugBreakProcess';
+procedure InitializeCriticalSection; external kernel32 name 'InitializeCriticalSection';
+procedure EnterCriticalSection; external kernel32 name 'EnterCriticalSection';
+procedure LeaveCriticalSection; external kernel32 name 'LeaveCriticalSection';
+function InitializeCriticalSectionAndSpinCount; external kernel32 name 'InitializeCriticalSectionAndSpinCount';
+function SetCriticalSectionSpinCount; external kernel32 name 'SetCriticalSectionSpinCount';
+function TryEnterCriticalSection; external kernel32 name 'TryEnterCriticalSection';
+procedure DeleteCriticalSection; external kernel32 name 'DeleteCriticalSection';
+function SetEvent; external kernel32 name 'SetEvent';
+function ResetEvent; external kernel32 name 'ResetEvent';
+function PulseEvent; external kernel32 name 'PulseEvent';
+function ReleaseSemaphore; external kernel32 name 'ReleaseSemaphore';
+function ReleaseMutex; external kernel32 name 'ReleaseMutex';
+function WaitForSingleObject; external kernel32 name 'WaitForSingleObject';
+function WaitForMultipleObjects; external kernel32 name 'WaitForMultipleObjects';
+procedure Sleep; external kernel32 name 'Sleep';
+function LoadResource; external kernel32 name 'LoadResource';
+function SizeofResource; external kernel32 name 'SizeofResource';
+function GlobalDeleteAtom; external kernel32 name 'GlobalDeleteAtom';
+function InitAtomTable; external kernel32 name 'InitAtomTable';
+function DeleteAtom; external kernel32 name 'DeleteAtom';
+function SetHandleCount; external kernel32 name 'SetHandleCount';
+function GetLogicalDrives; external kernel32 name 'GetLogicalDrives';
+function LockFile; external kernel32 name 'LockFile';
+function UnlockFile; external kernel32 name 'UnlockFile';
+function LockFileEx; external kernel32 name 'LockFileEx';
+function UnlockFileEx; external kernel32 name 'UnlockFileEx';
+function GetFileInformationByHandle; external kernel32 name 'GetFileInformationByHandle';
+function GetFileType; external kernel32 name 'GetFileType';
+function GetFileSize; external kernel32 name 'GetFileSize';
+function GetFileSizeEx; external kernel32 name 'GetFileSizeEx';
+function GetStdHandle; external kernel32 name 'GetStdHandle';
+function SetStdHandle; external kernel32 name 'SetStdHandle';
+function WriteFile; external kernel32 name 'WriteFile';
+function ReadFile; external kernel32 name 'ReadFile';
+function FlushFileBuffers; external kernel32 name 'FlushFileBuffers';
+function DeviceIoControl; external kernel32 name 'DeviceIoControl';
+function RequestDeviceWakeup; external kernel32 name 'RequestDeviceWakeup';
+function CancelDeviceWakeupRequest; external kernel32 name 'CancelDeviceWakeupRequest';
+function GetDevicePowerState; external kernel32 name 'GetDevicePowerState';
+function SetMessageWaitingIndicator; external kernel32 name 'SetMessageWaitingIndicator';
+function SetEndOfFile; external kernel32 name 'SetEndOfFile';
+function SetFilePointer; external kernel32 name 'SetFilePointer';
+function SetFilePointerEx; external kernel32 name 'SetFilePointerEx';
+function FindClose; external kernel32 name 'FindClose';
+function GetFileTime; external kernel32 name 'GetFileTime';
+function SetFileTime; external kernel32 name 'SetFileTime';
+function SetFileValidData; external kernel32 name 'SetFileValidData';
+function SetFileShortNameA; external kernel32 name 'SetFileShortNameA';
+function SetFileShortNameW; external kernel32 name 'SetFileShortNameW';
+function SetFileShortName; external kernel32 name 'SetFileShortName' + AWSuffix;
+function CloseHandle; external kernel32 name 'CloseHandle';
+function DuplicateHandle; external kernel32 name 'DuplicateHandle';
+function GetHandleInformation; external kernel32 name 'GetHandleInformation';
+function SetHandleInformation; external kernel32 name 'SetHandleInformation';
+function LoadModule; external kernel32 name 'LoadModule';
+function WinExec; external kernel32 name 'WinExec';
+function ClearCommBreak; external kernel32 name 'ClearCommBreak';
+function ClearCommError; external kernel32 name 'ClearCommError';
+function SetupComm; external kernel32 name 'SetupComm';
+function EscapeCommFunction; external kernel32 name 'EscapeCommFunction';
+function GetCommConfig; external kernel32 name 'GetCommConfig';
+function GetCommMask; external kernel32 name 'GetCommMask';
+function GetCommProperties; external kernel32 name 'GetCommProperties';
+function GetCommModemStatus; external kernel32 name 'GetCommModemStatus';
+function GetCommState; external kernel32 name 'GetCommState';
+function GetCommTimeouts; external kernel32 name 'GetCommTimeouts';
+function PurgeComm; external kernel32 name 'PurgeComm';
+function SetCommBreak; external kernel32 name 'SetCommBreak';
+function SetCommConfig; external kernel32 name 'SetCommConfig';
+function SetCommMask; external kernel32 name 'SetCommMask';
+function SetCommState; external kernel32 name 'SetCommState';
+function SetCommTimeouts; external kernel32 name 'SetCommTimeouts';
+function TransmitCommChar; external kernel32 name 'TransmitCommChar';
+function WaitCommEvent; external kernel32 name 'WaitCommEvent';
+function SetTapePosition; external kernel32 name 'SetTapePosition';
+function GetTapePosition; external kernel32 name 'GetTapePosition';
+function PrepareTape; external kernel32 name 'PrepareTape';
+function EraseTape; external kernel32 name 'EraseTape';
+function CreateTapePartition; external kernel32 name 'CreateTapePartition';
+function WriteTapemark; external kernel32 name 'WriteTapemark';
+function GetTapeStatus; external kernel32 name 'GetTapeStatus';
+function GetTapeParameters; external kernel32 name 'GetTapeParameters';
+function SetTapeParameters; external kernel32 name 'SetTapeParameters';
+function Beep; external kernel32 name 'Beep';
+function MulDiv; external kernel32 name 'MulDiv';
+procedure GetSystemTime; external kernel32 name 'GetSystemTime';
+procedure GetSystemTimeAsFileTime; external kernel32 name 'GetSystemTimeAsFileTime';
+function SetSystemTime; external kernel32 name 'SetSystemTime';
+procedure GetLocalTime; external kernel32 name 'GetLocalTime';
+function SetLocalTime; external kernel32 name 'SetLocalTime';
+procedure GetSystemInfo; external kernel32 name 'GetSystemInfo';
+function GetSystemRegistryQuota; external kernel32 name 'GetSystemRegistryQuota';
+function GetSystemTimes; external kernel32 name 'GetSystemTimes';
+procedure GetNativeSystemInfo; external kernel32 name 'GetNativeSystemInfo';
+function IsProcessorFeaturePresent; external kernel32 name 'IsProcessorFeaturePresent';
+function SystemTimeToTzSpecificLocalTime; external kernel32 name 'SystemTimeToTzSpecificLocalTime';
+function TzSpecificLocalTimeToSystemTime; external kernel32 name 'TzSpecificLocalTimeToSystemTime';
+function GetTimeZoneInformation; external kernel32 name 'GetTimeZoneInformation';
+function SetTimeZoneInformation; external kernel32 name 'SetTimeZoneInformation';
+function SystemTimeToFileTime; external kernel32 name 'SystemTimeToFileTime';
+function FileTimeToLocalFileTime; external kernel32 name 'FileTimeToLocalFileTime';
+function LocalFileTimeToFileTime; external kernel32 name 'LocalFileTimeToFileTime';
+function FileTimeToSystemTime; external kernel32 name 'FileTimeToSystemTime';
+function CompareFileTime; external kernel32 name 'CompareFileTime';
+function FileTimeToDosDateTime; external kernel32 name 'FileTimeToDosDateTime';
+function DosDateTimeToFileTime; external kernel32 name 'DosDateTimeToFileTime';
+function GetTickCount; external kernel32 name 'GetTickCount';
+function SetSystemTimeAdjustment; external kernel32 name 'SetSystemTimeAdjustment';
+function GetSystemTimeAdjustment; external kernel32 name 'GetSystemTimeAdjustment';
+function FormatMessageA; external kernel32 name 'FormatMessageA';
+function FormatMessageW; external kernel32 name 'FormatMessageW';
+function FormatMessage; external kernel32 name 'FormatMessage' + AWSuffix;
+function CreatePipe; external kernel32 name 'CreatePipe';
+function ConnectNamedPipe; external kernel32 name 'ConnectNamedPipe';
+function DisconnectNamedPipe; external kernel32 name 'DisconnectNamedPipe';
+function SetNamedPipeHandleState; external kernel32 name 'SetNamedPipeHandleState';
+function GetNamedPipeInfo; external kernel32 name 'GetNamedPipeInfo';
+function PeekNamedPipe; external kernel32 name 'PeekNamedPipe';
+function TransactNamedPipe; external kernel32 name 'TransactNamedPipe';
+function CreateMailslotA; external kernel32 name 'CreateMailslotA';
+function CreateMailslotW; external kernel32 name 'CreateMailslotW';
+function CreateMailslot; external kernel32 name 'CreateMailslot' + AWSuffix;
+function GetMailslotInfo; external kernel32 name 'GetMailslotInfo';
+function SetMailslotInfo; external kernel32 name 'SetMailslotInfo';
+function MapViewOfFile; external kernel32 name 'MapViewOfFile';
+function FlushViewOfFile; external kernel32 name 'FlushViewOfFile';
+function UnmapViewOfFile; external kernel32 name 'UnmapViewOfFile';
+function EncryptFileA; external advapi32 name 'EncryptFileA';
+function EncryptFileW; external advapi32 name 'EncryptFileW';
+function EncryptFile; external advapi32 name 'EncryptFile' + AWSuffix;
+function DecryptFileA; external advapi32 name 'DecryptFileA';
+function DecryptFileW; external advapi32 name 'DecryptFileW';
+function DecryptFile; external advapi32 name 'DecryptFile' + AWSuffix;
+function FileEncryptionStatusA; external advapi32 name 'FileEncryptionStatusA';
+function FileEncryptionStatusW; external advapi32 name 'FileEncryptionStatusW';
+function FileEncryptionStatus; external advapi32 name 'FileEncryptionStatus' + AWSuffix;
+function OpenEncryptedFileRawA; external advapi32 name 'OpenEncryptedFileRawA';
+function OpenEncryptedFileRawW; external advapi32 name 'OpenEncryptedFileRawW';
+function OpenEncryptedFileRaw; external advapi32 name 'OpenEncryptedFileRaw' + AWSuffix;
+function ReadEncryptedFileRaw; external advapi32 name 'ReadEncryptedFileRaw';
+function WriteEncryptedFileRaw; external advapi32 name 'WriteEncryptedFileRaw';
+procedure CloseEncryptedFileRaw; external advapi32 name 'CloseEncryptedFileRaw';
+function lstrcmpA; external kernel32 name 'lstrcmpA';
+function lstrcmpW; external kernel32 name 'lstrcmpW';
+function lstrcmp; external kernel32 name 'lstrcmp' + AWSuffix;
+function lstrcmpiA; external kernel32 name 'lstrcmpiA';
+function lstrcmpiW; external kernel32 name 'lstrcmpiW';
+function lstrcmpi; external kernel32 name 'lstrcmpi' + AWSuffix;
+function lstrcpynA; external kernel32 name 'lstrcpynA';
+function lstrcpynW; external kernel32 name 'lstrcpynW';
+function lstrcpyn; external kernel32 name 'lstrcpyn' + AWSuffix;
+function lstrcpyA; external kernel32 name 'lstrcpyA';
+function lstrcpyW; external kernel32 name 'lstrcpyW';
+function lstrcpy; external kernel32 name 'lstrcpy' + AWSuffix;
+function lstrcatA; external kernel32 name 'lstrcatA';
+function lstrcatW; external kernel32 name 'lstrcatW';
+function lstrcat; external kernel32 name 'lstrcat' + AWSuffix;
+function lstrlenA; external kernel32 name 'lstrlenA';
+function lstrlenW; external kernel32 name 'lstrlenW';
+function lstrlen; external kernel32 name 'lstrlen' + AWSuffix;
+function OpenFile; external kernel32 name 'OpenFile';
+function _lopen; external kernel32 name '_lopen';
+function _lcreat; external kernel32 name '_lcreat';
+function _lread; external kernel32 name '_lread';
+function _lwrite; external kernel32 name '_lwrite';
+function _hread; external kernel32 name '_hread';
+function _hwrite; external kernel32 name '_hwrite';
+function _lclose; external kernel32 name '_lclose';
+function _llseek; external kernel32 name '_llseek';
+function IsTextUnicode; external advapi32 name 'IsTextUnicode';
+function FlsAlloc; external kernel32 name 'FlsAlloc';
+function FlsGetValue; external kernel32 name 'FlsGetValue';
+function FlsSetValue; external kernel32 name 'FlsSetValue';
+function FlsFree; external kernel32 name 'FlsFree';
+function TlsAlloc; external kernel32 name 'TlsAlloc';
+function TlsGetValue; external kernel32 name 'TlsGetValue';
+function TlsSetValue; external kernel32 name 'TlsSetValue';
+function TlsFree; external kernel32 name 'TlsFree';
+function SleepEx; external kernel32 name 'SleepEx';
+function WaitForSingleObjectEx; external kernel32 name 'WaitForSingleObjectEx';
+function WaitForMultipleObjectsEx; external kernel32 name 'WaitForMultipleObjectsEx';
+function SignalObjectAndWait; external kernel32 name 'SignalObjectAndWait';
+function ReadFileEx; external kernel32 name 'ReadFileEx';
+function WriteFileEx; external kernel32 name 'WriteFileEx';
+function BackupRead; external kernel32 name 'BackupRead';
+function BackupSeek; external kernel32 name 'BackupSeek';
+function BackupWrite; external kernel32 name 'BackupWrite';
+function ReadFileScatter; external kernel32 name 'ReadFileScatter';
+function WriteFileGather; external kernel32 name 'WriteFileGather';
+function OpenMutexA; external kernel32 name 'OpenMutexA';
+function OpenMutexW; external kernel32 name 'OpenMutexW';
+function OpenMutex; external kernel32 name 'OpenMutex' + AWSuffix;
+function CreateEventA; external kernel32 name 'CreateEventA';
+function CreateEventW; external kernel32 name 'CreateEventW';
+function CreateEvent; external kernel32 name 'CreateEvent' + AWSuffix;
+function OpenEventA; external kernel32 name 'OpenEventA';
+function OpenEventW; external kernel32 name 'OpenEventW';
+function OpenEvent; external kernel32 name 'OpenEvent' + AWSuffix;
+function CreateSemaphoreA; external kernel32 name 'CreateSemaphoreA';
+function CreateSemaphoreW; external kernel32 name 'CreateSemaphoreW';
+function CreateSemaphore; external kernel32 name 'CreateSemaphore' + AWSuffix;
+function OpenSemaphoreA; external kernel32 name 'OpenSemaphoreA';
+function OpenSemaphoreW; external kernel32 name 'OpenSemaphoreW';
+function OpenSemaphore; external kernel32 name 'OpenSemaphore' + AWSuffix;
+function CreateWaitableTimerA; external kernel32 name 'CreateWaitableTimerA';
+function CreateWaitableTimerW; external kernel32 name 'CreateWaitableTimerW';
+function CreateWaitableTimer; external kernel32 name 'CreateWaitableTimer' + AWSuffix;
+function OpenWaitableTimerA; external kernel32 name 'OpenWaitableTimerA';
+function OpenWaitableTimerW; external kernel32 name 'OpenWaitableTimerW';
+function OpenWaitableTimer; external kernel32 name 'OpenWaitableTimer' + AWSuffix;
+function SetWaitableTimer; external kernel32 name 'SetWaitableTimer';
+function CancelWaitableTimer; external kernel32 name 'CancelWaitableTimer';
+function CreateFileMappingA; external kernel32 name 'CreateFileMappingA';
+function CreateFileMappingW; external kernel32 name 'CreateFileMappingW';
+function CreateFileMapping; external kernel32 name 'CreateFileMapping' + AWSuffix;
+function OpenFileMappingA; external kernel32 name 'OpenFileMappingA';
+function OpenFileMappingW; external kernel32 name 'OpenFileMappingW';
+function OpenFileMapping; external kernel32 name 'OpenFileMapping' + AWSuffix;
+function GetLogicalDriveStringsA; external kernel32 name 'GetLogicalDriveStringsA';
+function GetLogicalDriveStringsW; external kernel32 name 'GetLogicalDriveStringsW';
+function GetLogicalDriveStrings; external kernel32 name 'GetLogicalDriveStrings' + AWSuffix;
+function CreateMemoryResourceNotification; external kernel32 name 'CreateMemoryResourceNotification';
+function QueryMemoryResourceNotification; external kernel32 name 'QueryMemoryResourceNotification';
+function LoadLibraryA; external kernel32 name 'LoadLibraryA';
+function LoadLibraryW; external kernel32 name 'LoadLibraryW';
+function LoadLibrary; external kernel32 name 'LoadLibrary' + AWSuffix;
+function LoadLibraryExA; external kernel32 name 'LoadLibraryExA';
+function LoadLibraryExW; external kernel32 name 'LoadLibraryExW';
+function LoadLibraryEx; external kernel32 name 'LoadLibraryEx' + AWSuffix;
+function GetModuleFileNameA; external kernel32 name 'GetModuleFileNameA';
+function GetModuleFileNameW; external kernel32 name 'GetModuleFileNameW';
+function GetModuleFileName; external kernel32 name 'GetModuleFileName' + AWSuffix;
+function GetModuleHandleA; external kernel32 name 'GetModuleHandleA';
+function GetModuleHandleW; external kernel32 name 'GetModuleHandleW';
+function GetModuleHandle; external kernel32 name 'GetModuleHandle' + AWSuffix;
+function CreateProcessA; external kernel32 name 'CreateProcessA';
+function CreateProcessW; external kernel32 name 'CreateProcessW';
+function CreateProcess; external kernel32 name 'CreateProcess' + AWSuffix;
+function GetModuleHandleExA; external kernel32 name 'GetModuleHandleExA';
+function GetModuleHandleExW; external kernel32 name 'GetModuleHandleExW';
+function GetModuleHandleEx; external kernel32 name 'GetModuleHandleEx' + AWSuffix;
+function NeedCurrentDirectoryForExePathA; external kernel32 name 'NeedCurrentDirectoryForExePathA';
+function NeedCurrentDirectoryForExePathW; external kernel32 name 'NeedCurrentDirectoryForExePathW';
+function NeedCurrentDirectoryForExePath; external kernel32 name 'NeedCurrentDirectoryForExePath' + AWSuffix;
+function SetProcessShutdownParameters; external kernel32 name 'SetProcessShutdownParameters';
+function GetProcessShutdownParameters; external kernel32 name 'GetProcessShutdownParameters';
+function GetProcessVersion; external kernel32 name 'GetProcessVersion';
+procedure FatalAppExitA; external kernel32 name 'FatalAppExitA';
+procedure FatalAppExitW; external kernel32 name 'FatalAppExitW';
+procedure FatalAppExit; external kernel32 name 'FatalAppExit' + AWSuffix;
+procedure GetStartupInfoA; external kernel32 name 'GetStartupInfoA';
+procedure GetStartupInfoW; external kernel32 name 'GetStartupInfoW';
+procedure GetStartupInfo; external kernel32 name 'GetStartupInfo' + AWSuffix;
+function GetCommandLineA; external kernel32 name 'GetCommandLineA';
+function GetCommandLineW; external kernel32 name 'GetCommandLineW';
+function GetCommandLine; external kernel32 name 'GetCommandLine' + AWSuffix;
+function GetEnvironmentVariableA; external kernel32 name 'GetEnvironmentVariableA';
+function GetEnvironmentVariableW; external kernel32 name 'GetEnvironmentVariableW';
+function GetEnvironmentVariable; external kernel32 name 'GetEnvironmentVariable' + AWSuffix;
+function SetEnvironmentVariableA; external kernel32 name 'SetEnvironmentVariableA';
+function SetEnvironmentVariableW; external kernel32 name 'SetEnvironmentVariableW';
+function SetEnvironmentVariable; external kernel32 name 'SetEnvironmentVariable' + AWSuffix;
+function ExpandEnvironmentStringsA; external kernel32 name 'ExpandEnvironmentStringsA';
+function ExpandEnvironmentStringsW; external kernel32 name 'ExpandEnvironmentStringsW';
+function ExpandEnvironmentStrings; external kernel32 name 'ExpandEnvironmentStrings' + AWSuffix;
+function GetFirmwareEnvironmentVariableA; external kernel32 name 'GetFirmwareEnvironmentVariableA';
+function GetFirmwareEnvironmentVariableW; external kernel32 name 'GetFirmwareEnvironmentVariableW';
+function GetFirmwareEnvironmentVariable; external kernel32 name 'GetFirmwareEnvironmentVariable' + AWSuffix;
+function SetFirmwareEnvironmentVariableA; external kernel32 name 'SetFirmwareEnvironmentVariableA';
+function SetFirmwareEnvironmentVariableW; external kernel32 name 'SetFirmwareEnvironmentVariableW';
+function SetFirmwareEnvironmentVariable; external kernel32 name 'SetFirmwareEnvironmentVariable' + AWSuffix;
+procedure OutputDebugStringA; external kernel32 name 'OutputDebugStringA';
+procedure OutputDebugStringW; external kernel32 name 'OutputDebugStringW';
+procedure OutputDebugString; external kernel32 name 'OutputDebugString' + AWSuffix;
+function FindResourceA; external kernel32 name 'FindResourceA';
+function FindResourceW; external kernel32 name 'FindResourceW';
+function FindResource; external kernel32 name 'FindResource' + AWSuffix;
+function FindResourceExA; external kernel32 name 'FindResourceExA';
+function FindResourceExW; external kernel32 name 'FindResourceExW';
+function FindResourceEx; external kernel32 name 'FindResourceEx' + AWSuffix;
+function EnumResourceTypesA; external kernel32 name 'EnumResourceTypesA';
+function EnumResourceTypesW; external kernel32 name 'EnumResourceTypesW';
+function EnumResourceTypes; external kernel32 name 'EnumResourceTypes' + AWSuffix;
+function EnumResourceNamesA; external kernel32 name 'EnumResourceNamesA';
+function EnumResourceNamesW; external kernel32 name 'EnumResourceNamesW';
+function EnumResourceNames; external kernel32 name 'EnumResourceNames' + AWSuffix;
+function EnumResourceLanguagesA; external kernel32 name 'EnumResourceLanguagesA';
+function EnumResourceLanguagesW; external kernel32 name 'EnumResourceLanguagesW';
+function EnumResourceLanguages; external kernel32 name 'EnumResourceLanguages' + AWSuffix;
+function BeginUpdateResourceA; external kernel32 name 'BeginUpdateResourceA';
+function BeginUpdateResourceW; external kernel32 name 'BeginUpdateResourceW';
+function BeginUpdateResource; external kernel32 name 'BeginUpdateResource' + AWSuffix;
+function UpdateResourceA; external kernel32 name 'UpdateResourceA';
+function UpdateResourceW; external kernel32 name 'UpdateResourceW';
+function UpdateResource; external kernel32 name 'UpdateResource' + AWSuffix;
+function EndUpdateResourceA; external kernel32 name 'EndUpdateResourceA';
+function EndUpdateResourceW; external kernel32 name 'EndUpdateResourceW';
+function EndUpdateResource; external kernel32 name 'EndUpdateResource' + AWSuffix;
+function GlobalAddAtomA; external kernel32 name 'GlobalAddAtomA';
+function GlobalAddAtomW; external kernel32 name 'GlobalAddAtomW';
+function GlobalAddAtom; external kernel32 name 'GlobalAddAtom' + AWSuffix;
+function GlobalFindAtomA; external kernel32 name 'GlobalFindAtomA';
+function GlobalFindAtomW; external kernel32 name 'GlobalFindAtomW';
+function GlobalFindAtom; external kernel32 name 'GlobalFindAtom' + AWSuffix;
+function GlobalGetAtomNameA; external kernel32 name 'GlobalGetAtomNameA';
+function GlobalGetAtomNameW; external kernel32 name 'GlobalGetAtomNameW';
+function GlobalGetAtomName; external kernel32 name 'GlobalGetAtomName' + AWSuffix;
+function AddAtomA; external kernel32 name 'AddAtomA';
+function AddAtomW; external kernel32 name 'AddAtomW';
+function AddAtom; external kernel32 name 'AddAtom' + AWSuffix;
+function FindAtomA; external kernel32 name 'FindAtomA';
+function FindAtomW; external kernel32 name 'FindAtomW';
+function FindAtom; external kernel32 name 'FindAtom' + AWSuffix;
+function GetAtomNameA; external kernel32 name 'GetAtomNameA';
+function GetAtomNameW; external kernel32 name 'GetAtomNameW';
+function GetAtomName; external kernel32 name 'GetAtomName' + AWSuffix;
+function GetProfileIntA; external kernel32 name 'GetProfileIntA';
+function GetProfileIntW; external kernel32 name 'GetProfileIntW';
+function GetProfileInt; external kernel32 name 'GetProfileInt' + AWSuffix;
+function GetProfileStringA; external kernel32 name 'GetProfileStringA';
+function GetProfileStringW; external kernel32 name 'GetProfileStringW';
+function GetProfileString; external kernel32 name 'GetProfileString' + AWSuffix;
+function WriteProfileStringA; external kernel32 name 'WriteProfileStringA';
+function WriteProfileStringW; external kernel32 name 'WriteProfileStringW';
+function WriteProfileString; external kernel32 name 'WriteProfileString' + AWSuffix;
+function GetProfileSectionA; external kernel32 name 'GetProfileSectionA';
+function GetProfileSectionW; external kernel32 name 'GetProfileSectionW';
+function GetProfileSection; external kernel32 name 'GetProfileSection' + AWSuffix;
+function WriteProfileSectionA; external kernel32 name 'WriteProfileSectionA';
+function WriteProfileSectionW; external kernel32 name 'WriteProfileSectionW';
+function WriteProfileSection; external kernel32 name 'WriteProfileSection' + AWSuffix;
+function GetPrivateProfileIntA; external kernel32 name 'GetPrivateProfileIntA';
+function GetPrivateProfileIntW; external kernel32 name 'GetPrivateProfileIntW';
+function GetPrivateProfileInt; external kernel32 name 'GetPrivateProfileInt' + AWSuffix;
+function GetPrivateProfileStringA; external kernel32 name 'GetPrivateProfileStringA';
+function GetPrivateProfileStringW; external kernel32 name 'GetPrivateProfileStringW';
+function GetPrivateProfileString; external kernel32 name 'GetPrivateProfileString' + AWSuffix;
+function WritePrivateProfileStringA; external kernel32 name 'WritePrivateProfileStringA';
+function WritePrivateProfileStringW; external kernel32 name 'WritePrivateProfileStringW';
+function WritePrivateProfileString; external kernel32 name 'WritePrivateProfileString' + AWSuffix;
+function GetPrivateProfileSectionA; external kernel32 name 'GetPrivateProfileSectionA';
+function GetPrivateProfileSectionW; external kernel32 name 'GetPrivateProfileSectionW';
+function GetPrivateProfileSection; external kernel32 name 'GetPrivateProfileSection' + AWSuffix;
+function WritePrivateProfileSectionA; external kernel32 name 'WritePrivateProfileSectionA';
+function WritePrivateProfileSectionW; external kernel32 name 'WritePrivateProfileSectionW';
+function WritePrivateProfileSection; external kernel32 name 'WritePrivateProfileSection' + AWSuffix;
+function GetPrivateProfileSectionNamesA; external kernel32 name 'GetPrivateProfileSectionNamesA';
+function GetPrivateProfileSectionNamesW; external kernel32 name 'GetPrivateProfileSectionNamesW';
+function GetPrivateProfileSectionNames; external kernel32 name 'GetPrivateProfileSectionNames' + AWSuffix;
+function GetPrivateProfileStructA; external kernel32 name 'GetPrivateProfileStructA';
+function GetPrivateProfileStructW; external kernel32 name 'GetPrivateProfileStructW';
+function GetPrivateProfileStruct; external kernel32 name 'GetPrivateProfileStruct' + AWSuffix;
+function WritePrivateProfileStructA; external kernel32 name 'WritePrivateProfileStructA';
+function WritePrivateProfileStructW; external kernel32 name 'WritePrivateProfileStructW';
+function WritePrivateProfileStruct; external kernel32 name 'WritePrivateProfileStruct' + AWSuffix;
+function GetDriveTypeA; external kernel32 name 'GetDriveTypeA';
+function GetDriveTypeW; external kernel32 name 'GetDriveTypeW';
+function GetDriveType; external kernel32 name 'GetDriveType' + AWSuffix;
+function GetSystemDirectoryA; external kernel32 name 'GetSystemDirectoryA';
+function GetSystemDirectoryW; external kernel32 name 'GetSystemDirectoryW';
+function GetSystemDirectory; external kernel32 name 'GetSystemDirectory' + AWSuffix;
+function GetTempPathA; external kernel32 name 'GetTempPathA';
+function GetTempPathW; external kernel32 name 'GetTempPathW';
+function GetTempPath; external kernel32 name 'GetTempPath' + AWSuffix;
+function GetTempFileNameA; external kernel32 name 'GetTempFileNameA';
+function GetTempFileNameW; external kernel32 name 'GetTempFileNameW';
+function GetTempFileName; external kernel32 name 'GetTempFileName' + AWSuffix;
+function GetWindowsDirectoryA; external kernel32 name 'GetWindowsDirectoryA';
+function GetWindowsDirectoryW; external kernel32 name 'GetWindowsDirectoryW';
+function GetWindowsDirectory; external kernel32 name 'GetWindowsDirectory' + AWSuffix;
+function GetSystemWindowsDirectoryA; external kernel32 name 'GetSystemWindowsDirectoryA';
+function GetSystemWindowsDirectoryW; external kernel32 name 'GetSystemWindowsDirectoryW';
+function GetSystemWindowsDirectory; external kernel32 name 'GetSystemWindowsDirectory' + AWSuffix;
+function GetSystemWow64DirectoryA; external kernel32 name 'GetSystemWow64DirectoryA';
+function GetSystemWow64DirectoryW; external kernel32 name 'GetSystemWow64DirectoryW';
+function GetSystemWow64Directory; external kernel32 name 'GetSystemWow64Directory' + AWSuffix;
+function Wow64EnableWow64FsRedirection; external kernel32 name 'Wow64EnableWow64FsRedirection';
+function SetCurrentDirectoryA; external kernel32 name 'SetCurrentDirectoryA';
+function SetCurrentDirectoryW; external kernel32 name 'SetCurrentDirectoryW';
+function SetCurrentDirectory; external kernel32 name 'SetCurrentDirectory' + AWSuffix;
+function GetCurrentDirectoryA; external kernel32 name 'GetCurrentDirectoryA';
+function GetCurrentDirectoryW; external kernel32 name 'GetCurrentDirectoryW';
+function GetCurrentDirectory; external kernel32 name 'GetCurrentDirectory' + AWSuffix;
+function SetDllDirectoryA; external kernel32 name 'SetDllDirectoryA';
+function SetDllDirectoryW; external kernel32 name 'SetDllDirectoryW';
+function SetDllDirectory; external kernel32 name 'SetDllDirectory' + AWSuffix;
+function GetDllDirectoryA; external kernel32 name 'GetDllDirectoryA';
+function GetDllDirectoryW; external kernel32 name 'GetDllDirectoryW';
+function GetDllDirectory; external kernel32 name 'GetDllDirectory' + AWSuffix;
+function GetDiskFreeSpaceA; external kernel32 name 'GetDiskFreeSpaceA';
+function GetDiskFreeSpaceW; external kernel32 name 'GetDiskFreeSpaceW';
+function GetDiskFreeSpace; external kernel32 name 'GetDiskFreeSpace' + AWSuffix;
+function GetDiskFreeSpaceExA; external kernel32 name 'GetDiskFreeSpaceExA';
+function GetDiskFreeSpaceExW; external kernel32 name 'GetDiskFreeSpaceExW';
+function GetDiskFreeSpaceEx; external kernel32 name 'GetDiskFreeSpaceEx' + AWSuffix;
+function CreateDirectoryA; external kernel32 name 'CreateDirectoryA';
+function CreateDirectoryW; external kernel32 name 'CreateDirectoryW';
+function CreateDirectory; external kernel32 name 'CreateDirectory' + AWSuffix;
+function CreateDirectoryExA; external kernel32 name 'CreateDirectoryExA';
+function CreateDirectoryExW; external kernel32 name 'CreateDirectoryExW';
+function CreateDirectoryEx; external kernel32 name 'CreateDirectoryEx' + AWSuffix;
+function RemoveDirectoryA; external kernel32 name 'RemoveDirectoryA';
+function RemoveDirectoryW; external kernel32 name 'RemoveDirectoryW';
+function RemoveDirectory; external kernel32 name 'RemoveDirectory' + AWSuffix;
+function GetFullPathNameA; external kernel32 name 'GetFullPathNameA';
+function GetFullPathNameW; external kernel32 name 'GetFullPathNameW';
+function GetFullPathName; external kernel32 name 'GetFullPathName' + AWSuffix;
+function DefineDosDeviceA; external kernel32 name 'DefineDosDeviceA';
+function DefineDosDeviceW; external kernel32 name 'DefineDosDeviceW';
+function DefineDosDevice; external kernel32 name 'DefineDosDevice' + AWSuffix;
+function QueryDosDeviceA; external kernel32 name 'QueryDosDeviceA';
+function QueryDosDeviceW; external kernel32 name 'QueryDosDeviceW';
+function QueryDosDevice; external kernel32 name 'QueryDosDevice' + AWSuffix;
+function CreateFileA; external kernel32 name 'CreateFileA';
+function CreateFileW; external kernel32 name 'CreateFileW';
+function CreateFile; external kernel32 name 'CreateFile' + AWSuffix;
+function ReOpenFile; external kernel32 name 'ReOpenFile';
+function SetFileAttributesA; external kernel32 name 'SetFileAttributesA';
+function SetFileAttributesW; external kernel32 name 'SetFileAttributesW';
+function SetFileAttributes; external kernel32 name 'SetFileAttributes' + AWSuffix;
+function GetFileAttributesA; external kernel32 name 'GetFileAttributesA';
+function GetFileAttributesW; external kernel32 name 'GetFileAttributesW';
+function GetFileAttributes; external kernel32 name 'GetFileAttributes' + AWSuffix;
+function GetFileAttributesExA; external kernel32 name 'GetFileAttributesExA';
+function GetFileAttributesExW; external kernel32 name 'GetFileAttributesExW';
+function GetFileAttributesEx; external kernel32 name 'GetFileAttributesEx' + AWSuffix;
+function GetCompressedFileSizeA; external kernel32 name 'GetCompressedFileSizeA';
+function GetCompressedFileSizeW; external kernel32 name 'GetCompressedFileSizeW';
+function GetCompressedFileSize; external kernel32 name 'GetCompressedFileSize' + AWSuffix;
+function DeleteFileA; external kernel32 name 'DeleteFileA';
+function DeleteFileW; external kernel32 name 'DeleteFileW';
+function DeleteFile; external kernel32 name 'DeleteFile' + AWSuffix;
+function FindFirstFileExA; external kernel32 name 'FindFirstFileExA';
+function FindFirstFileExW; external kernel32 name 'FindFirstFileExW';
+function FindFirstFileEx; external kernel32 name 'FindFirstFileEx' + AWSuffix;
+function FindFirstFileA; external kernel32 name 'FindFirstFileA';
+function FindFirstFileW; external kernel32 name 'FindFirstFileW';
+function FindFirstFile; external kernel32 name 'FindFirstFile' + AWSuffix;
+function FindNextFileA; external kernel32 name 'FindNextFileA';
+function FindNextFileW; external kernel32 name 'FindNextFileW';
+function FindNextFile; external kernel32 name 'FindNextFile' + AWSuffix;
+function SearchPathA; external kernel32 name 'SearchPathA';
+function SearchPathW; external kernel32 name 'SearchPathW';
+function SearchPath; external kernel32 name 'SearchPath' + AWSuffix;
+function CopyFileA; external kernel32 name 'CopyFileA';
+function CopyFileW; external kernel32 name 'CopyFileW';
+function CopyFile; external kernel32 name 'CopyFile' + AWSuffix;
+function CopyFileExA; external kernel32 name 'CopyFileExA';
+function CopyFileExW; external kernel32 name 'CopyFileExW';
+function CopyFileEx; external kernel32 name 'CopyFileEx' + AWSuffix;
+function MoveFileA; external kernel32 name 'MoveFileA';
+function MoveFileW; external kernel32 name 'MoveFileW';
+function MoveFile; external kernel32 name 'MoveFile' + AWSuffix;
+function MoveFileExA; external kernel32 name 'MoveFileExA';
+function MoveFileExW; external kernel32 name 'MoveFileExW';
+function MoveFileEx; external kernel32 name 'MoveFileEx' + AWSuffix;
+function MoveFileWithProgressA; external kernel32 name 'MoveFileWithProgressA';
+function MoveFileWithProgressW; external kernel32 name 'MoveFileWithProgressW';
+function MoveFileWithProgress; external kernel32 name 'MoveFileWithProgress' + AWSuffix;
+function ReplaceFileA; external kernel32 name 'ReplaceFileA';
+function ReplaceFileW; external kernel32 name 'ReplaceFileW';
+function ReplaceFile; external kernel32 name 'ReplaceFile' + AWSuffix;
+function CreateHardLinkA; external kernel32 name 'CreateHardLinkA';
+function CreateHardLinkW; external kernel32 name 'CreateHardLinkW';
+function CreateHardLink; external kernel32 name 'CreateHardLink' + AWSuffix;
+function FindFirstStreamW; external kernel32 name 'FindFirstStreamW';
+function FindNextStreamW; external kernel32 name 'FindNextStreamW';
+function CreateNamedPipeA; external kernel32 name 'CreateNamedPipeA';
+function CreateNamedPipeW; external kernel32 name 'CreateNamedPipeW';
+function CreateNamedPipe; external kernel32 name 'CreateNamedPipe' + AWSuffix;
+function GetNamedPipeHandleStateA; external kernel32 name 'GetNamedPipeHandleStateA';
+function GetNamedPipeHandleStateW; external kernel32 name 'GetNamedPipeHandleStateW';
+function GetNamedPipeHandleState; external kernel32 name 'GetNamedPipeHandleState' + AWSuffix;
+function CallNamedPipeA; external kernel32 name 'CallNamedPipeA';
+function CallNamedPipeW; external kernel32 name 'CallNamedPipeW';
+function CallNamedPipe; external kernel32 name 'CallNamedPipe' + AWSuffix;
+function WaitNamedPipeA; external kernel32 name 'WaitNamedPipeA';
+function WaitNamedPipeW; external kernel32 name 'WaitNamedPipeW';
+function WaitNamedPipe; external kernel32 name 'WaitNamedPipe' + AWSuffix;
+function SetVolumeLabelA; external kernel32 name 'SetVolumeLabelA';
+function SetVolumeLabelW; external kernel32 name 'SetVolumeLabelW';
+function SetVolumeLabel; external kernel32 name 'SetVolumeLabel' + AWSuffix;
+procedure SetFileApisToOEM; external kernel32 name 'SetFileApisToOEM';
+procedure SetFileApisToANSI; external kernel32 name 'SetFileApisToANSI';
+function AreFileApisANSI; external kernel32 name 'AreFileApisANSI';
+function GetVolumeInformationA; external kernel32 name 'GetVolumeInformationA';
+function GetVolumeInformationW; external kernel32 name 'GetVolumeInformationW';
+function GetVolumeInformation; external kernel32 name 'GetVolumeInformation' + AWSuffix;
+function CancelIo; external kernel32 name 'CancelIo';
+function ClearEventLogA; external advapi32 name 'ClearEventLogA';
+function ClearEventLogW; external advapi32 name 'ClearEventLogW';
+function ClearEventLog; external advapi32 name 'ClearEventLog' + AWSuffix;
+function BackupEventLogA; external advapi32 name 'BackupEventLogA';
+function BackupEventLogW; external advapi32 name 'BackupEventLogW';
+function BackupEventLog; external advapi32 name 'BackupEventLog' + AWSuffix;
+function CloseEventLog; external advapi32 name 'CloseEventLog';
+function DeregisterEventSource; external advapi32 name 'DeregisterEventSource';
+function NotifyChangeEventLog; external advapi32 name 'NotifyChangeEventLog';
+function GetNumberOfEventLogRecords; external advapi32 name 'GetNumberOfEventLogRecords';
+function GetOldestEventLogRecord; external advapi32 name 'GetOldestEventLogRecord';
+function OpenEventLogA; external advapi32 name 'OpenEventLogA';
+function OpenEventLogW; external advapi32 name 'OpenEventLogW';
+function OpenEventLog; external advapi32 name 'OpenEventLog' + AWSuffix;
+function RegisterEventSourceA; external advapi32 name 'RegisterEventSourceA';
+function RegisterEventSourceW; external advapi32 name 'RegisterEventSourceW';
+function RegisterEventSource; external advapi32 name 'RegisterEventSource' + AWSuffix;
+function OpenBackupEventLogA; external advapi32 name 'OpenBackupEventLogA';
+function OpenBackupEventLogW; external advapi32 name 'OpenBackupEventLogW';
+function OpenBackupEventLog; external advapi32 name 'OpenBackupEventLog' + AWSuffix;
+function ReadEventLogA; external advapi32 name 'ReadEventLogA';
+function ReadEventLogW; external advapi32 name 'ReadEventLogW';
+function ReadEventLog; external advapi32 name 'ReadEventLog' + AWSuffix;
+function ReportEventA; external advapi32 name 'ReportEventA';
+function ReportEventW; external advapi32 name 'ReportEventW';
+function ReportEvent; external advapi32 name 'ReportEvent' + AWSuffix;
+function GetEventLogInformation; external advapi32 name 'GetEventLogInformation';
+function DuplicateToken; external advapi32 name 'DuplicateToken';
+function GetKernelObjectSecurity; external advapi32 name 'GetKernelObjectSecurity';
+function ImpersonateNamedPipeClient; external advapi32 name 'ImpersonateNamedPipeClient';
+function ImpersonateSelf; external advapi32 name 'ImpersonateSelf';
+function RevertToSelf; external advapi32 name 'RevertToSelf';
+function SetThreadToken; external advapi32 name 'SetThreadToken';
+function AccessCheck; external advapi32 name 'AccessCheck';
+function AccessCheckByType; external advapi32 name 'AccessCheckByType';
+function AccessCheckByTypeResultList; external advapi32 name 'AccessCheckByTypeResultList';
+function OpenProcessToken; external advapi32 name 'OpenProcessToken';
+function OpenThreadToken; external advapi32 name 'OpenThreadToken';
+function GetTokenInformation; external advapi32 name 'GetTokenInformation';
+function SetTokenInformation; external advapi32 name 'SetTokenInformation';
+function AdjustTokenPrivileges; external advapi32 name 'AdjustTokenPrivileges';
+function AdjustTokenGroups; external advapi32 name 'AdjustTokenGroups';
+function PrivilegeCheck; external advapi32 name 'PrivilegeCheck';
+function AccessCheckAndAuditAlarmA; external advapi32 name 'AccessCheckAndAuditAlarmA';
+function AccessCheckAndAuditAlarmW; external advapi32 name 'AccessCheckAndAuditAlarmW';
+function AccessCheckAndAuditAlarm; external advapi32 name 'AccessCheckAndAuditAlarm' + AWSuffix;
+function AccessCheckByTypeAndAuditAlarmA; external advapi32 name 'AccessCheckByTypeAndAuditAlarmA';
+function AccessCheckByTypeAndAuditAlarmW; external advapi32 name 'AccessCheckByTypeAndAuditAlarmW';
+function AccessCheckByTypeAndAuditAlarm; external advapi32 name 'AccessCheckByTypeAndAuditAlarm' + AWSuffix;
+function AccessCheckByTypeResultListAndAuditAlarmA; external advapi32 name 'AccessCheckByTypeResultListAndAuditAlarmA';
+function AccessCheckByTypeResultListAndAuditAlarmW; external advapi32 name 'AccessCheckByTypeResultListAndAuditAlarmW';
+function AccessCheckByTypeResultListAndAuditAlarm; external advapi32 name 'AccessCheckByTypeResultListAndAuditAlarm' + AWSuffix;
+function AccessCheckByTypeResultListAndAuditAlarmByHandleA; external advapi32 name 'AccessCheckByTypeResultListAndAuditAlarmByHandleA';
+function AccessCheckByTypeResultListAndAuditAlarmByHandleW; external advapi32 name 'AccessCheckByTypeResultListAndAuditAlarmByHandleW';
+function AccessCheckByTypeResultListAndAuditAlarmByHandle; external advapi32 name 'AccessCheckByTypeResultListAndAuditAlarmByHandle' + AWSuffix;
+function ObjectOpenAuditAlarmA; external advapi32 name 'ObjectOpenAuditAlarmA';
+function ObjectOpenAuditAlarmW; external advapi32 name 'ObjectOpenAuditAlarmW';
+function ObjectOpenAuditAlarm; external advapi32 name 'ObjectOpenAuditAlarm' + AWSuffix;
+function ObjectPrivilegeAuditAlarmA; external advapi32 name 'ObjectPrivilegeAuditAlarmA';
+function ObjectPrivilegeAuditAlarmW; external advapi32 name 'ObjectPrivilegeAuditAlarmW';
+function ObjectPrivilegeAuditAlarm; external advapi32 name 'ObjectPrivilegeAuditAlarm' + AWSuffix;
+function ObjectCloseAuditAlarmA; external advapi32 name 'ObjectCloseAuditAlarmA';
+function ObjectCloseAuditAlarmW; external advapi32 name 'ObjectCloseAuditAlarmW';
+function ObjectCloseAuditAlarm; external advapi32 name 'ObjectCloseAuditAlarm' + AWSuffix;
+function ObjectDeleteAuditAlarmA; external advapi32 name 'ObjectDeleteAuditAlarmA';
+function ObjectDeleteAuditAlarmW; external advapi32 name 'ObjectDeleteAuditAlarmW';
+function ObjectDeleteAuditAlarm; external advapi32 name 'ObjectDeleteAuditAlarm' + AWSuffix;
+function PrivilegedServiceAuditAlarmA; external advapi32 name 'PrivilegedServiceAuditAlarmA';
+function PrivilegedServiceAuditAlarmW; external advapi32 name 'PrivilegedServiceAuditAlarmW';
+function PrivilegedServiceAuditAlarm; external advapi32 name 'PrivilegedServiceAuditAlarm' + AWSuffix;
+function IsWellKnownSid; external advapi32 name 'IsWellKnownSid';
+function CreateWellKnownSid; external advapi32 name 'CreateWellKnownSid';
+function EqualDomainSid; external advapi32 name 'EqualDomainSid';
+function GetWindowsAccountDomainSid; external advapi32 name 'GetWindowsAccountDomainSid';
+function IsValidSid; external advapi32 name 'IsValidSid';
+function EqualSid; external advapi32 name 'EqualSid';
+function EqualPrefixSid; external advapi32 name 'EqualPrefixSid';
+function GetSidLengthRequired; external advapi32 name 'GetSidLengthRequired';
+function AllocateAndInitializeSid; external advapi32 name 'AllocateAndInitializeSid';
+function FreeSid; external advapi32 name 'FreeSid';
+function InitializeSid; external advapi32 name 'InitializeSid';
+function GetSidIdentifierAuthority; external advapi32 name 'GetSidIdentifierAuthority';
+function GetSidSubAuthority; external advapi32 name 'GetSidSubAuthority';
+function GetSidSubAuthorityCount; external advapi32 name 'GetSidSubAuthorityCount';
+function GetLengthSid; external advapi32 name 'GetLengthSid';
+function CopySid; external advapi32 name 'CopySid';
+function AreAllAccessesGranted; external advapi32 name 'AreAllAccessesGranted';
+function AreAnyAccessesGranted; external advapi32 name 'AreAnyAccessesGranted';
+procedure MapGenericMask; external advapi32 name 'MapGenericMask';
+function IsValidAcl; external advapi32 name 'IsValidAcl';
+function InitializeAcl; external advapi32 name 'InitializeAcl';
+function GetAclInformation; external advapi32 name 'GetAclInformation';
+function SetAclInformation; external advapi32 name 'SetAclInformation';
+function AddAce; external advapi32 name 'AddAce';
+function DeleteAce; external advapi32 name 'DeleteAce';
+function GetAce; external advapi32 name 'GetAce';
+function AddAccessAllowedAce; external advapi32 name 'AddAccessAllowedAce';
+function AddAccessAllowedAceEx; external advapi32 name 'AddAccessAllowedAceEx';
+function AddAccessDeniedAce; external advapi32 name 'AddAccessDeniedAce';
+function AddAccessDeniedAceEx; external advapi32 name 'AddAccessDeniedAceEx';
+function AddAuditAccessAce; external advapi32 name 'AddAuditAccessAce';
+function AddAuditAccessAceEx; external advapi32 name 'AddAuditAccessAceEx';
+function AddAccessAllowedObjectAce; external advapi32 name 'AddAccessAllowedObjectAce';
+function AddAccessDeniedObjectAce; external advapi32 name 'AddAccessDeniedObjectAce';
+function AddAuditAccessObjectAce; external advapi32 name 'AddAuditAccessObjectAce';
+function FindFirstFreeAce; external advapi32 name 'FindFirstFreeAce';
+function InitializeSecurityDescriptor; external advapi32 name 'InitializeSecurityDescriptor';
+function IsValidSecurityDescriptor; external advapi32 name 'IsValidSecurityDescriptor';
+function GetSecurityDescriptorLength; external advapi32 name 'GetSecurityDescriptorLength';
+function GetSecurityDescriptorControl; external advapi32 name 'GetSecurityDescriptorControl';
+function SetSecurityDescriptorControl; external advapi32 name 'SetSecurityDescriptorControl';
+function SetSecurityDescriptorDacl; external advapi32 name 'SetSecurityDescriptorDacl';
+function GetSecurityDescriptorDacl; external advapi32 name 'GetSecurityDescriptorDacl';
+function SetSecurityDescriptorSacl; external advapi32 name 'SetSecurityDescriptorSacl';
+function GetSecurityDescriptorSacl; external advapi32 name 'GetSecurityDescriptorSacl';
+function SetSecurityDescriptorOwner; external advapi32 name 'SetSecurityDescriptorOwner';
+function GetSecurityDescriptorOwner; external advapi32 name 'GetSecurityDescriptorOwner';
+function SetSecurityDescriptorGroup; external advapi32 name 'SetSecurityDescriptorGroup';
+function GetSecurityDescriptorGroup; external advapi32 name 'GetSecurityDescriptorGroup';
+function SetSecurityDescriptorRMControl; external advapi32 name 'SetSecurityDescriptorRMControl';
+function GetSecurityDescriptorRMControl; external advapi32 name 'GetSecurityDescriptorRMControl';
+function CreatePrivateObjectSecurity; external advapi32 name 'CreatePrivateObjectSecurity';
+function ConvertToAutoInheritPrivateObjectSecurity; external advapi32 name 'ConvertToAutoInheritPrivateObjectSecurity';
+function CreatePrivateObjectSecurityEx; external advapi32 name 'CreatePrivateObjectSecurityEx';
+function SetPrivateObjectSecurity; external advapi32 name 'SetPrivateObjectSecurity';
+function SetPrivateObjectSecurityEx; external advapi32 name 'SetPrivateObjectSecurityEx';
+function GetPrivateObjectSecurity; external advapi32 name 'GetPrivateObjectSecurity';
+function DestroyPrivateObjectSecurity; external advapi32 name 'DestroyPrivateObjectSecurity';
+function MakeSelfRelativeSD; external advapi32 name 'MakeSelfRelativeSD';
+function MakeAbsoluteSD; external advapi32 name 'MakeAbsoluteSD';
+function MakeAbsoluteSD2; external advapi32 name 'MakeAbsoluteSD2';
+function SetFileSecurityA; external advapi32 name 'SetFileSecurityA';
+function SetFileSecurityW; external advapi32 name 'SetFileSecurityW';
+function SetFileSecurity; external advapi32 name 'SetFileSecurity' + AWSuffix;
+function GetFileSecurityA; external advapi32 name 'GetFileSecurityA';
+function GetFileSecurityW; external advapi32 name 'GetFileSecurityW';
+function GetFileSecurity; external advapi32 name 'GetFileSecurity' + AWSuffix;
+function SetKernelObjectSecurity; external advapi32 name 'SetKernelObjectSecurity';
+function FindFirstChangeNotificationA; external kernel32 name 'FindFirstChangeNotificationA';
+function FindFirstChangeNotificationW; external kernel32 name 'FindFirstChangeNotificationW';
+function FindFirstChangeNotification; external kernel32 name 'FindFirstChangeNotification' + AWSuffix;
+function FindNextChangeNotification; external kernel32 name 'FindNextChangeNotification';
+function FindCloseChangeNotification; external kernel32 name 'FindCloseChangeNotification';
+function ReadDirectoryChangesW; external kernel32 name 'ReadDirectoryChangesW';
+function VirtualLock; external kernel32 name 'VirtualLock';
+function VirtualUnlock; external kernel32 name 'VirtualUnlock';
+function MapViewOfFileEx; external kernel32 name 'MapViewOfFileEx';
+function SetPriorityClass; external kernel32 name 'SetPriorityClass';
+function GetPriorityClass; external kernel32 name 'GetPriorityClass';
+function IsBadReadPtr; external kernel32 name 'IsBadReadPtr';
+function IsBadWritePtr; external kernel32 name 'IsBadWritePtr';
+function IsBadHugeReadPtr; external kernel32 name 'IsBadHugeReadPtr';
+function IsBadHugeWritePtr; external kernel32 name 'IsBadHugeWritePtr';
+function IsBadCodePtr; external kernel32 name 'IsBadCodePtr';
+function IsBadStringPtrA; external kernel32 name 'IsBadStringPtrA';
+function IsBadStringPtrW; external kernel32 name 'IsBadStringPtrW';
+function IsBadStringPtr; external kernel32 name 'IsBadStringPtr' + AWSuffix;
+function LookupAccountSidA; external advapi32 name 'LookupAccountSidA';
+function LookupAccountSidW; external advapi32 name 'LookupAccountSidW';
+function LookupAccountSid; external advapi32 name 'LookupAccountSid' + AWSuffix;
+function LookupAccountNameA; external advapi32 name 'LookupAccountNameA';
+function LookupAccountNameW; external advapi32 name 'LookupAccountNameW';
+function LookupAccountName; external advapi32 name 'LookupAccountName' + AWSuffix;
+function LookupPrivilegeValueA; external advapi32 name 'LookupPrivilegeValueA';
+function LookupPrivilegeValueW; external advapi32 name 'LookupPrivilegeValueW';
+function LookupPrivilegeValue; external advapi32 name 'LookupPrivilegeValue' + AWSuffix;
+function LookupPrivilegeNameA; external advapi32 name 'LookupPrivilegeNameA';
+function LookupPrivilegeNameW; external advapi32 name 'LookupPrivilegeNameW';
+function LookupPrivilegeName; external advapi32 name 'LookupPrivilegeName' + AWSuffix;
+function LookupPrivilegeDisplayNameA; external advapi32 name 'LookupPrivilegeDisplayNameA';
+function LookupPrivilegeDisplayNameW; external advapi32 name 'LookupPrivilegeDisplayNameW';
+function LookupPrivilegeDisplayName; external advapi32 name 'LookupPrivilegeDisplayName' + AWSuffix;
+function AllocateLocallyUniqueId; external advapi32 name 'AllocateLocallyUniqueId';
+function BuildCommDCBA; external kernel32 name 'BuildCommDCBA';
+function BuildCommDCBW; external kernel32 name 'BuildCommDCBW';
+function BuildCommDCB; external kernel32 name 'BuildCommDCB' + AWSuffix;
+function BuildCommDCBAndTimeoutsA; external kernel32 name 'BuildCommDCBAndTimeoutsA';
+function BuildCommDCBAndTimeoutsW; external kernel32 name 'BuildCommDCBAndTimeoutsW';
+function BuildCommDCBAndTimeouts; external kernel32 name 'BuildCommDCBAndTimeouts' + AWSuffix;
+function CommConfigDialogA; external kernel32 name 'CommConfigDialogA';
+function CommConfigDialogW; external kernel32 name 'CommConfigDialogW';
+function CommConfigDialog; external kernel32 name 'CommConfigDialog' + AWSuffix;
+function GetDefaultCommConfigA; external kernel32 name 'GetDefaultCommConfigA';
+function GetDefaultCommConfigW; external kernel32 name 'GetDefaultCommConfigW';
+function GetDefaultCommConfig; external kernel32 name 'GetDefaultCommConfig' + AWSuffix;
+function SetDefaultCommConfigA; external kernel32 name 'SetDefaultCommConfigA';
+function SetDefaultCommConfigW; external kernel32 name 'SetDefaultCommConfigW';
+function SetDefaultCommConfig; external kernel32 name 'SetDefaultCommConfig' + AWSuffix;
+function GetComputerNameA; external kernel32 name 'GetComputerNameA';
+function GetComputerNameW; external kernel32 name 'GetComputerNameW';
+function GetComputerName; external kernel32 name 'GetComputerName' + AWSuffix;
+function SetComputerNameA; external kernel32 name 'SetComputerNameA';
+function SetComputerNameW; external kernel32 name 'SetComputerNameW';
+function SetComputerName; external kernel32 name 'SetComputerName' + AWSuffix;
+function GetComputerNameExA; external kernel32 name 'GetComputerNameExA';
+function GetComputerNameExW; external kernel32 name 'GetComputerNameExW';
+function GetComputerNameEx; external kernel32 name 'GetComputerNameEx' + AWSuffix;
+function SetComputerNameExA; external kernel32 name 'SetComputerNameExA';
+function SetComputerNameExW; external kernel32 name 'SetComputerNameExW';
+function SetComputerNameEx; external kernel32 name 'SetComputerNameEx' + AWSuffix;
+function DnsHostnameToComputerNameA; external kernel32 name 'DnsHostnameToComputerNameA';
+function DnsHostnameToComputerNameW; external kernel32 name 'DnsHostnameToComputerNameW';
+function DnsHostnameToComputerName; external kernel32 name 'DnsHostnameToComputerName' + AWSuffix;
+function GetUserNameA; external advapi32 name 'GetUserNameA';
+function GetUserNameW; external advapi32 name 'GetUserNameW';
+function GetUserName; external advapi32 name 'GetUserName' + AWSuffix;
+function LogonUserA; external advapi32 name 'LogonUserA';
+function LogonUserW; external advapi32 name 'LogonUserW';
+function LogonUser; external advapi32 name 'LogonUser' + AWSuffix;
+function LogonUserExA; external advapi32 name 'LogonUserExA';
+function LogonUserExW; external advapi32 name 'LogonUserExW';
+function LogonUserEx; external advapi32 name 'LogonUserEx' + AWSuffix;
+function ImpersonateLoggedOnUser; external advapi32 name 'ImpersonateLoggedOnUser';
+function CreateProcessAsUserA; external advapi32 name 'CreateProcessAsUserA';
+function CreateProcessAsUserW; external advapi32 name 'CreateProcessAsUserW';
+function CreateProcessAsUser; external advapi32 name 'CreateProcessAsUser' + AWSuffix;
+function CreateProcessWithLogonW; external advapi32 name 'CreateProcessWithLogonW';
+function CreateProcessWithTokenW; external advapi32 name 'CreateProcessWithTokenW';
+function ImpersonateAnonymousToken; external advapi32 name 'ImpersonateAnonymousToken';
+function DuplicateTokenEx; external advapi32 name 'DuplicateTokenEx';
+function CreateRestrictedToken; external advapi32 name 'CreateRestrictedToken';
+function IsTokenRestricted; external advapi32 name 'IsTokenRestricted';
+function CheckTokenMembership; external advapi32 name 'CheckTokenMembership';
+function IsTokenUntrusted; external advapi32 name 'IsTokenUntrusted';
+function RegisterWaitForSingleObject; external kernel32 name 'RegisterWaitForSingleObject';
+function RegisterWaitForSingleObjectEx; external kernel32 name 'RegisterWaitForSingleObjectEx';
+function UnregisterWait; external kernel32 name 'UnregisterWait';
+function UnregisterWaitEx; external kernel32 name 'UnregisterWaitEx';
+function QueueUserWorkItem; external kernel32 name 'QueueUserWorkItem';
+function BindIoCompletionCallback; external kernel32 name 'BindIoCompletionCallback';
+function CreateTimerQueue; external kernel32 name 'CreateTimerQueue';
+function CreateTimerQueueTimer; external kernel32 name 'CreateTimerQueueTimer';
+function ChangeTimerQueueTimer; external kernel32 name 'ChangeTimerQueueTimer';
+function DeleteTimerQueueTimer; external kernel32 name 'DeleteTimerQueueTimer';
+function DeleteTimerQueueEx; external kernel32 name 'DeleteTimerQueueEx';
+function SetTimerQueueTimer; external kernel32 name 'SetTimerQueueTimer';
+function CancelTimerQueueTimer; external kernel32 name 'CancelTimerQueueTimer';
+function DeleteTimerQueue; external kernel32 name 'DeleteTimerQueue';
+function GetCurrentHwProfileA; external advapi32 name 'GetCurrentHwProfileA';
+function GetCurrentHwProfileW; external advapi32 name 'GetCurrentHwProfileW';
+function GetCurrentHwProfile; external advapi32 name 'GetCurrentHwProfile' + AWSuffix;
+function QueryPerformanceCounter; external kernel32 name 'QueryPerformanceCounter';
+function QueryPerformanceFrequency; external kernel32 name 'QueryPerformanceFrequency';
+function GetVersionExA; external kernel32 name 'GetVersionExA';
+function GetVersionExW; external kernel32 name 'GetVersionExW';
+function GetVersionEx; external kernel32 name 'GetVersionEx' + AWSuffix;
+function VerifyVersionInfoA; external kernel32 name 'VerifyVersionInfoA';
+function VerifyVersionInfoW; external kernel32 name 'VerifyVersionInfoW';
+function VerifyVersionInfo; external kernel32 name 'VerifyVersionInfo' + AWSuffix;
+function GetSystemPowerStatus; external kernel32 name 'GetSystemPowerStatus';
+function SetSystemPowerState; external kernel32 name 'SetSystemPowerState';
+function AllocateUserPhysicalPages; external kernel32 name 'AllocateUserPhysicalPages';
+function FreeUserPhysicalPages; external kernel32 name 'FreeUserPhysicalPages';
+function MapUserPhysicalPages; external kernel32 name 'MapUserPhysicalPages';
+function MapUserPhysicalPagesScatter; external kernel32 name 'MapUserPhysicalPagesScatter';
+function CreateJobObjectA; external kernel32 name 'CreateJobObjectA';
+function CreateJobObjectW; external kernel32 name 'CreateJobObjectW';
+function CreateJobObject; external kernel32 name 'CreateJobObject' + AWSuffix;
+function OpenJobObjectA; external kernel32 name 'OpenJobObjectA';
+function OpenJobObjectW; external kernel32 name 'OpenJobObjectW';
+function OpenJobObject; external kernel32 name 'OpenJobObject' + AWSuffix;
+function AssignProcessToJobObject; external kernel32 name 'AssignProcessToJobObject';
+function TerminateJobObject; external kernel32 name 'TerminateJobObject';
+function QueryInformationJobObject; external kernel32 name 'QueryInformationJobObject';
+function SetInformationJobObject; external kernel32 name 'SetInformationJobObject';
+function IsProcessInJob; external kernel32 name 'IsProcessInJob';
+function CreateJobSet; external kernel32 name 'CreateJobSet';
+function AddVectoredExceptionHandler; external kernel32 name 'AddVectoredExceptionHandler';
+function RemoveVectoredExceptionHandler; external kernel32 name 'RemoveVectoredExceptionHandler';
+function FindFirstVolumeA; external kernel32 name 'FindFirstVolumeA';
+function FindFirstVolumeW; external kernel32 name 'FindFirstVolumeW';
+function FindFirstVolume; external kernel32 name 'FindFirstVolume' + AWSuffix;
+function FindNextVolumeA; external kernel32 name 'FindNextVolumeA';
+function FindNextVolumeW; external kernel32 name 'FindNextVolumeW';
+function FindNextVolume; external kernel32 name 'FindNextVolume' + AWSuffix;
+function FindVolumeClose; external kernel32 name 'FindVolumeClose';
+function FindFirstVolumeMountPointA; external kernel32 name 'FindFirstVolumeMountPointA';
+function FindFirstVolumeMountPointW; external kernel32 name 'FindFirstVolumeMountPointW';
+function FindFirstVolumeMountPoint; external kernel32 name 'FindFirstVolumeMountPoint' + AWSuffix;
+function FindNextVolumeMountPointA; external kernel32 name 'FindNextVolumeMountPointA';
+function FindNextVolumeMountPointW; external kernel32 name 'FindNextVolumeMountPointW';
+function FindNextVolumeMountPoint; external kernel32 name 'FindNextVolumeMountPoint' + AWSuffix;
+function FindVolumeMountPointClose; external kernel32 name 'FindVolumeMountPointClose';
+function SetVolumeMountPointA; external kernel32 name 'SetVolumeMountPointA';
+function SetVolumeMountPointW; external kernel32 name 'SetVolumeMountPointW';
+function SetVolumeMountPoint; external kernel32 name 'SetVolumeMountPoint' + AWSuffix;
+function DeleteVolumeMountPointA; external kernel32 name 'DeleteVolumeMountPointA';
+function DeleteVolumeMountPointW; external kernel32 name 'DeleteVolumeMountPointW';
+function DeleteVolumeMountPoint; external kernel32 name 'DeleteVolumeMountPoint' + AWSuffix;
+function GetVolumeNameForVolumeMountPointA; external kernel32 name 'GetVolumeNameForVolumeMountPointA';
+function GetVolumeNameForVolumeMountPointW; external kernel32 name 'GetVolumeNameForVolumeMountPointW';
+function GetVolumeNameForVolumeMountPoint; external kernel32 name 'GetVolumeNameForVolumeMountPoint' + AWSuffix;
+function GetVolumePathNameA; external kernel32 name 'GetVolumePathNameA';
+function GetVolumePathNameW; external kernel32 name 'GetVolumePathNameW';
+function GetVolumePathName; external kernel32 name 'GetVolumePathName' + AWSuffix;
+function GetVolumePathNamesForVolumeNameA; external kernel32 name 'GetVolumePathNamesForVolumeNameA';
+function GetVolumePathNamesForVolumeNameW; external kernel32 name 'GetVolumePathNamesForVolumeNameW';
+function GetVolumePathNamesForVolumeName; external kernel32 name 'GetVolumePathNamesForVolumeName' + AWSuffix;
+function CreateActCtxA; external kernel32 name 'CreateActCtxA';
+function CreateActCtxW; external kernel32 name 'CreateActCtxW';
+function CreateActCtx; external kernel32 name 'CreateActCtx' + AWSuffix;
+procedure AddRefActCtx; external kernel32 name 'AddRefActCtx';
+procedure ReleaseActCtx; external kernel32 name 'ReleaseActCtx';
+function ZombifyActCtx; external kernel32 name 'ZombifyActCtx';
+function ActivateActCtx; external kernel32 name 'ActivateActCtx';
+function DeactivateActCtx; external kernel32 name 'DeactivateActCtx';
+function GetCurrentActCtx; external kernel32 name 'GetCurrentActCtx';
+function FindActCtxSectionStringA; external kernel32 name 'FindActCtxSectionStringA';
+function FindActCtxSectionStringW; external kernel32 name 'FindActCtxSectionStringW';
+function FindActCtxSectionString; external kernel32 name 'FindActCtxSectionString' + AWSuffix;
+function FindActCtxSectionGuid; external kernel32 name 'FindActCtxSectionGuid';
+function QueryActCtxW; external kernel32 name 'QueryActCtxW';
+function ProcessIdToSessionId; external kernel32 name 'ProcessIdToSessionId';
+function WTSGetActiveConsoleSessionId; external kernel32 name 'WTSGetActiveConsoleSessionId';
+function IsWow64Process; external kernel32 name 'IsWow64Process';
+function GetLogicalProcessorInformation; external kernel32 name 'GetLogicalProcessorInformation';
+function GetNumaHighestNodeNumber; external kernel32 name 'GetNumaHighestNodeNumber';
+function GetNumaProcessorNode; external kernel32 name 'GetNumaProcessorNode';
+function GetNumaNodeProcessorMask; external kernel32 name 'GetNumaNodeProcessorMask';
+function GetNumaAvailableMemoryNode; external kernel32 name 'GetNumaAvailableMemoryNode';
+
+{$ENDIF DYNAMIC_LINK}
+
+end.
diff --git a/packages/extra/winunits/jwawinber.pas b/packages/extra/winunits/jwawinber.pas
index f055634fa4..4d2a48e7a6 100644
--- a/packages/extra/winunits/jwawinber.pas
+++ b/packages/extra/winunits/jwawinber.pas
@@ -1,382 +1,382 @@
-{******************************************************************************}
-{ }
-{ Basic Encoding Rules API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: winber.h, released August 2001. The original Pascal }
-{ code is: WinBer.pas, released December 2000. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwawinber.pas,v 1.1 2005/04/04 07:56:11 marco Exp $
-
-unit JwaWinBer;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "WinBer.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaWinLDAP, JwaWinType;
-
-const
- LBER_ERROR = DWORD($ffffffff);
- {$EXTERNALSYM LBER_ERROR}
- LBER_DEFAULT = DWORD($ffffffff);
- {$EXTERNALSYM LBER_DEFAULT}
-
-type
- ber_tag_t = Cardinal; // for BER tags
- {$EXTERNALSYM ber_tag_t}
- ber_int_t = Integer; // for BER ints, enums, and Booleans
- {$EXTERNALSYM ber_int_t}
- ber_uint_t = Cardinal; // unsigned equivalent of ber_int_t
- {$EXTERNALSYM ber_uint_t}
- ber_slen_t = Integer; // signed equivalent of ber_len_t
- {$EXTERNALSYM ber_slen_t}
-
-//
-// This constructs a new BerElement structure containing a copy of the
-// data in the supplied berval structure.
-//
-
-function ber_init(pBerVal: PBerVal): PBerElement; cdecl;
-{$EXTERNALSYM ber_init}
-
-//
-// This frees a BerElement which is returned from ber_alloc_t()
-// or ber_init(). The second argument - fbuf should always be set
-// to 1.
-//
-//
-
-procedure ber_free(pBerElement: PBerElement; fbuf: Integer); cdecl;
-{$EXTERNALSYM ber_free}
-
-//
-// Frees a BERVAL structure. Applications should not call
-// this API to free BERVAL structures which they themselves
-// have allocated
-//
-
-procedure ber_bvfree(pBerVal: PBerVal); cdecl;
-{$EXTERNALSYM ber_bvfree}
-
-//
-// Frees an array of BERVAL structures.
-//
-
-procedure ber_bvecfree(pBerVal: PBerVal); cdecl;
-{$EXTERNALSYM ber_bvecfree}
-
-//
-// Returns a copy of a the supplied berval structure
-//
-
-function ber_bvdup(pBerVal: PBerVal): PBerVal; cdecl;
-{$EXTERNALSYM ber_bvdup}
-
-//
-// Constructs and returns a BerElement structure. The options field
-// contains a bitwise-or of options which are to be used when generating
-// the encoding of the BerElement
-//
-// The LBER_USE_DER options should always be specified.
-//
-
-function ber_alloc_t(options: Integer): PBerElement; cdecl;
-{$EXTERNALSYM ber_alloc_t}
-
-//
-// This skips over the current tag and returns the tag of the next
-// element in the supplied BerElement. The lenght of this element is
-// stored in the pLen argument.
-//
-// LBER_DEFAULT is returned if there is no further data to be read
-// else the tag of the next element is returned.
-//
-// The difference between ber_skip_tag() and ber_peek_tag() is that the
-// state pointer is advanced past the first tag+lenght and is pointed to
-// the value part of the next element
-//
-
-function ber_skip_tag(pBerElement: PBerElement; var pLen: ULONG): ULONG; cdecl;
-{$EXTERNALSYM ber_skip_tag}
-
-//
-// This returns the tag of the next element to be parsed in the
-// supplied BerElement. The length of this element is stored in the
-// pLen argument.
-//
-// LBER_DEFAULT is returned if there is no further data to be read
-// else the tag of the next element is returned.
-//
-
-function ber_peek_tag(pBerElement: PBerElement; var pLen: ULONG): ULONG; cdecl;
-{$EXTERNALSYM ber_peek_tag}
-
-//
-// This returns the tag and length of the first element in a SET, SET OF
-// or SEQUENCE OF data value.
-//
-// LBER_DEFAULT is returned if the constructed value is empty else, the tag
-// is returned. It also returns an opaque cookie which has to be passed to
-// subsequent invocations of ber_next_element().
-//
-
-function ber_first_element(pBerElement: PBerElement; var pLen: ULONG; var ppOpaque: PChar): ULONG; cdecl;
-{$EXTERNALSYM ber_first_element}
-
-//
-// This positions the state at the start of the next element in the
-// constructed type.
-//
-// LBER_DEFAULT is returned if the constructed value is empty else, the tag
-// is returned.
-//
-
-function ber_next_element(pBerElement: PBerElement; var pLen: ULONG; opaque: PChar): ULONG; cdecl;
-{$EXTERNALSYM ber_next_element}
-
-//
-// This allocates a BerVal structure whose contents are taken from the
-// supplied BerElement structure.
-//
-// The return values are 0 on success and -1 on error.
-//
-
-function ber_flatten(pBerElement: PBerElement; var pBerVal: PBerVal): Integer; cdecl;
-{$EXTERNALSYM ber_flatten}
-
-(*
-The ber_printf() routine is used to encode a BER element in much the
-same way that sprintf() works. One important difference, though, is
-that state information is kept in the ber argument so that multiple
-calls can be made to ber_printf() to append to the end of the BER ele-
-ment. ber MUST be a pointer to a BerElement returned by ber_alloc_t().
-ber_printf() interprets and formats its arguments according to the for-
-mat string fmt. ber_printf() returns -1 if there is an error during
-encoding and a non-negative number if successful. As with sprintf(),
-each character in fmt refers to an argument to ber_printf().
-
-The format string can contain the following format characters:
-
-'t' Tag. The next argument is a ber_tag_t specifying the tag to
- override the next element to be written to the ber. This works
- across calls. The integer tag value SHOULD contain the tag
- class, constructed bit, and tag value. For example, a tag of
- "[3]" for a constructed type is 0xA3U. All implementations MUST
- support tags that fit in a single octet (i.e., where the tag
- value is less than 32) and they MAY support larger tags.
-
-'b' Boolean. The next argument is an ber_int_t, containing either 0
- for FALSE or 0xff for TRUE. A boolean element is output. If
- this format character is not preceded by the 't' format modif-
- ier, the tag 0x01U is used for the element.
-
-'e' Enumerated. The next argument is a ber_int_t, containing the
- enumerated value in the host's byte order. An enumerated ele-
- ment is output. If this format character is not preceded by the
- 't' format modifier, the tag 0x0AU is used for the element.
-
-'i' Integer. The next argument is a ber_int_t, containing the
- integer in the host's byte order. An integer element is output.
- If this format character is not preceded by the 't' format
- modifier, the tag 0x02U is used for the element.
-
-'n' Null. No argument is needed. An ASN.1 NULL element is output.
- If this format character is not preceded by the 't' format
- modifier, the tag 0x05U is used for the element.
-
-'o' Octet string. The next two arguments are a char *, followed by
- a ber_len_t with the length of the string. The string MAY con-
- tain null bytes and are do not have to be zero-terminated. An
- octet string element is output, in primitive form. If this for-
- mat character is not preceded by the 't' format modifier, the
- tag 0x04U is used for the element.
-
-'s' Octet string. The next argument is a char * pointing to a
- zero-terminated string. An octet string element in primitive
- form is output, which does not include the trailing '\0' (null)
- byte. If this format character is not preceded by the 't' format
- modifier, the tag 0x04U is used for the element.
-
-'v' Several octet strings. The next argument is a char **, an array
- of char * pointers to zero-terminated strings. The last element
- in the array MUST be a NULL pointer. The octet strings do not
- include the trailing '\0' (null) byte. Note that a construct
- like '{v}' is used to get an actual SEQUENCE OF octet strings.
- The 't' format modifier cannot be used with this format charac-
- ter.
-
-'V' Several octet strings. A NULL-terminated array of struct berval
- *'s is supplied. Note that a construct like '{V}' is used to
- get an actual SEQUENCE OF octet strings. The 't' format modifier
- cannot be used with this format character.
-
-'{' Begin sequence. No argument is needed. If this format charac-
- ter is not preceded by the 't' format modifier, the tag 0x30U is
- used.
-
-'}' End sequence. No argument is needed. The 't' format modifier
- cannot be used with this format character.
-
-'[' Begin set. No argument is needed. If this format character is
- not preceded by the 't' format modifier, the tag 0x31U is used.
-
-']' End set. No argument is needed. The 't' format modifier cannot
- be used with this format character.
-*)
-
-//WINBERAPI INT BERAPI ber_printf( BerElement *pBerElement, PCHAR fmt, ... );
-
-(*
-The ber_scanf() routine is used to decode a BER element in much the same
-way that sscanf() works. One important difference, though, is that some
-state information is kept with the ber argument so that multiple calls
-can be made to ber_scanf() to sequentially read from the BER element.
-The ber argument SHOULD be a pointer to a BerElement returned by
-ber_init(). ber_scanf interprets the bytes according to the format
-string fmt, and stores the results in its additional arguments.
-ber_scanf() returns LBER_ERROR on error, and a different value on suc-
-cess.
-
-The format string contains conversion specifications which are used to
-direct the interpretation of the BER element. The format string can
-contain the following characters:
-
-'a' Octet string. A char ** argument MUST be supplied. Memory is
- allocated, filled with the contents of the octet string, zero-
- terminated, and the pointer to the string is stored in the argu-
- ment. The returned value SHOULD be freed using ldap_memfree.
- The tag of the element MUST indicate the primitive form
- (constructed strings are not supported) but is otherwise ignored
- and discarded during the decoding. This format cannot be used
- with octet strings which could contain null bytes.
-
-'O' Octet string. A struct berval ** argument MUST be supplied,
- which upon return points to an allocated struct berval contain-
- ing the octet string and its length. ber_bvfree() SHOULD be
- called to free the allocated memory. The tag of the element
- MUST indicate the primitive form (constructed strings are not
- supported) but is otherwise ignored during the decoding.
-
-'b' Boolean. A pointer to a ber_int_t MUST be supplied. The
- ber_int_t value stored will be 0 for FALSE or nonzero for TRUE.
- The tag of the element MUST indicate the primitive form but is
- otherwise ignored during the decoding.
-
-'e' Enumerated. A pointer to a ber_int_t MUST be supplied. The
- enumerated value stored will be in host byte order. The tag of
- the element MUST indicate the primitive form but is otherwise
- ignored during the decoding. ber_scanf() will return an error
- if the value of the enumerated value cannot be stored in a
- ber_int_t.
-
-'i' Integer. A pointer to a ber_int_t MUST be supplied. The
- ber_int_t value stored will be in host byte order. The tag of
- the element MUST indicate the primitive form but is otherwise
- ignored during the decoding. ber_scanf() will return an error
- if the integer cannot be stored in a ber_int_t.
-
-'B' Bitstring. A char ** argument MUST be supplied which will point
- to the allocated bits, followed by a ber_len_t * argument, which
- will point to the length (in bits) of the bitstring returned.
- ldap_memfree SHOULD be called to free the bitstring. The tag of
- the element MUST indicate the primitive form (constructed bit-
- strings are not supported) but is otherwise ignored during the
- decoding.
-
-'n' Null. No argument is needed. The element is verified to have a
- zero-length value and is skipped. The tag is ignored.
-
-'v' Several octet strings. A char *** argument MUST be supplied,
- which upon return points to an allocated NULL-terminated array
- of char *'s containing the octet strings. NULL is stored if the
- sequence is empty. ldap_memfree SHOULD be called to free each
- element of the array and the array itself. The tag of the
- sequence and of the octet strings are ignored.
-
-'V' Several octet strings (which could contain null bytes). A
- struct berval *** MUST be supplied, which upon return points to
- a allocated NULL-terminated array of struct berval *'s contain-
- ing the octet strings and their lengths. NULL is stored if the
- sequence is empty. ber_bvecfree() can be called to free the
- allocated memory. The tag of the sequence and of the octet
- strings are ignored.
-
-'x' Skip element. The next element is skipped. No argument is
- needed.
-
-'{' Begin sequence. No argument is needed. The initial sequence
- tag and length are skipped.
-
-'}' End sequence. No argument is needed.
-
-'[' Begin set. No argument is needed. The initial set tag and
- length are skipped.
-
-']' End set. No argument is needed.
-
-*)
-
-//WINBERAPI ULONG BERAPI ber_scanf( BerElement *pBerElement, PCHAR fmt, ... );
-
-implementation
-
-const
- winberapi = 'wldap32.dll';
-
-function ber_init; external winberapi name 'ber_init';
-procedure ber_free; external winberapi name 'ber_free';
-procedure ber_bvfree; external winberapi name 'ber_bvfree';
-procedure ber_bvecfree; external winberapi name 'ber_bvecfree';
-function ber_bvdup; external winberapi name 'ber_bvdup';
-function ber_alloc_t; external winberapi name 'ber_alloc_t';
-function ber_skip_tag; external winberapi name 'ber_skip_tag';
-function ber_peek_tag; external winberapi name 'ber_peek_tag';
-function ber_first_element; external winberapi name 'ber_first_element';
-function ber_next_element; external winberapi name 'ber_next_element';
-function ber_flatten; external winberapi name 'ber_flatten';
-//function ber_printf; external winberapi name 'ber_printf';
-//function ber_scanf; external winberapi name 'ber_scanf';
-
-end.
+{******************************************************************************}
+{ }
+{ Basic Encoding Rules API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: winber.h, released August 2001. The original Pascal }
+{ code is: WinBer.pas, released December 2000. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwawinber.pas,v 1.1 2005/04/04 07:56:11 marco Exp $
+
+unit JwaWinBer;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "WinBer.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaWinLDAP, JwaWinType;
+
+const
+ LBER_ERROR = DWORD($ffffffff);
+ {$EXTERNALSYM LBER_ERROR}
+ LBER_DEFAULT = DWORD($ffffffff);
+ {$EXTERNALSYM LBER_DEFAULT}
+
+type
+ ber_tag_t = Cardinal; // for BER tags
+ {$EXTERNALSYM ber_tag_t}
+ ber_int_t = Integer; // for BER ints, enums, and Booleans
+ {$EXTERNALSYM ber_int_t}
+ ber_uint_t = Cardinal; // unsigned equivalent of ber_int_t
+ {$EXTERNALSYM ber_uint_t}
+ ber_slen_t = Integer; // signed equivalent of ber_len_t
+ {$EXTERNALSYM ber_slen_t}
+
+//
+// This constructs a new BerElement structure containing a copy of the
+// data in the supplied berval structure.
+//
+
+function ber_init(pBerVal: PBerVal): PBerElement; cdecl;
+{$EXTERNALSYM ber_init}
+
+//
+// This frees a BerElement which is returned from ber_alloc_t()
+// or ber_init(). The second argument - fbuf should always be set
+// to 1.
+//
+//
+
+procedure ber_free(pBerElement: PBerElement; fbuf: Integer); cdecl;
+{$EXTERNALSYM ber_free}
+
+//
+// Frees a BERVAL structure. Applications should not call
+// this API to free BERVAL structures which they themselves
+// have allocated
+//
+
+procedure ber_bvfree(pBerVal: PBerVal); cdecl;
+{$EXTERNALSYM ber_bvfree}
+
+//
+// Frees an array of BERVAL structures.
+//
+
+procedure ber_bvecfree(pBerVal: PBerVal); cdecl;
+{$EXTERNALSYM ber_bvecfree}
+
+//
+// Returns a copy of a the supplied berval structure
+//
+
+function ber_bvdup(pBerVal: PBerVal): PBerVal; cdecl;
+{$EXTERNALSYM ber_bvdup}
+
+//
+// Constructs and returns a BerElement structure. The options field
+// contains a bitwise-or of options which are to be used when generating
+// the encoding of the BerElement
+//
+// The LBER_USE_DER options should always be specified.
+//
+
+function ber_alloc_t(options: Integer): PBerElement; cdecl;
+{$EXTERNALSYM ber_alloc_t}
+
+//
+// This skips over the current tag and returns the tag of the next
+// element in the supplied BerElement. The lenght of this element is
+// stored in the pLen argument.
+//
+// LBER_DEFAULT is returned if there is no further data to be read
+// else the tag of the next element is returned.
+//
+// The difference between ber_skip_tag() and ber_peek_tag() is that the
+// state pointer is advanced past the first tag+lenght and is pointed to
+// the value part of the next element
+//
+
+function ber_skip_tag(pBerElement: PBerElement; var pLen: ULONG): ULONG; cdecl;
+{$EXTERNALSYM ber_skip_tag}
+
+//
+// This returns the tag of the next element to be parsed in the
+// supplied BerElement. The length of this element is stored in the
+// pLen argument.
+//
+// LBER_DEFAULT is returned if there is no further data to be read
+// else the tag of the next element is returned.
+//
+
+function ber_peek_tag(pBerElement: PBerElement; var pLen: ULONG): ULONG; cdecl;
+{$EXTERNALSYM ber_peek_tag}
+
+//
+// This returns the tag and length of the first element in a SET, SET OF
+// or SEQUENCE OF data value.
+//
+// LBER_DEFAULT is returned if the constructed value is empty else, the tag
+// is returned. It also returns an opaque cookie which has to be passed to
+// subsequent invocations of ber_next_element().
+//
+
+function ber_first_element(pBerElement: PBerElement; var pLen: ULONG; var ppOpaque: PChar): ULONG; cdecl;
+{$EXTERNALSYM ber_first_element}
+
+//
+// This positions the state at the start of the next element in the
+// constructed type.
+//
+// LBER_DEFAULT is returned if the constructed value is empty else, the tag
+// is returned.
+//
+
+function ber_next_element(pBerElement: PBerElement; var pLen: ULONG; opaque: PChar): ULONG; cdecl;
+{$EXTERNALSYM ber_next_element}
+
+//
+// This allocates a BerVal structure whose contents are taken from the
+// supplied BerElement structure.
+//
+// The return values are 0 on success and -1 on error.
+//
+
+function ber_flatten(pBerElement: PBerElement; var pBerVal: PBerVal): Integer; cdecl;
+{$EXTERNALSYM ber_flatten}
+
+(*
+The ber_printf() routine is used to encode a BER element in much the
+same way that sprintf() works. One important difference, though, is
+that state information is kept in the ber argument so that multiple
+calls can be made to ber_printf() to append to the end of the BER ele-
+ment. ber MUST be a pointer to a BerElement returned by ber_alloc_t().
+ber_printf() interprets and formats its arguments according to the for-
+mat string fmt. ber_printf() returns -1 if there is an error during
+encoding and a non-negative number if successful. As with sprintf(),
+each character in fmt refers to an argument to ber_printf().
+
+The format string can contain the following format characters:
+
+'t' Tag. The next argument is a ber_tag_t specifying the tag to
+ override the next element to be written to the ber. This works
+ across calls. The integer tag value SHOULD contain the tag
+ class, constructed bit, and tag value. For example, a tag of
+ "[3]" for a constructed type is 0xA3U. All implementations MUST
+ support tags that fit in a single octet (i.e., where the tag
+ value is less than 32) and they MAY support larger tags.
+
+'b' Boolean. The next argument is an ber_int_t, containing either 0
+ for FALSE or 0xff for TRUE. A boolean element is output. If
+ this format character is not preceded by the 't' format modif-
+ ier, the tag 0x01U is used for the element.
+
+'e' Enumerated. The next argument is a ber_int_t, containing the
+ enumerated value in the host's byte order. An enumerated ele-
+ ment is output. If this format character is not preceded by the
+ 't' format modifier, the tag 0x0AU is used for the element.
+
+'i' Integer. The next argument is a ber_int_t, containing the
+ integer in the host's byte order. An integer element is output.
+ If this format character is not preceded by the 't' format
+ modifier, the tag 0x02U is used for the element.
+
+'n' Null. No argument is needed. An ASN.1 NULL element is output.
+ If this format character is not preceded by the 't' format
+ modifier, the tag 0x05U is used for the element.
+
+'o' Octet string. The next two arguments are a char *, followed by
+ a ber_len_t with the length of the string. The string MAY con-
+ tain null bytes and are do not have to be zero-terminated. An
+ octet string element is output, in primitive form. If this for-
+ mat character is not preceded by the 't' format modifier, the
+ tag 0x04U is used for the element.
+
+'s' Octet string. The next argument is a char * pointing to a
+ zero-terminated string. An octet string element in primitive
+ form is output, which does not include the trailing '\0' (null)
+ byte. If this format character is not preceded by the 't' format
+ modifier, the tag 0x04U is used for the element.
+
+'v' Several octet strings. The next argument is a char **, an array
+ of char * pointers to zero-terminated strings. The last element
+ in the array MUST be a NULL pointer. The octet strings do not
+ include the trailing '\0' (null) byte. Note that a construct
+ like '{v}' is used to get an actual SEQUENCE OF octet strings.
+ The 't' format modifier cannot be used with this format charac-
+ ter.
+
+'V' Several octet strings. A NULL-terminated array of struct berval
+ *'s is supplied. Note that a construct like '{V}' is used to
+ get an actual SEQUENCE OF octet strings. The 't' format modifier
+ cannot be used with this format character.
+
+'{' Begin sequence. No argument is needed. If this format charac-
+ ter is not preceded by the 't' format modifier, the tag 0x30U is
+ used.
+
+'}' End sequence. No argument is needed. The 't' format modifier
+ cannot be used with this format character.
+
+'[' Begin set. No argument is needed. If this format character is
+ not preceded by the 't' format modifier, the tag 0x31U is used.
+
+']' End set. No argument is needed. The 't' format modifier cannot
+ be used with this format character.
+*)
+
+//WINBERAPI INT BERAPI ber_printf( BerElement *pBerElement, PCHAR fmt, ... );
+
+(*
+The ber_scanf() routine is used to decode a BER element in much the same
+way that sscanf() works. One important difference, though, is that some
+state information is kept with the ber argument so that multiple calls
+can be made to ber_scanf() to sequentially read from the BER element.
+The ber argument SHOULD be a pointer to a BerElement returned by
+ber_init(). ber_scanf interprets the bytes according to the format
+string fmt, and stores the results in its additional arguments.
+ber_scanf() returns LBER_ERROR on error, and a different value on suc-
+cess.
+
+The format string contains conversion specifications which are used to
+direct the interpretation of the BER element. The format string can
+contain the following characters:
+
+'a' Octet string. A char ** argument MUST be supplied. Memory is
+ allocated, filled with the contents of the octet string, zero-
+ terminated, and the pointer to the string is stored in the argu-
+ ment. The returned value SHOULD be freed using ldap_memfree.
+ The tag of the element MUST indicate the primitive form
+ (constructed strings are not supported) but is otherwise ignored
+ and discarded during the decoding. This format cannot be used
+ with octet strings which could contain null bytes.
+
+'O' Octet string. A struct berval ** argument MUST be supplied,
+ which upon return points to an allocated struct berval contain-
+ ing the octet string and its length. ber_bvfree() SHOULD be
+ called to free the allocated memory. The tag of the element
+ MUST indicate the primitive form (constructed strings are not
+ supported) but is otherwise ignored during the decoding.
+
+'b' Boolean. A pointer to a ber_int_t MUST be supplied. The
+ ber_int_t value stored will be 0 for FALSE or nonzero for TRUE.
+ The tag of the element MUST indicate the primitive form but is
+ otherwise ignored during the decoding.
+
+'e' Enumerated. A pointer to a ber_int_t MUST be supplied. The
+ enumerated value stored will be in host byte order. The tag of
+ the element MUST indicate the primitive form but is otherwise
+ ignored during the decoding. ber_scanf() will return an error
+ if the value of the enumerated value cannot be stored in a
+ ber_int_t.
+
+'i' Integer. A pointer to a ber_int_t MUST be supplied. The
+ ber_int_t value stored will be in host byte order. The tag of
+ the element MUST indicate the primitive form but is otherwise
+ ignored during the decoding. ber_scanf() will return an error
+ if the integer cannot be stored in a ber_int_t.
+
+'B' Bitstring. A char ** argument MUST be supplied which will point
+ to the allocated bits, followed by a ber_len_t * argument, which
+ will point to the length (in bits) of the bitstring returned.
+ ldap_memfree SHOULD be called to free the bitstring. The tag of
+ the element MUST indicate the primitive form (constructed bit-
+ strings are not supported) but is otherwise ignored during the
+ decoding.
+
+'n' Null. No argument is needed. The element is verified to have a
+ zero-length value and is skipped. The tag is ignored.
+
+'v' Several octet strings. A char *** argument MUST be supplied,
+ which upon return points to an allocated NULL-terminated array
+ of char *'s containing the octet strings. NULL is stored if the
+ sequence is empty. ldap_memfree SHOULD be called to free each
+ element of the array and the array itself. The tag of the
+ sequence and of the octet strings are ignored.
+
+'V' Several octet strings (which could contain null bytes). A
+ struct berval *** MUST be supplied, which upon return points to
+ a allocated NULL-terminated array of struct berval *'s contain-
+ ing the octet strings and their lengths. NULL is stored if the
+ sequence is empty. ber_bvecfree() can be called to free the
+ allocated memory. The tag of the sequence and of the octet
+ strings are ignored.
+
+'x' Skip element. The next element is skipped. No argument is
+ needed.
+
+'{' Begin sequence. No argument is needed. The initial sequence
+ tag and length are skipped.
+
+'}' End sequence. No argument is needed.
+
+'[' Begin set. No argument is needed. The initial set tag and
+ length are skipped.
+
+']' End set. No argument is needed.
+
+*)
+
+//WINBERAPI ULONG BERAPI ber_scanf( BerElement *pBerElement, PCHAR fmt, ... );
+
+implementation
+
+const
+ winberapi = 'wldap32.dll';
+
+function ber_init; external winberapi name 'ber_init';
+procedure ber_free; external winberapi name 'ber_free';
+procedure ber_bvfree; external winberapi name 'ber_bvfree';
+procedure ber_bvecfree; external winberapi name 'ber_bvecfree';
+function ber_bvdup; external winberapi name 'ber_bvdup';
+function ber_alloc_t; external winberapi name 'ber_alloc_t';
+function ber_skip_tag; external winberapi name 'ber_skip_tag';
+function ber_peek_tag; external winberapi name 'ber_peek_tag';
+function ber_first_element; external winberapi name 'ber_first_element';
+function ber_next_element; external winberapi name 'ber_next_element';
+function ber_flatten; external winberapi name 'ber_flatten';
+//function ber_printf; external winberapi name 'ber_printf';
+//function ber_scanf; external winberapi name 'ber_scanf';
+
+end.
diff --git a/packages/extra/winunits/jwawincon.pas b/packages/extra/winunits/jwawincon.pas
index 2a53c7caf7..341d6aa8e9 100644
--- a/packages/extra/winunits/jwawincon.pas
+++ b/packages/extra/winunits/jwawincon.pas
@@ -1,1992 +1,1992 @@
-{******************************************************************************}
-{ }
-{ Console Applications API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: wincon.h, released June 2000. The original Pascal }
-{ code is: WinCon.pas, released December 2000. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwawincon.pas,v 1.1 2005/04/04 07:56:11 marco Exp $
-
-unit JwaWinCon;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "WinCon.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaWinBase, JwaWinType;
-
-type
- PCOORD = ^COORD;
- {$EXTERNALSYM PCOORD}
- _COORD = record
- X: SHORT;
- Y: SHORT;
- end;
- {$EXTERNALSYM _COORD}
- COORD = _COORD;
- {$EXTERNALSYM COORD}
- TCoord = _COORD;
-
- PSMALL_RECT = ^SMALL_RECT;
- {$EXTERNALSYM PSMALL_RECT}
- _SMALL_RECT = record
- Left: SHORT;
- Top: SHORT;
- Right: SHORT;
- Bottom: SHORT;
- end;
- {$EXTERNALSYM _SMALL_RECT}
- SMALL_RECT = _SMALL_RECT;
- {$EXTERNALSYM SMALL_RECT}
- TSmallRect = SMALL_RECT;
- PSmallRect = PSMALL_RECT;
-
- TCharUnion = record
- case Integer of
- 0: (UnicodeChar: WCHAR);
- 1: (AsciiChar: CHAR);
- end;
-
- PKEY_EVENT_RECORD = ^KEY_EVENT_RECORD;
- {$EXTERNALSYM PKEY_EVENT_RECORD}
- _KEY_EVENT_RECORD = record
- bKeyDown: BOOL;
- wRepeatCount: WORD;
- wVirtualKeyCode: WORD;
- wVirtualScanCode: WORD;
- uChar: TCharUnion;
- dwControlKeyState: DWORD;
- end;
- {$EXTERNALSYM _KEY_EVENT_RECORD}
- KEY_EVENT_RECORD = _KEY_EVENT_RECORD;
- {$EXTERNALSYM KEY_EVENT_RECORD}
- TKeyEventRecord = KEY_EVENT_RECORD;
- PKeyEventRecord = PKEY_EVENT_RECORD;
-
-//
-// ControlKeyState flags
-//
-
-const
- RIGHT_ALT_PRESSED = $0001; // the right alt key is pressed.
- {$EXTERNALSYM RIGHT_ALT_PRESSED}
- LEFT_ALT_PRESSED = $0002; // the left alt key is pressed.
- {$EXTERNALSYM LEFT_ALT_PRESSED}
- RIGHT_CTRL_PRESSED = $0004; // the right ctrl key is pressed.
- {$EXTERNALSYM RIGHT_CTRL_PRESSED}
- LEFT_CTRL_PRESSED = $0008; // the left ctrl key is pressed.
- {$EXTERNALSYM LEFT_CTRL_PRESSED}
- SHIFT_PRESSED = $0010; // the shift key is pressed.
- {$EXTERNALSYM SHIFT_PRESSED}
- NUMLOCK_ON = $0020; // the numlock light is on.
- {$EXTERNALSYM NUMLOCK_ON}
- SCROLLLOCK_ON = $0040; // the scrolllock light is on.
- {$EXTERNALSYM SCROLLLOCK_ON}
- CAPSLOCK_ON = $0080; // the capslock light is on.
- {$EXTERNALSYM CAPSLOCK_ON}
- ENHANCED_KEY = $0100; // the key is enhanced.
- {$EXTERNALSYM ENHANCED_KEY}
- NLS_DBCSCHAR = $00010000; // DBCS for JPN: SBCS/DBCS mode.
- {$EXTERNALSYM NLS_DBCSCHAR}
- NLS_ALPHANUMERIC = $00000000; // DBCS for JPN: Alphanumeric mode.
- {$EXTERNALSYM NLS_ALPHANUMERIC}
- NLS_KATAKANA = $00020000; // DBCS for JPN: Katakana mode.
- {$EXTERNALSYM NLS_KATAKANA}
- NLS_HIRAGANA = $00040000; // DBCS for JPN: Hiragana mode.
- {$EXTERNALSYM NLS_HIRAGANA}
- NLS_ROMAN = $00400000; // DBCS for JPN: Roman/Noroman mode.
- {$EXTERNALSYM NLS_ROMAN}
- NLS_IME_CONVERSION = $00800000; // DBCS for JPN: IME conversion.
- {$EXTERNALSYM NLS_IME_CONVERSION}
- NLS_IME_DISABLE = $20000000; // DBCS for JPN: IME enable/disable.
- {$EXTERNALSYM NLS_IME_DISABLE}
-
-type
- PMOUSE_EVENT_RECORD = ^MOUSE_EVENT_RECORD;
- {$EXTERNALSYM PMOUSE_EVENT_RECORD}
- _MOUSE_EVENT_RECORD = record
- dwMousePosition: COORD;
- dwButtonState: DWORD;
- dwControlKeyState: DWORD;
- dwEventFlags: DWORD;
- end;
- {$EXTERNALSYM _MOUSE_EVENT_RECORD}
- MOUSE_EVENT_RECORD = _MOUSE_EVENT_RECORD;
- {$EXTERNALSYM MOUSE_EVENT_RECORD}
- TMouseEventRecord = MOUSE_EVENT_RECORD;
- PMouseEventRecord = PMOUSE_EVENT_RECORD;
-
-//
-// ButtonState flags
-//
-
-const
- FROM_LEFT_1ST_BUTTON_PRESSED = $0001;
- {$EXTERNALSYM FROM_LEFT_1ST_BUTTON_PRESSED}
- RIGHTMOST_BUTTON_PRESSED = $0002;
- {$EXTERNALSYM RIGHTMOST_BUTTON_PRESSED}
- FROM_LEFT_2ND_BUTTON_PRESSED = $0004;
- {$EXTERNALSYM FROM_LEFT_2ND_BUTTON_PRESSED}
- FROM_LEFT_3RD_BUTTON_PRESSED = $0008;
- {$EXTERNALSYM FROM_LEFT_3RD_BUTTON_PRESSED}
- FROM_LEFT_4TH_BUTTON_PRESSED = $0010;
- {$EXTERNALSYM FROM_LEFT_4TH_BUTTON_PRESSED}
-
-//
-// EventFlags
-//
-
- MOUSE_MOVED = $0001;
- {$EXTERNALSYM MOUSE_MOVED}
- DOUBLE_CLICK = $0002;
- {$EXTERNALSYM DOUBLE_CLICK}
- MOUSE_WHEELED = $0004;
- {$EXTERNALSYM MOUSE_WHEELED}
-
-type
- PWINDOW_BUFFER_SIZE_RECORD = ^WINDOW_BUFFER_SIZE_RECORD;
- {$EXTERNALSYM PWINDOW_BUFFER_SIZE_RECORD}
- _WINDOW_BUFFER_SIZE_RECORD = record
- dwSize: COORD;
- end;
- {$EXTERNALSYM _WINDOW_BUFFER_SIZE_RECORD}
- WINDOW_BUFFER_SIZE_RECORD = _WINDOW_BUFFER_SIZE_RECORD;
- {$EXTERNALSYM WINDOW_BUFFER_SIZE_RECORD}
- TWindowBufferSizeRecord = WINDOW_BUFFER_SIZE_RECORD;
- PWindowBufferSizeRecord = PWINDOW_BUFFER_SIZE_RECORD;
-
- PMENU_EVENT_RECORD = ^MENU_EVENT_RECORD;
- {$EXTERNALSYM PMENU_EVENT_RECORD}
- _MENU_EVENT_RECORD = record
- dwCommandId: UINT;
- end;
- {$EXTERNALSYM _MENU_EVENT_RECORD}
- MENU_EVENT_RECORD = _MENU_EVENT_RECORD;
- {$EXTERNALSYM MENU_EVENT_RECORD}
- TMenuEventRecord = MENU_EVENT_RECORD;
- PMenuEventRecord = PMENU_EVENT_RECORD;
-
- PFOCUS_EVENT_RECORD = ^FOCUS_EVENT_RECORD;
- {$EXTERNALSYM PFOCUS_EVENT_RECORD}
- _FOCUS_EVENT_RECORD = record
- bSetFocus: BOOL;
- end;
- {$EXTERNALSYM _FOCUS_EVENT_RECORD}
- FOCUS_EVENT_RECORD = _FOCUS_EVENT_RECORD;
- {$EXTERNALSYM FOCUS_EVENT_RECORD}
- TFocusEventRecord = FOCUS_EVENT_RECORD;
- PFocusEventRecord = PFOCUS_EVENT_RECORD;
-
- PINPUT_RECORD = ^INPUT_RECORD;
- {$EXTERNALSYM PINPUT_RECORD}
- _INPUT_RECORD = record
- EventType: WORD;
- case Integer of
- 0: (KeyEvent: KEY_EVENT_RECORD);
- 1: (MouseEvent: MOUSE_EVENT_RECORD);
- 2: (WindowBufferSizeEvent: WINDOW_BUFFER_SIZE_RECORD);
- 3: (MenuEvent: MENU_EVENT_RECORD);
- 4: (FocusEvent: FOCUS_EVENT_RECORD);
- end;
- {$EXTERNALSYM _INPUT_RECORD}
- INPUT_RECORD = _INPUT_RECORD;
- {$EXTERNALSYM INPUT_RECORD}
- TInputRecord = INPUT_RECORD;
- PInputRecord = PINPUT_RECORD;
-
-//
-// EventType flags:
-//
-
-const
- KEY_EVENT = $0001; // Event contains key event record
- {$EXTERNALSYM KEY_EVENT}
- MOUSE_EVENT = $0002; // Event contains mouse event record
- {$EXTERNALSYM MOUSE_EVENT}
- WINDOW_BUFFER_SIZE_EVENT = $0004; // Event contains window change event record
- {$EXTERNALSYM WINDOW_BUFFER_SIZE_EVENT}
- MENU_EVENT = $0008; // Event contains menu event record
- {$EXTERNALSYM MENU_EVENT}
- FOCUS_EVENT = $0010; // event contains focus change
- {$EXTERNALSYM FOCUS_EVENT}
-
-type
- PCHAR_INFO = ^CHAR_INFO;
- {$EXTERNALSYM PCHAR_INFO}
- _CHAR_INFO = record
- uChar: TCharUnion;
- Attributes: WORD;
- end;
- {$EXTERNALSYM _CHAR_INFO}
- CHAR_INFO = _CHAR_INFO;
- {$EXTERNALSYM CHAR_INFO}
- TCharInfo = CHAR_INFO;
- PCharInfo = PCHAR_INFO;
-
-//
-// Attributes flags:
-//
-
-const
- FOREGROUND_BLUE = $0001; // text color contains blue.
- {$EXTERNALSYM FOREGROUND_BLUE}
- FOREGROUND_GREEN = $0002; // text color contains green.
- {$EXTERNALSYM FOREGROUND_GREEN}
- FOREGROUND_RED = $0004; // text color contains red.
- {$EXTERNALSYM FOREGROUND_RED}
- FOREGROUND_INTENSITY = $0008; // text color is intensified.
- {$EXTERNALSYM FOREGROUND_INTENSITY}
- BACKGROUND_BLUE = $0010; // background color contains blue.
- {$EXTERNALSYM BACKGROUND_BLUE}
- BACKGROUND_GREEN = $0020; // background color contains green.
- {$EXTERNALSYM BACKGROUND_GREEN}
- BACKGROUND_RED = $0040; // background color contains red.
- {$EXTERNALSYM BACKGROUND_RED}
- BACKGROUND_INTENSITY = $0080; // background color is intensified.
- {$EXTERNALSYM BACKGROUND_INTENSITY}
- COMMON_LVB_LEADING_BYTE = $0100; // Leading Byte of DBCS
- {$EXTERNALSYM COMMON_LVB_LEADING_BYTE}
- COMMON_LVB_TRAILING_BYTE = $0200; // Trailing Byte of DBCS
- {$EXTERNALSYM COMMON_LVB_TRAILING_BYTE}
- COMMON_LVB_GRID_HORIZONTAL = $0400; // DBCS: Grid attribute: top horizontal.
- {$EXTERNALSYM COMMON_LVB_GRID_HORIZONTAL}
- COMMON_LVB_GRID_LVERTICAL = $0800; // DBCS: Grid attribute: left vertical.
- {$EXTERNALSYM COMMON_LVB_GRID_LVERTICAL}
- COMMON_LVB_GRID_RVERTICAL = $1000; // DBCS: Grid attribute: right vertical.
- {$EXTERNALSYM COMMON_LVB_GRID_RVERTICAL}
- COMMON_LVB_REVERSE_VIDEO = $4000; // DBCS: Reverse fore/back ground attribute.
- {$EXTERNALSYM COMMON_LVB_REVERSE_VIDEO}
- COMMON_LVB_UNDERSCORE = $8000; // DBCS: Underscore.
- {$EXTERNALSYM COMMON_LVB_UNDERSCORE}
-
- COMMON_LVB_SBCSDBCS = $0300; // SBCS or DBCS flag.
- {$EXTERNALSYM COMMON_LVB_SBCSDBCS}
-
-type
- PCONSOLE_SCREEN_BUFFER_INFO = ^CONSOLE_SCREEN_BUFFER_INFO;
- {$EXTERNALSYM PCONSOLE_SCREEN_BUFFER_INFO}
- _CONSOLE_SCREEN_BUFFER_INFO = record
- dwSize: COORD;
- dwCursorPosition: COORD;
- wAttributes: WORD;
- srWindow: SMALL_RECT;
- dwMaximumWindowSize: COORD;
- end;
- {$EXTERNALSYM _CONSOLE_SCREEN_BUFFER_INFO}
- CONSOLE_SCREEN_BUFFER_INFO = _CONSOLE_SCREEN_BUFFER_INFO;
- {$EXTERNALSYM CONSOLE_SCREEN_BUFFER_INFO}
- TConsoleScreenBufferInfo = CONSOLE_SCREEN_BUFFER_INFO;
- PConsoleScreenBufferInfo = PCONSOLE_SCREEN_BUFFER_INFO;
-
- PCONSOLE_CURSOR_INFO = ^CONSOLE_CURSOR_INFO;
- {$EXTERNALSYM PCONSOLE_CURSOR_INFO}
- _CONSOLE_CURSOR_INFO = record
- dwSize: DWORD;
- bVisible: BOOL;
- end;
- {$EXTERNALSYM _CONSOLE_CURSOR_INFO}
- CONSOLE_CURSOR_INFO = _CONSOLE_CURSOR_INFO;
- {$EXTERNALSYM CONSOLE_CURSOR_INFO}
- TConsoleCursorInfo = CONSOLE_CURSOR_INFO;
- PConsoleCursorInfo = PCONSOLE_CURSOR_INFO;
-
- _CONSOLE_FONT_INFO = record
- nFont: DWORD;
- dwFontSize: COORD;
- end;
- {$EXTERNALSYM _CONSOLE_FONT_INFO}
- CONSOLE_FONT_INFO = _CONSOLE_FONT_INFO;
- {$EXTERNALSYM CONSOLE_FONT_INFO}
- PCONSOLE_FONT_INFO = ^CONSOLE_FONT_INFO;
- {$EXTERNALSYM PCONSOLE_FONT_INFO}
- TConsoleFontInfo = CONSOLE_FONT_INFO;
- PConsoleFontInfo = PCONSOLE_FONT_INFO;
-
- _CONSOLE_SELECTION_INFO = record
- dwFlags: DWORD;
- dwSelectionAnchor: COORD;
- srSelection: SMALL_RECT;
- end;
- {$EXTERNALSYM _CONSOLE_SELECTION_INFO}
- CONSOLE_SELECTION_INFO = _CONSOLE_SELECTION_INFO;
- {$EXTERNALSYM CONSOLE_SELECTION_INFO}
- PCONSOLE_SELECTION_INFO = ^CONSOLE_SELECTION_INFO;
- {$EXTERNALSYM PCONSOLE_SELECTION_INFO}
- TConsoleSelectionInfo = CONSOLE_SELECTION_INFO;
- PConsoleSelectionInfo = PCONSOLE_SELECTION_INFO;
-
-//
-// Selection flags
-//
-
-const
- CONSOLE_NO_SELECTION = $0000;
- {$EXTERNALSYM CONSOLE_NO_SELECTION}
- CONSOLE_SELECTION_IN_PROGRESS = $0001; // selection has begun
- {$EXTERNALSYM CONSOLE_SELECTION_IN_PROGRESS}
- CONSOLE_SELECTION_NOT_EMPTY = $0002; // non-null select rectangle
- {$EXTERNALSYM CONSOLE_SELECTION_NOT_EMPTY}
- CONSOLE_MOUSE_SELECTION = $0004; // selecting with mouse
- {$EXTERNALSYM CONSOLE_MOUSE_SELECTION}
- CONSOLE_MOUSE_DOWN = $0008; // mouse is down
- {$EXTERNALSYM CONSOLE_MOUSE_DOWN}
-
-//
-// typedef for ctrl-c handler routines
-//
-
-type
- PHANDLER_ROUTINE = function(CtrlType: DWORD): BOOL; stdcall;
- {$EXTERNALSYM PHANDLER_ROUTINE}
- THandlerRoutine = PHANDLER_ROUTINE;
-
-const
- CTRL_C_EVENT = 0;
- {$EXTERNALSYM CTRL_C_EVENT}
- CTRL_BREAK_EVENT = 1;
- {$EXTERNALSYM CTRL_BREAK_EVENT}
- CTRL_CLOSE_EVENT = 2;
- {$EXTERNALSYM CTRL_CLOSE_EVENT}
- // 3 is reserved!
- // 4 is reserved!
- CTRL_LOGOFF_EVENT = 5;
- {$EXTERNALSYM CTRL_LOGOFF_EVENT}
- CTRL_SHUTDOWN_EVENT = 6;
- {$EXTERNALSYM CTRL_SHUTDOWN_EVENT}
-
-//
-// Input Mode flags:
-//
-
- ENABLE_PROCESSED_INPUT = $0001;
- {$EXTERNALSYM ENABLE_PROCESSED_INPUT}
- ENABLE_LINE_INPUT = $0002;
- {$EXTERNALSYM ENABLE_LINE_INPUT}
- ENABLE_ECHO_INPUT = $0004;
- {$EXTERNALSYM ENABLE_ECHO_INPUT}
- ENABLE_WINDOW_INPUT = $0008;
- {$EXTERNALSYM ENABLE_WINDOW_INPUT}
- ENABLE_MOUSE_INPUT = $0010;
- {$EXTERNALSYM ENABLE_MOUSE_INPUT}
-
-//
-// Output Mode flags:
-//
-
- ENABLE_PROCESSED_OUTPUT = $0001;
- {$EXTERNALSYM ENABLE_PROCESSED_OUTPUT}
- ENABLE_WRAP_AT_EOL_OUTPUT = $0002;
- {$EXTERNALSYM ENABLE_WRAP_AT_EOL_OUTPUT}
-
-//
-// direct API definitions.
-//
-
-function PeekConsoleInputA(hConsoleInput: HANDLE; lpBuffer: PINPUT_RECORD;
- nLength: DWORD; var lpNumberOfEventsRead: DWORD): BOOL; stdcall;
-{$EXTERNALSYM PeekConsoleInputA}
-function PeekConsoleInputW(hConsoleInput: HANDLE; lpBuffer: PINPUT_RECORD;
- nLength: DWORD; var lpNumberOfEventsRead: DWORD): BOOL; stdcall;
-{$EXTERNALSYM PeekConsoleInputW}
-function PeekConsoleInput(hConsoleInput: HANDLE; lpBuffer: PINPUT_RECORD;
- nLength: DWORD; var lpNumberOfEventsRead: DWORD): BOOL; stdcall;
-{$EXTERNALSYM PeekConsoleInput}
-
-function ReadConsoleInputA(hConsoleInput: HANDLE; lpBuffer: PINPUT_RECORD;
- nLength: DWORD; var lpNumberOfEventsRead: DWORD): BOOL; stdcall;
-{$EXTERNALSYM ReadConsoleInputA}
-function ReadConsoleInputW(hConsoleInput: HANDLE; lpBuffer: PINPUT_RECORD;
- nLength: DWORD; var lpNumberOfEventsRead: DWORD): BOOL; stdcall;
-{$EXTERNALSYM ReadConsoleInputW}
-function ReadConsoleInput(hConsoleInput: HANDLE; lpBuffer: PINPUT_RECORD;
- nLength: DWORD; var lpNumberOfEventsRead: DWORD): BOOL; stdcall;
-{$EXTERNALSYM ReadConsoleInput}
-
-function WriteConsoleInputA(hConsoleInput: HANDLE; lpBuffer: PINPUT_RECORD;
- nLength: DWORD; var lpNumberOfEventsWritten: DWORD): BOOL; stdcall;
-{$EXTERNALSYM WriteConsoleInputA}
-function WriteConsoleInputW(hConsoleInput: HANDLE; lpBuffer: PINPUT_RECORD;
- nLength: DWORD; var lpNumberOfEventsWritten: DWORD): BOOL; stdcall;
-{$EXTERNALSYM WriteConsoleInputW}
-function WriteConsoleInput(hConsoleInput: HANDLE; lpBuffer: PINPUT_RECORD;
- nLength: DWORD; var lpNumberOfEventsWritten: DWORD): BOOL; stdcall;
-{$EXTERNALSYM WriteConsoleInput}
-
-function ReadConsoleOutputA(hConsoleOutput: HANDLE; lpBuffer: PCHAR_INFO;
- dwBufferSize: COORD; dwBufferCoord: COORD;
- var lpReadRegion: SMALL_RECT): BOOL; stdcall;
-{$EXTERNALSYM ReadConsoleOutputA}
-function ReadConsoleOutputW(hConsoleOutput: HANDLE; lpBuffer: PCHAR_INFO;
- dwBufferSize: COORD; dwBufferCoord: COORD;
- var lpReadRegion: SMALL_RECT): BOOL; stdcall;
-{$EXTERNALSYM ReadConsoleOutputW}
-function ReadConsoleOutput(hConsoleOutput: HANDLE; lpBuffer: PCHAR_INFO;
- dwBufferSize: COORD; dwBufferCoord: COORD;
- var lpReadRegion: SMALL_RECT): BOOL; stdcall;
-{$EXTERNALSYM ReadConsoleOutput}
-
-function WriteConsoleOutputA(hConsoleOutput: HANDLE; lpBuffer: PCHAR_INFO;
- dwBufferSize: COORD; dwBufferCoord: COORD;
- var lpWriteRegion: SMALL_RECT): BOOL; stdcall;
-{$EXTERNALSYM WriteConsoleOutputA}
-function WriteConsoleOutputW(hConsoleOutput: HANDLE; lpBuffer: PCHAR_INFO;
- dwBufferSize: COORD; dwBufferCoord: COORD;
- var lpWriteRegion: SMALL_RECT): BOOL; stdcall;
-{$EXTERNALSYM WriteConsoleOutputW}
-function WriteConsoleOutput(hConsoleOutput: HANDLE; lpBuffer: PCHAR_INFO;
- dwBufferSize: COORD; dwBufferCoord: COORD;
- var lpWriteRegion: SMALL_RECT): BOOL; stdcall;
-{$EXTERNALSYM WriteConsoleOutput}
-
-function ReadConsoleOutputCharacterA(hConsoleOutput: HANDLE; lpCharacter: LPSTR;
- nLength: DWORD; dwReadCoord: COORD; var lpNumberOfCharsRead: DWORD): BOOL; stdcall;
-{$EXTERNALSYM ReadConsoleOutputCharacterA}
-function ReadConsoleOutputCharacterW(hConsoleOutput: HANDLE; lpCharacter: LPWSTR;
- nLength: DWORD; dwReadCoord: COORD; var lpNumberOfCharsRead: DWORD): BOOL; stdcall;
-{$EXTERNALSYM ReadConsoleOutputCharacterW}
-function ReadConsoleOutputCharacter(hConsoleOutput: HANDLE; lpCharacter: LPTSTR;
- nLength: DWORD; dwReadCoord: COORD; var lpNumberOfCharsRead: DWORD): BOOL; stdcall;
-{$EXTERNALSYM ReadConsoleOutputCharacter}
-
-function ReadConsoleOutputAttribute(hConsoleOutput: HANDLE;
- var lpAttribute: DWORD; nLength: DWORD; dwReadCoord: COORD;
- var lpNumberOfAttrsRead: DWORD): BOOL; stdcall;
-{$EXTERNALSYM ReadConsoleOutputAttribute}
-
-function WriteConsoleOutputCharacterA(hConsoleOutput: HANDLE;
- lpCharacter: LPCSTR; nLength: DWORD; dwWriteCoord: COORD;
- var lpNumberOfCharsWritten: DWORD): BOOL; stdcall;
-{$EXTERNALSYM WriteConsoleOutputCharacterA}
-function WriteConsoleOutputCharacterW(hConsoleOutput: HANDLE;
- lpCharacter: LPCWSTR; nLength: DWORD; dwWriteCoord: COORD;
- var lpNumberOfCharsWritten: DWORD): BOOL; stdcall;
-{$EXTERNALSYM WriteConsoleOutputCharacterW}
-function WriteConsoleOutputCharacter(hConsoleOutput: HANDLE;
- lpCharacter: LPCTSTR; nLength: DWORD; dwWriteCoord: COORD;
- var lpNumberOfCharsWritten: DWORD): BOOL; stdcall;
-{$EXTERNALSYM WriteConsoleOutputCharacter}
-
-function WriteConsoleOutputAttribute(hConsoleOutput: HANDLE; lpAttribute: PWORD;
- nLength: DWORD; dwWriteCoord: COORD; var lpNumberOfAttrsWritten: DWORD): BOOL; stdcall;
-{$EXTERNALSYM WriteConsoleOutputAttribute}
-
-function FillConsoleOutputCharacterA(hConsoleOutput: HANDLE; cCharacter: CHAR;
- nLength: DWORD; dwWriteCoord: COORD; var lpNumberOfCharsWritten: DWORD): BOOL; stdcall;
-{$EXTERNALSYM FillConsoleOutputCharacterA}
-function FillConsoleOutputCharacterW(hConsoleOutput: HANDLE; cCharacter: WCHAR;
- nLength: DWORD; dwWriteCoord: COORD; var lpNumberOfCharsWritten: DWORD): BOOL; stdcall;
-{$EXTERNALSYM FillConsoleOutputCharacterW}
-function FillConsoleOutputCharacter(hConsoleOutput: HANDLE; cCharacter: TCHAR;
- nLength: DWORD; dwWriteCoord: COORD; var lpNumberOfCharsWritten: DWORD): BOOL; stdcall;
-{$EXTERNALSYM FillConsoleOutputCharacter}
-
-function FillConsoleOutputAttribute(hConsoleOutput: HANDLE; wAttribute: WORD;
- nLength: DWORD; dwWriteCoord: COORD; var lpNumberOfAttrsWritten: DWORD): BOOL; stdcall;
-{$EXTERNALSYM FillConsoleOutputAttribute}
-function GetConsoleMode(hConsoleHandle: HANDLE; var lpMode: DWORD): BOOL; stdcall;
-{$EXTERNALSYM GetConsoleMode}
-function GetNumberOfConsoleInputEvents(hConsoleInput: HANDLE;
- var lpNumberOfEvents: DWORD): BOOL; stdcall;
-{$EXTERNALSYM GetNumberOfConsoleInputEvents}
-function GetConsoleScreenBufferInfo(hConsoleOutput: HANDLE;
- var lpConsoleScreenBufferInfo: CONSOLE_SCREEN_BUFFER_INFO): BOOL; stdcall;
-{$EXTERNALSYM GetConsoleScreenBufferInfo}
-function GetLargestConsoleWindowSize(hConsoleOutput: HANDLE): COORD; stdcall;
-{$EXTERNALSYM GetLargestConsoleWindowSize}
-function GetConsoleCursorInfo(hConsoleOutput: HANDLE;
- var lpConsoleCursorInfo: CONSOLE_CURSOR_INFO): BOOL; stdcall;
-function GetCurrentConsoleFont(hConsoleOutput: HANDLE; bMaximumWindow: BOOL;
- var lpConsoleCurrentFont: CONSOLE_FONT_INFO): BOOL; stdcall;
-{$EXTERNALSYM GetCurrentConsoleFont}
-function GetConsoleFontSize(hConsoleOutput: HANDLE; nFont: DWORD): COORD; stdcall;
-{$EXTERNALSYM GetConsoleFontSize}
-function GetConsoleSelectionInfo(var lpConsoleSelectionInfo: CONSOLE_SELECTION_INFO): BOOL; stdcall;
-{$EXTERNALSYM GetConsoleSelectionInfo}
-{$EXTERNALSYM GetConsoleCursorInfo}
-function GetNumberOfConsoleMouseButtons(var lpNumberOfMouseButtons: DWORD): BOOL; stdcall;
-{$EXTERNALSYM GetNumberOfConsoleMouseButtons}
-function SetConsoleMode(hConsoleHandle: HANDLE; dwMode: DWORD): BOOL; stdcall;
-{$EXTERNALSYM SetConsoleMode}
-function SetConsoleActiveScreenBuffer(hConsoleOutput: HANDLE): BOOL; stdcall;
-{$EXTERNALSYM SetConsoleActiveScreenBuffer}
-function FlushConsoleInputBuffer(hConsoleInput: HANDLE): BOOL; stdcall;
-{$EXTERNALSYM FlushConsoleInputBuffer}
-function SetConsoleScreenBufferSize(hConsoleOutput: HANDLE; dwSize: COORD): BOOL; stdcall;
-{$EXTERNALSYM SetConsoleScreenBufferSize}
-function SetConsoleCursorPosition(hConsoleOutput: HANDLE; dwCursorPosition: COORD): BOOL; stdcall;
-{$EXTERNALSYM SetConsoleCursorPosition}
-function SetConsoleCursorInfo(hConsoleOutput: HANDLE;
- var lpConsoleCursorInfo: CONSOLE_CURSOR_INFO): BOOL; stdcall;
-{$EXTERNALSYM SetConsoleCursorInfo}
-
-function ScrollConsoleScreenBufferA(hConsoleOutput: HANDLE;
- const lpScrollRectangle: SMALL_RECT; lpClipRectangle: PSMALL_RECT;
- dwDestinationOrigin: COORD; const lpFill: CHAR_INFO): BOOL; stdcall;
-{$EXTERNALSYM ScrollConsoleScreenBufferA}
-function ScrollConsoleScreenBufferW(hConsoleOutput: HANDLE;
- const lpScrollRectangle: PSMALL_RECT; lpClipRectangle: PSMALL_RECT;
- dwDestinationOrigin: COORD; const lpFill: CHAR_INFO): BOOL; stdcall;
-{$EXTERNALSYM ScrollConsoleScreenBufferW}
-function ScrollConsoleScreenBuffer(hConsoleOutput: HANDLE;
- const lpScrollRectangle: PSMALL_RECT; lpClipRectangle: PSMALL_RECT;
- dwDestinationOrigin: COORD; const lpFill: CHAR_INFO): BOOL; stdcall;
-{$EXTERNALSYM ScrollConsoleScreenBuffer}
-
-function SetConsoleWindowInfo(hConsoleOutput: HANDLE; bAbsolute: BOOL;
- const lpConsoleWindow: SMALL_RECT): BOOL; stdcall;
-{$EXTERNALSYM SetConsoleWindowInfo}
-function SetConsoleTextAttribute(hConsoleOutput: HANDLE; wAttributes: WORD): BOOL; stdcall;
-{$EXTERNALSYM SetConsoleTextAttribute}
-function SetConsoleCtrlHandler(HandlerRoutine: PHANDLER_ROUTINE; Add: BOOL): BOOL; stdcall;
-{$EXTERNALSYM SetConsoleCtrlHandler}
-function GenerateConsoleCtrlEvent(dwCtrlEvent: DWORD; dwProcessGroupId: DWORD): BOOL; stdcall;
-{$EXTERNALSYM GenerateConsoleCtrlEvent}
-function AllocConsole: BOOL; stdcall;
-{$EXTERNALSYM AllocConsole}
-function FreeConsole: BOOL; stdcall;
-{$EXTERNALSYM FreeConsole}
-function AttachConsole(dwProcessId: DWORD): BOOL; stdcall;
-{$EXTERNALSYM AttachConsole}
-
-const
- ATTACH_PARENT_PROCESS = DWORD(-1);
- {$EXTERNALSYM ATTACH_PARENT_PROCESS}
-
-function GetConsoleTitleA(lpConsoleTitle: LPSTR; nSize: DWORD): DWORD; stdcall;
-{$EXTERNALSYM GetConsoleTitleA}
-function GetConsoleTitleW(lpConsoleTitle: LPWSTR; nSize: DWORD): DWORD; stdcall;
-{$EXTERNALSYM GetConsoleTitleW}
-function GetConsoleTitle(lpConsoleTitle: LPTSTR; nSize: DWORD): DWORD; stdcall;
-{$EXTERNALSYM GetConsoleTitle}
-
-function SetConsoleTitleA(lpConsoleTitle: LPCSTR): BOOL; stdcall;
-{$EXTERNALSYM SetConsoleTitleA}
-function SetConsoleTitleW(lpConsoleTitle: LPCWSTR): BOOL; stdcall;
-{$EXTERNALSYM SetConsoleTitleW}
-function SetConsoleTitle(lpConsoleTitle: LPCTSTR): BOOL; stdcall;
-{$EXTERNALSYM SetConsoleTitle}
-
-function ReadConsoleA(hConsoleInput: HANDLE; lpBuffer: LPVOID;
- nNumberOfCharsToRead: DWORD; var lpNumberOfCharsRead: DWORD;
- lpReserved: LPVOID): BOOL; stdcall;
-{$EXTERNALSYM ReadConsoleA}
-function ReadConsoleW(hConsoleInput: HANDLE; lpBuffer: LPVOID;
- nNumberOfCharsToRead: DWORD; var lpNumberOfCharsRead: DWORD;
- lpReserved: LPVOID): BOOL; stdcall;
-{$EXTERNALSYM ReadConsoleW}
-function ReadConsole(hConsoleInput: HANDLE; lpBuffer: LPVOID;
- nNumberOfCharsToRead: DWORD; var lpNumberOfCharsRead: DWORD;
- lpReserved: LPVOID): BOOL; stdcall;
-{$EXTERNALSYM ReadConsole}
-
-function WriteConsoleA(hConsoleOutput: HANDLE; lpBuffer: LPVOID;
- nNumberOfCharsToWrite: DWORD; var lpNumberOfCharsWritten: DWORD;
- lpReserved: LPVOID): BOOL; stdcall;
-{$EXTERNALSYM WriteConsoleA}
-function WriteConsoleW(hConsoleOutput: HANDLE; lpBuffer: LPVOID;
- nNumberOfCharsToWrite: DWORD; var lpNumberOfCharsWritten: DWORD;
- lpReserved: LPVOID): BOOL; stdcall;
-{$EXTERNALSYM WriteConsoleW}
-function WriteConsole(hConsoleOutput: HANDLE; lpBuffer: LPVOID;
- nNumberOfCharsToWrite: DWORD; var lpNumberOfCharsWritten: DWORD;
- lpReserved: LPVOID): BOOL; stdcall;
-{$EXTERNALSYM WriteConsole}
-
-const
- CONSOLE_TEXTMODE_BUFFER = 1;
- {$EXTERNALSYM CONSOLE_TEXTMODE_BUFFER}
-
-function CreateConsoleScreenBuffer(dwDesiredAccess: DWORD; dwShareMode: DWORD;
- lpSecurityAttributes: PSECURITY_ATTRIBUTES; dwFlags: DWORD;
- lpScreenBufferData: LPVOID): HANDLE; stdcall;
-{$EXTERNALSYM CreateConsoleScreenBuffer}
-function GetConsoleCP: UINT; stdcall;
-{$EXTERNALSYM GetConsoleCP}
-function SetConsoleCP(wCodePageID: UINT): BOOL; stdcall;
-{$EXTERNALSYM SetConsoleCP}
-function GetConsoleOutputCP: UINT; stdcall;
-{$EXTERNALSYM GetConsoleOutputCP}
-function SetConsoleOutputCP(wCodePageID: UINT): BOOL; stdcall;
-{$EXTERNALSYM SetConsoleOutputCP}
-
-const
- CONSOLE_FULLSCREEN = 1; // fullscreen console
- {$EXTERNALSYM CONSOLE_FULLSCREEN}
- CONSOLE_FULLSCREEN_HARDWARE = 2; // console owns the hardware
- {$EXTERNALSYM CONSOLE_FULLSCREEN_HARDWARE}
-
-function GetConsoleDisplayMode(var lpModeFlags: DWORD): BOOL; stdcall;
-{$EXTERNALSYM GetConsoleDisplayMode}
-
-function GetConsoleWindow: HWND; stdcall;
-{$EXTERNALSYM GetConsoleWindow}
-
-function GetConsoleProcessList(var lpdwProcessList: LPDWORD; dwProcessCount: DWORD): DWORD; stdcall;
-{$EXTERNALSYM GetConsoleProcessList}
-
-//
-// Aliasing apis.
-//
-
-function AddConsoleAliasA(Source, Target, ExeName: LPSTR): BOOL; stdcall;
-{$EXTERNALSYM AddConsoleAliasA}
-function AddConsoleAliasW(Source, Target, ExeName: LPWSTR): BOOL; stdcall;
-{$EXTERNALSYM AddConsoleAliasW}
-function AddConsoleAlias(Source, Target, ExeName: LPTSTR): BOOL; stdcall;
-{$EXTERNALSYM AddConsoleAlias}
-
-function GetConsoleAliasA(Source, TargetBuffer: LPSTR; TargetBufferLength: DWORD; ExeName: LPSTR): DWORD; stdcall;
-{$EXTERNALSYM GetConsoleAliasA}
-function GetConsoleAliasW(Source, TargetBuffer: LPWSTR; TargetBufferLength: DWORD; ExeName: LPWSTR): DWORD; stdcall;
-{$EXTERNALSYM GetConsoleAliasW}
-function GetConsoleAlias(Source, TargetBuffer: LPTSTR; TargetBufferLength: DWORD; ExeName: LPTSTR): DWORD; stdcall;
-{$EXTERNALSYM GetConsoleAlias}
-
-function GetConsoleAliasesLengthA(ExeName: LPSTR): DWORD; stdcall;
-{$EXTERNALSYM GetConsoleAliasesLengthA}
-function GetConsoleAliasesLengthW(ExeName: LPWSTR): DWORD; stdcall;
-{$EXTERNALSYM GetConsoleAliasesLengthW}
-function GetConsoleAliasesLength(ExeName: LPTSTR): DWORD; stdcall;
-{$EXTERNALSYM GetConsoleAliasesLength}
-
-function GetConsoleAliasExesLengthA: DWORD; stdcall;
-{$EXTERNALSYM GetConsoleAliasExesLengthA}
-function GetConsoleAliasExesLengthW: DWORD; stdcall;
-{$EXTERNALSYM GetConsoleAliasExesLengthW}
-function GetConsoleAliasExesLength: DWORD; stdcall;
-{$EXTERNALSYM GetConsoleAliasExesLength}
-
-function GetConsoleAliasesA(AliasBuffer: LPSTR; AliasBufferLength: DWORD; ExeName: LPSTR): DWORD; stdcall;
-{$EXTERNALSYM GetConsoleAliasesA}
-function GetConsoleAliasesW(AliasBuffer: LPWSTR; AliasBufferLength: DWORD; ExeName: LPWSTR): DWORD; stdcall;
-{$EXTERNALSYM GetConsoleAliasesW}
-function GetConsoleAliases(AliasBuffer: LPTSTR; AliasBufferLength: DWORD; ExeName: LPTSTR): DWORD; stdcall;
-{$EXTERNALSYM GetConsoleAliases}
-
-function GetConsoleAliasExesA(ExeNameBuffer: LPSTR; ExeNameBufferLength: DWORD): DWORD; stdcall;
-{$EXTERNALSYM GetConsoleAliasExesA}
-function GetConsoleAliasExesW(ExeNameBuffer: LPWSTR; ExeNameBufferLength: DWORD): DWORD; stdcall;
-{$EXTERNALSYM GetConsoleAliasExesW}
-function GetConsoleAliasExes(ExeNameBuffer: LPTSTR; ExeNameBufferLength: DWORD): DWORD; stdcall;
-{$EXTERNALSYM GetConsoleAliasExes}
-
-implementation
-
-const
- kernel32 = 'kernel32.dll';
- {$IFDEF UNICODE}
- AWSuffix = 'W';
- {$ELSE}
- AWSuffix = 'A';
- {$ENDIF UNICODE}
-
-{$IFDEF DYNAMIC_LINK}
-
-var
- _PeekConsoleInputA: Pointer;
-
-function PeekConsoleInputA;
-begin
- GetProcedureAddress(_PeekConsoleInputA, kernel32, 'PeekConsoleInputA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PeekConsoleInputA]
- end;
-end;
-
-var
- _PeekConsoleInputW: Pointer;
-
-function PeekConsoleInputW;
-begin
- GetProcedureAddress(_PeekConsoleInputW, kernel32, 'PeekConsoleInputW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PeekConsoleInputW]
- end;
-end;
-
-var
- _PeekConsoleInput: Pointer;
-
-function PeekConsoleInput;
-begin
- GetProcedureAddress(_PeekConsoleInput, kernel32, 'PeekConsoleInput' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PeekConsoleInput]
- end;
-end;
-
-var
- _ReadConsoleInputA: Pointer;
-
-function ReadConsoleInputA;
-begin
- GetProcedureAddress(_ReadConsoleInputA, kernel32, 'ReadConsoleInputA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ReadConsoleInputA]
- end;
-end;
-
-var
- _ReadConsoleInputW: Pointer;
-
-function ReadConsoleInputW;
-begin
- GetProcedureAddress(_ReadConsoleInputW, kernel32, 'ReadConsoleInputW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ReadConsoleInputW]
- end;
-end;
-
-var
- _ReadConsoleInput: Pointer;
-
-function ReadConsoleInput;
-begin
- GetProcedureAddress(_ReadConsoleInput, kernel32, 'ReadConsoleInput' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ReadConsoleInput]
- end;
-end;
-
-var
- _WriteConsoleInputA: Pointer;
-
-function WriteConsoleInputA;
-begin
- GetProcedureAddress(_WriteConsoleInputA, kernel32, 'WriteConsoleInputA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WriteConsoleInputA]
- end;
-end;
-
-var
- _WriteConsoleInputW: Pointer;
-
-function WriteConsoleInputW;
-begin
- GetProcedureAddress(_WriteConsoleInputW, kernel32, 'WriteConsoleInputW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WriteConsoleInputW]
- end;
-end;
-
-var
- _WriteConsoleInput: Pointer;
-
-function WriteConsoleInput;
-begin
- GetProcedureAddress(_WriteConsoleInput, kernel32, 'WriteConsoleInput' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WriteConsoleInput]
- end;
-end;
-
-var
- _ReadConsoleOutputA: Pointer;
-
-function ReadConsoleOutputA;
-begin
- GetProcedureAddress(_ReadConsoleOutputA, kernel32, 'ReadConsoleOutputA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ReadConsoleOutputA]
- end;
-end;
-
-var
- _ReadConsoleOutputW: Pointer;
-
-function ReadConsoleOutputW;
-begin
- GetProcedureAddress(_ReadConsoleOutputW, kernel32, 'ReadConsoleOutputW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ReadConsoleOutputW]
- end;
-end;
-
-var
- _ReadConsoleOutput: Pointer;
-
-function ReadConsoleOutput;
-begin
- GetProcedureAddress(_ReadConsoleOutput, kernel32, 'ReadConsoleOutput' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ReadConsoleOutput]
- end;
-end;
-
-var
- _WriteConsoleOutputA: Pointer;
-
-function WriteConsoleOutputA;
-begin
- GetProcedureAddress(_WriteConsoleOutputA, kernel32, 'WriteConsoleOutputA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WriteConsoleOutputA]
- end;
-end;
-
-var
- _WriteConsoleOutputW: Pointer;
-
-function WriteConsoleOutputW;
-begin
- GetProcedureAddress(_WriteConsoleOutputW, kernel32, 'WriteConsoleOutputW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WriteConsoleOutputW]
- end;
-end;
-
-var
- _WriteConsoleOutput: Pointer;
-
-function WriteConsoleOutput;
-begin
- GetProcedureAddress(_WriteConsoleOutput, kernel32, 'WriteConsoleOutput' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WriteConsoleOutput]
- end;
-end;
-
-var
- _ReadConsoleOutputCharacterA: Pointer;
-
-function ReadConsoleOutputCharacterA;
-begin
- GetProcedureAddress(_ReadConsoleOutputCharacterA, kernel32, 'ReadConsoleOutputCharacterA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ReadConsoleOutputCharacterA]
- end;
-end;
-
-var
- _ReadConsoleOutputCharacterW: Pointer;
-
-function ReadConsoleOutputCharacterW;
-begin
- GetProcedureAddress(_ReadConsoleOutputCharacterW, kernel32, 'ReadConsoleOutputCharacterW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ReadConsoleOutputCharacterW]
- end;
-end;
-
-var
- _ReadConsoleOutputCharacter: Pointer;
-
-function ReadConsoleOutputCharacter;
-begin
- GetProcedureAddress(_ReadConsoleOutputCharacter, kernel32, 'ReadConsoleOutputCharacter' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ReadConsoleOutputCharacter]
- end;
-end;
-
-var
- _ReadConsoleOutputAttribute: Pointer;
-
-function ReadConsoleOutputAttribute;
-begin
- GetProcedureAddress(_ReadConsoleOutputAttribute, kernel32, 'ReadConsoleOutputAttribute');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ReadConsoleOutputAttribute]
- end;
-end;
-
-var
- _WriteConsoleOutputCharacterA: Pointer;
-
-function WriteConsoleOutputCharacterA;
-begin
- GetProcedureAddress(_WriteConsoleOutputCharacterA, kernel32, 'WriteConsoleOutputCharacterA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WriteConsoleOutputCharacterA]
- end;
-end;
-
-var
- _WriteConsoleOutputCharacterW: Pointer;
-
-function WriteConsoleOutputCharacterW;
-begin
- GetProcedureAddress(_WriteConsoleOutputCharacterW, kernel32, 'WriteConsoleOutputCharacterW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WriteConsoleOutputCharacterW]
- end;
-end;
-
-var
- _WriteConsoleOutputCharacter: Pointer;
-
-function WriteConsoleOutputCharacter;
-begin
- GetProcedureAddress(_WriteConsoleOutputCharacter, kernel32, 'WriteConsoleOutputCharacter' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WriteConsoleOutputCharacter]
- end;
-end;
-
-var
- _WriteConsoleOutputAttribute: Pointer;
-
-function WriteConsoleOutputAttribute;
-begin
- GetProcedureAddress(_WriteConsoleOutputAttribute, kernel32, 'WriteConsoleOutputAttribute');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WriteConsoleOutputAttribute]
- end;
-end;
-
-var
- _FillConsoleOutputCharacterA: Pointer;
-
-function FillConsoleOutputCharacterA;
-begin
- GetProcedureAddress(_FillConsoleOutputCharacterA, kernel32, 'FillConsoleOutputCharacterA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_FillConsoleOutputCharacterA]
- end;
-end;
-
-var
- _FillConsoleOutputCharacterW: Pointer;
-
-function FillConsoleOutputCharacterW;
-begin
- GetProcedureAddress(_FillConsoleOutputCharacterW, kernel32, 'FillConsoleOutputCharacterW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_FillConsoleOutputCharacterW]
- end;
-end;
-
-var
- _FillConsoleOutputCharacter: Pointer;
-
-function FillConsoleOutputCharacter;
-begin
- GetProcedureAddress(_FillConsoleOutputCharacter, kernel32, 'FillConsoleOutputCharacter' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_FillConsoleOutputCharacter]
- end;
-end;
-
-var
- _FillConsoleOutputAttribute: Pointer;
-
-function FillConsoleOutputAttribute;
-begin
- GetProcedureAddress(_FillConsoleOutputAttribute, kernel32, 'FillConsoleOutputAttribute');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_FillConsoleOutputAttribute]
- end;
-end;
-
-var
- _GetConsoleMode: Pointer;
-
-function GetConsoleMode;
-begin
- GetProcedureAddress(_GetConsoleMode, kernel32, 'GetConsoleMode');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetConsoleMode]
- end;
-end;
-
-var
- _GetNumberOfConsoleInputEvents: Pointer;
-
-function GetNumberOfConsoleInputEvents;
-begin
- GetProcedureAddress(_GetNumberOfConsoleInputEvents, kernel32, 'GetNumberOfConsoleInputEvents');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetNumberOfConsoleInputEvents]
- end;
-end;
-
-var
- _GetConsoleScreenBufferInfo: Pointer;
-
-function GetConsoleScreenBufferInfo;
-begin
- GetProcedureAddress(_GetConsoleScreenBufferInfo, kernel32, 'GetConsoleScreenBufferInfo');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetConsoleScreenBufferInfo]
- end;
-end;
-
-var
- _GetLargestConsoleWindowSize: Pointer;
-
-function GetLargestConsoleWindowSize;
-begin
- GetProcedureAddress(_GetLargestConsoleWindowSize, kernel32, 'GetLargestConsoleWindowSize');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetLargestConsoleWindowSize]
- end;
-end;
-
-var
- _GetConsoleCursorInfo: Pointer;
-
-function GetConsoleCursorInfo;
-begin
- GetProcedureAddress(_GetConsoleCursorInfo, kernel32, 'GetConsoleCursorInfo');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetConsoleCursorInfo]
- end;
-end;
-
-var
- _GetCurrentConsoleFont: Pointer;
-
-function GetCurrentConsoleFont;
-begin
- GetProcedureAddress(_GetCurrentConsoleFont, kernel32, 'GetCurrentConsoleFont');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetCurrentConsoleFont]
- end;
-end;
-
-var
- _GetConsoleFontSize: Pointer;
-
-function GetConsoleFontSize;
-begin
- GetProcedureAddress(_GetConsoleFontSize, kernel32, 'GetConsoleFontSize');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetConsoleFontSize]
- end;
-end;
-
-var
- _GetConsoleSelectionInfo: Pointer;
-
-function GetConsoleSelectionInfo;
-begin
- GetProcedureAddress(_GetConsoleSelectionInfo, kernel32, 'GetConsoleSelectionInfo');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetConsoleSelectionInfo]
- end;
-end;
-
-var
- _GetNumberOfConsoleMouseButtons: Pointer;
-
-function GetNumberOfConsoleMouseButtons;
-begin
- GetProcedureAddress(_GetNumberOfConsoleMouseButtons, kernel32, 'GetNumberOfConsoleMouseButtons');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetNumberOfConsoleMouseButtons]
- end;
-end;
-
-var
- _SetConsoleMode: Pointer;
-
-function SetConsoleMode;
-begin
- GetProcedureAddress(_SetConsoleMode, kernel32, 'SetConsoleMode');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetConsoleMode]
- end;
-end;
-
-var
- _SetConsoleActiveScreenBuffer: Pointer;
-
-function SetConsoleActiveScreenBuffer;
-begin
- GetProcedureAddress(_SetConsoleActiveScreenBuffer, kernel32, 'SetConsoleActiveScreenBuffer');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetConsoleActiveScreenBuffer]
- end;
-end;
-
-var
- _FlushConsoleInputBuffer: Pointer;
-
-function FlushConsoleInputBuffer;
-begin
- GetProcedureAddress(_FlushConsoleInputBuffer, kernel32, 'FlushConsoleInputBuffer');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_FlushConsoleInputBuffer]
- end;
-end;
-
-var
- _SetConsoleScreenBufferSize: Pointer;
-
-function SetConsoleScreenBufferSize;
-begin
- GetProcedureAddress(_SetConsoleScreenBufferSize, kernel32, 'SetConsoleScreenBufferSize');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetConsoleScreenBufferSize]
- end;
-end;
-
-var
- _SetConsoleCursorPosition: Pointer;
-
-function SetConsoleCursorPosition;
-begin
- GetProcedureAddress(_SetConsoleCursorPosition, kernel32, 'SetConsoleCursorPosition');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetConsoleCursorPosition]
- end;
-end;
-
-var
- _SetConsoleCursorInfo: Pointer;
-
-function SetConsoleCursorInfo;
-begin
- GetProcedureAddress(_SetConsoleCursorInfo, kernel32, 'SetConsoleCursorInfo');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetConsoleCursorInfo]
- end;
-end;
-
-var
- _ScrollConsoleScreenBufferA: Pointer;
-
-function ScrollConsoleScreenBufferA;
-begin
- GetProcedureAddress(_ScrollConsoleScreenBufferA, kernel32, 'ScrollConsoleScreenBufferA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ScrollConsoleScreenBufferA]
- end;
-end;
-
-var
- _ScrollConsoleScreenBufferW: Pointer;
-
-function ScrollConsoleScreenBufferW;
-begin
- GetProcedureAddress(_ScrollConsoleScreenBufferW, kernel32, 'ScrollConsoleScreenBufferW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ScrollConsoleScreenBufferW]
- end;
-end;
-
-var
- _ScrollConsoleScreenBuffer: Pointer;
-
-function ScrollConsoleScreenBuffer;
-begin
- GetProcedureAddress(_ScrollConsoleScreenBuffer, kernel32, 'ScrollConsoleScreenBuffer' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ScrollConsoleScreenBuffer]
- end;
-end;
-
-var
- _SetConsoleWindowInfo: Pointer;
-
-function SetConsoleWindowInfo;
-begin
- GetProcedureAddress(_SetConsoleWindowInfo, kernel32, 'SetConsoleWindowInfo');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetConsoleWindowInfo]
- end;
-end;
-
-var
- _SetConsoleTextAttribute: Pointer;
-
-function SetConsoleTextAttribute;
-begin
- GetProcedureAddress(_SetConsoleTextAttribute, kernel32, 'SetConsoleTextAttribute');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetConsoleTextAttribute]
- end;
-end;
-
-var
- _SetConsoleCtrlHandler: Pointer;
-
-function SetConsoleCtrlHandler;
-begin
- GetProcedureAddress(_SetConsoleCtrlHandler, kernel32, 'SetConsoleCtrlHandler');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetConsoleCtrlHandler]
- end;
-end;
-
-var
- _GenerateConsoleCtrlEvent: Pointer;
-
-function GenerateConsoleCtrlEvent;
-begin
- GetProcedureAddress(_GenerateConsoleCtrlEvent, kernel32, 'GenerateConsoleCtrlEvent');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GenerateConsoleCtrlEvent]
- end;
-end;
-
-var
- _AllocConsole: Pointer;
-
-function AllocConsole;
-begin
- GetProcedureAddress(_AllocConsole, kernel32, 'AllocConsole');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_AllocConsole]
- end;
-end;
-
-var
- _FreeConsole: Pointer;
-
-function FreeConsole;
-begin
- GetProcedureAddress(_FreeConsole, kernel32, 'FreeConsole');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_FreeConsole]
- end;
-end;
-
-var
- _AttachConsole: Pointer;
-
-function AttachConsole;
-begin
- GetProcedureAddress(_AttachConsole, kernel32, 'AttachConsole');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_AttachConsole]
- end;
-end;
-
-var
- _GetConsoleTitleA: Pointer;
-
-function GetConsoleTitleA;
-begin
- GetProcedureAddress(_GetConsoleTitleA, kernel32, 'GetConsoleTitleA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetConsoleTitleA]
- end;
-end;
-
-var
- _GetConsoleTitleW: Pointer;
-
-function GetConsoleTitleW;
-begin
- GetProcedureAddress(_GetConsoleTitleW, kernel32, 'GetConsoleTitleW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetConsoleTitleW]
- end;
-end;
-
-var
- _GetConsoleTitle: Pointer;
-
-function GetConsoleTitle;
-begin
- GetProcedureAddress(_GetConsoleTitle, kernel32, 'GetConsoleTitle' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetConsoleTitle]
- end;
-end;
-
-var
- _SetConsoleTitleA: Pointer;
-
-function SetConsoleTitleA;
-begin
- GetProcedureAddress(_SetConsoleTitleA, kernel32, 'SetConsoleTitleA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetConsoleTitleA]
- end;
-end;
-
-var
- _SetConsoleTitleW: Pointer;
-
-function SetConsoleTitleW;
-begin
- GetProcedureAddress(_SetConsoleTitleW, kernel32, 'SetConsoleTitleW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetConsoleTitleW]
- end;
-end;
-
-var
- _SetConsoleTitle: Pointer;
-
-function SetConsoleTitle;
-begin
- GetProcedureAddress(_SetConsoleTitle, kernel32, 'SetConsoleTitle' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetConsoleTitle]
- end;
-end;
-
-var
- _ReadConsoleA: Pointer;
-
-function ReadConsoleA;
-begin
- GetProcedureAddress(_ReadConsoleA, kernel32, 'ReadConsoleA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ReadConsoleA]
- end;
-end;
-
-var
- _ReadConsoleW: Pointer;
-
-function ReadConsoleW;
-begin
- GetProcedureAddress(_ReadConsoleW, kernel32, 'ReadConsoleW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ReadConsoleW]
- end;
-end;
-
-var
- _ReadConsole: Pointer;
-
-function ReadConsole;
-begin
- GetProcedureAddress(_ReadConsole, kernel32, 'ReadConsole' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ReadConsole]
- end;
-end;
-
-var
- _WriteConsoleA: Pointer;
-
-function WriteConsoleA;
-begin
- GetProcedureAddress(_WriteConsoleA, kernel32, 'WriteConsoleA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WriteConsoleA]
- end;
-end;
-
-var
- _WriteConsoleW: Pointer;
-
-function WriteConsoleW;
-begin
- GetProcedureAddress(_WriteConsoleW, kernel32, 'WriteConsoleW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WriteConsoleW]
- end;
-end;
-
-var
- _WriteConsole: Pointer;
-
-function WriteConsole;
-begin
- GetProcedureAddress(_WriteConsole, kernel32, 'WriteConsole' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WriteConsole]
- end;
-end;
-
-var
- _CreateConsoleScreenBuffer: Pointer;
-
-function CreateConsoleScreenBuffer;
-begin
- GetProcedureAddress(_CreateConsoleScreenBuffer, kernel32, 'CreateConsoleScreenBuffer');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreateConsoleScreenBuffer]
- end;
-end;
-
-var
- _GetConsoleCP: Pointer;
-
-function GetConsoleCP;
-begin
- GetProcedureAddress(_GetConsoleCP, kernel32, 'GetConsoleCP');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetConsoleCP]
- end;
-end;
-
-var
- _SetConsoleCP: Pointer;
-
-function SetConsoleCP;
-begin
- GetProcedureAddress(_SetConsoleCP, kernel32, 'SetConsoleCP');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetConsoleCP]
- end;
-end;
-
-var
- _GetConsoleOutputCP: Pointer;
-
-function GetConsoleOutputCP;
-begin
- GetProcedureAddress(_GetConsoleOutputCP, kernel32, 'GetConsoleOutputCP');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetConsoleOutputCP]
- end;
-end;
-
-var
- _SetConsoleOutputCP: Pointer;
-
-function SetConsoleOutputCP;
-begin
- GetProcedureAddress(_SetConsoleOutputCP, kernel32, 'SetConsoleOutputCP');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetConsoleOutputCP]
- end;
-end;
-
-var
- _GetConsoleDisplayMode: Pointer;
-
-function GetConsoleDisplayMode;
-begin
- GetProcedureAddress(_GetConsoleDisplayMode, kernel32, 'GetConsoleDisplayMode');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetConsoleDisplayMode]
- end;
-end;
-
-var
- _GetConsoleWindow: Pointer;
-
-function GetConsoleWindow;
-begin
- GetProcedureAddress(_GetConsoleWindow, kernel32, 'GetConsoleWindow');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetConsoleWindow]
- end;
-end;
-
-var
- _GetConsoleProcessList: Pointer;
-
-function GetConsoleProcessList;
-begin
- GetProcedureAddress(_GetConsoleProcessList, kernel32, 'GetConsoleProcessList');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetConsoleProcessList]
- end;
-end;
-
-var
- _AddConsoleAliasA: Pointer;
-
-function AddConsoleAliasA;
-begin
- GetProcedureAddress(_AddConsoleAliasA, kernel32, 'AddConsoleAliasA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_AddConsoleAliasA]
- end;
-end;
-
-var
- _AddConsoleAliasW: Pointer;
-
-function AddConsoleAliasW;
-begin
- GetProcedureAddress(_AddConsoleAliasW, kernel32, 'AddConsoleAliasW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_AddConsoleAliasW]
- end;
-end;
-
-var
- _AddConsoleAlias: Pointer;
-
-function AddConsoleAlias;
-begin
- GetProcedureAddress(_AddConsoleAlias, kernel32, 'AddConsoleAlias' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_AddConsoleAlias]
- end;
-end;
-
-var
- _GetConsoleAliasA: Pointer;
-
-function GetConsoleAliasA;
-begin
- GetProcedureAddress(_GetConsoleAliasA, kernel32, 'GetConsoleAliasA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetConsoleAliasA]
- end;
-end;
-
-var
- _GetConsoleAliasW: Pointer;
-
-function GetConsoleAliasW;
-begin
- GetProcedureAddress(_GetConsoleAliasW, kernel32, 'GetConsoleAliasW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetConsoleAliasW]
- end;
-end;
-
-var
- _GetConsoleAlias: Pointer;
-
-function GetConsoleAlias;
-begin
- GetProcedureAddress(_GetConsoleAlias, kernel32, 'GetConsoleAlias' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetConsoleAlias]
- end;
-end;
-
-var
- _GetConsoleAliasesLengthA: Pointer;
-
-function GetConsoleAliasesLengthA;
-begin
- GetProcedureAddress(_GetConsoleAliasesLengthA, kernel32, 'GetConsoleAliasesLengthA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetConsoleAliasesLengthA]
- end;
-end;
-
-var
- _GetConsoleAliasesLengthW: Pointer;
-
-function GetConsoleAliasesLengthW;
-begin
- GetProcedureAddress(_GetConsoleAliasesLengthW, kernel32, 'GetConsoleAliasesLengthW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetConsoleAliasesLengthW]
- end;
-end;
-
-var
- _GetConsoleAliasesLength: Pointer;
-
-function GetConsoleAliasesLength;
-begin
- GetProcedureAddress(_GetConsoleAliasesLength, kernel32, 'GetConsoleAliasesLength' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetConsoleAliasesLength]
- end;
-end;
-
-var
- _GetConsoleAliasExesLengthA: Pointer;
-
-function GetConsoleAliasExesLengthA;
-begin
- GetProcedureAddress(_GetConsoleAliasExesLengthA, kernel32, 'GetConsoleAliasExesLengthA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetConsoleAliasExesLengthA]
- end;
-end;
-
-var
- _GetConsoleAliasExesLengthW: Pointer;
-
-function GetConsoleAliasExesLengthW;
-begin
- GetProcedureAddress(_GetConsoleAliasExesLengthW, kernel32, 'GetConsoleAliasExesLengthW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetConsoleAliasExesLengthW]
- end;
-end;
-
-var
- _GetConsoleAliasExesLength: Pointer;
-
-function GetConsoleAliasExesLength;
-begin
- GetProcedureAddress(_GetConsoleAliasExesLength, kernel32, 'GetConsoleAliasExesLength' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetConsoleAliasExesLength]
- end;
-end;
-
-var
- _GetConsoleAliasesA: Pointer;
-
-function GetConsoleAliasesA;
-begin
- GetProcedureAddress(_GetConsoleAliasesA, kernel32, 'GetConsoleAliasesA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetConsoleAliasesA]
- end;
-end;
-
-var
- _GetConsoleAliasesW: Pointer;
-
-function GetConsoleAliasesW;
-begin
- GetProcedureAddress(_GetConsoleAliasesW, kernel32, 'GetConsoleAliasesW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetConsoleAliasesW]
- end;
-end;
-
-var
- _GetConsoleAliases: Pointer;
-
-function GetConsoleAliases;
-begin
- GetProcedureAddress(_GetConsoleAliases, kernel32, 'GetConsoleAliases' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetConsoleAliases]
- end;
-end;
-
-var
- _GetConsoleAliasExesA: Pointer;
-
-function GetConsoleAliasExesA;
-begin
- GetProcedureAddress(_GetConsoleAliasExesA, kernel32, 'GetConsoleAliasExesA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetConsoleAliasExesA]
- end;
-end;
-
-var
- _GetConsoleAliasExesW: Pointer;
-
-function GetConsoleAliasExesW;
-begin
- GetProcedureAddress(_GetConsoleAliasExesW, kernel32, 'GetConsoleAliasExesW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetConsoleAliasExesW]
- end;
-end;
-
-var
- _GetConsoleAliasExes: Pointer;
-
-function GetConsoleAliasExes;
-begin
- GetProcedureAddress(_GetConsoleAliasExes, kernel32, 'GetConsoleAliasExes' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetConsoleAliasExes]
- end;
-end;
-
-{$ELSE}
-
-function PeekConsoleInputA; external kernel32 name 'PeekConsoleInputA';
-function PeekConsoleInputW; external kernel32 name 'PeekConsoleInputW';
-function PeekConsoleInput; external kernel32 name 'PeekConsoleInput' + AWSuffix;
-function ReadConsoleInputA; external kernel32 name 'ReadConsoleInputA';
-function ReadConsoleInputW; external kernel32 name 'ReadConsoleInputW';
-function ReadConsoleInput; external kernel32 name 'ReadConsoleInput' + AWSuffix;
-function WriteConsoleInputA; external kernel32 name 'WriteConsoleInputA';
-function WriteConsoleInputW; external kernel32 name 'WriteConsoleInputW';
-function WriteConsoleInput; external kernel32 name 'WriteConsoleInput' + AWSuffix;
-function ReadConsoleOutputA; external kernel32 name 'ReadConsoleOutputA';
-function ReadConsoleOutputW; external kernel32 name 'ReadConsoleOutputW';
-function ReadConsoleOutput; external kernel32 name 'ReadConsoleOutput' + AWSuffix;
-function WriteConsoleOutputA; external kernel32 name 'WriteConsoleOutputA';
-function WriteConsoleOutputW; external kernel32 name 'WriteConsoleOutputW';
-function WriteConsoleOutput; external kernel32 name 'WriteConsoleOutput' + AWSuffix;
-function ReadConsoleOutputCharacterA; external kernel32 name 'ReadConsoleOutputCharacterA';
-function ReadConsoleOutputCharacterW; external kernel32 name 'ReadConsoleOutputCharacterW';
-function ReadConsoleOutputCharacter; external kernel32 name 'ReadConsoleOutputCharacter' + AWSuffix;
-function ReadConsoleOutputAttribute; external kernel32 name 'ReadConsoleOutputAttribute';
-function WriteConsoleOutputCharacterA; external kernel32 name 'WriteConsoleOutputCharacterA';
-function WriteConsoleOutputCharacterW; external kernel32 name 'WriteConsoleOutputCharacterW';
-function WriteConsoleOutputCharacter; external kernel32 name 'WriteConsoleOutputCharacter' + AWSuffix;
-function WriteConsoleOutputAttribute; external kernel32 name 'WriteConsoleOutputAttribute';
-function FillConsoleOutputCharacterA; external kernel32 name 'FillConsoleOutputCharacterA';
-function FillConsoleOutputCharacterW; external kernel32 name 'FillConsoleOutputCharacterW';
-function FillConsoleOutputCharacter; external kernel32 name 'FillConsoleOutputCharacter' + AWSuffix;
-function FillConsoleOutputAttribute; external kernel32 name 'FillConsoleOutputAttribute';
-function GetConsoleMode; external kernel32 name 'GetConsoleMode';
-function GetNumberOfConsoleInputEvents; external kernel32 name 'GetNumberOfConsoleInputEvents';
-function GetConsoleScreenBufferInfo; external kernel32 name 'GetConsoleScreenBufferInfo';
-function GetLargestConsoleWindowSize; external kernel32 name 'GetLargestConsoleWindowSize';
-function GetConsoleCursorInfo; external kernel32 name 'GetConsoleCursorInfo';
-function GetCurrentConsoleFont; external kernel32 name 'GetCurrentConsoleFont';
-function GetConsoleFontSize; external kernel32 name 'GetConsoleFontSize';
-function GetConsoleSelectionInfo; external kernel32 name 'GetConsoleSelectionInfo';
-function GetNumberOfConsoleMouseButtons; external kernel32 name 'GetNumberOfConsoleMouseButtons';
-function SetConsoleMode; external kernel32 name 'SetConsoleMode';
-function SetConsoleActiveScreenBuffer; external kernel32 name 'SetConsoleActiveScreenBuffer';
-function FlushConsoleInputBuffer; external kernel32 name 'FlushConsoleInputBuffer';
-function SetConsoleScreenBufferSize; external kernel32 name 'SetConsoleScreenBufferSize';
-function SetConsoleCursorPosition; external kernel32 name 'SetConsoleCursorPosition';
-function SetConsoleCursorInfo; external kernel32 name 'SetConsoleCursorInfo';
-function ScrollConsoleScreenBufferA; external kernel32 name 'ScrollConsoleScreenBufferA';
-function ScrollConsoleScreenBufferW; external kernel32 name 'ScrollConsoleScreenBufferW';
-function ScrollConsoleScreenBuffer; external kernel32 name 'ScrollConsoleScreenBuffer' + AWSuffix;
-function SetConsoleWindowInfo; external kernel32 name 'SetConsoleWindowInfo';
-function SetConsoleTextAttribute; external kernel32 name 'SetConsoleTextAttribute';
-function SetConsoleCtrlHandler; external kernel32 name 'SetConsoleCtrlHandler';
-function GenerateConsoleCtrlEvent; external kernel32 name 'GenerateConsoleCtrlEvent';
-function AllocConsole; external kernel32 name 'AllocConsole';
-function FreeConsole; external kernel32 name 'FreeConsole';
-function AttachConsole; external kernel32 name 'AttachConsole';
-function GetConsoleTitleA; external kernel32 name 'GetConsoleTitleA';
-function GetConsoleTitleW; external kernel32 name 'GetConsoleTitleW';
-function GetConsoleTitle; external kernel32 name 'GetConsoleTitle' + AWSuffix;
-function SetConsoleTitleA; external kernel32 name 'SetConsoleTitleA';
-function SetConsoleTitleW; external kernel32 name 'SetConsoleTitleW';
-function SetConsoleTitle; external kernel32 name 'SetConsoleTitle' + AWSuffix;
-function ReadConsoleA; external kernel32 name 'ReadConsoleA';
-function ReadConsoleW; external kernel32 name 'ReadConsoleW';
-function ReadConsole; external kernel32 name 'ReadConsole' + AWSuffix;
-function WriteConsoleA; external kernel32 name 'WriteConsoleA';
-function WriteConsoleW; external kernel32 name 'WriteConsoleW';
-function WriteConsole; external kernel32 name 'WriteConsole' + AWSuffix;
-function CreateConsoleScreenBuffer; external kernel32 name 'CreateConsoleScreenBuffer';
-function GetConsoleCP; external kernel32 name 'GetConsoleCP';
-function SetConsoleCP; external kernel32 name 'SetConsoleCP';
-function GetConsoleOutputCP; external kernel32 name 'GetConsoleOutputCP';
-function SetConsoleOutputCP; external kernel32 name 'SetConsoleOutputCP';
-function GetConsoleDisplayMode; external kernel32 name 'GetConsoleDisplayMode';
-function GetConsoleWindow; external kernel32 name 'GetConsoleWindow';
-function GetConsoleProcessList; external kernel32 name 'GetConsoleProcessList';
-function AddConsoleAliasA; external kernel32 name 'AddConsoleAliasA';
-function AddConsoleAliasW; external kernel32 name 'AddConsoleAliasW';
-function AddConsoleAlias; external kernel32 name 'AddConsoleAlias' + AWSuffix;
-function GetConsoleAliasA; external kernel32 name 'GetConsoleAliasA';
-function GetConsoleAliasW; external kernel32 name 'GetConsoleAliasW';
-function GetConsoleAlias; external kernel32 name 'GetConsoleAlias' + AWSuffix;
-function GetConsoleAliasesLengthA; external kernel32 name 'GetConsoleAliasesLengthA';
-function GetConsoleAliasesLengthW; external kernel32 name 'GetConsoleAliasesLengthW';
-function GetConsoleAliasesLength; external kernel32 name 'GetConsoleAliasesLength' + AWSuffix;
-function GetConsoleAliasExesLengthA; external kernel32 name 'GetConsoleAliasExesLengthA';
-function GetConsoleAliasExesLengthW; external kernel32 name 'GetConsoleAliasExesLengthW';
-function GetConsoleAliasExesLength; external kernel32 name 'GetConsoleAliasExesLength' + AWSuffix;
-function GetConsoleAliasesA; external kernel32 name 'GetConsoleAliasesA';
-function GetConsoleAliasesW; external kernel32 name 'GetConsoleAliasesW';
-function GetConsoleAliases; external kernel32 name 'GetConsoleAliases' + AWSuffix;
-function GetConsoleAliasExesA; external kernel32 name 'GetConsoleAliasExesA';
-function GetConsoleAliasExesW; external kernel32 name 'GetConsoleAliasExesW';
-function GetConsoleAliasExes; external kernel32 name 'GetConsoleAliasExes' + AWSuffix;
-
-{$ENDIF DYNAMIC_LINK}
-
-end.
+{******************************************************************************}
+{ }
+{ Console Applications API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: wincon.h, released June 2000. The original Pascal }
+{ code is: WinCon.pas, released December 2000. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwawincon.pas,v 1.1 2005/04/04 07:56:11 marco Exp $
+
+unit JwaWinCon;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "WinCon.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaWinBase, JwaWinType;
+
+type
+ PCOORD = ^COORD;
+ {$EXTERNALSYM PCOORD}
+ _COORD = record
+ X: SHORT;
+ Y: SHORT;
+ end;
+ {$EXTERNALSYM _COORD}
+ COORD = _COORD;
+ {$EXTERNALSYM COORD}
+ TCoord = _COORD;
+
+ PSMALL_RECT = ^SMALL_RECT;
+ {$EXTERNALSYM PSMALL_RECT}
+ _SMALL_RECT = record
+ Left: SHORT;
+ Top: SHORT;
+ Right: SHORT;
+ Bottom: SHORT;
+ end;
+ {$EXTERNALSYM _SMALL_RECT}
+ SMALL_RECT = _SMALL_RECT;
+ {$EXTERNALSYM SMALL_RECT}
+ TSmallRect = SMALL_RECT;
+ PSmallRect = PSMALL_RECT;
+
+ TCharUnion = record
+ case Integer of
+ 0: (UnicodeChar: WCHAR);
+ 1: (AsciiChar: CHAR);
+ end;
+
+ PKEY_EVENT_RECORD = ^KEY_EVENT_RECORD;
+ {$EXTERNALSYM PKEY_EVENT_RECORD}
+ _KEY_EVENT_RECORD = record
+ bKeyDown: BOOL;
+ wRepeatCount: WORD;
+ wVirtualKeyCode: WORD;
+ wVirtualScanCode: WORD;
+ uChar: TCharUnion;
+ dwControlKeyState: DWORD;
+ end;
+ {$EXTERNALSYM _KEY_EVENT_RECORD}
+ KEY_EVENT_RECORD = _KEY_EVENT_RECORD;
+ {$EXTERNALSYM KEY_EVENT_RECORD}
+ TKeyEventRecord = KEY_EVENT_RECORD;
+ PKeyEventRecord = PKEY_EVENT_RECORD;
+
+//
+// ControlKeyState flags
+//
+
+const
+ RIGHT_ALT_PRESSED = $0001; // the right alt key is pressed.
+ {$EXTERNALSYM RIGHT_ALT_PRESSED}
+ LEFT_ALT_PRESSED = $0002; // the left alt key is pressed.
+ {$EXTERNALSYM LEFT_ALT_PRESSED}
+ RIGHT_CTRL_PRESSED = $0004; // the right ctrl key is pressed.
+ {$EXTERNALSYM RIGHT_CTRL_PRESSED}
+ LEFT_CTRL_PRESSED = $0008; // the left ctrl key is pressed.
+ {$EXTERNALSYM LEFT_CTRL_PRESSED}
+ SHIFT_PRESSED = $0010; // the shift key is pressed.
+ {$EXTERNALSYM SHIFT_PRESSED}
+ NUMLOCK_ON = $0020; // the numlock light is on.
+ {$EXTERNALSYM NUMLOCK_ON}
+ SCROLLLOCK_ON = $0040; // the scrolllock light is on.
+ {$EXTERNALSYM SCROLLLOCK_ON}
+ CAPSLOCK_ON = $0080; // the capslock light is on.
+ {$EXTERNALSYM CAPSLOCK_ON}
+ ENHANCED_KEY = $0100; // the key is enhanced.
+ {$EXTERNALSYM ENHANCED_KEY}
+ NLS_DBCSCHAR = $00010000; // DBCS for JPN: SBCS/DBCS mode.
+ {$EXTERNALSYM NLS_DBCSCHAR}
+ NLS_ALPHANUMERIC = $00000000; // DBCS for JPN: Alphanumeric mode.
+ {$EXTERNALSYM NLS_ALPHANUMERIC}
+ NLS_KATAKANA = $00020000; // DBCS for JPN: Katakana mode.
+ {$EXTERNALSYM NLS_KATAKANA}
+ NLS_HIRAGANA = $00040000; // DBCS for JPN: Hiragana mode.
+ {$EXTERNALSYM NLS_HIRAGANA}
+ NLS_ROMAN = $00400000; // DBCS for JPN: Roman/Noroman mode.
+ {$EXTERNALSYM NLS_ROMAN}
+ NLS_IME_CONVERSION = $00800000; // DBCS for JPN: IME conversion.
+ {$EXTERNALSYM NLS_IME_CONVERSION}
+ NLS_IME_DISABLE = $20000000; // DBCS for JPN: IME enable/disable.
+ {$EXTERNALSYM NLS_IME_DISABLE}
+
+type
+ PMOUSE_EVENT_RECORD = ^MOUSE_EVENT_RECORD;
+ {$EXTERNALSYM PMOUSE_EVENT_RECORD}
+ _MOUSE_EVENT_RECORD = record
+ dwMousePosition: COORD;
+ dwButtonState: DWORD;
+ dwControlKeyState: DWORD;
+ dwEventFlags: DWORD;
+ end;
+ {$EXTERNALSYM _MOUSE_EVENT_RECORD}
+ MOUSE_EVENT_RECORD = _MOUSE_EVENT_RECORD;
+ {$EXTERNALSYM MOUSE_EVENT_RECORD}
+ TMouseEventRecord = MOUSE_EVENT_RECORD;
+ PMouseEventRecord = PMOUSE_EVENT_RECORD;
+
+//
+// ButtonState flags
+//
+
+const
+ FROM_LEFT_1ST_BUTTON_PRESSED = $0001;
+ {$EXTERNALSYM FROM_LEFT_1ST_BUTTON_PRESSED}
+ RIGHTMOST_BUTTON_PRESSED = $0002;
+ {$EXTERNALSYM RIGHTMOST_BUTTON_PRESSED}
+ FROM_LEFT_2ND_BUTTON_PRESSED = $0004;
+ {$EXTERNALSYM FROM_LEFT_2ND_BUTTON_PRESSED}
+ FROM_LEFT_3RD_BUTTON_PRESSED = $0008;
+ {$EXTERNALSYM FROM_LEFT_3RD_BUTTON_PRESSED}
+ FROM_LEFT_4TH_BUTTON_PRESSED = $0010;
+ {$EXTERNALSYM FROM_LEFT_4TH_BUTTON_PRESSED}
+
+//
+// EventFlags
+//
+
+ MOUSE_MOVED = $0001;
+ {$EXTERNALSYM MOUSE_MOVED}
+ DOUBLE_CLICK = $0002;
+ {$EXTERNALSYM DOUBLE_CLICK}
+ MOUSE_WHEELED = $0004;
+ {$EXTERNALSYM MOUSE_WHEELED}
+
+type
+ PWINDOW_BUFFER_SIZE_RECORD = ^WINDOW_BUFFER_SIZE_RECORD;
+ {$EXTERNALSYM PWINDOW_BUFFER_SIZE_RECORD}
+ _WINDOW_BUFFER_SIZE_RECORD = record
+ dwSize: COORD;
+ end;
+ {$EXTERNALSYM _WINDOW_BUFFER_SIZE_RECORD}
+ WINDOW_BUFFER_SIZE_RECORD = _WINDOW_BUFFER_SIZE_RECORD;
+ {$EXTERNALSYM WINDOW_BUFFER_SIZE_RECORD}
+ TWindowBufferSizeRecord = WINDOW_BUFFER_SIZE_RECORD;
+ PWindowBufferSizeRecord = PWINDOW_BUFFER_SIZE_RECORD;
+
+ PMENU_EVENT_RECORD = ^MENU_EVENT_RECORD;
+ {$EXTERNALSYM PMENU_EVENT_RECORD}
+ _MENU_EVENT_RECORD = record
+ dwCommandId: UINT;
+ end;
+ {$EXTERNALSYM _MENU_EVENT_RECORD}
+ MENU_EVENT_RECORD = _MENU_EVENT_RECORD;
+ {$EXTERNALSYM MENU_EVENT_RECORD}
+ TMenuEventRecord = MENU_EVENT_RECORD;
+ PMenuEventRecord = PMENU_EVENT_RECORD;
+
+ PFOCUS_EVENT_RECORD = ^FOCUS_EVENT_RECORD;
+ {$EXTERNALSYM PFOCUS_EVENT_RECORD}
+ _FOCUS_EVENT_RECORD = record
+ bSetFocus: BOOL;
+ end;
+ {$EXTERNALSYM _FOCUS_EVENT_RECORD}
+ FOCUS_EVENT_RECORD = _FOCUS_EVENT_RECORD;
+ {$EXTERNALSYM FOCUS_EVENT_RECORD}
+ TFocusEventRecord = FOCUS_EVENT_RECORD;
+ PFocusEventRecord = PFOCUS_EVENT_RECORD;
+
+ PINPUT_RECORD = ^INPUT_RECORD;
+ {$EXTERNALSYM PINPUT_RECORD}
+ _INPUT_RECORD = record
+ EventType: WORD;
+ case Integer of
+ 0: (KeyEvent: KEY_EVENT_RECORD);
+ 1: (MouseEvent: MOUSE_EVENT_RECORD);
+ 2: (WindowBufferSizeEvent: WINDOW_BUFFER_SIZE_RECORD);
+ 3: (MenuEvent: MENU_EVENT_RECORD);
+ 4: (FocusEvent: FOCUS_EVENT_RECORD);
+ end;
+ {$EXTERNALSYM _INPUT_RECORD}
+ INPUT_RECORD = _INPUT_RECORD;
+ {$EXTERNALSYM INPUT_RECORD}
+ TInputRecord = INPUT_RECORD;
+ PInputRecord = PINPUT_RECORD;
+
+//
+// EventType flags:
+//
+
+const
+ KEY_EVENT = $0001; // Event contains key event record
+ {$EXTERNALSYM KEY_EVENT}
+ MOUSE_EVENT = $0002; // Event contains mouse event record
+ {$EXTERNALSYM MOUSE_EVENT}
+ WINDOW_BUFFER_SIZE_EVENT = $0004; // Event contains window change event record
+ {$EXTERNALSYM WINDOW_BUFFER_SIZE_EVENT}
+ MENU_EVENT = $0008; // Event contains menu event record
+ {$EXTERNALSYM MENU_EVENT}
+ FOCUS_EVENT = $0010; // event contains focus change
+ {$EXTERNALSYM FOCUS_EVENT}
+
+type
+ PCHAR_INFO = ^CHAR_INFO;
+ {$EXTERNALSYM PCHAR_INFO}
+ _CHAR_INFO = record
+ uChar: TCharUnion;
+ Attributes: WORD;
+ end;
+ {$EXTERNALSYM _CHAR_INFO}
+ CHAR_INFO = _CHAR_INFO;
+ {$EXTERNALSYM CHAR_INFO}
+ TCharInfo = CHAR_INFO;
+ PCharInfo = PCHAR_INFO;
+
+//
+// Attributes flags:
+//
+
+const
+ FOREGROUND_BLUE = $0001; // text color contains blue.
+ {$EXTERNALSYM FOREGROUND_BLUE}
+ FOREGROUND_GREEN = $0002; // text color contains green.
+ {$EXTERNALSYM FOREGROUND_GREEN}
+ FOREGROUND_RED = $0004; // text color contains red.
+ {$EXTERNALSYM FOREGROUND_RED}
+ FOREGROUND_INTENSITY = $0008; // text color is intensified.
+ {$EXTERNALSYM FOREGROUND_INTENSITY}
+ BACKGROUND_BLUE = $0010; // background color contains blue.
+ {$EXTERNALSYM BACKGROUND_BLUE}
+ BACKGROUND_GREEN = $0020; // background color contains green.
+ {$EXTERNALSYM BACKGROUND_GREEN}
+ BACKGROUND_RED = $0040; // background color contains red.
+ {$EXTERNALSYM BACKGROUND_RED}
+ BACKGROUND_INTENSITY = $0080; // background color is intensified.
+ {$EXTERNALSYM BACKGROUND_INTENSITY}
+ COMMON_LVB_LEADING_BYTE = $0100; // Leading Byte of DBCS
+ {$EXTERNALSYM COMMON_LVB_LEADING_BYTE}
+ COMMON_LVB_TRAILING_BYTE = $0200; // Trailing Byte of DBCS
+ {$EXTERNALSYM COMMON_LVB_TRAILING_BYTE}
+ COMMON_LVB_GRID_HORIZONTAL = $0400; // DBCS: Grid attribute: top horizontal.
+ {$EXTERNALSYM COMMON_LVB_GRID_HORIZONTAL}
+ COMMON_LVB_GRID_LVERTICAL = $0800; // DBCS: Grid attribute: left vertical.
+ {$EXTERNALSYM COMMON_LVB_GRID_LVERTICAL}
+ COMMON_LVB_GRID_RVERTICAL = $1000; // DBCS: Grid attribute: right vertical.
+ {$EXTERNALSYM COMMON_LVB_GRID_RVERTICAL}
+ COMMON_LVB_REVERSE_VIDEO = $4000; // DBCS: Reverse fore/back ground attribute.
+ {$EXTERNALSYM COMMON_LVB_REVERSE_VIDEO}
+ COMMON_LVB_UNDERSCORE = $8000; // DBCS: Underscore.
+ {$EXTERNALSYM COMMON_LVB_UNDERSCORE}
+
+ COMMON_LVB_SBCSDBCS = $0300; // SBCS or DBCS flag.
+ {$EXTERNALSYM COMMON_LVB_SBCSDBCS}
+
+type
+ PCONSOLE_SCREEN_BUFFER_INFO = ^CONSOLE_SCREEN_BUFFER_INFO;
+ {$EXTERNALSYM PCONSOLE_SCREEN_BUFFER_INFO}
+ _CONSOLE_SCREEN_BUFFER_INFO = record
+ dwSize: COORD;
+ dwCursorPosition: COORD;
+ wAttributes: WORD;
+ srWindow: SMALL_RECT;
+ dwMaximumWindowSize: COORD;
+ end;
+ {$EXTERNALSYM _CONSOLE_SCREEN_BUFFER_INFO}
+ CONSOLE_SCREEN_BUFFER_INFO = _CONSOLE_SCREEN_BUFFER_INFO;
+ {$EXTERNALSYM CONSOLE_SCREEN_BUFFER_INFO}
+ TConsoleScreenBufferInfo = CONSOLE_SCREEN_BUFFER_INFO;
+ PConsoleScreenBufferInfo = PCONSOLE_SCREEN_BUFFER_INFO;
+
+ PCONSOLE_CURSOR_INFO = ^CONSOLE_CURSOR_INFO;
+ {$EXTERNALSYM PCONSOLE_CURSOR_INFO}
+ _CONSOLE_CURSOR_INFO = record
+ dwSize: DWORD;
+ bVisible: BOOL;
+ end;
+ {$EXTERNALSYM _CONSOLE_CURSOR_INFO}
+ CONSOLE_CURSOR_INFO = _CONSOLE_CURSOR_INFO;
+ {$EXTERNALSYM CONSOLE_CURSOR_INFO}
+ TConsoleCursorInfo = CONSOLE_CURSOR_INFO;
+ PConsoleCursorInfo = PCONSOLE_CURSOR_INFO;
+
+ _CONSOLE_FONT_INFO = record
+ nFont: DWORD;
+ dwFontSize: COORD;
+ end;
+ {$EXTERNALSYM _CONSOLE_FONT_INFO}
+ CONSOLE_FONT_INFO = _CONSOLE_FONT_INFO;
+ {$EXTERNALSYM CONSOLE_FONT_INFO}
+ PCONSOLE_FONT_INFO = ^CONSOLE_FONT_INFO;
+ {$EXTERNALSYM PCONSOLE_FONT_INFO}
+ TConsoleFontInfo = CONSOLE_FONT_INFO;
+ PConsoleFontInfo = PCONSOLE_FONT_INFO;
+
+ _CONSOLE_SELECTION_INFO = record
+ dwFlags: DWORD;
+ dwSelectionAnchor: COORD;
+ srSelection: SMALL_RECT;
+ end;
+ {$EXTERNALSYM _CONSOLE_SELECTION_INFO}
+ CONSOLE_SELECTION_INFO = _CONSOLE_SELECTION_INFO;
+ {$EXTERNALSYM CONSOLE_SELECTION_INFO}
+ PCONSOLE_SELECTION_INFO = ^CONSOLE_SELECTION_INFO;
+ {$EXTERNALSYM PCONSOLE_SELECTION_INFO}
+ TConsoleSelectionInfo = CONSOLE_SELECTION_INFO;
+ PConsoleSelectionInfo = PCONSOLE_SELECTION_INFO;
+
+//
+// Selection flags
+//
+
+const
+ CONSOLE_NO_SELECTION = $0000;
+ {$EXTERNALSYM CONSOLE_NO_SELECTION}
+ CONSOLE_SELECTION_IN_PROGRESS = $0001; // selection has begun
+ {$EXTERNALSYM CONSOLE_SELECTION_IN_PROGRESS}
+ CONSOLE_SELECTION_NOT_EMPTY = $0002; // non-null select rectangle
+ {$EXTERNALSYM CONSOLE_SELECTION_NOT_EMPTY}
+ CONSOLE_MOUSE_SELECTION = $0004; // selecting with mouse
+ {$EXTERNALSYM CONSOLE_MOUSE_SELECTION}
+ CONSOLE_MOUSE_DOWN = $0008; // mouse is down
+ {$EXTERNALSYM CONSOLE_MOUSE_DOWN}
+
+//
+// typedef for ctrl-c handler routines
+//
+
+type
+ PHANDLER_ROUTINE = function(CtrlType: DWORD): BOOL; stdcall;
+ {$EXTERNALSYM PHANDLER_ROUTINE}
+ THandlerRoutine = PHANDLER_ROUTINE;
+
+const
+ CTRL_C_EVENT = 0;
+ {$EXTERNALSYM CTRL_C_EVENT}
+ CTRL_BREAK_EVENT = 1;
+ {$EXTERNALSYM CTRL_BREAK_EVENT}
+ CTRL_CLOSE_EVENT = 2;
+ {$EXTERNALSYM CTRL_CLOSE_EVENT}
+ // 3 is reserved!
+ // 4 is reserved!
+ CTRL_LOGOFF_EVENT = 5;
+ {$EXTERNALSYM CTRL_LOGOFF_EVENT}
+ CTRL_SHUTDOWN_EVENT = 6;
+ {$EXTERNALSYM CTRL_SHUTDOWN_EVENT}
+
+//
+// Input Mode flags:
+//
+
+ ENABLE_PROCESSED_INPUT = $0001;
+ {$EXTERNALSYM ENABLE_PROCESSED_INPUT}
+ ENABLE_LINE_INPUT = $0002;
+ {$EXTERNALSYM ENABLE_LINE_INPUT}
+ ENABLE_ECHO_INPUT = $0004;
+ {$EXTERNALSYM ENABLE_ECHO_INPUT}
+ ENABLE_WINDOW_INPUT = $0008;
+ {$EXTERNALSYM ENABLE_WINDOW_INPUT}
+ ENABLE_MOUSE_INPUT = $0010;
+ {$EXTERNALSYM ENABLE_MOUSE_INPUT}
+
+//
+// Output Mode flags:
+//
+
+ ENABLE_PROCESSED_OUTPUT = $0001;
+ {$EXTERNALSYM ENABLE_PROCESSED_OUTPUT}
+ ENABLE_WRAP_AT_EOL_OUTPUT = $0002;
+ {$EXTERNALSYM ENABLE_WRAP_AT_EOL_OUTPUT}
+
+//
+// direct API definitions.
+//
+
+function PeekConsoleInputA(hConsoleInput: HANDLE; lpBuffer: PINPUT_RECORD;
+ nLength: DWORD; var lpNumberOfEventsRead: DWORD): BOOL; stdcall;
+{$EXTERNALSYM PeekConsoleInputA}
+function PeekConsoleInputW(hConsoleInput: HANDLE; lpBuffer: PINPUT_RECORD;
+ nLength: DWORD; var lpNumberOfEventsRead: DWORD): BOOL; stdcall;
+{$EXTERNALSYM PeekConsoleInputW}
+function PeekConsoleInput(hConsoleInput: HANDLE; lpBuffer: PINPUT_RECORD;
+ nLength: DWORD; var lpNumberOfEventsRead: DWORD): BOOL; stdcall;
+{$EXTERNALSYM PeekConsoleInput}
+
+function ReadConsoleInputA(hConsoleInput: HANDLE; lpBuffer: PINPUT_RECORD;
+ nLength: DWORD; var lpNumberOfEventsRead: DWORD): BOOL; stdcall;
+{$EXTERNALSYM ReadConsoleInputA}
+function ReadConsoleInputW(hConsoleInput: HANDLE; lpBuffer: PINPUT_RECORD;
+ nLength: DWORD; var lpNumberOfEventsRead: DWORD): BOOL; stdcall;
+{$EXTERNALSYM ReadConsoleInputW}
+function ReadConsoleInput(hConsoleInput: HANDLE; lpBuffer: PINPUT_RECORD;
+ nLength: DWORD; var lpNumberOfEventsRead: DWORD): BOOL; stdcall;
+{$EXTERNALSYM ReadConsoleInput}
+
+function WriteConsoleInputA(hConsoleInput: HANDLE; lpBuffer: PINPUT_RECORD;
+ nLength: DWORD; var lpNumberOfEventsWritten: DWORD): BOOL; stdcall;
+{$EXTERNALSYM WriteConsoleInputA}
+function WriteConsoleInputW(hConsoleInput: HANDLE; lpBuffer: PINPUT_RECORD;
+ nLength: DWORD; var lpNumberOfEventsWritten: DWORD): BOOL; stdcall;
+{$EXTERNALSYM WriteConsoleInputW}
+function WriteConsoleInput(hConsoleInput: HANDLE; lpBuffer: PINPUT_RECORD;
+ nLength: DWORD; var lpNumberOfEventsWritten: DWORD): BOOL; stdcall;
+{$EXTERNALSYM WriteConsoleInput}
+
+function ReadConsoleOutputA(hConsoleOutput: HANDLE; lpBuffer: PCHAR_INFO;
+ dwBufferSize: COORD; dwBufferCoord: COORD;
+ var lpReadRegion: SMALL_RECT): BOOL; stdcall;
+{$EXTERNALSYM ReadConsoleOutputA}
+function ReadConsoleOutputW(hConsoleOutput: HANDLE; lpBuffer: PCHAR_INFO;
+ dwBufferSize: COORD; dwBufferCoord: COORD;
+ var lpReadRegion: SMALL_RECT): BOOL; stdcall;
+{$EXTERNALSYM ReadConsoleOutputW}
+function ReadConsoleOutput(hConsoleOutput: HANDLE; lpBuffer: PCHAR_INFO;
+ dwBufferSize: COORD; dwBufferCoord: COORD;
+ var lpReadRegion: SMALL_RECT): BOOL; stdcall;
+{$EXTERNALSYM ReadConsoleOutput}
+
+function WriteConsoleOutputA(hConsoleOutput: HANDLE; lpBuffer: PCHAR_INFO;
+ dwBufferSize: COORD; dwBufferCoord: COORD;
+ var lpWriteRegion: SMALL_RECT): BOOL; stdcall;
+{$EXTERNALSYM WriteConsoleOutputA}
+function WriteConsoleOutputW(hConsoleOutput: HANDLE; lpBuffer: PCHAR_INFO;
+ dwBufferSize: COORD; dwBufferCoord: COORD;
+ var lpWriteRegion: SMALL_RECT): BOOL; stdcall;
+{$EXTERNALSYM WriteConsoleOutputW}
+function WriteConsoleOutput(hConsoleOutput: HANDLE; lpBuffer: PCHAR_INFO;
+ dwBufferSize: COORD; dwBufferCoord: COORD;
+ var lpWriteRegion: SMALL_RECT): BOOL; stdcall;
+{$EXTERNALSYM WriteConsoleOutput}
+
+function ReadConsoleOutputCharacterA(hConsoleOutput: HANDLE; lpCharacter: LPSTR;
+ nLength: DWORD; dwReadCoord: COORD; var lpNumberOfCharsRead: DWORD): BOOL; stdcall;
+{$EXTERNALSYM ReadConsoleOutputCharacterA}
+function ReadConsoleOutputCharacterW(hConsoleOutput: HANDLE; lpCharacter: LPWSTR;
+ nLength: DWORD; dwReadCoord: COORD; var lpNumberOfCharsRead: DWORD): BOOL; stdcall;
+{$EXTERNALSYM ReadConsoleOutputCharacterW}
+function ReadConsoleOutputCharacter(hConsoleOutput: HANDLE; lpCharacter: LPTSTR;
+ nLength: DWORD; dwReadCoord: COORD; var lpNumberOfCharsRead: DWORD): BOOL; stdcall;
+{$EXTERNALSYM ReadConsoleOutputCharacter}
+
+function ReadConsoleOutputAttribute(hConsoleOutput: HANDLE;
+ var lpAttribute: DWORD; nLength: DWORD; dwReadCoord: COORD;
+ var lpNumberOfAttrsRead: DWORD): BOOL; stdcall;
+{$EXTERNALSYM ReadConsoleOutputAttribute}
+
+function WriteConsoleOutputCharacterA(hConsoleOutput: HANDLE;
+ lpCharacter: LPCSTR; nLength: DWORD; dwWriteCoord: COORD;
+ var lpNumberOfCharsWritten: DWORD): BOOL; stdcall;
+{$EXTERNALSYM WriteConsoleOutputCharacterA}
+function WriteConsoleOutputCharacterW(hConsoleOutput: HANDLE;
+ lpCharacter: LPCWSTR; nLength: DWORD; dwWriteCoord: COORD;
+ var lpNumberOfCharsWritten: DWORD): BOOL; stdcall;
+{$EXTERNALSYM WriteConsoleOutputCharacterW}
+function WriteConsoleOutputCharacter(hConsoleOutput: HANDLE;
+ lpCharacter: LPCTSTR; nLength: DWORD; dwWriteCoord: COORD;
+ var lpNumberOfCharsWritten: DWORD): BOOL; stdcall;
+{$EXTERNALSYM WriteConsoleOutputCharacter}
+
+function WriteConsoleOutputAttribute(hConsoleOutput: HANDLE; lpAttribute: PWORD;
+ nLength: DWORD; dwWriteCoord: COORD; var lpNumberOfAttrsWritten: DWORD): BOOL; stdcall;
+{$EXTERNALSYM WriteConsoleOutputAttribute}
+
+function FillConsoleOutputCharacterA(hConsoleOutput: HANDLE; cCharacter: CHAR;
+ nLength: DWORD; dwWriteCoord: COORD; var lpNumberOfCharsWritten: DWORD): BOOL; stdcall;
+{$EXTERNALSYM FillConsoleOutputCharacterA}
+function FillConsoleOutputCharacterW(hConsoleOutput: HANDLE; cCharacter: WCHAR;
+ nLength: DWORD; dwWriteCoord: COORD; var lpNumberOfCharsWritten: DWORD): BOOL; stdcall;
+{$EXTERNALSYM FillConsoleOutputCharacterW}
+function FillConsoleOutputCharacter(hConsoleOutput: HANDLE; cCharacter: TCHAR;
+ nLength: DWORD; dwWriteCoord: COORD; var lpNumberOfCharsWritten: DWORD): BOOL; stdcall;
+{$EXTERNALSYM FillConsoleOutputCharacter}
+
+function FillConsoleOutputAttribute(hConsoleOutput: HANDLE; wAttribute: WORD;
+ nLength: DWORD; dwWriteCoord: COORD; var lpNumberOfAttrsWritten: DWORD): BOOL; stdcall;
+{$EXTERNALSYM FillConsoleOutputAttribute}
+function GetConsoleMode(hConsoleHandle: HANDLE; var lpMode: DWORD): BOOL; stdcall;
+{$EXTERNALSYM GetConsoleMode}
+function GetNumberOfConsoleInputEvents(hConsoleInput: HANDLE;
+ var lpNumberOfEvents: DWORD): BOOL; stdcall;
+{$EXTERNALSYM GetNumberOfConsoleInputEvents}
+function GetConsoleScreenBufferInfo(hConsoleOutput: HANDLE;
+ var lpConsoleScreenBufferInfo: CONSOLE_SCREEN_BUFFER_INFO): BOOL; stdcall;
+{$EXTERNALSYM GetConsoleScreenBufferInfo}
+function GetLargestConsoleWindowSize(hConsoleOutput: HANDLE): COORD; stdcall;
+{$EXTERNALSYM GetLargestConsoleWindowSize}
+function GetConsoleCursorInfo(hConsoleOutput: HANDLE;
+ var lpConsoleCursorInfo: CONSOLE_CURSOR_INFO): BOOL; stdcall;
+function GetCurrentConsoleFont(hConsoleOutput: HANDLE; bMaximumWindow: BOOL;
+ var lpConsoleCurrentFont: CONSOLE_FONT_INFO): BOOL; stdcall;
+{$EXTERNALSYM GetCurrentConsoleFont}
+function GetConsoleFontSize(hConsoleOutput: HANDLE; nFont: DWORD): COORD; stdcall;
+{$EXTERNALSYM GetConsoleFontSize}
+function GetConsoleSelectionInfo(var lpConsoleSelectionInfo: CONSOLE_SELECTION_INFO): BOOL; stdcall;
+{$EXTERNALSYM GetConsoleSelectionInfo}
+{$EXTERNALSYM GetConsoleCursorInfo}
+function GetNumberOfConsoleMouseButtons(var lpNumberOfMouseButtons: DWORD): BOOL; stdcall;
+{$EXTERNALSYM GetNumberOfConsoleMouseButtons}
+function SetConsoleMode(hConsoleHandle: HANDLE; dwMode: DWORD): BOOL; stdcall;
+{$EXTERNALSYM SetConsoleMode}
+function SetConsoleActiveScreenBuffer(hConsoleOutput: HANDLE): BOOL; stdcall;
+{$EXTERNALSYM SetConsoleActiveScreenBuffer}
+function FlushConsoleInputBuffer(hConsoleInput: HANDLE): BOOL; stdcall;
+{$EXTERNALSYM FlushConsoleInputBuffer}
+function SetConsoleScreenBufferSize(hConsoleOutput: HANDLE; dwSize: COORD): BOOL; stdcall;
+{$EXTERNALSYM SetConsoleScreenBufferSize}
+function SetConsoleCursorPosition(hConsoleOutput: HANDLE; dwCursorPosition: COORD): BOOL; stdcall;
+{$EXTERNALSYM SetConsoleCursorPosition}
+function SetConsoleCursorInfo(hConsoleOutput: HANDLE;
+ var lpConsoleCursorInfo: CONSOLE_CURSOR_INFO): BOOL; stdcall;
+{$EXTERNALSYM SetConsoleCursorInfo}
+
+function ScrollConsoleScreenBufferA(hConsoleOutput: HANDLE;
+ const lpScrollRectangle: SMALL_RECT; lpClipRectangle: PSMALL_RECT;
+ dwDestinationOrigin: COORD; const lpFill: CHAR_INFO): BOOL; stdcall;
+{$EXTERNALSYM ScrollConsoleScreenBufferA}
+function ScrollConsoleScreenBufferW(hConsoleOutput: HANDLE;
+ const lpScrollRectangle: PSMALL_RECT; lpClipRectangle: PSMALL_RECT;
+ dwDestinationOrigin: COORD; const lpFill: CHAR_INFO): BOOL; stdcall;
+{$EXTERNALSYM ScrollConsoleScreenBufferW}
+function ScrollConsoleScreenBuffer(hConsoleOutput: HANDLE;
+ const lpScrollRectangle: PSMALL_RECT; lpClipRectangle: PSMALL_RECT;
+ dwDestinationOrigin: COORD; const lpFill: CHAR_INFO): BOOL; stdcall;
+{$EXTERNALSYM ScrollConsoleScreenBuffer}
+
+function SetConsoleWindowInfo(hConsoleOutput: HANDLE; bAbsolute: BOOL;
+ const lpConsoleWindow: SMALL_RECT): BOOL; stdcall;
+{$EXTERNALSYM SetConsoleWindowInfo}
+function SetConsoleTextAttribute(hConsoleOutput: HANDLE; wAttributes: WORD): BOOL; stdcall;
+{$EXTERNALSYM SetConsoleTextAttribute}
+function SetConsoleCtrlHandler(HandlerRoutine: PHANDLER_ROUTINE; Add: BOOL): BOOL; stdcall;
+{$EXTERNALSYM SetConsoleCtrlHandler}
+function GenerateConsoleCtrlEvent(dwCtrlEvent: DWORD; dwProcessGroupId: DWORD): BOOL; stdcall;
+{$EXTERNALSYM GenerateConsoleCtrlEvent}
+function AllocConsole: BOOL; stdcall;
+{$EXTERNALSYM AllocConsole}
+function FreeConsole: BOOL; stdcall;
+{$EXTERNALSYM FreeConsole}
+function AttachConsole(dwProcessId: DWORD): BOOL; stdcall;
+{$EXTERNALSYM AttachConsole}
+
+const
+ ATTACH_PARENT_PROCESS = DWORD(-1);
+ {$EXTERNALSYM ATTACH_PARENT_PROCESS}
+
+function GetConsoleTitleA(lpConsoleTitle: LPSTR; nSize: DWORD): DWORD; stdcall;
+{$EXTERNALSYM GetConsoleTitleA}
+function GetConsoleTitleW(lpConsoleTitle: LPWSTR; nSize: DWORD): DWORD; stdcall;
+{$EXTERNALSYM GetConsoleTitleW}
+function GetConsoleTitle(lpConsoleTitle: LPTSTR; nSize: DWORD): DWORD; stdcall;
+{$EXTERNALSYM GetConsoleTitle}
+
+function SetConsoleTitleA(lpConsoleTitle: LPCSTR): BOOL; stdcall;
+{$EXTERNALSYM SetConsoleTitleA}
+function SetConsoleTitleW(lpConsoleTitle: LPCWSTR): BOOL; stdcall;
+{$EXTERNALSYM SetConsoleTitleW}
+function SetConsoleTitle(lpConsoleTitle: LPCTSTR): BOOL; stdcall;
+{$EXTERNALSYM SetConsoleTitle}
+
+function ReadConsoleA(hConsoleInput: HANDLE; lpBuffer: LPVOID;
+ nNumberOfCharsToRead: DWORD; var lpNumberOfCharsRead: DWORD;
+ lpReserved: LPVOID): BOOL; stdcall;
+{$EXTERNALSYM ReadConsoleA}
+function ReadConsoleW(hConsoleInput: HANDLE; lpBuffer: LPVOID;
+ nNumberOfCharsToRead: DWORD; var lpNumberOfCharsRead: DWORD;
+ lpReserved: LPVOID): BOOL; stdcall;
+{$EXTERNALSYM ReadConsoleW}
+function ReadConsole(hConsoleInput: HANDLE; lpBuffer: LPVOID;
+ nNumberOfCharsToRead: DWORD; var lpNumberOfCharsRead: DWORD;
+ lpReserved: LPVOID): BOOL; stdcall;
+{$EXTERNALSYM ReadConsole}
+
+function WriteConsoleA(hConsoleOutput: HANDLE; lpBuffer: LPVOID;
+ nNumberOfCharsToWrite: DWORD; var lpNumberOfCharsWritten: DWORD;
+ lpReserved: LPVOID): BOOL; stdcall;
+{$EXTERNALSYM WriteConsoleA}
+function WriteConsoleW(hConsoleOutput: HANDLE; lpBuffer: LPVOID;
+ nNumberOfCharsToWrite: DWORD; var lpNumberOfCharsWritten: DWORD;
+ lpReserved: LPVOID): BOOL; stdcall;
+{$EXTERNALSYM WriteConsoleW}
+function WriteConsole(hConsoleOutput: HANDLE; lpBuffer: LPVOID;
+ nNumberOfCharsToWrite: DWORD; var lpNumberOfCharsWritten: DWORD;
+ lpReserved: LPVOID): BOOL; stdcall;
+{$EXTERNALSYM WriteConsole}
+
+const
+ CONSOLE_TEXTMODE_BUFFER = 1;
+ {$EXTERNALSYM CONSOLE_TEXTMODE_BUFFER}
+
+function CreateConsoleScreenBuffer(dwDesiredAccess: DWORD; dwShareMode: DWORD;
+ lpSecurityAttributes: PSECURITY_ATTRIBUTES; dwFlags: DWORD;
+ lpScreenBufferData: LPVOID): HANDLE; stdcall;
+{$EXTERNALSYM CreateConsoleScreenBuffer}
+function GetConsoleCP: UINT; stdcall;
+{$EXTERNALSYM GetConsoleCP}
+function SetConsoleCP(wCodePageID: UINT): BOOL; stdcall;
+{$EXTERNALSYM SetConsoleCP}
+function GetConsoleOutputCP: UINT; stdcall;
+{$EXTERNALSYM GetConsoleOutputCP}
+function SetConsoleOutputCP(wCodePageID: UINT): BOOL; stdcall;
+{$EXTERNALSYM SetConsoleOutputCP}
+
+const
+ CONSOLE_FULLSCREEN = 1; // fullscreen console
+ {$EXTERNALSYM CONSOLE_FULLSCREEN}
+ CONSOLE_FULLSCREEN_HARDWARE = 2; // console owns the hardware
+ {$EXTERNALSYM CONSOLE_FULLSCREEN_HARDWARE}
+
+function GetConsoleDisplayMode(var lpModeFlags: DWORD): BOOL; stdcall;
+{$EXTERNALSYM GetConsoleDisplayMode}
+
+function GetConsoleWindow: HWND; stdcall;
+{$EXTERNALSYM GetConsoleWindow}
+
+function GetConsoleProcessList(var lpdwProcessList: LPDWORD; dwProcessCount: DWORD): DWORD; stdcall;
+{$EXTERNALSYM GetConsoleProcessList}
+
+//
+// Aliasing apis.
+//
+
+function AddConsoleAliasA(Source, Target, ExeName: LPSTR): BOOL; stdcall;
+{$EXTERNALSYM AddConsoleAliasA}
+function AddConsoleAliasW(Source, Target, ExeName: LPWSTR): BOOL; stdcall;
+{$EXTERNALSYM AddConsoleAliasW}
+function AddConsoleAlias(Source, Target, ExeName: LPTSTR): BOOL; stdcall;
+{$EXTERNALSYM AddConsoleAlias}
+
+function GetConsoleAliasA(Source, TargetBuffer: LPSTR; TargetBufferLength: DWORD; ExeName: LPSTR): DWORD; stdcall;
+{$EXTERNALSYM GetConsoleAliasA}
+function GetConsoleAliasW(Source, TargetBuffer: LPWSTR; TargetBufferLength: DWORD; ExeName: LPWSTR): DWORD; stdcall;
+{$EXTERNALSYM GetConsoleAliasW}
+function GetConsoleAlias(Source, TargetBuffer: LPTSTR; TargetBufferLength: DWORD; ExeName: LPTSTR): DWORD; stdcall;
+{$EXTERNALSYM GetConsoleAlias}
+
+function GetConsoleAliasesLengthA(ExeName: LPSTR): DWORD; stdcall;
+{$EXTERNALSYM GetConsoleAliasesLengthA}
+function GetConsoleAliasesLengthW(ExeName: LPWSTR): DWORD; stdcall;
+{$EXTERNALSYM GetConsoleAliasesLengthW}
+function GetConsoleAliasesLength(ExeName: LPTSTR): DWORD; stdcall;
+{$EXTERNALSYM GetConsoleAliasesLength}
+
+function GetConsoleAliasExesLengthA: DWORD; stdcall;
+{$EXTERNALSYM GetConsoleAliasExesLengthA}
+function GetConsoleAliasExesLengthW: DWORD; stdcall;
+{$EXTERNALSYM GetConsoleAliasExesLengthW}
+function GetConsoleAliasExesLength: DWORD; stdcall;
+{$EXTERNALSYM GetConsoleAliasExesLength}
+
+function GetConsoleAliasesA(AliasBuffer: LPSTR; AliasBufferLength: DWORD; ExeName: LPSTR): DWORD; stdcall;
+{$EXTERNALSYM GetConsoleAliasesA}
+function GetConsoleAliasesW(AliasBuffer: LPWSTR; AliasBufferLength: DWORD; ExeName: LPWSTR): DWORD; stdcall;
+{$EXTERNALSYM GetConsoleAliasesW}
+function GetConsoleAliases(AliasBuffer: LPTSTR; AliasBufferLength: DWORD; ExeName: LPTSTR): DWORD; stdcall;
+{$EXTERNALSYM GetConsoleAliases}
+
+function GetConsoleAliasExesA(ExeNameBuffer: LPSTR; ExeNameBufferLength: DWORD): DWORD; stdcall;
+{$EXTERNALSYM GetConsoleAliasExesA}
+function GetConsoleAliasExesW(ExeNameBuffer: LPWSTR; ExeNameBufferLength: DWORD): DWORD; stdcall;
+{$EXTERNALSYM GetConsoleAliasExesW}
+function GetConsoleAliasExes(ExeNameBuffer: LPTSTR; ExeNameBufferLength: DWORD): DWORD; stdcall;
+{$EXTERNALSYM GetConsoleAliasExes}
+
+implementation
+
+const
+ kernel32 = 'kernel32.dll';
+ {$IFDEF UNICODE}
+ AWSuffix = 'W';
+ {$ELSE}
+ AWSuffix = 'A';
+ {$ENDIF UNICODE}
+
+{$IFDEF DYNAMIC_LINK}
+
+var
+ _PeekConsoleInputA: Pointer;
+
+function PeekConsoleInputA;
+begin
+ GetProcedureAddress(_PeekConsoleInputA, kernel32, 'PeekConsoleInputA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PeekConsoleInputA]
+ end;
+end;
+
+var
+ _PeekConsoleInputW: Pointer;
+
+function PeekConsoleInputW;
+begin
+ GetProcedureAddress(_PeekConsoleInputW, kernel32, 'PeekConsoleInputW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PeekConsoleInputW]
+ end;
+end;
+
+var
+ _PeekConsoleInput: Pointer;
+
+function PeekConsoleInput;
+begin
+ GetProcedureAddress(_PeekConsoleInput, kernel32, 'PeekConsoleInput' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PeekConsoleInput]
+ end;
+end;
+
+var
+ _ReadConsoleInputA: Pointer;
+
+function ReadConsoleInputA;
+begin
+ GetProcedureAddress(_ReadConsoleInputA, kernel32, 'ReadConsoleInputA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ReadConsoleInputA]
+ end;
+end;
+
+var
+ _ReadConsoleInputW: Pointer;
+
+function ReadConsoleInputW;
+begin
+ GetProcedureAddress(_ReadConsoleInputW, kernel32, 'ReadConsoleInputW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ReadConsoleInputW]
+ end;
+end;
+
+var
+ _ReadConsoleInput: Pointer;
+
+function ReadConsoleInput;
+begin
+ GetProcedureAddress(_ReadConsoleInput, kernel32, 'ReadConsoleInput' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ReadConsoleInput]
+ end;
+end;
+
+var
+ _WriteConsoleInputA: Pointer;
+
+function WriteConsoleInputA;
+begin
+ GetProcedureAddress(_WriteConsoleInputA, kernel32, 'WriteConsoleInputA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WriteConsoleInputA]
+ end;
+end;
+
+var
+ _WriteConsoleInputW: Pointer;
+
+function WriteConsoleInputW;
+begin
+ GetProcedureAddress(_WriteConsoleInputW, kernel32, 'WriteConsoleInputW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WriteConsoleInputW]
+ end;
+end;
+
+var
+ _WriteConsoleInput: Pointer;
+
+function WriteConsoleInput;
+begin
+ GetProcedureAddress(_WriteConsoleInput, kernel32, 'WriteConsoleInput' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WriteConsoleInput]
+ end;
+end;
+
+var
+ _ReadConsoleOutputA: Pointer;
+
+function ReadConsoleOutputA;
+begin
+ GetProcedureAddress(_ReadConsoleOutputA, kernel32, 'ReadConsoleOutputA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ReadConsoleOutputA]
+ end;
+end;
+
+var
+ _ReadConsoleOutputW: Pointer;
+
+function ReadConsoleOutputW;
+begin
+ GetProcedureAddress(_ReadConsoleOutputW, kernel32, 'ReadConsoleOutputW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ReadConsoleOutputW]
+ end;
+end;
+
+var
+ _ReadConsoleOutput: Pointer;
+
+function ReadConsoleOutput;
+begin
+ GetProcedureAddress(_ReadConsoleOutput, kernel32, 'ReadConsoleOutput' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ReadConsoleOutput]
+ end;
+end;
+
+var
+ _WriteConsoleOutputA: Pointer;
+
+function WriteConsoleOutputA;
+begin
+ GetProcedureAddress(_WriteConsoleOutputA, kernel32, 'WriteConsoleOutputA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WriteConsoleOutputA]
+ end;
+end;
+
+var
+ _WriteConsoleOutputW: Pointer;
+
+function WriteConsoleOutputW;
+begin
+ GetProcedureAddress(_WriteConsoleOutputW, kernel32, 'WriteConsoleOutputW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WriteConsoleOutputW]
+ end;
+end;
+
+var
+ _WriteConsoleOutput: Pointer;
+
+function WriteConsoleOutput;
+begin
+ GetProcedureAddress(_WriteConsoleOutput, kernel32, 'WriteConsoleOutput' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WriteConsoleOutput]
+ end;
+end;
+
+var
+ _ReadConsoleOutputCharacterA: Pointer;
+
+function ReadConsoleOutputCharacterA;
+begin
+ GetProcedureAddress(_ReadConsoleOutputCharacterA, kernel32, 'ReadConsoleOutputCharacterA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ReadConsoleOutputCharacterA]
+ end;
+end;
+
+var
+ _ReadConsoleOutputCharacterW: Pointer;
+
+function ReadConsoleOutputCharacterW;
+begin
+ GetProcedureAddress(_ReadConsoleOutputCharacterW, kernel32, 'ReadConsoleOutputCharacterW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ReadConsoleOutputCharacterW]
+ end;
+end;
+
+var
+ _ReadConsoleOutputCharacter: Pointer;
+
+function ReadConsoleOutputCharacter;
+begin
+ GetProcedureAddress(_ReadConsoleOutputCharacter, kernel32, 'ReadConsoleOutputCharacter' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ReadConsoleOutputCharacter]
+ end;
+end;
+
+var
+ _ReadConsoleOutputAttribute: Pointer;
+
+function ReadConsoleOutputAttribute;
+begin
+ GetProcedureAddress(_ReadConsoleOutputAttribute, kernel32, 'ReadConsoleOutputAttribute');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ReadConsoleOutputAttribute]
+ end;
+end;
+
+var
+ _WriteConsoleOutputCharacterA: Pointer;
+
+function WriteConsoleOutputCharacterA;
+begin
+ GetProcedureAddress(_WriteConsoleOutputCharacterA, kernel32, 'WriteConsoleOutputCharacterA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WriteConsoleOutputCharacterA]
+ end;
+end;
+
+var
+ _WriteConsoleOutputCharacterW: Pointer;
+
+function WriteConsoleOutputCharacterW;
+begin
+ GetProcedureAddress(_WriteConsoleOutputCharacterW, kernel32, 'WriteConsoleOutputCharacterW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WriteConsoleOutputCharacterW]
+ end;
+end;
+
+var
+ _WriteConsoleOutputCharacter: Pointer;
+
+function WriteConsoleOutputCharacter;
+begin
+ GetProcedureAddress(_WriteConsoleOutputCharacter, kernel32, 'WriteConsoleOutputCharacter' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WriteConsoleOutputCharacter]
+ end;
+end;
+
+var
+ _WriteConsoleOutputAttribute: Pointer;
+
+function WriteConsoleOutputAttribute;
+begin
+ GetProcedureAddress(_WriteConsoleOutputAttribute, kernel32, 'WriteConsoleOutputAttribute');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WriteConsoleOutputAttribute]
+ end;
+end;
+
+var
+ _FillConsoleOutputCharacterA: Pointer;
+
+function FillConsoleOutputCharacterA;
+begin
+ GetProcedureAddress(_FillConsoleOutputCharacterA, kernel32, 'FillConsoleOutputCharacterA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_FillConsoleOutputCharacterA]
+ end;
+end;
+
+var
+ _FillConsoleOutputCharacterW: Pointer;
+
+function FillConsoleOutputCharacterW;
+begin
+ GetProcedureAddress(_FillConsoleOutputCharacterW, kernel32, 'FillConsoleOutputCharacterW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_FillConsoleOutputCharacterW]
+ end;
+end;
+
+var
+ _FillConsoleOutputCharacter: Pointer;
+
+function FillConsoleOutputCharacter;
+begin
+ GetProcedureAddress(_FillConsoleOutputCharacter, kernel32, 'FillConsoleOutputCharacter' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_FillConsoleOutputCharacter]
+ end;
+end;
+
+var
+ _FillConsoleOutputAttribute: Pointer;
+
+function FillConsoleOutputAttribute;
+begin
+ GetProcedureAddress(_FillConsoleOutputAttribute, kernel32, 'FillConsoleOutputAttribute');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_FillConsoleOutputAttribute]
+ end;
+end;
+
+var
+ _GetConsoleMode: Pointer;
+
+function GetConsoleMode;
+begin
+ GetProcedureAddress(_GetConsoleMode, kernel32, 'GetConsoleMode');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetConsoleMode]
+ end;
+end;
+
+var
+ _GetNumberOfConsoleInputEvents: Pointer;
+
+function GetNumberOfConsoleInputEvents;
+begin
+ GetProcedureAddress(_GetNumberOfConsoleInputEvents, kernel32, 'GetNumberOfConsoleInputEvents');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetNumberOfConsoleInputEvents]
+ end;
+end;
+
+var
+ _GetConsoleScreenBufferInfo: Pointer;
+
+function GetConsoleScreenBufferInfo;
+begin
+ GetProcedureAddress(_GetConsoleScreenBufferInfo, kernel32, 'GetConsoleScreenBufferInfo');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetConsoleScreenBufferInfo]
+ end;
+end;
+
+var
+ _GetLargestConsoleWindowSize: Pointer;
+
+function GetLargestConsoleWindowSize;
+begin
+ GetProcedureAddress(_GetLargestConsoleWindowSize, kernel32, 'GetLargestConsoleWindowSize');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetLargestConsoleWindowSize]
+ end;
+end;
+
+var
+ _GetConsoleCursorInfo: Pointer;
+
+function GetConsoleCursorInfo;
+begin
+ GetProcedureAddress(_GetConsoleCursorInfo, kernel32, 'GetConsoleCursorInfo');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetConsoleCursorInfo]
+ end;
+end;
+
+var
+ _GetCurrentConsoleFont: Pointer;
+
+function GetCurrentConsoleFont;
+begin
+ GetProcedureAddress(_GetCurrentConsoleFont, kernel32, 'GetCurrentConsoleFont');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetCurrentConsoleFont]
+ end;
+end;
+
+var
+ _GetConsoleFontSize: Pointer;
+
+function GetConsoleFontSize;
+begin
+ GetProcedureAddress(_GetConsoleFontSize, kernel32, 'GetConsoleFontSize');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetConsoleFontSize]
+ end;
+end;
+
+var
+ _GetConsoleSelectionInfo: Pointer;
+
+function GetConsoleSelectionInfo;
+begin
+ GetProcedureAddress(_GetConsoleSelectionInfo, kernel32, 'GetConsoleSelectionInfo');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetConsoleSelectionInfo]
+ end;
+end;
+
+var
+ _GetNumberOfConsoleMouseButtons: Pointer;
+
+function GetNumberOfConsoleMouseButtons;
+begin
+ GetProcedureAddress(_GetNumberOfConsoleMouseButtons, kernel32, 'GetNumberOfConsoleMouseButtons');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetNumberOfConsoleMouseButtons]
+ end;
+end;
+
+var
+ _SetConsoleMode: Pointer;
+
+function SetConsoleMode;
+begin
+ GetProcedureAddress(_SetConsoleMode, kernel32, 'SetConsoleMode');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetConsoleMode]
+ end;
+end;
+
+var
+ _SetConsoleActiveScreenBuffer: Pointer;
+
+function SetConsoleActiveScreenBuffer;
+begin
+ GetProcedureAddress(_SetConsoleActiveScreenBuffer, kernel32, 'SetConsoleActiveScreenBuffer');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetConsoleActiveScreenBuffer]
+ end;
+end;
+
+var
+ _FlushConsoleInputBuffer: Pointer;
+
+function FlushConsoleInputBuffer;
+begin
+ GetProcedureAddress(_FlushConsoleInputBuffer, kernel32, 'FlushConsoleInputBuffer');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_FlushConsoleInputBuffer]
+ end;
+end;
+
+var
+ _SetConsoleScreenBufferSize: Pointer;
+
+function SetConsoleScreenBufferSize;
+begin
+ GetProcedureAddress(_SetConsoleScreenBufferSize, kernel32, 'SetConsoleScreenBufferSize');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetConsoleScreenBufferSize]
+ end;
+end;
+
+var
+ _SetConsoleCursorPosition: Pointer;
+
+function SetConsoleCursorPosition;
+begin
+ GetProcedureAddress(_SetConsoleCursorPosition, kernel32, 'SetConsoleCursorPosition');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetConsoleCursorPosition]
+ end;
+end;
+
+var
+ _SetConsoleCursorInfo: Pointer;
+
+function SetConsoleCursorInfo;
+begin
+ GetProcedureAddress(_SetConsoleCursorInfo, kernel32, 'SetConsoleCursorInfo');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetConsoleCursorInfo]
+ end;
+end;
+
+var
+ _ScrollConsoleScreenBufferA: Pointer;
+
+function ScrollConsoleScreenBufferA;
+begin
+ GetProcedureAddress(_ScrollConsoleScreenBufferA, kernel32, 'ScrollConsoleScreenBufferA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ScrollConsoleScreenBufferA]
+ end;
+end;
+
+var
+ _ScrollConsoleScreenBufferW: Pointer;
+
+function ScrollConsoleScreenBufferW;
+begin
+ GetProcedureAddress(_ScrollConsoleScreenBufferW, kernel32, 'ScrollConsoleScreenBufferW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ScrollConsoleScreenBufferW]
+ end;
+end;
+
+var
+ _ScrollConsoleScreenBuffer: Pointer;
+
+function ScrollConsoleScreenBuffer;
+begin
+ GetProcedureAddress(_ScrollConsoleScreenBuffer, kernel32, 'ScrollConsoleScreenBuffer' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ScrollConsoleScreenBuffer]
+ end;
+end;
+
+var
+ _SetConsoleWindowInfo: Pointer;
+
+function SetConsoleWindowInfo;
+begin
+ GetProcedureAddress(_SetConsoleWindowInfo, kernel32, 'SetConsoleWindowInfo');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetConsoleWindowInfo]
+ end;
+end;
+
+var
+ _SetConsoleTextAttribute: Pointer;
+
+function SetConsoleTextAttribute;
+begin
+ GetProcedureAddress(_SetConsoleTextAttribute, kernel32, 'SetConsoleTextAttribute');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetConsoleTextAttribute]
+ end;
+end;
+
+var
+ _SetConsoleCtrlHandler: Pointer;
+
+function SetConsoleCtrlHandler;
+begin
+ GetProcedureAddress(_SetConsoleCtrlHandler, kernel32, 'SetConsoleCtrlHandler');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetConsoleCtrlHandler]
+ end;
+end;
+
+var
+ _GenerateConsoleCtrlEvent: Pointer;
+
+function GenerateConsoleCtrlEvent;
+begin
+ GetProcedureAddress(_GenerateConsoleCtrlEvent, kernel32, 'GenerateConsoleCtrlEvent');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GenerateConsoleCtrlEvent]
+ end;
+end;
+
+var
+ _AllocConsole: Pointer;
+
+function AllocConsole;
+begin
+ GetProcedureAddress(_AllocConsole, kernel32, 'AllocConsole');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_AllocConsole]
+ end;
+end;
+
+var
+ _FreeConsole: Pointer;
+
+function FreeConsole;
+begin
+ GetProcedureAddress(_FreeConsole, kernel32, 'FreeConsole');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_FreeConsole]
+ end;
+end;
+
+var
+ _AttachConsole: Pointer;
+
+function AttachConsole;
+begin
+ GetProcedureAddress(_AttachConsole, kernel32, 'AttachConsole');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_AttachConsole]
+ end;
+end;
+
+var
+ _GetConsoleTitleA: Pointer;
+
+function GetConsoleTitleA;
+begin
+ GetProcedureAddress(_GetConsoleTitleA, kernel32, 'GetConsoleTitleA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetConsoleTitleA]
+ end;
+end;
+
+var
+ _GetConsoleTitleW: Pointer;
+
+function GetConsoleTitleW;
+begin
+ GetProcedureAddress(_GetConsoleTitleW, kernel32, 'GetConsoleTitleW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetConsoleTitleW]
+ end;
+end;
+
+var
+ _GetConsoleTitle: Pointer;
+
+function GetConsoleTitle;
+begin
+ GetProcedureAddress(_GetConsoleTitle, kernel32, 'GetConsoleTitle' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetConsoleTitle]
+ end;
+end;
+
+var
+ _SetConsoleTitleA: Pointer;
+
+function SetConsoleTitleA;
+begin
+ GetProcedureAddress(_SetConsoleTitleA, kernel32, 'SetConsoleTitleA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetConsoleTitleA]
+ end;
+end;
+
+var
+ _SetConsoleTitleW: Pointer;
+
+function SetConsoleTitleW;
+begin
+ GetProcedureAddress(_SetConsoleTitleW, kernel32, 'SetConsoleTitleW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetConsoleTitleW]
+ end;
+end;
+
+var
+ _SetConsoleTitle: Pointer;
+
+function SetConsoleTitle;
+begin
+ GetProcedureAddress(_SetConsoleTitle, kernel32, 'SetConsoleTitle' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetConsoleTitle]
+ end;
+end;
+
+var
+ _ReadConsoleA: Pointer;
+
+function ReadConsoleA;
+begin
+ GetProcedureAddress(_ReadConsoleA, kernel32, 'ReadConsoleA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ReadConsoleA]
+ end;
+end;
+
+var
+ _ReadConsoleW: Pointer;
+
+function ReadConsoleW;
+begin
+ GetProcedureAddress(_ReadConsoleW, kernel32, 'ReadConsoleW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ReadConsoleW]
+ end;
+end;
+
+var
+ _ReadConsole: Pointer;
+
+function ReadConsole;
+begin
+ GetProcedureAddress(_ReadConsole, kernel32, 'ReadConsole' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ReadConsole]
+ end;
+end;
+
+var
+ _WriteConsoleA: Pointer;
+
+function WriteConsoleA;
+begin
+ GetProcedureAddress(_WriteConsoleA, kernel32, 'WriteConsoleA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WriteConsoleA]
+ end;
+end;
+
+var
+ _WriteConsoleW: Pointer;
+
+function WriteConsoleW;
+begin
+ GetProcedureAddress(_WriteConsoleW, kernel32, 'WriteConsoleW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WriteConsoleW]
+ end;
+end;
+
+var
+ _WriteConsole: Pointer;
+
+function WriteConsole;
+begin
+ GetProcedureAddress(_WriteConsole, kernel32, 'WriteConsole' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WriteConsole]
+ end;
+end;
+
+var
+ _CreateConsoleScreenBuffer: Pointer;
+
+function CreateConsoleScreenBuffer;
+begin
+ GetProcedureAddress(_CreateConsoleScreenBuffer, kernel32, 'CreateConsoleScreenBuffer');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreateConsoleScreenBuffer]
+ end;
+end;
+
+var
+ _GetConsoleCP: Pointer;
+
+function GetConsoleCP;
+begin
+ GetProcedureAddress(_GetConsoleCP, kernel32, 'GetConsoleCP');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetConsoleCP]
+ end;
+end;
+
+var
+ _SetConsoleCP: Pointer;
+
+function SetConsoleCP;
+begin
+ GetProcedureAddress(_SetConsoleCP, kernel32, 'SetConsoleCP');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetConsoleCP]
+ end;
+end;
+
+var
+ _GetConsoleOutputCP: Pointer;
+
+function GetConsoleOutputCP;
+begin
+ GetProcedureAddress(_GetConsoleOutputCP, kernel32, 'GetConsoleOutputCP');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetConsoleOutputCP]
+ end;
+end;
+
+var
+ _SetConsoleOutputCP: Pointer;
+
+function SetConsoleOutputCP;
+begin
+ GetProcedureAddress(_SetConsoleOutputCP, kernel32, 'SetConsoleOutputCP');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetConsoleOutputCP]
+ end;
+end;
+
+var
+ _GetConsoleDisplayMode: Pointer;
+
+function GetConsoleDisplayMode;
+begin
+ GetProcedureAddress(_GetConsoleDisplayMode, kernel32, 'GetConsoleDisplayMode');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetConsoleDisplayMode]
+ end;
+end;
+
+var
+ _GetConsoleWindow: Pointer;
+
+function GetConsoleWindow;
+begin
+ GetProcedureAddress(_GetConsoleWindow, kernel32, 'GetConsoleWindow');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetConsoleWindow]
+ end;
+end;
+
+var
+ _GetConsoleProcessList: Pointer;
+
+function GetConsoleProcessList;
+begin
+ GetProcedureAddress(_GetConsoleProcessList, kernel32, 'GetConsoleProcessList');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetConsoleProcessList]
+ end;
+end;
+
+var
+ _AddConsoleAliasA: Pointer;
+
+function AddConsoleAliasA;
+begin
+ GetProcedureAddress(_AddConsoleAliasA, kernel32, 'AddConsoleAliasA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_AddConsoleAliasA]
+ end;
+end;
+
+var
+ _AddConsoleAliasW: Pointer;
+
+function AddConsoleAliasW;
+begin
+ GetProcedureAddress(_AddConsoleAliasW, kernel32, 'AddConsoleAliasW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_AddConsoleAliasW]
+ end;
+end;
+
+var
+ _AddConsoleAlias: Pointer;
+
+function AddConsoleAlias;
+begin
+ GetProcedureAddress(_AddConsoleAlias, kernel32, 'AddConsoleAlias' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_AddConsoleAlias]
+ end;
+end;
+
+var
+ _GetConsoleAliasA: Pointer;
+
+function GetConsoleAliasA;
+begin
+ GetProcedureAddress(_GetConsoleAliasA, kernel32, 'GetConsoleAliasA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetConsoleAliasA]
+ end;
+end;
+
+var
+ _GetConsoleAliasW: Pointer;
+
+function GetConsoleAliasW;
+begin
+ GetProcedureAddress(_GetConsoleAliasW, kernel32, 'GetConsoleAliasW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetConsoleAliasW]
+ end;
+end;
+
+var
+ _GetConsoleAlias: Pointer;
+
+function GetConsoleAlias;
+begin
+ GetProcedureAddress(_GetConsoleAlias, kernel32, 'GetConsoleAlias' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetConsoleAlias]
+ end;
+end;
+
+var
+ _GetConsoleAliasesLengthA: Pointer;
+
+function GetConsoleAliasesLengthA;
+begin
+ GetProcedureAddress(_GetConsoleAliasesLengthA, kernel32, 'GetConsoleAliasesLengthA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetConsoleAliasesLengthA]
+ end;
+end;
+
+var
+ _GetConsoleAliasesLengthW: Pointer;
+
+function GetConsoleAliasesLengthW;
+begin
+ GetProcedureAddress(_GetConsoleAliasesLengthW, kernel32, 'GetConsoleAliasesLengthW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetConsoleAliasesLengthW]
+ end;
+end;
+
+var
+ _GetConsoleAliasesLength: Pointer;
+
+function GetConsoleAliasesLength;
+begin
+ GetProcedureAddress(_GetConsoleAliasesLength, kernel32, 'GetConsoleAliasesLength' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetConsoleAliasesLength]
+ end;
+end;
+
+var
+ _GetConsoleAliasExesLengthA: Pointer;
+
+function GetConsoleAliasExesLengthA;
+begin
+ GetProcedureAddress(_GetConsoleAliasExesLengthA, kernel32, 'GetConsoleAliasExesLengthA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetConsoleAliasExesLengthA]
+ end;
+end;
+
+var
+ _GetConsoleAliasExesLengthW: Pointer;
+
+function GetConsoleAliasExesLengthW;
+begin
+ GetProcedureAddress(_GetConsoleAliasExesLengthW, kernel32, 'GetConsoleAliasExesLengthW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetConsoleAliasExesLengthW]
+ end;
+end;
+
+var
+ _GetConsoleAliasExesLength: Pointer;
+
+function GetConsoleAliasExesLength;
+begin
+ GetProcedureAddress(_GetConsoleAliasExesLength, kernel32, 'GetConsoleAliasExesLength' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetConsoleAliasExesLength]
+ end;
+end;
+
+var
+ _GetConsoleAliasesA: Pointer;
+
+function GetConsoleAliasesA;
+begin
+ GetProcedureAddress(_GetConsoleAliasesA, kernel32, 'GetConsoleAliasesA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetConsoleAliasesA]
+ end;
+end;
+
+var
+ _GetConsoleAliasesW: Pointer;
+
+function GetConsoleAliasesW;
+begin
+ GetProcedureAddress(_GetConsoleAliasesW, kernel32, 'GetConsoleAliasesW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetConsoleAliasesW]
+ end;
+end;
+
+var
+ _GetConsoleAliases: Pointer;
+
+function GetConsoleAliases;
+begin
+ GetProcedureAddress(_GetConsoleAliases, kernel32, 'GetConsoleAliases' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetConsoleAliases]
+ end;
+end;
+
+var
+ _GetConsoleAliasExesA: Pointer;
+
+function GetConsoleAliasExesA;
+begin
+ GetProcedureAddress(_GetConsoleAliasExesA, kernel32, 'GetConsoleAliasExesA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetConsoleAliasExesA]
+ end;
+end;
+
+var
+ _GetConsoleAliasExesW: Pointer;
+
+function GetConsoleAliasExesW;
+begin
+ GetProcedureAddress(_GetConsoleAliasExesW, kernel32, 'GetConsoleAliasExesW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetConsoleAliasExesW]
+ end;
+end;
+
+var
+ _GetConsoleAliasExes: Pointer;
+
+function GetConsoleAliasExes;
+begin
+ GetProcedureAddress(_GetConsoleAliasExes, kernel32, 'GetConsoleAliasExes' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetConsoleAliasExes]
+ end;
+end;
+
+{$ELSE}
+
+function PeekConsoleInputA; external kernel32 name 'PeekConsoleInputA';
+function PeekConsoleInputW; external kernel32 name 'PeekConsoleInputW';
+function PeekConsoleInput; external kernel32 name 'PeekConsoleInput' + AWSuffix;
+function ReadConsoleInputA; external kernel32 name 'ReadConsoleInputA';
+function ReadConsoleInputW; external kernel32 name 'ReadConsoleInputW';
+function ReadConsoleInput; external kernel32 name 'ReadConsoleInput' + AWSuffix;
+function WriteConsoleInputA; external kernel32 name 'WriteConsoleInputA';
+function WriteConsoleInputW; external kernel32 name 'WriteConsoleInputW';
+function WriteConsoleInput; external kernel32 name 'WriteConsoleInput' + AWSuffix;
+function ReadConsoleOutputA; external kernel32 name 'ReadConsoleOutputA';
+function ReadConsoleOutputW; external kernel32 name 'ReadConsoleOutputW';
+function ReadConsoleOutput; external kernel32 name 'ReadConsoleOutput' + AWSuffix;
+function WriteConsoleOutputA; external kernel32 name 'WriteConsoleOutputA';
+function WriteConsoleOutputW; external kernel32 name 'WriteConsoleOutputW';
+function WriteConsoleOutput; external kernel32 name 'WriteConsoleOutput' + AWSuffix;
+function ReadConsoleOutputCharacterA; external kernel32 name 'ReadConsoleOutputCharacterA';
+function ReadConsoleOutputCharacterW; external kernel32 name 'ReadConsoleOutputCharacterW';
+function ReadConsoleOutputCharacter; external kernel32 name 'ReadConsoleOutputCharacter' + AWSuffix;
+function ReadConsoleOutputAttribute; external kernel32 name 'ReadConsoleOutputAttribute';
+function WriteConsoleOutputCharacterA; external kernel32 name 'WriteConsoleOutputCharacterA';
+function WriteConsoleOutputCharacterW; external kernel32 name 'WriteConsoleOutputCharacterW';
+function WriteConsoleOutputCharacter; external kernel32 name 'WriteConsoleOutputCharacter' + AWSuffix;
+function WriteConsoleOutputAttribute; external kernel32 name 'WriteConsoleOutputAttribute';
+function FillConsoleOutputCharacterA; external kernel32 name 'FillConsoleOutputCharacterA';
+function FillConsoleOutputCharacterW; external kernel32 name 'FillConsoleOutputCharacterW';
+function FillConsoleOutputCharacter; external kernel32 name 'FillConsoleOutputCharacter' + AWSuffix;
+function FillConsoleOutputAttribute; external kernel32 name 'FillConsoleOutputAttribute';
+function GetConsoleMode; external kernel32 name 'GetConsoleMode';
+function GetNumberOfConsoleInputEvents; external kernel32 name 'GetNumberOfConsoleInputEvents';
+function GetConsoleScreenBufferInfo; external kernel32 name 'GetConsoleScreenBufferInfo';
+function GetLargestConsoleWindowSize; external kernel32 name 'GetLargestConsoleWindowSize';
+function GetConsoleCursorInfo; external kernel32 name 'GetConsoleCursorInfo';
+function GetCurrentConsoleFont; external kernel32 name 'GetCurrentConsoleFont';
+function GetConsoleFontSize; external kernel32 name 'GetConsoleFontSize';
+function GetConsoleSelectionInfo; external kernel32 name 'GetConsoleSelectionInfo';
+function GetNumberOfConsoleMouseButtons; external kernel32 name 'GetNumberOfConsoleMouseButtons';
+function SetConsoleMode; external kernel32 name 'SetConsoleMode';
+function SetConsoleActiveScreenBuffer; external kernel32 name 'SetConsoleActiveScreenBuffer';
+function FlushConsoleInputBuffer; external kernel32 name 'FlushConsoleInputBuffer';
+function SetConsoleScreenBufferSize; external kernel32 name 'SetConsoleScreenBufferSize';
+function SetConsoleCursorPosition; external kernel32 name 'SetConsoleCursorPosition';
+function SetConsoleCursorInfo; external kernel32 name 'SetConsoleCursorInfo';
+function ScrollConsoleScreenBufferA; external kernel32 name 'ScrollConsoleScreenBufferA';
+function ScrollConsoleScreenBufferW; external kernel32 name 'ScrollConsoleScreenBufferW';
+function ScrollConsoleScreenBuffer; external kernel32 name 'ScrollConsoleScreenBuffer' + AWSuffix;
+function SetConsoleWindowInfo; external kernel32 name 'SetConsoleWindowInfo';
+function SetConsoleTextAttribute; external kernel32 name 'SetConsoleTextAttribute';
+function SetConsoleCtrlHandler; external kernel32 name 'SetConsoleCtrlHandler';
+function GenerateConsoleCtrlEvent; external kernel32 name 'GenerateConsoleCtrlEvent';
+function AllocConsole; external kernel32 name 'AllocConsole';
+function FreeConsole; external kernel32 name 'FreeConsole';
+function AttachConsole; external kernel32 name 'AttachConsole';
+function GetConsoleTitleA; external kernel32 name 'GetConsoleTitleA';
+function GetConsoleTitleW; external kernel32 name 'GetConsoleTitleW';
+function GetConsoleTitle; external kernel32 name 'GetConsoleTitle' + AWSuffix;
+function SetConsoleTitleA; external kernel32 name 'SetConsoleTitleA';
+function SetConsoleTitleW; external kernel32 name 'SetConsoleTitleW';
+function SetConsoleTitle; external kernel32 name 'SetConsoleTitle' + AWSuffix;
+function ReadConsoleA; external kernel32 name 'ReadConsoleA';
+function ReadConsoleW; external kernel32 name 'ReadConsoleW';
+function ReadConsole; external kernel32 name 'ReadConsole' + AWSuffix;
+function WriteConsoleA; external kernel32 name 'WriteConsoleA';
+function WriteConsoleW; external kernel32 name 'WriteConsoleW';
+function WriteConsole; external kernel32 name 'WriteConsole' + AWSuffix;
+function CreateConsoleScreenBuffer; external kernel32 name 'CreateConsoleScreenBuffer';
+function GetConsoleCP; external kernel32 name 'GetConsoleCP';
+function SetConsoleCP; external kernel32 name 'SetConsoleCP';
+function GetConsoleOutputCP; external kernel32 name 'GetConsoleOutputCP';
+function SetConsoleOutputCP; external kernel32 name 'SetConsoleOutputCP';
+function GetConsoleDisplayMode; external kernel32 name 'GetConsoleDisplayMode';
+function GetConsoleWindow; external kernel32 name 'GetConsoleWindow';
+function GetConsoleProcessList; external kernel32 name 'GetConsoleProcessList';
+function AddConsoleAliasA; external kernel32 name 'AddConsoleAliasA';
+function AddConsoleAliasW; external kernel32 name 'AddConsoleAliasW';
+function AddConsoleAlias; external kernel32 name 'AddConsoleAlias' + AWSuffix;
+function GetConsoleAliasA; external kernel32 name 'GetConsoleAliasA';
+function GetConsoleAliasW; external kernel32 name 'GetConsoleAliasW';
+function GetConsoleAlias; external kernel32 name 'GetConsoleAlias' + AWSuffix;
+function GetConsoleAliasesLengthA; external kernel32 name 'GetConsoleAliasesLengthA';
+function GetConsoleAliasesLengthW; external kernel32 name 'GetConsoleAliasesLengthW';
+function GetConsoleAliasesLength; external kernel32 name 'GetConsoleAliasesLength' + AWSuffix;
+function GetConsoleAliasExesLengthA; external kernel32 name 'GetConsoleAliasExesLengthA';
+function GetConsoleAliasExesLengthW; external kernel32 name 'GetConsoleAliasExesLengthW';
+function GetConsoleAliasExesLength; external kernel32 name 'GetConsoleAliasExesLength' + AWSuffix;
+function GetConsoleAliasesA; external kernel32 name 'GetConsoleAliasesA';
+function GetConsoleAliasesW; external kernel32 name 'GetConsoleAliasesW';
+function GetConsoleAliases; external kernel32 name 'GetConsoleAliases' + AWSuffix;
+function GetConsoleAliasExesA; external kernel32 name 'GetConsoleAliasExesA';
+function GetConsoleAliasExesW; external kernel32 name 'GetConsoleAliasExesW';
+function GetConsoleAliasExes; external kernel32 name 'GetConsoleAliasExes' + AWSuffix;
+
+{$ENDIF DYNAMIC_LINK}
+
+end.
diff --git a/packages/extra/winunits/jwawincpl.pas b/packages/extra/winunits/jwawincpl.pas
index e8c82a59cd..ba27ccf486 100644
--- a/packages/extra/winunits/jwawincpl.pas
+++ b/packages/extra/winunits/jwawincpl.pas
@@ -1,297 +1,297 @@
-{******************************************************************************}
-{ }
-{ Control Panel Applets Interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: cpl.h, released June 2000. The original Pascal }
-{ code is: Cpl.pas, released December 2000. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwawincpl.pas,v 1.1 2005/04/04 07:56:11 marco Exp $
-
-unit JwaWinCpl;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "cpl.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaWinUser, JwaWinType;
-
-//
-// General rules for being installed in the Control Panel:
-//
-// 1) The DLL must export a function named CPlApplet which will handle
-// the messages discussed below.
-// 2) If the applet needs to save information in CONTROL.INI minimize
-// clutter by using the application name [MMCPL.appletname].
-// 2) If the applet is refrenced in CONTROL.INI under [MMCPL] use
-// the following form:
-// ...
-// [MMCPL]
-// uniqueName=c:\mydir\myapplet.dll
-// ...
-//
-//
-// The order applet DLL's are loaded by CONTROL.EXE is not guaranteed.
-// Control panels may be sorted for display, etc.
-//
-//
-
-// #include <pshpack1.h> // Assume byte packing throughout
-
-//
-// CONTROL.EXE will answer this message and launch an applet
-//
-// WM_CPL_LAUNCH
-//
-// wParam - window handle of calling app
-// lParam - LPTSTR of name of applet to launch
-//
-// WM_CPL_LAUNCHED
-//
-// wParam - TRUE/FALSE if applet was launched
-// lParam - NULL
-//
-// CONTROL.EXE will post this message to the caller when the applet returns
-// (ie., when wParam is a valid window handle)
-//
-//
-
-const
- WM_CPL_LAUNCH = WM_USER + 1000;
- {$EXTERNALSYM WM_CPL_LAUNCH}
- WM_CPL_LAUNCHED = WM_USER + 1001;
- {$EXTERNALSYM WM_CPL_LAUNCHED}
-
-// A function prototype for CPlApplet()
-
-type
- APPLET_PROC = function(hwndCpl: HWND; msg: UINT;
- lParam1, lParam2: LPARAM): LONG; stdcall;
- {$EXTERNALSYM APPLET_PROC}
- TCPLApplet = APPLET_PROC;
-
-// The data structure CPlApplet() must fill in.
-
- LPCPLINFO = ^CPLINFO;
- {$EXTERNALSYM LPCPLINFO}
- tagCPLINFO = packed record
- idIcon: Integer; // icon resource id, provided by CPlApplet()
- idName: Integer; // name string res. id, provided by CPlApplet()
- idInfo: Integer; // info string res. id, provided by CPlApplet()
- lData: LONG_PTR; // user defined data
- end;
- {$EXTERNALSYM tagCPLINFO}
- CPLINFO = tagCPLINFO;
- {$EXTERNALSYM CPLINFO}
- TCplInfo = CPLINFO;
- PCplInfo = LPCPLINFO;
-
- LPNEWCPLINFOA = ^NEWCPLINFOA;
- {$EXTERNALSYM LPNEWCPLINFOA}
- tagNEWCPLINFOA = packed record
- dwSize: DWORD; // similar to the commdlg
- dwFlags: DWORD;
- dwHelpContext: DWORD; // help context to use
- lData: LONG_PTR; // user defined data
- hIcon: HICON; // icon to use, this is owned by CONTROL.EXE (may be deleted)
- szName: array [0..31] of CHAR; // short name
- szInfo: array [0..63] of CHAR; // long name (status line)
- szHelpFile: array [0..127] of CHAR; // path to help file to use
- end;
- {$EXTERNALSYM tagNEWCPLINFOA}
- NEWCPLINFOA = tagNEWCPLINFOA;
- {$EXTERNALSYM NEWCPLINFOA}
- TNewCplInfoA = NEWCPLINFOA;
- PNewCplInfoA = LPNEWCPLINFOA;
-
- LPNEWCPLINFOW = ^NEWCPLINFOW;
- {$EXTERNALSYM LPNEWCPLINFOW}
- tagNEWCPLINFOW = packed record
- dwSize: DWORD; // similar to the commdlg
- dwFlags: DWORD;
- dwHelpContext: DWORD; // help context to use
- lData: LONG_PTR; // user defined data
- hIcon: HICON; // icon to use, this is owned by CONTROL.EXE (may be deleted)
- szName: array [0..31] of WCHAR; // short name
- szInfo: array [0..63] of WCHAR; // long name (status line)
- szHelpFile: array [0..127] of WCHAR; // path to help file to use
- end;
- {$EXTERNALSYM tagNEWCPLINFOW}
- NEWCPLINFOW = tagNEWCPLINFOW;
- {$EXTERNALSYM NEWCPLINFOW}
- TNewCplInfoW = NEWCPLINFOW;
- PNewCplInfoW = LPNEWCPLINFOW;
-
- {$IFDEF UNICODE}
- NEWCPLINFO = NEWCPLINFOW;
- {$EXTERNALSYM NEWCPLINFO}
- LPNEWCPLINFO = LPNEWCPLINFOW;
- {$EXTERNALSYM LPNEWCPLINFO}
- TNewCplInfo = TNewCplInfoW;
- PNewCplInfo = PNewCplInfoW;
- {$ELSE}
- NEWCPLINFO = NEWCPLINFOA;
- {$EXTERNALSYM NEWCPLINFO}
- LPNEWCPLINFO = LPNEWCPLINFOA;
- {$EXTERNALSYM LPNEWCPLINFO}
- TNewCplInfo = TNewCplInfoA;
- PNewCplInfo = PNewCplInfoA;
- {$ENDIF UNICODE}
-
-const
- CPL_DYNAMIC_RES = 0;
- {$EXTERNALSYM CPL_DYNAMIC_RES}
-
-// This constant may be used in place of real resource IDs for the idIcon,
-// idName or idInfo members of the CPLINFO structure. Normally, the system
-// uses these values to extract copies of the resources and store them in a
-// cache. Once the resource information is in the cache, the system does not
-// need to load a CPL unless the user actually tries to use it.
-// CPL_DYNAMIC_RES tells the system not to cache the resource, but instead to
-// load the CPL every time it needs to display information about an item. This
-// allows a CPL to dynamically decide what information will be displayed, but
-// is SIGNIFICANTLY SLOWER than displaying information from a cache.
-// Typically, CPL_DYNAMIC_RES is used when a control panel must inspect the
-// runtime status of some device in order to provide text or icons to display.
-
-// The messages CPlApplet() must handle:
-
- CPL_INIT = 1;
- {$EXTERNALSYM CPL_INIT}
-
-// This message is sent to indicate CPlApplet() was found.
-// lParam1 and lParam2 are not defined.
-// Return TRUE or FALSE indicating whether the control panel should proceed.
-
- CPL_GETCOUNT = 2;
- {$EXTERNALSYM CPL_GETCOUNT}
-
-// This message is sent to determine the number of applets to be displayed.
-// lParam1 and lParam2 are not defined.
-// Return the number of applets you wish to display in the control
-// panel window.
-
- CPL_INQUIRE = 3;
- {$EXTERNALSYM CPL_INQUIRE}
-
-// This message is sent for information about each applet.
-
-// A CPL SHOULD HANDLE BOTH THE CPL_INQUIRE AND CPL_NEWINQUIRE MESSAGES.
-// The developer must not make any assumptions about the order or dependance
-// of CPL inquiries.
-
-// lParam1 is the applet number to register, a value from 0 to
-// (CPL_GETCOUNT - 1). lParam2 is a far ptr to a CPLINFO structure.
-// Fill in CPLINFO's idIcon, idName, idInfo and lData fields with
-// the resource id for an icon to display, name and description string ids,
-// and a long data item associated with applet #lParam1. This information
-// may be cached by the caller at runtime and/or across sessions.
-// To prevent caching, see CPL_DYNAMIC_RES, above.
-
- CPL_SELECT = 4;
- {$EXTERNALSYM CPL_SELECT}
-
-// The CPL_SELECT message has been deleted.
-
- CPL_DBLCLK = 5;
- {$EXTERNALSYM CPL_DBLCLK}
-
-// This message is sent when the applet's icon has been double-clicked
-// upon. lParam1 is the applet number which was selected. lParam2 is the
-// applet's lData value.
-// This message should initiate the applet's dialog box.
-
- CPL_STOP = 6;
- {$EXTERNALSYM CPL_STOP}
-
-// This message is sent for each applet when the control panel is exiting.
-// lParam1 is the applet number. lParam2 is the applet's lData value.
-// Do applet specific cleaning up here.
-
- CPL_EXIT = 7;
- {$EXTERNALSYM CPL_EXIT}
-
-// This message is sent just before the control panel calls FreeLibrary.
-// lParam1 and lParam2 are not defined.
-// Do non-applet specific cleaning up here.
-
- CPL_NEWINQUIRE = 8;
- {$EXTERNALSYM CPL_NEWINQUIRE}
-
-// Same as CPL_INQUIRE execpt lParam2 is a pointer to a NEWCPLINFO struct.
-
-// A CPL SHOULD HANDLE BOTH THE CPL_INQUIRE AND CPL_NEWINQUIRE MESSAGES.
-// The developer must not make any assumptions about the order or dependance
-// of CPL inquiries.
-
- CPL_STARTWPARMSA = 9;
- {$EXTERNALSYM CPL_STARTWPARMSA}
- CPL_STARTWPARMSW = 10;
- {$EXTERNALSYM CPL_STARTWPARMSW}
-
- {$IFDEF UNICODE}
- CPL_STARTWPARMS = CPL_STARTWPARMSW;
- {$EXTERNALSYM CPL_STARTWPARMS}
- {$ELSE}
- CPL_STARTWPARMS = CPL_STARTWPARMSA;
- {$EXTERNALSYM CPL_STARTWPARMS}
- {$ENDIF UNICODE}
-
-// this message parallels CPL_DBLCLK in that the applet should initiate
-// its dialog box. where it differs is that this invocation is coming
-// out of RUNDLL, and there may be some extra directions for execution.
-// lParam1: the applet number.
-// lParam2: an LPSTR to any extra directions that might exist.
-// returns: TRUE if the message was handled; FALSE if not.
-
-// This message is internal to the Control Panel and MAIN applets.
-// It is only sent when an applet is invoked from the Command line
-// during system installation.
-
- CPL_SETUP = 200;
- {$EXTERNALSYM CPL_SETUP}
-
-implementation
-
-end.
+{******************************************************************************}
+{ }
+{ Control Panel Applets Interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: cpl.h, released June 2000. The original Pascal }
+{ code is: Cpl.pas, released December 2000. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwawincpl.pas,v 1.1 2005/04/04 07:56:11 marco Exp $
+
+unit JwaWinCpl;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "cpl.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaWinUser, JwaWinType;
+
+//
+// General rules for being installed in the Control Panel:
+//
+// 1) The DLL must export a function named CPlApplet which will handle
+// the messages discussed below.
+// 2) If the applet needs to save information in CONTROL.INI minimize
+// clutter by using the application name [MMCPL.appletname].
+// 2) If the applet is refrenced in CONTROL.INI under [MMCPL] use
+// the following form:
+// ...
+// [MMCPL]
+// uniqueName=c:\mydir\myapplet.dll
+// ...
+//
+//
+// The order applet DLL's are loaded by CONTROL.EXE is not guaranteed.
+// Control panels may be sorted for display, etc.
+//
+//
+
+// #include <pshpack1.h> // Assume byte packing throughout
+
+//
+// CONTROL.EXE will answer this message and launch an applet
+//
+// WM_CPL_LAUNCH
+//
+// wParam - window handle of calling app
+// lParam - LPTSTR of name of applet to launch
+//
+// WM_CPL_LAUNCHED
+//
+// wParam - TRUE/FALSE if applet was launched
+// lParam - NULL
+//
+// CONTROL.EXE will post this message to the caller when the applet returns
+// (ie., when wParam is a valid window handle)
+//
+//
+
+const
+ WM_CPL_LAUNCH = WM_USER + 1000;
+ {$EXTERNALSYM WM_CPL_LAUNCH}
+ WM_CPL_LAUNCHED = WM_USER + 1001;
+ {$EXTERNALSYM WM_CPL_LAUNCHED}
+
+// A function prototype for CPlApplet()
+
+type
+ APPLET_PROC = function(hwndCpl: HWND; msg: UINT;
+ lParam1, lParam2: LPARAM): LONG; stdcall;
+ {$EXTERNALSYM APPLET_PROC}
+ TCPLApplet = APPLET_PROC;
+
+// The data structure CPlApplet() must fill in.
+
+ LPCPLINFO = ^CPLINFO;
+ {$EXTERNALSYM LPCPLINFO}
+ tagCPLINFO = packed record
+ idIcon: Integer; // icon resource id, provided by CPlApplet()
+ idName: Integer; // name string res. id, provided by CPlApplet()
+ idInfo: Integer; // info string res. id, provided by CPlApplet()
+ lData: LONG_PTR; // user defined data
+ end;
+ {$EXTERNALSYM tagCPLINFO}
+ CPLINFO = tagCPLINFO;
+ {$EXTERNALSYM CPLINFO}
+ TCplInfo = CPLINFO;
+ PCplInfo = LPCPLINFO;
+
+ LPNEWCPLINFOA = ^NEWCPLINFOA;
+ {$EXTERNALSYM LPNEWCPLINFOA}
+ tagNEWCPLINFOA = packed record
+ dwSize: DWORD; // similar to the commdlg
+ dwFlags: DWORD;
+ dwHelpContext: DWORD; // help context to use
+ lData: LONG_PTR; // user defined data
+ hIcon: HICON; // icon to use, this is owned by CONTROL.EXE (may be deleted)
+ szName: array [0..31] of CHAR; // short name
+ szInfo: array [0..63] of CHAR; // long name (status line)
+ szHelpFile: array [0..127] of CHAR; // path to help file to use
+ end;
+ {$EXTERNALSYM tagNEWCPLINFOA}
+ NEWCPLINFOA = tagNEWCPLINFOA;
+ {$EXTERNALSYM NEWCPLINFOA}
+ TNewCplInfoA = NEWCPLINFOA;
+ PNewCplInfoA = LPNEWCPLINFOA;
+
+ LPNEWCPLINFOW = ^NEWCPLINFOW;
+ {$EXTERNALSYM LPNEWCPLINFOW}
+ tagNEWCPLINFOW = packed record
+ dwSize: DWORD; // similar to the commdlg
+ dwFlags: DWORD;
+ dwHelpContext: DWORD; // help context to use
+ lData: LONG_PTR; // user defined data
+ hIcon: HICON; // icon to use, this is owned by CONTROL.EXE (may be deleted)
+ szName: array [0..31] of WCHAR; // short name
+ szInfo: array [0..63] of WCHAR; // long name (status line)
+ szHelpFile: array [0..127] of WCHAR; // path to help file to use
+ end;
+ {$EXTERNALSYM tagNEWCPLINFOW}
+ NEWCPLINFOW = tagNEWCPLINFOW;
+ {$EXTERNALSYM NEWCPLINFOW}
+ TNewCplInfoW = NEWCPLINFOW;
+ PNewCplInfoW = LPNEWCPLINFOW;
+
+ {$IFDEF UNICODE}
+ NEWCPLINFO = NEWCPLINFOW;
+ {$EXTERNALSYM NEWCPLINFO}
+ LPNEWCPLINFO = LPNEWCPLINFOW;
+ {$EXTERNALSYM LPNEWCPLINFO}
+ TNewCplInfo = TNewCplInfoW;
+ PNewCplInfo = PNewCplInfoW;
+ {$ELSE}
+ NEWCPLINFO = NEWCPLINFOA;
+ {$EXTERNALSYM NEWCPLINFO}
+ LPNEWCPLINFO = LPNEWCPLINFOA;
+ {$EXTERNALSYM LPNEWCPLINFO}
+ TNewCplInfo = TNewCplInfoA;
+ PNewCplInfo = PNewCplInfoA;
+ {$ENDIF UNICODE}
+
+const
+ CPL_DYNAMIC_RES = 0;
+ {$EXTERNALSYM CPL_DYNAMIC_RES}
+
+// This constant may be used in place of real resource IDs for the idIcon,
+// idName or idInfo members of the CPLINFO structure. Normally, the system
+// uses these values to extract copies of the resources and store them in a
+// cache. Once the resource information is in the cache, the system does not
+// need to load a CPL unless the user actually tries to use it.
+// CPL_DYNAMIC_RES tells the system not to cache the resource, but instead to
+// load the CPL every time it needs to display information about an item. This
+// allows a CPL to dynamically decide what information will be displayed, but
+// is SIGNIFICANTLY SLOWER than displaying information from a cache.
+// Typically, CPL_DYNAMIC_RES is used when a control panel must inspect the
+// runtime status of some device in order to provide text or icons to display.
+
+// The messages CPlApplet() must handle:
+
+ CPL_INIT = 1;
+ {$EXTERNALSYM CPL_INIT}
+
+// This message is sent to indicate CPlApplet() was found.
+// lParam1 and lParam2 are not defined.
+// Return TRUE or FALSE indicating whether the control panel should proceed.
+
+ CPL_GETCOUNT = 2;
+ {$EXTERNALSYM CPL_GETCOUNT}
+
+// This message is sent to determine the number of applets to be displayed.
+// lParam1 and lParam2 are not defined.
+// Return the number of applets you wish to display in the control
+// panel window.
+
+ CPL_INQUIRE = 3;
+ {$EXTERNALSYM CPL_INQUIRE}
+
+// This message is sent for information about each applet.
+
+// A CPL SHOULD HANDLE BOTH THE CPL_INQUIRE AND CPL_NEWINQUIRE MESSAGES.
+// The developer must not make any assumptions about the order or dependance
+// of CPL inquiries.
+
+// lParam1 is the applet number to register, a value from 0 to
+// (CPL_GETCOUNT - 1). lParam2 is a far ptr to a CPLINFO structure.
+// Fill in CPLINFO's idIcon, idName, idInfo and lData fields with
+// the resource id for an icon to display, name and description string ids,
+// and a long data item associated with applet #lParam1. This information
+// may be cached by the caller at runtime and/or across sessions.
+// To prevent caching, see CPL_DYNAMIC_RES, above.
+
+ CPL_SELECT = 4;
+ {$EXTERNALSYM CPL_SELECT}
+
+// The CPL_SELECT message has been deleted.
+
+ CPL_DBLCLK = 5;
+ {$EXTERNALSYM CPL_DBLCLK}
+
+// This message is sent when the applet's icon has been double-clicked
+// upon. lParam1 is the applet number which was selected. lParam2 is the
+// applet's lData value.
+// This message should initiate the applet's dialog box.
+
+ CPL_STOP = 6;
+ {$EXTERNALSYM CPL_STOP}
+
+// This message is sent for each applet when the control panel is exiting.
+// lParam1 is the applet number. lParam2 is the applet's lData value.
+// Do applet specific cleaning up here.
+
+ CPL_EXIT = 7;
+ {$EXTERNALSYM CPL_EXIT}
+
+// This message is sent just before the control panel calls FreeLibrary.
+// lParam1 and lParam2 are not defined.
+// Do non-applet specific cleaning up here.
+
+ CPL_NEWINQUIRE = 8;
+ {$EXTERNALSYM CPL_NEWINQUIRE}
+
+// Same as CPL_INQUIRE execpt lParam2 is a pointer to a NEWCPLINFO struct.
+
+// A CPL SHOULD HANDLE BOTH THE CPL_INQUIRE AND CPL_NEWINQUIRE MESSAGES.
+// The developer must not make any assumptions about the order or dependance
+// of CPL inquiries.
+
+ CPL_STARTWPARMSA = 9;
+ {$EXTERNALSYM CPL_STARTWPARMSA}
+ CPL_STARTWPARMSW = 10;
+ {$EXTERNALSYM CPL_STARTWPARMSW}
+
+ {$IFDEF UNICODE}
+ CPL_STARTWPARMS = CPL_STARTWPARMSW;
+ {$EXTERNALSYM CPL_STARTWPARMS}
+ {$ELSE}
+ CPL_STARTWPARMS = CPL_STARTWPARMSA;
+ {$EXTERNALSYM CPL_STARTWPARMS}
+ {$ENDIF UNICODE}
+
+// this message parallels CPL_DBLCLK in that the applet should initiate
+// its dialog box. where it differs is that this invocation is coming
+// out of RUNDLL, and there may be some extra directions for execution.
+// lParam1: the applet number.
+// lParam2: an LPSTR to any extra directions that might exist.
+// returns: TRUE if the message was handled; FALSE if not.
+
+// This message is internal to the Control Panel and MAIN applets.
+// It is only sent when an applet is invoked from the Command line
+// during system installation.
+
+ CPL_SETUP = 200;
+ {$EXTERNALSYM CPL_SETUP}
+
+implementation
+
+end.
diff --git a/packages/extra/winunits/jwawincred.pas b/packages/extra/winunits/jwawincred.pas
index c71cd4ec66..8085049b25 100644
--- a/packages/extra/winunits/jwawincred.pas
+++ b/packages/extra/winunits/jwawincred.pas
@@ -1,1570 +1,1570 @@
-{******************************************************************************}
-{ }
-{ Credentials Manager API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: wincred.h, released November 2001. The original Pascal }
-{ code is: WinCred.pas, released March 2002. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwawincred.pas,v 1.1 2005/04/04 07:56:11 marco Exp $
-
-unit JwaWinCred;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "wincred.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaLmCons, JwaWinBase, JwaWinError, JwaWinType, JwaNtSecApi;
-
-type
- PCtxtHandle = PSecHandle;
- {$EXTERNALSYM PCtxtHandle}
-
-//-----------------------------------------------------------------------------
-// Macros
-//-----------------------------------------------------------------------------
-
-//
-// Macro to determine whether CredUIPromptForCredentials should be called upon a failed
-// authentication attempt.
-//
-// Implemented as a macro so that the caller can delay load credui.dll only if this
-// macro returns TRUE.
-//
-// Include only status codes that imply the username/password are wrong or that the
-// password is expired. In the former case, asking for a another username or password
-// is appropriate. In the later case, we put up a different dialog asking the
-// user to change the password on the server.
-//
-// Don't include status codes such as ERROR_ACCOUNT_DISABLED, ERROR_ACCOUNT_RESTRICTION,
-// ERROR_ACCOUNT_LOCKED_OUT, ERROR_ACCOUNT_EXPIRED, ERROR_LOGON_TYPE_NOT_GRANTED.
-// For those, the user isn't going to have another account so prompting him
-// won't help.
-//
-// STATUS_DOWNGRADE_DETECTED is included to handle the case where a corporate laptop
-// is brought to another LAN. A downgrade attack will indeed be detected,
-// but we want to popup UI to allow the user to connect to resources in the
-// other LAN.
-//
-// Don't use the CREDUIP_* macros directly. Their definition is private to credui.dll.
-//
-
-// Don't require ntstatus.h
-
-const
- STATUS_LOGON_FAILURE = NTSTATUS($C000006D); // ntsubauth
- {$EXTERNALSYM STATUS_LOGON_FAILURE}
- STATUS_WRONG_PASSWORD = NTSTATUS($C000006A); // ntsubauth
- {$EXTERNALSYM STATUS_WRONG_PASSWORD}
- STATUS_PASSWORD_EXPIRED = NTSTATUS($C0000071); // ntsubauth
- {$EXTERNALSYM STATUS_PASSWORD_EXPIRED}
- STATUS_PASSWORD_MUST_CHANGE = NTSTATUS($C0000224); // ntsubauth
- {$EXTERNALSYM STATUS_PASSWORD_MUST_CHANGE}
- STATUS_ACCESS_DENIED = NTSTATUS($C0000022);
- {$EXTERNALSYM STATUS_ACCESS_DENIED}
- STATUS_DOWNGRADE_DETECTED = NTSTATUS($C0000388);
- {$EXTERNALSYM STATUS_DOWNGRADE_DETECTED}
- STATUS_AUTHENTICATION_FIREWALL_FAILED = NTSTATUS($C0000413);
- {$EXTERNALSYM STATUS_AUTHENTICATION_FIREWALL_FAILED}
- STATUS_ACCOUNT_DISABLED = NTSTATUS($C0000072); // ntsubauth
- {$EXTERNALSYM STATUS_ACCOUNT_DISABLED}
- STATUS_ACCOUNT_RESTRICTION = NTSTATUS($C000006E); // ntsubauth
- {$EXTERNALSYM STATUS_ACCOUNT_RESTRICTION}
- STATUS_ACCOUNT_LOCKED_OUT = NTSTATUS($C0000234); // ntsubauth
- {$EXTERNALSYM STATUS_ACCOUNT_LOCKED_OUT}
- STATUS_ACCOUNT_EXPIRED = NTSTATUS($C0000193); // ntsubauth
- {$EXTERNALSYM STATUS_ACCOUNT_EXPIRED}
- STATUS_LOGON_TYPE_NOT_GRANTED = NTSTATUS($C000015B);
- {$EXTERNALSYM STATUS_LOGON_TYPE_NOT_GRANTED}
-
-// Don't require lmerr.h
-
- NERR_BASE = 2100;
- {$EXTERNALSYM NERR_BASE}
- NERR_PasswordExpired = NERR_BASE + 142; // The password of this user has expired.
- {$EXTERNALSYM NERR_PasswordExpired}
-
-function CREDUIP_IS_USER_PASSWORD_ERROR(_Status: NTSTATUS): BOOL;
-{$EXTERNALSYM CREDUIP_IS_USER_PASSWORD_ERROR}
-
-function CREDUIP_IS_DOWNGRADE_ERROR(_Status: NTSTATUS): BOOL;
-{$EXTERNALSYM CREDUIP_IS_DOWNGRADE_ERROR}
-
-function CREDUIP_IS_EXPIRED_ERROR(_Status: NTSTATUS): BOOL;
-{$EXTERNALSYM CREDUIP_IS_EXPIRED_ERROR}
-
-function CREDUI_IS_AUTHENTICATION_ERROR(_Status: NTSTATUS): BOOL;
-{$EXTERNALSYM CREDUI_IS_AUTHENTICATION_ERROR}
-
-function CREDUI_NO_PROMPT_AUTHENTICATION_ERROR(_Status: NTSTATUS): BOOL;
-{$EXTERNALSYM CREDUI_NO_PROMPT_AUTHENTICATION_ERROR}
-
-//-----------------------------------------------------------------------------
-// Structures
-//-----------------------------------------------------------------------------
-
-//
-// Credential Attribute
-//
-
-const
-
-// Maximum length of the various credential string fields (in characters)
-
- CRED_MAX_STRING_LENGTH = 256;
- {$EXTERNALSYM CRED_MAX_STRING_LENGTH}
-
-// Maximum length of the UserName field. The worst case is <User>@<DnsDomain>
-
- CRED_MAX_USERNAME_LENGTH = 256 + 1 + 256;
- {$EXTERNALSYM CRED_MAX_USERNAME_LENGTH}
-
-// Maximum length of the TargetName field for CRED_TYPE_GENERIC (in characters)
-
- CRED_MAX_GENERIC_TARGET_NAME_LENGTH = 32767;
- {$EXTERNALSYM CRED_MAX_GENERIC_TARGET_NAME_LENGTH}
-
-// Maximum length of the TargetName field for CRED_TYPE_DOMAIN_* (in characters)
-// Largest one is <DfsRoot>\<DfsShare>
-
- CRED_MAX_DOMAIN_TARGET_NAME_LENGTH = 256 + 1 + 80;
- {$EXTERNALSYM CRED_MAX_DOMAIN_TARGET_NAME_LENGTH}
-
-// Maximum size of the Credential Attribute Value field (in bytes)
-
- CRED_MAX_VALUE_SIZE = 256;
- {$EXTERNALSYM CRED_MAX_VALUE_SIZE}
-
-// Maximum number of attributes per credential
-
- CRED_MAX_ATTRIBUTES = 64;
- {$EXTERNALSYM CRED_MAX_ATTRIBUTES}
-
-type
- PCREDENTIAL_ATTRIBUTEA = ^CREDENTIAL_ATTRIBUTEA;
- {$EXTERNALSYM PCREDENTIAL_ATTRIBUTEA}
- _CREDENTIAL_ATTRIBUTEA = record
- Keyword: LPSTR;
- Flags: DWORD;
- ValueSize: DWORD;
- Value: LPBYTE;
- end;
- {$EXTERNALSYM _CREDENTIAL_ATTRIBUTEA}
- CREDENTIAL_ATTRIBUTEA = _CREDENTIAL_ATTRIBUTEA;
- {$EXTERNALSYM CREDENTIAL_ATTRIBUTEA}
- TCredentialAttributeA = CREDENTIAL_ATTRIBUTEA;
- PCredentialAttributeA = PCREDENTIAL_ATTRIBUTEA;
-
- PCREDENTIAL_ATTRIBUTEW = ^CREDENTIAL_ATTRIBUTEW;
- {$EXTERNALSYM PCREDENTIAL_ATTRIBUTEW}
- _CREDENTIAL_ATTRIBUTEW = record
- Keyword: LPWSTR;
- Flags: DWORD;
- ValueSize: DWORD;
- Value: LPBYTE;
- end;
- {$EXTERNALSYM _CREDENTIAL_ATTRIBUTEW}
- CREDENTIAL_ATTRIBUTEW = _CREDENTIAL_ATTRIBUTEW;
- {$EXTERNALSYM CREDENTIAL_ATTRIBUTEW}
- TCredentialAttributeW = CREDENTIAL_ATTRIBUTEW;
- PCredentialAttributeW = PCREDENTIAL_ATTRIBUTEW;
-
- {$IFDEF UNICODE}
- CREDENTIAL_ATTRIBUTE = CREDENTIAL_ATTRIBUTEW;
- {$EXTERNALSYM CREDENTIAL_ATTRIBUTE}
- PCREDENTIAL_ATTRIBUTE = PCREDENTIAL_ATTRIBUTEW;
- {$EXTERNALSYM PCREDENTIAL_ATTRIBUTE}
- TCredentialAttribute = TCredentialAttributeW;
- PCredentialAttribute = PCredentialAttributeW;
- {$ELSE}
- CREDENTIAL_ATTRIBUTE = CREDENTIAL_ATTRIBUTEA;
- {$EXTERNALSYM CREDENTIAL_ATTRIBUTE}
- PCREDENTIAL_ATTRIBUTE = PCREDENTIAL_ATTRIBUTEA;
- {$EXTERNALSYM PCREDENTIAL_ATTRIBUTE}
- TCredentialAttribute = TCredentialAttributeA;
- PCredentialAttribute = PCredentialAttributeA;
- {$ENDIF UNICODE}
-
-//
-// Special values of the TargetName field
-//
-
-const
- CRED_SESSION_WILDCARD_NAME_W = WideString('*Session');
- {$EXTERNALSYM CRED_SESSION_WILDCARD_NAME_W}
- CRED_SESSION_WILDCARD_NAME_A = '*Session';
- {$EXTERNALSYM CRED_SESSION_WILDCARD_NAME_A}
- CRED_SESSION_WILDCARD_NAME_LENGTH = SizeOf(CRED_SESSION_WILDCARD_NAME_A) - 1;
- {$EXTERNALSYM CRED_SESSION_WILDCARD_NAME_LENGTH}
-
- {$IFDEF UNICODE}
- CRED_SESSION_WILDCARD_NAME = CRED_SESSION_WILDCARD_NAME_W;
- {$EXTERNALSYM CRED_SESSION_WILDCARD_NAME}
- {$ELSE}
- CRED_SESSION_WILDCARD_NAME = CRED_SESSION_WILDCARD_NAME_A;
- {$EXTERNALSYM CRED_SESSION_WILDCARD_NAME}
- {$ENDIF UNICODE}
-
-//
-// Values of the Credential Flags field.
-//
-
-const
- CRED_FLAGS_PASSWORD_FOR_CERT = $0001;
- {$EXTERNALSYM CRED_FLAGS_PASSWORD_FOR_CERT}
- CRED_FLAGS_PROMPT_NOW = $0002;
- {$EXTERNALSYM CRED_FLAGS_PROMPT_NOW}
- CRED_FLAGS_USERNAME_TARGET = $0004;
- {$EXTERNALSYM CRED_FLAGS_USERNAME_TARGET}
- CRED_FLAGS_OWF_CRED_BLOB = $0008;
- {$EXTERNALSYM CRED_FLAGS_OWF_CRED_BLOB}
- CRED_FLAGS_VALID_FLAGS = $000F; // Mask of all valid flags
- {$EXTERNALSYM CRED_FLAGS_VALID_FLAGS}
-
-//
-// Values of the Credential Type field.
-//
-
- CRED_TYPE_GENERIC = 1;
- {$EXTERNALSYM CRED_TYPE_GENERIC}
- CRED_TYPE_DOMAIN_PASSWORD = 2;
- {$EXTERNALSYM CRED_TYPE_DOMAIN_PASSWORD}
- CRED_TYPE_DOMAIN_CERTIFICATE = 3;
- {$EXTERNALSYM CRED_TYPE_DOMAIN_CERTIFICATE}
- CRED_TYPE_DOMAIN_VISIBLE_PASSWORD = 4;
- {$EXTERNALSYM CRED_TYPE_DOMAIN_VISIBLE_PASSWORD}
- CRED_TYPE_MAXIMUM = 5; // Maximum supported cred type
- {$EXTERNALSYM CRED_TYPE_MAXIMUM}
- CRED_TYPE_MAXIMUM_EX = CRED_TYPE_MAXIMUM + 1000; // Allow new applications to run on old OSes
- {$EXTERNALSYM CRED_TYPE_MAXIMUM_EX}
-
-//
-// Maximum size of the CredBlob field (in bytes)
-//
-
- CRED_MAX_CREDENTIAL_BLOB_SIZE = 512;
- {$EXTERNALSYM CRED_MAX_CREDENTIAL_BLOB_SIZE}
-
-//
-// Values of the Credential Persist field
-//
-
- CRED_PERSIST_NONE = 0;
- {$EXTERNALSYM CRED_PERSIST_NONE}
- CRED_PERSIST_SESSION = 1;
- {$EXTERNALSYM CRED_PERSIST_SESSION}
- CRED_PERSIST_LOCAL_MACHINE = 2;
- {$EXTERNALSYM CRED_PERSIST_LOCAL_MACHINE}
- CRED_PERSIST_ENTERPRISE = 3;
- {$EXTERNALSYM CRED_PERSIST_ENTERPRISE}
-
-//
-// A credential
-//
-
-type
- PCREDENTIALA = ^CREDENTIALA;
- {$EXTERNALSYM PCREDENTIALA}
- _CREDENTIALA = record
- Flags: DWORD;
- Type_: DWORD;
- TargetName: LPSTR;
- Comment: LPSTR;
- LastWritten: FILETIME;
- CredentialBlobSize: DWORD;
- CredentialBlob: LPBYTE;
- Persist: DWORD;
- AttributeCount: DWORD;
- Attributes: PCREDENTIAL_ATTRIBUTEA;
- TargetAlias: LPSTR;
- UserName: LPSTR;
- end;
- {$EXTERNALSYM _CREDENTIALA}
- CREDENTIALA = _CREDENTIALA;
- {$EXTERNALSYM CREDENTIALA}
- TCredentialA = CREDENTIALA;
-
- PCREDENTIALW = ^CREDENTIALW;
- {$EXTERNALSYM PCREDENTIALW}
- _CREDENTIALW = record
- Flags: DWORD;
- Type_: DWORD;
- TargetName: LPWSTR;
- Comment: LPWSTR;
- LastWritten: FILETIME;
- CredentialBlobSize: DWORD;
- CredentialBlob: LPBYTE;
- Persist: DWORD;
- AttributeCount: DWORD;
- Attributes: PCREDENTIAL_ATTRIBUTEW;
- TargetAlias: LPWSTR;
- UserName: LPWSTR;
- end;
- {$EXTERNALSYM _CREDENTIALW}
- CREDENTIALW = _CREDENTIALW;
- {$EXTERNALSYM CREDENTIALW}
- TCredentialW = CREDENTIALW;
-
- {$IFDEF UNICODE}
- CREDENTIAL = CREDENTIALW;
- {$EXTERNALSYM CREDENTIAL}
- PCREDENTIAL = PCREDENTIALW;
- {$EXTERNALSYM PCREDENTIAL}
- TCredential = TCredentialW;
- {$ELSE}
- CREDENTIAL = CREDENTIALA;
- {$EXTERNALSYM CREDENTIAL}
- PCREDENTIAL = PCREDENTIALA;
- {$EXTERNALSYM PCREDENTIAL}
- TCredential = TCredentialA;
- {$ENDIF UNICODE}
-
-//
-// Value of the Flags field in CREDENTIAL_TARGET_INFORMATION
-//
-
-const
- CRED_TI_SERVER_FORMAT_UNKNOWN = $0001; // Don't know if server name is DNS or netbios format
- {$EXTERNALSYM CRED_TI_SERVER_FORMAT_UNKNOWN}
- CRED_TI_DOMAIN_FORMAT_UNKNOWN = $0002; // Don't know if domain name is DNS or netbios format
- {$EXTERNALSYM CRED_TI_DOMAIN_FORMAT_UNKNOWN}
- CRED_TI_ONLY_PASSWORD_REQUIRED = $0004; // Server only requires a password and not a username
- {$EXTERNALSYM CRED_TI_ONLY_PASSWORD_REQUIRED}
- CRED_TI_USERNAME_TARGET = $0008; // TargetName is username
- {$EXTERNALSYM CRED_TI_USERNAME_TARGET}
- CRED_TI_CREATE_EXPLICIT_CRED = $0010; // When creating a cred, create one named TargetInfo->TargetName
- {$EXTERNALSYM CRED_TI_CREATE_EXPLICIT_CRED}
- CRED_TI_WORKGROUP_MEMBER = $0020; // Indicates the machine is a member of a workgroup
- {$EXTERNALSYM CRED_TI_WORKGROUP_MEMBER}
- CRED_TI_VALID_FLAGS = $003F;
- {$EXTERNALSYM CRED_TI_VALID_FLAGS}
-
-//
-// A credential target
-//
-
-type
- PCREDENTIAL_TARGET_INFORMATIONA = ^CREDENTIAL_TARGET_INFORMATIONA;
- {$EXTERNALSYM PCREDENTIAL_TARGET_INFORMATIONA}
- _CREDENTIAL_TARGET_INFORMATIONA = record
- TargetName: LPSTR;
- NetbiosServerName: LPSTR;
- DnsServerName: LPSTR;
- NetbiosDomainName: LPSTR;
- DnsDomainName: LPSTR;
- DnsTreeName: LPSTR;
- PackageName: LPSTR;
- Flags: ULONG;
- CredTypeCount: DWORD;
- CredTypes: LPDWORD;
- end;
- {$EXTERNALSYM _CREDENTIAL_TARGET_INFORMATIONA}
- CREDENTIAL_TARGET_INFORMATIONA = _CREDENTIAL_TARGET_INFORMATIONA;
- {$EXTERNALSYM CREDENTIAL_TARGET_INFORMATIONA}
- TCredentialTargetInformationA = CREDENTIAL_TARGET_INFORMATIONA;
- PCredentialTargetInformationA = PCREDENTIAL_TARGET_INFORMATIONA;
-
- PCREDENTIAL_TARGET_INFORMATIONW = ^CREDENTIAL_TARGET_INFORMATIONW;
- {$EXTERNALSYM PCREDENTIAL_TARGET_INFORMATIONW}
- _CREDENTIAL_TARGET_INFORMATIONW = record
- TargetName: LPWSTR;
- NetbiosServerName: LPWSTR;
- DnsServerName: LPWSTR;
- NetbiosDomainName: LPWSTR;
- DnsDomainName: LPWSTR;
- DnsTreeName: LPWSTR;
- PackageName: LPWSTR;
- Flags: ULONG;
- CredTypeCount: DWORD;
- CredTypes: LPDWORD;
- end;
- {$EXTERNALSYM _CREDENTIAL_TARGET_INFORMATIONW}
- CREDENTIAL_TARGET_INFORMATIONW = _CREDENTIAL_TARGET_INFORMATIONW;
- {$EXTERNALSYM CREDENTIAL_TARGET_INFORMATIONW}
- TCredentialTargetInformationW = CREDENTIAL_TARGET_INFORMATIONW;
- PCredentialTargetInformationW = PCREDENTIAL_TARGET_INFORMATIONW;
-
- {$IFDEF UNICODE}
- CREDENTIAL_TARGET_INFORMATION = CREDENTIAL_TARGET_INFORMATIONW;
- {$EXTERNALSYM CREDENTIAL_TARGET_INFORMATION}
- PCREDENTIAL_TARGET_INFORMATION = PCREDENTIAL_TARGET_INFORMATIONW;
- {$EXTERNALSYM PCREDENTIAL_TARGET_INFORMATION}
- TCredentialTargetInformation = TCredentialTargetInformationW;
- PCredentialTargetInformation = PCredentialTargetInformationW;
- {$ELSE}
- CREDENTIAL_TARGET_INFORMATION = CREDENTIAL_TARGET_INFORMATIONA;
- {$EXTERNALSYM CREDENTIAL_TARGET_INFORMATION}
- PCREDENTIAL_TARGET_INFORMATION = PCREDENTIAL_TARGET_INFORMATIONA;
- {$EXTERNALSYM PCREDENTIAL_TARGET_INFORMATION}
- TCredentialTargetInformation = TCredentialTargetInformationA;
- PCredentialTargetInformation = PCredentialTargetInformationA;
- {$ENDIF UNICODE}
-
-//
-// Certificate credential information
-//
-// The cbSize should be the size of the structure, sizeof(CERT_CREDENTIAL_INFO),
-// rgbHashofCert is the hash of the cert which is to be used as the credential.
-//
-
-const
- CERT_HASH_LENGTH = 20; // SHA1 hashes are used for cert hashes
- {$EXTERNALSYM CERT_HASH_LENGTH}
-
-type
- PCERT_CREDENTIAL_INFO = ^CERT_CREDENTIAL_INFO;
- {$EXTERNALSYM PCERT_CREDENTIAL_INFO}
- _CERT_CREDENTIAL_INFO = record
- cbSize: ULONG;
- rgbHashOfCert: array [0..CERT_HASH_LENGTH - 1] of UCHAR;
- end;
- {$EXTERNALSYM _CERT_CREDENTIAL_INFO}
- CERT_CREDENTIAL_INFO = _CERT_CREDENTIAL_INFO;
- {$EXTERNALSYM CERT_CREDENTIAL_INFO}
- TCertCredentialInfo = CERT_CREDENTIAL_INFO;
- PCertCredentialInfo = PCERT_CREDENTIAL_INFO;
-
-//
-// Username Target credential information
-//
-// This credential can be pass to LsaLogonUser to ask it to find a credential with a
-// TargetName of UserName.
-//
-
- PUSERNAME_TARGET_CREDENTIAL_INFO = ^USERNAME_TARGET_CREDENTIAL_INFO;
- {$EXTERNALSYM PUSERNAME_TARGET_CREDENTIAL_INFO}
- _USERNAME_TARGET_CREDENTIAL_INFO = record
- UserName: LPWSTR;
- end;
- {$EXTERNALSYM _USERNAME_TARGET_CREDENTIAL_INFO}
- USERNAME_TARGET_CREDENTIAL_INFO = _USERNAME_TARGET_CREDENTIAL_INFO;
- {$EXTERNALSYM USERNAME_TARGET_CREDENTIAL_INFO}
- TUsernameTargetCredentialInfo = USERNAME_TARGET_CREDENTIAL_INFO;
- PUsernameTargetCredentialInfo = PUSERNAME_TARGET_CREDENTIAL_INFO;
-
-//
-// Credential type for credential marshaling routines
-//
-
- _CRED_MARSHAL_TYPE = DWORD;
- {$EXTERNALSYM _CRED_MARSHAL_TYPE}
- CRED_MARSHAL_TYPE = _CRED_MARSHAL_TYPE;
- {$EXTERNALSYM CRED_MARSHAL_TYPE}
- PCRED_MARSHAL_TYPE = ^CRED_MARSHAL_TYPE;
- {$EXTERNALSYM PCRED_MARSHAL_TYPE}
- TCredMarshalType = CRED_MARSHAL_TYPE;
- PCredMarshalType = PCRED_MARSHAL_TYPE;
-
-const
- CertCredential = 1;
- {$EXTERNALSYM CertCredential}
- UsernameTargetCredential = 2;
- {$EXTERNALSYM UsernameTargetCredential}
-
-//
-// Credential UI info
-//
-
-type
- PCREDUI_INFOA = ^CREDUI_INFOA;
- {$EXTERNALSYM PCREDUI_INFOA}
- _CREDUI_INFOA = record
- cbSize: DWORD;
- hwndParent: HWND;
- pszMessageText: PCSTR;
- pszCaptionText: PCSTR;
- hbmBanner: HBITMAP;
- end;
- {$EXTERNALSYM _CREDUI_INFOA}
- CREDUI_INFOA = _CREDUI_INFOA;
- {$EXTERNALSYM CREDUI_INFOA}
- TCredUIInfoA = CREDUI_INFOA;
- PCredUIInfoA = PCREDUI_INFOA;
-
- PCREDUI_INFOW = ^CREDUI_INFOW;
- {$EXTERNALSYM PCREDUI_INFOW}
- _CREDUI_INFOW = record
- cbSize: DWORD;
- hwndParent: HWND;
- pszMessageText: LPCWSTR;
- pszCaptionText: LPCWSTR;
- hbmBanner: HBITMAP;
- end;
- {$EXTERNALSYM _CREDUI_INFOW}
- CREDUI_INFOW = _CREDUI_INFOW;
- {$EXTERNALSYM CREDUI_INFOW}
- TCredUIInfoW = CREDUI_INFOW;
- PCredUIInfoW = PCREDUI_INFOW;
-
- {$IFDEF UNICODE}
- CREDUI_INFO = CREDUI_INFOW;
- {$EXTERNALSYM CREDUI_INFO}
- PCREDUI_INFO = PCREDUI_INFOW;
- {$EXTERNALSYM PCREDUI_INFO}
- TCredUIInfo = TCredUIInfoW;
- PCredUIInfo = PCredUIInfoW;
- {$ELSE}
- CREDUI_INFO = CREDUI_INFOA;
- {$EXTERNALSYM CREDUI_INFO}
- PCREDUI_INFO = PCREDUI_INFOA;
- {$EXTERNALSYM PCREDUI_INFO}
- TCredUIInfo = TCredUIInfoA;
- PCredUIInfo = PCredUIInfoA;
- {$ENDIF UNICODE}
-
-//-----------------------------------------------------------------------------
-// Values
-//-----------------------------------------------------------------------------
-
-// String length limits:
-
-const
- CREDUI_MAX_MESSAGE_LENGTH = 32767;
- {$EXTERNALSYM CREDUI_MAX_MESSAGE_LENGTH}
- CREDUI_MAX_CAPTION_LENGTH = 128;
- {$EXTERNALSYM CREDUI_MAX_CAPTION_LENGTH}
- CREDUI_MAX_GENERIC_TARGET_LENGTH = CRED_MAX_GENERIC_TARGET_NAME_LENGTH;
- {$EXTERNALSYM CREDUI_MAX_GENERIC_TARGET_LENGTH}
- CREDUI_MAX_DOMAIN_TARGET_LENGTH = CRED_MAX_DOMAIN_TARGET_NAME_LENGTH;
- {$EXTERNALSYM CREDUI_MAX_DOMAIN_TARGET_LENGTH}
- CREDUI_MAX_USERNAME_LENGTH = CRED_MAX_USERNAME_LENGTH;
- {$EXTERNALSYM CREDUI_MAX_USERNAME_LENGTH}
- CREDUI_MAX_PASSWORD_LENGTH = CRED_MAX_CREDENTIAL_BLOB_SIZE div 2;
- {$EXTERNALSYM CREDUI_MAX_PASSWORD_LENGTH}
-
-//
-// Flags for CredUIPromptForCredentials and/or CredUICmdLinePromptForCredentials
-//
-
- CREDUI_FLAGS_INCORRECT_PASSWORD = $00001; // indicates the username is valid, but password is not
- {$EXTERNALSYM CREDUI_FLAGS_INCORRECT_PASSWORD}
- CREDUI_FLAGS_DO_NOT_PERSIST = $00002; // Do not show "Save" checkbox, and do not persist credentials
- {$EXTERNALSYM CREDUI_FLAGS_DO_NOT_PERSIST}
- CREDUI_FLAGS_REQUEST_ADMINISTRATOR = $00004; // Populate list box with admin accounts
- {$EXTERNALSYM CREDUI_FLAGS_REQUEST_ADMINISTRATOR}
- CREDUI_FLAGS_EXCLUDE_CERTIFICATES = $00008; // do not include certificates in the drop list
- {$EXTERNALSYM CREDUI_FLAGS_EXCLUDE_CERTIFICATES}
- CREDUI_FLAGS_REQUIRE_CERTIFICATE = $00010;
- {$EXTERNALSYM CREDUI_FLAGS_REQUIRE_CERTIFICATE}
- CREDUI_FLAGS_SHOW_SAVE_CHECK_BOX = $00040;
- {$EXTERNALSYM CREDUI_FLAGS_SHOW_SAVE_CHECK_BOX}
- CREDUI_FLAGS_ALWAYS_SHOW_UI = $00080;
- {$EXTERNALSYM CREDUI_FLAGS_ALWAYS_SHOW_UI}
- CREDUI_FLAGS_REQUIRE_SMARTCARD = $00100;
- {$EXTERNALSYM CREDUI_FLAGS_REQUIRE_SMARTCARD}
- CREDUI_FLAGS_PASSWORD_ONLY_OK = $00200;
- {$EXTERNALSYM CREDUI_FLAGS_PASSWORD_ONLY_OK}
- CREDUI_FLAGS_VALIDATE_USERNAME = $00400;
- {$EXTERNALSYM CREDUI_FLAGS_VALIDATE_USERNAME}
- CREDUI_FLAGS_COMPLETE_USERNAME = $00800;
- {$EXTERNALSYM CREDUI_FLAGS_COMPLETE_USERNAME}
- CREDUI_FLAGS_PERSIST = $01000; // Do not show "Save" checkbox, but persist credentials anyway
- {$EXTERNALSYM CREDUI_FLAGS_PERSIST}
- CREDUI_FLAGS_SERVER_CREDENTIAL = $04000;
- {$EXTERNALSYM CREDUI_FLAGS_SERVER_CREDENTIAL}
- CREDUI_FLAGS_EXPECT_CONFIRMATION = $20000; // do not persist unless caller later confirms credential via CredUIConfirmCredential() api
- {$EXTERNALSYM CREDUI_FLAGS_EXPECT_CONFIRMATION}
- CREDUI_FLAGS_GENERIC_CREDENTIALS = $40000; // Credential is a generic credential
- {$EXTERNALSYM CREDUI_FLAGS_GENERIC_CREDENTIALS}
- CREDUI_FLAGS_USERNAME_TARGET_CREDENTIALS = $80000; // Credential has a username as the target
- {$EXTERNALSYM CREDUI_FLAGS_USERNAME_TARGET_CREDENTIALS}
- CREDUI_FLAGS_KEEP_USERNAME = $100000; // don't allow the user to change the supplied username
- {$EXTERNALSYM CREDUI_FLAGS_KEEP_USERNAME}
-
-//
-// Mask of flags valid for CredUIPromptForCredentials
-//
-
- CREDUI_FLAGS_PROMPT_VALID =
- CREDUI_FLAGS_INCORRECT_PASSWORD or
- CREDUI_FLAGS_DO_NOT_PERSIST or
- CREDUI_FLAGS_REQUEST_ADMINISTRATOR or
- CREDUI_FLAGS_EXCLUDE_CERTIFICATES or
- CREDUI_FLAGS_REQUIRE_CERTIFICATE or
- CREDUI_FLAGS_SHOW_SAVE_CHECK_BOX or
- CREDUI_FLAGS_ALWAYS_SHOW_UI or
- CREDUI_FLAGS_REQUIRE_SMARTCARD or
- CREDUI_FLAGS_PASSWORD_ONLY_OK or
- CREDUI_FLAGS_VALIDATE_USERNAME or
- CREDUI_FLAGS_COMPLETE_USERNAME or
- CREDUI_FLAGS_PERSIST or
- CREDUI_FLAGS_SERVER_CREDENTIAL or
- CREDUI_FLAGS_EXPECT_CONFIRMATION or
- CREDUI_FLAGS_GENERIC_CREDENTIALS or
- CREDUI_FLAGS_USERNAME_TARGET_CREDENTIALS or
- CREDUI_FLAGS_KEEP_USERNAME;
- {$EXTERNALSYM CREDUI_FLAGS_PROMPT_VALID}
-
-//-----------------------------------------------------------------------------
-// Functions
-//-----------------------------------------------------------------------------
-
-//
-// Values of flags to CredWrite and CredWriteDomainCredentials
-//
-
-const
- CRED_PRESERVE_CREDENTIAL_BLOB = $1;
- {$EXTERNALSYM CRED_PRESERVE_CREDENTIAL_BLOB}
-
-function CredWriteA(Credential: PCREDENTIALA; Flags: DWORD): BOOL; stdcall;
-{$EXTERNALSYM CredWriteA}
-function CredWriteW(Credential: PCREDENTIALW; Flags: DWORD): BOOL; stdcall;
-{$EXTERNALSYM CredWriteW}
-function CredWrite(Credential: PCREDENTIAL; Flags: DWORD): BOOL; stdcall;
-{$EXTERNALSYM CredWrite}
-
-function CredReadA(TargetName: LPCSTR; Type_: DWORD; Flags: DWORD; var Credential: PCREDENTIALA): BOOL; stdcall;
-{$EXTERNALSYM CredReadA}
-function CredReadW(TargetName: LPCWSTR; Type_: DWORD; Flags: DWORD; var Credential: PCREDENTIALW): BOOL; stdcall;
-{$EXTERNALSYM CredReadW}
-function CredRead(TargetName: LPCTSTR; Type_: DWORD; Flags: DWORD; var Credential: PCREDENTIAL): BOOL; stdcall;
-{$EXTERNALSYM CredRead}
-
-function CredEnumerateA(Filter: LPCSTR; Flags: DWORD; var Count: DWORD; var Credential: PCREDENTIALA): BOOL; stdcall;
-{$EXTERNALSYM CredEnumerateA}
-function CredEnumerateW(Filter: LPCWSTR; Flags: DWORD; var Count: DWORD; var Credential: PCREDENTIALW): BOOL; stdcall;
-{$EXTERNALSYM CredEnumerateW}
-function CredEnumerate(Filter: LPCTSTR; Flags: DWORD; var Count: DWORD; var Credential: PCREDENTIAL): BOOL; stdcall;
-{$EXTERNALSYM CredEnumerate}
-
-function CredWriteDomainCredentialsA(TargetInfo: PCREDENTIAL_TARGET_INFORMATIONA; Credential: PCREDENTIALA; Flags: DWORD): BOOL; stdcall;
-{$EXTERNALSYM CredWriteDomainCredentialsA}
-function CredWriteDomainCredentialsW(TargetInfo: PCREDENTIAL_TARGET_INFORMATIONW; Credential: PCREDENTIALW; Flags: DWORD): BOOL; stdcall;
-{$EXTERNALSYM CredWriteDomainCredentialsW}
-function CredWriteDomainCredentials(TargetInfo: PCREDENTIAL_TARGET_INFORMATION; Credential: PCREDENTIAL; Flags: DWORD): BOOL; stdcall;
-{$EXTERNALSYM CredWriteDomainCredentials}
-
-//
-// Values of flags to CredReadDomainCredentials
-//
-
-const
- CRED_CACHE_TARGET_INFORMATION = $1;
- {$EXTERNALSYM CRED_CACHE_TARGET_INFORMATION}
-
-function CredReadDomainCredentialsA(TargetInfo: PCREDENTIAL_TARGET_INFORMATIONA; Flags: DWORD; var Count: DWORD; var Credential: PCREDENTIALA): BOOL; stdcall;
-{$EXTERNALSYM CredReadDomainCredentialsA}
-function CredReadDomainCredentialsW(TargetInfo: PCREDENTIAL_TARGET_INFORMATIONW; Flags: DWORD; var Count: DWORD; var Credential: PCREDENTIALW): BOOL; stdcall;
-{$EXTERNALSYM CredReadDomainCredentialsW}
-function CredReadDomainCredentials(TargetInfo: PCREDENTIAL_TARGET_INFORMATION; Flags: DWORD; var Count: DWORD; var Credential: PCREDENTIAL): BOOL; stdcall;
-{$EXTERNALSYM CredReadDomainCredentials}
-
-function CredDeleteA(TargetName: LPCSTR; Type_: DWORD; Flags: DWORD): BOOL; stdcall;
-{$EXTERNALSYM CredDeleteA}
-function CredDeleteW(TargetName: LPCWSTR; Type_: DWORD; Flags: DWORD): BOOL; stdcall;
-{$EXTERNALSYM CredDeleteW}
-function CredDelete(TargetName: LPCTSTR; Type_: DWORD; Flags: DWORD): BOOL; stdcall;
-{$EXTERNALSYM CredDelete}
-
-function CredRenameA(OldTargetName: LPCSTR; NewTargetName: LPCSTR; Type_: DWORD; Flags: DWORD): BOOL; stdcall;
-{$EXTERNALSYM CredRenameA}
-function CredRenameW(OldTargetName: LPCWSTR; NewTargetName: LPCWSTR; Type_: DWORD; Flags: DWORD): BOOL; stdcall;
-{$EXTERNALSYM CredRenameW}
-function CredRename(OldTargetName: LPCTSTR; NewTargetName: LPCTSTR; Type_: DWORD; Flags: DWORD): BOOL; stdcall;
-{$EXTERNALSYM CredRename}
-
-//
-// Values of flags to CredGetTargetInfo
-//
-
-const
- CRED_ALLOW_NAME_RESOLUTION = $1;
- {$EXTERNALSYM CRED_ALLOW_NAME_RESOLUTION}
-
-function CredGetTargetInfoA(TargetName: LPCSTR; Flags: DWORD; var TargetInfo: PCREDENTIAL_TARGET_INFORMATIONA): BOOL; stdcall;
-{$EXTERNALSYM CredGetTargetInfoA}
-function CredGetTargetInfoW(TargetName: LPCWSTR; Flags: DWORD; var TargetInfo: PCREDENTIAL_TARGET_INFORMATIONW): BOOL; stdcall;
-{$EXTERNALSYM CredGetTargetInfoW}
-function CredGetTargetInfo(TargetName: LPCTSTR; Flags: DWORD; var TargetInfo: PCREDENTIAL_TARGET_INFORMATION): BOOL; stdcall;
-{$EXTERNALSYM CredGetTargetInfo}
-
-function CredMarshalCredentialA(CredType: CRED_MARSHAL_TYPE; Credential: PVOID; MarshaledCredential: LPSTR): BOOL; stdcall;
-{$EXTERNALSYM CredMarshalCredentialA}
-function CredMarshalCredentialW(CredType: CRED_MARSHAL_TYPE; Credential: PVOID; var MarshaledCredential: LPWSTR): BOOL; stdcall;
-{$EXTERNALSYM CredMarshalCredentialW}
-function CredMarshalCredential(CredType: CRED_MARSHAL_TYPE; Credential: PVOID; var MarshaledCredential: LPTSTR): BOOL; stdcall;
-{$EXTERNALSYM CredMarshalCredential}
-
-function CredUnmarshalCredentialA(MarshaledCredential: LPCSTR; CredType: PCRED_MARSHAL_TYPE; Credential: PVOID): BOOL; stdcall;
-{$EXTERNALSYM CredUnmarshalCredentialA}
-function CredUnmarshalCredentialW(MarshaledCredential: LPCWSTR; CredType: PCRED_MARSHAL_TYPE; var Credential: PVOID): BOOL; stdcall;
-{$EXTERNALSYM CredUnmarshalCredentialW}
-function CredUnmarshalCredential(MarshaledCredential: LPCTSTR; CredType: PCRED_MARSHAL_TYPE; var Credential: PVOID): BOOL; stdcall;
-{$EXTERNALSYM CredUnmarshalCredential}
-
-function CredIsMarshaledCredentialA(MarshaledCredential: LPCSTR): BOOL; stdcall;
-{$EXTERNALSYM CredIsMarshaledCredentialA}
-function CredIsMarshaledCredentialW(MarshaledCredential: LPCWSTR): BOOL; stdcall;
-{$EXTERNALSYM CredIsMarshaledCredentialW}
-function CredIsMarshaledCredential(MarshaledCredential: LPCTSTR): BOOL; stdcall;
-{$EXTERNALSYM CredIsMarshaledCredential}
-
-function CredGetSessionTypes(MaximumPersistCount: DWORD; MaximumPersist: LPDWORD): BOOL; stdcall;
-{$EXTERNALSYM CredGetSessionTypes}
-
-procedure CredFree(Buffer: PVOID); stdcall;
-{$EXTERNALSYM CredFree}
-
-function CredUIPromptForCredentialsA(pUiInfo: PCREDUI_INFOA; pszTargetName: PCSTR; pContext: PCtxtHandle; dwAuthError: DWORD; pszUserName: PSTR; ulUserNameBufferSize: ULONG; pszPassword: PSTR; ulPasswordBufferSize: ULONG; var save: BOOL; dwFlags: DWORD): DWORD; stdcall;
-{$EXTERNALSYM CredUIPromptForCredentialsA}
-function CredUIPromptForCredentialsW(pUiInfo: PCREDUI_INFOW; pszTargetName: LPCWSTR; pContext: PCtxtHandle; dwAuthError: DWORD; pszUserName: PWSTR; ulUserNameBufferSize: ULONG; pszPassword: PWSTR; ulPasswordBufferSize: ULONG; var save: BOOL; dwFlags: DWORD): DWORD; stdcall;
-{$EXTERNALSYM CredUIPromptForCredentialsW}
-function CredUIPromptForCredentials(pUiInfo: PCREDUI_INFO; pszTargetName: LPCTSTR; pContext: PCtxtHandle; dwAuthError: DWORD; pszUserName: PTSTR; ulUserNameBufferSize: ULONG; pszPassword: PTSTR; ulPasswordBufferSize: ULONG; var save: BOOL; dwFlags: DWORD): DWORD; stdcall;
-{$EXTERNALSYM CredUIPromptForCredentials}
-
-function CredUIParseUserNameA(pszUserName: PCSTR; pszUser: PSTR; ulUserBufferSize: ULONG; pszDomain: PSTR; ulDomainBufferSize: ULONG): DWORD; stdcall;
-{$EXTERNALSYM CredUIParseUserNameA}
-function CredUIParseUserNameW(pszUserName: LPCWSTR; pszUser: PWSTR; ulUserBufferSize: ULONG; pszDomain: PWSTR; ulDomainBufferSize: ULONG): DWORD; stdcall;
-{$EXTERNALSYM CredUIParseUserNameW}
-function CredUIParseUserName(pszUserName: LPCTSTR; pszUser: PTSTR; ulUserBufferSize: ULONG; pszDomain: PTSTR; ulDomainBufferSize: ULONG): DWORD; stdcall;
-{$EXTERNALSYM CredUIParseUserName}
-
-function CredUICmdLinePromptForCredentialsA(pszTargetName: PCSTR; pContext: PCtxtHandle; dwAuthError: DWORD; UserName: PSTR; ulUserBufferSize: ULONG; pszPassword: PSTR; ulPasswordBufferSize: ULONG; pfSave: PBOOL; dwFlags: DWORD): DWORD; stdcall;
-{$EXTERNALSYM CredUICmdLinePromptForCredentialsA}
-function CredUICmdLinePromptForCredentialsW(pszTargetName: LPCWSTR; pContext: PCtxtHandle; dwAuthError: DWORD; UserName: PWSTR; ulUserBufferSize: ULONG; pszPassword: PWSTR; ulPasswordBufferSize: ULONG; pfSave: PBOOL; dwFlags: DWORD): DWORD; stdcall;
-{$EXTERNALSYM CredUICmdLinePromptForCredentialsW}
-function CredUICmdLinePromptForCredentials(pszTargetName: LPCTSTR; pContext: PCtxtHandle; dwAuthError: DWORD; UserName: PTSTR; ulUserBufferSize: ULONG; pszPassword: PTSTR; ulPasswordBufferSize: ULONG; pfSave: PBOOL; dwFlags: DWORD): DWORD; stdcall;
-{$EXTERNALSYM CredUICmdLinePromptForCredentials}
-
-//
-// Call this API with bConfirm set to TRUE to confirm that the credential (previously created
-// via CredUIGetCredentials or CredUIPromptForCredentials worked, or with bConfirm set to FALSE
-// to indicate it didn't
-
-function CredUIConfirmCredentialsA(pszTargetName: PCSTR; bConfirm: BOOL): DWORD; stdcall;
-{$EXTERNALSYM CredUIConfirmCredentialsA}
-function CredUIConfirmCredentialsW(pszTargetName: LPCWSTR; bConfirm: BOOL): DWORD; stdcall;
-{$EXTERNALSYM CredUIConfirmCredentialsW}
-function CredUIConfirmCredentials(pszTargetName: LPCTSTR; bConfirm: BOOL): DWORD; stdcall;
-{$EXTERNALSYM CredUIConfirmCredentials}
-
-function CredUIStoreSSOCredW(pszRealm, pszUsername, pszPassword: LPCWSTR; bPersist: BOOL): DWORD; stdcall;
-{$EXTERNALSYM CredUIStoreSSOCredW}
-
-function CredUIReadSSOCredW(pszRealm: LPCWSTR; out ppszUsername: PWSTR): DWORD; stdcall;
-{$EXTERNALSYM CredUIReadSSOCredW}
-
-implementation
-
-const
- credapi = 'advapi32.dll';
- credui = 'credui.dll';
- {$IFDEF UNICODE}
- AWSuffix = 'W';
- {$ELSE}
- AWSuffix = 'A';
- {$ENDIF UNICODE}
-
-function CREDUIP_IS_USER_PASSWORD_ERROR(_Status: NTSTATUS): BOOL;
-begin
- Result :=
- (DWORD(_Status) = ERROR_LOGON_FAILURE) or
- (_Status = HRESULT_FROM_WIN32(ERROR_LOGON_FAILURE)) or
- (_Status = STATUS_LOGON_FAILURE) or
- (_Status = HRESULT_FROM_NT(STATUS_LOGON_FAILURE)) or
- (DWORD(_Status) = ERROR_ACCESS_DENIED) or
- (_Status = HRESULT_FROM_WIN32(ERROR_ACCESS_DENIED)) or
- (_Status = STATUS_ACCESS_DENIED) or
- (_Status = HRESULT_FROM_NT(STATUS_ACCESS_DENIED)) or
- (DWORD(_Status) = ERROR_INVALID_PASSWORD) or
- (_Status = HRESULT_FROM_WIN32(ERROR_INVALID_PASSWORD)) or
- (_Status = STATUS_WRONG_PASSWORD) or
- (_Status = HRESULT_FROM_NT(STATUS_WRONG_PASSWORD)) or
- (_Status = SEC_E_NO_CREDENTIALS) or
- (_Status = SEC_E_LOGON_DENIED);
-end;
-
-function CREDUIP_IS_DOWNGRADE_ERROR(_Status: NTSTATUS): BOOL;
-begin
- Result :=
- (DWORD(_Status) = ERROR_DOWNGRADE_DETECTED) or
- (_Status = HRESULT_FROM_WIN32(ERROR_DOWNGRADE_DETECTED)) or
- (_Status = STATUS_DOWNGRADE_DETECTED) or
- (_Status = HRESULT_FROM_NT(STATUS_DOWNGRADE_DETECTED))
-end;
-
-function CREDUIP_IS_EXPIRED_ERROR(_Status: NTSTATUS): BOOL;
-begin
- Result :=
- (DWORD(_Status) = ERROR_PASSWORD_EXPIRED) or
- (_Status = HRESULT_FROM_WIN32( ERROR_PASSWORD_EXPIRED)) or
- (_Status = STATUS_PASSWORD_EXPIRED) or
- (_Status = HRESULT_FROM_NT( STATUS_PASSWORD_EXPIRED)) or
- (DWORD(_Status) = ERROR_PASSWORD_MUST_CHANGE) or
- (_Status = HRESULT_FROM_WIN32( ERROR_PASSWORD_MUST_CHANGE)) or
- (_Status = STATUS_PASSWORD_MUST_CHANGE) or
- (_Status = HRESULT_FROM_NT( STATUS_PASSWORD_MUST_CHANGE)) or
- (_Status = NERR_PasswordExpired) or
- (_Status = HRESULT_FROM_WIN32(NERR_PasswordExpired));
-end;
-
-function CREDUI_IS_AUTHENTICATION_ERROR(_Status: NTSTATUS): BOOL;
-begin
- Result := CREDUIP_IS_USER_PASSWORD_ERROR(_Status) or CREDUIP_IS_DOWNGRADE_ERROR(_Status) or CREDUIP_IS_EXPIRED_ERROR(_Status);
-end;
-
-function CREDUI_NO_PROMPT_AUTHENTICATION_ERROR(_Status: NTSTATUS): BOOL;
-begin
- Result :=
- (_Status = NTSTATUS(ERROR_AUTHENTICATION_FIREWALL_FAILED)) or
- (_Status = HRESULT_FROM_WIN32(ERROR_AUTHENTICATION_FIREWALL_FAILED)) or
- (_Status = STATUS_AUTHENTICATION_FIREWALL_FAILED) or
- (_Status = HRESULT_FROM_NT(STATUS_AUTHENTICATION_FIREWALL_FAILED)) or
- (DWORD(_Status) = ERROR_ACCOUNT_DISABLED) or
- (_Status = HRESULT_FROM_WIN32(ERROR_ACCOUNT_DISABLED)) or
- (_Status = STATUS_ACCOUNT_DISABLED) or
- (_Status = HRESULT_FROM_NT(STATUS_ACCOUNT_DISABLED)) or
- (DWORD(_Status) = ERROR_ACCOUNT_RESTRICTION) or
- (_Status = HRESULT_FROM_WIN32(ERROR_ACCOUNT_RESTRICTION)) or
- (_Status = STATUS_ACCOUNT_RESTRICTION) or
- (_Status = HRESULT_FROM_NT(STATUS_ACCOUNT_RESTRICTION)) or
- (DWORD(_Status) = ERROR_ACCOUNT_LOCKED_OUT) or
- (_Status = HRESULT_FROM_WIN32(ERROR_ACCOUNT_LOCKED_OUT)) or
- (_Status = STATUS_ACCOUNT_LOCKED_OUT) or
- (_Status = HRESULT_FROM_NT(STATUS_ACCOUNT_LOCKED_OUT)) or
- (DWORD(_Status) = ERROR_ACCOUNT_EXPIRED) or
- (_Status = HRESULT_FROM_WIN32(ERROR_ACCOUNT_EXPIRED)) or
- (_Status = STATUS_ACCOUNT_EXPIRED) or
- (_Status = HRESULT_FROM_NT(STATUS_ACCOUNT_EXPIRED)) or
- (DWORD(_Status) = ERROR_LOGON_TYPE_NOT_GRANTED) or
- (_Status = HRESULT_FROM_WIN32(ERROR_LOGON_TYPE_NOT_GRANTED)) or
- (_Status = STATUS_LOGON_TYPE_NOT_GRANTED) or
- (_Status = HRESULT_FROM_NT(STATUS_LOGON_TYPE_NOT_GRANTED));
-end;
-
-{$IFDEF DYNAMIC_LINK}
-
-var
- _CredWriteW: Pointer;
-
-function CredWriteW;
-begin
- GetProcedureAddress(_CredWriteW, credapi, 'CredWriteW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CredWriteW]
- end;
-end;
-
-var
- _CredWriteA: Pointer;
-
-function CredWriteA;
-begin
- GetProcedureAddress(_CredWriteA, credapi, 'CredWriteA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CredWriteA]
- end;
-end;
-
-var
- _CredWrite: Pointer;
-
-function CredWrite;
-begin
- GetProcedureAddress(_CredWrite, credapi, 'CredWrite' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CredWrite]
- end;
-end;
-
-var
- _CredReadW: Pointer;
-
-function CredReadW;
-begin
- GetProcedureAddress(_CredReadW, credapi, 'CredReadW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CredReadW]
- end;
-end;
-
-var
- _CredReadA: Pointer;
-
-function CredReadA;
-begin
- GetProcedureAddress(_CredReadA, credapi, 'CredReadA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CredReadA]
- end;
-end;
-
-var
- _CredRead: Pointer;
-
-function CredRead;
-begin
- GetProcedureAddress(_CredRead, credapi, 'CredRead' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CredRead]
- end;
-end;
-
-var
- _CredEnumerateW: Pointer;
-
-function CredEnumerateW;
-begin
- GetProcedureAddress(_CredEnumerateW, credapi, 'CredEnumerateW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CredEnumerateW]
- end;
-end;
-
-var
- _CredEnumerateA: Pointer;
-
-function CredEnumerateA;
-begin
- GetProcedureAddress(_CredEnumerateA, credapi, 'CredEnumerateA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CredEnumerateA]
- end;
-end;
-
-var
- _CredEnumerate: Pointer;
-
-function CredEnumerate;
-begin
- GetProcedureAddress(_CredEnumerate, credapi, 'CredEnumerate' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CredEnumerate]
- end;
-end;
-
-var
- _CredWriteDomainCredentialsW: Pointer;
-
-function CredWriteDomainCredentialsW;
-begin
- GetProcedureAddress(_CredWriteDomainCredentialsW, credapi, 'CredWriteDomainCredentialsW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CredWriteDomainCredentialsW]
- end;
-end;
-
-var
- _CredWriteDomainCredentialsA: Pointer;
-
-function CredWriteDomainCredentialsA;
-begin
- GetProcedureAddress(_CredWriteDomainCredentialsA, credapi, 'CredWriteDomainCredentialsA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CredWriteDomainCredentialsA]
- end;
-end;
-
-var
- _CredWriteDomainCredentials: Pointer;
-
-function CredWriteDomainCredentials;
-begin
- GetProcedureAddress(_CredWriteDomainCredentials, credapi, 'CredWriteDomainCredentials' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CredWriteDomainCredentials]
- end;
-end;
-
-var
- _CredReadDomainCredentialsW: Pointer;
-
-function CredReadDomainCredentialsW;
-begin
- GetProcedureAddress(_CredReadDomainCredentialsW, credapi, 'CredReadDomainCredentialsW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CredReadDomainCredentialsW]
- end;
-end;
-
-var
- _CredReadDomainCredentialsA: Pointer;
-
-function CredReadDomainCredentialsA;
-begin
- GetProcedureAddress(_CredReadDomainCredentialsA, credapi, 'CredReadDomainCredentialsA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CredReadDomainCredentialsA]
- end;
-end;
-
-var
- _CredReadDomainCredentials: Pointer;
-
-function CredReadDomainCredentials;
-begin
- GetProcedureAddress(_CredReadDomainCredentials, credapi, 'CredReadDomainCredentials' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CredReadDomainCredentials]
- end;
-end;
-
-var
- _CredDeleteW: Pointer;
-
-function CredDeleteW;
-begin
- GetProcedureAddress(_CredDeleteW, credapi, 'CredDeleteW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CredDeleteW]
- end;
-end;
-
-var
- _CredDeleteA: Pointer;
-
-function CredDeleteA;
-begin
- GetProcedureAddress(_CredDeleteA, credapi, 'CredDeleteA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CredDeleteA]
- end;
-end;
-
-var
- _CredDelete: Pointer;
-
-function CredDelete;
-begin
- GetProcedureAddress(_CredDelete, credapi, 'CredDelete' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CredDelete]
- end;
-end;
-
-var
- _CredRenameW: Pointer;
-
-function CredRenameW;
-begin
- GetProcedureAddress(_CredRenameW, credapi, 'CredRenameW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CredRenameW]
- end;
-end;
-
-var
- _CredRenameA: Pointer;
-
-function CredRenameA;
-begin
- GetProcedureAddress(_CredRenameA, credapi, 'CredRenameA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CredRenameA]
- end;
-end;
-
-var
- _CredRename: Pointer;
-
-function CredRename;
-begin
- GetProcedureAddress(_CredRename, credapi, 'CredRename' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CredRename]
- end;
-end;
-
-var
- _CredGetTargetInfoW: Pointer;
-
-function CredGetTargetInfoW;
-begin
- GetProcedureAddress(_CredGetTargetInfoW, credapi, 'CredGetTargetInfoW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CredGetTargetInfoW]
- end;
-end;
-
-var
- _CredGetTargetInfoA: Pointer;
-
-function CredGetTargetInfoA;
-begin
- GetProcedureAddress(_CredGetTargetInfoA, credapi, 'CredGetTargetInfoA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CredGetTargetInfoA]
- end;
-end;
-
-var
- _CredGetTargetInfo: Pointer;
-
-function CredGetTargetInfo;
-begin
- GetProcedureAddress(_CredGetTargetInfo, credapi, 'CredGetTargetInfoA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CredGetTargetInfo]
- end;
-end;
-
-var
- _CredMarshalCredentialW: Pointer;
-
-function CredMarshalCredentialW;
-begin
- GetProcedureAddress(_CredMarshalCredentialW, credapi, 'CredMarshalCredentialW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CredMarshalCredentialW]
- end;
-end;
-
-var
- _CredMarshalCredentialA: Pointer;
-
-function CredMarshalCredentialA;
-begin
- GetProcedureAddress(_CredMarshalCredentialA, credapi, 'CredMarshalCredentialA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CredMarshalCredentialA]
- end;
-end;
-
-var
- _CredMarshalCredential: Pointer;
-
-function CredMarshalCredential;
-begin
- GetProcedureAddress(_CredMarshalCredential, credapi, 'CredMarshalCredential' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CredMarshalCredential]
- end;
-end;
-
-var
- _CredUnmarshalCredentialW: Pointer;
-
-function CredUnmarshalCredentialW;
-begin
- GetProcedureAddress(_CredUnmarshalCredentialW, credapi, 'CredUnmarshalCredentialW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CredUnmarshalCredentialW]
- end;
-end;
-
-var
- _CredUnmarshalCredentialA: Pointer;
-
-function CredUnmarshalCredentialA;
-begin
- GetProcedureAddress(_CredUnmarshalCredentialA, credapi, 'CredUnmarshalCredentialA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CredUnmarshalCredentialA]
- end;
-end;
-
-var
- _CredUnmarshalCredential: Pointer;
-
-function CredUnmarshalCredential;
-begin
- GetProcedureAddress(_CredUnmarshalCredential, credapi, 'CredUnmarshalCredential' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CredUnmarshalCredential]
- end;
-end;
-
-var
- _CredIsMarshaledCredentialW: Pointer;
-
-function CredIsMarshaledCredentialW;
-begin
- GetProcedureAddress(_CredIsMarshaledCredentialW, credapi, 'CredIsMarshaledCredentialW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CredIsMarshaledCredentialW]
- end;
-end;
-
-var
- _CredIsMarshaledCredentialA: Pointer;
-
-function CredIsMarshaledCredentialA;
-begin
- GetProcedureAddress(_CredIsMarshaledCredentialA, credapi, 'CredIsMarshaledCredentialA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CredIsMarshaledCredentialA]
- end;
-end;
-
-var
- _CredIsMarshaledCredential: Pointer;
-
-function CredIsMarshaledCredential;
-begin
- GetProcedureAddress(_CredIsMarshaledCredential, credapi, 'CredIsMarshaledCredential' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CredIsMarshaledCredential]
- end;
-end;
-
-var
- _CredGetSessionTypes: Pointer;
-
-function CredGetSessionTypes;
-begin
- GetProcedureAddress(_CredGetSessionTypes, credapi, 'CredGetSessionTypes');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CredGetSessionTypes]
- end;
-end;
-
-var
- _CredFree: Pointer;
-
-procedure CredFree;
-begin
- GetProcedureAddress(_CredFree, credapi, 'CredFree');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CredFree]
- end;
-end;
-
-var
- _CredUIPromptForCredentialsW: Pointer;
-
-function CredUIPromptForCredentialsW;
-begin
- GetProcedureAddress(_CredUIPromptForCredentialsW, credui, 'CredUIPromptForCredentialsW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CredUIPromptForCredentialsW]
- end;
-end;
-
-var
- _CredUIPromptForCredentialsA: Pointer;
-
-function CredUIPromptForCredentialsA;
-begin
- GetProcedureAddress(_CredUIPromptForCredentialsA, credui, 'CredUIPromptForCredentialsA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CredUIPromptForCredentialsA]
- end;
-end;
-
-var
- _CredUIPromptForCredentials: Pointer;
-
-function CredUIPromptForCredentials;
-begin
- GetProcedureAddress(_CredUIPromptForCredentials, credui, 'CredUIPromptForCredentials' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CredUIPromptForCredentials]
- end;
-end;
-
-var
- _CredUIParseUserNameW: Pointer;
-
-function CredUIParseUserNameW;
-begin
- GetProcedureAddress(_CredUIParseUserNameW, credui, 'CredUIParseUserNameW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CredUIParseUserNameW]
- end;
-end;
-
-var
- _CredUIParseUserNameA: Pointer;
-
-function CredUIParseUserNameA;
-begin
- GetProcedureAddress(_CredUIParseUserNameA, credui, 'CredUIParseUserNameA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CredUIParseUserNameA]
- end;
-end;
-
-var
- _CredUIParseUserName: Pointer;
-
-function CredUIParseUserName;
-begin
- GetProcedureAddress(_CredUIParseUserName, credui, 'CredUIParseUserName' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CredUIParseUserName]
- end;
-end;
-
-var
- _CredUICmdLinePromptForCredentialsW: Pointer;
-
-function CredUICmdLinePromptForCredentialsW;
-begin
- GetProcedureAddress(_CredUICmdLinePromptForCredentialsW, credui, 'CredUICmdLinePromptForCredentialsW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CredUICmdLinePromptForCredentialsW]
- end;
-end;
-
-var
- _CredUICmdLinePromptForCredentialsA: Pointer;
-
-function CredUICmdLinePromptForCredentialsA;
-begin
- GetProcedureAddress(_CredUICmdLinePromptForCredentialsA, credui, 'CredUICmdLinePromptForCredentialsA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CredUICmdLinePromptForCredentialsA]
- end;
-end;
-
-var
- _CredUICmdLinePromptForCredentials: Pointer;
-
-function CredUICmdLinePromptForCredentials;
-begin
- GetProcedureAddress(_CredUICmdLinePromptForCredentials, credui, 'CredUICmdLinePromptForCredentials' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CredUICmdLinePromptForCredentials]
- end;
-end;
-
-var
- _CredUIConfirmCredentialsW: Pointer;
-
-function CredUIConfirmCredentialsW;
-begin
- GetProcedureAddress(_CredUIConfirmCredentialsW, credui, 'CredUIConfirmCredentialsW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CredUIConfirmCredentialsW]
- end;
-end;
-
-var
- _CredUIConfirmCredentialsA: Pointer;
-
-function CredUIConfirmCredentialsA;
-begin
- GetProcedureAddress(_CredUIConfirmCredentialsA, credui, 'CredUIConfirmCredentialsA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CredUIConfirmCredentialsA]
- end;
-end;
-
-var
- _CredUIConfirmCredentials: Pointer;
-
-function CredUIConfirmCredentials;
-begin
- GetProcedureAddress(_CredUIConfirmCredentials, credui, 'CredUIConfirmCredentials' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CredUIConfirmCredentials]
- end;
-end;
-
-var
- _CredUIStoreSSOCredW: Pointer;
-
-function CredUIStoreSSOCredW;
-begin
- GetProcedureAddress(_CredUIStoreSSOCredW, credui, 'CredUIStoreSSOCredW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CredUIStoreSSOCredW]
- end;
-end;
-
-var
- _CredUIReadSSOCredW: Pointer;
-
-function CredUIReadSSOCredW;
-begin
- GetProcedureAddress(_CredUIReadSSOCredW, credui, 'CredUIReadSSOCredW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CredUIReadSSOCredW]
- end;
-end;
-
-{$ELSE}
-
-function CredWriteW; external credapi name 'CredWriteW';
-function CredWriteA; external credapi name 'CredWriteA';
-function CredWrite; external credapi name 'CredWrite' + AWSuffix;
-function CredReadW; external credapi name 'CredReadW';
-function CredReadA; external credapi name 'CredReadA';
-function CredRead; external credapi name 'CredRead' + AWSuffix;
-function CredEnumerateW; external credapi name 'CredEnumerateW';
-function CredEnumerateA; external credapi name 'CredEnumerateA';
-function CredEnumerate; external credapi name 'CredEnumerate' + AWSuffix;
-function CredWriteDomainCredentialsW; external credapi name 'CredWriteDomainCredentialsW';
-function CredWriteDomainCredentialsA; external credapi name 'CredWriteDomainCredentialsA';
-function CredWriteDomainCredentials; external credapi name 'CredWriteDomainCredentials' + AWSuffix;
-function CredReadDomainCredentialsW; external credapi name 'CredReadDomainCredentialsW';
-function CredReadDomainCredentialsA; external credapi name 'CredReadDomainCredentialsA';
-function CredReadDomainCredentials; external credapi name 'CredReadDomainCredentials' + AWSuffix;
-function CredDeleteW; external credapi name 'CredDeleteW';
-function CredDeleteA; external credapi name 'CredDeleteA';
-function CredDelete; external credapi name 'CredDelete' + AWSuffix;
-function CredRenameW; external credapi name 'CredRenameW';
-function CredRenameA; external credapi name 'CredRenameA';
-function CredRename; external credapi name 'CredRename' + AWSuffix;
-function CredGetTargetInfoW; external credapi name 'CredGetTargetInfoW';
-function CredGetTargetInfoA; external credapi name 'CredGetTargetInfoA';
-function CredGetTargetInfo; external credapi name 'CredGetTargetInfoA';
-function CredMarshalCredentialW; external credapi name 'CredMarshalCredentialW';
-function CredMarshalCredentialA; external credapi name 'CredMarshalCredentialA';
-function CredMarshalCredential; external credapi name 'CredMarshalCredential' + AWSuffix;
-function CredUnmarshalCredentialW; external credapi name 'CredUnmarshalCredentialW';
-function CredUnmarshalCredentialA; external credapi name 'CredUnmarshalCredentialA';
-function CredUnmarshalCredential; external credapi name 'CredUnmarshalCredential' + AWSuffix;
-function CredIsMarshaledCredentialW; external credapi name 'CredIsMarshaledCredentialW';
-function CredIsMarshaledCredentialA; external credapi name 'CredIsMarshaledCredentialA';
-function CredIsMarshaledCredential; external credapi name 'CredIsMarshaledCredential' + AWSuffix;
-function CredGetSessionTypes; external credapi name 'CredGetSessionTypes';
-procedure CredFree; external credapi name 'CredFree';
-function CredUIPromptForCredentialsW; external credui name 'CredUIPromptForCredentialsW';
-function CredUIPromptForCredentialsA; external credui name 'CredUIPromptForCredentialsA';
-function CredUIPromptForCredentials; external credui name 'CredUIPromptForCredentials' + AWSuffix;
-function CredUIParseUserNameW; external credui name 'CredUIParseUserNameW';
-function CredUIParseUserNameA; external credui name 'CredUIParseUserNameA';
-function CredUIParseUserName; external credui name 'CredUIParseUserName' + AWSuffix;
-function CredUICmdLinePromptForCredentialsW; external credui name 'CredUICmdLinePromptForCredentialsW';
-function CredUICmdLinePromptForCredentialsA; external credui name 'CredUICmdLinePromptForCredentialsA';
-function CredUICmdLinePromptForCredentials; external credui name 'CredUICmdLinePromptForCredentials' + AWSuffix;
-function CredUIConfirmCredentialsW; external credui name 'CredUIConfirmCredentialsW';
-function CredUIConfirmCredentialsA; external credui name 'CredUIConfirmCredentialsA';
-function CredUIConfirmCredentials; external credui name 'CredUIConfirmCredentials' + AWSuffix;
-function CredUIStoreSSOCredW; external credui name 'CredUIStoreSSOCredW';
-function CredUIReadSSOCredW; external credui name 'CredUIReadSSOCredW';
-
-{$ENDIF DYNAMIC_LINK}
-
-end.
+{******************************************************************************}
+{ }
+{ Credentials Manager API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: wincred.h, released November 2001. The original Pascal }
+{ code is: WinCred.pas, released March 2002. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwawincred.pas,v 1.1 2005/04/04 07:56:11 marco Exp $
+
+unit JwaWinCred;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "wincred.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaLmCons, JwaWinBase, JwaWinError, JwaWinType, JwaNtSecApi;
+
+type
+ PCtxtHandle = PSecHandle;
+ {$EXTERNALSYM PCtxtHandle}
+
+//-----------------------------------------------------------------------------
+// Macros
+//-----------------------------------------------------------------------------
+
+//
+// Macro to determine whether CredUIPromptForCredentials should be called upon a failed
+// authentication attempt.
+//
+// Implemented as a macro so that the caller can delay load credui.dll only if this
+// macro returns TRUE.
+//
+// Include only status codes that imply the username/password are wrong or that the
+// password is expired. In the former case, asking for a another username or password
+// is appropriate. In the later case, we put up a different dialog asking the
+// user to change the password on the server.
+//
+// Don't include status codes such as ERROR_ACCOUNT_DISABLED, ERROR_ACCOUNT_RESTRICTION,
+// ERROR_ACCOUNT_LOCKED_OUT, ERROR_ACCOUNT_EXPIRED, ERROR_LOGON_TYPE_NOT_GRANTED.
+// For those, the user isn't going to have another account so prompting him
+// won't help.
+//
+// STATUS_DOWNGRADE_DETECTED is included to handle the case where a corporate laptop
+// is brought to another LAN. A downgrade attack will indeed be detected,
+// but we want to popup UI to allow the user to connect to resources in the
+// other LAN.
+//
+// Don't use the CREDUIP_* macros directly. Their definition is private to credui.dll.
+//
+
+// Don't require ntstatus.h
+
+const
+ STATUS_LOGON_FAILURE = NTSTATUS($C000006D); // ntsubauth
+ {$EXTERNALSYM STATUS_LOGON_FAILURE}
+ STATUS_WRONG_PASSWORD = NTSTATUS($C000006A); // ntsubauth
+ {$EXTERNALSYM STATUS_WRONG_PASSWORD}
+ STATUS_PASSWORD_EXPIRED = NTSTATUS($C0000071); // ntsubauth
+ {$EXTERNALSYM STATUS_PASSWORD_EXPIRED}
+ STATUS_PASSWORD_MUST_CHANGE = NTSTATUS($C0000224); // ntsubauth
+ {$EXTERNALSYM STATUS_PASSWORD_MUST_CHANGE}
+ STATUS_ACCESS_DENIED = NTSTATUS($C0000022);
+ {$EXTERNALSYM STATUS_ACCESS_DENIED}
+ STATUS_DOWNGRADE_DETECTED = NTSTATUS($C0000388);
+ {$EXTERNALSYM STATUS_DOWNGRADE_DETECTED}
+ STATUS_AUTHENTICATION_FIREWALL_FAILED = NTSTATUS($C0000413);
+ {$EXTERNALSYM STATUS_AUTHENTICATION_FIREWALL_FAILED}
+ STATUS_ACCOUNT_DISABLED = NTSTATUS($C0000072); // ntsubauth
+ {$EXTERNALSYM STATUS_ACCOUNT_DISABLED}
+ STATUS_ACCOUNT_RESTRICTION = NTSTATUS($C000006E); // ntsubauth
+ {$EXTERNALSYM STATUS_ACCOUNT_RESTRICTION}
+ STATUS_ACCOUNT_LOCKED_OUT = NTSTATUS($C0000234); // ntsubauth
+ {$EXTERNALSYM STATUS_ACCOUNT_LOCKED_OUT}
+ STATUS_ACCOUNT_EXPIRED = NTSTATUS($C0000193); // ntsubauth
+ {$EXTERNALSYM STATUS_ACCOUNT_EXPIRED}
+ STATUS_LOGON_TYPE_NOT_GRANTED = NTSTATUS($C000015B);
+ {$EXTERNALSYM STATUS_LOGON_TYPE_NOT_GRANTED}
+
+// Don't require lmerr.h
+
+ NERR_BASE = 2100;
+ {$EXTERNALSYM NERR_BASE}
+ NERR_PasswordExpired = NERR_BASE + 142; // The password of this user has expired.
+ {$EXTERNALSYM NERR_PasswordExpired}
+
+function CREDUIP_IS_USER_PASSWORD_ERROR(_Status: NTSTATUS): BOOL;
+{$EXTERNALSYM CREDUIP_IS_USER_PASSWORD_ERROR}
+
+function CREDUIP_IS_DOWNGRADE_ERROR(_Status: NTSTATUS): BOOL;
+{$EXTERNALSYM CREDUIP_IS_DOWNGRADE_ERROR}
+
+function CREDUIP_IS_EXPIRED_ERROR(_Status: NTSTATUS): BOOL;
+{$EXTERNALSYM CREDUIP_IS_EXPIRED_ERROR}
+
+function CREDUI_IS_AUTHENTICATION_ERROR(_Status: NTSTATUS): BOOL;
+{$EXTERNALSYM CREDUI_IS_AUTHENTICATION_ERROR}
+
+function CREDUI_NO_PROMPT_AUTHENTICATION_ERROR(_Status: NTSTATUS): BOOL;
+{$EXTERNALSYM CREDUI_NO_PROMPT_AUTHENTICATION_ERROR}
+
+//-----------------------------------------------------------------------------
+// Structures
+//-----------------------------------------------------------------------------
+
+//
+// Credential Attribute
+//
+
+const
+
+// Maximum length of the various credential string fields (in characters)
+
+ CRED_MAX_STRING_LENGTH = 256;
+ {$EXTERNALSYM CRED_MAX_STRING_LENGTH}
+
+// Maximum length of the UserName field. The worst case is <User>@<DnsDomain>
+
+ CRED_MAX_USERNAME_LENGTH = 256 + 1 + 256;
+ {$EXTERNALSYM CRED_MAX_USERNAME_LENGTH}
+
+// Maximum length of the TargetName field for CRED_TYPE_GENERIC (in characters)
+
+ CRED_MAX_GENERIC_TARGET_NAME_LENGTH = 32767;
+ {$EXTERNALSYM CRED_MAX_GENERIC_TARGET_NAME_LENGTH}
+
+// Maximum length of the TargetName field for CRED_TYPE_DOMAIN_* (in characters)
+// Largest one is <DfsRoot>\<DfsShare>
+
+ CRED_MAX_DOMAIN_TARGET_NAME_LENGTH = 256 + 1 + 80;
+ {$EXTERNALSYM CRED_MAX_DOMAIN_TARGET_NAME_LENGTH}
+
+// Maximum size of the Credential Attribute Value field (in bytes)
+
+ CRED_MAX_VALUE_SIZE = 256;
+ {$EXTERNALSYM CRED_MAX_VALUE_SIZE}
+
+// Maximum number of attributes per credential
+
+ CRED_MAX_ATTRIBUTES = 64;
+ {$EXTERNALSYM CRED_MAX_ATTRIBUTES}
+
+type
+ PCREDENTIAL_ATTRIBUTEA = ^CREDENTIAL_ATTRIBUTEA;
+ {$EXTERNALSYM PCREDENTIAL_ATTRIBUTEA}
+ _CREDENTIAL_ATTRIBUTEA = record
+ Keyword: LPSTR;
+ Flags: DWORD;
+ ValueSize: DWORD;
+ Value: LPBYTE;
+ end;
+ {$EXTERNALSYM _CREDENTIAL_ATTRIBUTEA}
+ CREDENTIAL_ATTRIBUTEA = _CREDENTIAL_ATTRIBUTEA;
+ {$EXTERNALSYM CREDENTIAL_ATTRIBUTEA}
+ TCredentialAttributeA = CREDENTIAL_ATTRIBUTEA;
+ PCredentialAttributeA = PCREDENTIAL_ATTRIBUTEA;
+
+ PCREDENTIAL_ATTRIBUTEW = ^CREDENTIAL_ATTRIBUTEW;
+ {$EXTERNALSYM PCREDENTIAL_ATTRIBUTEW}
+ _CREDENTIAL_ATTRIBUTEW = record
+ Keyword: LPWSTR;
+ Flags: DWORD;
+ ValueSize: DWORD;
+ Value: LPBYTE;
+ end;
+ {$EXTERNALSYM _CREDENTIAL_ATTRIBUTEW}
+ CREDENTIAL_ATTRIBUTEW = _CREDENTIAL_ATTRIBUTEW;
+ {$EXTERNALSYM CREDENTIAL_ATTRIBUTEW}
+ TCredentialAttributeW = CREDENTIAL_ATTRIBUTEW;
+ PCredentialAttributeW = PCREDENTIAL_ATTRIBUTEW;
+
+ {$IFDEF UNICODE}
+ CREDENTIAL_ATTRIBUTE = CREDENTIAL_ATTRIBUTEW;
+ {$EXTERNALSYM CREDENTIAL_ATTRIBUTE}
+ PCREDENTIAL_ATTRIBUTE = PCREDENTIAL_ATTRIBUTEW;
+ {$EXTERNALSYM PCREDENTIAL_ATTRIBUTE}
+ TCredentialAttribute = TCredentialAttributeW;
+ PCredentialAttribute = PCredentialAttributeW;
+ {$ELSE}
+ CREDENTIAL_ATTRIBUTE = CREDENTIAL_ATTRIBUTEA;
+ {$EXTERNALSYM CREDENTIAL_ATTRIBUTE}
+ PCREDENTIAL_ATTRIBUTE = PCREDENTIAL_ATTRIBUTEA;
+ {$EXTERNALSYM PCREDENTIAL_ATTRIBUTE}
+ TCredentialAttribute = TCredentialAttributeA;
+ PCredentialAttribute = PCredentialAttributeA;
+ {$ENDIF UNICODE}
+
+//
+// Special values of the TargetName field
+//
+
+const
+ CRED_SESSION_WILDCARD_NAME_W = WideString('*Session');
+ {$EXTERNALSYM CRED_SESSION_WILDCARD_NAME_W}
+ CRED_SESSION_WILDCARD_NAME_A = '*Session';
+ {$EXTERNALSYM CRED_SESSION_WILDCARD_NAME_A}
+ CRED_SESSION_WILDCARD_NAME_LENGTH = SizeOf(CRED_SESSION_WILDCARD_NAME_A) - 1;
+ {$EXTERNALSYM CRED_SESSION_WILDCARD_NAME_LENGTH}
+
+ {$IFDEF UNICODE}
+ CRED_SESSION_WILDCARD_NAME = CRED_SESSION_WILDCARD_NAME_W;
+ {$EXTERNALSYM CRED_SESSION_WILDCARD_NAME}
+ {$ELSE}
+ CRED_SESSION_WILDCARD_NAME = CRED_SESSION_WILDCARD_NAME_A;
+ {$EXTERNALSYM CRED_SESSION_WILDCARD_NAME}
+ {$ENDIF UNICODE}
+
+//
+// Values of the Credential Flags field.
+//
+
+const
+ CRED_FLAGS_PASSWORD_FOR_CERT = $0001;
+ {$EXTERNALSYM CRED_FLAGS_PASSWORD_FOR_CERT}
+ CRED_FLAGS_PROMPT_NOW = $0002;
+ {$EXTERNALSYM CRED_FLAGS_PROMPT_NOW}
+ CRED_FLAGS_USERNAME_TARGET = $0004;
+ {$EXTERNALSYM CRED_FLAGS_USERNAME_TARGET}
+ CRED_FLAGS_OWF_CRED_BLOB = $0008;
+ {$EXTERNALSYM CRED_FLAGS_OWF_CRED_BLOB}
+ CRED_FLAGS_VALID_FLAGS = $000F; // Mask of all valid flags
+ {$EXTERNALSYM CRED_FLAGS_VALID_FLAGS}
+
+//
+// Values of the Credential Type field.
+//
+
+ CRED_TYPE_GENERIC = 1;
+ {$EXTERNALSYM CRED_TYPE_GENERIC}
+ CRED_TYPE_DOMAIN_PASSWORD = 2;
+ {$EXTERNALSYM CRED_TYPE_DOMAIN_PASSWORD}
+ CRED_TYPE_DOMAIN_CERTIFICATE = 3;
+ {$EXTERNALSYM CRED_TYPE_DOMAIN_CERTIFICATE}
+ CRED_TYPE_DOMAIN_VISIBLE_PASSWORD = 4;
+ {$EXTERNALSYM CRED_TYPE_DOMAIN_VISIBLE_PASSWORD}
+ CRED_TYPE_MAXIMUM = 5; // Maximum supported cred type
+ {$EXTERNALSYM CRED_TYPE_MAXIMUM}
+ CRED_TYPE_MAXIMUM_EX = CRED_TYPE_MAXIMUM + 1000; // Allow new applications to run on old OSes
+ {$EXTERNALSYM CRED_TYPE_MAXIMUM_EX}
+
+//
+// Maximum size of the CredBlob field (in bytes)
+//
+
+ CRED_MAX_CREDENTIAL_BLOB_SIZE = 512;
+ {$EXTERNALSYM CRED_MAX_CREDENTIAL_BLOB_SIZE}
+
+//
+// Values of the Credential Persist field
+//
+
+ CRED_PERSIST_NONE = 0;
+ {$EXTERNALSYM CRED_PERSIST_NONE}
+ CRED_PERSIST_SESSION = 1;
+ {$EXTERNALSYM CRED_PERSIST_SESSION}
+ CRED_PERSIST_LOCAL_MACHINE = 2;
+ {$EXTERNALSYM CRED_PERSIST_LOCAL_MACHINE}
+ CRED_PERSIST_ENTERPRISE = 3;
+ {$EXTERNALSYM CRED_PERSIST_ENTERPRISE}
+
+//
+// A credential
+//
+
+type
+ PCREDENTIALA = ^CREDENTIALA;
+ {$EXTERNALSYM PCREDENTIALA}
+ _CREDENTIALA = record
+ Flags: DWORD;
+ Type_: DWORD;
+ TargetName: LPSTR;
+ Comment: LPSTR;
+ LastWritten: FILETIME;
+ CredentialBlobSize: DWORD;
+ CredentialBlob: LPBYTE;
+ Persist: DWORD;
+ AttributeCount: DWORD;
+ Attributes: PCREDENTIAL_ATTRIBUTEA;
+ TargetAlias: LPSTR;
+ UserName: LPSTR;
+ end;
+ {$EXTERNALSYM _CREDENTIALA}
+ CREDENTIALA = _CREDENTIALA;
+ {$EXTERNALSYM CREDENTIALA}
+ TCredentialA = CREDENTIALA;
+
+ PCREDENTIALW = ^CREDENTIALW;
+ {$EXTERNALSYM PCREDENTIALW}
+ _CREDENTIALW = record
+ Flags: DWORD;
+ Type_: DWORD;
+ TargetName: LPWSTR;
+ Comment: LPWSTR;
+ LastWritten: FILETIME;
+ CredentialBlobSize: DWORD;
+ CredentialBlob: LPBYTE;
+ Persist: DWORD;
+ AttributeCount: DWORD;
+ Attributes: PCREDENTIAL_ATTRIBUTEW;
+ TargetAlias: LPWSTR;
+ UserName: LPWSTR;
+ end;
+ {$EXTERNALSYM _CREDENTIALW}
+ CREDENTIALW = _CREDENTIALW;
+ {$EXTERNALSYM CREDENTIALW}
+ TCredentialW = CREDENTIALW;
+
+ {$IFDEF UNICODE}
+ CREDENTIAL = CREDENTIALW;
+ {$EXTERNALSYM CREDENTIAL}
+ PCREDENTIAL = PCREDENTIALW;
+ {$EXTERNALSYM PCREDENTIAL}
+ TCredential = TCredentialW;
+ {$ELSE}
+ CREDENTIAL = CREDENTIALA;
+ {$EXTERNALSYM CREDENTIAL}
+ PCREDENTIAL = PCREDENTIALA;
+ {$EXTERNALSYM PCREDENTIAL}
+ TCredential = TCredentialA;
+ {$ENDIF UNICODE}
+
+//
+// Value of the Flags field in CREDENTIAL_TARGET_INFORMATION
+//
+
+const
+ CRED_TI_SERVER_FORMAT_UNKNOWN = $0001; // Don't know if server name is DNS or netbios format
+ {$EXTERNALSYM CRED_TI_SERVER_FORMAT_UNKNOWN}
+ CRED_TI_DOMAIN_FORMAT_UNKNOWN = $0002; // Don't know if domain name is DNS or netbios format
+ {$EXTERNALSYM CRED_TI_DOMAIN_FORMAT_UNKNOWN}
+ CRED_TI_ONLY_PASSWORD_REQUIRED = $0004; // Server only requires a password and not a username
+ {$EXTERNALSYM CRED_TI_ONLY_PASSWORD_REQUIRED}
+ CRED_TI_USERNAME_TARGET = $0008; // TargetName is username
+ {$EXTERNALSYM CRED_TI_USERNAME_TARGET}
+ CRED_TI_CREATE_EXPLICIT_CRED = $0010; // When creating a cred, create one named TargetInfo->TargetName
+ {$EXTERNALSYM CRED_TI_CREATE_EXPLICIT_CRED}
+ CRED_TI_WORKGROUP_MEMBER = $0020; // Indicates the machine is a member of a workgroup
+ {$EXTERNALSYM CRED_TI_WORKGROUP_MEMBER}
+ CRED_TI_VALID_FLAGS = $003F;
+ {$EXTERNALSYM CRED_TI_VALID_FLAGS}
+
+//
+// A credential target
+//
+
+type
+ PCREDENTIAL_TARGET_INFORMATIONA = ^CREDENTIAL_TARGET_INFORMATIONA;
+ {$EXTERNALSYM PCREDENTIAL_TARGET_INFORMATIONA}
+ _CREDENTIAL_TARGET_INFORMATIONA = record
+ TargetName: LPSTR;
+ NetbiosServerName: LPSTR;
+ DnsServerName: LPSTR;
+ NetbiosDomainName: LPSTR;
+ DnsDomainName: LPSTR;
+ DnsTreeName: LPSTR;
+ PackageName: LPSTR;
+ Flags: ULONG;
+ CredTypeCount: DWORD;
+ CredTypes: LPDWORD;
+ end;
+ {$EXTERNALSYM _CREDENTIAL_TARGET_INFORMATIONA}
+ CREDENTIAL_TARGET_INFORMATIONA = _CREDENTIAL_TARGET_INFORMATIONA;
+ {$EXTERNALSYM CREDENTIAL_TARGET_INFORMATIONA}
+ TCredentialTargetInformationA = CREDENTIAL_TARGET_INFORMATIONA;
+ PCredentialTargetInformationA = PCREDENTIAL_TARGET_INFORMATIONA;
+
+ PCREDENTIAL_TARGET_INFORMATIONW = ^CREDENTIAL_TARGET_INFORMATIONW;
+ {$EXTERNALSYM PCREDENTIAL_TARGET_INFORMATIONW}
+ _CREDENTIAL_TARGET_INFORMATIONW = record
+ TargetName: LPWSTR;
+ NetbiosServerName: LPWSTR;
+ DnsServerName: LPWSTR;
+ NetbiosDomainName: LPWSTR;
+ DnsDomainName: LPWSTR;
+ DnsTreeName: LPWSTR;
+ PackageName: LPWSTR;
+ Flags: ULONG;
+ CredTypeCount: DWORD;
+ CredTypes: LPDWORD;
+ end;
+ {$EXTERNALSYM _CREDENTIAL_TARGET_INFORMATIONW}
+ CREDENTIAL_TARGET_INFORMATIONW = _CREDENTIAL_TARGET_INFORMATIONW;
+ {$EXTERNALSYM CREDENTIAL_TARGET_INFORMATIONW}
+ TCredentialTargetInformationW = CREDENTIAL_TARGET_INFORMATIONW;
+ PCredentialTargetInformationW = PCREDENTIAL_TARGET_INFORMATIONW;
+
+ {$IFDEF UNICODE}
+ CREDENTIAL_TARGET_INFORMATION = CREDENTIAL_TARGET_INFORMATIONW;
+ {$EXTERNALSYM CREDENTIAL_TARGET_INFORMATION}
+ PCREDENTIAL_TARGET_INFORMATION = PCREDENTIAL_TARGET_INFORMATIONW;
+ {$EXTERNALSYM PCREDENTIAL_TARGET_INFORMATION}
+ TCredentialTargetInformation = TCredentialTargetInformationW;
+ PCredentialTargetInformation = PCredentialTargetInformationW;
+ {$ELSE}
+ CREDENTIAL_TARGET_INFORMATION = CREDENTIAL_TARGET_INFORMATIONA;
+ {$EXTERNALSYM CREDENTIAL_TARGET_INFORMATION}
+ PCREDENTIAL_TARGET_INFORMATION = PCREDENTIAL_TARGET_INFORMATIONA;
+ {$EXTERNALSYM PCREDENTIAL_TARGET_INFORMATION}
+ TCredentialTargetInformation = TCredentialTargetInformationA;
+ PCredentialTargetInformation = PCredentialTargetInformationA;
+ {$ENDIF UNICODE}
+
+//
+// Certificate credential information
+//
+// The cbSize should be the size of the structure, sizeof(CERT_CREDENTIAL_INFO),
+// rgbHashofCert is the hash of the cert which is to be used as the credential.
+//
+
+const
+ CERT_HASH_LENGTH = 20; // SHA1 hashes are used for cert hashes
+ {$EXTERNALSYM CERT_HASH_LENGTH}
+
+type
+ PCERT_CREDENTIAL_INFO = ^CERT_CREDENTIAL_INFO;
+ {$EXTERNALSYM PCERT_CREDENTIAL_INFO}
+ _CERT_CREDENTIAL_INFO = record
+ cbSize: ULONG;
+ rgbHashOfCert: array [0..CERT_HASH_LENGTH - 1] of UCHAR;
+ end;
+ {$EXTERNALSYM _CERT_CREDENTIAL_INFO}
+ CERT_CREDENTIAL_INFO = _CERT_CREDENTIAL_INFO;
+ {$EXTERNALSYM CERT_CREDENTIAL_INFO}
+ TCertCredentialInfo = CERT_CREDENTIAL_INFO;
+ PCertCredentialInfo = PCERT_CREDENTIAL_INFO;
+
+//
+// Username Target credential information
+//
+// This credential can be pass to LsaLogonUser to ask it to find a credential with a
+// TargetName of UserName.
+//
+
+ PUSERNAME_TARGET_CREDENTIAL_INFO = ^USERNAME_TARGET_CREDENTIAL_INFO;
+ {$EXTERNALSYM PUSERNAME_TARGET_CREDENTIAL_INFO}
+ _USERNAME_TARGET_CREDENTIAL_INFO = record
+ UserName: LPWSTR;
+ end;
+ {$EXTERNALSYM _USERNAME_TARGET_CREDENTIAL_INFO}
+ USERNAME_TARGET_CREDENTIAL_INFO = _USERNAME_TARGET_CREDENTIAL_INFO;
+ {$EXTERNALSYM USERNAME_TARGET_CREDENTIAL_INFO}
+ TUsernameTargetCredentialInfo = USERNAME_TARGET_CREDENTIAL_INFO;
+ PUsernameTargetCredentialInfo = PUSERNAME_TARGET_CREDENTIAL_INFO;
+
+//
+// Credential type for credential marshaling routines
+//
+
+ _CRED_MARSHAL_TYPE = DWORD;
+ {$EXTERNALSYM _CRED_MARSHAL_TYPE}
+ CRED_MARSHAL_TYPE = _CRED_MARSHAL_TYPE;
+ {$EXTERNALSYM CRED_MARSHAL_TYPE}
+ PCRED_MARSHAL_TYPE = ^CRED_MARSHAL_TYPE;
+ {$EXTERNALSYM PCRED_MARSHAL_TYPE}
+ TCredMarshalType = CRED_MARSHAL_TYPE;
+ PCredMarshalType = PCRED_MARSHAL_TYPE;
+
+const
+ CertCredential = 1;
+ {$EXTERNALSYM CertCredential}
+ UsernameTargetCredential = 2;
+ {$EXTERNALSYM UsernameTargetCredential}
+
+//
+// Credential UI info
+//
+
+type
+ PCREDUI_INFOA = ^CREDUI_INFOA;
+ {$EXTERNALSYM PCREDUI_INFOA}
+ _CREDUI_INFOA = record
+ cbSize: DWORD;
+ hwndParent: HWND;
+ pszMessageText: PCSTR;
+ pszCaptionText: PCSTR;
+ hbmBanner: HBITMAP;
+ end;
+ {$EXTERNALSYM _CREDUI_INFOA}
+ CREDUI_INFOA = _CREDUI_INFOA;
+ {$EXTERNALSYM CREDUI_INFOA}
+ TCredUIInfoA = CREDUI_INFOA;
+ PCredUIInfoA = PCREDUI_INFOA;
+
+ PCREDUI_INFOW = ^CREDUI_INFOW;
+ {$EXTERNALSYM PCREDUI_INFOW}
+ _CREDUI_INFOW = record
+ cbSize: DWORD;
+ hwndParent: HWND;
+ pszMessageText: LPCWSTR;
+ pszCaptionText: LPCWSTR;
+ hbmBanner: HBITMAP;
+ end;
+ {$EXTERNALSYM _CREDUI_INFOW}
+ CREDUI_INFOW = _CREDUI_INFOW;
+ {$EXTERNALSYM CREDUI_INFOW}
+ TCredUIInfoW = CREDUI_INFOW;
+ PCredUIInfoW = PCREDUI_INFOW;
+
+ {$IFDEF UNICODE}
+ CREDUI_INFO = CREDUI_INFOW;
+ {$EXTERNALSYM CREDUI_INFO}
+ PCREDUI_INFO = PCREDUI_INFOW;
+ {$EXTERNALSYM PCREDUI_INFO}
+ TCredUIInfo = TCredUIInfoW;
+ PCredUIInfo = PCredUIInfoW;
+ {$ELSE}
+ CREDUI_INFO = CREDUI_INFOA;
+ {$EXTERNALSYM CREDUI_INFO}
+ PCREDUI_INFO = PCREDUI_INFOA;
+ {$EXTERNALSYM PCREDUI_INFO}
+ TCredUIInfo = TCredUIInfoA;
+ PCredUIInfo = PCredUIInfoA;
+ {$ENDIF UNICODE}
+
+//-----------------------------------------------------------------------------
+// Values
+//-----------------------------------------------------------------------------
+
+// String length limits:
+
+const
+ CREDUI_MAX_MESSAGE_LENGTH = 32767;
+ {$EXTERNALSYM CREDUI_MAX_MESSAGE_LENGTH}
+ CREDUI_MAX_CAPTION_LENGTH = 128;
+ {$EXTERNALSYM CREDUI_MAX_CAPTION_LENGTH}
+ CREDUI_MAX_GENERIC_TARGET_LENGTH = CRED_MAX_GENERIC_TARGET_NAME_LENGTH;
+ {$EXTERNALSYM CREDUI_MAX_GENERIC_TARGET_LENGTH}
+ CREDUI_MAX_DOMAIN_TARGET_LENGTH = CRED_MAX_DOMAIN_TARGET_NAME_LENGTH;
+ {$EXTERNALSYM CREDUI_MAX_DOMAIN_TARGET_LENGTH}
+ CREDUI_MAX_USERNAME_LENGTH = CRED_MAX_USERNAME_LENGTH;
+ {$EXTERNALSYM CREDUI_MAX_USERNAME_LENGTH}
+ CREDUI_MAX_PASSWORD_LENGTH = CRED_MAX_CREDENTIAL_BLOB_SIZE div 2;
+ {$EXTERNALSYM CREDUI_MAX_PASSWORD_LENGTH}
+
+//
+// Flags for CredUIPromptForCredentials and/or CredUICmdLinePromptForCredentials
+//
+
+ CREDUI_FLAGS_INCORRECT_PASSWORD = $00001; // indicates the username is valid, but password is not
+ {$EXTERNALSYM CREDUI_FLAGS_INCORRECT_PASSWORD}
+ CREDUI_FLAGS_DO_NOT_PERSIST = $00002; // Do not show "Save" checkbox, and do not persist credentials
+ {$EXTERNALSYM CREDUI_FLAGS_DO_NOT_PERSIST}
+ CREDUI_FLAGS_REQUEST_ADMINISTRATOR = $00004; // Populate list box with admin accounts
+ {$EXTERNALSYM CREDUI_FLAGS_REQUEST_ADMINISTRATOR}
+ CREDUI_FLAGS_EXCLUDE_CERTIFICATES = $00008; // do not include certificates in the drop list
+ {$EXTERNALSYM CREDUI_FLAGS_EXCLUDE_CERTIFICATES}
+ CREDUI_FLAGS_REQUIRE_CERTIFICATE = $00010;
+ {$EXTERNALSYM CREDUI_FLAGS_REQUIRE_CERTIFICATE}
+ CREDUI_FLAGS_SHOW_SAVE_CHECK_BOX = $00040;
+ {$EXTERNALSYM CREDUI_FLAGS_SHOW_SAVE_CHECK_BOX}
+ CREDUI_FLAGS_ALWAYS_SHOW_UI = $00080;
+ {$EXTERNALSYM CREDUI_FLAGS_ALWAYS_SHOW_UI}
+ CREDUI_FLAGS_REQUIRE_SMARTCARD = $00100;
+ {$EXTERNALSYM CREDUI_FLAGS_REQUIRE_SMARTCARD}
+ CREDUI_FLAGS_PASSWORD_ONLY_OK = $00200;
+ {$EXTERNALSYM CREDUI_FLAGS_PASSWORD_ONLY_OK}
+ CREDUI_FLAGS_VALIDATE_USERNAME = $00400;
+ {$EXTERNALSYM CREDUI_FLAGS_VALIDATE_USERNAME}
+ CREDUI_FLAGS_COMPLETE_USERNAME = $00800;
+ {$EXTERNALSYM CREDUI_FLAGS_COMPLETE_USERNAME}
+ CREDUI_FLAGS_PERSIST = $01000; // Do not show "Save" checkbox, but persist credentials anyway
+ {$EXTERNALSYM CREDUI_FLAGS_PERSIST}
+ CREDUI_FLAGS_SERVER_CREDENTIAL = $04000;
+ {$EXTERNALSYM CREDUI_FLAGS_SERVER_CREDENTIAL}
+ CREDUI_FLAGS_EXPECT_CONFIRMATION = $20000; // do not persist unless caller later confirms credential via CredUIConfirmCredential() api
+ {$EXTERNALSYM CREDUI_FLAGS_EXPECT_CONFIRMATION}
+ CREDUI_FLAGS_GENERIC_CREDENTIALS = $40000; // Credential is a generic credential
+ {$EXTERNALSYM CREDUI_FLAGS_GENERIC_CREDENTIALS}
+ CREDUI_FLAGS_USERNAME_TARGET_CREDENTIALS = $80000; // Credential has a username as the target
+ {$EXTERNALSYM CREDUI_FLAGS_USERNAME_TARGET_CREDENTIALS}
+ CREDUI_FLAGS_KEEP_USERNAME = $100000; // don't allow the user to change the supplied username
+ {$EXTERNALSYM CREDUI_FLAGS_KEEP_USERNAME}
+
+//
+// Mask of flags valid for CredUIPromptForCredentials
+//
+
+ CREDUI_FLAGS_PROMPT_VALID =
+ CREDUI_FLAGS_INCORRECT_PASSWORD or
+ CREDUI_FLAGS_DO_NOT_PERSIST or
+ CREDUI_FLAGS_REQUEST_ADMINISTRATOR or
+ CREDUI_FLAGS_EXCLUDE_CERTIFICATES or
+ CREDUI_FLAGS_REQUIRE_CERTIFICATE or
+ CREDUI_FLAGS_SHOW_SAVE_CHECK_BOX or
+ CREDUI_FLAGS_ALWAYS_SHOW_UI or
+ CREDUI_FLAGS_REQUIRE_SMARTCARD or
+ CREDUI_FLAGS_PASSWORD_ONLY_OK or
+ CREDUI_FLAGS_VALIDATE_USERNAME or
+ CREDUI_FLAGS_COMPLETE_USERNAME or
+ CREDUI_FLAGS_PERSIST or
+ CREDUI_FLAGS_SERVER_CREDENTIAL or
+ CREDUI_FLAGS_EXPECT_CONFIRMATION or
+ CREDUI_FLAGS_GENERIC_CREDENTIALS or
+ CREDUI_FLAGS_USERNAME_TARGET_CREDENTIALS or
+ CREDUI_FLAGS_KEEP_USERNAME;
+ {$EXTERNALSYM CREDUI_FLAGS_PROMPT_VALID}
+
+//-----------------------------------------------------------------------------
+// Functions
+//-----------------------------------------------------------------------------
+
+//
+// Values of flags to CredWrite and CredWriteDomainCredentials
+//
+
+const
+ CRED_PRESERVE_CREDENTIAL_BLOB = $1;
+ {$EXTERNALSYM CRED_PRESERVE_CREDENTIAL_BLOB}
+
+function CredWriteA(Credential: PCREDENTIALA; Flags: DWORD): BOOL; stdcall;
+{$EXTERNALSYM CredWriteA}
+function CredWriteW(Credential: PCREDENTIALW; Flags: DWORD): BOOL; stdcall;
+{$EXTERNALSYM CredWriteW}
+function CredWrite(Credential: PCREDENTIAL; Flags: DWORD): BOOL; stdcall;
+{$EXTERNALSYM CredWrite}
+
+function CredReadA(TargetName: LPCSTR; Type_: DWORD; Flags: DWORD; var Credential: PCREDENTIALA): BOOL; stdcall;
+{$EXTERNALSYM CredReadA}
+function CredReadW(TargetName: LPCWSTR; Type_: DWORD; Flags: DWORD; var Credential: PCREDENTIALW): BOOL; stdcall;
+{$EXTERNALSYM CredReadW}
+function CredRead(TargetName: LPCTSTR; Type_: DWORD; Flags: DWORD; var Credential: PCREDENTIAL): BOOL; stdcall;
+{$EXTERNALSYM CredRead}
+
+function CredEnumerateA(Filter: LPCSTR; Flags: DWORD; var Count: DWORD; var Credential: PCREDENTIALA): BOOL; stdcall;
+{$EXTERNALSYM CredEnumerateA}
+function CredEnumerateW(Filter: LPCWSTR; Flags: DWORD; var Count: DWORD; var Credential: PCREDENTIALW): BOOL; stdcall;
+{$EXTERNALSYM CredEnumerateW}
+function CredEnumerate(Filter: LPCTSTR; Flags: DWORD; var Count: DWORD; var Credential: PCREDENTIAL): BOOL; stdcall;
+{$EXTERNALSYM CredEnumerate}
+
+function CredWriteDomainCredentialsA(TargetInfo: PCREDENTIAL_TARGET_INFORMATIONA; Credential: PCREDENTIALA; Flags: DWORD): BOOL; stdcall;
+{$EXTERNALSYM CredWriteDomainCredentialsA}
+function CredWriteDomainCredentialsW(TargetInfo: PCREDENTIAL_TARGET_INFORMATIONW; Credential: PCREDENTIALW; Flags: DWORD): BOOL; stdcall;
+{$EXTERNALSYM CredWriteDomainCredentialsW}
+function CredWriteDomainCredentials(TargetInfo: PCREDENTIAL_TARGET_INFORMATION; Credential: PCREDENTIAL; Flags: DWORD): BOOL; stdcall;
+{$EXTERNALSYM CredWriteDomainCredentials}
+
+//
+// Values of flags to CredReadDomainCredentials
+//
+
+const
+ CRED_CACHE_TARGET_INFORMATION = $1;
+ {$EXTERNALSYM CRED_CACHE_TARGET_INFORMATION}
+
+function CredReadDomainCredentialsA(TargetInfo: PCREDENTIAL_TARGET_INFORMATIONA; Flags: DWORD; var Count: DWORD; var Credential: PCREDENTIALA): BOOL; stdcall;
+{$EXTERNALSYM CredReadDomainCredentialsA}
+function CredReadDomainCredentialsW(TargetInfo: PCREDENTIAL_TARGET_INFORMATIONW; Flags: DWORD; var Count: DWORD; var Credential: PCREDENTIALW): BOOL; stdcall;
+{$EXTERNALSYM CredReadDomainCredentialsW}
+function CredReadDomainCredentials(TargetInfo: PCREDENTIAL_TARGET_INFORMATION; Flags: DWORD; var Count: DWORD; var Credential: PCREDENTIAL): BOOL; stdcall;
+{$EXTERNALSYM CredReadDomainCredentials}
+
+function CredDeleteA(TargetName: LPCSTR; Type_: DWORD; Flags: DWORD): BOOL; stdcall;
+{$EXTERNALSYM CredDeleteA}
+function CredDeleteW(TargetName: LPCWSTR; Type_: DWORD; Flags: DWORD): BOOL; stdcall;
+{$EXTERNALSYM CredDeleteW}
+function CredDelete(TargetName: LPCTSTR; Type_: DWORD; Flags: DWORD): BOOL; stdcall;
+{$EXTERNALSYM CredDelete}
+
+function CredRenameA(OldTargetName: LPCSTR; NewTargetName: LPCSTR; Type_: DWORD; Flags: DWORD): BOOL; stdcall;
+{$EXTERNALSYM CredRenameA}
+function CredRenameW(OldTargetName: LPCWSTR; NewTargetName: LPCWSTR; Type_: DWORD; Flags: DWORD): BOOL; stdcall;
+{$EXTERNALSYM CredRenameW}
+function CredRename(OldTargetName: LPCTSTR; NewTargetName: LPCTSTR; Type_: DWORD; Flags: DWORD): BOOL; stdcall;
+{$EXTERNALSYM CredRename}
+
+//
+// Values of flags to CredGetTargetInfo
+//
+
+const
+ CRED_ALLOW_NAME_RESOLUTION = $1;
+ {$EXTERNALSYM CRED_ALLOW_NAME_RESOLUTION}
+
+function CredGetTargetInfoA(TargetName: LPCSTR; Flags: DWORD; var TargetInfo: PCREDENTIAL_TARGET_INFORMATIONA): BOOL; stdcall;
+{$EXTERNALSYM CredGetTargetInfoA}
+function CredGetTargetInfoW(TargetName: LPCWSTR; Flags: DWORD; var TargetInfo: PCREDENTIAL_TARGET_INFORMATIONW): BOOL; stdcall;
+{$EXTERNALSYM CredGetTargetInfoW}
+function CredGetTargetInfo(TargetName: LPCTSTR; Flags: DWORD; var TargetInfo: PCREDENTIAL_TARGET_INFORMATION): BOOL; stdcall;
+{$EXTERNALSYM CredGetTargetInfo}
+
+function CredMarshalCredentialA(CredType: CRED_MARSHAL_TYPE; Credential: PVOID; MarshaledCredential: LPSTR): BOOL; stdcall;
+{$EXTERNALSYM CredMarshalCredentialA}
+function CredMarshalCredentialW(CredType: CRED_MARSHAL_TYPE; Credential: PVOID; var MarshaledCredential: LPWSTR): BOOL; stdcall;
+{$EXTERNALSYM CredMarshalCredentialW}
+function CredMarshalCredential(CredType: CRED_MARSHAL_TYPE; Credential: PVOID; var MarshaledCredential: LPTSTR): BOOL; stdcall;
+{$EXTERNALSYM CredMarshalCredential}
+
+function CredUnmarshalCredentialA(MarshaledCredential: LPCSTR; CredType: PCRED_MARSHAL_TYPE; Credential: PVOID): BOOL; stdcall;
+{$EXTERNALSYM CredUnmarshalCredentialA}
+function CredUnmarshalCredentialW(MarshaledCredential: LPCWSTR; CredType: PCRED_MARSHAL_TYPE; var Credential: PVOID): BOOL; stdcall;
+{$EXTERNALSYM CredUnmarshalCredentialW}
+function CredUnmarshalCredential(MarshaledCredential: LPCTSTR; CredType: PCRED_MARSHAL_TYPE; var Credential: PVOID): BOOL; stdcall;
+{$EXTERNALSYM CredUnmarshalCredential}
+
+function CredIsMarshaledCredentialA(MarshaledCredential: LPCSTR): BOOL; stdcall;
+{$EXTERNALSYM CredIsMarshaledCredentialA}
+function CredIsMarshaledCredentialW(MarshaledCredential: LPCWSTR): BOOL; stdcall;
+{$EXTERNALSYM CredIsMarshaledCredentialW}
+function CredIsMarshaledCredential(MarshaledCredential: LPCTSTR): BOOL; stdcall;
+{$EXTERNALSYM CredIsMarshaledCredential}
+
+function CredGetSessionTypes(MaximumPersistCount: DWORD; MaximumPersist: LPDWORD): BOOL; stdcall;
+{$EXTERNALSYM CredGetSessionTypes}
+
+procedure CredFree(Buffer: PVOID); stdcall;
+{$EXTERNALSYM CredFree}
+
+function CredUIPromptForCredentialsA(pUiInfo: PCREDUI_INFOA; pszTargetName: PCSTR; pContext: PCtxtHandle; dwAuthError: DWORD; pszUserName: PSTR; ulUserNameBufferSize: ULONG; pszPassword: PSTR; ulPasswordBufferSize: ULONG; var save: BOOL; dwFlags: DWORD): DWORD; stdcall;
+{$EXTERNALSYM CredUIPromptForCredentialsA}
+function CredUIPromptForCredentialsW(pUiInfo: PCREDUI_INFOW; pszTargetName: LPCWSTR; pContext: PCtxtHandle; dwAuthError: DWORD; pszUserName: PWSTR; ulUserNameBufferSize: ULONG; pszPassword: PWSTR; ulPasswordBufferSize: ULONG; var save: BOOL; dwFlags: DWORD): DWORD; stdcall;
+{$EXTERNALSYM CredUIPromptForCredentialsW}
+function CredUIPromptForCredentials(pUiInfo: PCREDUI_INFO; pszTargetName: LPCTSTR; pContext: PCtxtHandle; dwAuthError: DWORD; pszUserName: PTSTR; ulUserNameBufferSize: ULONG; pszPassword: PTSTR; ulPasswordBufferSize: ULONG; var save: BOOL; dwFlags: DWORD): DWORD; stdcall;
+{$EXTERNALSYM CredUIPromptForCredentials}
+
+function CredUIParseUserNameA(pszUserName: PCSTR; pszUser: PSTR; ulUserBufferSize: ULONG; pszDomain: PSTR; ulDomainBufferSize: ULONG): DWORD; stdcall;
+{$EXTERNALSYM CredUIParseUserNameA}
+function CredUIParseUserNameW(pszUserName: LPCWSTR; pszUser: PWSTR; ulUserBufferSize: ULONG; pszDomain: PWSTR; ulDomainBufferSize: ULONG): DWORD; stdcall;
+{$EXTERNALSYM CredUIParseUserNameW}
+function CredUIParseUserName(pszUserName: LPCTSTR; pszUser: PTSTR; ulUserBufferSize: ULONG; pszDomain: PTSTR; ulDomainBufferSize: ULONG): DWORD; stdcall;
+{$EXTERNALSYM CredUIParseUserName}
+
+function CredUICmdLinePromptForCredentialsA(pszTargetName: PCSTR; pContext: PCtxtHandle; dwAuthError: DWORD; UserName: PSTR; ulUserBufferSize: ULONG; pszPassword: PSTR; ulPasswordBufferSize: ULONG; pfSave: PBOOL; dwFlags: DWORD): DWORD; stdcall;
+{$EXTERNALSYM CredUICmdLinePromptForCredentialsA}
+function CredUICmdLinePromptForCredentialsW(pszTargetName: LPCWSTR; pContext: PCtxtHandle; dwAuthError: DWORD; UserName: PWSTR; ulUserBufferSize: ULONG; pszPassword: PWSTR; ulPasswordBufferSize: ULONG; pfSave: PBOOL; dwFlags: DWORD): DWORD; stdcall;
+{$EXTERNALSYM CredUICmdLinePromptForCredentialsW}
+function CredUICmdLinePromptForCredentials(pszTargetName: LPCTSTR; pContext: PCtxtHandle; dwAuthError: DWORD; UserName: PTSTR; ulUserBufferSize: ULONG; pszPassword: PTSTR; ulPasswordBufferSize: ULONG; pfSave: PBOOL; dwFlags: DWORD): DWORD; stdcall;
+{$EXTERNALSYM CredUICmdLinePromptForCredentials}
+
+//
+// Call this API with bConfirm set to TRUE to confirm that the credential (previously created
+// via CredUIGetCredentials or CredUIPromptForCredentials worked, or with bConfirm set to FALSE
+// to indicate it didn't
+
+function CredUIConfirmCredentialsA(pszTargetName: PCSTR; bConfirm: BOOL): DWORD; stdcall;
+{$EXTERNALSYM CredUIConfirmCredentialsA}
+function CredUIConfirmCredentialsW(pszTargetName: LPCWSTR; bConfirm: BOOL): DWORD; stdcall;
+{$EXTERNALSYM CredUIConfirmCredentialsW}
+function CredUIConfirmCredentials(pszTargetName: LPCTSTR; bConfirm: BOOL): DWORD; stdcall;
+{$EXTERNALSYM CredUIConfirmCredentials}
+
+function CredUIStoreSSOCredW(pszRealm, pszUsername, pszPassword: LPCWSTR; bPersist: BOOL): DWORD; stdcall;
+{$EXTERNALSYM CredUIStoreSSOCredW}
+
+function CredUIReadSSOCredW(pszRealm: LPCWSTR; out ppszUsername: PWSTR): DWORD; stdcall;
+{$EXTERNALSYM CredUIReadSSOCredW}
+
+implementation
+
+const
+ credapi = 'advapi32.dll';
+ credui = 'credui.dll';
+ {$IFDEF UNICODE}
+ AWSuffix = 'W';
+ {$ELSE}
+ AWSuffix = 'A';
+ {$ENDIF UNICODE}
+
+function CREDUIP_IS_USER_PASSWORD_ERROR(_Status: NTSTATUS): BOOL;
+begin
+ Result :=
+ (DWORD(_Status) = ERROR_LOGON_FAILURE) or
+ (_Status = HRESULT_FROM_WIN32(ERROR_LOGON_FAILURE)) or
+ (_Status = STATUS_LOGON_FAILURE) or
+ (_Status = HRESULT_FROM_NT(STATUS_LOGON_FAILURE)) or
+ (DWORD(_Status) = ERROR_ACCESS_DENIED) or
+ (_Status = HRESULT_FROM_WIN32(ERROR_ACCESS_DENIED)) or
+ (_Status = STATUS_ACCESS_DENIED) or
+ (_Status = HRESULT_FROM_NT(STATUS_ACCESS_DENIED)) or
+ (DWORD(_Status) = ERROR_INVALID_PASSWORD) or
+ (_Status = HRESULT_FROM_WIN32(ERROR_INVALID_PASSWORD)) or
+ (_Status = STATUS_WRONG_PASSWORD) or
+ (_Status = HRESULT_FROM_NT(STATUS_WRONG_PASSWORD)) or
+ (_Status = SEC_E_NO_CREDENTIALS) or
+ (_Status = SEC_E_LOGON_DENIED);
+end;
+
+function CREDUIP_IS_DOWNGRADE_ERROR(_Status: NTSTATUS): BOOL;
+begin
+ Result :=
+ (DWORD(_Status) = ERROR_DOWNGRADE_DETECTED) or
+ (_Status = HRESULT_FROM_WIN32(ERROR_DOWNGRADE_DETECTED)) or
+ (_Status = STATUS_DOWNGRADE_DETECTED) or
+ (_Status = HRESULT_FROM_NT(STATUS_DOWNGRADE_DETECTED))
+end;
+
+function CREDUIP_IS_EXPIRED_ERROR(_Status: NTSTATUS): BOOL;
+begin
+ Result :=
+ (DWORD(_Status) = ERROR_PASSWORD_EXPIRED) or
+ (_Status = HRESULT_FROM_WIN32( ERROR_PASSWORD_EXPIRED)) or
+ (_Status = STATUS_PASSWORD_EXPIRED) or
+ (_Status = HRESULT_FROM_NT( STATUS_PASSWORD_EXPIRED)) or
+ (DWORD(_Status) = ERROR_PASSWORD_MUST_CHANGE) or
+ (_Status = HRESULT_FROM_WIN32( ERROR_PASSWORD_MUST_CHANGE)) or
+ (_Status = STATUS_PASSWORD_MUST_CHANGE) or
+ (_Status = HRESULT_FROM_NT( STATUS_PASSWORD_MUST_CHANGE)) or
+ (_Status = NERR_PasswordExpired) or
+ (_Status = HRESULT_FROM_WIN32(NERR_PasswordExpired));
+end;
+
+function CREDUI_IS_AUTHENTICATION_ERROR(_Status: NTSTATUS): BOOL;
+begin
+ Result := CREDUIP_IS_USER_PASSWORD_ERROR(_Status) or CREDUIP_IS_DOWNGRADE_ERROR(_Status) or CREDUIP_IS_EXPIRED_ERROR(_Status);
+end;
+
+function CREDUI_NO_PROMPT_AUTHENTICATION_ERROR(_Status: NTSTATUS): BOOL;
+begin
+ Result :=
+ (_Status = NTSTATUS(ERROR_AUTHENTICATION_FIREWALL_FAILED)) or
+ (_Status = HRESULT_FROM_WIN32(ERROR_AUTHENTICATION_FIREWALL_FAILED)) or
+ (_Status = STATUS_AUTHENTICATION_FIREWALL_FAILED) or
+ (_Status = HRESULT_FROM_NT(STATUS_AUTHENTICATION_FIREWALL_FAILED)) or
+ (DWORD(_Status) = ERROR_ACCOUNT_DISABLED) or
+ (_Status = HRESULT_FROM_WIN32(ERROR_ACCOUNT_DISABLED)) or
+ (_Status = STATUS_ACCOUNT_DISABLED) or
+ (_Status = HRESULT_FROM_NT(STATUS_ACCOUNT_DISABLED)) or
+ (DWORD(_Status) = ERROR_ACCOUNT_RESTRICTION) or
+ (_Status = HRESULT_FROM_WIN32(ERROR_ACCOUNT_RESTRICTION)) or
+ (_Status = STATUS_ACCOUNT_RESTRICTION) or
+ (_Status = HRESULT_FROM_NT(STATUS_ACCOUNT_RESTRICTION)) or
+ (DWORD(_Status) = ERROR_ACCOUNT_LOCKED_OUT) or
+ (_Status = HRESULT_FROM_WIN32(ERROR_ACCOUNT_LOCKED_OUT)) or
+ (_Status = STATUS_ACCOUNT_LOCKED_OUT) or
+ (_Status = HRESULT_FROM_NT(STATUS_ACCOUNT_LOCKED_OUT)) or
+ (DWORD(_Status) = ERROR_ACCOUNT_EXPIRED) or
+ (_Status = HRESULT_FROM_WIN32(ERROR_ACCOUNT_EXPIRED)) or
+ (_Status = STATUS_ACCOUNT_EXPIRED) or
+ (_Status = HRESULT_FROM_NT(STATUS_ACCOUNT_EXPIRED)) or
+ (DWORD(_Status) = ERROR_LOGON_TYPE_NOT_GRANTED) or
+ (_Status = HRESULT_FROM_WIN32(ERROR_LOGON_TYPE_NOT_GRANTED)) or
+ (_Status = STATUS_LOGON_TYPE_NOT_GRANTED) or
+ (_Status = HRESULT_FROM_NT(STATUS_LOGON_TYPE_NOT_GRANTED));
+end;
+
+{$IFDEF DYNAMIC_LINK}
+
+var
+ _CredWriteW: Pointer;
+
+function CredWriteW;
+begin
+ GetProcedureAddress(_CredWriteW, credapi, 'CredWriteW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CredWriteW]
+ end;
+end;
+
+var
+ _CredWriteA: Pointer;
+
+function CredWriteA;
+begin
+ GetProcedureAddress(_CredWriteA, credapi, 'CredWriteA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CredWriteA]
+ end;
+end;
+
+var
+ _CredWrite: Pointer;
+
+function CredWrite;
+begin
+ GetProcedureAddress(_CredWrite, credapi, 'CredWrite' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CredWrite]
+ end;
+end;
+
+var
+ _CredReadW: Pointer;
+
+function CredReadW;
+begin
+ GetProcedureAddress(_CredReadW, credapi, 'CredReadW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CredReadW]
+ end;
+end;
+
+var
+ _CredReadA: Pointer;
+
+function CredReadA;
+begin
+ GetProcedureAddress(_CredReadA, credapi, 'CredReadA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CredReadA]
+ end;
+end;
+
+var
+ _CredRead: Pointer;
+
+function CredRead;
+begin
+ GetProcedureAddress(_CredRead, credapi, 'CredRead' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CredRead]
+ end;
+end;
+
+var
+ _CredEnumerateW: Pointer;
+
+function CredEnumerateW;
+begin
+ GetProcedureAddress(_CredEnumerateW, credapi, 'CredEnumerateW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CredEnumerateW]
+ end;
+end;
+
+var
+ _CredEnumerateA: Pointer;
+
+function CredEnumerateA;
+begin
+ GetProcedureAddress(_CredEnumerateA, credapi, 'CredEnumerateA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CredEnumerateA]
+ end;
+end;
+
+var
+ _CredEnumerate: Pointer;
+
+function CredEnumerate;
+begin
+ GetProcedureAddress(_CredEnumerate, credapi, 'CredEnumerate' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CredEnumerate]
+ end;
+end;
+
+var
+ _CredWriteDomainCredentialsW: Pointer;
+
+function CredWriteDomainCredentialsW;
+begin
+ GetProcedureAddress(_CredWriteDomainCredentialsW, credapi, 'CredWriteDomainCredentialsW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CredWriteDomainCredentialsW]
+ end;
+end;
+
+var
+ _CredWriteDomainCredentialsA: Pointer;
+
+function CredWriteDomainCredentialsA;
+begin
+ GetProcedureAddress(_CredWriteDomainCredentialsA, credapi, 'CredWriteDomainCredentialsA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CredWriteDomainCredentialsA]
+ end;
+end;
+
+var
+ _CredWriteDomainCredentials: Pointer;
+
+function CredWriteDomainCredentials;
+begin
+ GetProcedureAddress(_CredWriteDomainCredentials, credapi, 'CredWriteDomainCredentials' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CredWriteDomainCredentials]
+ end;
+end;
+
+var
+ _CredReadDomainCredentialsW: Pointer;
+
+function CredReadDomainCredentialsW;
+begin
+ GetProcedureAddress(_CredReadDomainCredentialsW, credapi, 'CredReadDomainCredentialsW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CredReadDomainCredentialsW]
+ end;
+end;
+
+var
+ _CredReadDomainCredentialsA: Pointer;
+
+function CredReadDomainCredentialsA;
+begin
+ GetProcedureAddress(_CredReadDomainCredentialsA, credapi, 'CredReadDomainCredentialsA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CredReadDomainCredentialsA]
+ end;
+end;
+
+var
+ _CredReadDomainCredentials: Pointer;
+
+function CredReadDomainCredentials;
+begin
+ GetProcedureAddress(_CredReadDomainCredentials, credapi, 'CredReadDomainCredentials' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CredReadDomainCredentials]
+ end;
+end;
+
+var
+ _CredDeleteW: Pointer;
+
+function CredDeleteW;
+begin
+ GetProcedureAddress(_CredDeleteW, credapi, 'CredDeleteW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CredDeleteW]
+ end;
+end;
+
+var
+ _CredDeleteA: Pointer;
+
+function CredDeleteA;
+begin
+ GetProcedureAddress(_CredDeleteA, credapi, 'CredDeleteA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CredDeleteA]
+ end;
+end;
+
+var
+ _CredDelete: Pointer;
+
+function CredDelete;
+begin
+ GetProcedureAddress(_CredDelete, credapi, 'CredDelete' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CredDelete]
+ end;
+end;
+
+var
+ _CredRenameW: Pointer;
+
+function CredRenameW;
+begin
+ GetProcedureAddress(_CredRenameW, credapi, 'CredRenameW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CredRenameW]
+ end;
+end;
+
+var
+ _CredRenameA: Pointer;
+
+function CredRenameA;
+begin
+ GetProcedureAddress(_CredRenameA, credapi, 'CredRenameA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CredRenameA]
+ end;
+end;
+
+var
+ _CredRename: Pointer;
+
+function CredRename;
+begin
+ GetProcedureAddress(_CredRename, credapi, 'CredRename' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CredRename]
+ end;
+end;
+
+var
+ _CredGetTargetInfoW: Pointer;
+
+function CredGetTargetInfoW;
+begin
+ GetProcedureAddress(_CredGetTargetInfoW, credapi, 'CredGetTargetInfoW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CredGetTargetInfoW]
+ end;
+end;
+
+var
+ _CredGetTargetInfoA: Pointer;
+
+function CredGetTargetInfoA;
+begin
+ GetProcedureAddress(_CredGetTargetInfoA, credapi, 'CredGetTargetInfoA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CredGetTargetInfoA]
+ end;
+end;
+
+var
+ _CredGetTargetInfo: Pointer;
+
+function CredGetTargetInfo;
+begin
+ GetProcedureAddress(_CredGetTargetInfo, credapi, 'CredGetTargetInfoA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CredGetTargetInfo]
+ end;
+end;
+
+var
+ _CredMarshalCredentialW: Pointer;
+
+function CredMarshalCredentialW;
+begin
+ GetProcedureAddress(_CredMarshalCredentialW, credapi, 'CredMarshalCredentialW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CredMarshalCredentialW]
+ end;
+end;
+
+var
+ _CredMarshalCredentialA: Pointer;
+
+function CredMarshalCredentialA;
+begin
+ GetProcedureAddress(_CredMarshalCredentialA, credapi, 'CredMarshalCredentialA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CredMarshalCredentialA]
+ end;
+end;
+
+var
+ _CredMarshalCredential: Pointer;
+
+function CredMarshalCredential;
+begin
+ GetProcedureAddress(_CredMarshalCredential, credapi, 'CredMarshalCredential' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CredMarshalCredential]
+ end;
+end;
+
+var
+ _CredUnmarshalCredentialW: Pointer;
+
+function CredUnmarshalCredentialW;
+begin
+ GetProcedureAddress(_CredUnmarshalCredentialW, credapi, 'CredUnmarshalCredentialW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CredUnmarshalCredentialW]
+ end;
+end;
+
+var
+ _CredUnmarshalCredentialA: Pointer;
+
+function CredUnmarshalCredentialA;
+begin
+ GetProcedureAddress(_CredUnmarshalCredentialA, credapi, 'CredUnmarshalCredentialA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CredUnmarshalCredentialA]
+ end;
+end;
+
+var
+ _CredUnmarshalCredential: Pointer;
+
+function CredUnmarshalCredential;
+begin
+ GetProcedureAddress(_CredUnmarshalCredential, credapi, 'CredUnmarshalCredential' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CredUnmarshalCredential]
+ end;
+end;
+
+var
+ _CredIsMarshaledCredentialW: Pointer;
+
+function CredIsMarshaledCredentialW;
+begin
+ GetProcedureAddress(_CredIsMarshaledCredentialW, credapi, 'CredIsMarshaledCredentialW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CredIsMarshaledCredentialW]
+ end;
+end;
+
+var
+ _CredIsMarshaledCredentialA: Pointer;
+
+function CredIsMarshaledCredentialA;
+begin
+ GetProcedureAddress(_CredIsMarshaledCredentialA, credapi, 'CredIsMarshaledCredentialA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CredIsMarshaledCredentialA]
+ end;
+end;
+
+var
+ _CredIsMarshaledCredential: Pointer;
+
+function CredIsMarshaledCredential;
+begin
+ GetProcedureAddress(_CredIsMarshaledCredential, credapi, 'CredIsMarshaledCredential' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CredIsMarshaledCredential]
+ end;
+end;
+
+var
+ _CredGetSessionTypes: Pointer;
+
+function CredGetSessionTypes;
+begin
+ GetProcedureAddress(_CredGetSessionTypes, credapi, 'CredGetSessionTypes');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CredGetSessionTypes]
+ end;
+end;
+
+var
+ _CredFree: Pointer;
+
+procedure CredFree;
+begin
+ GetProcedureAddress(_CredFree, credapi, 'CredFree');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CredFree]
+ end;
+end;
+
+var
+ _CredUIPromptForCredentialsW: Pointer;
+
+function CredUIPromptForCredentialsW;
+begin
+ GetProcedureAddress(_CredUIPromptForCredentialsW, credui, 'CredUIPromptForCredentialsW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CredUIPromptForCredentialsW]
+ end;
+end;
+
+var
+ _CredUIPromptForCredentialsA: Pointer;
+
+function CredUIPromptForCredentialsA;
+begin
+ GetProcedureAddress(_CredUIPromptForCredentialsA, credui, 'CredUIPromptForCredentialsA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CredUIPromptForCredentialsA]
+ end;
+end;
+
+var
+ _CredUIPromptForCredentials: Pointer;
+
+function CredUIPromptForCredentials;
+begin
+ GetProcedureAddress(_CredUIPromptForCredentials, credui, 'CredUIPromptForCredentials' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CredUIPromptForCredentials]
+ end;
+end;
+
+var
+ _CredUIParseUserNameW: Pointer;
+
+function CredUIParseUserNameW;
+begin
+ GetProcedureAddress(_CredUIParseUserNameW, credui, 'CredUIParseUserNameW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CredUIParseUserNameW]
+ end;
+end;
+
+var
+ _CredUIParseUserNameA: Pointer;
+
+function CredUIParseUserNameA;
+begin
+ GetProcedureAddress(_CredUIParseUserNameA, credui, 'CredUIParseUserNameA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CredUIParseUserNameA]
+ end;
+end;
+
+var
+ _CredUIParseUserName: Pointer;
+
+function CredUIParseUserName;
+begin
+ GetProcedureAddress(_CredUIParseUserName, credui, 'CredUIParseUserName' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CredUIParseUserName]
+ end;
+end;
+
+var
+ _CredUICmdLinePromptForCredentialsW: Pointer;
+
+function CredUICmdLinePromptForCredentialsW;
+begin
+ GetProcedureAddress(_CredUICmdLinePromptForCredentialsW, credui, 'CredUICmdLinePromptForCredentialsW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CredUICmdLinePromptForCredentialsW]
+ end;
+end;
+
+var
+ _CredUICmdLinePromptForCredentialsA: Pointer;
+
+function CredUICmdLinePromptForCredentialsA;
+begin
+ GetProcedureAddress(_CredUICmdLinePromptForCredentialsA, credui, 'CredUICmdLinePromptForCredentialsA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CredUICmdLinePromptForCredentialsA]
+ end;
+end;
+
+var
+ _CredUICmdLinePromptForCredentials: Pointer;
+
+function CredUICmdLinePromptForCredentials;
+begin
+ GetProcedureAddress(_CredUICmdLinePromptForCredentials, credui, 'CredUICmdLinePromptForCredentials' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CredUICmdLinePromptForCredentials]
+ end;
+end;
+
+var
+ _CredUIConfirmCredentialsW: Pointer;
+
+function CredUIConfirmCredentialsW;
+begin
+ GetProcedureAddress(_CredUIConfirmCredentialsW, credui, 'CredUIConfirmCredentialsW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CredUIConfirmCredentialsW]
+ end;
+end;
+
+var
+ _CredUIConfirmCredentialsA: Pointer;
+
+function CredUIConfirmCredentialsA;
+begin
+ GetProcedureAddress(_CredUIConfirmCredentialsA, credui, 'CredUIConfirmCredentialsA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CredUIConfirmCredentialsA]
+ end;
+end;
+
+var
+ _CredUIConfirmCredentials: Pointer;
+
+function CredUIConfirmCredentials;
+begin
+ GetProcedureAddress(_CredUIConfirmCredentials, credui, 'CredUIConfirmCredentials' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CredUIConfirmCredentials]
+ end;
+end;
+
+var
+ _CredUIStoreSSOCredW: Pointer;
+
+function CredUIStoreSSOCredW;
+begin
+ GetProcedureAddress(_CredUIStoreSSOCredW, credui, 'CredUIStoreSSOCredW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CredUIStoreSSOCredW]
+ end;
+end;
+
+var
+ _CredUIReadSSOCredW: Pointer;
+
+function CredUIReadSSOCredW;
+begin
+ GetProcedureAddress(_CredUIReadSSOCredW, credui, 'CredUIReadSSOCredW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CredUIReadSSOCredW]
+ end;
+end;
+
+{$ELSE}
+
+function CredWriteW; external credapi name 'CredWriteW';
+function CredWriteA; external credapi name 'CredWriteA';
+function CredWrite; external credapi name 'CredWrite' + AWSuffix;
+function CredReadW; external credapi name 'CredReadW';
+function CredReadA; external credapi name 'CredReadA';
+function CredRead; external credapi name 'CredRead' + AWSuffix;
+function CredEnumerateW; external credapi name 'CredEnumerateW';
+function CredEnumerateA; external credapi name 'CredEnumerateA';
+function CredEnumerate; external credapi name 'CredEnumerate' + AWSuffix;
+function CredWriteDomainCredentialsW; external credapi name 'CredWriteDomainCredentialsW';
+function CredWriteDomainCredentialsA; external credapi name 'CredWriteDomainCredentialsA';
+function CredWriteDomainCredentials; external credapi name 'CredWriteDomainCredentials' + AWSuffix;
+function CredReadDomainCredentialsW; external credapi name 'CredReadDomainCredentialsW';
+function CredReadDomainCredentialsA; external credapi name 'CredReadDomainCredentialsA';
+function CredReadDomainCredentials; external credapi name 'CredReadDomainCredentials' + AWSuffix;
+function CredDeleteW; external credapi name 'CredDeleteW';
+function CredDeleteA; external credapi name 'CredDeleteA';
+function CredDelete; external credapi name 'CredDelete' + AWSuffix;
+function CredRenameW; external credapi name 'CredRenameW';
+function CredRenameA; external credapi name 'CredRenameA';
+function CredRename; external credapi name 'CredRename' + AWSuffix;
+function CredGetTargetInfoW; external credapi name 'CredGetTargetInfoW';
+function CredGetTargetInfoA; external credapi name 'CredGetTargetInfoA';
+function CredGetTargetInfo; external credapi name 'CredGetTargetInfoA';
+function CredMarshalCredentialW; external credapi name 'CredMarshalCredentialW';
+function CredMarshalCredentialA; external credapi name 'CredMarshalCredentialA';
+function CredMarshalCredential; external credapi name 'CredMarshalCredential' + AWSuffix;
+function CredUnmarshalCredentialW; external credapi name 'CredUnmarshalCredentialW';
+function CredUnmarshalCredentialA; external credapi name 'CredUnmarshalCredentialA';
+function CredUnmarshalCredential; external credapi name 'CredUnmarshalCredential' + AWSuffix;
+function CredIsMarshaledCredentialW; external credapi name 'CredIsMarshaledCredentialW';
+function CredIsMarshaledCredentialA; external credapi name 'CredIsMarshaledCredentialA';
+function CredIsMarshaledCredential; external credapi name 'CredIsMarshaledCredential' + AWSuffix;
+function CredGetSessionTypes; external credapi name 'CredGetSessionTypes';
+procedure CredFree; external credapi name 'CredFree';
+function CredUIPromptForCredentialsW; external credui name 'CredUIPromptForCredentialsW';
+function CredUIPromptForCredentialsA; external credui name 'CredUIPromptForCredentialsA';
+function CredUIPromptForCredentials; external credui name 'CredUIPromptForCredentials' + AWSuffix;
+function CredUIParseUserNameW; external credui name 'CredUIParseUserNameW';
+function CredUIParseUserNameA; external credui name 'CredUIParseUserNameA';
+function CredUIParseUserName; external credui name 'CredUIParseUserName' + AWSuffix;
+function CredUICmdLinePromptForCredentialsW; external credui name 'CredUICmdLinePromptForCredentialsW';
+function CredUICmdLinePromptForCredentialsA; external credui name 'CredUICmdLinePromptForCredentialsA';
+function CredUICmdLinePromptForCredentials; external credui name 'CredUICmdLinePromptForCredentials' + AWSuffix;
+function CredUIConfirmCredentialsW; external credui name 'CredUIConfirmCredentialsW';
+function CredUIConfirmCredentialsA; external credui name 'CredUIConfirmCredentialsA';
+function CredUIConfirmCredentials; external credui name 'CredUIConfirmCredentials' + AWSuffix;
+function CredUIStoreSSOCredW; external credui name 'CredUIStoreSSOCredW';
+function CredUIReadSSOCredW; external credui name 'CredUIReadSSOCredW';
+
+{$ENDIF DYNAMIC_LINK}
+
+end.
diff --git a/packages/extra/winunits/jwawincrypt.pas b/packages/extra/winunits/jwawincrypt.pas
index c08fe430fd..1410bdf86b 100644
--- a/packages/extra/winunits/jwawincrypt.pas
+++ b/packages/extra/winunits/jwawincrypt.pas
@@ -1,19650 +1,19650 @@
-{******************************************************************************}
-{ }
-{ Windows Cryptography API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: wincrypt.h, released June 2000. The original Pascal }
-{ code is: WinCrypt.pas, released December 2000. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwawincrypt.pas,v 1.1 2005/04/04 07:56:11 marco Exp $
-
-unit JwaWinCrypt;
-
-{$I jediapilib.inc}
-
-{$WEAKPACKAGEUNIT}
-
-interface
-
-uses
- JwaWinBase, JwaWinType;
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include <WinCrypt.h>'}
-{$HPPEMIT ''}
-{$HPPEMIT 'typedef HCRYPTPROV *PHCRYPTPROV'}
-{$HPPEMIT 'typedef HCRYPTKEY *PHCRYPTKEY'}
-{$HPPEMIT 'typedef HCRYPTHASH *PHCRYPTHASH'}
-{$HPPEMIT 'typedef PROV_ENUMALGS *PPROV_ENUMALGS'}
-{$HPPEMIT 'typedef PROV_ENUMALGS_EX *PPROV_ENUMALGS_EX'}
-{$HPPEMIT 'typedef PUBLICKEYSTRUC *PPUBLICKEYSTRUC'}
-{$HPPEMIT 'typedef RSAPUBKEY *PRSAPUBKEY'}
-{$HPPEMIT 'typedef DSSSEED *PDSSSEED'}
-{$HPPEMIT 'typedef PUBKEYVER3 *PPUBKEYVER3'}
-{$HPPEMIT 'typedef DHPRIVKEY_VER3 *PPRIVKEYVER3'}
-{$HPPEMIT 'typedef CERT_FORTEZZA_DATA_PROP *PCERT_FORTEZZA_DATA_PROP'}
-{$HPPEMIT 'typedef HCRYPTMSG *PHCRYPTMSG'}
-{$HPPEMIT 'typedef CMSG_RECIPIENT_ENCODE_INFO *PCMSG_RECIPIENT_ENCODE_INFO'}
-{$HPPEMIT 'typedef _CMSG_RECIPIENT_ENCODE_INFO CMSG_RECIPIENT_ENCODE_INFO'}
-{$HPPEMIT 'typedef PCMSG_KEY_AGREE_KEY_ENCRYPT_INFO *PPCMSG_KEY_AGREE_KEY_ENCRYPT_INFO'}
-{$HPPEMIT 'typedef HCERTSTORE *PHCERTSTORE'}
-{$HPPEMIT 'typedef PCCERT_CONTEXT *PPCCERT_CONTEXT'}
-{$HPPEMIT 'typedef PCCRL_CONTEXT *PPCCRL_CONTEXT'}
-{$HPPEMIT 'typedef PCERT_CHAIN_CONTEXT *PPCCERT_CHAIN_CONTEXT'}
-{$HPPEMIT ''}
-
-//
-// Algorithm IDs and Flags
-//
-
-// ALG_ID crackers
-
-function GET_ALG_CLASS(x: DWORD): DWORD;
-{$EXTERNALSYM GET_ALG_CLASS}
-
-function GET_ALG_TYPE(x: DWORD): DWORD;
-{$EXTERNALSYM GET_ALG_TYPE}
-
-function GET_ALG_SID(x: DWORD): DWORD;
-{$EXTERNALSYM GET_ALG_SID}
-
-// Algorithm classes
-
-const
- ALG_CLASS_ANY = 0;
- {$EXTERNALSYM ALG_CLASS_ANY}
- ALG_CLASS_SIGNATURE = 1 shl 13;
- {$EXTERNALSYM ALG_CLASS_SIGNATURE}
- ALG_CLASS_MSG_ENCRYPT = 2 shl 13;
- {$EXTERNALSYM ALG_CLASS_MSG_ENCRYPT}
- ALG_CLASS_DATA_ENCRYPT = 3 shl 13;
- {$EXTERNALSYM ALG_CLASS_DATA_ENCRYPT}
- ALG_CLASS_HASH = 4 shl 13;
- {$EXTERNALSYM ALG_CLASS_HASH}
- ALG_CLASS_KEY_EXCHANGE = 5 shl 13;
- {$EXTERNALSYM ALG_CLASS_KEY_EXCHANGE}
- ALG_CLASS_ALL = 7 shl 13;
- {$EXTERNALSYM ALG_CLASS_ALL}
-
-// Algorithm types
-
- ALG_TYPE_ANY = 0;
- {$EXTERNALSYM ALG_TYPE_ANY}
- ALG_TYPE_DSS = 1 shl 9;
- {$EXTERNALSYM ALG_TYPE_DSS}
- ALG_TYPE_RSA = 2 shl 9;
- {$EXTERNALSYM ALG_TYPE_RSA}
- ALG_TYPE_BLOCK = 3 shl 9;
- {$EXTERNALSYM ALG_TYPE_BLOCK}
- ALG_TYPE_STREAM = 4 shl 9;
- {$EXTERNALSYM ALG_TYPE_STREAM}
- ALG_TYPE_DH = 5 shl 9;
- {$EXTERNALSYM ALG_TYPE_DH}
- ALG_TYPE_SECURECHANNEL = 6 shl 9;
- {$EXTERNALSYM ALG_TYPE_SECURECHANNEL}
-
-// Generic sub-ids
-
- ALG_SID_ANY = 0;
- {$EXTERNALSYM ALG_SID_ANY}
-
-// Some RSA sub-ids
-
- ALG_SID_RSA_ANY = 0;
- {$EXTERNALSYM ALG_SID_RSA_ANY}
- ALG_SID_RSA_PKCS = 1;
- {$EXTERNALSYM ALG_SID_RSA_PKCS}
- ALG_SID_RSA_MSATWORK = 2;
- {$EXTERNALSYM ALG_SID_RSA_MSATWORK}
- ALG_SID_RSA_ENTRUST = 3;
- {$EXTERNALSYM ALG_SID_RSA_ENTRUST}
- ALG_SID_RSA_PGP = 4;
- {$EXTERNALSYM ALG_SID_RSA_PGP}
-
-// Some DSS sub-ids
-//
-
- ALG_SID_DSS_ANY = 0;
- {$EXTERNALSYM ALG_SID_DSS_ANY}
- ALG_SID_DSS_PKCS = 1;
- {$EXTERNALSYM ALG_SID_DSS_PKCS}
- ALG_SID_DSS_DMS = 2;
- {$EXTERNALSYM ALG_SID_DSS_DMS}
-
-// Block cipher sub ids
-// DES sub_ids
-
- ALG_SID_DES = 1;
- {$EXTERNALSYM ALG_SID_DES}
- ALG_SID_3DES = 3;
- {$EXTERNALSYM ALG_SID_3DES}
- ALG_SID_DESX = 4;
- {$EXTERNALSYM ALG_SID_DESX}
- ALG_SID_IDEA = 5;
- {$EXTERNALSYM ALG_SID_IDEA}
- ALG_SID_CAST = 6;
- {$EXTERNALSYM ALG_SID_CAST}
- ALG_SID_SAFERSK64 = 7;
- {$EXTERNALSYM ALG_SID_SAFERSK64}
- ALG_SID_SAFERSK128 = 8;
- {$EXTERNALSYM ALG_SID_SAFERSK128}
- ALG_SID_3DES_112 = 9;
- {$EXTERNALSYM ALG_SID_3DES_112}
- ALG_SID_CYLINK_MEK = 12;
- {$EXTERNALSYM ALG_SID_CYLINK_MEK}
- ALG_SID_RC5 = 13;
- {$EXTERNALSYM ALG_SID_RC5}
-
-// Fortezza sub-ids
-
- ALG_SID_SKIPJACK = 10;
- {$EXTERNALSYM ALG_SID_SKIPJACK}
- ALG_SID_TEK = 11;
- {$EXTERNALSYM ALG_SID_TEK}
-
-// KP_MODE
-
- CRYPT_MODE_CBCI = 6; // ANSI CBC Interleaved
- {$EXTERNALSYM CRYPT_MODE_CBCI}
- CRYPT_MODE_CFBP = 7; // ANSI CFB Pipelined
- {$EXTERNALSYM CRYPT_MODE_CFBP}
- CRYPT_MODE_OFBP = 8; // ANSI OFB Pipelined
- {$EXTERNALSYM CRYPT_MODE_OFBP}
- CRYPT_MODE_CBCOFM = 9; // ANSI CBC + OF Masking
- {$EXTERNALSYM CRYPT_MODE_CBCOFM}
- CRYPT_MODE_CBCOFMI = 10; // ANSI CBC + OFM Interleaved
- {$EXTERNALSYM CRYPT_MODE_CBCOFMI}
-
-// RC2 sub-ids
-
- ALG_SID_RC2 = 2;
- {$EXTERNALSYM ALG_SID_RC2}
-
-// Stream cipher sub-ids
-
- ALG_SID_RC4 = 1;
- {$EXTERNALSYM ALG_SID_RC4}
- ALG_SID_SEAL = 2;
- {$EXTERNALSYM ALG_SID_SEAL}
-
-// Diffie-Hellman sub-ids
-
- ALG_SID_DH_SANDF = 1;
- {$EXTERNALSYM ALG_SID_DH_SANDF}
- ALG_SID_DH_EPHEM = 2;
- {$EXTERNALSYM ALG_SID_DH_EPHEM}
- ALG_SID_AGREED_KEY_ANY = 3;
- {$EXTERNALSYM ALG_SID_AGREED_KEY_ANY}
- ALG_SID_KEA = 4;
- {$EXTERNALSYM ALG_SID_KEA}
-
-// Hash sub ids
-
- ALG_SID_MD2 = 1;
- {$EXTERNALSYM ALG_SID_MD2}
- ALG_SID_MD4 = 2;
- {$EXTERNALSYM ALG_SID_MD4}
- ALG_SID_MD5 = 3;
- {$EXTERNALSYM ALG_SID_MD5}
- ALG_SID_SHA = 4;
- {$EXTERNALSYM ALG_SID_SHA}
- ALG_SID_SHA1 = 4;
- {$EXTERNALSYM ALG_SID_SHA1}
- ALG_SID_MAC = 5;
- {$EXTERNALSYM ALG_SID_MAC}
- ALG_SID_RIPEMD = 6;
- {$EXTERNALSYM ALG_SID_RIPEMD}
- ALG_SID_RIPEMD160 = 7;
- {$EXTERNALSYM ALG_SID_RIPEMD160}
- ALG_SID_SSL3SHAMD5 = 8;
- {$EXTERNALSYM ALG_SID_SSL3SHAMD5}
- ALG_SID_HMAC = 9;
- {$EXTERNALSYM ALG_SID_HMAC}
- ALG_SID_TLS1PRF = 10;
- {$EXTERNALSYM ALG_SID_TLS1PRF}
-
-// secure channel sub ids
-
- ALG_SID_SSL3_MASTER = 1;
- {$EXTERNALSYM ALG_SID_SSL3_MASTER}
- ALG_SID_SCHANNEL_MASTER_HASH = 2;
- {$EXTERNALSYM ALG_SID_SCHANNEL_MASTER_HASH}
- ALG_SID_SCHANNEL_MAC_KEY = 3;
- {$EXTERNALSYM ALG_SID_SCHANNEL_MAC_KEY}
- ALG_SID_PCT1_MASTER = 4;
- {$EXTERNALSYM ALG_SID_PCT1_MASTER}
- ALG_SID_SSL2_MASTER = 5;
- {$EXTERNALSYM ALG_SID_SSL2_MASTER}
- ALG_SID_TLS1_MASTER = 6;
- {$EXTERNALSYM ALG_SID_TLS1_MASTER}
- ALG_SID_SCHANNEL_ENC_KEY = 7;
- {$EXTERNALSYM ALG_SID_SCHANNEL_ENC_KEY}
-
-// Our silly example sub-id
-
- ALG_SID_EXAMPLE = 80;
- {$EXTERNALSYM ALG_SID_EXAMPLE}
-
-type
- ALG_ID = Cardinal;
- {$EXTERNALSYM ALG_ID}
-
-// algorithm identifier definitions
-
-const
- CALG_MD2 = ALG_CLASS_HASH or ALG_TYPE_ANY or ALG_SID_MD2;
- {$EXTERNALSYM CALG_MD2}
- CALG_MD4 = ALG_CLASS_HASH or ALG_TYPE_ANY or ALG_SID_MD4;
- {$EXTERNALSYM CALG_MD4}
- CALG_MD5 = ALG_CLASS_HASH or ALG_TYPE_ANY or ALG_SID_MD5;
- {$EXTERNALSYM CALG_MD5}
- CALG_SHA = ALG_CLASS_HASH or ALG_TYPE_ANY or ALG_SID_SHA;
- {$EXTERNALSYM CALG_SHA}
- CALG_SHA1 = ALG_CLASS_HASH or ALG_TYPE_ANY or ALG_SID_SHA1;
- {$EXTERNALSYM CALG_SHA1}
- CALG_MAC = ALG_CLASS_HASH or ALG_TYPE_ANY or ALG_SID_MAC;
- {$EXTERNALSYM CALG_MAC}
- CALG_RSA_SIGN = ALG_CLASS_SIGNATURE or ALG_TYPE_RSA or ALG_SID_RSA_ANY;
- {$EXTERNALSYM CALG_RSA_SIGN}
- CALG_DSS_SIGN = ALG_CLASS_SIGNATURE or ALG_TYPE_DSS or ALG_SID_DSS_ANY;
- {$EXTERNALSYM CALG_DSS_SIGN}
- CALG_RSA_KEYX = ALG_CLASS_KEY_EXCHANGE or ALG_TYPE_RSA or ALG_SID_RSA_ANY;
- {$EXTERNALSYM CALG_RSA_KEYX}
- CALG_DES = ALG_CLASS_DATA_ENCRYPT or ALG_TYPE_BLOCK or ALG_SID_DES;
- {$EXTERNALSYM CALG_DES}
- CALG_3DES_112 = ALG_CLASS_DATA_ENCRYPT or ALG_TYPE_BLOCK or ALG_SID_3DES_112;
- {$EXTERNALSYM CALG_3DES_112}
- CALG_3DES = ALG_CLASS_DATA_ENCRYPT or ALG_TYPE_BLOCK or ALG_SID_3DES;
- {$EXTERNALSYM CALG_3DES}
- CALG_DESX = ALG_CLASS_DATA_ENCRYPT or ALG_TYPE_BLOCK or ALG_SID_DESX;
- {$EXTERNALSYM CALG_DESX}
- CALG_RC2 = ALG_CLASS_DATA_ENCRYPT or ALG_TYPE_BLOCK or ALG_SID_RC2;
- {$EXTERNALSYM CALG_RC2}
- CALG_RC4 = ALG_CLASS_DATA_ENCRYPT or ALG_TYPE_STREAM or ALG_SID_RC4;
- {$EXTERNALSYM CALG_RC4}
- CALG_SEAL = ALG_CLASS_DATA_ENCRYPT or ALG_TYPE_STREAM or ALG_SID_SEAL;
- {$EXTERNALSYM CALG_SEAL}
- CALG_DH_SF = ALG_CLASS_KEY_EXCHANGE or ALG_TYPE_DH or ALG_SID_DH_SANDF;
- {$EXTERNALSYM CALG_DH_SF}
- CALG_DH_EPHEM = ALG_CLASS_KEY_EXCHANGE or ALG_TYPE_DH or ALG_SID_DH_EPHEM;
- {$EXTERNALSYM CALG_DH_EPHEM}
- CALG_AGREEDKEY_ANY = ALG_CLASS_KEY_EXCHANGE or ALG_TYPE_DH or ALG_SID_AGREED_KEY_ANY;
- {$EXTERNALSYM CALG_AGREEDKEY_ANY}
- CALG_KEA_KEYX = ALG_CLASS_KEY_EXCHANGE or ALG_TYPE_DH or ALG_SID_KEA;
- {$EXTERNALSYM CALG_KEA_KEYX}
- CALG_HUGHES_MD5 = ALG_CLASS_KEY_EXCHANGE or ALG_TYPE_ANY or ALG_SID_MD5;
- {$EXTERNALSYM CALG_HUGHES_MD5}
- CALG_SKIPJACK = ALG_CLASS_DATA_ENCRYPT or ALG_TYPE_BLOCK or ALG_SID_SKIPJACK;
- {$EXTERNALSYM CALG_SKIPJACK}
- CALG_TEK = ALG_CLASS_DATA_ENCRYPT or ALG_TYPE_BLOCK or ALG_SID_TEK;
- {$EXTERNALSYM CALG_TEK}
- CALG_CYLINK_MEK = ALG_CLASS_DATA_ENCRYPT or ALG_TYPE_BLOCK or ALG_SID_CYLINK_MEK;
- {$EXTERNALSYM CALG_CYLINK_MEK}
- CALG_SSL3_SHAMD5 = ALG_CLASS_HASH or ALG_TYPE_ANY or ALG_SID_SSL3SHAMD5;
- {$EXTERNALSYM CALG_SSL3_SHAMD5}
- CALG_SSL3_MASTER = ALG_CLASS_MSG_ENCRYPT or ALG_TYPE_SECURECHANNEL or ALG_SID_SSL3_MASTER;
- {$EXTERNALSYM CALG_SSL3_MASTER}
- CALG_SCHANNEL_MASTER_HASH = ALG_CLASS_MSG_ENCRYPT or ALG_TYPE_SECURECHANNEL or ALG_SID_SCHANNEL_MASTER_HASH;
- {$EXTERNALSYM CALG_SCHANNEL_MASTER_HASH}
- CALG_SCHANNEL_MAC_KEY = ALG_CLASS_MSG_ENCRYPT or ALG_TYPE_SECURECHANNEL or ALG_SID_SCHANNEL_MAC_KEY;
- {$EXTERNALSYM CALG_SCHANNEL_MAC_KEY}
- CALG_SCHANNEL_ENC_KEY = ALG_CLASS_MSG_ENCRYPT or ALG_TYPE_SECURECHANNEL or ALG_SID_SCHANNEL_ENC_KEY;
- {$EXTERNALSYM CALG_SCHANNEL_ENC_KEY}
- CALG_PCT1_MASTER = ALG_CLASS_MSG_ENCRYPT or ALG_TYPE_SECURECHANNEL or ALG_SID_PCT1_MASTER;
- {$EXTERNALSYM CALG_PCT1_MASTER}
- CALG_SSL2_MASTER = ALG_CLASS_MSG_ENCRYPT or ALG_TYPE_SECURECHANNEL or ALG_SID_SSL2_MASTER;
- {$EXTERNALSYM CALG_SSL2_MASTER}
- CALG_TLS1_MASTER = ALG_CLASS_MSG_ENCRYPT or ALG_TYPE_SECURECHANNEL or ALG_SID_TLS1_MASTER;
- {$EXTERNALSYM CALG_TLS1_MASTER}
- CALG_RC5 = ALG_CLASS_DATA_ENCRYPT or ALG_TYPE_BLOCK or ALG_SID_RC5;
- {$EXTERNALSYM CALG_RC5}
- CALG_HMAC = ALG_CLASS_HASH or ALG_TYPE_ANY or ALG_SID_HMAC;
- {$EXTERNALSYM CALG_HMAC}
- CALG_TLS1PRF = ALG_CLASS_HASH or ALG_TYPE_ANY or ALG_SID_TLS1PRF;
- {$EXTERNALSYM CALG_TLS1PRF}
-
-// resource number for signatures in the CSP
-
- SIGNATURE_RESOURCE_NUMBER = $29A;
- {$EXTERNALSYM SIGNATURE_RESOURCE_NUMBER}
-
-type
- PVTableProvStruc = ^VTableProvStruc;
- _VTableProvStruc = record
- Version: DWORD;
- FuncVerifyImage: FARPROC;
- FuncReturnhWnd: FARPROC;
- dwProvType: DWORD;
- pbContextInfo: LPBYTE;
- cbContextInfo: DWORD;
- pszProvName: LPSTR;
- end;
- {$EXTERNALSYM _VTableProvStruc}
- VTableProvStruc = _VTableProvStruc;
- {$EXTERNALSYM VTableProvStruc}
- TVTableProvStruc = VTableProvStruc;
-
- HCRYPTPROV = ULONG_PTR;
- {$EXTERNALSYM HCRYPTPROV}
- HCRYPTKEY = ULONG_PTR;
- {$EXTERNALSYM HCRYPTKEY}
- HCRYPTHASH = ULONG_PTR;
- {$EXTERNALSYM HCRYPTHASH}
-
- PHCRYPTPROV = ^HCRYPTPROV;
- {$NODEFINE PHCRYPTPROV}
- PHCRYPTKEY = ^HCRYPTKEY;
- {$NODEFINE PHCRYPTKEY}
- PHCRYPTHASH = ^HCRYPTHASH;
- {$NODEFINE PHCRYPTHASH}
-
-// dwFlags definitions for CryptAcquireContext
-
-const
- CRYPT_VERIFYCONTEXT = DWORD($F0000000);
- {$EXTERNALSYM CRYPT_VERIFYCONTEXT}
- CRYPT_NEWKEYSET = $00000008;
- {$EXTERNALSYM CRYPT_NEWKEYSET}
- CRYPT_DELETEKEYSET = $00000010;
- {$EXTERNALSYM CRYPT_DELETEKEYSET}
- CRYPT_MACHINE_KEYSET = $00000020;
- {$EXTERNALSYM CRYPT_MACHINE_KEYSET}
- CRYPT_SILENT = $00000040;
- {$EXTERNALSYM CRYPT_SILENT}
-
-// dwFlag definitions for CryptGenKey
-
- CRYPT_EXPORTABLE = $00000001;
- {$EXTERNALSYM CRYPT_EXPORTABLE}
- CRYPT_USER_PROTECTED = $00000002;
- {$EXTERNALSYM CRYPT_USER_PROTECTED}
- CRYPT_CREATE_SALT = $00000004;
- {$EXTERNALSYM CRYPT_CREATE_SALT}
- CRYPT_UPDATE_KEY = $00000008;
- {$EXTERNALSYM CRYPT_UPDATE_KEY}
- CRYPT_NO_SALT = $00000010;
- {$EXTERNALSYM CRYPT_NO_SALT}
- CRYPT_PREGEN = $00000040;
- {$EXTERNALSYM CRYPT_PREGEN}
- CRYPT_RECIPIENT = $00000010;
- {$EXTERNALSYM CRYPT_RECIPIENT}
- CRYPT_INITIATOR = $00000040;
- {$EXTERNALSYM CRYPT_INITIATOR}
- CRYPT_ONLINE = $00000080;
- {$EXTERNALSYM CRYPT_ONLINE}
- CRYPT_SF = $00000100;
- {$EXTERNALSYM CRYPT_SF}
- CRYPT_CREATE_IV = $00000200;
- {$EXTERNALSYM CRYPT_CREATE_IV}
- CRYPT_KEK = $00000400;
- {$EXTERNALSYM CRYPT_KEK}
- CRYPT_DATA_KEY = $00000800;
- {$EXTERNALSYM CRYPT_DATA_KEY}
- CRYPT_VOLATILE = $00001000;
- {$EXTERNALSYM CRYPT_VOLATILE}
- CRYPT_SGCKEY = $00002000;
- {$EXTERNALSYM CRYPT_SGCKEY}
-
- RSA1024BIT_KEY = $04000000;
- {$EXTERNALSYM RSA1024BIT_KEY}
-
-// dwFlags definitions for CryptDeriveKey
-
- CRYPT_SERVER = $00000400;
- {$EXTERNALSYM CRYPT_SERVER}
-
- KEY_LENGTH_MASK = DWORD($FFFF0000);
- {$EXTERNALSYM KEY_LENGTH_MASK}
-
-// dwFlag definitions for CryptExportKey
-
- CRYPT_Y_ONLY = $00000001;
- {$EXTERNALSYM CRYPT_Y_ONLY}
- CRYPT_SSL2_FALLBACK = $00000002;
- {$EXTERNALSYM CRYPT_SSL2_FALLBACK}
- CRYPT_DESTROYKEY = $00000004;
- {$EXTERNALSYM CRYPT_DESTROYKEY}
- CRYPT_OAEP = $00000040; // used with RSA encryptions/decryptions
- // CryptExportKey, CryptImportKey,
- // CryptEncrypt and CryptDecrypt
- {$EXTERNALSYM CRYPT_OAEP}
-
- CRYPT_BLOB_VER3 = $00000080; // export version 3 of a blob type
- {$EXTERNALSYM CRYPT_BLOB_VER3}
-
-// dwFlags definitions for CryptCreateHash
-
- CRYPT_SECRETDIGEST = $00000001;
- {$EXTERNALSYM CRYPT_SECRETDIGEST}
-
-// dwFlags definitions for CryptHashSessionKey
-
- CRYPT_LITTLE_ENDIAN = $00000001;
- {$EXTERNALSYM CRYPT_LITTLE_ENDIAN}
-
-// dwFlags definitions for CryptSignHash and CryptVerifySignature
-
- CRYPT_NOHASHOID = $00000001;
- {$EXTERNALSYM CRYPT_NOHASHOID}
- CRYPT_TYPE2_FORMAT = $00000002;
- {$EXTERNALSYM CRYPT_TYPE2_FORMAT}
- CRYPT_X931_FORMAT = $00000004;
- {$EXTERNALSYM CRYPT_X931_FORMAT}
-
-// dwFlag definitions for CryptSetProviderEx and CryptGetDefaultProvider
-
- CRYPT_MACHINE_DEFAULT = $00000001;
- {$EXTERNALSYM CRYPT_MACHINE_DEFAULT}
- CRYPT_USER_DEFAULT = $00000002;
- {$EXTERNALSYM CRYPT_USER_DEFAULT}
- CRYPT_DELETE_DEFAULT = $00000004;
- {$EXTERNALSYM CRYPT_DELETE_DEFAULT}
-
-// exported key blob definitions
-
- SIMPLEBLOB = $1;
- {$EXTERNALSYM SIMPLEBLOB}
- PUBLICKEYBLOB = $6;
- {$EXTERNALSYM PUBLICKEYBLOB}
- PRIVATEKEYBLOB = $7;
- {$EXTERNALSYM PRIVATEKEYBLOB}
- PLAINTEXTKEYBLOB = $8;
- {$EXTERNALSYM PLAINTEXTKEYBLOB}
- OPAQUEKEYBLOB = $9;
- {$EXTERNALSYM OPAQUEKEYBLOB}
- PUBLICKEYBLOBEX = $A;
- {$EXTERNALSYM PUBLICKEYBLOBEX}
- SYMMETRICWRAPKEYBLOB = $B;
- {$EXTERNALSYM SYMMETRICWRAPKEYBLOB}
-
- AT_KEYEXCHANGE = 1;
- {$EXTERNALSYM AT_KEYEXCHANGE}
- AT_SIGNATURE = 2;
- {$EXTERNALSYM AT_SIGNATURE}
-
- CRYPT_USERDATA = 1;
- {$EXTERNALSYM CRYPT_USERDATA}
-
-// dwParam
-
- KP_IV = 1; // Initialization vector
- {$EXTERNALSYM KP_IV}
- KP_SALT = 2; // Salt value
- {$EXTERNALSYM KP_SALT}
- KP_PADDING = 3; // Padding values
- {$EXTERNALSYM KP_PADDING}
- KP_MODE = 4; // Mode of the cipher
- {$EXTERNALSYM KP_MODE}
- KP_MODE_BITS = 5; // Number of bits to feedback
- {$EXTERNALSYM KP_MODE_BITS}
- KP_PERMISSIONS = 6; // Key permissions DWORD
- {$EXTERNALSYM KP_PERMISSIONS}
- KP_ALGID = 7; // Key algorithm
- {$EXTERNALSYM KP_ALGID}
- KP_BLOCKLEN = 8; // Block size of the cipher
- {$EXTERNALSYM KP_BLOCKLEN}
- KP_KEYLEN = 9; // Length of key in bits
- {$EXTERNALSYM KP_KEYLEN}
- KP_SALT_EX = 10; // Length of salt in bytes
- {$EXTERNALSYM KP_SALT_EX}
- KP_P = 11; // DSS/Diffie-Hellman P value
- {$EXTERNALSYM KP_P}
- KP_G = 12; // DSS/Diffie-Hellman G value
- {$EXTERNALSYM KP_G}
- KP_Q = 13; // DSS Q value
- {$EXTERNALSYM KP_Q}
- KP_X = 14; // Diffie-Hellman X value
- {$EXTERNALSYM KP_X}
- KP_Y = 15; // Y value
- {$EXTERNALSYM KP_Y}
- KP_RA = 16; // Fortezza RA value
- {$EXTERNALSYM KP_RA}
- KP_RB = 17; // Fortezza RB value
- {$EXTERNALSYM KP_RB}
- KP_INFO = 18; // for putting information into an RSA envelope
- {$EXTERNALSYM KP_INFO}
- KP_EFFECTIVE_KEYLEN = 19; // setting and getting RC2 effective key length
- {$EXTERNALSYM KP_EFFECTIVE_KEYLEN}
- KP_SCHANNEL_ALG = 20; // for setting the Secure Channel algorithms
- {$EXTERNALSYM KP_SCHANNEL_ALG}
- KP_CLIENT_RANDOM = 21; // for setting the Secure Channel client random data
- {$EXTERNALSYM KP_CLIENT_RANDOM}
- KP_SERVER_RANDOM = 22; // for setting the Secure Channel server random data
- {$EXTERNALSYM KP_SERVER_RANDOM}
- KP_RP = 23;
- {$EXTERNALSYM KP_RP}
- KP_PRECOMP_MD5 = 24;
- {$EXTERNALSYM KP_PRECOMP_MD5}
- KP_PRECOMP_SHA = 25;
- {$EXTERNALSYM KP_PRECOMP_SHA}
- KP_CERTIFICATE = 26; // for setting Secure Channel certificate data (PCT1)
- {$EXTERNALSYM KP_CERTIFICATE}
- KP_CLEAR_KEY = 27; // for setting Secure Channel clear key data (PCT1)
- {$EXTERNALSYM KP_CLEAR_KEY}
- KP_PUB_EX_LEN = 28;
- {$EXTERNALSYM KP_PUB_EX_LEN}
- KP_PUB_EX_VAL = 29;
- {$EXTERNALSYM KP_PUB_EX_VAL}
- KP_KEYVAL = 30;
- {$EXTERNALSYM KP_KEYVAL}
- KP_ADMIN_PIN = 31;
- {$EXTERNALSYM KP_ADMIN_PIN}
- KP_KEYEXCHANGE_PIN = 32;
- {$EXTERNALSYM KP_KEYEXCHANGE_PIN}
- KP_SIGNATURE_PIN = 33;
- {$EXTERNALSYM KP_SIGNATURE_PIN}
- KP_PREHASH = 34;
- {$EXTERNALSYM KP_PREHASH}
-
- KP_OAEP_PARAMS = 36; // for setting OAEP params on RSA keys
- {$EXTERNALSYM KP_OAEP_PARAMS}
- KP_CMS_KEY_INFO = 37;
- {$EXTERNALSYM KP_CMS_KEY_INFO}
- KP_CMS_DH_KEY_INFO = 38;
- {$EXTERNALSYM KP_CMS_DH_KEY_INFO}
- KP_PUB_PARAMS = 39; // for setting public parameters
- {$EXTERNALSYM KP_PUB_PARAMS}
- KP_VERIFY_PARAMS = 40; // for verifying DSA and DH parameters
- {$EXTERNALSYM KP_VERIFY_PARAMS}
- KP_HIGHEST_VERSION = 41; // for TLS protocol version setting
- {$EXTERNALSYM KP_HIGHEST_VERSION}
-
-// KP_PADDING
-
- PKCS5_PADDING = 1; // PKCS 5 (sec 6.2) padding method
- {$EXTERNALSYM PKCS5_PADDING}
- RANDOM_PADDING = 2;
- {$EXTERNALSYM RANDOM_PADDING}
- ZERO_PADDING = 3;
- {$EXTERNALSYM ZERO_PADDING}
-
-// KP_MODE
-
- CRYPT_MODE_CBC = 1; // Cipher block chaining
- {$EXTERNALSYM CRYPT_MODE_CBC}
- CRYPT_MODE_ECB = 2; // Electronic code book
- {$EXTERNALSYM CRYPT_MODE_ECB}
- CRYPT_MODE_OFB = 3; // Output feedback mode
- {$EXTERNALSYM CRYPT_MODE_OFB}
- CRYPT_MODE_CFB = 4; // Cipher feedback mode
- {$EXTERNALSYM CRYPT_MODE_CFB}
- CRYPT_MODE_CTS = 5; // Ciphertext stealing mode
- {$EXTERNALSYM CRYPT_MODE_CTS}
-
-// KP_PERMISSIONS
-
- CRYPT_ENCRYPT = $0001; // Allow encryption
- {$EXTERNALSYM CRYPT_ENCRYPT}
- CRYPT_DECRYPT = $0002; // Allow decryption
- {$EXTERNALSYM CRYPT_DECRYPT}
- CRYPT_EXPORT = $0004; // Allow key to be exported
- {$EXTERNALSYM CRYPT_EXPORT}
- CRYPT_READ = $0008; // Allow parameters to be read
- {$EXTERNALSYM CRYPT_READ}
- CRYPT_WRITE = $0010; // Allow parameters to be set
- {$EXTERNALSYM CRYPT_WRITE}
- CRYPT_MAC = $0020; // Allow MACs to be used with key
- {$EXTERNALSYM CRYPT_MAC}
- CRYPT_EXPORT_KEY = $0040; // Allow key to be used for exporting keys
- {$EXTERNALSYM CRYPT_EXPORT_KEY}
- CRYPT_IMPORT_KEY = $0080; // Allow key to be used for importing keys
- {$EXTERNALSYM CRYPT_IMPORT_KEY}
-
- HP_ALGID = $0001; // Hash algorithm
- {$EXTERNALSYM HP_ALGID}
- HP_HASHVAL = $0002; // Hash value
- {$EXTERNALSYM HP_HASHVAL}
- HP_HASHSIZE = $0004; // Hash value size
- {$EXTERNALSYM HP_HASHSIZE}
- HP_HMAC_INFO = $0005; // information for creating an HMAC
- {$EXTERNALSYM HP_HMAC_INFO}
- HP_TLS1PRF_LABEL = $0006; // label for TLS1 PRF
- {$EXTERNALSYM HP_TLS1PRF_LABEL}
- HP_TLS1PRF_SEED = $0007; // seed for TLS1 PRF
- {$EXTERNALSYM HP_TLS1PRF_SEED}
-
- CRYPT_FAILED = FALSE;
- {$EXTERNALSYM CRYPT_FAILED}
- CRYPT_SUCCEED = TRUE;
- {$EXTERNALSYM CRYPT_SUCCEED}
-
-function RCRYPT_SUCCEEDED(rt: BOOL): BOOL;
-{$EXTERNALSYM RCRYPT_SUCCEEDED}
-
-function RCRYPT_FAILED(rt: BOOL): BOOL;
-{$EXTERNALSYM RCRYPT_FAILED}
-
-//
-// CryptGetProvParam
-//
-
-const
- PP_ENUMALGS = 1;
- {$EXTERNALSYM PP_ENUMALGS}
- PP_ENUMCONTAINERS = 2;
- {$EXTERNALSYM PP_ENUMCONTAINERS}
- PP_IMPTYPE = 3;
- {$EXTERNALSYM PP_IMPTYPE}
- PP_NAME = 4;
- {$EXTERNALSYM PP_NAME}
- PP_VERSION = 5;
- {$EXTERNALSYM PP_VERSION}
- PP_CONTAINER = 6;
- {$EXTERNALSYM PP_CONTAINER}
- PP_CHANGE_PASSWORD = 7;
- {$EXTERNALSYM PP_CHANGE_PASSWORD}
- PP_KEYSET_SEC_DESCR = 8; // get/set security descriptor of keyset
- {$EXTERNALSYM PP_KEYSET_SEC_DESCR}
- PP_CERTCHAIN = 9; // for retrieving certificates from tokens
- {$EXTERNALSYM PP_CERTCHAIN}
- PP_KEY_TYPE_SUBTYPE = 10;
- {$EXTERNALSYM PP_KEY_TYPE_SUBTYPE}
- PP_PROVTYPE = 16;
- {$EXTERNALSYM PP_PROVTYPE}
- PP_KEYSTORAGE = 17;
- {$EXTERNALSYM PP_KEYSTORAGE}
- PP_APPLI_CERT = 18;
- {$EXTERNALSYM PP_APPLI_CERT}
- PP_SYM_KEYSIZE = 19;
- {$EXTERNALSYM PP_SYM_KEYSIZE}
- PP_SESSION_KEYSIZE = 20;
- {$EXTERNALSYM PP_SESSION_KEYSIZE}
- PP_UI_PROMPT = 21;
- {$EXTERNALSYM PP_UI_PROMPT}
- PP_ENUMALGS_EX = 22;
- {$EXTERNALSYM PP_ENUMALGS_EX}
- PP_ENUMMANDROOTS = 25;
- {$EXTERNALSYM PP_ENUMMANDROOTS}
- PP_ENUMELECTROOTS = 26;
- {$EXTERNALSYM PP_ENUMELECTROOTS}
- PP_KEYSET_TYPE = 27;
- {$EXTERNALSYM PP_KEYSET_TYPE}
- PP_ADMIN_PIN = 31;
- {$EXTERNALSYM PP_ADMIN_PIN}
- PP_KEYEXCHANGE_PIN = 32;
- {$EXTERNALSYM PP_KEYEXCHANGE_PIN}
- PP_SIGNATURE_PIN = 33;
- {$EXTERNALSYM PP_SIGNATURE_PIN}
- PP_SIG_KEYSIZE_INC = 34;
- {$EXTERNALSYM PP_SIG_KEYSIZE_INC}
- PP_KEYX_KEYSIZE_INC = 35;
- {$EXTERNALSYM PP_KEYX_KEYSIZE_INC}
- PP_UNIQUE_CONTAINER = 36;
- {$EXTERNALSYM PP_UNIQUE_CONTAINER}
- PP_SGC_INFO = 37;
- {$EXTERNALSYM PP_SGC_INFO}
- PP_USE_HARDWARE_RNG = 38;
- {$EXTERNALSYM PP_USE_HARDWARE_RNG}
- PP_KEYSPEC = 39;
- {$EXTERNALSYM PP_KEYSPEC}
- PP_ENUMEX_SIGNING_PROT = 40;
- {$EXTERNALSYM PP_ENUMEX_SIGNING_PROT}
-
- CRYPT_FIRST = 1;
- {$EXTERNALSYM CRYPT_FIRST}
- CRYPT_NEXT = 2;
- {$EXTERNALSYM CRYPT_NEXT}
- CRYPT_SGC_ENUM = 4;
- {$EXTERNALSYM CRYPT_SGC_ENUM}
-
- CRYPT_IMPL_HARDWARE = 1;
- {$EXTERNALSYM CRYPT_IMPL_HARDWARE}
- CRYPT_IMPL_SOFTWARE = 2;
- {$EXTERNALSYM CRYPT_IMPL_SOFTWARE}
- CRYPT_IMPL_MIXED = 3;
- {$EXTERNALSYM CRYPT_IMPL_MIXED}
- CRYPT_IMPL_UNKNOWN = 4;
- {$EXTERNALSYM CRYPT_IMPL_UNKNOWN}
- CRYPT_IMPL_REMOVABLE = 8;
- {$EXTERNALSYM CRYPT_IMPL_REMOVABLE}
-
-// key storage flags
-
- CRYPT_SEC_DESCR = $00000001;
- {$EXTERNALSYM CRYPT_SEC_DESCR}
- CRYPT_PSTORE = $00000002;
- {$EXTERNALSYM CRYPT_PSTORE}
- CRYPT_UI_PROMPT = $00000004;
- {$EXTERNALSYM CRYPT_UI_PROMPT}
-
-// protocol flags
-
- CRYPT_FLAG_PCT1 = $0001;
- {$EXTERNALSYM CRYPT_FLAG_PCT1}
- CRYPT_FLAG_SSL2 = $0002;
- {$EXTERNALSYM CRYPT_FLAG_SSL2}
- CRYPT_FLAG_SSL3 = $0004;
- {$EXTERNALSYM CRYPT_FLAG_SSL3}
- CRYPT_FLAG_TLS1 = $0008;
- {$EXTERNALSYM CRYPT_FLAG_TLS1}
- CRYPT_FLAG_IPSEC = $0010;
- {$EXTERNALSYM CRYPT_FLAG_IPSEC}
- CRYPT_FLAG_SIGNING = $0020;
- {$EXTERNALSYM CRYPT_FLAG_SIGNING}
-
-// SGC flags
-
- CRYPT_SGC = $0001;
- {$EXTERNALSYM CRYPT_SGC}
- CRYPT_FASTSGC = $0002;
- {$EXTERNALSYM CRYPT_FASTSGC}
-
-//
-// CryptSetProvParam
-//
-
- PP_CLIENT_HWND = 1;
- {$EXTERNALSYM PP_CLIENT_HWND}
- PP_CONTEXT_INFO = 11;
- {$EXTERNALSYM PP_CONTEXT_INFO}
- PP_KEYEXCHANGE_KEYSIZE = 12;
- {$EXTERNALSYM PP_KEYEXCHANGE_KEYSIZE}
- PP_SIGNATURE_KEYSIZE = 13;
- {$EXTERNALSYM PP_SIGNATURE_KEYSIZE}
- PP_KEYEXCHANGE_ALG = 14;
- {$EXTERNALSYM PP_KEYEXCHANGE_ALG}
- PP_SIGNATURE_ALG = 15;
- {$EXTERNALSYM PP_SIGNATURE_ALG}
- PP_DELETEKEY = 24;
- {$EXTERNALSYM PP_DELETEKEY}
-
- PROV_RSA_FULL = 1;
- {$EXTERNALSYM PROV_RSA_FULL}
- PROV_RSA_SIG = 2;
- {$EXTERNALSYM PROV_RSA_SIG}
- PROV_DSS = 3;
- {$EXTERNALSYM PROV_DSS}
- PROV_FORTEZZA = 4;
- {$EXTERNALSYM PROV_FORTEZZA}
- PROV_MS_EXCHANGE = 5;
- {$EXTERNALSYM PROV_MS_EXCHANGE}
- PROV_SSL = 6;
- {$EXTERNALSYM PROV_SSL}
- PROV_RSA_SCHANNEL = 12;
- {$EXTERNALSYM PROV_RSA_SCHANNEL}
- PROV_DSS_DH = 13;
- {$EXTERNALSYM PROV_DSS_DH}
- PROV_EC_ECDSA_SIG = 14;
- {$EXTERNALSYM PROV_EC_ECDSA_SIG}
- PROV_EC_ECNRA_SIG = 15;
- {$EXTERNALSYM PROV_EC_ECNRA_SIG}
- PROV_EC_ECDSA_FULL = 16;
- {$EXTERNALSYM PROV_EC_ECDSA_FULL}
- PROV_EC_ECNRA_FULL = 17;
- {$EXTERNALSYM PROV_EC_ECNRA_FULL}
- PROV_DH_SCHANNEL = 18;
- {$EXTERNALSYM PROV_DH_SCHANNEL}
- PROV_SPYRUS_LYNKS = 20;
- {$EXTERNALSYM PROV_SPYRUS_LYNKS}
- PROV_RNG = 21;
- {$EXTERNALSYM PROV_RNG}
- PROV_INTEL_SEC = 22;
- {$EXTERNALSYM PROV_INTEL_SEC}
-
-//
-// STT defined Providers
-//
-
- PROV_STT_MER = 7;
- {$EXTERNALSYM PROV_STT_MER}
- PROV_STT_ACQ = 8;
- {$EXTERNALSYM PROV_STT_ACQ}
- PROV_STT_BRND = 9;
- {$EXTERNALSYM PROV_STT_BRND}
- PROV_STT_ROOT = 10;
- {$EXTERNALSYM PROV_STT_ROOT}
- PROV_STT_ISS = 11;
- {$EXTERNALSYM PROV_STT_ISS}
-
-//
-// Provider friendly names
-//
-
- MS_DEF_PROV_A = 'Microsoft Base Cryptographic Provider v1.0';
- {$EXTERNALSYM MS_DEF_PROV_A}
- MS_DEF_PROV_W = 'Microsoft Base Cryptographic Provider v1.0';
- {$EXTERNALSYM MS_DEF_PROV_W}
-
- {$IFDEF UNICODE}
- MS_DEF_PROV = MS_DEF_PROV_W;
- {$EXTERNALSYM MS_DEF_PROV}
- {$ELSE}
- MS_DEF_PROV = MS_DEF_PROV_A;
- {$EXTERNALSYM MS_DEF_PROV}
- {$ENDIF UNICODE}
-
- MS_ENHANCED_PROV_A = 'Microsoft Enhanced Cryptographic Provider v1.0';
- {$EXTERNALSYM MS_ENHANCED_PROV_A}
- MS_ENHANCED_PROV_W = 'Microsoft Enhanced Cryptographic Provider v1.0';
- {$EXTERNALSYM MS_ENHANCED_PROV_W}
- {$IFDEF UNICODE}
- MS_ENHANCED_PROV = MS_ENHANCED_PROV_W;
- {$EXTERNALSYM MS_ENHANCED_PROV}
- {$ELSE}
- MS_ENHANCED_PROV = MS_ENHANCED_PROV_A;
- {$EXTERNALSYM MS_ENHANCED_PROV}
- {$ENDIF UNICODE}
-
- MS_STRONG_PROV_A = 'Microsoft Strong Cryptographic Provider';
- {$EXTERNALSYM MS_STRONG_PROV_A}
- MS_STRONG_PROV_W = 'Microsoft Strong Cryptographic Provider';
- {$EXTERNALSYM MS_STRONG_PROV_W}
- {$IFDEF UNICODE}
- MS_STRONG_PROV = MS_STRONG_PROV_W;
- {$EXTERNALSYM MS_STRONG_PROV}
- {$ELSE}
- MS_STRONG_PROV = MS_STRONG_PROV_A;
- {$EXTERNALSYM MS_STRONG_PROV}
- {$ENDIF UNICODE}
-
- MS_DEF_RSA_SIG_PROV_A = 'Microsoft RSA Signature Cryptographic Provider';
- {$EXTERNALSYM MS_DEF_RSA_SIG_PROV_A}
- MS_DEF_RSA_SIG_PROV_W = 'Microsoft RSA Signature Cryptographic Provider';
- {$EXTERNALSYM MS_DEF_RSA_SIG_PROV_W}
- {$IFDEF UNICODE}
- MS_DEF_RSA_SIG_PROV = MS_DEF_RSA_SIG_PROV_W;
- {$EXTERNALSYM MS_DEF_RSA_SIG_PROV}
- {$ELSE}
- MS_DEF_RSA_SIG_PROV = MS_DEF_RSA_SIG_PROV_A;
- {$EXTERNALSYM MS_DEF_RSA_SIG_PROV}
- {$ENDIF UNICODE}
-
- MS_DEF_RSA_SCHANNEL_PROV_A = 'Microsoft RSA SChannel Cryptographic Provider';
- {$EXTERNALSYM MS_DEF_RSA_SCHANNEL_PROV_A}
- MS_DEF_RSA_SCHANNEL_PROV_W = 'Microsoft RSA SChannel Cryptographic Provider';
- {$EXTERNALSYM MS_DEF_RSA_SCHANNEL_PROV_W}
- {$IFDEF UNICODE}
- MS_DEF_RSA_SCHANNEL_PROV = MS_DEF_RSA_SCHANNEL_PROV_W;
- {$EXTERNALSYM MS_DEF_RSA_SCHANNEL_PROV}
- {$ELSE}
- MS_DEF_RSA_SCHANNEL_PROV = MS_DEF_RSA_SCHANNEL_PROV_A;
- {$EXTERNALSYM MS_DEF_RSA_SCHANNEL_PROV}
- {$ENDIF UNICODE}
-
- MS_DEF_DSS_PROV_A = 'Microsoft Base DSS Cryptographic Provider';
- {$EXTERNALSYM MS_DEF_DSS_PROV_A}
- MS_DEF_DSS_PROV_W = 'Microsoft Base DSS Cryptographic Provider';
- {$EXTERNALSYM MS_DEF_DSS_PROV_W}
- {$IFDEF UNICODE}
- MS_DEF_DSS_PROV = MS_DEF_DSS_PROV_W;
- {$EXTERNALSYM MS_DEF_DSS_PROV}
- {$ELSE}
- MS_DEF_DSS_PROV = MS_DEF_DSS_PROV_A;
- {$EXTERNALSYM MS_DEF_DSS_PROV}
- {$ENDIF UNICODE}
-
- MS_DEF_DSS_DH_PROV_A = 'Microsoft Base DSS and Diffie-Hellman Cryptographic Provider';
- {$EXTERNALSYM MS_DEF_DSS_DH_PROV_A}
- MS_DEF_DSS_DH_PROV_W = 'Microsoft Base DSS and Diffie-Hellman Cryptographic Provider';
- {$EXTERNALSYM MS_DEF_DSS_DH_PROV_W}
- {$IFDEF UNICODE}
- MS_DEF_DSS_DH_PROV = MS_DEF_DSS_DH_PROV_W;
- {$EXTERNALSYM MS_DEF_DSS_DH_PROV}
- {$ELSE}
- MS_DEF_DSS_DH_PROV = MS_DEF_DSS_DH_PROV_A;
- {$EXTERNALSYM MS_DEF_DSS_DH_PROV}
- {$ENDIF UNICODE}
-
- MS_ENH_DSS_DH_PROV_A = 'Microsoft Enhanced DSS and Diffie-Hellman Cryptographic Provider';
- {$EXTERNALSYM MS_ENH_DSS_DH_PROV_A}
- MS_ENH_DSS_DH_PROV_W = 'Microsoft Enhanced DSS and Diffie-Hellman Cryptographic Provider';
- {$EXTERNALSYM MS_ENH_DSS_DH_PROV_W}
- {$IFDEF UNICODE}
- MS_ENH_DSS_DH_PROV = MS_ENH_DSS_DH_PROV_W;
- {$EXTERNALSYM MS_ENH_DSS_DH_PROV}
- {$ELSE}
- MS_ENH_DSS_DH_PROV = MS_ENH_DSS_DH_PROV_A;
- {$EXTERNALSYM MS_ENH_DSS_DH_PROV}
- {$ENDIF UNICODE}
-
- MS_DEF_DH_SCHANNEL_PROV_A = 'Microsoft DH SChannel Cryptographic Provider';
- {$EXTERNALSYM MS_DEF_DH_SCHANNEL_PROV_A}
- MS_DEF_DH_SCHANNEL_PROV_W = 'Microsoft DH SChannel Cryptographic Provider';
- {$EXTERNALSYM MS_DEF_DH_SCHANNEL_PROV_W}
- {$IFDEF UNICODE}
- MS_DEF_DH_SCHANNEL_PROV = MS_DEF_DH_SCHANNEL_PROV_W;
- {$EXTERNALSYM MS_DEF_DH_SCHANNEL_PROV}
- {$ELSE}
- MS_DEF_DH_SCHANNEL_PROV = MS_DEF_DH_SCHANNEL_PROV_A;
- {$EXTERNALSYM MS_DEF_DH_SCHANNEL_PROV}
- {$ENDIF UNICODE}
-
- MS_SCARD_PROV_A = 'Microsoft Base Smart Card Crypto Provider';
- {$EXTERNALSYM MS_SCARD_PROV_A}
- MS_SCARD_PROV_W = 'Microsoft Base Smart Card Crypto Provider';
- {$EXTERNALSYM MS_SCARD_PROV_W}
- {$IFDEF UNICODE}
- MS_SCARD_PROV = MS_SCARD_PROV_W;
- {$EXTERNALSYM MS_SCARD_PROV}
- {$ELSE}
- MS_SCARD_PROV = MS_SCARD_PROV_A;
- {$EXTERNALSYM MS_SCARD_PROV}
- {$ENDIF UNICODE}
-
- MAXUIDLEN = 64;
- {$EXTERNALSYM MAXUIDLEN}
-
-// Exponentiation Offload Reg Location
-
- EXPO_OFFLOAD_REG_VALUE = 'ExpoOffload';
- {$EXTERNALSYM EXPO_OFFLOAD_REG_VALUE}
- EXPO_OFFLOAD_FUNC_NAME = 'OffloadModExpo';
- {$EXTERNALSYM EXPO_OFFLOAD_FUNC_NAME}
-
- CUR_BLOB_VERSION = 2;
- {$EXTERNALSYM CUR_BLOB_VERSION}
-
-// structure for use with CryptSetKeyParam for CMS keys
-// DO NOT USE THIS STRUCTURE!!!!!
-
-type
- PCMS_KEY_INFO = ^CMS_KEY_INFO;
- {$EXTERNALSYM PCMS_KEY_INFO}
- _CMS_KEY_INFO = record
- dwVersion: DWORD; // sizeof(CMS_KEY_INFO)
- Algid: ALG_ID; // algorithmm id for the key to be converted
- pbOID: LPBYTE; // pointer to OID to hash in with Z
- cbOID: DWORD; // length of OID to hash in with Z
- end;
- {$EXTERNALSYM _CMS_KEY_INFO}
- CMS_KEY_INFO = _CMS_KEY_INFO;
- {$EXTERNALSYM CMS_KEY_INFO}
- TCmsKeyInfo = CMS_KEY_INFO;
- PCmsKeyInfo = PCMS_KEY_INFO;
-
-// structure for use with CryptSetHashParam with CALG_HMAC
-
- PHMAC_Info = ^HMAC_Info;
- {$EXTERNALSYM PHMAC_Info}
- _HMAC_Info = record
- HashAlgid: ALG_ID;
- pbInnerString: LPBYTE;
- cbInnerString: DWORD;
- pbOuterString: LPBYTE;
- cbOuterString: DWORD;
- end;
- {$EXTERNALSYM _HMAC_Info}
- HMAC_Info = _HMAC_Info;
- {$EXTERNALSYM HMAC_Info}
- THMacInfo = HMAC_Info;
- PHMacInfo = PHMAC_Info;
-
-// structure for use with CryptSetKeyParam with KP_SCHANNEL_ALG
-
- PSCHANNEL_ALG = ^SCHANNEL_ALG;
- {$EXTERNALSYM PSCHANNEL_ALG}
- _SCHANNEL_ALG = record
- dwUse: DWORD;
- Algid: ALG_ID;
- cBits: DWORD;
- dwFlags: DWORD;
- dwReserved: DWORD;
- end;
- {$EXTERNALSYM _SCHANNEL_ALG}
- SCHANNEL_ALG = _SCHANNEL_ALG;
- {$EXTERNALSYM SCHANNEL_ALG}
- TSChannelAlg = SCHANNEL_ALG;
- PSChannelAlg = PSCHANNEL_ALG;
-
-// uses of algortihms for SCHANNEL_ALG structure
-
-const
- SCHANNEL_MAC_KEY = $00000000;
- {$EXTERNALSYM SCHANNEL_MAC_KEY}
- SCHANNEL_ENC_KEY = $00000001;
- {$EXTERNALSYM SCHANNEL_ENC_KEY}
-
-// uses of dwFlags SCHANNEL_ALG structure
-
- INTERNATIONAL_USAGE = $00000001;
- {$EXTERNALSYM INTERNATIONAL_USAGE}
-
-type
- PPROV_ENUMALGS = ^PROV_ENUMALGS;
- {$NODEFINE PPROV_ENUMALGS}
- _PROV_ENUMALGS = record
- aiAlgid: ALG_ID;
- dwBitLen: DWORD;
- dwNameLen: DWORD;
- szName: array [0..19] of CHAR;
- end;
- {$EXTERNALSYM _PROV_ENUMALGS}
- PROV_ENUMALGS = _PROV_ENUMALGS;
- {$EXTERNALSYM PROV_ENUMALGS}
- TProvEnumAlgs = PROV_ENUMALGS;
- PProvEnumAlgs = PPROV_ENUMALGS;
-
- PPROV_ENUMALGS_EX = ^PROV_ENUMALGS_EX;
- {$NODEFINE PPROV_ENUMALGS_EX}
- _PROV_ENUMALGS_EX = record
- aiAlgid: ALG_ID;
- dwDefaultLen: DWORD;
- dwMinLen: DWORD;
- dwMaxLen: DWORD;
- dwProtocols: DWORD;
- dwNameLen: DWORD;
- szName: array [0..19] of CHAR;
- dwLongNameLen: DWORD;
- szLongName: array [0..39] of CHAR;
- end;
- {$EXTERNALSYM _PROV_ENUMALGS_EX}
- PROV_ENUMALGS_EX = _PROV_ENUMALGS_EX;
- {$EXTERNALSYM PROV_ENUMALGS_EX}
- TProvEnumAlgsEx = PROV_ENUMALGS_EX;
- PProvEnumAlgsEx = PPROV_ENUMALGS_EX;
-
- PPUBLICKEYSTRUC = ^PUBLICKEYSTRUC;
- {$NODEFINE PPUBLICKEYSTRUC}
- _PUBLICKEYSTRUC = record
- bType: BYTE;
- bVersion: BYTE;
- reserved: WORD;
- aiKeyAlg: ALG_ID;
- end;
- {$EXTERNALSYM _PUBLICKEYSTRUC}
- PUBLICKEYSTRUC = _PUBLICKEYSTRUC;
- {$EXTERNALSYM PUBLICKEYSTRUC}
- BLOBHEADER = _PUBLICKEYSTRUC;
- {$EXTERNALSYM BLOBHEADER}
- TPublicKeyStruc = PUBLICKEYSTRUC;
-
- PRSAPUBKEY = ^RSAPUBKEY;
- {$NODEFINE PRSAPUBKEY}
- _RSAPUBKEY = record
- magic: DWORD; // Has to be RSA1
- bitlen: DWORD; // # of bits in modulus
- pubexp: DWORD; // public exponent
- // Modulus data follows
- end;
- {$EXTERNALSYM _RSAPUBKEY}
- RSAPUBKEY = _RSAPUBKEY;
- {$EXTERNALSYM RSAPUBKEY}
- TRsaPubKey = RSAPUBKEY;
-
- _PUBKEY = record
- magic: DWORD;
- bitlen: DWORD; // # of bits in modulus
- end;
- {$EXTERNALSYM _PUBKEY}
- DHPUBKEY = _PUBKEY;
- {$EXTERNALSYM DHPUBKEY}
- DSSPUBKEY = _PUBKEY;
- {$EXTERNALSYM DSSPUBKEY}
- KEAPUBKEY = _PUBKEY;
- {$EXTERNALSYM KEAPUBKEY}
- TEKPUBKEY = _PUBKEY;
- {$EXTERNALSYM TEKPUBKEY}
-
- PDSSSEED = ^DSSSEED;
- {$NODEFINE PDSSSEED}
- _DSSSEED = record
- counter: DWORD;
- seed: array [0..19] of BYTE;
- end;
- {$EXTERNALSYM _DSSSEED}
- DSSSEED = _DSSSEED;
- {$EXTERNALSYM DSSSEED}
- TDssSeed = DSSSEED;
-
- PPUBKEYVER3 = ^PUBKEYVER3;
- {$NODEFINE PPUBKEYVER3}
- _PUBKEYVER3 = record
- magic: DWORD;
- bitlenP: DWORD; // # of bits in prime modulus
- bitlenQ: DWORD; // # of bits in prime q, 0 if not available
- bitlenJ: DWORD; // # of bits in (p-1)/q, 0 if not available
- DSSSeed: DSSSEED;
- end;
- {$EXTERNALSYM _PUBKEYVER3}
- PUBKEYVER3 = _PUBKEYVER3;
- {$EXTERNALSYM PUBKEYVER3}
- DHPUBKEY_VER3 = PUBKEYVER3;
- {$EXTERNALSYM DHPUBKEY_VER3}
- TPubKeyVer3 = PUBKEYVER3;
-
- PPRIVKEYVER3 = ^DHPRIVKEY_VER3;
- {$NODEFINE PPRIVKEYVER3}
- _PRIVKEYVER3 = record
- magic: DWORD;
- bitlenP: DWORD; // # of bits in prime modulus
- bitlenQ: DWORD; // # of bits in prime q, 0 if not available
- bitlenJ: DWORD; // # of bits in (p-1)/q, 0 if not available
- bitlenX: DWORD; // # of bits in X
- DSSSeed: DSSSEED;
- end;
- {$EXTERNALSYM _PRIVKEYVER3}
- DHPRIVKEY_VER3 = _PRIVKEYVER3;
- {$EXTERNALSYM DHPRIVKEY_VER3}
- DSSPRIVKEY_VER3 = _PRIVKEYVER3;
- {$EXTERNALSYM DSSPRIVKEY_VER3}
- TDssPrivKey3 = DHPRIVKEY_VER3;
-
- PKEY_TYPE_SUBTYPE = ^KEY_TYPE_SUBTYPE;
- {$EXTERNALSYM PKEY_TYPE_SUBTYPE}
- _KEY_TYPE_SUBTYPE = record
- dwKeySpec: DWORD;
- Type_: GUID;
- Subtype: GUID;
- end;
- {$EXTERNALSYM _KEY_TYPE_SUBTYPE}
- KEY_TYPE_SUBTYPE = _KEY_TYPE_SUBTYPE;
- {$EXTERNALSYM KEY_TYPE_SUBTYPE}
- TKeyTypeSubType = KEY_TYPE_SUBTYPE;
- PKeyTypeSubType = PKEY_TYPE_SUBTYPE;
-
- PCERT_FORTEZZA_DATA_PROP = ^CERT_FORTEZZA_DATA_PROP;
- {$NODEFINE PCERT_FORTEZZA_DATA_PROP}
- _CERT_FORTEZZA_DATA_PROP = record
- SerialNumber: array [0..7] of Byte;
- CertIndex: Integer;
- CertLabel: array [0..35] of Byte;
- end;
- {$EXTERNALSYM _CERT_FORTEZZA_DATA_PROP}
- CERT_FORTEZZA_DATA_PROP = _CERT_FORTEZZA_DATA_PROP;
- {$EXTERNALSYM CERT_FORTEZZA_DATA_PROP}
- TCertFortezzaDataProp = CERT_FORTEZZA_DATA_PROP;
- PCertFortezzaDataProp = PCERT_FORTEZZA_DATA_PROP;
-
-//+-------------------------------------------------------------------------
-// CRYPTOAPI BLOB definitions
-//--------------------------------------------------------------------------
-
-type
- _CRYPTOAPI_BLOB = record
- cbData: DWORD;
- pbData: LPBYTE;
- end;
- {$EXTERNALSYM _CRYPTOAPI_BLOB}
- CRYPT_INTEGER_BLOB = _CRYPTOAPI_BLOB;
- TCryptIntegerBlob = CRYPT_INTEGER_BLOB;
- {$EXTERNALSYM CRYPT_INTEGER_BLOB}
- PCRYPT_INTEGER_BLOB = ^_CRYPTOAPI_BLOB;
- {$EXTERNALSYM PCRYPT_INTEGER_BLOB}
- PCryptIntegerBlob = PCRYPT_INTEGER_BLOB;
- CRYPT_UINT_BLOB = _CRYPTOAPI_BLOB;
- {$EXTERNALSYM CRYPT_UINT_BLOB}
- TCryptUintBlob = CRYPT_UINT_BLOB;
- PCRYPT_UINT_BLOB = ^_CRYPTOAPI_BLOB;
- {$EXTERNALSYM PCRYPT_UINT_BLOB}
- PCryptUintBlob = PCRYPT_UINT_BLOB;
- CRYPT_OBJID_BLOB = _CRYPTOAPI_BLOB;
- {$EXTERNALSYM CRYPT_OBJID_BLOB}
- TCryptObjIdBlob = CRYPT_OBJID_BLOB;
- PCRYPT_OBJID_BLOB = ^_CRYPTOAPI_BLOB;
- {$EXTERNALSYM PCRYPT_OBJID_BLOB}
- PCryptObjIdBlob = PCRYPT_OBJID_BLOB;
- CERT_NAME_BLOB = _CRYPTOAPI_BLOB;
- {$EXTERNALSYM CERT_NAME_BLOB}
- TCertNameBlob = CERT_NAME_BLOB;
- PCERT_NAME_BLOB = ^_CRYPTOAPI_BLOB;
- {$EXTERNALSYM PCERT_NAME_BLOB}
- PCertNameBlob = PCERT_NAME_BLOB;
- CERT_RDN_VALUE_BLOB = _CRYPTOAPI_BLOB;
- {$EXTERNALSYM CERT_RDN_VALUE_BLOB}
- TCertRdnValueBlob = CERT_RDN_VALUE_BLOB;
- PCERT_RDN_VALUE_BLOB = ^_CRYPTOAPI_BLOB;
- {$EXTERNALSYM PCERT_RDN_VALUE_BLOB}
- PCertRdnValueBlob = PCERT_RDN_VALUE_BLOB;
- CERT_BLOB = _CRYPTOAPI_BLOB;
- {$EXTERNALSYM CERT_BLOB}
- TCertBlob = CERT_BLOB;
- PCERT_BLOB = ^_CRYPTOAPI_BLOB;
- {$EXTERNALSYM PCERT_BLOB}
- PCertBlob = PCERT_BLOB;
- CRL_BLOB = _CRYPTOAPI_BLOB;
- {$EXTERNALSYM CRL_BLOB}
- TCrlBlob = CRL_BLOB;
- PCRL_BLOB = ^_CRYPTOAPI_BLOB;
- {$EXTERNALSYM PCRL_BLOB}
- PCrlBlob = PCRL_BLOB;
- DATA_BLOB = _CRYPTOAPI_BLOB;
- {$EXTERNALSYM DATA_BLOB}
- TDataBlob = DATA_BLOB;
- PDATA_BLOB = ^_CRYPTOAPI_BLOB;
- {$EXTERNALSYM PDATA_BLOB}
- PDataBlob = PDATA_BLOB;
- CRYPT_DATA_BLOB = _CRYPTOAPI_BLOB;
- {$EXTERNALSYM CRYPT_DATA_BLOB}
- TCryptDataBlob = CRYPT_DATA_BLOB;
- PCRYPT_DATA_BLOB = ^_CRYPTOAPI_BLOB;
- {$EXTERNALSYM PCRYPT_DATA_BLOB}
- PCryptDataBlob = PCRYPT_DATA_BLOB;
- CRYPT_HASH_BLOB = _CRYPTOAPI_BLOB;
- {$EXTERNALSYM CRYPT_HASH_BLOB}
- TCryptHashBlob = CRYPT_HASH_BLOB;
- PCRYPT_HASH_BLOB = ^_CRYPTOAPI_BLOB;
- {$EXTERNALSYM PCRYPT_HASH_BLOB}
- PCryptHashBlob = PCRYPT_HASH_BLOB;
- CRYPT_DIGEST_BLOB = _CRYPTOAPI_BLOB;
- {$EXTERNALSYM CRYPT_DIGEST_BLOB}
- TCryptDigestBlob = CRYPT_DIGEST_BLOB;
- PCRYPT_DIGEST_BLOB = ^_CRYPTOAPI_BLOB;
- {$EXTERNALSYM PCRYPT_DIGEST_BLOB}
- PCryptDigestBlob = PCRYPT_DIGEST_BLOB;
- CRYPT_DER_BLOB = _CRYPTOAPI_BLOB;
- {$EXTERNALSYM CRYPT_DER_BLOB}
- TCyptDerBlob = CRYPT_DER_BLOB;
- PCRYPT_DER_BLOB = ^_CRYPTOAPI_BLOB;
- {$EXTERNALSYM PCRYPT_DER_BLOB}
- PCyptDerBlob = PCRYPT_DER_BLOB;
- CRYPT_ATTR_BLOB = _CRYPTOAPI_BLOB;
- {$EXTERNALSYM CRYPT_ATTR_BLOB}
- TCryptAttrBlob = CRYPT_ATTR_BLOB;
- PCRYPT_ATTR_BLOB = ^_CRYPTOAPI_BLOB;
- {$EXTERNALSYM PCRYPT_ATTR_BLOB}
- PCryptAttrBlob = PCRYPT_ATTR_BLOB;
-
-// structure for use with CryptSetKeyParam for CMS keys
-
- PCMS_DH_KEY_INFO = ^CMS_DH_KEY_INFO;
- {$EXTERNALSYM PCMS_DH_KEY_INFO}
- _CMS_DH_KEY_INFO = record
- dwVersion: DWORD; // sizeof(CMS_DH_KEY_INFO)
- Algid: ALG_ID; // algorithmm id for the key to be converted
- pszContentEncObjId: LPSTR; // pointer to OID to hash in with Z
- PubInfo: CRYPT_DATA_BLOB; // OPTIONAL - public information
- pReserved: Pointer; // reserved - should be NULL
- end;
- {$EXTERNALSYM _CMS_DH_KEY_INFO}
- CMS_DH_KEY_INFO = _CMS_DH_KEY_INFO;
- {$EXTERNALSYM CMS_DH_KEY_INFO}
- TCmsDhKeyInfo = CMS_DH_KEY_INFO;
- PCmsDhKeyInfo = PCMS_DH_KEY_INFO;
-
-function CryptAcquireContextA(var phProv: HCRYPTPROV; pszContainer: LPCSTR;
- pszProvider: LPCSTR; dwProvType: DWORD; dwFlags: DWORD): BOOL; stdcall;
-{$EXTERNALSYM CryptAcquireContextA}
-function CryptAcquireContextW(var phProv: HCRYPTPROV; pszContainer: LPCWSTR;
- pszProvider: LPCWSTR; dwProvType: DWORD; dwFlags: DWORD): BOOL; stdcall;
-{$EXTERNALSYM CryptAcquireContextW}
-function CryptAcquireContext(var phProv: HCRYPTPROV; pszContainer: LPCTSTR;
- pszProvider: LPCTSTR; dwProvType: DWORD; dwFlags: DWORD): BOOL; stdcall;
-{$EXTERNALSYM CryptAcquireContext}
-
-function CryptReleaseContext(hProv: HCRYPTPROV; dwFlags: ULONG_PTR): BOOL; stdcall;
-{$EXTERNALSYM CryptReleaseContext}
-
-function CryptGenKey(hProv: HCRYPTPROV; Algid: ALG_ID; dwFlags: DWORD;
- var phKey: HCRYPTKEY): BOOL; stdcall;
-{$EXTERNALSYM CryptGenKey}
-
-function CryptDeriveKey(hProv: HCRYPTPROV; Algid: ALG_ID; hBaseData: HCRYPTHASH;
- dwFlags: DWORD; var phKey: HCRYPTKEY): BOOL; stdcall;
-{$EXTERNALSYM CryptDeriveKey}
-
-function CryptDestroyKey(hKey: HCRYPTKEY): BOOL; stdcall;
-{$EXTERNALSYM CryptDestroyKey}
-
-function CryptSetKeyParam(hKey: HCRYPTKEY; dwParam: DWORD; pbData: LPBYTE;
- dwFlags: DWORD): BOOL; stdcall;
-{$EXTERNALSYM CryptSetKeyParam}
-
-function CryptGetKeyParam(hKey: HCRYPTKEY; dwParam: DWORD; pbData: LPBYTE;
- var pdwDataLen: DWORD; dwFlags: DWORD): BOOL; stdcall;
-{$EXTERNALSYM CryptGetKeyParam}
-
-function CryptSetHashParam(hHash: HCRYPTHASH; dwParam: DWORD; pbData: LPBYTE;
- dwFlags: DWORD): BOOL; stdcall;
-{$EXTERNALSYM CryptSetHashParam}
-
-function CryptGetHashParam(hHash: HCRYPTHASH; dwParam: DWORD; pbData: LPBYTE;
- var pdwDataLen: DWORD; dwFlags: DWORD): BOOL; stdcall;
-{$EXTERNALSYM CryptGetHashParam}
-
-function CryptSetProvParam(hProv: HCRYPTPROV; dwParam: DWORD; pbData: LPBYTE;
- dwFlags: DWORD): BOOL; stdcall;
-{$EXTERNALSYM CryptSetProvParam}
-
-function CryptGetProvParam(hProv: HCRYPTPROV; dwParam: DWORD; pbData: LPBYTE;
- var pdwDataLen: DWORD; dwFlags: DWORD): BOOL; stdcall;
-{$EXTERNALSYM CryptGetProvParam}
-
-function CryptGenRandom(hProv: HCRYPTPROV; dwLen: DWORD; pbBuffer: LPBYTE): BOOL; stdcall;
-{$EXTERNALSYM CryptGenRandom}
-
-function CryptGetUserKey(hProv: HCRYPTPROV; dwKeySpec: DWORD; var phUserKey: HCRYPTKEY): BOOL; stdcall;
-{$EXTERNALSYM CryptGetUserKey}
-
-function CryptExportKey(hKey, hExpKey: HCRYPTKEY; dwBlobType, dwFlags: DWORD;
- pbData: LPBYTE; var pdwDataLen: DWORD): BOOL; stdcall;
-{$EXTERNALSYM CryptExportKey}
-
-function CryptImportKey(hProv: HCRYPTPROV; pbData: LPBYTE; dwDataLen: DWORD;
- hPubKey: HCRYPTKEY; dwFlags: DWORD; var phKey: HCRYPTKEY): BOOL; stdcall;
-{$EXTERNALSYM CryptImportKey}
-
-function CryptEncrypt(hKey: HCRYPTKEY; hHash: HCRYPTHASH; Final: BOOL;
- dwFlags: DWORD; pbData: LPBYTE; var pdwDataLen: DWORD; dwBufLen: DWORD): BOOL; stdcall;
-{$EXTERNALSYM CryptEncrypt}
-
-function CryptDecrypt(hKey: HCRYPTKEY; hHash: HCRYPTHASH; Final: BOOL;
- dwFlags: DWORD; pbData: LPBYTE; var pdwDataLen: DWORD): BOOL; stdcall;
-{$EXTERNALSYM CryptDecrypt}
-
-function CryptCreateHash(hProv: HCRYPTPROV; Algid: ALG_ID; hKey: HCRYPTKEY;
- dwFlags: DWORD; var phHash: HCRYPTHASH): BOOL; stdcall;
-{$EXTERNALSYM CryptCreateHash}
-
-function CryptHashData(hHash: HCRYPTHASH; pbData: LPBYTE; dwDataLen, dwFlags: DWORD): BOOL; stdcall;
-{$EXTERNALSYM CryptHashData}
-
-function CryptHashSessionKey(hHash: HCRYPTHASH; hKey: HCRYPTKEY; dwFlags: DWORD): BOOL; stdcall;
-{$EXTERNALSYM CryptHashSessionKey}
-
-function CryptDestroyHash(hHash: HCRYPTHASH): BOOL; stdcall;
-{$EXTERNALSYM CryptDestroyHash}
-
-function CryptSignHashA(hHash: HCRYPTHASH; dwKeySpec: DWORD; sDescription: LPCSTR;
- dwFlags: DWORD; pbSignature: LPBYTE; var pdwSigLen: DWORD): BOOL; stdcall;
-{$EXTERNALSYM CryptSignHashA}
-function CryptSignHashW(hHash: HCRYPTHASH; dwKeySpec: DWORD; sDescription: LPCWSTR;
- dwFlags: DWORD; pbSignature: LPBYTE; var pdwSigLen: DWORD): BOOL; stdcall;
-{$EXTERNALSYM CryptSignHashW}
-function CryptSignHash(hHash: HCRYPTHASH; dwKeySpec: DWORD; sDescription: LPCTSTR;
- dwFlags: DWORD; pbSignature: LPBYTE; var pdwSigLen: DWORD): BOOL; stdcall;
-{$EXTERNALSYM CryptSignHash}
-
-function CryptVerifySignatureA(hHash: HCRYPTHASH; pbSignature: LPBYTE;
- dwSigLen: DWORD; hPubKey: HCRYPTKEY; sDescription: LPCSTR; dwFlags: DWORD): BOOL; stdcall;
-{$EXTERNALSYM CryptVerifySignatureA}
-function CryptVerifySignatureW(hHash: HCRYPTHASH; pbSignature: LPBYTE;
- dwSigLen: DWORD; hPubKey: HCRYPTKEY; sDescription: LPCWSTR; dwFlags: DWORD): BOOL; stdcall;
-{$EXTERNALSYM CryptVerifySignatureW}
-function CryptVerifySignature(hHash: HCRYPTHASH; pbSignature: LPBYTE;
- dwSigLen: DWORD; hPubKey: HCRYPTKEY; sDescription: LPCTSTR; dwFlags: DWORD): BOOL; stdcall;
-{$EXTERNALSYM CryptVerifySignature}
-
-function CryptSetProviderA(pszProvName: LPCSTR; dwProvType: DWORD): BOOL; stdcall;
-{$EXTERNALSYM CryptSetProviderA}
-function CryptSetProviderW(pszProvName: LPCWSTR; dwProvType: DWORD): BOOL; stdcall;
-{$EXTERNALSYM CryptSetProviderW}
-function CryptSetProvider(pszProvName: LPCTSTR; dwProvType: DWORD): BOOL; stdcall;
-{$EXTERNALSYM CryptSetProvider}
-
-function CryptSetProviderExA(pszProvName: LPCSTR; dwProvType: DWORD;
- pdwReserved: LPDWORD; dwFlags: DWORD): BOOL; stdcall;
-{$EXTERNALSYM CryptSetProviderExA}
-function CryptSetProviderExW(pszProvName: LPCWSTR; dwProvType: DWORD;
- pdwReserved: LPDWORD; dwFlags: DWORD): BOOL; stdcall;
-{$EXTERNALSYM CryptSetProviderExW}
-function CryptSetProviderEx(pszProvName: LPCTSTR; dwProvType: DWORD;
- pdwReserved: LPDWORD; dwFlags: DWORD): BOOL; stdcall;
-{$EXTERNALSYM CryptSetProviderEx}
-
-function CryptGetDefaultProviderA(dwProvType: DWORD; pdwReserved: LPDWORD;
- dwFlags: DWORD; pszProvName: LPSTR; var pcbProvName: DWORD): BOOL; stdcall;
-{$EXTERNALSYM CryptGetDefaultProviderA}
-function CryptGetDefaultProviderW(dwProvType: DWORD; pdwReserved: LPDWORD;
- dwFlags: DWORD; pszProvName: LPWSTR; var pcbProvName: DWORD): BOOL; stdcall;
-{$EXTERNALSYM CryptGetDefaultProviderW}
-function CryptGetDefaultProvider(dwProvType: DWORD; pdwReserved: LPDWORD;
- dwFlags: DWORD; pszProvName: LPTSTR; var pcbProvName: DWORD): BOOL; stdcall;
-{$EXTERNALSYM CryptGetDefaultProvider}
-
-function CryptEnumProviderTypesA(dwIndex: DWORD; pdwReserved: LPDWORD;
- dwFlags: DWORD; var pdwProvType: DWORD; pszTypeName: LPSTR;
- var pcbTypeName: DWORD): BOOL; stdcall;
-{$EXTERNALSYM CryptEnumProviderTypesA}
-function CryptEnumProviderTypesW(dwIndex: DWORD; pdwReserved: LPDWORD;
- dwFlags: DWORD; var pdwProvType: DWORD; pszTypeName: LPWSTR;
- var pcbTypeName: DWORD): BOOL; stdcall;
-{$EXTERNALSYM CryptEnumProviderTypesW}
-function CryptEnumProviderTypes(dwIndex: DWORD; pdwReserved: LPDWORD;
- dwFlags: DWORD; var pdwProvType: DWORD; pszTypeName: LPTSTR;
- var pcbTypeName: DWORD): BOOL; stdcall;
-{$EXTERNALSYM CryptEnumProviderTypes}
-
-function CryptEnumProvidersA(dwIndex: DWORD; pdwReserved: LPDWORD; dwFlags: DWORD;
- var pdwProvType: DWORD; pszProvName: LPSTR; var pcbProvName: DWORD): BOOL; stdcall;
-{$EXTERNALSYM CryptEnumProvidersA}
-function CryptEnumProvidersW(dwIndex: DWORD; pdwReserved: LPDWORD; dwFlags: DWORD;
- var pdwProvType: DWORD; pszProvName: LPWSTR; var pcbProvName: DWORD): BOOL; stdcall;
-{$EXTERNALSYM CryptEnumProvidersW}
-function CryptEnumProviders(dwIndex: DWORD; pdwReserved: LPDWORD; dwFlags: DWORD;
- var pdwProvType: DWORD; pszProvName: LPTSTR; var pcbProvName: DWORD): BOOL; stdcall;
-{$EXTERNALSYM CryptEnumProviders}
-
-function CryptContextAddRef(hProv: HCRYPTPROV; pdwReserved: LPDWORD; dwFlags: DWORD): BOOL; stdcall;
-{$EXTERNALSYM CryptContextAddRef}
-
-function CryptDuplicateKey(hKey: HCRYPTKEY; pdwReserved: LPDWORD; dwFlags: DWORD;
- var phKey: HCRYPTKEY): BOOL; stdcall;
-{$EXTERNALSYM CryptDuplicateKey}
-
-function CryptDuplicateHash(hHash: HCRYPTHASH; pdwReserved: LPDWORD;
- dwFlags: DWORD; var phHash: HCRYPTHASH): BOOL; stdcall;
-{$EXTERNALSYM CryptDuplicateHash}
-
-//+-------------------------------------------------------------------------
-// In a CRYPT_BIT_BLOB the last byte may contain 0-7 unused bits. Therefore, the
-// overall bit length is cbData * 8 - cUnusedBits.
-//--------------------------------------------------------------------------
-
-type
- PCRYPT_BIT_BLOB = ^CRYPT_BIT_BLOB;
- {$EXTERNALSYM PCRYPT_BIT_BLOB}
- _CRYPT_BIT_BLOB = record
- cbData: DWORD;
- pbData: LPBYTE;
- cUnusedBits: DWORD;
- end;
- {$EXTERNALSYM _CRYPT_BIT_BLOB}
- CRYPT_BIT_BLOB = _CRYPT_BIT_BLOB;
- {$EXTERNALSYM CRYPT_BIT_BLOB}
- TCryptBitBlob = CRYPT_BIT_BLOB;
- PCryptBitBlob = PCRYPT_BIT_BLOB;
-
-//+-------------------------------------------------------------------------
-// Type used for any algorithm
-//
-// Where the Parameters CRYPT_OBJID_BLOB is in its encoded representation. For most
-// algorithm types, the Parameters CRYPT_OBJID_BLOB is NULL (Parameters.cbData = 0).
-//--------------------------------------------------------------------------
-
-type
- PCRYPT_ALGORITHM_IDENTIFIER = ^CRYPT_ALGORITHM_IDENTIFIER;
- {$EXTERNALSYM PCRYPT_ALGORITHM_IDENTIFIER}
- _CRYPT_ALGORITHM_IDENTIFIER = record
- pszObjId: LPSTR;
- Parameters: CRYPT_OBJID_BLOB;
- end;
- {$EXTERNALSYM _CRYPT_ALGORITHM_IDENTIFIER}
- CRYPT_ALGORITHM_IDENTIFIER = _CRYPT_ALGORITHM_IDENTIFIER;
- {$EXTERNALSYM CRYPT_ALGORITHM_IDENTIFIER}
- TCryptAlgorithmIdentifier = CRYPT_ALGORITHM_IDENTIFIER;
- PCryptAlgorithmIdentifier = PCRYPT_ALGORITHM_IDENTIFIER;
-
-// Following are the definitions of various algorithm object identifiers
-// RSA
-
-const
- szOID_RSA = '1.2.840.113549';
- {$EXTERNALSYM szOID_RSA}
- szOID_PKCS = '1.2.840.113549.1';
- {$EXTERNALSYM szOID_PKCS}
- szOID_RSA_HASH = '1.2.840.113549.2';
- {$EXTERNALSYM szOID_RSA_HASH}
- szOID_RSA_ENCRYPT = '1.2.840.113549.3';
- {$EXTERNALSYM szOID_RSA_ENCRYPT}
-
- szOID_PKCS_1 = '1.2.840.113549.1.1';
- {$EXTERNALSYM szOID_PKCS_1}
- szOID_PKCS_2 = '1.2.840.113549.1.2';
- {$EXTERNALSYM szOID_PKCS_2}
- szOID_PKCS_3 = '1.2.840.113549.1.3';
- {$EXTERNALSYM szOID_PKCS_3}
- szOID_PKCS_4 = '1.2.840.113549.1.4';
- {$EXTERNALSYM szOID_PKCS_4}
- szOID_PKCS_5 = '1.2.840.113549.1.5';
- {$EXTERNALSYM szOID_PKCS_5}
- szOID_PKCS_6 = '1.2.840.113549.1.6';
- {$EXTERNALSYM szOID_PKCS_6}
- szOID_PKCS_7 = '1.2.840.113549.1.7';
- {$EXTERNALSYM szOID_PKCS_7}
- szOID_PKCS_8 = '1.2.840.113549.1.8';
- {$EXTERNALSYM szOID_PKCS_8}
- szOID_PKCS_9 = '1.2.840.113549.1.9';
- {$EXTERNALSYM szOID_PKCS_9}
- szOID_PKCS_10 = '1.2.840.113549.1.10';
- {$EXTERNALSYM szOID_PKCS_10}
- szOID_PKCS_12 = '1.2.840.113549.1.12';
- {$EXTERNALSYM szOID_PKCS_12}
-
- szOID_RSA_RSA = '1.2.840.113549.1.1.1';
- {$EXTERNALSYM szOID_RSA_RSA}
- szOID_RSA_MD2RSA = '1.2.840.113549.1.1.2';
- {$EXTERNALSYM szOID_RSA_MD2RSA}
- szOID_RSA_MD4RSA = '1.2.840.113549.1.1.3';
- {$EXTERNALSYM szOID_RSA_MD4RSA}
- szOID_RSA_MD5RSA = '1.2.840.113549.1.1.4';
- {$EXTERNALSYM szOID_RSA_MD5RSA}
- szOID_RSA_SHA1RSA = '1.2.840.113549.1.1.5';
- {$EXTERNALSYM szOID_RSA_SHA1RSA}
- szOID_RSA_SETOAEP_RSA = '1.2.840.113549.1.1.6';
- {$EXTERNALSYM szOID_RSA_SETOAEP_RSA}
-
- szOID_RSA_DH = '1.2.840.113549.1.3.1';
- {$EXTERNALSYM szOID_RSA_DH}
-
- szOID_RSA_data = '1.2.840.113549.1.7.1';
- {$EXTERNALSYM szOID_RSA_data}
- szOID_RSA_signedData = '1.2.840.113549.1.7.2';
- {$EXTERNALSYM szOID_RSA_signedData}
- szOID_RSA_envelopedData = '1.2.840.113549.1.7.3';
- {$EXTERNALSYM szOID_RSA_envelopedData}
- szOID_RSA_signEnvData = '1.2.840.113549.1.7.4';
- {$EXTERNALSYM szOID_RSA_signEnvData}
- szOID_RSA_digestedData = '1.2.840.113549.1.7.5';
- {$EXTERNALSYM szOID_RSA_digestedData}
- szOID_RSA_hashedData = '1.2.840.113549.1.7.5';
- {$EXTERNALSYM szOID_RSA_hashedData}
- szOID_RSA_encryptedData = '1.2.840.113549.1.7.6';
- {$EXTERNALSYM szOID_RSA_encryptedData}
-
- szOID_RSA_emailAddr = '1.2.840.113549.1.9.1';
- {$EXTERNALSYM szOID_RSA_emailAddr}
- szOID_RSA_unstructName = '1.2.840.113549.1.9.2';
- {$EXTERNALSYM szOID_RSA_unstructName}
- szOID_RSA_contentType = '1.2.840.113549.1.9.3';
- {$EXTERNALSYM szOID_RSA_contentType}
- szOID_RSA_messageDigest = '1.2.840.113549.1.9.4';
- {$EXTERNALSYM szOID_RSA_messageDigest}
- szOID_RSA_signingTime = '1.2.840.113549.1.9.5';
- {$EXTERNALSYM szOID_RSA_signingTime}
- szOID_RSA_counterSign = '1.2.840.113549.1.9.6';
- {$EXTERNALSYM szOID_RSA_counterSign}
- szOID_RSA_challengePwd = '1.2.840.113549.1.9.7';
- {$EXTERNALSYM szOID_RSA_challengePwd}
- szOID_RSA_unstructAddr = '1.2.840.113549.1.9.8';
- {$EXTERNALSYM szOID_RSA_unstructAddr}
- szOID_RSA_extCertAttrs = '1.2.840.113549.1.9.9';
- {$EXTERNALSYM szOID_RSA_extCertAttrs}
- szOID_RSA_certExtensions = '1.2.840.113549.1.9.14';
- {$EXTERNALSYM szOID_RSA_certExtensions}
- szOID_RSA_SMIMECapabilities = '1.2.840.113549.1.9.15';
- {$EXTERNALSYM szOID_RSA_SMIMECapabilities}
- szOID_RSA_preferSignedData = '1.2.840.113549.1.9.15.1';
- {$EXTERNALSYM szOID_RSA_preferSignedData}
-
- szOID_RSA_SMIMEalg = '1.2.840.113549.1.9.16.3';
- {$EXTERNALSYM szOID_RSA_SMIMEalg}
- szOID_RSA_SMIMEalgESDH = '1.2.840.113549.1.9.16.3.5';
- {$EXTERNALSYM szOID_RSA_SMIMEalgESDH}
- szOID_RSA_SMIMEalgCMS3DESwrap = '1.2.840.113549.1.9.16.3.6';
- {$EXTERNALSYM szOID_RSA_SMIMEalgCMS3DESwrap}
- szOID_RSA_SMIMEalgCMSRC2wrap = '1.2.840.113549.1.9.16.3.7';
- {$EXTERNALSYM szOID_RSA_SMIMEalgCMSRC2wrap}
-
- szOID_RSA_MD2 = '1.2.840.113549.2.2';
- {$EXTERNALSYM szOID_RSA_MD2}
- szOID_RSA_MD4 = '1.2.840.113549.2.4';
- {$EXTERNALSYM szOID_RSA_MD4}
- szOID_RSA_MD5 = '1.2.840.113549.2.5';
- {$EXTERNALSYM szOID_RSA_MD5}
-
- szOID_RSA_RC2CBC = '1.2.840.113549.3.2';
- {$EXTERNALSYM szOID_RSA_RC2CBC}
- szOID_RSA_RC4 = '1.2.840.113549.3.4';
- {$EXTERNALSYM szOID_RSA_RC4}
- szOID_RSA_DES_EDE3_CBC = '1.2.840.113549.3.7';
- {$EXTERNALSYM szOID_RSA_DES_EDE3_CBC}
- szOID_RSA_RC5_CBCPad = '1.2.840.113549.3.9';
- {$EXTERNALSYM szOID_RSA_RC5_CBCPad}
-
- szOID_ANSI_X942 = '1.2.840.10046';
- {$EXTERNALSYM szOID_ANSI_X942}
- szOID_ANSI_X942_DH = '1.2.840.10046.2.1';
- {$EXTERNALSYM szOID_ANSI_X942_DH}
-
- szOID_X957 = '1.2.840.10040';
- {$EXTERNALSYM szOID_X957}
- szOID_X957_DSA = '1.2.840.10040.4.1';
- {$EXTERNALSYM szOID_X957_DSA}
- szOID_X957_SHA1DSA = '1.2.840.10040.4.3';
- {$EXTERNALSYM szOID_X957_SHA1DSA}
-
-// ITU-T UsefulDefinitions
-
- szOID_DS = '2.5';
- {$EXTERNALSYM szOID_DS}
- szOID_DSALG = '2.5.8';
- {$EXTERNALSYM szOID_DSALG}
- szOID_DSALG_CRPT = '2.5.8.1';
- {$EXTERNALSYM szOID_DSALG_CRPT}
- szOID_DSALG_HASH = '2.5.8.2';
- {$EXTERNALSYM szOID_DSALG_HASH}
- szOID_DSALG_SIGN = '2.5.8.3';
- {$EXTERNALSYM szOID_DSALG_SIGN}
- szOID_DSALG_RSA = '2.5.8.1.1';
- {$EXTERNALSYM szOID_DSALG_RSA}
-
-// NIST OSE Implementors' Workshop (OIW)
-// http://nemo.ncsl.nist.gov/oiw/agreements/stable/OSI/12s_9506.w51
-// http://nemo.ncsl.nist.gov/oiw/agreements/working/OSI/12w_9503.w51
-
- szOID_OIW = '1.3.14';
- {$EXTERNALSYM szOID_OIW}
-
-// NIST OSE Implementors' Workshop (OIW) Security SIG algorithm identifiers
-
- szOID_OIWSEC = '1.3.14.3.2';
- {$EXTERNALSYM szOID_OIWSEC}
- szOID_OIWSEC_md4RSA = '1.3.14.3.2.2';
- {$EXTERNALSYM szOID_OIWSEC_md4RSA}
- szOID_OIWSEC_md5RSA = '1.3.14.3.2.3';
- {$EXTERNALSYM szOID_OIWSEC_md5RSA}
- szOID_OIWSEC_md4RSA2 = '1.3.14.3.2.4';
- {$EXTERNALSYM szOID_OIWSEC_md4RSA2}
- szOID_OIWSEC_desECB = '1.3.14.3.2.6';
- {$EXTERNALSYM szOID_OIWSEC_desECB}
- szOID_OIWSEC_desCBC = '1.3.14.3.2.7';
- {$EXTERNALSYM szOID_OIWSEC_desCBC}
- szOID_OIWSEC_desOFB = '1.3.14.3.2.8';
- {$EXTERNALSYM szOID_OIWSEC_desOFB}
- szOID_OIWSEC_desCFB = '1.3.14.3.2.9';
- {$EXTERNALSYM szOID_OIWSEC_desCFB}
- szOID_OIWSEC_desMAC = '1.3.14.3.2.10';
- {$EXTERNALSYM szOID_OIWSEC_desMAC}
- szOID_OIWSEC_rsaSign = '1.3.14.3.2.11';
- {$EXTERNALSYM szOID_OIWSEC_rsaSign}
- szOID_OIWSEC_dsa = '1.3.14.3.2.12';
- {$EXTERNALSYM szOID_OIWSEC_dsa}
- szOID_OIWSEC_shaDSA = '1.3.14.3.2.13';
- {$EXTERNALSYM szOID_OIWSEC_shaDSA}
- szOID_OIWSEC_mdc2RSA = '1.3.14.3.2.14';
- {$EXTERNALSYM szOID_OIWSEC_mdc2RSA}
- szOID_OIWSEC_shaRSA = '1.3.14.3.2.15';
- {$EXTERNALSYM szOID_OIWSEC_shaRSA}
- szOID_OIWSEC_dhCommMod = '1.3.14.3.2.16';
- {$EXTERNALSYM szOID_OIWSEC_dhCommMod}
- szOID_OIWSEC_desEDE = '1.3.14.3.2.17';
- {$EXTERNALSYM szOID_OIWSEC_desEDE}
- szOID_OIWSEC_sha = '1.3.14.3.2.18';
- {$EXTERNALSYM szOID_OIWSEC_sha}
- szOID_OIWSEC_mdc2 = '1.3.14.3.2.19';
- {$EXTERNALSYM szOID_OIWSEC_mdc2}
- szOID_OIWSEC_dsaComm = '1.3.14.3.2.20';
- {$EXTERNALSYM szOID_OIWSEC_dsaComm}
- szOID_OIWSEC_dsaCommSHA = '1.3.14.3.2.21';
- {$EXTERNALSYM szOID_OIWSEC_dsaCommSHA}
- szOID_OIWSEC_rsaXchg = '1.3.14.3.2.22';
- {$EXTERNALSYM szOID_OIWSEC_rsaXchg}
- szOID_OIWSEC_keyHashSeal = '1.3.14.3.2.23';
- {$EXTERNALSYM szOID_OIWSEC_keyHashSeal}
- szOID_OIWSEC_md2RSASign = '1.3.14.3.2.24';
- {$EXTERNALSYM szOID_OIWSEC_md2RSASign}
- szOID_OIWSEC_md5RSASign = '1.3.14.3.2.25';
- {$EXTERNALSYM szOID_OIWSEC_md5RSASign}
- szOID_OIWSEC_sha1 = '1.3.14.3.2.26';
- {$EXTERNALSYM szOID_OIWSEC_sha1}
- szOID_OIWSEC_dsaSHA1 = '1.3.14.3.2.27';
- {$EXTERNALSYM szOID_OIWSEC_dsaSHA1}
- szOID_OIWSEC_dsaCommSHA1 = '1.3.14.3.2.28';
- {$EXTERNALSYM szOID_OIWSEC_dsaCommSHA1}
- szOID_OIWSEC_sha1RSASign = '1.3.14.3.2.29';
- {$EXTERNALSYM szOID_OIWSEC_sha1RSASign}
-
-// NIST OSE Implementors' Workshop (OIW) Directory SIG algorithm identifiers
-
- szOID_OIWDIR = '1.3.14.7.2';
- {$EXTERNALSYM szOID_OIWDIR}
- szOID_OIWDIR_CRPT = '1.3.14.7.2.1';
- {$EXTERNALSYM szOID_OIWDIR_CRPT}
- szOID_OIWDIR_HASH = '1.3.14.7.2.2';
- {$EXTERNALSYM szOID_OIWDIR_HASH}
- szOID_OIWDIR_SIGN = '1.3.14.7.2.3';
- {$EXTERNALSYM szOID_OIWDIR_SIGN}
- szOID_OIWDIR_md2 = '1.3.14.7.2.2.1';
- {$EXTERNALSYM szOID_OIWDIR_md2}
- szOID_OIWDIR_md2RSA = '1.3.14.7.2.3.1';
- {$EXTERNALSYM szOID_OIWDIR_md2RSA}
-
-// INFOSEC Algorithms
-// joint-iso-ccitt(2) country(16) us(840) organization(1) us-government(101) dod(2) id-infosec(1)
-
- szOID_INFOSEC = '2.16.840.1.101.2.1';
- {$EXTERNALSYM szOID_INFOSEC}
- szOID_INFOSEC_sdnsSignature = '2.16.840.1.101.2.1.1.1';
- {$EXTERNALSYM szOID_INFOSEC_sdnsSignature}
- szOID_INFOSEC_mosaicSignature = '2.16.840.1.101.2.1.1.2';
- {$EXTERNALSYM szOID_INFOSEC_mosaicSignature}
- szOID_INFOSEC_sdnsConfidentiality = '2.16.840.1.101.2.1.1.3';
- {$EXTERNALSYM szOID_INFOSEC_sdnsConfidentiality}
- szOID_INFOSEC_mosaicConfidentiality = '2.16.840.1.101.2.1.1.4';
- {$EXTERNALSYM szOID_INFOSEC_mosaicConfidentiality}
- szOID_INFOSEC_sdnsIntegrity = '2.16.840.1.101.2.1.1.5';
- {$EXTERNALSYM szOID_INFOSEC_sdnsIntegrity}
- szOID_INFOSEC_mosaicIntegrity = '2.16.840.1.101.2.1.1.6';
- {$EXTERNALSYM szOID_INFOSEC_mosaicIntegrity}
- szOID_INFOSEC_sdnsTokenProtection = '2.16.840.1.101.2.1.1.7';
- {$EXTERNALSYM szOID_INFOSEC_sdnsTokenProtection}
- szOID_INFOSEC_mosaicTokenProtection = '2.16.840.1.101.2.1.1.8';
- {$EXTERNALSYM szOID_INFOSEC_mosaicTokenProtection}
- szOID_INFOSEC_sdnsKeyManagement = '2.16.840.1.101.2.1.1.9';
- {$EXTERNALSYM szOID_INFOSEC_sdnsKeyManagement}
- szOID_INFOSEC_mosaicKeyManagement = '2.16.840.1.101.2.1.1.10';
- {$EXTERNALSYM szOID_INFOSEC_mosaicKeyManagement}
- szOID_INFOSEC_sdnsKMandSig = '2.16.840.1.101.2.1.1.11';
- {$EXTERNALSYM szOID_INFOSEC_sdnsKMandSig}
- szOID_INFOSEC_mosaicKMandSig = '2.16.840.1.101.2.1.1.12';
- {$EXTERNALSYM szOID_INFOSEC_mosaicKMandSig}
- szOID_INFOSEC_SuiteASignature = '2.16.840.1.101.2.1.1.13';
- {$EXTERNALSYM szOID_INFOSEC_SuiteASignature}
- szOID_INFOSEC_SuiteAConfidentiality = '2.16.840.1.101.2.1.1.14';
- {$EXTERNALSYM szOID_INFOSEC_SuiteAConfidentiality}
- szOID_INFOSEC_SuiteAIntegrity = '2.16.840.1.101.2.1.1.15';
- {$EXTERNALSYM szOID_INFOSEC_SuiteAIntegrity}
- szOID_INFOSEC_SuiteATokenProtection = '2.16.840.1.101.2.1.1.16';
- {$EXTERNALSYM szOID_INFOSEC_SuiteATokenProtection}
- szOID_INFOSEC_SuiteAKeyManagement = '2.16.840.1.101.2.1.1.17';
- {$EXTERNALSYM szOID_INFOSEC_SuiteAKeyManagement}
- szOID_INFOSEC_SuiteAKMandSig = '2.16.840.1.101.2.1.1.18';
- {$EXTERNALSYM szOID_INFOSEC_SuiteAKMandSig}
- szOID_INFOSEC_mosaicUpdatedSig = '2.16.840.1.101.2.1.1.19';
- {$EXTERNALSYM szOID_INFOSEC_mosaicUpdatedSig}
- szOID_INFOSEC_mosaicKMandUpdSig = '2.16.840.1.101.2.1.1.20';
- {$EXTERNALSYM szOID_INFOSEC_mosaicKMandUpdSig}
- szOID_INFOSEC_mosaicUpdatedInteg = '2.16.840.1.101.2.1.1.21';
- {$EXTERNALSYM szOID_INFOSEC_mosaicUpdatedInteg}
-
-type
- PCRYPT_OBJID_TABLE = ^CRYPT_OBJID_TABLE;
- {$EXTERNALSYM PCRYPT_OBJID_TABLE}
- _CRYPT_OBJID_TABLE = record
- dwAlgId: DWORD;
- pszObjId: LPCSTR;
- end;
- {$EXTERNALSYM _CRYPT_OBJID_TABLE}
- CRYPT_OBJID_TABLE = _CRYPT_OBJID_TABLE;
- {$EXTERNALSYM CRYPT_OBJID_TABLE}
- TCryptObjIdTable = CRYPT_OBJID_TABLE;
- PCryptObjIdTable = PCRYPT_OBJID_TABLE;
-
-//+-------------------------------------------------------------------------
-// PKCS #1 HashInfo (DigestInfo)
-//--------------------------------------------------------------------------
-
- PCRYPT_HASH_INFO = ^CRYPT_HASH_INFO;
- {$EXTERNALSYM PCRYPT_HASH_INFO}
- _CRYPT_HASH_INFO = record
- HashAlgorithm: CRYPT_ALGORITHM_IDENTIFIER;
- Hash: CRYPT_HASH_BLOB;
- end;
- {$EXTERNALSYM _CRYPT_HASH_INFO}
- CRYPT_HASH_INFO = _CRYPT_HASH_INFO;
- {$EXTERNALSYM CRYPT_HASH_INFO}
- TCryptHashInfo = CRYPT_HASH_INFO;
- PCryptHashInfo = PCRYPT_HASH_INFO;
-
-//+-------------------------------------------------------------------------
-// Type used for an extension to an encoded content
-//
-// Where the Value's CRYPT_OBJID_BLOB is in its encoded representation.
-//--------------------------------------------------------------------------
-
- PCERT_EXTENSION = ^CERT_EXTENSION;
- {$EXTERNALSYM PCERT_EXTENSION}
- _CERT_EXTENSION = record
- pszObjId: LPSTR;
- fCritical: BOOL;
- Value: CRYPT_OBJID_BLOB;
- end;
- {$EXTERNALSYM _CERT_EXTENSION}
- CERT_EXTENSION = _CERT_EXTENSION;
- {$EXTERNALSYM CERT_EXTENSION}
- TCertExtension = CERT_EXTENSION;
- PCertExtension = PCERT_EXTENSION;
-
-//+-------------------------------------------------------------------------
-// AttributeTypeValue
-//
-// Where the Value's CRYPT_OBJID_BLOB is in its encoded representation.
-//--------------------------------------------------------------------------
-
- PCRYPT_ATTRIBUTE_TYPE_VALUE = ^CRYPT_ATTRIBUTE_TYPE_VALUE;
- {$EXTERNALSYM PCRYPT_ATTRIBUTE_TYPE_VALUE}
- _CRYPT_ATTRIBUTE_TYPE_VALUE = record
- pszObjId: LPSTR;
- Value: CRYPT_OBJID_BLOB;
- end;
- {$EXTERNALSYM _CRYPT_ATTRIBUTE_TYPE_VALUE}
- CRYPT_ATTRIBUTE_TYPE_VALUE = _CRYPT_ATTRIBUTE_TYPE_VALUE;
- {$EXTERNALSYM CRYPT_ATTRIBUTE_TYPE_VALUE}
- TCryptAttributeTypeValue = CRYPT_ATTRIBUTE_TYPE_VALUE;
- PCryptAttributeTypeValue = PCRYPT_ATTRIBUTE_TYPE_VALUE;
-
-//+-------------------------------------------------------------------------
-// Attributes
-//
-// Where the Value's PATTR_BLOBs are in their encoded representation.
-//--------------------------------------------------------------------------
-
- PCRYPT_ATTRIBUTE = ^CRYPT_ATTRIBUTE;
- {$EXTERNALSYM PCRYPT_ATTRIBUTE}
- _CRYPT_ATTRIBUTE = record
- pszObjId: LPSTR;
- cValue: DWORD;
- rgValue: PCRYPT_ATTR_BLOB;
- end;
- {$EXTERNALSYM _CRYPT_ATTRIBUTE}
- CRYPT_ATTRIBUTE = _CRYPT_ATTRIBUTE;
- {$EXTERNALSYM CRYPT_ATTRIBUTE}
- TCryptAttribute = CRYPT_ATTRIBUTE;
- PCryptAttribute = PCRYPT_ATTRIBUTE;
-
- PCRYPT_ATTRIBUTES = ^CRYPT_ATTRIBUTES;
- {$EXTERNALSYM PCRYPT_ATTRIBUTES}
- _CRYPT_ATTRIBUTES = record
- cAttr: DWORD;
- rgAttr: PCRYPT_ATTRIBUTE;
- end;
- {$EXTERNALSYM _CRYPT_ATTRIBUTES}
- CRYPT_ATTRIBUTES = _CRYPT_ATTRIBUTES;
- {$EXTERNALSYM CRYPT_ATTRIBUTES}
- TCryptAttributes = CRYPT_ATTRIBUTES;
- PCryptAttributes = PCRYPT_ATTRIBUTES;
-
-//+-------------------------------------------------------------------------
-// Attributes making up a Relative Distinguished Name (CERT_RDN)
-//
-// The interpretation of the Value depends on the dwValueType.
-// See below for a list of the types.
-//--------------------------------------------------------------------------
-
- PCERT_RDN_ATTR = ^CERT_RDN_ATTR;
- {$EXTERNALSYM PCERT_RDN_ATTR}
- _CERT_RDN_ATTR = record
- pszObjId: LPSTR;
- dwValueType: DWORD;
- Value: CERT_RDN_VALUE_BLOB;
- end;
- {$EXTERNALSYM _CERT_RDN_ATTR}
- CERT_RDN_ATTR = _CERT_RDN_ATTR;
- {$EXTERNALSYM CERT_RDN_ATTR}
- TCertRdnAttr = CERT_RDN_ATTR;
- PCertRdnAttr = PCERT_RDN_ATTR;
-
-//+-------------------------------------------------------------------------
-// CERT_RDN attribute Object Identifiers
-//--------------------------------------------------------------------------
-
-// Labeling attribute types:
-
-const
- szOID_COMMON_NAME = '2.5.4.3'; // case-ignore string
- {$EXTERNALSYM szOID_COMMON_NAME}
- szOID_SUR_NAME = '2.5.4.4'; // case-ignore string
- {$EXTERNALSYM szOID_SUR_NAME}
- szOID_DEVICE_SERIAL_NUMBER = '2.5.4.5'; // printable string
- {$EXTERNALSYM szOID_DEVICE_SERIAL_NUMBER}
-
-// Geographic attribute types:
-
- szOID_COUNTRY_NAME = '2.5.4.6'; // printable 2char string
- {$EXTERNALSYM szOID_COUNTRY_NAME}
- szOID_LOCALITY_NAME = '2.5.4.7'; // case-ignore string
- {$EXTERNALSYM szOID_LOCALITY_NAME}
- szOID_STATE_OR_PROVINCE_NAME = '2.5.4.8'; // case-ignore string
- {$EXTERNALSYM szOID_STATE_OR_PROVINCE_NAME}
- szOID_STREET_ADDRESS = '2.5.4.9'; // case-ignore string
- {$EXTERNALSYM szOID_STREET_ADDRESS}
-
-// Organizational attribute types:
-
- szOID_ORGANIZATION_NAME = '2.5.4.10'; // case-ignore string
- {$EXTERNALSYM szOID_ORGANIZATION_NAME}
- szOID_ORGANIZATIONAL_UNIT_NAME = '2.5.4.11'; // case-ignore string
- {$EXTERNALSYM szOID_ORGANIZATIONAL_UNIT_NAME}
- szOID_TITLE = '2.5.4.12'; // case-ignore string
- {$EXTERNALSYM szOID_TITLE}
-
-// Explanatory attribute types:
-
- szOID_DESCRIPTION = '2.5.4.13'; // case-ignore string
- {$EXTERNALSYM szOID_DESCRIPTION}
- szOID_SEARCH_GUIDE = '2.5.4.14';
- {$EXTERNALSYM szOID_SEARCH_GUIDE}
- szOID_BUSINESS_CATEGORY = '2.5.4.15'; // case-ignore string
- {$EXTERNALSYM szOID_BUSINESS_CATEGORY}
-
-// Postal addressing attribute types:
-
- szOID_POSTAL_ADDRESS = '2.5.4.16';
- {$EXTERNALSYM szOID_POSTAL_ADDRESS}
- szOID_POSTAL_CODE = '2.5.4.17'; // case-ignore string
- {$EXTERNALSYM szOID_POSTAL_CODE}
- szOID_POST_OFFICE_BOX = '2.5.4.18'; // case-ignore string
- {$EXTERNALSYM szOID_POST_OFFICE_BOX}
- szOID_PHYSICAL_DELIVERY_OFFICE_NAME = '2.5.4.19'; // case-ignore string
- {$EXTERNALSYM szOID_PHYSICAL_DELIVERY_OFFICE_NAME}
-
-// Telecommunications addressing attribute types:
-
- szOID_TELEPHONE_NUMBER = '2.5.4.20'; // telephone number
- {$EXTERNALSYM szOID_TELEPHONE_NUMBER}
- szOID_TELEX_NUMBER = '2.5.4.21';
- {$EXTERNALSYM szOID_TELEX_NUMBER}
- szOID_TELETEXT_TERMINAL_IDENTIFIER = '2.5.4.22';
- {$EXTERNALSYM szOID_TELETEXT_TERMINAL_IDENTIFIER}
- szOID_FACSIMILE_TELEPHONE_NUMBER = '2.5.4.23';
- {$EXTERNALSYM szOID_FACSIMILE_TELEPHONE_NUMBER}
- szOID_X21_ADDRESS = '2.5.4.24'; // numeric string
- {$EXTERNALSYM szOID_X21_ADDRESS}
- szOID_INTERNATIONAL_ISDN_NUMBER = '2.5.4.25'; // numeric string
- {$EXTERNALSYM szOID_INTERNATIONAL_ISDN_NUMBER}
- szOID_REGISTERED_ADDRESS = '2.5.4.26';
- {$EXTERNALSYM szOID_REGISTERED_ADDRESS}
- szOID_DESTINATION_INDICATOR = '2.5.4.27'; // printable string
- {$EXTERNALSYM szOID_DESTINATION_INDICATOR}
-
-// Preference attribute types:
-
- szOID_PREFERRED_DELIVERY_METHOD = '2.5.4.28';
- {$EXTERNALSYM szOID_PREFERRED_DELIVERY_METHOD}
-
-// OSI application attribute types:
-
- szOID_PRESENTATION_ADDRESS = '2.5.4.29';
- {$EXTERNALSYM szOID_PRESENTATION_ADDRESS}
- szOID_SUPPORTED_APPLICATION_CONTEXT = '2.5.4.30';
- {$EXTERNALSYM szOID_SUPPORTED_APPLICATION_CONTEXT}
-
-// Relational application attribute types:
-
- szOID_MEMBER = '2.5.4.31';
- {$EXTERNALSYM szOID_MEMBER}
- szOID_OWNER = '2.5.4.32';
- {$EXTERNALSYM szOID_OWNER}
- szOID_ROLE_OCCUPANT = '2.5.4.33';
- {$EXTERNALSYM szOID_ROLE_OCCUPANT}
- szOID_SEE_ALSO = '2.5.4.34';
- {$EXTERNALSYM szOID_SEE_ALSO}
-
-// Security attribute types:
-
- szOID_USER_PASSWORD = '2.5.4.35';
- {$EXTERNALSYM szOID_USER_PASSWORD}
- szOID_USER_CERTIFICATE = '2.5.4.36';
- {$EXTERNALSYM szOID_USER_CERTIFICATE}
- szOID_CA_CERTIFICATE = '2.5.4.37';
- {$EXTERNALSYM szOID_CA_CERTIFICATE}
- szOID_AUTHORITY_REVOCATION_LIST = '2.5.4.38';
- {$EXTERNALSYM szOID_AUTHORITY_REVOCATION_LIST}
- szOID_CERTIFICATE_REVOCATION_LIST = '2.5.4.39';
- {$EXTERNALSYM szOID_CERTIFICATE_REVOCATION_LIST}
- szOID_CROSS_CERTIFICATE_PAIR = '2.5.4.40';
- {$EXTERNALSYM szOID_CROSS_CERTIFICATE_PAIR}
-
-// Undocumented attribute types???
-//#define szOID_??? "2.5.4.41"
-
- szOID_GIVEN_NAME = '2.5.4.42'; // case-ignore string
- {$EXTERNALSYM szOID_GIVEN_NAME}
- szOID_INITIALS = '2.5.4.43'; // case-ignore string
- {$EXTERNALSYM szOID_INITIALS}
-
-// The DN Qualifier attribute type specifies disambiguating information to add
-// to the relative distinguished name of an entry. It is intended to be used
-// for entries held in multiple DSAs which would otherwise have the same name,
-// and that its value be the same in a given DSA for all entries to which
-// the information has been added.
-
- szOID_DN_QUALIFIER = '2.5.4.46';
- {$EXTERNALSYM szOID_DN_QUALIFIER}
-
-// Pilot user attribute types:
-
- szOID_DOMAIN_COMPONENT = '0.9.2342.19200300.100.1.25'; // IA5, UTF8 string
- {$EXTERNALSYM szOID_DOMAIN_COMPONENT}
-
-// used for PKCS 12 attributes
-
- szOID_PKCS_12_FRIENDLY_NAME_ATTR = '1.2.840.113549.1.9.20';
- {$EXTERNALSYM szOID_PKCS_12_FRIENDLY_NAME_ATTR}
- szOID_PKCS_12_LOCAL_KEY_ID = '1.2.840.113549.1.9.21';
- {$EXTERNALSYM szOID_PKCS_12_LOCAL_KEY_ID}
- szOID_PKCS_12_KEY_PROVIDER_NAME_ATTR = '1.3.6.1.4.1.311.17.1';
- {$EXTERNALSYM szOID_PKCS_12_KEY_PROVIDER_NAME_ATTR}
- szOID_LOCAL_MACHINE_KEYSET = '1.3.6.1.4.1.311.17.2';
- {$EXTERNALSYM szOID_LOCAL_MACHINE_KEYSET}
-
-//+-------------------------------------------------------------------------
-// Microsoft CERT_RDN attribute Object Identifiers
-//--------------------------------------------------------------------------
-// Special RDN containing the KEY_ID. Its value type is CERT_RDN_OCTET_STRING.
-
- szOID_KEYID_RDN = '1.3.6.1.4.1.311.10.7.1';
- {$EXTERNALSYM szOID_KEYID_RDN}
-
-//+-------------------------------------------------------------------------
-// CERT_RDN Attribute Value Types
-//
-// For RDN_ENCODED_BLOB, the Value's CERT_RDN_VALUE_BLOB is in its encoded
-// representation. Otherwise, its an array of bytes.
-//
-// For all CERT_RDN types, Value.cbData is always the number of bytes, not
-// necessarily the number of elements in the string. For instance,
-// RDN_UNIVERSAL_STRING is an array of ints (cbData == intCnt * 4) and
-// RDN_BMP_STRING is an array of unsigned shorts (cbData == ushortCnt * 2).
-//
-// A RDN_UTF8_STRING is an array of UNICODE characters (cbData == charCnt *2).
-// These UNICODE characters are encoded as UTF8 8 bit characters.
-//
-// For CertDecodeName, two 0 bytes are always appended to the end of the
-// string (ensures a CHAR or WCHAR string is null terminated).
-// These added 0 bytes are't included in the BLOB.cbData.
-//--------------------------------------------------------------------------
-
- CERT_RDN_ANY_TYPE = 0;
- {$EXTERNALSYM CERT_RDN_ANY_TYPE}
- CERT_RDN_ENCODED_BLOB = 1;
- {$EXTERNALSYM CERT_RDN_ENCODED_BLOB}
- CERT_RDN_OCTET_STRING = 2;
- {$EXTERNALSYM CERT_RDN_OCTET_STRING}
- CERT_RDN_NUMERIC_STRING = 3;
- {$EXTERNALSYM CERT_RDN_NUMERIC_STRING}
- CERT_RDN_PRINTABLE_STRING = 4;
- {$EXTERNALSYM CERT_RDN_PRINTABLE_STRING}
- CERT_RDN_TELETEX_STRING = 5;
- {$EXTERNALSYM CERT_RDN_TELETEX_STRING}
- CERT_RDN_T61_STRING = 5;
- {$EXTERNALSYM CERT_RDN_T61_STRING}
- CERT_RDN_VIDEOTEX_STRING = 6;
- {$EXTERNALSYM CERT_RDN_VIDEOTEX_STRING}
- CERT_RDN_IA5_STRING = 7;
- {$EXTERNALSYM CERT_RDN_IA5_STRING}
- CERT_RDN_GRAPHIC_STRING = 8;
- {$EXTERNALSYM CERT_RDN_GRAPHIC_STRING}
- CERT_RDN_VISIBLE_STRING = 9;
- {$EXTERNALSYM CERT_RDN_VISIBLE_STRING}
- CERT_RDN_ISO646_STRING = 9;
- {$EXTERNALSYM CERT_RDN_ISO646_STRING}
- CERT_RDN_GENERAL_STRING = 10;
- {$EXTERNALSYM CERT_RDN_GENERAL_STRING}
- CERT_RDN_UNIVERSAL_STRING = 11;
- {$EXTERNALSYM CERT_RDN_UNIVERSAL_STRING}
- CERT_RDN_INT4_STRING = 11;
- {$EXTERNALSYM CERT_RDN_INT4_STRING}
- CERT_RDN_BMP_STRING = 12;
- {$EXTERNALSYM CERT_RDN_BMP_STRING}
- CERT_RDN_UNICODE_STRING = 12;
- {$EXTERNALSYM CERT_RDN_UNICODE_STRING}
- CERT_RDN_UTF8_STRING = 13;
- {$EXTERNALSYM CERT_RDN_UTF8_STRING}
-
- CERT_RDN_TYPE_MASK = $000000FF;
- {$EXTERNALSYM CERT_RDN_TYPE_MASK}
- CERT_RDN_FLAGS_MASK = DWORD($FF000000);
- {$EXTERNALSYM CERT_RDN_FLAGS_MASK}
-
-//+-------------------------------------------------------------------------
-// Flags that can be or'ed with the above Value Type when encoding/decoding
-//--------------------------------------------------------------------------
-// For encoding: when set, CERT_RDN_T61_STRING is selected instead of
-// CERT_RDN_UNICODE_STRING if all the unicode characters are <= 0xFF
-
- CERT_RDN_ENABLE_T61_UNICODE_FLAG = DWORD($80000000);
- {$EXTERNALSYM CERT_RDN_ENABLE_T61_UNICODE_FLAG}
-
-// For encoding: when set, CERT_RDN_UTF8_STRING is selected instead of
-// CERT_RDN_UNICODE_STRING.
-
- CERT_RDN_ENABLE_UTF8_UNICODE_FLAG = $20000000;
- {$EXTERNALSYM CERT_RDN_ENABLE_UTF8_UNICODE_FLAG}
-
-// For encoding: when set, the characters aren't checked to see if they
-// are valid for the Value Type.
-
- CERT_RDN_DISABLE_CHECK_TYPE_FLAG = $40000000;
- {$EXTERNALSYM CERT_RDN_DISABLE_CHECK_TYPE_FLAG}
-
-// For decoding: by default, CERT_RDN_T61_STRING values are initially decoded
-// as UTF8. If the UTF8 decoding fails, then, decoded as 8 bit characters.
-// Setting this flag skips the initial attempt to decode as UTF8.
-
- CERT_RDN_DISABLE_IE4_UTF8_FLAG = $01000000;
- {$EXTERNALSYM CERT_RDN_DISABLE_IE4_UTF8_FLAG}
-
-// Macro to check that the dwValueType is a character string and not an
-// encoded blob or octet string
-
-function IS_CERT_RDN_CHAR_STRING(X: DWORD): Boolean;
-{$EXTERNALSYM IS_CERT_RDN_CHAR_STRING}
-
-//+-------------------------------------------------------------------------
-// A CERT_RDN consists of an array of the above attributes
-//--------------------------------------------------------------------------
-
-type
- PCERT_RDN = ^CERT_RDN;
- {$EXTERNALSYM PCERT_RDN}
- _CERT_RDN = record
- cRDNAttr: DWORD;
- rgRDNAttr: PCERT_RDN_ATTR;
- end;
- {$EXTERNALSYM _CERT_RDN}
- CERT_RDN = _CERT_RDN;
- {$EXTERNALSYM CERT_RDN}
- TCertRdn = CERT_RDN;
- PCertRdn = PCERT_RDN;
-
-//+-------------------------------------------------------------------------
-// Information stored in a subject's or issuer's name. The information
-// is represented as an array of the above RDNs.
-//--------------------------------------------------------------------------
-
- PCERT_NAME_INFO = ^CERT_NAME_INFO;
- {$EXTERNALSYM PCERT_NAME_INFO}
- _CERT_NAME_INFO = record
- cRDN: DWORD;
- rgRDN: PCERT_RDN;
- end;
- {$EXTERNALSYM _CERT_NAME_INFO}
- CERT_NAME_INFO = _CERT_NAME_INFO;
- {$EXTERNALSYM CERT_NAME_INFO}
- TCertNameInfo = CERT_NAME_INFO;
- PCertNameInfo = PCERT_NAME_INFO;
-
-//+-------------------------------------------------------------------------
-// Name attribute value without the Object Identifier
-//
-// The interpretation of the Value depends on the dwValueType.
-// See above for a list of the types.
-//--------------------------------------------------------------------------
-
- PCERT_NAME_VALUE = ^CERT_NAME_VALUE;
- {$EXTERNALSYM PCERT_NAME_VALUE}
- _CERT_NAME_VALUE = record
- dwValueType: DWORD;
- Value: CERT_RDN_VALUE_BLOB;
- end;
- {$EXTERNALSYM _CERT_NAME_VALUE}
- CERT_NAME_VALUE = _CERT_NAME_VALUE;
- {$EXTERNALSYM CERT_NAME_VALUE}
- TCertNameValue = CERT_NAME_VALUE;
- PCertNameValue = PCERT_NAME_VALUE;
-
-//+-------------------------------------------------------------------------
-// Public Key Info
-//
-// The PublicKey is the encoded representation of the information as it is
-// stored in the bit string
-//--------------------------------------------------------------------------
-
- PCERT_PUBLIC_KEY_INFO = ^CERT_PUBLIC_KEY_INFO;
- {$EXTERNALSYM PCERT_PUBLIC_KEY_INFO}
- _CERT_PUBLIC_KEY_INFO = record
- Algorithm: CRYPT_ALGORITHM_IDENTIFIER;
- PublicKey: CRYPT_BIT_BLOB;
- end;
- {$EXTERNALSYM _CERT_PUBLIC_KEY_INFO}
- CERT_PUBLIC_KEY_INFO = _CERT_PUBLIC_KEY_INFO;
- {$EXTERNALSYM CERT_PUBLIC_KEY_INFO}
- TCertPublicKeyInfo = CERT_PUBLIC_KEY_INFO;
- PCertPublicKeyInfo = PCERT_PUBLIC_KEY_INFO;
-
-const
- CERT_RSA_PUBLIC_KEY_OBJID = szOID_RSA_RSA;
- {$EXTERNALSYM CERT_RSA_PUBLIC_KEY_OBJID}
- CERT_DEFAULT_OID_PUBLIC_KEY_SIGN = szOID_RSA_RSA;
- {$EXTERNALSYM CERT_DEFAULT_OID_PUBLIC_KEY_SIGN}
- CERT_DEFAULT_OID_PUBLIC_KEY_XCHG = szOID_RSA_RSA;
- {$EXTERNALSYM CERT_DEFAULT_OID_PUBLIC_KEY_XCHG}
-
-//+-------------------------------------------------------------------------
-// structure that contains all the information in a PKCS#8 PrivateKeyInfo
-//--------------------------------------------------------------------------
-
-type
- PCRYPT_PRIVATE_KEY_INFO = ^CRYPT_PRIVATE_KEY_INFO;
- {$EXTERNALSYM PCRYPT_PRIVATE_KEY_INFO}
- _CRYPT_PRIVATE_KEY_INFO = record
- Version: DWORD;
- Algorithm: CRYPT_ALGORITHM_IDENTIFIER;
- PrivateKey: CRYPT_DER_BLOB;
- pAttributes: PCRYPT_ATTRIBUTES;
- end;
- {$EXTERNALSYM _CRYPT_PRIVATE_KEY_INFO}
- CRYPT_PRIVATE_KEY_INFO = _CRYPT_PRIVATE_KEY_INFO;
- {$EXTERNALSYM CRYPT_PRIVATE_KEY_INFO}
- TCryptPrivateKeyInfo = CRYPT_PRIVATE_KEY_INFO;
- PCryptPrivateKeyInfo = PCRYPT_PRIVATE_KEY_INFO;
-
-//+-------------------------------------------------------------------------
-// structure that contains all the information in a PKCS#8
-// EncryptedPrivateKeyInfo
-//--------------------------------------------------------------------------
-
- PCRYPT_ENCRYPTED_PRIVATE_KEY_INFO = ^CRYPT_ENCRYPTED_PRIVATE_KEY_INFO;
- {$EXTERNALSYM PCRYPT_ENCRYPTED_PRIVATE_KEY_INFO}
- _CRYPT_ENCRYPTED_PRIVATE_KEY_INFO = record
- EncryptionAlgorithm: CRYPT_ALGORITHM_IDENTIFIER;
- EncryptedPrivateKey: CRYPT_DATA_BLOB;
- end;
- {$EXTERNALSYM _CRYPT_ENCRYPTED_PRIVATE_KEY_INFO}
- CRYPT_ENCRYPTED_PRIVATE_KEY_INFO = _CRYPT_ENCRYPTED_PRIVATE_KEY_INFO;
- {$EXTERNALSYM CRYPT_ENCRYPTED_PRIVATE_KEY_INFO}
- TCryptEncryptedPrivateKeyInfo = CRYPT_ENCRYPTED_PRIVATE_KEY_INFO;
- PCryptEncryptedPrivateKeyInfo = PCRYPT_ENCRYPTED_PRIVATE_KEY_INFO;
-
-//+-------------------------------------------------------------------------
-// this callback is given when an EncryptedProvateKeyInfo structure is
-// encountered during ImportPKCS8. the caller is then expected to decrypt
-// the private key and hand back the decrypted contents.
-//
-// the parameters are:
-// Algorithm - the algorithm used to encrypt the PrivateKeyInfo
-// EncryptedPrivateKey - the encrypted private key blob
-// pClearTextKey - a buffer to receive the clear text
-// cbClearTextKey - the number of bytes of the pClearTextKey buffer
-// note the if this is zero then this should be
-// filled in with the size required to decrypt the
-// key into, and pClearTextKey should be ignored
-// pVoidDecryptFunc - this is the pVoid that was passed into the call
-// and is preserved and passed back as context
-//+-------------------------------------------------------------------------
-
-type
- PCRYPT_DECRYPT_PRIVATE_KEY_FUNC = function(Algorithm: CRYPT_ALGORITHM_IDENTIFIER;
- EncryptedPrivateKey: CRYPT_DATA_BLOB; pbClearTextKey: LPBYTE;
- pcbClearTextKey: LPDWORD; pVoidDecryptFunc: LPVOID): BOOL; stdcall;
- {$EXTERNALSYM PCRYPT_DECRYPT_PRIVATE_KEY_FUNC}
- PCryptDecryptPrivateKeyFunc = PCRYPT_DECRYPT_PRIVATE_KEY_FUNC;
-
-//+-------------------------------------------------------------------------
-// this callback is given when creating a PKCS8 EncryptedPrivateKeyInfo.
-// The caller is then expected to encrypt the private key and hand back
-// the encrypted contents.
-//
-// the parameters are:
-// Algorithm - the algorithm used to encrypt the PrivateKeyInfo
-// pClearTextPrivateKey - the cleartext private key to be encrypted
-// pbEncryptedKey - the output encrypted private key blob
-// cbEncryptedKey - the number of bytes of the pbEncryptedKey buffer
-// note the if this is zero then this should be
-// filled in with the size required to encrypt the
-// key into, and pbEncryptedKey should be ignored
-// pVoidEncryptFunc - this is the pVoid that was passed into the call
-// and is preserved and passed back as context
-//+-------------------------------------------------------------------------
-
-type
- PCRYPT_ENCRYPT_PRIVATE_KEY_FUNC = function(pAlgorithm: PCRYPT_ALGORITHM_IDENTIFIER;
- pClearTextPrivateKey: PCRYPT_DATA_BLOB; pbEncryptedKey: LPBYTE;
- pcbEncryptedKey: LPDWORD; pVoidEncryptFunc: LPVOID): BOOL; stdcall;
- {$EXTERNALSYM PCRYPT_ENCRYPT_PRIVATE_KEY_FUNC}
- PCryptEncryptPrivateKeyFunc = PCRYPT_ENCRYPT_PRIVATE_KEY_FUNC;
-
-//+-------------------------------------------------------------------------
-// this callback is given from the context of a ImportPKCS8 calls. the caller
-// is then expected to hand back an HCRYPTPROV to receive the key being imported
-//
-// the parameters are:
-// pPrivateKeyInfo - pointer to a CRYPT_PRIVATE_KEY_INFO structure which
-// describes the key being imported
-// EncryptedPrivateKey - the encrypted private key blob
-// phCryptProv - a pointer to a HCRRYPTPROV to be filled in
-// pVoidResolveFunc - this is the pVoidResolveFunc passed in by the caller in the
-// CRYPT_PRIVATE_KEY_BLOB_AND_PARAMS struct
-//+-------------------------------------------------------------------------
-
-type
- PCRYPT_RESOLVE_HCRYPTPROV_FUNC = function(pPrivateKeyInfo: PCRYPT_PRIVATE_KEY_INFO;
- phCryptProv: PHCRYPTPROV; pVoidResolveFunc: LPVOID): BOOL; stdcall;
- {$EXTERNALSYM PCRYPT_RESOLVE_HCRYPTPROV_FUNC}
- PCryptResolveHCryptProvFunc = PCRYPT_RESOLVE_HCRYPTPROV_FUNC;
-
-//+-------------------------------------------------------------------------
-// this struct contains a PKCS8 private key and two pointers to callback
-// functions, with a corresponding pVoids. the first callback is used to give
-// the caller the opportunity to specify where the key is imported to. the callback
-// passes the caller the algoroithm OID and key size to use in making the decision.
-// the other callback is used to decrypt the private key if the PKCS8 contains an
-// EncryptedPrivateKeyInfo. both pVoids are preserved and passed back to the caller
-// in the respective callback
-//+-------------------------------------------------------------------------
-
- PCRYPT_PKCS8_IMPORT_PARAMS = ^CRYPT_PKCS8_IMPORT_PARAMS;
- {$EXTERNALSYM PCRYPT_PKCS8_IMPORT_PARAMS}
- _CRYPT_PKCS8_IMPORT_PARAMS = record
- PrivateKey: CRYPT_DIGEST_BLOB; // PKCS8 blob
- pResolvehCryptProvFunc: PCRYPT_RESOLVE_HCRYPTPROV_FUNC; // optional
- pVoidResolveFunc: LPVOID; // optional
- pDecryptPrivateKeyFunc: PCRYPT_DECRYPT_PRIVATE_KEY_FUNC;
- pVoidDecryptFunc: LPVOID;
- end;
- {$EXTERNALSYM _CRYPT_PKCS8_IMPORT_PARAMS}
- CRYPT_PKCS8_IMPORT_PARAMS = _CRYPT_PKCS8_IMPORT_PARAMS;
- {$EXTERNALSYM CRYPT_PKCS8_IMPORT_PARAMS}
- TCryptPkcs8ImportParams = CRYPT_PKCS8_IMPORT_PARAMS;
- PCryptPkcs8ImportParams = PCRYPT_PKCS8_IMPORT_PARAMS;
-
- CRYPT_PRIVATE_KEY_BLOB_AND_PARAMS = CRYPT_PKCS8_IMPORT_PARAMS;
- {$EXTERNALSYM CRYPT_PRIVATE_KEY_BLOB_AND_PARAMS}
- PCRYPT_PRIVATE_KEY_BLOB_AND_PARAMS = PCRYPT_PKCS8_IMPORT_PARAMS;
- {$EXTERNALSYM PCRYPT_PRIVATE_KEY_BLOB_AND_PARAMS}
-
-//+-------------------------------------------------------------------------
-// this struct contains information identifying a private key and a pointer
-// to a callback function, with a corresponding pVoid. The callback is used
-// to encrypt the private key. If the pEncryptPrivateKeyFunc is NULL, the
-// key will not be encrypted and an EncryptedPrivateKeyInfo will not be generated.
-// The pVoid is preserved and passed back to the caller in the respective callback
-//+-------------------------------------------------------------------------
-
- PCRYPT_PKCS8_EXPORT_PARAMS = ^CRYPT_PKCS8_EXPORT_PARAMS;
- {$EXTERNALSYM PCRYPT_PKCS8_EXPORT_PARAMS}
- _CRYPT_PKCS8_EXPORT_PARAMS = record
- hCryptProv: HCRYPTPROV;
- dwKeySpec: DWORD;
- pszPrivateKeyObjId: LPSTR;
- pEncryptPrivateKeyFunc: PCRYPT_ENCRYPT_PRIVATE_KEY_FUNC;
- pVoidEncryptFunc: LPVOID;
- end;
- {$EXTERNALSYM _CRYPT_PKCS8_EXPORT_PARAMS}
- CRYPT_PKCS8_EXPORT_PARAMS = _CRYPT_PKCS8_EXPORT_PARAMS;
- {$EXTERNALSYM CRYPT_PKCS8_EXPORT_PARAMS}
- TCryptPkcs8ExportParams = CRYPT_PKCS8_EXPORT_PARAMS;
- PCryptPkcs8ExportParams = PCRYPT_PKCS8_EXPORT_PARAMS;
-
-//+-------------------------------------------------------------------------
-// Information stored in a certificate
-//
-// The Issuer, Subject, Algorithm, PublicKey and Extension BLOBs are the
-// encoded representation of the information.
-//--------------------------------------------------------------------------
-
- PCERT_INFO = ^CERT_INFO;
- {$EXTERNALSYM PCERT_INFO}
- _CERT_INFO = record
- dwVersion: DWORD;
- SerialNumber: CRYPT_INTEGER_BLOB;
- SignatureAlgorithm: CRYPT_ALGORITHM_IDENTIFIER;
- Issuer: CERT_NAME_BLOB;
- NotBefore: FILETIME;
- NotAfter: FILETIME;
- Subject: CERT_NAME_BLOB;
- SubjectPublicKeyInfo: CERT_PUBLIC_KEY_INFO;
- IssuerUniqueId: CRYPT_BIT_BLOB;
- SubjectUniqueId: CRYPT_BIT_BLOB;
- cExtension: DWORD;
- rgExtension: PCERT_EXTENSION;
- end;
- {$EXTERNALSYM _CERT_INFO}
- CERT_INFO = _CERT_INFO;
- {$EXTERNALSYM CERT_INFO}
- TCertInfo = CERT_INFO;
- PCertInfo = PCERT_INFO;
-
-//+-------------------------------------------------------------------------
-// Certificate versions
-//--------------------------------------------------------------------------
-
-const
- CERT_V1 = 0;
- {$EXTERNALSYM CERT_V1}
- CERT_V2 = 1;
- {$EXTERNALSYM CERT_V2}
- CERT_V3 = 2;
- {$EXTERNALSYM CERT_V3}
-
-//+-------------------------------------------------------------------------
-// Certificate Information Flags
-//--------------------------------------------------------------------------
-
- CERT_INFO_VERSION_FLAG = 1;
- {$EXTERNALSYM CERT_INFO_VERSION_FLAG}
- CERT_INFO_SERIAL_NUMBER_FLAG = 2;
- {$EXTERNALSYM CERT_INFO_SERIAL_NUMBER_FLAG}
- CERT_INFO_SIGNATURE_ALGORITHM_FLAG = 3;
- {$EXTERNALSYM CERT_INFO_SIGNATURE_ALGORITHM_FLAG}
- CERT_INFO_ISSUER_FLAG = 4;
- {$EXTERNALSYM CERT_INFO_ISSUER_FLAG}
- CERT_INFO_NOT_BEFORE_FLAG = 5;
- {$EXTERNALSYM CERT_INFO_NOT_BEFORE_FLAG}
- CERT_INFO_NOT_AFTER_FLAG = 6;
- {$EXTERNALSYM CERT_INFO_NOT_AFTER_FLAG}
- CERT_INFO_SUBJECT_FLAG = 7;
- {$EXTERNALSYM CERT_INFO_SUBJECT_FLAG}
- CERT_INFO_SUBJECT_PUBLIC_KEY_INFO_FLAG = 8;
- {$EXTERNALSYM CERT_INFO_SUBJECT_PUBLIC_KEY_INFO_FLAG}
- CERT_INFO_ISSUER_UNIQUE_ID_FLAG = 9;
- {$EXTERNALSYM CERT_INFO_ISSUER_UNIQUE_ID_FLAG}
- CERT_INFO_SUBJECT_UNIQUE_ID_FLAG = 10;
- {$EXTERNALSYM CERT_INFO_SUBJECT_UNIQUE_ID_FLAG}
- CERT_INFO_EXTENSION_FLAG = 11;
- {$EXTERNALSYM CERT_INFO_EXTENSION_FLAG}
-
-//+-------------------------------------------------------------------------
-// An entry in a CRL
-//
-// The Extension BLOBs are the encoded representation of the information.
-//--------------------------------------------------------------------------
-
-type
- PCRL_ENTRY = ^CRL_ENTRY;
- {$EXTERNALSYM PCRL_ENTRY}
- _CRL_ENTRY = record
- SerialNumber: CRYPT_INTEGER_BLOB;
- RevocationDate: FILETIME;
- cExtension: DWORD;
- rgExtension: PCERT_EXTENSION;
- end;
- {$EXTERNALSYM _CRL_ENTRY}
- CRL_ENTRY = _CRL_ENTRY;
- {$EXTERNALSYM CRL_ENTRY}
- TCrlEntry = CRL_ENTRY;
- PCrlEntry = PCRL_ENTRY;
-
-//+-------------------------------------------------------------------------
-// Information stored in a CRL
-//
-// The Issuer, Algorithm and Extension BLOBs are the encoded
-// representation of the information.
-//--------------------------------------------------------------------------
-
- PCRL_INFO = ^CRL_INFO;
- {$EXTERNALSYM PCRL_INFO}
- _CRL_INFO = record
- dwVersion: DWORD;
- SignatureAlgorithm: CRYPT_ALGORITHM_IDENTIFIER;
- Issuer: CERT_NAME_BLOB;
- ThisUpdate: FILETIME;
- NextUpdate: FILETIME;
- cCRLEntry: DWORD;
- rgCRLEntry: PCRL_ENTRY;
- cExtension: DWORD;
- rgExtension: PCERT_EXTENSION;
- end;
- {$EXTERNALSYM _CRL_INFO}
- CRL_INFO = _CRL_INFO;
- {$EXTERNALSYM CRL_INFO}
- TCrlInfo = CRL_INFO;
- PCrlInfo = PCRL_INFO;
-
-//+-------------------------------------------------------------------------
-// CRL versions
-//--------------------------------------------------------------------------
-
-const
- CRL_V1 = 0;
- {$EXTERNALSYM CRL_V1}
- CRL_V2 = 1;
- {$EXTERNALSYM CRL_V2}
-
-//+-------------------------------------------------------------------------
-// Information stored in a certificate request
-//
-// The Subject, Algorithm, PublicKey and Attribute BLOBs are the encoded
-// representation of the information.
-//--------------------------------------------------------------------------
-
-type
- PCERT_REQUEST_INFO = ^CERT_REQUEST_INFO;
- {$EXTERNALSYM PCERT_REQUEST_INFO}
- _CERT_REQUEST_INFO = record
- dwVersion: DWORD;
- Subject: CERT_NAME_BLOB;
- SubjectPublicKeyInfo: CERT_PUBLIC_KEY_INFO;
- cAttribute: DWORD;
- rgAttribute: PCRYPT_ATTRIBUTE;
- end;
- {$EXTERNALSYM _CERT_REQUEST_INFO}
- CERT_REQUEST_INFO = _CERT_REQUEST_INFO;
- {$EXTERNALSYM CERT_REQUEST_INFO}
- TCertRequestInfo = CERT_REQUEST_INFO;
- PCertRequestInfo = PCERT_REQUEST_INFO;
-
-//+-------------------------------------------------------------------------
-// Certificate Request versions
-//--------------------------------------------------------------------------
-
-const
- CERT_REQUEST_V1 = 0;
- {$EXTERNALSYM CERT_REQUEST_V1}
-
-//+-------------------------------------------------------------------------
-// Information stored in Netscape's Keygen request
-//--------------------------------------------------------------------------
-
-type
- PCERT_KEYGEN_REQUEST_INFO = ^CERT_KEYGEN_REQUEST_INFO;
- {$EXTERNALSYM PCERT_KEYGEN_REQUEST_INFO}
- _CERT_KEYGEN_REQUEST_INFO = record
- dwVersion: DWORD;
- SubjectPublicKeyInfo: CERT_PUBLIC_KEY_INFO;
- pwszChallengeString: LPWSTR; // encoded as IA5
- end;
- {$EXTERNALSYM _CERT_KEYGEN_REQUEST_INFO}
- CERT_KEYGEN_REQUEST_INFO = _CERT_KEYGEN_REQUEST_INFO;
- {$EXTERNALSYM CERT_KEYGEN_REQUEST_INFO}
- TCertKeygenRequestInfo = CERT_KEYGEN_REQUEST_INFO;
- PCertKeygenRequestInfo = PCERT_KEYGEN_REQUEST_INFO;
-
-const
- CERT_KEYGEN_REQUEST_V1 = 0;
- {$EXTERNALSYM CERT_KEYGEN_REQUEST_V1}
-
-//+-------------------------------------------------------------------------
-// Certificate, CRL, Certificate Request or Keygen Request Signed Content
-//
-// The "to be signed" encoded content plus its signature. The ToBeSigned
-// is the encoded CERT_INFO, CRL_INFO, CERT_REQUEST_INFO or
-// CERT_KEYGEN_REQUEST_INFO.
-//--------------------------------------------------------------------------
-
-type
- PCERT_SIGNED_CONTENT_INFO = ^CERT_SIGNED_CONTENT_INFO;
- {$EXTERNALSYM PCERT_SIGNED_CONTENT_INFO}
- _CERT_SIGNED_CONTENT_INFO = record
- ToBeSigned: CRYPT_DER_BLOB;
- SignatureAlgorithm: CRYPT_ALGORITHM_IDENTIFIER;
- Signature: CRYPT_BIT_BLOB;
- end;
- {$EXTERNALSYM _CERT_SIGNED_CONTENT_INFO}
- CERT_SIGNED_CONTENT_INFO = _CERT_SIGNED_CONTENT_INFO;
- {$EXTERNALSYM CERT_SIGNED_CONTENT_INFO}
- TCertSignedContentInfo = CERT_SIGNED_CONTENT_INFO;
- PCertSignedContentInfo = PCERT_SIGNED_CONTENT_INFO;
-
-//+-------------------------------------------------------------------------
-// Certificate Trust List (CTL)
-//--------------------------------------------------------------------------
-
-//+-------------------------------------------------------------------------
-// CTL Usage. Also used for EnhancedKeyUsage extension.
-//--------------------------------------------------------------------------
-
- PCTL_USAGE = ^CTL_USAGE;
- {$EXTERNALSYM PCTL_USAGE}
- _CTL_USAGE = record
- cUsageIdentifier: DWORD;
- rgpszUsageIdentifier: LPSTR; // array of pszObjId
- end;
- {$EXTERNALSYM _CTL_USAGE}
- CTL_USAGE = _CTL_USAGE;
- {$EXTERNALSYM CTL_USAGE}
- TCtlUsage = CTL_USAGE;
- PCtlUsage = PCTL_USAGE;
-
- CERT_ENHKEY_USAGE = CTL_USAGE;
- {$EXTERNALSYM CERT_ENHKEY_USAGE}
- PCERT_ENHKEY_USAGE = PCTL_USAGE;
- {$EXTERNALSYM PCERT_ENHKEY_USAGE}
-
-//+-------------------------------------------------------------------------
-// An entry in a CTL
-//--------------------------------------------------------------------------
-
- PCTL_ENTRY = ^CTL_ENTRY;
- {$EXTERNALSYM PCTL_ENTRY}
- _CTL_ENTRY = record
- SubjectIdentifier: CRYPT_DATA_BLOB; // For example, its hash
- cAttribute: DWORD;
- rgAttribute: PCRYPT_ATTRIBUTE; // OPTIONAL
- end;
- {$EXTERNALSYM _CTL_ENTRY}
- CTL_ENTRY = _CTL_ENTRY;
- {$EXTERNALSYM CTL_ENTRY}
- TCtlEntry = CTL_ENTRY;
- PCtlEntry = PCTL_ENTRY;
-
-//+-------------------------------------------------------------------------
-// Information stored in a CTL
-//--------------------------------------------------------------------------
-
- PCTL_INFO = ^CTL_INFO;
- {$EXTERNALSYM PCTL_INFO}
- _CTL_INFO = record
- dwVersion: DWORD;
- SubjectUsage: CTL_USAGE;
- ListIdentifier: CRYPT_DATA_BLOB; // OPTIONAL
- SequenceNumber: CRYPT_INTEGER_BLOB; // OPTIONAL
- ThisUpdate: FILETIME;
- NextUpdate: FILETIME; // OPTIONAL
- SubjectAlgorithm: CRYPT_ALGORITHM_IDENTIFIER;
- cCTLEntry: DWORD;
- rgCTLEntry: PCTL_ENTRY; // OPTIONAL
- cExtension: DWORD;
- rgExtension: PCERT_EXTENSION; // OPTIONAL
- end;
- {$EXTERNALSYM _CTL_INFO}
- CTL_INFO = _CTL_INFO;
- {$EXTERNALSYM CTL_INFO}
- TCtlInfo = CTL_INFO;
- PCtlInfo = PCTL_INFO;
-
-//+-------------------------------------------------------------------------
-// CTL versions
-//--------------------------------------------------------------------------
-
-const
- CTL_V1 = 0;
- {$EXTERNALSYM CTL_V1}
-
-//+-------------------------------------------------------------------------
-// TimeStamp Request
-//
-// The pszTimeStamp is the OID for the Time type requested
-// The pszContentType is the Content Type OID for the content, usually DATA
-// The Content is a un-decoded blob
-//--------------------------------------------------------------------------
-
-type
- PCRYPT_TIME_STAMP_REQUEST_INFO = ^CRYPT_TIME_STAMP_REQUEST_INFO;
- {$EXTERNALSYM PCRYPT_TIME_STAMP_REQUEST_INFO}
- _CRYPT_TIME_STAMP_REQUEST_INFO = record
- pszTimeStampAlgorithm: LPSTR; // pszObjId
- pszContentType: LPSTR; // pszObjId
- Content: CRYPT_OBJID_BLOB;
- cAttribute: DWORD;
- rgAttribute: PCRYPT_ATTRIBUTE;
- end;
- {$EXTERNALSYM _CRYPT_TIME_STAMP_REQUEST_INFO}
- CRYPT_TIME_STAMP_REQUEST_INFO = _CRYPT_TIME_STAMP_REQUEST_INFO;
- {$EXTERNALSYM CRYPT_TIME_STAMP_REQUEST_INFO}
- TCryptTimeStampRequestInfo = CRYPT_TIME_STAMP_REQUEST_INFO;
- PCryptTimeStampRequestInfo = PCRYPT_TIME_STAMP_REQUEST_INFO;
-
-//+-------------------------------------------------------------------------
-// Name Value Attribute
-//--------------------------------------------------------------------------
-
- PCRYPT_ENROLLMENT_NAME_VALUE_PAIR = ^CRYPT_ENROLLMENT_NAME_VALUE_PAIR;
- {$EXTERNALSYM PCRYPT_ENROLLMENT_NAME_VALUE_PAIR}
- _CRYPT_ENROLLMENT_NAME_VALUE_PAIR = record
- pwszName: LPWSTR;
- pwszValue: LPWSTR;
- end;
- {$EXTERNALSYM _CRYPT_ENROLLMENT_NAME_VALUE_PAIR}
- CRYPT_ENROLLMENT_NAME_VALUE_PAIR = _CRYPT_ENROLLMENT_NAME_VALUE_PAIR;
- {$EXTERNALSYM CRYPT_ENROLLMENT_NAME_VALUE_PAIR}
- TCryptEnrollmentNameValuePair = CRYPT_ENROLLMENT_NAME_VALUE_PAIR;
- PCryptEnrollmentNameValuePair = PCRYPT_ENROLLMENT_NAME_VALUE_PAIR;
-
-//+-------------------------------------------------------------------------
-// CSP Provider
-//--------------------------------------------------------------------------
-
- PCRYPT_CSP_PROVIDER = ^CRYPT_CSP_PROVIDER;
- {$EXTERNALSYM PCRYPT_CSP_PROVIDER}
- _CRYPT_CSP_PROVIDER = record
- dwKeySpec: DWORD;
- pwszProviderName: LPWSTR;
- Signature: CRYPT_BIT_BLOB;
- end;
- {$EXTERNALSYM _CRYPT_CSP_PROVIDER}
- CRYPT_CSP_PROVIDER = _CRYPT_CSP_PROVIDER;
- {$EXTERNALSYM CRYPT_CSP_PROVIDER}
- TCryptCspProvider = CRYPT_CSP_PROVIDER;
- PCryptCspProvider = PCRYPT_CSP_PROVIDER;
-
-//+-------------------------------------------------------------------------
-// Certificate and Message encoding types
-//
-// The encoding type is a DWORD containing both the certificate and message
-// encoding types. The certificate encoding type is stored in the LOWORD.
-// The message encoding type is stored in the HIWORD. Some functions or
-// structure fields require only one of the encoding types. The following
-// naming convention is used to indicate which encoding type(s) are
-// required:
-// dwEncodingType (both encoding types are required)
-// dwMsgAndCertEncodingType (both encoding types are required)
-// dwMsgEncodingType (only msg encoding type is required)
-// dwCertEncodingType (only cert encoding type is required)
-//
-// Its always acceptable to specify both.
-//--------------------------------------------------------------------------
-
-const
- CERT_ENCODING_TYPE_MASK = $0000FFFF;
- {$EXTERNALSYM CERT_ENCODING_TYPE_MASK}
- CMSG_ENCODING_TYPE_MASK = DWORD($FFFF0000);
- {$EXTERNALSYM CMSG_ENCODING_TYPE_MASK}
-
-function GET_CERT_ENCODING_TYPE(X: DWORD): DWORD;
-{$EXTERNALSYM GET_CERT_ENCODING_TYPE}
-
-function GET_CMSG_ENCODING_TYPE(X: DWORD): DWORD;
-{$EXTERNALSYM GET_CMSG_ENCODING_TYPE}
-
-const
- CRYPT_ASN_ENCODING = $00000001;
- {$EXTERNALSYM CRYPT_ASN_ENCODING}
- CRYPT_NDR_ENCODING = $00000002;
- {$EXTERNALSYM CRYPT_NDR_ENCODING}
- X509_ASN_ENCODING = $00000001;
- {$EXTERNALSYM X509_ASN_ENCODING}
- X509_NDR_ENCODING = $00000002;
- {$EXTERNALSYM X509_NDR_ENCODING}
- PKCS_7_ASN_ENCODING = $00010000;
- {$EXTERNALSYM PKCS_7_ASN_ENCODING}
- PKCS_7_NDR_ENCODING = $00020000;
- {$EXTERNALSYM PKCS_7_NDR_ENCODING}
-
-//+-------------------------------------------------------------------------
-// format the specified data structure according to the certificate
-// encoding type.
-//
-// The default behavior of CryptFormatObject is to return single line
-// display of the encoded data, that is, each subfield will be concatenated with
-// a ", " on one line. If user prefers to display the data in multiple line,
-// set the flag CRYPT_FORMAT_STR_MULTI_LINE, that is, each subfield will be displayed
-// on a seperate line.
-//
-// If there is no formatting routine installed or registered
-// for the lpszStructType, the hex dump of the encoded BLOB will be returned.
-// User can set the flag CRYPT_FORMAT_STR_NO_HEX to disable the hex dump.
-//--------------------------------------------------------------------------
-
-function CryptFormatObject(dwCertEncodingType, dwFormatType, dwFormatStrType: DWORD;
- pFormatStruct: Pointer; lpszStructType: LPCSTR; pbEncoded: LPBYTE;
- cbEncoded: DWORD; pbFormat: Pointer; var pcbFormat: DWORD): BOOL; stdcall;
-{$EXTERNALSYM CryptFormatObject}
-
-//-------------------------------------------------------------------------
-// constants for dwFormatStrType of function CryptFormatObject
-//-------------------------------------------------------------------------
-
-const
- CRYPT_FORMAT_STR_MULTI_LINE = $0001;
- {$EXTERNALSYM CRYPT_FORMAT_STR_MULTI_LINE}
- CRYPT_FORMAT_STR_NO_HEX = $0010;
- {$EXTERNALSYM CRYPT_FORMAT_STR_NO_HEX}
-
-//-------------------------------------------------------------------------
-// constants for dwFormatType of function CryptFormatObject
-// when format X509_NAME or X509_UNICODE_NAME
-//-------------------------------------------------------------------------
-// Just get the simple string
-
- CRYPT_FORMAT_SIMPLE = $0001;
- {$EXTERNALSYM CRYPT_FORMAT_SIMPLE}
-
-//Put an attribute name infront of the attribute
-//such as "O=Microsoft,DN=xiaohs"
-
- CRYPT_FORMAT_X509 = $0002;
- {$EXTERNALSYM CRYPT_FORMAT_X509}
-
-//Put an OID infront of the simple string, such as
-//"2.5.4.22=Microsoft,2.5.4.3=xiaohs"
-
- CRYPT_FORMAT_OID = $0004;
- {$EXTERNALSYM CRYPT_FORMAT_OID}
-
-//Put a ";" between each RDN. The default is ","
-
- CRYPT_FORMAT_RDN_SEMICOLON = $0100;
- {$EXTERNALSYM CRYPT_FORMAT_RDN_SEMICOLON}
-
-//Put a "\n" between each RDN.
-
- CRYPT_FORMAT_RDN_CRLF = $0200;
- {$EXTERNALSYM CRYPT_FORMAT_RDN_CRLF}
-
-//Unquote the DN value, which is quoated by default va the following
-//rules: if the DN contains leading or trailing
-//white space or one of the following characters: ",", "+", "=",
-//""", "\n", "<", ">", "#" or ";". The quoting character is ".
-//If the DN Value contains a " it is double quoted ("").
-
- CRYPT_FORMAT_RDN_UNQUOTE = $0400;
- {$EXTERNALSYM CRYPT_FORMAT_RDN_UNQUOTE}
-
-//reverse the order of the RDNs before converting to the string
-
- CRYPT_FORMAT_RDN_REVERSE = $0800;
- {$EXTERNALSYM CRYPT_FORMAT_RDN_REVERSE}
-
-//-------------------------------------------------------------------------
-// contants dwFormatType of function CryptFormatObject when format a DN.:
-//
-// The following three values are defined in the section above:
-// CRYPT_FORMAT_SIMPLE: Just a simple string
-// such as "Microsoft+xiaohs+NT"
-// CRYPT_FORMAT_X509 Put an attribute name infront of the attribute
-// such as "O=Microsoft+xiaohs+NT"
-//
-// CRYPT_FORMAT_OID Put an OID infront of the simple string,
-// such as "2.5.4.22=Microsoft+xiaohs+NT"
-//
-// Additional values are defined as following:
-//----------------------------------------------------------------------------
-//Put a "," between each value. Default is "+"
-
- CRYPT_FORMAT_COMMA = $1000;
- {$EXTERNALSYM CRYPT_FORMAT_COMMA}
-
-//Put a ";" between each value
-
- CRYPT_FORMAT_SEMICOLON = CRYPT_FORMAT_RDN_SEMICOLON;
- {$EXTERNALSYM CRYPT_FORMAT_SEMICOLON}
-
-//Put a "\n" between each value
-
- CRYPT_FORMAT_CRLF = CRYPT_FORMAT_RDN_CRLF;
- {$EXTERNALSYM CRYPT_FORMAT_CRLF}
-
-//+-------------------------------------------------------------------------
-// Encode / decode the specified data structure according to the certificate
-// encoding type.
-//
-// See below for a list of the predefined data structures.
-//--------------------------------------------------------------------------
-
-type
- PFN_CRYPT_ALLOC = function(cbSize: size_t): LPVOID; stdcall;
- {$EXTERNALSYM PFN_CRYPT_ALLOC}
-
- PFN_CRYPT_FREE = procedure(pv: LPVOID); stdcall;
- {$EXTERNALSYM PFN_CRYPT_FREE}
-
- PCRYPT_ENCODE_PARA = ^CRYPT_ENCODE_PARA;
- {$EXTERNALSYM PCRYPT_ENCODE_PARA}
- _CRYPT_ENCODE_PARA = record
- cbSize: DWORD;
- pfnAlloc: PFN_CRYPT_ALLOC; // OPTIONAL
- pfnFree: PFN_CRYPT_FREE; // OPTIONAL
- end;
- {$EXTERNALSYM _CRYPT_ENCODE_PARA}
- CRYPT_ENCODE_PARA = _CRYPT_ENCODE_PARA;
- {$EXTERNALSYM CRYPT_ENCODE_PARA}
- TCryptEncodePara = CRYPT_ENCODE_PARA;
- PCryptEncodePara = PCRYPT_ENCODE_PARA;
-
-function CryptEncodeObjectEx(dwCertEncodingType: DWORD; lpszStructType: LPCSTR;
- pvStructInfo: Pointer; dwFlags: DWORD; pEncodePara: PCRYPT_ENCODE_PARA;
- pvEncoded: Pointer; var pcbEncoded: DWORD): BOOL; stdcall;
-{$EXTERNALSYM CryptEncodeObjectEx}
-
-function CryptEncodeObject(dwCertEncodingType: DWORD; lpszStructType: LPCSTR;
- pvStructInfo: Pointer; pbEncoded: LPBYTE; var pcbEncoded: DWORD): BOOL; stdcall;
-{$EXTERNALSYM CryptEncodeObject}
-
-// By default the signature bytes are reversed. The following flag can
-// be set to inhibit the byte reversal.
-//
-// This flag is applicable to
-// X509_CERT_TO_BE_SIGNED
-
-const
- CRYPT_ENCODE_NO_SIGNATURE_BYTE_REVERSAL_FLAG = $8;
- {$EXTERNALSYM CRYPT_ENCODE_NO_SIGNATURE_BYTE_REVERSAL_FLAG}
-
-// When the following flag is set the called encode function allocates
-// memory for the encoded bytes. A pointer to the allocated bytes
-// is returned in pvEncoded. If pEncodePara or pEncodePara->pfnAlloc is
-// NULL, then, LocalAlloc is called for the allocation and LocalFree must
-// be called to do the free. Otherwise, pEncodePara->pfnAlloc is called
-// for the allocation.
-//
-// *pcbEncoded is ignored on input and updated with the length of the
-// allocated, encoded bytes.
-//
-// If pfnAlloc is set, then, pfnFree should also be set.
-
- CRYPT_ENCODE_ALLOC_FLAG = $8000;
- {$EXTERNALSYM CRYPT_ENCODE_ALLOC_FLAG}
-
-// The following flag is applicable when encoding X509_UNICODE_NAME.
-// When set, CERT_RDN_T61_STRING is selected instead of
-// CERT_RDN_UNICODE_STRING if all the unicode characters are <= 0xFF
-
- CRYPT_UNICODE_NAME_ENCODE_ENABLE_T61_UNICODE_FLAG = CERT_RDN_ENABLE_T61_UNICODE_FLAG;
- {$EXTERNALSYM CRYPT_UNICODE_NAME_ENCODE_ENABLE_T61_UNICODE_FLAG}
-
-// The following flag is applicable when encoding X509_UNICODE_NAME.
-// When set, CERT_RDN_UTF8_STRING is selected instead of
-// CERT_RDN_UNICODE_STRING.
-
- CRYPT_UNICODE_NAME_ENCODE_ENABLE_UTF8_UNICODE_FLAG = CERT_RDN_ENABLE_UTF8_UNICODE_FLAG;
- {$EXTERNALSYM CRYPT_UNICODE_NAME_ENCODE_ENABLE_UTF8_UNICODE_FLAG}
-
-// The following flag is applicable when encoding X509_UNICODE_NAME,
-// X509_UNICODE_NAME_VALUE or X509_UNICODE_ANY_STRING.
-// When set, the characters aren't checked to see if they
-// are valid for the specified Value Type.
-
- CRYPT_UNICODE_NAME_ENCODE_DISABLE_CHECK_TYPE_FLAG = CERT_RDN_DISABLE_CHECK_TYPE_FLAG;
- {$EXTERNALSYM CRYPT_UNICODE_NAME_ENCODE_DISABLE_CHECK_TYPE_FLAG}
-
-// The following flag is applicable when encoding the PKCS_SORTED_CTL. This
-// flag should be set if the identifier for the TrustedSubjects is a hash,
-// such as, MD5 or SHA1.
-
- CRYPT_SORTED_CTL_ENCODE_HASHED_SUBJECT_IDENTIFIER_FLAG = $10000;
- {$EXTERNALSYM CRYPT_SORTED_CTL_ENCODE_HASHED_SUBJECT_IDENTIFIER_FLAG}
-
-type
- PCRYPT_DECODE_PARA = ^CRYPT_DECODE_PARA;
- {$EXTERNALSYM PCRYPT_DECODE_PARA}
- _CRYPT_DECODE_PARA = record
- cbSize: DWORD;
- pfnAlloc: PFN_CRYPT_ALLOC; // OPTIONAL
- pfnFree: PFN_CRYPT_FREE; // OPTIONAL
- end;
- {$EXTERNALSYM _CRYPT_DECODE_PARA}
- CRYPT_DECODE_PARA = _CRYPT_DECODE_PARA;
- {$EXTERNALSYM CRYPT_DECODE_PARA}
- TCryptDecodePara = CRYPT_DECODE_PARA;
- PCryptDecodePara = PCRYPT_DECODE_PARA;
-
-function CryptDecodeObjectEx(dwCertEncodingType: DWORD; lpszStructType: LPCSTR;
- pbEncoded: Pointer; cbEncoded, dwFlags: DWORD; pDecodePara: PCRYPT_DECODE_PARA;
- pvStructInfo: Pointer; var pcbStructInfo: DWORD): BOOL; stdcall;
-{$EXTERNALSYM CryptDecodeObjectEx}
-
-function CryptDecodeObject(dwCertEncodingType: DWORD; lpszStructType: LPCSTR;
- pbEncoded: LPBYTE; cbEncoded, dwFlags: DWORD; pvStructInfo: Pointer;
- var pcbStructInfo: DWORD): BOOL; stdcall;
-{$EXTERNALSYM CryptDecodeObject}
-
-// When the following flag is set the nocopy optimization is enabled.
-// This optimization where appropriate, updates the pvStructInfo fields
-// to point to content residing within pbEncoded instead of making a copy
-// of and appending to pvStructInfo.
-//
-// Note, when set, pbEncoded can't be freed until pvStructInfo is freed.
-
-const
- CRYPT_DECODE_NOCOPY_FLAG = $1;
- {$EXTERNALSYM CRYPT_DECODE_NOCOPY_FLAG}
-
-// For CryptDecodeObject(), by default the pbEncoded is the "to be signed"
-// plus its signature. Set the following flag, if pbEncoded points to only
-// the "to be signed".
-//
-// This flag is applicable to
-// X509_CERT_TO_BE_SIGNED
-// X509_CERT_CRL_TO_BE_SIGNED
-// X509_CERT_REQUEST_TO_BE_SIGNED
-// X509_KEYGEN_REQUEST_TO_BE_SIGNED
-
- CRYPT_DECODE_TO_BE_SIGNED_FLAG = $2;
- {$EXTERNALSYM CRYPT_DECODE_TO_BE_SIGNED_FLAG}
-
-// When the following flag is set, the OID strings are allocated in
-// crypt32.dll and shared instead of being copied into the returned
-// data structure. This flag may be set if crypt32.dll isn't unloaded
-// before the caller is unloaded.
-
- CRYPT_DECODE_SHARE_OID_STRING_FLAG = $4;
- {$EXTERNALSYM CRYPT_DECODE_SHARE_OID_STRING_FLAG}
-
-// By default the signature bytes are reversed. The following flag can
-// be set to inhibit the byte reversal.
-//
-// This flag is applicable to
-// X509_CERT_TO_BE_SIGNED
-
- CRYPT_DECODE_NO_SIGNATURE_BYTE_REVERSAL_FLAG = $8;
- {$EXTERNALSYM CRYPT_DECODE_NO_SIGNATURE_BYTE_REVERSAL_FLAG}
-
-// When the following flag is set the called decode function allocates
-// memory for the decoded structure. A pointer to the allocated structure
-// is returned in pvStructInfo. If pDecodePara or pDecodePara->pfnAlloc is
-// NULL, then, LocalAlloc is called for the allocation and LocalFree must
-// be called to do the free. Otherwise, pDecodePara->pfnAlloc is called
-// for the allocation.
-//
-// *pcbStructInfo is ignored on input and updated with the length of the
-// allocated, decoded structure.
-//
-// This flag may also be set in the CryptDecodeObject API. Since
-// CryptDecodeObject doesn't take a pDecodePara, LocalAlloc is always
-// called for the allocation which must be freed by calling LocalFree.
-
- CRYPT_DECODE_ALLOC_FLAG = $8000;
- {$EXTERNALSYM CRYPT_DECODE_ALLOC_FLAG}
-
-// The following flag is applicable when decoding X509_UNICODE_NAME,
-// X509_UNICODE_NAME_VALUE or X509_UNICODE_ANY_STRING.
-// By default, CERT_RDN_T61_STRING values are initially decoded
-// as UTF8. If the UTF8 decoding fails, then, decoded as 8 bit characters.
-// Setting this flag skips the initial attempt to decode as UTF8.
-
- CRYPT_UNICODE_NAME_DECODE_DISABLE_IE4_UTF8_FLAG = CERT_RDN_DISABLE_IE4_UTF8_FLAG;
- {$EXTERNALSYM CRYPT_UNICODE_NAME_DECODE_DISABLE_IE4_UTF8_FLAG}
-
-//+-------------------------------------------------------------------------
-// Predefined X509 certificate data structures that can be encoded / decoded.
-//--------------------------------------------------------------------------
-
- CRYPT_ENCODE_DECODE_NONE = 0;
- {$EXTERNALSYM CRYPT_ENCODE_DECODE_NONE}
- X509_CERT = LPCSTR(1);
- {$EXTERNALSYM X509_CERT}
- X509_CERT_TO_BE_SIGNED = LPCSTR(2);
- {$EXTERNALSYM X509_CERT_TO_BE_SIGNED}
- X509_CERT_CRL_TO_BE_SIGNED = LPCSTR(3);
- {$EXTERNALSYM X509_CERT_CRL_TO_BE_SIGNED}
- X509_CERT_REQUEST_TO_BE_SIGNED = LPCSTR(4);
- {$EXTERNALSYM X509_CERT_REQUEST_TO_BE_SIGNED}
- X509_EXTENSIONS = LPCSTR(5);
- {$EXTERNALSYM X509_EXTENSIONS}
- X509_NAME_VALUE = LPCSTR(6);
- {$EXTERNALSYM X509_NAME_VALUE}
- X509_NAME = LPCSTR(7);
- {$EXTERNALSYM X509_NAME}
- X509_PUBLIC_KEY_INFO = LPCSTR(8);
- {$EXTERNALSYM X509_PUBLIC_KEY_INFO}
-
-//+-------------------------------------------------------------------------
-// Predefined X509 certificate extension data structures that can be
-// encoded / decoded.
-//--------------------------------------------------------------------------
-
- X509_AUTHORITY_KEY_ID = LPCSTR(9);
- {$EXTERNALSYM X509_AUTHORITY_KEY_ID}
- X509_KEY_ATTRIBUTES = LPCSTR(10);
- {$EXTERNALSYM X509_KEY_ATTRIBUTES}
- X509_KEY_USAGE_RESTRICTION = LPCSTR(11);
- {$EXTERNALSYM X509_KEY_USAGE_RESTRICTION}
- X509_ALTERNATE_NAME = LPCSTR(12);
- {$EXTERNALSYM X509_ALTERNATE_NAME}
- X509_BASIC_CONSTRAINTS = LPCSTR(13);
- {$EXTERNALSYM X509_BASIC_CONSTRAINTS}
- X509_KEY_USAGE = LPCSTR(14);
- {$EXTERNALSYM X509_KEY_USAGE}
- X509_BASIC_CONSTRAINTS2 = LPCSTR(15);
- {$EXTERNALSYM X509_BASIC_CONSTRAINTS2}
- X509_CERT_POLICIES = LPCSTR(16);
- {$EXTERNALSYM X509_CERT_POLICIES}
-
-//+-------------------------------------------------------------------------
-// Additional predefined data structures that can be encoded / decoded.
-//--------------------------------------------------------------------------
-
- PKCS_UTC_TIME = LPCSTR(17);
- {$EXTERNALSYM PKCS_UTC_TIME}
- PKCS_TIME_REQUEST = LPCSTR(18);
- {$EXTERNALSYM PKCS_TIME_REQUEST}
- RSA_CSP_PUBLICKEYBLOB = LPCSTR(19);
- {$EXTERNALSYM RSA_CSP_PUBLICKEYBLOB}
- X509_UNICODE_NAME = LPCSTR(20);
- {$EXTERNALSYM X509_UNICODE_NAME}
-
- X509_KEYGEN_REQUEST_TO_BE_SIGNED = LPCSTR(21);
- {$EXTERNALSYM X509_KEYGEN_REQUEST_TO_BE_SIGNED}
- PKCS_ATTRIBUTE = LPCSTR(22);
- {$EXTERNALSYM PKCS_ATTRIBUTE}
- PKCS_CONTENT_INFO_SEQUENCE_OF_ANY = LPCSTR(23);
- {$EXTERNALSYM PKCS_CONTENT_INFO_SEQUENCE_OF_ANY}
-
-//+-------------------------------------------------------------------------
-// Predefined primitive data structures that can be encoded / decoded.
-//--------------------------------------------------------------------------
-
- X509_UNICODE_NAME_VALUE = LPCSTR(24);
- {$EXTERNALSYM X509_UNICODE_NAME_VALUE}
- X509_ANY_STRING = X509_NAME_VALUE;
- {$EXTERNALSYM X509_ANY_STRING}
- X509_UNICODE_ANY_STRING = X509_UNICODE_NAME_VALUE;
- {$EXTERNALSYM X509_UNICODE_ANY_STRING}
- X509_OCTET_STRING = LPCSTR(25);
- {$EXTERNALSYM X509_OCTET_STRING}
- X509_BITS = LPCSTR(26);
- {$EXTERNALSYM X509_BITS}
- X509_INTEGER = LPCSTR(27);
- {$EXTERNALSYM X509_INTEGER}
- X509_MULTI_BYTE_INTEGER = LPCSTR(28);
- {$EXTERNALSYM X509_MULTI_BYTE_INTEGER}
- X509_ENUMERATED = LPCSTR(29);
- {$EXTERNALSYM X509_ENUMERATED}
- X509_CHOICE_OF_TIME = LPCSTR(30);
- {$EXTERNALSYM X509_CHOICE_OF_TIME}
-
-//+-------------------------------------------------------------------------
-// More predefined X509 certificate extension data structures that can be
-// encoded / decoded.
-//--------------------------------------------------------------------------
-
- X509_AUTHORITY_KEY_ID2 = LPCSTR(31);
- {$EXTERNALSYM X509_AUTHORITY_KEY_ID2}
- X509_AUTHORITY_INFO_ACCESS = LPCSTR(32);
- {$EXTERNALSYM X509_AUTHORITY_INFO_ACCESS}
- X509_CRL_REASON_CODE = X509_ENUMERATED;
- {$EXTERNALSYM X509_CRL_REASON_CODE}
- PKCS_CONTENT_INFO = LPCSTR(33);
- {$EXTERNALSYM PKCS_CONTENT_INFO}
- X509_SEQUENCE_OF_ANY = LPCSTR(34);
- {$EXTERNALSYM X509_SEQUENCE_OF_ANY}
- X509_CRL_DIST_POINTS = LPCSTR(35);
- {$EXTERNALSYM X509_CRL_DIST_POINTS}
- X509_ENHANCED_KEY_USAGE = LPCSTR(36);
- {$EXTERNALSYM X509_ENHANCED_KEY_USAGE}
- PKCS_CTL = LPCSTR(37);
- {$EXTERNALSYM PKCS_CTL}
-
- X509_MULTI_BYTE_UINT = LPCSTR(38);
- {$EXTERNALSYM X509_MULTI_BYTE_UINT}
- X509_DSS_PUBLICKEY = X509_MULTI_BYTE_UINT;
- {$EXTERNALSYM X509_DSS_PUBLICKEY}
- X509_DSS_PARAMETERS = LPCSTR(39);
- {$EXTERNALSYM X509_DSS_PARAMETERS}
- X509_DSS_SIGNATURE = LPCSTR(40);
- {$EXTERNALSYM X509_DSS_SIGNATURE}
- PKCS_RC2_CBC_PARAMETERS = LPCSTR(41);
- {$EXTERNALSYM PKCS_RC2_CBC_PARAMETERS}
- PKCS_SMIME_CAPABILITIES = LPCSTR(42);
- {$EXTERNALSYM PKCS_SMIME_CAPABILITIES}
-
-//+-------------------------------------------------------------------------
-// data structures for private keys
-//--------------------------------------------------------------------------
-
- PKCS_RSA_PRIVATE_KEY = LPCSTR(43);
- {$EXTERNALSYM PKCS_RSA_PRIVATE_KEY}
- PKCS_PRIVATE_KEY_INFO = LPCSTR(44);
- {$EXTERNALSYM PKCS_PRIVATE_KEY_INFO}
- PKCS_ENCRYPTED_PRIVATE_KEY_INFO = LPCSTR(45);
- {$EXTERNALSYM PKCS_ENCRYPTED_PRIVATE_KEY_INFO}
-
-//+-------------------------------------------------------------------------
-// certificate policy qualifier
-//--------------------------------------------------------------------------
-
- X509_PKIX_POLICY_QUALIFIER_USERNOTICE = LPCSTR(46);
- {$EXTERNALSYM X509_PKIX_POLICY_QUALIFIER_USERNOTICE}
-
-//+-------------------------------------------------------------------------
-// Diffie-Hellman Key Exchange
-//--------------------------------------------------------------------------
-
- X509_DH_PUBLICKEY = X509_MULTI_BYTE_UINT;
- {$EXTERNALSYM X509_DH_PUBLICKEY}
- X509_DH_PARAMETERS = LPCSTR(47);
- {$EXTERNALSYM X509_DH_PARAMETERS}
- PKCS_ATTRIBUTES = LPCSTR(48);
- {$EXTERNALSYM PKCS_ATTRIBUTES}
- PKCS_SORTED_CTL = LPCSTR(49);
- {$EXTERNALSYM PKCS_SORTED_CTL}
-
-//+-------------------------------------------------------------------------
-// X942 Diffie-Hellman
-//--------------------------------------------------------------------------
-
- X942_DH_PARAMETERS = LPCSTR(50);
- {$EXTERNALSYM X942_DH_PARAMETERS}
-
-//+-------------------------------------------------------------------------
-// The following is the same as X509_BITS, except before encoding,
-// the bit length is decremented to exclude trailing zero bits.
-//--------------------------------------------------------------------------
-
- X509_BITS_WITHOUT_TRAILING_ZEROES = LPCSTR(51);
- {$EXTERNALSYM X509_BITS_WITHOUT_TRAILING_ZEROES}
-
-//+-------------------------------------------------------------------------
-// X942 Diffie-Hellman Other Info
-//--------------------------------------------------------------------------
-
- X942_OTHER_INFO = LPCSTR(52);
- {$EXTERNALSYM X942_OTHER_INFO}
-
-//+-------------------------------------------------------------------------
-// Predefined PKCS #7 data structures that can be encoded / decoded.
-//--------------------------------------------------------------------------
-
- PKCS7_SIGNER_INFO = LPCSTR(500);
- {$EXTERNALSYM PKCS7_SIGNER_INFO}
-
-//+-------------------------------------------------------------------------
-// Predefined PKCS #7 data structures that can be encoded / decoded.
-//--------------------------------------------------------------------------
-
- CMS_SIGNER_INFO = LPCSTR(501);
- {$EXTERNALSYM CMS_SIGNER_INFO}
-
-//+-------------------------------------------------------------------------
-// Predefined Software Publishing Credential (SPC) data structures that
-// can be encoded / decoded.
-//
-// Predefined values: 2000 .. 2999
-//
-// See spc.h for value and data structure definitions.
-//--------------------------------------------------------------------------
-
-//+-------------------------------------------------------------------------
-// Extension Object Identifiers
-//--------------------------------------------------------------------------
-
- szOID_AUTHORITY_KEY_IDENTIFIER = '2.5.29.1';
- {$EXTERNALSYM szOID_AUTHORITY_KEY_IDENTIFIER}
- szOID_KEY_ATTRIBUTES = '2.5.29.2';
- {$EXTERNALSYM szOID_KEY_ATTRIBUTES}
- szOID_CERT_POLICIES_95 = '2.5.29.3';
- {$EXTERNALSYM szOID_CERT_POLICIES_95}
- szOID_KEY_USAGE_RESTRICTION = '2.5.29.4';
- {$EXTERNALSYM szOID_KEY_USAGE_RESTRICTION}
- szOID_SUBJECT_ALT_NAME = '2.5.29.7';
- {$EXTERNALSYM szOID_SUBJECT_ALT_NAME}
- szOID_ISSUER_ALT_NAME = '2.5.29.8';
- {$EXTERNALSYM szOID_ISSUER_ALT_NAME}
- szOID_BASIC_CONSTRAINTS = '2.5.29.10';
- {$EXTERNALSYM szOID_BASIC_CONSTRAINTS}
- szOID_KEY_USAGE = '2.5.29.15';
- {$EXTERNALSYM szOID_KEY_USAGE}
- szOID_PRIVATEKEY_USAGE_PERIOD = '2.5.29.16';
- {$EXTERNALSYM szOID_PRIVATEKEY_USAGE_PERIOD}
- szOID_BASIC_CONSTRAINTS2 = '2.5.29.19';
- {$EXTERNALSYM szOID_BASIC_CONSTRAINTS2}
- szOID_CERT_POLICIES = '2.5.29.32';
- {$EXTERNALSYM szOID_CERT_POLICIES}
-
- szOID_AUTHORITY_KEY_IDENTIFIER2 = '2.5.29.35';
- {$EXTERNALSYM szOID_AUTHORITY_KEY_IDENTIFIER2}
- szOID_SUBJECT_KEY_IDENTIFIER = '2.5.29.14';
- {$EXTERNALSYM szOID_SUBJECT_KEY_IDENTIFIER}
- szOID_SUBJECT_ALT_NAME2 = '2.5.29.17';
- {$EXTERNALSYM szOID_SUBJECT_ALT_NAME2}
- szOID_ISSUER_ALT_NAME2 = '2.5.29.18';
- {$EXTERNALSYM szOID_ISSUER_ALT_NAME2}
- szOID_CRL_REASON_CODE = '2.5.29.21';
- {$EXTERNALSYM szOID_CRL_REASON_CODE}
- szOID_CRL_DIST_POINTS = '2.5.29.31';
- {$EXTERNALSYM szOID_CRL_DIST_POINTS}
- szOID_ENHANCED_KEY_USAGE = '2.5.29.37';
- {$EXTERNALSYM szOID_ENHANCED_KEY_USAGE}
-
-// Microsoft PKCS10 Attributes
-
- szOID_RENEWAL_CERTIFICATE = '1.3.6.1.4.1.311.13.1';
- {$EXTERNALSYM szOID_RENEWAL_CERTIFICATE}
- szOID_ENROLLMENT_NAME_VALUE_PAIR = '1.3.6.1.4.1.311.13.2.1';
- {$EXTERNALSYM szOID_ENROLLMENT_NAME_VALUE_PAIR}
- szOID_ENROLLMENT_CSP_PROVIDER = '1.3.6.1.4.1.311.13.2.2';
- {$EXTERNALSYM szOID_ENROLLMENT_CSP_PROVIDER}
- szOID_OS_VERSION = '1.3.6.1.4.1.311.13.2.3';
- {$EXTERNALSYM szOID_OS_VERSION}
-
-//
-// Extension contain certificate type
-
- szOID_ENROLLMENT_AGENT = '1.3.6.1.4.1.311.20.2.1';
- {$EXTERNALSYM szOID_ENROLLMENT_AGENT}
-
-// Internet Public Key Infrastructure (PKIX)
-
- szOID_PKIX = '1.3.6.1.5.5.7';
- {$EXTERNALSYM szOID_PKIX}
- szOID_PKIX_PE = '1.3.6.1.5.5.7.1';
- {$EXTERNALSYM szOID_PKIX_PE}
- szOID_AUTHORITY_INFO_ACCESS = '1.3.6.1.5.5.7.1.1';
- {$EXTERNALSYM szOID_AUTHORITY_INFO_ACCESS}
-
-// Microsoft extensions or attributes
-
- szOID_CERT_EXTENSIONS = '1.3.6.1.4.1.311.2.1.14';
- {$EXTERNALSYM szOID_CERT_EXTENSIONS}
- szOID_NEXT_UPDATE_LOCATION = '1.3.6.1.4.1.311.10.2';
- {$EXTERNALSYM szOID_NEXT_UPDATE_LOCATION}
-
-// Microsoft PKCS #7 ContentType Object Identifiers
-
- szOID_CTL = '1.3.6.1.4.1.311.10.1';
- {$EXTERNALSYM szOID_CTL}
-
-// Microsoft Sorted CTL Extension Object Identifier
-
- szOID_SORTED_CTL = '1.3.6.1.4.1.311.10.1.1';
- {$EXTERNALSYM szOID_SORTED_CTL}
-
-// serialized serial numbers for PRS
-
- szOID_SERIALIZED = '1.3.6.1.4.1.311.10.3.3.1';
- {$EXTERNALSYM szOID_SERIALIZED}
-
-// UPN principal name in SubjectAltName
-
- szOID_NT_PRINCIPAL_NAME = '1.3.6.1.4.1.311.20.2.3';
- {$EXTERNALSYM szOID_NT_PRINCIPAL_NAME}
-
-// Windows product update unauthenticated attribute
-
- szOID_PRODUCT_UPDATE = '1.3.6.1.4.1.311.31.1';
- {$EXTERNALSYM szOID_PRODUCT_UPDATE}
-
-//+-------------------------------------------------------------------------
-// Object Identifiers for use with Auto Enrollment
-//--------------------------------------------------------------------------
-
- szOID_AUTO_ENROLL_CTL_USAGE = '1.3.6.1.4.1.311.20.1';
- {$EXTERNALSYM szOID_AUTO_ENROLL_CTL_USAGE}
-
-// Extension contain certificate type
-
- szOID_ENROLL_CERTTYPE_EXTENSION = '1.3.6.1.4.1.311.20.2';
- {$EXTERNALSYM szOID_ENROLL_CERTTYPE_EXTENSION}
-
- szOID_CERT_MANIFOLD = '1.3.6.1.4.1.311.20.3';
- {$EXTERNALSYM szOID_CERT_MANIFOLD}
-
-//+-------------------------------------------------------------------------
-// Object Identifiers for use with the MS Certificate Server
-//--------------------------------------------------------------------------
-
- szOID_CERTSRV_CA_VERSION = '1.3.6.1.4.1.311.21.1';
- {$EXTERNALSYM szOID_CERTSRV_CA_VERSION}
-
-//+-------------------------------------------------------------------------
-// Object Identifiers for use with the MS Directory Service
-//--------------------------------------------------------------------------
-
- szOID_NTDS_REPLICATION = '1.3.6.1.4.1.311.25.1';
- {$EXTERNALSYM szOID_NTDS_REPLICATION}
-
-//+-------------------------------------------------------------------------
-// Extension Object Identifiers (currently not implemented)
-//--------------------------------------------------------------------------
-
- szOID_POLICY_MAPPINGS = '2.5.29.5';
- {$EXTERNALSYM szOID_POLICY_MAPPINGS}
- szOID_SUBJECT_DIR_ATTRS = '2.5.29.9';
- {$EXTERNALSYM szOID_SUBJECT_DIR_ATTRS}
-
-//+-------------------------------------------------------------------------
-// Enhanced Key Usage (Purpose) Object Identifiers
-//--------------------------------------------------------------------------
-
- szOID_PKIX_KP = '1.3.6.1.5.5.7.3';
- {$EXTERNALSYM szOID_PKIX_KP}
-
-// Consistent key usage bits: DIGITAL_SIGNATURE, KEY_ENCIPHERMENT
-// or KEY_AGREEMENT
-
- szOID_PKIX_KP_SERVER_AUTH = '1.3.6.1.5.5.7.3.1';
- {$EXTERNALSYM szOID_PKIX_KP_SERVER_AUTH}
-
-// Consistent key usage bits: DIGITAL_SIGNATURE
-
- szOID_PKIX_KP_CLIENT_AUTH = '1.3.6.1.5.5.7.3.2';
- {$EXTERNALSYM szOID_PKIX_KP_CLIENT_AUTH}
-
-// Consistent key usage bits: DIGITAL_SIGNATURE
-
- szOID_PKIX_KP_CODE_SIGNING = '1.3.6.1.5.5.7.3.3';
- {$EXTERNALSYM szOID_PKIX_KP_CODE_SIGNING}
-
-// Consistent key usage bits: DIGITAL_SIGNATURE, NON_REPUDIATION and/or
-// (KEY_ENCIPHERMENT or KEY_AGREEMENT)
-
- szOID_PKIX_KP_EMAIL_PROTECTION = '1.3.6.1.5.5.7.3.4';
- {$EXTERNALSYM szOID_PKIX_KP_EMAIL_PROTECTION}
-
-// Consistent key usage bits: DIGITAL_SIGNATURE and/or
-// (KEY_ENCIPHERMENT or KEY_AGREEMENT)
-
- szOID_PKIX_KP_IPSEC_END_SYSTEM = '1.3.6.1.5.5.7.3.5';
- {$EXTERNALSYM szOID_PKIX_KP_IPSEC_END_SYSTEM}
-
-// Consistent key usage bits: DIGITAL_SIGNATURE and/or
-// (KEY_ENCIPHERMENT or KEY_AGREEMENT)
-
- szOID_PKIX_KP_IPSEC_TUNNEL = '1.3.6.1.5.5.7.3.6';
- {$EXTERNALSYM szOID_PKIX_KP_IPSEC_TUNNEL}
-
-// Consistent key usage bits: DIGITAL_SIGNATURE and/or
-// (KEY_ENCIPHERMENT or KEY_AGREEMENT)
-
- szOID_PKIX_KP_IPSEC_USER = '1.3.6.1.5.5.7.3.7';
- {$EXTERNALSYM szOID_PKIX_KP_IPSEC_USER}
-
-// Consistent key usage bits: DIGITAL_SIGNATURE or NON_REPUDIATION
-
- szOID_PKIX_KP_TIMESTAMP_SIGNING = '1.3.6.1.5.5.7.3.8';
- {$EXTERNALSYM szOID_PKIX_KP_TIMESTAMP_SIGNING}
-
-//+-------------------------------------------------------------------------
-// Microsoft Enhanced Key Usage (Purpose) Object Identifiers
-//+-------------------------------------------------------------------------
-
-// Signer of CTLs
-
- szOID_KP_CTL_USAGE_SIGNING = '1.3.6.1.4.1.311.10.3.1';
- {$EXTERNALSYM szOID_KP_CTL_USAGE_SIGNING}
-
-// Signer of TimeStamps
-
- szOID_KP_TIME_STAMP_SIGNING = '1.3.6.1.4.1.311.10.3.2';
- {$EXTERNALSYM szOID_KP_TIME_STAMP_SIGNING}
-
- szOID_SERVER_GATED_CRYPTO = '1.3.6.1.4.1.311.10.3.3';
- {$EXTERNALSYM szOID_SERVER_GATED_CRYPTO}
-
- szOID_SGC_NETSCAPE = '2.16.840.1.113730.4.1';
- {$EXTERNALSYM szOID_SGC_NETSCAPE}
-
- szOID_KP_EFS = '1.3.6.1.4.1.311.10.3.4';
- {$EXTERNALSYM szOID_KP_EFS}
-
-// Can use Windows Hardware Compatible (WHQL)
-
- szOID_WHQL_CRYPTO = '1.3.6.1.4.1.311.10.3.5';
- {$EXTERNALSYM szOID_WHQL_CRYPTO}
-
-// Signed by the NT5 build lab
-
- szOID_NT5_CRYPTO = '1.3.6.1.4.1.311.10.3.6';
- {$EXTERNALSYM szOID_NT5_CRYPTO}
-
-// Signed by and OEM of WHQL
-
- szOID_OEM_WHQL_CRYPTO = '1.3.6.1.4.1.311.10.3.7';
- {$EXTERNALSYM szOID_OEM_WHQL_CRYPTO}
-
-// Signed by the Embedded NT
-
- szOID_EMBEDDED_NT_CRYPTO = '1.3.6.1.4.1.311.10.3.8';
- {$EXTERNALSYM szOID_EMBEDDED_NT_CRYPTO}
-
- szOID_DRM = '1.3.6.1.4.1.311.10.5.1';
- {$EXTERNALSYM szOID_DRM}
-
- szOID_LICENSES = '1.3.6.1.4.1.311.10.6.1';
- {$EXTERNALSYM szOID_LICENSES}
-
- szOID_LICENSE_SERVER = '1.3.6.1.4.1.311.10.6.2';
- {$EXTERNALSYM szOID_LICENSE_SERVER}
-
- szOID_KP_SMARTCARD_LOGON = '1.3.6.1.4.1.311.20.2.2';
- {$EXTERNALSYM szOID_KP_SMARTCARD_LOGON}
-
-//+-------------------------------------------------------------------------
-// Microsoft Attribute Object Identifiers
-//+-------------------------------------------------------------------------
-
- szOID_YESNO_TRUST_ATTR = '1.3.6.1.4.1.311.10.4.1';
- {$EXTERNALSYM szOID_YESNO_TRUST_ATTR}
-
-//+-------------------------------------------------------------------------
-// Qualifiers that may be part of the szOID_CERT_POLICIES and
-// szOID_CERT_POLICIES95 extensions
-//+-------------------------------------------------------------------------
-
- szOID_PKIX_POLICY_QUALIFIER_CPS = '1.3.6.1.5.5.7.2.1';
- {$EXTERNALSYM szOID_PKIX_POLICY_QUALIFIER_CPS}
- szOID_PKIX_POLICY_QUALIFIER_USERNOTICE = '1.3.6.1.5.5.7.2.2';
- {$EXTERNALSYM szOID_PKIX_POLICY_QUALIFIER_USERNOTICE}
-
-// OID for old qualifer
-
- szOID_CERT_POLICIES_95_QUALIFIER1 = '2.16.840.1.113733.1.7.1.1';
- {$EXTERNALSYM szOID_CERT_POLICIES_95_QUALIFIER1}
-
-//+-------------------------------------------------------------------------
-// X509_CERT
-//
-// The "to be signed" encoded content plus its signature. The ToBeSigned
-// content is the CryptEncodeObject() output for one of the following:
-// X509_CERT_TO_BE_SIGNED, X509_CERT_CRL_TO_BE_SIGNED or
-// X509_CERT_REQUEST_TO_BE_SIGNED.
-//
-// pvStructInfo points to CERT_SIGNED_CONTENT_INFO.
-//--------------------------------------------------------------------------
-
-//+-------------------------------------------------------------------------
-// X509_CERT_TO_BE_SIGNED
-//
-// pvStructInfo points to CERT_INFO.
-//
-// For CryptDecodeObject(), the pbEncoded is the "to be signed" plus its
-// signature (output of a X509_CERT CryptEncodeObject()).
-//
-// For CryptEncodeObject(), the pbEncoded is just the "to be signed".
-//--------------------------------------------------------------------------
-
-//+-------------------------------------------------------------------------
-// X509_CERT_CRL_TO_BE_SIGNED
-//
-// pvStructInfo points to CRL_INFO.
-//
-// For CryptDecodeObject(), the pbEncoded is the "to be signed" plus its
-// signature (output of a X509_CERT CryptEncodeObject()).
-//
-// For CryptEncodeObject(), the pbEncoded is just the "to be signed".
-//--------------------------------------------------------------------------
-
-//+-------------------------------------------------------------------------
-// X509_CERT_REQUEST_TO_BE_SIGNED
-//
-// pvStructInfo points to CERT_REQUEST_INFO.
-//
-// For CryptDecodeObject(), the pbEncoded is the "to be signed" plus its
-// signature (output of a X509_CERT CryptEncodeObject()).
-//
-// For CryptEncodeObject(), the pbEncoded is just the "to be signed".
-//--------------------------------------------------------------------------
-
-//+-------------------------------------------------------------------------
-// X509_EXTENSIONS
-// szOID_CERT_EXTENSIONS
-//
-// pvStructInfo points to following CERT_EXTENSIONS.
-//--------------------------------------------------------------------------
-
-type
- PCERT_EXTENSIONS = ^CERT_EXTENSIONS;
- {$EXTERNALSYM PCERT_EXTENSIONS}
- _CERT_EXTENSIONS = record
- cExtension: DWORD;
- rgExtension: PCERT_EXTENSION;
- end;
- {$EXTERNALSYM _CERT_EXTENSIONS}
- CERT_EXTENSIONS = _CERT_EXTENSIONS;
- {$EXTERNALSYM CERT_EXTENSIONS}
- TCertExtensions = CERT_EXTENSIONS;
- PCertExtensions = PCERT_EXTENSIONS;
-
-//+-------------------------------------------------------------------------
-// X509_NAME_VALUE
-// X509_ANY_STRING
-//
-// pvStructInfo points to CERT_NAME_VALUE.
-//--------------------------------------------------------------------------
-
-//+-------------------------------------------------------------------------
-// X509_UNICODE_NAME_VALUE
-// X509_UNICODE_ANY_STRING
-//
-// pvStructInfo points to CERT_NAME_VALUE.
-//
-// The name values are unicode strings.
-//
-// For CryptEncodeObject:
-// Value.pbData points to the unicode string.
-// If Value.cbData = 0, then, the unicode string is NULL terminated.
-// Otherwise, Value.cbData is the unicode string byte count. The byte count
-// is twice the character count.
-//
-// If the unicode string contains an invalid character for the specified
-// dwValueType, then, *pcbEncoded is updated with the unicode character
-// index of the first invalid character. LastError is set to:
-// CRYPT_E_INVALID_NUMERIC_STRING, CRYPT_E_INVALID_PRINTABLE_STRING or
-// CRYPT_E_INVALID_IA5_STRING.
-//
-// To disable the above check, either set CERT_RDN_DISABLE_CHECK_TYPE_FLAG
-// in dwValueType or set CRYPT_UNICODE_NAME_ENCODE_DISABLE_CHECK_TYPE_FLAG
-// in dwFlags passed to CryptEncodeObjectEx.
-//
-// The unicode string is converted before being encoded according to
-// the specified dwValueType. If dwValueType is set to 0, LastError
-// is set to E_INVALIDARG.
-//
-// If the dwValueType isn't one of the character strings (its a
-// CERT_RDN_ENCODED_BLOB or CERT_RDN_OCTET_STRING), then, CryptEncodeObject
-// will return FALSE with LastError set to CRYPT_E_NOT_CHAR_STRING.
-//
-// For CryptDecodeObject:
-// Value.pbData points to a NULL terminated unicode string. Value.cbData
-// contains the byte count of the unicode string excluding the NULL
-// terminator. dwValueType contains the type used in the encoded object.
-// Its not forced to CERT_RDN_UNICODE_STRING. The encoded value is
-// converted to the unicode string according to the dwValueType.
-//
-// If the encoded object isn't one of the character string types, then,
-// CryptDecodeObject will return FALSE with LastError set to
-// CRYPT_E_NOT_CHAR_STRING. For a non character string, decode using
-// X509_NAME_VALUE or X509_ANY_STRING.
-//
-// By default, CERT_RDN_T61_STRING values are initially decoded
-// as UTF8. If the UTF8 decoding fails, then, decoded as 8 bit characters.
-// Set CRYPT_UNICODE_NAME_DECODE_DISABLE_IE4_UTF8_FLAG in dwFlags
-// passed to either CryptDecodeObject or CryptDecodeObjectEx to
-// skip the initial attempt to decode as UTF8.
-//--------------------------------------------------------------------------
-
-//+-------------------------------------------------------------------------
-// X509_NAME
-//
-// pvStructInfo points to CERT_NAME_INFO.
-//--------------------------------------------------------------------------
-
-//+-------------------------------------------------------------------------
-// X509_UNICODE_NAME
-//
-// pvStructInfo points to CERT_NAME_INFO.
-//
-// The RDN attribute values are unicode strings except for the dwValueTypes of
-// CERT_RDN_ENCODED_BLOB or CERT_RDN_OCTET_STRING. These dwValueTypes are
-// the same as for a X509_NAME. Their values aren't converted to/from unicode.
-//
-// For CryptEncodeObject:
-// Value.pbData points to the unicode string.
-// If Value.cbData = 0, then, the unicode string is NULL terminated.
-// Otherwise, Value.cbData is the unicode string byte count. The byte count
-// is twice the character count.
-//
-// If dwValueType = 0 (CERT_RDN_ANY_TYPE), the pszObjId is used to find
-// an acceptable dwValueType. If the unicode string contains an
-// invalid character for the found or specified dwValueType, then,
-// *pcbEncoded is updated with the error location of the invalid character.
-// See below for details. LastError is set to:
-// CRYPT_E_INVALID_NUMERIC_STRING, CRYPT_E_INVALID_PRINTABLE_STRING or
-// CRYPT_E_INVALID_IA5_STRING.
-//
-// To disable the above check, either set CERT_RDN_DISABLE_CHECK_TYPE_FLAG
-// in dwValueType or set CRYPT_UNICODE_NAME_ENCODE_DISABLE_CHECK_TYPE_FLAG
-// in dwFlags passed to CryptEncodeObjectEx.
-//
-// Set CERT_RDN_UNICODE_STRING in dwValueType or set
-// CRYPT_UNICODE_NAME_ENCODE_ENABLE_T61_UNICODE_FLAG in dwFlags passed
-// to CryptEncodeObjectEx to select CERT_RDN_T61_STRING instead of
-// CERT_RDN_UNICODE_STRING if all the unicode characters are <= 0xFF.
-//
-// Set CERT_RDN_ENABLE_UTF8_UNICODE_STRING in dwValueType or set
-// CRYPT_UNICODE_NAME_ENCODE_ENABLE_UTF8_UNICODE_FLAG in dwFlags passed
-// to CryptEncodeObjectEx to select CERT_RDN_UTF8_STRING instead of
-// CERT_RDN_UNICODE_STRING.
-//
-// The unicode string is converted before being encoded according to
-// the specified or ObjId matching dwValueType.
-//
-// For CryptDecodeObject:
-// Value.pbData points to a NULL terminated unicode string. Value.cbData
-// contains the byte count of the unicode string excluding the NULL
-// terminator. dwValueType contains the type used in the encoded object.
-// Its not forced to CERT_RDN_UNICODE_STRING. The encoded value is
-// converted to the unicode string according to the dwValueType.
-//
-// If the dwValueType of the encoded value isn't a character string
-// type, then, it isn't converted to UNICODE. Use the
-// IS_CERT_RDN_CHAR_STRING() macro on the dwValueType to check
-// that Value.pbData points to a converted unicode string.
-//
-// By default, CERT_RDN_T61_STRING values are initially decoded
-// as UTF8. If the UTF8 decoding fails, then, decoded as 8 bit characters.
-// Set CRYPT_UNICODE_NAME_DECODE_DISABLE_IE4_UTF8_FLAG in dwFlags
-// passed to either CryptDecodeObject or CryptDecodeObjectEx to
-// skip the initial attempt to decode as UTF8.
-//--------------------------------------------------------------------------
-
-//+-------------------------------------------------------------------------
-// Unicode Name Value Error Location Definitions
-//
-// Error location is returned in *pcbEncoded by
-// CryptEncodeObject(X509_UNICODE_NAME)
-//
-// Error location consists of:
-// RDN_INDEX - 10 bits << 22
-// ATTR_INDEX - 6 bits << 16
-// VALUE_INDEX - 16 bits (unicode character index)
-//--------------------------------------------------------------------------
-
-const
- CERT_UNICODE_RDN_ERR_INDEX_MASK = $3FF;
- {$EXTERNALSYM CERT_UNICODE_RDN_ERR_INDEX_MASK}
- CERT_UNICODE_RDN_ERR_INDEX_SHIFT = 22;
- {$EXTERNALSYM CERT_UNICODE_RDN_ERR_INDEX_SHIFT}
- CERT_UNICODE_ATTR_ERR_INDEX_MASK = $003F;
- {$EXTERNALSYM CERT_UNICODE_ATTR_ERR_INDEX_MASK}
- CERT_UNICODE_ATTR_ERR_INDEX_SHIFT = 16;
- {$EXTERNALSYM CERT_UNICODE_ATTR_ERR_INDEX_SHIFT}
- CERT_UNICODE_VALUE_ERR_INDEX_MASK = $0000FFFF;
- {$EXTERNALSYM CERT_UNICODE_VALUE_ERR_INDEX_MASK}
- CERT_UNICODE_VALUE_ERR_INDEX_SHIFT = 0;
- {$EXTERNALSYM CERT_UNICODE_VALUE_ERR_INDEX_SHIFT}
-
-function GET_CERT_UNICODE_RDN_ERR_INDEX(X: DWORD): DWORD;
-{$EXTERNALSYM GET_CERT_UNICODE_RDN_ERR_INDEX}
-
-function GET_CERT_UNICODE_ATTR_ERR_INDEX(X: DWORD): DWORD;
-{$EXTERNALSYM GET_CERT_UNICODE_ATTR_ERR_INDEX}
-
-function GET_CERT_UNICODE_VALUE_ERR_INDEX(X: DWORD): DWORD;
-{$EXTERNALSYM GET_CERT_UNICODE_VALUE_ERR_INDEX}
-
-//+-------------------------------------------------------------------------
-// X509_PUBLIC_KEY_INFO
-//
-// pvStructInfo points to CERT_PUBLIC_KEY_INFO.
-//--------------------------------------------------------------------------
-
-//+-------------------------------------------------------------------------
-// X509_AUTHORITY_KEY_ID
-// szOID_AUTHORITY_KEY_IDENTIFIER
-//
-// pvStructInfo points to following CERT_AUTHORITY_KEY_ID_INFO.
-//--------------------------------------------------------------------------
-
-type
- PCERT_AUTHORITY_KEY_ID_INFO = ^CERT_AUTHORITY_KEY_ID_INFO;
- {$EXTERNALSYM PCERT_AUTHORITY_KEY_ID_INFO}
- _CERT_AUTHORITY_KEY_ID_INFO = record
- KeyId: CRYPT_DATA_BLOB;
- CertIssuer: CERT_NAME_BLOB;
- CertSerialNumber: CRYPT_INTEGER_BLOB;
- end;
- {$EXTERNALSYM _CERT_AUTHORITY_KEY_ID_INFO}
- CERT_AUTHORITY_KEY_ID_INFO = _CERT_AUTHORITY_KEY_ID_INFO;
- {$EXTERNALSYM CERT_AUTHORITY_KEY_ID_INFO}
- TCertAuthorityKeyIdInfo = CERT_AUTHORITY_KEY_ID_INFO;
- PCertAuthorityKeyIdInfo = PCERT_AUTHORITY_KEY_ID_INFO;
-
-//+-------------------------------------------------------------------------
-// X509_KEY_ATTRIBUTES
-// szOID_KEY_ATTRIBUTES
-//
-// pvStructInfo points to following CERT_KEY_ATTRIBUTES_INFO.
-//--------------------------------------------------------------------------
-
- PCERT_PRIVATE_KEY_VALIDITY = ^CERT_PRIVATE_KEY_VALIDITY;
- {$EXTERNALSYM PCERT_PRIVATE_KEY_VALIDITY}
- _CERT_PRIVATE_KEY_VALIDITY = record
- NotBefore: FILETIME;
- NotAfter: FILETIME;
- end;
- {$EXTERNALSYM _CERT_PRIVATE_KEY_VALIDITY}
- CERT_PRIVATE_KEY_VALIDITY = _CERT_PRIVATE_KEY_VALIDITY;
- {$EXTERNALSYM CERT_PRIVATE_KEY_VALIDITY}
- TCertPrivateKeyValidity = CERT_PRIVATE_KEY_VALIDITY;
- PCertPrivateKeyValidity = PCERT_PRIVATE_KEY_VALIDITY;
-
- PCERT_KEY_ATTRIBUTES_INFO = ^CERT_KEY_ATTRIBUTES_INFO;
- {$EXTERNALSYM PCERT_KEY_ATTRIBUTES_INFO}
- _CERT_KEY_ATTRIBUTES_INFO = record
- KeyId: CRYPT_DATA_BLOB;
- IntendedKeyUsage: CRYPT_BIT_BLOB;
- pPrivateKeyUsagePeriod: PCERT_PRIVATE_KEY_VALIDITY; // OPTIONAL
- end;
- {$EXTERNALSYM _CERT_KEY_ATTRIBUTES_INFO}
- CERT_KEY_ATTRIBUTES_INFO = _CERT_KEY_ATTRIBUTES_INFO;
- {$EXTERNALSYM CERT_KEY_ATTRIBUTES_INFO}
- TCertKeyAttributesInfo = CERT_KEY_ATTRIBUTES_INFO;
- PCertKeyAttributesInfo = PCERT_KEY_ATTRIBUTES_INFO;
-
-// Byte[0]
-
-const
- CERT_DIGITAL_SIGNATURE_KEY_USAGE = $80;
- {$EXTERNALSYM CERT_DIGITAL_SIGNATURE_KEY_USAGE}
- CERT_NON_REPUDIATION_KEY_USAGE = $40;
- {$EXTERNALSYM CERT_NON_REPUDIATION_KEY_USAGE}
- CERT_KEY_ENCIPHERMENT_KEY_USAGE = $20;
- {$EXTERNALSYM CERT_KEY_ENCIPHERMENT_KEY_USAGE}
- CERT_DATA_ENCIPHERMENT_KEY_USAGE = $10;
- {$EXTERNALSYM CERT_DATA_ENCIPHERMENT_KEY_USAGE}
- CERT_KEY_AGREEMENT_KEY_USAGE = $08;
- {$EXTERNALSYM CERT_KEY_AGREEMENT_KEY_USAGE}
- CERT_KEY_CERT_SIGN_KEY_USAGE = $04;
- {$EXTERNALSYM CERT_KEY_CERT_SIGN_KEY_USAGE}
- CERT_OFFLINE_CRL_SIGN_KEY_USAGE = $02;
- {$EXTERNALSYM CERT_OFFLINE_CRL_SIGN_KEY_USAGE}
- CERT_CRL_SIGN_KEY_USAGE = $02;
- {$EXTERNALSYM CERT_CRL_SIGN_KEY_USAGE}
- CERT_ENCIPHER_ONLY_KEY_USAGE = $01;
- {$EXTERNALSYM CERT_ENCIPHER_ONLY_KEY_USAGE}
-
-// Byte[1]
-
- CERT_DECIPHER_ONLY_KEY_USAGE = $80;
- {$EXTERNALSYM CERT_DECIPHER_ONLY_KEY_USAGE}
-
-//+-------------------------------------------------------------------------
-// X509_KEY_USAGE_RESTRICTION
-// szOID_KEY_USAGE_RESTRICTION
-//
-// pvStructInfo points to following CERT_KEY_USAGE_RESTRICTION_INFO.
-//--------------------------------------------------------------------------
-
-type
- PCERT_POLICY_ID = ^CERT_POLICY_ID;
- {$EXTERNALSYM PCERT_POLICY_ID}
- _CERT_POLICY_ID = record
- cCertPolicyElementId: DWORD;
- rgpszCertPolicyElementId: LPSTR; // pszObjId
- end;
- {$EXTERNALSYM _CERT_POLICY_ID}
- CERT_POLICY_ID = _CERT_POLICY_ID;
- {$EXTERNALSYM CERT_POLICY_ID}
- TCertPolicyId = CERT_POLICY_ID;
- PCertPolicyId = PCERT_POLICY_ID;
-
- PCERT_KEY_USAGE_RESTRICTION_INFO = ^CERT_KEY_USAGE_RESTRICTION_INFO;
- {$EXTERNALSYM PCERT_KEY_USAGE_RESTRICTION_INFO}
- _CERT_KEY_USAGE_RESTRICTION_INFO = record
- cCertPolicyId: DWORD;
- rgCertPolicyId: PCERT_POLICY_ID;
- RestrictedKeyUsage: CRYPT_BIT_BLOB;
- end;
- {$EXTERNALSYM _CERT_KEY_USAGE_RESTRICTION_INFO}
- CERT_KEY_USAGE_RESTRICTION_INFO = _CERT_KEY_USAGE_RESTRICTION_INFO;
- {$EXTERNALSYM CERT_KEY_USAGE_RESTRICTION_INFO}
- TCertKeyUsageRestrictionInfo = CERT_KEY_USAGE_RESTRICTION_INFO;
- PCertKeyUsageRestrictionInfo = PCERT_KEY_USAGE_RESTRICTION_INFO;
-
-// See CERT_KEY_ATTRIBUTES_INFO for definition of the RestrictedKeyUsage bits
-
-//+-------------------------------------------------------------------------
-// X509_ALTERNATE_NAME
-// szOID_SUBJECT_ALT_NAME
-// szOID_ISSUER_ALT_NAME
-// szOID_SUBJECT_ALT_NAME2
-// szOID_ISSUER_ALT_NAME2
-//
-// pvStructInfo points to following CERT_ALT_NAME_INFO.
-//--------------------------------------------------------------------------
-
- PCERT_OTHER_NAME = ^CERT_OTHER_NAME;
- {$EXTERNALSYM PCERT_OTHER_NAME}
- _CERT_OTHER_NAME = record
- pszObjId: LPSTR;
- Value: CRYPT_OBJID_BLOB;
- end;
- {$EXTERNALSYM _CERT_OTHER_NAME}
- CERT_OTHER_NAME = _CERT_OTHER_NAME;
- {$EXTERNALSYM CERT_OTHER_NAME}
- TCertOtherName = CERT_OTHER_NAME;
- PCertOtherName = PCERT_OTHER_NAME;
-
- PCERT_ALT_NAME_ENTRY = ^CERT_ALT_NAME_ENTRY;
- {$EXTERNALSYM PCERT_ALT_NAME_ENTRY}
- _CERT_ALT_NAME_ENTRY = record
- dwAltNameChoice: DWORD;
- //union {
- case Integer of
- 0: (pOtherName: PCERT_OTHER_NAME); // 1
- 1: (pwszRfc822Name: LPWSTR); // 2 (encoded IA5)
- 2: (pwszDNSName: LPWSTR); // 3 (encoded IA5)
- 3: ();// Not implemented x400Address; // 4
- 4: (DirectoryName: CERT_NAME_BLOB); // 5
- 5: ();// Not implemented pEdiPartyName; // 6
- 6: (pwszURL: LPWSTR); // 7 (encoded IA5)
- 7: (IPAddress: CRYPT_DATA_BLOB); // 8 (Octet String)
- 8: (pszRegisteredID: LPSTR); // 9 (Object Identifer)
- end;
- {$EXTERNALSYM _CERT_ALT_NAME_ENTRY}
- CERT_ALT_NAME_ENTRY = _CERT_ALT_NAME_ENTRY;
- {$EXTERNALSYM CERT_ALT_NAME_ENTRY}
- TCertAltNameEntry = CERT_ALT_NAME_ENTRY;
- PCertAltNameEntry = PCERT_ALT_NAME_ENTRY;
-
-const
- CERT_ALT_NAME_OTHER_NAME = 1;
- {$EXTERNALSYM CERT_ALT_NAME_OTHER_NAME}
- CERT_ALT_NAME_RFC822_NAME = 2;
- {$EXTERNALSYM CERT_ALT_NAME_RFC822_NAME}
- CERT_ALT_NAME_DNS_NAME = 3;
- {$EXTERNALSYM CERT_ALT_NAME_DNS_NAME}
- CERT_ALT_NAME_X400_ADDRESS = 4;
- {$EXTERNALSYM CERT_ALT_NAME_X400_ADDRESS}
- CERT_ALT_NAME_DIRECTORY_NAME = 5;
- {$EXTERNALSYM CERT_ALT_NAME_DIRECTORY_NAME}
- CERT_ALT_NAME_EDI_PARTY_NAME = 6;
- {$EXTERNALSYM CERT_ALT_NAME_EDI_PARTY_NAME}
- CERT_ALT_NAME_URL = 7;
- {$EXTERNALSYM CERT_ALT_NAME_URL}
- CERT_ALT_NAME_IP_ADDRESS = 8;
- {$EXTERNALSYM CERT_ALT_NAME_IP_ADDRESS}
- CERT_ALT_NAME_REGISTERED_ID = 9;
- {$EXTERNALSYM CERT_ALT_NAME_REGISTERED_ID}
-
-type
- PCERT_ALT_NAME_INFO = ^CERT_ALT_NAME_INFO;
- {$EXTERNALSYM PCERT_ALT_NAME_INFO}
- _CERT_ALT_NAME_INFO = record
- cAltEntry: DWORD;
- rgAltEntry: PCERT_ALT_NAME_ENTRY;
- end;
- {$EXTERNALSYM _CERT_ALT_NAME_INFO}
- CERT_ALT_NAME_INFO = _CERT_ALT_NAME_INFO;
- {$EXTERNALSYM CERT_ALT_NAME_INFO}
- TCertAltNameInfo = CERT_ALT_NAME_INFO;
- PCertAltNameInfo = PCERT_ALT_NAME_INFO;
-
-//+-------------------------------------------------------------------------
-// Alternate name IA5 Error Location Definitions for
-// CRYPT_E_INVALID_IA5_STRING.
-//
-// Error location is returned in *pcbEncoded by
-// CryptEncodeObject(X509_ALTERNATE_NAME)
-//
-// Error location consists of:
-// ENTRY_INDEX - 8 bits << 16
-// VALUE_INDEX - 16 bits (unicode character index)
-//--------------------------------------------------------------------------
-
-const
- CERT_ALT_NAME_ENTRY_ERR_INDEX_MASK = $FF;
- {$EXTERNALSYM CERT_ALT_NAME_ENTRY_ERR_INDEX_MASK}
- CERT_ALT_NAME_ENTRY_ERR_INDEX_SHIFT = 16;
- {$EXTERNALSYM CERT_ALT_NAME_ENTRY_ERR_INDEX_SHIFT}
- CERT_ALT_NAME_VALUE_ERR_INDEX_MASK = $0000FFFF;
- {$EXTERNALSYM CERT_ALT_NAME_VALUE_ERR_INDEX_MASK}
- CERT_ALT_NAME_VALUE_ERR_INDEX_SHIFT = 0;
- {$EXTERNALSYM CERT_ALT_NAME_VALUE_ERR_INDEX_SHIFT}
-
-function GET_CERT_ALT_NAME_ENTRY_ERR_INDEX(X: DWORD): DWORD;
-{$EXTERNALSYM GET_CERT_ALT_NAME_ENTRY_ERR_INDEX}
-
-function GET_CERT_ALT_NAME_VALUE_ERR_INDEX(X: DWORD): DWORD;
-{$EXTERNALSYM GET_CERT_ALT_NAME_VALUE_ERR_INDEX}
-
-//+-------------------------------------------------------------------------
-// X509_BASIC_CONSTRAINTS
-// szOID_BASIC_CONSTRAINTS
-//
-// pvStructInfo points to following CERT_BASIC_CONSTRAINTS_INFO.
-//--------------------------------------------------------------------------
-
-type
- PCERT_BASIC_CONSTRAINTS_INFO = ^CERT_BASIC_CONSTRAINTS_INFO;
- {$EXTERNALSYM PCERT_BASIC_CONSTRAINTS_INFO}
- _CERT_BASIC_CONSTRAINTS_INFO = record
- SubjectType: CRYPT_BIT_BLOB;
- fPathLenConstraint: BOOL;
- dwPathLenConstraint: DWORD;
- cSubtreesConstraint: DWORD;
- rgSubtreesConstraint: PCERT_NAME_BLOB;
- end;
- {$EXTERNALSYM _CERT_BASIC_CONSTRAINTS_INFO}
- CERT_BASIC_CONSTRAINTS_INFO = _CERT_BASIC_CONSTRAINTS_INFO;
- {$EXTERNALSYM CERT_BASIC_CONSTRAINTS_INFO}
- TCertBasicConstraintsInfo = CERT_BASIC_CONSTRAINTS_INFO;
- PCertBasicConstraintsInfo = PCERT_BASIC_CONSTRAINTS_INFO;
-
-const
- CERT_CA_SUBJECT_FLAG = $80;
- {$EXTERNALSYM CERT_CA_SUBJECT_FLAG}
- CERT_END_ENTITY_SUBJECT_FLAG = $40;
- {$EXTERNALSYM CERT_END_ENTITY_SUBJECT_FLAG}
-
-//+-------------------------------------------------------------------------
-// X509_BASIC_CONSTRAINTS2
-// szOID_BASIC_CONSTRAINTS2
-//
-// pvStructInfo points to following CERT_BASIC_CONSTRAINTS2_INFO.
-//--------------------------------------------------------------------------
-
-type
- PCERT_BASIC_CONSTRAINTS2_INFO = ^CERT_BASIC_CONSTRAINTS2_INFO;
- {$EXTERNALSYM PCERT_BASIC_CONSTRAINTS2_INFO}
- _CERT_BASIC_CONSTRAINTS2_INFO = record
- fCA: BOOL;
- fPathLenConstraint: BOOL;
- dwPathLenConstraint: DWORD;
- end;
- {$EXTERNALSYM _CERT_BASIC_CONSTRAINTS2_INFO}
- CERT_BASIC_CONSTRAINTS2_INFO = _CERT_BASIC_CONSTRAINTS2_INFO;
- {$EXTERNALSYM CERT_BASIC_CONSTRAINTS2_INFO}
- TCertBasicConstraints2Info = CERT_BASIC_CONSTRAINTS2_INFO;
- PCertBasicConstraints2Info = PCERT_BASIC_CONSTRAINTS2_INFO;
-
-//+-------------------------------------------------------------------------
-// X509_KEY_USAGE
-// szOID_KEY_USAGE
-//
-// pvStructInfo points to a CRYPT_BIT_BLOB. Has same bit definitions as
-// CERT_KEY_ATTRIBUTES_INFO's IntendedKeyUsage.
-//--------------------------------------------------------------------------
-
-//+-------------------------------------------------------------------------
-// X509_CERT_POLICIES
-// szOID_CERT_POLICIES
-// szOID_CERT_POLICIES_95 NOTE--Only allowed for decoding!!!
-//
-// pvStructInfo points to following CERT_POLICIES_INFO.
-//
-// NOTE: when decoding using szOID_CERT_POLICIES_95 the pszPolicyIdentifier
-// may contain an empty string
-//--------------------------------------------------------------------------
-
- PCERT_POLICY_QUALIFIER_INFO = ^CERT_POLICY_QUALIFIER_INFO;
- {$EXTERNALSYM PCERT_POLICY_QUALIFIER_INFO}
- _CERT_POLICY_QUALIFIER_INFO = record
- pszPolicyQualifierId: LPSTR; // pszObjId
- Qualifier: CRYPT_OBJID_BLOB; // optional
- end;
- {$EXTERNALSYM _CERT_POLICY_QUALIFIER_INFO}
- CERT_POLICY_QUALIFIER_INFO = _CERT_POLICY_QUALIFIER_INFO;
- {$EXTERNALSYM CERT_POLICY_QUALIFIER_INFO}
- TCertPolicyQualifierInfo = CERT_POLICY_QUALIFIER_INFO;
- PCertPolicyQualifierInfo = PCERT_POLICY_QUALIFIER_INFO;
-
- PCERT_POLICY_INFO = ^CERT_POLICY_INFO;
- {$EXTERNALSYM PCERT_POLICY_INFO}
- _CERT_POLICY_INFO = record
- pszPolicyIdentifier: LPSTR; // pszObjId
- cPolicyQualifier: DWORD; // optional
- rgPolicyQualifier: PCERT_POLICY_QUALIFIER_INFO;
- end;
- {$EXTERNALSYM _CERT_POLICY_INFO}
- CERT_POLICY_INFO = _CERT_POLICY_INFO;
- {$EXTERNALSYM CERT_POLICY_INFO}
- TCertPolicyInfo = CERT_POLICY_INFO;
- PCertPolicyInfo = PCERT_POLICY_INFO;
-
- PCERT_POLICIES_INFO = ^CERT_POLICIES_INFO;
- {$EXTERNALSYM PCERT_POLICIES_INFO}
- _CERT_POLICIES_INFO = record
- cPolicyInfo: DWORD;
- rgPolicyInfo: PCERT_POLICY_INFO;
- end;
- {$EXTERNALSYM _CERT_POLICIES_INFO}
- CERT_POLICIES_INFO = _CERT_POLICIES_INFO;
- {$EXTERNALSYM CERT_POLICIES_INFO}
- TCertPoliciesInfo = CERT_POLICIES_INFO;
- PCertPoliciesInfo = PCERT_POLICIES_INFO;
-
-//+-------------------------------------------------------------------------
-// X509_PKIX_POLICY_QUALIFIER_USERNOTICE
-// szOID_PKIX_POLICY_QUALIFIER_USERNOTICE
-//
-// pvStructInfo points to following CERT_POLICY_QUALIFIER_USER_NOTICE.
-//
-//--------------------------------------------------------------------------
-
- PCERT_POLICY_QUALIFIER_NOTICE_REFERENCE = ^CERT_POLICY_QUALIFIER_NOTICE_REFERENCE;
- {$EXTERNALSYM PCERT_POLICY_QUALIFIER_NOTICE_REFERENCE}
- _CERT_POLICY_QUALIFIER_NOTICE_REFERENCE = record
- pszOrganization: LPSTR;
- cNoticeNumbers: DWORD;
- rgNoticeNumbers: LPINT;
- end;
- {$EXTERNALSYM _CERT_POLICY_QUALIFIER_NOTICE_REFERENCE}
- CERT_POLICY_QUALIFIER_NOTICE_REFERENCE = _CERT_POLICY_QUALIFIER_NOTICE_REFERENCE;
- {$EXTERNALSYM CERT_POLICY_QUALIFIER_NOTICE_REFERENCE}
- TCertPolicyQualifierNoticeReference = CERT_POLICY_QUALIFIER_NOTICE_REFERENCE;
- PCertPolicyQualifierNoticeReference = PCERT_POLICY_QUALIFIER_NOTICE_REFERENCE;
-
- PCERT_POLICY_QUALIFIER_USER_NOTICE = ^CERT_POLICY_QUALIFIER_USER_NOTICE;
- {$EXTERNALSYM PCERT_POLICY_QUALIFIER_USER_NOTICE}
- _CERT_POLICY_QUALIFIER_USER_NOTICE = record
- pNoticeReference: PCERT_POLICY_QUALIFIER_NOTICE_REFERENCE; // optional
- pszDisplayText: LPWSTR; // optional
- end;
- {$EXTERNALSYM _CERT_POLICY_QUALIFIER_USER_NOTICE}
- CERT_POLICY_QUALIFIER_USER_NOTICE = _CERT_POLICY_QUALIFIER_USER_NOTICE;
- {$EXTERNALSYM CERT_POLICY_QUALIFIER_USER_NOTICE}
- TCertPolicyQualifierUserNotice = CERT_POLICY_QUALIFIER_USER_NOTICE;
- PCertPolicyQualifierUserNotice = PCERT_POLICY_QUALIFIER_USER_NOTICE;
-
-//+-------------------------------------------------------------------------
-// szOID_CERT_POLICIES_95_QUALIFIER1 - Decode Only!!!!
-//
-// pvStructInfo points to following CERT_POLICY95_QUALIFIER1.
-//
-//--------------------------------------------------------------------------
-
- PCPS_URLS = ^CPS_URLS;
- {$EXTERNALSYM PCPS_URLS}
- _CPS_URLS = record
- pszURL: LPWSTR;
- pAlgorithm: PCRYPT_ALGORITHM_IDENTIFIER; // optional
- pDigest: PCRYPT_DATA_BLOB; // optional
- end;
- {$EXTERNALSYM _CPS_URLS}
- CPS_URLS = _CPS_URLS;
- {$EXTERNALSYM CPS_URLS}
- TCpsUrls = CPS_URLS;
- PCpsUrls = PCPS_URLS;
-
- PCERT_POLICY95_QUALIFIER1 = ^CERT_POLICY95_QUALIFIER1;
- {$EXTERNALSYM PCERT_POLICY95_QUALIFIER1}
- _CERT_POLICY95_QUALIFIER1 = record
- pszPracticesReference: LPWSTR; // optional
- pszNoticeIdentifier: LPSTR; // optional
- pszNSINoticeIdentifier: LPSTR; // optional
- cCPSURLs: DWORD;
- rgCPSURLs: PCPS_URLS; // optional
- end;
- {$EXTERNALSYM _CERT_POLICY95_QUALIFIER1}
- CERT_POLICY95_QUALIFIER1 = _CERT_POLICY95_QUALIFIER1;
- {$EXTERNALSYM CERT_POLICY95_QUALIFIER1}
- TCertPolicy95Qualifier1 = CERT_POLICY95_QUALIFIER1;
- PCertPolicy95Qualifier1 = PCERT_POLICY95_QUALIFIER1;
-
-//+-------------------------------------------------------------------------
-// RSA_CSP_PUBLICKEYBLOB
-//
-// pvStructInfo points to a PUBLICKEYSTRUC immediately followed by a
-// RSAPUBKEY and the modulus bytes.
-//
-// CryptExportKey outputs the above StructInfo for a dwBlobType of
-// PUBLICKEYBLOB. CryptImportKey expects the above StructInfo when
-// importing a public key.
-//
-// For dwCertEncodingType = X509_ASN_ENCODING, the RSA_CSP_PUBLICKEYBLOB is
-// encoded as a PKCS #1 RSAPublicKey consisting of a SEQUENCE of a
-// modulus INTEGER and a publicExponent INTEGER. The modulus is encoded
-// as being a unsigned integer. When decoded, if the modulus was encoded
-// as unsigned integer with a leading 0 byte, the 0 byte is removed before
-// converting to the CSP modulus bytes.
-//
-// For decode, the aiKeyAlg field of PUBLICKEYSTRUC is always set to
-// CALG_RSA_KEYX.
-//--------------------------------------------------------------------------
-
-//+-------------------------------------------------------------------------
-// X509_KEYGEN_REQUEST_TO_BE_SIGNED
-//
-// pvStructInfo points to CERT_KEYGEN_REQUEST_INFO.
-//
-// For CryptDecodeObject(), the pbEncoded is the "to be signed" plus its
-// signature (output of a X509_CERT CryptEncodeObject()).
-//
-// For CryptEncodeObject(), the pbEncoded is just the "to be signed".
-//--------------------------------------------------------------------------
-
-//+-------------------------------------------------------------------------
-// PKCS_ATTRIBUTE data structure
-//
-// pvStructInfo points to a CRYPT_ATTRIBUTE.
-//--------------------------------------------------------------------------
-
-//+-------------------------------------------------------------------------
-// PKCS_ATTRIBUTES data structure
-//
-// pvStructInfo points to a CRYPT_ATTRIBUTES.
-//--------------------------------------------------------------------------
-
-//+-------------------------------------------------------------------------
-// PKCS_CONTENT_INFO_SEQUENCE_OF_ANY data structure
-//
-// pvStructInfo points to following CRYPT_CONTENT_INFO_SEQUENCE_OF_ANY.
-//
-// For X509_ASN_ENCODING: encoded as a PKCS#7 ContentInfo structure wrapping
-// a sequence of ANY. The value of the contentType field is pszObjId,
-// while the content field is the following structure:
-// SequenceOfAny ::= SEQUENCE OF ANY
-//
-// The CRYPT_DER_BLOBs point to the already encoded ANY content.
-//--------------------------------------------------------------------------
-
- PCRYPT_CONTENT_INFO_SEQUENCE_OF_ANY = ^CRYPT_CONTENT_INFO_SEQUENCE_OF_ANY;
- {$EXTERNALSYM PCRYPT_CONTENT_INFO_SEQUENCE_OF_ANY}
- _CRYPT_CONTENT_INFO_SEQUENCE_OF_ANY = record
- pszObjId: LPSTR;
- cValue: DWORD;
- rgValue: PCRYPT_DER_BLOB;
- end;
- {$EXTERNALSYM _CRYPT_CONTENT_INFO_SEQUENCE_OF_ANY}
- CRYPT_CONTENT_INFO_SEQUENCE_OF_ANY = _CRYPT_CONTENT_INFO_SEQUENCE_OF_ANY;
- {$EXTERNALSYM CRYPT_CONTENT_INFO_SEQUENCE_OF_ANY}
- TCryptContentInfoSequenceOfAny = CRYPT_CONTENT_INFO_SEQUENCE_OF_ANY;
- PCryptContentInfoSequenceOfAny = PCRYPT_CONTENT_INFO_SEQUENCE_OF_ANY;
-
-//+-------------------------------------------------------------------------
-// PKCS_CONTENT_INFO data structure
-//
-// pvStructInfo points to following CRYPT_CONTENT_INFO.
-//
-// For X509_ASN_ENCODING: encoded as a PKCS#7 ContentInfo structure.
-// The CRYPT_DER_BLOB points to the already encoded ANY content.
-//--------------------------------------------------------------------------
-
- PCRYPT_CONTENT_INFO = ^CRYPT_CONTENT_INFO;
- {$EXTERNALSYM PCRYPT_CONTENT_INFO}
- _CRYPT_CONTENT_INFO = record
- pszObjId: LPSTR;
- Content: CRYPT_DER_BLOB;
- end;
- {$EXTERNALSYM _CRYPT_CONTENT_INFO}
- CRYPT_CONTENT_INFO = _CRYPT_CONTENT_INFO;
- {$EXTERNALSYM CRYPT_CONTENT_INFO}
- TCryptContentInfo = CRYPT_CONTENT_INFO;
- PCryptContentInfo = PCRYPT_CONTENT_INFO;
-
-//+-------------------------------------------------------------------------
-// X509_OCTET_STRING data structure
-//
-// pvStructInfo points to a CRYPT_DATA_BLOB.
-//--------------------------------------------------------------------------
-
-//+-------------------------------------------------------------------------
-// X509_BITS data structure
-//
-// pvStructInfo points to a CRYPT_BIT_BLOB.
-//--------------------------------------------------------------------------
-
-//+-------------------------------------------------------------------------
-// X509_BITS_WITHOUT_TRAILING_ZEROES data structure
-//
-// pvStructInfo points to a CRYPT_BIT_BLOB.
-//
-// The same as X509_BITS, except before encoding, the bit length is
-// decremented to exclude trailing zero bits.
-//--------------------------------------------------------------------------
-
-//+-------------------------------------------------------------------------
-// X509_INTEGER data structure
-//
-// pvStructInfo points to an int.
-//--------------------------------------------------------------------------
-
-//+-------------------------------------------------------------------------
-// X509_MULTI_BYTE_INTEGER data structure
-//
-// pvStructInfo points to a CRYPT_INTEGER_BLOB.
-//--------------------------------------------------------------------------
-
-//+-------------------------------------------------------------------------
-// X509_ENUMERATED data structure
-//
-// pvStructInfo points to an int containing the enumerated value
-//--------------------------------------------------------------------------
-
-//+-------------------------------------------------------------------------
-// X509_CHOICE_OF_TIME data structure
-//
-// pvStructInfo points to a FILETIME.
-//--------------------------------------------------------------------------
-
-//+-------------------------------------------------------------------------
-// X509_SEQUENCE_OF_ANY data structure
-//
-// pvStructInfo points to following CRYPT_SEQUENCE_OF_ANY.
-//
-// The CRYPT_DER_BLOBs point to the already encoded ANY content.
-//--------------------------------------------------------------------------
-
- PCRYPT_SEQUENCE_OF_ANY = ^CRYPT_SEQUENCE_OF_ANY;
- {$EXTERNALSYM PCRYPT_SEQUENCE_OF_ANY}
- _CRYPT_SEQUENCE_OF_ANY = record
- cValue: DWORD;
- rgValue: PCRYPT_DER_BLOB;
- end;
- {$EXTERNALSYM _CRYPT_SEQUENCE_OF_ANY}
- CRYPT_SEQUENCE_OF_ANY = _CRYPT_SEQUENCE_OF_ANY;
- {$EXTERNALSYM CRYPT_SEQUENCE_OF_ANY}
- TCryptSequenceOfAny = CRYPT_SEQUENCE_OF_ANY;
- PCryptSequenceOfAny = PCRYPT_SEQUENCE_OF_ANY;
-
-//+-------------------------------------------------------------------------
-// X509_AUTHORITY_KEY_ID2
-// szOID_AUTHORITY_KEY_IDENTIFIER2
-//
-// pvStructInfo points to following CERT_AUTHORITY_KEY_ID2_INFO.
-//
-// For CRYPT_E_INVALID_IA5_STRING, the error location is returned in
-// *pcbEncoded by CryptEncodeObject(X509_AUTHORITY_KEY_ID2)
-//
-// See X509_ALTERNATE_NAME for error location defines.
-//--------------------------------------------------------------------------
-
- PCERT_AUTHORITY_KEY_ID2_INFO = ^CERT_AUTHORITY_KEY_ID2_INFO;
- {$EXTERNALSYM PCERT_AUTHORITY_KEY_ID2_INFO}
- _CERT_AUTHORITY_KEY_ID2_INFO = record
- KeyId: CRYPT_DATA_BLOB;
- AuthorityCertIssuer: CERT_ALT_NAME_INFO; // Optional, set cAltEntry
- // to 0 to omit.
- AuthorityCertSerialNumber: CRYPT_INTEGER_BLOB;
- end;
- {$EXTERNALSYM _CERT_AUTHORITY_KEY_ID2_INFO}
- CERT_AUTHORITY_KEY_ID2_INFO = _CERT_AUTHORITY_KEY_ID2_INFO;
- {$EXTERNALSYM CERT_AUTHORITY_KEY_ID2_INFO}
- TCertAuthorityKeyId2Info = CERT_AUTHORITY_KEY_ID2_INFO;
- PCertAuthorityKeyId2Info = PCERT_AUTHORITY_KEY_ID2_INFO;
-
-//+-------------------------------------------------------------------------
-// szOID_SUBJECT_KEY_IDENTIFIER
-//
-// pvStructInfo points to a CRYPT_DATA_BLOB.
-//--------------------------------------------------------------------------
-
-//+-------------------------------------------------------------------------
-// X509_AUTHORITY_INFO_ACCESS
-// szOID_AUTHORITY_INFO_ACCESS
-//
-// pvStructInfo points to following CERT_AUTHORITY_INFO_ACCESS.
-//
-// For CRYPT_E_INVALID_IA5_STRING, the error location is returned in
-// *pcbEncoded by CryptEncodeObject(X509_AUTHORITY_INFO_ACCESS)
-//
-// Error location consists of:
-// ENTRY_INDEX - 8 bits << 16
-// VALUE_INDEX - 16 bits (unicode character index)
-//
-// See X509_ALTERNATE_NAME for ENTRY_INDEX and VALUE_INDEX error location
-// defines.
-//--------------------------------------------------------------------------
-
- PCERT_ACCESS_DESCRIPTION = ^CERT_ACCESS_DESCRIPTION;
- {$EXTERNALSYM PCERT_ACCESS_DESCRIPTION}
- _CERT_ACCESS_DESCRIPTION = record
- pszAccessMethod: LPSTR; // pszObjId
- AccessLocation: CERT_ALT_NAME_ENTRY;
- end;
- {$EXTERNALSYM _CERT_ACCESS_DESCRIPTION}
- CERT_ACCESS_DESCRIPTION = _CERT_ACCESS_DESCRIPTION;
- {$EXTERNALSYM CERT_ACCESS_DESCRIPTION}
- TCertAccessDescription = CERT_ACCESS_DESCRIPTION;
- PCertAccessDescription = PCERT_ACCESS_DESCRIPTION;
-
- PCERT_AUTHORITY_INFO_ACCESS = ^CERT_AUTHORITY_INFO_ACCESS;
- {$EXTERNALSYM PCERT_AUTHORITY_INFO_ACCESS}
- _CERT_AUTHORITY_INFO_ACCESS = record
- cAccDescr: DWORD;
- rgAccDescr: PCERT_ACCESS_DESCRIPTION;
- end;
- {$EXTERNALSYM _CERT_AUTHORITY_INFO_ACCESS}
- CERT_AUTHORITY_INFO_ACCESS = _CERT_AUTHORITY_INFO_ACCESS;
- {$EXTERNALSYM CERT_AUTHORITY_INFO_ACCESS}
- TCertAuthorityInfoAccess = CERT_AUTHORITY_INFO_ACCESS;
- PCertAuthorityInfoAccess = PCERT_AUTHORITY_INFO_ACCESS;
-
-//+-------------------------------------------------------------------------
-// PKIX Access Description: Access Method Object Identifiers
-//--------------------------------------------------------------------------
-
-const
- szOID_PKIX_ACC_DESCR = '1.3.6.1.5.5.7.48';
- {$EXTERNALSYM szOID_PKIX_ACC_DESCR}
- szOID_PKIX_OCSP = '1.3.6.1.5.5.7.48.1';
- {$EXTERNALSYM szOID_PKIX_OCSP}
- szOID_PKIX_CA_ISSUERS = '1.3.6.1.5.5.7.48.2';
- {$EXTERNALSYM szOID_PKIX_CA_ISSUERS}
-
-//+-------------------------------------------------------------------------
-// X509_CRL_REASON_CODE
-// szOID_CRL_REASON_CODE
-//
-// pvStructInfo points to an int which can be set to one of the following
-// enumerated values:
-//--------------------------------------------------------------------------
-
- CRL_REASON_UNSPECIFIED = 0;
- {$EXTERNALSYM CRL_REASON_UNSPECIFIED}
- CRL_REASON_KEY_COMPROMISE = 1;
- {$EXTERNALSYM CRL_REASON_KEY_COMPROMISE}
- CRL_REASON_CA_COMPROMISE = 2;
- {$EXTERNALSYM CRL_REASON_CA_COMPROMISE}
- CRL_REASON_AFFILIATION_CHANGED = 3;
- {$EXTERNALSYM CRL_REASON_AFFILIATION_CHANGED}
- CRL_REASON_SUPERSEDED = 4;
- {$EXTERNALSYM CRL_REASON_SUPERSEDED}
- CRL_REASON_CESSATION_OF_OPERATION = 5;
- {$EXTERNALSYM CRL_REASON_CESSATION_OF_OPERATION}
- CRL_REASON_CERTIFICATE_HOLD = 6;
- {$EXTERNALSYM CRL_REASON_CERTIFICATE_HOLD}
- CRL_REASON_REMOVE_FROM_CRL = 8;
- {$EXTERNALSYM CRL_REASON_REMOVE_FROM_CRL}
-
-//+-------------------------------------------------------------------------
-// X509_CRL_DIST_POINTS
-// szOID_CRL_DIST_POINTS
-//
-// pvStructInfo points to following CRL_DIST_POINTS_INFO.
-//
-// For CRYPT_E_INVALID_IA5_STRING, the error location is returned in
-// *pcbEncoded by CryptEncodeObject(X509_CRL_DIST_POINTS)
-//
-// Error location consists of:
-// CRL_ISSUER_BIT - 1 bit << 31 (0 for FullName, 1 for CRLIssuer)
-// POINT_INDEX - 7 bits << 24
-// ENTRY_INDEX - 8 bits << 16
-// VALUE_INDEX - 16 bits (unicode character index)
-//
-// See X509_ALTERNATE_NAME for ENTRY_INDEX and VALUE_INDEX error location
-// defines.
-//--------------------------------------------------------------------------
-
-type
- PCRL_DIST_POINT_NAME = ^CRL_DIST_POINT_NAME;
- {$EXTERNALSYM PCRL_DIST_POINT_NAME}
- _CRL_DIST_POINT_NAME = record
- dwDistPointNameChoice: DWORD;
- case Integer of
- 0: (FullName: CERT_ALT_NAME_INFO); // 1
- 1: ();// Not implemented IssuerRDN; // 2
- end;
- {$EXTERNALSYM _CRL_DIST_POINT_NAME}
- CRL_DIST_POINT_NAME = _CRL_DIST_POINT_NAME;
- {$EXTERNALSYM CRL_DIST_POINT_NAME}
- TCrlDistPointName = CRL_DIST_POINT_NAME;
- PCrlDistPointName = PCRL_DIST_POINT_NAME;
-
-const
- CRL_DIST_POINT_NO_NAME = 0;
- {$EXTERNALSYM CRL_DIST_POINT_NO_NAME}
- CRL_DIST_POINT_FULL_NAME = 1;
- {$EXTERNALSYM CRL_DIST_POINT_FULL_NAME}
- CRL_DIST_POINT_ISSUER_RDN_NAME = 2;
- {$EXTERNALSYM CRL_DIST_POINT_ISSUER_RDN_NAME}
-
-type
- PCRL_DIST_POINT = ^CRL_DIST_POINT;
- {$EXTERNALSYM PCRL_DIST_POINT}
- _CRL_DIST_POINT = record
- DistPointName: CRL_DIST_POINT_NAME; // OPTIONAL
- ReasonFlags: CRYPT_BIT_BLOB; // OPTIONAL
- CRLIssuer: CERT_ALT_NAME_INFO; // OPTIONAL
- end;
- {$EXTERNALSYM _CRL_DIST_POINT}
- CRL_DIST_POINT = _CRL_DIST_POINT;
- {$EXTERNALSYM CRL_DIST_POINT}
- TCrlDistPoint = CRL_DIST_POINT;
- PCrlDistPoint = PCRL_DIST_POINT;
-
-const
- CRL_REASON_UNUSED_FLAG = $80;
- {$EXTERNALSYM CRL_REASON_UNUSED_FLAG}
- CRL_REASON_KEY_COMPROMISE_FLAG = $40;
- {$EXTERNALSYM CRL_REASON_KEY_COMPROMISE_FLAG}
- CRL_REASON_CA_COMPROMISE_FLAG = $20;
- {$EXTERNALSYM CRL_REASON_CA_COMPROMISE_FLAG}
- CRL_REASON_AFFILIATION_CHANGED_FLAG = $10;
- {$EXTERNALSYM CRL_REASON_AFFILIATION_CHANGED_FLAG}
- CRL_REASON_SUPERSEDED_FLAG = $08;
- {$EXTERNALSYM CRL_REASON_SUPERSEDED_FLAG}
- CRL_REASON_CESSATION_OF_OPERATION_FLAG = $04;
- {$EXTERNALSYM CRL_REASON_CESSATION_OF_OPERATION_FLAG}
- CRL_REASON_CERTIFICATE_HOLD_FLAG = $02;
- {$EXTERNALSYM CRL_REASON_CERTIFICATE_HOLD_FLAG}
-
-type
- PCRL_DIST_POINTS_INFO = ^CRL_DIST_POINTS_INFO;
- {$EXTERNALSYM PCRL_DIST_POINTS_INFO}
- _CRL_DIST_POINTS_INFO = record
- cDistPoint: DWORD;
- rgDistPoint: PCRL_DIST_POINT;
- end;
- {$EXTERNALSYM _CRL_DIST_POINTS_INFO}
- CRL_DIST_POINTS_INFO = _CRL_DIST_POINTS_INFO;
- {$EXTERNALSYM CRL_DIST_POINTS_INFO}
- TCrlDistPointsInfo = CRL_DIST_POINTS_INFO;
- PCrlDistPointsInfo = PCRL_DIST_POINTS_INFO;
-
-const
- CRL_DIST_POINT_ERR_INDEX_MASK = $7F;
- {$EXTERNALSYM CRL_DIST_POINT_ERR_INDEX_MASK}
- CRL_DIST_POINT_ERR_INDEX_SHIFT = 24;
- {$EXTERNALSYM CRL_DIST_POINT_ERR_INDEX_SHIFT}
-
-function GET_CRL_DIST_POINT_ERR_INDEX(X: DWORD): DWORD;
-{$EXTERNALSYM GET_CRL_DIST_POINT_ERR_INDEX}
-
-const
- CRL_DIST_POINT_ERR_CRL_ISSUER_BIT = DWORD($80000000);
- {$EXTERNALSYM CRL_DIST_POINT_ERR_CRL_ISSUER_BIT}
-
-function IS_CRL_DIST_POINT_ERR_CRL_ISSUER(X: DWORD): Boolean;
-{$EXTERNALSYM IS_CRL_DIST_POINT_ERR_CRL_ISSUER}
-
-//+-------------------------------------------------------------------------
-// X509_ENHANCED_KEY_USAGE
-// szOID_ENHANCED_KEY_USAGE
-//
-// pvStructInfo points to a CERT_ENHKEY_USAGE, CTL_USAGE.
-//--------------------------------------------------------------------------
-
-//+-------------------------------------------------------------------------
-// szOID_NEXT_UPDATE_LOCATION
-//
-// pvStructInfo points to a CERT_ALT_NAME_INFO.
-//--------------------------------------------------------------------------
-
-//+-------------------------------------------------------------------------
-// PKCS_CTL
-// szOID_CTL
-//
-// pvStructInfo points to a CTL_INFO.
-//--------------------------------------------------------------------------
-
-//+-------------------------------------------------------------------------
-// PKCS_SORTED_CTL
-//
-// pvStructInfo points to a CTL_INFO.
-//
-// Same as for PKCS_CTL, except, the CTL entries are sorted. The following
-// extension containing the sort information is inserted as the first
-// extension in the encoded CTL.
-//
-// Only supported for Encoding. CRYPT_ENCODE_ALLOC_FLAG flag must be
-// set.
-//--------------------------------------------------------------------------
-
-//+-------------------------------------------------------------------------
-// Sorted CTL TrustedSubjects extension
-//
-// Array of little endian DWORDs:
-// [0] - Flags
-// [1] - Count of HashBucket entry offsets
-// [2] - Maximum HashBucket entry collision count
-// [3 ..] (Count + 1) HashBucket entry offsets
-//
-// When this extension is present in the CTL,
-// the ASN.1 encoded sequence of TrustedSubjects are HashBucket ordered.
-//
-// The entry offsets point to the start of the first encoded TrustedSubject
-// sequence for the HashBucket. The encoded TrustedSubjects for a HashBucket
-// continue until the encoded offset of the next HashBucket. A HashBucket has
-// no entries if HashBucket[N] == HashBucket[N + 1].
-//
-// The HashBucket offsets are from the start of the ASN.1 encoded CTL_INFO.
-//--------------------------------------------------------------------------
-
-const
- SORTED_CTL_EXT_FLAGS_OFFSET = 0 * 4;
- {$EXTERNALSYM SORTED_CTL_EXT_FLAGS_OFFSET}
- SORTED_CTL_EXT_COUNT_OFFSET = 1 * 4;
- {$EXTERNALSYM SORTED_CTL_EXT_COUNT_OFFSET}
- SORTED_CTL_EXT_MAX_COLLISION_OFFSET = 2 * 4;
- {$EXTERNALSYM SORTED_CTL_EXT_MAX_COLLISION_OFFSET}
- SORTED_CTL_EXT_HASH_BUCKET_OFFSET = 3 * 4;
- {$EXTERNALSYM SORTED_CTL_EXT_HASH_BUCKET_OFFSET}
-
-// If the SubjectIdentifiers are a MD5 or SHA1 hash, the following flag is
-// set. When set, the first 4 bytes of the SubjectIdentifier are used as
-// the dwhash. Otherwise, the SubjectIdentifier bytes are hashed into dwHash.
-// In either case the HashBucket index = dwHash % cHashBucket.
-
- SORTED_CTL_EXT_HASHED_SUBJECT_IDENTIFIER_FLAG = $1;
- {$EXTERNALSYM SORTED_CTL_EXT_HASHED_SUBJECT_IDENTIFIER_FLAG}
-
-//+-------------------------------------------------------------------------
-// X509_MULTI_BYTE_UINT
-//
-// pvStructInfo points to a CRYPT_UINT_BLOB. Before encoding, inserts a
-// leading 0x00. After decoding, removes a leading 0x00.
-//--------------------------------------------------------------------------
-
-//+-------------------------------------------------------------------------
-// X509_DSS_PUBLICKEY
-//
-// pvStructInfo points to a CRYPT_UINT_BLOB.
-//--------------------------------------------------------------------------
-
-//+-------------------------------------------------------------------------
-// X509_DSS_PARAMETERS
-//
-// pvStructInfo points to following CERT_DSS_PARAMETERS data structure.
-//--------------------------------------------------------------------------
-
-type
- PCERT_DSS_PARAMETERS = ^CERT_DSS_PARAMETERS;
- {$EXTERNALSYM PCERT_DSS_PARAMETERS}
- _CERT_DSS_PARAMETERS = record
- p: CRYPT_UINT_BLOB;
- q: CRYPT_UINT_BLOB;
- g: CRYPT_UINT_BLOB;
- end;
- {$EXTERNALSYM _CERT_DSS_PARAMETERS}
- CERT_DSS_PARAMETERS = _CERT_DSS_PARAMETERS;
- {$EXTERNALSYM CERT_DSS_PARAMETERS}
- TCertDssParameters = CERT_DSS_PARAMETERS;
- PCertDssParameters = PCERT_DSS_PARAMETERS;
-
-//+-------------------------------------------------------------------------
-// X509_DSS_SIGNATURE
-//
-// pvStructInfo is a BYTE rgbSignature[CERT_DSS_SIGNATURE_LEN]. The
-// bytes are ordered as output by the DSS CSP's CryptSignHash().
-//--------------------------------------------------------------------------
-
-const
- CERT_DSS_R_LEN = 20;
- {$EXTERNALSYM CERT_DSS_R_LEN}
- CERT_DSS_S_LEN = 20;
- {$EXTERNALSYM CERT_DSS_S_LEN}
- CERT_DSS_SIGNATURE_LEN = CERT_DSS_R_LEN + CERT_DSS_S_LEN;
- {$EXTERNALSYM CERT_DSS_SIGNATURE_LEN}
-
-// Sequence of 2 unsigned integers (the extra +1 is for a potential leading
-// 0x00 to make the integer unsigned)
-
- CERT_MAX_ASN_ENCODED_DSS_SIGNATURE_LEN = 2 + 2 * (2 + 20 + 1);
- {$EXTERNALSYM CERT_MAX_ASN_ENCODED_DSS_SIGNATURE_LEN}
-
-//+-------------------------------------------------------------------------
-// X509_DH_PUBLICKEY
-//
-// pvStructInfo points to a CRYPT_UINT_BLOB.
-//--------------------------------------------------------------------------
-
-//+-------------------------------------------------------------------------
-// X509_DH_PARAMETERS
-//
-// pvStructInfo points to following CERT_DH_PARAMETERS data structure.
-//--------------------------------------------------------------------------
-
-type
- PCERT_DH_PARAMETERS = ^CERT_DH_PARAMETERS;
- {$EXTERNALSYM PCERT_DH_PARAMETERS}
- _CERT_DH_PARAMETERS = record
- p: CRYPT_UINT_BLOB;
- g: CRYPT_UINT_BLOB;
- end;
- {$EXTERNALSYM _CERT_DH_PARAMETERS}
- CERT_DH_PARAMETERS = _CERT_DH_PARAMETERS;
- {$EXTERNALSYM CERT_DH_PARAMETERS}
- TCertDhParameters = CERT_DH_PARAMETERS;
- PCertDhParameters = PCERT_DH_PARAMETERS;
-
-//+-------------------------------------------------------------------------
-// X942_DH_PARAMETERS
-//
-// pvStructInfo points to following CERT_X942_DH_PARAMETERS data structure.
-//
-// If q.cbData == 0, then, the following fields are zero'ed.
-//--------------------------------------------------------------------------
-
- PCERT_X942_DH_VALIDATION_PARAMS = ^CERT_X942_DH_VALIDATION_PARAMS;
- {$EXTERNALSYM PCERT_X942_DH_VALIDATION_PARAMS}
- _CERT_X942_DH_VALIDATION_PARAMS = record
- seed: CRYPT_BIT_BLOB;
- pgenCounter: DWORD;
- end;
- {$EXTERNALSYM _CERT_X942_DH_VALIDATION_PARAMS}
- CERT_X942_DH_VALIDATION_PARAMS = _CERT_X942_DH_VALIDATION_PARAMS;
- {$EXTERNALSYM CERT_X942_DH_VALIDATION_PARAMS}
- TCertX942DhValidationParams = CERT_X942_DH_VALIDATION_PARAMS;
- PCertX942DhValidationParams = PCERT_X942_DH_VALIDATION_PARAMS;
-
- PCERT_X942_DH_PARAMETERS = ^CERT_X942_DH_PARAMETERS;
- {$EXTERNALSYM PCERT_X942_DH_PARAMETERS}
- _CERT_X942_DH_PARAMETERS = record
- p: CRYPT_UINT_BLOB; // odd prime, p = jq + 1
- g: CRYPT_UINT_BLOB; // generator, g
- q: CRYPT_UINT_BLOB; // factor of p - 1, OPTIONAL
- j: CRYPT_UINT_BLOB; // subgroup factor, OPTIONAL
- pValidationParams: PCERT_X942_DH_VALIDATION_PARAMS; // OPTIONAL
- end;
- {$EXTERNALSYM _CERT_X942_DH_PARAMETERS}
- CERT_X942_DH_PARAMETERS = _CERT_X942_DH_PARAMETERS;
- {$EXTERNALSYM CERT_X942_DH_PARAMETERS}
- TCertX942DhParameters = CERT_X942_DH_PARAMETERS;
- PCertX942DhParameters = PCERT_X942_DH_PARAMETERS;
-
-//+-------------------------------------------------------------------------
-// X942_OTHER_INFO
-//
-// pvStructInfo points to following CRYPT_X942_OTHER_INFO data structure.
-//
-// rgbCounter and rgbKeyLength are in Little Endian order.
-//--------------------------------------------------------------------------
-
-const
- CRYPT_X942_COUNTER_BYTE_LENGTH = 4;
- {$EXTERNALSYM CRYPT_X942_COUNTER_BYTE_LENGTH}
- CRYPT_X942_KEY_LENGTH_BYTE_LENGTH = 4;
- {$EXTERNALSYM CRYPT_X942_KEY_LENGTH_BYTE_LENGTH}
- CRYPT_X942_PUB_INFO_BYTE_LENGTH = 512 div 8;
- {$EXTERNALSYM CRYPT_X942_PUB_INFO_BYTE_LENGTH}
-
-type
- PCRYPT_X942_OTHER_INFO = ^CRYPT_X942_OTHER_INFO;
- {$EXTERNALSYM PCRYPT_X942_OTHER_INFO}
- _CRYPT_X942_OTHER_INFO = record
- pszContentEncryptionObjId: LPSTR;
- rgbCounter: array [0..CRYPT_X942_COUNTER_BYTE_LENGTH - 1] of BYTE;
- rgbKeyLength: array [0..CRYPT_X942_KEY_LENGTH_BYTE_LENGTH - 1] of BYTE;
- PubInfo: CRYPT_DATA_BLOB; // OPTIONAL
- end;
- {$EXTERNALSYM _CRYPT_X942_OTHER_INFO}
- CRYPT_X942_OTHER_INFO = _CRYPT_X942_OTHER_INFO;
- {$EXTERNALSYM CRYPT_X942_OTHER_INFO}
- TCryptX942OtherInfo = CRYPT_X942_OTHER_INFO;
- PCryptX942OtherInfo = PCRYPT_X942_OTHER_INFO;
-
-//+-------------------------------------------------------------------------
-// PKCS_RC2_CBC_PARAMETERS
-// szOID_RSA_RC2CBC
-//
-// pvStructInfo points to following CRYPT_RC2_CBC_PARAMETERS data structure.
-//--------------------------------------------------------------------------
- PCRYPT_RC2_CBC_PARAMETERS = ^CRYPT_RC2_CBC_PARAMETERS;
- {$EXTERNALSYM PCRYPT_RC2_CBC_PARAMETERS}
- _CRYPT_RC2_CBC_PARAMETERS = record
- dwVersion: DWORD;
- fIV: BOOL; // set if has following IV
- rgbIV: array [0..7] of BYTE;
- end;
- {$EXTERNALSYM _CRYPT_RC2_CBC_PARAMETERS}
- CRYPT_RC2_CBC_PARAMETERS = _CRYPT_RC2_CBC_PARAMETERS;
- {$EXTERNALSYM CRYPT_RC2_CBC_PARAMETERS}
- TCryptRc2CbcParameters = CRYPT_RC2_CBC_PARAMETERS;
- PCryptRc2CbcParameters = PCRYPT_RC2_CBC_PARAMETERS;
-
-const
- CRYPT_RC2_40BIT_VERSION = 160;
- {$EXTERNALSYM CRYPT_RC2_40BIT_VERSION}
- CRYPT_RC2_56BIT_VERSION = 52;
- {$EXTERNALSYM CRYPT_RC2_56BIT_VERSION}
- CRYPT_RC2_64BIT_VERSION = 120;
- {$EXTERNALSYM CRYPT_RC2_64BIT_VERSION}
- CRYPT_RC2_128BIT_VERSION = 58;
- {$EXTERNALSYM CRYPT_RC2_128BIT_VERSION}
-
-//+-------------------------------------------------------------------------
-// PKCS_SMIME_CAPABILITIES
-// szOID_RSA_SMIMECapabilities
-//
-// pvStructInfo points to following CRYPT_SMIME_CAPABILITIES data structure.
-//
-// Note, for CryptEncodeObject(X509_ASN_ENCODING), Parameters.cbData == 0
-// causes the encoded parameters to be omitted and not encoded as a NULL
-// (05 00) as is done when encoding a CRYPT_ALGORITHM_IDENTIFIER. This
-// is per the SMIME specification for encoding capabilities.
-//--------------------------------------------------------------------------
-
-type
- PCRYPT_SMIME_CAPABILITY = ^CRYPT_SMIME_CAPABILITY;
- {$EXTERNALSYM PCRYPT_SMIME_CAPABILITY}
- _CRYPT_SMIME_CAPABILITY = record
- pszObjId: LPSTR;
- Parameters: CRYPT_OBJID_BLOB;
- end;
- {$EXTERNALSYM _CRYPT_SMIME_CAPABILITY}
- CRYPT_SMIME_CAPABILITY = _CRYPT_SMIME_CAPABILITY;
- {$EXTERNALSYM CRYPT_SMIME_CAPABILITY}
- TCryptSmimeCapability = CRYPT_SMIME_CAPABILITY;
- PCryptSmimeCapability = PCRYPT_SMIME_CAPABILITY;
-
- PCRYPT_SMIME_CAPABILITIES = ^CRYPT_SMIME_CAPABILITIES;
- {$EXTERNALSYM PCRYPT_SMIME_CAPABILITIES}
- _CRYPT_SMIME_CAPABILITIES = record
- cCapability: DWORD;
- rgCapability: PCRYPT_SMIME_CAPABILITY;
- end;
- {$EXTERNALSYM _CRYPT_SMIME_CAPABILITIES}
- CRYPT_SMIME_CAPABILITIES = _CRYPT_SMIME_CAPABILITIES;
- {$EXTERNALSYM CRYPT_SMIME_CAPABILITIES}
- TCryptSmimeCapabilities = CRYPT_SMIME_CAPABILITIES;
- PCryptSmimeCapabilities = PCRYPT_SMIME_CAPABILITIES;
-
-//+-------------------------------------------------------------------------
-// PKCS7_SIGNER_INFO
-//
-// pvStructInfo points to CMSG_SIGNER_INFO.
-//--------------------------------------------------------------------------
-
-//+-------------------------------------------------------------------------
-// CMS_SIGNER_INFO
-//
-// pvStructInfo points to CMSG_CMS_SIGNER_INFO.
-//--------------------------------------------------------------------------
-
-//+-------------------------------------------------------------------------
-// Netscape Certificate Extension Object Identifiers
-//--------------------------------------------------------------------------
-
-const
- szOID_NETSCAPE = '2.16.840.1.113730';
- {$EXTERNALSYM szOID_NETSCAPE}
- szOID_NETSCAPE_CERT_EXTENSION = '2.16.840.1.113730.1';
- {$EXTERNALSYM szOID_NETSCAPE_CERT_EXTENSION}
- szOID_NETSCAPE_CERT_TYPE = '2.16.840.1.113730.1.1';
- {$EXTERNALSYM szOID_NETSCAPE_CERT_TYPE}
- szOID_NETSCAPE_BASE_URL = '2.16.840.1.113730.1.2';
- {$EXTERNALSYM szOID_NETSCAPE_BASE_URL}
- szOID_NETSCAPE_REVOCATION_URL = '2.16.840.1.113730.1.3';
- {$EXTERNALSYM szOID_NETSCAPE_REVOCATION_URL}
- szOID_NETSCAPE_CA_REVOCATION_URL = '2.16.840.1.113730.1.4';
- {$EXTERNALSYM szOID_NETSCAPE_CA_REVOCATION_URL}
- szOID_NETSCAPE_CERT_RENEWAL_URL = '2.16.840.1.113730.1.7';
- {$EXTERNALSYM szOID_NETSCAPE_CERT_RENEWAL_URL}
- szOID_NETSCAPE_CA_POLICY_URL = '2.16.840.1.113730.1.8';
- {$EXTERNALSYM szOID_NETSCAPE_CA_POLICY_URL}
- szOID_NETSCAPE_SSL_SERVER_NAME = '2.16.840.1.113730.1.12';
- {$EXTERNALSYM szOID_NETSCAPE_SSL_SERVER_NAME}
- szOID_NETSCAPE_COMMENT = '2.16.840.1.113730.1.13';
- {$EXTERNALSYM szOID_NETSCAPE_COMMENT}
-
-//+-------------------------------------------------------------------------
-// Netscape Certificate Data Type Object Identifiers
-//--------------------------------------------------------------------------
-
- szOID_NETSCAPE_DATA_TYPE = '2.16.840.1.113730.2';
- {$EXTERNALSYM szOID_NETSCAPE_DATA_TYPE}
- szOID_NETSCAPE_CERT_SEQUENCE = '2.16.840.1.113730.2.5';
- {$EXTERNALSYM szOID_NETSCAPE_CERT_SEQUENCE}
-
-//+-------------------------------------------------------------------------
-// szOID_NETSCAPE_CERT_TYPE extension
-//
-// Its value is a bit string. CryptDecodeObject/CryptEncodeObject using
-// X509_BITS or X509_BITS_WITHOUT_TRAILING_ZEROES.
-//
-// The following bits are defined:
-//--------------------------------------------------------------------------
-
- NETSCAPE_SSL_CLIENT_AUTH_CERT_TYPE = $80;
- {$EXTERNALSYM NETSCAPE_SSL_CLIENT_AUTH_CERT_TYPE}
- NETSCAPE_SSL_SERVER_AUTH_CERT_TYPE = $40;
- {$EXTERNALSYM NETSCAPE_SSL_SERVER_AUTH_CERT_TYPE}
- NETSCAPE_SMIME_CERT_TYPE = $20;
- {$EXTERNALSYM NETSCAPE_SMIME_CERT_TYPE}
- NETSCAPE_SIGN_CERT_TYPE = $10;
- {$EXTERNALSYM NETSCAPE_SIGN_CERT_TYPE}
- NETSCAPE_SSL_CA_CERT_TYPE = $04;
- {$EXTERNALSYM NETSCAPE_SSL_CA_CERT_TYPE}
- NETSCAPE_SMIME_CA_CERT_TYPE = $02;
- {$EXTERNALSYM NETSCAPE_SMIME_CA_CERT_TYPE}
- NETSCAPE_SIGN_CA_CERT_TYPE = $01;
- {$EXTERNALSYM NETSCAPE_SIGN_CA_CERT_TYPE}
-
-//+-------------------------------------------------------------------------
-// szOID_NETSCAPE_BASE_URL extension
-//
-// Its value is an IA5_STRING. CryptDecodeObject/CryptEncodeObject using
-// X509_ANY_STRING or X509_UNICODE_ANY_STRING, where,
-// dwValueType = CERT_RDN_IA5_STRING.
-//
-// When present this string is added to the beginning of all relative URLs
-// in the certificate. This extension can be considered an optimization
-// to reduce the size of the URL extensions.
-//--------------------------------------------------------------------------
-
-//+-------------------------------------------------------------------------
-// szOID_NETSCAPE_REVOCATION_URL extension
-//
-// Its value is an IA5_STRING. CryptDecodeObject/CryptEncodeObject using
-// X509_ANY_STRING or X509_UNICODE_ANY_STRING, where,
-// dwValueType = CERT_RDN_IA5_STRING.
-//
-// It is a relative or absolute URL that can be used to check the
-// revocation status of a certificate. The revocation check will be
-// performed as an HTTP GET method using a url that is the concatenation of
-// revocation-url and certificate-serial-number.
-// Where the certificate-serial-number is encoded as a string of
-// ascii hexadecimal digits. For example, if the netscape-base-url is
-// https://www.certs-r-us.com/, the netscape-revocation-url is
-// cgi-bin/check-rev.cgi?, and the certificate serial number is 173420,
-// the resulting URL would be:
-// https://www.certs-r-us.com/cgi-bin/check-rev.cgi?02a56c
-//
-// The server should return a document with a Content-Type of
-// application/x-netscape-revocation. The document should contain
-// a single ascii digit, '1' if the certificate is not curently valid,
-// and '0' if it is curently valid.
-//
-// Note: for all of the URLs that include the certificate serial number,
-// the serial number will be encoded as a string which consists of an even
-// number of hexadecimal digits. If the number of significant digits is odd,
-// the string will have a single leading zero to ensure an even number of
-// digits is generated.
-//--------------------------------------------------------------------------
-
-//+-------------------------------------------------------------------------
-// szOID_NETSCAPE_CA_REVOCATION_URL extension
-//
-// Its value is an IA5_STRING. CryptDecodeObject/CryptEncodeObject using
-// X509_ANY_STRING or X509_UNICODE_ANY_STRING, where,
-// dwValueType = CERT_RDN_IA5_STRING.
-//
-// It is a relative or absolute URL that can be used to check the
-// revocation status of any certificates that are signed by the CA that
-// this certificate belongs to. This extension is only valid in CA
-// certificates. The use of this extension is the same as the above
-// szOID_NETSCAPE_REVOCATION_URL extension.
-//--------------------------------------------------------------------------
-
-//+-------------------------------------------------------------------------
-// szOID_NETSCAPE_CERT_RENEWAL_URL extension
-//
-// Its value is an IA5_STRING. CryptDecodeObject/CryptEncodeObject using
-// X509_ANY_STRING or X509_UNICODE_ANY_STRING, where,
-// dwValueType = CERT_RDN_IA5_STRING.
-//
-// It is a relative or absolute URL that points to a certificate renewal
-// form. The renewal form will be accessed with an HTTP GET method using a
-// url that is the concatenation of renewal-url and
-// certificate-serial-number. Where the certificate-serial-number is
-// encoded as a string of ascii hexadecimal digits. For example, if the
-// netscape-base-url is https://www.certs-r-us.com/, the
-// netscape-cert-renewal-url is cgi-bin/check-renew.cgi?, and the
-// certificate serial number is 173420, the resulting URL would be:
-// https://www.certs-r-us.com/cgi-bin/check-renew.cgi?02a56c
-// The document returned should be an HTML form that will allow the user
-// to request a renewal of their certificate.
-//--------------------------------------------------------------------------
-
-//+-------------------------------------------------------------------------
-// szOID_NETSCAPE_CA_POLICY_URL extension
-//
-// Its value is an IA5_STRING. CryptDecodeObject/CryptEncodeObject using
-// X509_ANY_STRING or X509_UNICODE_ANY_STRING, where,
-// dwValueType = CERT_RDN_IA5_STRING.
-//
-// It is a relative or absolute URL that points to a web page that
-// describes the policies under which the certificate was issued.
-//--------------------------------------------------------------------------
-
-//+-------------------------------------------------------------------------
-// szOID_NETSCAPE_SSL_SERVER_NAME extension
-//
-// Its value is an IA5_STRING. CryptDecodeObject/CryptEncodeObject using
-// X509_ANY_STRING or X509_UNICODE_ANY_STRING, where,
-// dwValueType = CERT_RDN_IA5_STRING.
-//
-// It is a "shell expression" that can be used to match the hostname of the
-// SSL server that is using this certificate. It is recommended that if
-// the server's hostname does not match this pattern the user be notified
-// and given the option to terminate the SSL connection. If this extension
-// is not present then the CommonName in the certificate subject's
-// distinguished name is used for the same purpose.
-//--------------------------------------------------------------------------
-
-//+-------------------------------------------------------------------------
-// szOID_NETSCAPE_COMMENT extension
-//
-// Its value is an IA5_STRING. CryptDecodeObject/CryptEncodeObject using
-// X509_ANY_STRING or X509_UNICODE_ANY_STRING, where,
-// dwValueType = CERT_RDN_IA5_STRING.
-//
-// It is a comment that may be displayed to the user when the certificate
-// is viewed.
-//--------------------------------------------------------------------------
-
-//+-------------------------------------------------------------------------
-// szOID_NETSCAPE_CERT_SEQUENCE
-//
-// Its value is a PKCS#7 ContentInfo structure wrapping a sequence of
-// certificates. The value of the contentType field is
-// szOID_NETSCAPE_CERT_SEQUENCE, while the content field is the following
-// structure:
-// CertificateSequence ::= SEQUENCE OF Certificate.
-//
-// CryptDecodeObject/CryptEncodeObject using
-// PKCS_CONTENT_INFO_SEQUENCE_OF_ANY, where,
-// pszObjId = szOID_NETSCAPE_CERT_SEQUENCE and the CRYPT_DER_BLOBs point
-// to encoded X509 certificates.
-//--------------------------------------------------------------------------
-
-//+=========================================================================
-// Object IDentifier (OID) Installable Functions: Data Structures and APIs
-//==========================================================================
-
-type
- HCRYPTOIDFUNCSET = Pointer;
- {$EXTERNALSYM HCRYPTOIDFUNCSET}
- HCRYPTOIDFUNCADDR = Pointer;
- {$EXTERNALSYM HCRYPTOIDFUNCADDR}
-
-// Predefined OID Function Names
-
-const
- CRYPT_OID_ENCODE_OBJECT_FUNC = 'CryptDllEncodeObject';
- {$EXTERNALSYM CRYPT_OID_ENCODE_OBJECT_FUNC}
- CRYPT_OID_DECODE_OBJECT_FUNC = 'CryptDllDecodeObject';
- {$EXTERNALSYM CRYPT_OID_DECODE_OBJECT_FUNC}
- CRYPT_OID_ENCODE_OBJECT_EX_FUNC = 'CryptDllEncodeObjectEx';
- {$EXTERNALSYM CRYPT_OID_ENCODE_OBJECT_EX_FUNC}
- CRYPT_OID_DECODE_OBJECT_EX_FUNC = 'CryptDllDecodeObjectEx';
- {$EXTERNALSYM CRYPT_OID_DECODE_OBJECT_EX_FUNC}
- CRYPT_OID_CREATE_COM_OBJECT_FUNC = 'CryptDllCreateCOMObject';
- {$EXTERNALSYM CRYPT_OID_CREATE_COM_OBJECT_FUNC}
- CRYPT_OID_VERIFY_REVOCATION_FUNC = 'CertDllVerifyRevocation';
- {$EXTERNALSYM CRYPT_OID_VERIFY_REVOCATION_FUNC}
- CRYPT_OID_VERIFY_CTL_USAGE_FUNC = 'CertDllVerifyCTLUsage';
- {$EXTERNALSYM CRYPT_OID_VERIFY_CTL_USAGE_FUNC}
- CRYPT_OID_FORMAT_OBJECT_FUNC = 'CryptDllFormatObject';
- {$EXTERNALSYM CRYPT_OID_FORMAT_OBJECT_FUNC}
- CRYPT_OID_FIND_OID_INFO_FUNC = 'CryptDllFindOIDInfo';
- {$EXTERNALSYM CRYPT_OID_FIND_OID_INFO_FUNC}
- CRYPT_OID_FIND_LOCALIZED_NAME_FUNC = 'CryptDllFindLocalizedName';
- {$EXTERNALSYM CRYPT_OID_FIND_LOCALIZED_NAME_FUNC}
-
-// CryptDllEncodeObject has same function signature as CryptEncodeObject.
-
-// CryptDllDecodeObject has same function signature as CryptDecodeObject.
-
-// CryptDllEncodeObjectEx has same function signature as CryptEncodeObjectEx.
-// The Ex version MUST support the CRYPT_ENCODE_ALLOC_FLAG option.
-//
-// If an Ex function isn't installed or registered, then, attempts to find
-// a non-EX version. If the ALLOC flag is set, then, CryptEncodeObjectEx,
-// does the allocation and calls the non-EX version twice.
-
-// CryptDllDecodeObjectEx has same function signature as CryptDecodeObjectEx.
-// The Ex version MUST support the CRYPT_DECODE_ALLOC_FLAG option.
-//
-// If an Ex function isn't installed or registered, then, attempts to find
-// a non-EX version. If the ALLOC flag is set, then, CryptDecodeObjectEx,
-// does the allocation and calls the non-EX version twice.
-
-// CryptDllCreateCOMObject has the following signature:
-// BOOL WINAPI CryptDllCreateCOMObject(
-// IN DWORD dwEncodingType,
-// IN LPCSTR pszOID,
-// IN PCRYPT_DATA_BLOB pEncodedContent,
-// IN DWORD dwFlags,
-// IN REFIID riid,
-// OUT void **ppvObj);
-
-// CertDllVerifyRevocation has the same signature as CertVerifyRevocation
-// (See CertVerifyRevocation for details on when called)
-
-// CertDllVerifyCTLUsage has the same signature as CertVerifyCTLUsage
-
-// CryptDllFindOIDInfo currently is only used to store values used by
-// CryptFindOIDInfo. See CryptFindOIDInfo() for more details.
-
-// CryptDllFindLocalizedName is only used to store localized string
-// values used by CryptFindLocalizedName. See CryptFindLocalizedName() for
-// more details.
-
-// Example of a complete OID Function Registry Name:
-// HKEY_LOCAL_MACHINE\Software\Microsoft\Cryptography\OID
-// Encoding Type 1\CryptDllEncodeObject\1.2.3
-//
-// The key's L"Dll" value contains the name of the Dll.
-// The key's L"FuncName" value overrides the default function name
-
- CRYPT_OID_REGPATH = 'Software\Microsoft\Cryptography\OID';
- {$EXTERNALSYM CRYPT_OID_REGPATH}
- CRYPT_OID_REG_ENCODING_TYPE_PREFIX = 'EncodingType ';
- {$EXTERNALSYM CRYPT_OID_REG_ENCODING_TYPE_PREFIX}
- CRYPT_OID_REG_DLL_VALUE_NAME = 'Dll';
- {$EXTERNALSYM CRYPT_OID_REG_DLL_VALUE_NAME}
- CRYPT_OID_REG_FUNC_NAME_VALUE_NAME = 'FuncName';
- {$EXTERNALSYM CRYPT_OID_REG_FUNC_NAME_VALUE_NAME}
- CRYPT_OID_REG_FUNC_NAME_VALUE_NAME_A = 'FuncName';
- {$EXTERNALSYM CRYPT_OID_REG_FUNC_NAME_VALUE_NAME_A}
-
-// CRYPT_INSTALL_OID_FUNC_BEFORE_FLAG can be set in the key's L"CryptFlags"
-// value to register the functions before the installed functions.
-//
-// CryptSetOIDFunctionValue must be called to set this value. L"CryptFlags"
-// must be set using a dwValueType of REG_DWORD.
-
- CRYPT_OID_REG_FLAGS_VALUE_NAME = 'CryptFlags';
- {$EXTERNALSYM CRYPT_OID_REG_FLAGS_VALUE_NAME}
-
-// OID used for Default OID functions
-
- CRYPT_DEFAULT_OID = 'DEFAULT';
- {$EXTERNALSYM CRYPT_DEFAULT_OID}
-
-type
- PCRYPT_OID_FUNC_ENTRY = ^CRYPT_OID_FUNC_ENTRY;
- {$EXTERNALSYM PCRYPT_OID_FUNC_ENTRY}
- _CRYPT_OID_FUNC_ENTRY = record
- pszOID: LPCSTR;
- pvFuncAddr: Pointer;
- end;
- {$EXTERNALSYM _CRYPT_OID_FUNC_ENTRY}
- CRYPT_OID_FUNC_ENTRY = _CRYPT_OID_FUNC_ENTRY;
- {$EXTERNALSYM CRYPT_OID_FUNC_ENTRY}
- TCryptOidFuncEntry = CRYPT_OID_FUNC_ENTRY;
- PCryptOidFuncEntry = PCRYPT_OID_FUNC_ENTRY;
-
-const
- CRYPT_INSTALL_OID_FUNC_BEFORE_FLAG = 1;
- {$EXTERNALSYM CRYPT_INSTALL_OID_FUNC_BEFORE_FLAG}
-
-//+-------------------------------------------------------------------------
-// Install a set of callable OID function addresses.
-//
-// By default the functions are installed at end of the list.
-// Set CRYPT_INSTALL_OID_FUNC_BEFORE_FLAG to install at beginning of list.
-//
-// hModule should be updated with the hModule passed to DllMain to prevent
-// the Dll containing the function addresses from being unloaded by
-// CryptGetOIDFuncAddress/CryptFreeOIDFunctionAddress. This would be the
-// case when the Dll has also regsvr32'ed OID functions via
-// CryptRegisterOIDFunction.
-//
-// DEFAULT functions are installed by setting rgFuncEntry[].pszOID =
-// CRYPT_DEFAULT_OID.
-//--------------------------------------------------------------------------
-
-function CryptInstallOIDFunctionAddress(hModule: HMODULE; dwEncodingType: DWORD;
- pszFuncName: LPCSTR; cFuncEntry: DWORD; rgFuncEntry: PCRYPT_OID_FUNC_ENTRY;
- dwFlags: DWORD): BOOL; stdcall;
-{$EXTERNALSYM CryptInstallOIDFunctionAddress}
-
-//+-------------------------------------------------------------------------
-// Initialize and return handle to the OID function set identified by its
-// function name.
-//
-// If the set already exists, a handle to the existing set is returned.
-//--------------------------------------------------------------------------
-
-function CryptInitOIDFunctionSet(pszFuncName: LPCSTR; dwFlags: DWORD): HCRYPTOIDFUNCSET; stdcall;
-{$EXTERNALSYM CryptInitOIDFunctionSet}
-
-//+-------------------------------------------------------------------------
-// Search the list of installed functions for an encoding type and OID match.
-// If not found, search the registry.
-//
-// For success, returns TRUE with *ppvFuncAddr updated with the function's
-// address and *phFuncAddr updated with the function address's handle.
-// The function's handle is AddRef'ed. CryptFreeOIDFunctionAddress needs to
-// be called to release it.
-//
-// For a registry match, the Dll containing the function is loaded.
-//
-// By default, both the registered and installed function lists are searched.
-// Set CRYPT_GET_INSTALLED_OID_FUNC_FLAG to only search the installed list
-// of functions. This flag would be set by a registered function to get
-// the address of a pre-installed function it was replacing. For example,
-// the registered function might handle a new special case and call the
-// pre-installed function to handle the remaining cases.
-//--------------------------------------------------------------------------
-
-function CryptGetOIDFunctionAddress(hFuncSet: HCRYPTOIDFUNCSET;
- dwEncodingType: DWORD; pszOID: LPCSTR; dwFlags: DWORD;
- var ppvFuncAddr: Pointer; var phFuncAddr: HCRYPTOIDFUNCADDR): BOOL; stdcall;
-{$EXTERNALSYM CryptGetOIDFunctionAddress}
-
-const
- CRYPT_GET_INSTALLED_OID_FUNC_FLAG = $1;
- {$EXTERNALSYM CRYPT_GET_INSTALLED_OID_FUNC_FLAG}
-
-//+-------------------------------------------------------------------------
-// Get the list of registered default Dll entries for the specified
-// function set and encoding type.
-//
-// The returned list consists of none, one or more null terminated Dll file
-// names. The list is terminated with an empty (L"\0") Dll file name.
-// For example: L"first.dll" L"\0" L"second.dll" L"\0" L"\0"
-//--------------------------------------------------------------------------
-
-function CryptGetDefaultOIDDllList(hFuncSet: HCRYPTOIDFUNCSET; dwEncodingType: DWORD;
- pwszDllList: LPWSTR; pcchDllList: DWORD): BOOL; stdcall;
-{$EXTERNALSYM CryptGetDefaultOIDDllList}
-
-//+-------------------------------------------------------------------------
-// Either: get the first or next installed DEFAULT function OR
-// load the Dll containing the DEFAULT function.
-//
-// If pwszDll is NULL, search the list of installed DEFAULT functions.
-// *phFuncAddr must be set to NULL to get the first installed function.
-// Successive installed functions are returned by setting *phFuncAddr
-// to the hFuncAddr returned by the previous call.
-//
-// If pwszDll is NULL, the input *phFuncAddr
-// is always CryptFreeOIDFunctionAddress'ed by this function, even for
-// an error.
-//
-// If pwszDll isn't NULL, then, attempts to load the Dll and the DEFAULT
-// function. *phFuncAddr is ignored upon entry and isn't
-// CryptFreeOIDFunctionAddress'ed.
-//
-// For success, returns TRUE with *ppvFuncAddr updated with the function's
-// address and *phFuncAddr updated with the function address's handle.
-// The function's handle is AddRef'ed. CryptFreeOIDFunctionAddress needs to
-// be called to release it or CryptGetDefaultOIDFunctionAddress can also
-// be called for a NULL pwszDll.
-//--------------------------------------------------------------------------
-
-function CryptGetDefaultOIDFunctionAddress(hFuncSet: HCRYPTOIDFUNCSET;
- dwEncodingType: DWORD; pwszDll: LPCWSTR; dwFlags: DWORD;
- var ppvFuncAddr: Pointer; phFuncAddr: HCRYPTOIDFUNCADDR): BOOL; stdcall;
-{$EXTERNALSYM CryptGetDefaultOIDFunctionAddress}
-
-//+-------------------------------------------------------------------------
-// Releases the handle AddRef'ed and returned by CryptGetOIDFunctionAddress
-// or CryptGetDefaultOIDFunctionAddress.
-//
-// If a Dll was loaded for the function its unloaded. However, before doing
-// the unload, the DllCanUnloadNow function exported by the loaded Dll is
-// called. It should return S_FALSE to inhibit the unload or S_TRUE to enable
-// the unload. If the Dll doesn't export DllCanUnloadNow, the Dll is unloaded.
-//
-// DllCanUnloadNow has the following signature:
-// STDAPI DllCanUnloadNow(void);
-//--------------------------------------------------------------------------
-
-function CryptFreeOIDFunctionAddress(hFuncAddr: HCRYPTOIDFUNCADDR; dwFlags: DWORD): BOOL; stdcall;
-{$EXTERNALSYM CryptFreeOIDFunctionAddress}
-
-//+-------------------------------------------------------------------------
-// Register the Dll containing the function to be called for the specified
-// encoding type, function name and OID.
-//
-// pwszDll may contain environment-variable strings
-// which are ExpandEnvironmentStrings()'ed before loading the Dll.
-//
-// In addition to registering the DLL, you may override the
-// name of the function to be called. For example,
-// pszFuncName = "CryptDllEncodeObject",
-// pszOverrideFuncName = "MyEncodeXyz".
-// This allows a Dll to export multiple OID functions for the same
-// function name without needing to interpose its own OID dispatcher function.
-//--------------------------------------------------------------------------
-
-function CryptRegisterOIDFunction(dwEncodingType: DWORD; pszFuncName: LPCSTR;
- pszOID: LPCSTR; pwszDll: LPCWSTR; pszOverrideFuncName: LPCSTR): BOOL; stdcall;
-{$EXTERNALSYM CryptRegisterOIDFunction}
-
-//+-------------------------------------------------------------------------
-// Unregister the Dll containing the function to be called for the specified
-// encoding type, function name and OID.
-//--------------------------------------------------------------------------
-
-function CryptUnregisterOIDFunction(dwEncodingType: DWORD; pszFuncName: LPCSTR;
- pszOID: LPCSTR): BOOL; stdcall;
-{$EXTERNALSYM CryptUnregisterOIDFunction}
-
-//+-------------------------------------------------------------------------
-// Register the Dll containing the default function to be called for the
-// specified encoding type and function name.
-//
-// Unlike CryptRegisterOIDFunction, you can't override the function name
-// needing to be exported by the Dll.
-//
-// The Dll is inserted before the entry specified by dwIndex.
-// dwIndex == 0, inserts at the beginning.
-// dwIndex == CRYPT_REGISTER_LAST_INDEX, appends at the end.
-//
-// pwszDll may contain environment-variable strings
-// which are ExpandEnvironmentStrings()'ed before loading the Dll.
-//--------------------------------------------------------------------------
-
-function CryptRegisterDefaultOIDFunction(dwEncodingType: DWORD; pszFuncName: LPCSTR;
- dwIndex: DWORD; pwszDll: LPCWSTR): BOOL; stdcall;
-{$EXTERNALSYM CryptRegisterDefaultOIDFunction}
-
-const
- CRYPT_REGISTER_FIRST_INDEX = 0;
- {$EXTERNALSYM CRYPT_REGISTER_FIRST_INDEX}
- CRYPT_REGISTER_LAST_INDEX = DWORD($FFFFFFFF);
- {$EXTERNALSYM CRYPT_REGISTER_LAST_INDEX}
-
-//+-------------------------------------------------------------------------
-// Unregister the Dll containing the default function to be called for
-// the specified encoding type and function name.
-//--------------------------------------------------------------------------
-
-function CryptUnregisterDefaultOIDFunction(dwEncodingType: DWORD;
- pszFuncName: LPCSTR; pwszDll: LPCWSTR): BOOL; stdcall;
-{$EXTERNALSYM CryptUnregisterDefaultOIDFunction}
-
-//+-------------------------------------------------------------------------
-// Set the value for the specified encoding type, function name, OID and
-// value name.
-//
-// See RegSetValueEx for the possible value types.
-//
-// String types are UNICODE.
-//--------------------------------------------------------------------------
-
-function CryptSetOIDFunctionValue(dwEncodingType: DWORD; pszFuncName: LPCSTR;
- pszOID: LPCSTR; pwszValueName: LPCWSTR; dwValueType: DWORD; pbValueData: LPBYTE;
- cbValueData: DWORD): BOOL; stdcall;
-{$EXTERNALSYM CryptSetOIDFunctionValue}
-
-//+-------------------------------------------------------------------------
-// Get the value for the specified encoding type, function name, OID and
-// value name.
-//
-// See RegEnumValue for the possible value types.
-//
-// String types are UNICODE.
-//--------------------------------------------------------------------------
-
-function CryptGetOIDFunctionValue(dwEncodingType: DWORD; pszFuncName: LPCSTR;
- pszOID: LPCSTR; pwszValueName: LPCWSTR; var pdwValueType: DWORD;
- pbValueData: LPBYTE; var pcbValueData: DWORD): BOOL; stdcall;
-{$EXTERNALSYM CryptGetOIDFunctionValue}
-
-type
- PFN_CRYPT_ENUM_OID_FUNC = function(dwEncodingType: DWORD; pszFuncName,
- pszOID: LPCSTR; cValue: DWORD; rgdwValueType: LPDWORD;
- rgpwszValueName: LPCWSTR; rgpbValueData: LPBYTE; rgcbValueData: LPDWORD;
- pvArg: Pointer): BOOL; stdcall;
- {$EXTERNALSYM PFN_CRYPT_ENUM_OID_FUNC}
- PFnCryptEnumOidFunc = PFN_CRYPT_ENUM_OID_FUNC;
-
-//+-------------------------------------------------------------------------
-// Enumerate the OID functions identified by their encoding type,
-// function name and OID.
-//
-// pfnEnumOIDFunc is called for each registry key matching the input
-// parameters. Setting dwEncodingType to CRYPT_MATCH_ANY_ENCODING_TYPE matches
-// any. Setting pszFuncName or pszOID to NULL matches any.
-//
-// Set pszOID == CRYPT_DEFAULT_OID to restrict the enumeration to only the
-// DEFAULT functions
-//
-// String types are UNICODE.
-//--------------------------------------------------------------------------
-
-function CryptEnumOIDFunction(dwEncodingType: DWORD; pszFuncName, pszOID: LPCSTR;
- dwFlags: DWORD; pvArg: Pointer; pfnEnumOIDFunc: PFN_CRYPT_ENUM_OID_FUNC): BOOL; stdcall;
-{$EXTERNALSYM CryptEnumOIDFunction}
-
-const
- CRYPT_MATCH_ANY_ENCODING_TYPE = DWORD($FFFFFFFF);
- {$EXTERNALSYM CRYPT_MATCH_ANY_ENCODING_TYPE}
-
-//+=========================================================================
-// Object IDentifier (OID) Information: Data Structures and APIs
-//==========================================================================
-
-//+-------------------------------------------------------------------------
-// OID Information
-//--------------------------------------------------------------------------
-
-type
- PCRYPT_OID_INFO = ^CRYPT_OID_INFO;
- {$EXTERNALSYM PCRYPT_OID_INFO}
- _CRYPT_OID_INFO = record
- cbSize: DWORD;
- pszOID: LPCSTR;
- pwszName: LPCWSTR;
- dwGroupId: DWORD;
- Union: record
- case Integer of
- 0: (dwValue: DWORD);
- 1: (Algid: ALG_ID);
- 2: (dwLength: DWORD);
- end;
- ExtraInfo: CRYPT_DATA_BLOB;
- end;
- {$EXTERNALSYM _CRYPT_OID_INFO}
- CRYPT_OID_INFO = _CRYPT_OID_INFO;
- {$EXTERNALSYM CRYPT_OID_INFO}
- TCryptOidInfo = CRYPT_OID_INFO;
- PCryptOidInfo = PCRYPT_OID_INFO;
-
- CCRYPT_OID_INFO = CRYPT_OID_INFO;
- {$EXTERNALSYM CCRYPT_OID_INFO}
- PCCRYPT_OID_INFO = PCRYPT_OID_INFO;
- {$EXTERNALSYM PCCRYPT_OID_INFO}
-
-//+-------------------------------------------------------------------------
-// OID Group IDs
-//--------------------------------------------------------------------------
-
-const
- CRYPT_HASH_ALG_OID_GROUP_ID = 1;
- {$EXTERNALSYM CRYPT_HASH_ALG_OID_GROUP_ID}
- CRYPT_ENCRYPT_ALG_OID_GROUP_ID = 2;
- {$EXTERNALSYM CRYPT_ENCRYPT_ALG_OID_GROUP_ID}
- CRYPT_PUBKEY_ALG_OID_GROUP_ID = 3;
- {$EXTERNALSYM CRYPT_PUBKEY_ALG_OID_GROUP_ID}
- CRYPT_SIGN_ALG_OID_GROUP_ID = 4;
- {$EXTERNALSYM CRYPT_SIGN_ALG_OID_GROUP_ID}
- CRYPT_RDN_ATTR_OID_GROUP_ID = 5;
- {$EXTERNALSYM CRYPT_RDN_ATTR_OID_GROUP_ID}
- CRYPT_EXT_OR_ATTR_OID_GROUP_ID = 6;
- {$EXTERNALSYM CRYPT_EXT_OR_ATTR_OID_GROUP_ID}
- CRYPT_ENHKEY_USAGE_OID_GROUP_ID = 7;
- {$EXTERNALSYM CRYPT_ENHKEY_USAGE_OID_GROUP_ID}
- CRYPT_POLICY_OID_GROUP_ID = 8;
- {$EXTERNALSYM CRYPT_POLICY_OID_GROUP_ID}
- CRYPT_LAST_OID_GROUP_ID = 8;
- {$EXTERNALSYM CRYPT_LAST_OID_GROUP_ID}
-
- CRYPT_FIRST_ALG_OID_GROUP_ID = CRYPT_HASH_ALG_OID_GROUP_ID;
- {$EXTERNALSYM CRYPT_FIRST_ALG_OID_GROUP_ID}
- CRYPT_LAST_ALG_OID_GROUP_ID = CRYPT_SIGN_ALG_OID_GROUP_ID;
- {$EXTERNALSYM CRYPT_LAST_ALG_OID_GROUP_ID}
-
-// The CRYPT_*_ALG_OID_GROUP_ID's have an Algid. The CRYPT_RDN_ATTR_OID_GROUP_ID
-// has a dwLength. The CRYPT_EXT_OR_ATTR_OID_GROUP_ID,
-// CRYPT_ENHKEY_USAGE_OID_GROUP_ID or CRYPT_POLICY_OID_GROUP_ID don't have a
-// dwValue.
-//
-
-// CRYPT_PUBKEY_ALG_OID_GROUP_ID has the following optional ExtraInfo:
-// DWORD[0] - Flags. CRYPT_OID_INHIBIT_SIGNATURE_FORMAT_FLAG can be set to
-// inhibit the reformatting of the signature before
-// CryptVerifySignature is called or after CryptSignHash
-// is called. CRYPT_OID_USE_PUBKEY_PARA_FOR_PKCS7_FLAG can
-// be set to include the public key algorithm's parameters
-// in the PKCS7's digestEncryptionAlgorithm's parameters.
-// CRYPT_OID_NO_NULL_ALGORITHM_PARA_FLAG can be set to omit
-// NULL parameters when encoding.
-
- CRYPT_OID_INHIBIT_SIGNATURE_FORMAT_FLAG = $1;
- {$EXTERNALSYM CRYPT_OID_INHIBIT_SIGNATURE_FORMAT_FLAG}
- CRYPT_OID_USE_PUBKEY_PARA_FOR_PKCS7_FLAG = $2;
- {$EXTERNALSYM CRYPT_OID_USE_PUBKEY_PARA_FOR_PKCS7_FLAG}
- CRYPT_OID_NO_NULL_ALGORITHM_PARA_FLAG = $4;
- {$EXTERNALSYM CRYPT_OID_NO_NULL_ALGORITHM_PARA_FLAG}
-
-// CRYPT_SIGN_ALG_OID_GROUP_ID has the following optional ExtraInfo:
-// DWORD[0] - Public Key Algid.
-// DWORD[1] - Flags. Same as above for CRYPT_PUBKEY_ALG_OID_GROUP_ID.
-// DWORD[2] - Optional CryptAcquireContext(CRYPT_VERIFYCONTEXT)'s dwProvType.
-// If omitted or 0, uses Public Key Algid to select
-// appropriate dwProvType for signature verification.
-
-// CRYPT_RDN_ATTR_OID_GROUP_ID has the following optional ExtraInfo:
-// Array of DWORDs:
-// [0 ..] - Null terminated list of acceptable RDN attribute
-// value types. An empty list implies CERT_RDN_PRINTABLE_STRING,
-// CERT_RDN_UNICODE_STRING, 0.
-
-//+-------------------------------------------------------------------------
-// Find OID information. Returns NULL if unable to find any information
-// for the specified key and group. Note, returns a pointer to a constant
-// data structure. The returned pointer MUST NOT be freed.
-//
-// dwKeyType's:
-// CRYPT_OID_INFO_OID_KEY, pvKey points to a szOID
-// CRYPT_OID_INFO_NAME_KEY, pvKey points to a wszName
-// CRYPT_OID_INFO_ALGID_KEY, pvKey points to an ALG_ID
-// CRYPT_OID_INFO_SIGN_KEY, pvKey points to an array of two ALG_ID's:
-// ALG_ID[0] - Hash Algid
-// ALG_ID[1] - PubKey Algid
-//
-// Setting dwGroupId to 0, searches all groups according to the dwKeyType.
-// Otherwise, only the dwGroupId is searched.
-//--------------------------------------------------------------------------
-
-function CryptFindOIDInfo(dwKeyType: DWORD; pvKey: Pointer; dwGroupId: DWORD): PCCRYPT_OID_INFO; stdcall;
-{$EXTERNALSYM CryptFindOIDInfo}
-
-const
- CRYPT_OID_INFO_OID_KEY = 1;
- {$EXTERNALSYM CRYPT_OID_INFO_OID_KEY}
- CRYPT_OID_INFO_NAME_KEY = 2;
- {$EXTERNALSYM CRYPT_OID_INFO_NAME_KEY}
- CRYPT_OID_INFO_ALGID_KEY = 3;
- {$EXTERNALSYM CRYPT_OID_INFO_ALGID_KEY}
- CRYPT_OID_INFO_SIGN_KEY = 4;
- {$EXTERNALSYM CRYPT_OID_INFO_SIGN_KEY}
-
-//+-------------------------------------------------------------------------
-// Register OID information. The OID information specified in the
-// CCRYPT_OID_INFO structure is persisted to the registry.
-//
-// crypt32.dll contains information for the commonly known OIDs. This function
-// allows applications to augment crypt32.dll's OID information. During
-// CryptFindOIDInfo's first call, the registered OID information is installed.
-//
-// By default the registered OID information is installed after crypt32.dll's
-// OID entries. Set CRYPT_INSTALL_OID_INFO_BEFORE_FLAG to install before.
-//--------------------------------------------------------------------------
-
-function CryptRegisterOIDInfo(pInfo: PCCRYPT_OID_INFO; dwFlags: DWORD): BOOL; stdcall;
-{$EXTERNALSYM CryptRegisterOIDInfo}
-
-const
- CRYPT_INSTALL_OID_INFO_BEFORE_FLAG = 1;
- {$EXTERNALSYM CRYPT_INSTALL_OID_INFO_BEFORE_FLAG}
-
-//+-------------------------------------------------------------------------
-// Unregister OID information. Only the pszOID and dwGroupId fields are
-// used to identify the OID information to be unregistered.
-//--------------------------------------------------------------------------
-
-function CryptUnregisterOIDInfo(pInfo: PCCRYPT_OID_INFO): BOOL; stdcall;
-{$EXTERNALSYM CryptUnregisterOIDInfo}
-
-// If the callback returns FALSE, stops the enumeration.
-
-type
- PFN_CRYPT_ENUM_OID_INFO = function(pInfo: PCCRYPT_OID_INFO; pvArg: Pointer): BOOL; stdcall;
- {$EXTERNALSYM PFN_CRYPT_ENUM_OID_INFO}
- PFnCryptEnumOidInfo = PFN_CRYPT_ENUM_OID_INFO;
-
-//+-------------------------------------------------------------------------
-// Enumerate the OID information.
-//
-// pfnEnumOIDInfo is called for each OID information entry.
-//
-// Setting dwGroupId to 0 matches all groups. Otherwise, only enumerates
-// entries in the specified group.
-//
-// dwFlags currently isn't used and must be set to 0.
-//--------------------------------------------------------------------------
-
-function CryptEnumOIDInfo(dwGroupId: DWORD; dwFlags: DWORD; pvArg: Pointer;
- pfnEnumOIDInfo: PFN_CRYPT_ENUM_OID_INFO): BOOL; stdcall;
-{$EXTERNALSYM CryptEnumOIDInfo}
-
-//+-------------------------------------------------------------------------
-// Find the localized name for the specified name. For example, find the
-// localized name for the "Root" system store name. A case insensitive
-// string comparison is done.
-//
-// Returns NULL if unable to find the the specified name.
-//
-// Localized names for the predefined system stores ("Root", "My") and
-// predefined physical stores (".Default", ".LocalMachine") are pre-installed
-// as resource strings in crypt32.dll. CryptSetOIDFunctionValue can be called
-// as follows to register additional localized strings:
-// dwEncodingType = CRYPT_LOCALIZED_NAME_ENCODING_TYPE
-// pszFuncName = CRYPT_OID_FIND_LOCALIZED_NAME_FUNC
-// pszOID = CRYPT_LOCALIZED_NAME_OID
-// pwszValueName = Name to be localized, for example, L"ApplicationStore"
-// dwValueType = REG_SZ
-// pbValueData = pointer to the UNICODE localized string
-// cbValueData = (wcslen(UNICODE localized string) + 1) * sizeof(WCHAR)
-//
-// To unregister, set pbValueData to NULL and cbValueData to 0.
-//
-// The registered names are searched before the pre-installed names.
-//--------------------------------------------------------------------------
-
-function CryptFindLocalizedName(pwszCryptName: LPCWSTR): LPCWSTR; stdcall;
-{$EXTERNALSYM CryptFindLocalizedName}
-
-const
- CRYPT_LOCALIZED_NAME_ENCODING_TYPE = 0;
- {$EXTERNALSYM CRYPT_LOCALIZED_NAME_ENCODING_TYPE}
- CRYPT_LOCALIZED_NAME_OID = 'LocalizedNames';
- {$EXTERNALSYM CRYPT_LOCALIZED_NAME_OID}
-
-//+=========================================================================
-// Low Level Cryptographic Message Data Structures and APIs
-//==========================================================================
-
-type
- HCRYPTMSG = Pointer;
- {$EXTERNALSYM HCRYPTMSG}
- PHCRYPTMSG = ^HCRYPTMSG;
- {$NODEFINE PHCRYPTMSG}
-
-const
- szOID_PKCS_7_DATA = '1.2.840.113549.1.7.1';
- {$EXTERNALSYM szOID_PKCS_7_DATA}
- szOID_PKCS_7_SIGNED = '1.2.840.113549.1.7.2';
- {$EXTERNALSYM szOID_PKCS_7_SIGNED}
- szOID_PKCS_7_ENVELOPED = '1.2.840.113549.1.7.3';
- {$EXTERNALSYM szOID_PKCS_7_ENVELOPED}
- szOID_PKCS_7_SIGNEDANDENVELOPED = '1.2.840.113549.1.7.4';
- {$EXTERNALSYM szOID_PKCS_7_SIGNEDANDENVELOPED}
- szOID_PKCS_7_DIGESTED = '1.2.840.113549.1.7.5';
- {$EXTERNALSYM szOID_PKCS_7_DIGESTED}
- szOID_PKCS_7_ENCRYPTED = '1.2.840.113549.1.7.6';
- {$EXTERNALSYM szOID_PKCS_7_ENCRYPTED}
-
- szOID_PKCS_9_CONTENT_TYPE = '1.2.840.113549.1.9.3';
- {$EXTERNALSYM szOID_PKCS_9_CONTENT_TYPE}
- szOID_PKCS_9_MESSAGE_DIGEST = '1.2.840.113549.1.9.4';
- {$EXTERNALSYM szOID_PKCS_9_MESSAGE_DIGEST}
-
-//+-------------------------------------------------------------------------
-// Message types
-//--------------------------------------------------------------------------
-
- CMSG_DATA = 1;
- {$EXTERNALSYM CMSG_DATA}
- CMSG_SIGNED = 2;
- {$EXTERNALSYM CMSG_SIGNED}
- CMSG_ENVELOPED = 3;
- {$EXTERNALSYM CMSG_ENVELOPED}
- CMSG_SIGNED_AND_ENVELOPED = 4;
- {$EXTERNALSYM CMSG_SIGNED_AND_ENVELOPED}
- CMSG_HASHED = 5;
- {$EXTERNALSYM CMSG_HASHED}
- CMSG_ENCRYPTED = 6;
- {$EXTERNALSYM CMSG_ENCRYPTED}
-
-//+-------------------------------------------------------------------------
-// Message Type Bit Flags
-//--------------------------------------------------------------------------
-
- CMSG_ALL_FLAGS = not 0;
- {$EXTERNALSYM CMSG_ALL_FLAGS}
- CMSG_DATA_FLAG = 1 shl CMSG_DATA;
- {$EXTERNALSYM CMSG_DATA_FLAG}
- CMSG_SIGNED_FLAG = 1 shl CMSG_SIGNED;
- {$EXTERNALSYM CMSG_SIGNED_FLAG}
- CMSG_ENVELOPED_FLAG = 1 shl CMSG_ENVELOPED;
- {$EXTERNALSYM CMSG_ENVELOPED_FLAG}
- CMSG_SIGNED_AND_ENVELOPED_FLAG = 1 shl CMSG_SIGNED_AND_ENVELOPED;
- {$EXTERNALSYM CMSG_SIGNED_AND_ENVELOPED_FLAG}
- CMSG_HASHED_FLAG = 1 shl CMSG_HASHED;
- {$EXTERNALSYM CMSG_HASHED_FLAG}
- CMSG_ENCRYPTED_FLAG = 1 shl CMSG_ENCRYPTED;
- {$EXTERNALSYM CMSG_ENCRYPTED_FLAG}
-
-//+-------------------------------------------------------------------------
-// Certificate Issuer and SerialNumber
-//--------------------------------------------------------------------------
-
-type
- PCERT_ISSUER_SERIAL_NUMBER = ^CERT_ISSUER_SERIAL_NUMBER;
- {$EXTERNALSYM PCERT_ISSUER_SERIAL_NUMBER}
- _CERT_ISSUER_SERIAL_NUMBER = record
- Issuer: CERT_NAME_BLOB;
- SerialNumber: CRYPT_INTEGER_BLOB;
- end;
- {$EXTERNALSYM _CERT_ISSUER_SERIAL_NUMBER}
- CERT_ISSUER_SERIAL_NUMBER = _CERT_ISSUER_SERIAL_NUMBER;
- {$EXTERNALSYM CERT_ISSUER_SERIAL_NUMBER}
- TCertIssuerSerialNumber = CERT_ISSUER_SERIAL_NUMBER;
- PCertIssuerSerialNumber = PCERT_ISSUER_SERIAL_NUMBER;
-
-//+-------------------------------------------------------------------------
-// Certificate Identifier
-//--------------------------------------------------------------------------
-
- PCERT_ID = ^CERT_ID;
- {$EXTERNALSYM PCERT_ID}
- _CERT_ID = record
- dwIdChoice: DWORD;
- case Integer of
- // CERT_ID_ISSUER_SERIAL_NUMBER
- 0: (IssuerSerialNumber: CERT_ISSUER_SERIAL_NUMBER);
- // CERT_ID_KEY_IDENTIFIER
- 1: (KeyId: CRYPT_HASH_BLOB);
- // CERT_ID_SHA1_HASH
- 2: (HashId: CRYPT_HASH_BLOB);
- end;
- {$EXTERNALSYM _CERT_ID}
- CERT_ID = _CERT_ID;
- {$EXTERNALSYM CERT_ID}
- TCertId = CERT_ID;
- PCertId = PCERT_ID;
-
-const
- CERT_ID_ISSUER_SERIAL_NUMBER = 1;
- {$EXTERNALSYM CERT_ID_ISSUER_SERIAL_NUMBER}
- CERT_ID_KEY_IDENTIFIER = 2;
- {$EXTERNALSYM CERT_ID_KEY_IDENTIFIER}
- CERT_ID_SHA1_HASH = 3;
- {$EXTERNALSYM CERT_ID_SHA1_HASH}
-
-//+-------------------------------------------------------------------------
-// The message encode information (pvMsgEncodeInfo) is message type dependent
-//--------------------------------------------------------------------------
-
-//+-------------------------------------------------------------------------
-// CMSG_DATA: pvMsgEncodeInfo = NULL
-//--------------------------------------------------------------------------
-
-//+-------------------------------------------------------------------------
-// CMSG_SIGNED
-//
-// The pCertInfo in the CMSG_SIGNER_ENCODE_INFO provides the Issuer, SerialNumber
-// and PublicKeyInfo.Algorithm. The PublicKeyInfo.Algorithm implicitly
-// specifies the HashEncryptionAlgorithm to be used.
-//
-// If the SignerId is present with a nonzero dwIdChoice its used instead
-// of the Issuer and SerialNumber in pCertInfo.
-//
-// CMS supports the KEY_IDENTIFIER and ISSUER_SERIAL_NUMBER CERT_IDs. PKCS #7
-// version 1.5 only supports the ISSUER_SERIAL_NUMBER CERT_ID choice.
-//
-// If HashEncryptionAlgorithm is present and not NULL its used instead of
-// the PublicKeyInfo.Algorithm.
-//
-// Note, for RSA, the hash encryption algorithm is normally the same as
-// the public key algorithm. For DSA, the hash encryption algorithm is
-// normally a DSS signature algorithm.
-//
-// pvHashEncryptionAuxInfo currently isn't used and must be set to NULL if
-// present in the data structure.
-//
-// The hCryptProv and dwKeySpec specify the private key to use. If dwKeySpec
-// == 0, then, defaults to AT_SIGNATURE.
-//
-// If CMSG_CRYPT_RELEASE_CONTEXT_FLAG is set in the dwFlags
-// passed to CryptMsgOpenToEncode(), the signer hCryptProv's are released.
-//
-// pvHashAuxInfo currently isn't used and must be set to NULL.
-//
-// CMS signed messages allow the inclusion of Attribute Certs.
-//--------------------------------------------------------------------------
-
-type
- PCMSG_SIGNER_ENCODE_INFO = ^CMSG_SIGNER_ENCODE_INFO;
- {$EXTERNALSYM PCMSG_SIGNER_ENCODE_INFO}
- _CMSG_SIGNER_ENCODE_INFO = record
- cbSize: DWORD;
- pCertInfo: PCERT_INFO;
- hCryptProv: HCRYPTPROV;
- dwKeySpec: DWORD;
- HashAlgorithm: CRYPT_ALGORITHM_IDENTIFIER;
- pvHashAuxInfo: Pointer;
- cAuthAttr: DWORD;
- rgAuthAttr: PCRYPT_ATTRIBUTE;
- cUnauthAttr: DWORD;
- rgUnauthAttr: PCRYPT_ATTRIBUTE;
- {$IFDEF CMSG_SIGNER_ENCODE_INFO_HAS_CMS_FIELDS}
- SignerId: CERT_ID;
- HashEncryptionAlgorithm: CRYPT_ALGORITHM_IDENTIFIER;
- pvHashEncryptionAuxInfo: Pointer;
- {$ENDIF CMSG_SIGNER_ENCODE_INFO_HAS_CMS_FIELDS}
- end;
- {$EXTERNALSYM _CMSG_SIGNER_ENCODE_INFO}
- CMSG_SIGNER_ENCODE_INFO = _CMSG_SIGNER_ENCODE_INFO;
- {$EXTERNALSYM CMSG_SIGNER_ENCODE_INFO}
- TCmsgSignerEncodeInfo = CMSG_SIGNER_ENCODE_INFO;
- PCmsgSignerEncodeInfo = PCMSG_SIGNER_ENCODE_INFO;
-
- PCMSG_SIGNED_ENCODE_INFO = ^CMSG_SIGNED_ENCODE_INFO;
- {$EXTERNALSYM PCMSG_SIGNED_ENCODE_INFO}
- _CMSG_SIGNED_ENCODE_INFO = record
- cbSize: DWORD;
- cSigners: DWORD;
- rgSigners: PCMSG_SIGNER_ENCODE_INFO;
- cCertEncoded: DWORD;
- rgCertEncoded: PCERT_BLOB;
- cCrlEncoded: DWORD;
- rgCrlEncoded: PCRL_BLOB;
- {$IFDEF CMSG_SIGNED_ENCODE_INFO_HAS_CMS_FIELDS}
- cAttrCertEncoded: DWORD;
- rgAttrCertEncoded: PCERT_BLOB;
- {$ENDIF CMSG_SIGNED_ENCODE_INFO_HAS_CMS_FIELDS}
- end;
- {$EXTERNALSYM _CMSG_SIGNED_ENCODE_INFO}
- CMSG_SIGNED_ENCODE_INFO = _CMSG_SIGNED_ENCODE_INFO;
- {$EXTERNALSYM CMSG_SIGNED_ENCODE_INFO}
- TCmsgSignedEncodeInfo = CMSG_SIGNED_ENCODE_INFO;
- PCmsgSignedEncodeInfo = PCMSG_SIGNED_ENCODE_INFO;
-
-//+-------------------------------------------------------------------------
-// CMSG_ENVELOPED
-//
-// The PCERT_INFO for the rgRecipients provides the Issuer, SerialNumber
-// and PublicKeyInfo. The PublicKeyInfo.Algorithm implicitly
-// specifies the KeyEncryptionAlgorithm to be used.
-//
-// The PublicKeyInfo.PublicKey in PCERT_INFO is used to encrypt the content
-// encryption key for the recipient.
-//
-// hCryptProv is used to do the content encryption, recipient key encryption
-// and export. The hCryptProv's private keys aren't used. If hCryptProv
-// is NULL, a default hCryptProv is chosen according to the
-// ContentEncryptionAlgorithm and the first recipient KeyEncryptionAlgorithm.
-//
-// If CMSG_CRYPT_RELEASE_CONTEXT_FLAG is set in the dwFlags
-// passed to CryptMsgOpenToEncode(), the envelope's hCryptProv is released.
-//
-// Note: CAPI currently doesn't support more than one KeyEncryptionAlgorithm
-// per provider. This will need to be fixed.
-//
-// Currently, pvEncryptionAuxInfo is only defined for RC2 or RC4 encryption
-// algorithms. Otherwise, its not used and must be set to NULL.
-// See CMSG_RC2_AUX_INFO for the RC2 encryption algorithms.
-// See CMSG_RC4_AUX_INFO for the RC4 encryption algorithms.
-//
-// To enable SP3 compatible encryption, pvEncryptionAuxInfo should point to
-// a CMSG_SP3_COMPATIBLE_AUX_INFO data structure.
-//
-// To enable the CMS envelope enhancements, rgpRecipients must be set to
-// NULL, and rgCmsRecipients updated to point to an array of
-// CMSG_RECIPIENT_ENCODE_INFO's.
-//
-// Also, CMS envelope enhancements support the inclusion of a bag of
-// Certs, CRLs, Attribute Certs and/or Unprotected Attributes.
-//--------------------------------------------------------------------------
-
-type
- PCMSG_ENVELOPED_ENCODE_INFO = ^CMSG_ENVELOPED_ENCODE_INFO;
- {$EXTERNALSYM PCMSG_ENVELOPED_ENCODE_INFO}
- _CMSG_ENVELOPED_ENCODE_INFO = record
- cbSize: DWORD;
- hCryptProv: HCRYPTPROV;
- ContentEncryptionAlgorithm: CRYPT_ALGORITHM_IDENTIFIER;
- pvEncryptionAuxInfo: Pointer;
- cRecipients: DWORD;
- // The following array may only be used for transport recipients identified
- // by their IssuereAndSerialNumber. If rgpRecipients != NULL, then,
- // the rgCmsRecipients must be NULL.
- rgpRecipients: PCERT_INFO;
- {$IFDEF CMSG_ENVELOPED_ENCODE_INFO_HAS_CMS_FIELDS}
- // If rgCmsRecipients != NULL, then, the above rgpRecipients must be
- // NULL.
- rgCmsRecipients: PCMSG_RECIPIENT_ENCODE_INFO;
- cCertEncoded: DWORD;
- rgCertEncoded: PCERT_BLOB;
- cCrlEncoded: DWORD;
- rgCrlEncoded: PCRL_BLOB;
- cAttrCertEncoded: DWORD;
- rgAttrCertEncoded: PCERT_BLOB;
- cUnprotectedAttr: DWORD;
- rgUnprotectedAttr: PCRYPT_ATTRIBUTE;
- {$ENDIF CMSG_ENVELOPED_ENCODE_INFO_HAS_CMS_FIELDS}
- end;
- {$EXTERNALSYM _CMSG_ENVELOPED_ENCODE_INFO}
- CMSG_ENVELOPED_ENCODE_INFO = _CMSG_ENVELOPED_ENCODE_INFO;
- {$EXTERNALSYM CMSG_ENVELOPED_ENCODE_INFO}
- TCmsgEnvelopedEncodeInfo = CMSG_ENVELOPED_ENCODE_INFO;
- PCmsgEnvelopedEncodeInfo = PCMSG_ENVELOPED_ENCODE_INFO;
-
-//+-------------------------------------------------------------------------
-// Key Transport Recipient Encode Info
-//
-// hCryptProv is used to do the recipient key encryption
-// and export. The hCryptProv's private keys aren't used.
-//
-// If hCryptProv is NULL, then, the hCryptProv specified in
-// CMSG_ENVELOPED_ENCODE_INFO is used.
-//
-// Note, even if CMSG_CRYPT_RELEASE_CONTEXT_FLAG is set in the dwFlags
-// passed to CryptMsgOpenToEncode(), this hCryptProv isn't released.
-//
-// CMS supports the KEY_IDENTIFIER and ISSUER_SERIAL_NUMBER CERT_IDs. PKCS #7
-// version 1.5 only supports the ISSUER_SERIAL_NUMBER CERT_ID choice.
-//--------------------------------------------------------------------------
-
- PCMSG_KEY_TRANS_RECIPIENT_ENCODE_INFO = ^CMSG_KEY_TRANS_RECIPIENT_ENCODE_INFO;
- {$EXTERNALSYM PCMSG_KEY_TRANS_RECIPIENT_ENCODE_INFO}
- _CMSG_KEY_TRANS_RECIPIENT_ENCODE_INFO = record
- cbSize: DWORD;
- KeyEncryptionAlgorithm: CRYPT_ALGORITHM_IDENTIFIER;
- pvKeyEncryptionAuxInfo: Pointer;
- hCryptProv: HCRYPTPROV;
- RecipientPublicKey: CRYPT_BIT_BLOB;
- RecipientId: CERT_ID;
- end;
- {$EXTERNALSYM _CMSG_KEY_TRANS_RECIPIENT_ENCODE_INFO}
- CMSG_KEY_TRANS_RECIPIENT_ENCODE_INFO = _CMSG_KEY_TRANS_RECIPIENT_ENCODE_INFO;
- {$EXTERNALSYM CMSG_KEY_TRANS_RECIPIENT_ENCODE_INFO}
- TCmsgKeyTransRecipientEncodeInfo = CMSG_KEY_TRANS_RECIPIENT_ENCODE_INFO;
- PCmsgKeyTransRecipientEncodeInfo = PCMSG_KEY_TRANS_RECIPIENT_ENCODE_INFO;
-
-//+-------------------------------------------------------------------------
-// Key Agreement Recipient Encode Info
-//
-// If hCryptProv is NULL, then, the hCryptProv specified in
-// CMSG_ENVELOPED_ENCODE_INFO is used.
-//
-// For the CMSG_KEY_AGREE_STATIC_KEY_CHOICE, both the hCryptProv and
-// dwKeySpec must be specified to select the sender's private key.
-//
-// Note, even if CMSG_CRYPT_RELEASE_CONTEXT_FLAG is set in the dwFlags
-// passed to CryptMsgOpenToEncode(), this hCryptProv isn't released.
-//
-// CMS supports the KEY_IDENTIFIER and ISSUER_SERIAL_NUMBER CERT_IDs.
-//
-// There is 1 key choice, ephemeral originator. The originator's ephemeral
-// key is generated using the public key algorithm parameters shared
-// amongst all the recipients.
-//
-// There are 2 key choices: ephemeral originator or static sender. The
-// originator's ephemeral key is generated using the public key algorithm
-// parameters shared amongst all the recipients. For the static sender its
-// private key is used. The hCryptProv and dwKeySpec specify the private key.
-// The pSenderId identifies the certificate containing the sender's public key.
-//
-// Currently, pvKeyEncryptionAuxInfo isn't used and must be set to NULL.
-//
-// If KeyEncryptionAlgorithm.Parameters.cbData == 0, then, its Parameters
-// are updated with the encoded KeyWrapAlgorithm.
-//
-// Currently, pvKeyWrapAuxInfo is only defined for algorithms with
-// RC2. Otherwise, its not used and must be set to NULL.
-// When set for RC2 algorithms, points to a CMSG_RC2_AUX_INFO containing
-// the RC2 effective key length.
-//
-// Note, key agreement recipients are not supported in PKCS #7 version 1.5.
-//--------------------------------------------------------------------------
-
- PCMSG_RECIPIENT_ENCRYPTED_KEY_ENCODE_INFO = ^CMSG_RECIPIENT_ENCRYPTED_KEY_ENCODE_INFO;
- {$EXTERNALSYM PCMSG_RECIPIENT_ENCRYPTED_KEY_ENCODE_INFO}
- _CMSG_RECIPIENT_ENCRYPTED_KEY_ENCODE_INFO = record
- cbSize: DWORD;
- RecipientPublicKey: CRYPT_BIT_BLOB;
- RecipientId: CERT_ID;
- // Following fields are optional and only applicable to KEY_IDENTIFIER
- // CERT_IDs.
- Date: FILETIME;
- pOtherAttr: PCRYPT_ATTRIBUTE_TYPE_VALUE;
- end;
- {$EXTERNALSYM _CMSG_RECIPIENT_ENCRYPTED_KEY_ENCODE_INFO}
- CMSG_RECIPIENT_ENCRYPTED_KEY_ENCODE_INFO = _CMSG_RECIPIENT_ENCRYPTED_KEY_ENCODE_INFO;
- {$EXTERNALSYM CMSG_RECIPIENT_ENCRYPTED_KEY_ENCODE_INFO}
- TCmsgRecipientEncryptedKeyEncodeInfo = CMSG_RECIPIENT_ENCRYPTED_KEY_ENCODE_INFO;
- PCmsgRecipientEncryptedKeyEncodeInfo = PCMSG_RECIPIENT_ENCRYPTED_KEY_ENCODE_INFO;
-
- PCMSG_KEY_AGREE_RECIPIENT_ENCODE_INFO = ^CMSG_KEY_AGREE_RECIPIENT_ENCODE_INFO;
- {$EXTERNALSYM PCMSG_KEY_AGREE_RECIPIENT_ENCODE_INFO}
- _CMSG_KEY_AGREE_RECIPIENT_ENCODE_INFO = record
- cbSize: DWORD;
- KeyEncryptionAlgorithm: CRYPT_ALGORITHM_IDENTIFIER;
- pvKeyEncryptionAuxInfo: Pointer;
- KeyWrapAlgorithm: CRYPT_ALGORITHM_IDENTIFIER;
- pvKeyWrapAuxInfo: Pointer;
- // The following hCryptProv and dwKeySpec must be specified for the
- // CMSG_KEY_AGREE_STATIC_KEY_CHOICE.
- //
- // For CMSG_KEY_AGREE_EPHEMERAL_KEY_CHOICE, dwKeySpec isn't applicable
- // and hCryptProv is optional.
- hCryptProv: HCRYPTPROV;
- dwKeySpec: DWORD;
- dwKeyChoice: DWORD;
- Union: record
- case Integer of
- // CMSG_KEY_AGREE_EPHEMERAL_KEY_CHOICE
- //
- // The ephemeral public key algorithm and parameters.
- 0: (pEphemeralAlgorithm: PCRYPT_ALGORITHM_IDENTIFIER);
- // CMSG_KEY_AGREE_STATIC_KEY_CHOICE
- //
- // The CertId of the sender's certificate
- 1: (pSenderId: PCERT_ID);
- end;
- UserKeyingMaterial: CRYPT_DATA_BLOB; // OPTIONAL
- cRecipientEncryptedKeys: DWORD;
- rgpRecipientEncryptedKeys: PCMSG_RECIPIENT_ENCRYPTED_KEY_ENCODE_INFO;
- end;
- {$EXTERNALSYM _CMSG_KEY_AGREE_RECIPIENT_ENCODE_INFO}
- CMSG_KEY_AGREE_RECIPIENT_ENCODE_INFO = _CMSG_KEY_AGREE_RECIPIENT_ENCODE_INFO;
- {$EXTERNALSYM CMSG_KEY_AGREE_RECIPIENT_ENCODE_INFO}
- TCmsgKeyAgreeRecipientEncodeInfo = CMSG_KEY_AGREE_RECIPIENT_ENCODE_INFO;
- PCmsgKeyAgreeRecipientEncodeInfo = PCMSG_KEY_AGREE_RECIPIENT_ENCODE_INFO;
-
-const
- CMSG_KEY_AGREE_EPHEMERAL_KEY_CHOICE = 1;
- {$EXTERNALSYM CMSG_KEY_AGREE_EPHEMERAL_KEY_CHOICE}
- CMSG_KEY_AGREE_STATIC_KEY_CHOICE = 2;
- {$EXTERNALSYM CMSG_KEY_AGREE_STATIC_KEY_CHOICE}
-
-//+-------------------------------------------------------------------------
-// Mail List Recipient Encode Info
-//
-// There is 1 choice for the KeyEncryptionKey: an already created CSP key
-// handle. For the key handle choice, hCryptProv must be nonzero. This key
-// handle isn't destroyed.
-//
-// Note, even if CMSG_CRYPT_RELEASE_CONTEXT_FLAG is set in the dwFlags
-// passed to CryptMsgOpenToEncode(), this hCryptProv isn't released.
-//
-// Currently, pvKeyEncryptionAuxInfo is only defined for RC2 key wrap
-// algorithms. Otherwise, its not used and must be set to NULL.
-// When set for RC2 algorithms, points to a CMSG_RC2_AUX_INFO containing
-// the RC2 effective key length.
-//
-// Note, mail list recipients are not supported in PKCS #7 version 1.5.
-//--------------------------------------------------------------------------
-
-type
- PCMSG_MAIL_LIST_RECIPIENT_ENCODE_INFO = ^CMSG_MAIL_LIST_RECIPIENT_ENCODE_INFO;
- {$EXTERNALSYM PCMSG_MAIL_LIST_RECIPIENT_ENCODE_INFO}
- _CMSG_MAIL_LIST_RECIPIENT_ENCODE_INFO = record
- cbSize: DWORD;
- KeyEncryptionAlgorithm: CRYPT_ALGORITHM_IDENTIFIER;
- pvKeyEncryptionAuxInfo: Pointer;
- hCryptProv: HCRYPTPROV;
- dwKeyChoice: DWORD;
- Union: record
- case Integer of
- // CMSG_MAIL_LIST_HANDLE_KEY_CHOICE
- 0: (hKeyEncryptionKey: HCRYPTKEY);
- // Reserve space for a potential pointer choice
- 1: (pvKeyEncryptionKey: Pointer);
- end;
- KeyId: CRYPT_DATA_BLOB;
- // Following fields are optional.
- Date: FILETIME;
- pOtherAttr: PCRYPT_ATTRIBUTE_TYPE_VALUE;
- end;
- {$EXTERNALSYM _CMSG_MAIL_LIST_RECIPIENT_ENCODE_INFO}
- CMSG_MAIL_LIST_RECIPIENT_ENCODE_INFO = _CMSG_MAIL_LIST_RECIPIENT_ENCODE_INFO;
- {$EXTERNALSYM CMSG_MAIL_LIST_RECIPIENT_ENCODE_INFO}
- TCmsgMailListRecipientEncodeInfo = CMSG_MAIL_LIST_RECIPIENT_ENCODE_INFO;
- PCmsgMailListRecipientEncodeInfo = PCMSG_MAIL_LIST_RECIPIENT_ENCODE_INFO;
-
-const
- CMSG_MAIL_LIST_HANDLE_KEY_CHOICE = 1;
- {$EXTERNALSYM CMSG_MAIL_LIST_HANDLE_KEY_CHOICE}
-
-//+-------------------------------------------------------------------------
-// Recipient Encode Info
-//
-// Note, only key transport recipients are supported in PKCS #7 version 1.5.
-//--------------------------------------------------------------------------
-
-type
- PCMSG_RECIPIENT_ENCODE_INFO = ^CMSG_RECIPIENT_ENCODE_INFO;
- {$NODEFINE PCMSG_RECIPIENT_ENCODE_INFO}
- _CMSG_RECIPIENT_ENCODE_INFO = record
- dwRecipientChoice: DWORD;
- case Integer of
- // CMSG_KEY_TRANS_RECIPIENT
- 0: (pKeyTrans: PCMSG_KEY_TRANS_RECIPIENT_ENCODE_INFO);
- // CMSG_KEY_AGREE_RECIPIENT
- 1: (pKeyAgree: PCMSG_KEY_AGREE_RECIPIENT_ENCODE_INFO);
- // CMSG_MAIL_LIST_RECIPIENT
- 2: (pMailList: PCMSG_MAIL_LIST_RECIPIENT_ENCODE_INFO);
- end;
- {$EXTERNALSYM _CMSG_RECIPIENT_ENCODE_INFO}
- CMSG_RECIPIENT_ENCODE_INFO = _CMSG_RECIPIENT_ENCODE_INFO;
- {$NODEFINE CMSG_RECIPIENT_ENCODE_INFO}
- TCmsgRecipientEncodeInfo = CMSG_RECIPIENT_ENCODE_INFO;
- PCmsgRecipientEncodeInfo = PCMSG_RECIPIENT_ENCODE_INFO;
-
-const
- CMSG_KEY_TRANS_RECIPIENT = 1;
- {$EXTERNALSYM CMSG_KEY_TRANS_RECIPIENT}
- CMSG_KEY_AGREE_RECIPIENT = 2;
- {$EXTERNALSYM CMSG_KEY_AGREE_RECIPIENT}
- CMSG_MAIL_LIST_RECIPIENT = 3;
- {$EXTERNALSYM CMSG_MAIL_LIST_RECIPIENT}
-
-//+-------------------------------------------------------------------------
-// CMSG_RC2_AUX_INFO
-//
-// AuxInfo for RC2 encryption algorithms. The pvEncryptionAuxInfo field
-// in CMSG_ENCRYPTED_ENCODE_INFO should be updated to point to this
-// structure. If not specified, defaults to 40 bit.
-//
-// Note, this AuxInfo is only used when, the ContentEncryptionAlgorithm's
-// Parameter.cbData is zero. Otherwise, the Parameters is decoded to
-// get the bit length.
-//
-// If CMSG_SP3_COMPATIBLE_ENCRYPT_FLAG is set in dwBitLen, then, SP3
-// compatible encryption is done and the bit length is ignored.
-//--------------------------------------------------------------------------
-
-type
- PCMSG_RC2_AUX_INFO = ^CMSG_RC2_AUX_INFO;
- {$EXTERNALSYM PCMSG_RC2_AUX_INFO}
- _CMSG_RC2_AUX_INFO = record
- cbSize: DWORD;
- dwBitLen: DWORD;
- end;
- {$EXTERNALSYM _CMSG_RC2_AUX_INFO}
- CMSG_RC2_AUX_INFO = _CMSG_RC2_AUX_INFO;
- {$EXTERNALSYM CMSG_RC2_AUX_INFO}
- TCmsgRc2AuxInfo = CMSG_RC2_AUX_INFO;
- PCmsgRc2AuxInfo = PCMSG_RC2_AUX_INFO;
-
-//+-------------------------------------------------------------------------
-// CMSG_SP3_COMPATIBLE_AUX_INFO
-//
-// AuxInfo for enabling SP3 compatible encryption.
-//
-// The CMSG_SP3_COMPATIBLE_ENCRYPT_FLAG is set in dwFlags to enable SP3
-// compatible encryption. When set, uses zero salt instead of no salt,
-// the encryption algorithm parameters are NULL instead of containing the
-// encoded RC2 parameters or encoded IV octet string and the encrypted
-// symmetric key is encoded little endian instead of big endian.
-//--------------------------------------------------------------------------
-
- PCMSG_SP3_COMPATIBLE_AUX_INFO = ^CMSG_SP3_COMPATIBLE_AUX_INFO;
- {$EXTERNALSYM PCMSG_SP3_COMPATIBLE_AUX_INFO}
- _CMSG_SP3_COMPATIBLE_AUX_INFO = record
- cbSize: DWORD;
- dwFlags: DWORD;
- end;
- {$EXTERNALSYM _CMSG_SP3_COMPATIBLE_AUX_INFO}
- CMSG_SP3_COMPATIBLE_AUX_INFO = _CMSG_SP3_COMPATIBLE_AUX_INFO;
- {$EXTERNALSYM CMSG_SP3_COMPATIBLE_AUX_INFO}
- TCmsgSp3CompatibleAuxInfo = CMSG_SP3_COMPATIBLE_AUX_INFO;
- PCmsgSp3CompatibleAuxInfo = PCMSG_SP3_COMPATIBLE_AUX_INFO;
-
-const
- CMSG_SP3_COMPATIBLE_ENCRYPT_FLAG = DWORD($80000000);
- {$EXTERNALSYM CMSG_SP3_COMPATIBLE_ENCRYPT_FLAG}
-
-//+-------------------------------------------------------------------------
-// CMSG_RC4_AUX_INFO
-//
-// AuxInfo for RC4 encryption algorithms. The pvEncryptionAuxInfo field
-// in CMSG_ENCRYPTED_ENCODE_INFO should be updated to point to this
-// structure. If not specified, uses the CSP's default bit length with no
-// salt. Note, the base CSP has a 40 bit default and the enhanced CSP has
-// a 128 bit default.
-//
-// If CMSG_RC4_NO_SALT_FLAG is set in dwBitLen, then, no salt is generated.
-// Otherwise, (128 - dwBitLen)/8 bytes of salt are generated and encoded
-// as an OCTET STRING in the algorithm parameters field.
-//--------------------------------------------------------------------------
-
-type
- PCMSG_RC4_AUX_INFO = ^CMSG_RC4_AUX_INFO;
- {$EXTERNALSYM PCMSG_RC4_AUX_INFO}
- _CMSG_RC4_AUX_INFO = record
- cbSize: DWORD;
- dwBitLen: DWORD;
- end;
- {$EXTERNALSYM _CMSG_RC4_AUX_INFO}
- CMSG_RC4_AUX_INFO = _CMSG_RC4_AUX_INFO;
- {$EXTERNALSYM CMSG_RC4_AUX_INFO}
- TCmsgRc4AuxInfo = CMSG_RC4_AUX_INFO;
- PCmsgRc4AuxInfo = PCMSG_RC4_AUX_INFO;
-
-const
- CMSG_RC4_NO_SALT_FLAG = $40000000;
- {$EXTERNALSYM CMSG_RC4_NO_SALT_FLAG}
-
-//+-------------------------------------------------------------------------
-// CMSG_SIGNED_AND_ENVELOPED
-//
-// For PKCS #7, a signed and enveloped message doesn't have the
-// signer's authenticated or unauthenticated attributes. Otherwise, a
-// combination of the CMSG_SIGNED_ENCODE_INFO and CMSG_ENVELOPED_ENCODE_INFO.
-//--------------------------------------------------------------------------
-
-type
- PCMSG_SIGNED_AND_ENVELOPED_ENCODE_INFO = ^CMSG_SIGNED_AND_ENVELOPED_ENCODE_INFO;
- {$EXTERNALSYM PCMSG_SIGNED_AND_ENVELOPED_ENCODE_INFO}
- _CMSG_SIGNED_AND_ENVELOPED_ENCODE_INFO = record
- cbSize: DWORD;
- SignedInfo: CMSG_SIGNED_ENCODE_INFO;
- EnvelopedInfo: CMSG_ENVELOPED_ENCODE_INFO;
- end;
- {$EXTERNALSYM _CMSG_SIGNED_AND_ENVELOPED_ENCODE_INFO}
- CMSG_SIGNED_AND_ENVELOPED_ENCODE_INFO = _CMSG_SIGNED_AND_ENVELOPED_ENCODE_INFO;
- {$EXTERNALSYM CMSG_SIGNED_AND_ENVELOPED_ENCODE_INFO}
- TCmsgSignedAndEnvelopedEncodeInfo = CMSG_SIGNED_AND_ENVELOPED_ENCODE_INFO;
- PCmsgSignedAndEnvelopedEncodeInfo = PCMSG_SIGNED_AND_ENVELOPED_ENCODE_INFO;
-
-//+-------------------------------------------------------------------------
-// CMSG_HASHED
-//
-// hCryptProv is used to do the hash. Doesn't need to use a private key.
-//
-// If CMSG_CRYPT_RELEASE_CONTEXT_FLAG is set in the dwFlags
-// passed to CryptMsgOpenToEncode(), the hCryptProv is released.
-//
-// If fDetachedHash is set, then, the encoded message doesn't contain
-// any content (its treated as NULL Data)
-//
-// pvHashAuxInfo currently isn't used and must be set to NULL.
-//--------------------------------------------------------------------------
-
- PCMSG_HASHED_ENCODE_INFO = ^CMSG_HASHED_ENCODE_INFO;
- {$EXTERNALSYM PCMSG_HASHED_ENCODE_INFO}
- _CMSG_HASHED_ENCODE_INFO = record
- cbSize: DWORD;
- hCryptProv: HCRYPTPROV;
- HashAlgorithm: CRYPT_ALGORITHM_IDENTIFIER;
- pvHashAuxInfo: Pointer;
- end;
- {$EXTERNALSYM _CMSG_HASHED_ENCODE_INFO}
- CMSG_HASHED_ENCODE_INFO = _CMSG_HASHED_ENCODE_INFO;
- {$EXTERNALSYM CMSG_HASHED_ENCODE_INFO}
- TCmsgHashedEncodeInfo = CMSG_HASHED_ENCODE_INFO;
- PCmsgHashedEncodeInfo = PCMSG_HASHED_ENCODE_INFO;
-
-//+-------------------------------------------------------------------------
-// CMSG_ENCRYPTED
-//
-// The key used to encrypt the message is identified outside of the message
-// content (for example, password).
-//
-// The content input to CryptMsgUpdate has already been encrypted.
-//
-// pvEncryptionAuxInfo currently isn't used and must be set to NULL.
-//--------------------------------------------------------------------------
-
- PCMSG_ENCRYPTED_ENCODE_INFO = ^CMSG_ENCRYPTED_ENCODE_INFO;
- {$EXTERNALSYM PCMSG_ENCRYPTED_ENCODE_INFO}
- _CMSG_ENCRYPTED_ENCODE_INFO = record
- cbSize: DWORD;
- ContentEncryptionAlgorithm: CRYPT_ALGORITHM_IDENTIFIER;
- pvEncryptionAuxInfo: Pointer;
- end;
- {$EXTERNALSYM _CMSG_ENCRYPTED_ENCODE_INFO}
- CMSG_ENCRYPTED_ENCODE_INFO = _CMSG_ENCRYPTED_ENCODE_INFO;
- {$EXTERNALSYM CMSG_ENCRYPTED_ENCODE_INFO}
- TCmsgEncryptedEncodeInfo = CMSG_ENCRYPTED_ENCODE_INFO;
- PCmsgEncryptedEncodeInfo = PCMSG_ENCRYPTED_ENCODE_INFO;
-
-//+-------------------------------------------------------------------------
-// This parameter allows messages to be of variable length with streamed
-// output.
-//
-// By default, messages are of a definite length and
-// CryptMsgGetParam(CMSG_CONTENT_PARAM) is
-// called to get the cryptographically processed content. Until closed,
-// the handle keeps a copy of the processed content.
-//
-// With streamed output, the processed content can be freed as its streamed.
-//
-// If the length of the content to be updated is known at the time of the
-// open, then, ContentLength should be set to that length. Otherwise, it
-// should be set to CMSG_INDEFINITE_LENGTH.
-//--------------------------------------------------------------------------
-
-type
- PFN_CMSG_STREAM_OUTPUT = function(pvArg: Pointer; pbData: LPBYTE;
- cbData: DWORD; fFinal: BOOL): BOOL; stdcall;
- {$EXTERNALSYM PFN_CMSG_STREAM_OUTPUT}
- PFnCMsgStreamOutput = PFN_CMSG_STREAM_OUTPUT;
-
-const
- CMSG_INDEFINITE_LENGTH = DWORD($FFFFFFFF);
- {$EXTERNALSYM CMSG_INDEFINITE_LENGTH}
-
-type
- PCMSG_STREAM_INFO = ^CMSG_STREAM_INFO;
- {$EXTERNALSYM PCMSG_STREAM_INFO}
- _CMSG_STREAM_INFO = record
- cbContent: DWORD;
- pfnStreamOutput: PFN_CMSG_STREAM_OUTPUT;
- pvArg: Pointer;
- end;
- {$EXTERNALSYM _CMSG_STREAM_INFO}
- CMSG_STREAM_INFO = _CMSG_STREAM_INFO;
- {$EXTERNALSYM CMSG_STREAM_INFO}
- TCmsgStreamInfo = CMSG_STREAM_INFO;
- PCmsgStreamInfo = PCMSG_STREAM_INFO;
-
-//+-------------------------------------------------------------------------
-// Open dwFlags
-//--------------------------------------------------------------------------
-
-const
- CMSG_BARE_CONTENT_FLAG = $00000001;
- {$EXTERNALSYM CMSG_BARE_CONTENT_FLAG}
- CMSG_LENGTH_ONLY_FLAG = $00000002;
- {$EXTERNALSYM CMSG_LENGTH_ONLY_FLAG}
- CMSG_DETACHED_FLAG = $00000004;
- {$EXTERNALSYM CMSG_DETACHED_FLAG}
- CMSG_AUTHENTICATED_ATTRIBUTES_FLAG = $00000008;
- {$EXTERNALSYM CMSG_AUTHENTICATED_ATTRIBUTES_FLAG}
- CMSG_CONTENTS_OCTETS_FLAG = $00000010;
- {$EXTERNALSYM CMSG_CONTENTS_OCTETS_FLAG}
- CMSG_MAX_LENGTH_FLAG = $00000020;
- {$EXTERNALSYM CMSG_MAX_LENGTH_FLAG}
-
-// When set, nonData type inner content is encapsulated within an
-// OCTET STRING. Applicable to both Signed and Enveloped messages.
-
- CMSG_CMS_ENCAPSULATED_CONTENT_FLAG = $00000040;
- {$EXTERNALSYM CMSG_CMS_ENCAPSULATED_CONTENT_FLAG}
-
-// If set, then, the hCryptProv passed to CryptMsgOpenToEncode or
-// CryptMsgOpenToDecode is released on the final CryptMsgClose.
-// Not released if CryptMsgOpenToEncode or CryptMsgOpenToDecode fails.
-//
-// Note, the envelope recipient hCryptProv's aren't released.
-
- CMSG_CRYPT_RELEASE_CONTEXT_FLAG = $00008000;
- {$EXTERNALSYM CMSG_CRYPT_RELEASE_CONTEXT_FLAG}
-
-//+-------------------------------------------------------------------------
-// Open a cryptographic message for encoding
-//
-// For PKCS #7:
-// If the content to be passed to CryptMsgUpdate has already
-// been message encoded (the input to CryptMsgUpdate is the streamed output
-// from another message encode), then, the CMSG_ENCODED_CONTENT_INFO_FLAG should
-// be set in dwFlags. If not set, then, the inner ContentType is Data and
-// the input to CryptMsgUpdate is treated as the inner Data type's Content,
-// a string of bytes.
-// If CMSG_BARE_CONTENT_FLAG is specified for a streamed message,
-// the streamed output will not have an outer ContentInfo wrapper. This
-// makes it suitable to be streamed into an enclosing message.
-//
-// The pStreamInfo parameter needs to be set to stream the encoded message
-// output.
-//--------------------------------------------------------------------------
-
-function CryptMsgOpenToEncode(dwMsgEncodingType, dwFlags, dwMsgType: DWORD;
- pvMsgEncodeInfo: Pointer; pszInnerContentObjID: LPSTR;
- pStreamInfo: PCMSG_STREAM_INFO): HCRYPTMSG; stdcall;
-{$EXTERNALSYM CryptMsgOpenToEncode}
-
-//+-------------------------------------------------------------------------
-// Calculate the length of an encoded cryptographic message.
-//
-// Calculates the length of the encoded message given the
-// message type, encoding parameters and total length of
-// the data to be updated. Note, this might not be the exact length. However,
-// it will always be greater than or equal to the actual length.
-//--------------------------------------------------------------------------
-
-function CryptMsgCalculateEncodedLength(dwMsgEncodingType, dwFlags, dwMsgType: DWORD;
- pvMsgEncodeInfo: Pointer; pszInnerContentObjID: LPSTR; cbData: DWORD): DWORD; stdcall;
-{$EXTERNALSYM CryptMsgCalculateEncodedLength}
-
-//+-------------------------------------------------------------------------
-// Open a cryptographic message for decoding
-//
-// hCryptProv specifies the crypto provider to use for hashing and/or
-// decrypting the message. If hCryptProv is NULL, a default crypt provider
-// is used.
-//
-// Currently pRecipientInfo isn't used and should be set to NULL.
-//
-// The pStreamInfo parameter needs to be set to stream the decoded content
-// output.
-//--------------------------------------------------------------------------
-
-function CryptMsgOpenToDecode(dwMsgEncodingType, dwFlags, dwMsgType: DWORD;
- hCryptProv: HCRYPTPROV; pRecipientInfo: PCERT_INFO;
- pStreamInfo: PCMSG_STREAM_INFO): HCRYPTMSG; stdcall;
-{$EXTERNALSYM CryptMsgOpenToDecode}
-
-//+-------------------------------------------------------------------------
-// Duplicate a cryptographic message handle
-//--------------------------------------------------------------------------
-
-function CryptMsgDuplicate(hCryptMsg: HCRYPTMSG): HCRYPTMSG; stdcall;
-{$EXTERNALSYM CryptMsgDuplicate}
-
-//+-------------------------------------------------------------------------
-// Close a cryptographic message handle
-//
-// LastError is preserved unless FALSE is returned.
-//--------------------------------------------------------------------------
-
-function CryptMsgClose(hCryptMsg: HCRYPTMSG): BOOL; stdcall;
-{$EXTERNALSYM CryptMsgClose}
-
-//+-------------------------------------------------------------------------
-// Update the content of a cryptographic message. Depending on how the
-// message was opened, the content is either encoded or decoded.
-//
-// This function is repetitively called to append to the message content.
-// fFinal is set to identify the last update. On fFinal, the encode/decode
-// is completed. The encoded/decoded content and the decoded parameters
-// are valid until the open and all duplicated handles are closed.
-//--------------------------------------------------------------------------
-
-function CryptMsgUpdate(hCryptMsg: HCRYPTMSG; pbData: LPBYTE; cbData: DWORD;
- fFinal: BOOL): BOOL; stdcall;
-{$EXTERNALSYM CryptMsgUpdate}
-
-//+-------------------------------------------------------------------------
-// Get a parameter after encoding/decoding a cryptographic message. Called
-// after the final CryptMsgUpdate. Only the CMSG_CONTENT_PARAM and
-// CMSG_COMPUTED_HASH_PARAM are valid for an encoded message.
-//
-// For an encoded HASHED message, the CMSG_COMPUTED_HASH_PARAM can be got
-// before any CryptMsgUpdates to get its length.
-//
-// The pvData type definition depends on the dwParamType value.
-//
-// Elements pointed to by fields in the pvData structure follow the
-// structure. Therefore, *pcbData may exceed the size of the structure.
-//
-// Upon input, if *pcbData == 0, then, *pcbData is updated with the length
-// of the data and the pvData parameter is ignored.
-//
-// Upon return, *pcbData is updated with the length of the data.
-//
-// The OBJID BLOBs returned in the pvData structures point to
-// their still encoded representation. The appropriate functions
-// must be called to decode the information.
-//
-// See below for a list of the parameters to get.
-//--------------------------------------------------------------------------
-
-function CryptMsgGetParam(hCryptMsg: HCRYPTMSG; dwParamType, dwIndex: DWORD;
- pvData: Pointer; var pcbData: DWORD): BOOL; stdcall;
-{$EXTERNALSYM CryptMsgGetParam}
-
-//+-------------------------------------------------------------------------
-// Get parameter types and their corresponding data structure definitions.
-//--------------------------------------------------------------------------
-
-const
- CMSG_TYPE_PARAM = 1;
- {$EXTERNALSYM CMSG_TYPE_PARAM}
- CMSG_CONTENT_PARAM = 2;
- {$EXTERNALSYM CMSG_CONTENT_PARAM}
- CMSG_BARE_CONTENT_PARAM = 3;
- {$EXTERNALSYM CMSG_BARE_CONTENT_PARAM}
- CMSG_INNER_CONTENT_TYPE_PARAM = 4;
- {$EXTERNALSYM CMSG_INNER_CONTENT_TYPE_PARAM}
- CMSG_SIGNER_COUNT_PARAM = 5;
- {$EXTERNALSYM CMSG_SIGNER_COUNT_PARAM}
- CMSG_SIGNER_INFO_PARAM = 6;
- {$EXTERNALSYM CMSG_SIGNER_INFO_PARAM}
- CMSG_SIGNER_CERT_INFO_PARAM = 7;
- {$EXTERNALSYM CMSG_SIGNER_CERT_INFO_PARAM}
- CMSG_SIGNER_HASH_ALGORITHM_PARAM = 8;
- {$EXTERNALSYM CMSG_SIGNER_HASH_ALGORITHM_PARAM}
- CMSG_SIGNER_AUTH_ATTR_PARAM = 9;
- {$EXTERNALSYM CMSG_SIGNER_AUTH_ATTR_PARAM}
- CMSG_SIGNER_UNAUTH_ATTR_PARAM = 10;
- {$EXTERNALSYM CMSG_SIGNER_UNAUTH_ATTR_PARAM}
- CMSG_CERT_COUNT_PARAM = 11;
- {$EXTERNALSYM CMSG_CERT_COUNT_PARAM}
- CMSG_CERT_PARAM = 12;
- {$EXTERNALSYM CMSG_CERT_PARAM}
- CMSG_CRL_COUNT_PARAM = 13;
- {$EXTERNALSYM CMSG_CRL_COUNT_PARAM}
- CMSG_CRL_PARAM = 14;
- {$EXTERNALSYM CMSG_CRL_PARAM}
- CMSG_ENVELOPE_ALGORITHM_PARAM = 15;
- {$EXTERNALSYM CMSG_ENVELOPE_ALGORITHM_PARAM}
- CMSG_RECIPIENT_COUNT_PARAM = 17;
- {$EXTERNALSYM CMSG_RECIPIENT_COUNT_PARAM}
- CMSG_RECIPIENT_INDEX_PARAM = 18;
- {$EXTERNALSYM CMSG_RECIPIENT_INDEX_PARAM}
- CMSG_RECIPIENT_INFO_PARAM = 19;
- {$EXTERNALSYM CMSG_RECIPIENT_INFO_PARAM}
- CMSG_HASH_ALGORITHM_PARAM = 20;
- {$EXTERNALSYM CMSG_HASH_ALGORITHM_PARAM}
- CMSG_HASH_DATA_PARAM = 21;
- {$EXTERNALSYM CMSG_HASH_DATA_PARAM}
- CMSG_COMPUTED_HASH_PARAM = 22;
- {$EXTERNALSYM CMSG_COMPUTED_HASH_PARAM}
- CMSG_ENCRYPT_PARAM = 26;
- {$EXTERNALSYM CMSG_ENCRYPT_PARAM}
- CMSG_ENCRYPTED_DIGEST = 27;
- {$EXTERNALSYM CMSG_ENCRYPTED_DIGEST}
- CMSG_ENCODED_SIGNER = 28;
- {$EXTERNALSYM CMSG_ENCODED_SIGNER}
- CMSG_ENCODED_MESSAGE = 29;
- {$EXTERNALSYM CMSG_ENCODED_MESSAGE}
- CMSG_VERSION_PARAM = 30;
- {$EXTERNALSYM CMSG_VERSION_PARAM}
- CMSG_ATTR_CERT_COUNT_PARAM = 31;
- {$EXTERNALSYM CMSG_ATTR_CERT_COUNT_PARAM}
- CMSG_ATTR_CERT_PARAM = 32;
- {$EXTERNALSYM CMSG_ATTR_CERT_PARAM}
- CMSG_CMS_RECIPIENT_COUNT_PARAM = 33;
- {$EXTERNALSYM CMSG_CMS_RECIPIENT_COUNT_PARAM}
- CMSG_CMS_RECIPIENT_INDEX_PARAM = 34;
- {$EXTERNALSYM CMSG_CMS_RECIPIENT_INDEX_PARAM}
- CMSG_CMS_RECIPIENT_ENCRYPTED_KEY_INDEX_PARAM = 35;
- {$EXTERNALSYM CMSG_CMS_RECIPIENT_ENCRYPTED_KEY_INDEX_PARAM}
- CMSG_CMS_RECIPIENT_INFO_PARAM = 36;
- {$EXTERNALSYM CMSG_CMS_RECIPIENT_INFO_PARAM}
- CMSG_UNPROTECTED_ATTR_PARAM = 37;
- {$EXTERNALSYM CMSG_UNPROTECTED_ATTR_PARAM}
- CMSG_SIGNER_CERT_ID_PARAM = 38;
- {$EXTERNALSYM CMSG_SIGNER_CERT_ID_PARAM}
- CMSG_CMS_SIGNER_INFO_PARAM = 39;
- {$EXTERNALSYM CMSG_CMS_SIGNER_INFO_PARAM}
-
-//+-------------------------------------------------------------------------
-// CMSG_TYPE_PARAM
-//
-// The type of the decoded message.
-//
-// pvData points to a DWORD
-//--------------------------------------------------------------------------
-
-//+-------------------------------------------------------------------------
-// CMSG_CONTENT_PARAM
-//
-// The encoded content of a cryptographic message. Depending on how the
-// message was opened, the content is either the whole PKCS#7
-// message (opened to encode) or the inner content (opened to decode).
-// In the decode case, the decrypted content is returned, if enveloped.
-// If not enveloped, and if the inner content is of type DATA, the returned
-// data is the contents octets of the inner content.
-//
-// pvData points to the buffer receiving the content bytes
-//--------------------------------------------------------------------------
-
-//+-------------------------------------------------------------------------
-// CMSG_BARE_CONTENT_PARAM
-//
-// The encoded content of an encoded cryptographic message, without the
-// outer layer of ContentInfo. That is, only the encoding of the
-// ContentInfo.content field is returned.
-//
-// pvData points to the buffer receiving the content bytes
-//--------------------------------------------------------------------------
-
-//+-------------------------------------------------------------------------
-// CMSG_INNER_CONTENT_TYPE_PARAM
-//
-// The type of the inner content of a decoded cryptographic message,
-// in the form of a NULL-terminated object identifier string
-// (eg. "1.2.840.113549.1.7.1").
-//
-// pvData points to the buffer receiving the object identifier string
-//--------------------------------------------------------------------------
-
-//+-------------------------------------------------------------------------
-// CMSG_SIGNER_COUNT_PARAM
-//
-// Count of signers in a SIGNED or SIGNED_AND_ENVELOPED message
-//
-// pvData points to a DWORD
-//--------------------------------------------------------------------------
-
-//+-------------------------------------------------------------------------
-// CMSG_SIGNER_CERT_INFO_PARAM
-//
-// To get all the signers, repetitively call CryptMsgGetParam, with
-// dwIndex set to 0 .. SignerCount - 1.
-//
-// pvData points to a CERT_INFO struct.
-//
-// Only the following fields have been updated in the CERT_INFO struct:
-// Issuer and SerialNumber.
-//
-// Note, if the KEYID choice was selected for a CMS SignerId, then, the
-// SerialNumber is 0 and the Issuer is encoded containing a single RDN with a
-// single Attribute whose OID is szOID_KEYID_RDN, value type is
-// CERT_RDN_OCTET_STRING and value is the KEYID. When the
-// CertGetSubjectCertificateFromStore and
-// CertFindCertificateInStore(CERT_FIND_SUBJECT_CERT) APIs see this
-// special KEYID Issuer and SerialNumber, they do a KEYID match.
-//--------------------------------------------------------------------------
-
-//+-------------------------------------------------------------------------
-// CMSG_SIGNER_INFO_PARAM
-//
-// To get all the signers, repetitively call CryptMsgGetParam, with
-// dwIndex set to 0 .. SignerCount - 1.
-//
-// pvData points to a CMSG_SIGNER_INFO struct.
-//
-// Note, if the KEYID choice was selected for a CMS SignerId, then, the
-// SerialNumber is 0 and the Issuer is encoded containing a single RDN with a
-// single Attribute whose OID is szOID_KEYID_RDN, value type is
-// CERT_RDN_OCTET_STRING and value is the KEYID. When the
-// CertGetSubjectCertificateFromStore and
-// CertFindCertificateInStore(CERT_FIND_SUBJECT_CERT) APIs see this
-// special KEYID Issuer and SerialNumber, they do a KEYID match.
-//--------------------------------------------------------------------------
-
-type
- PCMSG_SIGNER_INFO = ^CMSG_SIGNER_INFO;
- {$EXTERNALSYM PCMSG_SIGNER_INFO}
- _CMSG_SIGNER_INFO = record
- dwVersion: DWORD;
- Issuer: CERT_NAME_BLOB;
- SerialNumber: CRYPT_INTEGER_BLOB;
- HashAlgorithm: CRYPT_ALGORITHM_IDENTIFIER;
- HashEncryptionAlgorithm: CRYPT_ALGORITHM_IDENTIFIER;
- EncryptedHash: CRYPT_DATA_BLOB;
- AuthAttrs: CRYPT_ATTRIBUTES;
- UnauthAttrs: CRYPT_ATTRIBUTES;
- end;
- {$EXTERNALSYM _CMSG_SIGNER_INFO}
- CMSG_SIGNER_INFO = _CMSG_SIGNER_INFO;
- {$EXTERNALSYM CMSG_SIGNER_INFO}
- TCmsgSignerInfo = CMSG_SIGNER_INFO;
- PCmsgSignerInfo = PCMSG_SIGNER_INFO;
-
-//+-------------------------------------------------------------------------
-// CMSG_SIGNER_CERT_ID_PARAM
-//
-// To get all the signers, repetitively call CryptMsgGetParam, with
-// dwIndex set to 0 .. SignerCount - 1.
-//
-// pvData points to a CERT_ID struct.
-//--------------------------------------------------------------------------
-
-//+-------------------------------------------------------------------------
-// CMSG_CMS_SIGNER_INFO_PARAM
-//
-// Same as CMSG_SIGNER_INFO_PARAM, except, contains SignerId instead of
-// Issuer and SerialNumber.
-//
-// To get all the signers, repetitively call CryptMsgGetParam, with
-// dwIndex set to 0 .. SignerCount - 1.
-//
-// pvData points to a CMSG_CMS_SIGNER_INFO struct.
-//--------------------------------------------------------------------------
-
- PCMSG_CMS_SIGNER_INFO = ^CMSG_CMS_SIGNER_INFO;
- {$EXTERNALSYM PCMSG_CMS_SIGNER_INFO}
- _CMSG_CMS_SIGNER_INFO = record
- dwVersion: DWORD;
- SignerId: CERT_ID;
- HashAlgorithm: CRYPT_ALGORITHM_IDENTIFIER;
- HashEncryptionAlgorithm: CRYPT_ALGORITHM_IDENTIFIER;
- EncryptedHash: CRYPT_DATA_BLOB;
- AuthAttrs: CRYPT_ATTRIBUTES;
- UnauthAttrs: CRYPT_ATTRIBUTES;
- end;
- {$EXTERNALSYM _CMSG_CMS_SIGNER_INFO}
- CMSG_CMS_SIGNER_INFO = _CMSG_CMS_SIGNER_INFO;
- {$EXTERNALSYM CMSG_CMS_SIGNER_INFO}
- TCmsgCmsSignerInfo = CMSG_CMS_SIGNER_INFO;
- PCmsgCmsSignerInfo = PCMSG_CMS_SIGNER_INFO;
-
-//+-------------------------------------------------------------------------
-// CMSG_SIGNER_HASH_ALGORITHM_PARAM
-//
-// This parameter specifies the HashAlgorithm that was used for the signer.
-//
-// Set dwIndex to iterate through all the signers.
-//
-// pvData points to an CRYPT_ALGORITHM_IDENTIFIER struct.
-//--------------------------------------------------------------------------
-
-//+-------------------------------------------------------------------------
-// CMSG_SIGNER_AUTH_ATTR_PARAM
-//
-// The authenticated attributes for the signer.
-//
-// Set dwIndex to iterate through all the signers.
-//
-// pvData points to a CMSG_ATTR struct.
-//--------------------------------------------------------------------------
-
- CMSG_ATTR = CRYPT_ATTRIBUTES;
- {$EXTERNALSYM CMSG_ATTR}
- PCMSG_ATTR = ^CRYPT_ATTRIBUTES;
- {$EXTERNALSYM PCMSG_ATTR}
-
-//+-------------------------------------------------------------------------
-// CMSG_SIGNER_UNAUTH_ATTR_PARAM
-//
-// The unauthenticated attributes for the signer.
-//
-// Set dwIndex to iterate through all the signers.
-//
-// pvData points to a CMSG_ATTR struct.
-//--------------------------------------------------------------------------
-
-//+-------------------------------------------------------------------------
-// CMSG_CERT_COUNT_PARAM
-//
-// Count of certificates in a SIGNED or SIGNED_AND_ENVELOPED message.
-//
-// CMS, also supports certificates in an ENVELOPED message.
-//
-// pvData points to a DWORD
-//--------------------------------------------------------------------------
-
-//+-------------------------------------------------------------------------
-// CMSG_CERT_PARAM
-//
-// To get all the certificates, repetitively call CryptMsgGetParam, with
-// dwIndex set to 0 .. CertCount - 1.
-//
-// pvData points to an array of the certificate's encoded bytes.
-//--------------------------------------------------------------------------
-
-//+-------------------------------------------------------------------------
-// CMSG_CRL_COUNT_PARAM
-//
-// Count of CRLs in a SIGNED or SIGNED_AND_ENVELOPED message.
-//
-// CMS, also supports CRLs in an ENVELOPED message.
-//
-// pvData points to a DWORD
-//--------------------------------------------------------------------------
-
-//+-------------------------------------------------------------------------
-// CMSG_CRL_PARAM
-//
-// To get all the CRLs, repetitively call CryptMsgGetParam, with
-// dwIndex set to 0 .. CrlCount - 1.
-//
-// pvData points to an array of the CRL's encoded bytes.
-//--------------------------------------------------------------------------
-
-//+-------------------------------------------------------------------------
-// CMSG_ENVELOPE_ALGORITHM_PARAM
-//
-// The ContentEncryptionAlgorithm that was used in
-// an ENVELOPED or SIGNED_AND_ENVELOPED message.
-//
-// For streaming you must be able to successfully get this parameter before
-// doing a CryptMsgControl decrypt.
-//
-// pvData points to an CRYPT_ALGORITHM_IDENTIFIER struct.
-//--------------------------------------------------------------------------
-
-//+-------------------------------------------------------------------------
-// CMSG_RECIPIENT_COUNT_PARAM
-//
-// Count of recipients in an ENVELOPED or SIGNED_AND_ENVELOPED message.
-//
-// Count of key transport recepients.
-//
-// The CMSG_CMS_RECIPIENT_COUNT_PARAM has the total count of
-// recipients (it also includes key agree and mail list recipients).
-//
-// pvData points to a DWORD
-//--------------------------------------------------------------------------
-
-//+-------------------------------------------------------------------------
-// CMSG_RECIPIENT_INDEX_PARAM
-//
-// Index of the recipient used to decrypt an ENVELOPED or SIGNED_AND_ENVELOPED
-// message.
-//
-// Index of a key transport recipient. If a non key transport
-// recipient was used to decrypt, fails with LastError set to
-// CRYPT_E_INVALID_INDEX.
-//
-// pvData points to a DWORD
-//--------------------------------------------------------------------------
-
-//+-------------------------------------------------------------------------
-// CMSG_RECIPIENT_INFO_PARAM
-//
-// To get all the recipients, repetitively call CryptMsgGetParam, with
-// dwIndex set to 0 .. RecipientCount - 1.
-//
-// Only returns the key transport recepients.
-//
-// The CMSG_CMS_RECIPIENT_INFO_PARAM returns all recipients.
-//
-// pvData points to a CERT_INFO struct.
-//
-// Only the following fields have been updated in the CERT_INFO struct:
-// Issuer, SerialNumber and PublicKeyAlgorithm. The PublicKeyAlgorithm
-// specifies the KeyEncryptionAlgorithm that was used.
-//
-// Note, if the KEYID choice was selected for a key transport recipient, then,
-// the SerialNumber is 0 and the Issuer is encoded containing a single RDN
-// with a single Attribute whose OID is szOID_KEYID_RDN, value type is
-// CERT_RDN_OCTET_STRING and value is the KEYID. When the
-// CertGetSubjectCertificateFromStore and
-// CertFindCertificateInStore(CERT_FIND_SUBJECT_CERT) APIs see this
-// special KEYID Issuer and SerialNumber, they do a KEYID match.
-//--------------------------------------------------------------------------
-
-//+-------------------------------------------------------------------------
-// CMSG_HASH_ALGORITHM_PARAM
-//
-// The HashAlgorithm in a HASHED message.
-//
-// pvData points to an CRYPT_ALGORITHM_IDENTIFIER struct.
-//--------------------------------------------------------------------------
-
-//+-------------------------------------------------------------------------
-// CMSG_HASH_DATA_PARAM
-//
-// The hash in a HASHED message.
-//
-// pvData points to an array of bytes.
-//--------------------------------------------------------------------------
-
-//+-------------------------------------------------------------------------
-// CMSG_COMPUTED_HASH_PARAM
-//
-// The computed hash for a HASHED message.
-// This may be called for either an encoded or decoded message.
-//
-// Also, the computed hash for one of the signer's in a SIGNED message.
-// It may be called for either an encoded or decoded message after the
-// final update. Set dwIndex to iterate through all the signers.
-//
-// pvData points to an array of bytes.
-//--------------------------------------------------------------------------
-
-//+-------------------------------------------------------------------------
-// CMSG_ENCRYPT_PARAM
-//
-// The ContentEncryptionAlgorithm that was used in an ENCRYPTED message.
-//
-// pvData points to an CRYPT_ALGORITHM_IDENTIFIER struct.
-//--------------------------------------------------------------------------
-
-//+-------------------------------------------------------------------------
-// CMSG_ENCODED_MESSAGE
-//
-// The full encoded message. This is useful in the case of a decoded
-// message which has been modified (eg. a signed-data or
-// signed-and-enveloped-data message which has been countersigned).
-//
-// pvData points to an array of the message's encoded bytes.
-//--------------------------------------------------------------------------
-
-//+-------------------------------------------------------------------------
-// CMSG_VERSION_PARAM
-//
-// The version of the decoded message.
-//
-// pvData points to a DWORD
-//--------------------------------------------------------------------------
-
-const
- CMSG_SIGNED_DATA_V1 = 1;
- {$EXTERNALSYM CMSG_SIGNED_DATA_V1}
- CMSG_SIGNED_DATA_V3 = 3;
- {$EXTERNALSYM CMSG_SIGNED_DATA_V3}
- CMSG_SIGNED_DATA_PKCS_1_5_VERSION = CMSG_SIGNED_DATA_V1;
- {$EXTERNALSYM CMSG_SIGNED_DATA_PKCS_1_5_VERSION}
- CMSG_SIGNED_DATA_CMS_VERSION = CMSG_SIGNED_DATA_V3;
- {$EXTERNALSYM CMSG_SIGNED_DATA_CMS_VERSION}
-
- CMSG_SIGNER_INFO_V1 = 1;
- {$EXTERNALSYM CMSG_SIGNER_INFO_V1}
- CMSG_SIGNER_INFO_V3 = 3;
- {$EXTERNALSYM CMSG_SIGNER_INFO_V3}
- CMSG_SIGNER_INFO_PKCS_1_5_VERSION = CMSG_SIGNER_INFO_V1;
- {$EXTERNALSYM CMSG_SIGNER_INFO_PKCS_1_5_VERSION}
- CMSG_SIGNER_INFO_CMS_VERSION = CMSG_SIGNER_INFO_V3;
- {$EXTERNALSYM CMSG_SIGNER_INFO_CMS_VERSION}
-
- CMSG_HASHED_DATA_V0 = 0;
- {$EXTERNALSYM CMSG_HASHED_DATA_V0}
- CMSG_HASHED_DATA_V2 = 2;
- {$EXTERNALSYM CMSG_HASHED_DATA_V2}
- CMSG_HASHED_DATA_PKCS_1_5_VERSION = CMSG_HASHED_DATA_V0;
- {$EXTERNALSYM CMSG_HASHED_DATA_PKCS_1_5_VERSION}
- CMSG_HASHED_DATA_CMS_VERSION = CMSG_HASHED_DATA_V2;
- {$EXTERNALSYM CMSG_HASHED_DATA_CMS_VERSION}
-
- CMSG_ENVELOPED_DATA_V0 = 0;
- {$EXTERNALSYM CMSG_ENVELOPED_DATA_V0}
- CMSG_ENVELOPED_DATA_V2 = 2;
- {$EXTERNALSYM CMSG_ENVELOPED_DATA_V2}
- CMSG_ENVELOPED_DATA_PKCS_1_5_VERSION = CMSG_ENVELOPED_DATA_V0;
- {$EXTERNALSYM CMSG_ENVELOPED_DATA_PKCS_1_5_VERSION}
- CMSG_ENVELOPED_DATA_CMS_VERSION = CMSG_ENVELOPED_DATA_V2;
- {$EXTERNALSYM CMSG_ENVELOPED_DATA_CMS_VERSION}
-
-//+-------------------------------------------------------------------------
-// CMSG_ATTR_CERT_COUNT_PARAM
-//
-// Count of attribute certificates in a SIGNED or ENVELOPED message.
-//
-// pvData points to a DWORD
-//--------------------------------------------------------------------------
-
-//+-------------------------------------------------------------------------
-// CMSG_ATTR_CERT_PARAM
-//
-// To get all the attribute certificates, repetitively call CryptMsgGetParam,
-// with dwIndex set to 0 .. AttrCertCount - 1.
-//
-// pvData points to an array of the attribute certificate's encoded bytes.
-//--------------------------------------------------------------------------
-
-//+-------------------------------------------------------------------------
-// CMSG_CMS_RECIPIENT_COUNT_PARAM
-//
-// Count of all CMS recipients in an ENVELOPED message.
-//
-// pvData points to a DWORD
-//--------------------------------------------------------------------------
-
-//+-------------------------------------------------------------------------
-// CMSG_CMS_RECIPIENT_INDEX_PARAM
-//
-// Index of the CMS recipient used to decrypt an ENVELOPED message.
-//
-// pvData points to a DWORD
-//--------------------------------------------------------------------------
-
-//+-------------------------------------------------------------------------
-// CMSG_CMS_RECIPIENT_ENCRYPTED_KEY_INDEX_PARAM
-//
-// For a CMS key agreement recipient, the index of the encrypted key
-// used to decrypt an ENVELOPED message.
-//
-// pvData points to a DWORD
-//--------------------------------------------------------------------------
-
-//+-------------------------------------------------------------------------
-// CMSG_CMS_RECIPIENT_INFO_PARAM
-//
-// To get all the CMS recipients, repetitively call CryptMsgGetParam, with
-// dwIndex set to 0 .. CmsRecipientCount - 1.
-//
-// pvData points to a CMSG_CMS_RECIPIENT_INFO struct.
-//--------------------------------------------------------------------------
-
-type
- PCMSG_KEY_TRANS_RECIPIENT_INFO = ^CMSG_KEY_TRANS_RECIPIENT_INFO;
- {$EXTERNALSYM PCMSG_KEY_TRANS_RECIPIENT_INFO}
- _CMSG_KEY_TRANS_RECIPIENT_INFO = record
- dwVersion: DWORD;
- // Currently, only ISSUER_SERIAL_NUMBER or KEYID choices
- RecipientId: CERT_ID;
- KeyEncryptionAlgorithm: CRYPT_ALGORITHM_IDENTIFIER;
- EncryptedKey: CRYPT_DATA_BLOB;
- end;
- {$EXTERNALSYM _CMSG_KEY_TRANS_RECIPIENT_INFO}
- CMSG_KEY_TRANS_RECIPIENT_INFO = _CMSG_KEY_TRANS_RECIPIENT_INFO;
- {$EXTERNALSYM CMSG_KEY_TRANS_RECIPIENT_INFO}
- TCmsgKeyTransRecipientInfo = CMSG_KEY_TRANS_RECIPIENT_INFO;
- PCmsgKeyTransRecipientInfo = PCMSG_KEY_TRANS_RECIPIENT_INFO;
-
- PCMSG_RECIPIENT_ENCRYPTED_KEY_INFO = ^CMSG_RECIPIENT_ENCRYPTED_KEY_INFO;
- {$EXTERNALSYM PCMSG_RECIPIENT_ENCRYPTED_KEY_INFO}
- _CMSG_RECIPIENT_ENCRYPTED_KEY_INFO = record
- // Currently, only ISSUER_SERIAL_NUMBER or KEYID choices
- RecipientId: CERT_ID;
- EncryptedKey: CRYPT_DATA_BLOB;
- // The following optional fields are only applicable to KEYID choice
- Date: FILETIME;
- pOtherAttr: PCRYPT_ATTRIBUTE_TYPE_VALUE;
- end;
- {$EXTERNALSYM _CMSG_RECIPIENT_ENCRYPTED_KEY_INFO}
- CMSG_RECIPIENT_ENCRYPTED_KEY_INFO = _CMSG_RECIPIENT_ENCRYPTED_KEY_INFO;
- {$EXTERNALSYM CMSG_RECIPIENT_ENCRYPTED_KEY_INFO}
- TCmsgRecipientEncryptedKeyInfo = CMSG_RECIPIENT_ENCRYPTED_KEY_INFO;
- PCmsgRecipientEncryptedKeyInfo = PCMSG_RECIPIENT_ENCRYPTED_KEY_INFO;
-
- PCMSG_KEY_AGREE_RECIPIENT_INFO = ^CMSG_KEY_AGREE_RECIPIENT_INFO;
- {$EXTERNALSYM PCMSG_KEY_AGREE_RECIPIENT_INFO}
- _CMSG_KEY_AGREE_RECIPIENT_INFO = record
- dwVersion: DWORD;
- dwOriginatorChoice: DWORD;
- Union: record
- case Integer of
- // CMSG_KEY_AGREE_ORIGINATOR_CERT
- 0: (OriginatorCertId: CERT_ID);
- // CMSG_KEY_AGREE_ORIGINATOR_PUBLIC_KEY
- 1: (OriginatorPublicKeyInfo: CERT_PUBLIC_KEY_INFO);
- end;
- UserKeyingMaterial: CRYPT_DATA_BLOB;
- KeyEncryptionAlgorithm: CRYPT_ALGORITHM_IDENTIFIER;
- cRecipientEncryptedKeys: DWORD;
- rgpRecipientEncryptedKeys: PCMSG_RECIPIENT_ENCRYPTED_KEY_INFO;
- end;
- {$EXTERNALSYM _CMSG_KEY_AGREE_RECIPIENT_INFO}
- CMSG_KEY_AGREE_RECIPIENT_INFO = _CMSG_KEY_AGREE_RECIPIENT_INFO;
- {$EXTERNALSYM CMSG_KEY_AGREE_RECIPIENT_INFO}
- TCmsgKeyAgreeRecipientInfo = CMSG_KEY_AGREE_RECIPIENT_INFO;
- PCmsgKeyAgreeRecipientInfo = PCMSG_KEY_AGREE_RECIPIENT_INFO;
-
-const
- CMSG_KEY_AGREE_ORIGINATOR_CERT = 1;
- {$EXTERNALSYM CMSG_KEY_AGREE_ORIGINATOR_CERT}
- CMSG_KEY_AGREE_ORIGINATOR_PUBLIC_KEY = 2;
- {$EXTERNALSYM CMSG_KEY_AGREE_ORIGINATOR_PUBLIC_KEY}
-
-type
- PCMSG_MAIL_LIST_RECIPIENT_INFO = ^CMSG_MAIL_LIST_RECIPIENT_INFO;
- {$EXTERNALSYM PCMSG_MAIL_LIST_RECIPIENT_INFO}
- _CMSG_MAIL_LIST_RECIPIENT_INFO = record
- dwVersion: DWORD;
- KeyId: CRYPT_DATA_BLOB;
- KeyEncryptionAlgorithm: CRYPT_ALGORITHM_IDENTIFIER;
- EncryptedKey: CRYPT_DATA_BLOB;
- // The following fields are optional
- Date: FILETIME;
- pOtherAttr: PCRYPT_ATTRIBUTE_TYPE_VALUE;
- end;
- {$EXTERNALSYM _CMSG_MAIL_LIST_RECIPIENT_INFO}
- CMSG_MAIL_LIST_RECIPIENT_INFO = _CMSG_MAIL_LIST_RECIPIENT_INFO;
- {$EXTERNALSYM CMSG_MAIL_LIST_RECIPIENT_INFO}
- TCmsgMailListRecipientInfo = CMSG_MAIL_LIST_RECIPIENT_INFO;
- PCmsgMailListRecipientInfo = PCMSG_MAIL_LIST_RECIPIENT_INFO;
-
- PCMSG_CMS_RECIPIENT_INFO = ^CMSG_CMS_RECIPIENT_INFO;
- {$EXTERNALSYM PCMSG_CMS_RECIPIENT_INFO}
- _CMSG_CMS_RECIPIENT_INFO = record
- dwRecipientChoice: DWORD;
- case Integer of
- // CMSG_KEY_TRANS_RECIPIENT
- 0: (pKeyTrans: PCMSG_KEY_TRANS_RECIPIENT_INFO);
- // CMSG_KEY_AGREE_RECIPIENT
- 1: (pKeyAgree: PCMSG_KEY_AGREE_RECIPIENT_INFO);
- // CMSG_MAIL_LIST_RECIPIENT
- 2: (pMailList: PCMSG_MAIL_LIST_RECIPIENT_INFO);
- end;
- {$EXTERNALSYM _CMSG_CMS_RECIPIENT_INFO}
- CMSG_CMS_RECIPIENT_INFO = _CMSG_CMS_RECIPIENT_INFO;
- {$EXTERNALSYM CMSG_CMS_RECIPIENT_INFO}
- TCmsgCmsRecipientInfo = CMSG_CMS_RECIPIENT_INFO;
- PCmsgCmsRecipientInfo = PCMSG_CMS_RECIPIENT_INFO;
-
-// dwVersion numbers for the KeyTrans, KeyAgree and MailList recipients
-
-const
- CMSG_ENVELOPED_RECIPIENT_V0 = 0;
- {$EXTERNALSYM CMSG_ENVELOPED_RECIPIENT_V0}
- CMSG_ENVELOPED_RECIPIENT_V2 = 2;
- {$EXTERNALSYM CMSG_ENVELOPED_RECIPIENT_V2}
- CMSG_ENVELOPED_RECIPIENT_V3 = 3;
- {$EXTERNALSYM CMSG_ENVELOPED_RECIPIENT_V3}
- CMSG_ENVELOPED_RECIPIENT_V4 = 4;
- {$EXTERNALSYM CMSG_ENVELOPED_RECIPIENT_V4}
- CMSG_KEY_TRANS_PKCS_1_5_VERSION = CMSG_ENVELOPED_RECIPIENT_V0;
- {$EXTERNALSYM CMSG_KEY_TRANS_PKCS_1_5_VERSION}
- CMSG_KEY_TRANS_CMS_VERSION = CMSG_ENVELOPED_RECIPIENT_V2;
- {$EXTERNALSYM CMSG_KEY_TRANS_CMS_VERSION}
- CMSG_KEY_AGREE_VERSION = CMSG_ENVELOPED_RECIPIENT_V3;
- {$EXTERNALSYM CMSG_KEY_AGREE_VERSION}
- CMSG_MAIL_LIST_VERSION = CMSG_ENVELOPED_RECIPIENT_V4;
- {$EXTERNALSYM CMSG_MAIL_LIST_VERSION}
-
-//+-------------------------------------------------------------------------
-// CMSG_UNPROTECTED_ATTR_PARAM
-//
-// The unprotected attributes in the envelped message.
-//
-// pvData points to a CMSG_ATTR struct.
-//--------------------------------------------------------------------------
-
-//+-------------------------------------------------------------------------
-// Perform a special "control" function after the final CryptMsgUpdate of a
-// encoded/decoded cryptographic message.
-//
-// The dwCtrlType parameter specifies the type of operation to be performed.
-//
-// The pvCtrlPara definition depends on the dwCtrlType value.
-//
-// See below for a list of the control operations and their pvCtrlPara
-// type definition.
-//--------------------------------------------------------------------------
-
-function CryptMsgControl(hCryptMsg: HCRYPTMSG; dwFlags, dwCtrlType: DWORD;
- pvCtrlPara: Pointer): BOOL; stdcall;
-{$EXTERNALSYM CryptMsgControl}
-
-//+-------------------------------------------------------------------------
-// Message control types
-//--------------------------------------------------------------------------
-
-const
- CMSG_CTRL_VERIFY_SIGNATURE = 1;
- {$EXTERNALSYM CMSG_CTRL_VERIFY_SIGNATURE}
- CMSG_CTRL_DECRYPT = 2;
- {$EXTERNALSYM CMSG_CTRL_DECRYPT}
- CMSG_CTRL_VERIFY_HASH = 5;
- {$EXTERNALSYM CMSG_CTRL_VERIFY_HASH}
- CMSG_CTRL_ADD_SIGNER = 6;
- {$EXTERNALSYM CMSG_CTRL_ADD_SIGNER}
- CMSG_CTRL_DEL_SIGNER = 7;
- {$EXTERNALSYM CMSG_CTRL_DEL_SIGNER}
- CMSG_CTRL_ADD_SIGNER_UNAUTH_ATTR = 8;
- {$EXTERNALSYM CMSG_CTRL_ADD_SIGNER_UNAUTH_ATTR}
- CMSG_CTRL_DEL_SIGNER_UNAUTH_ATTR = 9;
- {$EXTERNALSYM CMSG_CTRL_DEL_SIGNER_UNAUTH_ATTR}
- CMSG_CTRL_ADD_CERT = 10;
- {$EXTERNALSYM CMSG_CTRL_ADD_CERT}
- CMSG_CTRL_DEL_CERT = 11;
- {$EXTERNALSYM CMSG_CTRL_DEL_CERT}
- CMSG_CTRL_ADD_CRL = 12;
- {$EXTERNALSYM CMSG_CTRL_ADD_CRL}
- CMSG_CTRL_DEL_CRL = 13;
- {$EXTERNALSYM CMSG_CTRL_DEL_CRL}
- CMSG_CTRL_ADD_ATTR_CERT = 14;
- {$EXTERNALSYM CMSG_CTRL_ADD_ATTR_CERT}
- CMSG_CTRL_DEL_ATTR_CERT = 15;
- {$EXTERNALSYM CMSG_CTRL_DEL_ATTR_CERT}
- CMSG_CTRL_KEY_TRANS_DECRYPT = 16;
- {$EXTERNALSYM CMSG_CTRL_KEY_TRANS_DECRYPT}
- CMSG_CTRL_KEY_AGREE_DECRYPT = 17;
- {$EXTERNALSYM CMSG_CTRL_KEY_AGREE_DECRYPT}
- CMSG_CTRL_MAIL_LIST_DECRYPT = 18;
- {$EXTERNALSYM CMSG_CTRL_MAIL_LIST_DECRYPT}
- CMSG_CTRL_VERIFY_SIGNATURE_EX = 19;
- {$EXTERNALSYM CMSG_CTRL_VERIFY_SIGNATURE_EX}
- CMSG_CTRL_ADD_CMS_SIGNER_INFO = 20;
- {$EXTERNALSYM CMSG_CTRL_ADD_CMS_SIGNER_INFO}
-
-//+-------------------------------------------------------------------------
-// CMSG_CTRL_VERIFY_SIGNATURE
-//
-// Verify the signature of a SIGNED or SIGNED_AND_ENVELOPED
-// message after it has been decoded.
-//
-// For a SIGNED_AND_ENVELOPED message, called after
-// CryptMsgControl(CMSG_CTRL_DECRYPT), if CryptMsgOpenToDecode was called
-// with a NULL pRecipientInfo.
-//
-// pvCtrlPara points to a CERT_INFO struct.
-//
-// The CERT_INFO contains the Issuer and SerialNumber identifying
-// the Signer of the message. The CERT_INFO also contains the
-// PublicKeyInfo
-// used to verify the signature. The cryptographic provider specified
-// in CryptMsgOpenToDecode is used.
-//
-// Note, if the message contains CMS signers identified by KEYID, then,
-// the CERT_INFO's Issuer and SerialNumber is ignored and only the public
-// key is used to find a signer whose signature verifies.
-//
-// The following CMSG_CTRL_VERIFY_SIGNATURE_EX should be used instead.
-//--------------------------------------------------------------------------
-
-//+-------------------------------------------------------------------------
-// CMSG_CTRL_VERIFY_SIGNATURE_EX
-//
-// Verify the signature of a SIGNED message after it has been decoded.
-//
-// pvCtrlPara points to the following CMSG_CTRL_VERIFY_SIGNATURE_EX_PARA.
-//
-// If hCryptProv is NULL, uses the cryptographic provider specified in
-// CryptMsgOpenToDecode. If CryptMsgOpenToDecode's hCryptProv is also NULL,
-// gets default provider according to the signer's public key OID.
-//
-// dwSignerIndex is the index of the signer to use to verify the signature.
-//
-// The signer can be a pointer to a CERT_PUBLIC_KEY_INFO, certificate
-// context or a chain context.
-//--------------------------------------------------------------------------
-
-type
- PCMSG_CTRL_VERIFY_SIGNATURE_EX_PARA = ^CMSG_CTRL_VERIFY_SIGNATURE_EX_PARA;
- {$EXTERNALSYM PCMSG_CTRL_VERIFY_SIGNATURE_EX_PARA}
- _CMSG_CTRL_VERIFY_SIGNATURE_EX_PARA = record
- cbSize: DWORD;
- hCryptProv: HCRYPTPROV;
- dwSignerIndex: DWORD;
- dwSignerType: DWORD;
- pvSigner: Pointer;
- end;
- {$EXTERNALSYM _CMSG_CTRL_VERIFY_SIGNATURE_EX_PARA}
- CMSG_CTRL_VERIFY_SIGNATURE_EX_PARA = _CMSG_CTRL_VERIFY_SIGNATURE_EX_PARA;
- {$EXTERNALSYM CMSG_CTRL_VERIFY_SIGNATURE_EX_PARA}
- TCmsgCtrlVerifySignatureExPara = CMSG_CTRL_VERIFY_SIGNATURE_EX_PARA;
- PCmsgCtrlVerifySignatureExPara = PCMSG_CTRL_VERIFY_SIGNATURE_EX_PARA;
-
-// Signer Types
-
-const
- CMSG_VERIFY_SIGNER_PUBKEY = 1;
- {$EXTERNALSYM CMSG_VERIFY_SIGNER_PUBKEY}
- // pvSigner :: PCERT_PUBLIC_KEY_INFO
- CMSG_VERIFY_SIGNER_CERT = 2;
- {$EXTERNALSYM CMSG_VERIFY_SIGNER_CERT}
- // pvSigner :: PCCERT_CONTEXT
- CMSG_VERIFY_SIGNER_CHAIN = 3;
- {$EXTERNALSYM CMSG_VERIFY_SIGNER_CHAIN}
- // pvSigner :: PCCERT_CHAIN_CONTEXT
-
-//+-------------------------------------------------------------------------
-// CMSG_CTRL_DECRYPT
-//
-// Decrypt an ENVELOPED or SIGNED_AND_ENVELOPED message after it has been
-// decoded.
-//
-// This decrypt is only applicable to key transport recipients.
-//
-// hCryptProv and dwKeySpec specify the private key to use. For dwKeySpec ==
-// 0, defaults to AT_KEYEXCHANGE.
-//
-// If CMSG_CRYPT_RELEASE_CONTEXT_FLAG is set in the dwFlags passed
-// to CryptMsgControl, then, the hCryptProv is released on the final
-// CryptMsgClose. Not released if CryptMsgControl fails.
-//
-// dwRecipientIndex is the index of the recipient in the message associated
-// with the hCryptProv's private key.
-//
-// The dwRecipientIndex is the index of a key transport recipient.
-//
-// Note, the message can only be decrypted once.
-//--------------------------------------------------------------------------
-
-type
- PCMSG_CTRL_DECRYPT_PARA = ^CMSG_CTRL_DECRYPT_PARA;
- {$EXTERNALSYM PCMSG_CTRL_DECRYPT_PARA}
- _CMSG_CTRL_DECRYPT_PARA = record
- cbSize: DWORD;
- hCryptProv: HCRYPTPROV;
- dwKeySpec: DWORD;
- dwRecipientIndex: DWORD;
- end;
- {$EXTERNALSYM _CMSG_CTRL_DECRYPT_PARA}
- CMSG_CTRL_DECRYPT_PARA = _CMSG_CTRL_DECRYPT_PARA;
- {$EXTERNALSYM CMSG_CTRL_DECRYPT_PARA}
- TCmsgCtrlDecryptPara = CMSG_CTRL_DECRYPT_PARA;
- PCmsgCtrlDecryptPara = PCMSG_CTRL_DECRYPT_PARA;
-
-//+-------------------------------------------------------------------------
-// CMSG_CTRL_KEY_TRANS_DECRYPT
-//
-// Decrypt an ENVELOPED message after it has been decoded for a key
-// transport recipient.
-//
-// hCryptProv and dwKeySpec specify the private key to use. For dwKeySpec ==
-// 0, defaults to AT_KEYEXCHANGE.
-//
-// If CMSG_CRYPT_RELEASE_CONTEXT_FLAG is set in the dwFlags passed
-// to CryptMsgControl, then, the hCryptProv is released on the final
-// CryptMsgClose. Not released if CryptMsgControl fails.
-//
-// pKeyTrans points to the CMSG_KEY_TRANS_RECIPIENT_INFO obtained via
-// CryptMsgGetParam(CMSG_CMS_RECIPIENT_INFO_PARAM)
-//
-// dwRecipientIndex is the index of the recipient in the message associated
-// with the hCryptProv's private key.
-//
-// Note, the message can only be decrypted once.
-//--------------------------------------------------------------------------
-
- PCMSG_CTRL_KEY_TRANS_DECRYPT_PARA = ^CMSG_CTRL_KEY_TRANS_DECRYPT_PARA;
- {$EXTERNALSYM PCMSG_CTRL_KEY_TRANS_DECRYPT_PARA}
- _CMSG_CTRL_KEY_TRANS_DECRYPT_PARA = record
- cbSize: DWORD;
- hCryptProv: HCRYPTPROV;
- dwKeySpec: DWORD;
- pKeyTrans: PCMSG_KEY_TRANS_RECIPIENT_INFO;
- dwRecipientIndex: DWORD;
- end;
- {$EXTERNALSYM _CMSG_CTRL_KEY_TRANS_DECRYPT_PARA}
- CMSG_CTRL_KEY_TRANS_DECRYPT_PARA = _CMSG_CTRL_KEY_TRANS_DECRYPT_PARA;
- {$EXTERNALSYM CMSG_CTRL_KEY_TRANS_DECRYPT_PARA}
- TCmsgCtrlKeyTransDecryptPara = CMSG_CTRL_KEY_TRANS_DECRYPT_PARA;
- PCmsgCtrlKeyTransDecryptPara = PCMSG_CTRL_KEY_TRANS_DECRYPT_PARA;
-
-//+-------------------------------------------------------------------------
-// CMSG_CTRL_KEY_AGREE_DECRYPT
-//
-// Decrypt an ENVELOPED message after it has been decoded for a key
-// agreement recipient.
-//
-// hCryptProv and dwKeySpec specify the private key to use. For dwKeySpec ==
-// 0, defaults to AT_KEYEXCHANGE.
-//
-// If CMSG_CRYPT_RELEASE_CONTEXT_FLAG is set in the dwFlags passed
-// to CryptMsgControl, then, the hCryptProv is released on the final
-// CryptMsgClose. Not released if CryptMsgControl fails.
-//
-// pKeyAgree points to the CMSG_KEY_AGREE_RECIPIENT_INFO obtained via
-// CryptMsgGetParam(CMSG_CMS_RECIPIENT_INFO_PARAM) for dwRecipientIndex.
-//
-// dwRecipientIndex, dwRecipientEncryptedKeyIndex are the indices of the
-// recipient's encrypted key in the message associated with the hCryptProv's
-// private key.
-//
-// OriginatorPublicKey is the originator's public key obtained from either
-// the originator's certificate or the CMSG_KEY_AGREE_RECIPIENT_INFO obtained
-// via the CMSG_CMS_RECIPIENT_INFO_PARAM.
-//
-// Note, the message can only be decrypted once.
-//--------------------------------------------------------------------------
-
- PCMSG_CTRL_KEY_AGREE_DECRYPT_PARA = ^CMSG_CTRL_KEY_AGREE_DECRYPT_PARA;
- {$EXTERNALSYM PCMSG_CTRL_KEY_AGREE_DECRYPT_PARA}
- _CMSG_CTRL_KEY_AGREE_DECRYPT_PARA = record
- cbSize: DWORD;
- hCryptProv: HCRYPTPROV;
- dwKeySpec: DWORD;
- pKeyAgree: PCMSG_KEY_AGREE_RECIPIENT_INFO;
- dwRecipientIndex: DWORD;
- dwRecipientEncryptedKeyIndex: DWORD;
- OriginatorPublicKey: CRYPT_BIT_BLOB;
- end;
- {$EXTERNALSYM _CMSG_CTRL_KEY_AGREE_DECRYPT_PARA}
- CMSG_CTRL_KEY_AGREE_DECRYPT_PARA = _CMSG_CTRL_KEY_AGREE_DECRYPT_PARA;
- {$EXTERNALSYM CMSG_CTRL_KEY_AGREE_DECRYPT_PARA}
- TCmsgCtrlKeyAgreeDecryptPara = CMSG_CTRL_KEY_AGREE_DECRYPT_PARA;
- PCmsgCtrlKeyAgreeDecryptPara = PCMSG_CTRL_KEY_AGREE_DECRYPT_PARA;
-
-//+-------------------------------------------------------------------------
-// CMSG_CTRL_MAIL_LIST_DECRYPT
-//
-// Decrypt an ENVELOPED message after it has been decoded for a mail
-// list recipient.
-//
-// pMailList points to the CMSG_MAIL_LIST_RECIPIENT_INFO obtained via
-// CryptMsgGetParam(CMSG_CMS_RECIPIENT_INFO_PARAM) for dwRecipientIndex.
-//
-// There is 1 choice for the KeyEncryptionKey: an already created CSP key
-// handle. For the key handle choice, hCryptProv must be nonzero. This key
-// handle isn't destroyed.
-//
-// If CMSG_CRYPT_RELEASE_CONTEXT_FLAG is set in the dwFlags passed
-// to CryptMsgControl, then, the hCryptProv is released on the final
-// CryptMsgClose. Not released if CryptMsgControl fails.
-//
-// For RC2 wrap, the effective key length is obtained from the
-// KeyEncryptionAlgorithm parameters and set on the hKeyEncryptionKey before
-// decrypting.
-//
-// Note, the message can only be decrypted once.
-//--------------------------------------------------------------------------
-
- PCMSG_CTRL_MAIL_LIST_DECRYPT_PARA = ^CMSG_CTRL_MAIL_LIST_DECRYPT_PARA;
- {$EXTERNALSYM PCMSG_CTRL_MAIL_LIST_DECRYPT_PARA}
- _CMSG_CTRL_MAIL_LIST_DECRYPT_PARA = record
- cbSize: DWORD;
- hCryptProv: HCRYPTPROV;
- pMailList: PCMSG_MAIL_LIST_RECIPIENT_INFO;
- dwRecipientIndex: DWORD;
- dwKeyChoice: DWORD;
- case Integer of
- // CMSG_MAIL_LIST_HANDLE_KEY_CHOICE
- 0: (hKeyEncryptionKey: HCRYPTKEY);
- // Reserve space for a potential pointer choice
- 1: (pvKeyEncryptionKey: Pointer);
- end;
- {$EXTERNALSYM _CMSG_CTRL_MAIL_LIST_DECRYPT_PARA}
- CMSG_CTRL_MAIL_LIST_DECRYPT_PARA = _CMSG_CTRL_MAIL_LIST_DECRYPT_PARA;
- {$EXTERNALSYM CMSG_CTRL_MAIL_LIST_DECRYPT_PARA}
- TCmsgCtrlMailListDecryptPara = CMSG_CTRL_MAIL_LIST_DECRYPT_PARA;
- PCmsgCtrlMailListDecryptPara = PCMSG_CTRL_MAIL_LIST_DECRYPT_PARA;
-
-//+-------------------------------------------------------------------------
-// CMSG_CTRL_VERIFY_HASH
-//
-// Verify the hash of a HASHED message after it has been decoded.
-//
-// Only the hCryptMsg parameter is used, to specify the message whose
-// hash is being verified.
-//--------------------------------------------------------------------------
-
-//+-------------------------------------------------------------------------
-// CMSG_CTRL_ADD_SIGNER
-//
-// Add a signer to a signed-data message.
-//
-// pvCtrlPara points to a CMSG_SIGNER_ENCODE_INFO.
-//--------------------------------------------------------------------------
-
-//+-------------------------------------------------------------------------
-// CMSG_CTRL_ADD_CMS_SIGNER_INFO
-//
-// Add a signer to a signed-data message.
-//
-// Differs from the above, CMSG_CTRL_ADD_SIGNER, wherein, the signer info
-// already contains the signature.
-//
-// pvCtrlPara points to a CMSG_CMS_SIGNER_INFO.
-//--------------------------------------------------------------------------
-
-//+-------------------------------------------------------------------------
-// CMSG_CTRL_DEL_SIGNER
-//
-// Remove a signer from a signed-data or signed-and-enveloped-data message.
-//
-// pvCtrlPara points to a DWORD containing the 0-based index of the
-// signer to be removed.
-//--------------------------------------------------------------------------
-
-//+-------------------------------------------------------------------------
-// CMSG_CTRL_ADD_SIGNER_UNAUTH_ATTR
-//
-// Add an unauthenticated attribute to the SignerInfo of a signed-data or
-// signed-and-enveloped-data message.
-//
-// The unauthenticated attribute is input in the form of an encoded blob.
-//--------------------------------------------------------------------------
-
- PCMSG_CTRL_ADD_SIGNER_UNAUTH_ATTR_PARA = ^CMSG_CTRL_ADD_SIGNER_UNAUTH_ATTR_PARA;
- {$EXTERNALSYM PCMSG_CTRL_ADD_SIGNER_UNAUTH_ATTR_PARA}
- _CMSG_CTRL_ADD_SIGNER_UNAUTH_ATTR_PARA = record
- cbSize: DWORD;
- dwSignerIndex: DWORD;
- blob: CRYPT_DATA_BLOB;
- end;
- {$EXTERNALSYM _CMSG_CTRL_ADD_SIGNER_UNAUTH_ATTR_PARA}
- CMSG_CTRL_ADD_SIGNER_UNAUTH_ATTR_PARA = _CMSG_CTRL_ADD_SIGNER_UNAUTH_ATTR_PARA;
- {$EXTERNALSYM CMSG_CTRL_ADD_SIGNER_UNAUTH_ATTR_PARA}
- TCmsgCtrlAddSignerUnauthAttrPara = CMSG_CTRL_ADD_SIGNER_UNAUTH_ATTR_PARA;
- PCmsgCtrlAddSignerUnauthAttrPara = PCMSG_CTRL_ADD_SIGNER_UNAUTH_ATTR_PARA;
-
-//+-------------------------------------------------------------------------
-// CMSG_CTRL_DEL_SIGNER_UNAUTH_ATTR
-//
-// Delete an unauthenticated attribute from the SignerInfo of a signed-data
-// or signed-and-enveloped-data message.
-//
-// The unauthenticated attribute to be removed is specified by
-// a 0-based index.
-//--------------------------------------------------------------------------
-
- PCMSG_CTRL_DEL_SIGNER_UNAUTH_ATTR_PARA = ^CMSG_CTRL_DEL_SIGNER_UNAUTH_ATTR_PARA;
- {$EXTERNALSYM PCMSG_CTRL_DEL_SIGNER_UNAUTH_ATTR_PARA}
- _CMSG_CTRL_DEL_SIGNER_UNAUTH_ATTR_PARA = record
- cbSize: DWORD;
- dwSignerIndex: DWORD;
- dwUnauthAttrIndex: DWORD;
- end;
- {$EXTERNALSYM _CMSG_CTRL_DEL_SIGNER_UNAUTH_ATTR_PARA}
- CMSG_CTRL_DEL_SIGNER_UNAUTH_ATTR_PARA = _CMSG_CTRL_DEL_SIGNER_UNAUTH_ATTR_PARA;
- {$EXTERNALSYM CMSG_CTRL_DEL_SIGNER_UNAUTH_ATTR_PARA}
- TCmsgCtrlDelSignerUnauthAttrPara = CMSG_CTRL_DEL_SIGNER_UNAUTH_ATTR_PARA;
- PCmsgCtrlDelSignerUnauthAttrPara = PCMSG_CTRL_DEL_SIGNER_UNAUTH_ATTR_PARA;
-
-//+-------------------------------------------------------------------------
-// CMSG_CTRL_ADD_CERT
-//
-// Add a certificate to a signed-data or signed-and-enveloped-data message.
-//
-// pvCtrlPara points to a CRYPT_DATA_BLOB containing the certificate's
-// encoded bytes.
-//--------------------------------------------------------------------------
-
-//+-------------------------------------------------------------------------
-// CMSG_CTRL_DEL_CERT
-//
-// Delete a certificate from a signed-data or signed-and-enveloped-data
-// message.
-//
-// pvCtrlPara points to a DWORD containing the 0-based index of the
-// certificate to be removed.
-//--------------------------------------------------------------------------
-
-//+-------------------------------------------------------------------------
-// CMSG_CTRL_ADD_CRL
-//
-// Add a CRL to a signed-data or signed-and-enveloped-data message.
-//
-// pvCtrlPara points to a CRYPT_DATA_BLOB containing the CRL's
-// encoded bytes.
-//--------------------------------------------------------------------------
-
-//+-------------------------------------------------------------------------
-// CMSG_CTRL_DEL_CRL
-//
-// Delete a CRL from a signed-data or signed-and-enveloped-data message.
-//
-// pvCtrlPara points to a DWORD containing the 0-based index of the CRL
-// to be removed.
-//--------------------------------------------------------------------------
-
-//+-------------------------------------------------------------------------
-// CMSG_CTRL_ADD_ATTR_CERT
-//
-// Add an attribute certificate to a signed-data message.
-//
-// pvCtrlPara points to a CRYPT_DATA_BLOB containing the attribute
-// certificate's encoded bytes.
-//--------------------------------------------------------------------------
-
-//+-------------------------------------------------------------------------
-// CMSG_CTRL_DEL_ATTR_CERT
-//
-// Delete an attribute certificate from a signed-data message.
-//
-// pvCtrlPara points to a DWORD containing the 0-based index of the
-// attribute certificate to be removed.
-//--------------------------------------------------------------------------
-
-//+-------------------------------------------------------------------------
-// Verify a countersignature, at the SignerInfo level.
-// ie. verify that pbSignerInfoCountersignature contains the encrypted
-// hash of the encryptedDigest field of pbSignerInfo.
-//
-// hCryptProv is used to hash the encryptedDigest field of pbSignerInfo.
-// The only fields referenced from pciCountersigner are SerialNumber, Issuer,
-// and SubjectPublicKeyInfo.
-//--------------------------------------------------------------------------
-
-function CryptMsgVerifyCountersignatureEncoded(hCryptProv: HCRYPTPROV;
- dwEncodingType: DWORD; pbSignerInfo: PBYTE; cbSignerInfo: DWORD;
- pbSignerInfoCountersignature: PBYTE; cbSignerInfoCountersignature: DWORD;
- pciCountersigner: PCERT_INFO): BOOL; stdcall;
-{$EXTERNALSYM CryptMsgVerifyCountersignatureEncoded}
-
-//+-------------------------------------------------------------------------
-// Verify a countersignature, at the SignerInfo level.
-// ie. verify that pbSignerInfoCountersignature contains the encrypted
-// hash of the encryptedDigest field of pbSignerInfo.
-//
-// hCryptProv is used to hash the encryptedDigest field of pbSignerInfo.
-//
-// The signer can be a CERT_PUBLIC_KEY_INFO, certificate context or a
-// chain context.
-//--------------------------------------------------------------------------
-
-function CryptMsgVerifyCountersignatureEncodedEx(hCryptProv: HCRYPTPROV;
- dwEncodingType: DWORD; pbSignerInfo: PBYTE; cbSignerInfo: DWORD;
- pbSignerInfoCountersignature: PBYTE; cbSignerInfoCountersignature: DWORD;
- dwSignerType: DWORD; pvSigner: Pointer; dwFlags: DWORD; pvReserved: Pointer): BOOL; stdcall;
-{$EXTERNALSYM CryptMsgVerifyCountersignatureEncodedEx}
-
-// See CMSG_CTRL_VERIFY_SIGNATURE_EX_PARA for dwSignerType definitions
-
-//+-------------------------------------------------------------------------
-// Countersign an already-existing signature in a message
-//
-// dwIndex is a zero-based index of the SignerInfo to be countersigned.
-//--------------------------------------------------------------------------
-
-function CryptMsgCountersign(hCryptMsg: HCRYPTMSG; dwIndex, cCountersigners: DWORD;
- rgCountersigners: PCMSG_SIGNER_ENCODE_INFO): BOOL; stdcall;
-{$EXTERNALSYM CryptMsgCountersign}
-
-//+-------------------------------------------------------------------------
-// Countersign an already-existing signature (encoded SignerInfo).
-// Output an encoded SignerInfo blob, suitable for use as a countersignature
-// attribute in the unauthenticated attributes of a signed-data or
-// signed-and-enveloped-data message.
-//--------------------------------------------------------------------------
-
-function CryptMsgCountersignEncoded(dwEncodingType: DWORD; pbSignerInfo: PBYTE;
- cbSignerInfo: DWORD; cCountersigners: DWORD; rgCountersigners: PCMSG_SIGNER_ENCODE_INFO;
- pbCountersignature: PBYTE; var pcbCountersignature: DWORD): BOOL; stdcall;
-{$EXTERNALSYM CryptMsgCountersignEncoded}
-
-//+-------------------------------------------------------------------------
-// CryptMsg OID installable functions
-//--------------------------------------------------------------------------
-
-type
- PFN_CMSG_ALLOC = function(cb: size_t): Pointer; stdcall;
- {$EXTERNALSYM PFN_CMSG_ALLOC}
- PFnCMsgAlloc = PFN_CMSG_ALLOC;
-
- PFN_CMSG_FREE = procedure(pv: Pointer); stdcall;
- {$EXTERNALSYM PFN_CMSG_FREE}
- PFnCMsgFree = PFN_CMSG_FREE;
-
-// Note, the following 3 installable functions are obsolete and have been
-// replaced with GenContentEncryptKey, ExportKeyTrans, ExportKeyAgree,
-// ExportMailList, ImportKeyTrans, ImportKeyAgree and ImportMailList
-// installable functions.
-
-// If *phCryptProv is NULL upon entry, then, if supported, the installable
-// function should acquire a default provider and return. Note, its up
-// to the installable function to release at process detach.
-//
-// If paiEncrypt->Parameters.cbData is 0, then, the callback may optionally
-// return default encoded parameters in *ppbEncryptParameters and
-// *pcbEncryptParameters. pfnAlloc must be called for the allocation.
-
-const
- CMSG_OID_GEN_ENCRYPT_KEY_FUNC = 'CryptMsgDllGenEncryptKey';
- {$EXTERNALSYM CMSG_OID_GEN_ENCRYPT_KEY_FUNC}
-
-type
- PFN_CMSG_GEN_ENCRYPT_KEY = function(phCryptProv: PHCRYPTPROV;
- paiEncrypt: PCRYPT_ALGORITHM_IDENTIFIER; pvEncryptAuxInfo: PVOID;
- pPublicKeyInfo: PCERT_PUBLIC_KEY_INFO; pfnAlloc: PFN_CMSG_ALLOC;
- var phEncryptKey: HCRYPTKEY; var ppbEncryptParameters: PBYTE;
- pcbEncryptParameters: PDWORD): BOOL; stdcall;
- {$EXTERNALSYM PFN_CMSG_GEN_ENCRYPT_KEY}
- PfnCmsgGenEncryptKey = PFN_CMSG_GEN_ENCRYPT_KEY;
-
-const
- CMSG_OID_EXPORT_ENCRYPT_KEY_FUNC = 'CryptMsgDllExportEncryptKey';
- {$EXTERNALSYM CMSG_OID_EXPORT_ENCRYPT_KEY_FUNC}
-
-type
- PFN_CMSG_EXPORT_ENCRYPT_KEY = function(hCryptProv: HCRYPTPROV;
- hEncryptKey: HCRYPTKEY; pPublicKeyInfo: PCERT_PUBLIC_KEY_INFO;
- pbData: PBYTE; var pcbData: DWORD): BOOL; stdcall;
- {$EXTERNALSYM PFN_CMSG_EXPORT_ENCRYPT_KEY}
- PfnCmsgExportEncryptKey = PFN_CMSG_EXPORT_ENCRYPT_KEY;
-
-const
- CMSG_OID_IMPORT_ENCRYPT_KEY_FUNC = 'CryptMsgDllImportEncryptKey';
- {$EXTERNALSYM CMSG_OID_IMPORT_ENCRYPT_KEY_FUNC}
-
-type
- PFN_CMSG_IMPORT_ENCRYPT_KEY = function(hCryptProv: HCRYPTPROV;
- dwKeySpec: DWORD; paiEncrypt: PCRYPT_ALGORITHM_IDENTIFIER;
- paiPubKey: PCRYPT_ALGORITHM_IDENTIFIER; pbEncodedKey: PBYTE;
- cbEncodedKey: DWORD; var phEncryptKey: HCRYPTKEY): BOOL; stdcall;
- {$EXTERNALSYM PFN_CMSG_IMPORT_ENCRYPT_KEY}
- PfnCmsgImportEncryptKey = PFN_CMSG_IMPORT_ENCRYPT_KEY;
-
-// To get the default installable function for GenContentEncryptKey,
-// ExportKeyTrans, ExportKeyAgree, ExportMailList, ImportKeyTrans,
-// ImportKeyAgree or ImportMailList call CryptGetOIDFunctionAddress()
-// with the pszOID argument set to the following constant. dwEncodingType
-// should be set to CRYPT_ASN_ENCODING or X509_ASN_ENCODING.
-
-const
- CMSG_DEFAULT_INSTALLABLE_FUNC_OID = LPCSTR(1);
- {$EXTERNALSYM CMSG_DEFAULT_INSTALLABLE_FUNC_OID}
-
-//+-------------------------------------------------------------------------
-// Content Encrypt Info
-//
-// The following data structure contains the information shared between
-// the GenContentEncryptKey and the ExportKeyTrans, ExportKeyAgree and
-// ExportMailList installable functions.
-//--------------------------------------------------------------------------
-
-type
- PCMSG_CONTENT_ENCRYPT_INFO = ^CMSG_CONTENT_ENCRYPT_INFO;
- {$EXTERNALSYM PCMSG_CONTENT_ENCRYPT_INFO}
- _CMSG_CONTENT_ENCRYPT_INFO = record
- cbSize: DWORD;
- hCryptProv: HCRYPTPROV;
- ContentEncryptionAlgorithm: CRYPT_ALGORITHM_IDENTIFIER;
- pvEncryptionAuxInfo: Pointer;
- cRecipients: DWORD;
- rgCmsRecipients: PCMSG_RECIPIENT_ENCODE_INFO;
- pfnAlloc: PFN_CMSG_ALLOC;
- pfnFree: PFN_CMSG_FREE;
- dwEncryptFlags: DWORD;
- hContentEncryptKey: HCRYPTKEY;
- dwFlags: DWORD;
- end;
- {$EXTERNALSYM _CMSG_CONTENT_ENCRYPT_INFO}
- CMSG_CONTENT_ENCRYPT_INFO = _CMSG_CONTENT_ENCRYPT_INFO;
- {$EXTERNALSYM CMSG_CONTENT_ENCRYPT_INFO}
- TCmsgContentEncryptInfo = CMSG_CONTENT_ENCRYPT_INFO;
- PCmsgContentEncryptInfo = PCMSG_CONTENT_ENCRYPT_INFO;
-
-const
- CMSG_CONTENT_ENCRYPT_PAD_ENCODED_LEN_FLAG = $00000001;
- {$EXTERNALSYM CMSG_CONTENT_ENCRYPT_PAD_ENCODED_LEN_FLAG}
-
- CMSG_CONTENT_ENCRYPT_FREE_PARA_FLAG = $00000001;
- {$EXTERNALSYM CMSG_CONTENT_ENCRYPT_FREE_PARA_FLAG}
- CMSG_CONTENT_ENCRYPT_RELEASE_CONTEXT_FLAG = $00008000;
- {$EXTERNALSYM CMSG_CONTENT_ENCRYPT_RELEASE_CONTEXT_FLAG}
-
-//+-------------------------------------------------------------------------
-// Upon input, ContentEncryptInfo has been initialized from the
-// EnvelopedEncodeInfo.
-//
-// Note, if rgpRecipients instead of rgCmsRecipients are set in the
-// EnvelopedEncodeInfo, then, the rgpRecipients have been converted
-// to rgCmsRecipients in the ContentEncryptInfo.
-//
-// The following fields may be changed in ContentEncryptInfo:
-// hContentEncryptKey
-// hCryptProv
-// ContentEncryptionAlgorithm.Parameters
-// dwFlags
-//
-// All other fields in the ContentEncryptInfo are READONLY.
-//
-// If CMSG_CONTENT_ENCRYPT_PAD_ENCODED_LEN_FLAG is set upon entry
-// in dwEncryptFlags, then, any potentially variable length encoded
-// output should be padded with zeroes to always obtain the
-// same maximum encoded length. This is necessary for
-// CryptMsgCalculateEncodedLength() or CryptMsgOpenToEncode() with
-// definite length streaming.
-//
-// The hContentEncryptKey must be updated.
-//
-// If hCryptProv is NULL upon input, then, it must be updated.
-// If a HCRYPTPROV is acquired that must be released, then, the
-// CMSG_CONTENT_ENCRYPT_RELEASE_CONTEXT_FLAG must be set in dwFlags.
-//
-// If ContentEncryptionAlgorithm.Parameters is updated, then, the
-// CMSG_CONTENT_ENCRYPT_FREE_PARA_FLAG must be set in dwFlags. pfnAlloc and
-// pfnFree must be used for doing the allocation.
-//
-// ContentEncryptionAlgorithm.pszObjId is used to get the OIDFunctionAddress.
-//--------------------------------------------------------------------------
-
-const
- CMSG_OID_GEN_CONTENT_ENCRYPT_KEY_FUNC = 'CryptMsgDllGenContentEncryptKey';
- {$EXTERNALSYM CMSG_OID_GEN_CONTENT_ENCRYPT_KEY_FUNC}
-
-type
- PFN_CMSG_GEN_CONTENT_ENCRYPT_KEY = function(pContentEncryptInfo: PCMSG_CONTENT_ENCRYPT_INFO;
- dwFlags: DWORD; pvReserved: PPointer): BOOL; stdcall;
- {$EXTERNALSYM PFN_CMSG_GEN_CONTENT_ENCRYPT_KEY}
- PfnCmsgGenContentEncryptKey = PFN_CMSG_GEN_CONTENT_ENCRYPT_KEY;
-
-//+-------------------------------------------------------------------------
-// Key Transport Encrypt Info
-//
-// The following data structure contains the information updated by the
-// ExportKeyTrans installable function.
-//--------------------------------------------------------------------------
-
-type
- PCMSG_KEY_TRANS_ENCRYPT_INFO = ^CMSG_KEY_TRANS_ENCRYPT_INFO;
- {$EXTERNALSYM PCMSG_KEY_TRANS_ENCRYPT_INFO}
- _CMSG_KEY_TRANS_ENCRYPT_INFO = record
- cbSize: DWORD;
- dwRecipientIndex: DWORD;
- KeyEncryptionAlgorithm: CRYPT_ALGORITHM_IDENTIFIER;
- EncryptedKey: CRYPT_DATA_BLOB;
- dwFlags: DWORD;
- end;
- {$EXTERNALSYM _CMSG_KEY_TRANS_ENCRYPT_INFO}
- CMSG_KEY_TRANS_ENCRYPT_INFO = _CMSG_KEY_TRANS_ENCRYPT_INFO;
- {$EXTERNALSYM CMSG_KEY_TRANS_ENCRYPT_INFO}
- TCmsgKeyTransEncryptInfo = CMSG_KEY_TRANS_ENCRYPT_INFO;
- PCmsgKeyTransEncryptInfo = PCMSG_KEY_TRANS_ENCRYPT_INFO;
-
-const
- CMSG_KEY_TRANS_ENCRYPT_FREE_PARA_FLAG = $00000001;
- {$EXTERNALSYM CMSG_KEY_TRANS_ENCRYPT_FREE_PARA_FLAG}
-
-//+-------------------------------------------------------------------------
-// Upon input, KeyTransEncryptInfo has been initialized from the
-// KeyTransEncodeInfo.
-//
-// The following fields may be changed in KeyTransEncryptInfo:
-// EncryptedKey
-// KeyEncryptionAlgorithm.Parameters
-// dwFlags
-//
-// All other fields in the KeyTransEncryptInfo are READONLY.
-//
-// The EncryptedKey must be updated. The pfnAlloc and pfnFree specified in
-// ContentEncryptInfo must be used for doing the allocation.
-//
-// If the KeyEncryptionAlgorithm.Parameters is updated, then, the
-// CMSG_KEY_TRANS_ENCRYPT_FREE_PARA_FLAG must be set in dwFlags.
-// The pfnAlloc and pfnFree specified in ContentEncryptInfo must be used
-// for doing the allocation.
-//
-// KeyEncryptionAlgorithm.pszObjId is used to get the OIDFunctionAddress.
-//--------------------------------------------------------------------------
-
-const
- CMSG_OID_EXPORT_KEY_TRANS_FUNC = 'CryptMsgDllExportKeyTrans';
- {$EXTERNALSYM CMSG_OID_EXPORT_KEY_TRANS_FUNC}
-
-type
- PFN_CMSG_EXPORT_KEY_TRANS = function(pContentEncryptInfo: PCMSG_CONTENT_ENCRYPT_INFO;
- pKeyTransEncodeInfo: PCMSG_KEY_TRANS_RECIPIENT_ENCODE_INFO;
- pKeyTransEncryptInfo: PCMSG_KEY_TRANS_ENCRYPT_INFO; dwFlags: DWORD;
- pvReserved: Pointer): BOOL; stdcall;
- {$EXTERNALSYM PFN_CMSG_EXPORT_KEY_TRANS}
- PfnCmsgExportKeyTrans = PFN_CMSG_EXPORT_KEY_TRANS;
-
-//+-------------------------------------------------------------------------
-// Key Agree Key Encrypt Info
-//
-// The following data structure contains the information updated by the
-// ExportKeyAgree installable function for each encrypted key agree
-// recipient.
-//--------------------------------------------------------------------------
-
-type
- PCMSG_KEY_AGREE_KEY_ENCRYPT_INFO = ^CMSG_KEY_AGREE_KEY_ENCRYPT_INFO;
- {$EXTERNALSYM PCMSG_KEY_AGREE_KEY_ENCRYPT_INFO}
- _CMSG_KEY_AGREE_KEY_ENCRYPT_INFO = record
- cbSize: DWORD;
- EncryptedKey: CRYPT_DATA_BLOB;
- end;
- {$EXTERNALSYM _CMSG_KEY_AGREE_KEY_ENCRYPT_INFO}
- CMSG_KEY_AGREE_KEY_ENCRYPT_INFO = _CMSG_KEY_AGREE_KEY_ENCRYPT_INFO;
- {$EXTERNALSYM CMSG_KEY_AGREE_KEY_ENCRYPT_INFO}
- TCmsgKeyAgreeKeyEncryptInfo = CMSG_KEY_AGREE_KEY_ENCRYPT_INFO;
- PCmsgKeyAgreeKeyEncryptInfo = PCMSG_KEY_AGREE_KEY_ENCRYPT_INFO;
-
- PPCMSG_KEY_AGREE_KEY_ENCRYPT_INFO = ^PCMSG_KEY_AGREE_KEY_ENCRYPT_INFO;
- {$NODEFINE PPCMSG_KEY_AGREE_KEY_ENCRYPT_INFO}
-
-//+-------------------------------------------------------------------------
-// Key Agree Encrypt Info
-//
-// The following data structure contains the information applicable to
-// all recipients. Its updated by the ExportKeyAgree installable function.
-//--------------------------------------------------------------------------
-
- PCMSG_KEY_AGREE_ENCRYPT_INFO = ^CMSG_KEY_AGREE_ENCRYPT_INFO;
- {$EXTERNALSYM PCMSG_KEY_AGREE_ENCRYPT_INFO}
- _CMSG_KEY_AGREE_ENCRYPT_INFO = record
- cbSize: DWORD;
- dwRecipientIndex: DWORD;
- KeyEncryptionAlgorithm: CRYPT_ALGORITHM_IDENTIFIER;
- UserKeyingMaterial: CRYPT_DATA_BLOB;
- dwOriginatorChoice: DWORD;
- Union: record
- case Integer of
- // CMSG_KEY_AGREE_ORIGINATOR_CERT
- 0: (OriginatorCertId: CERT_ID);
- // CMSG_KEY_AGREE_ORIGINATOR_PUBLIC_KEY
- 1: (OriginatorPublicKeyInfo: CERT_PUBLIC_KEY_INFO);
- end;
- cKeyAgreeKeyEncryptInfo: DWORD;
- rgpKeyAgreeKeyEncryptInfo: PPCMSG_KEY_AGREE_KEY_ENCRYPT_INFO;
- dwFlags: DWORD;
- end;
- {$EXTERNALSYM _CMSG_KEY_AGREE_ENCRYPT_INFO}
- CMSG_KEY_AGREE_ENCRYPT_INFO = _CMSG_KEY_AGREE_ENCRYPT_INFO;
- {$EXTERNALSYM CMSG_KEY_AGREE_ENCRYPT_INFO}
- TCmsgKeyAgreeEncryptInfo = CMSG_KEY_AGREE_ENCRYPT_INFO;
- PCmsgKeyAgreeEncryptInfo = PCMSG_KEY_AGREE_ENCRYPT_INFO;
-
-const
- CMSG_KEY_AGREE_ENCRYPT_FREE_PARA_FLAG = $00000001;
- {$EXTERNALSYM CMSG_KEY_AGREE_ENCRYPT_FREE_PARA_FLAG}
- CMSG_KEY_AGREE_ENCRYPT_FREE_MATERIAL_FLAG = $00000002;
- {$EXTERNALSYM CMSG_KEY_AGREE_ENCRYPT_FREE_MATERIAL_FLAG}
- CMSG_KEY_AGREE_ENCRYPT_FREE_PUBKEY_ALG_FLAG = $00000004;
- {$EXTERNALSYM CMSG_KEY_AGREE_ENCRYPT_FREE_PUBKEY_ALG_FLAG}
- CMSG_KEY_AGREE_ENCRYPT_FREE_PUBKEY_PARA_FLAG = $00000008;
- {$EXTERNALSYM CMSG_KEY_AGREE_ENCRYPT_FREE_PUBKEY_PARA_FLAG}
- CMSG_KEY_AGREE_ENCRYPT_FREE_PUBKEY_BITS_FLAG = $00000010;
- {$EXTERNALSYM CMSG_KEY_AGREE_ENCRYPT_FREE_PUBKEY_BITS_FLAG}
-
-//+-------------------------------------------------------------------------
-// Upon input, KeyAgreeEncryptInfo has been initialized from the
-// KeyAgreeEncodeInfo.
-//
-// The following fields may be changed in KeyAgreeEncryptInfo:
-// KeyEncryptionAlgorithm.Parameters
-// UserKeyingMaterial
-// dwOriginatorChoice
-// OriginatorCertId
-// OriginatorPublicKeyInfo
-// dwFlags
-//
-// All other fields in the KeyAgreeEncryptInfo are READONLY.
-//
-// If the KeyEncryptionAlgorithm.Parameters is updated, then, the
-// CMSG_KEY_AGREE_ENCRYPT_FREE_PARA_FLAG must be set in dwFlags.
-// The pfnAlloc and pfnFree specified in ContentEncryptInfo must be used
-// for doing the allocation.
-//
-// If the UserKeyingMaterial is updated, then, the
-// CMSG_KEY_AGREE_ENCRYPT_FREE_MATERIAL_FLAG must be set in dwFlags.
-// pfnAlloc and pfnFree must be used for doing the allocation.
-//
-// The dwOriginatorChoice must be updated to either
-// CMSG_KEY_AGREE_ORIGINATOR_CERT or CMSG_KEY_AGREE_ORIGINATOR_PUBLIC_KEY.
-//
-// If the OriginatorPublicKeyInfo is updated, then, the appropriate
-// CMSG_KEY_AGREE_ENCRYPT_FREE_PUBKEY_*_FLAG must be set in dwFlags and
-// pfnAlloc and pfnFree must be used for doing the allocation.
-//
-// If CMSG_CONTENT_ENCRYPT_PAD_ENCODED_LEN_FLAG is set upon entry
-// in pContentEncryptInfo->dwEncryptFlags, then, the OriginatorPublicKeyInfo's
-// Ephemeral PublicKey should be padded with zeroes to always obtain the
-// same maximum encoded length. Note, the length of the generated ephemeral Y
-// public key can vary depending on the number of leading zero bits.
-//
-// Upon input, the array of *rgpKeyAgreeKeyEncryptInfo has been initialized.
-// The EncryptedKey must be updated for each recipient key.
-// The pfnAlloc and pfnFree specified in
-// ContentEncryptInfo must be used for doing the allocation.
-//
-// KeyEncryptionAlgorithm.pszObjId is used to get the OIDFunctionAddress.
-//--------------------------------------------------------------------------
-
-const
- CMSG_OID_EXPORT_KEY_AGREE_FUNC = 'CryptMsgDllExportKeyAgree';
- {$EXTERNALSYM CMSG_OID_EXPORT_KEY_AGREE_FUNC}
-
-type
- PFN_CMSG_EXPORT_KEY_AGREE = function(pContentEncryptInfo: PCMSG_CONTENT_ENCRYPT_INFO;
- pKeyAgreeEncodeInfo: PCMSG_KEY_AGREE_RECIPIENT_ENCODE_INFO;
- pKeyAgreeEncryptInfo: PCMSG_KEY_AGREE_ENCRYPT_INFO; dwFlags: DWORD;
- pvReserved: Pointer): BOOL; stdcall;
- {$EXTERNALSYM PFN_CMSG_EXPORT_KEY_AGREE}
- PfnCmsgExportKeyAgree = PFN_CMSG_EXPORT_KEY_AGREE;
-
-//+-------------------------------------------------------------------------
-// Mail List Encrypt Info
-//
-// The following data structure contains the information updated by the
-// ExportMailList installable function.
-//--------------------------------------------------------------------------
-
-type
- PCMSG_MAIL_LIST_ENCRYPT_INFO = ^CMSG_MAIL_LIST_ENCRYPT_INFO;
- {$EXTERNALSYM PCMSG_MAIL_LIST_ENCRYPT_INFO}
- _CMSG_MAIL_LIST_ENCRYPT_INFO = record
- cbSize: DWORD;
- dwRecipientIndex: DWORD;
- KeyEncryptionAlgorithm: CRYPT_ALGORITHM_IDENTIFIER;
- EncryptedKey: CRYPT_DATA_BLOB;
- dwFlags: DWORD;
- end;
- {$EXTERNALSYM _CMSG_MAIL_LIST_ENCRYPT_INFO}
- CMSG_MAIL_LIST_ENCRYPT_INFO = _CMSG_MAIL_LIST_ENCRYPT_INFO;
- {$EXTERNALSYM CMSG_MAIL_LIST_ENCRYPT_INFO}
- TCmsgMailListEncryptInfo = CMSG_MAIL_LIST_ENCRYPT_INFO;
- PCmsgMailListEncryptInfo = PCMSG_MAIL_LIST_ENCRYPT_INFO;
-
-const
- CMSG_MAIL_LIST_ENCRYPT_FREE_PARA_FLAG = $00000001;
- {$EXTERNALSYM CMSG_MAIL_LIST_ENCRYPT_FREE_PARA_FLAG}
-
-//+-------------------------------------------------------------------------
-// Upon input, MailListEncryptInfo has been initialized from the
-// MailListEncodeInfo.
-//
-// The following fields may be changed in MailListEncryptInfo:
-// EncryptedKey
-// KeyEncryptionAlgorithm.Parameters
-// dwFlags
-//
-// All other fields in the MailListEncryptInfo are READONLY.
-//
-// The EncryptedKey must be updated. The pfnAlloc and pfnFree specified in
-// ContentEncryptInfo must be used for doing the allocation.
-//
-// If the KeyEncryptionAlgorithm.Parameters is updated, then, the
-// CMSG_MAIL_LIST_ENCRYPT_FREE_PARA_FLAG must be set in dwFlags.
-// The pfnAlloc and pfnFree specified in ContentEncryptInfo must be used
-// for doing the allocation.
-//
-// KeyEncryptionAlgorithm.pszObjId is used to get the OIDFunctionAddress.
-//--------------------------------------------------------------------------
-
-const
- CMSG_OID_EXPORT_MAIL_LIST_FUNC = 'CryptMsgDllExportMailList';
- {$EXTERNALSYM CMSG_OID_EXPORT_MAIL_LIST_FUNC}
-
-type
- PFN_CMSG_EXPORT_MAIL_LIST = function(pContentEncryptInfo: PCMSG_CONTENT_ENCRYPT_INFO;
- pMailListEncodeInfo: PCMSG_MAIL_LIST_RECIPIENT_ENCODE_INFO;
- pMailListEncryptInfo: PCMSG_MAIL_LIST_ENCRYPT_INFO; dwFlags: DWORD;
- pvReserved: Pointer): BOOL; stdcall;
- {$EXTERNALSYM PFN_CMSG_EXPORT_MAIL_LIST}
- PfnCmsgExportMailList = PFN_CMSG_EXPORT_MAIL_LIST;
-
-//+-------------------------------------------------------------------------
-// OID Installable functions for importing an encoded and encrypted content
-// encryption key.
-//
-// There's a different installable function for each CMS Recipient choice:
-// ImportKeyTrans
-// ImportKeyAgree
-// ImportMailList
-//
-// Iterates through the following OIDs to get the OID installable function:
-// KeyEncryptionOID!ContentEncryptionOID
-// KeyEncryptionOID
-// ContentEncryptionOID
-//
-// If the OID installable function doesn't support the specified
-// KeyEncryption and ContentEncryption OIDs, then, return FALSE with
-// LastError set to E_NOTIMPL.
-//--------------------------------------------------------------------------
-
-const
- CMSG_OID_IMPORT_KEY_TRANS_FUNC = 'CryptMsgDllImportKeyTrans';
- {$EXTERNALSYM CMSG_OID_IMPORT_KEY_TRANS_FUNC}
-
-type
- PFN_CMSG_IMPORT_KEY_TRANS = function(pContentEncryptionAlgorithm: PCRYPT_ALGORITHM_IDENTIFIER;
- pKeyTransDecryptPara: PCMSG_CTRL_KEY_TRANS_DECRYPT_PARA; dwFlags: DWORD;
- pvReserved: Pointer; var phContentEncryptKey: HCRYPTKEY): BOOL; stdcall;
- {$EXTERNALSYM PFN_CMSG_IMPORT_KEY_TRANS}
- PfnCmsgImportKeyTrans = PFN_CMSG_IMPORT_KEY_TRANS;
-
-const
- CMSG_OID_IMPORT_KEY_AGREE_FUNC = 'CryptMsgDllImportKeyAgree';
- {$EXTERNALSYM CMSG_OID_IMPORT_KEY_AGREE_FUNC}
-
-type
- PFN_CMSG_IMPORT_KEY_AGREE = function(pContentEncryptionAlgorithm: PCRYPT_ALGORITHM_IDENTIFIER;
- pKeyAgreeDecryptPara: PCMSG_CTRL_KEY_AGREE_DECRYPT_PARA; dwFlags: DWORD;
- pvReserved: Pointer; var phContentEncryptKey: HCRYPTKEY): BOOL; stdcall;
- {$EXTERNALSYM PFN_CMSG_IMPORT_KEY_AGREE}
- PfnCmsgImportKeyAgree = PFN_CMSG_IMPORT_KEY_AGREE;
-
-const
- CMSG_OID_IMPORT_MAIL_LIST_FUNC = 'CryptMsgDllImportMailList';
- {$EXTERNALSYM CMSG_OID_IMPORT_MAIL_LIST_FUNC}
-
-type
- PFN_CMSG_IMPORT_MAIL_LIST = function(pContentEncryptionAlgorithm: PCRYPT_ALGORITHM_IDENTIFIER;
- pMailListDecryptPara: PCMSG_CTRL_MAIL_LIST_DECRYPT_PARA; dwFlags: DWORD;
- pvReserved: Pointer; var phContentEncryptKey: HCRYPTKEY): BOOL; stdcall;
- {$EXTERNALSYM PFN_CMSG_IMPORT_MAIL_LIST}
- PfnCmsgImportMailList = PFN_CMSG_IMPORT_MAIL_LIST;
-
-//+=========================================================================
-// Certificate Store Data Structures and APIs
-//==========================================================================
-
-//+-------------------------------------------------------------------------
-// In its most basic implementation, a cert store is simply a
-// collection of certificates and/or CRLs. This is the case when
-// a cert store is opened with all of its certificates and CRLs
-// coming from a PKCS #7 encoded cryptographic message.
-//
-// Nonetheless, all cert stores have the following properties:
-// - A public key may have more than one certificate in the store.
-// For example, a private/public key used for signing may have a
-// certificate issued for VISA and another issued for
-// Mastercard. Also, when a certificate is renewed there might
-// be more than one certificate with the same subject and
-// issuer.
-// - However, each certificate in the store is uniquely
-// identified by its Issuer and SerialNumber.
-// - There's an issuer of subject certificate relationship. A
-// certificate's issuer is found by doing a match of
-// pSubjectCert->Issuer with pIssuerCert->Subject.
-// The relationship is verified by using
-// the issuer's public key to verify the subject certificate's
-// signature. Note, there might be X.509 v3 extensions
-// to assist in finding the issuer certificate.
-// - Since issuer certificates might be renewed, a subject
-// certificate might have more than one issuer certificate.
-// - There's an issuer of CRL relationship. An
-// issuer's CRL is found by doing a match of
-// pIssuerCert->Subject with pCrl->Issuer.
-// The relationship is verified by using
-// the issuer's public key to verify the CRL's
-// signature. Note, there might be X.509 v3 extensions
-// to assist in finding the CRL.
-// - Since some issuers might support the X.509 v3 delta CRL
-// extensions, an issuer might have more than one CRL.
-// - The store shouldn't have any redundant certificates or
-// CRLs. There shouldn't be two certificates with the same
-// Issuer and SerialNumber. There shouldn't be two CRLs with
-// the same Issuer, ThisUpdate and NextUpdate.
-// - The store has NO policy or trust information. No
-// certificates are tagged as being "root". Its up to
-// the application to maintain a list of CertIds (Issuer +
-// SerialNumber) for certificates it trusts.
-// - The store might contain bad certificates and/or CRLs.
-// The issuer's signature of a subject certificate or CRL may
-// not verify. Certificates or CRLs may not satisfy their
-// time validity requirements. Certificates may be
-// revoked.
-//
-// In addition to the certificates and CRLs, properties can be
-// stored. There are two predefined property IDs for a user
-// certificate: CERT_KEY_PROV_HANDLE_PROP_ID and
-// CERT_KEY_PROV_INFO_PROP_ID. The CERT_KEY_PROV_HANDLE_PROP_ID
-// is a HCRYPTPROV handle to the private key assoicated
-// with the certificate. The CERT_KEY_PROV_INFO_PROP_ID contains
-// information to be used to call
-// CryptAcquireContext and CryptSetProvParam to get a handle
-// to the private key associated with the certificate.
-//
-// There exists two more predefined property IDs for certificates
-// and CRLs, CERT_SHA1_HASH_PROP_ID and CERT_MD5_HASH_PROP_ID.
-// If these properties don't already exist, then, a hash of the
-// content is computed. (CERT_HASH_PROP_ID maps to the default
-// hash algorithm, currently, CERT_SHA1_HASH_PROP_ID).
-//
-// There are additional APIs for creating certificate and CRL
-// contexts not in a store (CertCreateCertificateContext and
-// CertCreateCRLContext).
-//
-//--------------------------------------------------------------------------
-
-type
- HCERTSTORE = Pointer;
- {$EXTERNALSYM HCERTSTORE}
- PHCERTSTORE = ^HCERTSTORE;
- {$NODEFINE PHCERTSTORE}
-
-//+-------------------------------------------------------------------------
-// Certificate context.
-//
-// A certificate context contains both the encoded and decoded representation
-// of a certificate. A certificate context returned by a cert store function
-// must be freed by calling the CertFreeCertificateContext function. The
-// CertDuplicateCertificateContext function can be called to make a duplicate
-// copy (which also must be freed by calling CertFreeCertificateContext).
-//--------------------------------------------------------------------------
-
- PCERT_CONTEXT = ^CERT_CONTEXT;
- {$EXTERNALSYM CERT_CONTEXT}
- _CERT_CONTEXT = record
- dwCertEncodingType: DWORD;
- pbCertEncoded: LPBYTE;
- cbCertEncoded: DWORD;
- pCertInfo: PCERT_INFO;
- hCertStore: HCERTSTORE;
- end;
- {$EXTERNALSYM _CERT_CONTEXT}
- CERT_CONTEXT = _CERT_CONTEXT;
- {$EXTERNALSYM CERT_CONTEXT}
- TCertContext = CERT_CONTEXT;
- PCertContext = PCERT_CONTEXT;
-
- PCCERT_CONTEXT = PCERT_CONTEXT;
- {$EXTERNALSYM PCCERT_CONTEXT}
- PPCCERT_CONTEXT = ^PCCERT_CONTEXT;
- {$NODEFINE PCCERT_CONTEXT}
-
-//+-------------------------------------------------------------------------
-// CRL context.
-//
-// A CRL context contains both the encoded and decoded representation
-// of a CRL. A CRL context returned by a cert store function
-// must be freed by calling the CertFreeCRLContext function. The
-// CertDuplicateCRLContext function can be called to make a duplicate
-// copy (which also must be freed by calling CertFreeCRLContext).
-//--------------------------------------------------------------------------
-
- PCRL_CONTEXT = ^CRL_CONTEXT;
- {$EXTERNALSYM PCRL_CONTEXT}
- _CRL_CONTEXT = record
- dwCertEncodingType: DWORD;
- pbCrlEncoded: LPBYTE;
- cbCrlEncoded: DWORD;
- pCrlInfo: PCRL_INFO;
- hCertStore: HCERTSTORE;
- end;
- {$EXTERNALSYM _CRL_CONTEXT}
- CRL_CONTEXT = _CRL_CONTEXT;
- {$EXTERNALSYM CRL_CONTEXT}
- TCrlContext = CRL_CONTEXT;
- PCrlContext = PCRL_CONTEXT;
-
- PCCRL_CONTEXT = PCRL_CONTEXT;
- {$EXTERNALSYM PCCRL_CONTEXT}
- PPCCRL_CONTEXT = ^PCCRL_CONTEXT;
- {$NODEFINE PPCCRL_CONTEXT}
-
-//+-------------------------------------------------------------------------
-// Certificate Trust List (CTL) context.
-//
-// A CTL context contains both the encoded and decoded representation
-// of a CTL. Also contains an opened HCRYPTMSG handle to the decoded
-// cryptographic signed message containing the CTL_INFO as its inner content.
-// pbCtlContent is the encoded inner content of the signed message.
-//
-// The CryptMsg APIs can be used to extract additional signer information.
-//--------------------------------------------------------------------------
-
- PCTL_CONTEXT = ^CTL_CONTEXT;
- {$EXTERNALSYM PCTL_CONTEXT}
- _CTL_CONTEXT = record
- dwMsgAndCertEncodingType: DWORD;
- pbCtlEncoded: LPBYTE;
- cbCtlEncoded: DWORD;
- pCtlInfo: PCTL_INFO;
- hCertStore: HCERTSTORE;
- hCryptMsg: HCRYPTMSG;
- pbCtlContent: LPBYTE;
- cbCtlContent: DWORD;
- end;
- {$EXTERNALSYM _CTL_CONTEXT}
- CTL_CONTEXT = _CTL_CONTEXT;
- {$EXTERNALSYM CTL_CONTEXT}
- TCtlContext = CTL_CONTEXT;
- PCtlContext = PCTL_CONTEXT;
-
- PCCTL_CONTEXT = PCTL_CONTEXT;
- {$EXTERNALSYM PCCTL_CONTEXT}
- PPCCTL_CONTEXT = ^PCCTL_CONTEXT;
- {$EXTERNALSYM PPCCTL_CONTEXT}
-
-//+-------------------------------------------------------------------------
-// Certificate, CRL and CTL property IDs
-//
-// See CertSetCertificateContextProperty or CertGetCertificateContextProperty
-// for usage information.
-//--------------------------------------------------------------------------
-
-const
- CERT_KEY_PROV_HANDLE_PROP_ID = 1;
- {$EXTERNALSYM CERT_KEY_PROV_HANDLE_PROP_ID}
- CERT_KEY_PROV_INFO_PROP_ID = 2;
- {$EXTERNALSYM CERT_KEY_PROV_INFO_PROP_ID}
- CERT_SHA1_HASH_PROP_ID = 3;
- {$EXTERNALSYM CERT_SHA1_HASH_PROP_ID}
- CERT_MD5_HASH_PROP_ID = 4;
- {$EXTERNALSYM CERT_MD5_HASH_PROP_ID}
- CERT_HASH_PROP_ID = CERT_SHA1_HASH_PROP_ID;
- {$EXTERNALSYM CERT_HASH_PROP_ID}
- CERT_KEY_CONTEXT_PROP_ID = 5;
- {$EXTERNALSYM CERT_KEY_CONTEXT_PROP_ID}
- CERT_KEY_SPEC_PROP_ID = 6;
- {$EXTERNALSYM CERT_KEY_SPEC_PROP_ID}
- CERT_IE30_RESERVED_PROP_ID = 7;
- {$EXTERNALSYM CERT_IE30_RESERVED_PROP_ID}
- CERT_PUBKEY_HASH_RESERVED_PROP_ID = 8;
- {$EXTERNALSYM CERT_PUBKEY_HASH_RESERVED_PROP_ID}
- CERT_ENHKEY_USAGE_PROP_ID = 9;
- {$EXTERNALSYM CERT_ENHKEY_USAGE_PROP_ID}
- CERT_CTL_USAGE_PROP_ID = CERT_ENHKEY_USAGE_PROP_ID;
- {$EXTERNALSYM CERT_CTL_USAGE_PROP_ID}
- CERT_NEXT_UPDATE_LOCATION_PROP_ID = 10;
- {$EXTERNALSYM CERT_NEXT_UPDATE_LOCATION_PROP_ID}
- CERT_FRIENDLY_NAME_PROP_ID = 11;
- {$EXTERNALSYM CERT_FRIENDLY_NAME_PROP_ID}
- CERT_PVK_FILE_PROP_ID = 12;
- {$EXTERNALSYM CERT_PVK_FILE_PROP_ID}
- CERT_DESCRIPTION_PROP_ID = 13;
- {$EXTERNALSYM CERT_DESCRIPTION_PROP_ID}
- CERT_ACCESS_STATE_PROP_ID = 14;
- {$EXTERNALSYM CERT_ACCESS_STATE_PROP_ID}
- CERT_SIGNATURE_HASH_PROP_ID = 15;
- {$EXTERNALSYM CERT_SIGNATURE_HASH_PROP_ID}
- CERT_SMART_CARD_DATA_PROP_ID = 16;
- {$EXTERNALSYM CERT_SMART_CARD_DATA_PROP_ID}
- CERT_EFS_PROP_ID = 17;
- {$EXTERNALSYM CERT_EFS_PROP_ID}
- CERT_FORTEZZA_DATA_PROP_ID = 18;
- {$EXTERNALSYM CERT_FORTEZZA_DATA_PROP_ID}
- CERT_ARCHIVED_PROP_ID = 19;
- {$EXTERNALSYM CERT_ARCHIVED_PROP_ID}
- CERT_KEY_IDENTIFIER_PROP_ID = 20;
- {$EXTERNALSYM CERT_KEY_IDENTIFIER_PROP_ID}
- CERT_AUTO_ENROLL_PROP_ID = 21;
- {$EXTERNALSYM CERT_AUTO_ENROLL_PROP_ID}
- CERT_PUBKEY_ALG_PARA_PROP_ID = 22;
- {$EXTERNALSYM CERT_PUBKEY_ALG_PARA_PROP_ID}
-
- CERT_FIRST_RESERVED_PROP_ID = 23;
- {$EXTERNALSYM CERT_FIRST_RESERVED_PROP_ID}
-
-// Note, 32 - 35 are reserved for the CERT, CRL, CTL and KeyId file element IDs.
-
- CERT_LAST_RESERVED_PROP_ID = $00007FFF;
- {$EXTERNALSYM CERT_LAST_RESERVED_PROP_ID}
- CERT_FIRST_USER_PROP_ID = $00008000;
- {$EXTERNALSYM CERT_FIRST_USER_PROP_ID}
- CERT_LAST_USER_PROP_ID = $0000FFFF;
- {$EXTERNALSYM CERT_LAST_USER_PROP_ID}
-
-function IS_CERT_HASH_PROP_ID(X: DWORD): Boolean;
-{$EXTERNALSYM IS_CERT_HASH_PROP_ID}
-
-//+-------------------------------------------------------------------------
-// Access State flags returned by CERT_ACCESS_STATE_PROP_ID. Note,
-// CERT_ACCESS_PROP_ID is read only.
-//--------------------------------------------------------------------------
-
-// Set if context property writes are persisted. For instance, not set for
-// memory store contexts. Set for registry based stores opened as read or write.
-// Not set for registry based stores opened as read only.
-
-const
- CERT_ACCESS_STATE_WRITE_PERSIST_FLAG = $1;
- {$EXTERNALSYM CERT_ACCESS_STATE_WRITE_PERSIST_FLAG}
-
-// Set if context resides in a SYSTEM or SYSTEM_REGISTRY store.
-
- CERT_ACCESS_STATE_SYSTEM_STORE_FLAG = $2;
- {$EXTERNALSYM CERT_ACCESS_STATE_SYSTEM_STORE_FLAG}
-
-//+-------------------------------------------------------------------------
-// Cryptographic Key Provider Information
-//
-// CRYPT_KEY_PROV_INFO defines the CERT_KEY_PROV_INFO_PROP_ID's pvData.
-//
-// The CRYPT_KEY_PROV_INFO fields are passed to CryptAcquireContext
-// to get a HCRYPTPROV handle. The optional CRYPT_KEY_PROV_PARAM fields are
-// passed to CryptSetProvParam to further initialize the provider.
-//
-// The dwKeySpec field identifies the private key to use from the container
-// For example, AT_KEYEXCHANGE or AT_SIGNATURE.
-//--------------------------------------------------------------------------
-
-type
- PCRYPT_KEY_PROV_PARAM = ^CRYPT_KEY_PROV_PARAM;
- {$EXTERNALSYM PCRYPT_KEY_PROV_PARAM}
- _CRYPT_KEY_PROV_PARAM = record
- dwParam: DWORD;
- pbData: LPBYTE;
- cbData: DWORD;
- dwFlags: DWORD;
- end;
- {$EXTERNALSYM _CRYPT_KEY_PROV_PARAM}
- CRYPT_KEY_PROV_PARAM = _CRYPT_KEY_PROV_PARAM;
- {$EXTERNALSYM CRYPT_KEY_PROV_PARAM}
- TCryptKeyProvParam = CRYPT_KEY_PROV_PARAM;
- PCryptKeyProvParam = PCRYPT_KEY_PROV_PARAM;
-
- PCRYPT_KEY_PROV_INFO = ^CRYPT_KEY_PROV_INFO;
- {$EXTERNALSYM PCRYPT_KEY_PROV_INFO}
- _CRYPT_KEY_PROV_INFO = record
- pwszContainerName: LPWSTR;
- pwszProvName: LPWSTR;
- dwProvType: DWORD;
- dwFlags: DWORD;
- cProvParam: DWORD;
- rgProvParam: PCRYPT_KEY_PROV_PARAM;
- dwKeySpec: DWORD;
- end;
- {$EXTERNALSYM _CRYPT_KEY_PROV_INFO}
- CRYPT_KEY_PROV_INFO = _CRYPT_KEY_PROV_INFO;
- {$EXTERNALSYM CRYPT_KEY_PROV_INFO}
- TCryptKeyProvInfo = CRYPT_KEY_PROV_INFO;
- PCryptKeyProvInfo = PCRYPT_KEY_PROV_INFO;
-
-//+-------------------------------------------------------------------------
-// The following flag should be set in the above dwFlags to enable
-// a CertSetCertificateContextProperty(CERT_KEY_CONTEXT_PROP_ID) after a
-// CryptAcquireContext is done in the Sign or Decrypt Message functions.
-//
-// The following define must not collide with any of the
-// CryptAcquireContext dwFlag defines.
-//--------------------------------------------------------------------------
-
-const
- CERT_SET_KEY_PROV_HANDLE_PROP_ID = $00000001;
- {$EXTERNALSYM CERT_SET_KEY_PROV_HANDLE_PROP_ID}
- CERT_SET_KEY_CONTEXT_PROP_ID = $00000001;
- {$EXTERNALSYM CERT_SET_KEY_CONTEXT_PROP_ID}
-
-//+-------------------------------------------------------------------------
-// Certificate Key Context
-//
-// CERT_KEY_CONTEXT defines the CERT_KEY_CONTEXT_PROP_ID's pvData.
-//--------------------------------------------------------------------------
-
-type
- PCERT_KEY_CONTEXT = ^CERT_KEY_CONTEXT;
- {$EXTERNALSYM PCERT_KEY_CONTEXT}
- _CERT_KEY_CONTEXT = record
- cbSize: DWORD; // sizeof(CERT_KEY_CONTEXT)
- hCryptProv: HCRYPTPROV;
- dwKeySpec: DWORD;
- end;
- {$EXTERNALSYM _CERT_KEY_CONTEXT}
- CERT_KEY_CONTEXT = _CERT_KEY_CONTEXT;
- {$EXTERNALSYM CERT_KEY_CONTEXT}
- TCertKeyContext = CERT_KEY_CONTEXT;
- PCertKeyContext = PCERT_KEY_CONTEXT;
-
-//+-------------------------------------------------------------------------
-// Certificate Store Provider Types
-//--------------------------------------------------------------------------
-
-const
- CERT_STORE_PROV_MSG = LPCSTR(1);
- {$EXTERNALSYM CERT_STORE_PROV_MSG}
- CERT_STORE_PROV_MEMORY = LPCSTR(2);
- {$EXTERNALSYM CERT_STORE_PROV_MEMORY}
- CERT_STORE_PROV_FILE = LPCSTR(3);
- {$EXTERNALSYM CERT_STORE_PROV_FILE}
- CERT_STORE_PROV_REG = LPCSTR(4);
- {$EXTERNALSYM CERT_STORE_PROV_REG}
-
- CERT_STORE_PROV_PKCS7 = LPCSTR(5);
- {$EXTERNALSYM CERT_STORE_PROV_PKCS7}
- CERT_STORE_PROV_SERIALIZED = LPCSTR(6);
- {$EXTERNALSYM CERT_STORE_PROV_SERIALIZED}
- CERT_STORE_PROV_FILENAME_A = LPCSTR(7);
- {$EXTERNALSYM CERT_STORE_PROV_FILENAME_A}
- CERT_STORE_PROV_FILENAME_W = LPCSTR(8);
- {$EXTERNALSYM CERT_STORE_PROV_FILENAME_W}
- CERT_STORE_PROV_FILENAME = CERT_STORE_PROV_FILENAME_W;
- {$EXTERNALSYM CERT_STORE_PROV_FILENAME}
- CERT_STORE_PROV_SYSTEM_A = LPCSTR(9);
- {$EXTERNALSYM CERT_STORE_PROV_SYSTEM_A}
- CERT_STORE_PROV_SYSTEM_W = LPCSTR(10);
- {$EXTERNALSYM CERT_STORE_PROV_SYSTEM_W}
- CERT_STORE_PROV_SYSTEM = CERT_STORE_PROV_SYSTEM_W;
- {$EXTERNALSYM CERT_STORE_PROV_SYSTEM}
-
- CERT_STORE_PROV_COLLECTION = LPCSTR(11);
- {$EXTERNALSYM CERT_STORE_PROV_COLLECTION}
- CERT_STORE_PROV_SYSTEM_REGISTRY_A = LPCSTR(12);
- {$EXTERNALSYM CERT_STORE_PROV_SYSTEM_REGISTRY_A}
- CERT_STORE_PROV_SYSTEM_REGISTRY_W = LPCSTR(13);
- {$EXTERNALSYM CERT_STORE_PROV_SYSTEM_REGISTRY_W}
- CERT_STORE_PROV_SYSTEM_REGISTRY = CERT_STORE_PROV_SYSTEM_REGISTRY_W;
- {$EXTERNALSYM CERT_STORE_PROV_SYSTEM_REGISTRY}
- CERT_STORE_PROV_PHYSICAL_W = LPCSTR(14);
- {$EXTERNALSYM CERT_STORE_PROV_PHYSICAL_W}
- CERT_STORE_PROV_PHYSICAL = CERT_STORE_PROV_PHYSICAL_W;
- {$EXTERNALSYM CERT_STORE_PROV_PHYSICAL}
- CERT_STORE_PROV_SMART_CARD_W = LPCSTR(15);
- {$EXTERNALSYM CERT_STORE_PROV_SMART_CARD_W}
- CERT_STORE_PROV_SMART_CARD = CERT_STORE_PROV_SMART_CARD_W;
- {$EXTERNALSYM CERT_STORE_PROV_SMART_CARD}
- CERT_STORE_PROV_LDAP_W = LPCSTR(16);
- {$EXTERNALSYM CERT_STORE_PROV_LDAP_W}
- CERT_STORE_PROV_LDAP = CERT_STORE_PROV_LDAP_W;
- {$EXTERNALSYM CERT_STORE_PROV_LDAP}
-
- sz_CERT_STORE_PROV_MEMORY = 'Memory';
- {$EXTERNALSYM sz_CERT_STORE_PROV_MEMORY}
- sz_CERT_STORE_PROV_FILENAME_W = 'File';
- {$EXTERNALSYM sz_CERT_STORE_PROV_FILENAME_W}
- sz_CERT_STORE_PROV_FILENAME = sz_CERT_STORE_PROV_FILENAME_W;
- {$EXTERNALSYM sz_CERT_STORE_PROV_FILENAME}
- sz_CERT_STORE_PROV_SYSTEM_W = 'System';
- {$EXTERNALSYM sz_CERT_STORE_PROV_SYSTEM_W}
- sz_CERT_STORE_PROV_SYSTEM = sz_CERT_STORE_PROV_SYSTEM_W;
- {$EXTERNALSYM sz_CERT_STORE_PROV_SYSTEM}
- sz_CERT_STORE_PROV_PKCS7 = 'PKCS7';
- {$EXTERNALSYM sz_CERT_STORE_PROV_PKCS7}
- sz_CERT_STORE_PROV_SERIALIZED = 'Serialized';
- {$EXTERNALSYM sz_CERT_STORE_PROV_SERIALIZED}
-
- sz_CERT_STORE_PROV_COLLECTION = 'Collection';
- {$EXTERNALSYM sz_CERT_STORE_PROV_COLLECTION}
- sz_CERT_STORE_PROV_SYSTEM_REGISTRY_W = 'SystemRegistry';
- {$EXTERNALSYM sz_CERT_STORE_PROV_SYSTEM_REGISTRY_W}
- sz_CERT_STORE_PROV_SYSTEM_REGISTRY = sz_CERT_STORE_PROV_SYSTEM_REGISTRY_W;
- {$EXTERNALSYM sz_CERT_STORE_PROV_SYSTEM_REGISTRY}
- sz_CERT_STORE_PROV_PHYSICAL_W = 'Physical';
- {$EXTERNALSYM sz_CERT_STORE_PROV_PHYSICAL_W}
- sz_CERT_STORE_PROV_PHYSICAL = sz_CERT_STORE_PROV_PHYSICAL_W;
- {$EXTERNALSYM sz_CERT_STORE_PROV_PHYSICAL}
- sz_CERT_STORE_PROV_SMART_CARD_W = 'SmartCard';
- {$EXTERNALSYM sz_CERT_STORE_PROV_SMART_CARD_W}
- sz_CERT_STORE_PROV_SMART_CARD = sz_CERT_STORE_PROV_SMART_CARD_W;
- {$EXTERNALSYM sz_CERT_STORE_PROV_SMART_CARD}
- sz_CERT_STORE_PROV_LDAP_W = 'Ldap';
- {$EXTERNALSYM sz_CERT_STORE_PROV_LDAP_W}
- sz_CERT_STORE_PROV_LDAP = sz_CERT_STORE_PROV_LDAP_W;
- {$EXTERNALSYM sz_CERT_STORE_PROV_LDAP}
-
-//+-------------------------------------------------------------------------
-// Certificate Store verify/results flags
-//--------------------------------------------------------------------------
-
- CERT_STORE_SIGNATURE_FLAG = $00000001;
- {$EXTERNALSYM CERT_STORE_SIGNATURE_FLAG}
- CERT_STORE_TIME_VALIDITY_FLAG = $00000002;
- {$EXTERNALSYM CERT_STORE_TIME_VALIDITY_FLAG}
- CERT_STORE_REVOCATION_FLAG = $00000004;
- {$EXTERNALSYM CERT_STORE_REVOCATION_FLAG}
- CERT_STORE_NO_CRL_FLAG = $00010000;
- {$EXTERNALSYM CERT_STORE_NO_CRL_FLAG}
- CERT_STORE_NO_ISSUER_FLAG = $00020000;
- {$EXTERNALSYM CERT_STORE_NO_ISSUER_FLAG}
-
-//+-------------------------------------------------------------------------
-// Certificate Store open/property flags
-//--------------------------------------------------------------------------
-
- CERT_STORE_NO_CRYPT_RELEASE_FLAG = $00000001;
- {$EXTERNALSYM CERT_STORE_NO_CRYPT_RELEASE_FLAG}
- CERT_STORE_SET_LOCALIZED_NAME_FLAG = $00000002;
- {$EXTERNALSYM CERT_STORE_SET_LOCALIZED_NAME_FLAG}
- CERT_STORE_DEFER_CLOSE_UNTIL_LAST_FREE_FLAG = $00000004;
- {$EXTERNALSYM CERT_STORE_DEFER_CLOSE_UNTIL_LAST_FREE_FLAG}
- CERT_STORE_DELETE_FLAG = $00000010;
- {$EXTERNALSYM CERT_STORE_DELETE_FLAG}
- CERT_STORE_MANIFOLD_FLAG = $00000100;
- {$EXTERNALSYM CERT_STORE_MANIFOLD_FLAG}
- CERT_STORE_ENUM_ARCHIVED_FLAG = $00000200;
- {$EXTERNALSYM CERT_STORE_ENUM_ARCHIVED_FLAG}
- CERT_STORE_UPDATE_KEYID_FLAG = $00000400;
- {$EXTERNALSYM CERT_STORE_UPDATE_KEYID_FLAG}
- CERT_STORE_READONLY_FLAG = $00008000;
- {$EXTERNALSYM CERT_STORE_READONLY_FLAG}
- CERT_STORE_OPEN_EXISTING_FLAG = $00004000;
- {$EXTERNALSYM CERT_STORE_OPEN_EXISTING_FLAG}
- CERT_STORE_CREATE_NEW_FLAG = $00002000;
- {$EXTERNALSYM CERT_STORE_CREATE_NEW_FLAG}
- CERT_STORE_MAXIMUM_ALLOWED_FLAG = $00001000;
- {$EXTERNALSYM CERT_STORE_MAXIMUM_ALLOWED_FLAG}
-
-//+-------------------------------------------------------------------------
-// Certificate Store Provider flags are in the HiWord (0xFFFF0000)
-//--------------------------------------------------------------------------
-
-//+-------------------------------------------------------------------------
-// Certificate System Store Flag Values
-//--------------------------------------------------------------------------
-// Includes flags and location
-
- CERT_SYSTEM_STORE_MASK = DWORD($FFFF0000);
- {$EXTERNALSYM CERT_SYSTEM_STORE_MASK}
-
-// Set if pvPara points to a CERT_SYSTEM_STORE_RELOCATE_PARA structure
-
- CERT_SYSTEM_STORE_RELOCATE_FLAG = DWORD($80000000);
- {$EXTERNALSYM CERT_SYSTEM_STORE_RELOCATE_FLAG}
-
-type
- PCERT_SYSTEM_STORE_RELOCATE_PARA = ^CERT_SYSTEM_STORE_RELOCATE_PARA;
- {$EXTERNALSYM PCERT_SYSTEM_STORE_RELOCATE_PARA}
- _CERT_SYSTEM_STORE_RELOCATE_PARA = record
- Union1: record
- case Integer of
- 0: (hKeyBase: HKEY);
- 1: (pvBase: Pointer);
- end;
- case Integer of
- 0: (pvSystemStore: Pointer);
- 1: (pszSystemStore: LPCSTR);
- 2: (pwszSystemStore: LPCWSTR);
- end;
- {$EXTERNALSYM _CERT_SYSTEM_STORE_RELOCATE_PARA}
- CERT_SYSTEM_STORE_RELOCATE_PARA = _CERT_SYSTEM_STORE_RELOCATE_PARA;
- {$EXTERNALSYM CERT_SYSTEM_STORE_RELOCATE_PARA}
- TCertSystemStoreRelocatePara = CERT_SYSTEM_STORE_RELOCATE_PARA;
- PCertSystemStoreRelocatePara = PCERT_SYSTEM_STORE_RELOCATE_PARA;
-
-// By default, when the CurrentUser "Root" store is opened, any SystemRegistry
-// roots not also on the protected root list are deleted from the cache before
-// CertOpenStore() returns. Set the following flag to return all the roots
-// in the SystemRegistry without checking the protected root list.
-
-const
- CERT_SYSTEM_STORE_UNPROTECTED_FLAG = $40000000;
- {$EXTERNALSYM CERT_SYSTEM_STORE_UNPROTECTED_FLAG}
-
-// Location of the system store:
-
- CERT_SYSTEM_STORE_LOCATION_MASK = $00FF0000;
- {$EXTERNALSYM CERT_SYSTEM_STORE_LOCATION_MASK}
- CERT_SYSTEM_STORE_LOCATION_SHIFT = 16;
- {$EXTERNALSYM CERT_SYSTEM_STORE_LOCATION_SHIFT}
-
-// Registry: HKEY_CURRENT_USER or HKEY_LOCAL_MACHINE
-
- CERT_SYSTEM_STORE_CURRENT_USER_ID = 1;
- {$EXTERNALSYM CERT_SYSTEM_STORE_CURRENT_USER_ID}
- CERT_SYSTEM_STORE_LOCAL_MACHINE_ID = 2;
- {$EXTERNALSYM CERT_SYSTEM_STORE_LOCAL_MACHINE_ID}
-
-// Registry: HKEY_LOCAL_MACHINE\Software\Microsoft\Cryptography\Services
-
- CERT_SYSTEM_STORE_CURRENT_SERVICE_ID = 4;
- {$EXTERNALSYM CERT_SYSTEM_STORE_CURRENT_SERVICE_ID}
- CERT_SYSTEM_STORE_SERVICES_ID = 5;
- {$EXTERNALSYM CERT_SYSTEM_STORE_SERVICES_ID}
-
-// Registry: HKEY_USERS
-
- CERT_SYSTEM_STORE_USERS_ID = 6;
- {$EXTERNALSYM CERT_SYSTEM_STORE_USERS_ID}
-
-// Registry: HKEY_CURRENT_USER\Software\Policies\Microsoft\SystemCertificates
-
- CERT_SYSTEM_STORE_CURRENT_USER_GROUP_POLICY_ID = 7;
- {$EXTERNALSYM CERT_SYSTEM_STORE_CURRENT_USER_GROUP_POLICY_ID}
-
-// Registry: HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\SystemCertificates
-
- CERT_SYSTEM_STORE_LOCAL_MACHINE_GROUP_POLICY_ID = 8;
- {$EXTERNALSYM CERT_SYSTEM_STORE_LOCAL_MACHINE_GROUP_POLICY_ID}
-
-// Registry: HKEY_LOCAL_MACHINE\Software\Microsoft\EnterpriseCertificates
-
- CERT_SYSTEM_STORE_LOCAL_MACHINE_ENTERPRISE_ID = 9;
- {$EXTERNALSYM CERT_SYSTEM_STORE_LOCAL_MACHINE_ENTERPRISE_ID}
-
- CERT_SYSTEM_STORE_CURRENT_USER = CERT_SYSTEM_STORE_CURRENT_USER_ID shl CERT_SYSTEM_STORE_LOCATION_SHIFT;
- {$EXTERNALSYM CERT_SYSTEM_STORE_CURRENT_USER}
- CERT_SYSTEM_STORE_LOCAL_MACHINE = CERT_SYSTEM_STORE_LOCAL_MACHINE_ID shl CERT_SYSTEM_STORE_LOCATION_SHIFT;
- {$EXTERNALSYM CERT_SYSTEM_STORE_LOCAL_MACHINE}
- CERT_SYSTEM_STORE_CURRENT_SERVICE = CERT_SYSTEM_STORE_CURRENT_SERVICE_ID shl CERT_SYSTEM_STORE_LOCATION_SHIFT;
- {$EXTERNALSYM CERT_SYSTEM_STORE_CURRENT_SERVICE}
- CERT_SYSTEM_STORE_SERVICES = CERT_SYSTEM_STORE_SERVICES_ID shl CERT_SYSTEM_STORE_LOCATION_SHIFT;
- {$EXTERNALSYM CERT_SYSTEM_STORE_SERVICES}
- CERT_SYSTEM_STORE_USERS = CERT_SYSTEM_STORE_USERS_ID shl CERT_SYSTEM_STORE_LOCATION_SHIFT;
- {$EXTERNALSYM CERT_SYSTEM_STORE_USERS}
-
- CERT_SYSTEM_STORE_CURRENT_USER_GROUP_POLICY = CERT_SYSTEM_STORE_CURRENT_USER_GROUP_POLICY_ID shl CERT_SYSTEM_STORE_LOCATION_SHIFT;
- {$EXTERNALSYM CERT_SYSTEM_STORE_CURRENT_USER_GROUP_POLICY}
- CERT_SYSTEM_STORE_LOCAL_MACHINE_GROUP_POLICY = CERT_SYSTEM_STORE_LOCAL_MACHINE_GROUP_POLICY_ID shl CERT_SYSTEM_STORE_LOCATION_SHIFT;
- {$EXTERNALSYM CERT_SYSTEM_STORE_LOCAL_MACHINE_GROUP_POLICY}
-
- CERT_SYSTEM_STORE_LOCAL_MACHINE_ENTERPRISE = CERT_SYSTEM_STORE_LOCAL_MACHINE_ENTERPRISE_ID shl CERT_SYSTEM_STORE_LOCATION_SHIFT;
- {$EXTERNALSYM CERT_SYSTEM_STORE_LOCAL_MACHINE_ENTERPRISE}
-
-//+-------------------------------------------------------------------------
-// Group Policy Store Defines
-//--------------------------------------------------------------------------
-// Registry path to the Group Policy system stores
-
- CERT_GROUP_POLICY_SYSTEM_STORE_REGPATH = 'Software\Policies\Microsoft\SystemCertificates';
- {$EXTERNALSYM CERT_GROUP_POLICY_SYSTEM_STORE_REGPATH}
-
-//+-------------------------------------------------------------------------
-// EFS Defines
-//--------------------------------------------------------------------------
-// Registry path to the EFS EFSBlob SubKey - Value type is REG_BINARY
-
- CERT_EFSBLOB_REGPATH = CERT_GROUP_POLICY_SYSTEM_STORE_REGPATH + '\EFS';
- {$EXTERNALSYM CERT_EFSBLOB_REGPATH}
- CERT_EFSBLOB_VALUE_NAME = 'EFSBlob';
- {$EXTERNALSYM CERT_EFSBLOB_VALUE_NAME}
-
-//+-------------------------------------------------------------------------
-// Protected Root Defines
-//--------------------------------------------------------------------------
-// Registry path to the Protected Roots Flags SubKey
-
- CERT_PROT_ROOT_FLAGS_REGPATH = CERT_GROUP_POLICY_SYSTEM_STORE_REGPATH + '\Root\ProtectedRoots';
- {$EXTERNALSYM CERT_PROT_ROOT_FLAGS_REGPATH}
- CERT_PROT_ROOT_FLAGS_VALUE_NAME = 'Flags';
- {$EXTERNALSYM CERT_PROT_ROOT_FLAGS_VALUE_NAME}
-
-// Set the following flag to inhibit the opening of the CurrentUser's
-// .Default physical store when opening the CurrentUser's "Root" system store.
-// The .Default physical store open's the CurrentUser SystemRegistry "Root"
-// store.
-
- CERT_PROT_ROOT_DISABLE_CURRENT_USER_FLAG = $1;
- {$EXTERNALSYM CERT_PROT_ROOT_DISABLE_CURRENT_USER_FLAG}
-
-// Set the following flag to inhibit the adding of roots from the
-// CurrentUser SystemRegistry "Root" store to the protected root list
-// when the "Root" store is initially protected.
-
- CERT_PROT_ROOT_INHIBIT_ADD_AT_INIT_FLAG = $2;
- {$EXTERNALSYM CERT_PROT_ROOT_INHIBIT_ADD_AT_INIT_FLAG}
-
-// Set the following flag to inhibit the purging of protected roots from the
-// CurrentUser SystemRegistry "Root" store that are
-// also in the LocalMachine SystemRegistry "Root" store. Note, when not
-// disabled, the purging is done silently without UI.
-
- CERT_PROT_ROOT_INHIBIT_PURGE_LM_FLAG = $4;
- {$EXTERNALSYM CERT_PROT_ROOT_INHIBIT_PURGE_LM_FLAG}
-
-// Set the following flag to only open the .LocalMachineGroupPolicy
-// physical store when opening the CurrentUser's "Root" system store.
-
- CERT_PROT_ROOT_ONLY_LM_GPT_FLAG = $8;
- {$EXTERNALSYM CERT_PROT_ROOT_ONLY_LM_GPT_FLAG}
-
-//+-------------------------------------------------------------------------
-// Certificate Registry Store Flag Values (CERT_STORE_REG)
-//--------------------------------------------------------------------------
-
-// Set this flag if the HKEY passed in pvPara points to a remote computer
-// registry key.
-
- CERT_REGISTRY_STORE_REMOTE_FLAG = $10000;
- {$EXTERNALSYM CERT_REGISTRY_STORE_REMOTE_FLAG}
-
-// Set this flag if the contexts are to be persisted as a single serialized
-// store in the registry. Mainly used for stores downloaded from the GPT.
-// Such as the CurrentUserGroupPolicy or LocalMachineGroupPolicy stores.
-
- CERT_REGISTRY_STORE_SERIALIZED_FLAG = $20000;
- {$EXTERNALSYM CERT_REGISTRY_STORE_SERIALIZED_FLAG}
-
-// The following flags are for internal use. When set, the
-// pvPara parameter passed to CertOpenStore is a pointer to the following
-// data structure and not the HKEY. The above CERT_REGISTRY_STORE_REMOTE_FLAG
-// is also set if hKeyBase was obtained via RegConnectRegistry().
-
- CERT_REGISTRY_STORE_CLIENT_GPT_FLAG = DWORD($80000000);
- {$EXTERNALSYM CERT_REGISTRY_STORE_CLIENT_GPT_FLAG}
- CERT_REGISTRY_STORE_LM_GPT_FLAG = $01000000;
- {$EXTERNALSYM CERT_REGISTRY_STORE_LM_GPT_FLAG}
-
-type
- PCERT_REGISTRY_STORE_CLIENT_GPT_PARA = ^CERT_REGISTRY_STORE_CLIENT_GPT_PARA;
- {$EXTERNALSYM PCERT_REGISTRY_STORE_CLIENT_GPT_PARA}
- _CERT_REGISTRY_STORE_CLIENT_GPT_PARA = record
- hKeyBase: HKEY;
- pwszRegPath: LPWSTR;
- end;
- {$EXTERNALSYM _CERT_REGISTRY_STORE_CLIENT_GPT_PARA}
- CERT_REGISTRY_STORE_CLIENT_GPT_PARA = _CERT_REGISTRY_STORE_CLIENT_GPT_PARA;
- {$EXTERNALSYM CERT_REGISTRY_STORE_CLIENT_GPT_PARA}
- TCertRegistryStoreClientGptPara = CERT_REGISTRY_STORE_CLIENT_GPT_PARA;
- PCertRegistryStoreClientGptPara = PCERT_REGISTRY_STORE_CLIENT_GPT_PARA;
-
-// The following flag is for internal use. When set, the contexts are
-// persisted into roaming files instead of the registry. Such as, the
-// CurrentUser "My" store. When this flag is set, the following data structure
-// is passed to CertOpenStore instead of HKEY.
-
-const
- CERT_REGISTRY_STORE_ROAMING_FLAG = $40000;
- {$EXTERNALSYM CERT_REGISTRY_STORE_ROAMING_FLAG}
-
-// hKey may be NULL or non-NULL. When non-NULL, existing contexts are
-// moved from the registry to roaming files.
-
-type
- PCERT_REGISTRY_STORE_ROAMING_PARA = ^CERT_REGISTRY_STORE_ROAMING_PARA;
- {$EXTERNALSYM PCERT_REGISTRY_STORE_ROAMING_PARA}
- _CERT_REGISTRY_STORE_ROAMING_PARA = record
- hKey: HKEY;
- pwszStoreDirectory: LPWSTR;
- end;
- {$EXTERNALSYM _CERT_REGISTRY_STORE_ROAMING_PARA}
- CERT_REGISTRY_STORE_ROAMING_PARA = _CERT_REGISTRY_STORE_ROAMING_PARA;
- {$EXTERNALSYM CERT_REGISTRY_STORE_ROAMING_PARA}
- TCertRegistryStoreRoamingPara = CERT_REGISTRY_STORE_ROAMING_PARA;
- PCertRegistryStoreRoamingPara = PCERT_REGISTRY_STORE_ROAMING_PARA;
-
-// The following flag is for internal use. When set, the "My" DWORD value
-// at HKLM\Software\Microsoft\Cryptography\IEDirtyFlags is set to 0x1
-// whenever a certificate is added to the registry store.
-
-const
- CERT_REGISTRY_STORE_MY_IE_DIRTY_FLAG = $80000;
- {$EXTERNALSYM CERT_REGISTRY_STORE_MY_IE_DIRTY_FLAG}
-
-// Registry path to the subkey containing the "My" DWORD value to be set
-
- CERT_IE_DIRTY_FLAGS_REGPATH = 'Software\Microsoft\Cryptography\IEDirtyFlags';
- {$EXTERNALSYM CERT_IE_DIRTY_FLAGS_REGPATH}
-
-//+-------------------------------------------------------------------------
-// Certificate File Store Flag Values for the providers:
-// CERT_STORE_PROV_FILE
-// CERT_STORE_PROV_FILENAME
-// CERT_STORE_PROV_FILENAME_A
-// CERT_STORE_PROV_FILENAME_W
-// sz_CERT_STORE_PROV_FILENAME_W
-//--------------------------------------------------------------------------
-
-// Set this flag if any store changes are to be committed to the file.
-// The changes are committed at CertCloseStore or by calling
-// CertControlStore(CERT_STORE_CTRL_COMMIT).
-//
-// The open fails with E_INVALIDARG if both CERT_FILE_STORE_COMMIT_ENABLE_FLAG
-// and CERT_STORE_READONLY_FLAG are set in dwFlags.
-//
-// For the FILENAME providers: if the file contains an X509 encoded
-// certificate, the open fails with ERROR_ACCESS_DENIED.
-//
-// For the FILENAME providers: if CERT_STORE_CREATE_NEW_FLAG is set, the
-// CreateFile uses CREATE_NEW. If CERT_STORE_OPEN_EXISTING is set, uses
-// OPEN_EXISTING. Otherwise, defaults to OPEN_ALWAYS.
-//
-// For the FILENAME providers: the file is committed as either a PKCS7 or
-// serialized store depending on the type read at open. However, if the
-// file is empty then, if the filename has either a ".p7c" or ".spc"
-// extension its committed as a PKCS7. Otherwise, its committed as a
-// serialized store.
-//
-// For CERT_STORE_PROV_FILE, the file handle is duplicated. Its always
-// committed as a serialized store.
-//
-
- CERT_FILE_STORE_COMMIT_ENABLE_FLAG = $10000;
- {$EXTERNALSYM CERT_FILE_STORE_COMMIT_ENABLE_FLAG}
-
-//+-------------------------------------------------------------------------
-// Open the cert store using the specified store provider.
-//
-// If CERT_STORE_DELETE_FLAG is set, then, the store is deleted. NULL is
-// returned for both success and failure. However, GetLastError() returns 0
-// for success and nonzero for failure.
-//
-// If CERT_STORE_SET_LOCALIZED_NAME_FLAG is set, then, if supported, the
-// provider sets the store's CERT_STORE_LOCALIZED_NAME_PROP_ID property.
-// The store's localized name can be retrieved by calling
-// CertSetStoreProperty(dwPropID = CERT_STORE_LOCALIZED_NAME_PROP_ID).
-// This flag is supported by the following providers (and their sz_
-// equivalent):
-// CERT_STORE_PROV_FILENAME_A
-// CERT_STORE_PROV_FILENAME_W
-// CERT_STORE_PROV_SYSTEM_A
-// CERT_STORE_PROV_SYSTEM_W
-// CERT_STORE_PROV_SYSTEM_REGISTRY_A
-// CERT_STORE_PROV_SYSTEM_REGISTRY_W
-// CERT_STORE_PROV_PHYSICAL_W
-//
-// If CERT_STORE_DEFER_CLOSE_UNTIL_LAST_FREE_FLAG is set, then, the
-// closing of the store's provider is deferred until all certificate,
-// CRL and CTL contexts obtained from the store are freed. Also,
-// if a non NULL HCRYPTPROV was passed, then, it will continue to be used.
-// By default, the store's provider is closed on the final CertCloseStore.
-// If this flag isn't set, then, any property changes made to previously
-// duplicated contexts after the final CertCloseStore will not be persisted.
-// By setting this flag, property changes made
-// after the CertCloseStore will be persisted. Note, setting this flag
-// causes extra overhead in doing context duplicates and frees.
-// If CertCloseStore is called with CERT_CLOSE_STORE_FORCE_FLAG, then,
-// the CERT_STORE_DEFER_CLOSE_UNTIL_LAST_FREE_FLAG flag is ignored.
-//
-// CERT_STORE_MANIFOLD_FLAG can be set to check for certificates having the
-// manifold extension and archive the "older" certificates with the same
-// manifold extension value. A certificate is archived by setting the
-// CERT_ARCHIVED_PROP_ID.
-//
-// By default, contexts having the CERT_ARCHIVED_PROP_ID, are skipped
-// during enumeration. CERT_STORE_ENUM_ARCHIVED_FLAG can be set to include
-// archived contexts when enumerating. Note, contexts having the
-// CERT_ARCHIVED_PROP_ID are still found for explicit finds, such as,
-// finding a context with a specific hash or finding a certificate having
-// a specific issuer and serial number.
-//
-// CERT_STORE_UPDATE_KEYID_FLAG can be set to also update the Key Identifier's
-// CERT_KEY_PROV_INFO_PROP_ID property whenever a certificate's
-// CERT_KEY_IDENTIFIER_PROP_ID or CERT_KEY_PROV_INFO_PROP_ID property is set
-// and the other property already exists. If the Key Identifier's
-// CERT_KEY_PROV_INFO_PROP_ID already exists, it isn't updated. Any
-// errors encountered are silently ignored.
-//
-// By default, this flag is implicitly set for the "My\.Default" CurrentUser
-// and LocalMachine physical stores.
-//
-// CERT_STORE_READONLY_FLAG can be set to open the store as read only.
-// Otherwise, the store is opened as read/write.
-//
-// CERT_STORE_OPEN_EXISTING_FLAG can be set to only open an existing
-// store. CERT_STORE_CREATE_NEW_FLAG can be set to create a new store and
-// fail if the store already exists. Otherwise, the default is to open
-// an existing store or create a new store if it doesn't already exist.
-//
-// hCryptProv specifies the crypto provider to use to create the hash
-// properties or verify the signature of a subject certificate or CRL.
-// The store doesn't need to use a private
-// key. If the CERT_STORE_NO_CRYPT_RELEASE_FLAG isn't set, hCryptProv is
-// CryptReleaseContext'ed on the final CertCloseStore.
-//
-// Note, if the open fails, hCryptProv is released if it would have been
-// released when the store was closed.
-//
-// If hCryptProv is zero, then, the default provider and container for the
-// PROV_RSA_FULL provider type is CryptAcquireContext'ed with
-// CRYPT_VERIFYCONTEXT access. The CryptAcquireContext is deferred until
-// the first create hash or verify signature. In addition, once acquired,
-// the default provider isn't released until process exit when crypt32.dll
-// is unloaded. The acquired default provider is shared across all stores
-// and threads.
-//
-// After initializing the store's data structures and optionally acquiring a
-// default crypt provider, CertOpenStore calls CryptGetOIDFunctionAddress to
-// get the address of the CRYPT_OID_OPEN_STORE_PROV_FUNC specified by
-// lpszStoreProvider. Since a store can contain certificates with different
-// encoding types, CryptGetOIDFunctionAddress is called with dwEncodingType
-// set to 0 and not the dwEncodingType passed to CertOpenStore.
-// PFN_CERT_DLL_OPEN_STORE_FUNC specifies the signature of the provider's
-// open function. This provider open function is called to load the
-// store's certificates and CRLs. Optionally, the provider may return an
-// array of functions called before a certificate or CRL is added or deleted
-// or has a property that is set.
-//
-// Use of the dwEncodingType parameter is provider dependent. The type
-// definition for pvPara also depends on the provider.
-//
-// Store providers are installed or registered via
-// CryptInstallOIDFunctionAddress or CryptRegisterOIDFunction, where,
-// dwEncodingType is 0 and pszFuncName is CRYPT_OID_OPEN_STORE_PROV_FUNC.
-//
-// Here's a list of the predefined provider types (implemented in crypt32.dll):
-//
-// CERT_STORE_PROV_MSG:
-// Gets the certificates and CRLs from the specified cryptographic message.
-// dwEncodingType contains the message and certificate encoding types.
-// The message's handle is passed in pvPara. Given,
-// HCRYPTMSG hCryptMsg; pvPara = (const void *) hCryptMsg;
-//
-// CERT_STORE_PROV_MEMORY
-// sz_CERT_STORE_PROV_MEMORY:
-// Opens a store without any initial certificates or CRLs. pvPara
-// isn't used.
-//
-// CERT_STORE_PROV_FILE:
-// Reads the certificates and CRLs from the specified file. The file's
-// handle is passed in pvPara. Given,
-// HANDLE hFile; pvPara = (const void *) hFile;
-//
-// For a successful open, the file pointer is advanced past
-// the certificates and CRLs and their properties read from the file.
-// Note, only expects a serialized store and not a file containing
-// either a PKCS #7 signed message or a single encoded certificate.
-//
-// The hFile isn't closed.
-//
-// CERT_STORE_PROV_REG:
-// Reads the certificates and CRLs from the registry. The registry's
-// key handle is passed in pvPara. Given,
-// HKEY hKey; pvPara = (const void *) hKey;
-//
-// The input hKey isn't closed by the provider. Before returning, the
-// provider opens it own copy of the hKey.
-//
-// If CERT_STORE_READONLY_FLAG is set, then, the registry subkeys are
-// RegOpenKey'ed with KEY_READ_ACCESS. Otherwise, the registry subkeys
-// are RegCreateKey'ed with KEY_ALL_ACCESS.
-//
-// This provider returns the array of functions for reading, writing,
-// deleting and property setting certificates and CRLs.
-// Any changes to the opened store are immediately pushed through to
-// the registry. However, if CERT_STORE_READONLY_FLAG is set, then,
-// writing, deleting or property setting results in a
-// SetLastError(E_ACCESSDENIED).
-//
-// Note, all the certificates and CRLs are read from the registry
-// when the store is opened. The opened store serves as a write through
-// cache.
-//
-// If CERT_REGISTRY_STORE_SERIALIZED_FLAG is set, then, the
-// contexts are persisted as a single serialized store subkey in the
-// registry.
-//
-// CERT_STORE_PROV_PKCS7:
-// sz_CERT_STORE_PROV_PKCS7:
-// Gets the certificates and CRLs from the encoded PKCS #7 signed message.
-// dwEncodingType specifies the message and certificate encoding types.
-// The pointer to the encoded message's blob is passed in pvPara. Given,
-// CRYPT_DATA_BLOB EncodedMsg; pvPara = (const void *) &EncodedMsg;
-//
-// Note, also supports the IE3.0 special version of a
-// PKCS #7 signed message referred to as a "SPC" formatted message.
-//
-// CERT_STORE_PROV_SERIALIZED:
-// sz_CERT_STORE_PROV_SERIALIZED:
-// Gets the certificates and CRLs from memory containing a serialized
-// store. The pointer to the serialized memory blob is passed in pvPara.
-// Given,
-// CRYPT_DATA_BLOB Serialized; pvPara = (const void *) &Serialized;
-//
-// CERT_STORE_PROV_FILENAME_A:
-// CERT_STORE_PROV_FILENAME_W:
-// CERT_STORE_PROV_FILENAME:
-// sz_CERT_STORE_PROV_FILENAME_W:
-// sz_CERT_STORE_PROV_FILENAME:
-// Opens the file and first attempts to read as a serialized store. Then,
-// as a PKCS #7 signed message. Finally, as a single encoded certificate.
-// The filename is passed in pvPara. The filename is UNICODE for the
-// "_W" provider and ASCII for the "_A" provider. For "_W": given,
-// LPCWSTR pwszFilename; pvPara = (const void *) pwszFilename;
-// For "_A": given,
-// LPCSTR pszFilename; pvPara = (const void *) pszFilename;
-//
-// Note, the default (without "_A" or "_W") is unicode.
-//
-// Note, also supports the reading of the IE3.0 special version of a
-// PKCS #7 signed message file referred to as a "SPC" formatted file.
-//
-// CERT_STORE_PROV_SYSTEM_A:
-// CERT_STORE_PROV_SYSTEM_W:
-// CERT_STORE_PROV_SYSTEM:
-// sz_CERT_STORE_PROV_SYSTEM_W:
-// sz_CERT_STORE_PROV_SYSTEM:
-// Opens the specified logical "System" store. The upper word of the
-// dwFlags parameter is used to specify the location of the system store.
-//
-// A "System" store is a collection consisting of one or more "Physical"
-// stores. A "Physical" store is registered via the
-// CertRegisterPhysicalStore API. Each of the registered physical stores
-// is CertStoreOpen'ed and added to the collection via
-// CertAddStoreToCollection.
-//
-// The CERT_SYSTEM_STORE_CURRENT_USER, CERT_SYSTEM_STORE_LOCAL_MACHINE,
-// CERT_SYSTEM_STORE_CURRENT_SERVICE, CERT_SYSTEM_STORE_SERVICES,
-// CERT_SYSTEM_STORE_USERS, CERT_SYSTEM_STORE_CURRENT_USER_GROUP_POLICY,
-// CERT_SYSTEM_STORE_LOCAL_MACHINE_GROUP_POLICY and
-// CERT_SYSTEM_STORE_LOCAL_MACHINE_ENTERPRSE
-// system stores by default have a "SystemRegistry" store that is
-// opened and added to the collection.
-//
-// The system store name is passed in pvPara. The name is UNICODE for the
-// "_W" provider and ASCII for the "_A" provider. For "_W": given,
-// LPCWSTR pwszSystemName; pvPara = (const void *) pwszSystemName;
-// For "_A": given,
-// LPCSTR pszSystemName; pvPara = (const void *) pszSystemName;
-//
-// Note, the default (without "_A" or "_W") is UNICODE.
-//
-// The system store name can't contain any backslashes.
-//
-// If CERT_SYSTEM_STORE_RELOCATE_FLAG is set in dwFlags, pvPara
-// points to a CERT_SYSTEM_STORE_RELOCATE_PARA data structure instead
-// of pointing to a null terminated UNICODE or ASCII string.
-// Sibling physical stores are also opened as relocated using
-// pvPara's hKeyBase.
-//
-// The CERT_SYSTEM_STORE_SERVICES or CERT_SYSTEM_STORE_USERS system
-// store name must be prefixed with the ServiceName or UserName.
-// For example, "ServiceName\Trust".
-//
-// Stores on remote computers can be accessed for the
-// CERT_SYSTEM_STORE_LOCAL_MACHINE, CERT_SYSTEM_STORE_SERVICES,
-// CERT_SYSTEM_STORE_USERS, CERT_SYSTEM_STORE_LOCAL_MACHINE_GROUP_POLICY
-// or CERT_SYSTEM_STORE_LOCAL_MACHINE_ENTERPRISE
-// locations by prepending the computer name. For example, a remote
-// local machine store is accessed via "\\ComputerName\Trust" or
-// "ComputerName\Trust". A remote service store is accessed via
-// "\\ComputerName\ServiceName\Trust". The leading "\\" backslashes are
-// optional in the ComputerName.
-//
-// If CERT_STORE_READONLY_FLAG is set, then, the registry is
-// RegOpenKey'ed with KEY_READ_ACCESS. Otherwise, the registry is
-// RegCreateKey'ed with KEY_ALL_ACCESS.
-//
-// The "root" store is treated differently from the other system
-// stores. Before a certificate is added to or deleted from the "root"
-// store, a pop up message box is displayed. The certificate's subject,
-// issuer, serial number, time validity, sha1 and md5 thumbprints are
-// displayed. The user is given the option to do the add or delete.
-// If they don't allow the operation, LastError is set to E_ACCESSDENIED.
-//
-// CERT_STORE_PROV_SYSTEM_REGISTRY_A
-// CERT_STORE_PROV_SYSTEM_REGISTRY_W
-// CERT_STORE_PROV_SYSTEM_REGISTRY
-// sz_CERT_STORE_PROV_SYSTEM_REGISTRY_W
-// sz_CERT_STORE_PROV_SYSTEM_REGISTRY
-// Opens the "System" store's default "Physical" store residing in the
-// registry. The upper word of the dwFlags
-// parameter is used to specify the location of the system store.
-//
-// After opening the registry key associated with the system name,
-// the CERT_STORE_PROV_REG provider is called to complete the open.
-//
-// The system store name is passed in pvPara. The name is UNICODE for the
-// "_W" provider and ASCII for the "_A" provider. For "_W": given,
-// LPCWSTR pwszSystemName; pvPara = (const void *) pwszSystemName;
-// For "_A": given,
-// LPCSTR pszSystemName; pvPara = (const void *) pszSystemName;
-//
-// Note, the default (without "_A" or "_W") is UNICODE.
-//
-// If CERT_SYSTEM_STORE_RELOCATE_FLAG is set in dwFlags, pvPara
-// points to a CERT_SYSTEM_STORE_RELOCATE_PARA data structure instead
-// of pointing to a null terminated UNICODE or ASCII string.
-//
-// See above for details on prepending a ServiceName and/or ComputerName
-// to the store name.
-//
-// If CERT_STORE_READONLY_FLAG is set, then, the registry is
-// RegOpenKey'ed with KEY_READ_ACCESS. Otherwise, the registry is
-// RegCreateKey'ed with KEY_ALL_ACCESS.
-//
-// The "root" store is treated differently from the other system
-// stores. Before a certificate is added to or deleted from the "root"
-// store, a pop up message box is displayed. The certificate's subject,
-// issuer, serial number, time validity, sha1 and md5 thumbprints are
-// displayed. The user is given the option to do the add or delete.
-// If they don't allow the operation, LastError is set to E_ACCESSDENIED.
-//
-// CERT_STORE_PROV_PHYSICAL_W
-// CERT_STORE_PROV_PHYSICAL
-// sz_CERT_STORE_PROV_PHYSICAL_W
-// sz_CERT_STORE_PROV_PHYSICAL
-// Opens the specified "Physical" store in the "System" store.
-//
-// Both the system store and physical names are passed in pvPara. The
-// names are separated with an intervening "\". For example,
-// "Root\.Default". The string is UNICODE.
-//
-// The system and physical store names can't contain any backslashes.
-//
-// If CERT_SYSTEM_STORE_RELOCATE_FLAG is set in dwFlags, pvPara
-// points to a CERT_SYSTEM_STORE_RELOCATE_PARA data structure instead
-// of pointing to a null terminated UNICODE string.
-// The specified physical store is opened as relocated using pvPara's
-// hKeyBase.
-//
-// For CERT_SYSTEM_STORE_SERVICES or CERT_SYSTEM_STORE_USERS,
-// the system and physical store names
-// must be prefixed with the ServiceName or UserName. For example,
-// "ServiceName\Root\.Default".
-//
-// Physical stores on remote computers can be accessed for the
-// CERT_SYSTEM_STORE_LOCAL_MACHINE, CERT_SYSTEM_STORE_SERVICES,
-// CERT_SYSTEM_STORE_USERS, CERT_SYSTEM_STORE_LOCAL_MACHINE_GROUP_POLICY
-// or CERT_SYSTEM_STORE_LOCAL_MACHINE_ENTERPRISE
-// locations by prepending the computer name. For example, a remote
-// local machine store is accessed via "\\ComputerName\Root\.Default"
-// or "ComputerName\Root\.Default". A remote service store is
-// accessed via "\\ComputerName\ServiceName\Root\.Default". The
-// leading "\\" backslashes are optional in the ComputerName.
-//
-// CERT_STORE_PROV_COLLECTION
-// sz_CERT_STORE_PROV_COLLECTION
-// Opens a store that is a collection of other stores. Stores are
-// added or removed to/from the collection via the CertAddStoreToCollection
-// and CertRemoveStoreFromCollection APIs.
-//
-// CERT_STORE_PROV_SMART_CARD_W
-// CERT_STORE_PROV_SMART_CARD
-// sz_CERT_STORE_PROV_SMART_CARD_W
-// sz_CERT_STORE_PROV_SMART_CARD
-// Opens a store instantiated over a particular smart card storage. pvPara
-// identifies where on the card the store is located and is of the
-// following format:
-//
-// Card Name\Provider Name\Provider Type[\Container Name]
-//
-// Container Name is optional and if NOT specified the Card Name is used
-// as the Container Name. Future versions of the provider will support
-// instantiating the store over the entire card in which case just
-// Card Name ( or id ) will be sufficient.
-//
-// Here's a list of the predefined provider types (implemented in
-// cryptnet.dll):
-//
-// CERT_STORE_PROV_LDAP_W
-// CERT_STORE_PROV_LDAP
-// sz_CERT_STORE_PROV_LDAP_W
-// sz_CERT_STORE_PROV_LDAP
-// Opens a store over the results of the query specified by and LDAP
-// URL which is passed in via pvPara. In order to do writes to the
-// store the URL must specify a BASE query, no filter and a single
-// attribute.
-//
-//--------------------------------------------------------------------------
-
-function CertOpenStore(lpszStoreProvider: LPCSTR; dwEncodingType: DWORD;
- hCryptProv: HCRYPTPROV; dwFlags: DWORD; pvPara: Pointer): HCERTSTORE; stdcall;
-{$EXTERNALSYM CertOpenStore}
-
-//+-------------------------------------------------------------------------
-// OID Installable Certificate Store Provider Data Structures
-//--------------------------------------------------------------------------
-
-// Handle returned by the store provider when opened.
-
-type
- HCERTSTOREPROV = Pointer;
- {$EXTERNALSYM HCERTSTOREPROV}
-
-// Store Provider OID function's pszFuncName.
-
-const
- CRYPT_OID_OPEN_STORE_PROV_FUNC = 'CertDllOpenStoreProv';
- {$EXTERNALSYM CRYPT_OID_OPEN_STORE_PROV_FUNC}
-
-// Note, the Store Provider OID function's dwEncodingType is always 0.
-
-// The following information is returned by the provider when opened. Its
-// zeroed with cbSize set before the provider is called. If the provider
-// doesn't need to be called again after the open it doesn't need to
-// make any updates to the CERT_STORE_PROV_INFO.
-
-type
- PCERT_STORE_PROV_INFO = ^CERT_STORE_PROV_INFO;
- {$EXTERNALSYM PCERT_STORE_PROV_INFO}
- _CERT_STORE_PROV_INFO = record
- cbSize: DWORD;
- cStoreProvFunc: DWORD;
- rgpvStoreProvFunc: Pointer;
- hStoreProv: HCERTSTOREPROV;
- dwStoreProvFlags: DWORD;
- hStoreProvFuncAddr2: HCRYPTOIDFUNCADDR;
- end;
- {$EXTERNALSYM _CERT_STORE_PROV_INFO}
- CERT_STORE_PROV_INFO = _CERT_STORE_PROV_INFO;
- {$EXTERNALSYM CERT_STORE_PROV_INFO}
- TCertStoreProvInfo = CERT_STORE_PROV_INFO;
- PCertStoreProvInfo = PCERT_STORE_PROV_INFO;
-
-// Definition of the store provider's open function.
-//
-// *pStoreProvInfo has been zeroed before the call.
-//
-// Note, pStoreProvInfo->cStoreProvFunc should be set last. Once set,
-// all subsequent store calls, such as CertAddSerializedElementToStore will
-// call the appropriate provider callback function.
-
-type
- PFN_CERT_DLL_OPEN_STORE_PROV_FUNC = function(
- lpszStoreProvider: LPCSTR;
- dwEncodingType: DWORD;
- hCryptProv: HCRYPTPROV;
- dwFlags: DWORD;
- pvPara: Pointer;
- hCertStore: HCERTSTORE;
- var pStoreProvInfo: PCERT_STORE_PROV_INFO): BOOL; stdcall;
- {$EXTERNALSYM PFN_CERT_DLL_OPEN_STORE_PROV_FUNC}
- PFnCertDllOpenStoreProvFunc = PFN_CERT_DLL_OPEN_STORE_PROV_FUNC;
-
-// The open callback sets the following flag, if it maintains its
-// contexts externally and not in the cached store.
-
-const
- CERT_STORE_PROV_EXTERNAL_FLAG = $1;
- {$EXTERNALSYM CERT_STORE_PROV_EXTERNAL_FLAG}
-
-// The open callback sets the following flag for a successful delete.
-// When set, the close callback isn't called.
-
- CERT_STORE_PROV_DELETED_FLAG = $2;
- {$EXTERNALSYM CERT_STORE_PROV_DELETED_FLAG}
-
-// The open callback sets the following flag if it doesn't persist store
-// changes.
-
- CERT_STORE_PROV_NO_PERSIST_FLAG = $4;
- {$EXTERNALSYM CERT_STORE_PROV_NO_PERSIST_FLAG}
-
-// The open callback sets the following flag if the contexts are persisted
-// to a system store.
-
- CERT_STORE_PROV_SYSTEM_STORE_FLAG = $8;
- {$EXTERNALSYM CERT_STORE_PROV_SYSTEM_STORE_FLAG}
-
-// Indices into the store provider's array of callback functions.
-//
-// The provider can implement any subset of the following functions. It
-// sets pStoreProvInfo->cStoreProvFunc to the last index + 1 and any
-// preceding not implemented functions to NULL.
-
- CERT_STORE_PROV_CLOSE_FUNC = 0;
- {$EXTERNALSYM CERT_STORE_PROV_CLOSE_FUNC}
- CERT_STORE_PROV_READ_CERT_FUNC = 1;
- {$EXTERNALSYM CERT_STORE_PROV_READ_CERT_FUNC}
- CERT_STORE_PROV_WRITE_CERT_FUNC = 2;
- {$EXTERNALSYM CERT_STORE_PROV_WRITE_CERT_FUNC}
- CERT_STORE_PROV_DELETE_CERT_FUNC = 3;
- {$EXTERNALSYM CERT_STORE_PROV_DELETE_CERT_FUNC}
- CERT_STORE_PROV_SET_CERT_PROPERTY_FUNC = 4;
- {$EXTERNALSYM CERT_STORE_PROV_SET_CERT_PROPERTY_FUNC}
- CERT_STORE_PROV_READ_CRL_FUNC = 5;
- {$EXTERNALSYM CERT_STORE_PROV_READ_CRL_FUNC}
- CERT_STORE_PROV_WRITE_CRL_FUNC = 6;
- {$EXTERNALSYM CERT_STORE_PROV_WRITE_CRL_FUNC}
- CERT_STORE_PROV_DELETE_CRL_FUNC = 7;
- {$EXTERNALSYM CERT_STORE_PROV_DELETE_CRL_FUNC}
- CERT_STORE_PROV_SET_CRL_PROPERTY_FUNC = 8;
- {$EXTERNALSYM CERT_STORE_PROV_SET_CRL_PROPERTY_FUNC}
- CERT_STORE_PROV_READ_CTL_FUNC = 9;
- {$EXTERNALSYM CERT_STORE_PROV_READ_CTL_FUNC}
- CERT_STORE_PROV_WRITE_CTL_FUNC = 10;
- {$EXTERNALSYM CERT_STORE_PROV_WRITE_CTL_FUNC}
- CERT_STORE_PROV_DELETE_CTL_FUNC = 11;
- {$EXTERNALSYM CERT_STORE_PROV_DELETE_CTL_FUNC}
- CERT_STORE_PROV_SET_CTL_PROPERTY_FUNC = 12;
- {$EXTERNALSYM CERT_STORE_PROV_SET_CTL_PROPERTY_FUNC}
- CERT_STORE_PROV_CONTROL_FUNC = 13;
- {$EXTERNALSYM CERT_STORE_PROV_CONTROL_FUNC}
- CERT_STORE_PROV_FIND_CERT_FUNC = 14;
- {$EXTERNALSYM CERT_STORE_PROV_FIND_CERT_FUNC}
- CERT_STORE_PROV_FREE_FIND_CERT_FUNC = 15;
- {$EXTERNALSYM CERT_STORE_PROV_FREE_FIND_CERT_FUNC}
- CERT_STORE_PROV_GET_CERT_PROPERTY_FUNC = 16;
- {$EXTERNALSYM CERT_STORE_PROV_GET_CERT_PROPERTY_FUNC}
- CERT_STORE_PROV_FIND_CRL_FUNC = 17;
- {$EXTERNALSYM CERT_STORE_PROV_FIND_CRL_FUNC}
- CERT_STORE_PROV_FREE_FIND_CRL_FUNC = 18;
- {$EXTERNALSYM CERT_STORE_PROV_FREE_FIND_CRL_FUNC}
- CERT_STORE_PROV_GET_CRL_PROPERTY_FUNC = 19;
- {$EXTERNALSYM CERT_STORE_PROV_GET_CRL_PROPERTY_FUNC}
- CERT_STORE_PROV_FIND_CTL_FUNC = 20;
- {$EXTERNALSYM CERT_STORE_PROV_FIND_CTL_FUNC}
- CERT_STORE_PROV_FREE_FIND_CTL_FUNC = 21;
- {$EXTERNALSYM CERT_STORE_PROV_FREE_FIND_CTL_FUNC}
- CERT_STORE_PROV_GET_CTL_PROPERTY_FUNC = 22;
- {$EXTERNALSYM CERT_STORE_PROV_GET_CTL_PROPERTY_FUNC}
-
-// Called by CertCloseStore when the store's reference count is
-// decremented to 0.
-
-type
- PFN_CERT_STORE_PROV_CLOSE = procedure(hStoreProv: HCERTSTOREPROV; dwFlags: DWORD); stdcall;
- {$EXTERNALSYM PFN_CERT_STORE_PROV_CLOSE}
- PFnCertStoreProvClose = PFN_CERT_STORE_PROV_CLOSE;
-
-// Currently not called directly by the store APIs. However, may be exported
-// to support other providers based on it.
-//
-// Reads the provider's copy of the certificate context. If it exists,
-// creates a new certificate context.
-
- PFN_CERT_STORE_PROV_READ_CERT = function(hStoreProv: HCERTSTOREPROV;
- pStoreCertContext: PCCERT_CONTEXT; dwFlags: DWORD;
- var ppProvCertContext: PCCERT_CONTEXT): BOOL; stdcall;
- {$EXTERNALSYM PFN_CERT_STORE_PROV_READ_CERT}
- PfnCertStoreProvReadCert = PFN_CERT_STORE_PROV_READ_CERT;
-
-const
- CERT_STORE_PROV_WRITE_ADD_FLAG = $1;
- {$EXTERNALSYM CERT_STORE_PROV_WRITE_ADD_FLAG}
-
-// Called by CertAddEncodedCertificateToStore,
-// CertAddCertificateContextToStore or CertAddSerializedElementToStore before
-// adding to the store. The CERT_STORE_PROV_WRITE_ADD_FLAG is set. In
-// addition to the encoded certificate, the added pCertContext might also
-// have properties.
-//
-// Returns TRUE if its OK to update the the store.
-
-type
- PFN_CERT_STORE_PROV_WRITE_CERT = function(hStoreProv: HCERTSTOREPROV;
- pCertContext: PCCERT_CONTEXT; dwFlags: DWORD): BOOL; stdcall;
- {$EXTERNALSYM PFN_CERT_STORE_PROV_WRITE_CERT}
- PfnCertStoreProvWriteCert = PFN_CERT_STORE_PROV_WRITE_CERT;
-
-// Called by CertDeleteCertificateFromStore before deleting from the
-// store.
-//
-// Returns TRUE if its OK to delete from the store.
-
- PFN_CERT_STORE_PROV_DELETE_CERT = function(hStoreProv: HCERTSTOREPROV;
- pCertContext: PCCERT_CONTEXT; dwFlags: DWORD): BOOL; stdcall;
- {$EXTERNALSYM PFN_CERT_STORE_PROV_DELETE_CERT}
- PfnCertStoreProvDeleteCert = PFN_CERT_STORE_PROV_DELETE_CERT;
-
-// Called by CertSetCertificateContextProperty before setting the
-// certificate's property. Also called by CertGetCertificateContextProperty,
-// when getting a hash property that needs to be created and then persisted
-// via the set.
-//
-// Upon input, the property hasn't been set for the pCertContext parameter.
-//
-// Returns TRUE if its OK to set the property.
-
-type
- PFN_CERT_STORE_PROV_SET_CERT_PROPERTY = function(hStoreProv: HCERTSTOREPROV;
- pCertContext: PCCERT_CONTEXT; dwPropId: DWORD; dwFlags: DWORD;
- pvData: Pointer): BOOL; stdcall;
- {$EXTERNALSYM PFN_CERT_STORE_PROV_SET_CERT_PROPERTY}
- PfnCertStoreProvSetCertProperty = PFN_CERT_STORE_PROV_SET_CERT_PROPERTY;
-
-// Currently not called directly by the store APIs. However, may be exported
-// to support other providers based on it.
-//
-// Reads the provider's copy of the CRL context. If it exists,
-// creates a new CRL context.
-
- PFN_CERT_STORE_PROV_READ_CRL = function(hStoreProv: HCERTSTOREPROV;
- pStoreCrlContext: PCCRL_CONTEXT; dwFlags: DWORD;
- var ppProvCrlContext: PCCRL_CONTEXT): BOOL; stdcall;
- {$EXTERNALSYM PFN_CERT_STORE_PROV_READ_CRL}
- PfnCertStoreProvReadCrl = PFN_CERT_STORE_PROV_READ_CRL;
-
-// Called by CertAddEncodedCRLToStore,
-// CertAddCRLContextToStore or CertAddSerializedElementToStore before
-// adding to the store. The CERT_STORE_PROV_WRITE_ADD_FLAG is set. In
-// addition to the encoded CRL, the added pCertContext might also
-// have properties.
-//
-// Returns TRUE if its OK to update the the store.
-
- PFN_CERT_STORE_PROV_WRITE_CRL = function(hStoreProv: HCERTSTOREPROV;
- pCrlContext: PCCRL_CONTEXT; dwFlags: DWORD): BOOL; stdcall;
- {$EXTERNALSYM PFN_CERT_STORE_PROV_WRITE_CRL}
- PfnCertStoreProvWriteCrl = PFN_CERT_STORE_PROV_WRITE_CRL;
-
-// Called by CertDeleteCRLFromStore before deleting from the store.
-//
-// Returns TRUE if its OK to delete from the store.
-
- PFN_CERT_STORE_PROV_DELETE_CRL = function(hStoreProv: HCERTSTOREPROV;
- pCrlContext: PCCRL_CONTEXT; dwFlags: DWORD): BOOL; stdcall;
- {$EXTERNALSYM PFN_CERT_STORE_PROV_DELETE_CRL}
- PfnCertStoreProvDeleteCrl = PFN_CERT_STORE_PROV_DELETE_CRL;
-
-// Called by CertSetCRLContextProperty before setting the
-// CRL's property. Also called by CertGetCRLContextProperty,
-// when getting a hash property that needs to be created and then persisted
-// via the set.
-//
-// Upon input, the property hasn't been set for the pCrlContext parameter.
-//
-// Returns TRUE if its OK to set the property.
-
- PFN_CERT_STORE_PROV_SET_CRL_PROPERTY = function(hStoreProv: HCERTSTOREPROV;
- pCrlContext: PCCRL_CONTEXT; dwPropId: DWORD; dwFlags: DWORD;
- pvData: Pointer): BOOL; stdcall;
- {$EXTERNALSYM PFN_CERT_STORE_PROV_SET_CRL_PROPERTY}
- PfnCertStoreProvSetCrlProperty = PFN_CERT_STORE_PROV_SET_CRL_PROPERTY;
-
-// Currently not called directly by the store APIs. However, may be exported
-// to support other providers based on it.
-//
-// Reads the provider's copy of the CTL context. If it exists,
-// creates a new CTL context.
-
- PFN_CERT_STORE_PROV_READ_CTL = function(hStoreProv: HCERTSTOREPROV;
- pStoreCtlContext: PCCTL_CONTEXT; dwFlags: DWORD;
- var ppProvCtlContext: PCCTL_CONTEXT): BOOL; stdcall;
- {$EXTERNALSYM PFN_CERT_STORE_PROV_READ_CTL}
- PfnCertStoreProvReadCtl = PFN_CERT_STORE_PROV_READ_CTL;
-
-// Called by CertAddEncodedCTLToStore,
-// CertAddCTLContextToStore or CertAddSerializedElementToStore before
-// adding to the store. The CERT_STORE_PROV_WRITE_ADD_FLAG is set. In
-// addition to the encoded CTL, the added pCertContext might also
-// have properties.
-//
-// Returns TRUE if its OK to update the the store.
-
- PFN_CERT_STORE_PROV_WRITE_CTL = function(hStoreProv: HCERTSTOREPROV;
- pCtlContext: PCCTL_CONTEXT; dwFlags: DWORD): BOOL; stdcall;
- {$EXTERNALSYM PFN_CERT_STORE_PROV_WRITE_CTL}
- PfnCertStoreProvWriteCtl = PFN_CERT_STORE_PROV_WRITE_CTL;
-
-// Called by CertDeleteCTLFromStore before deleting from the store.
-//
-// Returns TRUE if its OK to delete from the store.
-
- PFN_CERT_STORE_PROV_DELETE_CTL = function(hStoreProv: HCERTSTOREPROV;
- pCtlContext: PCCTL_CONTEXT; dwFlags: DWORD): BOOL; stdcall;
- {$EXTERNALSYM PFN_CERT_STORE_PROV_DELETE_CTL}
- PfnCertStoreProvDeleteCtl = PFN_CERT_STORE_PROV_DELETE_CTL;
-
-// Called by CertSetCTLContextProperty before setting the
-// CTL's property. Also called by CertGetCTLContextProperty,
-// when getting a hash property that needs to be created and then persisted
-// via the set.
-//
-// Upon input, the property hasn't been set for the pCtlContext parameter.
-//
-// Returns TRUE if its OK to set the property.
-
- PFN_CERT_STORE_PROV_SET_CTL_PROPERTY = function(hStoreProv: HCERTSTOREPROV;
- pCtlContext: PCCTL_CONTEXT; dwPropId, dwFlags: DWORD; pvData: Pointer): BOOL; stdcall;
- {$EXTERNALSYM PFN_CERT_STORE_PROV_SET_CTL_PROPERTY}
- PfnCertStoreProvSetCtlProperty = PFN_CERT_STORE_PROV_SET_CTL_PROPERTY;
-
- PFN_CERT_STORE_PROV_CONTROL = function(hStoreProv: HCERTSTOREPROV;
- dwFlags: DWORD; dwCtrlType: DWORD; pvCtrlPara: Pointer): BOOL; stdcall;
- {$EXTERNALSYM PFN_CERT_STORE_PROV_CONTROL}
- PfnCertStoreProvControl = PFN_CERT_STORE_PROV_CONTROL;
-
- PCERT_STORE_PROV_FIND_INFO = ^CERT_STORE_PROV_FIND_INFO;
- {$EXTERNALSYM PCERT_STORE_PROV_FIND_INFO}
- _CERT_STORE_PROV_FIND_INFO = record
- cbSize: DWORD;
- dwMsgAndCertEncodingType: DWORD;
- dwFindFlags: DWORD;
- dwFindType: DWORD;
- pvFindPara: Pointer;
- end;
- {$EXTERNALSYM _CERT_STORE_PROV_FIND_INFO}
- CERT_STORE_PROV_FIND_INFO = _CERT_STORE_PROV_FIND_INFO;
- {$EXTERNALSYM CERT_STORE_PROV_FIND_INFO}
- TCertStoreProvFindInfo = CERT_STORE_PROV_FIND_INFO;
- PCertStoreProvFindInfo = PCERT_STORE_PROV_FIND_INFO;
-
- CCERT_STORE_PROV_FIND_INFO = CERT_STORE_PROV_FIND_INFO;
- {$EXTERNALSYM CCERT_STORE_PROV_FIND_INFO}
- PCCERT_STORE_PROV_FIND_INFO = PCERT_STORE_PROV_FIND_INFO;
- {$EXTERNALSYM PCCERT_STORE_PROV_FIND_INFO}
-
- PFN_CERT_STORE_PROV_FIND_CERT = function(hStoreProv: HCERTSTOREPROV;
- pFindInfo: PCCERT_STORE_PROV_FIND_INFO; pPrevCertContext: PCCERT_CONTEXT;
- dwFlags: DWORD; var ppvStoreProvFindInfo: Pointer;
- var ppProvCertContext: PCCERT_CONTEXT): BOOL; stdcall;
- {$EXTERNALSYM PFN_CERT_STORE_PROV_FIND_CERT}
- PfnCertStoreProvFindCert = PFN_CERT_STORE_PROV_FIND_CERT;
-
- PFN_CERT_STORE_PROV_FREE_FIND_CERT = function(hStoreProv: HCERTSTOREPROV;
- pCertContext: PCCERT_CONTEXT; pvStoreProvFindInfo: Pointer; dwFlags: DWORD): BOOL; stdcall;
- {$EXTERNALSYM PFN_CERT_STORE_PROV_FREE_FIND_CERT}
- PfnCertStoreProvFreeFindCert = PFN_CERT_STORE_PROV_FREE_FIND_CERT;
-
- PFN_CERT_STORE_PROV_GET_CERT_PROPERTY = function(hStoreProv: HCERTSTOREPROV;
- pCertContext: PCCERT_CONTEXT; dwPropId: DWORD; dwFlags: DWORD; pvData: Pointer;
- var pcbData: DWORD): BOOL; stdcall;
- {$EXTERNALSYM PFN_CERT_STORE_PROV_GET_CERT_PROPERTY}
- PfnCertStoreProvGetCertProperty = PFN_CERT_STORE_PROV_GET_CERT_PROPERTY;
-
- PFN_CERT_STORE_PROV_FIND_CRL = function(hStoreProv: HCERTSTOREPROV;
- pFindInfo: PCCERT_STORE_PROV_FIND_INFO; pPrevCrlContext: PCCRL_CONTEXT;
- dwFlags: DWORD; var ppvStoreProvFindInfo: Pointer;
- var ppProvCrlContext: PCCRL_CONTEXT): BOOL; stdcall;
- {$EXTERNALSYM PFN_CERT_STORE_PROV_FIND_CRL}
- PfnCertStoreProvFindCrl = PFN_CERT_STORE_PROV_FIND_CRL;
-
- PFN_CERT_STORE_PROV_FREE_FIND_CRL = function(hStoreProv: HCERTSTOREPROV;
- pCrlContext: PCCRL_CONTEXT; pvStoreProvFindInfo: Pointer; dwFlags: DWORD): BOOL; stdcall;
- {$EXTERNALSYM PFN_CERT_STORE_PROV_FREE_FIND_CRL}
- PfnCertStoreProvFreeFindCrl = PFN_CERT_STORE_PROV_FREE_FIND_CRL;
-
- PFN_CERT_STORE_PROV_GET_CRL_PROPERTY = function(hStoreProv: HCERTSTOREPROV;
- pCrlContext: PCCRL_CONTEXT; dwPropId: DWORD; dwFlags: DWORD; pvData: Pointer;
- var pcbData: DWORD): BOOL; stdcall;
- {$EXTERNALSYM PFN_CERT_STORE_PROV_GET_CRL_PROPERTY}
- PfnCertStoreProvGetCrlProperty = PFN_CERT_STORE_PROV_GET_CRL_PROPERTY;
-
- PFN_CERT_STORE_PROV_FIND_CTL = function(hStoreProv: HCERTSTOREPROV;
- pFindInfo: PCCERT_STORE_PROV_FIND_INFO; pPrevCtlContext: PCCTL_CONTEXT;
- dwFlags: DWORD; var ppvStoreProvFindInfo: Pointer;
- var ppProvCtlContext: PCCTL_CONTEXT): BOOL; stdcall;
- {$EXTERNALSYM PFN_CERT_STORE_PROV_FIND_CTL}
- PfnCertStoreProvFindCtl = PFN_CERT_STORE_PROV_FIND_CTL;
-
- PFN_CERT_STORE_PROV_FREE_FIND_CTL = function(hStoreProv: HCERTSTOREPROV;
- pCtlContext: PCCTL_CONTEXT; pvStoreProvFindInfo: Pointer; dwFlags: DWORD): BOOL; stdcall;
- {$EXTERNALSYM PFN_CERT_STORE_PROV_FREE_FIND_CTL}
- PfnCertStoreProvFreeFindCtl = PFN_CERT_STORE_PROV_FREE_FIND_CTL;
-
- PFN_CERT_STORE_PROV_GET_CTL_PROPERTY = function(hStoreProv: HCERTSTOREPROV;
- pCtlContext: PCCTL_CONTEXT; dwPropId: DWORD; dwFlags: DWORD; pvData: Pointer;
- var pcbData: DWORD): BOOL; stdcall;
- {$EXTERNALSYM PFN_CERT_STORE_PROV_GET_CTL_PROPERTY}
- PfnCertStoreProvGetCtlProperty = PFN_CERT_STORE_PROV_GET_CTL_PROPERTY;
-
-//+-------------------------------------------------------------------------
-// Duplicate a cert store handle
-//--------------------------------------------------------------------------
-
-function CertDuplicateStore(hCertStore: HCERTSTORE): HCERTSTORE; stdcall;
-{$EXTERNALSYM CertDuplicateStore}
-
-const
- CERT_STORE_SAVE_AS_STORE = 1;
- {$EXTERNALSYM CERT_STORE_SAVE_AS_STORE}
- CERT_STORE_SAVE_AS_PKCS7 = 2;
- {$EXTERNALSYM CERT_STORE_SAVE_AS_PKCS7}
-
- CERT_STORE_SAVE_TO_FILE = 1;
- {$EXTERNALSYM CERT_STORE_SAVE_TO_FILE}
- CERT_STORE_SAVE_TO_MEMORY = 2;
- {$EXTERNALSYM CERT_STORE_SAVE_TO_MEMORY}
- CERT_STORE_SAVE_TO_FILENAME_A = 3;
- {$EXTERNALSYM CERT_STORE_SAVE_TO_FILENAME_A}
- CERT_STORE_SAVE_TO_FILENAME_W = 4;
- {$EXTERNALSYM CERT_STORE_SAVE_TO_FILENAME_W}
- CERT_STORE_SAVE_TO_FILENAME = CERT_STORE_SAVE_TO_FILENAME_W;
- {$EXTERNALSYM CERT_STORE_SAVE_TO_FILENAME}
-
-//+-------------------------------------------------------------------------
-// Save the cert store. Extended version with lots of options.
-//
-// According to the dwSaveAs parameter, the store can be saved as a
-// serialized store (CERT_STORE_SAVE_AS_STORE) containing properties in
-// addition to encoded certificates, CRLs and CTLs or the store can be saved
-// as a PKCS #7 signed message (CERT_STORE_SAVE_AS_PKCS7) which doesn't
-// include the properties or CTLs.
-//
-// Note, the CERT_KEY_CONTEXT_PROP_ID property (and its
-// CERT_KEY_PROV_HANDLE_PROP_ID or CERT_KEY_SPEC_PROP_ID) isn't saved into
-// a serialized store.
-//
-// For CERT_STORE_SAVE_AS_PKCS7, the dwEncodingType specifies the message
-// encoding type. The dwEncodingType parameter isn't used for
-// CERT_STORE_SAVE_AS_STORE.
-//
-// The dwFlags parameter currently isn't used and should be set to 0.
-//
-// The dwSaveTo and pvSaveToPara parameters specify where to save the
-// store as follows:
-// CERT_STORE_SAVE_TO_FILE:
-// Saves to the specified file. The file's handle is passed in
-// pvSaveToPara. Given,
-// HANDLE hFile; pvSaveToPara = (void *) hFile;
-//
-// For a successful save, the file pointer is positioned after the
-// last write.
-//
-// CERT_STORE_SAVE_TO_MEMORY:
-// Saves to the specified memory blob. The pointer to
-// the memory blob is passed in pvSaveToPara. Given,
-// CRYPT_DATA_BLOB SaveBlob; pvSaveToPara = (void *) &SaveBlob;
-// Upon entry, the SaveBlob's pbData and cbData need to be initialized.
-// Upon return, cbData is updated with the actual length.
-// For a length only calculation, pbData should be set to NULL. If
-// pbData is non-NULL and cbData isn't large enough, FALSE is returned
-// with a last error of ERRROR_MORE_DATA.
-//
-// CERT_STORE_SAVE_TO_FILENAME_A:
-// CERT_STORE_SAVE_TO_FILENAME_W:
-// CERT_STORE_SAVE_TO_FILENAME:
-// Opens the file and saves to it. The filename is passed in pvSaveToPara.
-// The filename is UNICODE for the "_W" option and ASCII for the "_A"
-// option. For "_W": given,
-// LPCWSTR pwszFilename; pvSaveToPara = (void *) pwszFilename;
-// For "_A": given,
-// LPCSTR pszFilename; pvSaveToPara = (void *) pszFilename;
-//
-// Note, the default (without "_A" or "_W") is UNICODE.
-//
-//--------------------------------------------------------------------------
-
-function CertSaveStore(hCertStore: HCERTSTORE; dwEncodingType, dwSaveAs: DWORD;
- dwSaveTo: DWORD; pvSaveToPara: Pointer; dwFlags: DWORD): BOOL; stdcall;
-{$EXTERNALSYM CertSaveStore}
-
-//+-------------------------------------------------------------------------
-// Certificate Store close flags
-//--------------------------------------------------------------------------
-
-const
- CERT_CLOSE_STORE_FORCE_FLAG = $00000001;
- {$EXTERNALSYM CERT_CLOSE_STORE_FORCE_FLAG}
- CERT_CLOSE_STORE_CHECK_FLAG = $00000002;
- {$EXTERNALSYM CERT_CLOSE_STORE_CHECK_FLAG}
-
-//+-------------------------------------------------------------------------
-// Close a cert store handle.
-//
-// There needs to be a corresponding close for each open and duplicate.
-//
-// Even on the final close, the cert store isn't freed until all of its
-// certificate and CRL contexts have also been freed.
-//
-// On the final close, the hCryptProv passed to CertStoreOpen is
-// CryptReleaseContext'ed.
-//
-// To force the closure of the store with all of its memory freed, set the
-// CERT_STORE_CLOSE_FORCE_FLAG. This flag should be set when the caller does
-// its own reference counting and wants everything to vanish.
-//
-// To check if all the store's certificates and CRLs have been freed and that
-// this is the last CertCloseStore, set the CERT_CLOSE_STORE_CHECK_FLAG. If
-// set and certs, CRLs or stores still need to be freed/closed, FALSE is
-// returned with LastError set to CRYPT_E_PENDING_CLOSE. Note, for FALSE,
-// the store is still closed. This is a diagnostic flag.
-//
-// LastError is preserved unless CERT_CLOSE_STORE_CHECK_FLAG is set and FALSE
-// is returned.
-//--------------------------------------------------------------------------
-
-function CertCloseStore(hCertStore: HCERTSTORE; dwFlags: DWORD): BOOL; stdcall;
-{$EXTERNALSYM CertCloseStore}
-
-//+-------------------------------------------------------------------------
-// Get the subject certificate context uniquely identified by its Issuer and
-// SerialNumber from the store.
-//
-// If the certificate isn't found, NULL is returned. Otherwise, a pointer to
-// a read only CERT_CONTEXT is returned. CERT_CONTEXT must be freed by calling
-// CertFreeCertificateContext. CertDuplicateCertificateContext can be called to make a
-// duplicate.
-//
-// The returned certificate might not be valid. Normally, it would be
-// verified when getting its issuer certificate (CertGetIssuerCertificateFromStore).
-//--------------------------------------------------------------------------
-
-function CertGetSubjectCertificateFromStore(hCertStore: HCERTSTORE;
- dwCertEncodingType: DWORD; pCertId: PCERT_INFO): PCCERT_CONTEXT; stdcall;
-{$EXTERNALSYM CertGetSubjectCertificateFromStore}
-
-//+-------------------------------------------------------------------------
-// Enumerate the certificate contexts in the store.
-//
-// If a certificate isn't found, NULL is returned.
-// Otherwise, a pointer to a read only CERT_CONTEXT is returned. CERT_CONTEXT
-// must be freed by calling CertFreeCertificateContext or is freed when passed as the
-// pPrevCertContext on a subsequent call. CertDuplicateCertificateContext
-// can be called to make a duplicate.
-//
-// pPrevCertContext MUST BE NULL to enumerate the first
-// certificate in the store. Successive certificates are enumerated by setting
-// pPrevCertContext to the CERT_CONTEXT returned by a previous call.
-//
-// NOTE: a NON-NULL pPrevCertContext is always CertFreeCertificateContext'ed by
-// this function, even for an error.
-//--------------------------------------------------------------------------
-
-function CertEnumCertificatesInStore(hCertStore: HCERTSTORE;
- pPrevCertContext: PCCERT_CONTEXT): PCCERT_CONTEXT; stdcall;
-{$EXTERNALSYM CertEnumCertificatesInStore}
-
-//+-------------------------------------------------------------------------
-// Find the first or next certificate context in the store.
-//
-// The certificate is found according to the dwFindType and its pvFindPara.
-// See below for a list of the find types and its parameters.
-//
-// Currently dwFindFlags is only used for CERT_FIND_SUBJECT_ATTR,
-// CERT_FIND_ISSUER_ATTR or CERT_FIND_CTL_USAGE. Otherwise, must be set to 0.
-//
-// Usage of dwCertEncodingType depends on the dwFindType.
-//
-// If the first or next certificate isn't found, NULL is returned.
-// Otherwise, a pointer to a read only CERT_CONTEXT is returned. CERT_CONTEXT
-// must be freed by calling CertFreeCertificateContext or is freed when passed as the
-// pPrevCertContext on a subsequent call. CertDuplicateCertificateContext
-// can be called to make a duplicate.
-//
-// pPrevCertContext MUST BE NULL on the first
-// call to find the certificate. To find the next certificate, the
-// pPrevCertContext is set to the CERT_CONTEXT returned by a previous call.
-//
-// NOTE: a NON-NULL pPrevCertContext is always CertFreeCertificateContext'ed by
-// this function, even for an error.
-//--------------------------------------------------------------------------
-
-function CertFindCertificateInStore(hCertStore: HCERTSTORE;
- dwCertEncodingType, dwFindFlags, dwFindType: DWORD; pvFindPara: Pointer;
- pPrevCertContext: PCCERT_CONTEXT): PCCERT_CONTEXT; stdcall;
-{$EXTERNALSYM CertFindCertificateInStore}
-
-//+-------------------------------------------------------------------------
-// Certificate comparison functions
-//--------------------------------------------------------------------------
-
-const
- CERT_COMPARE_MASK = $FFFF;
- {$EXTERNALSYM CERT_COMPARE_MASK}
- CERT_COMPARE_SHIFT = 16;
- {$EXTERNALSYM CERT_COMPARE_SHIFT}
- CERT_COMPARE_ANY = 0;
- {$EXTERNALSYM CERT_COMPARE_ANY}
- CERT_COMPARE_SHA1_HASH = 1;
- {$EXTERNALSYM CERT_COMPARE_SHA1_HASH}
- CERT_COMPARE_NAME = 2;
- {$EXTERNALSYM CERT_COMPARE_NAME}
- CERT_COMPARE_ATTR = 3;
- {$EXTERNALSYM CERT_COMPARE_ATTR}
- CERT_COMPARE_MD5_HASH = 4;
- {$EXTERNALSYM CERT_COMPARE_MD5_HASH}
- CERT_COMPARE_PROPERTY = 5;
- {$EXTERNALSYM CERT_COMPARE_PROPERTY}
- CERT_COMPARE_PUBLIC_KEY = 6;
- {$EXTERNALSYM CERT_COMPARE_PUBLIC_KEY}
- CERT_COMPARE_HASH = CERT_COMPARE_SHA1_HASH;
- {$EXTERNALSYM CERT_COMPARE_HASH}
- CERT_COMPARE_NAME_STR_A = 7;
- {$EXTERNALSYM CERT_COMPARE_NAME_STR_A}
- CERT_COMPARE_NAME_STR_W = 8;
- {$EXTERNALSYM CERT_COMPARE_NAME_STR_W}
- CERT_COMPARE_KEY_SPEC = 9;
- {$EXTERNALSYM CERT_COMPARE_KEY_SPEC}
- CERT_COMPARE_ENHKEY_USAGE = 10;
- {$EXTERNALSYM CERT_COMPARE_ENHKEY_USAGE}
- CERT_COMPARE_CTL_USAGE = CERT_COMPARE_ENHKEY_USAGE;
- {$EXTERNALSYM CERT_COMPARE_CTL_USAGE}
- CERT_COMPARE_SUBJECT_CERT = 11;
- {$EXTERNALSYM CERT_COMPARE_SUBJECT_CERT}
- CERT_COMPARE_ISSUER_OF = 12;
- {$EXTERNALSYM CERT_COMPARE_ISSUER_OF}
- CERT_COMPARE_EXISTING = 13;
- {$EXTERNALSYM CERT_COMPARE_EXISTING}
- CERT_COMPARE_SIGNATURE_HASH = 14;
- {$EXTERNALSYM CERT_COMPARE_SIGNATURE_HASH}
- CERT_COMPARE_KEY_IDENTIFIER = 15;
- {$EXTERNALSYM CERT_COMPARE_KEY_IDENTIFIER}
- CERT_COMPARE_CERT_ID = 16;
- {$EXTERNALSYM CERT_COMPARE_CERT_ID}
-
-//+-------------------------------------------------------------------------
-// dwFindType
-//
-// The dwFindType definition consists of two components:
-// - comparison function
-// - certificate information flag
-//--------------------------------------------------------------------------
-
- CERT_FIND_ANY = CERT_COMPARE_ANY shl CERT_COMPARE_SHIFT;
- {$EXTERNALSYM CERT_FIND_ANY}
- CERT_FIND_SHA1_HASH = CERT_COMPARE_SHA1_HASH shl CERT_COMPARE_SHIFT;
- {$EXTERNALSYM CERT_FIND_SHA1_HASH}
- CERT_FIND_MD5_HASH = CERT_COMPARE_MD5_HASH shl CERT_COMPARE_SHIFT;
- {$EXTERNALSYM CERT_FIND_MD5_HASH}
- CERT_FIND_SIGNATURE_HASH = CERT_COMPARE_SIGNATURE_HASH shl CERT_COMPARE_SHIFT;
- {$EXTERNALSYM CERT_FIND_SIGNATURE_HASH}
- CERT_FIND_KEY_IDENTIFIER = CERT_COMPARE_KEY_IDENTIFIER shl CERT_COMPARE_SHIFT;
- {$EXTERNALSYM CERT_FIND_KEY_IDENTIFIER}
- CERT_FIND_HASH = CERT_FIND_SHA1_HASH;
- {$EXTERNALSYM CERT_FIND_HASH}
- CERT_FIND_PROPERTY = CERT_COMPARE_PROPERTY shl CERT_COMPARE_SHIFT;
- {$EXTERNALSYM CERT_FIND_PROPERTY}
- CERT_FIND_PUBLIC_KEY = CERT_COMPARE_PUBLIC_KEY shl CERT_COMPARE_SHIFT;
- {$EXTERNALSYM CERT_FIND_PUBLIC_KEY}
- CERT_FIND_SUBJECT_NAME = CERT_COMPARE_NAME shl CERT_COMPARE_SHIFT or CERT_INFO_SUBJECT_FLAG;
- {$EXTERNALSYM CERT_FIND_SUBJECT_NAME}
- CERT_FIND_SUBJECT_ATTR = CERT_COMPARE_ATTR shl CERT_COMPARE_SHIFT or CERT_INFO_SUBJECT_FLAG;
- {$EXTERNALSYM CERT_FIND_SUBJECT_ATTR}
- CERT_FIND_ISSUER_NAME = CERT_COMPARE_NAME shl CERT_COMPARE_SHIFT or CERT_INFO_ISSUER_FLAG;
- {$EXTERNALSYM CERT_FIND_ISSUER_NAME}
- CERT_FIND_ISSUER_ATTR = CERT_COMPARE_ATTR shl CERT_COMPARE_SHIFT or CERT_INFO_ISSUER_FLAG;
- {$EXTERNALSYM CERT_FIND_ISSUER_ATTR}
- CERT_FIND_SUBJECT_STR_A = CERT_COMPARE_NAME_STR_A shl CERT_COMPARE_SHIFT or CERT_INFO_SUBJECT_FLAG;
- {$EXTERNALSYM CERT_FIND_SUBJECT_STR_A}
- CERT_FIND_SUBJECT_STR_W = CERT_COMPARE_NAME_STR_W shl CERT_COMPARE_SHIFT or CERT_INFO_SUBJECT_FLAG;
- {$EXTERNALSYM CERT_FIND_SUBJECT_STR_W}
- CERT_FIND_SUBJECT_STR = CERT_FIND_SUBJECT_STR_W;
- {$EXTERNALSYM CERT_FIND_SUBJECT_STR}
- CERT_FIND_ISSUER_STR_A = CERT_COMPARE_NAME_STR_A shl CERT_COMPARE_SHIFT or CERT_INFO_ISSUER_FLAG;
- {$EXTERNALSYM CERT_FIND_ISSUER_STR_A}
- CERT_FIND_ISSUER_STR_W = CERT_COMPARE_NAME_STR_W shl CERT_COMPARE_SHIFT or CERT_INFO_ISSUER_FLAG;
- {$EXTERNALSYM CERT_FIND_ISSUER_STR_W}
- CERT_FIND_ISSUER_STR = CERT_FIND_ISSUER_STR_W;
- {$EXTERNALSYM CERT_FIND_ISSUER_STR}
- CERT_FIND_KEY_SPEC = CERT_COMPARE_KEY_SPEC shl CERT_COMPARE_SHIFT;
- {$EXTERNALSYM CERT_FIND_KEY_SPEC}
- CERT_FIND_ENHKEY_USAGE = CERT_COMPARE_ENHKEY_USAGE shl CERT_COMPARE_SHIFT;
- {$EXTERNALSYM CERT_FIND_ENHKEY_USAGE}
- CERT_FIND_CTL_USAGE = CERT_FIND_ENHKEY_USAGE;
- {$EXTERNALSYM CERT_FIND_CTL_USAGE}
-
- CERT_FIND_SUBJECT_CERT = CERT_COMPARE_SUBJECT_CERT shl CERT_COMPARE_SHIFT;
- {$EXTERNALSYM CERT_FIND_SUBJECT_CERT}
- CERT_FIND_ISSUER_OF = CERT_COMPARE_ISSUER_OF shl CERT_COMPARE_SHIFT;
- {$EXTERNALSYM CERT_FIND_ISSUER_OF}
- CERT_FIND_EXISTING = CERT_COMPARE_EXISTING shl CERT_COMPARE_SHIFT;
- {$EXTERNALSYM CERT_FIND_EXISTING}
- CERT_FIND_CERT_ID = CERT_COMPARE_CERT_ID shl CERT_COMPARE_SHIFT;
- {$EXTERNALSYM CERT_FIND_CERT_ID}
-
-//+-------------------------------------------------------------------------
-// CERT_FIND_ANY
-//
-// Find any certificate.
-//
-// pvFindPara isn't used.
-//--------------------------------------------------------------------------
-
-//+-------------------------------------------------------------------------
-// CERT_FIND_HASH
-//
-// Find a certificate with the specified hash.
-//
-// pvFindPara points to a CRYPT_HASH_BLOB.
-//--------------------------------------------------------------------------
-
-//+-------------------------------------------------------------------------
-// CERT_FIND_KEY_IDENTIFIER
-//
-// Find a certificate with the specified KeyIdentifier. Gets the
-// CERT_KEY_IDENTIFIER_PROP_ID property and compares with the input
-// CRYPT_HASH_BLOB.
-//
-// pvFindPara points to a CRYPT_HASH_BLOB.
-//--------------------------------------------------------------------------
-
-//+-------------------------------------------------------------------------
-// CERT_FIND_PROPERTY
-//
-// Find a certificate having the specified property.
-//
-// pvFindPara points to a DWORD containing the PROP_ID
-//--------------------------------------------------------------------------
-
-//+-------------------------------------------------------------------------
-// CERT_FIND_PUBLIC_KEY
-//
-// Find a certificate matching the specified public key.
-//
-// pvFindPara points to a CERT_PUBLIC_KEY_INFO containing the public key
-//--------------------------------------------------------------------------
-
-//+-------------------------------------------------------------------------
-// CERT_FIND_SUBJECT_NAME
-// CERT_FIND_ISSUER_NAME
-//
-// Find a certificate with the specified subject/issuer name. Does an exact
-// match of the entire name.
-//
-// Restricts search to certificates matching the dwCertEncodingType.
-//
-// pvFindPara points to a CERT_NAME_BLOB.
-//--------------------------------------------------------------------------
-
-//+-------------------------------------------------------------------------
-// CERT_FIND_SUBJECT_ATTR
-// CERT_FIND_ISSUER_ATTR
-//
-// Find a certificate with the specified subject/issuer attributes.
-//
-// Compares the attributes in the subject/issuer name with the
-// Relative Distinguished Name's (CERT_RDN) array of attributes specified in
-// pvFindPara. The comparison iterates through the CERT_RDN attributes and looks
-// for an attribute match in any of the subject/issuer's RDNs.
-//
-// The CERT_RDN_ATTR fields can have the following special values:
-// pszObjId == NULL - ignore the attribute object identifier
-// dwValueType == RDN_ANY_TYPE - ignore the value type
-// Value.pbData == NULL - match any value
-//
-// CERT_CASE_INSENSITIVE_IS_RDN_ATTRS_FLAG should be set in dwFindFlags to do
-// a case insensitive match. Otherwise, defaults to an exact, case sensitive
-// match.
-//
-// CERT_UNICODE_IS_RDN_ATTRS_FLAG should be set in dwFindFlags if the RDN was
-// initialized with unicode strings as for
-// CryptEncodeObject(X509_UNICODE_NAME).
-//
-// Restricts search to certificates matching the dwCertEncodingType.
-//
-// pvFindPara points to a CERT_RDN (defined in wincert.h).
-//--------------------------------------------------------------------------
-
-//+-------------------------------------------------------------------------
-// CERT_FIND_SUBJECT_STR_A
-// CERT_FIND_SUBJECT_STR_W | CERT_FIND_SUBJECT_STR
-// CERT_FIND_ISSUER_STR_A
-// CERT_FIND_ISSUER_STR_W | CERT_FIND_ISSUER_STR
-//
-// Find a certificate containing the specified subject/issuer name string.
-//
-// First, the certificate's subject/issuer is converted to a name string
-// via CertNameToStrA/CertNameToStrW(CERT_SIMPLE_NAME_STR). Then, a
-// case insensitive substring within string match is performed.
-//
-// Restricts search to certificates matching the dwCertEncodingType.
-//
-// For *_STR_A, pvFindPara points to a null terminated character string.
-// For *_STR_W, pvFindPara points to a null terminated wide character string.
-//--------------------------------------------------------------------------
-
-//+-------------------------------------------------------------------------
-// CERT_FIND_KEY_SPEC
-//
-// Find a certificate having a CERT_KEY_SPEC_PROP_ID property matching
-// the specified KeySpec.
-//
-// pvFindPara points to a DWORD containing the KeySpec.
-//--------------------------------------------------------------------------
-
-//+-------------------------------------------------------------------------
-// CERT_FIND_ENHKEY_USAGE
-//
-// Find a certificate having the szOID_ENHANCED_KEY_USAGE extension or
-// the CERT_ENHKEY_USAGE_PROP_ID and matching the specified pszUsageIdentifers.
-//
-// pvFindPara points to a CERT_ENHKEY_USAGE data structure. If pvFindPara
-// is NULL or CERT_ENHKEY_USAGE's cUsageIdentifier is 0, then, matches any
-// certificate having enhanced key usage.
-//
-// If the CERT_FIND_VALID_ENHKEY_USAGE_FLAG is set, then, only does a match
-// for certificates that are valid for the specified usages. By default,
-// the ceriticate must be valid for all usages. CERT_FIND_OR_ENHKEY_USAGE_FLAG
-// can be set, if the certificate only needs to be valid for one of the
-// specified usages. Note, CertGetValidUsages() is called to get the
-// certificate's list of valid usages. Only the CERT_FIND_OR_ENHKEY_USAGE_FLAG
-// is applicable when this flag is set.
-//
-// The CERT_FIND_OPTIONAL_ENHKEY_USAGE_FLAG can be set in dwFindFlags to
-// also match a certificate without either the extension or property.
-//
-// If CERT_FIND_NO_ENHKEY_USAGE_FLAG is set in dwFindFlags, finds
-// certificates without the key usage extension or property. Setting this
-// flag takes precedence over pvFindPara being NULL.
-//
-// If the CERT_FIND_EXT_ONLY_ENHKEY_USAGE_FLAG is set, then, only does a match
-// using the extension. If pvFindPara is NULL or cUsageIdentifier is set to
-// 0, finds certificates having the extension. If
-// CERT_FIND_OPTIONAL_ENHKEY_USAGE_FLAG is set, also matches a certificate
-// without the extension. If CERT_FIND_NO_ENHKEY_USAGE_FLAG is set, finds
-// certificates without the extension.
-//
-// If the CERT_FIND_PROP_ONLY_ENHKEY_USAGE_FLAG is set, then, only does a match
-// using the property. If pvFindPara is NULL or cUsageIdentifier is set to
-// 0, finds certificates having the property. If
-// CERT_FIND_OPTIONAL_ENHKEY_USAGE_FLAG is set, also matches a certificate
-// without the property. If CERT_FIND_NO_ENHKEY_USAGE_FLAG is set, finds
-// certificates without the property.
-//
-// If CERT_FIND_OR_ENHKEY_USAGE_FLAG is set, does an "OR" match of any of
-// the specified pszUsageIdentifiers. If not set, then, does an "AND" match
-// of all of the specified pszUsageIdentifiers.
-//--------------------------------------------------------------------------
-
-const
- CERT_FIND_OPTIONAL_ENHKEY_USAGE_FLAG = $1;
- {$EXTERNALSYM CERT_FIND_OPTIONAL_ENHKEY_USAGE_FLAG}
- CERT_FIND_EXT_ONLY_ENHKEY_USAGE_FLAG = $2;
- {$EXTERNALSYM CERT_FIND_EXT_ONLY_ENHKEY_USAGE_FLAG}
- CERT_FIND_PROP_ONLY_ENHKEY_USAGE_FLAG = $4;
- {$EXTERNALSYM CERT_FIND_PROP_ONLY_ENHKEY_USAGE_FLAG}
- CERT_FIND_NO_ENHKEY_USAGE_FLAG = $8;
- {$EXTERNALSYM CERT_FIND_NO_ENHKEY_USAGE_FLAG}
- CERT_FIND_OR_ENHKEY_USAGE_FLAG = $10;
- {$EXTERNALSYM CERT_FIND_OR_ENHKEY_USAGE_FLAG}
- CERT_FIND_VALID_ENHKEY_USAGE_FLAG = $20;
- {$EXTERNALSYM CERT_FIND_VALID_ENHKEY_USAGE_FLAG}
-
- CERT_FIND_OPTIONAL_CTL_USAGE_FLAG = CERT_FIND_OPTIONAL_ENHKEY_USAGE_FLAG;
- {$EXTERNALSYM CERT_FIND_OPTIONAL_CTL_USAGE_FLAG}
-
- CERT_FIND_EXT_ONLY_CTL_USAGE_FLAG = CERT_FIND_EXT_ONLY_ENHKEY_USAGE_FLAG;
- {$EXTERNALSYM CERT_FIND_EXT_ONLY_CTL_USAGE_FLAG}
-
- CERT_FIND_PROP_ONLY_CTL_USAGE_FLAG = CERT_FIND_PROP_ONLY_ENHKEY_USAGE_FLAG;
- {$EXTERNALSYM CERT_FIND_PROP_ONLY_CTL_USAGE_FLAG}
-
- CERT_FIND_NO_CTL_USAGE_FLAG = CERT_FIND_NO_ENHKEY_USAGE_FLAG;
- {$EXTERNALSYM CERT_FIND_NO_CTL_USAGE_FLAG}
- CERT_FIND_OR_CTL_USAGE_FLAG = CERT_FIND_OR_ENHKEY_USAGE_FLAG;
- {$EXTERNALSYM CERT_FIND_OR_CTL_USAGE_FLAG}
- CERT_FIND_VALID_CTL_USAGE_FLAG = CERT_FIND_VALID_ENHKEY_USAGE_FLAG;
- {$EXTERNALSYM CERT_FIND_VALID_CTL_USAGE_FLAG}
-
-//+-------------------------------------------------------------------------
-// CERT_FIND_CERT_ID
-//
-// Find a certificate with the specified CERT_ID.
-//
-// pvFindPara points to a CERT_ID.
-//--------------------------------------------------------------------------
-
-//+-------------------------------------------------------------------------
-// Get the certificate context from the store for the first or next issuer
-// of the specified subject certificate. Perform the enabled
-// verification checks on the subject. (Note, the checks are on the subject
-// using the returned issuer certificate.)
-//
-// If the first or next issuer certificate isn't found, NULL is returned.
-// Otherwise, a pointer to a read only CERT_CONTEXT is returned. CERT_CONTEXT
-// must be freed by calling CertFreeCertificateContext or is freed when passed as the
-// pPrevIssuerContext on a subsequent call. CertDuplicateCertificateContext
-// can be called to make a duplicate.
-//
-// For a self signed subject certificate, NULL is returned with LastError set
-// to CERT_STORE_SELF_SIGNED. The enabled verification checks are still done.
-//
-// The pSubjectContext may have been obtained from this store, another store
-// or created by the caller application. When created by the caller, the
-// CertCreateCertificateContext function must have been called.
-//
-// An issuer may have multiple certificates. This may occur when the validity
-// period is about to change. pPrevIssuerContext MUST BE NULL on the first
-// call to get the issuer. To get the next certificate for the issuer, the
-// pPrevIssuerContext is set to the CERT_CONTEXT returned by a previous call.
-//
-// NOTE: a NON-NULL pPrevIssuerContext is always CertFreeCertificateContext'ed by
-// this function, even for an error.
-//
-// The following flags can be set in *pdwFlags to enable verification checks
-// on the subject certificate context:
-// CERT_STORE_SIGNATURE_FLAG - use the public key in the returned
-// issuer certificate to verify the
-// signature on the subject certificate.
-// Note, if pSubjectContext->hCertStore ==
-// hCertStore, the store provider might
-// be able to eliminate a redo of
-// the signature verify.
-// CERT_STORE_TIME_VALIDITY_FLAG - get the current time and verify that
-// its within the subject certificate's
-// validity period
-// CERT_STORE_REVOCATION_FLAG - check if the subject certificate is on
-// the issuer's revocation list
-//
-// If an enabled verification check fails, then, its flag is set upon return.
-// If CERT_STORE_REVOCATION_FLAG was enabled and the issuer doesn't have a
-// CRL in the store, then, CERT_STORE_NO_CRL_FLAG is set in addition to
-// the CERT_STORE_REVOCATION_FLAG.
-//
-// If CERT_STORE_SIGNATURE_FLAG or CERT_STORE_REVOCATION_FLAG is set, then,
-// CERT_STORE_NO_ISSUER_FLAG is set if it doesn't have an issuer certificate
-// in the store.
-//
-// For a verification check failure, a pointer to the issuer's CERT_CONTEXT
-// is still returned and SetLastError isn't updated.
-//--------------------------------------------------------------------------
-
-function CertGetIssuerCertificateFromStore(hCertStore: HCERTSTORE;
- pSubjectContext, pPrevIssuerContext: PCCERT_CONTEXT; var pdwFlags: DWORD): PCCERT_CONTEXT; stdcall;
-{$EXTERNALSYM CertGetIssuerCertificateFromStore}
-
-//+-------------------------------------------------------------------------
-// Perform the enabled verification checks on the subject certificate
-// using the issuer. Same checks and flags definitions as for the above
-// CertGetIssuerCertificateFromStore.
-//
-// If you are only checking CERT_STORE_TIME_VALIDITY_FLAG, then, the
-// issuer can be NULL.
-//
-// For a verification check failure, SUCCESS is still returned.
-//--------------------------------------------------------------------------
-
-function CertVerifySubjectCertificateContext(pSubject: PCCERT_CONTEXT;
- pIssuer: PCCERT_CONTEXT; var pdwFlags: DWORD): BOOL; stdcall;
-{$EXTERNALSYM CertVerifySubjectCertificateContext}
-
-//+-------------------------------------------------------------------------
-// Duplicate a certificate context
-//--------------------------------------------------------------------------
-
-function CertDuplicateCertificateContext(pCertContext: PCCERT_CONTEXT): PCCERT_CONTEXT; stdcall;
-{$EXTERNALSYM CertDuplicateCertificateContext}
-
-//+-------------------------------------------------------------------------
-// Create a certificate context from the encoded certificate. The created
-// context isn't put in a store.
-//
-// Makes a copy of the encoded certificate in the created context.
-//
-// If unable to decode and create the certificate context, NULL is returned.
-// Otherwise, a pointer to a read only CERT_CONTEXT is returned.
-// CERT_CONTEXT must be freed by calling CertFreeCertificateContext.
-// CertDuplicateCertificateContext can be called to make a duplicate.
-//
-// CertSetCertificateContextProperty and CertGetCertificateContextProperty can be called
-// to store properties for the certificate.
-//--------------------------------------------------------------------------
-
-function CertCreateCertificateContext(dwCertEncodingType: DWORD;
- pbCertEncoded: LPBYTE; cbCertEncoded: DWORD): PCCERT_CONTEXT; stdcall;
-{$EXTERNALSYM CertCreateCertificateContext}
-
-//+-------------------------------------------------------------------------
-// Free a certificate context
-//
-// There needs to be a corresponding free for each context obtained by a
-// get, find, duplicate or create.
-//--------------------------------------------------------------------------
-
-function CertFreeCertificateContext(pCertContext: PCCERT_CONTEXT): BOOL; stdcall;
-{$EXTERNALSYM CertFreeCertificateContext}
-
-//+-------------------------------------------------------------------------
-// Set the property for the specified certificate context.
-//
-// The type definition for pvData depends on the dwPropId value. There are
-// five predefined types:
-// CERT_KEY_PROV_HANDLE_PROP_ID - a HCRYPTPROV for the certificate's
-// private key is passed in pvData. Updates the hCryptProv field
-// of the CERT_KEY_CONTEXT_PROP_ID. If the CERT_KEY_CONTEXT_PROP_ID
-// doesn't exist, its created with all the other fields zeroed out. If
-// CERT_STORE_NO_CRYPT_RELEASE_FLAG isn't set, HCRYPTPROV is implicitly
-// released when either the property is set to NULL or on the final
-// free of the CertContext.
-//
-// CERT_KEY_PROV_INFO_PROP_ID - a PCRYPT_KEY_PROV_INFO for the certificate's
-// private key is passed in pvData.
-//
-// CERT_SHA1_HASH_PROP_ID -
-// CERT_MD5_HASH_PROP_ID -
-// CERT_SIGNATURE_HASH_PROP_ID - normally, a hash property is implicitly
-// set by doing a CertGetCertificateContextProperty. pvData points to a
-// CRYPT_HASH_BLOB.
-//
-// CERT_KEY_CONTEXT_PROP_ID - a PCERT_KEY_CONTEXT for the certificate's
-// private key is passed in pvData. The CERT_KEY_CONTEXT contains both the
-// hCryptProv and dwKeySpec for the private key.
-// See the CERT_KEY_PROV_HANDLE_PROP_ID for more information about
-// the hCryptProv field and dwFlags settings. Note, more fields may
-// be added for this property. The cbSize field value will be adjusted
-// accordingly.
-//
-// CERT_KEY_SPEC_PROP_ID - the dwKeySpec for the private key. pvData
-// points to a DWORD containing the KeySpec
-//
-// CERT_ENHKEY_USAGE_PROP_ID - enhanced key usage definition for the
-// certificate. pvData points to a CRYPT_DATA_BLOB containing an
-// ASN.1 encoded CERT_ENHKEY_USAGE (encoded via
-// CryptEncodeObject(X509_ENHANCED_KEY_USAGE).
-//
-// CERT_NEXT_UPDATE_LOCATION_PROP_ID - location of the next update.
-// Currently only applicable to CTLs. pvData points to a CRYPT_DATA_BLOB
-// containing an ASN.1 encoded CERT_ALT_NAME_INFO (encoded via
-// CryptEncodeObject(X509_ALTERNATE_NAME)).
-//
-// CERT_FRIENDLY_NAME_PROP_ID - friendly name for the cert, CRL or CTL.
-// pvData points to a CRYPT_DATA_BLOB. pbData is a pointer to a NULL
-// terminated unicode, wide character string.
-// cbData = (wcslen((LPWSTR) pbData) + 1) * sizeof(WCHAR).
-//
-// CERT_DESCRIPTION_PROP_ID - description for the cert, CRL or CTL.
-// pvData points to a CRYPT_DATA_BLOB. pbData is a pointer to a NULL
-// terminated unicode, wide character string.
-// cbData = (wcslen((LPWSTR) pbData) + 1) * sizeof(WCHAR).
-//
-// CERT_ARCHIVED_PROP_ID - when this property is set, the certificate
-// is skipped during enumeration. Note, certificates having this property
-// are still found for explicit finds, such as, finding a certificate
-// with a specific hash or finding a certificate having a specific issuer
-// and serial number. pvData points to a CRYPT_DATA_BLOB. This blob
-// can be NULL (pbData = NULL, cbData = 0).
-//
-// CERT_PUBKEY_ALG_PARA_PROP_ID - for public keys supporting
-// algorithm parameter inheritance. pvData points to a CRYPT_OBJID_BLOB
-// containing the ASN.1 encoded PublicKey Algorithm Parameters. For
-// DSS this would be the parameters encoded via
-// CryptEncodeObject(X509_DSS_PARAMETERS). This property may be set
-// by CryptVerifyCertificateSignatureEx().
-//
-// For all the other PROP_IDs: an encoded PCRYPT_DATA_BLOB is passed in pvData.
-//
-// If the property already exists, then, the old value is deleted and silently
-// replaced. Setting, pvData to NULL, deletes the property.
-//
-// CERT_SET_PROPERTY_IGNORE_PERSIST_ERROR_FLAG can be set to ignore any
-// provider write errors and always update the cached context's property.
-//--------------------------------------------------------------------------
-
-function CertSetCertificateContextProperty(pCertContext: PCCERT_CONTEXT;
- dwPropId: DWORD; dwFlags: DWORD; pvData: Pointer): BOOL; stdcall;
-{$EXTERNALSYM CertSetCertificateContextProperty}
-
-// Set this flag to ignore any store provider write errors and always update
-// the cached context's property
-
-const
- CERT_SET_PROPERTY_IGNORE_PERSIST_ERROR_FLAG = DWORD($80000000);
- {$EXTERNALSYM CERT_SET_PROPERTY_IGNORE_PERSIST_ERROR_FLAG}
-
-//+-------------------------------------------------------------------------
-// Get the property for the specified certificate context.
-//
-// For CERT_KEY_PROV_HANDLE_PROP_ID, pvData points to a HCRYPTPROV.
-//
-// For CERT_KEY_PROV_INFO_PROP_ID, pvData points to a CRYPT_KEY_PROV_INFO structure.
-// Elements pointed to by fields in the pvData structure follow the
-// structure. Therefore, *pcbData may exceed the size of the structure.
-//
-// For CERT_KEY_CONTEXT_PROP_ID, pvData points to a CERT_KEY_CONTEXT structure.
-//
-// For CERT_KEY_SPEC_PROP_ID, pvData points to a DWORD containing the KeySpec.
-// If the CERT_KEY_CONTEXT_PROP_ID exists, the KeySpec is obtained from there.
-// Otherwise, if the CERT_KEY_PROV_INFO_PROP_ID exists, its the source
-// of the KeySpec.
-//
-// For CERT_SHA1_HASH_PROP_ID or CERT_MD5_HASH_PROP_ID, if the hash
-// doesn't already exist, then, its computed via CryptHashCertificate()
-// and then set. pvData points to the computed hash. Normally, the length
-// is 20 bytes for SHA and 16 for MD5.
-//
-// For CERT_SIGNATURE_HASH_PROP_ID, if the hash
-// doesn't already exist, then, its computed via CryptHashToBeSigned()
-// and then set. pvData points to the computed hash. Normally, the length
-// is 20 bytes for SHA and 16 for MD5.
-//
-// For CERT_ACCESS_STATE_PROP_ID, pvData points to a DWORD containing the
-// access state flags. The appropriate CERT_ACCESS_STATE_*_FLAG's are set
-// in the returned DWORD. See the CERT_ACCESS_STATE_*_FLAG definitions
-// above. Note, this property is read only. It can't be set.
-//
-// For CERT_KEY_IDENTIFIER_PROP_ID, if property doesn't already exist,
-// first searches for the szOID_SUBJECT_KEY_IDENTIFIER extension. Next,
-// does SHA1 hash of the certficate's SubjectPublicKeyInfo. pvData
-// points to the key identifier bytes. Normally, the length is 20 bytes.
-//
-// For CERT_PUBKEY_ALG_PARA_PROP_ID, pvPara points to the ASN.1 encoded
-// PublicKey Algorithm Parameters. This property will only be set
-// for public keys supporting algorithm parameter inheritance and when the
-// parameters have been omitted from the encoded and signed certificate.
-//
-// For all other PROP_IDs, pvData points to an encoded array of bytes.
-//--------------------------------------------------------------------------
-
-function CertGetCertificateContextProperty(pCertContext: PCCERT_CONTEXT;
- dwPropId: DWORD; pvData: Pointer; var pcbData: DWORD): BOOL; stdcall;
-{$EXTERNALSYM CertGetCertificateContextProperty}
-
-//+-------------------------------------------------------------------------
-// Enumerate the properties for the specified certificate context.
-//
-// To get the first property, set dwPropId to 0. The ID of the first
-// property is returned. To get the next property, set dwPropId to the
-// ID returned by the last call. To enumerate all the properties continue
-// until 0 is returned.
-//
-// CertGetCertificateContextProperty is called to get the property's data.
-//
-// Note, since, the CERT_KEY_PROV_HANDLE_PROP_ID and CERT_KEY_SPEC_PROP_ID
-// properties are stored as fields in the CERT_KEY_CONTEXT_PROP_ID
-// property, they aren't enumerated individually.
-//--------------------------------------------------------------------------
-
-function CertEnumCertificateContextProperties(pCertContext: PCCERT_CONTEXT;
- dwPropId: DWORD): DWORD; stdcall;
-{$EXTERNALSYM CertEnumCertificateContextProperties}
-
-//+-------------------------------------------------------------------------
-// Get the first or next CRL context from the store for the specified
-// issuer certificate. Perform the enabled verification checks on the CRL.
-//
-// If the first or next CRL isn't found, NULL is returned.
-// Otherwise, a pointer to a read only CRL_CONTEXT is returned. CRL_CONTEXT
-// must be freed by calling CertFreeCRLContext. However, the free must be
-// pPrevCrlContext on a subsequent call. CertDuplicateCRLContext
-// can be called to make a duplicate.
-//
-// The pIssuerContext may have been obtained from this store, another store
-// or created by the caller application. When created by the caller, the
-// CertCreateCertificateContext function must have been called.
-//
-// If pIssuerContext == NULL, finds all the CRLs in the store.
-//
-// An issuer may have multiple CRLs. For example, it generates delta CRLs
-// using a X.509 v3 extension. pPrevCrlContext MUST BE NULL on the first
-// call to get the CRL. To get the next CRL for the issuer, the
-// pPrevCrlContext is set to the CRL_CONTEXT returned by a previous call.
-//
-// NOTE: a NON-NULL pPrevCrlContext is always CertFreeCRLContext'ed by
-// this function, even for an error.
-//
-// The following flags can be set in *pdwFlags to enable verification checks
-// on the returned CRL:
-// CERT_STORE_SIGNATURE_FLAG - use the public key in the
-// issuer's certificate to verify the
-// signature on the returned CRL.
-// Note, if pIssuerContext->hCertStore ==
-// hCertStore, the store provider might
-// be able to eliminate a redo of
-// the signature verify.
-// CERT_STORE_TIME_VALIDITY_FLAG - get the current time and verify that
-// its within the CRL's ThisUpdate and
-// NextUpdate validity period.
-//
-// If an enabled verification check fails, then, its flag is set upon return.
-//
-// If pIssuerContext == NULL, then, an enabled CERT_STORE_SIGNATURE_FLAG
-// always fails and the CERT_STORE_NO_ISSUER_FLAG is also set.
-//
-// For a verification check failure, a pointer to the first or next
-// CRL_CONTEXT is still returned and SetLastError isn't updated.
-//--------------------------------------------------------------------------
-
-function CertGetCRLFromStore(hCertStore: HCERTSTORE; pIssuerContext: PCCERT_CONTEXT;
- pPrevCrlContext: PCCRL_CONTEXT; var pdwFlags: DWORD): PCCRL_CONTEXT; stdcall;
-{$EXTERNALSYM CertGetCRLFromStore}
-
-//+-------------------------------------------------------------------------
-// Enumerate the CRL contexts in the store.
-//
-// If a CRL isn't found, NULL is returned.
-// Otherwise, a pointer to a read only CRL_CONTEXT is returned. CRL_CONTEXT
-// must be freed by calling CertFreeCRLContext or is freed when passed as the
-// pPrevCrlContext on a subsequent call. CertDuplicateCRLContext
-// can be called to make a duplicate.
-//
-// pPrevCrlContext MUST BE NULL to enumerate the first
-// CRL in the store. Successive CRLs are enumerated by setting
-// pPrevCrlContext to the CRL_CONTEXT returned by a previous call.
-//
-// NOTE: a NON-NULL pPrevCrlContext is always CertFreeCRLContext'ed by
-// this function, even for an error.
-//--------------------------------------------------------------------------
-
-function CertEnumCRLsInStore(hCertStore: HCERTSTORE;
- pPrevCrlContext: PCCRL_CONTEXT): PCCRL_CONTEXT; stdcall;
-{$EXTERNALSYM CertEnumCRLsInStore}
-
-//+-------------------------------------------------------------------------
-// Find the first or next CRL context in the store.
-//
-// The CRL is found according to the dwFindType and its pvFindPara.
-// See below for a list of the find types and its parameters.
-//
-// Currently dwFindFlags isn't used and must be set to 0.
-//
-// Usage of dwCertEncodingType depends on the dwFindType.
-//
-// If the first or next CRL isn't found, NULL is returned.
-// Otherwise, a pointer to a read only CRL_CONTEXT is returned. CRL_CONTEXT
-// must be freed by calling CertFreeCRLContext or is freed when passed as the
-// pPrevCrlContext on a subsequent call. CertDuplicateCRLContext
-// can be called to make a duplicate.
-//
-// pPrevCrlContext MUST BE NULL on the first
-// call to find the CRL. To find the next CRL, the
-// pPrevCrlContext is set to the CRL_CONTEXT returned by a previous call.
-//
-// NOTE: a NON-NULL pPrevCrlContext is always CertFreeCRLContext'ed by
-// this function, even for an error.
-//--------------------------------------------------------------------------
-
-function CertFindCRLInStore(hCertStore: HCERTSTORE; dwCertEncodingType: DWORD;
- dwFindFlags: DWORD; dwFindType: DWORD; pvFindPara: Pointer;
- pPrevCrlContext: PCCRL_CONTEXT): PCCRL_CONTEXT; stdcall;
-{$EXTERNALSYM CertFindCRLInStore}
-
-const
- CRL_FIND_ANY = 0;
- {$EXTERNALSYM CRL_FIND_ANY}
- CRL_FIND_ISSUED_BY = 1;
- {$EXTERNALSYM CRL_FIND_ISSUED_BY}
- CRL_FIND_EXISTING = 2;
- {$EXTERNALSYM CRL_FIND_EXISTING}
-
-//+-------------------------------------------------------------------------
-// CRL_FIND_ANY
-//
-// Find any CRL.
-//
-// pvFindPara isn't used.
-//--------------------------------------------------------------------------
-
-//+-------------------------------------------------------------------------
-// CRL_FIND_ISSUED_BY
-//
-// Find CRL matching the specified issuer.
-//
-// pvFindPara is the PCCERT_CONTEXT of the CRL issuer.
-//
-// By default, only does issuer name matching. The following flags can be
-// set in dwFindFlags to do additional filtering.
-//
-// If CRL_FIND_ISSUED_BY_AKI_FLAG is set in dwFindFlags, then, checks if the
-// CRL has an Authority Key Identifier (AKI) extension. If the CRL has an
-// AKI, then, only returns a CRL whose AKI matches the issuer.
-//
-// Note, the AKI extension has the following OID:
-// szOID_AUTHORITY_KEY_IDENTIFIER2 and its corresponding data structure.
-//
-// If CRL_FIND_ISSUED_BY_SIGNATURE_FLAG is set in dwFindFlags, then,
-// uses the public key in the issuer's certificate to verify the
-// signature on the CRL. Only returns a CRL having a valid signature.
-//--------------------------------------------------------------------------
-
-const
- CRL_FIND_ISSUED_BY_AKI_FLAG = $1;
- {$EXTERNALSYM CRL_FIND_ISSUED_BY_AKI_FLAG}
- CRL_FIND_ISSUED_BY_SIGNATURE_FLAG = $2;
- {$EXTERNALSYM CRL_FIND_ISSUED_BY_SIGNATURE_FLAG}
-
-//+-------------------------------------------------------------------------
-// CRL_FIND_EXISTING
-//
-// Find existing CRL in the store.
-//
-// pvFindPara is the PCCRL_CONTEXT of the CRL to check if it already
-// exists in the store.
-//--------------------------------------------------------------------------
-
-//+-------------------------------------------------------------------------
-// Duplicate a CRL context
-//--------------------------------------------------------------------------
-
-function CertDuplicateCRLContext(pCrlContext: PCCRL_CONTEXT): PCCRL_CONTEXT; stdcall;
-{$EXTERNALSYM CertDuplicateCRLContext}
-
-//+-------------------------------------------------------------------------
-// Create a CRL context from the encoded CRL. The created
-// context isn't put in a store.
-//
-// Makes a copy of the encoded CRL in the created context.
-//
-// If unable to decode and create the CRL context, NULL is returned.
-// Otherwise, a pointer to a read only CRL_CONTEXT is returned.
-// CRL_CONTEXT must be freed by calling CertFreeCRLContext.
-// CertDuplicateCRLContext can be called to make a duplicate.
-//
-// CertSetCRLContextProperty and CertGetCRLContextProperty can be called
-// to store properties for the CRL.
-//--------------------------------------------------------------------------
-
-function CertCreateCRLContext(dwCertEncodingType: DWORD; pbCrlEncoded: LPBYTE;
- cbCrlEncoded: DWORD): PCCRL_CONTEXT; stdcall;
-{$EXTERNALSYM CertCreateCRLContext}
-
-//+-------------------------------------------------------------------------
-// Free a CRL context
-//
-// There needs to be a corresponding free for each context obtained by a
-// get, duplicate or create.
-//--------------------------------------------------------------------------
-
-function CertFreeCRLContext(pCrlContext: PCCRL_CONTEXT): BOOL; stdcall;
-{$EXTERNALSYM CertFreeCRLContext}
-
-//+-------------------------------------------------------------------------
-// Set the property for the specified CRL context.
-//
-// Same Property Ids and semantics as CertSetCertificateContextProperty.
-//--------------------------------------------------------------------------
-
-function CertSetCRLContextProperty(pCrlContext: PCCRL_CONTEXT; dwPropId: DWORD;
- dwFlags: DWORD; pvData: Pointer): BOOL; stdcall;
-{$EXTERNALSYM CertSetCRLContextProperty}
-
-//+-------------------------------------------------------------------------
-// Get the property for the specified CRL context.
-//
-// Same Property Ids and semantics as CertGetCertificateContextProperty.
-//
-// CERT_SHA1_HASH_PROP_ID, CERT_MD5_HASH_PROP_ID or
-// CERT_SIGNATURE_HASH_PROP_ID is the predefined property of most interest.
-//--------------------------------------------------------------------------
-
-function CertGetCRLContextProperty(pCrlContext: PCCRL_CONTEXT; dwPropId: DWORD;
- pvData: Pointer; var pcbData: DWORD): BOOL; stdcall;
-{$EXTERNALSYM CertGetCRLContextProperty}
-
-//+-------------------------------------------------------------------------
-// Enumerate the properties for the specified CRL context.
-//
-// To get the first property, set dwPropId to 0. The ID of the first
-// property is returned. To get the next property, set dwPropId to the
-// ID returned by the last call. To enumerate all the properties continue
-// until 0 is returned.
-//
-// CertGetCRLContextProperty is called to get the property's data.
-//--------------------------------------------------------------------------
-
-function CertEnumCRLContextProperties(pCrlContext: PCCRL_CONTEXT;
- dwPropId: DWORD): DWORD; stdcall;
-{$EXTERNALSYM CertEnumCRLContextProperties}
-
-//+-------------------------------------------------------------------------
-// Search the CRL's list of entries for the specified certificate.
-//
-// TRUE is returned if we were able to search the list. Otherwise, FALSE is
-// returned,
-//
-// For success, if the certificate was found in the list, *ppCrlEntry is
-// updated with a pointer to the entry. Otherwise, *ppCrlEntry is set to NULL.
-// The returned entry isn't allocated and must not be freed.
-//
-// dwFlags and pvReserved currently aren't used and must be set to 0 or NULL.
-//--------------------------------------------------------------------------
-
-function CertFindCertificateInCRL(pCert: PCCERT_CONTEXT; pCrlContext: PCCRL_CONTEXT;
- dwFlags: DWORD; pvReserved: Pointer; var ppCrlEntry: PCRL_ENTRY): BOOL; stdcall;
-{$EXTERNALSYM CertFindCertificateInCRL}
-
-//+-------------------------------------------------------------------------
-// Add certificate/CRL, encoded, context or element disposition values.
-//--------------------------------------------------------------------------
-
-const
- CERT_STORE_ADD_NEW = 1;
- {$EXTERNALSYM CERT_STORE_ADD_NEW}
- CERT_STORE_ADD_USE_EXISTING = 2;
- {$EXTERNALSYM CERT_STORE_ADD_USE_EXISTING}
- CERT_STORE_ADD_REPLACE_EXISTING = 3;
- {$EXTERNALSYM CERT_STORE_ADD_REPLACE_EXISTING}
- CERT_STORE_ADD_ALWAYS = 4;
- {$EXTERNALSYM CERT_STORE_ADD_ALWAYS}
- CERT_STORE_ADD_REPLACE_EXISTING_INHERIT_PROPERTIES = 5;
- {$EXTERNALSYM CERT_STORE_ADD_REPLACE_EXISTING_INHERIT_PROPERTIES}
- CERT_STORE_ADD_NEWER = 6;
- {$EXTERNALSYM CERT_STORE_ADD_NEWER}
- CERT_STORE_ADD_NEWER_INHERIT_PROPERTIES = 7;
- {$EXTERNALSYM CERT_STORE_ADD_NEWER_INHERIT_PROPERTIES}
-
-//+-------------------------------------------------------------------------
-// Add the encoded certificate to the store according to the specified
-// disposition action.
-//
-// Makes a copy of the encoded certificate before adding to the store.
-//
-// dwAddDispostion specifies the action to take if the certificate
-// already exists in the store. This parameter must be one of the following
-// values:
-// CERT_STORE_ADD_NEW
-// Fails if the certificate already exists in the store. LastError
-// is set to CRYPT_E_EXISTS.
-// CERT_STORE_ADD_USE_EXISTING
-// If the certifcate already exists, then, its used and if ppCertContext
-// is non-NULL, the existing context is duplicated.
-// CERT_STORE_ADD_REPLACE_EXISTING
-// If the certificate already exists, then, the existing certificate
-// context is deleted before creating and adding the new context.
-// CERT_STORE_ADD_ALWAYS
-// No check is made to see if the certificate already exists. A
-// new certificate context is always created. This may lead to
-// duplicates in the store.
-// CERT_STORE_ADD_REPLACE_EXISTING_INHERIT_PROPERTIES
-// If the certificate already exists, then, its used.
-// CERT_STORE_ADD_NEWER
-// Fails if the certificate already exists in the store AND the NotBefore
-// time of the existing certificate is equal to or greater than the
-// NotBefore time of the new certificate being added. LastError
-// is set to CRYPT_E_EXISTS.
-//
-// If an older certificate is replaced, same as
-// CERT_STORE_ADD_REPLACE_EXISTING.
-//
-// For CRLs or CTLs compares the ThisUpdate times.
-//
-// CERT_STORE_ADD_NEWER_INHERIT_PROPERTIES
-// Same as CERT_STORE_ADD_NEWER. However, if an older certificate is
-// replaced, same as CERT_STORE_ADD_REPLACE_EXISTING_INHERIT_PROPERTIES.
-//
-// CertGetSubjectCertificateFromStore is called to determine if the
-// certificate already exists in the store.
-//
-// ppCertContext can be NULL, indicating the caller isn't interested
-// in getting the CERT_CONTEXT of the added or existing certificate.
-//--------------------------------------------------------------------------
-
-function CertAddEncodedCertificateToStore(hCertStore: HCERTSTORE;
- dwCertEncodingType: DWORD; pbCertEncoded: LPBYTE; cbCertEncoded: DWORD;
- dwAddDisposition: DWORD; ppCertContext: PPCCERT_CONTEXT): BOOL; stdcall;
-{$EXTERNALSYM CertAddEncodedCertificateToStore}
-
-//+-------------------------------------------------------------------------
-// Add the certificate context to the store according to the specified
-// disposition action.
-//
-// In addition to the encoded certificate, the context's properties are
-// also copied. Note, the CERT_KEY_CONTEXT_PROP_ID property (and its
-// CERT_KEY_PROV_HANDLE_PROP_ID or CERT_KEY_SPEC_PROP_ID) isn't copied.
-//
-// Makes a copy of the certificate context before adding to the store.
-//
-// dwAddDispostion specifies the action to take if the certificate
-// already exists in the store. This parameter must be one of the following
-// values:
-// CERT_STORE_ADD_NEW
-// Fails if the certificate already exists in the store. LastError
-// is set to CRYPT_E_EXISTS.
-// CERT_STORE_ADD_USE_EXISTING
-// If the certifcate already exists, then, its used and if ppStoreContext
-// is non-NULL, the existing context is duplicated. Iterates
-// through pCertContext's properties and only copies the properties
-// that don't already exist. The SHA1 and MD5 hash properties aren't
-// copied.
-// CERT_STORE_ADD_REPLACE_EXISTING
-// If the certificate already exists, then, the existing certificate
-// context is deleted before creating and adding a new context.
-// Properties are copied before doing the add.
-// CERT_STORE_ADD_ALWAYS
-// No check is made to see if the certificate already exists. A
-// new certificate context is always created and added. This may lead to
-// duplicates in the store. Properties are
-// copied before doing the add.
-// CERT_STORE_ADD_REPLACE_EXISTING_INHERIT_PROPERTIES
-// If the certificate already exists, then, the existing certificate
-// context is used. Properties from the added context are copied and
-// replace existing properties. However, any existing properties not
-// in the added context remain and aren't deleted.
-// CERT_STORE_ADD_NEWER
-// Fails if the certificate already exists in the store AND the NotBefore
-// time of the existing context is equal to or greater than the
-// NotBefore time of the new context being added. LastError
-// is set to CRYPT_E_EXISTS.
-//
-// If an older context is replaced, same as
-// CERT_STORE_ADD_REPLACE_EXISTING.
-//
-// For CRLs or CTLs compares the ThisUpdate times.
-//
-// CERT_STORE_ADD_NEWER_INHERIT_PROPERTIES
-// Same as CERT_STORE_ADD_NEWER. However, if an older context is
-// replaced, same as CERT_STORE_ADD_REPLACE_EXISTING_INHERIT_PROPERTIES.
-//
-// CertGetSubjectCertificateFromStore is called to determine if the
-// certificate already exists in the store.
-//
-// ppStoreContext can be NULL, indicating the caller isn't interested
-// in getting the CERT_CONTEXT of the added or existing certificate.
-//--------------------------------------------------------------------------
-
-function CertAddCertificateContextToStore(hCertStore: HCERTSTORE;
- pCertContext: PCCERT_CONTEXT; dwAddDisposition: DWORD;
- ppStoreContext: PPCCERT_CONTEXT): BOOL; stdcall;
-{$EXTERNALSYM CertAddCertificateContextToStore}
-
-//+-------------------------------------------------------------------------
-// Certificate Store Context Types
-//--------------------------------------------------------------------------
-
-const
- CERT_STORE_CERTIFICATE_CONTEXT = 1;
- {$EXTERNALSYM CERT_STORE_CERTIFICATE_CONTEXT}
- CERT_STORE_CRL_CONTEXT = 2;
- {$EXTERNALSYM CERT_STORE_CRL_CONTEXT}
- CERT_STORE_CTL_CONTEXT = 3;
- {$EXTERNALSYM CERT_STORE_CTL_CONTEXT}
-
-//+-------------------------------------------------------------------------
-// Certificate Store Context Bit Flags
-//--------------------------------------------------------------------------
-
- CERT_STORE_ALL_CONTEXT_FLAG = not 0;
- {$EXTERNALSYM CERT_STORE_ALL_CONTEXT_FLAG}
- CERT_STORE_CERTIFICATE_CONTEXT_FLAG = 1 shl CERT_STORE_CERTIFICATE_CONTEXT;
- {$EXTERNALSYM CERT_STORE_CERTIFICATE_CONTEXT_FLAG}
- CERT_STORE_CRL_CONTEXT_FLAG = 1 shl CERT_STORE_CRL_CONTEXT;
- {$EXTERNALSYM CERT_STORE_CRL_CONTEXT_FLAG}
- CERT_STORE_CTL_CONTEXT_FLAG = 1 shl CERT_STORE_CTL_CONTEXT;
- {$EXTERNALSYM CERT_STORE_CTL_CONTEXT_FLAG}
-
-//+-------------------------------------------------------------------------
-// Add the serialized certificate or CRL element to the store.
-//
-// The serialized element contains the encoded certificate, CRL or CTL and
-// its properties, such as, CERT_KEY_PROV_INFO_PROP_ID.
-//
-// If hCertStore is NULL, creates a certificate, CRL or CTL context not
-// residing in any store.
-//
-// dwAddDispostion specifies the action to take if the certificate or CRL
-// already exists in the store. See CertAddCertificateContextToStore for a
-// list of and actions taken.
-//
-// dwFlags currently isn't used and should be set to 0.
-//
-// dwContextTypeFlags specifies the set of allowable contexts. For example, to
-// add either a certificate or CRL, set dwContextTypeFlags to:
-// CERT_STORE_CERTIFICATE_CONTEXT_FLAG | CERT_STORE_CRL_CONTEXT_FLAG
-//
-// *pdwContextType is updated with the type of the context returned in
-// *ppvContxt. pdwContextType or ppvContext can be NULL, indicating the
-// caller isn't interested in getting the output. If *ppvContext is
-// returned it must be freed by calling CertFreeCertificateContext or
-// CertFreeCRLContext.
-//--------------------------------------------------------------------------
-
-function CertAddSerializedElementToStore(hCertStore: HCERTSTORE; pbElement: LPBYTE;
- cbElement, dwAddDisposition, dwFlags, dwContextTypeFlags: DWORD;
- pdwContextType: LPDWORD; ppvContext: PPointer): BOOL; stdcall;
-{$EXTERNALSYM CertAddSerializedElementToStore}
-
-//+-------------------------------------------------------------------------
-// Delete the specified certificate from the store.
-//
-// All subsequent gets or finds for the certificate will fail. However,
-// memory allocated for the certificate isn't freed until all of its contexts
-// have also been freed.
-//
-// The pCertContext is obtained from a get, enum, find or duplicate.
-//
-// Some store provider implementations might also delete the issuer's CRLs
-// if this is the last certificate for the issuer in the store.
-//
-// NOTE: the pCertContext is always CertFreeCertificateContext'ed by
-// this function, even for an error.
-//--------------------------------------------------------------------------
-
-function CertDeleteCertificateFromStore(pCertContext: PCCERT_CONTEXT): BOOL; stdcall;
-{$EXTERNALSYM CertDeleteCertificateFromStore}
-
-//+-------------------------------------------------------------------------
-// Add the encoded CRL to the store according to the specified
-// disposition option.
-//
-// Makes a copy of the encoded CRL before adding to the store.
-//
-// dwAddDispostion specifies the action to take if the CRL
-// already exists in the store. See CertAddEncodedCertificateToStore for a
-// list of and actions taken.
-//
-// Compares the CRL's Issuer to determine if the CRL already exists in the
-// store.
-//
-// ppCrlContext can be NULL, indicating the caller isn't interested
-// in getting the CRL_CONTEXT of the added or existing CRL.
-//--------------------------------------------------------------------------
-
-function CertAddEncodedCRLToStore(hCertStore: HCERTSTORE; dwCertEncodingType: DWORD;
- pbCrlEncoded: LPBYTE; cbCrlEncoded, dwAddDisposition: DWORD;
- ppCrlContext: PPCCRL_CONTEXT): BOOL; stdcall;
-{$EXTERNALSYM CertAddEncodedCRLToStore}
-
-//+-------------------------------------------------------------------------
-// Add the CRL context to the store according to the specified
-// disposition option.
-//
-// In addition to the encoded CRL, the context's properties are
-// also copied. Note, the CERT_KEY_CONTEXT_PROP_ID property (and its
-// CERT_KEY_PROV_HANDLE_PROP_ID or CERT_KEY_SPEC_PROP_ID) isn't copied.
-//
-// Makes a copy of the encoded CRL before adding to the store.
-//
-// dwAddDispostion specifies the action to take if the CRL
-// already exists in the store. See CertAddCertificateContextToStore for a
-// list of and actions taken.
-//
-// Compares the CRL's Issuer, ThisUpdate and NextUpdate to determine
-// if the CRL already exists in the store.
-//
-// ppStoreContext can be NULL, indicating the caller isn't interested
-// in getting the CRL_CONTEXT of the added or existing CRL.
-//--------------------------------------------------------------------------
-
-function CertAddCRLContextToStore(hCertStore: HCERTSTORE; pCrlContext: PCCRL_CONTEXT;
- dwAddDisposition: DWORD; ppStoreContext: PPCCRL_CONTEXT): BOOL; stdcall;
-{$EXTERNALSYM CertAddCRLContextToStore}
-
-//+-------------------------------------------------------------------------
-// Delete the specified CRL from the store.
-//
-// All subsequent gets for the CRL will fail. However,
-// memory allocated for the CRL isn't freed until all of its contexts
-// have also been freed.
-//
-// The pCrlContext is obtained from a get or duplicate.
-//
-// NOTE: the pCrlContext is always CertFreeCRLContext'ed by
-// this function, even for an error.
-//--------------------------------------------------------------------------
-
-function CertDeleteCRLFromStore(pCrlContext: PCCRL_CONTEXT): BOOL; stdcall;
-{$EXTERNALSYM CertDeleteCRLFromStore}
-
-//+-------------------------------------------------------------------------
-// Serialize the certificate context's encoded certificate and its
-// properties.
-//--------------------------------------------------------------------------
-
-function CertSerializeCertificateStoreElement(pCertContext: PCCERT_CONTEXT;
- dwFlags: DWORD; pbElement: LPBYTE; var pcbElement: DWORD): BOOL; stdcall;
-{$EXTERNALSYM CertSerializeCertificateStoreElement}
-
-//+-------------------------------------------------------------------------
-// Serialize the CRL context's encoded CRL and its properties.
-//--------------------------------------------------------------------------
-
-function CertSerializeCRLStoreElement(pCrlContext: PCCRL_CONTEXT; dwFlags: DWORD;
- pbElement: LPBYTE; var pcbElement: DWORD): BOOL; stdcall;
-{$EXTERNALSYM CertSerializeCRLStoreElement}
-
-//+=========================================================================
-// Certificate Trust List (CTL) Store Data Structures and APIs
-//==========================================================================
-
-//+-------------------------------------------------------------------------
-// Duplicate a CTL context
-//--------------------------------------------------------------------------
-
-function CertDuplicateCTLContext(pCtlContext: PCCTL_CONTEXT): PCCTL_CONTEXT; stdcall;
-{$EXTERNALSYM CertDuplicateCTLContext}
-
-//+-------------------------------------------------------------------------
-// Create a CTL context from the encoded CTL. The created
-// context isn't put in a store.
-//
-// Makes a copy of the encoded CTL in the created context.
-//
-// If unable to decode and create the CTL context, NULL is returned.
-// Otherwise, a pointer to a read only CTL_CONTEXT is returned.
-// CTL_CONTEXT must be freed by calling CertFreeCTLContext.
-// CertDuplicateCTLContext can be called to make a duplicate.
-//
-// CertSetCTLContextProperty and CertGetCTLContextProperty can be called
-// to store properties for the CTL.
-//--------------------------------------------------------------------------
-
-function CertCreateCTLContext(dwMsgAndCertEncodingType: DWORD;
- pbCtlEncoded: LPBYTE; cbCtlEncoded: DWORD): PCCTL_CONTEXT; stdcall;
-{$EXTERNALSYM CertCreateCTLContext}
-
-//+-------------------------------------------------------------------------
-// Free a CTL context
-//
-// There needs to be a corresponding free for each context obtained by a
-// get, duplicate or create.
-//--------------------------------------------------------------------------
-
-function CertFreeCTLContext(pCtlContext: PCCTL_CONTEXT): BOOL; stdcall;
-{$EXTERNALSYM CertFreeCTLContext}
-
-//+-------------------------------------------------------------------------
-// Set the property for the specified CTL context.
-//
-// Same Property Ids and semantics as CertSetCertificateContextProperty.
-//--------------------------------------------------------------------------
-
-function CertSetCTLContextProperty(pCtlContext: PCCTL_CONTEXT; dwPropId: DWORD;
- dwFlags: DWORD; pvData: Pointer): BOOL; stdcall;
-{$EXTERNALSYM CertSetCTLContextProperty}
-
-//+-------------------------------------------------------------------------
-// Get the property for the specified CTL context.
-//
-// Same Property Ids and semantics as CertGetCertificateContextProperty.
-//
-// CERT_SHA1_HASH_PROP_ID or CERT_NEXT_UPDATE_LOCATION_PROP_ID are the
-// predefined properties of most interest.
-//--------------------------------------------------------------------------
-
-function CertGetCTLContextProperty(pCtlContext: PCCTL_CONTEXT; dwPropId: DWORD;
- pvData: Pointer; var pcbData: DWORD): BOOL; stdcall;
-{$EXTERNALSYM CertGetCTLContextProperty}
-
-//+-------------------------------------------------------------------------
-// Enumerate the properties for the specified CTL context.
-//--------------------------------------------------------------------------
-
-function CertEnumCTLContextProperties(pCtlContext: PCCTL_CONTEXT; dwPropId: DWORD): DWORD; stdcall;
-{$EXTERNALSYM CertEnumCTLContextProperties}
-
-//+-------------------------------------------------------------------------
-// Enumerate the CTL contexts in the store.
-//
-// If a CTL isn't found, NULL is returned.
-// Otherwise, a pointer to a read only CTL_CONTEXT is returned. CTL_CONTEXT
-// must be freed by calling CertFreeCTLContext or is freed when passed as the
-// pPrevCtlContext on a subsequent call. CertDuplicateCTLContext
-// can be called to make a duplicate.
-//
-// pPrevCtlContext MUST BE NULL to enumerate the first
-// CTL in the store. Successive CTLs are enumerated by setting
-// pPrevCtlContext to the CTL_CONTEXT returned by a previous call.
-//
-// NOTE: a NON-NULL pPrevCtlContext is always CertFreeCTLContext'ed by
-// this function, even for an error.
-//--------------------------------------------------------------------------
-
-function CertEnumCTLsInStore(hCertStore: HCERTSTORE; pPrevCtlContext: PCCTL_CONTEXT): PCCTL_CONTEXT; stdcall;
-{$EXTERNALSYM CertEnumCTLsInStore}
-
-//+-------------------------------------------------------------------------
-// Attempt to find the specified subject in the CTL.
-//
-// For CTL_CERT_SUBJECT_TYPE, pvSubject points to a CERT_CONTEXT. The CTL's
-// SubjectAlgorithm is examined to determine the representation of the
-// subject's identity. Initially, only SHA1 or MD5 hash will be supported.
-// The appropriate hash property is obtained from the CERT_CONTEXT.
-//
-// For CTL_ANY_SUBJECT_TYPE, pvSubject points to the CTL_ANY_SUBJECT_INFO
-// structure which contains the SubjectAlgorithm to be matched in the CTL
-// and the SubjectIdentifer to be matched in one of the CTL entries.
-//
-// The certificate's hash or the CTL_ANY_SUBJECT_INFO's SubjectIdentifier
-// is used as the key in searching the subject entries. A binary
-// memory comparison is done between the key and the entry's SubjectIdentifer.
-//
-// dwEncodingType isn't used for either of the above SubjectTypes.
-//--------------------------------------------------------------------------
-
-function CertFindSubjectInCTL(dwEncodingType: DWORD; dwSubjectType: DWORD;
- pvSubject: Pointer; pCtlContext: PCCTL_CONTEXT; dwFlags: DWORD): PCTL_ENTRY; stdcall;
-{$EXTERNALSYM CertFindSubjectInCTL}
-
-// Subject Types:
-// CTL_ANY_SUBJECT_TYPE, pvSubject points to following CTL_ANY_SUBJECT_INFO.
-// CTL_CERT_SUBJECT_TYPE, pvSubject points to CERT_CONTEXT.
-
-const
- CTL_ANY_SUBJECT_TYPE = 1;
- {$EXTERNALSYM CTL_ANY_SUBJECT_TYPE}
- CTL_CERT_SUBJECT_TYPE = 2;
- {$EXTERNALSYM CTL_CERT_SUBJECT_TYPE}
-
-type
- PCTL_ANY_SUBJECT_INFO = ^CTL_ANY_SUBJECT_INFO;
- {$EXTERNALSYM PCTL_ANY_SUBJECT_INFO}
- _CTL_ANY_SUBJECT_INFO = record
- SubjectAlgorithm: CRYPT_ALGORITHM_IDENTIFIER;
- SubjectIdentifier: CRYPT_DATA_BLOB;
- end;
- {$EXTERNALSYM _CTL_ANY_SUBJECT_INFO}
- CTL_ANY_SUBJECT_INFO = _CTL_ANY_SUBJECT_INFO;
- {$EXTERNALSYM CTL_ANY_SUBJECT_INFO}
- TCtlAnySubjectInfo = CTL_ANY_SUBJECT_INFO;
- PCtlAnySubjectInfo = PCTL_ANY_SUBJECT_INFO;
-
-//+-------------------------------------------------------------------------
-// Find the first or next CTL context in the store.
-//
-// The CTL is found according to the dwFindType and its pvFindPara.
-// See below for a list of the find types and its parameters.
-//
-// Currently dwFindFlags isn't used and must be set to 0.
-//
-// Usage of dwMsgAndCertEncodingType depends on the dwFindType.
-//
-// If the first or next CTL isn't found, NULL is returned.
-// Otherwise, a pointer to a read only CTL_CONTEXT is returned. CTL_CONTEXT
-// must be freed by calling CertFreeCTLContext or is freed when passed as the
-// pPrevCtlContext on a subsequent call. CertDuplicateCTLContext
-// can be called to make a duplicate.
-//
-// pPrevCtlContext MUST BE NULL on the first
-// call to find the CTL. To find the next CTL, the
-// pPrevCtlContext is set to the CTL_CONTEXT returned by a previous call.
-//
-// NOTE: a NON-NULL pPrevCtlContext is always CertFreeCTLContext'ed by
-// this function, even for an error.
-//--------------------------------------------------------------------------
-
-function CertFindCTLInStore(hCertStore: HCERTSTORE; dwMsgAndCertEncodingType,
- dwFindFlags, dwFindType: DWORD; pvFindPara: Pointer;
- pPrevCtlContext: PCCTL_CONTEXT): PCCTL_CONTEXT; stdcall;
-{$EXTERNALSYM CertFindCTLInStore}
-
-const
- CTL_FIND_ANY = 0;
- {$EXTERNALSYM CTL_FIND_ANY}
- CTL_FIND_SHA1_HASH = 1;
- {$EXTERNALSYM CTL_FIND_SHA1_HASH}
- CTL_FIND_MD5_HASH = 2;
- {$EXTERNALSYM CTL_FIND_MD5_HASH}
- CTL_FIND_USAGE = 3;
- {$EXTERNALSYM CTL_FIND_USAGE}
- CTL_FIND_SUBJECT = 4;
- {$EXTERNALSYM CTL_FIND_SUBJECT}
- CTL_FIND_EXISTING = 5;
- {$EXTERNALSYM CTL_FIND_EXISTING}
-
-type
- PCTL_FIND_USAGE_PARA = ^CTL_FIND_USAGE_PARA;
- {$EXTERNALSYM PCTL_FIND_USAGE_PARA}
- _CTL_FIND_USAGE_PARA = record
- cbSize: DWORD;
- SubjectUsage: CTL_USAGE; // optional
- ListIdentifier: CRYPT_DATA_BLOB; // optional
- pSigner: PCERT_INFO; // optional
- end;
- {$EXTERNALSYM _CTL_FIND_USAGE_PARA}
- CTL_FIND_USAGE_PARA = _CTL_FIND_USAGE_PARA;
- {$EXTERNALSYM CTL_FIND_USAGE_PARA}
- TCtlFindUsagePara = CTL_FIND_USAGE_PARA;
- PCtlFindUsagePara = PCTL_FIND_USAGE_PARA;
-
-const
- CTL_FIND_NO_LIST_ID_CBDATA = DWORD($FFFFFFFF);
- {$EXTERNALSYM CTL_FIND_NO_LIST_ID_CBDATA}
- CTL_FIND_NO_SIGNER_PTR = PCERT_INFO(-1);
- {$EXTERNALSYM CTL_FIND_NO_SIGNER_PTR}
-
- CTL_FIND_SAME_USAGE_FLAG = $1;
- {$EXTERNALSYM CTL_FIND_SAME_USAGE_FLAG}
-
-type
- PCTL_FIND_SUBJECT_PARA = ^CTL_FIND_SUBJECT_PARA;
- {$EXTERNALSYM PCTL_FIND_SUBJECT_PARA}
- _CTL_FIND_SUBJECT_PARA = record
- cbSize: DWORD;
- pUsagePara: PCTL_FIND_USAGE_PARA; // optional
- dwSubjectType: DWORD;
- pvSubject: Pointer;
- end;
- {$EXTERNALSYM _CTL_FIND_SUBJECT_PARA}
- CTL_FIND_SUBJECT_PARA = _CTL_FIND_SUBJECT_PARA;
- {$EXTERNALSYM CTL_FIND_SUBJECT_PARA}
- TCtlFindSubjectPara = CTL_FIND_SUBJECT_PARA;
- PCtlFindSubjectPara = PCTL_FIND_SUBJECT_PARA;
-
-//+-------------------------------------------------------------------------
-// CTL_FIND_ANY
-//
-// Find any CTL.
-//
-// pvFindPara isn't used.
-//--------------------------------------------------------------------------
-
-//+-------------------------------------------------------------------------
-// CTL_FIND_SHA1_HASH
-// CTL_FIND_MD5_HASH
-//
-// Find a CTL with the specified hash.
-//
-// pvFindPara points to a CRYPT_HASH_BLOB.
-//--------------------------------------------------------------------------
-
-//+-------------------------------------------------------------------------
-// CTL_FIND_USAGE
-//
-// Find a CTL having the specified usage identifiers, list identifier or
-// signer. The CertEncodingType of the signer is obtained from the
-// dwMsgAndCertEncodingType parameter.
-//
-// pvFindPara points to a CTL_FIND_USAGE_PARA data structure. The
-// SubjectUsage.cUsageIdentifer can be 0 to match any usage. The
-// ListIdentifier.cbData can be 0 to match any list identifier. To only match
-// CTLs without a ListIdentifier, cbData must be set to
-// CTL_FIND_NO_LIST_ID_CBDATA. pSigner can be NULL to match any signer. Only
-// the Issuer and SerialNumber fields of the pSigner's PCERT_INFO are used.
-// To only match CTLs without a signer, pSigner must be set to
-// CTL_FIND_NO_SIGNER_PTR.
-//
-// The CTL_FIND_SAME_USAGE_FLAG can be set in dwFindFlags to
-// only match CTLs with the same usage identifiers. CTLs having additional
-// usage identifiers aren't matched. For example, if only "1.2.3" is specified
-// in CTL_FIND_USAGE_PARA, then, for a match, the CTL must only contain
-// "1.2.3" and not any additional usage identifers.
-//--------------------------------------------------------------------------
-
-//+-------------------------------------------------------------------------
-// CTL_FIND_SUBJECT
-//
-// Find a CTL having the specified subject. CertFindSubjectInCTL can be
-// called to get a pointer to the subject's entry in the CTL. pUsagePara can
-// optionally be set to enable the above CTL_FIND_USAGE matching.
-//
-// pvFindPara points to a CTL_FIND_SUBJECT_PARA data structure.
-//--------------------------------------------------------------------------
-
-//+-------------------------------------------------------------------------
-// Add the encoded CTL to the store according to the specified
-// disposition option.
-//
-// Makes a copy of the encoded CTL before adding to the store.
-//
-// dwAddDispostion specifies the action to take if the CTL
-// already exists in the store. See CertAddEncodedCertificateToStore for a
-// list of and actions taken.
-//
-// Compares the CTL's SubjectUsage, ListIdentifier and any of its signers
-// to determine if the CTL already exists in the store.
-//
-// ppCtlContext can be NULL, indicating the caller isn't interested
-// in getting the CTL_CONTEXT of the added or existing CTL.
-//--------------------------------------------------------------------------
-
-function CertAddEncodedCTLToStore(hCertStore: HCERTSTORE;
- dwMsgAndCertEncodingType: DWORD; pbCtlEncoded: LPBYTE; cbCtlEncoded: DWORD;
- dwAddDisposition: DWORD; ppCtlContext: PPCCTL_CONTEXT): BOOL; stdcall;
-{$EXTERNALSYM CertAddEncodedCTLToStore}
-
-//+-------------------------------------------------------------------------
-// Add the CTL context to the store according to the specified
-// disposition option.
-//
-// In addition to the encoded CTL, the context's properties are
-// also copied. Note, the CERT_KEY_CONTEXT_PROP_ID property (and its
-// CERT_KEY_PROV_HANDLE_PROP_ID or CERT_KEY_SPEC_PROP_ID) isn't copied.
-//
-// Makes a copy of the encoded CTL before adding to the store.
-//
-// dwAddDispostion specifies the action to take if the CTL
-// already exists in the store. See CertAddCertificateContextToStore for a
-// list of and actions taken.
-//
-// Compares the CTL's SubjectUsage, ListIdentifier and any of its signers
-// to determine if the CTL already exists in the store.
-//
-// ppStoreContext can be NULL, indicating the caller isn't interested
-// in getting the CTL_CONTEXT of the added or existing CTL.
-//--------------------------------------------------------------------------
-
-function CertAddCTLContextToStore(hCertStore: HCERTSTORE; pCtlContext: PCCTL_CONTEXT;
- dwAddDisposition: DWORD; ppStoreContext: PPCCTL_CONTEXT): BOOL; stdcall;
-{$EXTERNALSYM CertAddCTLContextToStore}
-
-//+-------------------------------------------------------------------------
-// Serialize the CTL context's encoded CTL and its properties.
-//--------------------------------------------------------------------------
-
-function CertSerializeCTLStoreElement(pCtlContext: PCCTL_CONTEXT; dwFlags: DWORD;
- pbElement: LPBYTE; var pcbElement: DWORD): BOOL; stdcall;
-{$EXTERNALSYM CertSerializeCTLStoreElement}
-
-//+-------------------------------------------------------------------------
-// Delete the specified CTL from the store.
-//
-// All subsequent gets for the CTL will fail. However,
-// memory allocated for the CTL isn't freed until all of its contexts
-// have also been freed.
-//
-// The pCtlContext is obtained from a get or duplicate.
-//
-// NOTE: the pCtlContext is always CertFreeCTLContext'ed by
-// this function, even for an error.
-//--------------------------------------------------------------------------
-
-function CertDeleteCTLFromStore(pCtlContext: PCCTL_CONTEXT): BOOL; stdcall;
-{$EXTERNALSYM CertDeleteCTLFromStore}
-
-function CertAddCertificateLinkToStore(hCertStore: HCERTSTORE;
- pCertContext: PCCERT_CONTEXT; dwAddDisposition: DWORD;
- ppStoreContext: PPCCERT_CONTEXT): BOOL; stdcall;
-{$EXTERNALSYM CertAddCertificateLinkToStore}
-
-function CertAddCRLLinkToStore(hCertStore: HCERTSTORE; pCrlContext: PCCRL_CONTEXT;
- dwAddDisposition: DWORD; ppStoreContext: PPCCRL_CONTEXT): BOOL; stdcall;
-{$EXTERNALSYM CertAddCRLLinkToStore}
-
-function CertAddCTLLinkToStore(hCertStore: HCERTSTORE; pCtlContext: PCCTL_CONTEXT;
- dwAddDisposition: DWORD; ppStoreContext: PPCCTL_CONTEXT): BOOL; stdcall;
-{$EXTERNALSYM CertAddCTLLinkToStore}
-
-function CertAddStoreToCollection(hCollectionStore: HCERTSTORE;
- hSiblingStore: HCERTSTORE; dwUpdateFlags, dwPriority: DWORD): BOOL; stdcall;
-{$EXTERNALSYM CertAddStoreToCollection}
-
-procedure CertRemoveStoreFromCollection(hCollectionStore, hSiblingStore: HCERTSTORE); stdcall;
-{$EXTERNALSYM CertRemoveStoreFromCollection}
-
-function CertControlStore(hCertStore: HCERTSTORE; dwFlags, dwCtrlType: DWORD;
- pvCtrlPara: Pointer): BOOL; stdcall;
-{$EXTERNALSYM CertControlStore}
-
-//+-------------------------------------------------------------------------
-// Certificate Store control types
-//--------------------------------------------------------------------------
-
-const
- CERT_STORE_CTRL_RESYNC = 1;
- {$EXTERNALSYM CERT_STORE_CTRL_RESYNC}
- CERT_STORE_CTRL_NOTIFY_CHANGE = 2;
- {$EXTERNALSYM CERT_STORE_CTRL_NOTIFY_CHANGE}
- CERT_STORE_CTRL_COMMIT = 3;
- {$EXTERNALSYM CERT_STORE_CTRL_COMMIT}
- CERT_STORE_CTRL_AUTO_RESYNC = 4;
- {$EXTERNALSYM CERT_STORE_CTRL_AUTO_RESYNC}
-
-//+-------------------------------------------------------------------------
-// CERT_STORE_CTRL_RESYNC
-//
-// Re-synchronize the store.
-//
-// The pvCtrlPara points to the event HANDLE to be signaled on
-// the next store change. Normally, this would be the same
-// event HANDLE passed to CERT_STORE_CTRL_NOTIFY_CHANGE during initialization.
-//
-// If pvCtrlPara is NULL, no events are re-armed.
-//--------------------------------------------------------------------------
-
-//+-------------------------------------------------------------------------
-// CERT_STORE_CTRL_NOTIFY_CHANGE
-//
-// Signal the event when the underlying store is changed.
-//
-// pvCtrlPara points to the event HANDLE to be signaled.
-//
-// pvCtrlPara can be NULL to inform the store of a subsequent
-// CERT_STORE_CTRL_RESYNC and allow it to optimize by only doing a resync
-// if the store has changed. For the registry based stores, an internal
-// notify change event is created and registered to be signaled.
-//
-// Recommend calling CERT_STORE_CTRL_NOTIFY_CHANGE once for each event to
-// be passed to CERT_STORE_CTRL_RESYNC. This should only happen after
-// the event has been created. Not after each time the event is signaled.
-//--------------------------------------------------------------------------
-
-//+-------------------------------------------------------------------------
-// CERT_STORE_CTRL_AUTO_RESYNC
-//
-// At the start of every enumeration or find store API call, check if the
-// underlying store has changed. If it has changed, re-synchronize.
-//
-// This check is only done in the enumeration or find APIs when the
-// pPrevContext is NULL.
-//
-// The pvCtrlPara isn't used and must be set to NULL.
-//--------------------------------------------------------------------------
-
-//+-------------------------------------------------------------------------
-// CERT_STORE_CTRL_COMMIT
-//
-// If any changes have been to the cached store, they are committed to
-// persisted storage. If no changes have been made since the store was
-// opened or the last commit, this call is ignored. May also be ignored by
-// store providers that persist changes immediately.
-//
-// CERT_STORE_CTRL_COMMIT_FORCE_FLAG can be set to force the store
-// to be committed even if it hasn't been touched.
-//
-// CERT_STORE_CTRL_COMMIT_CLEAR_FLAG can be set to inhibit a commit on
-// store close.
-//--------------------------------------------------------------------------
-
-const
- CERT_STORE_CTRL_COMMIT_FORCE_FLAG = $1;
- {$EXTERNALSYM CERT_STORE_CTRL_COMMIT_FORCE_FLAG}
- CERT_STORE_CTRL_COMMIT_CLEAR_FLAG = $2;
- {$EXTERNALSYM CERT_STORE_CTRL_COMMIT_CLEAR_FLAG}
-
-//+=========================================================================
-// Cert Store Property Defines and APIs
-//==========================================================================
-
-//+-------------------------------------------------------------------------
-// Store property IDs. This is a property applicable to the entire store.
-// Its not a property on an individual certificate, CRL or CTL context.
-//
-// Currently, no store properties are persisted. (This differs from
-// most context properties which are persisted.)
-//
-// See CertSetStoreProperty or CertGetStoreProperty for usage information.
-//
-// Note, the range for predefined store properties should be outside
-// the range of predefined context properties. We will start at 4096.
-//--------------------------------------------------------------------------
-
- CERT_STORE_LOCALIZED_NAME_PROP_ID = $1000;
- {$EXTERNALSYM CERT_STORE_LOCALIZED_NAME_PROP_ID}
-
-//+-------------------------------------------------------------------------
-// Set a store property.
-//
-// The type definition for pvData depends on the dwPropId value.
-// CERT_STORE_LOCALIZED_NAME_PROP_ID - localized name of the store.
-// pvData points to a CRYPT_DATA_BLOB. pbData is a pointer to a NULL
-// terminated unicode, wide character string.
-// cbData = (wcslen((LPWSTR) pbData) + 1) * sizeof(WCHAR).
-//
-// For all the other PROP_IDs: an encoded PCRYPT_DATA_BLOB is passed in pvData.
-//
-// If the property already exists, then, the old value is deleted and silently
-// replaced. Setting, pvData to NULL, deletes the property.
-//--------------------------------------------------------------------------
-
-function CertSetStoreProperty(hCertStore: HCERTSTORE; dwPropId, dwFlags: DWORD;
- pvData: Pointer): BOOL; stdcall;
-{$EXTERNALSYM CertSetStoreProperty}
-
-//+-------------------------------------------------------------------------
-// Get a store property.
-//
-// The type definition for pvData depends on the dwPropId value.
-// CERT_STORE_LOCALIZED_NAME_PROP_ID - localized name of the store.
-// pvData points to a NULL terminated unicode, wide character string.
-// cbData = (wcslen((LPWSTR) pvData) + 1) * sizeof(WCHAR).
-//
-// For all other PROP_IDs, pvData points to an array of bytes.
-//
-// If the property doesn't exist, returns FALSE and sets LastError to
-// CRYPT_E_NOT_FOUND.
-//--------------------------------------------------------------------------
-
-function CertGetStoreProperty(hCertStore: HCERTSTORE; dwPropId: DWORD;
- pvData: Pointer; var pcbData: DWORD): BOOL; stdcall;
-{$EXTERNALSYM CertGetStoreProperty}
-
-type
- PCERT_CREATE_CONTEXT_PARA = ^CERT_CREATE_CONTEXT_PARA;
- {$EXTERNALSYM PCERT_CREATE_CONTEXT_PARA}
- _CERT_CREATE_CONTEXT_PARA = record
- cbSize: DWORD;
- pfnFree: PFN_CRYPT_FREE; // OPTIONAL
- pvFree: Pointer; // OPTIONAL
- end;
- {$EXTERNALSYM _CERT_CREATE_CONTEXT_PARA}
- CERT_CREATE_CONTEXT_PARA = _CERT_CREATE_CONTEXT_PARA;
- {$EXTERNALSYM CERT_CREATE_CONTEXT_PARA}
- TCertCreateContextPara = CERT_CREATE_CONTEXT_PARA;
- PCertCreateContextPara = PCERT_CREATE_CONTEXT_PARA;
-
-//+-------------------------------------------------------------------------
-// Creates the specified context from the encoded bytes. The created
-// context isn't put in a store.
-//
-// dwContextType values:
-// CERT_STORE_CERTIFICATE_CONTEXT
-// CERT_STORE_CRL_CONTEXT
-// CERT_STORE_CTL_CONTEXT
-//
-// If CERT_CREATE_CONTEXT_NOCOPY_FLAG is set, the created context points
-// directly to the pbEncoded instead of an allocated copy. See flag
-// definition for more details.
-//
-// If CERT_CREATE_CONTEXT_SORTED_FLAG is set, the context is created
-// with sorted entries. This flag may only be set for CERT_STORE_CTL_CONTEXT.
-// Setting this flag implicitly sets CERT_CREATE_CONTEXT_NO_HCRYPTMSG_FLAG and
-// CERT_CREATE_CONTEXT_NO_ENTRY_FLAG. See flag definition for
-// more details.
-//
-// If CERT_CREATE_CONTEXT_NO_HCRYPTMSG_FLAG is set, the context is created
-// without creating a HCRYPTMSG handle for the context. This flag may only be
-// set for CERT_STORE_CTL_CONTEXT. See flag definition for more details.
-//
-// If CERT_CREATE_CONTEXT_NO_ENTRY_FLAG is set, the context is created
-// without decoding the entries. This flag may only be set for
-// CERT_STORE_CTL_CONTEXT. See flag definition for more details.
-//
-// If unable to decode and create the context, NULL is returned.
-// Otherwise, a pointer to a read only CERT_CONTEXT, CRL_CONTEXT or
-// CTL_CONTEXT is returned. The context must be freed by the appropriate
-// free context API. The context can be duplicated by calling the
-// appropriate duplicate context API.
-//--------------------------------------------------------------------------
-
-function CertCreateContext(dwContextType, dwEncodingType: DWORD;
- pbEncoded: LPBYTE; cbEncoded, dwFlags: DWORD;
- pCreatePara: PCERT_CREATE_CONTEXT_PARA): Pointer; stdcall;
-{$EXTERNALSYM CertCreateContext}
-
-// When the following flag is set, the created context points directly to the
-// pbEncoded instead of an allocated copy. If pCreatePara and
-// pCreatePara->pfnFree are non-NULL, then, pfnFree is called to free
-// the pbEncoded when the context is last freed. Otherwise, no attempt is
-// made to free the pbEncoded. If pCreatePara->pvFree is non-NULL, then its
-// passed to pfnFree instead of pbEncoded.
-//
-// Note, if CertCreateContext fails, pfnFree is still called.
-
-const
- CERT_CREATE_CONTEXT_NOCOPY_FLAG = $1;
- {$EXTERNALSYM CERT_CREATE_CONTEXT_NOCOPY_FLAG}
-
-// When the following flag is set, a context with sorted entries is created.
-// Currently only applicable to a CTL context.
-//
-// For CTLs: the cCTLEntry in the returned CTL_INFO is always
-// 0. CertFindSubjectInSortedCTL and CertEnumSubjectInSortedCTL must be called
-// to find or enumerate the CTL entries.
-//
-// The Sorted CTL TrustedSubjects extension isn't returned in the created
-// context's CTL_INFO.
-
- CERT_CREATE_CONTEXT_SORTED_FLAG = $2;
- {$EXTERNALSYM CERT_CREATE_CONTEXT_SORTED_FLAG}
-
-// By default when a CTL context is created, a HCRYPTMSG handle to its
-// SignedData message is created. This flag can be set to improve performance
-// by not creating the HCRYPTMSG handle.
-//
-// This flag is only applicable to a CTL context.
-
- CERT_CREATE_CONTEXT_NO_HCRYPTMSG_FLAG = $4;
- {$EXTERNALSYM CERT_CREATE_CONTEXT_NO_HCRYPTMSG_FLAG}
-
-// By default when a CTL context is created, its entries are decoded.
-// This flag can be set to improve performance by not decoding the
-// entries.
-//
-// This flag is only applicable to a CTL context.
-
- CERT_CREATE_CONTEXT_NO_ENTRY_FLAG = $8;
- {$EXTERNALSYM CERT_CREATE_CONTEXT_NO_ENTRY_FLAG}
-
-//+=========================================================================
-// Certificate System Store Data Structures and APIs
-//==========================================================================
-
-//+-------------------------------------------------------------------------
-// System Store Information
-//
-// Currently, no system store information is persisted.
-//--------------------------------------------------------------------------
-
-type
- PCERT_SYSTEM_STORE_INFO = ^CERT_SYSTEM_STORE_INFO;
- {$EXTERNALSYM PCERT_SYSTEM_STORE_INFO}
- _CERT_SYSTEM_STORE_INFO = record
- cbSize: DWORD;
- end;
- {$EXTERNALSYM _CERT_SYSTEM_STORE_INFO}
- CERT_SYSTEM_STORE_INFO = _CERT_SYSTEM_STORE_INFO;
- {$EXTERNALSYM CERT_SYSTEM_STORE_INFO}
- TCertSystemStoreInfo = CERT_SYSTEM_STORE_INFO;
- PCertSystemStoreInfo = PCERT_SYSTEM_STORE_INFO;
-
-//+-------------------------------------------------------------------------
-// Physical Store Information
-//
-// The Open fields are passed directly to CertOpenStore() to open
-// the physical store.
-//
-// By default all system stores located in the registry have an
-// implicit SystemRegistry physical store that is opened. To disable the
-// opening of this store, the SystemRegistry
-// physical store corresponding to the System store must be registered with
-// CERT_PHYSICAL_STORE_OPEN_DISABLE_FLAG set in dwFlags. Alternatively,
-// a physical store with the name of ".Default" may be registered.
-//
-// Depending on the store location and store name, additional predefined
-// physical stores may be opened. For example, system stores in
-// CURRENT_USER have the predefined physical store, .LocalMachine.
-// To disable the opening of these predefined physical stores, the
-// corresponding physical store must be registered with
-// CERT_PHYSICAL_STORE_OPEN_DISABLE_FLAG set in dwFlags.
-//
-// The CERT_PHYSICAL_STORE_ADD_ENABLE_FLAG must be set in dwFlags
-// to enable the adding of a context to the store.
-//
-// When a system store is opened via the SERVICES or USERS store location,
-// the ServiceName\ is prepended to the OpenParameters
-// for CERT_SYSTEM_STORE_CURRENT_USER or CERT_SYSTEM_STORE_CURRENT_SERVICE
-// physical stores and the dwOpenFlags store location is changed to
-// CERT_SYSTEM_STORE_USERS or CERT_SYSTEM_STORE_SERVICES.
-//
-// By default the SYSTEM, SYSTEM_REGISTRY and PHYSICAL provider
-// stores are also opened remotely when the outer system store is opened.
-// The CERT_PHYSICAL_STORE_REMOTE_OPEN_DISABLE_FLAG may be set in dwFlags
-// to disable remote opens.
-//
-// When opened remotely, the \\ComputerName is implicitly prepended to the
-// OpenParameters for the SYSTEM, SYSTEM_REGISTRY and PHYSICAL provider types.
-// To also prepend the \\ComputerName to other provider types, set the
-// CERT_PHYSICAL_STORE_INSERT_COMPUTER_NAME_ENABLE_FLAG in dwFlags.
-//
-// When the system store is opened, its physical stores are ordered
-// according to the dwPriority. A larger dwPriority indicates higher priority.
-//--------------------------------------------------------------------------
-
-type
- PCERT_PHYSICAL_STORE_INFO = ^CERT_PHYSICAL_STORE_INFO;
- {$EXTERNALSYM PCERT_PHYSICAL_STORE_INFO}
- _CERT_PHYSICAL_STORE_INFO = record
- cbSize: DWORD;
- pszOpenStoreProvider: LPSTR; // REG_SZ
- dwOpenEncodingType: DWORD; // REG_DWORD
- dwOpenFlags: DWORD; // REG_DWORD
- OpenParameters: CRYPT_DATA_BLOB; // REG_BINARY
- dwFlags: DWORD; // REG_DWORD
- dwPriority: DWORD; // REG_DWORD
- end;
- {$EXTERNALSYM _CERT_PHYSICAL_STORE_INFO}
- CERT_PHYSICAL_STORE_INFO = _CERT_PHYSICAL_STORE_INFO;
- {$EXTERNALSYM CERT_PHYSICAL_STORE_INFO}
- TCertPhysicalStoreInfo = CERT_PHYSICAL_STORE_INFO;
- PCertPhysicalStoreInfo = PCERT_PHYSICAL_STORE_INFO;
-
-//+-------------------------------------------------------------------------
-// Physical Store Information dwFlags
-//--------------------------------------------------------------------------
-
-const
- CERT_PHYSICAL_STORE_ADD_ENABLE_FLAG = $1;
- {$EXTERNALSYM CERT_PHYSICAL_STORE_ADD_ENABLE_FLAG}
- CERT_PHYSICAL_STORE_OPEN_DISABLE_FLAG = $2;
- {$EXTERNALSYM CERT_PHYSICAL_STORE_OPEN_DISABLE_FLAG}
- CERT_PHYSICAL_STORE_REMOTE_OPEN_DISABLE_FLAG = $4;
- {$EXTERNALSYM CERT_PHYSICAL_STORE_REMOTE_OPEN_DISABLE_FLAG}
- CERT_PHYSICAL_STORE_INSERT_COMPUTER_NAME_ENABLE_FLAG = $8;
- {$EXTERNALSYM CERT_PHYSICAL_STORE_INSERT_COMPUTER_NAME_ENABLE_FLAG}
-
-//+-------------------------------------------------------------------------
-// Register a system store.
-//
-// The upper word of the dwFlags parameter is used to specify the location of
-// the system store.
-//
-// If CERT_SYSTEM_STORE_RELOCATE_FLAG is set in dwFlags, pvSystemStore
-// points to a CERT_SYSTEM_STORE_RELOCATE_PARA data structure. Otherwise,
-// pvSystemStore points to a null terminated UNICODE string.
-//
-// The CERT_SYSTEM_STORE_SERVICES or CERT_SYSTEM_STORE_USERS system store
-// name must be prefixed with the ServiceName or UserName. For example,
-// "ServiceName\Trust".
-//
-// Stores on remote computers can be registered for the
-// CERT_SYSTEM_STORE_LOCAL_MACHINE, CERT_SYSTEM_STORE_SERVICES,
-// CERT_SYSTEM_STORE_USERS, CERT_SYSTEM_STORE_LOCAL_MACHINE_GROUP_POLICY
-// or CERT_SYSTEM_STORE_LOCAL_MACHINE_ENTERPRISE
-// locations by prepending the computer name. For example, a remote
-// local machine store is registered via "\\ComputerName\Trust" or
-// "ComputerName\Trust". A remote service store is registered via
-// "\\ComputerName\ServiceName\Trust". The leading "\\" backslashes are
-// optional in the ComputerName.
-//
-// Set CERT_STORE_CREATE_NEW_FLAG to cause a failure if the system store
-// already exists in the store location.
-//--------------------------------------------------------------------------
-
-function CertRegisterSystemStore(pvSystemStore: Pointer; dwFlags: DWORD;
- pStoreInfo: PCERT_SYSTEM_STORE_INFO; pvReserved: Pointer): BOOL; stdcall;
-{$EXTERNALSYM CertRegisterSystemStore}
-
-//+-------------------------------------------------------------------------
-// Register a physical store for the specified system store.
-//
-// The upper word of the dwFlags parameter is used to specify the location of
-// the system store.
-//
-// If CERT_SYSTEM_STORE_RELOCATE_FLAG is set in dwFlags, pvSystemStore
-// points to a CERT_SYSTEM_STORE_RELOCATE_PARA data structure. Otherwise,
-// pvSystemStore points to a null terminated UNICODE string.
-//
-// See CertRegisterSystemStore for details on prepending a ServiceName
-// and/or ComputerName to the system store name.
-//
-// Set CERT_STORE_CREATE_NEW_FLAG to cause a failure if the physical store
-// already exists in the system store.
-//--------------------------------------------------------------------------
-
-function CertRegisterPhysicalStore(pvSystemStore: Pointer; dwFlags: DWORD;
- pwszStoreName: LPCWSTR; pStoreInfo: PCERT_PHYSICAL_STORE_INFO;
- pvReserved: Pointer): BOOL; stdcall;
-{$EXTERNALSYM CertRegisterPhysicalStore}
-
-//+-------------------------------------------------------------------------
-// Unregister the specified system store.
-//
-// The upper word of the dwFlags parameter is used to specify the location of
-// the system store.
-//
-// If CERT_SYSTEM_STORE_RELOCATE_FLAG is set in dwFlags, pvSystemStore
-// points to a CERT_SYSTEM_STORE_RELOCATE_PARA data structure. Otherwise,
-// pvSystemStore points to a null terminated UNICODE string.
-//
-// See CertRegisterSystemStore for details on prepending a ServiceName
-// and/or ComputerName to the system store name.
-//
-// CERT_STORE_DELETE_FLAG can optionally be set in dwFlags.
-//--------------------------------------------------------------------------
-
-function CertUnregisterSystemStore(pvSystemStore: Pointer; dwFlags: DWORD): BOOL; stdcall;
-{$EXTERNALSYM CertUnregisterSystemStore}
-
-//+-------------------------------------------------------------------------
-// Unregister the physical store from the specified system store.
-//
-// The upper word of the dwFlags parameter is used to specify the location of
-// the system store.
-//
-// If CERT_SYSTEM_STORE_RELOCATE_FLAG is set in dwFlags, pvSystemStore
-// points to a CERT_SYSTEM_STORE_RELOCATE_PARA data structure. Otherwise,
-// pvSystemStore points to a null terminated UNICODE string.
-//
-// See CertRegisterSystemStore for details on prepending a ServiceName
-// and/or ComputerName to the system store name.
-//
-// CERT_STORE_DELETE_FLAG can optionally be set in dwFlags.
-//--------------------------------------------------------------------------
-
-function CertUnregisterPhysicalStore(pvSystemStore: Pointer; dwFlags: DWORD;
- pwszStoreName: LPCWSTR): BOOL; stdcall;
-{$EXTERNALSYM CertUnregisterPhysicalStore}
-
-//+-------------------------------------------------------------------------
-// Enum callbacks
-//
-// The CERT_SYSTEM_STORE_LOCATION_MASK bits in the dwFlags parameter
-// specifies the location of the system store
-//
-// If CERT_SYSTEM_STORE_RELOCATE_FLAG is set in dwFlags, pvSystemStore
-// points to a CERT_SYSTEM_STORE_RELOCATE_PARA data structure. Otherwise,
-// pvSystemStore points to a null terminated UNICODE string.
-//
-// The callback returns FALSE and sets LAST_ERROR to stop the enumeration.
-// The LAST_ERROR is returned to the caller of the enumeration.
-//
-// The pvSystemStore passed to the callback has leading ComputerName and/or
-// ServiceName prefixes where appropriate.
-//--------------------------------------------------------------------------
-
-type
- PFN_CERT_ENUM_SYSTEM_STORE_LOCATION = function(pwszStoreLocation: LPCWSTR;
- dwFlags: DWORD; pvReserved: Pointer; pvArg: Pointer): BOOL; stdcall;
- {$EXTERNALSYM PFN_CERT_ENUM_SYSTEM_STORE_LOCATION}
- PfnCertEnumSystemStoreLocation = PFN_CERT_ENUM_SYSTEM_STORE_LOCATION;
-
- PFN_CERT_ENUM_SYSTEM_STORE = function(pvSystemStore: Pointer;
- dwFlags: DWORD; pStoreInfo: PCERT_SYSTEM_STORE_INFO; pvReserved: Pointer;
- pvArg: Pointer): BOOL; stdcall;
- {$EXTERNALSYM PFN_CERT_ENUM_SYSTEM_STORE}
- PfnCertEnumSystemStore = PFN_CERT_ENUM_SYSTEM_STORE;
-
- PFN_CERT_ENUM_PHYSICAL_STORE = function(pvSystemStore: Pointer;
- dwFlags: DWORD; pwszStoreName: LPCWSTR; pStoreInfo: PCERT_PHYSICAL_STORE_INFO;
- pvReserved: Pointer; pvArg: Pointer): BOOL; stdcall;
- {$EXTERNALSYM PFN_CERT_ENUM_PHYSICAL_STORE}
- PfnCertEnumPhysicalStore = PFN_CERT_ENUM_PHYSICAL_STORE;
-
-// In the PFN_CERT_ENUM_PHYSICAL_STORE callback the following flag is
-// set if the physical store wasn't registered and is an implicitly created
-// predefined physical store.
-
-const
- CERT_PHYSICAL_STORE_PREDEFINED_ENUM_FLAG = $1;
- {$EXTERNALSYM CERT_PHYSICAL_STORE_PREDEFINED_ENUM_FLAG}
-
-// Names of implicitly created predefined physical stores
-
- CERT_PHYSICAL_STORE_DEFAULT_NAME = '.Default';
- {$EXTERNALSYM CERT_PHYSICAL_STORE_DEFAULT_NAME}
- CERT_PHYSICAL_STORE_GROUP_POLICY_NAME = '.GroupPolicy';
- {$EXTERNALSYM CERT_PHYSICAL_STORE_GROUP_POLICY_NAME}
- CERT_PHYSICAL_STORE_LOCAL_MACHINE_NAME = '.LocalMachine';
- {$EXTERNALSYM CERT_PHYSICAL_STORE_LOCAL_MACHINE_NAME}
- CERT_PHYSICAL_STORE_DS_USER_CERTIFICATE_NAME = '.UserCertificate';
- {$EXTERNALSYM CERT_PHYSICAL_STORE_DS_USER_CERTIFICATE_NAME}
- CERT_PHYSICAL_STORE_LOCAL_MACHINE_GROUP_POLICY_NAME = '.LocalMachineGroupPolicy';
- {$EXTERNALSYM CERT_PHYSICAL_STORE_LOCAL_MACHINE_GROUP_POLICY_NAME}
- CERT_PHYSICAL_STORE_ENTERPRISE_NAME = '.Enterprise';
- {$EXTERNALSYM CERT_PHYSICAL_STORE_ENTERPRISE_NAME}
-
-//+-------------------------------------------------------------------------
-// Enumerate the system store locations.
-//--------------------------------------------------------------------------
-
-function CertEnumSystemStoreLocation(dwFlags: DWORD; pvArg: Pointer;
- pfnEnum: PFN_CERT_ENUM_SYSTEM_STORE_LOCATION): BOOL; stdcall;
-{$EXTERNALSYM CertEnumSystemStoreLocation}
-
-//+-------------------------------------------------------------------------
-// Enumerate the system stores.
-//
-// The upper word of the dwFlags parameter is used to specify the location of
-// the system store.
-//
-// If CERT_SYSTEM_STORE_RELOCATE_FLAG is set in dwFlags,
-// pvSystemStoreLocationPara points to a CERT_SYSTEM_STORE_RELOCATE_PARA
-// data structure. Otherwise, pvSystemStoreLocationPara points to a null
-// terminated UNICODE string.
-//
-// For CERT_SYSTEM_STORE_LOCAL_MACHINE,
-// CERT_SYSTEM_STORE_LOCAL_MACHINE_GROUP_POLICY or
-// CERT_SYSTEM_STORE_LOCAL_MACHINE_ENTERPRISE, pvSystemStoreLocationPara can
-// optionally be set to a unicode computer name for enumerating local machine
-// stores on a remote computer. For example, "\\ComputerName" or
-// "ComputerName". The leading "\\" backslashes are optional in the
-// ComputerName.
-//
-// For CERT_SYSTEM_STORE_SERVICES or CERT_SYSTEM_STORE_USERS,
-// if pvSystemStoreLocationPara is NULL, then,
-// enumerates both the service/user names and the stores for each service/user
-// name. Otherwise, pvSystemStoreLocationPara is a unicode string specifying a
-// remote computer name and/or service/user name. For example:
-// "ServiceName"
-// "\\ComputerName" or "ComputerName\"
-// "ComputerName\ServiceName"
-// Note, if only the ComputerName is specified, then, it must have either
-// the leading "\\" backslashes or a trailing backslash. Otherwise, its
-// interpretted as the ServiceName or UserName.
-//--------------------------------------------------------------------------
-
-function CertEnumSystemStore(dwFlags: DWORD; pvSystemStoreLocationPara: Pointer;
- pvArg: Pointer; pfnEnum: PFN_CERT_ENUM_SYSTEM_STORE): BOOL; stdcall;
-{$EXTERNALSYM CertEnumSystemStore}
-
-//+-------------------------------------------------------------------------
-// Enumerate the physical stores for the specified system store.
-//
-// The upper word of the dwFlags parameter is used to specify the location of
-// the system store.
-//
-// If CERT_SYSTEM_STORE_RELOCATE_FLAG is set in dwFlags, pvSystemStore
-// points to a CERT_SYSTEM_STORE_RELOCATE_PARA data structure. Otherwise,
-// pvSystemStore points to a null terminated UNICODE string.
-//
-// See CertRegisterSystemStore for details on prepending a ServiceName
-// and/or ComputerName to the system store name.
-//
-// If the system store location only supports system stores and doesn't
-// support physical stores, LastError is set to ERROR_CALL_NOT_IMPLEMENTED.
-//--------------------------------------------------------------------------
-
-function CertEnumPhysicalStore(pvSystemStore: Pointer; dwFlags: DWORD;
- pvArg: Pointer; pfnEnum: PFN_CERT_ENUM_PHYSICAL_STORE): BOOL; stdcall;
-{$EXTERNALSYM CertEnumPhysicalStore}
-
-//+-------------------------------------------------------------------------
-// Certificate System Store Installable Functions
-//
-// The CERT_SYSTEM_STORE_LOCATION_MASK bits in the dwFlags parameter passed
-// to the CertOpenStore(for "System", "SystemRegistry" or "Physical"
-// Provider), CertRegisterSystemStore,
-// CertUnregisterSystemStore, CertEnumSystemStore, CertRegisterPhysicalStore,
-// CertUnregisterPhysicalStore and CertEnumPhysicalStore APIs is used as the
-// constant pszOID value passed to the OID installable functions.
-// Therefore, the pszOID is restricted to a constant <= (LPCSTR) 0x0FFF.
-//
-// The EncodingType is 0.
-//--------------------------------------------------------------------------
-
-// Installable System Store Provider OID pszFuncNames.
-
-const
- CRYPT_OID_OPEN_SYSTEM_STORE_PROV_FUNC = 'CertDllOpenSystemStoreProv';
- {$EXTERNALSYM CRYPT_OID_OPEN_SYSTEM_STORE_PROV_FUNC}
- CRYPT_OID_REGISTER_SYSTEM_STORE_FUNC = 'CertDllRegisterSystemStore';
- {$EXTERNALSYM CRYPT_OID_REGISTER_SYSTEM_STORE_FUNC}
- CRYPT_OID_UNREGISTER_SYSTEM_STORE_FUNC = 'CertDllUnregisterSystemStore';
- {$EXTERNALSYM CRYPT_OID_UNREGISTER_SYSTEM_STORE_FUNC}
- CRYPT_OID_ENUM_SYSTEM_STORE_FUNC = 'CertDllEnumSystemStore';
- {$EXTERNALSYM CRYPT_OID_ENUM_SYSTEM_STORE_FUNC}
- CRYPT_OID_REGISTER_PHYSICAL_STORE_FUNC = 'CertDllRegisterPhysicalStore';
- {$EXTERNALSYM CRYPT_OID_REGISTER_PHYSICAL_STORE_FUNC}
- CRYPT_OID_UNREGISTER_PHYSICAL_STORE_FUNC = 'CertDllUnregisterPhysicalStore';
- {$EXTERNALSYM CRYPT_OID_UNREGISTER_PHYSICAL_STORE_FUNC}
- CRYPT_OID_ENUM_PHYSICAL_STORE_FUNC = 'CertDllEnumPhysicalStore';
- {$EXTERNALSYM CRYPT_OID_ENUM_PHYSICAL_STORE_FUNC}
-
-// CertDllOpenSystemStoreProv has the same function signature as the
-// installable "CertDllOpenStoreProv" function. See CertOpenStore for
-// more details.
-
-// CertDllRegisterSystemStore has the same function signature as
-// CertRegisterSystemStore.
-//
-// The "SystemStoreLocation" REG_SZ value must also be set for registered
-// CertDllEnumSystemStore OID functions.
-
- CRYPT_OID_SYSTEM_STORE_LOCATION_VALUE_NAME = 'SystemStoreLocation';
- {$EXTERNALSYM CRYPT_OID_SYSTEM_STORE_LOCATION_VALUE_NAME}
-
-// The remaining Register, Enum and Unregister OID installable functions
-// have the same signature as their Cert Store API counterpart.
-
-//+=========================================================================
-// Enhanced Key Usage Helper Functions
-//==========================================================================
-
-//+-------------------------------------------------------------------------
-// Get the enhanced key usage extension or property from the certificate
-// and decode.
-//
-// If the CERT_FIND_EXT_ONLY_ENHKEY_USAGE_FLAG is set, then, only get the
-// extension.
-//
-// If the CERT_FIND_PROP_ONLY_ENHKEY_USAGE_FLAG is set, then, only get the
-// property.
-//--------------------------------------------------------------------------
-
-function CertGetEnhancedKeyUsage(pCertContext: PCCERT_CONTEXT; dwFlags: DWORD;
- pUsage: PCERT_ENHKEY_USAGE; var pcbUsage: DWORD): BOOL; stdcall;
-{$EXTERNALSYM CertGetEnhancedKeyUsage}
-
-//+-------------------------------------------------------------------------
-// Set the enhanced key usage property for the certificate.
-//--------------------------------------------------------------------------
-
-function CertSetEnhancedKeyUsage(pCertContext: PCCERT_CONTEXT;
- pUsage: PCERT_ENHKEY_USAGE): BOOL; stdcall;
-{$EXTERNALSYM CertSetEnhancedKeyUsage}
-
-//+-------------------------------------------------------------------------
-// Add the usage identifier to the certificate's enhanced key usage property.
-//--------------------------------------------------------------------------
-
-function CertAddEnhancedKeyUsageIdentifier(pCertContext: PCCERT_CONTEXT;
- pszUsageIdentifier: LPCSTR): BOOL; stdcall;
-{$EXTERNALSYM CertAddEnhancedKeyUsageIdentifier}
-
-//+-------------------------------------------------------------------------
-// Remove the usage identifier from the certificate's enhanced key usage
-// property.
-//--------------------------------------------------------------------------
-
-function CertRemoveEnhancedKeyUsageIdentifier(pCertContext: PCCERT_CONTEXT;
- pszUsageIdentifier: LPCSTR): BOOL; stdcall;
-{$EXTERNALSYM CertRemoveEnhancedKeyUsageIdentifier}
-
-//+---------------------------------------------------------------------------
-//
-//
-// Takes an array of certs and returns an array of usages
-// which consists of the intersection of the valid usages for each cert.
-// If each cert is good for all possible usages then the cNumOIDs is set to -1.
-//
-//----------------------------------------------------------------------------
-
-function CertGetValidUsages(cCerts: DWORD; rghCerts: PCCERT_CONTEXT;
- var cNumOIDs: Integer; rghOIDs: LPLPSTR; var pcbOIDs: DWORD): BOOL; stdcall;
-{$EXTERNALSYM CertGetValidUsages}
-
-//+=========================================================================
-// Cryptographic Message helper functions for verifying and signing a
-// CTL.
-//==========================================================================
-
-//+-------------------------------------------------------------------------
-// Get and verify the signer of a cryptographic message.
-//
-// To verify a CTL, the hCryptMsg is obtained from the CTL_CONTEXT's
-// hCryptMsg field.
-//
-// If CMSG_TRUSTED_SIGNER_FLAG is set, then, treat the Signer stores as being
-// trusted and only search them to find the certificate corresponding to the
-// signer's issuer and serial number. Otherwise, the SignerStores are
-// optionally provided to supplement the message's store of certificates.
-// If a signer certificate is found, its public key is used to verify
-// the message signature. The CMSG_SIGNER_ONLY_FLAG can be set to
-// return the signer without doing the signature verify.
-//
-// If CMSG_USE_SIGNER_INDEX_FLAG is set, then, only get the signer specified
-// by *pdwSignerIndex. Otherwise, iterate through all the signers
-// until a signer verifies or no more signers.
-//
-// For a verified signature, *ppSigner is updated with certificate context
-// of the signer and *pdwSignerIndex is updated with the index of the signer.
-// ppSigner and/or pdwSignerIndex can be NULL, indicating the caller isn't
-// interested in getting the CertContext and/or index of the signer.
-//--------------------------------------------------------------------------
-
-function CryptMsgGetAndVerifySigner(hCryptMsg: HCRYPTMSG; cSignerStore: DWORD;
- rghSignerStore: PHCERTSTORE; dwFlags: DWORD; ppSigner: PPCCERT_CONTEXT;
- pdwSignerIndex: LPDWORD): BOOL; stdcall;
-{$EXTERNALSYM CryptMsgGetAndVerifySigner}
-
-const
- CMSG_TRUSTED_SIGNER_FLAG = $1;
- {$EXTERNALSYM CMSG_TRUSTED_SIGNER_FLAG}
- CMSG_SIGNER_ONLY_FLAG = $2;
- {$EXTERNALSYM CMSG_SIGNER_ONLY_FLAG}
- CMSG_USE_SIGNER_INDEX_FLAG = $4;
- {$EXTERNALSYM CMSG_USE_SIGNER_INDEX_FLAG}
-
-//+-------------------------------------------------------------------------
-// Sign an encoded CTL.
-//
-// The pbCtlContent can be obtained via a CTL_CONTEXT's pbCtlContent
-// field or via a CryptEncodeObject(PKCS_CTL or PKCS_SORTED_CTL).
-//
-// CMSG_CMS_ENCAPSULATED_CTL_FLAG can be set to encode a CMS compatible
-// V3 SignedData message.
-//--------------------------------------------------------------------------
-
-function CryptMsgSignCTL(dwMsgEncodingType: DWORD; pbCtlContent: LPBYTE;
- cbCtlContent: DWORD; pSignInfo: PCMSG_SIGNED_ENCODE_INFO; dwFlags: DWORD;
- pbEncoded: LPBYTE; var pcbEncoded: DWORD): BOOL; stdcall;
-{$EXTERNALSYM CryptMsgSignCTL}
-
-// When set, CTL inner content is encapsulated within an OCTET STRING
-
-const
- CMSG_CMS_ENCAPSULATED_CTL_FLAG = $00008000;
- {$EXTERNALSYM CMSG_CMS_ENCAPSULATED_CTL_FLAG}
-
-//+-------------------------------------------------------------------------
-// Encode the CTL and create a signed message containing the encoded CTL.
-//
-// Set CMSG_ENCODE_SORTED_CTL_FLAG if the CTL entries are to be sorted
-// before encoding. This flag should be set, if the
-// CertFindSubjectInSortedCTL or CertEnumSubjectInSortedCTL APIs will
-// be called. If the identifier for the CTL entries is a hash, such as,
-// MD5 or SHA1, then, CMSG_ENCODE_HASHED_SUBJECT_IDENTIFIER_FLAG should
-// also be set.
-//
-// CMSG_CMS_ENCAPSULATED_CTL_FLAG can be set to encode a CMS compatible
-// V3 SignedData message.
-//--------------------------------------------------------------------------
-
-function CryptMsgEncodeAndSignCTL(dwMsgEncodingType: DWORD; pCtlInfo: PCTL_INFO;
- pSignInfo: PCMSG_SIGNED_ENCODE_INFO; dwFlags: DWORD; pbEncoded: LPBYTE;
- var pcbEncoded: DWORD): BOOL; stdcall;
-{$EXTERNALSYM CryptMsgEncodeAndSignCTL}
-
-// The following flag is set if the CTL is to be encoded with sorted
-// trusted subjects and the szOID_SORTED_CTL extension is inserted containing
-// sorted offsets to the encoded subjects.
-
-const
- CMSG_ENCODE_SORTED_CTL_FLAG = $1;
- {$EXTERNALSYM CMSG_ENCODE_SORTED_CTL_FLAG}
-
-// If the above sorted flag is set, then, the following flag should also
-// be set if the identifier for the TrustedSubjects is a hash,
-// such as, MD5 or SHA1.
-
- CMSG_ENCODE_HASHED_SUBJECT_IDENTIFIER_FLAG = $2;
- {$EXTERNALSYM CMSG_ENCODE_HASHED_SUBJECT_IDENTIFIER_FLAG}
-
-//+-------------------------------------------------------------------------
-// Returns TRUE if the SubjectIdentifier exists in the CTL. Optionally
-// returns a pointer to and byte count of the Subject's encoded attributes.
-//--------------------------------------------------------------------------
-
-function CertFindSubjectInSortedCTL(pSubjectIdentifier: PCRYPT_DATA_BLOB;
- pCtlContext: PCCTL_CONTEXT; dwFlags: DWORD; pvReserved: Pointer;
- pEncodedAttributes: PCRYPT_DER_BLOB): BOOL; stdcall;
-{$EXTERNALSYM CertFindSubjectInSortedCTL}
-
-//+-------------------------------------------------------------------------
-// Enumerates through the sequence of TrustedSubjects in a CTL context
-// created with CERT_CREATE_CONTEXT_SORTED_FLAG set.
-//
-// To start the enumeration, *ppvNextSubject must be NULL. Upon return,
-// *ppvNextSubject is updated to point to the next TrustedSubject in
-// the encoded sequence.
-//
-// Returns FALSE for no more subjects or invalid arguments.
-//
-// Note, the returned DER_BLOBs point directly into the encoded
-// bytes (not allocated, and must not be freed).
-//--------------------------------------------------------------------------
-
-function CertEnumSubjectInSortedCTL(pCtlContext: PCCTL_CONTEXT;
- var ppvNextSubject: Pointer; pSubjectIdentifier: PCRYPT_DER_BLOB;
- pEncodedAttributes: PCRYPT_DER_BLOB): BOOL; stdcall;
-{$EXTERNALSYM CertEnumSubjectInSortedCTL}
-
-//+=========================================================================
-// Certificate Verify CTL Usage Data Structures and APIs
-//==========================================================================
-
-type
- PCTL_VERIFY_USAGE_PARA = ^CTL_VERIFY_USAGE_PARA;
- {$EXTERNALSYM PCTL_VERIFY_USAGE_PARA}
- _CTL_VERIFY_USAGE_PARA = record
- cbSize: DWORD;
- ListIdentifier: CRYPT_DATA_BLOB; // OPTIONAL
- cCtlStore: DWORD;
- rghCtlStore: PHCERTSTORE; // OPTIONAL
- cSignerStore: DWORD;
- rghSignerStore: PHCERTSTORE; // OPTIONAL
- end;
- {$EXTERNALSYM _CTL_VERIFY_USAGE_PARA}
- CTL_VERIFY_USAGE_PARA = _CTL_VERIFY_USAGE_PARA;
- {$EXTERNALSYM CTL_VERIFY_USAGE_PARA}
- TCtlVerifyUsagePara = CTL_VERIFY_USAGE_PARA;
- PCtlVerifyUsagePara = PCTL_VERIFY_USAGE_PARA;
-
- PCTL_VERIFY_USAGE_STATUS = ^CTL_VERIFY_USAGE_STATUS;
- {$EXTERNALSYM PCTL_VERIFY_USAGE_STATUS}
- _CTL_VERIFY_USAGE_STATUS = record
- cbSize: DWORD;
- dwError: DWORD;
- dwFlags: DWORD;
- ppCtl: PPCCTL_CONTEXT; // IN OUT OPTIONAL
- dwCtlEntryIndex: DWORD;
- ppSigner: PPCCERT_CONTEXT; // IN OUT OPTIONAL
- dwSignerIndex: DWORD;
- end;
- {$EXTERNALSYM _CTL_VERIFY_USAGE_STATUS}
- CTL_VERIFY_USAGE_STATUS = _CTL_VERIFY_USAGE_STATUS;
- {$EXTERNALSYM CTL_VERIFY_USAGE_STATUS}
- TCtlVerifyUsageStatus = CTL_VERIFY_USAGE_STATUS;
- PCtlVerifyUsageStatus = PCTL_VERIFY_USAGE_STATUS;
-
-const
- CERT_VERIFY_INHIBIT_CTL_UPDATE_FLAG = $1;
- {$EXTERNALSYM CERT_VERIFY_INHIBIT_CTL_UPDATE_FLAG}
- CERT_VERIFY_TRUSTED_SIGNERS_FLAG = $2;
- {$EXTERNALSYM CERT_VERIFY_TRUSTED_SIGNERS_FLAG}
- CERT_VERIFY_NO_TIME_CHECK_FLAG = $4;
- {$EXTERNALSYM CERT_VERIFY_NO_TIME_CHECK_FLAG}
- CERT_VERIFY_ALLOW_MORE_USAGE_FLAG = $8;
- {$EXTERNALSYM CERT_VERIFY_ALLOW_MORE_USAGE_FLAG}
-
- CERT_VERIFY_UPDATED_CTL_FLAG = $1;
- {$EXTERNALSYM CERT_VERIFY_UPDATED_CTL_FLAG}
-
-//+-------------------------------------------------------------------------
-// Verify that a subject is trusted for the specified usage by finding a
-// signed and time valid CTL with the usage identifiers and containing the
-// the subject. A subject can be identified by either its certificate context
-// or any identifier such as its SHA1 hash.
-//
-// See CertFindSubjectInCTL for definition of dwSubjectType and pvSubject
-// parameters.
-//
-// Via pVerifyUsagePara, the caller can specify the stores to be searched
-// to find the CTL. The caller can also specify the stores containing
-// acceptable CTL signers. By setting the ListIdentifier, the caller
-// can also restrict to a particular signer CTL list.
-//
-// Via pVerifyUsageStatus, the CTL containing the subject, the subject's
-// index into the CTL's array of entries, and the signer of the CTL
-// are returned. If the caller is not interested, ppCtl and ppSigner can be set
-// to NULL. Returned contexts must be freed via the store's free context APIs.
-//
-// If the CERT_VERIFY_INHIBIT_CTL_UPDATE_FLAG isn't set, then, a time
-// invalid CTL in one of the CtlStores may be replaced. When replaced, the
-// CERT_VERIFY_UPDATED_CTL_FLAG is set in pVerifyUsageStatus->dwFlags.
-//
-// If the CERT_VERIFY_TRUSTED_SIGNERS_FLAG is set, then, only the
-// SignerStores specified in pVerifyUsageStatus are searched to find
-// the signer. Otherwise, the SignerStores provide additional sources
-// to find the signer's certificate.
-//
-// If CERT_VERIFY_NO_TIME_CHECK_FLAG is set, then, the CTLs aren't checked
-// for time validity.
-//
-// If CERT_VERIFY_ALLOW_MORE_USAGE_FLAG is set, then, the CTL may contain
-// additional usage identifiers than specified by pSubjectUsage. Otherwise,
-// the found CTL will contain the same usage identifers and no more.
-//
-// CertVerifyCTLUsage will be implemented as a dispatcher to OID installable
-// functions. First, it will try to find an OID function matching the first
-// usage object identifier in the pUsage sequence. Next, it will dispatch
-// to the default CertDllVerifyCTLUsage functions.
-//
-// If the subject is trusted for the specified usage, then, TRUE is
-// returned. Otherwise, FALSE is returned with dwError set to one of the
-// following:
-// CRYPT_E_NO_VERIFY_USAGE_DLL
-// CRYPT_E_NO_VERIFY_USAGE_CHECK
-// CRYPT_E_VERIFY_USAGE_OFFLINE
-// CRYPT_E_NOT_IN_CTL
-// CRYPT_E_NO_TRUSTED_SIGNER
-//--------------------------------------------------------------------------
-
-function CertVerifyCTLUsage(dwEncodingType: DWORD; dwSubjectType: DWORD;
- pvSubject: Pointer; pSubjectUsage: PCTL_USAGE; dwFlags: DWORD;
- pVerifyUsagePara: PCTL_VERIFY_USAGE_PARA;
- pVerifyUsageStatus: PCTL_VERIFY_USAGE_STATUS): BOOL; stdcall;
-{$EXTERNALSYM CertVerifyCTLUsage}
-
-//+=========================================================================
-// Certificate Revocation Data Structures and APIs
-//==========================================================================
-
-//+-------------------------------------------------------------------------
-// The following data structure may be passed to CertVerifyRevocation to
-// assist in finding the issuer of the context to be verified.
-//
-// When pIssuerCert is specified, pIssuerCert is the issuer of
-// rgpvContext[cContext - 1].
-//
-// When cCertStore and rgCertStore are specified, these stores may contain
-// an issuer certificate.
-//
-// When hCrlStore is specified then a handler which uses CRLs can search this
-// store for them
-//
-// When pftTimeToUse is specified then the handler (if possible) must determine
-// revocation status relative to the time given otherwise the answer may be
-// independent of time or relative to current time
-//--------------------------------------------------------------------------
-
-type
- PCERT_REVOCATION_PARA = ^CERT_REVOCATION_PARA;
- {$EXTERNALSYM PCERT_REVOCATION_PARA}
- _CERT_REVOCATION_PARA = record
- cbSize: DWORD;
- pIssuerCert: PCCERT_CONTEXT;
- cCertStore: DWORD;
- rgCertStore: PHCERTSTORE;
- hCrlStore: HCERTSTORE;
- pftTimeToUse: LPFILETIME;
- end;
- {$EXTERNALSYM _CERT_REVOCATION_PARA}
- CERT_REVOCATION_PARA = _CERT_REVOCATION_PARA;
- {$EXTERNALSYM CERT_REVOCATION_PARA}
- TCertRevocationPara = CERT_REVOCATION_PARA;
- PCertRevocationPara = PCERT_REVOCATION_PARA;
-
-//+-------------------------------------------------------------------------
-// The following data structure is returned by CertVerifyRevocation to
-// specify the status of the revoked or unchecked context. Review the
-// following CertVerifyRevocation comments for details.
-//
-// Upon input to CertVerifyRevocation, cbSize must be set to a size
-// >= sizeof(CERT_REVOCATION_STATUS). Otherwise, CertVerifyRevocation
-// returns FALSE and sets LastError to E_INVALIDARG.
-//
-// Upon input to the installed or registered CRYPT_OID_VERIFY_REVOCATION_FUNC
-// functions, the dwIndex, dwError and dwReason have been zero'ed.
-//--------------------------------------------------------------------------
-
- PCERT_REVOCATION_STATUS = ^CERT_REVOCATION_STATUS;
- {$EXTERNALSYM PCERT_REVOCATION_STATUS}
- _CERT_REVOCATION_STATUS = record
- cbSize: DWORD;
- dwIndex: DWORD;
- dwError: DWORD;
- dwReason: DWORD;
- end;
- {$EXTERNALSYM _CERT_REVOCATION_STATUS}
- CERT_REVOCATION_STATUS = _CERT_REVOCATION_STATUS;
- {$EXTERNALSYM CERT_REVOCATION_STATUS}
- TCertRevocationStatus = CERT_REVOCATION_STATUS;
- PCertRevocationStatus = PCERT_REVOCATION_STATUS;
-
-//+-------------------------------------------------------------------------
-// Verifies the array of contexts for revocation. The dwRevType parameter
-// indicates the type of the context data structure passed in rgpvContext.
-// Currently only the revocation of certificates is defined.
-//
-// If the CERT_VERIFY_REV_CHAIN_FLAG flag is set, then, CertVerifyRevocation
-// is verifying a chain of certs where, rgpvContext[i + 1] is the issuer
-// of rgpvContext[i]. Otherwise, CertVerifyRevocation makes no assumptions
-// about the order of the contexts.
-//
-// To assist in finding the issuer, the pRevPara may optionally be set. See
-// the CERT_REVOCATION_PARA data structure for details.
-//
-// The contexts must contain enough information to allow the
-// installable or registered revocation DLLs to find the revocation server. For
-// certificates, this information would normally be conveyed in an
-// extension such as the IETF's AuthorityInfoAccess extension.
-//
-// CertVerifyRevocation returns TRUE if all of the contexts were successfully
-// checked and none were revoked. Otherwise, returns FALSE and updates the
-// returned pRevStatus data structure as follows:
-// dwIndex
-// Index of the first context that was revoked or unable to
-// be checked for revocation
-// dwError
-// Error status. LastError is also set to this error status.
-// dwError can be set to one of the following error codes defined
-// in winerror.h:
-// ERROR_SUCCESS - good context
-// CRYPT_E_REVOKED - context was revoked. dwReason contains the
-// reason for revocation
-// CRYPT_E_REVOCATION_OFFLINE - unable to connect to the
-// revocation server
-// CRYPT_E_NOT_IN_REVOCATION_DATABASE - the context to be checked
-// was not found in the revocation server's database.
-// CRYPT_E_NO_REVOCATION_CHECK - the called revocation function
-// wasn't able to do a revocation check on the context
-// CRYPT_E_NO_REVOCATION_DLL - no installed or registered Dll was
-// found to verify revocation
-// dwReason
-// The dwReason is currently only set for CRYPT_E_REVOKED and contains
-// the reason why the context was revoked. May be one of the following
-// CRL reasons defined by the CRL Reason Code extension ("2.5.29.21")
-// CRL_REASON_UNSPECIFIED 0
-// CRL_REASON_KEY_COMPROMISE 1
-// CRL_REASON_CA_COMPROMISE 2
-// CRL_REASON_AFFILIATION_CHANGED 3
-// CRL_REASON_SUPERSEDED 4
-// CRL_REASON_CESSATION_OF_OPERATION 5
-// CRL_REASON_CERTIFICATE_HOLD 6
-//
-// For each entry in rgpvContext, CertVerifyRevocation iterates
-// through the CRYPT_OID_VERIFY_REVOCATION_FUNC
-// function set's list of installed DEFAULT functions.
-// CryptGetDefaultOIDFunctionAddress is called with pwszDll = NULL. If no
-// installed functions are found capable of doing the revocation verification,
-// CryptVerifyRevocation iterates through CRYPT_OID_VERIFY_REVOCATION_FUNC's
-// list of registered DEFAULT Dlls. CryptGetDefaultOIDDllList is called to
-// get the list. CryptGetDefaultOIDFunctionAddress is called to load the Dll.
-//
-// The called functions have the same signature as CertVerifyRevocation. A
-// called function returns TRUE if it was able to successfully check all of
-// the contexts and none were revoked. Otherwise, the called function returns
-// FALSE and updates pRevStatus. dwIndex is set to the index of
-// the first context that was found to be revoked or unable to be checked.
-// dwError and LastError are updated. For CRYPT_E_REVOKED, dwReason
-// is updated. Upon input to the called function, dwIndex, dwError and
-// dwReason have been zero'ed. cbSize has been checked to be >=
-// sizeof(CERT_REVOCATION_STATUS).
-//
-// If the called function returns FALSE, and dwError isn't set to
-// CRYPT_E_REVOKED, then, CertVerifyRevocation either continues on to the
-// next DLL in the list for a returned dwIndex of 0 or for a returned
-// dwIndex > 0, restarts the process of finding a verify function by
-// advancing the start of the context array to the returned dwIndex and
-// decrementing the count of remaining contexts.
-//--------------------------------------------------------------------------
-
-function CertVerifyRevocation(dwEncodingType, dwRevType, cContext: DWORD;
- rgpvContext: PVOID; dwFlags: DWORD; pRevPara: PCERT_REVOCATION_PARA;
- pRevStatus: PCERT_REVOCATION_STATUS): BOOL; stdcall;
-{$EXTERNALSYM CertVerifyRevocation}
-
-//+-------------------------------------------------------------------------
-// Revocation types
-//--------------------------------------------------------------------------
-
-const
- CERT_CONTEXT_REVOCATION_TYPE = 1;
- {$EXTERNALSYM CERT_CONTEXT_REVOCATION_TYPE}
-
-//+-------------------------------------------------------------------------
-// When the following flag is set, rgpvContext[] consists of a chain
-// of certificates, where rgpvContext[i + 1] is the issuer of rgpvContext[i].
-//--------------------------------------------------------------------------
-
- CERT_VERIFY_REV_CHAIN_FLAG = $00000001;
- {$EXTERNALSYM CERT_VERIFY_REV_CHAIN_FLAG}
-
-//+-------------------------------------------------------------------------
-// CERT_VERIFY_CACHE_ONLY_BASED_REVOCATION prevents the revocation handler from
-// accessing any network based resources for revocation checking
-//--------------------------------------------------------------------------
-
- CERT_VERIFY_CACHE_ONLY_BASED_REVOCATION = $00000002;
- {$EXTERNALSYM CERT_VERIFY_CACHE_ONLY_BASED_REVOCATION}
-
-//+-------------------------------------------------------------------------
-// CERT_CONTEXT_REVOCATION_TYPE
-//
-// pvContext points to a const CERT_CONTEXT.
-//--------------------------------------------------------------------------
-
-//+=========================================================================
-// Certificate Helper APIs
-//==========================================================================
-
-//+-------------------------------------------------------------------------
-// Compare two multiple byte integer blobs to see if they are identical.
-//
-// Before doing the comparison, leading zero bytes are removed from a
-// positive number and leading 0xFF bytes are removed from a negative
-// number.
-//
-// The multiple byte integers are treated as Little Endian. pbData[0] is the
-// least significant byte and pbData[cbData - 1] is the most significant
-// byte.
-//
-// Returns TRUE if the integer blobs are identical after removing leading
-// 0 or 0xFF bytes.
-//--------------------------------------------------------------------------
-
-function CertCompareIntegerBlob(pInt1, pInt2: PCRYPT_INTEGER_BLOB): BOOL; stdcall;
-{$EXTERNALSYM CertCompareIntegerBlob}
-
-//+-------------------------------------------------------------------------
-// Compare two certificates to see if they are identical.
-//
-// Since a certificate is uniquely identified by its Issuer and SerialNumber,
-// these are the only fields needing to be compared.
-//
-// Returns TRUE if the certificates are identical.
-//--------------------------------------------------------------------------
-
-function CertCompareCertificate(dwCertEncodingType: DWORD; pCertId1, pCertId2: PCERT_INFO): BOOL; stdcall;
-{$EXTERNALSYM CertCompareCertificate}
-
-//+-------------------------------------------------------------------------
-// Compare two certificate names to see if they are identical.
-//
-// Returns TRUE if the names are identical.
-//--------------------------------------------------------------------------
-
-function CertCompareCertificateName(dwCertEncodingType: DWORD;
- pCertName1: PCERT_NAME_BLOB; pCertName2: PCERT_NAME_BLOB): BOOL; stdcall;
-{$EXTERNALSYM CertCompareCertificateName}
-
-//+-------------------------------------------------------------------------
-// Compare the attributes in the certificate name with the specified
-// Relative Distinguished Name's (CERT_RDN) array of attributes.
-// The comparison iterates through the CERT_RDN attributes and looks for an
-// attribute match in any of the certificate name's RDNs.
-// Returns TRUE if all the attributes are found and match.
-//
-// The CERT_RDN_ATTR fields can have the following special values:
-// pszObjId == NULL - ignore the attribute object identifier
-// dwValueType == RDN_ANY_TYPE - ignore the value type
-//
-// CERT_CASE_INSENSITIVE_IS_RDN_ATTRS_FLAG should be set to do
-// a case insensitive match. Otherwise, defaults to an exact, case sensitive
-// match.
-//
-// CERT_UNICODE_IS_RDN_ATTRS_FLAG should be set if the pRDN was initialized
-// with unicode strings as for CryptEncodeObject(X509_UNICODE_NAME).
-//--------------------------------------------------------------------------
-
-function CertIsRDNAttrsInCertificateName(dwCertEncodingType, dwFlags: DWORD;
- pCertName: PCERT_NAME_BLOB; pRDN: PCERT_RDN): BOOL; stdcall;
-{$EXTERNALSYM CertIsRDNAttrsInCertificateName}
-
-const
- CERT_UNICODE_IS_RDN_ATTRS_FLAG = $1;
- {$EXTERNALSYM CERT_UNICODE_IS_RDN_ATTRS_FLAG}
- CERT_CASE_INSENSITIVE_IS_RDN_ATTRS_FLAG = $2;
- {$EXTERNALSYM CERT_CASE_INSENSITIVE_IS_RDN_ATTRS_FLAG}
-
-//+-------------------------------------------------------------------------
-// Compare two public keys to see if they are identical.
-//
-// Returns TRUE if the keys are identical.
-//--------------------------------------------------------------------------
-
-function CertComparePublicKeyInfo(dwCertEncodingType: DWORD;
- pPublicKey1, pPublicKey2: PCERT_PUBLIC_KEY_INFO): BOOL; stdcall;
-{$EXTERNALSYM CertComparePublicKeyInfo}
-
-//+-------------------------------------------------------------------------
-// Get the public/private key's bit length.
-//
-// Returns 0 if unable to determine the key's length.
-//--------------------------------------------------------------------------
-
-function CertGetPublicKeyLength(dwCertEncodingType: DWORD;
- pPublicKey: PCERT_PUBLIC_KEY_INFO): DWORD; stdcall;
-{$EXTERNALSYM CertGetPublicKeyLength}
-
-//+-------------------------------------------------------------------------
-// Verify the signature of a subject certificate or a CRL using the
-// public key info
-//
-// Returns TRUE for a valid signature.
-//
-// hCryptProv specifies the crypto provider to use to verify the signature.
-// It doesn't need to use a private key.
-//--------------------------------------------------------------------------
-
-function CryptVerifyCertificateSignature(hCryptProv: HCRYPTPROV;
- dwCertEncodingType: DWORD; pbEncoded: LPBYTE; cbEncoded: DWORD;
- pPublicKey: PCERT_PUBLIC_KEY_INFO): BOOL; stdcall;
-{$EXTERNALSYM CryptVerifyCertificateSignature}
-
-//+-------------------------------------------------------------------------
-// Verify the signature of a subject certificate, CRL, certificate request
-// or keygen request using the issuer's public key.
-//
-// Returns TRUE for a valid signature.
-//
-// The subject can be an encoded blob or a context for a certificate or CRL.
-// For a subject certificate context, if the certificate is missing
-// inheritable PublicKey Algorithm Parameters, the context's
-// CERT_PUBKEY_ALG_PARA_PROP_ID is updated with the issuer's public key
-// algorithm parameters for a valid signature.
-//
-// The issuer can be a pointer to a CERT_PUBLIC_KEY_INFO, certificate
-// context or a chain context.
-//
-// hCryptProv specifies the crypto provider to use to verify the signature.
-// Its private key isn't used. If hCryptProv is NULL, a default
-// provider is picked according to the PublicKey Algorithm OID.
-//--------------------------------------------------------------------------
-
-function CryptVerifyCertificateSignatureEx(hCryptProv: HCRYPTPROV;
- dwCertEncodingType, dwSubjectType: DWORD; pvSubject: Pointer;
- dwIssuerType: DWORD; pvIssuer: Pointer; dwFlags: DWORD; pvReserved: Pointer): BOOL; stdcall;
-{$EXTERNALSYM CryptVerifyCertificateSignatureEx}
-
-// Subject Types
-
-const
- CRYPT_VERIFY_CERT_SIGN_SUBJECT_BLOB = 1;
- {$EXTERNALSYM CRYPT_VERIFY_CERT_SIGN_SUBJECT_BLOB}
- // pvSubject :: PCRYPT_DATA_BLOB
- CRYPT_VERIFY_CERT_SIGN_SUBJECT_CERT = 2;
- {$EXTERNALSYM CRYPT_VERIFY_CERT_SIGN_SUBJECT_CERT}
- // pvSubject :: PCCERT_CONTEXT
- CRYPT_VERIFY_CERT_SIGN_SUBJECT_CRL = 3;
- {$EXTERNALSYM CRYPT_VERIFY_CERT_SIGN_SUBJECT_CRL}
- // pvSubject :: PCCRL_CONTEXT
-
-// Issuer Types
- CRYPT_VERIFY_CERT_SIGN_ISSUER_PUBKEY = 1;
- {$EXTERNALSYM CRYPT_VERIFY_CERT_SIGN_ISSUER_PUBKEY}
- // pvIssuer :: PCERT_PUBLIC_KEY_INFO
- CRYPT_VERIFY_CERT_SIGN_ISSUER_CERT = 2;
- {$EXTERNALSYM CRYPT_VERIFY_CERT_SIGN_ISSUER_CERT}
- // pvIssuer :: PCCERT_CONTEXT
- CRYPT_VERIFY_CERT_SIGN_ISSUER_CHAIN = 3;
- {$EXTERNALSYM CRYPT_VERIFY_CERT_SIGN_ISSUER_CHAIN}
- // pvIssuer :: PCCERT_CHAIN_CONTEXT
-
-//+-------------------------------------------------------------------------
-// Compute the hash of the "to be signed" information in the encoded
-// signed content (CERT_SIGNED_CONTENT_INFO).
-//
-// hCryptProv specifies the crypto provider to use to compute the hash.
-// It doesn't need to use a private key.
-//--------------------------------------------------------------------------
-
-function CryptHashToBeSigned(hCryptProv: HCRYPTPROV; dwCertEncodingType: DWORD;
- pbEncoded: LPBYTE; cbEncoded: DWORD; pbComputedHash: LPBYTE;
- var pcbComputedHash: DWORD): BOOL; stdcall;
-{$EXTERNALSYM CryptHashToBeSigned}
-
-//+-------------------------------------------------------------------------
-// Hash the encoded content.
-//
-// hCryptProv specifies the crypto provider to use to compute the hash.
-// It doesn't need to use a private key.
-//
-// Algid specifies the CAPI hash algorithm to use. If Algid is 0, then, the
-// default hash algorithm (currently SHA1) is used.
-//--------------------------------------------------------------------------
-
-function CryptHashCertificate(hCryptProv: HCRYPTPROV; Algid: ALG_ID;
- dwFlags: DWORD; pbEncoded: LPBYTE; cbEncoded: DWORD; pbComputedHash: LPBYTE;
- var pcbComputedHash: DWORD): BOOL; stdcall;
-{$EXTERNALSYM CryptHashCertificate}
-
-//+-------------------------------------------------------------------------
-// Sign the "to be signed" information in the encoded signed content.
-//
-// hCryptProv specifies the crypto provider to use to do the signature.
-// It uses the specified private key.
-//--------------------------------------------------------------------------
-
-function CryptSignCertificate(hCryptProv: HCRYPTPROV; dwKeySpec: DWORD;
- dwCertEncodingType: DWORD; pbEncodedToBeSigned: LPBYTE; cbEncodedToBeSigned: DWORD;
- pSignatureAlgorithm: PCRYPT_ALGORITHM_IDENTIFIER; pvHashAuxInfo: Pointer;
- pbSignature: LPBYTE; var pcbSignature: DWORD): BOOL; stdcall;
-{$EXTERNALSYM CryptSignCertificate}
-
-//+-------------------------------------------------------------------------
-// Encode the "to be signed" information. Sign the encoded "to be signed".
-// Encode the "to be signed" and the signature.
-//
-// hCryptProv specifies the crypto provider to use to do the signature.
-// It uses the specified private key.
-//--------------------------------------------------------------------------
-
-function CryptSignAndEncodeCertificate(hCryptProv: HCRYPTPROV; dwKeySpec: DWORD;
- dwCertEncodingType: DWORD; lpszStructType: LPCSTR; pvStructInfo: Pointer;
- pSignatureAlgorithm: PCRYPT_ALGORITHM_IDENTIFIER; pvHashAuxInfo: Pointer;
- pbEncoded: PBYTE; var pcbEncoded: DWORD): BOOL; stdcall;
-{$EXTERNALSYM CryptSignAndEncodeCertificate}
-
-//+-------------------------------------------------------------------------
-// Verify the time validity of a certificate.
-//
-// Returns -1 if before NotBefore, +1 if after NotAfter and otherwise 0 for
-// a valid certificate
-//
-// If pTimeToVerify is NULL, uses the current time.
-//--------------------------------------------------------------------------
-
-function CertVerifyTimeValidity(pTimeToVerify: LPFILETIME; pCertInfo: PCERT_INFO): LONG; stdcall;
-{$EXTERNALSYM CertVerifyTimeValidity}
-
-//+-------------------------------------------------------------------------
-// Verify the time validity of a CRL.
-//
-// Returns -1 if before ThisUpdate, +1 if after NextUpdate and otherwise 0 for
-// a valid CRL
-//
-// If pTimeToVerify is NULL, uses the current time.
-//--------------------------------------------------------------------------
-
-function CertVerifyCRLTimeValidity(pTimeToVerify: LPFILETIME; pCrlInfo: PCRL_INFO): LONG; stdcall;
-{$EXTERNALSYM CertVerifyCRLTimeValidity}
-
-//+-------------------------------------------------------------------------
-// Verify that the subject's time validity nests within the issuer's time
-// validity.
-//
-// Returns TRUE if it nests. Otherwise, returns FALSE.
-//--------------------------------------------------------------------------
-
-function CertVerifyValidityNesting(pSubjectInfo, pIssuerInfo: PCERT_INFO): BOOL; stdcall;
-{$EXTERNALSYM CertVerifyValidityNesting}
-
-//+-------------------------------------------------------------------------
-// Verify that the subject certificate isn't on its issuer CRL.
-//
-// Returns true if the certificate isn't on the CRL.
-//--------------------------------------------------------------------------
-
-function CertVerifyCRLRevocation(dwCertEncodingType: DWORD; pCertId: PCERT_INFO;
- cCrlInfo: DWORD; rgpCrlInfo: PCRL_INFO): BOOL; stdcall;
-{$EXTERNALSYM CertVerifyCRLRevocation}
-
-//+-------------------------------------------------------------------------
-// Convert the CAPI AlgId to the ASN.1 Object Identifier string
-//
-// Returns NULL if there isn't an ObjId corresponding to the AlgId.
-//--------------------------------------------------------------------------
-
-function CertAlgIdToOID(dwAlgId: DWORD): LPCSTR; stdcall;
-{$EXTERNALSYM CertAlgIdToOID}
-
-//+-------------------------------------------------------------------------
-// Convert the ASN.1 Object Identifier string to the CAPI AlgId.
-//
-// Returns 0 if there isn't an AlgId corresponding to the ObjId.
-//--------------------------------------------------------------------------
-
-function CertOIDToAlgId(pszObjId: LPCSTR): DWORD; stdcall;
-{$EXTERNALSYM CertOIDToAlgId}
-
-//+-------------------------------------------------------------------------
-// Find an extension identified by its Object Identifier.
-//
-// If found, returns pointer to the extension. Otherwise, returns NULL.
-//--------------------------------------------------------------------------
-
-function CertFindExtension(pszObjId: LPCSTR; cExtensions: DWORD;
- rgExtensions: PCERT_EXTENSION): PCERT_EXTENSION; stdcall;
-{$EXTERNALSYM CertFindExtension}
-
-//+-------------------------------------------------------------------------
-// Find the first attribute identified by its Object Identifier.
-//
-// If found, returns pointer to the attribute. Otherwise, returns NULL.
-//--------------------------------------------------------------------------
-
-function CertFindAttribute(pszObjId: LPCSTR; cAttr: DWORD;
- rgAttr: PCRYPT_ATTRIBUTE): PCRYPT_ATTRIBUTE; stdcall;
-{$EXTERNALSYM CertFindAttribute}
-
-//+-------------------------------------------------------------------------
-// Find the first CERT_RDN attribute identified by its Object Identifier in
-// the name's list of Relative Distinguished Names.
-//
-// If found, returns pointer to the attribute. Otherwise, returns NULL.
-//--------------------------------------------------------------------------
-
-function CertFindRDNAttr(pszObjId: LPCSTR; pName: PCERT_NAME_INFO): PCERT_RDN_ATTR; stdcall;
-{$EXTERNALSYM CertFindRDNAttr}
-
-//+-------------------------------------------------------------------------
-// Get the intended key usage bytes from the certificate.
-//
-// If the certificate doesn't have any intended key usage bytes, returns FALSE
-// and *pbKeyUsage is zeroed. Otherwise, returns TRUE and up through
-// cbKeyUsage bytes are copied into *pbKeyUsage. Any remaining uncopied
-// bytes are zeroed.
-//--------------------------------------------------------------------------
-
-function CertGetIntendedKeyUsage(dwCertEncodingType: DWORD; pCertInfo: PCERT_INFO;
- pbKeyUsage: LPBYTE; cbKeyUsage: DWORD): BOOL; stdcall;
-{$EXTERNALSYM CertGetIntendedKeyUsage}
-
-type
- HCRYPTDEFAULTCONTEXT = Pointer;
- {$EXTERNALSYM HCRYPTDEFAULTCONTEXT}
-
-//+-------------------------------------------------------------------------
-// Install a previously CryptAcquiredContext'ed HCRYPTPROV to be used as
-// a default context.
-//
-// dwDefaultType and pvDefaultPara specify where the default context is used.
-// For example, install the HCRYPTPROV to be used to verify certificate's
-// having szOID_OIWSEC_md5RSA signatures.
-//
-// By default, the installed HCRYPTPROV is only applicable to the current
-// thread. Set CRYPT_DEFAULT_CONTEXT_PROCESS_FLAG to allow the HCRYPTPROV
-// to be used by all threads in the current process.
-//
-// For a successful install, TRUE is returned and *phDefaultContext is
-// updated with the HANDLE to be passed to CryptUninstallDefaultContext.
-//
-// The installed HCRYPTPROVs are stack ordered (the last installed
-// HCRYPTPROV is checked first). All thread installed HCRYPTPROVs are
-// checked before any process HCRYPTPROVs.
-//
-// The installed HCRYPTPROV remains available for default usage until
-// CryptUninstallDefaultContext is called or the thread or process exits.
-//
-// If CRYPT_DEFAULT_CONTEXT_AUTO_RELEASE_FLAG is set, then, the HCRYPTPROV
-// is CryptReleaseContext'ed at thread or process exit. However,
-// not CryptReleaseContext'ed if CryptUninstallDefaultContext is
-// called.
-//--------------------------------------------------------------------------
-
-function CryptInstallDefaultContext(hCryptProv: HCRYPTPROV; dwDefaultType: DWORD;
- pvDefaultPara: Pointer; dwFlags: DWORD; pvReserved: Pointer;
- var phDefaultContext: HCRYPTDEFAULTCONTEXT): BOOL; stdcall;
-{$EXTERNALSYM CryptInstallDefaultContext}
-
-// dwFlags
-
-const
- CRYPT_DEFAULT_CONTEXT_AUTO_RELEASE_FLAG = $00000001;
- {$EXTERNALSYM CRYPT_DEFAULT_CONTEXT_AUTO_RELEASE_FLAG}
- CRYPT_DEFAULT_CONTEXT_PROCESS_FLAG = $00000002;
- {$EXTERNALSYM CRYPT_DEFAULT_CONTEXT_PROCESS_FLAG}
-
-// List of dwDefaultType's
-
- CRYPT_DEFAULT_CONTEXT_CERT_SIGN_OID = 1;
- {$EXTERNALSYM CRYPT_DEFAULT_CONTEXT_CERT_SIGN_OID}
- CRYPT_DEFAULT_CONTEXT_MULTI_CERT_SIGN_OID = 2;
- {$EXTERNALSYM CRYPT_DEFAULT_CONTEXT_MULTI_CERT_SIGN_OID}
-
-//+-------------------------------------------------------------------------
-// CRYPT_DEFAULT_CONTEXT_CERT_SIGN_OID
-//
-// Install a default HCRYPTPROV used to verify a certificate
-// signature. pvDefaultPara points to the szOID of the certificate
-// signature algorithm, for example, szOID_OIWSEC_md5RSA. If
-// pvDefaultPara is NULL, then, the HCRYPTPROV is used to verify all
-// certificate signatures. Note, pvDefaultPara can't be NULL when
-// CRYPT_DEFAULT_CONTEXT_PROCESS_FLAG is set.
-//--------------------------------------------------------------------------
-
-//+-------------------------------------------------------------------------
-// CRYPT_DEFAULT_CONTEXT_MULTI_CERT_SIGN_OID
-//
-// Same as CRYPT_DEFAULT_CONTEXT_CERT_SIGN_OID. However, the default
-// HCRYPTPROV is to be used for multiple signature szOIDs. pvDefaultPara
-// points to a CRYPT_DEFAULT_CONTEXT_MULTI_OID_PARA structure containing
-// an array of szOID pointers.
-//--------------------------------------------------------------------------
-
-type
- PCRYPT_DEFAULT_CONTEXT_MULTI_OID_PARA = ^CRYPT_DEFAULT_CONTEXT_MULTI_OID_PARA;
- {$EXTERNALSYM PCRYPT_DEFAULT_CONTEXT_MULTI_OID_PARA}
- _CRYPT_DEFAULT_CONTEXT_MULTI_OID_PARA = record
- cOID: DWORD;
- rgpszOID: LPLPSTR;
- end;
- {$EXTERNALSYM _CRYPT_DEFAULT_CONTEXT_MULTI_OID_PARA}
- CRYPT_DEFAULT_CONTEXT_MULTI_OID_PARA = _CRYPT_DEFAULT_CONTEXT_MULTI_OID_PARA;
- {$EXTERNALSYM CRYPT_DEFAULT_CONTEXT_MULTI_OID_PARA}
- TCryptDefaultContextMultiOidPara = CRYPT_DEFAULT_CONTEXT_MULTI_OID_PARA;
- PCryptDefaultContextMultiOidPara = PCRYPT_DEFAULT_CONTEXT_MULTI_OID_PARA;
-
-//+-------------------------------------------------------------------------
-// Uninstall a default context previously installed by
-// CryptInstallDefaultContext.
-//
-// For a default context installed with CRYPT_DEFAULT_CONTEXT_PROCESS_FLAG
-// set, if any other threads are currently using this context,
-// this function will block until they finish.
-//--------------------------------------------------------------------------
-
-function CryptUninstallDefaultContext(hDefaultContext: HCRYPTDEFAULTCONTEXT;
- dwFlags: DWORD; pvReserved: Pointer): BOOL; stdcall;
-{$EXTERNALSYM CryptUninstallDefaultContext}
-
-//+-------------------------------------------------------------------------
-// Export the public key info associated with the provider's corresponding
-// private key.
-//
-// Calls CryptExportPublicKeyInfo with pszPublicKeyObjId = szOID_RSA_RSA,
-// dwFlags = 0 and pvAuxInfo = NULL.
-//--------------------------------------------------------------------------
-
-function CryptExportPublicKeyInfo(hCryptProv: HCRYPTPROV; dwKeySpec: DWORD;
- dwCertEncodingType: DWORD; pInfo: PCERT_PUBLIC_KEY_INFO; var pcbInfo: DWORD): BOOL; stdcall;
-{$EXTERNALSYM CryptExportPublicKeyInfo}
-
-//+-------------------------------------------------------------------------
-// Export the public key info associated with the provider's corresponding
-// private key.
-//
-// Uses the dwCertEncodingType and pszPublicKeyObjId to call the
-// installable CRYPT_OID_EXPORT_PUBLIC_KEY_INFO_FUNC. The called function
-// has the same signature as CryptExportPublicKeyInfoEx.
-//
-// If unable to find an installable OID function for the pszPublicKeyObjId,
-// attempts to export as a RSA Public Key (szOID_RSA_RSA).
-//
-// The dwFlags and pvAuxInfo aren't used for szOID_RSA_RSA.
-//--------------------------------------------------------------------------
-
-const
- CRYPT_OID_EXPORT_PUBLIC_KEY_INFO_FUNC = 'CryptDllExportPublicKeyInfoEx';
- {$EXTERNALSYM CRYPT_OID_EXPORT_PUBLIC_KEY_INFO_FUNC}
-
-function CryptExportPublicKeyInfoEx(hCryptProv: HCRYPTPROV; dwKeySpec: DWORD;
- dwCertEncodingType: DWORD; pszPublicKeyObjId: LPSTR; dwFlags: DWORD;
- pvAuxInfo: Pointer; pInfo: PCERT_PUBLIC_KEY_INFO; var pcbInfo: DWORD): BOOL; stdcall;
-{$EXTERNALSYM CryptExportPublicKeyInfoEx}
-
-//+-------------------------------------------------------------------------
-// Convert and import the public key info into the provider and return a
-// handle to the public key.
-//
-// Calls CryptImportPublicKeyInfoEx with aiKeyAlg = 0, dwFlags = 0 and
-// pvAuxInfo = NULL.
-//--------------------------------------------------------------------------
-
-function CryptImportPublicKeyInfo(hCryptProv: HCRYPTPROV; dwCertEncodingType: DWORD;
- pInfo: PCERT_PUBLIC_KEY_INFO; var phKey: HCRYPTKEY): BOOL; stdcall;
-{$EXTERNALSYM CryptImportPublicKeyInfo}
-
-//+-------------------------------------------------------------------------
-// Convert and import the public key info into the provider and return a
-// handle to the public key.
-//
-// Uses the dwCertEncodingType and pInfo->Algorithm.pszObjId to call the
-// installable CRYPT_OID_IMPORT_PUBLIC_KEY_INFO_FUNC. The called function
-// has the same signature as CryptImportPublicKeyInfoEx.
-//
-// If unable to find an installable OID function for the pszObjId,
-// attempts to import as a RSA Public Key (szOID_RSA_RSA).
-//
-// For szOID_RSA_RSA: aiKeyAlg may be set to CALG_RSA_SIGN or CALG_RSA_KEYX.
-// Defaults to CALG_RSA_KEYX. The dwFlags and pvAuxInfo aren't used.
-//--------------------------------------------------------------------------
-
-const
- CRYPT_OID_IMPORT_PUBLIC_KEY_INFO_FUNC = 'CryptDllImportPublicKeyInfoEx';
- {$EXTERNALSYM CRYPT_OID_IMPORT_PUBLIC_KEY_INFO_FUNC}
-
-function CryptImportPublicKeyInfoEx(hCryptProv: HCRYPTPROV; dwCertEncodingType: DWORD;
- pInfo: PCERT_PUBLIC_KEY_INFO; aiKeyAlg: ALG_ID; dwFlags: DWORD; pvAuxInfo: Pointer;
- var phKey: HCRYPTKEY): BOOL; stdcall;
-{$EXTERNALSYM CryptImportPublicKeyInfoEx}
-
-//+-------------------------------------------------------------------------
-// Acquire a HCRYPTPROV handle and dwKeySpec for the specified certificate
-// context. Uses the certificate's CERT_KEY_PROV_INFO_PROP_ID property.
-// The returned HCRYPTPROV handle may optionally be cached using the
-// certificate's CERT_KEY_CONTEXT_PROP_ID property.
-//
-// If CRYPT_ACQUIRE_CACHE_FLAG is set, then, if an already acquired and
-// cached HCRYPTPROV exists for the certificate, its returned. Otherwise,
-// a HCRYPTPROV is acquired and then cached via the certificate's
-// CERT_KEY_CONTEXT_PROP_ID.
-//
-// The CRYPT_ACQUIRE_USE_PROV_INFO_FLAG can be set to use the dwFlags field of
-// the certificate's CERT_KEY_PROV_INFO_PROP_ID property's CRYPT_KEY_PROV_INFO
-// data structure to determine if the returned HCRYPTPROV should be cached.
-// HCRYPTPROV caching is enabled if the CERT_SET_KEY_CONTEXT_PROP_ID flag was
-// set.
-//
-// If CRYPT_ACQUIRE_COMPARE_KEY_FLAG is set, then,
-// the public key in the certificate is compared with the public
-// key returned by the cryptographic provider. If the keys don't match, the
-// acquire fails and LastError is set to NTE_BAD_PUBLIC_KEY. Note, if
-// a cached HCRYPTPROV is returned, the comparison isn't done. We assume the
-// comparison was done on the initial acquire.
-//
-// *pfCallerFreeProv is returned set to FALSE for:
-// - Acquire or public key comparison fails.
-// - CRYPT_ACQUIRE_CACHE_FLAG is set.
-// - CRYPT_ACQUIRE_USE_PROV_INFO_FLAG is set AND
-// CERT_SET_KEY_CONTEXT_PROP_ID flag is set in the dwFlags field of the
-// certificate's CERT_KEY_PROV_INFO_PROP_ID property's
-// CRYPT_KEY_PROV_INFO data structure.
-// When *pfCallerFreeProv is FALSE, the caller must not release. The
-// returned HCRYPTPROV will be released on the last free of the certificate
-// context.
-//
-// Otherwise, *pfCallerFreeProv is TRUE and the returned HCRYPTPROV must
-// be released by the caller by calling CryptReleaseContext.
-//--------------------------------------------------------------------------
-
-function CryptAcquireCertificatePrivateKey(pCert: PCCERT_CONTEXT; dwFlags: DWORD;
- pvReserved: Pointer; var phCryptProv: HCRYPTPROV; pdwKeySpec: LPDWORD;
- pfCallerFreeProv: PBOOL): BOOL; stdcall;
-{$EXTERNALSYM CryptAcquireCertificatePrivateKey}
-
-const
- CRYPT_ACQUIRE_CACHE_FLAG = $1;
- {$EXTERNALSYM CRYPT_ACQUIRE_CACHE_FLAG}
- CRYPT_ACQUIRE_USE_PROV_INFO_FLAG = $2;
- {$EXTERNALSYM CRYPT_ACQUIRE_USE_PROV_INFO_FLAG}
- CRYPT_ACQUIRE_COMPARE_KEY_FLAG = $4;
- {$EXTERNALSYM CRYPT_ACQUIRE_COMPARE_KEY_FLAG}
-
-//+-------------------------------------------------------------------------
-// Enumerates the cryptographic providers and their containers to find the
-// private key corresponding to the certificate's public key. For a match,
-// the certificate's CERT_KEY_PROV_INFO_PROP_ID property is updated.
-//
-// If the CERT_KEY_PROV_INFO_PROP_ID is already set, then, its checked to
-// see if it matches the provider's public key. For a match, the above
-// enumeration is skipped.
-//
-// By default both the user and machine key containers are searched.
-// The CRYPT_FIND_USER_KEYSET_FLAG or CRYPT_FIND_MACHINE_KEYSET_FLAG
-// can be set in dwFlags to restrict the search to either of the containers.
-//
-// If a container isn't found, returns FALSE with LastError set to
-// NTE_NO_KEY.
-//--------------------------------------------------------------------------
-
-function CryptFindCertificateKeyProvInfo(pCert: PCCERT_CONTEXT; dwFlags: DWORD;
- pvReserved: Pointer): BOOL; stdcall;
-{$EXTERNALSYM CryptFindCertificateKeyProvInfo}
-
-const
- CRYPT_FIND_USER_KEYSET_FLAG = $1;
- {$EXTERNALSYM CRYPT_FIND_USER_KEYSET_FLAG}
- CRYPT_FIND_MACHINE_KEYSET_FLAG = $2;
- {$EXTERNALSYM CRYPT_FIND_MACHINE_KEYSET_FLAG}
-
-//+-------------------------------------------------------------------------
-// This is the prototype for the installable function which is called to
-// actually import a key into a CSP. an installable of this type is called
-// from CryptImportPKCS8. the algorithm OID of the private key is used
-// to look up the proper installable function to call.
-//
-// hCryptProv - the provider to import the key to
-// pPrivateKeyInfo - describes the key to be imported
-// dwFlags - The available flags are:
-// CRYPT_EXPORTABLE
-// this flag is used when importing private keys, for a full
-// explanation please see the documentation for CryptImportKey.
-// pvAuxInfo - reserved for future, must be NULL
-//--------------------------------------------------------------------------
-
-type
- PFN_IMPORT_PRIV_KEY_FUNC = function(hCryptProv: HCRYPTPROV;
- pPrivateKeyInfo: PCRYPT_PRIVATE_KEY_INFO; dwFlags: DWORD;
- pvAuxInfo: Pointer): BOOL; stdcall;
- {$EXTERNALSYM PFN_IMPORT_PRIV_KEY_FUNC}
- PFnImportPrivKeyFunc = PFN_IMPORT_PRIV_KEY_FUNC;
-
-const
- CRYPT_OID_IMPORT_PRIVATE_KEY_INFO_FUNC = 'CryptDllImportPrivateKeyInfoEx';
- {$EXTERNALSYM CRYPT_OID_IMPORT_PRIVATE_KEY_INFO_FUNC}
-
-//+-------------------------------------------------------------------------
-// Convert (from PKCS8 format) and import the private key into a provider
-// and return a handle to the provider as well as the KeySpec used to import to.
-//
-// This function will call the PRESOLVE_HCRYPTPROV_FUNC in the
-// privateKeyAndParams to obtain a handle of provider to import the key to.
-// if the PRESOLVE_HCRYPTPROV_FUNC is NULL then the default provider will be used.
-//
-// privateKeyAndParams - private key blob and corresponding parameters
-// dwFlags - The available flags are:
-// CRYPT_EXPORTABLE
-// this flag is used when importing private keys, for a full
-// explanation please see the documentation for CryptImportKey.
-// phCryptProv - filled in with the handle of the provider the key was
-// imported to, the caller is responsible for freeing it
-// pvAuxInfo - This parameter is reserved for future use and should be set
-// to NULL in the interim.
-//--------------------------------------------------------------------------
-
-function CryptImportPKCS8(sImportParams: CRYPT_PKCS8_IMPORT_PARAMS; dwFlags: DWORD;
- phCryptProv: PHCRYPTPROV; pvAuxInfo: Pointer): BOOL; stdcall;
-{$EXTERNALSYM CryptImportPKCS8}
-
-//+-------------------------------------------------------------------------
-// this is the prototype for installable functions for exporting the private key
-//--------------------------------------------------------------------------
-
-type
- PFN_EXPORT_PRIV_KEY_FUNC = function(hCryptProv: HCRYPTPROV; dwKeySpec: DWORD;
- pszPrivateKeyObjId: LPSTR; dwFlags: DWORD; pvAuxInfo: Pointer;
- var pPrivateKeyInfo: CRYPT_PRIVATE_KEY_INFO; var pcbPrivateKeyBlob: DWORD): BOOL; stdcall;
- {$EXTERNALSYM PFN_EXPORT_PRIV_KEY_FUNC}
- PfnExportPrivKeyFunc = PFN_EXPORT_PRIV_KEY_FUNC;
-
-const
- CRYPT_OID_EXPORT_PRIVATE_KEY_INFO_FUNC = 'CryptDllExportPrivateKeyInfoEx';
- {$EXTERNALSYM CRYPT_OID_EXPORT_PRIVATE_KEY_INFO_FUNC}
-
- CRYPT_DELETE_KEYSET = $0001;
- {$EXTERNALSYM CRYPT_DELETE_KEYSET}
-
-//+-------------------------------------------------------------------------
-// CryptExportPKCS8 -- superseded by CryptExportPKCS8Ex
-//
-// Export the private key in PKCS8 format
-//--------------------------------------------------------------------------
-
-function CryptExportPKCS8(hCryptProv: HCRYPTPROV; dwKeySpec: DWORD;
- pszPrivateKeyObjId: LPSTR; dwFlags: DWORD; pvAuxInfo: Pointer;
- pbPrivateKeyBlob: LPBYTE; var pcbPrivateKeyBlob: DWORD): BOOL; stdcall;
-{$EXTERNALSYM CryptExportPKCS8}
-
-//+-------------------------------------------------------------------------
-// CryptExportPKCS8Ex
-//
-// Export the private key in PKCS8 format
-//
-//
-// Uses the pszPrivateKeyObjId to call the
-// installable CRYPT_OID_EXPORT_PRIVATE_KEY_INFO_FUNC. The called function
-// has the signature defined by PFN_EXPORT_PRIV_KEY_FUNC.
-//
-// If unable to find an installable OID function for the pszPrivateKeyObjId,
-// attempts to export as a RSA Private Key (szOID_RSA_RSA).
-//
-// psExportParams - specifies information about the key to export
-// dwFlags - The flag values. None currently supported
-// pvAuxInfo - This parameter is reserved for future use and should be set to
-// NULL in the interim.
-// pbPrivateKeyBlob - A pointer to the private key blob. It will be encoded
-// as a PKCS8 PrivateKeyInfo.
-// pcbPrivateKeyBlob - A pointer to a DWORD that contains the size, in bytes,
-// of the private key blob being exported.
-//+-------------------------------------------------------------------------
-
-function CryptExportPKCS8Ex(psExportParams: PCRYPT_PKCS8_EXPORT_PARAMS;
- dwFlags: DWORD; pvAuxInfo: Pointer; pbPrivateKeyBlob: LPBYTE;
- var pcbPrivateKeyBlob: DWORD): BOOL; stdcall;
-{$EXTERNALSYM CryptExportPKCS8Ex}
-
-//+-------------------------------------------------------------------------
-// Compute the hash of the encoded public key info.
-//
-// The public key info is encoded and then hashed.
-//--------------------------------------------------------------------------
-
-function CryptHashPublicKeyInfo(hCryptProv: HCRYPTPROV; Algid: ALG_ID;
- dwFlags: DWORD; dwCertEncodingType: DWORD; pInfo: PCERT_PUBLIC_KEY_INFO;
- pbComputedHash: LPBYTE; var pcbComputedHash: DWORD): BOOL; stdcall;
-{$EXTERNALSYM CryptHashPublicKeyInfo}
-
-//+-------------------------------------------------------------------------
-// Convert a Name Value to a null terminated char string
-//
-// Returns the number of characters converted including the terminating null
-// character. If psz is NULL or csz is 0, returns the required size of the
-// destination string (including the terminating null char).
-//
-// If psz != NULL && csz != 0, returned psz is always NULL terminated.
-//
-// Note: csz includes the NULL char.
-//--------------------------------------------------------------------------
-
-function CertRDNValueToStrA(dwValueType: DWORD; pValue: PCERT_RDN_VALUE_BLOB;
- psz: LPSTR; csz: DWORD): DWORD; stdcall;
-{$EXTERNALSYM CertRDNValueToStrA}
-
-//+-------------------------------------------------------------------------
-// Convert a Name Value to a null terminated char string
-//
-// Returns the number of characters converted including the terminating null
-// character. If psz is NULL or csz is 0, returns the required size of the
-// destination string (including the terminating null char).
-//
-// If psz != NULL && csz != 0, returned psz is always NULL terminated.
-//
-// Note: csz includes the NULL char.
-//--------------------------------------------------------------------------
-
-function CertRDNValueToStrW(dwValueType: DWORD; pValue: PCERT_RDN_VALUE_BLOB;
- psz: LPWSTR; csz: DWORD): DWORD; stdcall;
-{$EXTERNALSYM CertRDNValueToStrW}
-function CertRDNValueToStr(dwValueType: DWORD; pValue: PCERT_RDN_VALUE_BLOB;
- psz: LPTSTR; csz: DWORD): DWORD; stdcall;
-{$EXTERNALSYM CertRDNValueToStr}
-
-//+-------------------------------------------------------------------------
-// Convert the certificate name blob to a null terminated char string.
-//
-// Follows the string representation of distinguished names specified in
-// RFC 1779. (Note, added double quoting "" for embedded quotes, quote
-// empty strings and don't quote strings containing consecutive spaces).
-// RDN values of type CERT_RDN_ENCODED_BLOB or CERT_RDN_OCTET_STRING are
-// formatted in hexadecimal (e.g. #0A56CF).
-//
-// The name string is formatted according to the dwStrType:
-// CERT_SIMPLE_NAME_STR
-// The object identifiers are discarded. CERT_RDN entries are separated
-// by ", ". Multiple attributes per CERT_RDN are separated by " + ".
-// For example:
-// Microsoft, Joe Cool + Programmer
-// CERT_OID_NAME_STR
-// The object identifiers are included with a "=" separator from their
-// attribute value. CERT_RDN entries are separated by ", ".
-// Multiple attributes per CERT_RDN are separated by " + ". For example:
-// 2.5.4.11=Microsoft, 2.5.4.3=Joe Cool + 2.5.4.12=Programmer
-// CERT_X500_NAME_STR
-// The object identifiers are converted to their X500 key name. Otherwise,
-// same as CERT_OID_NAME_STR. If the object identifier doesn't have
-// a corresponding X500 key name, then, the object identifier is used with
-// a "OID." prefix. For example:
-// OU=Microsoft, CN=Joe Cool + T=Programmer, OID.1.2.3.4.5.6=Unknown
-//
-// We quote the RDN value if it contains leading or trailing whitespace
-// or one of the following characters: ",", "+", "=", """, "\n", "<", ">",
-// "#" or ";". The quoting character is ". If the the RDN Value contains
-// a " it is double quoted (""). For example:
-// OU=" Microsoft", CN="Joe ""Cool""" + T="Programmer, Manager"
-//
-// CERT_NAME_STR_SEMICOLON_FLAG can be or'ed into dwStrType to replace
-// the ", " separator with a "; " separator.
-//
-// CERT_NAME_STR_CRLF_FLAG can be or'ed into dwStrType to replace
-// the ", " separator with a "\r\n" separator.
-//
-// CERT_NAME_STR_NO_PLUS_FLAG can be or'ed into dwStrType to replace the
-// " + " separator with a single space, " ".
-//
-// CERT_NAME_STR_NO_QUOTING_FLAG can be or'ed into dwStrType to inhibit
-// the above quoting.
-//
-// CERT_NAME_STR_REVERSE_FLAG can be or'ed into dwStrType to reverse the
-// order of the RDNs before converting to the string.
-//
-// By default, CERT_RDN_T61_STRING encoded values are initially decoded
-// as UTF8. If the UTF8 decoding fails, then, decoded as 8 bit characters.
-// CERT_NAME_STR_DISABLE_IE4_UTF8_FLAG can be or'ed into dwStrType to
-// skip the initial attempt to decode as UTF8.
-//
-// Returns the number of characters converted including the terminating null
-// character. If psz is NULL or csz is 0, returns the required size of the
-// destination string (including the terminating null char).
-//
-// If psz != NULL && csz != 0, returned psz is always NULL terminated.
-//
-// Note: csz includes the NULL char.
-//--------------------------------------------------------------------------
-
-//+-------------------------------------------------------------------------
-//--------------------------------------------------------------------------
-
-function CertNameToStrA(dwCertEncodingType: DWORD; pName: PCERT_NAME_BLOB;
- dwStrType: DWORD; psz: LPSTR; csz: DWORD): DWORD; stdcall;
-{$EXTERNALSYM CertNameToStrA}
-
-//+-------------------------------------------------------------------------
-//--------------------------------------------------------------------------
-
-function CertNameToStrW(dwCertEncodingType: DWORD; pName: PCERT_NAME_BLOB;
- dwStrType: DWORD; psz: LPWSTR; csz: DWORD): DWORD; stdcall;
-{$EXTERNALSYM CertNameToStrW}
-function CertNameToStr(dwCertEncodingType: DWORD; pName: PCERT_NAME_BLOB;
- dwStrType: DWORD; psz: LPTSTR; csz: DWORD): DWORD; stdcall;
-{$EXTERNALSYM CertNameToStr}
-
-//+-------------------------------------------------------------------------
-// Certificate name string types
-//--------------------------------------------------------------------------
-
-const
- CERT_SIMPLE_NAME_STR = 1;
- {$EXTERNALSYM CERT_SIMPLE_NAME_STR}
- CERT_OID_NAME_STR = 2;
- {$EXTERNALSYM CERT_OID_NAME_STR}
- CERT_X500_NAME_STR = 3;
- {$EXTERNALSYM CERT_X500_NAME_STR}
-
-//+-------------------------------------------------------------------------
-// Certificate name string type flags OR'ed with the above types
-//--------------------------------------------------------------------------
-
- CERT_NAME_STR_SEMICOLON_FLAG = $40000000;
- {$EXTERNALSYM CERT_NAME_STR_SEMICOLON_FLAG}
- CERT_NAME_STR_NO_PLUS_FLAG = $20000000;
- {$EXTERNALSYM CERT_NAME_STR_NO_PLUS_FLAG}
- CERT_NAME_STR_NO_QUOTING_FLAG = $10000000;
- {$EXTERNALSYM CERT_NAME_STR_NO_QUOTING_FLAG}
- CERT_NAME_STR_CRLF_FLAG = $08000000;
- {$EXTERNALSYM CERT_NAME_STR_CRLF_FLAG}
- CERT_NAME_STR_COMMA_FLAG = $04000000;
- {$EXTERNALSYM CERT_NAME_STR_COMMA_FLAG}
- CERT_NAME_STR_REVERSE_FLAG = $02000000;
- {$EXTERNALSYM CERT_NAME_STR_REVERSE_FLAG}
-
- CERT_NAME_STR_DISABLE_IE4_UTF8_FLAG = $00010000;
- {$EXTERNALSYM CERT_NAME_STR_DISABLE_IE4_UTF8_FLAG}
- CERT_NAME_STR_ENABLE_T61_UNICODE_FLAG = $00020000;
- {$EXTERNALSYM CERT_NAME_STR_ENABLE_T61_UNICODE_FLAG}
- CERT_NAME_STR_ENABLE_UTF8_UNICODE_FLAG = $00040000;
- {$EXTERNALSYM CERT_NAME_STR_ENABLE_UTF8_UNICODE_FLAG}
-
-//+-------------------------------------------------------------------------
-// Convert the null terminated X500 string to an encoded certificate name.
-//
-// The input string is expected to be formatted the same as the output
-// from the above CertNameToStr API.
-//
-// The CERT_SIMPLE_NAME_STR type isn't supported. Otherwise, when dwStrType
-// is set to 0, CERT_OID_NAME_STR or CERT_X500_NAME_STR, allow either a
-// case insensitive X500 key (CN=), case insensitive "OID." prefixed
-// object identifier (OID.1.2.3.4.5.6=) or an object identifier (1.2.3.4=).
-//
-// If no flags are OR'ed into dwStrType, then, allow "," or ";" as RDN
-// separators and "+" as the multiple RDN value separator. Quoting is
-// supported. A quote may be included in a quoted value by double quoting,
-// for example (CN="Joe ""Cool"""). A value starting with a "#" is treated
-// as ascii hex and converted to a CERT_RDN_OCTET_STRING. Embedded whitespace
-// is skipped (1.2.3 = # AB CD 01 is the same as 1.2.3=#ABCD01).
-//
-// Whitespace surrounding the keys, object identifers and values is removed.
-//
-// CERT_NAME_STR_COMMA_FLAG can be or'ed into dwStrType to only allow the
-// "," as the RDN separator.
-//
-// CERT_NAME_STR_SEMICOLON_FLAG can be or'ed into dwStrType to only allow the
-// ";" as the RDN separator.
-//
-// CERT_NAME_STR_CRLF_FLAG can be or'ed into dwStrType to only allow
-// "\r" or "\n" as the RDN separator.
-//
-// CERT_NAME_STR_NO_PLUS_FLAG can be or'ed into dwStrType to ignore "+"
-// as a separator and not allow multiple values per RDN.
-//
-// CERT_NAME_STR_NO_QUOTING_FLAG can be or'ed into dwStrType to inhibit
-// quoting.
-//
-// CERT_NAME_STR_REVERSE_FLAG can be or'ed into dwStrType to reverse the
-// order of the RDNs after converting from the string and before encoding.
-//
-// CERT_NAME_STR_ENABLE_T61_UNICODE_FLAG can be or'ed into dwStrType to
-// to select the CERT_RDN_T61_STRING encoded value type instead of
-// CERT_RDN_UNICODE_STRING if all the UNICODE characters are <= 0xFF.
-//
-// CERT_NAME_STR_ENABLE_UTF8_UNICODE_FLAG can be or'ed into dwStrType to
-// to select the CERT_RDN_UTF8_STRING encoded value type instead of
-// CERT_RDN_UNICODE_STRING.
-//
-// Support the following X500 Keys:
-//
-// Key Object Identifier RDN Value Type(s)
-// --- ----------------- -----------------
-// CN szOID_COMMON_NAME Printable, Unicode
-// L szOID_LOCALITY_NAME Printable, Unicode
-// O szOID_ORGANIZATION_NAME Printable, Unicode
-// OU szOID_ORGANIZATIONAL_UNIT_NAME Printable, Unicode
-// E szOID_RSA_emailAddr Only IA5
-// Email szOID_RSA_emailAddr Only IA5
-// C szOID_COUNTRY_NAME Only Printable
-// S szOID_STATE_OR_PROVINCE_NAME Printable, Unicode
-// ST szOID_STATE_OR_PROVINCE_NAME Printable, Unicode
-// STREET szOID_STREET_ADDRESS Printable, Unicode
-// T szOID_TITLE Printable, Unicode
-// Title szOID_TITLE Printable, Unicode
-// G szOID_GIVEN_NAME Printable, Unicode
-// GivenName szOID_GIVEN_NAME Printable, Unicode
-// I szOID_INITIALS Printable, Unicode
-// Initials szOID_INITIALS Printable, Unicode
-// SN szOID_SUR_NAME Printable, Unicode
-// DC szOID_DOMAIN_COMPONENT IA5, UTF8
-//
-// Note, T61 is selected instead of Unicode if
-// CERT_NAME_STR_ENABLE_T61_UNICODE_FLAG is set and all the unicode
-// characters are <= 0xFF.
-//
-// Note, UTF8 is selected instead of Unicode if
-// CERT_NAME_STR_ENABLE_UTF8_UNICODE_FLAG is set.
-//
-// Returns TRUE if successfully parsed the input string and encoded
-// the name.
-//
-// If the input string is detected to be invalid, *ppszError is updated
-// to point to the beginning of the invalid character sequence. Otherwise,
-// *ppszError is set to NULL. *ppszError is updated with a non-NULL pointer
-// for the following errors:
-// CRYPT_E_INVALID_X500_STRING
-// CRYPT_E_INVALID_NUMERIC_STRING
-// CRYPT_E_INVALID_PRINTABLE_STRING
-// CRYPT_E_INVALID_IA5_STRING
-//
-// ppszError can be set to NULL if not interested in getting a pointer
-// to the invalid character sequence.
-//--------------------------------------------------------------------------
-
-//+-------------------------------------------------------------------------
-//--------------------------------------------------------------------------
-
-function CertStrToNameA(dwCertEncodingType: DWORD; pszX500: LPCSTR;
- dwStrType: DWORD; pvReserved: Pointer; pbEncoded: LPBYTE; var pcbEncoded: DWORD;
- ppszError: LPLPCSTR): BOOL; stdcall;
-{$EXTERNALSYM CertStrToNameA}
-function CertStrToNameW(dwCertEncodingType: DWORD; pszX500: LPCWSTR;
- dwStrType: DWORD; pvReserved: Pointer; pbEncoded: LPBYTE; var pcbEncoded: DWORD;
- ppszError: LPLPCWSTR): BOOL; stdcall;
-{$EXTERNALSYM CertStrToNameW}
-function CertStrToName(dwCertEncodingType: DWORD; pszX500: LPCTSTR;
- dwStrType: DWORD; pvReserved: Pointer; pbEncoded: LPBYTE; var pcbEncoded: DWORD;
- ppszError: LPLPCTSTR): BOOL; stdcall;
-{$EXTERNALSYM CertStrToName}
-
-//+-------------------------------------------------------------------------
-// Get the subject or issuer name from the certificate and
-// according to the specified format type, convert to a null terminated
-// character string.
-//
-// CERT_NAME_ISSUER_FLAG can be set to get the issuer's name. Otherwise,
-// gets the subject's name.
-//
-// By default, CERT_RDN_T61_STRING encoded values are initially decoded
-// as UTF8. If the UTF8 decoding fails, then, decoded as 8 bit characters.
-// CERT_NAME_DISABLE_IE4_UTF8_FLAG can be set in dwFlags to
-// skip the initial attempt to decode as UTF8.
-//
-// The name string is formatted according to the dwType:
-// CERT_NAME_EMAIL_TYPE
-// If the certificate has a Subject Alternative Name extension (for
-// issuer, Issuer Alternative Name), searches for first rfc822Name choice.
-// If the rfc822Name choice isn't found in the extension, searches the
-// Subject Name field for the Email OID, "1.2.840.113549.1.9.1".
-// If the rfc822Name or Email OID is found, returns the string. Otherwise,
-// returns an empty string (returned character count is 1).
-// CERT_NAME_RDN_TYPE
-// Converts the Subject Name blob by calling CertNameToStr. pvTypePara
-// points to a DWORD containing the dwStrType passed to CertNameToStr.
-// If the Subject Name field is empty and the certificate has a
-// Subject Alternative Name extension, searches for and converts
-// the first directoryName choice.
-// CERT_NAME_ATTR_TYPE
-// pvTypePara points to the Object Identifier specifying the name attribute
-// to be returned. For example, to get the CN,
-// pvTypePara = szOID_COMMON_NAME ("2.5.4.3"). Searches, the Subject Name
-// field for the attribute.
-// If the Subject Name field is empty and the certificate has a
-// Subject Alternative Name extension, checks for
-// the first directoryName choice and searches it.
-//
-// Note, searches the RDNs in reverse order.
-//
-// CERT_NAME_SIMPLE_DISPLAY_TYPE
-// Iterates through the following list of name attributes and searches
-// the Subject Name and then the Subject Alternative Name extension
-// for the first occurrence of:
-// szOID_COMMON_NAME ("2.5.4.3")
-// szOID_ORGANIZATIONAL_UNIT_NAME ("2.5.4.11")
-// szOID_ORGANIZATION_NAME ("2.5.4.10")
-// szOID_RSA_emailAddr ("1.2.840.113549.1.9.1")
-//
-// If none of the above attributes is found, then, searches the
-// Subject Alternative Name extension for a rfc822Name choice.
-//
-// If still no match, then, returns the first attribute.
-//
-// Note, like CERT_NAME_ATTR_TYPE, searches the RDNs in reverse order.
-//
-// CERT_NAME_FRIENDLY_DISPLAY_TYPE
-// First checks if the certificate has a CERT_FRIENDLY_NAME_PROP_ID
-// property. If it does, then, this property is returned. Otherwise,
-// returns the above CERT_NAME_SIMPLE_DISPLAY_TYPE.
-//
-// Returns the number of characters converted including the terminating null
-// character. If pwszNameString is NULL or cchNameString is 0, returns the
-// required size of the destination string (including the terminating null
-// char). If the specified name type isn't found. returns an empty string
-// with a returned character count of 1.
-//
-// If pwszNameString != NULL && cwszNameString != 0, returned pwszNameString
-// is always NULL terminated.
-//
-// Note: cchNameString includes the NULL char.
-//--------------------------------------------------------------------------
-
-//+-------------------------------------------------------------------------
-//--------------------------------------------------------------------------
-
-function CertGetNameStringA(pCertContext: PCCERT_CONTEXT; dwType, dwFlags: DWORD;
- pvTypePara: Pointer; pszNameString: LPSTR; cchNameString: DWORD): DWORD; stdcall;
-{$EXTERNALSYM CertGetNameStringA}
-function CertGetNameStringW(pCertContext: PCCERT_CONTEXT; dwType, dwFlags: DWORD;
- pvTypePara: Pointer; pszNameString: LPWSTR; cchNameString: DWORD): DWORD; stdcall;
-{$EXTERNALSYM CertGetNameStringW}
-function CertGetNameString(pCertContext: PCCERT_CONTEXT; dwType, dwFlags: DWORD;
- pvTypePara: Pointer; pszNameString: LPTSTR; cchNameString: DWORD): DWORD; stdcall;
-{$EXTERNALSYM CertGetNameString}
-
-//+-------------------------------------------------------------------------
-// Certificate name types
-//--------------------------------------------------------------------------
-
-const
- CERT_NAME_EMAIL_TYPE = 1;
- {$EXTERNALSYM CERT_NAME_EMAIL_TYPE}
- CERT_NAME_RDN_TYPE = 2;
- {$EXTERNALSYM CERT_NAME_RDN_TYPE}
- CERT_NAME_ATTR_TYPE = 3;
- {$EXTERNALSYM CERT_NAME_ATTR_TYPE}
- CERT_NAME_SIMPLE_DISPLAY_TYPE = 4;
- {$EXTERNALSYM CERT_NAME_SIMPLE_DISPLAY_TYPE}
- CERT_NAME_FRIENDLY_DISPLAY_TYPE = 5;
- {$EXTERNALSYM CERT_NAME_FRIENDLY_DISPLAY_TYPE}
-
-//+-------------------------------------------------------------------------
-// Certificate name flags
-//--------------------------------------------------------------------------
-
- CERT_NAME_ISSUER_FLAG = $1;
- {$EXTERNALSYM CERT_NAME_ISSUER_FLAG}
- CERT_NAME_DISABLE_IE4_UTF8_FLAG = $00010000;
- {$EXTERNALSYM CERT_NAME_DISABLE_IE4_UTF8_FLAG}
-
-//+=========================================================================
-// Simplified Cryptographic Message Data Structures and APIs
-//==========================================================================
-
-//+-------------------------------------------------------------------------
-// Conventions for the *pb and *pcb output parameters:
-//
-// Upon entry to the function:
-// if pcb is OPTIONAL && pcb == NULL, then,
-// No output is returned
-// else if pb == NULL && pcb != NULL, then,
-// Length only determination. No length error is
-// returned.
-// otherwise where (pb != NULL && pcb != NULL && *pcb != 0)
-// Output is returned. If *pcb isn't big enough a
-// length error is returned. In all cases *pcb is updated
-// with the actual length needed/returned.
-//--------------------------------------------------------------------------
-
-//+-------------------------------------------------------------------------
-// Type definitions of the parameters used for doing the cryptographic
-// operations.
-//--------------------------------------------------------------------------
-
-//+-------------------------------------------------------------------------
-// Callback to get and verify the signer's certificate.
-//
-// Passed the CertId of the signer (its Issuer and SerialNumber) and a
-// handle to its cryptographic signed message's cert store.
-//
-// For CRYPT_E_NO_SIGNER, called with pSignerId == NULL.
-//
-// For a valid signer certificate, returns a pointer to a read only
-// CERT_CONTEXT. The returned CERT_CONTEXT is either obtained from a
-// cert store or was created via CertCreateCertificateContext. For either case,
-// its freed via CertFreeCertificateContext.
-//
-// If a valid certificate isn't found, this callback returns NULL with
-// LastError set via SetLastError().
-//
-// The NULL implementation tries to get the Signer certificate from the
-// message cert store. It doesn't verify the certificate.
-//
-// Note, if the KEYID choice was selected for a CMS SignerId, then, the
-// SerialNumber is 0 and the Issuer is encoded containing a single RDN with a
-// single Attribute whose OID is szOID_KEYID_RDN, value type is
-// CERT_RDN_OCTET_STRING and value is the KEYID. When the
-// CertGetSubjectCertificateFromStore and
-// CertFindCertificateInStore(CERT_FIND_SUBJECT_CERT) APIs see this
-// special KEYID Issuer and SerialNumber, they do a KEYID match.
-//--------------------------------------------------------------------------
-
-type
- PFN_CRYPT_GET_SIGNER_CERTIFICATE = function(pvGetArg: Pointer;
- dwCertEncodingType: DWORD; pSignerId: PCERT_INFO;
- hMsgCertStore: HCERTSTORE): PCCERT_CONTEXT; stdcall;
- {$EXTERNALSYM PFN_CRYPT_GET_SIGNER_CERTIFICATE}
- PfnCryptGetSignerCertificate = PFN_CRYPT_GET_SIGNER_CERTIFICATE;
-
-//+-------------------------------------------------------------------------
-// The CRYPT_SIGN_MESSAGE_PARA are used for signing messages using the
-// specified signing certificate context.
-//
-// Either the CERT_KEY_PROV_HANDLE_PROP_ID or CERT_KEY_PROV_INFO_PROP_ID must
-// be set for each rgpSigningCert[]. Either one specifies the private
-// signature key to use.
-//
-// If any certificates and/or CRLs are to be included in the signed message,
-// then, the MsgCert and MsgCrl parameters need to be updated. If the
-// rgpSigningCerts are to be included, then, they must also be in the
-// rgpMsgCert array.
-//
-// cbSize must be set to the sizeof(CRYPT_SIGN_MESSAGE_PARA) or else
-// LastError will be updated with E_INVALIDARG.
-//
-// pvHashAuxInfo currently isn't used and must be set to NULL.
-//
-// dwFlags normally is set to 0. However, if the encoded output
-// is to be a CMSG_SIGNED inner content of an outer cryptographic message,
-// such as a CMSG_ENVELOPED, then, the CRYPT_MESSAGE_BARE_CONTENT_OUT_FLAG
-// should be set. If not set, then it would be encoded as an inner content
-// type of CMSG_DATA.
-//
-// dwInnerContentType is normally set to 0. It needs to be set if the
-// ToBeSigned input is the encoded output of another cryptographic
-// message, such as, an CMSG_ENVELOPED. When set, it's one of the cryptographic
-// message types, for example, CMSG_ENVELOPED.
-//
-// If the inner content of a nested cryptographic message is data (CMSG_DATA
-// the default), then, neither dwFlags or dwInnerContentType need to be set.
-//
-// For CMS messages, CRYPT_MESSAGE_ENCAPSULATED_CONTENT_OUT_FLAG may be
-// set to encapsulate nonData inner content within an OCTET STRING.
-//
-// For CMS messages, CRYPT_MESSAGE_KEYID_SIGNER_FLAG may be set to identify
-// signers by their Key Identifier and not their Issuer and Serial Number.
-//
-// If HashEncryptionAlgorithm is present and not NULL its used instead of
-// the SigningCert's PublicKeyInfo.Algorithm.
-//
-// Note, for RSA, the hash encryption algorithm is normally the same as
-// the public key algorithm. For DSA, the hash encryption algorithm is
-// normally a DSS signature algorithm.
-//
-// pvHashEncryptionAuxInfo currently isn't used and must be set to NULL if
-// present in the data structure.
-//--------------------------------------------------------------------------
-
-type
- PCRYPT_SIGN_MESSAGE_PARA = ^CRYPT_SIGN_MESSAGE_PARA;
- {$EXTERNALSYM PCRYPT_SIGN_MESSAGE_PARA}
- _CRYPT_SIGN_MESSAGE_PARA = record
- cbSize: DWORD;
- dwMsgEncodingType: DWORD;
- pSigningCert: PCCERT_CONTEXT;
- HashAlgorithm: CRYPT_ALGORITHM_IDENTIFIER;
- pvHashAuxInfo: Pointer;
- cMsgCert: DWORD;
- rgpMsgCert: PPCCERT_CONTEXT;
- cMsgCrl: DWORD;
- rgpMsgCrl: PPCCRL_CONTEXT;
- cAuthAttr: DWORD;
- rgAuthAttr: PCRYPT_ATTRIBUTE;
- cUnauthAttr: DWORD;
- rgUnauthAttr: PCRYPT_ATTRIBUTE;
- dwFlags: DWORD;
- dwInnerContentType: DWORD;
- {$IFDEF CRYPT_SIGN_MESSAGE_PARA_HAS_CMS_FIELDS}
- HashEncryptionAlgorithm: CRYPT_ALGORITHM_IDENTIFIER;
- pvHashEncryptionAuxInfo: Pointer;
- {$ENDIF CRYPT_SIGN_MESSAGE_PARA_HAS_CMS_FIELDS}
- end;
- {$EXTERNALSYM _CRYPT_SIGN_MESSAGE_PARA}
- CRYPT_SIGN_MESSAGE_PARA = _CRYPT_SIGN_MESSAGE_PARA;
- {$EXTERNALSYM CRYPT_SIGN_MESSAGE_PARA}
- TCryptSignMessagePara = CRYPT_SIGN_MESSAGE_PARA;
- PCryptSignMessagePara = PCRYPT_SIGN_MESSAGE_PARA;
-
-const
- CRYPT_MESSAGE_BARE_CONTENT_OUT_FLAG = $1;
- {$EXTERNALSYM CRYPT_MESSAGE_BARE_CONTENT_OUT_FLAG}
-
-// When set, nonData type inner content is encapsulated within an
-// OCTET STRING
-
- CRYPT_MESSAGE_ENCAPSULATED_CONTENT_OUT_FLAG = $2;
- {$EXTERNALSYM CRYPT_MESSAGE_ENCAPSULATED_CONTENT_OUT_FLAG}
-
-// When set, signers are identified by their Key Identifier and not
-// their Issuer and Serial Number.
-
- CRYPT_MESSAGE_KEYID_SIGNER_FLAG = $4;
- {$EXTERNALSYM CRYPT_MESSAGE_KEYID_SIGNER_FLAG}
-
-//+-------------------------------------------------------------------------
-// The CRYPT_VERIFY_MESSAGE_PARA are used to verify signed messages.
-//
-// hCryptProv is used to do hashing and signature verification.
-//
-// The dwCertEncodingType specifies the encoding type of the certificates
-// and/or CRLs in the message.
-//
-// pfnGetSignerCertificate is called to get and verify the message signer's
-// certificate.
-//
-// cbSize must be set to the sizeof(CRYPT_VERIFY_MESSAGE_PARA) or else
-// LastError will be updated with E_INVALIDARG.
-//--------------------------------------------------------------------------
-
-type
- PCRYPT_VERIFY_MESSAGE_PARA = ^CRYPT_VERIFY_MESSAGE_PARA;
- {$EXTERNALSYM PCRYPT_VERIFY_MESSAGE_PARA}
- _CRYPT_VERIFY_MESSAGE_PARA = record
- cbSize: DWORD;
- dwMsgAndCertEncodingType: DWORD;
- hCryptProv: HCRYPTPROV;
- pfnGetSignerCertificate: PFN_CRYPT_GET_SIGNER_CERTIFICATE;
- pvGetArg: Pointer;
- end;
- {$EXTERNALSYM _CRYPT_VERIFY_MESSAGE_PARA}
- CRYPT_VERIFY_MESSAGE_PARA = _CRYPT_VERIFY_MESSAGE_PARA;
- {$EXTERNALSYM CRYPT_VERIFY_MESSAGE_PARA}
- TCryptVerifyMessagePara = CRYPT_VERIFY_MESSAGE_PARA;
- PCryptVerifyMessagePara = PCRYPT_VERIFY_MESSAGE_PARA;
-
-//+-------------------------------------------------------------------------
-// The CRYPT_ENCRYPT_MESSAGE_PARA are used for encrypting messages.
-//
-// hCryptProv is used to do content encryption, recipient key
-// encryption, and recipient key export. Its private key
-// isn't used.
-//
-// Currently, pvEncryptionAuxInfo is only defined for RC2 or RC4 encryption
-// algorithms. Otherwise, its not used and must be set to NULL.
-// See CMSG_RC2_AUX_INFO for the RC2 encryption algorithms.
-// See CMSG_RC4_AUX_INFO for the RC4 encryption algorithms.
-//
-// To enable SP3 compatible encryption, pvEncryptionAuxInfo should point to
-// a CMSG_SP3_COMPATIBLE_AUX_INFO data structure.
-//
-// cbSize must be set to the sizeof(CRYPT_ENCRYPT_MESSAGE_PARA) or else
-// LastError will be updated with E_INVALIDARG.
-//
-// dwFlags normally is set to 0. However, if the encoded output
-// is to be a CMSG_ENVELOPED inner content of an outer cryptographic message,
-// such as a CMSG_SIGNED, then, the CRYPT_MESSAGE_BARE_CONTENT_OUT_FLAG
-// should be set. If not set, then it would be encoded as an inner content
-// type of CMSG_DATA.
-//
-// dwInnerContentType is normally set to 0. It needs to be set if the
-// ToBeEncrypted input is the encoded output of another cryptographic
-// message, such as, an CMSG_SIGNED. When set, it's one of the cryptographic
-// message types, for example, CMSG_SIGNED.
-//
-// If the inner content of a nested cryptographic message is data (CMSG_DATA
-// the default), then, neither dwFlags or dwInnerContentType need to be set.
-//
-// For CMS messages, CRYPT_MESSAGE_ENCAPSULATED_CONTENT_OUT_FLAG may be
-// set to encapsulate nonData inner content within an OCTET STRING before
-// encrypting.
-//
-// For CMS messages, CRYPT_MESSAGE_KEYID_RECIPIENT_FLAG may be set to identify
-// recipients by their Key Identifier and not their Issuer and Serial Number.
-//--------------------------------------------------------------------------
-
-type
- PCRYPT_ENCRYPT_MESSAGE_PARA = ^CRYPT_ENCRYPT_MESSAGE_PARA;
- {$EXTERNALSYM PCRYPT_ENCRYPT_MESSAGE_PARA}
- _CRYPT_ENCRYPT_MESSAGE_PARA = record
- cbSize: DWORD;
- dwMsgEncodingType: DWORD;
- hCryptProv: HCRYPTPROV;
- ContentEncryptionAlgorithm: CRYPT_ALGORITHM_IDENTIFIER;
- pvEncryptionAuxInfo: Pointer;
- dwFlags: DWORD;
- dwInnerContentType: DWORD;
- end;
- {$EXTERNALSYM _CRYPT_ENCRYPT_MESSAGE_PARA}
- CRYPT_ENCRYPT_MESSAGE_PARA = _CRYPT_ENCRYPT_MESSAGE_PARA;
- {$EXTERNALSYM CRYPT_ENCRYPT_MESSAGE_PARA}
- TCryptEncryptMessagePara = CRYPT_ENCRYPT_MESSAGE_PARA;
- PCryptEncryptMessagePara = PCRYPT_ENCRYPT_MESSAGE_PARA;
-
-// When set, recipients are identified by their Key Identifier and not
-// their Issuer and Serial Number.
-
-const
- CRYPT_MESSAGE_KEYID_RECIPIENT_FLAG = $4;
- {$EXTERNALSYM CRYPT_MESSAGE_KEYID_RECIPIENT_FLAG}
-
-//+-------------------------------------------------------------------------
-// The CRYPT_DECRYPT_MESSAGE_PARA are used for decrypting messages.
-//
-// The CertContext to use for decrypting a message is obtained from one
-// of the specified cert stores. An encrypted message can have one or
-// more recipients. The recipients are identified by their CertId (Issuer
-// and SerialNumber). The cert stores are searched to find the CertContext
-// corresponding to the CertId.
-//
-// For CMS, the recipients may also be identified by their KeyId.
-// CMS also allows Key Agreement (Diffie Hellman) in addition to
-// Key Transport (RSA) recipients.
-//
-// Only CertContexts in the store with either
-// the CERT_KEY_PROV_HANDLE_PROP_ID or CERT_KEY_PROV_INFO_PROP_ID set
-// can be used. Either property specifies the private exchange key to use.
-//
-// cbSize must be set to the sizeof(CRYPT_DECRYPT_MESSAGE_PARA) or else
-// LastError will be updated with E_INVALIDARG.
-//--------------------------------------------------------------------------
-
-type
- PCRYPT_DECRYPT_MESSAGE_PARA = ^CRYPT_DECRYPT_MESSAGE_PARA;
- {$EXTERNALSYM PCRYPT_DECRYPT_MESSAGE_PARA}
- _CRYPT_DECRYPT_MESSAGE_PARA = record
- cbSize: DWORD;
- dwMsgAndCertEncodingType: DWORD;
- cCertStore: DWORD;
- rghCertStore: PHCERTSTORE;
- end;
- {$EXTERNALSYM _CRYPT_DECRYPT_MESSAGE_PARA}
- CRYPT_DECRYPT_MESSAGE_PARA = _CRYPT_DECRYPT_MESSAGE_PARA;
- {$EXTERNALSYM CRYPT_DECRYPT_MESSAGE_PARA}
- TCryptDecryptMessagePara = CRYPT_DECRYPT_MESSAGE_PARA;
- PCryptDecryptMessagePara = PCRYPT_DECRYPT_MESSAGE_PARA;
-
-//+-------------------------------------------------------------------------
-// The CRYPT_HASH_MESSAGE_PARA are used for hashing or unhashing
-// messages.
-//
-// hCryptProv is used to compute the hash.
-//
-// pvHashAuxInfo currently isn't used and must be set to NULL.
-//
-// cbSize must be set to the sizeof(CRYPT_HASH_MESSAGE_PARA) or else
-// LastError will be updated with E_INVALIDARG.
-//--------------------------------------------------------------------------
-
- PCRYPT_HASH_MESSAGE_PARA = ^CRYPT_HASH_MESSAGE_PARA;
- {$EXTERNALSYM PCRYPT_HASH_MESSAGE_PARA}
- _CRYPT_HASH_MESSAGE_PARA = record
- cbSize: DWORD;
- dwMsgEncodingType: DWORD;
- hCryptProv: HCRYPTPROV;
- HashAlgorithm: CRYPT_ALGORITHM_IDENTIFIER;
- pvHashAuxInfo: Pointer;
- end;
- {$EXTERNALSYM _CRYPT_HASH_MESSAGE_PARA}
- CRYPT_HASH_MESSAGE_PARA = _CRYPT_HASH_MESSAGE_PARA;
- {$EXTERNALSYM CRYPT_HASH_MESSAGE_PARA}
- TCryptHashMessagePara = CRYPT_HASH_MESSAGE_PARA;
- PCryptHashMessagePara = PCRYPT_HASH_MESSAGE_PARA;
-
-//+-------------------------------------------------------------------------
-// The CRYPT_KEY_SIGN_MESSAGE_PARA are used for signing messages until a
-// certificate has been created for the signature key.
-//
-// pvHashAuxInfo currently isn't used and must be set to NULL.
-//
-// If PubKeyAlgorithm isn't set, defaults to szOID_RSA_RSA.
-//
-// cbSize must be set to the sizeof(CRYPT_KEY_SIGN_MESSAGE_PARA) or else
-// LastError will be updated with E_INVALIDARG.
-//--------------------------------------------------------------------------
-
- PCRYPT_KEY_SIGN_MESSAGE_PARA = ^CRYPT_KEY_SIGN_MESSAGE_PARA;
- {$EXTERNALSYM PCRYPT_KEY_SIGN_MESSAGE_PARA}
- _CRYPT_KEY_SIGN_MESSAGE_PARA = record
- cbSize: DWORD;
- dwMsgAndCertEncodingType: DWORD;
- hCryptProv: HCRYPTPROV;
- dwKeySpec: DWORD;
- HashAlgorithm: CRYPT_ALGORITHM_IDENTIFIER;
- pvHashAuxInfo: Pointer;
- PubKeyAlgorithm: CRYPT_ALGORITHM_IDENTIFIER;
- end;
- {$EXTERNALSYM _CRYPT_KEY_SIGN_MESSAGE_PARA}
- CRYPT_KEY_SIGN_MESSAGE_PARA = _CRYPT_KEY_SIGN_MESSAGE_PARA;
- {$EXTERNALSYM CRYPT_KEY_SIGN_MESSAGE_PARA}
- TCryptKeySignMessagePara = CRYPT_KEY_SIGN_MESSAGE_PARA;
- PCryptKeySignMessagePara = PCRYPT_KEY_SIGN_MESSAGE_PARA;
-
-//+-------------------------------------------------------------------------
-// The CRYPT_KEY_VERIFY_MESSAGE_PARA are used to verify signed messages without
-// a certificate for the signer.
-//
-// Normally used until a certificate has been created for the key.
-//
-// hCryptProv is used to do hashing and signature verification.
-//
-// cbSize must be set to the sizeof(CRYPT_KEY_VERIFY_MESSAGE_PARA) or else
-// LastError will be updated with E_INVALIDARG.
-//--------------------------------------------------------------------------
-
- PCRYPT_KEY_VERIFY_MESSAGE_PARA = ^CRYPT_KEY_VERIFY_MESSAGE_PARA;
- {$EXTERNALSYM PCRYPT_KEY_VERIFY_MESSAGE_PARA}
- _CRYPT_KEY_VERIFY_MESSAGE_PARA = record
- cbSize: DWORD;
- dwMsgEncodingType: DWORD;
- hCryptProv: HCRYPTPROV;
- end;
- {$EXTERNALSYM _CRYPT_KEY_VERIFY_MESSAGE_PARA}
- CRYPT_KEY_VERIFY_MESSAGE_PARA = _CRYPT_KEY_VERIFY_MESSAGE_PARA;
- {$EXTERNALSYM CRYPT_KEY_VERIFY_MESSAGE_PARA}
- TCryptKeyVerifyMessagePara = CRYPT_KEY_VERIFY_MESSAGE_PARA;
- PCryptKeyVerifyMessagePara = PCRYPT_KEY_VERIFY_MESSAGE_PARA;
-
-//+-------------------------------------------------------------------------
-// Sign the message.
-//
-// If fDetachedSignature is TRUE, the "to be signed" content isn't included
-// in the encoded signed blob.
-//--------------------------------------------------------------------------
-
-function CryptSignMessage(pSignPara: PCRYPT_SIGN_MESSAGE_PARA;
- fDetachedSignature: BOOL; cToBeSigned: DWORD; rgpbToBeSigned: LPBYTE;
- rgcbToBeSigned: LPDWORD; pbSignedBlob: LPBYTE; var pcbSignedBlob: DWORD): BOOL; stdcall;
-{$EXTERNALSYM CryptSignMessage}
-
-//+-------------------------------------------------------------------------
-// Verify a signed message.
-//
-// If pbDecoded == NULL, then, *pcbDecoded is implicitly set to 0 on input.
-// For *pcbDecoded == 0 && ppSignerCert == NULL on input, the signer isn't
-// verified.
-//
-// A message might have more than one signer. Set dwSignerIndex to iterate
-// through all the signers. dwSignerIndex == 0 selects the first signer.
-//
-// pVerifyPara's pfnGetSignerCertificate is called to get the signer's
-// certificate.
-//
-// For a verified signer and message, *ppSignerCert is updated
-// with the CertContext of the signer. It must be freed by calling
-// CertFreeCertificateContext. Otherwise, *ppSignerCert is set to NULL.
-//
-// ppSignerCert can be NULL, indicating the caller isn't interested
-// in getting the CertContext of the signer.
-//
-// pcbDecoded can be NULL, indicating the caller isn't interested in getting
-// the decoded content. Furthermore, if the message doesn't contain any
-// content or signers, then, pcbDecoded must be set to NULL, to allow the
-// pVerifyPara->pfnGetCertificate to be called. Normally, this would be
-// the case when the signed message contains only certficates and CRLs.
-// If pcbDecoded is NULL and the message doesn't have the indicated signer,
-// pfnGetCertificate is called with pSignerId set to NULL.
-//
-// If the message doesn't contain any signers || dwSignerIndex > message's
-// SignerCount, then, an error is returned with LastError set to
-// CRYPT_E_NO_SIGNER. Also, for CRYPT_E_NO_SIGNER, pfnGetSignerCertificate
-// is still called with pSignerId set to NULL.
-//
-// Note, an alternative way to get the certificates and CRLs from a
-// signed message is to call CryptGetMessageCertificates.
-//--------------------------------------------------------------------------
-
-function CryptVerifyMessageSignature(pVerifyPara: PCRYPT_VERIFY_MESSAGE_PARA;
- dwSignerIndex: DWORD; pbSignedBlob: LPBYTE; cbSignedBlob: DWORD;
- pbDecoded: LPBYTE; pcbDecoded: LPDWORD; ppSignerCert: PPCCERT_CONTEXT): BOOL; stdcall;
-{$EXTERNALSYM CryptVerifyMessageSignature}
-
-//+-------------------------------------------------------------------------
-// Returns the count of signers in the signed message. For no signers, returns
-// 0. For an error returns -1 with LastError updated accordingly.
-//--------------------------------------------------------------------------
-
-function CryptGetMessageSignerCount(dwMsgEncodingType: DWORD; pbSignedBlob: LPBYTE;
- cbSignedBlob: DWORD): LONG; stdcall;
-{$EXTERNALSYM CryptGetMessageSignerCount}
-
-//+-------------------------------------------------------------------------
-// Returns the cert store containing the message's certs and CRLs.
-// For an error, returns NULL with LastError updated.
-//--------------------------------------------------------------------------
-
-function CryptGetMessageCertificates(dwMsgAndCertEncodingType: DWORD;
- hCryptProv: HCRYPTPROV; dwFlags: DWORD; pbSignedBlob: LPBYTE;
- cbSignedBlob: DWORD): HCERTSTORE; stdcall;
-{$EXTERNALSYM CryptGetMessageCertificates}
-
-//+-------------------------------------------------------------------------
-// Verify a signed message containing detached signature(s).
-// The "to be signed" content is passed in separately. No
-// decoded output. Otherwise, identical to CryptVerifyMessageSignature.
-//--------------------------------------------------------------------------
-
-function CryptVerifyDetachedMessageSignature(pVerifyPara: PCRYPT_VERIFY_MESSAGE_PARA;
- dwSignerIndex: DWORD; pbDetachedSignBlob: LPBYTE; cbDetachedSignBlob: DWORD;
- cToBeSigned: DWORD; rgpbToBeSigned: LPBYTE; rgcbToBeSigned: LPDWORD;
- ppSignerCert: PPCCERT_CONTEXT): BOOL; stdcall;
-{$EXTERNALSYM CryptVerifyDetachedMessageSignature}
-
-//+-------------------------------------------------------------------------
-// Encrypts the message for the recipient(s).
-//--------------------------------------------------------------------------
-
-function CryptEncryptMessage(pEncryptPara: PCRYPT_ENCRYPT_MESSAGE_PARA;
- cRecipientCert: DWORD; rgpRecipientCert: PCCERT_CONTEXT; pbToBeEncrypted: LPBYTE;
- cbToBeEncrypted: DWORD; pbEncryptedBlob: LPBYTE; var pcbEncryptedBlob: DWORD): BOOL; stdcall;
-{$EXTERNALSYM CryptEncryptMessage}
-
-//+-------------------------------------------------------------------------
-// Decrypts the message.
-//
-// If pbDecrypted == NULL, then, *pcbDecrypted is implicitly set to 0 on input.
-// For *pcbDecrypted == 0 && ppXchgCert == NULL on input, the message isn't
-// decrypted.
-//
-// For a successfully decrypted message, *ppXchgCert is updated
-// with the CertContext used to decrypt. It must be freed by calling
-// CertStoreFreeCert. Otherwise, *ppXchgCert is set to NULL.
-//
-// ppXchgCert can be NULL, indicating the caller isn't interested
-// in getting the CertContext used to decrypt.
-//--------------------------------------------------------------------------
-
-function CryptDecryptMessage(pDecryptPara: PCRYPT_DECRYPT_MESSAGE_PARA;
- pbEncryptedBlob: LPBYTE; cbEncryptedBlob: DWORD; pbDecrypted: LPBYTE;
- pcbDecrypted: LPDWORD; ppXchgCert: PPCCERT_CONTEXT): BOOL; stdcall;
-{$EXTERNALSYM CryptDecryptMessage}
-
-//+-------------------------------------------------------------------------
-// Sign the message and encrypt for the recipient(s). Does a CryptSignMessage
-// followed with a CryptEncryptMessage.
-//
-// Note: this isn't the CMSG_SIGNED_AND_ENVELOPED. Its a CMSG_SIGNED
-// inside of an CMSG_ENVELOPED.
-//--------------------------------------------------------------------------
-
-function CryptSignAndEncryptMessage(pSignPara: PCRYPT_SIGN_MESSAGE_PARA;
- pEncryptPara: PCRYPT_ENCRYPT_MESSAGE_PARA; cRecipientCert: DWORD;
- rgpRecipientCert: PCCERT_CONTEXT; pbToBeSignedAndEncrypted: LPBYTE;
- cbToBeSignedAndEncrypted: DWORD; pbSignedAndEncryptedBlob: LPBYTE;
- var pcbSignedAndEncryptedBlob: DWORD): BOOL; stdcall;
-{$EXTERNALSYM CryptSignAndEncryptMessage}
-
-//+-------------------------------------------------------------------------
-// Decrypts the message and verifies the signer. Does a CryptDecryptMessage
-// followed with a CryptVerifyMessageSignature.
-//
-// If pbDecrypted == NULL, then, *pcbDecrypted is implicitly set to 0 on input.
-// For *pcbDecrypted == 0 && ppSignerCert == NULL on input, the signer isn't
-// verified.
-//
-// A message might have more than one signer. Set dwSignerIndex to iterate
-// through all the signers. dwSignerIndex == 0 selects the first signer.
-//
-// The pVerifyPara's VerifySignerPolicy is called to verify the signer's
-// certificate.
-//
-// For a successfully decrypted and verified message, *ppXchgCert and
-// *ppSignerCert are updated. They must be freed by calling
-// CertStoreFreeCert. Otherwise, they are set to NULL.
-//
-// ppXchgCert and/or ppSignerCert can be NULL, indicating the
-// caller isn't interested in getting the CertContext.
-//
-// Note: this isn't the CMSG_SIGNED_AND_ENVELOPED. Its a CMSG_SIGNED
-// inside of an CMSG_ENVELOPED.
-//
-// The message always needs to be decrypted to allow access to the
-// signed message. Therefore, if ppXchgCert != NULL, its always updated.
-//--------------------------------------------------------------------------
-
-function CryptDecryptAndVerifyMessageSignature(pDecryptPara: PCRYPT_DECRYPT_MESSAGE_PARA;
- pVerifyPara: PCRYPT_VERIFY_MESSAGE_PARA; dwSignerIndex: DWORD; pbEncryptedBlob: LPBYTE;
- cbEncryptedBlob: DWORD; pbDecrypted: LPBYTE; pcbDecrypted: LPDWORD;
- ppXchgCert: PPCCERT_CONTEXT; ppSignerCert: PPCCERT_CONTEXT): BOOL; stdcall;
-{$EXTERNALSYM CryptDecryptAndVerifyMessageSignature}
-
-//+-------------------------------------------------------------------------
-// Decodes a cryptographic message which may be one of the following types:
-// CMSG_DATA
-// CMSG_SIGNED
-// CMSG_ENVELOPED
-// CMSG_SIGNED_AND_ENVELOPED
-// CMSG_HASHED
-//
-// dwMsgTypeFlags specifies the set of allowable messages. For example, to
-// decode either SIGNED or ENVELOPED messages, set dwMsgTypeFlags to:
-// CMSG_SIGNED_FLAG | CMSG_ENVELOPED_FLAG.
-//
-// dwProvInnerContentType is only applicable when processing nested
-// crytographic messages. When processing an outer crytographic message
-// it must be set to 0. When decoding a nested cryptographic message
-// its the dwInnerContentType returned by a previous CryptDecodeMessage
-// of the outer message. The InnerContentType can be any of the CMSG types,
-// for example, CMSG_DATA, CMSG_SIGNED, ...
-//
-// The optional *pdwMsgType is updated with the type of message.
-//
-// The optional *pdwInnerContentType is updated with the type of the inner
-// message. Unless there is cryptographic message nesting, CMSG_DATA
-// is returned.
-//
-// For CMSG_DATA: returns decoded content.
-// For CMSG_SIGNED: same as CryptVerifyMessageSignature.
-// For CMSG_ENVELOPED: same as CryptDecryptMessage.
-// For CMSG_SIGNED_AND_ENVELOPED: same as CryptDecryptMessage plus
-// CryptVerifyMessageSignature.
-// For CMSG_HASHED: verifies the hash and returns decoded content.
-//--------------------------------------------------------------------------
-
-function CryptDecodeMessage(dwMsgTypeFlags: DWORD; pDecryptPara: PCRYPT_DECRYPT_MESSAGE_PARA;
- pVerifyPara: PCRYPT_VERIFY_MESSAGE_PARA; dwSignerIndex: DWORD; pbEncodedBlob: LPBYTE;
- cbEncodedBlob: DWORD; dwPrevInnerContentType: DWORD; pdwMsgType: LPDWORD;
- pdwInnerContentType: LPDWORD; pbDecoded: LPBYTE; pcbDecoded: LPDWORD;
- ppXchgCert: PPCCERT_CONTEXT; ppSignerCert: PPCCERT_CONTEXT): BOOL; stdcall;
-{$EXTERNALSYM CryptDecodeMessage}
-
-//+-------------------------------------------------------------------------
-// Hash the message.
-//
-// If fDetachedHash is TRUE, only the ComputedHash is encoded in the
-// pbHashedBlob. Otherwise, both the ToBeHashed and ComputedHash
-// are encoded.
-//
-// pcbHashedBlob or pcbComputedHash can be NULL, indicating the caller
-// isn't interested in getting the output.
-//--------------------------------------------------------------------------
-
-function CryptHashMessage(pHashPara: PCRYPT_HASH_MESSAGE_PARA; fDetachedHash: BOOL;
- cToBeHashed: DWORD; rgpbToBeHashed: LPBYTE; rgcbToBeHashed: LPDWORD;
- pbHashedBlob: LPBYTE; pcbHashedBlob: LPDWORD; pbComputedHash: LPBYTE;
- pcbComputedHash: LPDWORD): BOOL; stdcall;
-{$EXTERNALSYM CryptHashMessage}
-
-//+-------------------------------------------------------------------------
-// Verify a hashed message.
-//
-// pcbToBeHashed or pcbComputedHash can be NULL,
-// indicating the caller isn't interested in getting the output.
-//--------------------------------------------------------------------------
-
-function CryptVerifyMessageHash(pHashPara: PCRYPT_HASH_MESSAGE_PARA;
- pbHashedBlob: LPBYTE; cbHashedBlob: DWORD; pbToBeHashed: LPBYTE;
- pcbToBeHashed: LPDWORD; pbComputedHash: LPBYTE; pcbComputedHash: LPDWORD): BOOL; stdcall;
-{$EXTERNALSYM CryptVerifyMessageHash}
-
-//+-------------------------------------------------------------------------
-// Verify a hashed message containing a detached hash.
-// The "to be hashed" content is passed in separately. No
-// decoded output. Otherwise, identical to CryptVerifyMessageHash.
-//
-// pcbComputedHash can be NULL, indicating the caller isn't interested
-// in getting the output.
-//--------------------------------------------------------------------------
-
-function CryptVerifyDetachedMessageHash(pHashPara: PCRYPT_HASH_MESSAGE_PARA;
- pbDetachedHashBlob: LPBYTE; cbDetachedHashBlob: DWORD; cToBeHashed: DWORD;
- rgpbToBeHashed: LPBYTE; rgcbToBeHashed: LPDWORD; pbComputedHash: LPBYTE;
- pcbComputedHash: LPDWORD): BOOL; stdcall;
-{$EXTERNALSYM CryptVerifyDetachedMessageHash}
-
-//+-------------------------------------------------------------------------
-// Sign the message using the provider's private key specified in the
-// parameters. A dummy SignerId is created and stored in the message.
-//
-// Normally used until a certificate has been created for the key.
-//--------------------------------------------------------------------------
-
-function CryptSignMessageWithKey(pSignPara: PCRYPT_KEY_SIGN_MESSAGE_PARA;
- pbToBeSigned: LPBYTE; cbToBeSigned: DWORD; pbSignedBlob: LPBYTE;
- var pcbSignedBlob: DWORD): BOOL; stdcall;
-{$EXTERNALSYM CryptSignMessageWithKey}
-
-//+-------------------------------------------------------------------------
-// Verify a signed message using the specified public key info.
-//
-// Normally called by a CA until it has created a certificate for the
-// key.
-//
-// pPublicKeyInfo contains the public key to use to verify the signed
-// message. If NULL, the signature isn't verified (for instance, the decoded
-// content may contain the PublicKeyInfo).
-//
-// pcbDecoded can be NULL, indicating the caller isn't interested
-// in getting the decoded content.
-//--------------------------------------------------------------------------
-
-function CryptVerifyMessageSignatureWithKey(pVerifyPara: PCRYPT_KEY_VERIFY_MESSAGE_PARA;
- pPublicKeyInfo: PCERT_PUBLIC_KEY_INFO; pbSignedBlob: LPBYTE; cbSignedBlob: DWORD;
- pbDecoded: LPBYTE; pcbDecoded: LPDWORD): BOOL; stdcall;
-{$EXTERNALSYM CryptVerifyMessageSignatureWithKey}
-
-//+=========================================================================
-// System Certificate Store Data Structures and APIs
-//==========================================================================
-
-//+-------------------------------------------------------------------------
-// Get a system certificate store based on a subsystem protocol.
-//
-// Current examples of subsystems protocols are:
-// "MY" Cert Store hold certs with associated Private Keys
-// "CA" Certifying Authority certs
-// "ROOT" Root Certs
-// "SPC" Software publisher certs
-//
-//
-// If hProv is NULL the default provider "1" is opened for you.
-// When the store is closed the provider is release. Otherwise
-// if hProv is not NULL, no provider is created or released.
-//
-// The returned Cert Store can be searched for an appropriate Cert
-// using the Cert Store API's (see certstor.h)
-//
-// When done, the cert store should be closed using CertStoreClose
-//--------------------------------------------------------------------------
-
-function CertOpenSystemStoreA(hProv: HCRYPTPROV; szSubsystemProtocol: LPCSTR): HCERTSTORE; stdcall;
-{$EXTERNALSYM CertOpenSystemStoreA}
-function CertOpenSystemStoreW(hProv: HCRYPTPROV; szSubsystemProtocol: LPCWSTR): HCERTSTORE; stdcall;
-{$EXTERNALSYM CertOpenSystemStoreW}
-function CertOpenSystemStore(hProv: HCRYPTPROV; szSubsystemProtocol: LPCTSTR): HCERTSTORE; stdcall;
-{$EXTERNALSYM CertOpenSystemStore}
-
-function CertAddEncodedCertificateToSystemStoreA(szCertStoreName: LPCSTR;
- pbCertEncoded: LPBYTE; cbCertEncoded: DWORD): BOOL; stdcall;
-{$EXTERNALSYM CertAddEncodedCertificateToSystemStoreA}
-function CertAddEncodedCertificateToSystemStoreW(szCertStoreName: LPCWSTR;
- pbCertEncoded: LPBYTE; cbCertEncoded: DWORD): BOOL; stdcall;
-{$EXTERNALSYM CertAddEncodedCertificateToSystemStoreW}
-function CertAddEncodedCertificateToSystemStore(szCertStoreName: LPCTSTR;
- pbCertEncoded: LPBYTE; cbCertEncoded: DWORD): BOOL; stdcall;
-{$EXTERNALSYM CertAddEncodedCertificateToSystemStore}
-
-//+-------------------------------------------------------------------------
-// Find all certificate chains tying the given issuer name to any certificate
-// that the current user has a private key for.
-//
-// If no certificate chain is found, FALSE is returned with LastError set
-// to CRYPT_E_NOT_FOUND and the counts zeroed.
-//
-// IE 3.0 ASSUMPTION:
-// The client certificates are in the "My" system store. The issuer
-// cerificates may be in the "Root", "CA" or "My" system stores.
-//--------------------------------------------------------------------------
-
-type
- PCERT_CHAIN = ^CERT_CHAIN;
- {$EXTERNALSYM PCERT_CHAIN}
- _CERT_CHAIN = record
- cCerts: DWORD; // number of certs in chain
- certs: PCERT_BLOB; // pointer to array of cert chain blobs
- // representing the certs
- keyLocatorInfo: CRYPT_KEY_PROV_INFO; // key locator for cert
- end;
- {$EXTERNALSYM _CERT_CHAIN}
- CERT_CHAIN = _CERT_CHAIN;
- {$EXTERNALSYM CERT_CHAIN}
- TCertChain = CERT_CHAIN;
- PCertChain = PCERT_CHAIN;
-
-// WINCRYPT32API This is not exported by crypt32, it is exported by softpub
-
-function FindCertsByIssuer(pCertChains: PCERT_CHAIN; var pcbCertChains: DWORD;
- pcCertChains: LPDWORD; pbEncodedIssuerName: LPBYTE; cbEncodedIssuerName: DWORD;
- pwszPurpose: LPCWSTR; dwKeySpec: DWORD): HRESULT; stdcall;
-{$EXTERNALSYM FindCertsByIssuer}
-
-//-------------------------------------------------------------------------
-//
-// CryptQueryObject takes a CERT_BLOB or a file name and returns the
-// information about the content in the blob or in the file.
-//
-// Parameters:
-// INPUT dwObjectType:
-// Indicate the type of the object. Should be one of the
-// following:
-// CERT_QUERY_OBJECT_FILE
-// CERT_QUERY_OBJECT_BLOB
-//
-// INPUT pvObject:
-// If dwObjectType == CERT_QUERY_OBJECT_FILE, it is a
-// LPWSTR, that is, the pointer to a wchar file name
-// if dwObjectType == CERT_QUERY_OBJECT_BLOB, it is a
-// PCERT_BLOB, that is, a pointer to a CERT_BLOB
-//
-// INPUT dwExpectedContentTypeFlags:
-// Indicate the expected contenet type.
-// Can be one of the following:
-// CERT_QUERY_CONTENT_FLAG_ALL (the content can be any type)
-// CERT_QUERY_CONTENT_FLAG_CERT
-// CERT_QUERY_CONTENT_FLAG_CTL
-// CERT_QUERY_CONTENT_FLAG_CRL
-// CERT_QUERY_CONTENT_FLAG_SERIALIZED_STORE
-// CERT_QUERY_CONTENT_FLAG_SERIALIZED_CERT
-// CERT_QUERY_CONTENT_FLAG_SERIALIZED_CTL
-// CERT_QUERY_CONTENT_FLAG_SERIALIZED_CRL
-// CERT_QUERY_CONTENT_FLAG_PKCS7_SIGNED
-// CERT_QUERY_CONTENT_FLAG_PKCS7_UNSIGNED
-// CERT_QUERY_CONTENT_FLAG_PKCS7_SIGNED_EMBED
-// CERT_QUERY_CONTNET_FLAG_PKCS10
-// CERT_QUERY_CONTNET_FLAG_PFX
-//
-// INPUT dwExpectedFormatTypeFlags:
-// Indicate the expected format type.
-// Can be one of the following:
-// CERT_QUERY_FORMAT_FLAG_ALL (the content can be any format)
-// CERT_QUERY_FORMAT_FLAG_BINARY
-// CERT_QUERY_FORMAT_FLAG_BASE64_ENCODED
-//
-//
-// INPUT dwFlags
-// Reserved flag. Should always set to 0
-//
-// OUTPUT pdwMsgAndCertEncodingType
-// Optional output. If NULL != pdwMsgAndCertEncodingType,
-// it contains the encoding type of the content as any
-// combination of the following:
-// X509_ASN_ENCODING
-// PKCS_7_ASN_ENCODING
-//
-// OUTPUT pdwContentType
-// Optional output. If NULL!=pdwContentType, it contains
-// the content type as one of the the following:
-// CERT_QUERY_CONTENT_CERT
-// CERT_QUERY_CONTENT_CTL
-// CERT_QUERY_CONTENT_CRL
-// CERT_QUERY_CONTENT_SERIALIZED_STORE
-// CERT_QUERY_CONTENT_SERIALIZED_CERT
-// CERT_QUERY_CONTENT_SERIALIZED_CTL
-// CERT_QUERY_CONTENT_SERIALIZED_CRL
-// CERT_QUERY_CONTENT_PKCS7_SIGNED
-// CERT_QUERY_CONTENT_PKCS7_UNSIGNED
-// CERT_QUERY_CONTENT_PKCS7_SIGNED_EMBED
-// CERT_QUERY_CONTENT_PKCS10
-// CERT_QUERY_CONTENT_PFX
-//
-// OUTPUT pdwFormatType
-// Optional output. If NULL !=pdwFormatType, it
-// contains the format type of the content as one of the
-// following:
-// CERT_QUERY_FORMAT_BINARY
-// CERT_QUERY_FORMAT_BASE64_ENCODED
-//
-//
-// OUTPUT phCertStore
-// Optional output. If NULL !=phStore,
-// it contains a cert store that includes all of certificates,
-// CRL, and CTL in the object if the object content type is
-// one of the following:
-// CERT_QUERY_CONTENT_CERT
-// CERT_QUERY_CONTENT_CTL
-// CERT_QUERY_CONTENT_CRL
-// CERT_QUERY_CONTENT_SERIALIZED_STORE
-// CERT_QUERY_CONTENT_SERIALIZED_CERT
-// CERT_QUERY_CONTENT_SERIALIZED_CTL
-// CERT_QUERY_CONTENT_SERIALIZED_CRL
-// CERT_QUERY_CONTENT_PKCS7_SIGNED
-// CERT_QUERY_CONTENT_PKCS7_SIGNED_EMBED
-//
-// Caller should free *phCertStore via CertCloseStore.
-//
-//
-// OUTPUT phMsg Optional output. If NULL != phMsg,
-// it contains a handle to a opened message if
-// the content type is one of the following:
-// CERT_QUERY_CONTENT_PKCS7_SIGNED
-// CERT_QUERY_CONTENT_PKCS7_UNSIGNED
-// CERT_QUERY_CONTENT_PKCS7_SIGNED_EMBED
-//
-// Caller should free *phMsg via CryptMsgClose.
-//
-// OUTPUT pContext Optional output. If NULL != pContext,
-// it contains either a PCCERT_CONTEXT or PCCRL_CONTEXT,
-// or PCCTL_CONTEXT based on the content type.
-//
-// If the content type is CERT_QUERY_CONTENT_CERT or
-// CERT_QUERY_CONTENT_SERIALIZED_CERT, it is a PCCERT_CONTEXT;
-// Caller should free the pContext via CertFreeCertificateContext.
-//
-// If the content type is CERT_QUERY_CONTENT_CRL or
-// CERT_QUERY_CONTENT_SERIALIZED_CRL, it is a PCCRL_CONTEXT;
-// Caller should free the pContext via CertFreeCRLContext.
-//
-// If the content type is CERT_QUERY_CONTENT_CTL or
-// CERT_QUERY_CONTENT_SERIALIZED_CTL, it is a PCCTL_CONTEXT;
-// Caller should free the pContext via CertFreeCTLContext.
-//
-// If the *pbObject is of type CERT_QUERY_CONTENT_PKCS10 or CERT_QUERY_CONTENT_PFX, CryptQueryObject
-// will not return anything in *phCertstore, *phMsg, or *ppvContext.
-//--------------------------------------------------------------------------
-
-function CryptQueryObject(dwObjectType: DWORD; pvObject: Pointer;
- dwExpectedContentTypeFlags, dwExpectedFormatTypeFlags, dwFlags: DWORD;
- pdwMsgAndCertEncodingType, pdwContentType, pdwFormatType: LPDWORD;
- phCertStore: PHCERTSTORE; phMsg: PHCRYPTMSG; ppvContext: PPointer): BOOL; stdcall;
-{$EXTERNALSYM CryptQueryObject}
-
-//-------------------------------------------------------------------------
-//dwObjectType for CryptQueryObject
-//-------------------------------------------------------------------------
-
-const
- CERT_QUERY_OBJECT_FILE = $00000001;
- {$EXTERNALSYM CERT_QUERY_OBJECT_FILE}
- CERT_QUERY_OBJECT_BLOB = $00000002;
- {$EXTERNALSYM CERT_QUERY_OBJECT_BLOB}
-
-//-------------------------------------------------------------------------
-//dwConentType for CryptQueryObject
-//-------------------------------------------------------------------------
-
-//encoded single certificate
-
- CERT_QUERY_CONTENT_CERT = 1;
- {$EXTERNALSYM CERT_QUERY_CONTENT_CERT}
-
-//encoded single CTL
-
- CERT_QUERY_CONTENT_CTL = 2;
- {$EXTERNALSYM CERT_QUERY_CONTENT_CTL}
-
-//encoded single CRL
-
- CERT_QUERY_CONTENT_CRL = 3;
- {$EXTERNALSYM CERT_QUERY_CONTENT_CRL}
-
-//serialized store
-
- CERT_QUERY_CONTENT_SERIALIZED_STORE = 4;
- {$EXTERNALSYM CERT_QUERY_CONTENT_SERIALIZED_STORE}
-
-//serialized single certificate
-
- CERT_QUERY_CONTENT_SERIALIZED_CERT = 5;
- {$EXTERNALSYM CERT_QUERY_CONTENT_SERIALIZED_CERT}
-
-//serialized single CTL
-
- CERT_QUERY_CONTENT_SERIALIZED_CTL = 6;
- {$EXTERNALSYM CERT_QUERY_CONTENT_SERIALIZED_CTL}
-
-//serialized single CRL
-
- CERT_QUERY_CONTENT_SERIALIZED_CRL = 7;
- {$EXTERNALSYM CERT_QUERY_CONTENT_SERIALIZED_CRL}
-
-//a PKCS#7 signed message
-
- CERT_QUERY_CONTENT_PKCS7_SIGNED = 8;
- {$EXTERNALSYM CERT_QUERY_CONTENT_PKCS7_SIGNED}
-
-//a PKCS#7 message, such as enveloped message. But it is not a signed message,
-
- CERT_QUERY_CONTENT_PKCS7_UNSIGNED = 9;
- {$EXTERNALSYM CERT_QUERY_CONTENT_PKCS7_UNSIGNED}
-
-//a PKCS7 signed message embedded in a file
-
- CERT_QUERY_CONTENT_PKCS7_SIGNED_EMBED = 10;
- {$EXTERNALSYM CERT_QUERY_CONTENT_PKCS7_SIGNED_EMBED}
-
-//an encoded PKCS#10
-
- CERT_QUERY_CONTENT_PKCS10 = 11;
- {$EXTERNALSYM CERT_QUERY_CONTENT_PKCS10}
-
-//an encoded PKX BLOB
-
- CERT_QUERY_CONTENT_PFX = 12;
- {$EXTERNALSYM CERT_QUERY_CONTENT_PFX}
-
-//-------------------------------------------------------------------------
-//dwExpectedConentTypeFlags for CryptQueryObject
-//-------------------------------------------------------------------------
-
-//encoded single certificate
-
- CERT_QUERY_CONTENT_FLAG_CERT = 1 shl CERT_QUERY_CONTENT_CERT;
- {$EXTERNALSYM CERT_QUERY_CONTENT_FLAG_CERT}
-
-//encoded single CTL
-
- CERT_QUERY_CONTENT_FLAG_CTL = 1 shl CERT_QUERY_CONTENT_CTL;
- {$EXTERNALSYM CERT_QUERY_CONTENT_FLAG_CTL}
-
-//encoded single CRL
-
- CERT_QUERY_CONTENT_FLAG_CRL = 1 shl CERT_QUERY_CONTENT_CRL;
- {$EXTERNALSYM CERT_QUERY_CONTENT_FLAG_CRL}
-
-//serialized store
-
- CERT_QUERY_CONTENT_FLAG_SERIALIZED_STORE = 1 shl CERT_QUERY_CONTENT_SERIALIZED_STORE;
- {$EXTERNALSYM CERT_QUERY_CONTENT_FLAG_SERIALIZED_STORE}
-
-//serialized single certificate
-
- CERT_QUERY_CONTENT_FLAG_SERIALIZED_CERT = 1 shl CERT_QUERY_CONTENT_SERIALIZED_CERT;
- {$EXTERNALSYM CERT_QUERY_CONTENT_FLAG_SERIALIZED_CERT}
-
-//serialized single CTL
-
- CERT_QUERY_CONTENT_FLAG_SERIALIZED_CTL = 1 shl CERT_QUERY_CONTENT_SERIALIZED_CTL;
- {$EXTERNALSYM CERT_QUERY_CONTENT_FLAG_SERIALIZED_CTL}
-
-//serialized single CRL
-
- CERT_QUERY_CONTENT_FLAG_SERIALIZED_CRL = 1 shl CERT_QUERY_CONTENT_SERIALIZED_CRL;
- {$EXTERNALSYM CERT_QUERY_CONTENT_FLAG_SERIALIZED_CRL}
-
-//an encoded PKCS#7 signed message
-
- CERT_QUERY_CONTENT_FLAG_PKCS7_SIGNED = 1 shl CERT_QUERY_CONTENT_PKCS7_SIGNED;
- {$EXTERNALSYM CERT_QUERY_CONTENT_FLAG_PKCS7_SIGNED}
-
-//an encoded PKCS#7 message. But it is not a signed message
-
- CERT_QUERY_CONTENT_FLAG_PKCS7_UNSIGNED = 1 shl CERT_QUERY_CONTENT_PKCS7_UNSIGNED;
- {$EXTERNALSYM CERT_QUERY_CONTENT_FLAG_PKCS7_UNSIGNED}
-
-//the content includes an embedded PKCS7 signed message
-
- CERT_QUERY_CONTENT_FLAG_PKCS7_SIGNED_EMBED = 1 shl CERT_QUERY_CONTENT_PKCS7_SIGNED_EMBED;
- {$EXTERNALSYM CERT_QUERY_CONTENT_FLAG_PKCS7_SIGNED_EMBED}
-
-//an encoded PKCS#10
-
- CERT_QUERY_CONTENT_FLAG_PKCS10 = 1 shl CERT_QUERY_CONTENT_PKCS10;
- {$EXTERNALSYM CERT_QUERY_CONTENT_FLAG_PKCS10}
-
-//an encoded PFX BLOB
-
- CERT_QUERY_CONTENT_FLAG_PFX = 1 shl CERT_QUERY_CONTENT_PFX;
- {$EXTERNALSYM CERT_QUERY_CONTENT_FLAG_PFX}
-
-//content can be any type
- CERT_QUERY_CONTENT_FLAG_ALL = CERT_QUERY_CONTENT_FLAG_CERT or
- CERT_QUERY_CONTENT_FLAG_CTL or
- CERT_QUERY_CONTENT_FLAG_CRL or
- CERT_QUERY_CONTENT_FLAG_SERIALIZED_STORE or
- CERT_QUERY_CONTENT_FLAG_SERIALIZED_CERT or
- CERT_QUERY_CONTENT_FLAG_SERIALIZED_CTL or
- CERT_QUERY_CONTENT_FLAG_SERIALIZED_CRL or
- CERT_QUERY_CONTENT_FLAG_PKCS7_SIGNED or
- CERT_QUERY_CONTENT_FLAG_PKCS7_UNSIGNED or
- CERT_QUERY_CONTENT_FLAG_PKCS7_SIGNED_EMBED or
- CERT_QUERY_CONTENT_FLAG_PKCS10 or
- CERT_QUERY_CONTENT_FLAG_PFX;
- {$EXTERNALSYM CERT_QUERY_CONTENT_FLAG_ALL}
-
-//-------------------------------------------------------------------------
-//dwFormatType for CryptQueryObject
-//-------------------------------------------------------------------------
-//the content is in binary format
-
- CERT_QUERY_FORMAT_BINARY = 1;
- {$EXTERNALSYM CERT_QUERY_FORMAT_BINARY}
-
-//the content is base64 encoded
-
- CERT_QUERY_FORMAT_BASE64_ENCODED = 2;
- {$EXTERNALSYM CERT_QUERY_FORMAT_BASE64_ENCODED}
-
-//-------------------------------------------------------------------------
-//dwExpectedFormatTypeFlags for CryptQueryObject
-//-------------------------------------------------------------------------
-
-//the content is in binary format
-
- CERT_QUERY_FORMAT_FLAG_BINARY = 1 shl CERT_QUERY_FORMAT_BINARY;
- {$EXTERNALSYM CERT_QUERY_FORMAT_FLAG_BINARY}
-
-//the content is base64 encoded
-
- CERT_QUERY_FORMAT_FLAG_BASE64_ENCODED = 1 shl CERT_QUERY_FORMAT_BASE64_ENCODED;
- {$EXTERNALSYM CERT_QUERY_FORMAT_FLAG_BASE64_ENCODED}
-
-//the content can be of any format
-
- CERT_QUERY_FORMAT_FLAG_ALL = CERT_QUERY_FORMAT_FLAG_BINARY or CERT_QUERY_FORMAT_FLAG_BASE64_ENCODED;
- {$EXTERNALSYM CERT_QUERY_FORMAT_FLAG_ALL}
-
-//
-// Crypt32 Memory Management Routines. All Crypt32 API which return allocated
-// buffers will do so via CryptMemAlloc, CryptMemRealloc. Clients can free
-// those buffers using CryptMemFree. Also included is CryptMemSize
-//
-
-function CryptMemAlloc(cbSize: ULONG): LPVOID; stdcall;
-{$EXTERNALSYM CryptMemAlloc}
-
-function CryptMemRealloc(pv: LPVOID; cbSize: ULONG): LPVOID; stdcall;
-{$EXTERNALSYM CryptMemRealloc}
-
-procedure CryptMemFree(pv: LPVOID); stdcall;
-{$EXTERNALSYM CryptMemFree}
-
-//
-// Crypt32 Asynchronous Parameter Management Routines. All Crypt32 API which
-// expose asynchronous mode operation use a Crypt32 Async Handle to pass
-// around information about the operation e.g. callback routines. The
-// following API are used for manipulation of the async handle
-//
-
-type
- HCRYPTASYNC = HANDLE;
- {$EXTERNALSYM HCRYPTASYNC}
- PHCRYPTASYNC = ^HCRYPTASYNC;
- {$EXTERNALSYM PHCRYPTASYNC}
-
- PFN_CRYPT_ASYNC_PARAM_FREE_FUNC = procedure(pszParamOid: LPSTR; pvParam: LPVOID); stdcall;
- {$EXTERNALSYM PFN_CRYPT_ASYNC_PARAM_FREE_FUNC}
- PFnCryptAsyncParamFreeFunc = PFN_CRYPT_ASYNC_PARAM_FREE_FUNC;
-
-function CryptCreateAsyncHandle(dwFlags: DWORD; phAsync: PHCRYPTASYNC): BOOL; stdcall;
-{$EXTERNALSYM CryptCreateAsyncHandle}
-
-function CryptSetAsyncParam(hAsync: HCRYPTASYNC; pszParamOid: LPSTR;
- pvParam: LPVOID; pfnFree: PFN_CRYPT_ASYNC_PARAM_FREE_FUNC): BOOL; stdcall;
-{$EXTERNALSYM CryptSetAsyncParam}
-
-function CryptGetAsyncParam(hAsync: HCRYPTASYNC; pszParamOid: LPSTR;
- var ppvParam: LPVOID; var ppfnFree: PFN_CRYPT_ASYNC_PARAM_FREE_FUNC): BOOL; stdcall;
-{$EXTERNALSYM CryptGetAsyncParam}
-
-function CryptCloseAsyncHandle(hAsync: HCRYPTASYNC): BOOL; stdcall;
-{$EXTERNALSYM CryptCloseAsyncHandle}
-
-//
-// Crypt32 Remote Object Retrieval Routines. This API allows retrieval of
-// remote PKI objects where the location is given by an URL. The remote
-// object retrieval manager exposes two provider models. One is the "Scheme
-// Provider" model which allows for installable protocol providers as defined
-// by the URL scheme e.g. ldap, http, ftp. The scheme provider entry point is
-// the same as the CryptRetrieveObjectByUrl however the *ppvObject returned
-// is ALWAYS a counted array of encoded bits (one per object retrieved). The
-// second provider model is the "Context Provider" model which allows for
-// installable creators of CAPI2 context handles (objects) based on the
-// retrieved encoded bits. These are dispatched based on the object OID given
-// in the call to CryptRetrieveObjectByUrl.
-//
-
-type
- PCRYPT_BLOB_ARRAY = ^CRYPT_BLOB_ARRAY;
- {$EXTERNALSYM PCRYPT_BLOB_ARRAY}
- _CRYPT_BLOB_ARRAY = record
- cBlob: DWORD;
- rgBlob: PCRYPT_DATA_BLOB;
- end;
- {$EXTERNALSYM _CRYPT_BLOB_ARRAY}
- CRYPT_BLOB_ARRAY = _CRYPT_BLOB_ARRAY;
- {$EXTERNALSYM CRYPT_BLOB_ARRAY}
- TCryptBlobArray = CRYPT_BLOB_ARRAY;
- PCryptBlobArray = PCRYPT_BLOB_ARRAY;
-
- PCRYPT_CREDENTIALS = ^CRYPT_CREDENTIALS;
- {$EXTERNALSYM PCRYPT_CREDENTIALS}
- _CRYPT_CREDENTIALS = record
- cbSize: DWORD;
- pszCredentialsOid: LPCSTR;
- pvCredentials: LPVOID;
- end;
- {$EXTERNALSYM _CRYPT_CREDENTIALS}
- CRYPT_CREDENTIALS = _CRYPT_CREDENTIALS;
- {$EXTERNALSYM CRYPT_CREDENTIALS}
- TCryptCredentials = CRYPT_CREDENTIALS;
- PCryptCredentials = PCRYPT_CREDENTIALS;
-
-const
- CREDENTIAL_OID_PASSWORD_CREDENTIALS_A = LPCSTR(1);
- {$EXTERNALSYM CREDENTIAL_OID_PASSWORD_CREDENTIALS_A}
- CREDENTIAL_OID_PASSWORD_CREDENTIALS_W = LPCSTR(2);
- {$EXTERNALSYM CREDENTIAL_OID_PASSWORD_CREDENTIALS_W}
-
- {$IFDEF UNICODE}
- CREDENTIAL_OID_PASSWORD_CREDENTIALS = CREDENTIAL_OID_PASSWORD_CREDENTIALS_W;
- {$EXTERNALSYM CREDENTIAL_OID_PASSWORD_CREDENTIALS}
- {$ELSE}
- CREDENTIAL_OID_PASSWORD_CREDENTIALS = CREDENTIAL_OID_PASSWORD_CREDENTIALS_A;
- {$EXTERNALSYM CREDENTIAL_OID_PASSWORD_CREDENTIALS}
- {$ENDIF UNICODE}
-
-type
- PCRYPT_PASSWORD_CREDENTIALSA = ^CRYPT_PASSWORD_CREDENTIALSA;
- {$EXTERNALSYM PCRYPT_PASSWORD_CREDENTIALSA}
- _CRYPT_PASSWORD_CREDENTIALSA = record
- cbSize: DWORD;
- pszUsername: LPSTR;
- pszPassword: LPSTR;
- end;
- {$EXTERNALSYM _CRYPT_PASSWORD_CREDENTIALSA}
- CRYPT_PASSWORD_CREDENTIALSA = _CRYPT_PASSWORD_CREDENTIALSA;
- {$EXTERNALSYM CRYPT_PASSWORD_CREDENTIALSA}
- TCryptPasswordCredentialsA = CRYPT_PASSWORD_CREDENTIALSA;
- PCryptPasswordCredentialsA = PCRYPT_PASSWORD_CREDENTIALSA;
-
- PCRYPT_PASSWORD_CREDENTIALSW = ^CRYPT_PASSWORD_CREDENTIALSW;
- {$EXTERNALSYM PCRYPT_PASSWORD_CREDENTIALSW}
- _CRYPT_PASSWORD_CREDENTIALSW = record
- cbSize: DWORD;
- pszUsername: LPWSTR;
- pszPassword: LPWSTR;
- end;
- {$EXTERNALSYM _CRYPT_PASSWORD_CREDENTIALSW}
- CRYPT_PASSWORD_CREDENTIALSW = _CRYPT_PASSWORD_CREDENTIALSW;
- {$EXTERNALSYM CRYPT_PASSWORD_CREDENTIALSW}
- TCryptPasswordCredentialsW = CRYPT_PASSWORD_CREDENTIALSW;
- PCryptPasswordCredentialsW = PCRYPT_PASSWORD_CREDENTIALSW;
-
- {$IFDEF UNICODE}
- CRYPT_PASSWORD_CREDENTIALS = CRYPT_PASSWORD_CREDENTIALSW;
- {$EXTERNALSYM CRYPT_PASSWORD_CREDENTIALS}
- PCRYPT_PASSWORD_CREDENTIALS = PCRYPT_PASSWORD_CREDENTIALSW;
- {$EXTERNALSYM PCRYPT_PASSWORD_CREDENTIALS}
- TCryptPasswordCredentials = TCryptPasswordCredentialsW;
- PCryptPasswordCredentials = PCryptPasswordCredentialsW;
- {$ELSE}
- CRYPT_PASSWORD_CREDENTIALS = CRYPT_PASSWORD_CREDENTIALSA;
- {$EXTERNALSYM CRYPT_PASSWORD_CREDENTIALS}
- PCRYPT_PASSWORD_CREDENTIALS = PCRYPT_PASSWORD_CREDENTIALSA;
- {$EXTERNALSYM PCRYPT_PASSWORD_CREDENTIALS}
- TCryptPasswordCredentials = TCryptPasswordCredentialsA;
- PCryptPasswordCredentials = PCryptPasswordCredentialsA;
- {$ENDIF UNICODE}
-
-//
-// Scheme Provider Signatures
-//
-
-const
- SCHEME_OID_RETRIEVE_ENCODED_OBJECT_FUNC = 'SchemeDllRetrieveEncodedObject';
- {$EXTERNALSYM SCHEME_OID_RETRIEVE_ENCODED_OBJECT_FUNC}
-
-type
- PFN_FREE_ENCODED_OBJECT_FUNC = procedure(pszObjectOid: LPCSTR;
- pObject: PCRYPT_BLOB_ARRAY; pvFreeContext: LPVOID); stdcall;
- {$EXTERNALSYM PFN_FREE_ENCODED_OBJECT_FUNC}
- PFnFreeEncodedObjectFunc = PFN_FREE_ENCODED_OBJECT_FUNC;
-
-//
-// SchemeDllRetrieveEncodedObject has the following signature:
-//
-// BOOL WINAPI SchemeDllRetrieveEncodedObject (
-// IN LPCSTR pszUrl,
-// IN LPCSTR pszObjectOid,
-// IN DWORD dwRetrievalFlags,
-// IN DWORD dwTimeout,
-// OUT PCRYPT_BLOB_ARRAY pObject,
-// OUT PFN_FREE_ENCODED_OBJECT_FUNC* ppfnFreeObject,
-// OUT LPVOID* ppvFreeContext,
-// IN HCRYPTASYNC hAsyncRetrieve,
-// IN PCRYPT_CREDENTIALS pCredentials,
-// IN LPVOID pvReserved
-// )
-//
-
-//
-// Context Provider Signatures
-//
-
-const
- CONTEXT_OID_CREATE_OBJECT_CONTEXT_FUNC = 'ContextDllCreateObjectContext';
- {$EXTERNALSYM CONTEXT_OID_CREATE_OBJECT_CONTEXT_FUNC}
-
- CONTEXT_OID_CERTIFICATE = LPCSTR(1);
- {$EXTERNALSYM CONTEXT_OID_CERTIFICATE}
- CONTEXT_OID_CRL = LPCSTR(2);
- {$EXTERNALSYM CONTEXT_OID_CRL}
- CONTEXT_OID_CTL = LPCSTR(3);
- {$EXTERNALSYM CONTEXT_OID_CTL}
- CONTEXT_OID_PKCS7 = LPCSTR(4);
- {$EXTERNALSYM CONTEXT_OID_PKCS7}
- CONTEXT_OID_CAPI2_ANY = LPCSTR(5);
- {$EXTERNALSYM CONTEXT_OID_CAPI2_ANY}
-
-//
-// ContextDllCreateObjectContext has the following signature:
-//
-// BOOL WINAPI ContextDllCreateObjectContext (
-// IN LPCSTR pszObjectOid,
-// IN DWORD dwRetrievalFlags,
-// IN PCRYPT_BLOB_ARRAY pObject,
-// OUT LPVOID* ppvContext
-// )
-//
-
-//
-// Remote Object Retrieval API
-//
-
-//
-// Retrieval flags
-//
-
- CRYPT_RETRIEVE_MULTIPLE_OBJECTS = $00000001;
- {$EXTERNALSYM CRYPT_RETRIEVE_MULTIPLE_OBJECTS}
- CRYPT_CACHE_ONLY_RETRIEVAL = $00000002;
- {$EXTERNALSYM CRYPT_CACHE_ONLY_RETRIEVAL}
- CRYPT_WIRE_ONLY_RETRIEVAL = $00000004;
- {$EXTERNALSYM CRYPT_WIRE_ONLY_RETRIEVAL}
- CRYPT_DONT_CACHE_RESULT = $00000008;
- {$EXTERNALSYM CRYPT_DONT_CACHE_RESULT}
- CRYPT_ASYNC_RETRIEVAL = $00000010;
- {$EXTERNALSYM CRYPT_ASYNC_RETRIEVAL}
-
-//
-// Data verification retrieval flags
-//
-// CRYPT_VERIFY_CONTEXT_SIGNATURE is used to get signature verification
-// on the context created. In this case pszObjectOid must be non-NULL and
-// pvVerify points to the signer certificate context
-//
-// CRYPT_VERIFY_DATA_HASH is used to get verification of the blob data
-// retrieved by the protocol. The pvVerify points to an URL_DATA_HASH
-// structure (TBD)
-//
-
- CRYPT_VERIFY_CONTEXT_SIGNATURE = $00000020;
- {$EXTERNALSYM CRYPT_VERIFY_CONTEXT_SIGNATURE}
- CRYPT_VERIFY_DATA_HASH = $00000040;
- {$EXTERNALSYM CRYPT_VERIFY_DATA_HASH}
-
-//
-// Time Valid Object flags
-//
-
- CRYPT_KEEP_TIME_VALID = $00000080;
- {$EXTERNALSYM CRYPT_KEEP_TIME_VALID}
- CRYPT_DONT_VERIFY_SIGNATURE = $00000100;
- {$EXTERNALSYM CRYPT_DONT_VERIFY_SIGNATURE}
- CRYPT_DONT_CHECK_TIME_VALIDITY = $00000200;
- {$EXTERNALSYM CRYPT_DONT_CHECK_TIME_VALIDITY}
-
-function CryptRetrieveObjectByUrlA(pszUrl: LPCSTR; pszObjectOid: LPCSTR;
- dwRetrievalFlags: DWORD; dwTimeout: DWORD; var ppvObject: LPVOID;
- hAsyncRetrieve: HCRYPTASYNC; pCredentials: PCRYPT_CREDENTIALS;
- pvVerify: LPVOID; pvReserved: LPVOID): BOOL; stdcall;
-{$EXTERNALSYM CryptRetrieveObjectByUrlA}
-function CryptRetrieveObjectByUrlW(pszUrl: LPCWSTR; pszObjectOid: LPCSTR;
- dwRetrievalFlags: DWORD; dwTimeout: DWORD; var ppvObject: LPVOID;
- hAsyncRetrieve: HCRYPTASYNC; pCredentials: PCRYPT_CREDENTIALS;
- pvVerify: LPVOID; pvReserved: LPVOID): BOOL; stdcall;
-{$EXTERNALSYM CryptRetrieveObjectByUrlW}
-function CryptRetrieveObjectByUrl(pszUrl: LPCTSTR; pszObjectOid: LPCSTR;
- dwRetrievalFlags: DWORD; dwTimeout: DWORD; var ppvObject: LPVOID;
- hAsyncRetrieve: HCRYPTASYNC; pCredentials: PCRYPT_CREDENTIALS;
- pvVerify: LPVOID; pvReserved: LPVOID): BOOL; stdcall;
-{$EXTERNALSYM CryptRetrieveObjectByUrl}
-
-//
-// Call back function to cancel object retrieval
-//
-// The function can be installed on a per thread basis.
-// If CryptInstallCancelRetrieval is called for multiple times, only the most recent
-// installation will be kept.
-//
-// This is only effective for http, https, gopher, and ftp protocol.
-// It is ignored by the rest of the protocols.
-
-type
- PFN_CRYPT_CANCEL_RETRIEVAL = function(dwFlags: DWORD; pvArg: Pointer): BOOL; stdcall;
- {$EXTERNALSYM PFN_CRYPT_CANCEL_RETRIEVAL}
- PFnCryptCancelRetrieval = PFN_CRYPT_CANCEL_RETRIEVAL;
-
-//
-// PFN_CRYPT_CANCEL_RETRIEVAL
-//
-// This function should return FALSE when the object retrieval should be continued
-// and return TRUE when the object retrieval should be cancelled.
-//
-
-function CryptInstallCancelRetrieval(pfnCancel: PFN_CRYPT_CANCEL_RETRIEVAL;
- pvArg: Pointer; dwFlags: DWORD; pvReserved: Pointer): BOOL; stdcall;
-{$EXTERNALSYM CryptInstallCancelRetrieval}
-
-function CryptUninstallCancelRetrieval(dwFlags: DWORD; pvReserved: Pointer): BOOL; stdcall;
-{$EXTERNALSYM CryptUninstallCancelRetrieval}
-
-function CryptCancelAsyncRetrieval(hAsyncRetrieval: HCRYPTASYNC): BOOL; stdcall;
-{$EXTERNALSYM CryptCancelAsyncRetrieval}
-
-//
-// Remote Object Async Retrieval parameters
-//
-
-//
-// A client that wants to be notified of asynchronous object retrieval
-// completion sets this parameter on the async handle
-//
-
-const
- CRYPT_PARAM_ASYNC_RETRIEVAL_COMPLETION = LPCSTR(1);
- {$EXTERNALSYM CRYPT_PARAM_ASYNC_RETRIEVAL_COMPLETION}
-
-type
- PFN_CRYPT_ASYNC_RETRIEVAL_COMPLETION_FUNC = procedure(pvCompletion: LPVOID;
- dwCompletionCode: DWORD; pszUrl: LPCSTR; pszObjectOid: LPSTR; pvObject: LPVOID); stdcall;
- {$EXTERNALSYM PFN_CRYPT_ASYNC_RETRIEVAL_COMPLETION_FUNC}
- PFnCryptASynchRetrievalCompletionFunc = PFN_CRYPT_ASYNC_RETRIEVAL_COMPLETION_FUNC;
-
- PCRYPT_ASYNC_RETRIEVAL_COMPLETION = ^CRYPT_ASYNC_RETRIEVAL_COMPLETION;
- {$EXTERNALSYM PCRYPT_ASYNC_RETRIEVAL_COMPLETION}
- _CRYPT_ASYNC_RETRIEVAL_COMPLETION = record
- pfnCompletion: PFN_CRYPT_ASYNC_RETRIEVAL_COMPLETION_FUNC;
- pvCompletion: LPVOID;
- end;
- {$EXTERNALSYM _CRYPT_ASYNC_RETRIEVAL_COMPLETION}
- CRYPT_ASYNC_RETRIEVAL_COMPLETION = _CRYPT_ASYNC_RETRIEVAL_COMPLETION;
- {$EXTERNALSYM CRYPT_ASYNC_RETRIEVAL_COMPLETION}
- TCryptAsyncRetrievalCompletion = CRYPT_ASYNC_RETRIEVAL_COMPLETION;
- PCryptAsyncRetrievalCompletion = PCRYPT_ASYNC_RETRIEVAL_COMPLETION;
-
-//
-// This function is set on the async handle by a scheme provider that
-// supports asynchronous retrieval
-//
-
-const
- CRYPT_PARAM_CANCEL_ASYNC_RETRIEVAL = LPCSTR(2);
- {$EXTERNALSYM CRYPT_PARAM_CANCEL_ASYNC_RETRIEVAL}
-
-type
- PFN_CANCEL_ASYNC_RETRIEVAL_FUNC = function(hAsyncRetrieve: HCRYPTASYNC): BOOL; stdcall;
- {$EXTERNALSYM PFN_CANCEL_ASYNC_RETRIEVAL_FUNC}
- PFnCancelASynchRetrievalFunc = PFN_CANCEL_ASYNC_RETRIEVAL_FUNC;
-
-//
-// Get the locator for a CAPI object
-//
-
-const
- CRYPT_GET_URL_FROM_PROPERTY = $00000001;
- {$EXTERNALSYM CRYPT_GET_URL_FROM_PROPERTY}
- CRYPT_GET_URL_FROM_EXTENSION = $00000002;
- {$EXTERNALSYM CRYPT_GET_URL_FROM_EXTENSION}
- CRYPT_GET_URL_FROM_UNAUTH_ATTRIBUTE = $00000004;
- {$EXTERNALSYM CRYPT_GET_URL_FROM_UNAUTH_ATTRIBUTE}
- CRYPT_GET_URL_FROM_AUTH_ATTRIBUTE = $00000008;
- {$EXTERNALSYM CRYPT_GET_URL_FROM_AUTH_ATTRIBUTE}
-
-type
- PCRYPT_URL_ARRAY = ^CRYPT_URL_ARRAY;
- {$EXTERNALSYM PCRYPT_URL_ARRAY}
- _CRYPT_URL_ARRAY = record
- cUrl: DWORD;
- rgwszUrl: LPWSTR;
- end;
- {$EXTERNALSYM _CRYPT_URL_ARRAY}
- CRYPT_URL_ARRAY = _CRYPT_URL_ARRAY;
- {$EXTERNALSYM CRYPT_URL_ARRAY}
- TCryptUrlArray = CRYPT_URL_ARRAY;
- PCryptUrlArray = PCRYPT_URL_ARRAY;
-
- PCRYPT_URL_INFO = ^CRYPT_URL_INFO;
- {$EXTERNALSYM PCRYPT_URL_INFO}
- _CRYPT_URL_INFO = record
- cbSize: DWORD;
- end;
- {$EXTERNALSYM _CRYPT_URL_INFO}
- CRYPT_URL_INFO = _CRYPT_URL_INFO;
- {$EXTERNALSYM CRYPT_URL_INFO}
- TCryptUrlInfo = CRYPT_URL_INFO;
- PCryptUrlInfo = PCRYPT_URL_INFO;
-
-function CryptGetObjectUrl(pszUrlOid: LPCSTR; pvPara: LPVOID; dwFlags: DWORD;
- pUrlArray: PCRYPT_URL_ARRAY; var pcbUrlArray: DWORD; pUrlInfo: PCRYPT_URL_INFO;
- pcbUrlInfo: LPDWORD; pvReserved: LPVOID): BOOL; stdcall;
-{$EXTERNALSYM CryptGetObjectUrl}
-
-const
- URL_OID_GET_OBJECT_URL_FUNC = 'UrlDllGetObjectUrl';
- {$EXTERNALSYM URL_OID_GET_OBJECT_URL_FUNC}
-
-//
-// UrlDllGetObjectUrl has the same signature as CryptGetObjectUrl
-//
-
-//
-// URL_OID_CERTIFICATE_ISSUER
-//
-// pvPara == PCCERT_CONTEXT, certificate whose issuer's URL is being requested
-//
-// This will be retrieved from the authority info access extension or property
-// on the certificate
-//
-// URL_OID_CERTIFICATE_CRL_DIST_POINT
-//
-// pvPara == PCCERT_CONTEXT, certificate whose CRL distribution point is being
-// requested
-//
-// This will be retrieved from the CRL distribution point extension or property
-// on the certificate
-//
-// URL_OID_CTL_ISSUER
-//
-// pvPara == PCCTL_CONTEXT, Signer Index, CTL whose issuer's URL (identified
-// by the signer index) is being requested
-//
-// This will be retrieved from an authority info access attribute method encoded
-// in each signer info in the PKCS7 (CTL)
-//
-// URL_OID_CTL_NEXT_UPDATE
-//
-// pvPara == PCCTL_CONTEXT, Signer Index, CTL whose next update URL is being
-// requested and an optional signer index in case we need to check signer
-// info attributes
-//
-// This will be retrieved from an authority info access CTL extension, property,
-// or signer info attribute method
-//
-// URL_OID_CRL_ISSUER
-//
-// pvPara == PCCRL_CONTEXT, CRL whose issuer's URL is being requested
-//
-// This will be retrieved from a property on the CRL which has been inherited
-// from the subject cert (either from the subject cert issuer or the subject
-// cert distribution point extension). It will be encoded as an authority
-// info access extension method.
-//
-
-const
- URL_OID_CERTIFICATE_ISSUER = LPCSTR(1);
- {$EXTERNALSYM URL_OID_CERTIFICATE_ISSUER}
- URL_OID_CERTIFICATE_CRL_DIST_POINT = LPCSTR(2);
- {$EXTERNALSYM URL_OID_CERTIFICATE_CRL_DIST_POINT}
- URL_OID_CTL_ISSUER = LPCSTR(3);
- {$EXTERNALSYM URL_OID_CTL_ISSUER}
- URL_OID_CTL_NEXT_UPDATE = LPCSTR(4);
- {$EXTERNALSYM URL_OID_CTL_NEXT_UPDATE}
- URL_OID_CRL_ISSUER = LPCSTR(5);
- {$EXTERNALSYM URL_OID_CRL_ISSUER}
-
-//
-// Get a time valid CAPI2 object
-//
-
-function CryptGetTimeValidObject(pszTimeValidOid: LPCSTR; pvPara: LPVOID;
- pIssuer: PCCERT_CONTEXT; pftValidFor: LPFILETIME; dwFlags, dwTimeout: DWORD;
- ppvObject: LPLPVOID; pCredentials: PCRYPT_CREDENTIALS; pvReserved: LPVOID): BOOL; stdcall;
-{$EXTERNALSYM CryptGetTimeValidObject}
-
-const
- TIME_VALID_OID_GET_OBJECT_FUNC = 'TimeValidDllGetObject';
- {$EXTERNALSYM TIME_VALID_OID_GET_OBJECT_FUNC}
-
-//
-// TimeValidDllGetObject has the same signature as CryptGetTimeValidObject
-//
-
-//
-// TIME_VALID_OID_GET_CTL
-//
-// pvPara == PCCTL_CONTEXT, the current CTL
-//
-// TIME_VALID_OID_GET_CRL
-//
-// pvPara == PCCRL_CONTEXT, the current CRL
-//
-// TIME_VALID_OID_GET_CRL_FROM_CERT
-//
-// pvPara == PCCERT_CONTEXT, the subject cert
-//
-
- TIME_VALID_OID_GET_CTL = LPCSTR(1);
- {$EXTERNALSYM TIME_VALID_OID_GET_CTL}
- TIME_VALID_OID_GET_CRL = LPCSTR(2);
- {$EXTERNALSYM TIME_VALID_OID_GET_CRL}
- TIME_VALID_OID_GET_CRL_FROM_CERT = LPCSTR(3);
- {$EXTERNALSYM TIME_VALID_OID_GET_CRL_FROM_CERT}
-
-function CryptFlushTimeValidObject(pszFlushTimeValidOid: LPCSTR; pvPara: LPVOID;
- pIssuer: PCCERT_CONTEXT; dwFlags: DWORD; pvReserved: LPVOID): BOOL; stdcall;
-{$EXTERNALSYM CryptFlushTimeValidObject}
-
-const
- TIME_VALID_OID_FLUSH_OBJECT_FUNC = 'TimeValidDllFlushObject';
- {$EXTERNALSYM TIME_VALID_OID_FLUSH_OBJECT_FUNC}
-
-//
-// TimeValidDllFlushObject has the same signature as CryptFlushTimeValidObject
-//
-
-//
-// TIME_VALID_OID_FLUSH_CTL
-//
-// pvPara == PCCTL_CONTEXT, the CTL to flush
-//
-// TIME_VALID_OID_FLUSH_CRL
-//
-// pvPara == PCCRL_CONTEXT, the CRL to flush
-//
-// TIME_VALID_OID_FLUSH_CRL_FROM_CERT
-//
-
- TIME_VALID_OID_FLUSH_CTL = LPCSTR(1);
- {$EXTERNALSYM TIME_VALID_OID_FLUSH_CTL}
- TIME_VALID_OID_FLUSH_CRL = LPCSTR(2);
- {$EXTERNALSYM TIME_VALID_OID_FLUSH_CRL}
- TIME_VALID_OID_FLUSH_CRL_FROM_CERT = LPCSTR(3);
- {$EXTERNALSYM TIME_VALID_OID_FLUSH_CRL_FROM_CERT}
-
-//-------------------------------------------------------------------------
-// Data Protection APIs
-//-------------------------------------------------------------------------
-
-//
-// Data protection APIs enable applications to easily secure data.
-//
-// The base provider provides protection based on the users' logon
-// credentials. The data secured with these APIs follow the same
-// roaming characteristics as HKCU -- if HKCU roams, the data
-// protected by the base provider may roam as well. This makes
-// the API ideal for the munging of data stored in the registry.
-//
-
-//
-// Prompt struct -- what to tell users about the access
-//
-
-type
- PCRYPTPROTECT_PROMPTSTRUCT = ^CRYPTPROTECT_PROMPTSTRUCT;
- {$EXTERNALSYM PCRYPTPROTECT_PROMPTSTRUCT}
- _CRYPTPROTECT_PROMPTSTRUCT = record
- cbSize: DWORD;
- dwPromptFlags: DWORD;
- hwndApp: HWND;
- szPrompt: LPCWSTR;
- end;
- {$EXTERNALSYM _CRYPTPROTECT_PROMPTSTRUCT}
- CRYPTPROTECT_PROMPTSTRUCT = _CRYPTPROTECT_PROMPTSTRUCT;
- {$EXTERNALSYM CRYPTPROTECT_PROMPTSTRUCT}
- TCryptProtectPromptStruct = CRYPTPROTECT_PROMPTSTRUCT;
- PCryptProtectPromptStruct = PCRYPTPROTECT_PROMPTSTRUCT;
-
-//
-// base provider action
-//
-
-const
- CRYPTPROTECT_DEFAULT_PROVIDER: GUID = (
- D1:$df9d8cd0; D2:$1501; D3:$11d1; D4:($8c, $7a, $00, $c0, $4f, $c2, $97, $eb));
- {$EXTERNALSYM CRYPTPROTECT_DEFAULT_PROVIDER}
-
-//
-// CryptProtect PromptStruct dwPromtFlags
-//
-//
-// prompt on unprotect
-
- CRYPTPROTECT_PROMPT_ON_UNPROTECT = $1; // 1<<0
- {$EXTERNALSYM CRYPTPROTECT_PROMPT_ON_UNPROTECT}
-
-//
-// prompt on protect
-
- CRYPTPROTECT_PROMPT_ON_PROTECT = $2; // 1<<1
- {$EXTERNALSYM CRYPTPROTECT_PROMPT_ON_PROTECT}
- CRYPTPROTECT_PROMPT_RESERVED = $04; // reserved, do not use.
- {$EXTERNALSYM CRYPTPROTECT_PROMPT_RESERVED}
-
-//
-// only allow strong variant UI protection (user supplied password currently).
-
- CRYPTPROTECT_PROMPT_STRONG = $08; // 1<<3
- {$EXTERNALSYM CRYPTPROTECT_PROMPT_STRONG}
-
-//
-// CryptProtectData and CryptUnprotectData dwFlags
-//
-// for remote-access situations where ui is not an option
-// if UI was specified on protect or unprotect operation, the call
-// will fail and GetLastError() will indicate ERROR_PASSWORD_RESTRICTION
-
- CRYPTPROTECT_UI_FORBIDDEN = $1;
- {$EXTERNALSYM CRYPTPROTECT_UI_FORBIDDEN}
-
-//
-// per machine protected data -- any user on machine where CryptProtectData
-// took place may CryptUnprotectData
-
- CRYPTPROTECT_LOCAL_MACHINE = $4;
- {$EXTERNALSYM CRYPTPROTECT_LOCAL_MACHINE}
-
-//
-// force credential synchronize during CryptProtectData()
-// Synchronize is only operation that occurs during this operation
-
- CRYPTPROTECT_CRED_SYNC = $8;
- {$EXTERNALSYM CRYPTPROTECT_CRED_SYNC}
-
-// flags reserved for system use
-
- CRYPTPROTECT_FIRST_RESERVED_FLAGVAL = $0FFFFFFF;
- {$EXTERNALSYM CRYPTPROTECT_FIRST_RESERVED_FLAGVAL}
- CRYPTPROTECT_LAST_RESERVED_FLAGVAL = DWORD($FFFFFFFF);
- {$EXTERNALSYM CRYPTPROTECT_LAST_RESERVED_FLAGVAL}
-
-//
-// flags specific to base provider
-//
-
-function CryptProtectData(pDataIn: PDATA_BLOB; szDataDescr: LPCWSTR;
- pOptionalEntropy: PDATA_BLOB; pvReserved: PVOID;
- pPromptStruct: PCRYPTPROTECT_PROMPTSTRUCT; dwFlags: DWORD; pDataOut: PDATA_BLOB): BOOL; stdcall;
-{$EXTERNALSYM CryptProtectData}
-
-function CryptUnprotectData(pDataIn: PDATA_BLOB; ppszDataDescr: LPLPWSTR;
- pOptionalEntropy: PDATA_BLOB; pvReserved: PVOID;
- pPromptStruct: PCRYPTPROTECT_PROMPTSTRUCT; dwFlags: DWORD; pDataOut: PDATA_BLOB): BOOL; stdcall;
-{$EXTERNALSYM CryptUnprotectData}
-
-//+=========================================================================
-// Helper functions to build certificates
-//==========================================================================
-
-//+-------------------------------------------------------------------------
-//
-// Builds a self-signed certificate and returns a PCCERT_CONTEXT representing
-// the certificate. A hProv must be specified to build the cert context.
-//
-// pSubjectIssuerBlob is the DN for the certifcate. If an alternate subject
-// name is desired it must be specified as an extension in the pExtensions
-// parameter. pSubjectIssuerBlob can NOT be NULL, so minimually an empty DN
-// must be specified.
-//
-// By default:
-// pKeyProvInfo - The CSP is queried for the KeyProvInfo parameters. Only the Provider,
-// Provider Type and Container is queried. Many CSPs don't support these
-// queries and will cause a failure. In such cases the pKeyProvInfo
-// must be specified (RSA BASE works fine).
-//
-// pSignatureAlgorithm - will default to SHA1RSA
-// pStartTime will default to the current time
-// pEndTime will default to 1 year
-// pEntensions will be empty.
-//
-// The returned PCCERT_CONTEXT will reference the private keys by setting the
-// CERT_KEY_PROV_INFO_PROP_ID. However, if this property is not desired specify the
-// CERT_CREATE_SELFSIGN_NO_KEY_INFO in dwFlags.
-//
-// If the cert being built is only a dummy placeholder cert for speed it may not
-// need to be signed. Signing of the cert is skipped if CERT_CREATE_SELFSIGN_NO_SIGN
-// is specified in dwFlags.
-//
-//--------------------------------------------------------------------------
-
-function CertCreateSelfSignCertificate(hProv: HCRYPTPROV;
- pSubjectIssuerBlob: PCERT_NAME_BLOB; dwFlags: DWORD;
- pKeyProvInfo: PCRYPT_KEY_PROV_INFO; pSignatureAlgorithm: PCRYPT_ALGORITHM_IDENTIFIER;
- pStartTime, pEndTime: PSYSTEMTIME; pExtensions: PCERT_EXTENSIONS): PCCERT_CONTEXT; stdcall;
-{$EXTERNALSYM CertCreateSelfSignCertificate}
-
-const
- CERT_CREATE_SELFSIGN_NO_SIGN = 1;
- {$EXTERNALSYM CERT_CREATE_SELFSIGN_NO_SIGN}
- CERT_CREATE_SELFSIGN_NO_KEY_INFO = 2;
- {$EXTERNALSYM CERT_CREATE_SELFSIGN_NO_KEY_INFO}
-
-//+=========================================================================
-// Key Identifier Property Data Structures and APIs
-//==========================================================================
-
-//+-------------------------------------------------------------------------
-// Get the property for the specified Key Identifier.
-//
-// The Key Identifier is the SHA1 hash of the encoded CERT_PUBLIC_KEY_INFO.
-// The Key Identifier for a certificate can be obtained by getting the
-// certificate's CERT_KEY_IDENTIFIER_PROP_ID. The
-// CryptCreateKeyIdentifierFromCSP API can be called to create the Key
-// Identifier from a CSP Public Key Blob.
-//
-// A Key Identifier can have the same properties as a certificate context.
-// CERT_KEY_PROV_INFO_PROP_ID is the property of most interest.
-// For CERT_KEY_PROV_INFO_PROP_ID, pvData points to a CRYPT_KEY_PROV_INFO
-// structure. Elements pointed to by fields in the pvData structure follow the
-// structure. Therefore, *pcbData will exceed the size of the structure.
-//
-// If CRYPT_KEYID_ALLOC_FLAG is set, then, *pvData is updated with a
-// pointer to allocated memory. LocalFree() must be called to free the
-// allocated memory.
-//
-// By default, searches the CurrentUser's list of Key Identifiers.
-// CRYPT_KEYID_MACHINE_FLAG can be set to search the LocalMachine's list
-// of Key Identifiers. When CRYPT_KEYID_MACHINE_FLAG is set, pwszComputerName
-// can also be set to specify the name of a remote computer to be searched
-// instead of the local machine.
-//--------------------------------------------------------------------------
-
-function CryptGetKeyIdentifierProperty(pKeyIdentifier: PCRYPT_HASH_BLOB;
- dwPropId: DWORD; dwFlags: DWORD; pwszComputerName: LPCWSTR; pvReserved: Pointer;
- pvData: Pointer; var pcbData: DWORD): BOOL; stdcall;
-{$EXTERNALSYM CryptGetKeyIdentifierProperty}
-
-// When the following flag is set, searches the LocalMachine instead of the
-// CurrentUser. This flag is applicable to all the KeyIdentifierProperty APIs.
-
-const
- CRYPT_KEYID_MACHINE_FLAG = $00000020;
- {$EXTERNALSYM CRYPT_KEYID_MACHINE_FLAG}
-
-// When the following flag is set, *pvData is updated with a pointer to
-// allocated memory. LocalFree() must be called to free the allocated memory.
-
- CRYPT_KEYID_ALLOC_FLAG = $00008000;
- {$EXTERNALSYM CRYPT_KEYID_ALLOC_FLAG}
-
-//+-------------------------------------------------------------------------
-// Set the property for the specified Key Identifier.
-//
-// For CERT_KEY_PROV_INFO_PROP_ID pvData points to the
-// CRYPT_KEY_PROV_INFO data structure. For all other properties, pvData
-// points to a CRYPT_DATA_BLOB.
-//
-// Setting pvData == NULL, deletes the property.
-//
-// Set CRYPT_KEYID_MACHINE_FLAG to set the property for a LocalMachine
-// Key Identifier. Set pwszComputerName, to select a remote computer.
-//
-// If CRYPT_KEYID_DELETE_FLAG is set, the Key Identifier and all its
-// properties is deleted.
-//
-// If CRYPT_KEYID_SET_NEW_FLAG is set, the set fails if the property already
-// exists. For an existing property, FALSE is returned with LastError set to
-// CRYPT_E_EXISTS.
-//--------------------------------------------------------------------------
-
-function CryptSetKeyIdentifierProperty(pKeyIdentifier: PCRYPT_HASH_BLOB;
- dwPropId: DWORD; dwFlags: DWORD; pwszComputerName: LPCWSTR; pvReserved: Pointer;
- pvData: Pointer): BOOL; stdcall;
-{$EXTERNALSYM CryptSetKeyIdentifierProperty}
-
-// When the following flag is set, the Key Identifier and all its properties
-// are deleted.
-
-const
- CRYPT_KEYID_DELETE_FLAG = $00000010;
- {$EXTERNALSYM CRYPT_KEYID_DELETE_FLAG}
-
-// When the following flag is set, the set fails if the property already
-// exists.
-
- CRYPT_KEYID_SET_NEW_FLAG = $00002000;
- {$EXTERNALSYM CRYPT_KEYID_SET_NEW_FLAG}
-
-//+-------------------------------------------------------------------------
-// For CERT_KEY_PROV_INFO_PROP_ID, rgppvData[] points to a
-// CRYPT_KEY_PROV_INFO.
-//
-// Return FALSE to stop the enumeration.
-//--------------------------------------------------------------------------
-
-type
- PFN_CRYPT_ENUM_KEYID_PROP = function(pKeyIdentifier: PCRYPT_HASH_BLOB;
- dwFlags: DWORD; pvReserved: Pointer; pvArg: Pointer; cProp: DWORD;
- rgdwPropId: LPDWORD; rgpvData: Pointer; rgcbData: LPDWORD): BOOL; stdcall;
- {$EXTERNALSYM PFN_CRYPT_ENUM_KEYID_PROP}
- PFnCryptEnumKeyIdProp = PFN_CRYPT_ENUM_KEYID_PROP;
-
-//+-------------------------------------------------------------------------
-// Enumerate the Key Identifiers.
-//
-// If pKeyIdentifier is NULL, enumerates all Key Identifers. Otherwise,
-// calls the callback for the specified KeyIdentifier. If dwPropId is
-// 0, calls the callback with all the properties. Otherwise, only calls
-// the callback with the specified property (cProp = 1).
-// Furthermore, when dwPropId is specified, skips KeyIdentifiers not
-// having the property.
-//
-// Set CRYPT_KEYID_MACHINE_FLAG to enumerate the LocalMachine
-// Key Identifiers. Set pwszComputerName, to enumerate Key Identifiers on
-// a remote computer.
-//--------------------------------------------------------------------------
-
-function CryptEnumKeyIdentifierProperties(pKeyIdentifier: PCRYPT_HASH_BLOB;
- dwPropId: DWORD; dwFlags: DWORD; pwszComputerName: LPCWSTR; pvReserved: Pointer;
- pvArg: Pointer; pfnEnum: PFN_CRYPT_ENUM_KEYID_PROP): BOOL; stdcall;
-{$EXTERNALSYM CryptEnumKeyIdentifierProperties}
-
-//+-------------------------------------------------------------------------
-// Create a KeyIdentifier from the CSP Public Key Blob.
-//
-// Converts the CSP PUBLICKEYSTRUC into a X.509 CERT_PUBLIC_KEY_INFO and
-// encodes. The encoded CERT_PUBLIC_KEY_INFO is SHA1 hashed to obtain
-// the Key Identifier.
-//
-// By default, the pPubKeyStruc->aiKeyAlg is used to find the appropriate
-// public key Object Identifier. pszPubKeyOID can be set to override
-// the default OID obtained from the aiKeyAlg.
-//--------------------------------------------------------------------------
-
-function CryptCreateKeyIdentifierFromCSP(dwCertEncodingType: DWORD;
- pszPubKeyOID: LPCSTR; pPubKeyStruc: PPUBLICKEYSTRUC; cbPubKeyStruc: DWORD;
- dwFlags: DWORD; pvReserved: Pointer; pbHash: LPBYTE; pcbHash: DWORD): BOOL; stdcall;
-{$EXTERNALSYM CryptCreateKeyIdentifierFromCSP}
-
-//+=========================================================================
-// Certificate Chaining Infrastructure
-//==========================================================================
-
-//
-// The chain engine defines the store namespace and cache partitioning for
-// the Certificate Chaining infrastructure. A default chain engine
-// is defined for the process which uses all default system stores e.g.
-// Root, CA, Trust, for chain building and caching. If an application
-// wishes to define its own store namespace or have its own partitioned
-// cache then it can create its own chain engine. It is advisable to create
-// a chain engine at application startup and use it throughout the lifetime
-// of the application in order to get optimal caching behavior
-//
-
-type
- HCERTCHAINENGINE = HANDLE;
- {$EXTERNALSYM HCERTCHAINENGINE}
-
-const
- HCCE_CURRENT_USER = HCERTCHAINENGINE(0);
- {$EXTERNALSYM HCCE_CURRENT_USER}
- HCCE_LOCAL_MACHINE = HCERTCHAINENGINE($1);
- {$EXTERNALSYM HCCE_LOCAL_MACHINE}
-
-//
-// Create a certificate chain engine.
-//
-
-//
-// Configuration parameters for the certificate chain engine
-//
-// hRestrictedRoot - restrict the root store (must be a subset of "Root")
-//
-// hRestrictedTrust - restrict the store for CTLs
-//
-// hRestrictedOther - restrict the store for certs and CRLs
-//
-// cAdditionalStore, rghAdditionalStore - additional stores
-//
-// NOTE: The algorithm used to define the stores for the engine is as
-// follows:
-//
-// hRoot = hRestrictedRoot or System Store "Root"
-//
-// hTrust = hRestrictedTrust or hWorld (defined later)
-//
-// hOther = hRestrictedOther or (hRestrictedTrust == NULL) ? hWorld :
-// hRestrictedTrust + hWorld
-//
-// hWorld = hRoot + "CA" + "My" + "Trust" + rghAdditionalStore
-//
-// dwFlags - flags
-//
-// CERT_CHAIN_CACHE_END_CERT - information will be cached on
-// the end cert as well as the other
-// certs in the chain
-//
-// CERT_CHAIN_THREAD_STORE_SYNC - use separate thread for store syncs
-// and related cache updates
-//
-// CERT_CHAIN_CACHE_ONLY_URL_RETRIEVAL - don't hit the wire to get
-// URL based objects
-//
-// dwUrlRetrievalTimeout - timeout for wire based URL object retrievals
-//
-
-const
- CERT_CHAIN_CACHE_END_CERT = $00000001;
- {$EXTERNALSYM CERT_CHAIN_CACHE_END_CERT}
- CERT_CHAIN_THREAD_STORE_SYNC = $00000002;
- {$EXTERNALSYM CERT_CHAIN_THREAD_STORE_SYNC}
- CERT_CHAIN_CACHE_ONLY_URL_RETRIEVAL = $00000004;
- {$EXTERNALSYM CERT_CHAIN_CACHE_ONLY_URL_RETRIEVAL}
- CERT_CHAIN_USE_LOCAL_MACHINE_STORE = $00000008;
- {$EXTERNALSYM CERT_CHAIN_USE_LOCAL_MACHINE_STORE}
- CERT_CHAIN_ENABLE_CACHE_AUTO_UPDATE = $00000010;
- {$EXTERNALSYM CERT_CHAIN_ENABLE_CACHE_AUTO_UPDATE}
-
-type
- PCERT_CHAIN_ENGINE_CONFIG = ^CERT_CHAIN_ENGINE_CONFIG;
- {$EXTERNALSYM PCERT_CHAIN_ENGINE_CONFIG}
- _CERT_CHAIN_ENGINE_CONFIG = record
- cbSize: DWORD;
- hRestrictedRoot: HCERTSTORE;
- hRestrictedTrust: HCERTSTORE;
- hRestrictedOther: HCERTSTORE;
- cAdditionalStore: DWORD;
- rghAdditionalStore: PHCERTSTORE;
- dwFlags: DWORD;
- dwUrlRetrievalTimeout: DWORD;
- MaximumCachedCertificates: DWORD;
- CycleDetectionModulus: DWORD;
- end;
- {$EXTERNALSYM _CERT_CHAIN_ENGINE_CONFIG}
- CERT_CHAIN_ENGINE_CONFIG = _CERT_CHAIN_ENGINE_CONFIG;
- {$EXTERNALSYM CERT_CHAIN_ENGINE_CONFIG}
- TCertChainEngineConfig = CERT_CHAIN_ENGINE_CONFIG;
- PCertChainEngineConfig = PCERT_CHAIN_ENGINE_CONFIG;
-
-function CertCreateCertificateChainEngine(pConfig: PCERT_CHAIN_ENGINE_CONFIG;
- var phChainEngine: HCERTCHAINENGINE): BOOL; stdcall;
-{$EXTERNALSYM CertCreateCertificateChainEngine}
-
-//
-// Free a certificate trust engine
-//
-
-procedure CertFreeCertificateChainEngine(hChainEngine: HCERTCHAINENGINE); stdcall;
-{$EXTERNALSYM CertFreeCertificateChainEngine}
-
-//
-// Resync the certificate chain engine. This resync's the stores backing
-// the engine and updates the engine caches.
-//
-
-function CertResyncCertificateChainEngine(hChainEngine: HCERTCHAINENGINE): BOOL; stdcall;
-{$EXTERNALSYM CertResyncCertificateChainEngine}
-
-//
-// When an application requests a certificate chain, the data structure
-// returned is in the form of a CERT_CHAIN_CONTEXT. This contains
-// an array of CERT_SIMPLE_CHAIN where each simple chain goes from
-// an end cert to a self signed cert and the chain context connects simple
-// chains via trust lists. Each simple chain contains the chain of
-// certificates, summary trust information about the chain and trust information
-// about each certificate element in the chain.
-//
-
-//
-// Trust status bits
-//
-
-type
- PCERT_TRUST_STATUS = ^CERT_TRUST_STATUS;
- {$EXTERNALSYM PCERT_TRUST_STATUS}
- _CERT_TRUST_STATUS = record
- dwErrorStatus: DWORD;
- dwInfoStatus: DWORD;
- end;
- {$EXTERNALSYM _CERT_TRUST_STATUS}
- CERT_TRUST_STATUS = _CERT_TRUST_STATUS;
- {$EXTERNALSYM CERT_TRUST_STATUS}
- TCertTrustStatus = CERT_TRUST_STATUS;
- PCertTrustStatus = PCERT_TRUST_STATUS;
-
-//
-// The following are error status bits
-//
-
-// These can be applied to certificates and chains
-
-const
- CERT_TRUST_NO_ERROR = $00000000;
- {$EXTERNALSYM CERT_TRUST_NO_ERROR}
- CERT_TRUST_IS_NOT_TIME_VALID = $00000001;
- {$EXTERNALSYM CERT_TRUST_IS_NOT_TIME_VALID}
- CERT_TRUST_IS_NOT_TIME_NESTED = $00000002;
- {$EXTERNALSYM CERT_TRUST_IS_NOT_TIME_NESTED}
- CERT_TRUST_IS_REVOKED = $00000004;
- {$EXTERNALSYM CERT_TRUST_IS_REVOKED}
- CERT_TRUST_IS_NOT_SIGNATURE_VALID = $00000008;
- {$EXTERNALSYM CERT_TRUST_IS_NOT_SIGNATURE_VALID}
- CERT_TRUST_IS_NOT_VALID_FOR_USAGE = $00000010;
- {$EXTERNALSYM CERT_TRUST_IS_NOT_VALID_FOR_USAGE}
- CERT_TRUST_IS_UNTRUSTED_ROOT = $00000020;
- {$EXTERNALSYM CERT_TRUST_IS_UNTRUSTED_ROOT}
- CERT_TRUST_REVOCATION_STATUS_UNKNOWN = $00000040;
- {$EXTERNALSYM CERT_TRUST_REVOCATION_STATUS_UNKNOWN}
- CERT_TRUST_IS_CYCLIC = $00000080;
- {$EXTERNALSYM CERT_TRUST_IS_CYCLIC}
-
-// These can be applied to chains only
-
- CERT_TRUST_IS_PARTIAL_CHAIN = $00010000;
- {$EXTERNALSYM CERT_TRUST_IS_PARTIAL_CHAIN}
- CERT_TRUST_CTL_IS_NOT_TIME_VALID = $00020000;
- {$EXTERNALSYM CERT_TRUST_CTL_IS_NOT_TIME_VALID}
- CERT_TRUST_CTL_IS_NOT_SIGNATURE_VALID = $00040000;
- {$EXTERNALSYM CERT_TRUST_CTL_IS_NOT_SIGNATURE_VALID}
- CERT_TRUST_CTL_IS_NOT_VALID_FOR_USAGE = $00080000;
- {$EXTERNALSYM CERT_TRUST_CTL_IS_NOT_VALID_FOR_USAGE}
-
-//
-// The following are info status bits
-//
-
-// These can be applied to certificates only
-
- CERT_TRUST_HAS_EXACT_MATCH_ISSUER = $00000001;
- {$EXTERNALSYM CERT_TRUST_HAS_EXACT_MATCH_ISSUER}
- CERT_TRUST_HAS_KEY_MATCH_ISSUER = $00000002;
- {$EXTERNALSYM CERT_TRUST_HAS_KEY_MATCH_ISSUER}
- CERT_TRUST_HAS_NAME_MATCH_ISSUER = $00000004;
- {$EXTERNALSYM CERT_TRUST_HAS_NAME_MATCH_ISSUER}
- CERT_TRUST_IS_SELF_SIGNED = $00000008;
- {$EXTERNALSYM CERT_TRUST_IS_SELF_SIGNED}
-
-// These can be applied to chains only
-
- CERT_TRUST_IS_COMPLEX_CHAIN = $00010000;
- {$EXTERNALSYM CERT_TRUST_IS_COMPLEX_CHAIN}
-
-//
-// Each certificate context in a simple chain has a corresponding chain element
-// in the simple chain context
-//
-// dwErrorStatus has CERT_TRUST_IS_REVOKED, pRevocationInfo set
-// dwErrorStatus has CERT_TRUST_REVOCATION_STATUS_UNKNOWN, pRevocationInfo set
-
-//
-// BUGBUG: Note that the post processing revocation supported in the first
-// version only sets cbSize and dwRevocationResult. Everything else
-// is NULL
-//
-
-//
-// Revocation Information
-//
-
-type
- PCERT_REVOCATION_INFO = ^CERT_REVOCATION_INFO;
- {$EXTERNALSYM PCERT_REVOCATION_INFO}
- _CERT_REVOCATION_INFO = record
- cbSize: DWORD;
- dwRevocationResult: DWORD;
- pszRevocationOid: LPCSTR;
- pvOidSpecificInfo: LPVOID;
- end;
- {$EXTERNALSYM _CERT_REVOCATION_INFO}
- CERT_REVOCATION_INFO = _CERT_REVOCATION_INFO;
- {$EXTERNALSYM CERT_REVOCATION_INFO}
- TCertRevocationInfo = CERT_REVOCATION_INFO;
- PCertRevocationInfo = PCERT_REVOCATION_INFO;
-
-//
-// Trust List Information
-//
-
- PCERT_TRUST_LIST_INFO = ^CERT_TRUST_LIST_INFO;
- {$EXTERNALSYM PCERT_TRUST_LIST_INFO}
- _CERT_TRUST_LIST_INFO = record
- cbSize: DWORD;
- pCtlEntry: PCTL_ENTRY;
- pCtlContext: PCCTL_CONTEXT;
- end;
- {$EXTERNALSYM _CERT_TRUST_LIST_INFO}
- CERT_TRUST_LIST_INFO = _CERT_TRUST_LIST_INFO;
- {$EXTERNALSYM CERT_TRUST_LIST_INFO}
- TCertTrustListInfo = CERT_TRUST_LIST_INFO;
- PCertTrustListInfo = PCERT_TRUST_LIST_INFO;
-
-//
-// Chain Element
-//
-
- PCERT_CHAIN_ELEMENT = ^CERT_CHAIN_ELEMENT;
- {$EXTERNALSYM PCERT_CHAIN_ELEMENT}
- _CERT_CHAIN_ELEMENT = record
- cbSize: DWORD;
- pCertContext: PCCERT_CONTEXT;
- TrustStatus: CERT_TRUST_STATUS;
- pRevocationInfo: PCERT_REVOCATION_INFO;
- end;
- {$EXTERNALSYM _CERT_CHAIN_ELEMENT}
- CERT_CHAIN_ELEMENT = _CERT_CHAIN_ELEMENT;
- {$EXTERNALSYM CERT_CHAIN_ELEMENT}
- TCertChainElement = CERT_CHAIN_ELEMENT;
- PCertChainElement = PCERT_CHAIN_ELEMENT;
-
-//
-// The simple chain is an array of chain elements and a summary trust status
-// for the chain
-//
-// rgpElements[0] is the end certificate chain element
-//
-// rgpElements[cElement-1] is the self-signed "root" certificate chain element
-//
-
- PCERT_SIMPLE_CHAIN = ^CERT_SIMPLE_CHAIN;
- {$EXTERNALSYM PCERT_SIMPLE_CHAIN}
- _CERT_SIMPLE_CHAIN = record
- cbSize: DWORD;
- TrustStatus: CERT_TRUST_STATUS;
- cElement: DWORD;
- rgpElement: PCERT_CHAIN_ELEMENT;
- pTrustListInfo: PCERT_TRUST_LIST_INFO;
- end;
- {$EXTERNALSYM _CERT_SIMPLE_CHAIN}
- CERT_SIMPLE_CHAIN = _CERT_SIMPLE_CHAIN;
- {$EXTERNALSYM CERT_SIMPLE_CHAIN}
- TCertSimpleChain = CERT_SIMPLE_CHAIN;
- PCertSimpleChain = PCERT_SIMPLE_CHAIN;
-
-//
-// And the chain context contains an array of simple chains and summary trust
-// status for all the connected simple chains
-//
-// rgpChains[0] is the end certificate simple chain
-//
-// rgpChains[cChain-1] is the final (possibly trust list signer) chain which
-// ends in a certificate which is contained in the root store
-//
-
- PCERT_CHAIN_CONTEXT = ^CERT_CHAIN_CONTEXT;
- {$EXTERNALSYM PCERT_CHAIN_CONTEXT}
- _CERT_CHAIN_CONTEXT = record
- cbSize: DWORD;
- TrustStatus: CERT_TRUST_STATUS;
- cChain: DWORD;
- rgpChain: PCERT_SIMPLE_CHAIN;
- end;
- {$EXTERNALSYM _CERT_CHAIN_CONTEXT}
- CERT_CHAIN_CONTEXT = _CERT_CHAIN_CONTEXT;
- {$EXTERNALSYM CERT_CHAIN_CONTEXT}
- TCertChainContext = CERT_CHAIN_CONTEXT;
- PCertChainContext = PCERT_CHAIN_CONTEXT;
-
- PCCERT_CHAIN_CONTEXT = ^CERT_CHAIN_CONTEXT;
- {$EXTERNALSYM PCCERT_CHAIN_CONTEXT}
- PPCCERT_CHAIN_CONTEXT = ^PCERT_CHAIN_CONTEXT;
- {$NODEFINE PPCCERT_CHAIN_CONTEXT}
-
-//
-// When building a chain, the there are various parameters used for finding
-// issuing certificates and trust lists. They are identified in the
-// following structure
-//
-
-// Default usage match type is AND with value zero
-
-const
- USAGE_MATCH_TYPE_AND = $00000000;
- {$EXTERNALSYM USAGE_MATCH_TYPE_AND}
- USAGE_MATCH_TYPE_OR = $00000001;
- {$EXTERNALSYM USAGE_MATCH_TYPE_OR}
-
-type
- PCERT_USAGE_MATCH = ^CERT_USAGE_MATCH;
- {$EXTERNALSYM PCERT_USAGE_MATCH}
- _CERT_USAGE_MATCH = record
- dwType: DWORD;
- Usage: CERT_ENHKEY_USAGE;
- end;
- {$EXTERNALSYM _CERT_USAGE_MATCH}
- CERT_USAGE_MATCH = _CERT_USAGE_MATCH;
- {$EXTERNALSYM CERT_USAGE_MATCH}
- TCertUsageMatch = CERT_USAGE_MATCH;
- PCertUsageMatch = PCERT_USAGE_MATCH;
-
- PCTL_USAGE_MATCH = ^CTL_USAGE_MATCH;
- {$EXTERNALSYM PCTL_USAGE_MATCH}
- _CTL_USAGE_MATCH = record
- dwType: DWORD;
- Usage: CTL_USAGE;
- end;
- {$EXTERNALSYM _CTL_USAGE_MATCH}
- CTL_USAGE_MATCH = _CTL_USAGE_MATCH;
- {$EXTERNALSYM CTL_USAGE_MATCH}
- TCtlUsageMatch = CTL_USAGE_MATCH;
- PCtlUsageMatch = PCTL_USAGE_MATCH;
-
- PCERT_CHAIN_PARA = ^CERT_CHAIN_PARA;
- {$EXTERNALSYM PCERT_CHAIN_PARA}
- _CERT_CHAIN_PARA = record
- cbSize: DWORD;
- RequestedUsage: CERT_USAGE_MATCH;
- end;
- {$EXTERNALSYM _CERT_CHAIN_PARA}
- CERT_CHAIN_PARA = _CERT_CHAIN_PARA;
- {$EXTERNALSYM CERT_CHAIN_PARA}
- TCertChainPara = CERT_CHAIN_PARA;
- PCertChainPara = PCERT_CHAIN_PARA;
-
-//
-// The following API is used for retrieving certificate chains
-//
-// Parameters:
-//
-// hChainEngine - the chain engine (namespace and cache) to use, NULL
-// mean use the default chain engine
-//
-// pCertContext - the context we are retrieving the chain for, it
-// will be the zero index element in the chain
-//
-// pTime - the point in time that we want the chain validated
-// for. Note that the time does not affect trust list,
-// revocation, or root store checking. NULL means use
-// the current system time
-//
-// hAdditionalStore - additional store to use when looking up objects
-//
-// pChainPara - parameters for chain building
-//
-// dwFlags - flags such as should revocation checking be done
-// on the chain?
-//
-// pvReserved - reserved parameter, must be NULL
-//
-// ppChainContext - chain context returned
-//
-
-// CERT_CHAIN_CACHE_END_CERT can be used here as well
-// Revocation flags are in the high nibble
-
-const
- CERT_CHAIN_REVOCATION_CHECK_END_CERT = $10000000;
- {$EXTERNALSYM CERT_CHAIN_REVOCATION_CHECK_END_CERT}
- CERT_CHAIN_REVOCATION_CHECK_CHAIN = $20000000;
- {$EXTERNALSYM CERT_CHAIN_REVOCATION_CHECK_CHAIN}
- CERT_CHAIN_REVOCATION_CHECK_CHAIN_EXCLUDE_ROOT = $40000000;
- {$EXTERNALSYM CERT_CHAIN_REVOCATION_CHECK_CHAIN_EXCLUDE_ROOT}
- CERT_CHAIN_REVOCATION_CHECK_CACHE_ONLY = DWORD($80000000);
- {$EXTERNALSYM CERT_CHAIN_REVOCATION_CHECK_CACHE_ONLY}
-
-function CertGetCertificateChain(hChainEngine: HCERTCHAINENGINE;
- pCertContext: PCCERT_CONTEXT; pTime: LPFILETIME; hAdditionalStore: HCERTSTORE;
- pChainPara: PCERT_CHAIN_PARA; dwFlags: DWORD; pvReserved: LPVOID;
- ppChainContext: PPCCERT_CHAIN_CONTEXT): BOOL; stdcall;
-{$EXTERNALSYM CertGetCertificateChain}
-
-//
-// Free a certificate chain
-//
-
-procedure CertFreeCertificateChain(pChainContext: PCCERT_CHAIN_CONTEXT); stdcall;
-{$EXTERNALSYM CertFreeCertificateChain}
-
-//
-// Duplicate (add a reference to) a certificate chain
-//
-
-function CertDuplicateCertificateChain(pChainContext: PCCERT_CHAIN_CONTEXT): PCCERT_CHAIN_CONTEXT; stdcall;
-{$EXTERNALSYM CertDuplicateCertificateChain}
-
-//
-// Specific Revocation Type OID and structure definitions
-//
-
-//
-// CRL Revocation OID
-//
-
-const
- REVOCATION_OID_CRL_REVOCATION = LPCSTR(1);
- {$EXTERNALSYM REVOCATION_OID_CRL_REVOCATION}
-
-//
-// For the CRL revocation OID the pvRevocationPara is NULL
-//
-
-//
-// CRL Revocation Info
-//
-
-type
- PCRL_REVOCATION_INFO = ^CRL_REVOCATION_INFO;
- {$EXTERNALSYM PCRL_REVOCATION_INFO}
- _CRL_REVOCATION_INFO = record
- pCrlEntry: PCRL_ENTRY;
- pCrlContext: PCCRL_CONTEXT;
- pCrlIssuerChain: PCCERT_CHAIN_CONTEXT;
- end;
- {$EXTERNALSYM _CRL_REVOCATION_INFO}
- CRL_REVOCATION_INFO = _CRL_REVOCATION_INFO;
- {$EXTERNALSYM CRL_REVOCATION_INFO}
- TCrlRevocationInfo = CRL_REVOCATION_INFO;
- PCrlRevocationInfo = PCRL_REVOCATION_INFO;
-
-//+-------------------------------------------------------------------------
-// Find the first or next certificate chain context in the store.
-//
-// The chain context is found according to the dwFindFlags, dwFindType and
-// its pvFindPara. See below for a list of the find types and its parameters.
-//
-// If the first or next chain context isn't found, NULL is returned.
-// Otherwise, a pointer to a read only CERT_CHAIN_CONTEXT is returned.
-// CERT_CHAIN_CONTEXT must be freed by calling CertFreeCertificateChain
-// or is freed when passed as the
-// pPrevChainContext on a subsequent call. CertDuplicateCertificateChain
-// can be called to make a duplicate.
-//
-// pPrevChainContext MUST BE NULL on the first
-// call to find the chain context. To find the next chain context, the
-// pPrevChainContext is set to the CERT_CHAIN_CONTEXT returned by a previous
-// call.
-//
-// NOTE: a NON-NULL pPrevChainContext is always CertFreeCertificateChain'ed by
-// this function, even for an error.
-//--------------------------------------------------------------------------
-
-function CertFindChainInStore(hCertStore: HCERTSTORE; dwCertEncodingType: DWORD;
- dwFindFlags: DWORD; dwFindType: DWORD; pvFindPara: Pointer;
- pPrevChainContext: PCCERT_CHAIN_CONTEXT): PCCERT_CHAIN_CONTEXT; stdcall;
-{$EXTERNALSYM CertFindChainInStore}
-
-const
- CERT_CHAIN_FIND_BY_ISSUER = 1;
- {$EXTERNALSYM CERT_CHAIN_FIND_BY_ISSUER}
-
-//+-------------------------------------------------------------------------
-// CERT_CHAIN_FIND_BY_ISSUER
-//
-// Find a certificate chain having a private key for the end certificate and
-// matching one of the given issuer names. A matching dwKeySpec and
-// enhanced key usage can also be specified. Additionally a callback can
-// be provided for even more caller provided filtering before building the
-// chain.
-//
-// By default, only the issuers in the first simple chain are compared
-// for a name match. CERT_CHAIN_FIND_BY_ISSUER_COMPLEX_CHAIN_FLAG can
-// be set in dwFindFlags to match issuers in all the simple chains.
-//
-// CERT_CHAIN_FIND_BY_ISSUER_NO_KEY_FLAG can be set in dwFindFlags to
-// not check if the end certificate has a private key.
-//
-// CERT_CHAIN_FIND_BY_ISSUER_COMPARE_KEY_FLAG can be set in dwFindFlags
-// to compare the public key in the end certificate with the crypto
-// provider's public key. The dwAcquirePrivateKeyFlags can be set
-// in CERT_CHAIN_FIND_BY_ISSUER_PARA to enable caching of the private key's
-// HKEY returned by the CSP.
-//
-// If dwCertEncodingType == 0, defaults to X509_ASN_ENCODING for the
-// array of encoded issuer names.
-//
-// By default, the hCertStore passed to CertFindChainInStore, is passed
-// as an additional store to CertGetCertificateChain.
-// CERT_CHAIN_FIND_BY_ISSUER_CACHE_ONLY_FLAG can be set in dwFindFlags
-// to improve performance by only searching the cached system stores
-// (root, my, ca, trust) to find the issuer certificates. If you are doing
-// a find in the "my" system store, than, this flag should be set to
-// improve performance.
-//
-// Setting CERT_CHAIN_FIND_BY_ISSUER_LOCAL_MACHINE_FLAG in dwFindFlags
-// restricts CertGetCertificateChain to search the Local Machine
-// cached system stores instead of the Current User's.
-//
-// Setting CERT_CHAIN_FIND_BY_ISSUER_CACHE_ONLY_URL_FLAG in dwFindFlags
-// restricts CertGetCertificateChain to only search the URL cache
-// and not hit the wire.
-//--------------------------------------------------------------------------
-
-// Returns FALSE to skip this certificate. Otherwise, returns TRUE to
-// build a chain for this certificate.
-
-type
- PFN_CERT_CHAIN_FIND_BY_ISSUER_CALLBACK = function(pCert: PCCERT_CONTEXT;
- pvFindArg: Pointer): BOOL; stdcall;
- {$EXTERNALSYM PFN_CERT_CHAIN_FIND_BY_ISSUER_CALLBACK}
- PFnCertChainFindByIssuerCallback = PFN_CERT_CHAIN_FIND_BY_ISSUER_CALLBACK;
-
- PCERT_CHAIN_FIND_BY_ISSUER_PARA = ^CERT_CHAIN_FIND_BY_ISSUER_PARA;
- {$EXTERNALSYM PCERT_CHAIN_FIND_BY_ISSUER_PARA}
- _CERT_CHAIN_FIND_BY_ISSUER_PARA = record
- cbSize: DWORD;
- // If pszUsageIdentifier == NULL, matches any usage.
- pszUsageIdentifier: LPCSTR;
- // If dwKeySpec == 0, matches any KeySpec
- dwKeySpec: DWORD;
- // When CERT_CHAIN_FIND_BY_ISSUER_COMPARE_KEY_FLAG is set in dwFindFlags,
- // CryptAcquireCertificatePrivateKey is called to do the public key
- // comparison. The following flags can be set to enable caching
- // of the acquired private key. See the API for more details on these
- // flags.
- dwAcquirePrivateKeyFlags: DWORD;
- // Pointer to an array of X509, ASN.1 encoded issuer name blobs. If
- // cIssuer == 0, matches any issuer
- cIssuer: DWORD;
- rgIssuer: PCERT_NAME_BLOB;
- // If NULL or Callback returns TRUE, builds the chain for the end
- // certificate having a private key with the specified KeySpec and
- // enhanced key usage.
- pfnFindCallback: PFN_CERT_CHAIN_FIND_BY_ISSUER_CALLBACK;
- pvFindArg: Pointer;
- end;
- {$EXTERNALSYM _CERT_CHAIN_FIND_BY_ISSUER_PARA}
- CERT_CHAIN_FIND_BY_ISSUER_PARA = _CERT_CHAIN_FIND_BY_ISSUER_PARA;
- {$EXTERNALSYM CERT_CHAIN_FIND_BY_ISSUER_PARA}
- TCertChainFindByIssuerPara = CERT_CHAIN_FIND_BY_ISSUER_PARA;
- PCertChainFindByIssuerPara = PCERT_CHAIN_FIND_BY_ISSUER_PARA;
-
-// The following dwFindFlags can be set for CERT_CHAIN_FIND_BY_ISSUER
-
-// If set, compares the public key in the end certificate with the crypto
-// provider's public key. This comparison is the last check made on the
-// build chain.
-
-const
- CERT_CHAIN_FIND_BY_ISSUER_COMPARE_KEY_FLAG = $0001;
- {$EXTERNALSYM CERT_CHAIN_FIND_BY_ISSUER_COMPARE_KEY_FLAG}
-
-// If not set, only checks the first simple chain for an issuer name match.
-// When set, also checks second and subsequent simple chains.
-
- CERT_CHAIN_FIND_BY_ISSUER_COMPLEX_CHAIN_FLAG = $0002;
- {$EXTERNALSYM CERT_CHAIN_FIND_BY_ISSUER_COMPLEX_CHAIN_FLAG}
-
-// If set, CertGetCertificateChain only searches the URL cache and
-// doesn't hit the wire.
-
- CERT_CHAIN_FIND_BY_ISSUER_CACHE_ONLY_URL_FLAG = $0004;
- {$EXTERNALSYM CERT_CHAIN_FIND_BY_ISSUER_CACHE_ONLY_URL_FLAG}
-
-// If set, CertGetCertificateChain only opens the Local Machine
-// certificate stores instead of the Current User's.
-
- CERT_CHAIN_FIND_BY_ISSUER_LOCAL_MACHINE_FLAG = $0008;
- {$EXTERNALSYM CERT_CHAIN_FIND_BY_ISSUER_LOCAL_MACHINE_FLAG}
-
-// If set, no check is made to see if the end certificate has a private
-// key associated with it.
-
- CERT_CHAIN_FIND_BY_ISSUER_NO_KEY_FLAG = $4000;
- {$EXTERNALSYM CERT_CHAIN_FIND_BY_ISSUER_NO_KEY_FLAG}
-
-// By default, the hCertStore passed to CertFindChainInStore, is passed
-// as the additional store to CertGetCertificateChain. This flag can be
-// set to improve performance by only searching the cached system stores
-// (root, my, ca, trust) to find the issuer certificates. If not set, then,
-// the hCertStore is always searched in addition to the cached system
-// stores.
-
- CERT_CHAIN_FIND_BY_ISSUER_CACHE_ONLY_FLAG = $8000;
- {$EXTERNALSYM CERT_CHAIN_FIND_BY_ISSUER_CACHE_ONLY_FLAG}
-
-//+=========================================================================
-// Certificate Chain Policy Data Structures and APIs
-//==========================================================================
-
-type
- PCERT_CHAIN_POLICY_PARA = ^CERT_CHAIN_POLICY_PARA;
- {$EXTERNALSYM PCERT_CHAIN_POLICY_PARA}
- _CERT_CHAIN_POLICY_PARA = record
- cbSize: DWORD;
- dwFlags: DWORD;
- pvExtraPolicyPara: Pointer; // pszPolicyOID specific
- end;
- {$EXTERNALSYM _CERT_CHAIN_POLICY_PARA}
- CERT_CHAIN_POLICY_PARA = _CERT_CHAIN_POLICY_PARA;
- {$EXTERNALSYM CERT_CHAIN_POLICY_PARA}
- TCertChainPolicyPara = CERT_CHAIN_POLICY_PARA;
- PCertChainPolicyPara = PCERT_CHAIN_POLICY_PARA;
-
-// If both lChainIndex and lElementIndex are set to -1, the dwError applies
-// to the whole chain context. If only lElementIndex is set to -1, the
-// dwError applies to the lChainIndex'ed chain. Otherwise, the dwError applies
-// to the certificate element at
-// pChainContext->rgpChain[lChainIndex]->rgpElement[lElementIndex].
-
- PCERT_CHAIN_POLICY_STATUS = ^CERT_CHAIN_POLICY_STATUS;
- {$EXTERNALSYM PCERT_CHAIN_POLICY_STATUS}
- _CERT_CHAIN_POLICY_STATUS = record
- cbSize: DWORD;
- dwError: DWORD;
- lChainIndex: LONG;
- lElementIndex: LONG;
- pvExtraPolicyStatus: Pointer; // pszPolicyOID specific
- end;
- {$EXTERNALSYM _CERT_CHAIN_POLICY_STATUS}
- CERT_CHAIN_POLICY_STATUS = _CERT_CHAIN_POLICY_STATUS;
- {$EXTERNALSYM CERT_CHAIN_POLICY_STATUS}
- TCertChainPolicyStatus = CERT_CHAIN_POLICY_STATUS;
- PCertChainPolicyStatus = PCERT_CHAIN_POLICY_STATUS;
-
-// Common chain policy flags
-
-const
- CERT_CHAIN_POLICY_IGNORE_NOT_TIME_VALID_FLAG = $00000001;
- {$EXTERNALSYM CERT_CHAIN_POLICY_IGNORE_NOT_TIME_VALID_FLAG}
- CERT_CHAIN_POLICY_IGNORE_CTL_NOT_TIME_VALID_FLAG = $00000002;
- {$EXTERNALSYM CERT_CHAIN_POLICY_IGNORE_CTL_NOT_TIME_VALID_FLAG}
- CERT_CHAIN_POLICY_IGNORE_NOT_TIME_NESTED_FLAG = $00000004;
- {$EXTERNALSYM CERT_CHAIN_POLICY_IGNORE_NOT_TIME_NESTED_FLAG}
-
- CERT_CHAIN_POLICY_IGNORE_ALL_NOT_TIME_VALID_FLAGS = (
- CERT_CHAIN_POLICY_IGNORE_NOT_TIME_VALID_FLAG or
- CERT_CHAIN_POLICY_IGNORE_CTL_NOT_TIME_VALID_FLAG or
- CERT_CHAIN_POLICY_IGNORE_NOT_TIME_NESTED_FLAG);
- {$EXTERNALSYM CERT_CHAIN_POLICY_IGNORE_ALL_NOT_TIME_VALID_FLAGS}
-
- CERT_CHAIN_POLICY_ALLOW_UNKNOWN_CA_FLAG = $00000010;
- {$EXTERNALSYM CERT_CHAIN_POLICY_ALLOW_UNKNOWN_CA_FLAG}
- CERT_CHAIN_POLICY_IGNORE_WRONG_USAGE_FLAG = $00000020;
- {$EXTERNALSYM CERT_CHAIN_POLICY_IGNORE_WRONG_USAGE_FLAG}
-
- CERT_CHAIN_POLICY_IGNORE_END_REV_UNKNOWN_FLAG = $00000100;
- {$EXTERNALSYM CERT_CHAIN_POLICY_IGNORE_END_REV_UNKNOWN_FLAG}
- CERT_CHAIN_POLICY_IGNORE_CTL_SIGNER_REV_UNKNOWN_FLAG = $00000200;
- {$EXTERNALSYM CERT_CHAIN_POLICY_IGNORE_CTL_SIGNER_REV_UNKNOWN_FLAG}
- CERT_CHAIN_POLICY_IGNORE_CA_REV_UNKNOWN_FLAG = $00000400;
- {$EXTERNALSYM CERT_CHAIN_POLICY_IGNORE_CA_REV_UNKNOWN_FLAG}
- CERT_CHAIN_POLICY_IGNORE_ROOT_REV_UNKNOWN_FLAG = $00000800;
- {$EXTERNALSYM CERT_CHAIN_POLICY_IGNORE_ROOT_REV_UNKNOWN_FLAG}
-
- CERT_CHAIN_POLICY_IGNORE_ALL_REV_UNKNOWN_FLAGS = (
- CERT_CHAIN_POLICY_IGNORE_END_REV_UNKNOWN_FLAG or
- CERT_CHAIN_POLICY_IGNORE_CTL_SIGNER_REV_UNKNOWN_FLAG or
- CERT_CHAIN_POLICY_IGNORE_CA_REV_UNKNOWN_FLAG or
- CERT_CHAIN_POLICY_IGNORE_ROOT_REV_UNKNOWN_FLAG);
- {$EXTERNALSYM CERT_CHAIN_POLICY_IGNORE_ALL_REV_UNKNOWN_FLAGS}
-
- CERT_CHAIN_POLICY_ALLOW_TESTROOT_FLAG = $00008000;
- {$EXTERNALSYM CERT_CHAIN_POLICY_ALLOW_TESTROOT_FLAG}
- CERT_CHAIN_POLICY_TRUST_TESTROOT_FLAG = $00004000;
- {$EXTERNALSYM CERT_CHAIN_POLICY_TRUST_TESTROOT_FLAG}
-
-//+-------------------------------------------------------------------------
-// Verify that the certificate chain satisfies the specified policy
-// requirements. If we were able to verify the chain policy, TRUE is returned
-// and the dwError field of the pPolicyStatus is updated. A dwError of 0
-// (ERROR_SUCCESS, S_OK) indicates the chain satisfies the specified policy.
-//
-// If dwError applies to the entire chain context, both lChainIndex and
-// lElementIndex are set to -1. If dwError applies to a simple chain,
-// lElementIndex is set to -1 and lChainIndex is set to the index of the
-// first offending chain having the error. If dwError applies to a
-// certificate element, lChainIndex and lElementIndex are updated to
-// index the first offending certificate having the error, where, the
-// the certificate element is at:
-// pChainContext->rgpChain[lChainIndex]->rgpElement[lElementIndex].
-//
-// The dwFlags in pPolicyPara can be set to change the default policy checking
-// behaviour. In addition, policy specific parameters can be passed in
-// the pvExtraPolicyPara field of pPolicyPara.
-//
-// In addition to returning dwError, in pPolicyStatus, policy OID specific
-// extra status may be returned via pvExtraPolicyStatus.
-//--------------------------------------------------------------------------
-
-function CertVerifyCertificateChainPolicy(pszPolicyOID: LPCSTR;
- pChainContext: PCCERT_CHAIN_CONTEXT; pPolicyPara: PCERT_CHAIN_POLICY_PARA;
- pPolicyStatus: PCERT_CHAIN_POLICY_STATUS): BOOL; stdcall;
-{$EXTERNALSYM CertVerifyCertificateChainPolicy}
-
-// Predefined OID Function Names
-
-const
- CRYPT_OID_VERIFY_CERTIFICATE_CHAIN_POLICY_FUNC = 'CertDllVerifyCertificateChainPolicy';
- {$EXTERNALSYM CRYPT_OID_VERIFY_CERTIFICATE_CHAIN_POLICY_FUNC}
-
-// CertDllVerifyCertificateChainPolicy has same function signature as
-// CertVerifyCertificateChainPolicy.
-
-//+-------------------------------------------------------------------------
-// Predefined verify chain policies
-//--------------------------------------------------------------------------
-
- CERT_CHAIN_POLICY_BASE = LPCSTR(1);
- {$EXTERNALSYM CERT_CHAIN_POLICY_BASE}
- CERT_CHAIN_POLICY_AUTHENTICODE = LPCSTR(2);
- {$EXTERNALSYM CERT_CHAIN_POLICY_AUTHENTICODE}
- CERT_CHAIN_POLICY_AUTHENTICODE_TS = LPCSTR(3);
- {$EXTERNALSYM CERT_CHAIN_POLICY_AUTHENTICODE_TS}
- CERT_CHAIN_POLICY_SSL = LPCSTR(4);
- {$EXTERNALSYM CERT_CHAIN_POLICY_SSL}
- CERT_CHAIN_POLICY_BASIC_CONSTRAINTS = LPCSTR(5);
- {$EXTERNALSYM CERT_CHAIN_POLICY_BASIC_CONSTRAINTS}
- CERT_CHAIN_POLICY_NT_AUTH = LPCSTR(6);
- {$EXTERNALSYM CERT_CHAIN_POLICY_NT_AUTH}
-
-//+-------------------------------------------------------------------------
-// CERT_CHAIN_POLICY_BASE
-//
-// Implements the base chain policy verification checks. dwFlags can
-// be set in pPolicyPara to alter the default policy checking behaviour.
-//--------------------------------------------------------------------------
-
-//+-------------------------------------------------------------------------
-// CERT_CHAIN_POLICY_AUTHENTICODE
-//
-// Implements the Authenticode chain policy verification checks.
-//
-// pvExtraPolicyPara may optionally be set to point to the following
-// AUTHENTICODE_EXTRA_CERT_CHAIN_POLICY_PARA.
-//
-// pvExtraPolicyStatus may optionally be set to point to the following
-// AUTHENTICODE_EXTRA_CERT_CHAIN_POLICY_STATUS.
-//--------------------------------------------------------------------------
-
-// dwRegPolicySettings are defined in wintrust.h
-
-type
- PAUTHENTICODE_EXTRA_CERT_CHAIN_POLICY_PARA = ^AUTHENTICODE_EXTRA_CERT_CHAIN_POLICY_PARA;
- {$EXTERNALSYM PAUTHENTICODE_EXTRA_CERT_CHAIN_POLICY_PARA}
- _AUTHENTICODE_EXTRA_CERT_CHAIN_POLICY_PARA = record
- cbSize: DWORD;
- dwRegPolicySettings: DWORD;
- pSignerInfo: PCMSG_SIGNER_INFO; // optional
- end;
- {$EXTERNALSYM _AUTHENTICODE_EXTRA_CERT_CHAIN_POLICY_PARA}
- AUTHENTICODE_EXTRA_CERT_CHAIN_POLICY_PARA = _AUTHENTICODE_EXTRA_CERT_CHAIN_POLICY_PARA;
- {$EXTERNALSYM AUTHENTICODE_EXTRA_CERT_CHAIN_POLICY_PARA}
- TAuthenticodeExtraCertChainPolicyPara = AUTHENTICODE_EXTRA_CERT_CHAIN_POLICY_PARA;
- PAuthenticodeExtraCertChainPolicyPara = PAUTHENTICODE_EXTRA_CERT_CHAIN_POLICY_PARA;
-
- PAUTHENTICODE_EXTRA_CERT_CHAIN_POLICY_STATUS = ^AUTHENTICODE_EXTRA_CERT_CHAIN_POLICY_STATUS;
- {$EXTERNALSYM PAUTHENTICODE_EXTRA_CERT_CHAIN_POLICY_STATUS}
- _AUTHENTICODE_EXTRA_CERT_CHAIN_POLICY_STATUS = record
- cbSize: DWORD;
- fCommercial: BOOL; // obtained from signer statement
- end;
- {$EXTERNALSYM _AUTHENTICODE_EXTRA_CERT_CHAIN_POLICY_STATUS}
- AUTHENTICODE_EXTRA_CERT_CHAIN_POLICY_STATUS = _AUTHENTICODE_EXTRA_CERT_CHAIN_POLICY_STATUS;
- {$EXTERNALSYM AUTHENTICODE_EXTRA_CERT_CHAIN_POLICY_STATUS}
- TAuthenticodeExtraCertChainPolicyStatus = AUTHENTICODE_EXTRA_CERT_CHAIN_POLICY_STATUS;
- PAuthenticodeExtraCertChainPolicyStatus = PAUTHENTICODE_EXTRA_CERT_CHAIN_POLICY_STATUS;
-
-//+-------------------------------------------------------------------------
-// CERT_CHAIN_POLICY_AUTHENTICODE_TS
-//
-// Implements the Authenticode Time Stamp chain policy verification checks.
-//
-// pvExtraPolicyPara may optionally be set to point to the following
-// AUTHENTICODE_TS_EXTRA_CERT_CHAIN_POLICY_PARA.
-//
-// pvExtraPolicyStatus isn't used and must be set to NULL.
-//--------------------------------------------------------------------------
-
-// dwRegPolicySettings are defined in wintrust.h
-
- PAUTHENTICODE_TS_EXTRA_CERT_CHAIN_POLICY_PARA = ^AUTHENTICODE_TS_EXTRA_CERT_CHAIN_POLICY_PARA;
- {$EXTERNALSYM PAUTHENTICODE_TS_EXTRA_CERT_CHAIN_POLICY_PARA}
- _AUTHENTICODE_TS_EXTRA_CERT_CHAIN_POLICY_PARA = record
- cbSize: DWORD;
- dwRegPolicySettings: DWORD;
- fCommercial: BOOL;
- end;
- {$EXTERNALSYM _AUTHENTICODE_TS_EXTRA_CERT_CHAIN_POLICY_PARA}
- AUTHENTICODE_TS_EXTRA_CERT_CHAIN_POLICY_PARA = _AUTHENTICODE_TS_EXTRA_CERT_CHAIN_POLICY_PARA;
- {$EXTERNALSYM AUTHENTICODE_TS_EXTRA_CERT_CHAIN_POLICY_PARA}
- TAuthenticodeTsExtraCertChainPolicyPara = AUTHENTICODE_TS_EXTRA_CERT_CHAIN_POLICY_PARA;
- PAuthenticodeTsExtraCertChainPolicyPara = PAUTHENTICODE_TS_EXTRA_CERT_CHAIN_POLICY_PARA;
-
-//+-------------------------------------------------------------------------
-// CERT_CHAIN_POLICY_SSL
-//
-// Implements the SSL client/server chain policy verification checks.
-//
-// pvExtraPolicyPara may optionally be set to point to the following
-// SSL_EXTRA_CERT_CHAIN_POLICY_PARA data structure
-//--------------------------------------------------------------------------
-
-// fdwChecks flags are defined in wininet.h
-
-const
- AUTHTYPE_CLIENT = 1;
- {$EXTERNALSYM AUTHTYPE_CLIENT}
- AUTHTYPE_SERVER = 2;
- {$EXTERNALSYM AUTHTYPE_SERVER}
-
-type
- PHTTPSPolicyCallbackData = ^HTTPSPolicyCallbackData;
- {$EXTERNALSYM PHTTPSPolicyCallbackData}
- _HTTPSPolicyCallbackData = record
- //union {
- //cbStruct: DWORD; // sizeof(HTTPSPolicyCallbackData);
- cbSize: DWORD; // sizeof(HTTPSPolicyCallbackData);
- //};
- dwAuthType: DWORD;
- fdwChecks: DWORD;
- pwszServerName: PWCHAR; // used to check against CN=xxxx
- end;
- {$EXTERNALSYM _HTTPSPolicyCallbackData}
- HTTPSPolicyCallbackData = _HTTPSPolicyCallbackData;
- {$EXTERNALSYM HTTPSPolicyCallbackData}
- THttpsPolicyCallbackData = HTTPSPolicyCallbackData;
-
- SSL_EXTRA_CERT_CHAIN_POLICY_PARA = HTTPSPolicyCallbackData;
- {$EXTERNALSYM SSL_EXTRA_CERT_CHAIN_POLICY_PARA}
- PSSL_EXTRA_CERT_CHAIN_POLICY_PARA = PHTTPSPolicyCallbackData;
- {$EXTERNALSYM PSSL_EXTRA_CERT_CHAIN_POLICY_PARA}
- TSSLExtraCertChainPolicyPara = SSL_EXTRA_CERT_CHAIN_POLICY_PARA;
- PSSLExtraCertChainPolicyPara = PSSL_EXTRA_CERT_CHAIN_POLICY_PARA;
-
-//+-------------------------------------------------------------------------
-// CERT_CHAIN_POLICY_BASIC_CONSTRAINTS
-//
-// Implements the basic constraints chain policy.
-//
-// Iterates through all the certificates in the chain checking for either
-// a szOID_BASIC_CONSTRAINTS or a szOID_BASIC_CONSTRAINTS2 extension. If
-// neither extension is present, the certificate is assumed to have
-// valid policy. Otherwise, for the first certificate element, checks if
-// it matches the expected CA_FLAG or END_ENTITY_FLAG specified in
-// pPolicyPara->dwFlags. If neither or both flags are set, then, the first
-// element can be either a CA or END_ENTITY. All other elements must be
-// a CA. If the PathLenConstraint is present in the extension, its
-// checked.
-//
-// The first elements in the remaining simple chains (ie, the certificate
-// used to sign the CTL) are checked to be an END_ENTITY.
-//
-// If this verification fails, dwError will be set to
-// TRUST_E_BASIC_CONSTRAINTS.
-//--------------------------------------------------------------------------
-
-const
- BASIC_CONSTRAINTS_CERT_CHAIN_POLICY_CA_FLAG = DWORD($80000000);
- {$EXTERNALSYM BASIC_CONSTRAINTS_CERT_CHAIN_POLICY_CA_FLAG}
- BASIC_CONSTRAINTS_CERT_CHAIN_POLICY_END_ENTITY_FLAG = $40000000;
- {$EXTERNALSYM BASIC_CONSTRAINTS_CERT_CHAIN_POLICY_END_ENTITY_FLAG}
-
-//+-------------------------------------------------------------------------
-// CERT_CHAIN_POLICY_NT_AUTH
-//
-// Implements the NT Authentication chain policy.
-//
-// The NT Authentication chain policy consists of 3 distinct chain
-// verifications in the following order:
-// [1] CERT_CHAIN_POLICY_BASE - Implements the base chain policy
-// verification checks. The LOWORD of dwFlags can be set in
-// pPolicyPara to alter the default policy checking behaviour. See
-// CERT_CHAIN_POLICY_BASE for more details.
-//
-// [2] CERT_CHAIN_POLICY_BASIC_CONSTRAINTS - Implements the basic
-// constraints chain policy. The HIWORD of dwFlags can be set
-// to specify if the first element must be either a CA or END_ENTITY.
-// See CERT_CHAIN_POLICY_BASIC_CONSTRAINTS for more details.
-//
-// [3] Checks if the second element in the chain, the CA that issued
-// the end certificate, is a trusted CA for NT
-// Authentication. A CA is considered to be trusted if it exists in
-// the "NTAuth" system registry store found in the
-// CERT_SYSTEM_STORE_LOCAL_MACHINE_ENTERPRISE store location.
-// If this verification fails, whereby the CA isn't trusted,
-// dwError is set to CERT_E_UNTRUSTEDCA.
-//--------------------------------------------------------------------------
-
-implementation
-
-const
- crypt32 = 'crypt32.dll';
- advapi32 = 'advapi32.dll';
- softpub = 'softpub.dll';
- {$IFDEF UNICODE}
- AWSuffix = 'W';
- {$ELSE}
- AWSuffix = 'A';
- {$ENDIF UNICODE}
-
-function GET_ALG_CLASS(x: DWORD): DWORD;
-begin
- Result := (x and (7 shl 13));
-end;
-
-function GET_ALG_TYPE(x: DWORD): DWORD;
-begin
- Result := (x and (15 shl 9));
-end;
-
-function GET_ALG_SID(x: DWORD): DWORD;
-begin
- Result := x and 511;
-end;
-
-function RCRYPT_SUCCEEDED(rt: BOOL): BOOL;
-begin
- Result := (rt = CRYPT_SUCCEED);
-end;
-
-function RCRYPT_FAILED(rt: BOOL): BOOL;
-begin
- Result := (rt = CRYPT_FAILED)
-end;
-
-function IS_CERT_RDN_CHAR_STRING(X: DWORD): Boolean;
-begin
- Result := (X and CERT_RDN_TYPE_MASK) >= CERT_RDN_NUMERIC_STRING;
-end;
-
-function GET_CERT_ENCODING_TYPE(X: DWORD): DWORD;
-begin
- Result := X and CERT_ENCODING_TYPE_MASK;
-end;
-
-function GET_CMSG_ENCODING_TYPE(X: DWORD): DWORD;
-begin
- Result := X and CMSG_ENCODING_TYPE_MASK;
-end;
-
-function GET_CERT_UNICODE_RDN_ERR_INDEX(X: DWORD): DWORD;
-begin
- Result := (X shr CERT_UNICODE_RDN_ERR_INDEX_SHIFT) and CERT_UNICODE_RDN_ERR_INDEX_MASK;
-end;
-
-function GET_CERT_UNICODE_ATTR_ERR_INDEX(X: DWORD): DWORD;
-begin
- Result := (X shr CERT_UNICODE_ATTR_ERR_INDEX_SHIFT) and CERT_UNICODE_ATTR_ERR_INDEX_MASK;
-end;
-
-function GET_CERT_UNICODE_VALUE_ERR_INDEX(X: DWORD): DWORD;
-begin
- Result := X and CERT_UNICODE_VALUE_ERR_INDEX_MASK;
-end;
-
-function GET_CERT_ALT_NAME_ENTRY_ERR_INDEX(X: DWORD): DWORD;
-begin
- Result := (X shr CERT_ALT_NAME_ENTRY_ERR_INDEX_SHIFT) and CERT_ALT_NAME_ENTRY_ERR_INDEX_MASK;
-end;
-
-function GET_CERT_ALT_NAME_VALUE_ERR_INDEX(X: DWORD): DWORD;
-begin
- Result := X and CERT_ALT_NAME_VALUE_ERR_INDEX_MASK;
-end;
-
-function IS_CRL_DIST_POINT_ERR_CRL_ISSUER(X: DWORD): Boolean;
-begin
- Result := (X and CRL_DIST_POINT_ERR_CRL_ISSUER_BIT) <> 0;
-end;
-
-function GET_CRL_DIST_POINT_ERR_INDEX(X: DWORD): DWORD;
-begin
- Result := ((X shr CRL_DIST_POINT_ERR_INDEX_SHIFT) and CRL_DIST_POINT_ERR_INDEX_MASK);
-end;
-
-function IS_CERT_HASH_PROP_ID(X: DWORD): Boolean;
-begin
- Result := (CERT_SHA1_HASH_PROP_ID = X) or (CERT_MD5_HASH_PROP_ID = X) or
- (CERT_SIGNATURE_HASH_PROP_ID = X);
-end;
-
-{$IFDEF DYNAMIC_LINK}
-
-var
- _CryptAcquireContextA: Pointer;
-
-function CryptAcquireContextA;
-begin
- GetProcedureAddress(_CryptAcquireContextA, advapi32, 'CryptAcquireContextA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CryptAcquireContextA]
- end;
-end;
-
-var
- _CryptAcquireContextW: Pointer;
-
-function CryptAcquireContextW;
-begin
- GetProcedureAddress(_CryptAcquireContextW, advapi32, 'CryptAcquireContextW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CryptAcquireContextW]
- end;
-end;
-
-var
- _CryptAcquireContext: Pointer;
-
-function CryptAcquireContext;
-begin
- GetProcedureAddress(_CryptAcquireContext, advapi32, 'CryptAcquireContext' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CryptAcquireContext]
- end;
-end;
-
-var
- _CryptReleaseContext: Pointer;
-
-function CryptReleaseContext;
-begin
- GetProcedureAddress(_CryptReleaseContext, advapi32, 'CryptReleaseContext');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CryptReleaseContext]
- end;
-end;
-
-var
- _CryptGenKey: Pointer;
-
-function CryptGenKey;
-begin
- GetProcedureAddress(_CryptGenKey, advapi32, 'CryptGenKey');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CryptGenKey]
- end;
-end;
-
-var
- _CryptDeriveKey: Pointer;
-
-function CryptDeriveKey;
-begin
- GetProcedureAddress(_CryptDeriveKey, advapi32, 'CryptDeriveKey');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CryptDeriveKey]
- end;
-end;
-
-var
- _CryptDestroyKey: Pointer;
-
-function CryptDestroyKey;
-begin
- GetProcedureAddress(_CryptDestroyKey, advapi32, 'CryptDestroyKey');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CryptDestroyKey]
- end;
-end;
-
-var
- _CryptSetKeyParam: Pointer;
-
-function CryptSetKeyParam;
-begin
- GetProcedureAddress(_CryptSetKeyParam, crypt32, 'CryptSetKeyParam');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CryptSetKeyParam]
- end;
-end;
-
-var
- _CryptGetKeyParam: Pointer;
-
-function CryptGetKeyParam;
-begin
- GetProcedureAddress(_CryptGetKeyParam, advapi32, 'CryptGetKeyParam');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CryptGetKeyParam]
- end;
-end;
-
-var
- _CryptSetHashParam: Pointer;
-
-function CryptSetHashParam;
-begin
- GetProcedureAddress(_CryptSetHashParam, advapi32, 'CryptSetHashParam');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CryptSetHashParam]
- end;
-end;
-
-var
- _CryptGetHashParam: Pointer;
-
-function CryptGetHashParam;
-begin
- GetProcedureAddress(_CryptGetHashParam, advapi32, 'CryptGetHashParam');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CryptGetHashParam]
- end;
-end;
-
-var
- _CryptSetProvParam: Pointer;
-
-function CryptSetProvParam;
-begin
- GetProcedureAddress(_CryptSetProvParam, advapi32, 'CryptSetProvParam');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CryptSetProvParam]
- end;
-end;
-
-var
- _CryptGetProvParam: Pointer;
-
-function CryptGetProvParam;
-begin
- GetProcedureAddress(_CryptGetProvParam, advapi32, 'CryptGetProvParam');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CryptGetProvParam]
- end;
-end;
-
-var
- _CryptGenRandom: Pointer;
-
-function CryptGenRandom;
-begin
- GetProcedureAddress(_CryptGenRandom, advapi32, 'CryptGenRandom');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CryptGenRandom]
- end;
-end;
-
-var
- _CryptGetUserKey: Pointer;
-
-function CryptGetUserKey;
-begin
- GetProcedureAddress(_CryptGetUserKey, advapi32, 'CryptGetUserKey');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CryptGetUserKey]
- end;
-end;
-
-var
- _CryptExportKey: Pointer;
-
-function CryptExportKey;
-begin
- GetProcedureAddress(_CryptExportKey, advapi32, 'CryptExportKey');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CryptExportKey]
- end;
-end;
-
-var
- _CryptImportKey: Pointer;
-
-function CryptImportKey;
-begin
- GetProcedureAddress(_CryptImportKey, advapi32, 'CryptImportKey');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CryptImportKey]
- end;
-end;
-
-var
- _CryptEncrypt: Pointer;
-
-function CryptEncrypt;
-begin
- GetProcedureAddress(_CryptEncrypt, advapi32, 'CryptEncrypt');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CryptEncrypt]
- end;
-end;
-
-var
- _CryptDecrypt: Pointer;
-
-function CryptDecrypt;
-begin
- GetProcedureAddress(_CryptDecrypt, advapi32, 'CryptDecrypt');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CryptDecrypt]
- end;
-end;
-
-var
- _CryptCreateHash: Pointer;
-
-function CryptCreateHash;
-begin
- GetProcedureAddress(_CryptCreateHash, advapi32, 'CryptCreateHash');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CryptCreateHash]
- end;
-end;
-
-var
- _CryptHashData: Pointer;
-
-function CryptHashData;
-begin
- GetProcedureAddress(_CryptHashData, advapi32, 'CryptHashData');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CryptHashData]
- end;
-end;
-
-var
- _CryptHashSessionKey: Pointer;
-
-function CryptHashSessionKey;
-begin
- GetProcedureAddress(_CryptHashSessionKey, advapi32, 'CryptHashSessionKey');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CryptHashSessionKey]
- end;
-end;
-
-var
- _CryptDestroyHash: Pointer;
-
-function CryptDestroyHash;
-begin
- GetProcedureAddress(_CryptDestroyHash, advapi32, 'CryptDestroyHash');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CryptDestroyHash]
- end;
-end;
-
-var
- _CryptSignHashA: Pointer;
-
-function CryptSignHashA;
-begin
- GetProcedureAddress(_CryptSignHashA, advapi32, 'CryptSignHashA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CryptSignHashA]
- end;
-end;
-
-var
- _CryptSignHashW: Pointer;
-
-function CryptSignHashW;
-begin
- GetProcedureAddress(_CryptSignHashW, advapi32, 'CryptSignHashW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CryptSignHashW]
- end;
-end;
-
-var
- _CryptSignHash: Pointer;
-
-function CryptSignHash;
-begin
- GetProcedureAddress(_CryptSignHash, advapi32, 'CryptSignHash' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CryptSignHash]
- end;
-end;
-
-var
- _CryptVerifySignatureA: Pointer;
-
-function CryptVerifySignatureA;
-begin
- GetProcedureAddress(_CryptVerifySignatureA, advapi32, 'CryptVerifySignatureA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CryptVerifySignatureA]
- end;
-end;
-
-var
- _CryptVerifySignatureW: Pointer;
-
-function CryptVerifySignatureW;
-begin
- GetProcedureAddress(_CryptVerifySignatureW, advapi32, 'CryptVerifySignatureW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CryptVerifySignatureW]
- end;
-end;
-
-var
- _CryptVerifySignature: Pointer;
-
-function CryptVerifySignature;
-begin
- GetProcedureAddress(_CryptVerifySignature, advapi32, 'CryptVerifySignature' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CryptVerifySignature]
- end;
-end;
-
-var
- _CryptSetProviderA: Pointer;
-
-function CryptSetProviderA;
-begin
- GetProcedureAddress(_CryptSetProviderA, advapi32, 'CryptSetProviderA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CryptSetProviderA]
- end;
-end;
-
-var
- _CryptSetProviderW: Pointer;
-
-function CryptSetProviderW;
-begin
- GetProcedureAddress(_CryptSetProviderW, advapi32, 'CryptSetProviderW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CryptSetProviderW]
- end;
-end;
-
-var
- _CryptSetProvider: Pointer;
-
-function CryptSetProvider;
-begin
- GetProcedureAddress(_CryptSetProvider, advapi32, 'CryptSetProvider' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CryptSetProvider]
- end;
-end;
-
-var
- _CryptSetProviderExA: Pointer;
-
-function CryptSetProviderExA;
-begin
- GetProcedureAddress(_CryptSetProviderExA, advapi32, 'CryptSetProviderExA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CryptSetProviderExA]
- end;
-end;
-
-var
- _CryptSetProviderExW: Pointer;
-
-function CryptSetProviderExW;
-begin
- GetProcedureAddress(_CryptSetProviderExW, advapi32, 'CryptSetProviderExW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CryptSetProviderExW]
- end;
-end;
-
-var
- _CryptSetProviderEx: Pointer;
-
-function CryptSetProviderEx;
-begin
- GetProcedureAddress(_CryptSetProviderEx, advapi32, 'CryptSetProviderEx' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CryptSetProviderEx]
- end;
-end;
-
-var
- _CryptGetDefaultProviderA: Pointer;
-
-function CryptGetDefaultProviderA;
-begin
- GetProcedureAddress(_CryptGetDefaultProviderA, advapi32, 'CryptGetDefaultProviderA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CryptGetDefaultProviderA]
- end;
-end;
-
-var
- _CryptGetDefaultProviderW: Pointer;
-
-function CryptGetDefaultProviderW;
-begin
- GetProcedureAddress(_CryptGetDefaultProviderW, advapi32, 'CryptGetDefaultProviderW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CryptGetDefaultProviderW]
- end;
-end;
-
-var
- _CryptGetDefaultProvider: Pointer;
-
-function CryptGetDefaultProvider;
-begin
- GetProcedureAddress(_CryptGetDefaultProvider, advapi32, 'CryptGetDefaultProvider' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CryptGetDefaultProvider]
- end;
-end;
-
-var
- _CryptEnumProviderTypesA: Pointer;
-
-function CryptEnumProviderTypesA;
-begin
- GetProcedureAddress(_CryptEnumProviderTypesA, advapi32, 'CryptEnumProviderTypesA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CryptEnumProviderTypesA]
- end;
-end;
-
-var
- _CryptEnumProviderTypesW: Pointer;
-
-function CryptEnumProviderTypesW;
-begin
- GetProcedureAddress(_CryptEnumProviderTypesW, advapi32, 'CryptEnumProviderTypesW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CryptEnumProviderTypesW]
- end;
-end;
-
-var
- _CryptEnumProviderTypes: Pointer;
-
-function CryptEnumProviderTypes;
-begin
- GetProcedureAddress(_CryptEnumProviderTypes, advapi32, 'CryptEnumProviderTypes' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CryptEnumProviderTypes]
- end;
-end;
-
-var
- _CryptEnumProvidersA: Pointer;
-
-function CryptEnumProvidersA;
-begin
- GetProcedureAddress(_CryptEnumProvidersA, advapi32, 'CryptEnumProvidersA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CryptEnumProvidersA]
- end;
-end;
-
-var
- _CryptEnumProvidersW: Pointer;
-
-function CryptEnumProvidersW;
-begin
- GetProcedureAddress(_CryptEnumProvidersW, advapi32, 'CryptEnumProvidersW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CryptEnumProvidersW]
- end;
-end;
-
-var
- _CryptEnumProviders: Pointer;
-
-function CryptEnumProviders;
-begin
- GetProcedureAddress(_CryptEnumProviders, advapi32, 'CryptEnumProviders' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CryptEnumProviders]
- end;
-end;
-
-var
- _CryptContextAddRef: Pointer;
-
-function CryptContextAddRef;
-begin
- GetProcedureAddress(_CryptContextAddRef, advapi32, 'CryptContextAddRef');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CryptContextAddRef]
- end;
-end;
-
-var
- _CryptDuplicateKey: Pointer;
-
-function CryptDuplicateKey;
-begin
- GetProcedureAddress(_CryptDuplicateKey, advapi32, 'CryptDuplicateKey');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CryptDuplicateKey]
- end;
-end;
-
-var
- _CryptDuplicateHash: Pointer;
-
-function CryptDuplicateHash;
-begin
- GetProcedureAddress(_CryptDuplicateHash, advapi32, 'CryptDuplicateHash');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CryptDuplicateHash]
- end;
-end;
-
-var
- _CryptFormatObject: Pointer;
-
-function CryptFormatObject;
-begin
- GetProcedureAddress(_CryptFormatObject, crypt32, 'CryptFormatObject');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CryptFormatObject]
- end;
-end;
-
-var
- _CryptEncodeObjectEx: Pointer;
-
-function CryptEncodeObjectEx;
-begin
- GetProcedureAddress(_CryptEncodeObjectEx, crypt32, 'CryptEncodeObjectEx');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CryptEncodeObjectEx]
- end;
-end;
-
-var
- _CryptEncodeObject: Pointer;
-
-function CryptEncodeObject;
-begin
- GetProcedureAddress(_CryptEncodeObject, crypt32, 'CryptEncodeObject');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CryptEncodeObject]
- end;
-end;
-
-var
- _CryptDecodeObjectEx: Pointer;
-
-function CryptDecodeObjectEx;
-begin
- GetProcedureAddress(_CryptDecodeObjectEx, crypt32, 'CryptDecodeObjectEx');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CryptDecodeObjectEx]
- end;
-end;
-
-var
- _CryptDecodeObject: Pointer;
-
-function CryptDecodeObject;
-begin
- GetProcedureAddress(_CryptDecodeObject, crypt32, 'CryptDecodeObject');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CryptDecodeObject]
- end;
-end;
-
-var
- _CryptInstallOIDFunctionAddress: Pointer;
-
-function CryptInstallOIDFunctionAddress;
-begin
- GetProcedureAddress(_CryptInstallOIDFunctionAddress, crypt32, 'CryptInstallOIDFunctionAddress');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CryptInstallOIDFunctionAddress]
- end;
-end;
-
-var
- _CryptInitOIDFunctionSet: Pointer;
-
-function CryptInitOIDFunctionSet;
-begin
- GetProcedureAddress(_CryptInitOIDFunctionSet, crypt32, 'CryptInitOIDFunctionSet');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CryptInitOIDFunctionSet]
- end;
-end;
-
-var
- _CryptGetOIDFunctionAddress: Pointer;
-
-function CryptGetOIDFunctionAddress;
-begin
- GetProcedureAddress(_CryptGetOIDFunctionAddress, crypt32, 'CryptGetOIDFunctionAddress');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CryptGetOIDFunctionAddress]
- end;
-end;
-
-var
- _CryptGetDefaultOIDDllList: Pointer;
-
-function CryptGetDefaultOIDDllList;
-begin
- GetProcedureAddress(_CryptGetDefaultOIDDllList, crypt32, 'CryptGetDefaultOIDDllList');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CryptGetDefaultOIDDllList]
- end;
-end;
-
-var
- _CryptGetDefaultOIDFunctionAddr: Pointer;
-
-function CryptGetDefaultOIDFunctionAddress;
-begin
- GetProcedureAddress(_CryptGetDefaultOIDFunctionAddr, crypt32, 'CryptGetDefaultOIDFunctionAddress');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CryptGetDefaultOIDFunctionAddr]
- end;
-end;
-
-var
- _CryptFreeOIDFunctionAddress: Pointer;
-
-function CryptFreeOIDFunctionAddress;
-begin
- GetProcedureAddress(_CryptFreeOIDFunctionAddress, crypt32, 'CryptFreeOIDFunctionAddress');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CryptFreeOIDFunctionAddress]
- end;
-end;
-
-var
- _CryptRegisterOIDFunction: Pointer;
-
-function CryptRegisterOIDFunction;
-begin
- GetProcedureAddress(_CryptRegisterOIDFunction, crypt32, 'CryptRegisterOIDFunction');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CryptRegisterOIDFunction]
- end;
-end;
-
-var
- _CryptUnregisterOIDFunction: Pointer;
-
-function CryptUnregisterOIDFunction;
-begin
- GetProcedureAddress(_CryptUnregisterOIDFunction, crypt32, 'CryptUnregisterOIDFunction');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CryptUnregisterOIDFunction]
- end;
-end;
-
-var
- _CryptRegisterDefaultOIDFunction: Pointer;
-
-function CryptRegisterDefaultOIDFunction;
-begin
- GetProcedureAddress(_CryptRegisterDefaultOIDFunction, crypt32, 'CryptRegisterDefaultOIDFunction');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CryptRegisterDefaultOIDFunction]
- end;
-end;
-
-var
- _CryptUnregisterDefaultOIDFunc: Pointer;
-
-function CryptUnregisterDefaultOIDFunction;
-begin
- GetProcedureAddress(_CryptUnregisterDefaultOIDFunc, crypt32, 'CryptUnregisterDefaultOIDFunction');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CryptUnregisterDefaultOIDFunc]
- end;
-end;
-
-var
- _CryptSetOIDFunctionValue: Pointer;
-
-function CryptSetOIDFunctionValue;
-begin
- GetProcedureAddress(_CryptSetOIDFunctionValue, crypt32, 'CryptSetOIDFunctionValue');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CryptSetOIDFunctionValue]
- end;
-end;
-
-var
- _CryptGetOIDFunctionValue: Pointer;
-
-function CryptGetOIDFunctionValue;
-begin
- GetProcedureAddress(_CryptGetOIDFunctionValue, crypt32, 'CryptGetOIDFunctionValue');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CryptGetOIDFunctionValue]
- end;
-end;
-
-var
- _CryptEnumOIDFunction: Pointer;
-
-function CryptEnumOIDFunction;
-begin
- GetProcedureAddress(_CryptEnumOIDFunction, crypt32, 'CryptEnumOIDFunction');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CryptEnumOIDFunction]
- end;
-end;
-
-var
- _CryptFindOIDInfo: Pointer;
-
-function CryptFindOIDInfo;
-begin
- GetProcedureAddress(_CryptFindOIDInfo, crypt32, 'CryptFindOIDInfo');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CryptFindOIDInfo]
- end;
-end;
-
-var
- _CryptRegisterOIDInfo: Pointer;
-
-function CryptRegisterOIDInfo;
-begin
- GetProcedureAddress(_CryptRegisterOIDInfo, crypt32, 'CryptRegisterOIDInfo');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CryptRegisterOIDInfo]
- end;
-end;
-
-var
- _CryptUnregisterOIDInfo: Pointer;
-
-function CryptUnregisterOIDInfo;
-begin
- GetProcedureAddress(_CryptUnregisterOIDInfo, crypt32, 'CryptUnregisterOIDInfo');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CryptUnregisterOIDInfo]
- end;
-end;
-
-var
- _CryptEnumOIDInfo: Pointer;
-
-function CryptEnumOIDInfo;
-begin
- GetProcedureAddress(_CryptEnumOIDInfo, crypt32, 'CryptEnumOIDInfo');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CryptEnumOIDInfo]
- end;
-end;
-
-var
- _CryptFindLocalizedName: Pointer;
-
-function CryptFindLocalizedName;
-begin
- GetProcedureAddress(_CryptFindLocalizedName, crypt32, 'CryptFindLocalizedName');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CryptFindLocalizedName]
- end;
-end;
-
-var
- _CryptMsgOpenToEncode: Pointer;
-
-function CryptMsgOpenToEncode;
-begin
- GetProcedureAddress(_CryptMsgOpenToEncode, crypt32, 'CryptMsgOpenToEncode');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CryptMsgOpenToEncode]
- end;
-end;
-
-var
- _CryptMsgCalculateEncodedLength: Pointer;
-
-function CryptMsgCalculateEncodedLength;
-begin
- GetProcedureAddress(_CryptMsgCalculateEncodedLength, crypt32, 'CryptMsgCalculateEncodedLength');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CryptMsgCalculateEncodedLength]
- end;
-end;
-
-var
- _CryptMsgOpenToDecode: Pointer;
-
-function CryptMsgOpenToDecode;
-begin
- GetProcedureAddress(_CryptMsgOpenToDecode, crypt32, 'CryptMsgOpenToDecode');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CryptMsgOpenToDecode]
- end;
-end;
-
-var
- _CryptMsgDuplicate: Pointer;
-
-function CryptMsgDuplicate;
-begin
- GetProcedureAddress(_CryptMsgDuplicate, crypt32, 'CryptMsgDuplicate');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CryptMsgDuplicate]
- end;
-end;
-
-var
- _CryptMsgClose: Pointer;
-
-function CryptMsgClose;
-begin
- GetProcedureAddress(_CryptMsgClose, crypt32, 'CryptMsgClose');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CryptMsgClose]
- end;
-end;
-
-var
- _CryptMsgUpdate: Pointer;
-
-function CryptMsgUpdate;
-begin
- GetProcedureAddress(_CryptMsgUpdate, crypt32, 'CryptMsgUpdate');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CryptMsgUpdate]
- end;
-end;
-
-var
- _CryptMsgGetParam: Pointer;
-
-function CryptMsgGetParam;
-begin
- GetProcedureAddress(_CryptMsgGetParam, crypt32, 'CryptMsgGetParam');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CryptMsgGetParam]
- end;
-end;
-
-var
- _CryptMsgControl: Pointer;
-
-function CryptMsgControl;
-begin
- GetProcedureAddress(_CryptMsgControl, crypt32, 'CryptMsgControl');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CryptMsgControl]
- end;
-end;
-
-var
- _CryptMsgVerifyCountersigEnc: Pointer;
-
-function CryptMsgVerifyCountersignatureEncoded;
-begin
- GetProcedureAddress(_CryptMsgVerifyCountersigEnc, crypt32, 'CryptMsgVerifyCountersignatureEncoded');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CryptMsgVerifyCountersigEnc]
- end;
-end;
-
-var
- _CryptMsgVerifyCountersigEncEx: Pointer;
-
-function CryptMsgVerifyCountersignatureEncodedEx;
-begin
- GetProcedureAddress(_CryptMsgVerifyCountersigEncEx, crypt32, 'CryptMsgVerifyCountersignatureEncodedEx');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CryptMsgVerifyCountersigEncEx]
- end;
-end;
-
-var
- _CryptMsgCountersign: Pointer;
-
-function CryptMsgCountersign;
-begin
- GetProcedureAddress(_CryptMsgCountersign, crypt32, 'CryptMsgCountersign');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CryptMsgCountersign]
- end;
-end;
-
-var
- _CryptMsgCountersignEncoded: Pointer;
-
-function CryptMsgCountersignEncoded;
-begin
- GetProcedureAddress(_CryptMsgCountersignEncoded, crypt32, 'CryptMsgCountersignEncoded');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CryptMsgCountersignEncoded]
- end;
-end;
-
-var
- _CertOpenStore: Pointer;
-
-function CertOpenStore;
-begin
- GetProcedureAddress(_CertOpenStore, crypt32, 'CertOpenStore');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CertOpenStore]
- end;
-end;
-
-var
- _CertDuplicateStore: Pointer;
-
-function CertDuplicateStore;
-begin
- GetProcedureAddress(_CertDuplicateStore, crypt32, 'CertDuplicateStore');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CertDuplicateStore]
- end;
-end;
-
-var
- _CertSaveStore: Pointer;
-
-function CertSaveStore;
-begin
- GetProcedureAddress(_CertSaveStore, crypt32, 'CertSaveStore');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CertSaveStore]
- end;
-end;
-
-var
- _CertCloseStore: Pointer;
-
-function CertCloseStore;
-begin
- GetProcedureAddress(_CertCloseStore, crypt32, 'CertCloseStore');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CertCloseStore]
- end;
-end;
-
-var
- _CertGetSubjectCertFromStore: Pointer;
-
-function CertGetSubjectCertificateFromStore;
-begin
- GetProcedureAddress(_CertGetSubjectCertFromStore, crypt32, 'CertGetSubjectCertificateFromStore');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CertGetSubjectCertFromStore]
- end;
-end;
-
-var
- _CertEnumCertificatesInStore: Pointer;
-
-function CertEnumCertificatesInStore;
-begin
- GetProcedureAddress(_CertEnumCertificatesInStore, crypt32, 'CertEnumCertificatesInStore');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CertEnumCertificatesInStore]
- end;
-end;
-
-var
- _CertFindCertificateInStore: Pointer;
-
-function CertFindCertificateInStore;
-begin
- GetProcedureAddress(_CertFindCertificateInStore, crypt32, 'CertFindCertificateInStore');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CertFindCertificateInStore]
- end;
-end;
-
-var
- _CertGetIssuerCertFromStore: Pointer;
-
-function CertGetIssuerCertificateFromStore;
-begin
- GetProcedureAddress(_CertGetIssuerCertFromStore, crypt32, 'CertGetIssuerCertificateFromStore');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CertGetIssuerCertFromStore]
- end;
-end;
-
-var
- _CertVerifySubjectCertContext: Pointer;
-
-function CertVerifySubjectCertificateContext;
-begin
- GetProcedureAddress(_CertVerifySubjectCertContext, crypt32, 'CertVerifySubjectCertificateContext');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CertVerifySubjectCertContext]
- end;
-end;
-
-var
- _CertDuplicateCertificateContext: Pointer;
-
-function CertDuplicateCertificateContext;
-begin
- GetProcedureAddress(_CertDuplicateCertificateContext, crypt32, 'CertDuplicateCertificateContext');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CertDuplicateCertificateContext]
- end;
-end;
-
-var
- _CertCreateCertificateContext: Pointer;
-
-function CertCreateCertificateContext;
-begin
- GetProcedureAddress(_CertCreateCertificateContext, crypt32, 'CertCreateCertificateContext');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CertCreateCertificateContext]
- end;
-end;
-
-var
- _CertFreeCertificateContext: Pointer;
-
-function CertFreeCertificateContext;
-begin
- GetProcedureAddress(_CertFreeCertificateContext, crypt32, 'CertFreeCertificateContext');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CertFreeCertificateContext]
- end;
-end;
-
-var
- _CertSetCertContextProperty: Pointer;
-
-function CertSetCertificateContextProperty;
-begin
- GetProcedureAddress(_CertSetCertContextProperty, crypt32, 'CertSetCertificateContextProperty');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CertSetCertContextProperty]
- end;
-end;
-
-var
- _CertGetCertContextProperty: Pointer;
-
-function CertGetCertificateContextProperty;
-begin
- GetProcedureAddress(_CertGetCertContextProperty, crypt32, 'CertGetCertificateContextProperty');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CertGetCertContextProperty]
- end;
-end;
-
-var
- _CertEnumCertContextProperties: Pointer;
-
-function CertEnumCertificateContextProperties;
-begin
- GetProcedureAddress(_CertEnumCertContextProperties, crypt32, 'CertEnumCertificateContextProperties');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CertEnumCertContextProperties]
- end;
-end;
-
-var
- _CertGetCRLFromStore: Pointer;
-
-function CertGetCRLFromStore;
-begin
- GetProcedureAddress(_CertGetCRLFromStore, crypt32, 'CertGetCRLFromStore');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CertGetCRLFromStore]
- end;
-end;
-
-var
- _CertEnumCRLsInStore: Pointer;
-
-function CertEnumCRLsInStore;
-begin
- GetProcedureAddress(_CertEnumCRLsInStore, crypt32, 'CertEnumCRLsInStore');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CertEnumCRLsInStore]
- end;
-end;
-
-var
- _CertFindCRLInStore: Pointer;
-
-function CertFindCRLInStore;
-begin
- GetProcedureAddress(_CertFindCRLInStore, crypt32, 'CertFindCRLInStore');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CertFindCRLInStore]
- end;
-end;
-
-var
- _CertDuplicateCRLContext: Pointer;
-
-function CertDuplicateCRLContext;
-begin
- GetProcedureAddress(_CertDuplicateCRLContext, crypt32, 'CertDuplicateCRLContext');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CertDuplicateCRLContext]
- end;
-end;
-
-var
- _CertCreateCRLContext: Pointer;
-
-function CertCreateCRLContext;
-begin
- GetProcedureAddress(_CertCreateCRLContext, crypt32, 'CertCreateCRLContext');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CertCreateCRLContext]
- end;
-end;
-
-var
- _CertFreeCRLContext: Pointer;
-
-function CertFreeCRLContext;
-begin
- GetProcedureAddress(_CertFreeCRLContext, crypt32, 'CertFreeCRLContext');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CertFreeCRLContext]
- end;
-end;
-
-var
- _CertSetCRLContextProperty: Pointer;
-
-function CertSetCRLContextProperty;
-begin
- GetProcedureAddress(_CertSetCRLContextProperty, crypt32, 'CertSetCRLContextProperty');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CertSetCRLContextProperty]
- end;
-end;
-
-var
- _CertGetCRLContextProperty: Pointer;
-
-function CertGetCRLContextProperty;
-begin
- GetProcedureAddress(_CertGetCRLContextProperty, crypt32, 'CertGetCRLContextProperty');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CertGetCRLContextProperty]
- end;
-end;
-
-var
- _CertEnumCRLContextProperties: Pointer;
-
-function CertEnumCRLContextProperties;
-begin
- GetProcedureAddress(_CertEnumCRLContextProperties, crypt32, 'CertEnumCRLContextProperties');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CertEnumCRLContextProperties]
- end;
-end;
-
-var
- _CertFindCertificateInCRL: Pointer;
-
-function CertFindCertificateInCRL;
-begin
- GetProcedureAddress(_CertFindCertificateInCRL, crypt32, 'CertFindCertificateInCRL');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CertFindCertificateInCRL]
- end;
-end;
-
-var
- _CertAddEncodedCertToStore: Pointer;
-
-function CertAddEncodedCertificateToStore;
-begin
- GetProcedureAddress(_CertAddEncodedCertToStore, crypt32, 'CertAddEncodedCertificateToStore');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CertAddEncodedCertToStore]
- end;
-end;
-
-var
- _CertAddCertContextToStore: Pointer;
-
-function CertAddCertificateContextToStore;
-begin
- GetProcedureAddress(_CertAddCertContextToStore, crypt32, 'CertAddCertificateContextToStore');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CertAddCertContextToStore]
- end;
-end;
-
-var
- _CertAddSerializedElementToStore: Pointer;
-
-function CertAddSerializedElementToStore;
-begin
- GetProcedureAddress(_CertAddSerializedElementToStore, crypt32, 'CertAddSerializedElementToStore');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CertAddSerializedElementToStore]
- end;
-end;
-
-var
- _CertDeleteCertificateFromStore: Pointer;
-
-function CertDeleteCertificateFromStore;
-begin
- GetProcedureAddress(_CertDeleteCertificateFromStore, crypt32, 'CertDeleteCertificateFromStore');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CertDeleteCertificateFromStore]
- end;
-end;
-
-var
- _CertAddEncodedCRLToStore: Pointer;
-
-function CertAddEncodedCRLToStore;
-begin
- GetProcedureAddress(_CertAddEncodedCRLToStore, crypt32, 'CertAddEncodedCRLToStore');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CertAddEncodedCRLToStore]
- end;
-end;
-
-var
- _CertAddCRLContextToStore: Pointer;
-
-function CertAddCRLContextToStore;
-begin
- GetProcedureAddress(_CertAddCRLContextToStore, crypt32, 'CertAddCRLContextToStore');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CertAddCRLContextToStore]
- end;
-end;
-
-var
- _CertDeleteCRLFromStore: Pointer;
-
-function CertDeleteCRLFromStore;
-begin
- GetProcedureAddress(_CertDeleteCRLFromStore, crypt32, 'CertDeleteCRLFromStore');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CertDeleteCRLFromStore]
- end;
-end;
-
-var
- _CertSerializeCertStoreElement: Pointer;
-
-function CertSerializeCertificateStoreElement;
-begin
- GetProcedureAddress(_CertSerializeCertStoreElement, crypt32, 'CertSerializeCertificateStoreElement');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CertSerializeCertStoreElement]
- end;
-end;
-
-var
- _CertSerializeCRLStoreElement: Pointer;
-
-function CertSerializeCRLStoreElement;
-begin
- GetProcedureAddress(_CertSerializeCRLStoreElement, crypt32, 'CertSerializeCRLStoreElement');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CertSerializeCRLStoreElement]
- end;
-end;
-
-var
- _CertDuplicateCTLContext: Pointer;
-
-function CertDuplicateCTLContext;
-begin
- GetProcedureAddress(_CertDuplicateCTLContext, crypt32, 'CertDuplicateCTLContext');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CertDuplicateCTLContext]
- end;
-end;
-
-var
- _CertCreateCTLContext: Pointer;
-
-function CertCreateCTLContext;
-begin
- GetProcedureAddress(_CertCreateCTLContext, crypt32, 'CertCreateCTLContext');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CertCreateCTLContext]
- end;
-end;
-
-var
- _CertFreeCTLContext: Pointer;
-
-function CertFreeCTLContext;
-begin
- GetProcedureAddress(_CertFreeCTLContext, crypt32, 'CertFreeCTLContext');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CertFreeCTLContext]
- end;
-end;
-
-var
- _CertSetCTLContextProperty: Pointer;
-
-function CertSetCTLContextProperty;
-begin
- GetProcedureAddress(_CertSetCTLContextProperty, crypt32, 'CertSetCTLContextProperty');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CertSetCTLContextProperty]
- end;
-end;
-
-var
- _CertGetCTLContextProperty: Pointer;
-
-function CertGetCTLContextProperty;
-begin
- GetProcedureAddress(_CertGetCTLContextProperty, crypt32, 'CertGetCTLContextProperty');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CertGetCTLContextProperty]
- end;
-end;
-
-var
- _CertEnumCTLContextProperties: Pointer;
-
-function CertEnumCTLContextProperties;
-begin
- GetProcedureAddress(_CertEnumCTLContextProperties, crypt32, 'CertEnumCTLContextProperties');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CertEnumCTLContextProperties]
- end;
-end;
-
-var
- _CertEnumCTLsInStore: Pointer;
-
-function CertEnumCTLsInStore;
-begin
- GetProcedureAddress(_CertEnumCTLsInStore, crypt32, 'CertEnumCTLsInStore');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CertEnumCTLsInStore]
- end;
-end;
-
-var
- _CertFindSubjectInCTL: Pointer;
-
-function CertFindSubjectInCTL;
-begin
- GetProcedureAddress(_CertFindSubjectInCTL, crypt32, 'CertFindSubjectInCTL');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CertFindSubjectInCTL]
- end;
-end;
-
-var
- _CertFindCTLInStore: Pointer;
-
-function CertFindCTLInStore;
-begin
- GetProcedureAddress(_CertFindCTLInStore, crypt32, 'CertFindCTLInStore');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CertFindCTLInStore]
- end;
-end;
-
-var
- _CertAddEncodedCTLToStore: Pointer;
-
-function CertAddEncodedCTLToStore;
-begin
- GetProcedureAddress(_CertAddEncodedCTLToStore, crypt32, 'CertAddEncodedCTLToStore');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CertAddEncodedCTLToStore]
- end;
-end;
-
-var
- _CertAddCTLContextToStore: Pointer;
-
-function CertAddCTLContextToStore;
-begin
- GetProcedureAddress(_CertAddCTLContextToStore, crypt32, 'CertAddCTLContextToStore');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CertAddCTLContextToStore]
- end;
-end;
-
-var
- _CertSerializeCTLStoreElement: Pointer;
-
-function CertSerializeCTLStoreElement;
-begin
- GetProcedureAddress(_CertSerializeCTLStoreElement, crypt32, 'CertSerializeCTLStoreElement');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CertSerializeCTLStoreElement]
- end;
-end;
-
-var
- _CertDeleteCTLFromStore: Pointer;
-
-function CertDeleteCTLFromStore;
-begin
- GetProcedureAddress(_CertDeleteCTLFromStore, crypt32, 'CertDeleteCTLFromStore');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CertDeleteCTLFromStore]
- end;
-end;
-
-var
- _CertAddCertificateLinkToStore: Pointer;
-
-function CertAddCertificateLinkToStore;
-begin
- GetProcedureAddress(_CertAddCertificateLinkToStore, crypt32, 'CertAddCertificateLinkToStore');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CertAddCertificateLinkToStore]
- end;
-end;
-
-var
- _CertAddCRLLinkToStore: Pointer;
-
-function CertAddCRLLinkToStore;
-begin
- GetProcedureAddress(_CertAddCRLLinkToStore, crypt32, 'CertAddCRLLinkToStore');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CertAddCRLLinkToStore]
- end;
-end;
-
-var
- _CertAddCTLLinkToStore: Pointer;
-
-function CertAddCTLLinkToStore;
-begin
- GetProcedureAddress(_CertAddCTLLinkToStore, crypt32, 'CertAddCTLLinkToStore');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CertAddCTLLinkToStore]
- end;
-end;
-
-var
- _CertAddStoreToCollection: Pointer;
-
-function CertAddStoreToCollection;
-begin
- GetProcedureAddress(_CertAddStoreToCollection, crypt32, 'CertAddStoreToCollection');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CertAddStoreToCollection]
- end;
-end;
-
-var
- _CertRemoveStoreFromCollection: Pointer;
-
-procedure CertRemoveStoreFromCollection;
-begin
- GetProcedureAddress(_CertRemoveStoreFromCollection, crypt32, 'CertRemoveStoreFromCollection');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CertRemoveStoreFromCollection]
- end;
-end;
-
-var
- _CertControlStore: Pointer;
-
-function CertControlStore;
-begin
- GetProcedureAddress(_CertControlStore, crypt32, 'CertControlStore');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CertControlStore]
- end;
-end;
-
-var
- _CertSetStoreProperty: Pointer;
-
-function CertSetStoreProperty;
-begin
- GetProcedureAddress(_CertSetStoreProperty, crypt32, 'CertSetStoreProperty');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CertSetStoreProperty]
- end;
-end;
-
-var
- _CertGetStoreProperty: Pointer;
-
-function CertGetStoreProperty;
-begin
- GetProcedureAddress(_CertGetStoreProperty, crypt32, 'CertGetStoreProperty');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CertGetStoreProperty]
- end;
-end;
-
-var
- _CertCreateContext: Pointer;
-
-function CertCreateContext;
-begin
- GetProcedureAddress(_CertCreateContext, crypt32, 'CertCreateContext');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CertCreateContext]
- end;
-end;
-
-var
- _CertRegisterSystemStore: Pointer;
-
-function CertRegisterSystemStore;
-begin
- GetProcedureAddress(_CertRegisterSystemStore, crypt32, 'CertRegisterSystemStore');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CertRegisterSystemStore]
- end;
-end;
-
-var
- _CertRegisterPhysicalStore: Pointer;
-
-function CertRegisterPhysicalStore;
-begin
- GetProcedureAddress(_CertRegisterPhysicalStore, crypt32, 'CertRegisterPhysicalStore');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CertRegisterPhysicalStore]
- end;
-end;
-
-var
- _CertUnregisterSystemStore: Pointer;
-
-function CertUnregisterSystemStore;
-begin
- GetProcedureAddress(_CertUnregisterSystemStore, crypt32, 'CertUnregisterSystemStore');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CertUnregisterSystemStore]
- end;
-end;
-
-var
- _CertUnregisterPhysicalStore: Pointer;
-
-function CertUnregisterPhysicalStore;
-begin
- GetProcedureAddress(_CertUnregisterPhysicalStore, crypt32, 'CertUnregisterPhysicalStore');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CertUnregisterPhysicalStore]
- end;
-end;
-
-var
- _CertEnumSystemStoreLocation: Pointer;
-
-function CertEnumSystemStoreLocation;
-begin
- GetProcedureAddress(_CertEnumSystemStoreLocation, crypt32, 'CertEnumSystemStoreLocation');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CertEnumSystemStoreLocation]
- end;
-end;
-
-var
- _CertEnumSystemStore: Pointer;
-
-function CertEnumSystemStore;
-begin
- GetProcedureAddress(_CertEnumSystemStore, crypt32, 'CertEnumSystemStore');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CertEnumSystemStore]
- end;
-end;
-
-var
- _CertEnumPhysicalStore: Pointer;
-
-function CertEnumPhysicalStore;
-begin
- GetProcedureAddress(_CertEnumPhysicalStore, crypt32, 'CertEnumPhysicalStore');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CertEnumPhysicalStore]
- end;
-end;
-
-var
- _CertGetEnhancedKeyUsage: Pointer;
-
-function CertGetEnhancedKeyUsage;
-begin
- GetProcedureAddress(_CertGetEnhancedKeyUsage, crypt32, 'CertGetEnhancedKeyUsage');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CertGetEnhancedKeyUsage]
- end;
-end;
-
-var
- _CertSetEnhancedKeyUsage: Pointer;
-
-function CertSetEnhancedKeyUsage;
-begin
- GetProcedureAddress(_CertSetEnhancedKeyUsage, crypt32, 'CertSetEnhancedKeyUsage');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CertSetEnhancedKeyUsage]
- end;
-end;
-
-var
- _CertAddEnhKeyUsageIdentifier: Pointer;
-
-function CertAddEnhancedKeyUsageIdentifier;
-begin
- GetProcedureAddress(_CertAddEnhKeyUsageIdentifier, crypt32, 'CertAddEnhancedKeyUsageIdentifier');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CertAddEnhKeyUsageIdentifier]
- end;
-end;
-
-var
- _CertRemoveEnhKeyUsageIdent: Pointer;
-
-function CertRemoveEnhancedKeyUsageIdentifier;
-begin
- GetProcedureAddress(_CertRemoveEnhKeyUsageIdent, crypt32, 'CertRemoveEnhancedKeyUsageIdentifier');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CertRemoveEnhKeyUsageIdent]
- end;
-end;
-
-var
- _CertGetValidUsages: Pointer;
-
-function CertGetValidUsages;
-begin
- GetProcedureAddress(_CertGetValidUsages, crypt32, 'CertGetValidUsages');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CertGetValidUsages]
- end;
-end;
-
-var
- _CryptMsgGetAndVerifySigner: Pointer;
-
-function CryptMsgGetAndVerifySigner;
-begin
- GetProcedureAddress(_CryptMsgGetAndVerifySigner, crypt32, 'CryptMsgGetAndVerifySigner');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CryptMsgGetAndVerifySigner]
- end;
-end;
-
-var
- _CryptMsgSignCTL: Pointer;
-
-function CryptMsgSignCTL;
-begin
- GetProcedureAddress(_CryptMsgSignCTL, crypt32, 'CryptMsgSignCTL');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CryptMsgSignCTL]
- end;
-end;
-
-var
- _CryptMsgEncodeAndSignCTL: Pointer;
-
-function CryptMsgEncodeAndSignCTL;
-begin
- GetProcedureAddress(_CryptMsgEncodeAndSignCTL, crypt32, 'CryptMsgEncodeAndSignCTL');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CryptMsgEncodeAndSignCTL]
- end;
-end;
-
-var
- _CertFindSubjectInSortedCTL: Pointer;
-
-function CertFindSubjectInSortedCTL;
-begin
- GetProcedureAddress(_CertFindSubjectInSortedCTL, crypt32, 'CertFindSubjectInSortedCTL');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CertFindSubjectInSortedCTL]
- end;
-end;
-
-var
- _CertEnumSubjectInSortedCTL: Pointer;
-
-function CertEnumSubjectInSortedCTL;
-begin
- GetProcedureAddress(_CertEnumSubjectInSortedCTL, crypt32, 'CertEnumSubjectInSortedCTL');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CertEnumSubjectInSortedCTL]
- end;
-end;
-
-var
- _CertVerifyCTLUsage: Pointer;
-
-function CertVerifyCTLUsage;
-begin
- GetProcedureAddress(_CertVerifyCTLUsage, crypt32, 'CertVerifyCTLUsage');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CertVerifyCTLUsage]
- end;
-end;
-
-var
- _CertVerifyRevocation: Pointer;
-
-function CertVerifyRevocation;
-begin
- GetProcedureAddress(_CertVerifyRevocation, crypt32, 'CertVerifyRevocation');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CertVerifyRevocation]
- end;
-end;
-
-var
- _CertCompareIntegerBlob: Pointer;
-
-function CertCompareIntegerBlob;
-begin
- GetProcedureAddress(_CertCompareIntegerBlob, crypt32, 'CertCompareIntegerBlob');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CertCompareIntegerBlob]
- end;
-end;
-
-var
- _CertCompareCertificate: Pointer;
-
-function CertCompareCertificate;
-begin
- GetProcedureAddress(_CertCompareCertificate, crypt32, 'CertCompareCertificate');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CertCompareCertificate]
- end;
-end;
-
-var
- _CertCompareCertificateName: Pointer;
-
-function CertCompareCertificateName;
-begin
- GetProcedureAddress(_CertCompareCertificateName, crypt32, 'CertCompareCertificateName');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CertCompareCertificateName]
- end;
-end;
-
-var
- _CertIsRDNAttrsInCertificateName: Pointer;
-
-function CertIsRDNAttrsInCertificateName;
-begin
- GetProcedureAddress(_CertIsRDNAttrsInCertificateName, crypt32, 'CertIsRDNAttrsInCertificateName');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CertIsRDNAttrsInCertificateName]
- end;
-end;
-
-var
- _CertComparePublicKeyInfo: Pointer;
-
-function CertComparePublicKeyInfo;
-begin
- GetProcedureAddress(_CertComparePublicKeyInfo, crypt32, 'CertComparePublicKeyInfo');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CertComparePublicKeyInfo]
- end;
-end;
-
-var
- _CertGetPublicKeyLength: Pointer;
-
-function CertGetPublicKeyLength;
-begin
- GetProcedureAddress(_CertGetPublicKeyLength, crypt32, 'CertGetPublicKeyLength');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CertGetPublicKeyLength]
- end;
-end;
-
-var
- _CryptVerifyCertificateSignature: Pointer;
-
-function CryptVerifyCertificateSignature;
-begin
- GetProcedureAddress(_CryptVerifyCertificateSignature, crypt32, 'CryptVerifyCertificateSignature');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CryptVerifyCertificateSignature]
- end;
-end;
-
-var
- _CryptVerifyCertSignatureEx: Pointer;
-
-function CryptVerifyCertificateSignatureEx;
-begin
- GetProcedureAddress(_CryptVerifyCertSignatureEx, crypt32, 'CryptVerifyCertificateSignatureEx');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CryptVerifyCertSignatureEx]
- end;
-end;
-
-var
- _CryptHashToBeSigned: Pointer;
-
-function CryptHashToBeSigned;
-begin
- GetProcedureAddress(_CryptHashToBeSigned, crypt32, 'CryptHashToBeSigned');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CryptHashToBeSigned]
- end;
-end;
-
-var
- _CryptHashCertificate: Pointer;
-
-function CryptHashCertificate;
-begin
- GetProcedureAddress(_CryptHashCertificate, crypt32, 'CryptHashCertificate');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CryptHashCertificate]
- end;
-end;
-
-var
- _CryptSignCertificate: Pointer;
-
-function CryptSignCertificate;
-begin
- GetProcedureAddress(_CryptSignCertificate, crypt32, 'CryptSignCertificate');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CryptSignCertificate]
- end;
-end;
-
-var
- _CryptSignAndEncodeCertificate: Pointer;
-
-function CryptSignAndEncodeCertificate;
-begin
- GetProcedureAddress(_CryptSignAndEncodeCertificate, crypt32, 'CryptSignAndEncodeCertificate');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CryptSignAndEncodeCertificate]
- end;
-end;
-
-var
- _CertVerifyTimeValidity: Pointer;
-
-function CertVerifyTimeValidity;
-begin
- GetProcedureAddress(_CertVerifyTimeValidity, crypt32, 'CertVerifyTimeValidity');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CertVerifyTimeValidity]
- end;
-end;
-
-var
- _CertVerifyCRLTimeValidity: Pointer;
-
-function CertVerifyCRLTimeValidity;
-begin
- GetProcedureAddress(_CertVerifyCRLTimeValidity, crypt32, 'CertVerifyCRLTimeValidity');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CertVerifyCRLTimeValidity]
- end;
-end;
-
-var
- _CertVerifyValidityNesting: Pointer;
-
-function CertVerifyValidityNesting;
-begin
- GetProcedureAddress(_CertVerifyValidityNesting, crypt32, 'CertVerifyValidityNesting');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CertVerifyValidityNesting]
- end;
-end;
-
-var
- _CertVerifyCRLRevocation: Pointer;
-
-function CertVerifyCRLRevocation;
-begin
- GetProcedureAddress(_CertVerifyCRLRevocation, crypt32, 'CertVerifyCRLRevocation');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CertVerifyCRLRevocation]
- end;
-end;
-
-var
- _CertAlgIdToOID: Pointer;
-
-function CertAlgIdToOID;
-begin
- GetProcedureAddress(_CertAlgIdToOID, crypt32, 'CertAlgIdToOID');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CertAlgIdToOID]
- end;
-end;
-
-var
- _CertOIDToAlgId: Pointer;
-
-function CertOIDToAlgId;
-begin
- GetProcedureAddress(_CertOIDToAlgId, crypt32, 'CertOIDToAlgId');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CertOIDToAlgId]
- end;
-end;
-
-var
- _CertFindExtension: Pointer;
-
-function CertFindExtension;
-begin
- GetProcedureAddress(_CertFindExtension, crypt32, 'CertFindExtension');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CertFindExtension]
- end;
-end;
-
-var
- _CertFindAttribute: Pointer;
-
-function CertFindAttribute;
-begin
- GetProcedureAddress(_CertFindAttribute, crypt32, 'CertFindAttribute');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CertFindAttribute]
- end;
-end;
-
-var
- _CertFindRDNAttr: Pointer;
-
-function CertFindRDNAttr;
-begin
- GetProcedureAddress(_CertFindRDNAttr, crypt32, 'CertFindRDNAttr');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CertFindRDNAttr]
- end;
-end;
-
-var
- _CertGetIntendedKeyUsage: Pointer;
-
-function CertGetIntendedKeyUsage;
-begin
- GetProcedureAddress(_CertGetIntendedKeyUsage, crypt32, 'CertGetIntendedKeyUsage');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CertGetIntendedKeyUsage]
- end;
-end;
-
-var
- _CryptInstallDefaultContext: Pointer;
-
-function CryptInstallDefaultContext;
-begin
- GetProcedureAddress(_CryptInstallDefaultContext, crypt32, 'CryptInstallDefaultContext');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CryptInstallDefaultContext]
- end;
-end;
-
-var
- _CryptUninstallDefaultContext: Pointer;
-
-function CryptUninstallDefaultContext;
-begin
- GetProcedureAddress(_CryptUninstallDefaultContext, crypt32, 'CryptUninstallDefaultContext');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CryptUninstallDefaultContext]
- end;
-end;
-
-var
- _CryptExportPublicKeyInfo: Pointer;
-
-function CryptExportPublicKeyInfo;
-begin
- GetProcedureAddress(_CryptExportPublicKeyInfo, crypt32, 'CryptExportPublicKeyInfo');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CryptExportPublicKeyInfo]
- end;
-end;
-
-var
- _CryptExportPublicKeyInfoEx: Pointer;
-
-function CryptExportPublicKeyInfoEx;
-begin
- GetProcedureAddress(_CryptExportPublicKeyInfoEx, crypt32, 'CryptExportPublicKeyInfoEx');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CryptExportPublicKeyInfoEx]
- end;
-end;
-
-var
- _CryptImportPublicKeyInfo: Pointer;
-
-function CryptImportPublicKeyInfo;
-begin
- GetProcedureAddress(_CryptImportPublicKeyInfo, crypt32, 'CryptImportPublicKeyInfo');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CryptImportPublicKeyInfo]
- end;
-end;
-
-var
- _CryptImportPublicKeyInfoEx: Pointer;
-
-function CryptImportPublicKeyInfoEx;
-begin
- GetProcedureAddress(_CryptImportPublicKeyInfoEx, crypt32, 'CryptImportPublicKeyInfoEx');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CryptImportPublicKeyInfoEx]
- end;
-end;
-
-var
- _CryptAcquireCertPrivateKey: Pointer;
-
-function CryptAcquireCertificatePrivateKey;
-begin
- GetProcedureAddress(_CryptAcquireCertPrivateKey, crypt32, 'CryptAcquireCertificatePrivateKey');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CryptAcquireCertPrivateKey]
- end;
-end;
-
-var
- _CryptFindCertificateKeyProvInfo: Pointer;
-
-function CryptFindCertificateKeyProvInfo;
-begin
- GetProcedureAddress(_CryptFindCertificateKeyProvInfo, crypt32, 'CryptFindCertificateKeyProvInfo');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CryptFindCertificateKeyProvInfo]
- end;
-end;
-
-var
- _CryptImportPKCS8: Pointer;
-
-function CryptImportPKCS8;
-begin
- GetProcedureAddress(_CryptImportPKCS8, crypt32, 'CryptImportPKCS8');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CryptImportPKCS8]
- end;
-end;
-
-var
- _CryptExportPKCS8: Pointer;
-
-function CryptExportPKCS8;
-begin
- GetProcedureAddress(_CryptExportPKCS8, crypt32, 'CryptExportPKCS8');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CryptExportPKCS8]
- end;
-end;
-
-var
- _CryptExportPKCS8Ex: Pointer;
-
-function CryptExportPKCS8Ex;
-begin
- GetProcedureAddress(_CryptExportPKCS8Ex, crypt32, 'CryptExportPKCS8Ex');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CryptExportPKCS8Ex]
- end;
-end;
-
-var
- _CryptHashPublicKeyInfo: Pointer;
-
-function CryptHashPublicKeyInfo;
-begin
- GetProcedureAddress(_CryptHashPublicKeyInfo, crypt32, 'CryptHashPublicKeyInfo');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CryptHashPublicKeyInfo]
- end;
-end;
-
-var
- _CertRDNValueToStrA: Pointer;
-
-function CertRDNValueToStrA;
-begin
- GetProcedureAddress(_CertRDNValueToStrA, crypt32, 'CertRDNValueToStrA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CertRDNValueToStrA]
- end;
-end;
-
-var
- _CertRDNValueToStrW: Pointer;
-
-function CertRDNValueToStrW;
-begin
- GetProcedureAddress(_CertRDNValueToStrW, crypt32, 'CertRDNValueToStrW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CertRDNValueToStrW]
- end;
-end;
-
-var
- _CertRDNValueToStr: Pointer;
-
-function CertRDNValueToStr;
-begin
- GetProcedureAddress(_CertRDNValueToStr, crypt32, 'CertRDNValueToStr' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CertRDNValueToStr]
- end;
-end;
-
-var
- _CertNameToStrA: Pointer;
-
-function CertNameToStrA;
-begin
- GetProcedureAddress(_CertNameToStrA, crypt32, 'CertNameToStrA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CertNameToStrA]
- end;
-end;
-
-var
- _CertNameToStrW: Pointer;
-
-function CertNameToStrW;
-begin
- GetProcedureAddress(_CertNameToStrW, crypt32, 'CertNameToStrW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CertNameToStrW]
- end;
-end;
-
-var
- _CertNameToStr: Pointer;
-
-function CertNameToStr;
-begin
- GetProcedureAddress(_CertNameToStr, crypt32, 'CertNameToStr' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CertNameToStr]
- end;
-end;
-
-var
- _CertStrToNameA: Pointer;
-
-function CertStrToNameA;
-begin
- GetProcedureAddress(_CertStrToNameA, crypt32, 'CertStrToNameA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CertStrToNameA]
- end;
-end;
-
-var
- _CertStrToNameW: Pointer;
-
-function CertStrToNameW;
-begin
- GetProcedureAddress(_CertStrToNameW, crypt32, 'CertStrToNameW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CertStrToNameW]
- end;
-end;
-
-var
- _CertStrToName: Pointer;
-
-function CertStrToName;
-begin
- GetProcedureAddress(_CertStrToName, crypt32, 'CertStrToName' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CertStrToName]
- end;
-end;
-
-var
- _CertGetNameStringA: Pointer;
-
-function CertGetNameStringA;
-begin
- GetProcedureAddress(_CertGetNameStringA, crypt32, 'CertGetNameStringA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CertGetNameStringA]
- end;
-end;
-
-var
- _CertGetNameStringW: Pointer;
-
-function CertGetNameStringW;
-begin
- GetProcedureAddress(_CertGetNameStringW, crypt32, 'CertGetNameStringW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CertGetNameStringW]
- end;
-end;
-
-var
- _CertGetNameString: Pointer;
-
-function CertGetNameString;
-begin
- GetProcedureAddress(_CertGetNameString, crypt32, 'CertGetNameString' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CertGetNameString]
- end;
-end;
-
-var
- _CryptSignMessage: Pointer;
-
-function CryptSignMessage;
-begin
- GetProcedureAddress(_CryptSignMessage, crypt32, 'CryptSignMessage');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CryptSignMessage]
- end;
-end;
-
-var
- _CryptVerifyMessageSignature: Pointer;
-
-function CryptVerifyMessageSignature;
-begin
- GetProcedureAddress(_CryptVerifyMessageSignature, crypt32, 'CryptVerifyMessageSignature');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CryptVerifyMessageSignature]
- end;
-end;
-
-var
- _CryptGetMessageSignerCount: Pointer;
-
-function CryptGetMessageSignerCount;
-begin
- GetProcedureAddress(_CryptGetMessageSignerCount, crypt32, 'CryptGetMessageSignerCount');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CryptGetMessageSignerCount]
- end;
-end;
-
-var
- _CryptGetMessageCertificates: Pointer;
-
-function CryptGetMessageCertificates;
-begin
- GetProcedureAddress(_CryptGetMessageCertificates, crypt32, 'CryptGetMessageCertificates');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CryptGetMessageCertificates]
- end;
-end;
-
-var
- _CryptVerDetachedMsgSignature: Pointer;
-
-function CryptVerifyDetachedMessageSignature;
-begin
- GetProcedureAddress(_CryptVerDetachedMsgSignature, crypt32, 'CryptVerifyDetachedMessageSignature');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CryptVerDetachedMsgSignature]
- end;
-end;
-
-var
- _CryptEncryptMessage: Pointer;
-
-function CryptEncryptMessage;
-begin
- GetProcedureAddress(_CryptEncryptMessage, crypt32, 'CryptEncryptMessage');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CryptEncryptMessage]
- end;
-end;
-
-var
- _CryptDecryptMessage: Pointer;
-
-function CryptDecryptMessage;
-begin
- GetProcedureAddress(_CryptDecryptMessage, crypt32, 'CryptDecryptMessage');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CryptDecryptMessage]
- end;
-end;
-
-var
- _CryptSignAndEncryptMessage: Pointer;
-
-function CryptSignAndEncryptMessage;
-begin
- GetProcedureAddress(_CryptSignAndEncryptMessage, crypt32, 'CryptSignAndEncryptMessage');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CryptSignAndEncryptMessage]
- end;
-end;
-
-var
- _CryptDecryptAndVerMsgSig: Pointer;
-
-function CryptDecryptAndVerifyMessageSignature;
-begin
- GetProcedureAddress(_CryptDecryptAndVerMsgSig, crypt32, 'CryptDecryptAndVerifyMessageSignature');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CryptDecryptAndVerMsgSig]
- end;
-end;
-
-var
- _CryptDecodeMessage: Pointer;
-
-function CryptDecodeMessage;
-begin
- GetProcedureAddress(_CryptDecodeMessage, crypt32, 'CryptDecodeMessage');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CryptDecodeMessage]
- end;
-end;
-
-var
- _CryptHashMessage: Pointer;
-
-function CryptHashMessage;
-begin
- GetProcedureAddress(_CryptHashMessage, crypt32, 'CryptHashMessage');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CryptHashMessage]
- end;
-end;
-
-var
- _CryptVerifyMessageHash: Pointer;
-
-function CryptVerifyMessageHash;
-begin
- GetProcedureAddress(_CryptVerifyMessageHash, crypt32, 'CryptVerifyMessageHash');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CryptVerifyMessageHash]
- end;
-end;
-
-var
- _CryptVerifyDetachedMessageHash: Pointer;
-
-function CryptVerifyDetachedMessageHash;
-begin
- GetProcedureAddress(_CryptVerifyDetachedMessageHash, crypt32, 'CryptVerifyDetachedMessageHash');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CryptVerifyDetachedMessageHash]
- end;
-end;
-
-var
- _CryptSignMessageWithKey: Pointer;
-
-function CryptSignMessageWithKey;
-begin
- GetProcedureAddress(_CryptSignMessageWithKey, crypt32, 'CryptSignMessageWithKey');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CryptSignMessageWithKey]
- end;
-end;
-
-var
- _CryptVerifyMsgSigWithKey: Pointer;
-
-function CryptVerifyMessageSignatureWithKey;
-begin
- GetProcedureAddress(_CryptVerifyMsgSigWithKey, crypt32, 'CryptVerifyMessageSignatureWithKey');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CryptVerifyMsgSigWithKey]
- end;
-end;
-
-var
- _CertOpenSystemStoreA: Pointer;
-
-function CertOpenSystemStoreA;
-begin
- GetProcedureAddress(_CertOpenSystemStoreA, crypt32, 'CertOpenSystemStoreA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CertOpenSystemStoreA]
- end;
-end;
-
-var
- _CertOpenSystemStoreW: Pointer;
-
-function CertOpenSystemStoreW;
-begin
- GetProcedureAddress(_CertOpenSystemStoreW, crypt32, 'CertOpenSystemStoreW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CertOpenSystemStoreW]
- end;
-end;
-
-var
- _CertOpenSystemStore: Pointer;
-
-function CertOpenSystemStore;
-begin
- GetProcedureAddress(_CertOpenSystemStore, crypt32, 'CertOpenSystemStore' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CertOpenSystemStore]
- end;
-end;
-
-var
- _CertAddEncodedCertToSysStoreA: Pointer;
-
-function CertAddEncodedCertificateToSystemStoreA;
-begin
- GetProcedureAddress(_CertAddEncodedCertToSysStoreA, crypt32, 'CertAddEncodedCertificateToSystemStoreA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CertAddEncodedCertToSysStoreA]
- end;
-end;
-
-var
- _CertAddEncodedCertToSysStoreW: Pointer;
-
-function CertAddEncodedCertificateToSystemStoreW;
-begin
- GetProcedureAddress(_CertAddEncodedCertToSysStoreW, crypt32, 'CertAddEncodedCertificateToSystemStoreW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CertAddEncodedCertToSysStoreW]
- end;
-end;
-
-var
- _CertAddEncodedCertToSysStore: Pointer;
-
-function CertAddEncodedCertificateToSystemStore;
-begin
- GetProcedureAddress(_CertAddEncodedCertToSysStore, crypt32, 'CertAddEncodedCertificateToSystemStore' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CertAddEncodedCertToSysStore]
- end;
-end;
-
-var
- _FindCertsByIssuer: Pointer;
-
-function FindCertsByIssuer;
-begin
- GetProcedureAddress(_FindCertsByIssuer, softpub, 'FindCertsByIssuer');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_FindCertsByIssuer]
- end;
-end;
-
-var
- _CryptQueryObject: Pointer;
-
-function CryptQueryObject;
-begin
- GetProcedureAddress(_CryptQueryObject, crypt32, 'CryptQueryObject');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CryptQueryObject]
- end;
-end;
-
-var
- _CryptMemAlloc: Pointer;
-
-function CryptMemAlloc;
-begin
- GetProcedureAddress(_CryptMemAlloc, crypt32, 'CryptMemAlloc');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CryptMemAlloc]
- end;
-end;
-
-var
- _CryptMemRealloc: Pointer;
-
-function CryptMemRealloc;
-begin
- GetProcedureAddress(_CryptMemRealloc, crypt32, 'CryptMemRealloc');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CryptMemRealloc]
- end;
-end;
-
-var
- _CryptMemFree: Pointer;
-
-procedure CryptMemFree;
-begin
- GetProcedureAddress(_CryptMemFree, crypt32, 'CryptMemFree');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CryptMemFree]
- end;
-end;
-
-var
- _CryptCreateAsyncHandle: Pointer;
-
-function CryptCreateAsyncHandle;
-begin
- GetProcedureAddress(_CryptCreateAsyncHandle, crypt32, 'CryptCreateAsyncHandle');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CryptCreateAsyncHandle]
- end;
-end;
-
-var
- _CryptSetAsyncParam: Pointer;
-
-function CryptSetAsyncParam;
-begin
- GetProcedureAddress(_CryptSetAsyncParam, crypt32, 'CryptSetAsyncParam');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CryptSetAsyncParam]
- end;
-end;
-
-var
- _CryptGetAsyncParam: Pointer;
-
-function CryptGetAsyncParam;
-begin
- GetProcedureAddress(_CryptGetAsyncParam, crypt32, 'CryptGetAsyncParam');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CryptGetAsyncParam]
- end;
-end;
-
-var
- _CryptCloseAsyncHandle: Pointer;
-
-function CryptCloseAsyncHandle;
-begin
- GetProcedureAddress(_CryptCloseAsyncHandle, crypt32, 'CryptCloseAsyncHandle');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CryptCloseAsyncHandle]
- end;
-end;
-
-var
- _CryptRetrieveObjectByUrlA: Pointer;
-
-function CryptRetrieveObjectByUrlA;
-begin
- GetProcedureAddress(_CryptRetrieveObjectByUrlA, crypt32, 'CryptRetrieveObjectByUrlA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CryptRetrieveObjectByUrlA]
- end;
-end;
-
-var
- _CryptRetrieveObjectByUrlW: Pointer;
-
-function CryptRetrieveObjectByUrlW;
-begin
- GetProcedureAddress(_CryptRetrieveObjectByUrlW, crypt32, 'CryptRetrieveObjectByUrlW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CryptRetrieveObjectByUrlW]
- end;
-end;
-
-var
- _CryptRetrieveObjectByUrl: Pointer;
-
-function CryptRetrieveObjectByUrl;
-begin
- GetProcedureAddress(_CryptRetrieveObjectByUrl, crypt32, 'CryptRetrieveObjectByUrl' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CryptRetrieveObjectByUrl]
- end;
-end;
-
-var
- _CryptInstallCancelRetrieval: Pointer;
-
-function CryptInstallCancelRetrieval;
-begin
- GetProcedureAddress(_CryptInstallCancelRetrieval, crypt32, 'CryptInstallCancelRetrieval');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CryptInstallCancelRetrieval]
- end;
-end;
-
-var
- _CryptUninstallCancelRetrieval: Pointer;
-
-function CryptUninstallCancelRetrieval;
-begin
- GetProcedureAddress(_CryptUninstallCancelRetrieval, crypt32, 'CryptUninstallCancelRetrieval');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CryptUninstallCancelRetrieval]
- end;
-end;
-
-var
- _CryptCancelAsyncRetrieval: Pointer;
-
-function CryptCancelAsyncRetrieval;
-begin
- GetProcedureAddress(_CryptCancelAsyncRetrieval, crypt32, 'CryptCancelAsyncRetrieval');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CryptCancelAsyncRetrieval]
- end;
-end;
-
-var
- _CryptGetObjectUrl: Pointer;
-
-function CryptGetObjectUrl;
-begin
- GetProcedureAddress(_CryptGetObjectUrl, crypt32, 'CryptGetObjectUrl');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CryptGetObjectUrl]
- end;
-end;
-
-var
- _CryptGetTimeValidObject: Pointer;
-
-function CryptGetTimeValidObject;
-begin
- GetProcedureAddress(_CryptGetTimeValidObject, crypt32, 'CryptGetTimeValidObject');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CryptGetTimeValidObject]
- end;
-end;
-
-var
- _CryptFlushTimeValidObject: Pointer;
-
-function CryptFlushTimeValidObject;
-begin
- GetProcedureAddress(_CryptFlushTimeValidObject, crypt32, 'CryptFlushTimeValidObject');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CryptFlushTimeValidObject]
- end;
-end;
-
-var
- _CryptProtectData: Pointer;
-
-function CryptProtectData;
-begin
- GetProcedureAddress(_CryptProtectData, crypt32, 'CryptProtectData');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CryptProtectData]
- end;
-end;
-
-var
- _CryptUnprotectData: Pointer;
-
-function CryptUnprotectData;
-begin
- GetProcedureAddress(_CryptUnprotectData, crypt32, 'CryptUnprotectData');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CryptUnprotectData]
- end;
-end;
-
-var
- _CertCreateSelfSignCertificate: Pointer;
-
-function CertCreateSelfSignCertificate;
-begin
- GetProcedureAddress(_CertCreateSelfSignCertificate, crypt32, 'CertCreateSelfSignCertificate');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CertCreateSelfSignCertificate]
- end;
-end;
-
-var
- _CryptGetKeyIdentifierProperty: Pointer;
-
-function CryptGetKeyIdentifierProperty;
-begin
- GetProcedureAddress(_CryptGetKeyIdentifierProperty, crypt32, 'CryptGetKeyIdentifierProperty');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CryptGetKeyIdentifierProperty]
- end;
-end;
-
-var
- _CryptSetKeyIdentifierProperty: Pointer;
-
-function CryptSetKeyIdentifierProperty;
-begin
- GetProcedureAddress(_CryptSetKeyIdentifierProperty, crypt32, 'CryptSetKeyIdentifierProperty');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CryptSetKeyIdentifierProperty]
- end;
-end;
-
-var
- _CryptEnumKeyIdentProperties: Pointer;
-
-function CryptEnumKeyIdentifierProperties;
-begin
- GetProcedureAddress(_CryptEnumKeyIdentProperties, crypt32, 'CryptEnumKeyIdentifierProperties');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CryptEnumKeyIdentProperties]
- end;
-end;
-
-var
- _CryptCreateKeyIdentifierFromCSP: Pointer;
-
-function CryptCreateKeyIdentifierFromCSP;
-begin
- GetProcedureAddress(_CryptCreateKeyIdentifierFromCSP, crypt32, 'CryptCreateKeyIdentifierFromCSP');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CryptCreateKeyIdentifierFromCSP]
- end;
-end;
-
-var
- _CertCreateCertChainEngine: Pointer;
-
-function CertCreateCertificateChainEngine;
-begin
- GetProcedureAddress(_CertCreateCertChainEngine, crypt32, 'CertCreateCertificateChainEngine');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CertCreateCertChainEngine]
- end;
-end;
-
-var
- _CertFreeCertificateChainEngine: Pointer;
-
-procedure CertFreeCertificateChainEngine;
-begin
- GetProcedureAddress(_CertFreeCertificateChainEngine, crypt32, 'CertFreeCertificateChainEngine');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CertFreeCertificateChainEngine]
- end;
-end;
-
-var
- _CertResyncCertChainEngine: Pointer;
-
-function CertResyncCertificateChainEngine;
-begin
- GetProcedureAddress(_CertResyncCertChainEngine, crypt32, 'CertResyncCertificateChainEngine');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CertResyncCertChainEngine]
- end;
-end;
-
-var
- _CertGetCertificateChain: Pointer;
-
-function CertGetCertificateChain;
-begin
- GetProcedureAddress(_CertGetCertificateChain, crypt32, 'CertGetCertificateChain');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CertGetCertificateChain]
- end;
-end;
-
-var
- _CertFreeCertificateChain: Pointer;
-
-procedure CertFreeCertificateChain;
-begin
- GetProcedureAddress(_CertFreeCertificateChain, crypt32, 'CertFreeCertificateChain');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CertFreeCertificateChain]
- end;
-end;
-
-var
- _CertDuplicateCertificateChain: Pointer;
-
-function CertDuplicateCertificateChain;
-begin
- GetProcedureAddress(_CertDuplicateCertificateChain, crypt32, 'CertDuplicateCertificateChain');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CertDuplicateCertificateChain]
- end;
-end;
-
-var
- _CertFindChainInStore: Pointer;
-
-function CertFindChainInStore;
-begin
- GetProcedureAddress(_CertFindChainInStore, crypt32, 'CertFindChainInStore');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CertFindChainInStore]
- end;
-end;
-
-var
- _CertVerifyCertChainPolicy: Pointer;
-
-function CertVerifyCertificateChainPolicy;
-begin
- GetProcedureAddress(_CertVerifyCertChainPolicy, crypt32, 'CertVerifyCertificateChainPolicy');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CertVerifyCertChainPolicy]
- end;
-end;
-
-{$ELSE}
-
-function CryptAcquireContextA; external advapi32 name 'CryptAcquireContextA';
-function CryptAcquireContextW; external advapi32 name 'CryptAcquireContextW';
-function CryptAcquireContext; external advapi32 name 'CryptAcquireContext' + AWSuffix;
-function CryptReleaseContext; external advapi32 name 'CryptReleaseContext';
-function CryptGenKey; external advapi32 name 'CryptGenKey';
-function CryptDeriveKey; external advapi32 name 'CryptDeriveKey';
-function CryptDestroyKey; external advapi32 name 'CryptDestroyKey';
-function CryptSetKeyParam; external crypt32 name 'CryptSetKeyParam';
-function CryptGetKeyParam; external advapi32 name 'CryptGetKeyParam';
-function CryptSetHashParam; external advapi32 name 'CryptSetHashParam';
-function CryptGetHashParam; external advapi32 name 'CryptGetHashParam';
-function CryptSetProvParam; external advapi32 name 'CryptSetProvParam';
-function CryptGetProvParam; external advapi32 name 'CryptGetProvParam';
-function CryptGenRandom; external advapi32 name 'CryptGenRandom';
-function CryptGetUserKey; external advapi32 name 'CryptGetUserKey';
-function CryptExportKey; external advapi32 name 'CryptExportKey';
-function CryptImportKey; external advapi32 name 'CryptImportKey';
-function CryptEncrypt; external advapi32 name 'CryptEncrypt';
-function CryptDecrypt; external advapi32 name 'CryptDecrypt';
-function CryptCreateHash; external advapi32 name 'CryptCreateHash';
-function CryptHashData; external advapi32 name 'CryptHashData';
-function CryptHashSessionKey; external advapi32 name 'CryptHashSessionKey';
-function CryptDestroyHash; external advapi32 name 'CryptDestroyHash';
-function CryptSignHashA; external advapi32 name 'CryptSignHashA';
-function CryptSignHashW; external advapi32 name 'CryptSignHashW';
-function CryptSignHash; external advapi32 name 'CryptSignHash' + AWSuffix;
-function CryptVerifySignatureA; external advapi32 name 'CryptVerifySignatureA';
-function CryptVerifySignatureW; external advapi32 name 'CryptVerifySignatureW';
-function CryptVerifySignature; external advapi32 name 'CryptVerifySignature' + AWSuffix;
-function CryptSetProviderA; external advapi32 name 'CryptSetProviderA';
-function CryptSetProviderW; external advapi32 name 'CryptSetProviderW';
-function CryptSetProvider; external advapi32 name 'CryptSetProvider' + AWSuffix;
-function CryptSetProviderExA; external advapi32 name 'CryptSetProviderExA';
-function CryptSetProviderExW; external advapi32 name 'CryptSetProviderExW';
-function CryptSetProviderEx; external advapi32 name 'CryptSetProviderEx' + AWSuffix;
-function CryptGetDefaultProviderA; external advapi32 name 'CryptGetDefaultProviderA';
-function CryptGetDefaultProviderW; external advapi32 name 'CryptGetDefaultProviderW';
-function CryptGetDefaultProvider; external advapi32 name 'CryptGetDefaultProvider' + AWSuffix;
-function CryptEnumProviderTypesA; external advapi32 name 'CryptEnumProviderTypesA';
-function CryptEnumProviderTypesW; external advapi32 name 'CryptEnumProviderTypesW';
-function CryptEnumProviderTypes; external advapi32 name 'CryptEnumProviderTypes' + AWSuffix;
-function CryptEnumProvidersA; external advapi32 name 'CryptEnumProvidersA';
-function CryptEnumProvidersW; external advapi32 name 'CryptEnumProvidersW';
-function CryptEnumProviders; external advapi32 name 'CryptEnumProviders' + AWSuffix;
-function CryptContextAddRef; external advapi32 name 'CryptContextAddRef';
-function CryptDuplicateKey; external advapi32 name 'CryptDuplicateKey';
-function CryptDuplicateHash; external advapi32 name 'CryptDuplicateHash';
-function CryptFormatObject; external crypt32 name 'CryptFormatObject';
-function CryptEncodeObjectEx; external crypt32 name 'CryptEncodeObjectEx';
-function CryptEncodeObject; external crypt32 name 'CryptEncodeObject';
-function CryptDecodeObjectEx; external crypt32 name 'CryptDecodeObjectEx';
-function CryptDecodeObject; external crypt32 name 'CryptDecodeObject';
-function CryptInstallOIDFunctionAddress; external crypt32 name 'CryptInstallOIDFunctionAddress';
-function CryptInitOIDFunctionSet; external crypt32 name 'CryptInitOIDFunctionSet';
-function CryptGetOIDFunctionAddress; external crypt32 name 'CryptGetOIDFunctionAddress';
-function CryptGetDefaultOIDDllList; external crypt32 name 'CryptGetDefaultOIDDllList';
-function CryptGetDefaultOIDFunctionAddress; external crypt32 name 'CryptGetDefaultOIDFunctionAddress';
-function CryptFreeOIDFunctionAddress; external crypt32 name 'CryptFreeOIDFunctionAddress';
-function CryptRegisterOIDFunction; external crypt32 name 'CryptRegisterOIDFunction';
-function CryptUnregisterOIDFunction; external crypt32 name 'CryptUnregisterOIDFunction';
-function CryptRegisterDefaultOIDFunction; external crypt32 name 'CryptRegisterDefaultOIDFunction';
-function CryptUnregisterDefaultOIDFunction; external crypt32 name 'CryptUnregisterDefaultOIDFunction';
-function CryptSetOIDFunctionValue; external crypt32 name 'CryptSetOIDFunctionValue';
-function CryptGetOIDFunctionValue; external crypt32 name 'CryptGetOIDFunctionValue';
-function CryptEnumOIDFunction; external crypt32 name 'CryptEnumOIDFunction';
-function CryptFindOIDInfo; external crypt32 name 'CryptFindOIDInfo';
-function CryptRegisterOIDInfo; external crypt32 name 'CryptRegisterOIDInfo';
-function CryptUnregisterOIDInfo; external crypt32 name 'CryptUnregisterOIDInfo';
-function CryptEnumOIDInfo; external crypt32 name 'CryptEnumOIDInfo';
-function CryptFindLocalizedName; external crypt32 name 'CryptFindLocalizedName';
-function CryptMsgOpenToEncode; external crypt32 name 'CryptMsgOpenToEncode';
-function CryptMsgCalculateEncodedLength; external crypt32 name 'CryptMsgCalculateEncodedLength';
-function CryptMsgOpenToDecode; external crypt32 name 'CryptMsgOpenToDecode';
-function CryptMsgDuplicate; external crypt32 name 'CryptMsgDuplicate';
-function CryptMsgClose; external crypt32 name 'CryptMsgClose';
-function CryptMsgUpdate; external crypt32 name 'CryptMsgUpdate';
-function CryptMsgGetParam; external crypt32 name 'CryptMsgGetParam';
-function CryptMsgControl; external crypt32 name 'CryptMsgControl';
-function CryptMsgVerifyCountersignatureEncoded; external crypt32 name 'CryptMsgVerifyCountersignatureEncoded';
-function CryptMsgVerifyCountersignatureEncodedEx; external crypt32 name 'CryptMsgVerifyCountersignatureEncodedEx';
-function CryptMsgCountersign; external crypt32 name 'CryptMsgCountersign';
-function CryptMsgCountersignEncoded; external crypt32 name 'CryptMsgCountersignEncoded';
-function CertOpenStore; external crypt32 name 'CertOpenStore';
-function CertDuplicateStore; external crypt32 name 'CertDuplicateStore';
-function CertSaveStore; external crypt32 name 'CertSaveStore';
-function CertCloseStore; external crypt32 name 'CertCloseStore';
-function CertGetSubjectCertificateFromStore; external crypt32 name 'CertGetSubjectCertificateFromStore';
-function CertEnumCertificatesInStore; external crypt32 name 'CertEnumCertificatesInStore';
-function CertFindCertificateInStore; external crypt32 name 'CertFindCertificateInStore';
-function CertGetIssuerCertificateFromStore; external crypt32 name 'CertGetIssuerCertificateFromStore';
-function CertVerifySubjectCertificateContext; external crypt32 name 'CertVerifySubjectCertificateContext';
-function CertDuplicateCertificateContext; external crypt32 name 'CertDuplicateCertificateContext';
-function CertCreateCertificateContext; external crypt32 name 'CertCreateCertificateContext';
-function CertFreeCertificateContext; external crypt32 name 'CertFreeCertificateContext';
-function CertSetCertificateContextProperty; external crypt32 name 'CertSetCertificateContextProperty';
-function CertGetCertificateContextProperty; external crypt32 name 'CertGetCertificateContextProperty';
-function CertEnumCertificateContextProperties; external crypt32 name 'CertEnumCertificateContextProperties';
-function CertGetCRLFromStore; external crypt32 name 'CertGetCRLFromStore';
-function CertEnumCRLsInStore; external crypt32 name 'CertEnumCRLsInStore';
-function CertFindCRLInStore; external crypt32 name 'CertFindCRLInStore';
-function CertDuplicateCRLContext; external crypt32 name 'CertDuplicateCRLContext';
-function CertCreateCRLContext; external crypt32 name 'CertCreateCRLContext';
-function CertFreeCRLContext; external crypt32 name 'CertFreeCRLContext';
-function CertSetCRLContextProperty; external crypt32 name 'CertSetCRLContextProperty';
-function CertGetCRLContextProperty; external crypt32 name 'CertGetCRLContextProperty';
-function CertEnumCRLContextProperties; external crypt32 name 'CertEnumCRLContextProperties';
-function CertFindCertificateInCRL; external crypt32 name 'CertFindCertificateInCRL';
-function CertAddEncodedCertificateToStore; external crypt32 name 'CertAddEncodedCertificateToStore';
-function CertAddCertificateContextToStore; external crypt32 name 'CertAddCertificateContextToStore';
-function CertAddSerializedElementToStore; external crypt32 name 'CertAddSerializedElementToStore';
-function CertDeleteCertificateFromStore; external crypt32 name 'CertDeleteCertificateFromStore';
-function CertAddEncodedCRLToStore; external crypt32 name 'CertAddEncodedCRLToStore';
-function CertAddCRLContextToStore; external crypt32 name 'CertAddCRLContextToStore';
-function CertDeleteCRLFromStore; external crypt32 name 'CertDeleteCRLFromStore';
-function CertSerializeCertificateStoreElement; external crypt32 name 'CertSerializeCertificateStoreElement';
-function CertSerializeCRLStoreElement; external crypt32 name 'CertSerializeCRLStoreElement';
-function CertDuplicateCTLContext; external crypt32 name 'CertDuplicateCTLContext';
-function CertCreateCTLContext; external crypt32 name 'CertCreateCTLContext';
-function CertFreeCTLContext; external crypt32 name 'CertFreeCTLContext';
-function CertSetCTLContextProperty; external crypt32 name 'CertSetCTLContextProperty';
-function CertGetCTLContextProperty; external crypt32 name 'CertGetCTLContextProperty';
-function CertEnumCTLContextProperties; external crypt32 name 'CertEnumCTLContextProperties';
-function CertEnumCTLsInStore; external crypt32 name 'CertEnumCTLsInStore';
-function CertFindSubjectInCTL; external crypt32 name 'CertFindSubjectInCTL';
-function CertFindCTLInStore; external crypt32 name 'CertFindCTLInStore';
-function CertAddEncodedCTLToStore; external crypt32 name 'CertAddEncodedCTLToStore';
-function CertAddCTLContextToStore; external crypt32 name 'CertAddCTLContextToStore';
-function CertSerializeCTLStoreElement; external crypt32 name 'CertSerializeCTLStoreElement';
-function CertDeleteCTLFromStore; external crypt32 name 'CertDeleteCTLFromStore';
-function CertAddCertificateLinkToStore; external crypt32 name 'CertAddCertificateLinkToStore';
-function CertAddCRLLinkToStore; external crypt32 name 'CertAddCRLLinkToStore';
-function CertAddCTLLinkToStore; external crypt32 name 'CertAddCTLLinkToStore';
-function CertAddStoreToCollection; external crypt32 name 'CertAddStoreToCollection';
-procedure CertRemoveStoreFromCollection; external crypt32 name 'CertRemoveStoreFromCollection';
-function CertControlStore; external crypt32 name 'CertControlStore';
-function CertSetStoreProperty; external crypt32 name 'CertSetStoreProperty';
-function CertGetStoreProperty; external crypt32 name 'CertGetStoreProperty';
-function CertCreateContext; external crypt32 name 'CertCreateContext';
-function CertRegisterSystemStore; external crypt32 name 'CertRegisterSystemStore';
-function CertRegisterPhysicalStore; external crypt32 name 'CertRegisterPhysicalStore';
-function CertUnregisterSystemStore; external crypt32 name 'CertUnregisterSystemStore';
-function CertUnregisterPhysicalStore; external crypt32 name 'CertUnregisterPhysicalStore';
-function CertEnumSystemStoreLocation; external crypt32 name 'CertEnumSystemStoreLocation';
-function CertEnumSystemStore; external crypt32 name 'CertEnumSystemStore';
-function CertEnumPhysicalStore; external crypt32 name 'CertEnumPhysicalStore';
-function CertGetEnhancedKeyUsage; external crypt32 name 'CertGetEnhancedKeyUsage';
-function CertSetEnhancedKeyUsage; external crypt32 name 'CertSetEnhancedKeyUsage';
-function CertAddEnhancedKeyUsageIdentifier; external crypt32 name 'CertAddEnhancedKeyUsageIdentifier';
-function CertRemoveEnhancedKeyUsageIdentifier; external crypt32 name 'CertRemoveEnhancedKeyUsageIdentifier';
-function CertGetValidUsages; external crypt32 name 'CertGetValidUsages';
-function CryptMsgGetAndVerifySigner; external crypt32 name 'CryptMsgGetAndVerifySigner';
-function CryptMsgSignCTL; external crypt32 name 'CryptMsgSignCTL';
-function CryptMsgEncodeAndSignCTL; external crypt32 name 'CryptMsgEncodeAndSignCTL';
-function CertFindSubjectInSortedCTL; external crypt32 name 'CertFindSubjectInSortedCTL';
-function CertEnumSubjectInSortedCTL; external crypt32 name 'CertEnumSubjectInSortedCTL';
-function CertVerifyCTLUsage; external crypt32 name 'CertVerifyCTLUsage';
-function CertVerifyRevocation; external crypt32 name 'CertVerifyRevocation';
-function CertCompareIntegerBlob; external crypt32 name 'CertCompareIntegerBlob';
-function CertCompareCertificate; external crypt32 name 'CertCompareCertificate';
-function CertCompareCertificateName; external crypt32 name 'CertCompareCertificateName';
-function CertIsRDNAttrsInCertificateName; external crypt32 name 'CertIsRDNAttrsInCertificateName';
-function CertComparePublicKeyInfo; external crypt32 name 'CertComparePublicKeyInfo';
-function CertGetPublicKeyLength; external crypt32 name 'CertGetPublicKeyLength';
-function CryptVerifyCertificateSignature; external crypt32 name 'CryptVerifyCertificateSignature';
-function CryptVerifyCertificateSignatureEx; external crypt32 name 'CryptVerifyCertificateSignatureEx';
-function CryptHashToBeSigned; external crypt32 name 'CryptHashToBeSigned';
-function CryptHashCertificate; external crypt32 name 'CryptHashCertificate';
-function CryptSignCertificate; external crypt32 name 'CryptSignCertificate';
-function CryptSignAndEncodeCertificate; external crypt32 name 'CryptSignAndEncodeCertificate';
-function CertVerifyTimeValidity; external crypt32 name 'CertVerifyTimeValidity';
-function CertVerifyCRLTimeValidity; external crypt32 name 'CertVerifyCRLTimeValidity';
-function CertVerifyValidityNesting; external crypt32 name 'CertVerifyValidityNesting';
-function CertVerifyCRLRevocation; external crypt32 name 'CertVerifyCRLRevocation';
-function CertAlgIdToOID; external crypt32 name 'CertAlgIdToOID';
-function CertOIDToAlgId; external crypt32 name 'CertOIDToAlgId';
-function CertFindExtension; external crypt32 name 'CertFindExtension';
-function CertFindAttribute; external crypt32 name 'CertFindAttribute';
-function CertFindRDNAttr; external crypt32 name 'CertFindRDNAttr';
-function CertGetIntendedKeyUsage; external crypt32 name 'CertGetIntendedKeyUsage';
-function CryptInstallDefaultContext; external crypt32 name 'CryptInstallDefaultContext';
-function CryptUninstallDefaultContext; external crypt32 name 'CryptUninstallDefaultContext';
-function CryptExportPublicKeyInfo; external crypt32 name 'CryptExportPublicKeyInfo';
-function CryptExportPublicKeyInfoEx; external crypt32 name 'CryptExportPublicKeyInfoEx';
-function CryptImportPublicKeyInfo; external crypt32 name 'CryptImportPublicKeyInfo';
-function CryptImportPublicKeyInfoEx; external crypt32 name 'CryptImportPublicKeyInfoEx';
-function CryptAcquireCertificatePrivateKey; external crypt32 name 'CryptAcquireCertificatePrivateKey';
-function CryptFindCertificateKeyProvInfo; external crypt32 name 'CryptFindCertificateKeyProvInfo';
-function CryptImportPKCS8; external crypt32 name 'CryptImportPKCS8';
-function CryptExportPKCS8; external crypt32 name 'CryptExportPKCS8';
-function CryptExportPKCS8Ex; external crypt32 name 'CryptExportPKCS8Ex';
-function CryptHashPublicKeyInfo; external crypt32 name 'CryptHashPublicKeyInfo';
-function CertRDNValueToStrA; external crypt32 name 'CertRDNValueToStrA';
-function CertRDNValueToStrW; external crypt32 name 'CertRDNValueToStrW';
-function CertRDNValueToStr; external crypt32 name 'CertRDNValueToStr' + AWSuffix;
-function CertNameToStrA; external crypt32 name 'CertNameToStrA';
-function CertNameToStrW; external crypt32 name 'CertNameToStrW';
-function CertNameToStr; external crypt32 name 'CertNameToStr' + AWSuffix;
-function CertStrToNameA; external crypt32 name 'CertStrToNameA';
-function CertStrToNameW; external crypt32 name 'CertStrToNameW';
-function CertStrToName; external crypt32 name 'CertStrToName' + AWSuffix;
-function CertGetNameStringA; external crypt32 name 'CertGetNameStringA';
-function CertGetNameStringW; external crypt32 name 'CertGetNameStringW';
-function CertGetNameString; external crypt32 name 'CertGetNameString' + AWSuffix;
-function CryptSignMessage; external crypt32 name 'CryptSignMessage';
-function CryptVerifyMessageSignature; external crypt32 name 'CryptVerifyMessageSignature';
-function CryptGetMessageSignerCount; external crypt32 name 'CryptGetMessageSignerCount';
-function CryptGetMessageCertificates; external crypt32 name 'CryptGetMessageCertificates';
-function CryptVerifyDetachedMessageSignature; external crypt32 name 'CryptVerifyDetachedMessageSignature';
-function CryptEncryptMessage; external crypt32 name 'CryptEncryptMessage';
-function CryptDecryptMessage; external crypt32 name 'CryptDecryptMessage';
-function CryptSignAndEncryptMessage; external crypt32 name 'CryptSignAndEncryptMessage';
-function CryptDecryptAndVerifyMessageSignature; external crypt32 name 'CryptDecryptAndVerifyMessageSignature';
-function CryptDecodeMessage; external crypt32 name 'CryptDecodeMessage';
-function CryptHashMessage; external crypt32 name 'CryptHashMessage';
-function CryptVerifyMessageHash; external crypt32 name 'CryptVerifyMessageHash';
-function CryptVerifyDetachedMessageHash; external crypt32 name 'CryptVerifyDetachedMessageHash';
-function CryptSignMessageWithKey; external crypt32 name 'CryptSignMessageWithKey';
-function CryptVerifyMessageSignatureWithKey; external crypt32 name 'CryptVerifyMessageSignatureWithKey';
-function CertOpenSystemStoreA; external crypt32 name 'CertOpenSystemStoreA';
-function CertOpenSystemStoreW; external crypt32 name 'CertOpenSystemStoreW';
-function CertOpenSystemStore; external crypt32 name 'CertOpenSystemStore' + AWSuffix;
-function CertAddEncodedCertificateToSystemStoreA; external crypt32 name 'CertAddEncodedCertificateToSystemStoreA';
-function CertAddEncodedCertificateToSystemStoreW; external crypt32 name 'CertAddEncodedCertificateToSystemStoreW';
-function CertAddEncodedCertificateToSystemStore; external crypt32 name 'CertAddEncodedCertificateToSystemStore' + AWSuffix;
-function FindCertsByIssuer; external softpub name 'FindCertsByIssuer';
-function CryptQueryObject; external crypt32 name 'CryptQueryObject';
-function CryptMemAlloc; external crypt32 name 'CryptMemAlloc';
-function CryptMemRealloc; external crypt32 name 'CryptMemRealloc';
-procedure CryptMemFree; external crypt32 name 'CryptMemFree';
-function CryptCreateAsyncHandle; external crypt32 name 'CryptCreateAsyncHandle';
-function CryptSetAsyncParam; external crypt32 name 'CryptSetAsyncParam';
-function CryptGetAsyncParam; external crypt32 name 'CryptGetAsyncParam';
-function CryptCloseAsyncHandle; external crypt32 name 'CryptCloseAsyncHandle';
-function CryptRetrieveObjectByUrlA; external crypt32 name 'CryptRetrieveObjectByUrlA';
-function CryptRetrieveObjectByUrlW; external crypt32 name 'CryptRetrieveObjectByUrlW';
-function CryptRetrieveObjectByUrl; external crypt32 name 'CryptRetrieveObjectByUrl' + AWSuffix;
-function CryptInstallCancelRetrieval; external crypt32 name 'CryptInstallCancelRetrieval';
-function CryptUninstallCancelRetrieval; external crypt32 name 'CryptUninstallCancelRetrieval';
-function CryptCancelAsyncRetrieval; external crypt32 name 'CryptCancelAsyncRetrieval';
-function CryptGetObjectUrl; external crypt32 name 'CryptGetObjectUrl';
-function CryptGetTimeValidObject; external crypt32 name 'CryptGetTimeValidObject';
-function CryptFlushTimeValidObject; external crypt32 name 'CryptFlushTimeValidObject';
-function CryptProtectData; external crypt32 name 'CryptProtectData';
-function CryptUnprotectData; external crypt32 name 'CryptUnprotectData';
-function CertCreateSelfSignCertificate; external crypt32 name 'CertCreateSelfSignCertificate';
-function CryptGetKeyIdentifierProperty; external crypt32 name 'CryptGetKeyIdentifierProperty';
-function CryptSetKeyIdentifierProperty; external crypt32 name 'CryptSetKeyIdentifierProperty';
-function CryptEnumKeyIdentifierProperties; external crypt32 name 'CryptEnumKeyIdentifierProperties';
-function CryptCreateKeyIdentifierFromCSP; external crypt32 name 'CryptCreateKeyIdentifierFromCSP';
-function CertCreateCertificateChainEngine; external crypt32 name 'CertCreateCertificateChainEngine';
-procedure CertFreeCertificateChainEngine; external crypt32 name 'CertFreeCertificateChainEngine';
-function CertResyncCertificateChainEngine; external crypt32 name 'CertResyncCertificateChainEngine';
-function CertGetCertificateChain; external crypt32 name 'CertGetCertificateChain';
-procedure CertFreeCertificateChain; external crypt32 name 'CertFreeCertificateChain';
-function CertDuplicateCertificateChain; external crypt32 name 'CertDuplicateCertificateChain';
-function CertFindChainInStore; external crypt32 name 'CertFindChainInStore';
-function CertVerifyCertificateChainPolicy; external crypt32 name 'CertVerifyCertificateChainPolicy';
-
-{$ENDIF DYNAMIC_LINK}
-
-end.
+{******************************************************************************}
+{ }
+{ Windows Cryptography API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: wincrypt.h, released June 2000. The original Pascal }
+{ code is: WinCrypt.pas, released December 2000. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwawincrypt.pas,v 1.1 2005/04/04 07:56:11 marco Exp $
+
+unit JwaWinCrypt;
+
+{$I jediapilib.inc}
+
+{$WEAKPACKAGEUNIT}
+
+interface
+
+uses
+ JwaWinBase, JwaWinType;
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include <WinCrypt.h>'}
+{$HPPEMIT ''}
+{$HPPEMIT 'typedef HCRYPTPROV *PHCRYPTPROV'}
+{$HPPEMIT 'typedef HCRYPTKEY *PHCRYPTKEY'}
+{$HPPEMIT 'typedef HCRYPTHASH *PHCRYPTHASH'}
+{$HPPEMIT 'typedef PROV_ENUMALGS *PPROV_ENUMALGS'}
+{$HPPEMIT 'typedef PROV_ENUMALGS_EX *PPROV_ENUMALGS_EX'}
+{$HPPEMIT 'typedef PUBLICKEYSTRUC *PPUBLICKEYSTRUC'}
+{$HPPEMIT 'typedef RSAPUBKEY *PRSAPUBKEY'}
+{$HPPEMIT 'typedef DSSSEED *PDSSSEED'}
+{$HPPEMIT 'typedef PUBKEYVER3 *PPUBKEYVER3'}
+{$HPPEMIT 'typedef DHPRIVKEY_VER3 *PPRIVKEYVER3'}
+{$HPPEMIT 'typedef CERT_FORTEZZA_DATA_PROP *PCERT_FORTEZZA_DATA_PROP'}
+{$HPPEMIT 'typedef HCRYPTMSG *PHCRYPTMSG'}
+{$HPPEMIT 'typedef CMSG_RECIPIENT_ENCODE_INFO *PCMSG_RECIPIENT_ENCODE_INFO'}
+{$HPPEMIT 'typedef _CMSG_RECIPIENT_ENCODE_INFO CMSG_RECIPIENT_ENCODE_INFO'}
+{$HPPEMIT 'typedef PCMSG_KEY_AGREE_KEY_ENCRYPT_INFO *PPCMSG_KEY_AGREE_KEY_ENCRYPT_INFO'}
+{$HPPEMIT 'typedef HCERTSTORE *PHCERTSTORE'}
+{$HPPEMIT 'typedef PCCERT_CONTEXT *PPCCERT_CONTEXT'}
+{$HPPEMIT 'typedef PCCRL_CONTEXT *PPCCRL_CONTEXT'}
+{$HPPEMIT 'typedef PCERT_CHAIN_CONTEXT *PPCCERT_CHAIN_CONTEXT'}
+{$HPPEMIT ''}
+
+//
+// Algorithm IDs and Flags
+//
+
+// ALG_ID crackers
+
+function GET_ALG_CLASS(x: DWORD): DWORD;
+{$EXTERNALSYM GET_ALG_CLASS}
+
+function GET_ALG_TYPE(x: DWORD): DWORD;
+{$EXTERNALSYM GET_ALG_TYPE}
+
+function GET_ALG_SID(x: DWORD): DWORD;
+{$EXTERNALSYM GET_ALG_SID}
+
+// Algorithm classes
+
+const
+ ALG_CLASS_ANY = 0;
+ {$EXTERNALSYM ALG_CLASS_ANY}
+ ALG_CLASS_SIGNATURE = 1 shl 13;
+ {$EXTERNALSYM ALG_CLASS_SIGNATURE}
+ ALG_CLASS_MSG_ENCRYPT = 2 shl 13;
+ {$EXTERNALSYM ALG_CLASS_MSG_ENCRYPT}
+ ALG_CLASS_DATA_ENCRYPT = 3 shl 13;
+ {$EXTERNALSYM ALG_CLASS_DATA_ENCRYPT}
+ ALG_CLASS_HASH = 4 shl 13;
+ {$EXTERNALSYM ALG_CLASS_HASH}
+ ALG_CLASS_KEY_EXCHANGE = 5 shl 13;
+ {$EXTERNALSYM ALG_CLASS_KEY_EXCHANGE}
+ ALG_CLASS_ALL = 7 shl 13;
+ {$EXTERNALSYM ALG_CLASS_ALL}
+
+// Algorithm types
+
+ ALG_TYPE_ANY = 0;
+ {$EXTERNALSYM ALG_TYPE_ANY}
+ ALG_TYPE_DSS = 1 shl 9;
+ {$EXTERNALSYM ALG_TYPE_DSS}
+ ALG_TYPE_RSA = 2 shl 9;
+ {$EXTERNALSYM ALG_TYPE_RSA}
+ ALG_TYPE_BLOCK = 3 shl 9;
+ {$EXTERNALSYM ALG_TYPE_BLOCK}
+ ALG_TYPE_STREAM = 4 shl 9;
+ {$EXTERNALSYM ALG_TYPE_STREAM}
+ ALG_TYPE_DH = 5 shl 9;
+ {$EXTERNALSYM ALG_TYPE_DH}
+ ALG_TYPE_SECURECHANNEL = 6 shl 9;
+ {$EXTERNALSYM ALG_TYPE_SECURECHANNEL}
+
+// Generic sub-ids
+
+ ALG_SID_ANY = 0;
+ {$EXTERNALSYM ALG_SID_ANY}
+
+// Some RSA sub-ids
+
+ ALG_SID_RSA_ANY = 0;
+ {$EXTERNALSYM ALG_SID_RSA_ANY}
+ ALG_SID_RSA_PKCS = 1;
+ {$EXTERNALSYM ALG_SID_RSA_PKCS}
+ ALG_SID_RSA_MSATWORK = 2;
+ {$EXTERNALSYM ALG_SID_RSA_MSATWORK}
+ ALG_SID_RSA_ENTRUST = 3;
+ {$EXTERNALSYM ALG_SID_RSA_ENTRUST}
+ ALG_SID_RSA_PGP = 4;
+ {$EXTERNALSYM ALG_SID_RSA_PGP}
+
+// Some DSS sub-ids
+//
+
+ ALG_SID_DSS_ANY = 0;
+ {$EXTERNALSYM ALG_SID_DSS_ANY}
+ ALG_SID_DSS_PKCS = 1;
+ {$EXTERNALSYM ALG_SID_DSS_PKCS}
+ ALG_SID_DSS_DMS = 2;
+ {$EXTERNALSYM ALG_SID_DSS_DMS}
+
+// Block cipher sub ids
+// DES sub_ids
+
+ ALG_SID_DES = 1;
+ {$EXTERNALSYM ALG_SID_DES}
+ ALG_SID_3DES = 3;
+ {$EXTERNALSYM ALG_SID_3DES}
+ ALG_SID_DESX = 4;
+ {$EXTERNALSYM ALG_SID_DESX}
+ ALG_SID_IDEA = 5;
+ {$EXTERNALSYM ALG_SID_IDEA}
+ ALG_SID_CAST = 6;
+ {$EXTERNALSYM ALG_SID_CAST}
+ ALG_SID_SAFERSK64 = 7;
+ {$EXTERNALSYM ALG_SID_SAFERSK64}
+ ALG_SID_SAFERSK128 = 8;
+ {$EXTERNALSYM ALG_SID_SAFERSK128}
+ ALG_SID_3DES_112 = 9;
+ {$EXTERNALSYM ALG_SID_3DES_112}
+ ALG_SID_CYLINK_MEK = 12;
+ {$EXTERNALSYM ALG_SID_CYLINK_MEK}
+ ALG_SID_RC5 = 13;
+ {$EXTERNALSYM ALG_SID_RC5}
+
+// Fortezza sub-ids
+
+ ALG_SID_SKIPJACK = 10;
+ {$EXTERNALSYM ALG_SID_SKIPJACK}
+ ALG_SID_TEK = 11;
+ {$EXTERNALSYM ALG_SID_TEK}
+
+// KP_MODE
+
+ CRYPT_MODE_CBCI = 6; // ANSI CBC Interleaved
+ {$EXTERNALSYM CRYPT_MODE_CBCI}
+ CRYPT_MODE_CFBP = 7; // ANSI CFB Pipelined
+ {$EXTERNALSYM CRYPT_MODE_CFBP}
+ CRYPT_MODE_OFBP = 8; // ANSI OFB Pipelined
+ {$EXTERNALSYM CRYPT_MODE_OFBP}
+ CRYPT_MODE_CBCOFM = 9; // ANSI CBC + OF Masking
+ {$EXTERNALSYM CRYPT_MODE_CBCOFM}
+ CRYPT_MODE_CBCOFMI = 10; // ANSI CBC + OFM Interleaved
+ {$EXTERNALSYM CRYPT_MODE_CBCOFMI}
+
+// RC2 sub-ids
+
+ ALG_SID_RC2 = 2;
+ {$EXTERNALSYM ALG_SID_RC2}
+
+// Stream cipher sub-ids
+
+ ALG_SID_RC4 = 1;
+ {$EXTERNALSYM ALG_SID_RC4}
+ ALG_SID_SEAL = 2;
+ {$EXTERNALSYM ALG_SID_SEAL}
+
+// Diffie-Hellman sub-ids
+
+ ALG_SID_DH_SANDF = 1;
+ {$EXTERNALSYM ALG_SID_DH_SANDF}
+ ALG_SID_DH_EPHEM = 2;
+ {$EXTERNALSYM ALG_SID_DH_EPHEM}
+ ALG_SID_AGREED_KEY_ANY = 3;
+ {$EXTERNALSYM ALG_SID_AGREED_KEY_ANY}
+ ALG_SID_KEA = 4;
+ {$EXTERNALSYM ALG_SID_KEA}
+
+// Hash sub ids
+
+ ALG_SID_MD2 = 1;
+ {$EXTERNALSYM ALG_SID_MD2}
+ ALG_SID_MD4 = 2;
+ {$EXTERNALSYM ALG_SID_MD4}
+ ALG_SID_MD5 = 3;
+ {$EXTERNALSYM ALG_SID_MD5}
+ ALG_SID_SHA = 4;
+ {$EXTERNALSYM ALG_SID_SHA}
+ ALG_SID_SHA1 = 4;
+ {$EXTERNALSYM ALG_SID_SHA1}
+ ALG_SID_MAC = 5;
+ {$EXTERNALSYM ALG_SID_MAC}
+ ALG_SID_RIPEMD = 6;
+ {$EXTERNALSYM ALG_SID_RIPEMD}
+ ALG_SID_RIPEMD160 = 7;
+ {$EXTERNALSYM ALG_SID_RIPEMD160}
+ ALG_SID_SSL3SHAMD5 = 8;
+ {$EXTERNALSYM ALG_SID_SSL3SHAMD5}
+ ALG_SID_HMAC = 9;
+ {$EXTERNALSYM ALG_SID_HMAC}
+ ALG_SID_TLS1PRF = 10;
+ {$EXTERNALSYM ALG_SID_TLS1PRF}
+
+// secure channel sub ids
+
+ ALG_SID_SSL3_MASTER = 1;
+ {$EXTERNALSYM ALG_SID_SSL3_MASTER}
+ ALG_SID_SCHANNEL_MASTER_HASH = 2;
+ {$EXTERNALSYM ALG_SID_SCHANNEL_MASTER_HASH}
+ ALG_SID_SCHANNEL_MAC_KEY = 3;
+ {$EXTERNALSYM ALG_SID_SCHANNEL_MAC_KEY}
+ ALG_SID_PCT1_MASTER = 4;
+ {$EXTERNALSYM ALG_SID_PCT1_MASTER}
+ ALG_SID_SSL2_MASTER = 5;
+ {$EXTERNALSYM ALG_SID_SSL2_MASTER}
+ ALG_SID_TLS1_MASTER = 6;
+ {$EXTERNALSYM ALG_SID_TLS1_MASTER}
+ ALG_SID_SCHANNEL_ENC_KEY = 7;
+ {$EXTERNALSYM ALG_SID_SCHANNEL_ENC_KEY}
+
+// Our silly example sub-id
+
+ ALG_SID_EXAMPLE = 80;
+ {$EXTERNALSYM ALG_SID_EXAMPLE}
+
+type
+ ALG_ID = Cardinal;
+ {$EXTERNALSYM ALG_ID}
+
+// algorithm identifier definitions
+
+const
+ CALG_MD2 = ALG_CLASS_HASH or ALG_TYPE_ANY or ALG_SID_MD2;
+ {$EXTERNALSYM CALG_MD2}
+ CALG_MD4 = ALG_CLASS_HASH or ALG_TYPE_ANY or ALG_SID_MD4;
+ {$EXTERNALSYM CALG_MD4}
+ CALG_MD5 = ALG_CLASS_HASH or ALG_TYPE_ANY or ALG_SID_MD5;
+ {$EXTERNALSYM CALG_MD5}
+ CALG_SHA = ALG_CLASS_HASH or ALG_TYPE_ANY or ALG_SID_SHA;
+ {$EXTERNALSYM CALG_SHA}
+ CALG_SHA1 = ALG_CLASS_HASH or ALG_TYPE_ANY or ALG_SID_SHA1;
+ {$EXTERNALSYM CALG_SHA1}
+ CALG_MAC = ALG_CLASS_HASH or ALG_TYPE_ANY or ALG_SID_MAC;
+ {$EXTERNALSYM CALG_MAC}
+ CALG_RSA_SIGN = ALG_CLASS_SIGNATURE or ALG_TYPE_RSA or ALG_SID_RSA_ANY;
+ {$EXTERNALSYM CALG_RSA_SIGN}
+ CALG_DSS_SIGN = ALG_CLASS_SIGNATURE or ALG_TYPE_DSS or ALG_SID_DSS_ANY;
+ {$EXTERNALSYM CALG_DSS_SIGN}
+ CALG_RSA_KEYX = ALG_CLASS_KEY_EXCHANGE or ALG_TYPE_RSA or ALG_SID_RSA_ANY;
+ {$EXTERNALSYM CALG_RSA_KEYX}
+ CALG_DES = ALG_CLASS_DATA_ENCRYPT or ALG_TYPE_BLOCK or ALG_SID_DES;
+ {$EXTERNALSYM CALG_DES}
+ CALG_3DES_112 = ALG_CLASS_DATA_ENCRYPT or ALG_TYPE_BLOCK or ALG_SID_3DES_112;
+ {$EXTERNALSYM CALG_3DES_112}
+ CALG_3DES = ALG_CLASS_DATA_ENCRYPT or ALG_TYPE_BLOCK or ALG_SID_3DES;
+ {$EXTERNALSYM CALG_3DES}
+ CALG_DESX = ALG_CLASS_DATA_ENCRYPT or ALG_TYPE_BLOCK or ALG_SID_DESX;
+ {$EXTERNALSYM CALG_DESX}
+ CALG_RC2 = ALG_CLASS_DATA_ENCRYPT or ALG_TYPE_BLOCK or ALG_SID_RC2;
+ {$EXTERNALSYM CALG_RC2}
+ CALG_RC4 = ALG_CLASS_DATA_ENCRYPT or ALG_TYPE_STREAM or ALG_SID_RC4;
+ {$EXTERNALSYM CALG_RC4}
+ CALG_SEAL = ALG_CLASS_DATA_ENCRYPT or ALG_TYPE_STREAM or ALG_SID_SEAL;
+ {$EXTERNALSYM CALG_SEAL}
+ CALG_DH_SF = ALG_CLASS_KEY_EXCHANGE or ALG_TYPE_DH or ALG_SID_DH_SANDF;
+ {$EXTERNALSYM CALG_DH_SF}
+ CALG_DH_EPHEM = ALG_CLASS_KEY_EXCHANGE or ALG_TYPE_DH or ALG_SID_DH_EPHEM;
+ {$EXTERNALSYM CALG_DH_EPHEM}
+ CALG_AGREEDKEY_ANY = ALG_CLASS_KEY_EXCHANGE or ALG_TYPE_DH or ALG_SID_AGREED_KEY_ANY;
+ {$EXTERNALSYM CALG_AGREEDKEY_ANY}
+ CALG_KEA_KEYX = ALG_CLASS_KEY_EXCHANGE or ALG_TYPE_DH or ALG_SID_KEA;
+ {$EXTERNALSYM CALG_KEA_KEYX}
+ CALG_HUGHES_MD5 = ALG_CLASS_KEY_EXCHANGE or ALG_TYPE_ANY or ALG_SID_MD5;
+ {$EXTERNALSYM CALG_HUGHES_MD5}
+ CALG_SKIPJACK = ALG_CLASS_DATA_ENCRYPT or ALG_TYPE_BLOCK or ALG_SID_SKIPJACK;
+ {$EXTERNALSYM CALG_SKIPJACK}
+ CALG_TEK = ALG_CLASS_DATA_ENCRYPT or ALG_TYPE_BLOCK or ALG_SID_TEK;
+ {$EXTERNALSYM CALG_TEK}
+ CALG_CYLINK_MEK = ALG_CLASS_DATA_ENCRYPT or ALG_TYPE_BLOCK or ALG_SID_CYLINK_MEK;
+ {$EXTERNALSYM CALG_CYLINK_MEK}
+ CALG_SSL3_SHAMD5 = ALG_CLASS_HASH or ALG_TYPE_ANY or ALG_SID_SSL3SHAMD5;
+ {$EXTERNALSYM CALG_SSL3_SHAMD5}
+ CALG_SSL3_MASTER = ALG_CLASS_MSG_ENCRYPT or ALG_TYPE_SECURECHANNEL or ALG_SID_SSL3_MASTER;
+ {$EXTERNALSYM CALG_SSL3_MASTER}
+ CALG_SCHANNEL_MASTER_HASH = ALG_CLASS_MSG_ENCRYPT or ALG_TYPE_SECURECHANNEL or ALG_SID_SCHANNEL_MASTER_HASH;
+ {$EXTERNALSYM CALG_SCHANNEL_MASTER_HASH}
+ CALG_SCHANNEL_MAC_KEY = ALG_CLASS_MSG_ENCRYPT or ALG_TYPE_SECURECHANNEL or ALG_SID_SCHANNEL_MAC_KEY;
+ {$EXTERNALSYM CALG_SCHANNEL_MAC_KEY}
+ CALG_SCHANNEL_ENC_KEY = ALG_CLASS_MSG_ENCRYPT or ALG_TYPE_SECURECHANNEL or ALG_SID_SCHANNEL_ENC_KEY;
+ {$EXTERNALSYM CALG_SCHANNEL_ENC_KEY}
+ CALG_PCT1_MASTER = ALG_CLASS_MSG_ENCRYPT or ALG_TYPE_SECURECHANNEL or ALG_SID_PCT1_MASTER;
+ {$EXTERNALSYM CALG_PCT1_MASTER}
+ CALG_SSL2_MASTER = ALG_CLASS_MSG_ENCRYPT or ALG_TYPE_SECURECHANNEL or ALG_SID_SSL2_MASTER;
+ {$EXTERNALSYM CALG_SSL2_MASTER}
+ CALG_TLS1_MASTER = ALG_CLASS_MSG_ENCRYPT or ALG_TYPE_SECURECHANNEL or ALG_SID_TLS1_MASTER;
+ {$EXTERNALSYM CALG_TLS1_MASTER}
+ CALG_RC5 = ALG_CLASS_DATA_ENCRYPT or ALG_TYPE_BLOCK or ALG_SID_RC5;
+ {$EXTERNALSYM CALG_RC5}
+ CALG_HMAC = ALG_CLASS_HASH or ALG_TYPE_ANY or ALG_SID_HMAC;
+ {$EXTERNALSYM CALG_HMAC}
+ CALG_TLS1PRF = ALG_CLASS_HASH or ALG_TYPE_ANY or ALG_SID_TLS1PRF;
+ {$EXTERNALSYM CALG_TLS1PRF}
+
+// resource number for signatures in the CSP
+
+ SIGNATURE_RESOURCE_NUMBER = $29A;
+ {$EXTERNALSYM SIGNATURE_RESOURCE_NUMBER}
+
+type
+ PVTableProvStruc = ^VTableProvStruc;
+ _VTableProvStruc = record
+ Version: DWORD;
+ FuncVerifyImage: FARPROC;
+ FuncReturnhWnd: FARPROC;
+ dwProvType: DWORD;
+ pbContextInfo: LPBYTE;
+ cbContextInfo: DWORD;
+ pszProvName: LPSTR;
+ end;
+ {$EXTERNALSYM _VTableProvStruc}
+ VTableProvStruc = _VTableProvStruc;
+ {$EXTERNALSYM VTableProvStruc}
+ TVTableProvStruc = VTableProvStruc;
+
+ HCRYPTPROV = ULONG_PTR;
+ {$EXTERNALSYM HCRYPTPROV}
+ HCRYPTKEY = ULONG_PTR;
+ {$EXTERNALSYM HCRYPTKEY}
+ HCRYPTHASH = ULONG_PTR;
+ {$EXTERNALSYM HCRYPTHASH}
+
+ PHCRYPTPROV = ^HCRYPTPROV;
+ {$NODEFINE PHCRYPTPROV}
+ PHCRYPTKEY = ^HCRYPTKEY;
+ {$NODEFINE PHCRYPTKEY}
+ PHCRYPTHASH = ^HCRYPTHASH;
+ {$NODEFINE PHCRYPTHASH}
+
+// dwFlags definitions for CryptAcquireContext
+
+const
+ CRYPT_VERIFYCONTEXT = DWORD($F0000000);
+ {$EXTERNALSYM CRYPT_VERIFYCONTEXT}
+ CRYPT_NEWKEYSET = $00000008;
+ {$EXTERNALSYM CRYPT_NEWKEYSET}
+ CRYPT_DELETEKEYSET = $00000010;
+ {$EXTERNALSYM CRYPT_DELETEKEYSET}
+ CRYPT_MACHINE_KEYSET = $00000020;
+ {$EXTERNALSYM CRYPT_MACHINE_KEYSET}
+ CRYPT_SILENT = $00000040;
+ {$EXTERNALSYM CRYPT_SILENT}
+
+// dwFlag definitions for CryptGenKey
+
+ CRYPT_EXPORTABLE = $00000001;
+ {$EXTERNALSYM CRYPT_EXPORTABLE}
+ CRYPT_USER_PROTECTED = $00000002;
+ {$EXTERNALSYM CRYPT_USER_PROTECTED}
+ CRYPT_CREATE_SALT = $00000004;
+ {$EXTERNALSYM CRYPT_CREATE_SALT}
+ CRYPT_UPDATE_KEY = $00000008;
+ {$EXTERNALSYM CRYPT_UPDATE_KEY}
+ CRYPT_NO_SALT = $00000010;
+ {$EXTERNALSYM CRYPT_NO_SALT}
+ CRYPT_PREGEN = $00000040;
+ {$EXTERNALSYM CRYPT_PREGEN}
+ CRYPT_RECIPIENT = $00000010;
+ {$EXTERNALSYM CRYPT_RECIPIENT}
+ CRYPT_INITIATOR = $00000040;
+ {$EXTERNALSYM CRYPT_INITIATOR}
+ CRYPT_ONLINE = $00000080;
+ {$EXTERNALSYM CRYPT_ONLINE}
+ CRYPT_SF = $00000100;
+ {$EXTERNALSYM CRYPT_SF}
+ CRYPT_CREATE_IV = $00000200;
+ {$EXTERNALSYM CRYPT_CREATE_IV}
+ CRYPT_KEK = $00000400;
+ {$EXTERNALSYM CRYPT_KEK}
+ CRYPT_DATA_KEY = $00000800;
+ {$EXTERNALSYM CRYPT_DATA_KEY}
+ CRYPT_VOLATILE = $00001000;
+ {$EXTERNALSYM CRYPT_VOLATILE}
+ CRYPT_SGCKEY = $00002000;
+ {$EXTERNALSYM CRYPT_SGCKEY}
+
+ RSA1024BIT_KEY = $04000000;
+ {$EXTERNALSYM RSA1024BIT_KEY}
+
+// dwFlags definitions for CryptDeriveKey
+
+ CRYPT_SERVER = $00000400;
+ {$EXTERNALSYM CRYPT_SERVER}
+
+ KEY_LENGTH_MASK = DWORD($FFFF0000);
+ {$EXTERNALSYM KEY_LENGTH_MASK}
+
+// dwFlag definitions for CryptExportKey
+
+ CRYPT_Y_ONLY = $00000001;
+ {$EXTERNALSYM CRYPT_Y_ONLY}
+ CRYPT_SSL2_FALLBACK = $00000002;
+ {$EXTERNALSYM CRYPT_SSL2_FALLBACK}
+ CRYPT_DESTROYKEY = $00000004;
+ {$EXTERNALSYM CRYPT_DESTROYKEY}
+ CRYPT_OAEP = $00000040; // used with RSA encryptions/decryptions
+ // CryptExportKey, CryptImportKey,
+ // CryptEncrypt and CryptDecrypt
+ {$EXTERNALSYM CRYPT_OAEP}
+
+ CRYPT_BLOB_VER3 = $00000080; // export version 3 of a blob type
+ {$EXTERNALSYM CRYPT_BLOB_VER3}
+
+// dwFlags definitions for CryptCreateHash
+
+ CRYPT_SECRETDIGEST = $00000001;
+ {$EXTERNALSYM CRYPT_SECRETDIGEST}
+
+// dwFlags definitions for CryptHashSessionKey
+
+ CRYPT_LITTLE_ENDIAN = $00000001;
+ {$EXTERNALSYM CRYPT_LITTLE_ENDIAN}
+
+// dwFlags definitions for CryptSignHash and CryptVerifySignature
+
+ CRYPT_NOHASHOID = $00000001;
+ {$EXTERNALSYM CRYPT_NOHASHOID}
+ CRYPT_TYPE2_FORMAT = $00000002;
+ {$EXTERNALSYM CRYPT_TYPE2_FORMAT}
+ CRYPT_X931_FORMAT = $00000004;
+ {$EXTERNALSYM CRYPT_X931_FORMAT}
+
+// dwFlag definitions for CryptSetProviderEx and CryptGetDefaultProvider
+
+ CRYPT_MACHINE_DEFAULT = $00000001;
+ {$EXTERNALSYM CRYPT_MACHINE_DEFAULT}
+ CRYPT_USER_DEFAULT = $00000002;
+ {$EXTERNALSYM CRYPT_USER_DEFAULT}
+ CRYPT_DELETE_DEFAULT = $00000004;
+ {$EXTERNALSYM CRYPT_DELETE_DEFAULT}
+
+// exported key blob definitions
+
+ SIMPLEBLOB = $1;
+ {$EXTERNALSYM SIMPLEBLOB}
+ PUBLICKEYBLOB = $6;
+ {$EXTERNALSYM PUBLICKEYBLOB}
+ PRIVATEKEYBLOB = $7;
+ {$EXTERNALSYM PRIVATEKEYBLOB}
+ PLAINTEXTKEYBLOB = $8;
+ {$EXTERNALSYM PLAINTEXTKEYBLOB}
+ OPAQUEKEYBLOB = $9;
+ {$EXTERNALSYM OPAQUEKEYBLOB}
+ PUBLICKEYBLOBEX = $A;
+ {$EXTERNALSYM PUBLICKEYBLOBEX}
+ SYMMETRICWRAPKEYBLOB = $B;
+ {$EXTERNALSYM SYMMETRICWRAPKEYBLOB}
+
+ AT_KEYEXCHANGE = 1;
+ {$EXTERNALSYM AT_KEYEXCHANGE}
+ AT_SIGNATURE = 2;
+ {$EXTERNALSYM AT_SIGNATURE}
+
+ CRYPT_USERDATA = 1;
+ {$EXTERNALSYM CRYPT_USERDATA}
+
+// dwParam
+
+ KP_IV = 1; // Initialization vector
+ {$EXTERNALSYM KP_IV}
+ KP_SALT = 2; // Salt value
+ {$EXTERNALSYM KP_SALT}
+ KP_PADDING = 3; // Padding values
+ {$EXTERNALSYM KP_PADDING}
+ KP_MODE = 4; // Mode of the cipher
+ {$EXTERNALSYM KP_MODE}
+ KP_MODE_BITS = 5; // Number of bits to feedback
+ {$EXTERNALSYM KP_MODE_BITS}
+ KP_PERMISSIONS = 6; // Key permissions DWORD
+ {$EXTERNALSYM KP_PERMISSIONS}
+ KP_ALGID = 7; // Key algorithm
+ {$EXTERNALSYM KP_ALGID}
+ KP_BLOCKLEN = 8; // Block size of the cipher
+ {$EXTERNALSYM KP_BLOCKLEN}
+ KP_KEYLEN = 9; // Length of key in bits
+ {$EXTERNALSYM KP_KEYLEN}
+ KP_SALT_EX = 10; // Length of salt in bytes
+ {$EXTERNALSYM KP_SALT_EX}
+ KP_P = 11; // DSS/Diffie-Hellman P value
+ {$EXTERNALSYM KP_P}
+ KP_G = 12; // DSS/Diffie-Hellman G value
+ {$EXTERNALSYM KP_G}
+ KP_Q = 13; // DSS Q value
+ {$EXTERNALSYM KP_Q}
+ KP_X = 14; // Diffie-Hellman X value
+ {$EXTERNALSYM KP_X}
+ KP_Y = 15; // Y value
+ {$EXTERNALSYM KP_Y}
+ KP_RA = 16; // Fortezza RA value
+ {$EXTERNALSYM KP_RA}
+ KP_RB = 17; // Fortezza RB value
+ {$EXTERNALSYM KP_RB}
+ KP_INFO = 18; // for putting information into an RSA envelope
+ {$EXTERNALSYM KP_INFO}
+ KP_EFFECTIVE_KEYLEN = 19; // setting and getting RC2 effective key length
+ {$EXTERNALSYM KP_EFFECTIVE_KEYLEN}
+ KP_SCHANNEL_ALG = 20; // for setting the Secure Channel algorithms
+ {$EXTERNALSYM KP_SCHANNEL_ALG}
+ KP_CLIENT_RANDOM = 21; // for setting the Secure Channel client random data
+ {$EXTERNALSYM KP_CLIENT_RANDOM}
+ KP_SERVER_RANDOM = 22; // for setting the Secure Channel server random data
+ {$EXTERNALSYM KP_SERVER_RANDOM}
+ KP_RP = 23;
+ {$EXTERNALSYM KP_RP}
+ KP_PRECOMP_MD5 = 24;
+ {$EXTERNALSYM KP_PRECOMP_MD5}
+ KP_PRECOMP_SHA = 25;
+ {$EXTERNALSYM KP_PRECOMP_SHA}
+ KP_CERTIFICATE = 26; // for setting Secure Channel certificate data (PCT1)
+ {$EXTERNALSYM KP_CERTIFICATE}
+ KP_CLEAR_KEY = 27; // for setting Secure Channel clear key data (PCT1)
+ {$EXTERNALSYM KP_CLEAR_KEY}
+ KP_PUB_EX_LEN = 28;
+ {$EXTERNALSYM KP_PUB_EX_LEN}
+ KP_PUB_EX_VAL = 29;
+ {$EXTERNALSYM KP_PUB_EX_VAL}
+ KP_KEYVAL = 30;
+ {$EXTERNALSYM KP_KEYVAL}
+ KP_ADMIN_PIN = 31;
+ {$EXTERNALSYM KP_ADMIN_PIN}
+ KP_KEYEXCHANGE_PIN = 32;
+ {$EXTERNALSYM KP_KEYEXCHANGE_PIN}
+ KP_SIGNATURE_PIN = 33;
+ {$EXTERNALSYM KP_SIGNATURE_PIN}
+ KP_PREHASH = 34;
+ {$EXTERNALSYM KP_PREHASH}
+
+ KP_OAEP_PARAMS = 36; // for setting OAEP params on RSA keys
+ {$EXTERNALSYM KP_OAEP_PARAMS}
+ KP_CMS_KEY_INFO = 37;
+ {$EXTERNALSYM KP_CMS_KEY_INFO}
+ KP_CMS_DH_KEY_INFO = 38;
+ {$EXTERNALSYM KP_CMS_DH_KEY_INFO}
+ KP_PUB_PARAMS = 39; // for setting public parameters
+ {$EXTERNALSYM KP_PUB_PARAMS}
+ KP_VERIFY_PARAMS = 40; // for verifying DSA and DH parameters
+ {$EXTERNALSYM KP_VERIFY_PARAMS}
+ KP_HIGHEST_VERSION = 41; // for TLS protocol version setting
+ {$EXTERNALSYM KP_HIGHEST_VERSION}
+
+// KP_PADDING
+
+ PKCS5_PADDING = 1; // PKCS 5 (sec 6.2) padding method
+ {$EXTERNALSYM PKCS5_PADDING}
+ RANDOM_PADDING = 2;
+ {$EXTERNALSYM RANDOM_PADDING}
+ ZERO_PADDING = 3;
+ {$EXTERNALSYM ZERO_PADDING}
+
+// KP_MODE
+
+ CRYPT_MODE_CBC = 1; // Cipher block chaining
+ {$EXTERNALSYM CRYPT_MODE_CBC}
+ CRYPT_MODE_ECB = 2; // Electronic code book
+ {$EXTERNALSYM CRYPT_MODE_ECB}
+ CRYPT_MODE_OFB = 3; // Output feedback mode
+ {$EXTERNALSYM CRYPT_MODE_OFB}
+ CRYPT_MODE_CFB = 4; // Cipher feedback mode
+ {$EXTERNALSYM CRYPT_MODE_CFB}
+ CRYPT_MODE_CTS = 5; // Ciphertext stealing mode
+ {$EXTERNALSYM CRYPT_MODE_CTS}
+
+// KP_PERMISSIONS
+
+ CRYPT_ENCRYPT = $0001; // Allow encryption
+ {$EXTERNALSYM CRYPT_ENCRYPT}
+ CRYPT_DECRYPT = $0002; // Allow decryption
+ {$EXTERNALSYM CRYPT_DECRYPT}
+ CRYPT_EXPORT = $0004; // Allow key to be exported
+ {$EXTERNALSYM CRYPT_EXPORT}
+ CRYPT_READ = $0008; // Allow parameters to be read
+ {$EXTERNALSYM CRYPT_READ}
+ CRYPT_WRITE = $0010; // Allow parameters to be set
+ {$EXTERNALSYM CRYPT_WRITE}
+ CRYPT_MAC = $0020; // Allow MACs to be used with key
+ {$EXTERNALSYM CRYPT_MAC}
+ CRYPT_EXPORT_KEY = $0040; // Allow key to be used for exporting keys
+ {$EXTERNALSYM CRYPT_EXPORT_KEY}
+ CRYPT_IMPORT_KEY = $0080; // Allow key to be used for importing keys
+ {$EXTERNALSYM CRYPT_IMPORT_KEY}
+
+ HP_ALGID = $0001; // Hash algorithm
+ {$EXTERNALSYM HP_ALGID}
+ HP_HASHVAL = $0002; // Hash value
+ {$EXTERNALSYM HP_HASHVAL}
+ HP_HASHSIZE = $0004; // Hash value size
+ {$EXTERNALSYM HP_HASHSIZE}
+ HP_HMAC_INFO = $0005; // information for creating an HMAC
+ {$EXTERNALSYM HP_HMAC_INFO}
+ HP_TLS1PRF_LABEL = $0006; // label for TLS1 PRF
+ {$EXTERNALSYM HP_TLS1PRF_LABEL}
+ HP_TLS1PRF_SEED = $0007; // seed for TLS1 PRF
+ {$EXTERNALSYM HP_TLS1PRF_SEED}
+
+ CRYPT_FAILED = FALSE;
+ {$EXTERNALSYM CRYPT_FAILED}
+ CRYPT_SUCCEED = TRUE;
+ {$EXTERNALSYM CRYPT_SUCCEED}
+
+function RCRYPT_SUCCEEDED(rt: BOOL): BOOL;
+{$EXTERNALSYM RCRYPT_SUCCEEDED}
+
+function RCRYPT_FAILED(rt: BOOL): BOOL;
+{$EXTERNALSYM RCRYPT_FAILED}
+
+//
+// CryptGetProvParam
+//
+
+const
+ PP_ENUMALGS = 1;
+ {$EXTERNALSYM PP_ENUMALGS}
+ PP_ENUMCONTAINERS = 2;
+ {$EXTERNALSYM PP_ENUMCONTAINERS}
+ PP_IMPTYPE = 3;
+ {$EXTERNALSYM PP_IMPTYPE}
+ PP_NAME = 4;
+ {$EXTERNALSYM PP_NAME}
+ PP_VERSION = 5;
+ {$EXTERNALSYM PP_VERSION}
+ PP_CONTAINER = 6;
+ {$EXTERNALSYM PP_CONTAINER}
+ PP_CHANGE_PASSWORD = 7;
+ {$EXTERNALSYM PP_CHANGE_PASSWORD}
+ PP_KEYSET_SEC_DESCR = 8; // get/set security descriptor of keyset
+ {$EXTERNALSYM PP_KEYSET_SEC_DESCR}
+ PP_CERTCHAIN = 9; // for retrieving certificates from tokens
+ {$EXTERNALSYM PP_CERTCHAIN}
+ PP_KEY_TYPE_SUBTYPE = 10;
+ {$EXTERNALSYM PP_KEY_TYPE_SUBTYPE}
+ PP_PROVTYPE = 16;
+ {$EXTERNALSYM PP_PROVTYPE}
+ PP_KEYSTORAGE = 17;
+ {$EXTERNALSYM PP_KEYSTORAGE}
+ PP_APPLI_CERT = 18;
+ {$EXTERNALSYM PP_APPLI_CERT}
+ PP_SYM_KEYSIZE = 19;
+ {$EXTERNALSYM PP_SYM_KEYSIZE}
+ PP_SESSION_KEYSIZE = 20;
+ {$EXTERNALSYM PP_SESSION_KEYSIZE}
+ PP_UI_PROMPT = 21;
+ {$EXTERNALSYM PP_UI_PROMPT}
+ PP_ENUMALGS_EX = 22;
+ {$EXTERNALSYM PP_ENUMALGS_EX}
+ PP_ENUMMANDROOTS = 25;
+ {$EXTERNALSYM PP_ENUMMANDROOTS}
+ PP_ENUMELECTROOTS = 26;
+ {$EXTERNALSYM PP_ENUMELECTROOTS}
+ PP_KEYSET_TYPE = 27;
+ {$EXTERNALSYM PP_KEYSET_TYPE}
+ PP_ADMIN_PIN = 31;
+ {$EXTERNALSYM PP_ADMIN_PIN}
+ PP_KEYEXCHANGE_PIN = 32;
+ {$EXTERNALSYM PP_KEYEXCHANGE_PIN}
+ PP_SIGNATURE_PIN = 33;
+ {$EXTERNALSYM PP_SIGNATURE_PIN}
+ PP_SIG_KEYSIZE_INC = 34;
+ {$EXTERNALSYM PP_SIG_KEYSIZE_INC}
+ PP_KEYX_KEYSIZE_INC = 35;
+ {$EXTERNALSYM PP_KEYX_KEYSIZE_INC}
+ PP_UNIQUE_CONTAINER = 36;
+ {$EXTERNALSYM PP_UNIQUE_CONTAINER}
+ PP_SGC_INFO = 37;
+ {$EXTERNALSYM PP_SGC_INFO}
+ PP_USE_HARDWARE_RNG = 38;
+ {$EXTERNALSYM PP_USE_HARDWARE_RNG}
+ PP_KEYSPEC = 39;
+ {$EXTERNALSYM PP_KEYSPEC}
+ PP_ENUMEX_SIGNING_PROT = 40;
+ {$EXTERNALSYM PP_ENUMEX_SIGNING_PROT}
+
+ CRYPT_FIRST = 1;
+ {$EXTERNALSYM CRYPT_FIRST}
+ CRYPT_NEXT = 2;
+ {$EXTERNALSYM CRYPT_NEXT}
+ CRYPT_SGC_ENUM = 4;
+ {$EXTERNALSYM CRYPT_SGC_ENUM}
+
+ CRYPT_IMPL_HARDWARE = 1;
+ {$EXTERNALSYM CRYPT_IMPL_HARDWARE}
+ CRYPT_IMPL_SOFTWARE = 2;
+ {$EXTERNALSYM CRYPT_IMPL_SOFTWARE}
+ CRYPT_IMPL_MIXED = 3;
+ {$EXTERNALSYM CRYPT_IMPL_MIXED}
+ CRYPT_IMPL_UNKNOWN = 4;
+ {$EXTERNALSYM CRYPT_IMPL_UNKNOWN}
+ CRYPT_IMPL_REMOVABLE = 8;
+ {$EXTERNALSYM CRYPT_IMPL_REMOVABLE}
+
+// key storage flags
+
+ CRYPT_SEC_DESCR = $00000001;
+ {$EXTERNALSYM CRYPT_SEC_DESCR}
+ CRYPT_PSTORE = $00000002;
+ {$EXTERNALSYM CRYPT_PSTORE}
+ CRYPT_UI_PROMPT = $00000004;
+ {$EXTERNALSYM CRYPT_UI_PROMPT}
+
+// protocol flags
+
+ CRYPT_FLAG_PCT1 = $0001;
+ {$EXTERNALSYM CRYPT_FLAG_PCT1}
+ CRYPT_FLAG_SSL2 = $0002;
+ {$EXTERNALSYM CRYPT_FLAG_SSL2}
+ CRYPT_FLAG_SSL3 = $0004;
+ {$EXTERNALSYM CRYPT_FLAG_SSL3}
+ CRYPT_FLAG_TLS1 = $0008;
+ {$EXTERNALSYM CRYPT_FLAG_TLS1}
+ CRYPT_FLAG_IPSEC = $0010;
+ {$EXTERNALSYM CRYPT_FLAG_IPSEC}
+ CRYPT_FLAG_SIGNING = $0020;
+ {$EXTERNALSYM CRYPT_FLAG_SIGNING}
+
+// SGC flags
+
+ CRYPT_SGC = $0001;
+ {$EXTERNALSYM CRYPT_SGC}
+ CRYPT_FASTSGC = $0002;
+ {$EXTERNALSYM CRYPT_FASTSGC}
+
+//
+// CryptSetProvParam
+//
+
+ PP_CLIENT_HWND = 1;
+ {$EXTERNALSYM PP_CLIENT_HWND}
+ PP_CONTEXT_INFO = 11;
+ {$EXTERNALSYM PP_CONTEXT_INFO}
+ PP_KEYEXCHANGE_KEYSIZE = 12;
+ {$EXTERNALSYM PP_KEYEXCHANGE_KEYSIZE}
+ PP_SIGNATURE_KEYSIZE = 13;
+ {$EXTERNALSYM PP_SIGNATURE_KEYSIZE}
+ PP_KEYEXCHANGE_ALG = 14;
+ {$EXTERNALSYM PP_KEYEXCHANGE_ALG}
+ PP_SIGNATURE_ALG = 15;
+ {$EXTERNALSYM PP_SIGNATURE_ALG}
+ PP_DELETEKEY = 24;
+ {$EXTERNALSYM PP_DELETEKEY}
+
+ PROV_RSA_FULL = 1;
+ {$EXTERNALSYM PROV_RSA_FULL}
+ PROV_RSA_SIG = 2;
+ {$EXTERNALSYM PROV_RSA_SIG}
+ PROV_DSS = 3;
+ {$EXTERNALSYM PROV_DSS}
+ PROV_FORTEZZA = 4;
+ {$EXTERNALSYM PROV_FORTEZZA}
+ PROV_MS_EXCHANGE = 5;
+ {$EXTERNALSYM PROV_MS_EXCHANGE}
+ PROV_SSL = 6;
+ {$EXTERNALSYM PROV_SSL}
+ PROV_RSA_SCHANNEL = 12;
+ {$EXTERNALSYM PROV_RSA_SCHANNEL}
+ PROV_DSS_DH = 13;
+ {$EXTERNALSYM PROV_DSS_DH}
+ PROV_EC_ECDSA_SIG = 14;
+ {$EXTERNALSYM PROV_EC_ECDSA_SIG}
+ PROV_EC_ECNRA_SIG = 15;
+ {$EXTERNALSYM PROV_EC_ECNRA_SIG}
+ PROV_EC_ECDSA_FULL = 16;
+ {$EXTERNALSYM PROV_EC_ECDSA_FULL}
+ PROV_EC_ECNRA_FULL = 17;
+ {$EXTERNALSYM PROV_EC_ECNRA_FULL}
+ PROV_DH_SCHANNEL = 18;
+ {$EXTERNALSYM PROV_DH_SCHANNEL}
+ PROV_SPYRUS_LYNKS = 20;
+ {$EXTERNALSYM PROV_SPYRUS_LYNKS}
+ PROV_RNG = 21;
+ {$EXTERNALSYM PROV_RNG}
+ PROV_INTEL_SEC = 22;
+ {$EXTERNALSYM PROV_INTEL_SEC}
+
+//
+// STT defined Providers
+//
+
+ PROV_STT_MER = 7;
+ {$EXTERNALSYM PROV_STT_MER}
+ PROV_STT_ACQ = 8;
+ {$EXTERNALSYM PROV_STT_ACQ}
+ PROV_STT_BRND = 9;
+ {$EXTERNALSYM PROV_STT_BRND}
+ PROV_STT_ROOT = 10;
+ {$EXTERNALSYM PROV_STT_ROOT}
+ PROV_STT_ISS = 11;
+ {$EXTERNALSYM PROV_STT_ISS}
+
+//
+// Provider friendly names
+//
+
+ MS_DEF_PROV_A = 'Microsoft Base Cryptographic Provider v1.0';
+ {$EXTERNALSYM MS_DEF_PROV_A}
+ MS_DEF_PROV_W = 'Microsoft Base Cryptographic Provider v1.0';
+ {$EXTERNALSYM MS_DEF_PROV_W}
+
+ {$IFDEF UNICODE}
+ MS_DEF_PROV = MS_DEF_PROV_W;
+ {$EXTERNALSYM MS_DEF_PROV}
+ {$ELSE}
+ MS_DEF_PROV = MS_DEF_PROV_A;
+ {$EXTERNALSYM MS_DEF_PROV}
+ {$ENDIF UNICODE}
+
+ MS_ENHANCED_PROV_A = 'Microsoft Enhanced Cryptographic Provider v1.0';
+ {$EXTERNALSYM MS_ENHANCED_PROV_A}
+ MS_ENHANCED_PROV_W = 'Microsoft Enhanced Cryptographic Provider v1.0';
+ {$EXTERNALSYM MS_ENHANCED_PROV_W}
+ {$IFDEF UNICODE}
+ MS_ENHANCED_PROV = MS_ENHANCED_PROV_W;
+ {$EXTERNALSYM MS_ENHANCED_PROV}
+ {$ELSE}
+ MS_ENHANCED_PROV = MS_ENHANCED_PROV_A;
+ {$EXTERNALSYM MS_ENHANCED_PROV}
+ {$ENDIF UNICODE}
+
+ MS_STRONG_PROV_A = 'Microsoft Strong Cryptographic Provider';
+ {$EXTERNALSYM MS_STRONG_PROV_A}
+ MS_STRONG_PROV_W = 'Microsoft Strong Cryptographic Provider';
+ {$EXTERNALSYM MS_STRONG_PROV_W}
+ {$IFDEF UNICODE}
+ MS_STRONG_PROV = MS_STRONG_PROV_W;
+ {$EXTERNALSYM MS_STRONG_PROV}
+ {$ELSE}
+ MS_STRONG_PROV = MS_STRONG_PROV_A;
+ {$EXTERNALSYM MS_STRONG_PROV}
+ {$ENDIF UNICODE}
+
+ MS_DEF_RSA_SIG_PROV_A = 'Microsoft RSA Signature Cryptographic Provider';
+ {$EXTERNALSYM MS_DEF_RSA_SIG_PROV_A}
+ MS_DEF_RSA_SIG_PROV_W = 'Microsoft RSA Signature Cryptographic Provider';
+ {$EXTERNALSYM MS_DEF_RSA_SIG_PROV_W}
+ {$IFDEF UNICODE}
+ MS_DEF_RSA_SIG_PROV = MS_DEF_RSA_SIG_PROV_W;
+ {$EXTERNALSYM MS_DEF_RSA_SIG_PROV}
+ {$ELSE}
+ MS_DEF_RSA_SIG_PROV = MS_DEF_RSA_SIG_PROV_A;
+ {$EXTERNALSYM MS_DEF_RSA_SIG_PROV}
+ {$ENDIF UNICODE}
+
+ MS_DEF_RSA_SCHANNEL_PROV_A = 'Microsoft RSA SChannel Cryptographic Provider';
+ {$EXTERNALSYM MS_DEF_RSA_SCHANNEL_PROV_A}
+ MS_DEF_RSA_SCHANNEL_PROV_W = 'Microsoft RSA SChannel Cryptographic Provider';
+ {$EXTERNALSYM MS_DEF_RSA_SCHANNEL_PROV_W}
+ {$IFDEF UNICODE}
+ MS_DEF_RSA_SCHANNEL_PROV = MS_DEF_RSA_SCHANNEL_PROV_W;
+ {$EXTERNALSYM MS_DEF_RSA_SCHANNEL_PROV}
+ {$ELSE}
+ MS_DEF_RSA_SCHANNEL_PROV = MS_DEF_RSA_SCHANNEL_PROV_A;
+ {$EXTERNALSYM MS_DEF_RSA_SCHANNEL_PROV}
+ {$ENDIF UNICODE}
+
+ MS_DEF_DSS_PROV_A = 'Microsoft Base DSS Cryptographic Provider';
+ {$EXTERNALSYM MS_DEF_DSS_PROV_A}
+ MS_DEF_DSS_PROV_W = 'Microsoft Base DSS Cryptographic Provider';
+ {$EXTERNALSYM MS_DEF_DSS_PROV_W}
+ {$IFDEF UNICODE}
+ MS_DEF_DSS_PROV = MS_DEF_DSS_PROV_W;
+ {$EXTERNALSYM MS_DEF_DSS_PROV}
+ {$ELSE}
+ MS_DEF_DSS_PROV = MS_DEF_DSS_PROV_A;
+ {$EXTERNALSYM MS_DEF_DSS_PROV}
+ {$ENDIF UNICODE}
+
+ MS_DEF_DSS_DH_PROV_A = 'Microsoft Base DSS and Diffie-Hellman Cryptographic Provider';
+ {$EXTERNALSYM MS_DEF_DSS_DH_PROV_A}
+ MS_DEF_DSS_DH_PROV_W = 'Microsoft Base DSS and Diffie-Hellman Cryptographic Provider';
+ {$EXTERNALSYM MS_DEF_DSS_DH_PROV_W}
+ {$IFDEF UNICODE}
+ MS_DEF_DSS_DH_PROV = MS_DEF_DSS_DH_PROV_W;
+ {$EXTERNALSYM MS_DEF_DSS_DH_PROV}
+ {$ELSE}
+ MS_DEF_DSS_DH_PROV = MS_DEF_DSS_DH_PROV_A;
+ {$EXTERNALSYM MS_DEF_DSS_DH_PROV}
+ {$ENDIF UNICODE}
+
+ MS_ENH_DSS_DH_PROV_A = 'Microsoft Enhanced DSS and Diffie-Hellman Cryptographic Provider';
+ {$EXTERNALSYM MS_ENH_DSS_DH_PROV_A}
+ MS_ENH_DSS_DH_PROV_W = 'Microsoft Enhanced DSS and Diffie-Hellman Cryptographic Provider';
+ {$EXTERNALSYM MS_ENH_DSS_DH_PROV_W}
+ {$IFDEF UNICODE}
+ MS_ENH_DSS_DH_PROV = MS_ENH_DSS_DH_PROV_W;
+ {$EXTERNALSYM MS_ENH_DSS_DH_PROV}
+ {$ELSE}
+ MS_ENH_DSS_DH_PROV = MS_ENH_DSS_DH_PROV_A;
+ {$EXTERNALSYM MS_ENH_DSS_DH_PROV}
+ {$ENDIF UNICODE}
+
+ MS_DEF_DH_SCHANNEL_PROV_A = 'Microsoft DH SChannel Cryptographic Provider';
+ {$EXTERNALSYM MS_DEF_DH_SCHANNEL_PROV_A}
+ MS_DEF_DH_SCHANNEL_PROV_W = 'Microsoft DH SChannel Cryptographic Provider';
+ {$EXTERNALSYM MS_DEF_DH_SCHANNEL_PROV_W}
+ {$IFDEF UNICODE}
+ MS_DEF_DH_SCHANNEL_PROV = MS_DEF_DH_SCHANNEL_PROV_W;
+ {$EXTERNALSYM MS_DEF_DH_SCHANNEL_PROV}
+ {$ELSE}
+ MS_DEF_DH_SCHANNEL_PROV = MS_DEF_DH_SCHANNEL_PROV_A;
+ {$EXTERNALSYM MS_DEF_DH_SCHANNEL_PROV}
+ {$ENDIF UNICODE}
+
+ MS_SCARD_PROV_A = 'Microsoft Base Smart Card Crypto Provider';
+ {$EXTERNALSYM MS_SCARD_PROV_A}
+ MS_SCARD_PROV_W = 'Microsoft Base Smart Card Crypto Provider';
+ {$EXTERNALSYM MS_SCARD_PROV_W}
+ {$IFDEF UNICODE}
+ MS_SCARD_PROV = MS_SCARD_PROV_W;
+ {$EXTERNALSYM MS_SCARD_PROV}
+ {$ELSE}
+ MS_SCARD_PROV = MS_SCARD_PROV_A;
+ {$EXTERNALSYM MS_SCARD_PROV}
+ {$ENDIF UNICODE}
+
+ MAXUIDLEN = 64;
+ {$EXTERNALSYM MAXUIDLEN}
+
+// Exponentiation Offload Reg Location
+
+ EXPO_OFFLOAD_REG_VALUE = 'ExpoOffload';
+ {$EXTERNALSYM EXPO_OFFLOAD_REG_VALUE}
+ EXPO_OFFLOAD_FUNC_NAME = 'OffloadModExpo';
+ {$EXTERNALSYM EXPO_OFFLOAD_FUNC_NAME}
+
+ CUR_BLOB_VERSION = 2;
+ {$EXTERNALSYM CUR_BLOB_VERSION}
+
+// structure for use with CryptSetKeyParam for CMS keys
+// DO NOT USE THIS STRUCTURE!!!!!
+
+type
+ PCMS_KEY_INFO = ^CMS_KEY_INFO;
+ {$EXTERNALSYM PCMS_KEY_INFO}
+ _CMS_KEY_INFO = record
+ dwVersion: DWORD; // sizeof(CMS_KEY_INFO)
+ Algid: ALG_ID; // algorithmm id for the key to be converted
+ pbOID: LPBYTE; // pointer to OID to hash in with Z
+ cbOID: DWORD; // length of OID to hash in with Z
+ end;
+ {$EXTERNALSYM _CMS_KEY_INFO}
+ CMS_KEY_INFO = _CMS_KEY_INFO;
+ {$EXTERNALSYM CMS_KEY_INFO}
+ TCmsKeyInfo = CMS_KEY_INFO;
+ PCmsKeyInfo = PCMS_KEY_INFO;
+
+// structure for use with CryptSetHashParam with CALG_HMAC
+
+ PHMAC_Info = ^HMAC_Info;
+ {$EXTERNALSYM PHMAC_Info}
+ _HMAC_Info = record
+ HashAlgid: ALG_ID;
+ pbInnerString: LPBYTE;
+ cbInnerString: DWORD;
+ pbOuterString: LPBYTE;
+ cbOuterString: DWORD;
+ end;
+ {$EXTERNALSYM _HMAC_Info}
+ HMAC_Info = _HMAC_Info;
+ {$EXTERNALSYM HMAC_Info}
+ THMacInfo = HMAC_Info;
+ PHMacInfo = PHMAC_Info;
+
+// structure for use with CryptSetKeyParam with KP_SCHANNEL_ALG
+
+ PSCHANNEL_ALG = ^SCHANNEL_ALG;
+ {$EXTERNALSYM PSCHANNEL_ALG}
+ _SCHANNEL_ALG = record
+ dwUse: DWORD;
+ Algid: ALG_ID;
+ cBits: DWORD;
+ dwFlags: DWORD;
+ dwReserved: DWORD;
+ end;
+ {$EXTERNALSYM _SCHANNEL_ALG}
+ SCHANNEL_ALG = _SCHANNEL_ALG;
+ {$EXTERNALSYM SCHANNEL_ALG}
+ TSChannelAlg = SCHANNEL_ALG;
+ PSChannelAlg = PSCHANNEL_ALG;
+
+// uses of algortihms for SCHANNEL_ALG structure
+
+const
+ SCHANNEL_MAC_KEY = $00000000;
+ {$EXTERNALSYM SCHANNEL_MAC_KEY}
+ SCHANNEL_ENC_KEY = $00000001;
+ {$EXTERNALSYM SCHANNEL_ENC_KEY}
+
+// uses of dwFlags SCHANNEL_ALG structure
+
+ INTERNATIONAL_USAGE = $00000001;
+ {$EXTERNALSYM INTERNATIONAL_USAGE}
+
+type
+ PPROV_ENUMALGS = ^PROV_ENUMALGS;
+ {$NODEFINE PPROV_ENUMALGS}
+ _PROV_ENUMALGS = record
+ aiAlgid: ALG_ID;
+ dwBitLen: DWORD;
+ dwNameLen: DWORD;
+ szName: array [0..19] of CHAR;
+ end;
+ {$EXTERNALSYM _PROV_ENUMALGS}
+ PROV_ENUMALGS = _PROV_ENUMALGS;
+ {$EXTERNALSYM PROV_ENUMALGS}
+ TProvEnumAlgs = PROV_ENUMALGS;
+ PProvEnumAlgs = PPROV_ENUMALGS;
+
+ PPROV_ENUMALGS_EX = ^PROV_ENUMALGS_EX;
+ {$NODEFINE PPROV_ENUMALGS_EX}
+ _PROV_ENUMALGS_EX = record
+ aiAlgid: ALG_ID;
+ dwDefaultLen: DWORD;
+ dwMinLen: DWORD;
+ dwMaxLen: DWORD;
+ dwProtocols: DWORD;
+ dwNameLen: DWORD;
+ szName: array [0..19] of CHAR;
+ dwLongNameLen: DWORD;
+ szLongName: array [0..39] of CHAR;
+ end;
+ {$EXTERNALSYM _PROV_ENUMALGS_EX}
+ PROV_ENUMALGS_EX = _PROV_ENUMALGS_EX;
+ {$EXTERNALSYM PROV_ENUMALGS_EX}
+ TProvEnumAlgsEx = PROV_ENUMALGS_EX;
+ PProvEnumAlgsEx = PPROV_ENUMALGS_EX;
+
+ PPUBLICKEYSTRUC = ^PUBLICKEYSTRUC;
+ {$NODEFINE PPUBLICKEYSTRUC}
+ _PUBLICKEYSTRUC = record
+ bType: BYTE;
+ bVersion: BYTE;
+ reserved: WORD;
+ aiKeyAlg: ALG_ID;
+ end;
+ {$EXTERNALSYM _PUBLICKEYSTRUC}
+ PUBLICKEYSTRUC = _PUBLICKEYSTRUC;
+ {$EXTERNALSYM PUBLICKEYSTRUC}
+ BLOBHEADER = _PUBLICKEYSTRUC;
+ {$EXTERNALSYM BLOBHEADER}
+ TPublicKeyStruc = PUBLICKEYSTRUC;
+
+ PRSAPUBKEY = ^RSAPUBKEY;
+ {$NODEFINE PRSAPUBKEY}
+ _RSAPUBKEY = record
+ magic: DWORD; // Has to be RSA1
+ bitlen: DWORD; // # of bits in modulus
+ pubexp: DWORD; // public exponent
+ // Modulus data follows
+ end;
+ {$EXTERNALSYM _RSAPUBKEY}
+ RSAPUBKEY = _RSAPUBKEY;
+ {$EXTERNALSYM RSAPUBKEY}
+ TRsaPubKey = RSAPUBKEY;
+
+ _PUBKEY = record
+ magic: DWORD;
+ bitlen: DWORD; // # of bits in modulus
+ end;
+ {$EXTERNALSYM _PUBKEY}
+ DHPUBKEY = _PUBKEY;
+ {$EXTERNALSYM DHPUBKEY}
+ DSSPUBKEY = _PUBKEY;
+ {$EXTERNALSYM DSSPUBKEY}
+ KEAPUBKEY = _PUBKEY;
+ {$EXTERNALSYM KEAPUBKEY}
+ TEKPUBKEY = _PUBKEY;
+ {$EXTERNALSYM TEKPUBKEY}
+
+ PDSSSEED = ^DSSSEED;
+ {$NODEFINE PDSSSEED}
+ _DSSSEED = record
+ counter: DWORD;
+ seed: array [0..19] of BYTE;
+ end;
+ {$EXTERNALSYM _DSSSEED}
+ DSSSEED = _DSSSEED;
+ {$EXTERNALSYM DSSSEED}
+ TDssSeed = DSSSEED;
+
+ PPUBKEYVER3 = ^PUBKEYVER3;
+ {$NODEFINE PPUBKEYVER3}
+ _PUBKEYVER3 = record
+ magic: DWORD;
+ bitlenP: DWORD; // # of bits in prime modulus
+ bitlenQ: DWORD; // # of bits in prime q, 0 if not available
+ bitlenJ: DWORD; // # of bits in (p-1)/q, 0 if not available
+ DSSSeed: DSSSEED;
+ end;
+ {$EXTERNALSYM _PUBKEYVER3}
+ PUBKEYVER3 = _PUBKEYVER3;
+ {$EXTERNALSYM PUBKEYVER3}
+ DHPUBKEY_VER3 = PUBKEYVER3;
+ {$EXTERNALSYM DHPUBKEY_VER3}
+ TPubKeyVer3 = PUBKEYVER3;
+
+ PPRIVKEYVER3 = ^DHPRIVKEY_VER3;
+ {$NODEFINE PPRIVKEYVER3}
+ _PRIVKEYVER3 = record
+ magic: DWORD;
+ bitlenP: DWORD; // # of bits in prime modulus
+ bitlenQ: DWORD; // # of bits in prime q, 0 if not available
+ bitlenJ: DWORD; // # of bits in (p-1)/q, 0 if not available
+ bitlenX: DWORD; // # of bits in X
+ DSSSeed: DSSSEED;
+ end;
+ {$EXTERNALSYM _PRIVKEYVER3}
+ DHPRIVKEY_VER3 = _PRIVKEYVER3;
+ {$EXTERNALSYM DHPRIVKEY_VER3}
+ DSSPRIVKEY_VER3 = _PRIVKEYVER3;
+ {$EXTERNALSYM DSSPRIVKEY_VER3}
+ TDssPrivKey3 = DHPRIVKEY_VER3;
+
+ PKEY_TYPE_SUBTYPE = ^KEY_TYPE_SUBTYPE;
+ {$EXTERNALSYM PKEY_TYPE_SUBTYPE}
+ _KEY_TYPE_SUBTYPE = record
+ dwKeySpec: DWORD;
+ Type_: GUID;
+ Subtype: GUID;
+ end;
+ {$EXTERNALSYM _KEY_TYPE_SUBTYPE}
+ KEY_TYPE_SUBTYPE = _KEY_TYPE_SUBTYPE;
+ {$EXTERNALSYM KEY_TYPE_SUBTYPE}
+ TKeyTypeSubType = KEY_TYPE_SUBTYPE;
+ PKeyTypeSubType = PKEY_TYPE_SUBTYPE;
+
+ PCERT_FORTEZZA_DATA_PROP = ^CERT_FORTEZZA_DATA_PROP;
+ {$NODEFINE PCERT_FORTEZZA_DATA_PROP}
+ _CERT_FORTEZZA_DATA_PROP = record
+ SerialNumber: array [0..7] of Byte;
+ CertIndex: Integer;
+ CertLabel: array [0..35] of Byte;
+ end;
+ {$EXTERNALSYM _CERT_FORTEZZA_DATA_PROP}
+ CERT_FORTEZZA_DATA_PROP = _CERT_FORTEZZA_DATA_PROP;
+ {$EXTERNALSYM CERT_FORTEZZA_DATA_PROP}
+ TCertFortezzaDataProp = CERT_FORTEZZA_DATA_PROP;
+ PCertFortezzaDataProp = PCERT_FORTEZZA_DATA_PROP;
+
+//+-------------------------------------------------------------------------
+// CRYPTOAPI BLOB definitions
+//--------------------------------------------------------------------------
+
+type
+ _CRYPTOAPI_BLOB = record
+ cbData: DWORD;
+ pbData: LPBYTE;
+ end;
+ {$EXTERNALSYM _CRYPTOAPI_BLOB}
+ CRYPT_INTEGER_BLOB = _CRYPTOAPI_BLOB;
+ TCryptIntegerBlob = CRYPT_INTEGER_BLOB;
+ {$EXTERNALSYM CRYPT_INTEGER_BLOB}
+ PCRYPT_INTEGER_BLOB = ^_CRYPTOAPI_BLOB;
+ {$EXTERNALSYM PCRYPT_INTEGER_BLOB}
+ PCryptIntegerBlob = PCRYPT_INTEGER_BLOB;
+ CRYPT_UINT_BLOB = _CRYPTOAPI_BLOB;
+ {$EXTERNALSYM CRYPT_UINT_BLOB}
+ TCryptUintBlob = CRYPT_UINT_BLOB;
+ PCRYPT_UINT_BLOB = ^_CRYPTOAPI_BLOB;
+ {$EXTERNALSYM PCRYPT_UINT_BLOB}
+ PCryptUintBlob = PCRYPT_UINT_BLOB;
+ CRYPT_OBJID_BLOB = _CRYPTOAPI_BLOB;
+ {$EXTERNALSYM CRYPT_OBJID_BLOB}
+ TCryptObjIdBlob = CRYPT_OBJID_BLOB;
+ PCRYPT_OBJID_BLOB = ^_CRYPTOAPI_BLOB;
+ {$EXTERNALSYM PCRYPT_OBJID_BLOB}
+ PCryptObjIdBlob = PCRYPT_OBJID_BLOB;
+ CERT_NAME_BLOB = _CRYPTOAPI_BLOB;
+ {$EXTERNALSYM CERT_NAME_BLOB}
+ TCertNameBlob = CERT_NAME_BLOB;
+ PCERT_NAME_BLOB = ^_CRYPTOAPI_BLOB;
+ {$EXTERNALSYM PCERT_NAME_BLOB}
+ PCertNameBlob = PCERT_NAME_BLOB;
+ CERT_RDN_VALUE_BLOB = _CRYPTOAPI_BLOB;
+ {$EXTERNALSYM CERT_RDN_VALUE_BLOB}
+ TCertRdnValueBlob = CERT_RDN_VALUE_BLOB;
+ PCERT_RDN_VALUE_BLOB = ^_CRYPTOAPI_BLOB;
+ {$EXTERNALSYM PCERT_RDN_VALUE_BLOB}
+ PCertRdnValueBlob = PCERT_RDN_VALUE_BLOB;
+ CERT_BLOB = _CRYPTOAPI_BLOB;
+ {$EXTERNALSYM CERT_BLOB}
+ TCertBlob = CERT_BLOB;
+ PCERT_BLOB = ^_CRYPTOAPI_BLOB;
+ {$EXTERNALSYM PCERT_BLOB}
+ PCertBlob = PCERT_BLOB;
+ CRL_BLOB = _CRYPTOAPI_BLOB;
+ {$EXTERNALSYM CRL_BLOB}
+ TCrlBlob = CRL_BLOB;
+ PCRL_BLOB = ^_CRYPTOAPI_BLOB;
+ {$EXTERNALSYM PCRL_BLOB}
+ PCrlBlob = PCRL_BLOB;
+ DATA_BLOB = _CRYPTOAPI_BLOB;
+ {$EXTERNALSYM DATA_BLOB}
+ TDataBlob = DATA_BLOB;
+ PDATA_BLOB = ^_CRYPTOAPI_BLOB;
+ {$EXTERNALSYM PDATA_BLOB}
+ PDataBlob = PDATA_BLOB;
+ CRYPT_DATA_BLOB = _CRYPTOAPI_BLOB;
+ {$EXTERNALSYM CRYPT_DATA_BLOB}
+ TCryptDataBlob = CRYPT_DATA_BLOB;
+ PCRYPT_DATA_BLOB = ^_CRYPTOAPI_BLOB;
+ {$EXTERNALSYM PCRYPT_DATA_BLOB}
+ PCryptDataBlob = PCRYPT_DATA_BLOB;
+ CRYPT_HASH_BLOB = _CRYPTOAPI_BLOB;
+ {$EXTERNALSYM CRYPT_HASH_BLOB}
+ TCryptHashBlob = CRYPT_HASH_BLOB;
+ PCRYPT_HASH_BLOB = ^_CRYPTOAPI_BLOB;
+ {$EXTERNALSYM PCRYPT_HASH_BLOB}
+ PCryptHashBlob = PCRYPT_HASH_BLOB;
+ CRYPT_DIGEST_BLOB = _CRYPTOAPI_BLOB;
+ {$EXTERNALSYM CRYPT_DIGEST_BLOB}
+ TCryptDigestBlob = CRYPT_DIGEST_BLOB;
+ PCRYPT_DIGEST_BLOB = ^_CRYPTOAPI_BLOB;
+ {$EXTERNALSYM PCRYPT_DIGEST_BLOB}
+ PCryptDigestBlob = PCRYPT_DIGEST_BLOB;
+ CRYPT_DER_BLOB = _CRYPTOAPI_BLOB;
+ {$EXTERNALSYM CRYPT_DER_BLOB}
+ TCyptDerBlob = CRYPT_DER_BLOB;
+ PCRYPT_DER_BLOB = ^_CRYPTOAPI_BLOB;
+ {$EXTERNALSYM PCRYPT_DER_BLOB}
+ PCyptDerBlob = PCRYPT_DER_BLOB;
+ CRYPT_ATTR_BLOB = _CRYPTOAPI_BLOB;
+ {$EXTERNALSYM CRYPT_ATTR_BLOB}
+ TCryptAttrBlob = CRYPT_ATTR_BLOB;
+ PCRYPT_ATTR_BLOB = ^_CRYPTOAPI_BLOB;
+ {$EXTERNALSYM PCRYPT_ATTR_BLOB}
+ PCryptAttrBlob = PCRYPT_ATTR_BLOB;
+
+// structure for use with CryptSetKeyParam for CMS keys
+
+ PCMS_DH_KEY_INFO = ^CMS_DH_KEY_INFO;
+ {$EXTERNALSYM PCMS_DH_KEY_INFO}
+ _CMS_DH_KEY_INFO = record
+ dwVersion: DWORD; // sizeof(CMS_DH_KEY_INFO)
+ Algid: ALG_ID; // algorithmm id for the key to be converted
+ pszContentEncObjId: LPSTR; // pointer to OID to hash in with Z
+ PubInfo: CRYPT_DATA_BLOB; // OPTIONAL - public information
+ pReserved: Pointer; // reserved - should be NULL
+ end;
+ {$EXTERNALSYM _CMS_DH_KEY_INFO}
+ CMS_DH_KEY_INFO = _CMS_DH_KEY_INFO;
+ {$EXTERNALSYM CMS_DH_KEY_INFO}
+ TCmsDhKeyInfo = CMS_DH_KEY_INFO;
+ PCmsDhKeyInfo = PCMS_DH_KEY_INFO;
+
+function CryptAcquireContextA(var phProv: HCRYPTPROV; pszContainer: LPCSTR;
+ pszProvider: LPCSTR; dwProvType: DWORD; dwFlags: DWORD): BOOL; stdcall;
+{$EXTERNALSYM CryptAcquireContextA}
+function CryptAcquireContextW(var phProv: HCRYPTPROV; pszContainer: LPCWSTR;
+ pszProvider: LPCWSTR; dwProvType: DWORD; dwFlags: DWORD): BOOL; stdcall;
+{$EXTERNALSYM CryptAcquireContextW}
+function CryptAcquireContext(var phProv: HCRYPTPROV; pszContainer: LPCTSTR;
+ pszProvider: LPCTSTR; dwProvType: DWORD; dwFlags: DWORD): BOOL; stdcall;
+{$EXTERNALSYM CryptAcquireContext}
+
+function CryptReleaseContext(hProv: HCRYPTPROV; dwFlags: ULONG_PTR): BOOL; stdcall;
+{$EXTERNALSYM CryptReleaseContext}
+
+function CryptGenKey(hProv: HCRYPTPROV; Algid: ALG_ID; dwFlags: DWORD;
+ var phKey: HCRYPTKEY): BOOL; stdcall;
+{$EXTERNALSYM CryptGenKey}
+
+function CryptDeriveKey(hProv: HCRYPTPROV; Algid: ALG_ID; hBaseData: HCRYPTHASH;
+ dwFlags: DWORD; var phKey: HCRYPTKEY): BOOL; stdcall;
+{$EXTERNALSYM CryptDeriveKey}
+
+function CryptDestroyKey(hKey: HCRYPTKEY): BOOL; stdcall;
+{$EXTERNALSYM CryptDestroyKey}
+
+function CryptSetKeyParam(hKey: HCRYPTKEY; dwParam: DWORD; pbData: LPBYTE;
+ dwFlags: DWORD): BOOL; stdcall;
+{$EXTERNALSYM CryptSetKeyParam}
+
+function CryptGetKeyParam(hKey: HCRYPTKEY; dwParam: DWORD; pbData: LPBYTE;
+ var pdwDataLen: DWORD; dwFlags: DWORD): BOOL; stdcall;
+{$EXTERNALSYM CryptGetKeyParam}
+
+function CryptSetHashParam(hHash: HCRYPTHASH; dwParam: DWORD; pbData: LPBYTE;
+ dwFlags: DWORD): BOOL; stdcall;
+{$EXTERNALSYM CryptSetHashParam}
+
+function CryptGetHashParam(hHash: HCRYPTHASH; dwParam: DWORD; pbData: LPBYTE;
+ var pdwDataLen: DWORD; dwFlags: DWORD): BOOL; stdcall;
+{$EXTERNALSYM CryptGetHashParam}
+
+function CryptSetProvParam(hProv: HCRYPTPROV; dwParam: DWORD; pbData: LPBYTE;
+ dwFlags: DWORD): BOOL; stdcall;
+{$EXTERNALSYM CryptSetProvParam}
+
+function CryptGetProvParam(hProv: HCRYPTPROV; dwParam: DWORD; pbData: LPBYTE;
+ var pdwDataLen: DWORD; dwFlags: DWORD): BOOL; stdcall;
+{$EXTERNALSYM CryptGetProvParam}
+
+function CryptGenRandom(hProv: HCRYPTPROV; dwLen: DWORD; pbBuffer: LPBYTE): BOOL; stdcall;
+{$EXTERNALSYM CryptGenRandom}
+
+function CryptGetUserKey(hProv: HCRYPTPROV; dwKeySpec: DWORD; var phUserKey: HCRYPTKEY): BOOL; stdcall;
+{$EXTERNALSYM CryptGetUserKey}
+
+function CryptExportKey(hKey, hExpKey: HCRYPTKEY; dwBlobType, dwFlags: DWORD;
+ pbData: LPBYTE; var pdwDataLen: DWORD): BOOL; stdcall;
+{$EXTERNALSYM CryptExportKey}
+
+function CryptImportKey(hProv: HCRYPTPROV; pbData: LPBYTE; dwDataLen: DWORD;
+ hPubKey: HCRYPTKEY; dwFlags: DWORD; var phKey: HCRYPTKEY): BOOL; stdcall;
+{$EXTERNALSYM CryptImportKey}
+
+function CryptEncrypt(hKey: HCRYPTKEY; hHash: HCRYPTHASH; Final: BOOL;
+ dwFlags: DWORD; pbData: LPBYTE; var pdwDataLen: DWORD; dwBufLen: DWORD): BOOL; stdcall;
+{$EXTERNALSYM CryptEncrypt}
+
+function CryptDecrypt(hKey: HCRYPTKEY; hHash: HCRYPTHASH; Final: BOOL;
+ dwFlags: DWORD; pbData: LPBYTE; var pdwDataLen: DWORD): BOOL; stdcall;
+{$EXTERNALSYM CryptDecrypt}
+
+function CryptCreateHash(hProv: HCRYPTPROV; Algid: ALG_ID; hKey: HCRYPTKEY;
+ dwFlags: DWORD; var phHash: HCRYPTHASH): BOOL; stdcall;
+{$EXTERNALSYM CryptCreateHash}
+
+function CryptHashData(hHash: HCRYPTHASH; pbData: LPBYTE; dwDataLen, dwFlags: DWORD): BOOL; stdcall;
+{$EXTERNALSYM CryptHashData}
+
+function CryptHashSessionKey(hHash: HCRYPTHASH; hKey: HCRYPTKEY; dwFlags: DWORD): BOOL; stdcall;
+{$EXTERNALSYM CryptHashSessionKey}
+
+function CryptDestroyHash(hHash: HCRYPTHASH): BOOL; stdcall;
+{$EXTERNALSYM CryptDestroyHash}
+
+function CryptSignHashA(hHash: HCRYPTHASH; dwKeySpec: DWORD; sDescription: LPCSTR;
+ dwFlags: DWORD; pbSignature: LPBYTE; var pdwSigLen: DWORD): BOOL; stdcall;
+{$EXTERNALSYM CryptSignHashA}
+function CryptSignHashW(hHash: HCRYPTHASH; dwKeySpec: DWORD; sDescription: LPCWSTR;
+ dwFlags: DWORD; pbSignature: LPBYTE; var pdwSigLen: DWORD): BOOL; stdcall;
+{$EXTERNALSYM CryptSignHashW}
+function CryptSignHash(hHash: HCRYPTHASH; dwKeySpec: DWORD; sDescription: LPCTSTR;
+ dwFlags: DWORD; pbSignature: LPBYTE; var pdwSigLen: DWORD): BOOL; stdcall;
+{$EXTERNALSYM CryptSignHash}
+
+function CryptVerifySignatureA(hHash: HCRYPTHASH; pbSignature: LPBYTE;
+ dwSigLen: DWORD; hPubKey: HCRYPTKEY; sDescription: LPCSTR; dwFlags: DWORD): BOOL; stdcall;
+{$EXTERNALSYM CryptVerifySignatureA}
+function CryptVerifySignatureW(hHash: HCRYPTHASH; pbSignature: LPBYTE;
+ dwSigLen: DWORD; hPubKey: HCRYPTKEY; sDescription: LPCWSTR; dwFlags: DWORD): BOOL; stdcall;
+{$EXTERNALSYM CryptVerifySignatureW}
+function CryptVerifySignature(hHash: HCRYPTHASH; pbSignature: LPBYTE;
+ dwSigLen: DWORD; hPubKey: HCRYPTKEY; sDescription: LPCTSTR; dwFlags: DWORD): BOOL; stdcall;
+{$EXTERNALSYM CryptVerifySignature}
+
+function CryptSetProviderA(pszProvName: LPCSTR; dwProvType: DWORD): BOOL; stdcall;
+{$EXTERNALSYM CryptSetProviderA}
+function CryptSetProviderW(pszProvName: LPCWSTR; dwProvType: DWORD): BOOL; stdcall;
+{$EXTERNALSYM CryptSetProviderW}
+function CryptSetProvider(pszProvName: LPCTSTR; dwProvType: DWORD): BOOL; stdcall;
+{$EXTERNALSYM CryptSetProvider}
+
+function CryptSetProviderExA(pszProvName: LPCSTR; dwProvType: DWORD;
+ pdwReserved: LPDWORD; dwFlags: DWORD): BOOL; stdcall;
+{$EXTERNALSYM CryptSetProviderExA}
+function CryptSetProviderExW(pszProvName: LPCWSTR; dwProvType: DWORD;
+ pdwReserved: LPDWORD; dwFlags: DWORD): BOOL; stdcall;
+{$EXTERNALSYM CryptSetProviderExW}
+function CryptSetProviderEx(pszProvName: LPCTSTR; dwProvType: DWORD;
+ pdwReserved: LPDWORD; dwFlags: DWORD): BOOL; stdcall;
+{$EXTERNALSYM CryptSetProviderEx}
+
+function CryptGetDefaultProviderA(dwProvType: DWORD; pdwReserved: LPDWORD;
+ dwFlags: DWORD; pszProvName: LPSTR; var pcbProvName: DWORD): BOOL; stdcall;
+{$EXTERNALSYM CryptGetDefaultProviderA}
+function CryptGetDefaultProviderW(dwProvType: DWORD; pdwReserved: LPDWORD;
+ dwFlags: DWORD; pszProvName: LPWSTR; var pcbProvName: DWORD): BOOL; stdcall;
+{$EXTERNALSYM CryptGetDefaultProviderW}
+function CryptGetDefaultProvider(dwProvType: DWORD; pdwReserved: LPDWORD;
+ dwFlags: DWORD; pszProvName: LPTSTR; var pcbProvName: DWORD): BOOL; stdcall;
+{$EXTERNALSYM CryptGetDefaultProvider}
+
+function CryptEnumProviderTypesA(dwIndex: DWORD; pdwReserved: LPDWORD;
+ dwFlags: DWORD; var pdwProvType: DWORD; pszTypeName: LPSTR;
+ var pcbTypeName: DWORD): BOOL; stdcall;
+{$EXTERNALSYM CryptEnumProviderTypesA}
+function CryptEnumProviderTypesW(dwIndex: DWORD; pdwReserved: LPDWORD;
+ dwFlags: DWORD; var pdwProvType: DWORD; pszTypeName: LPWSTR;
+ var pcbTypeName: DWORD): BOOL; stdcall;
+{$EXTERNALSYM CryptEnumProviderTypesW}
+function CryptEnumProviderTypes(dwIndex: DWORD; pdwReserved: LPDWORD;
+ dwFlags: DWORD; var pdwProvType: DWORD; pszTypeName: LPTSTR;
+ var pcbTypeName: DWORD): BOOL; stdcall;
+{$EXTERNALSYM CryptEnumProviderTypes}
+
+function CryptEnumProvidersA(dwIndex: DWORD; pdwReserved: LPDWORD; dwFlags: DWORD;
+ var pdwProvType: DWORD; pszProvName: LPSTR; var pcbProvName: DWORD): BOOL; stdcall;
+{$EXTERNALSYM CryptEnumProvidersA}
+function CryptEnumProvidersW(dwIndex: DWORD; pdwReserved: LPDWORD; dwFlags: DWORD;
+ var pdwProvType: DWORD; pszProvName: LPWSTR; var pcbProvName: DWORD): BOOL; stdcall;
+{$EXTERNALSYM CryptEnumProvidersW}
+function CryptEnumProviders(dwIndex: DWORD; pdwReserved: LPDWORD; dwFlags: DWORD;
+ var pdwProvType: DWORD; pszProvName: LPTSTR; var pcbProvName: DWORD): BOOL; stdcall;
+{$EXTERNALSYM CryptEnumProviders}
+
+function CryptContextAddRef(hProv: HCRYPTPROV; pdwReserved: LPDWORD; dwFlags: DWORD): BOOL; stdcall;
+{$EXTERNALSYM CryptContextAddRef}
+
+function CryptDuplicateKey(hKey: HCRYPTKEY; pdwReserved: LPDWORD; dwFlags: DWORD;
+ var phKey: HCRYPTKEY): BOOL; stdcall;
+{$EXTERNALSYM CryptDuplicateKey}
+
+function CryptDuplicateHash(hHash: HCRYPTHASH; pdwReserved: LPDWORD;
+ dwFlags: DWORD; var phHash: HCRYPTHASH): BOOL; stdcall;
+{$EXTERNALSYM CryptDuplicateHash}
+
+//+-------------------------------------------------------------------------
+// In a CRYPT_BIT_BLOB the last byte may contain 0-7 unused bits. Therefore, the
+// overall bit length is cbData * 8 - cUnusedBits.
+//--------------------------------------------------------------------------
+
+type
+ PCRYPT_BIT_BLOB = ^CRYPT_BIT_BLOB;
+ {$EXTERNALSYM PCRYPT_BIT_BLOB}
+ _CRYPT_BIT_BLOB = record
+ cbData: DWORD;
+ pbData: LPBYTE;
+ cUnusedBits: DWORD;
+ end;
+ {$EXTERNALSYM _CRYPT_BIT_BLOB}
+ CRYPT_BIT_BLOB = _CRYPT_BIT_BLOB;
+ {$EXTERNALSYM CRYPT_BIT_BLOB}
+ TCryptBitBlob = CRYPT_BIT_BLOB;
+ PCryptBitBlob = PCRYPT_BIT_BLOB;
+
+//+-------------------------------------------------------------------------
+// Type used for any algorithm
+//
+// Where the Parameters CRYPT_OBJID_BLOB is in its encoded representation. For most
+// algorithm types, the Parameters CRYPT_OBJID_BLOB is NULL (Parameters.cbData = 0).
+//--------------------------------------------------------------------------
+
+type
+ PCRYPT_ALGORITHM_IDENTIFIER = ^CRYPT_ALGORITHM_IDENTIFIER;
+ {$EXTERNALSYM PCRYPT_ALGORITHM_IDENTIFIER}
+ _CRYPT_ALGORITHM_IDENTIFIER = record
+ pszObjId: LPSTR;
+ Parameters: CRYPT_OBJID_BLOB;
+ end;
+ {$EXTERNALSYM _CRYPT_ALGORITHM_IDENTIFIER}
+ CRYPT_ALGORITHM_IDENTIFIER = _CRYPT_ALGORITHM_IDENTIFIER;
+ {$EXTERNALSYM CRYPT_ALGORITHM_IDENTIFIER}
+ TCryptAlgorithmIdentifier = CRYPT_ALGORITHM_IDENTIFIER;
+ PCryptAlgorithmIdentifier = PCRYPT_ALGORITHM_IDENTIFIER;
+
+// Following are the definitions of various algorithm object identifiers
+// RSA
+
+const
+ szOID_RSA = '1.2.840.113549';
+ {$EXTERNALSYM szOID_RSA}
+ szOID_PKCS = '1.2.840.113549.1';
+ {$EXTERNALSYM szOID_PKCS}
+ szOID_RSA_HASH = '1.2.840.113549.2';
+ {$EXTERNALSYM szOID_RSA_HASH}
+ szOID_RSA_ENCRYPT = '1.2.840.113549.3';
+ {$EXTERNALSYM szOID_RSA_ENCRYPT}
+
+ szOID_PKCS_1 = '1.2.840.113549.1.1';
+ {$EXTERNALSYM szOID_PKCS_1}
+ szOID_PKCS_2 = '1.2.840.113549.1.2';
+ {$EXTERNALSYM szOID_PKCS_2}
+ szOID_PKCS_3 = '1.2.840.113549.1.3';
+ {$EXTERNALSYM szOID_PKCS_3}
+ szOID_PKCS_4 = '1.2.840.113549.1.4';
+ {$EXTERNALSYM szOID_PKCS_4}
+ szOID_PKCS_5 = '1.2.840.113549.1.5';
+ {$EXTERNALSYM szOID_PKCS_5}
+ szOID_PKCS_6 = '1.2.840.113549.1.6';
+ {$EXTERNALSYM szOID_PKCS_6}
+ szOID_PKCS_7 = '1.2.840.113549.1.7';
+ {$EXTERNALSYM szOID_PKCS_7}
+ szOID_PKCS_8 = '1.2.840.113549.1.8';
+ {$EXTERNALSYM szOID_PKCS_8}
+ szOID_PKCS_9 = '1.2.840.113549.1.9';
+ {$EXTERNALSYM szOID_PKCS_9}
+ szOID_PKCS_10 = '1.2.840.113549.1.10';
+ {$EXTERNALSYM szOID_PKCS_10}
+ szOID_PKCS_12 = '1.2.840.113549.1.12';
+ {$EXTERNALSYM szOID_PKCS_12}
+
+ szOID_RSA_RSA = '1.2.840.113549.1.1.1';
+ {$EXTERNALSYM szOID_RSA_RSA}
+ szOID_RSA_MD2RSA = '1.2.840.113549.1.1.2';
+ {$EXTERNALSYM szOID_RSA_MD2RSA}
+ szOID_RSA_MD4RSA = '1.2.840.113549.1.1.3';
+ {$EXTERNALSYM szOID_RSA_MD4RSA}
+ szOID_RSA_MD5RSA = '1.2.840.113549.1.1.4';
+ {$EXTERNALSYM szOID_RSA_MD5RSA}
+ szOID_RSA_SHA1RSA = '1.2.840.113549.1.1.5';
+ {$EXTERNALSYM szOID_RSA_SHA1RSA}
+ szOID_RSA_SETOAEP_RSA = '1.2.840.113549.1.1.6';
+ {$EXTERNALSYM szOID_RSA_SETOAEP_RSA}
+
+ szOID_RSA_DH = '1.2.840.113549.1.3.1';
+ {$EXTERNALSYM szOID_RSA_DH}
+
+ szOID_RSA_data = '1.2.840.113549.1.7.1';
+ {$EXTERNALSYM szOID_RSA_data}
+ szOID_RSA_signedData = '1.2.840.113549.1.7.2';
+ {$EXTERNALSYM szOID_RSA_signedData}
+ szOID_RSA_envelopedData = '1.2.840.113549.1.7.3';
+ {$EXTERNALSYM szOID_RSA_envelopedData}
+ szOID_RSA_signEnvData = '1.2.840.113549.1.7.4';
+ {$EXTERNALSYM szOID_RSA_signEnvData}
+ szOID_RSA_digestedData = '1.2.840.113549.1.7.5';
+ {$EXTERNALSYM szOID_RSA_digestedData}
+ szOID_RSA_hashedData = '1.2.840.113549.1.7.5';
+ {$EXTERNALSYM szOID_RSA_hashedData}
+ szOID_RSA_encryptedData = '1.2.840.113549.1.7.6';
+ {$EXTERNALSYM szOID_RSA_encryptedData}
+
+ szOID_RSA_emailAddr = '1.2.840.113549.1.9.1';
+ {$EXTERNALSYM szOID_RSA_emailAddr}
+ szOID_RSA_unstructName = '1.2.840.113549.1.9.2';
+ {$EXTERNALSYM szOID_RSA_unstructName}
+ szOID_RSA_contentType = '1.2.840.113549.1.9.3';
+ {$EXTERNALSYM szOID_RSA_contentType}
+ szOID_RSA_messageDigest = '1.2.840.113549.1.9.4';
+ {$EXTERNALSYM szOID_RSA_messageDigest}
+ szOID_RSA_signingTime = '1.2.840.113549.1.9.5';
+ {$EXTERNALSYM szOID_RSA_signingTime}
+ szOID_RSA_counterSign = '1.2.840.113549.1.9.6';
+ {$EXTERNALSYM szOID_RSA_counterSign}
+ szOID_RSA_challengePwd = '1.2.840.113549.1.9.7';
+ {$EXTERNALSYM szOID_RSA_challengePwd}
+ szOID_RSA_unstructAddr = '1.2.840.113549.1.9.8';
+ {$EXTERNALSYM szOID_RSA_unstructAddr}
+ szOID_RSA_extCertAttrs = '1.2.840.113549.1.9.9';
+ {$EXTERNALSYM szOID_RSA_extCertAttrs}
+ szOID_RSA_certExtensions = '1.2.840.113549.1.9.14';
+ {$EXTERNALSYM szOID_RSA_certExtensions}
+ szOID_RSA_SMIMECapabilities = '1.2.840.113549.1.9.15';
+ {$EXTERNALSYM szOID_RSA_SMIMECapabilities}
+ szOID_RSA_preferSignedData = '1.2.840.113549.1.9.15.1';
+ {$EXTERNALSYM szOID_RSA_preferSignedData}
+
+ szOID_RSA_SMIMEalg = '1.2.840.113549.1.9.16.3';
+ {$EXTERNALSYM szOID_RSA_SMIMEalg}
+ szOID_RSA_SMIMEalgESDH = '1.2.840.113549.1.9.16.3.5';
+ {$EXTERNALSYM szOID_RSA_SMIMEalgESDH}
+ szOID_RSA_SMIMEalgCMS3DESwrap = '1.2.840.113549.1.9.16.3.6';
+ {$EXTERNALSYM szOID_RSA_SMIMEalgCMS3DESwrap}
+ szOID_RSA_SMIMEalgCMSRC2wrap = '1.2.840.113549.1.9.16.3.7';
+ {$EXTERNALSYM szOID_RSA_SMIMEalgCMSRC2wrap}
+
+ szOID_RSA_MD2 = '1.2.840.113549.2.2';
+ {$EXTERNALSYM szOID_RSA_MD2}
+ szOID_RSA_MD4 = '1.2.840.113549.2.4';
+ {$EXTERNALSYM szOID_RSA_MD4}
+ szOID_RSA_MD5 = '1.2.840.113549.2.5';
+ {$EXTERNALSYM szOID_RSA_MD5}
+
+ szOID_RSA_RC2CBC = '1.2.840.113549.3.2';
+ {$EXTERNALSYM szOID_RSA_RC2CBC}
+ szOID_RSA_RC4 = '1.2.840.113549.3.4';
+ {$EXTERNALSYM szOID_RSA_RC4}
+ szOID_RSA_DES_EDE3_CBC = '1.2.840.113549.3.7';
+ {$EXTERNALSYM szOID_RSA_DES_EDE3_CBC}
+ szOID_RSA_RC5_CBCPad = '1.2.840.113549.3.9';
+ {$EXTERNALSYM szOID_RSA_RC5_CBCPad}
+
+ szOID_ANSI_X942 = '1.2.840.10046';
+ {$EXTERNALSYM szOID_ANSI_X942}
+ szOID_ANSI_X942_DH = '1.2.840.10046.2.1';
+ {$EXTERNALSYM szOID_ANSI_X942_DH}
+
+ szOID_X957 = '1.2.840.10040';
+ {$EXTERNALSYM szOID_X957}
+ szOID_X957_DSA = '1.2.840.10040.4.1';
+ {$EXTERNALSYM szOID_X957_DSA}
+ szOID_X957_SHA1DSA = '1.2.840.10040.4.3';
+ {$EXTERNALSYM szOID_X957_SHA1DSA}
+
+// ITU-T UsefulDefinitions
+
+ szOID_DS = '2.5';
+ {$EXTERNALSYM szOID_DS}
+ szOID_DSALG = '2.5.8';
+ {$EXTERNALSYM szOID_DSALG}
+ szOID_DSALG_CRPT = '2.5.8.1';
+ {$EXTERNALSYM szOID_DSALG_CRPT}
+ szOID_DSALG_HASH = '2.5.8.2';
+ {$EXTERNALSYM szOID_DSALG_HASH}
+ szOID_DSALG_SIGN = '2.5.8.3';
+ {$EXTERNALSYM szOID_DSALG_SIGN}
+ szOID_DSALG_RSA = '2.5.8.1.1';
+ {$EXTERNALSYM szOID_DSALG_RSA}
+
+// NIST OSE Implementors' Workshop (OIW)
+// http://nemo.ncsl.nist.gov/oiw/agreements/stable/OSI/12s_9506.w51
+// http://nemo.ncsl.nist.gov/oiw/agreements/working/OSI/12w_9503.w51
+
+ szOID_OIW = '1.3.14';
+ {$EXTERNALSYM szOID_OIW}
+
+// NIST OSE Implementors' Workshop (OIW) Security SIG algorithm identifiers
+
+ szOID_OIWSEC = '1.3.14.3.2';
+ {$EXTERNALSYM szOID_OIWSEC}
+ szOID_OIWSEC_md4RSA = '1.3.14.3.2.2';
+ {$EXTERNALSYM szOID_OIWSEC_md4RSA}
+ szOID_OIWSEC_md5RSA = '1.3.14.3.2.3';
+ {$EXTERNALSYM szOID_OIWSEC_md5RSA}
+ szOID_OIWSEC_md4RSA2 = '1.3.14.3.2.4';
+ {$EXTERNALSYM szOID_OIWSEC_md4RSA2}
+ szOID_OIWSEC_desECB = '1.3.14.3.2.6';
+ {$EXTERNALSYM szOID_OIWSEC_desECB}
+ szOID_OIWSEC_desCBC = '1.3.14.3.2.7';
+ {$EXTERNALSYM szOID_OIWSEC_desCBC}
+ szOID_OIWSEC_desOFB = '1.3.14.3.2.8';
+ {$EXTERNALSYM szOID_OIWSEC_desOFB}
+ szOID_OIWSEC_desCFB = '1.3.14.3.2.9';
+ {$EXTERNALSYM szOID_OIWSEC_desCFB}
+ szOID_OIWSEC_desMAC = '1.3.14.3.2.10';
+ {$EXTERNALSYM szOID_OIWSEC_desMAC}
+ szOID_OIWSEC_rsaSign = '1.3.14.3.2.11';
+ {$EXTERNALSYM szOID_OIWSEC_rsaSign}
+ szOID_OIWSEC_dsa = '1.3.14.3.2.12';
+ {$EXTERNALSYM szOID_OIWSEC_dsa}
+ szOID_OIWSEC_shaDSA = '1.3.14.3.2.13';
+ {$EXTERNALSYM szOID_OIWSEC_shaDSA}
+ szOID_OIWSEC_mdc2RSA = '1.3.14.3.2.14';
+ {$EXTERNALSYM szOID_OIWSEC_mdc2RSA}
+ szOID_OIWSEC_shaRSA = '1.3.14.3.2.15';
+ {$EXTERNALSYM szOID_OIWSEC_shaRSA}
+ szOID_OIWSEC_dhCommMod = '1.3.14.3.2.16';
+ {$EXTERNALSYM szOID_OIWSEC_dhCommMod}
+ szOID_OIWSEC_desEDE = '1.3.14.3.2.17';
+ {$EXTERNALSYM szOID_OIWSEC_desEDE}
+ szOID_OIWSEC_sha = '1.3.14.3.2.18';
+ {$EXTERNALSYM szOID_OIWSEC_sha}
+ szOID_OIWSEC_mdc2 = '1.3.14.3.2.19';
+ {$EXTERNALSYM szOID_OIWSEC_mdc2}
+ szOID_OIWSEC_dsaComm = '1.3.14.3.2.20';
+ {$EXTERNALSYM szOID_OIWSEC_dsaComm}
+ szOID_OIWSEC_dsaCommSHA = '1.3.14.3.2.21';
+ {$EXTERNALSYM szOID_OIWSEC_dsaCommSHA}
+ szOID_OIWSEC_rsaXchg = '1.3.14.3.2.22';
+ {$EXTERNALSYM szOID_OIWSEC_rsaXchg}
+ szOID_OIWSEC_keyHashSeal = '1.3.14.3.2.23';
+ {$EXTERNALSYM szOID_OIWSEC_keyHashSeal}
+ szOID_OIWSEC_md2RSASign = '1.3.14.3.2.24';
+ {$EXTERNALSYM szOID_OIWSEC_md2RSASign}
+ szOID_OIWSEC_md5RSASign = '1.3.14.3.2.25';
+ {$EXTERNALSYM szOID_OIWSEC_md5RSASign}
+ szOID_OIWSEC_sha1 = '1.3.14.3.2.26';
+ {$EXTERNALSYM szOID_OIWSEC_sha1}
+ szOID_OIWSEC_dsaSHA1 = '1.3.14.3.2.27';
+ {$EXTERNALSYM szOID_OIWSEC_dsaSHA1}
+ szOID_OIWSEC_dsaCommSHA1 = '1.3.14.3.2.28';
+ {$EXTERNALSYM szOID_OIWSEC_dsaCommSHA1}
+ szOID_OIWSEC_sha1RSASign = '1.3.14.3.2.29';
+ {$EXTERNALSYM szOID_OIWSEC_sha1RSASign}
+
+// NIST OSE Implementors' Workshop (OIW) Directory SIG algorithm identifiers
+
+ szOID_OIWDIR = '1.3.14.7.2';
+ {$EXTERNALSYM szOID_OIWDIR}
+ szOID_OIWDIR_CRPT = '1.3.14.7.2.1';
+ {$EXTERNALSYM szOID_OIWDIR_CRPT}
+ szOID_OIWDIR_HASH = '1.3.14.7.2.2';
+ {$EXTERNALSYM szOID_OIWDIR_HASH}
+ szOID_OIWDIR_SIGN = '1.3.14.7.2.3';
+ {$EXTERNALSYM szOID_OIWDIR_SIGN}
+ szOID_OIWDIR_md2 = '1.3.14.7.2.2.1';
+ {$EXTERNALSYM szOID_OIWDIR_md2}
+ szOID_OIWDIR_md2RSA = '1.3.14.7.2.3.1';
+ {$EXTERNALSYM szOID_OIWDIR_md2RSA}
+
+// INFOSEC Algorithms
+// joint-iso-ccitt(2) country(16) us(840) organization(1) us-government(101) dod(2) id-infosec(1)
+
+ szOID_INFOSEC = '2.16.840.1.101.2.1';
+ {$EXTERNALSYM szOID_INFOSEC}
+ szOID_INFOSEC_sdnsSignature = '2.16.840.1.101.2.1.1.1';
+ {$EXTERNALSYM szOID_INFOSEC_sdnsSignature}
+ szOID_INFOSEC_mosaicSignature = '2.16.840.1.101.2.1.1.2';
+ {$EXTERNALSYM szOID_INFOSEC_mosaicSignature}
+ szOID_INFOSEC_sdnsConfidentiality = '2.16.840.1.101.2.1.1.3';
+ {$EXTERNALSYM szOID_INFOSEC_sdnsConfidentiality}
+ szOID_INFOSEC_mosaicConfidentiality = '2.16.840.1.101.2.1.1.4';
+ {$EXTERNALSYM szOID_INFOSEC_mosaicConfidentiality}
+ szOID_INFOSEC_sdnsIntegrity = '2.16.840.1.101.2.1.1.5';
+ {$EXTERNALSYM szOID_INFOSEC_sdnsIntegrity}
+ szOID_INFOSEC_mosaicIntegrity = '2.16.840.1.101.2.1.1.6';
+ {$EXTERNALSYM szOID_INFOSEC_mosaicIntegrity}
+ szOID_INFOSEC_sdnsTokenProtection = '2.16.840.1.101.2.1.1.7';
+ {$EXTERNALSYM szOID_INFOSEC_sdnsTokenProtection}
+ szOID_INFOSEC_mosaicTokenProtection = '2.16.840.1.101.2.1.1.8';
+ {$EXTERNALSYM szOID_INFOSEC_mosaicTokenProtection}
+ szOID_INFOSEC_sdnsKeyManagement = '2.16.840.1.101.2.1.1.9';
+ {$EXTERNALSYM szOID_INFOSEC_sdnsKeyManagement}
+ szOID_INFOSEC_mosaicKeyManagement = '2.16.840.1.101.2.1.1.10';
+ {$EXTERNALSYM szOID_INFOSEC_mosaicKeyManagement}
+ szOID_INFOSEC_sdnsKMandSig = '2.16.840.1.101.2.1.1.11';
+ {$EXTERNALSYM szOID_INFOSEC_sdnsKMandSig}
+ szOID_INFOSEC_mosaicKMandSig = '2.16.840.1.101.2.1.1.12';
+ {$EXTERNALSYM szOID_INFOSEC_mosaicKMandSig}
+ szOID_INFOSEC_SuiteASignature = '2.16.840.1.101.2.1.1.13';
+ {$EXTERNALSYM szOID_INFOSEC_SuiteASignature}
+ szOID_INFOSEC_SuiteAConfidentiality = '2.16.840.1.101.2.1.1.14';
+ {$EXTERNALSYM szOID_INFOSEC_SuiteAConfidentiality}
+ szOID_INFOSEC_SuiteAIntegrity = '2.16.840.1.101.2.1.1.15';
+ {$EXTERNALSYM szOID_INFOSEC_SuiteAIntegrity}
+ szOID_INFOSEC_SuiteATokenProtection = '2.16.840.1.101.2.1.1.16';
+ {$EXTERNALSYM szOID_INFOSEC_SuiteATokenProtection}
+ szOID_INFOSEC_SuiteAKeyManagement = '2.16.840.1.101.2.1.1.17';
+ {$EXTERNALSYM szOID_INFOSEC_SuiteAKeyManagement}
+ szOID_INFOSEC_SuiteAKMandSig = '2.16.840.1.101.2.1.1.18';
+ {$EXTERNALSYM szOID_INFOSEC_SuiteAKMandSig}
+ szOID_INFOSEC_mosaicUpdatedSig = '2.16.840.1.101.2.1.1.19';
+ {$EXTERNALSYM szOID_INFOSEC_mosaicUpdatedSig}
+ szOID_INFOSEC_mosaicKMandUpdSig = '2.16.840.1.101.2.1.1.20';
+ {$EXTERNALSYM szOID_INFOSEC_mosaicKMandUpdSig}
+ szOID_INFOSEC_mosaicUpdatedInteg = '2.16.840.1.101.2.1.1.21';
+ {$EXTERNALSYM szOID_INFOSEC_mosaicUpdatedInteg}
+
+type
+ PCRYPT_OBJID_TABLE = ^CRYPT_OBJID_TABLE;
+ {$EXTERNALSYM PCRYPT_OBJID_TABLE}
+ _CRYPT_OBJID_TABLE = record
+ dwAlgId: DWORD;
+ pszObjId: LPCSTR;
+ end;
+ {$EXTERNALSYM _CRYPT_OBJID_TABLE}
+ CRYPT_OBJID_TABLE = _CRYPT_OBJID_TABLE;
+ {$EXTERNALSYM CRYPT_OBJID_TABLE}
+ TCryptObjIdTable = CRYPT_OBJID_TABLE;
+ PCryptObjIdTable = PCRYPT_OBJID_TABLE;
+
+//+-------------------------------------------------------------------------
+// PKCS #1 HashInfo (DigestInfo)
+//--------------------------------------------------------------------------
+
+ PCRYPT_HASH_INFO = ^CRYPT_HASH_INFO;
+ {$EXTERNALSYM PCRYPT_HASH_INFO}
+ _CRYPT_HASH_INFO = record
+ HashAlgorithm: CRYPT_ALGORITHM_IDENTIFIER;
+ Hash: CRYPT_HASH_BLOB;
+ end;
+ {$EXTERNALSYM _CRYPT_HASH_INFO}
+ CRYPT_HASH_INFO = _CRYPT_HASH_INFO;
+ {$EXTERNALSYM CRYPT_HASH_INFO}
+ TCryptHashInfo = CRYPT_HASH_INFO;
+ PCryptHashInfo = PCRYPT_HASH_INFO;
+
+//+-------------------------------------------------------------------------
+// Type used for an extension to an encoded content
+//
+// Where the Value's CRYPT_OBJID_BLOB is in its encoded representation.
+//--------------------------------------------------------------------------
+
+ PCERT_EXTENSION = ^CERT_EXTENSION;
+ {$EXTERNALSYM PCERT_EXTENSION}
+ _CERT_EXTENSION = record
+ pszObjId: LPSTR;
+ fCritical: BOOL;
+ Value: CRYPT_OBJID_BLOB;
+ end;
+ {$EXTERNALSYM _CERT_EXTENSION}
+ CERT_EXTENSION = _CERT_EXTENSION;
+ {$EXTERNALSYM CERT_EXTENSION}
+ TCertExtension = CERT_EXTENSION;
+ PCertExtension = PCERT_EXTENSION;
+
+//+-------------------------------------------------------------------------
+// AttributeTypeValue
+//
+// Where the Value's CRYPT_OBJID_BLOB is in its encoded representation.
+//--------------------------------------------------------------------------
+
+ PCRYPT_ATTRIBUTE_TYPE_VALUE = ^CRYPT_ATTRIBUTE_TYPE_VALUE;
+ {$EXTERNALSYM PCRYPT_ATTRIBUTE_TYPE_VALUE}
+ _CRYPT_ATTRIBUTE_TYPE_VALUE = record
+ pszObjId: LPSTR;
+ Value: CRYPT_OBJID_BLOB;
+ end;
+ {$EXTERNALSYM _CRYPT_ATTRIBUTE_TYPE_VALUE}
+ CRYPT_ATTRIBUTE_TYPE_VALUE = _CRYPT_ATTRIBUTE_TYPE_VALUE;
+ {$EXTERNALSYM CRYPT_ATTRIBUTE_TYPE_VALUE}
+ TCryptAttributeTypeValue = CRYPT_ATTRIBUTE_TYPE_VALUE;
+ PCryptAttributeTypeValue = PCRYPT_ATTRIBUTE_TYPE_VALUE;
+
+//+-------------------------------------------------------------------------
+// Attributes
+//
+// Where the Value's PATTR_BLOBs are in their encoded representation.
+//--------------------------------------------------------------------------
+
+ PCRYPT_ATTRIBUTE = ^CRYPT_ATTRIBUTE;
+ {$EXTERNALSYM PCRYPT_ATTRIBUTE}
+ _CRYPT_ATTRIBUTE = record
+ pszObjId: LPSTR;
+ cValue: DWORD;
+ rgValue: PCRYPT_ATTR_BLOB;
+ end;
+ {$EXTERNALSYM _CRYPT_ATTRIBUTE}
+ CRYPT_ATTRIBUTE = _CRYPT_ATTRIBUTE;
+ {$EXTERNALSYM CRYPT_ATTRIBUTE}
+ TCryptAttribute = CRYPT_ATTRIBUTE;
+ PCryptAttribute = PCRYPT_ATTRIBUTE;
+
+ PCRYPT_ATTRIBUTES = ^CRYPT_ATTRIBUTES;
+ {$EXTERNALSYM PCRYPT_ATTRIBUTES}
+ _CRYPT_ATTRIBUTES = record
+ cAttr: DWORD;
+ rgAttr: PCRYPT_ATTRIBUTE;
+ end;
+ {$EXTERNALSYM _CRYPT_ATTRIBUTES}
+ CRYPT_ATTRIBUTES = _CRYPT_ATTRIBUTES;
+ {$EXTERNALSYM CRYPT_ATTRIBUTES}
+ TCryptAttributes = CRYPT_ATTRIBUTES;
+ PCryptAttributes = PCRYPT_ATTRIBUTES;
+
+//+-------------------------------------------------------------------------
+// Attributes making up a Relative Distinguished Name (CERT_RDN)
+//
+// The interpretation of the Value depends on the dwValueType.
+// See below for a list of the types.
+//--------------------------------------------------------------------------
+
+ PCERT_RDN_ATTR = ^CERT_RDN_ATTR;
+ {$EXTERNALSYM PCERT_RDN_ATTR}
+ _CERT_RDN_ATTR = record
+ pszObjId: LPSTR;
+ dwValueType: DWORD;
+ Value: CERT_RDN_VALUE_BLOB;
+ end;
+ {$EXTERNALSYM _CERT_RDN_ATTR}
+ CERT_RDN_ATTR = _CERT_RDN_ATTR;
+ {$EXTERNALSYM CERT_RDN_ATTR}
+ TCertRdnAttr = CERT_RDN_ATTR;
+ PCertRdnAttr = PCERT_RDN_ATTR;
+
+//+-------------------------------------------------------------------------
+// CERT_RDN attribute Object Identifiers
+//--------------------------------------------------------------------------
+
+// Labeling attribute types:
+
+const
+ szOID_COMMON_NAME = '2.5.4.3'; // case-ignore string
+ {$EXTERNALSYM szOID_COMMON_NAME}
+ szOID_SUR_NAME = '2.5.4.4'; // case-ignore string
+ {$EXTERNALSYM szOID_SUR_NAME}
+ szOID_DEVICE_SERIAL_NUMBER = '2.5.4.5'; // printable string
+ {$EXTERNALSYM szOID_DEVICE_SERIAL_NUMBER}
+
+// Geographic attribute types:
+
+ szOID_COUNTRY_NAME = '2.5.4.6'; // printable 2char string
+ {$EXTERNALSYM szOID_COUNTRY_NAME}
+ szOID_LOCALITY_NAME = '2.5.4.7'; // case-ignore string
+ {$EXTERNALSYM szOID_LOCALITY_NAME}
+ szOID_STATE_OR_PROVINCE_NAME = '2.5.4.8'; // case-ignore string
+ {$EXTERNALSYM szOID_STATE_OR_PROVINCE_NAME}
+ szOID_STREET_ADDRESS = '2.5.4.9'; // case-ignore string
+ {$EXTERNALSYM szOID_STREET_ADDRESS}
+
+// Organizational attribute types:
+
+ szOID_ORGANIZATION_NAME = '2.5.4.10'; // case-ignore string
+ {$EXTERNALSYM szOID_ORGANIZATION_NAME}
+ szOID_ORGANIZATIONAL_UNIT_NAME = '2.5.4.11'; // case-ignore string
+ {$EXTERNALSYM szOID_ORGANIZATIONAL_UNIT_NAME}
+ szOID_TITLE = '2.5.4.12'; // case-ignore string
+ {$EXTERNALSYM szOID_TITLE}
+
+// Explanatory attribute types:
+
+ szOID_DESCRIPTION = '2.5.4.13'; // case-ignore string
+ {$EXTERNALSYM szOID_DESCRIPTION}
+ szOID_SEARCH_GUIDE = '2.5.4.14';
+ {$EXTERNALSYM szOID_SEARCH_GUIDE}
+ szOID_BUSINESS_CATEGORY = '2.5.4.15'; // case-ignore string
+ {$EXTERNALSYM szOID_BUSINESS_CATEGORY}
+
+// Postal addressing attribute types:
+
+ szOID_POSTAL_ADDRESS = '2.5.4.16';
+ {$EXTERNALSYM szOID_POSTAL_ADDRESS}
+ szOID_POSTAL_CODE = '2.5.4.17'; // case-ignore string
+ {$EXTERNALSYM szOID_POSTAL_CODE}
+ szOID_POST_OFFICE_BOX = '2.5.4.18'; // case-ignore string
+ {$EXTERNALSYM szOID_POST_OFFICE_BOX}
+ szOID_PHYSICAL_DELIVERY_OFFICE_NAME = '2.5.4.19'; // case-ignore string
+ {$EXTERNALSYM szOID_PHYSICAL_DELIVERY_OFFICE_NAME}
+
+// Telecommunications addressing attribute types:
+
+ szOID_TELEPHONE_NUMBER = '2.5.4.20'; // telephone number
+ {$EXTERNALSYM szOID_TELEPHONE_NUMBER}
+ szOID_TELEX_NUMBER = '2.5.4.21';
+ {$EXTERNALSYM szOID_TELEX_NUMBER}
+ szOID_TELETEXT_TERMINAL_IDENTIFIER = '2.5.4.22';
+ {$EXTERNALSYM szOID_TELETEXT_TERMINAL_IDENTIFIER}
+ szOID_FACSIMILE_TELEPHONE_NUMBER = '2.5.4.23';
+ {$EXTERNALSYM szOID_FACSIMILE_TELEPHONE_NUMBER}
+ szOID_X21_ADDRESS = '2.5.4.24'; // numeric string
+ {$EXTERNALSYM szOID_X21_ADDRESS}
+ szOID_INTERNATIONAL_ISDN_NUMBER = '2.5.4.25'; // numeric string
+ {$EXTERNALSYM szOID_INTERNATIONAL_ISDN_NUMBER}
+ szOID_REGISTERED_ADDRESS = '2.5.4.26';
+ {$EXTERNALSYM szOID_REGISTERED_ADDRESS}
+ szOID_DESTINATION_INDICATOR = '2.5.4.27'; // printable string
+ {$EXTERNALSYM szOID_DESTINATION_INDICATOR}
+
+// Preference attribute types:
+
+ szOID_PREFERRED_DELIVERY_METHOD = '2.5.4.28';
+ {$EXTERNALSYM szOID_PREFERRED_DELIVERY_METHOD}
+
+// OSI application attribute types:
+
+ szOID_PRESENTATION_ADDRESS = '2.5.4.29';
+ {$EXTERNALSYM szOID_PRESENTATION_ADDRESS}
+ szOID_SUPPORTED_APPLICATION_CONTEXT = '2.5.4.30';
+ {$EXTERNALSYM szOID_SUPPORTED_APPLICATION_CONTEXT}
+
+// Relational application attribute types:
+
+ szOID_MEMBER = '2.5.4.31';
+ {$EXTERNALSYM szOID_MEMBER}
+ szOID_OWNER = '2.5.4.32';
+ {$EXTERNALSYM szOID_OWNER}
+ szOID_ROLE_OCCUPANT = '2.5.4.33';
+ {$EXTERNALSYM szOID_ROLE_OCCUPANT}
+ szOID_SEE_ALSO = '2.5.4.34';
+ {$EXTERNALSYM szOID_SEE_ALSO}
+
+// Security attribute types:
+
+ szOID_USER_PASSWORD = '2.5.4.35';
+ {$EXTERNALSYM szOID_USER_PASSWORD}
+ szOID_USER_CERTIFICATE = '2.5.4.36';
+ {$EXTERNALSYM szOID_USER_CERTIFICATE}
+ szOID_CA_CERTIFICATE = '2.5.4.37';
+ {$EXTERNALSYM szOID_CA_CERTIFICATE}
+ szOID_AUTHORITY_REVOCATION_LIST = '2.5.4.38';
+ {$EXTERNALSYM szOID_AUTHORITY_REVOCATION_LIST}
+ szOID_CERTIFICATE_REVOCATION_LIST = '2.5.4.39';
+ {$EXTERNALSYM szOID_CERTIFICATE_REVOCATION_LIST}
+ szOID_CROSS_CERTIFICATE_PAIR = '2.5.4.40';
+ {$EXTERNALSYM szOID_CROSS_CERTIFICATE_PAIR}
+
+// Undocumented attribute types???
+//#define szOID_??? "2.5.4.41"
+
+ szOID_GIVEN_NAME = '2.5.4.42'; // case-ignore string
+ {$EXTERNALSYM szOID_GIVEN_NAME}
+ szOID_INITIALS = '2.5.4.43'; // case-ignore string
+ {$EXTERNALSYM szOID_INITIALS}
+
+// The DN Qualifier attribute type specifies disambiguating information to add
+// to the relative distinguished name of an entry. It is intended to be used
+// for entries held in multiple DSAs which would otherwise have the same name,
+// and that its value be the same in a given DSA for all entries to which
+// the information has been added.
+
+ szOID_DN_QUALIFIER = '2.5.4.46';
+ {$EXTERNALSYM szOID_DN_QUALIFIER}
+
+// Pilot user attribute types:
+
+ szOID_DOMAIN_COMPONENT = '0.9.2342.19200300.100.1.25'; // IA5, UTF8 string
+ {$EXTERNALSYM szOID_DOMAIN_COMPONENT}
+
+// used for PKCS 12 attributes
+
+ szOID_PKCS_12_FRIENDLY_NAME_ATTR = '1.2.840.113549.1.9.20';
+ {$EXTERNALSYM szOID_PKCS_12_FRIENDLY_NAME_ATTR}
+ szOID_PKCS_12_LOCAL_KEY_ID = '1.2.840.113549.1.9.21';
+ {$EXTERNALSYM szOID_PKCS_12_LOCAL_KEY_ID}
+ szOID_PKCS_12_KEY_PROVIDER_NAME_ATTR = '1.3.6.1.4.1.311.17.1';
+ {$EXTERNALSYM szOID_PKCS_12_KEY_PROVIDER_NAME_ATTR}
+ szOID_LOCAL_MACHINE_KEYSET = '1.3.6.1.4.1.311.17.2';
+ {$EXTERNALSYM szOID_LOCAL_MACHINE_KEYSET}
+
+//+-------------------------------------------------------------------------
+// Microsoft CERT_RDN attribute Object Identifiers
+//--------------------------------------------------------------------------
+// Special RDN containing the KEY_ID. Its value type is CERT_RDN_OCTET_STRING.
+
+ szOID_KEYID_RDN = '1.3.6.1.4.1.311.10.7.1';
+ {$EXTERNALSYM szOID_KEYID_RDN}
+
+//+-------------------------------------------------------------------------
+// CERT_RDN Attribute Value Types
+//
+// For RDN_ENCODED_BLOB, the Value's CERT_RDN_VALUE_BLOB is in its encoded
+// representation. Otherwise, its an array of bytes.
+//
+// For all CERT_RDN types, Value.cbData is always the number of bytes, not
+// necessarily the number of elements in the string. For instance,
+// RDN_UNIVERSAL_STRING is an array of ints (cbData == intCnt * 4) and
+// RDN_BMP_STRING is an array of unsigned shorts (cbData == ushortCnt * 2).
+//
+// A RDN_UTF8_STRING is an array of UNICODE characters (cbData == charCnt *2).
+// These UNICODE characters are encoded as UTF8 8 bit characters.
+//
+// For CertDecodeName, two 0 bytes are always appended to the end of the
+// string (ensures a CHAR or WCHAR string is null terminated).
+// These added 0 bytes are't included in the BLOB.cbData.
+//--------------------------------------------------------------------------
+
+ CERT_RDN_ANY_TYPE = 0;
+ {$EXTERNALSYM CERT_RDN_ANY_TYPE}
+ CERT_RDN_ENCODED_BLOB = 1;
+ {$EXTERNALSYM CERT_RDN_ENCODED_BLOB}
+ CERT_RDN_OCTET_STRING = 2;
+ {$EXTERNALSYM CERT_RDN_OCTET_STRING}
+ CERT_RDN_NUMERIC_STRING = 3;
+ {$EXTERNALSYM CERT_RDN_NUMERIC_STRING}
+ CERT_RDN_PRINTABLE_STRING = 4;
+ {$EXTERNALSYM CERT_RDN_PRINTABLE_STRING}
+ CERT_RDN_TELETEX_STRING = 5;
+ {$EXTERNALSYM CERT_RDN_TELETEX_STRING}
+ CERT_RDN_T61_STRING = 5;
+ {$EXTERNALSYM CERT_RDN_T61_STRING}
+ CERT_RDN_VIDEOTEX_STRING = 6;
+ {$EXTERNALSYM CERT_RDN_VIDEOTEX_STRING}
+ CERT_RDN_IA5_STRING = 7;
+ {$EXTERNALSYM CERT_RDN_IA5_STRING}
+ CERT_RDN_GRAPHIC_STRING = 8;
+ {$EXTERNALSYM CERT_RDN_GRAPHIC_STRING}
+ CERT_RDN_VISIBLE_STRING = 9;
+ {$EXTERNALSYM CERT_RDN_VISIBLE_STRING}
+ CERT_RDN_ISO646_STRING = 9;
+ {$EXTERNALSYM CERT_RDN_ISO646_STRING}
+ CERT_RDN_GENERAL_STRING = 10;
+ {$EXTERNALSYM CERT_RDN_GENERAL_STRING}
+ CERT_RDN_UNIVERSAL_STRING = 11;
+ {$EXTERNALSYM CERT_RDN_UNIVERSAL_STRING}
+ CERT_RDN_INT4_STRING = 11;
+ {$EXTERNALSYM CERT_RDN_INT4_STRING}
+ CERT_RDN_BMP_STRING = 12;
+ {$EXTERNALSYM CERT_RDN_BMP_STRING}
+ CERT_RDN_UNICODE_STRING = 12;
+ {$EXTERNALSYM CERT_RDN_UNICODE_STRING}
+ CERT_RDN_UTF8_STRING = 13;
+ {$EXTERNALSYM CERT_RDN_UTF8_STRING}
+
+ CERT_RDN_TYPE_MASK = $000000FF;
+ {$EXTERNALSYM CERT_RDN_TYPE_MASK}
+ CERT_RDN_FLAGS_MASK = DWORD($FF000000);
+ {$EXTERNALSYM CERT_RDN_FLAGS_MASK}
+
+//+-------------------------------------------------------------------------
+// Flags that can be or'ed with the above Value Type when encoding/decoding
+//--------------------------------------------------------------------------
+// For encoding: when set, CERT_RDN_T61_STRING is selected instead of
+// CERT_RDN_UNICODE_STRING if all the unicode characters are <= 0xFF
+
+ CERT_RDN_ENABLE_T61_UNICODE_FLAG = DWORD($80000000);
+ {$EXTERNALSYM CERT_RDN_ENABLE_T61_UNICODE_FLAG}
+
+// For encoding: when set, CERT_RDN_UTF8_STRING is selected instead of
+// CERT_RDN_UNICODE_STRING.
+
+ CERT_RDN_ENABLE_UTF8_UNICODE_FLAG = $20000000;
+ {$EXTERNALSYM CERT_RDN_ENABLE_UTF8_UNICODE_FLAG}
+
+// For encoding: when set, the characters aren't checked to see if they
+// are valid for the Value Type.
+
+ CERT_RDN_DISABLE_CHECK_TYPE_FLAG = $40000000;
+ {$EXTERNALSYM CERT_RDN_DISABLE_CHECK_TYPE_FLAG}
+
+// For decoding: by default, CERT_RDN_T61_STRING values are initially decoded
+// as UTF8. If the UTF8 decoding fails, then, decoded as 8 bit characters.
+// Setting this flag skips the initial attempt to decode as UTF8.
+
+ CERT_RDN_DISABLE_IE4_UTF8_FLAG = $01000000;
+ {$EXTERNALSYM CERT_RDN_DISABLE_IE4_UTF8_FLAG}
+
+// Macro to check that the dwValueType is a character string and not an
+// encoded blob or octet string
+
+function IS_CERT_RDN_CHAR_STRING(X: DWORD): Boolean;
+{$EXTERNALSYM IS_CERT_RDN_CHAR_STRING}
+
+//+-------------------------------------------------------------------------
+// A CERT_RDN consists of an array of the above attributes
+//--------------------------------------------------------------------------
+
+type
+ PCERT_RDN = ^CERT_RDN;
+ {$EXTERNALSYM PCERT_RDN}
+ _CERT_RDN = record
+ cRDNAttr: DWORD;
+ rgRDNAttr: PCERT_RDN_ATTR;
+ end;
+ {$EXTERNALSYM _CERT_RDN}
+ CERT_RDN = _CERT_RDN;
+ {$EXTERNALSYM CERT_RDN}
+ TCertRdn = CERT_RDN;
+ PCertRdn = PCERT_RDN;
+
+//+-------------------------------------------------------------------------
+// Information stored in a subject's or issuer's name. The information
+// is represented as an array of the above RDNs.
+//--------------------------------------------------------------------------
+
+ PCERT_NAME_INFO = ^CERT_NAME_INFO;
+ {$EXTERNALSYM PCERT_NAME_INFO}
+ _CERT_NAME_INFO = record
+ cRDN: DWORD;
+ rgRDN: PCERT_RDN;
+ end;
+ {$EXTERNALSYM _CERT_NAME_INFO}
+ CERT_NAME_INFO = _CERT_NAME_INFO;
+ {$EXTERNALSYM CERT_NAME_INFO}
+ TCertNameInfo = CERT_NAME_INFO;
+ PCertNameInfo = PCERT_NAME_INFO;
+
+//+-------------------------------------------------------------------------
+// Name attribute value without the Object Identifier
+//
+// The interpretation of the Value depends on the dwValueType.
+// See above for a list of the types.
+//--------------------------------------------------------------------------
+
+ PCERT_NAME_VALUE = ^CERT_NAME_VALUE;
+ {$EXTERNALSYM PCERT_NAME_VALUE}
+ _CERT_NAME_VALUE = record
+ dwValueType: DWORD;
+ Value: CERT_RDN_VALUE_BLOB;
+ end;
+ {$EXTERNALSYM _CERT_NAME_VALUE}
+ CERT_NAME_VALUE = _CERT_NAME_VALUE;
+ {$EXTERNALSYM CERT_NAME_VALUE}
+ TCertNameValue = CERT_NAME_VALUE;
+ PCertNameValue = PCERT_NAME_VALUE;
+
+//+-------------------------------------------------------------------------
+// Public Key Info
+//
+// The PublicKey is the encoded representation of the information as it is
+// stored in the bit string
+//--------------------------------------------------------------------------
+
+ PCERT_PUBLIC_KEY_INFO = ^CERT_PUBLIC_KEY_INFO;
+ {$EXTERNALSYM PCERT_PUBLIC_KEY_INFO}
+ _CERT_PUBLIC_KEY_INFO = record
+ Algorithm: CRYPT_ALGORITHM_IDENTIFIER;
+ PublicKey: CRYPT_BIT_BLOB;
+ end;
+ {$EXTERNALSYM _CERT_PUBLIC_KEY_INFO}
+ CERT_PUBLIC_KEY_INFO = _CERT_PUBLIC_KEY_INFO;
+ {$EXTERNALSYM CERT_PUBLIC_KEY_INFO}
+ TCertPublicKeyInfo = CERT_PUBLIC_KEY_INFO;
+ PCertPublicKeyInfo = PCERT_PUBLIC_KEY_INFO;
+
+const
+ CERT_RSA_PUBLIC_KEY_OBJID = szOID_RSA_RSA;
+ {$EXTERNALSYM CERT_RSA_PUBLIC_KEY_OBJID}
+ CERT_DEFAULT_OID_PUBLIC_KEY_SIGN = szOID_RSA_RSA;
+ {$EXTERNALSYM CERT_DEFAULT_OID_PUBLIC_KEY_SIGN}
+ CERT_DEFAULT_OID_PUBLIC_KEY_XCHG = szOID_RSA_RSA;
+ {$EXTERNALSYM CERT_DEFAULT_OID_PUBLIC_KEY_XCHG}
+
+//+-------------------------------------------------------------------------
+// structure that contains all the information in a PKCS#8 PrivateKeyInfo
+//--------------------------------------------------------------------------
+
+type
+ PCRYPT_PRIVATE_KEY_INFO = ^CRYPT_PRIVATE_KEY_INFO;
+ {$EXTERNALSYM PCRYPT_PRIVATE_KEY_INFO}
+ _CRYPT_PRIVATE_KEY_INFO = record
+ Version: DWORD;
+ Algorithm: CRYPT_ALGORITHM_IDENTIFIER;
+ PrivateKey: CRYPT_DER_BLOB;
+ pAttributes: PCRYPT_ATTRIBUTES;
+ end;
+ {$EXTERNALSYM _CRYPT_PRIVATE_KEY_INFO}
+ CRYPT_PRIVATE_KEY_INFO = _CRYPT_PRIVATE_KEY_INFO;
+ {$EXTERNALSYM CRYPT_PRIVATE_KEY_INFO}
+ TCryptPrivateKeyInfo = CRYPT_PRIVATE_KEY_INFO;
+ PCryptPrivateKeyInfo = PCRYPT_PRIVATE_KEY_INFO;
+
+//+-------------------------------------------------------------------------
+// structure that contains all the information in a PKCS#8
+// EncryptedPrivateKeyInfo
+//--------------------------------------------------------------------------
+
+ PCRYPT_ENCRYPTED_PRIVATE_KEY_INFO = ^CRYPT_ENCRYPTED_PRIVATE_KEY_INFO;
+ {$EXTERNALSYM PCRYPT_ENCRYPTED_PRIVATE_KEY_INFO}
+ _CRYPT_ENCRYPTED_PRIVATE_KEY_INFO = record
+ EncryptionAlgorithm: CRYPT_ALGORITHM_IDENTIFIER;
+ EncryptedPrivateKey: CRYPT_DATA_BLOB;
+ end;
+ {$EXTERNALSYM _CRYPT_ENCRYPTED_PRIVATE_KEY_INFO}
+ CRYPT_ENCRYPTED_PRIVATE_KEY_INFO = _CRYPT_ENCRYPTED_PRIVATE_KEY_INFO;
+ {$EXTERNALSYM CRYPT_ENCRYPTED_PRIVATE_KEY_INFO}
+ TCryptEncryptedPrivateKeyInfo = CRYPT_ENCRYPTED_PRIVATE_KEY_INFO;
+ PCryptEncryptedPrivateKeyInfo = PCRYPT_ENCRYPTED_PRIVATE_KEY_INFO;
+
+//+-------------------------------------------------------------------------
+// this callback is given when an EncryptedProvateKeyInfo structure is
+// encountered during ImportPKCS8. the caller is then expected to decrypt
+// the private key and hand back the decrypted contents.
+//
+// the parameters are:
+// Algorithm - the algorithm used to encrypt the PrivateKeyInfo
+// EncryptedPrivateKey - the encrypted private key blob
+// pClearTextKey - a buffer to receive the clear text
+// cbClearTextKey - the number of bytes of the pClearTextKey buffer
+// note the if this is zero then this should be
+// filled in with the size required to decrypt the
+// key into, and pClearTextKey should be ignored
+// pVoidDecryptFunc - this is the pVoid that was passed into the call
+// and is preserved and passed back as context
+//+-------------------------------------------------------------------------
+
+type
+ PCRYPT_DECRYPT_PRIVATE_KEY_FUNC = function(Algorithm: CRYPT_ALGORITHM_IDENTIFIER;
+ EncryptedPrivateKey: CRYPT_DATA_BLOB; pbClearTextKey: LPBYTE;
+ pcbClearTextKey: LPDWORD; pVoidDecryptFunc: LPVOID): BOOL; stdcall;
+ {$EXTERNALSYM PCRYPT_DECRYPT_PRIVATE_KEY_FUNC}
+ PCryptDecryptPrivateKeyFunc = PCRYPT_DECRYPT_PRIVATE_KEY_FUNC;
+
+//+-------------------------------------------------------------------------
+// this callback is given when creating a PKCS8 EncryptedPrivateKeyInfo.
+// The caller is then expected to encrypt the private key and hand back
+// the encrypted contents.
+//
+// the parameters are:
+// Algorithm - the algorithm used to encrypt the PrivateKeyInfo
+// pClearTextPrivateKey - the cleartext private key to be encrypted
+// pbEncryptedKey - the output encrypted private key blob
+// cbEncryptedKey - the number of bytes of the pbEncryptedKey buffer
+// note the if this is zero then this should be
+// filled in with the size required to encrypt the
+// key into, and pbEncryptedKey should be ignored
+// pVoidEncryptFunc - this is the pVoid that was passed into the call
+// and is preserved and passed back as context
+//+-------------------------------------------------------------------------
+
+type
+ PCRYPT_ENCRYPT_PRIVATE_KEY_FUNC = function(pAlgorithm: PCRYPT_ALGORITHM_IDENTIFIER;
+ pClearTextPrivateKey: PCRYPT_DATA_BLOB; pbEncryptedKey: LPBYTE;
+ pcbEncryptedKey: LPDWORD; pVoidEncryptFunc: LPVOID): BOOL; stdcall;
+ {$EXTERNALSYM PCRYPT_ENCRYPT_PRIVATE_KEY_FUNC}
+ PCryptEncryptPrivateKeyFunc = PCRYPT_ENCRYPT_PRIVATE_KEY_FUNC;
+
+//+-------------------------------------------------------------------------
+// this callback is given from the context of a ImportPKCS8 calls. the caller
+// is then expected to hand back an HCRYPTPROV to receive the key being imported
+//
+// the parameters are:
+// pPrivateKeyInfo - pointer to a CRYPT_PRIVATE_KEY_INFO structure which
+// describes the key being imported
+// EncryptedPrivateKey - the encrypted private key blob
+// phCryptProv - a pointer to a HCRRYPTPROV to be filled in
+// pVoidResolveFunc - this is the pVoidResolveFunc passed in by the caller in the
+// CRYPT_PRIVATE_KEY_BLOB_AND_PARAMS struct
+//+-------------------------------------------------------------------------
+
+type
+ PCRYPT_RESOLVE_HCRYPTPROV_FUNC = function(pPrivateKeyInfo: PCRYPT_PRIVATE_KEY_INFO;
+ phCryptProv: PHCRYPTPROV; pVoidResolveFunc: LPVOID): BOOL; stdcall;
+ {$EXTERNALSYM PCRYPT_RESOLVE_HCRYPTPROV_FUNC}
+ PCryptResolveHCryptProvFunc = PCRYPT_RESOLVE_HCRYPTPROV_FUNC;
+
+//+-------------------------------------------------------------------------
+// this struct contains a PKCS8 private key and two pointers to callback
+// functions, with a corresponding pVoids. the first callback is used to give
+// the caller the opportunity to specify where the key is imported to. the callback
+// passes the caller the algoroithm OID and key size to use in making the decision.
+// the other callback is used to decrypt the private key if the PKCS8 contains an
+// EncryptedPrivateKeyInfo. both pVoids are preserved and passed back to the caller
+// in the respective callback
+//+-------------------------------------------------------------------------
+
+ PCRYPT_PKCS8_IMPORT_PARAMS = ^CRYPT_PKCS8_IMPORT_PARAMS;
+ {$EXTERNALSYM PCRYPT_PKCS8_IMPORT_PARAMS}
+ _CRYPT_PKCS8_IMPORT_PARAMS = record
+ PrivateKey: CRYPT_DIGEST_BLOB; // PKCS8 blob
+ pResolvehCryptProvFunc: PCRYPT_RESOLVE_HCRYPTPROV_FUNC; // optional
+ pVoidResolveFunc: LPVOID; // optional
+ pDecryptPrivateKeyFunc: PCRYPT_DECRYPT_PRIVATE_KEY_FUNC;
+ pVoidDecryptFunc: LPVOID;
+ end;
+ {$EXTERNALSYM _CRYPT_PKCS8_IMPORT_PARAMS}
+ CRYPT_PKCS8_IMPORT_PARAMS = _CRYPT_PKCS8_IMPORT_PARAMS;
+ {$EXTERNALSYM CRYPT_PKCS8_IMPORT_PARAMS}
+ TCryptPkcs8ImportParams = CRYPT_PKCS8_IMPORT_PARAMS;
+ PCryptPkcs8ImportParams = PCRYPT_PKCS8_IMPORT_PARAMS;
+
+ CRYPT_PRIVATE_KEY_BLOB_AND_PARAMS = CRYPT_PKCS8_IMPORT_PARAMS;
+ {$EXTERNALSYM CRYPT_PRIVATE_KEY_BLOB_AND_PARAMS}
+ PCRYPT_PRIVATE_KEY_BLOB_AND_PARAMS = PCRYPT_PKCS8_IMPORT_PARAMS;
+ {$EXTERNALSYM PCRYPT_PRIVATE_KEY_BLOB_AND_PARAMS}
+
+//+-------------------------------------------------------------------------
+// this struct contains information identifying a private key and a pointer
+// to a callback function, with a corresponding pVoid. The callback is used
+// to encrypt the private key. If the pEncryptPrivateKeyFunc is NULL, the
+// key will not be encrypted and an EncryptedPrivateKeyInfo will not be generated.
+// The pVoid is preserved and passed back to the caller in the respective callback
+//+-------------------------------------------------------------------------
+
+ PCRYPT_PKCS8_EXPORT_PARAMS = ^CRYPT_PKCS8_EXPORT_PARAMS;
+ {$EXTERNALSYM PCRYPT_PKCS8_EXPORT_PARAMS}
+ _CRYPT_PKCS8_EXPORT_PARAMS = record
+ hCryptProv: HCRYPTPROV;
+ dwKeySpec: DWORD;
+ pszPrivateKeyObjId: LPSTR;
+ pEncryptPrivateKeyFunc: PCRYPT_ENCRYPT_PRIVATE_KEY_FUNC;
+ pVoidEncryptFunc: LPVOID;
+ end;
+ {$EXTERNALSYM _CRYPT_PKCS8_EXPORT_PARAMS}
+ CRYPT_PKCS8_EXPORT_PARAMS = _CRYPT_PKCS8_EXPORT_PARAMS;
+ {$EXTERNALSYM CRYPT_PKCS8_EXPORT_PARAMS}
+ TCryptPkcs8ExportParams = CRYPT_PKCS8_EXPORT_PARAMS;
+ PCryptPkcs8ExportParams = PCRYPT_PKCS8_EXPORT_PARAMS;
+
+//+-------------------------------------------------------------------------
+// Information stored in a certificate
+//
+// The Issuer, Subject, Algorithm, PublicKey and Extension BLOBs are the
+// encoded representation of the information.
+//--------------------------------------------------------------------------
+
+ PCERT_INFO = ^CERT_INFO;
+ {$EXTERNALSYM PCERT_INFO}
+ _CERT_INFO = record
+ dwVersion: DWORD;
+ SerialNumber: CRYPT_INTEGER_BLOB;
+ SignatureAlgorithm: CRYPT_ALGORITHM_IDENTIFIER;
+ Issuer: CERT_NAME_BLOB;
+ NotBefore: FILETIME;
+ NotAfter: FILETIME;
+ Subject: CERT_NAME_BLOB;
+ SubjectPublicKeyInfo: CERT_PUBLIC_KEY_INFO;
+ IssuerUniqueId: CRYPT_BIT_BLOB;
+ SubjectUniqueId: CRYPT_BIT_BLOB;
+ cExtension: DWORD;
+ rgExtension: PCERT_EXTENSION;
+ end;
+ {$EXTERNALSYM _CERT_INFO}
+ CERT_INFO = _CERT_INFO;
+ {$EXTERNALSYM CERT_INFO}
+ TCertInfo = CERT_INFO;
+ PCertInfo = PCERT_INFO;
+
+//+-------------------------------------------------------------------------
+// Certificate versions
+//--------------------------------------------------------------------------
+
+const
+ CERT_V1 = 0;
+ {$EXTERNALSYM CERT_V1}
+ CERT_V2 = 1;
+ {$EXTERNALSYM CERT_V2}
+ CERT_V3 = 2;
+ {$EXTERNALSYM CERT_V3}
+
+//+-------------------------------------------------------------------------
+// Certificate Information Flags
+//--------------------------------------------------------------------------
+
+ CERT_INFO_VERSION_FLAG = 1;
+ {$EXTERNALSYM CERT_INFO_VERSION_FLAG}
+ CERT_INFO_SERIAL_NUMBER_FLAG = 2;
+ {$EXTERNALSYM CERT_INFO_SERIAL_NUMBER_FLAG}
+ CERT_INFO_SIGNATURE_ALGORITHM_FLAG = 3;
+ {$EXTERNALSYM CERT_INFO_SIGNATURE_ALGORITHM_FLAG}
+ CERT_INFO_ISSUER_FLAG = 4;
+ {$EXTERNALSYM CERT_INFO_ISSUER_FLAG}
+ CERT_INFO_NOT_BEFORE_FLAG = 5;
+ {$EXTERNALSYM CERT_INFO_NOT_BEFORE_FLAG}
+ CERT_INFO_NOT_AFTER_FLAG = 6;
+ {$EXTERNALSYM CERT_INFO_NOT_AFTER_FLAG}
+ CERT_INFO_SUBJECT_FLAG = 7;
+ {$EXTERNALSYM CERT_INFO_SUBJECT_FLAG}
+ CERT_INFO_SUBJECT_PUBLIC_KEY_INFO_FLAG = 8;
+ {$EXTERNALSYM CERT_INFO_SUBJECT_PUBLIC_KEY_INFO_FLAG}
+ CERT_INFO_ISSUER_UNIQUE_ID_FLAG = 9;
+ {$EXTERNALSYM CERT_INFO_ISSUER_UNIQUE_ID_FLAG}
+ CERT_INFO_SUBJECT_UNIQUE_ID_FLAG = 10;
+ {$EXTERNALSYM CERT_INFO_SUBJECT_UNIQUE_ID_FLAG}
+ CERT_INFO_EXTENSION_FLAG = 11;
+ {$EXTERNALSYM CERT_INFO_EXTENSION_FLAG}
+
+//+-------------------------------------------------------------------------
+// An entry in a CRL
+//
+// The Extension BLOBs are the encoded representation of the information.
+//--------------------------------------------------------------------------
+
+type
+ PCRL_ENTRY = ^CRL_ENTRY;
+ {$EXTERNALSYM PCRL_ENTRY}
+ _CRL_ENTRY = record
+ SerialNumber: CRYPT_INTEGER_BLOB;
+ RevocationDate: FILETIME;
+ cExtension: DWORD;
+ rgExtension: PCERT_EXTENSION;
+ end;
+ {$EXTERNALSYM _CRL_ENTRY}
+ CRL_ENTRY = _CRL_ENTRY;
+ {$EXTERNALSYM CRL_ENTRY}
+ TCrlEntry = CRL_ENTRY;
+ PCrlEntry = PCRL_ENTRY;
+
+//+-------------------------------------------------------------------------
+// Information stored in a CRL
+//
+// The Issuer, Algorithm and Extension BLOBs are the encoded
+// representation of the information.
+//--------------------------------------------------------------------------
+
+ PCRL_INFO = ^CRL_INFO;
+ {$EXTERNALSYM PCRL_INFO}
+ _CRL_INFO = record
+ dwVersion: DWORD;
+ SignatureAlgorithm: CRYPT_ALGORITHM_IDENTIFIER;
+ Issuer: CERT_NAME_BLOB;
+ ThisUpdate: FILETIME;
+ NextUpdate: FILETIME;
+ cCRLEntry: DWORD;
+ rgCRLEntry: PCRL_ENTRY;
+ cExtension: DWORD;
+ rgExtension: PCERT_EXTENSION;
+ end;
+ {$EXTERNALSYM _CRL_INFO}
+ CRL_INFO = _CRL_INFO;
+ {$EXTERNALSYM CRL_INFO}
+ TCrlInfo = CRL_INFO;
+ PCrlInfo = PCRL_INFO;
+
+//+-------------------------------------------------------------------------
+// CRL versions
+//--------------------------------------------------------------------------
+
+const
+ CRL_V1 = 0;
+ {$EXTERNALSYM CRL_V1}
+ CRL_V2 = 1;
+ {$EXTERNALSYM CRL_V2}
+
+//+-------------------------------------------------------------------------
+// Information stored in a certificate request
+//
+// The Subject, Algorithm, PublicKey and Attribute BLOBs are the encoded
+// representation of the information.
+//--------------------------------------------------------------------------
+
+type
+ PCERT_REQUEST_INFO = ^CERT_REQUEST_INFO;
+ {$EXTERNALSYM PCERT_REQUEST_INFO}
+ _CERT_REQUEST_INFO = record
+ dwVersion: DWORD;
+ Subject: CERT_NAME_BLOB;
+ SubjectPublicKeyInfo: CERT_PUBLIC_KEY_INFO;
+ cAttribute: DWORD;
+ rgAttribute: PCRYPT_ATTRIBUTE;
+ end;
+ {$EXTERNALSYM _CERT_REQUEST_INFO}
+ CERT_REQUEST_INFO = _CERT_REQUEST_INFO;
+ {$EXTERNALSYM CERT_REQUEST_INFO}
+ TCertRequestInfo = CERT_REQUEST_INFO;
+ PCertRequestInfo = PCERT_REQUEST_INFO;
+
+//+-------------------------------------------------------------------------
+// Certificate Request versions
+//--------------------------------------------------------------------------
+
+const
+ CERT_REQUEST_V1 = 0;
+ {$EXTERNALSYM CERT_REQUEST_V1}
+
+//+-------------------------------------------------------------------------
+// Information stored in Netscape's Keygen request
+//--------------------------------------------------------------------------
+
+type
+ PCERT_KEYGEN_REQUEST_INFO = ^CERT_KEYGEN_REQUEST_INFO;
+ {$EXTERNALSYM PCERT_KEYGEN_REQUEST_INFO}
+ _CERT_KEYGEN_REQUEST_INFO = record
+ dwVersion: DWORD;
+ SubjectPublicKeyInfo: CERT_PUBLIC_KEY_INFO;
+ pwszChallengeString: LPWSTR; // encoded as IA5
+ end;
+ {$EXTERNALSYM _CERT_KEYGEN_REQUEST_INFO}
+ CERT_KEYGEN_REQUEST_INFO = _CERT_KEYGEN_REQUEST_INFO;
+ {$EXTERNALSYM CERT_KEYGEN_REQUEST_INFO}
+ TCertKeygenRequestInfo = CERT_KEYGEN_REQUEST_INFO;
+ PCertKeygenRequestInfo = PCERT_KEYGEN_REQUEST_INFO;
+
+const
+ CERT_KEYGEN_REQUEST_V1 = 0;
+ {$EXTERNALSYM CERT_KEYGEN_REQUEST_V1}
+
+//+-------------------------------------------------------------------------
+// Certificate, CRL, Certificate Request or Keygen Request Signed Content
+//
+// The "to be signed" encoded content plus its signature. The ToBeSigned
+// is the encoded CERT_INFO, CRL_INFO, CERT_REQUEST_INFO or
+// CERT_KEYGEN_REQUEST_INFO.
+//--------------------------------------------------------------------------
+
+type
+ PCERT_SIGNED_CONTENT_INFO = ^CERT_SIGNED_CONTENT_INFO;
+ {$EXTERNALSYM PCERT_SIGNED_CONTENT_INFO}
+ _CERT_SIGNED_CONTENT_INFO = record
+ ToBeSigned: CRYPT_DER_BLOB;
+ SignatureAlgorithm: CRYPT_ALGORITHM_IDENTIFIER;
+ Signature: CRYPT_BIT_BLOB;
+ end;
+ {$EXTERNALSYM _CERT_SIGNED_CONTENT_INFO}
+ CERT_SIGNED_CONTENT_INFO = _CERT_SIGNED_CONTENT_INFO;
+ {$EXTERNALSYM CERT_SIGNED_CONTENT_INFO}
+ TCertSignedContentInfo = CERT_SIGNED_CONTENT_INFO;
+ PCertSignedContentInfo = PCERT_SIGNED_CONTENT_INFO;
+
+//+-------------------------------------------------------------------------
+// Certificate Trust List (CTL)
+//--------------------------------------------------------------------------
+
+//+-------------------------------------------------------------------------
+// CTL Usage. Also used for EnhancedKeyUsage extension.
+//--------------------------------------------------------------------------
+
+ PCTL_USAGE = ^CTL_USAGE;
+ {$EXTERNALSYM PCTL_USAGE}
+ _CTL_USAGE = record
+ cUsageIdentifier: DWORD;
+ rgpszUsageIdentifier: LPSTR; // array of pszObjId
+ end;
+ {$EXTERNALSYM _CTL_USAGE}
+ CTL_USAGE = _CTL_USAGE;
+ {$EXTERNALSYM CTL_USAGE}
+ TCtlUsage = CTL_USAGE;
+ PCtlUsage = PCTL_USAGE;
+
+ CERT_ENHKEY_USAGE = CTL_USAGE;
+ {$EXTERNALSYM CERT_ENHKEY_USAGE}
+ PCERT_ENHKEY_USAGE = PCTL_USAGE;
+ {$EXTERNALSYM PCERT_ENHKEY_USAGE}
+
+//+-------------------------------------------------------------------------
+// An entry in a CTL
+//--------------------------------------------------------------------------
+
+ PCTL_ENTRY = ^CTL_ENTRY;
+ {$EXTERNALSYM PCTL_ENTRY}
+ _CTL_ENTRY = record
+ SubjectIdentifier: CRYPT_DATA_BLOB; // For example, its hash
+ cAttribute: DWORD;
+ rgAttribute: PCRYPT_ATTRIBUTE; // OPTIONAL
+ end;
+ {$EXTERNALSYM _CTL_ENTRY}
+ CTL_ENTRY = _CTL_ENTRY;
+ {$EXTERNALSYM CTL_ENTRY}
+ TCtlEntry = CTL_ENTRY;
+ PCtlEntry = PCTL_ENTRY;
+
+//+-------------------------------------------------------------------------
+// Information stored in a CTL
+//--------------------------------------------------------------------------
+
+ PCTL_INFO = ^CTL_INFO;
+ {$EXTERNALSYM PCTL_INFO}
+ _CTL_INFO = record
+ dwVersion: DWORD;
+ SubjectUsage: CTL_USAGE;
+ ListIdentifier: CRYPT_DATA_BLOB; // OPTIONAL
+ SequenceNumber: CRYPT_INTEGER_BLOB; // OPTIONAL
+ ThisUpdate: FILETIME;
+ NextUpdate: FILETIME; // OPTIONAL
+ SubjectAlgorithm: CRYPT_ALGORITHM_IDENTIFIER;
+ cCTLEntry: DWORD;
+ rgCTLEntry: PCTL_ENTRY; // OPTIONAL
+ cExtension: DWORD;
+ rgExtension: PCERT_EXTENSION; // OPTIONAL
+ end;
+ {$EXTERNALSYM _CTL_INFO}
+ CTL_INFO = _CTL_INFO;
+ {$EXTERNALSYM CTL_INFO}
+ TCtlInfo = CTL_INFO;
+ PCtlInfo = PCTL_INFO;
+
+//+-------------------------------------------------------------------------
+// CTL versions
+//--------------------------------------------------------------------------
+
+const
+ CTL_V1 = 0;
+ {$EXTERNALSYM CTL_V1}
+
+//+-------------------------------------------------------------------------
+// TimeStamp Request
+//
+// The pszTimeStamp is the OID for the Time type requested
+// The pszContentType is the Content Type OID for the content, usually DATA
+// The Content is a un-decoded blob
+//--------------------------------------------------------------------------
+
+type
+ PCRYPT_TIME_STAMP_REQUEST_INFO = ^CRYPT_TIME_STAMP_REQUEST_INFO;
+ {$EXTERNALSYM PCRYPT_TIME_STAMP_REQUEST_INFO}
+ _CRYPT_TIME_STAMP_REQUEST_INFO = record
+ pszTimeStampAlgorithm: LPSTR; // pszObjId
+ pszContentType: LPSTR; // pszObjId
+ Content: CRYPT_OBJID_BLOB;
+ cAttribute: DWORD;
+ rgAttribute: PCRYPT_ATTRIBUTE;
+ end;
+ {$EXTERNALSYM _CRYPT_TIME_STAMP_REQUEST_INFO}
+ CRYPT_TIME_STAMP_REQUEST_INFO = _CRYPT_TIME_STAMP_REQUEST_INFO;
+ {$EXTERNALSYM CRYPT_TIME_STAMP_REQUEST_INFO}
+ TCryptTimeStampRequestInfo = CRYPT_TIME_STAMP_REQUEST_INFO;
+ PCryptTimeStampRequestInfo = PCRYPT_TIME_STAMP_REQUEST_INFO;
+
+//+-------------------------------------------------------------------------
+// Name Value Attribute
+//--------------------------------------------------------------------------
+
+ PCRYPT_ENROLLMENT_NAME_VALUE_PAIR = ^CRYPT_ENROLLMENT_NAME_VALUE_PAIR;
+ {$EXTERNALSYM PCRYPT_ENROLLMENT_NAME_VALUE_PAIR}
+ _CRYPT_ENROLLMENT_NAME_VALUE_PAIR = record
+ pwszName: LPWSTR;
+ pwszValue: LPWSTR;
+ end;
+ {$EXTERNALSYM _CRYPT_ENROLLMENT_NAME_VALUE_PAIR}
+ CRYPT_ENROLLMENT_NAME_VALUE_PAIR = _CRYPT_ENROLLMENT_NAME_VALUE_PAIR;
+ {$EXTERNALSYM CRYPT_ENROLLMENT_NAME_VALUE_PAIR}
+ TCryptEnrollmentNameValuePair = CRYPT_ENROLLMENT_NAME_VALUE_PAIR;
+ PCryptEnrollmentNameValuePair = PCRYPT_ENROLLMENT_NAME_VALUE_PAIR;
+
+//+-------------------------------------------------------------------------
+// CSP Provider
+//--------------------------------------------------------------------------
+
+ PCRYPT_CSP_PROVIDER = ^CRYPT_CSP_PROVIDER;
+ {$EXTERNALSYM PCRYPT_CSP_PROVIDER}
+ _CRYPT_CSP_PROVIDER = record
+ dwKeySpec: DWORD;
+ pwszProviderName: LPWSTR;
+ Signature: CRYPT_BIT_BLOB;
+ end;
+ {$EXTERNALSYM _CRYPT_CSP_PROVIDER}
+ CRYPT_CSP_PROVIDER = _CRYPT_CSP_PROVIDER;
+ {$EXTERNALSYM CRYPT_CSP_PROVIDER}
+ TCryptCspProvider = CRYPT_CSP_PROVIDER;
+ PCryptCspProvider = PCRYPT_CSP_PROVIDER;
+
+//+-------------------------------------------------------------------------
+// Certificate and Message encoding types
+//
+// The encoding type is a DWORD containing both the certificate and message
+// encoding types. The certificate encoding type is stored in the LOWORD.
+// The message encoding type is stored in the HIWORD. Some functions or
+// structure fields require only one of the encoding types. The following
+// naming convention is used to indicate which encoding type(s) are
+// required:
+// dwEncodingType (both encoding types are required)
+// dwMsgAndCertEncodingType (both encoding types are required)
+// dwMsgEncodingType (only msg encoding type is required)
+// dwCertEncodingType (only cert encoding type is required)
+//
+// Its always acceptable to specify both.
+//--------------------------------------------------------------------------
+
+const
+ CERT_ENCODING_TYPE_MASK = $0000FFFF;
+ {$EXTERNALSYM CERT_ENCODING_TYPE_MASK}
+ CMSG_ENCODING_TYPE_MASK = DWORD($FFFF0000);
+ {$EXTERNALSYM CMSG_ENCODING_TYPE_MASK}
+
+function GET_CERT_ENCODING_TYPE(X: DWORD): DWORD;
+{$EXTERNALSYM GET_CERT_ENCODING_TYPE}
+
+function GET_CMSG_ENCODING_TYPE(X: DWORD): DWORD;
+{$EXTERNALSYM GET_CMSG_ENCODING_TYPE}
+
+const
+ CRYPT_ASN_ENCODING = $00000001;
+ {$EXTERNALSYM CRYPT_ASN_ENCODING}
+ CRYPT_NDR_ENCODING = $00000002;
+ {$EXTERNALSYM CRYPT_NDR_ENCODING}
+ X509_ASN_ENCODING = $00000001;
+ {$EXTERNALSYM X509_ASN_ENCODING}
+ X509_NDR_ENCODING = $00000002;
+ {$EXTERNALSYM X509_NDR_ENCODING}
+ PKCS_7_ASN_ENCODING = $00010000;
+ {$EXTERNALSYM PKCS_7_ASN_ENCODING}
+ PKCS_7_NDR_ENCODING = $00020000;
+ {$EXTERNALSYM PKCS_7_NDR_ENCODING}
+
+//+-------------------------------------------------------------------------
+// format the specified data structure according to the certificate
+// encoding type.
+//
+// The default behavior of CryptFormatObject is to return single line
+// display of the encoded data, that is, each subfield will be concatenated with
+// a ", " on one line. If user prefers to display the data in multiple line,
+// set the flag CRYPT_FORMAT_STR_MULTI_LINE, that is, each subfield will be displayed
+// on a seperate line.
+//
+// If there is no formatting routine installed or registered
+// for the lpszStructType, the hex dump of the encoded BLOB will be returned.
+// User can set the flag CRYPT_FORMAT_STR_NO_HEX to disable the hex dump.
+//--------------------------------------------------------------------------
+
+function CryptFormatObject(dwCertEncodingType, dwFormatType, dwFormatStrType: DWORD;
+ pFormatStruct: Pointer; lpszStructType: LPCSTR; pbEncoded: LPBYTE;
+ cbEncoded: DWORD; pbFormat: Pointer; var pcbFormat: DWORD): BOOL; stdcall;
+{$EXTERNALSYM CryptFormatObject}
+
+//-------------------------------------------------------------------------
+// constants for dwFormatStrType of function CryptFormatObject
+//-------------------------------------------------------------------------
+
+const
+ CRYPT_FORMAT_STR_MULTI_LINE = $0001;
+ {$EXTERNALSYM CRYPT_FORMAT_STR_MULTI_LINE}
+ CRYPT_FORMAT_STR_NO_HEX = $0010;
+ {$EXTERNALSYM CRYPT_FORMAT_STR_NO_HEX}
+
+//-------------------------------------------------------------------------
+// constants for dwFormatType of function CryptFormatObject
+// when format X509_NAME or X509_UNICODE_NAME
+//-------------------------------------------------------------------------
+// Just get the simple string
+
+ CRYPT_FORMAT_SIMPLE = $0001;
+ {$EXTERNALSYM CRYPT_FORMAT_SIMPLE}
+
+//Put an attribute name infront of the attribute
+//such as "O=Microsoft,DN=xiaohs"
+
+ CRYPT_FORMAT_X509 = $0002;
+ {$EXTERNALSYM CRYPT_FORMAT_X509}
+
+//Put an OID infront of the simple string, such as
+//"2.5.4.22=Microsoft,2.5.4.3=xiaohs"
+
+ CRYPT_FORMAT_OID = $0004;
+ {$EXTERNALSYM CRYPT_FORMAT_OID}
+
+//Put a ";" between each RDN. The default is ","
+
+ CRYPT_FORMAT_RDN_SEMICOLON = $0100;
+ {$EXTERNALSYM CRYPT_FORMAT_RDN_SEMICOLON}
+
+//Put a "\n" between each RDN.
+
+ CRYPT_FORMAT_RDN_CRLF = $0200;
+ {$EXTERNALSYM CRYPT_FORMAT_RDN_CRLF}
+
+//Unquote the DN value, which is quoated by default va the following
+//rules: if the DN contains leading or trailing
+//white space or one of the following characters: ",", "+", "=",
+//""", "\n", "<", ">", "#" or ";". The quoting character is ".
+//If the DN Value contains a " it is double quoted ("").
+
+ CRYPT_FORMAT_RDN_UNQUOTE = $0400;
+ {$EXTERNALSYM CRYPT_FORMAT_RDN_UNQUOTE}
+
+//reverse the order of the RDNs before converting to the string
+
+ CRYPT_FORMAT_RDN_REVERSE = $0800;
+ {$EXTERNALSYM CRYPT_FORMAT_RDN_REVERSE}
+
+//-------------------------------------------------------------------------
+// contants dwFormatType of function CryptFormatObject when format a DN.:
+//
+// The following three values are defined in the section above:
+// CRYPT_FORMAT_SIMPLE: Just a simple string
+// such as "Microsoft+xiaohs+NT"
+// CRYPT_FORMAT_X509 Put an attribute name infront of the attribute
+// such as "O=Microsoft+xiaohs+NT"
+//
+// CRYPT_FORMAT_OID Put an OID infront of the simple string,
+// such as "2.5.4.22=Microsoft+xiaohs+NT"
+//
+// Additional values are defined as following:
+//----------------------------------------------------------------------------
+//Put a "," between each value. Default is "+"
+
+ CRYPT_FORMAT_COMMA = $1000;
+ {$EXTERNALSYM CRYPT_FORMAT_COMMA}
+
+//Put a ";" between each value
+
+ CRYPT_FORMAT_SEMICOLON = CRYPT_FORMAT_RDN_SEMICOLON;
+ {$EXTERNALSYM CRYPT_FORMAT_SEMICOLON}
+
+//Put a "\n" between each value
+
+ CRYPT_FORMAT_CRLF = CRYPT_FORMAT_RDN_CRLF;
+ {$EXTERNALSYM CRYPT_FORMAT_CRLF}
+
+//+-------------------------------------------------------------------------
+// Encode / decode the specified data structure according to the certificate
+// encoding type.
+//
+// See below for a list of the predefined data structures.
+//--------------------------------------------------------------------------
+
+type
+ PFN_CRYPT_ALLOC = function(cbSize: size_t): LPVOID; stdcall;
+ {$EXTERNALSYM PFN_CRYPT_ALLOC}
+
+ PFN_CRYPT_FREE = procedure(pv: LPVOID); stdcall;
+ {$EXTERNALSYM PFN_CRYPT_FREE}
+
+ PCRYPT_ENCODE_PARA = ^CRYPT_ENCODE_PARA;
+ {$EXTERNALSYM PCRYPT_ENCODE_PARA}
+ _CRYPT_ENCODE_PARA = record
+ cbSize: DWORD;
+ pfnAlloc: PFN_CRYPT_ALLOC; // OPTIONAL
+ pfnFree: PFN_CRYPT_FREE; // OPTIONAL
+ end;
+ {$EXTERNALSYM _CRYPT_ENCODE_PARA}
+ CRYPT_ENCODE_PARA = _CRYPT_ENCODE_PARA;
+ {$EXTERNALSYM CRYPT_ENCODE_PARA}
+ TCryptEncodePara = CRYPT_ENCODE_PARA;
+ PCryptEncodePara = PCRYPT_ENCODE_PARA;
+
+function CryptEncodeObjectEx(dwCertEncodingType: DWORD; lpszStructType: LPCSTR;
+ pvStructInfo: Pointer; dwFlags: DWORD; pEncodePara: PCRYPT_ENCODE_PARA;
+ pvEncoded: Pointer; var pcbEncoded: DWORD): BOOL; stdcall;
+{$EXTERNALSYM CryptEncodeObjectEx}
+
+function CryptEncodeObject(dwCertEncodingType: DWORD; lpszStructType: LPCSTR;
+ pvStructInfo: Pointer; pbEncoded: LPBYTE; var pcbEncoded: DWORD): BOOL; stdcall;
+{$EXTERNALSYM CryptEncodeObject}
+
+// By default the signature bytes are reversed. The following flag can
+// be set to inhibit the byte reversal.
+//
+// This flag is applicable to
+// X509_CERT_TO_BE_SIGNED
+
+const
+ CRYPT_ENCODE_NO_SIGNATURE_BYTE_REVERSAL_FLAG = $8;
+ {$EXTERNALSYM CRYPT_ENCODE_NO_SIGNATURE_BYTE_REVERSAL_FLAG}
+
+// When the following flag is set the called encode function allocates
+// memory for the encoded bytes. A pointer to the allocated bytes
+// is returned in pvEncoded. If pEncodePara or pEncodePara->pfnAlloc is
+// NULL, then, LocalAlloc is called for the allocation and LocalFree must
+// be called to do the free. Otherwise, pEncodePara->pfnAlloc is called
+// for the allocation.
+//
+// *pcbEncoded is ignored on input and updated with the length of the
+// allocated, encoded bytes.
+//
+// If pfnAlloc is set, then, pfnFree should also be set.
+
+ CRYPT_ENCODE_ALLOC_FLAG = $8000;
+ {$EXTERNALSYM CRYPT_ENCODE_ALLOC_FLAG}
+
+// The following flag is applicable when encoding X509_UNICODE_NAME.
+// When set, CERT_RDN_T61_STRING is selected instead of
+// CERT_RDN_UNICODE_STRING if all the unicode characters are <= 0xFF
+
+ CRYPT_UNICODE_NAME_ENCODE_ENABLE_T61_UNICODE_FLAG = CERT_RDN_ENABLE_T61_UNICODE_FLAG;
+ {$EXTERNALSYM CRYPT_UNICODE_NAME_ENCODE_ENABLE_T61_UNICODE_FLAG}
+
+// The following flag is applicable when encoding X509_UNICODE_NAME.
+// When set, CERT_RDN_UTF8_STRING is selected instead of
+// CERT_RDN_UNICODE_STRING.
+
+ CRYPT_UNICODE_NAME_ENCODE_ENABLE_UTF8_UNICODE_FLAG = CERT_RDN_ENABLE_UTF8_UNICODE_FLAG;
+ {$EXTERNALSYM CRYPT_UNICODE_NAME_ENCODE_ENABLE_UTF8_UNICODE_FLAG}
+
+// The following flag is applicable when encoding X509_UNICODE_NAME,
+// X509_UNICODE_NAME_VALUE or X509_UNICODE_ANY_STRING.
+// When set, the characters aren't checked to see if they
+// are valid for the specified Value Type.
+
+ CRYPT_UNICODE_NAME_ENCODE_DISABLE_CHECK_TYPE_FLAG = CERT_RDN_DISABLE_CHECK_TYPE_FLAG;
+ {$EXTERNALSYM CRYPT_UNICODE_NAME_ENCODE_DISABLE_CHECK_TYPE_FLAG}
+
+// The following flag is applicable when encoding the PKCS_SORTED_CTL. This
+// flag should be set if the identifier for the TrustedSubjects is a hash,
+// such as, MD5 or SHA1.
+
+ CRYPT_SORTED_CTL_ENCODE_HASHED_SUBJECT_IDENTIFIER_FLAG = $10000;
+ {$EXTERNALSYM CRYPT_SORTED_CTL_ENCODE_HASHED_SUBJECT_IDENTIFIER_FLAG}
+
+type
+ PCRYPT_DECODE_PARA = ^CRYPT_DECODE_PARA;
+ {$EXTERNALSYM PCRYPT_DECODE_PARA}
+ _CRYPT_DECODE_PARA = record
+ cbSize: DWORD;
+ pfnAlloc: PFN_CRYPT_ALLOC; // OPTIONAL
+ pfnFree: PFN_CRYPT_FREE; // OPTIONAL
+ end;
+ {$EXTERNALSYM _CRYPT_DECODE_PARA}
+ CRYPT_DECODE_PARA = _CRYPT_DECODE_PARA;
+ {$EXTERNALSYM CRYPT_DECODE_PARA}
+ TCryptDecodePara = CRYPT_DECODE_PARA;
+ PCryptDecodePara = PCRYPT_DECODE_PARA;
+
+function CryptDecodeObjectEx(dwCertEncodingType: DWORD; lpszStructType: LPCSTR;
+ pbEncoded: Pointer; cbEncoded, dwFlags: DWORD; pDecodePara: PCRYPT_DECODE_PARA;
+ pvStructInfo: Pointer; var pcbStructInfo: DWORD): BOOL; stdcall;
+{$EXTERNALSYM CryptDecodeObjectEx}
+
+function CryptDecodeObject(dwCertEncodingType: DWORD; lpszStructType: LPCSTR;
+ pbEncoded: LPBYTE; cbEncoded, dwFlags: DWORD; pvStructInfo: Pointer;
+ var pcbStructInfo: DWORD): BOOL; stdcall;
+{$EXTERNALSYM CryptDecodeObject}
+
+// When the following flag is set the nocopy optimization is enabled.
+// This optimization where appropriate, updates the pvStructInfo fields
+// to point to content residing within pbEncoded instead of making a copy
+// of and appending to pvStructInfo.
+//
+// Note, when set, pbEncoded can't be freed until pvStructInfo is freed.
+
+const
+ CRYPT_DECODE_NOCOPY_FLAG = $1;
+ {$EXTERNALSYM CRYPT_DECODE_NOCOPY_FLAG}
+
+// For CryptDecodeObject(), by default the pbEncoded is the "to be signed"
+// plus its signature. Set the following flag, if pbEncoded points to only
+// the "to be signed".
+//
+// This flag is applicable to
+// X509_CERT_TO_BE_SIGNED
+// X509_CERT_CRL_TO_BE_SIGNED
+// X509_CERT_REQUEST_TO_BE_SIGNED
+// X509_KEYGEN_REQUEST_TO_BE_SIGNED
+
+ CRYPT_DECODE_TO_BE_SIGNED_FLAG = $2;
+ {$EXTERNALSYM CRYPT_DECODE_TO_BE_SIGNED_FLAG}
+
+// When the following flag is set, the OID strings are allocated in
+// crypt32.dll and shared instead of being copied into the returned
+// data structure. This flag may be set if crypt32.dll isn't unloaded
+// before the caller is unloaded.
+
+ CRYPT_DECODE_SHARE_OID_STRING_FLAG = $4;
+ {$EXTERNALSYM CRYPT_DECODE_SHARE_OID_STRING_FLAG}
+
+// By default the signature bytes are reversed. The following flag can
+// be set to inhibit the byte reversal.
+//
+// This flag is applicable to
+// X509_CERT_TO_BE_SIGNED
+
+ CRYPT_DECODE_NO_SIGNATURE_BYTE_REVERSAL_FLAG = $8;
+ {$EXTERNALSYM CRYPT_DECODE_NO_SIGNATURE_BYTE_REVERSAL_FLAG}
+
+// When the following flag is set the called decode function allocates
+// memory for the decoded structure. A pointer to the allocated structure
+// is returned in pvStructInfo. If pDecodePara or pDecodePara->pfnAlloc is
+// NULL, then, LocalAlloc is called for the allocation and LocalFree must
+// be called to do the free. Otherwise, pDecodePara->pfnAlloc is called
+// for the allocation.
+//
+// *pcbStructInfo is ignored on input and updated with the length of the
+// allocated, decoded structure.
+//
+// This flag may also be set in the CryptDecodeObject API. Since
+// CryptDecodeObject doesn't take a pDecodePara, LocalAlloc is always
+// called for the allocation which must be freed by calling LocalFree.
+
+ CRYPT_DECODE_ALLOC_FLAG = $8000;
+ {$EXTERNALSYM CRYPT_DECODE_ALLOC_FLAG}
+
+// The following flag is applicable when decoding X509_UNICODE_NAME,
+// X509_UNICODE_NAME_VALUE or X509_UNICODE_ANY_STRING.
+// By default, CERT_RDN_T61_STRING values are initially decoded
+// as UTF8. If the UTF8 decoding fails, then, decoded as 8 bit characters.
+// Setting this flag skips the initial attempt to decode as UTF8.
+
+ CRYPT_UNICODE_NAME_DECODE_DISABLE_IE4_UTF8_FLAG = CERT_RDN_DISABLE_IE4_UTF8_FLAG;
+ {$EXTERNALSYM CRYPT_UNICODE_NAME_DECODE_DISABLE_IE4_UTF8_FLAG}
+
+//+-------------------------------------------------------------------------
+// Predefined X509 certificate data structures that can be encoded / decoded.
+//--------------------------------------------------------------------------
+
+ CRYPT_ENCODE_DECODE_NONE = 0;
+ {$EXTERNALSYM CRYPT_ENCODE_DECODE_NONE}
+ X509_CERT = LPCSTR(1);
+ {$EXTERNALSYM X509_CERT}
+ X509_CERT_TO_BE_SIGNED = LPCSTR(2);
+ {$EXTERNALSYM X509_CERT_TO_BE_SIGNED}
+ X509_CERT_CRL_TO_BE_SIGNED = LPCSTR(3);
+ {$EXTERNALSYM X509_CERT_CRL_TO_BE_SIGNED}
+ X509_CERT_REQUEST_TO_BE_SIGNED = LPCSTR(4);
+ {$EXTERNALSYM X509_CERT_REQUEST_TO_BE_SIGNED}
+ X509_EXTENSIONS = LPCSTR(5);
+ {$EXTERNALSYM X509_EXTENSIONS}
+ X509_NAME_VALUE = LPCSTR(6);
+ {$EXTERNALSYM X509_NAME_VALUE}
+ X509_NAME = LPCSTR(7);
+ {$EXTERNALSYM X509_NAME}
+ X509_PUBLIC_KEY_INFO = LPCSTR(8);
+ {$EXTERNALSYM X509_PUBLIC_KEY_INFO}
+
+//+-------------------------------------------------------------------------
+// Predefined X509 certificate extension data structures that can be
+// encoded / decoded.
+//--------------------------------------------------------------------------
+
+ X509_AUTHORITY_KEY_ID = LPCSTR(9);
+ {$EXTERNALSYM X509_AUTHORITY_KEY_ID}
+ X509_KEY_ATTRIBUTES = LPCSTR(10);
+ {$EXTERNALSYM X509_KEY_ATTRIBUTES}
+ X509_KEY_USAGE_RESTRICTION = LPCSTR(11);
+ {$EXTERNALSYM X509_KEY_USAGE_RESTRICTION}
+ X509_ALTERNATE_NAME = LPCSTR(12);
+ {$EXTERNALSYM X509_ALTERNATE_NAME}
+ X509_BASIC_CONSTRAINTS = LPCSTR(13);
+ {$EXTERNALSYM X509_BASIC_CONSTRAINTS}
+ X509_KEY_USAGE = LPCSTR(14);
+ {$EXTERNALSYM X509_KEY_USAGE}
+ X509_BASIC_CONSTRAINTS2 = LPCSTR(15);
+ {$EXTERNALSYM X509_BASIC_CONSTRAINTS2}
+ X509_CERT_POLICIES = LPCSTR(16);
+ {$EXTERNALSYM X509_CERT_POLICIES}
+
+//+-------------------------------------------------------------------------
+// Additional predefined data structures that can be encoded / decoded.
+//--------------------------------------------------------------------------
+
+ PKCS_UTC_TIME = LPCSTR(17);
+ {$EXTERNALSYM PKCS_UTC_TIME}
+ PKCS_TIME_REQUEST = LPCSTR(18);
+ {$EXTERNALSYM PKCS_TIME_REQUEST}
+ RSA_CSP_PUBLICKEYBLOB = LPCSTR(19);
+ {$EXTERNALSYM RSA_CSP_PUBLICKEYBLOB}
+ X509_UNICODE_NAME = LPCSTR(20);
+ {$EXTERNALSYM X509_UNICODE_NAME}
+
+ X509_KEYGEN_REQUEST_TO_BE_SIGNED = LPCSTR(21);
+ {$EXTERNALSYM X509_KEYGEN_REQUEST_TO_BE_SIGNED}
+ PKCS_ATTRIBUTE = LPCSTR(22);
+ {$EXTERNALSYM PKCS_ATTRIBUTE}
+ PKCS_CONTENT_INFO_SEQUENCE_OF_ANY = LPCSTR(23);
+ {$EXTERNALSYM PKCS_CONTENT_INFO_SEQUENCE_OF_ANY}
+
+//+-------------------------------------------------------------------------
+// Predefined primitive data structures that can be encoded / decoded.
+//--------------------------------------------------------------------------
+
+ X509_UNICODE_NAME_VALUE = LPCSTR(24);
+ {$EXTERNALSYM X509_UNICODE_NAME_VALUE}
+ X509_ANY_STRING = X509_NAME_VALUE;
+ {$EXTERNALSYM X509_ANY_STRING}
+ X509_UNICODE_ANY_STRING = X509_UNICODE_NAME_VALUE;
+ {$EXTERNALSYM X509_UNICODE_ANY_STRING}
+ X509_OCTET_STRING = LPCSTR(25);
+ {$EXTERNALSYM X509_OCTET_STRING}
+ X509_BITS = LPCSTR(26);
+ {$EXTERNALSYM X509_BITS}
+ X509_INTEGER = LPCSTR(27);
+ {$EXTERNALSYM X509_INTEGER}
+ X509_MULTI_BYTE_INTEGER = LPCSTR(28);
+ {$EXTERNALSYM X509_MULTI_BYTE_INTEGER}
+ X509_ENUMERATED = LPCSTR(29);
+ {$EXTERNALSYM X509_ENUMERATED}
+ X509_CHOICE_OF_TIME = LPCSTR(30);
+ {$EXTERNALSYM X509_CHOICE_OF_TIME}
+
+//+-------------------------------------------------------------------------
+// More predefined X509 certificate extension data structures that can be
+// encoded / decoded.
+//--------------------------------------------------------------------------
+
+ X509_AUTHORITY_KEY_ID2 = LPCSTR(31);
+ {$EXTERNALSYM X509_AUTHORITY_KEY_ID2}
+ X509_AUTHORITY_INFO_ACCESS = LPCSTR(32);
+ {$EXTERNALSYM X509_AUTHORITY_INFO_ACCESS}
+ X509_CRL_REASON_CODE = X509_ENUMERATED;
+ {$EXTERNALSYM X509_CRL_REASON_CODE}
+ PKCS_CONTENT_INFO = LPCSTR(33);
+ {$EXTERNALSYM PKCS_CONTENT_INFO}
+ X509_SEQUENCE_OF_ANY = LPCSTR(34);
+ {$EXTERNALSYM X509_SEQUENCE_OF_ANY}
+ X509_CRL_DIST_POINTS = LPCSTR(35);
+ {$EXTERNALSYM X509_CRL_DIST_POINTS}
+ X509_ENHANCED_KEY_USAGE = LPCSTR(36);
+ {$EXTERNALSYM X509_ENHANCED_KEY_USAGE}
+ PKCS_CTL = LPCSTR(37);
+ {$EXTERNALSYM PKCS_CTL}
+
+ X509_MULTI_BYTE_UINT = LPCSTR(38);
+ {$EXTERNALSYM X509_MULTI_BYTE_UINT}
+ X509_DSS_PUBLICKEY = X509_MULTI_BYTE_UINT;
+ {$EXTERNALSYM X509_DSS_PUBLICKEY}
+ X509_DSS_PARAMETERS = LPCSTR(39);
+ {$EXTERNALSYM X509_DSS_PARAMETERS}
+ X509_DSS_SIGNATURE = LPCSTR(40);
+ {$EXTERNALSYM X509_DSS_SIGNATURE}
+ PKCS_RC2_CBC_PARAMETERS = LPCSTR(41);
+ {$EXTERNALSYM PKCS_RC2_CBC_PARAMETERS}
+ PKCS_SMIME_CAPABILITIES = LPCSTR(42);
+ {$EXTERNALSYM PKCS_SMIME_CAPABILITIES}
+
+//+-------------------------------------------------------------------------
+// data structures for private keys
+//--------------------------------------------------------------------------
+
+ PKCS_RSA_PRIVATE_KEY = LPCSTR(43);
+ {$EXTERNALSYM PKCS_RSA_PRIVATE_KEY}
+ PKCS_PRIVATE_KEY_INFO = LPCSTR(44);
+ {$EXTERNALSYM PKCS_PRIVATE_KEY_INFO}
+ PKCS_ENCRYPTED_PRIVATE_KEY_INFO = LPCSTR(45);
+ {$EXTERNALSYM PKCS_ENCRYPTED_PRIVATE_KEY_INFO}
+
+//+-------------------------------------------------------------------------
+// certificate policy qualifier
+//--------------------------------------------------------------------------
+
+ X509_PKIX_POLICY_QUALIFIER_USERNOTICE = LPCSTR(46);
+ {$EXTERNALSYM X509_PKIX_POLICY_QUALIFIER_USERNOTICE}
+
+//+-------------------------------------------------------------------------
+// Diffie-Hellman Key Exchange
+//--------------------------------------------------------------------------
+
+ X509_DH_PUBLICKEY = X509_MULTI_BYTE_UINT;
+ {$EXTERNALSYM X509_DH_PUBLICKEY}
+ X509_DH_PARAMETERS = LPCSTR(47);
+ {$EXTERNALSYM X509_DH_PARAMETERS}
+ PKCS_ATTRIBUTES = LPCSTR(48);
+ {$EXTERNALSYM PKCS_ATTRIBUTES}
+ PKCS_SORTED_CTL = LPCSTR(49);
+ {$EXTERNALSYM PKCS_SORTED_CTL}
+
+//+-------------------------------------------------------------------------
+// X942 Diffie-Hellman
+//--------------------------------------------------------------------------
+
+ X942_DH_PARAMETERS = LPCSTR(50);
+ {$EXTERNALSYM X942_DH_PARAMETERS}
+
+//+-------------------------------------------------------------------------
+// The following is the same as X509_BITS, except before encoding,
+// the bit length is decremented to exclude trailing zero bits.
+//--------------------------------------------------------------------------
+
+ X509_BITS_WITHOUT_TRAILING_ZEROES = LPCSTR(51);
+ {$EXTERNALSYM X509_BITS_WITHOUT_TRAILING_ZEROES}
+
+//+-------------------------------------------------------------------------
+// X942 Diffie-Hellman Other Info
+//--------------------------------------------------------------------------
+
+ X942_OTHER_INFO = LPCSTR(52);
+ {$EXTERNALSYM X942_OTHER_INFO}
+
+//+-------------------------------------------------------------------------
+// Predefined PKCS #7 data structures that can be encoded / decoded.
+//--------------------------------------------------------------------------
+
+ PKCS7_SIGNER_INFO = LPCSTR(500);
+ {$EXTERNALSYM PKCS7_SIGNER_INFO}
+
+//+-------------------------------------------------------------------------
+// Predefined PKCS #7 data structures that can be encoded / decoded.
+//--------------------------------------------------------------------------
+
+ CMS_SIGNER_INFO = LPCSTR(501);
+ {$EXTERNALSYM CMS_SIGNER_INFO}
+
+//+-------------------------------------------------------------------------
+// Predefined Software Publishing Credential (SPC) data structures that
+// can be encoded / decoded.
+//
+// Predefined values: 2000 .. 2999
+//
+// See spc.h for value and data structure definitions.
+//--------------------------------------------------------------------------
+
+//+-------------------------------------------------------------------------
+// Extension Object Identifiers
+//--------------------------------------------------------------------------
+
+ szOID_AUTHORITY_KEY_IDENTIFIER = '2.5.29.1';
+ {$EXTERNALSYM szOID_AUTHORITY_KEY_IDENTIFIER}
+ szOID_KEY_ATTRIBUTES = '2.5.29.2';
+ {$EXTERNALSYM szOID_KEY_ATTRIBUTES}
+ szOID_CERT_POLICIES_95 = '2.5.29.3';
+ {$EXTERNALSYM szOID_CERT_POLICIES_95}
+ szOID_KEY_USAGE_RESTRICTION = '2.5.29.4';
+ {$EXTERNALSYM szOID_KEY_USAGE_RESTRICTION}
+ szOID_SUBJECT_ALT_NAME = '2.5.29.7';
+ {$EXTERNALSYM szOID_SUBJECT_ALT_NAME}
+ szOID_ISSUER_ALT_NAME = '2.5.29.8';
+ {$EXTERNALSYM szOID_ISSUER_ALT_NAME}
+ szOID_BASIC_CONSTRAINTS = '2.5.29.10';
+ {$EXTERNALSYM szOID_BASIC_CONSTRAINTS}
+ szOID_KEY_USAGE = '2.5.29.15';
+ {$EXTERNALSYM szOID_KEY_USAGE}
+ szOID_PRIVATEKEY_USAGE_PERIOD = '2.5.29.16';
+ {$EXTERNALSYM szOID_PRIVATEKEY_USAGE_PERIOD}
+ szOID_BASIC_CONSTRAINTS2 = '2.5.29.19';
+ {$EXTERNALSYM szOID_BASIC_CONSTRAINTS2}
+ szOID_CERT_POLICIES = '2.5.29.32';
+ {$EXTERNALSYM szOID_CERT_POLICIES}
+
+ szOID_AUTHORITY_KEY_IDENTIFIER2 = '2.5.29.35';
+ {$EXTERNALSYM szOID_AUTHORITY_KEY_IDENTIFIER2}
+ szOID_SUBJECT_KEY_IDENTIFIER = '2.5.29.14';
+ {$EXTERNALSYM szOID_SUBJECT_KEY_IDENTIFIER}
+ szOID_SUBJECT_ALT_NAME2 = '2.5.29.17';
+ {$EXTERNALSYM szOID_SUBJECT_ALT_NAME2}
+ szOID_ISSUER_ALT_NAME2 = '2.5.29.18';
+ {$EXTERNALSYM szOID_ISSUER_ALT_NAME2}
+ szOID_CRL_REASON_CODE = '2.5.29.21';
+ {$EXTERNALSYM szOID_CRL_REASON_CODE}
+ szOID_CRL_DIST_POINTS = '2.5.29.31';
+ {$EXTERNALSYM szOID_CRL_DIST_POINTS}
+ szOID_ENHANCED_KEY_USAGE = '2.5.29.37';
+ {$EXTERNALSYM szOID_ENHANCED_KEY_USAGE}
+
+// Microsoft PKCS10 Attributes
+
+ szOID_RENEWAL_CERTIFICATE = '1.3.6.1.4.1.311.13.1';
+ {$EXTERNALSYM szOID_RENEWAL_CERTIFICATE}
+ szOID_ENROLLMENT_NAME_VALUE_PAIR = '1.3.6.1.4.1.311.13.2.1';
+ {$EXTERNALSYM szOID_ENROLLMENT_NAME_VALUE_PAIR}
+ szOID_ENROLLMENT_CSP_PROVIDER = '1.3.6.1.4.1.311.13.2.2';
+ {$EXTERNALSYM szOID_ENROLLMENT_CSP_PROVIDER}
+ szOID_OS_VERSION = '1.3.6.1.4.1.311.13.2.3';
+ {$EXTERNALSYM szOID_OS_VERSION}
+
+//
+// Extension contain certificate type
+
+ szOID_ENROLLMENT_AGENT = '1.3.6.1.4.1.311.20.2.1';
+ {$EXTERNALSYM szOID_ENROLLMENT_AGENT}
+
+// Internet Public Key Infrastructure (PKIX)
+
+ szOID_PKIX = '1.3.6.1.5.5.7';
+ {$EXTERNALSYM szOID_PKIX}
+ szOID_PKIX_PE = '1.3.6.1.5.5.7.1';
+ {$EXTERNALSYM szOID_PKIX_PE}
+ szOID_AUTHORITY_INFO_ACCESS = '1.3.6.1.5.5.7.1.1';
+ {$EXTERNALSYM szOID_AUTHORITY_INFO_ACCESS}
+
+// Microsoft extensions or attributes
+
+ szOID_CERT_EXTENSIONS = '1.3.6.1.4.1.311.2.1.14';
+ {$EXTERNALSYM szOID_CERT_EXTENSIONS}
+ szOID_NEXT_UPDATE_LOCATION = '1.3.6.1.4.1.311.10.2';
+ {$EXTERNALSYM szOID_NEXT_UPDATE_LOCATION}
+
+// Microsoft PKCS #7 ContentType Object Identifiers
+
+ szOID_CTL = '1.3.6.1.4.1.311.10.1';
+ {$EXTERNALSYM szOID_CTL}
+
+// Microsoft Sorted CTL Extension Object Identifier
+
+ szOID_SORTED_CTL = '1.3.6.1.4.1.311.10.1.1';
+ {$EXTERNALSYM szOID_SORTED_CTL}
+
+// serialized serial numbers for PRS
+
+ szOID_SERIALIZED = '1.3.6.1.4.1.311.10.3.3.1';
+ {$EXTERNALSYM szOID_SERIALIZED}
+
+// UPN principal name in SubjectAltName
+
+ szOID_NT_PRINCIPAL_NAME = '1.3.6.1.4.1.311.20.2.3';
+ {$EXTERNALSYM szOID_NT_PRINCIPAL_NAME}
+
+// Windows product update unauthenticated attribute
+
+ szOID_PRODUCT_UPDATE = '1.3.6.1.4.1.311.31.1';
+ {$EXTERNALSYM szOID_PRODUCT_UPDATE}
+
+//+-------------------------------------------------------------------------
+// Object Identifiers for use with Auto Enrollment
+//--------------------------------------------------------------------------
+
+ szOID_AUTO_ENROLL_CTL_USAGE = '1.3.6.1.4.1.311.20.1';
+ {$EXTERNALSYM szOID_AUTO_ENROLL_CTL_USAGE}
+
+// Extension contain certificate type
+
+ szOID_ENROLL_CERTTYPE_EXTENSION = '1.3.6.1.4.1.311.20.2';
+ {$EXTERNALSYM szOID_ENROLL_CERTTYPE_EXTENSION}
+
+ szOID_CERT_MANIFOLD = '1.3.6.1.4.1.311.20.3';
+ {$EXTERNALSYM szOID_CERT_MANIFOLD}
+
+//+-------------------------------------------------------------------------
+// Object Identifiers for use with the MS Certificate Server
+//--------------------------------------------------------------------------
+
+ szOID_CERTSRV_CA_VERSION = '1.3.6.1.4.1.311.21.1';
+ {$EXTERNALSYM szOID_CERTSRV_CA_VERSION}
+
+//+-------------------------------------------------------------------------
+// Object Identifiers for use with the MS Directory Service
+//--------------------------------------------------------------------------
+
+ szOID_NTDS_REPLICATION = '1.3.6.1.4.1.311.25.1';
+ {$EXTERNALSYM szOID_NTDS_REPLICATION}
+
+//+-------------------------------------------------------------------------
+// Extension Object Identifiers (currently not implemented)
+//--------------------------------------------------------------------------
+
+ szOID_POLICY_MAPPINGS = '2.5.29.5';
+ {$EXTERNALSYM szOID_POLICY_MAPPINGS}
+ szOID_SUBJECT_DIR_ATTRS = '2.5.29.9';
+ {$EXTERNALSYM szOID_SUBJECT_DIR_ATTRS}
+
+//+-------------------------------------------------------------------------
+// Enhanced Key Usage (Purpose) Object Identifiers
+//--------------------------------------------------------------------------
+
+ szOID_PKIX_KP = '1.3.6.1.5.5.7.3';
+ {$EXTERNALSYM szOID_PKIX_KP}
+
+// Consistent key usage bits: DIGITAL_SIGNATURE, KEY_ENCIPHERMENT
+// or KEY_AGREEMENT
+
+ szOID_PKIX_KP_SERVER_AUTH = '1.3.6.1.5.5.7.3.1';
+ {$EXTERNALSYM szOID_PKIX_KP_SERVER_AUTH}
+
+// Consistent key usage bits: DIGITAL_SIGNATURE
+
+ szOID_PKIX_KP_CLIENT_AUTH = '1.3.6.1.5.5.7.3.2';
+ {$EXTERNALSYM szOID_PKIX_KP_CLIENT_AUTH}
+
+// Consistent key usage bits: DIGITAL_SIGNATURE
+
+ szOID_PKIX_KP_CODE_SIGNING = '1.3.6.1.5.5.7.3.3';
+ {$EXTERNALSYM szOID_PKIX_KP_CODE_SIGNING}
+
+// Consistent key usage bits: DIGITAL_SIGNATURE, NON_REPUDIATION and/or
+// (KEY_ENCIPHERMENT or KEY_AGREEMENT)
+
+ szOID_PKIX_KP_EMAIL_PROTECTION = '1.3.6.1.5.5.7.3.4';
+ {$EXTERNALSYM szOID_PKIX_KP_EMAIL_PROTECTION}
+
+// Consistent key usage bits: DIGITAL_SIGNATURE and/or
+// (KEY_ENCIPHERMENT or KEY_AGREEMENT)
+
+ szOID_PKIX_KP_IPSEC_END_SYSTEM = '1.3.6.1.5.5.7.3.5';
+ {$EXTERNALSYM szOID_PKIX_KP_IPSEC_END_SYSTEM}
+
+// Consistent key usage bits: DIGITAL_SIGNATURE and/or
+// (KEY_ENCIPHERMENT or KEY_AGREEMENT)
+
+ szOID_PKIX_KP_IPSEC_TUNNEL = '1.3.6.1.5.5.7.3.6';
+ {$EXTERNALSYM szOID_PKIX_KP_IPSEC_TUNNEL}
+
+// Consistent key usage bits: DIGITAL_SIGNATURE and/or
+// (KEY_ENCIPHERMENT or KEY_AGREEMENT)
+
+ szOID_PKIX_KP_IPSEC_USER = '1.3.6.1.5.5.7.3.7';
+ {$EXTERNALSYM szOID_PKIX_KP_IPSEC_USER}
+
+// Consistent key usage bits: DIGITAL_SIGNATURE or NON_REPUDIATION
+
+ szOID_PKIX_KP_TIMESTAMP_SIGNING = '1.3.6.1.5.5.7.3.8';
+ {$EXTERNALSYM szOID_PKIX_KP_TIMESTAMP_SIGNING}
+
+//+-------------------------------------------------------------------------
+// Microsoft Enhanced Key Usage (Purpose) Object Identifiers
+//+-------------------------------------------------------------------------
+
+// Signer of CTLs
+
+ szOID_KP_CTL_USAGE_SIGNING = '1.3.6.1.4.1.311.10.3.1';
+ {$EXTERNALSYM szOID_KP_CTL_USAGE_SIGNING}
+
+// Signer of TimeStamps
+
+ szOID_KP_TIME_STAMP_SIGNING = '1.3.6.1.4.1.311.10.3.2';
+ {$EXTERNALSYM szOID_KP_TIME_STAMP_SIGNING}
+
+ szOID_SERVER_GATED_CRYPTO = '1.3.6.1.4.1.311.10.3.3';
+ {$EXTERNALSYM szOID_SERVER_GATED_CRYPTO}
+
+ szOID_SGC_NETSCAPE = '2.16.840.1.113730.4.1';
+ {$EXTERNALSYM szOID_SGC_NETSCAPE}
+
+ szOID_KP_EFS = '1.3.6.1.4.1.311.10.3.4';
+ {$EXTERNALSYM szOID_KP_EFS}
+
+// Can use Windows Hardware Compatible (WHQL)
+
+ szOID_WHQL_CRYPTO = '1.3.6.1.4.1.311.10.3.5';
+ {$EXTERNALSYM szOID_WHQL_CRYPTO}
+
+// Signed by the NT5 build lab
+
+ szOID_NT5_CRYPTO = '1.3.6.1.4.1.311.10.3.6';
+ {$EXTERNALSYM szOID_NT5_CRYPTO}
+
+// Signed by and OEM of WHQL
+
+ szOID_OEM_WHQL_CRYPTO = '1.3.6.1.4.1.311.10.3.7';
+ {$EXTERNALSYM szOID_OEM_WHQL_CRYPTO}
+
+// Signed by the Embedded NT
+
+ szOID_EMBEDDED_NT_CRYPTO = '1.3.6.1.4.1.311.10.3.8';
+ {$EXTERNALSYM szOID_EMBEDDED_NT_CRYPTO}
+
+ szOID_DRM = '1.3.6.1.4.1.311.10.5.1';
+ {$EXTERNALSYM szOID_DRM}
+
+ szOID_LICENSES = '1.3.6.1.4.1.311.10.6.1';
+ {$EXTERNALSYM szOID_LICENSES}
+
+ szOID_LICENSE_SERVER = '1.3.6.1.4.1.311.10.6.2';
+ {$EXTERNALSYM szOID_LICENSE_SERVER}
+
+ szOID_KP_SMARTCARD_LOGON = '1.3.6.1.4.1.311.20.2.2';
+ {$EXTERNALSYM szOID_KP_SMARTCARD_LOGON}
+
+//+-------------------------------------------------------------------------
+// Microsoft Attribute Object Identifiers
+//+-------------------------------------------------------------------------
+
+ szOID_YESNO_TRUST_ATTR = '1.3.6.1.4.1.311.10.4.1';
+ {$EXTERNALSYM szOID_YESNO_TRUST_ATTR}
+
+//+-------------------------------------------------------------------------
+// Qualifiers that may be part of the szOID_CERT_POLICIES and
+// szOID_CERT_POLICIES95 extensions
+//+-------------------------------------------------------------------------
+
+ szOID_PKIX_POLICY_QUALIFIER_CPS = '1.3.6.1.5.5.7.2.1';
+ {$EXTERNALSYM szOID_PKIX_POLICY_QUALIFIER_CPS}
+ szOID_PKIX_POLICY_QUALIFIER_USERNOTICE = '1.3.6.1.5.5.7.2.2';
+ {$EXTERNALSYM szOID_PKIX_POLICY_QUALIFIER_USERNOTICE}
+
+// OID for old qualifer
+
+ szOID_CERT_POLICIES_95_QUALIFIER1 = '2.16.840.1.113733.1.7.1.1';
+ {$EXTERNALSYM szOID_CERT_POLICIES_95_QUALIFIER1}
+
+//+-------------------------------------------------------------------------
+// X509_CERT
+//
+// The "to be signed" encoded content plus its signature. The ToBeSigned
+// content is the CryptEncodeObject() output for one of the following:
+// X509_CERT_TO_BE_SIGNED, X509_CERT_CRL_TO_BE_SIGNED or
+// X509_CERT_REQUEST_TO_BE_SIGNED.
+//
+// pvStructInfo points to CERT_SIGNED_CONTENT_INFO.
+//--------------------------------------------------------------------------
+
+//+-------------------------------------------------------------------------
+// X509_CERT_TO_BE_SIGNED
+//
+// pvStructInfo points to CERT_INFO.
+//
+// For CryptDecodeObject(), the pbEncoded is the "to be signed" plus its
+// signature (output of a X509_CERT CryptEncodeObject()).
+//
+// For CryptEncodeObject(), the pbEncoded is just the "to be signed".
+//--------------------------------------------------------------------------
+
+//+-------------------------------------------------------------------------
+// X509_CERT_CRL_TO_BE_SIGNED
+//
+// pvStructInfo points to CRL_INFO.
+//
+// For CryptDecodeObject(), the pbEncoded is the "to be signed" plus its
+// signature (output of a X509_CERT CryptEncodeObject()).
+//
+// For CryptEncodeObject(), the pbEncoded is just the "to be signed".
+//--------------------------------------------------------------------------
+
+//+-------------------------------------------------------------------------
+// X509_CERT_REQUEST_TO_BE_SIGNED
+//
+// pvStructInfo points to CERT_REQUEST_INFO.
+//
+// For CryptDecodeObject(), the pbEncoded is the "to be signed" plus its
+// signature (output of a X509_CERT CryptEncodeObject()).
+//
+// For CryptEncodeObject(), the pbEncoded is just the "to be signed".
+//--------------------------------------------------------------------------
+
+//+-------------------------------------------------------------------------
+// X509_EXTENSIONS
+// szOID_CERT_EXTENSIONS
+//
+// pvStructInfo points to following CERT_EXTENSIONS.
+//--------------------------------------------------------------------------
+
+type
+ PCERT_EXTENSIONS = ^CERT_EXTENSIONS;
+ {$EXTERNALSYM PCERT_EXTENSIONS}
+ _CERT_EXTENSIONS = record
+ cExtension: DWORD;
+ rgExtension: PCERT_EXTENSION;
+ end;
+ {$EXTERNALSYM _CERT_EXTENSIONS}
+ CERT_EXTENSIONS = _CERT_EXTENSIONS;
+ {$EXTERNALSYM CERT_EXTENSIONS}
+ TCertExtensions = CERT_EXTENSIONS;
+ PCertExtensions = PCERT_EXTENSIONS;
+
+//+-------------------------------------------------------------------------
+// X509_NAME_VALUE
+// X509_ANY_STRING
+//
+// pvStructInfo points to CERT_NAME_VALUE.
+//--------------------------------------------------------------------------
+
+//+-------------------------------------------------------------------------
+// X509_UNICODE_NAME_VALUE
+// X509_UNICODE_ANY_STRING
+//
+// pvStructInfo points to CERT_NAME_VALUE.
+//
+// The name values are unicode strings.
+//
+// For CryptEncodeObject:
+// Value.pbData points to the unicode string.
+// If Value.cbData = 0, then, the unicode string is NULL terminated.
+// Otherwise, Value.cbData is the unicode string byte count. The byte count
+// is twice the character count.
+//
+// If the unicode string contains an invalid character for the specified
+// dwValueType, then, *pcbEncoded is updated with the unicode character
+// index of the first invalid character. LastError is set to:
+// CRYPT_E_INVALID_NUMERIC_STRING, CRYPT_E_INVALID_PRINTABLE_STRING or
+// CRYPT_E_INVALID_IA5_STRING.
+//
+// To disable the above check, either set CERT_RDN_DISABLE_CHECK_TYPE_FLAG
+// in dwValueType or set CRYPT_UNICODE_NAME_ENCODE_DISABLE_CHECK_TYPE_FLAG
+// in dwFlags passed to CryptEncodeObjectEx.
+//
+// The unicode string is converted before being encoded according to
+// the specified dwValueType. If dwValueType is set to 0, LastError
+// is set to E_INVALIDARG.
+//
+// If the dwValueType isn't one of the character strings (its a
+// CERT_RDN_ENCODED_BLOB or CERT_RDN_OCTET_STRING), then, CryptEncodeObject
+// will return FALSE with LastError set to CRYPT_E_NOT_CHAR_STRING.
+//
+// For CryptDecodeObject:
+// Value.pbData points to a NULL terminated unicode string. Value.cbData
+// contains the byte count of the unicode string excluding the NULL
+// terminator. dwValueType contains the type used in the encoded object.
+// Its not forced to CERT_RDN_UNICODE_STRING. The encoded value is
+// converted to the unicode string according to the dwValueType.
+//
+// If the encoded object isn't one of the character string types, then,
+// CryptDecodeObject will return FALSE with LastError set to
+// CRYPT_E_NOT_CHAR_STRING. For a non character string, decode using
+// X509_NAME_VALUE or X509_ANY_STRING.
+//
+// By default, CERT_RDN_T61_STRING values are initially decoded
+// as UTF8. If the UTF8 decoding fails, then, decoded as 8 bit characters.
+// Set CRYPT_UNICODE_NAME_DECODE_DISABLE_IE4_UTF8_FLAG in dwFlags
+// passed to either CryptDecodeObject or CryptDecodeObjectEx to
+// skip the initial attempt to decode as UTF8.
+//--------------------------------------------------------------------------
+
+//+-------------------------------------------------------------------------
+// X509_NAME
+//
+// pvStructInfo points to CERT_NAME_INFO.
+//--------------------------------------------------------------------------
+
+//+-------------------------------------------------------------------------
+// X509_UNICODE_NAME
+//
+// pvStructInfo points to CERT_NAME_INFO.
+//
+// The RDN attribute values are unicode strings except for the dwValueTypes of
+// CERT_RDN_ENCODED_BLOB or CERT_RDN_OCTET_STRING. These dwValueTypes are
+// the same as for a X509_NAME. Their values aren't converted to/from unicode.
+//
+// For CryptEncodeObject:
+// Value.pbData points to the unicode string.
+// If Value.cbData = 0, then, the unicode string is NULL terminated.
+// Otherwise, Value.cbData is the unicode string byte count. The byte count
+// is twice the character count.
+//
+// If dwValueType = 0 (CERT_RDN_ANY_TYPE), the pszObjId is used to find
+// an acceptable dwValueType. If the unicode string contains an
+// invalid character for the found or specified dwValueType, then,
+// *pcbEncoded is updated with the error location of the invalid character.
+// See below for details. LastError is set to:
+// CRYPT_E_INVALID_NUMERIC_STRING, CRYPT_E_INVALID_PRINTABLE_STRING or
+// CRYPT_E_INVALID_IA5_STRING.
+//
+// To disable the above check, either set CERT_RDN_DISABLE_CHECK_TYPE_FLAG
+// in dwValueType or set CRYPT_UNICODE_NAME_ENCODE_DISABLE_CHECK_TYPE_FLAG
+// in dwFlags passed to CryptEncodeObjectEx.
+//
+// Set CERT_RDN_UNICODE_STRING in dwValueType or set
+// CRYPT_UNICODE_NAME_ENCODE_ENABLE_T61_UNICODE_FLAG in dwFlags passed
+// to CryptEncodeObjectEx to select CERT_RDN_T61_STRING instead of
+// CERT_RDN_UNICODE_STRING if all the unicode characters are <= 0xFF.
+//
+// Set CERT_RDN_ENABLE_UTF8_UNICODE_STRING in dwValueType or set
+// CRYPT_UNICODE_NAME_ENCODE_ENABLE_UTF8_UNICODE_FLAG in dwFlags passed
+// to CryptEncodeObjectEx to select CERT_RDN_UTF8_STRING instead of
+// CERT_RDN_UNICODE_STRING.
+//
+// The unicode string is converted before being encoded according to
+// the specified or ObjId matching dwValueType.
+//
+// For CryptDecodeObject:
+// Value.pbData points to a NULL terminated unicode string. Value.cbData
+// contains the byte count of the unicode string excluding the NULL
+// terminator. dwValueType contains the type used in the encoded object.
+// Its not forced to CERT_RDN_UNICODE_STRING. The encoded value is
+// converted to the unicode string according to the dwValueType.
+//
+// If the dwValueType of the encoded value isn't a character string
+// type, then, it isn't converted to UNICODE. Use the
+// IS_CERT_RDN_CHAR_STRING() macro on the dwValueType to check
+// that Value.pbData points to a converted unicode string.
+//
+// By default, CERT_RDN_T61_STRING values are initially decoded
+// as UTF8. If the UTF8 decoding fails, then, decoded as 8 bit characters.
+// Set CRYPT_UNICODE_NAME_DECODE_DISABLE_IE4_UTF8_FLAG in dwFlags
+// passed to either CryptDecodeObject or CryptDecodeObjectEx to
+// skip the initial attempt to decode as UTF8.
+//--------------------------------------------------------------------------
+
+//+-------------------------------------------------------------------------
+// Unicode Name Value Error Location Definitions
+//
+// Error location is returned in *pcbEncoded by
+// CryptEncodeObject(X509_UNICODE_NAME)
+//
+// Error location consists of:
+// RDN_INDEX - 10 bits << 22
+// ATTR_INDEX - 6 bits << 16
+// VALUE_INDEX - 16 bits (unicode character index)
+//--------------------------------------------------------------------------
+
+const
+ CERT_UNICODE_RDN_ERR_INDEX_MASK = $3FF;
+ {$EXTERNALSYM CERT_UNICODE_RDN_ERR_INDEX_MASK}
+ CERT_UNICODE_RDN_ERR_INDEX_SHIFT = 22;
+ {$EXTERNALSYM CERT_UNICODE_RDN_ERR_INDEX_SHIFT}
+ CERT_UNICODE_ATTR_ERR_INDEX_MASK = $003F;
+ {$EXTERNALSYM CERT_UNICODE_ATTR_ERR_INDEX_MASK}
+ CERT_UNICODE_ATTR_ERR_INDEX_SHIFT = 16;
+ {$EXTERNALSYM CERT_UNICODE_ATTR_ERR_INDEX_SHIFT}
+ CERT_UNICODE_VALUE_ERR_INDEX_MASK = $0000FFFF;
+ {$EXTERNALSYM CERT_UNICODE_VALUE_ERR_INDEX_MASK}
+ CERT_UNICODE_VALUE_ERR_INDEX_SHIFT = 0;
+ {$EXTERNALSYM CERT_UNICODE_VALUE_ERR_INDEX_SHIFT}
+
+function GET_CERT_UNICODE_RDN_ERR_INDEX(X: DWORD): DWORD;
+{$EXTERNALSYM GET_CERT_UNICODE_RDN_ERR_INDEX}
+
+function GET_CERT_UNICODE_ATTR_ERR_INDEX(X: DWORD): DWORD;
+{$EXTERNALSYM GET_CERT_UNICODE_ATTR_ERR_INDEX}
+
+function GET_CERT_UNICODE_VALUE_ERR_INDEX(X: DWORD): DWORD;
+{$EXTERNALSYM GET_CERT_UNICODE_VALUE_ERR_INDEX}
+
+//+-------------------------------------------------------------------------
+// X509_PUBLIC_KEY_INFO
+//
+// pvStructInfo points to CERT_PUBLIC_KEY_INFO.
+//--------------------------------------------------------------------------
+
+//+-------------------------------------------------------------------------
+// X509_AUTHORITY_KEY_ID
+// szOID_AUTHORITY_KEY_IDENTIFIER
+//
+// pvStructInfo points to following CERT_AUTHORITY_KEY_ID_INFO.
+//--------------------------------------------------------------------------
+
+type
+ PCERT_AUTHORITY_KEY_ID_INFO = ^CERT_AUTHORITY_KEY_ID_INFO;
+ {$EXTERNALSYM PCERT_AUTHORITY_KEY_ID_INFO}
+ _CERT_AUTHORITY_KEY_ID_INFO = record
+ KeyId: CRYPT_DATA_BLOB;
+ CertIssuer: CERT_NAME_BLOB;
+ CertSerialNumber: CRYPT_INTEGER_BLOB;
+ end;
+ {$EXTERNALSYM _CERT_AUTHORITY_KEY_ID_INFO}
+ CERT_AUTHORITY_KEY_ID_INFO = _CERT_AUTHORITY_KEY_ID_INFO;
+ {$EXTERNALSYM CERT_AUTHORITY_KEY_ID_INFO}
+ TCertAuthorityKeyIdInfo = CERT_AUTHORITY_KEY_ID_INFO;
+ PCertAuthorityKeyIdInfo = PCERT_AUTHORITY_KEY_ID_INFO;
+
+//+-------------------------------------------------------------------------
+// X509_KEY_ATTRIBUTES
+// szOID_KEY_ATTRIBUTES
+//
+// pvStructInfo points to following CERT_KEY_ATTRIBUTES_INFO.
+//--------------------------------------------------------------------------
+
+ PCERT_PRIVATE_KEY_VALIDITY = ^CERT_PRIVATE_KEY_VALIDITY;
+ {$EXTERNALSYM PCERT_PRIVATE_KEY_VALIDITY}
+ _CERT_PRIVATE_KEY_VALIDITY = record
+ NotBefore: FILETIME;
+ NotAfter: FILETIME;
+ end;
+ {$EXTERNALSYM _CERT_PRIVATE_KEY_VALIDITY}
+ CERT_PRIVATE_KEY_VALIDITY = _CERT_PRIVATE_KEY_VALIDITY;
+ {$EXTERNALSYM CERT_PRIVATE_KEY_VALIDITY}
+ TCertPrivateKeyValidity = CERT_PRIVATE_KEY_VALIDITY;
+ PCertPrivateKeyValidity = PCERT_PRIVATE_KEY_VALIDITY;
+
+ PCERT_KEY_ATTRIBUTES_INFO = ^CERT_KEY_ATTRIBUTES_INFO;
+ {$EXTERNALSYM PCERT_KEY_ATTRIBUTES_INFO}
+ _CERT_KEY_ATTRIBUTES_INFO = record
+ KeyId: CRYPT_DATA_BLOB;
+ IntendedKeyUsage: CRYPT_BIT_BLOB;
+ pPrivateKeyUsagePeriod: PCERT_PRIVATE_KEY_VALIDITY; // OPTIONAL
+ end;
+ {$EXTERNALSYM _CERT_KEY_ATTRIBUTES_INFO}
+ CERT_KEY_ATTRIBUTES_INFO = _CERT_KEY_ATTRIBUTES_INFO;
+ {$EXTERNALSYM CERT_KEY_ATTRIBUTES_INFO}
+ TCertKeyAttributesInfo = CERT_KEY_ATTRIBUTES_INFO;
+ PCertKeyAttributesInfo = PCERT_KEY_ATTRIBUTES_INFO;
+
+// Byte[0]
+
+const
+ CERT_DIGITAL_SIGNATURE_KEY_USAGE = $80;
+ {$EXTERNALSYM CERT_DIGITAL_SIGNATURE_KEY_USAGE}
+ CERT_NON_REPUDIATION_KEY_USAGE = $40;
+ {$EXTERNALSYM CERT_NON_REPUDIATION_KEY_USAGE}
+ CERT_KEY_ENCIPHERMENT_KEY_USAGE = $20;
+ {$EXTERNALSYM CERT_KEY_ENCIPHERMENT_KEY_USAGE}
+ CERT_DATA_ENCIPHERMENT_KEY_USAGE = $10;
+ {$EXTERNALSYM CERT_DATA_ENCIPHERMENT_KEY_USAGE}
+ CERT_KEY_AGREEMENT_KEY_USAGE = $08;
+ {$EXTERNALSYM CERT_KEY_AGREEMENT_KEY_USAGE}
+ CERT_KEY_CERT_SIGN_KEY_USAGE = $04;
+ {$EXTERNALSYM CERT_KEY_CERT_SIGN_KEY_USAGE}
+ CERT_OFFLINE_CRL_SIGN_KEY_USAGE = $02;
+ {$EXTERNALSYM CERT_OFFLINE_CRL_SIGN_KEY_USAGE}
+ CERT_CRL_SIGN_KEY_USAGE = $02;
+ {$EXTERNALSYM CERT_CRL_SIGN_KEY_USAGE}
+ CERT_ENCIPHER_ONLY_KEY_USAGE = $01;
+ {$EXTERNALSYM CERT_ENCIPHER_ONLY_KEY_USAGE}
+
+// Byte[1]
+
+ CERT_DECIPHER_ONLY_KEY_USAGE = $80;
+ {$EXTERNALSYM CERT_DECIPHER_ONLY_KEY_USAGE}
+
+//+-------------------------------------------------------------------------
+// X509_KEY_USAGE_RESTRICTION
+// szOID_KEY_USAGE_RESTRICTION
+//
+// pvStructInfo points to following CERT_KEY_USAGE_RESTRICTION_INFO.
+//--------------------------------------------------------------------------
+
+type
+ PCERT_POLICY_ID = ^CERT_POLICY_ID;
+ {$EXTERNALSYM PCERT_POLICY_ID}
+ _CERT_POLICY_ID = record
+ cCertPolicyElementId: DWORD;
+ rgpszCertPolicyElementId: LPSTR; // pszObjId
+ end;
+ {$EXTERNALSYM _CERT_POLICY_ID}
+ CERT_POLICY_ID = _CERT_POLICY_ID;
+ {$EXTERNALSYM CERT_POLICY_ID}
+ TCertPolicyId = CERT_POLICY_ID;
+ PCertPolicyId = PCERT_POLICY_ID;
+
+ PCERT_KEY_USAGE_RESTRICTION_INFO = ^CERT_KEY_USAGE_RESTRICTION_INFO;
+ {$EXTERNALSYM PCERT_KEY_USAGE_RESTRICTION_INFO}
+ _CERT_KEY_USAGE_RESTRICTION_INFO = record
+ cCertPolicyId: DWORD;
+ rgCertPolicyId: PCERT_POLICY_ID;
+ RestrictedKeyUsage: CRYPT_BIT_BLOB;
+ end;
+ {$EXTERNALSYM _CERT_KEY_USAGE_RESTRICTION_INFO}
+ CERT_KEY_USAGE_RESTRICTION_INFO = _CERT_KEY_USAGE_RESTRICTION_INFO;
+ {$EXTERNALSYM CERT_KEY_USAGE_RESTRICTION_INFO}
+ TCertKeyUsageRestrictionInfo = CERT_KEY_USAGE_RESTRICTION_INFO;
+ PCertKeyUsageRestrictionInfo = PCERT_KEY_USAGE_RESTRICTION_INFO;
+
+// See CERT_KEY_ATTRIBUTES_INFO for definition of the RestrictedKeyUsage bits
+
+//+-------------------------------------------------------------------------
+// X509_ALTERNATE_NAME
+// szOID_SUBJECT_ALT_NAME
+// szOID_ISSUER_ALT_NAME
+// szOID_SUBJECT_ALT_NAME2
+// szOID_ISSUER_ALT_NAME2
+//
+// pvStructInfo points to following CERT_ALT_NAME_INFO.
+//--------------------------------------------------------------------------
+
+ PCERT_OTHER_NAME = ^CERT_OTHER_NAME;
+ {$EXTERNALSYM PCERT_OTHER_NAME}
+ _CERT_OTHER_NAME = record
+ pszObjId: LPSTR;
+ Value: CRYPT_OBJID_BLOB;
+ end;
+ {$EXTERNALSYM _CERT_OTHER_NAME}
+ CERT_OTHER_NAME = _CERT_OTHER_NAME;
+ {$EXTERNALSYM CERT_OTHER_NAME}
+ TCertOtherName = CERT_OTHER_NAME;
+ PCertOtherName = PCERT_OTHER_NAME;
+
+ PCERT_ALT_NAME_ENTRY = ^CERT_ALT_NAME_ENTRY;
+ {$EXTERNALSYM PCERT_ALT_NAME_ENTRY}
+ _CERT_ALT_NAME_ENTRY = record
+ dwAltNameChoice: DWORD;
+ //union {
+ case Integer of
+ 0: (pOtherName: PCERT_OTHER_NAME); // 1
+ 1: (pwszRfc822Name: LPWSTR); // 2 (encoded IA5)
+ 2: (pwszDNSName: LPWSTR); // 3 (encoded IA5)
+ 3: ();// Not implemented x400Address; // 4
+ 4: (DirectoryName: CERT_NAME_BLOB); // 5
+ 5: ();// Not implemented pEdiPartyName; // 6
+ 6: (pwszURL: LPWSTR); // 7 (encoded IA5)
+ 7: (IPAddress: CRYPT_DATA_BLOB); // 8 (Octet String)
+ 8: (pszRegisteredID: LPSTR); // 9 (Object Identifer)
+ end;
+ {$EXTERNALSYM _CERT_ALT_NAME_ENTRY}
+ CERT_ALT_NAME_ENTRY = _CERT_ALT_NAME_ENTRY;
+ {$EXTERNALSYM CERT_ALT_NAME_ENTRY}
+ TCertAltNameEntry = CERT_ALT_NAME_ENTRY;
+ PCertAltNameEntry = PCERT_ALT_NAME_ENTRY;
+
+const
+ CERT_ALT_NAME_OTHER_NAME = 1;
+ {$EXTERNALSYM CERT_ALT_NAME_OTHER_NAME}
+ CERT_ALT_NAME_RFC822_NAME = 2;
+ {$EXTERNALSYM CERT_ALT_NAME_RFC822_NAME}
+ CERT_ALT_NAME_DNS_NAME = 3;
+ {$EXTERNALSYM CERT_ALT_NAME_DNS_NAME}
+ CERT_ALT_NAME_X400_ADDRESS = 4;
+ {$EXTERNALSYM CERT_ALT_NAME_X400_ADDRESS}
+ CERT_ALT_NAME_DIRECTORY_NAME = 5;
+ {$EXTERNALSYM CERT_ALT_NAME_DIRECTORY_NAME}
+ CERT_ALT_NAME_EDI_PARTY_NAME = 6;
+ {$EXTERNALSYM CERT_ALT_NAME_EDI_PARTY_NAME}
+ CERT_ALT_NAME_URL = 7;
+ {$EXTERNALSYM CERT_ALT_NAME_URL}
+ CERT_ALT_NAME_IP_ADDRESS = 8;
+ {$EXTERNALSYM CERT_ALT_NAME_IP_ADDRESS}
+ CERT_ALT_NAME_REGISTERED_ID = 9;
+ {$EXTERNALSYM CERT_ALT_NAME_REGISTERED_ID}
+
+type
+ PCERT_ALT_NAME_INFO = ^CERT_ALT_NAME_INFO;
+ {$EXTERNALSYM PCERT_ALT_NAME_INFO}
+ _CERT_ALT_NAME_INFO = record
+ cAltEntry: DWORD;
+ rgAltEntry: PCERT_ALT_NAME_ENTRY;
+ end;
+ {$EXTERNALSYM _CERT_ALT_NAME_INFO}
+ CERT_ALT_NAME_INFO = _CERT_ALT_NAME_INFO;
+ {$EXTERNALSYM CERT_ALT_NAME_INFO}
+ TCertAltNameInfo = CERT_ALT_NAME_INFO;
+ PCertAltNameInfo = PCERT_ALT_NAME_INFO;
+
+//+-------------------------------------------------------------------------
+// Alternate name IA5 Error Location Definitions for
+// CRYPT_E_INVALID_IA5_STRING.
+//
+// Error location is returned in *pcbEncoded by
+// CryptEncodeObject(X509_ALTERNATE_NAME)
+//
+// Error location consists of:
+// ENTRY_INDEX - 8 bits << 16
+// VALUE_INDEX - 16 bits (unicode character index)
+//--------------------------------------------------------------------------
+
+const
+ CERT_ALT_NAME_ENTRY_ERR_INDEX_MASK = $FF;
+ {$EXTERNALSYM CERT_ALT_NAME_ENTRY_ERR_INDEX_MASK}
+ CERT_ALT_NAME_ENTRY_ERR_INDEX_SHIFT = 16;
+ {$EXTERNALSYM CERT_ALT_NAME_ENTRY_ERR_INDEX_SHIFT}
+ CERT_ALT_NAME_VALUE_ERR_INDEX_MASK = $0000FFFF;
+ {$EXTERNALSYM CERT_ALT_NAME_VALUE_ERR_INDEX_MASK}
+ CERT_ALT_NAME_VALUE_ERR_INDEX_SHIFT = 0;
+ {$EXTERNALSYM CERT_ALT_NAME_VALUE_ERR_INDEX_SHIFT}
+
+function GET_CERT_ALT_NAME_ENTRY_ERR_INDEX(X: DWORD): DWORD;
+{$EXTERNALSYM GET_CERT_ALT_NAME_ENTRY_ERR_INDEX}
+
+function GET_CERT_ALT_NAME_VALUE_ERR_INDEX(X: DWORD): DWORD;
+{$EXTERNALSYM GET_CERT_ALT_NAME_VALUE_ERR_INDEX}
+
+//+-------------------------------------------------------------------------
+// X509_BASIC_CONSTRAINTS
+// szOID_BASIC_CONSTRAINTS
+//
+// pvStructInfo points to following CERT_BASIC_CONSTRAINTS_INFO.
+//--------------------------------------------------------------------------
+
+type
+ PCERT_BASIC_CONSTRAINTS_INFO = ^CERT_BASIC_CONSTRAINTS_INFO;
+ {$EXTERNALSYM PCERT_BASIC_CONSTRAINTS_INFO}
+ _CERT_BASIC_CONSTRAINTS_INFO = record
+ SubjectType: CRYPT_BIT_BLOB;
+ fPathLenConstraint: BOOL;
+ dwPathLenConstraint: DWORD;
+ cSubtreesConstraint: DWORD;
+ rgSubtreesConstraint: PCERT_NAME_BLOB;
+ end;
+ {$EXTERNALSYM _CERT_BASIC_CONSTRAINTS_INFO}
+ CERT_BASIC_CONSTRAINTS_INFO = _CERT_BASIC_CONSTRAINTS_INFO;
+ {$EXTERNALSYM CERT_BASIC_CONSTRAINTS_INFO}
+ TCertBasicConstraintsInfo = CERT_BASIC_CONSTRAINTS_INFO;
+ PCertBasicConstraintsInfo = PCERT_BASIC_CONSTRAINTS_INFO;
+
+const
+ CERT_CA_SUBJECT_FLAG = $80;
+ {$EXTERNALSYM CERT_CA_SUBJECT_FLAG}
+ CERT_END_ENTITY_SUBJECT_FLAG = $40;
+ {$EXTERNALSYM CERT_END_ENTITY_SUBJECT_FLAG}
+
+//+-------------------------------------------------------------------------
+// X509_BASIC_CONSTRAINTS2
+// szOID_BASIC_CONSTRAINTS2
+//
+// pvStructInfo points to following CERT_BASIC_CONSTRAINTS2_INFO.
+//--------------------------------------------------------------------------
+
+type
+ PCERT_BASIC_CONSTRAINTS2_INFO = ^CERT_BASIC_CONSTRAINTS2_INFO;
+ {$EXTERNALSYM PCERT_BASIC_CONSTRAINTS2_INFO}
+ _CERT_BASIC_CONSTRAINTS2_INFO = record
+ fCA: BOOL;
+ fPathLenConstraint: BOOL;
+ dwPathLenConstraint: DWORD;
+ end;
+ {$EXTERNALSYM _CERT_BASIC_CONSTRAINTS2_INFO}
+ CERT_BASIC_CONSTRAINTS2_INFO = _CERT_BASIC_CONSTRAINTS2_INFO;
+ {$EXTERNALSYM CERT_BASIC_CONSTRAINTS2_INFO}
+ TCertBasicConstraints2Info = CERT_BASIC_CONSTRAINTS2_INFO;
+ PCertBasicConstraints2Info = PCERT_BASIC_CONSTRAINTS2_INFO;
+
+//+-------------------------------------------------------------------------
+// X509_KEY_USAGE
+// szOID_KEY_USAGE
+//
+// pvStructInfo points to a CRYPT_BIT_BLOB. Has same bit definitions as
+// CERT_KEY_ATTRIBUTES_INFO's IntendedKeyUsage.
+//--------------------------------------------------------------------------
+
+//+-------------------------------------------------------------------------
+// X509_CERT_POLICIES
+// szOID_CERT_POLICIES
+// szOID_CERT_POLICIES_95 NOTE--Only allowed for decoding!!!
+//
+// pvStructInfo points to following CERT_POLICIES_INFO.
+//
+// NOTE: when decoding using szOID_CERT_POLICIES_95 the pszPolicyIdentifier
+// may contain an empty string
+//--------------------------------------------------------------------------
+
+ PCERT_POLICY_QUALIFIER_INFO = ^CERT_POLICY_QUALIFIER_INFO;
+ {$EXTERNALSYM PCERT_POLICY_QUALIFIER_INFO}
+ _CERT_POLICY_QUALIFIER_INFO = record
+ pszPolicyQualifierId: LPSTR; // pszObjId
+ Qualifier: CRYPT_OBJID_BLOB; // optional
+ end;
+ {$EXTERNALSYM _CERT_POLICY_QUALIFIER_INFO}
+ CERT_POLICY_QUALIFIER_INFO = _CERT_POLICY_QUALIFIER_INFO;
+ {$EXTERNALSYM CERT_POLICY_QUALIFIER_INFO}
+ TCertPolicyQualifierInfo = CERT_POLICY_QUALIFIER_INFO;
+ PCertPolicyQualifierInfo = PCERT_POLICY_QUALIFIER_INFO;
+
+ PCERT_POLICY_INFO = ^CERT_POLICY_INFO;
+ {$EXTERNALSYM PCERT_POLICY_INFO}
+ _CERT_POLICY_INFO = record
+ pszPolicyIdentifier: LPSTR; // pszObjId
+ cPolicyQualifier: DWORD; // optional
+ rgPolicyQualifier: PCERT_POLICY_QUALIFIER_INFO;
+ end;
+ {$EXTERNALSYM _CERT_POLICY_INFO}
+ CERT_POLICY_INFO = _CERT_POLICY_INFO;
+ {$EXTERNALSYM CERT_POLICY_INFO}
+ TCertPolicyInfo = CERT_POLICY_INFO;
+ PCertPolicyInfo = PCERT_POLICY_INFO;
+
+ PCERT_POLICIES_INFO = ^CERT_POLICIES_INFO;
+ {$EXTERNALSYM PCERT_POLICIES_INFO}
+ _CERT_POLICIES_INFO = record
+ cPolicyInfo: DWORD;
+ rgPolicyInfo: PCERT_POLICY_INFO;
+ end;
+ {$EXTERNALSYM _CERT_POLICIES_INFO}
+ CERT_POLICIES_INFO = _CERT_POLICIES_INFO;
+ {$EXTERNALSYM CERT_POLICIES_INFO}
+ TCertPoliciesInfo = CERT_POLICIES_INFO;
+ PCertPoliciesInfo = PCERT_POLICIES_INFO;
+
+//+-------------------------------------------------------------------------
+// X509_PKIX_POLICY_QUALIFIER_USERNOTICE
+// szOID_PKIX_POLICY_QUALIFIER_USERNOTICE
+//
+// pvStructInfo points to following CERT_POLICY_QUALIFIER_USER_NOTICE.
+//
+//--------------------------------------------------------------------------
+
+ PCERT_POLICY_QUALIFIER_NOTICE_REFERENCE = ^CERT_POLICY_QUALIFIER_NOTICE_REFERENCE;
+ {$EXTERNALSYM PCERT_POLICY_QUALIFIER_NOTICE_REFERENCE}
+ _CERT_POLICY_QUALIFIER_NOTICE_REFERENCE = record
+ pszOrganization: LPSTR;
+ cNoticeNumbers: DWORD;
+ rgNoticeNumbers: LPINT;
+ end;
+ {$EXTERNALSYM _CERT_POLICY_QUALIFIER_NOTICE_REFERENCE}
+ CERT_POLICY_QUALIFIER_NOTICE_REFERENCE = _CERT_POLICY_QUALIFIER_NOTICE_REFERENCE;
+ {$EXTERNALSYM CERT_POLICY_QUALIFIER_NOTICE_REFERENCE}
+ TCertPolicyQualifierNoticeReference = CERT_POLICY_QUALIFIER_NOTICE_REFERENCE;
+ PCertPolicyQualifierNoticeReference = PCERT_POLICY_QUALIFIER_NOTICE_REFERENCE;
+
+ PCERT_POLICY_QUALIFIER_USER_NOTICE = ^CERT_POLICY_QUALIFIER_USER_NOTICE;
+ {$EXTERNALSYM PCERT_POLICY_QUALIFIER_USER_NOTICE}
+ _CERT_POLICY_QUALIFIER_USER_NOTICE = record
+ pNoticeReference: PCERT_POLICY_QUALIFIER_NOTICE_REFERENCE; // optional
+ pszDisplayText: LPWSTR; // optional
+ end;
+ {$EXTERNALSYM _CERT_POLICY_QUALIFIER_USER_NOTICE}
+ CERT_POLICY_QUALIFIER_USER_NOTICE = _CERT_POLICY_QUALIFIER_USER_NOTICE;
+ {$EXTERNALSYM CERT_POLICY_QUALIFIER_USER_NOTICE}
+ TCertPolicyQualifierUserNotice = CERT_POLICY_QUALIFIER_USER_NOTICE;
+ PCertPolicyQualifierUserNotice = PCERT_POLICY_QUALIFIER_USER_NOTICE;
+
+//+-------------------------------------------------------------------------
+// szOID_CERT_POLICIES_95_QUALIFIER1 - Decode Only!!!!
+//
+// pvStructInfo points to following CERT_POLICY95_QUALIFIER1.
+//
+//--------------------------------------------------------------------------
+
+ PCPS_URLS = ^CPS_URLS;
+ {$EXTERNALSYM PCPS_URLS}
+ _CPS_URLS = record
+ pszURL: LPWSTR;
+ pAlgorithm: PCRYPT_ALGORITHM_IDENTIFIER; // optional
+ pDigest: PCRYPT_DATA_BLOB; // optional
+ end;
+ {$EXTERNALSYM _CPS_URLS}
+ CPS_URLS = _CPS_URLS;
+ {$EXTERNALSYM CPS_URLS}
+ TCpsUrls = CPS_URLS;
+ PCpsUrls = PCPS_URLS;
+
+ PCERT_POLICY95_QUALIFIER1 = ^CERT_POLICY95_QUALIFIER1;
+ {$EXTERNALSYM PCERT_POLICY95_QUALIFIER1}
+ _CERT_POLICY95_QUALIFIER1 = record
+ pszPracticesReference: LPWSTR; // optional
+ pszNoticeIdentifier: LPSTR; // optional
+ pszNSINoticeIdentifier: LPSTR; // optional
+ cCPSURLs: DWORD;
+ rgCPSURLs: PCPS_URLS; // optional
+ end;
+ {$EXTERNALSYM _CERT_POLICY95_QUALIFIER1}
+ CERT_POLICY95_QUALIFIER1 = _CERT_POLICY95_QUALIFIER1;
+ {$EXTERNALSYM CERT_POLICY95_QUALIFIER1}
+ TCertPolicy95Qualifier1 = CERT_POLICY95_QUALIFIER1;
+ PCertPolicy95Qualifier1 = PCERT_POLICY95_QUALIFIER1;
+
+//+-------------------------------------------------------------------------
+// RSA_CSP_PUBLICKEYBLOB
+//
+// pvStructInfo points to a PUBLICKEYSTRUC immediately followed by a
+// RSAPUBKEY and the modulus bytes.
+//
+// CryptExportKey outputs the above StructInfo for a dwBlobType of
+// PUBLICKEYBLOB. CryptImportKey expects the above StructInfo when
+// importing a public key.
+//
+// For dwCertEncodingType = X509_ASN_ENCODING, the RSA_CSP_PUBLICKEYBLOB is
+// encoded as a PKCS #1 RSAPublicKey consisting of a SEQUENCE of a
+// modulus INTEGER and a publicExponent INTEGER. The modulus is encoded
+// as being a unsigned integer. When decoded, if the modulus was encoded
+// as unsigned integer with a leading 0 byte, the 0 byte is removed before
+// converting to the CSP modulus bytes.
+//
+// For decode, the aiKeyAlg field of PUBLICKEYSTRUC is always set to
+// CALG_RSA_KEYX.
+//--------------------------------------------------------------------------
+
+//+-------------------------------------------------------------------------
+// X509_KEYGEN_REQUEST_TO_BE_SIGNED
+//
+// pvStructInfo points to CERT_KEYGEN_REQUEST_INFO.
+//
+// For CryptDecodeObject(), the pbEncoded is the "to be signed" plus its
+// signature (output of a X509_CERT CryptEncodeObject()).
+//
+// For CryptEncodeObject(), the pbEncoded is just the "to be signed".
+//--------------------------------------------------------------------------
+
+//+-------------------------------------------------------------------------
+// PKCS_ATTRIBUTE data structure
+//
+// pvStructInfo points to a CRYPT_ATTRIBUTE.
+//--------------------------------------------------------------------------
+
+//+-------------------------------------------------------------------------
+// PKCS_ATTRIBUTES data structure
+//
+// pvStructInfo points to a CRYPT_ATTRIBUTES.
+//--------------------------------------------------------------------------
+
+//+-------------------------------------------------------------------------
+// PKCS_CONTENT_INFO_SEQUENCE_OF_ANY data structure
+//
+// pvStructInfo points to following CRYPT_CONTENT_INFO_SEQUENCE_OF_ANY.
+//
+// For X509_ASN_ENCODING: encoded as a PKCS#7 ContentInfo structure wrapping
+// a sequence of ANY. The value of the contentType field is pszObjId,
+// while the content field is the following structure:
+// SequenceOfAny ::= SEQUENCE OF ANY
+//
+// The CRYPT_DER_BLOBs point to the already encoded ANY content.
+//--------------------------------------------------------------------------
+
+ PCRYPT_CONTENT_INFO_SEQUENCE_OF_ANY = ^CRYPT_CONTENT_INFO_SEQUENCE_OF_ANY;
+ {$EXTERNALSYM PCRYPT_CONTENT_INFO_SEQUENCE_OF_ANY}
+ _CRYPT_CONTENT_INFO_SEQUENCE_OF_ANY = record
+ pszObjId: LPSTR;
+ cValue: DWORD;
+ rgValue: PCRYPT_DER_BLOB;
+ end;
+ {$EXTERNALSYM _CRYPT_CONTENT_INFO_SEQUENCE_OF_ANY}
+ CRYPT_CONTENT_INFO_SEQUENCE_OF_ANY = _CRYPT_CONTENT_INFO_SEQUENCE_OF_ANY;
+ {$EXTERNALSYM CRYPT_CONTENT_INFO_SEQUENCE_OF_ANY}
+ TCryptContentInfoSequenceOfAny = CRYPT_CONTENT_INFO_SEQUENCE_OF_ANY;
+ PCryptContentInfoSequenceOfAny = PCRYPT_CONTENT_INFO_SEQUENCE_OF_ANY;
+
+//+-------------------------------------------------------------------------
+// PKCS_CONTENT_INFO data structure
+//
+// pvStructInfo points to following CRYPT_CONTENT_INFO.
+//
+// For X509_ASN_ENCODING: encoded as a PKCS#7 ContentInfo structure.
+// The CRYPT_DER_BLOB points to the already encoded ANY content.
+//--------------------------------------------------------------------------
+
+ PCRYPT_CONTENT_INFO = ^CRYPT_CONTENT_INFO;
+ {$EXTERNALSYM PCRYPT_CONTENT_INFO}
+ _CRYPT_CONTENT_INFO = record
+ pszObjId: LPSTR;
+ Content: CRYPT_DER_BLOB;
+ end;
+ {$EXTERNALSYM _CRYPT_CONTENT_INFO}
+ CRYPT_CONTENT_INFO = _CRYPT_CONTENT_INFO;
+ {$EXTERNALSYM CRYPT_CONTENT_INFO}
+ TCryptContentInfo = CRYPT_CONTENT_INFO;
+ PCryptContentInfo = PCRYPT_CONTENT_INFO;
+
+//+-------------------------------------------------------------------------
+// X509_OCTET_STRING data structure
+//
+// pvStructInfo points to a CRYPT_DATA_BLOB.
+//--------------------------------------------------------------------------
+
+//+-------------------------------------------------------------------------
+// X509_BITS data structure
+//
+// pvStructInfo points to a CRYPT_BIT_BLOB.
+//--------------------------------------------------------------------------
+
+//+-------------------------------------------------------------------------
+// X509_BITS_WITHOUT_TRAILING_ZEROES data structure
+//
+// pvStructInfo points to a CRYPT_BIT_BLOB.
+//
+// The same as X509_BITS, except before encoding, the bit length is
+// decremented to exclude trailing zero bits.
+//--------------------------------------------------------------------------
+
+//+-------------------------------------------------------------------------
+// X509_INTEGER data structure
+//
+// pvStructInfo points to an int.
+//--------------------------------------------------------------------------
+
+//+-------------------------------------------------------------------------
+// X509_MULTI_BYTE_INTEGER data structure
+//
+// pvStructInfo points to a CRYPT_INTEGER_BLOB.
+//--------------------------------------------------------------------------
+
+//+-------------------------------------------------------------------------
+// X509_ENUMERATED data structure
+//
+// pvStructInfo points to an int containing the enumerated value
+//--------------------------------------------------------------------------
+
+//+-------------------------------------------------------------------------
+// X509_CHOICE_OF_TIME data structure
+//
+// pvStructInfo points to a FILETIME.
+//--------------------------------------------------------------------------
+
+//+-------------------------------------------------------------------------
+// X509_SEQUENCE_OF_ANY data structure
+//
+// pvStructInfo points to following CRYPT_SEQUENCE_OF_ANY.
+//
+// The CRYPT_DER_BLOBs point to the already encoded ANY content.
+//--------------------------------------------------------------------------
+
+ PCRYPT_SEQUENCE_OF_ANY = ^CRYPT_SEQUENCE_OF_ANY;
+ {$EXTERNALSYM PCRYPT_SEQUENCE_OF_ANY}
+ _CRYPT_SEQUENCE_OF_ANY = record
+ cValue: DWORD;
+ rgValue: PCRYPT_DER_BLOB;
+ end;
+ {$EXTERNALSYM _CRYPT_SEQUENCE_OF_ANY}
+ CRYPT_SEQUENCE_OF_ANY = _CRYPT_SEQUENCE_OF_ANY;
+ {$EXTERNALSYM CRYPT_SEQUENCE_OF_ANY}
+ TCryptSequenceOfAny = CRYPT_SEQUENCE_OF_ANY;
+ PCryptSequenceOfAny = PCRYPT_SEQUENCE_OF_ANY;
+
+//+-------------------------------------------------------------------------
+// X509_AUTHORITY_KEY_ID2
+// szOID_AUTHORITY_KEY_IDENTIFIER2
+//
+// pvStructInfo points to following CERT_AUTHORITY_KEY_ID2_INFO.
+//
+// For CRYPT_E_INVALID_IA5_STRING, the error location is returned in
+// *pcbEncoded by CryptEncodeObject(X509_AUTHORITY_KEY_ID2)
+//
+// See X509_ALTERNATE_NAME for error location defines.
+//--------------------------------------------------------------------------
+
+ PCERT_AUTHORITY_KEY_ID2_INFO = ^CERT_AUTHORITY_KEY_ID2_INFO;
+ {$EXTERNALSYM PCERT_AUTHORITY_KEY_ID2_INFO}
+ _CERT_AUTHORITY_KEY_ID2_INFO = record
+ KeyId: CRYPT_DATA_BLOB;
+ AuthorityCertIssuer: CERT_ALT_NAME_INFO; // Optional, set cAltEntry
+ // to 0 to omit.
+ AuthorityCertSerialNumber: CRYPT_INTEGER_BLOB;
+ end;
+ {$EXTERNALSYM _CERT_AUTHORITY_KEY_ID2_INFO}
+ CERT_AUTHORITY_KEY_ID2_INFO = _CERT_AUTHORITY_KEY_ID2_INFO;
+ {$EXTERNALSYM CERT_AUTHORITY_KEY_ID2_INFO}
+ TCertAuthorityKeyId2Info = CERT_AUTHORITY_KEY_ID2_INFO;
+ PCertAuthorityKeyId2Info = PCERT_AUTHORITY_KEY_ID2_INFO;
+
+//+-------------------------------------------------------------------------
+// szOID_SUBJECT_KEY_IDENTIFIER
+//
+// pvStructInfo points to a CRYPT_DATA_BLOB.
+//--------------------------------------------------------------------------
+
+//+-------------------------------------------------------------------------
+// X509_AUTHORITY_INFO_ACCESS
+// szOID_AUTHORITY_INFO_ACCESS
+//
+// pvStructInfo points to following CERT_AUTHORITY_INFO_ACCESS.
+//
+// For CRYPT_E_INVALID_IA5_STRING, the error location is returned in
+// *pcbEncoded by CryptEncodeObject(X509_AUTHORITY_INFO_ACCESS)
+//
+// Error location consists of:
+// ENTRY_INDEX - 8 bits << 16
+// VALUE_INDEX - 16 bits (unicode character index)
+//
+// See X509_ALTERNATE_NAME for ENTRY_INDEX and VALUE_INDEX error location
+// defines.
+//--------------------------------------------------------------------------
+
+ PCERT_ACCESS_DESCRIPTION = ^CERT_ACCESS_DESCRIPTION;
+ {$EXTERNALSYM PCERT_ACCESS_DESCRIPTION}
+ _CERT_ACCESS_DESCRIPTION = record
+ pszAccessMethod: LPSTR; // pszObjId
+ AccessLocation: CERT_ALT_NAME_ENTRY;
+ end;
+ {$EXTERNALSYM _CERT_ACCESS_DESCRIPTION}
+ CERT_ACCESS_DESCRIPTION = _CERT_ACCESS_DESCRIPTION;
+ {$EXTERNALSYM CERT_ACCESS_DESCRIPTION}
+ TCertAccessDescription = CERT_ACCESS_DESCRIPTION;
+ PCertAccessDescription = PCERT_ACCESS_DESCRIPTION;
+
+ PCERT_AUTHORITY_INFO_ACCESS = ^CERT_AUTHORITY_INFO_ACCESS;
+ {$EXTERNALSYM PCERT_AUTHORITY_INFO_ACCESS}
+ _CERT_AUTHORITY_INFO_ACCESS = record
+ cAccDescr: DWORD;
+ rgAccDescr: PCERT_ACCESS_DESCRIPTION;
+ end;
+ {$EXTERNALSYM _CERT_AUTHORITY_INFO_ACCESS}
+ CERT_AUTHORITY_INFO_ACCESS = _CERT_AUTHORITY_INFO_ACCESS;
+ {$EXTERNALSYM CERT_AUTHORITY_INFO_ACCESS}
+ TCertAuthorityInfoAccess = CERT_AUTHORITY_INFO_ACCESS;
+ PCertAuthorityInfoAccess = PCERT_AUTHORITY_INFO_ACCESS;
+
+//+-------------------------------------------------------------------------
+// PKIX Access Description: Access Method Object Identifiers
+//--------------------------------------------------------------------------
+
+const
+ szOID_PKIX_ACC_DESCR = '1.3.6.1.5.5.7.48';
+ {$EXTERNALSYM szOID_PKIX_ACC_DESCR}
+ szOID_PKIX_OCSP = '1.3.6.1.5.5.7.48.1';
+ {$EXTERNALSYM szOID_PKIX_OCSP}
+ szOID_PKIX_CA_ISSUERS = '1.3.6.1.5.5.7.48.2';
+ {$EXTERNALSYM szOID_PKIX_CA_ISSUERS}
+
+//+-------------------------------------------------------------------------
+// X509_CRL_REASON_CODE
+// szOID_CRL_REASON_CODE
+//
+// pvStructInfo points to an int which can be set to one of the following
+// enumerated values:
+//--------------------------------------------------------------------------
+
+ CRL_REASON_UNSPECIFIED = 0;
+ {$EXTERNALSYM CRL_REASON_UNSPECIFIED}
+ CRL_REASON_KEY_COMPROMISE = 1;
+ {$EXTERNALSYM CRL_REASON_KEY_COMPROMISE}
+ CRL_REASON_CA_COMPROMISE = 2;
+ {$EXTERNALSYM CRL_REASON_CA_COMPROMISE}
+ CRL_REASON_AFFILIATION_CHANGED = 3;
+ {$EXTERNALSYM CRL_REASON_AFFILIATION_CHANGED}
+ CRL_REASON_SUPERSEDED = 4;
+ {$EXTERNALSYM CRL_REASON_SUPERSEDED}
+ CRL_REASON_CESSATION_OF_OPERATION = 5;
+ {$EXTERNALSYM CRL_REASON_CESSATION_OF_OPERATION}
+ CRL_REASON_CERTIFICATE_HOLD = 6;
+ {$EXTERNALSYM CRL_REASON_CERTIFICATE_HOLD}
+ CRL_REASON_REMOVE_FROM_CRL = 8;
+ {$EXTERNALSYM CRL_REASON_REMOVE_FROM_CRL}
+
+//+-------------------------------------------------------------------------
+// X509_CRL_DIST_POINTS
+// szOID_CRL_DIST_POINTS
+//
+// pvStructInfo points to following CRL_DIST_POINTS_INFO.
+//
+// For CRYPT_E_INVALID_IA5_STRING, the error location is returned in
+// *pcbEncoded by CryptEncodeObject(X509_CRL_DIST_POINTS)
+//
+// Error location consists of:
+// CRL_ISSUER_BIT - 1 bit << 31 (0 for FullName, 1 for CRLIssuer)
+// POINT_INDEX - 7 bits << 24
+// ENTRY_INDEX - 8 bits << 16
+// VALUE_INDEX - 16 bits (unicode character index)
+//
+// See X509_ALTERNATE_NAME for ENTRY_INDEX and VALUE_INDEX error location
+// defines.
+//--------------------------------------------------------------------------
+
+type
+ PCRL_DIST_POINT_NAME = ^CRL_DIST_POINT_NAME;
+ {$EXTERNALSYM PCRL_DIST_POINT_NAME}
+ _CRL_DIST_POINT_NAME = record
+ dwDistPointNameChoice: DWORD;
+ case Integer of
+ 0: (FullName: CERT_ALT_NAME_INFO); // 1
+ 1: ();// Not implemented IssuerRDN; // 2
+ end;
+ {$EXTERNALSYM _CRL_DIST_POINT_NAME}
+ CRL_DIST_POINT_NAME = _CRL_DIST_POINT_NAME;
+ {$EXTERNALSYM CRL_DIST_POINT_NAME}
+ TCrlDistPointName = CRL_DIST_POINT_NAME;
+ PCrlDistPointName = PCRL_DIST_POINT_NAME;
+
+const
+ CRL_DIST_POINT_NO_NAME = 0;
+ {$EXTERNALSYM CRL_DIST_POINT_NO_NAME}
+ CRL_DIST_POINT_FULL_NAME = 1;
+ {$EXTERNALSYM CRL_DIST_POINT_FULL_NAME}
+ CRL_DIST_POINT_ISSUER_RDN_NAME = 2;
+ {$EXTERNALSYM CRL_DIST_POINT_ISSUER_RDN_NAME}
+
+type
+ PCRL_DIST_POINT = ^CRL_DIST_POINT;
+ {$EXTERNALSYM PCRL_DIST_POINT}
+ _CRL_DIST_POINT = record
+ DistPointName: CRL_DIST_POINT_NAME; // OPTIONAL
+ ReasonFlags: CRYPT_BIT_BLOB; // OPTIONAL
+ CRLIssuer: CERT_ALT_NAME_INFO; // OPTIONAL
+ end;
+ {$EXTERNALSYM _CRL_DIST_POINT}
+ CRL_DIST_POINT = _CRL_DIST_POINT;
+ {$EXTERNALSYM CRL_DIST_POINT}
+ TCrlDistPoint = CRL_DIST_POINT;
+ PCrlDistPoint = PCRL_DIST_POINT;
+
+const
+ CRL_REASON_UNUSED_FLAG = $80;
+ {$EXTERNALSYM CRL_REASON_UNUSED_FLAG}
+ CRL_REASON_KEY_COMPROMISE_FLAG = $40;
+ {$EXTERNALSYM CRL_REASON_KEY_COMPROMISE_FLAG}
+ CRL_REASON_CA_COMPROMISE_FLAG = $20;
+ {$EXTERNALSYM CRL_REASON_CA_COMPROMISE_FLAG}
+ CRL_REASON_AFFILIATION_CHANGED_FLAG = $10;
+ {$EXTERNALSYM CRL_REASON_AFFILIATION_CHANGED_FLAG}
+ CRL_REASON_SUPERSEDED_FLAG = $08;
+ {$EXTERNALSYM CRL_REASON_SUPERSEDED_FLAG}
+ CRL_REASON_CESSATION_OF_OPERATION_FLAG = $04;
+ {$EXTERNALSYM CRL_REASON_CESSATION_OF_OPERATION_FLAG}
+ CRL_REASON_CERTIFICATE_HOLD_FLAG = $02;
+ {$EXTERNALSYM CRL_REASON_CERTIFICATE_HOLD_FLAG}
+
+type
+ PCRL_DIST_POINTS_INFO = ^CRL_DIST_POINTS_INFO;
+ {$EXTERNALSYM PCRL_DIST_POINTS_INFO}
+ _CRL_DIST_POINTS_INFO = record
+ cDistPoint: DWORD;
+ rgDistPoint: PCRL_DIST_POINT;
+ end;
+ {$EXTERNALSYM _CRL_DIST_POINTS_INFO}
+ CRL_DIST_POINTS_INFO = _CRL_DIST_POINTS_INFO;
+ {$EXTERNALSYM CRL_DIST_POINTS_INFO}
+ TCrlDistPointsInfo = CRL_DIST_POINTS_INFO;
+ PCrlDistPointsInfo = PCRL_DIST_POINTS_INFO;
+
+const
+ CRL_DIST_POINT_ERR_INDEX_MASK = $7F;
+ {$EXTERNALSYM CRL_DIST_POINT_ERR_INDEX_MASK}
+ CRL_DIST_POINT_ERR_INDEX_SHIFT = 24;
+ {$EXTERNALSYM CRL_DIST_POINT_ERR_INDEX_SHIFT}
+
+function GET_CRL_DIST_POINT_ERR_INDEX(X: DWORD): DWORD;
+{$EXTERNALSYM GET_CRL_DIST_POINT_ERR_INDEX}
+
+const
+ CRL_DIST_POINT_ERR_CRL_ISSUER_BIT = DWORD($80000000);
+ {$EXTERNALSYM CRL_DIST_POINT_ERR_CRL_ISSUER_BIT}
+
+function IS_CRL_DIST_POINT_ERR_CRL_ISSUER(X: DWORD): Boolean;
+{$EXTERNALSYM IS_CRL_DIST_POINT_ERR_CRL_ISSUER}
+
+//+-------------------------------------------------------------------------
+// X509_ENHANCED_KEY_USAGE
+// szOID_ENHANCED_KEY_USAGE
+//
+// pvStructInfo points to a CERT_ENHKEY_USAGE, CTL_USAGE.
+//--------------------------------------------------------------------------
+
+//+-------------------------------------------------------------------------
+// szOID_NEXT_UPDATE_LOCATION
+//
+// pvStructInfo points to a CERT_ALT_NAME_INFO.
+//--------------------------------------------------------------------------
+
+//+-------------------------------------------------------------------------
+// PKCS_CTL
+// szOID_CTL
+//
+// pvStructInfo points to a CTL_INFO.
+//--------------------------------------------------------------------------
+
+//+-------------------------------------------------------------------------
+// PKCS_SORTED_CTL
+//
+// pvStructInfo points to a CTL_INFO.
+//
+// Same as for PKCS_CTL, except, the CTL entries are sorted. The following
+// extension containing the sort information is inserted as the first
+// extension in the encoded CTL.
+//
+// Only supported for Encoding. CRYPT_ENCODE_ALLOC_FLAG flag must be
+// set.
+//--------------------------------------------------------------------------
+
+//+-------------------------------------------------------------------------
+// Sorted CTL TrustedSubjects extension
+//
+// Array of little endian DWORDs:
+// [0] - Flags
+// [1] - Count of HashBucket entry offsets
+// [2] - Maximum HashBucket entry collision count
+// [3 ..] (Count + 1) HashBucket entry offsets
+//
+// When this extension is present in the CTL,
+// the ASN.1 encoded sequence of TrustedSubjects are HashBucket ordered.
+//
+// The entry offsets point to the start of the first encoded TrustedSubject
+// sequence for the HashBucket. The encoded TrustedSubjects for a HashBucket
+// continue until the encoded offset of the next HashBucket. A HashBucket has
+// no entries if HashBucket[N] == HashBucket[N + 1].
+//
+// The HashBucket offsets are from the start of the ASN.1 encoded CTL_INFO.
+//--------------------------------------------------------------------------
+
+const
+ SORTED_CTL_EXT_FLAGS_OFFSET = 0 * 4;
+ {$EXTERNALSYM SORTED_CTL_EXT_FLAGS_OFFSET}
+ SORTED_CTL_EXT_COUNT_OFFSET = 1 * 4;
+ {$EXTERNALSYM SORTED_CTL_EXT_COUNT_OFFSET}
+ SORTED_CTL_EXT_MAX_COLLISION_OFFSET = 2 * 4;
+ {$EXTERNALSYM SORTED_CTL_EXT_MAX_COLLISION_OFFSET}
+ SORTED_CTL_EXT_HASH_BUCKET_OFFSET = 3 * 4;
+ {$EXTERNALSYM SORTED_CTL_EXT_HASH_BUCKET_OFFSET}
+
+// If the SubjectIdentifiers are a MD5 or SHA1 hash, the following flag is
+// set. When set, the first 4 bytes of the SubjectIdentifier are used as
+// the dwhash. Otherwise, the SubjectIdentifier bytes are hashed into dwHash.
+// In either case the HashBucket index = dwHash % cHashBucket.
+
+ SORTED_CTL_EXT_HASHED_SUBJECT_IDENTIFIER_FLAG = $1;
+ {$EXTERNALSYM SORTED_CTL_EXT_HASHED_SUBJECT_IDENTIFIER_FLAG}
+
+//+-------------------------------------------------------------------------
+// X509_MULTI_BYTE_UINT
+//
+// pvStructInfo points to a CRYPT_UINT_BLOB. Before encoding, inserts a
+// leading 0x00. After decoding, removes a leading 0x00.
+//--------------------------------------------------------------------------
+
+//+-------------------------------------------------------------------------
+// X509_DSS_PUBLICKEY
+//
+// pvStructInfo points to a CRYPT_UINT_BLOB.
+//--------------------------------------------------------------------------
+
+//+-------------------------------------------------------------------------
+// X509_DSS_PARAMETERS
+//
+// pvStructInfo points to following CERT_DSS_PARAMETERS data structure.
+//--------------------------------------------------------------------------
+
+type
+ PCERT_DSS_PARAMETERS = ^CERT_DSS_PARAMETERS;
+ {$EXTERNALSYM PCERT_DSS_PARAMETERS}
+ _CERT_DSS_PARAMETERS = record
+ p: CRYPT_UINT_BLOB;
+ q: CRYPT_UINT_BLOB;
+ g: CRYPT_UINT_BLOB;
+ end;
+ {$EXTERNALSYM _CERT_DSS_PARAMETERS}
+ CERT_DSS_PARAMETERS = _CERT_DSS_PARAMETERS;
+ {$EXTERNALSYM CERT_DSS_PARAMETERS}
+ TCertDssParameters = CERT_DSS_PARAMETERS;
+ PCertDssParameters = PCERT_DSS_PARAMETERS;
+
+//+-------------------------------------------------------------------------
+// X509_DSS_SIGNATURE
+//
+// pvStructInfo is a BYTE rgbSignature[CERT_DSS_SIGNATURE_LEN]. The
+// bytes are ordered as output by the DSS CSP's CryptSignHash().
+//--------------------------------------------------------------------------
+
+const
+ CERT_DSS_R_LEN = 20;
+ {$EXTERNALSYM CERT_DSS_R_LEN}
+ CERT_DSS_S_LEN = 20;
+ {$EXTERNALSYM CERT_DSS_S_LEN}
+ CERT_DSS_SIGNATURE_LEN = CERT_DSS_R_LEN + CERT_DSS_S_LEN;
+ {$EXTERNALSYM CERT_DSS_SIGNATURE_LEN}
+
+// Sequence of 2 unsigned integers (the extra +1 is for a potential leading
+// 0x00 to make the integer unsigned)
+
+ CERT_MAX_ASN_ENCODED_DSS_SIGNATURE_LEN = 2 + 2 * (2 + 20 + 1);
+ {$EXTERNALSYM CERT_MAX_ASN_ENCODED_DSS_SIGNATURE_LEN}
+
+//+-------------------------------------------------------------------------
+// X509_DH_PUBLICKEY
+//
+// pvStructInfo points to a CRYPT_UINT_BLOB.
+//--------------------------------------------------------------------------
+
+//+-------------------------------------------------------------------------
+// X509_DH_PARAMETERS
+//
+// pvStructInfo points to following CERT_DH_PARAMETERS data structure.
+//--------------------------------------------------------------------------
+
+type
+ PCERT_DH_PARAMETERS = ^CERT_DH_PARAMETERS;
+ {$EXTERNALSYM PCERT_DH_PARAMETERS}
+ _CERT_DH_PARAMETERS = record
+ p: CRYPT_UINT_BLOB;
+ g: CRYPT_UINT_BLOB;
+ end;
+ {$EXTERNALSYM _CERT_DH_PARAMETERS}
+ CERT_DH_PARAMETERS = _CERT_DH_PARAMETERS;
+ {$EXTERNALSYM CERT_DH_PARAMETERS}
+ TCertDhParameters = CERT_DH_PARAMETERS;
+ PCertDhParameters = PCERT_DH_PARAMETERS;
+
+//+-------------------------------------------------------------------------
+// X942_DH_PARAMETERS
+//
+// pvStructInfo points to following CERT_X942_DH_PARAMETERS data structure.
+//
+// If q.cbData == 0, then, the following fields are zero'ed.
+//--------------------------------------------------------------------------
+
+ PCERT_X942_DH_VALIDATION_PARAMS = ^CERT_X942_DH_VALIDATION_PARAMS;
+ {$EXTERNALSYM PCERT_X942_DH_VALIDATION_PARAMS}
+ _CERT_X942_DH_VALIDATION_PARAMS = record
+ seed: CRYPT_BIT_BLOB;
+ pgenCounter: DWORD;
+ end;
+ {$EXTERNALSYM _CERT_X942_DH_VALIDATION_PARAMS}
+ CERT_X942_DH_VALIDATION_PARAMS = _CERT_X942_DH_VALIDATION_PARAMS;
+ {$EXTERNALSYM CERT_X942_DH_VALIDATION_PARAMS}
+ TCertX942DhValidationParams = CERT_X942_DH_VALIDATION_PARAMS;
+ PCertX942DhValidationParams = PCERT_X942_DH_VALIDATION_PARAMS;
+
+ PCERT_X942_DH_PARAMETERS = ^CERT_X942_DH_PARAMETERS;
+ {$EXTERNALSYM PCERT_X942_DH_PARAMETERS}
+ _CERT_X942_DH_PARAMETERS = record
+ p: CRYPT_UINT_BLOB; // odd prime, p = jq + 1
+ g: CRYPT_UINT_BLOB; // generator, g
+ q: CRYPT_UINT_BLOB; // factor of p - 1, OPTIONAL
+ j: CRYPT_UINT_BLOB; // subgroup factor, OPTIONAL
+ pValidationParams: PCERT_X942_DH_VALIDATION_PARAMS; // OPTIONAL
+ end;
+ {$EXTERNALSYM _CERT_X942_DH_PARAMETERS}
+ CERT_X942_DH_PARAMETERS = _CERT_X942_DH_PARAMETERS;
+ {$EXTERNALSYM CERT_X942_DH_PARAMETERS}
+ TCertX942DhParameters = CERT_X942_DH_PARAMETERS;
+ PCertX942DhParameters = PCERT_X942_DH_PARAMETERS;
+
+//+-------------------------------------------------------------------------
+// X942_OTHER_INFO
+//
+// pvStructInfo points to following CRYPT_X942_OTHER_INFO data structure.
+//
+// rgbCounter and rgbKeyLength are in Little Endian order.
+//--------------------------------------------------------------------------
+
+const
+ CRYPT_X942_COUNTER_BYTE_LENGTH = 4;
+ {$EXTERNALSYM CRYPT_X942_COUNTER_BYTE_LENGTH}
+ CRYPT_X942_KEY_LENGTH_BYTE_LENGTH = 4;
+ {$EXTERNALSYM CRYPT_X942_KEY_LENGTH_BYTE_LENGTH}
+ CRYPT_X942_PUB_INFO_BYTE_LENGTH = 512 div 8;
+ {$EXTERNALSYM CRYPT_X942_PUB_INFO_BYTE_LENGTH}
+
+type
+ PCRYPT_X942_OTHER_INFO = ^CRYPT_X942_OTHER_INFO;
+ {$EXTERNALSYM PCRYPT_X942_OTHER_INFO}
+ _CRYPT_X942_OTHER_INFO = record
+ pszContentEncryptionObjId: LPSTR;
+ rgbCounter: array [0..CRYPT_X942_COUNTER_BYTE_LENGTH - 1] of BYTE;
+ rgbKeyLength: array [0..CRYPT_X942_KEY_LENGTH_BYTE_LENGTH - 1] of BYTE;
+ PubInfo: CRYPT_DATA_BLOB; // OPTIONAL
+ end;
+ {$EXTERNALSYM _CRYPT_X942_OTHER_INFO}
+ CRYPT_X942_OTHER_INFO = _CRYPT_X942_OTHER_INFO;
+ {$EXTERNALSYM CRYPT_X942_OTHER_INFO}
+ TCryptX942OtherInfo = CRYPT_X942_OTHER_INFO;
+ PCryptX942OtherInfo = PCRYPT_X942_OTHER_INFO;
+
+//+-------------------------------------------------------------------------
+// PKCS_RC2_CBC_PARAMETERS
+// szOID_RSA_RC2CBC
+//
+// pvStructInfo points to following CRYPT_RC2_CBC_PARAMETERS data structure.
+//--------------------------------------------------------------------------
+ PCRYPT_RC2_CBC_PARAMETERS = ^CRYPT_RC2_CBC_PARAMETERS;
+ {$EXTERNALSYM PCRYPT_RC2_CBC_PARAMETERS}
+ _CRYPT_RC2_CBC_PARAMETERS = record
+ dwVersion: DWORD;
+ fIV: BOOL; // set if has following IV
+ rgbIV: array [0..7] of BYTE;
+ end;
+ {$EXTERNALSYM _CRYPT_RC2_CBC_PARAMETERS}
+ CRYPT_RC2_CBC_PARAMETERS = _CRYPT_RC2_CBC_PARAMETERS;
+ {$EXTERNALSYM CRYPT_RC2_CBC_PARAMETERS}
+ TCryptRc2CbcParameters = CRYPT_RC2_CBC_PARAMETERS;
+ PCryptRc2CbcParameters = PCRYPT_RC2_CBC_PARAMETERS;
+
+const
+ CRYPT_RC2_40BIT_VERSION = 160;
+ {$EXTERNALSYM CRYPT_RC2_40BIT_VERSION}
+ CRYPT_RC2_56BIT_VERSION = 52;
+ {$EXTERNALSYM CRYPT_RC2_56BIT_VERSION}
+ CRYPT_RC2_64BIT_VERSION = 120;
+ {$EXTERNALSYM CRYPT_RC2_64BIT_VERSION}
+ CRYPT_RC2_128BIT_VERSION = 58;
+ {$EXTERNALSYM CRYPT_RC2_128BIT_VERSION}
+
+//+-------------------------------------------------------------------------
+// PKCS_SMIME_CAPABILITIES
+// szOID_RSA_SMIMECapabilities
+//
+// pvStructInfo points to following CRYPT_SMIME_CAPABILITIES data structure.
+//
+// Note, for CryptEncodeObject(X509_ASN_ENCODING), Parameters.cbData == 0
+// causes the encoded parameters to be omitted and not encoded as a NULL
+// (05 00) as is done when encoding a CRYPT_ALGORITHM_IDENTIFIER. This
+// is per the SMIME specification for encoding capabilities.
+//--------------------------------------------------------------------------
+
+type
+ PCRYPT_SMIME_CAPABILITY = ^CRYPT_SMIME_CAPABILITY;
+ {$EXTERNALSYM PCRYPT_SMIME_CAPABILITY}
+ _CRYPT_SMIME_CAPABILITY = record
+ pszObjId: LPSTR;
+ Parameters: CRYPT_OBJID_BLOB;
+ end;
+ {$EXTERNALSYM _CRYPT_SMIME_CAPABILITY}
+ CRYPT_SMIME_CAPABILITY = _CRYPT_SMIME_CAPABILITY;
+ {$EXTERNALSYM CRYPT_SMIME_CAPABILITY}
+ TCryptSmimeCapability = CRYPT_SMIME_CAPABILITY;
+ PCryptSmimeCapability = PCRYPT_SMIME_CAPABILITY;
+
+ PCRYPT_SMIME_CAPABILITIES = ^CRYPT_SMIME_CAPABILITIES;
+ {$EXTERNALSYM PCRYPT_SMIME_CAPABILITIES}
+ _CRYPT_SMIME_CAPABILITIES = record
+ cCapability: DWORD;
+ rgCapability: PCRYPT_SMIME_CAPABILITY;
+ end;
+ {$EXTERNALSYM _CRYPT_SMIME_CAPABILITIES}
+ CRYPT_SMIME_CAPABILITIES = _CRYPT_SMIME_CAPABILITIES;
+ {$EXTERNALSYM CRYPT_SMIME_CAPABILITIES}
+ TCryptSmimeCapabilities = CRYPT_SMIME_CAPABILITIES;
+ PCryptSmimeCapabilities = PCRYPT_SMIME_CAPABILITIES;
+
+//+-------------------------------------------------------------------------
+// PKCS7_SIGNER_INFO
+//
+// pvStructInfo points to CMSG_SIGNER_INFO.
+//--------------------------------------------------------------------------
+
+//+-------------------------------------------------------------------------
+// CMS_SIGNER_INFO
+//
+// pvStructInfo points to CMSG_CMS_SIGNER_INFO.
+//--------------------------------------------------------------------------
+
+//+-------------------------------------------------------------------------
+// Netscape Certificate Extension Object Identifiers
+//--------------------------------------------------------------------------
+
+const
+ szOID_NETSCAPE = '2.16.840.1.113730';
+ {$EXTERNALSYM szOID_NETSCAPE}
+ szOID_NETSCAPE_CERT_EXTENSION = '2.16.840.1.113730.1';
+ {$EXTERNALSYM szOID_NETSCAPE_CERT_EXTENSION}
+ szOID_NETSCAPE_CERT_TYPE = '2.16.840.1.113730.1.1';
+ {$EXTERNALSYM szOID_NETSCAPE_CERT_TYPE}
+ szOID_NETSCAPE_BASE_URL = '2.16.840.1.113730.1.2';
+ {$EXTERNALSYM szOID_NETSCAPE_BASE_URL}
+ szOID_NETSCAPE_REVOCATION_URL = '2.16.840.1.113730.1.3';
+ {$EXTERNALSYM szOID_NETSCAPE_REVOCATION_URL}
+ szOID_NETSCAPE_CA_REVOCATION_URL = '2.16.840.1.113730.1.4';
+ {$EXTERNALSYM szOID_NETSCAPE_CA_REVOCATION_URL}
+ szOID_NETSCAPE_CERT_RENEWAL_URL = '2.16.840.1.113730.1.7';
+ {$EXTERNALSYM szOID_NETSCAPE_CERT_RENEWAL_URL}
+ szOID_NETSCAPE_CA_POLICY_URL = '2.16.840.1.113730.1.8';
+ {$EXTERNALSYM szOID_NETSCAPE_CA_POLICY_URL}
+ szOID_NETSCAPE_SSL_SERVER_NAME = '2.16.840.1.113730.1.12';
+ {$EXTERNALSYM szOID_NETSCAPE_SSL_SERVER_NAME}
+ szOID_NETSCAPE_COMMENT = '2.16.840.1.113730.1.13';
+ {$EXTERNALSYM szOID_NETSCAPE_COMMENT}
+
+//+-------------------------------------------------------------------------
+// Netscape Certificate Data Type Object Identifiers
+//--------------------------------------------------------------------------
+
+ szOID_NETSCAPE_DATA_TYPE = '2.16.840.1.113730.2';
+ {$EXTERNALSYM szOID_NETSCAPE_DATA_TYPE}
+ szOID_NETSCAPE_CERT_SEQUENCE = '2.16.840.1.113730.2.5';
+ {$EXTERNALSYM szOID_NETSCAPE_CERT_SEQUENCE}
+
+//+-------------------------------------------------------------------------
+// szOID_NETSCAPE_CERT_TYPE extension
+//
+// Its value is a bit string. CryptDecodeObject/CryptEncodeObject using
+// X509_BITS or X509_BITS_WITHOUT_TRAILING_ZEROES.
+//
+// The following bits are defined:
+//--------------------------------------------------------------------------
+
+ NETSCAPE_SSL_CLIENT_AUTH_CERT_TYPE = $80;
+ {$EXTERNALSYM NETSCAPE_SSL_CLIENT_AUTH_CERT_TYPE}
+ NETSCAPE_SSL_SERVER_AUTH_CERT_TYPE = $40;
+ {$EXTERNALSYM NETSCAPE_SSL_SERVER_AUTH_CERT_TYPE}
+ NETSCAPE_SMIME_CERT_TYPE = $20;
+ {$EXTERNALSYM NETSCAPE_SMIME_CERT_TYPE}
+ NETSCAPE_SIGN_CERT_TYPE = $10;
+ {$EXTERNALSYM NETSCAPE_SIGN_CERT_TYPE}
+ NETSCAPE_SSL_CA_CERT_TYPE = $04;
+ {$EXTERNALSYM NETSCAPE_SSL_CA_CERT_TYPE}
+ NETSCAPE_SMIME_CA_CERT_TYPE = $02;
+ {$EXTERNALSYM NETSCAPE_SMIME_CA_CERT_TYPE}
+ NETSCAPE_SIGN_CA_CERT_TYPE = $01;
+ {$EXTERNALSYM NETSCAPE_SIGN_CA_CERT_TYPE}
+
+//+-------------------------------------------------------------------------
+// szOID_NETSCAPE_BASE_URL extension
+//
+// Its value is an IA5_STRING. CryptDecodeObject/CryptEncodeObject using
+// X509_ANY_STRING or X509_UNICODE_ANY_STRING, where,
+// dwValueType = CERT_RDN_IA5_STRING.
+//
+// When present this string is added to the beginning of all relative URLs
+// in the certificate. This extension can be considered an optimization
+// to reduce the size of the URL extensions.
+//--------------------------------------------------------------------------
+
+//+-------------------------------------------------------------------------
+// szOID_NETSCAPE_REVOCATION_URL extension
+//
+// Its value is an IA5_STRING. CryptDecodeObject/CryptEncodeObject using
+// X509_ANY_STRING or X509_UNICODE_ANY_STRING, where,
+// dwValueType = CERT_RDN_IA5_STRING.
+//
+// It is a relative or absolute URL that can be used to check the
+// revocation status of a certificate. The revocation check will be
+// performed as an HTTP GET method using a url that is the concatenation of
+// revocation-url and certificate-serial-number.
+// Where the certificate-serial-number is encoded as a string of
+// ascii hexadecimal digits. For example, if the netscape-base-url is
+// https://www.certs-r-us.com/, the netscape-revocation-url is
+// cgi-bin/check-rev.cgi?, and the certificate serial number is 173420,
+// the resulting URL would be:
+// https://www.certs-r-us.com/cgi-bin/check-rev.cgi?02a56c
+//
+// The server should return a document with a Content-Type of
+// application/x-netscape-revocation. The document should contain
+// a single ascii digit, '1' if the certificate is not curently valid,
+// and '0' if it is curently valid.
+//
+// Note: for all of the URLs that include the certificate serial number,
+// the serial number will be encoded as a string which consists of an even
+// number of hexadecimal digits. If the number of significant digits is odd,
+// the string will have a single leading zero to ensure an even number of
+// digits is generated.
+//--------------------------------------------------------------------------
+
+//+-------------------------------------------------------------------------
+// szOID_NETSCAPE_CA_REVOCATION_URL extension
+//
+// Its value is an IA5_STRING. CryptDecodeObject/CryptEncodeObject using
+// X509_ANY_STRING or X509_UNICODE_ANY_STRING, where,
+// dwValueType = CERT_RDN_IA5_STRING.
+//
+// It is a relative or absolute URL that can be used to check the
+// revocation status of any certificates that are signed by the CA that
+// this certificate belongs to. This extension is only valid in CA
+// certificates. The use of this extension is the same as the above
+// szOID_NETSCAPE_REVOCATION_URL extension.
+//--------------------------------------------------------------------------
+
+//+-------------------------------------------------------------------------
+// szOID_NETSCAPE_CERT_RENEWAL_URL extension
+//
+// Its value is an IA5_STRING. CryptDecodeObject/CryptEncodeObject using
+// X509_ANY_STRING or X509_UNICODE_ANY_STRING, where,
+// dwValueType = CERT_RDN_IA5_STRING.
+//
+// It is a relative or absolute URL that points to a certificate renewal
+// form. The renewal form will be accessed with an HTTP GET method using a
+// url that is the concatenation of renewal-url and
+// certificate-serial-number. Where the certificate-serial-number is
+// encoded as a string of ascii hexadecimal digits. For example, if the
+// netscape-base-url is https://www.certs-r-us.com/, the
+// netscape-cert-renewal-url is cgi-bin/check-renew.cgi?, and the
+// certificate serial number is 173420, the resulting URL would be:
+// https://www.certs-r-us.com/cgi-bin/check-renew.cgi?02a56c
+// The document returned should be an HTML form that will allow the user
+// to request a renewal of their certificate.
+//--------------------------------------------------------------------------
+
+//+-------------------------------------------------------------------------
+// szOID_NETSCAPE_CA_POLICY_URL extension
+//
+// Its value is an IA5_STRING. CryptDecodeObject/CryptEncodeObject using
+// X509_ANY_STRING or X509_UNICODE_ANY_STRING, where,
+// dwValueType = CERT_RDN_IA5_STRING.
+//
+// It is a relative or absolute URL that points to a web page that
+// describes the policies under which the certificate was issued.
+//--------------------------------------------------------------------------
+
+//+-------------------------------------------------------------------------
+// szOID_NETSCAPE_SSL_SERVER_NAME extension
+//
+// Its value is an IA5_STRING. CryptDecodeObject/CryptEncodeObject using
+// X509_ANY_STRING or X509_UNICODE_ANY_STRING, where,
+// dwValueType = CERT_RDN_IA5_STRING.
+//
+// It is a "shell expression" that can be used to match the hostname of the
+// SSL server that is using this certificate. It is recommended that if
+// the server's hostname does not match this pattern the user be notified
+// and given the option to terminate the SSL connection. If this extension
+// is not present then the CommonName in the certificate subject's
+// distinguished name is used for the same purpose.
+//--------------------------------------------------------------------------
+
+//+-------------------------------------------------------------------------
+// szOID_NETSCAPE_COMMENT extension
+//
+// Its value is an IA5_STRING. CryptDecodeObject/CryptEncodeObject using
+// X509_ANY_STRING or X509_UNICODE_ANY_STRING, where,
+// dwValueType = CERT_RDN_IA5_STRING.
+//
+// It is a comment that may be displayed to the user when the certificate
+// is viewed.
+//--------------------------------------------------------------------------
+
+//+-------------------------------------------------------------------------
+// szOID_NETSCAPE_CERT_SEQUENCE
+//
+// Its value is a PKCS#7 ContentInfo structure wrapping a sequence of
+// certificates. The value of the contentType field is
+// szOID_NETSCAPE_CERT_SEQUENCE, while the content field is the following
+// structure:
+// CertificateSequence ::= SEQUENCE OF Certificate.
+//
+// CryptDecodeObject/CryptEncodeObject using
+// PKCS_CONTENT_INFO_SEQUENCE_OF_ANY, where,
+// pszObjId = szOID_NETSCAPE_CERT_SEQUENCE and the CRYPT_DER_BLOBs point
+// to encoded X509 certificates.
+//--------------------------------------------------------------------------
+
+//+=========================================================================
+// Object IDentifier (OID) Installable Functions: Data Structures and APIs
+//==========================================================================
+
+type
+ HCRYPTOIDFUNCSET = Pointer;
+ {$EXTERNALSYM HCRYPTOIDFUNCSET}
+ HCRYPTOIDFUNCADDR = Pointer;
+ {$EXTERNALSYM HCRYPTOIDFUNCADDR}
+
+// Predefined OID Function Names
+
+const
+ CRYPT_OID_ENCODE_OBJECT_FUNC = 'CryptDllEncodeObject';
+ {$EXTERNALSYM CRYPT_OID_ENCODE_OBJECT_FUNC}
+ CRYPT_OID_DECODE_OBJECT_FUNC = 'CryptDllDecodeObject';
+ {$EXTERNALSYM CRYPT_OID_DECODE_OBJECT_FUNC}
+ CRYPT_OID_ENCODE_OBJECT_EX_FUNC = 'CryptDllEncodeObjectEx';
+ {$EXTERNALSYM CRYPT_OID_ENCODE_OBJECT_EX_FUNC}
+ CRYPT_OID_DECODE_OBJECT_EX_FUNC = 'CryptDllDecodeObjectEx';
+ {$EXTERNALSYM CRYPT_OID_DECODE_OBJECT_EX_FUNC}
+ CRYPT_OID_CREATE_COM_OBJECT_FUNC = 'CryptDllCreateCOMObject';
+ {$EXTERNALSYM CRYPT_OID_CREATE_COM_OBJECT_FUNC}
+ CRYPT_OID_VERIFY_REVOCATION_FUNC = 'CertDllVerifyRevocation';
+ {$EXTERNALSYM CRYPT_OID_VERIFY_REVOCATION_FUNC}
+ CRYPT_OID_VERIFY_CTL_USAGE_FUNC = 'CertDllVerifyCTLUsage';
+ {$EXTERNALSYM CRYPT_OID_VERIFY_CTL_USAGE_FUNC}
+ CRYPT_OID_FORMAT_OBJECT_FUNC = 'CryptDllFormatObject';
+ {$EXTERNALSYM CRYPT_OID_FORMAT_OBJECT_FUNC}
+ CRYPT_OID_FIND_OID_INFO_FUNC = 'CryptDllFindOIDInfo';
+ {$EXTERNALSYM CRYPT_OID_FIND_OID_INFO_FUNC}
+ CRYPT_OID_FIND_LOCALIZED_NAME_FUNC = 'CryptDllFindLocalizedName';
+ {$EXTERNALSYM CRYPT_OID_FIND_LOCALIZED_NAME_FUNC}
+
+// CryptDllEncodeObject has same function signature as CryptEncodeObject.
+
+// CryptDllDecodeObject has same function signature as CryptDecodeObject.
+
+// CryptDllEncodeObjectEx has same function signature as CryptEncodeObjectEx.
+// The Ex version MUST support the CRYPT_ENCODE_ALLOC_FLAG option.
+//
+// If an Ex function isn't installed or registered, then, attempts to find
+// a non-EX version. If the ALLOC flag is set, then, CryptEncodeObjectEx,
+// does the allocation and calls the non-EX version twice.
+
+// CryptDllDecodeObjectEx has same function signature as CryptDecodeObjectEx.
+// The Ex version MUST support the CRYPT_DECODE_ALLOC_FLAG option.
+//
+// If an Ex function isn't installed or registered, then, attempts to find
+// a non-EX version. If the ALLOC flag is set, then, CryptDecodeObjectEx,
+// does the allocation and calls the non-EX version twice.
+
+// CryptDllCreateCOMObject has the following signature:
+// BOOL WINAPI CryptDllCreateCOMObject(
+// IN DWORD dwEncodingType,
+// IN LPCSTR pszOID,
+// IN PCRYPT_DATA_BLOB pEncodedContent,
+// IN DWORD dwFlags,
+// IN REFIID riid,
+// OUT void **ppvObj);
+
+// CertDllVerifyRevocation has the same signature as CertVerifyRevocation
+// (See CertVerifyRevocation for details on when called)
+
+// CertDllVerifyCTLUsage has the same signature as CertVerifyCTLUsage
+
+// CryptDllFindOIDInfo currently is only used to store values used by
+// CryptFindOIDInfo. See CryptFindOIDInfo() for more details.
+
+// CryptDllFindLocalizedName is only used to store localized string
+// values used by CryptFindLocalizedName. See CryptFindLocalizedName() for
+// more details.
+
+// Example of a complete OID Function Registry Name:
+// HKEY_LOCAL_MACHINE\Software\Microsoft\Cryptography\OID
+// Encoding Type 1\CryptDllEncodeObject\1.2.3
+//
+// The key's L"Dll" value contains the name of the Dll.
+// The key's L"FuncName" value overrides the default function name
+
+ CRYPT_OID_REGPATH = 'Software\Microsoft\Cryptography\OID';
+ {$EXTERNALSYM CRYPT_OID_REGPATH}
+ CRYPT_OID_REG_ENCODING_TYPE_PREFIX = 'EncodingType ';
+ {$EXTERNALSYM CRYPT_OID_REG_ENCODING_TYPE_PREFIX}
+ CRYPT_OID_REG_DLL_VALUE_NAME = 'Dll';
+ {$EXTERNALSYM CRYPT_OID_REG_DLL_VALUE_NAME}
+ CRYPT_OID_REG_FUNC_NAME_VALUE_NAME = 'FuncName';
+ {$EXTERNALSYM CRYPT_OID_REG_FUNC_NAME_VALUE_NAME}
+ CRYPT_OID_REG_FUNC_NAME_VALUE_NAME_A = 'FuncName';
+ {$EXTERNALSYM CRYPT_OID_REG_FUNC_NAME_VALUE_NAME_A}
+
+// CRYPT_INSTALL_OID_FUNC_BEFORE_FLAG can be set in the key's L"CryptFlags"
+// value to register the functions before the installed functions.
+//
+// CryptSetOIDFunctionValue must be called to set this value. L"CryptFlags"
+// must be set using a dwValueType of REG_DWORD.
+
+ CRYPT_OID_REG_FLAGS_VALUE_NAME = 'CryptFlags';
+ {$EXTERNALSYM CRYPT_OID_REG_FLAGS_VALUE_NAME}
+
+// OID used for Default OID functions
+
+ CRYPT_DEFAULT_OID = 'DEFAULT';
+ {$EXTERNALSYM CRYPT_DEFAULT_OID}
+
+type
+ PCRYPT_OID_FUNC_ENTRY = ^CRYPT_OID_FUNC_ENTRY;
+ {$EXTERNALSYM PCRYPT_OID_FUNC_ENTRY}
+ _CRYPT_OID_FUNC_ENTRY = record
+ pszOID: LPCSTR;
+ pvFuncAddr: Pointer;
+ end;
+ {$EXTERNALSYM _CRYPT_OID_FUNC_ENTRY}
+ CRYPT_OID_FUNC_ENTRY = _CRYPT_OID_FUNC_ENTRY;
+ {$EXTERNALSYM CRYPT_OID_FUNC_ENTRY}
+ TCryptOidFuncEntry = CRYPT_OID_FUNC_ENTRY;
+ PCryptOidFuncEntry = PCRYPT_OID_FUNC_ENTRY;
+
+const
+ CRYPT_INSTALL_OID_FUNC_BEFORE_FLAG = 1;
+ {$EXTERNALSYM CRYPT_INSTALL_OID_FUNC_BEFORE_FLAG}
+
+//+-------------------------------------------------------------------------
+// Install a set of callable OID function addresses.
+//
+// By default the functions are installed at end of the list.
+// Set CRYPT_INSTALL_OID_FUNC_BEFORE_FLAG to install at beginning of list.
+//
+// hModule should be updated with the hModule passed to DllMain to prevent
+// the Dll containing the function addresses from being unloaded by
+// CryptGetOIDFuncAddress/CryptFreeOIDFunctionAddress. This would be the
+// case when the Dll has also regsvr32'ed OID functions via
+// CryptRegisterOIDFunction.
+//
+// DEFAULT functions are installed by setting rgFuncEntry[].pszOID =
+// CRYPT_DEFAULT_OID.
+//--------------------------------------------------------------------------
+
+function CryptInstallOIDFunctionAddress(hModule: HMODULE; dwEncodingType: DWORD;
+ pszFuncName: LPCSTR; cFuncEntry: DWORD; rgFuncEntry: PCRYPT_OID_FUNC_ENTRY;
+ dwFlags: DWORD): BOOL; stdcall;
+{$EXTERNALSYM CryptInstallOIDFunctionAddress}
+
+//+-------------------------------------------------------------------------
+// Initialize and return handle to the OID function set identified by its
+// function name.
+//
+// If the set already exists, a handle to the existing set is returned.
+//--------------------------------------------------------------------------
+
+function CryptInitOIDFunctionSet(pszFuncName: LPCSTR; dwFlags: DWORD): HCRYPTOIDFUNCSET; stdcall;
+{$EXTERNALSYM CryptInitOIDFunctionSet}
+
+//+-------------------------------------------------------------------------
+// Search the list of installed functions for an encoding type and OID match.
+// If not found, search the registry.
+//
+// For success, returns TRUE with *ppvFuncAddr updated with the function's
+// address and *phFuncAddr updated with the function address's handle.
+// The function's handle is AddRef'ed. CryptFreeOIDFunctionAddress needs to
+// be called to release it.
+//
+// For a registry match, the Dll containing the function is loaded.
+//
+// By default, both the registered and installed function lists are searched.
+// Set CRYPT_GET_INSTALLED_OID_FUNC_FLAG to only search the installed list
+// of functions. This flag would be set by a registered function to get
+// the address of a pre-installed function it was replacing. For example,
+// the registered function might handle a new special case and call the
+// pre-installed function to handle the remaining cases.
+//--------------------------------------------------------------------------
+
+function CryptGetOIDFunctionAddress(hFuncSet: HCRYPTOIDFUNCSET;
+ dwEncodingType: DWORD; pszOID: LPCSTR; dwFlags: DWORD;
+ var ppvFuncAddr: Pointer; var phFuncAddr: HCRYPTOIDFUNCADDR): BOOL; stdcall;
+{$EXTERNALSYM CryptGetOIDFunctionAddress}
+
+const
+ CRYPT_GET_INSTALLED_OID_FUNC_FLAG = $1;
+ {$EXTERNALSYM CRYPT_GET_INSTALLED_OID_FUNC_FLAG}
+
+//+-------------------------------------------------------------------------
+// Get the list of registered default Dll entries for the specified
+// function set and encoding type.
+//
+// The returned list consists of none, one or more null terminated Dll file
+// names. The list is terminated with an empty (L"\0") Dll file name.
+// For example: L"first.dll" L"\0" L"second.dll" L"\0" L"\0"
+//--------------------------------------------------------------------------
+
+function CryptGetDefaultOIDDllList(hFuncSet: HCRYPTOIDFUNCSET; dwEncodingType: DWORD;
+ pwszDllList: LPWSTR; pcchDllList: DWORD): BOOL; stdcall;
+{$EXTERNALSYM CryptGetDefaultOIDDllList}
+
+//+-------------------------------------------------------------------------
+// Either: get the first or next installed DEFAULT function OR
+// load the Dll containing the DEFAULT function.
+//
+// If pwszDll is NULL, search the list of installed DEFAULT functions.
+// *phFuncAddr must be set to NULL to get the first installed function.
+// Successive installed functions are returned by setting *phFuncAddr
+// to the hFuncAddr returned by the previous call.
+//
+// If pwszDll is NULL, the input *phFuncAddr
+// is always CryptFreeOIDFunctionAddress'ed by this function, even for
+// an error.
+//
+// If pwszDll isn't NULL, then, attempts to load the Dll and the DEFAULT
+// function. *phFuncAddr is ignored upon entry and isn't
+// CryptFreeOIDFunctionAddress'ed.
+//
+// For success, returns TRUE with *ppvFuncAddr updated with the function's
+// address and *phFuncAddr updated with the function address's handle.
+// The function's handle is AddRef'ed. CryptFreeOIDFunctionAddress needs to
+// be called to release it or CryptGetDefaultOIDFunctionAddress can also
+// be called for a NULL pwszDll.
+//--------------------------------------------------------------------------
+
+function CryptGetDefaultOIDFunctionAddress(hFuncSet: HCRYPTOIDFUNCSET;
+ dwEncodingType: DWORD; pwszDll: LPCWSTR; dwFlags: DWORD;
+ var ppvFuncAddr: Pointer; phFuncAddr: HCRYPTOIDFUNCADDR): BOOL; stdcall;
+{$EXTERNALSYM CryptGetDefaultOIDFunctionAddress}
+
+//+-------------------------------------------------------------------------
+// Releases the handle AddRef'ed and returned by CryptGetOIDFunctionAddress
+// or CryptGetDefaultOIDFunctionAddress.
+//
+// If a Dll was loaded for the function its unloaded. However, before doing
+// the unload, the DllCanUnloadNow function exported by the loaded Dll is
+// called. It should return S_FALSE to inhibit the unload or S_TRUE to enable
+// the unload. If the Dll doesn't export DllCanUnloadNow, the Dll is unloaded.
+//
+// DllCanUnloadNow has the following signature:
+// STDAPI DllCanUnloadNow(void);
+//--------------------------------------------------------------------------
+
+function CryptFreeOIDFunctionAddress(hFuncAddr: HCRYPTOIDFUNCADDR; dwFlags: DWORD): BOOL; stdcall;
+{$EXTERNALSYM CryptFreeOIDFunctionAddress}
+
+//+-------------------------------------------------------------------------
+// Register the Dll containing the function to be called for the specified
+// encoding type, function name and OID.
+//
+// pwszDll may contain environment-variable strings
+// which are ExpandEnvironmentStrings()'ed before loading the Dll.
+//
+// In addition to registering the DLL, you may override the
+// name of the function to be called. For example,
+// pszFuncName = "CryptDllEncodeObject",
+// pszOverrideFuncName = "MyEncodeXyz".
+// This allows a Dll to export multiple OID functions for the same
+// function name without needing to interpose its own OID dispatcher function.
+//--------------------------------------------------------------------------
+
+function CryptRegisterOIDFunction(dwEncodingType: DWORD; pszFuncName: LPCSTR;
+ pszOID: LPCSTR; pwszDll: LPCWSTR; pszOverrideFuncName: LPCSTR): BOOL; stdcall;
+{$EXTERNALSYM CryptRegisterOIDFunction}
+
+//+-------------------------------------------------------------------------
+// Unregister the Dll containing the function to be called for the specified
+// encoding type, function name and OID.
+//--------------------------------------------------------------------------
+
+function CryptUnregisterOIDFunction(dwEncodingType: DWORD; pszFuncName: LPCSTR;
+ pszOID: LPCSTR): BOOL; stdcall;
+{$EXTERNALSYM CryptUnregisterOIDFunction}
+
+//+-------------------------------------------------------------------------
+// Register the Dll containing the default function to be called for the
+// specified encoding type and function name.
+//
+// Unlike CryptRegisterOIDFunction, you can't override the function name
+// needing to be exported by the Dll.
+//
+// The Dll is inserted before the entry specified by dwIndex.
+// dwIndex == 0, inserts at the beginning.
+// dwIndex == CRYPT_REGISTER_LAST_INDEX, appends at the end.
+//
+// pwszDll may contain environment-variable strings
+// which are ExpandEnvironmentStrings()'ed before loading the Dll.
+//--------------------------------------------------------------------------
+
+function CryptRegisterDefaultOIDFunction(dwEncodingType: DWORD; pszFuncName: LPCSTR;
+ dwIndex: DWORD; pwszDll: LPCWSTR): BOOL; stdcall;
+{$EXTERNALSYM CryptRegisterDefaultOIDFunction}
+
+const
+ CRYPT_REGISTER_FIRST_INDEX = 0;
+ {$EXTERNALSYM CRYPT_REGISTER_FIRST_INDEX}
+ CRYPT_REGISTER_LAST_INDEX = DWORD($FFFFFFFF);
+ {$EXTERNALSYM CRYPT_REGISTER_LAST_INDEX}
+
+//+-------------------------------------------------------------------------
+// Unregister the Dll containing the default function to be called for
+// the specified encoding type and function name.
+//--------------------------------------------------------------------------
+
+function CryptUnregisterDefaultOIDFunction(dwEncodingType: DWORD;
+ pszFuncName: LPCSTR; pwszDll: LPCWSTR): BOOL; stdcall;
+{$EXTERNALSYM CryptUnregisterDefaultOIDFunction}
+
+//+-------------------------------------------------------------------------
+// Set the value for the specified encoding type, function name, OID and
+// value name.
+//
+// See RegSetValueEx for the possible value types.
+//
+// String types are UNICODE.
+//--------------------------------------------------------------------------
+
+function CryptSetOIDFunctionValue(dwEncodingType: DWORD; pszFuncName: LPCSTR;
+ pszOID: LPCSTR; pwszValueName: LPCWSTR; dwValueType: DWORD; pbValueData: LPBYTE;
+ cbValueData: DWORD): BOOL; stdcall;
+{$EXTERNALSYM CryptSetOIDFunctionValue}
+
+//+-------------------------------------------------------------------------
+// Get the value for the specified encoding type, function name, OID and
+// value name.
+//
+// See RegEnumValue for the possible value types.
+//
+// String types are UNICODE.
+//--------------------------------------------------------------------------
+
+function CryptGetOIDFunctionValue(dwEncodingType: DWORD; pszFuncName: LPCSTR;
+ pszOID: LPCSTR; pwszValueName: LPCWSTR; var pdwValueType: DWORD;
+ pbValueData: LPBYTE; var pcbValueData: DWORD): BOOL; stdcall;
+{$EXTERNALSYM CryptGetOIDFunctionValue}
+
+type
+ PFN_CRYPT_ENUM_OID_FUNC = function(dwEncodingType: DWORD; pszFuncName,
+ pszOID: LPCSTR; cValue: DWORD; rgdwValueType: LPDWORD;
+ rgpwszValueName: LPCWSTR; rgpbValueData: LPBYTE; rgcbValueData: LPDWORD;
+ pvArg: Pointer): BOOL; stdcall;
+ {$EXTERNALSYM PFN_CRYPT_ENUM_OID_FUNC}
+ PFnCryptEnumOidFunc = PFN_CRYPT_ENUM_OID_FUNC;
+
+//+-------------------------------------------------------------------------
+// Enumerate the OID functions identified by their encoding type,
+// function name and OID.
+//
+// pfnEnumOIDFunc is called for each registry key matching the input
+// parameters. Setting dwEncodingType to CRYPT_MATCH_ANY_ENCODING_TYPE matches
+// any. Setting pszFuncName or pszOID to NULL matches any.
+//
+// Set pszOID == CRYPT_DEFAULT_OID to restrict the enumeration to only the
+// DEFAULT functions
+//
+// String types are UNICODE.
+//--------------------------------------------------------------------------
+
+function CryptEnumOIDFunction(dwEncodingType: DWORD; pszFuncName, pszOID: LPCSTR;
+ dwFlags: DWORD; pvArg: Pointer; pfnEnumOIDFunc: PFN_CRYPT_ENUM_OID_FUNC): BOOL; stdcall;
+{$EXTERNALSYM CryptEnumOIDFunction}
+
+const
+ CRYPT_MATCH_ANY_ENCODING_TYPE = DWORD($FFFFFFFF);
+ {$EXTERNALSYM CRYPT_MATCH_ANY_ENCODING_TYPE}
+
+//+=========================================================================
+// Object IDentifier (OID) Information: Data Structures and APIs
+//==========================================================================
+
+//+-------------------------------------------------------------------------
+// OID Information
+//--------------------------------------------------------------------------
+
+type
+ PCRYPT_OID_INFO = ^CRYPT_OID_INFO;
+ {$EXTERNALSYM PCRYPT_OID_INFO}
+ _CRYPT_OID_INFO = record
+ cbSize: DWORD;
+ pszOID: LPCSTR;
+ pwszName: LPCWSTR;
+ dwGroupId: DWORD;
+ Union: record
+ case Integer of
+ 0: (dwValue: DWORD);
+ 1: (Algid: ALG_ID);
+ 2: (dwLength: DWORD);
+ end;
+ ExtraInfo: CRYPT_DATA_BLOB;
+ end;
+ {$EXTERNALSYM _CRYPT_OID_INFO}
+ CRYPT_OID_INFO = _CRYPT_OID_INFO;
+ {$EXTERNALSYM CRYPT_OID_INFO}
+ TCryptOidInfo = CRYPT_OID_INFO;
+ PCryptOidInfo = PCRYPT_OID_INFO;
+
+ CCRYPT_OID_INFO = CRYPT_OID_INFO;
+ {$EXTERNALSYM CCRYPT_OID_INFO}
+ PCCRYPT_OID_INFO = PCRYPT_OID_INFO;
+ {$EXTERNALSYM PCCRYPT_OID_INFO}
+
+//+-------------------------------------------------------------------------
+// OID Group IDs
+//--------------------------------------------------------------------------
+
+const
+ CRYPT_HASH_ALG_OID_GROUP_ID = 1;
+ {$EXTERNALSYM CRYPT_HASH_ALG_OID_GROUP_ID}
+ CRYPT_ENCRYPT_ALG_OID_GROUP_ID = 2;
+ {$EXTERNALSYM CRYPT_ENCRYPT_ALG_OID_GROUP_ID}
+ CRYPT_PUBKEY_ALG_OID_GROUP_ID = 3;
+ {$EXTERNALSYM CRYPT_PUBKEY_ALG_OID_GROUP_ID}
+ CRYPT_SIGN_ALG_OID_GROUP_ID = 4;
+ {$EXTERNALSYM CRYPT_SIGN_ALG_OID_GROUP_ID}
+ CRYPT_RDN_ATTR_OID_GROUP_ID = 5;
+ {$EXTERNALSYM CRYPT_RDN_ATTR_OID_GROUP_ID}
+ CRYPT_EXT_OR_ATTR_OID_GROUP_ID = 6;
+ {$EXTERNALSYM CRYPT_EXT_OR_ATTR_OID_GROUP_ID}
+ CRYPT_ENHKEY_USAGE_OID_GROUP_ID = 7;
+ {$EXTERNALSYM CRYPT_ENHKEY_USAGE_OID_GROUP_ID}
+ CRYPT_POLICY_OID_GROUP_ID = 8;
+ {$EXTERNALSYM CRYPT_POLICY_OID_GROUP_ID}
+ CRYPT_LAST_OID_GROUP_ID = 8;
+ {$EXTERNALSYM CRYPT_LAST_OID_GROUP_ID}
+
+ CRYPT_FIRST_ALG_OID_GROUP_ID = CRYPT_HASH_ALG_OID_GROUP_ID;
+ {$EXTERNALSYM CRYPT_FIRST_ALG_OID_GROUP_ID}
+ CRYPT_LAST_ALG_OID_GROUP_ID = CRYPT_SIGN_ALG_OID_GROUP_ID;
+ {$EXTERNALSYM CRYPT_LAST_ALG_OID_GROUP_ID}
+
+// The CRYPT_*_ALG_OID_GROUP_ID's have an Algid. The CRYPT_RDN_ATTR_OID_GROUP_ID
+// has a dwLength. The CRYPT_EXT_OR_ATTR_OID_GROUP_ID,
+// CRYPT_ENHKEY_USAGE_OID_GROUP_ID or CRYPT_POLICY_OID_GROUP_ID don't have a
+// dwValue.
+//
+
+// CRYPT_PUBKEY_ALG_OID_GROUP_ID has the following optional ExtraInfo:
+// DWORD[0] - Flags. CRYPT_OID_INHIBIT_SIGNATURE_FORMAT_FLAG can be set to
+// inhibit the reformatting of the signature before
+// CryptVerifySignature is called or after CryptSignHash
+// is called. CRYPT_OID_USE_PUBKEY_PARA_FOR_PKCS7_FLAG can
+// be set to include the public key algorithm's parameters
+// in the PKCS7's digestEncryptionAlgorithm's parameters.
+// CRYPT_OID_NO_NULL_ALGORITHM_PARA_FLAG can be set to omit
+// NULL parameters when encoding.
+
+ CRYPT_OID_INHIBIT_SIGNATURE_FORMAT_FLAG = $1;
+ {$EXTERNALSYM CRYPT_OID_INHIBIT_SIGNATURE_FORMAT_FLAG}
+ CRYPT_OID_USE_PUBKEY_PARA_FOR_PKCS7_FLAG = $2;
+ {$EXTERNALSYM CRYPT_OID_USE_PUBKEY_PARA_FOR_PKCS7_FLAG}
+ CRYPT_OID_NO_NULL_ALGORITHM_PARA_FLAG = $4;
+ {$EXTERNALSYM CRYPT_OID_NO_NULL_ALGORITHM_PARA_FLAG}
+
+// CRYPT_SIGN_ALG_OID_GROUP_ID has the following optional ExtraInfo:
+// DWORD[0] - Public Key Algid.
+// DWORD[1] - Flags. Same as above for CRYPT_PUBKEY_ALG_OID_GROUP_ID.
+// DWORD[2] - Optional CryptAcquireContext(CRYPT_VERIFYCONTEXT)'s dwProvType.
+// If omitted or 0, uses Public Key Algid to select
+// appropriate dwProvType for signature verification.
+
+// CRYPT_RDN_ATTR_OID_GROUP_ID has the following optional ExtraInfo:
+// Array of DWORDs:
+// [0 ..] - Null terminated list of acceptable RDN attribute
+// value types. An empty list implies CERT_RDN_PRINTABLE_STRING,
+// CERT_RDN_UNICODE_STRING, 0.
+
+//+-------------------------------------------------------------------------
+// Find OID information. Returns NULL if unable to find any information
+// for the specified key and group. Note, returns a pointer to a constant
+// data structure. The returned pointer MUST NOT be freed.
+//
+// dwKeyType's:
+// CRYPT_OID_INFO_OID_KEY, pvKey points to a szOID
+// CRYPT_OID_INFO_NAME_KEY, pvKey points to a wszName
+// CRYPT_OID_INFO_ALGID_KEY, pvKey points to an ALG_ID
+// CRYPT_OID_INFO_SIGN_KEY, pvKey points to an array of two ALG_ID's:
+// ALG_ID[0] - Hash Algid
+// ALG_ID[1] - PubKey Algid
+//
+// Setting dwGroupId to 0, searches all groups according to the dwKeyType.
+// Otherwise, only the dwGroupId is searched.
+//--------------------------------------------------------------------------
+
+function CryptFindOIDInfo(dwKeyType: DWORD; pvKey: Pointer; dwGroupId: DWORD): PCCRYPT_OID_INFO; stdcall;
+{$EXTERNALSYM CryptFindOIDInfo}
+
+const
+ CRYPT_OID_INFO_OID_KEY = 1;
+ {$EXTERNALSYM CRYPT_OID_INFO_OID_KEY}
+ CRYPT_OID_INFO_NAME_KEY = 2;
+ {$EXTERNALSYM CRYPT_OID_INFO_NAME_KEY}
+ CRYPT_OID_INFO_ALGID_KEY = 3;
+ {$EXTERNALSYM CRYPT_OID_INFO_ALGID_KEY}
+ CRYPT_OID_INFO_SIGN_KEY = 4;
+ {$EXTERNALSYM CRYPT_OID_INFO_SIGN_KEY}
+
+//+-------------------------------------------------------------------------
+// Register OID information. The OID information specified in the
+// CCRYPT_OID_INFO structure is persisted to the registry.
+//
+// crypt32.dll contains information for the commonly known OIDs. This function
+// allows applications to augment crypt32.dll's OID information. During
+// CryptFindOIDInfo's first call, the registered OID information is installed.
+//
+// By default the registered OID information is installed after crypt32.dll's
+// OID entries. Set CRYPT_INSTALL_OID_INFO_BEFORE_FLAG to install before.
+//--------------------------------------------------------------------------
+
+function CryptRegisterOIDInfo(pInfo: PCCRYPT_OID_INFO; dwFlags: DWORD): BOOL; stdcall;
+{$EXTERNALSYM CryptRegisterOIDInfo}
+
+const
+ CRYPT_INSTALL_OID_INFO_BEFORE_FLAG = 1;
+ {$EXTERNALSYM CRYPT_INSTALL_OID_INFO_BEFORE_FLAG}
+
+//+-------------------------------------------------------------------------
+// Unregister OID information. Only the pszOID and dwGroupId fields are
+// used to identify the OID information to be unregistered.
+//--------------------------------------------------------------------------
+
+function CryptUnregisterOIDInfo(pInfo: PCCRYPT_OID_INFO): BOOL; stdcall;
+{$EXTERNALSYM CryptUnregisterOIDInfo}
+
+// If the callback returns FALSE, stops the enumeration.
+
+type
+ PFN_CRYPT_ENUM_OID_INFO = function(pInfo: PCCRYPT_OID_INFO; pvArg: Pointer): BOOL; stdcall;
+ {$EXTERNALSYM PFN_CRYPT_ENUM_OID_INFO}
+ PFnCryptEnumOidInfo = PFN_CRYPT_ENUM_OID_INFO;
+
+//+-------------------------------------------------------------------------
+// Enumerate the OID information.
+//
+// pfnEnumOIDInfo is called for each OID information entry.
+//
+// Setting dwGroupId to 0 matches all groups. Otherwise, only enumerates
+// entries in the specified group.
+//
+// dwFlags currently isn't used and must be set to 0.
+//--------------------------------------------------------------------------
+
+function CryptEnumOIDInfo(dwGroupId: DWORD; dwFlags: DWORD; pvArg: Pointer;
+ pfnEnumOIDInfo: PFN_CRYPT_ENUM_OID_INFO): BOOL; stdcall;
+{$EXTERNALSYM CryptEnumOIDInfo}
+
+//+-------------------------------------------------------------------------
+// Find the localized name for the specified name. For example, find the
+// localized name for the "Root" system store name. A case insensitive
+// string comparison is done.
+//
+// Returns NULL if unable to find the the specified name.
+//
+// Localized names for the predefined system stores ("Root", "My") and
+// predefined physical stores (".Default", ".LocalMachine") are pre-installed
+// as resource strings in crypt32.dll. CryptSetOIDFunctionValue can be called
+// as follows to register additional localized strings:
+// dwEncodingType = CRYPT_LOCALIZED_NAME_ENCODING_TYPE
+// pszFuncName = CRYPT_OID_FIND_LOCALIZED_NAME_FUNC
+// pszOID = CRYPT_LOCALIZED_NAME_OID
+// pwszValueName = Name to be localized, for example, L"ApplicationStore"
+// dwValueType = REG_SZ
+// pbValueData = pointer to the UNICODE localized string
+// cbValueData = (wcslen(UNICODE localized string) + 1) * sizeof(WCHAR)
+//
+// To unregister, set pbValueData to NULL and cbValueData to 0.
+//
+// The registered names are searched before the pre-installed names.
+//--------------------------------------------------------------------------
+
+function CryptFindLocalizedName(pwszCryptName: LPCWSTR): LPCWSTR; stdcall;
+{$EXTERNALSYM CryptFindLocalizedName}
+
+const
+ CRYPT_LOCALIZED_NAME_ENCODING_TYPE = 0;
+ {$EXTERNALSYM CRYPT_LOCALIZED_NAME_ENCODING_TYPE}
+ CRYPT_LOCALIZED_NAME_OID = 'LocalizedNames';
+ {$EXTERNALSYM CRYPT_LOCALIZED_NAME_OID}
+
+//+=========================================================================
+// Low Level Cryptographic Message Data Structures and APIs
+//==========================================================================
+
+type
+ HCRYPTMSG = Pointer;
+ {$EXTERNALSYM HCRYPTMSG}
+ PHCRYPTMSG = ^HCRYPTMSG;
+ {$NODEFINE PHCRYPTMSG}
+
+const
+ szOID_PKCS_7_DATA = '1.2.840.113549.1.7.1';
+ {$EXTERNALSYM szOID_PKCS_7_DATA}
+ szOID_PKCS_7_SIGNED = '1.2.840.113549.1.7.2';
+ {$EXTERNALSYM szOID_PKCS_7_SIGNED}
+ szOID_PKCS_7_ENVELOPED = '1.2.840.113549.1.7.3';
+ {$EXTERNALSYM szOID_PKCS_7_ENVELOPED}
+ szOID_PKCS_7_SIGNEDANDENVELOPED = '1.2.840.113549.1.7.4';
+ {$EXTERNALSYM szOID_PKCS_7_SIGNEDANDENVELOPED}
+ szOID_PKCS_7_DIGESTED = '1.2.840.113549.1.7.5';
+ {$EXTERNALSYM szOID_PKCS_7_DIGESTED}
+ szOID_PKCS_7_ENCRYPTED = '1.2.840.113549.1.7.6';
+ {$EXTERNALSYM szOID_PKCS_7_ENCRYPTED}
+
+ szOID_PKCS_9_CONTENT_TYPE = '1.2.840.113549.1.9.3';
+ {$EXTERNALSYM szOID_PKCS_9_CONTENT_TYPE}
+ szOID_PKCS_9_MESSAGE_DIGEST = '1.2.840.113549.1.9.4';
+ {$EXTERNALSYM szOID_PKCS_9_MESSAGE_DIGEST}
+
+//+-------------------------------------------------------------------------
+// Message types
+//--------------------------------------------------------------------------
+
+ CMSG_DATA = 1;
+ {$EXTERNALSYM CMSG_DATA}
+ CMSG_SIGNED = 2;
+ {$EXTERNALSYM CMSG_SIGNED}
+ CMSG_ENVELOPED = 3;
+ {$EXTERNALSYM CMSG_ENVELOPED}
+ CMSG_SIGNED_AND_ENVELOPED = 4;
+ {$EXTERNALSYM CMSG_SIGNED_AND_ENVELOPED}
+ CMSG_HASHED = 5;
+ {$EXTERNALSYM CMSG_HASHED}
+ CMSG_ENCRYPTED = 6;
+ {$EXTERNALSYM CMSG_ENCRYPTED}
+
+//+-------------------------------------------------------------------------
+// Message Type Bit Flags
+//--------------------------------------------------------------------------
+
+ CMSG_ALL_FLAGS = not 0;
+ {$EXTERNALSYM CMSG_ALL_FLAGS}
+ CMSG_DATA_FLAG = 1 shl CMSG_DATA;
+ {$EXTERNALSYM CMSG_DATA_FLAG}
+ CMSG_SIGNED_FLAG = 1 shl CMSG_SIGNED;
+ {$EXTERNALSYM CMSG_SIGNED_FLAG}
+ CMSG_ENVELOPED_FLAG = 1 shl CMSG_ENVELOPED;
+ {$EXTERNALSYM CMSG_ENVELOPED_FLAG}
+ CMSG_SIGNED_AND_ENVELOPED_FLAG = 1 shl CMSG_SIGNED_AND_ENVELOPED;
+ {$EXTERNALSYM CMSG_SIGNED_AND_ENVELOPED_FLAG}
+ CMSG_HASHED_FLAG = 1 shl CMSG_HASHED;
+ {$EXTERNALSYM CMSG_HASHED_FLAG}
+ CMSG_ENCRYPTED_FLAG = 1 shl CMSG_ENCRYPTED;
+ {$EXTERNALSYM CMSG_ENCRYPTED_FLAG}
+
+//+-------------------------------------------------------------------------
+// Certificate Issuer and SerialNumber
+//--------------------------------------------------------------------------
+
+type
+ PCERT_ISSUER_SERIAL_NUMBER = ^CERT_ISSUER_SERIAL_NUMBER;
+ {$EXTERNALSYM PCERT_ISSUER_SERIAL_NUMBER}
+ _CERT_ISSUER_SERIAL_NUMBER = record
+ Issuer: CERT_NAME_BLOB;
+ SerialNumber: CRYPT_INTEGER_BLOB;
+ end;
+ {$EXTERNALSYM _CERT_ISSUER_SERIAL_NUMBER}
+ CERT_ISSUER_SERIAL_NUMBER = _CERT_ISSUER_SERIAL_NUMBER;
+ {$EXTERNALSYM CERT_ISSUER_SERIAL_NUMBER}
+ TCertIssuerSerialNumber = CERT_ISSUER_SERIAL_NUMBER;
+ PCertIssuerSerialNumber = PCERT_ISSUER_SERIAL_NUMBER;
+
+//+-------------------------------------------------------------------------
+// Certificate Identifier
+//--------------------------------------------------------------------------
+
+ PCERT_ID = ^CERT_ID;
+ {$EXTERNALSYM PCERT_ID}
+ _CERT_ID = record
+ dwIdChoice: DWORD;
+ case Integer of
+ // CERT_ID_ISSUER_SERIAL_NUMBER
+ 0: (IssuerSerialNumber: CERT_ISSUER_SERIAL_NUMBER);
+ // CERT_ID_KEY_IDENTIFIER
+ 1: (KeyId: CRYPT_HASH_BLOB);
+ // CERT_ID_SHA1_HASH
+ 2: (HashId: CRYPT_HASH_BLOB);
+ end;
+ {$EXTERNALSYM _CERT_ID}
+ CERT_ID = _CERT_ID;
+ {$EXTERNALSYM CERT_ID}
+ TCertId = CERT_ID;
+ PCertId = PCERT_ID;
+
+const
+ CERT_ID_ISSUER_SERIAL_NUMBER = 1;
+ {$EXTERNALSYM CERT_ID_ISSUER_SERIAL_NUMBER}
+ CERT_ID_KEY_IDENTIFIER = 2;
+ {$EXTERNALSYM CERT_ID_KEY_IDENTIFIER}
+ CERT_ID_SHA1_HASH = 3;
+ {$EXTERNALSYM CERT_ID_SHA1_HASH}
+
+//+-------------------------------------------------------------------------
+// The message encode information (pvMsgEncodeInfo) is message type dependent
+//--------------------------------------------------------------------------
+
+//+-------------------------------------------------------------------------
+// CMSG_DATA: pvMsgEncodeInfo = NULL
+//--------------------------------------------------------------------------
+
+//+-------------------------------------------------------------------------
+// CMSG_SIGNED
+//
+// The pCertInfo in the CMSG_SIGNER_ENCODE_INFO provides the Issuer, SerialNumber
+// and PublicKeyInfo.Algorithm. The PublicKeyInfo.Algorithm implicitly
+// specifies the HashEncryptionAlgorithm to be used.
+//
+// If the SignerId is present with a nonzero dwIdChoice its used instead
+// of the Issuer and SerialNumber in pCertInfo.
+//
+// CMS supports the KEY_IDENTIFIER and ISSUER_SERIAL_NUMBER CERT_IDs. PKCS #7
+// version 1.5 only supports the ISSUER_SERIAL_NUMBER CERT_ID choice.
+//
+// If HashEncryptionAlgorithm is present and not NULL its used instead of
+// the PublicKeyInfo.Algorithm.
+//
+// Note, for RSA, the hash encryption algorithm is normally the same as
+// the public key algorithm. For DSA, the hash encryption algorithm is
+// normally a DSS signature algorithm.
+//
+// pvHashEncryptionAuxInfo currently isn't used and must be set to NULL if
+// present in the data structure.
+//
+// The hCryptProv and dwKeySpec specify the private key to use. If dwKeySpec
+// == 0, then, defaults to AT_SIGNATURE.
+//
+// If CMSG_CRYPT_RELEASE_CONTEXT_FLAG is set in the dwFlags
+// passed to CryptMsgOpenToEncode(), the signer hCryptProv's are released.
+//
+// pvHashAuxInfo currently isn't used and must be set to NULL.
+//
+// CMS signed messages allow the inclusion of Attribute Certs.
+//--------------------------------------------------------------------------
+
+type
+ PCMSG_SIGNER_ENCODE_INFO = ^CMSG_SIGNER_ENCODE_INFO;
+ {$EXTERNALSYM PCMSG_SIGNER_ENCODE_INFO}
+ _CMSG_SIGNER_ENCODE_INFO = record
+ cbSize: DWORD;
+ pCertInfo: PCERT_INFO;
+ hCryptProv: HCRYPTPROV;
+ dwKeySpec: DWORD;
+ HashAlgorithm: CRYPT_ALGORITHM_IDENTIFIER;
+ pvHashAuxInfo: Pointer;
+ cAuthAttr: DWORD;
+ rgAuthAttr: PCRYPT_ATTRIBUTE;
+ cUnauthAttr: DWORD;
+ rgUnauthAttr: PCRYPT_ATTRIBUTE;
+ {$IFDEF CMSG_SIGNER_ENCODE_INFO_HAS_CMS_FIELDS}
+ SignerId: CERT_ID;
+ HashEncryptionAlgorithm: CRYPT_ALGORITHM_IDENTIFIER;
+ pvHashEncryptionAuxInfo: Pointer;
+ {$ENDIF CMSG_SIGNER_ENCODE_INFO_HAS_CMS_FIELDS}
+ end;
+ {$EXTERNALSYM _CMSG_SIGNER_ENCODE_INFO}
+ CMSG_SIGNER_ENCODE_INFO = _CMSG_SIGNER_ENCODE_INFO;
+ {$EXTERNALSYM CMSG_SIGNER_ENCODE_INFO}
+ TCmsgSignerEncodeInfo = CMSG_SIGNER_ENCODE_INFO;
+ PCmsgSignerEncodeInfo = PCMSG_SIGNER_ENCODE_INFO;
+
+ PCMSG_SIGNED_ENCODE_INFO = ^CMSG_SIGNED_ENCODE_INFO;
+ {$EXTERNALSYM PCMSG_SIGNED_ENCODE_INFO}
+ _CMSG_SIGNED_ENCODE_INFO = record
+ cbSize: DWORD;
+ cSigners: DWORD;
+ rgSigners: PCMSG_SIGNER_ENCODE_INFO;
+ cCertEncoded: DWORD;
+ rgCertEncoded: PCERT_BLOB;
+ cCrlEncoded: DWORD;
+ rgCrlEncoded: PCRL_BLOB;
+ {$IFDEF CMSG_SIGNED_ENCODE_INFO_HAS_CMS_FIELDS}
+ cAttrCertEncoded: DWORD;
+ rgAttrCertEncoded: PCERT_BLOB;
+ {$ENDIF CMSG_SIGNED_ENCODE_INFO_HAS_CMS_FIELDS}
+ end;
+ {$EXTERNALSYM _CMSG_SIGNED_ENCODE_INFO}
+ CMSG_SIGNED_ENCODE_INFO = _CMSG_SIGNED_ENCODE_INFO;
+ {$EXTERNALSYM CMSG_SIGNED_ENCODE_INFO}
+ TCmsgSignedEncodeInfo = CMSG_SIGNED_ENCODE_INFO;
+ PCmsgSignedEncodeInfo = PCMSG_SIGNED_ENCODE_INFO;
+
+//+-------------------------------------------------------------------------
+// CMSG_ENVELOPED
+//
+// The PCERT_INFO for the rgRecipients provides the Issuer, SerialNumber
+// and PublicKeyInfo. The PublicKeyInfo.Algorithm implicitly
+// specifies the KeyEncryptionAlgorithm to be used.
+//
+// The PublicKeyInfo.PublicKey in PCERT_INFO is used to encrypt the content
+// encryption key for the recipient.
+//
+// hCryptProv is used to do the content encryption, recipient key encryption
+// and export. The hCryptProv's private keys aren't used. If hCryptProv
+// is NULL, a default hCryptProv is chosen according to the
+// ContentEncryptionAlgorithm and the first recipient KeyEncryptionAlgorithm.
+//
+// If CMSG_CRYPT_RELEASE_CONTEXT_FLAG is set in the dwFlags
+// passed to CryptMsgOpenToEncode(), the envelope's hCryptProv is released.
+//
+// Note: CAPI currently doesn't support more than one KeyEncryptionAlgorithm
+// per provider. This will need to be fixed.
+//
+// Currently, pvEncryptionAuxInfo is only defined for RC2 or RC4 encryption
+// algorithms. Otherwise, its not used and must be set to NULL.
+// See CMSG_RC2_AUX_INFO for the RC2 encryption algorithms.
+// See CMSG_RC4_AUX_INFO for the RC4 encryption algorithms.
+//
+// To enable SP3 compatible encryption, pvEncryptionAuxInfo should point to
+// a CMSG_SP3_COMPATIBLE_AUX_INFO data structure.
+//
+// To enable the CMS envelope enhancements, rgpRecipients must be set to
+// NULL, and rgCmsRecipients updated to point to an array of
+// CMSG_RECIPIENT_ENCODE_INFO's.
+//
+// Also, CMS envelope enhancements support the inclusion of a bag of
+// Certs, CRLs, Attribute Certs and/or Unprotected Attributes.
+//--------------------------------------------------------------------------
+
+type
+ PCMSG_ENVELOPED_ENCODE_INFO = ^CMSG_ENVELOPED_ENCODE_INFO;
+ {$EXTERNALSYM PCMSG_ENVELOPED_ENCODE_INFO}
+ _CMSG_ENVELOPED_ENCODE_INFO = record
+ cbSize: DWORD;
+ hCryptProv: HCRYPTPROV;
+ ContentEncryptionAlgorithm: CRYPT_ALGORITHM_IDENTIFIER;
+ pvEncryptionAuxInfo: Pointer;
+ cRecipients: DWORD;
+ // The following array may only be used for transport recipients identified
+ // by their IssuereAndSerialNumber. If rgpRecipients != NULL, then,
+ // the rgCmsRecipients must be NULL.
+ rgpRecipients: PCERT_INFO;
+ {$IFDEF CMSG_ENVELOPED_ENCODE_INFO_HAS_CMS_FIELDS}
+ // If rgCmsRecipients != NULL, then, the above rgpRecipients must be
+ // NULL.
+ rgCmsRecipients: PCMSG_RECIPIENT_ENCODE_INFO;
+ cCertEncoded: DWORD;
+ rgCertEncoded: PCERT_BLOB;
+ cCrlEncoded: DWORD;
+ rgCrlEncoded: PCRL_BLOB;
+ cAttrCertEncoded: DWORD;
+ rgAttrCertEncoded: PCERT_BLOB;
+ cUnprotectedAttr: DWORD;
+ rgUnprotectedAttr: PCRYPT_ATTRIBUTE;
+ {$ENDIF CMSG_ENVELOPED_ENCODE_INFO_HAS_CMS_FIELDS}
+ end;
+ {$EXTERNALSYM _CMSG_ENVELOPED_ENCODE_INFO}
+ CMSG_ENVELOPED_ENCODE_INFO = _CMSG_ENVELOPED_ENCODE_INFO;
+ {$EXTERNALSYM CMSG_ENVELOPED_ENCODE_INFO}
+ TCmsgEnvelopedEncodeInfo = CMSG_ENVELOPED_ENCODE_INFO;
+ PCmsgEnvelopedEncodeInfo = PCMSG_ENVELOPED_ENCODE_INFO;
+
+//+-------------------------------------------------------------------------
+// Key Transport Recipient Encode Info
+//
+// hCryptProv is used to do the recipient key encryption
+// and export. The hCryptProv's private keys aren't used.
+//
+// If hCryptProv is NULL, then, the hCryptProv specified in
+// CMSG_ENVELOPED_ENCODE_INFO is used.
+//
+// Note, even if CMSG_CRYPT_RELEASE_CONTEXT_FLAG is set in the dwFlags
+// passed to CryptMsgOpenToEncode(), this hCryptProv isn't released.
+//
+// CMS supports the KEY_IDENTIFIER and ISSUER_SERIAL_NUMBER CERT_IDs. PKCS #7
+// version 1.5 only supports the ISSUER_SERIAL_NUMBER CERT_ID choice.
+//--------------------------------------------------------------------------
+
+ PCMSG_KEY_TRANS_RECIPIENT_ENCODE_INFO = ^CMSG_KEY_TRANS_RECIPIENT_ENCODE_INFO;
+ {$EXTERNALSYM PCMSG_KEY_TRANS_RECIPIENT_ENCODE_INFO}
+ _CMSG_KEY_TRANS_RECIPIENT_ENCODE_INFO = record
+ cbSize: DWORD;
+ KeyEncryptionAlgorithm: CRYPT_ALGORITHM_IDENTIFIER;
+ pvKeyEncryptionAuxInfo: Pointer;
+ hCryptProv: HCRYPTPROV;
+ RecipientPublicKey: CRYPT_BIT_BLOB;
+ RecipientId: CERT_ID;
+ end;
+ {$EXTERNALSYM _CMSG_KEY_TRANS_RECIPIENT_ENCODE_INFO}
+ CMSG_KEY_TRANS_RECIPIENT_ENCODE_INFO = _CMSG_KEY_TRANS_RECIPIENT_ENCODE_INFO;
+ {$EXTERNALSYM CMSG_KEY_TRANS_RECIPIENT_ENCODE_INFO}
+ TCmsgKeyTransRecipientEncodeInfo = CMSG_KEY_TRANS_RECIPIENT_ENCODE_INFO;
+ PCmsgKeyTransRecipientEncodeInfo = PCMSG_KEY_TRANS_RECIPIENT_ENCODE_INFO;
+
+//+-------------------------------------------------------------------------
+// Key Agreement Recipient Encode Info
+//
+// If hCryptProv is NULL, then, the hCryptProv specified in
+// CMSG_ENVELOPED_ENCODE_INFO is used.
+//
+// For the CMSG_KEY_AGREE_STATIC_KEY_CHOICE, both the hCryptProv and
+// dwKeySpec must be specified to select the sender's private key.
+//
+// Note, even if CMSG_CRYPT_RELEASE_CONTEXT_FLAG is set in the dwFlags
+// passed to CryptMsgOpenToEncode(), this hCryptProv isn't released.
+//
+// CMS supports the KEY_IDENTIFIER and ISSUER_SERIAL_NUMBER CERT_IDs.
+//
+// There is 1 key choice, ephemeral originator. The originator's ephemeral
+// key is generated using the public key algorithm parameters shared
+// amongst all the recipients.
+//
+// There are 2 key choices: ephemeral originator or static sender. The
+// originator's ephemeral key is generated using the public key algorithm
+// parameters shared amongst all the recipients. For the static sender its
+// private key is used. The hCryptProv and dwKeySpec specify the private key.
+// The pSenderId identifies the certificate containing the sender's public key.
+//
+// Currently, pvKeyEncryptionAuxInfo isn't used and must be set to NULL.
+//
+// If KeyEncryptionAlgorithm.Parameters.cbData == 0, then, its Parameters
+// are updated with the encoded KeyWrapAlgorithm.
+//
+// Currently, pvKeyWrapAuxInfo is only defined for algorithms with
+// RC2. Otherwise, its not used and must be set to NULL.
+// When set for RC2 algorithms, points to a CMSG_RC2_AUX_INFO containing
+// the RC2 effective key length.
+//
+// Note, key agreement recipients are not supported in PKCS #7 version 1.5.
+//--------------------------------------------------------------------------
+
+ PCMSG_RECIPIENT_ENCRYPTED_KEY_ENCODE_INFO = ^CMSG_RECIPIENT_ENCRYPTED_KEY_ENCODE_INFO;
+ {$EXTERNALSYM PCMSG_RECIPIENT_ENCRYPTED_KEY_ENCODE_INFO}
+ _CMSG_RECIPIENT_ENCRYPTED_KEY_ENCODE_INFO = record
+ cbSize: DWORD;
+ RecipientPublicKey: CRYPT_BIT_BLOB;
+ RecipientId: CERT_ID;
+ // Following fields are optional and only applicable to KEY_IDENTIFIER
+ // CERT_IDs.
+ Date: FILETIME;
+ pOtherAttr: PCRYPT_ATTRIBUTE_TYPE_VALUE;
+ end;
+ {$EXTERNALSYM _CMSG_RECIPIENT_ENCRYPTED_KEY_ENCODE_INFO}
+ CMSG_RECIPIENT_ENCRYPTED_KEY_ENCODE_INFO = _CMSG_RECIPIENT_ENCRYPTED_KEY_ENCODE_INFO;
+ {$EXTERNALSYM CMSG_RECIPIENT_ENCRYPTED_KEY_ENCODE_INFO}
+ TCmsgRecipientEncryptedKeyEncodeInfo = CMSG_RECIPIENT_ENCRYPTED_KEY_ENCODE_INFO;
+ PCmsgRecipientEncryptedKeyEncodeInfo = PCMSG_RECIPIENT_ENCRYPTED_KEY_ENCODE_INFO;
+
+ PCMSG_KEY_AGREE_RECIPIENT_ENCODE_INFO = ^CMSG_KEY_AGREE_RECIPIENT_ENCODE_INFO;
+ {$EXTERNALSYM PCMSG_KEY_AGREE_RECIPIENT_ENCODE_INFO}
+ _CMSG_KEY_AGREE_RECIPIENT_ENCODE_INFO = record
+ cbSize: DWORD;
+ KeyEncryptionAlgorithm: CRYPT_ALGORITHM_IDENTIFIER;
+ pvKeyEncryptionAuxInfo: Pointer;
+ KeyWrapAlgorithm: CRYPT_ALGORITHM_IDENTIFIER;
+ pvKeyWrapAuxInfo: Pointer;
+ // The following hCryptProv and dwKeySpec must be specified for the
+ // CMSG_KEY_AGREE_STATIC_KEY_CHOICE.
+ //
+ // For CMSG_KEY_AGREE_EPHEMERAL_KEY_CHOICE, dwKeySpec isn't applicable
+ // and hCryptProv is optional.
+ hCryptProv: HCRYPTPROV;
+ dwKeySpec: DWORD;
+ dwKeyChoice: DWORD;
+ Union: record
+ case Integer of
+ // CMSG_KEY_AGREE_EPHEMERAL_KEY_CHOICE
+ //
+ // The ephemeral public key algorithm and parameters.
+ 0: (pEphemeralAlgorithm: PCRYPT_ALGORITHM_IDENTIFIER);
+ // CMSG_KEY_AGREE_STATIC_KEY_CHOICE
+ //
+ // The CertId of the sender's certificate
+ 1: (pSenderId: PCERT_ID);
+ end;
+ UserKeyingMaterial: CRYPT_DATA_BLOB; // OPTIONAL
+ cRecipientEncryptedKeys: DWORD;
+ rgpRecipientEncryptedKeys: PCMSG_RECIPIENT_ENCRYPTED_KEY_ENCODE_INFO;
+ end;
+ {$EXTERNALSYM _CMSG_KEY_AGREE_RECIPIENT_ENCODE_INFO}
+ CMSG_KEY_AGREE_RECIPIENT_ENCODE_INFO = _CMSG_KEY_AGREE_RECIPIENT_ENCODE_INFO;
+ {$EXTERNALSYM CMSG_KEY_AGREE_RECIPIENT_ENCODE_INFO}
+ TCmsgKeyAgreeRecipientEncodeInfo = CMSG_KEY_AGREE_RECIPIENT_ENCODE_INFO;
+ PCmsgKeyAgreeRecipientEncodeInfo = PCMSG_KEY_AGREE_RECIPIENT_ENCODE_INFO;
+
+const
+ CMSG_KEY_AGREE_EPHEMERAL_KEY_CHOICE = 1;
+ {$EXTERNALSYM CMSG_KEY_AGREE_EPHEMERAL_KEY_CHOICE}
+ CMSG_KEY_AGREE_STATIC_KEY_CHOICE = 2;
+ {$EXTERNALSYM CMSG_KEY_AGREE_STATIC_KEY_CHOICE}
+
+//+-------------------------------------------------------------------------
+// Mail List Recipient Encode Info
+//
+// There is 1 choice for the KeyEncryptionKey: an already created CSP key
+// handle. For the key handle choice, hCryptProv must be nonzero. This key
+// handle isn't destroyed.
+//
+// Note, even if CMSG_CRYPT_RELEASE_CONTEXT_FLAG is set in the dwFlags
+// passed to CryptMsgOpenToEncode(), this hCryptProv isn't released.
+//
+// Currently, pvKeyEncryptionAuxInfo is only defined for RC2 key wrap
+// algorithms. Otherwise, its not used and must be set to NULL.
+// When set for RC2 algorithms, points to a CMSG_RC2_AUX_INFO containing
+// the RC2 effective key length.
+//
+// Note, mail list recipients are not supported in PKCS #7 version 1.5.
+//--------------------------------------------------------------------------
+
+type
+ PCMSG_MAIL_LIST_RECIPIENT_ENCODE_INFO = ^CMSG_MAIL_LIST_RECIPIENT_ENCODE_INFO;
+ {$EXTERNALSYM PCMSG_MAIL_LIST_RECIPIENT_ENCODE_INFO}
+ _CMSG_MAIL_LIST_RECIPIENT_ENCODE_INFO = record
+ cbSize: DWORD;
+ KeyEncryptionAlgorithm: CRYPT_ALGORITHM_IDENTIFIER;
+ pvKeyEncryptionAuxInfo: Pointer;
+ hCryptProv: HCRYPTPROV;
+ dwKeyChoice: DWORD;
+ Union: record
+ case Integer of
+ // CMSG_MAIL_LIST_HANDLE_KEY_CHOICE
+ 0: (hKeyEncryptionKey: HCRYPTKEY);
+ // Reserve space for a potential pointer choice
+ 1: (pvKeyEncryptionKey: Pointer);
+ end;
+ KeyId: CRYPT_DATA_BLOB;
+ // Following fields are optional.
+ Date: FILETIME;
+ pOtherAttr: PCRYPT_ATTRIBUTE_TYPE_VALUE;
+ end;
+ {$EXTERNALSYM _CMSG_MAIL_LIST_RECIPIENT_ENCODE_INFO}
+ CMSG_MAIL_LIST_RECIPIENT_ENCODE_INFO = _CMSG_MAIL_LIST_RECIPIENT_ENCODE_INFO;
+ {$EXTERNALSYM CMSG_MAIL_LIST_RECIPIENT_ENCODE_INFO}
+ TCmsgMailListRecipientEncodeInfo = CMSG_MAIL_LIST_RECIPIENT_ENCODE_INFO;
+ PCmsgMailListRecipientEncodeInfo = PCMSG_MAIL_LIST_RECIPIENT_ENCODE_INFO;
+
+const
+ CMSG_MAIL_LIST_HANDLE_KEY_CHOICE = 1;
+ {$EXTERNALSYM CMSG_MAIL_LIST_HANDLE_KEY_CHOICE}
+
+//+-------------------------------------------------------------------------
+// Recipient Encode Info
+//
+// Note, only key transport recipients are supported in PKCS #7 version 1.5.
+//--------------------------------------------------------------------------
+
+type
+ PCMSG_RECIPIENT_ENCODE_INFO = ^CMSG_RECIPIENT_ENCODE_INFO;
+ {$NODEFINE PCMSG_RECIPIENT_ENCODE_INFO}
+ _CMSG_RECIPIENT_ENCODE_INFO = record
+ dwRecipientChoice: DWORD;
+ case Integer of
+ // CMSG_KEY_TRANS_RECIPIENT
+ 0: (pKeyTrans: PCMSG_KEY_TRANS_RECIPIENT_ENCODE_INFO);
+ // CMSG_KEY_AGREE_RECIPIENT
+ 1: (pKeyAgree: PCMSG_KEY_AGREE_RECIPIENT_ENCODE_INFO);
+ // CMSG_MAIL_LIST_RECIPIENT
+ 2: (pMailList: PCMSG_MAIL_LIST_RECIPIENT_ENCODE_INFO);
+ end;
+ {$EXTERNALSYM _CMSG_RECIPIENT_ENCODE_INFO}
+ CMSG_RECIPIENT_ENCODE_INFO = _CMSG_RECIPIENT_ENCODE_INFO;
+ {$NODEFINE CMSG_RECIPIENT_ENCODE_INFO}
+ TCmsgRecipientEncodeInfo = CMSG_RECIPIENT_ENCODE_INFO;
+ PCmsgRecipientEncodeInfo = PCMSG_RECIPIENT_ENCODE_INFO;
+
+const
+ CMSG_KEY_TRANS_RECIPIENT = 1;
+ {$EXTERNALSYM CMSG_KEY_TRANS_RECIPIENT}
+ CMSG_KEY_AGREE_RECIPIENT = 2;
+ {$EXTERNALSYM CMSG_KEY_AGREE_RECIPIENT}
+ CMSG_MAIL_LIST_RECIPIENT = 3;
+ {$EXTERNALSYM CMSG_MAIL_LIST_RECIPIENT}
+
+//+-------------------------------------------------------------------------
+// CMSG_RC2_AUX_INFO
+//
+// AuxInfo for RC2 encryption algorithms. The pvEncryptionAuxInfo field
+// in CMSG_ENCRYPTED_ENCODE_INFO should be updated to point to this
+// structure. If not specified, defaults to 40 bit.
+//
+// Note, this AuxInfo is only used when, the ContentEncryptionAlgorithm's
+// Parameter.cbData is zero. Otherwise, the Parameters is decoded to
+// get the bit length.
+//
+// If CMSG_SP3_COMPATIBLE_ENCRYPT_FLAG is set in dwBitLen, then, SP3
+// compatible encryption is done and the bit length is ignored.
+//--------------------------------------------------------------------------
+
+type
+ PCMSG_RC2_AUX_INFO = ^CMSG_RC2_AUX_INFO;
+ {$EXTERNALSYM PCMSG_RC2_AUX_INFO}
+ _CMSG_RC2_AUX_INFO = record
+ cbSize: DWORD;
+ dwBitLen: DWORD;
+ end;
+ {$EXTERNALSYM _CMSG_RC2_AUX_INFO}
+ CMSG_RC2_AUX_INFO = _CMSG_RC2_AUX_INFO;
+ {$EXTERNALSYM CMSG_RC2_AUX_INFO}
+ TCmsgRc2AuxInfo = CMSG_RC2_AUX_INFO;
+ PCmsgRc2AuxInfo = PCMSG_RC2_AUX_INFO;
+
+//+-------------------------------------------------------------------------
+// CMSG_SP3_COMPATIBLE_AUX_INFO
+//
+// AuxInfo for enabling SP3 compatible encryption.
+//
+// The CMSG_SP3_COMPATIBLE_ENCRYPT_FLAG is set in dwFlags to enable SP3
+// compatible encryption. When set, uses zero salt instead of no salt,
+// the encryption algorithm parameters are NULL instead of containing the
+// encoded RC2 parameters or encoded IV octet string and the encrypted
+// symmetric key is encoded little endian instead of big endian.
+//--------------------------------------------------------------------------
+
+ PCMSG_SP3_COMPATIBLE_AUX_INFO = ^CMSG_SP3_COMPATIBLE_AUX_INFO;
+ {$EXTERNALSYM PCMSG_SP3_COMPATIBLE_AUX_INFO}
+ _CMSG_SP3_COMPATIBLE_AUX_INFO = record
+ cbSize: DWORD;
+ dwFlags: DWORD;
+ end;
+ {$EXTERNALSYM _CMSG_SP3_COMPATIBLE_AUX_INFO}
+ CMSG_SP3_COMPATIBLE_AUX_INFO = _CMSG_SP3_COMPATIBLE_AUX_INFO;
+ {$EXTERNALSYM CMSG_SP3_COMPATIBLE_AUX_INFO}
+ TCmsgSp3CompatibleAuxInfo = CMSG_SP3_COMPATIBLE_AUX_INFO;
+ PCmsgSp3CompatibleAuxInfo = PCMSG_SP3_COMPATIBLE_AUX_INFO;
+
+const
+ CMSG_SP3_COMPATIBLE_ENCRYPT_FLAG = DWORD($80000000);
+ {$EXTERNALSYM CMSG_SP3_COMPATIBLE_ENCRYPT_FLAG}
+
+//+-------------------------------------------------------------------------
+// CMSG_RC4_AUX_INFO
+//
+// AuxInfo for RC4 encryption algorithms. The pvEncryptionAuxInfo field
+// in CMSG_ENCRYPTED_ENCODE_INFO should be updated to point to this
+// structure. If not specified, uses the CSP's default bit length with no
+// salt. Note, the base CSP has a 40 bit default and the enhanced CSP has
+// a 128 bit default.
+//
+// If CMSG_RC4_NO_SALT_FLAG is set in dwBitLen, then, no salt is generated.
+// Otherwise, (128 - dwBitLen)/8 bytes of salt are generated and encoded
+// as an OCTET STRING in the algorithm parameters field.
+//--------------------------------------------------------------------------
+
+type
+ PCMSG_RC4_AUX_INFO = ^CMSG_RC4_AUX_INFO;
+ {$EXTERNALSYM PCMSG_RC4_AUX_INFO}
+ _CMSG_RC4_AUX_INFO = record
+ cbSize: DWORD;
+ dwBitLen: DWORD;
+ end;
+ {$EXTERNALSYM _CMSG_RC4_AUX_INFO}
+ CMSG_RC4_AUX_INFO = _CMSG_RC4_AUX_INFO;
+ {$EXTERNALSYM CMSG_RC4_AUX_INFO}
+ TCmsgRc4AuxInfo = CMSG_RC4_AUX_INFO;
+ PCmsgRc4AuxInfo = PCMSG_RC4_AUX_INFO;
+
+const
+ CMSG_RC4_NO_SALT_FLAG = $40000000;
+ {$EXTERNALSYM CMSG_RC4_NO_SALT_FLAG}
+
+//+-------------------------------------------------------------------------
+// CMSG_SIGNED_AND_ENVELOPED
+//
+// For PKCS #7, a signed and enveloped message doesn't have the
+// signer's authenticated or unauthenticated attributes. Otherwise, a
+// combination of the CMSG_SIGNED_ENCODE_INFO and CMSG_ENVELOPED_ENCODE_INFO.
+//--------------------------------------------------------------------------
+
+type
+ PCMSG_SIGNED_AND_ENVELOPED_ENCODE_INFO = ^CMSG_SIGNED_AND_ENVELOPED_ENCODE_INFO;
+ {$EXTERNALSYM PCMSG_SIGNED_AND_ENVELOPED_ENCODE_INFO}
+ _CMSG_SIGNED_AND_ENVELOPED_ENCODE_INFO = record
+ cbSize: DWORD;
+ SignedInfo: CMSG_SIGNED_ENCODE_INFO;
+ EnvelopedInfo: CMSG_ENVELOPED_ENCODE_INFO;
+ end;
+ {$EXTERNALSYM _CMSG_SIGNED_AND_ENVELOPED_ENCODE_INFO}
+ CMSG_SIGNED_AND_ENVELOPED_ENCODE_INFO = _CMSG_SIGNED_AND_ENVELOPED_ENCODE_INFO;
+ {$EXTERNALSYM CMSG_SIGNED_AND_ENVELOPED_ENCODE_INFO}
+ TCmsgSignedAndEnvelopedEncodeInfo = CMSG_SIGNED_AND_ENVELOPED_ENCODE_INFO;
+ PCmsgSignedAndEnvelopedEncodeInfo = PCMSG_SIGNED_AND_ENVELOPED_ENCODE_INFO;
+
+//+-------------------------------------------------------------------------
+// CMSG_HASHED
+//
+// hCryptProv is used to do the hash. Doesn't need to use a private key.
+//
+// If CMSG_CRYPT_RELEASE_CONTEXT_FLAG is set in the dwFlags
+// passed to CryptMsgOpenToEncode(), the hCryptProv is released.
+//
+// If fDetachedHash is set, then, the encoded message doesn't contain
+// any content (its treated as NULL Data)
+//
+// pvHashAuxInfo currently isn't used and must be set to NULL.
+//--------------------------------------------------------------------------
+
+ PCMSG_HASHED_ENCODE_INFO = ^CMSG_HASHED_ENCODE_INFO;
+ {$EXTERNALSYM PCMSG_HASHED_ENCODE_INFO}
+ _CMSG_HASHED_ENCODE_INFO = record
+ cbSize: DWORD;
+ hCryptProv: HCRYPTPROV;
+ HashAlgorithm: CRYPT_ALGORITHM_IDENTIFIER;
+ pvHashAuxInfo: Pointer;
+ end;
+ {$EXTERNALSYM _CMSG_HASHED_ENCODE_INFO}
+ CMSG_HASHED_ENCODE_INFO = _CMSG_HASHED_ENCODE_INFO;
+ {$EXTERNALSYM CMSG_HASHED_ENCODE_INFO}
+ TCmsgHashedEncodeInfo = CMSG_HASHED_ENCODE_INFO;
+ PCmsgHashedEncodeInfo = PCMSG_HASHED_ENCODE_INFO;
+
+//+-------------------------------------------------------------------------
+// CMSG_ENCRYPTED
+//
+// The key used to encrypt the message is identified outside of the message
+// content (for example, password).
+//
+// The content input to CryptMsgUpdate has already been encrypted.
+//
+// pvEncryptionAuxInfo currently isn't used and must be set to NULL.
+//--------------------------------------------------------------------------
+
+ PCMSG_ENCRYPTED_ENCODE_INFO = ^CMSG_ENCRYPTED_ENCODE_INFO;
+ {$EXTERNALSYM PCMSG_ENCRYPTED_ENCODE_INFO}
+ _CMSG_ENCRYPTED_ENCODE_INFO = record
+ cbSize: DWORD;
+ ContentEncryptionAlgorithm: CRYPT_ALGORITHM_IDENTIFIER;
+ pvEncryptionAuxInfo: Pointer;
+ end;
+ {$EXTERNALSYM _CMSG_ENCRYPTED_ENCODE_INFO}
+ CMSG_ENCRYPTED_ENCODE_INFO = _CMSG_ENCRYPTED_ENCODE_INFO;
+ {$EXTERNALSYM CMSG_ENCRYPTED_ENCODE_INFO}
+ TCmsgEncryptedEncodeInfo = CMSG_ENCRYPTED_ENCODE_INFO;
+ PCmsgEncryptedEncodeInfo = PCMSG_ENCRYPTED_ENCODE_INFO;
+
+//+-------------------------------------------------------------------------
+// This parameter allows messages to be of variable length with streamed
+// output.
+//
+// By default, messages are of a definite length and
+// CryptMsgGetParam(CMSG_CONTENT_PARAM) is
+// called to get the cryptographically processed content. Until closed,
+// the handle keeps a copy of the processed content.
+//
+// With streamed output, the processed content can be freed as its streamed.
+//
+// If the length of the content to be updated is known at the time of the
+// open, then, ContentLength should be set to that length. Otherwise, it
+// should be set to CMSG_INDEFINITE_LENGTH.
+//--------------------------------------------------------------------------
+
+type
+ PFN_CMSG_STREAM_OUTPUT = function(pvArg: Pointer; pbData: LPBYTE;
+ cbData: DWORD; fFinal: BOOL): BOOL; stdcall;
+ {$EXTERNALSYM PFN_CMSG_STREAM_OUTPUT}
+ PFnCMsgStreamOutput = PFN_CMSG_STREAM_OUTPUT;
+
+const
+ CMSG_INDEFINITE_LENGTH = DWORD($FFFFFFFF);
+ {$EXTERNALSYM CMSG_INDEFINITE_LENGTH}
+
+type
+ PCMSG_STREAM_INFO = ^CMSG_STREAM_INFO;
+ {$EXTERNALSYM PCMSG_STREAM_INFO}
+ _CMSG_STREAM_INFO = record
+ cbContent: DWORD;
+ pfnStreamOutput: PFN_CMSG_STREAM_OUTPUT;
+ pvArg: Pointer;
+ end;
+ {$EXTERNALSYM _CMSG_STREAM_INFO}
+ CMSG_STREAM_INFO = _CMSG_STREAM_INFO;
+ {$EXTERNALSYM CMSG_STREAM_INFO}
+ TCmsgStreamInfo = CMSG_STREAM_INFO;
+ PCmsgStreamInfo = PCMSG_STREAM_INFO;
+
+//+-------------------------------------------------------------------------
+// Open dwFlags
+//--------------------------------------------------------------------------
+
+const
+ CMSG_BARE_CONTENT_FLAG = $00000001;
+ {$EXTERNALSYM CMSG_BARE_CONTENT_FLAG}
+ CMSG_LENGTH_ONLY_FLAG = $00000002;
+ {$EXTERNALSYM CMSG_LENGTH_ONLY_FLAG}
+ CMSG_DETACHED_FLAG = $00000004;
+ {$EXTERNALSYM CMSG_DETACHED_FLAG}
+ CMSG_AUTHENTICATED_ATTRIBUTES_FLAG = $00000008;
+ {$EXTERNALSYM CMSG_AUTHENTICATED_ATTRIBUTES_FLAG}
+ CMSG_CONTENTS_OCTETS_FLAG = $00000010;
+ {$EXTERNALSYM CMSG_CONTENTS_OCTETS_FLAG}
+ CMSG_MAX_LENGTH_FLAG = $00000020;
+ {$EXTERNALSYM CMSG_MAX_LENGTH_FLAG}
+
+// When set, nonData type inner content is encapsulated within an
+// OCTET STRING. Applicable to both Signed and Enveloped messages.
+
+ CMSG_CMS_ENCAPSULATED_CONTENT_FLAG = $00000040;
+ {$EXTERNALSYM CMSG_CMS_ENCAPSULATED_CONTENT_FLAG}
+
+// If set, then, the hCryptProv passed to CryptMsgOpenToEncode or
+// CryptMsgOpenToDecode is released on the final CryptMsgClose.
+// Not released if CryptMsgOpenToEncode or CryptMsgOpenToDecode fails.
+//
+// Note, the envelope recipient hCryptProv's aren't released.
+
+ CMSG_CRYPT_RELEASE_CONTEXT_FLAG = $00008000;
+ {$EXTERNALSYM CMSG_CRYPT_RELEASE_CONTEXT_FLAG}
+
+//+-------------------------------------------------------------------------
+// Open a cryptographic message for encoding
+//
+// For PKCS #7:
+// If the content to be passed to CryptMsgUpdate has already
+// been message encoded (the input to CryptMsgUpdate is the streamed output
+// from another message encode), then, the CMSG_ENCODED_CONTENT_INFO_FLAG should
+// be set in dwFlags. If not set, then, the inner ContentType is Data and
+// the input to CryptMsgUpdate is treated as the inner Data type's Content,
+// a string of bytes.
+// If CMSG_BARE_CONTENT_FLAG is specified for a streamed message,
+// the streamed output will not have an outer ContentInfo wrapper. This
+// makes it suitable to be streamed into an enclosing message.
+//
+// The pStreamInfo parameter needs to be set to stream the encoded message
+// output.
+//--------------------------------------------------------------------------
+
+function CryptMsgOpenToEncode(dwMsgEncodingType, dwFlags, dwMsgType: DWORD;
+ pvMsgEncodeInfo: Pointer; pszInnerContentObjID: LPSTR;
+ pStreamInfo: PCMSG_STREAM_INFO): HCRYPTMSG; stdcall;
+{$EXTERNALSYM CryptMsgOpenToEncode}
+
+//+-------------------------------------------------------------------------
+// Calculate the length of an encoded cryptographic message.
+//
+// Calculates the length of the encoded message given the
+// message type, encoding parameters and total length of
+// the data to be updated. Note, this might not be the exact length. However,
+// it will always be greater than or equal to the actual length.
+//--------------------------------------------------------------------------
+
+function CryptMsgCalculateEncodedLength(dwMsgEncodingType, dwFlags, dwMsgType: DWORD;
+ pvMsgEncodeInfo: Pointer; pszInnerContentObjID: LPSTR; cbData: DWORD): DWORD; stdcall;
+{$EXTERNALSYM CryptMsgCalculateEncodedLength}
+
+//+-------------------------------------------------------------------------
+// Open a cryptographic message for decoding
+//
+// hCryptProv specifies the crypto provider to use for hashing and/or
+// decrypting the message. If hCryptProv is NULL, a default crypt provider
+// is used.
+//
+// Currently pRecipientInfo isn't used and should be set to NULL.
+//
+// The pStreamInfo parameter needs to be set to stream the decoded content
+// output.
+//--------------------------------------------------------------------------
+
+function CryptMsgOpenToDecode(dwMsgEncodingType, dwFlags, dwMsgType: DWORD;
+ hCryptProv: HCRYPTPROV; pRecipientInfo: PCERT_INFO;
+ pStreamInfo: PCMSG_STREAM_INFO): HCRYPTMSG; stdcall;
+{$EXTERNALSYM CryptMsgOpenToDecode}
+
+//+-------------------------------------------------------------------------
+// Duplicate a cryptographic message handle
+//--------------------------------------------------------------------------
+
+function CryptMsgDuplicate(hCryptMsg: HCRYPTMSG): HCRYPTMSG; stdcall;
+{$EXTERNALSYM CryptMsgDuplicate}
+
+//+-------------------------------------------------------------------------
+// Close a cryptographic message handle
+//
+// LastError is preserved unless FALSE is returned.
+//--------------------------------------------------------------------------
+
+function CryptMsgClose(hCryptMsg: HCRYPTMSG): BOOL; stdcall;
+{$EXTERNALSYM CryptMsgClose}
+
+//+-------------------------------------------------------------------------
+// Update the content of a cryptographic message. Depending on how the
+// message was opened, the content is either encoded or decoded.
+//
+// This function is repetitively called to append to the message content.
+// fFinal is set to identify the last update. On fFinal, the encode/decode
+// is completed. The encoded/decoded content and the decoded parameters
+// are valid until the open and all duplicated handles are closed.
+//--------------------------------------------------------------------------
+
+function CryptMsgUpdate(hCryptMsg: HCRYPTMSG; pbData: LPBYTE; cbData: DWORD;
+ fFinal: BOOL): BOOL; stdcall;
+{$EXTERNALSYM CryptMsgUpdate}
+
+//+-------------------------------------------------------------------------
+// Get a parameter after encoding/decoding a cryptographic message. Called
+// after the final CryptMsgUpdate. Only the CMSG_CONTENT_PARAM and
+// CMSG_COMPUTED_HASH_PARAM are valid for an encoded message.
+//
+// For an encoded HASHED message, the CMSG_COMPUTED_HASH_PARAM can be got
+// before any CryptMsgUpdates to get its length.
+//
+// The pvData type definition depends on the dwParamType value.
+//
+// Elements pointed to by fields in the pvData structure follow the
+// structure. Therefore, *pcbData may exceed the size of the structure.
+//
+// Upon input, if *pcbData == 0, then, *pcbData is updated with the length
+// of the data and the pvData parameter is ignored.
+//
+// Upon return, *pcbData is updated with the length of the data.
+//
+// The OBJID BLOBs returned in the pvData structures point to
+// their still encoded representation. The appropriate functions
+// must be called to decode the information.
+//
+// See below for a list of the parameters to get.
+//--------------------------------------------------------------------------
+
+function CryptMsgGetParam(hCryptMsg: HCRYPTMSG; dwParamType, dwIndex: DWORD;
+ pvData: Pointer; var pcbData: DWORD): BOOL; stdcall;
+{$EXTERNALSYM CryptMsgGetParam}
+
+//+-------------------------------------------------------------------------
+// Get parameter types and their corresponding data structure definitions.
+//--------------------------------------------------------------------------
+
+const
+ CMSG_TYPE_PARAM = 1;
+ {$EXTERNALSYM CMSG_TYPE_PARAM}
+ CMSG_CONTENT_PARAM = 2;
+ {$EXTERNALSYM CMSG_CONTENT_PARAM}
+ CMSG_BARE_CONTENT_PARAM = 3;
+ {$EXTERNALSYM CMSG_BARE_CONTENT_PARAM}
+ CMSG_INNER_CONTENT_TYPE_PARAM = 4;
+ {$EXTERNALSYM CMSG_INNER_CONTENT_TYPE_PARAM}
+ CMSG_SIGNER_COUNT_PARAM = 5;
+ {$EXTERNALSYM CMSG_SIGNER_COUNT_PARAM}
+ CMSG_SIGNER_INFO_PARAM = 6;
+ {$EXTERNALSYM CMSG_SIGNER_INFO_PARAM}
+ CMSG_SIGNER_CERT_INFO_PARAM = 7;
+ {$EXTERNALSYM CMSG_SIGNER_CERT_INFO_PARAM}
+ CMSG_SIGNER_HASH_ALGORITHM_PARAM = 8;
+ {$EXTERNALSYM CMSG_SIGNER_HASH_ALGORITHM_PARAM}
+ CMSG_SIGNER_AUTH_ATTR_PARAM = 9;
+ {$EXTERNALSYM CMSG_SIGNER_AUTH_ATTR_PARAM}
+ CMSG_SIGNER_UNAUTH_ATTR_PARAM = 10;
+ {$EXTERNALSYM CMSG_SIGNER_UNAUTH_ATTR_PARAM}
+ CMSG_CERT_COUNT_PARAM = 11;
+ {$EXTERNALSYM CMSG_CERT_COUNT_PARAM}
+ CMSG_CERT_PARAM = 12;
+ {$EXTERNALSYM CMSG_CERT_PARAM}
+ CMSG_CRL_COUNT_PARAM = 13;
+ {$EXTERNALSYM CMSG_CRL_COUNT_PARAM}
+ CMSG_CRL_PARAM = 14;
+ {$EXTERNALSYM CMSG_CRL_PARAM}
+ CMSG_ENVELOPE_ALGORITHM_PARAM = 15;
+ {$EXTERNALSYM CMSG_ENVELOPE_ALGORITHM_PARAM}
+ CMSG_RECIPIENT_COUNT_PARAM = 17;
+ {$EXTERNALSYM CMSG_RECIPIENT_COUNT_PARAM}
+ CMSG_RECIPIENT_INDEX_PARAM = 18;
+ {$EXTERNALSYM CMSG_RECIPIENT_INDEX_PARAM}
+ CMSG_RECIPIENT_INFO_PARAM = 19;
+ {$EXTERNALSYM CMSG_RECIPIENT_INFO_PARAM}
+ CMSG_HASH_ALGORITHM_PARAM = 20;
+ {$EXTERNALSYM CMSG_HASH_ALGORITHM_PARAM}
+ CMSG_HASH_DATA_PARAM = 21;
+ {$EXTERNALSYM CMSG_HASH_DATA_PARAM}
+ CMSG_COMPUTED_HASH_PARAM = 22;
+ {$EXTERNALSYM CMSG_COMPUTED_HASH_PARAM}
+ CMSG_ENCRYPT_PARAM = 26;
+ {$EXTERNALSYM CMSG_ENCRYPT_PARAM}
+ CMSG_ENCRYPTED_DIGEST = 27;
+ {$EXTERNALSYM CMSG_ENCRYPTED_DIGEST}
+ CMSG_ENCODED_SIGNER = 28;
+ {$EXTERNALSYM CMSG_ENCODED_SIGNER}
+ CMSG_ENCODED_MESSAGE = 29;
+ {$EXTERNALSYM CMSG_ENCODED_MESSAGE}
+ CMSG_VERSION_PARAM = 30;
+ {$EXTERNALSYM CMSG_VERSION_PARAM}
+ CMSG_ATTR_CERT_COUNT_PARAM = 31;
+ {$EXTERNALSYM CMSG_ATTR_CERT_COUNT_PARAM}
+ CMSG_ATTR_CERT_PARAM = 32;
+ {$EXTERNALSYM CMSG_ATTR_CERT_PARAM}
+ CMSG_CMS_RECIPIENT_COUNT_PARAM = 33;
+ {$EXTERNALSYM CMSG_CMS_RECIPIENT_COUNT_PARAM}
+ CMSG_CMS_RECIPIENT_INDEX_PARAM = 34;
+ {$EXTERNALSYM CMSG_CMS_RECIPIENT_INDEX_PARAM}
+ CMSG_CMS_RECIPIENT_ENCRYPTED_KEY_INDEX_PARAM = 35;
+ {$EXTERNALSYM CMSG_CMS_RECIPIENT_ENCRYPTED_KEY_INDEX_PARAM}
+ CMSG_CMS_RECIPIENT_INFO_PARAM = 36;
+ {$EXTERNALSYM CMSG_CMS_RECIPIENT_INFO_PARAM}
+ CMSG_UNPROTECTED_ATTR_PARAM = 37;
+ {$EXTERNALSYM CMSG_UNPROTECTED_ATTR_PARAM}
+ CMSG_SIGNER_CERT_ID_PARAM = 38;
+ {$EXTERNALSYM CMSG_SIGNER_CERT_ID_PARAM}
+ CMSG_CMS_SIGNER_INFO_PARAM = 39;
+ {$EXTERNALSYM CMSG_CMS_SIGNER_INFO_PARAM}
+
+//+-------------------------------------------------------------------------
+// CMSG_TYPE_PARAM
+//
+// The type of the decoded message.
+//
+// pvData points to a DWORD
+//--------------------------------------------------------------------------
+
+//+-------------------------------------------------------------------------
+// CMSG_CONTENT_PARAM
+//
+// The encoded content of a cryptographic message. Depending on how the
+// message was opened, the content is either the whole PKCS#7
+// message (opened to encode) or the inner content (opened to decode).
+// In the decode case, the decrypted content is returned, if enveloped.
+// If not enveloped, and if the inner content is of type DATA, the returned
+// data is the contents octets of the inner content.
+//
+// pvData points to the buffer receiving the content bytes
+//--------------------------------------------------------------------------
+
+//+-------------------------------------------------------------------------
+// CMSG_BARE_CONTENT_PARAM
+//
+// The encoded content of an encoded cryptographic message, without the
+// outer layer of ContentInfo. That is, only the encoding of the
+// ContentInfo.content field is returned.
+//
+// pvData points to the buffer receiving the content bytes
+//--------------------------------------------------------------------------
+
+//+-------------------------------------------------------------------------
+// CMSG_INNER_CONTENT_TYPE_PARAM
+//
+// The type of the inner content of a decoded cryptographic message,
+// in the form of a NULL-terminated object identifier string
+// (eg. "1.2.840.113549.1.7.1").
+//
+// pvData points to the buffer receiving the object identifier string
+//--------------------------------------------------------------------------
+
+//+-------------------------------------------------------------------------
+// CMSG_SIGNER_COUNT_PARAM
+//
+// Count of signers in a SIGNED or SIGNED_AND_ENVELOPED message
+//
+// pvData points to a DWORD
+//--------------------------------------------------------------------------
+
+//+-------------------------------------------------------------------------
+// CMSG_SIGNER_CERT_INFO_PARAM
+//
+// To get all the signers, repetitively call CryptMsgGetParam, with
+// dwIndex set to 0 .. SignerCount - 1.
+//
+// pvData points to a CERT_INFO struct.
+//
+// Only the following fields have been updated in the CERT_INFO struct:
+// Issuer and SerialNumber.
+//
+// Note, if the KEYID choice was selected for a CMS SignerId, then, the
+// SerialNumber is 0 and the Issuer is encoded containing a single RDN with a
+// single Attribute whose OID is szOID_KEYID_RDN, value type is
+// CERT_RDN_OCTET_STRING and value is the KEYID. When the
+// CertGetSubjectCertificateFromStore and
+// CertFindCertificateInStore(CERT_FIND_SUBJECT_CERT) APIs see this
+// special KEYID Issuer and SerialNumber, they do a KEYID match.
+//--------------------------------------------------------------------------
+
+//+-------------------------------------------------------------------------
+// CMSG_SIGNER_INFO_PARAM
+//
+// To get all the signers, repetitively call CryptMsgGetParam, with
+// dwIndex set to 0 .. SignerCount - 1.
+//
+// pvData points to a CMSG_SIGNER_INFO struct.
+//
+// Note, if the KEYID choice was selected for a CMS SignerId, then, the
+// SerialNumber is 0 and the Issuer is encoded containing a single RDN with a
+// single Attribute whose OID is szOID_KEYID_RDN, value type is
+// CERT_RDN_OCTET_STRING and value is the KEYID. When the
+// CertGetSubjectCertificateFromStore and
+// CertFindCertificateInStore(CERT_FIND_SUBJECT_CERT) APIs see this
+// special KEYID Issuer and SerialNumber, they do a KEYID match.
+//--------------------------------------------------------------------------
+
+type
+ PCMSG_SIGNER_INFO = ^CMSG_SIGNER_INFO;
+ {$EXTERNALSYM PCMSG_SIGNER_INFO}
+ _CMSG_SIGNER_INFO = record
+ dwVersion: DWORD;
+ Issuer: CERT_NAME_BLOB;
+ SerialNumber: CRYPT_INTEGER_BLOB;
+ HashAlgorithm: CRYPT_ALGORITHM_IDENTIFIER;
+ HashEncryptionAlgorithm: CRYPT_ALGORITHM_IDENTIFIER;
+ EncryptedHash: CRYPT_DATA_BLOB;
+ AuthAttrs: CRYPT_ATTRIBUTES;
+ UnauthAttrs: CRYPT_ATTRIBUTES;
+ end;
+ {$EXTERNALSYM _CMSG_SIGNER_INFO}
+ CMSG_SIGNER_INFO = _CMSG_SIGNER_INFO;
+ {$EXTERNALSYM CMSG_SIGNER_INFO}
+ TCmsgSignerInfo = CMSG_SIGNER_INFO;
+ PCmsgSignerInfo = PCMSG_SIGNER_INFO;
+
+//+-------------------------------------------------------------------------
+// CMSG_SIGNER_CERT_ID_PARAM
+//
+// To get all the signers, repetitively call CryptMsgGetParam, with
+// dwIndex set to 0 .. SignerCount - 1.
+//
+// pvData points to a CERT_ID struct.
+//--------------------------------------------------------------------------
+
+//+-------------------------------------------------------------------------
+// CMSG_CMS_SIGNER_INFO_PARAM
+//
+// Same as CMSG_SIGNER_INFO_PARAM, except, contains SignerId instead of
+// Issuer and SerialNumber.
+//
+// To get all the signers, repetitively call CryptMsgGetParam, with
+// dwIndex set to 0 .. SignerCount - 1.
+//
+// pvData points to a CMSG_CMS_SIGNER_INFO struct.
+//--------------------------------------------------------------------------
+
+ PCMSG_CMS_SIGNER_INFO = ^CMSG_CMS_SIGNER_INFO;
+ {$EXTERNALSYM PCMSG_CMS_SIGNER_INFO}
+ _CMSG_CMS_SIGNER_INFO = record
+ dwVersion: DWORD;
+ SignerId: CERT_ID;
+ HashAlgorithm: CRYPT_ALGORITHM_IDENTIFIER;
+ HashEncryptionAlgorithm: CRYPT_ALGORITHM_IDENTIFIER;
+ EncryptedHash: CRYPT_DATA_BLOB;
+ AuthAttrs: CRYPT_ATTRIBUTES;
+ UnauthAttrs: CRYPT_ATTRIBUTES;
+ end;
+ {$EXTERNALSYM _CMSG_CMS_SIGNER_INFO}
+ CMSG_CMS_SIGNER_INFO = _CMSG_CMS_SIGNER_INFO;
+ {$EXTERNALSYM CMSG_CMS_SIGNER_INFO}
+ TCmsgCmsSignerInfo = CMSG_CMS_SIGNER_INFO;
+ PCmsgCmsSignerInfo = PCMSG_CMS_SIGNER_INFO;
+
+//+-------------------------------------------------------------------------
+// CMSG_SIGNER_HASH_ALGORITHM_PARAM
+//
+// This parameter specifies the HashAlgorithm that was used for the signer.
+//
+// Set dwIndex to iterate through all the signers.
+//
+// pvData points to an CRYPT_ALGORITHM_IDENTIFIER struct.
+//--------------------------------------------------------------------------
+
+//+-------------------------------------------------------------------------
+// CMSG_SIGNER_AUTH_ATTR_PARAM
+//
+// The authenticated attributes for the signer.
+//
+// Set dwIndex to iterate through all the signers.
+//
+// pvData points to a CMSG_ATTR struct.
+//--------------------------------------------------------------------------
+
+ CMSG_ATTR = CRYPT_ATTRIBUTES;
+ {$EXTERNALSYM CMSG_ATTR}
+ PCMSG_ATTR = ^CRYPT_ATTRIBUTES;
+ {$EXTERNALSYM PCMSG_ATTR}
+
+//+-------------------------------------------------------------------------
+// CMSG_SIGNER_UNAUTH_ATTR_PARAM
+//
+// The unauthenticated attributes for the signer.
+//
+// Set dwIndex to iterate through all the signers.
+//
+// pvData points to a CMSG_ATTR struct.
+//--------------------------------------------------------------------------
+
+//+-------------------------------------------------------------------------
+// CMSG_CERT_COUNT_PARAM
+//
+// Count of certificates in a SIGNED or SIGNED_AND_ENVELOPED message.
+//
+// CMS, also supports certificates in an ENVELOPED message.
+//
+// pvData points to a DWORD
+//--------------------------------------------------------------------------
+
+//+-------------------------------------------------------------------------
+// CMSG_CERT_PARAM
+//
+// To get all the certificates, repetitively call CryptMsgGetParam, with
+// dwIndex set to 0 .. CertCount - 1.
+//
+// pvData points to an array of the certificate's encoded bytes.
+//--------------------------------------------------------------------------
+
+//+-------------------------------------------------------------------------
+// CMSG_CRL_COUNT_PARAM
+//
+// Count of CRLs in a SIGNED or SIGNED_AND_ENVELOPED message.
+//
+// CMS, also supports CRLs in an ENVELOPED message.
+//
+// pvData points to a DWORD
+//--------------------------------------------------------------------------
+
+//+-------------------------------------------------------------------------
+// CMSG_CRL_PARAM
+//
+// To get all the CRLs, repetitively call CryptMsgGetParam, with
+// dwIndex set to 0 .. CrlCount - 1.
+//
+// pvData points to an array of the CRL's encoded bytes.
+//--------------------------------------------------------------------------
+
+//+-------------------------------------------------------------------------
+// CMSG_ENVELOPE_ALGORITHM_PARAM
+//
+// The ContentEncryptionAlgorithm that was used in
+// an ENVELOPED or SIGNED_AND_ENVELOPED message.
+//
+// For streaming you must be able to successfully get this parameter before
+// doing a CryptMsgControl decrypt.
+//
+// pvData points to an CRYPT_ALGORITHM_IDENTIFIER struct.
+//--------------------------------------------------------------------------
+
+//+-------------------------------------------------------------------------
+// CMSG_RECIPIENT_COUNT_PARAM
+//
+// Count of recipients in an ENVELOPED or SIGNED_AND_ENVELOPED message.
+//
+// Count of key transport recepients.
+//
+// The CMSG_CMS_RECIPIENT_COUNT_PARAM has the total count of
+// recipients (it also includes key agree and mail list recipients).
+//
+// pvData points to a DWORD
+//--------------------------------------------------------------------------
+
+//+-------------------------------------------------------------------------
+// CMSG_RECIPIENT_INDEX_PARAM
+//
+// Index of the recipient used to decrypt an ENVELOPED or SIGNED_AND_ENVELOPED
+// message.
+//
+// Index of a key transport recipient. If a non key transport
+// recipient was used to decrypt, fails with LastError set to
+// CRYPT_E_INVALID_INDEX.
+//
+// pvData points to a DWORD
+//--------------------------------------------------------------------------
+
+//+-------------------------------------------------------------------------
+// CMSG_RECIPIENT_INFO_PARAM
+//
+// To get all the recipients, repetitively call CryptMsgGetParam, with
+// dwIndex set to 0 .. RecipientCount - 1.
+//
+// Only returns the key transport recepients.
+//
+// The CMSG_CMS_RECIPIENT_INFO_PARAM returns all recipients.
+//
+// pvData points to a CERT_INFO struct.
+//
+// Only the following fields have been updated in the CERT_INFO struct:
+// Issuer, SerialNumber and PublicKeyAlgorithm. The PublicKeyAlgorithm
+// specifies the KeyEncryptionAlgorithm that was used.
+//
+// Note, if the KEYID choice was selected for a key transport recipient, then,
+// the SerialNumber is 0 and the Issuer is encoded containing a single RDN
+// with a single Attribute whose OID is szOID_KEYID_RDN, value type is
+// CERT_RDN_OCTET_STRING and value is the KEYID. When the
+// CertGetSubjectCertificateFromStore and
+// CertFindCertificateInStore(CERT_FIND_SUBJECT_CERT) APIs see this
+// special KEYID Issuer and SerialNumber, they do a KEYID match.
+//--------------------------------------------------------------------------
+
+//+-------------------------------------------------------------------------
+// CMSG_HASH_ALGORITHM_PARAM
+//
+// The HashAlgorithm in a HASHED message.
+//
+// pvData points to an CRYPT_ALGORITHM_IDENTIFIER struct.
+//--------------------------------------------------------------------------
+
+//+-------------------------------------------------------------------------
+// CMSG_HASH_DATA_PARAM
+//
+// The hash in a HASHED message.
+//
+// pvData points to an array of bytes.
+//--------------------------------------------------------------------------
+
+//+-------------------------------------------------------------------------
+// CMSG_COMPUTED_HASH_PARAM
+//
+// The computed hash for a HASHED message.
+// This may be called for either an encoded or decoded message.
+//
+// Also, the computed hash for one of the signer's in a SIGNED message.
+// It may be called for either an encoded or decoded message after the
+// final update. Set dwIndex to iterate through all the signers.
+//
+// pvData points to an array of bytes.
+//--------------------------------------------------------------------------
+
+//+-------------------------------------------------------------------------
+// CMSG_ENCRYPT_PARAM
+//
+// The ContentEncryptionAlgorithm that was used in an ENCRYPTED message.
+//
+// pvData points to an CRYPT_ALGORITHM_IDENTIFIER struct.
+//--------------------------------------------------------------------------
+
+//+-------------------------------------------------------------------------
+// CMSG_ENCODED_MESSAGE
+//
+// The full encoded message. This is useful in the case of a decoded
+// message which has been modified (eg. a signed-data or
+// signed-and-enveloped-data message which has been countersigned).
+//
+// pvData points to an array of the message's encoded bytes.
+//--------------------------------------------------------------------------
+
+//+-------------------------------------------------------------------------
+// CMSG_VERSION_PARAM
+//
+// The version of the decoded message.
+//
+// pvData points to a DWORD
+//--------------------------------------------------------------------------
+
+const
+ CMSG_SIGNED_DATA_V1 = 1;
+ {$EXTERNALSYM CMSG_SIGNED_DATA_V1}
+ CMSG_SIGNED_DATA_V3 = 3;
+ {$EXTERNALSYM CMSG_SIGNED_DATA_V3}
+ CMSG_SIGNED_DATA_PKCS_1_5_VERSION = CMSG_SIGNED_DATA_V1;
+ {$EXTERNALSYM CMSG_SIGNED_DATA_PKCS_1_5_VERSION}
+ CMSG_SIGNED_DATA_CMS_VERSION = CMSG_SIGNED_DATA_V3;
+ {$EXTERNALSYM CMSG_SIGNED_DATA_CMS_VERSION}
+
+ CMSG_SIGNER_INFO_V1 = 1;
+ {$EXTERNALSYM CMSG_SIGNER_INFO_V1}
+ CMSG_SIGNER_INFO_V3 = 3;
+ {$EXTERNALSYM CMSG_SIGNER_INFO_V3}
+ CMSG_SIGNER_INFO_PKCS_1_5_VERSION = CMSG_SIGNER_INFO_V1;
+ {$EXTERNALSYM CMSG_SIGNER_INFO_PKCS_1_5_VERSION}
+ CMSG_SIGNER_INFO_CMS_VERSION = CMSG_SIGNER_INFO_V3;
+ {$EXTERNALSYM CMSG_SIGNER_INFO_CMS_VERSION}
+
+ CMSG_HASHED_DATA_V0 = 0;
+ {$EXTERNALSYM CMSG_HASHED_DATA_V0}
+ CMSG_HASHED_DATA_V2 = 2;
+ {$EXTERNALSYM CMSG_HASHED_DATA_V2}
+ CMSG_HASHED_DATA_PKCS_1_5_VERSION = CMSG_HASHED_DATA_V0;
+ {$EXTERNALSYM CMSG_HASHED_DATA_PKCS_1_5_VERSION}
+ CMSG_HASHED_DATA_CMS_VERSION = CMSG_HASHED_DATA_V2;
+ {$EXTERNALSYM CMSG_HASHED_DATA_CMS_VERSION}
+
+ CMSG_ENVELOPED_DATA_V0 = 0;
+ {$EXTERNALSYM CMSG_ENVELOPED_DATA_V0}
+ CMSG_ENVELOPED_DATA_V2 = 2;
+ {$EXTERNALSYM CMSG_ENVELOPED_DATA_V2}
+ CMSG_ENVELOPED_DATA_PKCS_1_5_VERSION = CMSG_ENVELOPED_DATA_V0;
+ {$EXTERNALSYM CMSG_ENVELOPED_DATA_PKCS_1_5_VERSION}
+ CMSG_ENVELOPED_DATA_CMS_VERSION = CMSG_ENVELOPED_DATA_V2;
+ {$EXTERNALSYM CMSG_ENVELOPED_DATA_CMS_VERSION}
+
+//+-------------------------------------------------------------------------
+// CMSG_ATTR_CERT_COUNT_PARAM
+//
+// Count of attribute certificates in a SIGNED or ENVELOPED message.
+//
+// pvData points to a DWORD
+//--------------------------------------------------------------------------
+
+//+-------------------------------------------------------------------------
+// CMSG_ATTR_CERT_PARAM
+//
+// To get all the attribute certificates, repetitively call CryptMsgGetParam,
+// with dwIndex set to 0 .. AttrCertCount - 1.
+//
+// pvData points to an array of the attribute certificate's encoded bytes.
+//--------------------------------------------------------------------------
+
+//+-------------------------------------------------------------------------
+// CMSG_CMS_RECIPIENT_COUNT_PARAM
+//
+// Count of all CMS recipients in an ENVELOPED message.
+//
+// pvData points to a DWORD
+//--------------------------------------------------------------------------
+
+//+-------------------------------------------------------------------------
+// CMSG_CMS_RECIPIENT_INDEX_PARAM
+//
+// Index of the CMS recipient used to decrypt an ENVELOPED message.
+//
+// pvData points to a DWORD
+//--------------------------------------------------------------------------
+
+//+-------------------------------------------------------------------------
+// CMSG_CMS_RECIPIENT_ENCRYPTED_KEY_INDEX_PARAM
+//
+// For a CMS key agreement recipient, the index of the encrypted key
+// used to decrypt an ENVELOPED message.
+//
+// pvData points to a DWORD
+//--------------------------------------------------------------------------
+
+//+-------------------------------------------------------------------------
+// CMSG_CMS_RECIPIENT_INFO_PARAM
+//
+// To get all the CMS recipients, repetitively call CryptMsgGetParam, with
+// dwIndex set to 0 .. CmsRecipientCount - 1.
+//
+// pvData points to a CMSG_CMS_RECIPIENT_INFO struct.
+//--------------------------------------------------------------------------
+
+type
+ PCMSG_KEY_TRANS_RECIPIENT_INFO = ^CMSG_KEY_TRANS_RECIPIENT_INFO;
+ {$EXTERNALSYM PCMSG_KEY_TRANS_RECIPIENT_INFO}
+ _CMSG_KEY_TRANS_RECIPIENT_INFO = record
+ dwVersion: DWORD;
+ // Currently, only ISSUER_SERIAL_NUMBER or KEYID choices
+ RecipientId: CERT_ID;
+ KeyEncryptionAlgorithm: CRYPT_ALGORITHM_IDENTIFIER;
+ EncryptedKey: CRYPT_DATA_BLOB;
+ end;
+ {$EXTERNALSYM _CMSG_KEY_TRANS_RECIPIENT_INFO}
+ CMSG_KEY_TRANS_RECIPIENT_INFO = _CMSG_KEY_TRANS_RECIPIENT_INFO;
+ {$EXTERNALSYM CMSG_KEY_TRANS_RECIPIENT_INFO}
+ TCmsgKeyTransRecipientInfo = CMSG_KEY_TRANS_RECIPIENT_INFO;
+ PCmsgKeyTransRecipientInfo = PCMSG_KEY_TRANS_RECIPIENT_INFO;
+
+ PCMSG_RECIPIENT_ENCRYPTED_KEY_INFO = ^CMSG_RECIPIENT_ENCRYPTED_KEY_INFO;
+ {$EXTERNALSYM PCMSG_RECIPIENT_ENCRYPTED_KEY_INFO}
+ _CMSG_RECIPIENT_ENCRYPTED_KEY_INFO = record
+ // Currently, only ISSUER_SERIAL_NUMBER or KEYID choices
+ RecipientId: CERT_ID;
+ EncryptedKey: CRYPT_DATA_BLOB;
+ // The following optional fields are only applicable to KEYID choice
+ Date: FILETIME;
+ pOtherAttr: PCRYPT_ATTRIBUTE_TYPE_VALUE;
+ end;
+ {$EXTERNALSYM _CMSG_RECIPIENT_ENCRYPTED_KEY_INFO}
+ CMSG_RECIPIENT_ENCRYPTED_KEY_INFO = _CMSG_RECIPIENT_ENCRYPTED_KEY_INFO;
+ {$EXTERNALSYM CMSG_RECIPIENT_ENCRYPTED_KEY_INFO}
+ TCmsgRecipientEncryptedKeyInfo = CMSG_RECIPIENT_ENCRYPTED_KEY_INFO;
+ PCmsgRecipientEncryptedKeyInfo = PCMSG_RECIPIENT_ENCRYPTED_KEY_INFO;
+
+ PCMSG_KEY_AGREE_RECIPIENT_INFO = ^CMSG_KEY_AGREE_RECIPIENT_INFO;
+ {$EXTERNALSYM PCMSG_KEY_AGREE_RECIPIENT_INFO}
+ _CMSG_KEY_AGREE_RECIPIENT_INFO = record
+ dwVersion: DWORD;
+ dwOriginatorChoice: DWORD;
+ Union: record
+ case Integer of
+ // CMSG_KEY_AGREE_ORIGINATOR_CERT
+ 0: (OriginatorCertId: CERT_ID);
+ // CMSG_KEY_AGREE_ORIGINATOR_PUBLIC_KEY
+ 1: (OriginatorPublicKeyInfo: CERT_PUBLIC_KEY_INFO);
+ end;
+ UserKeyingMaterial: CRYPT_DATA_BLOB;
+ KeyEncryptionAlgorithm: CRYPT_ALGORITHM_IDENTIFIER;
+ cRecipientEncryptedKeys: DWORD;
+ rgpRecipientEncryptedKeys: PCMSG_RECIPIENT_ENCRYPTED_KEY_INFO;
+ end;
+ {$EXTERNALSYM _CMSG_KEY_AGREE_RECIPIENT_INFO}
+ CMSG_KEY_AGREE_RECIPIENT_INFO = _CMSG_KEY_AGREE_RECIPIENT_INFO;
+ {$EXTERNALSYM CMSG_KEY_AGREE_RECIPIENT_INFO}
+ TCmsgKeyAgreeRecipientInfo = CMSG_KEY_AGREE_RECIPIENT_INFO;
+ PCmsgKeyAgreeRecipientInfo = PCMSG_KEY_AGREE_RECIPIENT_INFO;
+
+const
+ CMSG_KEY_AGREE_ORIGINATOR_CERT = 1;
+ {$EXTERNALSYM CMSG_KEY_AGREE_ORIGINATOR_CERT}
+ CMSG_KEY_AGREE_ORIGINATOR_PUBLIC_KEY = 2;
+ {$EXTERNALSYM CMSG_KEY_AGREE_ORIGINATOR_PUBLIC_KEY}
+
+type
+ PCMSG_MAIL_LIST_RECIPIENT_INFO = ^CMSG_MAIL_LIST_RECIPIENT_INFO;
+ {$EXTERNALSYM PCMSG_MAIL_LIST_RECIPIENT_INFO}
+ _CMSG_MAIL_LIST_RECIPIENT_INFO = record
+ dwVersion: DWORD;
+ KeyId: CRYPT_DATA_BLOB;
+ KeyEncryptionAlgorithm: CRYPT_ALGORITHM_IDENTIFIER;
+ EncryptedKey: CRYPT_DATA_BLOB;
+ // The following fields are optional
+ Date: FILETIME;
+ pOtherAttr: PCRYPT_ATTRIBUTE_TYPE_VALUE;
+ end;
+ {$EXTERNALSYM _CMSG_MAIL_LIST_RECIPIENT_INFO}
+ CMSG_MAIL_LIST_RECIPIENT_INFO = _CMSG_MAIL_LIST_RECIPIENT_INFO;
+ {$EXTERNALSYM CMSG_MAIL_LIST_RECIPIENT_INFO}
+ TCmsgMailListRecipientInfo = CMSG_MAIL_LIST_RECIPIENT_INFO;
+ PCmsgMailListRecipientInfo = PCMSG_MAIL_LIST_RECIPIENT_INFO;
+
+ PCMSG_CMS_RECIPIENT_INFO = ^CMSG_CMS_RECIPIENT_INFO;
+ {$EXTERNALSYM PCMSG_CMS_RECIPIENT_INFO}
+ _CMSG_CMS_RECIPIENT_INFO = record
+ dwRecipientChoice: DWORD;
+ case Integer of
+ // CMSG_KEY_TRANS_RECIPIENT
+ 0: (pKeyTrans: PCMSG_KEY_TRANS_RECIPIENT_INFO);
+ // CMSG_KEY_AGREE_RECIPIENT
+ 1: (pKeyAgree: PCMSG_KEY_AGREE_RECIPIENT_INFO);
+ // CMSG_MAIL_LIST_RECIPIENT
+ 2: (pMailList: PCMSG_MAIL_LIST_RECIPIENT_INFO);
+ end;
+ {$EXTERNALSYM _CMSG_CMS_RECIPIENT_INFO}
+ CMSG_CMS_RECIPIENT_INFO = _CMSG_CMS_RECIPIENT_INFO;
+ {$EXTERNALSYM CMSG_CMS_RECIPIENT_INFO}
+ TCmsgCmsRecipientInfo = CMSG_CMS_RECIPIENT_INFO;
+ PCmsgCmsRecipientInfo = PCMSG_CMS_RECIPIENT_INFO;
+
+// dwVersion numbers for the KeyTrans, KeyAgree and MailList recipients
+
+const
+ CMSG_ENVELOPED_RECIPIENT_V0 = 0;
+ {$EXTERNALSYM CMSG_ENVELOPED_RECIPIENT_V0}
+ CMSG_ENVELOPED_RECIPIENT_V2 = 2;
+ {$EXTERNALSYM CMSG_ENVELOPED_RECIPIENT_V2}
+ CMSG_ENVELOPED_RECIPIENT_V3 = 3;
+ {$EXTERNALSYM CMSG_ENVELOPED_RECIPIENT_V3}
+ CMSG_ENVELOPED_RECIPIENT_V4 = 4;
+ {$EXTERNALSYM CMSG_ENVELOPED_RECIPIENT_V4}
+ CMSG_KEY_TRANS_PKCS_1_5_VERSION = CMSG_ENVELOPED_RECIPIENT_V0;
+ {$EXTERNALSYM CMSG_KEY_TRANS_PKCS_1_5_VERSION}
+ CMSG_KEY_TRANS_CMS_VERSION = CMSG_ENVELOPED_RECIPIENT_V2;
+ {$EXTERNALSYM CMSG_KEY_TRANS_CMS_VERSION}
+ CMSG_KEY_AGREE_VERSION = CMSG_ENVELOPED_RECIPIENT_V3;
+ {$EXTERNALSYM CMSG_KEY_AGREE_VERSION}
+ CMSG_MAIL_LIST_VERSION = CMSG_ENVELOPED_RECIPIENT_V4;
+ {$EXTERNALSYM CMSG_MAIL_LIST_VERSION}
+
+//+-------------------------------------------------------------------------
+// CMSG_UNPROTECTED_ATTR_PARAM
+//
+// The unprotected attributes in the envelped message.
+//
+// pvData points to a CMSG_ATTR struct.
+//--------------------------------------------------------------------------
+
+//+-------------------------------------------------------------------------
+// Perform a special "control" function after the final CryptMsgUpdate of a
+// encoded/decoded cryptographic message.
+//
+// The dwCtrlType parameter specifies the type of operation to be performed.
+//
+// The pvCtrlPara definition depends on the dwCtrlType value.
+//
+// See below for a list of the control operations and their pvCtrlPara
+// type definition.
+//--------------------------------------------------------------------------
+
+function CryptMsgControl(hCryptMsg: HCRYPTMSG; dwFlags, dwCtrlType: DWORD;
+ pvCtrlPara: Pointer): BOOL; stdcall;
+{$EXTERNALSYM CryptMsgControl}
+
+//+-------------------------------------------------------------------------
+// Message control types
+//--------------------------------------------------------------------------
+
+const
+ CMSG_CTRL_VERIFY_SIGNATURE = 1;
+ {$EXTERNALSYM CMSG_CTRL_VERIFY_SIGNATURE}
+ CMSG_CTRL_DECRYPT = 2;
+ {$EXTERNALSYM CMSG_CTRL_DECRYPT}
+ CMSG_CTRL_VERIFY_HASH = 5;
+ {$EXTERNALSYM CMSG_CTRL_VERIFY_HASH}
+ CMSG_CTRL_ADD_SIGNER = 6;
+ {$EXTERNALSYM CMSG_CTRL_ADD_SIGNER}
+ CMSG_CTRL_DEL_SIGNER = 7;
+ {$EXTERNALSYM CMSG_CTRL_DEL_SIGNER}
+ CMSG_CTRL_ADD_SIGNER_UNAUTH_ATTR = 8;
+ {$EXTERNALSYM CMSG_CTRL_ADD_SIGNER_UNAUTH_ATTR}
+ CMSG_CTRL_DEL_SIGNER_UNAUTH_ATTR = 9;
+ {$EXTERNALSYM CMSG_CTRL_DEL_SIGNER_UNAUTH_ATTR}
+ CMSG_CTRL_ADD_CERT = 10;
+ {$EXTERNALSYM CMSG_CTRL_ADD_CERT}
+ CMSG_CTRL_DEL_CERT = 11;
+ {$EXTERNALSYM CMSG_CTRL_DEL_CERT}
+ CMSG_CTRL_ADD_CRL = 12;
+ {$EXTERNALSYM CMSG_CTRL_ADD_CRL}
+ CMSG_CTRL_DEL_CRL = 13;
+ {$EXTERNALSYM CMSG_CTRL_DEL_CRL}
+ CMSG_CTRL_ADD_ATTR_CERT = 14;
+ {$EXTERNALSYM CMSG_CTRL_ADD_ATTR_CERT}
+ CMSG_CTRL_DEL_ATTR_CERT = 15;
+ {$EXTERNALSYM CMSG_CTRL_DEL_ATTR_CERT}
+ CMSG_CTRL_KEY_TRANS_DECRYPT = 16;
+ {$EXTERNALSYM CMSG_CTRL_KEY_TRANS_DECRYPT}
+ CMSG_CTRL_KEY_AGREE_DECRYPT = 17;
+ {$EXTERNALSYM CMSG_CTRL_KEY_AGREE_DECRYPT}
+ CMSG_CTRL_MAIL_LIST_DECRYPT = 18;
+ {$EXTERNALSYM CMSG_CTRL_MAIL_LIST_DECRYPT}
+ CMSG_CTRL_VERIFY_SIGNATURE_EX = 19;
+ {$EXTERNALSYM CMSG_CTRL_VERIFY_SIGNATURE_EX}
+ CMSG_CTRL_ADD_CMS_SIGNER_INFO = 20;
+ {$EXTERNALSYM CMSG_CTRL_ADD_CMS_SIGNER_INFO}
+
+//+-------------------------------------------------------------------------
+// CMSG_CTRL_VERIFY_SIGNATURE
+//
+// Verify the signature of a SIGNED or SIGNED_AND_ENVELOPED
+// message after it has been decoded.
+//
+// For a SIGNED_AND_ENVELOPED message, called after
+// CryptMsgControl(CMSG_CTRL_DECRYPT), if CryptMsgOpenToDecode was called
+// with a NULL pRecipientInfo.
+//
+// pvCtrlPara points to a CERT_INFO struct.
+//
+// The CERT_INFO contains the Issuer and SerialNumber identifying
+// the Signer of the message. The CERT_INFO also contains the
+// PublicKeyInfo
+// used to verify the signature. The cryptographic provider specified
+// in CryptMsgOpenToDecode is used.
+//
+// Note, if the message contains CMS signers identified by KEYID, then,
+// the CERT_INFO's Issuer and SerialNumber is ignored and only the public
+// key is used to find a signer whose signature verifies.
+//
+// The following CMSG_CTRL_VERIFY_SIGNATURE_EX should be used instead.
+//--------------------------------------------------------------------------
+
+//+-------------------------------------------------------------------------
+// CMSG_CTRL_VERIFY_SIGNATURE_EX
+//
+// Verify the signature of a SIGNED message after it has been decoded.
+//
+// pvCtrlPara points to the following CMSG_CTRL_VERIFY_SIGNATURE_EX_PARA.
+//
+// If hCryptProv is NULL, uses the cryptographic provider specified in
+// CryptMsgOpenToDecode. If CryptMsgOpenToDecode's hCryptProv is also NULL,
+// gets default provider according to the signer's public key OID.
+//
+// dwSignerIndex is the index of the signer to use to verify the signature.
+//
+// The signer can be a pointer to a CERT_PUBLIC_KEY_INFO, certificate
+// context or a chain context.
+//--------------------------------------------------------------------------
+
+type
+ PCMSG_CTRL_VERIFY_SIGNATURE_EX_PARA = ^CMSG_CTRL_VERIFY_SIGNATURE_EX_PARA;
+ {$EXTERNALSYM PCMSG_CTRL_VERIFY_SIGNATURE_EX_PARA}
+ _CMSG_CTRL_VERIFY_SIGNATURE_EX_PARA = record
+ cbSize: DWORD;
+ hCryptProv: HCRYPTPROV;
+ dwSignerIndex: DWORD;
+ dwSignerType: DWORD;
+ pvSigner: Pointer;
+ end;
+ {$EXTERNALSYM _CMSG_CTRL_VERIFY_SIGNATURE_EX_PARA}
+ CMSG_CTRL_VERIFY_SIGNATURE_EX_PARA = _CMSG_CTRL_VERIFY_SIGNATURE_EX_PARA;
+ {$EXTERNALSYM CMSG_CTRL_VERIFY_SIGNATURE_EX_PARA}
+ TCmsgCtrlVerifySignatureExPara = CMSG_CTRL_VERIFY_SIGNATURE_EX_PARA;
+ PCmsgCtrlVerifySignatureExPara = PCMSG_CTRL_VERIFY_SIGNATURE_EX_PARA;
+
+// Signer Types
+
+const
+ CMSG_VERIFY_SIGNER_PUBKEY = 1;
+ {$EXTERNALSYM CMSG_VERIFY_SIGNER_PUBKEY}
+ // pvSigner :: PCERT_PUBLIC_KEY_INFO
+ CMSG_VERIFY_SIGNER_CERT = 2;
+ {$EXTERNALSYM CMSG_VERIFY_SIGNER_CERT}
+ // pvSigner :: PCCERT_CONTEXT
+ CMSG_VERIFY_SIGNER_CHAIN = 3;
+ {$EXTERNALSYM CMSG_VERIFY_SIGNER_CHAIN}
+ // pvSigner :: PCCERT_CHAIN_CONTEXT
+
+//+-------------------------------------------------------------------------
+// CMSG_CTRL_DECRYPT
+//
+// Decrypt an ENVELOPED or SIGNED_AND_ENVELOPED message after it has been
+// decoded.
+//
+// This decrypt is only applicable to key transport recipients.
+//
+// hCryptProv and dwKeySpec specify the private key to use. For dwKeySpec ==
+// 0, defaults to AT_KEYEXCHANGE.
+//
+// If CMSG_CRYPT_RELEASE_CONTEXT_FLAG is set in the dwFlags passed
+// to CryptMsgControl, then, the hCryptProv is released on the final
+// CryptMsgClose. Not released if CryptMsgControl fails.
+//
+// dwRecipientIndex is the index of the recipient in the message associated
+// with the hCryptProv's private key.
+//
+// The dwRecipientIndex is the index of a key transport recipient.
+//
+// Note, the message can only be decrypted once.
+//--------------------------------------------------------------------------
+
+type
+ PCMSG_CTRL_DECRYPT_PARA = ^CMSG_CTRL_DECRYPT_PARA;
+ {$EXTERNALSYM PCMSG_CTRL_DECRYPT_PARA}
+ _CMSG_CTRL_DECRYPT_PARA = record
+ cbSize: DWORD;
+ hCryptProv: HCRYPTPROV;
+ dwKeySpec: DWORD;
+ dwRecipientIndex: DWORD;
+ end;
+ {$EXTERNALSYM _CMSG_CTRL_DECRYPT_PARA}
+ CMSG_CTRL_DECRYPT_PARA = _CMSG_CTRL_DECRYPT_PARA;
+ {$EXTERNALSYM CMSG_CTRL_DECRYPT_PARA}
+ TCmsgCtrlDecryptPara = CMSG_CTRL_DECRYPT_PARA;
+ PCmsgCtrlDecryptPara = PCMSG_CTRL_DECRYPT_PARA;
+
+//+-------------------------------------------------------------------------
+// CMSG_CTRL_KEY_TRANS_DECRYPT
+//
+// Decrypt an ENVELOPED message after it has been decoded for a key
+// transport recipient.
+//
+// hCryptProv and dwKeySpec specify the private key to use. For dwKeySpec ==
+// 0, defaults to AT_KEYEXCHANGE.
+//
+// If CMSG_CRYPT_RELEASE_CONTEXT_FLAG is set in the dwFlags passed
+// to CryptMsgControl, then, the hCryptProv is released on the final
+// CryptMsgClose. Not released if CryptMsgControl fails.
+//
+// pKeyTrans points to the CMSG_KEY_TRANS_RECIPIENT_INFO obtained via
+// CryptMsgGetParam(CMSG_CMS_RECIPIENT_INFO_PARAM)
+//
+// dwRecipientIndex is the index of the recipient in the message associated
+// with the hCryptProv's private key.
+//
+// Note, the message can only be decrypted once.
+//--------------------------------------------------------------------------
+
+ PCMSG_CTRL_KEY_TRANS_DECRYPT_PARA = ^CMSG_CTRL_KEY_TRANS_DECRYPT_PARA;
+ {$EXTERNALSYM PCMSG_CTRL_KEY_TRANS_DECRYPT_PARA}
+ _CMSG_CTRL_KEY_TRANS_DECRYPT_PARA = record
+ cbSize: DWORD;
+ hCryptProv: HCRYPTPROV;
+ dwKeySpec: DWORD;
+ pKeyTrans: PCMSG_KEY_TRANS_RECIPIENT_INFO;
+ dwRecipientIndex: DWORD;
+ end;
+ {$EXTERNALSYM _CMSG_CTRL_KEY_TRANS_DECRYPT_PARA}
+ CMSG_CTRL_KEY_TRANS_DECRYPT_PARA = _CMSG_CTRL_KEY_TRANS_DECRYPT_PARA;
+ {$EXTERNALSYM CMSG_CTRL_KEY_TRANS_DECRYPT_PARA}
+ TCmsgCtrlKeyTransDecryptPara = CMSG_CTRL_KEY_TRANS_DECRYPT_PARA;
+ PCmsgCtrlKeyTransDecryptPara = PCMSG_CTRL_KEY_TRANS_DECRYPT_PARA;
+
+//+-------------------------------------------------------------------------
+// CMSG_CTRL_KEY_AGREE_DECRYPT
+//
+// Decrypt an ENVELOPED message after it has been decoded for a key
+// agreement recipient.
+//
+// hCryptProv and dwKeySpec specify the private key to use. For dwKeySpec ==
+// 0, defaults to AT_KEYEXCHANGE.
+//
+// If CMSG_CRYPT_RELEASE_CONTEXT_FLAG is set in the dwFlags passed
+// to CryptMsgControl, then, the hCryptProv is released on the final
+// CryptMsgClose. Not released if CryptMsgControl fails.
+//
+// pKeyAgree points to the CMSG_KEY_AGREE_RECIPIENT_INFO obtained via
+// CryptMsgGetParam(CMSG_CMS_RECIPIENT_INFO_PARAM) for dwRecipientIndex.
+//
+// dwRecipientIndex, dwRecipientEncryptedKeyIndex are the indices of the
+// recipient's encrypted key in the message associated with the hCryptProv's
+// private key.
+//
+// OriginatorPublicKey is the originator's public key obtained from either
+// the originator's certificate or the CMSG_KEY_AGREE_RECIPIENT_INFO obtained
+// via the CMSG_CMS_RECIPIENT_INFO_PARAM.
+//
+// Note, the message can only be decrypted once.
+//--------------------------------------------------------------------------
+
+ PCMSG_CTRL_KEY_AGREE_DECRYPT_PARA = ^CMSG_CTRL_KEY_AGREE_DECRYPT_PARA;
+ {$EXTERNALSYM PCMSG_CTRL_KEY_AGREE_DECRYPT_PARA}
+ _CMSG_CTRL_KEY_AGREE_DECRYPT_PARA = record
+ cbSize: DWORD;
+ hCryptProv: HCRYPTPROV;
+ dwKeySpec: DWORD;
+ pKeyAgree: PCMSG_KEY_AGREE_RECIPIENT_INFO;
+ dwRecipientIndex: DWORD;
+ dwRecipientEncryptedKeyIndex: DWORD;
+ OriginatorPublicKey: CRYPT_BIT_BLOB;
+ end;
+ {$EXTERNALSYM _CMSG_CTRL_KEY_AGREE_DECRYPT_PARA}
+ CMSG_CTRL_KEY_AGREE_DECRYPT_PARA = _CMSG_CTRL_KEY_AGREE_DECRYPT_PARA;
+ {$EXTERNALSYM CMSG_CTRL_KEY_AGREE_DECRYPT_PARA}
+ TCmsgCtrlKeyAgreeDecryptPara = CMSG_CTRL_KEY_AGREE_DECRYPT_PARA;
+ PCmsgCtrlKeyAgreeDecryptPara = PCMSG_CTRL_KEY_AGREE_DECRYPT_PARA;
+
+//+-------------------------------------------------------------------------
+// CMSG_CTRL_MAIL_LIST_DECRYPT
+//
+// Decrypt an ENVELOPED message after it has been decoded for a mail
+// list recipient.
+//
+// pMailList points to the CMSG_MAIL_LIST_RECIPIENT_INFO obtained via
+// CryptMsgGetParam(CMSG_CMS_RECIPIENT_INFO_PARAM) for dwRecipientIndex.
+//
+// There is 1 choice for the KeyEncryptionKey: an already created CSP key
+// handle. For the key handle choice, hCryptProv must be nonzero. This key
+// handle isn't destroyed.
+//
+// If CMSG_CRYPT_RELEASE_CONTEXT_FLAG is set in the dwFlags passed
+// to CryptMsgControl, then, the hCryptProv is released on the final
+// CryptMsgClose. Not released if CryptMsgControl fails.
+//
+// For RC2 wrap, the effective key length is obtained from the
+// KeyEncryptionAlgorithm parameters and set on the hKeyEncryptionKey before
+// decrypting.
+//
+// Note, the message can only be decrypted once.
+//--------------------------------------------------------------------------
+
+ PCMSG_CTRL_MAIL_LIST_DECRYPT_PARA = ^CMSG_CTRL_MAIL_LIST_DECRYPT_PARA;
+ {$EXTERNALSYM PCMSG_CTRL_MAIL_LIST_DECRYPT_PARA}
+ _CMSG_CTRL_MAIL_LIST_DECRYPT_PARA = record
+ cbSize: DWORD;
+ hCryptProv: HCRYPTPROV;
+ pMailList: PCMSG_MAIL_LIST_RECIPIENT_INFO;
+ dwRecipientIndex: DWORD;
+ dwKeyChoice: DWORD;
+ case Integer of
+ // CMSG_MAIL_LIST_HANDLE_KEY_CHOICE
+ 0: (hKeyEncryptionKey: HCRYPTKEY);
+ // Reserve space for a potential pointer choice
+ 1: (pvKeyEncryptionKey: Pointer);
+ end;
+ {$EXTERNALSYM _CMSG_CTRL_MAIL_LIST_DECRYPT_PARA}
+ CMSG_CTRL_MAIL_LIST_DECRYPT_PARA = _CMSG_CTRL_MAIL_LIST_DECRYPT_PARA;
+ {$EXTERNALSYM CMSG_CTRL_MAIL_LIST_DECRYPT_PARA}
+ TCmsgCtrlMailListDecryptPara = CMSG_CTRL_MAIL_LIST_DECRYPT_PARA;
+ PCmsgCtrlMailListDecryptPara = PCMSG_CTRL_MAIL_LIST_DECRYPT_PARA;
+
+//+-------------------------------------------------------------------------
+// CMSG_CTRL_VERIFY_HASH
+//
+// Verify the hash of a HASHED message after it has been decoded.
+//
+// Only the hCryptMsg parameter is used, to specify the message whose
+// hash is being verified.
+//--------------------------------------------------------------------------
+
+//+-------------------------------------------------------------------------
+// CMSG_CTRL_ADD_SIGNER
+//
+// Add a signer to a signed-data message.
+//
+// pvCtrlPara points to a CMSG_SIGNER_ENCODE_INFO.
+//--------------------------------------------------------------------------
+
+//+-------------------------------------------------------------------------
+// CMSG_CTRL_ADD_CMS_SIGNER_INFO
+//
+// Add a signer to a signed-data message.
+//
+// Differs from the above, CMSG_CTRL_ADD_SIGNER, wherein, the signer info
+// already contains the signature.
+//
+// pvCtrlPara points to a CMSG_CMS_SIGNER_INFO.
+//--------------------------------------------------------------------------
+
+//+-------------------------------------------------------------------------
+// CMSG_CTRL_DEL_SIGNER
+//
+// Remove a signer from a signed-data or signed-and-enveloped-data message.
+//
+// pvCtrlPara points to a DWORD containing the 0-based index of the
+// signer to be removed.
+//--------------------------------------------------------------------------
+
+//+-------------------------------------------------------------------------
+// CMSG_CTRL_ADD_SIGNER_UNAUTH_ATTR
+//
+// Add an unauthenticated attribute to the SignerInfo of a signed-data or
+// signed-and-enveloped-data message.
+//
+// The unauthenticated attribute is input in the form of an encoded blob.
+//--------------------------------------------------------------------------
+
+ PCMSG_CTRL_ADD_SIGNER_UNAUTH_ATTR_PARA = ^CMSG_CTRL_ADD_SIGNER_UNAUTH_ATTR_PARA;
+ {$EXTERNALSYM PCMSG_CTRL_ADD_SIGNER_UNAUTH_ATTR_PARA}
+ _CMSG_CTRL_ADD_SIGNER_UNAUTH_ATTR_PARA = record
+ cbSize: DWORD;
+ dwSignerIndex: DWORD;
+ blob: CRYPT_DATA_BLOB;
+ end;
+ {$EXTERNALSYM _CMSG_CTRL_ADD_SIGNER_UNAUTH_ATTR_PARA}
+ CMSG_CTRL_ADD_SIGNER_UNAUTH_ATTR_PARA = _CMSG_CTRL_ADD_SIGNER_UNAUTH_ATTR_PARA;
+ {$EXTERNALSYM CMSG_CTRL_ADD_SIGNER_UNAUTH_ATTR_PARA}
+ TCmsgCtrlAddSignerUnauthAttrPara = CMSG_CTRL_ADD_SIGNER_UNAUTH_ATTR_PARA;
+ PCmsgCtrlAddSignerUnauthAttrPara = PCMSG_CTRL_ADD_SIGNER_UNAUTH_ATTR_PARA;
+
+//+-------------------------------------------------------------------------
+// CMSG_CTRL_DEL_SIGNER_UNAUTH_ATTR
+//
+// Delete an unauthenticated attribute from the SignerInfo of a signed-data
+// or signed-and-enveloped-data message.
+//
+// The unauthenticated attribute to be removed is specified by
+// a 0-based index.
+//--------------------------------------------------------------------------
+
+ PCMSG_CTRL_DEL_SIGNER_UNAUTH_ATTR_PARA = ^CMSG_CTRL_DEL_SIGNER_UNAUTH_ATTR_PARA;
+ {$EXTERNALSYM PCMSG_CTRL_DEL_SIGNER_UNAUTH_ATTR_PARA}
+ _CMSG_CTRL_DEL_SIGNER_UNAUTH_ATTR_PARA = record
+ cbSize: DWORD;
+ dwSignerIndex: DWORD;
+ dwUnauthAttrIndex: DWORD;
+ end;
+ {$EXTERNALSYM _CMSG_CTRL_DEL_SIGNER_UNAUTH_ATTR_PARA}
+ CMSG_CTRL_DEL_SIGNER_UNAUTH_ATTR_PARA = _CMSG_CTRL_DEL_SIGNER_UNAUTH_ATTR_PARA;
+ {$EXTERNALSYM CMSG_CTRL_DEL_SIGNER_UNAUTH_ATTR_PARA}
+ TCmsgCtrlDelSignerUnauthAttrPara = CMSG_CTRL_DEL_SIGNER_UNAUTH_ATTR_PARA;
+ PCmsgCtrlDelSignerUnauthAttrPara = PCMSG_CTRL_DEL_SIGNER_UNAUTH_ATTR_PARA;
+
+//+-------------------------------------------------------------------------
+// CMSG_CTRL_ADD_CERT
+//
+// Add a certificate to a signed-data or signed-and-enveloped-data message.
+//
+// pvCtrlPara points to a CRYPT_DATA_BLOB containing the certificate's
+// encoded bytes.
+//--------------------------------------------------------------------------
+
+//+-------------------------------------------------------------------------
+// CMSG_CTRL_DEL_CERT
+//
+// Delete a certificate from a signed-data or signed-and-enveloped-data
+// message.
+//
+// pvCtrlPara points to a DWORD containing the 0-based index of the
+// certificate to be removed.
+//--------------------------------------------------------------------------
+
+//+-------------------------------------------------------------------------
+// CMSG_CTRL_ADD_CRL
+//
+// Add a CRL to a signed-data or signed-and-enveloped-data message.
+//
+// pvCtrlPara points to a CRYPT_DATA_BLOB containing the CRL's
+// encoded bytes.
+//--------------------------------------------------------------------------
+
+//+-------------------------------------------------------------------------
+// CMSG_CTRL_DEL_CRL
+//
+// Delete a CRL from a signed-data or signed-and-enveloped-data message.
+//
+// pvCtrlPara points to a DWORD containing the 0-based index of the CRL
+// to be removed.
+//--------------------------------------------------------------------------
+
+//+-------------------------------------------------------------------------
+// CMSG_CTRL_ADD_ATTR_CERT
+//
+// Add an attribute certificate to a signed-data message.
+//
+// pvCtrlPara points to a CRYPT_DATA_BLOB containing the attribute
+// certificate's encoded bytes.
+//--------------------------------------------------------------------------
+
+//+-------------------------------------------------------------------------
+// CMSG_CTRL_DEL_ATTR_CERT
+//
+// Delete an attribute certificate from a signed-data message.
+//
+// pvCtrlPara points to a DWORD containing the 0-based index of the
+// attribute certificate to be removed.
+//--------------------------------------------------------------------------
+
+//+-------------------------------------------------------------------------
+// Verify a countersignature, at the SignerInfo level.
+// ie. verify that pbSignerInfoCountersignature contains the encrypted
+// hash of the encryptedDigest field of pbSignerInfo.
+//
+// hCryptProv is used to hash the encryptedDigest field of pbSignerInfo.
+// The only fields referenced from pciCountersigner are SerialNumber, Issuer,
+// and SubjectPublicKeyInfo.
+//--------------------------------------------------------------------------
+
+function CryptMsgVerifyCountersignatureEncoded(hCryptProv: HCRYPTPROV;
+ dwEncodingType: DWORD; pbSignerInfo: PBYTE; cbSignerInfo: DWORD;
+ pbSignerInfoCountersignature: PBYTE; cbSignerInfoCountersignature: DWORD;
+ pciCountersigner: PCERT_INFO): BOOL; stdcall;
+{$EXTERNALSYM CryptMsgVerifyCountersignatureEncoded}
+
+//+-------------------------------------------------------------------------
+// Verify a countersignature, at the SignerInfo level.
+// ie. verify that pbSignerInfoCountersignature contains the encrypted
+// hash of the encryptedDigest field of pbSignerInfo.
+//
+// hCryptProv is used to hash the encryptedDigest field of pbSignerInfo.
+//
+// The signer can be a CERT_PUBLIC_KEY_INFO, certificate context or a
+// chain context.
+//--------------------------------------------------------------------------
+
+function CryptMsgVerifyCountersignatureEncodedEx(hCryptProv: HCRYPTPROV;
+ dwEncodingType: DWORD; pbSignerInfo: PBYTE; cbSignerInfo: DWORD;
+ pbSignerInfoCountersignature: PBYTE; cbSignerInfoCountersignature: DWORD;
+ dwSignerType: DWORD; pvSigner: Pointer; dwFlags: DWORD; pvReserved: Pointer): BOOL; stdcall;
+{$EXTERNALSYM CryptMsgVerifyCountersignatureEncodedEx}
+
+// See CMSG_CTRL_VERIFY_SIGNATURE_EX_PARA for dwSignerType definitions
+
+//+-------------------------------------------------------------------------
+// Countersign an already-existing signature in a message
+//
+// dwIndex is a zero-based index of the SignerInfo to be countersigned.
+//--------------------------------------------------------------------------
+
+function CryptMsgCountersign(hCryptMsg: HCRYPTMSG; dwIndex, cCountersigners: DWORD;
+ rgCountersigners: PCMSG_SIGNER_ENCODE_INFO): BOOL; stdcall;
+{$EXTERNALSYM CryptMsgCountersign}
+
+//+-------------------------------------------------------------------------
+// Countersign an already-existing signature (encoded SignerInfo).
+// Output an encoded SignerInfo blob, suitable for use as a countersignature
+// attribute in the unauthenticated attributes of a signed-data or
+// signed-and-enveloped-data message.
+//--------------------------------------------------------------------------
+
+function CryptMsgCountersignEncoded(dwEncodingType: DWORD; pbSignerInfo: PBYTE;
+ cbSignerInfo: DWORD; cCountersigners: DWORD; rgCountersigners: PCMSG_SIGNER_ENCODE_INFO;
+ pbCountersignature: PBYTE; var pcbCountersignature: DWORD): BOOL; stdcall;
+{$EXTERNALSYM CryptMsgCountersignEncoded}
+
+//+-------------------------------------------------------------------------
+// CryptMsg OID installable functions
+//--------------------------------------------------------------------------
+
+type
+ PFN_CMSG_ALLOC = function(cb: size_t): Pointer; stdcall;
+ {$EXTERNALSYM PFN_CMSG_ALLOC}
+ PFnCMsgAlloc = PFN_CMSG_ALLOC;
+
+ PFN_CMSG_FREE = procedure(pv: Pointer); stdcall;
+ {$EXTERNALSYM PFN_CMSG_FREE}
+ PFnCMsgFree = PFN_CMSG_FREE;
+
+// Note, the following 3 installable functions are obsolete and have been
+// replaced with GenContentEncryptKey, ExportKeyTrans, ExportKeyAgree,
+// ExportMailList, ImportKeyTrans, ImportKeyAgree and ImportMailList
+// installable functions.
+
+// If *phCryptProv is NULL upon entry, then, if supported, the installable
+// function should acquire a default provider and return. Note, its up
+// to the installable function to release at process detach.
+//
+// If paiEncrypt->Parameters.cbData is 0, then, the callback may optionally
+// return default encoded parameters in *ppbEncryptParameters and
+// *pcbEncryptParameters. pfnAlloc must be called for the allocation.
+
+const
+ CMSG_OID_GEN_ENCRYPT_KEY_FUNC = 'CryptMsgDllGenEncryptKey';
+ {$EXTERNALSYM CMSG_OID_GEN_ENCRYPT_KEY_FUNC}
+
+type
+ PFN_CMSG_GEN_ENCRYPT_KEY = function(phCryptProv: PHCRYPTPROV;
+ paiEncrypt: PCRYPT_ALGORITHM_IDENTIFIER; pvEncryptAuxInfo: PVOID;
+ pPublicKeyInfo: PCERT_PUBLIC_KEY_INFO; pfnAlloc: PFN_CMSG_ALLOC;
+ var phEncryptKey: HCRYPTKEY; var ppbEncryptParameters: PBYTE;
+ pcbEncryptParameters: PDWORD): BOOL; stdcall;
+ {$EXTERNALSYM PFN_CMSG_GEN_ENCRYPT_KEY}
+ PfnCmsgGenEncryptKey = PFN_CMSG_GEN_ENCRYPT_KEY;
+
+const
+ CMSG_OID_EXPORT_ENCRYPT_KEY_FUNC = 'CryptMsgDllExportEncryptKey';
+ {$EXTERNALSYM CMSG_OID_EXPORT_ENCRYPT_KEY_FUNC}
+
+type
+ PFN_CMSG_EXPORT_ENCRYPT_KEY = function(hCryptProv: HCRYPTPROV;
+ hEncryptKey: HCRYPTKEY; pPublicKeyInfo: PCERT_PUBLIC_KEY_INFO;
+ pbData: PBYTE; var pcbData: DWORD): BOOL; stdcall;
+ {$EXTERNALSYM PFN_CMSG_EXPORT_ENCRYPT_KEY}
+ PfnCmsgExportEncryptKey = PFN_CMSG_EXPORT_ENCRYPT_KEY;
+
+const
+ CMSG_OID_IMPORT_ENCRYPT_KEY_FUNC = 'CryptMsgDllImportEncryptKey';
+ {$EXTERNALSYM CMSG_OID_IMPORT_ENCRYPT_KEY_FUNC}
+
+type
+ PFN_CMSG_IMPORT_ENCRYPT_KEY = function(hCryptProv: HCRYPTPROV;
+ dwKeySpec: DWORD; paiEncrypt: PCRYPT_ALGORITHM_IDENTIFIER;
+ paiPubKey: PCRYPT_ALGORITHM_IDENTIFIER; pbEncodedKey: PBYTE;
+ cbEncodedKey: DWORD; var phEncryptKey: HCRYPTKEY): BOOL; stdcall;
+ {$EXTERNALSYM PFN_CMSG_IMPORT_ENCRYPT_KEY}
+ PfnCmsgImportEncryptKey = PFN_CMSG_IMPORT_ENCRYPT_KEY;
+
+// To get the default installable function for GenContentEncryptKey,
+// ExportKeyTrans, ExportKeyAgree, ExportMailList, ImportKeyTrans,
+// ImportKeyAgree or ImportMailList call CryptGetOIDFunctionAddress()
+// with the pszOID argument set to the following constant. dwEncodingType
+// should be set to CRYPT_ASN_ENCODING or X509_ASN_ENCODING.
+
+const
+ CMSG_DEFAULT_INSTALLABLE_FUNC_OID = LPCSTR(1);
+ {$EXTERNALSYM CMSG_DEFAULT_INSTALLABLE_FUNC_OID}
+
+//+-------------------------------------------------------------------------
+// Content Encrypt Info
+//
+// The following data structure contains the information shared between
+// the GenContentEncryptKey and the ExportKeyTrans, ExportKeyAgree and
+// ExportMailList installable functions.
+//--------------------------------------------------------------------------
+
+type
+ PCMSG_CONTENT_ENCRYPT_INFO = ^CMSG_CONTENT_ENCRYPT_INFO;
+ {$EXTERNALSYM PCMSG_CONTENT_ENCRYPT_INFO}
+ _CMSG_CONTENT_ENCRYPT_INFO = record
+ cbSize: DWORD;
+ hCryptProv: HCRYPTPROV;
+ ContentEncryptionAlgorithm: CRYPT_ALGORITHM_IDENTIFIER;
+ pvEncryptionAuxInfo: Pointer;
+ cRecipients: DWORD;
+ rgCmsRecipients: PCMSG_RECIPIENT_ENCODE_INFO;
+ pfnAlloc: PFN_CMSG_ALLOC;
+ pfnFree: PFN_CMSG_FREE;
+ dwEncryptFlags: DWORD;
+ hContentEncryptKey: HCRYPTKEY;
+ dwFlags: DWORD;
+ end;
+ {$EXTERNALSYM _CMSG_CONTENT_ENCRYPT_INFO}
+ CMSG_CONTENT_ENCRYPT_INFO = _CMSG_CONTENT_ENCRYPT_INFO;
+ {$EXTERNALSYM CMSG_CONTENT_ENCRYPT_INFO}
+ TCmsgContentEncryptInfo = CMSG_CONTENT_ENCRYPT_INFO;
+ PCmsgContentEncryptInfo = PCMSG_CONTENT_ENCRYPT_INFO;
+
+const
+ CMSG_CONTENT_ENCRYPT_PAD_ENCODED_LEN_FLAG = $00000001;
+ {$EXTERNALSYM CMSG_CONTENT_ENCRYPT_PAD_ENCODED_LEN_FLAG}
+
+ CMSG_CONTENT_ENCRYPT_FREE_PARA_FLAG = $00000001;
+ {$EXTERNALSYM CMSG_CONTENT_ENCRYPT_FREE_PARA_FLAG}
+ CMSG_CONTENT_ENCRYPT_RELEASE_CONTEXT_FLAG = $00008000;
+ {$EXTERNALSYM CMSG_CONTENT_ENCRYPT_RELEASE_CONTEXT_FLAG}
+
+//+-------------------------------------------------------------------------
+// Upon input, ContentEncryptInfo has been initialized from the
+// EnvelopedEncodeInfo.
+//
+// Note, if rgpRecipients instead of rgCmsRecipients are set in the
+// EnvelopedEncodeInfo, then, the rgpRecipients have been converted
+// to rgCmsRecipients in the ContentEncryptInfo.
+//
+// The following fields may be changed in ContentEncryptInfo:
+// hContentEncryptKey
+// hCryptProv
+// ContentEncryptionAlgorithm.Parameters
+// dwFlags
+//
+// All other fields in the ContentEncryptInfo are READONLY.
+//
+// If CMSG_CONTENT_ENCRYPT_PAD_ENCODED_LEN_FLAG is set upon entry
+// in dwEncryptFlags, then, any potentially variable length encoded
+// output should be padded with zeroes to always obtain the
+// same maximum encoded length. This is necessary for
+// CryptMsgCalculateEncodedLength() or CryptMsgOpenToEncode() with
+// definite length streaming.
+//
+// The hContentEncryptKey must be updated.
+//
+// If hCryptProv is NULL upon input, then, it must be updated.
+// If a HCRYPTPROV is acquired that must be released, then, the
+// CMSG_CONTENT_ENCRYPT_RELEASE_CONTEXT_FLAG must be set in dwFlags.
+//
+// If ContentEncryptionAlgorithm.Parameters is updated, then, the
+// CMSG_CONTENT_ENCRYPT_FREE_PARA_FLAG must be set in dwFlags. pfnAlloc and
+// pfnFree must be used for doing the allocation.
+//
+// ContentEncryptionAlgorithm.pszObjId is used to get the OIDFunctionAddress.
+//--------------------------------------------------------------------------
+
+const
+ CMSG_OID_GEN_CONTENT_ENCRYPT_KEY_FUNC = 'CryptMsgDllGenContentEncryptKey';
+ {$EXTERNALSYM CMSG_OID_GEN_CONTENT_ENCRYPT_KEY_FUNC}
+
+type
+ PFN_CMSG_GEN_CONTENT_ENCRYPT_KEY = function(pContentEncryptInfo: PCMSG_CONTENT_ENCRYPT_INFO;
+ dwFlags: DWORD; pvReserved: PPointer): BOOL; stdcall;
+ {$EXTERNALSYM PFN_CMSG_GEN_CONTENT_ENCRYPT_KEY}
+ PfnCmsgGenContentEncryptKey = PFN_CMSG_GEN_CONTENT_ENCRYPT_KEY;
+
+//+-------------------------------------------------------------------------
+// Key Transport Encrypt Info
+//
+// The following data structure contains the information updated by the
+// ExportKeyTrans installable function.
+//--------------------------------------------------------------------------
+
+type
+ PCMSG_KEY_TRANS_ENCRYPT_INFO = ^CMSG_KEY_TRANS_ENCRYPT_INFO;
+ {$EXTERNALSYM PCMSG_KEY_TRANS_ENCRYPT_INFO}
+ _CMSG_KEY_TRANS_ENCRYPT_INFO = record
+ cbSize: DWORD;
+ dwRecipientIndex: DWORD;
+ KeyEncryptionAlgorithm: CRYPT_ALGORITHM_IDENTIFIER;
+ EncryptedKey: CRYPT_DATA_BLOB;
+ dwFlags: DWORD;
+ end;
+ {$EXTERNALSYM _CMSG_KEY_TRANS_ENCRYPT_INFO}
+ CMSG_KEY_TRANS_ENCRYPT_INFO = _CMSG_KEY_TRANS_ENCRYPT_INFO;
+ {$EXTERNALSYM CMSG_KEY_TRANS_ENCRYPT_INFO}
+ TCmsgKeyTransEncryptInfo = CMSG_KEY_TRANS_ENCRYPT_INFO;
+ PCmsgKeyTransEncryptInfo = PCMSG_KEY_TRANS_ENCRYPT_INFO;
+
+const
+ CMSG_KEY_TRANS_ENCRYPT_FREE_PARA_FLAG = $00000001;
+ {$EXTERNALSYM CMSG_KEY_TRANS_ENCRYPT_FREE_PARA_FLAG}
+
+//+-------------------------------------------------------------------------
+// Upon input, KeyTransEncryptInfo has been initialized from the
+// KeyTransEncodeInfo.
+//
+// The following fields may be changed in KeyTransEncryptInfo:
+// EncryptedKey
+// KeyEncryptionAlgorithm.Parameters
+// dwFlags
+//
+// All other fields in the KeyTransEncryptInfo are READONLY.
+//
+// The EncryptedKey must be updated. The pfnAlloc and pfnFree specified in
+// ContentEncryptInfo must be used for doing the allocation.
+//
+// If the KeyEncryptionAlgorithm.Parameters is updated, then, the
+// CMSG_KEY_TRANS_ENCRYPT_FREE_PARA_FLAG must be set in dwFlags.
+// The pfnAlloc and pfnFree specified in ContentEncryptInfo must be used
+// for doing the allocation.
+//
+// KeyEncryptionAlgorithm.pszObjId is used to get the OIDFunctionAddress.
+//--------------------------------------------------------------------------
+
+const
+ CMSG_OID_EXPORT_KEY_TRANS_FUNC = 'CryptMsgDllExportKeyTrans';
+ {$EXTERNALSYM CMSG_OID_EXPORT_KEY_TRANS_FUNC}
+
+type
+ PFN_CMSG_EXPORT_KEY_TRANS = function(pContentEncryptInfo: PCMSG_CONTENT_ENCRYPT_INFO;
+ pKeyTransEncodeInfo: PCMSG_KEY_TRANS_RECIPIENT_ENCODE_INFO;
+ pKeyTransEncryptInfo: PCMSG_KEY_TRANS_ENCRYPT_INFO; dwFlags: DWORD;
+ pvReserved: Pointer): BOOL; stdcall;
+ {$EXTERNALSYM PFN_CMSG_EXPORT_KEY_TRANS}
+ PfnCmsgExportKeyTrans = PFN_CMSG_EXPORT_KEY_TRANS;
+
+//+-------------------------------------------------------------------------
+// Key Agree Key Encrypt Info
+//
+// The following data structure contains the information updated by the
+// ExportKeyAgree installable function for each encrypted key agree
+// recipient.
+//--------------------------------------------------------------------------
+
+type
+ PCMSG_KEY_AGREE_KEY_ENCRYPT_INFO = ^CMSG_KEY_AGREE_KEY_ENCRYPT_INFO;
+ {$EXTERNALSYM PCMSG_KEY_AGREE_KEY_ENCRYPT_INFO}
+ _CMSG_KEY_AGREE_KEY_ENCRYPT_INFO = record
+ cbSize: DWORD;
+ EncryptedKey: CRYPT_DATA_BLOB;
+ end;
+ {$EXTERNALSYM _CMSG_KEY_AGREE_KEY_ENCRYPT_INFO}
+ CMSG_KEY_AGREE_KEY_ENCRYPT_INFO = _CMSG_KEY_AGREE_KEY_ENCRYPT_INFO;
+ {$EXTERNALSYM CMSG_KEY_AGREE_KEY_ENCRYPT_INFO}
+ TCmsgKeyAgreeKeyEncryptInfo = CMSG_KEY_AGREE_KEY_ENCRYPT_INFO;
+ PCmsgKeyAgreeKeyEncryptInfo = PCMSG_KEY_AGREE_KEY_ENCRYPT_INFO;
+
+ PPCMSG_KEY_AGREE_KEY_ENCRYPT_INFO = ^PCMSG_KEY_AGREE_KEY_ENCRYPT_INFO;
+ {$NODEFINE PPCMSG_KEY_AGREE_KEY_ENCRYPT_INFO}
+
+//+-------------------------------------------------------------------------
+// Key Agree Encrypt Info
+//
+// The following data structure contains the information applicable to
+// all recipients. Its updated by the ExportKeyAgree installable function.
+//--------------------------------------------------------------------------
+
+ PCMSG_KEY_AGREE_ENCRYPT_INFO = ^CMSG_KEY_AGREE_ENCRYPT_INFO;
+ {$EXTERNALSYM PCMSG_KEY_AGREE_ENCRYPT_INFO}
+ _CMSG_KEY_AGREE_ENCRYPT_INFO = record
+ cbSize: DWORD;
+ dwRecipientIndex: DWORD;
+ KeyEncryptionAlgorithm: CRYPT_ALGORITHM_IDENTIFIER;
+ UserKeyingMaterial: CRYPT_DATA_BLOB;
+ dwOriginatorChoice: DWORD;
+ Union: record
+ case Integer of
+ // CMSG_KEY_AGREE_ORIGINATOR_CERT
+ 0: (OriginatorCertId: CERT_ID);
+ // CMSG_KEY_AGREE_ORIGINATOR_PUBLIC_KEY
+ 1: (OriginatorPublicKeyInfo: CERT_PUBLIC_KEY_INFO);
+ end;
+ cKeyAgreeKeyEncryptInfo: DWORD;
+ rgpKeyAgreeKeyEncryptInfo: PPCMSG_KEY_AGREE_KEY_ENCRYPT_INFO;
+ dwFlags: DWORD;
+ end;
+ {$EXTERNALSYM _CMSG_KEY_AGREE_ENCRYPT_INFO}
+ CMSG_KEY_AGREE_ENCRYPT_INFO = _CMSG_KEY_AGREE_ENCRYPT_INFO;
+ {$EXTERNALSYM CMSG_KEY_AGREE_ENCRYPT_INFO}
+ TCmsgKeyAgreeEncryptInfo = CMSG_KEY_AGREE_ENCRYPT_INFO;
+ PCmsgKeyAgreeEncryptInfo = PCMSG_KEY_AGREE_ENCRYPT_INFO;
+
+const
+ CMSG_KEY_AGREE_ENCRYPT_FREE_PARA_FLAG = $00000001;
+ {$EXTERNALSYM CMSG_KEY_AGREE_ENCRYPT_FREE_PARA_FLAG}
+ CMSG_KEY_AGREE_ENCRYPT_FREE_MATERIAL_FLAG = $00000002;
+ {$EXTERNALSYM CMSG_KEY_AGREE_ENCRYPT_FREE_MATERIAL_FLAG}
+ CMSG_KEY_AGREE_ENCRYPT_FREE_PUBKEY_ALG_FLAG = $00000004;
+ {$EXTERNALSYM CMSG_KEY_AGREE_ENCRYPT_FREE_PUBKEY_ALG_FLAG}
+ CMSG_KEY_AGREE_ENCRYPT_FREE_PUBKEY_PARA_FLAG = $00000008;
+ {$EXTERNALSYM CMSG_KEY_AGREE_ENCRYPT_FREE_PUBKEY_PARA_FLAG}
+ CMSG_KEY_AGREE_ENCRYPT_FREE_PUBKEY_BITS_FLAG = $00000010;
+ {$EXTERNALSYM CMSG_KEY_AGREE_ENCRYPT_FREE_PUBKEY_BITS_FLAG}
+
+//+-------------------------------------------------------------------------
+// Upon input, KeyAgreeEncryptInfo has been initialized from the
+// KeyAgreeEncodeInfo.
+//
+// The following fields may be changed in KeyAgreeEncryptInfo:
+// KeyEncryptionAlgorithm.Parameters
+// UserKeyingMaterial
+// dwOriginatorChoice
+// OriginatorCertId
+// OriginatorPublicKeyInfo
+// dwFlags
+//
+// All other fields in the KeyAgreeEncryptInfo are READONLY.
+//
+// If the KeyEncryptionAlgorithm.Parameters is updated, then, the
+// CMSG_KEY_AGREE_ENCRYPT_FREE_PARA_FLAG must be set in dwFlags.
+// The pfnAlloc and pfnFree specified in ContentEncryptInfo must be used
+// for doing the allocation.
+//
+// If the UserKeyingMaterial is updated, then, the
+// CMSG_KEY_AGREE_ENCRYPT_FREE_MATERIAL_FLAG must be set in dwFlags.
+// pfnAlloc and pfnFree must be used for doing the allocation.
+//
+// The dwOriginatorChoice must be updated to either
+// CMSG_KEY_AGREE_ORIGINATOR_CERT or CMSG_KEY_AGREE_ORIGINATOR_PUBLIC_KEY.
+//
+// If the OriginatorPublicKeyInfo is updated, then, the appropriate
+// CMSG_KEY_AGREE_ENCRYPT_FREE_PUBKEY_*_FLAG must be set in dwFlags and
+// pfnAlloc and pfnFree must be used for doing the allocation.
+//
+// If CMSG_CONTENT_ENCRYPT_PAD_ENCODED_LEN_FLAG is set upon entry
+// in pContentEncryptInfo->dwEncryptFlags, then, the OriginatorPublicKeyInfo's
+// Ephemeral PublicKey should be padded with zeroes to always obtain the
+// same maximum encoded length. Note, the length of the generated ephemeral Y
+// public key can vary depending on the number of leading zero bits.
+//
+// Upon input, the array of *rgpKeyAgreeKeyEncryptInfo has been initialized.
+// The EncryptedKey must be updated for each recipient key.
+// The pfnAlloc and pfnFree specified in
+// ContentEncryptInfo must be used for doing the allocation.
+//
+// KeyEncryptionAlgorithm.pszObjId is used to get the OIDFunctionAddress.
+//--------------------------------------------------------------------------
+
+const
+ CMSG_OID_EXPORT_KEY_AGREE_FUNC = 'CryptMsgDllExportKeyAgree';
+ {$EXTERNALSYM CMSG_OID_EXPORT_KEY_AGREE_FUNC}
+
+type
+ PFN_CMSG_EXPORT_KEY_AGREE = function(pContentEncryptInfo: PCMSG_CONTENT_ENCRYPT_INFO;
+ pKeyAgreeEncodeInfo: PCMSG_KEY_AGREE_RECIPIENT_ENCODE_INFO;
+ pKeyAgreeEncryptInfo: PCMSG_KEY_AGREE_ENCRYPT_INFO; dwFlags: DWORD;
+ pvReserved: Pointer): BOOL; stdcall;
+ {$EXTERNALSYM PFN_CMSG_EXPORT_KEY_AGREE}
+ PfnCmsgExportKeyAgree = PFN_CMSG_EXPORT_KEY_AGREE;
+
+//+-------------------------------------------------------------------------
+// Mail List Encrypt Info
+//
+// The following data structure contains the information updated by the
+// ExportMailList installable function.
+//--------------------------------------------------------------------------
+
+type
+ PCMSG_MAIL_LIST_ENCRYPT_INFO = ^CMSG_MAIL_LIST_ENCRYPT_INFO;
+ {$EXTERNALSYM PCMSG_MAIL_LIST_ENCRYPT_INFO}
+ _CMSG_MAIL_LIST_ENCRYPT_INFO = record
+ cbSize: DWORD;
+ dwRecipientIndex: DWORD;
+ KeyEncryptionAlgorithm: CRYPT_ALGORITHM_IDENTIFIER;
+ EncryptedKey: CRYPT_DATA_BLOB;
+ dwFlags: DWORD;
+ end;
+ {$EXTERNALSYM _CMSG_MAIL_LIST_ENCRYPT_INFO}
+ CMSG_MAIL_LIST_ENCRYPT_INFO = _CMSG_MAIL_LIST_ENCRYPT_INFO;
+ {$EXTERNALSYM CMSG_MAIL_LIST_ENCRYPT_INFO}
+ TCmsgMailListEncryptInfo = CMSG_MAIL_LIST_ENCRYPT_INFO;
+ PCmsgMailListEncryptInfo = PCMSG_MAIL_LIST_ENCRYPT_INFO;
+
+const
+ CMSG_MAIL_LIST_ENCRYPT_FREE_PARA_FLAG = $00000001;
+ {$EXTERNALSYM CMSG_MAIL_LIST_ENCRYPT_FREE_PARA_FLAG}
+
+//+-------------------------------------------------------------------------
+// Upon input, MailListEncryptInfo has been initialized from the
+// MailListEncodeInfo.
+//
+// The following fields may be changed in MailListEncryptInfo:
+// EncryptedKey
+// KeyEncryptionAlgorithm.Parameters
+// dwFlags
+//
+// All other fields in the MailListEncryptInfo are READONLY.
+//
+// The EncryptedKey must be updated. The pfnAlloc and pfnFree specified in
+// ContentEncryptInfo must be used for doing the allocation.
+//
+// If the KeyEncryptionAlgorithm.Parameters is updated, then, the
+// CMSG_MAIL_LIST_ENCRYPT_FREE_PARA_FLAG must be set in dwFlags.
+// The pfnAlloc and pfnFree specified in ContentEncryptInfo must be used
+// for doing the allocation.
+//
+// KeyEncryptionAlgorithm.pszObjId is used to get the OIDFunctionAddress.
+//--------------------------------------------------------------------------
+
+const
+ CMSG_OID_EXPORT_MAIL_LIST_FUNC = 'CryptMsgDllExportMailList';
+ {$EXTERNALSYM CMSG_OID_EXPORT_MAIL_LIST_FUNC}
+
+type
+ PFN_CMSG_EXPORT_MAIL_LIST = function(pContentEncryptInfo: PCMSG_CONTENT_ENCRYPT_INFO;
+ pMailListEncodeInfo: PCMSG_MAIL_LIST_RECIPIENT_ENCODE_INFO;
+ pMailListEncryptInfo: PCMSG_MAIL_LIST_ENCRYPT_INFO; dwFlags: DWORD;
+ pvReserved: Pointer): BOOL; stdcall;
+ {$EXTERNALSYM PFN_CMSG_EXPORT_MAIL_LIST}
+ PfnCmsgExportMailList = PFN_CMSG_EXPORT_MAIL_LIST;
+
+//+-------------------------------------------------------------------------
+// OID Installable functions for importing an encoded and encrypted content
+// encryption key.
+//
+// There's a different installable function for each CMS Recipient choice:
+// ImportKeyTrans
+// ImportKeyAgree
+// ImportMailList
+//
+// Iterates through the following OIDs to get the OID installable function:
+// KeyEncryptionOID!ContentEncryptionOID
+// KeyEncryptionOID
+// ContentEncryptionOID
+//
+// If the OID installable function doesn't support the specified
+// KeyEncryption and ContentEncryption OIDs, then, return FALSE with
+// LastError set to E_NOTIMPL.
+//--------------------------------------------------------------------------
+
+const
+ CMSG_OID_IMPORT_KEY_TRANS_FUNC = 'CryptMsgDllImportKeyTrans';
+ {$EXTERNALSYM CMSG_OID_IMPORT_KEY_TRANS_FUNC}
+
+type
+ PFN_CMSG_IMPORT_KEY_TRANS = function(pContentEncryptionAlgorithm: PCRYPT_ALGORITHM_IDENTIFIER;
+ pKeyTransDecryptPara: PCMSG_CTRL_KEY_TRANS_DECRYPT_PARA; dwFlags: DWORD;
+ pvReserved: Pointer; var phContentEncryptKey: HCRYPTKEY): BOOL; stdcall;
+ {$EXTERNALSYM PFN_CMSG_IMPORT_KEY_TRANS}
+ PfnCmsgImportKeyTrans = PFN_CMSG_IMPORT_KEY_TRANS;
+
+const
+ CMSG_OID_IMPORT_KEY_AGREE_FUNC = 'CryptMsgDllImportKeyAgree';
+ {$EXTERNALSYM CMSG_OID_IMPORT_KEY_AGREE_FUNC}
+
+type
+ PFN_CMSG_IMPORT_KEY_AGREE = function(pContentEncryptionAlgorithm: PCRYPT_ALGORITHM_IDENTIFIER;
+ pKeyAgreeDecryptPara: PCMSG_CTRL_KEY_AGREE_DECRYPT_PARA; dwFlags: DWORD;
+ pvReserved: Pointer; var phContentEncryptKey: HCRYPTKEY): BOOL; stdcall;
+ {$EXTERNALSYM PFN_CMSG_IMPORT_KEY_AGREE}
+ PfnCmsgImportKeyAgree = PFN_CMSG_IMPORT_KEY_AGREE;
+
+const
+ CMSG_OID_IMPORT_MAIL_LIST_FUNC = 'CryptMsgDllImportMailList';
+ {$EXTERNALSYM CMSG_OID_IMPORT_MAIL_LIST_FUNC}
+
+type
+ PFN_CMSG_IMPORT_MAIL_LIST = function(pContentEncryptionAlgorithm: PCRYPT_ALGORITHM_IDENTIFIER;
+ pMailListDecryptPara: PCMSG_CTRL_MAIL_LIST_DECRYPT_PARA; dwFlags: DWORD;
+ pvReserved: Pointer; var phContentEncryptKey: HCRYPTKEY): BOOL; stdcall;
+ {$EXTERNALSYM PFN_CMSG_IMPORT_MAIL_LIST}
+ PfnCmsgImportMailList = PFN_CMSG_IMPORT_MAIL_LIST;
+
+//+=========================================================================
+// Certificate Store Data Structures and APIs
+//==========================================================================
+
+//+-------------------------------------------------------------------------
+// In its most basic implementation, a cert store is simply a
+// collection of certificates and/or CRLs. This is the case when
+// a cert store is opened with all of its certificates and CRLs
+// coming from a PKCS #7 encoded cryptographic message.
+//
+// Nonetheless, all cert stores have the following properties:
+// - A public key may have more than one certificate in the store.
+// For example, a private/public key used for signing may have a
+// certificate issued for VISA and another issued for
+// Mastercard. Also, when a certificate is renewed there might
+// be more than one certificate with the same subject and
+// issuer.
+// - However, each certificate in the store is uniquely
+// identified by its Issuer and SerialNumber.
+// - There's an issuer of subject certificate relationship. A
+// certificate's issuer is found by doing a match of
+// pSubjectCert->Issuer with pIssuerCert->Subject.
+// The relationship is verified by using
+// the issuer's public key to verify the subject certificate's
+// signature. Note, there might be X.509 v3 extensions
+// to assist in finding the issuer certificate.
+// - Since issuer certificates might be renewed, a subject
+// certificate might have more than one issuer certificate.
+// - There's an issuer of CRL relationship. An
+// issuer's CRL is found by doing a match of
+// pIssuerCert->Subject with pCrl->Issuer.
+// The relationship is verified by using
+// the issuer's public key to verify the CRL's
+// signature. Note, there might be X.509 v3 extensions
+// to assist in finding the CRL.
+// - Since some issuers might support the X.509 v3 delta CRL
+// extensions, an issuer might have more than one CRL.
+// - The store shouldn't have any redundant certificates or
+// CRLs. There shouldn't be two certificates with the same
+// Issuer and SerialNumber. There shouldn't be two CRLs with
+// the same Issuer, ThisUpdate and NextUpdate.
+// - The store has NO policy or trust information. No
+// certificates are tagged as being "root". Its up to
+// the application to maintain a list of CertIds (Issuer +
+// SerialNumber) for certificates it trusts.
+// - The store might contain bad certificates and/or CRLs.
+// The issuer's signature of a subject certificate or CRL may
+// not verify. Certificates or CRLs may not satisfy their
+// time validity requirements. Certificates may be
+// revoked.
+//
+// In addition to the certificates and CRLs, properties can be
+// stored. There are two predefined property IDs for a user
+// certificate: CERT_KEY_PROV_HANDLE_PROP_ID and
+// CERT_KEY_PROV_INFO_PROP_ID. The CERT_KEY_PROV_HANDLE_PROP_ID
+// is a HCRYPTPROV handle to the private key assoicated
+// with the certificate. The CERT_KEY_PROV_INFO_PROP_ID contains
+// information to be used to call
+// CryptAcquireContext and CryptSetProvParam to get a handle
+// to the private key associated with the certificate.
+//
+// There exists two more predefined property IDs for certificates
+// and CRLs, CERT_SHA1_HASH_PROP_ID and CERT_MD5_HASH_PROP_ID.
+// If these properties don't already exist, then, a hash of the
+// content is computed. (CERT_HASH_PROP_ID maps to the default
+// hash algorithm, currently, CERT_SHA1_HASH_PROP_ID).
+//
+// There are additional APIs for creating certificate and CRL
+// contexts not in a store (CertCreateCertificateContext and
+// CertCreateCRLContext).
+//
+//--------------------------------------------------------------------------
+
+type
+ HCERTSTORE = Pointer;
+ {$EXTERNALSYM HCERTSTORE}
+ PHCERTSTORE = ^HCERTSTORE;
+ {$NODEFINE PHCERTSTORE}
+
+//+-------------------------------------------------------------------------
+// Certificate context.
+//
+// A certificate context contains both the encoded and decoded representation
+// of a certificate. A certificate context returned by a cert store function
+// must be freed by calling the CertFreeCertificateContext function. The
+// CertDuplicateCertificateContext function can be called to make a duplicate
+// copy (which also must be freed by calling CertFreeCertificateContext).
+//--------------------------------------------------------------------------
+
+ PCERT_CONTEXT = ^CERT_CONTEXT;
+ {$EXTERNALSYM CERT_CONTEXT}
+ _CERT_CONTEXT = record
+ dwCertEncodingType: DWORD;
+ pbCertEncoded: LPBYTE;
+ cbCertEncoded: DWORD;
+ pCertInfo: PCERT_INFO;
+ hCertStore: HCERTSTORE;
+ end;
+ {$EXTERNALSYM _CERT_CONTEXT}
+ CERT_CONTEXT = _CERT_CONTEXT;
+ {$EXTERNALSYM CERT_CONTEXT}
+ TCertContext = CERT_CONTEXT;
+ PCertContext = PCERT_CONTEXT;
+
+ PCCERT_CONTEXT = PCERT_CONTEXT;
+ {$EXTERNALSYM PCCERT_CONTEXT}
+ PPCCERT_CONTEXT = ^PCCERT_CONTEXT;
+ {$NODEFINE PCCERT_CONTEXT}
+
+//+-------------------------------------------------------------------------
+// CRL context.
+//
+// A CRL context contains both the encoded and decoded representation
+// of a CRL. A CRL context returned by a cert store function
+// must be freed by calling the CertFreeCRLContext function. The
+// CertDuplicateCRLContext function can be called to make a duplicate
+// copy (which also must be freed by calling CertFreeCRLContext).
+//--------------------------------------------------------------------------
+
+ PCRL_CONTEXT = ^CRL_CONTEXT;
+ {$EXTERNALSYM PCRL_CONTEXT}
+ _CRL_CONTEXT = record
+ dwCertEncodingType: DWORD;
+ pbCrlEncoded: LPBYTE;
+ cbCrlEncoded: DWORD;
+ pCrlInfo: PCRL_INFO;
+ hCertStore: HCERTSTORE;
+ end;
+ {$EXTERNALSYM _CRL_CONTEXT}
+ CRL_CONTEXT = _CRL_CONTEXT;
+ {$EXTERNALSYM CRL_CONTEXT}
+ TCrlContext = CRL_CONTEXT;
+ PCrlContext = PCRL_CONTEXT;
+
+ PCCRL_CONTEXT = PCRL_CONTEXT;
+ {$EXTERNALSYM PCCRL_CONTEXT}
+ PPCCRL_CONTEXT = ^PCCRL_CONTEXT;
+ {$NODEFINE PPCCRL_CONTEXT}
+
+//+-------------------------------------------------------------------------
+// Certificate Trust List (CTL) context.
+//
+// A CTL context contains both the encoded and decoded representation
+// of a CTL. Also contains an opened HCRYPTMSG handle to the decoded
+// cryptographic signed message containing the CTL_INFO as its inner content.
+// pbCtlContent is the encoded inner content of the signed message.
+//
+// The CryptMsg APIs can be used to extract additional signer information.
+//--------------------------------------------------------------------------
+
+ PCTL_CONTEXT = ^CTL_CONTEXT;
+ {$EXTERNALSYM PCTL_CONTEXT}
+ _CTL_CONTEXT = record
+ dwMsgAndCertEncodingType: DWORD;
+ pbCtlEncoded: LPBYTE;
+ cbCtlEncoded: DWORD;
+ pCtlInfo: PCTL_INFO;
+ hCertStore: HCERTSTORE;
+ hCryptMsg: HCRYPTMSG;
+ pbCtlContent: LPBYTE;
+ cbCtlContent: DWORD;
+ end;
+ {$EXTERNALSYM _CTL_CONTEXT}
+ CTL_CONTEXT = _CTL_CONTEXT;
+ {$EXTERNALSYM CTL_CONTEXT}
+ TCtlContext = CTL_CONTEXT;
+ PCtlContext = PCTL_CONTEXT;
+
+ PCCTL_CONTEXT = PCTL_CONTEXT;
+ {$EXTERNALSYM PCCTL_CONTEXT}
+ PPCCTL_CONTEXT = ^PCCTL_CONTEXT;
+ {$EXTERNALSYM PPCCTL_CONTEXT}
+
+//+-------------------------------------------------------------------------
+// Certificate, CRL and CTL property IDs
+//
+// See CertSetCertificateContextProperty or CertGetCertificateContextProperty
+// for usage information.
+//--------------------------------------------------------------------------
+
+const
+ CERT_KEY_PROV_HANDLE_PROP_ID = 1;
+ {$EXTERNALSYM CERT_KEY_PROV_HANDLE_PROP_ID}
+ CERT_KEY_PROV_INFO_PROP_ID = 2;
+ {$EXTERNALSYM CERT_KEY_PROV_INFO_PROP_ID}
+ CERT_SHA1_HASH_PROP_ID = 3;
+ {$EXTERNALSYM CERT_SHA1_HASH_PROP_ID}
+ CERT_MD5_HASH_PROP_ID = 4;
+ {$EXTERNALSYM CERT_MD5_HASH_PROP_ID}
+ CERT_HASH_PROP_ID = CERT_SHA1_HASH_PROP_ID;
+ {$EXTERNALSYM CERT_HASH_PROP_ID}
+ CERT_KEY_CONTEXT_PROP_ID = 5;
+ {$EXTERNALSYM CERT_KEY_CONTEXT_PROP_ID}
+ CERT_KEY_SPEC_PROP_ID = 6;
+ {$EXTERNALSYM CERT_KEY_SPEC_PROP_ID}
+ CERT_IE30_RESERVED_PROP_ID = 7;
+ {$EXTERNALSYM CERT_IE30_RESERVED_PROP_ID}
+ CERT_PUBKEY_HASH_RESERVED_PROP_ID = 8;
+ {$EXTERNALSYM CERT_PUBKEY_HASH_RESERVED_PROP_ID}
+ CERT_ENHKEY_USAGE_PROP_ID = 9;
+ {$EXTERNALSYM CERT_ENHKEY_USAGE_PROP_ID}
+ CERT_CTL_USAGE_PROP_ID = CERT_ENHKEY_USAGE_PROP_ID;
+ {$EXTERNALSYM CERT_CTL_USAGE_PROP_ID}
+ CERT_NEXT_UPDATE_LOCATION_PROP_ID = 10;
+ {$EXTERNALSYM CERT_NEXT_UPDATE_LOCATION_PROP_ID}
+ CERT_FRIENDLY_NAME_PROP_ID = 11;
+ {$EXTERNALSYM CERT_FRIENDLY_NAME_PROP_ID}
+ CERT_PVK_FILE_PROP_ID = 12;
+ {$EXTERNALSYM CERT_PVK_FILE_PROP_ID}
+ CERT_DESCRIPTION_PROP_ID = 13;
+ {$EXTERNALSYM CERT_DESCRIPTION_PROP_ID}
+ CERT_ACCESS_STATE_PROP_ID = 14;
+ {$EXTERNALSYM CERT_ACCESS_STATE_PROP_ID}
+ CERT_SIGNATURE_HASH_PROP_ID = 15;
+ {$EXTERNALSYM CERT_SIGNATURE_HASH_PROP_ID}
+ CERT_SMART_CARD_DATA_PROP_ID = 16;
+ {$EXTERNALSYM CERT_SMART_CARD_DATA_PROP_ID}
+ CERT_EFS_PROP_ID = 17;
+ {$EXTERNALSYM CERT_EFS_PROP_ID}
+ CERT_FORTEZZA_DATA_PROP_ID = 18;
+ {$EXTERNALSYM CERT_FORTEZZA_DATA_PROP_ID}
+ CERT_ARCHIVED_PROP_ID = 19;
+ {$EXTERNALSYM CERT_ARCHIVED_PROP_ID}
+ CERT_KEY_IDENTIFIER_PROP_ID = 20;
+ {$EXTERNALSYM CERT_KEY_IDENTIFIER_PROP_ID}
+ CERT_AUTO_ENROLL_PROP_ID = 21;
+ {$EXTERNALSYM CERT_AUTO_ENROLL_PROP_ID}
+ CERT_PUBKEY_ALG_PARA_PROP_ID = 22;
+ {$EXTERNALSYM CERT_PUBKEY_ALG_PARA_PROP_ID}
+
+ CERT_FIRST_RESERVED_PROP_ID = 23;
+ {$EXTERNALSYM CERT_FIRST_RESERVED_PROP_ID}
+
+// Note, 32 - 35 are reserved for the CERT, CRL, CTL and KeyId file element IDs.
+
+ CERT_LAST_RESERVED_PROP_ID = $00007FFF;
+ {$EXTERNALSYM CERT_LAST_RESERVED_PROP_ID}
+ CERT_FIRST_USER_PROP_ID = $00008000;
+ {$EXTERNALSYM CERT_FIRST_USER_PROP_ID}
+ CERT_LAST_USER_PROP_ID = $0000FFFF;
+ {$EXTERNALSYM CERT_LAST_USER_PROP_ID}
+
+function IS_CERT_HASH_PROP_ID(X: DWORD): Boolean;
+{$EXTERNALSYM IS_CERT_HASH_PROP_ID}
+
+//+-------------------------------------------------------------------------
+// Access State flags returned by CERT_ACCESS_STATE_PROP_ID. Note,
+// CERT_ACCESS_PROP_ID is read only.
+//--------------------------------------------------------------------------
+
+// Set if context property writes are persisted. For instance, not set for
+// memory store contexts. Set for registry based stores opened as read or write.
+// Not set for registry based stores opened as read only.
+
+const
+ CERT_ACCESS_STATE_WRITE_PERSIST_FLAG = $1;
+ {$EXTERNALSYM CERT_ACCESS_STATE_WRITE_PERSIST_FLAG}
+
+// Set if context resides in a SYSTEM or SYSTEM_REGISTRY store.
+
+ CERT_ACCESS_STATE_SYSTEM_STORE_FLAG = $2;
+ {$EXTERNALSYM CERT_ACCESS_STATE_SYSTEM_STORE_FLAG}
+
+//+-------------------------------------------------------------------------
+// Cryptographic Key Provider Information
+//
+// CRYPT_KEY_PROV_INFO defines the CERT_KEY_PROV_INFO_PROP_ID's pvData.
+//
+// The CRYPT_KEY_PROV_INFO fields are passed to CryptAcquireContext
+// to get a HCRYPTPROV handle. The optional CRYPT_KEY_PROV_PARAM fields are
+// passed to CryptSetProvParam to further initialize the provider.
+//
+// The dwKeySpec field identifies the private key to use from the container
+// For example, AT_KEYEXCHANGE or AT_SIGNATURE.
+//--------------------------------------------------------------------------
+
+type
+ PCRYPT_KEY_PROV_PARAM = ^CRYPT_KEY_PROV_PARAM;
+ {$EXTERNALSYM PCRYPT_KEY_PROV_PARAM}
+ _CRYPT_KEY_PROV_PARAM = record
+ dwParam: DWORD;
+ pbData: LPBYTE;
+ cbData: DWORD;
+ dwFlags: DWORD;
+ end;
+ {$EXTERNALSYM _CRYPT_KEY_PROV_PARAM}
+ CRYPT_KEY_PROV_PARAM = _CRYPT_KEY_PROV_PARAM;
+ {$EXTERNALSYM CRYPT_KEY_PROV_PARAM}
+ TCryptKeyProvParam = CRYPT_KEY_PROV_PARAM;
+ PCryptKeyProvParam = PCRYPT_KEY_PROV_PARAM;
+
+ PCRYPT_KEY_PROV_INFO = ^CRYPT_KEY_PROV_INFO;
+ {$EXTERNALSYM PCRYPT_KEY_PROV_INFO}
+ _CRYPT_KEY_PROV_INFO = record
+ pwszContainerName: LPWSTR;
+ pwszProvName: LPWSTR;
+ dwProvType: DWORD;
+ dwFlags: DWORD;
+ cProvParam: DWORD;
+ rgProvParam: PCRYPT_KEY_PROV_PARAM;
+ dwKeySpec: DWORD;
+ end;
+ {$EXTERNALSYM _CRYPT_KEY_PROV_INFO}
+ CRYPT_KEY_PROV_INFO = _CRYPT_KEY_PROV_INFO;
+ {$EXTERNALSYM CRYPT_KEY_PROV_INFO}
+ TCryptKeyProvInfo = CRYPT_KEY_PROV_INFO;
+ PCryptKeyProvInfo = PCRYPT_KEY_PROV_INFO;
+
+//+-------------------------------------------------------------------------
+// The following flag should be set in the above dwFlags to enable
+// a CertSetCertificateContextProperty(CERT_KEY_CONTEXT_PROP_ID) after a
+// CryptAcquireContext is done in the Sign or Decrypt Message functions.
+//
+// The following define must not collide with any of the
+// CryptAcquireContext dwFlag defines.
+//--------------------------------------------------------------------------
+
+const
+ CERT_SET_KEY_PROV_HANDLE_PROP_ID = $00000001;
+ {$EXTERNALSYM CERT_SET_KEY_PROV_HANDLE_PROP_ID}
+ CERT_SET_KEY_CONTEXT_PROP_ID = $00000001;
+ {$EXTERNALSYM CERT_SET_KEY_CONTEXT_PROP_ID}
+
+//+-------------------------------------------------------------------------
+// Certificate Key Context
+//
+// CERT_KEY_CONTEXT defines the CERT_KEY_CONTEXT_PROP_ID's pvData.
+//--------------------------------------------------------------------------
+
+type
+ PCERT_KEY_CONTEXT = ^CERT_KEY_CONTEXT;
+ {$EXTERNALSYM PCERT_KEY_CONTEXT}
+ _CERT_KEY_CONTEXT = record
+ cbSize: DWORD; // sizeof(CERT_KEY_CONTEXT)
+ hCryptProv: HCRYPTPROV;
+ dwKeySpec: DWORD;
+ end;
+ {$EXTERNALSYM _CERT_KEY_CONTEXT}
+ CERT_KEY_CONTEXT = _CERT_KEY_CONTEXT;
+ {$EXTERNALSYM CERT_KEY_CONTEXT}
+ TCertKeyContext = CERT_KEY_CONTEXT;
+ PCertKeyContext = PCERT_KEY_CONTEXT;
+
+//+-------------------------------------------------------------------------
+// Certificate Store Provider Types
+//--------------------------------------------------------------------------
+
+const
+ CERT_STORE_PROV_MSG = LPCSTR(1);
+ {$EXTERNALSYM CERT_STORE_PROV_MSG}
+ CERT_STORE_PROV_MEMORY = LPCSTR(2);
+ {$EXTERNALSYM CERT_STORE_PROV_MEMORY}
+ CERT_STORE_PROV_FILE = LPCSTR(3);
+ {$EXTERNALSYM CERT_STORE_PROV_FILE}
+ CERT_STORE_PROV_REG = LPCSTR(4);
+ {$EXTERNALSYM CERT_STORE_PROV_REG}
+
+ CERT_STORE_PROV_PKCS7 = LPCSTR(5);
+ {$EXTERNALSYM CERT_STORE_PROV_PKCS7}
+ CERT_STORE_PROV_SERIALIZED = LPCSTR(6);
+ {$EXTERNALSYM CERT_STORE_PROV_SERIALIZED}
+ CERT_STORE_PROV_FILENAME_A = LPCSTR(7);
+ {$EXTERNALSYM CERT_STORE_PROV_FILENAME_A}
+ CERT_STORE_PROV_FILENAME_W = LPCSTR(8);
+ {$EXTERNALSYM CERT_STORE_PROV_FILENAME_W}
+ CERT_STORE_PROV_FILENAME = CERT_STORE_PROV_FILENAME_W;
+ {$EXTERNALSYM CERT_STORE_PROV_FILENAME}
+ CERT_STORE_PROV_SYSTEM_A = LPCSTR(9);
+ {$EXTERNALSYM CERT_STORE_PROV_SYSTEM_A}
+ CERT_STORE_PROV_SYSTEM_W = LPCSTR(10);
+ {$EXTERNALSYM CERT_STORE_PROV_SYSTEM_W}
+ CERT_STORE_PROV_SYSTEM = CERT_STORE_PROV_SYSTEM_W;
+ {$EXTERNALSYM CERT_STORE_PROV_SYSTEM}
+
+ CERT_STORE_PROV_COLLECTION = LPCSTR(11);
+ {$EXTERNALSYM CERT_STORE_PROV_COLLECTION}
+ CERT_STORE_PROV_SYSTEM_REGISTRY_A = LPCSTR(12);
+ {$EXTERNALSYM CERT_STORE_PROV_SYSTEM_REGISTRY_A}
+ CERT_STORE_PROV_SYSTEM_REGISTRY_W = LPCSTR(13);
+ {$EXTERNALSYM CERT_STORE_PROV_SYSTEM_REGISTRY_W}
+ CERT_STORE_PROV_SYSTEM_REGISTRY = CERT_STORE_PROV_SYSTEM_REGISTRY_W;
+ {$EXTERNALSYM CERT_STORE_PROV_SYSTEM_REGISTRY}
+ CERT_STORE_PROV_PHYSICAL_W = LPCSTR(14);
+ {$EXTERNALSYM CERT_STORE_PROV_PHYSICAL_W}
+ CERT_STORE_PROV_PHYSICAL = CERT_STORE_PROV_PHYSICAL_W;
+ {$EXTERNALSYM CERT_STORE_PROV_PHYSICAL}
+ CERT_STORE_PROV_SMART_CARD_W = LPCSTR(15);
+ {$EXTERNALSYM CERT_STORE_PROV_SMART_CARD_W}
+ CERT_STORE_PROV_SMART_CARD = CERT_STORE_PROV_SMART_CARD_W;
+ {$EXTERNALSYM CERT_STORE_PROV_SMART_CARD}
+ CERT_STORE_PROV_LDAP_W = LPCSTR(16);
+ {$EXTERNALSYM CERT_STORE_PROV_LDAP_W}
+ CERT_STORE_PROV_LDAP = CERT_STORE_PROV_LDAP_W;
+ {$EXTERNALSYM CERT_STORE_PROV_LDAP}
+
+ sz_CERT_STORE_PROV_MEMORY = 'Memory';
+ {$EXTERNALSYM sz_CERT_STORE_PROV_MEMORY}
+ sz_CERT_STORE_PROV_FILENAME_W = 'File';
+ {$EXTERNALSYM sz_CERT_STORE_PROV_FILENAME_W}
+ sz_CERT_STORE_PROV_FILENAME = sz_CERT_STORE_PROV_FILENAME_W;
+ {$EXTERNALSYM sz_CERT_STORE_PROV_FILENAME}
+ sz_CERT_STORE_PROV_SYSTEM_W = 'System';
+ {$EXTERNALSYM sz_CERT_STORE_PROV_SYSTEM_W}
+ sz_CERT_STORE_PROV_SYSTEM = sz_CERT_STORE_PROV_SYSTEM_W;
+ {$EXTERNALSYM sz_CERT_STORE_PROV_SYSTEM}
+ sz_CERT_STORE_PROV_PKCS7 = 'PKCS7';
+ {$EXTERNALSYM sz_CERT_STORE_PROV_PKCS7}
+ sz_CERT_STORE_PROV_SERIALIZED = 'Serialized';
+ {$EXTERNALSYM sz_CERT_STORE_PROV_SERIALIZED}
+
+ sz_CERT_STORE_PROV_COLLECTION = 'Collection';
+ {$EXTERNALSYM sz_CERT_STORE_PROV_COLLECTION}
+ sz_CERT_STORE_PROV_SYSTEM_REGISTRY_W = 'SystemRegistry';
+ {$EXTERNALSYM sz_CERT_STORE_PROV_SYSTEM_REGISTRY_W}
+ sz_CERT_STORE_PROV_SYSTEM_REGISTRY = sz_CERT_STORE_PROV_SYSTEM_REGISTRY_W;
+ {$EXTERNALSYM sz_CERT_STORE_PROV_SYSTEM_REGISTRY}
+ sz_CERT_STORE_PROV_PHYSICAL_W = 'Physical';
+ {$EXTERNALSYM sz_CERT_STORE_PROV_PHYSICAL_W}
+ sz_CERT_STORE_PROV_PHYSICAL = sz_CERT_STORE_PROV_PHYSICAL_W;
+ {$EXTERNALSYM sz_CERT_STORE_PROV_PHYSICAL}
+ sz_CERT_STORE_PROV_SMART_CARD_W = 'SmartCard';
+ {$EXTERNALSYM sz_CERT_STORE_PROV_SMART_CARD_W}
+ sz_CERT_STORE_PROV_SMART_CARD = sz_CERT_STORE_PROV_SMART_CARD_W;
+ {$EXTERNALSYM sz_CERT_STORE_PROV_SMART_CARD}
+ sz_CERT_STORE_PROV_LDAP_W = 'Ldap';
+ {$EXTERNALSYM sz_CERT_STORE_PROV_LDAP_W}
+ sz_CERT_STORE_PROV_LDAP = sz_CERT_STORE_PROV_LDAP_W;
+ {$EXTERNALSYM sz_CERT_STORE_PROV_LDAP}
+
+//+-------------------------------------------------------------------------
+// Certificate Store verify/results flags
+//--------------------------------------------------------------------------
+
+ CERT_STORE_SIGNATURE_FLAG = $00000001;
+ {$EXTERNALSYM CERT_STORE_SIGNATURE_FLAG}
+ CERT_STORE_TIME_VALIDITY_FLAG = $00000002;
+ {$EXTERNALSYM CERT_STORE_TIME_VALIDITY_FLAG}
+ CERT_STORE_REVOCATION_FLAG = $00000004;
+ {$EXTERNALSYM CERT_STORE_REVOCATION_FLAG}
+ CERT_STORE_NO_CRL_FLAG = $00010000;
+ {$EXTERNALSYM CERT_STORE_NO_CRL_FLAG}
+ CERT_STORE_NO_ISSUER_FLAG = $00020000;
+ {$EXTERNALSYM CERT_STORE_NO_ISSUER_FLAG}
+
+//+-------------------------------------------------------------------------
+// Certificate Store open/property flags
+//--------------------------------------------------------------------------
+
+ CERT_STORE_NO_CRYPT_RELEASE_FLAG = $00000001;
+ {$EXTERNALSYM CERT_STORE_NO_CRYPT_RELEASE_FLAG}
+ CERT_STORE_SET_LOCALIZED_NAME_FLAG = $00000002;
+ {$EXTERNALSYM CERT_STORE_SET_LOCALIZED_NAME_FLAG}
+ CERT_STORE_DEFER_CLOSE_UNTIL_LAST_FREE_FLAG = $00000004;
+ {$EXTERNALSYM CERT_STORE_DEFER_CLOSE_UNTIL_LAST_FREE_FLAG}
+ CERT_STORE_DELETE_FLAG = $00000010;
+ {$EXTERNALSYM CERT_STORE_DELETE_FLAG}
+ CERT_STORE_MANIFOLD_FLAG = $00000100;
+ {$EXTERNALSYM CERT_STORE_MANIFOLD_FLAG}
+ CERT_STORE_ENUM_ARCHIVED_FLAG = $00000200;
+ {$EXTERNALSYM CERT_STORE_ENUM_ARCHIVED_FLAG}
+ CERT_STORE_UPDATE_KEYID_FLAG = $00000400;
+ {$EXTERNALSYM CERT_STORE_UPDATE_KEYID_FLAG}
+ CERT_STORE_READONLY_FLAG = $00008000;
+ {$EXTERNALSYM CERT_STORE_READONLY_FLAG}
+ CERT_STORE_OPEN_EXISTING_FLAG = $00004000;
+ {$EXTERNALSYM CERT_STORE_OPEN_EXISTING_FLAG}
+ CERT_STORE_CREATE_NEW_FLAG = $00002000;
+ {$EXTERNALSYM CERT_STORE_CREATE_NEW_FLAG}
+ CERT_STORE_MAXIMUM_ALLOWED_FLAG = $00001000;
+ {$EXTERNALSYM CERT_STORE_MAXIMUM_ALLOWED_FLAG}
+
+//+-------------------------------------------------------------------------
+// Certificate Store Provider flags are in the HiWord (0xFFFF0000)
+//--------------------------------------------------------------------------
+
+//+-------------------------------------------------------------------------
+// Certificate System Store Flag Values
+//--------------------------------------------------------------------------
+// Includes flags and location
+
+ CERT_SYSTEM_STORE_MASK = DWORD($FFFF0000);
+ {$EXTERNALSYM CERT_SYSTEM_STORE_MASK}
+
+// Set if pvPara points to a CERT_SYSTEM_STORE_RELOCATE_PARA structure
+
+ CERT_SYSTEM_STORE_RELOCATE_FLAG = DWORD($80000000);
+ {$EXTERNALSYM CERT_SYSTEM_STORE_RELOCATE_FLAG}
+
+type
+ PCERT_SYSTEM_STORE_RELOCATE_PARA = ^CERT_SYSTEM_STORE_RELOCATE_PARA;
+ {$EXTERNALSYM PCERT_SYSTEM_STORE_RELOCATE_PARA}
+ _CERT_SYSTEM_STORE_RELOCATE_PARA = record
+ Union1: record
+ case Integer of
+ 0: (hKeyBase: HKEY);
+ 1: (pvBase: Pointer);
+ end;
+ case Integer of
+ 0: (pvSystemStore: Pointer);
+ 1: (pszSystemStore: LPCSTR);
+ 2: (pwszSystemStore: LPCWSTR);
+ end;
+ {$EXTERNALSYM _CERT_SYSTEM_STORE_RELOCATE_PARA}
+ CERT_SYSTEM_STORE_RELOCATE_PARA = _CERT_SYSTEM_STORE_RELOCATE_PARA;
+ {$EXTERNALSYM CERT_SYSTEM_STORE_RELOCATE_PARA}
+ TCertSystemStoreRelocatePara = CERT_SYSTEM_STORE_RELOCATE_PARA;
+ PCertSystemStoreRelocatePara = PCERT_SYSTEM_STORE_RELOCATE_PARA;
+
+// By default, when the CurrentUser "Root" store is opened, any SystemRegistry
+// roots not also on the protected root list are deleted from the cache before
+// CertOpenStore() returns. Set the following flag to return all the roots
+// in the SystemRegistry without checking the protected root list.
+
+const
+ CERT_SYSTEM_STORE_UNPROTECTED_FLAG = $40000000;
+ {$EXTERNALSYM CERT_SYSTEM_STORE_UNPROTECTED_FLAG}
+
+// Location of the system store:
+
+ CERT_SYSTEM_STORE_LOCATION_MASK = $00FF0000;
+ {$EXTERNALSYM CERT_SYSTEM_STORE_LOCATION_MASK}
+ CERT_SYSTEM_STORE_LOCATION_SHIFT = 16;
+ {$EXTERNALSYM CERT_SYSTEM_STORE_LOCATION_SHIFT}
+
+// Registry: HKEY_CURRENT_USER or HKEY_LOCAL_MACHINE
+
+ CERT_SYSTEM_STORE_CURRENT_USER_ID = 1;
+ {$EXTERNALSYM CERT_SYSTEM_STORE_CURRENT_USER_ID}
+ CERT_SYSTEM_STORE_LOCAL_MACHINE_ID = 2;
+ {$EXTERNALSYM CERT_SYSTEM_STORE_LOCAL_MACHINE_ID}
+
+// Registry: HKEY_LOCAL_MACHINE\Software\Microsoft\Cryptography\Services
+
+ CERT_SYSTEM_STORE_CURRENT_SERVICE_ID = 4;
+ {$EXTERNALSYM CERT_SYSTEM_STORE_CURRENT_SERVICE_ID}
+ CERT_SYSTEM_STORE_SERVICES_ID = 5;
+ {$EXTERNALSYM CERT_SYSTEM_STORE_SERVICES_ID}
+
+// Registry: HKEY_USERS
+
+ CERT_SYSTEM_STORE_USERS_ID = 6;
+ {$EXTERNALSYM CERT_SYSTEM_STORE_USERS_ID}
+
+// Registry: HKEY_CURRENT_USER\Software\Policies\Microsoft\SystemCertificates
+
+ CERT_SYSTEM_STORE_CURRENT_USER_GROUP_POLICY_ID = 7;
+ {$EXTERNALSYM CERT_SYSTEM_STORE_CURRENT_USER_GROUP_POLICY_ID}
+
+// Registry: HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\SystemCertificates
+
+ CERT_SYSTEM_STORE_LOCAL_MACHINE_GROUP_POLICY_ID = 8;
+ {$EXTERNALSYM CERT_SYSTEM_STORE_LOCAL_MACHINE_GROUP_POLICY_ID}
+
+// Registry: HKEY_LOCAL_MACHINE\Software\Microsoft\EnterpriseCertificates
+
+ CERT_SYSTEM_STORE_LOCAL_MACHINE_ENTERPRISE_ID = 9;
+ {$EXTERNALSYM CERT_SYSTEM_STORE_LOCAL_MACHINE_ENTERPRISE_ID}
+
+ CERT_SYSTEM_STORE_CURRENT_USER = CERT_SYSTEM_STORE_CURRENT_USER_ID shl CERT_SYSTEM_STORE_LOCATION_SHIFT;
+ {$EXTERNALSYM CERT_SYSTEM_STORE_CURRENT_USER}
+ CERT_SYSTEM_STORE_LOCAL_MACHINE = CERT_SYSTEM_STORE_LOCAL_MACHINE_ID shl CERT_SYSTEM_STORE_LOCATION_SHIFT;
+ {$EXTERNALSYM CERT_SYSTEM_STORE_LOCAL_MACHINE}
+ CERT_SYSTEM_STORE_CURRENT_SERVICE = CERT_SYSTEM_STORE_CURRENT_SERVICE_ID shl CERT_SYSTEM_STORE_LOCATION_SHIFT;
+ {$EXTERNALSYM CERT_SYSTEM_STORE_CURRENT_SERVICE}
+ CERT_SYSTEM_STORE_SERVICES = CERT_SYSTEM_STORE_SERVICES_ID shl CERT_SYSTEM_STORE_LOCATION_SHIFT;
+ {$EXTERNALSYM CERT_SYSTEM_STORE_SERVICES}
+ CERT_SYSTEM_STORE_USERS = CERT_SYSTEM_STORE_USERS_ID shl CERT_SYSTEM_STORE_LOCATION_SHIFT;
+ {$EXTERNALSYM CERT_SYSTEM_STORE_USERS}
+
+ CERT_SYSTEM_STORE_CURRENT_USER_GROUP_POLICY = CERT_SYSTEM_STORE_CURRENT_USER_GROUP_POLICY_ID shl CERT_SYSTEM_STORE_LOCATION_SHIFT;
+ {$EXTERNALSYM CERT_SYSTEM_STORE_CURRENT_USER_GROUP_POLICY}
+ CERT_SYSTEM_STORE_LOCAL_MACHINE_GROUP_POLICY = CERT_SYSTEM_STORE_LOCAL_MACHINE_GROUP_POLICY_ID shl CERT_SYSTEM_STORE_LOCATION_SHIFT;
+ {$EXTERNALSYM CERT_SYSTEM_STORE_LOCAL_MACHINE_GROUP_POLICY}
+
+ CERT_SYSTEM_STORE_LOCAL_MACHINE_ENTERPRISE = CERT_SYSTEM_STORE_LOCAL_MACHINE_ENTERPRISE_ID shl CERT_SYSTEM_STORE_LOCATION_SHIFT;
+ {$EXTERNALSYM CERT_SYSTEM_STORE_LOCAL_MACHINE_ENTERPRISE}
+
+//+-------------------------------------------------------------------------
+// Group Policy Store Defines
+//--------------------------------------------------------------------------
+// Registry path to the Group Policy system stores
+
+ CERT_GROUP_POLICY_SYSTEM_STORE_REGPATH = 'Software\Policies\Microsoft\SystemCertificates';
+ {$EXTERNALSYM CERT_GROUP_POLICY_SYSTEM_STORE_REGPATH}
+
+//+-------------------------------------------------------------------------
+// EFS Defines
+//--------------------------------------------------------------------------
+// Registry path to the EFS EFSBlob SubKey - Value type is REG_BINARY
+
+ CERT_EFSBLOB_REGPATH = CERT_GROUP_POLICY_SYSTEM_STORE_REGPATH + '\EFS';
+ {$EXTERNALSYM CERT_EFSBLOB_REGPATH}
+ CERT_EFSBLOB_VALUE_NAME = 'EFSBlob';
+ {$EXTERNALSYM CERT_EFSBLOB_VALUE_NAME}
+
+//+-------------------------------------------------------------------------
+// Protected Root Defines
+//--------------------------------------------------------------------------
+// Registry path to the Protected Roots Flags SubKey
+
+ CERT_PROT_ROOT_FLAGS_REGPATH = CERT_GROUP_POLICY_SYSTEM_STORE_REGPATH + '\Root\ProtectedRoots';
+ {$EXTERNALSYM CERT_PROT_ROOT_FLAGS_REGPATH}
+ CERT_PROT_ROOT_FLAGS_VALUE_NAME = 'Flags';
+ {$EXTERNALSYM CERT_PROT_ROOT_FLAGS_VALUE_NAME}
+
+// Set the following flag to inhibit the opening of the CurrentUser's
+// .Default physical store when opening the CurrentUser's "Root" system store.
+// The .Default physical store open's the CurrentUser SystemRegistry "Root"
+// store.
+
+ CERT_PROT_ROOT_DISABLE_CURRENT_USER_FLAG = $1;
+ {$EXTERNALSYM CERT_PROT_ROOT_DISABLE_CURRENT_USER_FLAG}
+
+// Set the following flag to inhibit the adding of roots from the
+// CurrentUser SystemRegistry "Root" store to the protected root list
+// when the "Root" store is initially protected.
+
+ CERT_PROT_ROOT_INHIBIT_ADD_AT_INIT_FLAG = $2;
+ {$EXTERNALSYM CERT_PROT_ROOT_INHIBIT_ADD_AT_INIT_FLAG}
+
+// Set the following flag to inhibit the purging of protected roots from the
+// CurrentUser SystemRegistry "Root" store that are
+// also in the LocalMachine SystemRegistry "Root" store. Note, when not
+// disabled, the purging is done silently without UI.
+
+ CERT_PROT_ROOT_INHIBIT_PURGE_LM_FLAG = $4;
+ {$EXTERNALSYM CERT_PROT_ROOT_INHIBIT_PURGE_LM_FLAG}
+
+// Set the following flag to only open the .LocalMachineGroupPolicy
+// physical store when opening the CurrentUser's "Root" system store.
+
+ CERT_PROT_ROOT_ONLY_LM_GPT_FLAG = $8;
+ {$EXTERNALSYM CERT_PROT_ROOT_ONLY_LM_GPT_FLAG}
+
+//+-------------------------------------------------------------------------
+// Certificate Registry Store Flag Values (CERT_STORE_REG)
+//--------------------------------------------------------------------------
+
+// Set this flag if the HKEY passed in pvPara points to a remote computer
+// registry key.
+
+ CERT_REGISTRY_STORE_REMOTE_FLAG = $10000;
+ {$EXTERNALSYM CERT_REGISTRY_STORE_REMOTE_FLAG}
+
+// Set this flag if the contexts are to be persisted as a single serialized
+// store in the registry. Mainly used for stores downloaded from the GPT.
+// Such as the CurrentUserGroupPolicy or LocalMachineGroupPolicy stores.
+
+ CERT_REGISTRY_STORE_SERIALIZED_FLAG = $20000;
+ {$EXTERNALSYM CERT_REGISTRY_STORE_SERIALIZED_FLAG}
+
+// The following flags are for internal use. When set, the
+// pvPara parameter passed to CertOpenStore is a pointer to the following
+// data structure and not the HKEY. The above CERT_REGISTRY_STORE_REMOTE_FLAG
+// is also set if hKeyBase was obtained via RegConnectRegistry().
+
+ CERT_REGISTRY_STORE_CLIENT_GPT_FLAG = DWORD($80000000);
+ {$EXTERNALSYM CERT_REGISTRY_STORE_CLIENT_GPT_FLAG}
+ CERT_REGISTRY_STORE_LM_GPT_FLAG = $01000000;
+ {$EXTERNALSYM CERT_REGISTRY_STORE_LM_GPT_FLAG}
+
+type
+ PCERT_REGISTRY_STORE_CLIENT_GPT_PARA = ^CERT_REGISTRY_STORE_CLIENT_GPT_PARA;
+ {$EXTERNALSYM PCERT_REGISTRY_STORE_CLIENT_GPT_PARA}
+ _CERT_REGISTRY_STORE_CLIENT_GPT_PARA = record
+ hKeyBase: HKEY;
+ pwszRegPath: LPWSTR;
+ end;
+ {$EXTERNALSYM _CERT_REGISTRY_STORE_CLIENT_GPT_PARA}
+ CERT_REGISTRY_STORE_CLIENT_GPT_PARA = _CERT_REGISTRY_STORE_CLIENT_GPT_PARA;
+ {$EXTERNALSYM CERT_REGISTRY_STORE_CLIENT_GPT_PARA}
+ TCertRegistryStoreClientGptPara = CERT_REGISTRY_STORE_CLIENT_GPT_PARA;
+ PCertRegistryStoreClientGptPara = PCERT_REGISTRY_STORE_CLIENT_GPT_PARA;
+
+// The following flag is for internal use. When set, the contexts are
+// persisted into roaming files instead of the registry. Such as, the
+// CurrentUser "My" store. When this flag is set, the following data structure
+// is passed to CertOpenStore instead of HKEY.
+
+const
+ CERT_REGISTRY_STORE_ROAMING_FLAG = $40000;
+ {$EXTERNALSYM CERT_REGISTRY_STORE_ROAMING_FLAG}
+
+// hKey may be NULL or non-NULL. When non-NULL, existing contexts are
+// moved from the registry to roaming files.
+
+type
+ PCERT_REGISTRY_STORE_ROAMING_PARA = ^CERT_REGISTRY_STORE_ROAMING_PARA;
+ {$EXTERNALSYM PCERT_REGISTRY_STORE_ROAMING_PARA}
+ _CERT_REGISTRY_STORE_ROAMING_PARA = record
+ hKey: HKEY;
+ pwszStoreDirectory: LPWSTR;
+ end;
+ {$EXTERNALSYM _CERT_REGISTRY_STORE_ROAMING_PARA}
+ CERT_REGISTRY_STORE_ROAMING_PARA = _CERT_REGISTRY_STORE_ROAMING_PARA;
+ {$EXTERNALSYM CERT_REGISTRY_STORE_ROAMING_PARA}
+ TCertRegistryStoreRoamingPara = CERT_REGISTRY_STORE_ROAMING_PARA;
+ PCertRegistryStoreRoamingPara = PCERT_REGISTRY_STORE_ROAMING_PARA;
+
+// The following flag is for internal use. When set, the "My" DWORD value
+// at HKLM\Software\Microsoft\Cryptography\IEDirtyFlags is set to 0x1
+// whenever a certificate is added to the registry store.
+
+const
+ CERT_REGISTRY_STORE_MY_IE_DIRTY_FLAG = $80000;
+ {$EXTERNALSYM CERT_REGISTRY_STORE_MY_IE_DIRTY_FLAG}
+
+// Registry path to the subkey containing the "My" DWORD value to be set
+
+ CERT_IE_DIRTY_FLAGS_REGPATH = 'Software\Microsoft\Cryptography\IEDirtyFlags';
+ {$EXTERNALSYM CERT_IE_DIRTY_FLAGS_REGPATH}
+
+//+-------------------------------------------------------------------------
+// Certificate File Store Flag Values for the providers:
+// CERT_STORE_PROV_FILE
+// CERT_STORE_PROV_FILENAME
+// CERT_STORE_PROV_FILENAME_A
+// CERT_STORE_PROV_FILENAME_W
+// sz_CERT_STORE_PROV_FILENAME_W
+//--------------------------------------------------------------------------
+
+// Set this flag if any store changes are to be committed to the file.
+// The changes are committed at CertCloseStore or by calling
+// CertControlStore(CERT_STORE_CTRL_COMMIT).
+//
+// The open fails with E_INVALIDARG if both CERT_FILE_STORE_COMMIT_ENABLE_FLAG
+// and CERT_STORE_READONLY_FLAG are set in dwFlags.
+//
+// For the FILENAME providers: if the file contains an X509 encoded
+// certificate, the open fails with ERROR_ACCESS_DENIED.
+//
+// For the FILENAME providers: if CERT_STORE_CREATE_NEW_FLAG is set, the
+// CreateFile uses CREATE_NEW. If CERT_STORE_OPEN_EXISTING is set, uses
+// OPEN_EXISTING. Otherwise, defaults to OPEN_ALWAYS.
+//
+// For the FILENAME providers: the file is committed as either a PKCS7 or
+// serialized store depending on the type read at open. However, if the
+// file is empty then, if the filename has either a ".p7c" or ".spc"
+// extension its committed as a PKCS7. Otherwise, its committed as a
+// serialized store.
+//
+// For CERT_STORE_PROV_FILE, the file handle is duplicated. Its always
+// committed as a serialized store.
+//
+
+ CERT_FILE_STORE_COMMIT_ENABLE_FLAG = $10000;
+ {$EXTERNALSYM CERT_FILE_STORE_COMMIT_ENABLE_FLAG}
+
+//+-------------------------------------------------------------------------
+// Open the cert store using the specified store provider.
+//
+// If CERT_STORE_DELETE_FLAG is set, then, the store is deleted. NULL is
+// returned for both success and failure. However, GetLastError() returns 0
+// for success and nonzero for failure.
+//
+// If CERT_STORE_SET_LOCALIZED_NAME_FLAG is set, then, if supported, the
+// provider sets the store's CERT_STORE_LOCALIZED_NAME_PROP_ID property.
+// The store's localized name can be retrieved by calling
+// CertSetStoreProperty(dwPropID = CERT_STORE_LOCALIZED_NAME_PROP_ID).
+// This flag is supported by the following providers (and their sz_
+// equivalent):
+// CERT_STORE_PROV_FILENAME_A
+// CERT_STORE_PROV_FILENAME_W
+// CERT_STORE_PROV_SYSTEM_A
+// CERT_STORE_PROV_SYSTEM_W
+// CERT_STORE_PROV_SYSTEM_REGISTRY_A
+// CERT_STORE_PROV_SYSTEM_REGISTRY_W
+// CERT_STORE_PROV_PHYSICAL_W
+//
+// If CERT_STORE_DEFER_CLOSE_UNTIL_LAST_FREE_FLAG is set, then, the
+// closing of the store's provider is deferred until all certificate,
+// CRL and CTL contexts obtained from the store are freed. Also,
+// if a non NULL HCRYPTPROV was passed, then, it will continue to be used.
+// By default, the store's provider is closed on the final CertCloseStore.
+// If this flag isn't set, then, any property changes made to previously
+// duplicated contexts after the final CertCloseStore will not be persisted.
+// By setting this flag, property changes made
+// after the CertCloseStore will be persisted. Note, setting this flag
+// causes extra overhead in doing context duplicates and frees.
+// If CertCloseStore is called with CERT_CLOSE_STORE_FORCE_FLAG, then,
+// the CERT_STORE_DEFER_CLOSE_UNTIL_LAST_FREE_FLAG flag is ignored.
+//
+// CERT_STORE_MANIFOLD_FLAG can be set to check for certificates having the
+// manifold extension and archive the "older" certificates with the same
+// manifold extension value. A certificate is archived by setting the
+// CERT_ARCHIVED_PROP_ID.
+//
+// By default, contexts having the CERT_ARCHIVED_PROP_ID, are skipped
+// during enumeration. CERT_STORE_ENUM_ARCHIVED_FLAG can be set to include
+// archived contexts when enumerating. Note, contexts having the
+// CERT_ARCHIVED_PROP_ID are still found for explicit finds, such as,
+// finding a context with a specific hash or finding a certificate having
+// a specific issuer and serial number.
+//
+// CERT_STORE_UPDATE_KEYID_FLAG can be set to also update the Key Identifier's
+// CERT_KEY_PROV_INFO_PROP_ID property whenever a certificate's
+// CERT_KEY_IDENTIFIER_PROP_ID or CERT_KEY_PROV_INFO_PROP_ID property is set
+// and the other property already exists. If the Key Identifier's
+// CERT_KEY_PROV_INFO_PROP_ID already exists, it isn't updated. Any
+// errors encountered are silently ignored.
+//
+// By default, this flag is implicitly set for the "My\.Default" CurrentUser
+// and LocalMachine physical stores.
+//
+// CERT_STORE_READONLY_FLAG can be set to open the store as read only.
+// Otherwise, the store is opened as read/write.
+//
+// CERT_STORE_OPEN_EXISTING_FLAG can be set to only open an existing
+// store. CERT_STORE_CREATE_NEW_FLAG can be set to create a new store and
+// fail if the store already exists. Otherwise, the default is to open
+// an existing store or create a new store if it doesn't already exist.
+//
+// hCryptProv specifies the crypto provider to use to create the hash
+// properties or verify the signature of a subject certificate or CRL.
+// The store doesn't need to use a private
+// key. If the CERT_STORE_NO_CRYPT_RELEASE_FLAG isn't set, hCryptProv is
+// CryptReleaseContext'ed on the final CertCloseStore.
+//
+// Note, if the open fails, hCryptProv is released if it would have been
+// released when the store was closed.
+//
+// If hCryptProv is zero, then, the default provider and container for the
+// PROV_RSA_FULL provider type is CryptAcquireContext'ed with
+// CRYPT_VERIFYCONTEXT access. The CryptAcquireContext is deferred until
+// the first create hash or verify signature. In addition, once acquired,
+// the default provider isn't released until process exit when crypt32.dll
+// is unloaded. The acquired default provider is shared across all stores
+// and threads.
+//
+// After initializing the store's data structures and optionally acquiring a
+// default crypt provider, CertOpenStore calls CryptGetOIDFunctionAddress to
+// get the address of the CRYPT_OID_OPEN_STORE_PROV_FUNC specified by
+// lpszStoreProvider. Since a store can contain certificates with different
+// encoding types, CryptGetOIDFunctionAddress is called with dwEncodingType
+// set to 0 and not the dwEncodingType passed to CertOpenStore.
+// PFN_CERT_DLL_OPEN_STORE_FUNC specifies the signature of the provider's
+// open function. This provider open function is called to load the
+// store's certificates and CRLs. Optionally, the provider may return an
+// array of functions called before a certificate or CRL is added or deleted
+// or has a property that is set.
+//
+// Use of the dwEncodingType parameter is provider dependent. The type
+// definition for pvPara also depends on the provider.
+//
+// Store providers are installed or registered via
+// CryptInstallOIDFunctionAddress or CryptRegisterOIDFunction, where,
+// dwEncodingType is 0 and pszFuncName is CRYPT_OID_OPEN_STORE_PROV_FUNC.
+//
+// Here's a list of the predefined provider types (implemented in crypt32.dll):
+//
+// CERT_STORE_PROV_MSG:
+// Gets the certificates and CRLs from the specified cryptographic message.
+// dwEncodingType contains the message and certificate encoding types.
+// The message's handle is passed in pvPara. Given,
+// HCRYPTMSG hCryptMsg; pvPara = (const void *) hCryptMsg;
+//
+// CERT_STORE_PROV_MEMORY
+// sz_CERT_STORE_PROV_MEMORY:
+// Opens a store without any initial certificates or CRLs. pvPara
+// isn't used.
+//
+// CERT_STORE_PROV_FILE:
+// Reads the certificates and CRLs from the specified file. The file's
+// handle is passed in pvPara. Given,
+// HANDLE hFile; pvPara = (const void *) hFile;
+//
+// For a successful open, the file pointer is advanced past
+// the certificates and CRLs and their properties read from the file.
+// Note, only expects a serialized store and not a file containing
+// either a PKCS #7 signed message or a single encoded certificate.
+//
+// The hFile isn't closed.
+//
+// CERT_STORE_PROV_REG:
+// Reads the certificates and CRLs from the registry. The registry's
+// key handle is passed in pvPara. Given,
+// HKEY hKey; pvPara = (const void *) hKey;
+//
+// The input hKey isn't closed by the provider. Before returning, the
+// provider opens it own copy of the hKey.
+//
+// If CERT_STORE_READONLY_FLAG is set, then, the registry subkeys are
+// RegOpenKey'ed with KEY_READ_ACCESS. Otherwise, the registry subkeys
+// are RegCreateKey'ed with KEY_ALL_ACCESS.
+//
+// This provider returns the array of functions for reading, writing,
+// deleting and property setting certificates and CRLs.
+// Any changes to the opened store are immediately pushed through to
+// the registry. However, if CERT_STORE_READONLY_FLAG is set, then,
+// writing, deleting or property setting results in a
+// SetLastError(E_ACCESSDENIED).
+//
+// Note, all the certificates and CRLs are read from the registry
+// when the store is opened. The opened store serves as a write through
+// cache.
+//
+// If CERT_REGISTRY_STORE_SERIALIZED_FLAG is set, then, the
+// contexts are persisted as a single serialized store subkey in the
+// registry.
+//
+// CERT_STORE_PROV_PKCS7:
+// sz_CERT_STORE_PROV_PKCS7:
+// Gets the certificates and CRLs from the encoded PKCS #7 signed message.
+// dwEncodingType specifies the message and certificate encoding types.
+// The pointer to the encoded message's blob is passed in pvPara. Given,
+// CRYPT_DATA_BLOB EncodedMsg; pvPara = (const void *) &EncodedMsg;
+//
+// Note, also supports the IE3.0 special version of a
+// PKCS #7 signed message referred to as a "SPC" formatted message.
+//
+// CERT_STORE_PROV_SERIALIZED:
+// sz_CERT_STORE_PROV_SERIALIZED:
+// Gets the certificates and CRLs from memory containing a serialized
+// store. The pointer to the serialized memory blob is passed in pvPara.
+// Given,
+// CRYPT_DATA_BLOB Serialized; pvPara = (const void *) &Serialized;
+//
+// CERT_STORE_PROV_FILENAME_A:
+// CERT_STORE_PROV_FILENAME_W:
+// CERT_STORE_PROV_FILENAME:
+// sz_CERT_STORE_PROV_FILENAME_W:
+// sz_CERT_STORE_PROV_FILENAME:
+// Opens the file and first attempts to read as a serialized store. Then,
+// as a PKCS #7 signed message. Finally, as a single encoded certificate.
+// The filename is passed in pvPara. The filename is UNICODE for the
+// "_W" provider and ASCII for the "_A" provider. For "_W": given,
+// LPCWSTR pwszFilename; pvPara = (const void *) pwszFilename;
+// For "_A": given,
+// LPCSTR pszFilename; pvPara = (const void *) pszFilename;
+//
+// Note, the default (without "_A" or "_W") is unicode.
+//
+// Note, also supports the reading of the IE3.0 special version of a
+// PKCS #7 signed message file referred to as a "SPC" formatted file.
+//
+// CERT_STORE_PROV_SYSTEM_A:
+// CERT_STORE_PROV_SYSTEM_W:
+// CERT_STORE_PROV_SYSTEM:
+// sz_CERT_STORE_PROV_SYSTEM_W:
+// sz_CERT_STORE_PROV_SYSTEM:
+// Opens the specified logical "System" store. The upper word of the
+// dwFlags parameter is used to specify the location of the system store.
+//
+// A "System" store is a collection consisting of one or more "Physical"
+// stores. A "Physical" store is registered via the
+// CertRegisterPhysicalStore API. Each of the registered physical stores
+// is CertStoreOpen'ed and added to the collection via
+// CertAddStoreToCollection.
+//
+// The CERT_SYSTEM_STORE_CURRENT_USER, CERT_SYSTEM_STORE_LOCAL_MACHINE,
+// CERT_SYSTEM_STORE_CURRENT_SERVICE, CERT_SYSTEM_STORE_SERVICES,
+// CERT_SYSTEM_STORE_USERS, CERT_SYSTEM_STORE_CURRENT_USER_GROUP_POLICY,
+// CERT_SYSTEM_STORE_LOCAL_MACHINE_GROUP_POLICY and
+// CERT_SYSTEM_STORE_LOCAL_MACHINE_ENTERPRSE
+// system stores by default have a "SystemRegistry" store that is
+// opened and added to the collection.
+//
+// The system store name is passed in pvPara. The name is UNICODE for the
+// "_W" provider and ASCII for the "_A" provider. For "_W": given,
+// LPCWSTR pwszSystemName; pvPara = (const void *) pwszSystemName;
+// For "_A": given,
+// LPCSTR pszSystemName; pvPara = (const void *) pszSystemName;
+//
+// Note, the default (without "_A" or "_W") is UNICODE.
+//
+// The system store name can't contain any backslashes.
+//
+// If CERT_SYSTEM_STORE_RELOCATE_FLAG is set in dwFlags, pvPara
+// points to a CERT_SYSTEM_STORE_RELOCATE_PARA data structure instead
+// of pointing to a null terminated UNICODE or ASCII string.
+// Sibling physical stores are also opened as relocated using
+// pvPara's hKeyBase.
+//
+// The CERT_SYSTEM_STORE_SERVICES or CERT_SYSTEM_STORE_USERS system
+// store name must be prefixed with the ServiceName or UserName.
+// For example, "ServiceName\Trust".
+//
+// Stores on remote computers can be accessed for the
+// CERT_SYSTEM_STORE_LOCAL_MACHINE, CERT_SYSTEM_STORE_SERVICES,
+// CERT_SYSTEM_STORE_USERS, CERT_SYSTEM_STORE_LOCAL_MACHINE_GROUP_POLICY
+// or CERT_SYSTEM_STORE_LOCAL_MACHINE_ENTERPRISE
+// locations by prepending the computer name. For example, a remote
+// local machine store is accessed via "\\ComputerName\Trust" or
+// "ComputerName\Trust". A remote service store is accessed via
+// "\\ComputerName\ServiceName\Trust". The leading "\\" backslashes are
+// optional in the ComputerName.
+//
+// If CERT_STORE_READONLY_FLAG is set, then, the registry is
+// RegOpenKey'ed with KEY_READ_ACCESS. Otherwise, the registry is
+// RegCreateKey'ed with KEY_ALL_ACCESS.
+//
+// The "root" store is treated differently from the other system
+// stores. Before a certificate is added to or deleted from the "root"
+// store, a pop up message box is displayed. The certificate's subject,
+// issuer, serial number, time validity, sha1 and md5 thumbprints are
+// displayed. The user is given the option to do the add or delete.
+// If they don't allow the operation, LastError is set to E_ACCESSDENIED.
+//
+// CERT_STORE_PROV_SYSTEM_REGISTRY_A
+// CERT_STORE_PROV_SYSTEM_REGISTRY_W
+// CERT_STORE_PROV_SYSTEM_REGISTRY
+// sz_CERT_STORE_PROV_SYSTEM_REGISTRY_W
+// sz_CERT_STORE_PROV_SYSTEM_REGISTRY
+// Opens the "System" store's default "Physical" store residing in the
+// registry. The upper word of the dwFlags
+// parameter is used to specify the location of the system store.
+//
+// After opening the registry key associated with the system name,
+// the CERT_STORE_PROV_REG provider is called to complete the open.
+//
+// The system store name is passed in pvPara. The name is UNICODE for the
+// "_W" provider and ASCII for the "_A" provider. For "_W": given,
+// LPCWSTR pwszSystemName; pvPara = (const void *) pwszSystemName;
+// For "_A": given,
+// LPCSTR pszSystemName; pvPara = (const void *) pszSystemName;
+//
+// Note, the default (without "_A" or "_W") is UNICODE.
+//
+// If CERT_SYSTEM_STORE_RELOCATE_FLAG is set in dwFlags, pvPara
+// points to a CERT_SYSTEM_STORE_RELOCATE_PARA data structure instead
+// of pointing to a null terminated UNICODE or ASCII string.
+//
+// See above for details on prepending a ServiceName and/or ComputerName
+// to the store name.
+//
+// If CERT_STORE_READONLY_FLAG is set, then, the registry is
+// RegOpenKey'ed with KEY_READ_ACCESS. Otherwise, the registry is
+// RegCreateKey'ed with KEY_ALL_ACCESS.
+//
+// The "root" store is treated differently from the other system
+// stores. Before a certificate is added to or deleted from the "root"
+// store, a pop up message box is displayed. The certificate's subject,
+// issuer, serial number, time validity, sha1 and md5 thumbprints are
+// displayed. The user is given the option to do the add or delete.
+// If they don't allow the operation, LastError is set to E_ACCESSDENIED.
+//
+// CERT_STORE_PROV_PHYSICAL_W
+// CERT_STORE_PROV_PHYSICAL
+// sz_CERT_STORE_PROV_PHYSICAL_W
+// sz_CERT_STORE_PROV_PHYSICAL
+// Opens the specified "Physical" store in the "System" store.
+//
+// Both the system store and physical names are passed in pvPara. The
+// names are separated with an intervening "\". For example,
+// "Root\.Default". The string is UNICODE.
+//
+// The system and physical store names can't contain any backslashes.
+//
+// If CERT_SYSTEM_STORE_RELOCATE_FLAG is set in dwFlags, pvPara
+// points to a CERT_SYSTEM_STORE_RELOCATE_PARA data structure instead
+// of pointing to a null terminated UNICODE string.
+// The specified physical store is opened as relocated using pvPara's
+// hKeyBase.
+//
+// For CERT_SYSTEM_STORE_SERVICES or CERT_SYSTEM_STORE_USERS,
+// the system and physical store names
+// must be prefixed with the ServiceName or UserName. For example,
+// "ServiceName\Root\.Default".
+//
+// Physical stores on remote computers can be accessed for the
+// CERT_SYSTEM_STORE_LOCAL_MACHINE, CERT_SYSTEM_STORE_SERVICES,
+// CERT_SYSTEM_STORE_USERS, CERT_SYSTEM_STORE_LOCAL_MACHINE_GROUP_POLICY
+// or CERT_SYSTEM_STORE_LOCAL_MACHINE_ENTERPRISE
+// locations by prepending the computer name. For example, a remote
+// local machine store is accessed via "\\ComputerName\Root\.Default"
+// or "ComputerName\Root\.Default". A remote service store is
+// accessed via "\\ComputerName\ServiceName\Root\.Default". The
+// leading "\\" backslashes are optional in the ComputerName.
+//
+// CERT_STORE_PROV_COLLECTION
+// sz_CERT_STORE_PROV_COLLECTION
+// Opens a store that is a collection of other stores. Stores are
+// added or removed to/from the collection via the CertAddStoreToCollection
+// and CertRemoveStoreFromCollection APIs.
+//
+// CERT_STORE_PROV_SMART_CARD_W
+// CERT_STORE_PROV_SMART_CARD
+// sz_CERT_STORE_PROV_SMART_CARD_W
+// sz_CERT_STORE_PROV_SMART_CARD
+// Opens a store instantiated over a particular smart card storage. pvPara
+// identifies where on the card the store is located and is of the
+// following format:
+//
+// Card Name\Provider Name\Provider Type[\Container Name]
+//
+// Container Name is optional and if NOT specified the Card Name is used
+// as the Container Name. Future versions of the provider will support
+// instantiating the store over the entire card in which case just
+// Card Name ( or id ) will be sufficient.
+//
+// Here's a list of the predefined provider types (implemented in
+// cryptnet.dll):
+//
+// CERT_STORE_PROV_LDAP_W
+// CERT_STORE_PROV_LDAP
+// sz_CERT_STORE_PROV_LDAP_W
+// sz_CERT_STORE_PROV_LDAP
+// Opens a store over the results of the query specified by and LDAP
+// URL which is passed in via pvPara. In order to do writes to the
+// store the URL must specify a BASE query, no filter and a single
+// attribute.
+//
+//--------------------------------------------------------------------------
+
+function CertOpenStore(lpszStoreProvider: LPCSTR; dwEncodingType: DWORD;
+ hCryptProv: HCRYPTPROV; dwFlags: DWORD; pvPara: Pointer): HCERTSTORE; stdcall;
+{$EXTERNALSYM CertOpenStore}
+
+//+-------------------------------------------------------------------------
+// OID Installable Certificate Store Provider Data Structures
+//--------------------------------------------------------------------------
+
+// Handle returned by the store provider when opened.
+
+type
+ HCERTSTOREPROV = Pointer;
+ {$EXTERNALSYM HCERTSTOREPROV}
+
+// Store Provider OID function's pszFuncName.
+
+const
+ CRYPT_OID_OPEN_STORE_PROV_FUNC = 'CertDllOpenStoreProv';
+ {$EXTERNALSYM CRYPT_OID_OPEN_STORE_PROV_FUNC}
+
+// Note, the Store Provider OID function's dwEncodingType is always 0.
+
+// The following information is returned by the provider when opened. Its
+// zeroed with cbSize set before the provider is called. If the provider
+// doesn't need to be called again after the open it doesn't need to
+// make any updates to the CERT_STORE_PROV_INFO.
+
+type
+ PCERT_STORE_PROV_INFO = ^CERT_STORE_PROV_INFO;
+ {$EXTERNALSYM PCERT_STORE_PROV_INFO}
+ _CERT_STORE_PROV_INFO = record
+ cbSize: DWORD;
+ cStoreProvFunc: DWORD;
+ rgpvStoreProvFunc: Pointer;
+ hStoreProv: HCERTSTOREPROV;
+ dwStoreProvFlags: DWORD;
+ hStoreProvFuncAddr2: HCRYPTOIDFUNCADDR;
+ end;
+ {$EXTERNALSYM _CERT_STORE_PROV_INFO}
+ CERT_STORE_PROV_INFO = _CERT_STORE_PROV_INFO;
+ {$EXTERNALSYM CERT_STORE_PROV_INFO}
+ TCertStoreProvInfo = CERT_STORE_PROV_INFO;
+ PCertStoreProvInfo = PCERT_STORE_PROV_INFO;
+
+// Definition of the store provider's open function.
+//
+// *pStoreProvInfo has been zeroed before the call.
+//
+// Note, pStoreProvInfo->cStoreProvFunc should be set last. Once set,
+// all subsequent store calls, such as CertAddSerializedElementToStore will
+// call the appropriate provider callback function.
+
+type
+ PFN_CERT_DLL_OPEN_STORE_PROV_FUNC = function(
+ lpszStoreProvider: LPCSTR;
+ dwEncodingType: DWORD;
+ hCryptProv: HCRYPTPROV;
+ dwFlags: DWORD;
+ pvPara: Pointer;
+ hCertStore: HCERTSTORE;
+ var pStoreProvInfo: PCERT_STORE_PROV_INFO): BOOL; stdcall;
+ {$EXTERNALSYM PFN_CERT_DLL_OPEN_STORE_PROV_FUNC}
+ PFnCertDllOpenStoreProvFunc = PFN_CERT_DLL_OPEN_STORE_PROV_FUNC;
+
+// The open callback sets the following flag, if it maintains its
+// contexts externally and not in the cached store.
+
+const
+ CERT_STORE_PROV_EXTERNAL_FLAG = $1;
+ {$EXTERNALSYM CERT_STORE_PROV_EXTERNAL_FLAG}
+
+// The open callback sets the following flag for a successful delete.
+// When set, the close callback isn't called.
+
+ CERT_STORE_PROV_DELETED_FLAG = $2;
+ {$EXTERNALSYM CERT_STORE_PROV_DELETED_FLAG}
+
+// The open callback sets the following flag if it doesn't persist store
+// changes.
+
+ CERT_STORE_PROV_NO_PERSIST_FLAG = $4;
+ {$EXTERNALSYM CERT_STORE_PROV_NO_PERSIST_FLAG}
+
+// The open callback sets the following flag if the contexts are persisted
+// to a system store.
+
+ CERT_STORE_PROV_SYSTEM_STORE_FLAG = $8;
+ {$EXTERNALSYM CERT_STORE_PROV_SYSTEM_STORE_FLAG}
+
+// Indices into the store provider's array of callback functions.
+//
+// The provider can implement any subset of the following functions. It
+// sets pStoreProvInfo->cStoreProvFunc to the last index + 1 and any
+// preceding not implemented functions to NULL.
+
+ CERT_STORE_PROV_CLOSE_FUNC = 0;
+ {$EXTERNALSYM CERT_STORE_PROV_CLOSE_FUNC}
+ CERT_STORE_PROV_READ_CERT_FUNC = 1;
+ {$EXTERNALSYM CERT_STORE_PROV_READ_CERT_FUNC}
+ CERT_STORE_PROV_WRITE_CERT_FUNC = 2;
+ {$EXTERNALSYM CERT_STORE_PROV_WRITE_CERT_FUNC}
+ CERT_STORE_PROV_DELETE_CERT_FUNC = 3;
+ {$EXTERNALSYM CERT_STORE_PROV_DELETE_CERT_FUNC}
+ CERT_STORE_PROV_SET_CERT_PROPERTY_FUNC = 4;
+ {$EXTERNALSYM CERT_STORE_PROV_SET_CERT_PROPERTY_FUNC}
+ CERT_STORE_PROV_READ_CRL_FUNC = 5;
+ {$EXTERNALSYM CERT_STORE_PROV_READ_CRL_FUNC}
+ CERT_STORE_PROV_WRITE_CRL_FUNC = 6;
+ {$EXTERNALSYM CERT_STORE_PROV_WRITE_CRL_FUNC}
+ CERT_STORE_PROV_DELETE_CRL_FUNC = 7;
+ {$EXTERNALSYM CERT_STORE_PROV_DELETE_CRL_FUNC}
+ CERT_STORE_PROV_SET_CRL_PROPERTY_FUNC = 8;
+ {$EXTERNALSYM CERT_STORE_PROV_SET_CRL_PROPERTY_FUNC}
+ CERT_STORE_PROV_READ_CTL_FUNC = 9;
+ {$EXTERNALSYM CERT_STORE_PROV_READ_CTL_FUNC}
+ CERT_STORE_PROV_WRITE_CTL_FUNC = 10;
+ {$EXTERNALSYM CERT_STORE_PROV_WRITE_CTL_FUNC}
+ CERT_STORE_PROV_DELETE_CTL_FUNC = 11;
+ {$EXTERNALSYM CERT_STORE_PROV_DELETE_CTL_FUNC}
+ CERT_STORE_PROV_SET_CTL_PROPERTY_FUNC = 12;
+ {$EXTERNALSYM CERT_STORE_PROV_SET_CTL_PROPERTY_FUNC}
+ CERT_STORE_PROV_CONTROL_FUNC = 13;
+ {$EXTERNALSYM CERT_STORE_PROV_CONTROL_FUNC}
+ CERT_STORE_PROV_FIND_CERT_FUNC = 14;
+ {$EXTERNALSYM CERT_STORE_PROV_FIND_CERT_FUNC}
+ CERT_STORE_PROV_FREE_FIND_CERT_FUNC = 15;
+ {$EXTERNALSYM CERT_STORE_PROV_FREE_FIND_CERT_FUNC}
+ CERT_STORE_PROV_GET_CERT_PROPERTY_FUNC = 16;
+ {$EXTERNALSYM CERT_STORE_PROV_GET_CERT_PROPERTY_FUNC}
+ CERT_STORE_PROV_FIND_CRL_FUNC = 17;
+ {$EXTERNALSYM CERT_STORE_PROV_FIND_CRL_FUNC}
+ CERT_STORE_PROV_FREE_FIND_CRL_FUNC = 18;
+ {$EXTERNALSYM CERT_STORE_PROV_FREE_FIND_CRL_FUNC}
+ CERT_STORE_PROV_GET_CRL_PROPERTY_FUNC = 19;
+ {$EXTERNALSYM CERT_STORE_PROV_GET_CRL_PROPERTY_FUNC}
+ CERT_STORE_PROV_FIND_CTL_FUNC = 20;
+ {$EXTERNALSYM CERT_STORE_PROV_FIND_CTL_FUNC}
+ CERT_STORE_PROV_FREE_FIND_CTL_FUNC = 21;
+ {$EXTERNALSYM CERT_STORE_PROV_FREE_FIND_CTL_FUNC}
+ CERT_STORE_PROV_GET_CTL_PROPERTY_FUNC = 22;
+ {$EXTERNALSYM CERT_STORE_PROV_GET_CTL_PROPERTY_FUNC}
+
+// Called by CertCloseStore when the store's reference count is
+// decremented to 0.
+
+type
+ PFN_CERT_STORE_PROV_CLOSE = procedure(hStoreProv: HCERTSTOREPROV; dwFlags: DWORD); stdcall;
+ {$EXTERNALSYM PFN_CERT_STORE_PROV_CLOSE}
+ PFnCertStoreProvClose = PFN_CERT_STORE_PROV_CLOSE;
+
+// Currently not called directly by the store APIs. However, may be exported
+// to support other providers based on it.
+//
+// Reads the provider's copy of the certificate context. If it exists,
+// creates a new certificate context.
+
+ PFN_CERT_STORE_PROV_READ_CERT = function(hStoreProv: HCERTSTOREPROV;
+ pStoreCertContext: PCCERT_CONTEXT; dwFlags: DWORD;
+ var ppProvCertContext: PCCERT_CONTEXT): BOOL; stdcall;
+ {$EXTERNALSYM PFN_CERT_STORE_PROV_READ_CERT}
+ PfnCertStoreProvReadCert = PFN_CERT_STORE_PROV_READ_CERT;
+
+const
+ CERT_STORE_PROV_WRITE_ADD_FLAG = $1;
+ {$EXTERNALSYM CERT_STORE_PROV_WRITE_ADD_FLAG}
+
+// Called by CertAddEncodedCertificateToStore,
+// CertAddCertificateContextToStore or CertAddSerializedElementToStore before
+// adding to the store. The CERT_STORE_PROV_WRITE_ADD_FLAG is set. In
+// addition to the encoded certificate, the added pCertContext might also
+// have properties.
+//
+// Returns TRUE if its OK to update the the store.
+
+type
+ PFN_CERT_STORE_PROV_WRITE_CERT = function(hStoreProv: HCERTSTOREPROV;
+ pCertContext: PCCERT_CONTEXT; dwFlags: DWORD): BOOL; stdcall;
+ {$EXTERNALSYM PFN_CERT_STORE_PROV_WRITE_CERT}
+ PfnCertStoreProvWriteCert = PFN_CERT_STORE_PROV_WRITE_CERT;
+
+// Called by CertDeleteCertificateFromStore before deleting from the
+// store.
+//
+// Returns TRUE if its OK to delete from the store.
+
+ PFN_CERT_STORE_PROV_DELETE_CERT = function(hStoreProv: HCERTSTOREPROV;
+ pCertContext: PCCERT_CONTEXT; dwFlags: DWORD): BOOL; stdcall;
+ {$EXTERNALSYM PFN_CERT_STORE_PROV_DELETE_CERT}
+ PfnCertStoreProvDeleteCert = PFN_CERT_STORE_PROV_DELETE_CERT;
+
+// Called by CertSetCertificateContextProperty before setting the
+// certificate's property. Also called by CertGetCertificateContextProperty,
+// when getting a hash property that needs to be created and then persisted
+// via the set.
+//
+// Upon input, the property hasn't been set for the pCertContext parameter.
+//
+// Returns TRUE if its OK to set the property.
+
+type
+ PFN_CERT_STORE_PROV_SET_CERT_PROPERTY = function(hStoreProv: HCERTSTOREPROV;
+ pCertContext: PCCERT_CONTEXT; dwPropId: DWORD; dwFlags: DWORD;
+ pvData: Pointer): BOOL; stdcall;
+ {$EXTERNALSYM PFN_CERT_STORE_PROV_SET_CERT_PROPERTY}
+ PfnCertStoreProvSetCertProperty = PFN_CERT_STORE_PROV_SET_CERT_PROPERTY;
+
+// Currently not called directly by the store APIs. However, may be exported
+// to support other providers based on it.
+//
+// Reads the provider's copy of the CRL context. If it exists,
+// creates a new CRL context.
+
+ PFN_CERT_STORE_PROV_READ_CRL = function(hStoreProv: HCERTSTOREPROV;
+ pStoreCrlContext: PCCRL_CONTEXT; dwFlags: DWORD;
+ var ppProvCrlContext: PCCRL_CONTEXT): BOOL; stdcall;
+ {$EXTERNALSYM PFN_CERT_STORE_PROV_READ_CRL}
+ PfnCertStoreProvReadCrl = PFN_CERT_STORE_PROV_READ_CRL;
+
+// Called by CertAddEncodedCRLToStore,
+// CertAddCRLContextToStore or CertAddSerializedElementToStore before
+// adding to the store. The CERT_STORE_PROV_WRITE_ADD_FLAG is set. In
+// addition to the encoded CRL, the added pCertContext might also
+// have properties.
+//
+// Returns TRUE if its OK to update the the store.
+
+ PFN_CERT_STORE_PROV_WRITE_CRL = function(hStoreProv: HCERTSTOREPROV;
+ pCrlContext: PCCRL_CONTEXT; dwFlags: DWORD): BOOL; stdcall;
+ {$EXTERNALSYM PFN_CERT_STORE_PROV_WRITE_CRL}
+ PfnCertStoreProvWriteCrl = PFN_CERT_STORE_PROV_WRITE_CRL;
+
+// Called by CertDeleteCRLFromStore before deleting from the store.
+//
+// Returns TRUE if its OK to delete from the store.
+
+ PFN_CERT_STORE_PROV_DELETE_CRL = function(hStoreProv: HCERTSTOREPROV;
+ pCrlContext: PCCRL_CONTEXT; dwFlags: DWORD): BOOL; stdcall;
+ {$EXTERNALSYM PFN_CERT_STORE_PROV_DELETE_CRL}
+ PfnCertStoreProvDeleteCrl = PFN_CERT_STORE_PROV_DELETE_CRL;
+
+// Called by CertSetCRLContextProperty before setting the
+// CRL's property. Also called by CertGetCRLContextProperty,
+// when getting a hash property that needs to be created and then persisted
+// via the set.
+//
+// Upon input, the property hasn't been set for the pCrlContext parameter.
+//
+// Returns TRUE if its OK to set the property.
+
+ PFN_CERT_STORE_PROV_SET_CRL_PROPERTY = function(hStoreProv: HCERTSTOREPROV;
+ pCrlContext: PCCRL_CONTEXT; dwPropId: DWORD; dwFlags: DWORD;
+ pvData: Pointer): BOOL; stdcall;
+ {$EXTERNALSYM PFN_CERT_STORE_PROV_SET_CRL_PROPERTY}
+ PfnCertStoreProvSetCrlProperty = PFN_CERT_STORE_PROV_SET_CRL_PROPERTY;
+
+// Currently not called directly by the store APIs. However, may be exported
+// to support other providers based on it.
+//
+// Reads the provider's copy of the CTL context. If it exists,
+// creates a new CTL context.
+
+ PFN_CERT_STORE_PROV_READ_CTL = function(hStoreProv: HCERTSTOREPROV;
+ pStoreCtlContext: PCCTL_CONTEXT; dwFlags: DWORD;
+ var ppProvCtlContext: PCCTL_CONTEXT): BOOL; stdcall;
+ {$EXTERNALSYM PFN_CERT_STORE_PROV_READ_CTL}
+ PfnCertStoreProvReadCtl = PFN_CERT_STORE_PROV_READ_CTL;
+
+// Called by CertAddEncodedCTLToStore,
+// CertAddCTLContextToStore or CertAddSerializedElementToStore before
+// adding to the store. The CERT_STORE_PROV_WRITE_ADD_FLAG is set. In
+// addition to the encoded CTL, the added pCertContext might also
+// have properties.
+//
+// Returns TRUE if its OK to update the the store.
+
+ PFN_CERT_STORE_PROV_WRITE_CTL = function(hStoreProv: HCERTSTOREPROV;
+ pCtlContext: PCCTL_CONTEXT; dwFlags: DWORD): BOOL; stdcall;
+ {$EXTERNALSYM PFN_CERT_STORE_PROV_WRITE_CTL}
+ PfnCertStoreProvWriteCtl = PFN_CERT_STORE_PROV_WRITE_CTL;
+
+// Called by CertDeleteCTLFromStore before deleting from the store.
+//
+// Returns TRUE if its OK to delete from the store.
+
+ PFN_CERT_STORE_PROV_DELETE_CTL = function(hStoreProv: HCERTSTOREPROV;
+ pCtlContext: PCCTL_CONTEXT; dwFlags: DWORD): BOOL; stdcall;
+ {$EXTERNALSYM PFN_CERT_STORE_PROV_DELETE_CTL}
+ PfnCertStoreProvDeleteCtl = PFN_CERT_STORE_PROV_DELETE_CTL;
+
+// Called by CertSetCTLContextProperty before setting the
+// CTL's property. Also called by CertGetCTLContextProperty,
+// when getting a hash property that needs to be created and then persisted
+// via the set.
+//
+// Upon input, the property hasn't been set for the pCtlContext parameter.
+//
+// Returns TRUE if its OK to set the property.
+
+ PFN_CERT_STORE_PROV_SET_CTL_PROPERTY = function(hStoreProv: HCERTSTOREPROV;
+ pCtlContext: PCCTL_CONTEXT; dwPropId, dwFlags: DWORD; pvData: Pointer): BOOL; stdcall;
+ {$EXTERNALSYM PFN_CERT_STORE_PROV_SET_CTL_PROPERTY}
+ PfnCertStoreProvSetCtlProperty = PFN_CERT_STORE_PROV_SET_CTL_PROPERTY;
+
+ PFN_CERT_STORE_PROV_CONTROL = function(hStoreProv: HCERTSTOREPROV;
+ dwFlags: DWORD; dwCtrlType: DWORD; pvCtrlPara: Pointer): BOOL; stdcall;
+ {$EXTERNALSYM PFN_CERT_STORE_PROV_CONTROL}
+ PfnCertStoreProvControl = PFN_CERT_STORE_PROV_CONTROL;
+
+ PCERT_STORE_PROV_FIND_INFO = ^CERT_STORE_PROV_FIND_INFO;
+ {$EXTERNALSYM PCERT_STORE_PROV_FIND_INFO}
+ _CERT_STORE_PROV_FIND_INFO = record
+ cbSize: DWORD;
+ dwMsgAndCertEncodingType: DWORD;
+ dwFindFlags: DWORD;
+ dwFindType: DWORD;
+ pvFindPara: Pointer;
+ end;
+ {$EXTERNALSYM _CERT_STORE_PROV_FIND_INFO}
+ CERT_STORE_PROV_FIND_INFO = _CERT_STORE_PROV_FIND_INFO;
+ {$EXTERNALSYM CERT_STORE_PROV_FIND_INFO}
+ TCertStoreProvFindInfo = CERT_STORE_PROV_FIND_INFO;
+ PCertStoreProvFindInfo = PCERT_STORE_PROV_FIND_INFO;
+
+ CCERT_STORE_PROV_FIND_INFO = CERT_STORE_PROV_FIND_INFO;
+ {$EXTERNALSYM CCERT_STORE_PROV_FIND_INFO}
+ PCCERT_STORE_PROV_FIND_INFO = PCERT_STORE_PROV_FIND_INFO;
+ {$EXTERNALSYM PCCERT_STORE_PROV_FIND_INFO}
+
+ PFN_CERT_STORE_PROV_FIND_CERT = function(hStoreProv: HCERTSTOREPROV;
+ pFindInfo: PCCERT_STORE_PROV_FIND_INFO; pPrevCertContext: PCCERT_CONTEXT;
+ dwFlags: DWORD; var ppvStoreProvFindInfo: Pointer;
+ var ppProvCertContext: PCCERT_CONTEXT): BOOL; stdcall;
+ {$EXTERNALSYM PFN_CERT_STORE_PROV_FIND_CERT}
+ PfnCertStoreProvFindCert = PFN_CERT_STORE_PROV_FIND_CERT;
+
+ PFN_CERT_STORE_PROV_FREE_FIND_CERT = function(hStoreProv: HCERTSTOREPROV;
+ pCertContext: PCCERT_CONTEXT; pvStoreProvFindInfo: Pointer; dwFlags: DWORD): BOOL; stdcall;
+ {$EXTERNALSYM PFN_CERT_STORE_PROV_FREE_FIND_CERT}
+ PfnCertStoreProvFreeFindCert = PFN_CERT_STORE_PROV_FREE_FIND_CERT;
+
+ PFN_CERT_STORE_PROV_GET_CERT_PROPERTY = function(hStoreProv: HCERTSTOREPROV;
+ pCertContext: PCCERT_CONTEXT; dwPropId: DWORD; dwFlags: DWORD; pvData: Pointer;
+ var pcbData: DWORD): BOOL; stdcall;
+ {$EXTERNALSYM PFN_CERT_STORE_PROV_GET_CERT_PROPERTY}
+ PfnCertStoreProvGetCertProperty = PFN_CERT_STORE_PROV_GET_CERT_PROPERTY;
+
+ PFN_CERT_STORE_PROV_FIND_CRL = function(hStoreProv: HCERTSTOREPROV;
+ pFindInfo: PCCERT_STORE_PROV_FIND_INFO; pPrevCrlContext: PCCRL_CONTEXT;
+ dwFlags: DWORD; var ppvStoreProvFindInfo: Pointer;
+ var ppProvCrlContext: PCCRL_CONTEXT): BOOL; stdcall;
+ {$EXTERNALSYM PFN_CERT_STORE_PROV_FIND_CRL}
+ PfnCertStoreProvFindCrl = PFN_CERT_STORE_PROV_FIND_CRL;
+
+ PFN_CERT_STORE_PROV_FREE_FIND_CRL = function(hStoreProv: HCERTSTOREPROV;
+ pCrlContext: PCCRL_CONTEXT; pvStoreProvFindInfo: Pointer; dwFlags: DWORD): BOOL; stdcall;
+ {$EXTERNALSYM PFN_CERT_STORE_PROV_FREE_FIND_CRL}
+ PfnCertStoreProvFreeFindCrl = PFN_CERT_STORE_PROV_FREE_FIND_CRL;
+
+ PFN_CERT_STORE_PROV_GET_CRL_PROPERTY = function(hStoreProv: HCERTSTOREPROV;
+ pCrlContext: PCCRL_CONTEXT; dwPropId: DWORD; dwFlags: DWORD; pvData: Pointer;
+ var pcbData: DWORD): BOOL; stdcall;
+ {$EXTERNALSYM PFN_CERT_STORE_PROV_GET_CRL_PROPERTY}
+ PfnCertStoreProvGetCrlProperty = PFN_CERT_STORE_PROV_GET_CRL_PROPERTY;
+
+ PFN_CERT_STORE_PROV_FIND_CTL = function(hStoreProv: HCERTSTOREPROV;
+ pFindInfo: PCCERT_STORE_PROV_FIND_INFO; pPrevCtlContext: PCCTL_CONTEXT;
+ dwFlags: DWORD; var ppvStoreProvFindInfo: Pointer;
+ var ppProvCtlContext: PCCTL_CONTEXT): BOOL; stdcall;
+ {$EXTERNALSYM PFN_CERT_STORE_PROV_FIND_CTL}
+ PfnCertStoreProvFindCtl = PFN_CERT_STORE_PROV_FIND_CTL;
+
+ PFN_CERT_STORE_PROV_FREE_FIND_CTL = function(hStoreProv: HCERTSTOREPROV;
+ pCtlContext: PCCTL_CONTEXT; pvStoreProvFindInfo: Pointer; dwFlags: DWORD): BOOL; stdcall;
+ {$EXTERNALSYM PFN_CERT_STORE_PROV_FREE_FIND_CTL}
+ PfnCertStoreProvFreeFindCtl = PFN_CERT_STORE_PROV_FREE_FIND_CTL;
+
+ PFN_CERT_STORE_PROV_GET_CTL_PROPERTY = function(hStoreProv: HCERTSTOREPROV;
+ pCtlContext: PCCTL_CONTEXT; dwPropId: DWORD; dwFlags: DWORD; pvData: Pointer;
+ var pcbData: DWORD): BOOL; stdcall;
+ {$EXTERNALSYM PFN_CERT_STORE_PROV_GET_CTL_PROPERTY}
+ PfnCertStoreProvGetCtlProperty = PFN_CERT_STORE_PROV_GET_CTL_PROPERTY;
+
+//+-------------------------------------------------------------------------
+// Duplicate a cert store handle
+//--------------------------------------------------------------------------
+
+function CertDuplicateStore(hCertStore: HCERTSTORE): HCERTSTORE; stdcall;
+{$EXTERNALSYM CertDuplicateStore}
+
+const
+ CERT_STORE_SAVE_AS_STORE = 1;
+ {$EXTERNALSYM CERT_STORE_SAVE_AS_STORE}
+ CERT_STORE_SAVE_AS_PKCS7 = 2;
+ {$EXTERNALSYM CERT_STORE_SAVE_AS_PKCS7}
+
+ CERT_STORE_SAVE_TO_FILE = 1;
+ {$EXTERNALSYM CERT_STORE_SAVE_TO_FILE}
+ CERT_STORE_SAVE_TO_MEMORY = 2;
+ {$EXTERNALSYM CERT_STORE_SAVE_TO_MEMORY}
+ CERT_STORE_SAVE_TO_FILENAME_A = 3;
+ {$EXTERNALSYM CERT_STORE_SAVE_TO_FILENAME_A}
+ CERT_STORE_SAVE_TO_FILENAME_W = 4;
+ {$EXTERNALSYM CERT_STORE_SAVE_TO_FILENAME_W}
+ CERT_STORE_SAVE_TO_FILENAME = CERT_STORE_SAVE_TO_FILENAME_W;
+ {$EXTERNALSYM CERT_STORE_SAVE_TO_FILENAME}
+
+//+-------------------------------------------------------------------------
+// Save the cert store. Extended version with lots of options.
+//
+// According to the dwSaveAs parameter, the store can be saved as a
+// serialized store (CERT_STORE_SAVE_AS_STORE) containing properties in
+// addition to encoded certificates, CRLs and CTLs or the store can be saved
+// as a PKCS #7 signed message (CERT_STORE_SAVE_AS_PKCS7) which doesn't
+// include the properties or CTLs.
+//
+// Note, the CERT_KEY_CONTEXT_PROP_ID property (and its
+// CERT_KEY_PROV_HANDLE_PROP_ID or CERT_KEY_SPEC_PROP_ID) isn't saved into
+// a serialized store.
+//
+// For CERT_STORE_SAVE_AS_PKCS7, the dwEncodingType specifies the message
+// encoding type. The dwEncodingType parameter isn't used for
+// CERT_STORE_SAVE_AS_STORE.
+//
+// The dwFlags parameter currently isn't used and should be set to 0.
+//
+// The dwSaveTo and pvSaveToPara parameters specify where to save the
+// store as follows:
+// CERT_STORE_SAVE_TO_FILE:
+// Saves to the specified file. The file's handle is passed in
+// pvSaveToPara. Given,
+// HANDLE hFile; pvSaveToPara = (void *) hFile;
+//
+// For a successful save, the file pointer is positioned after the
+// last write.
+//
+// CERT_STORE_SAVE_TO_MEMORY:
+// Saves to the specified memory blob. The pointer to
+// the memory blob is passed in pvSaveToPara. Given,
+// CRYPT_DATA_BLOB SaveBlob; pvSaveToPara = (void *) &SaveBlob;
+// Upon entry, the SaveBlob's pbData and cbData need to be initialized.
+// Upon return, cbData is updated with the actual length.
+// For a length only calculation, pbData should be set to NULL. If
+// pbData is non-NULL and cbData isn't large enough, FALSE is returned
+// with a last error of ERRROR_MORE_DATA.
+//
+// CERT_STORE_SAVE_TO_FILENAME_A:
+// CERT_STORE_SAVE_TO_FILENAME_W:
+// CERT_STORE_SAVE_TO_FILENAME:
+// Opens the file and saves to it. The filename is passed in pvSaveToPara.
+// The filename is UNICODE for the "_W" option and ASCII for the "_A"
+// option. For "_W": given,
+// LPCWSTR pwszFilename; pvSaveToPara = (void *) pwszFilename;
+// For "_A": given,
+// LPCSTR pszFilename; pvSaveToPara = (void *) pszFilename;
+//
+// Note, the default (without "_A" or "_W") is UNICODE.
+//
+//--------------------------------------------------------------------------
+
+function CertSaveStore(hCertStore: HCERTSTORE; dwEncodingType, dwSaveAs: DWORD;
+ dwSaveTo: DWORD; pvSaveToPara: Pointer; dwFlags: DWORD): BOOL; stdcall;
+{$EXTERNALSYM CertSaveStore}
+
+//+-------------------------------------------------------------------------
+// Certificate Store close flags
+//--------------------------------------------------------------------------
+
+const
+ CERT_CLOSE_STORE_FORCE_FLAG = $00000001;
+ {$EXTERNALSYM CERT_CLOSE_STORE_FORCE_FLAG}
+ CERT_CLOSE_STORE_CHECK_FLAG = $00000002;
+ {$EXTERNALSYM CERT_CLOSE_STORE_CHECK_FLAG}
+
+//+-------------------------------------------------------------------------
+// Close a cert store handle.
+//
+// There needs to be a corresponding close for each open and duplicate.
+//
+// Even on the final close, the cert store isn't freed until all of its
+// certificate and CRL contexts have also been freed.
+//
+// On the final close, the hCryptProv passed to CertStoreOpen is
+// CryptReleaseContext'ed.
+//
+// To force the closure of the store with all of its memory freed, set the
+// CERT_STORE_CLOSE_FORCE_FLAG. This flag should be set when the caller does
+// its own reference counting and wants everything to vanish.
+//
+// To check if all the store's certificates and CRLs have been freed and that
+// this is the last CertCloseStore, set the CERT_CLOSE_STORE_CHECK_FLAG. If
+// set and certs, CRLs or stores still need to be freed/closed, FALSE is
+// returned with LastError set to CRYPT_E_PENDING_CLOSE. Note, for FALSE,
+// the store is still closed. This is a diagnostic flag.
+//
+// LastError is preserved unless CERT_CLOSE_STORE_CHECK_FLAG is set and FALSE
+// is returned.
+//--------------------------------------------------------------------------
+
+function CertCloseStore(hCertStore: HCERTSTORE; dwFlags: DWORD): BOOL; stdcall;
+{$EXTERNALSYM CertCloseStore}
+
+//+-------------------------------------------------------------------------
+// Get the subject certificate context uniquely identified by its Issuer and
+// SerialNumber from the store.
+//
+// If the certificate isn't found, NULL is returned. Otherwise, a pointer to
+// a read only CERT_CONTEXT is returned. CERT_CONTEXT must be freed by calling
+// CertFreeCertificateContext. CertDuplicateCertificateContext can be called to make a
+// duplicate.
+//
+// The returned certificate might not be valid. Normally, it would be
+// verified when getting its issuer certificate (CertGetIssuerCertificateFromStore).
+//--------------------------------------------------------------------------
+
+function CertGetSubjectCertificateFromStore(hCertStore: HCERTSTORE;
+ dwCertEncodingType: DWORD; pCertId: PCERT_INFO): PCCERT_CONTEXT; stdcall;
+{$EXTERNALSYM CertGetSubjectCertificateFromStore}
+
+//+-------------------------------------------------------------------------
+// Enumerate the certificate contexts in the store.
+//
+// If a certificate isn't found, NULL is returned.
+// Otherwise, a pointer to a read only CERT_CONTEXT is returned. CERT_CONTEXT
+// must be freed by calling CertFreeCertificateContext or is freed when passed as the
+// pPrevCertContext on a subsequent call. CertDuplicateCertificateContext
+// can be called to make a duplicate.
+//
+// pPrevCertContext MUST BE NULL to enumerate the first
+// certificate in the store. Successive certificates are enumerated by setting
+// pPrevCertContext to the CERT_CONTEXT returned by a previous call.
+//
+// NOTE: a NON-NULL pPrevCertContext is always CertFreeCertificateContext'ed by
+// this function, even for an error.
+//--------------------------------------------------------------------------
+
+function CertEnumCertificatesInStore(hCertStore: HCERTSTORE;
+ pPrevCertContext: PCCERT_CONTEXT): PCCERT_CONTEXT; stdcall;
+{$EXTERNALSYM CertEnumCertificatesInStore}
+
+//+-------------------------------------------------------------------------
+// Find the first or next certificate context in the store.
+//
+// The certificate is found according to the dwFindType and its pvFindPara.
+// See below for a list of the find types and its parameters.
+//
+// Currently dwFindFlags is only used for CERT_FIND_SUBJECT_ATTR,
+// CERT_FIND_ISSUER_ATTR or CERT_FIND_CTL_USAGE. Otherwise, must be set to 0.
+//
+// Usage of dwCertEncodingType depends on the dwFindType.
+//
+// If the first or next certificate isn't found, NULL is returned.
+// Otherwise, a pointer to a read only CERT_CONTEXT is returned. CERT_CONTEXT
+// must be freed by calling CertFreeCertificateContext or is freed when passed as the
+// pPrevCertContext on a subsequent call. CertDuplicateCertificateContext
+// can be called to make a duplicate.
+//
+// pPrevCertContext MUST BE NULL on the first
+// call to find the certificate. To find the next certificate, the
+// pPrevCertContext is set to the CERT_CONTEXT returned by a previous call.
+//
+// NOTE: a NON-NULL pPrevCertContext is always CertFreeCertificateContext'ed by
+// this function, even for an error.
+//--------------------------------------------------------------------------
+
+function CertFindCertificateInStore(hCertStore: HCERTSTORE;
+ dwCertEncodingType, dwFindFlags, dwFindType: DWORD; pvFindPara: Pointer;
+ pPrevCertContext: PCCERT_CONTEXT): PCCERT_CONTEXT; stdcall;
+{$EXTERNALSYM CertFindCertificateInStore}
+
+//+-------------------------------------------------------------------------
+// Certificate comparison functions
+//--------------------------------------------------------------------------
+
+const
+ CERT_COMPARE_MASK = $FFFF;
+ {$EXTERNALSYM CERT_COMPARE_MASK}
+ CERT_COMPARE_SHIFT = 16;
+ {$EXTERNALSYM CERT_COMPARE_SHIFT}
+ CERT_COMPARE_ANY = 0;
+ {$EXTERNALSYM CERT_COMPARE_ANY}
+ CERT_COMPARE_SHA1_HASH = 1;
+ {$EXTERNALSYM CERT_COMPARE_SHA1_HASH}
+ CERT_COMPARE_NAME = 2;
+ {$EXTERNALSYM CERT_COMPARE_NAME}
+ CERT_COMPARE_ATTR = 3;
+ {$EXTERNALSYM CERT_COMPARE_ATTR}
+ CERT_COMPARE_MD5_HASH = 4;
+ {$EXTERNALSYM CERT_COMPARE_MD5_HASH}
+ CERT_COMPARE_PROPERTY = 5;
+ {$EXTERNALSYM CERT_COMPARE_PROPERTY}
+ CERT_COMPARE_PUBLIC_KEY = 6;
+ {$EXTERNALSYM CERT_COMPARE_PUBLIC_KEY}
+ CERT_COMPARE_HASH = CERT_COMPARE_SHA1_HASH;
+ {$EXTERNALSYM CERT_COMPARE_HASH}
+ CERT_COMPARE_NAME_STR_A = 7;
+ {$EXTERNALSYM CERT_COMPARE_NAME_STR_A}
+ CERT_COMPARE_NAME_STR_W = 8;
+ {$EXTERNALSYM CERT_COMPARE_NAME_STR_W}
+ CERT_COMPARE_KEY_SPEC = 9;
+ {$EXTERNALSYM CERT_COMPARE_KEY_SPEC}
+ CERT_COMPARE_ENHKEY_USAGE = 10;
+ {$EXTERNALSYM CERT_COMPARE_ENHKEY_USAGE}
+ CERT_COMPARE_CTL_USAGE = CERT_COMPARE_ENHKEY_USAGE;
+ {$EXTERNALSYM CERT_COMPARE_CTL_USAGE}
+ CERT_COMPARE_SUBJECT_CERT = 11;
+ {$EXTERNALSYM CERT_COMPARE_SUBJECT_CERT}
+ CERT_COMPARE_ISSUER_OF = 12;
+ {$EXTERNALSYM CERT_COMPARE_ISSUER_OF}
+ CERT_COMPARE_EXISTING = 13;
+ {$EXTERNALSYM CERT_COMPARE_EXISTING}
+ CERT_COMPARE_SIGNATURE_HASH = 14;
+ {$EXTERNALSYM CERT_COMPARE_SIGNATURE_HASH}
+ CERT_COMPARE_KEY_IDENTIFIER = 15;
+ {$EXTERNALSYM CERT_COMPARE_KEY_IDENTIFIER}
+ CERT_COMPARE_CERT_ID = 16;
+ {$EXTERNALSYM CERT_COMPARE_CERT_ID}
+
+//+-------------------------------------------------------------------------
+// dwFindType
+//
+// The dwFindType definition consists of two components:
+// - comparison function
+// - certificate information flag
+//--------------------------------------------------------------------------
+
+ CERT_FIND_ANY = CERT_COMPARE_ANY shl CERT_COMPARE_SHIFT;
+ {$EXTERNALSYM CERT_FIND_ANY}
+ CERT_FIND_SHA1_HASH = CERT_COMPARE_SHA1_HASH shl CERT_COMPARE_SHIFT;
+ {$EXTERNALSYM CERT_FIND_SHA1_HASH}
+ CERT_FIND_MD5_HASH = CERT_COMPARE_MD5_HASH shl CERT_COMPARE_SHIFT;
+ {$EXTERNALSYM CERT_FIND_MD5_HASH}
+ CERT_FIND_SIGNATURE_HASH = CERT_COMPARE_SIGNATURE_HASH shl CERT_COMPARE_SHIFT;
+ {$EXTERNALSYM CERT_FIND_SIGNATURE_HASH}
+ CERT_FIND_KEY_IDENTIFIER = CERT_COMPARE_KEY_IDENTIFIER shl CERT_COMPARE_SHIFT;
+ {$EXTERNALSYM CERT_FIND_KEY_IDENTIFIER}
+ CERT_FIND_HASH = CERT_FIND_SHA1_HASH;
+ {$EXTERNALSYM CERT_FIND_HASH}
+ CERT_FIND_PROPERTY = CERT_COMPARE_PROPERTY shl CERT_COMPARE_SHIFT;
+ {$EXTERNALSYM CERT_FIND_PROPERTY}
+ CERT_FIND_PUBLIC_KEY = CERT_COMPARE_PUBLIC_KEY shl CERT_COMPARE_SHIFT;
+ {$EXTERNALSYM CERT_FIND_PUBLIC_KEY}
+ CERT_FIND_SUBJECT_NAME = CERT_COMPARE_NAME shl CERT_COMPARE_SHIFT or CERT_INFO_SUBJECT_FLAG;
+ {$EXTERNALSYM CERT_FIND_SUBJECT_NAME}
+ CERT_FIND_SUBJECT_ATTR = CERT_COMPARE_ATTR shl CERT_COMPARE_SHIFT or CERT_INFO_SUBJECT_FLAG;
+ {$EXTERNALSYM CERT_FIND_SUBJECT_ATTR}
+ CERT_FIND_ISSUER_NAME = CERT_COMPARE_NAME shl CERT_COMPARE_SHIFT or CERT_INFO_ISSUER_FLAG;
+ {$EXTERNALSYM CERT_FIND_ISSUER_NAME}
+ CERT_FIND_ISSUER_ATTR = CERT_COMPARE_ATTR shl CERT_COMPARE_SHIFT or CERT_INFO_ISSUER_FLAG;
+ {$EXTERNALSYM CERT_FIND_ISSUER_ATTR}
+ CERT_FIND_SUBJECT_STR_A = CERT_COMPARE_NAME_STR_A shl CERT_COMPARE_SHIFT or CERT_INFO_SUBJECT_FLAG;
+ {$EXTERNALSYM CERT_FIND_SUBJECT_STR_A}
+ CERT_FIND_SUBJECT_STR_W = CERT_COMPARE_NAME_STR_W shl CERT_COMPARE_SHIFT or CERT_INFO_SUBJECT_FLAG;
+ {$EXTERNALSYM CERT_FIND_SUBJECT_STR_W}
+ CERT_FIND_SUBJECT_STR = CERT_FIND_SUBJECT_STR_W;
+ {$EXTERNALSYM CERT_FIND_SUBJECT_STR}
+ CERT_FIND_ISSUER_STR_A = CERT_COMPARE_NAME_STR_A shl CERT_COMPARE_SHIFT or CERT_INFO_ISSUER_FLAG;
+ {$EXTERNALSYM CERT_FIND_ISSUER_STR_A}
+ CERT_FIND_ISSUER_STR_W = CERT_COMPARE_NAME_STR_W shl CERT_COMPARE_SHIFT or CERT_INFO_ISSUER_FLAG;
+ {$EXTERNALSYM CERT_FIND_ISSUER_STR_W}
+ CERT_FIND_ISSUER_STR = CERT_FIND_ISSUER_STR_W;
+ {$EXTERNALSYM CERT_FIND_ISSUER_STR}
+ CERT_FIND_KEY_SPEC = CERT_COMPARE_KEY_SPEC shl CERT_COMPARE_SHIFT;
+ {$EXTERNALSYM CERT_FIND_KEY_SPEC}
+ CERT_FIND_ENHKEY_USAGE = CERT_COMPARE_ENHKEY_USAGE shl CERT_COMPARE_SHIFT;
+ {$EXTERNALSYM CERT_FIND_ENHKEY_USAGE}
+ CERT_FIND_CTL_USAGE = CERT_FIND_ENHKEY_USAGE;
+ {$EXTERNALSYM CERT_FIND_CTL_USAGE}
+
+ CERT_FIND_SUBJECT_CERT = CERT_COMPARE_SUBJECT_CERT shl CERT_COMPARE_SHIFT;
+ {$EXTERNALSYM CERT_FIND_SUBJECT_CERT}
+ CERT_FIND_ISSUER_OF = CERT_COMPARE_ISSUER_OF shl CERT_COMPARE_SHIFT;
+ {$EXTERNALSYM CERT_FIND_ISSUER_OF}
+ CERT_FIND_EXISTING = CERT_COMPARE_EXISTING shl CERT_COMPARE_SHIFT;
+ {$EXTERNALSYM CERT_FIND_EXISTING}
+ CERT_FIND_CERT_ID = CERT_COMPARE_CERT_ID shl CERT_COMPARE_SHIFT;
+ {$EXTERNALSYM CERT_FIND_CERT_ID}
+
+//+-------------------------------------------------------------------------
+// CERT_FIND_ANY
+//
+// Find any certificate.
+//
+// pvFindPara isn't used.
+//--------------------------------------------------------------------------
+
+//+-------------------------------------------------------------------------
+// CERT_FIND_HASH
+//
+// Find a certificate with the specified hash.
+//
+// pvFindPara points to a CRYPT_HASH_BLOB.
+//--------------------------------------------------------------------------
+
+//+-------------------------------------------------------------------------
+// CERT_FIND_KEY_IDENTIFIER
+//
+// Find a certificate with the specified KeyIdentifier. Gets the
+// CERT_KEY_IDENTIFIER_PROP_ID property and compares with the input
+// CRYPT_HASH_BLOB.
+//
+// pvFindPara points to a CRYPT_HASH_BLOB.
+//--------------------------------------------------------------------------
+
+//+-------------------------------------------------------------------------
+// CERT_FIND_PROPERTY
+//
+// Find a certificate having the specified property.
+//
+// pvFindPara points to a DWORD containing the PROP_ID
+//--------------------------------------------------------------------------
+
+//+-------------------------------------------------------------------------
+// CERT_FIND_PUBLIC_KEY
+//
+// Find a certificate matching the specified public key.
+//
+// pvFindPara points to a CERT_PUBLIC_KEY_INFO containing the public key
+//--------------------------------------------------------------------------
+
+//+-------------------------------------------------------------------------
+// CERT_FIND_SUBJECT_NAME
+// CERT_FIND_ISSUER_NAME
+//
+// Find a certificate with the specified subject/issuer name. Does an exact
+// match of the entire name.
+//
+// Restricts search to certificates matching the dwCertEncodingType.
+//
+// pvFindPara points to a CERT_NAME_BLOB.
+//--------------------------------------------------------------------------
+
+//+-------------------------------------------------------------------------
+// CERT_FIND_SUBJECT_ATTR
+// CERT_FIND_ISSUER_ATTR
+//
+// Find a certificate with the specified subject/issuer attributes.
+//
+// Compares the attributes in the subject/issuer name with the
+// Relative Distinguished Name's (CERT_RDN) array of attributes specified in
+// pvFindPara. The comparison iterates through the CERT_RDN attributes and looks
+// for an attribute match in any of the subject/issuer's RDNs.
+//
+// The CERT_RDN_ATTR fields can have the following special values:
+// pszObjId == NULL - ignore the attribute object identifier
+// dwValueType == RDN_ANY_TYPE - ignore the value type
+// Value.pbData == NULL - match any value
+//
+// CERT_CASE_INSENSITIVE_IS_RDN_ATTRS_FLAG should be set in dwFindFlags to do
+// a case insensitive match. Otherwise, defaults to an exact, case sensitive
+// match.
+//
+// CERT_UNICODE_IS_RDN_ATTRS_FLAG should be set in dwFindFlags if the RDN was
+// initialized with unicode strings as for
+// CryptEncodeObject(X509_UNICODE_NAME).
+//
+// Restricts search to certificates matching the dwCertEncodingType.
+//
+// pvFindPara points to a CERT_RDN (defined in wincert.h).
+//--------------------------------------------------------------------------
+
+//+-------------------------------------------------------------------------
+// CERT_FIND_SUBJECT_STR_A
+// CERT_FIND_SUBJECT_STR_W | CERT_FIND_SUBJECT_STR
+// CERT_FIND_ISSUER_STR_A
+// CERT_FIND_ISSUER_STR_W | CERT_FIND_ISSUER_STR
+//
+// Find a certificate containing the specified subject/issuer name string.
+//
+// First, the certificate's subject/issuer is converted to a name string
+// via CertNameToStrA/CertNameToStrW(CERT_SIMPLE_NAME_STR). Then, a
+// case insensitive substring within string match is performed.
+//
+// Restricts search to certificates matching the dwCertEncodingType.
+//
+// For *_STR_A, pvFindPara points to a null terminated character string.
+// For *_STR_W, pvFindPara points to a null terminated wide character string.
+//--------------------------------------------------------------------------
+
+//+-------------------------------------------------------------------------
+// CERT_FIND_KEY_SPEC
+//
+// Find a certificate having a CERT_KEY_SPEC_PROP_ID property matching
+// the specified KeySpec.
+//
+// pvFindPara points to a DWORD containing the KeySpec.
+//--------------------------------------------------------------------------
+
+//+-------------------------------------------------------------------------
+// CERT_FIND_ENHKEY_USAGE
+//
+// Find a certificate having the szOID_ENHANCED_KEY_USAGE extension or
+// the CERT_ENHKEY_USAGE_PROP_ID and matching the specified pszUsageIdentifers.
+//
+// pvFindPara points to a CERT_ENHKEY_USAGE data structure. If pvFindPara
+// is NULL or CERT_ENHKEY_USAGE's cUsageIdentifier is 0, then, matches any
+// certificate having enhanced key usage.
+//
+// If the CERT_FIND_VALID_ENHKEY_USAGE_FLAG is set, then, only does a match
+// for certificates that are valid for the specified usages. By default,
+// the ceriticate must be valid for all usages. CERT_FIND_OR_ENHKEY_USAGE_FLAG
+// can be set, if the certificate only needs to be valid for one of the
+// specified usages. Note, CertGetValidUsages() is called to get the
+// certificate's list of valid usages. Only the CERT_FIND_OR_ENHKEY_USAGE_FLAG
+// is applicable when this flag is set.
+//
+// The CERT_FIND_OPTIONAL_ENHKEY_USAGE_FLAG can be set in dwFindFlags to
+// also match a certificate without either the extension or property.
+//
+// If CERT_FIND_NO_ENHKEY_USAGE_FLAG is set in dwFindFlags, finds
+// certificates without the key usage extension or property. Setting this
+// flag takes precedence over pvFindPara being NULL.
+//
+// If the CERT_FIND_EXT_ONLY_ENHKEY_USAGE_FLAG is set, then, only does a match
+// using the extension. If pvFindPara is NULL or cUsageIdentifier is set to
+// 0, finds certificates having the extension. If
+// CERT_FIND_OPTIONAL_ENHKEY_USAGE_FLAG is set, also matches a certificate
+// without the extension. If CERT_FIND_NO_ENHKEY_USAGE_FLAG is set, finds
+// certificates without the extension.
+//
+// If the CERT_FIND_PROP_ONLY_ENHKEY_USAGE_FLAG is set, then, only does a match
+// using the property. If pvFindPara is NULL or cUsageIdentifier is set to
+// 0, finds certificates having the property. If
+// CERT_FIND_OPTIONAL_ENHKEY_USAGE_FLAG is set, also matches a certificate
+// without the property. If CERT_FIND_NO_ENHKEY_USAGE_FLAG is set, finds
+// certificates without the property.
+//
+// If CERT_FIND_OR_ENHKEY_USAGE_FLAG is set, does an "OR" match of any of
+// the specified pszUsageIdentifiers. If not set, then, does an "AND" match
+// of all of the specified pszUsageIdentifiers.
+//--------------------------------------------------------------------------
+
+const
+ CERT_FIND_OPTIONAL_ENHKEY_USAGE_FLAG = $1;
+ {$EXTERNALSYM CERT_FIND_OPTIONAL_ENHKEY_USAGE_FLAG}
+ CERT_FIND_EXT_ONLY_ENHKEY_USAGE_FLAG = $2;
+ {$EXTERNALSYM CERT_FIND_EXT_ONLY_ENHKEY_USAGE_FLAG}
+ CERT_FIND_PROP_ONLY_ENHKEY_USAGE_FLAG = $4;
+ {$EXTERNALSYM CERT_FIND_PROP_ONLY_ENHKEY_USAGE_FLAG}
+ CERT_FIND_NO_ENHKEY_USAGE_FLAG = $8;
+ {$EXTERNALSYM CERT_FIND_NO_ENHKEY_USAGE_FLAG}
+ CERT_FIND_OR_ENHKEY_USAGE_FLAG = $10;
+ {$EXTERNALSYM CERT_FIND_OR_ENHKEY_USAGE_FLAG}
+ CERT_FIND_VALID_ENHKEY_USAGE_FLAG = $20;
+ {$EXTERNALSYM CERT_FIND_VALID_ENHKEY_USAGE_FLAG}
+
+ CERT_FIND_OPTIONAL_CTL_USAGE_FLAG = CERT_FIND_OPTIONAL_ENHKEY_USAGE_FLAG;
+ {$EXTERNALSYM CERT_FIND_OPTIONAL_CTL_USAGE_FLAG}
+
+ CERT_FIND_EXT_ONLY_CTL_USAGE_FLAG = CERT_FIND_EXT_ONLY_ENHKEY_USAGE_FLAG;
+ {$EXTERNALSYM CERT_FIND_EXT_ONLY_CTL_USAGE_FLAG}
+
+ CERT_FIND_PROP_ONLY_CTL_USAGE_FLAG = CERT_FIND_PROP_ONLY_ENHKEY_USAGE_FLAG;
+ {$EXTERNALSYM CERT_FIND_PROP_ONLY_CTL_USAGE_FLAG}
+
+ CERT_FIND_NO_CTL_USAGE_FLAG = CERT_FIND_NO_ENHKEY_USAGE_FLAG;
+ {$EXTERNALSYM CERT_FIND_NO_CTL_USAGE_FLAG}
+ CERT_FIND_OR_CTL_USAGE_FLAG = CERT_FIND_OR_ENHKEY_USAGE_FLAG;
+ {$EXTERNALSYM CERT_FIND_OR_CTL_USAGE_FLAG}
+ CERT_FIND_VALID_CTL_USAGE_FLAG = CERT_FIND_VALID_ENHKEY_USAGE_FLAG;
+ {$EXTERNALSYM CERT_FIND_VALID_CTL_USAGE_FLAG}
+
+//+-------------------------------------------------------------------------
+// CERT_FIND_CERT_ID
+//
+// Find a certificate with the specified CERT_ID.
+//
+// pvFindPara points to a CERT_ID.
+//--------------------------------------------------------------------------
+
+//+-------------------------------------------------------------------------
+// Get the certificate context from the store for the first or next issuer
+// of the specified subject certificate. Perform the enabled
+// verification checks on the subject. (Note, the checks are on the subject
+// using the returned issuer certificate.)
+//
+// If the first or next issuer certificate isn't found, NULL is returned.
+// Otherwise, a pointer to a read only CERT_CONTEXT is returned. CERT_CONTEXT
+// must be freed by calling CertFreeCertificateContext or is freed when passed as the
+// pPrevIssuerContext on a subsequent call. CertDuplicateCertificateContext
+// can be called to make a duplicate.
+//
+// For a self signed subject certificate, NULL is returned with LastError set
+// to CERT_STORE_SELF_SIGNED. The enabled verification checks are still done.
+//
+// The pSubjectContext may have been obtained from this store, another store
+// or created by the caller application. When created by the caller, the
+// CertCreateCertificateContext function must have been called.
+//
+// An issuer may have multiple certificates. This may occur when the validity
+// period is about to change. pPrevIssuerContext MUST BE NULL on the first
+// call to get the issuer. To get the next certificate for the issuer, the
+// pPrevIssuerContext is set to the CERT_CONTEXT returned by a previous call.
+//
+// NOTE: a NON-NULL pPrevIssuerContext is always CertFreeCertificateContext'ed by
+// this function, even for an error.
+//
+// The following flags can be set in *pdwFlags to enable verification checks
+// on the subject certificate context:
+// CERT_STORE_SIGNATURE_FLAG - use the public key in the returned
+// issuer certificate to verify the
+// signature on the subject certificate.
+// Note, if pSubjectContext->hCertStore ==
+// hCertStore, the store provider might
+// be able to eliminate a redo of
+// the signature verify.
+// CERT_STORE_TIME_VALIDITY_FLAG - get the current time and verify that
+// its within the subject certificate's
+// validity period
+// CERT_STORE_REVOCATION_FLAG - check if the subject certificate is on
+// the issuer's revocation list
+//
+// If an enabled verification check fails, then, its flag is set upon return.
+// If CERT_STORE_REVOCATION_FLAG was enabled and the issuer doesn't have a
+// CRL in the store, then, CERT_STORE_NO_CRL_FLAG is set in addition to
+// the CERT_STORE_REVOCATION_FLAG.
+//
+// If CERT_STORE_SIGNATURE_FLAG or CERT_STORE_REVOCATION_FLAG is set, then,
+// CERT_STORE_NO_ISSUER_FLAG is set if it doesn't have an issuer certificate
+// in the store.
+//
+// For a verification check failure, a pointer to the issuer's CERT_CONTEXT
+// is still returned and SetLastError isn't updated.
+//--------------------------------------------------------------------------
+
+function CertGetIssuerCertificateFromStore(hCertStore: HCERTSTORE;
+ pSubjectContext, pPrevIssuerContext: PCCERT_CONTEXT; var pdwFlags: DWORD): PCCERT_CONTEXT; stdcall;
+{$EXTERNALSYM CertGetIssuerCertificateFromStore}
+
+//+-------------------------------------------------------------------------
+// Perform the enabled verification checks on the subject certificate
+// using the issuer. Same checks and flags definitions as for the above
+// CertGetIssuerCertificateFromStore.
+//
+// If you are only checking CERT_STORE_TIME_VALIDITY_FLAG, then, the
+// issuer can be NULL.
+//
+// For a verification check failure, SUCCESS is still returned.
+//--------------------------------------------------------------------------
+
+function CertVerifySubjectCertificateContext(pSubject: PCCERT_CONTEXT;
+ pIssuer: PCCERT_CONTEXT; var pdwFlags: DWORD): BOOL; stdcall;
+{$EXTERNALSYM CertVerifySubjectCertificateContext}
+
+//+-------------------------------------------------------------------------
+// Duplicate a certificate context
+//--------------------------------------------------------------------------
+
+function CertDuplicateCertificateContext(pCertContext: PCCERT_CONTEXT): PCCERT_CONTEXT; stdcall;
+{$EXTERNALSYM CertDuplicateCertificateContext}
+
+//+-------------------------------------------------------------------------
+// Create a certificate context from the encoded certificate. The created
+// context isn't put in a store.
+//
+// Makes a copy of the encoded certificate in the created context.
+//
+// If unable to decode and create the certificate context, NULL is returned.
+// Otherwise, a pointer to a read only CERT_CONTEXT is returned.
+// CERT_CONTEXT must be freed by calling CertFreeCertificateContext.
+// CertDuplicateCertificateContext can be called to make a duplicate.
+//
+// CertSetCertificateContextProperty and CertGetCertificateContextProperty can be called
+// to store properties for the certificate.
+//--------------------------------------------------------------------------
+
+function CertCreateCertificateContext(dwCertEncodingType: DWORD;
+ pbCertEncoded: LPBYTE; cbCertEncoded: DWORD): PCCERT_CONTEXT; stdcall;
+{$EXTERNALSYM CertCreateCertificateContext}
+
+//+-------------------------------------------------------------------------
+// Free a certificate context
+//
+// There needs to be a corresponding free for each context obtained by a
+// get, find, duplicate or create.
+//--------------------------------------------------------------------------
+
+function CertFreeCertificateContext(pCertContext: PCCERT_CONTEXT): BOOL; stdcall;
+{$EXTERNALSYM CertFreeCertificateContext}
+
+//+-------------------------------------------------------------------------
+// Set the property for the specified certificate context.
+//
+// The type definition for pvData depends on the dwPropId value. There are
+// five predefined types:
+// CERT_KEY_PROV_HANDLE_PROP_ID - a HCRYPTPROV for the certificate's
+// private key is passed in pvData. Updates the hCryptProv field
+// of the CERT_KEY_CONTEXT_PROP_ID. If the CERT_KEY_CONTEXT_PROP_ID
+// doesn't exist, its created with all the other fields zeroed out. If
+// CERT_STORE_NO_CRYPT_RELEASE_FLAG isn't set, HCRYPTPROV is implicitly
+// released when either the property is set to NULL or on the final
+// free of the CertContext.
+//
+// CERT_KEY_PROV_INFO_PROP_ID - a PCRYPT_KEY_PROV_INFO for the certificate's
+// private key is passed in pvData.
+//
+// CERT_SHA1_HASH_PROP_ID -
+// CERT_MD5_HASH_PROP_ID -
+// CERT_SIGNATURE_HASH_PROP_ID - normally, a hash property is implicitly
+// set by doing a CertGetCertificateContextProperty. pvData points to a
+// CRYPT_HASH_BLOB.
+//
+// CERT_KEY_CONTEXT_PROP_ID - a PCERT_KEY_CONTEXT for the certificate's
+// private key is passed in pvData. The CERT_KEY_CONTEXT contains both the
+// hCryptProv and dwKeySpec for the private key.
+// See the CERT_KEY_PROV_HANDLE_PROP_ID for more information about
+// the hCryptProv field and dwFlags settings. Note, more fields may
+// be added for this property. The cbSize field value will be adjusted
+// accordingly.
+//
+// CERT_KEY_SPEC_PROP_ID - the dwKeySpec for the private key. pvData
+// points to a DWORD containing the KeySpec
+//
+// CERT_ENHKEY_USAGE_PROP_ID - enhanced key usage definition for the
+// certificate. pvData points to a CRYPT_DATA_BLOB containing an
+// ASN.1 encoded CERT_ENHKEY_USAGE (encoded via
+// CryptEncodeObject(X509_ENHANCED_KEY_USAGE).
+//
+// CERT_NEXT_UPDATE_LOCATION_PROP_ID - location of the next update.
+// Currently only applicable to CTLs. pvData points to a CRYPT_DATA_BLOB
+// containing an ASN.1 encoded CERT_ALT_NAME_INFO (encoded via
+// CryptEncodeObject(X509_ALTERNATE_NAME)).
+//
+// CERT_FRIENDLY_NAME_PROP_ID - friendly name for the cert, CRL or CTL.
+// pvData points to a CRYPT_DATA_BLOB. pbData is a pointer to a NULL
+// terminated unicode, wide character string.
+// cbData = (wcslen((LPWSTR) pbData) + 1) * sizeof(WCHAR).
+//
+// CERT_DESCRIPTION_PROP_ID - description for the cert, CRL or CTL.
+// pvData points to a CRYPT_DATA_BLOB. pbData is a pointer to a NULL
+// terminated unicode, wide character string.
+// cbData = (wcslen((LPWSTR) pbData) + 1) * sizeof(WCHAR).
+//
+// CERT_ARCHIVED_PROP_ID - when this property is set, the certificate
+// is skipped during enumeration. Note, certificates having this property
+// are still found for explicit finds, such as, finding a certificate
+// with a specific hash or finding a certificate having a specific issuer
+// and serial number. pvData points to a CRYPT_DATA_BLOB. This blob
+// can be NULL (pbData = NULL, cbData = 0).
+//
+// CERT_PUBKEY_ALG_PARA_PROP_ID - for public keys supporting
+// algorithm parameter inheritance. pvData points to a CRYPT_OBJID_BLOB
+// containing the ASN.1 encoded PublicKey Algorithm Parameters. For
+// DSS this would be the parameters encoded via
+// CryptEncodeObject(X509_DSS_PARAMETERS). This property may be set
+// by CryptVerifyCertificateSignatureEx().
+//
+// For all the other PROP_IDs: an encoded PCRYPT_DATA_BLOB is passed in pvData.
+//
+// If the property already exists, then, the old value is deleted and silently
+// replaced. Setting, pvData to NULL, deletes the property.
+//
+// CERT_SET_PROPERTY_IGNORE_PERSIST_ERROR_FLAG can be set to ignore any
+// provider write errors and always update the cached context's property.
+//--------------------------------------------------------------------------
+
+function CertSetCertificateContextProperty(pCertContext: PCCERT_CONTEXT;
+ dwPropId: DWORD; dwFlags: DWORD; pvData: Pointer): BOOL; stdcall;
+{$EXTERNALSYM CertSetCertificateContextProperty}
+
+// Set this flag to ignore any store provider write errors and always update
+// the cached context's property
+
+const
+ CERT_SET_PROPERTY_IGNORE_PERSIST_ERROR_FLAG = DWORD($80000000);
+ {$EXTERNALSYM CERT_SET_PROPERTY_IGNORE_PERSIST_ERROR_FLAG}
+
+//+-------------------------------------------------------------------------
+// Get the property for the specified certificate context.
+//
+// For CERT_KEY_PROV_HANDLE_PROP_ID, pvData points to a HCRYPTPROV.
+//
+// For CERT_KEY_PROV_INFO_PROP_ID, pvData points to a CRYPT_KEY_PROV_INFO structure.
+// Elements pointed to by fields in the pvData structure follow the
+// structure. Therefore, *pcbData may exceed the size of the structure.
+//
+// For CERT_KEY_CONTEXT_PROP_ID, pvData points to a CERT_KEY_CONTEXT structure.
+//
+// For CERT_KEY_SPEC_PROP_ID, pvData points to a DWORD containing the KeySpec.
+// If the CERT_KEY_CONTEXT_PROP_ID exists, the KeySpec is obtained from there.
+// Otherwise, if the CERT_KEY_PROV_INFO_PROP_ID exists, its the source
+// of the KeySpec.
+//
+// For CERT_SHA1_HASH_PROP_ID or CERT_MD5_HASH_PROP_ID, if the hash
+// doesn't already exist, then, its computed via CryptHashCertificate()
+// and then set. pvData points to the computed hash. Normally, the length
+// is 20 bytes for SHA and 16 for MD5.
+//
+// For CERT_SIGNATURE_HASH_PROP_ID, if the hash
+// doesn't already exist, then, its computed via CryptHashToBeSigned()
+// and then set. pvData points to the computed hash. Normally, the length
+// is 20 bytes for SHA and 16 for MD5.
+//
+// For CERT_ACCESS_STATE_PROP_ID, pvData points to a DWORD containing the
+// access state flags. The appropriate CERT_ACCESS_STATE_*_FLAG's are set
+// in the returned DWORD. See the CERT_ACCESS_STATE_*_FLAG definitions
+// above. Note, this property is read only. It can't be set.
+//
+// For CERT_KEY_IDENTIFIER_PROP_ID, if property doesn't already exist,
+// first searches for the szOID_SUBJECT_KEY_IDENTIFIER extension. Next,
+// does SHA1 hash of the certficate's SubjectPublicKeyInfo. pvData
+// points to the key identifier bytes. Normally, the length is 20 bytes.
+//
+// For CERT_PUBKEY_ALG_PARA_PROP_ID, pvPara points to the ASN.1 encoded
+// PublicKey Algorithm Parameters. This property will only be set
+// for public keys supporting algorithm parameter inheritance and when the
+// parameters have been omitted from the encoded and signed certificate.
+//
+// For all other PROP_IDs, pvData points to an encoded array of bytes.
+//--------------------------------------------------------------------------
+
+function CertGetCertificateContextProperty(pCertContext: PCCERT_CONTEXT;
+ dwPropId: DWORD; pvData: Pointer; var pcbData: DWORD): BOOL; stdcall;
+{$EXTERNALSYM CertGetCertificateContextProperty}
+
+//+-------------------------------------------------------------------------
+// Enumerate the properties for the specified certificate context.
+//
+// To get the first property, set dwPropId to 0. The ID of the first
+// property is returned. To get the next property, set dwPropId to the
+// ID returned by the last call. To enumerate all the properties continue
+// until 0 is returned.
+//
+// CertGetCertificateContextProperty is called to get the property's data.
+//
+// Note, since, the CERT_KEY_PROV_HANDLE_PROP_ID and CERT_KEY_SPEC_PROP_ID
+// properties are stored as fields in the CERT_KEY_CONTEXT_PROP_ID
+// property, they aren't enumerated individually.
+//--------------------------------------------------------------------------
+
+function CertEnumCertificateContextProperties(pCertContext: PCCERT_CONTEXT;
+ dwPropId: DWORD): DWORD; stdcall;
+{$EXTERNALSYM CertEnumCertificateContextProperties}
+
+//+-------------------------------------------------------------------------
+// Get the first or next CRL context from the store for the specified
+// issuer certificate. Perform the enabled verification checks on the CRL.
+//
+// If the first or next CRL isn't found, NULL is returned.
+// Otherwise, a pointer to a read only CRL_CONTEXT is returned. CRL_CONTEXT
+// must be freed by calling CertFreeCRLContext. However, the free must be
+// pPrevCrlContext on a subsequent call. CertDuplicateCRLContext
+// can be called to make a duplicate.
+//
+// The pIssuerContext may have been obtained from this store, another store
+// or created by the caller application. When created by the caller, the
+// CertCreateCertificateContext function must have been called.
+//
+// If pIssuerContext == NULL, finds all the CRLs in the store.
+//
+// An issuer may have multiple CRLs. For example, it generates delta CRLs
+// using a X.509 v3 extension. pPrevCrlContext MUST BE NULL on the first
+// call to get the CRL. To get the next CRL for the issuer, the
+// pPrevCrlContext is set to the CRL_CONTEXT returned by a previous call.
+//
+// NOTE: a NON-NULL pPrevCrlContext is always CertFreeCRLContext'ed by
+// this function, even for an error.
+//
+// The following flags can be set in *pdwFlags to enable verification checks
+// on the returned CRL:
+// CERT_STORE_SIGNATURE_FLAG - use the public key in the
+// issuer's certificate to verify the
+// signature on the returned CRL.
+// Note, if pIssuerContext->hCertStore ==
+// hCertStore, the store provider might
+// be able to eliminate a redo of
+// the signature verify.
+// CERT_STORE_TIME_VALIDITY_FLAG - get the current time and verify that
+// its within the CRL's ThisUpdate and
+// NextUpdate validity period.
+//
+// If an enabled verification check fails, then, its flag is set upon return.
+//
+// If pIssuerContext == NULL, then, an enabled CERT_STORE_SIGNATURE_FLAG
+// always fails and the CERT_STORE_NO_ISSUER_FLAG is also set.
+//
+// For a verification check failure, a pointer to the first or next
+// CRL_CONTEXT is still returned and SetLastError isn't updated.
+//--------------------------------------------------------------------------
+
+function CertGetCRLFromStore(hCertStore: HCERTSTORE; pIssuerContext: PCCERT_CONTEXT;
+ pPrevCrlContext: PCCRL_CONTEXT; var pdwFlags: DWORD): PCCRL_CONTEXT; stdcall;
+{$EXTERNALSYM CertGetCRLFromStore}
+
+//+-------------------------------------------------------------------------
+// Enumerate the CRL contexts in the store.
+//
+// If a CRL isn't found, NULL is returned.
+// Otherwise, a pointer to a read only CRL_CONTEXT is returned. CRL_CONTEXT
+// must be freed by calling CertFreeCRLContext or is freed when passed as the
+// pPrevCrlContext on a subsequent call. CertDuplicateCRLContext
+// can be called to make a duplicate.
+//
+// pPrevCrlContext MUST BE NULL to enumerate the first
+// CRL in the store. Successive CRLs are enumerated by setting
+// pPrevCrlContext to the CRL_CONTEXT returned by a previous call.
+//
+// NOTE: a NON-NULL pPrevCrlContext is always CertFreeCRLContext'ed by
+// this function, even for an error.
+//--------------------------------------------------------------------------
+
+function CertEnumCRLsInStore(hCertStore: HCERTSTORE;
+ pPrevCrlContext: PCCRL_CONTEXT): PCCRL_CONTEXT; stdcall;
+{$EXTERNALSYM CertEnumCRLsInStore}
+
+//+-------------------------------------------------------------------------
+// Find the first or next CRL context in the store.
+//
+// The CRL is found according to the dwFindType and its pvFindPara.
+// See below for a list of the find types and its parameters.
+//
+// Currently dwFindFlags isn't used and must be set to 0.
+//
+// Usage of dwCertEncodingType depends on the dwFindType.
+//
+// If the first or next CRL isn't found, NULL is returned.
+// Otherwise, a pointer to a read only CRL_CONTEXT is returned. CRL_CONTEXT
+// must be freed by calling CertFreeCRLContext or is freed when passed as the
+// pPrevCrlContext on a subsequent call. CertDuplicateCRLContext
+// can be called to make a duplicate.
+//
+// pPrevCrlContext MUST BE NULL on the first
+// call to find the CRL. To find the next CRL, the
+// pPrevCrlContext is set to the CRL_CONTEXT returned by a previous call.
+//
+// NOTE: a NON-NULL pPrevCrlContext is always CertFreeCRLContext'ed by
+// this function, even for an error.
+//--------------------------------------------------------------------------
+
+function CertFindCRLInStore(hCertStore: HCERTSTORE; dwCertEncodingType: DWORD;
+ dwFindFlags: DWORD; dwFindType: DWORD; pvFindPara: Pointer;
+ pPrevCrlContext: PCCRL_CONTEXT): PCCRL_CONTEXT; stdcall;
+{$EXTERNALSYM CertFindCRLInStore}
+
+const
+ CRL_FIND_ANY = 0;
+ {$EXTERNALSYM CRL_FIND_ANY}
+ CRL_FIND_ISSUED_BY = 1;
+ {$EXTERNALSYM CRL_FIND_ISSUED_BY}
+ CRL_FIND_EXISTING = 2;
+ {$EXTERNALSYM CRL_FIND_EXISTING}
+
+//+-------------------------------------------------------------------------
+// CRL_FIND_ANY
+//
+// Find any CRL.
+//
+// pvFindPara isn't used.
+//--------------------------------------------------------------------------
+
+//+-------------------------------------------------------------------------
+// CRL_FIND_ISSUED_BY
+//
+// Find CRL matching the specified issuer.
+//
+// pvFindPara is the PCCERT_CONTEXT of the CRL issuer.
+//
+// By default, only does issuer name matching. The following flags can be
+// set in dwFindFlags to do additional filtering.
+//
+// If CRL_FIND_ISSUED_BY_AKI_FLAG is set in dwFindFlags, then, checks if the
+// CRL has an Authority Key Identifier (AKI) extension. If the CRL has an
+// AKI, then, only returns a CRL whose AKI matches the issuer.
+//
+// Note, the AKI extension has the following OID:
+// szOID_AUTHORITY_KEY_IDENTIFIER2 and its corresponding data structure.
+//
+// If CRL_FIND_ISSUED_BY_SIGNATURE_FLAG is set in dwFindFlags, then,
+// uses the public key in the issuer's certificate to verify the
+// signature on the CRL. Only returns a CRL having a valid signature.
+//--------------------------------------------------------------------------
+
+const
+ CRL_FIND_ISSUED_BY_AKI_FLAG = $1;
+ {$EXTERNALSYM CRL_FIND_ISSUED_BY_AKI_FLAG}
+ CRL_FIND_ISSUED_BY_SIGNATURE_FLAG = $2;
+ {$EXTERNALSYM CRL_FIND_ISSUED_BY_SIGNATURE_FLAG}
+
+//+-------------------------------------------------------------------------
+// CRL_FIND_EXISTING
+//
+// Find existing CRL in the store.
+//
+// pvFindPara is the PCCRL_CONTEXT of the CRL to check if it already
+// exists in the store.
+//--------------------------------------------------------------------------
+
+//+-------------------------------------------------------------------------
+// Duplicate a CRL context
+//--------------------------------------------------------------------------
+
+function CertDuplicateCRLContext(pCrlContext: PCCRL_CONTEXT): PCCRL_CONTEXT; stdcall;
+{$EXTERNALSYM CertDuplicateCRLContext}
+
+//+-------------------------------------------------------------------------
+// Create a CRL context from the encoded CRL. The created
+// context isn't put in a store.
+//
+// Makes a copy of the encoded CRL in the created context.
+//
+// If unable to decode and create the CRL context, NULL is returned.
+// Otherwise, a pointer to a read only CRL_CONTEXT is returned.
+// CRL_CONTEXT must be freed by calling CertFreeCRLContext.
+// CertDuplicateCRLContext can be called to make a duplicate.
+//
+// CertSetCRLContextProperty and CertGetCRLContextProperty can be called
+// to store properties for the CRL.
+//--------------------------------------------------------------------------
+
+function CertCreateCRLContext(dwCertEncodingType: DWORD; pbCrlEncoded: LPBYTE;
+ cbCrlEncoded: DWORD): PCCRL_CONTEXT; stdcall;
+{$EXTERNALSYM CertCreateCRLContext}
+
+//+-------------------------------------------------------------------------
+// Free a CRL context
+//
+// There needs to be a corresponding free for each context obtained by a
+// get, duplicate or create.
+//--------------------------------------------------------------------------
+
+function CertFreeCRLContext(pCrlContext: PCCRL_CONTEXT): BOOL; stdcall;
+{$EXTERNALSYM CertFreeCRLContext}
+
+//+-------------------------------------------------------------------------
+// Set the property for the specified CRL context.
+//
+// Same Property Ids and semantics as CertSetCertificateContextProperty.
+//--------------------------------------------------------------------------
+
+function CertSetCRLContextProperty(pCrlContext: PCCRL_CONTEXT; dwPropId: DWORD;
+ dwFlags: DWORD; pvData: Pointer): BOOL; stdcall;
+{$EXTERNALSYM CertSetCRLContextProperty}
+
+//+-------------------------------------------------------------------------
+// Get the property for the specified CRL context.
+//
+// Same Property Ids and semantics as CertGetCertificateContextProperty.
+//
+// CERT_SHA1_HASH_PROP_ID, CERT_MD5_HASH_PROP_ID or
+// CERT_SIGNATURE_HASH_PROP_ID is the predefined property of most interest.
+//--------------------------------------------------------------------------
+
+function CertGetCRLContextProperty(pCrlContext: PCCRL_CONTEXT; dwPropId: DWORD;
+ pvData: Pointer; var pcbData: DWORD): BOOL; stdcall;
+{$EXTERNALSYM CertGetCRLContextProperty}
+
+//+-------------------------------------------------------------------------
+// Enumerate the properties for the specified CRL context.
+//
+// To get the first property, set dwPropId to 0. The ID of the first
+// property is returned. To get the next property, set dwPropId to the
+// ID returned by the last call. To enumerate all the properties continue
+// until 0 is returned.
+//
+// CertGetCRLContextProperty is called to get the property's data.
+//--------------------------------------------------------------------------
+
+function CertEnumCRLContextProperties(pCrlContext: PCCRL_CONTEXT;
+ dwPropId: DWORD): DWORD; stdcall;
+{$EXTERNALSYM CertEnumCRLContextProperties}
+
+//+-------------------------------------------------------------------------
+// Search the CRL's list of entries for the specified certificate.
+//
+// TRUE is returned if we were able to search the list. Otherwise, FALSE is
+// returned,
+//
+// For success, if the certificate was found in the list, *ppCrlEntry is
+// updated with a pointer to the entry. Otherwise, *ppCrlEntry is set to NULL.
+// The returned entry isn't allocated and must not be freed.
+//
+// dwFlags and pvReserved currently aren't used and must be set to 0 or NULL.
+//--------------------------------------------------------------------------
+
+function CertFindCertificateInCRL(pCert: PCCERT_CONTEXT; pCrlContext: PCCRL_CONTEXT;
+ dwFlags: DWORD; pvReserved: Pointer; var ppCrlEntry: PCRL_ENTRY): BOOL; stdcall;
+{$EXTERNALSYM CertFindCertificateInCRL}
+
+//+-------------------------------------------------------------------------
+// Add certificate/CRL, encoded, context or element disposition values.
+//--------------------------------------------------------------------------
+
+const
+ CERT_STORE_ADD_NEW = 1;
+ {$EXTERNALSYM CERT_STORE_ADD_NEW}
+ CERT_STORE_ADD_USE_EXISTING = 2;
+ {$EXTERNALSYM CERT_STORE_ADD_USE_EXISTING}
+ CERT_STORE_ADD_REPLACE_EXISTING = 3;
+ {$EXTERNALSYM CERT_STORE_ADD_REPLACE_EXISTING}
+ CERT_STORE_ADD_ALWAYS = 4;
+ {$EXTERNALSYM CERT_STORE_ADD_ALWAYS}
+ CERT_STORE_ADD_REPLACE_EXISTING_INHERIT_PROPERTIES = 5;
+ {$EXTERNALSYM CERT_STORE_ADD_REPLACE_EXISTING_INHERIT_PROPERTIES}
+ CERT_STORE_ADD_NEWER = 6;
+ {$EXTERNALSYM CERT_STORE_ADD_NEWER}
+ CERT_STORE_ADD_NEWER_INHERIT_PROPERTIES = 7;
+ {$EXTERNALSYM CERT_STORE_ADD_NEWER_INHERIT_PROPERTIES}
+
+//+-------------------------------------------------------------------------
+// Add the encoded certificate to the store according to the specified
+// disposition action.
+//
+// Makes a copy of the encoded certificate before adding to the store.
+//
+// dwAddDispostion specifies the action to take if the certificate
+// already exists in the store. This parameter must be one of the following
+// values:
+// CERT_STORE_ADD_NEW
+// Fails if the certificate already exists in the store. LastError
+// is set to CRYPT_E_EXISTS.
+// CERT_STORE_ADD_USE_EXISTING
+// If the certifcate already exists, then, its used and if ppCertContext
+// is non-NULL, the existing context is duplicated.
+// CERT_STORE_ADD_REPLACE_EXISTING
+// If the certificate already exists, then, the existing certificate
+// context is deleted before creating and adding the new context.
+// CERT_STORE_ADD_ALWAYS
+// No check is made to see if the certificate already exists. A
+// new certificate context is always created. This may lead to
+// duplicates in the store.
+// CERT_STORE_ADD_REPLACE_EXISTING_INHERIT_PROPERTIES
+// If the certificate already exists, then, its used.
+// CERT_STORE_ADD_NEWER
+// Fails if the certificate already exists in the store AND the NotBefore
+// time of the existing certificate is equal to or greater than the
+// NotBefore time of the new certificate being added. LastError
+// is set to CRYPT_E_EXISTS.
+//
+// If an older certificate is replaced, same as
+// CERT_STORE_ADD_REPLACE_EXISTING.
+//
+// For CRLs or CTLs compares the ThisUpdate times.
+//
+// CERT_STORE_ADD_NEWER_INHERIT_PROPERTIES
+// Same as CERT_STORE_ADD_NEWER. However, if an older certificate is
+// replaced, same as CERT_STORE_ADD_REPLACE_EXISTING_INHERIT_PROPERTIES.
+//
+// CertGetSubjectCertificateFromStore is called to determine if the
+// certificate already exists in the store.
+//
+// ppCertContext can be NULL, indicating the caller isn't interested
+// in getting the CERT_CONTEXT of the added or existing certificate.
+//--------------------------------------------------------------------------
+
+function CertAddEncodedCertificateToStore(hCertStore: HCERTSTORE;
+ dwCertEncodingType: DWORD; pbCertEncoded: LPBYTE; cbCertEncoded: DWORD;
+ dwAddDisposition: DWORD; ppCertContext: PPCCERT_CONTEXT): BOOL; stdcall;
+{$EXTERNALSYM CertAddEncodedCertificateToStore}
+
+//+-------------------------------------------------------------------------
+// Add the certificate context to the store according to the specified
+// disposition action.
+//
+// In addition to the encoded certificate, the context's properties are
+// also copied. Note, the CERT_KEY_CONTEXT_PROP_ID property (and its
+// CERT_KEY_PROV_HANDLE_PROP_ID or CERT_KEY_SPEC_PROP_ID) isn't copied.
+//
+// Makes a copy of the certificate context before adding to the store.
+//
+// dwAddDispostion specifies the action to take if the certificate
+// already exists in the store. This parameter must be one of the following
+// values:
+// CERT_STORE_ADD_NEW
+// Fails if the certificate already exists in the store. LastError
+// is set to CRYPT_E_EXISTS.
+// CERT_STORE_ADD_USE_EXISTING
+// If the certifcate already exists, then, its used and if ppStoreContext
+// is non-NULL, the existing context is duplicated. Iterates
+// through pCertContext's properties and only copies the properties
+// that don't already exist. The SHA1 and MD5 hash properties aren't
+// copied.
+// CERT_STORE_ADD_REPLACE_EXISTING
+// If the certificate already exists, then, the existing certificate
+// context is deleted before creating and adding a new context.
+// Properties are copied before doing the add.
+// CERT_STORE_ADD_ALWAYS
+// No check is made to see if the certificate already exists. A
+// new certificate context is always created and added. This may lead to
+// duplicates in the store. Properties are
+// copied before doing the add.
+// CERT_STORE_ADD_REPLACE_EXISTING_INHERIT_PROPERTIES
+// If the certificate already exists, then, the existing certificate
+// context is used. Properties from the added context are copied and
+// replace existing properties. However, any existing properties not
+// in the added context remain and aren't deleted.
+// CERT_STORE_ADD_NEWER
+// Fails if the certificate already exists in the store AND the NotBefore
+// time of the existing context is equal to or greater than the
+// NotBefore time of the new context being added. LastError
+// is set to CRYPT_E_EXISTS.
+//
+// If an older context is replaced, same as
+// CERT_STORE_ADD_REPLACE_EXISTING.
+//
+// For CRLs or CTLs compares the ThisUpdate times.
+//
+// CERT_STORE_ADD_NEWER_INHERIT_PROPERTIES
+// Same as CERT_STORE_ADD_NEWER. However, if an older context is
+// replaced, same as CERT_STORE_ADD_REPLACE_EXISTING_INHERIT_PROPERTIES.
+//
+// CertGetSubjectCertificateFromStore is called to determine if the
+// certificate already exists in the store.
+//
+// ppStoreContext can be NULL, indicating the caller isn't interested
+// in getting the CERT_CONTEXT of the added or existing certificate.
+//--------------------------------------------------------------------------
+
+function CertAddCertificateContextToStore(hCertStore: HCERTSTORE;
+ pCertContext: PCCERT_CONTEXT; dwAddDisposition: DWORD;
+ ppStoreContext: PPCCERT_CONTEXT): BOOL; stdcall;
+{$EXTERNALSYM CertAddCertificateContextToStore}
+
+//+-------------------------------------------------------------------------
+// Certificate Store Context Types
+//--------------------------------------------------------------------------
+
+const
+ CERT_STORE_CERTIFICATE_CONTEXT = 1;
+ {$EXTERNALSYM CERT_STORE_CERTIFICATE_CONTEXT}
+ CERT_STORE_CRL_CONTEXT = 2;
+ {$EXTERNALSYM CERT_STORE_CRL_CONTEXT}
+ CERT_STORE_CTL_CONTEXT = 3;
+ {$EXTERNALSYM CERT_STORE_CTL_CONTEXT}
+
+//+-------------------------------------------------------------------------
+// Certificate Store Context Bit Flags
+//--------------------------------------------------------------------------
+
+ CERT_STORE_ALL_CONTEXT_FLAG = not 0;
+ {$EXTERNALSYM CERT_STORE_ALL_CONTEXT_FLAG}
+ CERT_STORE_CERTIFICATE_CONTEXT_FLAG = 1 shl CERT_STORE_CERTIFICATE_CONTEXT;
+ {$EXTERNALSYM CERT_STORE_CERTIFICATE_CONTEXT_FLAG}
+ CERT_STORE_CRL_CONTEXT_FLAG = 1 shl CERT_STORE_CRL_CONTEXT;
+ {$EXTERNALSYM CERT_STORE_CRL_CONTEXT_FLAG}
+ CERT_STORE_CTL_CONTEXT_FLAG = 1 shl CERT_STORE_CTL_CONTEXT;
+ {$EXTERNALSYM CERT_STORE_CTL_CONTEXT_FLAG}
+
+//+-------------------------------------------------------------------------
+// Add the serialized certificate or CRL element to the store.
+//
+// The serialized element contains the encoded certificate, CRL or CTL and
+// its properties, such as, CERT_KEY_PROV_INFO_PROP_ID.
+//
+// If hCertStore is NULL, creates a certificate, CRL or CTL context not
+// residing in any store.
+//
+// dwAddDispostion specifies the action to take if the certificate or CRL
+// already exists in the store. See CertAddCertificateContextToStore for a
+// list of and actions taken.
+//
+// dwFlags currently isn't used and should be set to 0.
+//
+// dwContextTypeFlags specifies the set of allowable contexts. For example, to
+// add either a certificate or CRL, set dwContextTypeFlags to:
+// CERT_STORE_CERTIFICATE_CONTEXT_FLAG | CERT_STORE_CRL_CONTEXT_FLAG
+//
+// *pdwContextType is updated with the type of the context returned in
+// *ppvContxt. pdwContextType or ppvContext can be NULL, indicating the
+// caller isn't interested in getting the output. If *ppvContext is
+// returned it must be freed by calling CertFreeCertificateContext or
+// CertFreeCRLContext.
+//--------------------------------------------------------------------------
+
+function CertAddSerializedElementToStore(hCertStore: HCERTSTORE; pbElement: LPBYTE;
+ cbElement, dwAddDisposition, dwFlags, dwContextTypeFlags: DWORD;
+ pdwContextType: LPDWORD; ppvContext: PPointer): BOOL; stdcall;
+{$EXTERNALSYM CertAddSerializedElementToStore}
+
+//+-------------------------------------------------------------------------
+// Delete the specified certificate from the store.
+//
+// All subsequent gets or finds for the certificate will fail. However,
+// memory allocated for the certificate isn't freed until all of its contexts
+// have also been freed.
+//
+// The pCertContext is obtained from a get, enum, find or duplicate.
+//
+// Some store provider implementations might also delete the issuer's CRLs
+// if this is the last certificate for the issuer in the store.
+//
+// NOTE: the pCertContext is always CertFreeCertificateContext'ed by
+// this function, even for an error.
+//--------------------------------------------------------------------------
+
+function CertDeleteCertificateFromStore(pCertContext: PCCERT_CONTEXT): BOOL; stdcall;
+{$EXTERNALSYM CertDeleteCertificateFromStore}
+
+//+-------------------------------------------------------------------------
+// Add the encoded CRL to the store according to the specified
+// disposition option.
+//
+// Makes a copy of the encoded CRL before adding to the store.
+//
+// dwAddDispostion specifies the action to take if the CRL
+// already exists in the store. See CertAddEncodedCertificateToStore for a
+// list of and actions taken.
+//
+// Compares the CRL's Issuer to determine if the CRL already exists in the
+// store.
+//
+// ppCrlContext can be NULL, indicating the caller isn't interested
+// in getting the CRL_CONTEXT of the added or existing CRL.
+//--------------------------------------------------------------------------
+
+function CertAddEncodedCRLToStore(hCertStore: HCERTSTORE; dwCertEncodingType: DWORD;
+ pbCrlEncoded: LPBYTE; cbCrlEncoded, dwAddDisposition: DWORD;
+ ppCrlContext: PPCCRL_CONTEXT): BOOL; stdcall;
+{$EXTERNALSYM CertAddEncodedCRLToStore}
+
+//+-------------------------------------------------------------------------
+// Add the CRL context to the store according to the specified
+// disposition option.
+//
+// In addition to the encoded CRL, the context's properties are
+// also copied. Note, the CERT_KEY_CONTEXT_PROP_ID property (and its
+// CERT_KEY_PROV_HANDLE_PROP_ID or CERT_KEY_SPEC_PROP_ID) isn't copied.
+//
+// Makes a copy of the encoded CRL before adding to the store.
+//
+// dwAddDispostion specifies the action to take if the CRL
+// already exists in the store. See CertAddCertificateContextToStore for a
+// list of and actions taken.
+//
+// Compares the CRL's Issuer, ThisUpdate and NextUpdate to determine
+// if the CRL already exists in the store.
+//
+// ppStoreContext can be NULL, indicating the caller isn't interested
+// in getting the CRL_CONTEXT of the added or existing CRL.
+//--------------------------------------------------------------------------
+
+function CertAddCRLContextToStore(hCertStore: HCERTSTORE; pCrlContext: PCCRL_CONTEXT;
+ dwAddDisposition: DWORD; ppStoreContext: PPCCRL_CONTEXT): BOOL; stdcall;
+{$EXTERNALSYM CertAddCRLContextToStore}
+
+//+-------------------------------------------------------------------------
+// Delete the specified CRL from the store.
+//
+// All subsequent gets for the CRL will fail. However,
+// memory allocated for the CRL isn't freed until all of its contexts
+// have also been freed.
+//
+// The pCrlContext is obtained from a get or duplicate.
+//
+// NOTE: the pCrlContext is always CertFreeCRLContext'ed by
+// this function, even for an error.
+//--------------------------------------------------------------------------
+
+function CertDeleteCRLFromStore(pCrlContext: PCCRL_CONTEXT): BOOL; stdcall;
+{$EXTERNALSYM CertDeleteCRLFromStore}
+
+//+-------------------------------------------------------------------------
+// Serialize the certificate context's encoded certificate and its
+// properties.
+//--------------------------------------------------------------------------
+
+function CertSerializeCertificateStoreElement(pCertContext: PCCERT_CONTEXT;
+ dwFlags: DWORD; pbElement: LPBYTE; var pcbElement: DWORD): BOOL; stdcall;
+{$EXTERNALSYM CertSerializeCertificateStoreElement}
+
+//+-------------------------------------------------------------------------
+// Serialize the CRL context's encoded CRL and its properties.
+//--------------------------------------------------------------------------
+
+function CertSerializeCRLStoreElement(pCrlContext: PCCRL_CONTEXT; dwFlags: DWORD;
+ pbElement: LPBYTE; var pcbElement: DWORD): BOOL; stdcall;
+{$EXTERNALSYM CertSerializeCRLStoreElement}
+
+//+=========================================================================
+// Certificate Trust List (CTL) Store Data Structures and APIs
+//==========================================================================
+
+//+-------------------------------------------------------------------------
+// Duplicate a CTL context
+//--------------------------------------------------------------------------
+
+function CertDuplicateCTLContext(pCtlContext: PCCTL_CONTEXT): PCCTL_CONTEXT; stdcall;
+{$EXTERNALSYM CertDuplicateCTLContext}
+
+//+-------------------------------------------------------------------------
+// Create a CTL context from the encoded CTL. The created
+// context isn't put in a store.
+//
+// Makes a copy of the encoded CTL in the created context.
+//
+// If unable to decode and create the CTL context, NULL is returned.
+// Otherwise, a pointer to a read only CTL_CONTEXT is returned.
+// CTL_CONTEXT must be freed by calling CertFreeCTLContext.
+// CertDuplicateCTLContext can be called to make a duplicate.
+//
+// CertSetCTLContextProperty and CertGetCTLContextProperty can be called
+// to store properties for the CTL.
+//--------------------------------------------------------------------------
+
+function CertCreateCTLContext(dwMsgAndCertEncodingType: DWORD;
+ pbCtlEncoded: LPBYTE; cbCtlEncoded: DWORD): PCCTL_CONTEXT; stdcall;
+{$EXTERNALSYM CertCreateCTLContext}
+
+//+-------------------------------------------------------------------------
+// Free a CTL context
+//
+// There needs to be a corresponding free for each context obtained by a
+// get, duplicate or create.
+//--------------------------------------------------------------------------
+
+function CertFreeCTLContext(pCtlContext: PCCTL_CONTEXT): BOOL; stdcall;
+{$EXTERNALSYM CertFreeCTLContext}
+
+//+-------------------------------------------------------------------------
+// Set the property for the specified CTL context.
+//
+// Same Property Ids and semantics as CertSetCertificateContextProperty.
+//--------------------------------------------------------------------------
+
+function CertSetCTLContextProperty(pCtlContext: PCCTL_CONTEXT; dwPropId: DWORD;
+ dwFlags: DWORD; pvData: Pointer): BOOL; stdcall;
+{$EXTERNALSYM CertSetCTLContextProperty}
+
+//+-------------------------------------------------------------------------
+// Get the property for the specified CTL context.
+//
+// Same Property Ids and semantics as CertGetCertificateContextProperty.
+//
+// CERT_SHA1_HASH_PROP_ID or CERT_NEXT_UPDATE_LOCATION_PROP_ID are the
+// predefined properties of most interest.
+//--------------------------------------------------------------------------
+
+function CertGetCTLContextProperty(pCtlContext: PCCTL_CONTEXT; dwPropId: DWORD;
+ pvData: Pointer; var pcbData: DWORD): BOOL; stdcall;
+{$EXTERNALSYM CertGetCTLContextProperty}
+
+//+-------------------------------------------------------------------------
+// Enumerate the properties for the specified CTL context.
+//--------------------------------------------------------------------------
+
+function CertEnumCTLContextProperties(pCtlContext: PCCTL_CONTEXT; dwPropId: DWORD): DWORD; stdcall;
+{$EXTERNALSYM CertEnumCTLContextProperties}
+
+//+-------------------------------------------------------------------------
+// Enumerate the CTL contexts in the store.
+//
+// If a CTL isn't found, NULL is returned.
+// Otherwise, a pointer to a read only CTL_CONTEXT is returned. CTL_CONTEXT
+// must be freed by calling CertFreeCTLContext or is freed when passed as the
+// pPrevCtlContext on a subsequent call. CertDuplicateCTLContext
+// can be called to make a duplicate.
+//
+// pPrevCtlContext MUST BE NULL to enumerate the first
+// CTL in the store. Successive CTLs are enumerated by setting
+// pPrevCtlContext to the CTL_CONTEXT returned by a previous call.
+//
+// NOTE: a NON-NULL pPrevCtlContext is always CertFreeCTLContext'ed by
+// this function, even for an error.
+//--------------------------------------------------------------------------
+
+function CertEnumCTLsInStore(hCertStore: HCERTSTORE; pPrevCtlContext: PCCTL_CONTEXT): PCCTL_CONTEXT; stdcall;
+{$EXTERNALSYM CertEnumCTLsInStore}
+
+//+-------------------------------------------------------------------------
+// Attempt to find the specified subject in the CTL.
+//
+// For CTL_CERT_SUBJECT_TYPE, pvSubject points to a CERT_CONTEXT. The CTL's
+// SubjectAlgorithm is examined to determine the representation of the
+// subject's identity. Initially, only SHA1 or MD5 hash will be supported.
+// The appropriate hash property is obtained from the CERT_CONTEXT.
+//
+// For CTL_ANY_SUBJECT_TYPE, pvSubject points to the CTL_ANY_SUBJECT_INFO
+// structure which contains the SubjectAlgorithm to be matched in the CTL
+// and the SubjectIdentifer to be matched in one of the CTL entries.
+//
+// The certificate's hash or the CTL_ANY_SUBJECT_INFO's SubjectIdentifier
+// is used as the key in searching the subject entries. A binary
+// memory comparison is done between the key and the entry's SubjectIdentifer.
+//
+// dwEncodingType isn't used for either of the above SubjectTypes.
+//--------------------------------------------------------------------------
+
+function CertFindSubjectInCTL(dwEncodingType: DWORD; dwSubjectType: DWORD;
+ pvSubject: Pointer; pCtlContext: PCCTL_CONTEXT; dwFlags: DWORD): PCTL_ENTRY; stdcall;
+{$EXTERNALSYM CertFindSubjectInCTL}
+
+// Subject Types:
+// CTL_ANY_SUBJECT_TYPE, pvSubject points to following CTL_ANY_SUBJECT_INFO.
+// CTL_CERT_SUBJECT_TYPE, pvSubject points to CERT_CONTEXT.
+
+const
+ CTL_ANY_SUBJECT_TYPE = 1;
+ {$EXTERNALSYM CTL_ANY_SUBJECT_TYPE}
+ CTL_CERT_SUBJECT_TYPE = 2;
+ {$EXTERNALSYM CTL_CERT_SUBJECT_TYPE}
+
+type
+ PCTL_ANY_SUBJECT_INFO = ^CTL_ANY_SUBJECT_INFO;
+ {$EXTERNALSYM PCTL_ANY_SUBJECT_INFO}
+ _CTL_ANY_SUBJECT_INFO = record
+ SubjectAlgorithm: CRYPT_ALGORITHM_IDENTIFIER;
+ SubjectIdentifier: CRYPT_DATA_BLOB;
+ end;
+ {$EXTERNALSYM _CTL_ANY_SUBJECT_INFO}
+ CTL_ANY_SUBJECT_INFO = _CTL_ANY_SUBJECT_INFO;
+ {$EXTERNALSYM CTL_ANY_SUBJECT_INFO}
+ TCtlAnySubjectInfo = CTL_ANY_SUBJECT_INFO;
+ PCtlAnySubjectInfo = PCTL_ANY_SUBJECT_INFO;
+
+//+-------------------------------------------------------------------------
+// Find the first or next CTL context in the store.
+//
+// The CTL is found according to the dwFindType and its pvFindPara.
+// See below for a list of the find types and its parameters.
+//
+// Currently dwFindFlags isn't used and must be set to 0.
+//
+// Usage of dwMsgAndCertEncodingType depends on the dwFindType.
+//
+// If the first or next CTL isn't found, NULL is returned.
+// Otherwise, a pointer to a read only CTL_CONTEXT is returned. CTL_CONTEXT
+// must be freed by calling CertFreeCTLContext or is freed when passed as the
+// pPrevCtlContext on a subsequent call. CertDuplicateCTLContext
+// can be called to make a duplicate.
+//
+// pPrevCtlContext MUST BE NULL on the first
+// call to find the CTL. To find the next CTL, the
+// pPrevCtlContext is set to the CTL_CONTEXT returned by a previous call.
+//
+// NOTE: a NON-NULL pPrevCtlContext is always CertFreeCTLContext'ed by
+// this function, even for an error.
+//--------------------------------------------------------------------------
+
+function CertFindCTLInStore(hCertStore: HCERTSTORE; dwMsgAndCertEncodingType,
+ dwFindFlags, dwFindType: DWORD; pvFindPara: Pointer;
+ pPrevCtlContext: PCCTL_CONTEXT): PCCTL_CONTEXT; stdcall;
+{$EXTERNALSYM CertFindCTLInStore}
+
+const
+ CTL_FIND_ANY = 0;
+ {$EXTERNALSYM CTL_FIND_ANY}
+ CTL_FIND_SHA1_HASH = 1;
+ {$EXTERNALSYM CTL_FIND_SHA1_HASH}
+ CTL_FIND_MD5_HASH = 2;
+ {$EXTERNALSYM CTL_FIND_MD5_HASH}
+ CTL_FIND_USAGE = 3;
+ {$EXTERNALSYM CTL_FIND_USAGE}
+ CTL_FIND_SUBJECT = 4;
+ {$EXTERNALSYM CTL_FIND_SUBJECT}
+ CTL_FIND_EXISTING = 5;
+ {$EXTERNALSYM CTL_FIND_EXISTING}
+
+type
+ PCTL_FIND_USAGE_PARA = ^CTL_FIND_USAGE_PARA;
+ {$EXTERNALSYM PCTL_FIND_USAGE_PARA}
+ _CTL_FIND_USAGE_PARA = record
+ cbSize: DWORD;
+ SubjectUsage: CTL_USAGE; // optional
+ ListIdentifier: CRYPT_DATA_BLOB; // optional
+ pSigner: PCERT_INFO; // optional
+ end;
+ {$EXTERNALSYM _CTL_FIND_USAGE_PARA}
+ CTL_FIND_USAGE_PARA = _CTL_FIND_USAGE_PARA;
+ {$EXTERNALSYM CTL_FIND_USAGE_PARA}
+ TCtlFindUsagePara = CTL_FIND_USAGE_PARA;
+ PCtlFindUsagePara = PCTL_FIND_USAGE_PARA;
+
+const
+ CTL_FIND_NO_LIST_ID_CBDATA = DWORD($FFFFFFFF);
+ {$EXTERNALSYM CTL_FIND_NO_LIST_ID_CBDATA}
+ CTL_FIND_NO_SIGNER_PTR = PCERT_INFO(-1);
+ {$EXTERNALSYM CTL_FIND_NO_SIGNER_PTR}
+
+ CTL_FIND_SAME_USAGE_FLAG = $1;
+ {$EXTERNALSYM CTL_FIND_SAME_USAGE_FLAG}
+
+type
+ PCTL_FIND_SUBJECT_PARA = ^CTL_FIND_SUBJECT_PARA;
+ {$EXTERNALSYM PCTL_FIND_SUBJECT_PARA}
+ _CTL_FIND_SUBJECT_PARA = record
+ cbSize: DWORD;
+ pUsagePara: PCTL_FIND_USAGE_PARA; // optional
+ dwSubjectType: DWORD;
+ pvSubject: Pointer;
+ end;
+ {$EXTERNALSYM _CTL_FIND_SUBJECT_PARA}
+ CTL_FIND_SUBJECT_PARA = _CTL_FIND_SUBJECT_PARA;
+ {$EXTERNALSYM CTL_FIND_SUBJECT_PARA}
+ TCtlFindSubjectPara = CTL_FIND_SUBJECT_PARA;
+ PCtlFindSubjectPara = PCTL_FIND_SUBJECT_PARA;
+
+//+-------------------------------------------------------------------------
+// CTL_FIND_ANY
+//
+// Find any CTL.
+//
+// pvFindPara isn't used.
+//--------------------------------------------------------------------------
+
+//+-------------------------------------------------------------------------
+// CTL_FIND_SHA1_HASH
+// CTL_FIND_MD5_HASH
+//
+// Find a CTL with the specified hash.
+//
+// pvFindPara points to a CRYPT_HASH_BLOB.
+//--------------------------------------------------------------------------
+
+//+-------------------------------------------------------------------------
+// CTL_FIND_USAGE
+//
+// Find a CTL having the specified usage identifiers, list identifier or
+// signer. The CertEncodingType of the signer is obtained from the
+// dwMsgAndCertEncodingType parameter.
+//
+// pvFindPara points to a CTL_FIND_USAGE_PARA data structure. The
+// SubjectUsage.cUsageIdentifer can be 0 to match any usage. The
+// ListIdentifier.cbData can be 0 to match any list identifier. To only match
+// CTLs without a ListIdentifier, cbData must be set to
+// CTL_FIND_NO_LIST_ID_CBDATA. pSigner can be NULL to match any signer. Only
+// the Issuer and SerialNumber fields of the pSigner's PCERT_INFO are used.
+// To only match CTLs without a signer, pSigner must be set to
+// CTL_FIND_NO_SIGNER_PTR.
+//
+// The CTL_FIND_SAME_USAGE_FLAG can be set in dwFindFlags to
+// only match CTLs with the same usage identifiers. CTLs having additional
+// usage identifiers aren't matched. For example, if only "1.2.3" is specified
+// in CTL_FIND_USAGE_PARA, then, for a match, the CTL must only contain
+// "1.2.3" and not any additional usage identifers.
+//--------------------------------------------------------------------------
+
+//+-------------------------------------------------------------------------
+// CTL_FIND_SUBJECT
+//
+// Find a CTL having the specified subject. CertFindSubjectInCTL can be
+// called to get a pointer to the subject's entry in the CTL. pUsagePara can
+// optionally be set to enable the above CTL_FIND_USAGE matching.
+//
+// pvFindPara points to a CTL_FIND_SUBJECT_PARA data structure.
+//--------------------------------------------------------------------------
+
+//+-------------------------------------------------------------------------
+// Add the encoded CTL to the store according to the specified
+// disposition option.
+//
+// Makes a copy of the encoded CTL before adding to the store.
+//
+// dwAddDispostion specifies the action to take if the CTL
+// already exists in the store. See CertAddEncodedCertificateToStore for a
+// list of and actions taken.
+//
+// Compares the CTL's SubjectUsage, ListIdentifier and any of its signers
+// to determine if the CTL already exists in the store.
+//
+// ppCtlContext can be NULL, indicating the caller isn't interested
+// in getting the CTL_CONTEXT of the added or existing CTL.
+//--------------------------------------------------------------------------
+
+function CertAddEncodedCTLToStore(hCertStore: HCERTSTORE;
+ dwMsgAndCertEncodingType: DWORD; pbCtlEncoded: LPBYTE; cbCtlEncoded: DWORD;
+ dwAddDisposition: DWORD; ppCtlContext: PPCCTL_CONTEXT): BOOL; stdcall;
+{$EXTERNALSYM CertAddEncodedCTLToStore}
+
+//+-------------------------------------------------------------------------
+// Add the CTL context to the store according to the specified
+// disposition option.
+//
+// In addition to the encoded CTL, the context's properties are
+// also copied. Note, the CERT_KEY_CONTEXT_PROP_ID property (and its
+// CERT_KEY_PROV_HANDLE_PROP_ID or CERT_KEY_SPEC_PROP_ID) isn't copied.
+//
+// Makes a copy of the encoded CTL before adding to the store.
+//
+// dwAddDispostion specifies the action to take if the CTL
+// already exists in the store. See CertAddCertificateContextToStore for a
+// list of and actions taken.
+//
+// Compares the CTL's SubjectUsage, ListIdentifier and any of its signers
+// to determine if the CTL already exists in the store.
+//
+// ppStoreContext can be NULL, indicating the caller isn't interested
+// in getting the CTL_CONTEXT of the added or existing CTL.
+//--------------------------------------------------------------------------
+
+function CertAddCTLContextToStore(hCertStore: HCERTSTORE; pCtlContext: PCCTL_CONTEXT;
+ dwAddDisposition: DWORD; ppStoreContext: PPCCTL_CONTEXT): BOOL; stdcall;
+{$EXTERNALSYM CertAddCTLContextToStore}
+
+//+-------------------------------------------------------------------------
+// Serialize the CTL context's encoded CTL and its properties.
+//--------------------------------------------------------------------------
+
+function CertSerializeCTLStoreElement(pCtlContext: PCCTL_CONTEXT; dwFlags: DWORD;
+ pbElement: LPBYTE; var pcbElement: DWORD): BOOL; stdcall;
+{$EXTERNALSYM CertSerializeCTLStoreElement}
+
+//+-------------------------------------------------------------------------
+// Delete the specified CTL from the store.
+//
+// All subsequent gets for the CTL will fail. However,
+// memory allocated for the CTL isn't freed until all of its contexts
+// have also been freed.
+//
+// The pCtlContext is obtained from a get or duplicate.
+//
+// NOTE: the pCtlContext is always CertFreeCTLContext'ed by
+// this function, even for an error.
+//--------------------------------------------------------------------------
+
+function CertDeleteCTLFromStore(pCtlContext: PCCTL_CONTEXT): BOOL; stdcall;
+{$EXTERNALSYM CertDeleteCTLFromStore}
+
+function CertAddCertificateLinkToStore(hCertStore: HCERTSTORE;
+ pCertContext: PCCERT_CONTEXT; dwAddDisposition: DWORD;
+ ppStoreContext: PPCCERT_CONTEXT): BOOL; stdcall;
+{$EXTERNALSYM CertAddCertificateLinkToStore}
+
+function CertAddCRLLinkToStore(hCertStore: HCERTSTORE; pCrlContext: PCCRL_CONTEXT;
+ dwAddDisposition: DWORD; ppStoreContext: PPCCRL_CONTEXT): BOOL; stdcall;
+{$EXTERNALSYM CertAddCRLLinkToStore}
+
+function CertAddCTLLinkToStore(hCertStore: HCERTSTORE; pCtlContext: PCCTL_CONTEXT;
+ dwAddDisposition: DWORD; ppStoreContext: PPCCTL_CONTEXT): BOOL; stdcall;
+{$EXTERNALSYM CertAddCTLLinkToStore}
+
+function CertAddStoreToCollection(hCollectionStore: HCERTSTORE;
+ hSiblingStore: HCERTSTORE; dwUpdateFlags, dwPriority: DWORD): BOOL; stdcall;
+{$EXTERNALSYM CertAddStoreToCollection}
+
+procedure CertRemoveStoreFromCollection(hCollectionStore, hSiblingStore: HCERTSTORE); stdcall;
+{$EXTERNALSYM CertRemoveStoreFromCollection}
+
+function CertControlStore(hCertStore: HCERTSTORE; dwFlags, dwCtrlType: DWORD;
+ pvCtrlPara: Pointer): BOOL; stdcall;
+{$EXTERNALSYM CertControlStore}
+
+//+-------------------------------------------------------------------------
+// Certificate Store control types
+//--------------------------------------------------------------------------
+
+const
+ CERT_STORE_CTRL_RESYNC = 1;
+ {$EXTERNALSYM CERT_STORE_CTRL_RESYNC}
+ CERT_STORE_CTRL_NOTIFY_CHANGE = 2;
+ {$EXTERNALSYM CERT_STORE_CTRL_NOTIFY_CHANGE}
+ CERT_STORE_CTRL_COMMIT = 3;
+ {$EXTERNALSYM CERT_STORE_CTRL_COMMIT}
+ CERT_STORE_CTRL_AUTO_RESYNC = 4;
+ {$EXTERNALSYM CERT_STORE_CTRL_AUTO_RESYNC}
+
+//+-------------------------------------------------------------------------
+// CERT_STORE_CTRL_RESYNC
+//
+// Re-synchronize the store.
+//
+// The pvCtrlPara points to the event HANDLE to be signaled on
+// the next store change. Normally, this would be the same
+// event HANDLE passed to CERT_STORE_CTRL_NOTIFY_CHANGE during initialization.
+//
+// If pvCtrlPara is NULL, no events are re-armed.
+//--------------------------------------------------------------------------
+
+//+-------------------------------------------------------------------------
+// CERT_STORE_CTRL_NOTIFY_CHANGE
+//
+// Signal the event when the underlying store is changed.
+//
+// pvCtrlPara points to the event HANDLE to be signaled.
+//
+// pvCtrlPara can be NULL to inform the store of a subsequent
+// CERT_STORE_CTRL_RESYNC and allow it to optimize by only doing a resync
+// if the store has changed. For the registry based stores, an internal
+// notify change event is created and registered to be signaled.
+//
+// Recommend calling CERT_STORE_CTRL_NOTIFY_CHANGE once for each event to
+// be passed to CERT_STORE_CTRL_RESYNC. This should only happen after
+// the event has been created. Not after each time the event is signaled.
+//--------------------------------------------------------------------------
+
+//+-------------------------------------------------------------------------
+// CERT_STORE_CTRL_AUTO_RESYNC
+//
+// At the start of every enumeration or find store API call, check if the
+// underlying store has changed. If it has changed, re-synchronize.
+//
+// This check is only done in the enumeration or find APIs when the
+// pPrevContext is NULL.
+//
+// The pvCtrlPara isn't used and must be set to NULL.
+//--------------------------------------------------------------------------
+
+//+-------------------------------------------------------------------------
+// CERT_STORE_CTRL_COMMIT
+//
+// If any changes have been to the cached store, they are committed to
+// persisted storage. If no changes have been made since the store was
+// opened or the last commit, this call is ignored. May also be ignored by
+// store providers that persist changes immediately.
+//
+// CERT_STORE_CTRL_COMMIT_FORCE_FLAG can be set to force the store
+// to be committed even if it hasn't been touched.
+//
+// CERT_STORE_CTRL_COMMIT_CLEAR_FLAG can be set to inhibit a commit on
+// store close.
+//--------------------------------------------------------------------------
+
+const
+ CERT_STORE_CTRL_COMMIT_FORCE_FLAG = $1;
+ {$EXTERNALSYM CERT_STORE_CTRL_COMMIT_FORCE_FLAG}
+ CERT_STORE_CTRL_COMMIT_CLEAR_FLAG = $2;
+ {$EXTERNALSYM CERT_STORE_CTRL_COMMIT_CLEAR_FLAG}
+
+//+=========================================================================
+// Cert Store Property Defines and APIs
+//==========================================================================
+
+//+-------------------------------------------------------------------------
+// Store property IDs. This is a property applicable to the entire store.
+// Its not a property on an individual certificate, CRL or CTL context.
+//
+// Currently, no store properties are persisted. (This differs from
+// most context properties which are persisted.)
+//
+// See CertSetStoreProperty or CertGetStoreProperty for usage information.
+//
+// Note, the range for predefined store properties should be outside
+// the range of predefined context properties. We will start at 4096.
+//--------------------------------------------------------------------------
+
+ CERT_STORE_LOCALIZED_NAME_PROP_ID = $1000;
+ {$EXTERNALSYM CERT_STORE_LOCALIZED_NAME_PROP_ID}
+
+//+-------------------------------------------------------------------------
+// Set a store property.
+//
+// The type definition for pvData depends on the dwPropId value.
+// CERT_STORE_LOCALIZED_NAME_PROP_ID - localized name of the store.
+// pvData points to a CRYPT_DATA_BLOB. pbData is a pointer to a NULL
+// terminated unicode, wide character string.
+// cbData = (wcslen((LPWSTR) pbData) + 1) * sizeof(WCHAR).
+//
+// For all the other PROP_IDs: an encoded PCRYPT_DATA_BLOB is passed in pvData.
+//
+// If the property already exists, then, the old value is deleted and silently
+// replaced. Setting, pvData to NULL, deletes the property.
+//--------------------------------------------------------------------------
+
+function CertSetStoreProperty(hCertStore: HCERTSTORE; dwPropId, dwFlags: DWORD;
+ pvData: Pointer): BOOL; stdcall;
+{$EXTERNALSYM CertSetStoreProperty}
+
+//+-------------------------------------------------------------------------
+// Get a store property.
+//
+// The type definition for pvData depends on the dwPropId value.
+// CERT_STORE_LOCALIZED_NAME_PROP_ID - localized name of the store.
+// pvData points to a NULL terminated unicode, wide character string.
+// cbData = (wcslen((LPWSTR) pvData) + 1) * sizeof(WCHAR).
+//
+// For all other PROP_IDs, pvData points to an array of bytes.
+//
+// If the property doesn't exist, returns FALSE and sets LastError to
+// CRYPT_E_NOT_FOUND.
+//--------------------------------------------------------------------------
+
+function CertGetStoreProperty(hCertStore: HCERTSTORE; dwPropId: DWORD;
+ pvData: Pointer; var pcbData: DWORD): BOOL; stdcall;
+{$EXTERNALSYM CertGetStoreProperty}
+
+type
+ PCERT_CREATE_CONTEXT_PARA = ^CERT_CREATE_CONTEXT_PARA;
+ {$EXTERNALSYM PCERT_CREATE_CONTEXT_PARA}
+ _CERT_CREATE_CONTEXT_PARA = record
+ cbSize: DWORD;
+ pfnFree: PFN_CRYPT_FREE; // OPTIONAL
+ pvFree: Pointer; // OPTIONAL
+ end;
+ {$EXTERNALSYM _CERT_CREATE_CONTEXT_PARA}
+ CERT_CREATE_CONTEXT_PARA = _CERT_CREATE_CONTEXT_PARA;
+ {$EXTERNALSYM CERT_CREATE_CONTEXT_PARA}
+ TCertCreateContextPara = CERT_CREATE_CONTEXT_PARA;
+ PCertCreateContextPara = PCERT_CREATE_CONTEXT_PARA;
+
+//+-------------------------------------------------------------------------
+// Creates the specified context from the encoded bytes. The created
+// context isn't put in a store.
+//
+// dwContextType values:
+// CERT_STORE_CERTIFICATE_CONTEXT
+// CERT_STORE_CRL_CONTEXT
+// CERT_STORE_CTL_CONTEXT
+//
+// If CERT_CREATE_CONTEXT_NOCOPY_FLAG is set, the created context points
+// directly to the pbEncoded instead of an allocated copy. See flag
+// definition for more details.
+//
+// If CERT_CREATE_CONTEXT_SORTED_FLAG is set, the context is created
+// with sorted entries. This flag may only be set for CERT_STORE_CTL_CONTEXT.
+// Setting this flag implicitly sets CERT_CREATE_CONTEXT_NO_HCRYPTMSG_FLAG and
+// CERT_CREATE_CONTEXT_NO_ENTRY_FLAG. See flag definition for
+// more details.
+//
+// If CERT_CREATE_CONTEXT_NO_HCRYPTMSG_FLAG is set, the context is created
+// without creating a HCRYPTMSG handle for the context. This flag may only be
+// set for CERT_STORE_CTL_CONTEXT. See flag definition for more details.
+//
+// If CERT_CREATE_CONTEXT_NO_ENTRY_FLAG is set, the context is created
+// without decoding the entries. This flag may only be set for
+// CERT_STORE_CTL_CONTEXT. See flag definition for more details.
+//
+// If unable to decode and create the context, NULL is returned.
+// Otherwise, a pointer to a read only CERT_CONTEXT, CRL_CONTEXT or
+// CTL_CONTEXT is returned. The context must be freed by the appropriate
+// free context API. The context can be duplicated by calling the
+// appropriate duplicate context API.
+//--------------------------------------------------------------------------
+
+function CertCreateContext(dwContextType, dwEncodingType: DWORD;
+ pbEncoded: LPBYTE; cbEncoded, dwFlags: DWORD;
+ pCreatePara: PCERT_CREATE_CONTEXT_PARA): Pointer; stdcall;
+{$EXTERNALSYM CertCreateContext}
+
+// When the following flag is set, the created context points directly to the
+// pbEncoded instead of an allocated copy. If pCreatePara and
+// pCreatePara->pfnFree are non-NULL, then, pfnFree is called to free
+// the pbEncoded when the context is last freed. Otherwise, no attempt is
+// made to free the pbEncoded. If pCreatePara->pvFree is non-NULL, then its
+// passed to pfnFree instead of pbEncoded.
+//
+// Note, if CertCreateContext fails, pfnFree is still called.
+
+const
+ CERT_CREATE_CONTEXT_NOCOPY_FLAG = $1;
+ {$EXTERNALSYM CERT_CREATE_CONTEXT_NOCOPY_FLAG}
+
+// When the following flag is set, a context with sorted entries is created.
+// Currently only applicable to a CTL context.
+//
+// For CTLs: the cCTLEntry in the returned CTL_INFO is always
+// 0. CertFindSubjectInSortedCTL and CertEnumSubjectInSortedCTL must be called
+// to find or enumerate the CTL entries.
+//
+// The Sorted CTL TrustedSubjects extension isn't returned in the created
+// context's CTL_INFO.
+
+ CERT_CREATE_CONTEXT_SORTED_FLAG = $2;
+ {$EXTERNALSYM CERT_CREATE_CONTEXT_SORTED_FLAG}
+
+// By default when a CTL context is created, a HCRYPTMSG handle to its
+// SignedData message is created. This flag can be set to improve performance
+// by not creating the HCRYPTMSG handle.
+//
+// This flag is only applicable to a CTL context.
+
+ CERT_CREATE_CONTEXT_NO_HCRYPTMSG_FLAG = $4;
+ {$EXTERNALSYM CERT_CREATE_CONTEXT_NO_HCRYPTMSG_FLAG}
+
+// By default when a CTL context is created, its entries are decoded.
+// This flag can be set to improve performance by not decoding the
+// entries.
+//
+// This flag is only applicable to a CTL context.
+
+ CERT_CREATE_CONTEXT_NO_ENTRY_FLAG = $8;
+ {$EXTERNALSYM CERT_CREATE_CONTEXT_NO_ENTRY_FLAG}
+
+//+=========================================================================
+// Certificate System Store Data Structures and APIs
+//==========================================================================
+
+//+-------------------------------------------------------------------------
+// System Store Information
+//
+// Currently, no system store information is persisted.
+//--------------------------------------------------------------------------
+
+type
+ PCERT_SYSTEM_STORE_INFO = ^CERT_SYSTEM_STORE_INFO;
+ {$EXTERNALSYM PCERT_SYSTEM_STORE_INFO}
+ _CERT_SYSTEM_STORE_INFO = record
+ cbSize: DWORD;
+ end;
+ {$EXTERNALSYM _CERT_SYSTEM_STORE_INFO}
+ CERT_SYSTEM_STORE_INFO = _CERT_SYSTEM_STORE_INFO;
+ {$EXTERNALSYM CERT_SYSTEM_STORE_INFO}
+ TCertSystemStoreInfo = CERT_SYSTEM_STORE_INFO;
+ PCertSystemStoreInfo = PCERT_SYSTEM_STORE_INFO;
+
+//+-------------------------------------------------------------------------
+// Physical Store Information
+//
+// The Open fields are passed directly to CertOpenStore() to open
+// the physical store.
+//
+// By default all system stores located in the registry have an
+// implicit SystemRegistry physical store that is opened. To disable the
+// opening of this store, the SystemRegistry
+// physical store corresponding to the System store must be registered with
+// CERT_PHYSICAL_STORE_OPEN_DISABLE_FLAG set in dwFlags. Alternatively,
+// a physical store with the name of ".Default" may be registered.
+//
+// Depending on the store location and store name, additional predefined
+// physical stores may be opened. For example, system stores in
+// CURRENT_USER have the predefined physical store, .LocalMachine.
+// To disable the opening of these predefined physical stores, the
+// corresponding physical store must be registered with
+// CERT_PHYSICAL_STORE_OPEN_DISABLE_FLAG set in dwFlags.
+//
+// The CERT_PHYSICAL_STORE_ADD_ENABLE_FLAG must be set in dwFlags
+// to enable the adding of a context to the store.
+//
+// When a system store is opened via the SERVICES or USERS store location,
+// the ServiceName\ is prepended to the OpenParameters
+// for CERT_SYSTEM_STORE_CURRENT_USER or CERT_SYSTEM_STORE_CURRENT_SERVICE
+// physical stores and the dwOpenFlags store location is changed to
+// CERT_SYSTEM_STORE_USERS or CERT_SYSTEM_STORE_SERVICES.
+//
+// By default the SYSTEM, SYSTEM_REGISTRY and PHYSICAL provider
+// stores are also opened remotely when the outer system store is opened.
+// The CERT_PHYSICAL_STORE_REMOTE_OPEN_DISABLE_FLAG may be set in dwFlags
+// to disable remote opens.
+//
+// When opened remotely, the \\ComputerName is implicitly prepended to the
+// OpenParameters for the SYSTEM, SYSTEM_REGISTRY and PHYSICAL provider types.
+// To also prepend the \\ComputerName to other provider types, set the
+// CERT_PHYSICAL_STORE_INSERT_COMPUTER_NAME_ENABLE_FLAG in dwFlags.
+//
+// When the system store is opened, its physical stores are ordered
+// according to the dwPriority. A larger dwPriority indicates higher priority.
+//--------------------------------------------------------------------------
+
+type
+ PCERT_PHYSICAL_STORE_INFO = ^CERT_PHYSICAL_STORE_INFO;
+ {$EXTERNALSYM PCERT_PHYSICAL_STORE_INFO}
+ _CERT_PHYSICAL_STORE_INFO = record
+ cbSize: DWORD;
+ pszOpenStoreProvider: LPSTR; // REG_SZ
+ dwOpenEncodingType: DWORD; // REG_DWORD
+ dwOpenFlags: DWORD; // REG_DWORD
+ OpenParameters: CRYPT_DATA_BLOB; // REG_BINARY
+ dwFlags: DWORD; // REG_DWORD
+ dwPriority: DWORD; // REG_DWORD
+ end;
+ {$EXTERNALSYM _CERT_PHYSICAL_STORE_INFO}
+ CERT_PHYSICAL_STORE_INFO = _CERT_PHYSICAL_STORE_INFO;
+ {$EXTERNALSYM CERT_PHYSICAL_STORE_INFO}
+ TCertPhysicalStoreInfo = CERT_PHYSICAL_STORE_INFO;
+ PCertPhysicalStoreInfo = PCERT_PHYSICAL_STORE_INFO;
+
+//+-------------------------------------------------------------------------
+// Physical Store Information dwFlags
+//--------------------------------------------------------------------------
+
+const
+ CERT_PHYSICAL_STORE_ADD_ENABLE_FLAG = $1;
+ {$EXTERNALSYM CERT_PHYSICAL_STORE_ADD_ENABLE_FLAG}
+ CERT_PHYSICAL_STORE_OPEN_DISABLE_FLAG = $2;
+ {$EXTERNALSYM CERT_PHYSICAL_STORE_OPEN_DISABLE_FLAG}
+ CERT_PHYSICAL_STORE_REMOTE_OPEN_DISABLE_FLAG = $4;
+ {$EXTERNALSYM CERT_PHYSICAL_STORE_REMOTE_OPEN_DISABLE_FLAG}
+ CERT_PHYSICAL_STORE_INSERT_COMPUTER_NAME_ENABLE_FLAG = $8;
+ {$EXTERNALSYM CERT_PHYSICAL_STORE_INSERT_COMPUTER_NAME_ENABLE_FLAG}
+
+//+-------------------------------------------------------------------------
+// Register a system store.
+//
+// The upper word of the dwFlags parameter is used to specify the location of
+// the system store.
+//
+// If CERT_SYSTEM_STORE_RELOCATE_FLAG is set in dwFlags, pvSystemStore
+// points to a CERT_SYSTEM_STORE_RELOCATE_PARA data structure. Otherwise,
+// pvSystemStore points to a null terminated UNICODE string.
+//
+// The CERT_SYSTEM_STORE_SERVICES or CERT_SYSTEM_STORE_USERS system store
+// name must be prefixed with the ServiceName or UserName. For example,
+// "ServiceName\Trust".
+//
+// Stores on remote computers can be registered for the
+// CERT_SYSTEM_STORE_LOCAL_MACHINE, CERT_SYSTEM_STORE_SERVICES,
+// CERT_SYSTEM_STORE_USERS, CERT_SYSTEM_STORE_LOCAL_MACHINE_GROUP_POLICY
+// or CERT_SYSTEM_STORE_LOCAL_MACHINE_ENTERPRISE
+// locations by prepending the computer name. For example, a remote
+// local machine store is registered via "\\ComputerName\Trust" or
+// "ComputerName\Trust". A remote service store is registered via
+// "\\ComputerName\ServiceName\Trust". The leading "\\" backslashes are
+// optional in the ComputerName.
+//
+// Set CERT_STORE_CREATE_NEW_FLAG to cause a failure if the system store
+// already exists in the store location.
+//--------------------------------------------------------------------------
+
+function CertRegisterSystemStore(pvSystemStore: Pointer; dwFlags: DWORD;
+ pStoreInfo: PCERT_SYSTEM_STORE_INFO; pvReserved: Pointer): BOOL; stdcall;
+{$EXTERNALSYM CertRegisterSystemStore}
+
+//+-------------------------------------------------------------------------
+// Register a physical store for the specified system store.
+//
+// The upper word of the dwFlags parameter is used to specify the location of
+// the system store.
+//
+// If CERT_SYSTEM_STORE_RELOCATE_FLAG is set in dwFlags, pvSystemStore
+// points to a CERT_SYSTEM_STORE_RELOCATE_PARA data structure. Otherwise,
+// pvSystemStore points to a null terminated UNICODE string.
+//
+// See CertRegisterSystemStore for details on prepending a ServiceName
+// and/or ComputerName to the system store name.
+//
+// Set CERT_STORE_CREATE_NEW_FLAG to cause a failure if the physical store
+// already exists in the system store.
+//--------------------------------------------------------------------------
+
+function CertRegisterPhysicalStore(pvSystemStore: Pointer; dwFlags: DWORD;
+ pwszStoreName: LPCWSTR; pStoreInfo: PCERT_PHYSICAL_STORE_INFO;
+ pvReserved: Pointer): BOOL; stdcall;
+{$EXTERNALSYM CertRegisterPhysicalStore}
+
+//+-------------------------------------------------------------------------
+// Unregister the specified system store.
+//
+// The upper word of the dwFlags parameter is used to specify the location of
+// the system store.
+//
+// If CERT_SYSTEM_STORE_RELOCATE_FLAG is set in dwFlags, pvSystemStore
+// points to a CERT_SYSTEM_STORE_RELOCATE_PARA data structure. Otherwise,
+// pvSystemStore points to a null terminated UNICODE string.
+//
+// See CertRegisterSystemStore for details on prepending a ServiceName
+// and/or ComputerName to the system store name.
+//
+// CERT_STORE_DELETE_FLAG can optionally be set in dwFlags.
+//--------------------------------------------------------------------------
+
+function CertUnregisterSystemStore(pvSystemStore: Pointer; dwFlags: DWORD): BOOL; stdcall;
+{$EXTERNALSYM CertUnregisterSystemStore}
+
+//+-------------------------------------------------------------------------
+// Unregister the physical store from the specified system store.
+//
+// The upper word of the dwFlags parameter is used to specify the location of
+// the system store.
+//
+// If CERT_SYSTEM_STORE_RELOCATE_FLAG is set in dwFlags, pvSystemStore
+// points to a CERT_SYSTEM_STORE_RELOCATE_PARA data structure. Otherwise,
+// pvSystemStore points to a null terminated UNICODE string.
+//
+// See CertRegisterSystemStore for details on prepending a ServiceName
+// and/or ComputerName to the system store name.
+//
+// CERT_STORE_DELETE_FLAG can optionally be set in dwFlags.
+//--------------------------------------------------------------------------
+
+function CertUnregisterPhysicalStore(pvSystemStore: Pointer; dwFlags: DWORD;
+ pwszStoreName: LPCWSTR): BOOL; stdcall;
+{$EXTERNALSYM CertUnregisterPhysicalStore}
+
+//+-------------------------------------------------------------------------
+// Enum callbacks
+//
+// The CERT_SYSTEM_STORE_LOCATION_MASK bits in the dwFlags parameter
+// specifies the location of the system store
+//
+// If CERT_SYSTEM_STORE_RELOCATE_FLAG is set in dwFlags, pvSystemStore
+// points to a CERT_SYSTEM_STORE_RELOCATE_PARA data structure. Otherwise,
+// pvSystemStore points to a null terminated UNICODE string.
+//
+// The callback returns FALSE and sets LAST_ERROR to stop the enumeration.
+// The LAST_ERROR is returned to the caller of the enumeration.
+//
+// The pvSystemStore passed to the callback has leading ComputerName and/or
+// ServiceName prefixes where appropriate.
+//--------------------------------------------------------------------------
+
+type
+ PFN_CERT_ENUM_SYSTEM_STORE_LOCATION = function(pwszStoreLocation: LPCWSTR;
+ dwFlags: DWORD; pvReserved: Pointer; pvArg: Pointer): BOOL; stdcall;
+ {$EXTERNALSYM PFN_CERT_ENUM_SYSTEM_STORE_LOCATION}
+ PfnCertEnumSystemStoreLocation = PFN_CERT_ENUM_SYSTEM_STORE_LOCATION;
+
+ PFN_CERT_ENUM_SYSTEM_STORE = function(pvSystemStore: Pointer;
+ dwFlags: DWORD; pStoreInfo: PCERT_SYSTEM_STORE_INFO; pvReserved: Pointer;
+ pvArg: Pointer): BOOL; stdcall;
+ {$EXTERNALSYM PFN_CERT_ENUM_SYSTEM_STORE}
+ PfnCertEnumSystemStore = PFN_CERT_ENUM_SYSTEM_STORE;
+
+ PFN_CERT_ENUM_PHYSICAL_STORE = function(pvSystemStore: Pointer;
+ dwFlags: DWORD; pwszStoreName: LPCWSTR; pStoreInfo: PCERT_PHYSICAL_STORE_INFO;
+ pvReserved: Pointer; pvArg: Pointer): BOOL; stdcall;
+ {$EXTERNALSYM PFN_CERT_ENUM_PHYSICAL_STORE}
+ PfnCertEnumPhysicalStore = PFN_CERT_ENUM_PHYSICAL_STORE;
+
+// In the PFN_CERT_ENUM_PHYSICAL_STORE callback the following flag is
+// set if the physical store wasn't registered and is an implicitly created
+// predefined physical store.
+
+const
+ CERT_PHYSICAL_STORE_PREDEFINED_ENUM_FLAG = $1;
+ {$EXTERNALSYM CERT_PHYSICAL_STORE_PREDEFINED_ENUM_FLAG}
+
+// Names of implicitly created predefined physical stores
+
+ CERT_PHYSICAL_STORE_DEFAULT_NAME = '.Default';
+ {$EXTERNALSYM CERT_PHYSICAL_STORE_DEFAULT_NAME}
+ CERT_PHYSICAL_STORE_GROUP_POLICY_NAME = '.GroupPolicy';
+ {$EXTERNALSYM CERT_PHYSICAL_STORE_GROUP_POLICY_NAME}
+ CERT_PHYSICAL_STORE_LOCAL_MACHINE_NAME = '.LocalMachine';
+ {$EXTERNALSYM CERT_PHYSICAL_STORE_LOCAL_MACHINE_NAME}
+ CERT_PHYSICAL_STORE_DS_USER_CERTIFICATE_NAME = '.UserCertificate';
+ {$EXTERNALSYM CERT_PHYSICAL_STORE_DS_USER_CERTIFICATE_NAME}
+ CERT_PHYSICAL_STORE_LOCAL_MACHINE_GROUP_POLICY_NAME = '.LocalMachineGroupPolicy';
+ {$EXTERNALSYM CERT_PHYSICAL_STORE_LOCAL_MACHINE_GROUP_POLICY_NAME}
+ CERT_PHYSICAL_STORE_ENTERPRISE_NAME = '.Enterprise';
+ {$EXTERNALSYM CERT_PHYSICAL_STORE_ENTERPRISE_NAME}
+
+//+-------------------------------------------------------------------------
+// Enumerate the system store locations.
+//--------------------------------------------------------------------------
+
+function CertEnumSystemStoreLocation(dwFlags: DWORD; pvArg: Pointer;
+ pfnEnum: PFN_CERT_ENUM_SYSTEM_STORE_LOCATION): BOOL; stdcall;
+{$EXTERNALSYM CertEnumSystemStoreLocation}
+
+//+-------------------------------------------------------------------------
+// Enumerate the system stores.
+//
+// The upper word of the dwFlags parameter is used to specify the location of
+// the system store.
+//
+// If CERT_SYSTEM_STORE_RELOCATE_FLAG is set in dwFlags,
+// pvSystemStoreLocationPara points to a CERT_SYSTEM_STORE_RELOCATE_PARA
+// data structure. Otherwise, pvSystemStoreLocationPara points to a null
+// terminated UNICODE string.
+//
+// For CERT_SYSTEM_STORE_LOCAL_MACHINE,
+// CERT_SYSTEM_STORE_LOCAL_MACHINE_GROUP_POLICY or
+// CERT_SYSTEM_STORE_LOCAL_MACHINE_ENTERPRISE, pvSystemStoreLocationPara can
+// optionally be set to a unicode computer name for enumerating local machine
+// stores on a remote computer. For example, "\\ComputerName" or
+// "ComputerName". The leading "\\" backslashes are optional in the
+// ComputerName.
+//
+// For CERT_SYSTEM_STORE_SERVICES or CERT_SYSTEM_STORE_USERS,
+// if pvSystemStoreLocationPara is NULL, then,
+// enumerates both the service/user names and the stores for each service/user
+// name. Otherwise, pvSystemStoreLocationPara is a unicode string specifying a
+// remote computer name and/or service/user name. For example:
+// "ServiceName"
+// "\\ComputerName" or "ComputerName\"
+// "ComputerName\ServiceName"
+// Note, if only the ComputerName is specified, then, it must have either
+// the leading "\\" backslashes or a trailing backslash. Otherwise, its
+// interpretted as the ServiceName or UserName.
+//--------------------------------------------------------------------------
+
+function CertEnumSystemStore(dwFlags: DWORD; pvSystemStoreLocationPara: Pointer;
+ pvArg: Pointer; pfnEnum: PFN_CERT_ENUM_SYSTEM_STORE): BOOL; stdcall;
+{$EXTERNALSYM CertEnumSystemStore}
+
+//+-------------------------------------------------------------------------
+// Enumerate the physical stores for the specified system store.
+//
+// The upper word of the dwFlags parameter is used to specify the location of
+// the system store.
+//
+// If CERT_SYSTEM_STORE_RELOCATE_FLAG is set in dwFlags, pvSystemStore
+// points to a CERT_SYSTEM_STORE_RELOCATE_PARA data structure. Otherwise,
+// pvSystemStore points to a null terminated UNICODE string.
+//
+// See CertRegisterSystemStore for details on prepending a ServiceName
+// and/or ComputerName to the system store name.
+//
+// If the system store location only supports system stores and doesn't
+// support physical stores, LastError is set to ERROR_CALL_NOT_IMPLEMENTED.
+//--------------------------------------------------------------------------
+
+function CertEnumPhysicalStore(pvSystemStore: Pointer; dwFlags: DWORD;
+ pvArg: Pointer; pfnEnum: PFN_CERT_ENUM_PHYSICAL_STORE): BOOL; stdcall;
+{$EXTERNALSYM CertEnumPhysicalStore}
+
+//+-------------------------------------------------------------------------
+// Certificate System Store Installable Functions
+//
+// The CERT_SYSTEM_STORE_LOCATION_MASK bits in the dwFlags parameter passed
+// to the CertOpenStore(for "System", "SystemRegistry" or "Physical"
+// Provider), CertRegisterSystemStore,
+// CertUnregisterSystemStore, CertEnumSystemStore, CertRegisterPhysicalStore,
+// CertUnregisterPhysicalStore and CertEnumPhysicalStore APIs is used as the
+// constant pszOID value passed to the OID installable functions.
+// Therefore, the pszOID is restricted to a constant <= (LPCSTR) 0x0FFF.
+//
+// The EncodingType is 0.
+//--------------------------------------------------------------------------
+
+// Installable System Store Provider OID pszFuncNames.
+
+const
+ CRYPT_OID_OPEN_SYSTEM_STORE_PROV_FUNC = 'CertDllOpenSystemStoreProv';
+ {$EXTERNALSYM CRYPT_OID_OPEN_SYSTEM_STORE_PROV_FUNC}
+ CRYPT_OID_REGISTER_SYSTEM_STORE_FUNC = 'CertDllRegisterSystemStore';
+ {$EXTERNALSYM CRYPT_OID_REGISTER_SYSTEM_STORE_FUNC}
+ CRYPT_OID_UNREGISTER_SYSTEM_STORE_FUNC = 'CertDllUnregisterSystemStore';
+ {$EXTERNALSYM CRYPT_OID_UNREGISTER_SYSTEM_STORE_FUNC}
+ CRYPT_OID_ENUM_SYSTEM_STORE_FUNC = 'CertDllEnumSystemStore';
+ {$EXTERNALSYM CRYPT_OID_ENUM_SYSTEM_STORE_FUNC}
+ CRYPT_OID_REGISTER_PHYSICAL_STORE_FUNC = 'CertDllRegisterPhysicalStore';
+ {$EXTERNALSYM CRYPT_OID_REGISTER_PHYSICAL_STORE_FUNC}
+ CRYPT_OID_UNREGISTER_PHYSICAL_STORE_FUNC = 'CertDllUnregisterPhysicalStore';
+ {$EXTERNALSYM CRYPT_OID_UNREGISTER_PHYSICAL_STORE_FUNC}
+ CRYPT_OID_ENUM_PHYSICAL_STORE_FUNC = 'CertDllEnumPhysicalStore';
+ {$EXTERNALSYM CRYPT_OID_ENUM_PHYSICAL_STORE_FUNC}
+
+// CertDllOpenSystemStoreProv has the same function signature as the
+// installable "CertDllOpenStoreProv" function. See CertOpenStore for
+// more details.
+
+// CertDllRegisterSystemStore has the same function signature as
+// CertRegisterSystemStore.
+//
+// The "SystemStoreLocation" REG_SZ value must also be set for registered
+// CertDllEnumSystemStore OID functions.
+
+ CRYPT_OID_SYSTEM_STORE_LOCATION_VALUE_NAME = 'SystemStoreLocation';
+ {$EXTERNALSYM CRYPT_OID_SYSTEM_STORE_LOCATION_VALUE_NAME}
+
+// The remaining Register, Enum and Unregister OID installable functions
+// have the same signature as their Cert Store API counterpart.
+
+//+=========================================================================
+// Enhanced Key Usage Helper Functions
+//==========================================================================
+
+//+-------------------------------------------------------------------------
+// Get the enhanced key usage extension or property from the certificate
+// and decode.
+//
+// If the CERT_FIND_EXT_ONLY_ENHKEY_USAGE_FLAG is set, then, only get the
+// extension.
+//
+// If the CERT_FIND_PROP_ONLY_ENHKEY_USAGE_FLAG is set, then, only get the
+// property.
+//--------------------------------------------------------------------------
+
+function CertGetEnhancedKeyUsage(pCertContext: PCCERT_CONTEXT; dwFlags: DWORD;
+ pUsage: PCERT_ENHKEY_USAGE; var pcbUsage: DWORD): BOOL; stdcall;
+{$EXTERNALSYM CertGetEnhancedKeyUsage}
+
+//+-------------------------------------------------------------------------
+// Set the enhanced key usage property for the certificate.
+//--------------------------------------------------------------------------
+
+function CertSetEnhancedKeyUsage(pCertContext: PCCERT_CONTEXT;
+ pUsage: PCERT_ENHKEY_USAGE): BOOL; stdcall;
+{$EXTERNALSYM CertSetEnhancedKeyUsage}
+
+//+-------------------------------------------------------------------------
+// Add the usage identifier to the certificate's enhanced key usage property.
+//--------------------------------------------------------------------------
+
+function CertAddEnhancedKeyUsageIdentifier(pCertContext: PCCERT_CONTEXT;
+ pszUsageIdentifier: LPCSTR): BOOL; stdcall;
+{$EXTERNALSYM CertAddEnhancedKeyUsageIdentifier}
+
+//+-------------------------------------------------------------------------
+// Remove the usage identifier from the certificate's enhanced key usage
+// property.
+//--------------------------------------------------------------------------
+
+function CertRemoveEnhancedKeyUsageIdentifier(pCertContext: PCCERT_CONTEXT;
+ pszUsageIdentifier: LPCSTR): BOOL; stdcall;
+{$EXTERNALSYM CertRemoveEnhancedKeyUsageIdentifier}
+
+//+---------------------------------------------------------------------------
+//
+//
+// Takes an array of certs and returns an array of usages
+// which consists of the intersection of the valid usages for each cert.
+// If each cert is good for all possible usages then the cNumOIDs is set to -1.
+//
+//----------------------------------------------------------------------------
+
+function CertGetValidUsages(cCerts: DWORD; rghCerts: PCCERT_CONTEXT;
+ var cNumOIDs: Integer; rghOIDs: LPLPSTR; var pcbOIDs: DWORD): BOOL; stdcall;
+{$EXTERNALSYM CertGetValidUsages}
+
+//+=========================================================================
+// Cryptographic Message helper functions for verifying and signing a
+// CTL.
+//==========================================================================
+
+//+-------------------------------------------------------------------------
+// Get and verify the signer of a cryptographic message.
+//
+// To verify a CTL, the hCryptMsg is obtained from the CTL_CONTEXT's
+// hCryptMsg field.
+//
+// If CMSG_TRUSTED_SIGNER_FLAG is set, then, treat the Signer stores as being
+// trusted and only search them to find the certificate corresponding to the
+// signer's issuer and serial number. Otherwise, the SignerStores are
+// optionally provided to supplement the message's store of certificates.
+// If a signer certificate is found, its public key is used to verify
+// the message signature. The CMSG_SIGNER_ONLY_FLAG can be set to
+// return the signer without doing the signature verify.
+//
+// If CMSG_USE_SIGNER_INDEX_FLAG is set, then, only get the signer specified
+// by *pdwSignerIndex. Otherwise, iterate through all the signers
+// until a signer verifies or no more signers.
+//
+// For a verified signature, *ppSigner is updated with certificate context
+// of the signer and *pdwSignerIndex is updated with the index of the signer.
+// ppSigner and/or pdwSignerIndex can be NULL, indicating the caller isn't
+// interested in getting the CertContext and/or index of the signer.
+//--------------------------------------------------------------------------
+
+function CryptMsgGetAndVerifySigner(hCryptMsg: HCRYPTMSG; cSignerStore: DWORD;
+ rghSignerStore: PHCERTSTORE; dwFlags: DWORD; ppSigner: PPCCERT_CONTEXT;
+ pdwSignerIndex: LPDWORD): BOOL; stdcall;
+{$EXTERNALSYM CryptMsgGetAndVerifySigner}
+
+const
+ CMSG_TRUSTED_SIGNER_FLAG = $1;
+ {$EXTERNALSYM CMSG_TRUSTED_SIGNER_FLAG}
+ CMSG_SIGNER_ONLY_FLAG = $2;
+ {$EXTERNALSYM CMSG_SIGNER_ONLY_FLAG}
+ CMSG_USE_SIGNER_INDEX_FLAG = $4;
+ {$EXTERNALSYM CMSG_USE_SIGNER_INDEX_FLAG}
+
+//+-------------------------------------------------------------------------
+// Sign an encoded CTL.
+//
+// The pbCtlContent can be obtained via a CTL_CONTEXT's pbCtlContent
+// field or via a CryptEncodeObject(PKCS_CTL or PKCS_SORTED_CTL).
+//
+// CMSG_CMS_ENCAPSULATED_CTL_FLAG can be set to encode a CMS compatible
+// V3 SignedData message.
+//--------------------------------------------------------------------------
+
+function CryptMsgSignCTL(dwMsgEncodingType: DWORD; pbCtlContent: LPBYTE;
+ cbCtlContent: DWORD; pSignInfo: PCMSG_SIGNED_ENCODE_INFO; dwFlags: DWORD;
+ pbEncoded: LPBYTE; var pcbEncoded: DWORD): BOOL; stdcall;
+{$EXTERNALSYM CryptMsgSignCTL}
+
+// When set, CTL inner content is encapsulated within an OCTET STRING
+
+const
+ CMSG_CMS_ENCAPSULATED_CTL_FLAG = $00008000;
+ {$EXTERNALSYM CMSG_CMS_ENCAPSULATED_CTL_FLAG}
+
+//+-------------------------------------------------------------------------
+// Encode the CTL and create a signed message containing the encoded CTL.
+//
+// Set CMSG_ENCODE_SORTED_CTL_FLAG if the CTL entries are to be sorted
+// before encoding. This flag should be set, if the
+// CertFindSubjectInSortedCTL or CertEnumSubjectInSortedCTL APIs will
+// be called. If the identifier for the CTL entries is a hash, such as,
+// MD5 or SHA1, then, CMSG_ENCODE_HASHED_SUBJECT_IDENTIFIER_FLAG should
+// also be set.
+//
+// CMSG_CMS_ENCAPSULATED_CTL_FLAG can be set to encode a CMS compatible
+// V3 SignedData message.
+//--------------------------------------------------------------------------
+
+function CryptMsgEncodeAndSignCTL(dwMsgEncodingType: DWORD; pCtlInfo: PCTL_INFO;
+ pSignInfo: PCMSG_SIGNED_ENCODE_INFO; dwFlags: DWORD; pbEncoded: LPBYTE;
+ var pcbEncoded: DWORD): BOOL; stdcall;
+{$EXTERNALSYM CryptMsgEncodeAndSignCTL}
+
+// The following flag is set if the CTL is to be encoded with sorted
+// trusted subjects and the szOID_SORTED_CTL extension is inserted containing
+// sorted offsets to the encoded subjects.
+
+const
+ CMSG_ENCODE_SORTED_CTL_FLAG = $1;
+ {$EXTERNALSYM CMSG_ENCODE_SORTED_CTL_FLAG}
+
+// If the above sorted flag is set, then, the following flag should also
+// be set if the identifier for the TrustedSubjects is a hash,
+// such as, MD5 or SHA1.
+
+ CMSG_ENCODE_HASHED_SUBJECT_IDENTIFIER_FLAG = $2;
+ {$EXTERNALSYM CMSG_ENCODE_HASHED_SUBJECT_IDENTIFIER_FLAG}
+
+//+-------------------------------------------------------------------------
+// Returns TRUE if the SubjectIdentifier exists in the CTL. Optionally
+// returns a pointer to and byte count of the Subject's encoded attributes.
+//--------------------------------------------------------------------------
+
+function CertFindSubjectInSortedCTL(pSubjectIdentifier: PCRYPT_DATA_BLOB;
+ pCtlContext: PCCTL_CONTEXT; dwFlags: DWORD; pvReserved: Pointer;
+ pEncodedAttributes: PCRYPT_DER_BLOB): BOOL; stdcall;
+{$EXTERNALSYM CertFindSubjectInSortedCTL}
+
+//+-------------------------------------------------------------------------
+// Enumerates through the sequence of TrustedSubjects in a CTL context
+// created with CERT_CREATE_CONTEXT_SORTED_FLAG set.
+//
+// To start the enumeration, *ppvNextSubject must be NULL. Upon return,
+// *ppvNextSubject is updated to point to the next TrustedSubject in
+// the encoded sequence.
+//
+// Returns FALSE for no more subjects or invalid arguments.
+//
+// Note, the returned DER_BLOBs point directly into the encoded
+// bytes (not allocated, and must not be freed).
+//--------------------------------------------------------------------------
+
+function CertEnumSubjectInSortedCTL(pCtlContext: PCCTL_CONTEXT;
+ var ppvNextSubject: Pointer; pSubjectIdentifier: PCRYPT_DER_BLOB;
+ pEncodedAttributes: PCRYPT_DER_BLOB): BOOL; stdcall;
+{$EXTERNALSYM CertEnumSubjectInSortedCTL}
+
+//+=========================================================================
+// Certificate Verify CTL Usage Data Structures and APIs
+//==========================================================================
+
+type
+ PCTL_VERIFY_USAGE_PARA = ^CTL_VERIFY_USAGE_PARA;
+ {$EXTERNALSYM PCTL_VERIFY_USAGE_PARA}
+ _CTL_VERIFY_USAGE_PARA = record
+ cbSize: DWORD;
+ ListIdentifier: CRYPT_DATA_BLOB; // OPTIONAL
+ cCtlStore: DWORD;
+ rghCtlStore: PHCERTSTORE; // OPTIONAL
+ cSignerStore: DWORD;
+ rghSignerStore: PHCERTSTORE; // OPTIONAL
+ end;
+ {$EXTERNALSYM _CTL_VERIFY_USAGE_PARA}
+ CTL_VERIFY_USAGE_PARA = _CTL_VERIFY_USAGE_PARA;
+ {$EXTERNALSYM CTL_VERIFY_USAGE_PARA}
+ TCtlVerifyUsagePara = CTL_VERIFY_USAGE_PARA;
+ PCtlVerifyUsagePara = PCTL_VERIFY_USAGE_PARA;
+
+ PCTL_VERIFY_USAGE_STATUS = ^CTL_VERIFY_USAGE_STATUS;
+ {$EXTERNALSYM PCTL_VERIFY_USAGE_STATUS}
+ _CTL_VERIFY_USAGE_STATUS = record
+ cbSize: DWORD;
+ dwError: DWORD;
+ dwFlags: DWORD;
+ ppCtl: PPCCTL_CONTEXT; // IN OUT OPTIONAL
+ dwCtlEntryIndex: DWORD;
+ ppSigner: PPCCERT_CONTEXT; // IN OUT OPTIONAL
+ dwSignerIndex: DWORD;
+ end;
+ {$EXTERNALSYM _CTL_VERIFY_USAGE_STATUS}
+ CTL_VERIFY_USAGE_STATUS = _CTL_VERIFY_USAGE_STATUS;
+ {$EXTERNALSYM CTL_VERIFY_USAGE_STATUS}
+ TCtlVerifyUsageStatus = CTL_VERIFY_USAGE_STATUS;
+ PCtlVerifyUsageStatus = PCTL_VERIFY_USAGE_STATUS;
+
+const
+ CERT_VERIFY_INHIBIT_CTL_UPDATE_FLAG = $1;
+ {$EXTERNALSYM CERT_VERIFY_INHIBIT_CTL_UPDATE_FLAG}
+ CERT_VERIFY_TRUSTED_SIGNERS_FLAG = $2;
+ {$EXTERNALSYM CERT_VERIFY_TRUSTED_SIGNERS_FLAG}
+ CERT_VERIFY_NO_TIME_CHECK_FLAG = $4;
+ {$EXTERNALSYM CERT_VERIFY_NO_TIME_CHECK_FLAG}
+ CERT_VERIFY_ALLOW_MORE_USAGE_FLAG = $8;
+ {$EXTERNALSYM CERT_VERIFY_ALLOW_MORE_USAGE_FLAG}
+
+ CERT_VERIFY_UPDATED_CTL_FLAG = $1;
+ {$EXTERNALSYM CERT_VERIFY_UPDATED_CTL_FLAG}
+
+//+-------------------------------------------------------------------------
+// Verify that a subject is trusted for the specified usage by finding a
+// signed and time valid CTL with the usage identifiers and containing the
+// the subject. A subject can be identified by either its certificate context
+// or any identifier such as its SHA1 hash.
+//
+// See CertFindSubjectInCTL for definition of dwSubjectType and pvSubject
+// parameters.
+//
+// Via pVerifyUsagePara, the caller can specify the stores to be searched
+// to find the CTL. The caller can also specify the stores containing
+// acceptable CTL signers. By setting the ListIdentifier, the caller
+// can also restrict to a particular signer CTL list.
+//
+// Via pVerifyUsageStatus, the CTL containing the subject, the subject's
+// index into the CTL's array of entries, and the signer of the CTL
+// are returned. If the caller is not interested, ppCtl and ppSigner can be set
+// to NULL. Returned contexts must be freed via the store's free context APIs.
+//
+// If the CERT_VERIFY_INHIBIT_CTL_UPDATE_FLAG isn't set, then, a time
+// invalid CTL in one of the CtlStores may be replaced. When replaced, the
+// CERT_VERIFY_UPDATED_CTL_FLAG is set in pVerifyUsageStatus->dwFlags.
+//
+// If the CERT_VERIFY_TRUSTED_SIGNERS_FLAG is set, then, only the
+// SignerStores specified in pVerifyUsageStatus are searched to find
+// the signer. Otherwise, the SignerStores provide additional sources
+// to find the signer's certificate.
+//
+// If CERT_VERIFY_NO_TIME_CHECK_FLAG is set, then, the CTLs aren't checked
+// for time validity.
+//
+// If CERT_VERIFY_ALLOW_MORE_USAGE_FLAG is set, then, the CTL may contain
+// additional usage identifiers than specified by pSubjectUsage. Otherwise,
+// the found CTL will contain the same usage identifers and no more.
+//
+// CertVerifyCTLUsage will be implemented as a dispatcher to OID installable
+// functions. First, it will try to find an OID function matching the first
+// usage object identifier in the pUsage sequence. Next, it will dispatch
+// to the default CertDllVerifyCTLUsage functions.
+//
+// If the subject is trusted for the specified usage, then, TRUE is
+// returned. Otherwise, FALSE is returned with dwError set to one of the
+// following:
+// CRYPT_E_NO_VERIFY_USAGE_DLL
+// CRYPT_E_NO_VERIFY_USAGE_CHECK
+// CRYPT_E_VERIFY_USAGE_OFFLINE
+// CRYPT_E_NOT_IN_CTL
+// CRYPT_E_NO_TRUSTED_SIGNER
+//--------------------------------------------------------------------------
+
+function CertVerifyCTLUsage(dwEncodingType: DWORD; dwSubjectType: DWORD;
+ pvSubject: Pointer; pSubjectUsage: PCTL_USAGE; dwFlags: DWORD;
+ pVerifyUsagePara: PCTL_VERIFY_USAGE_PARA;
+ pVerifyUsageStatus: PCTL_VERIFY_USAGE_STATUS): BOOL; stdcall;
+{$EXTERNALSYM CertVerifyCTLUsage}
+
+//+=========================================================================
+// Certificate Revocation Data Structures and APIs
+//==========================================================================
+
+//+-------------------------------------------------------------------------
+// The following data structure may be passed to CertVerifyRevocation to
+// assist in finding the issuer of the context to be verified.
+//
+// When pIssuerCert is specified, pIssuerCert is the issuer of
+// rgpvContext[cContext - 1].
+//
+// When cCertStore and rgCertStore are specified, these stores may contain
+// an issuer certificate.
+//
+// When hCrlStore is specified then a handler which uses CRLs can search this
+// store for them
+//
+// When pftTimeToUse is specified then the handler (if possible) must determine
+// revocation status relative to the time given otherwise the answer may be
+// independent of time or relative to current time
+//--------------------------------------------------------------------------
+
+type
+ PCERT_REVOCATION_PARA = ^CERT_REVOCATION_PARA;
+ {$EXTERNALSYM PCERT_REVOCATION_PARA}
+ _CERT_REVOCATION_PARA = record
+ cbSize: DWORD;
+ pIssuerCert: PCCERT_CONTEXT;
+ cCertStore: DWORD;
+ rgCertStore: PHCERTSTORE;
+ hCrlStore: HCERTSTORE;
+ pftTimeToUse: LPFILETIME;
+ end;
+ {$EXTERNALSYM _CERT_REVOCATION_PARA}
+ CERT_REVOCATION_PARA = _CERT_REVOCATION_PARA;
+ {$EXTERNALSYM CERT_REVOCATION_PARA}
+ TCertRevocationPara = CERT_REVOCATION_PARA;
+ PCertRevocationPara = PCERT_REVOCATION_PARA;
+
+//+-------------------------------------------------------------------------
+// The following data structure is returned by CertVerifyRevocation to
+// specify the status of the revoked or unchecked context. Review the
+// following CertVerifyRevocation comments for details.
+//
+// Upon input to CertVerifyRevocation, cbSize must be set to a size
+// >= sizeof(CERT_REVOCATION_STATUS). Otherwise, CertVerifyRevocation
+// returns FALSE and sets LastError to E_INVALIDARG.
+//
+// Upon input to the installed or registered CRYPT_OID_VERIFY_REVOCATION_FUNC
+// functions, the dwIndex, dwError and dwReason have been zero'ed.
+//--------------------------------------------------------------------------
+
+ PCERT_REVOCATION_STATUS = ^CERT_REVOCATION_STATUS;
+ {$EXTERNALSYM PCERT_REVOCATION_STATUS}
+ _CERT_REVOCATION_STATUS = record
+ cbSize: DWORD;
+ dwIndex: DWORD;
+ dwError: DWORD;
+ dwReason: DWORD;
+ end;
+ {$EXTERNALSYM _CERT_REVOCATION_STATUS}
+ CERT_REVOCATION_STATUS = _CERT_REVOCATION_STATUS;
+ {$EXTERNALSYM CERT_REVOCATION_STATUS}
+ TCertRevocationStatus = CERT_REVOCATION_STATUS;
+ PCertRevocationStatus = PCERT_REVOCATION_STATUS;
+
+//+-------------------------------------------------------------------------
+// Verifies the array of contexts for revocation. The dwRevType parameter
+// indicates the type of the context data structure passed in rgpvContext.
+// Currently only the revocation of certificates is defined.
+//
+// If the CERT_VERIFY_REV_CHAIN_FLAG flag is set, then, CertVerifyRevocation
+// is verifying a chain of certs where, rgpvContext[i + 1] is the issuer
+// of rgpvContext[i]. Otherwise, CertVerifyRevocation makes no assumptions
+// about the order of the contexts.
+//
+// To assist in finding the issuer, the pRevPara may optionally be set. See
+// the CERT_REVOCATION_PARA data structure for details.
+//
+// The contexts must contain enough information to allow the
+// installable or registered revocation DLLs to find the revocation server. For
+// certificates, this information would normally be conveyed in an
+// extension such as the IETF's AuthorityInfoAccess extension.
+//
+// CertVerifyRevocation returns TRUE if all of the contexts were successfully
+// checked and none were revoked. Otherwise, returns FALSE and updates the
+// returned pRevStatus data structure as follows:
+// dwIndex
+// Index of the first context that was revoked or unable to
+// be checked for revocation
+// dwError
+// Error status. LastError is also set to this error status.
+// dwError can be set to one of the following error codes defined
+// in winerror.h:
+// ERROR_SUCCESS - good context
+// CRYPT_E_REVOKED - context was revoked. dwReason contains the
+// reason for revocation
+// CRYPT_E_REVOCATION_OFFLINE - unable to connect to the
+// revocation server
+// CRYPT_E_NOT_IN_REVOCATION_DATABASE - the context to be checked
+// was not found in the revocation server's database.
+// CRYPT_E_NO_REVOCATION_CHECK - the called revocation function
+// wasn't able to do a revocation check on the context
+// CRYPT_E_NO_REVOCATION_DLL - no installed or registered Dll was
+// found to verify revocation
+// dwReason
+// The dwReason is currently only set for CRYPT_E_REVOKED and contains
+// the reason why the context was revoked. May be one of the following
+// CRL reasons defined by the CRL Reason Code extension ("2.5.29.21")
+// CRL_REASON_UNSPECIFIED 0
+// CRL_REASON_KEY_COMPROMISE 1
+// CRL_REASON_CA_COMPROMISE 2
+// CRL_REASON_AFFILIATION_CHANGED 3
+// CRL_REASON_SUPERSEDED 4
+// CRL_REASON_CESSATION_OF_OPERATION 5
+// CRL_REASON_CERTIFICATE_HOLD 6
+//
+// For each entry in rgpvContext, CertVerifyRevocation iterates
+// through the CRYPT_OID_VERIFY_REVOCATION_FUNC
+// function set's list of installed DEFAULT functions.
+// CryptGetDefaultOIDFunctionAddress is called with pwszDll = NULL. If no
+// installed functions are found capable of doing the revocation verification,
+// CryptVerifyRevocation iterates through CRYPT_OID_VERIFY_REVOCATION_FUNC's
+// list of registered DEFAULT Dlls. CryptGetDefaultOIDDllList is called to
+// get the list. CryptGetDefaultOIDFunctionAddress is called to load the Dll.
+//
+// The called functions have the same signature as CertVerifyRevocation. A
+// called function returns TRUE if it was able to successfully check all of
+// the contexts and none were revoked. Otherwise, the called function returns
+// FALSE and updates pRevStatus. dwIndex is set to the index of
+// the first context that was found to be revoked or unable to be checked.
+// dwError and LastError are updated. For CRYPT_E_REVOKED, dwReason
+// is updated. Upon input to the called function, dwIndex, dwError and
+// dwReason have been zero'ed. cbSize has been checked to be >=
+// sizeof(CERT_REVOCATION_STATUS).
+//
+// If the called function returns FALSE, and dwError isn't set to
+// CRYPT_E_REVOKED, then, CertVerifyRevocation either continues on to the
+// next DLL in the list for a returned dwIndex of 0 or for a returned
+// dwIndex > 0, restarts the process of finding a verify function by
+// advancing the start of the context array to the returned dwIndex and
+// decrementing the count of remaining contexts.
+//--------------------------------------------------------------------------
+
+function CertVerifyRevocation(dwEncodingType, dwRevType, cContext: DWORD;
+ rgpvContext: PVOID; dwFlags: DWORD; pRevPara: PCERT_REVOCATION_PARA;
+ pRevStatus: PCERT_REVOCATION_STATUS): BOOL; stdcall;
+{$EXTERNALSYM CertVerifyRevocation}
+
+//+-------------------------------------------------------------------------
+// Revocation types
+//--------------------------------------------------------------------------
+
+const
+ CERT_CONTEXT_REVOCATION_TYPE = 1;
+ {$EXTERNALSYM CERT_CONTEXT_REVOCATION_TYPE}
+
+//+-------------------------------------------------------------------------
+// When the following flag is set, rgpvContext[] consists of a chain
+// of certificates, where rgpvContext[i + 1] is the issuer of rgpvContext[i].
+//--------------------------------------------------------------------------
+
+ CERT_VERIFY_REV_CHAIN_FLAG = $00000001;
+ {$EXTERNALSYM CERT_VERIFY_REV_CHAIN_FLAG}
+
+//+-------------------------------------------------------------------------
+// CERT_VERIFY_CACHE_ONLY_BASED_REVOCATION prevents the revocation handler from
+// accessing any network based resources for revocation checking
+//--------------------------------------------------------------------------
+
+ CERT_VERIFY_CACHE_ONLY_BASED_REVOCATION = $00000002;
+ {$EXTERNALSYM CERT_VERIFY_CACHE_ONLY_BASED_REVOCATION}
+
+//+-------------------------------------------------------------------------
+// CERT_CONTEXT_REVOCATION_TYPE
+//
+// pvContext points to a const CERT_CONTEXT.
+//--------------------------------------------------------------------------
+
+//+=========================================================================
+// Certificate Helper APIs
+//==========================================================================
+
+//+-------------------------------------------------------------------------
+// Compare two multiple byte integer blobs to see if they are identical.
+//
+// Before doing the comparison, leading zero bytes are removed from a
+// positive number and leading 0xFF bytes are removed from a negative
+// number.
+//
+// The multiple byte integers are treated as Little Endian. pbData[0] is the
+// least significant byte and pbData[cbData - 1] is the most significant
+// byte.
+//
+// Returns TRUE if the integer blobs are identical after removing leading
+// 0 or 0xFF bytes.
+//--------------------------------------------------------------------------
+
+function CertCompareIntegerBlob(pInt1, pInt2: PCRYPT_INTEGER_BLOB): BOOL; stdcall;
+{$EXTERNALSYM CertCompareIntegerBlob}
+
+//+-------------------------------------------------------------------------
+// Compare two certificates to see if they are identical.
+//
+// Since a certificate is uniquely identified by its Issuer and SerialNumber,
+// these are the only fields needing to be compared.
+//
+// Returns TRUE if the certificates are identical.
+//--------------------------------------------------------------------------
+
+function CertCompareCertificate(dwCertEncodingType: DWORD; pCertId1, pCertId2: PCERT_INFO): BOOL; stdcall;
+{$EXTERNALSYM CertCompareCertificate}
+
+//+-------------------------------------------------------------------------
+// Compare two certificate names to see if they are identical.
+//
+// Returns TRUE if the names are identical.
+//--------------------------------------------------------------------------
+
+function CertCompareCertificateName(dwCertEncodingType: DWORD;
+ pCertName1: PCERT_NAME_BLOB; pCertName2: PCERT_NAME_BLOB): BOOL; stdcall;
+{$EXTERNALSYM CertCompareCertificateName}
+
+//+-------------------------------------------------------------------------
+// Compare the attributes in the certificate name with the specified
+// Relative Distinguished Name's (CERT_RDN) array of attributes.
+// The comparison iterates through the CERT_RDN attributes and looks for an
+// attribute match in any of the certificate name's RDNs.
+// Returns TRUE if all the attributes are found and match.
+//
+// The CERT_RDN_ATTR fields can have the following special values:
+// pszObjId == NULL - ignore the attribute object identifier
+// dwValueType == RDN_ANY_TYPE - ignore the value type
+//
+// CERT_CASE_INSENSITIVE_IS_RDN_ATTRS_FLAG should be set to do
+// a case insensitive match. Otherwise, defaults to an exact, case sensitive
+// match.
+//
+// CERT_UNICODE_IS_RDN_ATTRS_FLAG should be set if the pRDN was initialized
+// with unicode strings as for CryptEncodeObject(X509_UNICODE_NAME).
+//--------------------------------------------------------------------------
+
+function CertIsRDNAttrsInCertificateName(dwCertEncodingType, dwFlags: DWORD;
+ pCertName: PCERT_NAME_BLOB; pRDN: PCERT_RDN): BOOL; stdcall;
+{$EXTERNALSYM CertIsRDNAttrsInCertificateName}
+
+const
+ CERT_UNICODE_IS_RDN_ATTRS_FLAG = $1;
+ {$EXTERNALSYM CERT_UNICODE_IS_RDN_ATTRS_FLAG}
+ CERT_CASE_INSENSITIVE_IS_RDN_ATTRS_FLAG = $2;
+ {$EXTERNALSYM CERT_CASE_INSENSITIVE_IS_RDN_ATTRS_FLAG}
+
+//+-------------------------------------------------------------------------
+// Compare two public keys to see if they are identical.
+//
+// Returns TRUE if the keys are identical.
+//--------------------------------------------------------------------------
+
+function CertComparePublicKeyInfo(dwCertEncodingType: DWORD;
+ pPublicKey1, pPublicKey2: PCERT_PUBLIC_KEY_INFO): BOOL; stdcall;
+{$EXTERNALSYM CertComparePublicKeyInfo}
+
+//+-------------------------------------------------------------------------
+// Get the public/private key's bit length.
+//
+// Returns 0 if unable to determine the key's length.
+//--------------------------------------------------------------------------
+
+function CertGetPublicKeyLength(dwCertEncodingType: DWORD;
+ pPublicKey: PCERT_PUBLIC_KEY_INFO): DWORD; stdcall;
+{$EXTERNALSYM CertGetPublicKeyLength}
+
+//+-------------------------------------------------------------------------
+// Verify the signature of a subject certificate or a CRL using the
+// public key info
+//
+// Returns TRUE for a valid signature.
+//
+// hCryptProv specifies the crypto provider to use to verify the signature.
+// It doesn't need to use a private key.
+//--------------------------------------------------------------------------
+
+function CryptVerifyCertificateSignature(hCryptProv: HCRYPTPROV;
+ dwCertEncodingType: DWORD; pbEncoded: LPBYTE; cbEncoded: DWORD;
+ pPublicKey: PCERT_PUBLIC_KEY_INFO): BOOL; stdcall;
+{$EXTERNALSYM CryptVerifyCertificateSignature}
+
+//+-------------------------------------------------------------------------
+// Verify the signature of a subject certificate, CRL, certificate request
+// or keygen request using the issuer's public key.
+//
+// Returns TRUE for a valid signature.
+//
+// The subject can be an encoded blob or a context for a certificate or CRL.
+// For a subject certificate context, if the certificate is missing
+// inheritable PublicKey Algorithm Parameters, the context's
+// CERT_PUBKEY_ALG_PARA_PROP_ID is updated with the issuer's public key
+// algorithm parameters for a valid signature.
+//
+// The issuer can be a pointer to a CERT_PUBLIC_KEY_INFO, certificate
+// context or a chain context.
+//
+// hCryptProv specifies the crypto provider to use to verify the signature.
+// Its private key isn't used. If hCryptProv is NULL, a default
+// provider is picked according to the PublicKey Algorithm OID.
+//--------------------------------------------------------------------------
+
+function CryptVerifyCertificateSignatureEx(hCryptProv: HCRYPTPROV;
+ dwCertEncodingType, dwSubjectType: DWORD; pvSubject: Pointer;
+ dwIssuerType: DWORD; pvIssuer: Pointer; dwFlags: DWORD; pvReserved: Pointer): BOOL; stdcall;
+{$EXTERNALSYM CryptVerifyCertificateSignatureEx}
+
+// Subject Types
+
+const
+ CRYPT_VERIFY_CERT_SIGN_SUBJECT_BLOB = 1;
+ {$EXTERNALSYM CRYPT_VERIFY_CERT_SIGN_SUBJECT_BLOB}
+ // pvSubject :: PCRYPT_DATA_BLOB
+ CRYPT_VERIFY_CERT_SIGN_SUBJECT_CERT = 2;
+ {$EXTERNALSYM CRYPT_VERIFY_CERT_SIGN_SUBJECT_CERT}
+ // pvSubject :: PCCERT_CONTEXT
+ CRYPT_VERIFY_CERT_SIGN_SUBJECT_CRL = 3;
+ {$EXTERNALSYM CRYPT_VERIFY_CERT_SIGN_SUBJECT_CRL}
+ // pvSubject :: PCCRL_CONTEXT
+
+// Issuer Types
+ CRYPT_VERIFY_CERT_SIGN_ISSUER_PUBKEY = 1;
+ {$EXTERNALSYM CRYPT_VERIFY_CERT_SIGN_ISSUER_PUBKEY}
+ // pvIssuer :: PCERT_PUBLIC_KEY_INFO
+ CRYPT_VERIFY_CERT_SIGN_ISSUER_CERT = 2;
+ {$EXTERNALSYM CRYPT_VERIFY_CERT_SIGN_ISSUER_CERT}
+ // pvIssuer :: PCCERT_CONTEXT
+ CRYPT_VERIFY_CERT_SIGN_ISSUER_CHAIN = 3;
+ {$EXTERNALSYM CRYPT_VERIFY_CERT_SIGN_ISSUER_CHAIN}
+ // pvIssuer :: PCCERT_CHAIN_CONTEXT
+
+//+-------------------------------------------------------------------------
+// Compute the hash of the "to be signed" information in the encoded
+// signed content (CERT_SIGNED_CONTENT_INFO).
+//
+// hCryptProv specifies the crypto provider to use to compute the hash.
+// It doesn't need to use a private key.
+//--------------------------------------------------------------------------
+
+function CryptHashToBeSigned(hCryptProv: HCRYPTPROV; dwCertEncodingType: DWORD;
+ pbEncoded: LPBYTE; cbEncoded: DWORD; pbComputedHash: LPBYTE;
+ var pcbComputedHash: DWORD): BOOL; stdcall;
+{$EXTERNALSYM CryptHashToBeSigned}
+
+//+-------------------------------------------------------------------------
+// Hash the encoded content.
+//
+// hCryptProv specifies the crypto provider to use to compute the hash.
+// It doesn't need to use a private key.
+//
+// Algid specifies the CAPI hash algorithm to use. If Algid is 0, then, the
+// default hash algorithm (currently SHA1) is used.
+//--------------------------------------------------------------------------
+
+function CryptHashCertificate(hCryptProv: HCRYPTPROV; Algid: ALG_ID;
+ dwFlags: DWORD; pbEncoded: LPBYTE; cbEncoded: DWORD; pbComputedHash: LPBYTE;
+ var pcbComputedHash: DWORD): BOOL; stdcall;
+{$EXTERNALSYM CryptHashCertificate}
+
+//+-------------------------------------------------------------------------
+// Sign the "to be signed" information in the encoded signed content.
+//
+// hCryptProv specifies the crypto provider to use to do the signature.
+// It uses the specified private key.
+//--------------------------------------------------------------------------
+
+function CryptSignCertificate(hCryptProv: HCRYPTPROV; dwKeySpec: DWORD;
+ dwCertEncodingType: DWORD; pbEncodedToBeSigned: LPBYTE; cbEncodedToBeSigned: DWORD;
+ pSignatureAlgorithm: PCRYPT_ALGORITHM_IDENTIFIER; pvHashAuxInfo: Pointer;
+ pbSignature: LPBYTE; var pcbSignature: DWORD): BOOL; stdcall;
+{$EXTERNALSYM CryptSignCertificate}
+
+//+-------------------------------------------------------------------------
+// Encode the "to be signed" information. Sign the encoded "to be signed".
+// Encode the "to be signed" and the signature.
+//
+// hCryptProv specifies the crypto provider to use to do the signature.
+// It uses the specified private key.
+//--------------------------------------------------------------------------
+
+function CryptSignAndEncodeCertificate(hCryptProv: HCRYPTPROV; dwKeySpec: DWORD;
+ dwCertEncodingType: DWORD; lpszStructType: LPCSTR; pvStructInfo: Pointer;
+ pSignatureAlgorithm: PCRYPT_ALGORITHM_IDENTIFIER; pvHashAuxInfo: Pointer;
+ pbEncoded: PBYTE; var pcbEncoded: DWORD): BOOL; stdcall;
+{$EXTERNALSYM CryptSignAndEncodeCertificate}
+
+//+-------------------------------------------------------------------------
+// Verify the time validity of a certificate.
+//
+// Returns -1 if before NotBefore, +1 if after NotAfter and otherwise 0 for
+// a valid certificate
+//
+// If pTimeToVerify is NULL, uses the current time.
+//--------------------------------------------------------------------------
+
+function CertVerifyTimeValidity(pTimeToVerify: LPFILETIME; pCertInfo: PCERT_INFO): LONG; stdcall;
+{$EXTERNALSYM CertVerifyTimeValidity}
+
+//+-------------------------------------------------------------------------
+// Verify the time validity of a CRL.
+//
+// Returns -1 if before ThisUpdate, +1 if after NextUpdate and otherwise 0 for
+// a valid CRL
+//
+// If pTimeToVerify is NULL, uses the current time.
+//--------------------------------------------------------------------------
+
+function CertVerifyCRLTimeValidity(pTimeToVerify: LPFILETIME; pCrlInfo: PCRL_INFO): LONG; stdcall;
+{$EXTERNALSYM CertVerifyCRLTimeValidity}
+
+//+-------------------------------------------------------------------------
+// Verify that the subject's time validity nests within the issuer's time
+// validity.
+//
+// Returns TRUE if it nests. Otherwise, returns FALSE.
+//--------------------------------------------------------------------------
+
+function CertVerifyValidityNesting(pSubjectInfo, pIssuerInfo: PCERT_INFO): BOOL; stdcall;
+{$EXTERNALSYM CertVerifyValidityNesting}
+
+//+-------------------------------------------------------------------------
+// Verify that the subject certificate isn't on its issuer CRL.
+//
+// Returns true if the certificate isn't on the CRL.
+//--------------------------------------------------------------------------
+
+function CertVerifyCRLRevocation(dwCertEncodingType: DWORD; pCertId: PCERT_INFO;
+ cCrlInfo: DWORD; rgpCrlInfo: PCRL_INFO): BOOL; stdcall;
+{$EXTERNALSYM CertVerifyCRLRevocation}
+
+//+-------------------------------------------------------------------------
+// Convert the CAPI AlgId to the ASN.1 Object Identifier string
+//
+// Returns NULL if there isn't an ObjId corresponding to the AlgId.
+//--------------------------------------------------------------------------
+
+function CertAlgIdToOID(dwAlgId: DWORD): LPCSTR; stdcall;
+{$EXTERNALSYM CertAlgIdToOID}
+
+//+-------------------------------------------------------------------------
+// Convert the ASN.1 Object Identifier string to the CAPI AlgId.
+//
+// Returns 0 if there isn't an AlgId corresponding to the ObjId.
+//--------------------------------------------------------------------------
+
+function CertOIDToAlgId(pszObjId: LPCSTR): DWORD; stdcall;
+{$EXTERNALSYM CertOIDToAlgId}
+
+//+-------------------------------------------------------------------------
+// Find an extension identified by its Object Identifier.
+//
+// If found, returns pointer to the extension. Otherwise, returns NULL.
+//--------------------------------------------------------------------------
+
+function CertFindExtension(pszObjId: LPCSTR; cExtensions: DWORD;
+ rgExtensions: PCERT_EXTENSION): PCERT_EXTENSION; stdcall;
+{$EXTERNALSYM CertFindExtension}
+
+//+-------------------------------------------------------------------------
+// Find the first attribute identified by its Object Identifier.
+//
+// If found, returns pointer to the attribute. Otherwise, returns NULL.
+//--------------------------------------------------------------------------
+
+function CertFindAttribute(pszObjId: LPCSTR; cAttr: DWORD;
+ rgAttr: PCRYPT_ATTRIBUTE): PCRYPT_ATTRIBUTE; stdcall;
+{$EXTERNALSYM CertFindAttribute}
+
+//+-------------------------------------------------------------------------
+// Find the first CERT_RDN attribute identified by its Object Identifier in
+// the name's list of Relative Distinguished Names.
+//
+// If found, returns pointer to the attribute. Otherwise, returns NULL.
+//--------------------------------------------------------------------------
+
+function CertFindRDNAttr(pszObjId: LPCSTR; pName: PCERT_NAME_INFO): PCERT_RDN_ATTR; stdcall;
+{$EXTERNALSYM CertFindRDNAttr}
+
+//+-------------------------------------------------------------------------
+// Get the intended key usage bytes from the certificate.
+//
+// If the certificate doesn't have any intended key usage bytes, returns FALSE
+// and *pbKeyUsage is zeroed. Otherwise, returns TRUE and up through
+// cbKeyUsage bytes are copied into *pbKeyUsage. Any remaining uncopied
+// bytes are zeroed.
+//--------------------------------------------------------------------------
+
+function CertGetIntendedKeyUsage(dwCertEncodingType: DWORD; pCertInfo: PCERT_INFO;
+ pbKeyUsage: LPBYTE; cbKeyUsage: DWORD): BOOL; stdcall;
+{$EXTERNALSYM CertGetIntendedKeyUsage}
+
+type
+ HCRYPTDEFAULTCONTEXT = Pointer;
+ {$EXTERNALSYM HCRYPTDEFAULTCONTEXT}
+
+//+-------------------------------------------------------------------------
+// Install a previously CryptAcquiredContext'ed HCRYPTPROV to be used as
+// a default context.
+//
+// dwDefaultType and pvDefaultPara specify where the default context is used.
+// For example, install the HCRYPTPROV to be used to verify certificate's
+// having szOID_OIWSEC_md5RSA signatures.
+//
+// By default, the installed HCRYPTPROV is only applicable to the current
+// thread. Set CRYPT_DEFAULT_CONTEXT_PROCESS_FLAG to allow the HCRYPTPROV
+// to be used by all threads in the current process.
+//
+// For a successful install, TRUE is returned and *phDefaultContext is
+// updated with the HANDLE to be passed to CryptUninstallDefaultContext.
+//
+// The installed HCRYPTPROVs are stack ordered (the last installed
+// HCRYPTPROV is checked first). All thread installed HCRYPTPROVs are
+// checked before any process HCRYPTPROVs.
+//
+// The installed HCRYPTPROV remains available for default usage until
+// CryptUninstallDefaultContext is called or the thread or process exits.
+//
+// If CRYPT_DEFAULT_CONTEXT_AUTO_RELEASE_FLAG is set, then, the HCRYPTPROV
+// is CryptReleaseContext'ed at thread or process exit. However,
+// not CryptReleaseContext'ed if CryptUninstallDefaultContext is
+// called.
+//--------------------------------------------------------------------------
+
+function CryptInstallDefaultContext(hCryptProv: HCRYPTPROV; dwDefaultType: DWORD;
+ pvDefaultPara: Pointer; dwFlags: DWORD; pvReserved: Pointer;
+ var phDefaultContext: HCRYPTDEFAULTCONTEXT): BOOL; stdcall;
+{$EXTERNALSYM CryptInstallDefaultContext}
+
+// dwFlags
+
+const
+ CRYPT_DEFAULT_CONTEXT_AUTO_RELEASE_FLAG = $00000001;
+ {$EXTERNALSYM CRYPT_DEFAULT_CONTEXT_AUTO_RELEASE_FLAG}
+ CRYPT_DEFAULT_CONTEXT_PROCESS_FLAG = $00000002;
+ {$EXTERNALSYM CRYPT_DEFAULT_CONTEXT_PROCESS_FLAG}
+
+// List of dwDefaultType's
+
+ CRYPT_DEFAULT_CONTEXT_CERT_SIGN_OID = 1;
+ {$EXTERNALSYM CRYPT_DEFAULT_CONTEXT_CERT_SIGN_OID}
+ CRYPT_DEFAULT_CONTEXT_MULTI_CERT_SIGN_OID = 2;
+ {$EXTERNALSYM CRYPT_DEFAULT_CONTEXT_MULTI_CERT_SIGN_OID}
+
+//+-------------------------------------------------------------------------
+// CRYPT_DEFAULT_CONTEXT_CERT_SIGN_OID
+//
+// Install a default HCRYPTPROV used to verify a certificate
+// signature. pvDefaultPara points to the szOID of the certificate
+// signature algorithm, for example, szOID_OIWSEC_md5RSA. If
+// pvDefaultPara is NULL, then, the HCRYPTPROV is used to verify all
+// certificate signatures. Note, pvDefaultPara can't be NULL when
+// CRYPT_DEFAULT_CONTEXT_PROCESS_FLAG is set.
+//--------------------------------------------------------------------------
+
+//+-------------------------------------------------------------------------
+// CRYPT_DEFAULT_CONTEXT_MULTI_CERT_SIGN_OID
+//
+// Same as CRYPT_DEFAULT_CONTEXT_CERT_SIGN_OID. However, the default
+// HCRYPTPROV is to be used for multiple signature szOIDs. pvDefaultPara
+// points to a CRYPT_DEFAULT_CONTEXT_MULTI_OID_PARA structure containing
+// an array of szOID pointers.
+//--------------------------------------------------------------------------
+
+type
+ PCRYPT_DEFAULT_CONTEXT_MULTI_OID_PARA = ^CRYPT_DEFAULT_CONTEXT_MULTI_OID_PARA;
+ {$EXTERNALSYM PCRYPT_DEFAULT_CONTEXT_MULTI_OID_PARA}
+ _CRYPT_DEFAULT_CONTEXT_MULTI_OID_PARA = record
+ cOID: DWORD;
+ rgpszOID: LPLPSTR;
+ end;
+ {$EXTERNALSYM _CRYPT_DEFAULT_CONTEXT_MULTI_OID_PARA}
+ CRYPT_DEFAULT_CONTEXT_MULTI_OID_PARA = _CRYPT_DEFAULT_CONTEXT_MULTI_OID_PARA;
+ {$EXTERNALSYM CRYPT_DEFAULT_CONTEXT_MULTI_OID_PARA}
+ TCryptDefaultContextMultiOidPara = CRYPT_DEFAULT_CONTEXT_MULTI_OID_PARA;
+ PCryptDefaultContextMultiOidPara = PCRYPT_DEFAULT_CONTEXT_MULTI_OID_PARA;
+
+//+-------------------------------------------------------------------------
+// Uninstall a default context previously installed by
+// CryptInstallDefaultContext.
+//
+// For a default context installed with CRYPT_DEFAULT_CONTEXT_PROCESS_FLAG
+// set, if any other threads are currently using this context,
+// this function will block until they finish.
+//--------------------------------------------------------------------------
+
+function CryptUninstallDefaultContext(hDefaultContext: HCRYPTDEFAULTCONTEXT;
+ dwFlags: DWORD; pvReserved: Pointer): BOOL; stdcall;
+{$EXTERNALSYM CryptUninstallDefaultContext}
+
+//+-------------------------------------------------------------------------
+// Export the public key info associated with the provider's corresponding
+// private key.
+//
+// Calls CryptExportPublicKeyInfo with pszPublicKeyObjId = szOID_RSA_RSA,
+// dwFlags = 0 and pvAuxInfo = NULL.
+//--------------------------------------------------------------------------
+
+function CryptExportPublicKeyInfo(hCryptProv: HCRYPTPROV; dwKeySpec: DWORD;
+ dwCertEncodingType: DWORD; pInfo: PCERT_PUBLIC_KEY_INFO; var pcbInfo: DWORD): BOOL; stdcall;
+{$EXTERNALSYM CryptExportPublicKeyInfo}
+
+//+-------------------------------------------------------------------------
+// Export the public key info associated with the provider's corresponding
+// private key.
+//
+// Uses the dwCertEncodingType and pszPublicKeyObjId to call the
+// installable CRYPT_OID_EXPORT_PUBLIC_KEY_INFO_FUNC. The called function
+// has the same signature as CryptExportPublicKeyInfoEx.
+//
+// If unable to find an installable OID function for the pszPublicKeyObjId,
+// attempts to export as a RSA Public Key (szOID_RSA_RSA).
+//
+// The dwFlags and pvAuxInfo aren't used for szOID_RSA_RSA.
+//--------------------------------------------------------------------------
+
+const
+ CRYPT_OID_EXPORT_PUBLIC_KEY_INFO_FUNC = 'CryptDllExportPublicKeyInfoEx';
+ {$EXTERNALSYM CRYPT_OID_EXPORT_PUBLIC_KEY_INFO_FUNC}
+
+function CryptExportPublicKeyInfoEx(hCryptProv: HCRYPTPROV; dwKeySpec: DWORD;
+ dwCertEncodingType: DWORD; pszPublicKeyObjId: LPSTR; dwFlags: DWORD;
+ pvAuxInfo: Pointer; pInfo: PCERT_PUBLIC_KEY_INFO; var pcbInfo: DWORD): BOOL; stdcall;
+{$EXTERNALSYM CryptExportPublicKeyInfoEx}
+
+//+-------------------------------------------------------------------------
+// Convert and import the public key info into the provider and return a
+// handle to the public key.
+//
+// Calls CryptImportPublicKeyInfoEx with aiKeyAlg = 0, dwFlags = 0 and
+// pvAuxInfo = NULL.
+//--------------------------------------------------------------------------
+
+function CryptImportPublicKeyInfo(hCryptProv: HCRYPTPROV; dwCertEncodingType: DWORD;
+ pInfo: PCERT_PUBLIC_KEY_INFO; var phKey: HCRYPTKEY): BOOL; stdcall;
+{$EXTERNALSYM CryptImportPublicKeyInfo}
+
+//+-------------------------------------------------------------------------
+// Convert and import the public key info into the provider and return a
+// handle to the public key.
+//
+// Uses the dwCertEncodingType and pInfo->Algorithm.pszObjId to call the
+// installable CRYPT_OID_IMPORT_PUBLIC_KEY_INFO_FUNC. The called function
+// has the same signature as CryptImportPublicKeyInfoEx.
+//
+// If unable to find an installable OID function for the pszObjId,
+// attempts to import as a RSA Public Key (szOID_RSA_RSA).
+//
+// For szOID_RSA_RSA: aiKeyAlg may be set to CALG_RSA_SIGN or CALG_RSA_KEYX.
+// Defaults to CALG_RSA_KEYX. The dwFlags and pvAuxInfo aren't used.
+//--------------------------------------------------------------------------
+
+const
+ CRYPT_OID_IMPORT_PUBLIC_KEY_INFO_FUNC = 'CryptDllImportPublicKeyInfoEx';
+ {$EXTERNALSYM CRYPT_OID_IMPORT_PUBLIC_KEY_INFO_FUNC}
+
+function CryptImportPublicKeyInfoEx(hCryptProv: HCRYPTPROV; dwCertEncodingType: DWORD;
+ pInfo: PCERT_PUBLIC_KEY_INFO; aiKeyAlg: ALG_ID; dwFlags: DWORD; pvAuxInfo: Pointer;
+ var phKey: HCRYPTKEY): BOOL; stdcall;
+{$EXTERNALSYM CryptImportPublicKeyInfoEx}
+
+//+-------------------------------------------------------------------------
+// Acquire a HCRYPTPROV handle and dwKeySpec for the specified certificate
+// context. Uses the certificate's CERT_KEY_PROV_INFO_PROP_ID property.
+// The returned HCRYPTPROV handle may optionally be cached using the
+// certificate's CERT_KEY_CONTEXT_PROP_ID property.
+//
+// If CRYPT_ACQUIRE_CACHE_FLAG is set, then, if an already acquired and
+// cached HCRYPTPROV exists for the certificate, its returned. Otherwise,
+// a HCRYPTPROV is acquired and then cached via the certificate's
+// CERT_KEY_CONTEXT_PROP_ID.
+//
+// The CRYPT_ACQUIRE_USE_PROV_INFO_FLAG can be set to use the dwFlags field of
+// the certificate's CERT_KEY_PROV_INFO_PROP_ID property's CRYPT_KEY_PROV_INFO
+// data structure to determine if the returned HCRYPTPROV should be cached.
+// HCRYPTPROV caching is enabled if the CERT_SET_KEY_CONTEXT_PROP_ID flag was
+// set.
+//
+// If CRYPT_ACQUIRE_COMPARE_KEY_FLAG is set, then,
+// the public key in the certificate is compared with the public
+// key returned by the cryptographic provider. If the keys don't match, the
+// acquire fails and LastError is set to NTE_BAD_PUBLIC_KEY. Note, if
+// a cached HCRYPTPROV is returned, the comparison isn't done. We assume the
+// comparison was done on the initial acquire.
+//
+// *pfCallerFreeProv is returned set to FALSE for:
+// - Acquire or public key comparison fails.
+// - CRYPT_ACQUIRE_CACHE_FLAG is set.
+// - CRYPT_ACQUIRE_USE_PROV_INFO_FLAG is set AND
+// CERT_SET_KEY_CONTEXT_PROP_ID flag is set in the dwFlags field of the
+// certificate's CERT_KEY_PROV_INFO_PROP_ID property's
+// CRYPT_KEY_PROV_INFO data structure.
+// When *pfCallerFreeProv is FALSE, the caller must not release. The
+// returned HCRYPTPROV will be released on the last free of the certificate
+// context.
+//
+// Otherwise, *pfCallerFreeProv is TRUE and the returned HCRYPTPROV must
+// be released by the caller by calling CryptReleaseContext.
+//--------------------------------------------------------------------------
+
+function CryptAcquireCertificatePrivateKey(pCert: PCCERT_CONTEXT; dwFlags: DWORD;
+ pvReserved: Pointer; var phCryptProv: HCRYPTPROV; pdwKeySpec: LPDWORD;
+ pfCallerFreeProv: PBOOL): BOOL; stdcall;
+{$EXTERNALSYM CryptAcquireCertificatePrivateKey}
+
+const
+ CRYPT_ACQUIRE_CACHE_FLAG = $1;
+ {$EXTERNALSYM CRYPT_ACQUIRE_CACHE_FLAG}
+ CRYPT_ACQUIRE_USE_PROV_INFO_FLAG = $2;
+ {$EXTERNALSYM CRYPT_ACQUIRE_USE_PROV_INFO_FLAG}
+ CRYPT_ACQUIRE_COMPARE_KEY_FLAG = $4;
+ {$EXTERNALSYM CRYPT_ACQUIRE_COMPARE_KEY_FLAG}
+
+//+-------------------------------------------------------------------------
+// Enumerates the cryptographic providers and their containers to find the
+// private key corresponding to the certificate's public key. For a match,
+// the certificate's CERT_KEY_PROV_INFO_PROP_ID property is updated.
+//
+// If the CERT_KEY_PROV_INFO_PROP_ID is already set, then, its checked to
+// see if it matches the provider's public key. For a match, the above
+// enumeration is skipped.
+//
+// By default both the user and machine key containers are searched.
+// The CRYPT_FIND_USER_KEYSET_FLAG or CRYPT_FIND_MACHINE_KEYSET_FLAG
+// can be set in dwFlags to restrict the search to either of the containers.
+//
+// If a container isn't found, returns FALSE with LastError set to
+// NTE_NO_KEY.
+//--------------------------------------------------------------------------
+
+function CryptFindCertificateKeyProvInfo(pCert: PCCERT_CONTEXT; dwFlags: DWORD;
+ pvReserved: Pointer): BOOL; stdcall;
+{$EXTERNALSYM CryptFindCertificateKeyProvInfo}
+
+const
+ CRYPT_FIND_USER_KEYSET_FLAG = $1;
+ {$EXTERNALSYM CRYPT_FIND_USER_KEYSET_FLAG}
+ CRYPT_FIND_MACHINE_KEYSET_FLAG = $2;
+ {$EXTERNALSYM CRYPT_FIND_MACHINE_KEYSET_FLAG}
+
+//+-------------------------------------------------------------------------
+// This is the prototype for the installable function which is called to
+// actually import a key into a CSP. an installable of this type is called
+// from CryptImportPKCS8. the algorithm OID of the private key is used
+// to look up the proper installable function to call.
+//
+// hCryptProv - the provider to import the key to
+// pPrivateKeyInfo - describes the key to be imported
+// dwFlags - The available flags are:
+// CRYPT_EXPORTABLE
+// this flag is used when importing private keys, for a full
+// explanation please see the documentation for CryptImportKey.
+// pvAuxInfo - reserved for future, must be NULL
+//--------------------------------------------------------------------------
+
+type
+ PFN_IMPORT_PRIV_KEY_FUNC = function(hCryptProv: HCRYPTPROV;
+ pPrivateKeyInfo: PCRYPT_PRIVATE_KEY_INFO; dwFlags: DWORD;
+ pvAuxInfo: Pointer): BOOL; stdcall;
+ {$EXTERNALSYM PFN_IMPORT_PRIV_KEY_FUNC}
+ PFnImportPrivKeyFunc = PFN_IMPORT_PRIV_KEY_FUNC;
+
+const
+ CRYPT_OID_IMPORT_PRIVATE_KEY_INFO_FUNC = 'CryptDllImportPrivateKeyInfoEx';
+ {$EXTERNALSYM CRYPT_OID_IMPORT_PRIVATE_KEY_INFO_FUNC}
+
+//+-------------------------------------------------------------------------
+// Convert (from PKCS8 format) and import the private key into a provider
+// and return a handle to the provider as well as the KeySpec used to import to.
+//
+// This function will call the PRESOLVE_HCRYPTPROV_FUNC in the
+// privateKeyAndParams to obtain a handle of provider to import the key to.
+// if the PRESOLVE_HCRYPTPROV_FUNC is NULL then the default provider will be used.
+//
+// privateKeyAndParams - private key blob and corresponding parameters
+// dwFlags - The available flags are:
+// CRYPT_EXPORTABLE
+// this flag is used when importing private keys, for a full
+// explanation please see the documentation for CryptImportKey.
+// phCryptProv - filled in with the handle of the provider the key was
+// imported to, the caller is responsible for freeing it
+// pvAuxInfo - This parameter is reserved for future use and should be set
+// to NULL in the interim.
+//--------------------------------------------------------------------------
+
+function CryptImportPKCS8(sImportParams: CRYPT_PKCS8_IMPORT_PARAMS; dwFlags: DWORD;
+ phCryptProv: PHCRYPTPROV; pvAuxInfo: Pointer): BOOL; stdcall;
+{$EXTERNALSYM CryptImportPKCS8}
+
+//+-------------------------------------------------------------------------
+// this is the prototype for installable functions for exporting the private key
+//--------------------------------------------------------------------------
+
+type
+ PFN_EXPORT_PRIV_KEY_FUNC = function(hCryptProv: HCRYPTPROV; dwKeySpec: DWORD;
+ pszPrivateKeyObjId: LPSTR; dwFlags: DWORD; pvAuxInfo: Pointer;
+ var pPrivateKeyInfo: CRYPT_PRIVATE_KEY_INFO; var pcbPrivateKeyBlob: DWORD): BOOL; stdcall;
+ {$EXTERNALSYM PFN_EXPORT_PRIV_KEY_FUNC}
+ PfnExportPrivKeyFunc = PFN_EXPORT_PRIV_KEY_FUNC;
+
+const
+ CRYPT_OID_EXPORT_PRIVATE_KEY_INFO_FUNC = 'CryptDllExportPrivateKeyInfoEx';
+ {$EXTERNALSYM CRYPT_OID_EXPORT_PRIVATE_KEY_INFO_FUNC}
+
+ CRYPT_DELETE_KEYSET = $0001;
+ {$EXTERNALSYM CRYPT_DELETE_KEYSET}
+
+//+-------------------------------------------------------------------------
+// CryptExportPKCS8 -- superseded by CryptExportPKCS8Ex
+//
+// Export the private key in PKCS8 format
+//--------------------------------------------------------------------------
+
+function CryptExportPKCS8(hCryptProv: HCRYPTPROV; dwKeySpec: DWORD;
+ pszPrivateKeyObjId: LPSTR; dwFlags: DWORD; pvAuxInfo: Pointer;
+ pbPrivateKeyBlob: LPBYTE; var pcbPrivateKeyBlob: DWORD): BOOL; stdcall;
+{$EXTERNALSYM CryptExportPKCS8}
+
+//+-------------------------------------------------------------------------
+// CryptExportPKCS8Ex
+//
+// Export the private key in PKCS8 format
+//
+//
+// Uses the pszPrivateKeyObjId to call the
+// installable CRYPT_OID_EXPORT_PRIVATE_KEY_INFO_FUNC. The called function
+// has the signature defined by PFN_EXPORT_PRIV_KEY_FUNC.
+//
+// If unable to find an installable OID function for the pszPrivateKeyObjId,
+// attempts to export as a RSA Private Key (szOID_RSA_RSA).
+//
+// psExportParams - specifies information about the key to export
+// dwFlags - The flag values. None currently supported
+// pvAuxInfo - This parameter is reserved for future use and should be set to
+// NULL in the interim.
+// pbPrivateKeyBlob - A pointer to the private key blob. It will be encoded
+// as a PKCS8 PrivateKeyInfo.
+// pcbPrivateKeyBlob - A pointer to a DWORD that contains the size, in bytes,
+// of the private key blob being exported.
+//+-------------------------------------------------------------------------
+
+function CryptExportPKCS8Ex(psExportParams: PCRYPT_PKCS8_EXPORT_PARAMS;
+ dwFlags: DWORD; pvAuxInfo: Pointer; pbPrivateKeyBlob: LPBYTE;
+ var pcbPrivateKeyBlob: DWORD): BOOL; stdcall;
+{$EXTERNALSYM CryptExportPKCS8Ex}
+
+//+-------------------------------------------------------------------------
+// Compute the hash of the encoded public key info.
+//
+// The public key info is encoded and then hashed.
+//--------------------------------------------------------------------------
+
+function CryptHashPublicKeyInfo(hCryptProv: HCRYPTPROV; Algid: ALG_ID;
+ dwFlags: DWORD; dwCertEncodingType: DWORD; pInfo: PCERT_PUBLIC_KEY_INFO;
+ pbComputedHash: LPBYTE; var pcbComputedHash: DWORD): BOOL; stdcall;
+{$EXTERNALSYM CryptHashPublicKeyInfo}
+
+//+-------------------------------------------------------------------------
+// Convert a Name Value to a null terminated char string
+//
+// Returns the number of characters converted including the terminating null
+// character. If psz is NULL or csz is 0, returns the required size of the
+// destination string (including the terminating null char).
+//
+// If psz != NULL && csz != 0, returned psz is always NULL terminated.
+//
+// Note: csz includes the NULL char.
+//--------------------------------------------------------------------------
+
+function CertRDNValueToStrA(dwValueType: DWORD; pValue: PCERT_RDN_VALUE_BLOB;
+ psz: LPSTR; csz: DWORD): DWORD; stdcall;
+{$EXTERNALSYM CertRDNValueToStrA}
+
+//+-------------------------------------------------------------------------
+// Convert a Name Value to a null terminated char string
+//
+// Returns the number of characters converted including the terminating null
+// character. If psz is NULL or csz is 0, returns the required size of the
+// destination string (including the terminating null char).
+//
+// If psz != NULL && csz != 0, returned psz is always NULL terminated.
+//
+// Note: csz includes the NULL char.
+//--------------------------------------------------------------------------
+
+function CertRDNValueToStrW(dwValueType: DWORD; pValue: PCERT_RDN_VALUE_BLOB;
+ psz: LPWSTR; csz: DWORD): DWORD; stdcall;
+{$EXTERNALSYM CertRDNValueToStrW}
+function CertRDNValueToStr(dwValueType: DWORD; pValue: PCERT_RDN_VALUE_BLOB;
+ psz: LPTSTR; csz: DWORD): DWORD; stdcall;
+{$EXTERNALSYM CertRDNValueToStr}
+
+//+-------------------------------------------------------------------------
+// Convert the certificate name blob to a null terminated char string.
+//
+// Follows the string representation of distinguished names specified in
+// RFC 1779. (Note, added double quoting "" for embedded quotes, quote
+// empty strings and don't quote strings containing consecutive spaces).
+// RDN values of type CERT_RDN_ENCODED_BLOB or CERT_RDN_OCTET_STRING are
+// formatted in hexadecimal (e.g. #0A56CF).
+//
+// The name string is formatted according to the dwStrType:
+// CERT_SIMPLE_NAME_STR
+// The object identifiers are discarded. CERT_RDN entries are separated
+// by ", ". Multiple attributes per CERT_RDN are separated by " + ".
+// For example:
+// Microsoft, Joe Cool + Programmer
+// CERT_OID_NAME_STR
+// The object identifiers are included with a "=" separator from their
+// attribute value. CERT_RDN entries are separated by ", ".
+// Multiple attributes per CERT_RDN are separated by " + ". For example:
+// 2.5.4.11=Microsoft, 2.5.4.3=Joe Cool + 2.5.4.12=Programmer
+// CERT_X500_NAME_STR
+// The object identifiers are converted to their X500 key name. Otherwise,
+// same as CERT_OID_NAME_STR. If the object identifier doesn't have
+// a corresponding X500 key name, then, the object identifier is used with
+// a "OID." prefix. For example:
+// OU=Microsoft, CN=Joe Cool + T=Programmer, OID.1.2.3.4.5.6=Unknown
+//
+// We quote the RDN value if it contains leading or trailing whitespace
+// or one of the following characters: ",", "+", "=", """, "\n", "<", ">",
+// "#" or ";". The quoting character is ". If the the RDN Value contains
+// a " it is double quoted (""). For example:
+// OU=" Microsoft", CN="Joe ""Cool""" + T="Programmer, Manager"
+//
+// CERT_NAME_STR_SEMICOLON_FLAG can be or'ed into dwStrType to replace
+// the ", " separator with a "; " separator.
+//
+// CERT_NAME_STR_CRLF_FLAG can be or'ed into dwStrType to replace
+// the ", " separator with a "\r\n" separator.
+//
+// CERT_NAME_STR_NO_PLUS_FLAG can be or'ed into dwStrType to replace the
+// " + " separator with a single space, " ".
+//
+// CERT_NAME_STR_NO_QUOTING_FLAG can be or'ed into dwStrType to inhibit
+// the above quoting.
+//
+// CERT_NAME_STR_REVERSE_FLAG can be or'ed into dwStrType to reverse the
+// order of the RDNs before converting to the string.
+//
+// By default, CERT_RDN_T61_STRING encoded values are initially decoded
+// as UTF8. If the UTF8 decoding fails, then, decoded as 8 bit characters.
+// CERT_NAME_STR_DISABLE_IE4_UTF8_FLAG can be or'ed into dwStrType to
+// skip the initial attempt to decode as UTF8.
+//
+// Returns the number of characters converted including the terminating null
+// character. If psz is NULL or csz is 0, returns the required size of the
+// destination string (including the terminating null char).
+//
+// If psz != NULL && csz != 0, returned psz is always NULL terminated.
+//
+// Note: csz includes the NULL char.
+//--------------------------------------------------------------------------
+
+//+-------------------------------------------------------------------------
+//--------------------------------------------------------------------------
+
+function CertNameToStrA(dwCertEncodingType: DWORD; pName: PCERT_NAME_BLOB;
+ dwStrType: DWORD; psz: LPSTR; csz: DWORD): DWORD; stdcall;
+{$EXTERNALSYM CertNameToStrA}
+
+//+-------------------------------------------------------------------------
+//--------------------------------------------------------------------------
+
+function CertNameToStrW(dwCertEncodingType: DWORD; pName: PCERT_NAME_BLOB;
+ dwStrType: DWORD; psz: LPWSTR; csz: DWORD): DWORD; stdcall;
+{$EXTERNALSYM CertNameToStrW}
+function CertNameToStr(dwCertEncodingType: DWORD; pName: PCERT_NAME_BLOB;
+ dwStrType: DWORD; psz: LPTSTR; csz: DWORD): DWORD; stdcall;
+{$EXTERNALSYM CertNameToStr}
+
+//+-------------------------------------------------------------------------
+// Certificate name string types
+//--------------------------------------------------------------------------
+
+const
+ CERT_SIMPLE_NAME_STR = 1;
+ {$EXTERNALSYM CERT_SIMPLE_NAME_STR}
+ CERT_OID_NAME_STR = 2;
+ {$EXTERNALSYM CERT_OID_NAME_STR}
+ CERT_X500_NAME_STR = 3;
+ {$EXTERNALSYM CERT_X500_NAME_STR}
+
+//+-------------------------------------------------------------------------
+// Certificate name string type flags OR'ed with the above types
+//--------------------------------------------------------------------------
+
+ CERT_NAME_STR_SEMICOLON_FLAG = $40000000;
+ {$EXTERNALSYM CERT_NAME_STR_SEMICOLON_FLAG}
+ CERT_NAME_STR_NO_PLUS_FLAG = $20000000;
+ {$EXTERNALSYM CERT_NAME_STR_NO_PLUS_FLAG}
+ CERT_NAME_STR_NO_QUOTING_FLAG = $10000000;
+ {$EXTERNALSYM CERT_NAME_STR_NO_QUOTING_FLAG}
+ CERT_NAME_STR_CRLF_FLAG = $08000000;
+ {$EXTERNALSYM CERT_NAME_STR_CRLF_FLAG}
+ CERT_NAME_STR_COMMA_FLAG = $04000000;
+ {$EXTERNALSYM CERT_NAME_STR_COMMA_FLAG}
+ CERT_NAME_STR_REVERSE_FLAG = $02000000;
+ {$EXTERNALSYM CERT_NAME_STR_REVERSE_FLAG}
+
+ CERT_NAME_STR_DISABLE_IE4_UTF8_FLAG = $00010000;
+ {$EXTERNALSYM CERT_NAME_STR_DISABLE_IE4_UTF8_FLAG}
+ CERT_NAME_STR_ENABLE_T61_UNICODE_FLAG = $00020000;
+ {$EXTERNALSYM CERT_NAME_STR_ENABLE_T61_UNICODE_FLAG}
+ CERT_NAME_STR_ENABLE_UTF8_UNICODE_FLAG = $00040000;
+ {$EXTERNALSYM CERT_NAME_STR_ENABLE_UTF8_UNICODE_FLAG}
+
+//+-------------------------------------------------------------------------
+// Convert the null terminated X500 string to an encoded certificate name.
+//
+// The input string is expected to be formatted the same as the output
+// from the above CertNameToStr API.
+//
+// The CERT_SIMPLE_NAME_STR type isn't supported. Otherwise, when dwStrType
+// is set to 0, CERT_OID_NAME_STR or CERT_X500_NAME_STR, allow either a
+// case insensitive X500 key (CN=), case insensitive "OID." prefixed
+// object identifier (OID.1.2.3.4.5.6=) or an object identifier (1.2.3.4=).
+//
+// If no flags are OR'ed into dwStrType, then, allow "," or ";" as RDN
+// separators and "+" as the multiple RDN value separator. Quoting is
+// supported. A quote may be included in a quoted value by double quoting,
+// for example (CN="Joe ""Cool"""). A value starting with a "#" is treated
+// as ascii hex and converted to a CERT_RDN_OCTET_STRING. Embedded whitespace
+// is skipped (1.2.3 = # AB CD 01 is the same as 1.2.3=#ABCD01).
+//
+// Whitespace surrounding the keys, object identifers and values is removed.
+//
+// CERT_NAME_STR_COMMA_FLAG can be or'ed into dwStrType to only allow the
+// "," as the RDN separator.
+//
+// CERT_NAME_STR_SEMICOLON_FLAG can be or'ed into dwStrType to only allow the
+// ";" as the RDN separator.
+//
+// CERT_NAME_STR_CRLF_FLAG can be or'ed into dwStrType to only allow
+// "\r" or "\n" as the RDN separator.
+//
+// CERT_NAME_STR_NO_PLUS_FLAG can be or'ed into dwStrType to ignore "+"
+// as a separator and not allow multiple values per RDN.
+//
+// CERT_NAME_STR_NO_QUOTING_FLAG can be or'ed into dwStrType to inhibit
+// quoting.
+//
+// CERT_NAME_STR_REVERSE_FLAG can be or'ed into dwStrType to reverse the
+// order of the RDNs after converting from the string and before encoding.
+//
+// CERT_NAME_STR_ENABLE_T61_UNICODE_FLAG can be or'ed into dwStrType to
+// to select the CERT_RDN_T61_STRING encoded value type instead of
+// CERT_RDN_UNICODE_STRING if all the UNICODE characters are <= 0xFF.
+//
+// CERT_NAME_STR_ENABLE_UTF8_UNICODE_FLAG can be or'ed into dwStrType to
+// to select the CERT_RDN_UTF8_STRING encoded value type instead of
+// CERT_RDN_UNICODE_STRING.
+//
+// Support the following X500 Keys:
+//
+// Key Object Identifier RDN Value Type(s)
+// --- ----------------- -----------------
+// CN szOID_COMMON_NAME Printable, Unicode
+// L szOID_LOCALITY_NAME Printable, Unicode
+// O szOID_ORGANIZATION_NAME Printable, Unicode
+// OU szOID_ORGANIZATIONAL_UNIT_NAME Printable, Unicode
+// E szOID_RSA_emailAddr Only IA5
+// Email szOID_RSA_emailAddr Only IA5
+// C szOID_COUNTRY_NAME Only Printable
+// S szOID_STATE_OR_PROVINCE_NAME Printable, Unicode
+// ST szOID_STATE_OR_PROVINCE_NAME Printable, Unicode
+// STREET szOID_STREET_ADDRESS Printable, Unicode
+// T szOID_TITLE Printable, Unicode
+// Title szOID_TITLE Printable, Unicode
+// G szOID_GIVEN_NAME Printable, Unicode
+// GivenName szOID_GIVEN_NAME Printable, Unicode
+// I szOID_INITIALS Printable, Unicode
+// Initials szOID_INITIALS Printable, Unicode
+// SN szOID_SUR_NAME Printable, Unicode
+// DC szOID_DOMAIN_COMPONENT IA5, UTF8
+//
+// Note, T61 is selected instead of Unicode if
+// CERT_NAME_STR_ENABLE_T61_UNICODE_FLAG is set and all the unicode
+// characters are <= 0xFF.
+//
+// Note, UTF8 is selected instead of Unicode if
+// CERT_NAME_STR_ENABLE_UTF8_UNICODE_FLAG is set.
+//
+// Returns TRUE if successfully parsed the input string and encoded
+// the name.
+//
+// If the input string is detected to be invalid, *ppszError is updated
+// to point to the beginning of the invalid character sequence. Otherwise,
+// *ppszError is set to NULL. *ppszError is updated with a non-NULL pointer
+// for the following errors:
+// CRYPT_E_INVALID_X500_STRING
+// CRYPT_E_INVALID_NUMERIC_STRING
+// CRYPT_E_INVALID_PRINTABLE_STRING
+// CRYPT_E_INVALID_IA5_STRING
+//
+// ppszError can be set to NULL if not interested in getting a pointer
+// to the invalid character sequence.
+//--------------------------------------------------------------------------
+
+//+-------------------------------------------------------------------------
+//--------------------------------------------------------------------------
+
+function CertStrToNameA(dwCertEncodingType: DWORD; pszX500: LPCSTR;
+ dwStrType: DWORD; pvReserved: Pointer; pbEncoded: LPBYTE; var pcbEncoded: DWORD;
+ ppszError: LPLPCSTR): BOOL; stdcall;
+{$EXTERNALSYM CertStrToNameA}
+function CertStrToNameW(dwCertEncodingType: DWORD; pszX500: LPCWSTR;
+ dwStrType: DWORD; pvReserved: Pointer; pbEncoded: LPBYTE; var pcbEncoded: DWORD;
+ ppszError: LPLPCWSTR): BOOL; stdcall;
+{$EXTERNALSYM CertStrToNameW}
+function CertStrToName(dwCertEncodingType: DWORD; pszX500: LPCTSTR;
+ dwStrType: DWORD; pvReserved: Pointer; pbEncoded: LPBYTE; var pcbEncoded: DWORD;
+ ppszError: LPLPCTSTR): BOOL; stdcall;
+{$EXTERNALSYM CertStrToName}
+
+//+-------------------------------------------------------------------------
+// Get the subject or issuer name from the certificate and
+// according to the specified format type, convert to a null terminated
+// character string.
+//
+// CERT_NAME_ISSUER_FLAG can be set to get the issuer's name. Otherwise,
+// gets the subject's name.
+//
+// By default, CERT_RDN_T61_STRING encoded values are initially decoded
+// as UTF8. If the UTF8 decoding fails, then, decoded as 8 bit characters.
+// CERT_NAME_DISABLE_IE4_UTF8_FLAG can be set in dwFlags to
+// skip the initial attempt to decode as UTF8.
+//
+// The name string is formatted according to the dwType:
+// CERT_NAME_EMAIL_TYPE
+// If the certificate has a Subject Alternative Name extension (for
+// issuer, Issuer Alternative Name), searches for first rfc822Name choice.
+// If the rfc822Name choice isn't found in the extension, searches the
+// Subject Name field for the Email OID, "1.2.840.113549.1.9.1".
+// If the rfc822Name or Email OID is found, returns the string. Otherwise,
+// returns an empty string (returned character count is 1).
+// CERT_NAME_RDN_TYPE
+// Converts the Subject Name blob by calling CertNameToStr. pvTypePara
+// points to a DWORD containing the dwStrType passed to CertNameToStr.
+// If the Subject Name field is empty and the certificate has a
+// Subject Alternative Name extension, searches for and converts
+// the first directoryName choice.
+// CERT_NAME_ATTR_TYPE
+// pvTypePara points to the Object Identifier specifying the name attribute
+// to be returned. For example, to get the CN,
+// pvTypePara = szOID_COMMON_NAME ("2.5.4.3"). Searches, the Subject Name
+// field for the attribute.
+// If the Subject Name field is empty and the certificate has a
+// Subject Alternative Name extension, checks for
+// the first directoryName choice and searches it.
+//
+// Note, searches the RDNs in reverse order.
+//
+// CERT_NAME_SIMPLE_DISPLAY_TYPE
+// Iterates through the following list of name attributes and searches
+// the Subject Name and then the Subject Alternative Name extension
+// for the first occurrence of:
+// szOID_COMMON_NAME ("2.5.4.3")
+// szOID_ORGANIZATIONAL_UNIT_NAME ("2.5.4.11")
+// szOID_ORGANIZATION_NAME ("2.5.4.10")
+// szOID_RSA_emailAddr ("1.2.840.113549.1.9.1")
+//
+// If none of the above attributes is found, then, searches the
+// Subject Alternative Name extension for a rfc822Name choice.
+//
+// If still no match, then, returns the first attribute.
+//
+// Note, like CERT_NAME_ATTR_TYPE, searches the RDNs in reverse order.
+//
+// CERT_NAME_FRIENDLY_DISPLAY_TYPE
+// First checks if the certificate has a CERT_FRIENDLY_NAME_PROP_ID
+// property. If it does, then, this property is returned. Otherwise,
+// returns the above CERT_NAME_SIMPLE_DISPLAY_TYPE.
+//
+// Returns the number of characters converted including the terminating null
+// character. If pwszNameString is NULL or cchNameString is 0, returns the
+// required size of the destination string (including the terminating null
+// char). If the specified name type isn't found. returns an empty string
+// with a returned character count of 1.
+//
+// If pwszNameString != NULL && cwszNameString != 0, returned pwszNameString
+// is always NULL terminated.
+//
+// Note: cchNameString includes the NULL char.
+//--------------------------------------------------------------------------
+
+//+-------------------------------------------------------------------------
+//--------------------------------------------------------------------------
+
+function CertGetNameStringA(pCertContext: PCCERT_CONTEXT; dwType, dwFlags: DWORD;
+ pvTypePara: Pointer; pszNameString: LPSTR; cchNameString: DWORD): DWORD; stdcall;
+{$EXTERNALSYM CertGetNameStringA}
+function CertGetNameStringW(pCertContext: PCCERT_CONTEXT; dwType, dwFlags: DWORD;
+ pvTypePara: Pointer; pszNameString: LPWSTR; cchNameString: DWORD): DWORD; stdcall;
+{$EXTERNALSYM CertGetNameStringW}
+function CertGetNameString(pCertContext: PCCERT_CONTEXT; dwType, dwFlags: DWORD;
+ pvTypePara: Pointer; pszNameString: LPTSTR; cchNameString: DWORD): DWORD; stdcall;
+{$EXTERNALSYM CertGetNameString}
+
+//+-------------------------------------------------------------------------
+// Certificate name types
+//--------------------------------------------------------------------------
+
+const
+ CERT_NAME_EMAIL_TYPE = 1;
+ {$EXTERNALSYM CERT_NAME_EMAIL_TYPE}
+ CERT_NAME_RDN_TYPE = 2;
+ {$EXTERNALSYM CERT_NAME_RDN_TYPE}
+ CERT_NAME_ATTR_TYPE = 3;
+ {$EXTERNALSYM CERT_NAME_ATTR_TYPE}
+ CERT_NAME_SIMPLE_DISPLAY_TYPE = 4;
+ {$EXTERNALSYM CERT_NAME_SIMPLE_DISPLAY_TYPE}
+ CERT_NAME_FRIENDLY_DISPLAY_TYPE = 5;
+ {$EXTERNALSYM CERT_NAME_FRIENDLY_DISPLAY_TYPE}
+
+//+-------------------------------------------------------------------------
+// Certificate name flags
+//--------------------------------------------------------------------------
+
+ CERT_NAME_ISSUER_FLAG = $1;
+ {$EXTERNALSYM CERT_NAME_ISSUER_FLAG}
+ CERT_NAME_DISABLE_IE4_UTF8_FLAG = $00010000;
+ {$EXTERNALSYM CERT_NAME_DISABLE_IE4_UTF8_FLAG}
+
+//+=========================================================================
+// Simplified Cryptographic Message Data Structures and APIs
+//==========================================================================
+
+//+-------------------------------------------------------------------------
+// Conventions for the *pb and *pcb output parameters:
+//
+// Upon entry to the function:
+// if pcb is OPTIONAL && pcb == NULL, then,
+// No output is returned
+// else if pb == NULL && pcb != NULL, then,
+// Length only determination. No length error is
+// returned.
+// otherwise where (pb != NULL && pcb != NULL && *pcb != 0)
+// Output is returned. If *pcb isn't big enough a
+// length error is returned. In all cases *pcb is updated
+// with the actual length needed/returned.
+//--------------------------------------------------------------------------
+
+//+-------------------------------------------------------------------------
+// Type definitions of the parameters used for doing the cryptographic
+// operations.
+//--------------------------------------------------------------------------
+
+//+-------------------------------------------------------------------------
+// Callback to get and verify the signer's certificate.
+//
+// Passed the CertId of the signer (its Issuer and SerialNumber) and a
+// handle to its cryptographic signed message's cert store.
+//
+// For CRYPT_E_NO_SIGNER, called with pSignerId == NULL.
+//
+// For a valid signer certificate, returns a pointer to a read only
+// CERT_CONTEXT. The returned CERT_CONTEXT is either obtained from a
+// cert store or was created via CertCreateCertificateContext. For either case,
+// its freed via CertFreeCertificateContext.
+//
+// If a valid certificate isn't found, this callback returns NULL with
+// LastError set via SetLastError().
+//
+// The NULL implementation tries to get the Signer certificate from the
+// message cert store. It doesn't verify the certificate.
+//
+// Note, if the KEYID choice was selected for a CMS SignerId, then, the
+// SerialNumber is 0 and the Issuer is encoded containing a single RDN with a
+// single Attribute whose OID is szOID_KEYID_RDN, value type is
+// CERT_RDN_OCTET_STRING and value is the KEYID. When the
+// CertGetSubjectCertificateFromStore and
+// CertFindCertificateInStore(CERT_FIND_SUBJECT_CERT) APIs see this
+// special KEYID Issuer and SerialNumber, they do a KEYID match.
+//--------------------------------------------------------------------------
+
+type
+ PFN_CRYPT_GET_SIGNER_CERTIFICATE = function(pvGetArg: Pointer;
+ dwCertEncodingType: DWORD; pSignerId: PCERT_INFO;
+ hMsgCertStore: HCERTSTORE): PCCERT_CONTEXT; stdcall;
+ {$EXTERNALSYM PFN_CRYPT_GET_SIGNER_CERTIFICATE}
+ PfnCryptGetSignerCertificate = PFN_CRYPT_GET_SIGNER_CERTIFICATE;
+
+//+-------------------------------------------------------------------------
+// The CRYPT_SIGN_MESSAGE_PARA are used for signing messages using the
+// specified signing certificate context.
+//
+// Either the CERT_KEY_PROV_HANDLE_PROP_ID or CERT_KEY_PROV_INFO_PROP_ID must
+// be set for each rgpSigningCert[]. Either one specifies the private
+// signature key to use.
+//
+// If any certificates and/or CRLs are to be included in the signed message,
+// then, the MsgCert and MsgCrl parameters need to be updated. If the
+// rgpSigningCerts are to be included, then, they must also be in the
+// rgpMsgCert array.
+//
+// cbSize must be set to the sizeof(CRYPT_SIGN_MESSAGE_PARA) or else
+// LastError will be updated with E_INVALIDARG.
+//
+// pvHashAuxInfo currently isn't used and must be set to NULL.
+//
+// dwFlags normally is set to 0. However, if the encoded output
+// is to be a CMSG_SIGNED inner content of an outer cryptographic message,
+// such as a CMSG_ENVELOPED, then, the CRYPT_MESSAGE_BARE_CONTENT_OUT_FLAG
+// should be set. If not set, then it would be encoded as an inner content
+// type of CMSG_DATA.
+//
+// dwInnerContentType is normally set to 0. It needs to be set if the
+// ToBeSigned input is the encoded output of another cryptographic
+// message, such as, an CMSG_ENVELOPED. When set, it's one of the cryptographic
+// message types, for example, CMSG_ENVELOPED.
+//
+// If the inner content of a nested cryptographic message is data (CMSG_DATA
+// the default), then, neither dwFlags or dwInnerContentType need to be set.
+//
+// For CMS messages, CRYPT_MESSAGE_ENCAPSULATED_CONTENT_OUT_FLAG may be
+// set to encapsulate nonData inner content within an OCTET STRING.
+//
+// For CMS messages, CRYPT_MESSAGE_KEYID_SIGNER_FLAG may be set to identify
+// signers by their Key Identifier and not their Issuer and Serial Number.
+//
+// If HashEncryptionAlgorithm is present and not NULL its used instead of
+// the SigningCert's PublicKeyInfo.Algorithm.
+//
+// Note, for RSA, the hash encryption algorithm is normally the same as
+// the public key algorithm. For DSA, the hash encryption algorithm is
+// normally a DSS signature algorithm.
+//
+// pvHashEncryptionAuxInfo currently isn't used and must be set to NULL if
+// present in the data structure.
+//--------------------------------------------------------------------------
+
+type
+ PCRYPT_SIGN_MESSAGE_PARA = ^CRYPT_SIGN_MESSAGE_PARA;
+ {$EXTERNALSYM PCRYPT_SIGN_MESSAGE_PARA}
+ _CRYPT_SIGN_MESSAGE_PARA = record
+ cbSize: DWORD;
+ dwMsgEncodingType: DWORD;
+ pSigningCert: PCCERT_CONTEXT;
+ HashAlgorithm: CRYPT_ALGORITHM_IDENTIFIER;
+ pvHashAuxInfo: Pointer;
+ cMsgCert: DWORD;
+ rgpMsgCert: PPCCERT_CONTEXT;
+ cMsgCrl: DWORD;
+ rgpMsgCrl: PPCCRL_CONTEXT;
+ cAuthAttr: DWORD;
+ rgAuthAttr: PCRYPT_ATTRIBUTE;
+ cUnauthAttr: DWORD;
+ rgUnauthAttr: PCRYPT_ATTRIBUTE;
+ dwFlags: DWORD;
+ dwInnerContentType: DWORD;
+ {$IFDEF CRYPT_SIGN_MESSAGE_PARA_HAS_CMS_FIELDS}
+ HashEncryptionAlgorithm: CRYPT_ALGORITHM_IDENTIFIER;
+ pvHashEncryptionAuxInfo: Pointer;
+ {$ENDIF CRYPT_SIGN_MESSAGE_PARA_HAS_CMS_FIELDS}
+ end;
+ {$EXTERNALSYM _CRYPT_SIGN_MESSAGE_PARA}
+ CRYPT_SIGN_MESSAGE_PARA = _CRYPT_SIGN_MESSAGE_PARA;
+ {$EXTERNALSYM CRYPT_SIGN_MESSAGE_PARA}
+ TCryptSignMessagePara = CRYPT_SIGN_MESSAGE_PARA;
+ PCryptSignMessagePara = PCRYPT_SIGN_MESSAGE_PARA;
+
+const
+ CRYPT_MESSAGE_BARE_CONTENT_OUT_FLAG = $1;
+ {$EXTERNALSYM CRYPT_MESSAGE_BARE_CONTENT_OUT_FLAG}
+
+// When set, nonData type inner content is encapsulated within an
+// OCTET STRING
+
+ CRYPT_MESSAGE_ENCAPSULATED_CONTENT_OUT_FLAG = $2;
+ {$EXTERNALSYM CRYPT_MESSAGE_ENCAPSULATED_CONTENT_OUT_FLAG}
+
+// When set, signers are identified by their Key Identifier and not
+// their Issuer and Serial Number.
+
+ CRYPT_MESSAGE_KEYID_SIGNER_FLAG = $4;
+ {$EXTERNALSYM CRYPT_MESSAGE_KEYID_SIGNER_FLAG}
+
+//+-------------------------------------------------------------------------
+// The CRYPT_VERIFY_MESSAGE_PARA are used to verify signed messages.
+//
+// hCryptProv is used to do hashing and signature verification.
+//
+// The dwCertEncodingType specifies the encoding type of the certificates
+// and/or CRLs in the message.
+//
+// pfnGetSignerCertificate is called to get and verify the message signer's
+// certificate.
+//
+// cbSize must be set to the sizeof(CRYPT_VERIFY_MESSAGE_PARA) or else
+// LastError will be updated with E_INVALIDARG.
+//--------------------------------------------------------------------------
+
+type
+ PCRYPT_VERIFY_MESSAGE_PARA = ^CRYPT_VERIFY_MESSAGE_PARA;
+ {$EXTERNALSYM PCRYPT_VERIFY_MESSAGE_PARA}
+ _CRYPT_VERIFY_MESSAGE_PARA = record
+ cbSize: DWORD;
+ dwMsgAndCertEncodingType: DWORD;
+ hCryptProv: HCRYPTPROV;
+ pfnGetSignerCertificate: PFN_CRYPT_GET_SIGNER_CERTIFICATE;
+ pvGetArg: Pointer;
+ end;
+ {$EXTERNALSYM _CRYPT_VERIFY_MESSAGE_PARA}
+ CRYPT_VERIFY_MESSAGE_PARA = _CRYPT_VERIFY_MESSAGE_PARA;
+ {$EXTERNALSYM CRYPT_VERIFY_MESSAGE_PARA}
+ TCryptVerifyMessagePara = CRYPT_VERIFY_MESSAGE_PARA;
+ PCryptVerifyMessagePara = PCRYPT_VERIFY_MESSAGE_PARA;
+
+//+-------------------------------------------------------------------------
+// The CRYPT_ENCRYPT_MESSAGE_PARA are used for encrypting messages.
+//
+// hCryptProv is used to do content encryption, recipient key
+// encryption, and recipient key export. Its private key
+// isn't used.
+//
+// Currently, pvEncryptionAuxInfo is only defined for RC2 or RC4 encryption
+// algorithms. Otherwise, its not used and must be set to NULL.
+// See CMSG_RC2_AUX_INFO for the RC2 encryption algorithms.
+// See CMSG_RC4_AUX_INFO for the RC4 encryption algorithms.
+//
+// To enable SP3 compatible encryption, pvEncryptionAuxInfo should point to
+// a CMSG_SP3_COMPATIBLE_AUX_INFO data structure.
+//
+// cbSize must be set to the sizeof(CRYPT_ENCRYPT_MESSAGE_PARA) or else
+// LastError will be updated with E_INVALIDARG.
+//
+// dwFlags normally is set to 0. However, if the encoded output
+// is to be a CMSG_ENVELOPED inner content of an outer cryptographic message,
+// such as a CMSG_SIGNED, then, the CRYPT_MESSAGE_BARE_CONTENT_OUT_FLAG
+// should be set. If not set, then it would be encoded as an inner content
+// type of CMSG_DATA.
+//
+// dwInnerContentType is normally set to 0. It needs to be set if the
+// ToBeEncrypted input is the encoded output of another cryptographic
+// message, such as, an CMSG_SIGNED. When set, it's one of the cryptographic
+// message types, for example, CMSG_SIGNED.
+//
+// If the inner content of a nested cryptographic message is data (CMSG_DATA
+// the default), then, neither dwFlags or dwInnerContentType need to be set.
+//
+// For CMS messages, CRYPT_MESSAGE_ENCAPSULATED_CONTENT_OUT_FLAG may be
+// set to encapsulate nonData inner content within an OCTET STRING before
+// encrypting.
+//
+// For CMS messages, CRYPT_MESSAGE_KEYID_RECIPIENT_FLAG may be set to identify
+// recipients by their Key Identifier and not their Issuer and Serial Number.
+//--------------------------------------------------------------------------
+
+type
+ PCRYPT_ENCRYPT_MESSAGE_PARA = ^CRYPT_ENCRYPT_MESSAGE_PARA;
+ {$EXTERNALSYM PCRYPT_ENCRYPT_MESSAGE_PARA}
+ _CRYPT_ENCRYPT_MESSAGE_PARA = record
+ cbSize: DWORD;
+ dwMsgEncodingType: DWORD;
+ hCryptProv: HCRYPTPROV;
+ ContentEncryptionAlgorithm: CRYPT_ALGORITHM_IDENTIFIER;
+ pvEncryptionAuxInfo: Pointer;
+ dwFlags: DWORD;
+ dwInnerContentType: DWORD;
+ end;
+ {$EXTERNALSYM _CRYPT_ENCRYPT_MESSAGE_PARA}
+ CRYPT_ENCRYPT_MESSAGE_PARA = _CRYPT_ENCRYPT_MESSAGE_PARA;
+ {$EXTERNALSYM CRYPT_ENCRYPT_MESSAGE_PARA}
+ TCryptEncryptMessagePara = CRYPT_ENCRYPT_MESSAGE_PARA;
+ PCryptEncryptMessagePara = PCRYPT_ENCRYPT_MESSAGE_PARA;
+
+// When set, recipients are identified by their Key Identifier and not
+// their Issuer and Serial Number.
+
+const
+ CRYPT_MESSAGE_KEYID_RECIPIENT_FLAG = $4;
+ {$EXTERNALSYM CRYPT_MESSAGE_KEYID_RECIPIENT_FLAG}
+
+//+-------------------------------------------------------------------------
+// The CRYPT_DECRYPT_MESSAGE_PARA are used for decrypting messages.
+//
+// The CertContext to use for decrypting a message is obtained from one
+// of the specified cert stores. An encrypted message can have one or
+// more recipients. The recipients are identified by their CertId (Issuer
+// and SerialNumber). The cert stores are searched to find the CertContext
+// corresponding to the CertId.
+//
+// For CMS, the recipients may also be identified by their KeyId.
+// CMS also allows Key Agreement (Diffie Hellman) in addition to
+// Key Transport (RSA) recipients.
+//
+// Only CertContexts in the store with either
+// the CERT_KEY_PROV_HANDLE_PROP_ID or CERT_KEY_PROV_INFO_PROP_ID set
+// can be used. Either property specifies the private exchange key to use.
+//
+// cbSize must be set to the sizeof(CRYPT_DECRYPT_MESSAGE_PARA) or else
+// LastError will be updated with E_INVALIDARG.
+//--------------------------------------------------------------------------
+
+type
+ PCRYPT_DECRYPT_MESSAGE_PARA = ^CRYPT_DECRYPT_MESSAGE_PARA;
+ {$EXTERNALSYM PCRYPT_DECRYPT_MESSAGE_PARA}
+ _CRYPT_DECRYPT_MESSAGE_PARA = record
+ cbSize: DWORD;
+ dwMsgAndCertEncodingType: DWORD;
+ cCertStore: DWORD;
+ rghCertStore: PHCERTSTORE;
+ end;
+ {$EXTERNALSYM _CRYPT_DECRYPT_MESSAGE_PARA}
+ CRYPT_DECRYPT_MESSAGE_PARA = _CRYPT_DECRYPT_MESSAGE_PARA;
+ {$EXTERNALSYM CRYPT_DECRYPT_MESSAGE_PARA}
+ TCryptDecryptMessagePara = CRYPT_DECRYPT_MESSAGE_PARA;
+ PCryptDecryptMessagePara = PCRYPT_DECRYPT_MESSAGE_PARA;
+
+//+-------------------------------------------------------------------------
+// The CRYPT_HASH_MESSAGE_PARA are used for hashing or unhashing
+// messages.
+//
+// hCryptProv is used to compute the hash.
+//
+// pvHashAuxInfo currently isn't used and must be set to NULL.
+//
+// cbSize must be set to the sizeof(CRYPT_HASH_MESSAGE_PARA) or else
+// LastError will be updated with E_INVALIDARG.
+//--------------------------------------------------------------------------
+
+ PCRYPT_HASH_MESSAGE_PARA = ^CRYPT_HASH_MESSAGE_PARA;
+ {$EXTERNALSYM PCRYPT_HASH_MESSAGE_PARA}
+ _CRYPT_HASH_MESSAGE_PARA = record
+ cbSize: DWORD;
+ dwMsgEncodingType: DWORD;
+ hCryptProv: HCRYPTPROV;
+ HashAlgorithm: CRYPT_ALGORITHM_IDENTIFIER;
+ pvHashAuxInfo: Pointer;
+ end;
+ {$EXTERNALSYM _CRYPT_HASH_MESSAGE_PARA}
+ CRYPT_HASH_MESSAGE_PARA = _CRYPT_HASH_MESSAGE_PARA;
+ {$EXTERNALSYM CRYPT_HASH_MESSAGE_PARA}
+ TCryptHashMessagePara = CRYPT_HASH_MESSAGE_PARA;
+ PCryptHashMessagePara = PCRYPT_HASH_MESSAGE_PARA;
+
+//+-------------------------------------------------------------------------
+// The CRYPT_KEY_SIGN_MESSAGE_PARA are used for signing messages until a
+// certificate has been created for the signature key.
+//
+// pvHashAuxInfo currently isn't used and must be set to NULL.
+//
+// If PubKeyAlgorithm isn't set, defaults to szOID_RSA_RSA.
+//
+// cbSize must be set to the sizeof(CRYPT_KEY_SIGN_MESSAGE_PARA) or else
+// LastError will be updated with E_INVALIDARG.
+//--------------------------------------------------------------------------
+
+ PCRYPT_KEY_SIGN_MESSAGE_PARA = ^CRYPT_KEY_SIGN_MESSAGE_PARA;
+ {$EXTERNALSYM PCRYPT_KEY_SIGN_MESSAGE_PARA}
+ _CRYPT_KEY_SIGN_MESSAGE_PARA = record
+ cbSize: DWORD;
+ dwMsgAndCertEncodingType: DWORD;
+ hCryptProv: HCRYPTPROV;
+ dwKeySpec: DWORD;
+ HashAlgorithm: CRYPT_ALGORITHM_IDENTIFIER;
+ pvHashAuxInfo: Pointer;
+ PubKeyAlgorithm: CRYPT_ALGORITHM_IDENTIFIER;
+ end;
+ {$EXTERNALSYM _CRYPT_KEY_SIGN_MESSAGE_PARA}
+ CRYPT_KEY_SIGN_MESSAGE_PARA = _CRYPT_KEY_SIGN_MESSAGE_PARA;
+ {$EXTERNALSYM CRYPT_KEY_SIGN_MESSAGE_PARA}
+ TCryptKeySignMessagePara = CRYPT_KEY_SIGN_MESSAGE_PARA;
+ PCryptKeySignMessagePara = PCRYPT_KEY_SIGN_MESSAGE_PARA;
+
+//+-------------------------------------------------------------------------
+// The CRYPT_KEY_VERIFY_MESSAGE_PARA are used to verify signed messages without
+// a certificate for the signer.
+//
+// Normally used until a certificate has been created for the key.
+//
+// hCryptProv is used to do hashing and signature verification.
+//
+// cbSize must be set to the sizeof(CRYPT_KEY_VERIFY_MESSAGE_PARA) or else
+// LastError will be updated with E_INVALIDARG.
+//--------------------------------------------------------------------------
+
+ PCRYPT_KEY_VERIFY_MESSAGE_PARA = ^CRYPT_KEY_VERIFY_MESSAGE_PARA;
+ {$EXTERNALSYM PCRYPT_KEY_VERIFY_MESSAGE_PARA}
+ _CRYPT_KEY_VERIFY_MESSAGE_PARA = record
+ cbSize: DWORD;
+ dwMsgEncodingType: DWORD;
+ hCryptProv: HCRYPTPROV;
+ end;
+ {$EXTERNALSYM _CRYPT_KEY_VERIFY_MESSAGE_PARA}
+ CRYPT_KEY_VERIFY_MESSAGE_PARA = _CRYPT_KEY_VERIFY_MESSAGE_PARA;
+ {$EXTERNALSYM CRYPT_KEY_VERIFY_MESSAGE_PARA}
+ TCryptKeyVerifyMessagePara = CRYPT_KEY_VERIFY_MESSAGE_PARA;
+ PCryptKeyVerifyMessagePara = PCRYPT_KEY_VERIFY_MESSAGE_PARA;
+
+//+-------------------------------------------------------------------------
+// Sign the message.
+//
+// If fDetachedSignature is TRUE, the "to be signed" content isn't included
+// in the encoded signed blob.
+//--------------------------------------------------------------------------
+
+function CryptSignMessage(pSignPara: PCRYPT_SIGN_MESSAGE_PARA;
+ fDetachedSignature: BOOL; cToBeSigned: DWORD; rgpbToBeSigned: LPBYTE;
+ rgcbToBeSigned: LPDWORD; pbSignedBlob: LPBYTE; var pcbSignedBlob: DWORD): BOOL; stdcall;
+{$EXTERNALSYM CryptSignMessage}
+
+//+-------------------------------------------------------------------------
+// Verify a signed message.
+//
+// If pbDecoded == NULL, then, *pcbDecoded is implicitly set to 0 on input.
+// For *pcbDecoded == 0 && ppSignerCert == NULL on input, the signer isn't
+// verified.
+//
+// A message might have more than one signer. Set dwSignerIndex to iterate
+// through all the signers. dwSignerIndex == 0 selects the first signer.
+//
+// pVerifyPara's pfnGetSignerCertificate is called to get the signer's
+// certificate.
+//
+// For a verified signer and message, *ppSignerCert is updated
+// with the CertContext of the signer. It must be freed by calling
+// CertFreeCertificateContext. Otherwise, *ppSignerCert is set to NULL.
+//
+// ppSignerCert can be NULL, indicating the caller isn't interested
+// in getting the CertContext of the signer.
+//
+// pcbDecoded can be NULL, indicating the caller isn't interested in getting
+// the decoded content. Furthermore, if the message doesn't contain any
+// content or signers, then, pcbDecoded must be set to NULL, to allow the
+// pVerifyPara->pfnGetCertificate to be called. Normally, this would be
+// the case when the signed message contains only certficates and CRLs.
+// If pcbDecoded is NULL and the message doesn't have the indicated signer,
+// pfnGetCertificate is called with pSignerId set to NULL.
+//
+// If the message doesn't contain any signers || dwSignerIndex > message's
+// SignerCount, then, an error is returned with LastError set to
+// CRYPT_E_NO_SIGNER. Also, for CRYPT_E_NO_SIGNER, pfnGetSignerCertificate
+// is still called with pSignerId set to NULL.
+//
+// Note, an alternative way to get the certificates and CRLs from a
+// signed message is to call CryptGetMessageCertificates.
+//--------------------------------------------------------------------------
+
+function CryptVerifyMessageSignature(pVerifyPara: PCRYPT_VERIFY_MESSAGE_PARA;
+ dwSignerIndex: DWORD; pbSignedBlob: LPBYTE; cbSignedBlob: DWORD;
+ pbDecoded: LPBYTE; pcbDecoded: LPDWORD; ppSignerCert: PPCCERT_CONTEXT): BOOL; stdcall;
+{$EXTERNALSYM CryptVerifyMessageSignature}
+
+//+-------------------------------------------------------------------------
+// Returns the count of signers in the signed message. For no signers, returns
+// 0. For an error returns -1 with LastError updated accordingly.
+//--------------------------------------------------------------------------
+
+function CryptGetMessageSignerCount(dwMsgEncodingType: DWORD; pbSignedBlob: LPBYTE;
+ cbSignedBlob: DWORD): LONG; stdcall;
+{$EXTERNALSYM CryptGetMessageSignerCount}
+
+//+-------------------------------------------------------------------------
+// Returns the cert store containing the message's certs and CRLs.
+// For an error, returns NULL with LastError updated.
+//--------------------------------------------------------------------------
+
+function CryptGetMessageCertificates(dwMsgAndCertEncodingType: DWORD;
+ hCryptProv: HCRYPTPROV; dwFlags: DWORD; pbSignedBlob: LPBYTE;
+ cbSignedBlob: DWORD): HCERTSTORE; stdcall;
+{$EXTERNALSYM CryptGetMessageCertificates}
+
+//+-------------------------------------------------------------------------
+// Verify a signed message containing detached signature(s).
+// The "to be signed" content is passed in separately. No
+// decoded output. Otherwise, identical to CryptVerifyMessageSignature.
+//--------------------------------------------------------------------------
+
+function CryptVerifyDetachedMessageSignature(pVerifyPara: PCRYPT_VERIFY_MESSAGE_PARA;
+ dwSignerIndex: DWORD; pbDetachedSignBlob: LPBYTE; cbDetachedSignBlob: DWORD;
+ cToBeSigned: DWORD; rgpbToBeSigned: LPBYTE; rgcbToBeSigned: LPDWORD;
+ ppSignerCert: PPCCERT_CONTEXT): BOOL; stdcall;
+{$EXTERNALSYM CryptVerifyDetachedMessageSignature}
+
+//+-------------------------------------------------------------------------
+// Encrypts the message for the recipient(s).
+//--------------------------------------------------------------------------
+
+function CryptEncryptMessage(pEncryptPara: PCRYPT_ENCRYPT_MESSAGE_PARA;
+ cRecipientCert: DWORD; rgpRecipientCert: PCCERT_CONTEXT; pbToBeEncrypted: LPBYTE;
+ cbToBeEncrypted: DWORD; pbEncryptedBlob: LPBYTE; var pcbEncryptedBlob: DWORD): BOOL; stdcall;
+{$EXTERNALSYM CryptEncryptMessage}
+
+//+-------------------------------------------------------------------------
+// Decrypts the message.
+//
+// If pbDecrypted == NULL, then, *pcbDecrypted is implicitly set to 0 on input.
+// For *pcbDecrypted == 0 && ppXchgCert == NULL on input, the message isn't
+// decrypted.
+//
+// For a successfully decrypted message, *ppXchgCert is updated
+// with the CertContext used to decrypt. It must be freed by calling
+// CertStoreFreeCert. Otherwise, *ppXchgCert is set to NULL.
+//
+// ppXchgCert can be NULL, indicating the caller isn't interested
+// in getting the CertContext used to decrypt.
+//--------------------------------------------------------------------------
+
+function CryptDecryptMessage(pDecryptPara: PCRYPT_DECRYPT_MESSAGE_PARA;
+ pbEncryptedBlob: LPBYTE; cbEncryptedBlob: DWORD; pbDecrypted: LPBYTE;
+ pcbDecrypted: LPDWORD; ppXchgCert: PPCCERT_CONTEXT): BOOL; stdcall;
+{$EXTERNALSYM CryptDecryptMessage}
+
+//+-------------------------------------------------------------------------
+// Sign the message and encrypt for the recipient(s). Does a CryptSignMessage
+// followed with a CryptEncryptMessage.
+//
+// Note: this isn't the CMSG_SIGNED_AND_ENVELOPED. Its a CMSG_SIGNED
+// inside of an CMSG_ENVELOPED.
+//--------------------------------------------------------------------------
+
+function CryptSignAndEncryptMessage(pSignPara: PCRYPT_SIGN_MESSAGE_PARA;
+ pEncryptPara: PCRYPT_ENCRYPT_MESSAGE_PARA; cRecipientCert: DWORD;
+ rgpRecipientCert: PCCERT_CONTEXT; pbToBeSignedAndEncrypted: LPBYTE;
+ cbToBeSignedAndEncrypted: DWORD; pbSignedAndEncryptedBlob: LPBYTE;
+ var pcbSignedAndEncryptedBlob: DWORD): BOOL; stdcall;
+{$EXTERNALSYM CryptSignAndEncryptMessage}
+
+//+-------------------------------------------------------------------------
+// Decrypts the message and verifies the signer. Does a CryptDecryptMessage
+// followed with a CryptVerifyMessageSignature.
+//
+// If pbDecrypted == NULL, then, *pcbDecrypted is implicitly set to 0 on input.
+// For *pcbDecrypted == 0 && ppSignerCert == NULL on input, the signer isn't
+// verified.
+//
+// A message might have more than one signer. Set dwSignerIndex to iterate
+// through all the signers. dwSignerIndex == 0 selects the first signer.
+//
+// The pVerifyPara's VerifySignerPolicy is called to verify the signer's
+// certificate.
+//
+// For a successfully decrypted and verified message, *ppXchgCert and
+// *ppSignerCert are updated. They must be freed by calling
+// CertStoreFreeCert. Otherwise, they are set to NULL.
+//
+// ppXchgCert and/or ppSignerCert can be NULL, indicating the
+// caller isn't interested in getting the CertContext.
+//
+// Note: this isn't the CMSG_SIGNED_AND_ENVELOPED. Its a CMSG_SIGNED
+// inside of an CMSG_ENVELOPED.
+//
+// The message always needs to be decrypted to allow access to the
+// signed message. Therefore, if ppXchgCert != NULL, its always updated.
+//--------------------------------------------------------------------------
+
+function CryptDecryptAndVerifyMessageSignature(pDecryptPara: PCRYPT_DECRYPT_MESSAGE_PARA;
+ pVerifyPara: PCRYPT_VERIFY_MESSAGE_PARA; dwSignerIndex: DWORD; pbEncryptedBlob: LPBYTE;
+ cbEncryptedBlob: DWORD; pbDecrypted: LPBYTE; pcbDecrypted: LPDWORD;
+ ppXchgCert: PPCCERT_CONTEXT; ppSignerCert: PPCCERT_CONTEXT): BOOL; stdcall;
+{$EXTERNALSYM CryptDecryptAndVerifyMessageSignature}
+
+//+-------------------------------------------------------------------------
+// Decodes a cryptographic message which may be one of the following types:
+// CMSG_DATA
+// CMSG_SIGNED
+// CMSG_ENVELOPED
+// CMSG_SIGNED_AND_ENVELOPED
+// CMSG_HASHED
+//
+// dwMsgTypeFlags specifies the set of allowable messages. For example, to
+// decode either SIGNED or ENVELOPED messages, set dwMsgTypeFlags to:
+// CMSG_SIGNED_FLAG | CMSG_ENVELOPED_FLAG.
+//
+// dwProvInnerContentType is only applicable when processing nested
+// crytographic messages. When processing an outer crytographic message
+// it must be set to 0. When decoding a nested cryptographic message
+// its the dwInnerContentType returned by a previous CryptDecodeMessage
+// of the outer message. The InnerContentType can be any of the CMSG types,
+// for example, CMSG_DATA, CMSG_SIGNED, ...
+//
+// The optional *pdwMsgType is updated with the type of message.
+//
+// The optional *pdwInnerContentType is updated with the type of the inner
+// message. Unless there is cryptographic message nesting, CMSG_DATA
+// is returned.
+//
+// For CMSG_DATA: returns decoded content.
+// For CMSG_SIGNED: same as CryptVerifyMessageSignature.
+// For CMSG_ENVELOPED: same as CryptDecryptMessage.
+// For CMSG_SIGNED_AND_ENVELOPED: same as CryptDecryptMessage plus
+// CryptVerifyMessageSignature.
+// For CMSG_HASHED: verifies the hash and returns decoded content.
+//--------------------------------------------------------------------------
+
+function CryptDecodeMessage(dwMsgTypeFlags: DWORD; pDecryptPara: PCRYPT_DECRYPT_MESSAGE_PARA;
+ pVerifyPara: PCRYPT_VERIFY_MESSAGE_PARA; dwSignerIndex: DWORD; pbEncodedBlob: LPBYTE;
+ cbEncodedBlob: DWORD; dwPrevInnerContentType: DWORD; pdwMsgType: LPDWORD;
+ pdwInnerContentType: LPDWORD; pbDecoded: LPBYTE; pcbDecoded: LPDWORD;
+ ppXchgCert: PPCCERT_CONTEXT; ppSignerCert: PPCCERT_CONTEXT): BOOL; stdcall;
+{$EXTERNALSYM CryptDecodeMessage}
+
+//+-------------------------------------------------------------------------
+// Hash the message.
+//
+// If fDetachedHash is TRUE, only the ComputedHash is encoded in the
+// pbHashedBlob. Otherwise, both the ToBeHashed and ComputedHash
+// are encoded.
+//
+// pcbHashedBlob or pcbComputedHash can be NULL, indicating the caller
+// isn't interested in getting the output.
+//--------------------------------------------------------------------------
+
+function CryptHashMessage(pHashPara: PCRYPT_HASH_MESSAGE_PARA; fDetachedHash: BOOL;
+ cToBeHashed: DWORD; rgpbToBeHashed: LPBYTE; rgcbToBeHashed: LPDWORD;
+ pbHashedBlob: LPBYTE; pcbHashedBlob: LPDWORD; pbComputedHash: LPBYTE;
+ pcbComputedHash: LPDWORD): BOOL; stdcall;
+{$EXTERNALSYM CryptHashMessage}
+
+//+-------------------------------------------------------------------------
+// Verify a hashed message.
+//
+// pcbToBeHashed or pcbComputedHash can be NULL,
+// indicating the caller isn't interested in getting the output.
+//--------------------------------------------------------------------------
+
+function CryptVerifyMessageHash(pHashPara: PCRYPT_HASH_MESSAGE_PARA;
+ pbHashedBlob: LPBYTE; cbHashedBlob: DWORD; pbToBeHashed: LPBYTE;
+ pcbToBeHashed: LPDWORD; pbComputedHash: LPBYTE; pcbComputedHash: LPDWORD): BOOL; stdcall;
+{$EXTERNALSYM CryptVerifyMessageHash}
+
+//+-------------------------------------------------------------------------
+// Verify a hashed message containing a detached hash.
+// The "to be hashed" content is passed in separately. No
+// decoded output. Otherwise, identical to CryptVerifyMessageHash.
+//
+// pcbComputedHash can be NULL, indicating the caller isn't interested
+// in getting the output.
+//--------------------------------------------------------------------------
+
+function CryptVerifyDetachedMessageHash(pHashPara: PCRYPT_HASH_MESSAGE_PARA;
+ pbDetachedHashBlob: LPBYTE; cbDetachedHashBlob: DWORD; cToBeHashed: DWORD;
+ rgpbToBeHashed: LPBYTE; rgcbToBeHashed: LPDWORD; pbComputedHash: LPBYTE;
+ pcbComputedHash: LPDWORD): BOOL; stdcall;
+{$EXTERNALSYM CryptVerifyDetachedMessageHash}
+
+//+-------------------------------------------------------------------------
+// Sign the message using the provider's private key specified in the
+// parameters. A dummy SignerId is created and stored in the message.
+//
+// Normally used until a certificate has been created for the key.
+//--------------------------------------------------------------------------
+
+function CryptSignMessageWithKey(pSignPara: PCRYPT_KEY_SIGN_MESSAGE_PARA;
+ pbToBeSigned: LPBYTE; cbToBeSigned: DWORD; pbSignedBlob: LPBYTE;
+ var pcbSignedBlob: DWORD): BOOL; stdcall;
+{$EXTERNALSYM CryptSignMessageWithKey}
+
+//+-------------------------------------------------------------------------
+// Verify a signed message using the specified public key info.
+//
+// Normally called by a CA until it has created a certificate for the
+// key.
+//
+// pPublicKeyInfo contains the public key to use to verify the signed
+// message. If NULL, the signature isn't verified (for instance, the decoded
+// content may contain the PublicKeyInfo).
+//
+// pcbDecoded can be NULL, indicating the caller isn't interested
+// in getting the decoded content.
+//--------------------------------------------------------------------------
+
+function CryptVerifyMessageSignatureWithKey(pVerifyPara: PCRYPT_KEY_VERIFY_MESSAGE_PARA;
+ pPublicKeyInfo: PCERT_PUBLIC_KEY_INFO; pbSignedBlob: LPBYTE; cbSignedBlob: DWORD;
+ pbDecoded: LPBYTE; pcbDecoded: LPDWORD): BOOL; stdcall;
+{$EXTERNALSYM CryptVerifyMessageSignatureWithKey}
+
+//+=========================================================================
+// System Certificate Store Data Structures and APIs
+//==========================================================================
+
+//+-------------------------------------------------------------------------
+// Get a system certificate store based on a subsystem protocol.
+//
+// Current examples of subsystems protocols are:
+// "MY" Cert Store hold certs with associated Private Keys
+// "CA" Certifying Authority certs
+// "ROOT" Root Certs
+// "SPC" Software publisher certs
+//
+//
+// If hProv is NULL the default provider "1" is opened for you.
+// When the store is closed the provider is release. Otherwise
+// if hProv is not NULL, no provider is created or released.
+//
+// The returned Cert Store can be searched for an appropriate Cert
+// using the Cert Store API's (see certstor.h)
+//
+// When done, the cert store should be closed using CertStoreClose
+//--------------------------------------------------------------------------
+
+function CertOpenSystemStoreA(hProv: HCRYPTPROV; szSubsystemProtocol: LPCSTR): HCERTSTORE; stdcall;
+{$EXTERNALSYM CertOpenSystemStoreA}
+function CertOpenSystemStoreW(hProv: HCRYPTPROV; szSubsystemProtocol: LPCWSTR): HCERTSTORE; stdcall;
+{$EXTERNALSYM CertOpenSystemStoreW}
+function CertOpenSystemStore(hProv: HCRYPTPROV; szSubsystemProtocol: LPCTSTR): HCERTSTORE; stdcall;
+{$EXTERNALSYM CertOpenSystemStore}
+
+function CertAddEncodedCertificateToSystemStoreA(szCertStoreName: LPCSTR;
+ pbCertEncoded: LPBYTE; cbCertEncoded: DWORD): BOOL; stdcall;
+{$EXTERNALSYM CertAddEncodedCertificateToSystemStoreA}
+function CertAddEncodedCertificateToSystemStoreW(szCertStoreName: LPCWSTR;
+ pbCertEncoded: LPBYTE; cbCertEncoded: DWORD): BOOL; stdcall;
+{$EXTERNALSYM CertAddEncodedCertificateToSystemStoreW}
+function CertAddEncodedCertificateToSystemStore(szCertStoreName: LPCTSTR;
+ pbCertEncoded: LPBYTE; cbCertEncoded: DWORD): BOOL; stdcall;
+{$EXTERNALSYM CertAddEncodedCertificateToSystemStore}
+
+//+-------------------------------------------------------------------------
+// Find all certificate chains tying the given issuer name to any certificate
+// that the current user has a private key for.
+//
+// If no certificate chain is found, FALSE is returned with LastError set
+// to CRYPT_E_NOT_FOUND and the counts zeroed.
+//
+// IE 3.0 ASSUMPTION:
+// The client certificates are in the "My" system store. The issuer
+// cerificates may be in the "Root", "CA" or "My" system stores.
+//--------------------------------------------------------------------------
+
+type
+ PCERT_CHAIN = ^CERT_CHAIN;
+ {$EXTERNALSYM PCERT_CHAIN}
+ _CERT_CHAIN = record
+ cCerts: DWORD; // number of certs in chain
+ certs: PCERT_BLOB; // pointer to array of cert chain blobs
+ // representing the certs
+ keyLocatorInfo: CRYPT_KEY_PROV_INFO; // key locator for cert
+ end;
+ {$EXTERNALSYM _CERT_CHAIN}
+ CERT_CHAIN = _CERT_CHAIN;
+ {$EXTERNALSYM CERT_CHAIN}
+ TCertChain = CERT_CHAIN;
+ PCertChain = PCERT_CHAIN;
+
+// WINCRYPT32API This is not exported by crypt32, it is exported by softpub
+
+function FindCertsByIssuer(pCertChains: PCERT_CHAIN; var pcbCertChains: DWORD;
+ pcCertChains: LPDWORD; pbEncodedIssuerName: LPBYTE; cbEncodedIssuerName: DWORD;
+ pwszPurpose: LPCWSTR; dwKeySpec: DWORD): HRESULT; stdcall;
+{$EXTERNALSYM FindCertsByIssuer}
+
+//-------------------------------------------------------------------------
+//
+// CryptQueryObject takes a CERT_BLOB or a file name and returns the
+// information about the content in the blob or in the file.
+//
+// Parameters:
+// INPUT dwObjectType:
+// Indicate the type of the object. Should be one of the
+// following:
+// CERT_QUERY_OBJECT_FILE
+// CERT_QUERY_OBJECT_BLOB
+//
+// INPUT pvObject:
+// If dwObjectType == CERT_QUERY_OBJECT_FILE, it is a
+// LPWSTR, that is, the pointer to a wchar file name
+// if dwObjectType == CERT_QUERY_OBJECT_BLOB, it is a
+// PCERT_BLOB, that is, a pointer to a CERT_BLOB
+//
+// INPUT dwExpectedContentTypeFlags:
+// Indicate the expected contenet type.
+// Can be one of the following:
+// CERT_QUERY_CONTENT_FLAG_ALL (the content can be any type)
+// CERT_QUERY_CONTENT_FLAG_CERT
+// CERT_QUERY_CONTENT_FLAG_CTL
+// CERT_QUERY_CONTENT_FLAG_CRL
+// CERT_QUERY_CONTENT_FLAG_SERIALIZED_STORE
+// CERT_QUERY_CONTENT_FLAG_SERIALIZED_CERT
+// CERT_QUERY_CONTENT_FLAG_SERIALIZED_CTL
+// CERT_QUERY_CONTENT_FLAG_SERIALIZED_CRL
+// CERT_QUERY_CONTENT_FLAG_PKCS7_SIGNED
+// CERT_QUERY_CONTENT_FLAG_PKCS7_UNSIGNED
+// CERT_QUERY_CONTENT_FLAG_PKCS7_SIGNED_EMBED
+// CERT_QUERY_CONTNET_FLAG_PKCS10
+// CERT_QUERY_CONTNET_FLAG_PFX
+//
+// INPUT dwExpectedFormatTypeFlags:
+// Indicate the expected format type.
+// Can be one of the following:
+// CERT_QUERY_FORMAT_FLAG_ALL (the content can be any format)
+// CERT_QUERY_FORMAT_FLAG_BINARY
+// CERT_QUERY_FORMAT_FLAG_BASE64_ENCODED
+//
+//
+// INPUT dwFlags
+// Reserved flag. Should always set to 0
+//
+// OUTPUT pdwMsgAndCertEncodingType
+// Optional output. If NULL != pdwMsgAndCertEncodingType,
+// it contains the encoding type of the content as any
+// combination of the following:
+// X509_ASN_ENCODING
+// PKCS_7_ASN_ENCODING
+//
+// OUTPUT pdwContentType
+// Optional output. If NULL!=pdwContentType, it contains
+// the content type as one of the the following:
+// CERT_QUERY_CONTENT_CERT
+// CERT_QUERY_CONTENT_CTL
+// CERT_QUERY_CONTENT_CRL
+// CERT_QUERY_CONTENT_SERIALIZED_STORE
+// CERT_QUERY_CONTENT_SERIALIZED_CERT
+// CERT_QUERY_CONTENT_SERIALIZED_CTL
+// CERT_QUERY_CONTENT_SERIALIZED_CRL
+// CERT_QUERY_CONTENT_PKCS7_SIGNED
+// CERT_QUERY_CONTENT_PKCS7_UNSIGNED
+// CERT_QUERY_CONTENT_PKCS7_SIGNED_EMBED
+// CERT_QUERY_CONTENT_PKCS10
+// CERT_QUERY_CONTENT_PFX
+//
+// OUTPUT pdwFormatType
+// Optional output. If NULL !=pdwFormatType, it
+// contains the format type of the content as one of the
+// following:
+// CERT_QUERY_FORMAT_BINARY
+// CERT_QUERY_FORMAT_BASE64_ENCODED
+//
+//
+// OUTPUT phCertStore
+// Optional output. If NULL !=phStore,
+// it contains a cert store that includes all of certificates,
+// CRL, and CTL in the object if the object content type is
+// one of the following:
+// CERT_QUERY_CONTENT_CERT
+// CERT_QUERY_CONTENT_CTL
+// CERT_QUERY_CONTENT_CRL
+// CERT_QUERY_CONTENT_SERIALIZED_STORE
+// CERT_QUERY_CONTENT_SERIALIZED_CERT
+// CERT_QUERY_CONTENT_SERIALIZED_CTL
+// CERT_QUERY_CONTENT_SERIALIZED_CRL
+// CERT_QUERY_CONTENT_PKCS7_SIGNED
+// CERT_QUERY_CONTENT_PKCS7_SIGNED_EMBED
+//
+// Caller should free *phCertStore via CertCloseStore.
+//
+//
+// OUTPUT phMsg Optional output. If NULL != phMsg,
+// it contains a handle to a opened message if
+// the content type is one of the following:
+// CERT_QUERY_CONTENT_PKCS7_SIGNED
+// CERT_QUERY_CONTENT_PKCS7_UNSIGNED
+// CERT_QUERY_CONTENT_PKCS7_SIGNED_EMBED
+//
+// Caller should free *phMsg via CryptMsgClose.
+//
+// OUTPUT pContext Optional output. If NULL != pContext,
+// it contains either a PCCERT_CONTEXT or PCCRL_CONTEXT,
+// or PCCTL_CONTEXT based on the content type.
+//
+// If the content type is CERT_QUERY_CONTENT_CERT or
+// CERT_QUERY_CONTENT_SERIALIZED_CERT, it is a PCCERT_CONTEXT;
+// Caller should free the pContext via CertFreeCertificateContext.
+//
+// If the content type is CERT_QUERY_CONTENT_CRL or
+// CERT_QUERY_CONTENT_SERIALIZED_CRL, it is a PCCRL_CONTEXT;
+// Caller should free the pContext via CertFreeCRLContext.
+//
+// If the content type is CERT_QUERY_CONTENT_CTL or
+// CERT_QUERY_CONTENT_SERIALIZED_CTL, it is a PCCTL_CONTEXT;
+// Caller should free the pContext via CertFreeCTLContext.
+//
+// If the *pbObject is of type CERT_QUERY_CONTENT_PKCS10 or CERT_QUERY_CONTENT_PFX, CryptQueryObject
+// will not return anything in *phCertstore, *phMsg, or *ppvContext.
+//--------------------------------------------------------------------------
+
+function CryptQueryObject(dwObjectType: DWORD; pvObject: Pointer;
+ dwExpectedContentTypeFlags, dwExpectedFormatTypeFlags, dwFlags: DWORD;
+ pdwMsgAndCertEncodingType, pdwContentType, pdwFormatType: LPDWORD;
+ phCertStore: PHCERTSTORE; phMsg: PHCRYPTMSG; ppvContext: PPointer): BOOL; stdcall;
+{$EXTERNALSYM CryptQueryObject}
+
+//-------------------------------------------------------------------------
+//dwObjectType for CryptQueryObject
+//-------------------------------------------------------------------------
+
+const
+ CERT_QUERY_OBJECT_FILE = $00000001;
+ {$EXTERNALSYM CERT_QUERY_OBJECT_FILE}
+ CERT_QUERY_OBJECT_BLOB = $00000002;
+ {$EXTERNALSYM CERT_QUERY_OBJECT_BLOB}
+
+//-------------------------------------------------------------------------
+//dwConentType for CryptQueryObject
+//-------------------------------------------------------------------------
+
+//encoded single certificate
+
+ CERT_QUERY_CONTENT_CERT = 1;
+ {$EXTERNALSYM CERT_QUERY_CONTENT_CERT}
+
+//encoded single CTL
+
+ CERT_QUERY_CONTENT_CTL = 2;
+ {$EXTERNALSYM CERT_QUERY_CONTENT_CTL}
+
+//encoded single CRL
+
+ CERT_QUERY_CONTENT_CRL = 3;
+ {$EXTERNALSYM CERT_QUERY_CONTENT_CRL}
+
+//serialized store
+
+ CERT_QUERY_CONTENT_SERIALIZED_STORE = 4;
+ {$EXTERNALSYM CERT_QUERY_CONTENT_SERIALIZED_STORE}
+
+//serialized single certificate
+
+ CERT_QUERY_CONTENT_SERIALIZED_CERT = 5;
+ {$EXTERNALSYM CERT_QUERY_CONTENT_SERIALIZED_CERT}
+
+//serialized single CTL
+
+ CERT_QUERY_CONTENT_SERIALIZED_CTL = 6;
+ {$EXTERNALSYM CERT_QUERY_CONTENT_SERIALIZED_CTL}
+
+//serialized single CRL
+
+ CERT_QUERY_CONTENT_SERIALIZED_CRL = 7;
+ {$EXTERNALSYM CERT_QUERY_CONTENT_SERIALIZED_CRL}
+
+//a PKCS#7 signed message
+
+ CERT_QUERY_CONTENT_PKCS7_SIGNED = 8;
+ {$EXTERNALSYM CERT_QUERY_CONTENT_PKCS7_SIGNED}
+
+//a PKCS#7 message, such as enveloped message. But it is not a signed message,
+
+ CERT_QUERY_CONTENT_PKCS7_UNSIGNED = 9;
+ {$EXTERNALSYM CERT_QUERY_CONTENT_PKCS7_UNSIGNED}
+
+//a PKCS7 signed message embedded in a file
+
+ CERT_QUERY_CONTENT_PKCS7_SIGNED_EMBED = 10;
+ {$EXTERNALSYM CERT_QUERY_CONTENT_PKCS7_SIGNED_EMBED}
+
+//an encoded PKCS#10
+
+ CERT_QUERY_CONTENT_PKCS10 = 11;
+ {$EXTERNALSYM CERT_QUERY_CONTENT_PKCS10}
+
+//an encoded PKX BLOB
+
+ CERT_QUERY_CONTENT_PFX = 12;
+ {$EXTERNALSYM CERT_QUERY_CONTENT_PFX}
+
+//-------------------------------------------------------------------------
+//dwExpectedConentTypeFlags for CryptQueryObject
+//-------------------------------------------------------------------------
+
+//encoded single certificate
+
+ CERT_QUERY_CONTENT_FLAG_CERT = 1 shl CERT_QUERY_CONTENT_CERT;
+ {$EXTERNALSYM CERT_QUERY_CONTENT_FLAG_CERT}
+
+//encoded single CTL
+
+ CERT_QUERY_CONTENT_FLAG_CTL = 1 shl CERT_QUERY_CONTENT_CTL;
+ {$EXTERNALSYM CERT_QUERY_CONTENT_FLAG_CTL}
+
+//encoded single CRL
+
+ CERT_QUERY_CONTENT_FLAG_CRL = 1 shl CERT_QUERY_CONTENT_CRL;
+ {$EXTERNALSYM CERT_QUERY_CONTENT_FLAG_CRL}
+
+//serialized store
+
+ CERT_QUERY_CONTENT_FLAG_SERIALIZED_STORE = 1 shl CERT_QUERY_CONTENT_SERIALIZED_STORE;
+ {$EXTERNALSYM CERT_QUERY_CONTENT_FLAG_SERIALIZED_STORE}
+
+//serialized single certificate
+
+ CERT_QUERY_CONTENT_FLAG_SERIALIZED_CERT = 1 shl CERT_QUERY_CONTENT_SERIALIZED_CERT;
+ {$EXTERNALSYM CERT_QUERY_CONTENT_FLAG_SERIALIZED_CERT}
+
+//serialized single CTL
+
+ CERT_QUERY_CONTENT_FLAG_SERIALIZED_CTL = 1 shl CERT_QUERY_CONTENT_SERIALIZED_CTL;
+ {$EXTERNALSYM CERT_QUERY_CONTENT_FLAG_SERIALIZED_CTL}
+
+//serialized single CRL
+
+ CERT_QUERY_CONTENT_FLAG_SERIALIZED_CRL = 1 shl CERT_QUERY_CONTENT_SERIALIZED_CRL;
+ {$EXTERNALSYM CERT_QUERY_CONTENT_FLAG_SERIALIZED_CRL}
+
+//an encoded PKCS#7 signed message
+
+ CERT_QUERY_CONTENT_FLAG_PKCS7_SIGNED = 1 shl CERT_QUERY_CONTENT_PKCS7_SIGNED;
+ {$EXTERNALSYM CERT_QUERY_CONTENT_FLAG_PKCS7_SIGNED}
+
+//an encoded PKCS#7 message. But it is not a signed message
+
+ CERT_QUERY_CONTENT_FLAG_PKCS7_UNSIGNED = 1 shl CERT_QUERY_CONTENT_PKCS7_UNSIGNED;
+ {$EXTERNALSYM CERT_QUERY_CONTENT_FLAG_PKCS7_UNSIGNED}
+
+//the content includes an embedded PKCS7 signed message
+
+ CERT_QUERY_CONTENT_FLAG_PKCS7_SIGNED_EMBED = 1 shl CERT_QUERY_CONTENT_PKCS7_SIGNED_EMBED;
+ {$EXTERNALSYM CERT_QUERY_CONTENT_FLAG_PKCS7_SIGNED_EMBED}
+
+//an encoded PKCS#10
+
+ CERT_QUERY_CONTENT_FLAG_PKCS10 = 1 shl CERT_QUERY_CONTENT_PKCS10;
+ {$EXTERNALSYM CERT_QUERY_CONTENT_FLAG_PKCS10}
+
+//an encoded PFX BLOB
+
+ CERT_QUERY_CONTENT_FLAG_PFX = 1 shl CERT_QUERY_CONTENT_PFX;
+ {$EXTERNALSYM CERT_QUERY_CONTENT_FLAG_PFX}
+
+//content can be any type
+ CERT_QUERY_CONTENT_FLAG_ALL = CERT_QUERY_CONTENT_FLAG_CERT or
+ CERT_QUERY_CONTENT_FLAG_CTL or
+ CERT_QUERY_CONTENT_FLAG_CRL or
+ CERT_QUERY_CONTENT_FLAG_SERIALIZED_STORE or
+ CERT_QUERY_CONTENT_FLAG_SERIALIZED_CERT or
+ CERT_QUERY_CONTENT_FLAG_SERIALIZED_CTL or
+ CERT_QUERY_CONTENT_FLAG_SERIALIZED_CRL or
+ CERT_QUERY_CONTENT_FLAG_PKCS7_SIGNED or
+ CERT_QUERY_CONTENT_FLAG_PKCS7_UNSIGNED or
+ CERT_QUERY_CONTENT_FLAG_PKCS7_SIGNED_EMBED or
+ CERT_QUERY_CONTENT_FLAG_PKCS10 or
+ CERT_QUERY_CONTENT_FLAG_PFX;
+ {$EXTERNALSYM CERT_QUERY_CONTENT_FLAG_ALL}
+
+//-------------------------------------------------------------------------
+//dwFormatType for CryptQueryObject
+//-------------------------------------------------------------------------
+//the content is in binary format
+
+ CERT_QUERY_FORMAT_BINARY = 1;
+ {$EXTERNALSYM CERT_QUERY_FORMAT_BINARY}
+
+//the content is base64 encoded
+
+ CERT_QUERY_FORMAT_BASE64_ENCODED = 2;
+ {$EXTERNALSYM CERT_QUERY_FORMAT_BASE64_ENCODED}
+
+//-------------------------------------------------------------------------
+//dwExpectedFormatTypeFlags for CryptQueryObject
+//-------------------------------------------------------------------------
+
+//the content is in binary format
+
+ CERT_QUERY_FORMAT_FLAG_BINARY = 1 shl CERT_QUERY_FORMAT_BINARY;
+ {$EXTERNALSYM CERT_QUERY_FORMAT_FLAG_BINARY}
+
+//the content is base64 encoded
+
+ CERT_QUERY_FORMAT_FLAG_BASE64_ENCODED = 1 shl CERT_QUERY_FORMAT_BASE64_ENCODED;
+ {$EXTERNALSYM CERT_QUERY_FORMAT_FLAG_BASE64_ENCODED}
+
+//the content can be of any format
+
+ CERT_QUERY_FORMAT_FLAG_ALL = CERT_QUERY_FORMAT_FLAG_BINARY or CERT_QUERY_FORMAT_FLAG_BASE64_ENCODED;
+ {$EXTERNALSYM CERT_QUERY_FORMAT_FLAG_ALL}
+
+//
+// Crypt32 Memory Management Routines. All Crypt32 API which return allocated
+// buffers will do so via CryptMemAlloc, CryptMemRealloc. Clients can free
+// those buffers using CryptMemFree. Also included is CryptMemSize
+//
+
+function CryptMemAlloc(cbSize: ULONG): LPVOID; stdcall;
+{$EXTERNALSYM CryptMemAlloc}
+
+function CryptMemRealloc(pv: LPVOID; cbSize: ULONG): LPVOID; stdcall;
+{$EXTERNALSYM CryptMemRealloc}
+
+procedure CryptMemFree(pv: LPVOID); stdcall;
+{$EXTERNALSYM CryptMemFree}
+
+//
+// Crypt32 Asynchronous Parameter Management Routines. All Crypt32 API which
+// expose asynchronous mode operation use a Crypt32 Async Handle to pass
+// around information about the operation e.g. callback routines. The
+// following API are used for manipulation of the async handle
+//
+
+type
+ HCRYPTASYNC = HANDLE;
+ {$EXTERNALSYM HCRYPTASYNC}
+ PHCRYPTASYNC = ^HCRYPTASYNC;
+ {$EXTERNALSYM PHCRYPTASYNC}
+
+ PFN_CRYPT_ASYNC_PARAM_FREE_FUNC = procedure(pszParamOid: LPSTR; pvParam: LPVOID); stdcall;
+ {$EXTERNALSYM PFN_CRYPT_ASYNC_PARAM_FREE_FUNC}
+ PFnCryptAsyncParamFreeFunc = PFN_CRYPT_ASYNC_PARAM_FREE_FUNC;
+
+function CryptCreateAsyncHandle(dwFlags: DWORD; phAsync: PHCRYPTASYNC): BOOL; stdcall;
+{$EXTERNALSYM CryptCreateAsyncHandle}
+
+function CryptSetAsyncParam(hAsync: HCRYPTASYNC; pszParamOid: LPSTR;
+ pvParam: LPVOID; pfnFree: PFN_CRYPT_ASYNC_PARAM_FREE_FUNC): BOOL; stdcall;
+{$EXTERNALSYM CryptSetAsyncParam}
+
+function CryptGetAsyncParam(hAsync: HCRYPTASYNC; pszParamOid: LPSTR;
+ var ppvParam: LPVOID; var ppfnFree: PFN_CRYPT_ASYNC_PARAM_FREE_FUNC): BOOL; stdcall;
+{$EXTERNALSYM CryptGetAsyncParam}
+
+function CryptCloseAsyncHandle(hAsync: HCRYPTASYNC): BOOL; stdcall;
+{$EXTERNALSYM CryptCloseAsyncHandle}
+
+//
+// Crypt32 Remote Object Retrieval Routines. This API allows retrieval of
+// remote PKI objects where the location is given by an URL. The remote
+// object retrieval manager exposes two provider models. One is the "Scheme
+// Provider" model which allows for installable protocol providers as defined
+// by the URL scheme e.g. ldap, http, ftp. The scheme provider entry point is
+// the same as the CryptRetrieveObjectByUrl however the *ppvObject returned
+// is ALWAYS a counted array of encoded bits (one per object retrieved). The
+// second provider model is the "Context Provider" model which allows for
+// installable creators of CAPI2 context handles (objects) based on the
+// retrieved encoded bits. These are dispatched based on the object OID given
+// in the call to CryptRetrieveObjectByUrl.
+//
+
+type
+ PCRYPT_BLOB_ARRAY = ^CRYPT_BLOB_ARRAY;
+ {$EXTERNALSYM PCRYPT_BLOB_ARRAY}
+ _CRYPT_BLOB_ARRAY = record
+ cBlob: DWORD;
+ rgBlob: PCRYPT_DATA_BLOB;
+ end;
+ {$EXTERNALSYM _CRYPT_BLOB_ARRAY}
+ CRYPT_BLOB_ARRAY = _CRYPT_BLOB_ARRAY;
+ {$EXTERNALSYM CRYPT_BLOB_ARRAY}
+ TCryptBlobArray = CRYPT_BLOB_ARRAY;
+ PCryptBlobArray = PCRYPT_BLOB_ARRAY;
+
+ PCRYPT_CREDENTIALS = ^CRYPT_CREDENTIALS;
+ {$EXTERNALSYM PCRYPT_CREDENTIALS}
+ _CRYPT_CREDENTIALS = record
+ cbSize: DWORD;
+ pszCredentialsOid: LPCSTR;
+ pvCredentials: LPVOID;
+ end;
+ {$EXTERNALSYM _CRYPT_CREDENTIALS}
+ CRYPT_CREDENTIALS = _CRYPT_CREDENTIALS;
+ {$EXTERNALSYM CRYPT_CREDENTIALS}
+ TCryptCredentials = CRYPT_CREDENTIALS;
+ PCryptCredentials = PCRYPT_CREDENTIALS;
+
+const
+ CREDENTIAL_OID_PASSWORD_CREDENTIALS_A = LPCSTR(1);
+ {$EXTERNALSYM CREDENTIAL_OID_PASSWORD_CREDENTIALS_A}
+ CREDENTIAL_OID_PASSWORD_CREDENTIALS_W = LPCSTR(2);
+ {$EXTERNALSYM CREDENTIAL_OID_PASSWORD_CREDENTIALS_W}
+
+ {$IFDEF UNICODE}
+ CREDENTIAL_OID_PASSWORD_CREDENTIALS = CREDENTIAL_OID_PASSWORD_CREDENTIALS_W;
+ {$EXTERNALSYM CREDENTIAL_OID_PASSWORD_CREDENTIALS}
+ {$ELSE}
+ CREDENTIAL_OID_PASSWORD_CREDENTIALS = CREDENTIAL_OID_PASSWORD_CREDENTIALS_A;
+ {$EXTERNALSYM CREDENTIAL_OID_PASSWORD_CREDENTIALS}
+ {$ENDIF UNICODE}
+
+type
+ PCRYPT_PASSWORD_CREDENTIALSA = ^CRYPT_PASSWORD_CREDENTIALSA;
+ {$EXTERNALSYM PCRYPT_PASSWORD_CREDENTIALSA}
+ _CRYPT_PASSWORD_CREDENTIALSA = record
+ cbSize: DWORD;
+ pszUsername: LPSTR;
+ pszPassword: LPSTR;
+ end;
+ {$EXTERNALSYM _CRYPT_PASSWORD_CREDENTIALSA}
+ CRYPT_PASSWORD_CREDENTIALSA = _CRYPT_PASSWORD_CREDENTIALSA;
+ {$EXTERNALSYM CRYPT_PASSWORD_CREDENTIALSA}
+ TCryptPasswordCredentialsA = CRYPT_PASSWORD_CREDENTIALSA;
+ PCryptPasswordCredentialsA = PCRYPT_PASSWORD_CREDENTIALSA;
+
+ PCRYPT_PASSWORD_CREDENTIALSW = ^CRYPT_PASSWORD_CREDENTIALSW;
+ {$EXTERNALSYM PCRYPT_PASSWORD_CREDENTIALSW}
+ _CRYPT_PASSWORD_CREDENTIALSW = record
+ cbSize: DWORD;
+ pszUsername: LPWSTR;
+ pszPassword: LPWSTR;
+ end;
+ {$EXTERNALSYM _CRYPT_PASSWORD_CREDENTIALSW}
+ CRYPT_PASSWORD_CREDENTIALSW = _CRYPT_PASSWORD_CREDENTIALSW;
+ {$EXTERNALSYM CRYPT_PASSWORD_CREDENTIALSW}
+ TCryptPasswordCredentialsW = CRYPT_PASSWORD_CREDENTIALSW;
+ PCryptPasswordCredentialsW = PCRYPT_PASSWORD_CREDENTIALSW;
+
+ {$IFDEF UNICODE}
+ CRYPT_PASSWORD_CREDENTIALS = CRYPT_PASSWORD_CREDENTIALSW;
+ {$EXTERNALSYM CRYPT_PASSWORD_CREDENTIALS}
+ PCRYPT_PASSWORD_CREDENTIALS = PCRYPT_PASSWORD_CREDENTIALSW;
+ {$EXTERNALSYM PCRYPT_PASSWORD_CREDENTIALS}
+ TCryptPasswordCredentials = TCryptPasswordCredentialsW;
+ PCryptPasswordCredentials = PCryptPasswordCredentialsW;
+ {$ELSE}
+ CRYPT_PASSWORD_CREDENTIALS = CRYPT_PASSWORD_CREDENTIALSA;
+ {$EXTERNALSYM CRYPT_PASSWORD_CREDENTIALS}
+ PCRYPT_PASSWORD_CREDENTIALS = PCRYPT_PASSWORD_CREDENTIALSA;
+ {$EXTERNALSYM PCRYPT_PASSWORD_CREDENTIALS}
+ TCryptPasswordCredentials = TCryptPasswordCredentialsA;
+ PCryptPasswordCredentials = PCryptPasswordCredentialsA;
+ {$ENDIF UNICODE}
+
+//
+// Scheme Provider Signatures
+//
+
+const
+ SCHEME_OID_RETRIEVE_ENCODED_OBJECT_FUNC = 'SchemeDllRetrieveEncodedObject';
+ {$EXTERNALSYM SCHEME_OID_RETRIEVE_ENCODED_OBJECT_FUNC}
+
+type
+ PFN_FREE_ENCODED_OBJECT_FUNC = procedure(pszObjectOid: LPCSTR;
+ pObject: PCRYPT_BLOB_ARRAY; pvFreeContext: LPVOID); stdcall;
+ {$EXTERNALSYM PFN_FREE_ENCODED_OBJECT_FUNC}
+ PFnFreeEncodedObjectFunc = PFN_FREE_ENCODED_OBJECT_FUNC;
+
+//
+// SchemeDllRetrieveEncodedObject has the following signature:
+//
+// BOOL WINAPI SchemeDllRetrieveEncodedObject (
+// IN LPCSTR pszUrl,
+// IN LPCSTR pszObjectOid,
+// IN DWORD dwRetrievalFlags,
+// IN DWORD dwTimeout,
+// OUT PCRYPT_BLOB_ARRAY pObject,
+// OUT PFN_FREE_ENCODED_OBJECT_FUNC* ppfnFreeObject,
+// OUT LPVOID* ppvFreeContext,
+// IN HCRYPTASYNC hAsyncRetrieve,
+// IN PCRYPT_CREDENTIALS pCredentials,
+// IN LPVOID pvReserved
+// )
+//
+
+//
+// Context Provider Signatures
+//
+
+const
+ CONTEXT_OID_CREATE_OBJECT_CONTEXT_FUNC = 'ContextDllCreateObjectContext';
+ {$EXTERNALSYM CONTEXT_OID_CREATE_OBJECT_CONTEXT_FUNC}
+
+ CONTEXT_OID_CERTIFICATE = LPCSTR(1);
+ {$EXTERNALSYM CONTEXT_OID_CERTIFICATE}
+ CONTEXT_OID_CRL = LPCSTR(2);
+ {$EXTERNALSYM CONTEXT_OID_CRL}
+ CONTEXT_OID_CTL = LPCSTR(3);
+ {$EXTERNALSYM CONTEXT_OID_CTL}
+ CONTEXT_OID_PKCS7 = LPCSTR(4);
+ {$EXTERNALSYM CONTEXT_OID_PKCS7}
+ CONTEXT_OID_CAPI2_ANY = LPCSTR(5);
+ {$EXTERNALSYM CONTEXT_OID_CAPI2_ANY}
+
+//
+// ContextDllCreateObjectContext has the following signature:
+//
+// BOOL WINAPI ContextDllCreateObjectContext (
+// IN LPCSTR pszObjectOid,
+// IN DWORD dwRetrievalFlags,
+// IN PCRYPT_BLOB_ARRAY pObject,
+// OUT LPVOID* ppvContext
+// )
+//
+
+//
+// Remote Object Retrieval API
+//
+
+//
+// Retrieval flags
+//
+
+ CRYPT_RETRIEVE_MULTIPLE_OBJECTS = $00000001;
+ {$EXTERNALSYM CRYPT_RETRIEVE_MULTIPLE_OBJECTS}
+ CRYPT_CACHE_ONLY_RETRIEVAL = $00000002;
+ {$EXTERNALSYM CRYPT_CACHE_ONLY_RETRIEVAL}
+ CRYPT_WIRE_ONLY_RETRIEVAL = $00000004;
+ {$EXTERNALSYM CRYPT_WIRE_ONLY_RETRIEVAL}
+ CRYPT_DONT_CACHE_RESULT = $00000008;
+ {$EXTERNALSYM CRYPT_DONT_CACHE_RESULT}
+ CRYPT_ASYNC_RETRIEVAL = $00000010;
+ {$EXTERNALSYM CRYPT_ASYNC_RETRIEVAL}
+
+//
+// Data verification retrieval flags
+//
+// CRYPT_VERIFY_CONTEXT_SIGNATURE is used to get signature verification
+// on the context created. In this case pszObjectOid must be non-NULL and
+// pvVerify points to the signer certificate context
+//
+// CRYPT_VERIFY_DATA_HASH is used to get verification of the blob data
+// retrieved by the protocol. The pvVerify points to an URL_DATA_HASH
+// structure (TBD)
+//
+
+ CRYPT_VERIFY_CONTEXT_SIGNATURE = $00000020;
+ {$EXTERNALSYM CRYPT_VERIFY_CONTEXT_SIGNATURE}
+ CRYPT_VERIFY_DATA_HASH = $00000040;
+ {$EXTERNALSYM CRYPT_VERIFY_DATA_HASH}
+
+//
+// Time Valid Object flags
+//
+
+ CRYPT_KEEP_TIME_VALID = $00000080;
+ {$EXTERNALSYM CRYPT_KEEP_TIME_VALID}
+ CRYPT_DONT_VERIFY_SIGNATURE = $00000100;
+ {$EXTERNALSYM CRYPT_DONT_VERIFY_SIGNATURE}
+ CRYPT_DONT_CHECK_TIME_VALIDITY = $00000200;
+ {$EXTERNALSYM CRYPT_DONT_CHECK_TIME_VALIDITY}
+
+function CryptRetrieveObjectByUrlA(pszUrl: LPCSTR; pszObjectOid: LPCSTR;
+ dwRetrievalFlags: DWORD; dwTimeout: DWORD; var ppvObject: LPVOID;
+ hAsyncRetrieve: HCRYPTASYNC; pCredentials: PCRYPT_CREDENTIALS;
+ pvVerify: LPVOID; pvReserved: LPVOID): BOOL; stdcall;
+{$EXTERNALSYM CryptRetrieveObjectByUrlA}
+function CryptRetrieveObjectByUrlW(pszUrl: LPCWSTR; pszObjectOid: LPCSTR;
+ dwRetrievalFlags: DWORD; dwTimeout: DWORD; var ppvObject: LPVOID;
+ hAsyncRetrieve: HCRYPTASYNC; pCredentials: PCRYPT_CREDENTIALS;
+ pvVerify: LPVOID; pvReserved: LPVOID): BOOL; stdcall;
+{$EXTERNALSYM CryptRetrieveObjectByUrlW}
+function CryptRetrieveObjectByUrl(pszUrl: LPCTSTR; pszObjectOid: LPCSTR;
+ dwRetrievalFlags: DWORD; dwTimeout: DWORD; var ppvObject: LPVOID;
+ hAsyncRetrieve: HCRYPTASYNC; pCredentials: PCRYPT_CREDENTIALS;
+ pvVerify: LPVOID; pvReserved: LPVOID): BOOL; stdcall;
+{$EXTERNALSYM CryptRetrieveObjectByUrl}
+
+//
+// Call back function to cancel object retrieval
+//
+// The function can be installed on a per thread basis.
+// If CryptInstallCancelRetrieval is called for multiple times, only the most recent
+// installation will be kept.
+//
+// This is only effective for http, https, gopher, and ftp protocol.
+// It is ignored by the rest of the protocols.
+
+type
+ PFN_CRYPT_CANCEL_RETRIEVAL = function(dwFlags: DWORD; pvArg: Pointer): BOOL; stdcall;
+ {$EXTERNALSYM PFN_CRYPT_CANCEL_RETRIEVAL}
+ PFnCryptCancelRetrieval = PFN_CRYPT_CANCEL_RETRIEVAL;
+
+//
+// PFN_CRYPT_CANCEL_RETRIEVAL
+//
+// This function should return FALSE when the object retrieval should be continued
+// and return TRUE when the object retrieval should be cancelled.
+//
+
+function CryptInstallCancelRetrieval(pfnCancel: PFN_CRYPT_CANCEL_RETRIEVAL;
+ pvArg: Pointer; dwFlags: DWORD; pvReserved: Pointer): BOOL; stdcall;
+{$EXTERNALSYM CryptInstallCancelRetrieval}
+
+function CryptUninstallCancelRetrieval(dwFlags: DWORD; pvReserved: Pointer): BOOL; stdcall;
+{$EXTERNALSYM CryptUninstallCancelRetrieval}
+
+function CryptCancelAsyncRetrieval(hAsyncRetrieval: HCRYPTASYNC): BOOL; stdcall;
+{$EXTERNALSYM CryptCancelAsyncRetrieval}
+
+//
+// Remote Object Async Retrieval parameters
+//
+
+//
+// A client that wants to be notified of asynchronous object retrieval
+// completion sets this parameter on the async handle
+//
+
+const
+ CRYPT_PARAM_ASYNC_RETRIEVAL_COMPLETION = LPCSTR(1);
+ {$EXTERNALSYM CRYPT_PARAM_ASYNC_RETRIEVAL_COMPLETION}
+
+type
+ PFN_CRYPT_ASYNC_RETRIEVAL_COMPLETION_FUNC = procedure(pvCompletion: LPVOID;
+ dwCompletionCode: DWORD; pszUrl: LPCSTR; pszObjectOid: LPSTR; pvObject: LPVOID); stdcall;
+ {$EXTERNALSYM PFN_CRYPT_ASYNC_RETRIEVAL_COMPLETION_FUNC}
+ PFnCryptASynchRetrievalCompletionFunc = PFN_CRYPT_ASYNC_RETRIEVAL_COMPLETION_FUNC;
+
+ PCRYPT_ASYNC_RETRIEVAL_COMPLETION = ^CRYPT_ASYNC_RETRIEVAL_COMPLETION;
+ {$EXTERNALSYM PCRYPT_ASYNC_RETRIEVAL_COMPLETION}
+ _CRYPT_ASYNC_RETRIEVAL_COMPLETION = record
+ pfnCompletion: PFN_CRYPT_ASYNC_RETRIEVAL_COMPLETION_FUNC;
+ pvCompletion: LPVOID;
+ end;
+ {$EXTERNALSYM _CRYPT_ASYNC_RETRIEVAL_COMPLETION}
+ CRYPT_ASYNC_RETRIEVAL_COMPLETION = _CRYPT_ASYNC_RETRIEVAL_COMPLETION;
+ {$EXTERNALSYM CRYPT_ASYNC_RETRIEVAL_COMPLETION}
+ TCryptAsyncRetrievalCompletion = CRYPT_ASYNC_RETRIEVAL_COMPLETION;
+ PCryptAsyncRetrievalCompletion = PCRYPT_ASYNC_RETRIEVAL_COMPLETION;
+
+//
+// This function is set on the async handle by a scheme provider that
+// supports asynchronous retrieval
+//
+
+const
+ CRYPT_PARAM_CANCEL_ASYNC_RETRIEVAL = LPCSTR(2);
+ {$EXTERNALSYM CRYPT_PARAM_CANCEL_ASYNC_RETRIEVAL}
+
+type
+ PFN_CANCEL_ASYNC_RETRIEVAL_FUNC = function(hAsyncRetrieve: HCRYPTASYNC): BOOL; stdcall;
+ {$EXTERNALSYM PFN_CANCEL_ASYNC_RETRIEVAL_FUNC}
+ PFnCancelASynchRetrievalFunc = PFN_CANCEL_ASYNC_RETRIEVAL_FUNC;
+
+//
+// Get the locator for a CAPI object
+//
+
+const
+ CRYPT_GET_URL_FROM_PROPERTY = $00000001;
+ {$EXTERNALSYM CRYPT_GET_URL_FROM_PROPERTY}
+ CRYPT_GET_URL_FROM_EXTENSION = $00000002;
+ {$EXTERNALSYM CRYPT_GET_URL_FROM_EXTENSION}
+ CRYPT_GET_URL_FROM_UNAUTH_ATTRIBUTE = $00000004;
+ {$EXTERNALSYM CRYPT_GET_URL_FROM_UNAUTH_ATTRIBUTE}
+ CRYPT_GET_URL_FROM_AUTH_ATTRIBUTE = $00000008;
+ {$EXTERNALSYM CRYPT_GET_URL_FROM_AUTH_ATTRIBUTE}
+
+type
+ PCRYPT_URL_ARRAY = ^CRYPT_URL_ARRAY;
+ {$EXTERNALSYM PCRYPT_URL_ARRAY}
+ _CRYPT_URL_ARRAY = record
+ cUrl: DWORD;
+ rgwszUrl: LPWSTR;
+ end;
+ {$EXTERNALSYM _CRYPT_URL_ARRAY}
+ CRYPT_URL_ARRAY = _CRYPT_URL_ARRAY;
+ {$EXTERNALSYM CRYPT_URL_ARRAY}
+ TCryptUrlArray = CRYPT_URL_ARRAY;
+ PCryptUrlArray = PCRYPT_URL_ARRAY;
+
+ PCRYPT_URL_INFO = ^CRYPT_URL_INFO;
+ {$EXTERNALSYM PCRYPT_URL_INFO}
+ _CRYPT_URL_INFO = record
+ cbSize: DWORD;
+ end;
+ {$EXTERNALSYM _CRYPT_URL_INFO}
+ CRYPT_URL_INFO = _CRYPT_URL_INFO;
+ {$EXTERNALSYM CRYPT_URL_INFO}
+ TCryptUrlInfo = CRYPT_URL_INFO;
+ PCryptUrlInfo = PCRYPT_URL_INFO;
+
+function CryptGetObjectUrl(pszUrlOid: LPCSTR; pvPara: LPVOID; dwFlags: DWORD;
+ pUrlArray: PCRYPT_URL_ARRAY; var pcbUrlArray: DWORD; pUrlInfo: PCRYPT_URL_INFO;
+ pcbUrlInfo: LPDWORD; pvReserved: LPVOID): BOOL; stdcall;
+{$EXTERNALSYM CryptGetObjectUrl}
+
+const
+ URL_OID_GET_OBJECT_URL_FUNC = 'UrlDllGetObjectUrl';
+ {$EXTERNALSYM URL_OID_GET_OBJECT_URL_FUNC}
+
+//
+// UrlDllGetObjectUrl has the same signature as CryptGetObjectUrl
+//
+
+//
+// URL_OID_CERTIFICATE_ISSUER
+//
+// pvPara == PCCERT_CONTEXT, certificate whose issuer's URL is being requested
+//
+// This will be retrieved from the authority info access extension or property
+// on the certificate
+//
+// URL_OID_CERTIFICATE_CRL_DIST_POINT
+//
+// pvPara == PCCERT_CONTEXT, certificate whose CRL distribution point is being
+// requested
+//
+// This will be retrieved from the CRL distribution point extension or property
+// on the certificate
+//
+// URL_OID_CTL_ISSUER
+//
+// pvPara == PCCTL_CONTEXT, Signer Index, CTL whose issuer's URL (identified
+// by the signer index) is being requested
+//
+// This will be retrieved from an authority info access attribute method encoded
+// in each signer info in the PKCS7 (CTL)
+//
+// URL_OID_CTL_NEXT_UPDATE
+//
+// pvPara == PCCTL_CONTEXT, Signer Index, CTL whose next update URL is being
+// requested and an optional signer index in case we need to check signer
+// info attributes
+//
+// This will be retrieved from an authority info access CTL extension, property,
+// or signer info attribute method
+//
+// URL_OID_CRL_ISSUER
+//
+// pvPara == PCCRL_CONTEXT, CRL whose issuer's URL is being requested
+//
+// This will be retrieved from a property on the CRL which has been inherited
+// from the subject cert (either from the subject cert issuer or the subject
+// cert distribution point extension). It will be encoded as an authority
+// info access extension method.
+//
+
+const
+ URL_OID_CERTIFICATE_ISSUER = LPCSTR(1);
+ {$EXTERNALSYM URL_OID_CERTIFICATE_ISSUER}
+ URL_OID_CERTIFICATE_CRL_DIST_POINT = LPCSTR(2);
+ {$EXTERNALSYM URL_OID_CERTIFICATE_CRL_DIST_POINT}
+ URL_OID_CTL_ISSUER = LPCSTR(3);
+ {$EXTERNALSYM URL_OID_CTL_ISSUER}
+ URL_OID_CTL_NEXT_UPDATE = LPCSTR(4);
+ {$EXTERNALSYM URL_OID_CTL_NEXT_UPDATE}
+ URL_OID_CRL_ISSUER = LPCSTR(5);
+ {$EXTERNALSYM URL_OID_CRL_ISSUER}
+
+//
+// Get a time valid CAPI2 object
+//
+
+function CryptGetTimeValidObject(pszTimeValidOid: LPCSTR; pvPara: LPVOID;
+ pIssuer: PCCERT_CONTEXT; pftValidFor: LPFILETIME; dwFlags, dwTimeout: DWORD;
+ ppvObject: LPLPVOID; pCredentials: PCRYPT_CREDENTIALS; pvReserved: LPVOID): BOOL; stdcall;
+{$EXTERNALSYM CryptGetTimeValidObject}
+
+const
+ TIME_VALID_OID_GET_OBJECT_FUNC = 'TimeValidDllGetObject';
+ {$EXTERNALSYM TIME_VALID_OID_GET_OBJECT_FUNC}
+
+//
+// TimeValidDllGetObject has the same signature as CryptGetTimeValidObject
+//
+
+//
+// TIME_VALID_OID_GET_CTL
+//
+// pvPara == PCCTL_CONTEXT, the current CTL
+//
+// TIME_VALID_OID_GET_CRL
+//
+// pvPara == PCCRL_CONTEXT, the current CRL
+//
+// TIME_VALID_OID_GET_CRL_FROM_CERT
+//
+// pvPara == PCCERT_CONTEXT, the subject cert
+//
+
+ TIME_VALID_OID_GET_CTL = LPCSTR(1);
+ {$EXTERNALSYM TIME_VALID_OID_GET_CTL}
+ TIME_VALID_OID_GET_CRL = LPCSTR(2);
+ {$EXTERNALSYM TIME_VALID_OID_GET_CRL}
+ TIME_VALID_OID_GET_CRL_FROM_CERT = LPCSTR(3);
+ {$EXTERNALSYM TIME_VALID_OID_GET_CRL_FROM_CERT}
+
+function CryptFlushTimeValidObject(pszFlushTimeValidOid: LPCSTR; pvPara: LPVOID;
+ pIssuer: PCCERT_CONTEXT; dwFlags: DWORD; pvReserved: LPVOID): BOOL; stdcall;
+{$EXTERNALSYM CryptFlushTimeValidObject}
+
+const
+ TIME_VALID_OID_FLUSH_OBJECT_FUNC = 'TimeValidDllFlushObject';
+ {$EXTERNALSYM TIME_VALID_OID_FLUSH_OBJECT_FUNC}
+
+//
+// TimeValidDllFlushObject has the same signature as CryptFlushTimeValidObject
+//
+
+//
+// TIME_VALID_OID_FLUSH_CTL
+//
+// pvPara == PCCTL_CONTEXT, the CTL to flush
+//
+// TIME_VALID_OID_FLUSH_CRL
+//
+// pvPara == PCCRL_CONTEXT, the CRL to flush
+//
+// TIME_VALID_OID_FLUSH_CRL_FROM_CERT
+//
+
+ TIME_VALID_OID_FLUSH_CTL = LPCSTR(1);
+ {$EXTERNALSYM TIME_VALID_OID_FLUSH_CTL}
+ TIME_VALID_OID_FLUSH_CRL = LPCSTR(2);
+ {$EXTERNALSYM TIME_VALID_OID_FLUSH_CRL}
+ TIME_VALID_OID_FLUSH_CRL_FROM_CERT = LPCSTR(3);
+ {$EXTERNALSYM TIME_VALID_OID_FLUSH_CRL_FROM_CERT}
+
+//-------------------------------------------------------------------------
+// Data Protection APIs
+//-------------------------------------------------------------------------
+
+//
+// Data protection APIs enable applications to easily secure data.
+//
+// The base provider provides protection based on the users' logon
+// credentials. The data secured with these APIs follow the same
+// roaming characteristics as HKCU -- if HKCU roams, the data
+// protected by the base provider may roam as well. This makes
+// the API ideal for the munging of data stored in the registry.
+//
+
+//
+// Prompt struct -- what to tell users about the access
+//
+
+type
+ PCRYPTPROTECT_PROMPTSTRUCT = ^CRYPTPROTECT_PROMPTSTRUCT;
+ {$EXTERNALSYM PCRYPTPROTECT_PROMPTSTRUCT}
+ _CRYPTPROTECT_PROMPTSTRUCT = record
+ cbSize: DWORD;
+ dwPromptFlags: DWORD;
+ hwndApp: HWND;
+ szPrompt: LPCWSTR;
+ end;
+ {$EXTERNALSYM _CRYPTPROTECT_PROMPTSTRUCT}
+ CRYPTPROTECT_PROMPTSTRUCT = _CRYPTPROTECT_PROMPTSTRUCT;
+ {$EXTERNALSYM CRYPTPROTECT_PROMPTSTRUCT}
+ TCryptProtectPromptStruct = CRYPTPROTECT_PROMPTSTRUCT;
+ PCryptProtectPromptStruct = PCRYPTPROTECT_PROMPTSTRUCT;
+
+//
+// base provider action
+//
+
+const
+ CRYPTPROTECT_DEFAULT_PROVIDER: GUID = (
+ D1:$df9d8cd0; D2:$1501; D3:$11d1; D4:($8c, $7a, $00, $c0, $4f, $c2, $97, $eb));
+ {$EXTERNALSYM CRYPTPROTECT_DEFAULT_PROVIDER}
+
+//
+// CryptProtect PromptStruct dwPromtFlags
+//
+//
+// prompt on unprotect
+
+ CRYPTPROTECT_PROMPT_ON_UNPROTECT = $1; // 1<<0
+ {$EXTERNALSYM CRYPTPROTECT_PROMPT_ON_UNPROTECT}
+
+//
+// prompt on protect
+
+ CRYPTPROTECT_PROMPT_ON_PROTECT = $2; // 1<<1
+ {$EXTERNALSYM CRYPTPROTECT_PROMPT_ON_PROTECT}
+ CRYPTPROTECT_PROMPT_RESERVED = $04; // reserved, do not use.
+ {$EXTERNALSYM CRYPTPROTECT_PROMPT_RESERVED}
+
+//
+// only allow strong variant UI protection (user supplied password currently).
+
+ CRYPTPROTECT_PROMPT_STRONG = $08; // 1<<3
+ {$EXTERNALSYM CRYPTPROTECT_PROMPT_STRONG}
+
+//
+// CryptProtectData and CryptUnprotectData dwFlags
+//
+// for remote-access situations where ui is not an option
+// if UI was specified on protect or unprotect operation, the call
+// will fail and GetLastError() will indicate ERROR_PASSWORD_RESTRICTION
+
+ CRYPTPROTECT_UI_FORBIDDEN = $1;
+ {$EXTERNALSYM CRYPTPROTECT_UI_FORBIDDEN}
+
+//
+// per machine protected data -- any user on machine where CryptProtectData
+// took place may CryptUnprotectData
+
+ CRYPTPROTECT_LOCAL_MACHINE = $4;
+ {$EXTERNALSYM CRYPTPROTECT_LOCAL_MACHINE}
+
+//
+// force credential synchronize during CryptProtectData()
+// Synchronize is only operation that occurs during this operation
+
+ CRYPTPROTECT_CRED_SYNC = $8;
+ {$EXTERNALSYM CRYPTPROTECT_CRED_SYNC}
+
+// flags reserved for system use
+
+ CRYPTPROTECT_FIRST_RESERVED_FLAGVAL = $0FFFFFFF;
+ {$EXTERNALSYM CRYPTPROTECT_FIRST_RESERVED_FLAGVAL}
+ CRYPTPROTECT_LAST_RESERVED_FLAGVAL = DWORD($FFFFFFFF);
+ {$EXTERNALSYM CRYPTPROTECT_LAST_RESERVED_FLAGVAL}
+
+//
+// flags specific to base provider
+//
+
+function CryptProtectData(pDataIn: PDATA_BLOB; szDataDescr: LPCWSTR;
+ pOptionalEntropy: PDATA_BLOB; pvReserved: PVOID;
+ pPromptStruct: PCRYPTPROTECT_PROMPTSTRUCT; dwFlags: DWORD; pDataOut: PDATA_BLOB): BOOL; stdcall;
+{$EXTERNALSYM CryptProtectData}
+
+function CryptUnprotectData(pDataIn: PDATA_BLOB; ppszDataDescr: LPLPWSTR;
+ pOptionalEntropy: PDATA_BLOB; pvReserved: PVOID;
+ pPromptStruct: PCRYPTPROTECT_PROMPTSTRUCT; dwFlags: DWORD; pDataOut: PDATA_BLOB): BOOL; stdcall;
+{$EXTERNALSYM CryptUnprotectData}
+
+//+=========================================================================
+// Helper functions to build certificates
+//==========================================================================
+
+//+-------------------------------------------------------------------------
+//
+// Builds a self-signed certificate and returns a PCCERT_CONTEXT representing
+// the certificate. A hProv must be specified to build the cert context.
+//
+// pSubjectIssuerBlob is the DN for the certifcate. If an alternate subject
+// name is desired it must be specified as an extension in the pExtensions
+// parameter. pSubjectIssuerBlob can NOT be NULL, so minimually an empty DN
+// must be specified.
+//
+// By default:
+// pKeyProvInfo - The CSP is queried for the KeyProvInfo parameters. Only the Provider,
+// Provider Type and Container is queried. Many CSPs don't support these
+// queries and will cause a failure. In such cases the pKeyProvInfo
+// must be specified (RSA BASE works fine).
+//
+// pSignatureAlgorithm - will default to SHA1RSA
+// pStartTime will default to the current time
+// pEndTime will default to 1 year
+// pEntensions will be empty.
+//
+// The returned PCCERT_CONTEXT will reference the private keys by setting the
+// CERT_KEY_PROV_INFO_PROP_ID. However, if this property is not desired specify the
+// CERT_CREATE_SELFSIGN_NO_KEY_INFO in dwFlags.
+//
+// If the cert being built is only a dummy placeholder cert for speed it may not
+// need to be signed. Signing of the cert is skipped if CERT_CREATE_SELFSIGN_NO_SIGN
+// is specified in dwFlags.
+//
+//--------------------------------------------------------------------------
+
+function CertCreateSelfSignCertificate(hProv: HCRYPTPROV;
+ pSubjectIssuerBlob: PCERT_NAME_BLOB; dwFlags: DWORD;
+ pKeyProvInfo: PCRYPT_KEY_PROV_INFO; pSignatureAlgorithm: PCRYPT_ALGORITHM_IDENTIFIER;
+ pStartTime, pEndTime: PSYSTEMTIME; pExtensions: PCERT_EXTENSIONS): PCCERT_CONTEXT; stdcall;
+{$EXTERNALSYM CertCreateSelfSignCertificate}
+
+const
+ CERT_CREATE_SELFSIGN_NO_SIGN = 1;
+ {$EXTERNALSYM CERT_CREATE_SELFSIGN_NO_SIGN}
+ CERT_CREATE_SELFSIGN_NO_KEY_INFO = 2;
+ {$EXTERNALSYM CERT_CREATE_SELFSIGN_NO_KEY_INFO}
+
+//+=========================================================================
+// Key Identifier Property Data Structures and APIs
+//==========================================================================
+
+//+-------------------------------------------------------------------------
+// Get the property for the specified Key Identifier.
+//
+// The Key Identifier is the SHA1 hash of the encoded CERT_PUBLIC_KEY_INFO.
+// The Key Identifier for a certificate can be obtained by getting the
+// certificate's CERT_KEY_IDENTIFIER_PROP_ID. The
+// CryptCreateKeyIdentifierFromCSP API can be called to create the Key
+// Identifier from a CSP Public Key Blob.
+//
+// A Key Identifier can have the same properties as a certificate context.
+// CERT_KEY_PROV_INFO_PROP_ID is the property of most interest.
+// For CERT_KEY_PROV_INFO_PROP_ID, pvData points to a CRYPT_KEY_PROV_INFO
+// structure. Elements pointed to by fields in the pvData structure follow the
+// structure. Therefore, *pcbData will exceed the size of the structure.
+//
+// If CRYPT_KEYID_ALLOC_FLAG is set, then, *pvData is updated with a
+// pointer to allocated memory. LocalFree() must be called to free the
+// allocated memory.
+//
+// By default, searches the CurrentUser's list of Key Identifiers.
+// CRYPT_KEYID_MACHINE_FLAG can be set to search the LocalMachine's list
+// of Key Identifiers. When CRYPT_KEYID_MACHINE_FLAG is set, pwszComputerName
+// can also be set to specify the name of a remote computer to be searched
+// instead of the local machine.
+//--------------------------------------------------------------------------
+
+function CryptGetKeyIdentifierProperty(pKeyIdentifier: PCRYPT_HASH_BLOB;
+ dwPropId: DWORD; dwFlags: DWORD; pwszComputerName: LPCWSTR; pvReserved: Pointer;
+ pvData: Pointer; var pcbData: DWORD): BOOL; stdcall;
+{$EXTERNALSYM CryptGetKeyIdentifierProperty}
+
+// When the following flag is set, searches the LocalMachine instead of the
+// CurrentUser. This flag is applicable to all the KeyIdentifierProperty APIs.
+
+const
+ CRYPT_KEYID_MACHINE_FLAG = $00000020;
+ {$EXTERNALSYM CRYPT_KEYID_MACHINE_FLAG}
+
+// When the following flag is set, *pvData is updated with a pointer to
+// allocated memory. LocalFree() must be called to free the allocated memory.
+
+ CRYPT_KEYID_ALLOC_FLAG = $00008000;
+ {$EXTERNALSYM CRYPT_KEYID_ALLOC_FLAG}
+
+//+-------------------------------------------------------------------------
+// Set the property for the specified Key Identifier.
+//
+// For CERT_KEY_PROV_INFO_PROP_ID pvData points to the
+// CRYPT_KEY_PROV_INFO data structure. For all other properties, pvData
+// points to a CRYPT_DATA_BLOB.
+//
+// Setting pvData == NULL, deletes the property.
+//
+// Set CRYPT_KEYID_MACHINE_FLAG to set the property for a LocalMachine
+// Key Identifier. Set pwszComputerName, to select a remote computer.
+//
+// If CRYPT_KEYID_DELETE_FLAG is set, the Key Identifier and all its
+// properties is deleted.
+//
+// If CRYPT_KEYID_SET_NEW_FLAG is set, the set fails if the property already
+// exists. For an existing property, FALSE is returned with LastError set to
+// CRYPT_E_EXISTS.
+//--------------------------------------------------------------------------
+
+function CryptSetKeyIdentifierProperty(pKeyIdentifier: PCRYPT_HASH_BLOB;
+ dwPropId: DWORD; dwFlags: DWORD; pwszComputerName: LPCWSTR; pvReserved: Pointer;
+ pvData: Pointer): BOOL; stdcall;
+{$EXTERNALSYM CryptSetKeyIdentifierProperty}
+
+// When the following flag is set, the Key Identifier and all its properties
+// are deleted.
+
+const
+ CRYPT_KEYID_DELETE_FLAG = $00000010;
+ {$EXTERNALSYM CRYPT_KEYID_DELETE_FLAG}
+
+// When the following flag is set, the set fails if the property already
+// exists.
+
+ CRYPT_KEYID_SET_NEW_FLAG = $00002000;
+ {$EXTERNALSYM CRYPT_KEYID_SET_NEW_FLAG}
+
+//+-------------------------------------------------------------------------
+// For CERT_KEY_PROV_INFO_PROP_ID, rgppvData[] points to a
+// CRYPT_KEY_PROV_INFO.
+//
+// Return FALSE to stop the enumeration.
+//--------------------------------------------------------------------------
+
+type
+ PFN_CRYPT_ENUM_KEYID_PROP = function(pKeyIdentifier: PCRYPT_HASH_BLOB;
+ dwFlags: DWORD; pvReserved: Pointer; pvArg: Pointer; cProp: DWORD;
+ rgdwPropId: LPDWORD; rgpvData: Pointer; rgcbData: LPDWORD): BOOL; stdcall;
+ {$EXTERNALSYM PFN_CRYPT_ENUM_KEYID_PROP}
+ PFnCryptEnumKeyIdProp = PFN_CRYPT_ENUM_KEYID_PROP;
+
+//+-------------------------------------------------------------------------
+// Enumerate the Key Identifiers.
+//
+// If pKeyIdentifier is NULL, enumerates all Key Identifers. Otherwise,
+// calls the callback for the specified KeyIdentifier. If dwPropId is
+// 0, calls the callback with all the properties. Otherwise, only calls
+// the callback with the specified property (cProp = 1).
+// Furthermore, when dwPropId is specified, skips KeyIdentifiers not
+// having the property.
+//
+// Set CRYPT_KEYID_MACHINE_FLAG to enumerate the LocalMachine
+// Key Identifiers. Set pwszComputerName, to enumerate Key Identifiers on
+// a remote computer.
+//--------------------------------------------------------------------------
+
+function CryptEnumKeyIdentifierProperties(pKeyIdentifier: PCRYPT_HASH_BLOB;
+ dwPropId: DWORD; dwFlags: DWORD; pwszComputerName: LPCWSTR; pvReserved: Pointer;
+ pvArg: Pointer; pfnEnum: PFN_CRYPT_ENUM_KEYID_PROP): BOOL; stdcall;
+{$EXTERNALSYM CryptEnumKeyIdentifierProperties}
+
+//+-------------------------------------------------------------------------
+// Create a KeyIdentifier from the CSP Public Key Blob.
+//
+// Converts the CSP PUBLICKEYSTRUC into a X.509 CERT_PUBLIC_KEY_INFO and
+// encodes. The encoded CERT_PUBLIC_KEY_INFO is SHA1 hashed to obtain
+// the Key Identifier.
+//
+// By default, the pPubKeyStruc->aiKeyAlg is used to find the appropriate
+// public key Object Identifier. pszPubKeyOID can be set to override
+// the default OID obtained from the aiKeyAlg.
+//--------------------------------------------------------------------------
+
+function CryptCreateKeyIdentifierFromCSP(dwCertEncodingType: DWORD;
+ pszPubKeyOID: LPCSTR; pPubKeyStruc: PPUBLICKEYSTRUC; cbPubKeyStruc: DWORD;
+ dwFlags: DWORD; pvReserved: Pointer; pbHash: LPBYTE; pcbHash: DWORD): BOOL; stdcall;
+{$EXTERNALSYM CryptCreateKeyIdentifierFromCSP}
+
+//+=========================================================================
+// Certificate Chaining Infrastructure
+//==========================================================================
+
+//
+// The chain engine defines the store namespace and cache partitioning for
+// the Certificate Chaining infrastructure. A default chain engine
+// is defined for the process which uses all default system stores e.g.
+// Root, CA, Trust, for chain building and caching. If an application
+// wishes to define its own store namespace or have its own partitioned
+// cache then it can create its own chain engine. It is advisable to create
+// a chain engine at application startup and use it throughout the lifetime
+// of the application in order to get optimal caching behavior
+//
+
+type
+ HCERTCHAINENGINE = HANDLE;
+ {$EXTERNALSYM HCERTCHAINENGINE}
+
+const
+ HCCE_CURRENT_USER = HCERTCHAINENGINE(0);
+ {$EXTERNALSYM HCCE_CURRENT_USER}
+ HCCE_LOCAL_MACHINE = HCERTCHAINENGINE($1);
+ {$EXTERNALSYM HCCE_LOCAL_MACHINE}
+
+//
+// Create a certificate chain engine.
+//
+
+//
+// Configuration parameters for the certificate chain engine
+//
+// hRestrictedRoot - restrict the root store (must be a subset of "Root")
+//
+// hRestrictedTrust - restrict the store for CTLs
+//
+// hRestrictedOther - restrict the store for certs and CRLs
+//
+// cAdditionalStore, rghAdditionalStore - additional stores
+//
+// NOTE: The algorithm used to define the stores for the engine is as
+// follows:
+//
+// hRoot = hRestrictedRoot or System Store "Root"
+//
+// hTrust = hRestrictedTrust or hWorld (defined later)
+//
+// hOther = hRestrictedOther or (hRestrictedTrust == NULL) ? hWorld :
+// hRestrictedTrust + hWorld
+//
+// hWorld = hRoot + "CA" + "My" + "Trust" + rghAdditionalStore
+//
+// dwFlags - flags
+//
+// CERT_CHAIN_CACHE_END_CERT - information will be cached on
+// the end cert as well as the other
+// certs in the chain
+//
+// CERT_CHAIN_THREAD_STORE_SYNC - use separate thread for store syncs
+// and related cache updates
+//
+// CERT_CHAIN_CACHE_ONLY_URL_RETRIEVAL - don't hit the wire to get
+// URL based objects
+//
+// dwUrlRetrievalTimeout - timeout for wire based URL object retrievals
+//
+
+const
+ CERT_CHAIN_CACHE_END_CERT = $00000001;
+ {$EXTERNALSYM CERT_CHAIN_CACHE_END_CERT}
+ CERT_CHAIN_THREAD_STORE_SYNC = $00000002;
+ {$EXTERNALSYM CERT_CHAIN_THREAD_STORE_SYNC}
+ CERT_CHAIN_CACHE_ONLY_URL_RETRIEVAL = $00000004;
+ {$EXTERNALSYM CERT_CHAIN_CACHE_ONLY_URL_RETRIEVAL}
+ CERT_CHAIN_USE_LOCAL_MACHINE_STORE = $00000008;
+ {$EXTERNALSYM CERT_CHAIN_USE_LOCAL_MACHINE_STORE}
+ CERT_CHAIN_ENABLE_CACHE_AUTO_UPDATE = $00000010;
+ {$EXTERNALSYM CERT_CHAIN_ENABLE_CACHE_AUTO_UPDATE}
+
+type
+ PCERT_CHAIN_ENGINE_CONFIG = ^CERT_CHAIN_ENGINE_CONFIG;
+ {$EXTERNALSYM PCERT_CHAIN_ENGINE_CONFIG}
+ _CERT_CHAIN_ENGINE_CONFIG = record
+ cbSize: DWORD;
+ hRestrictedRoot: HCERTSTORE;
+ hRestrictedTrust: HCERTSTORE;
+ hRestrictedOther: HCERTSTORE;
+ cAdditionalStore: DWORD;
+ rghAdditionalStore: PHCERTSTORE;
+ dwFlags: DWORD;
+ dwUrlRetrievalTimeout: DWORD;
+ MaximumCachedCertificates: DWORD;
+ CycleDetectionModulus: DWORD;
+ end;
+ {$EXTERNALSYM _CERT_CHAIN_ENGINE_CONFIG}
+ CERT_CHAIN_ENGINE_CONFIG = _CERT_CHAIN_ENGINE_CONFIG;
+ {$EXTERNALSYM CERT_CHAIN_ENGINE_CONFIG}
+ TCertChainEngineConfig = CERT_CHAIN_ENGINE_CONFIG;
+ PCertChainEngineConfig = PCERT_CHAIN_ENGINE_CONFIG;
+
+function CertCreateCertificateChainEngine(pConfig: PCERT_CHAIN_ENGINE_CONFIG;
+ var phChainEngine: HCERTCHAINENGINE): BOOL; stdcall;
+{$EXTERNALSYM CertCreateCertificateChainEngine}
+
+//
+// Free a certificate trust engine
+//
+
+procedure CertFreeCertificateChainEngine(hChainEngine: HCERTCHAINENGINE); stdcall;
+{$EXTERNALSYM CertFreeCertificateChainEngine}
+
+//
+// Resync the certificate chain engine. This resync's the stores backing
+// the engine and updates the engine caches.
+//
+
+function CertResyncCertificateChainEngine(hChainEngine: HCERTCHAINENGINE): BOOL; stdcall;
+{$EXTERNALSYM CertResyncCertificateChainEngine}
+
+//
+// When an application requests a certificate chain, the data structure
+// returned is in the form of a CERT_CHAIN_CONTEXT. This contains
+// an array of CERT_SIMPLE_CHAIN where each simple chain goes from
+// an end cert to a self signed cert and the chain context connects simple
+// chains via trust lists. Each simple chain contains the chain of
+// certificates, summary trust information about the chain and trust information
+// about each certificate element in the chain.
+//
+
+//
+// Trust status bits
+//
+
+type
+ PCERT_TRUST_STATUS = ^CERT_TRUST_STATUS;
+ {$EXTERNALSYM PCERT_TRUST_STATUS}
+ _CERT_TRUST_STATUS = record
+ dwErrorStatus: DWORD;
+ dwInfoStatus: DWORD;
+ end;
+ {$EXTERNALSYM _CERT_TRUST_STATUS}
+ CERT_TRUST_STATUS = _CERT_TRUST_STATUS;
+ {$EXTERNALSYM CERT_TRUST_STATUS}
+ TCertTrustStatus = CERT_TRUST_STATUS;
+ PCertTrustStatus = PCERT_TRUST_STATUS;
+
+//
+// The following are error status bits
+//
+
+// These can be applied to certificates and chains
+
+const
+ CERT_TRUST_NO_ERROR = $00000000;
+ {$EXTERNALSYM CERT_TRUST_NO_ERROR}
+ CERT_TRUST_IS_NOT_TIME_VALID = $00000001;
+ {$EXTERNALSYM CERT_TRUST_IS_NOT_TIME_VALID}
+ CERT_TRUST_IS_NOT_TIME_NESTED = $00000002;
+ {$EXTERNALSYM CERT_TRUST_IS_NOT_TIME_NESTED}
+ CERT_TRUST_IS_REVOKED = $00000004;
+ {$EXTERNALSYM CERT_TRUST_IS_REVOKED}
+ CERT_TRUST_IS_NOT_SIGNATURE_VALID = $00000008;
+ {$EXTERNALSYM CERT_TRUST_IS_NOT_SIGNATURE_VALID}
+ CERT_TRUST_IS_NOT_VALID_FOR_USAGE = $00000010;
+ {$EXTERNALSYM CERT_TRUST_IS_NOT_VALID_FOR_USAGE}
+ CERT_TRUST_IS_UNTRUSTED_ROOT = $00000020;
+ {$EXTERNALSYM CERT_TRUST_IS_UNTRUSTED_ROOT}
+ CERT_TRUST_REVOCATION_STATUS_UNKNOWN = $00000040;
+ {$EXTERNALSYM CERT_TRUST_REVOCATION_STATUS_UNKNOWN}
+ CERT_TRUST_IS_CYCLIC = $00000080;
+ {$EXTERNALSYM CERT_TRUST_IS_CYCLIC}
+
+// These can be applied to chains only
+
+ CERT_TRUST_IS_PARTIAL_CHAIN = $00010000;
+ {$EXTERNALSYM CERT_TRUST_IS_PARTIAL_CHAIN}
+ CERT_TRUST_CTL_IS_NOT_TIME_VALID = $00020000;
+ {$EXTERNALSYM CERT_TRUST_CTL_IS_NOT_TIME_VALID}
+ CERT_TRUST_CTL_IS_NOT_SIGNATURE_VALID = $00040000;
+ {$EXTERNALSYM CERT_TRUST_CTL_IS_NOT_SIGNATURE_VALID}
+ CERT_TRUST_CTL_IS_NOT_VALID_FOR_USAGE = $00080000;
+ {$EXTERNALSYM CERT_TRUST_CTL_IS_NOT_VALID_FOR_USAGE}
+
+//
+// The following are info status bits
+//
+
+// These can be applied to certificates only
+
+ CERT_TRUST_HAS_EXACT_MATCH_ISSUER = $00000001;
+ {$EXTERNALSYM CERT_TRUST_HAS_EXACT_MATCH_ISSUER}
+ CERT_TRUST_HAS_KEY_MATCH_ISSUER = $00000002;
+ {$EXTERNALSYM CERT_TRUST_HAS_KEY_MATCH_ISSUER}
+ CERT_TRUST_HAS_NAME_MATCH_ISSUER = $00000004;
+ {$EXTERNALSYM CERT_TRUST_HAS_NAME_MATCH_ISSUER}
+ CERT_TRUST_IS_SELF_SIGNED = $00000008;
+ {$EXTERNALSYM CERT_TRUST_IS_SELF_SIGNED}
+
+// These can be applied to chains only
+
+ CERT_TRUST_IS_COMPLEX_CHAIN = $00010000;
+ {$EXTERNALSYM CERT_TRUST_IS_COMPLEX_CHAIN}
+
+//
+// Each certificate context in a simple chain has a corresponding chain element
+// in the simple chain context
+//
+// dwErrorStatus has CERT_TRUST_IS_REVOKED, pRevocationInfo set
+// dwErrorStatus has CERT_TRUST_REVOCATION_STATUS_UNKNOWN, pRevocationInfo set
+
+//
+// BUGBUG: Note that the post processing revocation supported in the first
+// version only sets cbSize and dwRevocationResult. Everything else
+// is NULL
+//
+
+//
+// Revocation Information
+//
+
+type
+ PCERT_REVOCATION_INFO = ^CERT_REVOCATION_INFO;
+ {$EXTERNALSYM PCERT_REVOCATION_INFO}
+ _CERT_REVOCATION_INFO = record
+ cbSize: DWORD;
+ dwRevocationResult: DWORD;
+ pszRevocationOid: LPCSTR;
+ pvOidSpecificInfo: LPVOID;
+ end;
+ {$EXTERNALSYM _CERT_REVOCATION_INFO}
+ CERT_REVOCATION_INFO = _CERT_REVOCATION_INFO;
+ {$EXTERNALSYM CERT_REVOCATION_INFO}
+ TCertRevocationInfo = CERT_REVOCATION_INFO;
+ PCertRevocationInfo = PCERT_REVOCATION_INFO;
+
+//
+// Trust List Information
+//
+
+ PCERT_TRUST_LIST_INFO = ^CERT_TRUST_LIST_INFO;
+ {$EXTERNALSYM PCERT_TRUST_LIST_INFO}
+ _CERT_TRUST_LIST_INFO = record
+ cbSize: DWORD;
+ pCtlEntry: PCTL_ENTRY;
+ pCtlContext: PCCTL_CONTEXT;
+ end;
+ {$EXTERNALSYM _CERT_TRUST_LIST_INFO}
+ CERT_TRUST_LIST_INFO = _CERT_TRUST_LIST_INFO;
+ {$EXTERNALSYM CERT_TRUST_LIST_INFO}
+ TCertTrustListInfo = CERT_TRUST_LIST_INFO;
+ PCertTrustListInfo = PCERT_TRUST_LIST_INFO;
+
+//
+// Chain Element
+//
+
+ PCERT_CHAIN_ELEMENT = ^CERT_CHAIN_ELEMENT;
+ {$EXTERNALSYM PCERT_CHAIN_ELEMENT}
+ _CERT_CHAIN_ELEMENT = record
+ cbSize: DWORD;
+ pCertContext: PCCERT_CONTEXT;
+ TrustStatus: CERT_TRUST_STATUS;
+ pRevocationInfo: PCERT_REVOCATION_INFO;
+ end;
+ {$EXTERNALSYM _CERT_CHAIN_ELEMENT}
+ CERT_CHAIN_ELEMENT = _CERT_CHAIN_ELEMENT;
+ {$EXTERNALSYM CERT_CHAIN_ELEMENT}
+ TCertChainElement = CERT_CHAIN_ELEMENT;
+ PCertChainElement = PCERT_CHAIN_ELEMENT;
+
+//
+// The simple chain is an array of chain elements and a summary trust status
+// for the chain
+//
+// rgpElements[0] is the end certificate chain element
+//
+// rgpElements[cElement-1] is the self-signed "root" certificate chain element
+//
+
+ PCERT_SIMPLE_CHAIN = ^CERT_SIMPLE_CHAIN;
+ {$EXTERNALSYM PCERT_SIMPLE_CHAIN}
+ _CERT_SIMPLE_CHAIN = record
+ cbSize: DWORD;
+ TrustStatus: CERT_TRUST_STATUS;
+ cElement: DWORD;
+ rgpElement: PCERT_CHAIN_ELEMENT;
+ pTrustListInfo: PCERT_TRUST_LIST_INFO;
+ end;
+ {$EXTERNALSYM _CERT_SIMPLE_CHAIN}
+ CERT_SIMPLE_CHAIN = _CERT_SIMPLE_CHAIN;
+ {$EXTERNALSYM CERT_SIMPLE_CHAIN}
+ TCertSimpleChain = CERT_SIMPLE_CHAIN;
+ PCertSimpleChain = PCERT_SIMPLE_CHAIN;
+
+//
+// And the chain context contains an array of simple chains and summary trust
+// status for all the connected simple chains
+//
+// rgpChains[0] is the end certificate simple chain
+//
+// rgpChains[cChain-1] is the final (possibly trust list signer) chain which
+// ends in a certificate which is contained in the root store
+//
+
+ PCERT_CHAIN_CONTEXT = ^CERT_CHAIN_CONTEXT;
+ {$EXTERNALSYM PCERT_CHAIN_CONTEXT}
+ _CERT_CHAIN_CONTEXT = record
+ cbSize: DWORD;
+ TrustStatus: CERT_TRUST_STATUS;
+ cChain: DWORD;
+ rgpChain: PCERT_SIMPLE_CHAIN;
+ end;
+ {$EXTERNALSYM _CERT_CHAIN_CONTEXT}
+ CERT_CHAIN_CONTEXT = _CERT_CHAIN_CONTEXT;
+ {$EXTERNALSYM CERT_CHAIN_CONTEXT}
+ TCertChainContext = CERT_CHAIN_CONTEXT;
+ PCertChainContext = PCERT_CHAIN_CONTEXT;
+
+ PCCERT_CHAIN_CONTEXT = ^CERT_CHAIN_CONTEXT;
+ {$EXTERNALSYM PCCERT_CHAIN_CONTEXT}
+ PPCCERT_CHAIN_CONTEXT = ^PCERT_CHAIN_CONTEXT;
+ {$NODEFINE PPCCERT_CHAIN_CONTEXT}
+
+//
+// When building a chain, the there are various parameters used for finding
+// issuing certificates and trust lists. They are identified in the
+// following structure
+//
+
+// Default usage match type is AND with value zero
+
+const
+ USAGE_MATCH_TYPE_AND = $00000000;
+ {$EXTERNALSYM USAGE_MATCH_TYPE_AND}
+ USAGE_MATCH_TYPE_OR = $00000001;
+ {$EXTERNALSYM USAGE_MATCH_TYPE_OR}
+
+type
+ PCERT_USAGE_MATCH = ^CERT_USAGE_MATCH;
+ {$EXTERNALSYM PCERT_USAGE_MATCH}
+ _CERT_USAGE_MATCH = record
+ dwType: DWORD;
+ Usage: CERT_ENHKEY_USAGE;
+ end;
+ {$EXTERNALSYM _CERT_USAGE_MATCH}
+ CERT_USAGE_MATCH = _CERT_USAGE_MATCH;
+ {$EXTERNALSYM CERT_USAGE_MATCH}
+ TCertUsageMatch = CERT_USAGE_MATCH;
+ PCertUsageMatch = PCERT_USAGE_MATCH;
+
+ PCTL_USAGE_MATCH = ^CTL_USAGE_MATCH;
+ {$EXTERNALSYM PCTL_USAGE_MATCH}
+ _CTL_USAGE_MATCH = record
+ dwType: DWORD;
+ Usage: CTL_USAGE;
+ end;
+ {$EXTERNALSYM _CTL_USAGE_MATCH}
+ CTL_USAGE_MATCH = _CTL_USAGE_MATCH;
+ {$EXTERNALSYM CTL_USAGE_MATCH}
+ TCtlUsageMatch = CTL_USAGE_MATCH;
+ PCtlUsageMatch = PCTL_USAGE_MATCH;
+
+ PCERT_CHAIN_PARA = ^CERT_CHAIN_PARA;
+ {$EXTERNALSYM PCERT_CHAIN_PARA}
+ _CERT_CHAIN_PARA = record
+ cbSize: DWORD;
+ RequestedUsage: CERT_USAGE_MATCH;
+ end;
+ {$EXTERNALSYM _CERT_CHAIN_PARA}
+ CERT_CHAIN_PARA = _CERT_CHAIN_PARA;
+ {$EXTERNALSYM CERT_CHAIN_PARA}
+ TCertChainPara = CERT_CHAIN_PARA;
+ PCertChainPara = PCERT_CHAIN_PARA;
+
+//
+// The following API is used for retrieving certificate chains
+//
+// Parameters:
+//
+// hChainEngine - the chain engine (namespace and cache) to use, NULL
+// mean use the default chain engine
+//
+// pCertContext - the context we are retrieving the chain for, it
+// will be the zero index element in the chain
+//
+// pTime - the point in time that we want the chain validated
+// for. Note that the time does not affect trust list,
+// revocation, or root store checking. NULL means use
+// the current system time
+//
+// hAdditionalStore - additional store to use when looking up objects
+//
+// pChainPara - parameters for chain building
+//
+// dwFlags - flags such as should revocation checking be done
+// on the chain?
+//
+// pvReserved - reserved parameter, must be NULL
+//
+// ppChainContext - chain context returned
+//
+
+// CERT_CHAIN_CACHE_END_CERT can be used here as well
+// Revocation flags are in the high nibble
+
+const
+ CERT_CHAIN_REVOCATION_CHECK_END_CERT = $10000000;
+ {$EXTERNALSYM CERT_CHAIN_REVOCATION_CHECK_END_CERT}
+ CERT_CHAIN_REVOCATION_CHECK_CHAIN = $20000000;
+ {$EXTERNALSYM CERT_CHAIN_REVOCATION_CHECK_CHAIN}
+ CERT_CHAIN_REVOCATION_CHECK_CHAIN_EXCLUDE_ROOT = $40000000;
+ {$EXTERNALSYM CERT_CHAIN_REVOCATION_CHECK_CHAIN_EXCLUDE_ROOT}
+ CERT_CHAIN_REVOCATION_CHECK_CACHE_ONLY = DWORD($80000000);
+ {$EXTERNALSYM CERT_CHAIN_REVOCATION_CHECK_CACHE_ONLY}
+
+function CertGetCertificateChain(hChainEngine: HCERTCHAINENGINE;
+ pCertContext: PCCERT_CONTEXT; pTime: LPFILETIME; hAdditionalStore: HCERTSTORE;
+ pChainPara: PCERT_CHAIN_PARA; dwFlags: DWORD; pvReserved: LPVOID;
+ ppChainContext: PPCCERT_CHAIN_CONTEXT): BOOL; stdcall;
+{$EXTERNALSYM CertGetCertificateChain}
+
+//
+// Free a certificate chain
+//
+
+procedure CertFreeCertificateChain(pChainContext: PCCERT_CHAIN_CONTEXT); stdcall;
+{$EXTERNALSYM CertFreeCertificateChain}
+
+//
+// Duplicate (add a reference to) a certificate chain
+//
+
+function CertDuplicateCertificateChain(pChainContext: PCCERT_CHAIN_CONTEXT): PCCERT_CHAIN_CONTEXT; stdcall;
+{$EXTERNALSYM CertDuplicateCertificateChain}
+
+//
+// Specific Revocation Type OID and structure definitions
+//
+
+//
+// CRL Revocation OID
+//
+
+const
+ REVOCATION_OID_CRL_REVOCATION = LPCSTR(1);
+ {$EXTERNALSYM REVOCATION_OID_CRL_REVOCATION}
+
+//
+// For the CRL revocation OID the pvRevocationPara is NULL
+//
+
+//
+// CRL Revocation Info
+//
+
+type
+ PCRL_REVOCATION_INFO = ^CRL_REVOCATION_INFO;
+ {$EXTERNALSYM PCRL_REVOCATION_INFO}
+ _CRL_REVOCATION_INFO = record
+ pCrlEntry: PCRL_ENTRY;
+ pCrlContext: PCCRL_CONTEXT;
+ pCrlIssuerChain: PCCERT_CHAIN_CONTEXT;
+ end;
+ {$EXTERNALSYM _CRL_REVOCATION_INFO}
+ CRL_REVOCATION_INFO = _CRL_REVOCATION_INFO;
+ {$EXTERNALSYM CRL_REVOCATION_INFO}
+ TCrlRevocationInfo = CRL_REVOCATION_INFO;
+ PCrlRevocationInfo = PCRL_REVOCATION_INFO;
+
+//+-------------------------------------------------------------------------
+// Find the first or next certificate chain context in the store.
+//
+// The chain context is found according to the dwFindFlags, dwFindType and
+// its pvFindPara. See below for a list of the find types and its parameters.
+//
+// If the first or next chain context isn't found, NULL is returned.
+// Otherwise, a pointer to a read only CERT_CHAIN_CONTEXT is returned.
+// CERT_CHAIN_CONTEXT must be freed by calling CertFreeCertificateChain
+// or is freed when passed as the
+// pPrevChainContext on a subsequent call. CertDuplicateCertificateChain
+// can be called to make a duplicate.
+//
+// pPrevChainContext MUST BE NULL on the first
+// call to find the chain context. To find the next chain context, the
+// pPrevChainContext is set to the CERT_CHAIN_CONTEXT returned by a previous
+// call.
+//
+// NOTE: a NON-NULL pPrevChainContext is always CertFreeCertificateChain'ed by
+// this function, even for an error.
+//--------------------------------------------------------------------------
+
+function CertFindChainInStore(hCertStore: HCERTSTORE; dwCertEncodingType: DWORD;
+ dwFindFlags: DWORD; dwFindType: DWORD; pvFindPara: Pointer;
+ pPrevChainContext: PCCERT_CHAIN_CONTEXT): PCCERT_CHAIN_CONTEXT; stdcall;
+{$EXTERNALSYM CertFindChainInStore}
+
+const
+ CERT_CHAIN_FIND_BY_ISSUER = 1;
+ {$EXTERNALSYM CERT_CHAIN_FIND_BY_ISSUER}
+
+//+-------------------------------------------------------------------------
+// CERT_CHAIN_FIND_BY_ISSUER
+//
+// Find a certificate chain having a private key for the end certificate and
+// matching one of the given issuer names. A matching dwKeySpec and
+// enhanced key usage can also be specified. Additionally a callback can
+// be provided for even more caller provided filtering before building the
+// chain.
+//
+// By default, only the issuers in the first simple chain are compared
+// for a name match. CERT_CHAIN_FIND_BY_ISSUER_COMPLEX_CHAIN_FLAG can
+// be set in dwFindFlags to match issuers in all the simple chains.
+//
+// CERT_CHAIN_FIND_BY_ISSUER_NO_KEY_FLAG can be set in dwFindFlags to
+// not check if the end certificate has a private key.
+//
+// CERT_CHAIN_FIND_BY_ISSUER_COMPARE_KEY_FLAG can be set in dwFindFlags
+// to compare the public key in the end certificate with the crypto
+// provider's public key. The dwAcquirePrivateKeyFlags can be set
+// in CERT_CHAIN_FIND_BY_ISSUER_PARA to enable caching of the private key's
+// HKEY returned by the CSP.
+//
+// If dwCertEncodingType == 0, defaults to X509_ASN_ENCODING for the
+// array of encoded issuer names.
+//
+// By default, the hCertStore passed to CertFindChainInStore, is passed
+// as an additional store to CertGetCertificateChain.
+// CERT_CHAIN_FIND_BY_ISSUER_CACHE_ONLY_FLAG can be set in dwFindFlags
+// to improve performance by only searching the cached system stores
+// (root, my, ca, trust) to find the issuer certificates. If you are doing
+// a find in the "my" system store, than, this flag should be set to
+// improve performance.
+//
+// Setting CERT_CHAIN_FIND_BY_ISSUER_LOCAL_MACHINE_FLAG in dwFindFlags
+// restricts CertGetCertificateChain to search the Local Machine
+// cached system stores instead of the Current User's.
+//
+// Setting CERT_CHAIN_FIND_BY_ISSUER_CACHE_ONLY_URL_FLAG in dwFindFlags
+// restricts CertGetCertificateChain to only search the URL cache
+// and not hit the wire.
+//--------------------------------------------------------------------------
+
+// Returns FALSE to skip this certificate. Otherwise, returns TRUE to
+// build a chain for this certificate.
+
+type
+ PFN_CERT_CHAIN_FIND_BY_ISSUER_CALLBACK = function(pCert: PCCERT_CONTEXT;
+ pvFindArg: Pointer): BOOL; stdcall;
+ {$EXTERNALSYM PFN_CERT_CHAIN_FIND_BY_ISSUER_CALLBACK}
+ PFnCertChainFindByIssuerCallback = PFN_CERT_CHAIN_FIND_BY_ISSUER_CALLBACK;
+
+ PCERT_CHAIN_FIND_BY_ISSUER_PARA = ^CERT_CHAIN_FIND_BY_ISSUER_PARA;
+ {$EXTERNALSYM PCERT_CHAIN_FIND_BY_ISSUER_PARA}
+ _CERT_CHAIN_FIND_BY_ISSUER_PARA = record
+ cbSize: DWORD;
+ // If pszUsageIdentifier == NULL, matches any usage.
+ pszUsageIdentifier: LPCSTR;
+ // If dwKeySpec == 0, matches any KeySpec
+ dwKeySpec: DWORD;
+ // When CERT_CHAIN_FIND_BY_ISSUER_COMPARE_KEY_FLAG is set in dwFindFlags,
+ // CryptAcquireCertificatePrivateKey is called to do the public key
+ // comparison. The following flags can be set to enable caching
+ // of the acquired private key. See the API for more details on these
+ // flags.
+ dwAcquirePrivateKeyFlags: DWORD;
+ // Pointer to an array of X509, ASN.1 encoded issuer name blobs. If
+ // cIssuer == 0, matches any issuer
+ cIssuer: DWORD;
+ rgIssuer: PCERT_NAME_BLOB;
+ // If NULL or Callback returns TRUE, builds the chain for the end
+ // certificate having a private key with the specified KeySpec and
+ // enhanced key usage.
+ pfnFindCallback: PFN_CERT_CHAIN_FIND_BY_ISSUER_CALLBACK;
+ pvFindArg: Pointer;
+ end;
+ {$EXTERNALSYM _CERT_CHAIN_FIND_BY_ISSUER_PARA}
+ CERT_CHAIN_FIND_BY_ISSUER_PARA = _CERT_CHAIN_FIND_BY_ISSUER_PARA;
+ {$EXTERNALSYM CERT_CHAIN_FIND_BY_ISSUER_PARA}
+ TCertChainFindByIssuerPara = CERT_CHAIN_FIND_BY_ISSUER_PARA;
+ PCertChainFindByIssuerPara = PCERT_CHAIN_FIND_BY_ISSUER_PARA;
+
+// The following dwFindFlags can be set for CERT_CHAIN_FIND_BY_ISSUER
+
+// If set, compares the public key in the end certificate with the crypto
+// provider's public key. This comparison is the last check made on the
+// build chain.
+
+const
+ CERT_CHAIN_FIND_BY_ISSUER_COMPARE_KEY_FLAG = $0001;
+ {$EXTERNALSYM CERT_CHAIN_FIND_BY_ISSUER_COMPARE_KEY_FLAG}
+
+// If not set, only checks the first simple chain for an issuer name match.
+// When set, also checks second and subsequent simple chains.
+
+ CERT_CHAIN_FIND_BY_ISSUER_COMPLEX_CHAIN_FLAG = $0002;
+ {$EXTERNALSYM CERT_CHAIN_FIND_BY_ISSUER_COMPLEX_CHAIN_FLAG}
+
+// If set, CertGetCertificateChain only searches the URL cache and
+// doesn't hit the wire.
+
+ CERT_CHAIN_FIND_BY_ISSUER_CACHE_ONLY_URL_FLAG = $0004;
+ {$EXTERNALSYM CERT_CHAIN_FIND_BY_ISSUER_CACHE_ONLY_URL_FLAG}
+
+// If set, CertGetCertificateChain only opens the Local Machine
+// certificate stores instead of the Current User's.
+
+ CERT_CHAIN_FIND_BY_ISSUER_LOCAL_MACHINE_FLAG = $0008;
+ {$EXTERNALSYM CERT_CHAIN_FIND_BY_ISSUER_LOCAL_MACHINE_FLAG}
+
+// If set, no check is made to see if the end certificate has a private
+// key associated with it.
+
+ CERT_CHAIN_FIND_BY_ISSUER_NO_KEY_FLAG = $4000;
+ {$EXTERNALSYM CERT_CHAIN_FIND_BY_ISSUER_NO_KEY_FLAG}
+
+// By default, the hCertStore passed to CertFindChainInStore, is passed
+// as the additional store to CertGetCertificateChain. This flag can be
+// set to improve performance by only searching the cached system stores
+// (root, my, ca, trust) to find the issuer certificates. If not set, then,
+// the hCertStore is always searched in addition to the cached system
+// stores.
+
+ CERT_CHAIN_FIND_BY_ISSUER_CACHE_ONLY_FLAG = $8000;
+ {$EXTERNALSYM CERT_CHAIN_FIND_BY_ISSUER_CACHE_ONLY_FLAG}
+
+//+=========================================================================
+// Certificate Chain Policy Data Structures and APIs
+//==========================================================================
+
+type
+ PCERT_CHAIN_POLICY_PARA = ^CERT_CHAIN_POLICY_PARA;
+ {$EXTERNALSYM PCERT_CHAIN_POLICY_PARA}
+ _CERT_CHAIN_POLICY_PARA = record
+ cbSize: DWORD;
+ dwFlags: DWORD;
+ pvExtraPolicyPara: Pointer; // pszPolicyOID specific
+ end;
+ {$EXTERNALSYM _CERT_CHAIN_POLICY_PARA}
+ CERT_CHAIN_POLICY_PARA = _CERT_CHAIN_POLICY_PARA;
+ {$EXTERNALSYM CERT_CHAIN_POLICY_PARA}
+ TCertChainPolicyPara = CERT_CHAIN_POLICY_PARA;
+ PCertChainPolicyPara = PCERT_CHAIN_POLICY_PARA;
+
+// If both lChainIndex and lElementIndex are set to -1, the dwError applies
+// to the whole chain context. If only lElementIndex is set to -1, the
+// dwError applies to the lChainIndex'ed chain. Otherwise, the dwError applies
+// to the certificate element at
+// pChainContext->rgpChain[lChainIndex]->rgpElement[lElementIndex].
+
+ PCERT_CHAIN_POLICY_STATUS = ^CERT_CHAIN_POLICY_STATUS;
+ {$EXTERNALSYM PCERT_CHAIN_POLICY_STATUS}
+ _CERT_CHAIN_POLICY_STATUS = record
+ cbSize: DWORD;
+ dwError: DWORD;
+ lChainIndex: LONG;
+ lElementIndex: LONG;
+ pvExtraPolicyStatus: Pointer; // pszPolicyOID specific
+ end;
+ {$EXTERNALSYM _CERT_CHAIN_POLICY_STATUS}
+ CERT_CHAIN_POLICY_STATUS = _CERT_CHAIN_POLICY_STATUS;
+ {$EXTERNALSYM CERT_CHAIN_POLICY_STATUS}
+ TCertChainPolicyStatus = CERT_CHAIN_POLICY_STATUS;
+ PCertChainPolicyStatus = PCERT_CHAIN_POLICY_STATUS;
+
+// Common chain policy flags
+
+const
+ CERT_CHAIN_POLICY_IGNORE_NOT_TIME_VALID_FLAG = $00000001;
+ {$EXTERNALSYM CERT_CHAIN_POLICY_IGNORE_NOT_TIME_VALID_FLAG}
+ CERT_CHAIN_POLICY_IGNORE_CTL_NOT_TIME_VALID_FLAG = $00000002;
+ {$EXTERNALSYM CERT_CHAIN_POLICY_IGNORE_CTL_NOT_TIME_VALID_FLAG}
+ CERT_CHAIN_POLICY_IGNORE_NOT_TIME_NESTED_FLAG = $00000004;
+ {$EXTERNALSYM CERT_CHAIN_POLICY_IGNORE_NOT_TIME_NESTED_FLAG}
+
+ CERT_CHAIN_POLICY_IGNORE_ALL_NOT_TIME_VALID_FLAGS = (
+ CERT_CHAIN_POLICY_IGNORE_NOT_TIME_VALID_FLAG or
+ CERT_CHAIN_POLICY_IGNORE_CTL_NOT_TIME_VALID_FLAG or
+ CERT_CHAIN_POLICY_IGNORE_NOT_TIME_NESTED_FLAG);
+ {$EXTERNALSYM CERT_CHAIN_POLICY_IGNORE_ALL_NOT_TIME_VALID_FLAGS}
+
+ CERT_CHAIN_POLICY_ALLOW_UNKNOWN_CA_FLAG = $00000010;
+ {$EXTERNALSYM CERT_CHAIN_POLICY_ALLOW_UNKNOWN_CA_FLAG}
+ CERT_CHAIN_POLICY_IGNORE_WRONG_USAGE_FLAG = $00000020;
+ {$EXTERNALSYM CERT_CHAIN_POLICY_IGNORE_WRONG_USAGE_FLAG}
+
+ CERT_CHAIN_POLICY_IGNORE_END_REV_UNKNOWN_FLAG = $00000100;
+ {$EXTERNALSYM CERT_CHAIN_POLICY_IGNORE_END_REV_UNKNOWN_FLAG}
+ CERT_CHAIN_POLICY_IGNORE_CTL_SIGNER_REV_UNKNOWN_FLAG = $00000200;
+ {$EXTERNALSYM CERT_CHAIN_POLICY_IGNORE_CTL_SIGNER_REV_UNKNOWN_FLAG}
+ CERT_CHAIN_POLICY_IGNORE_CA_REV_UNKNOWN_FLAG = $00000400;
+ {$EXTERNALSYM CERT_CHAIN_POLICY_IGNORE_CA_REV_UNKNOWN_FLAG}
+ CERT_CHAIN_POLICY_IGNORE_ROOT_REV_UNKNOWN_FLAG = $00000800;
+ {$EXTERNALSYM CERT_CHAIN_POLICY_IGNORE_ROOT_REV_UNKNOWN_FLAG}
+
+ CERT_CHAIN_POLICY_IGNORE_ALL_REV_UNKNOWN_FLAGS = (
+ CERT_CHAIN_POLICY_IGNORE_END_REV_UNKNOWN_FLAG or
+ CERT_CHAIN_POLICY_IGNORE_CTL_SIGNER_REV_UNKNOWN_FLAG or
+ CERT_CHAIN_POLICY_IGNORE_CA_REV_UNKNOWN_FLAG or
+ CERT_CHAIN_POLICY_IGNORE_ROOT_REV_UNKNOWN_FLAG);
+ {$EXTERNALSYM CERT_CHAIN_POLICY_IGNORE_ALL_REV_UNKNOWN_FLAGS}
+
+ CERT_CHAIN_POLICY_ALLOW_TESTROOT_FLAG = $00008000;
+ {$EXTERNALSYM CERT_CHAIN_POLICY_ALLOW_TESTROOT_FLAG}
+ CERT_CHAIN_POLICY_TRUST_TESTROOT_FLAG = $00004000;
+ {$EXTERNALSYM CERT_CHAIN_POLICY_TRUST_TESTROOT_FLAG}
+
+//+-------------------------------------------------------------------------
+// Verify that the certificate chain satisfies the specified policy
+// requirements. If we were able to verify the chain policy, TRUE is returned
+// and the dwError field of the pPolicyStatus is updated. A dwError of 0
+// (ERROR_SUCCESS, S_OK) indicates the chain satisfies the specified policy.
+//
+// If dwError applies to the entire chain context, both lChainIndex and
+// lElementIndex are set to -1. If dwError applies to a simple chain,
+// lElementIndex is set to -1 and lChainIndex is set to the index of the
+// first offending chain having the error. If dwError applies to a
+// certificate element, lChainIndex and lElementIndex are updated to
+// index the first offending certificate having the error, where, the
+// the certificate element is at:
+// pChainContext->rgpChain[lChainIndex]->rgpElement[lElementIndex].
+//
+// The dwFlags in pPolicyPara can be set to change the default policy checking
+// behaviour. In addition, policy specific parameters can be passed in
+// the pvExtraPolicyPara field of pPolicyPara.
+//
+// In addition to returning dwError, in pPolicyStatus, policy OID specific
+// extra status may be returned via pvExtraPolicyStatus.
+//--------------------------------------------------------------------------
+
+function CertVerifyCertificateChainPolicy(pszPolicyOID: LPCSTR;
+ pChainContext: PCCERT_CHAIN_CONTEXT; pPolicyPara: PCERT_CHAIN_POLICY_PARA;
+ pPolicyStatus: PCERT_CHAIN_POLICY_STATUS): BOOL; stdcall;
+{$EXTERNALSYM CertVerifyCertificateChainPolicy}
+
+// Predefined OID Function Names
+
+const
+ CRYPT_OID_VERIFY_CERTIFICATE_CHAIN_POLICY_FUNC = 'CertDllVerifyCertificateChainPolicy';
+ {$EXTERNALSYM CRYPT_OID_VERIFY_CERTIFICATE_CHAIN_POLICY_FUNC}
+
+// CertDllVerifyCertificateChainPolicy has same function signature as
+// CertVerifyCertificateChainPolicy.
+
+//+-------------------------------------------------------------------------
+// Predefined verify chain policies
+//--------------------------------------------------------------------------
+
+ CERT_CHAIN_POLICY_BASE = LPCSTR(1);
+ {$EXTERNALSYM CERT_CHAIN_POLICY_BASE}
+ CERT_CHAIN_POLICY_AUTHENTICODE = LPCSTR(2);
+ {$EXTERNALSYM CERT_CHAIN_POLICY_AUTHENTICODE}
+ CERT_CHAIN_POLICY_AUTHENTICODE_TS = LPCSTR(3);
+ {$EXTERNALSYM CERT_CHAIN_POLICY_AUTHENTICODE_TS}
+ CERT_CHAIN_POLICY_SSL = LPCSTR(4);
+ {$EXTERNALSYM CERT_CHAIN_POLICY_SSL}
+ CERT_CHAIN_POLICY_BASIC_CONSTRAINTS = LPCSTR(5);
+ {$EXTERNALSYM CERT_CHAIN_POLICY_BASIC_CONSTRAINTS}
+ CERT_CHAIN_POLICY_NT_AUTH = LPCSTR(6);
+ {$EXTERNALSYM CERT_CHAIN_POLICY_NT_AUTH}
+
+//+-------------------------------------------------------------------------
+// CERT_CHAIN_POLICY_BASE
+//
+// Implements the base chain policy verification checks. dwFlags can
+// be set in pPolicyPara to alter the default policy checking behaviour.
+//--------------------------------------------------------------------------
+
+//+-------------------------------------------------------------------------
+// CERT_CHAIN_POLICY_AUTHENTICODE
+//
+// Implements the Authenticode chain policy verification checks.
+//
+// pvExtraPolicyPara may optionally be set to point to the following
+// AUTHENTICODE_EXTRA_CERT_CHAIN_POLICY_PARA.
+//
+// pvExtraPolicyStatus may optionally be set to point to the following
+// AUTHENTICODE_EXTRA_CERT_CHAIN_POLICY_STATUS.
+//--------------------------------------------------------------------------
+
+// dwRegPolicySettings are defined in wintrust.h
+
+type
+ PAUTHENTICODE_EXTRA_CERT_CHAIN_POLICY_PARA = ^AUTHENTICODE_EXTRA_CERT_CHAIN_POLICY_PARA;
+ {$EXTERNALSYM PAUTHENTICODE_EXTRA_CERT_CHAIN_POLICY_PARA}
+ _AUTHENTICODE_EXTRA_CERT_CHAIN_POLICY_PARA = record
+ cbSize: DWORD;
+ dwRegPolicySettings: DWORD;
+ pSignerInfo: PCMSG_SIGNER_INFO; // optional
+ end;
+ {$EXTERNALSYM _AUTHENTICODE_EXTRA_CERT_CHAIN_POLICY_PARA}
+ AUTHENTICODE_EXTRA_CERT_CHAIN_POLICY_PARA = _AUTHENTICODE_EXTRA_CERT_CHAIN_POLICY_PARA;
+ {$EXTERNALSYM AUTHENTICODE_EXTRA_CERT_CHAIN_POLICY_PARA}
+ TAuthenticodeExtraCertChainPolicyPara = AUTHENTICODE_EXTRA_CERT_CHAIN_POLICY_PARA;
+ PAuthenticodeExtraCertChainPolicyPara = PAUTHENTICODE_EXTRA_CERT_CHAIN_POLICY_PARA;
+
+ PAUTHENTICODE_EXTRA_CERT_CHAIN_POLICY_STATUS = ^AUTHENTICODE_EXTRA_CERT_CHAIN_POLICY_STATUS;
+ {$EXTERNALSYM PAUTHENTICODE_EXTRA_CERT_CHAIN_POLICY_STATUS}
+ _AUTHENTICODE_EXTRA_CERT_CHAIN_POLICY_STATUS = record
+ cbSize: DWORD;
+ fCommercial: BOOL; // obtained from signer statement
+ end;
+ {$EXTERNALSYM _AUTHENTICODE_EXTRA_CERT_CHAIN_POLICY_STATUS}
+ AUTHENTICODE_EXTRA_CERT_CHAIN_POLICY_STATUS = _AUTHENTICODE_EXTRA_CERT_CHAIN_POLICY_STATUS;
+ {$EXTERNALSYM AUTHENTICODE_EXTRA_CERT_CHAIN_POLICY_STATUS}
+ TAuthenticodeExtraCertChainPolicyStatus = AUTHENTICODE_EXTRA_CERT_CHAIN_POLICY_STATUS;
+ PAuthenticodeExtraCertChainPolicyStatus = PAUTHENTICODE_EXTRA_CERT_CHAIN_POLICY_STATUS;
+
+//+-------------------------------------------------------------------------
+// CERT_CHAIN_POLICY_AUTHENTICODE_TS
+//
+// Implements the Authenticode Time Stamp chain policy verification checks.
+//
+// pvExtraPolicyPara may optionally be set to point to the following
+// AUTHENTICODE_TS_EXTRA_CERT_CHAIN_POLICY_PARA.
+//
+// pvExtraPolicyStatus isn't used and must be set to NULL.
+//--------------------------------------------------------------------------
+
+// dwRegPolicySettings are defined in wintrust.h
+
+ PAUTHENTICODE_TS_EXTRA_CERT_CHAIN_POLICY_PARA = ^AUTHENTICODE_TS_EXTRA_CERT_CHAIN_POLICY_PARA;
+ {$EXTERNALSYM PAUTHENTICODE_TS_EXTRA_CERT_CHAIN_POLICY_PARA}
+ _AUTHENTICODE_TS_EXTRA_CERT_CHAIN_POLICY_PARA = record
+ cbSize: DWORD;
+ dwRegPolicySettings: DWORD;
+ fCommercial: BOOL;
+ end;
+ {$EXTERNALSYM _AUTHENTICODE_TS_EXTRA_CERT_CHAIN_POLICY_PARA}
+ AUTHENTICODE_TS_EXTRA_CERT_CHAIN_POLICY_PARA = _AUTHENTICODE_TS_EXTRA_CERT_CHAIN_POLICY_PARA;
+ {$EXTERNALSYM AUTHENTICODE_TS_EXTRA_CERT_CHAIN_POLICY_PARA}
+ TAuthenticodeTsExtraCertChainPolicyPara = AUTHENTICODE_TS_EXTRA_CERT_CHAIN_POLICY_PARA;
+ PAuthenticodeTsExtraCertChainPolicyPara = PAUTHENTICODE_TS_EXTRA_CERT_CHAIN_POLICY_PARA;
+
+//+-------------------------------------------------------------------------
+// CERT_CHAIN_POLICY_SSL
+//
+// Implements the SSL client/server chain policy verification checks.
+//
+// pvExtraPolicyPara may optionally be set to point to the following
+// SSL_EXTRA_CERT_CHAIN_POLICY_PARA data structure
+//--------------------------------------------------------------------------
+
+// fdwChecks flags are defined in wininet.h
+
+const
+ AUTHTYPE_CLIENT = 1;
+ {$EXTERNALSYM AUTHTYPE_CLIENT}
+ AUTHTYPE_SERVER = 2;
+ {$EXTERNALSYM AUTHTYPE_SERVER}
+
+type
+ PHTTPSPolicyCallbackData = ^HTTPSPolicyCallbackData;
+ {$EXTERNALSYM PHTTPSPolicyCallbackData}
+ _HTTPSPolicyCallbackData = record
+ //union {
+ //cbStruct: DWORD; // sizeof(HTTPSPolicyCallbackData);
+ cbSize: DWORD; // sizeof(HTTPSPolicyCallbackData);
+ //};
+ dwAuthType: DWORD;
+ fdwChecks: DWORD;
+ pwszServerName: PWCHAR; // used to check against CN=xxxx
+ end;
+ {$EXTERNALSYM _HTTPSPolicyCallbackData}
+ HTTPSPolicyCallbackData = _HTTPSPolicyCallbackData;
+ {$EXTERNALSYM HTTPSPolicyCallbackData}
+ THttpsPolicyCallbackData = HTTPSPolicyCallbackData;
+
+ SSL_EXTRA_CERT_CHAIN_POLICY_PARA = HTTPSPolicyCallbackData;
+ {$EXTERNALSYM SSL_EXTRA_CERT_CHAIN_POLICY_PARA}
+ PSSL_EXTRA_CERT_CHAIN_POLICY_PARA = PHTTPSPolicyCallbackData;
+ {$EXTERNALSYM PSSL_EXTRA_CERT_CHAIN_POLICY_PARA}
+ TSSLExtraCertChainPolicyPara = SSL_EXTRA_CERT_CHAIN_POLICY_PARA;
+ PSSLExtraCertChainPolicyPara = PSSL_EXTRA_CERT_CHAIN_POLICY_PARA;
+
+//+-------------------------------------------------------------------------
+// CERT_CHAIN_POLICY_BASIC_CONSTRAINTS
+//
+// Implements the basic constraints chain policy.
+//
+// Iterates through all the certificates in the chain checking for either
+// a szOID_BASIC_CONSTRAINTS or a szOID_BASIC_CONSTRAINTS2 extension. If
+// neither extension is present, the certificate is assumed to have
+// valid policy. Otherwise, for the first certificate element, checks if
+// it matches the expected CA_FLAG or END_ENTITY_FLAG specified in
+// pPolicyPara->dwFlags. If neither or both flags are set, then, the first
+// element can be either a CA or END_ENTITY. All other elements must be
+// a CA. If the PathLenConstraint is present in the extension, its
+// checked.
+//
+// The first elements in the remaining simple chains (ie, the certificate
+// used to sign the CTL) are checked to be an END_ENTITY.
+//
+// If this verification fails, dwError will be set to
+// TRUST_E_BASIC_CONSTRAINTS.
+//--------------------------------------------------------------------------
+
+const
+ BASIC_CONSTRAINTS_CERT_CHAIN_POLICY_CA_FLAG = DWORD($80000000);
+ {$EXTERNALSYM BASIC_CONSTRAINTS_CERT_CHAIN_POLICY_CA_FLAG}
+ BASIC_CONSTRAINTS_CERT_CHAIN_POLICY_END_ENTITY_FLAG = $40000000;
+ {$EXTERNALSYM BASIC_CONSTRAINTS_CERT_CHAIN_POLICY_END_ENTITY_FLAG}
+
+//+-------------------------------------------------------------------------
+// CERT_CHAIN_POLICY_NT_AUTH
+//
+// Implements the NT Authentication chain policy.
+//
+// The NT Authentication chain policy consists of 3 distinct chain
+// verifications in the following order:
+// [1] CERT_CHAIN_POLICY_BASE - Implements the base chain policy
+// verification checks. The LOWORD of dwFlags can be set in
+// pPolicyPara to alter the default policy checking behaviour. See
+// CERT_CHAIN_POLICY_BASE for more details.
+//
+// [2] CERT_CHAIN_POLICY_BASIC_CONSTRAINTS - Implements the basic
+// constraints chain policy. The HIWORD of dwFlags can be set
+// to specify if the first element must be either a CA or END_ENTITY.
+// See CERT_CHAIN_POLICY_BASIC_CONSTRAINTS for more details.
+//
+// [3] Checks if the second element in the chain, the CA that issued
+// the end certificate, is a trusted CA for NT
+// Authentication. A CA is considered to be trusted if it exists in
+// the "NTAuth" system registry store found in the
+// CERT_SYSTEM_STORE_LOCAL_MACHINE_ENTERPRISE store location.
+// If this verification fails, whereby the CA isn't trusted,
+// dwError is set to CERT_E_UNTRUSTEDCA.
+//--------------------------------------------------------------------------
+
+implementation
+
+const
+ crypt32 = 'crypt32.dll';
+ advapi32 = 'advapi32.dll';
+ softpub = 'softpub.dll';
+ {$IFDEF UNICODE}
+ AWSuffix = 'W';
+ {$ELSE}
+ AWSuffix = 'A';
+ {$ENDIF UNICODE}
+
+function GET_ALG_CLASS(x: DWORD): DWORD;
+begin
+ Result := (x and (7 shl 13));
+end;
+
+function GET_ALG_TYPE(x: DWORD): DWORD;
+begin
+ Result := (x and (15 shl 9));
+end;
+
+function GET_ALG_SID(x: DWORD): DWORD;
+begin
+ Result := x and 511;
+end;
+
+function RCRYPT_SUCCEEDED(rt: BOOL): BOOL;
+begin
+ Result := (rt = CRYPT_SUCCEED);
+end;
+
+function RCRYPT_FAILED(rt: BOOL): BOOL;
+begin
+ Result := (rt = CRYPT_FAILED)
+end;
+
+function IS_CERT_RDN_CHAR_STRING(X: DWORD): Boolean;
+begin
+ Result := (X and CERT_RDN_TYPE_MASK) >= CERT_RDN_NUMERIC_STRING;
+end;
+
+function GET_CERT_ENCODING_TYPE(X: DWORD): DWORD;
+begin
+ Result := X and CERT_ENCODING_TYPE_MASK;
+end;
+
+function GET_CMSG_ENCODING_TYPE(X: DWORD): DWORD;
+begin
+ Result := X and CMSG_ENCODING_TYPE_MASK;
+end;
+
+function GET_CERT_UNICODE_RDN_ERR_INDEX(X: DWORD): DWORD;
+begin
+ Result := (X shr CERT_UNICODE_RDN_ERR_INDEX_SHIFT) and CERT_UNICODE_RDN_ERR_INDEX_MASK;
+end;
+
+function GET_CERT_UNICODE_ATTR_ERR_INDEX(X: DWORD): DWORD;
+begin
+ Result := (X shr CERT_UNICODE_ATTR_ERR_INDEX_SHIFT) and CERT_UNICODE_ATTR_ERR_INDEX_MASK;
+end;
+
+function GET_CERT_UNICODE_VALUE_ERR_INDEX(X: DWORD): DWORD;
+begin
+ Result := X and CERT_UNICODE_VALUE_ERR_INDEX_MASK;
+end;
+
+function GET_CERT_ALT_NAME_ENTRY_ERR_INDEX(X: DWORD): DWORD;
+begin
+ Result := (X shr CERT_ALT_NAME_ENTRY_ERR_INDEX_SHIFT) and CERT_ALT_NAME_ENTRY_ERR_INDEX_MASK;
+end;
+
+function GET_CERT_ALT_NAME_VALUE_ERR_INDEX(X: DWORD): DWORD;
+begin
+ Result := X and CERT_ALT_NAME_VALUE_ERR_INDEX_MASK;
+end;
+
+function IS_CRL_DIST_POINT_ERR_CRL_ISSUER(X: DWORD): Boolean;
+begin
+ Result := (X and CRL_DIST_POINT_ERR_CRL_ISSUER_BIT) <> 0;
+end;
+
+function GET_CRL_DIST_POINT_ERR_INDEX(X: DWORD): DWORD;
+begin
+ Result := ((X shr CRL_DIST_POINT_ERR_INDEX_SHIFT) and CRL_DIST_POINT_ERR_INDEX_MASK);
+end;
+
+function IS_CERT_HASH_PROP_ID(X: DWORD): Boolean;
+begin
+ Result := (CERT_SHA1_HASH_PROP_ID = X) or (CERT_MD5_HASH_PROP_ID = X) or
+ (CERT_SIGNATURE_HASH_PROP_ID = X);
+end;
+
+{$IFDEF DYNAMIC_LINK}
+
+var
+ _CryptAcquireContextA: Pointer;
+
+function CryptAcquireContextA;
+begin
+ GetProcedureAddress(_CryptAcquireContextA, advapi32, 'CryptAcquireContextA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CryptAcquireContextA]
+ end;
+end;
+
+var
+ _CryptAcquireContextW: Pointer;
+
+function CryptAcquireContextW;
+begin
+ GetProcedureAddress(_CryptAcquireContextW, advapi32, 'CryptAcquireContextW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CryptAcquireContextW]
+ end;
+end;
+
+var
+ _CryptAcquireContext: Pointer;
+
+function CryptAcquireContext;
+begin
+ GetProcedureAddress(_CryptAcquireContext, advapi32, 'CryptAcquireContext' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CryptAcquireContext]
+ end;
+end;
+
+var
+ _CryptReleaseContext: Pointer;
+
+function CryptReleaseContext;
+begin
+ GetProcedureAddress(_CryptReleaseContext, advapi32, 'CryptReleaseContext');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CryptReleaseContext]
+ end;
+end;
+
+var
+ _CryptGenKey: Pointer;
+
+function CryptGenKey;
+begin
+ GetProcedureAddress(_CryptGenKey, advapi32, 'CryptGenKey');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CryptGenKey]
+ end;
+end;
+
+var
+ _CryptDeriveKey: Pointer;
+
+function CryptDeriveKey;
+begin
+ GetProcedureAddress(_CryptDeriveKey, advapi32, 'CryptDeriveKey');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CryptDeriveKey]
+ end;
+end;
+
+var
+ _CryptDestroyKey: Pointer;
+
+function CryptDestroyKey;
+begin
+ GetProcedureAddress(_CryptDestroyKey, advapi32, 'CryptDestroyKey');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CryptDestroyKey]
+ end;
+end;
+
+var
+ _CryptSetKeyParam: Pointer;
+
+function CryptSetKeyParam;
+begin
+ GetProcedureAddress(_CryptSetKeyParam, crypt32, 'CryptSetKeyParam');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CryptSetKeyParam]
+ end;
+end;
+
+var
+ _CryptGetKeyParam: Pointer;
+
+function CryptGetKeyParam;
+begin
+ GetProcedureAddress(_CryptGetKeyParam, advapi32, 'CryptGetKeyParam');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CryptGetKeyParam]
+ end;
+end;
+
+var
+ _CryptSetHashParam: Pointer;
+
+function CryptSetHashParam;
+begin
+ GetProcedureAddress(_CryptSetHashParam, advapi32, 'CryptSetHashParam');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CryptSetHashParam]
+ end;
+end;
+
+var
+ _CryptGetHashParam: Pointer;
+
+function CryptGetHashParam;
+begin
+ GetProcedureAddress(_CryptGetHashParam, advapi32, 'CryptGetHashParam');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CryptGetHashParam]
+ end;
+end;
+
+var
+ _CryptSetProvParam: Pointer;
+
+function CryptSetProvParam;
+begin
+ GetProcedureAddress(_CryptSetProvParam, advapi32, 'CryptSetProvParam');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CryptSetProvParam]
+ end;
+end;
+
+var
+ _CryptGetProvParam: Pointer;
+
+function CryptGetProvParam;
+begin
+ GetProcedureAddress(_CryptGetProvParam, advapi32, 'CryptGetProvParam');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CryptGetProvParam]
+ end;
+end;
+
+var
+ _CryptGenRandom: Pointer;
+
+function CryptGenRandom;
+begin
+ GetProcedureAddress(_CryptGenRandom, advapi32, 'CryptGenRandom');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CryptGenRandom]
+ end;
+end;
+
+var
+ _CryptGetUserKey: Pointer;
+
+function CryptGetUserKey;
+begin
+ GetProcedureAddress(_CryptGetUserKey, advapi32, 'CryptGetUserKey');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CryptGetUserKey]
+ end;
+end;
+
+var
+ _CryptExportKey: Pointer;
+
+function CryptExportKey;
+begin
+ GetProcedureAddress(_CryptExportKey, advapi32, 'CryptExportKey');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CryptExportKey]
+ end;
+end;
+
+var
+ _CryptImportKey: Pointer;
+
+function CryptImportKey;
+begin
+ GetProcedureAddress(_CryptImportKey, advapi32, 'CryptImportKey');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CryptImportKey]
+ end;
+end;
+
+var
+ _CryptEncrypt: Pointer;
+
+function CryptEncrypt;
+begin
+ GetProcedureAddress(_CryptEncrypt, advapi32, 'CryptEncrypt');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CryptEncrypt]
+ end;
+end;
+
+var
+ _CryptDecrypt: Pointer;
+
+function CryptDecrypt;
+begin
+ GetProcedureAddress(_CryptDecrypt, advapi32, 'CryptDecrypt');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CryptDecrypt]
+ end;
+end;
+
+var
+ _CryptCreateHash: Pointer;
+
+function CryptCreateHash;
+begin
+ GetProcedureAddress(_CryptCreateHash, advapi32, 'CryptCreateHash');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CryptCreateHash]
+ end;
+end;
+
+var
+ _CryptHashData: Pointer;
+
+function CryptHashData;
+begin
+ GetProcedureAddress(_CryptHashData, advapi32, 'CryptHashData');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CryptHashData]
+ end;
+end;
+
+var
+ _CryptHashSessionKey: Pointer;
+
+function CryptHashSessionKey;
+begin
+ GetProcedureAddress(_CryptHashSessionKey, advapi32, 'CryptHashSessionKey');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CryptHashSessionKey]
+ end;
+end;
+
+var
+ _CryptDestroyHash: Pointer;
+
+function CryptDestroyHash;
+begin
+ GetProcedureAddress(_CryptDestroyHash, advapi32, 'CryptDestroyHash');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CryptDestroyHash]
+ end;
+end;
+
+var
+ _CryptSignHashA: Pointer;
+
+function CryptSignHashA;
+begin
+ GetProcedureAddress(_CryptSignHashA, advapi32, 'CryptSignHashA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CryptSignHashA]
+ end;
+end;
+
+var
+ _CryptSignHashW: Pointer;
+
+function CryptSignHashW;
+begin
+ GetProcedureAddress(_CryptSignHashW, advapi32, 'CryptSignHashW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CryptSignHashW]
+ end;
+end;
+
+var
+ _CryptSignHash: Pointer;
+
+function CryptSignHash;
+begin
+ GetProcedureAddress(_CryptSignHash, advapi32, 'CryptSignHash' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CryptSignHash]
+ end;
+end;
+
+var
+ _CryptVerifySignatureA: Pointer;
+
+function CryptVerifySignatureA;
+begin
+ GetProcedureAddress(_CryptVerifySignatureA, advapi32, 'CryptVerifySignatureA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CryptVerifySignatureA]
+ end;
+end;
+
+var
+ _CryptVerifySignatureW: Pointer;
+
+function CryptVerifySignatureW;
+begin
+ GetProcedureAddress(_CryptVerifySignatureW, advapi32, 'CryptVerifySignatureW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CryptVerifySignatureW]
+ end;
+end;
+
+var
+ _CryptVerifySignature: Pointer;
+
+function CryptVerifySignature;
+begin
+ GetProcedureAddress(_CryptVerifySignature, advapi32, 'CryptVerifySignature' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CryptVerifySignature]
+ end;
+end;
+
+var
+ _CryptSetProviderA: Pointer;
+
+function CryptSetProviderA;
+begin
+ GetProcedureAddress(_CryptSetProviderA, advapi32, 'CryptSetProviderA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CryptSetProviderA]
+ end;
+end;
+
+var
+ _CryptSetProviderW: Pointer;
+
+function CryptSetProviderW;
+begin
+ GetProcedureAddress(_CryptSetProviderW, advapi32, 'CryptSetProviderW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CryptSetProviderW]
+ end;
+end;
+
+var
+ _CryptSetProvider: Pointer;
+
+function CryptSetProvider;
+begin
+ GetProcedureAddress(_CryptSetProvider, advapi32, 'CryptSetProvider' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CryptSetProvider]
+ end;
+end;
+
+var
+ _CryptSetProviderExA: Pointer;
+
+function CryptSetProviderExA;
+begin
+ GetProcedureAddress(_CryptSetProviderExA, advapi32, 'CryptSetProviderExA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CryptSetProviderExA]
+ end;
+end;
+
+var
+ _CryptSetProviderExW: Pointer;
+
+function CryptSetProviderExW;
+begin
+ GetProcedureAddress(_CryptSetProviderExW, advapi32, 'CryptSetProviderExW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CryptSetProviderExW]
+ end;
+end;
+
+var
+ _CryptSetProviderEx: Pointer;
+
+function CryptSetProviderEx;
+begin
+ GetProcedureAddress(_CryptSetProviderEx, advapi32, 'CryptSetProviderEx' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CryptSetProviderEx]
+ end;
+end;
+
+var
+ _CryptGetDefaultProviderA: Pointer;
+
+function CryptGetDefaultProviderA;
+begin
+ GetProcedureAddress(_CryptGetDefaultProviderA, advapi32, 'CryptGetDefaultProviderA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CryptGetDefaultProviderA]
+ end;
+end;
+
+var
+ _CryptGetDefaultProviderW: Pointer;
+
+function CryptGetDefaultProviderW;
+begin
+ GetProcedureAddress(_CryptGetDefaultProviderW, advapi32, 'CryptGetDefaultProviderW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CryptGetDefaultProviderW]
+ end;
+end;
+
+var
+ _CryptGetDefaultProvider: Pointer;
+
+function CryptGetDefaultProvider;
+begin
+ GetProcedureAddress(_CryptGetDefaultProvider, advapi32, 'CryptGetDefaultProvider' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CryptGetDefaultProvider]
+ end;
+end;
+
+var
+ _CryptEnumProviderTypesA: Pointer;
+
+function CryptEnumProviderTypesA;
+begin
+ GetProcedureAddress(_CryptEnumProviderTypesA, advapi32, 'CryptEnumProviderTypesA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CryptEnumProviderTypesA]
+ end;
+end;
+
+var
+ _CryptEnumProviderTypesW: Pointer;
+
+function CryptEnumProviderTypesW;
+begin
+ GetProcedureAddress(_CryptEnumProviderTypesW, advapi32, 'CryptEnumProviderTypesW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CryptEnumProviderTypesW]
+ end;
+end;
+
+var
+ _CryptEnumProviderTypes: Pointer;
+
+function CryptEnumProviderTypes;
+begin
+ GetProcedureAddress(_CryptEnumProviderTypes, advapi32, 'CryptEnumProviderTypes' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CryptEnumProviderTypes]
+ end;
+end;
+
+var
+ _CryptEnumProvidersA: Pointer;
+
+function CryptEnumProvidersA;
+begin
+ GetProcedureAddress(_CryptEnumProvidersA, advapi32, 'CryptEnumProvidersA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CryptEnumProvidersA]
+ end;
+end;
+
+var
+ _CryptEnumProvidersW: Pointer;
+
+function CryptEnumProvidersW;
+begin
+ GetProcedureAddress(_CryptEnumProvidersW, advapi32, 'CryptEnumProvidersW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CryptEnumProvidersW]
+ end;
+end;
+
+var
+ _CryptEnumProviders: Pointer;
+
+function CryptEnumProviders;
+begin
+ GetProcedureAddress(_CryptEnumProviders, advapi32, 'CryptEnumProviders' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CryptEnumProviders]
+ end;
+end;
+
+var
+ _CryptContextAddRef: Pointer;
+
+function CryptContextAddRef;
+begin
+ GetProcedureAddress(_CryptContextAddRef, advapi32, 'CryptContextAddRef');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CryptContextAddRef]
+ end;
+end;
+
+var
+ _CryptDuplicateKey: Pointer;
+
+function CryptDuplicateKey;
+begin
+ GetProcedureAddress(_CryptDuplicateKey, advapi32, 'CryptDuplicateKey');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CryptDuplicateKey]
+ end;
+end;
+
+var
+ _CryptDuplicateHash: Pointer;
+
+function CryptDuplicateHash;
+begin
+ GetProcedureAddress(_CryptDuplicateHash, advapi32, 'CryptDuplicateHash');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CryptDuplicateHash]
+ end;
+end;
+
+var
+ _CryptFormatObject: Pointer;
+
+function CryptFormatObject;
+begin
+ GetProcedureAddress(_CryptFormatObject, crypt32, 'CryptFormatObject');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CryptFormatObject]
+ end;
+end;
+
+var
+ _CryptEncodeObjectEx: Pointer;
+
+function CryptEncodeObjectEx;
+begin
+ GetProcedureAddress(_CryptEncodeObjectEx, crypt32, 'CryptEncodeObjectEx');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CryptEncodeObjectEx]
+ end;
+end;
+
+var
+ _CryptEncodeObject: Pointer;
+
+function CryptEncodeObject;
+begin
+ GetProcedureAddress(_CryptEncodeObject, crypt32, 'CryptEncodeObject');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CryptEncodeObject]
+ end;
+end;
+
+var
+ _CryptDecodeObjectEx: Pointer;
+
+function CryptDecodeObjectEx;
+begin
+ GetProcedureAddress(_CryptDecodeObjectEx, crypt32, 'CryptDecodeObjectEx');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CryptDecodeObjectEx]
+ end;
+end;
+
+var
+ _CryptDecodeObject: Pointer;
+
+function CryptDecodeObject;
+begin
+ GetProcedureAddress(_CryptDecodeObject, crypt32, 'CryptDecodeObject');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CryptDecodeObject]
+ end;
+end;
+
+var
+ _CryptInstallOIDFunctionAddress: Pointer;
+
+function CryptInstallOIDFunctionAddress;
+begin
+ GetProcedureAddress(_CryptInstallOIDFunctionAddress, crypt32, 'CryptInstallOIDFunctionAddress');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CryptInstallOIDFunctionAddress]
+ end;
+end;
+
+var
+ _CryptInitOIDFunctionSet: Pointer;
+
+function CryptInitOIDFunctionSet;
+begin
+ GetProcedureAddress(_CryptInitOIDFunctionSet, crypt32, 'CryptInitOIDFunctionSet');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CryptInitOIDFunctionSet]
+ end;
+end;
+
+var
+ _CryptGetOIDFunctionAddress: Pointer;
+
+function CryptGetOIDFunctionAddress;
+begin
+ GetProcedureAddress(_CryptGetOIDFunctionAddress, crypt32, 'CryptGetOIDFunctionAddress');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CryptGetOIDFunctionAddress]
+ end;
+end;
+
+var
+ _CryptGetDefaultOIDDllList: Pointer;
+
+function CryptGetDefaultOIDDllList;
+begin
+ GetProcedureAddress(_CryptGetDefaultOIDDllList, crypt32, 'CryptGetDefaultOIDDllList');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CryptGetDefaultOIDDllList]
+ end;
+end;
+
+var
+ _CryptGetDefaultOIDFunctionAddr: Pointer;
+
+function CryptGetDefaultOIDFunctionAddress;
+begin
+ GetProcedureAddress(_CryptGetDefaultOIDFunctionAddr, crypt32, 'CryptGetDefaultOIDFunctionAddress');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CryptGetDefaultOIDFunctionAddr]
+ end;
+end;
+
+var
+ _CryptFreeOIDFunctionAddress: Pointer;
+
+function CryptFreeOIDFunctionAddress;
+begin
+ GetProcedureAddress(_CryptFreeOIDFunctionAddress, crypt32, 'CryptFreeOIDFunctionAddress');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CryptFreeOIDFunctionAddress]
+ end;
+end;
+
+var
+ _CryptRegisterOIDFunction: Pointer;
+
+function CryptRegisterOIDFunction;
+begin
+ GetProcedureAddress(_CryptRegisterOIDFunction, crypt32, 'CryptRegisterOIDFunction');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CryptRegisterOIDFunction]
+ end;
+end;
+
+var
+ _CryptUnregisterOIDFunction: Pointer;
+
+function CryptUnregisterOIDFunction;
+begin
+ GetProcedureAddress(_CryptUnregisterOIDFunction, crypt32, 'CryptUnregisterOIDFunction');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CryptUnregisterOIDFunction]
+ end;
+end;
+
+var
+ _CryptRegisterDefaultOIDFunction: Pointer;
+
+function CryptRegisterDefaultOIDFunction;
+begin
+ GetProcedureAddress(_CryptRegisterDefaultOIDFunction, crypt32, 'CryptRegisterDefaultOIDFunction');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CryptRegisterDefaultOIDFunction]
+ end;
+end;
+
+var
+ _CryptUnregisterDefaultOIDFunc: Pointer;
+
+function CryptUnregisterDefaultOIDFunction;
+begin
+ GetProcedureAddress(_CryptUnregisterDefaultOIDFunc, crypt32, 'CryptUnregisterDefaultOIDFunction');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CryptUnregisterDefaultOIDFunc]
+ end;
+end;
+
+var
+ _CryptSetOIDFunctionValue: Pointer;
+
+function CryptSetOIDFunctionValue;
+begin
+ GetProcedureAddress(_CryptSetOIDFunctionValue, crypt32, 'CryptSetOIDFunctionValue');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CryptSetOIDFunctionValue]
+ end;
+end;
+
+var
+ _CryptGetOIDFunctionValue: Pointer;
+
+function CryptGetOIDFunctionValue;
+begin
+ GetProcedureAddress(_CryptGetOIDFunctionValue, crypt32, 'CryptGetOIDFunctionValue');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CryptGetOIDFunctionValue]
+ end;
+end;
+
+var
+ _CryptEnumOIDFunction: Pointer;
+
+function CryptEnumOIDFunction;
+begin
+ GetProcedureAddress(_CryptEnumOIDFunction, crypt32, 'CryptEnumOIDFunction');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CryptEnumOIDFunction]
+ end;
+end;
+
+var
+ _CryptFindOIDInfo: Pointer;
+
+function CryptFindOIDInfo;
+begin
+ GetProcedureAddress(_CryptFindOIDInfo, crypt32, 'CryptFindOIDInfo');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CryptFindOIDInfo]
+ end;
+end;
+
+var
+ _CryptRegisterOIDInfo: Pointer;
+
+function CryptRegisterOIDInfo;
+begin
+ GetProcedureAddress(_CryptRegisterOIDInfo, crypt32, 'CryptRegisterOIDInfo');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CryptRegisterOIDInfo]
+ end;
+end;
+
+var
+ _CryptUnregisterOIDInfo: Pointer;
+
+function CryptUnregisterOIDInfo;
+begin
+ GetProcedureAddress(_CryptUnregisterOIDInfo, crypt32, 'CryptUnregisterOIDInfo');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CryptUnregisterOIDInfo]
+ end;
+end;
+
+var
+ _CryptEnumOIDInfo: Pointer;
+
+function CryptEnumOIDInfo;
+begin
+ GetProcedureAddress(_CryptEnumOIDInfo, crypt32, 'CryptEnumOIDInfo');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CryptEnumOIDInfo]
+ end;
+end;
+
+var
+ _CryptFindLocalizedName: Pointer;
+
+function CryptFindLocalizedName;
+begin
+ GetProcedureAddress(_CryptFindLocalizedName, crypt32, 'CryptFindLocalizedName');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CryptFindLocalizedName]
+ end;
+end;
+
+var
+ _CryptMsgOpenToEncode: Pointer;
+
+function CryptMsgOpenToEncode;
+begin
+ GetProcedureAddress(_CryptMsgOpenToEncode, crypt32, 'CryptMsgOpenToEncode');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CryptMsgOpenToEncode]
+ end;
+end;
+
+var
+ _CryptMsgCalculateEncodedLength: Pointer;
+
+function CryptMsgCalculateEncodedLength;
+begin
+ GetProcedureAddress(_CryptMsgCalculateEncodedLength, crypt32, 'CryptMsgCalculateEncodedLength');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CryptMsgCalculateEncodedLength]
+ end;
+end;
+
+var
+ _CryptMsgOpenToDecode: Pointer;
+
+function CryptMsgOpenToDecode;
+begin
+ GetProcedureAddress(_CryptMsgOpenToDecode, crypt32, 'CryptMsgOpenToDecode');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CryptMsgOpenToDecode]
+ end;
+end;
+
+var
+ _CryptMsgDuplicate: Pointer;
+
+function CryptMsgDuplicate;
+begin
+ GetProcedureAddress(_CryptMsgDuplicate, crypt32, 'CryptMsgDuplicate');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CryptMsgDuplicate]
+ end;
+end;
+
+var
+ _CryptMsgClose: Pointer;
+
+function CryptMsgClose;
+begin
+ GetProcedureAddress(_CryptMsgClose, crypt32, 'CryptMsgClose');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CryptMsgClose]
+ end;
+end;
+
+var
+ _CryptMsgUpdate: Pointer;
+
+function CryptMsgUpdate;
+begin
+ GetProcedureAddress(_CryptMsgUpdate, crypt32, 'CryptMsgUpdate');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CryptMsgUpdate]
+ end;
+end;
+
+var
+ _CryptMsgGetParam: Pointer;
+
+function CryptMsgGetParam;
+begin
+ GetProcedureAddress(_CryptMsgGetParam, crypt32, 'CryptMsgGetParam');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CryptMsgGetParam]
+ end;
+end;
+
+var
+ _CryptMsgControl: Pointer;
+
+function CryptMsgControl;
+begin
+ GetProcedureAddress(_CryptMsgControl, crypt32, 'CryptMsgControl');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CryptMsgControl]
+ end;
+end;
+
+var
+ _CryptMsgVerifyCountersigEnc: Pointer;
+
+function CryptMsgVerifyCountersignatureEncoded;
+begin
+ GetProcedureAddress(_CryptMsgVerifyCountersigEnc, crypt32, 'CryptMsgVerifyCountersignatureEncoded');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CryptMsgVerifyCountersigEnc]
+ end;
+end;
+
+var
+ _CryptMsgVerifyCountersigEncEx: Pointer;
+
+function CryptMsgVerifyCountersignatureEncodedEx;
+begin
+ GetProcedureAddress(_CryptMsgVerifyCountersigEncEx, crypt32, 'CryptMsgVerifyCountersignatureEncodedEx');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CryptMsgVerifyCountersigEncEx]
+ end;
+end;
+
+var
+ _CryptMsgCountersign: Pointer;
+
+function CryptMsgCountersign;
+begin
+ GetProcedureAddress(_CryptMsgCountersign, crypt32, 'CryptMsgCountersign');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CryptMsgCountersign]
+ end;
+end;
+
+var
+ _CryptMsgCountersignEncoded: Pointer;
+
+function CryptMsgCountersignEncoded;
+begin
+ GetProcedureAddress(_CryptMsgCountersignEncoded, crypt32, 'CryptMsgCountersignEncoded');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CryptMsgCountersignEncoded]
+ end;
+end;
+
+var
+ _CertOpenStore: Pointer;
+
+function CertOpenStore;
+begin
+ GetProcedureAddress(_CertOpenStore, crypt32, 'CertOpenStore');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CertOpenStore]
+ end;
+end;
+
+var
+ _CertDuplicateStore: Pointer;
+
+function CertDuplicateStore;
+begin
+ GetProcedureAddress(_CertDuplicateStore, crypt32, 'CertDuplicateStore');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CertDuplicateStore]
+ end;
+end;
+
+var
+ _CertSaveStore: Pointer;
+
+function CertSaveStore;
+begin
+ GetProcedureAddress(_CertSaveStore, crypt32, 'CertSaveStore');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CertSaveStore]
+ end;
+end;
+
+var
+ _CertCloseStore: Pointer;
+
+function CertCloseStore;
+begin
+ GetProcedureAddress(_CertCloseStore, crypt32, 'CertCloseStore');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CertCloseStore]
+ end;
+end;
+
+var
+ _CertGetSubjectCertFromStore: Pointer;
+
+function CertGetSubjectCertificateFromStore;
+begin
+ GetProcedureAddress(_CertGetSubjectCertFromStore, crypt32, 'CertGetSubjectCertificateFromStore');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CertGetSubjectCertFromStore]
+ end;
+end;
+
+var
+ _CertEnumCertificatesInStore: Pointer;
+
+function CertEnumCertificatesInStore;
+begin
+ GetProcedureAddress(_CertEnumCertificatesInStore, crypt32, 'CertEnumCertificatesInStore');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CertEnumCertificatesInStore]
+ end;
+end;
+
+var
+ _CertFindCertificateInStore: Pointer;
+
+function CertFindCertificateInStore;
+begin
+ GetProcedureAddress(_CertFindCertificateInStore, crypt32, 'CertFindCertificateInStore');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CertFindCertificateInStore]
+ end;
+end;
+
+var
+ _CertGetIssuerCertFromStore: Pointer;
+
+function CertGetIssuerCertificateFromStore;
+begin
+ GetProcedureAddress(_CertGetIssuerCertFromStore, crypt32, 'CertGetIssuerCertificateFromStore');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CertGetIssuerCertFromStore]
+ end;
+end;
+
+var
+ _CertVerifySubjectCertContext: Pointer;
+
+function CertVerifySubjectCertificateContext;
+begin
+ GetProcedureAddress(_CertVerifySubjectCertContext, crypt32, 'CertVerifySubjectCertificateContext');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CertVerifySubjectCertContext]
+ end;
+end;
+
+var
+ _CertDuplicateCertificateContext: Pointer;
+
+function CertDuplicateCertificateContext;
+begin
+ GetProcedureAddress(_CertDuplicateCertificateContext, crypt32, 'CertDuplicateCertificateContext');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CertDuplicateCertificateContext]
+ end;
+end;
+
+var
+ _CertCreateCertificateContext: Pointer;
+
+function CertCreateCertificateContext;
+begin
+ GetProcedureAddress(_CertCreateCertificateContext, crypt32, 'CertCreateCertificateContext');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CertCreateCertificateContext]
+ end;
+end;
+
+var
+ _CertFreeCertificateContext: Pointer;
+
+function CertFreeCertificateContext;
+begin
+ GetProcedureAddress(_CertFreeCertificateContext, crypt32, 'CertFreeCertificateContext');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CertFreeCertificateContext]
+ end;
+end;
+
+var
+ _CertSetCertContextProperty: Pointer;
+
+function CertSetCertificateContextProperty;
+begin
+ GetProcedureAddress(_CertSetCertContextProperty, crypt32, 'CertSetCertificateContextProperty');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CertSetCertContextProperty]
+ end;
+end;
+
+var
+ _CertGetCertContextProperty: Pointer;
+
+function CertGetCertificateContextProperty;
+begin
+ GetProcedureAddress(_CertGetCertContextProperty, crypt32, 'CertGetCertificateContextProperty');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CertGetCertContextProperty]
+ end;
+end;
+
+var
+ _CertEnumCertContextProperties: Pointer;
+
+function CertEnumCertificateContextProperties;
+begin
+ GetProcedureAddress(_CertEnumCertContextProperties, crypt32, 'CertEnumCertificateContextProperties');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CertEnumCertContextProperties]
+ end;
+end;
+
+var
+ _CertGetCRLFromStore: Pointer;
+
+function CertGetCRLFromStore;
+begin
+ GetProcedureAddress(_CertGetCRLFromStore, crypt32, 'CertGetCRLFromStore');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CertGetCRLFromStore]
+ end;
+end;
+
+var
+ _CertEnumCRLsInStore: Pointer;
+
+function CertEnumCRLsInStore;
+begin
+ GetProcedureAddress(_CertEnumCRLsInStore, crypt32, 'CertEnumCRLsInStore');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CertEnumCRLsInStore]
+ end;
+end;
+
+var
+ _CertFindCRLInStore: Pointer;
+
+function CertFindCRLInStore;
+begin
+ GetProcedureAddress(_CertFindCRLInStore, crypt32, 'CertFindCRLInStore');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CertFindCRLInStore]
+ end;
+end;
+
+var
+ _CertDuplicateCRLContext: Pointer;
+
+function CertDuplicateCRLContext;
+begin
+ GetProcedureAddress(_CertDuplicateCRLContext, crypt32, 'CertDuplicateCRLContext');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CertDuplicateCRLContext]
+ end;
+end;
+
+var
+ _CertCreateCRLContext: Pointer;
+
+function CertCreateCRLContext;
+begin
+ GetProcedureAddress(_CertCreateCRLContext, crypt32, 'CertCreateCRLContext');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CertCreateCRLContext]
+ end;
+end;
+
+var
+ _CertFreeCRLContext: Pointer;
+
+function CertFreeCRLContext;
+begin
+ GetProcedureAddress(_CertFreeCRLContext, crypt32, 'CertFreeCRLContext');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CertFreeCRLContext]
+ end;
+end;
+
+var
+ _CertSetCRLContextProperty: Pointer;
+
+function CertSetCRLContextProperty;
+begin
+ GetProcedureAddress(_CertSetCRLContextProperty, crypt32, 'CertSetCRLContextProperty');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CertSetCRLContextProperty]
+ end;
+end;
+
+var
+ _CertGetCRLContextProperty: Pointer;
+
+function CertGetCRLContextProperty;
+begin
+ GetProcedureAddress(_CertGetCRLContextProperty, crypt32, 'CertGetCRLContextProperty');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CertGetCRLContextProperty]
+ end;
+end;
+
+var
+ _CertEnumCRLContextProperties: Pointer;
+
+function CertEnumCRLContextProperties;
+begin
+ GetProcedureAddress(_CertEnumCRLContextProperties, crypt32, 'CertEnumCRLContextProperties');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CertEnumCRLContextProperties]
+ end;
+end;
+
+var
+ _CertFindCertificateInCRL: Pointer;
+
+function CertFindCertificateInCRL;
+begin
+ GetProcedureAddress(_CertFindCertificateInCRL, crypt32, 'CertFindCertificateInCRL');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CertFindCertificateInCRL]
+ end;
+end;
+
+var
+ _CertAddEncodedCertToStore: Pointer;
+
+function CertAddEncodedCertificateToStore;
+begin
+ GetProcedureAddress(_CertAddEncodedCertToStore, crypt32, 'CertAddEncodedCertificateToStore');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CertAddEncodedCertToStore]
+ end;
+end;
+
+var
+ _CertAddCertContextToStore: Pointer;
+
+function CertAddCertificateContextToStore;
+begin
+ GetProcedureAddress(_CertAddCertContextToStore, crypt32, 'CertAddCertificateContextToStore');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CertAddCertContextToStore]
+ end;
+end;
+
+var
+ _CertAddSerializedElementToStore: Pointer;
+
+function CertAddSerializedElementToStore;
+begin
+ GetProcedureAddress(_CertAddSerializedElementToStore, crypt32, 'CertAddSerializedElementToStore');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CertAddSerializedElementToStore]
+ end;
+end;
+
+var
+ _CertDeleteCertificateFromStore: Pointer;
+
+function CertDeleteCertificateFromStore;
+begin
+ GetProcedureAddress(_CertDeleteCertificateFromStore, crypt32, 'CertDeleteCertificateFromStore');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CertDeleteCertificateFromStore]
+ end;
+end;
+
+var
+ _CertAddEncodedCRLToStore: Pointer;
+
+function CertAddEncodedCRLToStore;
+begin
+ GetProcedureAddress(_CertAddEncodedCRLToStore, crypt32, 'CertAddEncodedCRLToStore');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CertAddEncodedCRLToStore]
+ end;
+end;
+
+var
+ _CertAddCRLContextToStore: Pointer;
+
+function CertAddCRLContextToStore;
+begin
+ GetProcedureAddress(_CertAddCRLContextToStore, crypt32, 'CertAddCRLContextToStore');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CertAddCRLContextToStore]
+ end;
+end;
+
+var
+ _CertDeleteCRLFromStore: Pointer;
+
+function CertDeleteCRLFromStore;
+begin
+ GetProcedureAddress(_CertDeleteCRLFromStore, crypt32, 'CertDeleteCRLFromStore');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CertDeleteCRLFromStore]
+ end;
+end;
+
+var
+ _CertSerializeCertStoreElement: Pointer;
+
+function CertSerializeCertificateStoreElement;
+begin
+ GetProcedureAddress(_CertSerializeCertStoreElement, crypt32, 'CertSerializeCertificateStoreElement');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CertSerializeCertStoreElement]
+ end;
+end;
+
+var
+ _CertSerializeCRLStoreElement: Pointer;
+
+function CertSerializeCRLStoreElement;
+begin
+ GetProcedureAddress(_CertSerializeCRLStoreElement, crypt32, 'CertSerializeCRLStoreElement');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CertSerializeCRLStoreElement]
+ end;
+end;
+
+var
+ _CertDuplicateCTLContext: Pointer;
+
+function CertDuplicateCTLContext;
+begin
+ GetProcedureAddress(_CertDuplicateCTLContext, crypt32, 'CertDuplicateCTLContext');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CertDuplicateCTLContext]
+ end;
+end;
+
+var
+ _CertCreateCTLContext: Pointer;
+
+function CertCreateCTLContext;
+begin
+ GetProcedureAddress(_CertCreateCTLContext, crypt32, 'CertCreateCTLContext');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CertCreateCTLContext]
+ end;
+end;
+
+var
+ _CertFreeCTLContext: Pointer;
+
+function CertFreeCTLContext;
+begin
+ GetProcedureAddress(_CertFreeCTLContext, crypt32, 'CertFreeCTLContext');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CertFreeCTLContext]
+ end;
+end;
+
+var
+ _CertSetCTLContextProperty: Pointer;
+
+function CertSetCTLContextProperty;
+begin
+ GetProcedureAddress(_CertSetCTLContextProperty, crypt32, 'CertSetCTLContextProperty');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CertSetCTLContextProperty]
+ end;
+end;
+
+var
+ _CertGetCTLContextProperty: Pointer;
+
+function CertGetCTLContextProperty;
+begin
+ GetProcedureAddress(_CertGetCTLContextProperty, crypt32, 'CertGetCTLContextProperty');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CertGetCTLContextProperty]
+ end;
+end;
+
+var
+ _CertEnumCTLContextProperties: Pointer;
+
+function CertEnumCTLContextProperties;
+begin
+ GetProcedureAddress(_CertEnumCTLContextProperties, crypt32, 'CertEnumCTLContextProperties');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CertEnumCTLContextProperties]
+ end;
+end;
+
+var
+ _CertEnumCTLsInStore: Pointer;
+
+function CertEnumCTLsInStore;
+begin
+ GetProcedureAddress(_CertEnumCTLsInStore, crypt32, 'CertEnumCTLsInStore');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CertEnumCTLsInStore]
+ end;
+end;
+
+var
+ _CertFindSubjectInCTL: Pointer;
+
+function CertFindSubjectInCTL;
+begin
+ GetProcedureAddress(_CertFindSubjectInCTL, crypt32, 'CertFindSubjectInCTL');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CertFindSubjectInCTL]
+ end;
+end;
+
+var
+ _CertFindCTLInStore: Pointer;
+
+function CertFindCTLInStore;
+begin
+ GetProcedureAddress(_CertFindCTLInStore, crypt32, 'CertFindCTLInStore');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CertFindCTLInStore]
+ end;
+end;
+
+var
+ _CertAddEncodedCTLToStore: Pointer;
+
+function CertAddEncodedCTLToStore;
+begin
+ GetProcedureAddress(_CertAddEncodedCTLToStore, crypt32, 'CertAddEncodedCTLToStore');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CertAddEncodedCTLToStore]
+ end;
+end;
+
+var
+ _CertAddCTLContextToStore: Pointer;
+
+function CertAddCTLContextToStore;
+begin
+ GetProcedureAddress(_CertAddCTLContextToStore, crypt32, 'CertAddCTLContextToStore');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CertAddCTLContextToStore]
+ end;
+end;
+
+var
+ _CertSerializeCTLStoreElement: Pointer;
+
+function CertSerializeCTLStoreElement;
+begin
+ GetProcedureAddress(_CertSerializeCTLStoreElement, crypt32, 'CertSerializeCTLStoreElement');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CertSerializeCTLStoreElement]
+ end;
+end;
+
+var
+ _CertDeleteCTLFromStore: Pointer;
+
+function CertDeleteCTLFromStore;
+begin
+ GetProcedureAddress(_CertDeleteCTLFromStore, crypt32, 'CertDeleteCTLFromStore');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CertDeleteCTLFromStore]
+ end;
+end;
+
+var
+ _CertAddCertificateLinkToStore: Pointer;
+
+function CertAddCertificateLinkToStore;
+begin
+ GetProcedureAddress(_CertAddCertificateLinkToStore, crypt32, 'CertAddCertificateLinkToStore');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CertAddCertificateLinkToStore]
+ end;
+end;
+
+var
+ _CertAddCRLLinkToStore: Pointer;
+
+function CertAddCRLLinkToStore;
+begin
+ GetProcedureAddress(_CertAddCRLLinkToStore, crypt32, 'CertAddCRLLinkToStore');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CertAddCRLLinkToStore]
+ end;
+end;
+
+var
+ _CertAddCTLLinkToStore: Pointer;
+
+function CertAddCTLLinkToStore;
+begin
+ GetProcedureAddress(_CertAddCTLLinkToStore, crypt32, 'CertAddCTLLinkToStore');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CertAddCTLLinkToStore]
+ end;
+end;
+
+var
+ _CertAddStoreToCollection: Pointer;
+
+function CertAddStoreToCollection;
+begin
+ GetProcedureAddress(_CertAddStoreToCollection, crypt32, 'CertAddStoreToCollection');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CertAddStoreToCollection]
+ end;
+end;
+
+var
+ _CertRemoveStoreFromCollection: Pointer;
+
+procedure CertRemoveStoreFromCollection;
+begin
+ GetProcedureAddress(_CertRemoveStoreFromCollection, crypt32, 'CertRemoveStoreFromCollection');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CertRemoveStoreFromCollection]
+ end;
+end;
+
+var
+ _CertControlStore: Pointer;
+
+function CertControlStore;
+begin
+ GetProcedureAddress(_CertControlStore, crypt32, 'CertControlStore');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CertControlStore]
+ end;
+end;
+
+var
+ _CertSetStoreProperty: Pointer;
+
+function CertSetStoreProperty;
+begin
+ GetProcedureAddress(_CertSetStoreProperty, crypt32, 'CertSetStoreProperty');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CertSetStoreProperty]
+ end;
+end;
+
+var
+ _CertGetStoreProperty: Pointer;
+
+function CertGetStoreProperty;
+begin
+ GetProcedureAddress(_CertGetStoreProperty, crypt32, 'CertGetStoreProperty');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CertGetStoreProperty]
+ end;
+end;
+
+var
+ _CertCreateContext: Pointer;
+
+function CertCreateContext;
+begin
+ GetProcedureAddress(_CertCreateContext, crypt32, 'CertCreateContext');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CertCreateContext]
+ end;
+end;
+
+var
+ _CertRegisterSystemStore: Pointer;
+
+function CertRegisterSystemStore;
+begin
+ GetProcedureAddress(_CertRegisterSystemStore, crypt32, 'CertRegisterSystemStore');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CertRegisterSystemStore]
+ end;
+end;
+
+var
+ _CertRegisterPhysicalStore: Pointer;
+
+function CertRegisterPhysicalStore;
+begin
+ GetProcedureAddress(_CertRegisterPhysicalStore, crypt32, 'CertRegisterPhysicalStore');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CertRegisterPhysicalStore]
+ end;
+end;
+
+var
+ _CertUnregisterSystemStore: Pointer;
+
+function CertUnregisterSystemStore;
+begin
+ GetProcedureAddress(_CertUnregisterSystemStore, crypt32, 'CertUnregisterSystemStore');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CertUnregisterSystemStore]
+ end;
+end;
+
+var
+ _CertUnregisterPhysicalStore: Pointer;
+
+function CertUnregisterPhysicalStore;
+begin
+ GetProcedureAddress(_CertUnregisterPhysicalStore, crypt32, 'CertUnregisterPhysicalStore');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CertUnregisterPhysicalStore]
+ end;
+end;
+
+var
+ _CertEnumSystemStoreLocation: Pointer;
+
+function CertEnumSystemStoreLocation;
+begin
+ GetProcedureAddress(_CertEnumSystemStoreLocation, crypt32, 'CertEnumSystemStoreLocation');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CertEnumSystemStoreLocation]
+ end;
+end;
+
+var
+ _CertEnumSystemStore: Pointer;
+
+function CertEnumSystemStore;
+begin
+ GetProcedureAddress(_CertEnumSystemStore, crypt32, 'CertEnumSystemStore');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CertEnumSystemStore]
+ end;
+end;
+
+var
+ _CertEnumPhysicalStore: Pointer;
+
+function CertEnumPhysicalStore;
+begin
+ GetProcedureAddress(_CertEnumPhysicalStore, crypt32, 'CertEnumPhysicalStore');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CertEnumPhysicalStore]
+ end;
+end;
+
+var
+ _CertGetEnhancedKeyUsage: Pointer;
+
+function CertGetEnhancedKeyUsage;
+begin
+ GetProcedureAddress(_CertGetEnhancedKeyUsage, crypt32, 'CertGetEnhancedKeyUsage');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CertGetEnhancedKeyUsage]
+ end;
+end;
+
+var
+ _CertSetEnhancedKeyUsage: Pointer;
+
+function CertSetEnhancedKeyUsage;
+begin
+ GetProcedureAddress(_CertSetEnhancedKeyUsage, crypt32, 'CertSetEnhancedKeyUsage');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CertSetEnhancedKeyUsage]
+ end;
+end;
+
+var
+ _CertAddEnhKeyUsageIdentifier: Pointer;
+
+function CertAddEnhancedKeyUsageIdentifier;
+begin
+ GetProcedureAddress(_CertAddEnhKeyUsageIdentifier, crypt32, 'CertAddEnhancedKeyUsageIdentifier');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CertAddEnhKeyUsageIdentifier]
+ end;
+end;
+
+var
+ _CertRemoveEnhKeyUsageIdent: Pointer;
+
+function CertRemoveEnhancedKeyUsageIdentifier;
+begin
+ GetProcedureAddress(_CertRemoveEnhKeyUsageIdent, crypt32, 'CertRemoveEnhancedKeyUsageIdentifier');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CertRemoveEnhKeyUsageIdent]
+ end;
+end;
+
+var
+ _CertGetValidUsages: Pointer;
+
+function CertGetValidUsages;
+begin
+ GetProcedureAddress(_CertGetValidUsages, crypt32, 'CertGetValidUsages');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CertGetValidUsages]
+ end;
+end;
+
+var
+ _CryptMsgGetAndVerifySigner: Pointer;
+
+function CryptMsgGetAndVerifySigner;
+begin
+ GetProcedureAddress(_CryptMsgGetAndVerifySigner, crypt32, 'CryptMsgGetAndVerifySigner');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CryptMsgGetAndVerifySigner]
+ end;
+end;
+
+var
+ _CryptMsgSignCTL: Pointer;
+
+function CryptMsgSignCTL;
+begin
+ GetProcedureAddress(_CryptMsgSignCTL, crypt32, 'CryptMsgSignCTL');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CryptMsgSignCTL]
+ end;
+end;
+
+var
+ _CryptMsgEncodeAndSignCTL: Pointer;
+
+function CryptMsgEncodeAndSignCTL;
+begin
+ GetProcedureAddress(_CryptMsgEncodeAndSignCTL, crypt32, 'CryptMsgEncodeAndSignCTL');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CryptMsgEncodeAndSignCTL]
+ end;
+end;
+
+var
+ _CertFindSubjectInSortedCTL: Pointer;
+
+function CertFindSubjectInSortedCTL;
+begin
+ GetProcedureAddress(_CertFindSubjectInSortedCTL, crypt32, 'CertFindSubjectInSortedCTL');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CertFindSubjectInSortedCTL]
+ end;
+end;
+
+var
+ _CertEnumSubjectInSortedCTL: Pointer;
+
+function CertEnumSubjectInSortedCTL;
+begin
+ GetProcedureAddress(_CertEnumSubjectInSortedCTL, crypt32, 'CertEnumSubjectInSortedCTL');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CertEnumSubjectInSortedCTL]
+ end;
+end;
+
+var
+ _CertVerifyCTLUsage: Pointer;
+
+function CertVerifyCTLUsage;
+begin
+ GetProcedureAddress(_CertVerifyCTLUsage, crypt32, 'CertVerifyCTLUsage');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CertVerifyCTLUsage]
+ end;
+end;
+
+var
+ _CertVerifyRevocation: Pointer;
+
+function CertVerifyRevocation;
+begin
+ GetProcedureAddress(_CertVerifyRevocation, crypt32, 'CertVerifyRevocation');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CertVerifyRevocation]
+ end;
+end;
+
+var
+ _CertCompareIntegerBlob: Pointer;
+
+function CertCompareIntegerBlob;
+begin
+ GetProcedureAddress(_CertCompareIntegerBlob, crypt32, 'CertCompareIntegerBlob');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CertCompareIntegerBlob]
+ end;
+end;
+
+var
+ _CertCompareCertificate: Pointer;
+
+function CertCompareCertificate;
+begin
+ GetProcedureAddress(_CertCompareCertificate, crypt32, 'CertCompareCertificate');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CertCompareCertificate]
+ end;
+end;
+
+var
+ _CertCompareCertificateName: Pointer;
+
+function CertCompareCertificateName;
+begin
+ GetProcedureAddress(_CertCompareCertificateName, crypt32, 'CertCompareCertificateName');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CertCompareCertificateName]
+ end;
+end;
+
+var
+ _CertIsRDNAttrsInCertificateName: Pointer;
+
+function CertIsRDNAttrsInCertificateName;
+begin
+ GetProcedureAddress(_CertIsRDNAttrsInCertificateName, crypt32, 'CertIsRDNAttrsInCertificateName');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CertIsRDNAttrsInCertificateName]
+ end;
+end;
+
+var
+ _CertComparePublicKeyInfo: Pointer;
+
+function CertComparePublicKeyInfo;
+begin
+ GetProcedureAddress(_CertComparePublicKeyInfo, crypt32, 'CertComparePublicKeyInfo');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CertComparePublicKeyInfo]
+ end;
+end;
+
+var
+ _CertGetPublicKeyLength: Pointer;
+
+function CertGetPublicKeyLength;
+begin
+ GetProcedureAddress(_CertGetPublicKeyLength, crypt32, 'CertGetPublicKeyLength');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CertGetPublicKeyLength]
+ end;
+end;
+
+var
+ _CryptVerifyCertificateSignature: Pointer;
+
+function CryptVerifyCertificateSignature;
+begin
+ GetProcedureAddress(_CryptVerifyCertificateSignature, crypt32, 'CryptVerifyCertificateSignature');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CryptVerifyCertificateSignature]
+ end;
+end;
+
+var
+ _CryptVerifyCertSignatureEx: Pointer;
+
+function CryptVerifyCertificateSignatureEx;
+begin
+ GetProcedureAddress(_CryptVerifyCertSignatureEx, crypt32, 'CryptVerifyCertificateSignatureEx');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CryptVerifyCertSignatureEx]
+ end;
+end;
+
+var
+ _CryptHashToBeSigned: Pointer;
+
+function CryptHashToBeSigned;
+begin
+ GetProcedureAddress(_CryptHashToBeSigned, crypt32, 'CryptHashToBeSigned');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CryptHashToBeSigned]
+ end;
+end;
+
+var
+ _CryptHashCertificate: Pointer;
+
+function CryptHashCertificate;
+begin
+ GetProcedureAddress(_CryptHashCertificate, crypt32, 'CryptHashCertificate');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CryptHashCertificate]
+ end;
+end;
+
+var
+ _CryptSignCertificate: Pointer;
+
+function CryptSignCertificate;
+begin
+ GetProcedureAddress(_CryptSignCertificate, crypt32, 'CryptSignCertificate');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CryptSignCertificate]
+ end;
+end;
+
+var
+ _CryptSignAndEncodeCertificate: Pointer;
+
+function CryptSignAndEncodeCertificate;
+begin
+ GetProcedureAddress(_CryptSignAndEncodeCertificate, crypt32, 'CryptSignAndEncodeCertificate');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CryptSignAndEncodeCertificate]
+ end;
+end;
+
+var
+ _CertVerifyTimeValidity: Pointer;
+
+function CertVerifyTimeValidity;
+begin
+ GetProcedureAddress(_CertVerifyTimeValidity, crypt32, 'CertVerifyTimeValidity');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CertVerifyTimeValidity]
+ end;
+end;
+
+var
+ _CertVerifyCRLTimeValidity: Pointer;
+
+function CertVerifyCRLTimeValidity;
+begin
+ GetProcedureAddress(_CertVerifyCRLTimeValidity, crypt32, 'CertVerifyCRLTimeValidity');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CertVerifyCRLTimeValidity]
+ end;
+end;
+
+var
+ _CertVerifyValidityNesting: Pointer;
+
+function CertVerifyValidityNesting;
+begin
+ GetProcedureAddress(_CertVerifyValidityNesting, crypt32, 'CertVerifyValidityNesting');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CertVerifyValidityNesting]
+ end;
+end;
+
+var
+ _CertVerifyCRLRevocation: Pointer;
+
+function CertVerifyCRLRevocation;
+begin
+ GetProcedureAddress(_CertVerifyCRLRevocation, crypt32, 'CertVerifyCRLRevocation');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CertVerifyCRLRevocation]
+ end;
+end;
+
+var
+ _CertAlgIdToOID: Pointer;
+
+function CertAlgIdToOID;
+begin
+ GetProcedureAddress(_CertAlgIdToOID, crypt32, 'CertAlgIdToOID');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CertAlgIdToOID]
+ end;
+end;
+
+var
+ _CertOIDToAlgId: Pointer;
+
+function CertOIDToAlgId;
+begin
+ GetProcedureAddress(_CertOIDToAlgId, crypt32, 'CertOIDToAlgId');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CertOIDToAlgId]
+ end;
+end;
+
+var
+ _CertFindExtension: Pointer;
+
+function CertFindExtension;
+begin
+ GetProcedureAddress(_CertFindExtension, crypt32, 'CertFindExtension');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CertFindExtension]
+ end;
+end;
+
+var
+ _CertFindAttribute: Pointer;
+
+function CertFindAttribute;
+begin
+ GetProcedureAddress(_CertFindAttribute, crypt32, 'CertFindAttribute');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CertFindAttribute]
+ end;
+end;
+
+var
+ _CertFindRDNAttr: Pointer;
+
+function CertFindRDNAttr;
+begin
+ GetProcedureAddress(_CertFindRDNAttr, crypt32, 'CertFindRDNAttr');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CertFindRDNAttr]
+ end;
+end;
+
+var
+ _CertGetIntendedKeyUsage: Pointer;
+
+function CertGetIntendedKeyUsage;
+begin
+ GetProcedureAddress(_CertGetIntendedKeyUsage, crypt32, 'CertGetIntendedKeyUsage');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CertGetIntendedKeyUsage]
+ end;
+end;
+
+var
+ _CryptInstallDefaultContext: Pointer;
+
+function CryptInstallDefaultContext;
+begin
+ GetProcedureAddress(_CryptInstallDefaultContext, crypt32, 'CryptInstallDefaultContext');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CryptInstallDefaultContext]
+ end;
+end;
+
+var
+ _CryptUninstallDefaultContext: Pointer;
+
+function CryptUninstallDefaultContext;
+begin
+ GetProcedureAddress(_CryptUninstallDefaultContext, crypt32, 'CryptUninstallDefaultContext');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CryptUninstallDefaultContext]
+ end;
+end;
+
+var
+ _CryptExportPublicKeyInfo: Pointer;
+
+function CryptExportPublicKeyInfo;
+begin
+ GetProcedureAddress(_CryptExportPublicKeyInfo, crypt32, 'CryptExportPublicKeyInfo');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CryptExportPublicKeyInfo]
+ end;
+end;
+
+var
+ _CryptExportPublicKeyInfoEx: Pointer;
+
+function CryptExportPublicKeyInfoEx;
+begin
+ GetProcedureAddress(_CryptExportPublicKeyInfoEx, crypt32, 'CryptExportPublicKeyInfoEx');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CryptExportPublicKeyInfoEx]
+ end;
+end;
+
+var
+ _CryptImportPublicKeyInfo: Pointer;
+
+function CryptImportPublicKeyInfo;
+begin
+ GetProcedureAddress(_CryptImportPublicKeyInfo, crypt32, 'CryptImportPublicKeyInfo');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CryptImportPublicKeyInfo]
+ end;
+end;
+
+var
+ _CryptImportPublicKeyInfoEx: Pointer;
+
+function CryptImportPublicKeyInfoEx;
+begin
+ GetProcedureAddress(_CryptImportPublicKeyInfoEx, crypt32, 'CryptImportPublicKeyInfoEx');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CryptImportPublicKeyInfoEx]
+ end;
+end;
+
+var
+ _CryptAcquireCertPrivateKey: Pointer;
+
+function CryptAcquireCertificatePrivateKey;
+begin
+ GetProcedureAddress(_CryptAcquireCertPrivateKey, crypt32, 'CryptAcquireCertificatePrivateKey');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CryptAcquireCertPrivateKey]
+ end;
+end;
+
+var
+ _CryptFindCertificateKeyProvInfo: Pointer;
+
+function CryptFindCertificateKeyProvInfo;
+begin
+ GetProcedureAddress(_CryptFindCertificateKeyProvInfo, crypt32, 'CryptFindCertificateKeyProvInfo');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CryptFindCertificateKeyProvInfo]
+ end;
+end;
+
+var
+ _CryptImportPKCS8: Pointer;
+
+function CryptImportPKCS8;
+begin
+ GetProcedureAddress(_CryptImportPKCS8, crypt32, 'CryptImportPKCS8');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CryptImportPKCS8]
+ end;
+end;
+
+var
+ _CryptExportPKCS8: Pointer;
+
+function CryptExportPKCS8;
+begin
+ GetProcedureAddress(_CryptExportPKCS8, crypt32, 'CryptExportPKCS8');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CryptExportPKCS8]
+ end;
+end;
+
+var
+ _CryptExportPKCS8Ex: Pointer;
+
+function CryptExportPKCS8Ex;
+begin
+ GetProcedureAddress(_CryptExportPKCS8Ex, crypt32, 'CryptExportPKCS8Ex');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CryptExportPKCS8Ex]
+ end;
+end;
+
+var
+ _CryptHashPublicKeyInfo: Pointer;
+
+function CryptHashPublicKeyInfo;
+begin
+ GetProcedureAddress(_CryptHashPublicKeyInfo, crypt32, 'CryptHashPublicKeyInfo');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CryptHashPublicKeyInfo]
+ end;
+end;
+
+var
+ _CertRDNValueToStrA: Pointer;
+
+function CertRDNValueToStrA;
+begin
+ GetProcedureAddress(_CertRDNValueToStrA, crypt32, 'CertRDNValueToStrA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CertRDNValueToStrA]
+ end;
+end;
+
+var
+ _CertRDNValueToStrW: Pointer;
+
+function CertRDNValueToStrW;
+begin
+ GetProcedureAddress(_CertRDNValueToStrW, crypt32, 'CertRDNValueToStrW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CertRDNValueToStrW]
+ end;
+end;
+
+var
+ _CertRDNValueToStr: Pointer;
+
+function CertRDNValueToStr;
+begin
+ GetProcedureAddress(_CertRDNValueToStr, crypt32, 'CertRDNValueToStr' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CertRDNValueToStr]
+ end;
+end;
+
+var
+ _CertNameToStrA: Pointer;
+
+function CertNameToStrA;
+begin
+ GetProcedureAddress(_CertNameToStrA, crypt32, 'CertNameToStrA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CertNameToStrA]
+ end;
+end;
+
+var
+ _CertNameToStrW: Pointer;
+
+function CertNameToStrW;
+begin
+ GetProcedureAddress(_CertNameToStrW, crypt32, 'CertNameToStrW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CertNameToStrW]
+ end;
+end;
+
+var
+ _CertNameToStr: Pointer;
+
+function CertNameToStr;
+begin
+ GetProcedureAddress(_CertNameToStr, crypt32, 'CertNameToStr' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CertNameToStr]
+ end;
+end;
+
+var
+ _CertStrToNameA: Pointer;
+
+function CertStrToNameA;
+begin
+ GetProcedureAddress(_CertStrToNameA, crypt32, 'CertStrToNameA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CertStrToNameA]
+ end;
+end;
+
+var
+ _CertStrToNameW: Pointer;
+
+function CertStrToNameW;
+begin
+ GetProcedureAddress(_CertStrToNameW, crypt32, 'CertStrToNameW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CertStrToNameW]
+ end;
+end;
+
+var
+ _CertStrToName: Pointer;
+
+function CertStrToName;
+begin
+ GetProcedureAddress(_CertStrToName, crypt32, 'CertStrToName' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CertStrToName]
+ end;
+end;
+
+var
+ _CertGetNameStringA: Pointer;
+
+function CertGetNameStringA;
+begin
+ GetProcedureAddress(_CertGetNameStringA, crypt32, 'CertGetNameStringA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CertGetNameStringA]
+ end;
+end;
+
+var
+ _CertGetNameStringW: Pointer;
+
+function CertGetNameStringW;
+begin
+ GetProcedureAddress(_CertGetNameStringW, crypt32, 'CertGetNameStringW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CertGetNameStringW]
+ end;
+end;
+
+var
+ _CertGetNameString: Pointer;
+
+function CertGetNameString;
+begin
+ GetProcedureAddress(_CertGetNameString, crypt32, 'CertGetNameString' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CertGetNameString]
+ end;
+end;
+
+var
+ _CryptSignMessage: Pointer;
+
+function CryptSignMessage;
+begin
+ GetProcedureAddress(_CryptSignMessage, crypt32, 'CryptSignMessage');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CryptSignMessage]
+ end;
+end;
+
+var
+ _CryptVerifyMessageSignature: Pointer;
+
+function CryptVerifyMessageSignature;
+begin
+ GetProcedureAddress(_CryptVerifyMessageSignature, crypt32, 'CryptVerifyMessageSignature');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CryptVerifyMessageSignature]
+ end;
+end;
+
+var
+ _CryptGetMessageSignerCount: Pointer;
+
+function CryptGetMessageSignerCount;
+begin
+ GetProcedureAddress(_CryptGetMessageSignerCount, crypt32, 'CryptGetMessageSignerCount');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CryptGetMessageSignerCount]
+ end;
+end;
+
+var
+ _CryptGetMessageCertificates: Pointer;
+
+function CryptGetMessageCertificates;
+begin
+ GetProcedureAddress(_CryptGetMessageCertificates, crypt32, 'CryptGetMessageCertificates');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CryptGetMessageCertificates]
+ end;
+end;
+
+var
+ _CryptVerDetachedMsgSignature: Pointer;
+
+function CryptVerifyDetachedMessageSignature;
+begin
+ GetProcedureAddress(_CryptVerDetachedMsgSignature, crypt32, 'CryptVerifyDetachedMessageSignature');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CryptVerDetachedMsgSignature]
+ end;
+end;
+
+var
+ _CryptEncryptMessage: Pointer;
+
+function CryptEncryptMessage;
+begin
+ GetProcedureAddress(_CryptEncryptMessage, crypt32, 'CryptEncryptMessage');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CryptEncryptMessage]
+ end;
+end;
+
+var
+ _CryptDecryptMessage: Pointer;
+
+function CryptDecryptMessage;
+begin
+ GetProcedureAddress(_CryptDecryptMessage, crypt32, 'CryptDecryptMessage');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CryptDecryptMessage]
+ end;
+end;
+
+var
+ _CryptSignAndEncryptMessage: Pointer;
+
+function CryptSignAndEncryptMessage;
+begin
+ GetProcedureAddress(_CryptSignAndEncryptMessage, crypt32, 'CryptSignAndEncryptMessage');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CryptSignAndEncryptMessage]
+ end;
+end;
+
+var
+ _CryptDecryptAndVerMsgSig: Pointer;
+
+function CryptDecryptAndVerifyMessageSignature;
+begin
+ GetProcedureAddress(_CryptDecryptAndVerMsgSig, crypt32, 'CryptDecryptAndVerifyMessageSignature');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CryptDecryptAndVerMsgSig]
+ end;
+end;
+
+var
+ _CryptDecodeMessage: Pointer;
+
+function CryptDecodeMessage;
+begin
+ GetProcedureAddress(_CryptDecodeMessage, crypt32, 'CryptDecodeMessage');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CryptDecodeMessage]
+ end;
+end;
+
+var
+ _CryptHashMessage: Pointer;
+
+function CryptHashMessage;
+begin
+ GetProcedureAddress(_CryptHashMessage, crypt32, 'CryptHashMessage');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CryptHashMessage]
+ end;
+end;
+
+var
+ _CryptVerifyMessageHash: Pointer;
+
+function CryptVerifyMessageHash;
+begin
+ GetProcedureAddress(_CryptVerifyMessageHash, crypt32, 'CryptVerifyMessageHash');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CryptVerifyMessageHash]
+ end;
+end;
+
+var
+ _CryptVerifyDetachedMessageHash: Pointer;
+
+function CryptVerifyDetachedMessageHash;
+begin
+ GetProcedureAddress(_CryptVerifyDetachedMessageHash, crypt32, 'CryptVerifyDetachedMessageHash');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CryptVerifyDetachedMessageHash]
+ end;
+end;
+
+var
+ _CryptSignMessageWithKey: Pointer;
+
+function CryptSignMessageWithKey;
+begin
+ GetProcedureAddress(_CryptSignMessageWithKey, crypt32, 'CryptSignMessageWithKey');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CryptSignMessageWithKey]
+ end;
+end;
+
+var
+ _CryptVerifyMsgSigWithKey: Pointer;
+
+function CryptVerifyMessageSignatureWithKey;
+begin
+ GetProcedureAddress(_CryptVerifyMsgSigWithKey, crypt32, 'CryptVerifyMessageSignatureWithKey');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CryptVerifyMsgSigWithKey]
+ end;
+end;
+
+var
+ _CertOpenSystemStoreA: Pointer;
+
+function CertOpenSystemStoreA;
+begin
+ GetProcedureAddress(_CertOpenSystemStoreA, crypt32, 'CertOpenSystemStoreA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CertOpenSystemStoreA]
+ end;
+end;
+
+var
+ _CertOpenSystemStoreW: Pointer;
+
+function CertOpenSystemStoreW;
+begin
+ GetProcedureAddress(_CertOpenSystemStoreW, crypt32, 'CertOpenSystemStoreW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CertOpenSystemStoreW]
+ end;
+end;
+
+var
+ _CertOpenSystemStore: Pointer;
+
+function CertOpenSystemStore;
+begin
+ GetProcedureAddress(_CertOpenSystemStore, crypt32, 'CertOpenSystemStore' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CertOpenSystemStore]
+ end;
+end;
+
+var
+ _CertAddEncodedCertToSysStoreA: Pointer;
+
+function CertAddEncodedCertificateToSystemStoreA;
+begin
+ GetProcedureAddress(_CertAddEncodedCertToSysStoreA, crypt32, 'CertAddEncodedCertificateToSystemStoreA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CertAddEncodedCertToSysStoreA]
+ end;
+end;
+
+var
+ _CertAddEncodedCertToSysStoreW: Pointer;
+
+function CertAddEncodedCertificateToSystemStoreW;
+begin
+ GetProcedureAddress(_CertAddEncodedCertToSysStoreW, crypt32, 'CertAddEncodedCertificateToSystemStoreW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CertAddEncodedCertToSysStoreW]
+ end;
+end;
+
+var
+ _CertAddEncodedCertToSysStore: Pointer;
+
+function CertAddEncodedCertificateToSystemStore;
+begin
+ GetProcedureAddress(_CertAddEncodedCertToSysStore, crypt32, 'CertAddEncodedCertificateToSystemStore' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CertAddEncodedCertToSysStore]
+ end;
+end;
+
+var
+ _FindCertsByIssuer: Pointer;
+
+function FindCertsByIssuer;
+begin
+ GetProcedureAddress(_FindCertsByIssuer, softpub, 'FindCertsByIssuer');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_FindCertsByIssuer]
+ end;
+end;
+
+var
+ _CryptQueryObject: Pointer;
+
+function CryptQueryObject;
+begin
+ GetProcedureAddress(_CryptQueryObject, crypt32, 'CryptQueryObject');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CryptQueryObject]
+ end;
+end;
+
+var
+ _CryptMemAlloc: Pointer;
+
+function CryptMemAlloc;
+begin
+ GetProcedureAddress(_CryptMemAlloc, crypt32, 'CryptMemAlloc');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CryptMemAlloc]
+ end;
+end;
+
+var
+ _CryptMemRealloc: Pointer;
+
+function CryptMemRealloc;
+begin
+ GetProcedureAddress(_CryptMemRealloc, crypt32, 'CryptMemRealloc');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CryptMemRealloc]
+ end;
+end;
+
+var
+ _CryptMemFree: Pointer;
+
+procedure CryptMemFree;
+begin
+ GetProcedureAddress(_CryptMemFree, crypt32, 'CryptMemFree');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CryptMemFree]
+ end;
+end;
+
+var
+ _CryptCreateAsyncHandle: Pointer;
+
+function CryptCreateAsyncHandle;
+begin
+ GetProcedureAddress(_CryptCreateAsyncHandle, crypt32, 'CryptCreateAsyncHandle');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CryptCreateAsyncHandle]
+ end;
+end;
+
+var
+ _CryptSetAsyncParam: Pointer;
+
+function CryptSetAsyncParam;
+begin
+ GetProcedureAddress(_CryptSetAsyncParam, crypt32, 'CryptSetAsyncParam');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CryptSetAsyncParam]
+ end;
+end;
+
+var
+ _CryptGetAsyncParam: Pointer;
+
+function CryptGetAsyncParam;
+begin
+ GetProcedureAddress(_CryptGetAsyncParam, crypt32, 'CryptGetAsyncParam');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CryptGetAsyncParam]
+ end;
+end;
+
+var
+ _CryptCloseAsyncHandle: Pointer;
+
+function CryptCloseAsyncHandle;
+begin
+ GetProcedureAddress(_CryptCloseAsyncHandle, crypt32, 'CryptCloseAsyncHandle');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CryptCloseAsyncHandle]
+ end;
+end;
+
+var
+ _CryptRetrieveObjectByUrlA: Pointer;
+
+function CryptRetrieveObjectByUrlA;
+begin
+ GetProcedureAddress(_CryptRetrieveObjectByUrlA, crypt32, 'CryptRetrieveObjectByUrlA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CryptRetrieveObjectByUrlA]
+ end;
+end;
+
+var
+ _CryptRetrieveObjectByUrlW: Pointer;
+
+function CryptRetrieveObjectByUrlW;
+begin
+ GetProcedureAddress(_CryptRetrieveObjectByUrlW, crypt32, 'CryptRetrieveObjectByUrlW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CryptRetrieveObjectByUrlW]
+ end;
+end;
+
+var
+ _CryptRetrieveObjectByUrl: Pointer;
+
+function CryptRetrieveObjectByUrl;
+begin
+ GetProcedureAddress(_CryptRetrieveObjectByUrl, crypt32, 'CryptRetrieveObjectByUrl' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CryptRetrieveObjectByUrl]
+ end;
+end;
+
+var
+ _CryptInstallCancelRetrieval: Pointer;
+
+function CryptInstallCancelRetrieval;
+begin
+ GetProcedureAddress(_CryptInstallCancelRetrieval, crypt32, 'CryptInstallCancelRetrieval');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CryptInstallCancelRetrieval]
+ end;
+end;
+
+var
+ _CryptUninstallCancelRetrieval: Pointer;
+
+function CryptUninstallCancelRetrieval;
+begin
+ GetProcedureAddress(_CryptUninstallCancelRetrieval, crypt32, 'CryptUninstallCancelRetrieval');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CryptUninstallCancelRetrieval]
+ end;
+end;
+
+var
+ _CryptCancelAsyncRetrieval: Pointer;
+
+function CryptCancelAsyncRetrieval;
+begin
+ GetProcedureAddress(_CryptCancelAsyncRetrieval, crypt32, 'CryptCancelAsyncRetrieval');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CryptCancelAsyncRetrieval]
+ end;
+end;
+
+var
+ _CryptGetObjectUrl: Pointer;
+
+function CryptGetObjectUrl;
+begin
+ GetProcedureAddress(_CryptGetObjectUrl, crypt32, 'CryptGetObjectUrl');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CryptGetObjectUrl]
+ end;
+end;
+
+var
+ _CryptGetTimeValidObject: Pointer;
+
+function CryptGetTimeValidObject;
+begin
+ GetProcedureAddress(_CryptGetTimeValidObject, crypt32, 'CryptGetTimeValidObject');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CryptGetTimeValidObject]
+ end;
+end;
+
+var
+ _CryptFlushTimeValidObject: Pointer;
+
+function CryptFlushTimeValidObject;
+begin
+ GetProcedureAddress(_CryptFlushTimeValidObject, crypt32, 'CryptFlushTimeValidObject');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CryptFlushTimeValidObject]
+ end;
+end;
+
+var
+ _CryptProtectData: Pointer;
+
+function CryptProtectData;
+begin
+ GetProcedureAddress(_CryptProtectData, crypt32, 'CryptProtectData');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CryptProtectData]
+ end;
+end;
+
+var
+ _CryptUnprotectData: Pointer;
+
+function CryptUnprotectData;
+begin
+ GetProcedureAddress(_CryptUnprotectData, crypt32, 'CryptUnprotectData');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CryptUnprotectData]
+ end;
+end;
+
+var
+ _CertCreateSelfSignCertificate: Pointer;
+
+function CertCreateSelfSignCertificate;
+begin
+ GetProcedureAddress(_CertCreateSelfSignCertificate, crypt32, 'CertCreateSelfSignCertificate');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CertCreateSelfSignCertificate]
+ end;
+end;
+
+var
+ _CryptGetKeyIdentifierProperty: Pointer;
+
+function CryptGetKeyIdentifierProperty;
+begin
+ GetProcedureAddress(_CryptGetKeyIdentifierProperty, crypt32, 'CryptGetKeyIdentifierProperty');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CryptGetKeyIdentifierProperty]
+ end;
+end;
+
+var
+ _CryptSetKeyIdentifierProperty: Pointer;
+
+function CryptSetKeyIdentifierProperty;
+begin
+ GetProcedureAddress(_CryptSetKeyIdentifierProperty, crypt32, 'CryptSetKeyIdentifierProperty');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CryptSetKeyIdentifierProperty]
+ end;
+end;
+
+var
+ _CryptEnumKeyIdentProperties: Pointer;
+
+function CryptEnumKeyIdentifierProperties;
+begin
+ GetProcedureAddress(_CryptEnumKeyIdentProperties, crypt32, 'CryptEnumKeyIdentifierProperties');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CryptEnumKeyIdentProperties]
+ end;
+end;
+
+var
+ _CryptCreateKeyIdentifierFromCSP: Pointer;
+
+function CryptCreateKeyIdentifierFromCSP;
+begin
+ GetProcedureAddress(_CryptCreateKeyIdentifierFromCSP, crypt32, 'CryptCreateKeyIdentifierFromCSP');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CryptCreateKeyIdentifierFromCSP]
+ end;
+end;
+
+var
+ _CertCreateCertChainEngine: Pointer;
+
+function CertCreateCertificateChainEngine;
+begin
+ GetProcedureAddress(_CertCreateCertChainEngine, crypt32, 'CertCreateCertificateChainEngine');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CertCreateCertChainEngine]
+ end;
+end;
+
+var
+ _CertFreeCertificateChainEngine: Pointer;
+
+procedure CertFreeCertificateChainEngine;
+begin
+ GetProcedureAddress(_CertFreeCertificateChainEngine, crypt32, 'CertFreeCertificateChainEngine');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CertFreeCertificateChainEngine]
+ end;
+end;
+
+var
+ _CertResyncCertChainEngine: Pointer;
+
+function CertResyncCertificateChainEngine;
+begin
+ GetProcedureAddress(_CertResyncCertChainEngine, crypt32, 'CertResyncCertificateChainEngine');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CertResyncCertChainEngine]
+ end;
+end;
+
+var
+ _CertGetCertificateChain: Pointer;
+
+function CertGetCertificateChain;
+begin
+ GetProcedureAddress(_CertGetCertificateChain, crypt32, 'CertGetCertificateChain');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CertGetCertificateChain]
+ end;
+end;
+
+var
+ _CertFreeCertificateChain: Pointer;
+
+procedure CertFreeCertificateChain;
+begin
+ GetProcedureAddress(_CertFreeCertificateChain, crypt32, 'CertFreeCertificateChain');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CertFreeCertificateChain]
+ end;
+end;
+
+var
+ _CertDuplicateCertificateChain: Pointer;
+
+function CertDuplicateCertificateChain;
+begin
+ GetProcedureAddress(_CertDuplicateCertificateChain, crypt32, 'CertDuplicateCertificateChain');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CertDuplicateCertificateChain]
+ end;
+end;
+
+var
+ _CertFindChainInStore: Pointer;
+
+function CertFindChainInStore;
+begin
+ GetProcedureAddress(_CertFindChainInStore, crypt32, 'CertFindChainInStore');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CertFindChainInStore]
+ end;
+end;
+
+var
+ _CertVerifyCertChainPolicy: Pointer;
+
+function CertVerifyCertificateChainPolicy;
+begin
+ GetProcedureAddress(_CertVerifyCertChainPolicy, crypt32, 'CertVerifyCertificateChainPolicy');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CertVerifyCertChainPolicy]
+ end;
+end;
+
+{$ELSE}
+
+function CryptAcquireContextA; external advapi32 name 'CryptAcquireContextA';
+function CryptAcquireContextW; external advapi32 name 'CryptAcquireContextW';
+function CryptAcquireContext; external advapi32 name 'CryptAcquireContext' + AWSuffix;
+function CryptReleaseContext; external advapi32 name 'CryptReleaseContext';
+function CryptGenKey; external advapi32 name 'CryptGenKey';
+function CryptDeriveKey; external advapi32 name 'CryptDeriveKey';
+function CryptDestroyKey; external advapi32 name 'CryptDestroyKey';
+function CryptSetKeyParam; external crypt32 name 'CryptSetKeyParam';
+function CryptGetKeyParam; external advapi32 name 'CryptGetKeyParam';
+function CryptSetHashParam; external advapi32 name 'CryptSetHashParam';
+function CryptGetHashParam; external advapi32 name 'CryptGetHashParam';
+function CryptSetProvParam; external advapi32 name 'CryptSetProvParam';
+function CryptGetProvParam; external advapi32 name 'CryptGetProvParam';
+function CryptGenRandom; external advapi32 name 'CryptGenRandom';
+function CryptGetUserKey; external advapi32 name 'CryptGetUserKey';
+function CryptExportKey; external advapi32 name 'CryptExportKey';
+function CryptImportKey; external advapi32 name 'CryptImportKey';
+function CryptEncrypt; external advapi32 name 'CryptEncrypt';
+function CryptDecrypt; external advapi32 name 'CryptDecrypt';
+function CryptCreateHash; external advapi32 name 'CryptCreateHash';
+function CryptHashData; external advapi32 name 'CryptHashData';
+function CryptHashSessionKey; external advapi32 name 'CryptHashSessionKey';
+function CryptDestroyHash; external advapi32 name 'CryptDestroyHash';
+function CryptSignHashA; external advapi32 name 'CryptSignHashA';
+function CryptSignHashW; external advapi32 name 'CryptSignHashW';
+function CryptSignHash; external advapi32 name 'CryptSignHash' + AWSuffix;
+function CryptVerifySignatureA; external advapi32 name 'CryptVerifySignatureA';
+function CryptVerifySignatureW; external advapi32 name 'CryptVerifySignatureW';
+function CryptVerifySignature; external advapi32 name 'CryptVerifySignature' + AWSuffix;
+function CryptSetProviderA; external advapi32 name 'CryptSetProviderA';
+function CryptSetProviderW; external advapi32 name 'CryptSetProviderW';
+function CryptSetProvider; external advapi32 name 'CryptSetProvider' + AWSuffix;
+function CryptSetProviderExA; external advapi32 name 'CryptSetProviderExA';
+function CryptSetProviderExW; external advapi32 name 'CryptSetProviderExW';
+function CryptSetProviderEx; external advapi32 name 'CryptSetProviderEx' + AWSuffix;
+function CryptGetDefaultProviderA; external advapi32 name 'CryptGetDefaultProviderA';
+function CryptGetDefaultProviderW; external advapi32 name 'CryptGetDefaultProviderW';
+function CryptGetDefaultProvider; external advapi32 name 'CryptGetDefaultProvider' + AWSuffix;
+function CryptEnumProviderTypesA; external advapi32 name 'CryptEnumProviderTypesA';
+function CryptEnumProviderTypesW; external advapi32 name 'CryptEnumProviderTypesW';
+function CryptEnumProviderTypes; external advapi32 name 'CryptEnumProviderTypes' + AWSuffix;
+function CryptEnumProvidersA; external advapi32 name 'CryptEnumProvidersA';
+function CryptEnumProvidersW; external advapi32 name 'CryptEnumProvidersW';
+function CryptEnumProviders; external advapi32 name 'CryptEnumProviders' + AWSuffix;
+function CryptContextAddRef; external advapi32 name 'CryptContextAddRef';
+function CryptDuplicateKey; external advapi32 name 'CryptDuplicateKey';
+function CryptDuplicateHash; external advapi32 name 'CryptDuplicateHash';
+function CryptFormatObject; external crypt32 name 'CryptFormatObject';
+function CryptEncodeObjectEx; external crypt32 name 'CryptEncodeObjectEx';
+function CryptEncodeObject; external crypt32 name 'CryptEncodeObject';
+function CryptDecodeObjectEx; external crypt32 name 'CryptDecodeObjectEx';
+function CryptDecodeObject; external crypt32 name 'CryptDecodeObject';
+function CryptInstallOIDFunctionAddress; external crypt32 name 'CryptInstallOIDFunctionAddress';
+function CryptInitOIDFunctionSet; external crypt32 name 'CryptInitOIDFunctionSet';
+function CryptGetOIDFunctionAddress; external crypt32 name 'CryptGetOIDFunctionAddress';
+function CryptGetDefaultOIDDllList; external crypt32 name 'CryptGetDefaultOIDDllList';
+function CryptGetDefaultOIDFunctionAddress; external crypt32 name 'CryptGetDefaultOIDFunctionAddress';
+function CryptFreeOIDFunctionAddress; external crypt32 name 'CryptFreeOIDFunctionAddress';
+function CryptRegisterOIDFunction; external crypt32 name 'CryptRegisterOIDFunction';
+function CryptUnregisterOIDFunction; external crypt32 name 'CryptUnregisterOIDFunction';
+function CryptRegisterDefaultOIDFunction; external crypt32 name 'CryptRegisterDefaultOIDFunction';
+function CryptUnregisterDefaultOIDFunction; external crypt32 name 'CryptUnregisterDefaultOIDFunction';
+function CryptSetOIDFunctionValue; external crypt32 name 'CryptSetOIDFunctionValue';
+function CryptGetOIDFunctionValue; external crypt32 name 'CryptGetOIDFunctionValue';
+function CryptEnumOIDFunction; external crypt32 name 'CryptEnumOIDFunction';
+function CryptFindOIDInfo; external crypt32 name 'CryptFindOIDInfo';
+function CryptRegisterOIDInfo; external crypt32 name 'CryptRegisterOIDInfo';
+function CryptUnregisterOIDInfo; external crypt32 name 'CryptUnregisterOIDInfo';
+function CryptEnumOIDInfo; external crypt32 name 'CryptEnumOIDInfo';
+function CryptFindLocalizedName; external crypt32 name 'CryptFindLocalizedName';
+function CryptMsgOpenToEncode; external crypt32 name 'CryptMsgOpenToEncode';
+function CryptMsgCalculateEncodedLength; external crypt32 name 'CryptMsgCalculateEncodedLength';
+function CryptMsgOpenToDecode; external crypt32 name 'CryptMsgOpenToDecode';
+function CryptMsgDuplicate; external crypt32 name 'CryptMsgDuplicate';
+function CryptMsgClose; external crypt32 name 'CryptMsgClose';
+function CryptMsgUpdate; external crypt32 name 'CryptMsgUpdate';
+function CryptMsgGetParam; external crypt32 name 'CryptMsgGetParam';
+function CryptMsgControl; external crypt32 name 'CryptMsgControl';
+function CryptMsgVerifyCountersignatureEncoded; external crypt32 name 'CryptMsgVerifyCountersignatureEncoded';
+function CryptMsgVerifyCountersignatureEncodedEx; external crypt32 name 'CryptMsgVerifyCountersignatureEncodedEx';
+function CryptMsgCountersign; external crypt32 name 'CryptMsgCountersign';
+function CryptMsgCountersignEncoded; external crypt32 name 'CryptMsgCountersignEncoded';
+function CertOpenStore; external crypt32 name 'CertOpenStore';
+function CertDuplicateStore; external crypt32 name 'CertDuplicateStore';
+function CertSaveStore; external crypt32 name 'CertSaveStore';
+function CertCloseStore; external crypt32 name 'CertCloseStore';
+function CertGetSubjectCertificateFromStore; external crypt32 name 'CertGetSubjectCertificateFromStore';
+function CertEnumCertificatesInStore; external crypt32 name 'CertEnumCertificatesInStore';
+function CertFindCertificateInStore; external crypt32 name 'CertFindCertificateInStore';
+function CertGetIssuerCertificateFromStore; external crypt32 name 'CertGetIssuerCertificateFromStore';
+function CertVerifySubjectCertificateContext; external crypt32 name 'CertVerifySubjectCertificateContext';
+function CertDuplicateCertificateContext; external crypt32 name 'CertDuplicateCertificateContext';
+function CertCreateCertificateContext; external crypt32 name 'CertCreateCertificateContext';
+function CertFreeCertificateContext; external crypt32 name 'CertFreeCertificateContext';
+function CertSetCertificateContextProperty; external crypt32 name 'CertSetCertificateContextProperty';
+function CertGetCertificateContextProperty; external crypt32 name 'CertGetCertificateContextProperty';
+function CertEnumCertificateContextProperties; external crypt32 name 'CertEnumCertificateContextProperties';
+function CertGetCRLFromStore; external crypt32 name 'CertGetCRLFromStore';
+function CertEnumCRLsInStore; external crypt32 name 'CertEnumCRLsInStore';
+function CertFindCRLInStore; external crypt32 name 'CertFindCRLInStore';
+function CertDuplicateCRLContext; external crypt32 name 'CertDuplicateCRLContext';
+function CertCreateCRLContext; external crypt32 name 'CertCreateCRLContext';
+function CertFreeCRLContext; external crypt32 name 'CertFreeCRLContext';
+function CertSetCRLContextProperty; external crypt32 name 'CertSetCRLContextProperty';
+function CertGetCRLContextProperty; external crypt32 name 'CertGetCRLContextProperty';
+function CertEnumCRLContextProperties; external crypt32 name 'CertEnumCRLContextProperties';
+function CertFindCertificateInCRL; external crypt32 name 'CertFindCertificateInCRL';
+function CertAddEncodedCertificateToStore; external crypt32 name 'CertAddEncodedCertificateToStore';
+function CertAddCertificateContextToStore; external crypt32 name 'CertAddCertificateContextToStore';
+function CertAddSerializedElementToStore; external crypt32 name 'CertAddSerializedElementToStore';
+function CertDeleteCertificateFromStore; external crypt32 name 'CertDeleteCertificateFromStore';
+function CertAddEncodedCRLToStore; external crypt32 name 'CertAddEncodedCRLToStore';
+function CertAddCRLContextToStore; external crypt32 name 'CertAddCRLContextToStore';
+function CertDeleteCRLFromStore; external crypt32 name 'CertDeleteCRLFromStore';
+function CertSerializeCertificateStoreElement; external crypt32 name 'CertSerializeCertificateStoreElement';
+function CertSerializeCRLStoreElement; external crypt32 name 'CertSerializeCRLStoreElement';
+function CertDuplicateCTLContext; external crypt32 name 'CertDuplicateCTLContext';
+function CertCreateCTLContext; external crypt32 name 'CertCreateCTLContext';
+function CertFreeCTLContext; external crypt32 name 'CertFreeCTLContext';
+function CertSetCTLContextProperty; external crypt32 name 'CertSetCTLContextProperty';
+function CertGetCTLContextProperty; external crypt32 name 'CertGetCTLContextProperty';
+function CertEnumCTLContextProperties; external crypt32 name 'CertEnumCTLContextProperties';
+function CertEnumCTLsInStore; external crypt32 name 'CertEnumCTLsInStore';
+function CertFindSubjectInCTL; external crypt32 name 'CertFindSubjectInCTL';
+function CertFindCTLInStore; external crypt32 name 'CertFindCTLInStore';
+function CertAddEncodedCTLToStore; external crypt32 name 'CertAddEncodedCTLToStore';
+function CertAddCTLContextToStore; external crypt32 name 'CertAddCTLContextToStore';
+function CertSerializeCTLStoreElement; external crypt32 name 'CertSerializeCTLStoreElement';
+function CertDeleteCTLFromStore; external crypt32 name 'CertDeleteCTLFromStore';
+function CertAddCertificateLinkToStore; external crypt32 name 'CertAddCertificateLinkToStore';
+function CertAddCRLLinkToStore; external crypt32 name 'CertAddCRLLinkToStore';
+function CertAddCTLLinkToStore; external crypt32 name 'CertAddCTLLinkToStore';
+function CertAddStoreToCollection; external crypt32 name 'CertAddStoreToCollection';
+procedure CertRemoveStoreFromCollection; external crypt32 name 'CertRemoveStoreFromCollection';
+function CertControlStore; external crypt32 name 'CertControlStore';
+function CertSetStoreProperty; external crypt32 name 'CertSetStoreProperty';
+function CertGetStoreProperty; external crypt32 name 'CertGetStoreProperty';
+function CertCreateContext; external crypt32 name 'CertCreateContext';
+function CertRegisterSystemStore; external crypt32 name 'CertRegisterSystemStore';
+function CertRegisterPhysicalStore; external crypt32 name 'CertRegisterPhysicalStore';
+function CertUnregisterSystemStore; external crypt32 name 'CertUnregisterSystemStore';
+function CertUnregisterPhysicalStore; external crypt32 name 'CertUnregisterPhysicalStore';
+function CertEnumSystemStoreLocation; external crypt32 name 'CertEnumSystemStoreLocation';
+function CertEnumSystemStore; external crypt32 name 'CertEnumSystemStore';
+function CertEnumPhysicalStore; external crypt32 name 'CertEnumPhysicalStore';
+function CertGetEnhancedKeyUsage; external crypt32 name 'CertGetEnhancedKeyUsage';
+function CertSetEnhancedKeyUsage; external crypt32 name 'CertSetEnhancedKeyUsage';
+function CertAddEnhancedKeyUsageIdentifier; external crypt32 name 'CertAddEnhancedKeyUsageIdentifier';
+function CertRemoveEnhancedKeyUsageIdentifier; external crypt32 name 'CertRemoveEnhancedKeyUsageIdentifier';
+function CertGetValidUsages; external crypt32 name 'CertGetValidUsages';
+function CryptMsgGetAndVerifySigner; external crypt32 name 'CryptMsgGetAndVerifySigner';
+function CryptMsgSignCTL; external crypt32 name 'CryptMsgSignCTL';
+function CryptMsgEncodeAndSignCTL; external crypt32 name 'CryptMsgEncodeAndSignCTL';
+function CertFindSubjectInSortedCTL; external crypt32 name 'CertFindSubjectInSortedCTL';
+function CertEnumSubjectInSortedCTL; external crypt32 name 'CertEnumSubjectInSortedCTL';
+function CertVerifyCTLUsage; external crypt32 name 'CertVerifyCTLUsage';
+function CertVerifyRevocation; external crypt32 name 'CertVerifyRevocation';
+function CertCompareIntegerBlob; external crypt32 name 'CertCompareIntegerBlob';
+function CertCompareCertificate; external crypt32 name 'CertCompareCertificate';
+function CertCompareCertificateName; external crypt32 name 'CertCompareCertificateName';
+function CertIsRDNAttrsInCertificateName; external crypt32 name 'CertIsRDNAttrsInCertificateName';
+function CertComparePublicKeyInfo; external crypt32 name 'CertComparePublicKeyInfo';
+function CertGetPublicKeyLength; external crypt32 name 'CertGetPublicKeyLength';
+function CryptVerifyCertificateSignature; external crypt32 name 'CryptVerifyCertificateSignature';
+function CryptVerifyCertificateSignatureEx; external crypt32 name 'CryptVerifyCertificateSignatureEx';
+function CryptHashToBeSigned; external crypt32 name 'CryptHashToBeSigned';
+function CryptHashCertificate; external crypt32 name 'CryptHashCertificate';
+function CryptSignCertificate; external crypt32 name 'CryptSignCertificate';
+function CryptSignAndEncodeCertificate; external crypt32 name 'CryptSignAndEncodeCertificate';
+function CertVerifyTimeValidity; external crypt32 name 'CertVerifyTimeValidity';
+function CertVerifyCRLTimeValidity; external crypt32 name 'CertVerifyCRLTimeValidity';
+function CertVerifyValidityNesting; external crypt32 name 'CertVerifyValidityNesting';
+function CertVerifyCRLRevocation; external crypt32 name 'CertVerifyCRLRevocation';
+function CertAlgIdToOID; external crypt32 name 'CertAlgIdToOID';
+function CertOIDToAlgId; external crypt32 name 'CertOIDToAlgId';
+function CertFindExtension; external crypt32 name 'CertFindExtension';
+function CertFindAttribute; external crypt32 name 'CertFindAttribute';
+function CertFindRDNAttr; external crypt32 name 'CertFindRDNAttr';
+function CertGetIntendedKeyUsage; external crypt32 name 'CertGetIntendedKeyUsage';
+function CryptInstallDefaultContext; external crypt32 name 'CryptInstallDefaultContext';
+function CryptUninstallDefaultContext; external crypt32 name 'CryptUninstallDefaultContext';
+function CryptExportPublicKeyInfo; external crypt32 name 'CryptExportPublicKeyInfo';
+function CryptExportPublicKeyInfoEx; external crypt32 name 'CryptExportPublicKeyInfoEx';
+function CryptImportPublicKeyInfo; external crypt32 name 'CryptImportPublicKeyInfo';
+function CryptImportPublicKeyInfoEx; external crypt32 name 'CryptImportPublicKeyInfoEx';
+function CryptAcquireCertificatePrivateKey; external crypt32 name 'CryptAcquireCertificatePrivateKey';
+function CryptFindCertificateKeyProvInfo; external crypt32 name 'CryptFindCertificateKeyProvInfo';
+function CryptImportPKCS8; external crypt32 name 'CryptImportPKCS8';
+function CryptExportPKCS8; external crypt32 name 'CryptExportPKCS8';
+function CryptExportPKCS8Ex; external crypt32 name 'CryptExportPKCS8Ex';
+function CryptHashPublicKeyInfo; external crypt32 name 'CryptHashPublicKeyInfo';
+function CertRDNValueToStrA; external crypt32 name 'CertRDNValueToStrA';
+function CertRDNValueToStrW; external crypt32 name 'CertRDNValueToStrW';
+function CertRDNValueToStr; external crypt32 name 'CertRDNValueToStr' + AWSuffix;
+function CertNameToStrA; external crypt32 name 'CertNameToStrA';
+function CertNameToStrW; external crypt32 name 'CertNameToStrW';
+function CertNameToStr; external crypt32 name 'CertNameToStr' + AWSuffix;
+function CertStrToNameA; external crypt32 name 'CertStrToNameA';
+function CertStrToNameW; external crypt32 name 'CertStrToNameW';
+function CertStrToName; external crypt32 name 'CertStrToName' + AWSuffix;
+function CertGetNameStringA; external crypt32 name 'CertGetNameStringA';
+function CertGetNameStringW; external crypt32 name 'CertGetNameStringW';
+function CertGetNameString; external crypt32 name 'CertGetNameString' + AWSuffix;
+function CryptSignMessage; external crypt32 name 'CryptSignMessage';
+function CryptVerifyMessageSignature; external crypt32 name 'CryptVerifyMessageSignature';
+function CryptGetMessageSignerCount; external crypt32 name 'CryptGetMessageSignerCount';
+function CryptGetMessageCertificates; external crypt32 name 'CryptGetMessageCertificates';
+function CryptVerifyDetachedMessageSignature; external crypt32 name 'CryptVerifyDetachedMessageSignature';
+function CryptEncryptMessage; external crypt32 name 'CryptEncryptMessage';
+function CryptDecryptMessage; external crypt32 name 'CryptDecryptMessage';
+function CryptSignAndEncryptMessage; external crypt32 name 'CryptSignAndEncryptMessage';
+function CryptDecryptAndVerifyMessageSignature; external crypt32 name 'CryptDecryptAndVerifyMessageSignature';
+function CryptDecodeMessage; external crypt32 name 'CryptDecodeMessage';
+function CryptHashMessage; external crypt32 name 'CryptHashMessage';
+function CryptVerifyMessageHash; external crypt32 name 'CryptVerifyMessageHash';
+function CryptVerifyDetachedMessageHash; external crypt32 name 'CryptVerifyDetachedMessageHash';
+function CryptSignMessageWithKey; external crypt32 name 'CryptSignMessageWithKey';
+function CryptVerifyMessageSignatureWithKey; external crypt32 name 'CryptVerifyMessageSignatureWithKey';
+function CertOpenSystemStoreA; external crypt32 name 'CertOpenSystemStoreA';
+function CertOpenSystemStoreW; external crypt32 name 'CertOpenSystemStoreW';
+function CertOpenSystemStore; external crypt32 name 'CertOpenSystemStore' + AWSuffix;
+function CertAddEncodedCertificateToSystemStoreA; external crypt32 name 'CertAddEncodedCertificateToSystemStoreA';
+function CertAddEncodedCertificateToSystemStoreW; external crypt32 name 'CertAddEncodedCertificateToSystemStoreW';
+function CertAddEncodedCertificateToSystemStore; external crypt32 name 'CertAddEncodedCertificateToSystemStore' + AWSuffix;
+function FindCertsByIssuer; external softpub name 'FindCertsByIssuer';
+function CryptQueryObject; external crypt32 name 'CryptQueryObject';
+function CryptMemAlloc; external crypt32 name 'CryptMemAlloc';
+function CryptMemRealloc; external crypt32 name 'CryptMemRealloc';
+procedure CryptMemFree; external crypt32 name 'CryptMemFree';
+function CryptCreateAsyncHandle; external crypt32 name 'CryptCreateAsyncHandle';
+function CryptSetAsyncParam; external crypt32 name 'CryptSetAsyncParam';
+function CryptGetAsyncParam; external crypt32 name 'CryptGetAsyncParam';
+function CryptCloseAsyncHandle; external crypt32 name 'CryptCloseAsyncHandle';
+function CryptRetrieveObjectByUrlA; external crypt32 name 'CryptRetrieveObjectByUrlA';
+function CryptRetrieveObjectByUrlW; external crypt32 name 'CryptRetrieveObjectByUrlW';
+function CryptRetrieveObjectByUrl; external crypt32 name 'CryptRetrieveObjectByUrl' + AWSuffix;
+function CryptInstallCancelRetrieval; external crypt32 name 'CryptInstallCancelRetrieval';
+function CryptUninstallCancelRetrieval; external crypt32 name 'CryptUninstallCancelRetrieval';
+function CryptCancelAsyncRetrieval; external crypt32 name 'CryptCancelAsyncRetrieval';
+function CryptGetObjectUrl; external crypt32 name 'CryptGetObjectUrl';
+function CryptGetTimeValidObject; external crypt32 name 'CryptGetTimeValidObject';
+function CryptFlushTimeValidObject; external crypt32 name 'CryptFlushTimeValidObject';
+function CryptProtectData; external crypt32 name 'CryptProtectData';
+function CryptUnprotectData; external crypt32 name 'CryptUnprotectData';
+function CertCreateSelfSignCertificate; external crypt32 name 'CertCreateSelfSignCertificate';
+function CryptGetKeyIdentifierProperty; external crypt32 name 'CryptGetKeyIdentifierProperty';
+function CryptSetKeyIdentifierProperty; external crypt32 name 'CryptSetKeyIdentifierProperty';
+function CryptEnumKeyIdentifierProperties; external crypt32 name 'CryptEnumKeyIdentifierProperties';
+function CryptCreateKeyIdentifierFromCSP; external crypt32 name 'CryptCreateKeyIdentifierFromCSP';
+function CertCreateCertificateChainEngine; external crypt32 name 'CertCreateCertificateChainEngine';
+procedure CertFreeCertificateChainEngine; external crypt32 name 'CertFreeCertificateChainEngine';
+function CertResyncCertificateChainEngine; external crypt32 name 'CertResyncCertificateChainEngine';
+function CertGetCertificateChain; external crypt32 name 'CertGetCertificateChain';
+procedure CertFreeCertificateChain; external crypt32 name 'CertFreeCertificateChain';
+function CertDuplicateCertificateChain; external crypt32 name 'CertDuplicateCertificateChain';
+function CertFindChainInStore; external crypt32 name 'CertFindChainInStore';
+function CertVerifyCertificateChainPolicy; external crypt32 name 'CertVerifyCertificateChainPolicy';
+
+{$ENDIF DYNAMIC_LINK}
+
+end.
diff --git a/packages/extra/winunits/jwawindns.pas b/packages/extra/winunits/jwawindns.pas
index 90496d0fc2..423a12db43 100644
--- a/packages/extra/winunits/jwawindns.pas
+++ b/packages/extra/winunits/jwawindns.pas
@@ -1,2480 +1,2480 @@
-{******************************************************************************}
-{ }
-{ Domain Naming Services API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: windns.h, released June 2000. The original Pascal }
-{ code is: WinDNS.pas, released December 2000. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwawindns.pas,v 1.1 2005/04/04 07:56:11 marco Exp $
-
-{******************************************************************}
-{ Notes (TODO): }
-{ DnsRecordSetDetach() and DnsValidateName_X() didn't have a cc }
-{ IP_ADDRESS_STRING_LENGTH is defined nowhere }
-{ DNS_WINS_RECORD macro untranslatable due to IP_ADDRESS }
-{ DNS_RRSET_ADD macro untranslatable }
-{******************************************************************}
-
-unit JwaWinDNS;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "WinDNS.h"'}
-{$HPPEMIT ''}
-{$HPPEMIT 'typeded PDNS_RECORD *PPDNS_RECORD'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaWinsock2, JwaWinType, JwaWS2atm;
-
-type
- IN6_ADDR = Pointer; // todo
-
-//
-// Define QWORD -- not yet defined globally
-//
-
-type
- QWORD = Int64;
- {$EXTERNALSYM QWORD}
-
-//
-// DNS public types
-//
-
-type
- DNS_STATUS = Longint;
- {$EXTERNALSYM DNS_STATUS}
- PDNS_STATUS = ^DNS_STATUS;
- {$EXTERNALSYM PDNS_STATUS}
- TDnsStatus = DNS_STATUS;
- PDnsStatus = PDNS_STATUS;
-
-//
-// IP Address
-//
-
-type
- IP4_ADDRESS = DWORD;
- {$EXTERNALSYM IP4_ADDRESS}
- PIP4_ADDRESS = ^IP4_ADDRESS;
- {$EXTERNALSYM PIP4_ADDRESS}
- TIP4Address = IP4_ADDRESS;
- PIP4Address = PIP4_ADDRESS;
-
-const
- SIZEOF_IP4_ADDRESS = 4;
- {$EXTERNALSYM SIZEOF_IP4_ADDRESS}
- IP4_ADDRESS_STRING_LENGTH = 15;
- {$EXTERNALSYM IP4_ADDRESS_STRING_LENGTH}
- IP4_ADDRESS_STRING_BUFFER_LENGTH = 16;
- {$EXTERNALSYM IP4_ADDRESS_STRING_BUFFER_LENGTH}
-
-//
-// IP Address Array type
-//
-
-type
- PIP4_ARRAY = ^IP4_ARRAY;
- {$EXTERNALSYM PIP4_ARRAY}
- _IP4_ARRAY = record
- AddrCount: DWORD;
- AddrArray: array [0..0] of IP4_ADDRESS;
- end;
- {$EXTERNALSYM _IP4_ARRAY}
- IP4_ARRAY = _IP4_ARRAY;
- {$EXTERNALSYM IP4_ARRAY}
- TIp4Array = IP4_ARRAY;
- PIp4Array = PIP4_ARRAY;
-
-//
-// IPv6 Address
-//
-
- PIP6_ADDRESS = ^IP6_ADDRESS;
- {$EXTERNALSYM PIP6_ADDRESS}
- IP6_ADDRESS = record
- case Integer of
- 0: (IP6Qword: array [0..1] of QWORD);
- 1: (IP6Dword: array [0..3] of DWORD);
- 2: (IP6Word: array [0..7] of WORD);
- 3: (IP6Byte: array [0..15] of BYTE);
- 4: (In6: IN6_ADDR);
- end;
- {$EXTERNALSYM IP6_ADDRESS}
- TIp6Address = IP6_ADDRESS;
- PIp6Address = PIP6_ADDRESS;
-
-// Backward compatibility
-
- DNS_IP6_ADDRESS = IP6_ADDRESS;
- {$EXTERNALSYM DNS_IP6_ADDRESS}
- PDNS_IP6_ADDRESS = ^IP6_ADDRESS;
- {$EXTERNALSYM PDNS_IP6_ADDRESS}
- TDnsIp6Address = DNS_IP6_ADDRESS;
- PDnsIp6Address = PDNS_IP6_ADDRESS;
-
-//
-// IP6 string max is 45 bytes
-// - 6 WORDs in colon+hex (5 chars)
-// - last DWORD as IP4 (15 chars)
-//
-
-const
- IP6_ADDRESS_STRING_LENGTH = 47;
- {$EXTERNALSYM IP6_ADDRESS_STRING_LENGTH}
- IP6_ADDRESS_STRING_BUFFER_LENGTH = 48;
- {$EXTERNALSYM IP6_ADDRESS_STRING_BUFFER_LENGTH}
-
-// backcompat
-
- IPV6_ADDRESS_STRING_LENGTH = IP6_ADDRESS_STRING_LENGTH;
- {$EXTERNALSYM IPV6_ADDRESS_STRING_LENGTH}
-
-//
-// Inline byte flipping -- can be done in registers
-//
-
-procedure INLINE_WORD_FLIP(var Out_: WORD; In_: WORD);
-{$EXTERNALSYM INLINE_WORD_FLIP}
-
-procedure INLINE_HTONS(var Out_: WORD; In_: WORD);
-{$EXTERNALSYM INLINE_HTONS}
-
-procedure INLINE_NTOHS(var Out_: WORD; In_: WORD);
-{$EXTERNALSYM INLINE_NTOHS}
-
-procedure INLINE_DWORD_FLIP(var Out_: DWORD; In_: DWORD);
-{$EXTERNALSYM INLINE_DWORD_FLIP}
-
-procedure INLINE_NTOHL(var Out_: DWORD; In_: DWORD);
-{$EXTERNALSYM INLINE_NTOHL}
-
-procedure INLINE_HTONL(var Out_: DWORD; In_: DWORD);
-{$EXTERNALSYM INLINE_HTONL}
-
-//
-// Inline byte flip and write to packet (unaligned)
-//
-
-procedure INLINE_WRITE_FLIPPED_WORD(pout: PWORD; In_: WORD);
-{$EXTERNALSYM INLINE_WRITE_FLIPPED_WORD}
-
-procedure INLINE_WRITE_FLIPPED_DWORD(pout: PDWORD; In_: DWORD);
-{$EXTERNALSYM INLINE_WRITE_FLIPPED_DWORD}
-
-//
-// Basic DNS definitions
-//
-
-//
-// DNS port for both UDP and TCP is 53.
-//
-
-const
- DNS_PORT_HOST_ORDER = $0035; // port 53
- {$EXTERNALSYM DNS_PORT_HOST_ORDER}
- DNS_PORT_NET_ORDER = $3500;
- {$EXTERNALSYM DNS_PORT_NET_ORDER}
-
-//
-// DNS UDP packets no more than 512 bytes
-//
-
- DNS_RFC_MAX_UDP_PACKET_LENGTH = 512;
- {$EXTERNALSYM DNS_RFC_MAX_UDP_PACKET_LENGTH}
-
-//
-// DNS Names limited to 255, 63 in any one label
-//
-
- DNS_MAX_NAME_LENGTH = 255;
- {$EXTERNALSYM DNS_MAX_NAME_LENGTH}
- DNS_MAX_LABEL_LENGTH = 63;
- {$EXTERNALSYM DNS_MAX_LABEL_LENGTH}
-
- DNS_MAX_NAME_BUFFER_LENGTH = 256;
- {$EXTERNALSYM DNS_MAX_NAME_BUFFER_LENGTH}
- DNS_MAX_LABEL_BUFFER_LENGTH = 64;
- {$EXTERNALSYM DNS_MAX_LABEL_BUFFER_LENGTH}
-
-//
-// Reverse lookup domain names
-//
-
- DNS_IP4_REVERSE_DOMAIN_STRING = 'in-addr.arpa.';
- {$EXTERNALSYM DNS_IP4_REVERSE_DOMAIN_STRING}
-
- //DNS_MAX_IP4_REVERSE_NAME_LENGTH = IP_ADDRESS_STRING_LENGTH + 1 + SizeOf(DNS_IP4_REVERSE_DOMAIN_STRING);
- //{$EXTERNALSYM DNS_MAX_IP4_REVERSE_NAME_LENGTH}
-
- //DNS_MAX_IP4_REVERSE_NAME_BUFFER_LENGTH = DNS_MAX_IP4_REVERSE_NAME_LENGTH + 1;
- //{$EXTERNALSYM DNS_MAX_IP4_REVERSE_NAME_BUFFER_LENGTH}
-
- DNS_IP6_REVERSE_DOMAIN_STRING = 'ip6.int.';
- {$EXTERNALSYM DNS_IP6_REVERSE_DOMAIN_STRING}
-
- DNS_MAX_IP6_REVERSE_NAME_LENGTH = 64 + SizeOf(DNS_IP6_REVERSE_DOMAIN_STRING);
- {$EXTERNALSYM DNS_MAX_IP6_REVERSE_NAME_LENGTH}
-
- DNS_MAX_IP6_REVERSE_NAME_BUFFER_LENGTH = DNS_MAX_IP6_REVERSE_NAME_LENGTH + 1;
- {$EXTERNALSYM DNS_MAX_IP6_REVERSE_NAME_BUFFER_LENGTH}
-
-// Combined
-
- DNS_MAX_REVERSE_NAME_LENGTH = DNS_MAX_IP6_REVERSE_NAME_LENGTH;
- {$EXTERNALSYM DNS_MAX_REVERSE_NAME_LENGTH}
-
- DNS_MAX_REVERSE_NAME_BUFFER_LENGTH = DNS_MAX_IP6_REVERSE_NAME_BUFFER_LENGTH;
- {$EXTERNALSYM DNS_MAX_REVERSE_NAME_BUFFER_LENGTH}
-
-//
-// DNS Text string limited by size representable
-// in a single byte length field
-
- DNS_MAX_TEXT_STRING_LENGTH = 255;
- {$EXTERNALSYM DNS_MAX_TEXT_STRING_LENGTH}
-
-//
-// DNS On-The-Wire Structures
-//
-
-//
-// DNS Message Header
-//
-
-type
- _DNS_HEADER = packed record
- Xid: WORD;
- Flags: Byte;
- //BYTE RecursionDesired : 1;
- //BYTE Truncation : 1;
- //BYTE Authoritative : 1;
- //BYTE Opcode : 4;
- //BYTE IsResponse : 1;
- Flags2: Byte;
- //BYTE ResponseCode : 4;
- //BYTE Reserved : 3;
- //BYTE RecursionAvailable : 1;
- QuestionCount: WORD;
- AnswerCount: WORD;
- NameServerCount: WORD;
- AdditionalCount: WORD;
- end;
- {$EXTERNALSYM _DNS_HEADER}
- DNS_HEADER = _DNS_HEADER;
- {$EXTERNALSYM DNS_HEADER}
- PDNS_HEADER = ^DNS_HEADER;
- {$EXTERNALSYM PDNS_HEADER}
- TDnsHeader = DNS_HEADER;
- PDnsHeader = PDNS_HEADER;
-
-//
-// Flags as WORD
-//
-
-function DNS_HEADER_FLAGS(pHead: PDNS_HEADER): WORD;
-{$EXTERNALSYM DNS_HEADER_FLAGS}
-
-//
-// Byte flip DNS header to\from host order.
-//
-// Note that this does NOT flip flags, as definition above defines
-// flags as individual bytes for direct access to net byte order.
-//
-
-procedure DNS_BYTE_FLIP_HEADER_COUNTS(var pHeader: PDNS_HEADER);
-{$EXTERNALSYM DNS_BYTE_FLIP_HEADER_COUNTS}
-
-//
-// Question name follows header
-//
-
-const
- DNS_OFFSET_TO_QUESTION_NAME = SizeOf(DNS_HEADER);
- {$EXTERNALSYM DNS_OFFSET_TO_QUESTION_NAME}
-
-//
-// Question immediately follows header so compressed question name
-// 0xC000 | sizeof(DNS_HEADER)
-
- DNS_COMPRESSED_QUESTION_NAME = $C00C;
- {$EXTERNALSYM DNS_COMPRESSED_QUESTION_NAME}
-
-//
-// Packet extraction macros
-//
-
-{
-#define DNS_QUESTION_NAME_FROM_HEADER( _pHeader_ ) \
- ( (PCHAR)( (PDNS_HEADER)(_pHeader_) + 1 ) )
-
-#define DNS_ANSWER_FROM_QUESTION( _pQuestion_ ) \
- ( (PCHAR)( (PDNS_QUESTION)(_pQuestion_) + 1 ) )
-}
-
-//
-// DNS Question
-//
-
-type
- PDNS_WIRE_QUESTION = ^DNS_WIRE_QUESTION;
- {$EXTERNALSYM PDNS_WIRE_QUESTION}
- _DNS_WIRE_QUESTION = packed record
- // Preceded by question name
- QuestionType: WORD;
- QuestionClass: WORD;
- end;
- {$EXTERNALSYM _DNS_WIRE_QUESTION}
- DNS_WIRE_QUESTION = _DNS_WIRE_QUESTION;
- {$EXTERNALSYM DNS_WIRE_QUESTION}
- TDnsWireQuestion = DNS_WIRE_QUESTION;
- PDnsWireQuestion = PDNS_WIRE_QUESTION;
-
-//
-// DNS Resource Record
-//
-
- PDNS_WIRE_RECORD = ^DNS_WIRE_RECORD;
- {$EXTERNALSYM PDNS_WIRE_RECORD}
- _DNS_WIRE_RECORD = packed record
- // Preceded by record owner name
- RecordType: WORD;
- RecordClass: WORD;
- TimeToLive: DWORD;
- DataLength: WORD;
- // Followed by record data
- end;
- {$EXTERNALSYM _DNS_WIRE_RECORD}
- DNS_WIRE_RECORD = _DNS_WIRE_RECORD;
- {$EXTERNALSYM DNS_WIRE_RECORD}
- TDnsWireRecord = DNS_WIRE_RECORD;
- PDnsWireRecord = PDNS_WIRE_RECORD;
-
-//
-// DNS Query Types
-//
-
-const
- DNS_OPCODE_QUERY = 0; // Query
- {$EXTERNALSYM DNS_OPCODE_QUERY}
- DNS_OPCODE_IQUERY = 1; // Obsolete: IP to name
- {$EXTERNALSYM DNS_OPCODE_IQUERY}
- DNS_OPCODE_SERVER_STATUS = 2; // Obsolete: DNS ping
- {$EXTERNALSYM DNS_OPCODE_SERVER_STATUS}
- DNS_OPCODE_UNKNOWN = 3; // Unknown
- {$EXTERNALSYM DNS_OPCODE_UNKNOWN}
- DNS_OPCODE_NOTIFY = 4; // Notify
- {$EXTERNALSYM DNS_OPCODE_NOTIFY}
- DNS_OPCODE_UPDATE = 5; // Dynamic Update
- {$EXTERNALSYM DNS_OPCODE_UPDATE}
-
-//
-// DNS response codes.
-//
-// Sent in the "ResponseCode" field of a DNS_HEADER.
-//
-
- DNS_RCODE_NOERROR = 0;
- {$EXTERNALSYM DNS_RCODE_NOERROR}
- DNS_RCODE_FORMERR = 1; // Format error
- {$EXTERNALSYM DNS_RCODE_FORMERR}
- DNS_RCODE_SERVFAIL = 2; // Server failure
- {$EXTERNALSYM DNS_RCODE_SERVFAIL}
- DNS_RCODE_NXDOMAIN = 3; // Name error
- {$EXTERNALSYM DNS_RCODE_NXDOMAIN}
- DNS_RCODE_NOTIMPL = 4; // Not implemented
- {$EXTERNALSYM DNS_RCODE_NOTIMPL}
- DNS_RCODE_REFUSED = 5; // Refused
- {$EXTERNALSYM DNS_RCODE_REFUSED}
- DNS_RCODE_YXDOMAIN = 6; // Domain name should not exist
- {$EXTERNALSYM DNS_RCODE_YXDOMAIN}
- DNS_RCODE_YXRRSET = 7; // RR set should not exist
- {$EXTERNALSYM DNS_RCODE_YXRRSET}
- DNS_RCODE_NXRRSET = 8; // RR set does not exist
- {$EXTERNALSYM DNS_RCODE_NXRRSET}
- DNS_RCODE_NOTAUTH = 9; // Not authoritative for zone
- {$EXTERNALSYM DNS_RCODE_NOTAUTH}
- DNS_RCODE_NOTZONE = 10; // Name is not zone
- {$EXTERNALSYM DNS_RCODE_NOTZONE}
- DNS_RCODE_MAX = 15;
- {$EXTERNALSYM DNS_RCODE_MAX}
-
-//
-// Extended RCODEs
-//
-
- DNS_RCODE_BADVERS = 16; // Bad EDNS version
- {$EXTERNALSYM DNS_RCODE_BADVERS}
- DNS_RCODE_BADSIG = 16; // Bad signature
- {$EXTERNALSYM DNS_RCODE_BADSIG}
- DNS_RCODE_BADKEY = 17; // Bad key
- {$EXTERNALSYM DNS_RCODE_BADKEY}
- DNS_RCODE_BADTIME = 18; // Bad timestamp
- {$EXTERNALSYM DNS_RCODE_BADTIME}
-
-//
-// Mappings to friendly names
-//
-
- DNS_RCODE_NO_ERROR = DNS_RCODE_NOERROR;
- {$EXTERNALSYM DNS_RCODE_NO_ERROR}
- DNS_RCODE_FORMAT_ERROR = DNS_RCODE_FORMERR;
- {$EXTERNALSYM DNS_RCODE_FORMAT_ERROR}
- DNS_RCODE_SERVER_FAILURE = DNS_RCODE_SERVFAIL;
- {$EXTERNALSYM DNS_RCODE_SERVER_FAILURE}
- DNS_RCODE_NAME_ERROR = DNS_RCODE_NXDOMAIN;
- {$EXTERNALSYM DNS_RCODE_NAME_ERROR}
- DNS_RCODE_NOT_IMPLEMENTED = DNS_RCODE_NOTIMPL;
- {$EXTERNALSYM DNS_RCODE_NOT_IMPLEMENTED}
-
-//
-// DNS Classes
-//
-// Classes are on the wire as WORDs.
-//
-// _CLASS_ defines in host order.
-// _RCLASS_ defines in net byte order.
-//
-// Generally we'll avoid byte flip and test class in net byte order.
-//
-
- DNS_CLASS_INTERNET = $0001; // 1
- {$EXTERNALSYM DNS_CLASS_INTERNET}
- DNS_CLASS_CSNET = $0002; // 2
- {$EXTERNALSYM DNS_CLASS_CSNET}
- DNS_CLASS_CHAOS = $0003; // 3
- {$EXTERNALSYM DNS_CLASS_CHAOS}
- DNS_CLASS_HESIOD = $0004; // 4
- {$EXTERNALSYM DNS_CLASS_HESIOD}
- DNS_CLASS_NONE = $00fe; // 254
- {$EXTERNALSYM DNS_CLASS_NONE}
- DNS_CLASS_ALL = $00ff; // 255
- {$EXTERNALSYM DNS_CLASS_ALL}
- DNS_CLASS_ANY = $00ff; // 255
- {$EXTERNALSYM DNS_CLASS_ANY}
-
- DNS_RCLASS_INTERNET = $0100; // 1
- {$EXTERNALSYM DNS_RCLASS_INTERNET}
- DNS_RCLASS_CSNET = $0200; // 2
- {$EXTERNALSYM DNS_RCLASS_CSNET}
- DNS_RCLASS_CHAOS = $0300; // 3
- {$EXTERNALSYM DNS_RCLASS_CHAOS}
- DNS_RCLASS_HESIOD = $0400; // 4
- {$EXTERNALSYM DNS_RCLASS_HESIOD}
- DNS_RCLASS_NONE = $fe00; // 254
- {$EXTERNALSYM DNS_RCLASS_NONE}
- DNS_RCLASS_ALL = $ff00; // 255
- {$EXTERNALSYM DNS_RCLASS_ALL}
- DNS_RCLASS_ANY = $ff00; // 255
- {$EXTERNALSYM DNS_RCLASS_ANY}
-
-//
-// DNS Record Types
-//
-// _TYPE_ defines are in host byte order.
-// _RTYPE_ defines are in net byte order.
-//
-// Generally always deal with types in host byte order as we index
-// resource record functions by type.
-//
-
- DNS_TYPE_ZERO = $0000;
- {$EXTERNALSYM DNS_TYPE_ZERO}
-
-// RFC 1034/1035
- DNS_TYPE_A = $0001; // 1
- {$EXTERNALSYM DNS_TYPE_A}
- DNS_TYPE_NS = $0002; // 2
- {$EXTERNALSYM DNS_TYPE_NS}
- DNS_TYPE_MD = $0003; // 3
- {$EXTERNALSYM DNS_TYPE_MD}
- DNS_TYPE_MF = $0004; // 4
- {$EXTERNALSYM DNS_TYPE_MF}
- DNS_TYPE_CNAME = $0005; // 5
- {$EXTERNALSYM DNS_TYPE_CNAME}
- DNS_TYPE_SOA = $0006; // 6
- {$EXTERNALSYM DNS_TYPE_SOA}
- DNS_TYPE_MB = $0007; // 7
- {$EXTERNALSYM DNS_TYPE_MB}
- DNS_TYPE_MG = $0008; // 8
- {$EXTERNALSYM DNS_TYPE_MG}
- DNS_TYPE_MR = $0009; // 9
- {$EXTERNALSYM DNS_TYPE_MR}
- DNS_TYPE_NULL = $000a; // 10
- {$EXTERNALSYM DNS_TYPE_NULL}
- DNS_TYPE_WKS = $000b; // 11
- {$EXTERNALSYM DNS_TYPE_WKS}
- DNS_TYPE_PTR = $000c; // 12
- {$EXTERNALSYM DNS_TYPE_PTR}
- DNS_TYPE_HINFO = $000d; // 13
- {$EXTERNALSYM DNS_TYPE_HINFO}
- DNS_TYPE_MINFO = $000e; // 14
- {$EXTERNALSYM DNS_TYPE_MINFO}
- DNS_TYPE_MX = $000f; // 15
- {$EXTERNALSYM DNS_TYPE_MX}
- DNS_TYPE_TEXT = $0010; // 16
- {$EXTERNALSYM DNS_TYPE_TEXT}
-
-// RFC 1183
- DNS_TYPE_RP = $0011; // 17
- {$EXTERNALSYM DNS_TYPE_RP}
- DNS_TYPE_AFSDB = $0012; // 18
- {$EXTERNALSYM DNS_TYPE_AFSDB}
- DNS_TYPE_X25 = $0013; // 19
- {$EXTERNALSYM DNS_TYPE_X25}
- DNS_TYPE_ISDN = $0014; // 20
- {$EXTERNALSYM DNS_TYPE_ISDN}
- DNS_TYPE_RT = $0015; // 21
- {$EXTERNALSYM DNS_TYPE_RT}
-
-// RFC 1348
- DNS_TYPE_NSAP = $0016; // 22
- {$EXTERNALSYM DNS_TYPE_NSAP}
- DNS_TYPE_NSAPPTR = $0017; // 23
- {$EXTERNALSYM DNS_TYPE_NSAPPTR}
-
-// RFC 2065 (DNS security)
- DNS_TYPE_SIG = $0018; // 24
- {$EXTERNALSYM DNS_TYPE_SIG}
- DNS_TYPE_KEY = $0019; // 25
- {$EXTERNALSYM DNS_TYPE_KEY}
-
-// RFC 1664 (X.400 mail)
- DNS_TYPE_PX = $001a; // 26
- {$EXTERNALSYM DNS_TYPE_PX}
-
-// RFC 1712 (Geographic position)
- DNS_TYPE_GPOS = $001b; // 27
- {$EXTERNALSYM DNS_TYPE_GPOS}
-
-// RFC 1886 (IPv6 Address)
- DNS_TYPE_AAAA = $001c; // 28
- {$EXTERNALSYM DNS_TYPE_AAAA}
-
-// RFC 1876 (Geographic location)
- DNS_TYPE_LOC = $001d; // 29
- {$EXTERNALSYM DNS_TYPE_LOC}
-
-// RFC 2065 (Secure negative response)
- DNS_TYPE_NXT = $001e; // 30
- {$EXTERNALSYM DNS_TYPE_NXT}
-
-// Patton (Endpoint Identifier)
- DNS_TYPE_EID = $001f; // 31
- {$EXTERNALSYM DNS_TYPE_EID}
-
-// Patton (Nimrod Locator)
- DNS_TYPE_NIMLOC = $0020; // 32
- {$EXTERNALSYM DNS_TYPE_NIMLOC}
-
-// RFC 2052 (Service location)
- DNS_TYPE_SRV = $0021; // 33
- {$EXTERNALSYM DNS_TYPE_SRV}
-
-// ATM Standard something-or-another (ATM Address)
- DNS_TYPE_ATMA = $0022; // 34
- {$EXTERNALSYM DNS_TYPE_ATMA}
-
-// RFC 2168 (Naming Authority Pointer)
- DNS_TYPE_NAPTR = $0023; // 35
- {$EXTERNALSYM DNS_TYPE_NAPTR}
-
-// RFC 2230 (Key Exchanger)
- DNS_TYPE_KX = $0024; // 36
- {$EXTERNALSYM DNS_TYPE_KX}
-
-// RFC 2538 (CERT)
- DNS_TYPE_CERT = $0025; // 37
- {$EXTERNALSYM DNS_TYPE_CERT}
-
-// A6 Draft (A6)
- DNS_TYPE_A6 = $0026; // 38
- {$EXTERNALSYM DNS_TYPE_A6}
-
-// DNAME Draft (DNAME)
- DNS_TYPE_DNAME = $0027; // 39
- {$EXTERNALSYM DNS_TYPE_DNAME}
-
-// Eastlake (Kitchen Sink)
- DNS_TYPE_SINK = $0028; // 40
- {$EXTERNALSYM DNS_TYPE_SINK}
-
-// RFC 2671 (EDNS OPT)
- DNS_TYPE_OPT = $0029; // 41
- {$EXTERNALSYM DNS_TYPE_OPT}
-
-//
-// IANA Reserved
-//
-
- DNS_TYPE_UINFO = $0064; // 100
- {$EXTERNALSYM DNS_TYPE_UINFO}
- DNS_TYPE_UID = $0065; // 101
- {$EXTERNALSYM DNS_TYPE_UID}
- DNS_TYPE_GID = $0066; // 102
- {$EXTERNALSYM DNS_TYPE_GID}
- DNS_TYPE_UNSPEC = $0067; // 103
- {$EXTERNALSYM DNS_TYPE_UNSPEC}
-
-//
-// Query only types (1035, 1995)
-// - Crawford (ADDRS)
-// - TKEY draft (TKEY)
-// - TSIG draft (TSIG)
-// - RFC 1995 (IXFR)
-// - RFC 1035 (AXFR up)
-//
-
- DNS_TYPE_ADDRS = $00f8; // 248
- {$EXTERNALSYM DNS_TYPE_ADDRS}
- DNS_TYPE_TKEY = $00f9; // 249
- {$EXTERNALSYM DNS_TYPE_TKEY}
- DNS_TYPE_TSIG = $00fa; // 250
- {$EXTERNALSYM DNS_TYPE_TSIG}
- DNS_TYPE_IXFR = $00fb; // 251
- {$EXTERNALSYM DNS_TYPE_IXFR}
- DNS_TYPE_AXFR = $00fc; // 252
- {$EXTERNALSYM DNS_TYPE_AXFR}
- DNS_TYPE_MAILB = $00fd; // 253
- {$EXTERNALSYM DNS_TYPE_MAILB}
- DNS_TYPE_MAILA = $00fe; // 254
- {$EXTERNALSYM DNS_TYPE_MAILA}
- DNS_TYPE_ALL = $00ff; // 255
- {$EXTERNALSYM DNS_TYPE_ALL}
- DNS_TYPE_ANY = $00ff; // 255
- {$EXTERNALSYM DNS_TYPE_ANY}
-
-//
-// Temp Microsoft types -- use until get IANA approval for real type
-//
-
- DNS_TYPE_WINS = $ff01; // 64K - 255
- {$EXTERNALSYM DNS_TYPE_WINS}
- DNS_TYPE_WINSR = $ff02; // 64K - 254
- {$EXTERNALSYM DNS_TYPE_WINSR}
- DNS_TYPE_NBSTAT = DNS_TYPE_WINSR;
- {$EXTERNALSYM DNS_TYPE_NBSTAT}
-
-//
-// DNS Record Types -- Net Byte Order
-//
-
- DNS_RTYPE_A = $0100; // 1
- {$EXTERNALSYM DNS_RTYPE_A}
- DNS_RTYPE_NS = $0200; // 2
- {$EXTERNALSYM DNS_RTYPE_NS}
- DNS_RTYPE_MD = $0300; // 3
- {$EXTERNALSYM DNS_RTYPE_MD}
- DNS_RTYPE_MF = $0400; // 4
- {$EXTERNALSYM DNS_RTYPE_MF}
- DNS_RTYPE_CNAME = $0500; // 5
- {$EXTERNALSYM DNS_RTYPE_CNAME}
- DNS_RTYPE_SOA = $0600; // 6
- {$EXTERNALSYM DNS_RTYPE_SOA}
- DNS_RTYPE_MB = $0700; // 7
- {$EXTERNALSYM DNS_RTYPE_MB}
- DNS_RTYPE_MG = $0800; // 8
- {$EXTERNALSYM DNS_RTYPE_MG}
- DNS_RTYPE_MR = $0900; // 9
- {$EXTERNALSYM DNS_RTYPE_MR}
- DNS_RTYPE_NULL = $0a00; // 10
- {$EXTERNALSYM DNS_RTYPE_NULL}
- DNS_RTYPE_WKS = $0b00; // 11
- {$EXTERNALSYM DNS_RTYPE_WKS}
- DNS_RTYPE_PTR = $0c00; // 12
- {$EXTERNALSYM DNS_RTYPE_PTR}
- DNS_RTYPE_HINFO = $0d00; // 13
- {$EXTERNALSYM DNS_RTYPE_HINFO}
- DNS_RTYPE_MINFO = $0e00; // 14
- {$EXTERNALSYM DNS_RTYPE_MINFO}
- DNS_RTYPE_MX = $0f00; // 15
- {$EXTERNALSYM DNS_RTYPE_MX}
- DNS_RTYPE_TEXT = $1000; // 16
- {$EXTERNALSYM DNS_RTYPE_TEXT}
- DNS_RTYPE_RP = $1100; // 17
- {$EXTERNALSYM DNS_RTYPE_RP}
- DNS_RTYPE_AFSDB = $1200; // 18
- {$EXTERNALSYM DNS_RTYPE_AFSDB}
- DNS_RTYPE_X25 = $1300; // 19
- {$EXTERNALSYM DNS_RTYPE_X25}
- DNS_RTYPE_ISDN = $1400; // 20
- {$EXTERNALSYM DNS_RTYPE_ISDN}
- DNS_RTYPE_RT = $1500; // 21
- {$EXTERNALSYM DNS_RTYPE_RT}
- DNS_RTYPE_NSAP = $1600; // 22
- {$EXTERNALSYM DNS_RTYPE_NSAP}
- DNS_RTYPE_NSAPPTR = $1700; // 23
- {$EXTERNALSYM DNS_RTYPE_NSAPPTR}
- DNS_RTYPE_SIG = $1800; // 24
- {$EXTERNALSYM DNS_RTYPE_SIG}
- DNS_RTYPE_KEY = $1900; // 25
- {$EXTERNALSYM DNS_RTYPE_KEY}
- DNS_RTYPE_PX = $1a00; // 26
- {$EXTERNALSYM DNS_RTYPE_PX}
- DNS_RTYPE_GPOS = $1b00; // 27
- {$EXTERNALSYM DNS_RTYPE_GPOS}
- DNS_RTYPE_AAAA = $1c00; // 28
- {$EXTERNALSYM DNS_RTYPE_AAAA}
- DNS_RTYPE_LOC = $1d00; // 29
- {$EXTERNALSYM DNS_RTYPE_LOC}
- DNS_RTYPE_NXT = $1e00; // 30
- {$EXTERNALSYM DNS_RTYPE_NXT}
- DNS_RTYPE_EID = $1f00; // 31
- {$EXTERNALSYM DNS_RTYPE_EID}
- DNS_RTYPE_NIMLOC = $2000; // 32
- {$EXTERNALSYM DNS_RTYPE_NIMLOC}
- DNS_RTYPE_SRV = $2100; // 33
- {$EXTERNALSYM DNS_RTYPE_SRV}
- DNS_RTYPE_ATMA = $2200; // 34
- {$EXTERNALSYM DNS_RTYPE_ATMA}
- DNS_RTYPE_NAPTR = $2300; // 35
- {$EXTERNALSYM DNS_RTYPE_NAPTR}
- DNS_RTYPE_KX = $2400; // 36
- {$EXTERNALSYM DNS_RTYPE_KX}
- DNS_RTYPE_CERT = $2500; // 37
- {$EXTERNALSYM DNS_RTYPE_CERT}
- DNS_RTYPE_A6 = $2600; // 38
- {$EXTERNALSYM DNS_RTYPE_A6}
- DNS_RTYPE_DNAME = $2700; // 39
- {$EXTERNALSYM DNS_RTYPE_DNAME}
- DNS_RTYPE_SINK = $2800; // 40
- {$EXTERNALSYM DNS_RTYPE_SINK}
- DNS_RTYPE_OPT = $2900; // 41
- {$EXTERNALSYM DNS_RTYPE_OPT}
-
-//
-// IANA Reserved
-//
-
- DNS_RTYPE_UINFO = $6400; // 100
- {$EXTERNALSYM DNS_RTYPE_UINFO}
- DNS_RTYPE_UID = $6500; // 101
- {$EXTERNALSYM DNS_RTYPE_UID}
- DNS_RTYPE_GID = $6600; // 102
- {$EXTERNALSYM DNS_RTYPE_GID}
- DNS_RTYPE_UNSPEC = $6700; // 103
- {$EXTERNALSYM DNS_RTYPE_UNSPEC}
-
-//
-// Query only types
-//
-
- DNS_RTYPE_TKEY = $f900; // 249
- {$EXTERNALSYM DNS_RTYPE_TKEY}
- DNS_RTYPE_TSIG = $fa00; // 250
- {$EXTERNALSYM DNS_RTYPE_TSIG}
- DNS_RTYPE_IXFR = $fb00; // 251
- {$EXTERNALSYM DNS_RTYPE_IXFR}
- DNS_RTYPE_AXFR = $fc00; // 252
- {$EXTERNALSYM DNS_RTYPE_AXFR}
- DNS_RTYPE_MAILB = $fd00; // 253
- {$EXTERNALSYM DNS_RTYPE_MAILB}
- DNS_RTYPE_MAILA = $fe00; // 254
- {$EXTERNALSYM DNS_RTYPE_MAILA}
- DNS_RTYPE_ALL = $ff00; // 255
- {$EXTERNALSYM DNS_RTYPE_ALL}
- DNS_RTYPE_ANY = $ff00; // 255
- {$EXTERNALSYM DNS_RTYPE_ANY}
-
-//
-// Temp Microsoft types -- use until get IANA approval for real type
-//
-
- DNS_RTYPE_WINS = $01ff; // 64K - 255
- {$EXTERNALSYM DNS_RTYPE_WINS}
- DNS_RTYPE_WINSR = $02ff; // 64K - 254
- {$EXTERNALSYM DNS_RTYPE_WINSR}
-
-//
-// Record type specific definitions
-//
-
-//
-// ATMA (ATM address type) formats
-//
-// Define these directly for any environment (ex NT4)
-// without winsock2 ATM support (ws2atm.h)
-//
-
- DNS_ATMA_FORMAT_E164 = ATM_E164;
- {$EXTERNALSYM DNS_ATMA_FORMAT_E164}
- DNS_ATMA_FORMAT_AESA = ATM_AESA;
- {$EXTERNALSYM DNS_ATMA_FORMAT_AESA}
- DNS_ATMA_MAX_ADDR_LENGTH = ATM_ADDR_SIZE;
- {$EXTERNALSYM DNS_ATMA_MAX_ADDR_LENGTH}
-
- DNS_ATMA_AESA_ADDR_LENGTH = 20;
- {$EXTERNALSYM DNS_ATMA_AESA_ADDR_LENGTH}
- DNS_ATMA_MAX_RECORD_LENGTH = DNS_ATMA_MAX_ADDR_LENGTH + 1;
- {$EXTERNALSYM DNS_ATMA_MAX_RECORD_LENGTH}
-
-//
-// DNSSEC defs
-//
-
-// DNSSEC algorithms
-
- DNSSEC_ALGORITHM_RSAMD5 = 1;
- {$EXTERNALSYM DNSSEC_ALGORITHM_RSAMD5}
- DNSSEC_ALGORITHM_NULL = 253;
- {$EXTERNALSYM DNSSEC_ALGORITHM_NULL}
- DNSSEC_ALGORITHM_PRIVATE = 254;
- {$EXTERNALSYM DNSSEC_ALGORITHM_PRIVATE}
-
-// DNSSEC KEY protocol table
-
- DNSSEC_PROTOCOL_NONE = 0;
- {$EXTERNALSYM DNSSEC_PROTOCOL_NONE}
- DNSSEC_PROTOCOL_TLS = 1;
- {$EXTERNALSYM DNSSEC_PROTOCOL_TLS}
- DNSSEC_PROTOCOL_EMAIL = 2;
- {$EXTERNALSYM DNSSEC_PROTOCOL_EMAIL}
- DNSSEC_PROTOCOL_DNSSEC = 3;
- {$EXTERNALSYM DNSSEC_PROTOCOL_DNSSEC}
- DNSSEC_PROTOCOL_IPSEC = 4;
- {$EXTERNALSYM DNSSEC_PROTOCOL_IPSEC}
-
-// DNSSEC KEY flag field
-
- DNSSEC_KEY_FLAG_NOAUTH = $0001;
- {$EXTERNALSYM DNSSEC_KEY_FLAG_NOAUTH}
- DNSSEC_KEY_FLAG_NOCONF = $0002;
- {$EXTERNALSYM DNSSEC_KEY_FLAG_NOCONF}
- DNSSEC_KEY_FLAG_FLAG2 = $0004;
- {$EXTERNALSYM DNSSEC_KEY_FLAG_FLAG2}
- DNSSEC_KEY_FLAG_EXTEND = $0008;
- {$EXTERNALSYM DNSSEC_KEY_FLAG_EXTEND}
-{$DEFINE DNSSEC_KEY_FLAG_}
- DNSSEC_KEY_FLAG_FLAG4 = $0010;
- {$EXTERNALSYM DNSSEC_KEY_FLAG_FLAG4}
- DNSSEC_KEY_FLAG_FLAG5 = $0020;
- {$EXTERNALSYM DNSSEC_KEY_FLAG_FLAG5}
-
-// bits 6,7 are name type
-
- DNSSEC_KEY_FLAG_USER = $0000;
- {$EXTERNALSYM DNSSEC_KEY_FLAG_USER}
- DNSSEC_KEY_FLAG_ZONE = $0040;
- {$EXTERNALSYM DNSSEC_KEY_FLAG_ZONE}
- DNSSEC_KEY_FLAG_HOST = $0080;
- {$EXTERNALSYM DNSSEC_KEY_FLAG_HOST}
- DNSSEC_KEY_FLAG_NTPE3 = $00c0;
- {$EXTERNALSYM DNSSEC_KEY_FLAG_NTPE3}
-
-// bits 8-11 are reserved for future use
-
- DNSSEC_KEY_FLAG_FLAG8 = $0100;
- {$EXTERNALSYM DNSSEC_KEY_FLAG_FLAG8}
- DNSSEC_KEY_FLAG_FLAG9 = $0200;
- {$EXTERNALSYM DNSSEC_KEY_FLAG_FLAG9}
- DNSSEC_KEY_FLAG_FLAG10 = $0400;
- {$EXTERNALSYM DNSSEC_KEY_FLAG_FLAG10}
- DNSSEC_KEY_FLAG_FLAG11 = $0800;
- {$EXTERNALSYM DNSSEC_KEY_FLAG_FLAG11}
-
-// bits 12-15 are sig field
-
- DNSSEC_KEY_FLAG_SIG0 = $0000;
- {$EXTERNALSYM DNSSEC_KEY_FLAG_SIG0}
- DNSSEC_KEY_FLAG_SIG1 = $1000;
- {$EXTERNALSYM DNSSEC_KEY_FLAG_SIG1}
- DNSSEC_KEY_FLAG_SIG2 = $2000;
- {$EXTERNALSYM DNSSEC_KEY_FLAG_SIG2}
- DNSSEC_KEY_FLAG_SIG3 = $3000;
- {$EXTERNALSYM DNSSEC_KEY_FLAG_SIG3}
- DNSSEC_KEY_FLAG_SIG4 = $4000;
- {$EXTERNALSYM DNSSEC_KEY_FLAG_SIG4}
- DNSSEC_KEY_FLAG_SIG5 = $5000;
- {$EXTERNALSYM DNSSEC_KEY_FLAG_SIG5}
- DNSSEC_KEY_FLAG_SIG6 = $6000;
- {$EXTERNALSYM DNSSEC_KEY_FLAG_SIG6}
- DNSSEC_KEY_FLAG_SIG7 = $7000;
- {$EXTERNALSYM DNSSEC_KEY_FLAG_SIG7}
- DNSSEC_KEY_FLAG_SIG8 = $8000;
- {$EXTERNALSYM DNSSEC_KEY_FLAG_SIG8}
- DNSSEC_KEY_FLAG_SIG9 = $9000;
- {$EXTERNALSYM DNSSEC_KEY_FLAG_SIG9}
- DNSSEC_KEY_FLAG_SIG10 = $a000;
- {$EXTERNALSYM DNSSEC_KEY_FLAG_SIG10}
- DNSSEC_KEY_FLAG_SIG11 = $b000;
- {$EXTERNALSYM DNSSEC_KEY_FLAG_SIG11}
- DNSSEC_KEY_FLAG_SIG12 = $c000;
- {$EXTERNALSYM DNSSEC_KEY_FLAG_SIG12}
- DNSSEC_KEY_FLAG_SIG13 = $d000;
- {$EXTERNALSYM DNSSEC_KEY_FLAG_SIG13}
- DNSSEC_KEY_FLAG_SIG14 = $e000;
- {$EXTERNALSYM DNSSEC_KEY_FLAG_SIG14}
- DNSSEC_KEY_FLAG_SIG15 = $f000;
- {$EXTERNALSYM DNSSEC_KEY_FLAG_SIG15}
-
-//
-// TKEY modes
-//
-
- DNS_TKEY_MODE_SERVER_ASSIGN = 1;
- {$EXTERNALSYM DNS_TKEY_MODE_SERVER_ASSIGN}
- DNS_TKEY_MODE_DIFFIE_HELLMAN = 2;
- {$EXTERNALSYM DNS_TKEY_MODE_DIFFIE_HELLMAN}
- DNS_TKEY_MODE_GSS = 3;
- {$EXTERNALSYM DNS_TKEY_MODE_GSS}
- DNS_TKEY_MODE_RESOLVER_ASSIGN = 4;
- {$EXTERNALSYM DNS_TKEY_MODE_RESOLVER_ASSIGN}
-
-//
-// WINS + NBSTAT flag field
-//
-
- DNS_WINS_FLAG_SCOPE = DWORD($80000000);
- {$EXTERNALSYM DNS_WINS_FLAG_SCOPE}
- DNS_WINS_FLAG_LOCAL = $00010000;
- {$EXTERNALSYM DNS_WINS_FLAG_LOCAL}
-
-//
-// Helpful checks
-//
-
-function IS_WORD_ALIGNED(P: Pointer): BOOL;
-{$EXTERNALSYM IS_DWORD_ALIGNED}
-
-function IS_DWORD_ALIGNED(P: Pointer): BOOL;
-{$EXTERNALSYM IS_DWORD_ALIGNED}
-
-function IS_QWORD_ALIGNED(P: Pointer): BOOL;
-{$EXTERNALSYM IS_QWORD_ALIGNED}
-
-//
-// DNS config API
-//
-
-//
-// Types of DNS configuration info
-//
-
-type
- DNS_CONFIG_TYPE = (
- // In Win2K
- DnsConfigPrimaryDomainName_W,
- DnsConfigPrimaryDomainName_A,
- DnsConfigPrimaryDomainName_UTF8,
-
- // Not available yet
- DnsConfigAdapterDomainName_W,
- DnsConfigAdapterDomainName_A,
- DnsConfigAdapterDomainName_UTF8,
-
- // In Win2K
- DnsConfigDnsServerList,
-
- // Not available yet
- DnsConfigSearchList,
- DnsConfigAdapterInfo,
-
- // In Win2K
- DnsConfigPrimaryHostNameRegistrationEnabled,
- DnsConfigAdapterHostNameRegistrationEnabled,
- DnsConfigAddressRegistrationMaxCount,
-
- // In WindowsXP
- DnsConfigHostName_W,
- DnsConfigHostName_A,
- DnsConfigHostName_UTF8,
- DnsConfigFullHostName_W,
- DnsConfigFullHostName_A,
- DnsConfigFullHostName_UTF8);
- {$EXTERNALSYM DNS_CONFIG_TYPE}
- TDnsConfigType = DNS_CONFIG_TYPE;
-
-//
-// Config API flags
-//
-
-//
-// Causes config info to be allocated with LocalAlloc()
-//
-
-const
- DNS_CONFIG_FLAG_ALLOC = $00000001;
- {$EXTERNALSYM DNS_CONFIG_FLAG_ALLOC}
-
-function DnsQueryConfig(Config: DNS_CONFIG_TYPE; Flag: DWORD; pwsAdapterName: PWSTR; pReserved, pBuffer: PVOID; pBufferLength: PDWORD): DNS_STATUS; stdcall;
-{$EXTERNALSYM DnsQueryConfig}
-
-//
-// DNS resource record structure
-//
-
-//
-// Record data for specific types
-//
-
-type
- PDNS_A_DATA = ^DNS_A_DATA;
- {$EXTERNALSYM PDNS_A_DATA}
- DNS_A_DATA = record
- IpAddress: IP4_ADDRESS;
- end;
- {$EXTERNALSYM DNS_A_DATA}
- TDnsAData = DNS_A_DATA;
- PDnsAData = PDNS_A_DATA;
-
- PDNS_PTR_DATA = ^DNS_PTR_DATA;
- {$EXTERNALSYM PDNS_PTR_DATA}
- DNS_PTR_DATA = record
- pNameHost: LPTSTR;
- end;
- {$EXTERNALSYM DNS_PTR_DATA}
- TDnsPtrData = DNS_PTR_DATA;
- PDnsPtrData = PDNS_PTR_DATA;
-
- PDNS_SOA_DATA = ^DNS_SOA_DATA;
- {$EXTERNALSYM PDNS_SOA_DATA}
- DNS_SOA_DATA = record
- pNamePrimaryServer: LPTSTR;
- pNameAdministrator: LPTSTR;
- dwSerialNo: DWORD;
- dwRefresh: DWORD;
- dwRetry: DWORD;
- dwExpire: DWORD;
- dwDefaultTtl: DWORD;
- end;
- {$EXTERNALSYM DNS_SOA_DATA}
- TDnsSoaData = DNS_SOA_DATA;
- PDnsSoaData = PDNS_SOA_DATA;
-
- PDNS_MINFO_DATA = ^DNS_MINFO_DATA;
- {$EXTERNALSYM PDNS_MINFO_DATA}
- DNS_MINFO_DATA = record
- pNameMailbox: LPTSTR;
- pNameErrorsMailbox: LPTSTR;
- end;
- {$EXTERNALSYM DNS_MINFO_DATA}
- TDnsMinfoData = DNS_MINFO_DATA;
- PDnsMinfoData = PDNS_MINFO_DATA;
-
- PDNS_MX_DATA = ^DNS_MX_DATA;
- {$EXTERNALSYM PDNS_MX_DATA}
- DNS_MX_DATA = record
- pNameExchange: LPTSTR;
- wPreference: WORD;
- Pad: WORD; // keep ptrs DWORD aligned
- end;
- {$EXTERNALSYM DNS_MX_DATA}
- TDnsMxData = DNS_MX_DATA;
- PDnsMxData = PDNS_MX_DATA;
-
- PDNS_TXT_DATA = ^DNS_TXT_DATA;
- {$EXTERNALSYM PDNS_TXT_DATA}
- DNS_TXT_DATA = record
- dwStringCount: DWORD;
- pStringArray: array [0..0] of LPTSTR;
- end;
- {$EXTERNALSYM DNS_TXT_DATA}
- TDnsTxtData = DNS_TXT_DATA;
- PDnsTxtData = PDNS_TXT_DATA;
-
- PDNS_NULL_DATA = ^DNS_NULL_DATA;
- {$EXTERNALSYM PDNS_NULL_DATA}
- DNS_NULL_DATA = record
- dwByteCount: DWORD;
- Data: array [0..0] of BYTE;
- end;
- {$EXTERNALSYM DNS_NULL_DATA}
- TDnsNullData = DNS_NULL_DATA;
- PDnsNullData = PDNS_NULL_DATA;
-
- PDNS_WKS_DATA = ^DNS_WKS_DATA;
- {$EXTERNALSYM PDNS_WKS_DATA}
- DNS_WKS_DATA = record
- IpAddress: IP4_ADDRESS;
- chProtocol: UCHAR;
- BitMask: array [0..0] of BYTE;
- end;
- {$EXTERNALSYM DNS_WKS_DATA}
- TDnsWksData = DNS_WKS_DATA;
- PDnsWksData = PDNS_WKS_DATA;
-
- PDNS_AAAA_DATA = ^DNS_AAAA_DATA;
- {$EXTERNALSYM PDNS_AAAA_DATA}
- DNS_AAAA_DATA = record
- Ip6Address: DNS_IP6_ADDRESS;
- end;
- {$EXTERNALSYM DNS_AAAA_DATA}
- TDnsAaaaData = DNS_AAAA_DATA;
- PDnsAaaaData = PDNS_AAAA_DATA;
-
- PDNS_SIG_DATA = ^DNS_SIG_DATA;
- {$EXTERNALSYM PDNS_SIG_DATA}
- DNS_SIG_DATA = record
- pNameSigner: LPTSTR;
- wTypeCovered: WORD;
- chAlgorithm: BYTE;
- chLabelCount: BYTE;
- dwOriginalTtl: DWORD;
- dwExpiration: DWORD;
- dwTimeSigned: DWORD;
- wKeyTag: WORD;
- Pad: WORD; // keep byte field aligned
- Signature: array [0..0] of BYTE;
- end;
- {$EXTERNALSYM DNS_SIG_DATA}
- TDnsSigData = DNS_SIG_DATA;
- PDnsSigData = PDNS_SIG_DATA;
-
- PDNS_KEY_DATA = ^DNS_KEY_DATA;
- {$EXTERNALSYM PDNS_KEY_DATA}
- DNS_KEY_DATA = record
- wFlags: WORD;
- chProtocol: BYTE;
- chAlgorithm: BYTE;
- Key: array [0..1 - 1] of BYTE;
- end;
- {$EXTERNALSYM DNS_KEY_DATA}
- TDnsKeyData = DNS_KEY_DATA;
- PDnsKeyData = PDNS_KEY_DATA;
-
- PDNS_LOC_DATA = ^DNS_LOC_DATA;
- {$EXTERNALSYM PDNS_LOC_DATA}
- DNS_LOC_DATA = record
- wVersion: WORD;
- wSize: WORD;
- wHorPrec: WORD;
- wVerPrec: WORD;
- dwLatitude: DWORD;
- dwLongitude: DWORD;
- dwAltitude: DWORD;
- end;
- {$EXTERNALSYM DNS_LOC_DATA}
- TDnsLocData = DNS_LOC_DATA;
- PDnsLocData = PDNS_LOC_DATA;
-
- PDNS_NXT_DATA = ^DNS_NXT_DATA;
- {$EXTERNALSYM PDNS_NXT_DATA}
- DNS_NXT_DATA = record
- pNameNext: LPTSTR;
- wNumTypes: WORD;
- wTypes: array [0..0] of WORD;
- end;
- {$EXTERNALSYM DNS_NXT_DATA}
- TDnsNxtData = DNS_NXT_DATA;
- PDnsNxtData = PDNS_NXT_DATA;
-
- PDNS_SRV_DATA = ^DNS_SRV_DATA;
- {$EXTERNALSYM PDNS_SRV_DATA}
- DNS_SRV_DATA = record
- pNameTarget: LPTSTR;
- wPriority: WORD;
- wWeight: WORD;
- wPort: WORD;
- Pad: WORD; // keep ptrs DWORD aligned
- end;
- {$EXTERNALSYM DNS_SRV_DATA}
- TDnsSrvData = DNS_SRV_DATA;
- PDnsSrvData = PDNS_SRV_DATA;
-
- PDNS_ATMA_DATA = ^DNS_ATMA_DATA;
- {$EXTERNALSYM PDNS_ATMA_DATA}
- DNS_ATMA_DATA = record
- AddressType: BYTE;
- Address: array [0..DNS_ATMA_MAX_ADDR_LENGTH - 1] of BYTE;
- // E164 -- Null terminated string of less than
- // DNS_ATMA_MAX_ADDR_LENGTH
- //
- // For NSAP (AESA) BCD encoding of exactly
- // DNS_ATMA_AESA_ADDR_LENGTH
- end;
- {$EXTERNALSYM DNS_ATMA_DATA}
- TDnsAtmaData = DNS_ATMA_DATA;
- PDnsAtmaData = PDNS_ATMA_DATA;
-
- PDNS_TKEY_DATA = ^DNS_TKEY_DATA;
- {$EXTERNALSYM PDNS_TKEY_DATA}
- DNS_TKEY_DATA = record
- pNameAlgorithm: LPTSTR;
- pAlgorithmPacket: PBYTE;
- pKey: PBYTE;
- pOtherData: PBYTE;
- dwCreateTime: DWORD;
- dwExpireTime: DWORD;
- wMode: WORD;
- wError: WORD;
- wKeyLength: WORD;
- wOtherLength: WORD;
- cAlgNameLength: UCHAR;
- bPacketPointers: BOOL;
- end;
- {$EXTERNALSYM DNS_TKEY_DATA}
- TDnsTkeyData = DNS_TKEY_DATA;
- PDnsTkeyData = PDNS_TKEY_DATA;
-
- PDNS_TSIG_DATA = ^DNS_TSIG_DATA;
- {$EXTERNALSYM PDNS_TSIG_DATA}
- DNS_TSIG_DATA = record
- pNameAlgorithm: LPTSTR;
- pAlgorithmPacket: PBYTE;
- pSignature: PBYTE;
- pOtherData: PBYTE;
- i64CreateTime: LONGLONG;
- wFudgeTime: WORD;
- wOriginalXid: WORD;
- wError: WORD;
- wSigLength: WORD;
- wOtherLength: WORD;
- cAlgNameLength: UCHAR;
- bPacketPointers: BOOL;
- end;
- {$EXTERNALSYM DNS_TSIG_DATA}
- TDnsTsigData = DNS_TSIG_DATA;
- PDnsTsigData = PDNS_TSIG_DATA;
-
-//
-// MS only types -- only hit the wire in MS-MS zone transfer
-//
-
- PDNS_WINS_DATA = ^DNS_WINS_DATA;
- {$EXTERNALSYM PDNS_WINS_DATA}
- DNS_WINS_DATA = record
- dwMappingFlag: DWORD;
- dwLookupTimeout: DWORD;
- dwCacheTimeout: DWORD;
- cWinsServerCount: DWORD;
- WinsServers: array [0..0] of IP4_ADDRESS;
- end;
- {$EXTERNALSYM DNS_WINS_DATA}
- TDnsWinsData = DNS_WINS_DATA;
- PDnsWinsData = PDNS_WINS_DATA;
-
- PDNS_WINSR_DATA = ^DNS_WINSR_DATA;
- {$EXTERNALSYM PDNS_WINSR_DATA}
- DNS_WINSR_DATA = record
- dwMappingFlag: DWORD;
- dwLookupTimeout: DWORD;
- dwCacheTimeout: DWORD;
- pNameResultDomain: LPTSTR;
- end;
- {$EXTERNALSYM DNS_WINSR_DATA}
- TDnsWinsrData = DNS_WINSR_DATA;
- PDnsWinsrData = PDNS_WINSR_DATA;
-
-//
-// Length of non-fixed-length data types
-//
-
-function DNS_TEXT_RECORD_LENGTH(StringCount: Integer): Integer;
-{$EXTERNALSYM DNS_TEXT_RECORD_LENGTH}
-
-function DNS_NULL_RECORD_LENGTH(ByteCount: Integer): Integer;
-{$EXTERNALSYM DNS_NULL_RECORD_LENGTH}
-
-function DNS_WKS_RECORD_LENGTH(ByteCount: Integer): Integer;
-{$EXTERNALSYM DNS_WKS_RECORD_LENGTH}
-
-//function DNS_WINS_RECORD_LENGTH(IpCount: Integer): Integer;
-//{$EXTERNALSYM DNS_WINS_RECORD_LENGTH}
-
-//
-// Record flags
-//
-
-type
- _DnsRecordFlags = record
- //DWORD Section : 2;
- //DWORD Delete : 1;
- //DWORD CharSet : 2;
- //DWORD Unused : 3;
- //DWORD Reserved : 24;
- Flags: DWORD;
- end;
- {$EXTERNALSYM _DnsRecordFlags}
- DNS_RECORD_FLAGS = _DnsRecordFlags;
- {$EXTERNALSYM DNS_RECORD_FLAGS}
- TDnsRecordFlags = DNS_RECORD_FLAGS;
- PDnsRecordFlags = ^DNS_RECORD_FLAGS;
-
-//
-// Wire Record Sections
-//
-// Useable both in record flags "Section" and as index into
-// wire message header section counts.
-//
-
- _DnsSection = (
- DnsSectionQuestion,
- DnsSectionAnswer,
- DnsSectionAuthority,
- DnsSectionAddtional);
- {$EXTERNALSYM _DnsSection}
- DNS_SECTION = _DnsSection;
- TDnsSection = _DnsSection;
-
-// Update message section names
-
-const
- DnsSectionZone = DnsSectionQuestion;
- {$EXTERNALSYM DnsSectionZone}
- DnsSectionPrereq = DnsSectionAnswer;
- {$EXTERNALSYM DnsSectionPrereq}
- DnsSectionUpdate = DnsSectionAuthority;
- {$EXTERNALSYM DnsSectionUpdate}
-
-//
-// Record flags as bit flags
-// These may be or'd together to set the fields
-//
-
-// RR Section in packet
-
- DNSREC_SECTION = $00000003;
- {$EXTERNALSYM DNSREC_SECTION}
-
- DNSREC_QUESTION = $00000000;
- {$EXTERNALSYM DNSREC_QUESTION}
- DNSREC_ANSWER = $00000001;
- {$EXTERNALSYM DNSREC_ANSWER}
- DNSREC_AUTHORITY = $00000002;
- {$EXTERNALSYM DNSREC_AUTHORITY}
- DNSREC_ADDITIONAL = $00000003;
- {$EXTERNALSYM DNSREC_ADDITIONAL}
-
-// RR Section in packet (update)
-
- DNSREC_ZONE = $00000000;
- {$EXTERNALSYM DNSREC_ZONE}
- DNSREC_PREREQ = $00000001;
- {$EXTERNALSYM DNSREC_PREREQ}
- DNSREC_UPDATE = $00000002;
- {$EXTERNALSYM DNSREC_UPDATE}
-
-// Delete RR (update) or No-exist (prerequisite)
-
- DNSREC_DELETE = $00000004;
- {$EXTERNALSYM DNSREC_DELETE}
- DNSREC_NOEXIST = $00000004;
- {$EXTERNALSYM DNSREC_NOEXIST}
-
-//
-// Record \ RR set structure
-//
-// Note: The dwReserved flag serves to insure that the substructures
-// start on 64-bit boundaries. Do NOT pack this structure, as the
-// substructures may contain pointers or int64 values which are
-// properly aligned unpacked.
-//
-
-type
- PDNS_RECORD = ^DNS_RECORD;
- {$EXTERNALSYM PDNS_RECORD}
- _DnsRecord = record
- pNext: PDNS_RECORD;
- pName: LPTSTR;
- wType: WORD;
- wDataLength: WORD; // Not referenced for DNS record types defined above.
- Flags: record
- case Integer of
- 0: (DW: DWORD); // flags as DWORD
- 1: (S: DNS_RECORD_FLAGS); // flags as structure
- end;
- dwTtl: DWORD;
- dwReserved: DWORD;
-
- // Record Data
-
- Data: record
- case Integer of
- 0: (A: DNS_A_DATA);
- 1: (SOA, Soa_: DNS_SOA_DATA);
- 2: (PTR, Ptr_,
- NS, Ns_,
- CNAME, Cname_,
- MB, Mb_,
- MD, Md_,
- MF, Mf_,
- MG, Mg_,
- MR, Mr_: DNS_PTR_DATA);
- 3: (MINFO, Minfo_,
- RP, Rp_: DNS_MINFO_DATA);
- 4: (MX, Mx_,
- AFSDB, Afsdb_,
- RT, Rt_: DNS_MX_DATA);
- 5: (HINFO, Hinfo_,
- ISDN, Isdn_,
- TXT, Txt_,
- X25: DNS_TXT_DATA);
- 6: (Null: DNS_NULL_DATA);
- 7: (WKS, Wks_: DNS_WKS_DATA);
- 8: (AAAA: DNS_AAAA_DATA);
- 9: (KEY, Key_: DNS_KEY_DATA);
- 10: (SIG, Sig_: DNS_SIG_DATA);
- 11: (ATMA, Atma_: DNS_ATMA_DATA);
- 12: (NXT, Nxt_: DNS_NXT_DATA);
- 13: (SRV, Srv_: DNS_SRV_DATA);
- 14: (TKEY, Tkey_: DNS_TKEY_DATA);
- 15: (TSIG, Tsig_: DNS_TSIG_DATA);
- 16: (WINS, Wins_: DNS_WINS_DATA);
- 17: (WINSR, WinsR_, NBSTAT, Nbstat_: DNS_WINSR_DATA);
- end;
- end;
- {$EXTERNALSYM _DnsRecord}
- DNS_RECORD = _DnsRecord;
- {$EXTERNALSYM DNS_RECORD}
- PPDNS_RECORD = ^PDNS_RECORD;
- {$NODEFINE PPDNS_RECORD}
- TDnsRecord = DNS_RECORD;
- PDnsRecord = PDNS_RECORD;
-
-//
-// Header or fixed size of DNS_RECORD
-//
-
-const
- DNS_RECORD_FIXED_SIZE = 24; // FIELD_OFFSET( DNS_RECORD, Data )
- {$EXTERNALSYM DNS_RECORD_FIXED_SIZE}
- SIZEOF_DNS_RECORD_HEADER = DNS_RECORD_FIXED_SIZE;
- {$EXTERNALSYM SIZEOF_DNS_RECORD_HEADER}
-
-//
-// Resource record set building
-//
-// pFirst points to first record in list.
-// pLast points to last record in list.
-//
-
-type
- PDnsRRSet = ^DnsRRSet;
- {$EXTERNALSYM PDnsRRSet}
- _DnsRRSet = record
- pFirstRR: PDNS_RECORD;
- pLastRR: PDNS_RECORD;
- end;
- {$EXTERNALSYM _DnsRRSet}
- DnsRRSet = _DnsRRSet;
- {$EXTERNALSYM DnsRRSet}
- TDnsrrset = DnsRRSet;
-
-//
-// To init pFirst is NULL.
-// But pLast points at the location of the pFirst pointer -- essentially
-// treating the pFirst ptr as a DNS_RECORD. (It is a DNS_RECORD with
-// only a pNext field, but that's the only part we use.)
-//
-// Then when the first record is added to the list, the pNext field of
-// this dummy record (which corresponds to pFirst's value) is set to
-// point at the first record. So pFirst then properly points at the
-// first record.
-//
-// (This works only because pNext is the first field in a
-// DNS_RECORD structure and hence casting a PDNS_RECORD ptr to
-// PDNS_RECORD* and dereferencing yields its pNext field)
-//
-// Use TERMINATE when have built RR set by grabbing records out of
-// existing set. This makes sure that at the end, the last RR is
-// properly NULL terminated.
-//
-
-procedure DNS_RRSET_INIT(rrset: PDnsRRSet);
-{$EXTERNALSYM DNS_RRSET_INIT}
-
-//procedure DNS_RRSET_ADD(rrset, pnewRR: PDNS_RRSET);
-//{$EXTERNALSYM DNS_RRSET_ADD}
-
-procedure DNS_RRSET_TERMINATE(rrset: PDnsRRSet);
-{$EXTERNALSYM DNS_RRSET_TERMINATE}
-
-//
-// Record set manipulation
-//
-
-//
-// Record Copy
-// Record copy functions also do conversion between character sets.
-//
-// Note, it might be advisable to directly expose non-Ex copy
-// functions _W, _A for record and set, to avoid exposing the
-// conversion enum.
-//
-
-type
- _DNS_CHARSET = (
- DnsCharSetUnknown,
- DnsCharSetUnicode,
- DnsCharSetUtf8,
- DnsCharSetAnsi);
- {$EXTERNALSYM _DNS_CHARSET}
- DNS_CHARSET = _DNS_CHARSET;
- {$EXTERNALSYM DNS_CHARSET}
- TDnsCharSet = DNS_CHARSET;
- PDnsCharSet = ^DNS_CHARSET;
-
-function DnsRecordCopyEx(pRecord: PDNS_RECORD; CharSetIn: DNS_CHARSET; CharSetOut: DNS_CHARSET): PDNS_RECORD; stdcall;
-{$EXTERNALSYM DnsRecordCopyEx}
-
-function DnsRecordSetCopyEx(pRecordSet: PDNS_RECORD; CharSetIn: DNS_CHARSET; CharSetOut: DNS_CHARSET): PDNS_RECORD; stdcall;
-{$EXTERNALSYM DnsRecordSetCopyEx}
-
-function DnsRecordCopy(pRR: PDNS_RECORD): PDNS_RECORD;
-{$EXTERNALSYM DnsRecordCopy}
-
-function DnsRecordSetCopy(pRR: PDNS_RECORD): PDNS_RECORD;
-{$EXTERNALSYM DnsRecordSetCopy}
-
-//
-// Record Compare
-//
-// Note: these routines only compare records of the SAME character set.
-// (ANSI, unicode or UTF8). Furthermore the routines assume the character
-// set is indicated within the record. If compare of user created, rather
-// than DNS API created record lists is desired, then caller should use
-// DnsRecordCopy API and compare copies.
-//
-
-function DnsRecordCompare(pRecord1: PDNS_RECORD; pRecord2: PDNS_RECORD): BOOL; stdcall;
-{$EXTERNALSYM DnsRecordCompare}
-
-function DnsRecordSetCompare(pRR1: PDNS_RECORD; pRR2: PDNS_RECORD; var ppDiff1, ppDiff2: PDNS_RECORD): BOOL; stdcall;
-{$EXTERNALSYM DnsRecordSetCompare}
-
-//
-// Detach next record set from record list
-//
-
-function DnsRecordSetDetach(pRecordList: PDNS_RECORD): PDNS_RECORD; stdcall;
-{$EXTERNALSYM DnsRecordSetDetach}
-
-//
-// Free record list
-//
-// Only supported free is deep free of entire record list with LocalFree().
-// This correctly frees record list returned by DnsQuery() or DnsRecordSetCopy()
-//
-
-type
- DNS_FREE_TYPE = (DnsFreeFlat, DnsFreeRecordList);
- {$EXTERNALSYM DNS_FREE_TYPE}
- TDnsFreeType = DNS_FREE_TYPE;
-
-procedure DnsFreeRecordListDeep(pRecordList: PDNS_RECORD; FreeType: DNS_FREE_TYPE); stdcall;
-{$EXTERNALSYM DnsFreeRecordListDeep}
-
-procedure DnsRecordListFree(pRecordList: PDNS_RECORD; FreeType: DNS_FREE_TYPE); stdcall;
-{$EXTERNALSYM DnsRecordListFree}
-
-procedure DnsFree(pData: PVOID; FreeType: DNS_FREE_TYPE); stdcall;
-{$EXTERNALSYM DnsFree}
-
-//
-// DNS Query API
-//
-
-//
-// Options for DnsQuery
-//
-
-const
- DNS_QUERY_STANDARD = $00000000;
- {$EXTERNALSYM DNS_QUERY_STANDARD}
- DNS_QUERY_ACCEPT_TRUNCATED_RESPONSE = $00000001;
- {$EXTERNALSYM DNS_QUERY_ACCEPT_TRUNCATED_RESPONSE}
- DNS_QUERY_USE_TCP_ONLY = $00000002;
- {$EXTERNALSYM DNS_QUERY_USE_TCP_ONLY}
- DNS_QUERY_NO_RECURSION = $00000004;
- {$EXTERNALSYM DNS_QUERY_NO_RECURSION}
- DNS_QUERY_BYPASS_CACHE = $00000008;
- {$EXTERNALSYM DNS_QUERY_BYPASS_CACHE}
-
- DNS_QUERY_NO_WIRE_QUERY = $00000010;
- {$EXTERNALSYM DNS_QUERY_NO_WIRE_QUERY}
- DNS_QUERY_NO_LOCAL_NAME = $00000020;
- {$EXTERNALSYM DNS_QUERY_NO_LOCAL_NAME}
- DNS_QUERY_NO_HOSTS_FILE = $00000040;
- {$EXTERNALSYM DNS_QUERY_NO_HOSTS_FILE}
- DNS_QUERY_NO_NETBT = $00000080;
- {$EXTERNALSYM DNS_QUERY_NO_NETBT}
-
- DNS_QUERY_WIRE_ONLY = $00000100;
- {$EXTERNALSYM DNS_QUERY_WIRE_ONLY}
- DNS_QUERY_RETURN_MESSAGE = $00000200;
- {$EXTERNALSYM DNS_QUERY_RETURN_MESSAGE}
-
- DNS_QUERY_TREAT_AS_FQDN = $00001000;
- {$EXTERNALSYM DNS_QUERY_TREAT_AS_FQDN}
- DNS_QUERY_DONT_RESET_TTL_VALUES = $00100000;
- {$EXTERNALSYM DNS_QUERY_DONT_RESET_TTL_VALUES}
- DNS_QUERY_RESERVED = DWORD($ff000000);
- {$EXTERNALSYM DNS_QUERY_RESERVED}
-
-// Backward compatibility with Win2K
-// Do not use
-
- DNS_QUERY_CACHE_ONLY = DNS_QUERY_NO_WIRE_QUERY;
- {$EXTERNALSYM DNS_QUERY_CACHE_ONLY}
-
-function DnsQuery_A(pszName: PCSTR; wType: WORD; Options: DWORD; aipServers: PIP4_ARRAY; ppQueryResults: PPDNS_RECORD; pReserved: PPVOID): DNS_STATUS; stdcall;
-{$EXTERNALSYM DnsQuery_A}
-
-function DnsQuery_UTF8(pszName: PCSTR; wType: WORD; Options: DWORD; aipServers: PIP4_ARRAY; ppQueryResults: PPDNS_RECORD; pReserved: PPVOID): DNS_STATUS; stdcall;
-{$EXTERNALSYM DnsQuery_UTF8}
-
-function DnsQuery_W(pszName: LPCWSTR; wType: WORD; Options: DWORD; aipServers: PIP4_ARRAY; ppQueryResults: PPDNS_RECORD; pReserved: PPVOID): DNS_STATUS; stdcall;
-{$EXTERNALSYM DnsQuery_W}
-
-function DnsQuery(pszName: LPCTSTR; wType: WORD; Options: DWORD; aipServers: PIP4_ARRAY; ppQueryResults: PPDNS_RECORD; pReserved: PPVOID): DNS_STATUS; stdcall;
-{$EXTERNALSYM DnsQuery}
-
-//
-// DNS Update API
-//
-// DnsAcquireContextHandle
-// DnsReleaseContextHandle
-// DnsModifyRecordsInSet
-// DnsReplaceRecordSet
-//
-
-//
-// Update flags
-//
-
-const
- DNS_UPDATE_SECURITY_USE_DEFAULT = $00000000;
- {$EXTERNALSYM DNS_UPDATE_SECURITY_USE_DEFAULT}
- DNS_UPDATE_SECURITY_OFF = $00000010;
- {$EXTERNALSYM DNS_UPDATE_SECURITY_OFF}
- DNS_UPDATE_SECURITY_ON = $00000020;
- {$EXTERNALSYM DNS_UPDATE_SECURITY_ON}
- DNS_UPDATE_SECURITY_ONLY = $00000100;
- {$EXTERNALSYM DNS_UPDATE_SECURITY_ONLY}
- DNS_UPDATE_CACHE_SECURITY_CONTEXT = $00000200;
- {$EXTERNALSYM DNS_UPDATE_CACHE_SECURITY_CONTEXT}
- DNS_UPDATE_TEST_USE_LOCAL_SYS_ACCT = $00000400;
- {$EXTERNALSYM DNS_UPDATE_TEST_USE_LOCAL_SYS_ACCT}
- DNS_UPDATE_FORCE_SECURITY_NEGO = $00000800;
- {$EXTERNALSYM DNS_UPDATE_FORCE_SECURITY_NEGO}
- DNS_UPDATE_TRY_ALL_MASTER_SERVERS = $00001000;
- {$EXTERNALSYM DNS_UPDATE_TRY_ALL_MASTER_SERVERS}
- DNS_UPDATE_SKIP_NO_UPDATE_ADAPTERS = $00002000;
- {$EXTERNALSYM DNS_UPDATE_SKIP_NO_UPDATE_ADAPTERS}
- DNS_UPDATE_RESERVED = DWORD($ffff0000);
- {$EXTERNALSYM DNS_UPDATE_RESERVED}
-
-//
-// Note: pCredentials paramater is currently respectively
-// PSEC_WINNT_AUTH_IDENTITY_W or PSEC_WINNT_AUTH_IDENTITY_A.
-// Using PVOID to obviate the need for including rpcdce.h
-// in order to include this file and to leave open the
-// possibility of alternative credential specifications in
-// the future.
-//
-
-function DnsAcquireContextHandle_W(CredentialFlags: DWORD; pCredentials: PVOID; pContextHandle: PHANDLE): DNS_STATUS; stdcall;
-{$EXTERNALSYM DnsAcquireContextHandle_W}
-
-function DnsAcquireContextHandle_A(CredentialFlags: DWORD; pCredentials: PVOID; pContextHandle: PHANDLE): DNS_STATUS; stdcall;
-{$EXTERNALSYM DnsAcquireContextHandle_A}
-
-function DnsAcquireContextHandle(CredentialFlags: DWORD; pCredentials: PVOID; pContextHandle: PHANDLE): DNS_STATUS; stdcall;
-{$EXTERNALSYM DnsAcquireContextHandle}
-
-procedure DnsReleaseContextHandle(hContext: HANDLE); stdcall;
-{$EXTERNALSYM DnsReleaseContextHandle}
-
-//
-// Dynamic Update API
-//
-
-function DnsModifyRecordsInSet_W(pAddRecords: PDNS_RECORD; pDeleteRecords: PDNS_RECORD; Options: DWORD; hContext: HANDLE; pServerList: PIP4_ARRAY; pReserved: PVOID): DNS_STATUS; stdcall;
-{$EXTERNALSYM DnsModifyRecordsInSet_W}
-
-function DnsModifyRecordsInSet_A(pAddRecords: PDNS_RECORD; pDeleteRecords: PDNS_RECORD; Options: DWORD; hContext: HANDLE; pServerList: PIP4_ARRAY; pReserved: PVOID): DNS_STATUS; stdcall;
-{$EXTERNALSYM DnsModifyRecordsInSet_A}
-
-function DnsModifyRecordsInSet_UTF8(pAddRecords: PDNS_RECORD; pDeleteRecords: PDNS_RECORD; Options: DWORD; hContext: HANDLE; pServerList: PIP4_ARRAY; pReserved: PVOID): DNS_STATUS; stdcall;
-{$EXTERNALSYM DnsModifyRecordsInSet_UTF8}
-
-function DnsModifyRecordsInSet(pAddRecords: PDNS_RECORD; pDeleteRecords: PDNS_RECORD; Options: DWORD; hContext: HANDLE; pServerList: PIP4_ARRAY; pReserved: PVOID): DNS_STATUS; stdcall;
-{$EXTERNALSYM DnsModifyRecordsInSet}
-
-function DnsReplaceRecordSetW(pNewSet: PDNS_RECORD; Options: DWORD; hContext: HANDLE; pServerList: PIP4_ARRAY; pReserved: PVOID): DNS_STATUS; stdcall;
-{$EXTERNALSYM DnsReplaceRecordSetW}
-
-function DnsReplaceRecordSetA(pNewSet: PDNS_RECORD; Options: DWORD; hContext: HANDLE; pServerList: PIP4_ARRAY; pReserved: PVOID): DNS_STATUS; stdcall;
-{$EXTERNALSYM DnsReplaceRecordSetA}
-
-function DnsReplaceRecordSetUTF8(pNewSet: PDNS_RECORD; Options: DWORD; hContext: HANDLE; pServerList: PIP4_ARRAY; pReserved: PVOID): DNS_STATUS; stdcall;
-{$EXTERNALSYM DnsReplaceRecordSetUTF8}
-
-function DnsReplaceRecordSet(pNewSet: PDNS_RECORD; Options: DWORD; hContext: HANDLE; pServerList: PIP4_ARRAY; pReserved: PVOID): DNS_STATUS; stdcall;
-{$EXTERNALSYM DnsReplaceRecordSet}
-
-//
-// DNS name validation
-//
-
-type
- _DNS_NAME_FORMAT = (
- DnsNameDomain,
- DnsNameDomainLabel,
- DnsNameHostnameFull,
- DnsNameHostnameLabel,
- DnsNameWildcard,
- DnsNameSrvRecord);
- {$EXTERNALSYM _DNS_NAME_FORMAT}
- DNS_NAME_FORMAT = _DNS_NAME_FORMAT;
- {$EXTERNALSYM DNS_NAME_FORMAT}
- TDnsNameFormat = DNS_NAME_FORMAT;
- PDnsNameFormat = ^DNS_NAME_FORMAT;
-
-function DnsValidateName_UTF8(pszName: LPCSTR; Format: DNS_NAME_FORMAT): DNS_STATUS; stdcall;
-{$EXTERNALSYM DnsValidateName_UTF8}
-
-function DnsValidateName_W(pwszName: LPCWSTR; Format: DNS_NAME_FORMAT): DNS_STATUS; stdcall;
-{$EXTERNALSYM DnsValidateName_W}
-
-function DnsValidateName_A(pszName: LPCSTR; Format: DNS_NAME_FORMAT): DNS_STATUS; stdcall;
-{$EXTERNALSYM DnsValidateName_A}
-
-function DnsValidateName(pszName: LPCTSTR; Format: DNS_NAME_FORMAT): DNS_STATUS;
-{$EXTERNALSYM DnsValidateName}
-
-//
-// DNS name comparison
-//
-
-function DnsNameCompare_A(pName1: LPSTR; pName2: LPSTR): BOOL; stdcall;
-{$EXTERNALSYM DnsNameCompare_A}
-
-function DnsNameCompare_W(pName1: LPWSTR; pName2: LPWSTR): BOOL; stdcall;
-{$EXTERNALSYM DnsNameCompare_W}
-
-function DnsNameCompare(pName1: LPTSTR; pName2: LPTSTR): BOOL; stdcall;
-{$EXTERNALSYM DnsNameCompare}
-
-//
-// DNS message "roll-your-own" routines
-//
-
-type
- PDNS_MESSAGE_BUFFER = ^DNS_MESSAGE_BUFFER;
- {$EXTERNALSYM PDNS_MESSAGE_BUFFER}
- _DNS_MESSAGE_BUFFER = record
- MessageHead: DNS_HEADER;
- MessageBody: array [0..0] of CHAR;
- end;
- {$EXTERNALSYM _DNS_MESSAGE_BUFFER}
- DNS_MESSAGE_BUFFER = _DNS_MESSAGE_BUFFER;
- {$EXTERNALSYM DNS_MESSAGE_BUFFER}
- TDnsMessageBuffer = DNS_MESSAGE_BUFFER;
- PDnsMessageBuffer = PDNS_MESSAGE_BUFFER;
-
-function DnsWriteQuestionToBuffer_W(pDnsBuffer: PDNS_MESSAGE_BUFFER; pdwBufferSize: LPDWORD; pszName: LPWSTR; wType: WORD; Xid: WORD; fRecursionDesired: BOOL): BOOL; stdcall;
-{$EXTERNALSYM DnsWriteQuestionToBuffer_W}
-
-function DnsWriteQuestionToBuffer_UTF8(pDnsBuffer: PDNS_MESSAGE_BUFFER; pdwBufferSize: LPDWORD; pszName: LPSTR; wType: WORD; Xid: WORD; fRecursionDesired: BOOL): BOOL; stdcall;
-{$EXTERNALSYM DnsWriteQuestionToBuffer_UTF8}
-
-function DnsExtractRecordsFromMessage_W(pDnsBuffer: PDNS_MESSAGE_BUFFER; wMessageLength: WORD; ppRecord: PPDNS_RECORD): DNS_STATUS; stdcall;
-{$EXTERNALSYM DnsExtractRecordsFromMessage_W}
-
-function DnsExtractRecordsFromMessage_UTF8(pDnsBuffer: PDNS_MESSAGE_BUFFER; wMessageLength: WORD; ppRecord: PPDNS_RECORD): DNS_STATUS; stdcall;
-{$EXTERNALSYM DnsExtractRecordsFromMessage_UTF8}
-
-implementation
-
-const
- dnsapi = 'dnsapi.dll';
- {$IFDEF UNICODE}
- AWSuffix = 'W';
- {$ELSE}
- AWSuffix = 'A';
- {$ENDIF UNICODE}
-
-procedure INLINE_WORD_FLIP(var Out_: WORD; In_: WORD);
-begin
- Out_ := (In_ shl 8) or (In_ shr 8);
-end;
-
-procedure INLINE_HTONS(var Out_: WORD; In_: WORD);
-begin
- INLINE_WORD_FLIP(Out_, In_);
-end;
-
-procedure INLINE_NTOHS(var Out_: WORD; In_: WORD);
-begin
- INLINE_WORD_FLIP(Out_, In_);
-end;
-
-procedure INLINE_DWORD_FLIP(var Out_: DWORD; In_: DWORD);
-begin
- Out_ := ((In_ shl 8) and $00ff0000) or (In_ shl 24) or
- ((In_ shr 8) and $0000ff00) or (In_ shr 24);
-end;
-
-procedure INLINE_NTOHL(var Out_: DWORD; In_: DWORD);
-begin
- INLINE_DWORD_FLIP(Out_, In_);
-end;
-
-procedure INLINE_HTONL(var Out_: DWORD; In_: DWORD);
-begin
- INLINE_DWORD_FLIP(Out_, In_);
-end;
-
-procedure INLINE_WRITE_FLIPPED_WORD(pout: PWORD; In_: WORD);
-begin
- INLINE_WORD_FLIP(pout^, In_);
-end;
-
-procedure INLINE_WRITE_FLIPPED_DWORD(pout: PDWORD; In_: DWORD);
-begin
- INLINE_DWORD_FLIP(pout^, In_);
-end;
-
-function DNS_HEADER_FLAGS(pHead: PDNS_HEADER): WORD;
-begin
- Result := PWORD(Integer(pHead) + SizeOf(WORD))^;
-end;
-
-procedure DNS_BYTE_FLIP_HEADER_COUNTS(var pHeader: PDNS_HEADER);
-var
- _head: PDNS_HEADER;
-begin
- _head := pHeader;
- INLINE_HTONS(_head^.Xid, _head^.Xid);
- INLINE_HTONS(_head^.QuestionCount, _head^.QuestionCount);
- INLINE_HTONS(_head^.AnswerCount, _head^.AnswerCount);
- INLINE_HTONS(_head^.NameServerCount, _head^.NameServerCount);
- INLINE_HTONS(_head^.AdditionalCount, _head^.AdditionalCount);
-end;
-
-{
-#define DNS_QUESTION_NAME_FROM_HEADER( _pHeader_ ) \
- ( (PCHAR)( (PDNS_HEADER)(_pHeader_) + 1 ) )
-
-#define DNS_ANSWER_FROM_QUESTION( _pQuestion_ ) \
- ( (PCHAR)( (PDNS_QUESTION)(_pQuestion_) + 1 ) )
-}
-
-function IS_WORD_ALIGNED(P: Pointer): BOOL;
-begin
- Result := (Integer(P) and 1) = 0;
-end;
-
-function IS_DWORD_ALIGNED(P: Pointer): BOOL;
-begin
- Result := (Integer(P) and 3) = 0;
-end;
-
-function IS_QWORD_ALIGNED(P: Pointer): BOOL;
-begin
- Result := (Integer(P) and 7) = 0;
-end;
-
-function DNS_TEXT_RECORD_LENGTH(StringCount: Integer): Integer;
-begin
- Result := SizeOf(DWORD) + ((StringCount) * SizeOf(PChar));
-end;
-
-function DNS_NULL_RECORD_LENGTH(ByteCount: Integer): Integer;
-begin
- Result := SizeOf(DWORD) + (ByteCount);
-end;
-
-function DNS_WKS_RECORD_LENGTH(ByteCount: Integer): Integer;
-begin
- Result := SizeOf(DNS_WKS_DATA) + (ByteCount - 1);
-end;
-
-//#define DNS_WINS_RECORD_LENGTH(IpCount) \
-// (FIELD_OFFSET(DNS_WINS_DATA, WinsServers) + ((IpCount) * sizeof(IP4_ADDRESS)))
-
-procedure DNS_RRSET_INIT(rrset: PDnsRRSet);
-begin
- rrset^.pFirstRR := nil;
- rrset^.pLastRR := (@rrset^.pFirstRR);
-end;
-
-//#define DNS_RRSET_ADD( rrset, pnewRR ) \
-// { \
-// PDNS_RRSET _prrset = &(rrset); \
-// PDNS_RECORD _prrnew = (pnewRR); \
-// _prrset->pLastRR->pNext = _prrnew; \
-// _prrset->pLastRR = _prrnew; \
-// }
-
-procedure DNS_RRSET_TERMINATE(rrset: PDnsRRSet);
-begin
- rrset^.pLastRR^.pNext := nil;
-end;
-
-{$IFDEF UNICODE}
-
-function DnsRecordCopy(pRR: PDNS_RECORD): PDNS_RECORD;
-begin
- Result := DnsRecordCopyEx(pRR, DnsCharSetUnicode, DnsCharSetUnicode);
-end;
-
-function DnsRecordSetCopy(pRR: PDNS_RECORD): PDNS_RECORD;
-begin
- Result := DnsRecordSetCopyEx(pRR, DnsCharSetUnicode, DnsCharSetUnicode);
-end;
-
-function DnsValidateName(pszName: LPCWSTR; Format: DNS_NAME_FORMAT): DNS_STATUS;
-begin
- Result := DnsValidateName_W(pszName, Format);
-end;
-
-{$ELSE}
-
-function DnsRecordCopy(pRR: PDNS_RECORD): PDNS_RECORD;
-begin
- Result := DnsRecordCopyEx(pRR, DnsCharSetAnsi, DnsCharSetAnsi);
-end;
-
-function DnsRecordSetCopy(pRR: PDNS_RECORD): PDNS_RECORD;
-begin
- Result := DnsRecordSetCopyEx(pRR, DnsCharSetAnsi, DnsCharSetAnsi);
-end;
-
-function DnsValidateName(pszName: LPCSTR; Format: DNS_NAME_FORMAT): DNS_STATUS;
-begin
- Result := DnsValidateName_A(pszName, Format);
-end;
-
-{$ENDIF UNICODE}
-
-{$IFDEF DYNAMIC_LINK}
-
-var
- _DnsQueryConfig: Pointer;
-
-function DnsQueryConfig;
-begin
- GetProcedureAddress(_DnsQueryConfig, dnsapi, 'DnsQueryConfig');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DnsQueryConfig]
- end;
-end;
-
-var
- _DnsRecordCopyEx: Pointer;
-
-function DnsRecordCopyEx;
-begin
- GetProcedureAddress(_DnsRecordCopyEx, dnsapi, 'DnsRecordCopyEx');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DnsRecordCopyEx]
- end;
-end;
-
-var
- _DnsRecordSetCopyEx: Pointer;
-
-function DnsRecordSetCopyEx;
-begin
- GetProcedureAddress(_DnsRecordSetCopyEx, dnsapi, 'DnsRecordSetCopyEx');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DnsRecordSetCopyEx]
- end;
-end;
-
-var
- _DnsRecordCompare: Pointer;
-
-function DnsRecordCompare;
-begin
- GetProcedureAddress(_DnsRecordCompare, dnsapi, 'DnsRecordCompare');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DnsRecordCompare]
- end;
-end;
-
-var
- _DnsRecordSetCompare: Pointer;
-
-function DnsRecordSetCompare;
-begin
- GetProcedureAddress(_DnsRecordSetCompare, dnsapi, 'DnsRecordSetCompare');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DnsRecordSetCompare]
- end;
-end;
-
-var
- _DnsRecordSetDetach: Pointer;
-
-function DnsRecordSetDetach;
-begin
- GetProcedureAddress(_DnsRecordSetDetach, dnsapi, 'DnsRecordSetDetach');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DnsRecordSetDetach]
- end;
-end;
-
-var
- _DnsFreeRecordListDeep: Pointer;
-
-procedure DnsFreeRecordListDeep;
-begin
- GetProcedureAddress(_DnsFreeRecordListDeep, dnsapi, 'DnsRecordListFree');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DnsFreeRecordListDeep]
- end;
-end;
-
-var
- _DnsRecordListFree: Pointer;
-
-procedure DnsRecordListFree;
-begin
- GetProcedureAddress(_DnsRecordListFree, dnsapi, 'DnsRecordListFree');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DnsRecordListFree]
- end;
-end;
-
-var
- _DnsFree: Pointer;
-
-procedure DnsFree;
-begin
- GetProcedureAddress(_DnsFree, dnsapi, 'DnsFree');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DnsFree]
- end;
-end;
-
-var
- _DnsQuery_A: Pointer;
-
-function DnsQuery_A;
-begin
- GetProcedureAddress(_DnsQuery_A, dnsapi, 'DnsQuery_A');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DnsQuery_A]
- end;
-end;
-
-var
- _DnsQuery_UTF8: Pointer;
-
-function DnsQuery_UTF8;
-begin
- GetProcedureAddress(_DnsQuery_UTF8, dnsapi, 'DnsQuery_UTF8');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DnsQuery_UTF8]
- end;
-end;
-
-var
- _DnsQuery_W: Pointer;
-
-function DnsQuery_W;
-begin
- GetProcedureAddress(_DnsQuery_W, dnsapi, 'DnsQuery_W');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DnsQuery_W]
- end;
-end;
-
-var
- _DnsQuery: Pointer;
-
-function DnsQuery;
-begin
- GetProcedureAddress(_DnsQuery, dnsapi, 'DnsQuery_' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DnsQuery]
- end;
-end;
-
-var
- _DnsAcquireContextHandle_W: Pointer;
-
-function DnsAcquireContextHandle_W;
-begin
- GetProcedureAddress(_DnsAcquireContextHandle_W, dnsapi, 'DnsAcquireContextHandle_W');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DnsAcquireContextHandle_W]
- end;
-end;
-
-var
- _DnsAcquireContextHandle_A: Pointer;
-
-function DnsAcquireContextHandle_A;
-begin
- GetProcedureAddress(_DnsAcquireContextHandle_A, dnsapi, 'DnsAcquireContextHandle_A');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DnsAcquireContextHandle_A]
- end;
-end;
-
-var
- _DnsAcquireContextHandle: Pointer;
-
-function DnsAcquireContextHandle;
-begin
- GetProcedureAddress(_DnsAcquireContextHandle, dnsapi, 'DnsAcquireContextHandle_' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DnsAcquireContextHandle]
- end;
-end;
-
-var
- _DnsReleaseContextHandle: Pointer;
-
-procedure DnsReleaseContextHandle;
-begin
- GetProcedureAddress(_DnsReleaseContextHandle, dnsapi, 'DnsReleaseContextHandle');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DnsReleaseContextHandle]
- end;
-end;
-
-var
- _DnsModifyRecordsInSet_W: Pointer;
-
-function DnsModifyRecordsInSet_W;
-begin
- GetProcedureAddress(_DnsModifyRecordsInSet_W, dnsapi, 'DnsModifyRecordsInSet_W');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DnsModifyRecordsInSet_W]
- end;
-end;
-
-var
- _DnsModifyRecordsInSet_A: Pointer;
-
-function DnsModifyRecordsInSet_A;
-begin
- GetProcedureAddress(_DnsModifyRecordsInSet_A, dnsapi, 'DnsModifyRecordsInSet_A');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DnsModifyRecordsInSet_A]
- end;
-end;
-
-var
- _DnsModifyRecordsInSet_UTF8: Pointer;
-
-function DnsModifyRecordsInSet_UTF8;
-begin
- GetProcedureAddress(_DnsModifyRecordsInSet_UTF8, dnsapi, 'DnsModifyRecordsInSet_UTF8');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DnsModifyRecordsInSet_UTF8]
- end;
-end;
-
-var
- _DnsModifyRecordsInSet: Pointer;
-
-function DnsModifyRecordsInSet;
-begin
- GetProcedureAddress(_DnsModifyRecordsInSet, dnsapi, 'DnsModifyRecordsInSet_' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DnsModifyRecordsInSet]
- end;
-end;
-
-var
- _DnsReplaceRecordSetW: Pointer;
-
-function DnsReplaceRecordSetW;
-begin
- GetProcedureAddress(_DnsReplaceRecordSetW, dnsapi, 'DnsReplaceRecordSetW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DnsReplaceRecordSetW]
- end;
-end;
-
-var
- _DnsReplaceRecordSetA: Pointer;
-
-function DnsReplaceRecordSetA;
-begin
- GetProcedureAddress(_DnsReplaceRecordSetA, dnsapi, 'DnsReplaceRecordSetA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DnsReplaceRecordSetA]
- end;
-end;
-
-var
- _DnsReplaceRecordSetUTF8: Pointer;
-
-function DnsReplaceRecordSetUTF8;
-begin
- GetProcedureAddress(_DnsReplaceRecordSetUTF8, dnsapi, 'DnsReplaceRecordSetUTF8');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DnsReplaceRecordSetUTF8]
- end;
-end;
-
-var
- _DnsReplaceRecordSet: Pointer;
-
-function DnsReplaceRecordSet;
-begin
- GetProcedureAddress(_DnsReplaceRecordSet, dnsapi, 'DnsReplaceRecordSet' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DnsReplaceRecordSet]
- end;
-end;
-
-var
- _DnsValidateName_UTF8: Pointer;
-
-function DnsValidateName_UTF8;
-begin
- GetProcedureAddress(_DnsValidateName_UTF8, dnsapi, 'DnsValidateName_UTF8');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DnsValidateName_UTF8]
- end;
-end;
-
-var
- _DnsValidateName_W: Pointer;
-
-function DnsValidateName_W;
-begin
- GetProcedureAddress(_DnsValidateName_W, dnsapi, 'DnsValidateName_W');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DnsValidateName_W]
- end;
-end;
-
-var
- _DnsValidateName_A: Pointer;
-
-function DnsValidateName_A;
-begin
- GetProcedureAddress(_DnsValidateName_A, dnsapi, 'DnsValidateName_A');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DnsValidateName_A]
- end;
-end;
-
-var
- _DnsNameCompare_A: Pointer;
-
-function DnsNameCompare_A;
-begin
- GetProcedureAddress(_DnsNameCompare_A, dnsapi, 'DnsNameCompare_A');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DnsNameCompare_A]
- end;
-end;
-
-var
- _DnsNameCompare_W: Pointer;
-
-function DnsNameCompare_W;
-begin
- GetProcedureAddress(_DnsNameCompare_W, dnsapi, 'DnsNameCompare_W');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DnsNameCompare_W]
- end;
-end;
-
-var
- _DnsNameCompare: Pointer;
-
-function DnsNameCompare;
-begin
- GetProcedureAddress(_DnsNameCompare, dnsapi, 'DnsNameCompare_' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DnsNameCompare]
- end;
-end;
-
-var
- _DnsWriteQuestionToBuffer_W: Pointer;
-
-function DnsWriteQuestionToBuffer_W;
-begin
- GetProcedureAddress(_DnsWriteQuestionToBuffer_W, dnsapi, 'DnsWriteQuestionToBuffer_W');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DnsWriteQuestionToBuffer_W]
- end;
-end;
-
-var
- _DnsWriteQuestionToBuffer_UTF8: Pointer;
-
-function DnsWriteQuestionToBuffer_UTF8;
-begin
- GetProcedureAddress(_DnsWriteQuestionToBuffer_UTF8, dnsapi, 'DnsWriteQuestionToBuffer_UTF8');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DnsWriteQuestionToBuffer_UTF8]
- end;
-end;
-
-var
- _DnsExtractRecordsFromMessage_W: Pointer;
-
-function DnsExtractRecordsFromMessage_W;
-begin
- GetProcedureAddress(_DnsExtractRecordsFromMessage_W, dnsapi, 'DnsExtractRecordsFromMessage_W');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DnsExtractRecordsFromMessage_W]
- end;
-end;
-
-var
- _DnsExtractRecFromMessage_UTF8: Pointer;
-
-function DnsExtractRecordsFromMessage_UTF8;
-begin
- GetProcedureAddress(_DnsExtractRecFromMessage_UTF8, dnsapi, 'DnsExtractRecordsFromMessage_UTF8');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DnsExtractRecFromMessage_UTF8]
- end;
-end;
-
-{$ELSE}
-
-function DnsQueryConfig; external dnsapi name 'DnsQueryConfig';
-function DnsRecordCopyEx; external dnsapi name 'DnsRecordCopyEx';
-function DnsRecordSetCopyEx; external dnsapi name 'DnsRecordSetCopyEx';
-function DnsRecordCompare; external dnsapi name 'DnsRecordCompare';
-function DnsRecordSetCompare; external dnsapi name 'DnsRecordSetCompare';
-function DnsRecordSetDetach; external dnsapi name 'DnsRecordSetDetach';
-procedure DnsFreeRecordListDeep; external dnsapi name 'DnsRecordListFree';
-procedure DnsRecordListFree; external dnsapi name 'DnsRecordListFree';
-procedure DnsFree; external dnsapi name 'DnsFree';
-function DnsQuery_A; external dnsapi name 'DnsQuery_A';
-function DnsQuery_UTF8; external dnsapi name 'DnsQuery_UTF8';
-function DnsQuery_W; external dnsapi name 'DnsQuery_W';
-function DnsQuery; external dnsapi name 'DnsQuery_' + AWSuffix;
-function DnsAcquireContextHandle_W; external dnsapi name 'DnsAcquireContextHandle_W';
-function DnsAcquireContextHandle_A; external dnsapi name 'DnsAcquireContextHandle_A';
-function DnsAcquireContextHandle; external dnsapi name 'DnsAcquireContextHandle_' + AWSuffix;
-procedure DnsReleaseContextHandle; external dnsapi name 'DnsReleaseContextHandle';
-function DnsModifyRecordsInSet_W; external dnsapi name 'DnsModifyRecordsInSet_W';
-function DnsModifyRecordsInSet_A; external dnsapi name 'DnsModifyRecordsInSet_A';
-function DnsModifyRecordsInSet_UTF8; external dnsapi name 'DnsModifyRecordsInSet_UTF8';
-function DnsModifyRecordsInSet; external dnsapi name 'DnsModifyRecordsInSet_' + AWSuffix;
-function DnsReplaceRecordSetW; external dnsapi name 'DnsReplaceRecordSetW';
-function DnsReplaceRecordSetA; external dnsapi name 'DnsReplaceRecordSetA';
-function DnsReplaceRecordSetUTF8; external dnsapi name 'DnsReplaceRecordSetUTF8';
-function DnsReplaceRecordSet; external dnsapi name 'DnsReplaceRecordSet' + AWSuffix;
-function DnsValidateName_UTF8; external dnsapi name 'DnsValidateName_UTF8';
-function DnsValidateName_W; external dnsapi name 'DnsValidateName_W';
-function DnsValidateName_A; external dnsapi name 'DnsValidateName_A';
-function DnsNameCompare_A; external dnsapi name 'DnsNameCompare_A';
-function DnsNameCompare_W; external dnsapi name 'DnsNameCompare_W';
-function DnsNameCompare; external dnsapi name 'DnsNameCompare_' + AWSuffix;
-function DnsWriteQuestionToBuffer_W; external dnsapi name 'DnsWriteQuestionToBuffer_W';
-function DnsWriteQuestionToBuffer_UTF8; external dnsapi name 'DnsWriteQuestionToBuffer_UTF8';
-function DnsExtractRecordsFromMessage_W; external dnsapi name 'DnsExtractRecordsFromMessage_W';
-function DnsExtractRecordsFromMessage_UTF8; external dnsapi name 'DnsExtractRecordsFromMessage_UTF8';
-
-{$ENDIF DYNAMIC_LINK}
-
-end.
+{******************************************************************************}
+{ }
+{ Domain Naming Services API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: windns.h, released June 2000. The original Pascal }
+{ code is: WinDNS.pas, released December 2000. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwawindns.pas,v 1.1 2005/04/04 07:56:11 marco Exp $
+
+{******************************************************************}
+{ Notes (TODO): }
+{ DnsRecordSetDetach() and DnsValidateName_X() didn't have a cc }
+{ IP_ADDRESS_STRING_LENGTH is defined nowhere }
+{ DNS_WINS_RECORD macro untranslatable due to IP_ADDRESS }
+{ DNS_RRSET_ADD macro untranslatable }
+{******************************************************************}
+
+unit JwaWinDNS;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "WinDNS.h"'}
+{$HPPEMIT ''}
+{$HPPEMIT 'typeded PDNS_RECORD *PPDNS_RECORD'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaWinsock2, JwaWinType, JwaWS2atm;
+
+type
+ IN6_ADDR = Pointer; // todo
+
+//
+// Define QWORD -- not yet defined globally
+//
+
+type
+ QWORD = Int64;
+ {$EXTERNALSYM QWORD}
+
+//
+// DNS public types
+//
+
+type
+ DNS_STATUS = Longint;
+ {$EXTERNALSYM DNS_STATUS}
+ PDNS_STATUS = ^DNS_STATUS;
+ {$EXTERNALSYM PDNS_STATUS}
+ TDnsStatus = DNS_STATUS;
+ PDnsStatus = PDNS_STATUS;
+
+//
+// IP Address
+//
+
+type
+ IP4_ADDRESS = DWORD;
+ {$EXTERNALSYM IP4_ADDRESS}
+ PIP4_ADDRESS = ^IP4_ADDRESS;
+ {$EXTERNALSYM PIP4_ADDRESS}
+ TIP4Address = IP4_ADDRESS;
+ PIP4Address = PIP4_ADDRESS;
+
+const
+ SIZEOF_IP4_ADDRESS = 4;
+ {$EXTERNALSYM SIZEOF_IP4_ADDRESS}
+ IP4_ADDRESS_STRING_LENGTH = 15;
+ {$EXTERNALSYM IP4_ADDRESS_STRING_LENGTH}
+ IP4_ADDRESS_STRING_BUFFER_LENGTH = 16;
+ {$EXTERNALSYM IP4_ADDRESS_STRING_BUFFER_LENGTH}
+
+//
+// IP Address Array type
+//
+
+type
+ PIP4_ARRAY = ^IP4_ARRAY;
+ {$EXTERNALSYM PIP4_ARRAY}
+ _IP4_ARRAY = record
+ AddrCount: DWORD;
+ AddrArray: array [0..0] of IP4_ADDRESS;
+ end;
+ {$EXTERNALSYM _IP4_ARRAY}
+ IP4_ARRAY = _IP4_ARRAY;
+ {$EXTERNALSYM IP4_ARRAY}
+ TIp4Array = IP4_ARRAY;
+ PIp4Array = PIP4_ARRAY;
+
+//
+// IPv6 Address
+//
+
+ PIP6_ADDRESS = ^IP6_ADDRESS;
+ {$EXTERNALSYM PIP6_ADDRESS}
+ IP6_ADDRESS = record
+ case Integer of
+ 0: (IP6Qword: array [0..1] of QWORD);
+ 1: (IP6Dword: array [0..3] of DWORD);
+ 2: (IP6Word: array [0..7] of WORD);
+ 3: (IP6Byte: array [0..15] of BYTE);
+ 4: (In6: IN6_ADDR);
+ end;
+ {$EXTERNALSYM IP6_ADDRESS}
+ TIp6Address = IP6_ADDRESS;
+ PIp6Address = PIP6_ADDRESS;
+
+// Backward compatibility
+
+ DNS_IP6_ADDRESS = IP6_ADDRESS;
+ {$EXTERNALSYM DNS_IP6_ADDRESS}
+ PDNS_IP6_ADDRESS = ^IP6_ADDRESS;
+ {$EXTERNALSYM PDNS_IP6_ADDRESS}
+ TDnsIp6Address = DNS_IP6_ADDRESS;
+ PDnsIp6Address = PDNS_IP6_ADDRESS;
+
+//
+// IP6 string max is 45 bytes
+// - 6 WORDs in colon+hex (5 chars)
+// - last DWORD as IP4 (15 chars)
+//
+
+const
+ IP6_ADDRESS_STRING_LENGTH = 47;
+ {$EXTERNALSYM IP6_ADDRESS_STRING_LENGTH}
+ IP6_ADDRESS_STRING_BUFFER_LENGTH = 48;
+ {$EXTERNALSYM IP6_ADDRESS_STRING_BUFFER_LENGTH}
+
+// backcompat
+
+ IPV6_ADDRESS_STRING_LENGTH = IP6_ADDRESS_STRING_LENGTH;
+ {$EXTERNALSYM IPV6_ADDRESS_STRING_LENGTH}
+
+//
+// Inline byte flipping -- can be done in registers
+//
+
+procedure INLINE_WORD_FLIP(var Out_: WORD; In_: WORD);
+{$EXTERNALSYM INLINE_WORD_FLIP}
+
+procedure INLINE_HTONS(var Out_: WORD; In_: WORD);
+{$EXTERNALSYM INLINE_HTONS}
+
+procedure INLINE_NTOHS(var Out_: WORD; In_: WORD);
+{$EXTERNALSYM INLINE_NTOHS}
+
+procedure INLINE_DWORD_FLIP(var Out_: DWORD; In_: DWORD);
+{$EXTERNALSYM INLINE_DWORD_FLIP}
+
+procedure INLINE_NTOHL(var Out_: DWORD; In_: DWORD);
+{$EXTERNALSYM INLINE_NTOHL}
+
+procedure INLINE_HTONL(var Out_: DWORD; In_: DWORD);
+{$EXTERNALSYM INLINE_HTONL}
+
+//
+// Inline byte flip and write to packet (unaligned)
+//
+
+procedure INLINE_WRITE_FLIPPED_WORD(pout: PWORD; In_: WORD);
+{$EXTERNALSYM INLINE_WRITE_FLIPPED_WORD}
+
+procedure INLINE_WRITE_FLIPPED_DWORD(pout: PDWORD; In_: DWORD);
+{$EXTERNALSYM INLINE_WRITE_FLIPPED_DWORD}
+
+//
+// Basic DNS definitions
+//
+
+//
+// DNS port for both UDP and TCP is 53.
+//
+
+const
+ DNS_PORT_HOST_ORDER = $0035; // port 53
+ {$EXTERNALSYM DNS_PORT_HOST_ORDER}
+ DNS_PORT_NET_ORDER = $3500;
+ {$EXTERNALSYM DNS_PORT_NET_ORDER}
+
+//
+// DNS UDP packets no more than 512 bytes
+//
+
+ DNS_RFC_MAX_UDP_PACKET_LENGTH = 512;
+ {$EXTERNALSYM DNS_RFC_MAX_UDP_PACKET_LENGTH}
+
+//
+// DNS Names limited to 255, 63 in any one label
+//
+
+ DNS_MAX_NAME_LENGTH = 255;
+ {$EXTERNALSYM DNS_MAX_NAME_LENGTH}
+ DNS_MAX_LABEL_LENGTH = 63;
+ {$EXTERNALSYM DNS_MAX_LABEL_LENGTH}
+
+ DNS_MAX_NAME_BUFFER_LENGTH = 256;
+ {$EXTERNALSYM DNS_MAX_NAME_BUFFER_LENGTH}
+ DNS_MAX_LABEL_BUFFER_LENGTH = 64;
+ {$EXTERNALSYM DNS_MAX_LABEL_BUFFER_LENGTH}
+
+//
+// Reverse lookup domain names
+//
+
+ DNS_IP4_REVERSE_DOMAIN_STRING = 'in-addr.arpa.';
+ {$EXTERNALSYM DNS_IP4_REVERSE_DOMAIN_STRING}
+
+ //DNS_MAX_IP4_REVERSE_NAME_LENGTH = IP_ADDRESS_STRING_LENGTH + 1 + SizeOf(DNS_IP4_REVERSE_DOMAIN_STRING);
+ //{$EXTERNALSYM DNS_MAX_IP4_REVERSE_NAME_LENGTH}
+
+ //DNS_MAX_IP4_REVERSE_NAME_BUFFER_LENGTH = DNS_MAX_IP4_REVERSE_NAME_LENGTH + 1;
+ //{$EXTERNALSYM DNS_MAX_IP4_REVERSE_NAME_BUFFER_LENGTH}
+
+ DNS_IP6_REVERSE_DOMAIN_STRING = 'ip6.int.';
+ {$EXTERNALSYM DNS_IP6_REVERSE_DOMAIN_STRING}
+
+ DNS_MAX_IP6_REVERSE_NAME_LENGTH = 64 + SizeOf(DNS_IP6_REVERSE_DOMAIN_STRING);
+ {$EXTERNALSYM DNS_MAX_IP6_REVERSE_NAME_LENGTH}
+
+ DNS_MAX_IP6_REVERSE_NAME_BUFFER_LENGTH = DNS_MAX_IP6_REVERSE_NAME_LENGTH + 1;
+ {$EXTERNALSYM DNS_MAX_IP6_REVERSE_NAME_BUFFER_LENGTH}
+
+// Combined
+
+ DNS_MAX_REVERSE_NAME_LENGTH = DNS_MAX_IP6_REVERSE_NAME_LENGTH;
+ {$EXTERNALSYM DNS_MAX_REVERSE_NAME_LENGTH}
+
+ DNS_MAX_REVERSE_NAME_BUFFER_LENGTH = DNS_MAX_IP6_REVERSE_NAME_BUFFER_LENGTH;
+ {$EXTERNALSYM DNS_MAX_REVERSE_NAME_BUFFER_LENGTH}
+
+//
+// DNS Text string limited by size representable
+// in a single byte length field
+
+ DNS_MAX_TEXT_STRING_LENGTH = 255;
+ {$EXTERNALSYM DNS_MAX_TEXT_STRING_LENGTH}
+
+//
+// DNS On-The-Wire Structures
+//
+
+//
+// DNS Message Header
+//
+
+type
+ _DNS_HEADER = packed record
+ Xid: WORD;
+ Flags: Byte;
+ //BYTE RecursionDesired : 1;
+ //BYTE Truncation : 1;
+ //BYTE Authoritative : 1;
+ //BYTE Opcode : 4;
+ //BYTE IsResponse : 1;
+ Flags2: Byte;
+ //BYTE ResponseCode : 4;
+ //BYTE Reserved : 3;
+ //BYTE RecursionAvailable : 1;
+ QuestionCount: WORD;
+ AnswerCount: WORD;
+ NameServerCount: WORD;
+ AdditionalCount: WORD;
+ end;
+ {$EXTERNALSYM _DNS_HEADER}
+ DNS_HEADER = _DNS_HEADER;
+ {$EXTERNALSYM DNS_HEADER}
+ PDNS_HEADER = ^DNS_HEADER;
+ {$EXTERNALSYM PDNS_HEADER}
+ TDnsHeader = DNS_HEADER;
+ PDnsHeader = PDNS_HEADER;
+
+//
+// Flags as WORD
+//
+
+function DNS_HEADER_FLAGS(pHead: PDNS_HEADER): WORD;
+{$EXTERNALSYM DNS_HEADER_FLAGS}
+
+//
+// Byte flip DNS header to\from host order.
+//
+// Note that this does NOT flip flags, as definition above defines
+// flags as individual bytes for direct access to net byte order.
+//
+
+procedure DNS_BYTE_FLIP_HEADER_COUNTS(var pHeader: PDNS_HEADER);
+{$EXTERNALSYM DNS_BYTE_FLIP_HEADER_COUNTS}
+
+//
+// Question name follows header
+//
+
+const
+ DNS_OFFSET_TO_QUESTION_NAME = SizeOf(DNS_HEADER);
+ {$EXTERNALSYM DNS_OFFSET_TO_QUESTION_NAME}
+
+//
+// Question immediately follows header so compressed question name
+// 0xC000 | sizeof(DNS_HEADER)
+
+ DNS_COMPRESSED_QUESTION_NAME = $C00C;
+ {$EXTERNALSYM DNS_COMPRESSED_QUESTION_NAME}
+
+//
+// Packet extraction macros
+//
+
+{
+#define DNS_QUESTION_NAME_FROM_HEADER( _pHeader_ ) \
+ ( (PCHAR)( (PDNS_HEADER)(_pHeader_) + 1 ) )
+
+#define DNS_ANSWER_FROM_QUESTION( _pQuestion_ ) \
+ ( (PCHAR)( (PDNS_QUESTION)(_pQuestion_) + 1 ) )
+}
+
+//
+// DNS Question
+//
+
+type
+ PDNS_WIRE_QUESTION = ^DNS_WIRE_QUESTION;
+ {$EXTERNALSYM PDNS_WIRE_QUESTION}
+ _DNS_WIRE_QUESTION = packed record
+ // Preceded by question name
+ QuestionType: WORD;
+ QuestionClass: WORD;
+ end;
+ {$EXTERNALSYM _DNS_WIRE_QUESTION}
+ DNS_WIRE_QUESTION = _DNS_WIRE_QUESTION;
+ {$EXTERNALSYM DNS_WIRE_QUESTION}
+ TDnsWireQuestion = DNS_WIRE_QUESTION;
+ PDnsWireQuestion = PDNS_WIRE_QUESTION;
+
+//
+// DNS Resource Record
+//
+
+ PDNS_WIRE_RECORD = ^DNS_WIRE_RECORD;
+ {$EXTERNALSYM PDNS_WIRE_RECORD}
+ _DNS_WIRE_RECORD = packed record
+ // Preceded by record owner name
+ RecordType: WORD;
+ RecordClass: WORD;
+ TimeToLive: DWORD;
+ DataLength: WORD;
+ // Followed by record data
+ end;
+ {$EXTERNALSYM _DNS_WIRE_RECORD}
+ DNS_WIRE_RECORD = _DNS_WIRE_RECORD;
+ {$EXTERNALSYM DNS_WIRE_RECORD}
+ TDnsWireRecord = DNS_WIRE_RECORD;
+ PDnsWireRecord = PDNS_WIRE_RECORD;
+
+//
+// DNS Query Types
+//
+
+const
+ DNS_OPCODE_QUERY = 0; // Query
+ {$EXTERNALSYM DNS_OPCODE_QUERY}
+ DNS_OPCODE_IQUERY = 1; // Obsolete: IP to name
+ {$EXTERNALSYM DNS_OPCODE_IQUERY}
+ DNS_OPCODE_SERVER_STATUS = 2; // Obsolete: DNS ping
+ {$EXTERNALSYM DNS_OPCODE_SERVER_STATUS}
+ DNS_OPCODE_UNKNOWN = 3; // Unknown
+ {$EXTERNALSYM DNS_OPCODE_UNKNOWN}
+ DNS_OPCODE_NOTIFY = 4; // Notify
+ {$EXTERNALSYM DNS_OPCODE_NOTIFY}
+ DNS_OPCODE_UPDATE = 5; // Dynamic Update
+ {$EXTERNALSYM DNS_OPCODE_UPDATE}
+
+//
+// DNS response codes.
+//
+// Sent in the "ResponseCode" field of a DNS_HEADER.
+//
+
+ DNS_RCODE_NOERROR = 0;
+ {$EXTERNALSYM DNS_RCODE_NOERROR}
+ DNS_RCODE_FORMERR = 1; // Format error
+ {$EXTERNALSYM DNS_RCODE_FORMERR}
+ DNS_RCODE_SERVFAIL = 2; // Server failure
+ {$EXTERNALSYM DNS_RCODE_SERVFAIL}
+ DNS_RCODE_NXDOMAIN = 3; // Name error
+ {$EXTERNALSYM DNS_RCODE_NXDOMAIN}
+ DNS_RCODE_NOTIMPL = 4; // Not implemented
+ {$EXTERNALSYM DNS_RCODE_NOTIMPL}
+ DNS_RCODE_REFUSED = 5; // Refused
+ {$EXTERNALSYM DNS_RCODE_REFUSED}
+ DNS_RCODE_YXDOMAIN = 6; // Domain name should not exist
+ {$EXTERNALSYM DNS_RCODE_YXDOMAIN}
+ DNS_RCODE_YXRRSET = 7; // RR set should not exist
+ {$EXTERNALSYM DNS_RCODE_YXRRSET}
+ DNS_RCODE_NXRRSET = 8; // RR set does not exist
+ {$EXTERNALSYM DNS_RCODE_NXRRSET}
+ DNS_RCODE_NOTAUTH = 9; // Not authoritative for zone
+ {$EXTERNALSYM DNS_RCODE_NOTAUTH}
+ DNS_RCODE_NOTZONE = 10; // Name is not zone
+ {$EXTERNALSYM DNS_RCODE_NOTZONE}
+ DNS_RCODE_MAX = 15;
+ {$EXTERNALSYM DNS_RCODE_MAX}
+
+//
+// Extended RCODEs
+//
+
+ DNS_RCODE_BADVERS = 16; // Bad EDNS version
+ {$EXTERNALSYM DNS_RCODE_BADVERS}
+ DNS_RCODE_BADSIG = 16; // Bad signature
+ {$EXTERNALSYM DNS_RCODE_BADSIG}
+ DNS_RCODE_BADKEY = 17; // Bad key
+ {$EXTERNALSYM DNS_RCODE_BADKEY}
+ DNS_RCODE_BADTIME = 18; // Bad timestamp
+ {$EXTERNALSYM DNS_RCODE_BADTIME}
+
+//
+// Mappings to friendly names
+//
+
+ DNS_RCODE_NO_ERROR = DNS_RCODE_NOERROR;
+ {$EXTERNALSYM DNS_RCODE_NO_ERROR}
+ DNS_RCODE_FORMAT_ERROR = DNS_RCODE_FORMERR;
+ {$EXTERNALSYM DNS_RCODE_FORMAT_ERROR}
+ DNS_RCODE_SERVER_FAILURE = DNS_RCODE_SERVFAIL;
+ {$EXTERNALSYM DNS_RCODE_SERVER_FAILURE}
+ DNS_RCODE_NAME_ERROR = DNS_RCODE_NXDOMAIN;
+ {$EXTERNALSYM DNS_RCODE_NAME_ERROR}
+ DNS_RCODE_NOT_IMPLEMENTED = DNS_RCODE_NOTIMPL;
+ {$EXTERNALSYM DNS_RCODE_NOT_IMPLEMENTED}
+
+//
+// DNS Classes
+//
+// Classes are on the wire as WORDs.
+//
+// _CLASS_ defines in host order.
+// _RCLASS_ defines in net byte order.
+//
+// Generally we'll avoid byte flip and test class in net byte order.
+//
+
+ DNS_CLASS_INTERNET = $0001; // 1
+ {$EXTERNALSYM DNS_CLASS_INTERNET}
+ DNS_CLASS_CSNET = $0002; // 2
+ {$EXTERNALSYM DNS_CLASS_CSNET}
+ DNS_CLASS_CHAOS = $0003; // 3
+ {$EXTERNALSYM DNS_CLASS_CHAOS}
+ DNS_CLASS_HESIOD = $0004; // 4
+ {$EXTERNALSYM DNS_CLASS_HESIOD}
+ DNS_CLASS_NONE = $00fe; // 254
+ {$EXTERNALSYM DNS_CLASS_NONE}
+ DNS_CLASS_ALL = $00ff; // 255
+ {$EXTERNALSYM DNS_CLASS_ALL}
+ DNS_CLASS_ANY = $00ff; // 255
+ {$EXTERNALSYM DNS_CLASS_ANY}
+
+ DNS_RCLASS_INTERNET = $0100; // 1
+ {$EXTERNALSYM DNS_RCLASS_INTERNET}
+ DNS_RCLASS_CSNET = $0200; // 2
+ {$EXTERNALSYM DNS_RCLASS_CSNET}
+ DNS_RCLASS_CHAOS = $0300; // 3
+ {$EXTERNALSYM DNS_RCLASS_CHAOS}
+ DNS_RCLASS_HESIOD = $0400; // 4
+ {$EXTERNALSYM DNS_RCLASS_HESIOD}
+ DNS_RCLASS_NONE = $fe00; // 254
+ {$EXTERNALSYM DNS_RCLASS_NONE}
+ DNS_RCLASS_ALL = $ff00; // 255
+ {$EXTERNALSYM DNS_RCLASS_ALL}
+ DNS_RCLASS_ANY = $ff00; // 255
+ {$EXTERNALSYM DNS_RCLASS_ANY}
+
+//
+// DNS Record Types
+//
+// _TYPE_ defines are in host byte order.
+// _RTYPE_ defines are in net byte order.
+//
+// Generally always deal with types in host byte order as we index
+// resource record functions by type.
+//
+
+ DNS_TYPE_ZERO = $0000;
+ {$EXTERNALSYM DNS_TYPE_ZERO}
+
+// RFC 1034/1035
+ DNS_TYPE_A = $0001; // 1
+ {$EXTERNALSYM DNS_TYPE_A}
+ DNS_TYPE_NS = $0002; // 2
+ {$EXTERNALSYM DNS_TYPE_NS}
+ DNS_TYPE_MD = $0003; // 3
+ {$EXTERNALSYM DNS_TYPE_MD}
+ DNS_TYPE_MF = $0004; // 4
+ {$EXTERNALSYM DNS_TYPE_MF}
+ DNS_TYPE_CNAME = $0005; // 5
+ {$EXTERNALSYM DNS_TYPE_CNAME}
+ DNS_TYPE_SOA = $0006; // 6
+ {$EXTERNALSYM DNS_TYPE_SOA}
+ DNS_TYPE_MB = $0007; // 7
+ {$EXTERNALSYM DNS_TYPE_MB}
+ DNS_TYPE_MG = $0008; // 8
+ {$EXTERNALSYM DNS_TYPE_MG}
+ DNS_TYPE_MR = $0009; // 9
+ {$EXTERNALSYM DNS_TYPE_MR}
+ DNS_TYPE_NULL = $000a; // 10
+ {$EXTERNALSYM DNS_TYPE_NULL}
+ DNS_TYPE_WKS = $000b; // 11
+ {$EXTERNALSYM DNS_TYPE_WKS}
+ DNS_TYPE_PTR = $000c; // 12
+ {$EXTERNALSYM DNS_TYPE_PTR}
+ DNS_TYPE_HINFO = $000d; // 13
+ {$EXTERNALSYM DNS_TYPE_HINFO}
+ DNS_TYPE_MINFO = $000e; // 14
+ {$EXTERNALSYM DNS_TYPE_MINFO}
+ DNS_TYPE_MX = $000f; // 15
+ {$EXTERNALSYM DNS_TYPE_MX}
+ DNS_TYPE_TEXT = $0010; // 16
+ {$EXTERNALSYM DNS_TYPE_TEXT}
+
+// RFC 1183
+ DNS_TYPE_RP = $0011; // 17
+ {$EXTERNALSYM DNS_TYPE_RP}
+ DNS_TYPE_AFSDB = $0012; // 18
+ {$EXTERNALSYM DNS_TYPE_AFSDB}
+ DNS_TYPE_X25 = $0013; // 19
+ {$EXTERNALSYM DNS_TYPE_X25}
+ DNS_TYPE_ISDN = $0014; // 20
+ {$EXTERNALSYM DNS_TYPE_ISDN}
+ DNS_TYPE_RT = $0015; // 21
+ {$EXTERNALSYM DNS_TYPE_RT}
+
+// RFC 1348
+ DNS_TYPE_NSAP = $0016; // 22
+ {$EXTERNALSYM DNS_TYPE_NSAP}
+ DNS_TYPE_NSAPPTR = $0017; // 23
+ {$EXTERNALSYM DNS_TYPE_NSAPPTR}
+
+// RFC 2065 (DNS security)
+ DNS_TYPE_SIG = $0018; // 24
+ {$EXTERNALSYM DNS_TYPE_SIG}
+ DNS_TYPE_KEY = $0019; // 25
+ {$EXTERNALSYM DNS_TYPE_KEY}
+
+// RFC 1664 (X.400 mail)
+ DNS_TYPE_PX = $001a; // 26
+ {$EXTERNALSYM DNS_TYPE_PX}
+
+// RFC 1712 (Geographic position)
+ DNS_TYPE_GPOS = $001b; // 27
+ {$EXTERNALSYM DNS_TYPE_GPOS}
+
+// RFC 1886 (IPv6 Address)
+ DNS_TYPE_AAAA = $001c; // 28
+ {$EXTERNALSYM DNS_TYPE_AAAA}
+
+// RFC 1876 (Geographic location)
+ DNS_TYPE_LOC = $001d; // 29
+ {$EXTERNALSYM DNS_TYPE_LOC}
+
+// RFC 2065 (Secure negative response)
+ DNS_TYPE_NXT = $001e; // 30
+ {$EXTERNALSYM DNS_TYPE_NXT}
+
+// Patton (Endpoint Identifier)
+ DNS_TYPE_EID = $001f; // 31
+ {$EXTERNALSYM DNS_TYPE_EID}
+
+// Patton (Nimrod Locator)
+ DNS_TYPE_NIMLOC = $0020; // 32
+ {$EXTERNALSYM DNS_TYPE_NIMLOC}
+
+// RFC 2052 (Service location)
+ DNS_TYPE_SRV = $0021; // 33
+ {$EXTERNALSYM DNS_TYPE_SRV}
+
+// ATM Standard something-or-another (ATM Address)
+ DNS_TYPE_ATMA = $0022; // 34
+ {$EXTERNALSYM DNS_TYPE_ATMA}
+
+// RFC 2168 (Naming Authority Pointer)
+ DNS_TYPE_NAPTR = $0023; // 35
+ {$EXTERNALSYM DNS_TYPE_NAPTR}
+
+// RFC 2230 (Key Exchanger)
+ DNS_TYPE_KX = $0024; // 36
+ {$EXTERNALSYM DNS_TYPE_KX}
+
+// RFC 2538 (CERT)
+ DNS_TYPE_CERT = $0025; // 37
+ {$EXTERNALSYM DNS_TYPE_CERT}
+
+// A6 Draft (A6)
+ DNS_TYPE_A6 = $0026; // 38
+ {$EXTERNALSYM DNS_TYPE_A6}
+
+// DNAME Draft (DNAME)
+ DNS_TYPE_DNAME = $0027; // 39
+ {$EXTERNALSYM DNS_TYPE_DNAME}
+
+// Eastlake (Kitchen Sink)
+ DNS_TYPE_SINK = $0028; // 40
+ {$EXTERNALSYM DNS_TYPE_SINK}
+
+// RFC 2671 (EDNS OPT)
+ DNS_TYPE_OPT = $0029; // 41
+ {$EXTERNALSYM DNS_TYPE_OPT}
+
+//
+// IANA Reserved
+//
+
+ DNS_TYPE_UINFO = $0064; // 100
+ {$EXTERNALSYM DNS_TYPE_UINFO}
+ DNS_TYPE_UID = $0065; // 101
+ {$EXTERNALSYM DNS_TYPE_UID}
+ DNS_TYPE_GID = $0066; // 102
+ {$EXTERNALSYM DNS_TYPE_GID}
+ DNS_TYPE_UNSPEC = $0067; // 103
+ {$EXTERNALSYM DNS_TYPE_UNSPEC}
+
+//
+// Query only types (1035, 1995)
+// - Crawford (ADDRS)
+// - TKEY draft (TKEY)
+// - TSIG draft (TSIG)
+// - RFC 1995 (IXFR)
+// - RFC 1035 (AXFR up)
+//
+
+ DNS_TYPE_ADDRS = $00f8; // 248
+ {$EXTERNALSYM DNS_TYPE_ADDRS}
+ DNS_TYPE_TKEY = $00f9; // 249
+ {$EXTERNALSYM DNS_TYPE_TKEY}
+ DNS_TYPE_TSIG = $00fa; // 250
+ {$EXTERNALSYM DNS_TYPE_TSIG}
+ DNS_TYPE_IXFR = $00fb; // 251
+ {$EXTERNALSYM DNS_TYPE_IXFR}
+ DNS_TYPE_AXFR = $00fc; // 252
+ {$EXTERNALSYM DNS_TYPE_AXFR}
+ DNS_TYPE_MAILB = $00fd; // 253
+ {$EXTERNALSYM DNS_TYPE_MAILB}
+ DNS_TYPE_MAILA = $00fe; // 254
+ {$EXTERNALSYM DNS_TYPE_MAILA}
+ DNS_TYPE_ALL = $00ff; // 255
+ {$EXTERNALSYM DNS_TYPE_ALL}
+ DNS_TYPE_ANY = $00ff; // 255
+ {$EXTERNALSYM DNS_TYPE_ANY}
+
+//
+// Temp Microsoft types -- use until get IANA approval for real type
+//
+
+ DNS_TYPE_WINS = $ff01; // 64K - 255
+ {$EXTERNALSYM DNS_TYPE_WINS}
+ DNS_TYPE_WINSR = $ff02; // 64K - 254
+ {$EXTERNALSYM DNS_TYPE_WINSR}
+ DNS_TYPE_NBSTAT = DNS_TYPE_WINSR;
+ {$EXTERNALSYM DNS_TYPE_NBSTAT}
+
+//
+// DNS Record Types -- Net Byte Order
+//
+
+ DNS_RTYPE_A = $0100; // 1
+ {$EXTERNALSYM DNS_RTYPE_A}
+ DNS_RTYPE_NS = $0200; // 2
+ {$EXTERNALSYM DNS_RTYPE_NS}
+ DNS_RTYPE_MD = $0300; // 3
+ {$EXTERNALSYM DNS_RTYPE_MD}
+ DNS_RTYPE_MF = $0400; // 4
+ {$EXTERNALSYM DNS_RTYPE_MF}
+ DNS_RTYPE_CNAME = $0500; // 5
+ {$EXTERNALSYM DNS_RTYPE_CNAME}
+ DNS_RTYPE_SOA = $0600; // 6
+ {$EXTERNALSYM DNS_RTYPE_SOA}
+ DNS_RTYPE_MB = $0700; // 7
+ {$EXTERNALSYM DNS_RTYPE_MB}
+ DNS_RTYPE_MG = $0800; // 8
+ {$EXTERNALSYM DNS_RTYPE_MG}
+ DNS_RTYPE_MR = $0900; // 9
+ {$EXTERNALSYM DNS_RTYPE_MR}
+ DNS_RTYPE_NULL = $0a00; // 10
+ {$EXTERNALSYM DNS_RTYPE_NULL}
+ DNS_RTYPE_WKS = $0b00; // 11
+ {$EXTERNALSYM DNS_RTYPE_WKS}
+ DNS_RTYPE_PTR = $0c00; // 12
+ {$EXTERNALSYM DNS_RTYPE_PTR}
+ DNS_RTYPE_HINFO = $0d00; // 13
+ {$EXTERNALSYM DNS_RTYPE_HINFO}
+ DNS_RTYPE_MINFO = $0e00; // 14
+ {$EXTERNALSYM DNS_RTYPE_MINFO}
+ DNS_RTYPE_MX = $0f00; // 15
+ {$EXTERNALSYM DNS_RTYPE_MX}
+ DNS_RTYPE_TEXT = $1000; // 16
+ {$EXTERNALSYM DNS_RTYPE_TEXT}
+ DNS_RTYPE_RP = $1100; // 17
+ {$EXTERNALSYM DNS_RTYPE_RP}
+ DNS_RTYPE_AFSDB = $1200; // 18
+ {$EXTERNALSYM DNS_RTYPE_AFSDB}
+ DNS_RTYPE_X25 = $1300; // 19
+ {$EXTERNALSYM DNS_RTYPE_X25}
+ DNS_RTYPE_ISDN = $1400; // 20
+ {$EXTERNALSYM DNS_RTYPE_ISDN}
+ DNS_RTYPE_RT = $1500; // 21
+ {$EXTERNALSYM DNS_RTYPE_RT}
+ DNS_RTYPE_NSAP = $1600; // 22
+ {$EXTERNALSYM DNS_RTYPE_NSAP}
+ DNS_RTYPE_NSAPPTR = $1700; // 23
+ {$EXTERNALSYM DNS_RTYPE_NSAPPTR}
+ DNS_RTYPE_SIG = $1800; // 24
+ {$EXTERNALSYM DNS_RTYPE_SIG}
+ DNS_RTYPE_KEY = $1900; // 25
+ {$EXTERNALSYM DNS_RTYPE_KEY}
+ DNS_RTYPE_PX = $1a00; // 26
+ {$EXTERNALSYM DNS_RTYPE_PX}
+ DNS_RTYPE_GPOS = $1b00; // 27
+ {$EXTERNALSYM DNS_RTYPE_GPOS}
+ DNS_RTYPE_AAAA = $1c00; // 28
+ {$EXTERNALSYM DNS_RTYPE_AAAA}
+ DNS_RTYPE_LOC = $1d00; // 29
+ {$EXTERNALSYM DNS_RTYPE_LOC}
+ DNS_RTYPE_NXT = $1e00; // 30
+ {$EXTERNALSYM DNS_RTYPE_NXT}
+ DNS_RTYPE_EID = $1f00; // 31
+ {$EXTERNALSYM DNS_RTYPE_EID}
+ DNS_RTYPE_NIMLOC = $2000; // 32
+ {$EXTERNALSYM DNS_RTYPE_NIMLOC}
+ DNS_RTYPE_SRV = $2100; // 33
+ {$EXTERNALSYM DNS_RTYPE_SRV}
+ DNS_RTYPE_ATMA = $2200; // 34
+ {$EXTERNALSYM DNS_RTYPE_ATMA}
+ DNS_RTYPE_NAPTR = $2300; // 35
+ {$EXTERNALSYM DNS_RTYPE_NAPTR}
+ DNS_RTYPE_KX = $2400; // 36
+ {$EXTERNALSYM DNS_RTYPE_KX}
+ DNS_RTYPE_CERT = $2500; // 37
+ {$EXTERNALSYM DNS_RTYPE_CERT}
+ DNS_RTYPE_A6 = $2600; // 38
+ {$EXTERNALSYM DNS_RTYPE_A6}
+ DNS_RTYPE_DNAME = $2700; // 39
+ {$EXTERNALSYM DNS_RTYPE_DNAME}
+ DNS_RTYPE_SINK = $2800; // 40
+ {$EXTERNALSYM DNS_RTYPE_SINK}
+ DNS_RTYPE_OPT = $2900; // 41
+ {$EXTERNALSYM DNS_RTYPE_OPT}
+
+//
+// IANA Reserved
+//
+
+ DNS_RTYPE_UINFO = $6400; // 100
+ {$EXTERNALSYM DNS_RTYPE_UINFO}
+ DNS_RTYPE_UID = $6500; // 101
+ {$EXTERNALSYM DNS_RTYPE_UID}
+ DNS_RTYPE_GID = $6600; // 102
+ {$EXTERNALSYM DNS_RTYPE_GID}
+ DNS_RTYPE_UNSPEC = $6700; // 103
+ {$EXTERNALSYM DNS_RTYPE_UNSPEC}
+
+//
+// Query only types
+//
+
+ DNS_RTYPE_TKEY = $f900; // 249
+ {$EXTERNALSYM DNS_RTYPE_TKEY}
+ DNS_RTYPE_TSIG = $fa00; // 250
+ {$EXTERNALSYM DNS_RTYPE_TSIG}
+ DNS_RTYPE_IXFR = $fb00; // 251
+ {$EXTERNALSYM DNS_RTYPE_IXFR}
+ DNS_RTYPE_AXFR = $fc00; // 252
+ {$EXTERNALSYM DNS_RTYPE_AXFR}
+ DNS_RTYPE_MAILB = $fd00; // 253
+ {$EXTERNALSYM DNS_RTYPE_MAILB}
+ DNS_RTYPE_MAILA = $fe00; // 254
+ {$EXTERNALSYM DNS_RTYPE_MAILA}
+ DNS_RTYPE_ALL = $ff00; // 255
+ {$EXTERNALSYM DNS_RTYPE_ALL}
+ DNS_RTYPE_ANY = $ff00; // 255
+ {$EXTERNALSYM DNS_RTYPE_ANY}
+
+//
+// Temp Microsoft types -- use until get IANA approval for real type
+//
+
+ DNS_RTYPE_WINS = $01ff; // 64K - 255
+ {$EXTERNALSYM DNS_RTYPE_WINS}
+ DNS_RTYPE_WINSR = $02ff; // 64K - 254
+ {$EXTERNALSYM DNS_RTYPE_WINSR}
+
+//
+// Record type specific definitions
+//
+
+//
+// ATMA (ATM address type) formats
+//
+// Define these directly for any environment (ex NT4)
+// without winsock2 ATM support (ws2atm.h)
+//
+
+ DNS_ATMA_FORMAT_E164 = ATM_E164;
+ {$EXTERNALSYM DNS_ATMA_FORMAT_E164}
+ DNS_ATMA_FORMAT_AESA = ATM_AESA;
+ {$EXTERNALSYM DNS_ATMA_FORMAT_AESA}
+ DNS_ATMA_MAX_ADDR_LENGTH = ATM_ADDR_SIZE;
+ {$EXTERNALSYM DNS_ATMA_MAX_ADDR_LENGTH}
+
+ DNS_ATMA_AESA_ADDR_LENGTH = 20;
+ {$EXTERNALSYM DNS_ATMA_AESA_ADDR_LENGTH}
+ DNS_ATMA_MAX_RECORD_LENGTH = DNS_ATMA_MAX_ADDR_LENGTH + 1;
+ {$EXTERNALSYM DNS_ATMA_MAX_RECORD_LENGTH}
+
+//
+// DNSSEC defs
+//
+
+// DNSSEC algorithms
+
+ DNSSEC_ALGORITHM_RSAMD5 = 1;
+ {$EXTERNALSYM DNSSEC_ALGORITHM_RSAMD5}
+ DNSSEC_ALGORITHM_NULL = 253;
+ {$EXTERNALSYM DNSSEC_ALGORITHM_NULL}
+ DNSSEC_ALGORITHM_PRIVATE = 254;
+ {$EXTERNALSYM DNSSEC_ALGORITHM_PRIVATE}
+
+// DNSSEC KEY protocol table
+
+ DNSSEC_PROTOCOL_NONE = 0;
+ {$EXTERNALSYM DNSSEC_PROTOCOL_NONE}
+ DNSSEC_PROTOCOL_TLS = 1;
+ {$EXTERNALSYM DNSSEC_PROTOCOL_TLS}
+ DNSSEC_PROTOCOL_EMAIL = 2;
+ {$EXTERNALSYM DNSSEC_PROTOCOL_EMAIL}
+ DNSSEC_PROTOCOL_DNSSEC = 3;
+ {$EXTERNALSYM DNSSEC_PROTOCOL_DNSSEC}
+ DNSSEC_PROTOCOL_IPSEC = 4;
+ {$EXTERNALSYM DNSSEC_PROTOCOL_IPSEC}
+
+// DNSSEC KEY flag field
+
+ DNSSEC_KEY_FLAG_NOAUTH = $0001;
+ {$EXTERNALSYM DNSSEC_KEY_FLAG_NOAUTH}
+ DNSSEC_KEY_FLAG_NOCONF = $0002;
+ {$EXTERNALSYM DNSSEC_KEY_FLAG_NOCONF}
+ DNSSEC_KEY_FLAG_FLAG2 = $0004;
+ {$EXTERNALSYM DNSSEC_KEY_FLAG_FLAG2}
+ DNSSEC_KEY_FLAG_EXTEND = $0008;
+ {$EXTERNALSYM DNSSEC_KEY_FLAG_EXTEND}
+{$DEFINE DNSSEC_KEY_FLAG_}
+ DNSSEC_KEY_FLAG_FLAG4 = $0010;
+ {$EXTERNALSYM DNSSEC_KEY_FLAG_FLAG4}
+ DNSSEC_KEY_FLAG_FLAG5 = $0020;
+ {$EXTERNALSYM DNSSEC_KEY_FLAG_FLAG5}
+
+// bits 6,7 are name type
+
+ DNSSEC_KEY_FLAG_USER = $0000;
+ {$EXTERNALSYM DNSSEC_KEY_FLAG_USER}
+ DNSSEC_KEY_FLAG_ZONE = $0040;
+ {$EXTERNALSYM DNSSEC_KEY_FLAG_ZONE}
+ DNSSEC_KEY_FLAG_HOST = $0080;
+ {$EXTERNALSYM DNSSEC_KEY_FLAG_HOST}
+ DNSSEC_KEY_FLAG_NTPE3 = $00c0;
+ {$EXTERNALSYM DNSSEC_KEY_FLAG_NTPE3}
+
+// bits 8-11 are reserved for future use
+
+ DNSSEC_KEY_FLAG_FLAG8 = $0100;
+ {$EXTERNALSYM DNSSEC_KEY_FLAG_FLAG8}
+ DNSSEC_KEY_FLAG_FLAG9 = $0200;
+ {$EXTERNALSYM DNSSEC_KEY_FLAG_FLAG9}
+ DNSSEC_KEY_FLAG_FLAG10 = $0400;
+ {$EXTERNALSYM DNSSEC_KEY_FLAG_FLAG10}
+ DNSSEC_KEY_FLAG_FLAG11 = $0800;
+ {$EXTERNALSYM DNSSEC_KEY_FLAG_FLAG11}
+
+// bits 12-15 are sig field
+
+ DNSSEC_KEY_FLAG_SIG0 = $0000;
+ {$EXTERNALSYM DNSSEC_KEY_FLAG_SIG0}
+ DNSSEC_KEY_FLAG_SIG1 = $1000;
+ {$EXTERNALSYM DNSSEC_KEY_FLAG_SIG1}
+ DNSSEC_KEY_FLAG_SIG2 = $2000;
+ {$EXTERNALSYM DNSSEC_KEY_FLAG_SIG2}
+ DNSSEC_KEY_FLAG_SIG3 = $3000;
+ {$EXTERNALSYM DNSSEC_KEY_FLAG_SIG3}
+ DNSSEC_KEY_FLAG_SIG4 = $4000;
+ {$EXTERNALSYM DNSSEC_KEY_FLAG_SIG4}
+ DNSSEC_KEY_FLAG_SIG5 = $5000;
+ {$EXTERNALSYM DNSSEC_KEY_FLAG_SIG5}
+ DNSSEC_KEY_FLAG_SIG6 = $6000;
+ {$EXTERNALSYM DNSSEC_KEY_FLAG_SIG6}
+ DNSSEC_KEY_FLAG_SIG7 = $7000;
+ {$EXTERNALSYM DNSSEC_KEY_FLAG_SIG7}
+ DNSSEC_KEY_FLAG_SIG8 = $8000;
+ {$EXTERNALSYM DNSSEC_KEY_FLAG_SIG8}
+ DNSSEC_KEY_FLAG_SIG9 = $9000;
+ {$EXTERNALSYM DNSSEC_KEY_FLAG_SIG9}
+ DNSSEC_KEY_FLAG_SIG10 = $a000;
+ {$EXTERNALSYM DNSSEC_KEY_FLAG_SIG10}
+ DNSSEC_KEY_FLAG_SIG11 = $b000;
+ {$EXTERNALSYM DNSSEC_KEY_FLAG_SIG11}
+ DNSSEC_KEY_FLAG_SIG12 = $c000;
+ {$EXTERNALSYM DNSSEC_KEY_FLAG_SIG12}
+ DNSSEC_KEY_FLAG_SIG13 = $d000;
+ {$EXTERNALSYM DNSSEC_KEY_FLAG_SIG13}
+ DNSSEC_KEY_FLAG_SIG14 = $e000;
+ {$EXTERNALSYM DNSSEC_KEY_FLAG_SIG14}
+ DNSSEC_KEY_FLAG_SIG15 = $f000;
+ {$EXTERNALSYM DNSSEC_KEY_FLAG_SIG15}
+
+//
+// TKEY modes
+//
+
+ DNS_TKEY_MODE_SERVER_ASSIGN = 1;
+ {$EXTERNALSYM DNS_TKEY_MODE_SERVER_ASSIGN}
+ DNS_TKEY_MODE_DIFFIE_HELLMAN = 2;
+ {$EXTERNALSYM DNS_TKEY_MODE_DIFFIE_HELLMAN}
+ DNS_TKEY_MODE_GSS = 3;
+ {$EXTERNALSYM DNS_TKEY_MODE_GSS}
+ DNS_TKEY_MODE_RESOLVER_ASSIGN = 4;
+ {$EXTERNALSYM DNS_TKEY_MODE_RESOLVER_ASSIGN}
+
+//
+// WINS + NBSTAT flag field
+//
+
+ DNS_WINS_FLAG_SCOPE = DWORD($80000000);
+ {$EXTERNALSYM DNS_WINS_FLAG_SCOPE}
+ DNS_WINS_FLAG_LOCAL = $00010000;
+ {$EXTERNALSYM DNS_WINS_FLAG_LOCAL}
+
+//
+// Helpful checks
+//
+
+function IS_WORD_ALIGNED(P: Pointer): BOOL;
+{$EXTERNALSYM IS_DWORD_ALIGNED}
+
+function IS_DWORD_ALIGNED(P: Pointer): BOOL;
+{$EXTERNALSYM IS_DWORD_ALIGNED}
+
+function IS_QWORD_ALIGNED(P: Pointer): BOOL;
+{$EXTERNALSYM IS_QWORD_ALIGNED}
+
+//
+// DNS config API
+//
+
+//
+// Types of DNS configuration info
+//
+
+type
+ DNS_CONFIG_TYPE = (
+ // In Win2K
+ DnsConfigPrimaryDomainName_W,
+ DnsConfigPrimaryDomainName_A,
+ DnsConfigPrimaryDomainName_UTF8,
+
+ // Not available yet
+ DnsConfigAdapterDomainName_W,
+ DnsConfigAdapterDomainName_A,
+ DnsConfigAdapterDomainName_UTF8,
+
+ // In Win2K
+ DnsConfigDnsServerList,
+
+ // Not available yet
+ DnsConfigSearchList,
+ DnsConfigAdapterInfo,
+
+ // In Win2K
+ DnsConfigPrimaryHostNameRegistrationEnabled,
+ DnsConfigAdapterHostNameRegistrationEnabled,
+ DnsConfigAddressRegistrationMaxCount,
+
+ // In WindowsXP
+ DnsConfigHostName_W,
+ DnsConfigHostName_A,
+ DnsConfigHostName_UTF8,
+ DnsConfigFullHostName_W,
+ DnsConfigFullHostName_A,
+ DnsConfigFullHostName_UTF8);
+ {$EXTERNALSYM DNS_CONFIG_TYPE}
+ TDnsConfigType = DNS_CONFIG_TYPE;
+
+//
+// Config API flags
+//
+
+//
+// Causes config info to be allocated with LocalAlloc()
+//
+
+const
+ DNS_CONFIG_FLAG_ALLOC = $00000001;
+ {$EXTERNALSYM DNS_CONFIG_FLAG_ALLOC}
+
+function DnsQueryConfig(Config: DNS_CONFIG_TYPE; Flag: DWORD; pwsAdapterName: PWSTR; pReserved, pBuffer: PVOID; pBufferLength: PDWORD): DNS_STATUS; stdcall;
+{$EXTERNALSYM DnsQueryConfig}
+
+//
+// DNS resource record structure
+//
+
+//
+// Record data for specific types
+//
+
+type
+ PDNS_A_DATA = ^DNS_A_DATA;
+ {$EXTERNALSYM PDNS_A_DATA}
+ DNS_A_DATA = record
+ IpAddress: IP4_ADDRESS;
+ end;
+ {$EXTERNALSYM DNS_A_DATA}
+ TDnsAData = DNS_A_DATA;
+ PDnsAData = PDNS_A_DATA;
+
+ PDNS_PTR_DATA = ^DNS_PTR_DATA;
+ {$EXTERNALSYM PDNS_PTR_DATA}
+ DNS_PTR_DATA = record
+ pNameHost: LPTSTR;
+ end;
+ {$EXTERNALSYM DNS_PTR_DATA}
+ TDnsPtrData = DNS_PTR_DATA;
+ PDnsPtrData = PDNS_PTR_DATA;
+
+ PDNS_SOA_DATA = ^DNS_SOA_DATA;
+ {$EXTERNALSYM PDNS_SOA_DATA}
+ DNS_SOA_DATA = record
+ pNamePrimaryServer: LPTSTR;
+ pNameAdministrator: LPTSTR;
+ dwSerialNo: DWORD;
+ dwRefresh: DWORD;
+ dwRetry: DWORD;
+ dwExpire: DWORD;
+ dwDefaultTtl: DWORD;
+ end;
+ {$EXTERNALSYM DNS_SOA_DATA}
+ TDnsSoaData = DNS_SOA_DATA;
+ PDnsSoaData = PDNS_SOA_DATA;
+
+ PDNS_MINFO_DATA = ^DNS_MINFO_DATA;
+ {$EXTERNALSYM PDNS_MINFO_DATA}
+ DNS_MINFO_DATA = record
+ pNameMailbox: LPTSTR;
+ pNameErrorsMailbox: LPTSTR;
+ end;
+ {$EXTERNALSYM DNS_MINFO_DATA}
+ TDnsMinfoData = DNS_MINFO_DATA;
+ PDnsMinfoData = PDNS_MINFO_DATA;
+
+ PDNS_MX_DATA = ^DNS_MX_DATA;
+ {$EXTERNALSYM PDNS_MX_DATA}
+ DNS_MX_DATA = record
+ pNameExchange: LPTSTR;
+ wPreference: WORD;
+ Pad: WORD; // keep ptrs DWORD aligned
+ end;
+ {$EXTERNALSYM DNS_MX_DATA}
+ TDnsMxData = DNS_MX_DATA;
+ PDnsMxData = PDNS_MX_DATA;
+
+ PDNS_TXT_DATA = ^DNS_TXT_DATA;
+ {$EXTERNALSYM PDNS_TXT_DATA}
+ DNS_TXT_DATA = record
+ dwStringCount: DWORD;
+ pStringArray: array [0..0] of LPTSTR;
+ end;
+ {$EXTERNALSYM DNS_TXT_DATA}
+ TDnsTxtData = DNS_TXT_DATA;
+ PDnsTxtData = PDNS_TXT_DATA;
+
+ PDNS_NULL_DATA = ^DNS_NULL_DATA;
+ {$EXTERNALSYM PDNS_NULL_DATA}
+ DNS_NULL_DATA = record
+ dwByteCount: DWORD;
+ Data: array [0..0] of BYTE;
+ end;
+ {$EXTERNALSYM DNS_NULL_DATA}
+ TDnsNullData = DNS_NULL_DATA;
+ PDnsNullData = PDNS_NULL_DATA;
+
+ PDNS_WKS_DATA = ^DNS_WKS_DATA;
+ {$EXTERNALSYM PDNS_WKS_DATA}
+ DNS_WKS_DATA = record
+ IpAddress: IP4_ADDRESS;
+ chProtocol: UCHAR;
+ BitMask: array [0..0] of BYTE;
+ end;
+ {$EXTERNALSYM DNS_WKS_DATA}
+ TDnsWksData = DNS_WKS_DATA;
+ PDnsWksData = PDNS_WKS_DATA;
+
+ PDNS_AAAA_DATA = ^DNS_AAAA_DATA;
+ {$EXTERNALSYM PDNS_AAAA_DATA}
+ DNS_AAAA_DATA = record
+ Ip6Address: DNS_IP6_ADDRESS;
+ end;
+ {$EXTERNALSYM DNS_AAAA_DATA}
+ TDnsAaaaData = DNS_AAAA_DATA;
+ PDnsAaaaData = PDNS_AAAA_DATA;
+
+ PDNS_SIG_DATA = ^DNS_SIG_DATA;
+ {$EXTERNALSYM PDNS_SIG_DATA}
+ DNS_SIG_DATA = record
+ pNameSigner: LPTSTR;
+ wTypeCovered: WORD;
+ chAlgorithm: BYTE;
+ chLabelCount: BYTE;
+ dwOriginalTtl: DWORD;
+ dwExpiration: DWORD;
+ dwTimeSigned: DWORD;
+ wKeyTag: WORD;
+ Pad: WORD; // keep byte field aligned
+ Signature: array [0..0] of BYTE;
+ end;
+ {$EXTERNALSYM DNS_SIG_DATA}
+ TDnsSigData = DNS_SIG_DATA;
+ PDnsSigData = PDNS_SIG_DATA;
+
+ PDNS_KEY_DATA = ^DNS_KEY_DATA;
+ {$EXTERNALSYM PDNS_KEY_DATA}
+ DNS_KEY_DATA = record
+ wFlags: WORD;
+ chProtocol: BYTE;
+ chAlgorithm: BYTE;
+ Key: array [0..1 - 1] of BYTE;
+ end;
+ {$EXTERNALSYM DNS_KEY_DATA}
+ TDnsKeyData = DNS_KEY_DATA;
+ PDnsKeyData = PDNS_KEY_DATA;
+
+ PDNS_LOC_DATA = ^DNS_LOC_DATA;
+ {$EXTERNALSYM PDNS_LOC_DATA}
+ DNS_LOC_DATA = record
+ wVersion: WORD;
+ wSize: WORD;
+ wHorPrec: WORD;
+ wVerPrec: WORD;
+ dwLatitude: DWORD;
+ dwLongitude: DWORD;
+ dwAltitude: DWORD;
+ end;
+ {$EXTERNALSYM DNS_LOC_DATA}
+ TDnsLocData = DNS_LOC_DATA;
+ PDnsLocData = PDNS_LOC_DATA;
+
+ PDNS_NXT_DATA = ^DNS_NXT_DATA;
+ {$EXTERNALSYM PDNS_NXT_DATA}
+ DNS_NXT_DATA = record
+ pNameNext: LPTSTR;
+ wNumTypes: WORD;
+ wTypes: array [0..0] of WORD;
+ end;
+ {$EXTERNALSYM DNS_NXT_DATA}
+ TDnsNxtData = DNS_NXT_DATA;
+ PDnsNxtData = PDNS_NXT_DATA;
+
+ PDNS_SRV_DATA = ^DNS_SRV_DATA;
+ {$EXTERNALSYM PDNS_SRV_DATA}
+ DNS_SRV_DATA = record
+ pNameTarget: LPTSTR;
+ wPriority: WORD;
+ wWeight: WORD;
+ wPort: WORD;
+ Pad: WORD; // keep ptrs DWORD aligned
+ end;
+ {$EXTERNALSYM DNS_SRV_DATA}
+ TDnsSrvData = DNS_SRV_DATA;
+ PDnsSrvData = PDNS_SRV_DATA;
+
+ PDNS_ATMA_DATA = ^DNS_ATMA_DATA;
+ {$EXTERNALSYM PDNS_ATMA_DATA}
+ DNS_ATMA_DATA = record
+ AddressType: BYTE;
+ Address: array [0..DNS_ATMA_MAX_ADDR_LENGTH - 1] of BYTE;
+ // E164 -- Null terminated string of less than
+ // DNS_ATMA_MAX_ADDR_LENGTH
+ //
+ // For NSAP (AESA) BCD encoding of exactly
+ // DNS_ATMA_AESA_ADDR_LENGTH
+ end;
+ {$EXTERNALSYM DNS_ATMA_DATA}
+ TDnsAtmaData = DNS_ATMA_DATA;
+ PDnsAtmaData = PDNS_ATMA_DATA;
+
+ PDNS_TKEY_DATA = ^DNS_TKEY_DATA;
+ {$EXTERNALSYM PDNS_TKEY_DATA}
+ DNS_TKEY_DATA = record
+ pNameAlgorithm: LPTSTR;
+ pAlgorithmPacket: PBYTE;
+ pKey: PBYTE;
+ pOtherData: PBYTE;
+ dwCreateTime: DWORD;
+ dwExpireTime: DWORD;
+ wMode: WORD;
+ wError: WORD;
+ wKeyLength: WORD;
+ wOtherLength: WORD;
+ cAlgNameLength: UCHAR;
+ bPacketPointers: BOOL;
+ end;
+ {$EXTERNALSYM DNS_TKEY_DATA}
+ TDnsTkeyData = DNS_TKEY_DATA;
+ PDnsTkeyData = PDNS_TKEY_DATA;
+
+ PDNS_TSIG_DATA = ^DNS_TSIG_DATA;
+ {$EXTERNALSYM PDNS_TSIG_DATA}
+ DNS_TSIG_DATA = record
+ pNameAlgorithm: LPTSTR;
+ pAlgorithmPacket: PBYTE;
+ pSignature: PBYTE;
+ pOtherData: PBYTE;
+ i64CreateTime: LONGLONG;
+ wFudgeTime: WORD;
+ wOriginalXid: WORD;
+ wError: WORD;
+ wSigLength: WORD;
+ wOtherLength: WORD;
+ cAlgNameLength: UCHAR;
+ bPacketPointers: BOOL;
+ end;
+ {$EXTERNALSYM DNS_TSIG_DATA}
+ TDnsTsigData = DNS_TSIG_DATA;
+ PDnsTsigData = PDNS_TSIG_DATA;
+
+//
+// MS only types -- only hit the wire in MS-MS zone transfer
+//
+
+ PDNS_WINS_DATA = ^DNS_WINS_DATA;
+ {$EXTERNALSYM PDNS_WINS_DATA}
+ DNS_WINS_DATA = record
+ dwMappingFlag: DWORD;
+ dwLookupTimeout: DWORD;
+ dwCacheTimeout: DWORD;
+ cWinsServerCount: DWORD;
+ WinsServers: array [0..0] of IP4_ADDRESS;
+ end;
+ {$EXTERNALSYM DNS_WINS_DATA}
+ TDnsWinsData = DNS_WINS_DATA;
+ PDnsWinsData = PDNS_WINS_DATA;
+
+ PDNS_WINSR_DATA = ^DNS_WINSR_DATA;
+ {$EXTERNALSYM PDNS_WINSR_DATA}
+ DNS_WINSR_DATA = record
+ dwMappingFlag: DWORD;
+ dwLookupTimeout: DWORD;
+ dwCacheTimeout: DWORD;
+ pNameResultDomain: LPTSTR;
+ end;
+ {$EXTERNALSYM DNS_WINSR_DATA}
+ TDnsWinsrData = DNS_WINSR_DATA;
+ PDnsWinsrData = PDNS_WINSR_DATA;
+
+//
+// Length of non-fixed-length data types
+//
+
+function DNS_TEXT_RECORD_LENGTH(StringCount: Integer): Integer;
+{$EXTERNALSYM DNS_TEXT_RECORD_LENGTH}
+
+function DNS_NULL_RECORD_LENGTH(ByteCount: Integer): Integer;
+{$EXTERNALSYM DNS_NULL_RECORD_LENGTH}
+
+function DNS_WKS_RECORD_LENGTH(ByteCount: Integer): Integer;
+{$EXTERNALSYM DNS_WKS_RECORD_LENGTH}
+
+//function DNS_WINS_RECORD_LENGTH(IpCount: Integer): Integer;
+//{$EXTERNALSYM DNS_WINS_RECORD_LENGTH}
+
+//
+// Record flags
+//
+
+type
+ _DnsRecordFlags = record
+ //DWORD Section : 2;
+ //DWORD Delete : 1;
+ //DWORD CharSet : 2;
+ //DWORD Unused : 3;
+ //DWORD Reserved : 24;
+ Flags: DWORD;
+ end;
+ {$EXTERNALSYM _DnsRecordFlags}
+ DNS_RECORD_FLAGS = _DnsRecordFlags;
+ {$EXTERNALSYM DNS_RECORD_FLAGS}
+ TDnsRecordFlags = DNS_RECORD_FLAGS;
+ PDnsRecordFlags = ^DNS_RECORD_FLAGS;
+
+//
+// Wire Record Sections
+//
+// Useable both in record flags "Section" and as index into
+// wire message header section counts.
+//
+
+ _DnsSection = (
+ DnsSectionQuestion,
+ DnsSectionAnswer,
+ DnsSectionAuthority,
+ DnsSectionAddtional);
+ {$EXTERNALSYM _DnsSection}
+ DNS_SECTION = _DnsSection;
+ TDnsSection = _DnsSection;
+
+// Update message section names
+
+const
+ DnsSectionZone = DnsSectionQuestion;
+ {$EXTERNALSYM DnsSectionZone}
+ DnsSectionPrereq = DnsSectionAnswer;
+ {$EXTERNALSYM DnsSectionPrereq}
+ DnsSectionUpdate = DnsSectionAuthority;
+ {$EXTERNALSYM DnsSectionUpdate}
+
+//
+// Record flags as bit flags
+// These may be or'd together to set the fields
+//
+
+// RR Section in packet
+
+ DNSREC_SECTION = $00000003;
+ {$EXTERNALSYM DNSREC_SECTION}
+
+ DNSREC_QUESTION = $00000000;
+ {$EXTERNALSYM DNSREC_QUESTION}
+ DNSREC_ANSWER = $00000001;
+ {$EXTERNALSYM DNSREC_ANSWER}
+ DNSREC_AUTHORITY = $00000002;
+ {$EXTERNALSYM DNSREC_AUTHORITY}
+ DNSREC_ADDITIONAL = $00000003;
+ {$EXTERNALSYM DNSREC_ADDITIONAL}
+
+// RR Section in packet (update)
+
+ DNSREC_ZONE = $00000000;
+ {$EXTERNALSYM DNSREC_ZONE}
+ DNSREC_PREREQ = $00000001;
+ {$EXTERNALSYM DNSREC_PREREQ}
+ DNSREC_UPDATE = $00000002;
+ {$EXTERNALSYM DNSREC_UPDATE}
+
+// Delete RR (update) or No-exist (prerequisite)
+
+ DNSREC_DELETE = $00000004;
+ {$EXTERNALSYM DNSREC_DELETE}
+ DNSREC_NOEXIST = $00000004;
+ {$EXTERNALSYM DNSREC_NOEXIST}
+
+//
+// Record \ RR set structure
+//
+// Note: The dwReserved flag serves to insure that the substructures
+// start on 64-bit boundaries. Do NOT pack this structure, as the
+// substructures may contain pointers or int64 values which are
+// properly aligned unpacked.
+//
+
+type
+ PDNS_RECORD = ^DNS_RECORD;
+ {$EXTERNALSYM PDNS_RECORD}
+ _DnsRecord = record
+ pNext: PDNS_RECORD;
+ pName: LPTSTR;
+ wType: WORD;
+ wDataLength: WORD; // Not referenced for DNS record types defined above.
+ Flags: record
+ case Integer of
+ 0: (DW: DWORD); // flags as DWORD
+ 1: (S: DNS_RECORD_FLAGS); // flags as structure
+ end;
+ dwTtl: DWORD;
+ dwReserved: DWORD;
+
+ // Record Data
+
+ Data: record
+ case Integer of
+ 0: (A: DNS_A_DATA);
+ 1: (SOA, Soa_: DNS_SOA_DATA);
+ 2: (PTR, Ptr_,
+ NS, Ns_,
+ CNAME, Cname_,
+ MB, Mb_,
+ MD, Md_,
+ MF, Mf_,
+ MG, Mg_,
+ MR, Mr_: DNS_PTR_DATA);
+ 3: (MINFO, Minfo_,
+ RP, Rp_: DNS_MINFO_DATA);
+ 4: (MX, Mx_,
+ AFSDB, Afsdb_,
+ RT, Rt_: DNS_MX_DATA);
+ 5: (HINFO, Hinfo_,
+ ISDN, Isdn_,
+ TXT, Txt_,
+ X25: DNS_TXT_DATA);
+ 6: (Null: DNS_NULL_DATA);
+ 7: (WKS, Wks_: DNS_WKS_DATA);
+ 8: (AAAA: DNS_AAAA_DATA);
+ 9: (KEY, Key_: DNS_KEY_DATA);
+ 10: (SIG, Sig_: DNS_SIG_DATA);
+ 11: (ATMA, Atma_: DNS_ATMA_DATA);
+ 12: (NXT, Nxt_: DNS_NXT_DATA);
+ 13: (SRV, Srv_: DNS_SRV_DATA);
+ 14: (TKEY, Tkey_: DNS_TKEY_DATA);
+ 15: (TSIG, Tsig_: DNS_TSIG_DATA);
+ 16: (WINS, Wins_: DNS_WINS_DATA);
+ 17: (WINSR, WinsR_, NBSTAT, Nbstat_: DNS_WINSR_DATA);
+ end;
+ end;
+ {$EXTERNALSYM _DnsRecord}
+ DNS_RECORD = _DnsRecord;
+ {$EXTERNALSYM DNS_RECORD}
+ PPDNS_RECORD = ^PDNS_RECORD;
+ {$NODEFINE PPDNS_RECORD}
+ TDnsRecord = DNS_RECORD;
+ PDnsRecord = PDNS_RECORD;
+
+//
+// Header or fixed size of DNS_RECORD
+//
+
+const
+ DNS_RECORD_FIXED_SIZE = 24; // FIELD_OFFSET( DNS_RECORD, Data )
+ {$EXTERNALSYM DNS_RECORD_FIXED_SIZE}
+ SIZEOF_DNS_RECORD_HEADER = DNS_RECORD_FIXED_SIZE;
+ {$EXTERNALSYM SIZEOF_DNS_RECORD_HEADER}
+
+//
+// Resource record set building
+//
+// pFirst points to first record in list.
+// pLast points to last record in list.
+//
+
+type
+ PDnsRRSet = ^DnsRRSet;
+ {$EXTERNALSYM PDnsRRSet}
+ _DnsRRSet = record
+ pFirstRR: PDNS_RECORD;
+ pLastRR: PDNS_RECORD;
+ end;
+ {$EXTERNALSYM _DnsRRSet}
+ DnsRRSet = _DnsRRSet;
+ {$EXTERNALSYM DnsRRSet}
+ TDnsrrset = DnsRRSet;
+
+//
+// To init pFirst is NULL.
+// But pLast points at the location of the pFirst pointer -- essentially
+// treating the pFirst ptr as a DNS_RECORD. (It is a DNS_RECORD with
+// only a pNext field, but that's the only part we use.)
+//
+// Then when the first record is added to the list, the pNext field of
+// this dummy record (which corresponds to pFirst's value) is set to
+// point at the first record. So pFirst then properly points at the
+// first record.
+//
+// (This works only because pNext is the first field in a
+// DNS_RECORD structure and hence casting a PDNS_RECORD ptr to
+// PDNS_RECORD* and dereferencing yields its pNext field)
+//
+// Use TERMINATE when have built RR set by grabbing records out of
+// existing set. This makes sure that at the end, the last RR is
+// properly NULL terminated.
+//
+
+procedure DNS_RRSET_INIT(rrset: PDnsRRSet);
+{$EXTERNALSYM DNS_RRSET_INIT}
+
+//procedure DNS_RRSET_ADD(rrset, pnewRR: PDNS_RRSET);
+//{$EXTERNALSYM DNS_RRSET_ADD}
+
+procedure DNS_RRSET_TERMINATE(rrset: PDnsRRSet);
+{$EXTERNALSYM DNS_RRSET_TERMINATE}
+
+//
+// Record set manipulation
+//
+
+//
+// Record Copy
+// Record copy functions also do conversion between character sets.
+//
+// Note, it might be advisable to directly expose non-Ex copy
+// functions _W, _A for record and set, to avoid exposing the
+// conversion enum.
+//
+
+type
+ _DNS_CHARSET = (
+ DnsCharSetUnknown,
+ DnsCharSetUnicode,
+ DnsCharSetUtf8,
+ DnsCharSetAnsi);
+ {$EXTERNALSYM _DNS_CHARSET}
+ DNS_CHARSET = _DNS_CHARSET;
+ {$EXTERNALSYM DNS_CHARSET}
+ TDnsCharSet = DNS_CHARSET;
+ PDnsCharSet = ^DNS_CHARSET;
+
+function DnsRecordCopyEx(pRecord: PDNS_RECORD; CharSetIn: DNS_CHARSET; CharSetOut: DNS_CHARSET): PDNS_RECORD; stdcall;
+{$EXTERNALSYM DnsRecordCopyEx}
+
+function DnsRecordSetCopyEx(pRecordSet: PDNS_RECORD; CharSetIn: DNS_CHARSET; CharSetOut: DNS_CHARSET): PDNS_RECORD; stdcall;
+{$EXTERNALSYM DnsRecordSetCopyEx}
+
+function DnsRecordCopy(pRR: PDNS_RECORD): PDNS_RECORD;
+{$EXTERNALSYM DnsRecordCopy}
+
+function DnsRecordSetCopy(pRR: PDNS_RECORD): PDNS_RECORD;
+{$EXTERNALSYM DnsRecordSetCopy}
+
+//
+// Record Compare
+//
+// Note: these routines only compare records of the SAME character set.
+// (ANSI, unicode or UTF8). Furthermore the routines assume the character
+// set is indicated within the record. If compare of user created, rather
+// than DNS API created record lists is desired, then caller should use
+// DnsRecordCopy API and compare copies.
+//
+
+function DnsRecordCompare(pRecord1: PDNS_RECORD; pRecord2: PDNS_RECORD): BOOL; stdcall;
+{$EXTERNALSYM DnsRecordCompare}
+
+function DnsRecordSetCompare(pRR1: PDNS_RECORD; pRR2: PDNS_RECORD; var ppDiff1, ppDiff2: PDNS_RECORD): BOOL; stdcall;
+{$EXTERNALSYM DnsRecordSetCompare}
+
+//
+// Detach next record set from record list
+//
+
+function DnsRecordSetDetach(pRecordList: PDNS_RECORD): PDNS_RECORD; stdcall;
+{$EXTERNALSYM DnsRecordSetDetach}
+
+//
+// Free record list
+//
+// Only supported free is deep free of entire record list with LocalFree().
+// This correctly frees record list returned by DnsQuery() or DnsRecordSetCopy()
+//
+
+type
+ DNS_FREE_TYPE = (DnsFreeFlat, DnsFreeRecordList);
+ {$EXTERNALSYM DNS_FREE_TYPE}
+ TDnsFreeType = DNS_FREE_TYPE;
+
+procedure DnsFreeRecordListDeep(pRecordList: PDNS_RECORD; FreeType: DNS_FREE_TYPE); stdcall;
+{$EXTERNALSYM DnsFreeRecordListDeep}
+
+procedure DnsRecordListFree(pRecordList: PDNS_RECORD; FreeType: DNS_FREE_TYPE); stdcall;
+{$EXTERNALSYM DnsRecordListFree}
+
+procedure DnsFree(pData: PVOID; FreeType: DNS_FREE_TYPE); stdcall;
+{$EXTERNALSYM DnsFree}
+
+//
+// DNS Query API
+//
+
+//
+// Options for DnsQuery
+//
+
+const
+ DNS_QUERY_STANDARD = $00000000;
+ {$EXTERNALSYM DNS_QUERY_STANDARD}
+ DNS_QUERY_ACCEPT_TRUNCATED_RESPONSE = $00000001;
+ {$EXTERNALSYM DNS_QUERY_ACCEPT_TRUNCATED_RESPONSE}
+ DNS_QUERY_USE_TCP_ONLY = $00000002;
+ {$EXTERNALSYM DNS_QUERY_USE_TCP_ONLY}
+ DNS_QUERY_NO_RECURSION = $00000004;
+ {$EXTERNALSYM DNS_QUERY_NO_RECURSION}
+ DNS_QUERY_BYPASS_CACHE = $00000008;
+ {$EXTERNALSYM DNS_QUERY_BYPASS_CACHE}
+
+ DNS_QUERY_NO_WIRE_QUERY = $00000010;
+ {$EXTERNALSYM DNS_QUERY_NO_WIRE_QUERY}
+ DNS_QUERY_NO_LOCAL_NAME = $00000020;
+ {$EXTERNALSYM DNS_QUERY_NO_LOCAL_NAME}
+ DNS_QUERY_NO_HOSTS_FILE = $00000040;
+ {$EXTERNALSYM DNS_QUERY_NO_HOSTS_FILE}
+ DNS_QUERY_NO_NETBT = $00000080;
+ {$EXTERNALSYM DNS_QUERY_NO_NETBT}
+
+ DNS_QUERY_WIRE_ONLY = $00000100;
+ {$EXTERNALSYM DNS_QUERY_WIRE_ONLY}
+ DNS_QUERY_RETURN_MESSAGE = $00000200;
+ {$EXTERNALSYM DNS_QUERY_RETURN_MESSAGE}
+
+ DNS_QUERY_TREAT_AS_FQDN = $00001000;
+ {$EXTERNALSYM DNS_QUERY_TREAT_AS_FQDN}
+ DNS_QUERY_DONT_RESET_TTL_VALUES = $00100000;
+ {$EXTERNALSYM DNS_QUERY_DONT_RESET_TTL_VALUES}
+ DNS_QUERY_RESERVED = DWORD($ff000000);
+ {$EXTERNALSYM DNS_QUERY_RESERVED}
+
+// Backward compatibility with Win2K
+// Do not use
+
+ DNS_QUERY_CACHE_ONLY = DNS_QUERY_NO_WIRE_QUERY;
+ {$EXTERNALSYM DNS_QUERY_CACHE_ONLY}
+
+function DnsQuery_A(pszName: PCSTR; wType: WORD; Options: DWORD; aipServers: PIP4_ARRAY; ppQueryResults: PPDNS_RECORD; pReserved: PPVOID): DNS_STATUS; stdcall;
+{$EXTERNALSYM DnsQuery_A}
+
+function DnsQuery_UTF8(pszName: PCSTR; wType: WORD; Options: DWORD; aipServers: PIP4_ARRAY; ppQueryResults: PPDNS_RECORD; pReserved: PPVOID): DNS_STATUS; stdcall;
+{$EXTERNALSYM DnsQuery_UTF8}
+
+function DnsQuery_W(pszName: LPCWSTR; wType: WORD; Options: DWORD; aipServers: PIP4_ARRAY; ppQueryResults: PPDNS_RECORD; pReserved: PPVOID): DNS_STATUS; stdcall;
+{$EXTERNALSYM DnsQuery_W}
+
+function DnsQuery(pszName: LPCTSTR; wType: WORD; Options: DWORD; aipServers: PIP4_ARRAY; ppQueryResults: PPDNS_RECORD; pReserved: PPVOID): DNS_STATUS; stdcall;
+{$EXTERNALSYM DnsQuery}
+
+//
+// DNS Update API
+//
+// DnsAcquireContextHandle
+// DnsReleaseContextHandle
+// DnsModifyRecordsInSet
+// DnsReplaceRecordSet
+//
+
+//
+// Update flags
+//
+
+const
+ DNS_UPDATE_SECURITY_USE_DEFAULT = $00000000;
+ {$EXTERNALSYM DNS_UPDATE_SECURITY_USE_DEFAULT}
+ DNS_UPDATE_SECURITY_OFF = $00000010;
+ {$EXTERNALSYM DNS_UPDATE_SECURITY_OFF}
+ DNS_UPDATE_SECURITY_ON = $00000020;
+ {$EXTERNALSYM DNS_UPDATE_SECURITY_ON}
+ DNS_UPDATE_SECURITY_ONLY = $00000100;
+ {$EXTERNALSYM DNS_UPDATE_SECURITY_ONLY}
+ DNS_UPDATE_CACHE_SECURITY_CONTEXT = $00000200;
+ {$EXTERNALSYM DNS_UPDATE_CACHE_SECURITY_CONTEXT}
+ DNS_UPDATE_TEST_USE_LOCAL_SYS_ACCT = $00000400;
+ {$EXTERNALSYM DNS_UPDATE_TEST_USE_LOCAL_SYS_ACCT}
+ DNS_UPDATE_FORCE_SECURITY_NEGO = $00000800;
+ {$EXTERNALSYM DNS_UPDATE_FORCE_SECURITY_NEGO}
+ DNS_UPDATE_TRY_ALL_MASTER_SERVERS = $00001000;
+ {$EXTERNALSYM DNS_UPDATE_TRY_ALL_MASTER_SERVERS}
+ DNS_UPDATE_SKIP_NO_UPDATE_ADAPTERS = $00002000;
+ {$EXTERNALSYM DNS_UPDATE_SKIP_NO_UPDATE_ADAPTERS}
+ DNS_UPDATE_RESERVED = DWORD($ffff0000);
+ {$EXTERNALSYM DNS_UPDATE_RESERVED}
+
+//
+// Note: pCredentials paramater is currently respectively
+// PSEC_WINNT_AUTH_IDENTITY_W or PSEC_WINNT_AUTH_IDENTITY_A.
+// Using PVOID to obviate the need for including rpcdce.h
+// in order to include this file and to leave open the
+// possibility of alternative credential specifications in
+// the future.
+//
+
+function DnsAcquireContextHandle_W(CredentialFlags: DWORD; pCredentials: PVOID; pContextHandle: PHANDLE): DNS_STATUS; stdcall;
+{$EXTERNALSYM DnsAcquireContextHandle_W}
+
+function DnsAcquireContextHandle_A(CredentialFlags: DWORD; pCredentials: PVOID; pContextHandle: PHANDLE): DNS_STATUS; stdcall;
+{$EXTERNALSYM DnsAcquireContextHandle_A}
+
+function DnsAcquireContextHandle(CredentialFlags: DWORD; pCredentials: PVOID; pContextHandle: PHANDLE): DNS_STATUS; stdcall;
+{$EXTERNALSYM DnsAcquireContextHandle}
+
+procedure DnsReleaseContextHandle(hContext: HANDLE); stdcall;
+{$EXTERNALSYM DnsReleaseContextHandle}
+
+//
+// Dynamic Update API
+//
+
+function DnsModifyRecordsInSet_W(pAddRecords: PDNS_RECORD; pDeleteRecords: PDNS_RECORD; Options: DWORD; hContext: HANDLE; pServerList: PIP4_ARRAY; pReserved: PVOID): DNS_STATUS; stdcall;
+{$EXTERNALSYM DnsModifyRecordsInSet_W}
+
+function DnsModifyRecordsInSet_A(pAddRecords: PDNS_RECORD; pDeleteRecords: PDNS_RECORD; Options: DWORD; hContext: HANDLE; pServerList: PIP4_ARRAY; pReserved: PVOID): DNS_STATUS; stdcall;
+{$EXTERNALSYM DnsModifyRecordsInSet_A}
+
+function DnsModifyRecordsInSet_UTF8(pAddRecords: PDNS_RECORD; pDeleteRecords: PDNS_RECORD; Options: DWORD; hContext: HANDLE; pServerList: PIP4_ARRAY; pReserved: PVOID): DNS_STATUS; stdcall;
+{$EXTERNALSYM DnsModifyRecordsInSet_UTF8}
+
+function DnsModifyRecordsInSet(pAddRecords: PDNS_RECORD; pDeleteRecords: PDNS_RECORD; Options: DWORD; hContext: HANDLE; pServerList: PIP4_ARRAY; pReserved: PVOID): DNS_STATUS; stdcall;
+{$EXTERNALSYM DnsModifyRecordsInSet}
+
+function DnsReplaceRecordSetW(pNewSet: PDNS_RECORD; Options: DWORD; hContext: HANDLE; pServerList: PIP4_ARRAY; pReserved: PVOID): DNS_STATUS; stdcall;
+{$EXTERNALSYM DnsReplaceRecordSetW}
+
+function DnsReplaceRecordSetA(pNewSet: PDNS_RECORD; Options: DWORD; hContext: HANDLE; pServerList: PIP4_ARRAY; pReserved: PVOID): DNS_STATUS; stdcall;
+{$EXTERNALSYM DnsReplaceRecordSetA}
+
+function DnsReplaceRecordSetUTF8(pNewSet: PDNS_RECORD; Options: DWORD; hContext: HANDLE; pServerList: PIP4_ARRAY; pReserved: PVOID): DNS_STATUS; stdcall;
+{$EXTERNALSYM DnsReplaceRecordSetUTF8}
+
+function DnsReplaceRecordSet(pNewSet: PDNS_RECORD; Options: DWORD; hContext: HANDLE; pServerList: PIP4_ARRAY; pReserved: PVOID): DNS_STATUS; stdcall;
+{$EXTERNALSYM DnsReplaceRecordSet}
+
+//
+// DNS name validation
+//
+
+type
+ _DNS_NAME_FORMAT = (
+ DnsNameDomain,
+ DnsNameDomainLabel,
+ DnsNameHostnameFull,
+ DnsNameHostnameLabel,
+ DnsNameWildcard,
+ DnsNameSrvRecord);
+ {$EXTERNALSYM _DNS_NAME_FORMAT}
+ DNS_NAME_FORMAT = _DNS_NAME_FORMAT;
+ {$EXTERNALSYM DNS_NAME_FORMAT}
+ TDnsNameFormat = DNS_NAME_FORMAT;
+ PDnsNameFormat = ^DNS_NAME_FORMAT;
+
+function DnsValidateName_UTF8(pszName: LPCSTR; Format: DNS_NAME_FORMAT): DNS_STATUS; stdcall;
+{$EXTERNALSYM DnsValidateName_UTF8}
+
+function DnsValidateName_W(pwszName: LPCWSTR; Format: DNS_NAME_FORMAT): DNS_STATUS; stdcall;
+{$EXTERNALSYM DnsValidateName_W}
+
+function DnsValidateName_A(pszName: LPCSTR; Format: DNS_NAME_FORMAT): DNS_STATUS; stdcall;
+{$EXTERNALSYM DnsValidateName_A}
+
+function DnsValidateName(pszName: LPCTSTR; Format: DNS_NAME_FORMAT): DNS_STATUS;
+{$EXTERNALSYM DnsValidateName}
+
+//
+// DNS name comparison
+//
+
+function DnsNameCompare_A(pName1: LPSTR; pName2: LPSTR): BOOL; stdcall;
+{$EXTERNALSYM DnsNameCompare_A}
+
+function DnsNameCompare_W(pName1: LPWSTR; pName2: LPWSTR): BOOL; stdcall;
+{$EXTERNALSYM DnsNameCompare_W}
+
+function DnsNameCompare(pName1: LPTSTR; pName2: LPTSTR): BOOL; stdcall;
+{$EXTERNALSYM DnsNameCompare}
+
+//
+// DNS message "roll-your-own" routines
+//
+
+type
+ PDNS_MESSAGE_BUFFER = ^DNS_MESSAGE_BUFFER;
+ {$EXTERNALSYM PDNS_MESSAGE_BUFFER}
+ _DNS_MESSAGE_BUFFER = record
+ MessageHead: DNS_HEADER;
+ MessageBody: array [0..0] of CHAR;
+ end;
+ {$EXTERNALSYM _DNS_MESSAGE_BUFFER}
+ DNS_MESSAGE_BUFFER = _DNS_MESSAGE_BUFFER;
+ {$EXTERNALSYM DNS_MESSAGE_BUFFER}
+ TDnsMessageBuffer = DNS_MESSAGE_BUFFER;
+ PDnsMessageBuffer = PDNS_MESSAGE_BUFFER;
+
+function DnsWriteQuestionToBuffer_W(pDnsBuffer: PDNS_MESSAGE_BUFFER; pdwBufferSize: LPDWORD; pszName: LPWSTR; wType: WORD; Xid: WORD; fRecursionDesired: BOOL): BOOL; stdcall;
+{$EXTERNALSYM DnsWriteQuestionToBuffer_W}
+
+function DnsWriteQuestionToBuffer_UTF8(pDnsBuffer: PDNS_MESSAGE_BUFFER; pdwBufferSize: LPDWORD; pszName: LPSTR; wType: WORD; Xid: WORD; fRecursionDesired: BOOL): BOOL; stdcall;
+{$EXTERNALSYM DnsWriteQuestionToBuffer_UTF8}
+
+function DnsExtractRecordsFromMessage_W(pDnsBuffer: PDNS_MESSAGE_BUFFER; wMessageLength: WORD; ppRecord: PPDNS_RECORD): DNS_STATUS; stdcall;
+{$EXTERNALSYM DnsExtractRecordsFromMessage_W}
+
+function DnsExtractRecordsFromMessage_UTF8(pDnsBuffer: PDNS_MESSAGE_BUFFER; wMessageLength: WORD; ppRecord: PPDNS_RECORD): DNS_STATUS; stdcall;
+{$EXTERNALSYM DnsExtractRecordsFromMessage_UTF8}
+
+implementation
+
+const
+ dnsapi = 'dnsapi.dll';
+ {$IFDEF UNICODE}
+ AWSuffix = 'W';
+ {$ELSE}
+ AWSuffix = 'A';
+ {$ENDIF UNICODE}
+
+procedure INLINE_WORD_FLIP(var Out_: WORD; In_: WORD);
+begin
+ Out_ := (In_ shl 8) or (In_ shr 8);
+end;
+
+procedure INLINE_HTONS(var Out_: WORD; In_: WORD);
+begin
+ INLINE_WORD_FLIP(Out_, In_);
+end;
+
+procedure INLINE_NTOHS(var Out_: WORD; In_: WORD);
+begin
+ INLINE_WORD_FLIP(Out_, In_);
+end;
+
+procedure INLINE_DWORD_FLIP(var Out_: DWORD; In_: DWORD);
+begin
+ Out_ := ((In_ shl 8) and $00ff0000) or (In_ shl 24) or
+ ((In_ shr 8) and $0000ff00) or (In_ shr 24);
+end;
+
+procedure INLINE_NTOHL(var Out_: DWORD; In_: DWORD);
+begin
+ INLINE_DWORD_FLIP(Out_, In_);
+end;
+
+procedure INLINE_HTONL(var Out_: DWORD; In_: DWORD);
+begin
+ INLINE_DWORD_FLIP(Out_, In_);
+end;
+
+procedure INLINE_WRITE_FLIPPED_WORD(pout: PWORD; In_: WORD);
+begin
+ INLINE_WORD_FLIP(pout^, In_);
+end;
+
+procedure INLINE_WRITE_FLIPPED_DWORD(pout: PDWORD; In_: DWORD);
+begin
+ INLINE_DWORD_FLIP(pout^, In_);
+end;
+
+function DNS_HEADER_FLAGS(pHead: PDNS_HEADER): WORD;
+begin
+ Result := PWORD(Integer(pHead) + SizeOf(WORD))^;
+end;
+
+procedure DNS_BYTE_FLIP_HEADER_COUNTS(var pHeader: PDNS_HEADER);
+var
+ _head: PDNS_HEADER;
+begin
+ _head := pHeader;
+ INLINE_HTONS(_head^.Xid, _head^.Xid);
+ INLINE_HTONS(_head^.QuestionCount, _head^.QuestionCount);
+ INLINE_HTONS(_head^.AnswerCount, _head^.AnswerCount);
+ INLINE_HTONS(_head^.NameServerCount, _head^.NameServerCount);
+ INLINE_HTONS(_head^.AdditionalCount, _head^.AdditionalCount);
+end;
+
+{
+#define DNS_QUESTION_NAME_FROM_HEADER( _pHeader_ ) \
+ ( (PCHAR)( (PDNS_HEADER)(_pHeader_) + 1 ) )
+
+#define DNS_ANSWER_FROM_QUESTION( _pQuestion_ ) \
+ ( (PCHAR)( (PDNS_QUESTION)(_pQuestion_) + 1 ) )
+}
+
+function IS_WORD_ALIGNED(P: Pointer): BOOL;
+begin
+ Result := (Integer(P) and 1) = 0;
+end;
+
+function IS_DWORD_ALIGNED(P: Pointer): BOOL;
+begin
+ Result := (Integer(P) and 3) = 0;
+end;
+
+function IS_QWORD_ALIGNED(P: Pointer): BOOL;
+begin
+ Result := (Integer(P) and 7) = 0;
+end;
+
+function DNS_TEXT_RECORD_LENGTH(StringCount: Integer): Integer;
+begin
+ Result := SizeOf(DWORD) + ((StringCount) * SizeOf(PChar));
+end;
+
+function DNS_NULL_RECORD_LENGTH(ByteCount: Integer): Integer;
+begin
+ Result := SizeOf(DWORD) + (ByteCount);
+end;
+
+function DNS_WKS_RECORD_LENGTH(ByteCount: Integer): Integer;
+begin
+ Result := SizeOf(DNS_WKS_DATA) + (ByteCount - 1);
+end;
+
+//#define DNS_WINS_RECORD_LENGTH(IpCount) \
+// (FIELD_OFFSET(DNS_WINS_DATA, WinsServers) + ((IpCount) * sizeof(IP4_ADDRESS)))
+
+procedure DNS_RRSET_INIT(rrset: PDnsRRSet);
+begin
+ rrset^.pFirstRR := nil;
+ rrset^.pLastRR := (@rrset^.pFirstRR);
+end;
+
+//#define DNS_RRSET_ADD( rrset, pnewRR ) \
+// { \
+// PDNS_RRSET _prrset = &(rrset); \
+// PDNS_RECORD _prrnew = (pnewRR); \
+// _prrset->pLastRR->pNext = _prrnew; \
+// _prrset->pLastRR = _prrnew; \
+// }
+
+procedure DNS_RRSET_TERMINATE(rrset: PDnsRRSet);
+begin
+ rrset^.pLastRR^.pNext := nil;
+end;
+
+{$IFDEF UNICODE}
+
+function DnsRecordCopy(pRR: PDNS_RECORD): PDNS_RECORD;
+begin
+ Result := DnsRecordCopyEx(pRR, DnsCharSetUnicode, DnsCharSetUnicode);
+end;
+
+function DnsRecordSetCopy(pRR: PDNS_RECORD): PDNS_RECORD;
+begin
+ Result := DnsRecordSetCopyEx(pRR, DnsCharSetUnicode, DnsCharSetUnicode);
+end;
+
+function DnsValidateName(pszName: LPCWSTR; Format: DNS_NAME_FORMAT): DNS_STATUS;
+begin
+ Result := DnsValidateName_W(pszName, Format);
+end;
+
+{$ELSE}
+
+function DnsRecordCopy(pRR: PDNS_RECORD): PDNS_RECORD;
+begin
+ Result := DnsRecordCopyEx(pRR, DnsCharSetAnsi, DnsCharSetAnsi);
+end;
+
+function DnsRecordSetCopy(pRR: PDNS_RECORD): PDNS_RECORD;
+begin
+ Result := DnsRecordSetCopyEx(pRR, DnsCharSetAnsi, DnsCharSetAnsi);
+end;
+
+function DnsValidateName(pszName: LPCSTR; Format: DNS_NAME_FORMAT): DNS_STATUS;
+begin
+ Result := DnsValidateName_A(pszName, Format);
+end;
+
+{$ENDIF UNICODE}
+
+{$IFDEF DYNAMIC_LINK}
+
+var
+ _DnsQueryConfig: Pointer;
+
+function DnsQueryConfig;
+begin
+ GetProcedureAddress(_DnsQueryConfig, dnsapi, 'DnsQueryConfig');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DnsQueryConfig]
+ end;
+end;
+
+var
+ _DnsRecordCopyEx: Pointer;
+
+function DnsRecordCopyEx;
+begin
+ GetProcedureAddress(_DnsRecordCopyEx, dnsapi, 'DnsRecordCopyEx');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DnsRecordCopyEx]
+ end;
+end;
+
+var
+ _DnsRecordSetCopyEx: Pointer;
+
+function DnsRecordSetCopyEx;
+begin
+ GetProcedureAddress(_DnsRecordSetCopyEx, dnsapi, 'DnsRecordSetCopyEx');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DnsRecordSetCopyEx]
+ end;
+end;
+
+var
+ _DnsRecordCompare: Pointer;
+
+function DnsRecordCompare;
+begin
+ GetProcedureAddress(_DnsRecordCompare, dnsapi, 'DnsRecordCompare');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DnsRecordCompare]
+ end;
+end;
+
+var
+ _DnsRecordSetCompare: Pointer;
+
+function DnsRecordSetCompare;
+begin
+ GetProcedureAddress(_DnsRecordSetCompare, dnsapi, 'DnsRecordSetCompare');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DnsRecordSetCompare]
+ end;
+end;
+
+var
+ _DnsRecordSetDetach: Pointer;
+
+function DnsRecordSetDetach;
+begin
+ GetProcedureAddress(_DnsRecordSetDetach, dnsapi, 'DnsRecordSetDetach');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DnsRecordSetDetach]
+ end;
+end;
+
+var
+ _DnsFreeRecordListDeep: Pointer;
+
+procedure DnsFreeRecordListDeep;
+begin
+ GetProcedureAddress(_DnsFreeRecordListDeep, dnsapi, 'DnsRecordListFree');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DnsFreeRecordListDeep]
+ end;
+end;
+
+var
+ _DnsRecordListFree: Pointer;
+
+procedure DnsRecordListFree;
+begin
+ GetProcedureAddress(_DnsRecordListFree, dnsapi, 'DnsRecordListFree');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DnsRecordListFree]
+ end;
+end;
+
+var
+ _DnsFree: Pointer;
+
+procedure DnsFree;
+begin
+ GetProcedureAddress(_DnsFree, dnsapi, 'DnsFree');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DnsFree]
+ end;
+end;
+
+var
+ _DnsQuery_A: Pointer;
+
+function DnsQuery_A;
+begin
+ GetProcedureAddress(_DnsQuery_A, dnsapi, 'DnsQuery_A');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DnsQuery_A]
+ end;
+end;
+
+var
+ _DnsQuery_UTF8: Pointer;
+
+function DnsQuery_UTF8;
+begin
+ GetProcedureAddress(_DnsQuery_UTF8, dnsapi, 'DnsQuery_UTF8');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DnsQuery_UTF8]
+ end;
+end;
+
+var
+ _DnsQuery_W: Pointer;
+
+function DnsQuery_W;
+begin
+ GetProcedureAddress(_DnsQuery_W, dnsapi, 'DnsQuery_W');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DnsQuery_W]
+ end;
+end;
+
+var
+ _DnsQuery: Pointer;
+
+function DnsQuery;
+begin
+ GetProcedureAddress(_DnsQuery, dnsapi, 'DnsQuery_' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DnsQuery]
+ end;
+end;
+
+var
+ _DnsAcquireContextHandle_W: Pointer;
+
+function DnsAcquireContextHandle_W;
+begin
+ GetProcedureAddress(_DnsAcquireContextHandle_W, dnsapi, 'DnsAcquireContextHandle_W');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DnsAcquireContextHandle_W]
+ end;
+end;
+
+var
+ _DnsAcquireContextHandle_A: Pointer;
+
+function DnsAcquireContextHandle_A;
+begin
+ GetProcedureAddress(_DnsAcquireContextHandle_A, dnsapi, 'DnsAcquireContextHandle_A');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DnsAcquireContextHandle_A]
+ end;
+end;
+
+var
+ _DnsAcquireContextHandle: Pointer;
+
+function DnsAcquireContextHandle;
+begin
+ GetProcedureAddress(_DnsAcquireContextHandle, dnsapi, 'DnsAcquireContextHandle_' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DnsAcquireContextHandle]
+ end;
+end;
+
+var
+ _DnsReleaseContextHandle: Pointer;
+
+procedure DnsReleaseContextHandle;
+begin
+ GetProcedureAddress(_DnsReleaseContextHandle, dnsapi, 'DnsReleaseContextHandle');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DnsReleaseContextHandle]
+ end;
+end;
+
+var
+ _DnsModifyRecordsInSet_W: Pointer;
+
+function DnsModifyRecordsInSet_W;
+begin
+ GetProcedureAddress(_DnsModifyRecordsInSet_W, dnsapi, 'DnsModifyRecordsInSet_W');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DnsModifyRecordsInSet_W]
+ end;
+end;
+
+var
+ _DnsModifyRecordsInSet_A: Pointer;
+
+function DnsModifyRecordsInSet_A;
+begin
+ GetProcedureAddress(_DnsModifyRecordsInSet_A, dnsapi, 'DnsModifyRecordsInSet_A');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DnsModifyRecordsInSet_A]
+ end;
+end;
+
+var
+ _DnsModifyRecordsInSet_UTF8: Pointer;
+
+function DnsModifyRecordsInSet_UTF8;
+begin
+ GetProcedureAddress(_DnsModifyRecordsInSet_UTF8, dnsapi, 'DnsModifyRecordsInSet_UTF8');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DnsModifyRecordsInSet_UTF8]
+ end;
+end;
+
+var
+ _DnsModifyRecordsInSet: Pointer;
+
+function DnsModifyRecordsInSet;
+begin
+ GetProcedureAddress(_DnsModifyRecordsInSet, dnsapi, 'DnsModifyRecordsInSet_' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DnsModifyRecordsInSet]
+ end;
+end;
+
+var
+ _DnsReplaceRecordSetW: Pointer;
+
+function DnsReplaceRecordSetW;
+begin
+ GetProcedureAddress(_DnsReplaceRecordSetW, dnsapi, 'DnsReplaceRecordSetW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DnsReplaceRecordSetW]
+ end;
+end;
+
+var
+ _DnsReplaceRecordSetA: Pointer;
+
+function DnsReplaceRecordSetA;
+begin
+ GetProcedureAddress(_DnsReplaceRecordSetA, dnsapi, 'DnsReplaceRecordSetA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DnsReplaceRecordSetA]
+ end;
+end;
+
+var
+ _DnsReplaceRecordSetUTF8: Pointer;
+
+function DnsReplaceRecordSetUTF8;
+begin
+ GetProcedureAddress(_DnsReplaceRecordSetUTF8, dnsapi, 'DnsReplaceRecordSetUTF8');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DnsReplaceRecordSetUTF8]
+ end;
+end;
+
+var
+ _DnsReplaceRecordSet: Pointer;
+
+function DnsReplaceRecordSet;
+begin
+ GetProcedureAddress(_DnsReplaceRecordSet, dnsapi, 'DnsReplaceRecordSet' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DnsReplaceRecordSet]
+ end;
+end;
+
+var
+ _DnsValidateName_UTF8: Pointer;
+
+function DnsValidateName_UTF8;
+begin
+ GetProcedureAddress(_DnsValidateName_UTF8, dnsapi, 'DnsValidateName_UTF8');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DnsValidateName_UTF8]
+ end;
+end;
+
+var
+ _DnsValidateName_W: Pointer;
+
+function DnsValidateName_W;
+begin
+ GetProcedureAddress(_DnsValidateName_W, dnsapi, 'DnsValidateName_W');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DnsValidateName_W]
+ end;
+end;
+
+var
+ _DnsValidateName_A: Pointer;
+
+function DnsValidateName_A;
+begin
+ GetProcedureAddress(_DnsValidateName_A, dnsapi, 'DnsValidateName_A');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DnsValidateName_A]
+ end;
+end;
+
+var
+ _DnsNameCompare_A: Pointer;
+
+function DnsNameCompare_A;
+begin
+ GetProcedureAddress(_DnsNameCompare_A, dnsapi, 'DnsNameCompare_A');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DnsNameCompare_A]
+ end;
+end;
+
+var
+ _DnsNameCompare_W: Pointer;
+
+function DnsNameCompare_W;
+begin
+ GetProcedureAddress(_DnsNameCompare_W, dnsapi, 'DnsNameCompare_W');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DnsNameCompare_W]
+ end;
+end;
+
+var
+ _DnsNameCompare: Pointer;
+
+function DnsNameCompare;
+begin
+ GetProcedureAddress(_DnsNameCompare, dnsapi, 'DnsNameCompare_' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DnsNameCompare]
+ end;
+end;
+
+var
+ _DnsWriteQuestionToBuffer_W: Pointer;
+
+function DnsWriteQuestionToBuffer_W;
+begin
+ GetProcedureAddress(_DnsWriteQuestionToBuffer_W, dnsapi, 'DnsWriteQuestionToBuffer_W');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DnsWriteQuestionToBuffer_W]
+ end;
+end;
+
+var
+ _DnsWriteQuestionToBuffer_UTF8: Pointer;
+
+function DnsWriteQuestionToBuffer_UTF8;
+begin
+ GetProcedureAddress(_DnsWriteQuestionToBuffer_UTF8, dnsapi, 'DnsWriteQuestionToBuffer_UTF8');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DnsWriteQuestionToBuffer_UTF8]
+ end;
+end;
+
+var
+ _DnsExtractRecordsFromMessage_W: Pointer;
+
+function DnsExtractRecordsFromMessage_W;
+begin
+ GetProcedureAddress(_DnsExtractRecordsFromMessage_W, dnsapi, 'DnsExtractRecordsFromMessage_W');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DnsExtractRecordsFromMessage_W]
+ end;
+end;
+
+var
+ _DnsExtractRecFromMessage_UTF8: Pointer;
+
+function DnsExtractRecordsFromMessage_UTF8;
+begin
+ GetProcedureAddress(_DnsExtractRecFromMessage_UTF8, dnsapi, 'DnsExtractRecordsFromMessage_UTF8');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DnsExtractRecFromMessage_UTF8]
+ end;
+end;
+
+{$ELSE}
+
+function DnsQueryConfig; external dnsapi name 'DnsQueryConfig';
+function DnsRecordCopyEx; external dnsapi name 'DnsRecordCopyEx';
+function DnsRecordSetCopyEx; external dnsapi name 'DnsRecordSetCopyEx';
+function DnsRecordCompare; external dnsapi name 'DnsRecordCompare';
+function DnsRecordSetCompare; external dnsapi name 'DnsRecordSetCompare';
+function DnsRecordSetDetach; external dnsapi name 'DnsRecordSetDetach';
+procedure DnsFreeRecordListDeep; external dnsapi name 'DnsRecordListFree';
+procedure DnsRecordListFree; external dnsapi name 'DnsRecordListFree';
+procedure DnsFree; external dnsapi name 'DnsFree';
+function DnsQuery_A; external dnsapi name 'DnsQuery_A';
+function DnsQuery_UTF8; external dnsapi name 'DnsQuery_UTF8';
+function DnsQuery_W; external dnsapi name 'DnsQuery_W';
+function DnsQuery; external dnsapi name 'DnsQuery_' + AWSuffix;
+function DnsAcquireContextHandle_W; external dnsapi name 'DnsAcquireContextHandle_W';
+function DnsAcquireContextHandle_A; external dnsapi name 'DnsAcquireContextHandle_A';
+function DnsAcquireContextHandle; external dnsapi name 'DnsAcquireContextHandle_' + AWSuffix;
+procedure DnsReleaseContextHandle; external dnsapi name 'DnsReleaseContextHandle';
+function DnsModifyRecordsInSet_W; external dnsapi name 'DnsModifyRecordsInSet_W';
+function DnsModifyRecordsInSet_A; external dnsapi name 'DnsModifyRecordsInSet_A';
+function DnsModifyRecordsInSet_UTF8; external dnsapi name 'DnsModifyRecordsInSet_UTF8';
+function DnsModifyRecordsInSet; external dnsapi name 'DnsModifyRecordsInSet_' + AWSuffix;
+function DnsReplaceRecordSetW; external dnsapi name 'DnsReplaceRecordSetW';
+function DnsReplaceRecordSetA; external dnsapi name 'DnsReplaceRecordSetA';
+function DnsReplaceRecordSetUTF8; external dnsapi name 'DnsReplaceRecordSetUTF8';
+function DnsReplaceRecordSet; external dnsapi name 'DnsReplaceRecordSet' + AWSuffix;
+function DnsValidateName_UTF8; external dnsapi name 'DnsValidateName_UTF8';
+function DnsValidateName_W; external dnsapi name 'DnsValidateName_W';
+function DnsValidateName_A; external dnsapi name 'DnsValidateName_A';
+function DnsNameCompare_A; external dnsapi name 'DnsNameCompare_A';
+function DnsNameCompare_W; external dnsapi name 'DnsNameCompare_W';
+function DnsNameCompare; external dnsapi name 'DnsNameCompare_' + AWSuffix;
+function DnsWriteQuestionToBuffer_W; external dnsapi name 'DnsWriteQuestionToBuffer_W';
+function DnsWriteQuestionToBuffer_UTF8; external dnsapi name 'DnsWriteQuestionToBuffer_UTF8';
+function DnsExtractRecordsFromMessage_W; external dnsapi name 'DnsExtractRecordsFromMessage_W';
+function DnsExtractRecordsFromMessage_UTF8; external dnsapi name 'DnsExtractRecordsFromMessage_UTF8';
+
+{$ENDIF DYNAMIC_LINK}
+
+end.
diff --git a/packages/extra/winunits/jwawinefs.pas b/packages/extra/winunits/jwawinefs.pas
index 4b87d501cb..ec356e2832 100644
--- a/packages/extra/winunits/jwawinefs.pas
+++ b/packages/extra/winunits/jwawinefs.pas
@@ -1,354 +1,354 @@
-{******************************************************************************}
-{ }
-{ Encrypting File System API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: winefs.h, released June 2000. The original Pascal }
-{ code is: WinEFS.pas, released December 2000. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwawinefs.pas,v 1.1 2005/04/04 07:56:11 marco Exp $
-
-unit JwaWinEFS;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "WinEFS.h"'}
-{$HPPEMIT ''}
-{$HPPEMIT 'typedef PENCRYPTION_CERTIFICATE_HASH *PPENCRYPTION_CERTIFICATE_HASH'}
-{$HPPEMIT 'typedef PENCRYPTION_CERTIFICATE *PPENCRYPTION_CERTIFICATE'}
-{$HPPEMIT 'typedef PENCRYPTION_CERTIFICATE_HASH_LIST *PPENCRYPTION_CERTIFICATE_HASH_LIST'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaWinBase, JwaWinNT, JwaWinType;
-
-type
- ALG_ID = Cardinal;
- {$EXTERNALSYM ALG_ID}
-
-//
-// Encoded Certificate
-//
-
-type
- PEFS_CERTIFICATE_BLOB = ^EFS_CERTIFICATE_BLOB;
- {$EXTERNALSYM PEFS_CERTIFICATE_BLOB}
- _CERTIFICATE_BLOB = record
- dwCertEncodingType: DWORD;
- cbData: DWORD;
- pbData: PBYTE;
- end;
- {$EXTERNALSYM _CERTIFICATE_BLOB}
- EFS_CERTIFICATE_BLOB = _CERTIFICATE_BLOB;
- {$EXTERNALSYM EFS_CERTIFICATE_BLOB}
- TEfsCertificateBlob = EFS_CERTIFICATE_BLOB;
- PEfsCertificateBlob = PEFS_CERTIFICATE_BLOB;
-
-//
-// Certificate Hash
-//
-
- PEFS_HASH_BLOB = ^EFS_HASH_BLOB;
- {$EXTERNALSYM PEFS_HASH_BLOB}
- _EFS_HASH_BLOB = record
- cbData: DWORD;
- pbData: PBYTE;
- end;
- {$EXTERNALSYM _EFS_HASH_BLOB}
- EFS_HASH_BLOB = _EFS_HASH_BLOB;
- {$EXTERNALSYM EFS_HASH_BLOB}
- TEfsHashBlob = EFS_HASH_BLOB;
- PEfsHashBlob = PEFS_HASH_BLOB;
-
-//
-// RPC blob
-//
-
- _EFS_RPC_BLOB = record
- cbData: DWORD;
- pbData: PBYTE;
- end;
- {$EXTERNALSYM _EFS_RPC_BLOB}
- EFS_RPC_BLOB = _EFS_RPC_BLOB;
- {$EXTERNALSYM EFS_RPC_BLOB}
- PEFS_RPC_BLOB = ^EFS_RPC_BLOB;
- {$EXTERNALSYM PEFS_RPC_BLOB}
- TEfsRpcBlob = EFS_RPC_BLOB;
- PEfsRpcBlob = PEFS_RPC_BLOB;
-
- _EFS_KEY_INFO = record
- dwVersion: DWORD;
- Entropy: ULONG;
- Algorithm: ALG_ID;
- KeyLength: ULONG;
- end;
- {$EXTERNALSYM _EFS_KEY_INFO}
- EFS_KEY_INFO = _EFS_KEY_INFO;
- {$EXTERNALSYM EFS_KEY_INFO}
- PEFS_KEY_INFO = ^EFS_KEY_INFO;
- {$EXTERNALSYM PEFS_KEY_INFO}
- TEfsKeyInfo = EFS_KEY_INFO;
- PEfsKeyInfo = PEFS_KEY_INFO;
-
-//
-// Input to add a user to an encrypted file
-//
-
- PENCRYPTION_CERTIFICATE = ^ENCRYPTION_CERTIFICATE;
- {$EXTERNALSYM PENCRYPTION_CERTIFICATE}
- _ENCRYPTION_CERTIFICATE = record
- cbTotalLength: DWORD;
- pUserSid: PSID;
- pCertBlob: PEFS_CERTIFICATE_BLOB;
- end;
- {$EXTERNALSYM _ENCRYPTION_CERTIFICATE}
- ENCRYPTION_CERTIFICATE = _ENCRYPTION_CERTIFICATE;
- {$EXTERNALSYM ENCRYPTION_CERTIFICATE}
- TEncryptionCertificate = ENCRYPTION_CERTIFICATE;
- PEncryptionCertificate = PENCRYPTION_CERTIFICATE;
-
-const
- MAX_SID_SIZE = 256;
- {$EXTERNALSYM MAX_SID_SIZE}
-
-type
- PENCRYPTION_CERTIFICATE_HASH = ^ENCRYPTION_CERTIFICATE_HASH;
- {$EXTERNALSYM PENCRYPTION_CERTIFICATE_HASH}
- _ENCRYPTION_CERTIFICATE_HASH = record
- cbTotalLength: DWORD;
- pUserSid: PSID;
- pHash: PEFS_HASH_BLOB;
- lpDisplayInformation: LPWSTR;
- end;
- {$EXTERNALSYM _ENCRYPTION_CERTIFICATE_HASH}
- ENCRYPTION_CERTIFICATE_HASH = _ENCRYPTION_CERTIFICATE_HASH;
- {$EXTERNALSYM ENCRYPTION_CERTIFICATE_HASH}
- TEncryptionCertificateHash = ENCRYPTION_CERTIFICATE_HASH;
- PEncryptionCertificateHash = PENCRYPTION_CERTIFICATE_HASH;
-
- PPENCRYPTION_CERTIFICATE_HASH = ^PENCRYPTION_CERTIFICATE_HASH;
- {$NODEFINE PPENCRYPTION_CERTIFICATE_HASH}
-
- PENCRYPTION_CERTIFICATE_HASH_LIST = ^ENCRYPTION_CERTIFICATE_HASH_LIST;
- {$EXTERNALSYM PENCRYPTION_CERTIFICATE_HASH_LIST}
- _ENCRYPTION_CERTIFICATE_HASH_LIST = record
- nCert_Hash: DWORD;
- pUsers: PPENCRYPTION_CERTIFICATE_HASH;
- end;
- {$EXTERNALSYM _ENCRYPTION_CERTIFICATE_HASH_LIST}
- ENCRYPTION_CERTIFICATE_HASH_LIST = _ENCRYPTION_CERTIFICATE_HASH_LIST;
- {$EXTERNALSYM ENCRYPTION_CERTIFICATE_HASH_LIST}
- TEncryptionCertificateHashList = ENCRYPTION_CERTIFICATE_HASH_LIST;
- PEncryptionCertificateHashList = PENCRYPTION_CERTIFICATE_HASH_LIST;
-
- PPENCRYPTION_CERTIFICATE = ^PENCRYPTION_CERTIFICATE;
- {$NODEFINE PPENCRYPTION_CERTIFICATE}
-
- PENCRYPTION_CERTIFICATE_LIST = ^ENCRYPTION_CERTIFICATE_LIST;
- {$EXTERNALSYM PENCRYPTION_CERTIFICATE_LIST}
- _ENCRYPTION_CERTIFICATE_LIST = record
- nUsers: DWORD;
- pUsers: PPENCRYPTION_CERTIFICATE;
- end;
- {$EXTERNALSYM _ENCRYPTION_CERTIFICATE_LIST}
- ENCRYPTION_CERTIFICATE_LIST = _ENCRYPTION_CERTIFICATE_LIST;
- {$EXTERNALSYM ENCRYPTION_CERTIFICATE_LIST}
- TEncryptionCertificateList = ENCRYPTION_CERTIFICATE_LIST;
- PEncryptionCertificateList = PENCRYPTION_CERTIFICATE_LIST;
-
- PPENCRYPTION_CERTIFICATE_HASH_LIST = ^PENCRYPTION_CERTIFICATE_HASH_LIST;
- {$NODEFINE PPENCRYPTION_CERTIFICATE_HASH_LIST}
-
-function QueryUsersOnEncryptedFile(lpFileName: LPCWSTR;
- var pUsers: PENCRYPTION_CERTIFICATE_HASH_LIST): DWORD; stdcall;
-{$EXTERNALSYM QueryUsersOnEncryptedFile}
-
-function QueryRecoveryAgentsOnEncryptedFile(lpFileName: LPCWSTR;
- var pRecoveryAgents: PENCRYPTION_CERTIFICATE_HASH_LIST): DWORD; stdcall;
-{$EXTERNALSYM QueryRecoveryAgentsOnEncryptedFile}
-
-function RemoveUsersFromEncryptedFile(lpFileName: LPCWSTR;
- pHashes: PENCRYPTION_CERTIFICATE_HASH_LIST): DWORD; stdcall;
-{$EXTERNALSYM RemoveUsersFromEncryptedFile}
-
-function AddUsersToEncryptedFile(lpFileName: LPCWSTR;
- pUsers: PENCRYPTION_CERTIFICATE_LIST): DWORD; stdcall;
-{$EXTERNALSYM AddUsersToEncryptedFile}
-
-function SetUserFileEncryptionKey(pEncryptionCertificate: PENCRYPTION_CERTIFICATE): DWORD; stdcall;
-{$EXTERNALSYM SetUserFileEncryptionKey}
-
-procedure FreeEncryptionCertificateHashList(pHashes: PENCRYPTION_CERTIFICATE_HASH_LIST); stdcall;
-{$EXTERNALSYM FreeEncryptionCertificateHashList}
-
-function EncryptionDisable(DirPath: LPCWSTR; Disable: BOOL): BOOL; stdcall;
-{$EXTERNALSYM EncryptionDisable}
-
-function DuplicateEncryptionInfoFile(SrcFileName, DstFileName: LPCWSTR; dwCreationDistribution,
- dwAttributes: DWORD; lpSecurityAttributes: LPSECURITY_ATTRIBUTES): DWORD; stdcall;
-{$EXTERNALSYM DuplicateEncryptionInfoFile}
-
-implementation
-
-const
- advapi32 = 'advapi32.dll';
-
-{$IFDEF DYNAMIC_LINK}
-
-var
- _QueryUsersOnEncryptedFile: Pointer;
-
-function QueryUsersOnEncryptedFile;
-begin
- GetProcedureAddress(_QueryUsersOnEncryptedFile, advapi32, 'QueryUsersOnEncryptedFile');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_QueryUsersOnEncryptedFile]
- end;
-end;
-
-var
- _QueryRecoveryAgentsOnEncrFile: Pointer;
-
-function QueryRecoveryAgentsOnEncryptedFile;
-begin
- GetProcedureAddress(_QueryRecoveryAgentsOnEncrFile, advapi32, 'QueryRecoveryAgentsOnEncryptedFile');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_QueryRecoveryAgentsOnEncrFile]
- end;
-end;
-
-var
- _RemoveUsersFromEncryptedFile: Pointer;
-
-function RemoveUsersFromEncryptedFile;
-begin
- GetProcedureAddress(_RemoveUsersFromEncryptedFile, advapi32, 'RemoveUsersFromEncryptedFile');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RemoveUsersFromEncryptedFile]
- end;
-end;
-
-var
- _AddUsersToEncryptedFile: Pointer;
-
-function AddUsersToEncryptedFile;
-begin
- GetProcedureAddress(_AddUsersToEncryptedFile, advapi32, 'AddUsersToEncryptedFile');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_AddUsersToEncryptedFile]
- end;
-end;
-
-var
- _SetUserFileEncryptionKey: Pointer;
-
-function SetUserFileEncryptionKey;
-begin
- GetProcedureAddress(_SetUserFileEncryptionKey, advapi32, 'SetUserFileEncryptionKey');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetUserFileEncryptionKey]
- end;
-end;
-
-var
- _FreeEncrCertificateHashList: Pointer;
-
-procedure FreeEncryptionCertificateHashList;
-begin
- GetProcedureAddress(_FreeEncrCertificateHashList, advapi32, 'FreeEncryptionCertificateHashList');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_FreeEncrCertificateHashList]
- end;
-end;
-
-var
- _EncryptionDisable: Pointer;
-
-function EncryptionDisable;
-begin
- GetProcedureAddress(_EncryptionDisable, advapi32, 'EncryptionDisable');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_EncryptionDisable]
- end;
-end;
-
-var
- _DuplicateEncryptionInfoFile: Pointer;
-
-function DuplicateEncryptionInfoFile;
-begin
- GetProcedureAddress(_DuplicateEncryptionInfoFile, advapi32, 'DuplicateEncryptionInfoFile');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DuplicateEncryptionInfoFile]
- end;
-end;
-
-{$ELSE}
-
-function QueryUsersOnEncryptedFile; external advapi32 name 'QueryUsersOnEncryptedFile';
-function QueryRecoveryAgentsOnEncryptedFile; external advapi32 name 'QueryRecoveryAgentsOnEncryptedFile';
-function RemoveUsersFromEncryptedFile; external advapi32 name 'RemoveUsersFromEncryptedFile';
-function AddUsersToEncryptedFile; external advapi32 name 'AddUsersToEncryptedFile';
-function SetUserFileEncryptionKey; external advapi32 name 'SetUserFileEncryptionKey';
-procedure FreeEncryptionCertificateHashList; external advapi32 name 'FreeEncryptionCertificateHashList';
-function EncryptionDisable; external advapi32 name 'EncryptionDisable';
-function DuplicateEncryptionInfoFile; external advapi32 name 'DuplicateEncryptionInfoFile';
-
-{$ENDIF DYNAMIC_LINK}
-
-end.
+{******************************************************************************}
+{ }
+{ Encrypting File System API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: winefs.h, released June 2000. The original Pascal }
+{ code is: WinEFS.pas, released December 2000. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwawinefs.pas,v 1.1 2005/04/04 07:56:11 marco Exp $
+
+unit JwaWinEFS;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "WinEFS.h"'}
+{$HPPEMIT ''}
+{$HPPEMIT 'typedef PENCRYPTION_CERTIFICATE_HASH *PPENCRYPTION_CERTIFICATE_HASH'}
+{$HPPEMIT 'typedef PENCRYPTION_CERTIFICATE *PPENCRYPTION_CERTIFICATE'}
+{$HPPEMIT 'typedef PENCRYPTION_CERTIFICATE_HASH_LIST *PPENCRYPTION_CERTIFICATE_HASH_LIST'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaWinBase, JwaWinNT, JwaWinType;
+
+type
+ ALG_ID = Cardinal;
+ {$EXTERNALSYM ALG_ID}
+
+//
+// Encoded Certificate
+//
+
+type
+ PEFS_CERTIFICATE_BLOB = ^EFS_CERTIFICATE_BLOB;
+ {$EXTERNALSYM PEFS_CERTIFICATE_BLOB}
+ _CERTIFICATE_BLOB = record
+ dwCertEncodingType: DWORD;
+ cbData: DWORD;
+ pbData: PBYTE;
+ end;
+ {$EXTERNALSYM _CERTIFICATE_BLOB}
+ EFS_CERTIFICATE_BLOB = _CERTIFICATE_BLOB;
+ {$EXTERNALSYM EFS_CERTIFICATE_BLOB}
+ TEfsCertificateBlob = EFS_CERTIFICATE_BLOB;
+ PEfsCertificateBlob = PEFS_CERTIFICATE_BLOB;
+
+//
+// Certificate Hash
+//
+
+ PEFS_HASH_BLOB = ^EFS_HASH_BLOB;
+ {$EXTERNALSYM PEFS_HASH_BLOB}
+ _EFS_HASH_BLOB = record
+ cbData: DWORD;
+ pbData: PBYTE;
+ end;
+ {$EXTERNALSYM _EFS_HASH_BLOB}
+ EFS_HASH_BLOB = _EFS_HASH_BLOB;
+ {$EXTERNALSYM EFS_HASH_BLOB}
+ TEfsHashBlob = EFS_HASH_BLOB;
+ PEfsHashBlob = PEFS_HASH_BLOB;
+
+//
+// RPC blob
+//
+
+ _EFS_RPC_BLOB = record
+ cbData: DWORD;
+ pbData: PBYTE;
+ end;
+ {$EXTERNALSYM _EFS_RPC_BLOB}
+ EFS_RPC_BLOB = _EFS_RPC_BLOB;
+ {$EXTERNALSYM EFS_RPC_BLOB}
+ PEFS_RPC_BLOB = ^EFS_RPC_BLOB;
+ {$EXTERNALSYM PEFS_RPC_BLOB}
+ TEfsRpcBlob = EFS_RPC_BLOB;
+ PEfsRpcBlob = PEFS_RPC_BLOB;
+
+ _EFS_KEY_INFO = record
+ dwVersion: DWORD;
+ Entropy: ULONG;
+ Algorithm: ALG_ID;
+ KeyLength: ULONG;
+ end;
+ {$EXTERNALSYM _EFS_KEY_INFO}
+ EFS_KEY_INFO = _EFS_KEY_INFO;
+ {$EXTERNALSYM EFS_KEY_INFO}
+ PEFS_KEY_INFO = ^EFS_KEY_INFO;
+ {$EXTERNALSYM PEFS_KEY_INFO}
+ TEfsKeyInfo = EFS_KEY_INFO;
+ PEfsKeyInfo = PEFS_KEY_INFO;
+
+//
+// Input to add a user to an encrypted file
+//
+
+ PENCRYPTION_CERTIFICATE = ^ENCRYPTION_CERTIFICATE;
+ {$EXTERNALSYM PENCRYPTION_CERTIFICATE}
+ _ENCRYPTION_CERTIFICATE = record
+ cbTotalLength: DWORD;
+ pUserSid: PSID;
+ pCertBlob: PEFS_CERTIFICATE_BLOB;
+ end;
+ {$EXTERNALSYM _ENCRYPTION_CERTIFICATE}
+ ENCRYPTION_CERTIFICATE = _ENCRYPTION_CERTIFICATE;
+ {$EXTERNALSYM ENCRYPTION_CERTIFICATE}
+ TEncryptionCertificate = ENCRYPTION_CERTIFICATE;
+ PEncryptionCertificate = PENCRYPTION_CERTIFICATE;
+
+const
+ MAX_SID_SIZE = 256;
+ {$EXTERNALSYM MAX_SID_SIZE}
+
+type
+ PENCRYPTION_CERTIFICATE_HASH = ^ENCRYPTION_CERTIFICATE_HASH;
+ {$EXTERNALSYM PENCRYPTION_CERTIFICATE_HASH}
+ _ENCRYPTION_CERTIFICATE_HASH = record
+ cbTotalLength: DWORD;
+ pUserSid: PSID;
+ pHash: PEFS_HASH_BLOB;
+ lpDisplayInformation: LPWSTR;
+ end;
+ {$EXTERNALSYM _ENCRYPTION_CERTIFICATE_HASH}
+ ENCRYPTION_CERTIFICATE_HASH = _ENCRYPTION_CERTIFICATE_HASH;
+ {$EXTERNALSYM ENCRYPTION_CERTIFICATE_HASH}
+ TEncryptionCertificateHash = ENCRYPTION_CERTIFICATE_HASH;
+ PEncryptionCertificateHash = PENCRYPTION_CERTIFICATE_HASH;
+
+ PPENCRYPTION_CERTIFICATE_HASH = ^PENCRYPTION_CERTIFICATE_HASH;
+ {$NODEFINE PPENCRYPTION_CERTIFICATE_HASH}
+
+ PENCRYPTION_CERTIFICATE_HASH_LIST = ^ENCRYPTION_CERTIFICATE_HASH_LIST;
+ {$EXTERNALSYM PENCRYPTION_CERTIFICATE_HASH_LIST}
+ _ENCRYPTION_CERTIFICATE_HASH_LIST = record
+ nCert_Hash: DWORD;
+ pUsers: PPENCRYPTION_CERTIFICATE_HASH;
+ end;
+ {$EXTERNALSYM _ENCRYPTION_CERTIFICATE_HASH_LIST}
+ ENCRYPTION_CERTIFICATE_HASH_LIST = _ENCRYPTION_CERTIFICATE_HASH_LIST;
+ {$EXTERNALSYM ENCRYPTION_CERTIFICATE_HASH_LIST}
+ TEncryptionCertificateHashList = ENCRYPTION_CERTIFICATE_HASH_LIST;
+ PEncryptionCertificateHashList = PENCRYPTION_CERTIFICATE_HASH_LIST;
+
+ PPENCRYPTION_CERTIFICATE = ^PENCRYPTION_CERTIFICATE;
+ {$NODEFINE PPENCRYPTION_CERTIFICATE}
+
+ PENCRYPTION_CERTIFICATE_LIST = ^ENCRYPTION_CERTIFICATE_LIST;
+ {$EXTERNALSYM PENCRYPTION_CERTIFICATE_LIST}
+ _ENCRYPTION_CERTIFICATE_LIST = record
+ nUsers: DWORD;
+ pUsers: PPENCRYPTION_CERTIFICATE;
+ end;
+ {$EXTERNALSYM _ENCRYPTION_CERTIFICATE_LIST}
+ ENCRYPTION_CERTIFICATE_LIST = _ENCRYPTION_CERTIFICATE_LIST;
+ {$EXTERNALSYM ENCRYPTION_CERTIFICATE_LIST}
+ TEncryptionCertificateList = ENCRYPTION_CERTIFICATE_LIST;
+ PEncryptionCertificateList = PENCRYPTION_CERTIFICATE_LIST;
+
+ PPENCRYPTION_CERTIFICATE_HASH_LIST = ^PENCRYPTION_CERTIFICATE_HASH_LIST;
+ {$NODEFINE PPENCRYPTION_CERTIFICATE_HASH_LIST}
+
+function QueryUsersOnEncryptedFile(lpFileName: LPCWSTR;
+ var pUsers: PENCRYPTION_CERTIFICATE_HASH_LIST): DWORD; stdcall;
+{$EXTERNALSYM QueryUsersOnEncryptedFile}
+
+function QueryRecoveryAgentsOnEncryptedFile(lpFileName: LPCWSTR;
+ var pRecoveryAgents: PENCRYPTION_CERTIFICATE_HASH_LIST): DWORD; stdcall;
+{$EXTERNALSYM QueryRecoveryAgentsOnEncryptedFile}
+
+function RemoveUsersFromEncryptedFile(lpFileName: LPCWSTR;
+ pHashes: PENCRYPTION_CERTIFICATE_HASH_LIST): DWORD; stdcall;
+{$EXTERNALSYM RemoveUsersFromEncryptedFile}
+
+function AddUsersToEncryptedFile(lpFileName: LPCWSTR;
+ pUsers: PENCRYPTION_CERTIFICATE_LIST): DWORD; stdcall;
+{$EXTERNALSYM AddUsersToEncryptedFile}
+
+function SetUserFileEncryptionKey(pEncryptionCertificate: PENCRYPTION_CERTIFICATE): DWORD; stdcall;
+{$EXTERNALSYM SetUserFileEncryptionKey}
+
+procedure FreeEncryptionCertificateHashList(pHashes: PENCRYPTION_CERTIFICATE_HASH_LIST); stdcall;
+{$EXTERNALSYM FreeEncryptionCertificateHashList}
+
+function EncryptionDisable(DirPath: LPCWSTR; Disable: BOOL): BOOL; stdcall;
+{$EXTERNALSYM EncryptionDisable}
+
+function DuplicateEncryptionInfoFile(SrcFileName, DstFileName: LPCWSTR; dwCreationDistribution,
+ dwAttributes: DWORD; lpSecurityAttributes: LPSECURITY_ATTRIBUTES): DWORD; stdcall;
+{$EXTERNALSYM DuplicateEncryptionInfoFile}
+
+implementation
+
+const
+ advapi32 = 'advapi32.dll';
+
+{$IFDEF DYNAMIC_LINK}
+
+var
+ _QueryUsersOnEncryptedFile: Pointer;
+
+function QueryUsersOnEncryptedFile;
+begin
+ GetProcedureAddress(_QueryUsersOnEncryptedFile, advapi32, 'QueryUsersOnEncryptedFile');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_QueryUsersOnEncryptedFile]
+ end;
+end;
+
+var
+ _QueryRecoveryAgentsOnEncrFile: Pointer;
+
+function QueryRecoveryAgentsOnEncryptedFile;
+begin
+ GetProcedureAddress(_QueryRecoveryAgentsOnEncrFile, advapi32, 'QueryRecoveryAgentsOnEncryptedFile');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_QueryRecoveryAgentsOnEncrFile]
+ end;
+end;
+
+var
+ _RemoveUsersFromEncryptedFile: Pointer;
+
+function RemoveUsersFromEncryptedFile;
+begin
+ GetProcedureAddress(_RemoveUsersFromEncryptedFile, advapi32, 'RemoveUsersFromEncryptedFile');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RemoveUsersFromEncryptedFile]
+ end;
+end;
+
+var
+ _AddUsersToEncryptedFile: Pointer;
+
+function AddUsersToEncryptedFile;
+begin
+ GetProcedureAddress(_AddUsersToEncryptedFile, advapi32, 'AddUsersToEncryptedFile');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_AddUsersToEncryptedFile]
+ end;
+end;
+
+var
+ _SetUserFileEncryptionKey: Pointer;
+
+function SetUserFileEncryptionKey;
+begin
+ GetProcedureAddress(_SetUserFileEncryptionKey, advapi32, 'SetUserFileEncryptionKey');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetUserFileEncryptionKey]
+ end;
+end;
+
+var
+ _FreeEncrCertificateHashList: Pointer;
+
+procedure FreeEncryptionCertificateHashList;
+begin
+ GetProcedureAddress(_FreeEncrCertificateHashList, advapi32, 'FreeEncryptionCertificateHashList');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_FreeEncrCertificateHashList]
+ end;
+end;
+
+var
+ _EncryptionDisable: Pointer;
+
+function EncryptionDisable;
+begin
+ GetProcedureAddress(_EncryptionDisable, advapi32, 'EncryptionDisable');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_EncryptionDisable]
+ end;
+end;
+
+var
+ _DuplicateEncryptionInfoFile: Pointer;
+
+function DuplicateEncryptionInfoFile;
+begin
+ GetProcedureAddress(_DuplicateEncryptionInfoFile, advapi32, 'DuplicateEncryptionInfoFile');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DuplicateEncryptionInfoFile]
+ end;
+end;
+
+{$ELSE}
+
+function QueryUsersOnEncryptedFile; external advapi32 name 'QueryUsersOnEncryptedFile';
+function QueryRecoveryAgentsOnEncryptedFile; external advapi32 name 'QueryRecoveryAgentsOnEncryptedFile';
+function RemoveUsersFromEncryptedFile; external advapi32 name 'RemoveUsersFromEncryptedFile';
+function AddUsersToEncryptedFile; external advapi32 name 'AddUsersToEncryptedFile';
+function SetUserFileEncryptionKey; external advapi32 name 'SetUserFileEncryptionKey';
+procedure FreeEncryptionCertificateHashList; external advapi32 name 'FreeEncryptionCertificateHashList';
+function EncryptionDisable; external advapi32 name 'EncryptionDisable';
+function DuplicateEncryptionInfoFile; external advapi32 name 'DuplicateEncryptionInfoFile';
+
+{$ENDIF DYNAMIC_LINK}
+
+end.
diff --git a/packages/extra/winunits/jwawinerror.pas b/packages/extra/winunits/jwawinerror.pas
index 4fca16c1c6..eac5329fbf 100644
--- a/packages/extra/winunits/jwawinerror.pas
+++ b/packages/extra/winunits/jwawinerror.pas
@@ -1,30447 +1,30447 @@
-{******************************************************************************}
-{ }
-{ Windows Error Codes API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: winerror.h, released June 2000. The original Pascal }
-{ code is: WinError.pas, released December 2000. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwawinerror.pas,v 1.1 2005/04/04 07:56:11 marco Exp $
-
-unit JwaWinError;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "WinError.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaWinType;
-
-//
-// Values are 32 bit values layed out as follows:
-//
-// 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1
-// 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
-// +---+-+-+-----------------------+-------------------------------+
-// |Sev|C|R| Facility | Code |
-// +---+-+-+-----------------------+-------------------------------+
-//
-// where
-//
-// Sev - is the severity code
-//
-// 00 - Success
-// 01 - Informational
-// 10 - Warning
-// 11 - Error
-//
-// C - is the Customer code flag
-//
-// R - is a reserved bit
-//
-// Facility - is the facility code
-//
-// Code - is the facility's status code
-//
-//
-// Define the facility codes
-//
-
-const
- FACILITY_WINDOWS_CE = 24;
- {$EXTERNALSYM FACILITY_WINDOWS_CE}
- FACILITY_WINDOWS = 8;
- {$EXTERNALSYM FACILITY_WINDOWS}
- FACILITY_URT = 19;
- {$EXTERNALSYM FACILITY_URT}
- FACILITY_UMI = 22;
- {$EXTERNALSYM FACILITY_UMI}
- FACILITY_SXS = 23;
- {$EXTERNALSYM FACILITY_SXS}
- FACILITY_STORAGE = 3;
- {$EXTERNALSYM FACILITY_STORAGE}
- FACILITY_STATE_MANAGEMENT = 34;
- {$EXTERNALSYM FACILITY_STATE_MANAGEMENT}
- FACILITY_SSPI = 9;
- {$EXTERNALSYM FACILITY_SSPI}
- FACILITY_SCARD = 16;
- {$EXTERNALSYM FACILITY_SCARD}
- FACILITY_SETUPAPI = 15;
- {$EXTERNALSYM FACILITY_SETUPAPI}
- FACILITY_SECURITY = 9;
- {$EXTERNALSYM FACILITY_SECURITY}
- FACILITY_RPC = 1;
- {$EXTERNALSYM FACILITY_RPC}
- FACILITY_WIN32 = 7;
- {$EXTERNALSYM FACILITY_WIN32}
- FACILITY_CONTROL = 10;
- {$EXTERNALSYM FACILITY_CONTROL}
- FACILITY_NULL = 0;
- {$EXTERNALSYM FACILITY_NULL}
- FACILITY_METADIRECTORY = 35;
- {$EXTERNALSYM FACILITY_METADIRECTORY}
- FACILITY_MSMQ = 14;
- {$EXTERNALSYM FACILITY_MSMQ}
- FACILITY_MEDIASERVER = 13;
- {$EXTERNALSYM FACILITY_MEDIASERVER}
- FACILITY_INTERNET = 12;
- {$EXTERNALSYM FACILITY_INTERNET}
- FACILITY_ITF = 4;
- {$EXTERNALSYM FACILITY_ITF}
- FACILITY_HTTP = 25;
- {$EXTERNALSYM FACILITY_HTTP}
- FACILITY_DPLAY = 21;
- {$EXTERNALSYM FACILITY_DPLAY}
- FACILITY_DISPATCH = 2;
- {$EXTERNALSYM FACILITY_DISPATCH}
- FACILITY_CONFIGURATION = 33;
- {$EXTERNALSYM FACILITY_CONFIGURATION}
- FACILITY_COMPLUS = 17;
- {$EXTERNALSYM FACILITY_COMPLUS}
- FACILITY_CERT = 11;
- {$EXTERNALSYM FACILITY_CERT}
- FACILITY_BACKGROUNDCOPY = 32;
- {$EXTERNALSYM FACILITY_BACKGROUNDCOPY}
- FACILITY_ACS = 20;
- {$EXTERNALSYM FACILITY_ACS}
- FACILITY_AAF = 18;
- {$EXTERNALSYM FACILITY_AAF}
-
-//
-// Define the severity codes
-//
-
-//
-// MessageId: ERROR_SUCCESS
-//
-// MessageText:
-//
-// The operation completed successfully.
-//
- ERROR_SUCCESS = DWORD(0);
- {$EXTERNALSYM ERROR_SUCCESS}
-
- NO_ERROR = DWORD(0); // dderror
- {$EXTERNALSYM NO_ERROR}
- SEC_E_OK = HRESULT($00000000);
- {$EXTERNALSYM SEC_E_OK}
-
-//
-// MessageId: ERROR_INVALID_FUNCTION
-//
-// MessageText:
-//
-// Incorrect function.
-//
- ERROR_INVALID_FUNCTION = DWORD(1); // dderror
- {$EXTERNALSYM ERROR_INVALID_FUNCTION}
-
-//
-// MessageId: ERROR_FILE_NOT_FOUND
-//
-// MessageText:
-//
-// The system cannot find the file specified.
-//
- ERROR_FILE_NOT_FOUND = DWORD(2);
- {$EXTERNALSYM ERROR_FILE_NOT_FOUND}
-
-//
-// MessageId: ERROR_PATH_NOT_FOUND
-//
-// MessageText:
-//
-// The system cannot find the path specified.
-//
- ERROR_PATH_NOT_FOUND = DWORD(3);
- {$EXTERNALSYM ERROR_PATH_NOT_FOUND}
-
-//
-// MessageId: ERROR_TOO_MANY_OPEN_FILES
-//
-// MessageText:
-//
-// The system cannot open the file.
-//
- ERROR_TOO_MANY_OPEN_FILES = DWORD(4);
- {$EXTERNALSYM ERROR_TOO_MANY_OPEN_FILES}
-
-//
-// MessageId: ERROR_ACCESS_DENIED
-//
-// MessageText:
-//
-// Access is denied.
-//
- ERROR_ACCESS_DENIED = DWORD(5);
- {$EXTERNALSYM ERROR_ACCESS_DENIED}
-
-//
-// MessageId: ERROR_INVALID_HANDLE
-//
-// MessageText:
-//
-// The handle is invalid.
-//
- ERROR_INVALID_HANDLE = DWORD(6);
- {$EXTERNALSYM ERROR_INVALID_HANDLE}
-
-//
-// MessageId: ERROR_ARENA_TRASHED
-//
-// MessageText:
-//
-// The storage control blocks were destroyed.
-//
- ERROR_ARENA_TRASHED = DWORD(7);
- {$EXTERNALSYM ERROR_ARENA_TRASHED}
-
-//
-// MessageId: ERROR_NOT_ENOUGH_MEMORY
-//
-// MessageText:
-//
-// Not enough storage is available to process this command.
-//
- ERROR_NOT_ENOUGH_MEMORY = DWORD(8); // dderror
- {$EXTERNALSYM ERROR_NOT_ENOUGH_MEMORY}
-
-//
-// MessageId: ERROR_INVALID_BLOCK
-//
-// MessageText:
-//
-// The storage control block address is invalid.
-//
- ERROR_INVALID_BLOCK = DWORD(9);
- {$EXTERNALSYM ERROR_INVALID_BLOCK}
-
-//
-// MessageId: ERROR_BAD_ENVIRONMENT
-//
-// MessageText:
-//
-// The environment is incorrect.
-//
- ERROR_BAD_ENVIRONMENT = DWORD(10);
- {$EXTERNALSYM ERROR_BAD_ENVIRONMENT}
-
-//
-// MessageId: ERROR_BAD_FORMAT
-//
-// MessageText:
-//
-// An attempt was made to load a program with an incorrect format.
-//
- ERROR_BAD_FORMAT = DWORD(11);
- {$EXTERNALSYM ERROR_BAD_FORMAT}
-
-//
-// MessageId: ERROR_INVALID_ACCESS
-//
-// MessageText:
-//
-// The access code is invalid.
-//
- ERROR_INVALID_ACCESS = DWORD(12);
- {$EXTERNALSYM ERROR_INVALID_ACCESS}
-
-//
-// MessageId: ERROR_INVALID_DATA
-//
-// MessageText:
-//
-// The data is invalid.
-//
- ERROR_INVALID_DATA = DWORD(13);
- {$EXTERNALSYM ERROR_INVALID_DATA}
-
-//
-// MessageId: ERROR_OUTOFMEMORY
-//
-// MessageText:
-//
-// Not enough storage is available to complete this operation.
-//
- ERROR_OUTOFMEMORY = DWORD(14);
- {$EXTERNALSYM ERROR_OUTOFMEMORY}
-
-//
-// MessageId: ERROR_INVALID_DRIVE
-//
-// MessageText:
-//
-// The system cannot find the drive specified.
-//
- ERROR_INVALID_DRIVE = DWORD(15);
- {$EXTERNALSYM ERROR_INVALID_DRIVE}
-
-//
-// MessageId: ERROR_CURRENT_DIRECTORY
-//
-// MessageText:
-//
-// The directory cannot be removed.
-//
- ERROR_CURRENT_DIRECTORY = DWORD(16);
- {$EXTERNALSYM ERROR_CURRENT_DIRECTORY}
-
-//
-// MessageId: ERROR_NOT_SAME_DEVICE
-//
-// MessageText:
-//
-// The system cannot move the file to a different disk drive.
-//
- ERROR_NOT_SAME_DEVICE = DWORD(17);
- {$EXTERNALSYM ERROR_NOT_SAME_DEVICE}
-
-//
-// MessageId: ERROR_NO_MORE_FILES
-//
-// MessageText:
-//
-// There are no more files.
-//
- ERROR_NO_MORE_FILES = DWORD(18);
- {$EXTERNALSYM ERROR_NO_MORE_FILES}
-
-//
-// MessageId: ERROR_WRITE_PROTECT
-//
-// MessageText:
-//
-// The media is write protected.
-//
- ERROR_WRITE_PROTECT = DWORD(19);
- {$EXTERNALSYM ERROR_WRITE_PROTECT}
-
-//
-// MessageId: ERROR_BAD_UNIT
-//
-// MessageText:
-//
-// The system cannot find the device specified.
-//
- ERROR_BAD_UNIT = DWORD(20);
- {$EXTERNALSYM ERROR_BAD_UNIT}
-
-//
-// MessageId: ERROR_NOT_READY
-//
-// MessageText:
-//
-// The device is not ready.
-//
- ERROR_NOT_READY = DWORD(21);
- {$EXTERNALSYM ERROR_NOT_READY}
-
-//
-// MessageId: ERROR_BAD_COMMAND
-//
-// MessageText:
-//
-// The device does not recognize the command.
-//
- ERROR_BAD_COMMAND = DWORD(22);
- {$EXTERNALSYM ERROR_BAD_COMMAND}
-
-//
-// MessageId: ERROR_CRC
-//
-// MessageText:
-//
-// Data error (cyclic redundancy check).
-//
- ERROR_CRC = DWORD(23);
- {$EXTERNALSYM ERROR_CRC}
-
-//
-// MessageId: ERROR_BAD_LENGTH
-//
-// MessageText:
-//
-// The program issued a command but the command length is incorrect.
-//
- ERROR_BAD_LENGTH = DWORD(24);
- {$EXTERNALSYM ERROR_BAD_LENGTH}
-
-//
-// MessageId: ERROR_SEEK
-//
-// MessageText:
-//
-// The drive cannot locate a specific area or track on the disk.
-//
- ERROR_SEEK = DWORD(25);
- {$EXTERNALSYM ERROR_SEEK}
-
-//
-// MessageId: ERROR_NOT_DOS_DISK
-//
-// MessageText:
-//
-// The specified disk or diskette cannot be accessed.
-//
- ERROR_NOT_DOS_DISK = DWORD(26);
- {$EXTERNALSYM ERROR_NOT_DOS_DISK}
-
-//
-// MessageId: ERROR_SECTOR_NOT_FOUND
-//
-// MessageText:
-//
-// The drive cannot find the sector requested.
-//
- ERROR_SECTOR_NOT_FOUND = DWORD(27);
- {$EXTERNALSYM ERROR_SECTOR_NOT_FOUND}
-
-//
-// MessageId: ERROR_OUT_OF_PAPER
-//
-// MessageText:
-//
-// The printer is out of paper.
-//
- ERROR_OUT_OF_PAPER = DWORD(28);
- {$EXTERNALSYM ERROR_OUT_OF_PAPER}
-
-//
-// MessageId: ERROR_WRITE_FAULT
-//
-// MessageText:
-//
-// The system cannot write to the specified device.
-//
- ERROR_WRITE_FAULT = DWORD(29);
- {$EXTERNALSYM ERROR_WRITE_FAULT}
-
-//
-// MessageId: ERROR_READ_FAULT
-//
-// MessageText:
-//
-// The system cannot read from the specified device.
-//
- ERROR_READ_FAULT = DWORD(30);
- {$EXTERNALSYM ERROR_READ_FAULT}
-
-//
-// MessageId: ERROR_GEN_FAILURE
-//
-// MessageText:
-//
-// A device attached to the system is not functioning.
-//
- ERROR_GEN_FAILURE = DWORD(31);
- {$EXTERNALSYM ERROR_GEN_FAILURE}
-
-//
-// MessageId: ERROR_SHARING_VIOLATION
-//
-// MessageText:
-//
-// The process cannot access the file because it is being used by another process.
-//
- ERROR_SHARING_VIOLATION = DWORD(32);
- {$EXTERNALSYM ERROR_SHARING_VIOLATION}
-
-//
-// MessageId: ERROR_LOCK_VIOLATION
-//
-// MessageText:
-//
-// The process cannot access the file because another process has locked a portion of the file.
-//
- ERROR_LOCK_VIOLATION = DWORD(33);
- {$EXTERNALSYM ERROR_LOCK_VIOLATION}
-
-//
-// MessageId: ERROR_WRONG_DISK
-//
-// MessageText:
-//
-// The wrong diskette is in the drive.
-// Insert %2 (Volume Serial Number: %3) into drive %1.
-//
- ERROR_WRONG_DISK = DWORD(34);
- {$EXTERNALSYM ERROR_WRONG_DISK}
-
-//
-// MessageId: ERROR_SHARING_BUFFER_EXCEEDED
-//
-// MessageText:
-//
-// Too many files opened for sharing.
-//
- ERROR_SHARING_BUFFER_EXCEEDED = DWORD(36);
- {$EXTERNALSYM ERROR_SHARING_BUFFER_EXCEEDED}
-
-//
-// MessageId: ERROR_HANDLE_EOF
-//
-// MessageText:
-//
-// Reached the end of the file.
-//
- ERROR_HANDLE_EOF = DWORD(38);
- {$EXTERNALSYM ERROR_HANDLE_EOF}
-
-//
-// MessageId: ERROR_HANDLE_DISK_FULL
-//
-// MessageText:
-//
-// The disk is full.
-//
- ERROR_HANDLE_DISK_FULL = DWORD(39);
- {$EXTERNALSYM ERROR_HANDLE_DISK_FULL}
-
-//
-// MessageId: ERROR_NOT_SUPPORTED
-//
-// MessageText:
-//
-// The request is not supported.
-//
- ERROR_NOT_SUPPORTED = DWORD(50);
- {$EXTERNALSYM ERROR_NOT_SUPPORTED}
-
-//
-// MessageId: ERROR_REM_NOT_LIST
-//
-// MessageText:
-//
-// Windows cannot find the network path. Verify that the network path is correct and the destination computer is not busy or turned off. If Windows still cannot find the network path, contact your network administrator.
-//
- ERROR_REM_NOT_LIST = DWORD(51);
- {$EXTERNALSYM ERROR_REM_NOT_LIST}
-
-//
-// MessageId: ERROR_DUP_NAME
-//
-// MessageText:
-//
-// You were not connected because a duplicate name exists on the network. Go to System in Control Panel to change the computer name and try again.
-//
- ERROR_DUP_NAME = DWORD(52);
- {$EXTERNALSYM ERROR_DUP_NAME}
-
-//
-// MessageId: ERROR_BAD_NETPATH
-//
-// MessageText:
-//
-// The network path was not found.
-//
- ERROR_BAD_NETPATH = DWORD(53);
- {$EXTERNALSYM ERROR_BAD_NETPATH}
-
-//
-// MessageId: ERROR_NETWORK_BUSY
-//
-// MessageText:
-//
-// The network is busy.
-//
- ERROR_NETWORK_BUSY = DWORD(54);
- {$EXTERNALSYM ERROR_NETWORK_BUSY}
-
-//
-// MessageId: ERROR_DEV_NOT_EXIST
-//
-// MessageText:
-//
-// The specified network resource or device is no longer available.
-//
- ERROR_DEV_NOT_EXIST = DWORD(55); // dderror
- {$EXTERNALSYM ERROR_DEV_NOT_EXIST}
-
-//
-// MessageId: ERROR_TOO_MANY_CMDS
-//
-// MessageText:
-//
-// The network BIOS command limit has been reached.
-//
- ERROR_TOO_MANY_CMDS = DWORD(56);
- {$EXTERNALSYM ERROR_TOO_MANY_CMDS}
-
-//
-// MessageId: ERROR_ADAP_HDW_ERR
-//
-// MessageText:
-//
-// A network adapter hardware error occurred.
-//
- ERROR_ADAP_HDW_ERR = DWORD(57);
- {$EXTERNALSYM ERROR_ADAP_HDW_ERR}
-
-//
-// MessageId: ERROR_BAD_NET_RESP
-//
-// MessageText:
-//
-// The specified server cannot perform the requested operation.
-//
- ERROR_BAD_NET_RESP = DWORD(58);
- {$EXTERNALSYM ERROR_BAD_NET_RESP}
-
-//
-// MessageId: ERROR_UNEXP_NET_ERR
-//
-// MessageText:
-//
-// An unexpected network error occurred.
-//
- ERROR_UNEXP_NET_ERR = DWORD(59);
- {$EXTERNALSYM ERROR_UNEXP_NET_ERR}
-
-//
-// MessageId: ERROR_BAD_REM_ADAP
-//
-// MessageText:
-//
-// The remote adapter is not compatible.
-//
- ERROR_BAD_REM_ADAP = DWORD(60);
- {$EXTERNALSYM ERROR_BAD_REM_ADAP}
-
-//
-// MessageId: ERROR_PRINTQ_FULL
-//
-// MessageText:
-//
-// The printer queue is full.
-//
- ERROR_PRINTQ_FULL = DWORD(61);
- {$EXTERNALSYM ERROR_PRINTQ_FULL}
-
-//
-// MessageId: ERROR_NO_SPOOL_SPACE
-//
-// MessageText:
-//
-// Space to store the file waiting to be printed is not available on the server.
-//
- ERROR_NO_SPOOL_SPACE = DWORD(62);
- {$EXTERNALSYM ERROR_NO_SPOOL_SPACE}
-
-//
-// MessageId: ERROR_PRINT_CANCELLED
-//
-// MessageText:
-//
-// Your file waiting to be printed was deleted.
-//
- ERROR_PRINT_CANCELLED = DWORD(63);
- {$EXTERNALSYM ERROR_PRINT_CANCELLED}
-
-//
-// MessageId: ERROR_NETNAME_DELETED
-//
-// MessageText:
-//
-// The specified network name is no longer available.
-//
- ERROR_NETNAME_DELETED = DWORD(64);
- {$EXTERNALSYM ERROR_NETNAME_DELETED}
-
-//
-// MessageId: ERROR_NETWORK_ACCESS_DENIED
-//
-// MessageText:
-//
-// Network access is denied.
-//
- ERROR_NETWORK_ACCESS_DENIED = DWORD(65);
- {$EXTERNALSYM ERROR_NETWORK_ACCESS_DENIED}
-
-//
-// MessageId: ERROR_BAD_DEV_TYPE
-//
-// MessageText:
-//
-// The network resource type is not correct.
-//
- ERROR_BAD_DEV_TYPE = DWORD(66);
- {$EXTERNALSYM ERROR_BAD_DEV_TYPE}
-
-//
-// MessageId: ERROR_BAD_NET_NAME
-//
-// MessageText:
-//
-// The network name cannot be found.
-//
- ERROR_BAD_NET_NAME = DWORD(67);
- {$EXTERNALSYM ERROR_BAD_NET_NAME}
-
-//
-// MessageId: ERROR_TOO_MANY_NAMES
-//
-// MessageText:
-//
-// The name limit for the local computer network adapter card was exceeded.
-//
- ERROR_TOO_MANY_NAMES = DWORD(68);
- {$EXTERNALSYM ERROR_TOO_MANY_NAMES}
-
-//
-// MessageId: ERROR_TOO_MANY_SESS
-//
-// MessageText:
-//
-// The network BIOS session limit was exceeded.
-//
- ERROR_TOO_MANY_SESS = DWORD(69);
- {$EXTERNALSYM ERROR_TOO_MANY_SESS}
-
-//
-// MessageId: ERROR_SHARING_PAUSED
-//
-// MessageText:
-//
-// The remote server has been paused or is in the process of being started.
-//
- ERROR_SHARING_PAUSED = DWORD(70);
- {$EXTERNALSYM ERROR_SHARING_PAUSED}
-
-//
-// MessageId: ERROR_REQ_NOT_ACCEP
-//
-// MessageText:
-//
-// No more connections can be made to this remote computer at this time because there are already as many connections as the computer can accept.
-//
- ERROR_REQ_NOT_ACCEP = DWORD(71);
- {$EXTERNALSYM ERROR_REQ_NOT_ACCEP}
-
-//
-// MessageId: ERROR_REDIR_PAUSED
-//
-// MessageText:
-//
-// The specified printer or disk device has been paused.
-//
- ERROR_REDIR_PAUSED = DWORD(72);
- {$EXTERNALSYM ERROR_REDIR_PAUSED}
-
-//
-// MessageId: ERROR_FILE_EXISTS
-//
-// MessageText:
-//
-// The file exists.
-//
- ERROR_FILE_EXISTS = DWORD(80);
- {$EXTERNALSYM ERROR_FILE_EXISTS}
-
-//
-// MessageId: ERROR_CANNOT_MAKE
-//
-// MessageText:
-//
-// The directory or file cannot be created.
-//
- ERROR_CANNOT_MAKE = DWORD(82);
- {$EXTERNALSYM ERROR_CANNOT_MAKE}
-
-//
-// MessageId: ERROR_FAIL_I24
-//
-// MessageText:
-//
-// Fail on INT 24.
-//
- ERROR_FAIL_I24 = DWORD(83);
- {$EXTERNALSYM ERROR_FAIL_I24}
-
-//
-// MessageId: ERROR_OUT_OF_STRUCTURES
-//
-// MessageText:
-//
-// Storage to process this request is not available.
-//
- ERROR_OUT_OF_STRUCTURES = DWORD(84);
- {$EXTERNALSYM ERROR_OUT_OF_STRUCTURES}
-
-//
-// MessageId: ERROR_ALREADY_ASSIGNED
-//
-// MessageText:
-//
-// The local device name is already in use.
-//
- ERROR_ALREADY_ASSIGNED = DWORD(85);
- {$EXTERNALSYM ERROR_ALREADY_ASSIGNED}
-
-//
-// MessageId: ERROR_INVALID_PASSWORD
-//
-// MessageText:
-//
-// The specified network password is not correct.
-//
- ERROR_INVALID_PASSWORD = DWORD(86);
- {$EXTERNALSYM ERROR_INVALID_PASSWORD}
-
-//
-// MessageId: ERROR_INVALID_PARAMETER
-//
-// MessageText:
-//
-// The parameter is incorrect.
-//
- ERROR_INVALID_PARAMETER = DWORD(87); // dderror
- {$EXTERNALSYM ERROR_INVALID_PARAMETER}
-
-//
-// MessageId: ERROR_NET_WRITE_FAULT
-//
-// MessageText:
-//
-// A write fault occurred on the network.
-//
- ERROR_NET_WRITE_FAULT = DWORD(88);
- {$EXTERNALSYM ERROR_NET_WRITE_FAULT}
-
-//
-// MessageId: ERROR_NO_PROC_SLOTS
-//
-// MessageText:
-//
-// The system cannot start another process at this time.
-//
- ERROR_NO_PROC_SLOTS = DWORD(89);
- {$EXTERNALSYM ERROR_NO_PROC_SLOTS}
-
-//
-// MessageId: ERROR_TOO_MANY_SEMAPHORES
-//
-// MessageText:
-//
-// Cannot create another system semaphore.
-//
- ERROR_TOO_MANY_SEMAPHORES = DWORD(100);
- {$EXTERNALSYM ERROR_TOO_MANY_SEMAPHORES}
-
-//
-// MessageId: ERROR_EXCL_SEM_ALREADY_OWNED
-//
-// MessageText:
-//
-// The exclusive semaphore is owned by another process.
-//
- ERROR_EXCL_SEM_ALREADY_OWNED = DWORD(101);
- {$EXTERNALSYM ERROR_EXCL_SEM_ALREADY_OWNED}
-
-//
-// MessageId: ERROR_SEM_IS_SET
-//
-// MessageText:
-//
-// The semaphore is set and cannot be closed.
-//
- ERROR_SEM_IS_SET = DWORD(102);
- {$EXTERNALSYM ERROR_SEM_IS_SET}
-
-//
-// MessageId: ERROR_TOO_MANY_SEM_REQUESTS
-//
-// MessageText:
-//
-// The semaphore cannot be set again.
-//
- ERROR_TOO_MANY_SEM_REQUESTS = DWORD(103);
- {$EXTERNALSYM ERROR_TOO_MANY_SEM_REQUESTS}
-
-//
-// MessageId: ERROR_INVALID_AT_INTERRUPT_TIME
-//
-// MessageText:
-//
-// Cannot request exclusive semaphores at interrupt time.
-//
- ERROR_INVALID_AT_INTERRUPT_TIME = DWORD(104);
- {$EXTERNALSYM ERROR_INVALID_AT_INTERRUPT_TIME}
-
-//
-// MessageId: ERROR_SEM_OWNER_DIED
-//
-// MessageText:
-//
-// The previous ownership of this semaphore has ended.
-//
- ERROR_SEM_OWNER_DIED = DWORD(105);
- {$EXTERNALSYM ERROR_SEM_OWNER_DIED}
-
-//
-// MessageId: ERROR_SEM_USER_LIMIT
-//
-// MessageText:
-//
-// Insert the diskette for drive %1.
-//
- ERROR_SEM_USER_LIMIT = DWORD(106);
- {$EXTERNALSYM ERROR_SEM_USER_LIMIT}
-
-//
-// MessageId: ERROR_DISK_CHANGE
-//
-// MessageText:
-//
-// The program stopped because an alternate diskette was not inserted.
-//
- ERROR_DISK_CHANGE = DWORD(107);
- {$EXTERNALSYM ERROR_DISK_CHANGE}
-
-//
-// MessageId: ERROR_DRIVE_LOCKED
-//
-// MessageText:
-//
-// The disk is in use or locked by another process.
-//
- ERROR_DRIVE_LOCKED = DWORD(108);
- {$EXTERNALSYM ERROR_DRIVE_LOCKED}
-
-//
-// MessageId: ERROR_BROKEN_PIPE
-//
-// MessageText:
-//
-// The pipe has been ended.
-//
- ERROR_BROKEN_PIPE = DWORD(109);
- {$EXTERNALSYM ERROR_BROKEN_PIPE}
-
-//
-// MessageId: ERROR_OPEN_FAILED
-//
-// MessageText:
-//
-// The system cannot open the device or file specified.
-//
- ERROR_OPEN_FAILED = DWORD(110);
- {$EXTERNALSYM ERROR_OPEN_FAILED}
-
-//
-// MessageId: ERROR_BUFFER_OVERFLOW
-//
-// MessageText:
-//
-// The file name is too long.
-//
- ERROR_BUFFER_OVERFLOW = DWORD(111);
- {$EXTERNALSYM ERROR_BUFFER_OVERFLOW}
-
-//
-// MessageId: ERROR_DISK_FULL
-//
-// MessageText:
-//
-// There is not enough space on the disk.
-//
- ERROR_DISK_FULL = DWORD(112);
- {$EXTERNALSYM ERROR_DISK_FULL}
-
-//
-// MessageId: ERROR_NO_MORE_SEARCH_HANDLES
-//
-// MessageText:
-//
-// No more internal file identifiers available.
-//
- ERROR_NO_MORE_SEARCH_HANDLES = DWORD(113);
- {$EXTERNALSYM ERROR_NO_MORE_SEARCH_HANDLES}
-
-//
-// MessageId: ERROR_INVALID_TARGET_HANDLE
-//
-// MessageText:
-//
-// The target internal file identifier is incorrect.
-//
- ERROR_INVALID_TARGET_HANDLE = DWORD(114);
- {$EXTERNALSYM ERROR_INVALID_TARGET_HANDLE}
-
-//
-// MessageId: ERROR_INVALID_CATEGORY
-//
-// MessageText:
-//
-// The IOCTL call made by the application program is not correct.
-//
- ERROR_INVALID_CATEGORY = DWORD(117);
- {$EXTERNALSYM ERROR_INVALID_CATEGORY}
-
-//
-// MessageId: ERROR_INVALID_VERIFY_SWITCH
-//
-// MessageText:
-//
-// The verify-on-write switch parameter value is not correct.
-//
- ERROR_INVALID_VERIFY_SWITCH = DWORD(118);
- {$EXTERNALSYM ERROR_INVALID_VERIFY_SWITCH}
-
-//
-// MessageId: ERROR_BAD_DRIVER_LEVEL
-//
-// MessageText:
-//
-// The system does not support the command requested.
-//
- ERROR_BAD_DRIVER_LEVEL = DWORD(119);
- {$EXTERNALSYM ERROR_BAD_DRIVER_LEVEL}
-
-//
-// MessageId: ERROR_CALL_NOT_IMPLEMENTED
-//
-// MessageText:
-//
-// This function is not supported on this system.
-//
- ERROR_CALL_NOT_IMPLEMENTED = DWORD(120);
- {$EXTERNALSYM ERROR_CALL_NOT_IMPLEMENTED}
-
-//
-// MessageId: ERROR_SEM_TIMEOUT
-//
-// MessageText:
-//
-// The semaphore timeout period has expired.
-//
- ERROR_SEM_TIMEOUT = DWORD(121);
- {$EXTERNALSYM ERROR_SEM_TIMEOUT}
-
-//
-// MessageId: ERROR_INSUFFICIENT_BUFFER
-//
-// MessageText:
-//
-// The data area passed to a system call is too small.
-//
- ERROR_INSUFFICIENT_BUFFER = DWORD(122); // dderror
- {$EXTERNALSYM ERROR_INSUFFICIENT_BUFFER}
-
-//
-// MessageId: ERROR_INVALID_NAME
-//
-// MessageText:
-//
-// The filename, directory name, or volume label syntax is incorrect.
-//
- ERROR_INVALID_NAME = DWORD(123); // dderror
- {$EXTERNALSYM ERROR_INVALID_NAME}
-
-//
-// MessageId: ERROR_INVALID_LEVEL
-//
-// MessageText:
-//
-// The system call level is not correct.
-//
- ERROR_INVALID_LEVEL = DWORD(124);
- {$EXTERNALSYM ERROR_INVALID_LEVEL}
-
-//
-// MessageId: ERROR_NO_VOLUME_LABEL
-//
-// MessageText:
-//
-// The disk has no volume label.
-//
- ERROR_NO_VOLUME_LABEL = DWORD(125);
- {$EXTERNALSYM ERROR_NO_VOLUME_LABEL}
-
-//
-// MessageId: ERROR_MOD_NOT_FOUND
-//
-// MessageText:
-//
-// The specified module could not be found.
-//
- ERROR_MOD_NOT_FOUND = DWORD(126);
- {$EXTERNALSYM ERROR_MOD_NOT_FOUND}
-
-//
-// MessageId: ERROR_PROC_NOT_FOUND
-//
-// MessageText:
-//
-// The specified procedure could not be found.
-//
- ERROR_PROC_NOT_FOUND = DWORD(127);
- {$EXTERNALSYM ERROR_PROC_NOT_FOUND}
-
-//
-// MessageId: ERROR_WAIT_NO_CHILDREN
-//
-// MessageText:
-//
-// There are no child processes to wait for.
-//
- ERROR_WAIT_NO_CHILDREN = DWORD(128);
- {$EXTERNALSYM ERROR_WAIT_NO_CHILDREN}
-
-//
-// MessageId: ERROR_CHILD_NOT_COMPLETE
-//
-// MessageText:
-//
-// The %1 application cannot be run in Win32 mode.
-//
- ERROR_CHILD_NOT_COMPLETE = DWORD(129);
- {$EXTERNALSYM ERROR_CHILD_NOT_COMPLETE}
-
-//
-// MessageId: ERROR_DIRECT_ACCESS_HANDLE
-//
-// MessageText:
-//
-// Attempt to use a file handle to an open disk partition for an operation other than raw disk I/O.
-//
- ERROR_DIRECT_ACCESS_HANDLE = DWORD(130);
- {$EXTERNALSYM ERROR_DIRECT_ACCESS_HANDLE}
-
-//
-// MessageId: ERROR_NEGATIVE_SEEK
-//
-// MessageText:
-//
-// An attempt was made to move the file pointer before the beginning of the file.
-//
- ERROR_NEGATIVE_SEEK = DWORD(131);
- {$EXTERNALSYM ERROR_NEGATIVE_SEEK}
-
-//
-// MessageId: ERROR_SEEK_ON_DEVICE
-//
-// MessageText:
-//
-// The file pointer cannot be set on the specified device or file.
-//
- ERROR_SEEK_ON_DEVICE = DWORD(132);
- {$EXTERNALSYM ERROR_SEEK_ON_DEVICE}
-
-//
-// MessageId: ERROR_IS_JOIN_TARGET
-//
-// MessageText:
-//
-// A JOIN or SUBST command cannot be used for a drive that contains previously joined drives.
-//
- ERROR_IS_JOIN_TARGET = DWORD(133);
- {$EXTERNALSYM ERROR_IS_JOIN_TARGET}
-
-//
-// MessageId: ERROR_IS_JOINED
-//
-// MessageText:
-//
-// An attempt was made to use a JOIN or SUBST command on a drive that has already been joined.
-//
- ERROR_IS_JOINED = DWORD(134);
- {$EXTERNALSYM ERROR_IS_JOINED}
-
-//
-// MessageId: ERROR_IS_SUBSTED
-//
-// MessageText:
-//
-// An attempt was made to use a JOIN or SUBST command on a drive that has already been substituted.
-//
- ERROR_IS_SUBSTED = DWORD(135);
- {$EXTERNALSYM ERROR_IS_SUBSTED}
-
-//
-// MessageId: ERROR_NOT_JOINED
-//
-// MessageText:
-//
-// The system tried to delete the JOIN of a drive that is not joined.
-//
- ERROR_NOT_JOINED = DWORD(136);
- {$EXTERNALSYM ERROR_NOT_JOINED}
-
-//
-// MessageId: ERROR_NOT_SUBSTED
-//
-// MessageText:
-//
-// The system tried to delete the substitution of a drive that is not substituted.
-//
- ERROR_NOT_SUBSTED = DWORD(137);
- {$EXTERNALSYM ERROR_NOT_SUBSTED}
-
-//
-// MessageId: ERROR_JOIN_TO_JOIN
-//
-// MessageText:
-//
-// The system tried to join a drive to a directory on a joined drive.
-//
- ERROR_JOIN_TO_JOIN = DWORD(138);
- {$EXTERNALSYM ERROR_JOIN_TO_JOIN}
-
-//
-// MessageId: ERROR_SUBST_TO_SUBST
-//
-// MessageText:
-//
-// The system tried to substitute a drive to a directory on a substituted drive.
-//
- ERROR_SUBST_TO_SUBST = DWORD(139);
- {$EXTERNALSYM ERROR_SUBST_TO_SUBST}
-
-//
-// MessageId: ERROR_JOIN_TO_SUBST
-//
-// MessageText:
-//
-// The system tried to join a drive to a directory on a substituted drive.
-//
- ERROR_JOIN_TO_SUBST = DWORD(140);
- {$EXTERNALSYM ERROR_JOIN_TO_SUBST}
-
-//
-// MessageId: ERROR_SUBST_TO_JOIN
-//
-// MessageText:
-//
-// The system tried to SUBST a drive to a directory on a joined drive.
-//
- ERROR_SUBST_TO_JOIN = DWORD(141);
- {$EXTERNALSYM ERROR_SUBST_TO_JOIN}
-
-//
-// MessageId: ERROR_BUSY_DRIVE
-//
-// MessageText:
-//
-// The system cannot perform a JOIN or SUBST at this time.
-//
- ERROR_BUSY_DRIVE = DWORD(142);
- {$EXTERNALSYM ERROR_BUSY_DRIVE}
-
-//
-// MessageId: ERROR_SAME_DRIVE
-//
-// MessageText:
-//
-// The system cannot join or substitute a drive to or for a directory on the same drive.
-//
- ERROR_SAME_DRIVE = DWORD(143);
- {$EXTERNALSYM ERROR_SAME_DRIVE}
-
-//
-// MessageId: ERROR_DIR_NOT_ROOT
-//
-// MessageText:
-//
-// The directory is not a subdirectory of the root directory.
-//
- ERROR_DIR_NOT_ROOT = DWORD(144);
- {$EXTERNALSYM ERROR_DIR_NOT_ROOT}
-
-//
-// MessageId: ERROR_DIR_NOT_EMPTY
-//
-// MessageText:
-//
-// The directory is not empty.
-//
- ERROR_DIR_NOT_EMPTY = DWORD(145);
- {$EXTERNALSYM ERROR_DIR_NOT_EMPTY}
-
-//
-// MessageId: ERROR_IS_SUBST_PATH
-//
-// MessageText:
-//
-// The path specified is being used in a substitute.
-//
- ERROR_IS_SUBST_PATH = DWORD(146);
- {$EXTERNALSYM ERROR_IS_SUBST_PATH}
-
-//
-// MessageId: ERROR_IS_JOIN_PATH
-//
-// MessageText:
-//
-// Not enough resources are available to process this command.
-//
- ERROR_IS_JOIN_PATH = DWORD(147);
- {$EXTERNALSYM ERROR_IS_JOIN_PATH}
-
-//
-// MessageId: ERROR_PATH_BUSY
-//
-// MessageText:
-//
-// The path specified cannot be used at this time.
-//
- ERROR_PATH_BUSY = DWORD(148);
- {$EXTERNALSYM ERROR_PATH_BUSY}
-
-//
-// MessageId: ERROR_IS_SUBST_TARGET
-//
-// MessageText:
-//
-// An attempt was made to join or substitute a drive for which a directory on the drive is the target of a previous substitute.
-//
- ERROR_IS_SUBST_TARGET = DWORD(149);
- {$EXTERNALSYM ERROR_IS_SUBST_TARGET}
-
-//
-// MessageId: ERROR_SYSTEM_TRACE
-//
-// MessageText:
-//
-// System trace information was not specified in your CONFIG.SYS file, or tracing is disallowed.
-//
- ERROR_SYSTEM_TRACE = DWORD(150);
- {$EXTERNALSYM ERROR_SYSTEM_TRACE}
-
-//
-// MessageId: ERROR_INVALID_EVENT_COUNT
-//
-// MessageText:
-//
-// The number of specified semaphore events for DosMuxSemWait is not correct.
-//
- ERROR_INVALID_EVENT_COUNT = DWORD(151);
- {$EXTERNALSYM ERROR_INVALID_EVENT_COUNT}
-
-//
-// MessageId: ERROR_TOO_MANY_MUXWAITERS
-//
-// MessageText:
-//
-// DosMuxSemWait did not execute; too many semaphores are already set.
-//
- ERROR_TOO_MANY_MUXWAITERS = DWORD(152);
- {$EXTERNALSYM ERROR_TOO_MANY_MUXWAITERS}
-
-//
-// MessageId: ERROR_INVALID_LIST_FORMAT
-//
-// MessageText:
-//
-// The DosMuxSemWait list is not correct.
-//
- ERROR_INVALID_LIST_FORMAT = DWORD(153);
- {$EXTERNALSYM ERROR_INVALID_LIST_FORMAT}
-
-//
-// MessageId: ERROR_LABEL_TOO_LONG
-//
-// MessageText:
-//
-// The volume label you entered exceeds the label character limit of the target file system.
-//
- ERROR_LABEL_TOO_LONG = DWORD(154);
- {$EXTERNALSYM ERROR_LABEL_TOO_LONG}
-
-//
-// MessageId: ERROR_TOO_MANY_TCBS
-//
-// MessageText:
-//
-// Cannot create another thread.
-//
- ERROR_TOO_MANY_TCBS = DWORD(155);
- {$EXTERNALSYM ERROR_TOO_MANY_TCBS}
-
-//
-// MessageId: ERROR_SIGNAL_REFUSED
-//
-// MessageText:
-//
-// The recipient process has refused the signal.
-//
- ERROR_SIGNAL_REFUSED = DWORD(156);
- {$EXTERNALSYM ERROR_SIGNAL_REFUSED}
-
-//
-// MessageId: ERROR_DISCARDED
-//
-// MessageText:
-//
-// The segment is already discarded and cannot be locked.
-//
- ERROR_DISCARDED = DWORD(157);
- {$EXTERNALSYM ERROR_DISCARDED}
-
-//
-// MessageId: ERROR_NOT_LOCKED
-//
-// MessageText:
-//
-// The segment is already unlocked.
-//
- ERROR_NOT_LOCKED = DWORD(158);
- {$EXTERNALSYM ERROR_NOT_LOCKED}
-
-//
-// MessageId: ERROR_BAD_THREADID_ADDR
-//
-// MessageText:
-//
-// The address for the thread ID is not correct.
-//
- ERROR_BAD_THREADID_ADDR = DWORD(159);
- {$EXTERNALSYM ERROR_BAD_THREADID_ADDR}
-
-//
-// MessageId: ERROR_BAD_ARGUMENTS
-//
-// MessageText:
-//
-// One or more arguments are not correct.
-//
- ERROR_BAD_ARGUMENTS = DWORD(160);
- {$EXTERNALSYM ERROR_BAD_ARGUMENTS}
-
-//
-// MessageId: ERROR_BAD_PATHNAME
-//
-// MessageText:
-//
-// The specified path is invalid.
-//
- ERROR_BAD_PATHNAME = DWORD(161);
- {$EXTERNALSYM ERROR_BAD_PATHNAME}
-
-//
-// MessageId: ERROR_SIGNAL_PENDING
-//
-// MessageText:
-//
-// A signal is already pending.
-//
- ERROR_SIGNAL_PENDING = DWORD(162);
- {$EXTERNALSYM ERROR_SIGNAL_PENDING}
-
-//
-// MessageId: ERROR_MAX_THRDS_REACHED
-//
-// MessageText:
-//
-// No more threads can be created in the system.
-//
- ERROR_MAX_THRDS_REACHED = DWORD(164);
- {$EXTERNALSYM ERROR_MAX_THRDS_REACHED}
-
-//
-// MessageId: ERROR_LOCK_FAILED
-//
-// MessageText:
-//
-// Unable to lock a region of a file.
-//
- ERROR_LOCK_FAILED = DWORD(167);
- {$EXTERNALSYM ERROR_LOCK_FAILED}
-
-//
-// MessageId: ERROR_BUSY
-//
-// MessageText:
-//
-// The requested resource is in use.
-//
- ERROR_BUSY = DWORD(170); // dderror
- {$EXTERNALSYM ERROR_BUSY}
-
-//
-// MessageId: ERROR_CANCEL_VIOLATION
-//
-// MessageText:
-//
-// A lock request was not outstanding for the supplied cancel region.
-//
- ERROR_CANCEL_VIOLATION = DWORD(173);
- {$EXTERNALSYM ERROR_CANCEL_VIOLATION}
-
-//
-// MessageId: ERROR_ATOMIC_LOCKS_NOT_SUPPORTED
-//
-// MessageText:
-//
-// The file system does not support atomic changes to the lock type.
-//
- ERROR_ATOMIC_LOCKS_NOT_SUPPORTED = DWORD(174);
- {$EXTERNALSYM ERROR_ATOMIC_LOCKS_NOT_SUPPORTED}
-
-//
-// MessageId: ERROR_INVALID_SEGMENT_NUMBER
-//
-// MessageText:
-//
-// The system detected a segment number that was not correct.
-//
- ERROR_INVALID_SEGMENT_NUMBER = DWORD(180);
- {$EXTERNALSYM ERROR_INVALID_SEGMENT_NUMBER}
-
-//
-// MessageId: ERROR_INVALID_ORDINAL
-//
-// MessageText:
-//
-// The operating system cannot run %1.
-//
- ERROR_INVALID_ORDINAL = DWORD(182);
- {$EXTERNALSYM ERROR_INVALID_ORDINAL}
-
-//
-// MessageId: ERROR_ALREADY_EXISTS
-//
-// MessageText:
-//
-// Cannot create a file when that file already exists.
-//
- ERROR_ALREADY_EXISTS = DWORD(183);
- {$EXTERNALSYM ERROR_ALREADY_EXISTS}
-
-//
-// MessageId: ERROR_INVALID_FLAG_NUMBER
-//
-// MessageText:
-//
-// The flag passed is not correct.
-//
- ERROR_INVALID_FLAG_NUMBER = DWORD(186);
- {$EXTERNALSYM ERROR_INVALID_FLAG_NUMBER}
-
-//
-// MessageId: ERROR_SEM_NOT_FOUND
-//
-// MessageText:
-//
-// The specified system semaphore name was not found.
-//
- ERROR_SEM_NOT_FOUND = DWORD(187);
- {$EXTERNALSYM ERROR_SEM_NOT_FOUND}
-
-//
-// MessageId: ERROR_INVALID_STARTING_CODESEG
-//
-// MessageText:
-//
-// The operating system cannot run %1.
-//
- ERROR_INVALID_STARTING_CODESEG = DWORD(188);
- {$EXTERNALSYM ERROR_INVALID_STARTING_CODESEG}
-
-//
-// MessageId: ERROR_INVALID_STACKSEG
-//
-// MessageText:
-//
-// The operating system cannot run %1.
-//
- ERROR_INVALID_STACKSEG = DWORD(189);
- {$EXTERNALSYM ERROR_INVALID_STACKSEG}
-
-//
-// MessageId: ERROR_INVALID_MODULETYPE
-//
-// MessageText:
-//
-// The operating system cannot run %1.
-//
- ERROR_INVALID_MODULETYPE = DWORD(190);
- {$EXTERNALSYM ERROR_INVALID_MODULETYPE}
-
-//
-// MessageId: ERROR_INVALID_EXE_SIGNATURE
-//
-// MessageText:
-//
-// Cannot run %1 in Win32 mode.
-//
- ERROR_INVALID_EXE_SIGNATURE = DWORD(191);
- {$EXTERNALSYM ERROR_INVALID_EXE_SIGNATURE}
-
-//
-// MessageId: ERROR_EXE_MARKED_INVALID
-//
-// MessageText:
-//
-// The operating system cannot run %1.
-//
- ERROR_EXE_MARKED_INVALID = DWORD(192);
- {$EXTERNALSYM ERROR_EXE_MARKED_INVALID}
-
-//
-// MessageId: ERROR_BAD_EXE_FORMAT
-//
-// MessageText:
-//
-// %1 is not a valid Win32 application.
-//
- ERROR_BAD_EXE_FORMAT = DWORD(193);
- {$EXTERNALSYM ERROR_BAD_EXE_FORMAT}
-
-//
-// MessageId: ERROR_ITERATED_DATA_EXCEEDS_64k
-//
-// MessageText:
-//
-// The operating system cannot run %1.
-//
- ERROR_ITERATED_DATA_EXCEEDS_64k = DWORD(194);
- {$EXTERNALSYM ERROR_ITERATED_DATA_EXCEEDS_64k}
-
-//
-// MessageId: ERROR_INVALID_MINALLOCSIZE
-//
-// MessageText:
-//
-// The operating system cannot run %1.
-//
- ERROR_INVALID_MINALLOCSIZE = DWORD(195);
- {$EXTERNALSYM ERROR_INVALID_MINALLOCSIZE}
-
-//
-// MessageId: ERROR_DYNLINK_FROM_INVALID_RING
-//
-// MessageText:
-//
-// The operating system cannot run this application program.
-//
- ERROR_DYNLINK_FROM_INVALID_RING = DWORD(196);
- {$EXTERNALSYM ERROR_DYNLINK_FROM_INVALID_RING}
-
-//
-// MessageId: ERROR_IOPL_NOT_ENABLED
-//
-// MessageText:
-//
-// The operating system is not presently configured to run this application.
-//
- ERROR_IOPL_NOT_ENABLED = DWORD(197);
- {$EXTERNALSYM ERROR_IOPL_NOT_ENABLED}
-
-//
-// MessageId: ERROR_INVALID_SEGDPL
-//
-// MessageText:
-//
-// The operating system cannot run %1.
-//
- ERROR_INVALID_SEGDPL = DWORD(198);
- {$EXTERNALSYM ERROR_INVALID_SEGDPL}
-
-//
-// MessageId: ERROR_AUTODATASEG_EXCEEDS_64k
-//
-// MessageText:
-//
-// The operating system cannot run this application program.
-//
- ERROR_AUTODATASEG_EXCEEDS_64k = DWORD(199);
- {$EXTERNALSYM ERROR_AUTODATASEG_EXCEEDS_64k}
-
-//
-// MessageId: ERROR_RING2SEG_MUST_BE_MOVABLE
-//
-// MessageText:
-//
-// The code segment cannot be greater than or equal to 64K.
-//
- ERROR_RING2SEG_MUST_BE_MOVABLE = DWORD(200);
- {$EXTERNALSYM ERROR_RING2SEG_MUST_BE_MOVABLE}
-
-//
-// MessageId: ERROR_RELOC_CHAIN_XEEDS_SEGLIM
-//
-// MessageText:
-//
-// The operating system cannot run %1.
-//
- ERROR_RELOC_CHAIN_XEEDS_SEGLIM = DWORD(201);
- {$EXTERNALSYM ERROR_RELOC_CHAIN_XEEDS_SEGLIM}
-
-//
-// MessageId: ERROR_INFLOOP_IN_RELOC_CHAIN
-//
-// MessageText:
-//
-// The operating system cannot run %1.
-//
- ERROR_INFLOOP_IN_RELOC_CHAIN = DWORD(202);
- {$EXTERNALSYM ERROR_INFLOOP_IN_RELOC_CHAIN}
-
-//
-// MessageId: ERROR_ENVVAR_NOT_FOUND
-//
-// MessageText:
-//
-// The system could not find the environment option that was entered.
-//
- ERROR_ENVVAR_NOT_FOUND = DWORD(203);
- {$EXTERNALSYM ERROR_ENVVAR_NOT_FOUND}
-
-//
-// MessageId: ERROR_NO_SIGNAL_SENT
-//
-// MessageText:
-//
-// No process in the command subtree has a signal handler.
-//
- ERROR_NO_SIGNAL_SENT = DWORD(205);
- {$EXTERNALSYM ERROR_NO_SIGNAL_SENT}
-
-//
-// MessageId: ERROR_FILENAME_EXCED_RANGE
-//
-// MessageText:
-//
-// The filename or extension is too long.
-//
- ERROR_FILENAME_EXCED_RANGE = DWORD(206);
- {$EXTERNALSYM ERROR_FILENAME_EXCED_RANGE}
-
-//
-// MessageId: ERROR_RING2_STACK_IN_USE
-//
-// MessageText:
-//
-// The ring 2 stack is in use.
-//
- ERROR_RING2_STACK_IN_USE = DWORD(207);
- {$EXTERNALSYM ERROR_RING2_STACK_IN_USE}
-
-//
-// MessageId: ERROR_META_EXPANSION_TOO_LONG
-//
-// MessageText:
-//
-// The global filename characters, * or ?, are entered incorrectly or too many global filename characters are specified.
-//
- ERROR_META_EXPANSION_TOO_LONG = DWORD(208);
- {$EXTERNALSYM ERROR_META_EXPANSION_TOO_LONG}
-
-//
-// MessageId: ERROR_INVALID_SIGNAL_NUMBER
-//
-// MessageText:
-//
-// The signal being posted is not correct.
-//
- ERROR_INVALID_SIGNAL_NUMBER = DWORD(209);
- {$EXTERNALSYM ERROR_INVALID_SIGNAL_NUMBER}
-
-//
-// MessageId: ERROR_THREAD_1_INACTIVE
-//
-// MessageText:
-//
-// The signal handler cannot be set.
-//
- ERROR_THREAD_1_INACTIVE = DWORD(210);
- {$EXTERNALSYM ERROR_THREAD_1_INACTIVE}
-
-//
-// MessageId: ERROR_LOCKED
-//
-// MessageText:
-//
-// The segment is locked and cannot be reallocated.
-//
- ERROR_LOCKED = DWORD(212);
- {$EXTERNALSYM ERROR_LOCKED}
-
-//
-// MessageId: ERROR_TOO_MANY_MODULES
-//
-// MessageText:
-//
-// Too many dynamic-link modules are attached to this program or dynamic-link module.
-//
- ERROR_TOO_MANY_MODULES = DWORD(214);
- {$EXTERNALSYM ERROR_TOO_MANY_MODULES}
-
-//
-// MessageId: ERROR_NESTING_NOT_ALLOWED
-//
-// MessageText:
-//
-// Cannot nest calls to LoadModule.
-//
- ERROR_NESTING_NOT_ALLOWED = DWORD(215);
- {$EXTERNALSYM ERROR_NESTING_NOT_ALLOWED}
-
-//
-// MessageId: ERROR_EXE_MACHINE_TYPE_MISMATCH
-//
-// MessageText:
-//
-// The image file %1 is valid, but is for a machine type other than the current machine.
-//
- ERROR_EXE_MACHINE_TYPE_MISMATCH = DWORD(216);
- {$EXTERNALSYM ERROR_EXE_MACHINE_TYPE_MISMATCH}
-
-//
-// MessageId: ERROR_EXE_CANNOT_MODIFY_SIGNED_BINARY
-//
-// MessageText:
-//
-// The image file %1 is signed, unable to modify.
-//
- ERROR_EXE_CANNOT_MODIFY_SIGNED_BINARY = DWORD(217);
- {$EXTERNALSYM ERROR_EXE_CANNOT_MODIFY_SIGNED_BINARY}
-
-//
-// MessageId: ERROR_EXE_CANNOT_MODIFY_STRONG_SIGNED_BINARY
-//
-// MessageText:
-//
-// The image file %1 is strong signed, unable to modify.
-//
- ERROR_EXE_CANNOT_MODIFY_STRONG_SIGNED_BINARY = DWORD(218);
- {$EXTERNALSYM ERROR_EXE_CANNOT_MODIFY_STRONG_SIGNED_BINARY}
-
-//
-// MessageId: ERROR_BAD_PIPE
-//
-// MessageText:
-//
-// The pipe state is invalid.
-//
- ERROR_BAD_PIPE = DWORD(230);
- {$EXTERNALSYM ERROR_BAD_PIPE}
-
-//
-// MessageId: ERROR_PIPE_BUSY
-//
-// MessageText:
-//
-// All pipe instances are busy.
-//
- ERROR_PIPE_BUSY = DWORD(231);
- {$EXTERNALSYM ERROR_PIPE_BUSY}
-
-//
-// MessageId: ERROR_NO_DATA
-//
-// MessageText:
-//
-// The pipe is being closed.
-//
- ERROR_NO_DATA = DWORD(232);
- {$EXTERNALSYM ERROR_NO_DATA}
-
-//
-// MessageId: ERROR_PIPE_NOT_CONNECTED
-//
-// MessageText:
-//
-// No process is on the other end of the pipe.
-//
- ERROR_PIPE_NOT_CONNECTED = DWORD(233);
- {$EXTERNALSYM ERROR_PIPE_NOT_CONNECTED}
-
-//
-// MessageId: ERROR_MORE_DATA
-//
-// MessageText:
-//
-// More data is available.
-//
- ERROR_MORE_DATA = DWORD(234); // dderror
- {$EXTERNALSYM ERROR_MORE_DATA}
-
-//
-// MessageId: ERROR_VC_DISCONNECTED
-//
-// MessageText:
-//
-// The session was canceled.
-//
- ERROR_VC_DISCONNECTED = DWORD(240);
- {$EXTERNALSYM ERROR_VC_DISCONNECTED}
-
-//
-// MessageId: ERROR_INVALID_EA_NAME
-//
-// MessageText:
-//
-// The specified extended attribute name was invalid.
-//
- ERROR_INVALID_EA_NAME = DWORD(254);
- {$EXTERNALSYM ERROR_INVALID_EA_NAME}
-
-//
-// MessageId: ERROR_EA_LIST_INCONSISTENT
-//
-// MessageText:
-//
-// The extended attributes are inconsistent.
-//
- ERROR_EA_LIST_INCONSISTENT = DWORD(255);
- {$EXTERNALSYM ERROR_EA_LIST_INCONSISTENT}
-
-//
-// MessageId: WAIT_TIMEOUT
-//
-// MessageText:
-//
-// The wait operation timed out.
-//
- WAIT_TIMEOUT = DWORD(258); // dderror
- {$EXTERNALSYM WAIT_TIMEOUT}
-
-//
-// MessageId: ERROR_NO_MORE_ITEMS
-//
-// MessageText:
-//
-// No more data is available.
-//
- ERROR_NO_MORE_ITEMS = DWORD(259);
- {$EXTERNALSYM ERROR_NO_MORE_ITEMS}
-
-//
-// MessageId: ERROR_CANNOT_COPY
-//
-// MessageText:
-//
-// The copy functions cannot be used.
-//
- ERROR_CANNOT_COPY = DWORD(266);
- {$EXTERNALSYM ERROR_CANNOT_COPY}
-
-//
-// MessageId: ERROR_DIRECTORY
-//
-// MessageText:
-//
-// The directory name is invalid.
-//
- ERROR_DIRECTORY = DWORD(267);
- {$EXTERNALSYM ERROR_DIRECTORY}
-
-//
-// MessageId: ERROR_EAS_DIDNT_FIT
-//
-// MessageText:
-//
-// The extended attributes did not fit in the buffer.
-//
- ERROR_EAS_DIDNT_FIT = DWORD(275);
- {$EXTERNALSYM ERROR_EAS_DIDNT_FIT}
-
-//
-// MessageId: ERROR_EA_FILE_CORRUPT
-//
-// MessageText:
-//
-// The extended attribute file on the mounted file system is corrupt.
-//
- ERROR_EA_FILE_CORRUPT = DWORD(276);
- {$EXTERNALSYM ERROR_EA_FILE_CORRUPT}
-
-//
-// MessageId: ERROR_EA_TABLE_FULL
-//
-// MessageText:
-//
-// The extended attribute table file is full.
-//
- ERROR_EA_TABLE_FULL = DWORD(277);
- {$EXTERNALSYM ERROR_EA_TABLE_FULL}
-
-//
-// MessageId: ERROR_INVALID_EA_HANDLE
-//
-// MessageText:
-//
-// The specified extended attribute handle is invalid.
-//
- ERROR_INVALID_EA_HANDLE = DWORD(278);
- {$EXTERNALSYM ERROR_INVALID_EA_HANDLE}
-
-//
-// MessageId: ERROR_EAS_NOT_SUPPORTED
-//
-// MessageText:
-//
-// The mounted file system does not support extended attributes.
-//
- ERROR_EAS_NOT_SUPPORTED = DWORD(282);
- {$EXTERNALSYM ERROR_EAS_NOT_SUPPORTED}
-
-//
-// MessageId: ERROR_NOT_OWNER
-//
-// MessageText:
-//
-// Attempt to release mutex not owned by caller.
-//
- ERROR_NOT_OWNER = DWORD(288);
- {$EXTERNALSYM ERROR_NOT_OWNER}
-
-//
-// MessageId: ERROR_TOO_MANY_POSTS
-//
-// MessageText:
-//
-// Too many posts were made to a semaphore.
-//
- ERROR_TOO_MANY_POSTS = DWORD(298);
- {$EXTERNALSYM ERROR_TOO_MANY_POSTS}
-
-//
-// MessageId: ERROR_PARTIAL_COPY
-//
-// MessageText:
-//
-// Only part of a ReadProcessMemory or WriteProcessMemory request was completed.
-//
- ERROR_PARTIAL_COPY = DWORD(299);
- {$EXTERNALSYM ERROR_PARTIAL_COPY}
-
-//
-// MessageId: ERROR_OPLOCK_NOT_GRANTED
-//
-// MessageText:
-//
-// The oplock request is denied.
-//
- ERROR_OPLOCK_NOT_GRANTED = DWORD(300);
- {$EXTERNALSYM ERROR_OPLOCK_NOT_GRANTED}
-
-//
-// MessageId: ERROR_INVALID_OPLOCK_PROTOCOL
-//
-// MessageText:
-//
-// An invalid oplock acknowledgment was received by the system.
-//
- ERROR_INVALID_OPLOCK_PROTOCOL = DWORD(301);
- {$EXTERNALSYM ERROR_INVALID_OPLOCK_PROTOCOL}
-
-//
-// MessageId: ERROR_DISK_TOO_FRAGMENTED
-//
-// MessageText:
-//
-// The volume is too fragmented to complete this operation.
-//
- ERROR_DISK_TOO_FRAGMENTED = DWORD(302);
- {$EXTERNALSYM ERROR_DISK_TOO_FRAGMENTED}
-
-//
-// MessageId: ERROR_DELETE_PENDING
-//
-// MessageText:
-//
-// The file cannot be opened because it is in the process of being deleted.
-//
- ERROR_DELETE_PENDING = DWORD(303);
- {$EXTERNALSYM ERROR_DELETE_PENDING}
-
-//
-// MessageId: ERROR_MR_MID_NOT_FOUND
-//
-// MessageText:
-//
-// The system cannot find message text for message number 0x%1 in the message file for %2.
-//
- ERROR_MR_MID_NOT_FOUND = DWORD(317);
- {$EXTERNALSYM ERROR_MR_MID_NOT_FOUND}
-
-//
-// MessageId: ERROR_SCOPE_NOT_FOUND
-//
-// MessageText:
-//
-// The scope specified was not found.
-//
- ERROR_SCOPE_NOT_FOUND = DWORD(318);
- {$EXTERNALSYM ERROR_SCOPE_NOT_FOUND}
-
-//
-// MessageId: ERROR_INVALID_ADDRESS
-//
-// MessageText:
-//
-// Attempt to access invalid address.
-//
- ERROR_INVALID_ADDRESS = DWORD(487);
- {$EXTERNALSYM ERROR_INVALID_ADDRESS}
-
-//
-// MessageId: ERROR_ARITHMETIC_OVERFLOW
-//
-// MessageText:
-//
-// Arithmetic result exceeded 32 bits.
-//
- ERROR_ARITHMETIC_OVERFLOW = DWORD(534);
- {$EXTERNALSYM ERROR_ARITHMETIC_OVERFLOW}
-
-//
-// MessageId: ERROR_PIPE_CONNECTED
-//
-// MessageText:
-//
-// There is a process on other end of the pipe.
-//
- ERROR_PIPE_CONNECTED = DWORD(535);
- {$EXTERNALSYM ERROR_PIPE_CONNECTED}
-
-//
-// MessageId: ERROR_PIPE_LISTENING
-//
-// MessageText:
-//
-// Waiting for a process to open the other end of the pipe.
-//
- ERROR_PIPE_LISTENING = DWORD(536);
- {$EXTERNALSYM ERROR_PIPE_LISTENING}
-
-//
-// MessageId: ERROR_EA_ACCESS_DENIED
-//
-// MessageText:
-//
-// Access to the extended attribute was denied.
-//
- ERROR_EA_ACCESS_DENIED = DWORD(994);
- {$EXTERNALSYM ERROR_EA_ACCESS_DENIED}
-
-//
-// MessageId: ERROR_OPERATION_ABORTED
-//
-// MessageText:
-//
-// The I/O operation has been aborted because of either a thread exit or an application request.
-//
- ERROR_OPERATION_ABORTED = DWORD(995);
- {$EXTERNALSYM ERROR_OPERATION_ABORTED}
-
-//
-// MessageId: ERROR_IO_INCOMPLETE
-//
-// MessageText:
-//
-// Overlapped I/O event is not in a signaled state.
-//
- ERROR_IO_INCOMPLETE = DWORD(996);
- {$EXTERNALSYM ERROR_IO_INCOMPLETE}
-
-//
-// MessageId: ERROR_IO_PENDING
-//
-// MessageText:
-//
-// Overlapped I/O operation is in progress.
-//
- ERROR_IO_PENDING = DWORD(997); // dderror
- {$EXTERNALSYM ERROR_IO_PENDING}
-
-//
-// MessageId: ERROR_NOACCESS
-//
-// MessageText:
-//
-// Invalid access to memory location.
-//
- ERROR_NOACCESS = DWORD(998);
- {$EXTERNALSYM ERROR_NOACCESS}
-
-//
-// MessageId: ERROR_SWAPERROR
-//
-// MessageText:
-//
-// Error performing inpage operation.
-//
- ERROR_SWAPERROR = DWORD(999);
- {$EXTERNALSYM ERROR_SWAPERROR}
-
-//
-// MessageId: ERROR_STACK_OVERFLOW
-//
-// MessageText:
-//
-// Recursion too deep; the stack overflowed.
-//
- ERROR_STACK_OVERFLOW = DWORD(1001);
- {$EXTERNALSYM ERROR_STACK_OVERFLOW}
-
-//
-// MessageId: ERROR_INVALID_MESSAGE
-//
-// MessageText:
-//
-// The window cannot act on the sent message.
-//
- ERROR_INVALID_MESSAGE = DWORD(1002);
- {$EXTERNALSYM ERROR_INVALID_MESSAGE}
-
-//
-// MessageId: ERROR_CAN_NOT_COMPLETE
-//
-// MessageText:
-//
-// Cannot complete this function.
-//
- ERROR_CAN_NOT_COMPLETE = DWORD(1003);
- {$EXTERNALSYM ERROR_CAN_NOT_COMPLETE}
-
-//
-// MessageId: ERROR_INVALID_FLAGS
-//
-// MessageText:
-//
-// Invalid flags.
-//
- ERROR_INVALID_FLAGS = DWORD(1004);
- {$EXTERNALSYM ERROR_INVALID_FLAGS}
-
-//
-// MessageId: ERROR_UNRECOGNIZED_VOLUME
-//
-// MessageText:
-//
-// The volume does not contain a recognized file system.
-// Please make sure that all required file system drivers are loaded and that the volume is not corrupted.
-//
- ERROR_UNRECOGNIZED_VOLUME = DWORD(1005);
- {$EXTERNALSYM ERROR_UNRECOGNIZED_VOLUME}
-
-//
-// MessageId: ERROR_FILE_INVALID
-//
-// MessageText:
-//
-// The volume for a file has been externally altered so that the opened file is no longer valid.
-//
- ERROR_FILE_INVALID = DWORD(1006);
- {$EXTERNALSYM ERROR_FILE_INVALID}
-
-//
-// MessageId: ERROR_FULLSCREEN_MODE
-//
-// MessageText:
-//
-// The requested operation cannot be performed in full-screen mode.
-//
- ERROR_FULLSCREEN_MODE = DWORD(1007);
- {$EXTERNALSYM ERROR_FULLSCREEN_MODE}
-
-//
-// MessageId: ERROR_NO_TOKEN
-//
-// MessageText:
-//
-// An attempt was made to reference a token that does not exist.
-//
- ERROR_NO_TOKEN = DWORD(1008);
- {$EXTERNALSYM ERROR_NO_TOKEN}
-
-//
-// MessageId: ERROR_BADDB
-//
-// MessageText:
-//
-// The configuration registry database is corrupt.
-//
- ERROR_BADDB = DWORD(1009);
- {$EXTERNALSYM ERROR_BADDB}
-
-//
-// MessageId: ERROR_BADKEY
-//
-// MessageText:
-//
-// The configuration registry key is invalid.
-//
- ERROR_BADKEY = DWORD(1010);
- {$EXTERNALSYM ERROR_BADKEY}
-
-//
-// MessageId: ERROR_CANTOPEN
-//
-// MessageText:
-//
-// The configuration registry key could not be opened.
-//
- ERROR_CANTOPEN = DWORD(1011);
- {$EXTERNALSYM ERROR_CANTOPEN}
-
-//
-// MessageId: ERROR_CANTREAD
-//
-// MessageText:
-//
-// The configuration registry key could not be read.
-//
- ERROR_CANTREAD = DWORD(1012);
- {$EXTERNALSYM ERROR_CANTREAD}
-
-//
-// MessageId: ERROR_CANTWRITE
-//
-// MessageText:
-//
-// The configuration registry key could not be written.
-//
- ERROR_CANTWRITE = DWORD(1013);
- {$EXTERNALSYM ERROR_CANTWRITE}
-
-//
-// MessageId: ERROR_REGISTRY_RECOVERED
-//
-// MessageText:
-//
-// One of the files in the registry database had to be recovered by use of a log or alternate copy. The recovery was successful.
-//
- ERROR_REGISTRY_RECOVERED = DWORD(1014);
- {$EXTERNALSYM ERROR_REGISTRY_RECOVERED}
-
-//
-// MessageId: ERROR_REGISTRY_CORRUPT
-//
-// MessageText:
-//
-// The registry is corrupted. The structure of one of the files containing registry data is corrupted, or the system's memory image of the file is corrupted, or the file could not be recovered because the alternate copy or log was absent or corrupted.
-//
- ERROR_REGISTRY_CORRUPT = DWORD(1015);
- {$EXTERNALSYM ERROR_REGISTRY_CORRUPT}
-
-//
-// MessageId: ERROR_REGISTRY_IO_FAILED
-//
-// MessageText:
-//
-// An I/O operation initiated by the registry failed unrecoverably. The registry could not read in, or write out, or flush, one of the files that contain the system's image of the registry.
-//
- ERROR_REGISTRY_IO_FAILED = DWORD(1016);
- {$EXTERNALSYM ERROR_REGISTRY_IO_FAILED}
-
-//
-// MessageId: ERROR_NOT_REGISTRY_FILE
-//
-// MessageText:
-//
-// The system has attempted to load or restore a file into the registry, but the specified file is not in a registry file format.
-//
- ERROR_NOT_REGISTRY_FILE = DWORD(1017);
- {$EXTERNALSYM ERROR_NOT_REGISTRY_FILE}
-
-//
-// MessageId: ERROR_KEY_DELETED
-//
-// MessageText:
-//
-// Illegal operation attempted on a registry key that has been marked for deletion.
-//
- ERROR_KEY_DELETED = DWORD(1018);
- {$EXTERNALSYM ERROR_KEY_DELETED}
-
-//
-// MessageId: ERROR_NO_LOG_SPACE
-//
-// MessageText:
-//
-// System could not allocate the required space in a registry log.
-//
- ERROR_NO_LOG_SPACE = DWORD(1019);
- {$EXTERNALSYM ERROR_NO_LOG_SPACE}
-
-//
-// MessageId: ERROR_KEY_HAS_CHILDREN
-//
-// MessageText:
-//
-// Cannot create a symbolic link in a registry key that already has subkeys or values.
-//
- ERROR_KEY_HAS_CHILDREN = DWORD(1020);
- {$EXTERNALSYM ERROR_KEY_HAS_CHILDREN}
-
-//
-// MessageId: ERROR_CHILD_MUST_BE_VOLATILE
-//
-// MessageText:
-//
-// Cannot create a stable subkey under a volatile parent key.
-//
- ERROR_CHILD_MUST_BE_VOLATILE = DWORD(1021);
- {$EXTERNALSYM ERROR_CHILD_MUST_BE_VOLATILE}
-
-//
-// MessageId: ERROR_NOTIFY_ENUM_DIR
-//
-// MessageText:
-//
-// A notify change request is being completed and the information is not being returned in the caller's buffer. The caller now needs to enumerate the files to find the changes.
-//
- ERROR_NOTIFY_ENUM_DIR = DWORD(1022);
- {$EXTERNALSYM ERROR_NOTIFY_ENUM_DIR}
-
-//
-// MessageId: ERROR_DEPENDENT_SERVICES_RUNNING
-//
-// MessageText:
-//
-// A stop control has been sent to a service that other running services are dependent on.
-//
- ERROR_DEPENDENT_SERVICES_RUNNING = DWORD(1051);
- {$EXTERNALSYM ERROR_DEPENDENT_SERVICES_RUNNING}
-
-//
-// MessageId: ERROR_INVALID_SERVICE_CONTROL
-//
-// MessageText:
-//
-// The requested control is not valid for this service.
-//
- ERROR_INVALID_SERVICE_CONTROL = DWORD(1052);
- {$EXTERNALSYM ERROR_INVALID_SERVICE_CONTROL}
-
-//
-// MessageId: ERROR_SERVICE_REQUEST_TIMEOUT
-//
-// MessageText:
-//
-// The service did not respond to the start or control request in a timely fashion.
-//
- ERROR_SERVICE_REQUEST_TIMEOUT = DWORD(1053);
- {$EXTERNALSYM ERROR_SERVICE_REQUEST_TIMEOUT}
-
-//
-// MessageId: ERROR_SERVICE_NO_THREAD
-//
-// MessageText:
-//
-// A thread could not be created for the service.
-//
- ERROR_SERVICE_NO_THREAD = DWORD(1054);
- {$EXTERNALSYM ERROR_SERVICE_NO_THREAD}
-
-//
-// MessageId: ERROR_SERVICE_DATABASE_LOCKED
-//
-// MessageText:
-//
-// The service database is locked.
-//
- ERROR_SERVICE_DATABASE_LOCKED = DWORD(1055);
- {$EXTERNALSYM ERROR_SERVICE_DATABASE_LOCKED}
-
-//
-// MessageId: ERROR_SERVICE_ALREADY_RUNNING
-//
-// MessageText:
-//
-// An instance of the service is already running.
-//
- ERROR_SERVICE_ALREADY_RUNNING = DWORD(1056);
- {$EXTERNALSYM ERROR_SERVICE_ALREADY_RUNNING}
-
-//
-// MessageId: ERROR_INVALID_SERVICE_ACCOUNT
-//
-// MessageText:
-//
-// The account name is invalid or does not exist, or the password is invalid for the account name specified.
-//
- ERROR_INVALID_SERVICE_ACCOUNT = DWORD(1057);
- {$EXTERNALSYM ERROR_INVALID_SERVICE_ACCOUNT}
-
-//
-// MessageId: ERROR_SERVICE_DISABLED
-//
-// MessageText:
-//
-// The service cannot be started, either because it is disabled or because it has no enabled devices associated with it.
-//
- ERROR_SERVICE_DISABLED = DWORD(1058);
- {$EXTERNALSYM ERROR_SERVICE_DISABLED}
-
-//
-// MessageId: ERROR_CIRCULAR_DEPENDENCY
-//
-// MessageText:
-//
-// Circular service dependency was specified.
-//
- ERROR_CIRCULAR_DEPENDENCY = DWORD(1059);
- {$EXTERNALSYM ERROR_CIRCULAR_DEPENDENCY}
-
-//
-// MessageId: ERROR_SERVICE_DOES_NOT_EXIST
-//
-// MessageText:
-//
-// The specified service does not exist as an installed service.
-//
- ERROR_SERVICE_DOES_NOT_EXIST = DWORD(1060);
- {$EXTERNALSYM ERROR_SERVICE_DOES_NOT_EXIST}
-
-//
-// MessageId: ERROR_SERVICE_CANNOT_ACCEPT_CTRL
-//
-// MessageText:
-//
-// The service cannot accept control messages at this time.
-//
- ERROR_SERVICE_CANNOT_ACCEPT_CTRL = DWORD(1061);
- {$EXTERNALSYM ERROR_SERVICE_CANNOT_ACCEPT_CTRL}
-
-//
-// MessageId: ERROR_SERVICE_NOT_ACTIVE
-//
-// MessageText:
-//
-// The service has not been started.
-//
- ERROR_SERVICE_NOT_ACTIVE = DWORD(1062);
- {$EXTERNALSYM ERROR_SERVICE_NOT_ACTIVE}
-
-//
-// MessageId: ERROR_FAILED_SERVICE_CONTROLLER_CONNECT
-//
-// MessageText:
-//
-// The service process could not connect to the service controller.
-//
- ERROR_FAILED_SERVICE_CONTROLLER_CONNECT = DWORD(1063);
- {$EXTERNALSYM ERROR_FAILED_SERVICE_CONTROLLER_CONNECT}
-
-//
-// MessageId: ERROR_EXCEPTION_IN_SERVICE
-//
-// MessageText:
-//
-// An exception occurred in the service when handling the control request.
-//
- ERROR_EXCEPTION_IN_SERVICE = DWORD(1064);
- {$EXTERNALSYM ERROR_EXCEPTION_IN_SERVICE}
-
-//
-// MessageId: ERROR_DATABASE_DOES_NOT_EXIST
-//
-// MessageText:
-//
-// The database specified does not exist.
-//
- ERROR_DATABASE_DOES_NOT_EXIST = DWORD(1065);
- {$EXTERNALSYM ERROR_DATABASE_DOES_NOT_EXIST}
-
-//
-// MessageId: ERROR_SERVICE_SPECIFIC_ERROR
-//
-// MessageText:
-//
-// The service has returned a service-specific error code.
-//
- ERROR_SERVICE_SPECIFIC_ERROR = DWORD(1066);
- {$EXTERNALSYM ERROR_SERVICE_SPECIFIC_ERROR}
-
-//
-// MessageId: ERROR_PROCESS_ABORTED
-//
-// MessageText:
-//
-// The process terminated unexpectedly.
-//
- ERROR_PROCESS_ABORTED = DWORD(1067);
- {$EXTERNALSYM ERROR_PROCESS_ABORTED}
-
-//
-// MessageId: ERROR_SERVICE_DEPENDENCY_FAIL
-//
-// MessageText:
-//
-// The dependency service or group failed to start.
-//
- ERROR_SERVICE_DEPENDENCY_FAIL = DWORD(1068);
- {$EXTERNALSYM ERROR_SERVICE_DEPENDENCY_FAIL}
-
-//
-// MessageId: ERROR_SERVICE_LOGON_FAILED
-//
-// MessageText:
-//
-// The service did not start due to a logon failure.
-//
- ERROR_SERVICE_LOGON_FAILED = DWORD(1069);
- {$EXTERNALSYM ERROR_SERVICE_LOGON_FAILED}
-
-//
-// MessageId: ERROR_SERVICE_START_HANG
-//
-// MessageText:
-//
-// After starting, the service hung in a start-pending state.
-//
- ERROR_SERVICE_START_HANG = DWORD(1070);
- {$EXTERNALSYM ERROR_SERVICE_START_HANG}
-
-//
-// MessageId: ERROR_INVALID_SERVICE_LOCK
-//
-// MessageText:
-//
-// The specified service database lock is invalid.
-//
- ERROR_INVALID_SERVICE_LOCK = DWORD(1071);
- {$EXTERNALSYM ERROR_INVALID_SERVICE_LOCK}
-
-//
-// MessageId: ERROR_SERVICE_MARKED_FOR_DELETE
-//
-// MessageText:
-//
-// The specified service has been marked for deletion.
-//
- ERROR_SERVICE_MARKED_FOR_DELETE = DWORD(1072);
- {$EXTERNALSYM ERROR_SERVICE_MARKED_FOR_DELETE}
-
-//
-// MessageId: ERROR_SERVICE_EXISTS
-//
-// MessageText:
-//
-// The specified service already exists.
-//
- ERROR_SERVICE_EXISTS = DWORD(1073);
- {$EXTERNALSYM ERROR_SERVICE_EXISTS}
-
-//
-// MessageId: ERROR_ALREADY_RUNNING_LKG
-//
-// MessageText:
-//
-// The system is currently running with the last-known-good configuration.
-//
- ERROR_ALREADY_RUNNING_LKG = DWORD(1074);
- {$EXTERNALSYM ERROR_ALREADY_RUNNING_LKG}
-
-//
-// MessageId: ERROR_SERVICE_DEPENDENCY_DELETED
-//
-// MessageText:
-//
-// The dependency service does not exist or has been marked for deletion.
-//
- ERROR_SERVICE_DEPENDENCY_DELETED = DWORD(1075);
- {$EXTERNALSYM ERROR_SERVICE_DEPENDENCY_DELETED}
-
-//
-// MessageId: ERROR_BOOT_ALREADY_ACCEPTED
-//
-// MessageText:
-//
-// The current boot has already been accepted for use as the last-known-good control set.
-//
- ERROR_BOOT_ALREADY_ACCEPTED = DWORD(1076);
- {$EXTERNALSYM ERROR_BOOT_ALREADY_ACCEPTED}
-
-//
-// MessageId: ERROR_SERVICE_NEVER_STARTED
-//
-// MessageText:
-//
-// No attempts to start the service have been made since the last boot.
-//
- ERROR_SERVICE_NEVER_STARTED = DWORD(1077);
- {$EXTERNALSYM ERROR_SERVICE_NEVER_STARTED}
-
-//
-// MessageId: ERROR_DUPLICATE_SERVICE_NAME
-//
-// MessageText:
-//
-// The name is already in use as either a service name or a service display name.
-//
- ERROR_DUPLICATE_SERVICE_NAME = DWORD(1078);
- {$EXTERNALSYM ERROR_DUPLICATE_SERVICE_NAME}
-
-//
-// MessageId: ERROR_DIFFERENT_SERVICE_ACCOUNT
-//
-// MessageText:
-//
-// The account specified for this service is different from the account specified for other services running in the same process.
-//
- ERROR_DIFFERENT_SERVICE_ACCOUNT = DWORD(1079);
- {$EXTERNALSYM ERROR_DIFFERENT_SERVICE_ACCOUNT}
-
-//
-// MessageId: ERROR_CANNOT_DETECT_DRIVER_FAILURE
-//
-// MessageText:
-//
-// Failure actions can only be set for Win32 services, not for drivers.
-//
- ERROR_CANNOT_DETECT_DRIVER_FAILURE = DWORD(1080);
- {$EXTERNALSYM ERROR_CANNOT_DETECT_DRIVER_FAILURE}
-
-//
-// MessageId: ERROR_CANNOT_DETECT_PROCESS_ABORT
-//
-// MessageText:
-//
-// This service runs in the same process as the service control manager.
-// Therefore, the service control manager cannot take action if this service's process terminates unexpectedly.
-//
- ERROR_CANNOT_DETECT_PROCESS_ABORT = DWORD(1081);
- {$EXTERNALSYM ERROR_CANNOT_DETECT_PROCESS_ABORT}
-
-//
-// MessageId: ERROR_NO_RECOVERY_PROGRAM
-//
-// MessageText:
-//
-// No recovery program has been configured for this service.
-//
- ERROR_NO_RECOVERY_PROGRAM = DWORD(1082);
- {$EXTERNALSYM ERROR_NO_RECOVERY_PROGRAM}
-
-//
-// MessageId: ERROR_SERVICE_NOT_IN_EXE
-//
-// MessageText:
-//
-// The executable program that this service is configured to run in does not implement the service.
-//
- ERROR_SERVICE_NOT_IN_EXE = DWORD(1083);
- {$EXTERNALSYM ERROR_SERVICE_NOT_IN_EXE}
-
-//
-// MessageId: ERROR_NOT_SAFEBOOT_SERVICE
-//
-// MessageText:
-//
-// This service cannot be started in Safe Mode
-//
- ERROR_NOT_SAFEBOOT_SERVICE = DWORD(1084);
- {$EXTERNALSYM ERROR_NOT_SAFEBOOT_SERVICE}
-
-//
-// MessageId: ERROR_END_OF_MEDIA
-//
-// MessageText:
-//
-// The physical end of the tape has been reached.
-//
- ERROR_END_OF_MEDIA = DWORD(1100);
- {$EXTERNALSYM ERROR_END_OF_MEDIA}
-
-//
-// MessageId: ERROR_FILEMARK_DETECTED
-//
-// MessageText:
-//
-// A tape access reached a filemark.
-//
- ERROR_FILEMARK_DETECTED = DWORD(1101);
- {$EXTERNALSYM ERROR_FILEMARK_DETECTED}
-
-//
-// MessageId: ERROR_BEGINNING_OF_MEDIA
-//
-// MessageText:
-//
-// The beginning of the tape or a partition was encountered.
-//
- ERROR_BEGINNING_OF_MEDIA = DWORD(1102);
- {$EXTERNALSYM ERROR_BEGINNING_OF_MEDIA}
-
-//
-// MessageId: ERROR_SETMARK_DETECTED
-//
-// MessageText:
-//
-// A tape access reached the end of a set of files.
-//
- ERROR_SETMARK_DETECTED = DWORD(1103);
- {$EXTERNALSYM ERROR_SETMARK_DETECTED}
-
-//
-// MessageId: ERROR_NO_DATA_DETECTED
-//
-// MessageText:
-//
-// No more data is on the tape.
-//
- ERROR_NO_DATA_DETECTED = DWORD(1104);
- {$EXTERNALSYM ERROR_NO_DATA_DETECTED}
-
-//
-// MessageId: ERROR_PARTITION_FAILURE
-//
-// MessageText:
-//
-// Tape could not be partitioned.
-//
- ERROR_PARTITION_FAILURE = DWORD(1105);
- {$EXTERNALSYM ERROR_PARTITION_FAILURE}
-
-//
-// MessageId: ERROR_INVALID_BLOCK_LENGTH
-//
-// MessageText:
-//
-// When accessing a new tape of a multivolume partition, the current block size is incorrect.
-//
- ERROR_INVALID_BLOCK_LENGTH = DWORD(1106);
- {$EXTERNALSYM ERROR_INVALID_BLOCK_LENGTH}
-
-//
-// MessageId: ERROR_DEVICE_NOT_PARTITIONED
-//
-// MessageText:
-//
-// Tape partition information could not be found when loading a tape.
-//
- ERROR_DEVICE_NOT_PARTITIONED = DWORD(1107);
- {$EXTERNALSYM ERROR_DEVICE_NOT_PARTITIONED}
-
-//
-// MessageId: ERROR_UNABLE_TO_LOCK_MEDIA
-//
-// MessageText:
-//
-// Unable to lock the media eject mechanism.
-//
- ERROR_UNABLE_TO_LOCK_MEDIA = DWORD(1108);
- {$EXTERNALSYM ERROR_UNABLE_TO_LOCK_MEDIA}
-
-//
-// MessageId: ERROR_UNABLE_TO_UNLOAD_MEDIA
-//
-// MessageText:
-//
-// Unable to unload the media.
-//
- ERROR_UNABLE_TO_UNLOAD_MEDIA = DWORD(1109);
- {$EXTERNALSYM ERROR_UNABLE_TO_UNLOAD_MEDIA}
-
-//
-// MessageId: ERROR_MEDIA_CHANGED
-//
-// MessageText:
-//
-// The media in the drive may have changed.
-//
- ERROR_MEDIA_CHANGED = DWORD(1110);
- {$EXTERNALSYM ERROR_MEDIA_CHANGED}
-
-//
-// MessageId: ERROR_BUS_RESET
-//
-// MessageText:
-//
-// The I/O bus was reset.
-//
- ERROR_BUS_RESET = DWORD(1111);
- {$EXTERNALSYM ERROR_BUS_RESET}
-
-//
-// MessageId: ERROR_NO_MEDIA_IN_DRIVE
-//
-// MessageText:
-//
-// No media in drive.
-//
- ERROR_NO_MEDIA_IN_DRIVE = DWORD(1112);
- {$EXTERNALSYM ERROR_NO_MEDIA_IN_DRIVE}
-
-//
-// MessageId: ERROR_NO_UNICODE_TRANSLATION
-//
-// MessageText:
-//
-// No mapping for the Unicode character exists in the target multi-byte code page.
-//
- ERROR_NO_UNICODE_TRANSLATION = DWORD(1113);
- {$EXTERNALSYM ERROR_NO_UNICODE_TRANSLATION}
-
-//
-// MessageId: ERROR_DLL_INIT_FAILED
-//
-// MessageText:
-//
-// A dynamic link library (DLL) initialization routine failed.
-//
- ERROR_DLL_INIT_FAILED = DWORD(1114);
- {$EXTERNALSYM ERROR_DLL_INIT_FAILED}
-
-//
-// MessageId: ERROR_SHUTDOWN_IN_PROGRESS
-//
-// MessageText:
-//
-// A system shutdown is in progress.
-//
- ERROR_SHUTDOWN_IN_PROGRESS = DWORD(1115);
- {$EXTERNALSYM ERROR_SHUTDOWN_IN_PROGRESS}
-
-//
-// MessageId: ERROR_NO_SHUTDOWN_IN_PROGRESS
-//
-// MessageText:
-//
-// Unable to abort the system shutdown because no shutdown was in progress.
-//
- ERROR_NO_SHUTDOWN_IN_PROGRESS = DWORD(1116);
- {$EXTERNALSYM ERROR_NO_SHUTDOWN_IN_PROGRESS}
-
-//
-// MessageId: ERROR_IO_DEVICE
-//
-// MessageText:
-//
-// The request could not be performed because of an I/O device error.
-//
- ERROR_IO_DEVICE = DWORD(1117);
- {$EXTERNALSYM ERROR_IO_DEVICE}
-
-//
-// MessageId: ERROR_SERIAL_NO_DEVICE
-//
-// MessageText:
-//
-// No serial device was successfully initialized. The serial driver will unload.
-//
- ERROR_SERIAL_NO_DEVICE = DWORD(1118);
- {$EXTERNALSYM ERROR_SERIAL_NO_DEVICE}
-
-//
-// MessageId: ERROR_IRQ_BUSY
-//
-// MessageText:
-//
-// Unable to open a device that was sharing an interrupt request (IRQ) with other devices. At least one other device that uses that IRQ was already opened.
-//
- ERROR_IRQ_BUSY = DWORD(1119);
- {$EXTERNALSYM ERROR_IRQ_BUSY}
-
-//
-// MessageId: ERROR_MORE_WRITES
-//
-// MessageText:
-//
-// A serial I/O operation was completed by another write to the serial port.
-// (The IOCTL_SERIAL_XOFF_COUNTER reached zero.)
-//
- ERROR_MORE_WRITES = DWORD(1120);
- {$EXTERNALSYM ERROR_MORE_WRITES}
-
-//
-// MessageId: ERROR_COUNTER_TIMEOUT
-//
-// MessageText:
-//
-// A serial I/O operation completed because the timeout period expired.
-// (The IOCTL_SERIAL_XOFF_COUNTER did not reach zero.)
-//
- ERROR_COUNTER_TIMEOUT = DWORD(1121);
- {$EXTERNALSYM ERROR_COUNTER_TIMEOUT}
-
-//
-// MessageId: ERROR_FLOPPY_ID_MARK_NOT_FOUND
-//
-// MessageText:
-//
-// No ID address mark was found on the floppy disk.
-//
- ERROR_FLOPPY_ID_MARK_NOT_FOUND = DWORD(1122);
- {$EXTERNALSYM ERROR_FLOPPY_ID_MARK_NOT_FOUND}
-
-//
-// MessageId: ERROR_FLOPPY_WRONG_CYLINDER
-//
-// MessageText:
-//
-// Mismatch between the floppy disk sector ID field and the floppy disk controller track address.
-//
- ERROR_FLOPPY_WRONG_CYLINDER = DWORD(1123);
- {$EXTERNALSYM ERROR_FLOPPY_WRONG_CYLINDER}
-
-//
-// MessageId: ERROR_FLOPPY_UNKNOWN_ERROR
-//
-// MessageText:
-//
-// The floppy disk controller reported an error that is not recognized by the floppy disk driver.
-//
- ERROR_FLOPPY_UNKNOWN_ERROR = DWORD(1124);
- {$EXTERNALSYM ERROR_FLOPPY_UNKNOWN_ERROR}
-
-//
-// MessageId: ERROR_FLOPPY_BAD_REGISTERS
-//
-// MessageText:
-//
-// The floppy disk controller returned inconsistent results in its registers.
-//
- ERROR_FLOPPY_BAD_REGISTERS = DWORD(1125);
- {$EXTERNALSYM ERROR_FLOPPY_BAD_REGISTERS}
-
-//
-// MessageId: ERROR_DISK_RECALIBRATE_FAILED
-//
-// MessageText:
-//
-// While accessing the hard disk, a recalibrate operation failed, even after retries.
-//
- ERROR_DISK_RECALIBRATE_FAILED = DWORD(1126);
- {$EXTERNALSYM ERROR_DISK_RECALIBRATE_FAILED}
-
-//
-// MessageId: ERROR_DISK_OPERATION_FAILED
-//
-// MessageText:
-//
-// While accessing the hard disk, a disk operation failed even after retries.
-//
- ERROR_DISK_OPERATION_FAILED = DWORD(1127);
- {$EXTERNALSYM ERROR_DISK_OPERATION_FAILED}
-
-//
-// MessageId: ERROR_DISK_RESET_FAILED
-//
-// MessageText:
-//
-// While accessing the hard disk, a disk controller reset was needed, but even that failed.
-//
- ERROR_DISK_RESET_FAILED = DWORD(1128);
- {$EXTERNALSYM ERROR_DISK_RESET_FAILED}
-
-//
-// MessageId: ERROR_EOM_OVERFLOW
-//
-// MessageText:
-//
-// Physical end of tape encountered.
-//
- ERROR_EOM_OVERFLOW = DWORD(1129);
- {$EXTERNALSYM ERROR_EOM_OVERFLOW}
-
-//
-// MessageId: ERROR_NOT_ENOUGH_SERVER_MEMORY
-//
-// MessageText:
-//
-// Not enough server storage is available to process this command.
-//
- ERROR_NOT_ENOUGH_SERVER_MEMORY = DWORD(1130);
- {$EXTERNALSYM ERROR_NOT_ENOUGH_SERVER_MEMORY}
-
-//
-// MessageId: ERROR_POSSIBLE_DEADLOCK
-//
-// MessageText:
-//
-// A potential deadlock condition has been detected.
-//
- ERROR_POSSIBLE_DEADLOCK = DWORD(1131);
- {$EXTERNALSYM ERROR_POSSIBLE_DEADLOCK}
-
-//
-// MessageId: ERROR_MAPPED_ALIGNMENT
-//
-// MessageText:
-//
-// The base address or the file offset specified does not have the proper alignment.
-//
- ERROR_MAPPED_ALIGNMENT = DWORD(1132);
- {$EXTERNALSYM ERROR_MAPPED_ALIGNMENT}
-
-//
-// MessageId: ERROR_SET_POWER_STATE_VETOED
-//
-// MessageText:
-//
-// An attempt to change the system power state was vetoed by another application or driver.
-//
- ERROR_SET_POWER_STATE_VETOED = DWORD(1140);
- {$EXTERNALSYM ERROR_SET_POWER_STATE_VETOED}
-
-//
-// MessageId: ERROR_SET_POWER_STATE_FAILED
-//
-// MessageText:
-//
-// The system BIOS failed an attempt to change the system power state.
-//
- ERROR_SET_POWER_STATE_FAILED = DWORD(1141);
- {$EXTERNALSYM ERROR_SET_POWER_STATE_FAILED}
-
-//
-// MessageId: ERROR_TOO_MANY_LINKS
-//
-// MessageText:
-//
-// An attempt was made to create more links on a file than the file system supports.
-//
- ERROR_TOO_MANY_LINKS = DWORD(1142);
- {$EXTERNALSYM ERROR_TOO_MANY_LINKS}
-
-//
-// MessageId: ERROR_OLD_WIN_VERSION
-//
-// MessageText:
-//
-// The specified program requires a newer version of Windows.
-//
- ERROR_OLD_WIN_VERSION = DWORD(1150);
- {$EXTERNALSYM ERROR_OLD_WIN_VERSION}
-
-//
-// MessageId: ERROR_APP_WRONG_OS
-//
-// MessageText:
-//
-// The specified program is not a Windows or MS-DOS program.
-//
- ERROR_APP_WRONG_OS = DWORD(1151);
- {$EXTERNALSYM ERROR_APP_WRONG_OS}
-
-//
-// MessageId: ERROR_SINGLE_INSTANCE_APP
-//
-// MessageText:
-//
-// Cannot start more than one instance of the specified program.
-//
- ERROR_SINGLE_INSTANCE_APP = DWORD(1152);
- {$EXTERNALSYM ERROR_SINGLE_INSTANCE_APP}
-
-//
-// MessageId: ERROR_RMODE_APP
-//
-// MessageText:
-//
-// The specified program was written for an earlier version of Windows.
-//
- ERROR_RMODE_APP = DWORD(1153);
- {$EXTERNALSYM ERROR_RMODE_APP}
-
-//
-// MessageId: ERROR_INVALID_DLL
-//
-// MessageText:
-//
-// One of the library files needed to run this application is damaged.
-//
- ERROR_INVALID_DLL = DWORD(1154);
- {$EXTERNALSYM ERROR_INVALID_DLL}
-
-//
-// MessageId: ERROR_NO_ASSOCIATION
-//
-// MessageText:
-//
-// No application is associated with the specified file for this operation.
-//
- ERROR_NO_ASSOCIATION = DWORD(1155);
- {$EXTERNALSYM ERROR_NO_ASSOCIATION}
-
-//
-// MessageId: ERROR_DDE_FAIL
-//
-// MessageText:
-//
-// An error occurred in sending the command to the application.
-//
- ERROR_DDE_FAIL = DWORD(1156);
- {$EXTERNALSYM ERROR_DDE_FAIL}
-
-//
-// MessageId: ERROR_DLL_NOT_FOUND
-//
-// MessageText:
-//
-// One of the library files needed to run this application cannot be found.
-//
- ERROR_DLL_NOT_FOUND = DWORD(1157);
- {$EXTERNALSYM ERROR_DLL_NOT_FOUND}
-
-//
-// MessageId: ERROR_NO_MORE_USER_HANDLES
-//
-// MessageText:
-//
-// The current process has used all of its system allowance of handles for Window Manager objects.
-//
- ERROR_NO_MORE_USER_HANDLES = DWORD(1158);
- {$EXTERNALSYM ERROR_NO_MORE_USER_HANDLES}
-
-//
-// MessageId: ERROR_MESSAGE_SYNC_ONLY
-//
-// MessageText:
-//
-// The message can be used only with synchronous operations.
-//
- ERROR_MESSAGE_SYNC_ONLY = DWORD(1159);
- {$EXTERNALSYM ERROR_MESSAGE_SYNC_ONLY}
-
-//
-// MessageId: ERROR_SOURCE_ELEMENT_EMPTY
-//
-// MessageText:
-//
-// The indicated source element has no media.
-//
- ERROR_SOURCE_ELEMENT_EMPTY = DWORD(1160);
- {$EXTERNALSYM ERROR_SOURCE_ELEMENT_EMPTY}
-
-//
-// MessageId: ERROR_DESTINATION_ELEMENT_FULL
-//
-// MessageText:
-//
-// The indicated destination element already contains media.
-//
- ERROR_DESTINATION_ELEMENT_FULL = DWORD(1161);
- {$EXTERNALSYM ERROR_DESTINATION_ELEMENT_FULL}
-
-//
-// MessageId: ERROR_ILLEGAL_ELEMENT_ADDRESS
-//
-// MessageText:
-//
-// The indicated element does not exist.
-//
- ERROR_ILLEGAL_ELEMENT_ADDRESS = DWORD(1162);
- {$EXTERNALSYM ERROR_ILLEGAL_ELEMENT_ADDRESS}
-
-//
-// MessageId: ERROR_MAGAZINE_NOT_PRESENT
-//
-// MessageText:
-//
-// The indicated element is part of a magazine that is not present.
-//
- ERROR_MAGAZINE_NOT_PRESENT = DWORD(1163);
- {$EXTERNALSYM ERROR_MAGAZINE_NOT_PRESENT}
-
-//
-// MessageId: ERROR_DEVICE_REINITIALIZATION_NEEDED
-//
-// MessageText:
-//
-// The indicated device requires reinitialization due to hardware errors.
-//
- ERROR_DEVICE_REINITIALIZATION_NEEDED = DWORD(1164); // dderror
- {$EXTERNALSYM ERROR_DEVICE_REINITIALIZATION_NEEDED}
-
-//
-// MessageId: ERROR_DEVICE_REQUIRES_CLEANING
-//
-// MessageText:
-//
-// The device has indicated that cleaning is required before further operations are attempted.
-//
- ERROR_DEVICE_REQUIRES_CLEANING = DWORD(1165);
- {$EXTERNALSYM ERROR_DEVICE_REQUIRES_CLEANING}
-
-//
-// MessageId: ERROR_DEVICE_DOOR_OPEN
-//
-// MessageText:
-//
-// The device has indicated that its door is open.
-//
- ERROR_DEVICE_DOOR_OPEN = DWORD(1166);
- {$EXTERNALSYM ERROR_DEVICE_DOOR_OPEN}
-
-//
-// MessageId: ERROR_DEVICE_NOT_CONNECTED
-//
-// MessageText:
-//
-// The device is not connected.
-//
- ERROR_DEVICE_NOT_CONNECTED = DWORD(1167);
- {$EXTERNALSYM ERROR_DEVICE_NOT_CONNECTED}
-
-//
-// MessageId: ERROR_NOT_FOUND
-//
-// MessageText:
-//
-// Element not found.
-//
- ERROR_NOT_FOUND = DWORD(1168);
- {$EXTERNALSYM ERROR_NOT_FOUND}
-
-//
-// MessageId: ERROR_NO_MATCH
-//
-// MessageText:
-//
-// There was no match for the specified key in the index.
-//
- ERROR_NO_MATCH = DWORD(1169);
- {$EXTERNALSYM ERROR_NO_MATCH}
-
-//
-// MessageId: ERROR_SET_NOT_FOUND
-//
-// MessageText:
-//
-// The property set specified does not exist on the object.
-//
- ERROR_SET_NOT_FOUND = DWORD(1170);
- {$EXTERNALSYM ERROR_SET_NOT_FOUND}
-
-//
-// MessageId: ERROR_POINT_NOT_FOUND
-//
-// MessageText:
-//
-// The point passed to GetMouseMovePoints is not in the buffer.
-//
- ERROR_POINT_NOT_FOUND = DWORD(1171);
- {$EXTERNALSYM ERROR_POINT_NOT_FOUND}
-
-//
-// MessageId: ERROR_NO_TRACKING_SERVICE
-//
-// MessageText:
-//
-// The tracking (workstation) service is not running.
-//
- ERROR_NO_TRACKING_SERVICE = DWORD(1172);
- {$EXTERNALSYM ERROR_NO_TRACKING_SERVICE}
-
-//
-// MessageId: ERROR_NO_VOLUME_ID
-//
-// MessageText:
-//
-// The Volume ID could not be found.
-//
- ERROR_NO_VOLUME_ID = DWORD(1173);
- {$EXTERNALSYM ERROR_NO_VOLUME_ID}
-
-//
-// MessageId: ERROR_UNABLE_TO_REMOVE_REPLACED
-//
-// MessageText:
-//
-// Unable to remove the file to be replaced.
-//
- ERROR_UNABLE_TO_REMOVE_REPLACED = DWORD(1175);
- {$EXTERNALSYM ERROR_UNABLE_TO_REMOVE_REPLACED}
-
-//
-// MessageId: ERROR_UNABLE_TO_MOVE_REPLACEMENT
-//
-// MessageText:
-//
-// Unable to move the replacement file to the file to be replaced. The file to be replaced has retained its original name.
-//
- ERROR_UNABLE_TO_MOVE_REPLACEMENT = DWORD(1176);
- {$EXTERNALSYM ERROR_UNABLE_TO_MOVE_REPLACEMENT}
-
-//
-// MessageId: ERROR_UNABLE_TO_MOVE_REPLACEMENT_2
-//
-// MessageText:
-//
-// Unable to move the replacement file to the file to be replaced. The file to be replaced has been renamed using the backup name.
-//
- ERROR_UNABLE_TO_MOVE_REPLACEMENT_2 = DWORD(1177);
- {$EXTERNALSYM ERROR_UNABLE_TO_MOVE_REPLACEMENT_2}
-
-//
-// MessageId: ERROR_JOURNAL_DELETE_IN_PROGRESS
-//
-// MessageText:
-//
-// The volume change journal is being deleted.
-//
- ERROR_JOURNAL_DELETE_IN_PROGRESS = DWORD(1178);
- {$EXTERNALSYM ERROR_JOURNAL_DELETE_IN_PROGRESS}
-
-//
-// MessageId: ERROR_JOURNAL_NOT_ACTIVE
-//
-// MessageText:
-//
-// The volume change journal is not active.
-//
- ERROR_JOURNAL_NOT_ACTIVE = DWORD(1179);
- {$EXTERNALSYM ERROR_JOURNAL_NOT_ACTIVE}
-
-//
-// MessageId: ERROR_POTENTIAL_FILE_FOUND
-//
-// MessageText:
-//
-// A file was found, but it may not be the correct file.
-//
- ERROR_POTENTIAL_FILE_FOUND = DWORD(1180);
- {$EXTERNALSYM ERROR_POTENTIAL_FILE_FOUND}
-
-//
-// MessageId: ERROR_JOURNAL_ENTRY_DELETED
-//
-// MessageText:
-//
-// The journal entry has been deleted from the journal.
-//
- ERROR_JOURNAL_ENTRY_DELETED = DWORD(1181);
- {$EXTERNALSYM ERROR_JOURNAL_ENTRY_DELETED}
-
-//
-// MessageId: ERROR_BAD_DEVICE
-//
-// MessageText:
-//
-// The specified device name is invalid.
-//
- ERROR_BAD_DEVICE = DWORD(1200);
- {$EXTERNALSYM ERROR_BAD_DEVICE}
-
-//
-// MessageId: ERROR_CONNECTION_UNAVAIL
-//
-// MessageText:
-//
-// The device is not currently connected but it is a remembered connection.
-//
- ERROR_CONNECTION_UNAVAIL = DWORD(1201);
- {$EXTERNALSYM ERROR_CONNECTION_UNAVAIL}
-
-//
-// MessageId: ERROR_DEVICE_ALREADY_REMEMBERED
-//
-// MessageText:
-//
-// The local device name has a remembered connection to another network resource.
-//
- ERROR_DEVICE_ALREADY_REMEMBERED = DWORD(1202);
- {$EXTERNALSYM ERROR_DEVICE_ALREADY_REMEMBERED}
-
-//
-// MessageId: ERROR_NO_NET_OR_BAD_PATH
-//
-// MessageText:
-//
-// No network provider accepted the given network path.
-//
- ERROR_NO_NET_OR_BAD_PATH = DWORD(1203);
- {$EXTERNALSYM ERROR_NO_NET_OR_BAD_PATH}
-
-//
-// MessageId: ERROR_BAD_PROVIDER
-//
-// MessageText:
-//
-// The specified network provider name is invalid.
-//
- ERROR_BAD_PROVIDER = DWORD(1204);
- {$EXTERNALSYM ERROR_BAD_PROVIDER}
-
-//
-// MessageId: ERROR_CANNOT_OPEN_PROFILE
-//
-// MessageText:
-//
-// Unable to open the network connection profile.
-//
- ERROR_CANNOT_OPEN_PROFILE = DWORD(1205);
- {$EXTERNALSYM ERROR_CANNOT_OPEN_PROFILE}
-
-//
-// MessageId: ERROR_BAD_PROFILE
-//
-// MessageText:
-//
-// The network connection profile is corrupted.
-//
- ERROR_BAD_PROFILE = DWORD(1206);
- {$EXTERNALSYM ERROR_BAD_PROFILE}
-
-//
-// MessageId: ERROR_NOT_CONTAINER
-//
-// MessageText:
-//
-// Cannot enumerate a noncontainer.
-//
- ERROR_NOT_CONTAINER = DWORD(1207);
- {$EXTERNALSYM ERROR_NOT_CONTAINER}
-
-//
-// MessageId: ERROR_EXTENDED_ERROR
-//
-// MessageText:
-//
-// An extended error has occurred.
-//
- ERROR_EXTENDED_ERROR = DWORD(1208);
- {$EXTERNALSYM ERROR_EXTENDED_ERROR}
-
-//
-// MessageId: ERROR_INVALID_GROUPNAME
-//
-// MessageText:
-//
-// The format of the specified group name is invalid.
-//
- ERROR_INVALID_GROUPNAME = DWORD(1209);
- {$EXTERNALSYM ERROR_INVALID_GROUPNAME}
-
-//
-// MessageId: ERROR_INVALID_COMPUTERNAME
-//
-// MessageText:
-//
-// The format of the specified computer name is invalid.
-//
- ERROR_INVALID_COMPUTERNAME = DWORD(1210);
- {$EXTERNALSYM ERROR_INVALID_COMPUTERNAME}
-
-//
-// MessageId: ERROR_INVALID_EVENTNAME
-//
-// MessageText:
-//
-// The format of the specified event name is invalid.
-//
- ERROR_INVALID_EVENTNAME = DWORD(1211);
- {$EXTERNALSYM ERROR_INVALID_EVENTNAME}
-
-//
-// MessageId: ERROR_INVALID_DOMAINNAME
-//
-// MessageText:
-//
-// The format of the specified domain name is invalid.
-//
- ERROR_INVALID_DOMAINNAME = DWORD(1212);
- {$EXTERNALSYM ERROR_INVALID_DOMAINNAME}
-
-//
-// MessageId: ERROR_INVALID_SERVICENAME
-//
-// MessageText:
-//
-// The format of the specified service name is invalid.
-//
- ERROR_INVALID_SERVICENAME = DWORD(1213);
- {$EXTERNALSYM ERROR_INVALID_SERVICENAME}
-
-//
-// MessageId: ERROR_INVALID_NETNAME
-//
-// MessageText:
-//
-// The format of the specified network name is invalid.
-//
- ERROR_INVALID_NETNAME = DWORD(1214);
- {$EXTERNALSYM ERROR_INVALID_NETNAME}
-
-//
-// MessageId: ERROR_INVALID_SHARENAME
-//
-// MessageText:
-//
-// The format of the specified share name is invalid.
-//
- ERROR_INVALID_SHARENAME = DWORD(1215);
- {$EXTERNALSYM ERROR_INVALID_SHARENAME}
-
-//
-// MessageId: ERROR_INVALID_PASSWORDNAME
-//
-// MessageText:
-//
-// The format of the specified password is invalid.
-//
- ERROR_INVALID_PASSWORDNAME = DWORD(1216);
- {$EXTERNALSYM ERROR_INVALID_PASSWORDNAME}
-
-//
-// MessageId: ERROR_INVALID_MESSAGENAME
-//
-// MessageText:
-//
-// The format of the specified message name is invalid.
-//
- ERROR_INVALID_MESSAGENAME = DWORD(1217);
- {$EXTERNALSYM ERROR_INVALID_MESSAGENAME}
-
-//
-// MessageId: ERROR_INVALID_MESSAGEDEST
-//
-// MessageText:
-//
-// The format of the specified message destination is invalid.
-//
- ERROR_INVALID_MESSAGEDEST = DWORD(1218);
- {$EXTERNALSYM ERROR_INVALID_MESSAGEDEST}
-
-//
-// MessageId: ERROR_SESSION_CREDENTIAL_CONFLICT
-//
-// MessageText:
-//
-// Multiple connections to a server or shared resource by the same user, using more than one user name, are not allowed. Disconnect all previous connections to the server or shared resource and try again.
-//
- ERROR_SESSION_CREDENTIAL_CONFLICT = DWORD(1219);
- {$EXTERNALSYM ERROR_SESSION_CREDENTIAL_CONFLICT}
-
-//
-// MessageId: ERROR_REMOTE_SESSION_LIMIT_EXCEEDED
-//
-// MessageText:
-//
-// An attempt was made to establish a session to a network server, but there are already too many sessions established to that server.
-//
- ERROR_REMOTE_SESSION_LIMIT_EXCEEDED = DWORD(1220);
- {$EXTERNALSYM ERROR_REMOTE_SESSION_LIMIT_EXCEEDED}
-
-//
-// MessageId: ERROR_DUP_DOMAINNAME
-//
-// MessageText:
-//
-// The workgroup or domain name is already in use by another computer on the network.
-//
- ERROR_DUP_DOMAINNAME = DWORD(1221);
- {$EXTERNALSYM ERROR_DUP_DOMAINNAME}
-
-//
-// MessageId: ERROR_NO_NETWORK
-//
-// MessageText:
-//
-// The network is not present or not started.
-//
- ERROR_NO_NETWORK = DWORD(1222);
- {$EXTERNALSYM ERROR_NO_NETWORK}
-
-//
-// MessageId: ERROR_CANCELLED
-//
-// MessageText:
-//
-// The operation was canceled by the user.
-//
- ERROR_CANCELLED = DWORD(1223);
- {$EXTERNALSYM ERROR_CANCELLED}
-
-//
-// MessageId: ERROR_USER_MAPPED_FILE
-//
-// MessageText:
-//
-// The requested operation cannot be performed on a file with a user-mapped section open.
-//
- ERROR_USER_MAPPED_FILE = DWORD(1224);
- {$EXTERNALSYM ERROR_USER_MAPPED_FILE}
-
-//
-// MessageId: ERROR_CONNECTION_REFUSED
-//
-// MessageText:
-//
-// The remote system refused the network connection.
-//
- ERROR_CONNECTION_REFUSED = DWORD(1225);
- {$EXTERNALSYM ERROR_CONNECTION_REFUSED}
-
-//
-// MessageId: ERROR_GRACEFUL_DISCONNECT
-//
-// MessageText:
-//
-// The network connection was gracefully closed.
-//
- ERROR_GRACEFUL_DISCONNECT = DWORD(1226);
- {$EXTERNALSYM ERROR_GRACEFUL_DISCONNECT}
-
-//
-// MessageId: ERROR_ADDRESS_ALREADY_ASSOCIATED
-//
-// MessageText:
-//
-// The network transport endpoint already has an address associated with it.
-//
- ERROR_ADDRESS_ALREADY_ASSOCIATED = DWORD(1227);
- {$EXTERNALSYM ERROR_ADDRESS_ALREADY_ASSOCIATED}
-
-//
-// MessageId: ERROR_ADDRESS_NOT_ASSOCIATED
-//
-// MessageText:
-//
-// An address has not yet been associated with the network endpoint.
-//
- ERROR_ADDRESS_NOT_ASSOCIATED = DWORD(1228);
- {$EXTERNALSYM ERROR_ADDRESS_NOT_ASSOCIATED}
-
-//
-// MessageId: ERROR_CONNECTION_INVALID
-//
-// MessageText:
-//
-// An operation was attempted on a nonexistent network connection.
-//
- ERROR_CONNECTION_INVALID = DWORD(1229);
- {$EXTERNALSYM ERROR_CONNECTION_INVALID}
-
-//
-// MessageId: ERROR_CONNECTION_ACTIVE
-//
-// MessageText:
-//
-// An invalid operation was attempted on an active network connection.
-//
- ERROR_CONNECTION_ACTIVE = DWORD(1230);
- {$EXTERNALSYM ERROR_CONNECTION_ACTIVE}
-
-//
-// MessageId: ERROR_NETWORK_UNREACHABLE
-//
-// MessageText:
-//
-// The network location cannot be reached. For information about network troubleshooting, see Windows Help.
-//
- ERROR_NETWORK_UNREACHABLE = DWORD(1231);
- {$EXTERNALSYM ERROR_NETWORK_UNREACHABLE}
-
-//
-// MessageId: ERROR_HOST_UNREACHABLE
-//
-// MessageText:
-//
-// The network location cannot be reached. For information about network troubleshooting, see Windows Help.
-//
- ERROR_HOST_UNREACHABLE = DWORD(1232);
- {$EXTERNALSYM ERROR_HOST_UNREACHABLE}
-
-//
-// MessageId: ERROR_PROTOCOL_UNREACHABLE
-//
-// MessageText:
-//
-// The network location cannot be reached. For information about network troubleshooting, see Windows Help.
-//
- ERROR_PROTOCOL_UNREACHABLE = DWORD(1233);
- {$EXTERNALSYM ERROR_PROTOCOL_UNREACHABLE}
-
-//
-// MessageId: ERROR_PORT_UNREACHABLE
-//
-// MessageText:
-//
-// No service is operating at the destination network endpoint on the remote system.
-//
- ERROR_PORT_UNREACHABLE = DWORD(1234);
- {$EXTERNALSYM ERROR_PORT_UNREACHABLE}
-
-//
-// MessageId: ERROR_REQUEST_ABORTED
-//
-// MessageText:
-//
-// The request was aborted.
-//
- ERROR_REQUEST_ABORTED = DWORD(1235);
- {$EXTERNALSYM ERROR_REQUEST_ABORTED}
-
-//
-// MessageId: ERROR_CONNECTION_ABORTED
-//
-// MessageText:
-//
-// The network connection was aborted by the local system.
-//
- ERROR_CONNECTION_ABORTED = DWORD(1236);
- {$EXTERNALSYM ERROR_CONNECTION_ABORTED}
-
-//
-// MessageId: ERROR_RETRY
-//
-// MessageText:
-//
-// The operation could not be completed. A retry should be performed.
-//
- ERROR_RETRY = DWORD(1237);
- {$EXTERNALSYM ERROR_RETRY}
-
-//
-// MessageId: ERROR_CONNECTION_COUNT_LIMIT
-//
-// MessageText:
-//
-// A connection to the server could not be made because the limit on the number of concurrent connections for this account has been reached.
-//
- ERROR_CONNECTION_COUNT_LIMIT = DWORD(1238);
- {$EXTERNALSYM ERROR_CONNECTION_COUNT_LIMIT}
-
-//
-// MessageId: ERROR_LOGIN_TIME_RESTRICTION
-//
-// MessageText:
-//
-// Attempting to log in during an unauthorized time of day for this account.
-//
- ERROR_LOGIN_TIME_RESTRICTION = DWORD(1239);
- {$EXTERNALSYM ERROR_LOGIN_TIME_RESTRICTION}
-
-//
-// MessageId: ERROR_LOGIN_WKSTA_RESTRICTION
-//
-// MessageText:
-//
-// The account is not authorized to log in from this station.
-//
- ERROR_LOGIN_WKSTA_RESTRICTION = DWORD(1240);
- {$EXTERNALSYM ERROR_LOGIN_WKSTA_RESTRICTION}
-
-//
-// MessageId: ERROR_INCORRECT_ADDRESS
-//
-// MessageText:
-//
-// The network address could not be used for the operation requested.
-//
- ERROR_INCORRECT_ADDRESS = DWORD(1241);
- {$EXTERNALSYM ERROR_INCORRECT_ADDRESS}
-
-//
-// MessageId: ERROR_ALREADY_REGISTERED
-//
-// MessageText:
-//
-// The service is already registered.
-//
- ERROR_ALREADY_REGISTERED = DWORD(1242);
- {$EXTERNALSYM ERROR_ALREADY_REGISTERED}
-
-//
-// MessageId: ERROR_SERVICE_NOT_FOUND
-//
-// MessageText:
-//
-// The specified service does not exist.
-//
- ERROR_SERVICE_NOT_FOUND = DWORD(1243);
- {$EXTERNALSYM ERROR_SERVICE_NOT_FOUND}
-
-//
-// MessageId: ERROR_NOT_AUTHENTICATED
-//
-// MessageText:
-//
-// The operation being requested was not performed because the user has not been authenticated.
-//
- ERROR_NOT_AUTHENTICATED = DWORD(1244);
- {$EXTERNALSYM ERROR_NOT_AUTHENTICATED}
-
-//
-// MessageId: ERROR_NOT_LOGGED_ON
-//
-// MessageText:
-//
-// The operation being requested was not performed because the user has not logged on to the network.
-// The specified service does not exist.
-//
- ERROR_NOT_LOGGED_ON = DWORD(1245);
- {$EXTERNALSYM ERROR_NOT_LOGGED_ON}
-
-//
-// MessageId: ERROR_CONTINUE
-//
-// MessageText:
-//
-// Continue with work in progress.
-//
- ERROR_CONTINUE = DWORD(1246); // dderror
- {$EXTERNALSYM ERROR_CONTINUE}
-
-//
-// MessageId: ERROR_ALREADY_INITIALIZED
-//
-// MessageText:
-//
-// An attempt was made to perform an initialization operation when initialization has already been completed.
-//
- ERROR_ALREADY_INITIALIZED = DWORD(1247);
- {$EXTERNALSYM ERROR_ALREADY_INITIALIZED}
-
-//
-// MessageId: ERROR_NO_MORE_DEVICES
-//
-// MessageText:
-//
-// No more local devices.
-//
- ERROR_NO_MORE_DEVICES = DWORD(1248); // dderror
- {$EXTERNALSYM ERROR_NO_MORE_DEVICES}
-
-//
-// MessageId: ERROR_NO_SUCH_SITE
-//
-// MessageText:
-//
-// The specified site does not exist.
-//
- ERROR_NO_SUCH_SITE = DWORD(1249);
- {$EXTERNALSYM ERROR_NO_SUCH_SITE}
-
-//
-// MessageId: ERROR_DOMAIN_CONTROLLER_EXISTS
-//
-// MessageText:
-//
-// A domain controller with the specified name already exists.
-//
- ERROR_DOMAIN_CONTROLLER_EXISTS = DWORD(1250);
- {$EXTERNALSYM ERROR_DOMAIN_CONTROLLER_EXISTS}
-
-//
-// MessageId: ERROR_ONLY_IF_CONNECTED
-//
-// MessageText:
-//
-// This operation is supported only when you are connected to the server.
-//
- ERROR_ONLY_IF_CONNECTED = DWORD(1251);
- {$EXTERNALSYM ERROR_ONLY_IF_CONNECTED}
-
-//
-// MessageId: ERROR_OVERRIDE_NOCHANGES
-//
-// MessageText:
-//
-// The group policy framework should call the extension even if there are no changes.
-//
- ERROR_OVERRIDE_NOCHANGES = DWORD(1252);
- {$EXTERNALSYM ERROR_OVERRIDE_NOCHANGES}
-
-//
-// MessageId: ERROR_BAD_USER_PROFILE
-//
-// MessageText:
-//
-// The specified user does not have a valid profile.
-//
- ERROR_BAD_USER_PROFILE = DWORD(1253);
- {$EXTERNALSYM ERROR_BAD_USER_PROFILE}
-
-//
-// MessageId: ERROR_NOT_SUPPORTED_ON_SBS
-//
-// MessageText:
-//
-// This operation is not supported on a computer running Windows Server 2003 for Small Business Server
-//
- ERROR_NOT_SUPPORTED_ON_SBS = DWORD(1254);
- {$EXTERNALSYM ERROR_NOT_SUPPORTED_ON_SBS}
-
-//
-// MessageId: ERROR_SERVER_SHUTDOWN_IN_PROGRESS
-//
-// MessageText:
-//
-// The server machine is shutting down.
-//
- ERROR_SERVER_SHUTDOWN_IN_PROGRESS = DWORD(1255);
- {$EXTERNALSYM ERROR_SERVER_SHUTDOWN_IN_PROGRESS}
-
-//
-// MessageId: ERROR_HOST_DOWN
-//
-// MessageText:
-//
-// The remote system is not available. For information about network troubleshooting, see Windows Help.
-//
- ERROR_HOST_DOWN = DWORD(1256);
- {$EXTERNALSYM ERROR_HOST_DOWN}
-
-//
-// MessageId: ERROR_NON_ACCOUNT_SID
-//
-// MessageText:
-//
-// The security identifier provided is not from an account domain.
-//
- ERROR_NON_ACCOUNT_SID = DWORD(1257);
- {$EXTERNALSYM ERROR_NON_ACCOUNT_SID}
-
-//
-// MessageId: ERROR_NON_DOMAIN_SID
-//
-// MessageText:
-//
-// The security identifier provided does not have a domain component.
-//
- ERROR_NON_DOMAIN_SID = DWORD(1258);
- {$EXTERNALSYM ERROR_NON_DOMAIN_SID}
-
-//
-// MessageId: ERROR_APPHELP_BLOCK
-//
-// MessageText:
-//
-// AppHelp dialog canceled thus preventing the application from starting.
-//
- ERROR_APPHELP_BLOCK = DWORD(1259);
- {$EXTERNALSYM ERROR_APPHELP_BLOCK}
-
-//
-// MessageId: ERROR_ACCESS_DISABLED_BY_POLICY
-//
-// MessageText:
-//
-// Windows cannot open this program because it has been prevented by a software restriction policy. For more information, open Event Viewer or contact your system administrator.
-//
- ERROR_ACCESS_DISABLED_BY_POLICY = DWORD(1260);
- {$EXTERNALSYM ERROR_ACCESS_DISABLED_BY_POLICY}
-
-//
-// MessageId: ERROR_REG_NAT_CONSUMPTION
-//
-// MessageText:
-//
-// A program attempt to use an invalid register value. Normally caused by an uninitialized register. This error is Itanium specific.
-//
- ERROR_REG_NAT_CONSUMPTION = DWORD(1261);
- {$EXTERNALSYM ERROR_REG_NAT_CONSUMPTION}
-
-//
-// MessageId: ERROR_CSCSHARE_OFFLINE
-//
-// MessageText:
-//
-// The share is currently offline or does not exist.
-//
- ERROR_CSCSHARE_OFFLINE = DWORD(1262);
- {$EXTERNALSYM ERROR_CSCSHARE_OFFLINE}
-
-//
-// MessageId: ERROR_PKINIT_FAILURE
-//
-// MessageText:
-//
-// The kerberos protocol encountered an error while validating the
-// KDC certificate during smartcard logon. There is more information in the
-// system event log.
-//
- ERROR_PKINIT_FAILURE = DWORD(1263);
- {$EXTERNALSYM ERROR_PKINIT_FAILURE}
-
-//
-// MessageId: ERROR_SMARTCARD_SUBSYSTEM_FAILURE
-//
-// MessageText:
-//
-// The kerberos protocol encountered an error while attempting to utilize
-// the smartcard subsystem.
-//
- ERROR_SMARTCARD_SUBSYSTEM_FAILURE = DWORD(1264);
- {$EXTERNALSYM ERROR_SMARTCARD_SUBSYSTEM_FAILURE}
-
-//
-// MessageId: ERROR_DOWNGRADE_DETECTED
-//
-// MessageText:
-//
-// The system detected a possible attempt to compromise security. Please ensure that you can contact the server that authenticated you.
-//
- ERROR_DOWNGRADE_DETECTED = DWORD(1265);
- {$EXTERNALSYM ERROR_DOWNGRADE_DETECTED}
-
-//
-// Do not use ID's 1266 - 1270 as the symbolicNames have been moved to SEC_E_*
-//
-//
-// MessageId: ERROR_MACHINE_LOCKED
-//
-// MessageText:
-//
-// The machine is locked and can not be shut down without the force option.
-//
- ERROR_MACHINE_LOCKED = DWORD(1271);
- {$EXTERNALSYM ERROR_MACHINE_LOCKED}
-
-//
-// MessageId: ERROR_CALLBACK_SUPPLIED_INVALID_DATA
-//
-// MessageText:
-//
-// An application-defined callback gave invalid data when called.
-//
- ERROR_CALLBACK_SUPPLIED_INVALID_DATA = DWORD(1273);
- {$EXTERNALSYM ERROR_CALLBACK_SUPPLIED_INVALID_DATA}
-
-//
-// MessageId: ERROR_SYNC_FOREGROUND_REFRESH_REQUIRED
-//
-// MessageText:
-//
-// The group policy framework should call the extension in the synchronous foreground policy refresh.
-//
- ERROR_SYNC_FOREGROUND_REFRESH_REQUIRED = DWORD(1274);
- {$EXTERNALSYM ERROR_SYNC_FOREGROUND_REFRESH_REQUIRED}
-
-//
-// MessageId: ERROR_DRIVER_BLOCKED
-//
-// MessageText:
-//
-// This driver has been blocked from loading
-//
- ERROR_DRIVER_BLOCKED = DWORD(1275);
- {$EXTERNALSYM ERROR_DRIVER_BLOCKED}
-
-//
-// MessageId: ERROR_INVALID_IMPORT_OF_NON_DLL
-//
-// MessageText:
-//
-// A dynamic link library (DLL) referenced a module that was neither a DLL nor the process's executable image.
-//
- ERROR_INVALID_IMPORT_OF_NON_DLL = DWORD(1276);
- {$EXTERNALSYM ERROR_INVALID_IMPORT_OF_NON_DLL}
-
-//
-// MessageId: ERROR_ACCESS_DISABLED_WEBBLADE
-//
-// MessageText:
-//
-// Windows cannot open this program since it has been disabled.
-//
- ERROR_ACCESS_DISABLED_WEBBLADE = DWORD(1277);
- {$EXTERNALSYM ERROR_ACCESS_DISABLED_WEBBLADE}
-
-//
-// MessageId: ERROR_ACCESS_DISABLED_WEBBLADE_TAMPER
-//
-// MessageText:
-//
-// Windows cannot open this program because the license enforcement system has been tampered with or become corrupted.
-//
- ERROR_ACCESS_DISABLED_WEBBLADE_TAMPER = DWORD(1278);
- {$EXTERNALSYM ERROR_ACCESS_DISABLED_WEBBLADE_TAMPER}
-
-//
-// MessageId: ERROR_RECOVERY_FAILURE
-//
-// MessageText:
-//
-// A transaction recover failed.
-//
- ERROR_RECOVERY_FAILURE = DWORD(1279);
- {$EXTERNALSYM ERROR_RECOVERY_FAILURE}
-
-//
-// MessageId: ERROR_ALREADY_FIBER
-//
-// MessageText:
-//
-// The current thread has already been converted to a fiber.
-//
- ERROR_ALREADY_FIBER = DWORD(1280);
- {$EXTERNALSYM ERROR_ALREADY_FIBER}
-
-//
-// MessageId: ERROR_ALREADY_THREAD
-//
-// MessageText:
-//
-// The current thread has already been converted from a fiber.
-//
- ERROR_ALREADY_THREAD = DWORD(1281);
- {$EXTERNALSYM ERROR_ALREADY_THREAD}
-
-//
-// MessageId: ERROR_STACK_BUFFER_OVERRUN
-//
-// MessageText:
-//
-// The system detected an overrun of a stack-based buffer in this application. This
-// overrun could potentially allow a malicious user to gain control of this application.
-//
- ERROR_STACK_BUFFER_OVERRUN = DWORD(1282);
- {$EXTERNALSYM ERROR_STACK_BUFFER_OVERRUN}
-
-//
-// MessageId: ERROR_PARAMETER_QUOTA_EXCEEDED
-//
-// MessageText:
-//
-// Data present in one of the parameters is more than the function can operate on.
-//
- ERROR_PARAMETER_QUOTA_EXCEEDED = DWORD(1283);
- {$EXTERNALSYM ERROR_PARAMETER_QUOTA_EXCEEDED}
-
-//
-// MessageId: ERROR_DEBUGGER_INACTIVE
-//
-// MessageText:
-//
-// An attempt to do an operation on a debug object failed because the object is in the process of being deleted.
-//
- ERROR_DEBUGGER_INACTIVE = DWORD(1284);
- {$EXTERNALSYM ERROR_DEBUGGER_INACTIVE}
-
-//
-// MessageId: ERROR_DELAY_LOAD_FAILED
-//
-// MessageText:
-//
-// An attempt to delay-load a .dll or get a function address in a delay-loaded .dll failed.
-//
- ERROR_DELAY_LOAD_FAILED = DWORD(1285);
- {$EXTERNALSYM ERROR_DELAY_LOAD_FAILED}
-
-//
-// MessageId: ERROR_VDM_DISALLOWED
-//
-// MessageText:
-//
-// %1 is a 16-bit application. You do not have permissions to execute 16-bit applications. Check your permissions with your system administrator.
-//
- ERROR_VDM_DISALLOWED = DWORD(1286);
- {$EXTERNALSYM ERROR_VDM_DISALLOWED}
-
-//
-// MessageId: ERROR_UNIDENTIFIED_ERROR
-//
-// MessageText:
-//
-// Insufficient information exists to identify the cause of failure.
-//
- ERROR_UNIDENTIFIED_ERROR = DWORD(1287);
- {$EXTERNALSYM ERROR_UNIDENTIFIED_ERROR}
-
-///////////////////////////
-//
-// Add new status codes before this point unless there is a component specific section below.
-//
-///////////////////////////
-
-///////////////////////////
-// //
-// Security Status Codes //
-// //
-///////////////////////////
-
-//
-// MessageId: ERROR_NOT_ALL_ASSIGNED
-//
-// MessageText:
-//
-// Not all privileges referenced are assigned to the caller.
-//
- ERROR_NOT_ALL_ASSIGNED = DWORD(1300);
- {$EXTERNALSYM ERROR_NOT_ALL_ASSIGNED}
-
-//
-// MessageId: ERROR_SOME_NOT_MAPPED
-//
-// MessageText:
-//
-// Some mapping between account names and security IDs was not done.
-//
- ERROR_SOME_NOT_MAPPED = DWORD(1301);
- {$EXTERNALSYM ERROR_SOME_NOT_MAPPED}
-
-//
-// MessageId: ERROR_NO_QUOTAS_FOR_ACCOUNT
-//
-// MessageText:
-//
-// No system quota limits are specifically set for this account.
-//
- ERROR_NO_QUOTAS_FOR_ACCOUNT = DWORD(1302);
- {$EXTERNALSYM ERROR_NO_QUOTAS_FOR_ACCOUNT}
-
-//
-// MessageId: ERROR_LOCAL_USER_SESSION_KEY
-//
-// MessageText:
-//
-// No encryption key is available. A well-known encryption key was returned.
-//
- ERROR_LOCAL_USER_SESSION_KEY = DWORD(1303);
- {$EXTERNALSYM ERROR_LOCAL_USER_SESSION_KEY}
-
-//
-// MessageId: ERROR_NULL_LM_PASSWORD
-//
-// MessageText:
-//
-// The password is too complex to be converted to a LAN Manager password. The LAN Manager password returned is a NULL string.
-//
- ERROR_NULL_LM_PASSWORD = DWORD(1304);
- {$EXTERNALSYM ERROR_NULL_LM_PASSWORD}
-
-//
-// MessageId: ERROR_UNKNOWN_REVISION
-//
-// MessageText:
-//
-// The revision level is unknown.
-//
- ERROR_UNKNOWN_REVISION = DWORD(1305);
- {$EXTERNALSYM ERROR_UNKNOWN_REVISION}
-
-//
-// MessageId: ERROR_REVISION_MISMATCH
-//
-// MessageText:
-//
-// Indicates two revision levels are incompatible.
-//
- ERROR_REVISION_MISMATCH = DWORD(1306);
- {$EXTERNALSYM ERROR_REVISION_MISMATCH}
-
-//
-// MessageId: ERROR_INVALID_OWNER
-//
-// MessageText:
-//
-// This security ID may not be assigned as the owner of this object.
-//
- ERROR_INVALID_OWNER = DWORD(1307);
- {$EXTERNALSYM ERROR_INVALID_OWNER}
-
-//
-// MessageId: ERROR_INVALID_PRIMARY_GROUP
-//
-// MessageText:
-//
-// This security ID may not be assigned as the primary group of an object.
-//
- ERROR_INVALID_PRIMARY_GROUP = DWORD(1308);
- {$EXTERNALSYM ERROR_INVALID_PRIMARY_GROUP}
-
-//
-// MessageId: ERROR_NO_IMPERSONATION_TOKEN
-//
-// MessageText:
-//
-// An attempt has been made to operate on an impersonation token by a thread that is not currently impersonating a client.
-//
- ERROR_NO_IMPERSONATION_TOKEN = DWORD(1309);
- {$EXTERNALSYM ERROR_NO_IMPERSONATION_TOKEN}
-
-//
-// MessageId: ERROR_CANT_DISABLE_MANDATORY
-//
-// MessageText:
-//
-// The group may not be disabled.
-//
- ERROR_CANT_DISABLE_MANDATORY = DWORD(1310);
- {$EXTERNALSYM ERROR_CANT_DISABLE_MANDATORY}
-
-//
-// MessageId: ERROR_NO_LOGON_SERVERS
-//
-// MessageText:
-//
-// There are currently no logon servers available to service the logon request.
-//
- ERROR_NO_LOGON_SERVERS = DWORD(1311);
- {$EXTERNALSYM ERROR_NO_LOGON_SERVERS}
-
-//
-// MessageId: ERROR_NO_SUCH_LOGON_SESSION
-//
-// MessageText:
-//
-// A specified logon session does not exist. It may already have been terminated.
-//
- ERROR_NO_SUCH_LOGON_SESSION = DWORD(1312);
- {$EXTERNALSYM ERROR_NO_SUCH_LOGON_SESSION}
-
-//
-// MessageId: ERROR_NO_SUCH_PRIVILEGE
-//
-// MessageText:
-//
-// A specified privilege does not exist.
-//
- ERROR_NO_SUCH_PRIVILEGE = DWORD(1313);
- {$EXTERNALSYM ERROR_NO_SUCH_PRIVILEGE}
-
-//
-// MessageId: ERROR_PRIVILEGE_NOT_HELD
-//
-// MessageText:
-//
-// A required privilege is not held by the client.
-//
- ERROR_PRIVILEGE_NOT_HELD = DWORD(1314);
- {$EXTERNALSYM ERROR_PRIVILEGE_NOT_HELD}
-
-//
-// MessageId: ERROR_INVALID_ACCOUNT_NAME
-//
-// MessageText:
-//
-// The name provided is not a properly formed account name.
-//
- ERROR_INVALID_ACCOUNT_NAME = DWORD(1315);
- {$EXTERNALSYM ERROR_INVALID_ACCOUNT_NAME}
-
-//
-// MessageId: ERROR_USER_EXISTS
-//
-// MessageText:
-//
-// The specified user already exists.
-//
- ERROR_USER_EXISTS = DWORD(1316);
- {$EXTERNALSYM ERROR_USER_EXISTS}
-
-//
-// MessageId: ERROR_NO_SUCH_USER
-//
-// MessageText:
-//
-// The specified user does not exist.
-//
- ERROR_NO_SUCH_USER = DWORD(1317);
- {$EXTERNALSYM ERROR_NO_SUCH_USER}
-
-//
-// MessageId: ERROR_GROUP_EXISTS
-//
-// MessageText:
-//
-// The specified group already exists.
-//
- ERROR_GROUP_EXISTS = DWORD(1318);
- {$EXTERNALSYM ERROR_GROUP_EXISTS}
-
-//
-// MessageId: ERROR_NO_SUCH_GROUP
-//
-// MessageText:
-//
-// The specified group does not exist.
-//
- ERROR_NO_SUCH_GROUP = DWORD(1319);
- {$EXTERNALSYM ERROR_NO_SUCH_GROUP}
-
-//
-// MessageId: ERROR_MEMBER_IN_GROUP
-//
-// MessageText:
-//
-// Either the specified user account is already a member of the specified group, or the specified group cannot be deleted because it contains a member.
-//
- ERROR_MEMBER_IN_GROUP = DWORD(1320);
- {$EXTERNALSYM ERROR_MEMBER_IN_GROUP}
-
-//
-// MessageId: ERROR_MEMBER_NOT_IN_GROUP
-//
-// MessageText:
-//
-// The specified user account is not a member of the specified group account.
-//
- ERROR_MEMBER_NOT_IN_GROUP = DWORD(1321);
- {$EXTERNALSYM ERROR_MEMBER_NOT_IN_GROUP}
-
-//
-// MessageId: ERROR_LAST_ADMIN
-//
-// MessageText:
-//
-// The last remaining administration account cannot be disabled or deleted.
-//
- ERROR_LAST_ADMIN = DWORD(1322);
- {$EXTERNALSYM ERROR_LAST_ADMIN}
-
-//
-// MessageId: ERROR_WRONG_PASSWORD
-//
-// MessageText:
-//
-// Unable to update the password. The value provided as the current password is incorrect.
-//
- ERROR_WRONG_PASSWORD = DWORD(1323);
- {$EXTERNALSYM ERROR_WRONG_PASSWORD}
-
-//
-// MessageId: ERROR_ILL_FORMED_PASSWORD
-//
-// MessageText:
-//
-// Unable to update the password. The value provided for the new password contains values that are not allowed in passwords.
-//
- ERROR_ILL_FORMED_PASSWORD = DWORD(1324);
- {$EXTERNALSYM ERROR_ILL_FORMED_PASSWORD}
-
-//
-// MessageId: ERROR_PASSWORD_RESTRICTION
-//
-// MessageText:
-//
-// Unable to update the password. The value provided for the new password does not meet the length, complexity, or history requirement of the domain.
-//
- ERROR_PASSWORD_RESTRICTION = DWORD(1325);
- {$EXTERNALSYM ERROR_PASSWORD_RESTRICTION}
-
-//
-// MessageId: ERROR_LOGON_FAILURE
-//
-// MessageText:
-//
-// Logon failure: unknown user name or bad password.
-//
- ERROR_LOGON_FAILURE = DWORD(1326);
- {$EXTERNALSYM ERROR_LOGON_FAILURE}
-
-//
-// MessageId: ERROR_ACCOUNT_RESTRICTION
-//
-// MessageText:
-//
-// Logon failure: user account restriction. Possible reasons are blank passwords not allowed, logon hour restrictions, or a policy restriction has been enforced.
-//
- ERROR_ACCOUNT_RESTRICTION = DWORD(1327);
- {$EXTERNALSYM ERROR_ACCOUNT_RESTRICTION}
-
-//
-// MessageId: ERROR_INVALID_LOGON_HOURS
-//
-// MessageText:
-//
-// Logon failure: account logon time restriction violation.
-//
- ERROR_INVALID_LOGON_HOURS = DWORD(1328);
- {$EXTERNALSYM ERROR_INVALID_LOGON_HOURS}
-
-//
-// MessageId: ERROR_INVALID_WORKSTATION
-//
-// MessageText:
-//
-// Logon failure: user not allowed to log on to this computer.
-//
- ERROR_INVALID_WORKSTATION = DWORD(1329);
- {$EXTERNALSYM ERROR_INVALID_WORKSTATION}
-
-//
-// MessageId: ERROR_PASSWORD_EXPIRED
-//
-// MessageText:
-//
-// Logon failure: the specified account password has expired.
-//
- ERROR_PASSWORD_EXPIRED = DWORD(1330);
- {$EXTERNALSYM ERROR_PASSWORD_EXPIRED}
-
-//
-// MessageId: ERROR_ACCOUNT_DISABLED
-//
-// MessageText:
-//
-// Logon failure: account currently disabled.
-//
- ERROR_ACCOUNT_DISABLED = DWORD(1331);
- {$EXTERNALSYM ERROR_ACCOUNT_DISABLED}
-
-//
-// MessageId: ERROR_NONE_MAPPED
-//
-// MessageText:
-//
-// No mapping between account names and security IDs was done.
-//
- ERROR_NONE_MAPPED = DWORD(1332);
- {$EXTERNALSYM ERROR_NONE_MAPPED}
-
-//
-// MessageId: ERROR_TOO_MANY_LUIDS_REQUESTED
-//
-// MessageText:
-//
-// Too many local user identifiers (LUIDs) were requested at one time.
-//
- ERROR_TOO_MANY_LUIDS_REQUESTED = DWORD(1333);
- {$EXTERNALSYM ERROR_TOO_MANY_LUIDS_REQUESTED}
-
-//
-// MessageId: ERROR_LUIDS_EXHAUSTED
-//
-// MessageText:
-//
-// No more local user identifiers (LUIDs) are available.
-//
- ERROR_LUIDS_EXHAUSTED = DWORD(1334);
- {$EXTERNALSYM ERROR_LUIDS_EXHAUSTED}
-
-//
-// MessageId: ERROR_INVALID_SUB_AUTHORITY
-//
-// MessageText:
-//
-// The subauthority part of a security ID is invalid for this particular use.
-//
- ERROR_INVALID_SUB_AUTHORITY = DWORD(1335);
- {$EXTERNALSYM ERROR_INVALID_SUB_AUTHORITY}
-
-//
-// MessageId: ERROR_INVALID_ACL
-//
-// MessageText:
-//
-// The access control list (ACL) structure is invalid.
-//
- ERROR_INVALID_ACL = DWORD(1336);
- {$EXTERNALSYM ERROR_INVALID_ACL}
-
-//
-// MessageId: ERROR_INVALID_SID
-//
-// MessageText:
-//
-// The security ID structure is invalid.
-//
- ERROR_INVALID_SID = DWORD(1337);
- {$EXTERNALSYM ERROR_INVALID_SID}
-
-//
-// MessageId: ERROR_INVALID_SECURITY_DESCR
-//
-// MessageText:
-//
-// The security descriptor structure is invalid.
-//
- ERROR_INVALID_SECURITY_DESCR = DWORD(1338);
- {$EXTERNALSYM ERROR_INVALID_SECURITY_DESCR}
-
-//
-// MessageId: ERROR_BAD_INHERITANCE_ACL
-//
-// MessageText:
-//
-// The inherited access control list (ACL) or access control entry (ACE) could not be built.
-//
- ERROR_BAD_INHERITANCE_ACL = DWORD(1340);
- {$EXTERNALSYM ERROR_BAD_INHERITANCE_ACL}
-
-//
-// MessageId: ERROR_SERVER_DISABLED
-//
-// MessageText:
-//
-// The server is currently disabled.
-//
- ERROR_SERVER_DISABLED = DWORD(1341);
- {$EXTERNALSYM ERROR_SERVER_DISABLED}
-
-//
-// MessageId: ERROR_SERVER_NOT_DISABLED
-//
-// MessageText:
-//
-// The server is currently enabled.
-//
- ERROR_SERVER_NOT_DISABLED = DWORD(1342);
- {$EXTERNALSYM ERROR_SERVER_NOT_DISABLED}
-
-//
-// MessageId: ERROR_INVALID_ID_AUTHORITY
-//
-// MessageText:
-//
-// The value provided was an invalid value for an identifier authority.
-//
- ERROR_INVALID_ID_AUTHORITY = DWORD(1343);
- {$EXTERNALSYM ERROR_INVALID_ID_AUTHORITY}
-
-//
-// MessageId: ERROR_ALLOTTED_SPACE_EXCEEDED
-//
-// MessageText:
-//
-// No more memory is available for security information updates.
-//
- ERROR_ALLOTTED_SPACE_EXCEEDED = DWORD(1344);
- {$EXTERNALSYM ERROR_ALLOTTED_SPACE_EXCEEDED}
-
-//
-// MessageId: ERROR_INVALID_GROUP_ATTRIBUTES
-//
-// MessageText:
-//
-// The specified attributes are invalid, or incompatible with the attributes for the group as a whole.
-//
- ERROR_INVALID_GROUP_ATTRIBUTES = DWORD(1345);
- {$EXTERNALSYM ERROR_INVALID_GROUP_ATTRIBUTES}
-
-//
-// MessageId: ERROR_BAD_IMPERSONATION_LEVEL
-//
-// MessageText:
-//
-// Either a required impersonation level was not provided, or the provided impersonation level is invalid.
-//
- ERROR_BAD_IMPERSONATION_LEVEL = DWORD(1346);
- {$EXTERNALSYM ERROR_BAD_IMPERSONATION_LEVEL}
-
-//
-// MessageId: ERROR_CANT_OPEN_ANONYMOUS
-//
-// MessageText:
-//
-// Cannot open an anonymous level security token.
-//
- ERROR_CANT_OPEN_ANONYMOUS = DWORD(1347);
- {$EXTERNALSYM ERROR_CANT_OPEN_ANONYMOUS}
-
-//
-// MessageId: ERROR_BAD_VALIDATION_CLASS
-//
-// MessageText:
-//
-// The validation information class requested was invalid.
-//
- ERROR_BAD_VALIDATION_CLASS = DWORD(1348);
- {$EXTERNALSYM ERROR_BAD_VALIDATION_CLASS}
-
-//
-// MessageId: ERROR_BAD_TOKEN_TYPE
-//
-// MessageText:
-//
-// The type of the token is inappropriate for its attempted use.
-//
- ERROR_BAD_TOKEN_TYPE = DWORD(1349);
- {$EXTERNALSYM ERROR_BAD_TOKEN_TYPE}
-
-//
-// MessageId: ERROR_NO_SECURITY_ON_OBJECT
-//
-// MessageText:
-//
-// Unable to perform a security operation on an object that has no associated security.
-//
- ERROR_NO_SECURITY_ON_OBJECT = DWORD(1350);
- {$EXTERNALSYM ERROR_NO_SECURITY_ON_OBJECT}
-
-//
-// MessageId: ERROR_CANT_ACCESS_DOMAIN_INFO
-//
-// MessageText:
-//
-// Configuration information could not be read from the domain controller, either because the machine is unavailable, or access has been denied.
-//
- ERROR_CANT_ACCESS_DOMAIN_INFO = DWORD(1351);
- {$EXTERNALSYM ERROR_CANT_ACCESS_DOMAIN_INFO}
-
-//
-// MessageId: ERROR_INVALID_SERVER_STATE
-//
-// MessageText:
-//
-// The security account manager (SAM) or local security authority (LSA) server was in the wrong state to perform the security operation.
-//
- ERROR_INVALID_SERVER_STATE = DWORD(1352);
- {$EXTERNALSYM ERROR_INVALID_SERVER_STATE}
-
-//
-// MessageId: ERROR_INVALID_DOMAIN_STATE
-//
-// MessageText:
-//
-// The domain was in the wrong state to perform the security operation.
-//
- ERROR_INVALID_DOMAIN_STATE = DWORD(1353);
- {$EXTERNALSYM ERROR_INVALID_DOMAIN_STATE}
-
-//
-// MessageId: ERROR_INVALID_DOMAIN_ROLE
-//
-// MessageText:
-//
-// This operation is only allowed for the Primary Domain Controller of the domain.
-//
- ERROR_INVALID_DOMAIN_ROLE = DWORD(1354);
- {$EXTERNALSYM ERROR_INVALID_DOMAIN_ROLE}
-
-//
-// MessageId: ERROR_NO_SUCH_DOMAIN
-//
-// MessageText:
-//
-// The specified domain either does not exist or could not be contacted.
-//
- ERROR_NO_SUCH_DOMAIN = DWORD(1355);
- {$EXTERNALSYM ERROR_NO_SUCH_DOMAIN}
-
-//
-// MessageId: ERROR_DOMAIN_EXISTS
-//
-// MessageText:
-//
-// The specified domain already exists.
-//
- ERROR_DOMAIN_EXISTS = DWORD(1356);
- {$EXTERNALSYM ERROR_DOMAIN_EXISTS}
-
-//
-// MessageId: ERROR_DOMAIN_LIMIT_EXCEEDED
-//
-// MessageText:
-//
-// An attempt was made to exceed the limit on the number of domains per server.
-//
- ERROR_DOMAIN_LIMIT_EXCEEDED = DWORD(1357);
- {$EXTERNALSYM ERROR_DOMAIN_LIMIT_EXCEEDED}
-
-//
-// MessageId: ERROR_INTERNAL_DB_CORRUPTION
-//
-// MessageText:
-//
-// Unable to complete the requested operation because of either a catastrophic media failure or a data structure corruption on the disk.
-//
- ERROR_INTERNAL_DB_CORRUPTION = DWORD(1358);
- {$EXTERNALSYM ERROR_INTERNAL_DB_CORRUPTION}
-
-//
-// MessageId: ERROR_INTERNAL_ERROR
-//
-// MessageText:
-//
-// An internal error occurred.
-//
- ERROR_INTERNAL_ERROR = DWORD(1359);
- {$EXTERNALSYM ERROR_INTERNAL_ERROR}
-
-//
-// MessageId: ERROR_GENERIC_NOT_MAPPED
-//
-// MessageText:
-//
-// Generic access types were contained in an access mask which should already be mapped to nongeneric types.
-//
- ERROR_GENERIC_NOT_MAPPED = DWORD(1360);
- {$EXTERNALSYM ERROR_GENERIC_NOT_MAPPED}
-
-//
-// MessageId: ERROR_BAD_DESCRIPTOR_FORMAT
-//
-// MessageText:
-//
-// A security descriptor is not in the right format (absolute or self-relative).
-//
- ERROR_BAD_DESCRIPTOR_FORMAT = DWORD(1361);
- {$EXTERNALSYM ERROR_BAD_DESCRIPTOR_FORMAT}
-
-//
-// MessageId: ERROR_NOT_LOGON_PROCESS
-//
-// MessageText:
-//
-// The requested action is restricted for use by logon processes only. The calling process has not registered as a logon process.
-//
- ERROR_NOT_LOGON_PROCESS = DWORD(1362);
- {$EXTERNALSYM ERROR_NOT_LOGON_PROCESS}
-
-//
-// MessageId: ERROR_LOGON_SESSION_EXISTS
-//
-// MessageText:
-//
-// Cannot start a new logon session with an ID that is already in use.
-//
- ERROR_LOGON_SESSION_EXISTS = DWORD(1363);
- {$EXTERNALSYM ERROR_LOGON_SESSION_EXISTS}
-
-//
-// MessageId: ERROR_NO_SUCH_PACKAGE
-//
-// MessageText:
-//
-// A specified authentication package is unknown.
-//
- ERROR_NO_SUCH_PACKAGE = DWORD(1364);
- {$EXTERNALSYM ERROR_NO_SUCH_PACKAGE}
-
-//
-// MessageId: ERROR_BAD_LOGON_SESSION_STATE
-//
-// MessageText:
-//
-// The logon session is not in a state that is consistent with the requested operation.
-//
- ERROR_BAD_LOGON_SESSION_STATE = DWORD(1365);
- {$EXTERNALSYM ERROR_BAD_LOGON_SESSION_STATE}
-
-//
-// MessageId: ERROR_LOGON_SESSION_COLLISION
-//
-// MessageText:
-//
-// The logon session ID is already in use.
-//
- ERROR_LOGON_SESSION_COLLISION = DWORD(1366);
- {$EXTERNALSYM ERROR_LOGON_SESSION_COLLISION}
-
-//
-// MessageId: ERROR_INVALID_LOGON_TYPE
-//
-// MessageText:
-//
-// A logon request contained an invalid logon type value.
-//
- ERROR_INVALID_LOGON_TYPE = DWORD(1367);
- {$EXTERNALSYM ERROR_INVALID_LOGON_TYPE}
-
-//
-// MessageId: ERROR_CANNOT_IMPERSONATE
-//
-// MessageText:
-//
-// Unable to impersonate using a named pipe until data has been read from that pipe.
-//
- ERROR_CANNOT_IMPERSONATE = DWORD(1368);
- {$EXTERNALSYM ERROR_CANNOT_IMPERSONATE}
-
-//
-// MessageId: ERROR_RXACT_INVALID_STATE
-//
-// MessageText:
-//
-// The transaction state of a registry subtree is incompatible with the requested operation.
-//
- ERROR_RXACT_INVALID_STATE = DWORD(1369);
- {$EXTERNALSYM ERROR_RXACT_INVALID_STATE}
-
-//
-// MessageId: ERROR_RXACT_COMMIT_FAILURE
-//
-// MessageText:
-//
-// An internal security database corruption has been encountered.
-//
- ERROR_RXACT_COMMIT_FAILURE = DWORD(1370);
- {$EXTERNALSYM ERROR_RXACT_COMMIT_FAILURE}
-
-//
-// MessageId: ERROR_SPECIAL_ACCOUNT
-//
-// MessageText:
-//
-// Cannot perform this operation on built-in accounts.
-//
- ERROR_SPECIAL_ACCOUNT = DWORD(1371);
- {$EXTERNALSYM ERROR_SPECIAL_ACCOUNT}
-
-//
-// MessageId: ERROR_SPECIAL_GROUP
-//
-// MessageText:
-//
-// Cannot perform this operation on this built-in special group.
-//
- ERROR_SPECIAL_GROUP = DWORD(1372);
- {$EXTERNALSYM ERROR_SPECIAL_GROUP}
-
-//
-// MessageId: ERROR_SPECIAL_USER
-//
-// MessageText:
-//
-// Cannot perform this operation on this built-in special user.
-//
- ERROR_SPECIAL_USER = DWORD(1373);
- {$EXTERNALSYM ERROR_SPECIAL_USER}
-
-//
-// MessageId: ERROR_MEMBERS_PRIMARY_GROUP
-//
-// MessageText:
-//
-// The user cannot be removed from a group because the group is currently the user's primary group.
-//
- ERROR_MEMBERS_PRIMARY_GROUP = DWORD(1374);
- {$EXTERNALSYM ERROR_MEMBERS_PRIMARY_GROUP}
-
-//
-// MessageId: ERROR_TOKEN_ALREADY_IN_USE
-//
-// MessageText:
-//
-// The token is already in use as a primary token.
-//
- ERROR_TOKEN_ALREADY_IN_USE = DWORD(1375);
- {$EXTERNALSYM ERROR_TOKEN_ALREADY_IN_USE}
-
-//
-// MessageId: ERROR_NO_SUCH_ALIAS
-//
-// MessageText:
-//
-// The specified local group does not exist.
-//
- ERROR_NO_SUCH_ALIAS = DWORD(1376);
- {$EXTERNALSYM ERROR_NO_SUCH_ALIAS}
-
-//
-// MessageId: ERROR_MEMBER_NOT_IN_ALIAS
-//
-// MessageText:
-//
-// The specified account name is not a member of the local group.
-//
- ERROR_MEMBER_NOT_IN_ALIAS = DWORD(1377);
- {$EXTERNALSYM ERROR_MEMBER_NOT_IN_ALIAS}
-
-//
-// MessageId: ERROR_MEMBER_IN_ALIAS
-//
-// MessageText:
-//
-// The specified account name is already a member of the local group.
-//
- ERROR_MEMBER_IN_ALIAS = DWORD(1378);
- {$EXTERNALSYM ERROR_MEMBER_IN_ALIAS}
-
-//
-// MessageId: ERROR_ALIAS_EXISTS
-//
-// MessageText:
-//
-// The specified local group already exists.
-//
- ERROR_ALIAS_EXISTS = DWORD(1379);
- {$EXTERNALSYM ERROR_ALIAS_EXISTS}
-
-//
-// MessageId: ERROR_LOGON_NOT_GRANTED
-//
-// MessageText:
-//
-// Logon failure: the user has not been granted the requested logon type at this computer.
-//
- ERROR_LOGON_NOT_GRANTED = DWORD(1380);
- {$EXTERNALSYM ERROR_LOGON_NOT_GRANTED}
-
-//
-// MessageId: ERROR_TOO_MANY_SECRETS
-//
-// MessageText:
-//
-// The maximum number of secrets that may be stored in a single system has been exceeded.
-//
- ERROR_TOO_MANY_SECRETS = DWORD(1381);
- {$EXTERNALSYM ERROR_TOO_MANY_SECRETS}
-
-//
-// MessageId: ERROR_SECRET_TOO_LONG
-//
-// MessageText:
-//
-// The length of a secret exceeds the maximum length allowed.
-//
- ERROR_SECRET_TOO_LONG = DWORD(1382);
- {$EXTERNALSYM ERROR_SECRET_TOO_LONG}
-
-//
-// MessageId: ERROR_INTERNAL_DB_ERROR
-//
-// MessageText:
-//
-// The local security authority database contains an internal inconsistency.
-//
- ERROR_INTERNAL_DB_ERROR = DWORD(1383);
- {$EXTERNALSYM ERROR_INTERNAL_DB_ERROR}
-
-//
-// MessageId: ERROR_TOO_MANY_CONTEXT_IDS
-//
-// MessageText:
-//
-// During a logon attempt, the user's security context accumulated too many security IDs.
-//
- ERROR_TOO_MANY_CONTEXT_IDS = DWORD(1384);
- {$EXTERNALSYM ERROR_TOO_MANY_CONTEXT_IDS}
-
-//
-// MessageId: ERROR_LOGON_TYPE_NOT_GRANTED
-//
-// MessageText:
-//
-// Logon failure: the user has not been granted the requested logon type at this computer.
-//
- ERROR_LOGON_TYPE_NOT_GRANTED = DWORD(1385);
- {$EXTERNALSYM ERROR_LOGON_TYPE_NOT_GRANTED}
-
-//
-// MessageId: ERROR_NT_CROSS_ENCRYPTION_REQUIRED
-//
-// MessageText:
-//
-// A cross-encrypted password is necessary to change a user password.
-//
- ERROR_NT_CROSS_ENCRYPTION_REQUIRED = DWORD(1386);
- {$EXTERNALSYM ERROR_NT_CROSS_ENCRYPTION_REQUIRED}
-
-//
-// MessageId: ERROR_NO_SUCH_MEMBER
-//
-// MessageText:
-//
-// A member could not be added to or removed from the local group because the member does not exist.
-//
- ERROR_NO_SUCH_MEMBER = DWORD(1387);
- {$EXTERNALSYM ERROR_NO_SUCH_MEMBER}
-
-//
-// MessageId: ERROR_INVALID_MEMBER
-//
-// MessageText:
-//
-// A new member could not be added to a local group because the member has the wrong account type.
-//
- ERROR_INVALID_MEMBER = DWORD(1388);
- {$EXTERNALSYM ERROR_INVALID_MEMBER}
-
-//
-// MessageId: ERROR_TOO_MANY_SIDS
-//
-// MessageText:
-//
-// Too many security IDs have been specified.
-//
- ERROR_TOO_MANY_SIDS = DWORD(1389);
- {$EXTERNALSYM ERROR_TOO_MANY_SIDS}
-
-//
-// MessageId: ERROR_LM_CROSS_ENCRYPTION_REQUIRED
-//
-// MessageText:
-//
-// A cross-encrypted password is necessary to change this user password.
-//
- ERROR_LM_CROSS_ENCRYPTION_REQUIRED = DWORD(1390);
- {$EXTERNALSYM ERROR_LM_CROSS_ENCRYPTION_REQUIRED}
-
-//
-// MessageId: ERROR_NO_INHERITANCE
-//
-// MessageText:
-//
-// Indicates an ACL contains no inheritable components.
-//
- ERROR_NO_INHERITANCE = DWORD(1391);
- {$EXTERNALSYM ERROR_NO_INHERITANCE}
-
-//
-// MessageId: ERROR_FILE_CORRUPT
-//
-// MessageText:
-//
-// The file or directory is corrupted and unreadable.
-//
- ERROR_FILE_CORRUPT = DWORD(1392);
- {$EXTERNALSYM ERROR_FILE_CORRUPT}
-
-//
-// MessageId: ERROR_DISK_CORRUPT
-//
-// MessageText:
-//
-// The disk structure is corrupted and unreadable.
-//
- ERROR_DISK_CORRUPT = DWORD(1393);
- {$EXTERNALSYM ERROR_DISK_CORRUPT}
-
-//
-// MessageId: ERROR_NO_USER_SESSION_KEY
-//
-// MessageText:
-//
-// There is no user session key for the specified logon session.
-//
- ERROR_NO_USER_SESSION_KEY = DWORD(1394);
- {$EXTERNALSYM ERROR_NO_USER_SESSION_KEY}
-
-//
-// MessageId: ERROR_LICENSE_QUOTA_EXCEEDED
-//
-// MessageText:
-//
-// The service being accessed is licensed for a particular number of connections.
-// No more connections can be made to the service at this time because there are already as many connections as the service can accept.
-//
- ERROR_LICENSE_QUOTA_EXCEEDED = DWORD(1395);
- {$EXTERNALSYM ERROR_LICENSE_QUOTA_EXCEEDED}
-
-//
-// MessageId: ERROR_WRONG_TARGET_NAME
-//
-// MessageText:
-//
-// Logon Failure: The target account name is incorrect.
-//
- ERROR_WRONG_TARGET_NAME = DWORD(1396);
- {$EXTERNALSYM ERROR_WRONG_TARGET_NAME}
-
-//
-// MessageId: ERROR_MUTUAL_AUTH_FAILED
-//
-// MessageText:
-//
-// Mutual Authentication failed. The server's password is out of date at the domain controller.
-//
- ERROR_MUTUAL_AUTH_FAILED = DWORD(1397);
- {$EXTERNALSYM ERROR_MUTUAL_AUTH_FAILED}
-
-//
-// MessageId: ERROR_TIME_SKEW
-//
-// MessageText:
-//
-// There is a time and/or date difference between the client and server.
-//
- ERROR_TIME_SKEW = DWORD(1398);
- {$EXTERNALSYM ERROR_TIME_SKEW}
-
-//
-// MessageId: ERROR_CURRENT_DOMAIN_NOT_ALLOWED
-//
-// MessageText:
-//
-// This operation can not be performed on the current domain.
-//
- ERROR_CURRENT_DOMAIN_NOT_ALLOWED = DWORD(1399);
- {$EXTERNALSYM ERROR_CURRENT_DOMAIN_NOT_ALLOWED}
-
-// End of security error codes
-
-
-///////////////////////////
-// //
-// WinUser Error Codes //
-// //
-///////////////////////////
-
-//
-// MessageId: ERROR_INVALID_WINDOW_HANDLE
-//
-// MessageText:
-//
-// Invalid window handle.
-//
- ERROR_INVALID_WINDOW_HANDLE = DWORD(1400);
- {$EXTERNALSYM ERROR_INVALID_WINDOW_HANDLE}
-
-//
-// MessageId: ERROR_INVALID_MENU_HANDLE
-//
-// MessageText:
-//
-// Invalid menu handle.
-//
- ERROR_INVALID_MENU_HANDLE = DWORD(1401);
- {$EXTERNALSYM ERROR_INVALID_MENU_HANDLE}
-
-//
-// MessageId: ERROR_INVALID_CURSOR_HANDLE
-//
-// MessageText:
-//
-// Invalid cursor handle.
-//
- ERROR_INVALID_CURSOR_HANDLE = DWORD(1402);
- {$EXTERNALSYM ERROR_INVALID_CURSOR_HANDLE}
-
-//
-// MessageId: ERROR_INVALID_ACCEL_HANDLE
-//
-// MessageText:
-//
-// Invalid accelerator table handle.
-//
- ERROR_INVALID_ACCEL_HANDLE = DWORD(1403);
- {$EXTERNALSYM ERROR_INVALID_ACCEL_HANDLE}
-
-//
-// MessageId: ERROR_INVALID_HOOK_HANDLE
-//
-// MessageText:
-//
-// Invalid hook handle.
-//
- ERROR_INVALID_HOOK_HANDLE = DWORD(1404);
- {$EXTERNALSYM ERROR_INVALID_HOOK_HANDLE}
-
-//
-// MessageId: ERROR_INVALID_DWP_HANDLE
-//
-// MessageText:
-//
-// Invalid handle to a multiple-window position structure.
-//
- ERROR_INVALID_DWP_HANDLE = DWORD(1405);
- {$EXTERNALSYM ERROR_INVALID_DWP_HANDLE}
-
-//
-// MessageId: ERROR_TLW_WITH_WSCHILD
-//
-// MessageText:
-//
-// Cannot create a top-level child window.
-//
- ERROR_TLW_WITH_WSCHILD = DWORD(1406);
- {$EXTERNALSYM ERROR_TLW_WITH_WSCHILD}
-
-//
-// MessageId: ERROR_CANNOT_FIND_WND_CLASS
-//
-// MessageText:
-//
-// Cannot find window class.
-//
- ERROR_CANNOT_FIND_WND_CLASS = DWORD(1407);
- {$EXTERNALSYM ERROR_CANNOT_FIND_WND_CLASS}
-
-//
-// MessageId: ERROR_WINDOW_OF_OTHER_THREAD
-//
-// MessageText:
-//
-// Invalid window; it belongs to other thread.
-//
- ERROR_WINDOW_OF_OTHER_THREAD = DWORD(1408);
- {$EXTERNALSYM ERROR_WINDOW_OF_OTHER_THREAD}
-
-//
-// MessageId: ERROR_HOTKEY_ALREADY_REGISTERED
-//
-// MessageText:
-//
-// Hot key is already registered.
-//
- ERROR_HOTKEY_ALREADY_REGISTERED = DWORD(1409);
- {$EXTERNALSYM ERROR_HOTKEY_ALREADY_REGISTERED}
-
-//
-// MessageId: ERROR_CLASS_ALREADY_EXISTS
-//
-// MessageText:
-//
-// Class already exists.
-//
- ERROR_CLASS_ALREADY_EXISTS = DWORD(1410);
- {$EXTERNALSYM ERROR_CLASS_ALREADY_EXISTS}
-
-//
-// MessageId: ERROR_CLASS_DOES_NOT_EXIST
-//
-// MessageText:
-//
-// Class does not exist.
-//
- ERROR_CLASS_DOES_NOT_EXIST = DWORD(1411);
- {$EXTERNALSYM ERROR_CLASS_DOES_NOT_EXIST}
-
-//
-// MessageId: ERROR_CLASS_HAS_WINDOWS
-//
-// MessageText:
-//
-// Class still has open windows.
-//
- ERROR_CLASS_HAS_WINDOWS = DWORD(1412);
- {$EXTERNALSYM ERROR_CLASS_HAS_WINDOWS}
-
-//
-// MessageId: ERROR_INVALID_INDEX
-//
-// MessageText:
-//
-// Invalid index.
-//
- ERROR_INVALID_INDEX = DWORD(1413);
- {$EXTERNALSYM ERROR_INVALID_INDEX}
-
-//
-// MessageId: ERROR_INVALID_ICON_HANDLE
-//
-// MessageText:
-//
-// Invalid icon handle.
-//
- ERROR_INVALID_ICON_HANDLE = DWORD(1414);
- {$EXTERNALSYM ERROR_INVALID_ICON_HANDLE}
-
-//
-// MessageId: ERROR_PRIVATE_DIALOG_INDEX
-//
-// MessageText:
-//
-// Using private DIALOG window words.
-//
- ERROR_PRIVATE_DIALOG_INDEX = DWORD(1415);
- {$EXTERNALSYM ERROR_PRIVATE_DIALOG_INDEX}
-
-//
-// MessageId: ERROR_LISTBOX_ID_NOT_FOUND
-//
-// MessageText:
-//
-// The list box identifier was not found.
-//
- ERROR_LISTBOX_ID_NOT_FOUND = DWORD(1416);
- {$EXTERNALSYM ERROR_LISTBOX_ID_NOT_FOUND}
-
-//
-// MessageId: ERROR_NO_WILDCARD_CHARACTERS
-//
-// MessageText:
-//
-// No wildcards were found.
-//
- ERROR_NO_WILDCARD_CHARACTERS = DWORD(1417);
- {$EXTERNALSYM ERROR_NO_WILDCARD_CHARACTERS}
-
-//
-// MessageId: ERROR_CLIPBOARD_NOT_OPEN
-//
-// MessageText:
-//
-// Thread does not have a clipboard open.
-//
- ERROR_CLIPBOARD_NOT_OPEN = DWORD(1418);
- {$EXTERNALSYM ERROR_CLIPBOARD_NOT_OPEN}
-
-//
-// MessageId: ERROR_HOTKEY_NOT_REGISTERED
-//
-// MessageText:
-//
-// Hot key is not registered.
-//
- ERROR_HOTKEY_NOT_REGISTERED = DWORD(1419);
- {$EXTERNALSYM ERROR_HOTKEY_NOT_REGISTERED}
-
-//
-// MessageId: ERROR_WINDOW_NOT_DIALOG
-//
-// MessageText:
-//
-// The window is not a valid dialog window.
-//
- ERROR_WINDOW_NOT_DIALOG = DWORD(1420);
- {$EXTERNALSYM ERROR_WINDOW_NOT_DIALOG}
-
-//
-// MessageId: ERROR_CONTROL_ID_NOT_FOUND
-//
-// MessageText:
-//
-// Control ID not found.
-//
- ERROR_CONTROL_ID_NOT_FOUND = DWORD(1421);
- {$EXTERNALSYM ERROR_CONTROL_ID_NOT_FOUND}
-
-//
-// MessageId: ERROR_INVALID_COMBOBOX_MESSAGE
-//
-// MessageText:
-//
-// Invalid message for a combo box because it does not have an edit control.
-//
- ERROR_INVALID_COMBOBOX_MESSAGE = DWORD(1422);
- {$EXTERNALSYM ERROR_INVALID_COMBOBOX_MESSAGE}
-
-//
-// MessageId: ERROR_WINDOW_NOT_COMBOBOX
-//
-// MessageText:
-//
-// The window is not a combo box.
-//
- ERROR_WINDOW_NOT_COMBOBOX = DWORD(1423);
- {$EXTERNALSYM ERROR_WINDOW_NOT_COMBOBOX}
-
-//
-// MessageId: ERROR_INVALID_EDIT_HEIGHT
-//
-// MessageText:
-//
-// Height must be less than 256.
-//
- ERROR_INVALID_EDIT_HEIGHT = DWORD(1424);
- {$EXTERNALSYM ERROR_INVALID_EDIT_HEIGHT}
-
-//
-// MessageId: ERROR_DC_NOT_FOUND
-//
-// MessageText:
-//
-// Invalid device context (DC) handle.
-//
- ERROR_DC_NOT_FOUND = DWORD(1425);
- {$EXTERNALSYM ERROR_DC_NOT_FOUND}
-
-//
-// MessageId: ERROR_INVALID_HOOK_FILTER
-//
-// MessageText:
-//
-// Invalid hook procedure type.
-//
- ERROR_INVALID_HOOK_FILTER = DWORD(1426);
- {$EXTERNALSYM ERROR_INVALID_HOOK_FILTER}
-
-//
-// MessageId: ERROR_INVALID_FILTER_PROC
-//
-// MessageText:
-//
-// Invalid hook procedure.
-//
- ERROR_INVALID_FILTER_PROC = DWORD(1427);
- {$EXTERNALSYM ERROR_INVALID_FILTER_PROC}
-
-//
-// MessageId: ERROR_HOOK_NEEDS_HMOD
-//
-// MessageText:
-//
-// Cannot set nonlocal hook without a module handle.
-//
- ERROR_HOOK_NEEDS_HMOD = DWORD(1428);
- {$EXTERNALSYM ERROR_HOOK_NEEDS_HMOD}
-
-//
-// MessageId: ERROR_GLOBAL_ONLY_HOOK
-//
-// MessageText:
-//
-// This hook procedure can only be set globally.
-//
- ERROR_GLOBAL_ONLY_HOOK = DWORD(1429);
- {$EXTERNALSYM ERROR_GLOBAL_ONLY_HOOK}
-
-//
-// MessageId: ERROR_JOURNAL_HOOK_SET
-//
-// MessageText:
-//
-// The journal hook procedure is already installed.
-//
- ERROR_JOURNAL_HOOK_SET = DWORD(1430);
- {$EXTERNALSYM ERROR_JOURNAL_HOOK_SET}
-
-//
-// MessageId: ERROR_HOOK_NOT_INSTALLED
-//
-// MessageText:
-//
-// The hook procedure is not installed.
-//
- ERROR_HOOK_NOT_INSTALLED = DWORD(1431);
- {$EXTERNALSYM ERROR_HOOK_NOT_INSTALLED}
-
-//
-// MessageId: ERROR_INVALID_LB_MESSAGE
-//
-// MessageText:
-//
-// Invalid message for single-selection list box.
-//
- ERROR_INVALID_LB_MESSAGE = DWORD(1432);
- {$EXTERNALSYM ERROR_INVALID_LB_MESSAGE}
-
-//
-// MessageId: ERROR_SETCOUNT_ON_BAD_LB
-//
-// MessageText:
-//
-// LB_SETCOUNT sent to non-lazy list box.
-//
- ERROR_SETCOUNT_ON_BAD_LB = DWORD(1433);
- {$EXTERNALSYM ERROR_SETCOUNT_ON_BAD_LB}
-
-//
-// MessageId: ERROR_LB_WITHOUT_TABSTOPS
-//
-// MessageText:
-//
-// This list box does not support tab stops.
-//
- ERROR_LB_WITHOUT_TABSTOPS = DWORD(1434);
- {$EXTERNALSYM ERROR_LB_WITHOUT_TABSTOPS}
-
-//
-// MessageId: ERROR_DESTROY_OBJECT_OF_OTHER_THREAD
-//
-// MessageText:
-//
-// Cannot destroy object created by another thread.
-//
- ERROR_DESTROY_OBJECT_OF_OTHER_THREAD = DWORD(1435);
- {$EXTERNALSYM ERROR_DESTROY_OBJECT_OF_OTHER_THREAD}
-
-//
-// MessageId: ERROR_CHILD_WINDOW_MENU
-//
-// MessageText:
-//
-// Child windows cannot have menus.
-//
- ERROR_CHILD_WINDOW_MENU = DWORD(1436);
- {$EXTERNALSYM ERROR_CHILD_WINDOW_MENU}
-
-//
-// MessageId: ERROR_NO_SYSTEM_MENU
-//
-// MessageText:
-//
-// The window does not have a system menu.
-//
- ERROR_NO_SYSTEM_MENU = DWORD(1437);
- {$EXTERNALSYM ERROR_NO_SYSTEM_MENU}
-
-//
-// MessageId: ERROR_INVALID_MSGBOX_STYLE
-//
-// MessageText:
-//
-// Invalid message box style.
-//
- ERROR_INVALID_MSGBOX_STYLE = DWORD(1438);
- {$EXTERNALSYM ERROR_INVALID_MSGBOX_STYLE}
-
-//
-// MessageId: ERROR_INVALID_SPI_VALUE
-//
-// MessageText:
-//
-// Invalid system-wide (SPI_*) parameter.
-//
- ERROR_INVALID_SPI_VALUE = DWORD(1439);
- {$EXTERNALSYM ERROR_INVALID_SPI_VALUE}
-
-//
-// MessageId: ERROR_SCREEN_ALREADY_LOCKED
-//
-// MessageText:
-//
-// Screen already locked.
-//
- ERROR_SCREEN_ALREADY_LOCKED = DWORD(1440);
- {$EXTERNALSYM ERROR_SCREEN_ALREADY_LOCKED}
-
-//
-// MessageId: ERROR_HWNDS_HAVE_DIFF_PARENT
-//
-// MessageText:
-//
-// All handles to windows in a multiple-window position structure must have the same parent.
-//
- ERROR_HWNDS_HAVE_DIFF_PARENT = DWORD(1441);
- {$EXTERNALSYM ERROR_HWNDS_HAVE_DIFF_PARENT}
-
-//
-// MessageId: ERROR_NOT_CHILD_WINDOW
-//
-// MessageText:
-//
-// The window is not a child window.
-//
- ERROR_NOT_CHILD_WINDOW = DWORD(1442);
- {$EXTERNALSYM ERROR_NOT_CHILD_WINDOW}
-
-//
-// MessageId: ERROR_INVALID_GW_COMMAND
-//
-// MessageText:
-//
-// Invalid GW_* command.
-//
- ERROR_INVALID_GW_COMMAND = DWORD(1443);
- {$EXTERNALSYM ERROR_INVALID_GW_COMMAND}
-
-//
-// MessageId: ERROR_INVALID_THREAD_ID
-//
-// MessageText:
-//
-// Invalid thread identifier.
-//
- ERROR_INVALID_THREAD_ID = DWORD(1444);
- {$EXTERNALSYM ERROR_INVALID_THREAD_ID}
-
-//
-// MessageId: ERROR_NON_MDICHILD_WINDOW
-//
-// MessageText:
-//
-// Cannot process a message from a window that is not a multiple document interface (MDI) window.
-//
- ERROR_NON_MDICHILD_WINDOW = DWORD(1445);
- {$EXTERNALSYM ERROR_NON_MDICHILD_WINDOW}
-
-//
-// MessageId: ERROR_POPUP_ALREADY_ACTIVE
-//
-// MessageText:
-//
-// Popup menu already active.
-//
- ERROR_POPUP_ALREADY_ACTIVE = DWORD(1446);
- {$EXTERNALSYM ERROR_POPUP_ALREADY_ACTIVE}
-
-//
-// MessageId: ERROR_NO_SCROLLBARS
-//
-// MessageText:
-//
-// The window does not have scroll bars.
-//
- ERROR_NO_SCROLLBARS = DWORD(1447);
- {$EXTERNALSYM ERROR_NO_SCROLLBARS}
-
-//
-// MessageId: ERROR_INVALID_SCROLLBAR_RANGE
-//
-// MessageText:
-//
-// Scroll bar range cannot be greater than MAXLONG.
-//
- ERROR_INVALID_SCROLLBAR_RANGE = DWORD(1448);
- {$EXTERNALSYM ERROR_INVALID_SCROLLBAR_RANGE}
-
-//
-// MessageId: ERROR_INVALID_SHOWWIN_COMMAND
-//
-// MessageText:
-//
-// Cannot show or remove the window in the way specified.
-//
- ERROR_INVALID_SHOWWIN_COMMAND = DWORD(1449);
- {$EXTERNALSYM ERROR_INVALID_SHOWWIN_COMMAND}
-
-//
-// MessageId: ERROR_NO_SYSTEM_RESOURCES
-//
-// MessageText:
-//
-// Insufficient system resources exist to complete the requested service.
-//
- ERROR_NO_SYSTEM_RESOURCES = DWORD(1450);
- {$EXTERNALSYM ERROR_NO_SYSTEM_RESOURCES}
-
-//
-// MessageId: ERROR_NONPAGED_SYSTEM_RESOURCES
-//
-// MessageText:
-//
-// Insufficient system resources exist to complete the requested service.
-//
- ERROR_NONPAGED_SYSTEM_RESOURCES = DWORD(1451);
- {$EXTERNALSYM ERROR_NONPAGED_SYSTEM_RESOURCES}
-
-//
-// MessageId: ERROR_PAGED_SYSTEM_RESOURCES
-//
-// MessageText:
-//
-// Insufficient system resources exist to complete the requested service.
-//
- ERROR_PAGED_SYSTEM_RESOURCES = DWORD(1452);
- {$EXTERNALSYM ERROR_PAGED_SYSTEM_RESOURCES}
-
-//
-// MessageId: ERROR_WORKING_SET_QUOTA
-//
-// MessageText:
-//
-// Insufficient quota to complete the requested service.
-//
- ERROR_WORKING_SET_QUOTA = DWORD(1453);
- {$EXTERNALSYM ERROR_WORKING_SET_QUOTA}
-
-//
-// MessageId: ERROR_PAGEFILE_QUOTA
-//
-// MessageText:
-//
-// Insufficient quota to complete the requested service.
-//
- ERROR_PAGEFILE_QUOTA = DWORD(1454);
- {$EXTERNALSYM ERROR_PAGEFILE_QUOTA}
-
-//
-// MessageId: ERROR_COMMITMENT_LIMIT
-//
-// MessageText:
-//
-// The paging file is too small for this operation to complete.
-//
- ERROR_COMMITMENT_LIMIT = DWORD(1455);
- {$EXTERNALSYM ERROR_COMMITMENT_LIMIT}
-
-//
-// MessageId: ERROR_MENU_ITEM_NOT_FOUND
-//
-// MessageText:
-//
-// A menu item was not found.
-//
- ERROR_MENU_ITEM_NOT_FOUND = DWORD(1456);
- {$EXTERNALSYM ERROR_MENU_ITEM_NOT_FOUND}
-
-//
-// MessageId: ERROR_INVALID_KEYBOARD_HANDLE
-//
-// MessageText:
-//
-// Invalid keyboard layout handle.
-//
- ERROR_INVALID_KEYBOARD_HANDLE = DWORD(1457);
- {$EXTERNALSYM ERROR_INVALID_KEYBOARD_HANDLE}
-
-//
-// MessageId: ERROR_HOOK_TYPE_NOT_ALLOWED
-//
-// MessageText:
-//
-// Hook type not allowed.
-//
- ERROR_HOOK_TYPE_NOT_ALLOWED = DWORD(1458);
- {$EXTERNALSYM ERROR_HOOK_TYPE_NOT_ALLOWED}
-
-//
-// MessageId: ERROR_REQUIRES_INTERACTIVE_WINDOWSTATION
-//
-// MessageText:
-//
-// This operation requires an interactive window station.
-//
- ERROR_REQUIRES_INTERACTIVE_WINDOWSTATION = DWORD(1459);
- {$EXTERNALSYM ERROR_REQUIRES_INTERACTIVE_WINDOWSTATION}
-
-//
-// MessageId: ERROR_TIMEOUT
-//
-// MessageText:
-//
-// This operation returned because the timeout period expired.
-//
- ERROR_TIMEOUT = DWORD(1460);
- {$EXTERNALSYM ERROR_TIMEOUT}
-
-//
-// MessageId: ERROR_INVALID_MONITOR_HANDLE
-//
-// MessageText:
-//
-// Invalid monitor handle.
-//
- ERROR_INVALID_MONITOR_HANDLE = DWORD(1461);
- {$EXTERNALSYM ERROR_INVALID_MONITOR_HANDLE}
-
-// End of WinUser error codes
-
-
-///////////////////////////
-// //
-// Eventlog Status Codes //
-// //
-///////////////////////////
-
-//
-// MessageId: ERROR_EVENTLOG_FILE_CORRUPT
-//
-// MessageText:
-//
-// The event log file is corrupted.
-//
- ERROR_EVENTLOG_FILE_CORRUPT = DWORD(1500);
- {$EXTERNALSYM ERROR_EVENTLOG_FILE_CORRUPT}
-
-//
-// MessageId: ERROR_EVENTLOG_CANT_START
-//
-// MessageText:
-//
-// No event log file could be opened, so the event logging service did not start.
-//
- ERROR_EVENTLOG_CANT_START = DWORD(1501);
- {$EXTERNALSYM ERROR_EVENTLOG_CANT_START}
-
-//
-// MessageId: ERROR_LOG_FILE_FULL
-//
-// MessageText:
-//
-// The event log file is full.
-//
- ERROR_LOG_FILE_FULL = DWORD(1502);
- {$EXTERNALSYM ERROR_LOG_FILE_FULL}
-
-//
-// MessageId: ERROR_EVENTLOG_FILE_CHANGED
-//
-// MessageText:
-//
-// The event log file has changed between read operations.
-//
- ERROR_EVENTLOG_FILE_CHANGED = DWORD(1503);
- {$EXTERNALSYM ERROR_EVENTLOG_FILE_CHANGED}
-
-// End of eventlog error codes
-
-
-///////////////////////////
-// //
-// MSI Error Codes //
-// //
-///////////////////////////
-
-//
-// MessageId: ERROR_INSTALL_SERVICE_FAILURE
-//
-// MessageText:
-//
-// The Windows Installer Service could not be accessed. This can occur if you are running Windows in safe mode, or if the Windows Installer is not correctly installed. Contact your support personnel for assistance.
-//
- ERROR_INSTALL_SERVICE_FAILURE = DWORD(1601);
- {$EXTERNALSYM ERROR_INSTALL_SERVICE_FAILURE}
-
-//
-// MessageId: ERROR_INSTALL_USEREXIT
-//
-// MessageText:
-//
-// User cancelled installation.
-//
- ERROR_INSTALL_USEREXIT = DWORD(1602);
- {$EXTERNALSYM ERROR_INSTALL_USEREXIT}
-
-//
-// MessageId: ERROR_INSTALL_FAILURE
-//
-// MessageText:
-//
-// Fatal error during installation.
-//
- ERROR_INSTALL_FAILURE = DWORD(1603);
- {$EXTERNALSYM ERROR_INSTALL_FAILURE}
-
-//
-// MessageId: ERROR_INSTALL_SUSPEND
-//
-// MessageText:
-//
-// Installation suspended, incomplete.
-//
- ERROR_INSTALL_SUSPEND = DWORD(1604);
- {$EXTERNALSYM ERROR_INSTALL_SUSPEND}
-
-//
-// MessageId: ERROR_UNKNOWN_PRODUCT
-//
-// MessageText:
-//
-// This action is only valid for products that are currently installed.
-//
- ERROR_UNKNOWN_PRODUCT = DWORD(1605);
- {$EXTERNALSYM ERROR_UNKNOWN_PRODUCT}
-
-//
-// MessageId: ERROR_UNKNOWN_FEATURE
-//
-// MessageText:
-//
-// Feature ID not registered.
-//
- ERROR_UNKNOWN_FEATURE = DWORD(1606);
- {$EXTERNALSYM ERROR_UNKNOWN_FEATURE}
-
-//
-// MessageId: ERROR_UNKNOWN_COMPONENT
-//
-// MessageText:
-//
-// Component ID not registered.
-//
- ERROR_UNKNOWN_COMPONENT = DWORD(1607);
- {$EXTERNALSYM ERROR_UNKNOWN_COMPONENT}
-
-//
-// MessageId: ERROR_UNKNOWN_PROPERTY
-//
-// MessageText:
-//
-// Unknown property.
-//
- ERROR_UNKNOWN_PROPERTY = DWORD(1608);
- {$EXTERNALSYM ERROR_UNKNOWN_PROPERTY}
-
-//
-// MessageId: ERROR_INVALID_HANDLE_STATE
-//
-// MessageText:
-//
-// Handle is in an invalid state.
-//
- ERROR_INVALID_HANDLE_STATE = DWORD(1609);
- {$EXTERNALSYM ERROR_INVALID_HANDLE_STATE}
-
-//
-// MessageId: ERROR_BAD_CONFIGURATION
-//
-// MessageText:
-//
-// The configuration data for this product is corrupt. Contact your support personnel.
-//
- ERROR_BAD_CONFIGURATION = DWORD(1610);
- {$EXTERNALSYM ERROR_BAD_CONFIGURATION}
-
-//
-// MessageId: ERROR_INDEX_ABSENT
-//
-// MessageText:
-//
-// Component qualifier not present.
-//
- ERROR_INDEX_ABSENT = DWORD(1611);
- {$EXTERNALSYM ERROR_INDEX_ABSENT}
-
-//
-// MessageId: ERROR_INSTALL_SOURCE_ABSENT
-//
-// MessageText:
-//
-// The installation source for this product is not available. Verify that the source exists and that you can access it.
-//
- ERROR_INSTALL_SOURCE_ABSENT = DWORD(1612);
- {$EXTERNALSYM ERROR_INSTALL_SOURCE_ABSENT}
-
-//
-// MessageId: ERROR_INSTALL_PACKAGE_VERSION
-//
-// MessageText:
-//
-// This installation package cannot be installed by the Windows Installer service. You must install a Windows service pack that contains a newer version of the Windows Installer service.
-//
- ERROR_INSTALL_PACKAGE_VERSION = DWORD(1613);
- {$EXTERNALSYM ERROR_INSTALL_PACKAGE_VERSION}
-
-//
-// MessageId: ERROR_PRODUCT_UNINSTALLED
-//
-// MessageText:
-//
-// Product is uninstalled.
-//
- ERROR_PRODUCT_UNINSTALLED = DWORD(1614);
- {$EXTERNALSYM ERROR_PRODUCT_UNINSTALLED}
-
-//
-// MessageId: ERROR_BAD_QUERY_SYNTAX
-//
-// MessageText:
-//
-// SQL query syntax invalid or unsupported.
-//
- ERROR_BAD_QUERY_SYNTAX = DWORD(1615);
- {$EXTERNALSYM ERROR_BAD_QUERY_SYNTAX}
-
-//
-// MessageId: ERROR_INVALID_FIELD
-//
-// MessageText:
-//
-// Record field does not exist.
-//
- ERROR_INVALID_FIELD = DWORD(1616);
- {$EXTERNALSYM ERROR_INVALID_FIELD}
-
-//
-// MessageId: ERROR_DEVICE_REMOVED
-//
-// MessageText:
-//
-// The device has been removed.
-//
- ERROR_DEVICE_REMOVED = DWORD(1617);
- {$EXTERNALSYM ERROR_DEVICE_REMOVED}
-
-//
-// MessageId: ERROR_INSTALL_ALREADY_RUNNING
-//
-// MessageText:
-//
-// Another installation is already in progress. Complete that installation before proceeding with this install.
-//
- ERROR_INSTALL_ALREADY_RUNNING = DWORD(1618);
- {$EXTERNALSYM ERROR_INSTALL_ALREADY_RUNNING}
-
-//
-// MessageId: ERROR_INSTALL_PACKAGE_OPEN_FAILED
-//
-// MessageText:
-//
-// This installation package could not be opened. Verify that the package exists and that you can access it, or contact the application vendor to verify that this is a valid Windows Installer package.
-//
- ERROR_INSTALL_PACKAGE_OPEN_FAILED = DWORD(1619);
- {$EXTERNALSYM ERROR_INSTALL_PACKAGE_OPEN_FAILED}
-
-//
-// MessageId: ERROR_INSTALL_PACKAGE_INVALID
-//
-// MessageText:
-//
-// This installation package could not be opened. Contact the application vendor to verify that this is a valid Windows Installer package.
-//
- ERROR_INSTALL_PACKAGE_INVALID = DWORD(1620);
- {$EXTERNALSYM ERROR_INSTALL_PACKAGE_INVALID}
-
-//
-// MessageId: ERROR_INSTALL_UI_FAILURE
-//
-// MessageText:
-//
-// There was an error starting the Windows Installer service user interface. Contact your support personnel.
-//
- ERROR_INSTALL_UI_FAILURE = DWORD(1621);
- {$EXTERNALSYM ERROR_INSTALL_UI_FAILURE}
-
-//
-// MessageId: ERROR_INSTALL_LOG_FAILURE
-//
-// MessageText:
-//
-// Error opening installation log file. Verify that the specified log file location exists and that you can write to it.
-//
- ERROR_INSTALL_LOG_FAILURE = DWORD(1622);
- {$EXTERNALSYM ERROR_INSTALL_LOG_FAILURE}
-
-//
-// MessageId: ERROR_INSTALL_LANGUAGE_UNSUPPORTED
-//
-// MessageText:
-//
-// The language of this installation package is not supported by your system.
-//
- ERROR_INSTALL_LANGUAGE_UNSUPPORTED = DWORD(1623);
- {$EXTERNALSYM ERROR_INSTALL_LANGUAGE_UNSUPPORTED}
-
-//
-// MessageId: ERROR_INSTALL_TRANSFORM_FAILURE
-//
-// MessageText:
-//
-// Error applying transforms. Verify that the specified transform paths are valid.
-//
- ERROR_INSTALL_TRANSFORM_FAILURE = DWORD(1624);
- {$EXTERNALSYM ERROR_INSTALL_TRANSFORM_FAILURE}
-
-//
-// MessageId: ERROR_INSTALL_PACKAGE_REJECTED
-//
-// MessageText:
-//
-// This installation is forbidden by system policy. Contact your system administrator.
-//
- ERROR_INSTALL_PACKAGE_REJECTED = DWORD(1625);
- {$EXTERNALSYM ERROR_INSTALL_PACKAGE_REJECTED}
-
-//
-// MessageId: ERROR_FUNCTION_NOT_CALLED
-//
-// MessageText:
-//
-// Function could not be executed.
-//
- ERROR_FUNCTION_NOT_CALLED = DWORD(1626);
- {$EXTERNALSYM ERROR_FUNCTION_NOT_CALLED}
-
-//
-// MessageId: ERROR_FUNCTION_FAILED
-//
-// MessageText:
-//
-// Function failed during execution.
-//
- ERROR_FUNCTION_FAILED = DWORD(1627);
- {$EXTERNALSYM ERROR_FUNCTION_FAILED}
-
-//
-// MessageId: ERROR_INVALID_TABLE
-//
-// MessageText:
-//
-// Invalid or unknown table specified.
-//
- ERROR_INVALID_TABLE = DWORD(1628);
- {$EXTERNALSYM ERROR_INVALID_TABLE}
-
-//
-// MessageId: ERROR_DATATYPE_MISMATCH
-//
-// MessageText:
-//
-// Data supplied is of wrong type.
-//
- ERROR_DATATYPE_MISMATCH = DWORD(1629);
- {$EXTERNALSYM ERROR_DATATYPE_MISMATCH}
-
-//
-// MessageId: ERROR_UNSUPPORTED_TYPE
-//
-// MessageText:
-//
-// Data of this type is not supported.
-//
- ERROR_UNSUPPORTED_TYPE = DWORD(1630);
- {$EXTERNALSYM ERROR_UNSUPPORTED_TYPE}
-
-//
-// MessageId: ERROR_CREATE_FAILED
-//
-// MessageText:
-//
-// The Windows Installer service failed to start. Contact your support personnel.
-//
- ERROR_CREATE_FAILED = DWORD(1631);
- {$EXTERNALSYM ERROR_CREATE_FAILED}
-
-//
-// MessageId: ERROR_INSTALL_TEMP_UNWRITABLE
-//
-// MessageText:
-//
-// The Temp folder is on a drive that is full or is inaccessible. Free up space on the drive or verify that you have write permission on the Temp folder.
-//
- ERROR_INSTALL_TEMP_UNWRITABLE = DWORD(1632);
- {$EXTERNALSYM ERROR_INSTALL_TEMP_UNWRITABLE}
-
-//
-// MessageId: ERROR_INSTALL_PLATFORM_UNSUPPORTED
-//
-// MessageText:
-//
-// This installation package is not supported by this processor type. Contact your product vendor.
-//
- ERROR_INSTALL_PLATFORM_UNSUPPORTED = DWORD(1633);
- {$EXTERNALSYM ERROR_INSTALL_PLATFORM_UNSUPPORTED}
-
-//
-// MessageId: ERROR_INSTALL_NOTUSED
-//
-// MessageText:
-//
-// Component not used on this computer.
-//
- ERROR_INSTALL_NOTUSED = DWORD(1634);
- {$EXTERNALSYM ERROR_INSTALL_NOTUSED}
-
-//
-// MessageId: ERROR_PATCH_PACKAGE_OPEN_FAILED
-//
-// MessageText:
-//
-// This patch package could not be opened. Verify that the patch package exists and that you can access it, or contact the application vendor to verify that this is a valid Windows Installer patch package.
-//
- ERROR_PATCH_PACKAGE_OPEN_FAILED = DWORD(1635);
- {$EXTERNALSYM ERROR_PATCH_PACKAGE_OPEN_FAILED}
-
-//
-// MessageId: ERROR_PATCH_PACKAGE_INVALID
-//
-// MessageText:
-//
-// This patch package could not be opened. Contact the application vendor to verify that this is a valid Windows Installer patch package.
-//
- ERROR_PATCH_PACKAGE_INVALID = DWORD(1636);
- {$EXTERNALSYM ERROR_PATCH_PACKAGE_INVALID}
-
-//
-// MessageId: ERROR_PATCH_PACKAGE_UNSUPPORTED
-//
-// MessageText:
-//
-// This patch package cannot be processed by the Windows Installer service. You must install a Windows service pack that contains a newer version of the Windows Installer service.
-//
- ERROR_PATCH_PACKAGE_UNSUPPORTED = DWORD(1637);
- {$EXTERNALSYM ERROR_PATCH_PACKAGE_UNSUPPORTED}
-
-//
-// MessageId: ERROR_PRODUCT_VERSION
-//
-// MessageText:
-//
-// Another version of this product is already installed. Installation of this version cannot continue. To configure or remove the existing version of this product, use Add/Remove Programs on the Control Panel.
-//
- ERROR_PRODUCT_VERSION = DWORD(1638);
- {$EXTERNALSYM ERROR_PRODUCT_VERSION}
-
-//
-// MessageId: ERROR_INVALID_COMMAND_LINE
-//
-// MessageText:
-//
-// Invalid command line argument. Consult the Windows Installer SDK for detailed command line help.
-//
- ERROR_INVALID_COMMAND_LINE = DWORD(1639);
- {$EXTERNALSYM ERROR_INVALID_COMMAND_LINE}
-
-//
-// MessageId: ERROR_INSTALL_REMOTE_DISALLOWED
-//
-// MessageText:
-//
-// Only administrators have permission to add, remove, or configure server software during a Terminal services remote session. If you want to install or configure software on the server, contact your network administrator.
-//
- ERROR_INSTALL_REMOTE_DISALLOWED = DWORD(1640);
- {$EXTERNALSYM ERROR_INSTALL_REMOTE_DISALLOWED}
-
-//
-// MessageId: ERROR_SUCCESS_REBOOT_INITIATED
-//
-// MessageText:
-//
-// The requested operation completed successfully. The system will be restarted so the changes can take effect.
-//
- ERROR_SUCCESS_REBOOT_INITIATED = DWORD(1641);
- {$EXTERNALSYM ERROR_SUCCESS_REBOOT_INITIATED}
-
-//
-// MessageId: ERROR_PATCH_TARGET_NOT_FOUND
-//
-// MessageText:
-//
-// The upgrade patch cannot be installed by the Windows Installer service because the program to be upgraded may be missing, or the upgrade patch may update a different version of the program. Verify that the program to be upgraded exists on your computer an
-// d that you have the correct upgrade patch.
-//
- ERROR_PATCH_TARGET_NOT_FOUND = DWORD(1642);
- {$EXTERNALSYM ERROR_PATCH_TARGET_NOT_FOUND}
-
-//
-// MessageId: ERROR_PATCH_PACKAGE_REJECTED
-//
-// MessageText:
-//
-// The patch package is not permitted by software restriction policy.
-//
- ERROR_PATCH_PACKAGE_REJECTED = DWORD(1643);
- {$EXTERNALSYM ERROR_PATCH_PACKAGE_REJECTED}
-
-//
-// MessageId: ERROR_INSTALL_TRANSFORM_REJECTED
-//
-// MessageText:
-//
-// One or more customizations are not permitted by software restriction policy.
-//
- ERROR_INSTALL_TRANSFORM_REJECTED = DWORD(1644);
- {$EXTERNALSYM ERROR_INSTALL_TRANSFORM_REJECTED}
-
-//
-// MessageId: ERROR_INSTALL_REMOTE_PROHIBITED
-//
-// MessageText:
-//
-// The Windows Installer does not permit installation from a Remote Desktop Connection.
-//
- ERROR_INSTALL_REMOTE_PROHIBITED = DWORD(1645);
- {$EXTERNALSYM ERROR_INSTALL_REMOTE_PROHIBITED}
-
-// End of MSI error codes
-
-
-///////////////////////////
-// //
-// RPC Status Codes //
-// //
-///////////////////////////
-
-//
-// MessageId: RPC_S_INVALID_STRING_BINDING
-//
-// MessageText:
-//
-// The string binding is invalid.
-//
- RPC_S_INVALID_STRING_BINDING = DWORD(1700);
- {$EXTERNALSYM RPC_S_INVALID_STRING_BINDING}
-
-//
-// MessageId: RPC_S_WRONG_KIND_OF_BINDING
-//
-// MessageText:
-//
-// The binding handle is not the correct type.
-//
- RPC_S_WRONG_KIND_OF_BINDING = DWORD(1701);
- {$EXTERNALSYM RPC_S_WRONG_KIND_OF_BINDING}
-
-//
-// MessageId: RPC_S_INVALID_BINDING
-//
-// MessageText:
-//
-// The binding handle is invalid.
-//
- RPC_S_INVALID_BINDING = DWORD(1702);
- {$EXTERNALSYM RPC_S_INVALID_BINDING}
-
-//
-// MessageId: RPC_S_PROTSEQ_NOT_SUPPORTED
-//
-// MessageText:
-//
-// The RPC protocol sequence is not supported.
-//
- RPC_S_PROTSEQ_NOT_SUPPORTED = DWORD(1703);
- {$EXTERNALSYM RPC_S_PROTSEQ_NOT_SUPPORTED}
-
-//
-// MessageId: RPC_S_INVALID_RPC_PROTSEQ
-//
-// MessageText:
-//
-// The RPC protocol sequence is invalid.
-//
- RPC_S_INVALID_RPC_PROTSEQ = DWORD(1704);
- {$EXTERNALSYM RPC_S_INVALID_RPC_PROTSEQ}
-
-//
-// MessageId: RPC_S_INVALID_STRING_UUID
-//
-// MessageText:
-//
-// The string universal unique identifier (UUID) is invalid.
-//
- RPC_S_INVALID_STRING_UUID = DWORD(1705);
- {$EXTERNALSYM RPC_S_INVALID_STRING_UUID}
-
-//
-// MessageId: RPC_S_INVALID_ENDPOINT_FORMAT
-//
-// MessageText:
-//
-// The endpoint format is invalid.
-//
- RPC_S_INVALID_ENDPOINT_FORMAT = DWORD(1706);
- {$EXTERNALSYM RPC_S_INVALID_ENDPOINT_FORMAT}
-
-//
-// MessageId: RPC_S_INVALID_NET_ADDR
-//
-// MessageText:
-//
-// The network address is invalid.
-//
- RPC_S_INVALID_NET_ADDR = DWORD(1707);
- {$EXTERNALSYM RPC_S_INVALID_NET_ADDR}
-
-//
-// MessageId: RPC_S_NO_ENDPOINT_FOUND
-//
-// MessageText:
-//
-// No endpoint was found.
-//
- RPC_S_NO_ENDPOINT_FOUND = DWORD(1708);
- {$EXTERNALSYM RPC_S_NO_ENDPOINT_FOUND}
-
-//
-// MessageId: RPC_S_INVALID_TIMEOUT
-//
-// MessageText:
-//
-// The timeout value is invalid.
-//
- RPC_S_INVALID_TIMEOUT = DWORD(1709);
- {$EXTERNALSYM RPC_S_INVALID_TIMEOUT}
-
-//
-// MessageId: RPC_S_OBJECT_NOT_FOUND
-//
-// MessageText:
-//
-// The object universal unique identifier (UUID) was not found.
-//
- RPC_S_OBJECT_NOT_FOUND = DWORD(1710);
- {$EXTERNALSYM RPC_S_OBJECT_NOT_FOUND}
-
-//
-// MessageId: RPC_S_ALREADY_REGISTERED
-//
-// MessageText:
-//
-// The object universal unique identifier (UUID) has already been registered.
-//
- RPC_S_ALREADY_REGISTERED = DWORD(1711);
- {$EXTERNALSYM RPC_S_ALREADY_REGISTERED}
-
-//
-// MessageId: RPC_S_TYPE_ALREADY_REGISTERED
-//
-// MessageText:
-//
-// The type universal unique identifier (UUID) has already been registered.
-//
- RPC_S_TYPE_ALREADY_REGISTERED = DWORD(1712);
- {$EXTERNALSYM RPC_S_TYPE_ALREADY_REGISTERED}
-
-//
-// MessageId: RPC_S_ALREADY_LISTENING
-//
-// MessageText:
-//
-// The RPC server is already listening.
-//
- RPC_S_ALREADY_LISTENING = DWORD(1713);
- {$EXTERNALSYM RPC_S_ALREADY_LISTENING}
-
-//
-// MessageId: RPC_S_NO_PROTSEQS_REGISTERED
-//
-// MessageText:
-//
-// No protocol sequences have been registered.
-//
- RPC_S_NO_PROTSEQS_REGISTERED = DWORD(1714);
- {$EXTERNALSYM RPC_S_NO_PROTSEQS_REGISTERED}
-
-//
-// MessageId: RPC_S_NOT_LISTENING
-//
-// MessageText:
-//
-// The RPC server is not listening.
-//
- RPC_S_NOT_LISTENING = DWORD(1715);
- {$EXTERNALSYM RPC_S_NOT_LISTENING}
-
-//
-// MessageId: RPC_S_UNKNOWN_MGR_TYPE
-//
-// MessageText:
-//
-// The manager type is unknown.
-//
- RPC_S_UNKNOWN_MGR_TYPE = DWORD(1716);
- {$EXTERNALSYM RPC_S_UNKNOWN_MGR_TYPE}
-
-//
-// MessageId: RPC_S_UNKNOWN_IF
-//
-// MessageText:
-//
-// The interface is unknown.
-//
- RPC_S_UNKNOWN_IF = DWORD(1717);
- {$EXTERNALSYM RPC_S_UNKNOWN_IF}
-
-//
-// MessageId: RPC_S_NO_BINDINGS
-//
-// MessageText:
-//
-// There are no bindings.
-//
- RPC_S_NO_BINDINGS = DWORD(1718);
- {$EXTERNALSYM RPC_S_NO_BINDINGS}
-
-//
-// MessageId: RPC_S_NO_PROTSEQS
-//
-// MessageText:
-//
-// There are no protocol sequences.
-//
- RPC_S_NO_PROTSEQS = DWORD(1719);
- {$EXTERNALSYM RPC_S_NO_PROTSEQS}
-
-//
-// MessageId: RPC_S_CANT_CREATE_ENDPOINT
-//
-// MessageText:
-//
-// The endpoint cannot be created.
-//
- RPC_S_CANT_CREATE_ENDPOINT = DWORD(1720);
- {$EXTERNALSYM RPC_S_CANT_CREATE_ENDPOINT}
-
-//
-// MessageId: RPC_S_OUT_OF_RESOURCES
-//
-// MessageText:
-//
-// Not enough resources are available to complete this operation.
-//
- RPC_S_OUT_OF_RESOURCES = DWORD(1721);
- {$EXTERNALSYM RPC_S_OUT_OF_RESOURCES}
-
-//
-// MessageId: RPC_S_SERVER_UNAVAILABLE
-//
-// MessageText:
-//
-// The RPC server is unavailable.
-//
- RPC_S_SERVER_UNAVAILABLE = DWORD(1722);
- {$EXTERNALSYM RPC_S_SERVER_UNAVAILABLE}
-
-//
-// MessageId: RPC_S_SERVER_TOO_BUSY
-//
-// MessageText:
-//
-// The RPC server is too busy to complete this operation.
-//
- RPC_S_SERVER_TOO_BUSY = DWORD(1723);
- {$EXTERNALSYM RPC_S_SERVER_TOO_BUSY}
-
-//
-// MessageId: RPC_S_INVALID_NETWORK_OPTIONS
-//
-// MessageText:
-//
-// The network options are invalid.
-//
- RPC_S_INVALID_NETWORK_OPTIONS = DWORD(1724);
- {$EXTERNALSYM RPC_S_INVALID_NETWORK_OPTIONS}
-
-//
-// MessageId: RPC_S_NO_CALL_ACTIVE
-//
-// MessageText:
-//
-// There are no remote procedure calls active on this thread.
-//
- RPC_S_NO_CALL_ACTIVE = DWORD(1725);
- {$EXTERNALSYM RPC_S_NO_CALL_ACTIVE}
-
-//
-// MessageId: RPC_S_CALL_FAILED
-//
-// MessageText:
-//
-// The remote procedure call failed.
-//
- RPC_S_CALL_FAILED = DWORD(1726);
- {$EXTERNALSYM RPC_S_CALL_FAILED}
-
-//
-// MessageId: RPC_S_CALL_FAILED_DNE
-//
-// MessageText:
-//
-// The remote procedure call failed and did not execute.
-//
- RPC_S_CALL_FAILED_DNE = DWORD(1727);
- {$EXTERNALSYM RPC_S_CALL_FAILED_DNE}
-
-//
-// MessageId: RPC_S_PROTOCOL_ERROR
-//
-// MessageText:
-//
-// A remote procedure call (RPC) protocol error occurred.
-//
- RPC_S_PROTOCOL_ERROR = DWORD(1728);
- {$EXTERNALSYM RPC_S_PROTOCOL_ERROR}
-
-//
-// MessageId: RPC_S_UNSUPPORTED_TRANS_SYN
-//
-// MessageText:
-//
-// The transfer syntax is not supported by the RPC server.
-//
- RPC_S_UNSUPPORTED_TRANS_SYN = DWORD(1730);
- {$EXTERNALSYM RPC_S_UNSUPPORTED_TRANS_SYN}
-
-//
-// MessageId: RPC_S_UNSUPPORTED_TYPE
-//
-// MessageText:
-//
-// The universal unique identifier (UUID) type is not supported.
-//
- RPC_S_UNSUPPORTED_TYPE = DWORD(1732);
- {$EXTERNALSYM RPC_S_UNSUPPORTED_TYPE}
-
-//
-// MessageId: RPC_S_INVALID_TAG
-//
-// MessageText:
-//
-// The tag is invalid.
-//
- RPC_S_INVALID_TAG = DWORD(1733);
- {$EXTERNALSYM RPC_S_INVALID_TAG}
-
-//
-// MessageId: RPC_S_INVALID_BOUND
-//
-// MessageText:
-//
-// The array bounds are invalid.
-//
- RPC_S_INVALID_BOUND = DWORD(1734);
- {$EXTERNALSYM RPC_S_INVALID_BOUND}
-
-//
-// MessageId: RPC_S_NO_ENTRY_NAME
-//
-// MessageText:
-//
-// The binding does not contain an entry name.
-//
- RPC_S_NO_ENTRY_NAME = DWORD(1735);
- {$EXTERNALSYM RPC_S_NO_ENTRY_NAME}
-
-//
-// MessageId: RPC_S_INVALID_NAME_SYNTAX
-//
-// MessageText:
-//
-// The name syntax is invalid.
-//
- RPC_S_INVALID_NAME_SYNTAX = DWORD(1736);
- {$EXTERNALSYM RPC_S_INVALID_NAME_SYNTAX}
-
-//
-// MessageId: RPC_S_UNSUPPORTED_NAME_SYNTAX
-//
-// MessageText:
-//
-// The name syntax is not supported.
-//
- RPC_S_UNSUPPORTED_NAME_SYNTAX = DWORD(1737);
- {$EXTERNALSYM RPC_S_UNSUPPORTED_NAME_SYNTAX}
-
-//
-// MessageId: RPC_S_UUID_NO_ADDRESS
-//
-// MessageText:
-//
-// No network address is available to use to construct a universal unique identifier (UUID).
-//
- RPC_S_UUID_NO_ADDRESS = DWORD(1739);
- {$EXTERNALSYM RPC_S_UUID_NO_ADDRESS}
-
-//
-// MessageId: RPC_S_DUPLICATE_ENDPOINT
-//
-// MessageText:
-//
-// The endpoint is a duplicate.
-//
- RPC_S_DUPLICATE_ENDPOINT = DWORD(1740);
- {$EXTERNALSYM RPC_S_DUPLICATE_ENDPOINT}
-
-//
-// MessageId: RPC_S_UNKNOWN_AUTHN_TYPE
-//
-// MessageText:
-//
-// The authentication type is unknown.
-//
- RPC_S_UNKNOWN_AUTHN_TYPE = DWORD(1741);
- {$EXTERNALSYM RPC_S_UNKNOWN_AUTHN_TYPE}
-
-//
-// MessageId: RPC_S_MAX_CALLS_TOO_SMALL
-//
-// MessageText:
-//
-// The maximum number of calls is too small.
-//
- RPC_S_MAX_CALLS_TOO_SMALL = DWORD(1742);
- {$EXTERNALSYM RPC_S_MAX_CALLS_TOO_SMALL}
-
-//
-// MessageId: RPC_S_STRING_TOO_LONG
-//
-// MessageText:
-//
-// The string is too long.
-//
- RPC_S_STRING_TOO_LONG = DWORD(1743);
- {$EXTERNALSYM RPC_S_STRING_TOO_LONG}
-
-//
-// MessageId: RPC_S_PROTSEQ_NOT_FOUND
-//
-// MessageText:
-//
-// The RPC protocol sequence was not found.
-//
- RPC_S_PROTSEQ_NOT_FOUND = DWORD(1744);
- {$EXTERNALSYM RPC_S_PROTSEQ_NOT_FOUND}
-
-//
-// MessageId: RPC_S_PROCNUM_OUT_OF_RANGE
-//
-// MessageText:
-//
-// The procedure number is out of range.
-//
- RPC_S_PROCNUM_OUT_OF_RANGE = DWORD(1745);
- {$EXTERNALSYM RPC_S_PROCNUM_OUT_OF_RANGE}
-
-//
-// MessageId: RPC_S_BINDING_HAS_NO_AUTH
-//
-// MessageText:
-//
-// The binding does not contain any authentication information.
-//
- RPC_S_BINDING_HAS_NO_AUTH = DWORD(1746);
- {$EXTERNALSYM RPC_S_BINDING_HAS_NO_AUTH}
-
-//
-// MessageId: RPC_S_UNKNOWN_AUTHN_SERVICE
-//
-// MessageText:
-//
-// The authentication service is unknown.
-//
- RPC_S_UNKNOWN_AUTHN_SERVICE = DWORD(1747);
- {$EXTERNALSYM RPC_S_UNKNOWN_AUTHN_SERVICE}
-
-//
-// MessageId: RPC_S_UNKNOWN_AUTHN_LEVEL
-//
-// MessageText:
-//
-// The authentication level is unknown.
-//
- RPC_S_UNKNOWN_AUTHN_LEVEL = DWORD(1748);
- {$EXTERNALSYM RPC_S_UNKNOWN_AUTHN_LEVEL}
-
-//
-// MessageId: RPC_S_INVALID_AUTH_IDENTITY
-//
-// MessageText:
-//
-// The security context is invalid.
-//
- RPC_S_INVALID_AUTH_IDENTITY = DWORD(1749);
- {$EXTERNALSYM RPC_S_INVALID_AUTH_IDENTITY}
-
-//
-// MessageId: RPC_S_UNKNOWN_AUTHZ_SERVICE
-//
-// MessageText:
-//
-// The authorization service is unknown.
-//
- RPC_S_UNKNOWN_AUTHZ_SERVICE = DWORD(1750);
- {$EXTERNALSYM RPC_S_UNKNOWN_AUTHZ_SERVICE}
-
-//
-// MessageId: EPT_S_INVALID_ENTRY
-//
-// MessageText:
-//
-// The entry is invalid.
-//
- EPT_S_INVALID_ENTRY = DWORD(1751);
- {$EXTERNALSYM EPT_S_INVALID_ENTRY}
-
-//
-// MessageId: EPT_S_CANT_PERFORM_OP
-//
-// MessageText:
-//
-// The server endpoint cannot perform the operation.
-//
- EPT_S_CANT_PERFORM_OP = DWORD(1752);
- {$EXTERNALSYM EPT_S_CANT_PERFORM_OP}
-
-//
-// MessageId: EPT_S_NOT_REGISTERED
-//
-// MessageText:
-//
-// There are no more endpoints available from the endpoint mapper.
-//
- EPT_S_NOT_REGISTERED = DWORD(1753);
- {$EXTERNALSYM EPT_S_NOT_REGISTERED}
-
-//
-// MessageId: RPC_S_NOTHING_TO_EXPORT
-//
-// MessageText:
-//
-// No interfaces have been exported.
-//
- RPC_S_NOTHING_TO_EXPORT = DWORD(1754);
- {$EXTERNALSYM RPC_S_NOTHING_TO_EXPORT}
-
-//
-// MessageId: RPC_S_INCOMPLETE_NAME
-//
-// MessageText:
-//
-// The entry name is incomplete.
-//
- RPC_S_INCOMPLETE_NAME = DWORD(1755);
- {$EXTERNALSYM RPC_S_INCOMPLETE_NAME}
-
-//
-// MessageId: RPC_S_INVALID_VERS_OPTION
-//
-// MessageText:
-//
-// The version option is invalid.
-//
- RPC_S_INVALID_VERS_OPTION = DWORD(1756);
- {$EXTERNALSYM RPC_S_INVALID_VERS_OPTION}
-
-//
-// MessageId: RPC_S_NO_MORE_MEMBERS
-//
-// MessageText:
-//
-// There are no more members.
-//
- RPC_S_NO_MORE_MEMBERS = DWORD(1757);
- {$EXTERNALSYM RPC_S_NO_MORE_MEMBERS}
-
-//
-// MessageId: RPC_S_NOT_ALL_OBJS_UNEXPORTED
-//
-// MessageText:
-//
-// There is nothing to unexport.
-//
- RPC_S_NOT_ALL_OBJS_UNEXPORTED = DWORD(1758);
- {$EXTERNALSYM RPC_S_NOT_ALL_OBJS_UNEXPORTED}
-
-//
-// MessageId: RPC_S_INTERFACE_NOT_FOUND
-//
-// MessageText:
-//
-// The interface was not found.
-//
- RPC_S_INTERFACE_NOT_FOUND = DWORD(1759);
- {$EXTERNALSYM RPC_S_INTERFACE_NOT_FOUND}
-
-//
-// MessageId: RPC_S_ENTRY_ALREADY_EXISTS
-//
-// MessageText:
-//
-// The entry already exists.
-//
- RPC_S_ENTRY_ALREADY_EXISTS = DWORD(1760);
- {$EXTERNALSYM RPC_S_ENTRY_ALREADY_EXISTS}
-
-//
-// MessageId: RPC_S_ENTRY_NOT_FOUND
-//
-// MessageText:
-//
-// The entry is not found.
-//
- RPC_S_ENTRY_NOT_FOUND = DWORD(1761);
- {$EXTERNALSYM RPC_S_ENTRY_NOT_FOUND}
-
-//
-// MessageId: RPC_S_NAME_SERVICE_UNAVAILABLE
-//
-// MessageText:
-//
-// The name service is unavailable.
-//
- RPC_S_NAME_SERVICE_UNAVAILABLE = DWORD(1762);
- {$EXTERNALSYM RPC_S_NAME_SERVICE_UNAVAILABLE}
-
-//
-// MessageId: RPC_S_INVALID_NAF_ID
-//
-// MessageText:
-//
-// The network address family is invalid.
-//
- RPC_S_INVALID_NAF_ID = DWORD(1763);
- {$EXTERNALSYM RPC_S_INVALID_NAF_ID}
-
-//
-// MessageId: RPC_S_CANNOT_SUPPORT
-//
-// MessageText:
-//
-// The requested operation is not supported.
-//
- RPC_S_CANNOT_SUPPORT = DWORD(1764);
- {$EXTERNALSYM RPC_S_CANNOT_SUPPORT}
-
-//
-// MessageId: RPC_S_NO_CONTEXT_AVAILABLE
-//
-// MessageText:
-//
-// No security context is available to allow impersonation.
-//
- RPC_S_NO_CONTEXT_AVAILABLE = DWORD(1765);
- {$EXTERNALSYM RPC_S_NO_CONTEXT_AVAILABLE}
-
-//
-// MessageId: RPC_S_INTERNAL_ERROR
-//
-// MessageText:
-//
-// An internal error occurred in a remote procedure call (RPC).
-//
- RPC_S_INTERNAL_ERROR = DWORD(1766);
- {$EXTERNALSYM RPC_S_INTERNAL_ERROR}
-
-//
-// MessageId: RPC_S_ZERO_DIVIDE
-//
-// MessageText:
-//
-// The RPC server attempted an integer division by zero.
-//
- RPC_S_ZERO_DIVIDE = DWORD(1767);
- {$EXTERNALSYM RPC_S_ZERO_DIVIDE}
-
-//
-// MessageId: RPC_S_ADDRESS_ERROR
-//
-// MessageText:
-//
-// An addressing error occurred in the RPC server.
-//
- RPC_S_ADDRESS_ERROR = DWORD(1768);
- {$EXTERNALSYM RPC_S_ADDRESS_ERROR}
-
-//
-// MessageId: RPC_S_FP_DIV_ZERO
-//
-// MessageText:
-//
-// A floating-point operation at the RPC server caused a division by zero.
-//
- RPC_S_FP_DIV_ZERO = DWORD(1769);
- {$EXTERNALSYM RPC_S_FP_DIV_ZERO}
-
-//
-// MessageId: RPC_S_FP_UNDERFLOW
-//
-// MessageText:
-//
-// A floating-point underflow occurred at the RPC server.
-//
- RPC_S_FP_UNDERFLOW = DWORD(1770);
- {$EXTERNALSYM RPC_S_FP_UNDERFLOW}
-
-//
-// MessageId: RPC_S_FP_OVERFLOW
-//
-// MessageText:
-//
-// A floating-point overflow occurred at the RPC server.
-//
- RPC_S_FP_OVERFLOW = DWORD(1771);
- {$EXTERNALSYM RPC_S_FP_OVERFLOW}
-
-//
-// MessageId: RPC_X_NO_MORE_ENTRIES
-//
-// MessageText:
-//
-// The list of RPC servers available for the binding of auto handles has been exhausted.
-//
- RPC_X_NO_MORE_ENTRIES = DWORD(1772);
- {$EXTERNALSYM RPC_X_NO_MORE_ENTRIES}
-
-//
-// MessageId: RPC_X_SS_CHAR_TRANS_OPEN_FAIL
-//
-// MessageText:
-//
-// Unable to open the character translation table file.
-//
- RPC_X_SS_CHAR_TRANS_OPEN_FAIL = DWORD(1773);
- {$EXTERNALSYM RPC_X_SS_CHAR_TRANS_OPEN_FAIL}
-
-//
-// MessageId: RPC_X_SS_CHAR_TRANS_SHORT_FILE
-//
-// MessageText:
-//
-// The file containing the character translation table has fewer than 512 bytes.
-//
- RPC_X_SS_CHAR_TRANS_SHORT_FILE = DWORD(1774);
- {$EXTERNALSYM RPC_X_SS_CHAR_TRANS_SHORT_FILE}
-
-//
-// MessageId: RPC_X_SS_IN_NULL_CONTEXT
-//
-// MessageText:
-//
-// A null context handle was passed from the client to the host during a remote procedure call.
-//
- RPC_X_SS_IN_NULL_CONTEXT = DWORD(1775);
- {$EXTERNALSYM RPC_X_SS_IN_NULL_CONTEXT}
-
-//
-// MessageId: RPC_X_SS_CONTEXT_DAMAGED
-//
-// MessageText:
-//
-// The context handle changed during a remote procedure call.
-//
- RPC_X_SS_CONTEXT_DAMAGED = DWORD(1777);
- {$EXTERNALSYM RPC_X_SS_CONTEXT_DAMAGED}
-
-//
-// MessageId: RPC_X_SS_HANDLES_MISMATCH
-//
-// MessageText:
-//
-// The binding handles passed to a remote procedure call do not match.
-//
- RPC_X_SS_HANDLES_MISMATCH = DWORD(1778);
- {$EXTERNALSYM RPC_X_SS_HANDLES_MISMATCH}
-
-//
-// MessageId: RPC_X_SS_CANNOT_GET_CALL_HANDLE
-//
-// MessageText:
-//
-// The stub is unable to get the remote procedure call handle.
-//
- RPC_X_SS_CANNOT_GET_CALL_HANDLE = DWORD(1779);
- {$EXTERNALSYM RPC_X_SS_CANNOT_GET_CALL_HANDLE}
-
-//
-// MessageId: RPC_X_NULL_REF_POINTER
-//
-// MessageText:
-//
-// A null reference pointer was passed to the stub.
-//
- RPC_X_NULL_REF_POINTER = DWORD(1780);
- {$EXTERNALSYM RPC_X_NULL_REF_POINTER}
-
-//
-// MessageId: RPC_X_ENUM_VALUE_OUT_OF_RANGE
-//
-// MessageText:
-//
-// The enumeration value is out of range.
-//
- RPC_X_ENUM_VALUE_OUT_OF_RANGE = DWORD(1781);
- {$EXTERNALSYM RPC_X_ENUM_VALUE_OUT_OF_RANGE}
-
-//
-// MessageId: RPC_X_BYTE_COUNT_TOO_SMALL
-//
-// MessageText:
-//
-// The byte count is too small.
-//
- RPC_X_BYTE_COUNT_TOO_SMALL = DWORD(1782);
- {$EXTERNALSYM RPC_X_BYTE_COUNT_TOO_SMALL}
-
-//
-// MessageId: RPC_X_BAD_STUB_DATA
-//
-// MessageText:
-//
-// The stub received bad data.
-//
- RPC_X_BAD_STUB_DATA = DWORD(1783);
- {$EXTERNALSYM RPC_X_BAD_STUB_DATA}
-
-//
-// MessageId: ERROR_INVALID_USER_BUFFER
-//
-// MessageText:
-//
-// The supplied user buffer is not valid for the requested operation.
-//
- ERROR_INVALID_USER_BUFFER = DWORD(1784);
- {$EXTERNALSYM ERROR_INVALID_USER_BUFFER}
-
-//
-// MessageId: ERROR_UNRECOGNIZED_MEDIA
-//
-// MessageText:
-//
-// The disk media is not recognized. It may not be formatted.
-//
- ERROR_UNRECOGNIZED_MEDIA = DWORD(1785);
- {$EXTERNALSYM ERROR_UNRECOGNIZED_MEDIA}
-
-//
-// MessageId: ERROR_NO_TRUST_LSA_SECRET
-//
-// MessageText:
-//
-// The workstation does not have a trust secret.
-//
- ERROR_NO_TRUST_LSA_SECRET = DWORD(1786);
- {$EXTERNALSYM ERROR_NO_TRUST_LSA_SECRET}
-
-//
-// MessageId: ERROR_NO_TRUST_SAM_ACCOUNT
-//
-// MessageText:
-//
-// The security database on the server does not have a computer account for this workstation trust relationship.
-//
- ERROR_NO_TRUST_SAM_ACCOUNT = DWORD(1787);
- {$EXTERNALSYM ERROR_NO_TRUST_SAM_ACCOUNT}
-
-//
-// MessageId: ERROR_TRUSTED_DOMAIN_FAILURE
-//
-// MessageText:
-//
-// The trust relationship between the primary domain and the trusted domain failed.
-//
- ERROR_TRUSTED_DOMAIN_FAILURE = DWORD(1788);
- {$EXTERNALSYM ERROR_TRUSTED_DOMAIN_FAILURE}
-
-//
-// MessageId: ERROR_TRUSTED_RELATIONSHIP_FAILURE
-//
-// MessageText:
-//
-// The trust relationship between this workstation and the primary domain failed.
-//
- ERROR_TRUSTED_RELATIONSHIP_FAILURE = DWORD(1789);
- {$EXTERNALSYM ERROR_TRUSTED_RELATIONSHIP_FAILURE}
-
-//
-// MessageId: ERROR_TRUST_FAILURE
-//
-// MessageText:
-//
-// The network logon failed.
-//
- ERROR_TRUST_FAILURE = DWORD(1790);
- {$EXTERNALSYM ERROR_TRUST_FAILURE}
-
-//
-// MessageId: RPC_S_CALL_IN_PROGRESS
-//
-// MessageText:
-//
-// A remote procedure call is already in progress for this thread.
-//
- RPC_S_CALL_IN_PROGRESS = DWORD(1791);
- {$EXTERNALSYM RPC_S_CALL_IN_PROGRESS}
-
-//
-// MessageId: ERROR_NETLOGON_NOT_STARTED
-//
-// MessageText:
-//
-// An attempt was made to logon, but the network logon service was not started.
-//
- ERROR_NETLOGON_NOT_STARTED = DWORD(1792);
- {$EXTERNALSYM ERROR_NETLOGON_NOT_STARTED}
-
-//
-// MessageId: ERROR_ACCOUNT_EXPIRED
-//
-// MessageText:
-//
-// The user's account has expired.
-//
- ERROR_ACCOUNT_EXPIRED = DWORD(1793);
- {$EXTERNALSYM ERROR_ACCOUNT_EXPIRED}
-
-//
-// MessageId: ERROR_REDIRECTOR_HAS_OPEN_HANDLES
-//
-// MessageText:
-//
-// The redirector is in use and cannot be unloaded.
-//
- ERROR_REDIRECTOR_HAS_OPEN_HANDLES = DWORD(1794);
- {$EXTERNALSYM ERROR_REDIRECTOR_HAS_OPEN_HANDLES}
-
-//
-// MessageId: ERROR_PRINTER_DRIVER_ALREADY_INSTALLED
-//
-// MessageText:
-//
-// The specified printer driver is already installed.
-//
- ERROR_PRINTER_DRIVER_ALREADY_INSTALLED = DWORD(1795);
- {$EXTERNALSYM ERROR_PRINTER_DRIVER_ALREADY_INSTALLED}
-
-//
-// MessageId: ERROR_UNKNOWN_PORT
-//
-// MessageText:
-//
-// The specified port is unknown.
-//
- ERROR_UNKNOWN_PORT = DWORD(1796);
- {$EXTERNALSYM ERROR_UNKNOWN_PORT}
-
-//
-// MessageId: ERROR_UNKNOWN_PRINTER_DRIVER
-//
-// MessageText:
-//
-// The printer driver is unknown.
-//
- ERROR_UNKNOWN_PRINTER_DRIVER = DWORD(1797);
- {$EXTERNALSYM ERROR_UNKNOWN_PRINTER_DRIVER}
-
-//
-// MessageId: ERROR_UNKNOWN_PRINTPROCESSOR
-//
-// MessageText:
-//
-// The print processor is unknown.
-//
- ERROR_UNKNOWN_PRINTPROCESSOR = DWORD(1798);
- {$EXTERNALSYM ERROR_UNKNOWN_PRINTPROCESSOR}
-
-//
-// MessageId: ERROR_INVALID_SEPARATOR_FILE
-//
-// MessageText:
-//
-// The specified separator file is invalid.
-//
- ERROR_INVALID_SEPARATOR_FILE = DWORD(1799);
- {$EXTERNALSYM ERROR_INVALID_SEPARATOR_FILE}
-
-//
-// MessageId: ERROR_INVALID_PRIORITY
-//
-// MessageText:
-//
-// The specified priority is invalid.
-//
- ERROR_INVALID_PRIORITY = DWORD(1800);
- {$EXTERNALSYM ERROR_INVALID_PRIORITY}
-
-//
-// MessageId: ERROR_INVALID_PRINTER_NAME
-//
-// MessageText:
-//
-// The printer name is invalid.
-//
- ERROR_INVALID_PRINTER_NAME = DWORD(1801);
- {$EXTERNALSYM ERROR_INVALID_PRINTER_NAME}
-
-//
-// MessageId: ERROR_PRINTER_ALREADY_EXISTS
-//
-// MessageText:
-//
-// The printer already exists.
-//
- ERROR_PRINTER_ALREADY_EXISTS = DWORD(1802);
- {$EXTERNALSYM ERROR_PRINTER_ALREADY_EXISTS}
-
-//
-// MessageId: ERROR_INVALID_PRINTER_COMMAND
-//
-// MessageText:
-//
-// The printer command is invalid.
-//
- ERROR_INVALID_PRINTER_COMMAND = DWORD(1803);
- {$EXTERNALSYM ERROR_INVALID_PRINTER_COMMAND}
-
-//
-// MessageId: ERROR_INVALID_DATATYPE
-//
-// MessageText:
-//
-// The specified datatype is invalid.
-//
- ERROR_INVALID_DATATYPE = DWORD(1804);
- {$EXTERNALSYM ERROR_INVALID_DATATYPE}
-
-//
-// MessageId: ERROR_INVALID_ENVIRONMENT
-//
-// MessageText:
-//
-// The environment specified is invalid.
-//
- ERROR_INVALID_ENVIRONMENT = DWORD(1805);
- {$EXTERNALSYM ERROR_INVALID_ENVIRONMENT}
-
-//
-// MessageId: RPC_S_NO_MORE_BINDINGS
-//
-// MessageText:
-//
-// There are no more bindings.
-//
- RPC_S_NO_MORE_BINDINGS = DWORD(1806);
- {$EXTERNALSYM RPC_S_NO_MORE_BINDINGS}
-
-//
-// MessageId: ERROR_NOLOGON_INTERDOMAIN_TRUST_ACCOUNT
-//
-// MessageText:
-//
-// The account used is an interdomain trust account. Use your global user account or local user account to access this server.
-//
- ERROR_NOLOGON_INTERDOMAIN_TRUST_ACCOUNT = DWORD(1807);
- {$EXTERNALSYM ERROR_NOLOGON_INTERDOMAIN_TRUST_ACCOUNT}
-
-//
-// MessageId: ERROR_NOLOGON_WORKSTATION_TRUST_ACCOUNT
-//
-// MessageText:
-//
-// The account used is a computer account. Use your global user account or local user account to access this server.
-//
- ERROR_NOLOGON_WORKSTATION_TRUST_ACCOUNT = DWORD(1808);
- {$EXTERNALSYM ERROR_NOLOGON_WORKSTATION_TRUST_ACCOUNT}
-
-//
-// MessageId: ERROR_NOLOGON_SERVER_TRUST_ACCOUNT
-//
-// MessageText:
-//
-// The account used is a server trust account. Use your global user account or local user account to access this server.
-//
- ERROR_NOLOGON_SERVER_TRUST_ACCOUNT = DWORD(1809);
- {$EXTERNALSYM ERROR_NOLOGON_SERVER_TRUST_ACCOUNT}
-
-//
-// MessageId: ERROR_DOMAIN_TRUST_INCONSISTENT
-//
-// MessageText:
-//
-// The name or security ID (SID) of the domain specified is inconsistent with the trust information for that domain.
-//
- ERROR_DOMAIN_TRUST_INCONSISTENT = DWORD(1810);
- {$EXTERNALSYM ERROR_DOMAIN_TRUST_INCONSISTENT}
-
-//
-// MessageId: ERROR_SERVER_HAS_OPEN_HANDLES
-//
-// MessageText:
-//
-// The server is in use and cannot be unloaded.
-//
- ERROR_SERVER_HAS_OPEN_HANDLES = DWORD(1811);
- {$EXTERNALSYM ERROR_SERVER_HAS_OPEN_HANDLES}
-
-//
-// MessageId: ERROR_RESOURCE_DATA_NOT_FOUND
-//
-// MessageText:
-//
-// The specified image file did not contain a resource section.
-//
- ERROR_RESOURCE_DATA_NOT_FOUND = DWORD(1812);
- {$EXTERNALSYM ERROR_RESOURCE_DATA_NOT_FOUND}
-
-//
-// MessageId: ERROR_RESOURCE_TYPE_NOT_FOUND
-//
-// MessageText:
-//
-// The specified resource type cannot be found in the image file.
-//
- ERROR_RESOURCE_TYPE_NOT_FOUND = DWORD(1813);
- {$EXTERNALSYM ERROR_RESOURCE_TYPE_NOT_FOUND}
-
-//
-// MessageId: ERROR_RESOURCE_NAME_NOT_FOUND
-//
-// MessageText:
-//
-// The specified resource name cannot be found in the image file.
-//
- ERROR_RESOURCE_NAME_NOT_FOUND = DWORD(1814);
- {$EXTERNALSYM ERROR_RESOURCE_NAME_NOT_FOUND}
-
-//
-// MessageId: ERROR_RESOURCE_LANG_NOT_FOUND
-//
-// MessageText:
-//
-// The specified resource language ID cannot be found in the image file.
-//
- ERROR_RESOURCE_LANG_NOT_FOUND = DWORD(1815);
- {$EXTERNALSYM ERROR_RESOURCE_LANG_NOT_FOUND}
-
-//
-// MessageId: ERROR_NOT_ENOUGH_QUOTA
-//
-// MessageText:
-//
-// Not enough quota is available to process this command.
-//
- ERROR_NOT_ENOUGH_QUOTA = DWORD(1816);
- {$EXTERNALSYM ERROR_NOT_ENOUGH_QUOTA}
-
-//
-// MessageId: RPC_S_NO_INTERFACES
-//
-// MessageText:
-//
-// No interfaces have been registered.
-//
- RPC_S_NO_INTERFACES = DWORD(1817);
- {$EXTERNALSYM RPC_S_NO_INTERFACES}
-
-//
-// MessageId: RPC_S_CALL_CANCELLED
-//
-// MessageText:
-//
-// The remote procedure call was cancelled.
-//
- RPC_S_CALL_CANCELLED = DWORD(1818);
- {$EXTERNALSYM RPC_S_CALL_CANCELLED}
-
-//
-// MessageId: RPC_S_BINDING_INCOMPLETE
-//
-// MessageText:
-//
-// The binding handle does not contain all required information.
-//
- RPC_S_BINDING_INCOMPLETE = DWORD(1819);
- {$EXTERNALSYM RPC_S_BINDING_INCOMPLETE}
-
-//
-// MessageId: RPC_S_COMM_FAILURE
-//
-// MessageText:
-//
-// A communications failure occurred during a remote procedure call.
-//
- RPC_S_COMM_FAILURE = DWORD(1820);
- {$EXTERNALSYM RPC_S_COMM_FAILURE}
-
-//
-// MessageId: RPC_S_UNSUPPORTED_AUTHN_LEVEL
-//
-// MessageText:
-//
-// The requested authentication level is not supported.
-//
- RPC_S_UNSUPPORTED_AUTHN_LEVEL = DWORD(1821);
- {$EXTERNALSYM RPC_S_UNSUPPORTED_AUTHN_LEVEL}
-
-//
-// MessageId: RPC_S_NO_PRINC_NAME
-//
-// MessageText:
-//
-// No principal name registered.
-//
- RPC_S_NO_PRINC_NAME = DWORD(1822);
- {$EXTERNALSYM RPC_S_NO_PRINC_NAME}
-
-//
-// MessageId: RPC_S_NOT_RPC_ERROR
-//
-// MessageText:
-//
-// The error specified is not a valid Windows RPC error code.
-//
- RPC_S_NOT_RPC_ERROR = DWORD(1823);
- {$EXTERNALSYM RPC_S_NOT_RPC_ERROR}
-
-//
-// MessageId: RPC_S_UUID_LOCAL_ONLY
-//
-// MessageText:
-//
-// A UUID that is valid only on this computer has been allocated.
-//
- RPC_S_UUID_LOCAL_ONLY = DWORD(1824);
- {$EXTERNALSYM RPC_S_UUID_LOCAL_ONLY}
-
-//
-// MessageId: RPC_S_SEC_PKG_ERROR
-//
-// MessageText:
-//
-// A security package specific error occurred.
-//
- RPC_S_SEC_PKG_ERROR = DWORD(1825);
- {$EXTERNALSYM RPC_S_SEC_PKG_ERROR}
-
-//
-// MessageId: RPC_S_NOT_CANCELLED
-//
-// MessageText:
-//
-// Thread is not canceled.
-//
- RPC_S_NOT_CANCELLED = DWORD(1826);
- {$EXTERNALSYM RPC_S_NOT_CANCELLED}
-
-//
-// MessageId: RPC_X_INVALID_ES_ACTION
-//
-// MessageText:
-//
-// Invalid operation on the encoding/decoding handle.
-//
- RPC_X_INVALID_ES_ACTION = DWORD(1827);
- {$EXTERNALSYM RPC_X_INVALID_ES_ACTION}
-
-//
-// MessageId: RPC_X_WRONG_ES_VERSION
-//
-// MessageText:
-//
-// Incompatible version of the serializing package.
-//
- RPC_X_WRONG_ES_VERSION = DWORD(1828);
- {$EXTERNALSYM RPC_X_WRONG_ES_VERSION}
-
-//
-// MessageId: RPC_X_WRONG_STUB_VERSION
-//
-// MessageText:
-//
-// Incompatible version of the RPC stub.
-//
- RPC_X_WRONG_STUB_VERSION = DWORD(1829);
- {$EXTERNALSYM RPC_X_WRONG_STUB_VERSION}
-
-//
-// MessageId: RPC_X_INVALID_PIPE_OBJECT
-//
-// MessageText:
-//
-// The RPC pipe object is invalid or corrupted.
-//
- RPC_X_INVALID_PIPE_OBJECT = DWORD(1830);
- {$EXTERNALSYM RPC_X_INVALID_PIPE_OBJECT}
-
-//
-// MessageId: RPC_X_WRONG_PIPE_ORDER
-//
-// MessageText:
-//
-// An invalid operation was attempted on an RPC pipe object.
-//
- RPC_X_WRONG_PIPE_ORDER = DWORD(1831);
- {$EXTERNALSYM RPC_X_WRONG_PIPE_ORDER}
-
-//
-// MessageId: RPC_X_WRONG_PIPE_VERSION
-//
-// MessageText:
-//
-// Unsupported RPC pipe version.
-//
- RPC_X_WRONG_PIPE_VERSION = DWORD(1832);
- {$EXTERNALSYM RPC_X_WRONG_PIPE_VERSION}
-
-//
-// MessageId: RPC_S_GROUP_MEMBER_NOT_FOUND
-//
-// MessageText:
-//
-// The group member was not found.
-//
- RPC_S_GROUP_MEMBER_NOT_FOUND = DWORD(1898);
- {$EXTERNALSYM RPC_S_GROUP_MEMBER_NOT_FOUND}
-
-//
-// MessageId: EPT_S_CANT_CREATE
-//
-// MessageText:
-//
-// The endpoint mapper database entry could not be created.
-//
- EPT_S_CANT_CREATE = DWORD(1899);
- {$EXTERNALSYM EPT_S_CANT_CREATE}
-
-//
-// MessageId: RPC_S_INVALID_OBJECT
-//
-// MessageText:
-//
-// The object universal unique identifier (UUID) is the nil UUID.
-//
- RPC_S_INVALID_OBJECT = DWORD(1900);
- {$EXTERNALSYM RPC_S_INVALID_OBJECT}
-
-//
-// MessageId: ERROR_INVALID_TIME
-//
-// MessageText:
-//
-// The specified time is invalid.
-//
- ERROR_INVALID_TIME = DWORD(1901);
- {$EXTERNALSYM ERROR_INVALID_TIME}
-
-//
-// MessageId: ERROR_INVALID_FORM_NAME
-//
-// MessageText:
-//
-// The specified form name is invalid.
-//
- ERROR_INVALID_FORM_NAME = DWORD(1902);
- {$EXTERNALSYM ERROR_INVALID_FORM_NAME}
-
-//
-// MessageId: ERROR_INVALID_FORM_SIZE
-//
-// MessageText:
-//
-// The specified form size is invalid.
-//
- ERROR_INVALID_FORM_SIZE = DWORD(1903);
- {$EXTERNALSYM ERROR_INVALID_FORM_SIZE}
-
-//
-// MessageId: ERROR_ALREADY_WAITING
-//
-// MessageText:
-//
-// The specified printer handle is already being waited on
-//
- ERROR_ALREADY_WAITING = DWORD(1904);
- {$EXTERNALSYM ERROR_ALREADY_WAITING}
-
-//
-// MessageId: ERROR_PRINTER_DELETED
-//
-// MessageText:
-//
-// The specified printer has been deleted.
-//
- ERROR_PRINTER_DELETED = DWORD(1905);
- {$EXTERNALSYM ERROR_PRINTER_DELETED}
-
-//
-// MessageId: ERROR_INVALID_PRINTER_STATE
-//
-// MessageText:
-//
-// The state of the printer is invalid.
-//
- ERROR_INVALID_PRINTER_STATE = DWORD(1906);
- {$EXTERNALSYM ERROR_INVALID_PRINTER_STATE}
-
-//
-// MessageId: ERROR_PASSWORD_MUST_CHANGE
-//
-// MessageText:
-//
-// The user's password must be changed before logging on the first time.
-//
- ERROR_PASSWORD_MUST_CHANGE = DWORD(1907);
- {$EXTERNALSYM ERROR_PASSWORD_MUST_CHANGE}
-
-//
-// MessageId: ERROR_DOMAIN_CONTROLLER_NOT_FOUND
-//
-// MessageText:
-//
-// Could not find the domain controller for this domain.
-//
- ERROR_DOMAIN_CONTROLLER_NOT_FOUND = DWORD(1908);
- {$EXTERNALSYM ERROR_DOMAIN_CONTROLLER_NOT_FOUND}
-
-//
-// MessageId: ERROR_ACCOUNT_LOCKED_OUT
-//
-// MessageText:
-//
-// The referenced account is currently locked out and may not be logged on to.
-//
- ERROR_ACCOUNT_LOCKED_OUT = DWORD(1909);
- {$EXTERNALSYM ERROR_ACCOUNT_LOCKED_OUT}
-
-//
-// MessageId: OR_INVALID_OXID
-//
-// MessageText:
-//
-// The object exporter specified was not found.
-//
- OR_INVALID_OXID = DWORD(1910);
- {$EXTERNALSYM OR_INVALID_OXID}
-
-//
-// MessageId: OR_INVALID_OID
-//
-// MessageText:
-//
-// The object specified was not found.
-//
- OR_INVALID_OID = DWORD(1911);
- {$EXTERNALSYM OR_INVALID_OID}
-
-//
-// MessageId: OR_INVALID_SET
-//
-// MessageText:
-//
-// The object resolver set specified was not found.
-//
- OR_INVALID_SET = DWORD(1912);
- {$EXTERNALSYM OR_INVALID_SET}
-
-//
-// MessageId: RPC_S_SEND_INCOMPLETE
-//
-// MessageText:
-//
-// Some data remains to be sent in the request buffer.
-//
- RPC_S_SEND_INCOMPLETE = DWORD(1913);
- {$EXTERNALSYM RPC_S_SEND_INCOMPLETE}
-
-//
-// MessageId: RPC_S_INVALID_ASYNC_HANDLE
-//
-// MessageText:
-//
-// Invalid asynchronous remote procedure call handle.
-//
- RPC_S_INVALID_ASYNC_HANDLE = DWORD(1914);
- {$EXTERNALSYM RPC_S_INVALID_ASYNC_HANDLE}
-
-//
-// MessageId: RPC_S_INVALID_ASYNC_CALL
-//
-// MessageText:
-//
-// Invalid asynchronous RPC call handle for this operation.
-//
- RPC_S_INVALID_ASYNC_CALL = DWORD(1915);
- {$EXTERNALSYM RPC_S_INVALID_ASYNC_CALL}
-
-//
-// MessageId: RPC_X_PIPE_CLOSED
-//
-// MessageText:
-//
-// The RPC pipe object has already been closed.
-//
- RPC_X_PIPE_CLOSED = DWORD(1916);
- {$EXTERNALSYM RPC_X_PIPE_CLOSED}
-
-//
-// MessageId: RPC_X_PIPE_DISCIPLINE_ERROR
-//
-// MessageText:
-//
-// The RPC call completed before all pipes were processed.
-//
- RPC_X_PIPE_DISCIPLINE_ERROR = DWORD(1917);
- {$EXTERNALSYM RPC_X_PIPE_DISCIPLINE_ERROR}
-
-//
-// MessageId: RPC_X_PIPE_EMPTY
-//
-// MessageText:
-//
-// No more data is available from the RPC pipe.
-//
- RPC_X_PIPE_EMPTY = DWORD(1918);
- {$EXTERNALSYM RPC_X_PIPE_EMPTY}
-
-//
-// MessageId: ERROR_NO_SITENAME
-//
-// MessageText:
-//
-// No site name is available for this machine.
-//
- ERROR_NO_SITENAME = DWORD(1919);
- {$EXTERNALSYM ERROR_NO_SITENAME}
-
-//
-// MessageId: ERROR_CANT_ACCESS_FILE
-//
-// MessageText:
-//
-// The file can not be accessed by the system.
-//
- ERROR_CANT_ACCESS_FILE = DWORD(1920);
- {$EXTERNALSYM ERROR_CANT_ACCESS_FILE}
-
-//
-// MessageId: ERROR_CANT_RESOLVE_FILENAME
-//
-// MessageText:
-//
-// The name of the file cannot be resolved by the system.
-//
- ERROR_CANT_RESOLVE_FILENAME = DWORD(1921);
- {$EXTERNALSYM ERROR_CANT_RESOLVE_FILENAME}
-
-//
-// MessageId: RPC_S_ENTRY_TYPE_MISMATCH
-//
-// MessageText:
-//
-// The entry is not of the expected type.
-//
- RPC_S_ENTRY_TYPE_MISMATCH = DWORD(1922);
- {$EXTERNALSYM RPC_S_ENTRY_TYPE_MISMATCH}
-
-//
-// MessageId: RPC_S_NOT_ALL_OBJS_EXPORTED
-//
-// MessageText:
-//
-// Not all object UUIDs could be exported to the specified entry.
-//
- RPC_S_NOT_ALL_OBJS_EXPORTED = DWORD(1923);
- {$EXTERNALSYM RPC_S_NOT_ALL_OBJS_EXPORTED}
-
-//
-// MessageId: RPC_S_INTERFACE_NOT_EXPORTED
-//
-// MessageText:
-//
-// Interface could not be exported to the specified entry.
-//
- RPC_S_INTERFACE_NOT_EXPORTED = DWORD(1924);
- {$EXTERNALSYM RPC_S_INTERFACE_NOT_EXPORTED}
-
-//
-// MessageId: RPC_S_PROFILE_NOT_ADDED
-//
-// MessageText:
-//
-// The specified profile entry could not be added.
-//
- RPC_S_PROFILE_NOT_ADDED = DWORD(1925);
- {$EXTERNALSYM RPC_S_PROFILE_NOT_ADDED}
-
-//
-// MessageId: RPC_S_PRF_ELT_NOT_ADDED
-//
-// MessageText:
-//
-// The specified profile element could not be added.
-//
- RPC_S_PRF_ELT_NOT_ADDED = DWORD(1926);
- {$EXTERNALSYM RPC_S_PRF_ELT_NOT_ADDED}
-
-//
-// MessageId: RPC_S_PRF_ELT_NOT_REMOVED
-//
-// MessageText:
-//
-// The specified profile element could not be removed.
-//
- RPC_S_PRF_ELT_NOT_REMOVED = DWORD(1927);
- {$EXTERNALSYM RPC_S_PRF_ELT_NOT_REMOVED}
-
-//
-// MessageId: RPC_S_GRP_ELT_NOT_ADDED
-//
-// MessageText:
-//
-// The group element could not be added.
-//
- RPC_S_GRP_ELT_NOT_ADDED = DWORD(1928);
- {$EXTERNALSYM RPC_S_GRP_ELT_NOT_ADDED}
-
-//
-// MessageId: RPC_S_GRP_ELT_NOT_REMOVED
-//
-// MessageText:
-//
-// The group element could not be removed.
-//
- RPC_S_GRP_ELT_NOT_REMOVED = DWORD(1929);
- {$EXTERNALSYM RPC_S_GRP_ELT_NOT_REMOVED}
-
-//
-// MessageId: ERROR_KM_DRIVER_BLOCKED
-//
-// MessageText:
-//
-// The printer driver is not compatible with a policy enabled on your computer that blocks NT 4.0 drivers.
-//
- ERROR_KM_DRIVER_BLOCKED = DWORD(1930);
- {$EXTERNALSYM ERROR_KM_DRIVER_BLOCKED}
-
-//
-// MessageId: ERROR_CONTEXT_EXPIRED
-//
-// MessageText:
-//
-// The context has expired and can no longer be used.
-//
- ERROR_CONTEXT_EXPIRED = DWORD(1931);
- {$EXTERNALSYM ERROR_CONTEXT_EXPIRED}
-
-//
-// MessageId: ERROR_PER_USER_TRUST_QUOTA_EXCEEDED
-//
-// MessageText:
-//
-// The current user's delegated trust creation quota has been exceeded.
-//
- ERROR_PER_USER_TRUST_QUOTA_EXCEEDED = DWORD(1932);
- {$EXTERNALSYM ERROR_PER_USER_TRUST_QUOTA_EXCEEDED}
-
-//
-// MessageId: ERROR_ALL_USER_TRUST_QUOTA_EXCEEDED
-//
-// MessageText:
-//
-// The total delegated trust creation quota has been exceeded.
-//
- ERROR_ALL_USER_TRUST_QUOTA_EXCEEDED = DWORD(1933);
- {$EXTERNALSYM ERROR_ALL_USER_TRUST_QUOTA_EXCEEDED}
-
-//
-// MessageId: ERROR_USER_DELETE_TRUST_QUOTA_EXCEEDED
-//
-// MessageText:
-//
-// The current user's delegated trust deletion quota has been exceeded.
-//
- ERROR_USER_DELETE_TRUST_QUOTA_EXCEEDED = DWORD(1934);
- {$EXTERNALSYM ERROR_USER_DELETE_TRUST_QUOTA_EXCEEDED}
-
-//
-// MessageId: ERROR_AUTHENTICATION_FIREWALL_FAILED
-//
-// MessageText:
-//
-// Logon Failure: The machine you are logging onto is protected by an authentication firewall. The specified account is not allowed to authenticate to the machine.
-//
- ERROR_AUTHENTICATION_FIREWALL_FAILED = DWORD(1935);
- {$EXTERNALSYM ERROR_AUTHENTICATION_FIREWALL_FAILED}
-
-//
-// MessageId: ERROR_REMOTE_PRINT_CONNECTIONS_BLOCKED
-//
-// MessageText:
-//
-// Remote connections to the Print Spooler are blocked by a policy set on your machine.
-//
- ERROR_REMOTE_PRINT_CONNECTIONS_BLOCKED = DWORD(1936);
- {$EXTERNALSYM ERROR_REMOTE_PRINT_CONNECTIONS_BLOCKED}
-
-
-
-///////////////////////////
-// //
-// OpenGL Error Code //
-// //
-///////////////////////////
-
-//
-// MessageId: ERROR_INVALID_PIXEL_FORMAT
-//
-// MessageText:
-//
-// The pixel format is invalid.
-//
- ERROR_INVALID_PIXEL_FORMAT = DWORD(2000);
- {$EXTERNALSYM ERROR_INVALID_PIXEL_FORMAT}
-
-//
-// MessageId: ERROR_BAD_DRIVER
-//
-// MessageText:
-//
-// The specified driver is invalid.
-//
- ERROR_BAD_DRIVER = DWORD(2001);
- {$EXTERNALSYM ERROR_BAD_DRIVER}
-
-//
-// MessageId: ERROR_INVALID_WINDOW_STYLE
-//
-// MessageText:
-//
-// The window style or class attribute is invalid for this operation.
-//
- ERROR_INVALID_WINDOW_STYLE = DWORD(2002);
- {$EXTERNALSYM ERROR_INVALID_WINDOW_STYLE}
-
-//
-// MessageId: ERROR_METAFILE_NOT_SUPPORTED
-//
-// MessageText:
-//
-// The requested metafile operation is not supported.
-//
- ERROR_METAFILE_NOT_SUPPORTED = DWORD(2003);
- {$EXTERNALSYM ERROR_METAFILE_NOT_SUPPORTED}
-
-//
-// MessageId: ERROR_TRANSFORM_NOT_SUPPORTED
-//
-// MessageText:
-//
-// The requested transformation operation is not supported.
-//
- ERROR_TRANSFORM_NOT_SUPPORTED = DWORD(2004);
- {$EXTERNALSYM ERROR_TRANSFORM_NOT_SUPPORTED}
-
-//
-// MessageId: ERROR_CLIPPING_NOT_SUPPORTED
-//
-// MessageText:
-//
-// The requested clipping operation is not supported.
-//
- ERROR_CLIPPING_NOT_SUPPORTED = DWORD(2005);
- {$EXTERNALSYM ERROR_CLIPPING_NOT_SUPPORTED}
-
-// End of OpenGL error codes
-
-
-///////////////////////////////////////////
-// //
-// Image Color Management Error Code //
-// //
-///////////////////////////////////////////
-
-//
-// MessageId: ERROR_INVALID_CMM
-//
-// MessageText:
-//
-// The specified color management module is invalid.
-//
- ERROR_INVALID_CMM = DWORD(2010);
- {$EXTERNALSYM ERROR_INVALID_CMM}
-
-//
-// MessageId: ERROR_INVALID_PROFILE
-//
-// MessageText:
-//
-// The specified color profile is invalid.
-//
- ERROR_INVALID_PROFILE = DWORD(2011);
- {$EXTERNALSYM ERROR_INVALID_PROFILE}
-
-//
-// MessageId: ERROR_TAG_NOT_FOUND
-//
-// MessageText:
-//
-// The specified tag was not found.
-//
- ERROR_TAG_NOT_FOUND = DWORD(2012);
- {$EXTERNALSYM ERROR_TAG_NOT_FOUND}
-
-//
-// MessageId: ERROR_TAG_NOT_PRESENT
-//
-// MessageText:
-//
-// A required tag is not present.
-//
- ERROR_TAG_NOT_PRESENT = DWORD(2013);
- {$EXTERNALSYM ERROR_TAG_NOT_PRESENT}
-
-//
-// MessageId: ERROR_DUPLICATE_TAG
-//
-// MessageText:
-//
-// The specified tag is already present.
-//
- ERROR_DUPLICATE_TAG = DWORD(2014);
- {$EXTERNALSYM ERROR_DUPLICATE_TAG}
-
-//
-// MessageId: ERROR_PROFILE_NOT_ASSOCIATED_WITH_DEVICE
-//
-// MessageText:
-//
-// The specified color profile is not associated with any device.
-//
- ERROR_PROFILE_NOT_ASSOCIATED_WITH_DEVICE = DWORD(2015);
- {$EXTERNALSYM ERROR_PROFILE_NOT_ASSOCIATED_WITH_DEVICE}
-
-//
-// MessageId: ERROR_PROFILE_NOT_FOUND
-//
-// MessageText:
-//
-// The specified color profile was not found.
-//
- ERROR_PROFILE_NOT_FOUND = DWORD(2016);
- {$EXTERNALSYM ERROR_PROFILE_NOT_FOUND}
-
-//
-// MessageId: ERROR_INVALID_COLORSPACE
-//
-// MessageText:
-//
-// The specified color space is invalid.
-//
- ERROR_INVALID_COLORSPACE = DWORD(2017);
- {$EXTERNALSYM ERROR_INVALID_COLORSPACE}
-
-//
-// MessageId: ERROR_ICM_NOT_ENABLED
-//
-// MessageText:
-//
-// Image Color Management is not enabled.
-//
- ERROR_ICM_NOT_ENABLED = DWORD(2018);
- {$EXTERNALSYM ERROR_ICM_NOT_ENABLED}
-
-//
-// MessageId: ERROR_DELETING_ICM_XFORM
-//
-// MessageText:
-//
-// There was an error while deleting the color transform.
-//
- ERROR_DELETING_ICM_XFORM = DWORD(2019);
- {$EXTERNALSYM ERROR_DELETING_ICM_XFORM}
-
-//
-// MessageId: ERROR_INVALID_TRANSFORM
-//
-// MessageText:
-//
-// The specified color transform is invalid.
-//
- ERROR_INVALID_TRANSFORM = DWORD(2020);
- {$EXTERNALSYM ERROR_INVALID_TRANSFORM}
-
-//
-// MessageId: ERROR_COLORSPACE_MISMATCH
-//
-// MessageText:
-//
-// The specified transform does not match the bitmap's color space.
-//
- ERROR_COLORSPACE_MISMATCH = DWORD(2021);
- {$EXTERNALSYM ERROR_COLORSPACE_MISMATCH}
-
-//
-// MessageId: ERROR_INVALID_COLORINDEX
-//
-// MessageText:
-//
-// The specified named color index is not present in the profile.
-//
- ERROR_INVALID_COLORINDEX = DWORD(2022);
- {$EXTERNALSYM ERROR_INVALID_COLORINDEX}
-
-
-
-///////////////////////////
-// //
-// Winnet32 Status Codes //
-// //
-// The range 2100 through 2999 is reserved for network status codes.
-// See lmerr.h for a complete listing
-///////////////////////////
-
-//
-// MessageId: ERROR_CONNECTED_OTHER_PASSWORD
-//
-// MessageText:
-//
-// The network connection was made successfully, but the user had to be prompted for a password other than the one originally specified.
-//
- ERROR_CONNECTED_OTHER_PASSWORD = DWORD(2108);
- {$EXTERNALSYM ERROR_CONNECTED_OTHER_PASSWORD}
-
-//
-// MessageId: ERROR_CONNECTED_OTHER_PASSWORD_DEFAULT
-//
-// MessageText:
-//
-// The network connection was made successfully using default credentials.
-//
- ERROR_CONNECTED_OTHER_PASSWORD_DEFAULT = DWORD(2109);
- {$EXTERNALSYM ERROR_CONNECTED_OTHER_PASSWORD_DEFAULT}
-
-//
-// MessageId: ERROR_BAD_USERNAME
-//
-// MessageText:
-//
-// The specified username is invalid.
-//
- ERROR_BAD_USERNAME = DWORD(2202);
- {$EXTERNALSYM ERROR_BAD_USERNAME}
-
-//
-// MessageId: ERROR_NOT_CONNECTED
-//
-// MessageText:
-//
-// This network connection does not exist.
-//
- ERROR_NOT_CONNECTED = DWORD(2250);
- {$EXTERNALSYM ERROR_NOT_CONNECTED}
-
-//
-// MessageId: ERROR_OPEN_FILES
-//
-// MessageText:
-//
-// This network connection has files open or requests pending.
-//
- ERROR_OPEN_FILES = DWORD(2401);
- {$EXTERNALSYM ERROR_OPEN_FILES}
-
-//
-// MessageId: ERROR_ACTIVE_CONNECTIONS
-//
-// MessageText:
-//
-// Active connections still exist.
-//
- ERROR_ACTIVE_CONNECTIONS = DWORD(2402);
- {$EXTERNALSYM ERROR_ACTIVE_CONNECTIONS}
-
-//
-// MessageId: ERROR_DEVICE_IN_USE
-//
-// MessageText:
-//
-// The device is in use by an active process and cannot be disconnected.
-//
- ERROR_DEVICE_IN_USE = DWORD(2404);
- {$EXTERNALSYM ERROR_DEVICE_IN_USE}
-
-////////////////////////////////////
-// //
-// Win32 Spooler Error Codes //
-// //
-////////////////////////////////////
-//
-// MessageId: ERROR_UNKNOWN_PRINT_MONITOR
-//
-// MessageText:
-//
-// The specified print monitor is unknown.
-//
- ERROR_UNKNOWN_PRINT_MONITOR = DWORD(3000);
- {$EXTERNALSYM ERROR_UNKNOWN_PRINT_MONITOR}
-
-//
-// MessageId: ERROR_PRINTER_DRIVER_IN_USE
-//
-// MessageText:
-//
-// The specified printer driver is currently in use.
-//
- ERROR_PRINTER_DRIVER_IN_USE = DWORD(3001);
- {$EXTERNALSYM ERROR_PRINTER_DRIVER_IN_USE}
-
-//
-// MessageId: ERROR_SPOOL_FILE_NOT_FOUND
-//
-// MessageText:
-//
-// The spool file was not found.
-//
- ERROR_SPOOL_FILE_NOT_FOUND = DWORD(3002);
- {$EXTERNALSYM ERROR_SPOOL_FILE_NOT_FOUND}
-
-//
-// MessageId: ERROR_SPL_NO_STARTDOC
-//
-// MessageText:
-//
-// A StartDocPrinter call was not issued.
-//
- ERROR_SPL_NO_STARTDOC = DWORD(3003);
- {$EXTERNALSYM ERROR_SPL_NO_STARTDOC}
-
-//
-// MessageId: ERROR_SPL_NO_ADDJOB
-//
-// MessageText:
-//
-// An AddJob call was not issued.
-//
- ERROR_SPL_NO_ADDJOB = DWORD(3004);
- {$EXTERNALSYM ERROR_SPL_NO_ADDJOB}
-
-//
-// MessageId: ERROR_PRINT_PROCESSOR_ALREADY_INSTALLED
-//
-// MessageText:
-//
-// The specified print processor has already been installed.
-//
- ERROR_PRINT_PROCESSOR_ALREADY_INSTALLED = DWORD(3005);
- {$EXTERNALSYM ERROR_PRINT_PROCESSOR_ALREADY_INSTALLED}
-
-//
-// MessageId: ERROR_PRINT_MONITOR_ALREADY_INSTALLED
-//
-// MessageText:
-//
-// The specified print monitor has already been installed.
-//
- ERROR_PRINT_MONITOR_ALREADY_INSTALLED = DWORD(3006);
- {$EXTERNALSYM ERROR_PRINT_MONITOR_ALREADY_INSTALLED}
-
-//
-// MessageId: ERROR_INVALID_PRINT_MONITOR
-//
-// MessageText:
-//
-// The specified print monitor does not have the required functions.
-//
- ERROR_INVALID_PRINT_MONITOR = DWORD(3007);
- {$EXTERNALSYM ERROR_INVALID_PRINT_MONITOR}
-
-//
-// MessageId: ERROR_PRINT_MONITOR_IN_USE
-//
-// MessageText:
-//
-// The specified print monitor is currently in use.
-//
- ERROR_PRINT_MONITOR_IN_USE = DWORD(3008);
- {$EXTERNALSYM ERROR_PRINT_MONITOR_IN_USE}
-
-//
-// MessageId: ERROR_PRINTER_HAS_JOBS_QUEUED
-//
-// MessageText:
-//
-// The requested operation is not allowed when there are jobs queued to the printer.
-//
- ERROR_PRINTER_HAS_JOBS_QUEUED = DWORD(3009);
- {$EXTERNALSYM ERROR_PRINTER_HAS_JOBS_QUEUED}
-
-//
-// MessageId: ERROR_SUCCESS_REBOOT_REQUIRED
-//
-// MessageText:
-//
-// The requested operation is successful. Changes will not be effective until the system is rebooted.
-//
- ERROR_SUCCESS_REBOOT_REQUIRED = DWORD(3010);
- {$EXTERNALSYM ERROR_SUCCESS_REBOOT_REQUIRED}
-
-//
-// MessageId: ERROR_SUCCESS_RESTART_REQUIRED
-//
-// MessageText:
-//
-// The requested operation is successful. Changes will not be effective until the service is restarted.
-//
- ERROR_SUCCESS_RESTART_REQUIRED = DWORD(3011);
- {$EXTERNALSYM ERROR_SUCCESS_RESTART_REQUIRED}
-
-//
-// MessageId: ERROR_PRINTER_NOT_FOUND
-//
-// MessageText:
-//
-// No printers were found.
-//
- ERROR_PRINTER_NOT_FOUND = DWORD(3012);
- {$EXTERNALSYM ERROR_PRINTER_NOT_FOUND}
-
-//
-// MessageId: ERROR_PRINTER_DRIVER_WARNED
-//
-// MessageText:
-//
-// The printer driver is known to be unreliable.
-//
- ERROR_PRINTER_DRIVER_WARNED = DWORD(3013);
- {$EXTERNALSYM ERROR_PRINTER_DRIVER_WARNED}
-
-//
-// MessageId: ERROR_PRINTER_DRIVER_BLOCKED
-//
-// MessageText:
-//
-// The printer driver is known to harm the system.
-//
- ERROR_PRINTER_DRIVER_BLOCKED = DWORD(3014);
- {$EXTERNALSYM ERROR_PRINTER_DRIVER_BLOCKED}
-
-////////////////////////////////////
-// //
-// Wins Error Codes //
-// //
-////////////////////////////////////
-//
-// MessageId: ERROR_WINS_INTERNAL
-//
-// MessageText:
-//
-// WINS encountered an error while processing the command.
-//
- ERROR_WINS_INTERNAL = DWORD(4000);
- {$EXTERNALSYM ERROR_WINS_INTERNAL}
-
-//
-// MessageId: ERROR_CAN_NOT_DEL_LOCAL_WINS
-//
-// MessageText:
-//
-// The local WINS can not be deleted.
-//
- ERROR_CAN_NOT_DEL_LOCAL_WINS = DWORD(4001);
- {$EXTERNALSYM ERROR_CAN_NOT_DEL_LOCAL_WINS}
-
-//
-// MessageId: ERROR_STATIC_INIT
-//
-// MessageText:
-//
-// The importation from the file failed.
-//
- ERROR_STATIC_INIT = DWORD(4002);
- {$EXTERNALSYM ERROR_STATIC_INIT}
-
-//
-// MessageId: ERROR_INC_BACKUP
-//
-// MessageText:
-//
-// The backup failed. Was a full backup done before?
-//
- ERROR_INC_BACKUP = DWORD(4003);
- {$EXTERNALSYM ERROR_INC_BACKUP}
-
-//
-// MessageId: ERROR_FULL_BACKUP
-//
-// MessageText:
-//
-// The backup failed. Check the directory to which you are backing the database.
-//
- ERROR_FULL_BACKUP = DWORD(4004);
- {$EXTERNALSYM ERROR_FULL_BACKUP}
-
-//
-// MessageId: ERROR_REC_NON_EXISTENT
-//
-// MessageText:
-//
-// The name does not exist in the WINS database.
-//
- ERROR_REC_NON_EXISTENT = DWORD(4005);
- {$EXTERNALSYM ERROR_REC_NON_EXISTENT}
-
-//
-// MessageId: ERROR_RPL_NOT_ALLOWED
-//
-// MessageText:
-//
-// Replication with a nonconfigured partner is not allowed.
-//
- ERROR_RPL_NOT_ALLOWED = DWORD(4006);
- {$EXTERNALSYM ERROR_RPL_NOT_ALLOWED}
-
-////////////////////////////////////
-// //
-// DHCP Error Codes //
-// //
-////////////////////////////////////
-//
-// MessageId: ERROR_DHCP_ADDRESS_CONFLICT
-//
-// MessageText:
-//
-// The DHCP client has obtained an IP address that is already in use on the network. The local interface will be disabled until the DHCP client can obtain a new address.
-//
- ERROR_DHCP_ADDRESS_CONFLICT = DWORD(4100);
- {$EXTERNALSYM ERROR_DHCP_ADDRESS_CONFLICT}
-
-////////////////////////////////////
-// //
-// WMI Error Codes //
-// //
-////////////////////////////////////
-//
-// MessageId: ERROR_WMI_GUID_NOT_FOUND
-//
-// MessageText:
-//
-// The GUID passed was not recognized as valid by a WMI data provider.
-//
- ERROR_WMI_GUID_NOT_FOUND = DWORD(4200);
- {$EXTERNALSYM ERROR_WMI_GUID_NOT_FOUND}
-
-//
-// MessageId: ERROR_WMI_INSTANCE_NOT_FOUND
-//
-// MessageText:
-//
-// The instance name passed was not recognized as valid by a WMI data provider.
-//
- ERROR_WMI_INSTANCE_NOT_FOUND = DWORD(4201);
- {$EXTERNALSYM ERROR_WMI_INSTANCE_NOT_FOUND}
-
-//
-// MessageId: ERROR_WMI_ITEMID_NOT_FOUND
-//
-// MessageText:
-//
-// The data item ID passed was not recognized as valid by a WMI data provider.
-//
- ERROR_WMI_ITEMID_NOT_FOUND = DWORD(4202);
- {$EXTERNALSYM ERROR_WMI_ITEMID_NOT_FOUND}
-
-//
-// MessageId: ERROR_WMI_TRY_AGAIN
-//
-// MessageText:
-//
-// The WMI request could not be completed and should be retried.
-//
- ERROR_WMI_TRY_AGAIN = DWORD(4203);
- {$EXTERNALSYM ERROR_WMI_TRY_AGAIN}
-
-//
-// MessageId: ERROR_WMI_DP_NOT_FOUND
-//
-// MessageText:
-//
-// The WMI data provider could not be located.
-//
- ERROR_WMI_DP_NOT_FOUND = DWORD(4204);
- {$EXTERNALSYM ERROR_WMI_DP_NOT_FOUND}
-
-//
-// MessageId: ERROR_WMI_UNRESOLVED_INSTANCE_REF
-//
-// MessageText:
-//
-// The WMI data provider references an instance set that has not been registered.
-//
- ERROR_WMI_UNRESOLVED_INSTANCE_REF = DWORD(4205);
- {$EXTERNALSYM ERROR_WMI_UNRESOLVED_INSTANCE_REF}
-
-//
-// MessageId: ERROR_WMI_ALREADY_ENABLED
-//
-// MessageText:
-//
-// The WMI data block or event notification has already been enabled.
-//
- ERROR_WMI_ALREADY_ENABLED = DWORD(4206);
- {$EXTERNALSYM ERROR_WMI_ALREADY_ENABLED}
-
-//
-// MessageId: ERROR_WMI_GUID_DISCONNECTED
-//
-// MessageText:
-//
-// The WMI data block is no longer available.
-//
- ERROR_WMI_GUID_DISCONNECTED = DWORD(4207);
- {$EXTERNALSYM ERROR_WMI_GUID_DISCONNECTED}
-
-//
-// MessageId: ERROR_WMI_SERVER_UNAVAILABLE
-//
-// MessageText:
-//
-// The WMI data service is not available.
-//
- ERROR_WMI_SERVER_UNAVAILABLE = DWORD(4208);
- {$EXTERNALSYM ERROR_WMI_SERVER_UNAVAILABLE}
-
-//
-// MessageId: ERROR_WMI_DP_FAILED
-//
-// MessageText:
-//
-// The WMI data provider failed to carry out the request.
-//
- ERROR_WMI_DP_FAILED = DWORD(4209);
- {$EXTERNALSYM ERROR_WMI_DP_FAILED}
-
-//
-// MessageId: ERROR_WMI_INVALID_MOF
-//
-// MessageText:
-//
-// The WMI MOF information is not valid.
-//
- ERROR_WMI_INVALID_MOF = DWORD(4210);
- {$EXTERNALSYM ERROR_WMI_INVALID_MOF}
-
-//
-// MessageId: ERROR_WMI_INVALID_REGINFO
-//
-// MessageText:
-//
-// The WMI registration information is not valid.
-//
- ERROR_WMI_INVALID_REGINFO = DWORD(4211);
- {$EXTERNALSYM ERROR_WMI_INVALID_REGINFO}
-
-//
-// MessageId: ERROR_WMI_ALREADY_DISABLED
-//
-// MessageText:
-//
-// The WMI data block or event notification has already been disabled.
-//
- ERROR_WMI_ALREADY_DISABLED = DWORD(4212);
- {$EXTERNALSYM ERROR_WMI_ALREADY_DISABLED}
-
-//
-// MessageId: ERROR_WMI_READ_ONLY
-//
-// MessageText:
-//
-// The WMI data item or data block is read only.
-//
- ERROR_WMI_READ_ONLY = DWORD(4213);
- {$EXTERNALSYM ERROR_WMI_READ_ONLY}
-
-//
-// MessageId: ERROR_WMI_SET_FAILURE
-//
-// MessageText:
-//
-// The WMI data item or data block could not be changed.
-//
- ERROR_WMI_SET_FAILURE = DWORD(4214);
- {$EXTERNALSYM ERROR_WMI_SET_FAILURE}
-
-//////////////////////////////////////////
-// //
-// NT Media Services (RSM) Error Codes //
-// //
-//////////////////////////////////////////
-//
-// MessageId: ERROR_INVALID_MEDIA
-//
-// MessageText:
-//
-// The media identifier does not represent a valid medium.
-//
- ERROR_INVALID_MEDIA = DWORD(4300);
- {$EXTERNALSYM ERROR_INVALID_MEDIA}
-
-//
-// MessageId: ERROR_INVALID_LIBRARY
-//
-// MessageText:
-//
-// The library identifier does not represent a valid library.
-//
- ERROR_INVALID_LIBRARY = DWORD(4301);
- {$EXTERNALSYM ERROR_INVALID_LIBRARY}
-
-//
-// MessageId: ERROR_INVALID_MEDIA_POOL
-//
-// MessageText:
-//
-// The media pool identifier does not represent a valid media pool.
-//
- ERROR_INVALID_MEDIA_POOL = DWORD(4302);
- {$EXTERNALSYM ERROR_INVALID_MEDIA_POOL}
-
-//
-// MessageId: ERROR_DRIVE_MEDIA_MISMATCH
-//
-// MessageText:
-//
-// The drive and medium are not compatible or exist in different libraries.
-//
- ERROR_DRIVE_MEDIA_MISMATCH = DWORD(4303);
- {$EXTERNALSYM ERROR_DRIVE_MEDIA_MISMATCH}
-
-//
-// MessageId: ERROR_MEDIA_OFFLINE
-//
-// MessageText:
-//
-// The medium currently exists in an offline library and must be online to perform this operation.
-//
- ERROR_MEDIA_OFFLINE = DWORD(4304);
- {$EXTERNALSYM ERROR_MEDIA_OFFLINE}
-
-//
-// MessageId: ERROR_LIBRARY_OFFLINE
-//
-// MessageText:
-//
-// The operation cannot be performed on an offline library.
-//
- ERROR_LIBRARY_OFFLINE = DWORD(4305);
- {$EXTERNALSYM ERROR_LIBRARY_OFFLINE}
-
-//
-// MessageId: ERROR_EMPTY
-//
-// MessageText:
-//
-// The library, drive, or media pool is empty.
-//
- ERROR_EMPTY = DWORD(4306);
- {$EXTERNALSYM ERROR_EMPTY}
-
-//
-// MessageId: ERROR_NOT_EMPTY
-//
-// MessageText:
-//
-// The library, drive, or media pool must be empty to perform this operation.
-//
- ERROR_NOT_EMPTY = DWORD(4307);
- {$EXTERNALSYM ERROR_NOT_EMPTY}
-
-//
-// MessageId: ERROR_MEDIA_UNAVAILABLE
-//
-// MessageText:
-//
-// No media is currently available in this media pool or library.
-//
- ERROR_MEDIA_UNAVAILABLE = DWORD(4308);
- {$EXTERNALSYM ERROR_MEDIA_UNAVAILABLE}
-
-//
-// MessageId: ERROR_RESOURCE_DISABLED
-//
-// MessageText:
-//
-// A resource required for this operation is disabled.
-//
- ERROR_RESOURCE_DISABLED = DWORD(4309);
- {$EXTERNALSYM ERROR_RESOURCE_DISABLED}
-
-//
-// MessageId: ERROR_INVALID_CLEANER
-//
-// MessageText:
-//
-// The media identifier does not represent a valid cleaner.
-//
- ERROR_INVALID_CLEANER = DWORD(4310);
- {$EXTERNALSYM ERROR_INVALID_CLEANER}
-
-//
-// MessageId: ERROR_UNABLE_TO_CLEAN
-//
-// MessageText:
-//
-// The drive cannot be cleaned or does not support cleaning.
-//
- ERROR_UNABLE_TO_CLEAN = DWORD(4311);
- {$EXTERNALSYM ERROR_UNABLE_TO_CLEAN}
-
-//
-// MessageId: ERROR_OBJECT_NOT_FOUND
-//
-// MessageText:
-//
-// The object identifier does not represent a valid object.
-//
- ERROR_OBJECT_NOT_FOUND = DWORD(4312);
- {$EXTERNALSYM ERROR_OBJECT_NOT_FOUND}
-
-//
-// MessageId: ERROR_DATABASE_FAILURE
-//
-// MessageText:
-//
-// Unable to read from or write to the database.
-//
- ERROR_DATABASE_FAILURE = DWORD(4313);
- {$EXTERNALSYM ERROR_DATABASE_FAILURE}
-
-//
-// MessageId: ERROR_DATABASE_FULL
-//
-// MessageText:
-//
-// The database is full.
-//
- ERROR_DATABASE_FULL = DWORD(4314);
- {$EXTERNALSYM ERROR_DATABASE_FULL}
-
-//
-// MessageId: ERROR_MEDIA_INCOMPATIBLE
-//
-// MessageText:
-//
-// The medium is not compatible with the device or media pool.
-//
- ERROR_MEDIA_INCOMPATIBLE = DWORD(4315);
- {$EXTERNALSYM ERROR_MEDIA_INCOMPATIBLE}
-
-//
-// MessageId: ERROR_RESOURCE_NOT_PRESENT
-//
-// MessageText:
-//
-// The resource required for this operation does not exist.
-//
- ERROR_RESOURCE_NOT_PRESENT = DWORD(4316);
- {$EXTERNALSYM ERROR_RESOURCE_NOT_PRESENT}
-
-//
-// MessageId: ERROR_INVALID_OPERATION
-//
-// MessageText:
-//
-// The operation identifier is not valid.
-//
- ERROR_INVALID_OPERATION = DWORD(4317);
- {$EXTERNALSYM ERROR_INVALID_OPERATION}
-
-//
-// MessageId: ERROR_MEDIA_NOT_AVAILABLE
-//
-// MessageText:
-//
-// The media is not mounted or ready for use.
-//
- ERROR_MEDIA_NOT_AVAILABLE = DWORD(4318);
- {$EXTERNALSYM ERROR_MEDIA_NOT_AVAILABLE}
-
-//
-// MessageId: ERROR_DEVICE_NOT_AVAILABLE
-//
-// MessageText:
-//
-// The device is not ready for use.
-//
- ERROR_DEVICE_NOT_AVAILABLE = DWORD(4319);
- {$EXTERNALSYM ERROR_DEVICE_NOT_AVAILABLE}
-
-//
-// MessageId: ERROR_REQUEST_REFUSED
-//
-// MessageText:
-//
-// The operator or administrator has refused the request.
-//
- ERROR_REQUEST_REFUSED = DWORD(4320);
- {$EXTERNALSYM ERROR_REQUEST_REFUSED}
-
-//
-// MessageId: ERROR_INVALID_DRIVE_OBJECT
-//
-// MessageText:
-//
-// The drive identifier does not represent a valid drive.
-//
- ERROR_INVALID_DRIVE_OBJECT = DWORD(4321);
- {$EXTERNALSYM ERROR_INVALID_DRIVE_OBJECT}
-
-//
-// MessageId: ERROR_LIBRARY_FULL
-//
-// MessageText:
-//
-// Library is full. No slot is available for use.
-//
- ERROR_LIBRARY_FULL = DWORD(4322);
- {$EXTERNALSYM ERROR_LIBRARY_FULL}
-
-//
-// MessageId: ERROR_MEDIUM_NOT_ACCESSIBLE
-//
-// MessageText:
-//
-// The transport cannot access the medium.
-//
- ERROR_MEDIUM_NOT_ACCESSIBLE = DWORD(4323);
- {$EXTERNALSYM ERROR_MEDIUM_NOT_ACCESSIBLE}
-
-//
-// MessageId: ERROR_UNABLE_TO_LOAD_MEDIUM
-//
-// MessageText:
-//
-// Unable to load the medium into the drive.
-//
- ERROR_UNABLE_TO_LOAD_MEDIUM = DWORD(4324);
- {$EXTERNALSYM ERROR_UNABLE_TO_LOAD_MEDIUM}
-
-//
-// MessageId: ERROR_UNABLE_TO_INVENTORY_DRIVE
-//
-// MessageText:
-//
-// Unable to retrieve the drive status.
-//
- ERROR_UNABLE_TO_INVENTORY_DRIVE = DWORD(4325);
- {$EXTERNALSYM ERROR_UNABLE_TO_INVENTORY_DRIVE}
-
-//
-// MessageId: ERROR_UNABLE_TO_INVENTORY_SLOT
-//
-// MessageText:
-//
-// Unable to retrieve the slot status.
-//
- ERROR_UNABLE_TO_INVENTORY_SLOT = DWORD(4326);
- {$EXTERNALSYM ERROR_UNABLE_TO_INVENTORY_SLOT}
-
-//
-// MessageId: ERROR_UNABLE_TO_INVENTORY_TRANSPORT
-//
-// MessageText:
-//
-// Unable to retrieve status about the transport.
-//
- ERROR_UNABLE_TO_INVENTORY_TRANSPORT = DWORD(4327);
- {$EXTERNALSYM ERROR_UNABLE_TO_INVENTORY_TRANSPORT}
-
-//
-// MessageId: ERROR_TRANSPORT_FULL
-//
-// MessageText:
-//
-// Cannot use the transport because it is already in use.
-//
- ERROR_TRANSPORT_FULL = DWORD(4328);
- {$EXTERNALSYM ERROR_TRANSPORT_FULL}
-
-//
-// MessageId: ERROR_CONTROLLING_IEPORT
-//
-// MessageText:
-//
-// Unable to open or close the inject/eject port.
-//
- ERROR_CONTROLLING_IEPORT = DWORD(4329);
- {$EXTERNALSYM ERROR_CONTROLLING_IEPORT}
-
-//
-// MessageId: ERROR_UNABLE_TO_EJECT_MOUNTED_MEDIA
-//
-// MessageText:
-//
-// Unable to eject the medium because it is in a drive.
-//
- ERROR_UNABLE_TO_EJECT_MOUNTED_MEDIA = DWORD(4330);
- {$EXTERNALSYM ERROR_UNABLE_TO_EJECT_MOUNTED_MEDIA}
-
-//
-// MessageId: ERROR_CLEANER_SLOT_SET
-//
-// MessageText:
-//
-// A cleaner slot is already reserved.
-//
- ERROR_CLEANER_SLOT_SET = DWORD(4331);
- {$EXTERNALSYM ERROR_CLEANER_SLOT_SET}
-
-//
-// MessageId: ERROR_CLEANER_SLOT_NOT_SET
-//
-// MessageText:
-//
-// A cleaner slot is not reserved.
-//
- ERROR_CLEANER_SLOT_NOT_SET = DWORD(4332);
- {$EXTERNALSYM ERROR_CLEANER_SLOT_NOT_SET}
-
-//
-// MessageId: ERROR_CLEANER_CARTRIDGE_SPENT
-//
-// MessageText:
-//
-// The cleaner cartridge has performed the maximum number of drive cleanings.
-//
- ERROR_CLEANER_CARTRIDGE_SPENT = DWORD(4333);
- {$EXTERNALSYM ERROR_CLEANER_CARTRIDGE_SPENT}
-
-//
-// MessageId: ERROR_UNEXPECTED_OMID
-//
-// MessageText:
-//
-// Unexpected on-medium identifier.
-//
- ERROR_UNEXPECTED_OMID = DWORD(4334);
- {$EXTERNALSYM ERROR_UNEXPECTED_OMID}
-
-//
-// MessageId: ERROR_CANT_DELETE_LAST_ITEM
-//
-// MessageText:
-//
-// The last remaining item in this group or resource cannot be deleted.
-//
- ERROR_CANT_DELETE_LAST_ITEM = DWORD(4335);
- {$EXTERNALSYM ERROR_CANT_DELETE_LAST_ITEM}
-
-//
-// MessageId: ERROR_MESSAGE_EXCEEDS_MAX_SIZE
-//
-// MessageText:
-//
-// The message provided exceeds the maximum size allowed for this parameter.
-//
- ERROR_MESSAGE_EXCEEDS_MAX_SIZE = DWORD(4336);
- {$EXTERNALSYM ERROR_MESSAGE_EXCEEDS_MAX_SIZE}
-
-//
-// MessageId: ERROR_VOLUME_CONTAINS_SYS_FILES
-//
-// MessageText:
-//
-// The volume contains system or paging files.
-//
- ERROR_VOLUME_CONTAINS_SYS_FILES = DWORD(4337);
- {$EXTERNALSYM ERROR_VOLUME_CONTAINS_SYS_FILES}
-
-//
-// MessageId: ERROR_INDIGENOUS_TYPE
-//
-// MessageText:
-//
-// The media type cannot be removed from this library since at least one drive in the library reports it can support this media type.
-//
- ERROR_INDIGENOUS_TYPE = DWORD(4338);
- {$EXTERNALSYM ERROR_INDIGENOUS_TYPE}
-
-//
-// MessageId: ERROR_NO_SUPPORTING_DRIVES
-//
-// MessageText:
-//
-// This offline media cannot be mounted on this system since no enabled drives are present which can be used.
-//
- ERROR_NO_SUPPORTING_DRIVES = DWORD(4339);
- {$EXTERNALSYM ERROR_NO_SUPPORTING_DRIVES}
-
-//
-// MessageId: ERROR_CLEANER_CARTRIDGE_INSTALLED
-//
-// MessageText:
-//
-// A cleaner cartridge is present in the tape library.
-//
- ERROR_CLEANER_CARTRIDGE_INSTALLED = DWORD(4340);
- {$EXTERNALSYM ERROR_CLEANER_CARTRIDGE_INSTALLED}
-
-//
-// MessageId: ERROR_IEPORT_FULL
-//
-// MessageText:
-//
-// Cannot use the ieport because it is not empty.
-//
- ERROR_IEPORT_FULL = DWORD(4341);
- {$EXTERNALSYM ERROR_IEPORT_FULL}
-
-////////////////////////////////////////////
-// //
-// NT Remote Storage Service Error Codes //
-// //
-////////////////////////////////////////////
-//
-// MessageId: ERROR_FILE_OFFLINE
-//
-// MessageText:
-//
-// The remote storage service was not able to recall the file.
-//
- ERROR_FILE_OFFLINE = DWORD(4350);
- {$EXTERNALSYM ERROR_FILE_OFFLINE}
-
-//
-// MessageId: ERROR_REMOTE_STORAGE_NOT_ACTIVE
-//
-// MessageText:
-//
-// The remote storage service is not operational at this time.
-//
- ERROR_REMOTE_STORAGE_NOT_ACTIVE = DWORD(4351);
- {$EXTERNALSYM ERROR_REMOTE_STORAGE_NOT_ACTIVE}
-
-//
-// MessageId: ERROR_REMOTE_STORAGE_MEDIA_ERROR
-//
-// MessageText:
-//
-// The remote storage service encountered a media error.
-//
- ERROR_REMOTE_STORAGE_MEDIA_ERROR = DWORD(4352);
- {$EXTERNALSYM ERROR_REMOTE_STORAGE_MEDIA_ERROR}
-
-////////////////////////////////////////////
-// //
-// NT Reparse Points Error Codes //
-// //
-////////////////////////////////////////////
-//
-// MessageId: ERROR_NOT_A_REPARSE_POINT
-//
-// MessageText:
-//
-// The file or directory is not a reparse point.
-//
- ERROR_NOT_A_REPARSE_POINT = DWORD(4390);
- {$EXTERNALSYM ERROR_NOT_A_REPARSE_POINT}
-
-//
-// MessageId: ERROR_REPARSE_ATTRIBUTE_CONFLICT
-//
-// MessageText:
-//
-// The reparse point attribute cannot be set because it conflicts with an existing attribute.
-//
- ERROR_REPARSE_ATTRIBUTE_CONFLICT = DWORD(4391);
- {$EXTERNALSYM ERROR_REPARSE_ATTRIBUTE_CONFLICT}
-
-//
-// MessageId: ERROR_INVALID_REPARSE_DATA
-//
-// MessageText:
-//
-// The data present in the reparse point buffer is invalid.
-//
- ERROR_INVALID_REPARSE_DATA = DWORD(4392);
- {$EXTERNALSYM ERROR_INVALID_REPARSE_DATA}
-
-//
-// MessageId: ERROR_REPARSE_TAG_INVALID
-//
-// MessageText:
-//
-// The tag present in the reparse point buffer is invalid.
-//
- ERROR_REPARSE_TAG_INVALID = DWORD(4393);
- {$EXTERNALSYM ERROR_REPARSE_TAG_INVALID}
-
-//
-// MessageId: ERROR_REPARSE_TAG_MISMATCH
-//
-// MessageText:
-//
-// There is a mismatch between the tag specified in the request and the tag present in the reparse point.
-//
-//
- ERROR_REPARSE_TAG_MISMATCH = DWORD(4394);
- {$EXTERNALSYM ERROR_REPARSE_TAG_MISMATCH}
-
-////////////////////////////////////////////
-// //
-// NT Single Instance Store Error Codes //
-// //
-////////////////////////////////////////////
-//
-// MessageId: ERROR_VOLUME_NOT_SIS_ENABLED
-//
-// MessageText:
-//
-// Single Instance Storage is not available on this volume.
-//
- ERROR_VOLUME_NOT_SIS_ENABLED = DWORD(4500);
- {$EXTERNALSYM ERROR_VOLUME_NOT_SIS_ENABLED}
-
-////////////////////////////////////
-// //
-// Cluster Error Codes //
-// //
-////////////////////////////////////
-//
-// MessageId: ERROR_DEPENDENT_RESOURCE_EXISTS
-//
-// MessageText:
-//
-// The cluster resource cannot be moved to another group because other resources are dependent on it.
-//
- ERROR_DEPENDENT_RESOURCE_EXISTS = DWORD(5001);
- {$EXTERNALSYM ERROR_DEPENDENT_RESOURCE_EXISTS}
-
-//
-// MessageId: ERROR_DEPENDENCY_NOT_FOUND
-//
-// MessageText:
-//
-// The cluster resource dependency cannot be found.
-//
- ERROR_DEPENDENCY_NOT_FOUND = DWORD(5002);
- {$EXTERNALSYM ERROR_DEPENDENCY_NOT_FOUND}
-
-//
-// MessageId: ERROR_DEPENDENCY_ALREADY_EXISTS
-//
-// MessageText:
-//
-// The cluster resource cannot be made dependent on the specified resource because it is already dependent.
-//
- ERROR_DEPENDENCY_ALREADY_EXISTS = DWORD(5003);
- {$EXTERNALSYM ERROR_DEPENDENCY_ALREADY_EXISTS}
-
-//
-// MessageId: ERROR_RESOURCE_NOT_ONLINE
-//
-// MessageText:
-//
-// The cluster resource is not online.
-//
- ERROR_RESOURCE_NOT_ONLINE = DWORD(5004);
- {$EXTERNALSYM ERROR_RESOURCE_NOT_ONLINE}
-
-//
-// MessageId: ERROR_HOST_NODE_NOT_AVAILABLE
-//
-// MessageText:
-//
-// A cluster node is not available for this operation.
-//
- ERROR_HOST_NODE_NOT_AVAILABLE = DWORD(5005);
- {$EXTERNALSYM ERROR_HOST_NODE_NOT_AVAILABLE}
-
-//
-// MessageId: ERROR_RESOURCE_NOT_AVAILABLE
-//
-// MessageText:
-//
-// The cluster resource is not available.
-//
- ERROR_RESOURCE_NOT_AVAILABLE = DWORD(5006);
- {$EXTERNALSYM ERROR_RESOURCE_NOT_AVAILABLE}
-
-//
-// MessageId: ERROR_RESOURCE_NOT_FOUND
-//
-// MessageText:
-//
-// The cluster resource could not be found.
-//
- ERROR_RESOURCE_NOT_FOUND = DWORD(5007);
- {$EXTERNALSYM ERROR_RESOURCE_NOT_FOUND}
-
-//
-// MessageId: ERROR_SHUTDOWN_CLUSTER
-//
-// MessageText:
-//
-// The cluster is being shut down.
-//
- ERROR_SHUTDOWN_CLUSTER = DWORD(5008);
- {$EXTERNALSYM ERROR_SHUTDOWN_CLUSTER}
-
-//
-// MessageId: ERROR_CANT_EVICT_ACTIVE_NODE
-//
-// MessageText:
-//
-// A cluster node cannot be evicted from the cluster unless the node is down or it is the last node.
-//
- ERROR_CANT_EVICT_ACTIVE_NODE = DWORD(5009);
- {$EXTERNALSYM ERROR_CANT_EVICT_ACTIVE_NODE}
-
-//
-// MessageId: ERROR_OBJECT_ALREADY_EXISTS
-//
-// MessageText:
-//
-// The object already exists.
-//
- ERROR_OBJECT_ALREADY_EXISTS = DWORD(5010);
- {$EXTERNALSYM ERROR_OBJECT_ALREADY_EXISTS}
-
-//
-// MessageId: ERROR_OBJECT_IN_LIST
-//
-// MessageText:
-//
-// The object is already in the list.
-//
- ERROR_OBJECT_IN_LIST = DWORD(5011);
- {$EXTERNALSYM ERROR_OBJECT_IN_LIST}
-
-//
-// MessageId: ERROR_GROUP_NOT_AVAILABLE
-//
-// MessageText:
-//
-// The cluster group is not available for any new requests.
-//
- ERROR_GROUP_NOT_AVAILABLE = DWORD(5012);
- {$EXTERNALSYM ERROR_GROUP_NOT_AVAILABLE}
-
-//
-// MessageId: ERROR_GROUP_NOT_FOUND
-//
-// MessageText:
-//
-// The cluster group could not be found.
-//
- ERROR_GROUP_NOT_FOUND = DWORD(5013);
- {$EXTERNALSYM ERROR_GROUP_NOT_FOUND}
-
-//
-// MessageId: ERROR_GROUP_NOT_ONLINE
-//
-// MessageText:
-//
-// The operation could not be completed because the cluster group is not online.
-//
- ERROR_GROUP_NOT_ONLINE = DWORD(5014);
- {$EXTERNALSYM ERROR_GROUP_NOT_ONLINE}
-
-//
-// MessageId: ERROR_HOST_NODE_NOT_RESOURCE_OWNER
-//
-// MessageText:
-//
-// The cluster node is not the owner of the resource.
-//
- ERROR_HOST_NODE_NOT_RESOURCE_OWNER = DWORD(5015);
- {$EXTERNALSYM ERROR_HOST_NODE_NOT_RESOURCE_OWNER}
-
-//
-// MessageId: ERROR_HOST_NODE_NOT_GROUP_OWNER
-//
-// MessageText:
-//
-// The cluster node is not the owner of the group.
-//
- ERROR_HOST_NODE_NOT_GROUP_OWNER = DWORD(5016);
- {$EXTERNALSYM ERROR_HOST_NODE_NOT_GROUP_OWNER}
-
-//
-// MessageId: ERROR_RESMON_CREATE_FAILED
-//
-// MessageText:
-//
-// The cluster resource could not be created in the specified resource monitor.
-//
- ERROR_RESMON_CREATE_FAILED = DWORD(5017);
- {$EXTERNALSYM ERROR_RESMON_CREATE_FAILED}
-
-//
-// MessageId: ERROR_RESMON_ONLINE_FAILED
-//
-// MessageText:
-//
-// The cluster resource could not be brought online by the resource monitor.
-//
- ERROR_RESMON_ONLINE_FAILED = DWORD(5018);
- {$EXTERNALSYM ERROR_RESMON_ONLINE_FAILED}
-
-//
-// MessageId: ERROR_RESOURCE_ONLINE
-//
-// MessageText:
-//
-// The operation could not be completed because the cluster resource is online.
-//
- ERROR_RESOURCE_ONLINE = DWORD(5019);
- {$EXTERNALSYM ERROR_RESOURCE_ONLINE}
-
-//
-// MessageId: ERROR_QUORUM_RESOURCE
-//
-// MessageText:
-//
-// The cluster resource could not be deleted or brought offline because it is the quorum resource.
-//
- ERROR_QUORUM_RESOURCE = DWORD(5020);
- {$EXTERNALSYM ERROR_QUORUM_RESOURCE}
-
-//
-// MessageId: ERROR_NOT_QUORUM_CAPABLE
-//
-// MessageText:
-//
-// The cluster could not make the specified resource a quorum resource because it is not capable of being a quorum resource.
-//
- ERROR_NOT_QUORUM_CAPABLE = DWORD(5021);
- {$EXTERNALSYM ERROR_NOT_QUORUM_CAPABLE}
-
-//
-// MessageId: ERROR_CLUSTER_SHUTTING_DOWN
-//
-// MessageText:
-//
-// The cluster software is shutting down.
-//
- ERROR_CLUSTER_SHUTTING_DOWN = DWORD(5022);
- {$EXTERNALSYM ERROR_CLUSTER_SHUTTING_DOWN}
-
-//
-// MessageId: ERROR_INVALID_STATE
-//
-// MessageText:
-//
-// The group or resource is not in the correct state to perform the requested operation.
-//
- ERROR_INVALID_STATE = DWORD(5023);
- {$EXTERNALSYM ERROR_INVALID_STATE}
-
-//
-// MessageId: ERROR_RESOURCE_PROPERTIES_STORED
-//
-// MessageText:
-//
-// The properties were stored but not all changes will take effect until the next time the resource is brought online.
-//
- ERROR_RESOURCE_PROPERTIES_STORED = DWORD(5024);
- {$EXTERNALSYM ERROR_RESOURCE_PROPERTIES_STORED}
-
-//
-// MessageId: ERROR_NOT_QUORUM_CLASS
-//
-// MessageText:
-//
-// The cluster could not make the specified resource a quorum resource because it does not belong to a shared storage class.
-//
- ERROR_NOT_QUORUM_CLASS = DWORD(5025);
- {$EXTERNALSYM ERROR_NOT_QUORUM_CLASS}
-
-//
-// MessageId: ERROR_CORE_RESOURCE
-//
-// MessageText:
-//
-// The cluster resource could not be deleted since it is a core resource.
-//
- ERROR_CORE_RESOURCE = DWORD(5026);
- {$EXTERNALSYM ERROR_CORE_RESOURCE}
-
-//
-// MessageId: ERROR_QUORUM_RESOURCE_ONLINE_FAILED
-//
-// MessageText:
-//
-// The quorum resource failed to come online.
-//
- ERROR_QUORUM_RESOURCE_ONLINE_FAILED = DWORD(5027);
- {$EXTERNALSYM ERROR_QUORUM_RESOURCE_ONLINE_FAILED}
-
-//
-// MessageId: ERROR_QUORUMLOG_OPEN_FAILED
-//
-// MessageText:
-//
-// The quorum log could not be created or mounted successfully.
-//
- ERROR_QUORUMLOG_OPEN_FAILED = DWORD(5028);
- {$EXTERNALSYM ERROR_QUORUMLOG_OPEN_FAILED}
-
-//
-// MessageId: ERROR_CLUSTERLOG_CORRUPT
-//
-// MessageText:
-//
-// The cluster log is corrupt.
-//
- ERROR_CLUSTERLOG_CORRUPT = DWORD(5029);
- {$EXTERNALSYM ERROR_CLUSTERLOG_CORRUPT}
-
-//
-// MessageId: ERROR_CLUSTERLOG_RECORD_EXCEEDS_MAXSIZE
-//
-// MessageText:
-//
-// The record could not be written to the cluster log since it exceeds the maximum size.
-//
- ERROR_CLUSTERLOG_RECORD_EXCEEDS_MAXSIZE = DWORD(5030);
- {$EXTERNALSYM ERROR_CLUSTERLOG_RECORD_EXCEEDS_MAXSIZE}
-
-//
-// MessageId: ERROR_CLUSTERLOG_EXCEEDS_MAXSIZE
-//
-// MessageText:
-//
-// The cluster log exceeds its maximum size.
-//
- ERROR_CLUSTERLOG_EXCEEDS_MAXSIZE = DWORD(5031);
- {$EXTERNALSYM ERROR_CLUSTERLOG_EXCEEDS_MAXSIZE}
-
-//
-// MessageId: ERROR_CLUSTERLOG_CHKPOINT_NOT_FOUND
-//
-// MessageText:
-//
-// No checkpoint record was found in the cluster log.
-//
- ERROR_CLUSTERLOG_CHKPOINT_NOT_FOUND = DWORD(5032);
- {$EXTERNALSYM ERROR_CLUSTERLOG_CHKPOINT_NOT_FOUND}
-
-//
-// MessageId: ERROR_CLUSTERLOG_NOT_ENOUGH_SPACE
-//
-// MessageText:
-//
-// The minimum required disk space needed for logging is not available.
-//
- ERROR_CLUSTERLOG_NOT_ENOUGH_SPACE = DWORD(5033);
- {$EXTERNALSYM ERROR_CLUSTERLOG_NOT_ENOUGH_SPACE}
-
-//
-// MessageId: ERROR_QUORUM_OWNER_ALIVE
-//
-// MessageText:
-//
-// The cluster node failed to take control of the quorum resource because the resource is owned by another active node.
-//
- ERROR_QUORUM_OWNER_ALIVE = DWORD(5034);
- {$EXTERNALSYM ERROR_QUORUM_OWNER_ALIVE}
-
-//
-// MessageId: ERROR_NETWORK_NOT_AVAILABLE
-//
-// MessageText:
-//
-// A cluster network is not available for this operation.
-//
- ERROR_NETWORK_NOT_AVAILABLE = DWORD(5035);
- {$EXTERNALSYM ERROR_NETWORK_NOT_AVAILABLE}
-
-//
-// MessageId: ERROR_NODE_NOT_AVAILABLE
-//
-// MessageText:
-//
-// A cluster node is not available for this operation.
-//
- ERROR_NODE_NOT_AVAILABLE = DWORD(5036);
- {$EXTERNALSYM ERROR_NODE_NOT_AVAILABLE}
-
-//
-// MessageId: ERROR_ALL_NODES_NOT_AVAILABLE
-//
-// MessageText:
-//
-// All cluster nodes must be running to perform this operation.
-//
- ERROR_ALL_NODES_NOT_AVAILABLE = DWORD(5037);
- {$EXTERNALSYM ERROR_ALL_NODES_NOT_AVAILABLE}
-
-//
-// MessageId: ERROR_RESOURCE_FAILED
-//
-// MessageText:
-//
-// A cluster resource failed.
-//
- ERROR_RESOURCE_FAILED = DWORD(5038);
- {$EXTERNALSYM ERROR_RESOURCE_FAILED}
-
-//
-// MessageId: ERROR_CLUSTER_INVALID_NODE
-//
-// MessageText:
-//
-// The cluster node is not valid.
-//
- ERROR_CLUSTER_INVALID_NODE = DWORD(5039);
- {$EXTERNALSYM ERROR_CLUSTER_INVALID_NODE}
-
-//
-// MessageId: ERROR_CLUSTER_NODE_EXISTS
-//
-// MessageText:
-//
-// The cluster node already exists.
-//
- ERROR_CLUSTER_NODE_EXISTS = DWORD(5040);
- {$EXTERNALSYM ERROR_CLUSTER_NODE_EXISTS}
-
-//
-// MessageId: ERROR_CLUSTER_JOIN_IN_PROGRESS
-//
-// MessageText:
-//
-// A node is in the process of joining the cluster.
-//
- ERROR_CLUSTER_JOIN_IN_PROGRESS = DWORD(5041);
- {$EXTERNALSYM ERROR_CLUSTER_JOIN_IN_PROGRESS}
-
-//
-// MessageId: ERROR_CLUSTER_NODE_NOT_FOUND
-//
-// MessageText:
-//
-// The cluster node was not found.
-//
- ERROR_CLUSTER_NODE_NOT_FOUND = DWORD(5042);
- {$EXTERNALSYM ERROR_CLUSTER_NODE_NOT_FOUND}
-
-//
-// MessageId: ERROR_CLUSTER_LOCAL_NODE_NOT_FOUND
-//
-// MessageText:
-//
-// The cluster local node information was not found.
-//
- ERROR_CLUSTER_LOCAL_NODE_NOT_FOUND = DWORD(5043);
- {$EXTERNALSYM ERROR_CLUSTER_LOCAL_NODE_NOT_FOUND}
-
-//
-// MessageId: ERROR_CLUSTER_NETWORK_EXISTS
-//
-// MessageText:
-//
-// The cluster network already exists.
-//
- ERROR_CLUSTER_NETWORK_EXISTS = DWORD(5044);
- {$EXTERNALSYM ERROR_CLUSTER_NETWORK_EXISTS}
-
-//
-// MessageId: ERROR_CLUSTER_NETWORK_NOT_FOUND
-//
-// MessageText:
-//
-// The cluster network was not found.
-//
- ERROR_CLUSTER_NETWORK_NOT_FOUND = DWORD(5045);
- {$EXTERNALSYM ERROR_CLUSTER_NETWORK_NOT_FOUND}
-
-//
-// MessageId: ERROR_CLUSTER_NETINTERFACE_EXISTS
-//
-// MessageText:
-//
-// The cluster network interface already exists.
-//
- ERROR_CLUSTER_NETINTERFACE_EXISTS = DWORD(5046);
- {$EXTERNALSYM ERROR_CLUSTER_NETINTERFACE_EXISTS}
-
-//
-// MessageId: ERROR_CLUSTER_NETINTERFACE_NOT_FOUND
-//
-// MessageText:
-//
-// The cluster network interface was not found.
-//
- ERROR_CLUSTER_NETINTERFACE_NOT_FOUND = DWORD(5047);
- {$EXTERNALSYM ERROR_CLUSTER_NETINTERFACE_NOT_FOUND}
-
-//
-// MessageId: ERROR_CLUSTER_INVALID_REQUEST
-//
-// MessageText:
-//
-// The cluster request is not valid for this object.
-//
- ERROR_CLUSTER_INVALID_REQUEST = DWORD(5048);
- {$EXTERNALSYM ERROR_CLUSTER_INVALID_REQUEST}
-
-//
-// MessageId: ERROR_CLUSTER_INVALID_NETWORK_PROVIDER
-//
-// MessageText:
-//
-// The cluster network provider is not valid.
-//
- ERROR_CLUSTER_INVALID_NETWORK_PROVIDER = DWORD(5049);
- {$EXTERNALSYM ERROR_CLUSTER_INVALID_NETWORK_PROVIDER}
-
-//
-// MessageId: ERROR_CLUSTER_NODE_DOWN
-//
-// MessageText:
-//
-// The cluster node is down.
-//
- ERROR_CLUSTER_NODE_DOWN = DWORD(5050);
- {$EXTERNALSYM ERROR_CLUSTER_NODE_DOWN}
-
-//
-// MessageId: ERROR_CLUSTER_NODE_UNREACHABLE
-//
-// MessageText:
-//
-// The cluster node is not reachable.
-//
- ERROR_CLUSTER_NODE_UNREACHABLE = DWORD(5051);
- {$EXTERNALSYM ERROR_CLUSTER_NODE_UNREACHABLE}
-
-//
-// MessageId: ERROR_CLUSTER_NODE_NOT_MEMBER
-//
-// MessageText:
-//
-// The cluster node is not a member of the cluster.
-//
- ERROR_CLUSTER_NODE_NOT_MEMBER = DWORD(5052);
- {$EXTERNALSYM ERROR_CLUSTER_NODE_NOT_MEMBER}
-
-//
-// MessageId: ERROR_CLUSTER_JOIN_NOT_IN_PROGRESS
-//
-// MessageText:
-//
-// A cluster join operation is not in progress.
-//
- ERROR_CLUSTER_JOIN_NOT_IN_PROGRESS = DWORD(5053);
- {$EXTERNALSYM ERROR_CLUSTER_JOIN_NOT_IN_PROGRESS}
-
-//
-// MessageId: ERROR_CLUSTER_INVALID_NETWORK
-//
-// MessageText:
-//
-// The cluster network is not valid.
-//
- ERROR_CLUSTER_INVALID_NETWORK = DWORD(5054);
- {$EXTERNALSYM ERROR_CLUSTER_INVALID_NETWORK}
-
-//
-// MessageId: ERROR_CLUSTER_NODE_UP
-//
-// MessageText:
-//
-// The cluster node is up.
-//
- ERROR_CLUSTER_NODE_UP = DWORD(5056);
- {$EXTERNALSYM ERROR_CLUSTER_NODE_UP}
-
-//
-// MessageId: ERROR_CLUSTER_IPADDR_IN_USE
-//
-// MessageText:
-//
-// The cluster IP address is already in use.
-//
- ERROR_CLUSTER_IPADDR_IN_USE = DWORD(5057);
- {$EXTERNALSYM ERROR_CLUSTER_IPADDR_IN_USE}
-
-//
-// MessageId: ERROR_CLUSTER_NODE_NOT_PAUSED
-//
-// MessageText:
-//
-// The cluster node is not paused.
-//
- ERROR_CLUSTER_NODE_NOT_PAUSED = DWORD(5058);
- {$EXTERNALSYM ERROR_CLUSTER_NODE_NOT_PAUSED}
-
-//
-// MessageId: ERROR_CLUSTER_NO_SECURITY_CONTEXT
-//
-// MessageText:
-//
-// No cluster security context is available.
-//
- ERROR_CLUSTER_NO_SECURITY_CONTEXT = DWORD(5059);
- {$EXTERNALSYM ERROR_CLUSTER_NO_SECURITY_CONTEXT}
-
-//
-// MessageId: ERROR_CLUSTER_NETWORK_NOT_INTERNAL
-//
-// MessageText:
-//
-// The cluster network is not configured for internal cluster communication.
-//
- ERROR_CLUSTER_NETWORK_NOT_INTERNAL = DWORD(5060);
- {$EXTERNALSYM ERROR_CLUSTER_NETWORK_NOT_INTERNAL}
-
-//
-// MessageId: ERROR_CLUSTER_NODE_ALREADY_UP
-//
-// MessageText:
-//
-// The cluster node is already up.
-//
- ERROR_CLUSTER_NODE_ALREADY_UP = DWORD(5061);
- {$EXTERNALSYM ERROR_CLUSTER_NODE_ALREADY_UP}
-
-//
-// MessageId: ERROR_CLUSTER_NODE_ALREADY_DOWN
-//
-// MessageText:
-//
-// The cluster node is already down.
-//
- ERROR_CLUSTER_NODE_ALREADY_DOWN = DWORD(5062);
- {$EXTERNALSYM ERROR_CLUSTER_NODE_ALREADY_DOWN}
-
-//
-// MessageId: ERROR_CLUSTER_NETWORK_ALREADY_ONLINE
-//
-// MessageText:
-//
-// The cluster network is already online.
-//
- ERROR_CLUSTER_NETWORK_ALREADY_ONLINE = DWORD(5063);
- {$EXTERNALSYM ERROR_CLUSTER_NETWORK_ALREADY_ONLINE}
-
-//
-// MessageId: ERROR_CLUSTER_NETWORK_ALREADY_OFFLINE
-//
-// MessageText:
-//
-// The cluster network is already offline.
-//
- ERROR_CLUSTER_NETWORK_ALREADY_OFFLINE = DWORD(5064);
- {$EXTERNALSYM ERROR_CLUSTER_NETWORK_ALREADY_OFFLINE}
-
-//
-// MessageId: ERROR_CLUSTER_NODE_ALREADY_MEMBER
-//
-// MessageText:
-//
-// The cluster node is already a member of the cluster.
-//
- ERROR_CLUSTER_NODE_ALREADY_MEMBER = DWORD(5065);
- {$EXTERNALSYM ERROR_CLUSTER_NODE_ALREADY_MEMBER}
-
-//
-// MessageId: ERROR_CLUSTER_LAST_INTERNAL_NETWORK
-//
-// MessageText:
-//
-// The cluster network is the only one configured for internal cluster communication between two or more active cluster nodes. The internal communication capability cannot be removed from the network.
-//
- ERROR_CLUSTER_LAST_INTERNAL_NETWORK = DWORD(5066);
- {$EXTERNALSYM ERROR_CLUSTER_LAST_INTERNAL_NETWORK}
-
-//
-// MessageId: ERROR_CLUSTER_NETWORK_HAS_DEPENDENTS
-//
-// MessageText:
-//
-// One or more cluster resources depend on the network to provide service to clients. The client access capability cannot be removed from the network.
-//
- ERROR_CLUSTER_NETWORK_HAS_DEPENDENTS = DWORD(5067);
- {$EXTERNALSYM ERROR_CLUSTER_NETWORK_HAS_DEPENDENTS}
-
-//
-// MessageId: ERROR_INVALID_OPERATION_ON_QUORUM
-//
-// MessageText:
-//
-// This operation cannot be performed on the cluster resource as it the quorum resource. You may not bring the quorum resource offline or modify its possible owners list.
-//
- ERROR_INVALID_OPERATION_ON_QUORUM = DWORD(5068);
- {$EXTERNALSYM ERROR_INVALID_OPERATION_ON_QUORUM}
-
-//
-// MessageId: ERROR_DEPENDENCY_NOT_ALLOWED
-//
-// MessageText:
-//
-// The cluster quorum resource is not allowed to have any dependencies.
-//
- ERROR_DEPENDENCY_NOT_ALLOWED = DWORD(5069);
- {$EXTERNALSYM ERROR_DEPENDENCY_NOT_ALLOWED}
-
-//
-// MessageId: ERROR_CLUSTER_NODE_PAUSED
-//
-// MessageText:
-//
-// The cluster node is paused.
-//
- ERROR_CLUSTER_NODE_PAUSED = DWORD(5070);
- {$EXTERNALSYM ERROR_CLUSTER_NODE_PAUSED}
-
-//
-// MessageId: ERROR_NODE_CANT_HOST_RESOURCE
-//
-// MessageText:
-//
-// The cluster resource cannot be brought online. The owner node cannot run this resource.
-//
- ERROR_NODE_CANT_HOST_RESOURCE = DWORD(5071);
- {$EXTERNALSYM ERROR_NODE_CANT_HOST_RESOURCE}
-
-//
-// MessageId: ERROR_CLUSTER_NODE_NOT_READY
-//
-// MessageText:
-//
-// The cluster node is not ready to perform the requested operation.
-//
- ERROR_CLUSTER_NODE_NOT_READY = DWORD(5072);
- {$EXTERNALSYM ERROR_CLUSTER_NODE_NOT_READY}
-
-//
-// MessageId: ERROR_CLUSTER_NODE_SHUTTING_DOWN
-//
-// MessageText:
-//
-// The cluster node is shutting down.
-//
- ERROR_CLUSTER_NODE_SHUTTING_DOWN = DWORD(5073);
- {$EXTERNALSYM ERROR_CLUSTER_NODE_SHUTTING_DOWN}
-
-//
-// MessageId: ERROR_CLUSTER_JOIN_ABORTED
-//
-// MessageText:
-//
-// The cluster join operation was aborted.
-//
- ERROR_CLUSTER_JOIN_ABORTED = DWORD(5074);
- {$EXTERNALSYM ERROR_CLUSTER_JOIN_ABORTED}
-
-//
-// MessageId: ERROR_CLUSTER_INCOMPATIBLE_VERSIONS
-//
-// MessageText:
-//
-// The cluster join operation failed due to incompatible software versions between the joining node and its sponsor.
-//
- ERROR_CLUSTER_INCOMPATIBLE_VERSIONS = DWORD(5075);
- {$EXTERNALSYM ERROR_CLUSTER_INCOMPATIBLE_VERSIONS}
-
-//
-// MessageId: ERROR_CLUSTER_MAXNUM_OF_RESOURCES_EXCEEDED
-//
-// MessageText:
-//
-// This resource cannot be created because the cluster has reached the limit on the number of resources it can monitor.
-//
- ERROR_CLUSTER_MAXNUM_OF_RESOURCES_EXCEEDED = DWORD(5076);
- {$EXTERNALSYM ERROR_CLUSTER_MAXNUM_OF_RESOURCES_EXCEEDED}
-
-//
-// MessageId: ERROR_CLUSTER_SYSTEM_CONFIG_CHANGED
-//
-// MessageText:
-//
-// The system configuration changed during the cluster join or form operation. The join or form operation was aborted.
-//
- ERROR_CLUSTER_SYSTEM_CONFIG_CHANGED = DWORD(5077);
- {$EXTERNALSYM ERROR_CLUSTER_SYSTEM_CONFIG_CHANGED}
-
-//
-// MessageId: ERROR_CLUSTER_RESOURCE_TYPE_NOT_FOUND
-//
-// MessageText:
-//
-// The specified resource type was not found.
-//
- ERROR_CLUSTER_RESOURCE_TYPE_NOT_FOUND = DWORD(5078);
- {$EXTERNALSYM ERROR_CLUSTER_RESOURCE_TYPE_NOT_FOUND}
-
-//
-// MessageId: ERROR_CLUSTER_RESTYPE_NOT_SUPPORTED
-//
-// MessageText:
-//
-// The specified node does not support a resource of this type. This may be due to version inconsistencies or due to the absence of the resource DLL on this node.
-//
- ERROR_CLUSTER_RESTYPE_NOT_SUPPORTED = DWORD(5079);
- {$EXTERNALSYM ERROR_CLUSTER_RESTYPE_NOT_SUPPORTED}
-
-//
-// MessageId: ERROR_CLUSTER_RESNAME_NOT_FOUND
-//
-// MessageText:
-//
-// The specified resource name is not supported by this resource DLL. This may be due to a bad (or changed) name supplied to the resource DLL.
-//
- ERROR_CLUSTER_RESNAME_NOT_FOUND = DWORD(5080);
- {$EXTERNALSYM ERROR_CLUSTER_RESNAME_NOT_FOUND}
-
-//
-// MessageId: ERROR_CLUSTER_NO_RPC_PACKAGES_REGISTERED
-//
-// MessageText:
-//
-// No authentication package could be registered with the RPC server.
-//
- ERROR_CLUSTER_NO_RPC_PACKAGES_REGISTERED = DWORD(5081);
- {$EXTERNALSYM ERROR_CLUSTER_NO_RPC_PACKAGES_REGISTERED}
-
-//
-// MessageId: ERROR_CLUSTER_OWNER_NOT_IN_PREFLIST
-//
-// MessageText:
-//
-// You cannot bring the group online because the owner of the group is not in the preferred list for the group. To change the owner node for the group, move the group.
-//
- ERROR_CLUSTER_OWNER_NOT_IN_PREFLIST = DWORD(5082);
- {$EXTERNALSYM ERROR_CLUSTER_OWNER_NOT_IN_PREFLIST}
-
-//
-// MessageId: ERROR_CLUSTER_DATABASE_SEQMISMATCH
-//
-// MessageText:
-//
-// The join operation failed because the cluster database sequence number has changed or is incompatible with the locker node. This may happen during a join operation if the cluster database was changing during the join.
-//
- ERROR_CLUSTER_DATABASE_SEQMISMATCH = DWORD(5083);
- {$EXTERNALSYM ERROR_CLUSTER_DATABASE_SEQMISMATCH}
-
-//
-// MessageId: ERROR_RESMON_INVALID_STATE
-//
-// MessageText:
-//
-// The resource monitor will not allow the fail operation to be performed while the resource is in its current state. This may happen if the resource is in a pending state.
-//
- ERROR_RESMON_INVALID_STATE = DWORD(5084);
- {$EXTERNALSYM ERROR_RESMON_INVALID_STATE}
-
-//
-// MessageId: ERROR_CLUSTER_GUM_NOT_LOCKER
-//
-// MessageText:
-//
-// A non locker code got a request to reserve the lock for making global updates.
-//
- ERROR_CLUSTER_GUM_NOT_LOCKER = DWORD(5085);
- {$EXTERNALSYM ERROR_CLUSTER_GUM_NOT_LOCKER}
-
-//
-// MessageId: ERROR_QUORUM_DISK_NOT_FOUND
-//
-// MessageText:
-//
-// The quorum disk could not be located by the cluster service.
-//
- ERROR_QUORUM_DISK_NOT_FOUND = DWORD(5086);
- {$EXTERNALSYM ERROR_QUORUM_DISK_NOT_FOUND}
-
-//
-// MessageId: ERROR_DATABASE_BACKUP_CORRUPT
-//
-// MessageText:
-//
-// The backed up cluster database is possibly corrupt.
-//
- ERROR_DATABASE_BACKUP_CORRUPT = DWORD(5087);
- {$EXTERNALSYM ERROR_DATABASE_BACKUP_CORRUPT}
-
-//
-// MessageId: ERROR_CLUSTER_NODE_ALREADY_HAS_DFS_ROOT
-//
-// MessageText:
-//
-// A DFS root already exists in this cluster node.
-//
- ERROR_CLUSTER_NODE_ALREADY_HAS_DFS_ROOT = DWORD(5088);
- {$EXTERNALSYM ERROR_CLUSTER_NODE_ALREADY_HAS_DFS_ROOT}
-
-//
-// MessageId: ERROR_RESOURCE_PROPERTY_UNCHANGEABLE
-//
-// MessageText:
-//
-// An attempt to modify a resource property failed because it conflicts with another existing property.
-//
- ERROR_RESOURCE_PROPERTY_UNCHANGEABLE = DWORD(5089);
- {$EXTERNALSYM ERROR_RESOURCE_PROPERTY_UNCHANGEABLE}
-
-{
- Codes from 4300 through 5889 overlap with codes in ds\published\inc\apperr2.w.
- Do not add any more error codes in that range.
-}
-
-//
-// MessageId: ERROR_CLUSTER_MEMBERSHIP_INVALID_STATE
-//
-// MessageText:
-//
-// An operation was attempted that is incompatible with the current membership state of the node.
-//
- ERROR_CLUSTER_MEMBERSHIP_INVALID_STATE = DWORD(5890);
- {$EXTERNALSYM ERROR_CLUSTER_MEMBERSHIP_INVALID_STATE}
-
-//
-// MessageId: ERROR_CLUSTER_QUORUMLOG_NOT_FOUND
-//
-// MessageText:
-//
-// The quorum resource does not contain the quorum log.
-//
- ERROR_CLUSTER_QUORUMLOG_NOT_FOUND = DWORD(5891);
- {$EXTERNALSYM ERROR_CLUSTER_QUORUMLOG_NOT_FOUND}
-
-//
-// MessageId: ERROR_CLUSTER_MEMBERSHIP_HALT
-//
-// MessageText:
-//
-// The membership engine requested shutdown of the cluster service on this node.
-//
- ERROR_CLUSTER_MEMBERSHIP_HALT = DWORD(5892);
- {$EXTERNALSYM ERROR_CLUSTER_MEMBERSHIP_HALT}
-
-//
-// MessageId: ERROR_CLUSTER_INSTANCE_ID_MISMATCH
-//
-// MessageText:
-//
-// The join operation failed because the cluster instance ID of the joining node does not match the cluster instance ID of the sponsor node.
-//
- ERROR_CLUSTER_INSTANCE_ID_MISMATCH = DWORD(5893);
- {$EXTERNALSYM ERROR_CLUSTER_INSTANCE_ID_MISMATCH}
-
-//
-// MessageId: ERROR_CLUSTER_NETWORK_NOT_FOUND_FOR_IP
-//
-// MessageText:
-//
-// A matching network for the specified IP address could not be found. Please also specify a subnet mask and a cluster network.
-//
- ERROR_CLUSTER_NETWORK_NOT_FOUND_FOR_IP = DWORD(5894);
- {$EXTERNALSYM ERROR_CLUSTER_NETWORK_NOT_FOUND_FOR_IP}
-
-//
-// MessageId: ERROR_CLUSTER_PROPERTY_DATA_TYPE_MISMATCH
-//
-// MessageText:
-//
-// The actual data type of the property did not match the expected data type of the property.
-//
- ERROR_CLUSTER_PROPERTY_DATA_TYPE_MISMATCH = DWORD(5895);
- {$EXTERNALSYM ERROR_CLUSTER_PROPERTY_DATA_TYPE_MISMATCH}
-
-//
-// MessageId: ERROR_CLUSTER_EVICT_WITHOUT_CLEANUP
-//
-// MessageText:
-//
-// The cluster node was evicted from the cluster successfully, but the node was not cleaned up. Extended status information explaining why the node was not cleaned up is available.
-//
- ERROR_CLUSTER_EVICT_WITHOUT_CLEANUP = DWORD(5896);
- {$EXTERNALSYM ERROR_CLUSTER_EVICT_WITHOUT_CLEANUP}
-
-//
-// MessageId: ERROR_CLUSTER_PARAMETER_MISMATCH
-//
-// MessageText:
-//
-// Two or more parameter values specified for a resource's properties are in conflict.
-//
- ERROR_CLUSTER_PARAMETER_MISMATCH = DWORD(5897);
- {$EXTERNALSYM ERROR_CLUSTER_PARAMETER_MISMATCH}
-
-//
-// MessageId: ERROR_NODE_CANNOT_BE_CLUSTERED
-//
-// MessageText:
-//
-// This computer cannot be made a member of a cluster.
-//
- ERROR_NODE_CANNOT_BE_CLUSTERED = DWORD(5898);
- {$EXTERNALSYM ERROR_NODE_CANNOT_BE_CLUSTERED}
-
-//
-// MessageId: ERROR_CLUSTER_WRONG_OS_VERSION
-//
-// MessageText:
-//
-// This computer cannot be made a member of a cluster because it does not have the correct version of Windows installed.
-//
- ERROR_CLUSTER_WRONG_OS_VERSION = DWORD(5899);
- {$EXTERNALSYM ERROR_CLUSTER_WRONG_OS_VERSION}
-
-//
-// MessageId: ERROR_CLUSTER_CANT_CREATE_DUP_CLUSTER_NAME
-//
-// MessageText:
-//
-// A cluster cannot be created with the specified cluster name because that cluster name is already in use. Specify a different name for the cluster.
-//
- ERROR_CLUSTER_CANT_CREATE_DUP_CLUSTER_NAME = DWORD(5900);
- {$EXTERNALSYM ERROR_CLUSTER_CANT_CREATE_DUP_CLUSTER_NAME}
-
-//
-// MessageId: ERROR_CLUSCFG_ALREADY_COMMITTED
-//
-// MessageText:
-//
-// The cluster configuration action has already been committed.
-//
- ERROR_CLUSCFG_ALREADY_COMMITTED = DWORD(5901);
- {$EXTERNALSYM ERROR_CLUSCFG_ALREADY_COMMITTED}
-
-//
-// MessageId: ERROR_CLUSCFG_ROLLBACK_FAILED
-//
-// MessageText:
-//
-// The cluster configuration action could not be rolled back.
-//
- ERROR_CLUSCFG_ROLLBACK_FAILED = DWORD(5902);
- {$EXTERNALSYM ERROR_CLUSCFG_ROLLBACK_FAILED}
-
-//
-// MessageId: ERROR_CLUSCFG_SYSTEM_DISK_DRIVE_LETTER_CONFLICT
-//
-// MessageText:
-//
-// The drive letter assigned to a system disk on one node conflicted with the drive letter assigned to a disk on another node.
-//
- ERROR_CLUSCFG_SYSTEM_DISK_DRIVE_LETTER_CONFLICT = DWORD(5903);
- {$EXTERNALSYM ERROR_CLUSCFG_SYSTEM_DISK_DRIVE_LETTER_CONFLICT}
-
-//
-// MessageId: ERROR_CLUSTER_OLD_VERSION
-//
-// MessageText:
-//
-// One or more nodes in the cluster are running a version of Windows that does not support this operation.
-//
- ERROR_CLUSTER_OLD_VERSION = DWORD(5904);
- {$EXTERNALSYM ERROR_CLUSTER_OLD_VERSION}
-
-//
-// MessageId: ERROR_CLUSTER_MISMATCHED_COMPUTER_ACCT_NAME
-//
-// MessageText:
-//
-// The name of the corresponding computer account doesn't match the Network Name for this resource.
-//
- ERROR_CLUSTER_MISMATCHED_COMPUTER_ACCT_NAME = DWORD(5905);
- {$EXTERNALSYM ERROR_CLUSTER_MISMATCHED_COMPUTER_ACCT_NAME}
-
-////////////////////////////////////
-// //
-// EFS Error Codes //
-// //
-////////////////////////////////////
-//
-// MessageId: ERROR_ENCRYPTION_FAILED
-//
-// MessageText:
-//
-// The specified file could not be encrypted.
-//
- ERROR_ENCRYPTION_FAILED = DWORD(6000);
- {$EXTERNALSYM ERROR_ENCRYPTION_FAILED}
-
-//
-// MessageId: ERROR_DECRYPTION_FAILED
-//
-// MessageText:
-//
-// The specified file could not be decrypted.
-//
- ERROR_DECRYPTION_FAILED = DWORD(6001);
- {$EXTERNALSYM ERROR_DECRYPTION_FAILED}
-
-//
-// MessageId: ERROR_FILE_ENCRYPTED
-//
-// MessageText:
-//
-// The specified file is encrypted and the user does not have the ability to decrypt it.
-//
- ERROR_FILE_ENCRYPTED = DWORD(6002);
- {$EXTERNALSYM ERROR_FILE_ENCRYPTED}
-
-//
-// MessageId: ERROR_NO_RECOVERY_POLICY
-//
-// MessageText:
-//
-// There is no valid encryption recovery policy configured for this system.
-//
- ERROR_NO_RECOVERY_POLICY = DWORD(6003);
- {$EXTERNALSYM ERROR_NO_RECOVERY_POLICY}
-
-//
-// MessageId: ERROR_NO_EFS
-//
-// MessageText:
-//
-// The required encryption driver is not loaded for this system.
-//
- ERROR_NO_EFS = DWORD(6004);
- {$EXTERNALSYM ERROR_NO_EFS}
-
-//
-// MessageId: ERROR_WRONG_EFS
-//
-// MessageText:
-//
-// The file was encrypted with a different encryption driver than is currently loaded.
-//
- ERROR_WRONG_EFS = DWORD(6005);
- {$EXTERNALSYM ERROR_WRONG_EFS}
-
-//
-// MessageId: ERROR_NO_USER_KEYS
-//
-// MessageText:
-//
-// There are no EFS keys defined for the user.
-//
- ERROR_NO_USER_KEYS = DWORD(6006);
- {$EXTERNALSYM ERROR_NO_USER_KEYS}
-
-//
-// MessageId: ERROR_FILE_NOT_ENCRYPTED
-//
-// MessageText:
-//
-// The specified file is not encrypted.
-//
- ERROR_FILE_NOT_ENCRYPTED = DWORD(6007);
- {$EXTERNALSYM ERROR_FILE_NOT_ENCRYPTED}
-
-//
-// MessageId: ERROR_NOT_EXPORT_FORMAT
-//
-// MessageText:
-//
-// The specified file is not in the defined EFS export format.
-//
- ERROR_NOT_EXPORT_FORMAT = DWORD(6008);
- {$EXTERNALSYM ERROR_NOT_EXPORT_FORMAT}
-
-//
-// MessageId: ERROR_FILE_READ_ONLY
-//
-// MessageText:
-//
-// The specified file is read only.
-//
- ERROR_FILE_READ_ONLY = DWORD(6009);
- {$EXTERNALSYM ERROR_FILE_READ_ONLY}
-
-//
-// MessageId: ERROR_DIR_EFS_DISALLOWED
-//
-// MessageText:
-//
-// The directory has been disabled for encryption.
-//
- ERROR_DIR_EFS_DISALLOWED = DWORD(6010);
- {$EXTERNALSYM ERROR_DIR_EFS_DISALLOWED}
-
-//
-// MessageId: ERROR_EFS_SERVER_NOT_TRUSTED
-//
-// MessageText:
-//
-// The server is not trusted for remote encryption operation.
-//
- ERROR_EFS_SERVER_NOT_TRUSTED = DWORD(6011);
- {$EXTERNALSYM ERROR_EFS_SERVER_NOT_TRUSTED}
-
-//
-// MessageId: ERROR_BAD_RECOVERY_POLICY
-//
-// MessageText:
-//
-// Recovery policy configured for this system contains invalid recovery certificate.
-//
- ERROR_BAD_RECOVERY_POLICY = DWORD(6012);
- {$EXTERNALSYM ERROR_BAD_RECOVERY_POLICY}
-
-//
-// MessageId: ERROR_EFS_ALG_BLOB_TOO_BIG
-//
-// MessageText:
-//
-// The encryption algorithm used on the source file needs a bigger key buffer than the one on the destination file.
-//
- ERROR_EFS_ALG_BLOB_TOO_BIG = DWORD(6013);
- {$EXTERNALSYM ERROR_EFS_ALG_BLOB_TOO_BIG}
-
-//
-// MessageId: ERROR_VOLUME_NOT_SUPPORT_EFS
-//
-// MessageText:
-//
-// The disk partition does not support file encryption.
-//
- ERROR_VOLUME_NOT_SUPPORT_EFS = DWORD(6014);
- {$EXTERNALSYM ERROR_VOLUME_NOT_SUPPORT_EFS}
-
-//
-// MessageId: ERROR_EFS_DISABLED
-//
-// MessageText:
-//
-// This machine is disabled for file encryption.
-//
- ERROR_EFS_DISABLED = DWORD(6015);
- {$EXTERNALSYM ERROR_EFS_DISABLED}
-
-//
-// MessageId: ERROR_EFS_VERSION_NOT_SUPPORT
-//
-// MessageText:
-//
-// A newer system is required to decrypt this encrypted file.
-//
- ERROR_EFS_VERSION_NOT_SUPPORT = DWORD(6016);
- {$EXTERNALSYM ERROR_EFS_VERSION_NOT_SUPPORT}
-
-// This message number is for historical purposes and cannot be changed or re-used.
-//
-// MessageId: ERROR_NO_BROWSER_SERVERS_FOUND
-//
-// MessageText:
-//
-// The list of servers for this workgroup is not currently available
-//
- ERROR_NO_BROWSER_SERVERS_FOUND = DWORD(6118);
- {$EXTERNALSYM ERROR_NO_BROWSER_SERVERS_FOUND}
-
-//////////////////////////////////////////////////////////////////
-// //
-// Task Scheduler Error Codes that NET START must understand //
-// //
-//////////////////////////////////////////////////////////////////
-//
-// MessageId: SCHED_E_SERVICE_NOT_LOCALSYSTEM
-//
-// MessageText:
-//
-// The Task Scheduler service must be configured to run in the System account to function properly. Individual tasks may be configured to run in other accounts.
-//
- SCHED_E_SERVICE_NOT_LOCALSYSTEM = DWORD(6200);
- {$EXTERNALSYM SCHED_E_SERVICE_NOT_LOCALSYSTEM}
-
-////////////////////////////////////
-// //
-// Terminal Server Error Codes //
-// //
-////////////////////////////////////
-//
-// MessageId: ERROR_CTX_WINSTATION_NAME_INVALID
-//
-// MessageText:
-//
-// The specified session name is invalid.
-//
- ERROR_CTX_WINSTATION_NAME_INVALID = DWORD(7001);
- {$EXTERNALSYM ERROR_CTX_WINSTATION_NAME_INVALID}
-
-//
-// MessageId: ERROR_CTX_INVALID_PD
-//
-// MessageText:
-//
-// The specified protocol driver is invalid.
-//
- ERROR_CTX_INVALID_PD = DWORD(7002);
- {$EXTERNALSYM ERROR_CTX_INVALID_PD}
-
-//
-// MessageId: ERROR_CTX_PD_NOT_FOUND
-//
-// MessageText:
-//
-// The specified protocol driver was not found in the system path.
-//
- ERROR_CTX_PD_NOT_FOUND = DWORD(7003);
- {$EXTERNALSYM ERROR_CTX_PD_NOT_FOUND}
-
-//
-// MessageId: ERROR_CTX_WD_NOT_FOUND
-//
-// MessageText:
-//
-// The specified terminal connection driver was not found in the system path.
-//
- ERROR_CTX_WD_NOT_FOUND = DWORD(7004);
- {$EXTERNALSYM ERROR_CTX_WD_NOT_FOUND}
-
-//
-// MessageId: ERROR_CTX_CANNOT_MAKE_EVENTLOG_ENTRY
-//
-// MessageText:
-//
-// A registry key for event logging could not be created for this session.
-//
- ERROR_CTX_CANNOT_MAKE_EVENTLOG_ENTRY = DWORD(7005);
- {$EXTERNALSYM ERROR_CTX_CANNOT_MAKE_EVENTLOG_ENTRY}
-
-//
-// MessageId: ERROR_CTX_SERVICE_NAME_COLLISION
-//
-// MessageText:
-//
-// A service with the same name already exists on the system.
-//
- ERROR_CTX_SERVICE_NAME_COLLISION = DWORD(7006);
- {$EXTERNALSYM ERROR_CTX_SERVICE_NAME_COLLISION}
-
-//
-// MessageId: ERROR_CTX_CLOSE_PENDING
-//
-// MessageText:
-//
-// A close operation is pending on the session.
-//
- ERROR_CTX_CLOSE_PENDING = DWORD(7007);
- {$EXTERNALSYM ERROR_CTX_CLOSE_PENDING}
-
-//
-// MessageId: ERROR_CTX_NO_OUTBUF
-//
-// MessageText:
-//
-// There are no free output buffers available.
-//
- ERROR_CTX_NO_OUTBUF = DWORD(7008);
- {$EXTERNALSYM ERROR_CTX_NO_OUTBUF}
-
-//
-// MessageId: ERROR_CTX_MODEM_INF_NOT_FOUND
-//
-// MessageText:
-//
-// The MODEM.INF file was not found.
-//
- ERROR_CTX_MODEM_INF_NOT_FOUND = DWORD(7009);
- {$EXTERNALSYM ERROR_CTX_MODEM_INF_NOT_FOUND}
-
-//
-// MessageId: ERROR_CTX_INVALID_MODEMNAME
-//
-// MessageText:
-//
-// The modem name was not found in MODEM.INF.
-//
- ERROR_CTX_INVALID_MODEMNAME = DWORD(7010);
- {$EXTERNALSYM ERROR_CTX_INVALID_MODEMNAME}
-
-//
-// MessageId: ERROR_CTX_MODEM_RESPONSE_ERROR
-//
-// MessageText:
-//
-// The modem did not accept the command sent to it. Verify that the configured modem name matches the attached modem.
-//
- ERROR_CTX_MODEM_RESPONSE_ERROR = DWORD(7011);
- {$EXTERNALSYM ERROR_CTX_MODEM_RESPONSE_ERROR}
-
-//
-// MessageId: ERROR_CTX_MODEM_RESPONSE_TIMEOUT
-//
-// MessageText:
-//
-// The modem did not respond to the command sent to it. Verify that the modem is properly cabled and powered on.
-//
- ERROR_CTX_MODEM_RESPONSE_TIMEOUT = DWORD(7012);
- {$EXTERNALSYM ERROR_CTX_MODEM_RESPONSE_TIMEOUT}
-
-//
-// MessageId: ERROR_CTX_MODEM_RESPONSE_NO_CARRIER
-//
-// MessageText:
-//
-// Carrier detect has failed or carrier has been dropped due to disconnect.
-//
- ERROR_CTX_MODEM_RESPONSE_NO_CARRIER = DWORD(7013);
- {$EXTERNALSYM ERROR_CTX_MODEM_RESPONSE_NO_CARRIER}
-
-//
-// MessageId: ERROR_CTX_MODEM_RESPONSE_NO_DIALTONE
-//
-// MessageText:
-//
-// Dial tone not detected within the required time. Verify that the phone cable is properly attached and functional.
-//
- ERROR_CTX_MODEM_RESPONSE_NO_DIALTONE = DWORD(7014);
- {$EXTERNALSYM ERROR_CTX_MODEM_RESPONSE_NO_DIALTONE}
-
-//
-// MessageId: ERROR_CTX_MODEM_RESPONSE_BUSY
-//
-// MessageText:
-//
-// Busy signal detected at remote site on callback.
-//
- ERROR_CTX_MODEM_RESPONSE_BUSY = DWORD(7015);
- {$EXTERNALSYM ERROR_CTX_MODEM_RESPONSE_BUSY}
-
-//
-// MessageId: ERROR_CTX_MODEM_RESPONSE_VOICE
-//
-// MessageText:
-//
-// Voice detected at remote site on callback.
-//
- ERROR_CTX_MODEM_RESPONSE_VOICE = DWORD(7016);
- {$EXTERNALSYM ERROR_CTX_MODEM_RESPONSE_VOICE}
-
-//
-// MessageId: ERROR_CTX_TD_ERROR
-//
-// MessageText:
-//
-// Transport driver error
-//
- ERROR_CTX_TD_ERROR = DWORD(7017);
- {$EXTERNALSYM ERROR_CTX_TD_ERROR}
-
-//
-// MessageId: ERROR_CTX_WINSTATION_NOT_FOUND
-//
-// MessageText:
-//
-// The specified session cannot be found.
-//
- ERROR_CTX_WINSTATION_NOT_FOUND = DWORD(7022);
- {$EXTERNALSYM ERROR_CTX_WINSTATION_NOT_FOUND}
-
-//
-// MessageId: ERROR_CTX_WINSTATION_ALREADY_EXISTS
-//
-// MessageText:
-//
-// The specified session name is already in use.
-//
- ERROR_CTX_WINSTATION_ALREADY_EXISTS = DWORD(7023);
- {$EXTERNALSYM ERROR_CTX_WINSTATION_ALREADY_EXISTS}
-
-//
-// MessageId: ERROR_CTX_WINSTATION_BUSY
-//
-// MessageText:
-//
-// The requested operation cannot be completed because the terminal connection is currently busy processing a connect, disconnect, reset, or delete operation.
-//
- ERROR_CTX_WINSTATION_BUSY = DWORD(7024);
- {$EXTERNALSYM ERROR_CTX_WINSTATION_BUSY}
-
-//
-// MessageId: ERROR_CTX_BAD_VIDEO_MODE
-//
-// MessageText:
-//
-// An attempt has been made to connect to a session whose video mode is not supported by the current client.
-//
- ERROR_CTX_BAD_VIDEO_MODE = DWORD(7025);
- {$EXTERNALSYM ERROR_CTX_BAD_VIDEO_MODE}
-
-//
-// MessageId: ERROR_CTX_GRAPHICS_INVALID
-//
-// MessageText:
-//
-// The application attempted to enable DOS graphics mode.
-// DOS graphics mode is not supported.
-//
- ERROR_CTX_GRAPHICS_INVALID = DWORD(7035);
- {$EXTERNALSYM ERROR_CTX_GRAPHICS_INVALID}
-
-//
-// MessageId: ERROR_CTX_LOGON_DISABLED
-//
-// MessageText:
-//
-// Your interactive logon privilege has been disabled.
-// Please contact your administrator.
-//
- ERROR_CTX_LOGON_DISABLED = DWORD(7037);
- {$EXTERNALSYM ERROR_CTX_LOGON_DISABLED}
-
-//
-// MessageId: ERROR_CTX_NOT_CONSOLE
-//
-// MessageText:
-//
-// The requested operation can be performed only on the system console.
-// This is most often the result of a driver or system DLL requiring direct console access.
-//
- ERROR_CTX_NOT_CONSOLE = DWORD(7038);
- {$EXTERNALSYM ERROR_CTX_NOT_CONSOLE}
-
-//
-// MessageId: ERROR_CTX_CLIENT_QUERY_TIMEOUT
-//
-// MessageText:
-//
-// The client failed to respond to the server connect message.
-//
- ERROR_CTX_CLIENT_QUERY_TIMEOUT = DWORD(7040);
- {$EXTERNALSYM ERROR_CTX_CLIENT_QUERY_TIMEOUT}
-
-//
-// MessageId: ERROR_CTX_CONSOLE_DISCONNECT
-//
-// MessageText:
-//
-// Disconnecting the console session is not supported.
-//
- ERROR_CTX_CONSOLE_DISCONNECT = DWORD(7041);
- {$EXTERNALSYM ERROR_CTX_CONSOLE_DISCONNECT}
-
-//
-// MessageId: ERROR_CTX_CONSOLE_CONNECT
-//
-// MessageText:
-//
-// Reconnecting a disconnected session to the console is not supported.
-//
- ERROR_CTX_CONSOLE_CONNECT = DWORD(7042);
- {$EXTERNALSYM ERROR_CTX_CONSOLE_CONNECT}
-
-//
-// MessageId: ERROR_CTX_SHADOW_DENIED
-//
-// MessageText:
-//
-// The request to control another session remotely was denied.
-//
- ERROR_CTX_SHADOW_DENIED = DWORD(7044);
- {$EXTERNALSYM ERROR_CTX_SHADOW_DENIED}
-
-//
-// MessageId: ERROR_CTX_WINSTATION_ACCESS_DENIED
-//
-// MessageText:
-//
-// The requested session access is denied.
-//
- ERROR_CTX_WINSTATION_ACCESS_DENIED = DWORD(7045);
- {$EXTERNALSYM ERROR_CTX_WINSTATION_ACCESS_DENIED}
-
-//
-// MessageId: ERROR_CTX_INVALID_WD
-//
-// MessageText:
-//
-// The specified terminal connection driver is invalid.
-//
- ERROR_CTX_INVALID_WD = DWORD(7049);
- {$EXTERNALSYM ERROR_CTX_INVALID_WD}
-
-//
-// MessageId: ERROR_CTX_SHADOW_INVALID
-//
-// MessageText:
-//
-// The requested session cannot be controlled remotely.
-// This may be because the session is disconnected or does not currently have a user logged on.
-//
- ERROR_CTX_SHADOW_INVALID = DWORD(7050);
- {$EXTERNALSYM ERROR_CTX_SHADOW_INVALID}
-
-//
-// MessageId: ERROR_CTX_SHADOW_DISABLED
-//
-// MessageText:
-//
-// The requested session is not configured to allow remote control.
-//
- ERROR_CTX_SHADOW_DISABLED = DWORD(7051);
- {$EXTERNALSYM ERROR_CTX_SHADOW_DISABLED}
-
-//
-// MessageId: ERROR_CTX_CLIENT_LICENSE_IN_USE
-//
-// MessageText:
-//
-// Your request to connect to this Terminal Server has been rejected. Your Terminal Server client license number is currently being used by another user.
-// Please call your system administrator to obtain a unique license number.
-//
- ERROR_CTX_CLIENT_LICENSE_IN_USE = DWORD(7052);
- {$EXTERNALSYM ERROR_CTX_CLIENT_LICENSE_IN_USE}
-
-//
-// MessageId: ERROR_CTX_CLIENT_LICENSE_NOT_SET
-//
-// MessageText:
-//
-// Your request to connect to this Terminal Server has been rejected. Your Terminal Server client license number has not been entered for this copy of the Terminal Server client.
-// Please contact your system administrator.
-//
- ERROR_CTX_CLIENT_LICENSE_NOT_SET = DWORD(7053);
- {$EXTERNALSYM ERROR_CTX_CLIENT_LICENSE_NOT_SET}
-
-//
-// MessageId: ERROR_CTX_LICENSE_NOT_AVAILABLE
-//
-// MessageText:
-//
-// The system has reached its licensed logon limit.
-// Please try again later.
-//
- ERROR_CTX_LICENSE_NOT_AVAILABLE = DWORD(7054);
- {$EXTERNALSYM ERROR_CTX_LICENSE_NOT_AVAILABLE}
-
-//
-// MessageId: ERROR_CTX_LICENSE_CLIENT_INVALID
-//
-// MessageText:
-//
-// The client you are using is not licensed to use this system. Your logon request is denied.
-//
- ERROR_CTX_LICENSE_CLIENT_INVALID = DWORD(7055);
- {$EXTERNALSYM ERROR_CTX_LICENSE_CLIENT_INVALID}
-
-//
-// MessageId: ERROR_CTX_LICENSE_EXPIRED
-//
-// MessageText:
-//
-// The system license has expired. Your logon request is denied.
-//
- ERROR_CTX_LICENSE_EXPIRED = DWORD(7056);
- {$EXTERNALSYM ERROR_CTX_LICENSE_EXPIRED}
-
-//
-// MessageId: ERROR_CTX_SHADOW_NOT_RUNNING
-//
-// MessageText:
-//
-// Remote control could not be terminated because the specified session is not currently being remotely controlled.
-//
- ERROR_CTX_SHADOW_NOT_RUNNING = DWORD(7057);
- {$EXTERNALSYM ERROR_CTX_SHADOW_NOT_RUNNING}
-
-//
-// MessageId: ERROR_CTX_SHADOW_ENDED_BY_MODE_CHANGE
-//
-// MessageText:
-//
-// The remote control of the console was terminated because the display mode was changed. Changing the display mode in a remote control session is not supported.
-//
- ERROR_CTX_SHADOW_ENDED_BY_MODE_CHANGE = DWORD(7058);
- {$EXTERNALSYM ERROR_CTX_SHADOW_ENDED_BY_MODE_CHANGE}
-
-//
-// MessageId: ERROR_ACTIVATION_COUNT_EXCEEDED
-//
-// MessageText:
-//
-// Activation has already been reset the maximum number of times for this installation. Your activation timer will not be cleared.
-//
- ERROR_ACTIVATION_COUNT_EXCEEDED = DWORD(7059);
- {$EXTERNALSYM ERROR_ACTIVATION_COUNT_EXCEEDED}
-
-///////////////////////////////////////////////////
-// /
-// Traffic Control Error Codes /
-// /
-// 7500 to 7999 /
-// /
-// defined in: tcerror.h /
-///////////////////////////////////////////////////
-///////////////////////////////////////////////////
-// /
-// Active Directory Error Codes /
-// /
-// 8000 to 8999 /
-///////////////////////////////////////////////////
-// *****************
-// FACILITY_FILE_REPLICATION_SERVICE
-// *****************
-//
-// MessageId: FRS_ERR_INVALID_API_SEQUENCE
-//
-// MessageText:
-//
-// The file replication service API was called incorrectly.
-//
- FRS_ERR_INVALID_API_SEQUENCE = DWORD(8001);
- {$EXTERNALSYM FRS_ERR_INVALID_API_SEQUENCE}
-
-//
-// MessageId: FRS_ERR_STARTING_SERVICE
-//
-// MessageText:
-//
-// The file replication service cannot be started.
-//
- FRS_ERR_STARTING_SERVICE = DWORD(8002);
- {$EXTERNALSYM FRS_ERR_STARTING_SERVICE}
-
-//
-// MessageId: FRS_ERR_STOPPING_SERVICE
-//
-// MessageText:
-//
-// The file replication service cannot be stopped.
-//
- FRS_ERR_STOPPING_SERVICE = DWORD(8003);
- {$EXTERNALSYM FRS_ERR_STOPPING_SERVICE}
-
-//
-// MessageId: FRS_ERR_INTERNAL_API
-//
-// MessageText:
-//
-// The file replication service API terminated the request.
-// The event log may have more information.
-//
- FRS_ERR_INTERNAL_API = DWORD(8004);
- {$EXTERNALSYM FRS_ERR_INTERNAL_API}
-
-//
-// MessageId: FRS_ERR_INTERNAL
-//
-// MessageText:
-//
-// The file replication service terminated the request.
-// The event log may have more information.
-//
- FRS_ERR_INTERNAL = DWORD(8005);
- {$EXTERNALSYM FRS_ERR_INTERNAL}
-
-//
-// MessageId: FRS_ERR_SERVICE_COMM
-//
-// MessageText:
-//
-// The file replication service cannot be contacted.
-// The event log may have more information.
-//
- FRS_ERR_SERVICE_COMM = DWORD(8006);
- {$EXTERNALSYM FRS_ERR_SERVICE_COMM}
-
-//
-// MessageId: FRS_ERR_INSUFFICIENT_PRIV
-//
-// MessageText:
-//
-// The file replication service cannot satisfy the request because the user has insufficient privileges.
-// The event log may have more information.
-//
- FRS_ERR_INSUFFICIENT_PRIV = DWORD(8007);
- {$EXTERNALSYM FRS_ERR_INSUFFICIENT_PRIV}
-
-//
-// MessageId: FRS_ERR_AUTHENTICATION
-//
-// MessageText:
-//
-// The file replication service cannot satisfy the request because authenticated RPC is not available.
-// The event log may have more information.
-//
- FRS_ERR_AUTHENTICATION = DWORD(8008);
- {$EXTERNALSYM FRS_ERR_AUTHENTICATION}
-
-//
-// MessageId: FRS_ERR_PARENT_INSUFFICIENT_PRIV
-//
-// MessageText:
-//
-// The file replication service cannot satisfy the request because the user has insufficient privileges on the domain controller.
-// The event log may have more information.
-//
- FRS_ERR_PARENT_INSUFFICIENT_PRIV = DWORD(8009);
- {$EXTERNALSYM FRS_ERR_PARENT_INSUFFICIENT_PRIV}
-
-//
-// MessageId: FRS_ERR_PARENT_AUTHENTICATION
-//
-// MessageText:
-//
-// The file replication service cannot satisfy the request because authenticated RPC is not available on the domain controller.
-// The event log may have more information.
-//
- FRS_ERR_PARENT_AUTHENTICATION = DWORD(8010);
- {$EXTERNALSYM FRS_ERR_PARENT_AUTHENTICATION}
-
-//
-// MessageId: FRS_ERR_CHILD_TO_PARENT_COMM
-//
-// MessageText:
-//
-// The file replication service cannot communicate with the file replication service on the domain controller.
-// The event log may have more information.
-//
- FRS_ERR_CHILD_TO_PARENT_COMM = DWORD(8011);
- {$EXTERNALSYM FRS_ERR_CHILD_TO_PARENT_COMM}
-
-//
-// MessageId: FRS_ERR_PARENT_TO_CHILD_COMM
-//
-// MessageText:
-//
-// The file replication service on the domain controller cannot communicate with the file replication service on this computer.
-// The event log may have more information.
-//
- FRS_ERR_PARENT_TO_CHILD_COMM = DWORD(8012);
- {$EXTERNALSYM FRS_ERR_PARENT_TO_CHILD_COMM}
-
-//
-// MessageId: FRS_ERR_SYSVOL_POPULATE
-//
-// MessageText:
-//
-// The file replication service cannot populate the system volume because of an internal error.
-// The event log may have more information.
-//
- FRS_ERR_SYSVOL_POPULATE = DWORD(8013);
- {$EXTERNALSYM FRS_ERR_SYSVOL_POPULATE}
-
-//
-// MessageId: FRS_ERR_SYSVOL_POPULATE_TIMEOUT
-//
-// MessageText:
-//
-// The file replication service cannot populate the system volume because of an internal timeout.
-// The event log may have more information.
-//
- FRS_ERR_SYSVOL_POPULATE_TIMEOUT = DWORD(8014);
- {$EXTERNALSYM FRS_ERR_SYSVOL_POPULATE_TIMEOUT}
-
-//
-// MessageId: FRS_ERR_SYSVOL_IS_BUSY
-//
-// MessageText:
-//
-// The file replication service cannot process the request. The system volume is busy with a previous request.
-//
- FRS_ERR_SYSVOL_IS_BUSY = DWORD(8015);
- {$EXTERNALSYM FRS_ERR_SYSVOL_IS_BUSY}
-
-//
-// MessageId: FRS_ERR_SYSVOL_DEMOTE
-//
-// MessageText:
-//
-// The file replication service cannot stop replicating the system volume because of an internal error.
-// The event log may have more information.
-//
- FRS_ERR_SYSVOL_DEMOTE = DWORD(8016);
- {$EXTERNALSYM FRS_ERR_SYSVOL_DEMOTE}
-
-//
-// MessageId: FRS_ERR_INVALID_SERVICE_PARAMETER
-//
-// MessageText:
-//
-// The file replication service detected an invalid parameter.
-//
- FRS_ERR_INVALID_SERVICE_PARAMETER = DWORD(8017);
- {$EXTERNALSYM FRS_ERR_INVALID_SERVICE_PARAMETER}
-
-// *****************
-// FACILITY DIRECTORY SERVICE
-// *****************
- DS_S_SUCCESS = NO_ERROR;
- {$EXTERNALSYM DS_S_SUCCESS}
-//
-// MessageId: ERROR_DS_NOT_INSTALLED
-//
-// MessageText:
-//
-// An error occurred while installing the directory service. For more information, see the event log.
-//
- ERROR_DS_NOT_INSTALLED = DWORD(8200);
- {$EXTERNALSYM ERROR_DS_NOT_INSTALLED}
-
-//
-// MessageId: ERROR_DS_MEMBERSHIP_EVALUATED_LOCALLY
-//
-// MessageText:
-//
-// The directory service evaluated group memberships locally.
-//
- ERROR_DS_MEMBERSHIP_EVALUATED_LOCALLY = DWORD(8201);
- {$EXTERNALSYM ERROR_DS_MEMBERSHIP_EVALUATED_LOCALLY}
-
-//
-// MessageId: ERROR_DS_NO_ATTRIBUTE_OR_VALUE
-//
-// MessageText:
-//
-// The specified directory service attribute or value does not exist.
-//
- ERROR_DS_NO_ATTRIBUTE_OR_VALUE = DWORD(8202);
- {$EXTERNALSYM ERROR_DS_NO_ATTRIBUTE_OR_VALUE}
-
-//
-// MessageId: ERROR_DS_INVALID_ATTRIBUTE_SYNTAX
-//
-// MessageText:
-//
-// The attribute syntax specified to the directory service is invalid.
-//
- ERROR_DS_INVALID_ATTRIBUTE_SYNTAX = DWORD(8203);
- {$EXTERNALSYM ERROR_DS_INVALID_ATTRIBUTE_SYNTAX}
-
-//
-// MessageId: ERROR_DS_ATTRIBUTE_TYPE_UNDEFINED
-//
-// MessageText:
-//
-// The attribute type specified to the directory service is not defined.
-//
- ERROR_DS_ATTRIBUTE_TYPE_UNDEFINED = DWORD(8204);
- {$EXTERNALSYM ERROR_DS_ATTRIBUTE_TYPE_UNDEFINED}
-
-//
-// MessageId: ERROR_DS_ATTRIBUTE_OR_VALUE_EXISTS
-//
-// MessageText:
-//
-// The specified directory service attribute or value already exists.
-//
- ERROR_DS_ATTRIBUTE_OR_VALUE_EXISTS = DWORD(8205);
- {$EXTERNALSYM ERROR_DS_ATTRIBUTE_OR_VALUE_EXISTS}
-
-//
-// MessageId: ERROR_DS_BUSY
-//
-// MessageText:
-//
-// The directory service is busy.
-//
- ERROR_DS_BUSY = DWORD(8206);
- {$EXTERNALSYM ERROR_DS_BUSY}
-
-//
-// MessageId: ERROR_DS_UNAVAILABLE
-//
-// MessageText:
-//
-// The directory service is unavailable.
-//
- ERROR_DS_UNAVAILABLE = DWORD(8207);
- {$EXTERNALSYM ERROR_DS_UNAVAILABLE}
-
-//
-// MessageId: ERROR_DS_NO_RIDS_ALLOCATED
-//
-// MessageText:
-//
-// The directory service was unable to allocate a relative identifier.
-//
- ERROR_DS_NO_RIDS_ALLOCATED = DWORD(8208);
- {$EXTERNALSYM ERROR_DS_NO_RIDS_ALLOCATED}
-
-//
-// MessageId: ERROR_DS_NO_MORE_RIDS
-//
-// MessageText:
-//
-// The directory service has exhausted the pool of relative identifiers.
-//
- ERROR_DS_NO_MORE_RIDS = DWORD(8209);
- {$EXTERNALSYM ERROR_DS_NO_MORE_RIDS}
-
-//
-// MessageId: ERROR_DS_INCORRECT_ROLE_OWNER
-//
-// MessageText:
-//
-// The requested operation could not be performed because the directory service is not the master for that type of operation.
-//
- ERROR_DS_INCORRECT_ROLE_OWNER = DWORD(8210);
- {$EXTERNALSYM ERROR_DS_INCORRECT_ROLE_OWNER}
-
-//
-// MessageId: ERROR_DS_RIDMGR_INIT_ERROR
-//
-// MessageText:
-//
-// The directory service was unable to initialize the subsystem that allocates relative identifiers.
-//
- ERROR_DS_RIDMGR_INIT_ERROR = DWORD(8211);
- {$EXTERNALSYM ERROR_DS_RIDMGR_INIT_ERROR}
-
-//
-// MessageId: ERROR_DS_OBJ_CLASS_VIOLATION
-//
-// MessageText:
-//
-// The requested operation did not satisfy one or more constraints associated with the class of the object.
-//
- ERROR_DS_OBJ_CLASS_VIOLATION = DWORD(8212);
- {$EXTERNALSYM ERROR_DS_OBJ_CLASS_VIOLATION}
-
-//
-// MessageId: ERROR_DS_CANT_ON_NON_LEAF
-//
-// MessageText:
-//
-// The directory service can perform the requested operation only on a leaf object.
-//
- ERROR_DS_CANT_ON_NON_LEAF = DWORD(8213);
- {$EXTERNALSYM ERROR_DS_CANT_ON_NON_LEAF}
-
-//
-// MessageId: ERROR_DS_CANT_ON_RDN
-//
-// MessageText:
-//
-// The directory service cannot perform the requested operation on the RDN attribute of an object.
-//
- ERROR_DS_CANT_ON_RDN = DWORD(8214);
- {$EXTERNALSYM ERROR_DS_CANT_ON_RDN}
-
-//
-// MessageId: ERROR_DS_CANT_MOD_OBJ_CLASS
-//
-// MessageText:
-//
-// The directory service detected an attempt to modify the object class of an object.
-//
- ERROR_DS_CANT_MOD_OBJ_CLASS = DWORD(8215);
- {$EXTERNALSYM ERROR_DS_CANT_MOD_OBJ_CLASS}
-
-//
-// MessageId: ERROR_DS_CROSS_DOM_MOVE_ERROR
-//
-// MessageText:
-//
-// The requested cross-domain move operation could not be performed.
-//
- ERROR_DS_CROSS_DOM_MOVE_ERROR = DWORD(8216);
- {$EXTERNALSYM ERROR_DS_CROSS_DOM_MOVE_ERROR}
-
-//
-// MessageId: ERROR_DS_GC_NOT_AVAILABLE
-//
-// MessageText:
-//
-// Unable to contact the global catalog server.
-//
- ERROR_DS_GC_NOT_AVAILABLE = DWORD(8217);
- {$EXTERNALSYM ERROR_DS_GC_NOT_AVAILABLE}
-
-//
-// MessageId: ERROR_SHARED_POLICY
-//
-// MessageText:
-//
-// The policy object is shared and can only be modified at the root.
-//
- ERROR_SHARED_POLICY = DWORD(8218);
- {$EXTERNALSYM ERROR_SHARED_POLICY}
-
-//
-// MessageId: ERROR_POLICY_OBJECT_NOT_FOUND
-//
-// MessageText:
-//
-// The policy object does not exist.
-//
- ERROR_POLICY_OBJECT_NOT_FOUND = DWORD(8219);
- {$EXTERNALSYM ERROR_POLICY_OBJECT_NOT_FOUND}
-
-//
-// MessageId: ERROR_POLICY_ONLY_IN_DS
-//
-// MessageText:
-//
-// The requested policy information is only in the directory service.
-//
- ERROR_POLICY_ONLY_IN_DS = DWORD(8220);
- {$EXTERNALSYM ERROR_POLICY_ONLY_IN_DS}
-
-//
-// MessageId: ERROR_PROMOTION_ACTIVE
-//
-// MessageText:
-//
-// A domain controller promotion is currently active.
-//
- ERROR_PROMOTION_ACTIVE = DWORD(8221);
- {$EXTERNALSYM ERROR_PROMOTION_ACTIVE}
-
-//
-// MessageId: ERROR_NO_PROMOTION_ACTIVE
-//
-// MessageText:
-//
-// A domain controller promotion is not currently active
-//
- ERROR_NO_PROMOTION_ACTIVE = DWORD(8222);
- {$EXTERNALSYM ERROR_NO_PROMOTION_ACTIVE}
-
-// 8223 unused
-//
-// MessageId: ERROR_DS_OPERATIONS_ERROR
-//
-// MessageText:
-//
-// An operations error occurred.
-//
- ERROR_DS_OPERATIONS_ERROR = DWORD(8224);
- {$EXTERNALSYM ERROR_DS_OPERATIONS_ERROR}
-
-//
-// MessageId: ERROR_DS_PROTOCOL_ERROR
-//
-// MessageText:
-//
-// A protocol error occurred.
-//
- ERROR_DS_PROTOCOL_ERROR = DWORD(8225);
- {$EXTERNALSYM ERROR_DS_PROTOCOL_ERROR}
-
-//
-// MessageId: ERROR_DS_TIMELIMIT_EXCEEDED
-//
-// MessageText:
-//
-// The time limit for this request was exceeded.
-//
- ERROR_DS_TIMELIMIT_EXCEEDED = DWORD(8226);
- {$EXTERNALSYM ERROR_DS_TIMELIMIT_EXCEEDED}
-
-//
-// MessageId: ERROR_DS_SIZELIMIT_EXCEEDED
-//
-// MessageText:
-//
-// The size limit for this request was exceeded.
-//
- ERROR_DS_SIZELIMIT_EXCEEDED = DWORD(8227);
- {$EXTERNALSYM ERROR_DS_SIZELIMIT_EXCEEDED}
-
-//
-// MessageId: ERROR_DS_ADMIN_LIMIT_EXCEEDED
-//
-// MessageText:
-//
-// The administrative limit for this request was exceeded.
-//
- ERROR_DS_ADMIN_LIMIT_EXCEEDED = DWORD(8228);
- {$EXTERNALSYM ERROR_DS_ADMIN_LIMIT_EXCEEDED}
-
-//
-// MessageId: ERROR_DS_COMPARE_FALSE
-//
-// MessageText:
-//
-// The compare response was false.
-//
- ERROR_DS_COMPARE_FALSE = DWORD(8229);
- {$EXTERNALSYM ERROR_DS_COMPARE_FALSE}
-
-//
-// MessageId: ERROR_DS_COMPARE_TRUE
-//
-// MessageText:
-//
-// The compare response was true.
-//
- ERROR_DS_COMPARE_TRUE = DWORD(8230);
- {$EXTERNALSYM ERROR_DS_COMPARE_TRUE}
-
-//
-// MessageId: ERROR_DS_AUTH_METHOD_NOT_SUPPORTED
-//
-// MessageText:
-//
-// The requested authentication method is not supported by the server.
-//
- ERROR_DS_AUTH_METHOD_NOT_SUPPORTED = DWORD(8231);
- {$EXTERNALSYM ERROR_DS_AUTH_METHOD_NOT_SUPPORTED}
-
-//
-// MessageId: ERROR_DS_STRONG_AUTH_REQUIRED
-//
-// MessageText:
-//
-// A more secure authentication method is required for this server.
-//
- ERROR_DS_STRONG_AUTH_REQUIRED = DWORD(8232);
- {$EXTERNALSYM ERROR_DS_STRONG_AUTH_REQUIRED}
-
-//
-// MessageId: ERROR_DS_INAPPROPRIATE_AUTH
-//
-// MessageText:
-//
-// Inappropriate authentication.
-//
- ERROR_DS_INAPPROPRIATE_AUTH = DWORD(8233);
- {$EXTERNALSYM ERROR_DS_INAPPROPRIATE_AUTH}
-
-//
-// MessageId: ERROR_DS_AUTH_UNKNOWN
-//
-// MessageText:
-//
-// The authentication mechanism is unknown.
-//
- ERROR_DS_AUTH_UNKNOWN = DWORD(8234);
- {$EXTERNALSYM ERROR_DS_AUTH_UNKNOWN}
-
-//
-// MessageId: ERROR_DS_REFERRAL
-//
-// MessageText:
-//
-// A referral was returned from the server.
-//
- ERROR_DS_REFERRAL = DWORD(8235);
- {$EXTERNALSYM ERROR_DS_REFERRAL}
-
-//
-// MessageId: ERROR_DS_UNAVAILABLE_CRIT_EXTENSION
-//
-// MessageText:
-//
-// The server does not support the requested critical extension.
-//
- ERROR_DS_UNAVAILABLE_CRIT_EXTENSION = DWORD(8236);
- {$EXTERNALSYM ERROR_DS_UNAVAILABLE_CRIT_EXTENSION}
-
-//
-// MessageId: ERROR_DS_CONFIDENTIALITY_REQUIRED
-//
-// MessageText:
-//
-// This request requires a secure connection.
-//
- ERROR_DS_CONFIDENTIALITY_REQUIRED = DWORD(8237);
- {$EXTERNALSYM ERROR_DS_CONFIDENTIALITY_REQUIRED}
-
-//
-// MessageId: ERROR_DS_INAPPROPRIATE_MATCHING
-//
-// MessageText:
-//
-// Inappropriate matching.
-//
- ERROR_DS_INAPPROPRIATE_MATCHING = DWORD(8238);
- {$EXTERNALSYM ERROR_DS_INAPPROPRIATE_MATCHING}
-
-//
-// MessageId: ERROR_DS_CONSTRAINT_VIOLATION
-//
-// MessageText:
-//
-// A constraint violation occurred.
-//
- ERROR_DS_CONSTRAINT_VIOLATION = DWORD(8239);
- {$EXTERNALSYM ERROR_DS_CONSTRAINT_VIOLATION}
-
-//
-// MessageId: ERROR_DS_NO_SUCH_OBJECT
-//
-// MessageText:
-//
-// There is no such object on the server.
-//
- ERROR_DS_NO_SUCH_OBJECT = DWORD(8240);
- {$EXTERNALSYM ERROR_DS_NO_SUCH_OBJECT}
-
-//
-// MessageId: ERROR_DS_ALIAS_PROBLEM
-//
-// MessageText:
-//
-// There is an alias problem.
-//
- ERROR_DS_ALIAS_PROBLEM = DWORD(8241);
- {$EXTERNALSYM ERROR_DS_ALIAS_PROBLEM}
-
-//
-// MessageId: ERROR_DS_INVALID_DN_SYNTAX
-//
-// MessageText:
-//
-// An invalid dn syntax has been specified.
-//
- ERROR_DS_INVALID_DN_SYNTAX = DWORD(8242);
- {$EXTERNALSYM ERROR_DS_INVALID_DN_SYNTAX}
-
-//
-// MessageId: ERROR_DS_IS_LEAF
-//
-// MessageText:
-//
-// The object is a leaf object.
-//
- ERROR_DS_IS_LEAF = DWORD(8243);
- {$EXTERNALSYM ERROR_DS_IS_LEAF}
-
-//
-// MessageId: ERROR_DS_ALIAS_DEREF_PROBLEM
-//
-// MessageText:
-//
-// There is an alias dereferencing problem.
-//
- ERROR_DS_ALIAS_DEREF_PROBLEM = DWORD(8244);
- {$EXTERNALSYM ERROR_DS_ALIAS_DEREF_PROBLEM}
-
-//
-// MessageId: ERROR_DS_UNWILLING_TO_PERFORM
-//
-// MessageText:
-//
-// The server is unwilling to process the request.
-//
- ERROR_DS_UNWILLING_TO_PERFORM = DWORD(8245);
- {$EXTERNALSYM ERROR_DS_UNWILLING_TO_PERFORM}
-
-//
-// MessageId: ERROR_DS_LOOP_DETECT
-//
-// MessageText:
-//
-// A loop has been detected.
-//
- ERROR_DS_LOOP_DETECT = DWORD(8246);
- {$EXTERNALSYM ERROR_DS_LOOP_DETECT}
-
-//
-// MessageId: ERROR_DS_NAMING_VIOLATION
-//
-// MessageText:
-//
-// There is a naming violation.
-//
- ERROR_DS_NAMING_VIOLATION = DWORD(8247);
- {$EXTERNALSYM ERROR_DS_NAMING_VIOLATION}
-
-//
-// MessageId: ERROR_DS_OBJECT_RESULTS_TOO_LARGE
-//
-// MessageText:
-//
-// The result set is too large.
-//
- ERROR_DS_OBJECT_RESULTS_TOO_LARGE = DWORD(8248);
- {$EXTERNALSYM ERROR_DS_OBJECT_RESULTS_TOO_LARGE}
-
-//
-// MessageId: ERROR_DS_AFFECTS_MULTIPLE_DSAS
-//
-// MessageText:
-//
-// The operation affects multiple DSAs
-//
- ERROR_DS_AFFECTS_MULTIPLE_DSAS = DWORD(8249);
- {$EXTERNALSYM ERROR_DS_AFFECTS_MULTIPLE_DSAS}
-
-//
-// MessageId: ERROR_DS_SERVER_DOWN
-//
-// MessageText:
-//
-// The server is not operational.
-//
- ERROR_DS_SERVER_DOWN = DWORD(8250);
- {$EXTERNALSYM ERROR_DS_SERVER_DOWN}
-
-//
-// MessageId: ERROR_DS_LOCAL_ERROR
-//
-// MessageText:
-//
-// A local error has occurred.
-//
- ERROR_DS_LOCAL_ERROR = DWORD(8251);
- {$EXTERNALSYM ERROR_DS_LOCAL_ERROR}
-
-//
-// MessageId: ERROR_DS_ENCODING_ERROR
-//
-// MessageText:
-//
-// An encoding error has occurred.
-//
- ERROR_DS_ENCODING_ERROR = DWORD(8252);
- {$EXTERNALSYM ERROR_DS_ENCODING_ERROR}
-
-//
-// MessageId: ERROR_DS_DECODING_ERROR
-//
-// MessageText:
-//
-// A decoding error has occurred.
-//
- ERROR_DS_DECODING_ERROR = DWORD(8253);
- {$EXTERNALSYM ERROR_DS_DECODING_ERROR}
-
-//
-// MessageId: ERROR_DS_FILTER_UNKNOWN
-//
-// MessageText:
-//
-// The search filter cannot be recognized.
-//
- ERROR_DS_FILTER_UNKNOWN = DWORD(8254);
- {$EXTERNALSYM ERROR_DS_FILTER_UNKNOWN}
-
-//
-// MessageId: ERROR_DS_PARAM_ERROR
-//
-// MessageText:
-//
-// One or more parameters are illegal.
-//
- ERROR_DS_PARAM_ERROR = DWORD(8255);
- {$EXTERNALSYM ERROR_DS_PARAM_ERROR}
-
-//
-// MessageId: ERROR_DS_NOT_SUPPORTED
-//
-// MessageText:
-//
-// The specified method is not supported.
-//
- ERROR_DS_NOT_SUPPORTED = DWORD(8256);
- {$EXTERNALSYM ERROR_DS_NOT_SUPPORTED}
-
-//
-// MessageId: ERROR_DS_NO_RESULTS_RETURNED
-//
-// MessageText:
-//
-// No results were returned.
-//
- ERROR_DS_NO_RESULTS_RETURNED = DWORD(8257);
- {$EXTERNALSYM ERROR_DS_NO_RESULTS_RETURNED}
-
-//
-// MessageId: ERROR_DS_CONTROL_NOT_FOUND
-//
-// MessageText:
-//
-// The specified control is not supported by the server.
-//
- ERROR_DS_CONTROL_NOT_FOUND = DWORD(8258);
- {$EXTERNALSYM ERROR_DS_CONTROL_NOT_FOUND}
-
-//
-// MessageId: ERROR_DS_CLIENT_LOOP
-//
-// MessageText:
-//
-// A referral loop was detected by the client.
-//
- ERROR_DS_CLIENT_LOOP = DWORD(8259);
- {$EXTERNALSYM ERROR_DS_CLIENT_LOOP}
-
-//
-// MessageId: ERROR_DS_REFERRAL_LIMIT_EXCEEDED
-//
-// MessageText:
-//
-// The preset referral limit was exceeded.
-//
- ERROR_DS_REFERRAL_LIMIT_EXCEEDED = DWORD(8260);
- {$EXTERNALSYM ERROR_DS_REFERRAL_LIMIT_EXCEEDED}
-
-//
-// MessageId: ERROR_DS_SORT_CONTROL_MISSING
-//
-// MessageText:
-//
-// The search requires a SORT control.
-//
- ERROR_DS_SORT_CONTROL_MISSING = DWORD(8261);
- {$EXTERNALSYM ERROR_DS_SORT_CONTROL_MISSING}
-
-//
-// MessageId: ERROR_DS_OFFSET_RANGE_ERROR
-//
-// MessageText:
-//
-// The search results exceed the offset range specified.
-//
- ERROR_DS_OFFSET_RANGE_ERROR = DWORD(8262);
- {$EXTERNALSYM ERROR_DS_OFFSET_RANGE_ERROR}
-
-//
-// MessageId: ERROR_DS_ROOT_MUST_BE_NC
-//
-// MessageText:
-//
-// The root object must be the head of a naming context. The root object cannot have an instantiated parent.
-//
- ERROR_DS_ROOT_MUST_BE_NC = DWORD(8301);
- {$EXTERNALSYM ERROR_DS_ROOT_MUST_BE_NC}
-
-//
-// MessageId: ERROR_DS_ADD_REPLICA_INHIBITED
-//
-// MessageText:
-//
-// The add replica operation cannot be performed. The naming context must be writeable in order to create the replica.
-//
- ERROR_DS_ADD_REPLICA_INHIBITED = DWORD(8302);
- {$EXTERNALSYM ERROR_DS_ADD_REPLICA_INHIBITED}
-
-//
-// MessageId: ERROR_DS_ATT_NOT_DEF_IN_SCHEMA
-//
-// MessageText:
-//
-// A reference to an attribute that is not defined in the schema occurred.
-//
- ERROR_DS_ATT_NOT_DEF_IN_SCHEMA = DWORD(8303);
- {$EXTERNALSYM ERROR_DS_ATT_NOT_DEF_IN_SCHEMA}
-
-//
-// MessageId: ERROR_DS_MAX_OBJ_SIZE_EXCEEDED
-//
-// MessageText:
-//
-// The maximum size of an object has been exceeded.
-//
- ERROR_DS_MAX_OBJ_SIZE_EXCEEDED = DWORD(8304);
- {$EXTERNALSYM ERROR_DS_MAX_OBJ_SIZE_EXCEEDED}
-
-//
-// MessageId: ERROR_DS_OBJ_STRING_NAME_EXISTS
-//
-// MessageText:
-//
-// An attempt was made to add an object to the directory with a name that is already in use.
-//
- ERROR_DS_OBJ_STRING_NAME_EXISTS = DWORD(8305);
- {$EXTERNALSYM ERROR_DS_OBJ_STRING_NAME_EXISTS}
-
-//
-// MessageId: ERROR_DS_NO_RDN_DEFINED_IN_SCHEMA
-//
-// MessageText:
-//
-// An attempt was made to add an object of a class that does not have an RDN defined in the schema.
-//
- ERROR_DS_NO_RDN_DEFINED_IN_SCHEMA = DWORD(8306);
- {$EXTERNALSYM ERROR_DS_NO_RDN_DEFINED_IN_SCHEMA}
-
-//
-// MessageId: ERROR_DS_RDN_DOESNT_MATCH_SCHEMA
-//
-// MessageText:
-//
-// An attempt was made to add an object using an RDN that is not the RDN defined in the schema.
-//
- ERROR_DS_RDN_DOESNT_MATCH_SCHEMA = DWORD(8307);
- {$EXTERNALSYM ERROR_DS_RDN_DOESNT_MATCH_SCHEMA}
-
-//
-// MessageId: ERROR_DS_NO_REQUESTED_ATTS_FOUND
-//
-// MessageText:
-//
-// None of the requested attributes were found on the objects.
-//
- ERROR_DS_NO_REQUESTED_ATTS_FOUND = DWORD(8308);
- {$EXTERNALSYM ERROR_DS_NO_REQUESTED_ATTS_FOUND}
-
-//
-// MessageId: ERROR_DS_USER_BUFFER_TO_SMALL
-//
-// MessageText:
-//
-// The user buffer is too small.
-//
- ERROR_DS_USER_BUFFER_TO_SMALL = DWORD(8309);
- {$EXTERNALSYM ERROR_DS_USER_BUFFER_TO_SMALL}
-
-//
-// MessageId: ERROR_DS_ATT_IS_NOT_ON_OBJ
-//
-// MessageText:
-//
-// The attribute specified in the operation is not present on the object.
-//
- ERROR_DS_ATT_IS_NOT_ON_OBJ = DWORD(8310);
- {$EXTERNALSYM ERROR_DS_ATT_IS_NOT_ON_OBJ}
-
-//
-// MessageId: ERROR_DS_ILLEGAL_MOD_OPERATION
-//
-// MessageText:
-//
-// Illegal modify operation. Some aspect of the modification is not permitted.
-//
- ERROR_DS_ILLEGAL_MOD_OPERATION = DWORD(8311);
- {$EXTERNALSYM ERROR_DS_ILLEGAL_MOD_OPERATION}
-
-//
-// MessageId: ERROR_DS_OBJ_TOO_LARGE
-//
-// MessageText:
-//
-// The specified object is too large.
-//
- ERROR_DS_OBJ_TOO_LARGE = DWORD(8312);
- {$EXTERNALSYM ERROR_DS_OBJ_TOO_LARGE}
-
-//
-// MessageId: ERROR_DS_BAD_INSTANCE_TYPE
-//
-// MessageText:
-//
-// The specified instance type is not valid.
-//
- ERROR_DS_BAD_INSTANCE_TYPE = DWORD(8313);
- {$EXTERNALSYM ERROR_DS_BAD_INSTANCE_TYPE}
-
-//
-// MessageId: ERROR_DS_MASTERDSA_REQUIRED
-//
-// MessageText:
-//
-// The operation must be performed at a master DSA.
-//
- ERROR_DS_MASTERDSA_REQUIRED = DWORD(8314);
- {$EXTERNALSYM ERROR_DS_MASTERDSA_REQUIRED}
-
-//
-// MessageId: ERROR_DS_OBJECT_CLASS_REQUIRED
-//
-// MessageText:
-//
-// The object class attribute must be specified.
-//
- ERROR_DS_OBJECT_CLASS_REQUIRED = DWORD(8315);
- {$EXTERNALSYM ERROR_DS_OBJECT_CLASS_REQUIRED}
-
-//
-// MessageId: ERROR_DS_MISSING_REQUIRED_ATT
-//
-// MessageText:
-//
-// A required attribute is missing.
-//
- ERROR_DS_MISSING_REQUIRED_ATT = DWORD(8316);
- {$EXTERNALSYM ERROR_DS_MISSING_REQUIRED_ATT}
-
-//
-// MessageId: ERROR_DS_ATT_NOT_DEF_FOR_CLASS
-//
-// MessageText:
-//
-// An attempt was made to modify an object to include an attribute that is not legal for its class.
-//
- ERROR_DS_ATT_NOT_DEF_FOR_CLASS = DWORD(8317);
- {$EXTERNALSYM ERROR_DS_ATT_NOT_DEF_FOR_CLASS}
-
-//
-// MessageId: ERROR_DS_ATT_ALREADY_EXISTS
-//
-// MessageText:
-//
-// The specified attribute is already present on the object.
-//
- ERROR_DS_ATT_ALREADY_EXISTS = DWORD(8318);
- {$EXTERNALSYM ERROR_DS_ATT_ALREADY_EXISTS}
-
-// 8319 unused
-//
-// MessageId: ERROR_DS_CANT_ADD_ATT_VALUES
-//
-// MessageText:
-//
-// The specified attribute is not present, or has no values.
-//
- ERROR_DS_CANT_ADD_ATT_VALUES = DWORD(8320);
- {$EXTERNALSYM ERROR_DS_CANT_ADD_ATT_VALUES}
-
-//
-// MessageId: ERROR_DS_SINGLE_VALUE_CONSTRAINT
-//
-// MessageText:
-//
-// Multiple values were specified for an attribute that can have only one value.
-//
- ERROR_DS_SINGLE_VALUE_CONSTRAINT = DWORD(8321);
- {$EXTERNALSYM ERROR_DS_SINGLE_VALUE_CONSTRAINT}
-
-//
-// MessageId: ERROR_DS_RANGE_CONSTRAINT
-//
-// MessageText:
-//
-// A value for the attribute was not in the acceptable range of values.
-//
- ERROR_DS_RANGE_CONSTRAINT = DWORD(8322);
- {$EXTERNALSYM ERROR_DS_RANGE_CONSTRAINT}
-
-//
-// MessageId: ERROR_DS_ATT_VAL_ALREADY_EXISTS
-//
-// MessageText:
-//
-// The specified value already exists.
-//
- ERROR_DS_ATT_VAL_ALREADY_EXISTS = DWORD(8323);
- {$EXTERNALSYM ERROR_DS_ATT_VAL_ALREADY_EXISTS}
-
-//
-// MessageId: ERROR_DS_CANT_REM_MISSING_ATT
-//
-// MessageText:
-//
-// The attribute cannot be removed because it is not present on the object.
-//
- ERROR_DS_CANT_REM_MISSING_ATT = DWORD(8324);
- {$EXTERNALSYM ERROR_DS_CANT_REM_MISSING_ATT}
-
-//
-// MessageId: ERROR_DS_CANT_REM_MISSING_ATT_VAL
-//
-// MessageText:
-//
-// The attribute value cannot be removed because it is not present on the object.
-//
- ERROR_DS_CANT_REM_MISSING_ATT_VAL = DWORD(8325);
- {$EXTERNALSYM ERROR_DS_CANT_REM_MISSING_ATT_VAL}
-
-//
-// MessageId: ERROR_DS_ROOT_CANT_BE_SUBREF
-//
-// MessageText:
-//
-// The specified root object cannot be a subref.
-//
- ERROR_DS_ROOT_CANT_BE_SUBREF = DWORD(8326);
- {$EXTERNALSYM ERROR_DS_ROOT_CANT_BE_SUBREF}
-
-//
-// MessageId: ERROR_DS_NO_CHAINING
-//
-// MessageText:
-//
-// Chaining is not permitted.
-//
- ERROR_DS_NO_CHAINING = DWORD(8327);
- {$EXTERNALSYM ERROR_DS_NO_CHAINING}
-
-//
-// MessageId: ERROR_DS_NO_CHAINED_EVAL
-//
-// MessageText:
-//
-// Chained evaluation is not permitted.
-//
- ERROR_DS_NO_CHAINED_EVAL = DWORD(8328);
- {$EXTERNALSYM ERROR_DS_NO_CHAINED_EVAL}
-
-//
-// MessageId: ERROR_DS_NO_PARENT_OBJECT
-//
-// MessageText:
-//
-// The operation could not be performed because the object's parent is either uninstantiated or deleted.
-//
- ERROR_DS_NO_PARENT_OBJECT = DWORD(8329);
- {$EXTERNALSYM ERROR_DS_NO_PARENT_OBJECT}
-
-//
-// MessageId: ERROR_DS_PARENT_IS_AN_ALIAS
-//
-// MessageText:
-//
-// Having a parent that is an alias is not permitted. Aliases are leaf objects.
-//
- ERROR_DS_PARENT_IS_AN_ALIAS = DWORD(8330);
- {$EXTERNALSYM ERROR_DS_PARENT_IS_AN_ALIAS}
-
-//
-// MessageId: ERROR_DS_CANT_MIX_MASTER_AND_REPS
-//
-// MessageText:
-//
-// The object and parent must be of the same type, either both masters or both replicas.
-//
- ERROR_DS_CANT_MIX_MASTER_AND_REPS = DWORD(8331);
- {$EXTERNALSYM ERROR_DS_CANT_MIX_MASTER_AND_REPS}
-
-//
-// MessageId: ERROR_DS_CHILDREN_EXIST
-//
-// MessageText:
-//
-// The operation cannot be performed because child objects exist. This operation can only be performed on a leaf object.
-//
- ERROR_DS_CHILDREN_EXIST = DWORD(8332);
- {$EXTERNALSYM ERROR_DS_CHILDREN_EXIST}
-
-//
-// MessageId: ERROR_DS_OBJ_NOT_FOUND
-//
-// MessageText:
-//
-// Directory object not found.
-//
- ERROR_DS_OBJ_NOT_FOUND = DWORD(8333);
- {$EXTERNALSYM ERROR_DS_OBJ_NOT_FOUND}
-
-//
-// MessageId: ERROR_DS_ALIASED_OBJ_MISSING
-//
-// MessageText:
-//
-// The aliased object is missing.
-//
- ERROR_DS_ALIASED_OBJ_MISSING = DWORD(8334);
- {$EXTERNALSYM ERROR_DS_ALIASED_OBJ_MISSING}
-
-//
-// MessageId: ERROR_DS_BAD_NAME_SYNTAX
-//
-// MessageText:
-//
-// The object name has bad syntax.
-//
- ERROR_DS_BAD_NAME_SYNTAX = DWORD(8335);
- {$EXTERNALSYM ERROR_DS_BAD_NAME_SYNTAX}
-
-//
-// MessageId: ERROR_DS_ALIAS_POINTS_TO_ALIAS
-//
-// MessageText:
-//
-// It is not permitted for an alias to refer to another alias.
-//
- ERROR_DS_ALIAS_POINTS_TO_ALIAS = DWORD(8336);
- {$EXTERNALSYM ERROR_DS_ALIAS_POINTS_TO_ALIAS}
-
-//
-// MessageId: ERROR_DS_CANT_DEREF_ALIAS
-//
-// MessageText:
-//
-// The alias cannot be dereferenced.
-//
- ERROR_DS_CANT_DEREF_ALIAS = DWORD(8337);
- {$EXTERNALSYM ERROR_DS_CANT_DEREF_ALIAS}
-
-//
-// MessageId: ERROR_DS_OUT_OF_SCOPE
-//
-// MessageText:
-//
-// The operation is out of scope.
-//
- ERROR_DS_OUT_OF_SCOPE = DWORD(8338);
- {$EXTERNALSYM ERROR_DS_OUT_OF_SCOPE}
-
-//
-// MessageId: ERROR_DS_OBJECT_BEING_REMOVED
-//
-// MessageText:
-//
-// The operation cannot continue because the object is in the process of being removed.
-//
- ERROR_DS_OBJECT_BEING_REMOVED = DWORD(8339);
- {$EXTERNALSYM ERROR_DS_OBJECT_BEING_REMOVED}
-
-//
-// MessageId: ERROR_DS_CANT_DELETE_DSA_OBJ
-//
-// MessageText:
-//
-// The DSA object cannot be deleted.
-//
- ERROR_DS_CANT_DELETE_DSA_OBJ = DWORD(8340);
- {$EXTERNALSYM ERROR_DS_CANT_DELETE_DSA_OBJ}
-
-//
-// MessageId: ERROR_DS_GENERIC_ERROR
-//
-// MessageText:
-//
-// A directory service error has occurred.
-//
- ERROR_DS_GENERIC_ERROR = DWORD(8341);
- {$EXTERNALSYM ERROR_DS_GENERIC_ERROR}
-
-//
-// MessageId: ERROR_DS_DSA_MUST_BE_INT_MASTER
-//
-// MessageText:
-//
-// The operation can only be performed on an internal master DSA object.
-//
- ERROR_DS_DSA_MUST_BE_INT_MASTER = DWORD(8342);
- {$EXTERNALSYM ERROR_DS_DSA_MUST_BE_INT_MASTER}
-
-//
-// MessageId: ERROR_DS_CLASS_NOT_DSA
-//
-// MessageText:
-//
-// The object must be of class DSA.
-//
- ERROR_DS_CLASS_NOT_DSA = DWORD(8343);
- {$EXTERNALSYM ERROR_DS_CLASS_NOT_DSA}
-
-//
-// MessageId: ERROR_DS_INSUFF_ACCESS_RIGHTS
-//
-// MessageText:
-//
-// Insufficient access rights to perform the operation.
-//
- ERROR_DS_INSUFF_ACCESS_RIGHTS = DWORD(8344);
- {$EXTERNALSYM ERROR_DS_INSUFF_ACCESS_RIGHTS}
-
-//
-// MessageId: ERROR_DS_ILLEGAL_SUPERIOR
-//
-// MessageText:
-//
-// The object cannot be added because the parent is not on the list of possible superiors.
-//
- ERROR_DS_ILLEGAL_SUPERIOR = DWORD(8345);
- {$EXTERNALSYM ERROR_DS_ILLEGAL_SUPERIOR}
-
-//
-// MessageId: ERROR_DS_ATTRIBUTE_OWNED_BY_SAM
-//
-// MessageText:
-//
-// Access to the attribute is not permitted because the attribute is owned by the Security Accounts Manager (SAM).
-//
- ERROR_DS_ATTRIBUTE_OWNED_BY_SAM = DWORD(8346);
- {$EXTERNALSYM ERROR_DS_ATTRIBUTE_OWNED_BY_SAM}
-
-//
-// MessageId: ERROR_DS_NAME_TOO_MANY_PARTS
-//
-// MessageText:
-//
-// The name has too many parts.
-//
- ERROR_DS_NAME_TOO_MANY_PARTS = DWORD(8347);
- {$EXTERNALSYM ERROR_DS_NAME_TOO_MANY_PARTS}
-
-//
-// MessageId: ERROR_DS_NAME_TOO_LONG
-//
-// MessageText:
-//
-// The name is too long.
-//
- ERROR_DS_NAME_TOO_LONG = DWORD(8348);
- {$EXTERNALSYM ERROR_DS_NAME_TOO_LONG}
-
-//
-// MessageId: ERROR_DS_NAME_VALUE_TOO_LONG
-//
-// MessageText:
-//
-// The name value is too long.
-//
- ERROR_DS_NAME_VALUE_TOO_LONG = DWORD(8349);
- {$EXTERNALSYM ERROR_DS_NAME_VALUE_TOO_LONG}
-
-//
-// MessageId: ERROR_DS_NAME_UNPARSEABLE
-//
-// MessageText:
-//
-// The directory service encountered an error parsing a name.
-//
- ERROR_DS_NAME_UNPARSEABLE = DWORD(8350);
- {$EXTERNALSYM ERROR_DS_NAME_UNPARSEABLE}
-
-//
-// MessageId: ERROR_DS_NAME_TYPE_UNKNOWN
-//
-// MessageText:
-//
-// The directory service cannot get the attribute type for a name.
-//
- ERROR_DS_NAME_TYPE_UNKNOWN = DWORD(8351);
- {$EXTERNALSYM ERROR_DS_NAME_TYPE_UNKNOWN}
-
-//
-// MessageId: ERROR_DS_NOT_AN_OBJECT
-//
-// MessageText:
-//
-// The name does not identify an object; the name identifies a phantom.
-//
- ERROR_DS_NOT_AN_OBJECT = DWORD(8352);
- {$EXTERNALSYM ERROR_DS_NOT_AN_OBJECT}
-
-//
-// MessageId: ERROR_DS_SEC_DESC_TOO_SHORT
-//
-// MessageText:
-//
-// The security descriptor is too short.
-//
- ERROR_DS_SEC_DESC_TOO_SHORT = DWORD(8353);
- {$EXTERNALSYM ERROR_DS_SEC_DESC_TOO_SHORT}
-
-//
-// MessageId: ERROR_DS_SEC_DESC_INVALID
-//
-// MessageText:
-//
-// The security descriptor is invalid.
-//
- ERROR_DS_SEC_DESC_INVALID = DWORD(8354);
- {$EXTERNALSYM ERROR_DS_SEC_DESC_INVALID}
-
-//
-// MessageId: ERROR_DS_NO_DELETED_NAME
-//
-// MessageText:
-//
-// Failed to create name for deleted object.
-//
- ERROR_DS_NO_DELETED_NAME = DWORD(8355);
- {$EXTERNALSYM ERROR_DS_NO_DELETED_NAME}
-
-//
-// MessageId: ERROR_DS_SUBREF_MUST_HAVE_PARENT
-//
-// MessageText:
-//
-// The parent of a new subref must exist.
-//
- ERROR_DS_SUBREF_MUST_HAVE_PARENT = DWORD(8356);
- {$EXTERNALSYM ERROR_DS_SUBREF_MUST_HAVE_PARENT}
-
-//
-// MessageId: ERROR_DS_NCNAME_MUST_BE_NC
-//
-// MessageText:
-//
-// The object must be a naming context.
-//
- ERROR_DS_NCNAME_MUST_BE_NC = DWORD(8357);
- {$EXTERNALSYM ERROR_DS_NCNAME_MUST_BE_NC}
-
-//
-// MessageId: ERROR_DS_CANT_ADD_SYSTEM_ONLY
-//
-// MessageText:
-//
-// It is not permitted to add an attribute which is owned by the system.
-//
- ERROR_DS_CANT_ADD_SYSTEM_ONLY = DWORD(8358);
- {$EXTERNALSYM ERROR_DS_CANT_ADD_SYSTEM_ONLY}
-
-//
-// MessageId: ERROR_DS_CLASS_MUST_BE_CONCRETE
-//
-// MessageText:
-//
-// The class of the object must be structural; you cannot instantiate an abstract class.
-//
- ERROR_DS_CLASS_MUST_BE_CONCRETE = DWORD(8359);
- {$EXTERNALSYM ERROR_DS_CLASS_MUST_BE_CONCRETE}
-
-//
-// MessageId: ERROR_DS_INVALID_DMD
-//
-// MessageText:
-//
-// The schema object could not be found.
-//
- ERROR_DS_INVALID_DMD = DWORD(8360);
- {$EXTERNALSYM ERROR_DS_INVALID_DMD}
-
-//
-// MessageId: ERROR_DS_OBJ_GUID_EXISTS
-//
-// MessageText:
-//
-// A local object with this GUID (dead or alive) already exists.
-//
- ERROR_DS_OBJ_GUID_EXISTS = DWORD(8361);
- {$EXTERNALSYM ERROR_DS_OBJ_GUID_EXISTS}
-
-//
-// MessageId: ERROR_DS_NOT_ON_BACKLINK
-//
-// MessageText:
-//
-// The operation cannot be performed on a back link.
-//
- ERROR_DS_NOT_ON_BACKLINK = DWORD(8362);
- {$EXTERNALSYM ERROR_DS_NOT_ON_BACKLINK}
-
-//
-// MessageId: ERROR_DS_NO_CROSSREF_FOR_NC
-//
-// MessageText:
-//
-// The cross reference for the specified naming context could not be found.
-//
- ERROR_DS_NO_CROSSREF_FOR_NC = DWORD(8363);
- {$EXTERNALSYM ERROR_DS_NO_CROSSREF_FOR_NC}
-
-//
-// MessageId: ERROR_DS_SHUTTING_DOWN
-//
-// MessageText:
-//
-// The operation could not be performed because the directory service is shutting down.
-//
- ERROR_DS_SHUTTING_DOWN = DWORD(8364);
- {$EXTERNALSYM ERROR_DS_SHUTTING_DOWN}
-
-//
-// MessageId: ERROR_DS_UNKNOWN_OPERATION
-//
-// MessageText:
-//
-// The directory service request is invalid.
-//
- ERROR_DS_UNKNOWN_OPERATION = DWORD(8365);
- {$EXTERNALSYM ERROR_DS_UNKNOWN_OPERATION}
-
-//
-// MessageId: ERROR_DS_INVALID_ROLE_OWNER
-//
-// MessageText:
-//
-// The role owner attribute could not be read.
-//
- ERROR_DS_INVALID_ROLE_OWNER = DWORD(8366);
- {$EXTERNALSYM ERROR_DS_INVALID_ROLE_OWNER}
-
-//
-// MessageId: ERROR_DS_COULDNT_CONTACT_FSMO
-//
-// MessageText:
-//
-// The requested FSMO operation failed. The current FSMO holder could not be contacted.
-//
- ERROR_DS_COULDNT_CONTACT_FSMO = DWORD(8367);
- {$EXTERNALSYM ERROR_DS_COULDNT_CONTACT_FSMO}
-
-//
-// MessageId: ERROR_DS_CROSS_NC_DN_RENAME
-//
-// MessageText:
-//
-// Modification of a DN across a naming context is not permitted.
-//
- ERROR_DS_CROSS_NC_DN_RENAME = DWORD(8368);
- {$EXTERNALSYM ERROR_DS_CROSS_NC_DN_RENAME}
-
-//
-// MessageId: ERROR_DS_CANT_MOD_SYSTEM_ONLY
-//
-// MessageText:
-//
-// The attribute cannot be modified because it is owned by the system.
-//
- ERROR_DS_CANT_MOD_SYSTEM_ONLY = DWORD(8369);
- {$EXTERNALSYM ERROR_DS_CANT_MOD_SYSTEM_ONLY}
-
-//
-// MessageId: ERROR_DS_REPLICATOR_ONLY
-//
-// MessageText:
-//
-// Only the replicator can perform this function.
-//
- ERROR_DS_REPLICATOR_ONLY = DWORD(8370);
- {$EXTERNALSYM ERROR_DS_REPLICATOR_ONLY}
-
-//
-// MessageId: ERROR_DS_OBJ_CLASS_NOT_DEFINED
-//
-// MessageText:
-//
-// The specified class is not defined.
-//
- ERROR_DS_OBJ_CLASS_NOT_DEFINED = DWORD(8371);
- {$EXTERNALSYM ERROR_DS_OBJ_CLASS_NOT_DEFINED}
-
-//
-// MessageId: ERROR_DS_OBJ_CLASS_NOT_SUBCLASS
-//
-// MessageText:
-//
-// The specified class is not a subclass.
-//
- ERROR_DS_OBJ_CLASS_NOT_SUBCLASS = DWORD(8372);
- {$EXTERNALSYM ERROR_DS_OBJ_CLASS_NOT_SUBCLASS}
-
-//
-// MessageId: ERROR_DS_NAME_REFERENCE_INVALID
-//
-// MessageText:
-//
-// The name reference is invalid.
-//
- ERROR_DS_NAME_REFERENCE_INVALID = DWORD(8373);
- {$EXTERNALSYM ERROR_DS_NAME_REFERENCE_INVALID}
-
-//
-// MessageId: ERROR_DS_CROSS_REF_EXISTS
-//
-// MessageText:
-//
-// A cross reference already exists.
-//
- ERROR_DS_CROSS_REF_EXISTS = DWORD(8374);
- {$EXTERNALSYM ERROR_DS_CROSS_REF_EXISTS}
-
-//
-// MessageId: ERROR_DS_CANT_DEL_MASTER_CROSSREF
-//
-// MessageText:
-//
-// It is not permitted to delete a master cross reference.
-//
- ERROR_DS_CANT_DEL_MASTER_CROSSREF = DWORD(8375);
- {$EXTERNALSYM ERROR_DS_CANT_DEL_MASTER_CROSSREF}
-
-//
-// MessageId: ERROR_DS_SUBTREE_NOTIFY_NOT_NC_HEAD
-//
-// MessageText:
-//
-// Subtree notifications are only supported on NC heads.
-//
- ERROR_DS_SUBTREE_NOTIFY_NOT_NC_HEAD = DWORD(8376);
- {$EXTERNALSYM ERROR_DS_SUBTREE_NOTIFY_NOT_NC_HEAD}
-
-//
-// MessageId: ERROR_DS_NOTIFY_FILTER_TOO_COMPLEX
-//
-// MessageText:
-//
-// Notification filter is too complex.
-//
- ERROR_DS_NOTIFY_FILTER_TOO_COMPLEX = DWORD(8377);
- {$EXTERNALSYM ERROR_DS_NOTIFY_FILTER_TOO_COMPLEX}
-
-//
-// MessageId: ERROR_DS_DUP_RDN
-//
-// MessageText:
-//
-// Schema update failed: duplicate RDN.
-//
- ERROR_DS_DUP_RDN = DWORD(8378);
- {$EXTERNALSYM ERROR_DS_DUP_RDN}
-
-//
-// MessageId: ERROR_DS_DUP_OID
-//
-// MessageText:
-//
-// Schema update failed: duplicate OID.
-//
- ERROR_DS_DUP_OID = DWORD(8379);
- {$EXTERNALSYM ERROR_DS_DUP_OID}
-
-//
-// MessageId: ERROR_DS_DUP_MAPI_ID
-//
-// MessageText:
-//
-// Schema update failed: duplicate MAPI identifier.
-//
- ERROR_DS_DUP_MAPI_ID = DWORD(8380);
- {$EXTERNALSYM ERROR_DS_DUP_MAPI_ID}
-
-//
-// MessageId: ERROR_DS_DUP_SCHEMA_ID_GUID
-//
-// MessageText:
-//
-// Schema update failed: duplicate schema-id GUID.
-//
- ERROR_DS_DUP_SCHEMA_ID_GUID = DWORD(8381);
- {$EXTERNALSYM ERROR_DS_DUP_SCHEMA_ID_GUID}
-
-//
-// MessageId: ERROR_DS_DUP_LDAP_DISPLAY_NAME
-//
-// MessageText:
-//
-// Schema update failed: duplicate LDAP display name.
-//
- ERROR_DS_DUP_LDAP_DISPLAY_NAME = DWORD(8382);
- {$EXTERNALSYM ERROR_DS_DUP_LDAP_DISPLAY_NAME}
-
-//
-// MessageId: ERROR_DS_SEMANTIC_ATT_TEST
-//
-// MessageText:
-//
-// Schema update failed: range-lower less than range upper.
-//
- ERROR_DS_SEMANTIC_ATT_TEST = DWORD(8383);
- {$EXTERNALSYM ERROR_DS_SEMANTIC_ATT_TEST}
-
-//
-// MessageId: ERROR_DS_SYNTAX_MISMATCH
-//
-// MessageText:
-//
-// Schema update failed: syntax mismatch.
-//
- ERROR_DS_SYNTAX_MISMATCH = DWORD(8384);
- {$EXTERNALSYM ERROR_DS_SYNTAX_MISMATCH}
-
-//
-// MessageId: ERROR_DS_EXISTS_IN_MUST_HAVE
-//
-// MessageText:
-//
-// Schema deletion failed: attribute is used in must-contain.
-//
- ERROR_DS_EXISTS_IN_MUST_HAVE = DWORD(8385);
- {$EXTERNALSYM ERROR_DS_EXISTS_IN_MUST_HAVE}
-
-//
-// MessageId: ERROR_DS_EXISTS_IN_MAY_HAVE
-//
-// MessageText:
-//
-// Schema deletion failed: attribute is used in may-contain.
-//
- ERROR_DS_EXISTS_IN_MAY_HAVE = DWORD(8386);
- {$EXTERNALSYM ERROR_DS_EXISTS_IN_MAY_HAVE}
-
-//
-// MessageId: ERROR_DS_NONEXISTENT_MAY_HAVE
-//
-// MessageText:
-//
-// Schema update failed: attribute in may-contain does not exist.
-//
- ERROR_DS_NONEXISTENT_MAY_HAVE = DWORD(8387);
- {$EXTERNALSYM ERROR_DS_NONEXISTENT_MAY_HAVE}
-
-//
-// MessageId: ERROR_DS_NONEXISTENT_MUST_HAVE
-//
-// MessageText:
-//
-// Schema update failed: attribute in must-contain does not exist.
-//
- ERROR_DS_NONEXISTENT_MUST_HAVE = DWORD(8388);
- {$EXTERNALSYM ERROR_DS_NONEXISTENT_MUST_HAVE}
-
-//
-// MessageId: ERROR_DS_AUX_CLS_TEST_FAIL
-//
-// MessageText:
-//
-// Schema update failed: class in aux-class list does not exist or is not an auxiliary class.
-//
- ERROR_DS_AUX_CLS_TEST_FAIL = DWORD(8389);
- {$EXTERNALSYM ERROR_DS_AUX_CLS_TEST_FAIL}
-
-//
-// MessageId: ERROR_DS_NONEXISTENT_POSS_SUP
-//
-// MessageText:
-//
-// Schema update failed: class in poss-superiors does not exist.
-//
- ERROR_DS_NONEXISTENT_POSS_SUP = DWORD(8390);
- {$EXTERNALSYM ERROR_DS_NONEXISTENT_POSS_SUP}
-
-//
-// MessageId: ERROR_DS_SUB_CLS_TEST_FAIL
-//
-// MessageText:
-//
-// Schema update failed: class in subclassof list does not exist or does not satisfy hierarchy rules.
-//
- ERROR_DS_SUB_CLS_TEST_FAIL = DWORD(8391);
- {$EXTERNALSYM ERROR_DS_SUB_CLS_TEST_FAIL}
-
-//
-// MessageId: ERROR_DS_BAD_RDN_ATT_ID_SYNTAX
-//
-// MessageText:
-//
-// Schema update failed: Rdn-Att-Id has wrong syntax.
-//
- ERROR_DS_BAD_RDN_ATT_ID_SYNTAX = DWORD(8392);
- {$EXTERNALSYM ERROR_DS_BAD_RDN_ATT_ID_SYNTAX}
-
-//
-// MessageId: ERROR_DS_EXISTS_IN_AUX_CLS
-//
-// MessageText:
-//
-// Schema deletion failed: class is used as auxiliary class.
-//
- ERROR_DS_EXISTS_IN_AUX_CLS = DWORD(8393);
- {$EXTERNALSYM ERROR_DS_EXISTS_IN_AUX_CLS}
-
-//
-// MessageId: ERROR_DS_EXISTS_IN_SUB_CLS
-//
-// MessageText:
-//
-// Schema deletion failed: class is used as sub class.
-//
- ERROR_DS_EXISTS_IN_SUB_CLS = DWORD(8394);
- {$EXTERNALSYM ERROR_DS_EXISTS_IN_SUB_CLS}
-
-//
-// MessageId: ERROR_DS_EXISTS_IN_POSS_SUP
-//
-// MessageText:
-//
-// Schema deletion failed: class is used as poss superior.
-//
- ERROR_DS_EXISTS_IN_POSS_SUP = DWORD(8395);
- {$EXTERNALSYM ERROR_DS_EXISTS_IN_POSS_SUP}
-
-//
-// MessageId: ERROR_DS_RECALCSCHEMA_FAILED
-//
-// MessageText:
-//
-// Schema update failed in recalculating validation cache.
-//
- ERROR_DS_RECALCSCHEMA_FAILED = DWORD(8396);
- {$EXTERNALSYM ERROR_DS_RECALCSCHEMA_FAILED}
-
-//
-// MessageId: ERROR_DS_TREE_DELETE_NOT_FINISHED
-//
-// MessageText:
-//
-// The tree deletion is not finished. The request must be made again to continue deleting the tree.
-//
- ERROR_DS_TREE_DELETE_NOT_FINISHED = DWORD(8397);
- {$EXTERNALSYM ERROR_DS_TREE_DELETE_NOT_FINISHED}
-
-//
-// MessageId: ERROR_DS_CANT_DELETE
-//
-// MessageText:
-//
-// The requested delete operation could not be performed.
-//
- ERROR_DS_CANT_DELETE = DWORD(8398);
- {$EXTERNALSYM ERROR_DS_CANT_DELETE}
-
-//
-// MessageId: ERROR_DS_ATT_SCHEMA_REQ_ID
-//
-// MessageText:
-//
-// Cannot read the governs class identifier for the schema record.
-//
- ERROR_DS_ATT_SCHEMA_REQ_ID = DWORD(8399);
- {$EXTERNALSYM ERROR_DS_ATT_SCHEMA_REQ_ID}
-
-//
-// MessageId: ERROR_DS_BAD_ATT_SCHEMA_SYNTAX
-//
-// MessageText:
-//
-// The attribute schema has bad syntax.
-//
- ERROR_DS_BAD_ATT_SCHEMA_SYNTAX = DWORD(8400);
- {$EXTERNALSYM ERROR_DS_BAD_ATT_SCHEMA_SYNTAX}
-
-//
-// MessageId: ERROR_DS_CANT_CACHE_ATT
-//
-// MessageText:
-//
-// The attribute could not be cached.
-//
- ERROR_DS_CANT_CACHE_ATT = DWORD(8401);
- {$EXTERNALSYM ERROR_DS_CANT_CACHE_ATT}
-
-//
-// MessageId: ERROR_DS_CANT_CACHE_CLASS
-//
-// MessageText:
-//
-// The class could not be cached.
-//
- ERROR_DS_CANT_CACHE_CLASS = DWORD(8402);
- {$EXTERNALSYM ERROR_DS_CANT_CACHE_CLASS}
-
-//
-// MessageId: ERROR_DS_CANT_REMOVE_ATT_CACHE
-//
-// MessageText:
-//
-// The attribute could not be removed from the cache.
-//
- ERROR_DS_CANT_REMOVE_ATT_CACHE = DWORD(8403);
- {$EXTERNALSYM ERROR_DS_CANT_REMOVE_ATT_CACHE}
-
-//
-// MessageId: ERROR_DS_CANT_REMOVE_CLASS_CACHE
-//
-// MessageText:
-//
-// The class could not be removed from the cache.
-//
- ERROR_DS_CANT_REMOVE_CLASS_CACHE = DWORD(8404);
- {$EXTERNALSYM ERROR_DS_CANT_REMOVE_CLASS_CACHE}
-
-//
-// MessageId: ERROR_DS_CANT_RETRIEVE_DN
-//
-// MessageText:
-//
-// The distinguished name attribute could not be read.
-//
- ERROR_DS_CANT_RETRIEVE_DN = DWORD(8405);
- {$EXTERNALSYM ERROR_DS_CANT_RETRIEVE_DN}
-
-//
-// MessageId: ERROR_DS_MISSING_SUPREF
-//
-// MessageText:
-//
-// No superior reference has been configured for the directory service. The directory service is therefore unable to issue referrals to objects outside this forest.
-//
- ERROR_DS_MISSING_SUPREF = DWORD(8406);
- {$EXTERNALSYM ERROR_DS_MISSING_SUPREF}
-
-//
-// MessageId: ERROR_DS_CANT_RETRIEVE_INSTANCE
-//
-// MessageText:
-//
-// The instance type attribute could not be retrieved.
-//
- ERROR_DS_CANT_RETRIEVE_INSTANCE = DWORD(8407);
- {$EXTERNALSYM ERROR_DS_CANT_RETRIEVE_INSTANCE}
-
-//
-// MessageId: ERROR_DS_CODE_INCONSISTENCY
-//
-// MessageText:
-//
-// An internal error has occurred.
-//
- ERROR_DS_CODE_INCONSISTENCY = DWORD(8408);
- {$EXTERNALSYM ERROR_DS_CODE_INCONSISTENCY}
-
-//
-// MessageId: ERROR_DS_DATABASE_ERROR
-//
-// MessageText:
-//
-// A database error has occurred.
-//
- ERROR_DS_DATABASE_ERROR = DWORD(8409);
- {$EXTERNALSYM ERROR_DS_DATABASE_ERROR}
-
-//
-// MessageId: ERROR_DS_GOVERNSID_MISSING
-//
-// MessageText:
-//
-// The attribute GOVERNSID is missing.
-//
- ERROR_DS_GOVERNSID_MISSING = DWORD(8410);
- {$EXTERNALSYM ERROR_DS_GOVERNSID_MISSING}
-
-//
-// MessageId: ERROR_DS_MISSING_EXPECTED_ATT
-//
-// MessageText:
-//
-// An expected attribute is missing.
-//
- ERROR_DS_MISSING_EXPECTED_ATT = DWORD(8411);
- {$EXTERNALSYM ERROR_DS_MISSING_EXPECTED_ATT}
-
-//
-// MessageId: ERROR_DS_NCNAME_MISSING_CR_REF
-//
-// MessageText:
-//
-// The specified naming context is missing a cross reference.
-//
- ERROR_DS_NCNAME_MISSING_CR_REF = DWORD(8412);
- {$EXTERNALSYM ERROR_DS_NCNAME_MISSING_CR_REF}
-
-//
-// MessageId: ERROR_DS_SECURITY_CHECKING_ERROR
-//
-// MessageText:
-//
-// A security checking error has occurred.
-//
- ERROR_DS_SECURITY_CHECKING_ERROR = DWORD(8413);
- {$EXTERNALSYM ERROR_DS_SECURITY_CHECKING_ERROR}
-
-//
-// MessageId: ERROR_DS_SCHEMA_NOT_LOADED
-//
-// MessageText:
-//
-// The schema is not loaded.
-//
- ERROR_DS_SCHEMA_NOT_LOADED = DWORD(8414);
- {$EXTERNALSYM ERROR_DS_SCHEMA_NOT_LOADED}
-
-//
-// MessageId: ERROR_DS_SCHEMA_ALLOC_FAILED
-//
-// MessageText:
-//
-// Schema allocation failed. Please check if the machine is running low on memory.
-//
- ERROR_DS_SCHEMA_ALLOC_FAILED = DWORD(8415);
- {$EXTERNALSYM ERROR_DS_SCHEMA_ALLOC_FAILED}
-
-//
-// MessageId: ERROR_DS_ATT_SCHEMA_REQ_SYNTAX
-//
-// MessageText:
-//
-// Failed to obtain the required syntax for the attribute schema.
-//
- ERROR_DS_ATT_SCHEMA_REQ_SYNTAX = DWORD(8416);
- {$EXTERNALSYM ERROR_DS_ATT_SCHEMA_REQ_SYNTAX}
-
-//
-// MessageId: ERROR_DS_GCVERIFY_ERROR
-//
-// MessageText:
-//
-// The global catalog verification failed. The global catalog is not available or does not support the operation. Some part of the directory is currently not available.
-//
- ERROR_DS_GCVERIFY_ERROR = DWORD(8417);
- {$EXTERNALSYM ERROR_DS_GCVERIFY_ERROR}
-
-//
-// MessageId: ERROR_DS_DRA_SCHEMA_MISMATCH
-//
-// MessageText:
-//
-// The replication operation failed because of a schema mismatch between the servers involved.
-//
- ERROR_DS_DRA_SCHEMA_MISMATCH = DWORD(8418);
- {$EXTERNALSYM ERROR_DS_DRA_SCHEMA_MISMATCH}
-
-//
-// MessageId: ERROR_DS_CANT_FIND_DSA_OBJ
-//
-// MessageText:
-//
-// The DSA object could not be found.
-//
- ERROR_DS_CANT_FIND_DSA_OBJ = DWORD(8419);
- {$EXTERNALSYM ERROR_DS_CANT_FIND_DSA_OBJ}
-
-//
-// MessageId: ERROR_DS_CANT_FIND_EXPECTED_NC
-//
-// MessageText:
-//
-// The naming context could not be found.
-//
- ERROR_DS_CANT_FIND_EXPECTED_NC = DWORD(8420);
- {$EXTERNALSYM ERROR_DS_CANT_FIND_EXPECTED_NC}
-
-//
-// MessageId: ERROR_DS_CANT_FIND_NC_IN_CACHE
-//
-// MessageText:
-//
-// The naming context could not be found in the cache.
-//
- ERROR_DS_CANT_FIND_NC_IN_CACHE = DWORD(8421);
- {$EXTERNALSYM ERROR_DS_CANT_FIND_NC_IN_CACHE}
-
-//
-// MessageId: ERROR_DS_CANT_RETRIEVE_CHILD
-//
-// MessageText:
-//
-// The child object could not be retrieved.
-//
- ERROR_DS_CANT_RETRIEVE_CHILD = DWORD(8422);
- {$EXTERNALSYM ERROR_DS_CANT_RETRIEVE_CHILD}
-
-//
-// MessageId: ERROR_DS_SECURITY_ILLEGAL_MODIFY
-//
-// MessageText:
-//
-// The modification was not permitted for security reasons.
-//
- ERROR_DS_SECURITY_ILLEGAL_MODIFY = DWORD(8423);
- {$EXTERNALSYM ERROR_DS_SECURITY_ILLEGAL_MODIFY}
-
-//
-// MessageId: ERROR_DS_CANT_REPLACE_HIDDEN_REC
-//
-// MessageText:
-//
-// The operation cannot replace the hidden record.
-//
- ERROR_DS_CANT_REPLACE_HIDDEN_REC = DWORD(8424);
- {$EXTERNALSYM ERROR_DS_CANT_REPLACE_HIDDEN_REC}
-
-//
-// MessageId: ERROR_DS_BAD_HIERARCHY_FILE
-//
-// MessageText:
-//
-// The hierarchy file is invalid.
-//
- ERROR_DS_BAD_HIERARCHY_FILE = DWORD(8425);
- {$EXTERNALSYM ERROR_DS_BAD_HIERARCHY_FILE}
-
-//
-// MessageId: ERROR_DS_BUILD_HIERARCHY_TABLE_FAILED
-//
-// MessageText:
-//
-// The attempt to build the hierarchy table failed.
-//
- ERROR_DS_BUILD_HIERARCHY_TABLE_FAILED = DWORD(8426);
- {$EXTERNALSYM ERROR_DS_BUILD_HIERARCHY_TABLE_FAILED}
-
-//
-// MessageId: ERROR_DS_CONFIG_PARAM_MISSING
-//
-// MessageText:
-//
-// The directory configuration parameter is missing from the registry.
-//
- ERROR_DS_CONFIG_PARAM_MISSING = DWORD(8427);
- {$EXTERNALSYM ERROR_DS_CONFIG_PARAM_MISSING}
-
-//
-// MessageId: ERROR_DS_COUNTING_AB_INDICES_FAILED
-//
-// MessageText:
-//
-// The attempt to count the address book indices failed.
-//
- ERROR_DS_COUNTING_AB_INDICES_FAILED = DWORD(8428);
- {$EXTERNALSYM ERROR_DS_COUNTING_AB_INDICES_FAILED}
-
-//
-// MessageId: ERROR_DS_HIERARCHY_TABLE_MALLOC_FAILED
-//
-// MessageText:
-//
-// The allocation of the hierarchy table failed.
-//
- ERROR_DS_HIERARCHY_TABLE_MALLOC_FAILED = DWORD(8429);
- {$EXTERNALSYM ERROR_DS_HIERARCHY_TABLE_MALLOC_FAILED}
-
-//
-// MessageId: ERROR_DS_INTERNAL_FAILURE
-//
-// MessageText:
-//
-// The directory service encountered an internal failure.
-//
- ERROR_DS_INTERNAL_FAILURE = DWORD(8430);
- {$EXTERNALSYM ERROR_DS_INTERNAL_FAILURE}
-
-//
-// MessageId: ERROR_DS_UNKNOWN_ERROR
-//
-// MessageText:
-//
-// The directory service encountered an unknown failure.
-//
- ERROR_DS_UNKNOWN_ERROR = DWORD(8431);
- {$EXTERNALSYM ERROR_DS_UNKNOWN_ERROR}
-
-//
-// MessageId: ERROR_DS_ROOT_REQUIRES_CLASS_TOP
-//
-// MessageText:
-//
-// A root object requires a class of 'top'.
-//
- ERROR_DS_ROOT_REQUIRES_CLASS_TOP = DWORD(8432);
- {$EXTERNALSYM ERROR_DS_ROOT_REQUIRES_CLASS_TOP}
-
-//
-// MessageId: ERROR_DS_REFUSING_FSMO_ROLES
-//
-// MessageText:
-//
-// This directory server is shutting down, and cannot take ownership of new floating single-master operation roles.
-//
- ERROR_DS_REFUSING_FSMO_ROLES = DWORD(8433);
- {$EXTERNALSYM ERROR_DS_REFUSING_FSMO_ROLES}
-
-//
-// MessageId: ERROR_DS_MISSING_FSMO_SETTINGS
-//
-// MessageText:
-//
-// The directory service is missing mandatory configuration information, and is unable to determine the ownership of floating single-master operation roles.
-//
- ERROR_DS_MISSING_FSMO_SETTINGS = DWORD(8434);
- {$EXTERNALSYM ERROR_DS_MISSING_FSMO_SETTINGS}
-
-//
-// MessageId: ERROR_DS_UNABLE_TO_SURRENDER_ROLES
-//
-// MessageText:
-//
-// The directory service was unable to transfer ownership of one or more floating single-master operation roles to other servers.
-//
- ERROR_DS_UNABLE_TO_SURRENDER_ROLES = DWORD(8435);
- {$EXTERNALSYM ERROR_DS_UNABLE_TO_SURRENDER_ROLES}
-
-//
-// MessageId: ERROR_DS_DRA_GENERIC
-//
-// MessageText:
-//
-// The replication operation failed.
-//
- ERROR_DS_DRA_GENERIC = DWORD(8436);
- {$EXTERNALSYM ERROR_DS_DRA_GENERIC}
-
-//
-// MessageId: ERROR_DS_DRA_INVALID_PARAMETER
-//
-// MessageText:
-//
-// An invalid parameter was specified for this replication operation.
-//
- ERROR_DS_DRA_INVALID_PARAMETER = DWORD(8437);
- {$EXTERNALSYM ERROR_DS_DRA_INVALID_PARAMETER}
-
-//
-// MessageId: ERROR_DS_DRA_BUSY
-//
-// MessageText:
-//
-// The directory service is too busy to complete the replication operation at this time.
-//
- ERROR_DS_DRA_BUSY = DWORD(8438);
- {$EXTERNALSYM ERROR_DS_DRA_BUSY}
-
-//
-// MessageId: ERROR_DS_DRA_BAD_DN
-//
-// MessageText:
-//
-// The distinguished name specified for this replication operation is invalid.
-//
- ERROR_DS_DRA_BAD_DN = DWORD(8439);
- {$EXTERNALSYM ERROR_DS_DRA_BAD_DN}
-
-//
-// MessageId: ERROR_DS_DRA_BAD_NC
-//
-// MessageText:
-//
-// The naming context specified for this replication operation is invalid.
-//
- ERROR_DS_DRA_BAD_NC = DWORD(8440);
- {$EXTERNALSYM ERROR_DS_DRA_BAD_NC}
-
-//
-// MessageId: ERROR_DS_DRA_DN_EXISTS
-//
-// MessageText:
-//
-// The distinguished name specified for this replication operation already exists.
-//
- ERROR_DS_DRA_DN_EXISTS = DWORD(8441);
- {$EXTERNALSYM ERROR_DS_DRA_DN_EXISTS}
-
-//
-// MessageId: ERROR_DS_DRA_INTERNAL_ERROR
-//
-// MessageText:
-//
-// The replication system encountered an internal error.
-//
- ERROR_DS_DRA_INTERNAL_ERROR = DWORD(8442);
- {$EXTERNALSYM ERROR_DS_DRA_INTERNAL_ERROR}
-
-//
-// MessageId: ERROR_DS_DRA_INCONSISTENT_DIT
-//
-// MessageText:
-//
-// The replication operation encountered a database inconsistency.
-//
- ERROR_DS_DRA_INCONSISTENT_DIT = DWORD(8443);
- {$EXTERNALSYM ERROR_DS_DRA_INCONSISTENT_DIT}
-
-//
-// MessageId: ERROR_DS_DRA_CONNECTION_FAILED
-//
-// MessageText:
-//
-// The server specified for this replication operation could not be contacted.
-//
- ERROR_DS_DRA_CONNECTION_FAILED = DWORD(8444);
- {$EXTERNALSYM ERROR_DS_DRA_CONNECTION_FAILED}
-
-//
-// MessageId: ERROR_DS_DRA_BAD_INSTANCE_TYPE
-//
-// MessageText:
-//
-// The replication operation encountered an object with an invalid instance type.
-//
- ERROR_DS_DRA_BAD_INSTANCE_TYPE = DWORD(8445);
- {$EXTERNALSYM ERROR_DS_DRA_BAD_INSTANCE_TYPE}
-
-//
-// MessageId: ERROR_DS_DRA_OUT_OF_MEM
-//
-// MessageText:
-//
-// The replication operation failed to allocate memory.
-//
- ERROR_DS_DRA_OUT_OF_MEM = DWORD(8446);
- {$EXTERNALSYM ERROR_DS_DRA_OUT_OF_MEM}
-
-//
-// MessageId: ERROR_DS_DRA_MAIL_PROBLEM
-//
-// MessageText:
-//
-// The replication operation encountered an error with the mail system.
-//
- ERROR_DS_DRA_MAIL_PROBLEM = DWORD(8447);
- {$EXTERNALSYM ERROR_DS_DRA_MAIL_PROBLEM}
-
-//
-// MessageId: ERROR_DS_DRA_REF_ALREADY_EXISTS
-//
-// MessageText:
-//
-// The replication reference information for the target server already exists.
-//
- ERROR_DS_DRA_REF_ALREADY_EXISTS = DWORD(8448);
- {$EXTERNALSYM ERROR_DS_DRA_REF_ALREADY_EXISTS}
-
-//
-// MessageId: ERROR_DS_DRA_REF_NOT_FOUND
-//
-// MessageText:
-//
-// The replication reference information for the target server does not exist.
-//
- ERROR_DS_DRA_REF_NOT_FOUND = DWORD(8449);
- {$EXTERNALSYM ERROR_DS_DRA_REF_NOT_FOUND}
-
-//
-// MessageId: ERROR_DS_DRA_OBJ_IS_REP_SOURCE
-//
-// MessageText:
-//
-// The naming context cannot be removed because it is replicated to another server.
-//
- ERROR_DS_DRA_OBJ_IS_REP_SOURCE = DWORD(8450);
- {$EXTERNALSYM ERROR_DS_DRA_OBJ_IS_REP_SOURCE}
-
-//
-// MessageId: ERROR_DS_DRA_DB_ERROR
-//
-// MessageText:
-//
-// The replication operation encountered a database error.
-//
- ERROR_DS_DRA_DB_ERROR = DWORD(8451);
- {$EXTERNALSYM ERROR_DS_DRA_DB_ERROR}
-
-//
-// MessageId: ERROR_DS_DRA_NO_REPLICA
-//
-// MessageText:
-//
-// The naming context is in the process of being removed or is not replicated from the specified server.
-//
- ERROR_DS_DRA_NO_REPLICA = DWORD(8452);
- {$EXTERNALSYM ERROR_DS_DRA_NO_REPLICA}
-
-//
-// MessageId: ERROR_DS_DRA_ACCESS_DENIED
-//
-// MessageText:
-//
-// Replication access was denied.
-//
- ERROR_DS_DRA_ACCESS_DENIED = DWORD(8453);
- {$EXTERNALSYM ERROR_DS_DRA_ACCESS_DENIED}
-
-//
-// MessageId: ERROR_DS_DRA_NOT_SUPPORTED
-//
-// MessageText:
-//
-// The requested operation is not supported by this version of the directory service.
-//
- ERROR_DS_DRA_NOT_SUPPORTED = DWORD(8454);
- {$EXTERNALSYM ERROR_DS_DRA_NOT_SUPPORTED}
-
-//
-// MessageId: ERROR_DS_DRA_RPC_CANCELLED
-//
-// MessageText:
-//
-// The replication remote procedure call was cancelled.
-//
- ERROR_DS_DRA_RPC_CANCELLED = DWORD(8455);
- {$EXTERNALSYM ERROR_DS_DRA_RPC_CANCELLED}
-
-//
-// MessageId: ERROR_DS_DRA_SOURCE_DISABLED
-//
-// MessageText:
-//
-// The source server is currently rejecting replication requests.
-//
- ERROR_DS_DRA_SOURCE_DISABLED = DWORD(8456);
- {$EXTERNALSYM ERROR_DS_DRA_SOURCE_DISABLED}
-
-//
-// MessageId: ERROR_DS_DRA_SINK_DISABLED
-//
-// MessageText:
-//
-// The destination server is currently rejecting replication requests.
-//
- ERROR_DS_DRA_SINK_DISABLED = DWORD(8457);
- {$EXTERNALSYM ERROR_DS_DRA_SINK_DISABLED}
-
-//
-// MessageId: ERROR_DS_DRA_NAME_COLLISION
-//
-// MessageText:
-//
-// The replication operation failed due to a collision of object names.
-//
- ERROR_DS_DRA_NAME_COLLISION = DWORD(8458);
- {$EXTERNALSYM ERROR_DS_DRA_NAME_COLLISION}
-
-//
-// MessageId: ERROR_DS_DRA_SOURCE_REINSTALLED
-//
-// MessageText:
-//
-// The replication source has been reinstalled.
-//
- ERROR_DS_DRA_SOURCE_REINSTALLED = DWORD(8459);
- {$EXTERNALSYM ERROR_DS_DRA_SOURCE_REINSTALLED}
-
-//
-// MessageId: ERROR_DS_DRA_MISSING_PARENT
-//
-// MessageText:
-//
-// The replication operation failed because a required parent object is missing.
-//
- ERROR_DS_DRA_MISSING_PARENT = DWORD(8460);
- {$EXTERNALSYM ERROR_DS_DRA_MISSING_PARENT}
-
-//
-// MessageId: ERROR_DS_DRA_PREEMPTED
-//
-// MessageText:
-//
-// The replication operation was preempted.
-//
- ERROR_DS_DRA_PREEMPTED = DWORD(8461);
- {$EXTERNALSYM ERROR_DS_DRA_PREEMPTED}
-
-//
-// MessageId: ERROR_DS_DRA_ABANDON_SYNC
-//
-// MessageText:
-//
-// The replication synchronization attempt was abandoned because of a lack of updates.
-//
- ERROR_DS_DRA_ABANDON_SYNC = DWORD(8462);
- {$EXTERNALSYM ERROR_DS_DRA_ABANDON_SYNC}
-
-//
-// MessageId: ERROR_DS_DRA_SHUTDOWN
-//
-// MessageText:
-//
-// The replication operation was terminated because the system is shutting down.
-//
- ERROR_DS_DRA_SHUTDOWN = DWORD(8463);
- {$EXTERNALSYM ERROR_DS_DRA_SHUTDOWN}
-
-//
-// MessageId: ERROR_DS_DRA_INCOMPATIBLE_PARTIAL_SET
-//
-// MessageText:
-//
-// Synchronization attempt failed because the destination DC is currently waiting to synchronize new partial attributes from source. This condition is normal if a recent schema change modified the partial attribute set. The destination partial attribute set is not a subset of source partial attribute set.
-//
- ERROR_DS_DRA_INCOMPATIBLE_PARTIAL_SET = DWORD(8464);
- {$EXTERNALSYM ERROR_DS_DRA_INCOMPATIBLE_PARTIAL_SET}
-
-//
-// MessageId: ERROR_DS_DRA_SOURCE_IS_PARTIAL_REPLICA
-//
-// MessageText:
-//
-// The replication synchronization attempt failed because a master replica attempted to sync from a partial replica.
-//
- ERROR_DS_DRA_SOURCE_IS_PARTIAL_REPLICA = DWORD(8465);
- {$EXTERNALSYM ERROR_DS_DRA_SOURCE_IS_PARTIAL_REPLICA}
-
-//
-// MessageId: ERROR_DS_DRA_EXTN_CONNECTION_FAILED
-//
-// MessageText:
-//
-// The server specified for this replication operation was contacted, but that server was unable to contact an additional server needed to complete the operation.
-//
- ERROR_DS_DRA_EXTN_CONNECTION_FAILED = DWORD(8466);
- {$EXTERNALSYM ERROR_DS_DRA_EXTN_CONNECTION_FAILED}
-
-//
-// MessageId: ERROR_DS_INSTALL_SCHEMA_MISMATCH
-//
-// MessageText:
-//
-// The version of the Active Directory schema of the source forest is not compatible with the version of Active Directory on this computer.
-//
- ERROR_DS_INSTALL_SCHEMA_MISMATCH = DWORD(8467);
- {$EXTERNALSYM ERROR_DS_INSTALL_SCHEMA_MISMATCH}
-
-//
-// MessageId: ERROR_DS_DUP_LINK_ID
-//
-// MessageText:
-//
-// Schema update failed: An attribute with the same link identifier already exists.
-//
- ERROR_DS_DUP_LINK_ID = DWORD(8468);
- {$EXTERNALSYM ERROR_DS_DUP_LINK_ID}
-
-//
-// MessageId: ERROR_DS_NAME_ERROR_RESOLVING
-//
-// MessageText:
-//
-// Name translation: Generic processing error.
-//
- ERROR_DS_NAME_ERROR_RESOLVING = DWORD(8469);
- {$EXTERNALSYM ERROR_DS_NAME_ERROR_RESOLVING}
-
-//
-// MessageId: ERROR_DS_NAME_ERROR_NOT_FOUND
-//
-// MessageText:
-//
-// Name translation: Could not find the name or insufficient right to see name.
-//
- ERROR_DS_NAME_ERROR_NOT_FOUND = DWORD(8470);
- {$EXTERNALSYM ERROR_DS_NAME_ERROR_NOT_FOUND}
-
-//
-// MessageId: ERROR_DS_NAME_ERROR_NOT_UNIQUE
-//
-// MessageText:
-//
-// Name translation: Input name mapped to more than one output name.
-//
- ERROR_DS_NAME_ERROR_NOT_UNIQUE = DWORD(8471);
- {$EXTERNALSYM ERROR_DS_NAME_ERROR_NOT_UNIQUE}
-
-//
-// MessageId: ERROR_DS_NAME_ERROR_NO_MAPPING
-//
-// MessageText:
-//
-// Name translation: Input name found, but not the associated output format.
-//
- ERROR_DS_NAME_ERROR_NO_MAPPING = DWORD(8472);
- {$EXTERNALSYM ERROR_DS_NAME_ERROR_NO_MAPPING}
-
-//
-// MessageId: ERROR_DS_NAME_ERROR_DOMAIN_ONLY
-//
-// MessageText:
-//
-// Name translation: Unable to resolve completely, only the domain was found.
-//
- ERROR_DS_NAME_ERROR_DOMAIN_ONLY = DWORD(8473);
- {$EXTERNALSYM ERROR_DS_NAME_ERROR_DOMAIN_ONLY}
-
-//
-// MessageId: ERROR_DS_NAME_ERROR_NO_SYNTACTICAL_MAPPING
-//
-// MessageText:
-//
-// Name translation: Unable to perform purely syntactical mapping at the client without going out to the wire.
-//
- ERROR_DS_NAME_ERROR_NO_SYNTACTICAL_MAPPING = DWORD(8474);
- {$EXTERNALSYM ERROR_DS_NAME_ERROR_NO_SYNTACTICAL_MAPPING}
-
-//
-// MessageId: ERROR_DS_CONSTRUCTED_ATT_MOD
-//
-// MessageText:
-//
-// Modification of a constructed attribute is not allowed.
-//
- ERROR_DS_CONSTRUCTED_ATT_MOD = DWORD(8475);
- {$EXTERNALSYM ERROR_DS_CONSTRUCTED_ATT_MOD}
-
-//
-// MessageId: ERROR_DS_WRONG_OM_OBJ_CLASS
-//
-// MessageText:
-//
-// The OM-Object-Class specified is incorrect for an attribute with the specified syntax.
-//
- ERROR_DS_WRONG_OM_OBJ_CLASS = DWORD(8476);
- {$EXTERNALSYM ERROR_DS_WRONG_OM_OBJ_CLASS}
-
-//
-// MessageId: ERROR_DS_DRA_REPL_PENDING
-//
-// MessageText:
-//
-// The replication request has been posted; waiting for reply.
-//
- ERROR_DS_DRA_REPL_PENDING = DWORD(8477);
- {$EXTERNALSYM ERROR_DS_DRA_REPL_PENDING}
-
-//
-// MessageId: ERROR_DS_DS_REQUIRED
-//
-// MessageText:
-//
-// The requested operation requires a directory service, and none was available.
-//
- ERROR_DS_DS_REQUIRED = DWORD(8478);
- {$EXTERNALSYM ERROR_DS_DS_REQUIRED}
-
-//
-// MessageId: ERROR_DS_INVALID_LDAP_DISPLAY_NAME
-//
-// MessageText:
-//
-// The LDAP display name of the class or attribute contains non-ASCII characters.
-//
- ERROR_DS_INVALID_LDAP_DISPLAY_NAME = DWORD(8479);
- {$EXTERNALSYM ERROR_DS_INVALID_LDAP_DISPLAY_NAME}
-
-//
-// MessageId: ERROR_DS_NON_BASE_SEARCH
-//
-// MessageText:
-//
-// The requested search operation is only supported for base searches.
-//
- ERROR_DS_NON_BASE_SEARCH = DWORD(8480);
- {$EXTERNALSYM ERROR_DS_NON_BASE_SEARCH}
-
-//
-// MessageId: ERROR_DS_CANT_RETRIEVE_ATTS
-//
-// MessageText:
-//
-// The search failed to retrieve attributes from the database.
-//
- ERROR_DS_CANT_RETRIEVE_ATTS = DWORD(8481);
- {$EXTERNALSYM ERROR_DS_CANT_RETRIEVE_ATTS}
-
-//
-// MessageId: ERROR_DS_BACKLINK_WITHOUT_LINK
-//
-// MessageText:
-//
-// The schema update operation tried to add a backward link attribute that has no corresponding forward link.
-//
- ERROR_DS_BACKLINK_WITHOUT_LINK = DWORD(8482);
- {$EXTERNALSYM ERROR_DS_BACKLINK_WITHOUT_LINK}
-
-//
-// MessageId: ERROR_DS_EPOCH_MISMATCH
-//
-// MessageText:
-//
-// Source and destination of a cross-domain move do not agree on the object's epoch number. Either source or destination does not have the latest version of the object.
-//
- ERROR_DS_EPOCH_MISMATCH = DWORD(8483);
- {$EXTERNALSYM ERROR_DS_EPOCH_MISMATCH}
-
-//
-// MessageId: ERROR_DS_SRC_NAME_MISMATCH
-//
-// MessageText:
-//
-// Source and destination of a cross-domain move do not agree on the object's current name. Either source or destination does not have the latest version of the object.
-//
- ERROR_DS_SRC_NAME_MISMATCH = DWORD(8484);
- {$EXTERNALSYM ERROR_DS_SRC_NAME_MISMATCH}
-
-//
-// MessageId: ERROR_DS_SRC_AND_DST_NC_IDENTICAL
-//
-// MessageText:
-//
-// Source and destination for the cross-domain move operation are identical. Caller should use local move operation instead of cross-domain move operation.
-//
- ERROR_DS_SRC_AND_DST_NC_IDENTICAL = DWORD(8485);
- {$EXTERNALSYM ERROR_DS_SRC_AND_DST_NC_IDENTICAL}
-
-//
-// MessageId: ERROR_DS_DST_NC_MISMATCH
-//
-// MessageText:
-//
-// Source and destination for a cross-domain move are not in agreement on the naming contexts in the forest. Either source or destination does not have the latest version of the Partitions container.
-//
- ERROR_DS_DST_NC_MISMATCH = DWORD(8486);
- {$EXTERNALSYM ERROR_DS_DST_NC_MISMATCH}
-
-//
-// MessageId: ERROR_DS_NOT_AUTHORITIVE_FOR_DST_NC
-//
-// MessageText:
-//
-// Destination of a cross-domain move is not authoritative for the destination naming context.
-//
- ERROR_DS_NOT_AUTHORITIVE_FOR_DST_NC = DWORD(8487);
- {$EXTERNALSYM ERROR_DS_NOT_AUTHORITIVE_FOR_DST_NC}
-
-//
-// MessageId: ERROR_DS_SRC_GUID_MISMATCH
-//
-// MessageText:
-//
-// Source and destination of a cross-domain move do not agree on the identity of the source object. Either source or destination does not have the latest version of the source object.
-//
- ERROR_DS_SRC_GUID_MISMATCH = DWORD(8488);
- {$EXTERNALSYM ERROR_DS_SRC_GUID_MISMATCH}
-
-//
-// MessageId: ERROR_DS_CANT_MOVE_DELETED_OBJECT
-//
-// MessageText:
-//
-// Object being moved across-domains is already known to be deleted by the destination server. The source server does not have the latest version of the source object.
-//
- ERROR_DS_CANT_MOVE_DELETED_OBJECT = DWORD(8489);
- {$EXTERNALSYM ERROR_DS_CANT_MOVE_DELETED_OBJECT}
-
-//
-// MessageId: ERROR_DS_PDC_OPERATION_IN_PROGRESS
-//
-// MessageText:
-//
-// Another operation which requires exclusive access to the PDC FSMO is already in progress.
-//
- ERROR_DS_PDC_OPERATION_IN_PROGRESS = DWORD(8490);
- {$EXTERNALSYM ERROR_DS_PDC_OPERATION_IN_PROGRESS}
-
-//
-// MessageId: ERROR_DS_CROSS_DOMAIN_CLEANUP_REQD
-//
-// MessageText:
-//
-// A cross-domain move operation failed such that two versions of the moved object exist - one each in the source and destination domains. The destination object needs to be removed to restore the system to a consistent state.
-//
- ERROR_DS_CROSS_DOMAIN_CLEANUP_REQD = DWORD(8491);
- {$EXTERNALSYM ERROR_DS_CROSS_DOMAIN_CLEANUP_REQD}
-
-//
-// MessageId: ERROR_DS_ILLEGAL_XDOM_MOVE_OPERATION
-//
-// MessageText:
-//
-// This object may not be moved across domain boundaries either because cross-domain moves for this class are disallowed, or the object has some special characteristics, e.g.: trust account or restricted RID, which prevent its move.
-//
- ERROR_DS_ILLEGAL_XDOM_MOVE_OPERATION = DWORD(8492);
- {$EXTERNALSYM ERROR_DS_ILLEGAL_XDOM_MOVE_OPERATION}
-
-//
-// MessageId: ERROR_DS_CANT_WITH_ACCT_GROUP_MEMBERSHPS
-//
-// MessageText:
-//
-// Can't move objects with memberships across domain boundaries as once moved, this would violate the membership conditions of the account group. Remove the object from any account group memberships and retry.
-//
- ERROR_DS_CANT_WITH_ACCT_GROUP_MEMBERSHPS = DWORD(8493);
- {$EXTERNALSYM ERROR_DS_CANT_WITH_ACCT_GROUP_MEMBERSHPS}
-
-//
-// MessageId: ERROR_DS_NC_MUST_HAVE_NC_PARENT
-//
-// MessageText:
-//
-// A naming context head must be the immediate child of another naming context head, not of an interior node.
-//
- ERROR_DS_NC_MUST_HAVE_NC_PARENT = DWORD(8494);
- {$EXTERNALSYM ERROR_DS_NC_MUST_HAVE_NC_PARENT}
-
-//
-// MessageId: ERROR_DS_CR_IMPOSSIBLE_TO_VALIDATE
-//
-// MessageText:
-//
-// The directory cannot validate the proposed naming context name because it does not hold a replica of the naming context above the proposed naming context. Please ensure that the domain naming master role is held by a server that is configured as a global catalog server, and that the server is up to date with its replication partners. (Applies only to Windows 2000 Domain Naming masters)
-//
- ERROR_DS_CR_IMPOSSIBLE_TO_VALIDATE = DWORD(8495);
- {$EXTERNALSYM ERROR_DS_CR_IMPOSSIBLE_TO_VALIDATE}
-
-//
-// MessageId: ERROR_DS_DST_DOMAIN_NOT_NATIVE
-//
-// MessageText:
-//
-// Destination domain must be in native mode.
-//
- ERROR_DS_DST_DOMAIN_NOT_NATIVE = DWORD(8496);
- {$EXTERNALSYM ERROR_DS_DST_DOMAIN_NOT_NATIVE}
-
-//
-// MessageId: ERROR_DS_MISSING_INFRASTRUCTURE_CONTAINER
-//
-// MessageText:
-//
-// The operation can not be performed because the server does not have an infrastructure container in the domain of interest.
-//
- ERROR_DS_MISSING_INFRASTRUCTURE_CONTAINER = DWORD(8497);
- {$EXTERNALSYM ERROR_DS_MISSING_INFRASTRUCTURE_CONTAINER}
-
-//
-// MessageId: ERROR_DS_CANT_MOVE_ACCOUNT_GROUP
-//
-// MessageText:
-//
-// Cross-domain move of non-empty account groups is not allowed.
-//
- ERROR_DS_CANT_MOVE_ACCOUNT_GROUP = DWORD(8498);
- {$EXTERNALSYM ERROR_DS_CANT_MOVE_ACCOUNT_GROUP}
-
-//
-// MessageId: ERROR_DS_CANT_MOVE_RESOURCE_GROUP
-//
-// MessageText:
-//
-// Cross-domain move of non-empty resource groups is not allowed.
-//
- ERROR_DS_CANT_MOVE_RESOURCE_GROUP = DWORD(8499);
- {$EXTERNALSYM ERROR_DS_CANT_MOVE_RESOURCE_GROUP}
-
-//
-// MessageId: ERROR_DS_INVALID_SEARCH_FLAG
-//
-// MessageText:
-//
-// The search flags for the attribute are invalid. The ANR bit is valid only on attributes of Unicode or Teletex strings.
-//
- ERROR_DS_INVALID_SEARCH_FLAG = DWORD(8500);
- {$EXTERNALSYM ERROR_DS_INVALID_SEARCH_FLAG}
-
-//
-// MessageId: ERROR_DS_NO_TREE_DELETE_ABOVE_NC
-//
-// MessageText:
-//
-// Tree deletions starting at an object which has an NC head as a descendant are not allowed.
-//
- ERROR_DS_NO_TREE_DELETE_ABOVE_NC = DWORD(8501);
- {$EXTERNALSYM ERROR_DS_NO_TREE_DELETE_ABOVE_NC}
-
-//
-// MessageId: ERROR_DS_COULDNT_LOCK_TREE_FOR_DELETE
-//
-// MessageText:
-//
-// The directory service failed to lock a tree in preparation for a tree deletion because the tree was in use.
-//
- ERROR_DS_COULDNT_LOCK_TREE_FOR_DELETE = DWORD(8502);
- {$EXTERNALSYM ERROR_DS_COULDNT_LOCK_TREE_FOR_DELETE}
-
-//
-// MessageId: ERROR_DS_COULDNT_IDENTIFY_OBJECTS_FOR_TREE_DELETE
-//
-// MessageText:
-//
-// The directory service failed to identify the list of objects to delete while attempting a tree deletion.
-//
- ERROR_DS_COULDNT_IDENTIFY_OBJECTS_FOR_TREE_DELETE = DWORD(8503);
- {$EXTERNALSYM ERROR_DS_COULDNT_IDENTIFY_OBJECTS_FOR_TREE_DELETE}
-
-//
-// MessageId: ERROR_DS_SAM_INIT_FAILURE
-//
-// MessageText:
-//
-// Security Accounts Manager initialization failed because of the following error: %1.
-// Error Status: 0x%2. Click OK to shut down the system and reboot into Directory Services Restore Mode. Check the event log for detailed information.
-//
- ERROR_DS_SAM_INIT_FAILURE = DWORD(8504);
- {$EXTERNALSYM ERROR_DS_SAM_INIT_FAILURE}
-
-//
-// MessageId: ERROR_DS_SENSITIVE_GROUP_VIOLATION
-//
-// MessageText:
-//
-// Only an administrator can modify the membership list of an administrative group.
-//
- ERROR_DS_SENSITIVE_GROUP_VIOLATION = DWORD(8505);
- {$EXTERNALSYM ERROR_DS_SENSITIVE_GROUP_VIOLATION}
-
-//
-// MessageId: ERROR_DS_CANT_MOD_PRIMARYGROUPID
-//
-// MessageText:
-//
-// Cannot change the primary group ID of a domain controller account.
-//
- ERROR_DS_CANT_MOD_PRIMARYGROUPID = DWORD(8506);
- {$EXTERNALSYM ERROR_DS_CANT_MOD_PRIMARYGROUPID}
-
-//
-// MessageId: ERROR_DS_ILLEGAL_BASE_SCHEMA_MOD
-//
-// MessageText:
-//
-// An attempt is made to modify the base schema.
-//
- ERROR_DS_ILLEGAL_BASE_SCHEMA_MOD = DWORD(8507);
- {$EXTERNALSYM ERROR_DS_ILLEGAL_BASE_SCHEMA_MOD}
-
-//
-// MessageId: ERROR_DS_NONSAFE_SCHEMA_CHANGE
-//
-// MessageText:
-//
-// Adding a new mandatory attribute to an existing class, deleting a mandatory attribute from an existing class, or adding an optional attribute to the special class Top that is not a backlink attribute (directly or through inheritance, for example, by adding or deleting an auxiliary class) is not allowed.
-//
- ERROR_DS_NONSAFE_SCHEMA_CHANGE = DWORD(8508);
- {$EXTERNALSYM ERROR_DS_NONSAFE_SCHEMA_CHANGE}
-
-//
-// MessageId: ERROR_DS_SCHEMA_UPDATE_DISALLOWED
-//
-// MessageText:
-//
-// Schema update is not allowed on this DC because the DC is not the schema FSMO Role Owner.
-//
- ERROR_DS_SCHEMA_UPDATE_DISALLOWED = DWORD(8509);
- {$EXTERNALSYM ERROR_DS_SCHEMA_UPDATE_DISALLOWED}
-
-//
-// MessageId: ERROR_DS_CANT_CREATE_UNDER_SCHEMA
-//
-// MessageText:
-//
-// An object of this class cannot be created under the schema container. You can only create attribute-schema and class-schema objects under the schema container.
-//
- ERROR_DS_CANT_CREATE_UNDER_SCHEMA = DWORD(8510);
- {$EXTERNALSYM ERROR_DS_CANT_CREATE_UNDER_SCHEMA}
-
-//
-// MessageId: ERROR_DS_INSTALL_NO_SRC_SCH_VERSION
-//
-// MessageText:
-//
-// The replica/child install failed to get the objectVersion attribute on the schema container on the source DC. Either the attribute is missing on the schema container or the credentials supplied do not have permission to read it.
-//
- ERROR_DS_INSTALL_NO_SRC_SCH_VERSION = DWORD(8511);
- {$EXTERNALSYM ERROR_DS_INSTALL_NO_SRC_SCH_VERSION}
-
-//
-// MessageId: ERROR_DS_INSTALL_NO_SCH_VERSION_IN_INIFILE
-//
-// MessageText:
-//
-// The replica/child install failed to read the objectVersion attribute in the SCHEMA section of the file schema.ini in the system32 directory.
-//
- ERROR_DS_INSTALL_NO_SCH_VERSION_IN_INIFILE = DWORD(8512);
- {$EXTERNALSYM ERROR_DS_INSTALL_NO_SCH_VERSION_IN_INIFILE}
-
-//
-// MessageId: ERROR_DS_INVALID_GROUP_TYPE
-//
-// MessageText:
-//
-// The specified group type is invalid.
-//
- ERROR_DS_INVALID_GROUP_TYPE = DWORD(8513);
- {$EXTERNALSYM ERROR_DS_INVALID_GROUP_TYPE}
-
-//
-// MessageId: ERROR_DS_NO_NEST_GLOBALGROUP_IN_MIXEDDOMAIN
-//
-// MessageText:
-//
-// You cannot nest global groups in a mixed domain if the group is security-enabled.
-//
- ERROR_DS_NO_NEST_GLOBALGROUP_IN_MIXEDDOMAIN = DWORD(8514);
- {$EXTERNALSYM ERROR_DS_NO_NEST_GLOBALGROUP_IN_MIXEDDOMAIN}
-
-//
-// MessageId: ERROR_DS_NO_NEST_LOCALGROUP_IN_MIXEDDOMAIN
-//
-// MessageText:
-//
-// You cannot nest local groups in a mixed domain if the group is security-enabled.
-//
- ERROR_DS_NO_NEST_LOCALGROUP_IN_MIXEDDOMAIN = DWORD(8515);
- {$EXTERNALSYM ERROR_DS_NO_NEST_LOCALGROUP_IN_MIXEDDOMAIN}
-
-//
-// MessageId: ERROR_DS_GLOBAL_CANT_HAVE_LOCAL_MEMBER
-//
-// MessageText:
-//
-// A global group cannot have a local group as a member.
-//
- ERROR_DS_GLOBAL_CANT_HAVE_LOCAL_MEMBER = DWORD(8516);
- {$EXTERNALSYM ERROR_DS_GLOBAL_CANT_HAVE_LOCAL_MEMBER}
-
-//
-// MessageId: ERROR_DS_GLOBAL_CANT_HAVE_UNIVERSAL_MEMBER
-//
-// MessageText:
-//
-// A global group cannot have a universal group as a member.
-//
- ERROR_DS_GLOBAL_CANT_HAVE_UNIVERSAL_MEMBER = DWORD(8517);
- {$EXTERNALSYM ERROR_DS_GLOBAL_CANT_HAVE_UNIVERSAL_MEMBER}
-
-//
-// MessageId: ERROR_DS_UNIVERSAL_CANT_HAVE_LOCAL_MEMBER
-//
-// MessageText:
-//
-// A universal group cannot have a local group as a member.
-//
- ERROR_DS_UNIVERSAL_CANT_HAVE_LOCAL_MEMBER = DWORD(8518);
- {$EXTERNALSYM ERROR_DS_UNIVERSAL_CANT_HAVE_LOCAL_MEMBER}
-
-//
-// MessageId: ERROR_DS_GLOBAL_CANT_HAVE_CROSSDOMAIN_MEMBER
-//
-// MessageText:
-//
-// A global group cannot have a cross-domain member.
-//
- ERROR_DS_GLOBAL_CANT_HAVE_CROSSDOMAIN_MEMBER = DWORD(8519);
- {$EXTERNALSYM ERROR_DS_GLOBAL_CANT_HAVE_CROSSDOMAIN_MEMBER}
-
-//
-// MessageId: ERROR_DS_LOCAL_CANT_HAVE_CROSSDOMAIN_LOCAL_MEMBER
-//
-// MessageText:
-//
-// A local group cannot have another cross domain local group as a member.
-//
- ERROR_DS_LOCAL_CANT_HAVE_CROSSDOMAIN_LOCAL_MEMBER = DWORD(8520);
- {$EXTERNALSYM ERROR_DS_LOCAL_CANT_HAVE_CROSSDOMAIN_LOCAL_MEMBER}
-
-//
-// MessageId: ERROR_DS_HAVE_PRIMARY_MEMBERS
-//
-// MessageText:
-//
-// A group with primary members cannot change to a security-disabled group.
-//
- ERROR_DS_HAVE_PRIMARY_MEMBERS = DWORD(8521);
- {$EXTERNALSYM ERROR_DS_HAVE_PRIMARY_MEMBERS}
-
-//
-// MessageId: ERROR_DS_STRING_SD_CONVERSION_FAILED
-//
-// MessageText:
-//
-// The schema cache load failed to convert the string default SD on a class-schema object.
-//
- ERROR_DS_STRING_SD_CONVERSION_FAILED = DWORD(8522);
- {$EXTERNALSYM ERROR_DS_STRING_SD_CONVERSION_FAILED}
-
-//
-// MessageId: ERROR_DS_NAMING_MASTER_GC
-//
-// MessageText:
-//
-// Only DSAs configured to be Global Catalog servers should be allowed to hold the Domain Naming Master FSMO role. (Applies only to Windows 2000 servers)
-//
- ERROR_DS_NAMING_MASTER_GC = DWORD(8523);
- {$EXTERNALSYM ERROR_DS_NAMING_MASTER_GC}
-
-//
-// MessageId: ERROR_DS_DNS_LOOKUP_FAILURE
-//
-// MessageText:
-//
-// The DSA operation is unable to proceed because of a DNS lookup failure.
-//
- ERROR_DS_DNS_LOOKUP_FAILURE = DWORD(8524);
- {$EXTERNALSYM ERROR_DS_DNS_LOOKUP_FAILURE}
-
-//
-// MessageId: ERROR_DS_COULDNT_UPDATE_SPNS
-//
-// MessageText:
-//
-// While processing a change to the DNS Host Name for an object, the Service Principal Name values could not be kept in sync.
-//
- ERROR_DS_COULDNT_UPDATE_SPNS = DWORD(8525);
- {$EXTERNALSYM ERROR_DS_COULDNT_UPDATE_SPNS}
-
-//
-// MessageId: ERROR_DS_CANT_RETRIEVE_SD
-//
-// MessageText:
-//
-// The Security Descriptor attribute could not be read.
-//
- ERROR_DS_CANT_RETRIEVE_SD = DWORD(8526);
- {$EXTERNALSYM ERROR_DS_CANT_RETRIEVE_SD}
-
-//
-// MessageId: ERROR_DS_KEY_NOT_UNIQUE
-//
-// MessageText:
-//
-// The object requested was not found, but an object with that key was found.
-//
- ERROR_DS_KEY_NOT_UNIQUE = DWORD(8527);
- {$EXTERNALSYM ERROR_DS_KEY_NOT_UNIQUE}
-
-//
-// MessageId: ERROR_DS_WRONG_LINKED_ATT_SYNTAX
-//
-// MessageText:
-//
-// The syntax of the linked attribute being added is incorrect. Forward links can only have syntax 2.5.5.1, 2.5.5.7, and 2.5.5.14, and backlinks can only have syntax 2.5.5.1
-//
- ERROR_DS_WRONG_LINKED_ATT_SYNTAX = DWORD(8528);
- {$EXTERNALSYM ERROR_DS_WRONG_LINKED_ATT_SYNTAX}
-
-//
-// MessageId: ERROR_DS_SAM_NEED_BOOTKEY_PASSWORD
-//
-// MessageText:
-//
-// Security Account Manager needs to get the boot password.
-//
- ERROR_DS_SAM_NEED_BOOTKEY_PASSWORD = DWORD(8529);
- {$EXTERNALSYM ERROR_DS_SAM_NEED_BOOTKEY_PASSWORD}
-
-//
-// MessageId: ERROR_DS_SAM_NEED_BOOTKEY_FLOPPY
-//
-// MessageText:
-//
-// Security Account Manager needs to get the boot key from floppy disk.
-//
- ERROR_DS_SAM_NEED_BOOTKEY_FLOPPY = DWORD(8530);
- {$EXTERNALSYM ERROR_DS_SAM_NEED_BOOTKEY_FLOPPY}
-
-//
-// MessageId: ERROR_DS_CANT_START
-//
-// MessageText:
-//
-// Directory Service cannot start.
-//
- ERROR_DS_CANT_START = DWORD(8531);
- {$EXTERNALSYM ERROR_DS_CANT_START}
-
-//
-// MessageId: ERROR_DS_INIT_FAILURE
-//
-// MessageText:
-//
-// Directory Services could not start.
-//
- ERROR_DS_INIT_FAILURE = DWORD(8532);
- {$EXTERNALSYM ERROR_DS_INIT_FAILURE}
-
-//
-// MessageId: ERROR_DS_NO_PKT_PRIVACY_ON_CONNECTION
-//
-// MessageText:
-//
-// The connection between client and server requires packet privacy or better.
-//
- ERROR_DS_NO_PKT_PRIVACY_ON_CONNECTION = DWORD(8533);
- {$EXTERNALSYM ERROR_DS_NO_PKT_PRIVACY_ON_CONNECTION}
-
-//
-// MessageId: ERROR_DS_SOURCE_DOMAIN_IN_FOREST
-//
-// MessageText:
-//
-// The source domain may not be in the same forest as destination.
-//
- ERROR_DS_SOURCE_DOMAIN_IN_FOREST = DWORD(8534);
- {$EXTERNALSYM ERROR_DS_SOURCE_DOMAIN_IN_FOREST}
-
-//
-// MessageId: ERROR_DS_DESTINATION_DOMAIN_NOT_IN_FOREST
-//
-// MessageText:
-//
-// The destination domain must be in the forest.
-//
- ERROR_DS_DESTINATION_DOMAIN_NOT_IN_FOREST = DWORD(8535);
- {$EXTERNALSYM ERROR_DS_DESTINATION_DOMAIN_NOT_IN_FOREST}
-
-//
-// MessageId: ERROR_DS_DESTINATION_AUDITING_NOT_ENABLED
-//
-// MessageText:
-//
-// The operation requires that destination domain auditing be enabled.
-//
- ERROR_DS_DESTINATION_AUDITING_NOT_ENABLED = DWORD(8536);
- {$EXTERNALSYM ERROR_DS_DESTINATION_AUDITING_NOT_ENABLED}
-
-//
-// MessageId: ERROR_DS_CANT_FIND_DC_FOR_SRC_DOMAIN
-//
-// MessageText:
-//
-// The operation couldn't locate a DC for the source domain.
-//
- ERROR_DS_CANT_FIND_DC_FOR_SRC_DOMAIN = DWORD(8537);
- {$EXTERNALSYM ERROR_DS_CANT_FIND_DC_FOR_SRC_DOMAIN}
-
-//
-// MessageId: ERROR_DS_SRC_OBJ_NOT_GROUP_OR_USER
-//
-// MessageText:
-//
-// The source object must be a group or user.
-//
- ERROR_DS_SRC_OBJ_NOT_GROUP_OR_USER = DWORD(8538);
- {$EXTERNALSYM ERROR_DS_SRC_OBJ_NOT_GROUP_OR_USER}
-
-//
-// MessageId: ERROR_DS_SRC_SID_EXISTS_IN_FOREST
-//
-// MessageText:
-//
-// The source object's SID already exists in destination forest.
-//
- ERROR_DS_SRC_SID_EXISTS_IN_FOREST = DWORD(8539);
- {$EXTERNALSYM ERROR_DS_SRC_SID_EXISTS_IN_FOREST}
-
-//
-// MessageId: ERROR_DS_SRC_AND_DST_OBJECT_CLASS_MISMATCH
-//
-// MessageText:
-//
-// The source and destination object must be of the same type.
-//
- ERROR_DS_SRC_AND_DST_OBJECT_CLASS_MISMATCH = DWORD(8540);
- {$EXTERNALSYM ERROR_DS_SRC_AND_DST_OBJECT_CLASS_MISMATCH}
-
-//
-// MessageId: ERROR_SAM_INIT_FAILURE
-//
-// MessageText:
-//
-// Security Accounts Manager initialization failed because of the following error: %1.
-// Error Status: 0x%2. Click OK to shut down the system and reboot into Safe Mode. Check the event log for detailed information.
-//
- ERROR_SAM_INIT_FAILURE = DWORD(8541);
- {$EXTERNALSYM ERROR_SAM_INIT_FAILURE}
-
-//
-// MessageId: ERROR_DS_DRA_SCHEMA_INFO_SHIP
-//
-// MessageText:
-//
-// Schema information could not be included in the replication request.
-//
- ERROR_DS_DRA_SCHEMA_INFO_SHIP = DWORD(8542);
- {$EXTERNALSYM ERROR_DS_DRA_SCHEMA_INFO_SHIP}
-
-//
-// MessageId: ERROR_DS_DRA_SCHEMA_CONFLICT
-//
-// MessageText:
-//
-// The replication operation could not be completed due to a schema incompatibility.
-//
- ERROR_DS_DRA_SCHEMA_CONFLICT = DWORD(8543);
- {$EXTERNALSYM ERROR_DS_DRA_SCHEMA_CONFLICT}
-
-//
-// MessageId: ERROR_DS_DRA_EARLIER_SCHEMA_CONFLICT
-//
-// MessageText:
-//
-// The replication operation could not be completed due to a previous schema incompatibility.
-//
- ERROR_DS_DRA_EARLIER_SCHEMA_CONFLICT = DWORD(8544);
- {$EXTERNALSYM ERROR_DS_DRA_EARLIER_SCHEMA_CONFLICT}
-
-//
-// MessageId: ERROR_DS_DRA_OBJ_NC_MISMATCH
-//
-// MessageText:
-//
-// The replication update could not be applied because either the source or the destination has not yet received information regarding a recent cross-domain move operation.
-//
- ERROR_DS_DRA_OBJ_NC_MISMATCH = DWORD(8545);
- {$EXTERNALSYM ERROR_DS_DRA_OBJ_NC_MISMATCH}
-
-//
-// MessageId: ERROR_DS_NC_STILL_HAS_DSAS
-//
-// MessageText:
-//
-// The requested domain could not be deleted because there exist domain controllers that still host this domain.
-//
- ERROR_DS_NC_STILL_HAS_DSAS = DWORD(8546);
- {$EXTERNALSYM ERROR_DS_NC_STILL_HAS_DSAS}
-
-//
-// MessageId: ERROR_DS_GC_REQUIRED
-//
-// MessageText:
-//
-// The requested operation can be performed only on a global catalog server.
-//
- ERROR_DS_GC_REQUIRED = DWORD(8547);
- {$EXTERNALSYM ERROR_DS_GC_REQUIRED}
-
-//
-// MessageId: ERROR_DS_LOCAL_MEMBER_OF_LOCAL_ONLY
-//
-// MessageText:
-//
-// A local group can only be a member of other local groups in the same domain.
-//
- ERROR_DS_LOCAL_MEMBER_OF_LOCAL_ONLY = DWORD(8548);
- {$EXTERNALSYM ERROR_DS_LOCAL_MEMBER_OF_LOCAL_ONLY}
-
-//
-// MessageId: ERROR_DS_NO_FPO_IN_UNIVERSAL_GROUPS
-//
-// MessageText:
-//
-// Foreign security principals cannot be members of universal groups.
-//
- ERROR_DS_NO_FPO_IN_UNIVERSAL_GROUPS = DWORD(8549);
- {$EXTERNALSYM ERROR_DS_NO_FPO_IN_UNIVERSAL_GROUPS}
-
-//
-// MessageId: ERROR_DS_CANT_ADD_TO_GC
-//
-// MessageText:
-//
-// The attribute is not allowed to be replicated to the GC because of security reasons.
-//
- ERROR_DS_CANT_ADD_TO_GC = DWORD(8550);
- {$EXTERNALSYM ERROR_DS_CANT_ADD_TO_GC}
-
-//
-// MessageId: ERROR_DS_NO_CHECKPOINT_WITH_PDC
-//
-// MessageText:
-//
-// The checkpoint with the PDC could not be taken because there too many modifications being processed currently.
-//
- ERROR_DS_NO_CHECKPOINT_WITH_PDC = DWORD(8551);
- {$EXTERNALSYM ERROR_DS_NO_CHECKPOINT_WITH_PDC}
-
-//
-// MessageId: ERROR_DS_SOURCE_AUDITING_NOT_ENABLED
-//
-// MessageText:
-//
-// The operation requires that source domain auditing be enabled.
-//
- ERROR_DS_SOURCE_AUDITING_NOT_ENABLED = DWORD(8552);
- {$EXTERNALSYM ERROR_DS_SOURCE_AUDITING_NOT_ENABLED}
-
-//
-// MessageId: ERROR_DS_CANT_CREATE_IN_NONDOMAIN_NC
-//
-// MessageText:
-//
-// Security principal objects can only be created inside domain naming contexts.
-//
- ERROR_DS_CANT_CREATE_IN_NONDOMAIN_NC = DWORD(8553);
- {$EXTERNALSYM ERROR_DS_CANT_CREATE_IN_NONDOMAIN_NC}
-
-//
-// MessageId: ERROR_DS_INVALID_NAME_FOR_SPN
-//
-// MessageText:
-//
-// A Service Principal Name (SPN) could not be constructed because the provided hostname is not in the necessary format.
-//
- ERROR_DS_INVALID_NAME_FOR_SPN = DWORD(8554);
- {$EXTERNALSYM ERROR_DS_INVALID_NAME_FOR_SPN}
-
-//
-// MessageId: ERROR_DS_FILTER_USES_CONTRUCTED_ATTRS
-//
-// MessageText:
-//
-// A Filter was passed that uses constructed attributes.
-//
- ERROR_DS_FILTER_USES_CONTRUCTED_ATTRS = DWORD(8555);
- {$EXTERNALSYM ERROR_DS_FILTER_USES_CONTRUCTED_ATTRS}
-
-//
-// MessageId: ERROR_DS_UNICODEPWD_NOT_IN_QUOTES
-//
-// MessageText:
-//
-// The unicodePwd attribute value must be enclosed in double quotes.
-//
- ERROR_DS_UNICODEPWD_NOT_IN_QUOTES = DWORD(8556);
- {$EXTERNALSYM ERROR_DS_UNICODEPWD_NOT_IN_QUOTES}
-
-//
-// MessageId: ERROR_DS_MACHINE_ACCOUNT_QUOTA_EXCEEDED
-//
-// MessageText:
-//
-// Your computer could not be joined to the domain. You have exceeded the maximum number of computer accounts you are allowed to create in this domain. Contact your system administrator to have this limit reset or increased.
-//
- ERROR_DS_MACHINE_ACCOUNT_QUOTA_EXCEEDED = DWORD(8557);
- {$EXTERNALSYM ERROR_DS_MACHINE_ACCOUNT_QUOTA_EXCEEDED}
-
-//
-// MessageId: ERROR_DS_MUST_BE_RUN_ON_DST_DC
-//
-// MessageText:
-//
-// For security reasons, the operation must be run on the destination DC.
-//
- ERROR_DS_MUST_BE_RUN_ON_DST_DC = DWORD(8558);
- {$EXTERNALSYM ERROR_DS_MUST_BE_RUN_ON_DST_DC}
-
-//
-// MessageId: ERROR_DS_SRC_DC_MUST_BE_SP4_OR_GREATER
-//
-// MessageText:
-//
-// For security reasons, the source DC must be NT4SP4 or greater.
-//
- ERROR_DS_SRC_DC_MUST_BE_SP4_OR_GREATER = DWORD(8559);
- {$EXTERNALSYM ERROR_DS_SRC_DC_MUST_BE_SP4_OR_GREATER}
-
-//
-// MessageId: ERROR_DS_CANT_TREE_DELETE_CRITICAL_OBJ
-//
-// MessageText:
-//
-// Critical Directory Service System objects cannot be deleted during tree delete operations. The tree delete may have been partially performed.
-//
- ERROR_DS_CANT_TREE_DELETE_CRITICAL_OBJ = DWORD(8560);
- {$EXTERNALSYM ERROR_DS_CANT_TREE_DELETE_CRITICAL_OBJ}
-
-//
-// MessageId: ERROR_DS_INIT_FAILURE_CONSOLE
-//
-// MessageText:
-//
-// Directory Services could not start because of the following error: %1.
-// Error Status: 0x%2. Please click OK to shutdown the system. You can use the recovery console to diagnose the system further.
-//
- ERROR_DS_INIT_FAILURE_CONSOLE = DWORD(8561);
- {$EXTERNALSYM ERROR_DS_INIT_FAILURE_CONSOLE}
-
-//
-// MessageId: ERROR_DS_SAM_INIT_FAILURE_CONSOLE
-//
-// MessageText:
-//
-// Security Accounts Manager initialization failed because of the following error: %1.
-// Error Status: 0x%2. Please click OK to shutdown the system. You can use the recovery console to diagnose the system further.
-//
- ERROR_DS_SAM_INIT_FAILURE_CONSOLE = DWORD(8562);
- {$EXTERNALSYM ERROR_DS_SAM_INIT_FAILURE_CONSOLE}
-
-//
-// MessageId: ERROR_DS_FOREST_VERSION_TOO_HIGH
-//
-// MessageText:
-//
-// The version of the operating system installed is incompatible with the current forest functional level. You must upgrade to a new version of the operating system before this server can become a domain controller in this forest.
-//
- ERROR_DS_FOREST_VERSION_TOO_HIGH = DWORD(8563);
- {$EXTERNALSYM ERROR_DS_FOREST_VERSION_TOO_HIGH}
-
-//
-// MessageId: ERROR_DS_DOMAIN_VERSION_TOO_HIGH
-//
-// MessageText:
-//
-// The version of the operating system installed is incompatible with the current domain functional level. You must upgrade to a new version of the operating system before this server can become a domain controller in this domain.
-//
- ERROR_DS_DOMAIN_VERSION_TOO_HIGH = DWORD(8564);
- {$EXTERNALSYM ERROR_DS_DOMAIN_VERSION_TOO_HIGH}
-
-//
-// MessageId: ERROR_DS_FOREST_VERSION_TOO_LOW
-//
-// MessageText:
-//
-// The version of the operating system installed on this server no longer supports the current forest functional level. You must raise the forest functional level before this server can become a domain controller in this forest.
-//
- ERROR_DS_FOREST_VERSION_TOO_LOW = DWORD(8565);
- {$EXTERNALSYM ERROR_DS_FOREST_VERSION_TOO_LOW}
-
-//
-// MessageId: ERROR_DS_DOMAIN_VERSION_TOO_LOW
-//
-// MessageText:
-//
-// The version of the operating system installed on this server no longer supports the current domain functional level. You must raise the domain functional level before this server can become a domain controller in this domain.
-//
- ERROR_DS_DOMAIN_VERSION_TOO_LOW = DWORD(8566);
- {$EXTERNALSYM ERROR_DS_DOMAIN_VERSION_TOO_LOW}
-
-//
-// MessageId: ERROR_DS_INCOMPATIBLE_VERSION
-//
-// MessageText:
-//
-// The version of the operating system installed on this server is incompatible with the functional level of the domain or forest.
-//
- ERROR_DS_INCOMPATIBLE_VERSION = DWORD(8567);
- {$EXTERNALSYM ERROR_DS_INCOMPATIBLE_VERSION}
-
-//
-// MessageId: ERROR_DS_LOW_DSA_VERSION
-//
-// MessageText:
-//
-// The functional level of the domain (or forest) cannot be raised to the requested value, because there exist one or more domain controllers in the domain (or forest) that are at a lower incompatible functional level.
-//
- ERROR_DS_LOW_DSA_VERSION = DWORD(8568);
- {$EXTERNALSYM ERROR_DS_LOW_DSA_VERSION}
-
-//
-// MessageId: ERROR_DS_NO_BEHAVIOR_VERSION_IN_MIXEDDOMAIN
-//
-// MessageText:
-//
-// The forest functional level cannot be raised to the requested value since one or more domains are still in mixed domain mode. All domains in the forest must be in native mode, for you to raise the forest functional level.
-//
- ERROR_DS_NO_BEHAVIOR_VERSION_IN_MIXEDDOMAIN = DWORD(8569);
- {$EXTERNALSYM ERROR_DS_NO_BEHAVIOR_VERSION_IN_MIXEDDOMAIN}
-
-//
-// MessageId: ERROR_DS_NOT_SUPPORTED_SORT_ORDER
-//
-// MessageText:
-//
-// The sort order requested is not supported.
-//
- ERROR_DS_NOT_SUPPORTED_SORT_ORDER = DWORD(8570);
- {$EXTERNALSYM ERROR_DS_NOT_SUPPORTED_SORT_ORDER}
-
-//
-// MessageId: ERROR_DS_NAME_NOT_UNIQUE
-//
-// MessageText:
-//
-// The requested name already exists as a unique identifier.
-//
- ERROR_DS_NAME_NOT_UNIQUE = DWORD(8571);
- {$EXTERNALSYM ERROR_DS_NAME_NOT_UNIQUE}
-
-//
-// MessageId: ERROR_DS_MACHINE_ACCOUNT_CREATED_PRENT4
-//
-// MessageText:
-//
-// The machine account was created pre-NT4. The account needs to be recreated.
-//
- ERROR_DS_MACHINE_ACCOUNT_CREATED_PRENT4 = DWORD(8572);
- {$EXTERNALSYM ERROR_DS_MACHINE_ACCOUNT_CREATED_PRENT4}
-
-//
-// MessageId: ERROR_DS_OUT_OF_VERSION_STORE
-//
-// MessageText:
-//
-// The database is out of version store.
-//
- ERROR_DS_OUT_OF_VERSION_STORE = DWORD(8573);
- {$EXTERNALSYM ERROR_DS_OUT_OF_VERSION_STORE}
-
-//
-// MessageId: ERROR_DS_INCOMPATIBLE_CONTROLS_USED
-//
-// MessageText:
-//
-// Unable to continue operation because multiple conflicting controls were used.
-//
- ERROR_DS_INCOMPATIBLE_CONTROLS_USED = DWORD(8574);
- {$EXTERNALSYM ERROR_DS_INCOMPATIBLE_CONTROLS_USED}
-
-//
-// MessageId: ERROR_DS_NO_REF_DOMAIN
-//
-// MessageText:
-//
-// Unable to find a valid security descriptor reference domain for this partition.
-//
- ERROR_DS_NO_REF_DOMAIN = DWORD(8575);
- {$EXTERNALSYM ERROR_DS_NO_REF_DOMAIN}
-
-//
-// MessageId: ERROR_DS_RESERVED_LINK_ID
-//
-// MessageText:
-//
-// Schema update failed: The link identifier is reserved.
-//
- ERROR_DS_RESERVED_LINK_ID = DWORD(8576);
- {$EXTERNALSYM ERROR_DS_RESERVED_LINK_ID}
-
-//
-// MessageId: ERROR_DS_LINK_ID_NOT_AVAILABLE
-//
-// MessageText:
-//
-// Schema update failed: There are no link identifiers available.
-//
- ERROR_DS_LINK_ID_NOT_AVAILABLE = DWORD(8577);
- {$EXTERNALSYM ERROR_DS_LINK_ID_NOT_AVAILABLE}
-
-//
-// MessageId: ERROR_DS_AG_CANT_HAVE_UNIVERSAL_MEMBER
-//
-// MessageText:
-//
-// An account group can not have a universal group as a member.
-//
- ERROR_DS_AG_CANT_HAVE_UNIVERSAL_MEMBER = DWORD(8578);
- {$EXTERNALSYM ERROR_DS_AG_CANT_HAVE_UNIVERSAL_MEMBER}
-
-//
-// MessageId: ERROR_DS_MODIFYDN_DISALLOWED_BY_INSTANCE_TYPE
-//
-// MessageText:
-//
-// Rename or move operations on naming context heads or read-only objects are not allowed.
-//
- ERROR_DS_MODIFYDN_DISALLOWED_BY_INSTANCE_TYPE = DWORD(8579);
- {$EXTERNALSYM ERROR_DS_MODIFYDN_DISALLOWED_BY_INSTANCE_TYPE}
-
-//
-// MessageId: ERROR_DS_NO_OBJECT_MOVE_IN_SCHEMA_NC
-//
-// MessageText:
-//
-// Move operations on objects in the schema naming context are not allowed.
-//
- ERROR_DS_NO_OBJECT_MOVE_IN_SCHEMA_NC = DWORD(8580);
- {$EXTERNALSYM ERROR_DS_NO_OBJECT_MOVE_IN_SCHEMA_NC}
-
-//
-// MessageId: ERROR_DS_MODIFYDN_DISALLOWED_BY_FLAG
-//
-// MessageText:
-//
-// A system flag has been set on the object and does not allow the object to be moved or renamed.
-//
- ERROR_DS_MODIFYDN_DISALLOWED_BY_FLAG = DWORD(8581);
- {$EXTERNALSYM ERROR_DS_MODIFYDN_DISALLOWED_BY_FLAG}
-
-//
-// MessageId: ERROR_DS_MODIFYDN_WRONG_GRANDPARENT
-//
-// MessageText:
-//
-// This object is not allowed to change its grandparent container. Moves are not forbidden on this object, but are restricted to sibling containers.
-//
- ERROR_DS_MODIFYDN_WRONG_GRANDPARENT = DWORD(8582);
- {$EXTERNALSYM ERROR_DS_MODIFYDN_WRONG_GRANDPARENT}
-
-//
-// MessageId: ERROR_DS_NAME_ERROR_TRUST_REFERRAL
-//
-// MessageText:
-//
-// Unable to resolve completely, a referral to another forest is generated.
-//
- ERROR_DS_NAME_ERROR_TRUST_REFERRAL = DWORD(8583);
- {$EXTERNALSYM ERROR_DS_NAME_ERROR_TRUST_REFERRAL}
-
-//
-// MessageId: ERROR_NOT_SUPPORTED_ON_STANDARD_SERVER
-//
-// MessageText:
-//
-// The requested action is not supported on standard server.
-//
- ERROR_NOT_SUPPORTED_ON_STANDARD_SERVER = DWORD(8584);
- {$EXTERNALSYM ERROR_NOT_SUPPORTED_ON_STANDARD_SERVER}
-
-//
-// MessageId: ERROR_DS_CANT_ACCESS_REMOTE_PART_OF_AD
-//
-// MessageText:
-//
-// Could not access a partition of the Active Directory located on a remote server. Make sure at least one server is running for the partition in question.
-//
- ERROR_DS_CANT_ACCESS_REMOTE_PART_OF_AD = DWORD(8585);
- {$EXTERNALSYM ERROR_DS_CANT_ACCESS_REMOTE_PART_OF_AD}
-
-//
-// MessageId: ERROR_DS_CR_IMPOSSIBLE_TO_VALIDATE_V2
-//
-// MessageText:
-//
-// The directory cannot validate the proposed naming context (or partition) name because it does not hold a replica nor can it contact a replica of the naming context above the proposed naming context. Please ensure that the parent naming context is properly registered in DNS, and at least one replica of this naming context is reachable by the Domain Naming master.
-//
- ERROR_DS_CR_IMPOSSIBLE_TO_VALIDATE_V2 = DWORD(8586);
- {$EXTERNALSYM ERROR_DS_CR_IMPOSSIBLE_TO_VALIDATE_V2}
-
-//
-// MessageId: ERROR_DS_THREAD_LIMIT_EXCEEDED
-//
-// MessageText:
-//
-// The thread limit for this request was exceeded.
-//
- ERROR_DS_THREAD_LIMIT_EXCEEDED = DWORD(8587);
- {$EXTERNALSYM ERROR_DS_THREAD_LIMIT_EXCEEDED}
-
-//
-// MessageId: ERROR_DS_NOT_CLOSEST
-//
-// MessageText:
-//
-// The Global catalog server is not in the closest site.
-//
- ERROR_DS_NOT_CLOSEST = DWORD(8588);
- {$EXTERNALSYM ERROR_DS_NOT_CLOSEST}
-
-//
-// MessageId: ERROR_DS_CANT_DERIVE_SPN_WITHOUT_SERVER_REF
-//
-// MessageText:
-//
-// The DS cannot derive a service principal name (SPN) with which to mutually authenticate the target server because the corresponding server object in the local DS database has no serverReference attribute.
-//
- ERROR_DS_CANT_DERIVE_SPN_WITHOUT_SERVER_REF = DWORD(8589);
- {$EXTERNALSYM ERROR_DS_CANT_DERIVE_SPN_WITHOUT_SERVER_REF}
-
-//
-// MessageId: ERROR_DS_SINGLE_USER_MODE_FAILED
-//
-// MessageText:
-//
-// The Directory Service failed to enter single user mode.
-//
- ERROR_DS_SINGLE_USER_MODE_FAILED = DWORD(8590);
- {$EXTERNALSYM ERROR_DS_SINGLE_USER_MODE_FAILED}
-
-//
-// MessageId: ERROR_DS_NTDSCRIPT_SYNTAX_ERROR
-//
-// MessageText:
-//
-// The Directory Service cannot parse the script because of a syntax error.
-//
- ERROR_DS_NTDSCRIPT_SYNTAX_ERROR = DWORD(8591);
- {$EXTERNALSYM ERROR_DS_NTDSCRIPT_SYNTAX_ERROR}
-
-//
-// MessageId: ERROR_DS_NTDSCRIPT_PROCESS_ERROR
-//
-// MessageText:
-//
-// The Directory Service cannot process the script because of an error.
-//
- ERROR_DS_NTDSCRIPT_PROCESS_ERROR = DWORD(8592);
- {$EXTERNALSYM ERROR_DS_NTDSCRIPT_PROCESS_ERROR}
-
-//
-// MessageId: ERROR_DS_DIFFERENT_REPL_EPOCHS
-//
-// MessageText:
-//
-// The directory service cannot perform the requested operation because the servers
-// involved are of different replication epochs (which is usually related to a
-// domain rename that is in progress).
-//
- ERROR_DS_DIFFERENT_REPL_EPOCHS = DWORD(8593);
- {$EXTERNALSYM ERROR_DS_DIFFERENT_REPL_EPOCHS}
-
-//
-// MessageId: ERROR_DS_DRS_EXTENSIONS_CHANGED
-//
-// MessageText:
-//
-// The directory service binding must be renegotiated due to a change in the server
-// extensions information.
-//
- ERROR_DS_DRS_EXTENSIONS_CHANGED = DWORD(8594);
- {$EXTERNALSYM ERROR_DS_DRS_EXTENSIONS_CHANGED}
-
-//
-// MessageId: ERROR_DS_REPLICA_SET_CHANGE_NOT_ALLOWED_ON_DISABLED_CR
-//
-// MessageText:
-//
-// Operation not allowed on a disabled cross ref.
-//
- ERROR_DS_REPLICA_SET_CHANGE_NOT_ALLOWED_ON_DISABLED_CR = DWORD(8595);
- {$EXTERNALSYM ERROR_DS_REPLICA_SET_CHANGE_NOT_ALLOWED_ON_DISABLED_CR}
-
-//
-// MessageId: ERROR_DS_NO_MSDS_INTID
-//
-// MessageText:
-//
-// Schema update failed: No values for msDS-IntId are available.
-//
- ERROR_DS_NO_MSDS_INTID = DWORD(8596);
- {$EXTERNALSYM ERROR_DS_NO_MSDS_INTID}
-
-//
-// MessageId: ERROR_DS_DUP_MSDS_INTID
-//
-// MessageText:
-//
-// Schema update failed: Duplicate msDS-INtId. Retry the operation.
-//
- ERROR_DS_DUP_MSDS_INTID = DWORD(8597);
- {$EXTERNALSYM ERROR_DS_DUP_MSDS_INTID}
-
-//
-// MessageId: ERROR_DS_EXISTS_IN_RDNATTID
-//
-// MessageText:
-//
-// Schema deletion failed: attribute is used in rDNAttID.
-//
- ERROR_DS_EXISTS_IN_RDNATTID = DWORD(8598);
- {$EXTERNALSYM ERROR_DS_EXISTS_IN_RDNATTID}
-
-//
-// MessageId: ERROR_DS_AUTHORIZATION_FAILED
-//
-// MessageText:
-//
-// The directory service failed to authorize the request.
-//
- ERROR_DS_AUTHORIZATION_FAILED = DWORD(8599);
- {$EXTERNALSYM ERROR_DS_AUTHORIZATION_FAILED}
-
-//
-// MessageId: ERROR_DS_INVALID_SCRIPT
-//
-// MessageText:
-//
-// The Directory Service cannot process the script because it is invalid.
-//
- ERROR_DS_INVALID_SCRIPT = DWORD(8600);
- {$EXTERNALSYM ERROR_DS_INVALID_SCRIPT}
-
-//
-// MessageId: ERROR_DS_REMOTE_CROSSREF_OP_FAILED
-//
-// MessageText:
-//
-// The remote create cross reference operation failed on the Domain Naming Master FSMO. The operation's error is in the extended data.
-//
- ERROR_DS_REMOTE_CROSSREF_OP_FAILED = DWORD(8601);
- {$EXTERNALSYM ERROR_DS_REMOTE_CROSSREF_OP_FAILED}
-
-//
-// MessageId: ERROR_DS_CROSS_REF_BUSY
-//
-// MessageText:
-//
-// A cross reference is in use locally with the same name.
-//
- ERROR_DS_CROSS_REF_BUSY = DWORD(8602);
- {$EXTERNALSYM ERROR_DS_CROSS_REF_BUSY}
-
-//
-// MessageId: ERROR_DS_CANT_DERIVE_SPN_FOR_DELETED_DOMAIN
-//
-// MessageText:
-//
-// The DS cannot derive a service principal name (SPN) with which to mutually authenticate the target server because the server's domain has been deleted from the forest.
-//
- ERROR_DS_CANT_DERIVE_SPN_FOR_DELETED_DOMAIN = DWORD(8603);
- {$EXTERNALSYM ERROR_DS_CANT_DERIVE_SPN_FOR_DELETED_DOMAIN}
-
-//
-// MessageId: ERROR_DS_CANT_DEMOTE_WITH_WRITEABLE_NC
-//
-// MessageText:
-//
-// Writeable NCs prevent this DC from demoting.
-//
- ERROR_DS_CANT_DEMOTE_WITH_WRITEABLE_NC = DWORD(8604);
- {$EXTERNALSYM ERROR_DS_CANT_DEMOTE_WITH_WRITEABLE_NC}
-
-//
-// MessageId: ERROR_DS_DUPLICATE_ID_FOUND
-//
-// MessageText:
-//
-// The requested object has a non-unique identifier and cannot be retrieved.
-//
- ERROR_DS_DUPLICATE_ID_FOUND = DWORD(8605);
- {$EXTERNALSYM ERROR_DS_DUPLICATE_ID_FOUND}
-
-//
-// MessageId: ERROR_DS_INSUFFICIENT_ATTR_TO_CREATE_OBJECT
-//
-// MessageText:
-//
-// Insufficient attributes were given to create an object. This object may not exist because it may have been deleted and already garbage collected.
-//
- ERROR_DS_INSUFFICIENT_ATTR_TO_CREATE_OBJECT = DWORD(8606);
- {$EXTERNALSYM ERROR_DS_INSUFFICIENT_ATTR_TO_CREATE_OBJECT}
-
-//
-// MessageId: ERROR_DS_GROUP_CONVERSION_ERROR
-//
-// MessageText:
-//
-// The group cannot be converted due to attribute restrictions on the requested group type.
-//
- ERROR_DS_GROUP_CONVERSION_ERROR = DWORD(8607);
- {$EXTERNALSYM ERROR_DS_GROUP_CONVERSION_ERROR}
-
-//
-// MessageId: ERROR_DS_CANT_MOVE_APP_BASIC_GROUP
-//
-// MessageText:
-//
-// Cross-domain move of non-empty basic application groups is not allowed.
-//
- ERROR_DS_CANT_MOVE_APP_BASIC_GROUP = DWORD(8608);
- {$EXTERNALSYM ERROR_DS_CANT_MOVE_APP_BASIC_GROUP}
-
-//
-// MessageId: ERROR_DS_CANT_MOVE_APP_QUERY_GROUP
-//
-// MessageText:
-//
-// Cross-domain move of non-empty query based application groups is not allowed.
-//
- ERROR_DS_CANT_MOVE_APP_QUERY_GROUP = DWORD(8609);
- {$EXTERNALSYM ERROR_DS_CANT_MOVE_APP_QUERY_GROUP}
-
-//
-// MessageId: ERROR_DS_ROLE_NOT_VERIFIED
-//
-// MessageText:
-//
-// The FSMO role ownership could not be verified because its directory partition has not replicated successfully with atleast one replication partner.
-//
- ERROR_DS_ROLE_NOT_VERIFIED = DWORD(8610);
- {$EXTERNALSYM ERROR_DS_ROLE_NOT_VERIFIED}
-
-//
-// MessageId: ERROR_DS_WKO_CONTAINER_CANNOT_BE_SPECIAL
-//
-// MessageText:
-//
-// The target container for a redirection of a well known object container cannot already be a special container.
-//
- ERROR_DS_WKO_CONTAINER_CANNOT_BE_SPECIAL = DWORD(8611);
- {$EXTERNALSYM ERROR_DS_WKO_CONTAINER_CANNOT_BE_SPECIAL}
-
-//
-// MessageId: ERROR_DS_DOMAIN_RENAME_IN_PROGRESS
-//
-// MessageText:
-//
-// The Directory Service cannot perform the requested operation because a domain rename operation is in progress.
-//
- ERROR_DS_DOMAIN_RENAME_IN_PROGRESS = DWORD(8612);
- {$EXTERNALSYM ERROR_DS_DOMAIN_RENAME_IN_PROGRESS}
-
-//
-// MessageId: ERROR_DS_EXISTING_AD_CHILD_NC
-//
-// MessageText:
-//
-// The Active Directory detected an Active Directory child partition below the
-// requested new partition name. The Active Directory's partition heiarchy must
-// be created in a top down method.
-//
- ERROR_DS_EXISTING_AD_CHILD_NC = DWORD(8613);
- {$EXTERNALSYM ERROR_DS_EXISTING_AD_CHILD_NC}
-
-//
-// MessageId: ERROR_DS_REPL_LIFETIME_EXCEEDED
-//
-// MessageText:
-//
-// The Active Directory cannot replicate with this server because the time since the last replication with this server has exceeded the tombstone lifetime.
-//
- ERROR_DS_REPL_LIFETIME_EXCEEDED = DWORD(8614);
- {$EXTERNALSYM ERROR_DS_REPL_LIFETIME_EXCEEDED}
-
-//
-// MessageId: ERROR_DS_DISALLOWED_IN_SYSTEM_CONTAINER
-//
-// MessageText:
-//
-// The requested operation is not allowed on an object under the system container.
-//
- ERROR_DS_DISALLOWED_IN_SYSTEM_CONTAINER = DWORD(8615);
- {$EXTERNALSYM ERROR_DS_DISALLOWED_IN_SYSTEM_CONTAINER}
-
-//
-// MessageId: ERROR_DS_LDAP_SEND_QUEUE_FULL
-//
-// MessageText:
-//
-// The LDAP servers network send queue has filled up because the client is not
-// processing the results of it's requests fast enough. No more requests will
-// be processed until the client catches up. If the client does not catch up
-// then it will be disconnected.
-//
- ERROR_DS_LDAP_SEND_QUEUE_FULL = 8616;
- {$EXTERNALSYM ERROR_DS_LDAP_SEND_QUEUE_FULL}
-
-//
-// MessageId: ERROR_DS_DRA_OUT_SCHEDULE_WINDOW
-//
-// MessageText:
-//
-// The scheduled replication did not take place because the system was too busy to execute the request within the schedule window. The replication queue is overloaded. Consider reducing the number of partners or decreasing the scheduled replication frequency.
-//
- ERROR_DS_DRA_OUT_SCHEDULE_WINDOW = DWORD(8617);
- {$EXTERNALSYM ERROR_DS_DRA_OUT_SCHEDULE_WINDOW}
-
-///////////////////////////////////////////////////
-// /
-// End of Active Directory Error Codes /
-// /
-// 8000 to 8999 /
-///////////////////////////////////////////////////
-
-///////////////////////////////////////////////////
-// //
-// DNS Error Codes //
-// //
-// 9000 to 9999 //
-///////////////////////////////////////////////////
-
-// =============================
-// Facility DNS Error Messages
-// =============================
-
-//
-// DNS response codes.
-//
-
- DNS_ERROR_RESPONSE_CODES_BASE = 9000;
- {$EXTERNALSYM DNS_ERROR_RESPONSE_CODES_BASE}
-
- DNS_ERROR_RCODE_NO_ERROR = NO_ERROR;
- {$EXTERNALSYM DNS_ERROR_RCODE_NO_ERROR}
-
- DNS_ERROR_MASK = $00002328; // 9000 or DNS_ERROR_RESPONSE_CODES_BASE
- {$EXTERNALSYM DNS_ERROR_MASK}
-
-// DNS_ERROR_RCODE_FORMAT_ERROR 0x00002329
-//
-// MessageId: DNS_ERROR_RCODE_FORMAT_ERROR
-//
-// MessageText:
-//
-// DNS server unable to interpret format.
-//
- DNS_ERROR_RCODE_FORMAT_ERROR = DWORD(9001);
- {$EXTERNALSYM DNS_ERROR_RCODE_FORMAT_ERROR}
-
-// DNS_ERROR_RCODE_SERVER_FAILURE 0x0000232a
-//
-// MessageId: DNS_ERROR_RCODE_SERVER_FAILURE
-//
-// MessageText:
-//
-// DNS server failure.
-//
- DNS_ERROR_RCODE_SERVER_FAILURE = DWORD(9002);
- {$EXTERNALSYM DNS_ERROR_RCODE_SERVER_FAILURE}
-
-// DNS_ERROR_RCODE_NAME_ERROR 0x0000232b
-//
-// MessageId: DNS_ERROR_RCODE_NAME_ERROR
-//
-// MessageText:
-//
-// DNS name does not exist.
-//
- DNS_ERROR_RCODE_NAME_ERROR = DWORD(9003);
- {$EXTERNALSYM DNS_ERROR_RCODE_NAME_ERROR}
-
-// DNS_ERROR_RCODE_NOT_IMPLEMENTED 0x0000232c
-//
-// MessageId: DNS_ERROR_RCODE_NOT_IMPLEMENTED
-//
-// MessageText:
-//
-// DNS request not supported by name server.
-//
- DNS_ERROR_RCODE_NOT_IMPLEMENTED = DWORD(9004);
- {$EXTERNALSYM DNS_ERROR_RCODE_NOT_IMPLEMENTED}
-
-// DNS_ERROR_RCODE_REFUSED 0x0000232d
-//
-// MessageId: DNS_ERROR_RCODE_REFUSED
-//
-// MessageText:
-//
-// DNS operation refused.
-//
- DNS_ERROR_RCODE_REFUSED = DWORD(9005);
- {$EXTERNALSYM DNS_ERROR_RCODE_REFUSED}
-
-// DNS_ERROR_RCODE_YXDOMAIN 0x0000232e
-//
-// MessageId: DNS_ERROR_RCODE_YXDOMAIN
-//
-// MessageText:
-//
-// DNS name that ought not exist, does exist.
-//
- DNS_ERROR_RCODE_YXDOMAIN = DWORD(9006);
- {$EXTERNALSYM DNS_ERROR_RCODE_YXDOMAIN}
-
-// DNS_ERROR_RCODE_YXRRSET 0x0000232f
-//
-// MessageId: DNS_ERROR_RCODE_YXRRSET
-//
-// MessageText:
-//
-// DNS RR set that ought not exist, does exist.
-//
- DNS_ERROR_RCODE_YXRRSET = DWORD(9007);
- {$EXTERNALSYM DNS_ERROR_RCODE_YXRRSET}
-
-// DNS_ERROR_RCODE_NXRRSET 0x00002330
-//
-// MessageId: DNS_ERROR_RCODE_NXRRSET
-//
-// MessageText:
-//
-// DNS RR set that ought to exist, does not exist.
-//
- DNS_ERROR_RCODE_NXRRSET = DWORD(9008);
- {$EXTERNALSYM DNS_ERROR_RCODE_NXRRSET}
-
-// DNS_ERROR_RCODE_NOTAUTH 0x00002331
-//
-// MessageId: DNS_ERROR_RCODE_NOTAUTH
-//
-// MessageText:
-//
-// DNS server not authoritative for zone.
-//
- DNS_ERROR_RCODE_NOTAUTH = DWORD(9009);
- {$EXTERNALSYM DNS_ERROR_RCODE_NOTAUTH}
-
-// DNS_ERROR_RCODE_NOTZONE 0x00002332
-//
-// MessageId: DNS_ERROR_RCODE_NOTZONE
-//
-// MessageText:
-//
-// DNS name in update or prereq is not in zone.
-//
- DNS_ERROR_RCODE_NOTZONE = DWORD(9010);
- {$EXTERNALSYM DNS_ERROR_RCODE_NOTZONE}
-
-// DNS_ERROR_RCODE_BADSIG 0x00002338
-//
-// MessageId: DNS_ERROR_RCODE_BADSIG
-//
-// MessageText:
-//
-// DNS signature failed to verify.
-//
- DNS_ERROR_RCODE_BADSIG = DWORD(9016);
- {$EXTERNALSYM DNS_ERROR_RCODE_BADSIG}
-
-// DNS_ERROR_RCODE_BADKEY 0x00002339
-//
-// MessageId: DNS_ERROR_RCODE_BADKEY
-//
-// MessageText:
-//
-// DNS bad key.
-//
- DNS_ERROR_RCODE_BADKEY = DWORD(9017);
- {$EXTERNALSYM DNS_ERROR_RCODE_BADKEY}
-
-// DNS_ERROR_RCODE_BADTIME 0x0000233a
-//
-// MessageId: DNS_ERROR_RCODE_BADTIME
-//
-// MessageText:
-//
-// DNS signature validity expired.
-//
- DNS_ERROR_RCODE_BADTIME = DWORD(9018);
- {$EXTERNALSYM DNS_ERROR_RCODE_BADTIME}
-
- DNS_ERROR_RCODE_LAST = DNS_ERROR_RCODE_BADTIME;
- {$EXTERNALSYM DNS_ERROR_RCODE_LAST}
-
-//
-// Packet format
-//
-
- DNS_ERROR_PACKET_FMT_BASE = 9500;
- {$EXTERNALSYM DNS_ERROR_PACKET_FMT_BASE}
-
-// DNS_INFO_NO_RECORDS 0x0000251d
-//
-// MessageId: DNS_INFO_NO_RECORDS
-//
-// MessageText:
-//
-// No records found for given DNS query.
-//
- DNS_INFO_NO_RECORDS = DWORD(9501);
- {$EXTERNALSYM DNS_INFO_NO_RECORDS}
-
-// DNS_ERROR_BAD_PACKET 0x0000251e
-//
-// MessageId: DNS_ERROR_BAD_PACKET
-//
-// MessageText:
-//
-// Bad DNS packet.
-//
- DNS_ERROR_BAD_PACKET = DWORD(9502);
- {$EXTERNALSYM DNS_ERROR_BAD_PACKET}
-
-// DNS_ERROR_NO_PACKET 0x0000251f
-//
-// MessageId: DNS_ERROR_NO_PACKET
-//
-// MessageText:
-//
-// No DNS packet.
-//
- DNS_ERROR_NO_PACKET = DWORD(9503);
- {$EXTERNALSYM DNS_ERROR_NO_PACKET}
-
-// DNS_ERROR_RCODE 0x00002520
-//
-// MessageId: DNS_ERROR_RCODE
-//
-// MessageText:
-//
-// DNS error, check rcode.
-//
- DNS_ERROR_RCODE = DWORD(9504);
- {$EXTERNALSYM DNS_ERROR_RCODE}
-
-// DNS_ERROR_UNSECURE_PACKET 0x00002521
-//
-// MessageId: DNS_ERROR_UNSECURE_PACKET
-//
-// MessageText:
-//
-// Unsecured DNS packet.
-//
- DNS_ERROR_UNSECURE_PACKET = DWORD(9505);
- {$EXTERNALSYM DNS_ERROR_UNSECURE_PACKET}
-
- DNS_STATUS_PACKET_UNSECURE = DNS_ERROR_UNSECURE_PACKET;
- {$EXTERNALSYM DNS_STATUS_PACKET_UNSECURE}
-
-//
-// General API errors
-//
-
- DNS_ERROR_NO_MEMORY = ERROR_OUTOFMEMORY;
- {$EXTERNALSYM DNS_ERROR_NO_MEMORY}
- DNS_ERROR_INVALID_NAME = ERROR_INVALID_NAME;
- {$EXTERNALSYM DNS_ERROR_INVALID_NAME}
- DNS_ERROR_INVALID_DATA = ERROR_INVALID_DATA;
- {$EXTERNALSYM DNS_ERROR_INVALID_DATA}
-
- DNS_ERROR_GENERAL_API_BASE = 9550;
- {$EXTERNALSYM DNS_ERROR_GENERAL_API_BASE}
-
-// DNS_ERROR_INVALID_TYPE 0x0000254f
-//
-// MessageId: DNS_ERROR_INVALID_TYPE
-//
-// MessageText:
-//
-// Invalid DNS type.
-//
- DNS_ERROR_INVALID_TYPE = DWORD(9551);
- {$EXTERNALSYM DNS_ERROR_INVALID_TYPE}
-
-// DNS_ERROR_INVALID_IP_ADDRESS 0x00002550
-//
-// MessageId: DNS_ERROR_INVALID_IP_ADDRESS
-//
-// MessageText:
-//
-// Invalid IP address.
-//
- DNS_ERROR_INVALID_IP_ADDRESS = DWORD(9552);
- {$EXTERNALSYM DNS_ERROR_INVALID_IP_ADDRESS}
-
-// DNS_ERROR_INVALID_PROPERTY 0x00002551
-//
-// MessageId: DNS_ERROR_INVALID_PROPERTY
-//
-// MessageText:
-//
-// Invalid property.
-//
- DNS_ERROR_INVALID_PROPERTY = DWORD(9553);
- {$EXTERNALSYM DNS_ERROR_INVALID_PROPERTY}
-
-// DNS_ERROR_TRY_AGAIN_LATER 0x00002552
-//
-// MessageId: DNS_ERROR_TRY_AGAIN_LATER
-//
-// MessageText:
-//
-// Try DNS operation again later.
-//
- DNS_ERROR_TRY_AGAIN_LATER = DWORD(9554);
- {$EXTERNALSYM DNS_ERROR_TRY_AGAIN_LATER}
-
-// DNS_ERROR_NOT_UNIQUE 0x00002553
-//
-// MessageId: DNS_ERROR_NOT_UNIQUE
-//
-// MessageText:
-//
-// Record for given name and type is not unique.
-//
- DNS_ERROR_NOT_UNIQUE = DWORD(9555);
- {$EXTERNALSYM DNS_ERROR_NOT_UNIQUE}
-
-// DNS_ERROR_NON_RFC_NAME 0x00002554
-//
-// MessageId: DNS_ERROR_NON_RFC_NAME
-//
-// MessageText:
-//
-// DNS name does not comply with RFC specifications.
-//
- DNS_ERROR_NON_RFC_NAME = DWORD(9556);
- {$EXTERNALSYM DNS_ERROR_NON_RFC_NAME}
-
-// DNS_STATUS_FQDN 0x00002555
-//
-// MessageId: DNS_STATUS_FQDN
-//
-// MessageText:
-//
-// DNS name is a fully-qualified DNS name.
-//
- DNS_STATUS_FQDN = DWORD(9557);
- {$EXTERNALSYM DNS_STATUS_FQDN}
-
-// DNS_STATUS_DOTTED_NAME 0x00002556
-//
-// MessageId: DNS_STATUS_DOTTED_NAME
-//
-// MessageText:
-//
-// DNS name is dotted (multi-label).
-//
- DNS_STATUS_DOTTED_NAME = DWORD(9558);
- {$EXTERNALSYM DNS_STATUS_DOTTED_NAME}
-
-// DNS_STATUS_SINGLE_PART_NAME 0x00002557
-//
-// MessageId: DNS_STATUS_SINGLE_PART_NAME
-//
-// MessageText:
-//
-// DNS name is a single-part name.
-//
- DNS_STATUS_SINGLE_PART_NAME = DWORD(9559);
- {$EXTERNALSYM DNS_STATUS_SINGLE_PART_NAME}
-
-// DNS_ERROR_INVALID_NAME_CHAR 0x00002558
-//
-// MessageId: DNS_ERROR_INVALID_NAME_CHAR
-//
-// MessageText:
-//
-// DNS name contains an invalid character.
-//
- DNS_ERROR_INVALID_NAME_CHAR = DWORD(9560);
- {$EXTERNALSYM DNS_ERROR_INVALID_NAME_CHAR}
-
-// DNS_ERROR_NUMERIC_NAME 0x00002559
-//
-// MessageId: DNS_ERROR_NUMERIC_NAME
-//
-// MessageText:
-//
-// DNS name is entirely numeric.
-//
- DNS_ERROR_NUMERIC_NAME = DWORD(9561);
- {$EXTERNALSYM DNS_ERROR_NUMERIC_NAME}
-
-// DNS_ERROR_NOT_ALLOWED_ON_ROOT_SERVER 0x0000255A
-//
-// MessageId: DNS_ERROR_NOT_ALLOWED_ON_ROOT_SERVER
-//
-// MessageText:
-//
-// The operation requested is not permitted on a DNS root server.
-//
- DNS_ERROR_NOT_ALLOWED_ON_ROOT_SERVER = DWORD(9562);
- {$EXTERNALSYM DNS_ERROR_NOT_ALLOWED_ON_ROOT_SERVER}
-
-// DNS_ERROR_NOT_ALLOWED_UNDER_DELEGATION 0x0000255B
-//
-// MessageId: DNS_ERROR_NOT_ALLOWED_UNDER_DELEGATION
-//
-// MessageText:
-//
-// The record could not be created because this part of the DNS namespace has
-// been delegated to another server.
-//
- DNS_ERROR_NOT_ALLOWED_UNDER_DELEGATION = DWORD(9563);
- {$EXTERNALSYM DNS_ERROR_NOT_ALLOWED_UNDER_DELEGATION}
-
-// DNS_ERROR_CANNOT_FIND_ROOT_HINTS 0x0000255C
-//
-// MessageId: DNS_ERROR_CANNOT_FIND_ROOT_HINTS
-//
-// MessageText:
-//
-// The DNS server could not find a set of root hints.
-//
- DNS_ERROR_CANNOT_FIND_ROOT_HINTS = DWORD(9564);
- {$EXTERNALSYM DNS_ERROR_CANNOT_FIND_ROOT_HINTS}
-
-// DNS_ERROR_INCONSISTENT_ROOT_HINTS 0x0000255D
-//
-// MessageId: DNS_ERROR_INCONSISTENT_ROOT_HINTS
-//
-// MessageText:
-//
-// The DNS server found root hints but they were not consistent across
-// all adapters.
-//
- DNS_ERROR_INCONSISTENT_ROOT_HINTS = DWORD(9565);
- {$EXTERNALSYM DNS_ERROR_INCONSISTENT_ROOT_HINTS}
-
-//
-// Zone errors
-//
-
- DNS_ERROR_ZONE_BASE = 9600;
- {$EXTERNALSYM DNS_ERROR_ZONE_BASE}
-
-// DNS_ERROR_ZONE_DOES_NOT_EXIST 0x00002581
-//
-// MessageId: DNS_ERROR_ZONE_DOES_NOT_EXIST
-//
-// MessageText:
-//
-// DNS zone does not exist.
-//
- DNS_ERROR_ZONE_DOES_NOT_EXIST = DWORD(9601);
- {$EXTERNALSYM DNS_ERROR_ZONE_DOES_NOT_EXIST}
-
-// DNS_ERROR_NO_ZONE_INFO 0x00002582
-//
-// MessageId: DNS_ERROR_NO_ZONE_INFO
-//
-// MessageText:
-//
-// DNS zone information not available.
-//
- DNS_ERROR_NO_ZONE_INFO = DWORD(9602);
- {$EXTERNALSYM DNS_ERROR_NO_ZONE_INFO}
-
-// DNS_ERROR_INVALID_ZONE_OPERATION 0x00002583
-//
-// MessageId: DNS_ERROR_INVALID_ZONE_OPERATION
-//
-// MessageText:
-//
-// Invalid operation for DNS zone.
-//
- DNS_ERROR_INVALID_ZONE_OPERATION = DWORD(9603);
- {$EXTERNALSYM DNS_ERROR_INVALID_ZONE_OPERATION}
-
-// DNS_ERROR_ZONE_CONFIGURATION_ERROR 0x00002584
-//
-// MessageId: DNS_ERROR_ZONE_CONFIGURATION_ERROR
-//
-// MessageText:
-//
-// Invalid DNS zone configuration.
-//
- DNS_ERROR_ZONE_CONFIGURATION_ERROR = DWORD(9604);
- {$EXTERNALSYM DNS_ERROR_ZONE_CONFIGURATION_ERROR}
-
-// DNS_ERROR_ZONE_HAS_NO_SOA_RECORD 0x00002585
-//
-// MessageId: DNS_ERROR_ZONE_HAS_NO_SOA_RECORD
-//
-// MessageText:
-//
-// DNS zone has no start of authority (SOA) record.
-//
- DNS_ERROR_ZONE_HAS_NO_SOA_RECORD = DWORD(9605);
- {$EXTERNALSYM DNS_ERROR_ZONE_HAS_NO_SOA_RECORD}
-
-// DNS_ERROR_ZONE_HAS_NO_NS_RECORDS 0x00002586
-//
-// MessageId: DNS_ERROR_ZONE_HAS_NO_NS_RECORDS
-//
-// MessageText:
-//
-// DNS zone has no Name Server (NS) record.
-//
- DNS_ERROR_ZONE_HAS_NO_NS_RECORDS = DWORD(9606);
- {$EXTERNALSYM DNS_ERROR_ZONE_HAS_NO_NS_RECORDS}
-
-// DNS_ERROR_ZONE_LOCKED 0x00002587
-//
-// MessageId: DNS_ERROR_ZONE_LOCKED
-//
-// MessageText:
-//
-// DNS zone is locked.
-//
- DNS_ERROR_ZONE_LOCKED = DWORD(9607);
- {$EXTERNALSYM DNS_ERROR_ZONE_LOCKED}
-
-// DNS_ERROR_ZONE_CREATION_FAILED 0x00002588
-//
-// MessageId: DNS_ERROR_ZONE_CREATION_FAILED
-//
-// MessageText:
-//
-// DNS zone creation failed.
-//
- DNS_ERROR_ZONE_CREATION_FAILED = DWORD(9608);
- {$EXTERNALSYM DNS_ERROR_ZONE_CREATION_FAILED}
-
-// DNS_ERROR_ZONE_ALREADY_EXISTS 0x00002589
-//
-// MessageId: DNS_ERROR_ZONE_ALREADY_EXISTS
-//
-// MessageText:
-//
-// DNS zone already exists.
-//
- DNS_ERROR_ZONE_ALREADY_EXISTS = DWORD(9609);
- {$EXTERNALSYM DNS_ERROR_ZONE_ALREADY_EXISTS}
-
-// DNS_ERROR_AUTOZONE_ALREADY_EXISTS 0x0000258a
-//
-// MessageId: DNS_ERROR_AUTOZONE_ALREADY_EXISTS
-//
-// MessageText:
-//
-// DNS automatic zone already exists.
-//
- DNS_ERROR_AUTOZONE_ALREADY_EXISTS = DWORD(9610);
- {$EXTERNALSYM DNS_ERROR_AUTOZONE_ALREADY_EXISTS}
-
-// DNS_ERROR_INVALID_ZONE_TYPE 0x0000258b
-//
-// MessageId: DNS_ERROR_INVALID_ZONE_TYPE
-//
-// MessageText:
-//
-// Invalid DNS zone type.
-//
- DNS_ERROR_INVALID_ZONE_TYPE = DWORD(9611);
- {$EXTERNALSYM DNS_ERROR_INVALID_ZONE_TYPE}
-
-// DNS_ERROR_SECONDARY_REQUIRES_MASTER_IP 0x0000258c
-//
-// MessageId: DNS_ERROR_SECONDARY_REQUIRES_MASTER_IP
-//
-// MessageText:
-//
-// Secondary DNS zone requires master IP address.
-//
- DNS_ERROR_SECONDARY_REQUIRES_MASTER_IP = DWORD(9612);
- {$EXTERNALSYM DNS_ERROR_SECONDARY_REQUIRES_MASTER_IP}
-
-// DNS_ERROR_ZONE_NOT_SECONDARY 0x0000258d
-//
-// MessageId: DNS_ERROR_ZONE_NOT_SECONDARY
-//
-// MessageText:
-//
-// DNS zone not secondary.
-//
- DNS_ERROR_ZONE_NOT_SECONDARY = DWORD(9613);
- {$EXTERNALSYM DNS_ERROR_ZONE_NOT_SECONDARY}
-
-// DNS_ERROR_NEED_SECONDARY_ADDRESSES 0x0000258e
-//
-// MessageId: DNS_ERROR_NEED_SECONDARY_ADDRESSES
-//
-// MessageText:
-//
-// Need secondary IP address.
-//
- DNS_ERROR_NEED_SECONDARY_ADDRESSES = DWORD(9614);
- {$EXTERNALSYM DNS_ERROR_NEED_SECONDARY_ADDRESSES}
-
-// DNS_ERROR_WINS_INIT_FAILED 0x0000258f
-//
-// MessageId: DNS_ERROR_WINS_INIT_FAILED
-//
-// MessageText:
-//
-// WINS initialization failed.
-//
- DNS_ERROR_WINS_INIT_FAILED = DWORD(9615);
- {$EXTERNALSYM DNS_ERROR_WINS_INIT_FAILED}
-
-// DNS_ERROR_NEED_WINS_SERVERS 0x00002590
-//
-// MessageId: DNS_ERROR_NEED_WINS_SERVERS
-//
-// MessageText:
-//
-// Need WINS servers.
-//
- DNS_ERROR_NEED_WINS_SERVERS = DWORD(9616);
- {$EXTERNALSYM DNS_ERROR_NEED_WINS_SERVERS}
-
-// DNS_ERROR_NBSTAT_INIT_FAILED 0x00002591
-//
-// MessageId: DNS_ERROR_NBSTAT_INIT_FAILED
-//
-// MessageText:
-//
-// NBTSTAT initialization call failed.
-//
- DNS_ERROR_NBSTAT_INIT_FAILED = DWORD(9617);
- {$EXTERNALSYM DNS_ERROR_NBSTAT_INIT_FAILED}
-
-// DNS_ERROR_SOA_DELETE_INVALID 0x00002592
-//
-// MessageId: DNS_ERROR_SOA_DELETE_INVALID
-//
-// MessageText:
-//
-// Invalid delete of start of authority (SOA)
-//
- DNS_ERROR_SOA_DELETE_INVALID = DWORD(9618);
- {$EXTERNALSYM DNS_ERROR_SOA_DELETE_INVALID}
-
-// DNS_ERROR_FORWARDER_ALREADY_EXISTS 0x00002593
-//
-// MessageId: DNS_ERROR_FORWARDER_ALREADY_EXISTS
-//
-// MessageText:
-//
-// A conditional forwarding zone already exists for that name.
-//
- DNS_ERROR_FORWARDER_ALREADY_EXISTS = DWORD(9619);
- {$EXTERNALSYM DNS_ERROR_FORWARDER_ALREADY_EXISTS}
-
-// DNS_ERROR_ZONE_REQUIRES_MASTER_IP 0x00002594
-//
-// MessageId: DNS_ERROR_ZONE_REQUIRES_MASTER_IP
-//
-// MessageText:
-//
-// This zone must be configured with one or more master DNS server IP addresses.
-//
- DNS_ERROR_ZONE_REQUIRES_MASTER_IP = DWORD(9620);
- {$EXTERNALSYM DNS_ERROR_ZONE_REQUIRES_MASTER_IP}
-
-// DNS_ERROR_ZONE_IS_SHUTDOWN 0x00002595
-//
-// MessageId: DNS_ERROR_ZONE_IS_SHUTDOWN
-//
-// MessageText:
-//
-// The operation cannot be performed because this zone is shutdown.
-//
- DNS_ERROR_ZONE_IS_SHUTDOWN = DWORD(9621);
- {$EXTERNALSYM DNS_ERROR_ZONE_IS_SHUTDOWN}
-
-//
-// Datafile errors
-//
-
- DNS_ERROR_DATAFILE_BASE = 9650;
- {$EXTERNALSYM DNS_ERROR_DATAFILE_BASE}
-
-// DNS 0x000025b3
-//
-// MessageId: DNS_ERROR_PRIMARY_REQUIRES_DATAFILE
-//
-// MessageText:
-//
-// Primary DNS zone requires datafile.
-//
- DNS_ERROR_PRIMARY_REQUIRES_DATAFILE = DWORD(9651);
- {$EXTERNALSYM DNS_ERROR_PRIMARY_REQUIRES_DATAFILE}
-
-// DNS 0x000025b4
-//
-// MessageId: DNS_ERROR_INVALID_DATAFILE_NAME
-//
-// MessageText:
-//
-// Invalid datafile name for DNS zone.
-//
- DNS_ERROR_INVALID_DATAFILE_NAME = DWORD(9652);
- {$EXTERNALSYM DNS_ERROR_INVALID_DATAFILE_NAME}
-
-// DNS 0x000025b5
-//
-// MessageId: DNS_ERROR_DATAFILE_OPEN_FAILURE
-//
-// MessageText:
-//
-// Failed to open datafile for DNS zone.
-//
- DNS_ERROR_DATAFILE_OPEN_FAILURE = DWORD(9653);
- {$EXTERNALSYM DNS_ERROR_DATAFILE_OPEN_FAILURE}
-
-// DNS 0x000025b6
-//
-// MessageId: DNS_ERROR_FILE_WRITEBACK_FAILED
-//
-// MessageText:
-//
-// Failed to write datafile for DNS zone.
-//
- DNS_ERROR_FILE_WRITEBACK_FAILED = DWORD(9654);
- {$EXTERNALSYM DNS_ERROR_FILE_WRITEBACK_FAILED}
-
-// DNS 0x000025b7
-//
-// MessageId: DNS_ERROR_DATAFILE_PARSING
-//
-// MessageText:
-//
-// Failure while reading datafile for DNS zone.
-//
- DNS_ERROR_DATAFILE_PARSING = DWORD(9655);
- {$EXTERNALSYM DNS_ERROR_DATAFILE_PARSING}
-
-//
-// Database errors
-//
-
- DNS_ERROR_DATABASE_BASE = 9700;
- {$EXTERNALSYM DNS_ERROR_DATABASE_BASE}
-
-// DNS_ERROR_RECORD_DOES_NOT_EXIST 0x000025e5
-//
-// MessageId: DNS_ERROR_RECORD_DOES_NOT_EXIST
-//
-// MessageText:
-//
-// DNS record does not exist.
-//
- DNS_ERROR_RECORD_DOES_NOT_EXIST = DWORD(9701);
- {$EXTERNALSYM DNS_ERROR_RECORD_DOES_NOT_EXIST}
-
-// DNS_ERROR_RECORD_FORMAT 0x000025e6
-//
-// MessageId: DNS_ERROR_RECORD_FORMAT
-//
-// MessageText:
-//
-// DNS record format error.
-//
- DNS_ERROR_RECORD_FORMAT = DWORD(9702);
- {$EXTERNALSYM DNS_ERROR_RECORD_FORMAT}
-
-// DNS_ERROR_NODE_CREATION_FAILED 0x000025e7
-//
-// MessageId: DNS_ERROR_NODE_CREATION_FAILED
-//
-// MessageText:
-//
-// Node creation failure in DNS.
-//
- DNS_ERROR_NODE_CREATION_FAILED = DWORD(9703);
- {$EXTERNALSYM DNS_ERROR_NODE_CREATION_FAILED}
-
-// DNS_ERROR_UNKNOWN_RECORD_TYPE 0x000025e8
-//
-// MessageId: DNS_ERROR_UNKNOWN_RECORD_TYPE
-//
-// MessageText:
-//
-// Unknown DNS record type.
-//
- DNS_ERROR_UNKNOWN_RECORD_TYPE = DWORD(9704);
- {$EXTERNALSYM DNS_ERROR_UNKNOWN_RECORD_TYPE}
-
-// DNS_ERROR_RECORD_TIMED_OUT 0x000025e9
-//
-// MessageId: DNS_ERROR_RECORD_TIMED_OUT
-//
-// MessageText:
-//
-// DNS record timed out.
-//
- DNS_ERROR_RECORD_TIMED_OUT = DWORD(9705);
- {$EXTERNALSYM DNS_ERROR_RECORD_TIMED_OUT}
-
-// DNS_ERROR_NAME_NOT_IN_ZONE 0x000025ea
-//
-// MessageId: DNS_ERROR_NAME_NOT_IN_ZONE
-//
-// MessageText:
-//
-// Name not in DNS zone.
-//
- DNS_ERROR_NAME_NOT_IN_ZONE = DWORD(9706);
- {$EXTERNALSYM DNS_ERROR_NAME_NOT_IN_ZONE}
-
-// DNS_ERROR_CNAME_LOOP 0x000025eb
-//
-// MessageId: DNS_ERROR_CNAME_LOOP
-//
-// MessageText:
-//
-// CNAME loop detected.
-//
- DNS_ERROR_CNAME_LOOP = DWORD(9707);
- {$EXTERNALSYM DNS_ERROR_CNAME_LOOP}
-
-// DNS_ERROR_NODE_IS_CNAME 0x000025ec
-//
-// MessageId: DNS_ERROR_NODE_IS_CNAME
-//
-// MessageText:
-//
-// Node is a CNAME DNS record.
-//
- DNS_ERROR_NODE_IS_CNAME = DWORD(9708);
- {$EXTERNALSYM DNS_ERROR_NODE_IS_CNAME}
-
-// DNS_ERROR_CNAME_COLLISION 0x000025ed
-//
-// MessageId: DNS_ERROR_CNAME_COLLISION
-//
-// MessageText:
-//
-// A CNAME record already exists for given name.
-//
- DNS_ERROR_CNAME_COLLISION = DWORD(9709);
- {$EXTERNALSYM DNS_ERROR_CNAME_COLLISION}
-
-// DNS_ERROR_RECORD_ONLY_AT_ZONE_ROOT 0x000025ee
-//
-// MessageId: DNS_ERROR_RECORD_ONLY_AT_ZONE_ROOT
-//
-// MessageText:
-//
-// Record only at DNS zone root.
-//
- DNS_ERROR_RECORD_ONLY_AT_ZONE_ROOT = DWORD(9710);
- {$EXTERNALSYM DNS_ERROR_RECORD_ONLY_AT_ZONE_ROOT}
-
-// DNS_ERROR_RECORD_ALREADY_EXISTS 0x000025ef
-//
-// MessageId: DNS_ERROR_RECORD_ALREADY_EXISTS
-//
-// MessageText:
-//
-// DNS record already exists.
-//
- DNS_ERROR_RECORD_ALREADY_EXISTS = DWORD(9711);
- {$EXTERNALSYM DNS_ERROR_RECORD_ALREADY_EXISTS}
-
-// DNS_ERROR_SECONDARY_DATA 0x000025f0
-//
-// MessageId: DNS_ERROR_SECONDARY_DATA
-//
-// MessageText:
-//
-// Secondary DNS zone data error.
-//
- DNS_ERROR_SECONDARY_DATA = DWORD(9712);
- {$EXTERNALSYM DNS_ERROR_SECONDARY_DATA}
-
-// DNS_ERROR_NO_CREATE_CACHE_DATA 0x000025f1
-//
-// MessageId: DNS_ERROR_NO_CREATE_CACHE_DATA
-//
-// MessageText:
-//
-// Could not create DNS cache data.
-//
- DNS_ERROR_NO_CREATE_CACHE_DATA = DWORD(9713);
- {$EXTERNALSYM DNS_ERROR_NO_CREATE_CACHE_DATA}
-
-// DNS_ERROR_NAME_DOES_NOT_EXIST 0x000025f2
-//
-// MessageId: DNS_ERROR_NAME_DOES_NOT_EXIST
-//
-// MessageText:
-//
-// DNS name does not exist.
-//
- DNS_ERROR_NAME_DOES_NOT_EXIST = DWORD(9714);
- {$EXTERNALSYM DNS_ERROR_NAME_DOES_NOT_EXIST}
-
-// DNS_WARNING_PTR_CREATE_FAILED 0x000025f3
-//
-// MessageId: DNS_WARNING_PTR_CREATE_FAILED
-//
-// MessageText:
-//
-// Could not create pointer (PTR) record.
-//
- DNS_WARNING_PTR_CREATE_FAILED = DWORD(9715);
- {$EXTERNALSYM DNS_WARNING_PTR_CREATE_FAILED}
-
-// DNS_WARNING_DOMAIN_UNDELETED 0x000025f4
-//
-// MessageId: DNS_WARNING_DOMAIN_UNDELETED
-//
-// MessageText:
-//
-// DNS domain was undeleted.
-//
- DNS_WARNING_DOMAIN_UNDELETED = DWORD(9716);
- {$EXTERNALSYM DNS_WARNING_DOMAIN_UNDELETED}
-
-// DNS_ERROR_DS_UNAVAILABLE 0x000025f5
-//
-// MessageId: DNS_ERROR_DS_UNAVAILABLE
-//
-// MessageText:
-//
-// The directory service is unavailable.
-//
- DNS_ERROR_DS_UNAVAILABLE = DWORD(9717);
- {$EXTERNALSYM DNS_ERROR_DS_UNAVAILABLE}
-
-// DNS_ERROR_DS_ZONE_ALREADY_EXISTS 0x000025f6
-//
-// MessageId: DNS_ERROR_DS_ZONE_ALREADY_EXISTS
-//
-// MessageText:
-//
-// DNS zone already exists in the directory service.
-//
- DNS_ERROR_DS_ZONE_ALREADY_EXISTS = DWORD(9718);
- {$EXTERNALSYM DNS_ERROR_DS_ZONE_ALREADY_EXISTS}
-
-// DNS_ERROR_NO_BOOTFILE_IF_DS_ZONE 0x000025f7
-//
-// MessageId: DNS_ERROR_NO_BOOTFILE_IF_DS_ZONE
-//
-// MessageText:
-//
-// DNS server not creating or reading the boot file for the directory service integrated DNS zone.
-//
- DNS_ERROR_NO_BOOTFILE_IF_DS_ZONE = DWORD(9719);
- {$EXTERNALSYM DNS_ERROR_NO_BOOTFILE_IF_DS_ZONE}
-
-//
-// Operation errors
-//
-
- DNS_ERROR_OPERATION_BASE = 9750;
- {$EXTERNALSYM DNS_ERROR_OPERATION_BASE}
-
-// DNS_INFO_AXFR_COMPLETE 0x00002617
-//
-// MessageId: DNS_INFO_AXFR_COMPLETE
-//
-// MessageText:
-//
-// DNS AXFR (zone transfer) complete.
-//
- DNS_INFO_AXFR_COMPLETE = DWORD(9751);
- {$EXTERNALSYM DNS_INFO_AXFR_COMPLETE}
-
-// DNS_ERROR_AXFR 0x00002618
-//
-// MessageId: DNS_ERROR_AXFR
-//
-// MessageText:
-//
-// DNS zone transfer failed.
-//
- DNS_ERROR_AXFR = DWORD(9752);
- {$EXTERNALSYM DNS_ERROR_AXFR}
-
-// DNS_INFO_ADDED_LOCAL_WINS 0x00002619
-//
-// MessageId: DNS_INFO_ADDED_LOCAL_WINS
-//
-// MessageText:
-//
-// Added local WINS server.
-//
- DNS_INFO_ADDED_LOCAL_WINS = DWORD(9753);
- {$EXTERNALSYM DNS_INFO_ADDED_LOCAL_WINS}
-
-//
-// Secure update
-//
-
- DNS_ERROR_SECURE_BASE = 9800;
- {$EXTERNALSYM DNS_ERROR_SECURE_BASE}
-
-// DNS_STATUS_CONTINUE_NEEDED 0x00002649
-//
-// MessageId: DNS_STATUS_CONTINUE_NEEDED
-//
-// MessageText:
-//
-// Secure update call needs to continue update request.
-//
- DNS_STATUS_CONTINUE_NEEDED = DWORD(9801);
- {$EXTERNALSYM DNS_STATUS_CONTINUE_NEEDED}
-
-//
-// Setup errors
-//
-
- DNS_ERROR_SETUP_BASE = 9850;
- {$EXTERNALSYM DNS_ERROR_SETUP_BASE}
-
-// DNS_ERROR_NO_TCPIP 0x0000267b
-//
-// MessageId: DNS_ERROR_NO_TCPIP
-//
-// MessageText:
-//
-// TCP/IP network protocol not installed.
-//
- DNS_ERROR_NO_TCPIP = DWORD(9851);
- {$EXTERNALSYM DNS_ERROR_NO_TCPIP}
-
-// DNS_ERROR_NO_DNS_SERVERS 0x0000267c
-//
-// MessageId: DNS_ERROR_NO_DNS_SERVERS
-//
-// MessageText:
-//
-// No DNS servers configured for local system.
-//
- DNS_ERROR_NO_DNS_SERVERS = DWORD(9852);
- {$EXTERNALSYM DNS_ERROR_NO_DNS_SERVERS}
-
-//
-// Directory partition (DP) errors
-//
-
- DNS_ERROR_DP_BASE = 9900;
- {$EXTERNALSYM DNS_ERROR_DP_BASE}
-
-// DNS_ERROR_DP_DOES_NOT_EXIST 0x000026ad
-//
-// MessageId: DNS_ERROR_DP_DOES_NOT_EXIST
-//
-// MessageText:
-//
-// The specified directory partition does not exist.
-//
- DNS_ERROR_DP_DOES_NOT_EXIST = DWORD(9901);
- {$EXTERNALSYM DNS_ERROR_DP_DOES_NOT_EXIST}
-
-// DNS_ERROR_DP_ALREADY_EXISTS 0x000026ae
-//
-// MessageId: DNS_ERROR_DP_ALREADY_EXISTS
-//
-// MessageText:
-//
-// The specified directory partition already exists.
-//
- DNS_ERROR_DP_ALREADY_EXISTS = DWORD(9902);
- {$EXTERNALSYM DNS_ERROR_DP_ALREADY_EXISTS}
-
-// DNS_ERROR_DP_NOT_ENLISTED 0x000026af
-//
-// MessageId: DNS_ERROR_DP_NOT_ENLISTED
-//
-// MessageText:
-//
-// This DNS server is not enlisted in the specified directory partition.
-//
- DNS_ERROR_DP_NOT_ENLISTED = DWORD(9903);
- {$EXTERNALSYM DNS_ERROR_DP_NOT_ENLISTED}
-
-// DNS_ERROR_DP_ALREADY_ENLISTED 0x000026b0
-//
-// MessageId: DNS_ERROR_DP_ALREADY_ENLISTED
-//
-// MessageText:
-//
-// This DNS server is already enlisted in the specified directory partition.
-//
- DNS_ERROR_DP_ALREADY_ENLISTED = DWORD(9904);
- {$EXTERNALSYM DNS_ERROR_DP_ALREADY_ENLISTED}
-
-// DNS_ERROR_DP_NOT_AVAILABLE 0x000026b1
-//
-// MessageId: DNS_ERROR_DP_NOT_AVAILABLE
-//
-// MessageText:
-//
-// The directory partition is not available at this time. Please wait
-// a few minutes and try again.
-//
- DNS_ERROR_DP_NOT_AVAILABLE = DWORD(9905);
- {$EXTERNALSYM DNS_ERROR_DP_NOT_AVAILABLE}
-
-// DNS_ERROR_DP_FSMO_ERROR 0x000026b2
-//
-// MessageId: DNS_ERROR_DP_FSMO_ERROR
-//
-// MessageText:
-//
-// The application directory partition operation failed. The domain controller
-// holding the domain naming master role is down or unable to service the
-// request or is not running Windows Server 2003.
-//
- DNS_ERROR_DP_FSMO_ERROR = DWORD(9906);
- {$EXTERNALSYM DNS_ERROR_DP_FSMO_ERROR}
-
-///////////////////////////////////////////////////
-// //
-// End of DNS Error Codes //
-// //
-// 9000 to 9999 //
-///////////////////////////////////////////////////
-
-///////////////////////////////////////////////////
-// //
-// WinSock Error Codes //
-// //
-// 10000 to 11999 //
-///////////////////////////////////////////////////
-
-//
-// WinSock error codes are also defined in WinSock.h
-// and WinSock2.h, hence the IFDEF
-//
- WSABASEERR = 10000;
- {$EXTERNALSYM WSABASEERR}
-//
-// MessageId: WSAEINTR
-//
-// MessageText:
-//
-// A blocking operation was interrupted by a call to WSACancelBlockingCall.
-//
- WSAEINTR = DWORD(10004);
- {$EXTERNALSYM WSAEINTR}
-
-//
-// MessageId: WSAEBADF
-//
-// MessageText:
-//
-// The file handle supplied is not valid.
-//
- WSAEBADF = DWORD(10009);
- {$EXTERNALSYM WSAEBADF}
-
-//
-// MessageId: WSAEACCES
-//
-// MessageText:
-//
-// An attempt was made to access a socket in a way forbidden by its access permissions.
-//
- WSAEACCES = DWORD(10013);
- {$EXTERNALSYM WSAEACCES}
-
-//
-// MessageId: WSAEFAULT
-//
-// MessageText:
-//
-// The system detected an invalid pointer address in attempting to use a pointer argument in a call.
-//
- WSAEFAULT = DWORD(10014);
- {$EXTERNALSYM WSAEFAULT}
-
-//
-// MessageId: WSAEINVAL
-//
-// MessageText:
-//
-// An invalid argument was supplied.
-//
- WSAEINVAL = DWORD(10022);
- {$EXTERNALSYM WSAEINVAL}
-
-//
-// MessageId: WSAEMFILE
-//
-// MessageText:
-//
-// Too many open sockets.
-//
- WSAEMFILE = DWORD(10024);
- {$EXTERNALSYM WSAEMFILE}
-
-//
-// MessageId: WSAEWOULDBLOCK
-//
-// MessageText:
-//
-// A non-blocking socket operation could not be completed immediately.
-//
- WSAEWOULDBLOCK = DWORD(10035);
- {$EXTERNALSYM WSAEWOULDBLOCK}
-
-//
-// MessageId: WSAEINPROGRESS
-//
-// MessageText:
-//
-// A blocking operation is currently executing.
-//
- WSAEINPROGRESS = DWORD(10036);
- {$EXTERNALSYM WSAEINPROGRESS}
-
-//
-// MessageId: WSAEALREADY
-//
-// MessageText:
-//
-// An operation was attempted on a non-blocking socket that already had an operation in progress.
-//
- WSAEALREADY = DWORD(10037);
- {$EXTERNALSYM WSAEALREADY}
-
-//
-// MessageId: WSAENOTSOCK
-//
-// MessageText:
-//
-// An operation was attempted on something that is not a socket.
-//
- WSAENOTSOCK = DWORD(10038);
- {$EXTERNALSYM WSAENOTSOCK}
-
-//
-// MessageId: WSAEDESTADDRREQ
-//
-// MessageText:
-//
-// A required address was omitted from an operation on a socket.
-//
- WSAEDESTADDRREQ = DWORD(10039);
- {$EXTERNALSYM WSAEDESTADDRREQ}
-
-//
-// MessageId: WSAEMSGSIZE
-//
-// MessageText:
-//
-// A message sent on a datagram socket was larger than the internal message buffer or some other network limit, or the buffer used to receive a datagram into was smaller than the datagram itself.
-//
- WSAEMSGSIZE = DWORD(10040);
- {$EXTERNALSYM WSAEMSGSIZE}
-
-//
-// MessageId: WSAEPROTOTYPE
-//
-// MessageText:
-//
-// A protocol was specified in the socket function call that does not support the semantics of the socket type requested.
-//
- WSAEPROTOTYPE = DWORD(10041);
- {$EXTERNALSYM WSAEPROTOTYPE}
-
-//
-// MessageId: WSAENOPROTOOPT
-//
-// MessageText:
-//
-// An unknown, invalid, or unsupported option or level was specified in a getsockopt or setsockopt call.
-//
- WSAENOPROTOOPT = DWORD(10042);
- {$EXTERNALSYM WSAENOPROTOOPT}
-
-//
-// MessageId: WSAEPROTONOSUPPORT
-//
-// MessageText:
-//
-// The requested protocol has not been configured into the system, or no implementation for it exists.
-//
- WSAEPROTONOSUPPORT = DWORD(10043);
- {$EXTERNALSYM WSAEPROTONOSUPPORT}
-
-//
-// MessageId: WSAESOCKTNOSUPPORT
-//
-// MessageText:
-//
-// The support for the specified socket type does not exist in this address family.
-//
- WSAESOCKTNOSUPPORT = DWORD(10044);
- {$EXTERNALSYM WSAESOCKTNOSUPPORT}
-
-//
-// MessageId: WSAEOPNOTSUPP
-//
-// MessageText:
-//
-// The attempted operation is not supported for the type of object referenced.
-//
- WSAEOPNOTSUPP = DWORD(10045);
- {$EXTERNALSYM WSAEOPNOTSUPP}
-
-//
-// MessageId: WSAEPFNOSUPPORT
-//
-// MessageText:
-//
-// The protocol family has not been configured into the system or no implementation for it exists.
-//
- WSAEPFNOSUPPORT = DWORD(10046);
- {$EXTERNALSYM WSAEPFNOSUPPORT}
-
-//
-// MessageId: WSAEAFNOSUPPORT
-//
-// MessageText:
-//
-// An address incompatible with the requested protocol was used.
-//
- WSAEAFNOSUPPORT = DWORD(10047);
- {$EXTERNALSYM WSAEAFNOSUPPORT}
-
-//
-// MessageId: WSAEADDRINUSE
-//
-// MessageText:
-//
-// Only one usage of each socket address (protocol/network address/port) is normally permitted.
-//
- WSAEADDRINUSE = DWORD(10048);
- {$EXTERNALSYM WSAEADDRINUSE}
-
-//
-// MessageId: WSAEADDRNOTAVAIL
-//
-// MessageText:
-//
-// The requested address is not valid in its context.
-//
- WSAEADDRNOTAVAIL = DWORD(10049);
- {$EXTERNALSYM WSAEADDRNOTAVAIL}
-
-//
-// MessageId: WSAENETDOWN
-//
-// MessageText:
-//
-// A socket operation encountered a dead network.
-//
- WSAENETDOWN = DWORD(10050);
- {$EXTERNALSYM WSAENETDOWN}
-
-//
-// MessageId: WSAENETUNREACH
-//
-// MessageText:
-//
-// A socket operation was attempted to an unreachable network.
-//
- WSAENETUNREACH = DWORD(10051);
- {$EXTERNALSYM WSAENETUNREACH}
-
-//
-// MessageId: WSAENETRESET
-//
-// MessageText:
-//
-// The connection has been broken due to keep-alive activity detecting a failure while the operation was in progress.
-//
- WSAENETRESET = DWORD(10052);
- {$EXTERNALSYM WSAENETRESET}
-
-//
-// MessageId: WSAECONNABORTED
-//
-// MessageText:
-//
-// An established connection was aborted by the software in your host machine.
-//
- WSAECONNABORTED = DWORD(10053);
- {$EXTERNALSYM WSAECONNABORTED}
-
-//
-// MessageId: WSAECONNRESET
-//
-// MessageText:
-//
-// An existing connection was forcibly closed by the remote host.
-//
- WSAECONNRESET = DWORD(10054);
- {$EXTERNALSYM WSAECONNRESET}
-
-//
-// MessageId: WSAENOBUFS
-//
-// MessageText:
-//
-// An operation on a socket could not be performed because the system lacked sufficient buffer space or because a queue was full.
-//
- WSAENOBUFS = DWORD(10055);
- {$EXTERNALSYM WSAENOBUFS}
-
-//
-// MessageId: WSAEISCONN
-//
-// MessageText:
-//
-// A connect request was made on an already connected socket.
-//
- WSAEISCONN = DWORD(10056);
- {$EXTERNALSYM WSAEISCONN}
-
-//
-// MessageId: WSAENOTCONN
-//
-// MessageText:
-//
-// A request to send or receive data was disallowed because the socket is not connected and (when sending on a datagram socket using a sendto call) no address was supplied.
-//
- WSAENOTCONN = DWORD(10057);
- {$EXTERNALSYM WSAENOTCONN}
-
-//
-// MessageId: WSAESHUTDOWN
-//
-// MessageText:
-//
-// A request to send or receive data was disallowed because the socket had already been shut down in that direction with a previous shutdown call.
-//
- WSAESHUTDOWN = DWORD(10058);
- {$EXTERNALSYM WSAESHUTDOWN}
-
-//
-// MessageId: WSAETOOMANYREFS
-//
-// MessageText:
-//
-// Too many references to some kernel object.
-//
- WSAETOOMANYREFS = DWORD(10059);
- {$EXTERNALSYM WSAETOOMANYREFS}
-
-//
-// MessageId: WSAETIMEDOUT
-//
-// MessageText:
-//
-// A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
-//
- WSAETIMEDOUT = DWORD(10060);
- {$EXTERNALSYM WSAETIMEDOUT}
-
-//
-// MessageId: WSAECONNREFUSED
-//
-// MessageText:
-//
-// No connection could be made because the target machine actively refused it.
-//
- WSAECONNREFUSED = DWORD(10061);
- {$EXTERNALSYM WSAECONNREFUSED}
-
-//
-// MessageId: WSAELOOP
-//
-// MessageText:
-//
-// Cannot translate name.
-//
- WSAELOOP = DWORD(10062);
- {$EXTERNALSYM WSAELOOP}
-
-//
-// MessageId: WSAENAMETOOLONG
-//
-// MessageText:
-//
-// Name component or name was too long.
-//
- WSAENAMETOOLONG = DWORD(10063);
- {$EXTERNALSYM WSAENAMETOOLONG}
-
-//
-// MessageId: WSAEHOSTDOWN
-//
-// MessageText:
-//
-// A socket operation failed because the destination host was down.
-//
- WSAEHOSTDOWN = DWORD(10064);
- {$EXTERNALSYM WSAEHOSTDOWN}
-
-//
-// MessageId: WSAEHOSTUNREACH
-//
-// MessageText:
-//
-// A socket operation was attempted to an unreachable host.
-//
- WSAEHOSTUNREACH = DWORD(10065);
- {$EXTERNALSYM WSAEHOSTUNREACH}
-
-//
-// MessageId: WSAENOTEMPTY
-//
-// MessageText:
-//
-// Cannot remove a directory that is not empty.
-//
- WSAENOTEMPTY = DWORD(10066);
- {$EXTERNALSYM WSAENOTEMPTY}
-
-//
-// MessageId: WSAEPROCLIM
-//
-// MessageText:
-//
-// A Windows Sockets implementation may have a limit on the number of applications that may use it simultaneously.
-//
- WSAEPROCLIM = DWORD(10067);
- {$EXTERNALSYM WSAEPROCLIM}
-
-//
-// MessageId: WSAEUSERS
-//
-// MessageText:
-//
-// Ran out of quota.
-//
- WSAEUSERS = DWORD(10068);
- {$EXTERNALSYM WSAEUSERS}
-
-//
-// MessageId: WSAEDQUOT
-//
-// MessageText:
-//
-// Ran out of disk quota.
-//
- WSAEDQUOT = DWORD(10069);
- {$EXTERNALSYM WSAEDQUOT}
-
-//
-// MessageId: WSAESTALE
-//
-// MessageText:
-//
-// File handle reference is no longer available.
-//
- WSAESTALE = DWORD(10070);
- {$EXTERNALSYM WSAESTALE}
-
-//
-// MessageId: WSAEREMOTE
-//
-// MessageText:
-//
-// Item is not available locally.
-//
- WSAEREMOTE = DWORD(10071);
- {$EXTERNALSYM WSAEREMOTE}
-
-//
-// MessageId: WSASYSNOTREADY
-//
-// MessageText:
-//
-// WSAStartup cannot function at this time because the underlying system it uses to provide network services is currently unavailable.
-//
- WSASYSNOTREADY = DWORD(10091);
- {$EXTERNALSYM WSASYSNOTREADY}
-
-//
-// MessageId: WSAVERNOTSUPPORTED
-//
-// MessageText:
-//
-// The Windows Sockets version requested is not supported.
-//
- WSAVERNOTSUPPORTED = DWORD(10092);
- {$EXTERNALSYM WSAVERNOTSUPPORTED}
-
-//
-// MessageId: WSANOTINITIALISED
-//
-// MessageText:
-//
-// Either the application has not called WSAStartup, or WSAStartup failed.
-//
- WSANOTINITIALISED = DWORD(10093);
- {$EXTERNALSYM WSANOTINITIALISED}
-
-//
-// MessageId: WSAEDISCON
-//
-// MessageText:
-//
-// Returned by WSARecv or WSARecvFrom to indicate the remote party has initiated a graceful shutdown sequence.
-//
- WSAEDISCON = DWORD(10101);
- {$EXTERNALSYM WSAEDISCON}
-
-//
-// MessageId: WSAENOMORE
-//
-// MessageText:
-//
-// No more results can be returned by WSALookupServiceNext.
-//
- WSAENOMORE = DWORD(10102);
- {$EXTERNALSYM WSAENOMORE}
-
-//
-// MessageId: WSAECANCELLED
-//
-// MessageText:
-//
-// A call to WSALookupServiceEnd was made while this call was still processing. The call has been canceled.
-//
- WSAECANCELLED = DWORD(10103);
- {$EXTERNALSYM WSAECANCELLED}
-
-//
-// MessageId: WSAEINVALIDPROCTABLE
-//
-// MessageText:
-//
-// The procedure call table is invalid.
-//
- WSAEINVALIDPROCTABLE = DWORD(10104);
- {$EXTERNALSYM WSAEINVALIDPROCTABLE}
-
-//
-// MessageId: WSAEINVALIDPROVIDER
-//
-// MessageText:
-//
-// The requested service provider is invalid.
-//
- WSAEINVALIDPROVIDER = DWORD(10105);
- {$EXTERNALSYM WSAEINVALIDPROVIDER}
-
-//
-// MessageId: WSAEPROVIDERFAILEDINIT
-//
-// MessageText:
-//
-// The requested service provider could not be loaded or initialized.
-//
- WSAEPROVIDERFAILEDINIT = DWORD(10106);
- {$EXTERNALSYM WSAEPROVIDERFAILEDINIT}
-
-//
-// MessageId: WSASYSCALLFAILURE
-//
-// MessageText:
-//
-// A system call that should never fail has failed.
-//
- WSASYSCALLFAILURE = DWORD(10107);
- {$EXTERNALSYM WSASYSCALLFAILURE}
-
-//
-// MessageId: WSASERVICE_NOT_FOUND
-//
-// MessageText:
-//
-// No such service is known. The service cannot be found in the specified name space.
-//
- WSASERVICE_NOT_FOUND = DWORD(10108);
- {$EXTERNALSYM WSASERVICE_NOT_FOUND}
-
-//
-// MessageId: WSATYPE_NOT_FOUND
-//
-// MessageText:
-//
-// The specified class was not found.
-//
- WSATYPE_NOT_FOUND = DWORD(10109);
- {$EXTERNALSYM WSATYPE_NOT_FOUND}
-
-//
-// MessageId: WSA_E_NO_MORE
-//
-// MessageText:
-//
-// No more results can be returned by WSALookupServiceNext.
-//
- WSA_E_NO_MORE = DWORD(10110);
- {$EXTERNALSYM WSA_E_NO_MORE}
-
-//
-// MessageId: WSA_E_CANCELLED
-//
-// MessageText:
-//
-// A call to WSALookupServiceEnd was made while this call was still processing. The call has been canceled.
-//
- WSA_E_CANCELLED = DWORD(10111);
- {$EXTERNALSYM WSA_E_CANCELLED}
-
-//
-// MessageId: WSAEREFUSED
-//
-// MessageText:
-//
-// A database query failed because it was actively refused.
-//
- WSAEREFUSED = DWORD(10112);
- {$EXTERNALSYM WSAEREFUSED}
-
-//
-// MessageId: WSAHOST_NOT_FOUND
-//
-// MessageText:
-//
-// No such host is known.
-//
- WSAHOST_NOT_FOUND = DWORD(11001);
- {$EXTERNALSYM WSAHOST_NOT_FOUND}
-
-//
-// MessageId: WSATRY_AGAIN
-//
-// MessageText:
-//
-// This is usually a temporary error during hostname resolution and means that the local server did not receive a response from an authoritative server.
-//
- WSATRY_AGAIN = DWORD(11002);
- {$EXTERNALSYM WSATRY_AGAIN}
-
-//
-// MessageId: WSANO_RECOVERY
-//
-// MessageText:
-//
-// A non-recoverable error occurred during a database lookup.
-//
- WSANO_RECOVERY = DWORD(11003);
- {$EXTERNALSYM WSANO_RECOVERY}
-
-//
-// MessageId: WSANO_DATA
-//
-// MessageText:
-//
-// The requested name is valid, but no data of the requested type was found.
-//
- WSANO_DATA = DWORD(11004);
- {$EXTERNALSYM WSANO_DATA}
-
-//
-// MessageId: WSA_QOS_RECEIVERS
-//
-// MessageText:
-//
-// At least one reserve has arrived.
-//
- WSA_QOS_RECEIVERS = DWORD(11005);
- {$EXTERNALSYM WSA_QOS_RECEIVERS}
-
-//
-// MessageId: WSA_QOS_SENDERS
-//
-// MessageText:
-//
-// At least one path has arrived.
-//
- WSA_QOS_SENDERS = DWORD(11006);
- {$EXTERNALSYM WSA_QOS_SENDERS}
-
-//
-// MessageId: WSA_QOS_NO_SENDERS
-//
-// MessageText:
-//
-// There are no senders.
-//
- WSA_QOS_NO_SENDERS = DWORD(11007);
- {$EXTERNALSYM WSA_QOS_NO_SENDERS}
-
-//
-// MessageId: WSA_QOS_NO_RECEIVERS
-//
-// MessageText:
-//
-// There are no receivers.
-//
- WSA_QOS_NO_RECEIVERS = DWORD(11008);
- {$EXTERNALSYM WSA_QOS_NO_RECEIVERS}
-
-//
-// MessageId: WSA_QOS_REQUEST_CONFIRMED
-//
-// MessageText:
-//
-// Reserve has been confirmed.
-//
- WSA_QOS_REQUEST_CONFIRMED = DWORD(11009);
- {$EXTERNALSYM WSA_QOS_REQUEST_CONFIRMED}
-
-//
-// MessageId: WSA_QOS_ADMISSION_FAILURE
-//
-// MessageText:
-//
-// Error due to lack of resources.
-//
- WSA_QOS_ADMISSION_FAILURE = DWORD(11010);
- {$EXTERNALSYM WSA_QOS_ADMISSION_FAILURE}
-
-//
-// MessageId: WSA_QOS_POLICY_FAILURE
-//
-// MessageText:
-//
-// Rejected for administrative reasons - bad credentials.
-//
- WSA_QOS_POLICY_FAILURE = DWORD(11011);
- {$EXTERNALSYM WSA_QOS_POLICY_FAILURE}
-
-//
-// MessageId: WSA_QOS_BAD_STYLE
-//
-// MessageText:
-//
-// Unknown or conflicting style.
-//
- WSA_QOS_BAD_STYLE = DWORD(11012);
- {$EXTERNALSYM WSA_QOS_BAD_STYLE}
-
-//
-// MessageId: WSA_QOS_BAD_OBJECT
-//
-// MessageText:
-//
-// Problem with some part of the filterspec or providerspecific buffer in general.
-//
- WSA_QOS_BAD_OBJECT = DWORD(11013);
- {$EXTERNALSYM WSA_QOS_BAD_OBJECT}
-
-//
-// MessageId: WSA_QOS_TRAFFIC_CTRL_ERROR
-//
-// MessageText:
-//
-// Problem with some part of the flowspec.
-//
- WSA_QOS_TRAFFIC_CTRL_ERROR = DWORD(11014);
- {$EXTERNALSYM WSA_QOS_TRAFFIC_CTRL_ERROR}
-
-//
-// MessageId: WSA_QOS_GENERIC_ERROR
-//
-// MessageText:
-//
-// General QOS error.
-//
- WSA_QOS_GENERIC_ERROR = DWORD(11015);
- {$EXTERNALSYM WSA_QOS_GENERIC_ERROR}
-
-//
-// MessageId: WSA_QOS_ESERVICETYPE
-//
-// MessageText:
-//
-// An invalid or unrecognized service type was found in the flowspec.
-//
- WSA_QOS_ESERVICETYPE = DWORD(11016);
- {$EXTERNALSYM WSA_QOS_ESERVICETYPE}
-
-//
-// MessageId: WSA_QOS_EFLOWSPEC
-//
-// MessageText:
-//
-// An invalid or inconsistent flowspec was found in the QOS structure.
-//
- WSA_QOS_EFLOWSPEC = DWORD(11017);
- {$EXTERNALSYM WSA_QOS_EFLOWSPEC}
-
-//
-// MessageId: WSA_QOS_EPROVSPECBUF
-//
-// MessageText:
-//
-// Invalid QOS provider-specific buffer.
-//
- WSA_QOS_EPROVSPECBUF = DWORD(11018);
- {$EXTERNALSYM WSA_QOS_EPROVSPECBUF}
-
-//
-// MessageId: WSA_QOS_EFILTERSTYLE
-//
-// MessageText:
-//
-// An invalid QOS filter style was used.
-//
- WSA_QOS_EFILTERSTYLE = DWORD(11019);
- {$EXTERNALSYM WSA_QOS_EFILTERSTYLE}
-
-//
-// MessageId: WSA_QOS_EFILTERTYPE
-//
-// MessageText:
-//
-// An invalid QOS filter type was used.
-//
- WSA_QOS_EFILTERTYPE = DWORD(11020);
- {$EXTERNALSYM WSA_QOS_EFILTERTYPE}
-
-//
-// MessageId: WSA_QOS_EFILTERCOUNT
-//
-// MessageText:
-//
-// An incorrect number of QOS FILTERSPECs were specified in the FLOWDESCRIPTOR.
-//
- WSA_QOS_EFILTERCOUNT = DWORD(11021);
- {$EXTERNALSYM WSA_QOS_EFILTERCOUNT}
-
-//
-// MessageId: WSA_QOS_EOBJLENGTH
-//
-// MessageText:
-//
-// An object with an invalid ObjectLength field was specified in the QOS provider-specific buffer.
-//
- WSA_QOS_EOBJLENGTH = DWORD(11022);
- {$EXTERNALSYM WSA_QOS_EOBJLENGTH}
-
-//
-// MessageId: WSA_QOS_EFLOWCOUNT
-//
-// MessageText:
-//
-// An incorrect number of flow descriptors was specified in the QOS structure.
-//
- WSA_QOS_EFLOWCOUNT = DWORD(11023);
- {$EXTERNALSYM WSA_QOS_EFLOWCOUNT}
-
-//
-// MessageId: WSA_QOS_EUNKOWNPSOBJ
-//
-// MessageText:
-//
-// An unrecognized object was found in the QOS provider-specific buffer.
-//
- WSA_QOS_EUNKOWNPSOBJ = DWORD(11024);
- {$EXTERNALSYM WSA_QOS_EUNKOWNPSOBJ}
-
-//
-// MessageId: WSA_QOS_EPOLICYOBJ
-//
-// MessageText:
-//
-// An invalid policy object was found in the QOS provider-specific buffer.
-//
- WSA_QOS_EPOLICYOBJ = DWORD(11025);
- {$EXTERNALSYM WSA_QOS_EPOLICYOBJ}
-
-//
-// MessageId: WSA_QOS_EFLOWDESC
-//
-// MessageText:
-//
-// An invalid QOS flow descriptor was found in the flow descriptor list.
-//
- WSA_QOS_EFLOWDESC = DWORD(11026);
- {$EXTERNALSYM WSA_QOS_EFLOWDESC}
-
-//
-// MessageId: WSA_QOS_EPSFLOWSPEC
-//
-// MessageText:
-//
-// An invalid or inconsistent flowspec was found in the QOS provider specific buffer.
-//
- WSA_QOS_EPSFLOWSPEC = DWORD(11027);
- {$EXTERNALSYM WSA_QOS_EPSFLOWSPEC}
-
-//
-// MessageId: WSA_QOS_EPSFILTERSPEC
-//
-// MessageText:
-//
-// An invalid FILTERSPEC was found in the QOS provider-specific buffer.
-//
- WSA_QOS_EPSFILTERSPEC = DWORD(11028);
- {$EXTERNALSYM WSA_QOS_EPSFILTERSPEC}
-
-//
-// MessageId: WSA_QOS_ESDMODEOBJ
-//
-// MessageText:
-//
-// An invalid shape discard mode object was found in the QOS provider specific buffer.
-//
- WSA_QOS_ESDMODEOBJ = DWORD(11029);
- {$EXTERNALSYM WSA_QOS_ESDMODEOBJ}
-
-//
-// MessageId: WSA_QOS_ESHAPERATEOBJ
-//
-// MessageText:
-//
-// An invalid shaping rate object was found in the QOS provider-specific buffer.
-//
- WSA_QOS_ESHAPERATEOBJ = DWORD(11030);
- {$EXTERNALSYM WSA_QOS_ESHAPERATEOBJ}
-
-//
-// MessageId: WSA_QOS_RESERVED_PETYPE
-//
-// MessageText:
-//
-// A reserved policy element was found in the QOS provider-specific buffer.
-//
- WSA_QOS_RESERVED_PETYPE = DWORD(11031);
- {$EXTERNALSYM WSA_QOS_RESERVED_PETYPE}
-
-///////////////////////////////////////////////////
-// //
-// End of WinSock Error Codes //
-// //
-// 10000 to 11999 //
-///////////////////////////////////////////////////
-
-
-///////////////////////////////////////////////////
-// //
-// Side By Side Error Codes //
-// //
-// 14000 to 14999 //
-///////////////////////////////////////////////////
-
-//
-// MessageId: ERROR_SXS_SECTION_NOT_FOUND
-//
-// MessageText:
-//
-// The requested section was not present in the activation context.
-//
- ERROR_SXS_SECTION_NOT_FOUND = DWORD(14000);
- {$EXTERNALSYM ERROR_SXS_SECTION_NOT_FOUND}
-
-//
-// MessageId: ERROR_SXS_CANT_GEN_ACTCTX
-//
-// MessageText:
-//
-// This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem.
-//
- ERROR_SXS_CANT_GEN_ACTCTX = DWORD(14001);
- {$EXTERNALSYM ERROR_SXS_CANT_GEN_ACTCTX}
-
-//
-// MessageId: ERROR_SXS_INVALID_ACTCTXDATA_FORMAT
-//
-// MessageText:
-//
-// The application binding data format is invalid.
-//
- ERROR_SXS_INVALID_ACTCTXDATA_FORMAT = DWORD(14002);
- {$EXTERNALSYM ERROR_SXS_INVALID_ACTCTXDATA_FORMAT}
-
-//
-// MessageId: ERROR_SXS_ASSEMBLY_NOT_FOUND
-//
-// MessageText:
-//
-// The referenced assembly is not installed on your system.
-//
- ERROR_SXS_ASSEMBLY_NOT_FOUND = DWORD(14003);
- {$EXTERNALSYM ERROR_SXS_ASSEMBLY_NOT_FOUND}
-
-//
-// MessageId: ERROR_SXS_MANIFEST_FORMAT_ERROR
-//
-// MessageText:
-//
-// The manifest file does not begin with the required tag and format information.
-//
- ERROR_SXS_MANIFEST_FORMAT_ERROR = DWORD(14004);
- {$EXTERNALSYM ERROR_SXS_MANIFEST_FORMAT_ERROR}
-
-//
-// MessageId: ERROR_SXS_MANIFEST_PARSE_ERROR
-//
-// MessageText:
-//
-// The manifest file contains one or more syntax errors.
-//
- ERROR_SXS_MANIFEST_PARSE_ERROR = DWORD(14005);
- {$EXTERNALSYM ERROR_SXS_MANIFEST_PARSE_ERROR}
-
-//
-// MessageId: ERROR_SXS_ACTIVATION_CONTEXT_DISABLED
-//
-// MessageText:
-//
-// The application attempted to activate a disabled activation context.
-//
- ERROR_SXS_ACTIVATION_CONTEXT_DISABLED = DWORD(14006);
- {$EXTERNALSYM ERROR_SXS_ACTIVATION_CONTEXT_DISABLED}
-
-//
-// MessageId: ERROR_SXS_KEY_NOT_FOUND
-//
-// MessageText:
-//
-// The requested lookup key was not found in any active activation context.
-//
- ERROR_SXS_KEY_NOT_FOUND = DWORD(14007);
- {$EXTERNALSYM ERROR_SXS_KEY_NOT_FOUND}
-
-//
-// MessageId: ERROR_SXS_VERSION_CONFLICT
-//
-// MessageText:
-//
-// A component version required by the application conflicts with another component version already active.
-//
- ERROR_SXS_VERSION_CONFLICT = DWORD(14008);
- {$EXTERNALSYM ERROR_SXS_VERSION_CONFLICT}
-
-//
-// MessageId: ERROR_SXS_WRONG_SECTION_TYPE
-//
-// MessageText:
-//
-// The type requested activation context section does not match the query API used.
-//
- ERROR_SXS_WRONG_SECTION_TYPE = DWORD(14009);
- {$EXTERNALSYM ERROR_SXS_WRONG_SECTION_TYPE}
-
-//
-// MessageId: ERROR_SXS_THREAD_QUERIES_DISABLED
-//
-// MessageText:
-//
-// Lack of system resources has required isolated activation to be disabled for the current thread of execution.
-//
- ERROR_SXS_THREAD_QUERIES_DISABLED = DWORD(14010);
- {$EXTERNALSYM ERROR_SXS_THREAD_QUERIES_DISABLED}
-
-//
-// MessageId: ERROR_SXS_PROCESS_DEFAULT_ALREADY_SET
-//
-// MessageText:
-//
-// An attempt to set the process default activation context failed because the process default activation context was already set.
-//
- ERROR_SXS_PROCESS_DEFAULT_ALREADY_SET = DWORD(14011);
- {$EXTERNALSYM ERROR_SXS_PROCESS_DEFAULT_ALREADY_SET}
-
-//
-// MessageId: ERROR_SXS_UNKNOWN_ENCODING_GROUP
-//
-// MessageText:
-//
-// The encoding group identifier specified is not recognized.
-//
- ERROR_SXS_UNKNOWN_ENCODING_GROUP = DWORD(14012);
- {$EXTERNALSYM ERROR_SXS_UNKNOWN_ENCODING_GROUP}
-
-//
-// MessageId: ERROR_SXS_UNKNOWN_ENCODING
-//
-// MessageText:
-//
-// The encoding requested is not recognized.
-//
- ERROR_SXS_UNKNOWN_ENCODING = DWORD(14013);
- {$EXTERNALSYM ERROR_SXS_UNKNOWN_ENCODING}
-
-//
-// MessageId: ERROR_SXS_INVALID_XML_NAMESPACE_URI
-//
-// MessageText:
-//
-// The manifest contains a reference to an invalid URI.
-//
- ERROR_SXS_INVALID_XML_NAMESPACE_URI = DWORD(14014);
- {$EXTERNALSYM ERROR_SXS_INVALID_XML_NAMESPACE_URI}
-
-//
-// MessageId: ERROR_SXS_ROOT_MANIFEST_DEPENDENCY_NOT_INSTALLED
-//
-// MessageText:
-//
-// The application manifest contains a reference to a dependent assembly which is not installed
-//
- ERROR_SXS_ROOT_MANIFEST_DEPENDENCY_NOT_INSTALLED = DWORD(14015);
- {$EXTERNALSYM ERROR_SXS_ROOT_MANIFEST_DEPENDENCY_NOT_INSTALLED}
-
-//
-// MessageId: ERROR_SXS_LEAF_MANIFEST_DEPENDENCY_NOT_INSTALLED
-//
-// MessageText:
-//
-// The manifest for an assembly used by the application has a reference to a dependent assembly which is not installed
-//
- ERROR_SXS_LEAF_MANIFEST_DEPENDENCY_NOT_INSTALLED = DWORD(14016);
- {$EXTERNALSYM ERROR_SXS_LEAF_MANIFEST_DEPENDENCY_NOT_INSTALLED}
-
-//
-// MessageId: ERROR_SXS_INVALID_ASSEMBLY_IDENTITY_ATTRIBUTE
-//
-// MessageText:
-//
-// The manifest contains an attribute for the assembly identity which is not valid.
-//
- ERROR_SXS_INVALID_ASSEMBLY_IDENTITY_ATTRIBUTE = DWORD(14017);
- {$EXTERNALSYM ERROR_SXS_INVALID_ASSEMBLY_IDENTITY_ATTRIBUTE}
-
-//
-// MessageId: ERROR_SXS_MANIFEST_MISSING_REQUIRED_DEFAULT_NAMESPACE
-//
-// MessageText:
-//
-// The manifest is missing the required default namespace specification on the assembly element.
-//
- ERROR_SXS_MANIFEST_MISSING_REQUIRED_DEFAULT_NAMESPACE = DWORD(14018);
- {$EXTERNALSYM ERROR_SXS_MANIFEST_MISSING_REQUIRED_DEFAULT_NAMESPACE}
-
-//
-// MessageId: ERROR_SXS_MANIFEST_INVALID_REQUIRED_DEFAULT_NAMESPACE
-//
-// MessageText:
-//
-// The manifest has a default namespace specified on the assembly element but its value is not "urn:schemas-microsoft-com:asm.v1".
-//
- ERROR_SXS_MANIFEST_INVALID_REQUIRED_DEFAULT_NAMESPACE = DWORD(14019);
- {$EXTERNALSYM ERROR_SXS_MANIFEST_INVALID_REQUIRED_DEFAULT_NAMESPACE}
-
-//
-// MessageId: ERROR_SXS_PRIVATE_MANIFEST_CROSS_PATH_WITH_REPARSE_POINT
-//
-// MessageText:
-//
-// The private manifest probed has crossed reparse-point-associated path
-//
- ERROR_SXS_PRIVATE_MANIFEST_CROSS_PATH_WITH_REPARSE_POINT = DWORD(14020);
- {$EXTERNALSYM ERROR_SXS_PRIVATE_MANIFEST_CROSS_PATH_WITH_REPARSE_POINT}
-
-//
-// MessageId: ERROR_SXS_DUPLICATE_DLL_NAME
-//
-// MessageText:
-//
-// Two or more components referenced directly or indirectly by the application manifest have files by the same name.
-//
- ERROR_SXS_DUPLICATE_DLL_NAME = DWORD(14021);
- {$EXTERNALSYM ERROR_SXS_DUPLICATE_DLL_NAME}
-
-//
-// MessageId: ERROR_SXS_DUPLICATE_WINDOWCLASS_NAME
-//
-// MessageText:
-//
-// Two or more components referenced directly or indirectly by the application manifest have window classes with the same name.
-//
- ERROR_SXS_DUPLICATE_WINDOWCLASS_NAME = DWORD(14022);
- {$EXTERNALSYM ERROR_SXS_DUPLICATE_WINDOWCLASS_NAME}
-
-//
-// MessageId: ERROR_SXS_DUPLICATE_CLSID
-//
-// MessageText:
-//
-// Two or more components referenced directly or indirectly by the application manifest have the same COM server CLSIDs.
-//
- ERROR_SXS_DUPLICATE_CLSID = DWORD(14023);
- {$EXTERNALSYM ERROR_SXS_DUPLICATE_CLSID}
-
-//
-// MessageId: ERROR_SXS_DUPLICATE_IID
-//
-// MessageText:
-//
-// Two or more components referenced directly or indirectly by the application manifest have proxies for the same COM interface IIDs.
-//
- ERROR_SXS_DUPLICATE_IID = DWORD(14024);
- {$EXTERNALSYM ERROR_SXS_DUPLICATE_IID}
-
-//
-// MessageId: ERROR_SXS_DUPLICATE_TLBID
-//
-// MessageText:
-//
-// Two or more components referenced directly or indirectly by the application manifest have the same COM type library TLBIDs.
-//
- ERROR_SXS_DUPLICATE_TLBID = DWORD(14025);
- {$EXTERNALSYM ERROR_SXS_DUPLICATE_TLBID}
-
-//
-// MessageId: ERROR_SXS_DUPLICATE_PROGID
-//
-// MessageText:
-//
-// Two or more components referenced directly or indirectly by the application manifest have the same COM ProgIDs.
-//
- ERROR_SXS_DUPLICATE_PROGID = DWORD(14026);
- {$EXTERNALSYM ERROR_SXS_DUPLICATE_PROGID}
-
-//
-// MessageId: ERROR_SXS_DUPLICATE_ASSEMBLY_NAME
-//
-// MessageText:
-//
-// Two or more components referenced directly or indirectly by the application manifest are different versions of the same component which is not permitted.
-//
- ERROR_SXS_DUPLICATE_ASSEMBLY_NAME = DWORD(14027);
- {$EXTERNALSYM ERROR_SXS_DUPLICATE_ASSEMBLY_NAME}
-
-//
-// MessageId: ERROR_SXS_FILE_HASH_MISMATCH
-//
-// MessageText:
-//
-// A component's file does not match the verification information present in the
-// component manifest.
-//
- ERROR_SXS_FILE_HASH_MISMATCH = DWORD(14028);
- {$EXTERNALSYM ERROR_SXS_FILE_HASH_MISMATCH}
-
-//
-// MessageId: ERROR_SXS_POLICY_PARSE_ERROR
-//
-// MessageText:
-//
-// The policy manifest contains one or more syntax errors.
-//
- ERROR_SXS_POLICY_PARSE_ERROR = DWORD(14029);
- {$EXTERNALSYM ERROR_SXS_POLICY_PARSE_ERROR}
-
-//
-// MessageId: ERROR_SXS_XML_E_MISSINGQUOTE
-//
-// MessageText:
-//
-// Manifest Parse Error : A string literal was expected, but no opening quote character was found.
-//
- ERROR_SXS_XML_E_MISSINGQUOTE = DWORD(14030);
- {$EXTERNALSYM ERROR_SXS_XML_E_MISSINGQUOTE}
-
-//
-// MessageId: ERROR_SXS_XML_E_COMMENTSYNTAX
-//
-// MessageText:
-//
-// Manifest Parse Error : Incorrect syntax was used in a comment.
-//
- ERROR_SXS_XML_E_COMMENTSYNTAX = DWORD(14031);
- {$EXTERNALSYM ERROR_SXS_XML_E_COMMENTSYNTAX}
-
-//
-// MessageId: ERROR_SXS_XML_E_BADSTARTNAMECHAR
-//
-// MessageText:
-//
-// Manifest Parse Error : A name was started with an invalid character.
-//
- ERROR_SXS_XML_E_BADSTARTNAMECHAR = DWORD(14032);
- {$EXTERNALSYM ERROR_SXS_XML_E_BADSTARTNAMECHAR}
-
-//
-// MessageId: ERROR_SXS_XML_E_BADNAMECHAR
-//
-// MessageText:
-//
-// Manifest Parse Error : A name contained an invalid character.
-//
- ERROR_SXS_XML_E_BADNAMECHAR = DWORD(14033);
- {$EXTERNALSYM ERROR_SXS_XML_E_BADNAMECHAR}
-
-//
-// MessageId: ERROR_SXS_XML_E_BADCHARINSTRING
-//
-// MessageText:
-//
-// Manifest Parse Error : A string literal contained an invalid character.
-//
- ERROR_SXS_XML_E_BADCHARINSTRING = DWORD(14034);
- {$EXTERNALSYM ERROR_SXS_XML_E_BADCHARINSTRING}
-
-//
-// MessageId: ERROR_SXS_XML_E_XMLDECLSYNTAX
-//
-// MessageText:
-//
-// Manifest Parse Error : Invalid syntax for an xml declaration.
-//
- ERROR_SXS_XML_E_XMLDECLSYNTAX = DWORD(14035);
- {$EXTERNALSYM ERROR_SXS_XML_E_XMLDECLSYNTAX}
-
-//
-// MessageId: ERROR_SXS_XML_E_BADCHARDATA
-//
-// MessageText:
-//
-// Manifest Parse Error : An Invalid character was found in text content.
-//
- ERROR_SXS_XML_E_BADCHARDATA = DWORD(14036);
- {$EXTERNALSYM ERROR_SXS_XML_E_BADCHARDATA}
-
-//
-// MessageId: ERROR_SXS_XML_E_MISSINGWHITESPACE
-//
-// MessageText:
-//
-// Manifest Parse Error : Required white space was missing.
-//
- ERROR_SXS_XML_E_MISSINGWHITESPACE = DWORD(14037);
- {$EXTERNALSYM ERROR_SXS_XML_E_MISSINGWHITESPACE}
-
-//
-// MessageId: ERROR_SXS_XML_E_EXPECTINGTAGEND
-//
-// MessageText:
-//
-// Manifest Parse Error : The character '>' was expected.
-//
- ERROR_SXS_XML_E_EXPECTINGTAGEND = DWORD(14038);
- {$EXTERNALSYM ERROR_SXS_XML_E_EXPECTINGTAGEND}
-
-//
-// MessageId: ERROR_SXS_XML_E_MISSINGSEMICOLON
-//
-// MessageText:
-//
-// Manifest Parse Error : A semi colon character was expected.
-//
- ERROR_SXS_XML_E_MISSINGSEMICOLON = DWORD(14039);
- {$EXTERNALSYM ERROR_SXS_XML_E_MISSINGSEMICOLON}
-
-//
-// MessageId: ERROR_SXS_XML_E_UNBALANCEDPAREN
-//
-// MessageText:
-//
-// Manifest Parse Error : Unbalanced parentheses.
-//
- ERROR_SXS_XML_E_UNBALANCEDPAREN = DWORD(14040);
- {$EXTERNALSYM ERROR_SXS_XML_E_UNBALANCEDPAREN}
-
-//
-// MessageId: ERROR_SXS_XML_E_INTERNALERROR
-//
-// MessageText:
-//
-// Manifest Parse Error : Internal error.
-//
- ERROR_SXS_XML_E_INTERNALERROR = DWORD(14041);
- {$EXTERNALSYM ERROR_SXS_XML_E_INTERNALERROR}
-
-//
-// MessageId: ERROR_SXS_XML_E_UNEXPECTED_WHITESPACE
-//
-// MessageText:
-//
-// Manifest Parse Error : Whitespace is not allowed at this location.
-//
- ERROR_SXS_XML_E_UNEXPECTED_WHITESPACE = DWORD(14042);
- {$EXTERNALSYM ERROR_SXS_XML_E_UNEXPECTED_WHITESPACE}
-
-//
-// MessageId: ERROR_SXS_XML_E_INCOMPLETE_ENCODING
-//
-// MessageText:
-//
-// Manifest Parse Error : End of file reached in invalid state for current encoding.
-//
- ERROR_SXS_XML_E_INCOMPLETE_ENCODING = DWORD(14043);
- {$EXTERNALSYM ERROR_SXS_XML_E_INCOMPLETE_ENCODING}
-
-//
-// MessageId: ERROR_SXS_XML_E_MISSING_PAREN
-//
-// MessageText:
-//
-// Manifest Parse Error : Missing parenthesis.
-//
- ERROR_SXS_XML_E_MISSING_PAREN = DWORD(14044);
- {$EXTERNALSYM ERROR_SXS_XML_E_MISSING_PAREN}
-
-//
-// MessageId: ERROR_SXS_XML_E_EXPECTINGCLOSEQUOTE
-//
-// MessageText:
-//
-// Manifest Parse Error : A single or double closing quote character (\' or \") is missing.
-//
- ERROR_SXS_XML_E_EXPECTINGCLOSEQUOTE = DWORD(14045);
- {$EXTERNALSYM ERROR_SXS_XML_E_EXPECTINGCLOSEQUOTE}
-
-//
-// MessageId: ERROR_SXS_XML_E_MULTIPLE_COLONS
-//
-// MessageText:
-//
-// Manifest Parse Error : Multiple colons are not allowed in a name.
-//
- ERROR_SXS_XML_E_MULTIPLE_COLONS = DWORD(14046);
- {$EXTERNALSYM ERROR_SXS_XML_E_MULTIPLE_COLONS}
-
-//
-// MessageId: ERROR_SXS_XML_E_INVALID_DECIMAL
-//
-// MessageText:
-//
-// Manifest Parse Error : Invalid character for decimal digit.
-//
- ERROR_SXS_XML_E_INVALID_DECIMAL = DWORD(14047);
- {$EXTERNALSYM ERROR_SXS_XML_E_INVALID_DECIMAL}
-
-//
-// MessageId: ERROR_SXS_XML_E_INVALID_HEXIDECIMAL
-//
-// MessageText:
-//
-// Manifest Parse Error : Invalid character for hexidecimal digit.
-//
- ERROR_SXS_XML_E_INVALID_HEXIDECIMAL = DWORD(14048);
- {$EXTERNALSYM ERROR_SXS_XML_E_INVALID_HEXIDECIMAL}
-
-//
-// MessageId: ERROR_SXS_XML_E_INVALID_UNICODE
-//
-// MessageText:
-//
-// Manifest Parse Error : Invalid unicode character value for this platform.
-//
- ERROR_SXS_XML_E_INVALID_UNICODE = DWORD(14049);
- {$EXTERNALSYM ERROR_SXS_XML_E_INVALID_UNICODE}
-
-//
-// MessageId: ERROR_SXS_XML_E_WHITESPACEORQUESTIONMARK
-//
-// MessageText:
-//
-// Manifest Parse Error : Expecting whitespace or '?'.
-//
- ERROR_SXS_XML_E_WHITESPACEORQUESTIONMARK = DWORD(14050);
- {$EXTERNALSYM ERROR_SXS_XML_E_WHITESPACEORQUESTIONMARK}
-
-//
-// MessageId: ERROR_SXS_XML_E_UNEXPECTEDENDTAG
-//
-// MessageText:
-//
-// Manifest Parse Error : End tag was not expected at this location.
-//
- ERROR_SXS_XML_E_UNEXPECTEDENDTAG = DWORD(14051);
- {$EXTERNALSYM ERROR_SXS_XML_E_UNEXPECTEDENDTAG}
-
-//
-// MessageId: ERROR_SXS_XML_E_UNCLOSEDTAG
-//
-// MessageText:
-//
-// Manifest Parse Error : The following tags were not closed: %1.
-//
- ERROR_SXS_XML_E_UNCLOSEDTAG = DWORD(14052);
- {$EXTERNALSYM ERROR_SXS_XML_E_UNCLOSEDTAG}
-
-//
-// MessageId: ERROR_SXS_XML_E_DUPLICATEATTRIBUTE
-//
-// MessageText:
-//
-// Manifest Parse Error : Duplicate attribute.
-//
- ERROR_SXS_XML_E_DUPLICATEATTRIBUTE = DWORD(14053);
- {$EXTERNALSYM ERROR_SXS_XML_E_DUPLICATEATTRIBUTE}
-
-//
-// MessageId: ERROR_SXS_XML_E_MULTIPLEROOTS
-//
-// MessageText:
-//
-// Manifest Parse Error : Only one top level element is allowed in an XML document.
-//
- ERROR_SXS_XML_E_MULTIPLEROOTS = DWORD(14054);
- {$EXTERNALSYM ERROR_SXS_XML_E_MULTIPLEROOTS}
-
-//
-// MessageId: ERROR_SXS_XML_E_INVALIDATROOTLEVEL
-//
-// MessageText:
-//
-// Manifest Parse Error : Invalid at the top level of the document.
-//
- ERROR_SXS_XML_E_INVALIDATROOTLEVEL = DWORD(14055);
- {$EXTERNALSYM ERROR_SXS_XML_E_INVALIDATROOTLEVEL}
-
-//
-// MessageId: ERROR_SXS_XML_E_BADXMLDECL
-//
-// MessageText:
-//
-// Manifest Parse Error : Invalid xml declaration.
-//
- ERROR_SXS_XML_E_BADXMLDECL = DWORD(14056);
- {$EXTERNALSYM ERROR_SXS_XML_E_BADXMLDECL}
-
-//
-// MessageId: ERROR_SXS_XML_E_MISSINGROOT
-//
-// MessageText:
-//
-// Manifest Parse Error : XML document must have a top level element.
-//
- ERROR_SXS_XML_E_MISSINGROOT = DWORD(14057);
- {$EXTERNALSYM ERROR_SXS_XML_E_MISSINGROOT}
-
-//
-// MessageId: ERROR_SXS_XML_E_UNEXPECTEDEOF
-//
-// MessageText:
-//
-// Manifest Parse Error : Unexpected end of file.
-//
- ERROR_SXS_XML_E_UNEXPECTEDEOF = DWORD(14058);
- {$EXTERNALSYM ERROR_SXS_XML_E_UNEXPECTEDEOF}
-
-//
-// MessageId: ERROR_SXS_XML_E_BADPEREFINSUBSET
-//
-// MessageText:
-//
-// Manifest Parse Error : Parameter entities cannot be used inside markup declarations in an internal subset.
-//
- ERROR_SXS_XML_E_BADPEREFINSUBSET = DWORD(14059);
- {$EXTERNALSYM ERROR_SXS_XML_E_BADPEREFINSUBSET}
-
-//
-// MessageId: ERROR_SXS_XML_E_UNCLOSEDSTARTTAG
-//
-// MessageText:
-//
-// Manifest Parse Error : Element was not closed.
-//
- ERROR_SXS_XML_E_UNCLOSEDSTARTTAG = DWORD(14060);
- {$EXTERNALSYM ERROR_SXS_XML_E_UNCLOSEDSTARTTAG}
-
-//
-// MessageId: ERROR_SXS_XML_E_UNCLOSEDENDTAG
-//
-// MessageText:
-//
-// Manifest Parse Error : End element was missing the character '>'.
-//
- ERROR_SXS_XML_E_UNCLOSEDENDTAG = DWORD(14061);
- {$EXTERNALSYM ERROR_SXS_XML_E_UNCLOSEDENDTAG}
-
-//
-// MessageId: ERROR_SXS_XML_E_UNCLOSEDSTRING
-//
-// MessageText:
-//
-// Manifest Parse Error : A string literal was not closed.
-//
- ERROR_SXS_XML_E_UNCLOSEDSTRING = DWORD(14062);
- {$EXTERNALSYM ERROR_SXS_XML_E_UNCLOSEDSTRING}
-
-//
-// MessageId: ERROR_SXS_XML_E_UNCLOSEDCOMMENT
-//
-// MessageText:
-//
-// Manifest Parse Error : A comment was not closed.
-//
- ERROR_SXS_XML_E_UNCLOSEDCOMMENT = DWORD(14063);
- {$EXTERNALSYM ERROR_SXS_XML_E_UNCLOSEDCOMMENT}
-
-//
-// MessageId: ERROR_SXS_XML_E_UNCLOSEDDECL
-//
-// MessageText:
-//
-// Manifest Parse Error : A declaration was not closed.
-//
- ERROR_SXS_XML_E_UNCLOSEDDECL = DWORD(14064);
- {$EXTERNALSYM ERROR_SXS_XML_E_UNCLOSEDDECL}
-
-//
-// MessageId: ERROR_SXS_XML_E_UNCLOSEDCDATA
-//
-// MessageText:
-//
-// Manifest Parse Error : A CDATA section was not closed.
-//
- ERROR_SXS_XML_E_UNCLOSEDCDATA = DWORD(14065);
- {$EXTERNALSYM ERROR_SXS_XML_E_UNCLOSEDCDATA}
-
-//
-// MessageId: ERROR_SXS_XML_E_RESERVEDNAMESPACE
-//
-// MessageText:
-//
-// Manifest Parse Error : The namespace prefix is not allowed to start with the reserved string "xml".
-//
- ERROR_SXS_XML_E_RESERVEDNAMESPACE = DWORD(14066);
- {$EXTERNALSYM ERROR_SXS_XML_E_RESERVEDNAMESPACE}
-
-//
-// MessageId: ERROR_SXS_XML_E_INVALIDENCODING
-//
-// MessageText:
-//
-// Manifest Parse Error : System does not support the specified encoding.
-//
- ERROR_SXS_XML_E_INVALIDENCODING = DWORD(14067);
- {$EXTERNALSYM ERROR_SXS_XML_E_INVALIDENCODING}
-
-//
-// MessageId: ERROR_SXS_XML_E_INVALIDSWITCH
-//
-// MessageText:
-//
-// Manifest Parse Error : Switch from current encoding to specified encoding not supported.
-//
- ERROR_SXS_XML_E_INVALIDSWITCH = DWORD(14068);
- {$EXTERNALSYM ERROR_SXS_XML_E_INVALIDSWITCH}
-
-//
-// MessageId: ERROR_SXS_XML_E_BADXMLCASE
-//
-// MessageText:
-//
-// Manifest Parse Error : The name 'xml' is reserved and must be lower case.
-//
- ERROR_SXS_XML_E_BADXMLCASE = DWORD(14069);
- {$EXTERNALSYM ERROR_SXS_XML_E_BADXMLCASE}
-
-//
-// MessageId: ERROR_SXS_XML_E_INVALID_STANDALONE
-//
-// MessageText:
-//
-// Manifest Parse Error : The standalone attribute must have the value 'yes' or 'no'.
-//
- ERROR_SXS_XML_E_INVALID_STANDALONE = DWORD(14070);
- {$EXTERNALSYM ERROR_SXS_XML_E_INVALID_STANDALONE}
-
-//
-// MessageId: ERROR_SXS_XML_E_UNEXPECTED_STANDALONE
-//
-// MessageText:
-//
-// Manifest Parse Error : The standalone attribute cannot be used in external entities.
-//
- ERROR_SXS_XML_E_UNEXPECTED_STANDALONE = DWORD(14071);
- {$EXTERNALSYM ERROR_SXS_XML_E_UNEXPECTED_STANDALONE}
-
-//
-// MessageId: ERROR_SXS_XML_E_INVALID_VERSION
-//
-// MessageText:
-//
-// Manifest Parse Error : Invalid version number.
-//
- ERROR_SXS_XML_E_INVALID_VERSION = DWORD(14072);
- {$EXTERNALSYM ERROR_SXS_XML_E_INVALID_VERSION}
-
-//
-// MessageId: ERROR_SXS_XML_E_MISSINGEQUALS
-//
-// MessageText:
-//
-// Manifest Parse Error : Missing equals sign between attribute and attribute value.
-//
- ERROR_SXS_XML_E_MISSINGEQUALS = DWORD(14073);
- {$EXTERNALSYM ERROR_SXS_XML_E_MISSINGEQUALS}
-
-//
-// MessageId: ERROR_SXS_PROTECTION_RECOVERY_FAILED
-//
-// MessageText:
-//
-// Assembly Protection Error : Unable to recover the specified assembly.
-//
- ERROR_SXS_PROTECTION_RECOVERY_FAILED = DWORD(14074);
- {$EXTERNALSYM ERROR_SXS_PROTECTION_RECOVERY_FAILED}
-
-//
-// MessageId: ERROR_SXS_PROTECTION_PUBLIC_KEY_TOO_SHORT
-//
-// MessageText:
-//
-// Assembly Protection Error : The public key for an assembly was too short to be allowed.
-//
- ERROR_SXS_PROTECTION_PUBLIC_KEY_TOO_SHORT = DWORD(14075);
- {$EXTERNALSYM ERROR_SXS_PROTECTION_PUBLIC_KEY_TOO_SHORT}
-
-//
-// MessageId: ERROR_SXS_PROTECTION_CATALOG_NOT_VALID
-//
-// MessageText:
-//
-// Assembly Protection Error : The catalog for an assembly is not valid, or does not match the assembly's manifest.
-//
- ERROR_SXS_PROTECTION_CATALOG_NOT_VALID = DWORD(14076);
- {$EXTERNALSYM ERROR_SXS_PROTECTION_CATALOG_NOT_VALID}
-
-//
-// MessageId: ERROR_SXS_UNTRANSLATABLE_HRESULT
-//
-// MessageText:
-//
-// An HRESULT could not be translated to a corresponding Win32 error code.
-//
- ERROR_SXS_UNTRANSLATABLE_HRESULT = DWORD(14077);
- {$EXTERNALSYM ERROR_SXS_UNTRANSLATABLE_HRESULT}
-
-//
-// MessageId: ERROR_SXS_PROTECTION_CATALOG_FILE_MISSING
-//
-// MessageText:
-//
-// Assembly Protection Error : The catalog for an assembly is missing.
-//
- ERROR_SXS_PROTECTION_CATALOG_FILE_MISSING = DWORD(14078);
- {$EXTERNALSYM ERROR_SXS_PROTECTION_CATALOG_FILE_MISSING}
-
-//
-// MessageId: ERROR_SXS_MISSING_ASSEMBLY_IDENTITY_ATTRIBUTE
-//
-// MessageText:
-//
-// The supplied assembly identity is missing one or more attributes which must be present in this context.
-//
- ERROR_SXS_MISSING_ASSEMBLY_IDENTITY_ATTRIBUTE = DWORD(14079);
- {$EXTERNALSYM ERROR_SXS_MISSING_ASSEMBLY_IDENTITY_ATTRIBUTE}
-
-//
-// MessageId: ERROR_SXS_INVALID_ASSEMBLY_IDENTITY_ATTRIBUTE_NAME
-//
-// MessageText:
-//
-// The supplied assembly identity has one or more attribute names that contain characters not permitted in XML names.
-//
- ERROR_SXS_INVALID_ASSEMBLY_IDENTITY_ATTRIBUTE_NAME = DWORD(14080);
- {$EXTERNALSYM ERROR_SXS_INVALID_ASSEMBLY_IDENTITY_ATTRIBUTE_NAME}
-
-///////////////////////////////////////////////////
-// //
-// End of Side By Side Error Codes //
-// //
-// 14000 to 14999 //
-///////////////////////////////////////////////////
-
-
-///////////////////////////////////////////////////
-// //
-// Start of IPSec Error codes //
-// //
-// 13000 to 13999 //
-///////////////////////////////////////////////////
-
-//
-// MessageId: ERROR_IPSEC_QM_POLICY_EXISTS
-//
-// MessageText:
-//
-// The specified quick mode policy already exists.
-//
- ERROR_IPSEC_QM_POLICY_EXISTS = DWORD(13000);
- {$EXTERNALSYM ERROR_IPSEC_QM_POLICY_EXISTS}
-
-//
-// MessageId: ERROR_IPSEC_QM_POLICY_NOT_FOUND
-//
-// MessageText:
-//
-// The specified quick mode policy was not found.
-//
- ERROR_IPSEC_QM_POLICY_NOT_FOUND = DWORD(13001);
- {$EXTERNALSYM ERROR_IPSEC_QM_POLICY_NOT_FOUND}
-
-//
-// MessageId: ERROR_IPSEC_QM_POLICY_IN_USE
-//
-// MessageText:
-//
-// The specified quick mode policy is being used.
-//
- ERROR_IPSEC_QM_POLICY_IN_USE = DWORD(13002);
- {$EXTERNALSYM ERROR_IPSEC_QM_POLICY_IN_USE}
-
-//
-// MessageId: ERROR_IPSEC_MM_POLICY_EXISTS
-//
-// MessageText:
-//
-// The specified main mode policy already exists.
-//
- ERROR_IPSEC_MM_POLICY_EXISTS = DWORD(13003);
- {$EXTERNALSYM ERROR_IPSEC_MM_POLICY_EXISTS}
-
-//
-// MessageId: ERROR_IPSEC_MM_POLICY_NOT_FOUND
-//
-// MessageText:
-//
-// The specified main mode policy was not found
-//
- ERROR_IPSEC_MM_POLICY_NOT_FOUND = DWORD(13004);
- {$EXTERNALSYM ERROR_IPSEC_MM_POLICY_NOT_FOUND}
-
-//
-// MessageId: ERROR_IPSEC_MM_POLICY_IN_USE
-//
-// MessageText:
-//
-// The specified main mode policy is being used.
-//
- ERROR_IPSEC_MM_POLICY_IN_USE = DWORD(13005);
- {$EXTERNALSYM ERROR_IPSEC_MM_POLICY_IN_USE}
-
-//
-// MessageId: ERROR_IPSEC_MM_FILTER_EXISTS
-//
-// MessageText:
-//
-// The specified main mode filter already exists.
-//
- ERROR_IPSEC_MM_FILTER_EXISTS = DWORD(13006);
- {$EXTERNALSYM ERROR_IPSEC_MM_FILTER_EXISTS}
-
-//
-// MessageId: ERROR_IPSEC_MM_FILTER_NOT_FOUND
-//
-// MessageText:
-//
-// The specified main mode filter was not found.
-//
- ERROR_IPSEC_MM_FILTER_NOT_FOUND = DWORD(13007);
- {$EXTERNALSYM ERROR_IPSEC_MM_FILTER_NOT_FOUND}
-
-//
-// MessageId: ERROR_IPSEC_TRANSPORT_FILTER_EXISTS
-//
-// MessageText:
-//
-// The specified transport mode filter already exists.
-//
- ERROR_IPSEC_TRANSPORT_FILTER_EXISTS = DWORD(13008);
- {$EXTERNALSYM ERROR_IPSEC_TRANSPORT_FILTER_EXISTS}
-
-//
-// MessageId: ERROR_IPSEC_TRANSPORT_FILTER_NOT_FOUND
-//
-// MessageText:
-//
-// The specified transport mode filter does not exist.
-//
- ERROR_IPSEC_TRANSPORT_FILTER_NOT_FOUND = DWORD(13009);
- {$EXTERNALSYM ERROR_IPSEC_TRANSPORT_FILTER_NOT_FOUND}
-
-//
-// MessageId: ERROR_IPSEC_MM_AUTH_EXISTS
-//
-// MessageText:
-//
-// The specified main mode authentication list exists.
-//
- ERROR_IPSEC_MM_AUTH_EXISTS = DWORD(13010);
- {$EXTERNALSYM ERROR_IPSEC_MM_AUTH_EXISTS}
-
-//
-// MessageId: ERROR_IPSEC_MM_AUTH_NOT_FOUND
-//
-// MessageText:
-//
-// The specified main mode authentication list was not found.
-//
- ERROR_IPSEC_MM_AUTH_NOT_FOUND = DWORD(13011);
- {$EXTERNALSYM ERROR_IPSEC_MM_AUTH_NOT_FOUND}
-
-//
-// MessageId: ERROR_IPSEC_MM_AUTH_IN_USE
-//
-// MessageText:
-//
-// The specified quick mode policy is being used.
-//
- ERROR_IPSEC_MM_AUTH_IN_USE = DWORD(13012);
- {$EXTERNALSYM ERROR_IPSEC_MM_AUTH_IN_USE}
-
-//
-// MessageId: ERROR_IPSEC_DEFAULT_MM_POLICY_NOT_FOUND
-//
-// MessageText:
-//
-// The specified main mode policy was not found.
-//
- ERROR_IPSEC_DEFAULT_MM_POLICY_NOT_FOUND = DWORD(13013);
- {$EXTERNALSYM ERROR_IPSEC_DEFAULT_MM_POLICY_NOT_FOUND}
-
-//
-// MessageId: ERROR_IPSEC_DEFAULT_MM_AUTH_NOT_FOUND
-//
-// MessageText:
-//
-// The specified quick mode policy was not found
-//
- ERROR_IPSEC_DEFAULT_MM_AUTH_NOT_FOUND = DWORD(13014);
- {$EXTERNALSYM ERROR_IPSEC_DEFAULT_MM_AUTH_NOT_FOUND}
-
-//
-// MessageId: ERROR_IPSEC_DEFAULT_QM_POLICY_NOT_FOUND
-//
-// MessageText:
-//
-// The manifest file contains one or more syntax errors.
-//
- ERROR_IPSEC_DEFAULT_QM_POLICY_NOT_FOUND = DWORD(13015);
- {$EXTERNALSYM ERROR_IPSEC_DEFAULT_QM_POLICY_NOT_FOUND}
-
-//
-// MessageId: ERROR_IPSEC_TUNNEL_FILTER_EXISTS
-//
-// MessageText:
-//
-// The application attempted to activate a disabled activation context.
-//
- ERROR_IPSEC_TUNNEL_FILTER_EXISTS = DWORD(13016);
- {$EXTERNALSYM ERROR_IPSEC_TUNNEL_FILTER_EXISTS}
-
-//
-// MessageId: ERROR_IPSEC_TUNNEL_FILTER_NOT_FOUND
-//
-// MessageText:
-//
-// The requested lookup key was not found in any active activation context.
-//
- ERROR_IPSEC_TUNNEL_FILTER_NOT_FOUND = DWORD(13017);
- {$EXTERNALSYM ERROR_IPSEC_TUNNEL_FILTER_NOT_FOUND}
-
-//
-// MessageId: ERROR_IPSEC_MM_FILTER_PENDING_DELETION
-//
-// MessageText:
-//
-// The Main Mode filter is pending deletion.
-//
- ERROR_IPSEC_MM_FILTER_PENDING_DELETION = DWORD(13018);
- {$EXTERNALSYM ERROR_IPSEC_MM_FILTER_PENDING_DELETION}
-
-//
-// MessageId: ERROR_IPSEC_TRANSPORT_FILTER_PENDING_DELETION
-//
-// MessageText:
-//
-// The transport filter is pending deletion.
-//
- ERROR_IPSEC_TRANSPORT_FILTER_PENDING_DELETION = DWORD(13019);
- {$EXTERNALSYM ERROR_IPSEC_TRANSPORT_FILTER_PENDING_DELETION}
-
-//
-// MessageId: ERROR_IPSEC_TUNNEL_FILTER_PENDING_DELETION
-//
-// MessageText:
-//
-// The tunnel filter is pending deletion.
-//
- ERROR_IPSEC_TUNNEL_FILTER_PENDING_DELETION = DWORD(13020);
- {$EXTERNALSYM ERROR_IPSEC_TUNNEL_FILTER_PENDING_DELETION}
-
-//
-// MessageId: ERROR_IPSEC_MM_POLICY_PENDING_DELETION
-//
-// MessageText:
-//
-// The Main Mode policy is pending deletion.
-//
- ERROR_IPSEC_MM_POLICY_PENDING_DELETION = DWORD(13021);
- {$EXTERNALSYM ERROR_IPSEC_MM_POLICY_PENDING_DELETION}
-
-//
-// MessageId: ERROR_IPSEC_MM_AUTH_PENDING_DELETION
-//
-// MessageText:
-//
-// The Main Mode authentication bundle is pending deletion.
-//
- ERROR_IPSEC_MM_AUTH_PENDING_DELETION = DWORD(13022);
- {$EXTERNALSYM ERROR_IPSEC_MM_AUTH_PENDING_DELETION}
-
-//
-// MessageId: ERROR_IPSEC_QM_POLICY_PENDING_DELETION
-//
-// MessageText:
-//
-// The Quick Mode policy is pending deletion.
-//
- ERROR_IPSEC_QM_POLICY_PENDING_DELETION = DWORD(13023);
- {$EXTERNALSYM ERROR_IPSEC_QM_POLICY_PENDING_DELETION}
-
-//
-// MessageId: WARNING_IPSEC_MM_POLICY_PRUNED
-//
-// MessageText:
-//
-// The Main Mode policy was successfully added, but some of the requested offers are not supported.
-//
- WARNING_IPSEC_MM_POLICY_PRUNED = DWORD(13024);
- {$EXTERNALSYM WARNING_IPSEC_MM_POLICY_PRUNED}
-
-//
-// MessageId: WARNING_IPSEC_QM_POLICY_PRUNED
-//
-// MessageText:
-//
-// The Quick Mode policy was successfully added, but some of the requested offers are not supported.
-//
- WARNING_IPSEC_QM_POLICY_PRUNED = DWORD(13025);
- {$EXTERNALSYM WARNING_IPSEC_QM_POLICY_PRUNED}
-
-//
-// MessageId: ERROR_IPSEC_IKE_NEG_STATUS_BEGIN
-//
-// MessageText:
-//
-// ERROR_IPSEC_IKE_NEG_STATUS_BEGIN
-//
- ERROR_IPSEC_IKE_NEG_STATUS_BEGIN = DWORD(13800);
- {$EXTERNALSYM ERROR_IPSEC_IKE_NEG_STATUS_BEGIN}
-
-//
-// MessageId: ERROR_IPSEC_IKE_AUTH_FAIL
-//
-// MessageText:
-//
-// IKE authentication credentials are unacceptable
-//
- ERROR_IPSEC_IKE_AUTH_FAIL = DWORD(13801);
- {$EXTERNALSYM ERROR_IPSEC_IKE_AUTH_FAIL}
-
-//
-// MessageId: ERROR_IPSEC_IKE_ATTRIB_FAIL
-//
-// MessageText:
-//
-// IKE security attributes are unacceptable
-//
- ERROR_IPSEC_IKE_ATTRIB_FAIL = DWORD(13802);
- {$EXTERNALSYM ERROR_IPSEC_IKE_ATTRIB_FAIL}
-
-//
-// MessageId: ERROR_IPSEC_IKE_NEGOTIATION_PENDING
-//
-// MessageText:
-//
-// IKE Negotiation in progress
-//
- ERROR_IPSEC_IKE_NEGOTIATION_PENDING = DWORD(13803);
- {$EXTERNALSYM ERROR_IPSEC_IKE_NEGOTIATION_PENDING}
-
-//
-// MessageId: ERROR_IPSEC_IKE_GENERAL_PROCESSING_ERROR
-//
-// MessageText:
-//
-// General processing error
-//
- ERROR_IPSEC_IKE_GENERAL_PROCESSING_ERROR = DWORD(13804);
- {$EXTERNALSYM ERROR_IPSEC_IKE_GENERAL_PROCESSING_ERROR}
-
-//
-// MessageId: ERROR_IPSEC_IKE_TIMED_OUT
-//
-// MessageText:
-//
-// Negotiation timed out
-//
- ERROR_IPSEC_IKE_TIMED_OUT = DWORD(13805);
- {$EXTERNALSYM ERROR_IPSEC_IKE_TIMED_OUT}
-
-//
-// MessageId: ERROR_IPSEC_IKE_NO_CERT
-//
-// MessageText:
-//
-// IKE failed to find valid machine certificate
-//
- ERROR_IPSEC_IKE_NO_CERT = DWORD(13806);
- {$EXTERNALSYM ERROR_IPSEC_IKE_NO_CERT}
-
-//
-// MessageId: ERROR_IPSEC_IKE_SA_DELETED
-//
-// MessageText:
-//
-// IKE SA deleted by peer before establishment completed
-//
- ERROR_IPSEC_IKE_SA_DELETED = DWORD(13807);
- {$EXTERNALSYM ERROR_IPSEC_IKE_SA_DELETED}
-
-//
-// MessageId: ERROR_IPSEC_IKE_SA_REAPED
-//
-// MessageText:
-//
-// IKE SA deleted before establishment completed
-//
- ERROR_IPSEC_IKE_SA_REAPED = DWORD(13808);
- {$EXTERNALSYM ERROR_IPSEC_IKE_SA_REAPED}
-
-//
-// MessageId: ERROR_IPSEC_IKE_MM_ACQUIRE_DROP
-//
-// MessageText:
-//
-// Negotiation request sat in Queue too long
-//
- ERROR_IPSEC_IKE_MM_ACQUIRE_DROP = DWORD(13809);
- {$EXTERNALSYM ERROR_IPSEC_IKE_MM_ACQUIRE_DROP}
-
-//
-// MessageId: ERROR_IPSEC_IKE_QM_ACQUIRE_DROP
-//
-// MessageText:
-//
-// Negotiation request sat in Queue too long
-//
- ERROR_IPSEC_IKE_QM_ACQUIRE_DROP = DWORD(13810);
- {$EXTERNALSYM ERROR_IPSEC_IKE_QM_ACQUIRE_DROP}
-
-//
-// MessageId: ERROR_IPSEC_IKE_QUEUE_DROP_MM
-//
-// MessageText:
-//
-// Negotiation request sat in Queue too long
-//
- ERROR_IPSEC_IKE_QUEUE_DROP_MM = DWORD(13811);
- {$EXTERNALSYM ERROR_IPSEC_IKE_QUEUE_DROP_MM}
-
-//
-// MessageId: ERROR_IPSEC_IKE_QUEUE_DROP_NO_MM
-//
-// MessageText:
-//
-// Negotiation request sat in Queue too long
-//
- ERROR_IPSEC_IKE_QUEUE_DROP_NO_MM = DWORD(13812);
- {$EXTERNALSYM ERROR_IPSEC_IKE_QUEUE_DROP_NO_MM}
-
-//
-// MessageId: ERROR_IPSEC_IKE_DROP_NO_RESPONSE
-//
-// MessageText:
-//
-// No response from peer
-//
- ERROR_IPSEC_IKE_DROP_NO_RESPONSE = DWORD(13813);
- {$EXTERNALSYM ERROR_IPSEC_IKE_DROP_NO_RESPONSE}
-
-//
-// MessageId: ERROR_IPSEC_IKE_MM_DELAY_DROP
-//
-// MessageText:
-//
-// Negotiation took too long
-//
- ERROR_IPSEC_IKE_MM_DELAY_DROP = DWORD(13814);
- {$EXTERNALSYM ERROR_IPSEC_IKE_MM_DELAY_DROP}
-
-//
-// MessageId: ERROR_IPSEC_IKE_QM_DELAY_DROP
-//
-// MessageText:
-//
-// Negotiation took too long
-//
- ERROR_IPSEC_IKE_QM_DELAY_DROP = DWORD(13815);
- {$EXTERNALSYM ERROR_IPSEC_IKE_QM_DELAY_DROP}
-
-//
-// MessageId: ERROR_IPSEC_IKE_ERROR
-//
-// MessageText:
-//
-// Unknown error occurred
-//
- ERROR_IPSEC_IKE_ERROR = DWORD(13816);
- {$EXTERNALSYM ERROR_IPSEC_IKE_ERROR}
-
-//
-// MessageId: ERROR_IPSEC_IKE_CRL_FAILED
-//
-// MessageText:
-//
-// Certificate Revocation Check failed
-//
- ERROR_IPSEC_IKE_CRL_FAILED = DWORD(13817);
- {$EXTERNALSYM ERROR_IPSEC_IKE_CRL_FAILED}
-
-//
-// MessageId: ERROR_IPSEC_IKE_INVALID_KEY_USAGE
-//
-// MessageText:
-//
-// Invalid certificate key usage
-//
- ERROR_IPSEC_IKE_INVALID_KEY_USAGE = DWORD(13818);
- {$EXTERNALSYM ERROR_IPSEC_IKE_INVALID_KEY_USAGE}
-
-//
-// MessageId: ERROR_IPSEC_IKE_INVALID_CERT_TYPE
-//
-// MessageText:
-//
-// Invalid certificate type
-//
- ERROR_IPSEC_IKE_INVALID_CERT_TYPE = DWORD(13819);
- {$EXTERNALSYM ERROR_IPSEC_IKE_INVALID_CERT_TYPE}
-
-//
-// MessageId: ERROR_IPSEC_IKE_NO_PRIVATE_KEY
-//
-// MessageText:
-//
-// No private key associated with machine certificate
-//
- ERROR_IPSEC_IKE_NO_PRIVATE_KEY = DWORD(13820);
- {$EXTERNALSYM ERROR_IPSEC_IKE_NO_PRIVATE_KEY}
-
-//
-// MessageId: ERROR_IPSEC_IKE_DH_FAIL
-//
-// MessageText:
-//
-// Failure in Diffie-Helman computation
-//
- ERROR_IPSEC_IKE_DH_FAIL = DWORD(13822);
- {$EXTERNALSYM ERROR_IPSEC_IKE_DH_FAIL}
-
-//
-// MessageId: ERROR_IPSEC_IKE_INVALID_HEADER
-//
-// MessageText:
-//
-// Invalid header
-//
- ERROR_IPSEC_IKE_INVALID_HEADER = DWORD(13824);
- {$EXTERNALSYM ERROR_IPSEC_IKE_INVALID_HEADER}
-
-//
-// MessageId: ERROR_IPSEC_IKE_NO_POLICY
-//
-// MessageText:
-//
-// No policy configured
-//
- ERROR_IPSEC_IKE_NO_POLICY = DWORD(13825);
- {$EXTERNALSYM ERROR_IPSEC_IKE_NO_POLICY}
-
-//
-// MessageId: ERROR_IPSEC_IKE_INVALID_SIGNATURE
-//
-// MessageText:
-//
-// Failed to verify signature
-//
- ERROR_IPSEC_IKE_INVALID_SIGNATURE = DWORD(13826);
- {$EXTERNALSYM ERROR_IPSEC_IKE_INVALID_SIGNATURE}
-
-//
-// MessageId: ERROR_IPSEC_IKE_KERBEROS_ERROR
-//
-// MessageText:
-//
-// Failed to authenticate using kerberos
-//
- ERROR_IPSEC_IKE_KERBEROS_ERROR = DWORD(13827);
- {$EXTERNALSYM ERROR_IPSEC_IKE_KERBEROS_ERROR}
-
-//
-// MessageId: ERROR_IPSEC_IKE_NO_PUBLIC_KEY
-//
-// MessageText:
-//
-// Peer's certificate did not have a public key
-//
- ERROR_IPSEC_IKE_NO_PUBLIC_KEY = DWORD(13828);
- {$EXTERNALSYM ERROR_IPSEC_IKE_NO_PUBLIC_KEY}
-
-// These must stay as a unit.
-//
-// MessageId: ERROR_IPSEC_IKE_PROCESS_ERR
-//
-// MessageText:
-//
-// Error processing error payload
-//
- ERROR_IPSEC_IKE_PROCESS_ERR = DWORD(13829);
- {$EXTERNALSYM ERROR_IPSEC_IKE_PROCESS_ERR}
-
-//
-// MessageId: ERROR_IPSEC_IKE_PROCESS_ERR_SA
-//
-// MessageText:
-//
-// Error processing SA payload
-//
- ERROR_IPSEC_IKE_PROCESS_ERR_SA = DWORD(13830);
- {$EXTERNALSYM ERROR_IPSEC_IKE_PROCESS_ERR_SA}
-
-//
-// MessageId: ERROR_IPSEC_IKE_PROCESS_ERR_PROP
-//
-// MessageText:
-//
-// Error processing Proposal payload
-//
- ERROR_IPSEC_IKE_PROCESS_ERR_PROP = DWORD(13831);
- {$EXTERNALSYM ERROR_IPSEC_IKE_PROCESS_ERR_PROP}
-
-//
-// MessageId: ERROR_IPSEC_IKE_PROCESS_ERR_TRANS
-//
-// MessageText:
-//
-// Error processing Transform payload
-//
- ERROR_IPSEC_IKE_PROCESS_ERR_TRANS = DWORD(13832);
- {$EXTERNALSYM ERROR_IPSEC_IKE_PROCESS_ERR_TRANS}
-
-//
-// MessageId: ERROR_IPSEC_IKE_PROCESS_ERR_KE
-//
-// MessageText:
-//
-// Error processing KE payload
-//
- ERROR_IPSEC_IKE_PROCESS_ERR_KE = DWORD(13833);
- {$EXTERNALSYM ERROR_IPSEC_IKE_PROCESS_ERR_KE}
-
-//
-// MessageId: ERROR_IPSEC_IKE_PROCESS_ERR_ID
-//
-// MessageText:
-//
-// Error processing ID payload
-//
- ERROR_IPSEC_IKE_PROCESS_ERR_ID = DWORD(13834);
- {$EXTERNALSYM ERROR_IPSEC_IKE_PROCESS_ERR_ID}
-
-//
-// MessageId: ERROR_IPSEC_IKE_PROCESS_ERR_CERT
-//
-// MessageText:
-//
-// Error processing Cert payload
-//
- ERROR_IPSEC_IKE_PROCESS_ERR_CERT = DWORD(13835);
- {$EXTERNALSYM ERROR_IPSEC_IKE_PROCESS_ERR_CERT}
-
-//
-// MessageId: ERROR_IPSEC_IKE_PROCESS_ERR_CERT_REQ
-//
-// MessageText:
-//
-// Error processing Certificate Request payload
-//
- ERROR_IPSEC_IKE_PROCESS_ERR_CERT_REQ = DWORD(13836);
- {$EXTERNALSYM ERROR_IPSEC_IKE_PROCESS_ERR_CERT_REQ}
-
-//
-// MessageId: ERROR_IPSEC_IKE_PROCESS_ERR_HASH
-//
-// MessageText:
-//
-// Error processing Hash payload
-//
- ERROR_IPSEC_IKE_PROCESS_ERR_HASH = DWORD(13837);
- {$EXTERNALSYM ERROR_IPSEC_IKE_PROCESS_ERR_HASH}
-
-//
-// MessageId: ERROR_IPSEC_IKE_PROCESS_ERR_SIG
-//
-// MessageText:
-//
-// Error processing Signature payload
-//
- ERROR_IPSEC_IKE_PROCESS_ERR_SIG = DWORD(13838);
- {$EXTERNALSYM ERROR_IPSEC_IKE_PROCESS_ERR_SIG}
-
-//
-// MessageId: ERROR_IPSEC_IKE_PROCESS_ERR_NONCE
-//
-// MessageText:
-//
-// Error processing Nonce payload
-//
- ERROR_IPSEC_IKE_PROCESS_ERR_NONCE = DWORD(13839);
- {$EXTERNALSYM ERROR_IPSEC_IKE_PROCESS_ERR_NONCE}
-
-//
-// MessageId: ERROR_IPSEC_IKE_PROCESS_ERR_NOTIFY
-//
-// MessageText:
-//
-// Error processing Notify payload
-//
- ERROR_IPSEC_IKE_PROCESS_ERR_NOTIFY = DWORD(13840);
- {$EXTERNALSYM ERROR_IPSEC_IKE_PROCESS_ERR_NOTIFY}
-
-//
-// MessageId: ERROR_IPSEC_IKE_PROCESS_ERR_DELETE
-//
-// MessageText:
-//
-// Error processing Delete Payload
-//
- ERROR_IPSEC_IKE_PROCESS_ERR_DELETE = DWORD(13841);
- {$EXTERNALSYM ERROR_IPSEC_IKE_PROCESS_ERR_DELETE}
-
-//
-// MessageId: ERROR_IPSEC_IKE_PROCESS_ERR_VENDOR
-//
-// MessageText:
-//
-// Error processing VendorId payload
-//
- ERROR_IPSEC_IKE_PROCESS_ERR_VENDOR = DWORD(13842);
- {$EXTERNALSYM ERROR_IPSEC_IKE_PROCESS_ERR_VENDOR}
-
-//
-// MessageId: ERROR_IPSEC_IKE_INVALID_PAYLOAD
-//
-// MessageText:
-//
-// Invalid payload received
-//
- ERROR_IPSEC_IKE_INVALID_PAYLOAD = DWORD(13843);
- {$EXTERNALSYM ERROR_IPSEC_IKE_INVALID_PAYLOAD}
-
-//
-// MessageId: ERROR_IPSEC_IKE_LOAD_SOFT_SA
-//
-// MessageText:
-//
-// Soft SA loaded
-//
- ERROR_IPSEC_IKE_LOAD_SOFT_SA = DWORD(13844);
- {$EXTERNALSYM ERROR_IPSEC_IKE_LOAD_SOFT_SA}
-
-//
-// MessageId: ERROR_IPSEC_IKE_SOFT_SA_TORN_DOWN
-//
-// MessageText:
-//
-// Soft SA torn down
-//
- ERROR_IPSEC_IKE_SOFT_SA_TORN_DOWN = DWORD(13845);
- {$EXTERNALSYM ERROR_IPSEC_IKE_SOFT_SA_TORN_DOWN}
-
-//
-// MessageId: ERROR_IPSEC_IKE_INVALID_COOKIE
-//
-// MessageText:
-//
-// Invalid cookie received.
-//
- ERROR_IPSEC_IKE_INVALID_COOKIE = DWORD(13846);
- {$EXTERNALSYM ERROR_IPSEC_IKE_INVALID_COOKIE}
-
-//
-// MessageId: ERROR_IPSEC_IKE_NO_PEER_CERT
-//
-// MessageText:
-//
-// Peer failed to send valid machine certificate
-//
- ERROR_IPSEC_IKE_NO_PEER_CERT = DWORD(13847);
- {$EXTERNALSYM ERROR_IPSEC_IKE_NO_PEER_CERT}
-
-//
-// MessageId: ERROR_IPSEC_IKE_PEER_CRL_FAILED
-//
-// MessageText:
-//
-// Certification Revocation check of peer's certificate failed
-//
- ERROR_IPSEC_IKE_PEER_CRL_FAILED = DWORD(13848);
- {$EXTERNALSYM ERROR_IPSEC_IKE_PEER_CRL_FAILED}
-
-//
-// MessageId: ERROR_IPSEC_IKE_POLICY_CHANGE
-//
-// MessageText:
-//
-// New policy invalidated SAs formed with old policy
-//
- ERROR_IPSEC_IKE_POLICY_CHANGE = DWORD(13849);
- {$EXTERNALSYM ERROR_IPSEC_IKE_POLICY_CHANGE}
-
-//
-// MessageId: ERROR_IPSEC_IKE_NO_MM_POLICY
-//
-// MessageText:
-//
-// There is no available Main Mode IKE policy.
-//
- ERROR_IPSEC_IKE_NO_MM_POLICY = DWORD(13850);
- {$EXTERNALSYM ERROR_IPSEC_IKE_NO_MM_POLICY}
-
-//
-// MessageId: ERROR_IPSEC_IKE_NOTCBPRIV
-//
-// MessageText:
-//
-// Failed to enabled TCB privilege.
-//
- ERROR_IPSEC_IKE_NOTCBPRIV = DWORD(13851);
- {$EXTERNALSYM ERROR_IPSEC_IKE_NOTCBPRIV}
-
-//
-// MessageId: ERROR_IPSEC_IKE_SECLOADFAIL
-//
-// MessageText:
-//
-// Failed to load SECURITY.DLL.
-//
- ERROR_IPSEC_IKE_SECLOADFAIL = DWORD(13852);
- {$EXTERNALSYM ERROR_IPSEC_IKE_SECLOADFAIL}
-
-//
-// MessageId: ERROR_IPSEC_IKE_FAILSSPINIT
-//
-// MessageText:
-//
-// Failed to obtain security function table dispatch address from SSPI.
-//
- ERROR_IPSEC_IKE_FAILSSPINIT = DWORD(13853);
- {$EXTERNALSYM ERROR_IPSEC_IKE_FAILSSPINIT}
-
-//
-// MessageId: ERROR_IPSEC_IKE_FAILQUERYSSP
-//
-// MessageText:
-//
-// Failed to query Kerberos package to obtain max token size.
-//
- ERROR_IPSEC_IKE_FAILQUERYSSP = DWORD(13854);
- {$EXTERNALSYM ERROR_IPSEC_IKE_FAILQUERYSSP}
-
-//
-// MessageId: ERROR_IPSEC_IKE_SRVACQFAIL
-//
-// MessageText:
-//
-// Failed to obtain Kerberos server credentials for ISAKMP/ERROR_IPSEC_IKE service. Kerberos authentication will not function. The most likely reason for this is lack of domain membership. This is normal if your computer is a member of a workgroup.
-//
- ERROR_IPSEC_IKE_SRVACQFAIL = DWORD(13855);
- {$EXTERNALSYM ERROR_IPSEC_IKE_SRVACQFAIL}
-
-//
-// MessageId: ERROR_IPSEC_IKE_SRVQUERYCRED
-//
-// MessageText:
-//
-// Failed to determine SSPI principal name for ISAKMP/ERROR_IPSEC_IKE service (QueryCredentialsAttributes).
-//
- ERROR_IPSEC_IKE_SRVQUERYCRED = DWORD(13856);
- {$EXTERNALSYM ERROR_IPSEC_IKE_SRVQUERYCRED}
-
-//
-// MessageId: ERROR_IPSEC_IKE_GETSPIFAIL
-//
-// MessageText:
-//
-// Failed to obtain new SPI for the inbound SA from Ipsec driver. The most common cause for this is that the driver does not have the correct filter. Check your policy to verify the filters.
-//
- ERROR_IPSEC_IKE_GETSPIFAIL = DWORD(13857);
- {$EXTERNALSYM ERROR_IPSEC_IKE_GETSPIFAIL}
-
-//
-// MessageId: ERROR_IPSEC_IKE_INVALID_FILTER
-//
-// MessageText:
-//
-// Given filter is invalid
-//
- ERROR_IPSEC_IKE_INVALID_FILTER = DWORD(13858);
- {$EXTERNALSYM ERROR_IPSEC_IKE_INVALID_FILTER}
-
-//
-// MessageId: ERROR_IPSEC_IKE_OUT_OF_MEMORY
-//
-// MessageText:
-//
-// Memory allocation failed.
-//
- ERROR_IPSEC_IKE_OUT_OF_MEMORY = DWORD(13859);
- {$EXTERNALSYM ERROR_IPSEC_IKE_OUT_OF_MEMORY}
-
-//
-// MessageId: ERROR_IPSEC_IKE_ADD_UPDATE_KEY_FAILED
-//
-// MessageText:
-//
-// Failed to add Security Association to IPSec Driver. The most common cause for this is if the IKE negotiation took too long to complete. If the problem persists, reduce the load on the faulting machine.
-//
- ERROR_IPSEC_IKE_ADD_UPDATE_KEY_FAILED = DWORD(13860);
- {$EXTERNALSYM ERROR_IPSEC_IKE_ADD_UPDATE_KEY_FAILED}
-
-//
-// MessageId: ERROR_IPSEC_IKE_INVALID_POLICY
-//
-// MessageText:
-//
-// Invalid policy
-//
- ERROR_IPSEC_IKE_INVALID_POLICY = DWORD(13861);
- {$EXTERNALSYM ERROR_IPSEC_IKE_INVALID_POLICY}
-
-//
-// MessageId: ERROR_IPSEC_IKE_UNKNOWN_DOI
-//
-// MessageText:
-//
-// Invalid DOI
-//
- ERROR_IPSEC_IKE_UNKNOWN_DOI = DWORD(13862);
- {$EXTERNALSYM ERROR_IPSEC_IKE_UNKNOWN_DOI}
-
-//
-// MessageId: ERROR_IPSEC_IKE_INVALID_SITUATION
-//
-// MessageText:
-//
-// Invalid situation
-//
- ERROR_IPSEC_IKE_INVALID_SITUATION = DWORD(13863);
- {$EXTERNALSYM ERROR_IPSEC_IKE_INVALID_SITUATION}
-
-//
-// MessageId: ERROR_IPSEC_IKE_DH_FAILURE
-//
-// MessageText:
-//
-// Diffie-Hellman failure
-//
- ERROR_IPSEC_IKE_DH_FAILURE = DWORD(13864);
- {$EXTERNALSYM ERROR_IPSEC_IKE_DH_FAILURE}
-
-//
-// MessageId: ERROR_IPSEC_IKE_INVALID_GROUP
-//
-// MessageText:
-//
-// Invalid Diffie-Hellman group
-//
- ERROR_IPSEC_IKE_INVALID_GROUP = DWORD(13865);
- {$EXTERNALSYM ERROR_IPSEC_IKE_INVALID_GROUP}
-
-//
-// MessageId: ERROR_IPSEC_IKE_ENCRYPT
-//
-// MessageText:
-//
-// Error encrypting payload
-//
- ERROR_IPSEC_IKE_ENCRYPT = DWORD(13866);
- {$EXTERNALSYM ERROR_IPSEC_IKE_ENCRYPT}
-
-//
-// MessageId: ERROR_IPSEC_IKE_DECRYPT
-//
-// MessageText:
-//
-// Error decrypting payload
-//
- ERROR_IPSEC_IKE_DECRYPT = DWORD(13867);
- {$EXTERNALSYM ERROR_IPSEC_IKE_DECRYPT}
-
-//
-// MessageId: ERROR_IPSEC_IKE_POLICY_MATCH
-//
-// MessageText:
-//
-// Policy match error
-//
- ERROR_IPSEC_IKE_POLICY_MATCH = DWORD(13868);
- {$EXTERNALSYM ERROR_IPSEC_IKE_POLICY_MATCH}
-
-//
-// MessageId: ERROR_IPSEC_IKE_UNSUPPORTED_ID
-//
-// MessageText:
-//
-// Unsupported ID
-//
- ERROR_IPSEC_IKE_UNSUPPORTED_ID = DWORD(13869);
- {$EXTERNALSYM ERROR_IPSEC_IKE_UNSUPPORTED_ID}
-
-//
-// MessageId: ERROR_IPSEC_IKE_INVALID_HASH
-//
-// MessageText:
-//
-// Hash verification failed
-//
- ERROR_IPSEC_IKE_INVALID_HASH = DWORD(13870);
- {$EXTERNALSYM ERROR_IPSEC_IKE_INVALID_HASH}
-
-//
-// MessageId: ERROR_IPSEC_IKE_INVALID_HASH_ALG
-//
-// MessageText:
-//
-// Invalid hash algorithm
-//
- ERROR_IPSEC_IKE_INVALID_HASH_ALG = DWORD(13871);
- {$EXTERNALSYM ERROR_IPSEC_IKE_INVALID_HASH_ALG}
-
-//
-// MessageId: ERROR_IPSEC_IKE_INVALID_HASH_SIZE
-//
-// MessageText:
-//
-// Invalid hash size
-//
- ERROR_IPSEC_IKE_INVALID_HASH_SIZE = DWORD(13872);
- {$EXTERNALSYM ERROR_IPSEC_IKE_INVALID_HASH_SIZE}
-
-//
-// MessageId: ERROR_IPSEC_IKE_INVALID_ENCRYPT_ALG
-//
-// MessageText:
-//
-// Invalid encryption algorithm
-//
- ERROR_IPSEC_IKE_INVALID_ENCRYPT_ALG = DWORD(13873);
- {$EXTERNALSYM ERROR_IPSEC_IKE_INVALID_ENCRYPT_ALG}
-
-//
-// MessageId: ERROR_IPSEC_IKE_INVALID_AUTH_ALG
-//
-// MessageText:
-//
-// Invalid authentication algorithm
-//
- ERROR_IPSEC_IKE_INVALID_AUTH_ALG = DWORD(13874);
- {$EXTERNALSYM ERROR_IPSEC_IKE_INVALID_AUTH_ALG}
-
-//
-// MessageId: ERROR_IPSEC_IKE_INVALID_SIG
-//
-// MessageText:
-//
-// Invalid certificate signature
-//
- ERROR_IPSEC_IKE_INVALID_SIG = DWORD(13875);
- {$EXTERNALSYM ERROR_IPSEC_IKE_INVALID_SIG}
-
-//
-// MessageId: ERROR_IPSEC_IKE_LOAD_FAILED
-//
-// MessageText:
-//
-// Load failed
-//
- ERROR_IPSEC_IKE_LOAD_FAILED = DWORD(13876);
- {$EXTERNALSYM ERROR_IPSEC_IKE_LOAD_FAILED}
-
-//
-// MessageId: ERROR_IPSEC_IKE_RPC_DELETE
-//
-// MessageText:
-//
-// Deleted via RPC call
-//
- ERROR_IPSEC_IKE_RPC_DELETE = DWORD(13877);
- {$EXTERNALSYM ERROR_IPSEC_IKE_RPC_DELETE}
-
-//
-// MessageId: ERROR_IPSEC_IKE_BENIGN_REINIT
-//
-// MessageText:
-//
-// Temporary state created to perform reinit. This is not a real failure.
-//
- ERROR_IPSEC_IKE_BENIGN_REINIT = DWORD(13878);
- {$EXTERNALSYM ERROR_IPSEC_IKE_BENIGN_REINIT}
-
-//
-// MessageId: ERROR_IPSEC_IKE_INVALID_RESPONDER_LIFETIME_NOTIFY
-//
-// MessageText:
-//
-// The lifetime value received in the Responder Lifetime Notify is below the Windows 2000 configured minimum value. Please fix the policy on the peer machine.
-//
- ERROR_IPSEC_IKE_INVALID_RESPONDER_LIFETIME_NOTIFY = DWORD(13879);
- {$EXTERNALSYM ERROR_IPSEC_IKE_INVALID_RESPONDER_LIFETIME_NOTIFY}
-
-//
-// MessageId: ERROR_IPSEC_IKE_INVALID_CERT_KEYLEN
-//
-// MessageText:
-//
-// Key length in certificate is too small for configured security requirements.
-//
- ERROR_IPSEC_IKE_INVALID_CERT_KEYLEN = DWORD(13881);
- {$EXTERNALSYM ERROR_IPSEC_IKE_INVALID_CERT_KEYLEN}
-
-//
-// MessageId: ERROR_IPSEC_IKE_MM_LIMIT
-//
-// MessageText:
-//
-// Max number of established MM SAs to peer exceeded.
-//
- ERROR_IPSEC_IKE_MM_LIMIT = DWORD(13882);
- {$EXTERNALSYM ERROR_IPSEC_IKE_MM_LIMIT}
-
-//
-// MessageId: ERROR_IPSEC_IKE_NEGOTIATION_DISABLED
-//
-// MessageText:
-//
-// IKE received a policy that disables negotiation.
-//
- ERROR_IPSEC_IKE_NEGOTIATION_DISABLED = DWORD(13883);
- {$EXTERNALSYM ERROR_IPSEC_IKE_NEGOTIATION_DISABLED}
-
-//
-// MessageId: ERROR_IPSEC_IKE_NEG_STATUS_END
-//
-// MessageText:
-//
-// ERROR_IPSEC_IKE_NEG_STATUS_END
-//
- ERROR_IPSEC_IKE_NEG_STATUS_END = DWORD(13884);
- {$EXTERNALSYM ERROR_IPSEC_IKE_NEG_STATUS_END}
-
-////////////////////////////////////
-// //
-// COM Error Codes //
-// //
-////////////////////////////////////
-
-//
-// The return value of COM functions and methods is an HRESULT.
-// This is not a handle to anything, but is merely a 32-bit value
-// with several fields encoded in the value. The parts of an
-// HRESULT are shown below.
-//
-// Many of the macros and functions below were orginally defined to
-// operate on SCODEs. SCODEs are no longer used. The macros are
-// still present for compatibility and easy porting of Win16 code.
-// Newly written code should use the HRESULT macros and functions.
-//
-
-//
-// HRESULTs are 32 bit values layed out as follows:
-//
-// 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1
-// 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
-// +-+-+-+-+-+---------------------+-------------------------------+
-// |S|R|C|N|r| Facility | Code |
-// +-+-+-+-+-+---------------------+-------------------------------+
-//
-// where
-//
-// S - Severity - indicates success/fail
-//
-// 0 - Success
-// 1 - Fail (COERROR)
-//
-// R - reserved portion of the facility code, corresponds to NT's
-// second severity bit.
-//
-// C - reserved portion of the facility code, corresponds to NT's
-// C field.
-//
-// N - reserved portion of the facility code. Used to indicate a
-// mapped NT status value.
-//
-// r - reserved portion of the facility code. Reserved for internal
-// use. Used to indicate HRESULT values that are not status
-// values, but are instead message ids for display strings.
-//
-// Facility - is the facility code
-//
-// Code - is the facility's status code
-//
-
-//
-// Severity values
-//
-
- SEVERITY_SUCCESS = 0;
- {$EXTERNALSYM SEVERITY_SUCCESS}
- SEVERITY_ERROR = 1;
- {$EXTERNALSYM SEVERITY_ERROR}
-
-//
-// Generic test for success on any status value (non-negative numbers
-// indicate success).
-//
-
-function SUCCEEDED(Status: HRESULT): BOOL;
-{$EXTERNALSYM SUCCEEDED}
-
-//
-// and the inverse
-//
-
-function FAILED(Status: HRESULT): BOOL;
-{$EXTERNALSYM FAILED}
-
-//
-// Generic test for error on any status value.
-//
-
-function IS_ERROR(Status: HRESULT): BOOL;
-{$EXTERNALSYM IS_ERROR}
-
-//
-// Return the code
-//
-
-function HRESULT_CODE(hr: HRESULT): DWORD;
-{$EXTERNALSYM HRESULT_CODE}
-
-function SCODE_CODE(sc: LONG): DWORD;
-{$EXTERNALSYM SCODE_CODE}
-
-//
-// Return the facility
-//
-
-function HRESULT_FACILITY(hr: HRESULT): DWORD;
-{$EXTERNALSYM HRESULT_FACILITY}
-
-function SCODE_FACILITY(sc: LONG): DWORD;
-{$EXTERNALSYM SCODE_FACILITY}
-
-//
-// Return the severity
-//
-
-function HRESULT_SEVERITY(hr: HRESULT): DWORD;
-{$EXTERNALSYM HRESULT_SEVERITY}
-
-function SCODE_SEVERITY(sc: LONG): DWORD;
-{$EXTERNALSYM SCODE_SEVERITY}
-
-//
-// Create an HRESULT value from component pieces
-//
-
-function MAKE_HRESULT(sev, fac, code: DWORD): HRESULT;
-{$EXTERNALSYM MAKE_HRESULT}
-
-function MAKE_SCODE(sev, fac,code: DWORD): DWORD;
-{$EXTERNALSYM MAKE_SCODE}
-
-//
-// Map a WIN32 error value into a HRESULT
-// Note: This assumes that WIN32 errors fall in the range -32k to 32k.
-//
-// Define bits here so macros are guaranteed to work
-
-const
- FACILITY_NT_BIT = $10000000;
- {$EXTERNALSYM FACILITY_NT_BIT}
-
-// __HRESULT_FROM_WIN32 will always be a macro.
-// The goal will be to enable INLINE_HRESULT_FROM_WIN32 all the time,
-// but there's too much code to change to do that at this time.
-
-function __HRESULT_FROM_WIN32(x: DWORD): HRESULT;
-{$EXTERNALSYM __HRESULT_FROM_WIN32}
-
-function HRESULT_FROM_WIN32(x: DWORD): HRESULT;
-{$EXTERNALSYM HRESULT_FROM_WIN32}
-
-//
-// Map an NT status value into a HRESULT
-//
-
-function HRESULT_FROM_NT(x: NTSTATUS): HRESULT;
-{$EXTERNALSYM HRESULT_FROM_NT}
-
-// ****** OBSOLETE functions
-
-// HRESULT functions
-// As noted above, these functions are obsolete and should not be used.
-
-// Extract the SCODE from a HRESULT
-
-function GetScode(hr: HRESULT): DWORD;
-{$EXTERNALSYM GetScode}
-
-// Convert an SCODE into an HRESULT.
-
-function ResultFromScode(sc: DWORD): HRESULT;
-{$EXTERNALSYM ResultFromScode}
-
-// PropagateResult is a noop
-
-function PropagateResult(hrPrevious, scBase: DWORD): HRESULT;
-{$EXTERNALSYM PropagateResult}
-
-// ****** End of OBSOLETE functions.
-
-// ---------------------- HRESULT value definitions -----------------
-//
-// HRESULT definitions
-//
-
-type
- _HRESULT_TYPEDEF_ = HRESULT;
- {$EXTERNALSYM _HRESULT_TYPEDEF_}
-
-const
- NOERROR = 0;
- {$EXTERNALSYM NOERROR}
-
-//
-// Error definitions follow
-//
-
-//
-// Codes 0x4000-0x40ff are reserved for OLE
-//
-//
-// Error codes
-//
-//
-// MessageId: E_UNEXPECTED
-//
-// MessageText:
-//
-// Catastrophic failure
-//
- E_UNEXPECTED = HRESULT($8000FFFF);
- {$EXTERNALSYM E_UNEXPECTED}
-
-//
-// MessageId: E_NOTIMPL
-//
-// MessageText:
-//
-// Not implemented
-//
- E_NOTIMPL = HRESULT($80004001);
- {$EXTERNALSYM E_NOTIMPL}
-
-//
-// MessageId: E_OUTOFMEMORY
-//
-// MessageText:
-//
-// Ran out of memory
-//
- E_OUTOFMEMORY = HRESULT($8007000E);
- {$EXTERNALSYM E_OUTOFMEMORY}
-
-//
-// MessageId: E_INVALIDARG
-//
-// MessageText:
-//
-// One or more arguments are invalid
-//
- E_INVALIDARG = HRESULT($80070057);
- {$EXTERNALSYM E_INVALIDARG}
-
-//
-// MessageId: E_NOINTERFACE
-//
-// MessageText:
-//
-// No such interface supported
-//
- E_NOINTERFACE = HRESULT($80004002);
- {$EXTERNALSYM E_NOINTERFACE}
-
-//
-// MessageId: E_POINTER
-//
-// MessageText:
-//
-// Invalid pointer
-//
- E_POINTER = HRESULT($80004003);
- {$EXTERNALSYM E_POINTER}
-
-//
-// MessageId: E_HANDLE
-//
-// MessageText:
-//
-// Invalid handle
-//
- E_HANDLE = HRESULT($80070006);
- {$EXTERNALSYM E_HANDLE}
-
-//
-// MessageId: E_ABORT
-//
-// MessageText:
-//
-// Operation aborted
-//
- E_ABORT = HRESULT($80004004);
- {$EXTERNALSYM E_ABORT}
-
-//
-// MessageId: E_FAIL
-//
-// MessageText:
-//
-// Unspecified error
-//
- E_FAIL = HRESULT($80004005);
- {$EXTERNALSYM E_FAIL}
-
-//
-// MessageId: E_ACCESSDENIED
-//
-// MessageText:
-//
-// General access denied error
-//
- E_ACCESSDENIED = HRESULT($80070005);
- {$EXTERNALSYM E_ACCESSDENIED}
-
-//
-// MessageId: E_PENDING
-//
-// MessageText:
-//
-// The data necessary to complete this operation is not yet available.
-//
- E_PENDING = HRESULT($8000000A);
- {$EXTERNALSYM E_PENDING}
-
-//
-// MessageId: CO_E_INIT_TLS
-//
-// MessageText:
-//
-// Thread local storage failure
-//
- CO_E_INIT_TLS = HRESULT($80004006);
- {$EXTERNALSYM CO_E_INIT_TLS}
-
-//
-// MessageId: CO_E_INIT_SHARED_ALLOCATOR
-//
-// MessageText:
-//
-// Get shared memory allocator failure
-//
- CO_E_INIT_SHARED_ALLOCATOR = HRESULT($80004007);
- {$EXTERNALSYM CO_E_INIT_SHARED_ALLOCATOR}
-
-//
-// MessageId: CO_E_INIT_MEMORY_ALLOCATOR
-//
-// MessageText:
-//
-// Get memory allocator failure
-//
- CO_E_INIT_MEMORY_ALLOCATOR = HRESULT($80004008);
- {$EXTERNALSYM CO_E_INIT_MEMORY_ALLOCATOR}
-
-//
-// MessageId: CO_E_INIT_CLASS_CACHE
-//
-// MessageText:
-//
-// Unable to initialize class cache
-//
- CO_E_INIT_CLASS_CACHE = HRESULT($80004009);
- {$EXTERNALSYM CO_E_INIT_CLASS_CACHE}
-
-//
-// MessageId: CO_E_INIT_RPC_CHANNEL
-//
-// MessageText:
-//
-// Unable to initialize RPC services
-//
- CO_E_INIT_RPC_CHANNEL = HRESULT($8000400A);
- {$EXTERNALSYM CO_E_INIT_RPC_CHANNEL}
-
-//
-// MessageId: CO_E_INIT_TLS_SET_CHANNEL_CONTROL
-//
-// MessageText:
-//
-// Cannot set thread local storage channel control
-//
- CO_E_INIT_TLS_SET_CHANNEL_CONTROL = HRESULT($8000400B);
- {$EXTERNALSYM CO_E_INIT_TLS_SET_CHANNEL_CONTROL}
-
-//
-// MessageId: CO_E_INIT_TLS_CHANNEL_CONTROL
-//
-// MessageText:
-//
-// Could not allocate thread local storage channel control
-//
- CO_E_INIT_TLS_CHANNEL_CONTROL = HRESULT($8000400C);
- {$EXTERNALSYM CO_E_INIT_TLS_CHANNEL_CONTROL}
-
-//
-// MessageId: CO_E_INIT_UNACCEPTED_USER_ALLOCATOR
-//
-// MessageText:
-//
-// The user supplied memory allocator is unacceptable
-//
- CO_E_INIT_UNACCEPTED_USER_ALLOCATOR = HRESULT($8000400D);
- {$EXTERNALSYM CO_E_INIT_UNACCEPTED_USER_ALLOCATOR}
-
-//
-// MessageId: CO_E_INIT_SCM_MUTEX_EXISTS
-//
-// MessageText:
-//
-// The OLE service mutex already exists
-//
- CO_E_INIT_SCM_MUTEX_EXISTS = HRESULT($8000400E);
- {$EXTERNALSYM CO_E_INIT_SCM_MUTEX_EXISTS}
-
-//
-// MessageId: CO_E_INIT_SCM_FILE_MAPPING_EXISTS
-//
-// MessageText:
-//
-// The OLE service file mapping already exists
-//
- CO_E_INIT_SCM_FILE_MAPPING_EXISTS = HRESULT($8000400F);
- {$EXTERNALSYM CO_E_INIT_SCM_FILE_MAPPING_EXISTS}
-
-//
-// MessageId: CO_E_INIT_SCM_MAP_VIEW_OF_FILE
-//
-// MessageText:
-//
-// Unable to map view of file for OLE service
-//
- CO_E_INIT_SCM_MAP_VIEW_OF_FILE = HRESULT($80004010);
- {$EXTERNALSYM CO_E_INIT_SCM_MAP_VIEW_OF_FILE}
-
-//
-// MessageId: CO_E_INIT_SCM_EXEC_FAILURE
-//
-// MessageText:
-//
-// Failure attempting to launch OLE service
-//
- CO_E_INIT_SCM_EXEC_FAILURE = HRESULT($80004011);
- {$EXTERNALSYM CO_E_INIT_SCM_EXEC_FAILURE}
-
-//
-// MessageId: CO_E_INIT_ONLY_SINGLE_THREADED
-//
-// MessageText:
-//
-// There was an attempt to call CoInitialize a second time while single threaded
-//
- CO_E_INIT_ONLY_SINGLE_THREADED = HRESULT($80004012);
- {$EXTERNALSYM CO_E_INIT_ONLY_SINGLE_THREADED}
-
-//
-// MessageId: CO_E_CANT_REMOTE
-//
-// MessageText:
-//
-// A Remote activation was necessary but was not allowed
-//
- CO_E_CANT_REMOTE = HRESULT($80004013);
- {$EXTERNALSYM CO_E_CANT_REMOTE}
-
-//
-// MessageId: CO_E_BAD_SERVER_NAME
-//
-// MessageText:
-//
-// A Remote activation was necessary but the server name provided was invalid
-//
- CO_E_BAD_SERVER_NAME = HRESULT($80004014);
- {$EXTERNALSYM CO_E_BAD_SERVER_NAME}
-
-//
-// MessageId: CO_E_WRONG_SERVER_IDENTITY
-//
-// MessageText:
-//
-// The class is configured to run as a security id different from the caller
-//
- CO_E_WRONG_SERVER_IDENTITY = HRESULT($80004015);
- {$EXTERNALSYM CO_E_WRONG_SERVER_IDENTITY}
-
-//
-// MessageId: CO_E_OLE1DDE_DISABLED
-//
-// MessageText:
-//
-// Use of Ole1 services requiring DDE windows is disabled
-//
- CO_E_OLE1DDE_DISABLED = HRESULT($80004016);
- {$EXTERNALSYM CO_E_OLE1DDE_DISABLED}
-
-//
-// MessageId: CO_E_RUNAS_SYNTAX
-//
-// MessageText:
-//
-// A RunAs specification must be <domain name>\<user name> or simply <user name>
-//
- CO_E_RUNAS_SYNTAX = HRESULT($80004017);
- {$EXTERNALSYM CO_E_RUNAS_SYNTAX}
-
-//
-// MessageId: CO_E_CREATEPROCESS_FAILURE
-//
-// MessageText:
-//
-// The server process could not be started. The pathname may be incorrect.
-//
- CO_E_CREATEPROCESS_FAILURE = HRESULT($80004018);
- {$EXTERNALSYM CO_E_CREATEPROCESS_FAILURE}
-
-//
-// MessageId: CO_E_RUNAS_CREATEPROCESS_FAILURE
-//
-// MessageText:
-//
-// The server process could not be started as the configured identity. The pathname may be incorrect or unavailable.
-//
- CO_E_RUNAS_CREATEPROCESS_FAILURE = HRESULT($80004019);
- {$EXTERNALSYM CO_E_RUNAS_CREATEPROCESS_FAILURE}
-
-//
-// MessageId: CO_E_RUNAS_LOGON_FAILURE
-//
-// MessageText:
-//
-// The server process could not be started because the configured identity is incorrect. Check the username and password.
-//
- CO_E_RUNAS_LOGON_FAILURE = HRESULT($8000401A);
- {$EXTERNALSYM CO_E_RUNAS_LOGON_FAILURE}
-
-//
-// MessageId: CO_E_LAUNCH_PERMSSION_DENIED
-//
-// MessageText:
-//
-// The client is not allowed to launch this server.
-//
- CO_E_LAUNCH_PERMSSION_DENIED = HRESULT($8000401B);
- {$EXTERNALSYM CO_E_LAUNCH_PERMSSION_DENIED}
-
-//
-// MessageId: CO_E_START_SERVICE_FAILURE
-//
-// MessageText:
-//
-// The service providing this server could not be started.
-//
- CO_E_START_SERVICE_FAILURE = HRESULT($8000401C);
- {$EXTERNALSYM CO_E_START_SERVICE_FAILURE}
-
-//
-// MessageId: CO_E_REMOTE_COMMUNICATION_FAILURE
-//
-// MessageText:
-//
-// This computer was unable to communicate with the computer providing the server.
-//
- CO_E_REMOTE_COMMUNICATION_FAILURE = HRESULT($8000401D);
- {$EXTERNALSYM CO_E_REMOTE_COMMUNICATION_FAILURE}
-
-//
-// MessageId: CO_E_SERVER_START_TIMEOUT
-//
-// MessageText:
-//
-// The server did not respond after being launched.
-//
- CO_E_SERVER_START_TIMEOUT = HRESULT($8000401E);
- {$EXTERNALSYM CO_E_SERVER_START_TIMEOUT}
-
-//
-// MessageId: CO_E_CLSREG_INCONSISTENT
-//
-// MessageText:
-//
-// The registration information for this server is inconsistent or incomplete.
-//
- CO_E_CLSREG_INCONSISTENT = HRESULT($8000401F);
- {$EXTERNALSYM CO_E_CLSREG_INCONSISTENT}
-
-//
-// MessageId: CO_E_IIDREG_INCONSISTENT
-//
-// MessageText:
-//
-// The registration information for this interface is inconsistent or incomplete.
-//
- CO_E_IIDREG_INCONSISTENT = HRESULT($80004020);
- {$EXTERNALSYM CO_E_IIDREG_INCONSISTENT}
-
-//
-// MessageId: CO_E_NOT_SUPPORTED
-//
-// MessageText:
-//
-// The operation attempted is not supported.
-//
- CO_E_NOT_SUPPORTED = HRESULT($80004021);
- {$EXTERNALSYM CO_E_NOT_SUPPORTED}
-
-//
-// MessageId: CO_E_RELOAD_DLL
-//
-// MessageText:
-//
-// A dll must be loaded.
-//
- CO_E_RELOAD_DLL = HRESULT($80004022);
- {$EXTERNALSYM CO_E_RELOAD_DLL}
-
-//
-// MessageId: CO_E_MSI_ERROR
-//
-// MessageText:
-//
-// A Microsoft Software Installer error was encountered.
-//
- CO_E_MSI_ERROR = HRESULT($80004023);
- {$EXTERNALSYM CO_E_MSI_ERROR}
-
-//
-// MessageId: CO_E_ATTEMPT_TO_CREATE_OUTSIDE_CLIENT_CONTEXT
-//
-// MessageText:
-//
-// The specified activation could not occur in the client context as specified.
-//
- CO_E_ATTEMPT_TO_CREATE_OUTSIDE_CLIENT_CONTEXT = HRESULT($80004024);
- {$EXTERNALSYM CO_E_ATTEMPT_TO_CREATE_OUTSIDE_CLIENT_CONTEXT}
-
-//
-// MessageId: CO_E_SERVER_PAUSED
-//
-// MessageText:
-//
-// Activations on the server are paused.
-//
- CO_E_SERVER_PAUSED = HRESULT($80004025);
- {$EXTERNALSYM CO_E_SERVER_PAUSED}
-
-//
-// MessageId: CO_E_SERVER_NOT_PAUSED
-//
-// MessageText:
-//
-// Activations on the server are not paused.
-//
- CO_E_SERVER_NOT_PAUSED = HRESULT($80004026);
- {$EXTERNALSYM CO_E_SERVER_NOT_PAUSED}
-
-//
-// MessageId: CO_E_CLASS_DISABLED
-//
-// MessageText:
-//
-// The component or application containing the component has been disabled.
-//
- CO_E_CLASS_DISABLED = HRESULT($80004027);
- {$EXTERNALSYM CO_E_CLASS_DISABLED}
-
-//
-// MessageId: CO_E_CLRNOTAVAILABLE
-//
-// MessageText:
-//
-// The common language runtime is not available
-//
- CO_E_CLRNOTAVAILABLE = HRESULT($80004028);
- {$EXTERNALSYM CO_E_CLRNOTAVAILABLE}
-
-//
-// MessageId: CO_E_ASYNC_WORK_REJECTED
-//
-// MessageText:
-//
-// The thread-pool rejected the submitted asynchronous work.
-//
- CO_E_ASYNC_WORK_REJECTED = HRESULT($80004029);
- {$EXTERNALSYM CO_E_ASYNC_WORK_REJECTED}
-
-//
-// MessageId: CO_E_SERVER_INIT_TIMEOUT
-//
-// MessageText:
-//
-// The server started, but did not finish initializing in a timely fashion.
-//
- CO_E_SERVER_INIT_TIMEOUT = HRESULT($8000402A);
- {$EXTERNALSYM CO_E_SERVER_INIT_TIMEOUT}
-
-//
-// MessageId: CO_E_NO_SECCTX_IN_ACTIVATE
-//
-// MessageText:
-//
-// Unable to complete the call since there is no COM+ security context inside IObjectControl.Activate.
-//
- CO_E_NO_SECCTX_IN_ACTIVATE = HRESULT($8000402B);
- {$EXTERNALSYM CO_E_NO_SECCTX_IN_ACTIVATE}
-
-//
-// MessageId: CO_E_TRACKER_CONFIG
-//
-// MessageText:
-//
-// The provided tracker configuration is invalid
-//
- CO_E_TRACKER_CONFIG = HRESULT($80004030);
- {$EXTERNALSYM CO_E_TRACKER_CONFIG}
-
-//
-// MessageId: CO_E_THREADPOOL_CONFIG
-//
-// MessageText:
-//
-// The provided thread pool configuration is invalid
-//
- CO_E_THREADPOOL_CONFIG = HRESULT($80004031);
- {$EXTERNALSYM CO_E_THREADPOOL_CONFIG}
-
-//
-// MessageId: CO_E_SXS_CONFIG
-//
-// MessageText:
-//
-// The provided side-by-side configuration is invalid
-//
- CO_E_SXS_CONFIG = HRESULT($80004032);
- {$EXTERNALSYM CO_E_SXS_CONFIG}
-
-//
-// MessageId: CO_E_MALFORMED_SPN
-//
-// MessageText:
-//
-// The server principal name (SPN) obtained during security negotiation is malformed.
-//
- CO_E_MALFORMED_SPN = HRESULT($80004033);
- {$EXTERNALSYM CO_E_MALFORMED_SPN}
-
-//
-// Success codes
-//
- S_OK = HRESULT($00000000);
- {$EXTERNALSYM S_OK}
- S_FALSE = HRESULT($00000001);
- {$EXTERNALSYM S_FALSE}
-
-// ******************
-// FACILITY_ITF
-// ******************
-
-//
-// Codes 0x0-0x01ff are reserved for the OLE group of
-// interfaces.
-//
-
-//
-// Generic OLE errors that may be returned by many inerfaces
-//
-
- OLE_E_FIRST = HRESULT($80040000);
- {$EXTERNALSYM OLE_E_FIRST}
- OLE_E_LAST = HRESULT($800400FF);
- {$EXTERNALSYM OLE_E_LAST}
- OLE_S_FIRST = HRESULT($00040000);
- {$EXTERNALSYM OLE_S_FIRST}
- OLE_S_LAST = HRESULT($000400FF);
- {$EXTERNALSYM OLE_S_LAST}
-
-//
-// Old OLE errors
-//
-//
-// MessageId: OLE_E_OLEVERB
-//
-// MessageText:
-//
-// Invalid OLEVERB structure
-//
- OLE_E_OLEVERB = HRESULT($80040000);
- {$EXTERNALSYM OLE_E_OLEVERB}
-
-//
-// MessageId: OLE_E_ADVF
-//
-// MessageText:
-//
-// Invalid advise flags
-//
- OLE_E_ADVF = HRESULT($80040001);
- {$EXTERNALSYM OLE_E_ADVF}
-
-//
-// MessageId: OLE_E_ENUM_NOMORE
-//
-// MessageText:
-//
-// Can't enumerate any more, because the associated data is missing
-//
- OLE_E_ENUM_NOMORE = HRESULT($80040002);
- {$EXTERNALSYM OLE_E_ENUM_NOMORE}
-
-//
-// MessageId: OLE_E_ADVISENOTSUPPORTED
-//
-// MessageText:
-//
-// This implementation doesn't take advises
-//
- OLE_E_ADVISENOTSUPPORTED = HRESULT($80040003);
- {$EXTERNALSYM OLE_E_ADVISENOTSUPPORTED}
-
-//
-// MessageId: OLE_E_NOCONNECTION
-//
-// MessageText:
-//
-// There is no connection for this connection ID
-//
- OLE_E_NOCONNECTION = HRESULT($80040004);
- {$EXTERNALSYM OLE_E_NOCONNECTION}
-
-//
-// MessageId: OLE_E_NOTRUNNING
-//
-// MessageText:
-//
-// Need to run the object to perform this operation
-//
- OLE_E_NOTRUNNING = HRESULT($80040005);
- {$EXTERNALSYM OLE_E_NOTRUNNING}
-
-//
-// MessageId: OLE_E_NOCACHE
-//
-// MessageText:
-//
-// There is no cache to operate on
-//
- OLE_E_NOCACHE = HRESULT($80040006);
- {$EXTERNALSYM OLE_E_NOCACHE}
-
-//
-// MessageId: OLE_E_BLANK
-//
-// MessageText:
-//
-// Uninitialized object
-//
- OLE_E_BLANK = HRESULT($80040007);
- {$EXTERNALSYM OLE_E_BLANK}
-
-//
-// MessageId: OLE_E_CLASSDIFF
-//
-// MessageText:
-//
-// Linked object's source class has changed
-//
- OLE_E_CLASSDIFF = HRESULT($80040008);
- {$EXTERNALSYM OLE_E_CLASSDIFF}
-
-//
-// MessageId: OLE_E_CANT_GETMONIKER
-//
-// MessageText:
-//
-// Not able to get the moniker of the object
-//
- OLE_E_CANT_GETMONIKER = HRESULT($80040009);
- {$EXTERNALSYM OLE_E_CANT_GETMONIKER}
-
-//
-// MessageId: OLE_E_CANT_BINDTOSOURCE
-//
-// MessageText:
-//
-// Not able to bind to the source
-//
- OLE_E_CANT_BINDTOSOURCE = HRESULT($8004000A);
- {$EXTERNALSYM OLE_E_CANT_BINDTOSOURCE}
-
-//
-// MessageId: OLE_E_STATIC
-//
-// MessageText:
-//
-// Object is static; operation not allowed
-//
- OLE_E_STATIC = HRESULT($8004000B);
- {$EXTERNALSYM OLE_E_STATIC}
-
-//
-// MessageId: OLE_E_PROMPTSAVECANCELLED
-//
-// MessageText:
-//
-// User canceled out of save dialog
-//
- OLE_E_PROMPTSAVECANCELLED = HRESULT($8004000C);
- {$EXTERNALSYM OLE_E_PROMPTSAVECANCELLED}
-
-//
-// MessageId: OLE_E_INVALIDRECT
-//
-// MessageText:
-//
-// Invalid rectangle
-//
- OLE_E_INVALIDRECT = HRESULT($8004000D);
- {$EXTERNALSYM OLE_E_INVALIDRECT}
-
-//
-// MessageId: OLE_E_WRONGCOMPOBJ
-//
-// MessageText:
-//
-// compobj.dll is too old for the ole2.dll initialized
-//
- OLE_E_WRONGCOMPOBJ = HRESULT($8004000E);
- {$EXTERNALSYM OLE_E_WRONGCOMPOBJ}
-
-//
-// MessageId: OLE_E_INVALIDHWND
-//
-// MessageText:
-//
-// Invalid window handle
-//
- OLE_E_INVALIDHWND = HRESULT($8004000F);
- {$EXTERNALSYM OLE_E_INVALIDHWND}
-
-//
-// MessageId: OLE_E_NOT_INPLACEACTIVE
-//
-// MessageText:
-//
-// Object is not in any of the inplace active states
-//
- OLE_E_NOT_INPLACEACTIVE = HRESULT($80040010);
- {$EXTERNALSYM OLE_E_NOT_INPLACEACTIVE}
-
-//
-// MessageId: OLE_E_CANTCONVERT
-//
-// MessageText:
-//
-// Not able to convert object
-//
- OLE_E_CANTCONVERT = HRESULT($80040011);
- {$EXTERNALSYM OLE_E_CANTCONVERT}
-
-//
-// MessageId: OLE_E_NOSTORAGE
-//
-// MessageText:
-//
-// Not able to perform the operation because object is not given storage yet
-//
- OLE_E_NOSTORAGE = HRESULT($80040012);
- {$EXTERNALSYM OLE_E_NOSTORAGE}
-
-//
-// MessageId: DV_E_FORMATETC
-//
-// MessageText:
-//
-// Invalid FORMATETC structure
-//
- DV_E_FORMATETC = HRESULT($80040064);
- {$EXTERNALSYM DV_E_FORMATETC}
-
-//
-// MessageId: DV_E_DVTARGETDEVICE
-//
-// MessageText:
-//
-// Invalid DVTARGETDEVICE structure
-//
- DV_E_DVTARGETDEVICE = HRESULT($80040065);
- {$EXTERNALSYM DV_E_DVTARGETDEVICE}
-
-//
-// MessageId: DV_E_STGMEDIUM
-//
-// MessageText:
-//
-// Invalid STDGMEDIUM structure
-//
- DV_E_STGMEDIUM = HRESULT($80040066);
- {$EXTERNALSYM DV_E_STGMEDIUM}
-
-//
-// MessageId: DV_E_STATDATA
-//
-// MessageText:
-//
-// Invalid STATDATA structure
-//
- DV_E_STATDATA = HRESULT($80040067);
- {$EXTERNALSYM DV_E_STATDATA}
-
-//
-// MessageId: DV_E_LINDEX
-//
-// MessageText:
-//
-// Invalid lindex
-//
- DV_E_LINDEX = HRESULT($80040068);
- {$EXTERNALSYM DV_E_LINDEX}
-
-//
-// MessageId: DV_E_TYMED
-//
-// MessageText:
-//
-// Invalid tymed
-//
- DV_E_TYMED = HRESULT($80040069);
- {$EXTERNALSYM DV_E_TYMED}
-
-//
-// MessageId: DV_E_CLIPFORMAT
-//
-// MessageText:
-//
-// Invalid clipboard format
-//
- DV_E_CLIPFORMAT = HRESULT($8004006A);
- {$EXTERNALSYM DV_E_CLIPFORMAT}
-
-//
-// MessageId: DV_E_DVASPECT
-//
-// MessageText:
-//
-// Invalid aspect(s)
-//
- DV_E_DVASPECT = HRESULT($8004006B);
- {$EXTERNALSYM DV_E_DVASPECT}
-
-//
-// MessageId: DV_E_DVTARGETDEVICE_SIZE
-//
-// MessageText:
-//
-// tdSize parameter of the DVTARGETDEVICE structure is invalid
-//
- DV_E_DVTARGETDEVICE_SIZE = HRESULT($8004006C);
- {$EXTERNALSYM DV_E_DVTARGETDEVICE_SIZE}
-
-//
-// MessageId: DV_E_NOIVIEWOBJECT
-//
-// MessageText:
-//
-// Object doesn't support IViewObject interface
-//
- DV_E_NOIVIEWOBJECT = HRESULT($8004006D);
- {$EXTERNALSYM DV_E_NOIVIEWOBJECT}
-
- DRAGDROP_E_FIRST = DWORD($80040100);
- {$EXTERNALSYM DRAGDROP_E_FIRST}
- DRAGDROP_E_LAST = DWORD($8004010F);
- {$EXTERNALSYM DRAGDROP_E_LAST}
- DRAGDROP_S_FIRST = DWORD($00040100);
- {$EXTERNALSYM DRAGDROP_S_FIRST}
- DRAGDROP_S_LAST = DWORD($0004010F);
- {$EXTERNALSYM DRAGDROP_S_LAST}
-//
-// MessageId: DRAGDROP_E_NOTREGISTERED
-//
-// MessageText:
-//
-// Trying to revoke a drop target that has not been registered
-//
- DRAGDROP_E_NOTREGISTERED = HRESULT($80040100);
- {$EXTERNALSYM DRAGDROP_E_NOTREGISTERED}
-
-//
-// MessageId: DRAGDROP_E_ALREADYREGISTERED
-//
-// MessageText:
-//
-// This window has already been registered as a drop target
-//
- DRAGDROP_E_ALREADYREGISTERED = HRESULT($80040101);
- {$EXTERNALSYM DRAGDROP_E_ALREADYREGISTERED}
-
-//
-// MessageId: DRAGDROP_E_INVALIDHWND
-//
-// MessageText:
-//
-// Invalid window handle
-//
- DRAGDROP_E_INVALIDHWND = HRESULT($80040102);
- {$EXTERNALSYM DRAGDROP_E_INVALIDHWND}
-
- CLASSFACTORY_E_FIRST = DWORD($80040110);
- {$EXTERNALSYM CLASSFACTORY_E_FIRST}
- CLASSFACTORY_E_LAST = DWORD($8004011F);
- {$EXTERNALSYM CLASSFACTORY_E_LAST}
- CLASSFACTORY_S_FIRST = DWORD($00040110);
- {$EXTERNALSYM CLASSFACTORY_S_FIRST}
- CLASSFACTORY_S_LAST = DWORD($0004011F);
- {$EXTERNALSYM CLASSFACTORY_S_LAST}
-//
-// MessageId: CLASS_E_NOAGGREGATION
-//
-// MessageText:
-//
-// Class does not support aggregation (or class object is remote)
-//
- CLASS_E_NOAGGREGATION = HRESULT($80040110);
- {$EXTERNALSYM CLASS_E_NOAGGREGATION}
-
-//
-// MessageId: CLASS_E_CLASSNOTAVAILABLE
-//
-// MessageText:
-//
-// ClassFactory cannot supply requested class
-//
- CLASS_E_CLASSNOTAVAILABLE = HRESULT($80040111);
- {$EXTERNALSYM CLASS_E_CLASSNOTAVAILABLE}
-
-//
-// MessageId: CLASS_E_NOTLICENSED
-//
-// MessageText:
-//
-// Class is not licensed for use
-//
- CLASS_E_NOTLICENSED = HRESULT($80040112);
- {$EXTERNALSYM CLASS_E_NOTLICENSED}
-
- MARSHAL_E_FIRST = DWORD($80040120);
- {$EXTERNALSYM MARSHAL_E_FIRST}
- MARSHAL_E_LAST = DWORD($8004012F);
- {$EXTERNALSYM MARSHAL_E_LAST}
- MARSHAL_S_FIRST = DWORD($00040120);
- {$EXTERNALSYM MARSHAL_S_FIRST}
- MARSHAL_S_LAST = DWORD($0004012F);
- {$EXTERNALSYM MARSHAL_S_LAST}
- DATA_E_FIRST = DWORD($80040130);
- {$EXTERNALSYM DATA_E_FIRST}
- DATA_E_LAST = DWORD($8004013F);
- {$EXTERNALSYM DATA_E_LAST}
- DATA_S_FIRST = DWORD($00040130);
- {$EXTERNALSYM DATA_S_FIRST}
- DATA_S_LAST = DWORD($0004013F);
- {$EXTERNALSYM DATA_S_LAST}
- VIEW_E_FIRST = DWORD($80040140);
- {$EXTERNALSYM VIEW_E_FIRST}
- VIEW_E_LAST = DWORD($8004014F);
- {$EXTERNALSYM VIEW_E_LAST}
- VIEW_S_FIRST = DWORD($00040140);
- {$EXTERNALSYM VIEW_S_FIRST}
- VIEW_S_LAST = DWORD($0004014F);
- {$EXTERNALSYM VIEW_S_LAST}
-//
-// MessageId: VIEW_E_DRAW
-//
-// MessageText:
-//
-// Error drawing view
-//
- VIEW_E_DRAW = HRESULT($80040140);
- {$EXTERNALSYM VIEW_E_DRAW}
-
- REGDB_E_FIRST = DWORD($80040150);
- {$EXTERNALSYM REGDB_E_FIRST}
- REGDB_E_LAST = DWORD($8004015F);
- {$EXTERNALSYM REGDB_E_LAST}
- REGDB_S_FIRST = DWORD($00040150);
- {$EXTERNALSYM REGDB_S_FIRST}
- REGDB_S_LAST = DWORD($0004015F);
- {$EXTERNALSYM REGDB_S_LAST}
-//
-// MessageId: REGDB_E_READREGDB
-//
-// MessageText:
-//
-// Could not read key from registry
-//
- REGDB_E_READREGDB = HRESULT($80040150);
- {$EXTERNALSYM REGDB_E_READREGDB}
-
-//
-// MessageId: REGDB_E_WRITEREGDB
-//
-// MessageText:
-//
-// Could not write key to registry
-//
- REGDB_E_WRITEREGDB = HRESULT($80040151);
- {$EXTERNALSYM REGDB_E_WRITEREGDB}
-
-//
-// MessageId: REGDB_E_KEYMISSING
-//
-// MessageText:
-//
-// Could not find the key in the registry
-//
- REGDB_E_KEYMISSING = HRESULT($80040152);
- {$EXTERNALSYM REGDB_E_KEYMISSING}
-
-//
-// MessageId: REGDB_E_INVALIDVALUE
-//
-// MessageText:
-//
-// Invalid value for registry
-//
- REGDB_E_INVALIDVALUE = HRESULT($80040153);
- {$EXTERNALSYM REGDB_E_INVALIDVALUE}
-
-//
-// MessageId: REGDB_E_CLASSNOTREG
-//
-// MessageText:
-//
-// Class not registered
-//
- REGDB_E_CLASSNOTREG = HRESULT($80040154);
- {$EXTERNALSYM REGDB_E_CLASSNOTREG}
-
-//
-// MessageId: REGDB_E_IIDNOTREG
-//
-// MessageText:
-//
-// Interface not registered
-//
- REGDB_E_IIDNOTREG = HRESULT($80040155);
- {$EXTERNALSYM REGDB_E_IIDNOTREG}
-
-//
-// MessageId: REGDB_E_BADTHREADINGMODEL
-//
-// MessageText:
-//
-// Threading model entry is not valid
-//
- REGDB_E_BADTHREADINGMODEL = HRESULT($80040156);
- {$EXTERNALSYM REGDB_E_BADTHREADINGMODEL}
-
- CAT_E_FIRST = DWORD($80040160);
- {$EXTERNALSYM CAT_E_FIRST}
- CAT_E_LAST = DWORD($80040161);
- {$EXTERNALSYM CAT_E_LAST}
-//
-// MessageId: CAT_E_CATIDNOEXIST
-//
-// MessageText:
-//
-// CATID does not exist
-//
- CAT_E_CATIDNOEXIST = HRESULT($80040160);
- {$EXTERNALSYM CAT_E_CATIDNOEXIST}
-
-//
-// MessageId: CAT_E_NODESCRIPTION
-//
-// MessageText:
-//
-// Description not found
-//
- CAT_E_NODESCRIPTION = HRESULT($80040161);
- {$EXTERNALSYM CAT_E_NODESCRIPTION}
-
-////////////////////////////////////
-// //
-// Class Store Error Codes //
-// //
-////////////////////////////////////
- CS_E_FIRST = DWORD($80040164);
- {$EXTERNALSYM CS_E_FIRST}
- CS_E_LAST = DWORD($8004016F);
- {$EXTERNALSYM CS_E_LAST}
-//
-// MessageId: CS_E_PACKAGE_NOTFOUND
-//
-// MessageText:
-//
-// No package in the software installation data in the Active Directory meets this criteria.
-//
- CS_E_PACKAGE_NOTFOUND = HRESULT($80040164);
- {$EXTERNALSYM CS_E_PACKAGE_NOTFOUND}
-
-//
-// MessageId: CS_E_NOT_DELETABLE
-//
-// MessageText:
-//
-// Deleting this will break the referential integrity of the software installation data in the Active Directory.
-//
- CS_E_NOT_DELETABLE = HRESULT($80040165);
- {$EXTERNALSYM CS_E_NOT_DELETABLE}
-
-//
-// MessageId: CS_E_CLASS_NOTFOUND
-//
-// MessageText:
-//
-// The CLSID was not found in the software installation data in the Active Directory.
-//
- CS_E_CLASS_NOTFOUND = HRESULT($80040166);
- {$EXTERNALSYM CS_E_CLASS_NOTFOUND}
-
-//
-// MessageId: CS_E_INVALID_VERSION
-//
-// MessageText:
-//
-// The software installation data in the Active Directory is corrupt.
-//
- CS_E_INVALID_VERSION = HRESULT($80040167);
- {$EXTERNALSYM CS_E_INVALID_VERSION}
-
-//
-// MessageId: CS_E_NO_CLASSSTORE
-//
-// MessageText:
-//
-// There is no software installation data in the Active Directory.
-//
- CS_E_NO_CLASSSTORE = HRESULT($80040168);
- {$EXTERNALSYM CS_E_NO_CLASSSTORE}
-
-//
-// MessageId: CS_E_OBJECT_NOTFOUND
-//
-// MessageText:
-//
-// There is no software installation data object in the Active Directory.
-//
- CS_E_OBJECT_NOTFOUND = HRESULT($80040169);
- {$EXTERNALSYM CS_E_OBJECT_NOTFOUND}
-
-//
-// MessageId: CS_E_OBJECT_ALREADY_EXISTS
-//
-// MessageText:
-//
-// The software installation data object in the Active Directory already exists.
-//
- CS_E_OBJECT_ALREADY_EXISTS = HRESULT($8004016A);
- {$EXTERNALSYM CS_E_OBJECT_ALREADY_EXISTS}
-
-//
-// MessageId: CS_E_INVALID_PATH
-//
-// MessageText:
-//
-// The path to the software installation data in the Active Directory is not correct.
-//
- CS_E_INVALID_PATH = HRESULT($8004016B);
- {$EXTERNALSYM CS_E_INVALID_PATH}
-
-//
-// MessageId: CS_E_NETWORK_ERROR
-//
-// MessageText:
-//
-// A network error interrupted the operation.
-//
- CS_E_NETWORK_ERROR = HRESULT($8004016C);
- {$EXTERNALSYM CS_E_NETWORK_ERROR}
-
-//
-// MessageId: CS_E_ADMIN_LIMIT_EXCEEDED
-//
-// MessageText:
-//
-// The size of this object exceeds the maximum size set by the Administrator.
-//
- CS_E_ADMIN_LIMIT_EXCEEDED = HRESULT($8004016D);
- {$EXTERNALSYM CS_E_ADMIN_LIMIT_EXCEEDED}
-
-//
-// MessageId: CS_E_SCHEMA_MISMATCH
-//
-// MessageText:
-//
-// The schema for the software installation data in the Active Directory does not match the required schema.
-//
- CS_E_SCHEMA_MISMATCH = HRESULT($8004016E);
- {$EXTERNALSYM CS_E_SCHEMA_MISMATCH}
-
-//
-// MessageId: CS_E_INTERNAL_ERROR
-//
-// MessageText:
-//
-// An error occurred in the software installation data in the Active Directory.
-//
- CS_E_INTERNAL_ERROR = HRESULT($8004016F);
- {$EXTERNALSYM CS_E_INTERNAL_ERROR}
-
- CACHE_E_FIRST = DWORD($80040170);
- {$EXTERNALSYM CACHE_E_FIRST}
- CACHE_E_LAST = DWORD($8004017F);
- {$EXTERNALSYM CACHE_E_LAST}
- CACHE_S_FIRST = DWORD($00040170);
- {$EXTERNALSYM CACHE_S_FIRST}
- CACHE_S_LAST = DWORD($0004017F);
- {$EXTERNALSYM CACHE_S_LAST}
-//
-// MessageId: CACHE_E_NOCACHE_UPDATED
-//
-// MessageText:
-//
-// Cache not updated
-//
- CACHE_E_NOCACHE_UPDATED = HRESULT($80040170);
- {$EXTERNALSYM CACHE_E_NOCACHE_UPDATED}
-
- OLEOBJ_E_FIRST = DWORD($80040180);
- {$EXTERNALSYM OLEOBJ_E_FIRST}
- OLEOBJ_E_LAST = DWORD($8004018F);
- {$EXTERNALSYM OLEOBJ_E_LAST}
- OLEOBJ_S_FIRST = DWORD($00040180);
- {$EXTERNALSYM OLEOBJ_S_FIRST}
- OLEOBJ_S_LAST = DWORD($0004018F);
- {$EXTERNALSYM OLEOBJ_S_LAST}
-//
-// MessageId: OLEOBJ_E_NOVERBS
-//
-// MessageText:
-//
-// No verbs for OLE object
-//
- OLEOBJ_E_NOVERBS = HRESULT($80040180);
- {$EXTERNALSYM OLEOBJ_E_NOVERBS}
-
-//
-// MessageId: OLEOBJ_E_INVALIDVERB
-//
-// MessageText:
-//
-// Invalid verb for OLE object
-//
- OLEOBJ_E_INVALIDVERB = HRESULT($80040181);
- {$EXTERNALSYM OLEOBJ_E_INVALIDVERB}
-
- CLIENTSITE_E_FIRST = DWORD($80040190);
- {$EXTERNALSYM CLIENTSITE_E_FIRST}
- CLIENTSITE_E_LAST = DWORD($8004019F);
- {$EXTERNALSYM CLIENTSITE_E_LAST}
- CLIENTSITE_S_FIRST = DWORD($00040190);
- {$EXTERNALSYM CLIENTSITE_S_FIRST}
- CLIENTSITE_S_LAST = DWORD($0004019F);
- {$EXTERNALSYM CLIENTSITE_S_LAST}
-//
-// MessageId: INPLACE_E_NOTUNDOABLE
-//
-// MessageText:
-//
-// Undo is not available
-//
- INPLACE_E_NOTUNDOABLE = HRESULT($800401A0);
- {$EXTERNALSYM INPLACE_E_NOTUNDOABLE}
-
-//
-// MessageId: INPLACE_E_NOTOOLSPACE
-//
-// MessageText:
-//
-// Space for tools is not available
-//
- INPLACE_E_NOTOOLSPACE = HRESULT($800401A1);
- {$EXTERNALSYM INPLACE_E_NOTOOLSPACE}
-
- INPLACE_E_FIRST = DWORD($800401A0);
- {$EXTERNALSYM INPLACE_E_FIRST}
- INPLACE_E_LAST = DWORD($800401AF);
- {$EXTERNALSYM INPLACE_E_LAST}
- INPLACE_S_FIRST = DWORD($000401A0);
- {$EXTERNALSYM INPLACE_S_FIRST}
- INPLACE_S_LAST = DWORD($000401AF);
- {$EXTERNALSYM INPLACE_S_LAST}
- ENUM_E_FIRST = DWORD($800401B0);
- {$EXTERNALSYM ENUM_E_FIRST}
- ENUM_E_LAST = DWORD($800401BF);
- {$EXTERNALSYM ENUM_E_LAST}
- ENUM_S_FIRST = DWORD($000401B0);
- {$EXTERNALSYM ENUM_S_FIRST}
- ENUM_S_LAST = DWORD($000401BF);
- {$EXTERNALSYM ENUM_S_LAST}
- CONVERT10_E_FIRST = DWORD($800401C0);
- {$EXTERNALSYM CONVERT10_E_FIRST}
- CONVERT10_E_LAST = DWORD($800401CF);
- {$EXTERNALSYM CONVERT10_E_LAST}
- CONVERT10_S_FIRST = DWORD($000401C0);
- {$EXTERNALSYM CONVERT10_S_FIRST}
- CONVERT10_S_LAST = DWORD($000401CF);
- {$EXTERNALSYM CONVERT10_S_LAST}
-//
-// MessageId: CONVERT10_E_OLESTREAM_GET
-//
-// MessageText:
-//
-// OLESTREAM Get method failed
-//
- CONVERT10_E_OLESTREAM_GET = HRESULT($800401C0);
- {$EXTERNALSYM CONVERT10_E_OLESTREAM_GET}
-
-//
-// MessageId: CONVERT10_E_OLESTREAM_PUT
-//
-// MessageText:
-//
-// OLESTREAM Put method failed
-//
- CONVERT10_E_OLESTREAM_PUT = HRESULT($800401C1);
- {$EXTERNALSYM CONVERT10_E_OLESTREAM_PUT}
-
-//
-// MessageId: CONVERT10_E_OLESTREAM_FMT
-//
-// MessageText:
-//
-// Contents of the OLESTREAM not in correct format
-//
- CONVERT10_E_OLESTREAM_FMT = HRESULT($800401C2);
- {$EXTERNALSYM CONVERT10_E_OLESTREAM_FMT}
-
-//
-// MessageId: CONVERT10_E_OLESTREAM_BITMAP_TO_DIB
-//
-// MessageText:
-//
-// There was an error in a Windows GDI call while converting the bitmap to a DIB
-//
- CONVERT10_E_OLESTREAM_BITMAP_TO_DIB = HRESULT($800401C3);
- {$EXTERNALSYM CONVERT10_E_OLESTREAM_BITMAP_TO_DIB}
-
-//
-// MessageId: CONVERT10_E_STG_FMT
-//
-// MessageText:
-//
-// Contents of the IStorage not in correct format
-//
- CONVERT10_E_STG_FMT = HRESULT($800401C4);
- {$EXTERNALSYM CONVERT10_E_STG_FMT}
-
-//
-// MessageId: CONVERT10_E_STG_NO_STD_STREAM
-//
-// MessageText:
-//
-// Contents of IStorage is missing one of the standard streams
-//
- CONVERT10_E_STG_NO_STD_STREAM = HRESULT($800401C5);
- {$EXTERNALSYM CONVERT10_E_STG_NO_STD_STREAM}
-
-//
-// MessageId: CONVERT10_E_STG_DIB_TO_BITMAP
-//
-// MessageText:
-//
-// There was an error in a Windows GDI call while converting the DIB to a bitmap.
-//
-//
- CONVERT10_E_STG_DIB_TO_BITMAP = HRESULT($800401C6);
- {$EXTERNALSYM CONVERT10_E_STG_DIB_TO_BITMAP}
-
- CLIPBRD_E_FIRST = DWORD($800401D0);
- {$EXTERNALSYM CLIPBRD_E_FIRST}
- CLIPBRD_E_LAST = DWORD($800401DF);
- {$EXTERNALSYM CLIPBRD_E_LAST}
- CLIPBRD_S_FIRST = DWORD($000401D0);
- {$EXTERNALSYM CLIPBRD_S_FIRST}
- CLIPBRD_S_LAST = DWORD($000401DF);
- {$EXTERNALSYM CLIPBRD_S_LAST}
-//
-// MessageId: CLIPBRD_E_CANT_OPEN
-//
-// MessageText:
-//
-// OpenClipboard Failed
-//
- CLIPBRD_E_CANT_OPEN = HRESULT($800401D0);
- {$EXTERNALSYM CLIPBRD_E_CANT_OPEN}
-
-//
-// MessageId: CLIPBRD_E_CANT_EMPTY
-//
-// MessageText:
-//
-// EmptyClipboard Failed
-//
- CLIPBRD_E_CANT_EMPTY = HRESULT($800401D1);
- {$EXTERNALSYM CLIPBRD_E_CANT_EMPTY}
-
-//
-// MessageId: CLIPBRD_E_CANT_SET
-//
-// MessageText:
-//
-// SetClipboard Failed
-//
- CLIPBRD_E_CANT_SET = HRESULT($800401D2);
- {$EXTERNALSYM CLIPBRD_E_CANT_SET}
-
-//
-// MessageId: CLIPBRD_E_BAD_DATA
-//
-// MessageText:
-//
-// Data on clipboard is invalid
-//
- CLIPBRD_E_BAD_DATA = HRESULT($800401D3);
- {$EXTERNALSYM CLIPBRD_E_BAD_DATA}
-
-//
-// MessageId: CLIPBRD_E_CANT_CLOSE
-//
-// MessageText:
-//
-// CloseClipboard Failed
-//
- CLIPBRD_E_CANT_CLOSE = HRESULT($800401D4);
- {$EXTERNALSYM CLIPBRD_E_CANT_CLOSE}
-
- MK_E_FIRST = DWORD($800401E0);
- {$EXTERNALSYM MK_E_FIRST}
- MK_E_LAST = DWORD($800401EF);
- {$EXTERNALSYM MK_E_LAST}
- MK_S_FIRST = DWORD($000401E0);
- {$EXTERNALSYM MK_S_FIRST}
- MK_S_LAST = DWORD($000401EF);
- {$EXTERNALSYM MK_S_LAST}
-//
-// MessageId: MK_E_CONNECTMANUALLY
-//
-// MessageText:
-//
-// Moniker needs to be connected manually
-//
- MK_E_CONNECTMANUALLY = HRESULT($800401E0);
- {$EXTERNALSYM MK_E_CONNECTMANUALLY}
-
-//
-// MessageId: MK_E_EXCEEDEDDEADLINE
-//
-// MessageText:
-//
-// Operation exceeded deadline
-//
- MK_E_EXCEEDEDDEADLINE = HRESULT($800401E1);
- {$EXTERNALSYM MK_E_EXCEEDEDDEADLINE}
-
-//
-// MessageId: MK_E_NEEDGENERIC
-//
-// MessageText:
-//
-// Moniker needs to be generic
-//
- MK_E_NEEDGENERIC = HRESULT($800401E2);
- {$EXTERNALSYM MK_E_NEEDGENERIC}
-
-//
-// MessageId: MK_E_UNAVAILABLE
-//
-// MessageText:
-//
-// Operation unavailable
-//
- MK_E_UNAVAILABLE = HRESULT($800401E3);
- {$EXTERNALSYM MK_E_UNAVAILABLE}
-
-//
-// MessageId: MK_E_SYNTAX
-//
-// MessageText:
-//
-// Invalid syntax
-//
- MK_E_SYNTAX = HRESULT($800401E4);
- {$EXTERNALSYM MK_E_SYNTAX}
-
-//
-// MessageId: MK_E_NOOBJECT
-//
-// MessageText:
-//
-// No object for moniker
-//
- MK_E_NOOBJECT = HRESULT($800401E5);
- {$EXTERNALSYM MK_E_NOOBJECT}
-
-//
-// MessageId: MK_E_INVALIDEXTENSION
-//
-// MessageText:
-//
-// Bad extension for file
-//
- MK_E_INVALIDEXTENSION = HRESULT($800401E6);
- {$EXTERNALSYM MK_E_INVALIDEXTENSION}
-
-//
-// MessageId: MK_E_INTERMEDIATEINTERFACENOTSUPPORTED
-//
-// MessageText:
-//
-// Intermediate operation failed
-//
- MK_E_INTERMEDIATEINTERFACENOTSUPPORTED = HRESULT($800401E7);
- {$EXTERNALSYM MK_E_INTERMEDIATEINTERFACENOTSUPPORTED}
-
-//
-// MessageId: MK_E_NOTBINDABLE
-//
-// MessageText:
-//
-// Moniker is not bindable
-//
- MK_E_NOTBINDABLE = HRESULT($800401E8);
- {$EXTERNALSYM MK_E_NOTBINDABLE}
-
-//
-// MessageId: MK_E_NOTBOUND
-//
-// MessageText:
-//
-// Moniker is not bound
-//
- MK_E_NOTBOUND = HRESULT($800401E9);
- {$EXTERNALSYM MK_E_NOTBOUND}
-
-//
-// MessageId: MK_E_CANTOPENFILE
-//
-// MessageText:
-//
-// Moniker cannot open file
-//
- MK_E_CANTOPENFILE = HRESULT($800401EA);
- {$EXTERNALSYM MK_E_CANTOPENFILE}
-
-//
-// MessageId: MK_E_MUSTBOTHERUSER
-//
-// MessageText:
-//
-// User input required for operation to succeed
-//
- MK_E_MUSTBOTHERUSER = HRESULT($800401EB);
- {$EXTERNALSYM MK_E_MUSTBOTHERUSER}
-
-//
-// MessageId: MK_E_NOINVERSE
-//
-// MessageText:
-//
-// Moniker class has no inverse
-//
- MK_E_NOINVERSE = HRESULT($800401EC);
- {$EXTERNALSYM MK_E_NOINVERSE}
-
-//
-// MessageId: MK_E_NOSTORAGE
-//
-// MessageText:
-//
-// Moniker does not refer to storage
-//
- MK_E_NOSTORAGE = HRESULT($800401ED);
- {$EXTERNALSYM MK_E_NOSTORAGE}
-
-//
-// MessageId: MK_E_NOPREFIX
-//
-// MessageText:
-//
-// No common prefix
-//
- MK_E_NOPREFIX = HRESULT($800401EE);
- {$EXTERNALSYM MK_E_NOPREFIX}
-
-//
-// MessageId: MK_E_ENUMERATION_FAILED
-//
-// MessageText:
-//
-// Moniker could not be enumerated
-//
- MK_E_ENUMERATION_FAILED = HRESULT($800401EF);
- {$EXTERNALSYM MK_E_ENUMERATION_FAILED}
-
- CO_E_FIRST = DWORD($800401F0);
- {$EXTERNALSYM CO_E_FIRST}
- CO_E_LAST = DWORD($800401FF);
- {$EXTERNALSYM CO_E_LAST}
- CO_S_FIRST = DWORD($000401F0);
- {$EXTERNALSYM CO_S_FIRST}
- CO_S_LAST = DWORD($000401FF);
- {$EXTERNALSYM CO_S_LAST}
-//
-// MessageId: CO_E_NOTINITIALIZED
-//
-// MessageText:
-//
-// CoInitialize has not been called.
-//
- CO_E_NOTINITIALIZED = HRESULT($800401F0);
- {$EXTERNALSYM CO_E_NOTINITIALIZED}
-
-//
-// MessageId: CO_E_ALREADYINITIALIZED
-//
-// MessageText:
-//
-// CoInitialize has already been called.
-//
- CO_E_ALREADYINITIALIZED = HRESULT($800401F1);
- {$EXTERNALSYM CO_E_ALREADYINITIALIZED}
-
-//
-// MessageId: CO_E_CANTDETERMINECLASS
-//
-// MessageText:
-//
-// Class of object cannot be determined
-//
- CO_E_CANTDETERMINECLASS = HRESULT($800401F2);
- {$EXTERNALSYM CO_E_CANTDETERMINECLASS}
-
-//
-// MessageId: CO_E_CLASSSTRING
-//
-// MessageText:
-//
-// Invalid class string
-//
- CO_E_CLASSSTRING = HRESULT($800401F3);
- {$EXTERNALSYM CO_E_CLASSSTRING}
-
-//
-// MessageId: CO_E_IIDSTRING
-//
-// MessageText:
-//
-// Invalid interface string
-//
- CO_E_IIDSTRING = HRESULT($800401F4);
- {$EXTERNALSYM CO_E_IIDSTRING}
-
-//
-// MessageId: CO_E_APPNOTFOUND
-//
-// MessageText:
-//
-// Application not found
-//
- CO_E_APPNOTFOUND = HRESULT($800401F5);
- {$EXTERNALSYM CO_E_APPNOTFOUND}
-
-//
-// MessageId: CO_E_APPSINGLEUSE
-//
-// MessageText:
-//
-// Application cannot be run more than once
-//
- CO_E_APPSINGLEUSE = HRESULT($800401F6);
- {$EXTERNALSYM CO_E_APPSINGLEUSE}
-
-//
-// MessageId: CO_E_ERRORINAPP
-//
-// MessageText:
-//
-// Some error in application program
-//
- CO_E_ERRORINAPP = HRESULT($800401F7);
- {$EXTERNALSYM CO_E_ERRORINAPP}
-
-//
-// MessageId: CO_E_DLLNOTFOUND
-//
-// MessageText:
-//
-// DLL for class not found
-//
- CO_E_DLLNOTFOUND = HRESULT($800401F8);
- {$EXTERNALSYM CO_E_DLLNOTFOUND}
-
-//
-// MessageId: CO_E_ERRORINDLL
-//
-// MessageText:
-//
-// Error in the DLL
-//
- CO_E_ERRORINDLL = HRESULT($800401F9);
- {$EXTERNALSYM CO_E_ERRORINDLL}
-
-//
-// MessageId: CO_E_WRONGOSFORAPP
-//
-// MessageText:
-//
-// Wrong OS or OS version for application
-//
- CO_E_WRONGOSFORAPP = HRESULT($800401FA);
- {$EXTERNALSYM CO_E_WRONGOSFORAPP}
-
-//
-// MessageId: CO_E_OBJNOTREG
-//
-// MessageText:
-//
-// Object is not registered
-//
- CO_E_OBJNOTREG = HRESULT($800401FB);
- {$EXTERNALSYM CO_E_OBJNOTREG}
-
-//
-// MessageId: CO_E_OBJISREG
-//
-// MessageText:
-//
-// Object is already registered
-//
- CO_E_OBJISREG = HRESULT($800401FC);
- {$EXTERNALSYM CO_E_OBJISREG}
-
-//
-// MessageId: CO_E_OBJNOTCONNECTED
-//
-// MessageText:
-//
-// Object is not connected to server
-//
- CO_E_OBJNOTCONNECTED = HRESULT($800401FD);
- {$EXTERNALSYM CO_E_OBJNOTCONNECTED}
-
-//
-// MessageId: CO_E_APPDIDNTREG
-//
-// MessageText:
-//
-// Application was launched but it didn't register a class factory
-//
- CO_E_APPDIDNTREG = HRESULT($800401FE);
- {$EXTERNALSYM CO_E_APPDIDNTREG}
-
-//
-// MessageId: CO_E_RELEASED
-//
-// MessageText:
-//
-// Object has been released
-//
- CO_E_RELEASED = HRESULT($800401FF);
- {$EXTERNALSYM CO_E_RELEASED}
-
- EVENT_E_FIRST = DWORD($80040200);
- {$EXTERNALSYM EVENT_E_FIRST}
- EVENT_E_LAST = DWORD($8004021F);
- {$EXTERNALSYM EVENT_E_LAST}
- EVENT_S_FIRST = DWORD($00040200);
- {$EXTERNALSYM EVENT_S_FIRST}
- EVENT_S_LAST = DWORD($0004021F);
- {$EXTERNALSYM EVENT_S_LAST}
-//
-// MessageId: EVENT_S_SOME_SUBSCRIBERS_FAILED
-//
-// MessageText:
-//
-// An event was able to invoke some but not all of the subscribers
-//
- EVENT_S_SOME_SUBSCRIBERS_FAILED = HRESULT($00040200);
- {$EXTERNALSYM EVENT_S_SOME_SUBSCRIBERS_FAILED}
-
-//
-// MessageId: EVENT_E_ALL_SUBSCRIBERS_FAILED
-//
-// MessageText:
-//
-// An event was unable to invoke any of the subscribers
-//
- EVENT_E_ALL_SUBSCRIBERS_FAILED = HRESULT($80040201);
- {$EXTERNALSYM EVENT_E_ALL_SUBSCRIBERS_FAILED}
-
-//
-// MessageId: EVENT_S_NOSUBSCRIBERS
-//
-// MessageText:
-//
-// An event was delivered but there were no subscribers
-//
- EVENT_S_NOSUBSCRIBERS = HRESULT($00040202);
- {$EXTERNALSYM EVENT_S_NOSUBSCRIBERS}
-
-//
-// MessageId: EVENT_E_QUERYSYNTAX
-//
-// MessageText:
-//
-// A syntax error occurred trying to evaluate a query string
-//
- EVENT_E_QUERYSYNTAX = HRESULT($80040203);
- {$EXTERNALSYM EVENT_E_QUERYSYNTAX}
-
-//
-// MessageId: EVENT_E_QUERYFIELD
-//
-// MessageText:
-//
-// An invalid field name was used in a query string
-//
- EVENT_E_QUERYFIELD = HRESULT($80040204);
- {$EXTERNALSYM EVENT_E_QUERYFIELD}
-
-//
-// MessageId: EVENT_E_INTERNALEXCEPTION
-//
-// MessageText:
-//
-// An unexpected exception was raised
-//
- EVENT_E_INTERNALEXCEPTION = HRESULT($80040205);
- {$EXTERNALSYM EVENT_E_INTERNALEXCEPTION}
-
-//
-// MessageId: EVENT_E_INTERNALERROR
-//
-// MessageText:
-//
-// An unexpected internal error was detected
-//
- EVENT_E_INTERNALERROR = HRESULT($80040206);
- {$EXTERNALSYM EVENT_E_INTERNALERROR}
-
-//
-// MessageId: EVENT_E_INVALID_PER_USER_SID
-//
-// MessageText:
-//
-// The owner SID on a per-user subscription doesn't exist
-//
- EVENT_E_INVALID_PER_USER_SID = HRESULT($80040207);
- {$EXTERNALSYM EVENT_E_INVALID_PER_USER_SID}
-
-//
-// MessageId: EVENT_E_USER_EXCEPTION
-//
-// MessageText:
-//
-// A user-supplied component or subscriber raised an exception
-//
- EVENT_E_USER_EXCEPTION = HRESULT($80040208);
- {$EXTERNALSYM EVENT_E_USER_EXCEPTION}
-
-//
-// MessageId: EVENT_E_TOO_MANY_METHODS
-//
-// MessageText:
-//
-// An interface has too many methods to fire events from
-//
- EVENT_E_TOO_MANY_METHODS = HRESULT($80040209);
- {$EXTERNALSYM EVENT_E_TOO_MANY_METHODS}
-
-//
-// MessageId: EVENT_E_MISSING_EVENTCLASS
-//
-// MessageText:
-//
-// A subscription cannot be stored unless its event class already exists
-//
- EVENT_E_MISSING_EVENTCLASS = HRESULT($8004020A);
- {$EXTERNALSYM EVENT_E_MISSING_EVENTCLASS}
-
-//
-// MessageId: EVENT_E_NOT_ALL_REMOVED
-//
-// MessageText:
-//
-// Not all the objects requested could be removed
-//
- EVENT_E_NOT_ALL_REMOVED = HRESULT($8004020B);
- {$EXTERNALSYM EVENT_E_NOT_ALL_REMOVED}
-
-//
-// MessageId: EVENT_E_COMPLUS_NOT_INSTALLED
-//
-// MessageText:
-//
-// COM+ is required for this operation, but is not installed
-//
- EVENT_E_COMPLUS_NOT_INSTALLED = HRESULT($8004020C);
- {$EXTERNALSYM EVENT_E_COMPLUS_NOT_INSTALLED}
-
-//
-// MessageId: EVENT_E_CANT_MODIFY_OR_DELETE_UNCONFIGURED_OBJECT
-//
-// MessageText:
-//
-// Cannot modify or delete an object that was not added using the COM+ Admin SDK
-//
- EVENT_E_CANT_MODIFY_OR_DELETE_UNCONFIGURED_OBJECT = HRESULT($8004020D);
- {$EXTERNALSYM EVENT_E_CANT_MODIFY_OR_DELETE_UNCONFIGURED_OBJECT}
-
-//
-// MessageId: EVENT_E_CANT_MODIFY_OR_DELETE_CONFIGURED_OBJECT
-//
-// MessageText:
-//
-// Cannot modify or delete an object that was added using the COM+ Admin SDK
-//
- EVENT_E_CANT_MODIFY_OR_DELETE_CONFIGURED_OBJECT = HRESULT($8004020E);
- {$EXTERNALSYM EVENT_E_CANT_MODIFY_OR_DELETE_CONFIGURED_OBJECT}
-
-//
-// MessageId: EVENT_E_INVALID_EVENT_CLASS_PARTITION
-//
-// MessageText:
-//
-// The event class for this subscription is in an invalid partition
-//
- EVENT_E_INVALID_EVENT_CLASS_PARTITION = HRESULT($8004020F);
- {$EXTERNALSYM EVENT_E_INVALID_EVENT_CLASS_PARTITION}
-
-//
-// MessageId: EVENT_E_PER_USER_SID_NOT_LOGGED_ON
-//
-// MessageText:
-//
-// The owner of the PerUser subscription is not logged on to the system specified
-//
- EVENT_E_PER_USER_SID_NOT_LOGGED_ON = HRESULT($80040210);
- {$EXTERNALSYM EVENT_E_PER_USER_SID_NOT_LOGGED_ON}
-
- XACT_E_FIRST = $8004D000;
- {$EXTERNALSYM XACT_E_FIRST}
- XACT_E_LAST = $8004D029;
- {$EXTERNALSYM XACT_E_LAST}
- XACT_S_FIRST = $0004D000;
- {$EXTERNALSYM XACT_S_FIRST}
- XACT_S_LAST = $0004D010;
- {$EXTERNALSYM XACT_S_LAST}
-//
-// MessageId: XACT_E_ALREADYOTHERSINGLEPHASE
-//
-// MessageText:
-//
-// Another single phase resource manager has already been enlisted in this transaction.
-//
- XACT_E_ALREADYOTHERSINGLEPHASE = HRESULT($8004D000);
- {$EXTERNALSYM XACT_E_ALREADYOTHERSINGLEPHASE}
-
-//
-// MessageId: XACT_E_CANTRETAIN
-//
-// MessageText:
-//
-// A retaining commit or abort is not supported
-//
- XACT_E_CANTRETAIN = HRESULT($8004D001);
- {$EXTERNALSYM XACT_E_CANTRETAIN}
-
-//
-// MessageId: XACT_E_COMMITFAILED
-//
-// MessageText:
-//
-// The transaction failed to commit for an unknown reason. The transaction was aborted.
-//
- XACT_E_COMMITFAILED = HRESULT($8004D002);
- {$EXTERNALSYM XACT_E_COMMITFAILED}
-
-//
-// MessageId: XACT_E_COMMITPREVENTED
-//
-// MessageText:
-//
-// Cannot call commit on this transaction object because the calling application did not initiate the transaction.
-//
- XACT_E_COMMITPREVENTED = HRESULT($8004D003);
- {$EXTERNALSYM XACT_E_COMMITPREVENTED}
-
-//
-// MessageId: XACT_E_HEURISTICABORT
-//
-// MessageText:
-//
-// Instead of committing, the resource heuristically aborted.
-//
- XACT_E_HEURISTICABORT = HRESULT($8004D004);
- {$EXTERNALSYM XACT_E_HEURISTICABORT}
-
-//
-// MessageId: XACT_E_HEURISTICCOMMIT
-//
-// MessageText:
-//
-// Instead of aborting, the resource heuristically committed.
-//
- XACT_E_HEURISTICCOMMIT = HRESULT($8004D005);
- {$EXTERNALSYM XACT_E_HEURISTICCOMMIT}
-
-//
-// MessageId: XACT_E_HEURISTICDAMAGE
-//
-// MessageText:
-//
-// Some of the states of the resource were committed while others were aborted, likely because of heuristic decisions.
-//
- XACT_E_HEURISTICDAMAGE = HRESULT($8004D006);
- {$EXTERNALSYM XACT_E_HEURISTICDAMAGE}
-
-//
-// MessageId: XACT_E_HEURISTICDANGER
-//
-// MessageText:
-//
-// Some of the states of the resource may have been committed while others may have been aborted, likely because of heuristic decisions.
-//
- XACT_E_HEURISTICDANGER = HRESULT($8004D007);
- {$EXTERNALSYM XACT_E_HEURISTICDANGER}
-
-//
-// MessageId: XACT_E_ISOLATIONLEVEL
-//
-// MessageText:
-//
-// The requested isolation level is not valid or supported.
-//
- XACT_E_ISOLATIONLEVEL = HRESULT($8004D008);
- {$EXTERNALSYM XACT_E_ISOLATIONLEVEL}
-
-//
-// MessageId: XACT_E_NOASYNC
-//
-// MessageText:
-//
-// The transaction manager doesn't support an asynchronous operation for this method.
-//
- XACT_E_NOASYNC = HRESULT($8004D009);
- {$EXTERNALSYM XACT_E_NOASYNC}
-
-//
-// MessageId: XACT_E_NOENLIST
-//
-// MessageText:
-//
-// Unable to enlist in the transaction.
-//
- XACT_E_NOENLIST = HRESULT($8004D00A);
- {$EXTERNALSYM XACT_E_NOENLIST}
-
-//
-// MessageId: XACT_E_NOISORETAIN
-//
-// MessageText:
-//
-// The requested semantics of retention of isolation across retaining commit and abort boundaries cannot be supported by this transaction implementation, or isoFlags was not equal to zero.
-//
- XACT_E_NOISORETAIN = HRESULT($8004D00B);
- {$EXTERNALSYM XACT_E_NOISORETAIN}
-
-//
-// MessageId: XACT_E_NORESOURCE
-//
-// MessageText:
-//
-// There is no resource presently associated with this enlistment
-//
- XACT_E_NORESOURCE = HRESULT($8004D00C);
- {$EXTERNALSYM XACT_E_NORESOURCE}
-
-//
-// MessageId: XACT_E_NOTCURRENT
-//
-// MessageText:
-//
-// The transaction failed to commit due to the failure of optimistic concurrency control in at least one of the resource managers.
-//
- XACT_E_NOTCURRENT = HRESULT($8004D00D);
- {$EXTERNALSYM XACT_E_NOTCURRENT}
-
-//
-// MessageId: XACT_E_NOTRANSACTION
-//
-// MessageText:
-//
-// The transaction has already been implicitly or explicitly committed or aborted
-//
- XACT_E_NOTRANSACTION = HRESULT($8004D00E);
- {$EXTERNALSYM XACT_E_NOTRANSACTION}
-
-//
-// MessageId: XACT_E_NOTSUPPORTED
-//
-// MessageText:
-//
-// An invalid combination of flags was specified
-//
- XACT_E_NOTSUPPORTED = HRESULT($8004D00F);
- {$EXTERNALSYM XACT_E_NOTSUPPORTED}
-
-//
-// MessageId: XACT_E_UNKNOWNRMGRID
-//
-// MessageText:
-//
-// The resource manager id is not associated with this transaction or the transaction manager.
-//
- XACT_E_UNKNOWNRMGRID = HRESULT($8004D010);
- {$EXTERNALSYM XACT_E_UNKNOWNRMGRID}
-
-//
-// MessageId: XACT_E_WRONGSTATE
-//
-// MessageText:
-//
-// This method was called in the wrong state
-//
- XACT_E_WRONGSTATE = HRESULT($8004D011);
- {$EXTERNALSYM XACT_E_WRONGSTATE}
-
-//
-// MessageId: XACT_E_WRONGUOW
-//
-// MessageText:
-//
-// The indicated unit of work does not match the unit of work expected by the resource manager.
-//
- XACT_E_WRONGUOW = HRESULT($8004D012);
- {$EXTERNALSYM XACT_E_WRONGUOW}
-
-//
-// MessageId: XACT_E_XTIONEXISTS
-//
-// MessageText:
-//
-// An enlistment in a transaction already exists.
-//
- XACT_E_XTIONEXISTS = HRESULT($8004D013);
- {$EXTERNALSYM XACT_E_XTIONEXISTS}
-
-//
-// MessageId: XACT_E_NOIMPORTOBJECT
-//
-// MessageText:
-//
-// An import object for the transaction could not be found.
-//
- XACT_E_NOIMPORTOBJECT = HRESULT($8004D014);
- {$EXTERNALSYM XACT_E_NOIMPORTOBJECT}
-
-//
-// MessageId: XACT_E_INVALIDCOOKIE
-//
-// MessageText:
-//
-// The transaction cookie is invalid.
-//
- XACT_E_INVALIDCOOKIE = HRESULT($8004D015);
- {$EXTERNALSYM XACT_E_INVALIDCOOKIE}
-
-//
-// MessageId: XACT_E_INDOUBT
-//
-// MessageText:
-//
-// The transaction status is in doubt. A communication failure occurred, or a transaction manager or resource manager has failed
-//
- XACT_E_INDOUBT = HRESULT($8004D016);
- {$EXTERNALSYM XACT_E_INDOUBT}
-
-//
-// MessageId: XACT_E_NOTIMEOUT
-//
-// MessageText:
-//
-// A time-out was specified, but time-outs are not supported.
-//
- XACT_E_NOTIMEOUT = HRESULT($8004D017);
- {$EXTERNALSYM XACT_E_NOTIMEOUT}
-
-//
-// MessageId: XACT_E_ALREADYINPROGRESS
-//
-// MessageText:
-//
-// The requested operation is already in progress for the transaction.
-//
- XACT_E_ALREADYINPROGRESS = HRESULT($8004D018);
- {$EXTERNALSYM XACT_E_ALREADYINPROGRESS}
-
-//
-// MessageId: XACT_E_ABORTED
-//
-// MessageText:
-//
-// The transaction has already been aborted.
-//
- XACT_E_ABORTED = HRESULT($8004D019);
- {$EXTERNALSYM XACT_E_ABORTED}
-
-//
-// MessageId: XACT_E_LOGFULL
-//
-// MessageText:
-//
-// The Transaction Manager returned a log full error.
-//
- XACT_E_LOGFULL = HRESULT($8004D01A);
- {$EXTERNALSYM XACT_E_LOGFULL}
-
-//
-// MessageId: XACT_E_TMNOTAVAILABLE
-//
-// MessageText:
-//
-// The Transaction Manager is not available.
-//
- XACT_E_TMNOTAVAILABLE = HRESULT($8004D01B);
- {$EXTERNALSYM XACT_E_TMNOTAVAILABLE}
-
-//
-// MessageId: XACT_E_CONNECTION_DOWN
-//
-// MessageText:
-//
-// A connection with the transaction manager was lost.
-//
- XACT_E_CONNECTION_DOWN = HRESULT($8004D01C);
- {$EXTERNALSYM XACT_E_CONNECTION_DOWN}
-
-//
-// MessageId: XACT_E_CONNECTION_DENIED
-//
-// MessageText:
-//
-// A request to establish a connection with the transaction manager was denied.
-//
- XACT_E_CONNECTION_DENIED = HRESULT($8004D01D);
- {$EXTERNALSYM XACT_E_CONNECTION_DENIED}
-
-//
-// MessageId: XACT_E_REENLISTTIMEOUT
-//
-// MessageText:
-//
-// Resource manager reenlistment to determine transaction status timed out.
-//
- XACT_E_REENLISTTIMEOUT = HRESULT($8004D01E);
- {$EXTERNALSYM XACT_E_REENLISTTIMEOUT}
-
-//
-// MessageId: XACT_E_TIP_CONNECT_FAILED
-//
-// MessageText:
-//
-// This transaction manager failed to establish a connection with another TIP transaction manager.
-//
- XACT_E_TIP_CONNECT_FAILED = HRESULT($8004D01F);
- {$EXTERNALSYM XACT_E_TIP_CONNECT_FAILED}
-
-//
-// MessageId: XACT_E_TIP_PROTOCOL_ERROR
-//
-// MessageText:
-//
-// This transaction manager encountered a protocol error with another TIP transaction manager.
-//
- XACT_E_TIP_PROTOCOL_ERROR = HRESULT($8004D020);
- {$EXTERNALSYM XACT_E_TIP_PROTOCOL_ERROR}
-
-//
-// MessageId: XACT_E_TIP_PULL_FAILED
-//
-// MessageText:
-//
-// This transaction manager could not propagate a transaction from another TIP transaction manager.
-//
- XACT_E_TIP_PULL_FAILED = HRESULT($8004D021);
- {$EXTERNALSYM XACT_E_TIP_PULL_FAILED}
-
-//
-// MessageId: XACT_E_DEST_TMNOTAVAILABLE
-//
-// MessageText:
-//
-// The Transaction Manager on the destination machine is not available.
-//
- XACT_E_DEST_TMNOTAVAILABLE = HRESULT($8004D022);
- {$EXTERNALSYM XACT_E_DEST_TMNOTAVAILABLE}
-
-//
-// MessageId: XACT_E_TIP_DISABLED
-//
-// MessageText:
-//
-// The Transaction Manager has disabled its support for TIP.
-//
- XACT_E_TIP_DISABLED = HRESULT($8004D023);
- {$EXTERNALSYM XACT_E_TIP_DISABLED}
-
-//
-// MessageId: XACT_E_NETWORK_TX_DISABLED
-//
-// MessageText:
-//
-// The transaction manager has disabled its support for remote/network transactions.
-//
- XACT_E_NETWORK_TX_DISABLED = HRESULT($8004D024);
- {$EXTERNALSYM XACT_E_NETWORK_TX_DISABLED}
-
-//
-// MessageId: XACT_E_PARTNER_NETWORK_TX_DISABLED
-//
-// MessageText:
-//
-// The partner transaction manager has disabled its support for remote/network transactions.
-//
- XACT_E_PARTNER_NETWORK_TX_DISABLED = HRESULT($8004D025);
- {$EXTERNALSYM XACT_E_PARTNER_NETWORK_TX_DISABLED}
-
-//
-// MessageId: XACT_E_XA_TX_DISABLED
-//
-// MessageText:
-//
-// The transaction manager has disabled its support for XA transactions.
-//
- XACT_E_XA_TX_DISABLED = HRESULT($8004D026);
- {$EXTERNALSYM XACT_E_XA_TX_DISABLED}
-
-//
-// MessageId: XACT_E_UNABLE_TO_READ_DTC_CONFIG
-//
-// MessageText:
-//
-// MSDTC was unable to read its configuration information.
-//
- XACT_E_UNABLE_TO_READ_DTC_CONFIG = HRESULT($8004D027);
- {$EXTERNALSYM XACT_E_UNABLE_TO_READ_DTC_CONFIG}
-
-//
-// MessageId: XACT_E_UNABLE_TO_LOAD_DTC_PROXY
-//
-// MessageText:
-//
-// MSDTC was unable to load the dtc proxy dll.
-//
- XACT_E_UNABLE_TO_LOAD_DTC_PROXY = HRESULT($8004D028);
- {$EXTERNALSYM XACT_E_UNABLE_TO_LOAD_DTC_PROXY}
-
-//
-// MessageId: XACT_E_ABORTING
-//
-// MessageText:
-//
-// The local transaction has aborted.
-//
- XACT_E_ABORTING = HRESULT($8004D029);
- {$EXTERNALSYM XACT_E_ABORTING}
-
-//
-// TXF & CRM errors start 4d080.
-//
-// MessageId: XACT_E_CLERKNOTFOUND
-//
-// MessageText:
-//
-// XACT_E_CLERKNOTFOUND
-//
- XACT_E_CLERKNOTFOUND = HRESULT($8004D080);
- {$EXTERNALSYM XACT_E_CLERKNOTFOUND}
-
-//
-// MessageId: XACT_E_CLERKEXISTS
-//
-// MessageText:
-//
-// XACT_E_CLERKEXISTS
-//
- XACT_E_CLERKEXISTS = HRESULT($8004D081);
- {$EXTERNALSYM XACT_E_CLERKEXISTS}
-
-//
-// MessageId: XACT_E_RECOVERYINPROGRESS
-//
-// MessageText:
-//
-// XACT_E_RECOVERYINPROGRESS
-//
- XACT_E_RECOVERYINPROGRESS = HRESULT($8004D082);
- {$EXTERNALSYM XACT_E_RECOVERYINPROGRESS}
-
-//
-// MessageId: XACT_E_TRANSACTIONCLOSED
-//
-// MessageText:
-//
-// XACT_E_TRANSACTIONCLOSED
-//
- XACT_E_TRANSACTIONCLOSED = HRESULT($8004D083);
- {$EXTERNALSYM XACT_E_TRANSACTIONCLOSED}
-
-//
-// MessageId: XACT_E_INVALIDLSN
-//
-// MessageText:
-//
-// XACT_E_INVALIDLSN
-//
- XACT_E_INVALIDLSN = HRESULT($8004D084);
- {$EXTERNALSYM XACT_E_INVALIDLSN}
-
-//
-// MessageId: XACT_E_REPLAYREQUEST
-//
-// MessageText:
-//
-// XACT_E_REPLAYREQUEST
-//
- XACT_E_REPLAYREQUEST = HRESULT($8004D085);
- {$EXTERNALSYM XACT_E_REPLAYREQUEST}
-
-//
-// OleTx Success codes.
-//
-//
-// MessageId: XACT_S_ASYNC
-//
-// MessageText:
-//
-// An asynchronous operation was specified. The operation has begun, but its outcome is not known yet.
-//
- XACT_S_ASYNC = HRESULT($0004D000);
- {$EXTERNALSYM XACT_S_ASYNC}
-
-//
-// MessageId: XACT_S_DEFECT
-//
-// MessageText:
-//
-// XACT_S_DEFECT
-//
- XACT_S_DEFECT = HRESULT($0004D001);
- {$EXTERNALSYM XACT_S_DEFECT}
-
-//
-// MessageId: XACT_S_READONLY
-//
-// MessageText:
-//
-// The method call succeeded because the transaction was read-only.
-//
- XACT_S_READONLY = HRESULT($0004D002);
- {$EXTERNALSYM XACT_S_READONLY}
-
-//
-// MessageId: XACT_S_SOMENORETAIN
-//
-// MessageText:
-//
-// The transaction was successfully aborted. However, this is a coordinated transaction, and some number of enlisted resources were aborted outright because they could not support abort-retaining semantics
-//
- XACT_S_SOMENORETAIN = HRESULT($0004D003);
- {$EXTERNALSYM XACT_S_SOMENORETAIN}
-
-//
-// MessageId: XACT_S_OKINFORM
-//
-// MessageText:
-//
-// No changes were made during this call, but the sink wants another chance to look if any other sinks make further changes.
-//
- XACT_S_OKINFORM = HRESULT($0004D004);
- {$EXTERNALSYM XACT_S_OKINFORM}
-
-//
-// MessageId: XACT_S_MADECHANGESCONTENT
-//
-// MessageText:
-//
-// The sink is content and wishes the transaction to proceed. Changes were made to one or more resources during this call.
-//
- XACT_S_MADECHANGESCONTENT = HRESULT($0004D005);
- {$EXTERNALSYM XACT_S_MADECHANGESCONTENT}
-
-//
-// MessageId: XACT_S_MADECHANGESINFORM
-//
-// MessageText:
-//
-// The sink is for the moment and wishes the transaction to proceed, but if other changes are made following this return by other event sinks then this sink wants another chance to look
-//
- XACT_S_MADECHANGESINFORM = HRESULT($0004D006);
- {$EXTERNALSYM XACT_S_MADECHANGESINFORM}
-
-//
-// MessageId: XACT_S_ALLNORETAIN
-//
-// MessageText:
-//
-// The transaction was successfully aborted. However, the abort was non-retaining.
-//
- XACT_S_ALLNORETAIN = HRESULT($0004D007);
- {$EXTERNALSYM XACT_S_ALLNORETAIN}
-
-//
-// MessageId: XACT_S_ABORTING
-//
-// MessageText:
-//
-// An abort operation was already in progress.
-//
- XACT_S_ABORTING = HRESULT($0004D008);
- {$EXTERNALSYM XACT_S_ABORTING}
-
-//
-// MessageId: XACT_S_SINGLEPHASE
-//
-// MessageText:
-//
-// The resource manager has performed a single-phase commit of the transaction.
-//
- XACT_S_SINGLEPHASE = HRESULT($0004D009);
- {$EXTERNALSYM XACT_S_SINGLEPHASE}
-
-//
-// MessageId: XACT_S_LOCALLY_OK
-//
-// MessageText:
-//
-// The local transaction has not aborted.
-//
- XACT_S_LOCALLY_OK = HRESULT($0004D00A);
- {$EXTERNALSYM XACT_S_LOCALLY_OK}
-
-//
-// MessageId: XACT_S_LASTRESOURCEMANAGER
-//
-// MessageText:
-//
-// The resource manager has requested to be the coordinator (last resource manager) for the transaction.
-//
- XACT_S_LASTRESOURCEMANAGER = HRESULT($0004D010);
- {$EXTERNALSYM XACT_S_LASTRESOURCEMANAGER}
-
- CONTEXT_E_FIRST = DWORD($8004E000);
- {$EXTERNALSYM CONTEXT_E_FIRST}
- CONTEXT_E_LAST = DWORD($8004E02F);
- {$EXTERNALSYM CONTEXT_E_LAST}
- CONTEXT_S_FIRST = DWORD($0004E000);
- {$EXTERNALSYM CONTEXT_S_FIRST}
- CONTEXT_S_LAST = DWORD($0004E02F);
- {$EXTERNALSYM CONTEXT_S_LAST}
-//
-// MessageId: CONTEXT_E_ABORTED
-//
-// MessageText:
-//
-// The root transaction wanted to commit, but transaction aborted
-//
- CONTEXT_E_ABORTED = HRESULT($8004E002);
- {$EXTERNALSYM CONTEXT_E_ABORTED}
-
-//
-// MessageId: CONTEXT_E_ABORTING
-//
-// MessageText:
-//
-// You made a method call on a COM+ component that has a transaction that has already aborted or in the process of aborting.
-//
- CONTEXT_E_ABORTING = HRESULT($8004E003);
- {$EXTERNALSYM CONTEXT_E_ABORTING}
-
-//
-// MessageId: CONTEXT_E_NOCONTEXT
-//
-// MessageText:
-//
-// There is no MTS object context
-//
- CONTEXT_E_NOCONTEXT = HRESULT($8004E004);
- {$EXTERNALSYM CONTEXT_E_NOCONTEXT}
-
-//
-// MessageId: CONTEXT_E_WOULD_DEADLOCK
-//
-// MessageText:
-//
-// The component is configured to use synchronization and this method call would cause a deadlock to occur.
-//
- CONTEXT_E_WOULD_DEADLOCK = HRESULT($8004E005);
- {$EXTERNALSYM CONTEXT_E_WOULD_DEADLOCK}
-
-//
-// MessageId: CONTEXT_E_SYNCH_TIMEOUT
-//
-// MessageText:
-//
-// The component is configured to use synchronization and a thread has timed out waiting to enter the context.
-//
- CONTEXT_E_SYNCH_TIMEOUT = HRESULT($8004E006);
- {$EXTERNALSYM CONTEXT_E_SYNCH_TIMEOUT}
-
-//
-// MessageId: CONTEXT_E_OLDREF
-//
-// MessageText:
-//
-// You made a method call on a COM+ component that has a transaction that has already committed or aborted.
-//
- CONTEXT_E_OLDREF = HRESULT($8004E007);
- {$EXTERNALSYM CONTEXT_E_OLDREF}
-
-//
-// MessageId: CONTEXT_E_ROLENOTFOUND
-//
-// MessageText:
-//
-// The specified role was not configured for the application
-//
- CONTEXT_E_ROLENOTFOUND = HRESULT($8004E00C);
- {$EXTERNALSYM CONTEXT_E_ROLENOTFOUND}
-
-//
-// MessageId: CONTEXT_E_TMNOTAVAILABLE
-//
-// MessageText:
-//
-// COM+ was unable to talk to the Microsoft Distributed Transaction Coordinator
-//
- CONTEXT_E_TMNOTAVAILABLE = HRESULT($8004E00F);
- {$EXTERNALSYM CONTEXT_E_TMNOTAVAILABLE}
-
-//
-// MessageId: CO_E_ACTIVATIONFAILED
-//
-// MessageText:
-//
-// An unexpected error occurred during COM+ Activation.
-//
- CO_E_ACTIVATIONFAILED = HRESULT($8004E021);
- {$EXTERNALSYM CO_E_ACTIVATIONFAILED}
-
-//
-// MessageId: CO_E_ACTIVATIONFAILED_EVENTLOGGED
-//
-// MessageText:
-//
-// COM+ Activation failed. Check the event log for more information
-//
- CO_E_ACTIVATIONFAILED_EVENTLOGGED = HRESULT($8004E022);
- {$EXTERNALSYM CO_E_ACTIVATIONFAILED_EVENTLOGGED}
-
-//
-// MessageId: CO_E_ACTIVATIONFAILED_CATALOGERROR
-//
-// MessageText:
-//
-// COM+ Activation failed due to a catalog or configuration error.
-//
- CO_E_ACTIVATIONFAILED_CATALOGERROR = HRESULT($8004E023);
- {$EXTERNALSYM CO_E_ACTIVATIONFAILED_CATALOGERROR}
-
-//
-// MessageId: CO_E_ACTIVATIONFAILED_TIMEOUT
-//
-// MessageText:
-//
-// COM+ activation failed because the activation could not be completed in the specified amount of time.
-//
- CO_E_ACTIVATIONFAILED_TIMEOUT = HRESULT($8004E024);
- {$EXTERNALSYM CO_E_ACTIVATIONFAILED_TIMEOUT}
-
-//
-// MessageId: CO_E_INITIALIZATIONFAILED
-//
-// MessageText:
-//
-// COM+ Activation failed because an initialization function failed. Check the event log for more information.
-//
- CO_E_INITIALIZATIONFAILED = HRESULT($8004E025);
- {$EXTERNALSYM CO_E_INITIALIZATIONFAILED}
-
-//
-// MessageId: CONTEXT_E_NOJIT
-//
-// MessageText:
-//
-// The requested operation requires that JIT be in the current context and it is not
-//
- CONTEXT_E_NOJIT = HRESULT($8004E026);
- {$EXTERNALSYM CONTEXT_E_NOJIT}
-
-//
-// MessageId: CONTEXT_E_NOTRANSACTION
-//
-// MessageText:
-//
-// The requested operation requires that the current context have a Transaction, and it does not
-//
- CONTEXT_E_NOTRANSACTION = HRESULT($8004E027);
- {$EXTERNALSYM CONTEXT_E_NOTRANSACTION}
-
-//
-// MessageId: CO_E_THREADINGMODEL_CHANGED
-//
-// MessageText:
-//
-// The components threading model has changed after install into a COM+ Application. Please re-install component.
-//
- CO_E_THREADINGMODEL_CHANGED = HRESULT($8004E028);
- {$EXTERNALSYM CO_E_THREADINGMODEL_CHANGED}
-
-//
-// MessageId: CO_E_NOIISINTRINSICS
-//
-// MessageText:
-//
-// IIS intrinsics not available. Start your work with IIS.
-//
- CO_E_NOIISINTRINSICS = HRESULT($8004E029);
- {$EXTERNALSYM CO_E_NOIISINTRINSICS}
-
-//
-// MessageId: CO_E_NOCOOKIES
-//
-// MessageText:
-//
-// An attempt to write a cookie failed.
-//
- CO_E_NOCOOKIES = HRESULT($8004E02A);
- {$EXTERNALSYM CO_E_NOCOOKIES}
-
-//
-// MessageId: CO_E_DBERROR
-//
-// MessageText:
-//
-// An attempt to use a database generated a database specific error.
-//
- CO_E_DBERROR = HRESULT($8004E02B);
- {$EXTERNALSYM CO_E_DBERROR}
-
-//
-// MessageId: CO_E_NOTPOOLED
-//
-// MessageText:
-//
-// The COM+ component you created must use object pooling to work.
-//
- CO_E_NOTPOOLED = HRESULT($8004E02C);
- {$EXTERNALSYM CO_E_NOTPOOLED}
-
-//
-// MessageId: CO_E_NOTCONSTRUCTED
-//
-// MessageText:
-//
-// The COM+ component you created must use object construction to work correctly.
-//
- CO_E_NOTCONSTRUCTED = HRESULT($8004E02D);
- {$EXTERNALSYM CO_E_NOTCONSTRUCTED}
-
-//
-// MessageId: CO_E_NOSYNCHRONIZATION
-//
-// MessageText:
-//
-// The COM+ component requires synchronization, and it is not configured for it.
-//
- CO_E_NOSYNCHRONIZATION = HRESULT($8004E02E);
- {$EXTERNALSYM CO_E_NOSYNCHRONIZATION}
-
-//
-// MessageId: CO_E_ISOLEVELMISMATCH
-//
-// MessageText:
-//
-// The TxIsolation Level property for the COM+ component being created is stronger than the TxIsolationLevel for the "root" component for the transaction. The creation failed.
-//
- CO_E_ISOLEVELMISMATCH = HRESULT($8004E02F);
- {$EXTERNALSYM CO_E_ISOLEVELMISMATCH}
-
-//
-// Old OLE Success Codes
-//
-//
-// MessageId: OLE_S_USEREG
-//
-// MessageText:
-//
-// Use the registry database to provide the requested information
-//
- OLE_S_USEREG = HRESULT($00040000);
- {$EXTERNALSYM OLE_S_USEREG}
-
-//
-// MessageId: OLE_S_STATIC
-//
-// MessageText:
-//
-// Success, but static
-//
- OLE_S_STATIC = HRESULT($00040001);
- {$EXTERNALSYM OLE_S_STATIC}
-
-//
-// MessageId: OLE_S_MAC_CLIPFORMAT
-//
-// MessageText:
-//
-// Macintosh clipboard format
-//
- OLE_S_MAC_CLIPFORMAT = HRESULT($00040002);
- {$EXTERNALSYM OLE_S_MAC_CLIPFORMAT}
-
-//
-// MessageId: DRAGDROP_S_DROP
-//
-// MessageText:
-//
-// Successful drop took place
-//
- DRAGDROP_S_DROP = HRESULT($00040100);
- {$EXTERNALSYM DRAGDROP_S_DROP}
-
-//
-// MessageId: DRAGDROP_S_CANCEL
-//
-// MessageText:
-//
-// Drag-drop operation canceled
-//
- DRAGDROP_S_CANCEL = HRESULT($00040101);
- {$EXTERNALSYM DRAGDROP_S_CANCEL}
-
-//
-// MessageId: DRAGDROP_S_USEDEFAULTCURSORS
-//
-// MessageText:
-//
-// Use the default cursor
-//
- DRAGDROP_S_USEDEFAULTCURSORS = HRESULT($00040102);
- {$EXTERNALSYM DRAGDROP_S_USEDEFAULTCURSORS}
-
-//
-// MessageId: DATA_S_SAMEFORMATETC
-//
-// MessageText:
-//
-// Data has same FORMATETC
-//
- DATA_S_SAMEFORMATETC = HRESULT($00040130);
- {$EXTERNALSYM DATA_S_SAMEFORMATETC}
-
-//
-// MessageId: VIEW_S_ALREADY_FROZEN
-//
-// MessageText:
-//
-// View is already frozen
-//
- VIEW_S_ALREADY_FROZEN = HRESULT($00040140);
- {$EXTERNALSYM VIEW_S_ALREADY_FROZEN}
-
-//
-// MessageId: CACHE_S_FORMATETC_NOTSUPPORTED
-//
-// MessageText:
-//
-// FORMATETC not supported
-//
- CACHE_S_FORMATETC_NOTSUPPORTED = HRESULT($00040170);
- {$EXTERNALSYM CACHE_S_FORMATETC_NOTSUPPORTED}
-
-//
-// MessageId: CACHE_S_SAMECACHE
-//
-// MessageText:
-//
-// Same cache
-//
- CACHE_S_SAMECACHE = HRESULT($00040171);
- {$EXTERNALSYM CACHE_S_SAMECACHE}
-
-//
-// MessageId: CACHE_S_SOMECACHES_NOTUPDATED
-//
-// MessageText:
-//
-// Some cache(s) not updated
-//
- CACHE_S_SOMECACHES_NOTUPDATED = HRESULT($00040172);
- {$EXTERNALSYM CACHE_S_SOMECACHES_NOTUPDATED}
-
-//
-// MessageId: OLEOBJ_S_INVALIDVERB
-//
-// MessageText:
-//
-// Invalid verb for OLE object
-//
- OLEOBJ_S_INVALIDVERB = HRESULT($00040180);
- {$EXTERNALSYM OLEOBJ_S_INVALIDVERB}
-
-//
-// MessageId: OLEOBJ_S_CANNOT_DOVERB_NOW
-//
-// MessageText:
-//
-// Verb number is valid but verb cannot be done now
-//
- OLEOBJ_S_CANNOT_DOVERB_NOW = HRESULT($00040181);
- {$EXTERNALSYM OLEOBJ_S_CANNOT_DOVERB_NOW}
-
-//
-// MessageId: OLEOBJ_S_INVALIDHWND
-//
-// MessageText:
-//
-// Invalid window handle passed
-//
- OLEOBJ_S_INVALIDHWND = HRESULT($00040182);
- {$EXTERNALSYM OLEOBJ_S_INVALIDHWND}
-
-//
-// MessageId: INPLACE_S_TRUNCATED
-//
-// MessageText:
-//
-// Message is too long; some of it had to be truncated before displaying
-//
- INPLACE_S_TRUNCATED = HRESULT($000401A0);
- {$EXTERNALSYM INPLACE_S_TRUNCATED}
-
-//
-// MessageId: CONVERT10_S_NO_PRESENTATION
-//
-// MessageText:
-//
-// Unable to convert OLESTREAM to IStorage
-//
- CONVERT10_S_NO_PRESENTATION = HRESULT($000401C0);
- {$EXTERNALSYM CONVERT10_S_NO_PRESENTATION}
-
-//
-// MessageId: MK_S_REDUCED_TO_SELF
-//
-// MessageText:
-//
-// Moniker reduced to itself
-//
- MK_S_REDUCED_TO_SELF = HRESULT($000401E2);
- {$EXTERNALSYM MK_S_REDUCED_TO_SELF}
-
-//
-// MessageId: MK_S_ME
-//
-// MessageText:
-//
-// Common prefix is this moniker
-//
- MK_S_ME = HRESULT($000401E4);
- {$EXTERNALSYM MK_S_ME}
-
-//
-// MessageId: MK_S_HIM
-//
-// MessageText:
-//
-// Common prefix is input moniker
-//
- MK_S_HIM = HRESULT($000401E5);
- {$EXTERNALSYM MK_S_HIM}
-
-//
-// MessageId: MK_S_US
-//
-// MessageText:
-//
-// Common prefix is both monikers
-//
- MK_S_US = HRESULT($000401E6);
- {$EXTERNALSYM MK_S_US}
-
-//
-// MessageId: MK_S_MONIKERALREADYREGISTERED
-//
-// MessageText:
-//
-// Moniker is already registered in running object table
-//
- MK_S_MONIKERALREADYREGISTERED = HRESULT($000401E7);
- {$EXTERNALSYM MK_S_MONIKERALREADYREGISTERED}
-
-//
-// Task Scheduler errors
-//
-//
-// MessageId: SCHED_S_TASK_READY
-//
-// MessageText:
-//
-// The task is ready to run at its next scheduled time.
-//
- SCHED_S_TASK_READY = HRESULT($00041300);
- {$EXTERNALSYM SCHED_S_TASK_READY}
-
-//
-// MessageId: SCHED_S_TASK_RUNNING
-//
-// MessageText:
-//
-// The task is currently running.
-//
- SCHED_S_TASK_RUNNING = HRESULT($00041301);
- {$EXTERNALSYM SCHED_S_TASK_RUNNING}
-
-//
-// MessageId: SCHED_S_TASK_DISABLED
-//
-// MessageText:
-//
-// The task will not run at the scheduled times because it has been disabled.
-//
- SCHED_S_TASK_DISABLED = HRESULT($00041302);
- {$EXTERNALSYM SCHED_S_TASK_DISABLED}
-
-//
-// MessageId: SCHED_S_TASK_HAS_NOT_RUN
-//
-// MessageText:
-//
-// The task has not yet run.
-//
- SCHED_S_TASK_HAS_NOT_RUN = HRESULT($00041303);
- {$EXTERNALSYM SCHED_S_TASK_HAS_NOT_RUN}
-
-//
-// MessageId: SCHED_S_TASK_NO_MORE_RUNS
-//
-// MessageText:
-//
-// There are no more runs scheduled for this task.
-//
- SCHED_S_TASK_NO_MORE_RUNS = HRESULT($00041304);
- {$EXTERNALSYM SCHED_S_TASK_NO_MORE_RUNS}
-
-//
-// MessageId: SCHED_S_TASK_NOT_SCHEDULED
-//
-// MessageText:
-//
-// One or more of the properties that are needed to run this task on a schedule have not been set.
-//
- SCHED_S_TASK_NOT_SCHEDULED = HRESULT($00041305);
- {$EXTERNALSYM SCHED_S_TASK_NOT_SCHEDULED}
-
-//
-// MessageId: SCHED_S_TASK_TERMINATED
-//
-// MessageText:
-//
-// The last run of the task was terminated by the user.
-//
- SCHED_S_TASK_TERMINATED = HRESULT($00041306);
- {$EXTERNALSYM SCHED_S_TASK_TERMINATED}
-
-//
-// MessageId: SCHED_S_TASK_NO_VALID_TRIGGERS
-//
-// MessageText:
-//
-// Either the task has no triggers or the existing triggers are disabled or not set.
-//
- SCHED_S_TASK_NO_VALID_TRIGGERS = HRESULT($00041307);
- {$EXTERNALSYM SCHED_S_TASK_NO_VALID_TRIGGERS}
-
-//
-// MessageId: SCHED_S_EVENT_TRIGGER
-//
-// MessageText:
-//
-// Event triggers don't have set run times.
-//
- SCHED_S_EVENT_TRIGGER = HRESULT($00041308);
- {$EXTERNALSYM SCHED_S_EVENT_TRIGGER}
-
-//
-// MessageId: SCHED_E_TRIGGER_NOT_FOUND
-//
-// MessageText:
-//
-// Trigger not found.
-//
- SCHED_E_TRIGGER_NOT_FOUND = HRESULT($80041309);
- {$EXTERNALSYM SCHED_E_TRIGGER_NOT_FOUND}
-
-//
-// MessageId: SCHED_E_TASK_NOT_READY
-//
-// MessageText:
-//
-// One or more of the properties that are needed to run this task have not been set.
-//
- SCHED_E_TASK_NOT_READY = HRESULT($8004130A);
- {$EXTERNALSYM SCHED_E_TASK_NOT_READY}
-
-//
-// MessageId: SCHED_E_TASK_NOT_RUNNING
-//
-// MessageText:
-//
-// There is no running instance of the task to terminate.
-//
- SCHED_E_TASK_NOT_RUNNING = HRESULT($8004130B);
- {$EXTERNALSYM SCHED_E_TASK_NOT_RUNNING}
-
-//
-// MessageId: SCHED_E_SERVICE_NOT_INSTALLED
-//
-// MessageText:
-//
-// The Task Scheduler Service is not installed on this computer.
-//
- SCHED_E_SERVICE_NOT_INSTALLED = HRESULT($8004130C);
- {$EXTERNALSYM SCHED_E_SERVICE_NOT_INSTALLED}
-
-//
-// MessageId: SCHED_E_CANNOT_OPEN_TASK
-//
-// MessageText:
-//
-// The task object could not be opened.
-//
- SCHED_E_CANNOT_OPEN_TASK = HRESULT($8004130D);
- {$EXTERNALSYM SCHED_E_CANNOT_OPEN_TASK}
-
-//
-// MessageId: SCHED_E_INVALID_TASK
-//
-// MessageText:
-//
-// The object is either an invalid task object or is not a task object.
-//
- SCHED_E_INVALID_TASK = HRESULT($8004130E);
- {$EXTERNALSYM SCHED_E_INVALID_TASK}
-
-//
-// MessageId: SCHED_E_ACCOUNT_INFORMATION_NOT_SET
-//
-// MessageText:
-//
-// No account information could be found in the Task Scheduler security database for the task indicated.
-//
- SCHED_E_ACCOUNT_INFORMATION_NOT_SET = HRESULT($8004130F);
- {$EXTERNALSYM SCHED_E_ACCOUNT_INFORMATION_NOT_SET}
-
-//
-// MessageId: SCHED_E_ACCOUNT_NAME_NOT_FOUND
-//
-// MessageText:
-//
-// Unable to establish existence of the account specified.
-//
- SCHED_E_ACCOUNT_NAME_NOT_FOUND = HRESULT($80041310);
- {$EXTERNALSYM SCHED_E_ACCOUNT_NAME_NOT_FOUND}
-
-//
-// MessageId: SCHED_E_ACCOUNT_DBASE_CORRUPT
-//
-// MessageText:
-//
-// Corruption was detected in the Task Scheduler security database; the database has been reset.
-//
- SCHED_E_ACCOUNT_DBASE_CORRUPT = HRESULT($80041311);
- {$EXTERNALSYM SCHED_E_ACCOUNT_DBASE_CORRUPT}
-
-//
-// MessageId: SCHED_E_NO_SECURITY_SERVICES
-//
-// MessageText:
-//
-// Task Scheduler security services are available only on Windows NT.
-//
- SCHED_E_NO_SECURITY_SERVICES = HRESULT($80041312);
- {$EXTERNALSYM SCHED_E_NO_SECURITY_SERVICES}
-
-//
-// MessageId: SCHED_E_UNKNOWN_OBJECT_VERSION
-//
-// MessageText:
-//
-// The task object version is either unsupported or invalid.
-//
- SCHED_E_UNKNOWN_OBJECT_VERSION = HRESULT($80041313);
- {$EXTERNALSYM SCHED_E_UNKNOWN_OBJECT_VERSION}
-
-//
-// MessageId: SCHED_E_UNSUPPORTED_ACCOUNT_OPTION
-//
-// MessageText:
-//
-// The task has been configured with an unsupported combination of account settings and run time options.
-//
- SCHED_E_UNSUPPORTED_ACCOUNT_OPTION = HRESULT($80041314);
- {$EXTERNALSYM SCHED_E_UNSUPPORTED_ACCOUNT_OPTION}
-
-//
-// MessageId: SCHED_E_SERVICE_NOT_RUNNING
-//
-// MessageText:
-//
-// The Task Scheduler Service is not running.
-//
- SCHED_E_SERVICE_NOT_RUNNING = HRESULT($80041315);
- {$EXTERNALSYM SCHED_E_SERVICE_NOT_RUNNING}
-
-// ******************
-// FACILITY_WINDOWS
-// ******************
-//
-// Codes 0x0-0x01ff are reserved for the OLE group of
-// interfaces.
-//
-//
-// MessageId: CO_E_CLASS_CREATE_FAILED
-//
-// MessageText:
-//
-// Attempt to create a class object failed
-//
- CO_E_CLASS_CREATE_FAILED = HRESULT($80080001);
- {$EXTERNALSYM CO_E_CLASS_CREATE_FAILED}
-
-//
-// MessageId: CO_E_SCM_ERROR
-//
-// MessageText:
-//
-// OLE service could not bind object
-//
- CO_E_SCM_ERROR = HRESULT($80080002);
- {$EXTERNALSYM CO_E_SCM_ERROR}
-
-//
-// MessageId: CO_E_SCM_RPC_FAILURE
-//
-// MessageText:
-//
-// RPC communication failed with OLE service
-//
- CO_E_SCM_RPC_FAILURE = HRESULT($80080003);
- {$EXTERNALSYM CO_E_SCM_RPC_FAILURE}
-
-//
-// MessageId: CO_E_BAD_PATH
-//
-// MessageText:
-//
-// Bad path to object
-//
- CO_E_BAD_PATH = HRESULT($80080004);
- {$EXTERNALSYM CO_E_BAD_PATH}
-
-//
-// MessageId: CO_E_SERVER_EXEC_FAILURE
-//
-// MessageText:
-//
-// Server execution failed
-//
- CO_E_SERVER_EXEC_FAILURE = HRESULT($80080005);
- {$EXTERNALSYM CO_E_SERVER_EXEC_FAILURE}
-
-//
-// MessageId: CO_E_OBJSRV_RPC_FAILURE
-//
-// MessageText:
-//
-// OLE service could not communicate with the object server
-//
- CO_E_OBJSRV_RPC_FAILURE = HRESULT($80080006);
- {$EXTERNALSYM CO_E_OBJSRV_RPC_FAILURE}
-
-//
-// MessageId: MK_E_NO_NORMALIZED
-//
-// MessageText:
-//
-// Moniker path could not be normalized
-//
- MK_E_NO_NORMALIZED = HRESULT($80080007);
- {$EXTERNALSYM MK_E_NO_NORMALIZED}
-
-//
-// MessageId: CO_E_SERVER_STOPPING
-//
-// MessageText:
-//
-// Object server is stopping when OLE service contacts it
-//
- CO_E_SERVER_STOPPING = HRESULT($80080008);
- {$EXTERNALSYM CO_E_SERVER_STOPPING}
-
-//
-// MessageId: MEM_E_INVALID_ROOT
-//
-// MessageText:
-//
-// An invalid root block pointer was specified
-//
- MEM_E_INVALID_ROOT = HRESULT($80080009);
- {$EXTERNALSYM MEM_E_INVALID_ROOT}
-
-//
-// MessageId: MEM_E_INVALID_LINK
-//
-// MessageText:
-//
-// An allocation chain contained an invalid link pointer
-//
- MEM_E_INVALID_LINK = HRESULT($80080010);
- {$EXTERNALSYM MEM_E_INVALID_LINK}
-
-//
-// MessageId: MEM_E_INVALID_SIZE
-//
-// MessageText:
-//
-// The requested allocation size was too large
-//
- MEM_E_INVALID_SIZE = HRESULT($80080011);
- {$EXTERNALSYM MEM_E_INVALID_SIZE}
-
-//
-// MessageId: CO_S_NOTALLINTERFACES
-//
-// MessageText:
-//
-// Not all the requested interfaces were available
-//
- CO_S_NOTALLINTERFACES = HRESULT($00080012);
- {$EXTERNALSYM CO_S_NOTALLINTERFACES}
-
-//
-// MessageId: CO_S_MACHINENAMENOTFOUND
-//
-// MessageText:
-//
-// The specified machine name was not found in the cache.
-//
- CO_S_MACHINENAMENOTFOUND = HRESULT($00080013);
- {$EXTERNALSYM CO_S_MACHINENAMENOTFOUND}
-
-// ******************
-// FACILITY_DISPATCH
-// ******************
-//
-// MessageId: DISP_E_UNKNOWNINTERFACE
-//
-// MessageText:
-//
-// Unknown interface.
-//
- DISP_E_UNKNOWNINTERFACE = HRESULT($80020001);
- {$EXTERNALSYM DISP_E_UNKNOWNINTERFACE}
-
-//
-// MessageId: DISP_E_MEMBERNOTFOUND
-//
-// MessageText:
-//
-// Member not found.
-//
- DISP_E_MEMBERNOTFOUND = HRESULT($80020003);
- {$EXTERNALSYM DISP_E_MEMBERNOTFOUND}
-
-//
-// MessageId: DISP_E_PARAMNOTFOUND
-//
-// MessageText:
-//
-// Parameter not found.
-//
- DISP_E_PARAMNOTFOUND = HRESULT($80020004);
- {$EXTERNALSYM DISP_E_PARAMNOTFOUND}
-
-//
-// MessageId: DISP_E_TYPEMISMATCH
-//
-// MessageText:
-//
-// Type mismatch.
-//
- DISP_E_TYPEMISMATCH = HRESULT($80020005);
- {$EXTERNALSYM DISP_E_TYPEMISMATCH}
-
-//
-// MessageId: DISP_E_UNKNOWNNAME
-//
-// MessageText:
-//
-// Unknown name.
-//
- DISP_E_UNKNOWNNAME = HRESULT($80020006);
- {$EXTERNALSYM DISP_E_UNKNOWNNAME}
-
-//
-// MessageId: DISP_E_NONAMEDARGS
-//
-// MessageText:
-//
-// No named arguments.
-//
- DISP_E_NONAMEDARGS = HRESULT($80020007);
- {$EXTERNALSYM DISP_E_NONAMEDARGS}
-
-//
-// MessageId: DISP_E_BADVARTYPE
-//
-// MessageText:
-//
-// Bad variable type.
-//
- DISP_E_BADVARTYPE = HRESULT($80020008);
- {$EXTERNALSYM DISP_E_BADVARTYPE}
-
-//
-// MessageId: DISP_E_EXCEPTION
-//
-// MessageText:
-//
-// Exception occurred.
-//
- DISP_E_EXCEPTION = HRESULT($80020009);
- {$EXTERNALSYM DISP_E_EXCEPTION}
-
-//
-// MessageId: DISP_E_OVERFLOW
-//
-// MessageText:
-//
-// Out of present range.
-//
- DISP_E_OVERFLOW = HRESULT($8002000A);
- {$EXTERNALSYM DISP_E_OVERFLOW}
-
-//
-// MessageId: DISP_E_BADINDEX
-//
-// MessageText:
-//
-// Invalid index.
-//
- DISP_E_BADINDEX = HRESULT($8002000B);
- {$EXTERNALSYM DISP_E_BADINDEX}
-
-//
-// MessageId: DISP_E_UNKNOWNLCID
-//
-// MessageText:
-//
-// Unknown language.
-//
- DISP_E_UNKNOWNLCID = HRESULT($8002000C);
- {$EXTERNALSYM DISP_E_UNKNOWNLCID}
-
-//
-// MessageId: DISP_E_ARRAYISLOCKED
-//
-// MessageText:
-//
-// Memory is locked.
-//
- DISP_E_ARRAYISLOCKED = HRESULT($8002000D);
- {$EXTERNALSYM DISP_E_ARRAYISLOCKED}
-
-//
-// MessageId: DISP_E_BADPARAMCOUNT
-//
-// MessageText:
-//
-// Invalid number of parameters.
-//
- DISP_E_BADPARAMCOUNT = HRESULT($8002000E);
- {$EXTERNALSYM DISP_E_BADPARAMCOUNT}
-
-//
-// MessageId: DISP_E_PARAMNOTOPTIONAL
-//
-// MessageText:
-//
-// Parameter not optional.
-//
- DISP_E_PARAMNOTOPTIONAL = HRESULT($8002000F);
- {$EXTERNALSYM DISP_E_PARAMNOTOPTIONAL}
-
-//
-// MessageId: DISP_E_BADCALLEE
-//
-// MessageText:
-//
-// Invalid callee.
-//
- DISP_E_BADCALLEE = HRESULT($80020010);
- {$EXTERNALSYM DISP_E_BADCALLEE}
-
-//
-// MessageId: DISP_E_NOTACOLLECTION
-//
-// MessageText:
-//
-// Does not support a collection.
-//
- DISP_E_NOTACOLLECTION = HRESULT($80020011);
- {$EXTERNALSYM DISP_E_NOTACOLLECTION}
-
-//
-// MessageId: DISP_E_DIVBYZERO
-//
-// MessageText:
-//
-// Division by zero.
-//
- DISP_E_DIVBYZERO = HRESULT($80020012);
- {$EXTERNALSYM DISP_E_DIVBYZERO}
-
-//
-// MessageId: DISP_E_BUFFERTOOSMALL
-//
-// MessageText:
-//
-// Buffer too small
-//
- DISP_E_BUFFERTOOSMALL = HRESULT($80020013);
- {$EXTERNALSYM DISP_E_BUFFERTOOSMALL}
-
-//
-// MessageId: TYPE_E_BUFFERTOOSMALL
-//
-// MessageText:
-//
-// Buffer too small.
-//
- TYPE_E_BUFFERTOOSMALL = HRESULT($80028016);
- {$EXTERNALSYM TYPE_E_BUFFERTOOSMALL}
-
-//
-// MessageId: TYPE_E_FIELDNOTFOUND
-//
-// MessageText:
-//
-// Field name not defined in the record.
-//
- TYPE_E_FIELDNOTFOUND = HRESULT($80028017);
- {$EXTERNALSYM TYPE_E_FIELDNOTFOUND}
-
-//
-// MessageId: TYPE_E_INVDATAREAD
-//
-// MessageText:
-//
-// Old format or invalid type library.
-//
- TYPE_E_INVDATAREAD = HRESULT($80028018);
- {$EXTERNALSYM TYPE_E_INVDATAREAD}
-
-//
-// MessageId: TYPE_E_UNSUPFORMAT
-//
-// MessageText:
-//
-// Old format or invalid type library.
-//
- TYPE_E_UNSUPFORMAT = HRESULT($80028019);
- {$EXTERNALSYM TYPE_E_UNSUPFORMAT}
-
-//
-// MessageId: TYPE_E_REGISTRYACCESS
-//
-// MessageText:
-//
-// Error accessing the OLE registry.
-//
- TYPE_E_REGISTRYACCESS = HRESULT($8002801C);
- {$EXTERNALSYM TYPE_E_REGISTRYACCESS}
-
-//
-// MessageId: TYPE_E_LIBNOTREGISTERED
-//
-// MessageText:
-//
-// Library not registered.
-//
- TYPE_E_LIBNOTREGISTERED = HRESULT($8002801D);
- {$EXTERNALSYM TYPE_E_LIBNOTREGISTERED}
-
-//
-// MessageId: TYPE_E_UNDEFINEDTYPE
-//
-// MessageText:
-//
-// Bound to unknown type.
-//
- TYPE_E_UNDEFINEDTYPE = HRESULT($80028027);
- {$EXTERNALSYM TYPE_E_UNDEFINEDTYPE}
-
-//
-// MessageId: TYPE_E_QUALIFIEDNAMEDISALLOWED
-//
-// MessageText:
-//
-// Qualified name disallowed.
-//
- TYPE_E_QUALIFIEDNAMEDISALLOWED = HRESULT($80028028);
- {$EXTERNALSYM TYPE_E_QUALIFIEDNAMEDISALLOWED}
-
-//
-// MessageId: TYPE_E_INVALIDSTATE
-//
-// MessageText:
-//
-// Invalid forward reference, or reference to uncompiled type.
-//
- TYPE_E_INVALIDSTATE = HRESULT($80028029);
- {$EXTERNALSYM TYPE_E_INVALIDSTATE}
-
-//
-// MessageId: TYPE_E_WRONGTYPEKIND
-//
-// MessageText:
-//
-// Type mismatch.
-//
- TYPE_E_WRONGTYPEKIND = HRESULT($8002802A);
- {$EXTERNALSYM TYPE_E_WRONGTYPEKIND}
-
-//
-// MessageId: TYPE_E_ELEMENTNOTFOUND
-//
-// MessageText:
-//
-// Element not found.
-//
- TYPE_E_ELEMENTNOTFOUND = HRESULT($8002802B);
- {$EXTERNALSYM TYPE_E_ELEMENTNOTFOUND}
-
-//
-// MessageId: TYPE_E_AMBIGUOUSNAME
-//
-// MessageText:
-//
-// Ambiguous name.
-//
- TYPE_E_AMBIGUOUSNAME = HRESULT($8002802C);
- {$EXTERNALSYM TYPE_E_AMBIGUOUSNAME}
-
-//
-// MessageId: TYPE_E_NAMECONFLICT
-//
-// MessageText:
-//
-// Name already exists in the library.
-//
- TYPE_E_NAMECONFLICT = HRESULT($8002802D);
- {$EXTERNALSYM TYPE_E_NAMECONFLICT}
-
-//
-// MessageId: TYPE_E_UNKNOWNLCID
-//
-// MessageText:
-//
-// Unknown LCID.
-//
- TYPE_E_UNKNOWNLCID = HRESULT($8002802E);
- {$EXTERNALSYM TYPE_E_UNKNOWNLCID}
-
-//
-// MessageId: TYPE_E_DLLFUNCTIONNOTFOUND
-//
-// MessageText:
-//
-// Function not defined in specified DLL.
-//
- TYPE_E_DLLFUNCTIONNOTFOUND = HRESULT($8002802F);
- {$EXTERNALSYM TYPE_E_DLLFUNCTIONNOTFOUND}
-
-//
-// MessageId: TYPE_E_BADMODULEKIND
-//
-// MessageText:
-//
-// Wrong module kind for the operation.
-//
- TYPE_E_BADMODULEKIND = HRESULT($800288BD);
- {$EXTERNALSYM TYPE_E_BADMODULEKIND}
-
-//
-// MessageId: TYPE_E_SIZETOOBIG
-//
-// MessageText:
-//
-// Size may not exceed 64K.
-//
- TYPE_E_SIZETOOBIG = HRESULT($800288C5);
- {$EXTERNALSYM TYPE_E_SIZETOOBIG}
-
-//
-// MessageId: TYPE_E_DUPLICATEID
-//
-// MessageText:
-//
-// Duplicate ID in inheritance hierarchy.
-//
- TYPE_E_DUPLICATEID = HRESULT($800288C6);
- {$EXTERNALSYM TYPE_E_DUPLICATEID}
-
-//
-// MessageId: TYPE_E_INVALIDID
-//
-// MessageText:
-//
-// Incorrect inheritance depth in standard OLE hmember.
-//
- TYPE_E_INVALIDID = HRESULT($800288CF);
- {$EXTERNALSYM TYPE_E_INVALIDID}
-
-//
-// MessageId: TYPE_E_TYPEMISMATCH
-//
-// MessageText:
-//
-// Type mismatch.
-//
- TYPE_E_TYPEMISMATCH = HRESULT($80028CA0);
- {$EXTERNALSYM TYPE_E_TYPEMISMATCH}
-
-//
-// MessageId: TYPE_E_OUTOFBOUNDS
-//
-// MessageText:
-//
-// Invalid number of arguments.
-//
- TYPE_E_OUTOFBOUNDS = HRESULT($80028CA1);
- {$EXTERNALSYM TYPE_E_OUTOFBOUNDS}
-
-//
-// MessageId: TYPE_E_IOERROR
-//
-// MessageText:
-//
-// I/O Error.
-//
- TYPE_E_IOERROR = HRESULT($80028CA2);
- {$EXTERNALSYM TYPE_E_IOERROR}
-
-//
-// MessageId: TYPE_E_CANTCREATETMPFILE
-//
-// MessageText:
-//
-// Error creating unique tmp file.
-//
- TYPE_E_CANTCREATETMPFILE = HRESULT($80028CA3);
- {$EXTERNALSYM TYPE_E_CANTCREATETMPFILE}
-
-//
-// MessageId: TYPE_E_CANTLOADLIBRARY
-//
-// MessageText:
-//
-// Error loading type library/DLL.
-//
- TYPE_E_CANTLOADLIBRARY = HRESULT($80029C4A);
- {$EXTERNALSYM TYPE_E_CANTLOADLIBRARY}
-
-//
-// MessageId: TYPE_E_INCONSISTENTPROPFUNCS
-//
-// MessageText:
-//
-// Inconsistent property functions.
-//
- TYPE_E_INCONSISTENTPROPFUNCS = HRESULT($80029C83);
- {$EXTERNALSYM TYPE_E_INCONSISTENTPROPFUNCS}
-
-//
-// MessageId: TYPE_E_CIRCULARTYPE
-//
-// MessageText:
-//
-// Circular dependency between types/modules.
-//
- TYPE_E_CIRCULARTYPE = HRESULT($80029C84);
- {$EXTERNALSYM TYPE_E_CIRCULARTYPE}
-
-// ******************
-// FACILITY_STORAGE
-// ******************
-//
-// MessageId: STG_E_INVALIDFUNCTION
-//
-// MessageText:
-//
-// Unable to perform requested operation.
-//
- STG_E_INVALIDFUNCTION = HRESULT($80030001);
- {$EXTERNALSYM STG_E_INVALIDFUNCTION}
-
-//
-// MessageId: STG_E_FILENOTFOUND
-//
-// MessageText:
-//
-// %1 could not be found.
-//
- STG_E_FILENOTFOUND = HRESULT($80030002);
- {$EXTERNALSYM STG_E_FILENOTFOUND}
-
-//
-// MessageId: STG_E_PATHNOTFOUND
-//
-// MessageText:
-//
-// The path %1 could not be found.
-//
- STG_E_PATHNOTFOUND = HRESULT($80030003);
- {$EXTERNALSYM STG_E_PATHNOTFOUND}
-
-//
-// MessageId: STG_E_TOOMANYOPENFILES
-//
-// MessageText:
-//
-// There are insufficient resources to open another file.
-//
- STG_E_TOOMANYOPENFILES = HRESULT($80030004);
- {$EXTERNALSYM STG_E_TOOMANYOPENFILES}
-
-//
-// MessageId: STG_E_ACCESSDENIED
-//
-// MessageText:
-//
-// Access Denied.
-//
- STG_E_ACCESSDENIED = HRESULT($80030005);
- {$EXTERNALSYM STG_E_ACCESSDENIED}
-
-//
-// MessageId: STG_E_INVALIDHANDLE
-//
-// MessageText:
-//
-// Attempted an operation on an invalid object.
-//
- STG_E_INVALIDHANDLE = HRESULT($80030006);
- {$EXTERNALSYM STG_E_INVALIDHANDLE}
-
-//
-// MessageId: STG_E_INSUFFICIENTMEMORY
-//
-// MessageText:
-//
-// There is insufficient memory available to complete operation.
-//
- STG_E_INSUFFICIENTMEMORY = HRESULT($80030008);
- {$EXTERNALSYM STG_E_INSUFFICIENTMEMORY}
-
-//
-// MessageId: STG_E_INVALIDPOINTER
-//
-// MessageText:
-//
-// Invalid pointer error.
-//
- STG_E_INVALIDPOINTER = HRESULT($80030009);
- {$EXTERNALSYM STG_E_INVALIDPOINTER}
-
-//
-// MessageId: STG_E_NOMOREFILES
-//
-// MessageText:
-//
-// There are no more entries to return.
-//
- STG_E_NOMOREFILES = HRESULT($80030012);
- {$EXTERNALSYM STG_E_NOMOREFILES}
-
-//
-// MessageId: STG_E_DISKISWRITEPROTECTED
-//
-// MessageText:
-//
-// Disk is write-protected.
-//
- STG_E_DISKISWRITEPROTECTED = HRESULT($80030013);
- {$EXTERNALSYM STG_E_DISKISWRITEPROTECTED}
-
-//
-// MessageId: STG_E_SEEKERROR
-//
-// MessageText:
-//
-// An error occurred during a seek operation.
-//
- STG_E_SEEKERROR = HRESULT($80030019);
- {$EXTERNALSYM STG_E_SEEKERROR}
-
-//
-// MessageId: STG_E_WRITEFAULT
-//
-// MessageText:
-//
-// A disk error occurred during a write operation.
-//
- STG_E_WRITEFAULT = HRESULT($8003001D);
- {$EXTERNALSYM STG_E_WRITEFAULT}
-
-//
-// MessageId: STG_E_READFAULT
-//
-// MessageText:
-//
-// A disk error occurred during a read operation.
-//
- STG_E_READFAULT = HRESULT($8003001E);
- {$EXTERNALSYM STG_E_READFAULT}
-
-//
-// MessageId: STG_E_SHAREVIOLATION
-//
-// MessageText:
-//
-// A share violation has occurred.
-//
- STG_E_SHAREVIOLATION = HRESULT($80030020);
- {$EXTERNALSYM STG_E_SHAREVIOLATION}
-
-//
-// MessageId: STG_E_LOCKVIOLATION
-//
-// MessageText:
-//
-// A lock violation has occurred.
-//
- STG_E_LOCKVIOLATION = HRESULT($80030021);
- {$EXTERNALSYM STG_E_LOCKVIOLATION}
-
-//
-// MessageId: STG_E_FILEALREADYEXISTS
-//
-// MessageText:
-//
-// %1 already exists.
-//
- STG_E_FILEALREADYEXISTS = HRESULT($80030050);
- {$EXTERNALSYM STG_E_FILEALREADYEXISTS}
-
-//
-// MessageId: STG_E_INVALIDPARAMETER
-//
-// MessageText:
-//
-// Invalid parameter error.
-//
- STG_E_INVALIDPARAMETER = HRESULT($80030057);
- {$EXTERNALSYM STG_E_INVALIDPARAMETER}
-
-//
-// MessageId: STG_E_MEDIUMFULL
-//
-// MessageText:
-//
-// There is insufficient disk space to complete operation.
-//
- STG_E_MEDIUMFULL = HRESULT($80030070);
- {$EXTERNALSYM STG_E_MEDIUMFULL}
-
-//
-// MessageId: STG_E_PROPSETMISMATCHED
-//
-// MessageText:
-//
-// Illegal write of non-simple property to simple property set.
-//
- STG_E_PROPSETMISMATCHED = HRESULT($800300F0);
- {$EXTERNALSYM STG_E_PROPSETMISMATCHED}
-
-//
-// MessageId: STG_E_ABNORMALAPIEXIT
-//
-// MessageText:
-//
-// An API call exited abnormally.
-//
- STG_E_ABNORMALAPIEXIT = HRESULT($800300FA);
- {$EXTERNALSYM STG_E_ABNORMALAPIEXIT}
-
-//
-// MessageId: STG_E_INVALIDHEADER
-//
-// MessageText:
-//
-// The file %1 is not a valid compound file.
-//
- STG_E_INVALIDHEADER = HRESULT($800300FB);
- {$EXTERNALSYM STG_E_INVALIDHEADER}
-
-//
-// MessageId: STG_E_INVALIDNAME
-//
-// MessageText:
-//
-// The name %1 is not valid.
-//
- STG_E_INVALIDNAME = HRESULT($800300FC);
- {$EXTERNALSYM STG_E_INVALIDNAME}
-
-//
-// MessageId: STG_E_UNKNOWN
-//
-// MessageText:
-//
-// An unexpected error occurred.
-//
- STG_E_UNKNOWN = HRESULT($800300FD);
- {$EXTERNALSYM STG_E_UNKNOWN}
-
-//
-// MessageId: STG_E_UNIMPLEMENTEDFUNCTION
-//
-// MessageText:
-//
-// That function is not implemented.
-//
- STG_E_UNIMPLEMENTEDFUNCTION = HRESULT($800300FE);
- {$EXTERNALSYM STG_E_UNIMPLEMENTEDFUNCTION}
-
-//
-// MessageId: STG_E_INVALIDFLAG
-//
-// MessageText:
-//
-// Invalid flag error.
-//
- STG_E_INVALIDFLAG = HRESULT($800300FF);
- {$EXTERNALSYM STG_E_INVALIDFLAG}
-
-//
-// MessageId: STG_E_INUSE
-//
-// MessageText:
-//
-// Attempted to use an object that is busy.
-//
- STG_E_INUSE = HRESULT($80030100);
- {$EXTERNALSYM STG_E_INUSE}
-
-//
-// MessageId: STG_E_NOTCURRENT
-//
-// MessageText:
-//
-// The storage has been changed since the last commit.
-//
- STG_E_NOTCURRENT = HRESULT($80030101);
- {$EXTERNALSYM STG_E_NOTCURRENT}
-
-//
-// MessageId: STG_E_REVERTED
-//
-// MessageText:
-//
-// Attempted to use an object that has ceased to exist.
-//
- STG_E_REVERTED = HRESULT($80030102);
- {$EXTERNALSYM STG_E_REVERTED}
-
-//
-// MessageId: STG_E_CANTSAVE
-//
-// MessageText:
-//
-// Can't save.
-//
- STG_E_CANTSAVE = HRESULT($80030103);
- {$EXTERNALSYM STG_E_CANTSAVE}
-
-//
-// MessageId: STG_E_OLDFORMAT
-//
-// MessageText:
-//
-// The compound file %1 was produced with an incompatible version of storage.
-//
- STG_E_OLDFORMAT = HRESULT($80030104);
- {$EXTERNALSYM STG_E_OLDFORMAT}
-
-//
-// MessageId: STG_E_OLDDLL
-//
-// MessageText:
-//
-// The compound file %1 was produced with a newer version of storage.
-//
- STG_E_OLDDLL = HRESULT($80030105);
- {$EXTERNALSYM STG_E_OLDDLL}
-
-//
-// MessageId: STG_E_SHAREREQUIRED
-//
-// MessageText:
-//
-// Share.exe or equivalent is required for operation.
-//
- STG_E_SHAREREQUIRED = HRESULT($80030106);
- {$EXTERNALSYM STG_E_SHAREREQUIRED}
-
-//
-// MessageId: STG_E_NOTFILEBASEDSTORAGE
-//
-// MessageText:
-//
-// Illegal operation called on non-file based storage.
-//
- STG_E_NOTFILEBASEDSTORAGE = HRESULT($80030107);
- {$EXTERNALSYM STG_E_NOTFILEBASEDSTORAGE}
-
-//
-// MessageId: STG_E_EXTANTMARSHALLINGS
-//
-// MessageText:
-//
-// Illegal operation called on object with extant marshallings.
-//
- STG_E_EXTANTMARSHALLINGS = HRESULT($80030108);
- {$EXTERNALSYM STG_E_EXTANTMARSHALLINGS}
-
-//
-// MessageId: STG_E_DOCFILECORRUPT
-//
-// MessageText:
-//
-// The docfile has been corrupted.
-//
- STG_E_DOCFILECORRUPT = HRESULT($80030109);
- {$EXTERNALSYM STG_E_DOCFILECORRUPT}
-
-//
-// MessageId: STG_E_BADBASEADDRESS
-//
-// MessageText:
-//
-// OLE32.DLL has been loaded at the wrong address.
-//
- STG_E_BADBASEADDRESS = HRESULT($80030110);
- {$EXTERNALSYM STG_E_BADBASEADDRESS}
-
-//
-// MessageId: STG_E_DOCFILETOOLARGE
-//
-// MessageText:
-//
-// The compound file is too large for the current implementation
-//
- STG_E_DOCFILETOOLARGE = HRESULT($80030111);
- {$EXTERNALSYM STG_E_DOCFILETOOLARGE}
-
-//
-// MessageId: STG_E_NOTSIMPLEFORMAT
-//
-// MessageText:
-//
-// The compound file was not created with the STGM_SIMPLE flag
-//
- STG_E_NOTSIMPLEFORMAT = HRESULT($80030112);
- {$EXTERNALSYM STG_E_NOTSIMPLEFORMAT}
-
-//
-// MessageId: STG_E_INCOMPLETE
-//
-// MessageText:
-//
-// The file download was aborted abnormally. The file is incomplete.
-//
- STG_E_INCOMPLETE = HRESULT($80030201);
- {$EXTERNALSYM STG_E_INCOMPLETE}
-
-//
-// MessageId: STG_E_TERMINATED
-//
-// MessageText:
-//
-// The file download has been terminated.
-//
- STG_E_TERMINATED = HRESULT($80030202);
- {$EXTERNALSYM STG_E_TERMINATED}
-
-//
-// MessageId: STG_S_CONVERTED
-//
-// MessageText:
-//
-// The underlying file was converted to compound file format.
-//
- STG_S_CONVERTED = HRESULT($00030200);
- {$EXTERNALSYM STG_S_CONVERTED}
-
-//
-// MessageId: STG_S_BLOCK
-//
-// MessageText:
-//
-// The storage operation should block until more data is available.
-//
- STG_S_BLOCK = HRESULT($00030201);
- {$EXTERNALSYM STG_S_BLOCK}
-
-//
-// MessageId: STG_S_RETRYNOW
-//
-// MessageText:
-//
-// The storage operation should retry immediately.
-//
- STG_S_RETRYNOW = HRESULT($00030202);
- {$EXTERNALSYM STG_S_RETRYNOW}
-
-//
-// MessageId: STG_S_MONITORING
-//
-// MessageText:
-//
-// The notified event sink will not influence the storage operation.
-//
- STG_S_MONITORING = HRESULT($00030203);
- {$EXTERNALSYM STG_S_MONITORING}
-
-//
-// MessageId: STG_S_MULTIPLEOPENS
-//
-// MessageText:
-//
-// Multiple opens prevent consolidated. (commit succeeded).
-//
- STG_S_MULTIPLEOPENS = HRESULT($00030204);
- {$EXTERNALSYM STG_S_MULTIPLEOPENS}
-
-//
-// MessageId: STG_S_CONSOLIDATIONFAILED
-//
-// MessageText:
-//
-// Consolidation of the storage file failed. (commit succeeded).
-//
- STG_S_CONSOLIDATIONFAILED = HRESULT($00030205);
- {$EXTERNALSYM STG_S_CONSOLIDATIONFAILED}
-
-//
-// MessageId: STG_S_CANNOTCONSOLIDATE
-//
-// MessageText:
-//
-// Consolidation of the storage file is inappropriate. (commit succeeded).
-//
- STG_S_CANNOTCONSOLIDATE = HRESULT($00030206);
- {$EXTERNALSYM STG_S_CANNOTCONSOLIDATE}
-
-{*++
-
- MessageId's 0x0305 - 0x031f (inclusive) are reserved for **STORAGE**
- copy protection errors.
-
---*}
-//
-// MessageId: STG_E_STATUS_COPY_PROTECTION_FAILURE
-//
-// MessageText:
-//
-// Generic Copy Protection Error.
-//
- STG_E_STATUS_COPY_PROTECTION_FAILURE = HRESULT($80030305);
- {$EXTERNALSYM STG_E_STATUS_COPY_PROTECTION_FAILURE}
-
-//
-// MessageId: STG_E_CSS_AUTHENTICATION_FAILURE
-//
-// MessageText:
-//
-// Copy Protection Error - DVD CSS Authentication failed.
-//
- STG_E_CSS_AUTHENTICATION_FAILURE = HRESULT($80030306);
- {$EXTERNALSYM STG_E_CSS_AUTHENTICATION_FAILURE}
-
-//
-// MessageId: STG_E_CSS_KEY_NOT_PRESENT
-//
-// MessageText:
-//
-// Copy Protection Error - The given sector does not have a valid CSS key.
-//
- STG_E_CSS_KEY_NOT_PRESENT = HRESULT($80030307);
- {$EXTERNALSYM STG_E_CSS_KEY_NOT_PRESENT}
-
-//
-// MessageId: STG_E_CSS_KEY_NOT_ESTABLISHED
-//
-// MessageText:
-//
-// Copy Protection Error - DVD session key not established.
-//
- STG_E_CSS_KEY_NOT_ESTABLISHED = HRESULT($80030308);
- {$EXTERNALSYM STG_E_CSS_KEY_NOT_ESTABLISHED}
-
-//
-// MessageId: STG_E_CSS_SCRAMBLED_SECTOR
-//
-// MessageText:
-//
-// Copy Protection Error - The read failed because the sector is encrypted.
-//
- STG_E_CSS_SCRAMBLED_SECTOR = HRESULT($80030309);
- {$EXTERNALSYM STG_E_CSS_SCRAMBLED_SECTOR}
-
-//
-// MessageId: STG_E_CSS_REGION_MISMATCH
-//
-// MessageText:
-//
-// Copy Protection Error - The current DVD's region does not correspond to the region setting of the drive.
-//
- STG_E_CSS_REGION_MISMATCH = HRESULT($8003030A);
- {$EXTERNALSYM STG_E_CSS_REGION_MISMATCH}
-
-//
-// MessageId: STG_E_RESETS_EXHAUSTED
-//
-// MessageText:
-//
-// Copy Protection Error - The drive's region setting may be permanent or the number of user resets has been exhausted.
-//
- STG_E_RESETS_EXHAUSTED = HRESULT($8003030B);
- {$EXTERNALSYM STG_E_RESETS_EXHAUSTED}
-
-{*++
-
- MessageId's 0x0305 - 0x031f (inclusive) are reserved for **STORAGE**
- copy protection errors.
-
---*}
-// ******************
-// FACILITY_RPC
-// ******************
-//
-// Codes 0x0-0x11 are propagated from 16 bit OLE.
-//
-//
-// MessageId: RPC_E_CALL_REJECTED
-//
-// MessageText:
-//
-// Call was rejected by callee.
-//
- RPC_E_CALL_REJECTED = HRESULT($80010001);
- {$EXTERNALSYM RPC_E_CALL_REJECTED}
-
-//
-// MessageId: RPC_E_CALL_CANCELED
-//
-// MessageText:
-//
-// Call was canceled by the message filter.
-//
- RPC_E_CALL_CANCELED = HRESULT($80010002);
- {$EXTERNALSYM RPC_E_CALL_CANCELED}
-
-//
-// MessageId: RPC_E_CANTPOST_INSENDCALL
-//
-// MessageText:
-//
-// The caller is dispatching an intertask SendMessage call and cannot call out via PostMessage.
-//
- RPC_E_CANTPOST_INSENDCALL = HRESULT($80010003);
- {$EXTERNALSYM RPC_E_CANTPOST_INSENDCALL}
-
-//
-// MessageId: RPC_E_CANTCALLOUT_INASYNCCALL
-//
-// MessageText:
-//
-// The caller is dispatching an asynchronous call and cannot make an outgoing call on behalf of this call.
-//
- RPC_E_CANTCALLOUT_INASYNCCALL = HRESULT($80010004);
- {$EXTERNALSYM RPC_E_CANTCALLOUT_INASYNCCALL}
-
-//
-// MessageId: RPC_E_CANTCALLOUT_INEXTERNALCALL
-//
-// MessageText:
-//
-// It is illegal to call out while inside message filter.
-//
- RPC_E_CANTCALLOUT_INEXTERNALCALL = HRESULT($80010005);
- {$EXTERNALSYM RPC_E_CANTCALLOUT_INEXTERNALCALL}
-
-//
-// MessageId: RPC_E_CONNECTION_TERMINATED
-//
-// MessageText:
-//
-// The connection terminated or is in a bogus state and cannot be used any more. Other connections are still valid.
-//
- RPC_E_CONNECTION_TERMINATED = HRESULT($80010006);
- {$EXTERNALSYM RPC_E_CONNECTION_TERMINATED}
-
-//
-// MessageId: RPC_E_SERVER_DIED
-//
-// MessageText:
-//
-// The callee (server [not server application]) is not available and disappeared; all connections are invalid. The call may have executed.
-//
- RPC_E_SERVER_DIED = HRESULT($80010007);
- {$EXTERNALSYM RPC_E_SERVER_DIED}
-
-//
-// MessageId: RPC_E_CLIENT_DIED
-//
-// MessageText:
-//
-// The caller (client) disappeared while the callee (server) was processing a call.
-//
- RPC_E_CLIENT_DIED = HRESULT($80010008);
- {$EXTERNALSYM RPC_E_CLIENT_DIED}
-
-//
-// MessageId: RPC_E_INVALID_DATAPACKET
-//
-// MessageText:
-//
-// The data packet with the marshalled parameter data is incorrect.
-//
- RPC_E_INVALID_DATAPACKET = HRESULT($80010009);
- {$EXTERNALSYM RPC_E_INVALID_DATAPACKET}
-
-//
-// MessageId: RPC_E_CANTTRANSMIT_CALL
-//
-// MessageText:
-//
-// The call was not transmitted properly; the message queue was full and was not emptied after yielding.
-//
- RPC_E_CANTTRANSMIT_CALL = HRESULT($8001000A);
- {$EXTERNALSYM RPC_E_CANTTRANSMIT_CALL}
-
-//
-// MessageId: RPC_E_CLIENT_CANTMARSHAL_DATA
-//
-// MessageText:
-//
-// The client (caller) cannot marshall the parameter data - low memory, etc.
-//
- RPC_E_CLIENT_CANTMARSHAL_DATA = HRESULT($8001000B);
- {$EXTERNALSYM RPC_E_CLIENT_CANTMARSHAL_DATA}
-
-//
-// MessageId: RPC_E_CLIENT_CANTUNMARSHAL_DATA
-//
-// MessageText:
-//
-// The client (caller) cannot unmarshall the return data - low memory, etc.
-//
- RPC_E_CLIENT_CANTUNMARSHAL_DATA = HRESULT($8001000C);
- {$EXTERNALSYM RPC_E_CLIENT_CANTUNMARSHAL_DATA}
-
-//
-// MessageId: RPC_E_SERVER_CANTMARSHAL_DATA
-//
-// MessageText:
-//
-// The server (callee) cannot marshall the return data - low memory, etc.
-//
- RPC_E_SERVER_CANTMARSHAL_DATA = HRESULT($8001000D);
- {$EXTERNALSYM RPC_E_SERVER_CANTMARSHAL_DATA}
-
-//
-// MessageId: RPC_E_SERVER_CANTUNMARSHAL_DATA
-//
-// MessageText:
-//
-// The server (callee) cannot unmarshall the parameter data - low memory, etc.
-//
- RPC_E_SERVER_CANTUNMARSHAL_DATA = HRESULT($8001000E);
- {$EXTERNALSYM RPC_E_SERVER_CANTUNMARSHAL_DATA}
-
-//
-// MessageId: RPC_E_INVALID_DATA
-//
-// MessageText:
-//
-// Received data is invalid; could be server or client data.
-//
- RPC_E_INVALID_DATA = HRESULT($8001000F);
- {$EXTERNALSYM RPC_E_INVALID_DATA}
-
-//
-// MessageId: RPC_E_INVALID_PARAMETER
-//
-// MessageText:
-//
-// A particular parameter is invalid and cannot be (un)marshalled.
-//
- RPC_E_INVALID_PARAMETER = HRESULT($80010010);
- {$EXTERNALSYM RPC_E_INVALID_PARAMETER}
-
-//
-// MessageId: RPC_E_CANTCALLOUT_AGAIN
-//
-// MessageText:
-//
-// There is no second outgoing call on same channel in DDE conversation.
-//
- RPC_E_CANTCALLOUT_AGAIN = HRESULT($80010011);
- {$EXTERNALSYM RPC_E_CANTCALLOUT_AGAIN}
-
-//
-// MessageId: RPC_E_SERVER_DIED_DNE
-//
-// MessageText:
-//
-// The callee (server [not server application]) is not available and disappeared; all connections are invalid. The call did not execute.
-//
- RPC_E_SERVER_DIED_DNE = HRESULT($80010012);
- {$EXTERNALSYM RPC_E_SERVER_DIED_DNE}
-
-//
-// MessageId: RPC_E_SYS_CALL_FAILED
-//
-// MessageText:
-//
-// System call failed.
-//
- RPC_E_SYS_CALL_FAILED = HRESULT($80010100);
- {$EXTERNALSYM RPC_E_SYS_CALL_FAILED}
-
-//
-// MessageId: RPC_E_OUT_OF_RESOURCES
-//
-// MessageText:
-//
-// Could not allocate some required resource (memory, events, ...)
-//
- RPC_E_OUT_OF_RESOURCES = HRESULT($80010101);
- {$EXTERNALSYM RPC_E_OUT_OF_RESOURCES}
-
-//
-// MessageId: RPC_E_ATTEMPTED_MULTITHREAD
-//
-// MessageText:
-//
-// Attempted to make calls on more than one thread in single threaded mode.
-//
- RPC_E_ATTEMPTED_MULTITHREAD = HRESULT($80010102);
- {$EXTERNALSYM RPC_E_ATTEMPTED_MULTITHREAD}
-
-//
-// MessageId: RPC_E_NOT_REGISTERED
-//
-// MessageText:
-//
-// The requested interface is not registered on the server object.
-//
- RPC_E_NOT_REGISTERED = HRESULT($80010103);
- {$EXTERNALSYM RPC_E_NOT_REGISTERED}
-
-//
-// MessageId: RPC_E_FAULT
-//
-// MessageText:
-//
-// RPC could not call the server or could not return the results of calling the server.
-//
- RPC_E_FAULT = HRESULT($80010104);
- {$EXTERNALSYM RPC_E_FAULT}
-
-//
-// MessageId: RPC_E_SERVERFAULT
-//
-// MessageText:
-//
-// The server threw an exception.
-//
- RPC_E_SERVERFAULT = HRESULT($80010105);
- {$EXTERNALSYM RPC_E_SERVERFAULT}
-
-//
-// MessageId: RPC_E_CHANGED_MODE
-//
-// MessageText:
-//
-// Cannot change thread mode after it is set.
-//
- RPC_E_CHANGED_MODE = HRESULT($80010106);
- {$EXTERNALSYM RPC_E_CHANGED_MODE}
-
-//
-// MessageId: RPC_E_INVALIDMETHOD
-//
-// MessageText:
-//
-// The method called does not exist on the server.
-//
- RPC_E_INVALIDMETHOD = HRESULT($80010107);
- {$EXTERNALSYM RPC_E_INVALIDMETHOD}
-
-//
-// MessageId: RPC_E_DISCONNECTED
-//
-// MessageText:
-//
-// The object invoked has disconnected from its clients.
-//
- RPC_E_DISCONNECTED = HRESULT($80010108);
- {$EXTERNALSYM RPC_E_DISCONNECTED}
-
-//
-// MessageId: RPC_E_RETRY
-//
-// MessageText:
-//
-// The object invoked chose not to process the call now. Try again later.
-//
- RPC_E_RETRY = HRESULT($80010109);
- {$EXTERNALSYM RPC_E_RETRY}
-
-//
-// MessageId: RPC_E_SERVERCALL_RETRYLATER
-//
-// MessageText:
-//
-// The message filter indicated that the application is busy.
-//
- RPC_E_SERVERCALL_RETRYLATER = HRESULT($8001010A);
- {$EXTERNALSYM RPC_E_SERVERCALL_RETRYLATER}
-
-//
-// MessageId: RPC_E_SERVERCALL_REJECTED
-//
-// MessageText:
-//
-// The message filter rejected the call.
-//
- RPC_E_SERVERCALL_REJECTED = HRESULT($8001010B);
- {$EXTERNALSYM RPC_E_SERVERCALL_REJECTED}
-
-//
-// MessageId: RPC_E_INVALID_CALLDATA
-//
-// MessageText:
-//
-// A call control interfaces was called with invalid data.
-//
- RPC_E_INVALID_CALLDATA = HRESULT($8001010C);
- {$EXTERNALSYM RPC_E_INVALID_CALLDATA}
-
-//
-// MessageId: RPC_E_CANTCALLOUT_ININPUTSYNCCALL
-//
-// MessageText:
-//
-// An outgoing call cannot be made since the application is dispatching an input-synchronous call.
-//
- RPC_E_CANTCALLOUT_ININPUTSYNCCALL = HRESULT($8001010D);
- {$EXTERNALSYM RPC_E_CANTCALLOUT_ININPUTSYNCCALL}
-
-//
-// MessageId: RPC_E_WRONG_THREAD
-//
-// MessageText:
-//
-// The application called an interface that was marshalled for a different thread.
-//
- RPC_E_WRONG_THREAD = HRESULT($8001010E);
- {$EXTERNALSYM RPC_E_WRONG_THREAD}
-
-//
-// MessageId: RPC_E_THREAD_NOT_INIT
-//
-// MessageText:
-//
-// CoInitialize has not been called on the current thread.
-//
- RPC_E_THREAD_NOT_INIT = HRESULT($8001010F);
- {$EXTERNALSYM RPC_E_THREAD_NOT_INIT}
-
-//
-// MessageId: RPC_E_VERSION_MISMATCH
-//
-// MessageText:
-//
-// The version of OLE on the client and server machines does not match.
-//
- RPC_E_VERSION_MISMATCH = HRESULT($80010110);
- {$EXTERNALSYM RPC_E_VERSION_MISMATCH}
-
-//
-// MessageId: RPC_E_INVALID_HEADER
-//
-// MessageText:
-//
-// OLE received a packet with an invalid header.
-//
- RPC_E_INVALID_HEADER = HRESULT($80010111);
- {$EXTERNALSYM RPC_E_INVALID_HEADER}
-
-//
-// MessageId: RPC_E_INVALID_EXTENSION
-//
-// MessageText:
-//
-// OLE received a packet with an invalid extension.
-//
- RPC_E_INVALID_EXTENSION = HRESULT($80010112);
- {$EXTERNALSYM RPC_E_INVALID_EXTENSION}
-
-//
-// MessageId: RPC_E_INVALID_IPID
-//
-// MessageText:
-//
-// The requested object or interface does not exist.
-//
- RPC_E_INVALID_IPID = HRESULT($80010113);
- {$EXTERNALSYM RPC_E_INVALID_IPID}
-
-//
-// MessageId: RPC_E_INVALID_OBJECT
-//
-// MessageText:
-//
-// The requested object does not exist.
-//
- RPC_E_INVALID_OBJECT = HRESULT($80010114);
- {$EXTERNALSYM RPC_E_INVALID_OBJECT}
-
-//
-// MessageId: RPC_S_CALLPENDING
-//
-// MessageText:
-//
-// OLE has sent a request and is waiting for a reply.
-//
- RPC_S_CALLPENDING = HRESULT($80010115);
- {$EXTERNALSYM RPC_S_CALLPENDING}
-
-//
-// MessageId: RPC_S_WAITONTIMER
-//
-// MessageText:
-//
-// OLE is waiting before retrying a request.
-//
- RPC_S_WAITONTIMER = HRESULT($80010116);
- {$EXTERNALSYM RPC_S_WAITONTIMER}
-
-//
-// MessageId: RPC_E_CALL_COMPLETE
-//
-// MessageText:
-//
-// Call context cannot be accessed after call completed.
-//
- RPC_E_CALL_COMPLETE = HRESULT($80010117);
- {$EXTERNALSYM RPC_E_CALL_COMPLETE}
-
-//
-// MessageId: RPC_E_UNSECURE_CALL
-//
-// MessageText:
-//
-// Impersonate on unsecure calls is not supported.
-//
- RPC_E_UNSECURE_CALL = HRESULT($80010118);
- {$EXTERNALSYM RPC_E_UNSECURE_CALL}
-
-//
-// MessageId: RPC_E_TOO_LATE
-//
-// MessageText:
-//
-// Security must be initialized before any interfaces are marshalled or unmarshalled. It cannot be changed once initialized.
-//
- RPC_E_TOO_LATE = HRESULT($80010119);
- {$EXTERNALSYM RPC_E_TOO_LATE}
-
-//
-// MessageId: RPC_E_NO_GOOD_SECURITY_PACKAGES
-//
-// MessageText:
-//
-// No security packages are installed on this machine or the user is not logged on or there are no compatible security packages between the client and server.
-//
- RPC_E_NO_GOOD_SECURITY_PACKAGES = HRESULT($8001011A);
- {$EXTERNALSYM RPC_E_NO_GOOD_SECURITY_PACKAGES}
-
-//
-// MessageId: RPC_E_ACCESS_DENIED
-//
-// MessageText:
-//
-// Access is denied.
-//
- RPC_E_ACCESS_DENIED = HRESULT($8001011B);
- {$EXTERNALSYM RPC_E_ACCESS_DENIED}
-
-//
-// MessageId: RPC_E_REMOTE_DISABLED
-//
-// MessageText:
-//
-// Remote calls are not allowed for this process.
-//
- RPC_E_REMOTE_DISABLED = HRESULT($8001011C);
- {$EXTERNALSYM RPC_E_REMOTE_DISABLED}
-
-//
-// MessageId: RPC_E_INVALID_OBJREF
-//
-// MessageText:
-//
-// The marshaled interface data packet (OBJREF) has an invalid or unknown format.
-//
- RPC_E_INVALID_OBJREF = HRESULT($8001011D);
- {$EXTERNALSYM RPC_E_INVALID_OBJREF}
-
-//
-// MessageId: RPC_E_NO_CONTEXT
-//
-// MessageText:
-//
-// No context is associated with this call. This happens for some custom marshalled calls and on the client side of the call.
-//
- RPC_E_NO_CONTEXT = HRESULT($8001011E);
- {$EXTERNALSYM RPC_E_NO_CONTEXT}
-
-//
-// MessageId: RPC_E_TIMEOUT
-//
-// MessageText:
-//
-// This operation returned because the timeout period expired.
-//
- RPC_E_TIMEOUT = HRESULT($8001011F);
- {$EXTERNALSYM RPC_E_TIMEOUT}
-
-//
-// MessageId: RPC_E_NO_SYNC
-//
-// MessageText:
-//
-// There are no synchronize objects to wait on.
-//
- RPC_E_NO_SYNC = HRESULT($80010120);
- {$EXTERNALSYM RPC_E_NO_SYNC}
-
-//
-// MessageId: RPC_E_FULLSIC_REQUIRED
-//
-// MessageText:
-//
-// Full subject issuer chain SSL principal name expected from the server.
-//
- RPC_E_FULLSIC_REQUIRED = HRESULT($80010121);
- {$EXTERNALSYM RPC_E_FULLSIC_REQUIRED}
-
-//
-// MessageId: RPC_E_INVALID_STD_NAME
-//
-// MessageText:
-//
-// Principal name is not a valid MSSTD name.
-//
- RPC_E_INVALID_STD_NAME = HRESULT($80010122);
- {$EXTERNALSYM RPC_E_INVALID_STD_NAME}
-
-//
-// MessageId: CO_E_FAILEDTOIMPERSONATE
-//
-// MessageText:
-//
-// Unable to impersonate DCOM client
-//
- CO_E_FAILEDTOIMPERSONATE = HRESULT($80010123);
- {$EXTERNALSYM CO_E_FAILEDTOIMPERSONATE}
-
-//
-// MessageId: CO_E_FAILEDTOGETSECCTX
-//
-// MessageText:
-//
-// Unable to obtain server's security context
-//
- CO_E_FAILEDTOGETSECCTX = HRESULT($80010124);
- {$EXTERNALSYM CO_E_FAILEDTOGETSECCTX}
-
-//
-// MessageId: CO_E_FAILEDTOOPENTHREADTOKEN
-//
-// MessageText:
-//
-// Unable to open the access token of the current thread
-//
- CO_E_FAILEDTOOPENTHREADTOKEN = HRESULT($80010125);
- {$EXTERNALSYM CO_E_FAILEDTOOPENTHREADTOKEN}
-
-//
-// MessageId: CO_E_FAILEDTOGETTOKENINFO
-//
-// MessageText:
-//
-// Unable to obtain user info from an access token
-//
- CO_E_FAILEDTOGETTOKENINFO = HRESULT($80010126);
- {$EXTERNALSYM CO_E_FAILEDTOGETTOKENINFO}
-
-//
-// MessageId: CO_E_TRUSTEEDOESNTMATCHCLIENT
-//
-// MessageText:
-//
-// The client who called IAccessControl::IsAccessPermitted was not the trustee provided to the method
-//
- CO_E_TRUSTEEDOESNTMATCHCLIENT = HRESULT($80010127);
- {$EXTERNALSYM CO_E_TRUSTEEDOESNTMATCHCLIENT}
-
-//
-// MessageId: CO_E_FAILEDTOQUERYCLIENTBLANKET
-//
-// MessageText:
-//
-// Unable to obtain the client's security blanket
-//
- CO_E_FAILEDTOQUERYCLIENTBLANKET = HRESULT($80010128);
- {$EXTERNALSYM CO_E_FAILEDTOQUERYCLIENTBLANKET}
-
-//
-// MessageId: CO_E_FAILEDTOSETDACL
-//
-// MessageText:
-//
-// Unable to set a discretionary ACL into a security descriptor
-//
- CO_E_FAILEDTOSETDACL = HRESULT($80010129);
- {$EXTERNALSYM CO_E_FAILEDTOSETDACL}
-
-//
-// MessageId: CO_E_ACCESSCHECKFAILED
-//
-// MessageText:
-//
-// The system function, AccessCheck, returned false
-//
- CO_E_ACCESSCHECKFAILED = HRESULT($8001012A);
- {$EXTERNALSYM CO_E_ACCESSCHECKFAILED}
-
-//
-// MessageId: CO_E_NETACCESSAPIFAILED
-//
-// MessageText:
-//
-// Either NetAccessDel or NetAccessAdd returned an error code.
-//
- CO_E_NETACCESSAPIFAILED = HRESULT($8001012B);
- {$EXTERNALSYM CO_E_NETACCESSAPIFAILED}
-
-//
-// MessageId: CO_E_WRONGTRUSTEENAMESYNTAX
-//
-// MessageText:
-//
-// One of the trustee strings provided by the user did not conform to the <Domain>\<Name> syntax and it was not the "*" string
-//
- CO_E_WRONGTRUSTEENAMESYNTAX = HRESULT($8001012C);
- {$EXTERNALSYM CO_E_WRONGTRUSTEENAMESYNTAX}
-
-//
-// MessageId: CO_E_INVALIDSID
-//
-// MessageText:
-//
-// One of the security identifiers provided by the user was invalid
-//
- CO_E_INVALIDSID = HRESULT($8001012D);
- {$EXTERNALSYM CO_E_INVALIDSID}
-
-//
-// MessageId: CO_E_CONVERSIONFAILED
-//
-// MessageText:
-//
-// Unable to convert a wide character trustee string to a multibyte trustee string
-//
- CO_E_CONVERSIONFAILED = HRESULT($8001012E);
- {$EXTERNALSYM CO_E_CONVERSIONFAILED}
-
-//
-// MessageId: CO_E_NOMATCHINGSIDFOUND
-//
-// MessageText:
-//
-// Unable to find a security identifier that corresponds to a trustee string provided by the user
-//
- CO_E_NOMATCHINGSIDFOUND = HRESULT($8001012F);
- {$EXTERNALSYM CO_E_NOMATCHINGSIDFOUND}
-
-//
-// MessageId: CO_E_LOOKUPACCSIDFAILED
-//
-// MessageText:
-//
-// The system function, LookupAccountSID, failed
-//
- CO_E_LOOKUPACCSIDFAILED = HRESULT($80010130);
- {$EXTERNALSYM CO_E_LOOKUPACCSIDFAILED}
-
-//
-// MessageId: CO_E_NOMATCHINGNAMEFOUND
-//
-// MessageText:
-//
-// Unable to find a trustee name that corresponds to a security identifier provided by the user
-//
- CO_E_NOMATCHINGNAMEFOUND = HRESULT($80010131);
- {$EXTERNALSYM CO_E_NOMATCHINGNAMEFOUND}
-
-//
-// MessageId: CO_E_LOOKUPACCNAMEFAILED
-//
-// MessageText:
-//
-// The system function, LookupAccountName, failed
-//
- CO_E_LOOKUPACCNAMEFAILED = HRESULT($80010132);
- {$EXTERNALSYM CO_E_LOOKUPACCNAMEFAILED}
-
-//
-// MessageId: CO_E_SETSERLHNDLFAILED
-//
-// MessageText:
-//
-// Unable to set or reset a serialization handle
-//
- CO_E_SETSERLHNDLFAILED = HRESULT($80010133);
- {$EXTERNALSYM CO_E_SETSERLHNDLFAILED}
-
-//
-// MessageId: CO_E_FAILEDTOGETWINDIR
-//
-// MessageText:
-//
-// Unable to obtain the Windows directory
-//
- CO_E_FAILEDTOGETWINDIR = HRESULT($80010134);
- {$EXTERNALSYM CO_E_FAILEDTOGETWINDIR}
-
-//
-// MessageId: CO_E_PATHTOOLONG
-//
-// MessageText:
-//
-// Path too long
-//
- CO_E_PATHTOOLONG = HRESULT($80010135);
- {$EXTERNALSYM CO_E_PATHTOOLONG}
-
-//
-// MessageId: CO_E_FAILEDTOGENUUID
-//
-// MessageText:
-//
-// Unable to generate a uuid.
-//
- CO_E_FAILEDTOGENUUID = HRESULT($80010136);
- {$EXTERNALSYM CO_E_FAILEDTOGENUUID}
-
-//
-// MessageId: CO_E_FAILEDTOCREATEFILE
-//
-// MessageText:
-//
-// Unable to create file
-//
- CO_E_FAILEDTOCREATEFILE = HRESULT($80010137);
- {$EXTERNALSYM CO_E_FAILEDTOCREATEFILE}
-
-//
-// MessageId: CO_E_FAILEDTOCLOSEHANDLE
-//
-// MessageText:
-//
-// Unable to close a serialization handle or a file handle.
-//
- CO_E_FAILEDTOCLOSEHANDLE = HRESULT($80010138);
- {$EXTERNALSYM CO_E_FAILEDTOCLOSEHANDLE}
-
-//
-// MessageId: CO_E_EXCEEDSYSACLLIMIT
-//
-// MessageText:
-//
-// The number of ACEs in an ACL exceeds the system limit.
-//
- CO_E_EXCEEDSYSACLLIMIT = HRESULT($80010139);
- {$EXTERNALSYM CO_E_EXCEEDSYSACLLIMIT}
-
-//
-// MessageId: CO_E_ACESINWRONGORDER
-//
-// MessageText:
-//
-// Not all the DENY_ACCESS ACEs are arranged in front of the GRANT_ACCESS ACEs in the stream.
-//
- CO_E_ACESINWRONGORDER = HRESULT($8001013A);
- {$EXTERNALSYM CO_E_ACESINWRONGORDER}
-
-//
-// MessageId: CO_E_INCOMPATIBLESTREAMVERSION
-//
-// MessageText:
-//
-// The version of ACL format in the stream is not supported by this implementation of IAccessControl
-//
- CO_E_INCOMPATIBLESTREAMVERSION = HRESULT($8001013B);
- {$EXTERNALSYM CO_E_INCOMPATIBLESTREAMVERSION}
-
-//
-// MessageId: CO_E_FAILEDTOOPENPROCESSTOKEN
-//
-// MessageText:
-//
-// Unable to open the access token of the server process
-//
- CO_E_FAILEDTOOPENPROCESSTOKEN = HRESULT($8001013C);
- {$EXTERNALSYM CO_E_FAILEDTOOPENPROCESSTOKEN}
-
-//
-// MessageId: CO_E_DECODEFAILED
-//
-// MessageText:
-//
-// Unable to decode the ACL in the stream provided by the user
-//
- CO_E_DECODEFAILED = HRESULT($8001013D);
- {$EXTERNALSYM CO_E_DECODEFAILED}
-
-//
-// MessageId: CO_E_ACNOTINITIALIZED
-//
-// MessageText:
-//
-// The COM IAccessControl object is not initialized
-//
- CO_E_ACNOTINITIALIZED = HRESULT($8001013F);
- {$EXTERNALSYM CO_E_ACNOTINITIALIZED}
-
-//
-// MessageId: CO_E_CANCEL_DISABLED
-//
-// MessageText:
-//
-// Call Cancellation is disabled
-//
- CO_E_CANCEL_DISABLED = HRESULT($80010140);
- {$EXTERNALSYM CO_E_CANCEL_DISABLED}
-
-//
-// MessageId: RPC_E_UNEXPECTED
-//
-// MessageText:
-//
-// An internal error occurred.
-//
- RPC_E_UNEXPECTED = HRESULT($8001FFFF);
- {$EXTERNALSYM RPC_E_UNEXPECTED}
-
-
-//////////////////////////////////////
-// //
-// Additional Security Status Codes //
-// //
-// Facility=Security //
-// //
-//////////////////////////////////////
-
-//
-// MessageId: ERROR_AUDITING_DISABLED
-//
-// MessageText:
-//
-// The specified event is currently not being audited.
-//
- ERROR_AUDITING_DISABLED = HRESULT($C0090001);
- {$EXTERNALSYM ERROR_AUDITING_DISABLED}
-
-//
-// MessageId: ERROR_ALL_SIDS_FILTERED
-//
-// MessageText:
-//
-// The SID filtering operation removed all SIDs.
-//
- ERROR_ALL_SIDS_FILTERED = HRESULT($C0090002);
- {$EXTERNALSYM ERROR_ALL_SIDS_FILTERED}
-
-
-/////////////////////////////////////////////
-// //
-// end of Additional Security Status Codes //
-// //
-/////////////////////////////////////////////
-
-
- /////////////////
- //
- // FACILITY_SSPI
- //
- /////////////////
-
-//
-// MessageId: NTE_BAD_UID
-//
-// MessageText:
-//
-// Bad UID.
-//
- NTE_BAD_UID = HRESULT($80090001);
- {$EXTERNALSYM NTE_BAD_UID}
-
-//
-// MessageId: NTE_BAD_HASH
-//
-// MessageText:
-//
-// Bad Hash.
-//
- NTE_BAD_HASH = HRESULT($80090002);
- {$EXTERNALSYM NTE_BAD_HASH}
-
-//
-// MessageId: NTE_BAD_KEY
-//
-// MessageText:
-//
-// Bad Key.
-//
- NTE_BAD_KEY = HRESULT($80090003);
- {$EXTERNALSYM NTE_BAD_KEY}
-
-//
-// MessageId: NTE_BAD_LEN
-//
-// MessageText:
-//
-// Bad Length.
-//
- NTE_BAD_LEN = HRESULT($80090004);
- {$EXTERNALSYM NTE_BAD_LEN}
-
-//
-// MessageId: NTE_BAD_DATA
-//
-// MessageText:
-//
-// Bad Data.
-//
- NTE_BAD_DATA = HRESULT($80090005);
- {$EXTERNALSYM NTE_BAD_DATA}
-
-//
-// MessageId: NTE_BAD_SIGNATURE
-//
-// MessageText:
-//
-// Invalid Signature.
-//
- NTE_BAD_SIGNATURE = HRESULT($80090006);
- {$EXTERNALSYM NTE_BAD_SIGNATURE}
-
-//
-// MessageId: NTE_BAD_VER
-//
-// MessageText:
-//
-// Bad Version of provider.
-//
- NTE_BAD_VER = HRESULT($80090007);
- {$EXTERNALSYM NTE_BAD_VER}
-
-//
-// MessageId: NTE_BAD_ALGID
-//
-// MessageText:
-//
-// Invalid algorithm specified.
-//
- NTE_BAD_ALGID = HRESULT($80090008);
- {$EXTERNALSYM NTE_BAD_ALGID}
-
-//
-// MessageId: NTE_BAD_FLAGS
-//
-// MessageText:
-//
-// Invalid flags specified.
-//
- NTE_BAD_FLAGS = HRESULT($80090009);
- {$EXTERNALSYM NTE_BAD_FLAGS}
-
-//
-// MessageId: NTE_BAD_TYPE
-//
-// MessageText:
-//
-// Invalid type specified.
-//
- NTE_BAD_TYPE = HRESULT($8009000A);
- {$EXTERNALSYM NTE_BAD_TYPE}
-
-//
-// MessageId: NTE_BAD_KEY_STATE
-//
-// MessageText:
-//
-// Key not valid for use in specified state.
-//
- NTE_BAD_KEY_STATE = HRESULT($8009000B);
- {$EXTERNALSYM NTE_BAD_KEY_STATE}
-
-//
-// MessageId: NTE_BAD_HASH_STATE
-//
-// MessageText:
-//
-// Hash not valid for use in specified state.
-//
- NTE_BAD_HASH_STATE = HRESULT($8009000C);
- {$EXTERNALSYM NTE_BAD_HASH_STATE}
-
-//
-// MessageId: NTE_NO_KEY
-//
-// MessageText:
-//
-// Key does not exist.
-//
- NTE_NO_KEY = HRESULT($8009000D);
- {$EXTERNALSYM NTE_NO_KEY}
-
-//
-// MessageId: NTE_NO_MEMORY
-//
-// MessageText:
-//
-// Insufficient memory available for the operation.
-//
- NTE_NO_MEMORY = HRESULT($8009000E);
- {$EXTERNALSYM NTE_NO_MEMORY}
-
-//
-// MessageId: NTE_EXISTS
-//
-// MessageText:
-//
-// Object already exists.
-//
- NTE_EXISTS = HRESULT($8009000F);
- {$EXTERNALSYM NTE_EXISTS}
-
-//
-// MessageId: NTE_PERM
-//
-// MessageText:
-//
-// Access denied.
-//
- NTE_PERM = HRESULT($80090010);
- {$EXTERNALSYM NTE_PERM}
-
-//
-// MessageId: NTE_NOT_FOUND
-//
-// MessageText:
-//
-// Object was not found.
-//
- NTE_NOT_FOUND = HRESULT($80090011);
- {$EXTERNALSYM NTE_NOT_FOUND}
-
-//
-// MessageId: NTE_DOUBLE_ENCRYPT
-//
-// MessageText:
-//
-// Data already encrypted.
-//
- NTE_DOUBLE_ENCRYPT = HRESULT($80090012);
- {$EXTERNALSYM NTE_DOUBLE_ENCRYPT}
-
-//
-// MessageId: NTE_BAD_PROVIDER
-//
-// MessageText:
-//
-// Invalid provider specified.
-//
- NTE_BAD_PROVIDER = HRESULT($80090013);
- {$EXTERNALSYM NTE_BAD_PROVIDER}
-
-//
-// MessageId: NTE_BAD_PROV_TYPE
-//
-// MessageText:
-//
-// Invalid provider type specified.
-//
- NTE_BAD_PROV_TYPE = HRESULT($80090014);
- {$EXTERNALSYM NTE_BAD_PROV_TYPE}
-
-//
-// MessageId: NTE_BAD_PUBLIC_KEY
-//
-// MessageText:
-//
-// Provider's public key is invalid.
-//
- NTE_BAD_PUBLIC_KEY = HRESULT($80090015);
- {$EXTERNALSYM NTE_BAD_PUBLIC_KEY}
-
-//
-// MessageId: NTE_BAD_KEYSET
-//
-// MessageText:
-//
-// Keyset does not exist
-//
- NTE_BAD_KEYSET = HRESULT($80090016);
- {$EXTERNALSYM NTE_BAD_KEYSET}
-
-//
-// MessageId: NTE_PROV_TYPE_NOT_DEF
-//
-// MessageText:
-//
-// Provider type not defined.
-//
- NTE_PROV_TYPE_NOT_DEF = HRESULT($80090017);
- {$EXTERNALSYM NTE_PROV_TYPE_NOT_DEF}
-
-//
-// MessageId: NTE_PROV_TYPE_ENTRY_BAD
-//
-// MessageText:
-//
-// Provider type as registered is invalid.
-//
- NTE_PROV_TYPE_ENTRY_BAD = HRESULT($80090018);
- {$EXTERNALSYM NTE_PROV_TYPE_ENTRY_BAD}
-
-//
-// MessageId: NTE_KEYSET_NOT_DEF
-//
-// MessageText:
-//
-// The keyset is not defined.
-//
- NTE_KEYSET_NOT_DEF = HRESULT($80090019);
- {$EXTERNALSYM NTE_KEYSET_NOT_DEF}
-
-//
-// MessageId: NTE_KEYSET_ENTRY_BAD
-//
-// MessageText:
-//
-// Keyset as registered is invalid.
-//
- NTE_KEYSET_ENTRY_BAD = HRESULT($8009001A);
- {$EXTERNALSYM NTE_KEYSET_ENTRY_BAD}
-
-//
-// MessageId: NTE_PROV_TYPE_NO_MATCH
-//
-// MessageText:
-//
-// Provider type does not match registered value.
-//
- NTE_PROV_TYPE_NO_MATCH = HRESULT($8009001B);
- {$EXTERNALSYM NTE_PROV_TYPE_NO_MATCH}
-
-//
-// MessageId: NTE_SIGNATURE_FILE_BAD
-//
-// MessageText:
-//
-// The digital signature file is corrupt.
-//
- NTE_SIGNATURE_FILE_BAD = HRESULT($8009001C);
- {$EXTERNALSYM NTE_SIGNATURE_FILE_BAD}
-
-//
-// MessageId: NTE_PROVIDER_DLL_FAIL
-//
-// MessageText:
-//
-// Provider DLL failed to initialize correctly.
-//
- NTE_PROVIDER_DLL_FAIL = HRESULT($8009001D);
- {$EXTERNALSYM NTE_PROVIDER_DLL_FAIL}
-
-//
-// MessageId: NTE_PROV_DLL_NOT_FOUND
-//
-// MessageText:
-//
-// Provider DLL could not be found.
-//
- NTE_PROV_DLL_NOT_FOUND = HRESULT($8009001E);
- {$EXTERNALSYM NTE_PROV_DLL_NOT_FOUND}
-
-//
-// MessageId: NTE_BAD_KEYSET_PARAM
-//
-// MessageText:
-//
-// The Keyset parameter is invalid.
-//
- NTE_BAD_KEYSET_PARAM = HRESULT($8009001F);
- {$EXTERNALSYM NTE_BAD_KEYSET_PARAM}
-
-//
-// MessageId: NTE_FAIL
-//
-// MessageText:
-//
-// An internal error occurred.
-//
- NTE_FAIL = HRESULT($80090020);
- {$EXTERNALSYM NTE_FAIL}
-
-//
-// MessageId: NTE_SYS_ERR
-//
-// MessageText:
-//
-// A base error occurred.
-//
- NTE_SYS_ERR = HRESULT($80090021);
- {$EXTERNALSYM NTE_SYS_ERR}
-
-//
-// MessageId: NTE_SILENT_CONTEXT
-//
-// MessageText:
-//
-// Provider could not perform the action since the context was acquired as silent.
-//
- NTE_SILENT_CONTEXT = HRESULT($80090022);
- {$EXTERNALSYM NTE_SILENT_CONTEXT}
-
-//
-// MessageId: NTE_TOKEN_KEYSET_STORAGE_FULL
-//
-// MessageText:
-//
-// The security token does not have storage space available for an additional container.
-//
- NTE_TOKEN_KEYSET_STORAGE_FULL = HRESULT($80090023);
- {$EXTERNALSYM NTE_TOKEN_KEYSET_STORAGE_FULL}
-
-//
-// MessageId: NTE_TEMPORARY_PROFILE
-//
-// MessageText:
-//
-// The profile for the user is a temporary profile.
-//
- NTE_TEMPORARY_PROFILE = HRESULT($80090024);
- {$EXTERNALSYM NTE_TEMPORARY_PROFILE}
-
-//
-// MessageId: NTE_FIXEDPARAMETER
-//
-// MessageText:
-//
-// The key parameters could not be set because the CSP uses fixed parameters.
-//
- NTE_FIXEDPARAMETER = HRESULT($80090025);
- {$EXTERNALSYM NTE_FIXEDPARAMETER}
-
-//
-// MessageId: SEC_E_INSUFFICIENT_MEMORY
-//
-// MessageText:
-//
-// Not enough memory is available to complete this request
-//
- SEC_E_INSUFFICIENT_MEMORY = HRESULT($80090300);
- {$EXTERNALSYM SEC_E_INSUFFICIENT_MEMORY}
-
-//
-// MessageId: SEC_E_INVALID_HANDLE
-//
-// MessageText:
-//
-// The handle specified is invalid
-//
- SEC_E_INVALID_HANDLE = HRESULT($80090301);
- {$EXTERNALSYM SEC_E_INVALID_HANDLE}
-
-//
-// MessageId: SEC_E_UNSUPPORTED_FUNCTION
-//
-// MessageText:
-//
-// The function requested is not supported
-//
- SEC_E_UNSUPPORTED_FUNCTION = HRESULT($80090302);
- {$EXTERNALSYM SEC_E_UNSUPPORTED_FUNCTION}
-
-//
-// MessageId: SEC_E_TARGET_UNKNOWN
-//
-// MessageText:
-//
-// The specified target is unknown or unreachable
-//
- SEC_E_TARGET_UNKNOWN = HRESULT($80090303);
- {$EXTERNALSYM SEC_E_TARGET_UNKNOWN}
-
-//
-// MessageId: SEC_E_INTERNAL_ERROR
-//
-// MessageText:
-//
-// The Local Security Authority cannot be contacted
-//
- SEC_E_INTERNAL_ERROR = HRESULT($80090304);
- {$EXTERNALSYM SEC_E_INTERNAL_ERROR}
-
-//
-// MessageId: SEC_E_SECPKG_NOT_FOUND
-//
-// MessageText:
-//
-// The requested security package does not exist
-//
- SEC_E_SECPKG_NOT_FOUND = HRESULT($80090305);
- {$EXTERNALSYM SEC_E_SECPKG_NOT_FOUND}
-
-//
-// MessageId: SEC_E_NOT_OWNER
-//
-// MessageText:
-//
-// The caller is not the owner of the desired credentials
-//
- SEC_E_NOT_OWNER = HRESULT($80090306);
- {$EXTERNALSYM SEC_E_NOT_OWNER}
-
-//
-// MessageId: SEC_E_CANNOT_INSTALL
-//
-// MessageText:
-//
-// The security package failed to initialize, and cannot be installed
-//
- SEC_E_CANNOT_INSTALL = HRESULT($80090307);
- {$EXTERNALSYM SEC_E_CANNOT_INSTALL}
-
-//
-// MessageId: SEC_E_INVALID_TOKEN
-//
-// MessageText:
-//
-// The token supplied to the function is invalid
-//
- SEC_E_INVALID_TOKEN = HRESULT($80090308);
- {$EXTERNALSYM SEC_E_INVALID_TOKEN}
-
-//
-// MessageId: SEC_E_CANNOT_PACK
-//
-// MessageText:
-//
-// The security package is not able to marshall the logon buffer, so the logon attempt has failed
-//
- SEC_E_CANNOT_PACK = HRESULT($80090309);
- {$EXTERNALSYM SEC_E_CANNOT_PACK}
-
-//
-// MessageId: SEC_E_QOP_NOT_SUPPORTED
-//
-// MessageText:
-//
-// The per-message Quality of Protection is not supported by the security package
-//
- SEC_E_QOP_NOT_SUPPORTED = HRESULT($8009030A);
- {$EXTERNALSYM SEC_E_QOP_NOT_SUPPORTED}
-
-//
-// MessageId: SEC_E_NO_IMPERSONATION
-//
-// MessageText:
-//
-// The security context does not allow impersonation of the client
-//
- SEC_E_NO_IMPERSONATION = HRESULT($8009030B);
- {$EXTERNALSYM SEC_E_NO_IMPERSONATION}
-
-//
-// MessageId: SEC_E_LOGON_DENIED
-//
-// MessageText:
-//
-// The logon attempt failed
-//
- SEC_E_LOGON_DENIED = HRESULT($8009030C);
- {$EXTERNALSYM SEC_E_LOGON_DENIED}
-
-//
-// MessageId: SEC_E_UNKNOWN_CREDENTIALS
-//
-// MessageText:
-//
-// The credentials supplied to the package were not recognized
-//
- SEC_E_UNKNOWN_CREDENTIALS = HRESULT($8009030D);
- {$EXTERNALSYM SEC_E_UNKNOWN_CREDENTIALS}
-
-//
-// MessageId: SEC_E_NO_CREDENTIALS
-//
-// MessageText:
-//
-// No credentials are available in the security package
-//
- SEC_E_NO_CREDENTIALS = HRESULT($8009030E);
- {$EXTERNALSYM SEC_E_NO_CREDENTIALS}
-
-//
-// MessageId: SEC_E_MESSAGE_ALTERED
-//
-// MessageText:
-//
-// The message or signature supplied for verification has been altered
-//
- SEC_E_MESSAGE_ALTERED = HRESULT($8009030F);
- {$EXTERNALSYM SEC_E_MESSAGE_ALTERED}
-
-//
-// MessageId: SEC_E_OUT_OF_SEQUENCE
-//
-// MessageText:
-//
-// The message supplied for verification is out of sequence
-//
- SEC_E_OUT_OF_SEQUENCE = HRESULT($80090310);
- {$EXTERNALSYM SEC_E_OUT_OF_SEQUENCE}
-
-//
-// MessageId: SEC_E_NO_AUTHENTICATING_AUTHORITY
-//
-// MessageText:
-//
-// No authority could be contacted for authentication.
-//
- SEC_E_NO_AUTHENTICATING_AUTHORITY = HRESULT($80090311);
- {$EXTERNALSYM SEC_E_NO_AUTHENTICATING_AUTHORITY}
-
-//
-// MessageId: SEC_I_CONTINUE_NEEDED
-//
-// MessageText:
-//
-// The function completed successfully, but must be called again to complete the context
-//
- SEC_I_CONTINUE_NEEDED = HRESULT($00090312);
- {$EXTERNALSYM SEC_I_CONTINUE_NEEDED}
-
-//
-// MessageId: SEC_I_COMPLETE_NEEDED
-//
-// MessageText:
-//
-// The function completed successfully, but CompleteToken must be called
-//
- SEC_I_COMPLETE_NEEDED = HRESULT($00090313);
- {$EXTERNALSYM SEC_I_COMPLETE_NEEDED}
-
-//
-// MessageId: SEC_I_COMPLETE_AND_CONTINUE
-//
-// MessageText:
-//
-// The function completed successfully, but both CompleteToken and this function must be called to complete the context
-//
- SEC_I_COMPLETE_AND_CONTINUE = HRESULT($00090314);
- {$EXTERNALSYM SEC_I_COMPLETE_AND_CONTINUE}
-
-//
-// MessageId: SEC_I_LOCAL_LOGON
-//
-// MessageText:
-//
-// The logon was completed, but no network authority was available. The logon was made using locally known information
-//
- SEC_I_LOCAL_LOGON = HRESULT($00090315);
- {$EXTERNALSYM SEC_I_LOCAL_LOGON}
-
-//
-// MessageId: SEC_E_BAD_PKGID
-//
-// MessageText:
-//
-// The requested security package does not exist
-//
- SEC_E_BAD_PKGID = HRESULT($80090316);
- {$EXTERNALSYM SEC_E_BAD_PKGID}
-
-//
-// MessageId: SEC_E_CONTEXT_EXPIRED
-//
-// MessageText:
-//
-// The context has expired and can no longer be used.
-//
- SEC_E_CONTEXT_EXPIRED = HRESULT($80090317);
- {$EXTERNALSYM SEC_E_CONTEXT_EXPIRED}
-
-//
-// MessageId: SEC_I_CONTEXT_EXPIRED
-//
-// MessageText:
-//
-// The context has expired and can no longer be used.
-//
- SEC_I_CONTEXT_EXPIRED = HRESULT($00090317);
- {$EXTERNALSYM SEC_I_CONTEXT_EXPIRED}
-
-//
-// MessageId: SEC_E_INCOMPLETE_MESSAGE
-//
-// MessageText:
-//
-// The supplied message is incomplete. The signature was not verified.
-//
- SEC_E_INCOMPLETE_MESSAGE = HRESULT($80090318);
- {$EXTERNALSYM SEC_E_INCOMPLETE_MESSAGE}
-
-//
-// MessageId: SEC_E_INCOMPLETE_CREDENTIALS
-//
-// MessageText:
-//
-// The credentials supplied were not complete, and could not be verified. The context could not be initialized.
-//
- SEC_E_INCOMPLETE_CREDENTIALS = HRESULT($80090320);
- {$EXTERNALSYM SEC_E_INCOMPLETE_CREDENTIALS}
-
-//
-// MessageId: SEC_E_BUFFER_TOO_SMALL
-//
-// MessageText:
-//
-// The buffers supplied to a function was too small.
-//
- SEC_E_BUFFER_TOO_SMALL = HRESULT($80090321);
- {$EXTERNALSYM SEC_E_BUFFER_TOO_SMALL}
-
-//
-// MessageId: SEC_I_INCOMPLETE_CREDENTIALS
-//
-// MessageText:
-//
-// The credentials supplied were not complete, and could not be verified. Additional information can be returned from the context.
-//
- SEC_I_INCOMPLETE_CREDENTIALS = HRESULT($00090320);
- {$EXTERNALSYM SEC_I_INCOMPLETE_CREDENTIALS}
-
-//
-// MessageId: SEC_I_RENEGOTIATE
-//
-// MessageText:
-//
-// The context data must be renegotiated with the peer.
-//
- SEC_I_RENEGOTIATE = HRESULT($00090321);
- {$EXTERNALSYM SEC_I_RENEGOTIATE}
-
-//
-// MessageId: SEC_E_WRONG_PRINCIPAL
-//
-// MessageText:
-//
-// The target principal name is incorrect.
-//
- SEC_E_WRONG_PRINCIPAL = HRESULT($80090322);
- {$EXTERNALSYM SEC_E_WRONG_PRINCIPAL}
-
-//
-// MessageId: SEC_I_NO_LSA_CONTEXT
-//
-// MessageText:
-//
-// There is no LSA mode context associated with this context.
-//
- SEC_I_NO_LSA_CONTEXT = HRESULT($00090323);
- {$EXTERNALSYM SEC_I_NO_LSA_CONTEXT}
-
-//
-// MessageId: SEC_E_TIME_SKEW
-//
-// MessageText:
-//
-// The clocks on the client and server machines are skewed.
-//
- SEC_E_TIME_SKEW = HRESULT($80090324);
- {$EXTERNALSYM SEC_E_TIME_SKEW}
-
-//
-// MessageId: SEC_E_UNTRUSTED_ROOT
-//
-// MessageText:
-//
-// The certificate chain was issued by an authority that is not trusted.
-//
- SEC_E_UNTRUSTED_ROOT = HRESULT($80090325);
- {$EXTERNALSYM SEC_E_UNTRUSTED_ROOT}
-
-//
-// MessageId: SEC_E_ILLEGAL_MESSAGE
-//
-// MessageText:
-//
-// The message received was unexpected or badly formatted.
-//
- SEC_E_ILLEGAL_MESSAGE = HRESULT($80090326);
- {$EXTERNALSYM SEC_E_ILLEGAL_MESSAGE}
-
-//
-// MessageId: SEC_E_CERT_UNKNOWN
-//
-// MessageText:
-//
-// An unknown error occurred while processing the certificate.
-//
- SEC_E_CERT_UNKNOWN = HRESULT($80090327);
- {$EXTERNALSYM SEC_E_CERT_UNKNOWN}
-
-//
-// MessageId: SEC_E_CERT_EXPIRED
-//
-// MessageText:
-//
-// The received certificate has expired.
-//
- SEC_E_CERT_EXPIRED = HRESULT($80090328);
- {$EXTERNALSYM SEC_E_CERT_EXPIRED}
-
-//
-// MessageId: SEC_E_ENCRYPT_FAILURE
-//
-// MessageText:
-//
-// The specified data could not be encrypted.
-//
- SEC_E_ENCRYPT_FAILURE = HRESULT($80090329);
- {$EXTERNALSYM SEC_E_ENCRYPT_FAILURE}
-
-//
-// MessageId: SEC_E_DECRYPT_FAILURE
-//
-// MessageText:
-//
-// The specified data could not be decrypted.
-//
-//
- SEC_E_DECRYPT_FAILURE = HRESULT($80090330);
- {$EXTERNALSYM SEC_E_DECRYPT_FAILURE}
-
-//
-// MessageId: SEC_E_ALGORITHM_MISMATCH
-//
-// MessageText:
-//
-// The client and server cannot communicate, because they do not possess a common algorithm.
-//
- SEC_E_ALGORITHM_MISMATCH = HRESULT($80090331);
- {$EXTERNALSYM SEC_E_ALGORITHM_MISMATCH}
-
-//
-// MessageId: SEC_E_SECURITY_QOS_FAILED
-//
-// MessageText:
-//
-// The security context could not be established due to a failure in the requested quality of service (e.g. mutual authentication or delegation).
-//
- SEC_E_SECURITY_QOS_FAILED = HRESULT($80090332);
- {$EXTERNALSYM SEC_E_SECURITY_QOS_FAILED}
-
-//
-// MessageId: SEC_E_UNFINISHED_CONTEXT_DELETED
-//
-// MessageText:
-//
-// A security context was deleted before the context was completed. This is considered a logon failure.
-//
- SEC_E_UNFINISHED_CONTEXT_DELETED = HRESULT($80090333);
- {$EXTERNALSYM SEC_E_UNFINISHED_CONTEXT_DELETED}
-
-//
-// MessageId: SEC_E_NO_TGT_REPLY
-//
-// MessageText:
-//
-// The client is trying to negotiate a context and the server requires user-to-user but didn't send a TGT reply.
-//
- SEC_E_NO_TGT_REPLY = HRESULT($80090334);
- {$EXTERNALSYM SEC_E_NO_TGT_REPLY}
-
-//
-// MessageId: SEC_E_NO_IP_ADDRESSES
-//
-// MessageText:
-//
-// Unable to accomplish the requested task because the local machine does not have any IP addresses.
-//
- SEC_E_NO_IP_ADDRESSES = HRESULT($80090335);
- {$EXTERNALSYM SEC_E_NO_IP_ADDRESSES}
-
-//
-// MessageId: SEC_E_WRONG_CREDENTIAL_HANDLE
-//
-// MessageText:
-//
-// The supplied credential handle does not match the credential associated with the security context.
-//
- SEC_E_WRONG_CREDENTIAL_HANDLE = HRESULT($80090336);
- {$EXTERNALSYM SEC_E_WRONG_CREDENTIAL_HANDLE}
-
-//
-// MessageId: SEC_E_CRYPTO_SYSTEM_INVALID
-//
-// MessageText:
-//
-// The crypto system or checksum function is invalid because a required function is unavailable.
-//
- SEC_E_CRYPTO_SYSTEM_INVALID = HRESULT($80090337);
- {$EXTERNALSYM SEC_E_CRYPTO_SYSTEM_INVALID}
-
-//
-// MessageId: SEC_E_MAX_REFERRALS_EXCEEDED
-//
-// MessageText:
-//
-// The number of maximum ticket referrals has been exceeded.
-//
- SEC_E_MAX_REFERRALS_EXCEEDED = HRESULT($80090338);
- {$EXTERNALSYM SEC_E_MAX_REFERRALS_EXCEEDED}
-
-//
-// MessageId: SEC_E_MUST_BE_KDC
-//
-// MessageText:
-//
-// The local machine must be a Kerberos KDC (domain controller) and it is not.
-//
- SEC_E_MUST_BE_KDC = HRESULT($80090339);
- {$EXTERNALSYM SEC_E_MUST_BE_KDC}
-
-//
-// MessageId: SEC_E_STRONG_CRYPTO_NOT_SUPPORTED
-//
-// MessageText:
-//
-// The other end of the security negotiation is requires strong crypto but it is not supported on the local machine.
-//
- SEC_E_STRONG_CRYPTO_NOT_SUPPORTED = HRESULT($8009033A);
- {$EXTERNALSYM SEC_E_STRONG_CRYPTO_NOT_SUPPORTED}
-
-//
-// MessageId: SEC_E_TOO_MANY_PRINCIPALS
-//
-// MessageText:
-//
-// The KDC reply contained more than one principal name.
-//
- SEC_E_TOO_MANY_PRINCIPALS = HRESULT($8009033B);
- {$EXTERNALSYM SEC_E_TOO_MANY_PRINCIPALS}
-
-//
-// MessageId: SEC_E_NO_PA_DATA
-//
-// MessageText:
-//
-// Expected to find PA data for a hint of what etype to use, but it was not found.
-//
- SEC_E_NO_PA_DATA = HRESULT($8009033C);
- {$EXTERNALSYM SEC_E_NO_PA_DATA}
-
-//
-// MessageId: SEC_E_PKINIT_NAME_MISMATCH
-//
-// MessageText:
-//
-// The client certificate does not contain a valid UPN, or does not match the client name
-// in the logon request. Please contact your administrator.
-//
- SEC_E_PKINIT_NAME_MISMATCH = HRESULT($8009033D);
- {$EXTERNALSYM SEC_E_PKINIT_NAME_MISMATCH}
-
-//
-// MessageId: SEC_E_SMARTCARD_LOGON_REQUIRED
-//
-// MessageText:
-//
-// Smartcard logon is required and was not used.
-//
- SEC_E_SMARTCARD_LOGON_REQUIRED = HRESULT($8009033E);
- {$EXTERNALSYM SEC_E_SMARTCARD_LOGON_REQUIRED}
-
-//
-// MessageId: SEC_E_SHUTDOWN_IN_PROGRESS
-//
-// MessageText:
-//
-// A system shutdown is in progress.
-//
- SEC_E_SHUTDOWN_IN_PROGRESS = HRESULT($8009033F);
- {$EXTERNALSYM SEC_E_SHUTDOWN_IN_PROGRESS}
-
-//
-// MessageId: SEC_E_KDC_INVALID_REQUEST
-//
-// MessageText:
-//
-// An invalid request was sent to the KDC.
-//
- SEC_E_KDC_INVALID_REQUEST = HRESULT($80090340);
- {$EXTERNALSYM SEC_E_KDC_INVALID_REQUEST}
-
-//
-// MessageId: SEC_E_KDC_UNABLE_TO_REFER
-//
-// MessageText:
-//
-// The KDC was unable to generate a referral for the service requested.
-//
- SEC_E_KDC_UNABLE_TO_REFER = HRESULT($80090341);
- {$EXTERNALSYM SEC_E_KDC_UNABLE_TO_REFER}
-
-//
-// MessageId: SEC_E_KDC_UNKNOWN_ETYPE
-//
-// MessageText:
-//
-// The encryption type requested is not supported by the KDC.
-//
- SEC_E_KDC_UNKNOWN_ETYPE = HRESULT($80090342);
- {$EXTERNALSYM SEC_E_KDC_UNKNOWN_ETYPE}
-
-//
-// MessageId: SEC_E_UNSUPPORTED_PREAUTH
-//
-// MessageText:
-//
-// An unsupported preauthentication mechanism was presented to the kerberos package.
-//
- SEC_E_UNSUPPORTED_PREAUTH = HRESULT($80090343);
- {$EXTERNALSYM SEC_E_UNSUPPORTED_PREAUTH}
-
-//
-// MessageId: SEC_E_DELEGATION_REQUIRED
-//
-// MessageText:
-//
-// The requested operation requires delegation to be enabled on the machine.
-//
- SEC_E_DELEGATION_REQUIRED = HRESULT($80090345);
- {$EXTERNALSYM SEC_E_DELEGATION_REQUIRED}
-
-//
-// MessageId: SEC_E_BAD_BINDINGS
-//
-// MessageText:
-//
-// Client's supplied SSPI channel bindings were incorrect.
-//
- SEC_E_BAD_BINDINGS = HRESULT($80090346);
- {$EXTERNALSYM SEC_E_BAD_BINDINGS}
-
-//
-// MessageId: SEC_E_MULTIPLE_ACCOUNTS
-//
-// MessageText:
-//
-// The received certificate was mapped to multiple accounts.
-//
- SEC_E_MULTIPLE_ACCOUNTS = HRESULT($80090347);
- {$EXTERNALSYM SEC_E_MULTIPLE_ACCOUNTS}
-
-//
-// MessageId: SEC_E_NO_KERB_KEY
-//
-// MessageText:
-//
-// SEC_E_NO_KERB_KEY
-//
- SEC_E_NO_KERB_KEY = HRESULT($80090348);
- {$EXTERNALSYM SEC_E_NO_KERB_KEY}
-
-//
-// MessageId: SEC_E_CERT_WRONG_USAGE
-//
-// MessageText:
-//
-// The certificate is not valid for the requested usage.
-//
- SEC_E_CERT_WRONG_USAGE = HRESULT($80090349);
- {$EXTERNALSYM SEC_E_CERT_WRONG_USAGE}
-
-//
-// MessageId: SEC_E_DOWNGRADE_DETECTED
-//
-// MessageText:
-//
-// The system detected a possible attempt to compromise security. Please ensure that you can contact the server that authenticated you.
-//
- SEC_E_DOWNGRADE_DETECTED = HRESULT($80090350);
- {$EXTERNALSYM SEC_E_DOWNGRADE_DETECTED}
-
-//
-// MessageId: SEC_E_SMARTCARD_CERT_REVOKED
-//
-// MessageText:
-//
-// The smartcard certificate used for authentication has been revoked.
-// Please contact your system administrator. There may be additional information in the
-// event log.
-//
- SEC_E_SMARTCARD_CERT_REVOKED = HRESULT($80090351);
- {$EXTERNALSYM SEC_E_SMARTCARD_CERT_REVOKED}
-
-//
-// MessageId: SEC_E_ISSUING_CA_UNTRUSTED
-//
-// MessageText:
-//
-// An untrusted certificate authority was detected While processing the
-// smartcard certificate used for authentication. Please contact your system
-// administrator.
-//
- SEC_E_ISSUING_CA_UNTRUSTED = HRESULT($80090352);
- {$EXTERNALSYM SEC_E_ISSUING_CA_UNTRUSTED}
-
-//
-// MessageId: SEC_E_REVOCATION_OFFLINE_C
-//
-// MessageText:
-//
-// The revocation status of the smartcard certificate used for
-// authentication could not be determined. Please contact your system administrator.
-//
- SEC_E_REVOCATION_OFFLINE_C = HRESULT($80090353);
- {$EXTERNALSYM SEC_E_REVOCATION_OFFLINE_C}
-
-//
-// MessageId: SEC_E_PKINIT_CLIENT_FAILURE
-//
-// MessageText:
-//
-// The smartcard certificate used for authentication was not trusted. Please
-// contact your system administrator.
-//
- SEC_E_PKINIT_CLIENT_FAILURE = HRESULT($80090354);
- {$EXTERNALSYM SEC_E_PKINIT_CLIENT_FAILURE}
-
-//
-// MessageId: SEC_E_SMARTCARD_CERT_EXPIRED
-//
-// MessageText:
-//
-// The smartcard certificate used for authentication has expired. Please
-// contact your system administrator.
-//
- SEC_E_SMARTCARD_CERT_EXPIRED = HRESULT($80090355);
- {$EXTERNALSYM SEC_E_SMARTCARD_CERT_EXPIRED}
-
-//
-// MessageId: SEC_E_NO_S4U_PROT_SUPPORT
-//
-// MessageText:
-//
-// The Kerberos subsystem encountered an error. A service for user protocol request was made
-// against a domain controller which does not support service for user.
-//
- SEC_E_NO_S4U_PROT_SUPPORT = HRESULT($80090356);
- {$EXTERNALSYM SEC_E_NO_S4U_PROT_SUPPORT}
-
-//
-// MessageId: SEC_E_CROSSREALM_DELEGATION_FAILURE
-//
-// MessageText:
-//
-// An attempt was made by this server to make a Kerberos constrained delegation request for a target
-// outside of the server's realm. This is not supported, and indicates a misconfiguration on this
-// server's allowed to delegate to list. Please contact your administrator.
-//
- SEC_E_CROSSREALM_DELEGATION_FAILURE = HRESULT($80090357);
- {$EXTERNALSYM SEC_E_CROSSREALM_DELEGATION_FAILURE}
-
-//
-// MessageId: SEC_E_REVOCATION_OFFLINE_KDC
-//
-// MessageText:
-//
-// The revocation status of the domain controller certificate used for smartcard
-// authentication could not be determined. There is additional information in the system event
-// log. Please contact your system administrator.
-//
- SEC_E_REVOCATION_OFFLINE_KDC = HRESULT($80090358);
- {$EXTERNALSYM SEC_E_REVOCATION_OFFLINE_KDC}
-
-//
-// MessageId: SEC_E_ISSUING_CA_UNTRUSTED_KDC
-//
-// MessageText:
-//
-// An untrusted certificate authority was detected while processing the
-// domain controller certificate used for authentication. There is additional information in
-// the system event log. Please contact your system administrator.
-//
- SEC_E_ISSUING_CA_UNTRUSTED_KDC = HRESULT($80090359);
- {$EXTERNALSYM SEC_E_ISSUING_CA_UNTRUSTED_KDC}
-
-//
-// MessageId: SEC_E_KDC_CERT_EXPIRED
-//
-// MessageText:
-//
-// The domain controller certificate used for smartcard logon has expired.
-// Please contact your system administrator with the contents of your system event log.
-//
- SEC_E_KDC_CERT_EXPIRED = HRESULT($8009035A);
- {$EXTERNALSYM SEC_E_KDC_CERT_EXPIRED}
-
-//
-// MessageId: SEC_E_KDC_CERT_REVOKED
-//
-// MessageText:
-//
-// The domain controller certificate used for smartcard logon has been revoked.
-// Please contact your system administrator with the contents of your system event log.
-//
- SEC_E_KDC_CERT_REVOKED = HRESULT($8009035B);
- {$EXTERNALSYM SEC_E_KDC_CERT_REVOKED}
-
-//
-// Provided for backwards compatibility
-//
-
- SEC_E_NO_SPM = SEC_E_INTERNAL_ERROR;
- {$EXTERNALSYM SEC_E_NO_SPM}
- SEC_E_NOT_SUPPORTED = SEC_E_UNSUPPORTED_FUNCTION;
- {$EXTERNALSYM SEC_E_NOT_SUPPORTED}
-
-//
-// MessageId: CRYPT_E_MSG_ERROR
-//
-// MessageText:
-//
-// An error occurred while performing an operation on a cryptographic message.
-//
- CRYPT_E_MSG_ERROR = HRESULT($80091001);
- {$EXTERNALSYM CRYPT_E_MSG_ERROR}
-
-//
-// MessageId: CRYPT_E_UNKNOWN_ALGO
-//
-// MessageText:
-//
-// Unknown cryptographic algorithm.
-//
- CRYPT_E_UNKNOWN_ALGO = HRESULT($80091002);
- {$EXTERNALSYM CRYPT_E_UNKNOWN_ALGO}
-
-//
-// MessageId: CRYPT_E_OID_FORMAT
-//
-// MessageText:
-//
-// The object identifier is poorly formatted.
-//
- CRYPT_E_OID_FORMAT = HRESULT($80091003);
- {$EXTERNALSYM CRYPT_E_OID_FORMAT}
-
-//
-// MessageId: CRYPT_E_INVALID_MSG_TYPE
-//
-// MessageText:
-//
-// Invalid cryptographic message type.
-//
- CRYPT_E_INVALID_MSG_TYPE = HRESULT($80091004);
- {$EXTERNALSYM CRYPT_E_INVALID_MSG_TYPE}
-
-//
-// MessageId: CRYPT_E_UNEXPECTED_ENCODING
-//
-// MessageText:
-//
-// Unexpected cryptographic message encoding.
-//
- CRYPT_E_UNEXPECTED_ENCODING = HRESULT($80091005);
- {$EXTERNALSYM CRYPT_E_UNEXPECTED_ENCODING}
-
-//
-// MessageId: CRYPT_E_AUTH_ATTR_MISSING
-//
-// MessageText:
-//
-// The cryptographic message does not contain an expected authenticated attribute.
-//
- CRYPT_E_AUTH_ATTR_MISSING = HRESULT($80091006);
- {$EXTERNALSYM CRYPT_E_AUTH_ATTR_MISSING}
-
-//
-// MessageId: CRYPT_E_HASH_VALUE
-//
-// MessageText:
-//
-// The hash value is not correct.
-//
- CRYPT_E_HASH_VALUE = HRESULT($80091007);
- {$EXTERNALSYM CRYPT_E_HASH_VALUE}
-
-//
-// MessageId: CRYPT_E_INVALID_INDEX
-//
-// MessageText:
-//
-// The index value is not valid.
-//
- CRYPT_E_INVALID_INDEX = HRESULT($80091008);
- {$EXTERNALSYM CRYPT_E_INVALID_INDEX}
-
-//
-// MessageId: CRYPT_E_ALREADY_DECRYPTED
-//
-// MessageText:
-//
-// The content of the cryptographic message has already been decrypted.
-//
- CRYPT_E_ALREADY_DECRYPTED = HRESULT($80091009);
- {$EXTERNALSYM CRYPT_E_ALREADY_DECRYPTED}
-
-//
-// MessageId: CRYPT_E_NOT_DECRYPTED
-//
-// MessageText:
-//
-// The content of the cryptographic message has not been decrypted yet.
-//
- CRYPT_E_NOT_DECRYPTED = HRESULT($8009100A);
- {$EXTERNALSYM CRYPT_E_NOT_DECRYPTED}
-
-//
-// MessageId: CRYPT_E_RECIPIENT_NOT_FOUND
-//
-// MessageText:
-//
-// The enveloped-data message does not contain the specified recipient.
-//
- CRYPT_E_RECIPIENT_NOT_FOUND = HRESULT($8009100B);
- {$EXTERNALSYM CRYPT_E_RECIPIENT_NOT_FOUND}
-
-//
-// MessageId: CRYPT_E_CONTROL_TYPE
-//
-// MessageText:
-//
-// Invalid control type.
-//
- CRYPT_E_CONTROL_TYPE = HRESULT($8009100C);
- {$EXTERNALSYM CRYPT_E_CONTROL_TYPE}
-
-//
-// MessageId: CRYPT_E_ISSUER_SERIALNUMBER
-//
-// MessageText:
-//
-// Invalid issuer and/or serial number.
-//
- CRYPT_E_ISSUER_SERIALNUMBER = HRESULT($8009100D);
- {$EXTERNALSYM CRYPT_E_ISSUER_SERIALNUMBER}
-
-//
-// MessageId: CRYPT_E_SIGNER_NOT_FOUND
-//
-// MessageText:
-//
-// Cannot find the original signer.
-//
- CRYPT_E_SIGNER_NOT_FOUND = HRESULT($8009100E);
- {$EXTERNALSYM CRYPT_E_SIGNER_NOT_FOUND}
-
-//
-// MessageId: CRYPT_E_ATTRIBUTES_MISSING
-//
-// MessageText:
-//
-// The cryptographic message does not contain all of the requested attributes.
-//
- CRYPT_E_ATTRIBUTES_MISSING = HRESULT($8009100F);
- {$EXTERNALSYM CRYPT_E_ATTRIBUTES_MISSING}
-
-//
-// MessageId: CRYPT_E_STREAM_MSG_NOT_READY
-//
-// MessageText:
-//
-// The streamed cryptographic message is not ready to return data.
-//
- CRYPT_E_STREAM_MSG_NOT_READY = HRESULT($80091010);
- {$EXTERNALSYM CRYPT_E_STREAM_MSG_NOT_READY}
-
-//
-// MessageId: CRYPT_E_STREAM_INSUFFICIENT_DATA
-//
-// MessageText:
-//
-// The streamed cryptographic message requires more data to complete the decode operation.
-//
- CRYPT_E_STREAM_INSUFFICIENT_DATA = HRESULT($80091011);
- {$EXTERNALSYM CRYPT_E_STREAM_INSUFFICIENT_DATA}
-
-//
-// MessageId: CRYPT_I_NEW_PROTECTION_REQUIRED
-//
-// MessageText:
-//
-// The protected data needs to be re-protected.
-//
- CRYPT_I_NEW_PROTECTION_REQUIRED = HRESULT($00091012);
- {$EXTERNALSYM CRYPT_I_NEW_PROTECTION_REQUIRED}
-
-//
-// MessageId: CRYPT_E_BAD_LEN
-//
-// MessageText:
-//
-// The length specified for the output data was insufficient.
-//
- CRYPT_E_BAD_LEN = HRESULT($80092001);
- {$EXTERNALSYM CRYPT_E_BAD_LEN}
-
-//
-// MessageId: CRYPT_E_BAD_ENCODE
-//
-// MessageText:
-//
-// An error occurred during encode or decode operation.
-//
- CRYPT_E_BAD_ENCODE = HRESULT($80092002);
- {$EXTERNALSYM CRYPT_E_BAD_ENCODE}
-
-//
-// MessageId: CRYPT_E_FILE_ERROR
-//
-// MessageText:
-//
-// An error occurred while reading or writing to a file.
-//
- CRYPT_E_FILE_ERROR = HRESULT($80092003);
- {$EXTERNALSYM CRYPT_E_FILE_ERROR}
-
-//
-// MessageId: CRYPT_E_NOT_FOUND
-//
-// MessageText:
-//
-// Cannot find object or property.
-//
- CRYPT_E_NOT_FOUND = HRESULT($80092004);
- {$EXTERNALSYM CRYPT_E_NOT_FOUND}
-
-//
-// MessageId: CRYPT_E_EXISTS
-//
-// MessageText:
-//
-// The object or property already exists.
-//
- CRYPT_E_EXISTS = HRESULT($80092005);
- {$EXTERNALSYM CRYPT_E_EXISTS}
-
-//
-// MessageId: CRYPT_E_NO_PROVIDER
-//
-// MessageText:
-//
-// No provider was specified for the store or object.
-//
- CRYPT_E_NO_PROVIDER = HRESULT($80092006);
- {$EXTERNALSYM CRYPT_E_NO_PROVIDER}
-
-//
-// MessageId: CRYPT_E_SELF_SIGNED
-//
-// MessageText:
-//
-// The specified certificate is self signed.
-//
- CRYPT_E_SELF_SIGNED = HRESULT($80092007);
- {$EXTERNALSYM CRYPT_E_SELF_SIGNED}
-
-//
-// MessageId: CRYPT_E_DELETED_PREV
-//
-// MessageText:
-//
-// The previous certificate or CRL context was deleted.
-//
- CRYPT_E_DELETED_PREV = HRESULT($80092008);
- {$EXTERNALSYM CRYPT_E_DELETED_PREV}
-
-//
-// MessageId: CRYPT_E_NO_MATCH
-//
-// MessageText:
-//
-// Cannot find the requested object.
-//
- CRYPT_E_NO_MATCH = HRESULT($80092009);
- {$EXTERNALSYM CRYPT_E_NO_MATCH}
-
-//
-// MessageId: CRYPT_E_UNEXPECTED_MSG_TYPE
-//
-// MessageText:
-//
-// The certificate does not have a property that references a private key.
-//
- CRYPT_E_UNEXPECTED_MSG_TYPE = HRESULT($8009200A);
- {$EXTERNALSYM CRYPT_E_UNEXPECTED_MSG_TYPE}
-
-//
-// MessageId: CRYPT_E_NO_KEY_PROPERTY
-//
-// MessageText:
-//
-// Cannot find the certificate and private key for decryption.
-//
- CRYPT_E_NO_KEY_PROPERTY = HRESULT($8009200B);
- {$EXTERNALSYM CRYPT_E_NO_KEY_PROPERTY}
-
-//
-// MessageId: CRYPT_E_NO_DECRYPT_CERT
-//
-// MessageText:
-//
-// Cannot find the certificate and private key to use for decryption.
-//
- CRYPT_E_NO_DECRYPT_CERT = HRESULT($8009200C);
- {$EXTERNALSYM CRYPT_E_NO_DECRYPT_CERT}
-
-//
-// MessageId: CRYPT_E_BAD_MSG
-//
-// MessageText:
-//
-// Not a cryptographic message or the cryptographic message is not formatted correctly.
-//
- CRYPT_E_BAD_MSG = HRESULT($8009200D);
- {$EXTERNALSYM CRYPT_E_BAD_MSG}
-
-//
-// MessageId: CRYPT_E_NO_SIGNER
-//
-// MessageText:
-//
-// The signed cryptographic message does not have a signer for the specified signer index.
-//
- CRYPT_E_NO_SIGNER = HRESULT($8009200E);
- {$EXTERNALSYM CRYPT_E_NO_SIGNER}
-
-//
-// MessageId: CRYPT_E_PENDING_CLOSE
-//
-// MessageText:
-//
-// Final closure is pending until additional frees or closes.
-//
- CRYPT_E_PENDING_CLOSE = HRESULT($8009200F);
- {$EXTERNALSYM CRYPT_E_PENDING_CLOSE}
-
-//
-// MessageId: CRYPT_E_REVOKED
-//
-// MessageText:
-//
-// The certificate is revoked.
-//
- CRYPT_E_REVOKED = HRESULT($80092010);
- {$EXTERNALSYM CRYPT_E_REVOKED}
-
-//
-// MessageId: CRYPT_E_NO_REVOCATION_DLL
-//
-// MessageText:
-//
-// No Dll or exported function was found to verify revocation.
-//
- CRYPT_E_NO_REVOCATION_DLL = HRESULT($80092011);
- {$EXTERNALSYM CRYPT_E_NO_REVOCATION_DLL}
-
-//
-// MessageId: CRYPT_E_NO_REVOCATION_CHECK
-//
-// MessageText:
-//
-// The revocation function was unable to check revocation for the certificate.
-//
- CRYPT_E_NO_REVOCATION_CHECK = HRESULT($80092012);
- {$EXTERNALSYM CRYPT_E_NO_REVOCATION_CHECK}
-
-//
-// MessageId: CRYPT_E_REVOCATION_OFFLINE
-//
-// MessageText:
-//
-// The revocation function was unable to check revocation because the revocation server was offline.
-//
- CRYPT_E_REVOCATION_OFFLINE = HRESULT($80092013);
- {$EXTERNALSYM CRYPT_E_REVOCATION_OFFLINE}
-
-//
-// MessageId: CRYPT_E_NOT_IN_REVOCATION_DATABASE
-//
-// MessageText:
-//
-// The certificate is not in the revocation server's database.
-//
- CRYPT_E_NOT_IN_REVOCATION_DATABASE = HRESULT($80092014);
- {$EXTERNALSYM CRYPT_E_NOT_IN_REVOCATION_DATABASE}
-
-//
-// MessageId: CRYPT_E_INVALID_NUMERIC_STRING
-//
-// MessageText:
-//
-// The string contains a non-numeric character.
-//
- CRYPT_E_INVALID_NUMERIC_STRING = HRESULT($80092020);
- {$EXTERNALSYM CRYPT_E_INVALID_NUMERIC_STRING}
-
-//
-// MessageId: CRYPT_E_INVALID_PRINTABLE_STRING
-//
-// MessageText:
-//
-// The string contains a non-printable character.
-//
- CRYPT_E_INVALID_PRINTABLE_STRING = HRESULT($80092021);
- {$EXTERNALSYM CRYPT_E_INVALID_PRINTABLE_STRING}
-
-//
-// MessageId: CRYPT_E_INVALID_IA5_STRING
-//
-// MessageText:
-//
-// The string contains a character not in the 7 bit ASCII character set.
-//
- CRYPT_E_INVALID_IA5_STRING = HRESULT($80092022);
- {$EXTERNALSYM CRYPT_E_INVALID_IA5_STRING}
-
-//
-// MessageId: CRYPT_E_INVALID_X500_STRING
-//
-// MessageText:
-//
-// The string contains an invalid X500 name attribute key, oid, value or delimiter.
-//
- CRYPT_E_INVALID_X500_STRING = HRESULT($80092023);
- {$EXTERNALSYM CRYPT_E_INVALID_X500_STRING}
-
-//
-// MessageId: CRYPT_E_NOT_CHAR_STRING
-//
-// MessageText:
-//
-// The dwValueType for the CERT_NAME_VALUE is not one of the character strings. Most likely it is either a CERT_RDN_ENCODED_BLOB or CERT_TDN_OCTED_STRING.
-//
- CRYPT_E_NOT_CHAR_STRING = HRESULT($80092024);
- {$EXTERNALSYM CRYPT_E_NOT_CHAR_STRING}
-
-//
-// MessageId: CRYPT_E_FILERESIZED
-//
-// MessageText:
-//
-// The Put operation can not continue. The file needs to be resized. However, there is already a signature present. A complete signing operation must be done.
-//
- CRYPT_E_FILERESIZED = HRESULT($80092025);
- {$EXTERNALSYM CRYPT_E_FILERESIZED}
-
-//
-// MessageId: CRYPT_E_SECURITY_SETTINGS
-//
-// MessageText:
-//
-// The cryptographic operation failed due to a local security option setting.
-//
- CRYPT_E_SECURITY_SETTINGS = HRESULT($80092026);
- {$EXTERNALSYM CRYPT_E_SECURITY_SETTINGS}
-
-//
-// MessageId: CRYPT_E_NO_VERIFY_USAGE_DLL
-//
-// MessageText:
-//
-// No DLL or exported function was found to verify subject usage.
-//
- CRYPT_E_NO_VERIFY_USAGE_DLL = HRESULT($80092027);
- {$EXTERNALSYM CRYPT_E_NO_VERIFY_USAGE_DLL}
-
-//
-// MessageId: CRYPT_E_NO_VERIFY_USAGE_CHECK
-//
-// MessageText:
-//
-// The called function was unable to do a usage check on the subject.
-//
- CRYPT_E_NO_VERIFY_USAGE_CHECK = HRESULT($80092028);
- {$EXTERNALSYM CRYPT_E_NO_VERIFY_USAGE_CHECK}
-
-//
-// MessageId: CRYPT_E_VERIFY_USAGE_OFFLINE
-//
-// MessageText:
-//
-// Since the server was offline, the called function was unable to complete the usage check.
-//
- CRYPT_E_VERIFY_USAGE_OFFLINE = HRESULT($80092029);
- {$EXTERNALSYM CRYPT_E_VERIFY_USAGE_OFFLINE}
-
-//
-// MessageId: CRYPT_E_NOT_IN_CTL
-//
-// MessageText:
-//
-// The subject was not found in a Certificate Trust List (CTL).
-//
- CRYPT_E_NOT_IN_CTL = HRESULT($8009202A);
- {$EXTERNALSYM CRYPT_E_NOT_IN_CTL}
-
-//
-// MessageId: CRYPT_E_NO_TRUSTED_SIGNER
-//
-// MessageText:
-//
-// None of the signers of the cryptographic message or certificate trust list is trusted.
-//
- CRYPT_E_NO_TRUSTED_SIGNER = HRESULT($8009202B);
- {$EXTERNALSYM CRYPT_E_NO_TRUSTED_SIGNER}
-
-//
-// MessageId: CRYPT_E_MISSING_PUBKEY_PARA
-//
-// MessageText:
-//
-// The public key's algorithm parameters are missing.
-//
- CRYPT_E_MISSING_PUBKEY_PARA = HRESULT($8009202C);
- {$EXTERNALSYM CRYPT_E_MISSING_PUBKEY_PARA}
-
-//
-// MessageId: CRYPT_E_OSS_ERROR
-//
-// MessageText:
-//
-// OSS Certificate encode/decode error code base
-//
-// See asn1code.h for a definition of the OSS runtime errors. The OSS
-// error values are offset by CRYPT_E_OSS_ERROR.
-//
- CRYPT_E_OSS_ERROR = HRESULT($80093000);
- {$EXTERNALSYM CRYPT_E_OSS_ERROR}
-
-//
-// MessageId: OSS_MORE_BUF
-//
-// MessageText:
-//
-// OSS ASN.1 Error: Output Buffer is too small.
-//
- OSS_MORE_BUF = HRESULT($80093001);
- {$EXTERNALSYM OSS_MORE_BUF}
-
-//
-// MessageId: OSS_NEGATIVE_UINTEGER
-//
-// MessageText:
-//
-// OSS ASN.1 Error: Signed integer is encoded as a unsigned integer.
-//
- OSS_NEGATIVE_UINTEGER = HRESULT($80093002);
- {$EXTERNALSYM OSS_NEGATIVE_UINTEGER}
-
-//
-// MessageId: OSS_PDU_RANGE
-//
-// MessageText:
-//
-// OSS ASN.1 Error: Unknown ASN.1 data type.
-//
- OSS_PDU_RANGE = HRESULT($80093003);
- {$EXTERNALSYM OSS_PDU_RANGE}
-
-//
-// MessageId: OSS_MORE_INPUT
-//
-// MessageText:
-//
-// OSS ASN.1 Error: Output buffer is too small, the decoded data has been truncated.
-//
- OSS_MORE_INPUT = HRESULT($80093004);
- {$EXTERNALSYM OSS_MORE_INPUT}
-
-//
-// MessageId: OSS_DATA_ERROR
-//
-// MessageText:
-//
-// OSS ASN.1 Error: Invalid data.
-//
- OSS_DATA_ERROR = HRESULT($80093005);
- {$EXTERNALSYM OSS_DATA_ERROR}
-
-//
-// MessageId: OSS_BAD_ARG
-//
-// MessageText:
-//
-// OSS ASN.1 Error: Invalid argument.
-//
- OSS_BAD_ARG = HRESULT($80093006);
- {$EXTERNALSYM OSS_BAD_ARG}
-
-//
-// MessageId: OSS_BAD_VERSION
-//
-// MessageText:
-//
-// OSS ASN.1 Error: Encode/Decode version mismatch.
-//
- OSS_BAD_VERSION = HRESULT($80093007);
- {$EXTERNALSYM OSS_BAD_VERSION}
-
-//
-// MessageId: OSS_OUT_MEMORY
-//
-// MessageText:
-//
-// OSS ASN.1 Error: Out of memory.
-//
- OSS_OUT_MEMORY = HRESULT($80093008);
- {$EXTERNALSYM OSS_OUT_MEMORY}
-
-//
-// MessageId: OSS_PDU_MISMATCH
-//
-// MessageText:
-//
-// OSS ASN.1 Error: Encode/Decode Error.
-//
- OSS_PDU_MISMATCH = HRESULT($80093009);
- {$EXTERNALSYM OSS_PDU_MISMATCH}
-
-//
-// MessageId: OSS_LIMITED
-//
-// MessageText:
-//
-// OSS ASN.1 Error: Internal Error.
-//
- OSS_LIMITED = HRESULT($8009300A);
- {$EXTERNALSYM OSS_LIMITED}
-
-//
-// MessageId: OSS_BAD_PTR
-//
-// MessageText:
-//
-// OSS ASN.1 Error: Invalid data.
-//
- OSS_BAD_PTR = HRESULT($8009300B);
- {$EXTERNALSYM OSS_BAD_PTR}
-
-//
-// MessageId: OSS_BAD_TIME
-//
-// MessageText:
-//
-// OSS ASN.1 Error: Invalid data.
-//
- OSS_BAD_TIME = HRESULT($8009300C);
- {$EXTERNALSYM OSS_BAD_TIME}
-
-//
-// MessageId: OSS_INDEFINITE_NOT_SUPPORTED
-//
-// MessageText:
-//
-// OSS ASN.1 Error: Unsupported BER indefinite-length encoding.
-//
- OSS_INDEFINITE_NOT_SUPPORTED = HRESULT($8009300D);
- {$EXTERNALSYM OSS_INDEFINITE_NOT_SUPPORTED}
-
-//
-// MessageId: OSS_MEM_ERROR
-//
-// MessageText:
-//
-// OSS ASN.1 Error: Access violation.
-//
- OSS_MEM_ERROR = HRESULT($8009300E);
- {$EXTERNALSYM OSS_MEM_ERROR}
-
-//
-// MessageId: OSS_BAD_TABLE
-//
-// MessageText:
-//
-// OSS ASN.1 Error: Invalid data.
-//
- OSS_BAD_TABLE = HRESULT($8009300F);
- {$EXTERNALSYM OSS_BAD_TABLE}
-
-//
-// MessageId: OSS_TOO_LONG
-//
-// MessageText:
-//
-// OSS ASN.1 Error: Invalid data.
-//
- OSS_TOO_LONG = HRESULT($80093010);
- {$EXTERNALSYM OSS_TOO_LONG}
-
-//
-// MessageId: OSS_CONSTRAINT_VIOLATED
-//
-// MessageText:
-//
-// OSS ASN.1 Error: Invalid data.
-//
- OSS_CONSTRAINT_VIOLATED = HRESULT($80093011);
- {$EXTERNALSYM OSS_CONSTRAINT_VIOLATED}
-
-//
-// MessageId: OSS_FATAL_ERROR
-//
-// MessageText:
-//
-// OSS ASN.1 Error: Internal Error.
-//
- OSS_FATAL_ERROR = HRESULT($80093012);
- {$EXTERNALSYM OSS_FATAL_ERROR}
-
-//
-// MessageId: OSS_ACCESS_SERIALIZATION_ERROR
-//
-// MessageText:
-//
-// OSS ASN.1 Error: Multi-threading conflict.
-//
- OSS_ACCESS_SERIALIZATION_ERROR = HRESULT($80093013);
- {$EXTERNALSYM OSS_ACCESS_SERIALIZATION_ERROR}
-
-//
-// MessageId: OSS_NULL_TBL
-//
-// MessageText:
-//
-// OSS ASN.1 Error: Invalid data.
-//
- OSS_NULL_TBL = HRESULT($80093014);
- {$EXTERNALSYM OSS_NULL_TBL}
-
-//
-// MessageId: OSS_NULL_FCN
-//
-// MessageText:
-//
-// OSS ASN.1 Error: Invalid data.
-//
- OSS_NULL_FCN = HRESULT($80093015);
- {$EXTERNALSYM OSS_NULL_FCN}
-
-//
-// MessageId: OSS_BAD_ENCRULES
-//
-// MessageText:
-//
-// OSS ASN.1 Error: Invalid data.
-//
- OSS_BAD_ENCRULES = HRESULT($80093016);
- {$EXTERNALSYM OSS_BAD_ENCRULES}
-
-//
-// MessageId: OSS_UNAVAIL_ENCRULES
-//
-// MessageText:
-//
-// OSS ASN.1 Error: Encode/Decode function not implemented.
-//
- OSS_UNAVAIL_ENCRULES = HRESULT($80093017);
- {$EXTERNALSYM OSS_UNAVAIL_ENCRULES}
-
-//
-// MessageId: OSS_CANT_OPEN_TRACE_WINDOW
-//
-// MessageText:
-//
-// OSS ASN.1 Error: Trace file error.
-//
- OSS_CANT_OPEN_TRACE_WINDOW = HRESULT($80093018);
- {$EXTERNALSYM OSS_CANT_OPEN_TRACE_WINDOW}
-
-//
-// MessageId: OSS_UNIMPLEMENTED
-//
-// MessageText:
-//
-// OSS ASN.1 Error: Function not implemented.
-//
- OSS_UNIMPLEMENTED = HRESULT($80093019);
- {$EXTERNALSYM OSS_UNIMPLEMENTED}
-
-//
-// MessageId: OSS_OID_DLL_NOT_LINKED
-//
-// MessageText:
-//
-// OSS ASN.1 Error: Program link error.
-//
- OSS_OID_DLL_NOT_LINKED = HRESULT($8009301A);
- {$EXTERNALSYM OSS_OID_DLL_NOT_LINKED}
-
-//
-// MessageId: OSS_CANT_OPEN_TRACE_FILE
-//
-// MessageText:
-//
-// OSS ASN.1 Error: Trace file error.
-//
- OSS_CANT_OPEN_TRACE_FILE = HRESULT($8009301B);
- {$EXTERNALSYM OSS_CANT_OPEN_TRACE_FILE}
-
-//
-// MessageId: OSS_TRACE_FILE_ALREADY_OPEN
-//
-// MessageText:
-//
-// OSS ASN.1 Error: Trace file error.
-//
- OSS_TRACE_FILE_ALREADY_OPEN = HRESULT($8009301C);
- {$EXTERNALSYM OSS_TRACE_FILE_ALREADY_OPEN}
-
-//
-// MessageId: OSS_TABLE_MISMATCH
-//
-// MessageText:
-//
-// OSS ASN.1 Error: Invalid data.
-//
- OSS_TABLE_MISMATCH = HRESULT($8009301D);
- {$EXTERNALSYM OSS_TABLE_MISMATCH}
-
-//
-// MessageId: OSS_TYPE_NOT_SUPPORTED
-//
-// MessageText:
-//
-// OSS ASN.1 Error: Invalid data.
-//
- OSS_TYPE_NOT_SUPPORTED = HRESULT($8009301E);
- {$EXTERNALSYM OSS_TYPE_NOT_SUPPORTED}
-
-//
-// MessageId: OSS_REAL_DLL_NOT_LINKED
-//
-// MessageText:
-//
-// OSS ASN.1 Error: Program link error.
-//
- OSS_REAL_DLL_NOT_LINKED = HRESULT($8009301F);
- {$EXTERNALSYM OSS_REAL_DLL_NOT_LINKED}
-
-//
-// MessageId: OSS_REAL_CODE_NOT_LINKED
-//
-// MessageText:
-//
-// OSS ASN.1 Error: Program link error.
-//
- OSS_REAL_CODE_NOT_LINKED = HRESULT($80093020);
- {$EXTERNALSYM OSS_REAL_CODE_NOT_LINKED}
-
-//
-// MessageId: OSS_OUT_OF_RANGE
-//
-// MessageText:
-//
-// OSS ASN.1 Error: Program link error.
-//
- OSS_OUT_OF_RANGE = HRESULT($80093021);
- {$EXTERNALSYM OSS_OUT_OF_RANGE}
-
-//
-// MessageId: OSS_COPIER_DLL_NOT_LINKED
-//
-// MessageText:
-//
-// OSS ASN.1 Error: Program link error.
-//
- OSS_COPIER_DLL_NOT_LINKED = HRESULT($80093022);
- {$EXTERNALSYM OSS_COPIER_DLL_NOT_LINKED}
-
-//
-// MessageId: OSS_CONSTRAINT_DLL_NOT_LINKED
-//
-// MessageText:
-//
-// OSS ASN.1 Error: Program link error.
-//
- OSS_CONSTRAINT_DLL_NOT_LINKED = HRESULT($80093023);
- {$EXTERNALSYM OSS_CONSTRAINT_DLL_NOT_LINKED}
-
-//
-// MessageId: OSS_COMPARATOR_DLL_NOT_LINKED
-//
-// MessageText:
-//
-// OSS ASN.1 Error: Program link error.
-//
- OSS_COMPARATOR_DLL_NOT_LINKED = HRESULT($80093024);
- {$EXTERNALSYM OSS_COMPARATOR_DLL_NOT_LINKED}
-
-//
-// MessageId: OSS_COMPARATOR_CODE_NOT_LINKED
-//
-// MessageText:
-//
-// OSS ASN.1 Error: Program link error.
-//
- OSS_COMPARATOR_CODE_NOT_LINKED = HRESULT($80093025);
- {$EXTERNALSYM OSS_COMPARATOR_CODE_NOT_LINKED}
-
-//
-// MessageId: OSS_MEM_MGR_DLL_NOT_LINKED
-//
-// MessageText:
-//
-// OSS ASN.1 Error: Program link error.
-//
- OSS_MEM_MGR_DLL_NOT_LINKED = HRESULT($80093026);
- {$EXTERNALSYM OSS_MEM_MGR_DLL_NOT_LINKED}
-
-//
-// MessageId: OSS_PDV_DLL_NOT_LINKED
-//
-// MessageText:
-//
-// OSS ASN.1 Error: Program link error.
-//
- OSS_PDV_DLL_NOT_LINKED = HRESULT($80093027);
- {$EXTERNALSYM OSS_PDV_DLL_NOT_LINKED}
-
-//
-// MessageId: OSS_PDV_CODE_NOT_LINKED
-//
-// MessageText:
-//
-// OSS ASN.1 Error: Program link error.
-//
- OSS_PDV_CODE_NOT_LINKED = HRESULT($80093028);
- {$EXTERNALSYM OSS_PDV_CODE_NOT_LINKED}
-
-//
-// MessageId: OSS_API_DLL_NOT_LINKED
-//
-// MessageText:
-//
-// OSS ASN.1 Error: Program link error.
-//
- OSS_API_DLL_NOT_LINKED = HRESULT($80093029);
- {$EXTERNALSYM OSS_API_DLL_NOT_LINKED}
-
-//
-// MessageId: OSS_BERDER_DLL_NOT_LINKED
-//
-// MessageText:
-//
-// OSS ASN.1 Error: Program link error.
-//
- OSS_BERDER_DLL_NOT_LINKED = HRESULT($8009302A);
- {$EXTERNALSYM OSS_BERDER_DLL_NOT_LINKED}
-
-//
-// MessageId: OSS_PER_DLL_NOT_LINKED
-//
-// MessageText:
-//
-// OSS ASN.1 Error: Program link error.
-//
- OSS_PER_DLL_NOT_LINKED = HRESULT($8009302B);
- {$EXTERNALSYM OSS_PER_DLL_NOT_LINKED}
-
-//
-// MessageId: OSS_OPEN_TYPE_ERROR
-//
-// MessageText:
-//
-// OSS ASN.1 Error: Program link error.
-//
- OSS_OPEN_TYPE_ERROR = HRESULT($8009302C);
- {$EXTERNALSYM OSS_OPEN_TYPE_ERROR}
-
-//
-// MessageId: OSS_MUTEX_NOT_CREATED
-//
-// MessageText:
-//
-// OSS ASN.1 Error: System resource error.
-//
- OSS_MUTEX_NOT_CREATED = HRESULT($8009302D);
- {$EXTERNALSYM OSS_MUTEX_NOT_CREATED}
-
-//
-// MessageId: OSS_CANT_CLOSE_TRACE_FILE
-//
-// MessageText:
-//
-// OSS ASN.1 Error: Trace file error.
-//
- OSS_CANT_CLOSE_TRACE_FILE = HRESULT($8009302E);
- {$EXTERNALSYM OSS_CANT_CLOSE_TRACE_FILE}
-
-//
-// MessageId: CRYPT_E_ASN1_ERROR
-//
-// MessageText:
-//
-// ASN1 Certificate encode/decode error code base.
-//
-// The ASN1 error values are offset by CRYPT_E_ASN1_ERROR.
-//
- CRYPT_E_ASN1_ERROR = HRESULT($80093100);
- {$EXTERNALSYM CRYPT_E_ASN1_ERROR}
-
-//
-// MessageId: CRYPT_E_ASN1_INTERNAL
-//
-// MessageText:
-//
-// ASN1 internal encode or decode error.
-//
- CRYPT_E_ASN1_INTERNAL = HRESULT($80093101);
- {$EXTERNALSYM CRYPT_E_ASN1_INTERNAL}
-
-//
-// MessageId: CRYPT_E_ASN1_EOD
-//
-// MessageText:
-//
-// ASN1 unexpected end of data.
-//
- CRYPT_E_ASN1_EOD = HRESULT($80093102);
- {$EXTERNALSYM CRYPT_E_ASN1_EOD}
-
-//
-// MessageId: CRYPT_E_ASN1_CORRUPT
-//
-// MessageText:
-//
-// ASN1 corrupted data.
-//
- CRYPT_E_ASN1_CORRUPT = HRESULT($80093103);
- {$EXTERNALSYM CRYPT_E_ASN1_CORRUPT}
-
-//
-// MessageId: CRYPT_E_ASN1_LARGE
-//
-// MessageText:
-//
-// ASN1 value too large.
-//
- CRYPT_E_ASN1_LARGE = HRESULT($80093104);
- {$EXTERNALSYM CRYPT_E_ASN1_LARGE}
-
-//
-// MessageId: CRYPT_E_ASN1_CONSTRAINT
-//
-// MessageText:
-//
-// ASN1 constraint violated.
-//
- CRYPT_E_ASN1_CONSTRAINT = HRESULT($80093105);
- {$EXTERNALSYM CRYPT_E_ASN1_CONSTRAINT}
-
-//
-// MessageId: CRYPT_E_ASN1_MEMORY
-//
-// MessageText:
-//
-// ASN1 out of memory.
-//
- CRYPT_E_ASN1_MEMORY = HRESULT($80093106);
- {$EXTERNALSYM CRYPT_E_ASN1_MEMORY}
-
-//
-// MessageId: CRYPT_E_ASN1_OVERFLOW
-//
-// MessageText:
-//
-// ASN1 buffer overflow.
-//
- CRYPT_E_ASN1_OVERFLOW = HRESULT($80093107);
- {$EXTERNALSYM CRYPT_E_ASN1_OVERFLOW}
-
-//
-// MessageId: CRYPT_E_ASN1_BADPDU
-//
-// MessageText:
-//
-// ASN1 function not supported for this PDU.
-//
- CRYPT_E_ASN1_BADPDU = HRESULT($80093108);
- {$EXTERNALSYM CRYPT_E_ASN1_BADPDU}
-
-//
-// MessageId: CRYPT_E_ASN1_BADARGS
-//
-// MessageText:
-//
-// ASN1 bad arguments to function call.
-//
- CRYPT_E_ASN1_BADARGS = HRESULT($80093109);
- {$EXTERNALSYM CRYPT_E_ASN1_BADARGS}
-
-//
-// MessageId: CRYPT_E_ASN1_BADREAL
-//
-// MessageText:
-//
-// ASN1 bad real value.
-//
- CRYPT_E_ASN1_BADREAL = HRESULT($8009310A);
- {$EXTERNALSYM CRYPT_E_ASN1_BADREAL}
-
-//
-// MessageId: CRYPT_E_ASN1_BADTAG
-//
-// MessageText:
-//
-// ASN1 bad tag value met.
-//
- CRYPT_E_ASN1_BADTAG = HRESULT($8009310B);
- {$EXTERNALSYM CRYPT_E_ASN1_BADTAG}
-
-//
-// MessageId: CRYPT_E_ASN1_CHOICE
-//
-// MessageText:
-//
-// ASN1 bad choice value.
-//
- CRYPT_E_ASN1_CHOICE = HRESULT($8009310C);
- {$EXTERNALSYM CRYPT_E_ASN1_CHOICE}
-
-//
-// MessageId: CRYPT_E_ASN1_RULE
-//
-// MessageText:
-//
-// ASN1 bad encoding rule.
-//
- CRYPT_E_ASN1_RULE = HRESULT($8009310D);
- {$EXTERNALSYM CRYPT_E_ASN1_RULE}
-
-//
-// MessageId: CRYPT_E_ASN1_UTF8
-//
-// MessageText:
-//
-// ASN1 bad unicode (UTF8).
-//
- CRYPT_E_ASN1_UTF8 = HRESULT($8009310E);
- {$EXTERNALSYM CRYPT_E_ASN1_UTF8}
-
-//
-// MessageId: CRYPT_E_ASN1_PDU_TYPE
-//
-// MessageText:
-//
-// ASN1 bad PDU type.
-//
- CRYPT_E_ASN1_PDU_TYPE = HRESULT($80093133);
- {$EXTERNALSYM CRYPT_E_ASN1_PDU_TYPE}
-
-//
-// MessageId: CRYPT_E_ASN1_NYI
-//
-// MessageText:
-//
-// ASN1 not yet implemented.
-//
- CRYPT_E_ASN1_NYI = HRESULT($80093134);
- {$EXTERNALSYM CRYPT_E_ASN1_NYI}
-
-//
-// MessageId: CRYPT_E_ASN1_EXTENDED
-//
-// MessageText:
-//
-// ASN1 skipped unknown extension(s).
-//
- CRYPT_E_ASN1_EXTENDED = HRESULT($80093201);
- {$EXTERNALSYM CRYPT_E_ASN1_EXTENDED}
-
-//
-// MessageId: CRYPT_E_ASN1_NOEOD
-//
-// MessageText:
-//
-// ASN1 end of data expected
-//
- CRYPT_E_ASN1_NOEOD = HRESULT($80093202);
- {$EXTERNALSYM CRYPT_E_ASN1_NOEOD}
-
-//
-// MessageId: CERTSRV_E_BAD_REQUESTSUBJECT
-//
-// MessageText:
-//
-// The request subject name is invalid or too long.
-//
- CERTSRV_E_BAD_REQUESTSUBJECT = HRESULT($80094001);
- {$EXTERNALSYM CERTSRV_E_BAD_REQUESTSUBJECT}
-
-//
-// MessageId: CERTSRV_E_NO_REQUEST
-//
-// MessageText:
-//
-// The request does not exist.
-//
- CERTSRV_E_NO_REQUEST = HRESULT($80094002);
- {$EXTERNALSYM CERTSRV_E_NO_REQUEST}
-
-//
-// MessageId: CERTSRV_E_BAD_REQUESTSTATUS
-//
-// MessageText:
-//
-// The request's current status does not allow this operation.
-//
- CERTSRV_E_BAD_REQUESTSTATUS = HRESULT($80094003);
- {$EXTERNALSYM CERTSRV_E_BAD_REQUESTSTATUS}
-
-//
-// MessageId: CERTSRV_E_PROPERTY_EMPTY
-//
-// MessageText:
-//
-// The requested property value is empty.
-//
- CERTSRV_E_PROPERTY_EMPTY = HRESULT($80094004);
- {$EXTERNALSYM CERTSRV_E_PROPERTY_EMPTY}
-
-//
-// MessageId: CERTSRV_E_INVALID_CA_CERTIFICATE
-//
-// MessageText:
-//
-// The certification authority's certificate contains invalid data.
-//
- CERTSRV_E_INVALID_CA_CERTIFICATE = HRESULT($80094005);
- {$EXTERNALSYM CERTSRV_E_INVALID_CA_CERTIFICATE}
-
-//
-// MessageId: CERTSRV_E_SERVER_SUSPENDED
-//
-// MessageText:
-//
-// Certificate service has been suspended for a database restore operation.
-//
- CERTSRV_E_SERVER_SUSPENDED = HRESULT($80094006);
- {$EXTERNALSYM CERTSRV_E_SERVER_SUSPENDED}
-
-//
-// MessageId: CERTSRV_E_ENCODING_LENGTH
-//
-// MessageText:
-//
-// The certificate contains an encoded length that is potentially incompatible with older enrollment software.
-//
- CERTSRV_E_ENCODING_LENGTH = HRESULT($80094007);
- {$EXTERNALSYM CERTSRV_E_ENCODING_LENGTH}
-
-//
-// MessageId: CERTSRV_E_ROLECONFLICT
-//
-// MessageText:
-//
-// The operation is denied. The user has multiple roles assigned and the certification authority is configured to enforce role separation.
-//
- CERTSRV_E_ROLECONFLICT = HRESULT($80094008);
- {$EXTERNALSYM CERTSRV_E_ROLECONFLICT}
-
-//
-// MessageId: CERTSRV_E_RESTRICTEDOFFICER
-//
-// MessageText:
-//
-// The operation is denied. It can only be performed by a certificate manager that is allowed to manage certificates for the current requester.
-//
- CERTSRV_E_RESTRICTEDOFFICER = HRESULT($80094009);
- {$EXTERNALSYM CERTSRV_E_RESTRICTEDOFFICER}
-
-//
-// MessageId: CERTSRV_E_KEY_ARCHIVAL_NOT_CONFIGURED
-//
-// MessageText:
-//
-// Cannot archive private key. The certification authority is not configured for key archival.
-//
- CERTSRV_E_KEY_ARCHIVAL_NOT_CONFIGURED = HRESULT($8009400A);
- {$EXTERNALSYM CERTSRV_E_KEY_ARCHIVAL_NOT_CONFIGURED}
-
-//
-// MessageId: CERTSRV_E_NO_VALID_KRA
-//
-// MessageText:
-//
-// Cannot archive private key. The certification authority could not verify one or more key recovery certificates.
-//
- CERTSRV_E_NO_VALID_KRA = HRESULT($8009400B);
- {$EXTERNALSYM CERTSRV_E_NO_VALID_KRA}
-
-//
-// MessageId: CERTSRV_E_BAD_REQUEST_KEY_ARCHIVAL
-//
-// MessageText:
-//
-// The request is incorrectly formatted. The encrypted private key must be in an unauthenticated attribute in an outermost signature.
-//
- CERTSRV_E_BAD_REQUEST_KEY_ARCHIVAL = HRESULT($8009400C);
- {$EXTERNALSYM CERTSRV_E_BAD_REQUEST_KEY_ARCHIVAL}
-
-//
-// MessageId: CERTSRV_E_NO_CAADMIN_DEFINED
-//
-// MessageText:
-//
-// At least one security principal must have the permission to manage this CA.
-//
- CERTSRV_E_NO_CAADMIN_DEFINED = HRESULT($8009400D);
- {$EXTERNALSYM CERTSRV_E_NO_CAADMIN_DEFINED}
-
-//
-// MessageId: CERTSRV_E_BAD_RENEWAL_CERT_ATTRIBUTE
-//
-// MessageText:
-//
-// The request contains an invalid renewal certificate attribute.
-//
- CERTSRV_E_BAD_RENEWAL_CERT_ATTRIBUTE = HRESULT($8009400E);
- {$EXTERNALSYM CERTSRV_E_BAD_RENEWAL_CERT_ATTRIBUTE}
-
-//
-// MessageId: CERTSRV_E_NO_DB_SESSIONS
-//
-// MessageText:
-//
-// An attempt was made to open a Certification Authority database session, but there are already too many active sessions. The server may need to be configured to allow additional sessions.
-//
- CERTSRV_E_NO_DB_SESSIONS = HRESULT($8009400F);
- {$EXTERNALSYM CERTSRV_E_NO_DB_SESSIONS}
-
-//
-// MessageId: CERTSRV_E_ALIGNMENT_FAULT
-//
-// MessageText:
-//
-// A memory reference caused a data alignment fault.
-//
- CERTSRV_E_ALIGNMENT_FAULT = HRESULT($80094010);
- {$EXTERNALSYM CERTSRV_E_ALIGNMENT_FAULT}
-
-//
-// MessageId: CERTSRV_E_ENROLL_DENIED
-//
-// MessageText:
-//
-// The permissions on this certification authority do not allow the current user to enroll for certificates.
-//
- CERTSRV_E_ENROLL_DENIED = HRESULT($80094011);
- {$EXTERNALSYM CERTSRV_E_ENROLL_DENIED}
-
-//
-// MessageId: CERTSRV_E_TEMPLATE_DENIED
-//
-// MessageText:
-//
-// The permissions on the certificate template do not allow the current user to enroll for this type of certificate.
-//
- CERTSRV_E_TEMPLATE_DENIED = HRESULT($80094012);
- {$EXTERNALSYM CERTSRV_E_TEMPLATE_DENIED}
-
-//
-// MessageId: CERTSRV_E_DOWNLEVEL_DC_SSL_OR_UPGRADE
-//
-// MessageText:
-//
-// The contacted domain controller cannot support signed LDAP traffic. Update the domain controller or configure Certificate Services to use SSL for Active Directory access.
-//
- CERTSRV_E_DOWNLEVEL_DC_SSL_OR_UPGRADE = HRESULT($80094013);
- {$EXTERNALSYM CERTSRV_E_DOWNLEVEL_DC_SSL_OR_UPGRADE}
-
-//
-// MessageId: CERTSRV_E_UNSUPPORTED_CERT_TYPE
-//
-// MessageText:
-//
-// The requested certificate template is not supported by this CA.
-//
- CERTSRV_E_UNSUPPORTED_CERT_TYPE = HRESULT($80094800);
- {$EXTERNALSYM CERTSRV_E_UNSUPPORTED_CERT_TYPE}
-
-//
-// MessageId: CERTSRV_E_NO_CERT_TYPE
-//
-// MessageText:
-//
-// The request contains no certificate template information.
-//
- CERTSRV_E_NO_CERT_TYPE = HRESULT($80094801);
- {$EXTERNALSYM CERTSRV_E_NO_CERT_TYPE}
-
-//
-// MessageId: CERTSRV_E_TEMPLATE_CONFLICT
-//
-// MessageText:
-//
-// The request contains conflicting template information.
-//
- CERTSRV_E_TEMPLATE_CONFLICT = HRESULT($80094802);
- {$EXTERNALSYM CERTSRV_E_TEMPLATE_CONFLICT}
-
-//
-// MessageId: CERTSRV_E_SUBJECT_ALT_NAME_REQUIRED
-//
-// MessageText:
-//
-// The request is missing a required Subject Alternate name extension.
-//
- CERTSRV_E_SUBJECT_ALT_NAME_REQUIRED = HRESULT($80094803);
- {$EXTERNALSYM CERTSRV_E_SUBJECT_ALT_NAME_REQUIRED}
-
-//
-// MessageId: CERTSRV_E_ARCHIVED_KEY_REQUIRED
-//
-// MessageText:
-//
-// The request is missing a required private key for archival by the server.
-//
- CERTSRV_E_ARCHIVED_KEY_REQUIRED = HRESULT($80094804);
- {$EXTERNALSYM CERTSRV_E_ARCHIVED_KEY_REQUIRED}
-
-//
-// MessageId: CERTSRV_E_SMIME_REQUIRED
-//
-// MessageText:
-//
-// The request is missing a required SMIME capabilities extension.
-//
- CERTSRV_E_SMIME_REQUIRED = HRESULT($80094805);
- {$EXTERNALSYM CERTSRV_E_SMIME_REQUIRED}
-
-//
-// MessageId: CERTSRV_E_BAD_RENEWAL_SUBJECT
-//
-// MessageText:
-//
-// The request was made on behalf of a subject other than the caller. The certificate template must be configured to require at least one signature to authorize the request.
-//
- CERTSRV_E_BAD_RENEWAL_SUBJECT = HRESULT($80094806);
- {$EXTERNALSYM CERTSRV_E_BAD_RENEWAL_SUBJECT}
-
-//
-// MessageId: CERTSRV_E_BAD_TEMPLATE_VERSION
-//
-// MessageText:
-//
-// The request template version is newer than the supported template version.
-//
- CERTSRV_E_BAD_TEMPLATE_VERSION = HRESULT($80094807);
- {$EXTERNALSYM CERTSRV_E_BAD_TEMPLATE_VERSION}
-
-//
-// MessageId: CERTSRV_E_TEMPLATE_POLICY_REQUIRED
-//
-// MessageText:
-//
-// The template is missing a required signature policy attribute.
-//
- CERTSRV_E_TEMPLATE_POLICY_REQUIRED = HRESULT($80094808);
- {$EXTERNALSYM CERTSRV_E_TEMPLATE_POLICY_REQUIRED}
-
-//
-// MessageId: CERTSRV_E_SIGNATURE_POLICY_REQUIRED
-//
-// MessageText:
-//
-// The request is missing required signature policy information.
-//
- CERTSRV_E_SIGNATURE_POLICY_REQUIRED = HRESULT($80094809);
- {$EXTERNALSYM CERTSRV_E_SIGNATURE_POLICY_REQUIRED}
-
-//
-// MessageId: CERTSRV_E_SIGNATURE_COUNT
-//
-// MessageText:
-//
-// The request is missing one or more required signatures.
-//
- CERTSRV_E_SIGNATURE_COUNT = HRESULT($8009480A);
- {$EXTERNALSYM CERTSRV_E_SIGNATURE_COUNT}
-
-//
-// MessageId: CERTSRV_E_SIGNATURE_REJECTED
-//
-// MessageText:
-//
-// One or more signatures did not include the required application or issuance policies. The request is missing one or more required valid signatures.
-//
- CERTSRV_E_SIGNATURE_REJECTED = HRESULT($8009480B);
- {$EXTERNALSYM CERTSRV_E_SIGNATURE_REJECTED}
-
-//
-// MessageId: CERTSRV_E_ISSUANCE_POLICY_REQUIRED
-//
-// MessageText:
-//
-// The request is missing one or more required signature issuance policies.
-//
- CERTSRV_E_ISSUANCE_POLICY_REQUIRED = HRESULT($8009480C);
- {$EXTERNALSYM CERTSRV_E_ISSUANCE_POLICY_REQUIRED}
-
-//
-// MessageId: CERTSRV_E_SUBJECT_UPN_REQUIRED
-//
-// MessageText:
-//
-// The UPN is unavailable and cannot be added to the Subject Alternate name.
-//
- CERTSRV_E_SUBJECT_UPN_REQUIRED = HRESULT($8009480D);
- {$EXTERNALSYM CERTSRV_E_SUBJECT_UPN_REQUIRED}
-
-//
-// MessageId: CERTSRV_E_SUBJECT_DIRECTORY_GUID_REQUIRED
-//
-// MessageText:
-//
-// The Active Directory GUID is unavailable and cannot be added to the Subject Alternate name.
-//
- CERTSRV_E_SUBJECT_DIRECTORY_GUID_REQUIRED = HRESULT($8009480E);
- {$EXTERNALSYM CERTSRV_E_SUBJECT_DIRECTORY_GUID_REQUIRED}
-
-//
-// MessageId: CERTSRV_E_SUBJECT_DNS_REQUIRED
-//
-// MessageText:
-//
-// The DNS name is unavailable and cannot be added to the Subject Alternate name.
-//
- CERTSRV_E_SUBJECT_DNS_REQUIRED = HRESULT($8009480F);
- {$EXTERNALSYM CERTSRV_E_SUBJECT_DNS_REQUIRED}
-
-//
-// MessageId: CERTSRV_E_ARCHIVED_KEY_UNEXPECTED
-//
-// MessageText:
-//
-// The request includes a private key for archival by the server, but key archival is not enabled for the specified certificate template.
-//
- CERTSRV_E_ARCHIVED_KEY_UNEXPECTED = HRESULT($80094810);
- {$EXTERNALSYM CERTSRV_E_ARCHIVED_KEY_UNEXPECTED}
-
-//
-// MessageId: CERTSRV_E_KEY_LENGTH
-//
-// MessageText:
-//
-// The public key does not meet the minimum size required by the specified certificate template.
-//
- CERTSRV_E_KEY_LENGTH = HRESULT($80094811);
- {$EXTERNALSYM CERTSRV_E_KEY_LENGTH}
-
-//
-// MessageId: CERTSRV_E_SUBJECT_EMAIL_REQUIRED
-//
-// MessageText:
-//
-// The EMail name is unavailable and cannot be added to the Subject or Subject Alternate name.
-//
- CERTSRV_E_SUBJECT_EMAIL_REQUIRED = HRESULT($80094812);
- {$EXTERNALSYM CERTSRV_E_SUBJECT_EMAIL_REQUIRED}
-
-//
-// MessageId: CERTSRV_E_UNKNOWN_CERT_TYPE
-//
-// MessageText:
-//
-// One or more certificate templates to be enabled on this certification authority could not be found.
-//
- CERTSRV_E_UNKNOWN_CERT_TYPE = HRESULT($80094813);
- {$EXTERNALSYM CERTSRV_E_UNKNOWN_CERT_TYPE}
-
-//
-// MessageId: CERTSRV_E_CERT_TYPE_OVERLAP
-//
-// MessageText:
-//
-// The certificate template renewal period is longer than the certificate validity period. The template should be reconfigured or the CA certificate renewed.
-//
- CERTSRV_E_CERT_TYPE_OVERLAP = HRESULT($80094814);
- {$EXTERNALSYM CERTSRV_E_CERT_TYPE_OVERLAP}
-
-//
-// The range 0x5000-0x51ff is reserved for XENROLL errors.
-//
-//
-// MessageId: XENROLL_E_KEY_NOT_EXPORTABLE
-//
-// MessageText:
-//
-// The key is not exportable.
-//
- XENROLL_E_KEY_NOT_EXPORTABLE = HRESULT($80095000);
- {$EXTERNALSYM XENROLL_E_KEY_NOT_EXPORTABLE}
-
-//
-// MessageId: XENROLL_E_CANNOT_ADD_ROOT_CERT
-//
-// MessageText:
-//
-// You cannot add the root CA certificate into your local store.
-//
- XENROLL_E_CANNOT_ADD_ROOT_CERT = HRESULT($80095001);
- {$EXTERNALSYM XENROLL_E_CANNOT_ADD_ROOT_CERT}
-
-//
-// MessageId: XENROLL_E_RESPONSE_KA_HASH_NOT_FOUND
-//
-// MessageText:
-//
-// The key archival hash attribute was not found in the response.
-//
- XENROLL_E_RESPONSE_KA_HASH_NOT_FOUND = HRESULT($80095002);
- {$EXTERNALSYM XENROLL_E_RESPONSE_KA_HASH_NOT_FOUND}
-
-//
-// MessageId: XENROLL_E_RESPONSE_UNEXPECTED_KA_HASH
-//
-// MessageText:
-//
-// An unexpected key archival hash attribute was found in the response.
-//
- XENROLL_E_RESPONSE_UNEXPECTED_KA_HASH = HRESULT($80095003);
- {$EXTERNALSYM XENROLL_E_RESPONSE_UNEXPECTED_KA_HASH}
-
-//
-// MessageId: XENROLL_E_RESPONSE_KA_HASH_MISMATCH
-//
-// MessageText:
-//
-// There is a key archival hash mismatch between the request and the response.
-//
- XENROLL_E_RESPONSE_KA_HASH_MISMATCH = HRESULT($80095004);
- {$EXTERNALSYM XENROLL_E_RESPONSE_KA_HASH_MISMATCH}
-
-//
-// MessageId: XENROLL_E_KEYSPEC_SMIME_MISMATCH
-//
-// MessageText:
-//
-// Signing certificate cannot include SMIME extension.
-//
- XENROLL_E_KEYSPEC_SMIME_MISMATCH = HRESULT($80095005);
- {$EXTERNALSYM XENROLL_E_KEYSPEC_SMIME_MISMATCH}
-
-//
-// MessageId: TRUST_E_SYSTEM_ERROR
-//
-// MessageText:
-//
-// A system-level error occurred while verifying trust.
-//
- TRUST_E_SYSTEM_ERROR = HRESULT($80096001);
- {$EXTERNALSYM TRUST_E_SYSTEM_ERROR}
-
-//
-// MessageId: TRUST_E_NO_SIGNER_CERT
-//
-// MessageText:
-//
-// The certificate for the signer of the message is invalid or not found.
-//
- TRUST_E_NO_SIGNER_CERT = HRESULT($80096002);
- {$EXTERNALSYM TRUST_E_NO_SIGNER_CERT}
-
-//
-// MessageId: TRUST_E_COUNTER_SIGNER
-//
-// MessageText:
-//
-// One of the counter signatures was invalid.
-//
- TRUST_E_COUNTER_SIGNER = HRESULT($80096003);
- {$EXTERNALSYM TRUST_E_COUNTER_SIGNER}
-
-//
-// MessageId: TRUST_E_CERT_SIGNATURE
-//
-// MessageText:
-//
-// The signature of the certificate can not be verified.
-//
- TRUST_E_CERT_SIGNATURE = HRESULT($80096004);
- {$EXTERNALSYM TRUST_E_CERT_SIGNATURE}
-
-//
-// MessageId: TRUST_E_TIME_STAMP
-//
-// MessageText:
-//
-// The timestamp signature and/or certificate could not be verified or is malformed.
-//
- TRUST_E_TIME_STAMP = HRESULT($80096005);
- {$EXTERNALSYM TRUST_E_TIME_STAMP}
-
-//
-// MessageId: TRUST_E_BAD_DIGEST
-//
-// MessageText:
-//
-// The digital signature of the object did not verify.
-//
- TRUST_E_BAD_DIGEST = HRESULT($80096010);
- {$EXTERNALSYM TRUST_E_BAD_DIGEST}
-
-//
-// MessageId: TRUST_E_BASIC_CONSTRAINTS
-//
-// MessageText:
-//
-// A certificate's basic constraint extension has not been observed.
-//
- TRUST_E_BASIC_CONSTRAINTS = HRESULT($80096019);
- {$EXTERNALSYM TRUST_E_BASIC_CONSTRAINTS}
-
-//
-// MessageId: TRUST_E_FINANCIAL_CRITERIA
-//
-// MessageText:
-//
-// The certificate does not meet or contain the Authenticode(tm) financial extensions.
-//
- TRUST_E_FINANCIAL_CRITERIA = HRESULT($8009601E);
- {$EXTERNALSYM TRUST_E_FINANCIAL_CRITERIA}
-
-//
-// Error codes for mssipotf.dll
-// Most of the error codes can only occur when an error occurs
-// during font file signing
-//
-//
-//
-// MessageId: MSSIPOTF_E_OUTOFMEMRANGE
-//
-// MessageText:
-//
-// Tried to reference a part of the file outside the proper range.
-//
- MSSIPOTF_E_OUTOFMEMRANGE = HRESULT($80097001);
- {$EXTERNALSYM MSSIPOTF_E_OUTOFMEMRANGE}
-
-//
-// MessageId: MSSIPOTF_E_CANTGETOBJECT
-//
-// MessageText:
-//
-// Could not retrieve an object from the file.
-//
- MSSIPOTF_E_CANTGETOBJECT = HRESULT($80097002);
- {$EXTERNALSYM MSSIPOTF_E_CANTGETOBJECT}
-
-//
-// MessageId: MSSIPOTF_E_NOHEADTABLE
-//
-// MessageText:
-//
-// Could not find the head table in the file.
-//
- MSSIPOTF_E_NOHEADTABLE = HRESULT($80097003);
- {$EXTERNALSYM MSSIPOTF_E_NOHEADTABLE}
-
-//
-// MessageId: MSSIPOTF_E_BAD_MAGICNUMBER
-//
-// MessageText:
-//
-// The magic number in the head table is incorrect.
-//
- MSSIPOTF_E_BAD_MAGICNUMBER = HRESULT($80097004);
- {$EXTERNALSYM MSSIPOTF_E_BAD_MAGICNUMBER}
-
-//
-// MessageId: MSSIPOTF_E_BAD_OFFSET_TABLE
-//
-// MessageText:
-//
-// The offset table has incorrect values.
-//
- MSSIPOTF_E_BAD_OFFSET_TABLE = HRESULT($80097005);
- {$EXTERNALSYM MSSIPOTF_E_BAD_OFFSET_TABLE}
-
-//
-// MessageId: MSSIPOTF_E_TABLE_TAGORDER
-//
-// MessageText:
-//
-// Duplicate table tags or tags out of alphabetical order.
-//
- MSSIPOTF_E_TABLE_TAGORDER = HRESULT($80097006);
- {$EXTERNALSYM MSSIPOTF_E_TABLE_TAGORDER}
-
-//
-// MessageId: MSSIPOTF_E_TABLE_LONGWORD
-//
-// MessageText:
-//
-// A table does not start on a long word boundary.
-//
- MSSIPOTF_E_TABLE_LONGWORD = HRESULT($80097007);
- {$EXTERNALSYM MSSIPOTF_E_TABLE_LONGWORD}
-
-//
-// MessageId: MSSIPOTF_E_BAD_FIRST_TABLE_PLACEMENT
-//
-// MessageText:
-//
-// First table does not appear after header information.
-//
- MSSIPOTF_E_BAD_FIRST_TABLE_PLACEMENT = HRESULT($80097008);
- {$EXTERNALSYM MSSIPOTF_E_BAD_FIRST_TABLE_PLACEMENT}
-
-//
-// MessageId: MSSIPOTF_E_TABLES_OVERLAP
-//
-// MessageText:
-//
-// Two or more tables overlap.
-//
- MSSIPOTF_E_TABLES_OVERLAP = HRESULT($80097009);
- {$EXTERNALSYM MSSIPOTF_E_TABLES_OVERLAP}
-
-//
-// MessageId: MSSIPOTF_E_TABLE_PADBYTES
-//
-// MessageText:
-//
-// Too many pad bytes between tables or pad bytes are not 0.
-//
- MSSIPOTF_E_TABLE_PADBYTES = HRESULT($8009700A);
- {$EXTERNALSYM MSSIPOTF_E_TABLE_PADBYTES}
-
-//
-// MessageId: MSSIPOTF_E_FILETOOSMALL
-//
-// MessageText:
-//
-// File is too small to contain the last table.
-//
- MSSIPOTF_E_FILETOOSMALL = HRESULT($8009700B);
- {$EXTERNALSYM MSSIPOTF_E_FILETOOSMALL}
-
-//
-// MessageId: MSSIPOTF_E_TABLE_CHECKSUM
-//
-// MessageText:
-//
-// A table checksum is incorrect.
-//
- MSSIPOTF_E_TABLE_CHECKSUM = HRESULT($8009700C);
- {$EXTERNALSYM MSSIPOTF_E_TABLE_CHECKSUM}
-
-//
-// MessageId: MSSIPOTF_E_FILE_CHECKSUM
-//
-// MessageText:
-//
-// The file checksum is incorrect.
-//
- MSSIPOTF_E_FILE_CHECKSUM = HRESULT($8009700D);
- {$EXTERNALSYM MSSIPOTF_E_FILE_CHECKSUM}
-
-//
-// MessageId: MSSIPOTF_E_FAILED_POLICY
-//
-// MessageText:
-//
-// The signature does not have the correct attributes for the policy.
-//
- MSSIPOTF_E_FAILED_POLICY = HRESULT($80097010);
- {$EXTERNALSYM MSSIPOTF_E_FAILED_POLICY}
-
-//
-// MessageId: MSSIPOTF_E_FAILED_HINTS_CHECK
-//
-// MessageText:
-//
-// The file did not pass the hints check.
-//
- MSSIPOTF_E_FAILED_HINTS_CHECK = HRESULT($80097011);
- {$EXTERNALSYM MSSIPOTF_E_FAILED_HINTS_CHECK}
-
-//
-// MessageId: MSSIPOTF_E_NOT_OPENTYPE
-//
-// MessageText:
-//
-// The file is not an OpenType file.
-//
- MSSIPOTF_E_NOT_OPENTYPE = HRESULT($80097012);
- {$EXTERNALSYM MSSIPOTF_E_NOT_OPENTYPE}
-
-//
-// MessageId: MSSIPOTF_E_FILE
-//
-// MessageText:
-//
-// Failed on a file operation (open, map, read, write).
-//
- MSSIPOTF_E_FILE = HRESULT($80097013);
- {$EXTERNALSYM MSSIPOTF_E_FILE}
-
-//
-// MessageId: MSSIPOTF_E_CRYPT
-//
-// MessageText:
-//
-// A call to a CryptoAPI function failed.
-//
- MSSIPOTF_E_CRYPT = HRESULT($80097014);
- {$EXTERNALSYM MSSIPOTF_E_CRYPT}
-
-//
-// MessageId: MSSIPOTF_E_BADVERSION
-//
-// MessageText:
-//
-// There is a bad version number in the file.
-//
- MSSIPOTF_E_BADVERSION = HRESULT($80097015);
- {$EXTERNALSYM MSSIPOTF_E_BADVERSION}
-
-//
-// MessageId: MSSIPOTF_E_DSIG_STRUCTURE
-//
-// MessageText:
-//
-// The structure of the DSIG table is incorrect.
-//
- MSSIPOTF_E_DSIG_STRUCTURE = HRESULT($80097016);
- {$EXTERNALSYM MSSIPOTF_E_DSIG_STRUCTURE}
-
-//
-// MessageId: MSSIPOTF_E_PCONST_CHECK
-//
-// MessageText:
-//
-// A check failed in a partially constant table.
-//
- MSSIPOTF_E_PCONST_CHECK = HRESULT($80097017);
- {$EXTERNALSYM MSSIPOTF_E_PCONST_CHECK}
-
-//
-// MessageId: MSSIPOTF_E_STRUCTURE
-//
-// MessageText:
-//
-// Some kind of structural error.
-//
- MSSIPOTF_E_STRUCTURE = HRESULT($80097018);
- {$EXTERNALSYM MSSIPOTF_E_STRUCTURE}
-
- NTE_OP_OK = 0;
- {$EXTERNALSYM NTE_OP_OK}
-
-//
-// Note that additional FACILITY_SSPI errors are in issperr.h
-//
-// ******************
-// FACILITY_CERT
-// ******************
-//
-// MessageId: TRUST_E_PROVIDER_UNKNOWN
-//
-// MessageText:
-//
-// Unknown trust provider.
-//
- TRUST_E_PROVIDER_UNKNOWN = HRESULT($800B0001);
- {$EXTERNALSYM TRUST_E_PROVIDER_UNKNOWN}
-
-//
-// MessageId: TRUST_E_ACTION_UNKNOWN
-//
-// MessageText:
-//
-// The trust verification action specified is not supported by the specified trust provider.
-//
- TRUST_E_ACTION_UNKNOWN = HRESULT($800B0002);
- {$EXTERNALSYM TRUST_E_ACTION_UNKNOWN}
-
-//
-// MessageId: TRUST_E_SUBJECT_FORM_UNKNOWN
-//
-// MessageText:
-//
-// The form specified for the subject is not one supported or known by the specified trust provider.
-//
- TRUST_E_SUBJECT_FORM_UNKNOWN = HRESULT($800B0003);
- {$EXTERNALSYM TRUST_E_SUBJECT_FORM_UNKNOWN}
-
-//
-// MessageId: TRUST_E_SUBJECT_NOT_TRUSTED
-//
-// MessageText:
-//
-// The subject is not trusted for the specified action.
-//
- TRUST_E_SUBJECT_NOT_TRUSTED = HRESULT($800B0004);
- {$EXTERNALSYM TRUST_E_SUBJECT_NOT_TRUSTED}
-
-//
-// MessageId: DIGSIG_E_ENCODE
-//
-// MessageText:
-//
-// Error due to problem in ASN.1 encoding process.
-//
- DIGSIG_E_ENCODE = HRESULT($800B0005);
- {$EXTERNALSYM DIGSIG_E_ENCODE}
-
-//
-// MessageId: DIGSIG_E_DECODE
-//
-// MessageText:
-//
-// Error due to problem in ASN.1 decoding process.
-//
- DIGSIG_E_DECODE = HRESULT($800B0006);
- {$EXTERNALSYM DIGSIG_E_DECODE}
-
-//
-// MessageId: DIGSIG_E_EXTENSIBILITY
-//
-// MessageText:
-//
-// Reading / writing Extensions where Attributes are appropriate, and visa versa.
-//
- DIGSIG_E_EXTENSIBILITY = HRESULT($800B0007);
- {$EXTERNALSYM DIGSIG_E_EXTENSIBILITY}
-
-//
-// MessageId: DIGSIG_E_CRYPTO
-//
-// MessageText:
-//
-// Unspecified cryptographic failure.
-//
- DIGSIG_E_CRYPTO = HRESULT($800B0008);
- {$EXTERNALSYM DIGSIG_E_CRYPTO}
-
-//
-// MessageId: PERSIST_E_SIZEDEFINITE
-//
-// MessageText:
-//
-// The size of the data could not be determined.
-//
- PERSIST_E_SIZEDEFINITE = HRESULT($800B0009);
- {$EXTERNALSYM PERSIST_E_SIZEDEFINITE}
-
-//
-// MessageId: PERSIST_E_SIZEINDEFINITE
-//
-// MessageText:
-//
-// The size of the indefinite-sized data could not be determined.
-//
- PERSIST_E_SIZEINDEFINITE = HRESULT($800B000A);
- {$EXTERNALSYM PERSIST_E_SIZEINDEFINITE}
-
-//
-// MessageId: PERSIST_E_NOTSELFSIZING
-//
-// MessageText:
-//
-// This object does not read and write self-sizing data.
-//
- PERSIST_E_NOTSELFSIZING = HRESULT($800B000B);
- {$EXTERNALSYM PERSIST_E_NOTSELFSIZING}
-
-//
-// MessageId: TRUST_E_NOSIGNATURE
-//
-// MessageText:
-//
-// No signature was present in the subject.
-//
- TRUST_E_NOSIGNATURE = HRESULT($800B0100);
- {$EXTERNALSYM TRUST_E_NOSIGNATURE}
-
-//
-// MessageId: CERT_E_EXPIRED
-//
-// MessageText:
-//
-// A required certificate is not within its validity period when verifying against the current system clock or the timestamp in the signed file.
-//
- CERT_E_EXPIRED = HRESULT($800B0101);
- {$EXTERNALSYM CERT_E_EXPIRED}
-
-//
-// MessageId: CERT_E_VALIDITYPERIODNESTING
-//
-// MessageText:
-//
-// The validity periods of the certification chain do not nest correctly.
-//
- CERT_E_VALIDITYPERIODNESTING = HRESULT($800B0102);
- {$EXTERNALSYM CERT_E_VALIDITYPERIODNESTING}
-
-//
-// MessageId: CERT_E_ROLE
-//
-// MessageText:
-//
-// A certificate that can only be used as an end-entity is being used as a CA or visa versa.
-//
- CERT_E_ROLE = HRESULT($800B0103);
- {$EXTERNALSYM CERT_E_ROLE}
-
-//
-// MessageId: CERT_E_PATHLENCONST
-//
-// MessageText:
-//
-// A path length constraint in the certification chain has been violated.
-//
- CERT_E_PATHLENCONST = HRESULT($800B0104);
- {$EXTERNALSYM CERT_E_PATHLENCONST}
-
-//
-// MessageId: CERT_E_CRITICAL
-//
-// MessageText:
-//
-// A certificate contains an unknown extension that is marked 'critical'.
-//
- CERT_E_CRITICAL = HRESULT($800B0105);
- {$EXTERNALSYM CERT_E_CRITICAL}
-
-//
-// MessageId: CERT_E_PURPOSE
-//
-// MessageText:
-//
-// A certificate being used for a purpose other than the ones specified by its CA.
-//
- CERT_E_PURPOSE = HRESULT($800B0106);
- {$EXTERNALSYM CERT_E_PURPOSE}
-
-//
-// MessageId: CERT_E_ISSUERCHAINING
-//
-// MessageText:
-//
-// A parent of a given certificate in fact did not issue that child certificate.
-//
- CERT_E_ISSUERCHAINING = HRESULT($800B0107);
- {$EXTERNALSYM CERT_E_ISSUERCHAINING}
-
-//
-// MessageId: CERT_E_MALFORMED
-//
-// MessageText:
-//
-// A certificate is missing or has an empty value for an important field, such as a subject or issuer name.
-//
- CERT_E_MALFORMED = HRESULT($800B0108);
- {$EXTERNALSYM CERT_E_MALFORMED}
-
-//
-// MessageId: CERT_E_UNTRUSTEDROOT
-//
-// MessageText:
-//
-// A certificate chain processed, but terminated in a root certificate which is not trusted by the trust provider.
-//
- CERT_E_UNTRUSTEDROOT = HRESULT($800B0109);
- {$EXTERNALSYM CERT_E_UNTRUSTEDROOT}
-
-//
-// MessageId: CERT_E_CHAINING
-//
-// MessageText:
-//
-// A certificate chain could not be built to a trusted root authority.
-//
- CERT_E_CHAINING = HRESULT($800B010A);
- {$EXTERNALSYM CERT_E_CHAINING}
-
-//
-// MessageId: TRUST_E_FAIL
-//
-// MessageText:
-//
-// Generic trust failure.
-//
- TRUST_E_FAIL = HRESULT($800B010B);
- {$EXTERNALSYM TRUST_E_FAIL}
-
-//
-// MessageId: CERT_E_REVOKED
-//
-// MessageText:
-//
-// A certificate was explicitly revoked by its issuer.
-//
- CERT_E_REVOKED = HRESULT($800B010C);
- {$EXTERNALSYM CERT_E_REVOKED}
-
-//
-// MessageId: CERT_E_UNTRUSTEDTESTROOT
-//
-// MessageText:
-//
-// The certification path terminates with the test root which is not trusted with the current policy settings.
-//
- CERT_E_UNTRUSTEDTESTROOT = HRESULT($800B010D);
- {$EXTERNALSYM CERT_E_UNTRUSTEDTESTROOT}
-
-//
-// MessageId: CERT_E_REVOCATION_FAILURE
-//
-// MessageText:
-//
-// The revocation process could not continue - the certificate(s) could not be checked.
-//
- CERT_E_REVOCATION_FAILURE = HRESULT($800B010E);
- {$EXTERNALSYM CERT_E_REVOCATION_FAILURE}
-
-//
-// MessageId: CERT_E_CN_NO_MATCH
-//
-// MessageText:
-//
-// The certificate's CN name does not match the passed value.
-//
- CERT_E_CN_NO_MATCH = HRESULT($800B010F);
- {$EXTERNALSYM CERT_E_CN_NO_MATCH}
-
-//
-// MessageId: CERT_E_WRONG_USAGE
-//
-// MessageText:
-//
-// The certificate is not valid for the requested usage.
-//
- CERT_E_WRONG_USAGE = HRESULT($800B0110);
- {$EXTERNALSYM CERT_E_WRONG_USAGE}
-
-//
-// MessageId: TRUST_E_EXPLICIT_DISTRUST
-//
-// MessageText:
-//
-// The certificate was explicitly marked as untrusted by the user.
-//
- TRUST_E_EXPLICIT_DISTRUST = HRESULT($800B0111);
- {$EXTERNALSYM TRUST_E_EXPLICIT_DISTRUST}
-
-//
-// MessageId: CERT_E_UNTRUSTEDCA
-//
-// MessageText:
-//
-// A certification chain processed correctly, but one of the CA certificates is not trusted by the policy provider.
-//
- CERT_E_UNTRUSTEDCA = HRESULT($800B0112);
- {$EXTERNALSYM CERT_E_UNTRUSTEDCA}
-
-//
-// MessageId: CERT_E_INVALID_POLICY
-//
-// MessageText:
-//
-// The certificate has invalid policy.
-//
- CERT_E_INVALID_POLICY = HRESULT($800B0113);
- {$EXTERNALSYM CERT_E_INVALID_POLICY}
-
-//
-// MessageId: CERT_E_INVALID_NAME
-//
-// MessageText:
-//
-// The certificate has an invalid name. The name is not included in the permitted list or is explicitly excluded.
-//
- CERT_E_INVALID_NAME = HRESULT($800B0114);
- {$EXTERNALSYM CERT_E_INVALID_NAME}
-
-// *****************
-// FACILITY_SETUPAPI
-// *****************
-//
-// Since these error codes aren't in the standard Win32 range (i.e., 0-64K), define a
-// macro to map either Win32 or SetupAPI error codes into an HRESULT.
-//
-
-function HRESULT_FROM_SETUPAPI(x: DWORD): HRESULT;
-{$EXTERNALSYM HRESULT_FROM_SETUPAPI}
-
-//
-// MessageId: SPAPI_E_EXPECTED_SECTION_NAME
-//
-// MessageText:
-//
-// A non-empty line was encountered in the INF before the start of a section.
-//
-
-const
- SPAPI_E_EXPECTED_SECTION_NAME = HRESULT($800F0000);
- {$EXTERNALSYM SPAPI_E_EXPECTED_SECTION_NAME}
-
-//
-// MessageId: SPAPI_E_BAD_SECTION_NAME_LINE
-//
-// MessageText:
-//
-// A section name marker in the INF is not complete, or does not exist on a line by itself.
-//
- SPAPI_E_BAD_SECTION_NAME_LINE = HRESULT($800F0001);
- {$EXTERNALSYM SPAPI_E_BAD_SECTION_NAME_LINE}
-
-//
-// MessageId: SPAPI_E_SECTION_NAME_TOO_LONG
-//
-// MessageText:
-//
-// An INF section was encountered whose name exceeds the maximum section name length.
-//
- SPAPI_E_SECTION_NAME_TOO_LONG = HRESULT($800F0002);
- {$EXTERNALSYM SPAPI_E_SECTION_NAME_TOO_LONG}
-
-//
-// MessageId: SPAPI_E_GENERAL_SYNTAX
-//
-// MessageText:
-//
-// The syntax of the INF is invalid.
-//
- SPAPI_E_GENERAL_SYNTAX = HRESULT($800F0003);
- {$EXTERNALSYM SPAPI_E_GENERAL_SYNTAX}
-
-//
-// MessageId: SPAPI_E_WRONG_INF_STYLE
-//
-// MessageText:
-//
-// The style of the INF is different than what was requested.
-//
- SPAPI_E_WRONG_INF_STYLE = HRESULT($800F0100);
- {$EXTERNALSYM SPAPI_E_WRONG_INF_STYLE}
-
-//
-// MessageId: SPAPI_E_SECTION_NOT_FOUND
-//
-// MessageText:
-//
-// The required section was not found in the INF.
-//
- SPAPI_E_SECTION_NOT_FOUND = HRESULT($800F0101);
- {$EXTERNALSYM SPAPI_E_SECTION_NOT_FOUND}
-
-//
-// MessageId: SPAPI_E_LINE_NOT_FOUND
-//
-// MessageText:
-//
-// The required line was not found in the INF.
-//
- SPAPI_E_LINE_NOT_FOUND = HRESULT($800F0102);
- {$EXTERNALSYM SPAPI_E_LINE_NOT_FOUND}
-
-//
-// MessageId: SPAPI_E_NO_BACKUP
-//
-// MessageText:
-//
-// The files affected by the installation of this file queue have not been backed up for uninstall.
-//
- SPAPI_E_NO_BACKUP = HRESULT($800F0103);
- {$EXTERNALSYM SPAPI_E_NO_BACKUP}
-
-//
-// MessageId: SPAPI_E_NO_ASSOCIATED_CLASS
-//
-// MessageText:
-//
-// The INF or the device information set or element does not have an associated install class.
-//
- SPAPI_E_NO_ASSOCIATED_CLASS = HRESULT($800F0200);
- {$EXTERNALSYM SPAPI_E_NO_ASSOCIATED_CLASS}
-
-//
-// MessageId: SPAPI_E_CLASS_MISMATCH
-//
-// MessageText:
-//
-// The INF or the device information set or element does not match the specified install class.
-//
- SPAPI_E_CLASS_MISMATCH = HRESULT($800F0201);
- {$EXTERNALSYM SPAPI_E_CLASS_MISMATCH}
-
-//
-// MessageId: SPAPI_E_DUPLICATE_FOUND
-//
-// MessageText:
-//
-// An existing device was found that is a duplicate of the device being manually installed.
-//
- SPAPI_E_DUPLICATE_FOUND = HRESULT($800F0202);
- {$EXTERNALSYM SPAPI_E_DUPLICATE_FOUND}
-
-//
-// MessageId: SPAPI_E_NO_DRIVER_SELECTED
-//
-// MessageText:
-//
-// There is no driver selected for the device information set or element.
-//
- SPAPI_E_NO_DRIVER_SELECTED = HRESULT($800F0203);
- {$EXTERNALSYM SPAPI_E_NO_DRIVER_SELECTED}
-
-//
-// MessageId: SPAPI_E_KEY_DOES_NOT_EXIST
-//
-// MessageText:
-//
-// The requested device registry key does not exist.
-//
- SPAPI_E_KEY_DOES_NOT_EXIST = HRESULT($800F0204);
- {$EXTERNALSYM SPAPI_E_KEY_DOES_NOT_EXIST}
-
-//
-// MessageId: SPAPI_E_INVALID_DEVINST_NAME
-//
-// MessageText:
-//
-// The device instance name is invalid.
-//
- SPAPI_E_INVALID_DEVINST_NAME = HRESULT($800F0205);
- {$EXTERNALSYM SPAPI_E_INVALID_DEVINST_NAME}
-
-//
-// MessageId: SPAPI_E_INVALID_CLASS
-//
-// MessageText:
-//
-// The install class is not present or is invalid.
-//
- SPAPI_E_INVALID_CLASS = HRESULT($800F0206);
- {$EXTERNALSYM SPAPI_E_INVALID_CLASS}
-
-//
-// MessageId: SPAPI_E_DEVINST_ALREADY_EXISTS
-//
-// MessageText:
-//
-// The device instance cannot be created because it already exists.
-//
- SPAPI_E_DEVINST_ALREADY_EXISTS = HRESULT($800F0207);
- {$EXTERNALSYM SPAPI_E_DEVINST_ALREADY_EXISTS}
-
-//
-// MessageId: SPAPI_E_DEVINFO_NOT_REGISTERED
-//
-// MessageText:
-//
-// The operation cannot be performed on a device information element that has not been registered.
-//
- SPAPI_E_DEVINFO_NOT_REGISTERED = HRESULT($800F0208);
- {$EXTERNALSYM SPAPI_E_DEVINFO_NOT_REGISTERED}
-
-//
-// MessageId: SPAPI_E_INVALID_REG_PROPERTY
-//
-// MessageText:
-//
-// The device property code is invalid.
-//
- SPAPI_E_INVALID_REG_PROPERTY = HRESULT($800F0209);
- {$EXTERNALSYM SPAPI_E_INVALID_REG_PROPERTY}
-
-//
-// MessageId: SPAPI_E_NO_INF
-//
-// MessageText:
-//
-// The INF from which a driver list is to be built does not exist.
-//
- SPAPI_E_NO_INF = HRESULT($800F020A);
- {$EXTERNALSYM SPAPI_E_NO_INF}
-
-//
-// MessageId: SPAPI_E_NO_SUCH_DEVINST
-//
-// MessageText:
-//
-// The device instance does not exist in the hardware tree.
-//
- SPAPI_E_NO_SUCH_DEVINST = HRESULT($800F020B);
- {$EXTERNALSYM SPAPI_E_NO_SUCH_DEVINST}
-
-//
-// MessageId: SPAPI_E_CANT_LOAD_CLASS_ICON
-//
-// MessageText:
-//
-// The icon representing this install class cannot be loaded.
-//
- SPAPI_E_CANT_LOAD_CLASS_ICON = HRESULT($800F020C);
- {$EXTERNALSYM SPAPI_E_CANT_LOAD_CLASS_ICON}
-
-//
-// MessageId: SPAPI_E_INVALID_CLASS_INSTALLER
-//
-// MessageText:
-//
-// The class installer registry entry is invalid.
-//
- SPAPI_E_INVALID_CLASS_INSTALLER = HRESULT($800F020D);
- {$EXTERNALSYM SPAPI_E_INVALID_CLASS_INSTALLER}
-
-//
-// MessageId: SPAPI_E_DI_DO_DEFAULT
-//
-// MessageText:
-//
-// The class installer has indicated that the default action should be performed for this installation request.
-//
- SPAPI_E_DI_DO_DEFAULT = HRESULT($800F020E);
- {$EXTERNALSYM SPAPI_E_DI_DO_DEFAULT}
-
-//
-// MessageId: SPAPI_E_DI_NOFILECOPY
-//
-// MessageText:
-//
-// The operation does not require any files to be copied.
-//
- SPAPI_E_DI_NOFILECOPY = HRESULT($800F020F);
- {$EXTERNALSYM SPAPI_E_DI_NOFILECOPY}
-
-//
-// MessageId: SPAPI_E_INVALID_HWPROFILE
-//
-// MessageText:
-//
-// The specified hardware profile does not exist.
-//
- SPAPI_E_INVALID_HWPROFILE = HRESULT($800F0210);
- {$EXTERNALSYM SPAPI_E_INVALID_HWPROFILE}
-
-//
-// MessageId: SPAPI_E_NO_DEVICE_SELECTED
-//
-// MessageText:
-//
-// There is no device information element currently selected for this device information set.
-//
- SPAPI_E_NO_DEVICE_SELECTED = HRESULT($800F0211);
- {$EXTERNALSYM SPAPI_E_NO_DEVICE_SELECTED}
-
-//
-// MessageId: SPAPI_E_DEVINFO_LIST_LOCKED
-//
-// MessageText:
-//
-// The operation cannot be performed because the device information set is locked.
-//
- SPAPI_E_DEVINFO_LIST_LOCKED = HRESULT($800F0212);
- {$EXTERNALSYM SPAPI_E_DEVINFO_LIST_LOCKED}
-
-//
-// MessageId: SPAPI_E_DEVINFO_DATA_LOCKED
-//
-// MessageText:
-//
-// The operation cannot be performed because the device information element is locked.
-//
- SPAPI_E_DEVINFO_DATA_LOCKED = HRESULT($800F0213);
- {$EXTERNALSYM SPAPI_E_DEVINFO_DATA_LOCKED}
-
-//
-// MessageId: SPAPI_E_DI_BAD_PATH
-//
-// MessageText:
-//
-// The specified path does not contain any applicable device INFs.
-//
- SPAPI_E_DI_BAD_PATH = HRESULT($800F0214);
- {$EXTERNALSYM SPAPI_E_DI_BAD_PATH}
-
-//
-// MessageId: SPAPI_E_NO_CLASSINSTALL_PARAMS
-//
-// MessageText:
-//
-// No class installer parameters have been set for the device information set or element.
-//
- SPAPI_E_NO_CLASSINSTALL_PARAMS = HRESULT($800F0215);
- {$EXTERNALSYM SPAPI_E_NO_CLASSINSTALL_PARAMS}
-
-//
-// MessageId: SPAPI_E_FILEQUEUE_LOCKED
-//
-// MessageText:
-//
-// The operation cannot be performed because the file queue is locked.
-//
- SPAPI_E_FILEQUEUE_LOCKED = HRESULT($800F0216);
- {$EXTERNALSYM SPAPI_E_FILEQUEUE_LOCKED}
-
-//
-// MessageId: SPAPI_E_BAD_SERVICE_INSTALLSECT
-//
-// MessageText:
-//
-// A service installation section in this INF is invalid.
-//
- SPAPI_E_BAD_SERVICE_INSTALLSECT = HRESULT($800F0217);
- {$EXTERNALSYM SPAPI_E_BAD_SERVICE_INSTALLSECT}
-
-//
-// MessageId: SPAPI_E_NO_CLASS_DRIVER_LIST
-//
-// MessageText:
-//
-// There is no class driver list for the device information element.
-//
- SPAPI_E_NO_CLASS_DRIVER_LIST = HRESULT($800F0218);
- {$EXTERNALSYM SPAPI_E_NO_CLASS_DRIVER_LIST}
-
-//
-// MessageId: SPAPI_E_NO_ASSOCIATED_SERVICE
-//
-// MessageText:
-//
-// The installation failed because a function driver was not specified for this device instance.
-//
- SPAPI_E_NO_ASSOCIATED_SERVICE = HRESULT($800F0219);
- {$EXTERNALSYM SPAPI_E_NO_ASSOCIATED_SERVICE}
-
-//
-// MessageId: SPAPI_E_NO_DEFAULT_DEVICE_INTERFACE
-//
-// MessageText:
-//
-// There is presently no default device interface designated for this interface class.
-//
- SPAPI_E_NO_DEFAULT_DEVICE_INTERFACE = HRESULT($800F021A);
- {$EXTERNALSYM SPAPI_E_NO_DEFAULT_DEVICE_INTERFACE}
-
-//
-// MessageId: SPAPI_E_DEVICE_INTERFACE_ACTIVE
-//
-// MessageText:
-//
-// The operation cannot be performed because the device interface is currently active.
-//
- SPAPI_E_DEVICE_INTERFACE_ACTIVE = HRESULT($800F021B);
- {$EXTERNALSYM SPAPI_E_DEVICE_INTERFACE_ACTIVE}
-
-//
-// MessageId: SPAPI_E_DEVICE_INTERFACE_REMOVED
-//
-// MessageText:
-//
-// The operation cannot be performed because the device interface has been removed from the system.
-//
- SPAPI_E_DEVICE_INTERFACE_REMOVED = HRESULT($800F021C);
- {$EXTERNALSYM SPAPI_E_DEVICE_INTERFACE_REMOVED}
-
-//
-// MessageId: SPAPI_E_BAD_INTERFACE_INSTALLSECT
-//
-// MessageText:
-//
-// An interface installation section in this INF is invalid.
-//
- SPAPI_E_BAD_INTERFACE_INSTALLSECT = HRESULT($800F021D);
- {$EXTERNALSYM SPAPI_E_BAD_INTERFACE_INSTALLSECT}
-
-//
-// MessageId: SPAPI_E_NO_SUCH_INTERFACE_CLASS
-//
-// MessageText:
-//
-// This interface class does not exist in the system.
-//
- SPAPI_E_NO_SUCH_INTERFACE_CLASS = HRESULT($800F021E);
- {$EXTERNALSYM SPAPI_E_NO_SUCH_INTERFACE_CLASS}
-
-//
-// MessageId: SPAPI_E_INVALID_REFERENCE_STRING
-//
-// MessageText:
-//
-// The reference string supplied for this interface device is invalid.
-//
- SPAPI_E_INVALID_REFERENCE_STRING = HRESULT($800F021F);
- {$EXTERNALSYM SPAPI_E_INVALID_REFERENCE_STRING}
-
-//
-// MessageId: SPAPI_E_INVALID_MACHINENAME
-//
-// MessageText:
-//
-// The specified machine name does not conform to UNC naming conventions.
-//
- SPAPI_E_INVALID_MACHINENAME = HRESULT($800F0220);
- {$EXTERNALSYM SPAPI_E_INVALID_MACHINENAME}
-
-//
-// MessageId: SPAPI_E_REMOTE_COMM_FAILURE
-//
-// MessageText:
-//
-// A general remote communication error occurred.
-//
- SPAPI_E_REMOTE_COMM_FAILURE = HRESULT($800F0221);
- {$EXTERNALSYM SPAPI_E_REMOTE_COMM_FAILURE}
-
-//
-// MessageId: SPAPI_E_MACHINE_UNAVAILABLE
-//
-// MessageText:
-//
-// The machine selected for remote communication is not available at this time.
-//
- SPAPI_E_MACHINE_UNAVAILABLE = HRESULT($800F0222);
- {$EXTERNALSYM SPAPI_E_MACHINE_UNAVAILABLE}
-
-//
-// MessageId: SPAPI_E_NO_CONFIGMGR_SERVICES
-//
-// MessageText:
-//
-// The Plug and Play service is not available on the remote machine.
-//
- SPAPI_E_NO_CONFIGMGR_SERVICES = HRESULT($800F0223);
- {$EXTERNALSYM SPAPI_E_NO_CONFIGMGR_SERVICES}
-
-//
-// MessageId: SPAPI_E_INVALID_PROPPAGE_PROVIDER
-//
-// MessageText:
-//
-// The property page provider registry entry is invalid.
-//
- SPAPI_E_INVALID_PROPPAGE_PROVIDER = HRESULT($800F0224);
- {$EXTERNALSYM SPAPI_E_INVALID_PROPPAGE_PROVIDER}
-
-//
-// MessageId: SPAPI_E_NO_SUCH_DEVICE_INTERFACE
-//
-// MessageText:
-//
-// The requested device interface is not present in the system.
-//
- SPAPI_E_NO_SUCH_DEVICE_INTERFACE = HRESULT($800F0225);
- {$EXTERNALSYM SPAPI_E_NO_SUCH_DEVICE_INTERFACE}
-
-//
-// MessageId: SPAPI_E_DI_POSTPROCESSING_REQUIRED
-//
-// MessageText:
-//
-// The device's co-installer has additional work to perform after installation is complete.
-//
- SPAPI_E_DI_POSTPROCESSING_REQUIRED = HRESULT($800F0226);
- {$EXTERNALSYM SPAPI_E_DI_POSTPROCESSING_REQUIRED}
-
-//
-// MessageId: SPAPI_E_INVALID_COINSTALLER
-//
-// MessageText:
-//
-// The device's co-installer is invalid.
-//
- SPAPI_E_INVALID_COINSTALLER = HRESULT($800F0227);
- {$EXTERNALSYM SPAPI_E_INVALID_COINSTALLER}
-
-//
-// MessageId: SPAPI_E_NO_COMPAT_DRIVERS
-//
-// MessageText:
-//
-// There are no compatible drivers for this device.
-//
- SPAPI_E_NO_COMPAT_DRIVERS = HRESULT($800F0228);
- {$EXTERNALSYM SPAPI_E_NO_COMPAT_DRIVERS}
-
-//
-// MessageId: SPAPI_E_NO_DEVICE_ICON
-//
-// MessageText:
-//
-// There is no icon that represents this device or device type.
-//
- SPAPI_E_NO_DEVICE_ICON = HRESULT($800F0229);
- {$EXTERNALSYM SPAPI_E_NO_DEVICE_ICON}
-
-//
-// MessageId: SPAPI_E_INVALID_INF_LOGCONFIG
-//
-// MessageText:
-//
-// A logical configuration specified in this INF is invalid.
-//
- SPAPI_E_INVALID_INF_LOGCONFIG = HRESULT($800F022A);
- {$EXTERNALSYM SPAPI_E_INVALID_INF_LOGCONFIG}
-
-//
-// MessageId: SPAPI_E_DI_DONT_INSTALL
-//
-// MessageText:
-//
-// The class installer has denied the request to install or upgrade this device.
-//
- SPAPI_E_DI_DONT_INSTALL = HRESULT($800F022B);
- {$EXTERNALSYM SPAPI_E_DI_DONT_INSTALL}
-
-//
-// MessageId: SPAPI_E_INVALID_FILTER_DRIVER
-//
-// MessageText:
-//
-// One of the filter drivers installed for this device is invalid.
-//
- SPAPI_E_INVALID_FILTER_DRIVER = HRESULT($800F022C);
- {$EXTERNALSYM SPAPI_E_INVALID_FILTER_DRIVER}
-
-//
-// MessageId: SPAPI_E_NON_WINDOWS_NT_DRIVER
-//
-// MessageText:
-//
-// The driver selected for this device does not support Windows XP.
-//
- SPAPI_E_NON_WINDOWS_NT_DRIVER = HRESULT($800F022D);
- {$EXTERNALSYM SPAPI_E_NON_WINDOWS_NT_DRIVER}
-
-//
-// MessageId: SPAPI_E_NON_WINDOWS_DRIVER
-//
-// MessageText:
-//
-// The driver selected for this device does not support Windows.
-//
- SPAPI_E_NON_WINDOWS_DRIVER = HRESULT($800F022E);
- {$EXTERNALSYM SPAPI_E_NON_WINDOWS_DRIVER}
-
-//
-// MessageId: SPAPI_E_NO_CATALOG_FOR_OEM_INF
-//
-// MessageText:
-//
-// The third-party INF does not contain digital signature information.
-//
- SPAPI_E_NO_CATALOG_FOR_OEM_INF = HRESULT($800F022F);
- {$EXTERNALSYM SPAPI_E_NO_CATALOG_FOR_OEM_INF}
-
-//
-// MessageId: SPAPI_E_DEVINSTALL_QUEUE_NONNATIVE
-//
-// MessageText:
-//
-// An invalid attempt was made to use a device installation file queue for verification of digital signatures relative to other platforms.
-//
- SPAPI_E_DEVINSTALL_QUEUE_NONNATIVE = HRESULT($800F0230);
- {$EXTERNALSYM SPAPI_E_DEVINSTALL_QUEUE_NONNATIVE}
-
-//
-// MessageId: SPAPI_E_NOT_DISABLEABLE
-//
-// MessageText:
-//
-// The device cannot be disabled.
-//
- SPAPI_E_NOT_DISABLEABLE = HRESULT($800F0231);
- {$EXTERNALSYM SPAPI_E_NOT_DISABLEABLE}
-
-//
-// MessageId: SPAPI_E_CANT_REMOVE_DEVINST
-//
-// MessageText:
-//
-// The device could not be dynamically removed.
-//
- SPAPI_E_CANT_REMOVE_DEVINST = HRESULT($800F0232);
- {$EXTERNALSYM SPAPI_E_CANT_REMOVE_DEVINST}
-
-//
-// MessageId: SPAPI_E_INVALID_TARGET
-//
-// MessageText:
-//
-// Cannot copy to specified target.
-//
- SPAPI_E_INVALID_TARGET = HRESULT($800F0233);
- {$EXTERNALSYM SPAPI_E_INVALID_TARGET}
-
-//
-// MessageId: SPAPI_E_DRIVER_NONNATIVE
-//
-// MessageText:
-//
-// Driver is not intended for this platform.
-//
- SPAPI_E_DRIVER_NONNATIVE = HRESULT($800F0234);
- {$EXTERNALSYM SPAPI_E_DRIVER_NONNATIVE}
-
-//
-// MessageId: SPAPI_E_IN_WOW64
-//
-// MessageText:
-//
-// Operation not allowed in WOW64.
-//
- SPAPI_E_IN_WOW64 = HRESULT($800F0235);
- {$EXTERNALSYM SPAPI_E_IN_WOW64}
-
-//
-// MessageId: SPAPI_E_SET_SYSTEM_RESTORE_POINT
-//
-// MessageText:
-//
-// The operation involving unsigned file copying was rolled back, so that a system restore point could be set.
-//
- SPAPI_E_SET_SYSTEM_RESTORE_POINT = HRESULT($800F0236);
- {$EXTERNALSYM SPAPI_E_SET_SYSTEM_RESTORE_POINT}
-
-//
-// MessageId: SPAPI_E_INCORRECTLY_COPIED_INF
-//
-// MessageText:
-//
-// An INF was copied into the Windows INF directory in an improper manner.
-//
- SPAPI_E_INCORRECTLY_COPIED_INF = HRESULT($800F0237);
- {$EXTERNALSYM SPAPI_E_INCORRECTLY_COPIED_INF}
-
-//
-// MessageId: SPAPI_E_SCE_DISABLED
-//
-// MessageText:
-//
-// The Security Configuration Editor (SCE) APIs have been disabled on this Embedded product.
-//
- SPAPI_E_SCE_DISABLED = HRESULT($800F0238);
- {$EXTERNALSYM SPAPI_E_SCE_DISABLED}
-
-//
-// MessageId: SPAPI_E_UNKNOWN_EXCEPTION
-//
-// MessageText:
-//
-// An unknown exception was encountered.
-//
- SPAPI_E_UNKNOWN_EXCEPTION = HRESULT($800F0239);
- {$EXTERNALSYM SPAPI_E_UNKNOWN_EXCEPTION}
-
-//
-// MessageId: SPAPI_E_PNP_REGISTRY_ERROR
-//
-// MessageText:
-//
-// A problem was encountered when accessing the Plug and Play registry database.
-//
- SPAPI_E_PNP_REGISTRY_ERROR = HRESULT($800F023A);
- {$EXTERNALSYM SPAPI_E_PNP_REGISTRY_ERROR}
-
-//
-// MessageId: SPAPI_E_REMOTE_REQUEST_UNSUPPORTED
-//
-// MessageText:
-//
-// The requested operation is not supported for a remote machine.
-//
- SPAPI_E_REMOTE_REQUEST_UNSUPPORTED = HRESULT($800F023B);
- {$EXTERNALSYM SPAPI_E_REMOTE_REQUEST_UNSUPPORTED}
-
-//
-// MessageId: SPAPI_E_NOT_AN_INSTALLED_OEM_INF
-//
-// MessageText:
-//
-// The specified file is not an installed OEM INF.
-//
- SPAPI_E_NOT_AN_INSTALLED_OEM_INF = HRESULT($800F023C);
- {$EXTERNALSYM SPAPI_E_NOT_AN_INSTALLED_OEM_INF}
-
-//
-// MessageId: SPAPI_E_INF_IN_USE_BY_DEVICES
-//
-// MessageText:
-//
-// One or more devices are presently installed using the specified INF.
-//
- SPAPI_E_INF_IN_USE_BY_DEVICES = HRESULT($800F023D);
- {$EXTERNALSYM SPAPI_E_INF_IN_USE_BY_DEVICES}
-
-//
-// MessageId: SPAPI_E_DI_FUNCTION_OBSOLETE
-//
-// MessageText:
-//
-// The requested device install operation is obsolete.
-//
- SPAPI_E_DI_FUNCTION_OBSOLETE = HRESULT($800F023E);
- {$EXTERNALSYM SPAPI_E_DI_FUNCTION_OBSOLETE}
-
-//
-// MessageId: SPAPI_E_NO_AUTHENTICODE_CATALOG
-//
-// MessageText:
-//
-// A file could not be verified because it does not have an associated catalog signed via Authenticode(tm).
-//
- SPAPI_E_NO_AUTHENTICODE_CATALOG = HRESULT($800F023F);
- {$EXTERNALSYM SPAPI_E_NO_AUTHENTICODE_CATALOG}
-
-//
-// MessageId: SPAPI_E_AUTHENTICODE_DISALLOWED
-//
-// MessageText:
-//
-// Authenticode(tm) signature verification is not supported for the specified INF.
-//
- SPAPI_E_AUTHENTICODE_DISALLOWED = HRESULT($800F0240);
- {$EXTERNALSYM SPAPI_E_AUTHENTICODE_DISALLOWED}
-
-//
-// MessageId: SPAPI_E_AUTHENTICODE_TRUSTED_PUBLISHER
-//
-// MessageText:
-//
-// The INF was signed with an Authenticode(tm) catalog from a trusted publisher.
-//
- SPAPI_E_AUTHENTICODE_TRUSTED_PUBLISHER = HRESULT($800F0241);
- {$EXTERNALSYM SPAPI_E_AUTHENTICODE_TRUSTED_PUBLISHER}
-
-//
-// MessageId: SPAPI_E_AUTHENTICODE_TRUST_NOT_ESTABLISHED
-//
-// MessageText:
-//
-// The publisher of an Authenticode(tm) signed catalog has not yet been established as trusted.
-//
- SPAPI_E_AUTHENTICODE_TRUST_NOT_ESTABLISHED = HRESULT($800F0242);
- {$EXTERNALSYM SPAPI_E_AUTHENTICODE_TRUST_NOT_ESTABLISHED}
-
-//
-// MessageId: SPAPI_E_AUTHENTICODE_PUBLISHER_NOT_TRUSTED
-//
-// MessageText:
-//
-// The publisher of an Authenticode(tm) signed catalog was not established as trusted.
-//
- SPAPI_E_AUTHENTICODE_PUBLISHER_NOT_TRUSTED = HRESULT($800F0243);
- {$EXTERNALSYM SPAPI_E_AUTHENTICODE_PUBLISHER_NOT_TRUSTED}
-
-//
-// MessageId: SPAPI_E_SIGNATURE_OSATTRIBUTE_MISMATCH
-//
-// MessageText:
-//
-// The software was tested for compliance with Windows Logo requirements on a different version of Windows, and may not be compatible with this version.
-//
- SPAPI_E_SIGNATURE_OSATTRIBUTE_MISMATCH = HRESULT($800F0244);
- {$EXTERNALSYM SPAPI_E_SIGNATURE_OSATTRIBUTE_MISMATCH}
-
-//
-// MessageId: SPAPI_E_ONLY_VALIDATE_VIA_AUTHENTICODE
-//
-// MessageText:
-//
-// The file may only be validated by a catalog signed via Authenticode(tm).
-//
- SPAPI_E_ONLY_VALIDATE_VIA_AUTHENTICODE = HRESULT($800F0245);
- {$EXTERNALSYM SPAPI_E_ONLY_VALIDATE_VIA_AUTHENTICODE}
-
-//
-// MessageId: SPAPI_E_UNRECOVERABLE_STACK_OVERFLOW
-//
-// MessageText:
-//
-// An unrecoverable stack overflow was encountered.
-//
- SPAPI_E_UNRECOVERABLE_STACK_OVERFLOW = HRESULT($800F0300);
- {$EXTERNALSYM SPAPI_E_UNRECOVERABLE_STACK_OVERFLOW}
-
-//
-// MessageId: SPAPI_E_ERROR_NOT_INSTALLED
-//
-// MessageText:
-//
-// No installed components were detected.
-//
- SPAPI_E_ERROR_NOT_INSTALLED = HRESULT($800F1000);
- {$EXTERNALSYM SPAPI_E_ERROR_NOT_INSTALLED}
-
-// *****************
-// FACILITY_SCARD
-// *****************
-//
-// =============================
-// Facility SCARD Error Messages
-// =============================
-//
- SCARD_S_SUCCESS = NO_ERROR;
- {$EXTERNALSYM SCARD_S_SUCCESS}
-//
-// MessageId: SCARD_F_INTERNAL_ERROR
-//
-// MessageText:
-//
-// An internal consistency check failed.
-//
- SCARD_F_INTERNAL_ERROR = HRESULT($80100001);
- {$EXTERNALSYM SCARD_F_INTERNAL_ERROR}
-
-//
-// MessageId: SCARD_E_CANCELLED
-//
-// MessageText:
-//
-// The action was cancelled by an SCardCancel request.
-//
- SCARD_E_CANCELLED = HRESULT($80100002);
- {$EXTERNALSYM SCARD_E_CANCELLED}
-
-//
-// MessageId: SCARD_E_INVALID_HANDLE
-//
-// MessageText:
-//
-// The supplied handle was invalid.
-//
- SCARD_E_INVALID_HANDLE = HRESULT($80100003);
- {$EXTERNALSYM SCARD_E_INVALID_HANDLE}
-
-//
-// MessageId: SCARD_E_INVALID_PARAMETER
-//
-// MessageText:
-//
-// One or more of the supplied parameters could not be properly interpreted.
-//
- SCARD_E_INVALID_PARAMETER = HRESULT($80100004);
- {$EXTERNALSYM SCARD_E_INVALID_PARAMETER}
-
-//
-// MessageId: SCARD_E_INVALID_TARGET
-//
-// MessageText:
-//
-// Registry startup information is missing or invalid.
-//
- SCARD_E_INVALID_TARGET = HRESULT($80100005);
- {$EXTERNALSYM SCARD_E_INVALID_TARGET}
-
-//
-// MessageId: SCARD_E_NO_MEMORY
-//
-// MessageText:
-//
-// Not enough memory available to complete this command.
-//
- SCARD_E_NO_MEMORY = HRESULT($80100006);
- {$EXTERNALSYM SCARD_E_NO_MEMORY}
-
-//
-// MessageId: SCARD_F_WAITED_TOO_LONG
-//
-// MessageText:
-//
-// An internal consistency timer has expired.
-//
- SCARD_F_WAITED_TOO_LONG = HRESULT($80100007);
- {$EXTERNALSYM SCARD_F_WAITED_TOO_LONG}
-
-//
-// MessageId: SCARD_E_INSUFFICIENT_BUFFER
-//
-// MessageText:
-//
-// The data buffer to receive returned data is too small for the returned data.
-//
- SCARD_E_INSUFFICIENT_BUFFER = HRESULT($80100008);
- {$EXTERNALSYM SCARD_E_INSUFFICIENT_BUFFER}
-
-//
-// MessageId: SCARD_E_UNKNOWN_READER
-//
-// MessageText:
-//
-// The specified reader name is not recognized.
-//
- SCARD_E_UNKNOWN_READER = HRESULT($80100009);
- {$EXTERNALSYM SCARD_E_UNKNOWN_READER}
-
-//
-// MessageId: SCARD_E_TIMEOUT
-//
-// MessageText:
-//
-// The user-specified timeout value has expired.
-//
- SCARD_E_TIMEOUT = HRESULT($8010000A);
- {$EXTERNALSYM SCARD_E_TIMEOUT}
-
-//
-// MessageId: SCARD_E_SHARING_VIOLATION
-//
-// MessageText:
-//
-// The smart card cannot be accessed because of other connections outstanding.
-//
- SCARD_E_SHARING_VIOLATION = HRESULT($8010000B);
- {$EXTERNALSYM SCARD_E_SHARING_VIOLATION}
-
-//
-// MessageId: SCARD_E_NO_SMARTCARD
-//
-// MessageText:
-//
-// The operation requires a Smart Card, but no Smart Card is currently in the device.
-//
- SCARD_E_NO_SMARTCARD = HRESULT($8010000C);
- {$EXTERNALSYM SCARD_E_NO_SMARTCARD}
-
-//
-// MessageId: SCARD_E_UNKNOWN_CARD
-//
-// MessageText:
-//
-// The specified smart card name is not recognized.
-//
- SCARD_E_UNKNOWN_CARD = HRESULT($8010000D);
- {$EXTERNALSYM SCARD_E_UNKNOWN_CARD}
-
-//
-// MessageId: SCARD_E_CANT_DISPOSE
-//
-// MessageText:
-//
-// The system could not dispose of the media in the requested manner.
-//
- SCARD_E_CANT_DISPOSE = HRESULT($8010000E);
- {$EXTERNALSYM SCARD_E_CANT_DISPOSE}
-
-//
-// MessageId: SCARD_E_PROTO_MISMATCH
-//
-// MessageText:
-//
-// The requested protocols are incompatible with the protocol currently in use with the smart card.
-//
- SCARD_E_PROTO_MISMATCH = HRESULT($8010000F);
- {$EXTERNALSYM SCARD_E_PROTO_MISMATCH}
-
-//
-// MessageId: SCARD_E_NOT_READY
-//
-// MessageText:
-//
-// The reader or smart card is not ready to accept commands.
-//
- SCARD_E_NOT_READY = HRESULT($80100010);
- {$EXTERNALSYM SCARD_E_NOT_READY}
-
-//
-// MessageId: SCARD_E_INVALID_VALUE
-//
-// MessageText:
-//
-// One or more of the supplied parameters values could not be properly interpreted.
-//
- SCARD_E_INVALID_VALUE = HRESULT($80100011);
- {$EXTERNALSYM SCARD_E_INVALID_VALUE}
-
-//
-// MessageId: SCARD_E_SYSTEM_CANCELLED
-//
-// MessageText:
-//
-// The action was cancelled by the system, presumably to log off or shut down.
-//
- SCARD_E_SYSTEM_CANCELLED = HRESULT($80100012);
- {$EXTERNALSYM SCARD_E_SYSTEM_CANCELLED}
-
-//
-// MessageId: SCARD_F_COMM_ERROR
-//
-// MessageText:
-//
-// An internal communications error has been detected.
-//
- SCARD_F_COMM_ERROR = HRESULT($80100013);
- {$EXTERNALSYM SCARD_F_COMM_ERROR}
-
-//
-// MessageId: SCARD_F_UNKNOWN_ERROR
-//
-// MessageText:
-//
-// An internal error has been detected, but the source is unknown.
-//
- SCARD_F_UNKNOWN_ERROR = HRESULT($80100014);
- {$EXTERNALSYM SCARD_F_UNKNOWN_ERROR}
-
-//
-// MessageId: SCARD_E_INVALID_ATR
-//
-// MessageText:
-//
-// An ATR obtained from the registry is not a valid ATR string.
-//
- SCARD_E_INVALID_ATR = HRESULT($80100015);
- {$EXTERNALSYM SCARD_E_INVALID_ATR}
-
-//
-// MessageId: SCARD_E_NOT_TRANSACTED
-//
-// MessageText:
-//
-// An attempt was made to end a non-existent transaction.
-//
- SCARD_E_NOT_TRANSACTED = HRESULT($80100016);
- {$EXTERNALSYM SCARD_E_NOT_TRANSACTED}
-
-//
-// MessageId: SCARD_E_READER_UNAVAILABLE
-//
-// MessageText:
-//
-// The specified reader is not currently available for use.
-//
- SCARD_E_READER_UNAVAILABLE = HRESULT($80100017);
- {$EXTERNALSYM SCARD_E_READER_UNAVAILABLE}
-
-//
-// MessageId: SCARD_P_SHUTDOWN
-//
-// MessageText:
-//
-// The operation has been aborted to allow the server application to exit.
-//
- SCARD_P_SHUTDOWN = HRESULT($80100018);
- {$EXTERNALSYM SCARD_P_SHUTDOWN}
-
-//
-// MessageId: SCARD_E_PCI_TOO_SMALL
-//
-// MessageText:
-//
-// The PCI Receive buffer was too small.
-//
- SCARD_E_PCI_TOO_SMALL = HRESULT($80100019);
- {$EXTERNALSYM SCARD_E_PCI_TOO_SMALL}
-
-//
-// MessageId: SCARD_E_READER_UNSUPPORTED
-//
-// MessageText:
-//
-// The reader driver does not meet minimal requirements for support.
-//
- SCARD_E_READER_UNSUPPORTED = HRESULT($8010001A);
- {$EXTERNALSYM SCARD_E_READER_UNSUPPORTED}
-
-//
-// MessageId: SCARD_E_DUPLICATE_READER
-//
-// MessageText:
-//
-// The reader driver did not produce a unique reader name.
-//
- SCARD_E_DUPLICATE_READER = HRESULT($8010001B);
- {$EXTERNALSYM SCARD_E_DUPLICATE_READER}
-
-//
-// MessageId: SCARD_E_CARD_UNSUPPORTED
-//
-// MessageText:
-//
-// The smart card does not meet minimal requirements for support.
-//
- SCARD_E_CARD_UNSUPPORTED = HRESULT($8010001C);
- {$EXTERNALSYM SCARD_E_CARD_UNSUPPORTED}
-
-//
-// MessageId: SCARD_E_NO_SERVICE
-//
-// MessageText:
-//
-// The Smart card resource manager is not running.
-//
- SCARD_E_NO_SERVICE = HRESULT($8010001D);
- {$EXTERNALSYM SCARD_E_NO_SERVICE}
-
-//
-// MessageId: SCARD_E_SERVICE_STOPPED
-//
-// MessageText:
-//
-// The Smart card resource manager has shut down.
-//
- SCARD_E_SERVICE_STOPPED = HRESULT($8010001E);
- {$EXTERNALSYM SCARD_E_SERVICE_STOPPED}
-
-//
-// MessageId: SCARD_E_UNEXPECTED
-//
-// MessageText:
-//
-// An unexpected card error has occurred.
-//
- SCARD_E_UNEXPECTED = HRESULT($8010001F);
- {$EXTERNALSYM SCARD_E_UNEXPECTED}
-
-//
-// MessageId: SCARD_E_ICC_INSTALLATION
-//
-// MessageText:
-//
-// No Primary Provider can be found for the smart card.
-//
- SCARD_E_ICC_INSTALLATION = HRESULT($80100020);
- {$EXTERNALSYM SCARD_E_ICC_INSTALLATION}
-
-//
-// MessageId: SCARD_E_ICC_CREATEORDER
-//
-// MessageText:
-//
-// The requested order of object creation is not supported.
-//
- SCARD_E_ICC_CREATEORDER = HRESULT($80100021);
- {$EXTERNALSYM SCARD_E_ICC_CREATEORDER}
-
-//
-// MessageId: SCARD_E_UNSUPPORTED_FEATURE
-//
-// MessageText:
-//
-// This smart card does not support the requested feature.
-//
- SCARD_E_UNSUPPORTED_FEATURE = HRESULT($80100022);
- {$EXTERNALSYM SCARD_E_UNSUPPORTED_FEATURE}
-
-//
-// MessageId: SCARD_E_DIR_NOT_FOUND
-//
-// MessageText:
-//
-// The identified directory does not exist in the smart card.
-//
- SCARD_E_DIR_NOT_FOUND = HRESULT($80100023);
- {$EXTERNALSYM SCARD_E_DIR_NOT_FOUND}
-
-//
-// MessageId: SCARD_E_FILE_NOT_FOUND
-//
-// MessageText:
-//
-// The identified file does not exist in the smart card.
-//
- SCARD_E_FILE_NOT_FOUND = HRESULT($80100024);
- {$EXTERNALSYM SCARD_E_FILE_NOT_FOUND}
-
-//
-// MessageId: SCARD_E_NO_DIR
-//
-// MessageText:
-//
-// The supplied path does not represent a smart card directory.
-//
- SCARD_E_NO_DIR = HRESULT($80100025);
- {$EXTERNALSYM SCARD_E_NO_DIR}
-
-//
-// MessageId: SCARD_E_NO_FILE
-//
-// MessageText:
-//
-// The supplied path does not represent a smart card file.
-//
- SCARD_E_NO_FILE = HRESULT($80100026);
- {$EXTERNALSYM SCARD_E_NO_FILE}
-
-//
-// MessageId: SCARD_E_NO_ACCESS
-//
-// MessageText:
-//
-// Access is denied to this file.
-//
- SCARD_E_NO_ACCESS = HRESULT($80100027);
- {$EXTERNALSYM SCARD_E_NO_ACCESS}
-
-//
-// MessageId: SCARD_E_WRITE_TOO_MANY
-//
-// MessageText:
-//
-// The smartcard does not have enough memory to store the information.
-//
- SCARD_E_WRITE_TOO_MANY = HRESULT($80100028);
- {$EXTERNALSYM SCARD_E_WRITE_TOO_MANY}
-
-//
-// MessageId: SCARD_E_BAD_SEEK
-//
-// MessageText:
-//
-// There was an error trying to set the smart card file object pointer.
-//
- SCARD_E_BAD_SEEK = HRESULT($80100029);
- {$EXTERNALSYM SCARD_E_BAD_SEEK}
-
-//
-// MessageId: SCARD_E_INVALID_CHV
-//
-// MessageText:
-//
-// The supplied PIN is incorrect.
-//
- SCARD_E_INVALID_CHV = HRESULT($8010002A);
- {$EXTERNALSYM SCARD_E_INVALID_CHV}
-
-//
-// MessageId: SCARD_E_UNKNOWN_RES_MNG
-//
-// MessageText:
-//
-// An unrecognized error code was returned from a layered component.
-//
- SCARD_E_UNKNOWN_RES_MNG = HRESULT($8010002B);
- {$EXTERNALSYM SCARD_E_UNKNOWN_RES_MNG}
-
-//
-// MessageId: SCARD_E_NO_SUCH_CERTIFICATE
-//
-// MessageText:
-//
-// The requested certificate does not exist.
-//
- SCARD_E_NO_SUCH_CERTIFICATE = HRESULT($8010002C);
- {$EXTERNALSYM SCARD_E_NO_SUCH_CERTIFICATE}
-
-//
-// MessageId: SCARD_E_CERTIFICATE_UNAVAILABLE
-//
-// MessageText:
-//
-// The requested certificate could not be obtained.
-//
- SCARD_E_CERTIFICATE_UNAVAILABLE = HRESULT($8010002D);
- {$EXTERNALSYM SCARD_E_CERTIFICATE_UNAVAILABLE}
-
-//
-// MessageId: SCARD_E_NO_READERS_AVAILABLE
-//
-// MessageText:
-//
-// Cannot find a smart card reader.
-//
- SCARD_E_NO_READERS_AVAILABLE = HRESULT($8010002E);
- {$EXTERNALSYM SCARD_E_NO_READERS_AVAILABLE}
-
-//
-// MessageId: SCARD_E_COMM_DATA_LOST
-//
-// MessageText:
-//
-// A communications error with the smart card has been detected. Retry the operation.
-//
- SCARD_E_COMM_DATA_LOST = HRESULT($8010002F);
- {$EXTERNALSYM SCARD_E_COMM_DATA_LOST}
-
-//
-// MessageId: SCARD_E_NO_KEY_CONTAINER
-//
-// MessageText:
-//
-// The requested key container does not exist on the smart card.
-//
- SCARD_E_NO_KEY_CONTAINER = HRESULT($80100030);
- {$EXTERNALSYM SCARD_E_NO_KEY_CONTAINER}
-
-//
-// MessageId: SCARD_E_SERVER_TOO_BUSY
-//
-// MessageText:
-//
-// The Smart card resource manager is too busy to complete this operation.
-//
- SCARD_E_SERVER_TOO_BUSY = HRESULT($80100031);
- {$EXTERNALSYM SCARD_E_SERVER_TOO_BUSY}
-
-//
-// These are warning codes.
-//
-//
-// MessageId: SCARD_W_UNSUPPORTED_CARD
-//
-// MessageText:
-//
-// The reader cannot communicate with the smart card, due to ATR configuration conflicts.
-//
- SCARD_W_UNSUPPORTED_CARD = HRESULT($80100065);
- {$EXTERNALSYM SCARD_W_UNSUPPORTED_CARD}
-
-//
-// MessageId: SCARD_W_UNRESPONSIVE_CARD
-//
-// MessageText:
-//
-// The smart card is not responding to a reset.
-//
- SCARD_W_UNRESPONSIVE_CARD = HRESULT($80100066);
- {$EXTERNALSYM SCARD_W_UNRESPONSIVE_CARD}
-
-//
-// MessageId: SCARD_W_UNPOWERED_CARD
-//
-// MessageText:
-//
-// Power has been removed from the smart card, so that further communication is not possible.
-//
- SCARD_W_UNPOWERED_CARD = HRESULT($80100067);
- {$EXTERNALSYM SCARD_W_UNPOWERED_CARD}
-
-//
-// MessageId: SCARD_W_RESET_CARD
-//
-// MessageText:
-//
-// The smart card has been reset, so any shared state information is invalid.
-//
- SCARD_W_RESET_CARD = HRESULT($80100068);
- {$EXTERNALSYM SCARD_W_RESET_CARD}
-
-//
-// MessageId: SCARD_W_REMOVED_CARD
-//
-// MessageText:
-//
-// The smart card has been removed, so that further communication is not possible.
-//
- SCARD_W_REMOVED_CARD = HRESULT($80100069);
- {$EXTERNALSYM SCARD_W_REMOVED_CARD}
-
-//
-// MessageId: SCARD_W_SECURITY_VIOLATION
-//
-// MessageText:
-//
-// Access was denied because of a security violation.
-//
- SCARD_W_SECURITY_VIOLATION = HRESULT($8010006A);
- {$EXTERNALSYM SCARD_W_SECURITY_VIOLATION}
-
-//
-// MessageId: SCARD_W_WRONG_CHV
-//
-// MessageText:
-//
-// The card cannot be accessed because the wrong PIN was presented.
-//
- SCARD_W_WRONG_CHV = HRESULT($8010006B);
- {$EXTERNALSYM SCARD_W_WRONG_CHV}
-
-//
-// MessageId: SCARD_W_CHV_BLOCKED
-//
-// MessageText:
-//
-// The card cannot be accessed because the maximum number of PIN entry attempts has been reached.
-//
- SCARD_W_CHV_BLOCKED = HRESULT($8010006C);
- {$EXTERNALSYM SCARD_W_CHV_BLOCKED}
-
-//
-// MessageId: SCARD_W_EOF
-//
-// MessageText:
-//
-// The end of the smart card file has been reached.
-//
- SCARD_W_EOF = HRESULT($8010006D);
- {$EXTERNALSYM SCARD_W_EOF}
-
-//
-// MessageId: SCARD_W_CANCELLED_BY_USER
-//
-// MessageText:
-//
-// The action was cancelled by the user.
-//
- SCARD_W_CANCELLED_BY_USER = HRESULT($8010006E);
- {$EXTERNALSYM SCARD_W_CANCELLED_BY_USER}
-
-//
-// MessageId: SCARD_W_CARD_NOT_AUTHENTICATED
-//
-// MessageText:
-//
-// No PIN was presented to the smart card.
-//
- SCARD_W_CARD_NOT_AUTHENTICATED = HRESULT($8010006F);
- {$EXTERNALSYM SCARD_W_CARD_NOT_AUTHENTICATED}
-
-// *****************
-// FACILITY_COMPLUS
-// *****************
-//
-// ===============================
-// Facility COMPLUS Error Messages
-// ===============================
-//
-//
-// The following are the subranges within the COMPLUS facility
-// 0x400 - 0x4ff COMADMIN_E_CAT
-// 0x600 - 0x6ff COMQC errors
-// 0x700 - 0x7ff MSDTC errors
-// 0x800 - 0x8ff Other COMADMIN errors
-//
-// COMPLUS Admin errors
-//
-//
-// MessageId: COMADMIN_E_OBJECTERRORS
-//
-// MessageText:
-//
-// Errors occurred accessing one or more objects - the ErrorInfo collection may have more detail
-//
- COMADMIN_E_OBJECTERRORS = HRESULT($80110401);
- {$EXTERNALSYM COMADMIN_E_OBJECTERRORS}
-
-//
-// MessageId: COMADMIN_E_OBJECTINVALID
-//
-// MessageText:
-//
-// One or more of the object's properties are missing or invalid
-//
- COMADMIN_E_OBJECTINVALID = HRESULT($80110402);
- {$EXTERNALSYM COMADMIN_E_OBJECTINVALID}
-
-//
-// MessageId: COMADMIN_E_KEYMISSING
-//
-// MessageText:
-//
-// The object was not found in the catalog
-//
- COMADMIN_E_KEYMISSING = HRESULT($80110403);
- {$EXTERNALSYM COMADMIN_E_KEYMISSING}
-
-//
-// MessageId: COMADMIN_E_ALREADYINSTALLED
-//
-// MessageText:
-//
-// The object is already registered
-//
- COMADMIN_E_ALREADYINSTALLED = HRESULT($80110404);
- {$EXTERNALSYM COMADMIN_E_ALREADYINSTALLED}
-
-//
-// MessageId: COMADMIN_E_APP_FILE_WRITEFAIL
-//
-// MessageText:
-//
-// Error occurred writing to the application file
-//
- COMADMIN_E_APP_FILE_WRITEFAIL = HRESULT($80110407);
- {$EXTERNALSYM COMADMIN_E_APP_FILE_WRITEFAIL}
-
-//
-// MessageId: COMADMIN_E_APP_FILE_READFAIL
-//
-// MessageText:
-//
-// Error occurred reading the application file
-//
- COMADMIN_E_APP_FILE_READFAIL = HRESULT($80110408);
- {$EXTERNALSYM COMADMIN_E_APP_FILE_READFAIL}
-
-//
-// MessageId: COMADMIN_E_APP_FILE_VERSION
-//
-// MessageText:
-//
-// Invalid version number in application file
-//
- COMADMIN_E_APP_FILE_VERSION = HRESULT($80110409);
- {$EXTERNALSYM COMADMIN_E_APP_FILE_VERSION}
-
-//
-// MessageId: COMADMIN_E_BADPATH
-//
-// MessageText:
-//
-// The file path is invalid
-//
- COMADMIN_E_BADPATH = HRESULT($8011040A);
- {$EXTERNALSYM COMADMIN_E_BADPATH}
-
-//
-// MessageId: COMADMIN_E_APPLICATIONEXISTS
-//
-// MessageText:
-//
-// The application is already installed
-//
- COMADMIN_E_APPLICATIONEXISTS = HRESULT($8011040B);
- {$EXTERNALSYM COMADMIN_E_APPLICATIONEXISTS}
-
-//
-// MessageId: COMADMIN_E_ROLEEXISTS
-//
-// MessageText:
-//
-// The role already exists
-//
- COMADMIN_E_ROLEEXISTS = HRESULT($8011040C);
- {$EXTERNALSYM COMADMIN_E_ROLEEXISTS}
-
-//
-// MessageId: COMADMIN_E_CANTCOPYFILE
-//
-// MessageText:
-//
-// An error occurred copying the file
-//
- COMADMIN_E_CANTCOPYFILE = HRESULT($8011040D);
- {$EXTERNALSYM COMADMIN_E_CANTCOPYFILE}
-
-//
-// MessageId: COMADMIN_E_NOUSER
-//
-// MessageText:
-//
-// One or more users are not valid
-//
- COMADMIN_E_NOUSER = HRESULT($8011040F);
- {$EXTERNALSYM COMADMIN_E_NOUSER}
-
-//
-// MessageId: COMADMIN_E_INVALIDUSERIDS
-//
-// MessageText:
-//
-// One or more users in the application file are not valid
-//
- COMADMIN_E_INVALIDUSERIDS = HRESULT($80110410);
- {$EXTERNALSYM COMADMIN_E_INVALIDUSERIDS}
-
-//
-// MessageId: COMADMIN_E_NOREGISTRYCLSID
-//
-// MessageText:
-//
-// The component's CLSID is missing or corrupt
-//
- COMADMIN_E_NOREGISTRYCLSID = HRESULT($80110411);
- {$EXTERNALSYM COMADMIN_E_NOREGISTRYCLSID}
-
-//
-// MessageId: COMADMIN_E_BADREGISTRYPROGID
-//
-// MessageText:
-//
-// The component's progID is missing or corrupt
-//
- COMADMIN_E_BADREGISTRYPROGID = HRESULT($80110412);
- {$EXTERNALSYM COMADMIN_E_BADREGISTRYPROGID}
-
-//
-// MessageId: COMADMIN_E_AUTHENTICATIONLEVEL
-//
-// MessageText:
-//
-// Unable to set required authentication level for update request
-//
- COMADMIN_E_AUTHENTICATIONLEVEL = HRESULT($80110413);
- {$EXTERNALSYM COMADMIN_E_AUTHENTICATIONLEVEL}
-
-//
-// MessageId: COMADMIN_E_USERPASSWDNOTVALID
-//
-// MessageText:
-//
-// The identity or password set on the application is not valid
-//
- COMADMIN_E_USERPASSWDNOTVALID = HRESULT($80110414);
- {$EXTERNALSYM COMADMIN_E_USERPASSWDNOTVALID}
-
-//
-// MessageId: COMADMIN_E_CLSIDORIIDMISMATCH
-//
-// MessageText:
-//
-// Application file CLSIDs or IIDs do not match corresponding DLLs
-//
- COMADMIN_E_CLSIDORIIDMISMATCH = HRESULT($80110418);
- {$EXTERNALSYM COMADMIN_E_CLSIDORIIDMISMATCH}
-
-//
-// MessageId: COMADMIN_E_REMOTEINTERFACE
-//
-// MessageText:
-//
-// Interface information is either missing or changed
-//
- COMADMIN_E_REMOTEINTERFACE = HRESULT($80110419);
- {$EXTERNALSYM COMADMIN_E_REMOTEINTERFACE}
-
-//
-// MessageId: COMADMIN_E_DLLREGISTERSERVER
-//
-// MessageText:
-//
-// DllRegisterServer failed on component install
-//
- COMADMIN_E_DLLREGISTERSERVER = HRESULT($8011041A);
- {$EXTERNALSYM COMADMIN_E_DLLREGISTERSERVER}
-
-//
-// MessageId: COMADMIN_E_NOSERVERSHARE
-//
-// MessageText:
-//
-// No server file share available
-//
- COMADMIN_E_NOSERVERSHARE = HRESULT($8011041B);
- {$EXTERNALSYM COMADMIN_E_NOSERVERSHARE}
-
-//
-// MessageId: COMADMIN_E_DLLLOADFAILED
-//
-// MessageText:
-//
-// DLL could not be loaded
-//
- COMADMIN_E_DLLLOADFAILED = HRESULT($8011041D);
- {$EXTERNALSYM COMADMIN_E_DLLLOADFAILED}
-
-//
-// MessageId: COMADMIN_E_BADREGISTRYLIBID
-//
-// MessageText:
-//
-// The registered TypeLib ID is not valid
-//
- COMADMIN_E_BADREGISTRYLIBID = HRESULT($8011041E);
- {$EXTERNALSYM COMADMIN_E_BADREGISTRYLIBID}
-
-//
-// MessageId: COMADMIN_E_APPDIRNOTFOUND
-//
-// MessageText:
-//
-// Application install directory not found
-//
- COMADMIN_E_APPDIRNOTFOUND = HRESULT($8011041F);
- {$EXTERNALSYM COMADMIN_E_APPDIRNOTFOUND}
-
-//
-// MessageId: COMADMIN_E_REGISTRARFAILED
-//
-// MessageText:
-//
-// Errors occurred while in the component registrar
-//
- COMADMIN_E_REGISTRARFAILED = HRESULT($80110423);
- {$EXTERNALSYM COMADMIN_E_REGISTRARFAILED}
-
-//
-// MessageId: COMADMIN_E_COMPFILE_DOESNOTEXIST
-//
-// MessageText:
-//
-// The file does not exist
-//
- COMADMIN_E_COMPFILE_DOESNOTEXIST = HRESULT($80110424);
- {$EXTERNALSYM COMADMIN_E_COMPFILE_DOESNOTEXIST}
-
-//
-// MessageId: COMADMIN_E_COMPFILE_LOADDLLFAIL
-//
-// MessageText:
-//
-// The DLL could not be loaded
-//
- COMADMIN_E_COMPFILE_LOADDLLFAIL = HRESULT($80110425);
- {$EXTERNALSYM COMADMIN_E_COMPFILE_LOADDLLFAIL}
-
-//
-// MessageId: COMADMIN_E_COMPFILE_GETCLASSOBJ
-//
-// MessageText:
-//
-// GetClassObject failed in the DLL
-//
- COMADMIN_E_COMPFILE_GETCLASSOBJ = HRESULT($80110426);
- {$EXTERNALSYM COMADMIN_E_COMPFILE_GETCLASSOBJ}
-
-//
-// MessageId: COMADMIN_E_COMPFILE_CLASSNOTAVAIL
-//
-// MessageText:
-//
-// The DLL does not support the components listed in the TypeLib
-//
- COMADMIN_E_COMPFILE_CLASSNOTAVAIL = HRESULT($80110427);
- {$EXTERNALSYM COMADMIN_E_COMPFILE_CLASSNOTAVAIL}
-
-//
-// MessageId: COMADMIN_E_COMPFILE_BADTLB
-//
-// MessageText:
-//
-// The TypeLib could not be loaded
-//
- COMADMIN_E_COMPFILE_BADTLB = HRESULT($80110428);
- {$EXTERNALSYM COMADMIN_E_COMPFILE_BADTLB}
-
-//
-// MessageId: COMADMIN_E_COMPFILE_NOTINSTALLABLE
-//
-// MessageText:
-//
-// The file does not contain components or component information
-//
- COMADMIN_E_COMPFILE_NOTINSTALLABLE = HRESULT($80110429);
- {$EXTERNALSYM COMADMIN_E_COMPFILE_NOTINSTALLABLE}
-
-//
-// MessageId: COMADMIN_E_NOTCHANGEABLE
-//
-// MessageText:
-//
-// Changes to this object and its sub-objects have been disabled
-//
- COMADMIN_E_NOTCHANGEABLE = HRESULT($8011042A);
- {$EXTERNALSYM COMADMIN_E_NOTCHANGEABLE}
-
-//
-// MessageId: COMADMIN_E_NOTDELETEABLE
-//
-// MessageText:
-//
-// The delete function has been disabled for this object
-//
- COMADMIN_E_NOTDELETEABLE = HRESULT($8011042B);
- {$EXTERNALSYM COMADMIN_E_NOTDELETEABLE}
-
-//
-// MessageId: COMADMIN_E_SESSION
-//
-// MessageText:
-//
-// The server catalog version is not supported
-//
- COMADMIN_E_SESSION = HRESULT($8011042C);
- {$EXTERNALSYM COMADMIN_E_SESSION}
-
-//
-// MessageId: COMADMIN_E_COMP_MOVE_LOCKED
-//
-// MessageText:
-//
-// The component move was disallowed, because the source or destination application is either a system application or currently locked against changes
-//
- COMADMIN_E_COMP_MOVE_LOCKED = HRESULT($8011042D);
- {$EXTERNALSYM COMADMIN_E_COMP_MOVE_LOCKED}
-
-//
-// MessageId: COMADMIN_E_COMP_MOVE_BAD_DEST
-//
-// MessageText:
-//
-// The component move failed because the destination application no longer exists
-//
- COMADMIN_E_COMP_MOVE_BAD_DEST = HRESULT($8011042E);
- {$EXTERNALSYM COMADMIN_E_COMP_MOVE_BAD_DEST}
-
-//
-// MessageId: COMADMIN_E_REGISTERTLB
-//
-// MessageText:
-//
-// The system was unable to register the TypeLib
-//
- COMADMIN_E_REGISTERTLB = HRESULT($80110430);
- {$EXTERNALSYM COMADMIN_E_REGISTERTLB}
-
-//
-// MessageId: COMADMIN_E_SYSTEMAPP
-//
-// MessageText:
-//
-// This operation can not be performed on the system application
-//
- COMADMIN_E_SYSTEMAPP = HRESULT($80110433);
- {$EXTERNALSYM COMADMIN_E_SYSTEMAPP}
-
-//
-// MessageId: COMADMIN_E_COMPFILE_NOREGISTRAR
-//
-// MessageText:
-//
-// The component registrar referenced in this file is not available
-//
- COMADMIN_E_COMPFILE_NOREGISTRAR = HRESULT($80110434);
- {$EXTERNALSYM COMADMIN_E_COMPFILE_NOREGISTRAR}
-
-//
-// MessageId: COMADMIN_E_COREQCOMPINSTALLED
-//
-// MessageText:
-//
-// A component in the same DLL is already installed
-//
- COMADMIN_E_COREQCOMPINSTALLED = HRESULT($80110435);
- {$EXTERNALSYM COMADMIN_E_COREQCOMPINSTALLED}
-
-//
-// MessageId: COMADMIN_E_SERVICENOTINSTALLED
-//
-// MessageText:
-//
-// The service is not installed
-//
- COMADMIN_E_SERVICENOTINSTALLED = HRESULT($80110436);
- {$EXTERNALSYM COMADMIN_E_SERVICENOTINSTALLED}
-
-//
-// MessageId: COMADMIN_E_PROPERTYSAVEFAILED
-//
-// MessageText:
-//
-// One or more property settings are either invalid or in conflict with each other
-//
- COMADMIN_E_PROPERTYSAVEFAILED = HRESULT($80110437);
- {$EXTERNALSYM COMADMIN_E_PROPERTYSAVEFAILED}
-
-//
-// MessageId: COMADMIN_E_OBJECTEXISTS
-//
-// MessageText:
-//
-// The object you are attempting to add or rename already exists
-//
- COMADMIN_E_OBJECTEXISTS = HRESULT($80110438);
- {$EXTERNALSYM COMADMIN_E_OBJECTEXISTS}
-
-//
-// MessageId: COMADMIN_E_COMPONENTEXISTS
-//
-// MessageText:
-//
-// The component already exists
-//
- COMADMIN_E_COMPONENTEXISTS = HRESULT($80110439);
- {$EXTERNALSYM COMADMIN_E_COMPONENTEXISTS}
-
-//
-// MessageId: COMADMIN_E_REGFILE_CORRUPT
-//
-// MessageText:
-//
-// The registration file is corrupt
-//
- COMADMIN_E_REGFILE_CORRUPT = HRESULT($8011043B);
- {$EXTERNALSYM COMADMIN_E_REGFILE_CORRUPT}
-
-//
-// MessageId: COMADMIN_E_PROPERTY_OVERFLOW
-//
-// MessageText:
-//
-// The property value is too large
-//
- COMADMIN_E_PROPERTY_OVERFLOW = HRESULT($8011043C);
- {$EXTERNALSYM COMADMIN_E_PROPERTY_OVERFLOW}
-
-//
-// MessageId: COMADMIN_E_NOTINREGISTRY
-//
-// MessageText:
-//
-// Object was not found in registry
-//
- COMADMIN_E_NOTINREGISTRY = HRESULT($8011043E);
- {$EXTERNALSYM COMADMIN_E_NOTINREGISTRY}
-
-//
-// MessageId: COMADMIN_E_OBJECTNOTPOOLABLE
-//
-// MessageText:
-//
-// This object is not poolable
-//
- COMADMIN_E_OBJECTNOTPOOLABLE = HRESULT($8011043F);
- {$EXTERNALSYM COMADMIN_E_OBJECTNOTPOOLABLE}
-
-//
-// MessageId: COMADMIN_E_APPLID_MATCHES_CLSID
-//
-// MessageText:
-//
-// A CLSID with the same GUID as the new application ID is already installed on this machine
-//
- COMADMIN_E_APPLID_MATCHES_CLSID = HRESULT($80110446);
- {$EXTERNALSYM COMADMIN_E_APPLID_MATCHES_CLSID}
-
-//
-// MessageId: COMADMIN_E_ROLE_DOES_NOT_EXIST
-//
-// MessageText:
-//
-// A role assigned to a component, interface, or method did not exist in the application
-//
- COMADMIN_E_ROLE_DOES_NOT_EXIST = HRESULT($80110447);
- {$EXTERNALSYM COMADMIN_E_ROLE_DOES_NOT_EXIST}
-
-//
-// MessageId: COMADMIN_E_START_APP_NEEDS_COMPONENTS
-//
-// MessageText:
-//
-// You must have components in an application in order to start the application
-//
- COMADMIN_E_START_APP_NEEDS_COMPONENTS = HRESULT($80110448);
- {$EXTERNALSYM COMADMIN_E_START_APP_NEEDS_COMPONENTS}
-
-//
-// MessageId: COMADMIN_E_REQUIRES_DIFFERENT_PLATFORM
-//
-// MessageText:
-//
-// This operation is not enabled on this platform
-//
- COMADMIN_E_REQUIRES_DIFFERENT_PLATFORM = HRESULT($80110449);
- {$EXTERNALSYM COMADMIN_E_REQUIRES_DIFFERENT_PLATFORM}
-
-//
-// MessageId: COMADMIN_E_CAN_NOT_EXPORT_APP_PROXY
-//
-// MessageText:
-//
-// Application Proxy is not exportable
-//
- COMADMIN_E_CAN_NOT_EXPORT_APP_PROXY = HRESULT($8011044A);
- {$EXTERNALSYM COMADMIN_E_CAN_NOT_EXPORT_APP_PROXY}
-
-//
-// MessageId: COMADMIN_E_CAN_NOT_START_APP
-//
-// MessageText:
-//
-// Failed to start application because it is either a library application or an application proxy
-//
- COMADMIN_E_CAN_NOT_START_APP = HRESULT($8011044B);
- {$EXTERNALSYM COMADMIN_E_CAN_NOT_START_APP}
-
-//
-// MessageId: COMADMIN_E_CAN_NOT_EXPORT_SYS_APP
-//
-// MessageText:
-//
-// System application is not exportable
-//
- COMADMIN_E_CAN_NOT_EXPORT_SYS_APP = HRESULT($8011044C);
- {$EXTERNALSYM COMADMIN_E_CAN_NOT_EXPORT_SYS_APP}
-
-//
-// MessageId: COMADMIN_E_CANT_SUBSCRIBE_TO_COMPONENT
-//
-// MessageText:
-//
-// Can not subscribe to this component (the component may have been imported)
-//
- COMADMIN_E_CANT_SUBSCRIBE_TO_COMPONENT = HRESULT($8011044D);
- {$EXTERNALSYM COMADMIN_E_CANT_SUBSCRIBE_TO_COMPONENT}
-
-//
-// MessageId: COMADMIN_E_EVENTCLASS_CANT_BE_SUBSCRIBER
-//
-// MessageText:
-//
-// An event class cannot also be a subscriber component
-//
- COMADMIN_E_EVENTCLASS_CANT_BE_SUBSCRIBER = HRESULT($8011044E);
- {$EXTERNALSYM COMADMIN_E_EVENTCLASS_CANT_BE_SUBSCRIBER}
-
-//
-// MessageId: COMADMIN_E_LIB_APP_PROXY_INCOMPATIBLE
-//
-// MessageText:
-//
-// Library applications and application proxies are incompatible
-//
- COMADMIN_E_LIB_APP_PROXY_INCOMPATIBLE = HRESULT($8011044F);
- {$EXTERNALSYM COMADMIN_E_LIB_APP_PROXY_INCOMPATIBLE}
-
-//
-// MessageId: COMADMIN_E_BASE_PARTITION_ONLY
-//
-// MessageText:
-//
-// This function is valid for the base partition only
-//
- COMADMIN_E_BASE_PARTITION_ONLY = HRESULT($80110450);
- {$EXTERNALSYM COMADMIN_E_BASE_PARTITION_ONLY}
-
-//
-// MessageId: COMADMIN_E_START_APP_DISABLED
-//
-// MessageText:
-//
-// You cannot start an application that has been disabled
-//
- COMADMIN_E_START_APP_DISABLED = HRESULT($80110451);
- {$EXTERNALSYM COMADMIN_E_START_APP_DISABLED}
-
-//
-// MessageId: COMADMIN_E_CAT_DUPLICATE_PARTITION_NAME
-//
-// MessageText:
-//
-// The specified partition name is already in use on this computer
-//
- COMADMIN_E_CAT_DUPLICATE_PARTITION_NAME = HRESULT($80110457);
- {$EXTERNALSYM COMADMIN_E_CAT_DUPLICATE_PARTITION_NAME}
-
-//
-// MessageId: COMADMIN_E_CAT_INVALID_PARTITION_NAME
-//
-// MessageText:
-//
-// The specified partition name is invalid. Check that the name contains at least one visible character
-//
- COMADMIN_E_CAT_INVALID_PARTITION_NAME = HRESULT($80110458);
- {$EXTERNALSYM COMADMIN_E_CAT_INVALID_PARTITION_NAME}
-
-//
-// MessageId: COMADMIN_E_CAT_PARTITION_IN_USE
-//
-// MessageText:
-//
-// The partition cannot be deleted because it is the default partition for one or more users
-//
- COMADMIN_E_CAT_PARTITION_IN_USE = HRESULT($80110459);
- {$EXTERNALSYM COMADMIN_E_CAT_PARTITION_IN_USE}
-
-//
-// MessageId: COMADMIN_E_FILE_PARTITION_DUPLICATE_FILES
-//
-// MessageText:
-//
-// The partition cannot be exported, because one or more components in the partition have the same file name
-//
- COMADMIN_E_FILE_PARTITION_DUPLICATE_FILES = HRESULT($8011045A);
- {$EXTERNALSYM COMADMIN_E_FILE_PARTITION_DUPLICATE_FILES}
-
-//
-// MessageId: COMADMIN_E_CAT_IMPORTED_COMPONENTS_NOT_ALLOWED
-//
-// MessageText:
-//
-// Applications that contain one or more imported components cannot be installed into a non-base partition
-//
- COMADMIN_E_CAT_IMPORTED_COMPONENTS_NOT_ALLOWED = HRESULT($8011045B);
- {$EXTERNALSYM COMADMIN_E_CAT_IMPORTED_COMPONENTS_NOT_ALLOWED}
-
-//
-// MessageId: COMADMIN_E_AMBIGUOUS_APPLICATION_NAME
-//
-// MessageText:
-//
-// The application name is not unique and cannot be resolved to an application id
-//
- COMADMIN_E_AMBIGUOUS_APPLICATION_NAME = HRESULT($8011045C);
- {$EXTERNALSYM COMADMIN_E_AMBIGUOUS_APPLICATION_NAME}
-
-//
-// MessageId: COMADMIN_E_AMBIGUOUS_PARTITION_NAME
-//
-// MessageText:
-//
-// The partition name is not unique and cannot be resolved to a partition id
-//
- COMADMIN_E_AMBIGUOUS_PARTITION_NAME = HRESULT($8011045D);
- {$EXTERNALSYM COMADMIN_E_AMBIGUOUS_PARTITION_NAME}
-
-//
-// MessageId: COMADMIN_E_REGDB_NOTINITIALIZED
-//
-// MessageText:
-//
-// The COM+ registry database has not been initialized
-//
- COMADMIN_E_REGDB_NOTINITIALIZED = HRESULT($80110472);
- {$EXTERNALSYM COMADMIN_E_REGDB_NOTINITIALIZED}
-
-//
-// MessageId: COMADMIN_E_REGDB_NOTOPEN
-//
-// MessageText:
-//
-// The COM+ registry database is not open
-//
- COMADMIN_E_REGDB_NOTOPEN = HRESULT($80110473);
- {$EXTERNALSYM COMADMIN_E_REGDB_NOTOPEN}
-
-//
-// MessageId: COMADMIN_E_REGDB_SYSTEMERR
-//
-// MessageText:
-//
-// The COM+ registry database detected a system error
-//
- COMADMIN_E_REGDB_SYSTEMERR = HRESULT($80110474);
- {$EXTERNALSYM COMADMIN_E_REGDB_SYSTEMERR}
-
-//
-// MessageId: COMADMIN_E_REGDB_ALREADYRUNNING
-//
-// MessageText:
-//
-// The COM+ registry database is already running
-//
- COMADMIN_E_REGDB_ALREADYRUNNING = HRESULT($80110475);
- {$EXTERNALSYM COMADMIN_E_REGDB_ALREADYRUNNING}
-
-//
-// MessageId: COMADMIN_E_MIG_VERSIONNOTSUPPORTED
-//
-// MessageText:
-//
-// This version of the COM+ registry database cannot be migrated
-//
- COMADMIN_E_MIG_VERSIONNOTSUPPORTED = HRESULT($80110480);
- {$EXTERNALSYM COMADMIN_E_MIG_VERSIONNOTSUPPORTED}
-
-//
-// MessageId: COMADMIN_E_MIG_SCHEMANOTFOUND
-//
-// MessageText:
-//
-// The schema version to be migrated could not be found in the COM+ registry database
-//
- COMADMIN_E_MIG_SCHEMANOTFOUND = HRESULT($80110481);
- {$EXTERNALSYM COMADMIN_E_MIG_SCHEMANOTFOUND}
-
-//
-// MessageId: COMADMIN_E_CAT_BITNESSMISMATCH
-//
-// MessageText:
-//
-// There was a type mismatch between binaries
-//
- COMADMIN_E_CAT_BITNESSMISMATCH = HRESULT($80110482);
- {$EXTERNALSYM COMADMIN_E_CAT_BITNESSMISMATCH}
-
-//
-// MessageId: COMADMIN_E_CAT_UNACCEPTABLEBITNESS
-//
-// MessageText:
-//
-// A binary of unknown or invalid type was provided
-//
- COMADMIN_E_CAT_UNACCEPTABLEBITNESS = HRESULT($80110483);
- {$EXTERNALSYM COMADMIN_E_CAT_UNACCEPTABLEBITNESS}
-
-//
-// MessageId: COMADMIN_E_CAT_WRONGAPPBITNESS
-//
-// MessageText:
-//
-// There was a type mismatch between a binary and an application
-//
- COMADMIN_E_CAT_WRONGAPPBITNESS = HRESULT($80110484);
- {$EXTERNALSYM COMADMIN_E_CAT_WRONGAPPBITNESS}
-
-//
-// MessageId: COMADMIN_E_CAT_PAUSE_RESUME_NOT_SUPPORTED
-//
-// MessageText:
-//
-// The application cannot be paused or resumed
-//
- COMADMIN_E_CAT_PAUSE_RESUME_NOT_SUPPORTED = HRESULT($80110485);
- {$EXTERNALSYM COMADMIN_E_CAT_PAUSE_RESUME_NOT_SUPPORTED}
-
-//
-// MessageId: COMADMIN_E_CAT_SERVERFAULT
-//
-// MessageText:
-//
-// The COM+ Catalog Server threw an exception during execution
-//
- COMADMIN_E_CAT_SERVERFAULT = HRESULT($80110486);
- {$EXTERNALSYM COMADMIN_E_CAT_SERVERFAULT}
-
-//
-// COMPLUS Queued component errors
-//
-//
-// MessageId: COMQC_E_APPLICATION_NOT_QUEUED
-//
-// MessageText:
-//
-// Only COM+ Applications marked "queued" can be invoked using the "queue" moniker
-//
- COMQC_E_APPLICATION_NOT_QUEUED = HRESULT($80110600);
- {$EXTERNALSYM COMQC_E_APPLICATION_NOT_QUEUED}
-
-//
-// MessageId: COMQC_E_NO_QUEUEABLE_INTERFACES
-//
-// MessageText:
-//
-// At least one interface must be marked "queued" in order to create a queued component instance with the "queue" moniker
-//
- COMQC_E_NO_QUEUEABLE_INTERFACES = HRESULT($80110601);
- {$EXTERNALSYM COMQC_E_NO_QUEUEABLE_INTERFACES}
-
-//
-// MessageId: COMQC_E_QUEUING_SERVICE_NOT_AVAILABLE
-//
-// MessageText:
-//
-// MSMQ is required for the requested operation and is not installed
-//
- COMQC_E_QUEUING_SERVICE_NOT_AVAILABLE = HRESULT($80110602);
- {$EXTERNALSYM COMQC_E_QUEUING_SERVICE_NOT_AVAILABLE}
-
-//
-// MessageId: COMQC_E_NO_IPERSISTSTREAM
-//
-// MessageText:
-//
-// Unable to marshal an interface that does not support IPersistStream
-//
- COMQC_E_NO_IPERSISTSTREAM = HRESULT($80110603);
- {$EXTERNALSYM COMQC_E_NO_IPERSISTSTREAM}
-
-//
-// MessageId: COMQC_E_BAD_MESSAGE
-//
-// MessageText:
-//
-// The message is improperly formatted or was damaged in transit
-//
- COMQC_E_BAD_MESSAGE = HRESULT($80110604);
- {$EXTERNALSYM COMQC_E_BAD_MESSAGE}
-
-//
-// MessageId: COMQC_E_UNAUTHENTICATED
-//
-// MessageText:
-//
-// An unauthenticated message was received by an application that accepts only authenticated messages
-//
- COMQC_E_UNAUTHENTICATED = HRESULT($80110605);
- {$EXTERNALSYM COMQC_E_UNAUTHENTICATED}
-
-//
-// MessageId: COMQC_E_UNTRUSTED_ENQUEUER
-//
-// MessageText:
-//
-// The message was requeued or moved by a user not in the "QC Trusted User" role
-//
- COMQC_E_UNTRUSTED_ENQUEUER = HRESULT($80110606);
- {$EXTERNALSYM COMQC_E_UNTRUSTED_ENQUEUER}
-
-//
-// The range 0x700-0x7ff is reserved for MSDTC errors.
-//
-//
-// MessageId: MSDTC_E_DUPLICATE_RESOURCE
-//
-// MessageText:
-//
-// Cannot create a duplicate resource of type Distributed Transaction Coordinator
-//
- MSDTC_E_DUPLICATE_RESOURCE = HRESULT($80110701);
- {$EXTERNALSYM MSDTC_E_DUPLICATE_RESOURCE}
-
-//
-// More COMADMIN errors from 0x8**
-//
-//
-// MessageId: COMADMIN_E_OBJECT_PARENT_MISSING
-//
-// MessageText:
-//
-// One of the objects being inserted or updated does not belong to a valid parent collection
-//
- COMADMIN_E_OBJECT_PARENT_MISSING = HRESULT($80110808);
- {$EXTERNALSYM COMADMIN_E_OBJECT_PARENT_MISSING}
-
-//
-// MessageId: COMADMIN_E_OBJECT_DOES_NOT_EXIST
-//
-// MessageText:
-//
-// One of the specified objects cannot be found
-//
- COMADMIN_E_OBJECT_DOES_NOT_EXIST = HRESULT($80110809);
- {$EXTERNALSYM COMADMIN_E_OBJECT_DOES_NOT_EXIST}
-
-//
-// MessageId: COMADMIN_E_APP_NOT_RUNNING
-//
-// MessageText:
-//
-// The specified application is not currently running
-//
- COMADMIN_E_APP_NOT_RUNNING = HRESULT($8011080A);
- {$EXTERNALSYM COMADMIN_E_APP_NOT_RUNNING}
-
-//
-// MessageId: COMADMIN_E_INVALID_PARTITION
-//
-// MessageText:
-//
-// The partition(s) specified are not valid.
-//
- COMADMIN_E_INVALID_PARTITION = HRESULT($8011080B);
- {$EXTERNALSYM COMADMIN_E_INVALID_PARTITION}
-
-//
-// MessageId: COMADMIN_E_SVCAPP_NOT_POOLABLE_OR_RECYCLABLE
-//
-// MessageText:
-//
-// COM+ applications that run as NT service may not be pooled or recycled
-//
- COMADMIN_E_SVCAPP_NOT_POOLABLE_OR_RECYCLABLE = HRESULT($8011080D);
- {$EXTERNALSYM COMADMIN_E_SVCAPP_NOT_POOLABLE_OR_RECYCLABLE}
-
-//
-// MessageId: COMADMIN_E_USER_IN_SET
-//
-// MessageText:
-//
-// One or more users are already assigned to a local partition set.
-//
- COMADMIN_E_USER_IN_SET = HRESULT($8011080E);
- {$EXTERNALSYM COMADMIN_E_USER_IN_SET}
-
-//
-// MessageId: COMADMIN_E_CANTRECYCLELIBRARYAPPS
-//
-// MessageText:
-//
-// Library applications may not be recycled.
-//
- COMADMIN_E_CANTRECYCLELIBRARYAPPS = HRESULT($8011080F);
- {$EXTERNALSYM COMADMIN_E_CANTRECYCLELIBRARYAPPS}
-
-//
-// MessageId: COMADMIN_E_CANTRECYCLESERVICEAPPS
-//
-// MessageText:
-//
-// Applications running as NT services may not be recycled.
-//
- COMADMIN_E_CANTRECYCLESERVICEAPPS = HRESULT($80110811);
- {$EXTERNALSYM COMADMIN_E_CANTRECYCLESERVICEAPPS}
-
-//
-// MessageId: COMADMIN_E_PROCESSALREADYRECYCLED
-//
-// MessageText:
-//
-// The process has already been recycled.
-//
- COMADMIN_E_PROCESSALREADYRECYCLED = HRESULT($80110812);
- {$EXTERNALSYM COMADMIN_E_PROCESSALREADYRECYCLED}
-
-//
-// MessageId: COMADMIN_E_PAUSEDPROCESSMAYNOTBERECYCLED
-//
-// MessageText:
-//
-// A paused process may not be recycled.
-//
- COMADMIN_E_PAUSEDPROCESSMAYNOTBERECYCLED = HRESULT($80110813);
- {$EXTERNALSYM COMADMIN_E_PAUSEDPROCESSMAYNOTBERECYCLED}
-
-//
-// MessageId: COMADMIN_E_CANTMAKEINPROCSERVICE
-//
-// MessageText:
-//
-// Library applications may not be NT services.
-//
- COMADMIN_E_CANTMAKEINPROCSERVICE = HRESULT($80110814);
- {$EXTERNALSYM COMADMIN_E_CANTMAKEINPROCSERVICE}
-
-//
-// MessageId: COMADMIN_E_PROGIDINUSEBYCLSID
-//
-// MessageText:
-//
-// The ProgID provided to the copy operation is invalid. The ProgID is in use by another registered CLSID.
-//
- COMADMIN_E_PROGIDINUSEBYCLSID = HRESULT($80110815);
- {$EXTERNALSYM COMADMIN_E_PROGIDINUSEBYCLSID}
-
-//
-// MessageId: COMADMIN_E_DEFAULT_PARTITION_NOT_IN_SET
-//
-// MessageText:
-//
-// The partition specified as default is not a member of the partition set.
-//
- COMADMIN_E_DEFAULT_PARTITION_NOT_IN_SET = HRESULT($80110816);
- {$EXTERNALSYM COMADMIN_E_DEFAULT_PARTITION_NOT_IN_SET}
-
-//
-// MessageId: COMADMIN_E_RECYCLEDPROCESSMAYNOTBEPAUSED
-//
-// MessageText:
-//
-// A recycled process may not be paused.
-//
- COMADMIN_E_RECYCLEDPROCESSMAYNOTBEPAUSED = HRESULT($80110817);
- {$EXTERNALSYM COMADMIN_E_RECYCLEDPROCESSMAYNOTBEPAUSED}
-
-//
-// MessageId: COMADMIN_E_PARTITION_ACCESSDENIED
-//
-// MessageText:
-//
-// Access to the specified partition is denied.
-//
- COMADMIN_E_PARTITION_ACCESSDENIED = HRESULT($80110818);
- {$EXTERNALSYM COMADMIN_E_PARTITION_ACCESSDENIED}
-
-//
-// MessageId: COMADMIN_E_PARTITION_MSI_ONLY
-//
-// MessageText:
-//
-// Only Application Files (*.MSI files) can be installed into partitions.
-//
- COMADMIN_E_PARTITION_MSI_ONLY = HRESULT($80110819);
- {$EXTERNALSYM COMADMIN_E_PARTITION_MSI_ONLY}
-
-//
-// MessageId: COMADMIN_E_LEGACYCOMPS_NOT_ALLOWED_IN_1_0_FORMAT
-//
-// MessageText:
-//
-// Applications containing one or more legacy components may not be exported to 1.0 format.
-//
- COMADMIN_E_LEGACYCOMPS_NOT_ALLOWED_IN_1_0_FORMAT = HRESULT($8011081A);
- {$EXTERNALSYM COMADMIN_E_LEGACYCOMPS_NOT_ALLOWED_IN_1_0_FORMAT}
-
-//
-// MessageId: COMADMIN_E_LEGACYCOMPS_NOT_ALLOWED_IN_NONBASE_PARTITIONS
-//
-// MessageText:
-//
-// Legacy components may not exist in non-base partitions.
-//
- COMADMIN_E_LEGACYCOMPS_NOT_ALLOWED_IN_NONBASE_PARTITIONS = HRESULT($8011081B);
- {$EXTERNALSYM COMADMIN_E_LEGACYCOMPS_NOT_ALLOWED_IN_NONBASE_PARTITIONS}
-
-//
-// MessageId: COMADMIN_E_COMP_MOVE_SOURCE
-//
-// MessageText:
-//
-// A component cannot be moved (or copied) from the System Application, an application proxy or a non-changeable application
-//
- COMADMIN_E_COMP_MOVE_SOURCE = HRESULT($8011081C);
- {$EXTERNALSYM COMADMIN_E_COMP_MOVE_SOURCE}
-
-//
-// MessageId: COMADMIN_E_COMP_MOVE_DEST
-//
-// MessageText:
-//
-// A component cannot be moved (or copied) to the System Application, an application proxy or a non-changeable application
-//
- COMADMIN_E_COMP_MOVE_DEST = HRESULT($8011081D);
- {$EXTERNALSYM COMADMIN_E_COMP_MOVE_DEST}
-
-//
-// MessageId: COMADMIN_E_COMP_MOVE_PRIVATE
-//
-// MessageText:
-//
-// A private component cannot be moved (or copied) to a library application or to the base partition
-//
- COMADMIN_E_COMP_MOVE_PRIVATE = HRESULT($8011081E);
- {$EXTERNALSYM COMADMIN_E_COMP_MOVE_PRIVATE}
-
-//
-// MessageId: COMADMIN_E_BASEPARTITION_REQUIRED_IN_SET
-//
-// MessageText:
-//
-// The Base Application Partition exists in all partition sets and cannot be removed.
-//
- COMADMIN_E_BASEPARTITION_REQUIRED_IN_SET = HRESULT($8011081F);
- {$EXTERNALSYM COMADMIN_E_BASEPARTITION_REQUIRED_IN_SET}
-
-//
-// MessageId: COMADMIN_E_CANNOT_ALIAS_EVENTCLASS
-//
-// MessageText:
-//
-// Alas, Event Class components cannot be aliased.
-//
- COMADMIN_E_CANNOT_ALIAS_EVENTCLASS = HRESULT($80110820);
- {$EXTERNALSYM COMADMIN_E_CANNOT_ALIAS_EVENTCLASS}
-
-//
-// MessageId: COMADMIN_E_PRIVATE_ACCESSDENIED
-//
-// MessageText:
-//
-// Access is denied because the component is private.
-//
- COMADMIN_E_PRIVATE_ACCESSDENIED = HRESULT($80110821);
- {$EXTERNALSYM COMADMIN_E_PRIVATE_ACCESSDENIED}
-
-//
-// MessageId: COMADMIN_E_SAFERINVALID
-//
-// MessageText:
-//
-// The specified SAFER level is invalid.
-//
- COMADMIN_E_SAFERINVALID = HRESULT($80110822);
- {$EXTERNALSYM COMADMIN_E_SAFERINVALID}
-
-//
-// MessageId: COMADMIN_E_REGISTRY_ACCESSDENIED
-//
-// MessageText:
-//
-// The specified user cannot write to the system registry
-//
- COMADMIN_E_REGISTRY_ACCESSDENIED = HRESULT($80110823);
- {$EXTERNALSYM COMADMIN_E_REGISTRY_ACCESSDENIED}
-
-//
-// MessageId: COMADMIN_E_PARTITIONS_DISABLED
-//
-// MessageText:
-//
-// COM+ partitions are currently disabled.
-//
- COMADMIN_E_PARTITIONS_DISABLED = HRESULT($80110824);
- {$EXTERNALSYM COMADMIN_E_PARTITIONS_DISABLED}
-
-implementation
-
-function SUCCEEDED(Status: HRESULT): BOOL;
-begin
- Result := Status >= 0;
-end;
-
-function FAILED(Status: HRESULT): BOOL;
-begin
- Result := Status < 0;
-end;
-
-function IS_ERROR(Status: HRESULT): BOOL;
-begin
- Result := (Status shr 31) = SEVERITY_ERROR;
-end;
-
-function HRESULT_CODE(hr: HRESULT): DWORD;
-begin
- Result := hr and $FFFF;
-end;
-
-function SCODE_CODE(sc: LONG): DWORD;
-begin
- Result := sc and $FFFF;
-end;
-
-function HRESULT_FACILITY(hr: HRESULT): DWORD;
-begin
- Result := (hr shr 16) and $1FFF;
-end;
-
-function SCODE_FACILITY(sc: LONG): DWORD;
-begin
- Result := (sc shr 16) and $1FFF;
-end;
-
-function HRESULT_SEVERITY(hr: HRESULT): DWORD;
-begin
- Result := (hr shr 31) and $1;
-end;
-
-function SCODE_SEVERITY(sc: LONG): DWORD;
-begin
- Result := (sc shr 31) and $1;
-end;
-
-function MAKE_HRESULT(sev, fac, code: DWORD): HRESULT;
-begin
- Result := HRESULT((sev shl 31) or (fac shl 16) or code);
-end;
-
-function MAKE_SCODE(sev, fac,code: DWORD): DWORD;
-begin
- Result := DWORD((sev shl 31) or (fac shl 16) or code);
-end;
-
-function __HRESULT_FROM_WIN32(x: DWORD): HRESULT;
-begin
- if HRESULT(x) <= 0 then
- Result := HRESULT(x)
- else
- Result := HRESULT((x and $0000FFFF) or (FACILITY_WIN32 shl 16) or $80000000);
-end;
-
-function HRESULT_FROM_WIN32(x: DWORD): HRESULT;
-begin
- Result := __HRESULT_FROM_WIN32(x);
-end;
-
-function HRESULT_FROM_NT(x: NTSTATUS): HRESULT;
-begin
- Result := HRESULT(x or FACILITY_NT_BIT);
-end;
-
-function HRESULT_FROM_SETUPAPI(x: DWORD): HRESULT;
-begin
- if (x and (APPLICATION_ERROR_MASK or ERROR_SEVERITY_ERROR)) =
- (APPLICATION_ERROR_MASK or ERROR_SEVERITY_ERROR) then
- Result := HRESULT((x and $0000FFFF) or (FACILITY_SETUPAPI shl 16) or $80000000)
- else
- Result := HRESULT_FROM_WIN32(x);
-end;
-
-function GetScode(hr: HRESULT): DWORD;
-begin
- Result := DWORD(hr);
-end;
-
-function ResultFromScode(sc: DWORD): HRESULT;
-begin
- Result := HRESULT(sc);
-end;
-
-function PropagateResult(hrPrevious, scBase: DWORD): HRESULT;
-begin
- Result := HRESULT(scBase);
-end;
-
-end.
+{******************************************************************************}
+{ }
+{ Windows Error Codes API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: winerror.h, released June 2000. The original Pascal }
+{ code is: WinError.pas, released December 2000. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwawinerror.pas,v 1.1 2005/04/04 07:56:11 marco Exp $
+
+unit JwaWinError;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "WinError.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaWinType;
+
+//
+// Values are 32 bit values layed out as follows:
+//
+// 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1
+// 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
+// +---+-+-+-----------------------+-------------------------------+
+// |Sev|C|R| Facility | Code |
+// +---+-+-+-----------------------+-------------------------------+
+//
+// where
+//
+// Sev - is the severity code
+//
+// 00 - Success
+// 01 - Informational
+// 10 - Warning
+// 11 - Error
+//
+// C - is the Customer code flag
+//
+// R - is a reserved bit
+//
+// Facility - is the facility code
+//
+// Code - is the facility's status code
+//
+//
+// Define the facility codes
+//
+
+const
+ FACILITY_WINDOWS_CE = 24;
+ {$EXTERNALSYM FACILITY_WINDOWS_CE}
+ FACILITY_WINDOWS = 8;
+ {$EXTERNALSYM FACILITY_WINDOWS}
+ FACILITY_URT = 19;
+ {$EXTERNALSYM FACILITY_URT}
+ FACILITY_UMI = 22;
+ {$EXTERNALSYM FACILITY_UMI}
+ FACILITY_SXS = 23;
+ {$EXTERNALSYM FACILITY_SXS}
+ FACILITY_STORAGE = 3;
+ {$EXTERNALSYM FACILITY_STORAGE}
+ FACILITY_STATE_MANAGEMENT = 34;
+ {$EXTERNALSYM FACILITY_STATE_MANAGEMENT}
+ FACILITY_SSPI = 9;
+ {$EXTERNALSYM FACILITY_SSPI}
+ FACILITY_SCARD = 16;
+ {$EXTERNALSYM FACILITY_SCARD}
+ FACILITY_SETUPAPI = 15;
+ {$EXTERNALSYM FACILITY_SETUPAPI}
+ FACILITY_SECURITY = 9;
+ {$EXTERNALSYM FACILITY_SECURITY}
+ FACILITY_RPC = 1;
+ {$EXTERNALSYM FACILITY_RPC}
+ FACILITY_WIN32 = 7;
+ {$EXTERNALSYM FACILITY_WIN32}
+ FACILITY_CONTROL = 10;
+ {$EXTERNALSYM FACILITY_CONTROL}
+ FACILITY_NULL = 0;
+ {$EXTERNALSYM FACILITY_NULL}
+ FACILITY_METADIRECTORY = 35;
+ {$EXTERNALSYM FACILITY_METADIRECTORY}
+ FACILITY_MSMQ = 14;
+ {$EXTERNALSYM FACILITY_MSMQ}
+ FACILITY_MEDIASERVER = 13;
+ {$EXTERNALSYM FACILITY_MEDIASERVER}
+ FACILITY_INTERNET = 12;
+ {$EXTERNALSYM FACILITY_INTERNET}
+ FACILITY_ITF = 4;
+ {$EXTERNALSYM FACILITY_ITF}
+ FACILITY_HTTP = 25;
+ {$EXTERNALSYM FACILITY_HTTP}
+ FACILITY_DPLAY = 21;
+ {$EXTERNALSYM FACILITY_DPLAY}
+ FACILITY_DISPATCH = 2;
+ {$EXTERNALSYM FACILITY_DISPATCH}
+ FACILITY_CONFIGURATION = 33;
+ {$EXTERNALSYM FACILITY_CONFIGURATION}
+ FACILITY_COMPLUS = 17;
+ {$EXTERNALSYM FACILITY_COMPLUS}
+ FACILITY_CERT = 11;
+ {$EXTERNALSYM FACILITY_CERT}
+ FACILITY_BACKGROUNDCOPY = 32;
+ {$EXTERNALSYM FACILITY_BACKGROUNDCOPY}
+ FACILITY_ACS = 20;
+ {$EXTERNALSYM FACILITY_ACS}
+ FACILITY_AAF = 18;
+ {$EXTERNALSYM FACILITY_AAF}
+
+//
+// Define the severity codes
+//
+
+//
+// MessageId: ERROR_SUCCESS
+//
+// MessageText:
+//
+// The operation completed successfully.
+//
+ ERROR_SUCCESS = DWORD(0);
+ {$EXTERNALSYM ERROR_SUCCESS}
+
+ NO_ERROR = DWORD(0); // dderror
+ {$EXTERNALSYM NO_ERROR}
+ SEC_E_OK = HRESULT($00000000);
+ {$EXTERNALSYM SEC_E_OK}
+
+//
+// MessageId: ERROR_INVALID_FUNCTION
+//
+// MessageText:
+//
+// Incorrect function.
+//
+ ERROR_INVALID_FUNCTION = DWORD(1); // dderror
+ {$EXTERNALSYM ERROR_INVALID_FUNCTION}
+
+//
+// MessageId: ERROR_FILE_NOT_FOUND
+//
+// MessageText:
+//
+// The system cannot find the file specified.
+//
+ ERROR_FILE_NOT_FOUND = DWORD(2);
+ {$EXTERNALSYM ERROR_FILE_NOT_FOUND}
+
+//
+// MessageId: ERROR_PATH_NOT_FOUND
+//
+// MessageText:
+//
+// The system cannot find the path specified.
+//
+ ERROR_PATH_NOT_FOUND = DWORD(3);
+ {$EXTERNALSYM ERROR_PATH_NOT_FOUND}
+
+//
+// MessageId: ERROR_TOO_MANY_OPEN_FILES
+//
+// MessageText:
+//
+// The system cannot open the file.
+//
+ ERROR_TOO_MANY_OPEN_FILES = DWORD(4);
+ {$EXTERNALSYM ERROR_TOO_MANY_OPEN_FILES}
+
+//
+// MessageId: ERROR_ACCESS_DENIED
+//
+// MessageText:
+//
+// Access is denied.
+//
+ ERROR_ACCESS_DENIED = DWORD(5);
+ {$EXTERNALSYM ERROR_ACCESS_DENIED}
+
+//
+// MessageId: ERROR_INVALID_HANDLE
+//
+// MessageText:
+//
+// The handle is invalid.
+//
+ ERROR_INVALID_HANDLE = DWORD(6);
+ {$EXTERNALSYM ERROR_INVALID_HANDLE}
+
+//
+// MessageId: ERROR_ARENA_TRASHED
+//
+// MessageText:
+//
+// The storage control blocks were destroyed.
+//
+ ERROR_ARENA_TRASHED = DWORD(7);
+ {$EXTERNALSYM ERROR_ARENA_TRASHED}
+
+//
+// MessageId: ERROR_NOT_ENOUGH_MEMORY
+//
+// MessageText:
+//
+// Not enough storage is available to process this command.
+//
+ ERROR_NOT_ENOUGH_MEMORY = DWORD(8); // dderror
+ {$EXTERNALSYM ERROR_NOT_ENOUGH_MEMORY}
+
+//
+// MessageId: ERROR_INVALID_BLOCK
+//
+// MessageText:
+//
+// The storage control block address is invalid.
+//
+ ERROR_INVALID_BLOCK = DWORD(9);
+ {$EXTERNALSYM ERROR_INVALID_BLOCK}
+
+//
+// MessageId: ERROR_BAD_ENVIRONMENT
+//
+// MessageText:
+//
+// The environment is incorrect.
+//
+ ERROR_BAD_ENVIRONMENT = DWORD(10);
+ {$EXTERNALSYM ERROR_BAD_ENVIRONMENT}
+
+//
+// MessageId: ERROR_BAD_FORMAT
+//
+// MessageText:
+//
+// An attempt was made to load a program with an incorrect format.
+//
+ ERROR_BAD_FORMAT = DWORD(11);
+ {$EXTERNALSYM ERROR_BAD_FORMAT}
+
+//
+// MessageId: ERROR_INVALID_ACCESS
+//
+// MessageText:
+//
+// The access code is invalid.
+//
+ ERROR_INVALID_ACCESS = DWORD(12);
+ {$EXTERNALSYM ERROR_INVALID_ACCESS}
+
+//
+// MessageId: ERROR_INVALID_DATA
+//
+// MessageText:
+//
+// The data is invalid.
+//
+ ERROR_INVALID_DATA = DWORD(13);
+ {$EXTERNALSYM ERROR_INVALID_DATA}
+
+//
+// MessageId: ERROR_OUTOFMEMORY
+//
+// MessageText:
+//
+// Not enough storage is available to complete this operation.
+//
+ ERROR_OUTOFMEMORY = DWORD(14);
+ {$EXTERNALSYM ERROR_OUTOFMEMORY}
+
+//
+// MessageId: ERROR_INVALID_DRIVE
+//
+// MessageText:
+//
+// The system cannot find the drive specified.
+//
+ ERROR_INVALID_DRIVE = DWORD(15);
+ {$EXTERNALSYM ERROR_INVALID_DRIVE}
+
+//
+// MessageId: ERROR_CURRENT_DIRECTORY
+//
+// MessageText:
+//
+// The directory cannot be removed.
+//
+ ERROR_CURRENT_DIRECTORY = DWORD(16);
+ {$EXTERNALSYM ERROR_CURRENT_DIRECTORY}
+
+//
+// MessageId: ERROR_NOT_SAME_DEVICE
+//
+// MessageText:
+//
+// The system cannot move the file to a different disk drive.
+//
+ ERROR_NOT_SAME_DEVICE = DWORD(17);
+ {$EXTERNALSYM ERROR_NOT_SAME_DEVICE}
+
+//
+// MessageId: ERROR_NO_MORE_FILES
+//
+// MessageText:
+//
+// There are no more files.
+//
+ ERROR_NO_MORE_FILES = DWORD(18);
+ {$EXTERNALSYM ERROR_NO_MORE_FILES}
+
+//
+// MessageId: ERROR_WRITE_PROTECT
+//
+// MessageText:
+//
+// The media is write protected.
+//
+ ERROR_WRITE_PROTECT = DWORD(19);
+ {$EXTERNALSYM ERROR_WRITE_PROTECT}
+
+//
+// MessageId: ERROR_BAD_UNIT
+//
+// MessageText:
+//
+// The system cannot find the device specified.
+//
+ ERROR_BAD_UNIT = DWORD(20);
+ {$EXTERNALSYM ERROR_BAD_UNIT}
+
+//
+// MessageId: ERROR_NOT_READY
+//
+// MessageText:
+//
+// The device is not ready.
+//
+ ERROR_NOT_READY = DWORD(21);
+ {$EXTERNALSYM ERROR_NOT_READY}
+
+//
+// MessageId: ERROR_BAD_COMMAND
+//
+// MessageText:
+//
+// The device does not recognize the command.
+//
+ ERROR_BAD_COMMAND = DWORD(22);
+ {$EXTERNALSYM ERROR_BAD_COMMAND}
+
+//
+// MessageId: ERROR_CRC
+//
+// MessageText:
+//
+// Data error (cyclic redundancy check).
+//
+ ERROR_CRC = DWORD(23);
+ {$EXTERNALSYM ERROR_CRC}
+
+//
+// MessageId: ERROR_BAD_LENGTH
+//
+// MessageText:
+//
+// The program issued a command but the command length is incorrect.
+//
+ ERROR_BAD_LENGTH = DWORD(24);
+ {$EXTERNALSYM ERROR_BAD_LENGTH}
+
+//
+// MessageId: ERROR_SEEK
+//
+// MessageText:
+//
+// The drive cannot locate a specific area or track on the disk.
+//
+ ERROR_SEEK = DWORD(25);
+ {$EXTERNALSYM ERROR_SEEK}
+
+//
+// MessageId: ERROR_NOT_DOS_DISK
+//
+// MessageText:
+//
+// The specified disk or diskette cannot be accessed.
+//
+ ERROR_NOT_DOS_DISK = DWORD(26);
+ {$EXTERNALSYM ERROR_NOT_DOS_DISK}
+
+//
+// MessageId: ERROR_SECTOR_NOT_FOUND
+//
+// MessageText:
+//
+// The drive cannot find the sector requested.
+//
+ ERROR_SECTOR_NOT_FOUND = DWORD(27);
+ {$EXTERNALSYM ERROR_SECTOR_NOT_FOUND}
+
+//
+// MessageId: ERROR_OUT_OF_PAPER
+//
+// MessageText:
+//
+// The printer is out of paper.
+//
+ ERROR_OUT_OF_PAPER = DWORD(28);
+ {$EXTERNALSYM ERROR_OUT_OF_PAPER}
+
+//
+// MessageId: ERROR_WRITE_FAULT
+//
+// MessageText:
+//
+// The system cannot write to the specified device.
+//
+ ERROR_WRITE_FAULT = DWORD(29);
+ {$EXTERNALSYM ERROR_WRITE_FAULT}
+
+//
+// MessageId: ERROR_READ_FAULT
+//
+// MessageText:
+//
+// The system cannot read from the specified device.
+//
+ ERROR_READ_FAULT = DWORD(30);
+ {$EXTERNALSYM ERROR_READ_FAULT}
+
+//
+// MessageId: ERROR_GEN_FAILURE
+//
+// MessageText:
+//
+// A device attached to the system is not functioning.
+//
+ ERROR_GEN_FAILURE = DWORD(31);
+ {$EXTERNALSYM ERROR_GEN_FAILURE}
+
+//
+// MessageId: ERROR_SHARING_VIOLATION
+//
+// MessageText:
+//
+// The process cannot access the file because it is being used by another process.
+//
+ ERROR_SHARING_VIOLATION = DWORD(32);
+ {$EXTERNALSYM ERROR_SHARING_VIOLATION}
+
+//
+// MessageId: ERROR_LOCK_VIOLATION
+//
+// MessageText:
+//
+// The process cannot access the file because another process has locked a portion of the file.
+//
+ ERROR_LOCK_VIOLATION = DWORD(33);
+ {$EXTERNALSYM ERROR_LOCK_VIOLATION}
+
+//
+// MessageId: ERROR_WRONG_DISK
+//
+// MessageText:
+//
+// The wrong diskette is in the drive.
+// Insert %2 (Volume Serial Number: %3) into drive %1.
+//
+ ERROR_WRONG_DISK = DWORD(34);
+ {$EXTERNALSYM ERROR_WRONG_DISK}
+
+//
+// MessageId: ERROR_SHARING_BUFFER_EXCEEDED
+//
+// MessageText:
+//
+// Too many files opened for sharing.
+//
+ ERROR_SHARING_BUFFER_EXCEEDED = DWORD(36);
+ {$EXTERNALSYM ERROR_SHARING_BUFFER_EXCEEDED}
+
+//
+// MessageId: ERROR_HANDLE_EOF
+//
+// MessageText:
+//
+// Reached the end of the file.
+//
+ ERROR_HANDLE_EOF = DWORD(38);
+ {$EXTERNALSYM ERROR_HANDLE_EOF}
+
+//
+// MessageId: ERROR_HANDLE_DISK_FULL
+//
+// MessageText:
+//
+// The disk is full.
+//
+ ERROR_HANDLE_DISK_FULL = DWORD(39);
+ {$EXTERNALSYM ERROR_HANDLE_DISK_FULL}
+
+//
+// MessageId: ERROR_NOT_SUPPORTED
+//
+// MessageText:
+//
+// The request is not supported.
+//
+ ERROR_NOT_SUPPORTED = DWORD(50);
+ {$EXTERNALSYM ERROR_NOT_SUPPORTED}
+
+//
+// MessageId: ERROR_REM_NOT_LIST
+//
+// MessageText:
+//
+// Windows cannot find the network path. Verify that the network path is correct and the destination computer is not busy or turned off. If Windows still cannot find the network path, contact your network administrator.
+//
+ ERROR_REM_NOT_LIST = DWORD(51);
+ {$EXTERNALSYM ERROR_REM_NOT_LIST}
+
+//
+// MessageId: ERROR_DUP_NAME
+//
+// MessageText:
+//
+// You were not connected because a duplicate name exists on the network. Go to System in Control Panel to change the computer name and try again.
+//
+ ERROR_DUP_NAME = DWORD(52);
+ {$EXTERNALSYM ERROR_DUP_NAME}
+
+//
+// MessageId: ERROR_BAD_NETPATH
+//
+// MessageText:
+//
+// The network path was not found.
+//
+ ERROR_BAD_NETPATH = DWORD(53);
+ {$EXTERNALSYM ERROR_BAD_NETPATH}
+
+//
+// MessageId: ERROR_NETWORK_BUSY
+//
+// MessageText:
+//
+// The network is busy.
+//
+ ERROR_NETWORK_BUSY = DWORD(54);
+ {$EXTERNALSYM ERROR_NETWORK_BUSY}
+
+//
+// MessageId: ERROR_DEV_NOT_EXIST
+//
+// MessageText:
+//
+// The specified network resource or device is no longer available.
+//
+ ERROR_DEV_NOT_EXIST = DWORD(55); // dderror
+ {$EXTERNALSYM ERROR_DEV_NOT_EXIST}
+
+//
+// MessageId: ERROR_TOO_MANY_CMDS
+//
+// MessageText:
+//
+// The network BIOS command limit has been reached.
+//
+ ERROR_TOO_MANY_CMDS = DWORD(56);
+ {$EXTERNALSYM ERROR_TOO_MANY_CMDS}
+
+//
+// MessageId: ERROR_ADAP_HDW_ERR
+//
+// MessageText:
+//
+// A network adapter hardware error occurred.
+//
+ ERROR_ADAP_HDW_ERR = DWORD(57);
+ {$EXTERNALSYM ERROR_ADAP_HDW_ERR}
+
+//
+// MessageId: ERROR_BAD_NET_RESP
+//
+// MessageText:
+//
+// The specified server cannot perform the requested operation.
+//
+ ERROR_BAD_NET_RESP = DWORD(58);
+ {$EXTERNALSYM ERROR_BAD_NET_RESP}
+
+//
+// MessageId: ERROR_UNEXP_NET_ERR
+//
+// MessageText:
+//
+// An unexpected network error occurred.
+//
+ ERROR_UNEXP_NET_ERR = DWORD(59);
+ {$EXTERNALSYM ERROR_UNEXP_NET_ERR}
+
+//
+// MessageId: ERROR_BAD_REM_ADAP
+//
+// MessageText:
+//
+// The remote adapter is not compatible.
+//
+ ERROR_BAD_REM_ADAP = DWORD(60);
+ {$EXTERNALSYM ERROR_BAD_REM_ADAP}
+
+//
+// MessageId: ERROR_PRINTQ_FULL
+//
+// MessageText:
+//
+// The printer queue is full.
+//
+ ERROR_PRINTQ_FULL = DWORD(61);
+ {$EXTERNALSYM ERROR_PRINTQ_FULL}
+
+//
+// MessageId: ERROR_NO_SPOOL_SPACE
+//
+// MessageText:
+//
+// Space to store the file waiting to be printed is not available on the server.
+//
+ ERROR_NO_SPOOL_SPACE = DWORD(62);
+ {$EXTERNALSYM ERROR_NO_SPOOL_SPACE}
+
+//
+// MessageId: ERROR_PRINT_CANCELLED
+//
+// MessageText:
+//
+// Your file waiting to be printed was deleted.
+//
+ ERROR_PRINT_CANCELLED = DWORD(63);
+ {$EXTERNALSYM ERROR_PRINT_CANCELLED}
+
+//
+// MessageId: ERROR_NETNAME_DELETED
+//
+// MessageText:
+//
+// The specified network name is no longer available.
+//
+ ERROR_NETNAME_DELETED = DWORD(64);
+ {$EXTERNALSYM ERROR_NETNAME_DELETED}
+
+//
+// MessageId: ERROR_NETWORK_ACCESS_DENIED
+//
+// MessageText:
+//
+// Network access is denied.
+//
+ ERROR_NETWORK_ACCESS_DENIED = DWORD(65);
+ {$EXTERNALSYM ERROR_NETWORK_ACCESS_DENIED}
+
+//
+// MessageId: ERROR_BAD_DEV_TYPE
+//
+// MessageText:
+//
+// The network resource type is not correct.
+//
+ ERROR_BAD_DEV_TYPE = DWORD(66);
+ {$EXTERNALSYM ERROR_BAD_DEV_TYPE}
+
+//
+// MessageId: ERROR_BAD_NET_NAME
+//
+// MessageText:
+//
+// The network name cannot be found.
+//
+ ERROR_BAD_NET_NAME = DWORD(67);
+ {$EXTERNALSYM ERROR_BAD_NET_NAME}
+
+//
+// MessageId: ERROR_TOO_MANY_NAMES
+//
+// MessageText:
+//
+// The name limit for the local computer network adapter card was exceeded.
+//
+ ERROR_TOO_MANY_NAMES = DWORD(68);
+ {$EXTERNALSYM ERROR_TOO_MANY_NAMES}
+
+//
+// MessageId: ERROR_TOO_MANY_SESS
+//
+// MessageText:
+//
+// The network BIOS session limit was exceeded.
+//
+ ERROR_TOO_MANY_SESS = DWORD(69);
+ {$EXTERNALSYM ERROR_TOO_MANY_SESS}
+
+//
+// MessageId: ERROR_SHARING_PAUSED
+//
+// MessageText:
+//
+// The remote server has been paused or is in the process of being started.
+//
+ ERROR_SHARING_PAUSED = DWORD(70);
+ {$EXTERNALSYM ERROR_SHARING_PAUSED}
+
+//
+// MessageId: ERROR_REQ_NOT_ACCEP
+//
+// MessageText:
+//
+// No more connections can be made to this remote computer at this time because there are already as many connections as the computer can accept.
+//
+ ERROR_REQ_NOT_ACCEP = DWORD(71);
+ {$EXTERNALSYM ERROR_REQ_NOT_ACCEP}
+
+//
+// MessageId: ERROR_REDIR_PAUSED
+//
+// MessageText:
+//
+// The specified printer or disk device has been paused.
+//
+ ERROR_REDIR_PAUSED = DWORD(72);
+ {$EXTERNALSYM ERROR_REDIR_PAUSED}
+
+//
+// MessageId: ERROR_FILE_EXISTS
+//
+// MessageText:
+//
+// The file exists.
+//
+ ERROR_FILE_EXISTS = DWORD(80);
+ {$EXTERNALSYM ERROR_FILE_EXISTS}
+
+//
+// MessageId: ERROR_CANNOT_MAKE
+//
+// MessageText:
+//
+// The directory or file cannot be created.
+//
+ ERROR_CANNOT_MAKE = DWORD(82);
+ {$EXTERNALSYM ERROR_CANNOT_MAKE}
+
+//
+// MessageId: ERROR_FAIL_I24
+//
+// MessageText:
+//
+// Fail on INT 24.
+//
+ ERROR_FAIL_I24 = DWORD(83);
+ {$EXTERNALSYM ERROR_FAIL_I24}
+
+//
+// MessageId: ERROR_OUT_OF_STRUCTURES
+//
+// MessageText:
+//
+// Storage to process this request is not available.
+//
+ ERROR_OUT_OF_STRUCTURES = DWORD(84);
+ {$EXTERNALSYM ERROR_OUT_OF_STRUCTURES}
+
+//
+// MessageId: ERROR_ALREADY_ASSIGNED
+//
+// MessageText:
+//
+// The local device name is already in use.
+//
+ ERROR_ALREADY_ASSIGNED = DWORD(85);
+ {$EXTERNALSYM ERROR_ALREADY_ASSIGNED}
+
+//
+// MessageId: ERROR_INVALID_PASSWORD
+//
+// MessageText:
+//
+// The specified network password is not correct.
+//
+ ERROR_INVALID_PASSWORD = DWORD(86);
+ {$EXTERNALSYM ERROR_INVALID_PASSWORD}
+
+//
+// MessageId: ERROR_INVALID_PARAMETER
+//
+// MessageText:
+//
+// The parameter is incorrect.
+//
+ ERROR_INVALID_PARAMETER = DWORD(87); // dderror
+ {$EXTERNALSYM ERROR_INVALID_PARAMETER}
+
+//
+// MessageId: ERROR_NET_WRITE_FAULT
+//
+// MessageText:
+//
+// A write fault occurred on the network.
+//
+ ERROR_NET_WRITE_FAULT = DWORD(88);
+ {$EXTERNALSYM ERROR_NET_WRITE_FAULT}
+
+//
+// MessageId: ERROR_NO_PROC_SLOTS
+//
+// MessageText:
+//
+// The system cannot start another process at this time.
+//
+ ERROR_NO_PROC_SLOTS = DWORD(89);
+ {$EXTERNALSYM ERROR_NO_PROC_SLOTS}
+
+//
+// MessageId: ERROR_TOO_MANY_SEMAPHORES
+//
+// MessageText:
+//
+// Cannot create another system semaphore.
+//
+ ERROR_TOO_MANY_SEMAPHORES = DWORD(100);
+ {$EXTERNALSYM ERROR_TOO_MANY_SEMAPHORES}
+
+//
+// MessageId: ERROR_EXCL_SEM_ALREADY_OWNED
+//
+// MessageText:
+//
+// The exclusive semaphore is owned by another process.
+//
+ ERROR_EXCL_SEM_ALREADY_OWNED = DWORD(101);
+ {$EXTERNALSYM ERROR_EXCL_SEM_ALREADY_OWNED}
+
+//
+// MessageId: ERROR_SEM_IS_SET
+//
+// MessageText:
+//
+// The semaphore is set and cannot be closed.
+//
+ ERROR_SEM_IS_SET = DWORD(102);
+ {$EXTERNALSYM ERROR_SEM_IS_SET}
+
+//
+// MessageId: ERROR_TOO_MANY_SEM_REQUESTS
+//
+// MessageText:
+//
+// The semaphore cannot be set again.
+//
+ ERROR_TOO_MANY_SEM_REQUESTS = DWORD(103);
+ {$EXTERNALSYM ERROR_TOO_MANY_SEM_REQUESTS}
+
+//
+// MessageId: ERROR_INVALID_AT_INTERRUPT_TIME
+//
+// MessageText:
+//
+// Cannot request exclusive semaphores at interrupt time.
+//
+ ERROR_INVALID_AT_INTERRUPT_TIME = DWORD(104);
+ {$EXTERNALSYM ERROR_INVALID_AT_INTERRUPT_TIME}
+
+//
+// MessageId: ERROR_SEM_OWNER_DIED
+//
+// MessageText:
+//
+// The previous ownership of this semaphore has ended.
+//
+ ERROR_SEM_OWNER_DIED = DWORD(105);
+ {$EXTERNALSYM ERROR_SEM_OWNER_DIED}
+
+//
+// MessageId: ERROR_SEM_USER_LIMIT
+//
+// MessageText:
+//
+// Insert the diskette for drive %1.
+//
+ ERROR_SEM_USER_LIMIT = DWORD(106);
+ {$EXTERNALSYM ERROR_SEM_USER_LIMIT}
+
+//
+// MessageId: ERROR_DISK_CHANGE
+//
+// MessageText:
+//
+// The program stopped because an alternate diskette was not inserted.
+//
+ ERROR_DISK_CHANGE = DWORD(107);
+ {$EXTERNALSYM ERROR_DISK_CHANGE}
+
+//
+// MessageId: ERROR_DRIVE_LOCKED
+//
+// MessageText:
+//
+// The disk is in use or locked by another process.
+//
+ ERROR_DRIVE_LOCKED = DWORD(108);
+ {$EXTERNALSYM ERROR_DRIVE_LOCKED}
+
+//
+// MessageId: ERROR_BROKEN_PIPE
+//
+// MessageText:
+//
+// The pipe has been ended.
+//
+ ERROR_BROKEN_PIPE = DWORD(109);
+ {$EXTERNALSYM ERROR_BROKEN_PIPE}
+
+//
+// MessageId: ERROR_OPEN_FAILED
+//
+// MessageText:
+//
+// The system cannot open the device or file specified.
+//
+ ERROR_OPEN_FAILED = DWORD(110);
+ {$EXTERNALSYM ERROR_OPEN_FAILED}
+
+//
+// MessageId: ERROR_BUFFER_OVERFLOW
+//
+// MessageText:
+//
+// The file name is too long.
+//
+ ERROR_BUFFER_OVERFLOW = DWORD(111);
+ {$EXTERNALSYM ERROR_BUFFER_OVERFLOW}
+
+//
+// MessageId: ERROR_DISK_FULL
+//
+// MessageText:
+//
+// There is not enough space on the disk.
+//
+ ERROR_DISK_FULL = DWORD(112);
+ {$EXTERNALSYM ERROR_DISK_FULL}
+
+//
+// MessageId: ERROR_NO_MORE_SEARCH_HANDLES
+//
+// MessageText:
+//
+// No more internal file identifiers available.
+//
+ ERROR_NO_MORE_SEARCH_HANDLES = DWORD(113);
+ {$EXTERNALSYM ERROR_NO_MORE_SEARCH_HANDLES}
+
+//
+// MessageId: ERROR_INVALID_TARGET_HANDLE
+//
+// MessageText:
+//
+// The target internal file identifier is incorrect.
+//
+ ERROR_INVALID_TARGET_HANDLE = DWORD(114);
+ {$EXTERNALSYM ERROR_INVALID_TARGET_HANDLE}
+
+//
+// MessageId: ERROR_INVALID_CATEGORY
+//
+// MessageText:
+//
+// The IOCTL call made by the application program is not correct.
+//
+ ERROR_INVALID_CATEGORY = DWORD(117);
+ {$EXTERNALSYM ERROR_INVALID_CATEGORY}
+
+//
+// MessageId: ERROR_INVALID_VERIFY_SWITCH
+//
+// MessageText:
+//
+// The verify-on-write switch parameter value is not correct.
+//
+ ERROR_INVALID_VERIFY_SWITCH = DWORD(118);
+ {$EXTERNALSYM ERROR_INVALID_VERIFY_SWITCH}
+
+//
+// MessageId: ERROR_BAD_DRIVER_LEVEL
+//
+// MessageText:
+//
+// The system does not support the command requested.
+//
+ ERROR_BAD_DRIVER_LEVEL = DWORD(119);
+ {$EXTERNALSYM ERROR_BAD_DRIVER_LEVEL}
+
+//
+// MessageId: ERROR_CALL_NOT_IMPLEMENTED
+//
+// MessageText:
+//
+// This function is not supported on this system.
+//
+ ERROR_CALL_NOT_IMPLEMENTED = DWORD(120);
+ {$EXTERNALSYM ERROR_CALL_NOT_IMPLEMENTED}
+
+//
+// MessageId: ERROR_SEM_TIMEOUT
+//
+// MessageText:
+//
+// The semaphore timeout period has expired.
+//
+ ERROR_SEM_TIMEOUT = DWORD(121);
+ {$EXTERNALSYM ERROR_SEM_TIMEOUT}
+
+//
+// MessageId: ERROR_INSUFFICIENT_BUFFER
+//
+// MessageText:
+//
+// The data area passed to a system call is too small.
+//
+ ERROR_INSUFFICIENT_BUFFER = DWORD(122); // dderror
+ {$EXTERNALSYM ERROR_INSUFFICIENT_BUFFER}
+
+//
+// MessageId: ERROR_INVALID_NAME
+//
+// MessageText:
+//
+// The filename, directory name, or volume label syntax is incorrect.
+//
+ ERROR_INVALID_NAME = DWORD(123); // dderror
+ {$EXTERNALSYM ERROR_INVALID_NAME}
+
+//
+// MessageId: ERROR_INVALID_LEVEL
+//
+// MessageText:
+//
+// The system call level is not correct.
+//
+ ERROR_INVALID_LEVEL = DWORD(124);
+ {$EXTERNALSYM ERROR_INVALID_LEVEL}
+
+//
+// MessageId: ERROR_NO_VOLUME_LABEL
+//
+// MessageText:
+//
+// The disk has no volume label.
+//
+ ERROR_NO_VOLUME_LABEL = DWORD(125);
+ {$EXTERNALSYM ERROR_NO_VOLUME_LABEL}
+
+//
+// MessageId: ERROR_MOD_NOT_FOUND
+//
+// MessageText:
+//
+// The specified module could not be found.
+//
+ ERROR_MOD_NOT_FOUND = DWORD(126);
+ {$EXTERNALSYM ERROR_MOD_NOT_FOUND}
+
+//
+// MessageId: ERROR_PROC_NOT_FOUND
+//
+// MessageText:
+//
+// The specified procedure could not be found.
+//
+ ERROR_PROC_NOT_FOUND = DWORD(127);
+ {$EXTERNALSYM ERROR_PROC_NOT_FOUND}
+
+//
+// MessageId: ERROR_WAIT_NO_CHILDREN
+//
+// MessageText:
+//
+// There are no child processes to wait for.
+//
+ ERROR_WAIT_NO_CHILDREN = DWORD(128);
+ {$EXTERNALSYM ERROR_WAIT_NO_CHILDREN}
+
+//
+// MessageId: ERROR_CHILD_NOT_COMPLETE
+//
+// MessageText:
+//
+// The %1 application cannot be run in Win32 mode.
+//
+ ERROR_CHILD_NOT_COMPLETE = DWORD(129);
+ {$EXTERNALSYM ERROR_CHILD_NOT_COMPLETE}
+
+//
+// MessageId: ERROR_DIRECT_ACCESS_HANDLE
+//
+// MessageText:
+//
+// Attempt to use a file handle to an open disk partition for an operation other than raw disk I/O.
+//
+ ERROR_DIRECT_ACCESS_HANDLE = DWORD(130);
+ {$EXTERNALSYM ERROR_DIRECT_ACCESS_HANDLE}
+
+//
+// MessageId: ERROR_NEGATIVE_SEEK
+//
+// MessageText:
+//
+// An attempt was made to move the file pointer before the beginning of the file.
+//
+ ERROR_NEGATIVE_SEEK = DWORD(131);
+ {$EXTERNALSYM ERROR_NEGATIVE_SEEK}
+
+//
+// MessageId: ERROR_SEEK_ON_DEVICE
+//
+// MessageText:
+//
+// The file pointer cannot be set on the specified device or file.
+//
+ ERROR_SEEK_ON_DEVICE = DWORD(132);
+ {$EXTERNALSYM ERROR_SEEK_ON_DEVICE}
+
+//
+// MessageId: ERROR_IS_JOIN_TARGET
+//
+// MessageText:
+//
+// A JOIN or SUBST command cannot be used for a drive that contains previously joined drives.
+//
+ ERROR_IS_JOIN_TARGET = DWORD(133);
+ {$EXTERNALSYM ERROR_IS_JOIN_TARGET}
+
+//
+// MessageId: ERROR_IS_JOINED
+//
+// MessageText:
+//
+// An attempt was made to use a JOIN or SUBST command on a drive that has already been joined.
+//
+ ERROR_IS_JOINED = DWORD(134);
+ {$EXTERNALSYM ERROR_IS_JOINED}
+
+//
+// MessageId: ERROR_IS_SUBSTED
+//
+// MessageText:
+//
+// An attempt was made to use a JOIN or SUBST command on a drive that has already been substituted.
+//
+ ERROR_IS_SUBSTED = DWORD(135);
+ {$EXTERNALSYM ERROR_IS_SUBSTED}
+
+//
+// MessageId: ERROR_NOT_JOINED
+//
+// MessageText:
+//
+// The system tried to delete the JOIN of a drive that is not joined.
+//
+ ERROR_NOT_JOINED = DWORD(136);
+ {$EXTERNALSYM ERROR_NOT_JOINED}
+
+//
+// MessageId: ERROR_NOT_SUBSTED
+//
+// MessageText:
+//
+// The system tried to delete the substitution of a drive that is not substituted.
+//
+ ERROR_NOT_SUBSTED = DWORD(137);
+ {$EXTERNALSYM ERROR_NOT_SUBSTED}
+
+//
+// MessageId: ERROR_JOIN_TO_JOIN
+//
+// MessageText:
+//
+// The system tried to join a drive to a directory on a joined drive.
+//
+ ERROR_JOIN_TO_JOIN = DWORD(138);
+ {$EXTERNALSYM ERROR_JOIN_TO_JOIN}
+
+//
+// MessageId: ERROR_SUBST_TO_SUBST
+//
+// MessageText:
+//
+// The system tried to substitute a drive to a directory on a substituted drive.
+//
+ ERROR_SUBST_TO_SUBST = DWORD(139);
+ {$EXTERNALSYM ERROR_SUBST_TO_SUBST}
+
+//
+// MessageId: ERROR_JOIN_TO_SUBST
+//
+// MessageText:
+//
+// The system tried to join a drive to a directory on a substituted drive.
+//
+ ERROR_JOIN_TO_SUBST = DWORD(140);
+ {$EXTERNALSYM ERROR_JOIN_TO_SUBST}
+
+//
+// MessageId: ERROR_SUBST_TO_JOIN
+//
+// MessageText:
+//
+// The system tried to SUBST a drive to a directory on a joined drive.
+//
+ ERROR_SUBST_TO_JOIN = DWORD(141);
+ {$EXTERNALSYM ERROR_SUBST_TO_JOIN}
+
+//
+// MessageId: ERROR_BUSY_DRIVE
+//
+// MessageText:
+//
+// The system cannot perform a JOIN or SUBST at this time.
+//
+ ERROR_BUSY_DRIVE = DWORD(142);
+ {$EXTERNALSYM ERROR_BUSY_DRIVE}
+
+//
+// MessageId: ERROR_SAME_DRIVE
+//
+// MessageText:
+//
+// The system cannot join or substitute a drive to or for a directory on the same drive.
+//
+ ERROR_SAME_DRIVE = DWORD(143);
+ {$EXTERNALSYM ERROR_SAME_DRIVE}
+
+//
+// MessageId: ERROR_DIR_NOT_ROOT
+//
+// MessageText:
+//
+// The directory is not a subdirectory of the root directory.
+//
+ ERROR_DIR_NOT_ROOT = DWORD(144);
+ {$EXTERNALSYM ERROR_DIR_NOT_ROOT}
+
+//
+// MessageId: ERROR_DIR_NOT_EMPTY
+//
+// MessageText:
+//
+// The directory is not empty.
+//
+ ERROR_DIR_NOT_EMPTY = DWORD(145);
+ {$EXTERNALSYM ERROR_DIR_NOT_EMPTY}
+
+//
+// MessageId: ERROR_IS_SUBST_PATH
+//
+// MessageText:
+//
+// The path specified is being used in a substitute.
+//
+ ERROR_IS_SUBST_PATH = DWORD(146);
+ {$EXTERNALSYM ERROR_IS_SUBST_PATH}
+
+//
+// MessageId: ERROR_IS_JOIN_PATH
+//
+// MessageText:
+//
+// Not enough resources are available to process this command.
+//
+ ERROR_IS_JOIN_PATH = DWORD(147);
+ {$EXTERNALSYM ERROR_IS_JOIN_PATH}
+
+//
+// MessageId: ERROR_PATH_BUSY
+//
+// MessageText:
+//
+// The path specified cannot be used at this time.
+//
+ ERROR_PATH_BUSY = DWORD(148);
+ {$EXTERNALSYM ERROR_PATH_BUSY}
+
+//
+// MessageId: ERROR_IS_SUBST_TARGET
+//
+// MessageText:
+//
+// An attempt was made to join or substitute a drive for which a directory on the drive is the target of a previous substitute.
+//
+ ERROR_IS_SUBST_TARGET = DWORD(149);
+ {$EXTERNALSYM ERROR_IS_SUBST_TARGET}
+
+//
+// MessageId: ERROR_SYSTEM_TRACE
+//
+// MessageText:
+//
+// System trace information was not specified in your CONFIG.SYS file, or tracing is disallowed.
+//
+ ERROR_SYSTEM_TRACE = DWORD(150);
+ {$EXTERNALSYM ERROR_SYSTEM_TRACE}
+
+//
+// MessageId: ERROR_INVALID_EVENT_COUNT
+//
+// MessageText:
+//
+// The number of specified semaphore events for DosMuxSemWait is not correct.
+//
+ ERROR_INVALID_EVENT_COUNT = DWORD(151);
+ {$EXTERNALSYM ERROR_INVALID_EVENT_COUNT}
+
+//
+// MessageId: ERROR_TOO_MANY_MUXWAITERS
+//
+// MessageText:
+//
+// DosMuxSemWait did not execute; too many semaphores are already set.
+//
+ ERROR_TOO_MANY_MUXWAITERS = DWORD(152);
+ {$EXTERNALSYM ERROR_TOO_MANY_MUXWAITERS}
+
+//
+// MessageId: ERROR_INVALID_LIST_FORMAT
+//
+// MessageText:
+//
+// The DosMuxSemWait list is not correct.
+//
+ ERROR_INVALID_LIST_FORMAT = DWORD(153);
+ {$EXTERNALSYM ERROR_INVALID_LIST_FORMAT}
+
+//
+// MessageId: ERROR_LABEL_TOO_LONG
+//
+// MessageText:
+//
+// The volume label you entered exceeds the label character limit of the target file system.
+//
+ ERROR_LABEL_TOO_LONG = DWORD(154);
+ {$EXTERNALSYM ERROR_LABEL_TOO_LONG}
+
+//
+// MessageId: ERROR_TOO_MANY_TCBS
+//
+// MessageText:
+//
+// Cannot create another thread.
+//
+ ERROR_TOO_MANY_TCBS = DWORD(155);
+ {$EXTERNALSYM ERROR_TOO_MANY_TCBS}
+
+//
+// MessageId: ERROR_SIGNAL_REFUSED
+//
+// MessageText:
+//
+// The recipient process has refused the signal.
+//
+ ERROR_SIGNAL_REFUSED = DWORD(156);
+ {$EXTERNALSYM ERROR_SIGNAL_REFUSED}
+
+//
+// MessageId: ERROR_DISCARDED
+//
+// MessageText:
+//
+// The segment is already discarded and cannot be locked.
+//
+ ERROR_DISCARDED = DWORD(157);
+ {$EXTERNALSYM ERROR_DISCARDED}
+
+//
+// MessageId: ERROR_NOT_LOCKED
+//
+// MessageText:
+//
+// The segment is already unlocked.
+//
+ ERROR_NOT_LOCKED = DWORD(158);
+ {$EXTERNALSYM ERROR_NOT_LOCKED}
+
+//
+// MessageId: ERROR_BAD_THREADID_ADDR
+//
+// MessageText:
+//
+// The address for the thread ID is not correct.
+//
+ ERROR_BAD_THREADID_ADDR = DWORD(159);
+ {$EXTERNALSYM ERROR_BAD_THREADID_ADDR}
+
+//
+// MessageId: ERROR_BAD_ARGUMENTS
+//
+// MessageText:
+//
+// One or more arguments are not correct.
+//
+ ERROR_BAD_ARGUMENTS = DWORD(160);
+ {$EXTERNALSYM ERROR_BAD_ARGUMENTS}
+
+//
+// MessageId: ERROR_BAD_PATHNAME
+//
+// MessageText:
+//
+// The specified path is invalid.
+//
+ ERROR_BAD_PATHNAME = DWORD(161);
+ {$EXTERNALSYM ERROR_BAD_PATHNAME}
+
+//
+// MessageId: ERROR_SIGNAL_PENDING
+//
+// MessageText:
+//
+// A signal is already pending.
+//
+ ERROR_SIGNAL_PENDING = DWORD(162);
+ {$EXTERNALSYM ERROR_SIGNAL_PENDING}
+
+//
+// MessageId: ERROR_MAX_THRDS_REACHED
+//
+// MessageText:
+//
+// No more threads can be created in the system.
+//
+ ERROR_MAX_THRDS_REACHED = DWORD(164);
+ {$EXTERNALSYM ERROR_MAX_THRDS_REACHED}
+
+//
+// MessageId: ERROR_LOCK_FAILED
+//
+// MessageText:
+//
+// Unable to lock a region of a file.
+//
+ ERROR_LOCK_FAILED = DWORD(167);
+ {$EXTERNALSYM ERROR_LOCK_FAILED}
+
+//
+// MessageId: ERROR_BUSY
+//
+// MessageText:
+//
+// The requested resource is in use.
+//
+ ERROR_BUSY = DWORD(170); // dderror
+ {$EXTERNALSYM ERROR_BUSY}
+
+//
+// MessageId: ERROR_CANCEL_VIOLATION
+//
+// MessageText:
+//
+// A lock request was not outstanding for the supplied cancel region.
+//
+ ERROR_CANCEL_VIOLATION = DWORD(173);
+ {$EXTERNALSYM ERROR_CANCEL_VIOLATION}
+
+//
+// MessageId: ERROR_ATOMIC_LOCKS_NOT_SUPPORTED
+//
+// MessageText:
+//
+// The file system does not support atomic changes to the lock type.
+//
+ ERROR_ATOMIC_LOCKS_NOT_SUPPORTED = DWORD(174);
+ {$EXTERNALSYM ERROR_ATOMIC_LOCKS_NOT_SUPPORTED}
+
+//
+// MessageId: ERROR_INVALID_SEGMENT_NUMBER
+//
+// MessageText:
+//
+// The system detected a segment number that was not correct.
+//
+ ERROR_INVALID_SEGMENT_NUMBER = DWORD(180);
+ {$EXTERNALSYM ERROR_INVALID_SEGMENT_NUMBER}
+
+//
+// MessageId: ERROR_INVALID_ORDINAL
+//
+// MessageText:
+//
+// The operating system cannot run %1.
+//
+ ERROR_INVALID_ORDINAL = DWORD(182);
+ {$EXTERNALSYM ERROR_INVALID_ORDINAL}
+
+//
+// MessageId: ERROR_ALREADY_EXISTS
+//
+// MessageText:
+//
+// Cannot create a file when that file already exists.
+//
+ ERROR_ALREADY_EXISTS = DWORD(183);
+ {$EXTERNALSYM ERROR_ALREADY_EXISTS}
+
+//
+// MessageId: ERROR_INVALID_FLAG_NUMBER
+//
+// MessageText:
+//
+// The flag passed is not correct.
+//
+ ERROR_INVALID_FLAG_NUMBER = DWORD(186);
+ {$EXTERNALSYM ERROR_INVALID_FLAG_NUMBER}
+
+//
+// MessageId: ERROR_SEM_NOT_FOUND
+//
+// MessageText:
+//
+// The specified system semaphore name was not found.
+//
+ ERROR_SEM_NOT_FOUND = DWORD(187);
+ {$EXTERNALSYM ERROR_SEM_NOT_FOUND}
+
+//
+// MessageId: ERROR_INVALID_STARTING_CODESEG
+//
+// MessageText:
+//
+// The operating system cannot run %1.
+//
+ ERROR_INVALID_STARTING_CODESEG = DWORD(188);
+ {$EXTERNALSYM ERROR_INVALID_STARTING_CODESEG}
+
+//
+// MessageId: ERROR_INVALID_STACKSEG
+//
+// MessageText:
+//
+// The operating system cannot run %1.
+//
+ ERROR_INVALID_STACKSEG = DWORD(189);
+ {$EXTERNALSYM ERROR_INVALID_STACKSEG}
+
+//
+// MessageId: ERROR_INVALID_MODULETYPE
+//
+// MessageText:
+//
+// The operating system cannot run %1.
+//
+ ERROR_INVALID_MODULETYPE = DWORD(190);
+ {$EXTERNALSYM ERROR_INVALID_MODULETYPE}
+
+//
+// MessageId: ERROR_INVALID_EXE_SIGNATURE
+//
+// MessageText:
+//
+// Cannot run %1 in Win32 mode.
+//
+ ERROR_INVALID_EXE_SIGNATURE = DWORD(191);
+ {$EXTERNALSYM ERROR_INVALID_EXE_SIGNATURE}
+
+//
+// MessageId: ERROR_EXE_MARKED_INVALID
+//
+// MessageText:
+//
+// The operating system cannot run %1.
+//
+ ERROR_EXE_MARKED_INVALID = DWORD(192);
+ {$EXTERNALSYM ERROR_EXE_MARKED_INVALID}
+
+//
+// MessageId: ERROR_BAD_EXE_FORMAT
+//
+// MessageText:
+//
+// %1 is not a valid Win32 application.
+//
+ ERROR_BAD_EXE_FORMAT = DWORD(193);
+ {$EXTERNALSYM ERROR_BAD_EXE_FORMAT}
+
+//
+// MessageId: ERROR_ITERATED_DATA_EXCEEDS_64k
+//
+// MessageText:
+//
+// The operating system cannot run %1.
+//
+ ERROR_ITERATED_DATA_EXCEEDS_64k = DWORD(194);
+ {$EXTERNALSYM ERROR_ITERATED_DATA_EXCEEDS_64k}
+
+//
+// MessageId: ERROR_INVALID_MINALLOCSIZE
+//
+// MessageText:
+//
+// The operating system cannot run %1.
+//
+ ERROR_INVALID_MINALLOCSIZE = DWORD(195);
+ {$EXTERNALSYM ERROR_INVALID_MINALLOCSIZE}
+
+//
+// MessageId: ERROR_DYNLINK_FROM_INVALID_RING
+//
+// MessageText:
+//
+// The operating system cannot run this application program.
+//
+ ERROR_DYNLINK_FROM_INVALID_RING = DWORD(196);
+ {$EXTERNALSYM ERROR_DYNLINK_FROM_INVALID_RING}
+
+//
+// MessageId: ERROR_IOPL_NOT_ENABLED
+//
+// MessageText:
+//
+// The operating system is not presently configured to run this application.
+//
+ ERROR_IOPL_NOT_ENABLED = DWORD(197);
+ {$EXTERNALSYM ERROR_IOPL_NOT_ENABLED}
+
+//
+// MessageId: ERROR_INVALID_SEGDPL
+//
+// MessageText:
+//
+// The operating system cannot run %1.
+//
+ ERROR_INVALID_SEGDPL = DWORD(198);
+ {$EXTERNALSYM ERROR_INVALID_SEGDPL}
+
+//
+// MessageId: ERROR_AUTODATASEG_EXCEEDS_64k
+//
+// MessageText:
+//
+// The operating system cannot run this application program.
+//
+ ERROR_AUTODATASEG_EXCEEDS_64k = DWORD(199);
+ {$EXTERNALSYM ERROR_AUTODATASEG_EXCEEDS_64k}
+
+//
+// MessageId: ERROR_RING2SEG_MUST_BE_MOVABLE
+//
+// MessageText:
+//
+// The code segment cannot be greater than or equal to 64K.
+//
+ ERROR_RING2SEG_MUST_BE_MOVABLE = DWORD(200);
+ {$EXTERNALSYM ERROR_RING2SEG_MUST_BE_MOVABLE}
+
+//
+// MessageId: ERROR_RELOC_CHAIN_XEEDS_SEGLIM
+//
+// MessageText:
+//
+// The operating system cannot run %1.
+//
+ ERROR_RELOC_CHAIN_XEEDS_SEGLIM = DWORD(201);
+ {$EXTERNALSYM ERROR_RELOC_CHAIN_XEEDS_SEGLIM}
+
+//
+// MessageId: ERROR_INFLOOP_IN_RELOC_CHAIN
+//
+// MessageText:
+//
+// The operating system cannot run %1.
+//
+ ERROR_INFLOOP_IN_RELOC_CHAIN = DWORD(202);
+ {$EXTERNALSYM ERROR_INFLOOP_IN_RELOC_CHAIN}
+
+//
+// MessageId: ERROR_ENVVAR_NOT_FOUND
+//
+// MessageText:
+//
+// The system could not find the environment option that was entered.
+//
+ ERROR_ENVVAR_NOT_FOUND = DWORD(203);
+ {$EXTERNALSYM ERROR_ENVVAR_NOT_FOUND}
+
+//
+// MessageId: ERROR_NO_SIGNAL_SENT
+//
+// MessageText:
+//
+// No process in the command subtree has a signal handler.
+//
+ ERROR_NO_SIGNAL_SENT = DWORD(205);
+ {$EXTERNALSYM ERROR_NO_SIGNAL_SENT}
+
+//
+// MessageId: ERROR_FILENAME_EXCED_RANGE
+//
+// MessageText:
+//
+// The filename or extension is too long.
+//
+ ERROR_FILENAME_EXCED_RANGE = DWORD(206);
+ {$EXTERNALSYM ERROR_FILENAME_EXCED_RANGE}
+
+//
+// MessageId: ERROR_RING2_STACK_IN_USE
+//
+// MessageText:
+//
+// The ring 2 stack is in use.
+//
+ ERROR_RING2_STACK_IN_USE = DWORD(207);
+ {$EXTERNALSYM ERROR_RING2_STACK_IN_USE}
+
+//
+// MessageId: ERROR_META_EXPANSION_TOO_LONG
+//
+// MessageText:
+//
+// The global filename characters, * or ?, are entered incorrectly or too many global filename characters are specified.
+//
+ ERROR_META_EXPANSION_TOO_LONG = DWORD(208);
+ {$EXTERNALSYM ERROR_META_EXPANSION_TOO_LONG}
+
+//
+// MessageId: ERROR_INVALID_SIGNAL_NUMBER
+//
+// MessageText:
+//
+// The signal being posted is not correct.
+//
+ ERROR_INVALID_SIGNAL_NUMBER = DWORD(209);
+ {$EXTERNALSYM ERROR_INVALID_SIGNAL_NUMBER}
+
+//
+// MessageId: ERROR_THREAD_1_INACTIVE
+//
+// MessageText:
+//
+// The signal handler cannot be set.
+//
+ ERROR_THREAD_1_INACTIVE = DWORD(210);
+ {$EXTERNALSYM ERROR_THREAD_1_INACTIVE}
+
+//
+// MessageId: ERROR_LOCKED
+//
+// MessageText:
+//
+// The segment is locked and cannot be reallocated.
+//
+ ERROR_LOCKED = DWORD(212);
+ {$EXTERNALSYM ERROR_LOCKED}
+
+//
+// MessageId: ERROR_TOO_MANY_MODULES
+//
+// MessageText:
+//
+// Too many dynamic-link modules are attached to this program or dynamic-link module.
+//
+ ERROR_TOO_MANY_MODULES = DWORD(214);
+ {$EXTERNALSYM ERROR_TOO_MANY_MODULES}
+
+//
+// MessageId: ERROR_NESTING_NOT_ALLOWED
+//
+// MessageText:
+//
+// Cannot nest calls to LoadModule.
+//
+ ERROR_NESTING_NOT_ALLOWED = DWORD(215);
+ {$EXTERNALSYM ERROR_NESTING_NOT_ALLOWED}
+
+//
+// MessageId: ERROR_EXE_MACHINE_TYPE_MISMATCH
+//
+// MessageText:
+//
+// The image file %1 is valid, but is for a machine type other than the current machine.
+//
+ ERROR_EXE_MACHINE_TYPE_MISMATCH = DWORD(216);
+ {$EXTERNALSYM ERROR_EXE_MACHINE_TYPE_MISMATCH}
+
+//
+// MessageId: ERROR_EXE_CANNOT_MODIFY_SIGNED_BINARY
+//
+// MessageText:
+//
+// The image file %1 is signed, unable to modify.
+//
+ ERROR_EXE_CANNOT_MODIFY_SIGNED_BINARY = DWORD(217);
+ {$EXTERNALSYM ERROR_EXE_CANNOT_MODIFY_SIGNED_BINARY}
+
+//
+// MessageId: ERROR_EXE_CANNOT_MODIFY_STRONG_SIGNED_BINARY
+//
+// MessageText:
+//
+// The image file %1 is strong signed, unable to modify.
+//
+ ERROR_EXE_CANNOT_MODIFY_STRONG_SIGNED_BINARY = DWORD(218);
+ {$EXTERNALSYM ERROR_EXE_CANNOT_MODIFY_STRONG_SIGNED_BINARY}
+
+//
+// MessageId: ERROR_BAD_PIPE
+//
+// MessageText:
+//
+// The pipe state is invalid.
+//
+ ERROR_BAD_PIPE = DWORD(230);
+ {$EXTERNALSYM ERROR_BAD_PIPE}
+
+//
+// MessageId: ERROR_PIPE_BUSY
+//
+// MessageText:
+//
+// All pipe instances are busy.
+//
+ ERROR_PIPE_BUSY = DWORD(231);
+ {$EXTERNALSYM ERROR_PIPE_BUSY}
+
+//
+// MessageId: ERROR_NO_DATA
+//
+// MessageText:
+//
+// The pipe is being closed.
+//
+ ERROR_NO_DATA = DWORD(232);
+ {$EXTERNALSYM ERROR_NO_DATA}
+
+//
+// MessageId: ERROR_PIPE_NOT_CONNECTED
+//
+// MessageText:
+//
+// No process is on the other end of the pipe.
+//
+ ERROR_PIPE_NOT_CONNECTED = DWORD(233);
+ {$EXTERNALSYM ERROR_PIPE_NOT_CONNECTED}
+
+//
+// MessageId: ERROR_MORE_DATA
+//
+// MessageText:
+//
+// More data is available.
+//
+ ERROR_MORE_DATA = DWORD(234); // dderror
+ {$EXTERNALSYM ERROR_MORE_DATA}
+
+//
+// MessageId: ERROR_VC_DISCONNECTED
+//
+// MessageText:
+//
+// The session was canceled.
+//
+ ERROR_VC_DISCONNECTED = DWORD(240);
+ {$EXTERNALSYM ERROR_VC_DISCONNECTED}
+
+//
+// MessageId: ERROR_INVALID_EA_NAME
+//
+// MessageText:
+//
+// The specified extended attribute name was invalid.
+//
+ ERROR_INVALID_EA_NAME = DWORD(254);
+ {$EXTERNALSYM ERROR_INVALID_EA_NAME}
+
+//
+// MessageId: ERROR_EA_LIST_INCONSISTENT
+//
+// MessageText:
+//
+// The extended attributes are inconsistent.
+//
+ ERROR_EA_LIST_INCONSISTENT = DWORD(255);
+ {$EXTERNALSYM ERROR_EA_LIST_INCONSISTENT}
+
+//
+// MessageId: WAIT_TIMEOUT
+//
+// MessageText:
+//
+// The wait operation timed out.
+//
+ WAIT_TIMEOUT = DWORD(258); // dderror
+ {$EXTERNALSYM WAIT_TIMEOUT}
+
+//
+// MessageId: ERROR_NO_MORE_ITEMS
+//
+// MessageText:
+//
+// No more data is available.
+//
+ ERROR_NO_MORE_ITEMS = DWORD(259);
+ {$EXTERNALSYM ERROR_NO_MORE_ITEMS}
+
+//
+// MessageId: ERROR_CANNOT_COPY
+//
+// MessageText:
+//
+// The copy functions cannot be used.
+//
+ ERROR_CANNOT_COPY = DWORD(266);
+ {$EXTERNALSYM ERROR_CANNOT_COPY}
+
+//
+// MessageId: ERROR_DIRECTORY
+//
+// MessageText:
+//
+// The directory name is invalid.
+//
+ ERROR_DIRECTORY = DWORD(267);
+ {$EXTERNALSYM ERROR_DIRECTORY}
+
+//
+// MessageId: ERROR_EAS_DIDNT_FIT
+//
+// MessageText:
+//
+// The extended attributes did not fit in the buffer.
+//
+ ERROR_EAS_DIDNT_FIT = DWORD(275);
+ {$EXTERNALSYM ERROR_EAS_DIDNT_FIT}
+
+//
+// MessageId: ERROR_EA_FILE_CORRUPT
+//
+// MessageText:
+//
+// The extended attribute file on the mounted file system is corrupt.
+//
+ ERROR_EA_FILE_CORRUPT = DWORD(276);
+ {$EXTERNALSYM ERROR_EA_FILE_CORRUPT}
+
+//
+// MessageId: ERROR_EA_TABLE_FULL
+//
+// MessageText:
+//
+// The extended attribute table file is full.
+//
+ ERROR_EA_TABLE_FULL = DWORD(277);
+ {$EXTERNALSYM ERROR_EA_TABLE_FULL}
+
+//
+// MessageId: ERROR_INVALID_EA_HANDLE
+//
+// MessageText:
+//
+// The specified extended attribute handle is invalid.
+//
+ ERROR_INVALID_EA_HANDLE = DWORD(278);
+ {$EXTERNALSYM ERROR_INVALID_EA_HANDLE}
+
+//
+// MessageId: ERROR_EAS_NOT_SUPPORTED
+//
+// MessageText:
+//
+// The mounted file system does not support extended attributes.
+//
+ ERROR_EAS_NOT_SUPPORTED = DWORD(282);
+ {$EXTERNALSYM ERROR_EAS_NOT_SUPPORTED}
+
+//
+// MessageId: ERROR_NOT_OWNER
+//
+// MessageText:
+//
+// Attempt to release mutex not owned by caller.
+//
+ ERROR_NOT_OWNER = DWORD(288);
+ {$EXTERNALSYM ERROR_NOT_OWNER}
+
+//
+// MessageId: ERROR_TOO_MANY_POSTS
+//
+// MessageText:
+//
+// Too many posts were made to a semaphore.
+//
+ ERROR_TOO_MANY_POSTS = DWORD(298);
+ {$EXTERNALSYM ERROR_TOO_MANY_POSTS}
+
+//
+// MessageId: ERROR_PARTIAL_COPY
+//
+// MessageText:
+//
+// Only part of a ReadProcessMemory or WriteProcessMemory request was completed.
+//
+ ERROR_PARTIAL_COPY = DWORD(299);
+ {$EXTERNALSYM ERROR_PARTIAL_COPY}
+
+//
+// MessageId: ERROR_OPLOCK_NOT_GRANTED
+//
+// MessageText:
+//
+// The oplock request is denied.
+//
+ ERROR_OPLOCK_NOT_GRANTED = DWORD(300);
+ {$EXTERNALSYM ERROR_OPLOCK_NOT_GRANTED}
+
+//
+// MessageId: ERROR_INVALID_OPLOCK_PROTOCOL
+//
+// MessageText:
+//
+// An invalid oplock acknowledgment was received by the system.
+//
+ ERROR_INVALID_OPLOCK_PROTOCOL = DWORD(301);
+ {$EXTERNALSYM ERROR_INVALID_OPLOCK_PROTOCOL}
+
+//
+// MessageId: ERROR_DISK_TOO_FRAGMENTED
+//
+// MessageText:
+//
+// The volume is too fragmented to complete this operation.
+//
+ ERROR_DISK_TOO_FRAGMENTED = DWORD(302);
+ {$EXTERNALSYM ERROR_DISK_TOO_FRAGMENTED}
+
+//
+// MessageId: ERROR_DELETE_PENDING
+//
+// MessageText:
+//
+// The file cannot be opened because it is in the process of being deleted.
+//
+ ERROR_DELETE_PENDING = DWORD(303);
+ {$EXTERNALSYM ERROR_DELETE_PENDING}
+
+//
+// MessageId: ERROR_MR_MID_NOT_FOUND
+//
+// MessageText:
+//
+// The system cannot find message text for message number 0x%1 in the message file for %2.
+//
+ ERROR_MR_MID_NOT_FOUND = DWORD(317);
+ {$EXTERNALSYM ERROR_MR_MID_NOT_FOUND}
+
+//
+// MessageId: ERROR_SCOPE_NOT_FOUND
+//
+// MessageText:
+//
+// The scope specified was not found.
+//
+ ERROR_SCOPE_NOT_FOUND = DWORD(318);
+ {$EXTERNALSYM ERROR_SCOPE_NOT_FOUND}
+
+//
+// MessageId: ERROR_INVALID_ADDRESS
+//
+// MessageText:
+//
+// Attempt to access invalid address.
+//
+ ERROR_INVALID_ADDRESS = DWORD(487);
+ {$EXTERNALSYM ERROR_INVALID_ADDRESS}
+
+//
+// MessageId: ERROR_ARITHMETIC_OVERFLOW
+//
+// MessageText:
+//
+// Arithmetic result exceeded 32 bits.
+//
+ ERROR_ARITHMETIC_OVERFLOW = DWORD(534);
+ {$EXTERNALSYM ERROR_ARITHMETIC_OVERFLOW}
+
+//
+// MessageId: ERROR_PIPE_CONNECTED
+//
+// MessageText:
+//
+// There is a process on other end of the pipe.
+//
+ ERROR_PIPE_CONNECTED = DWORD(535);
+ {$EXTERNALSYM ERROR_PIPE_CONNECTED}
+
+//
+// MessageId: ERROR_PIPE_LISTENING
+//
+// MessageText:
+//
+// Waiting for a process to open the other end of the pipe.
+//
+ ERROR_PIPE_LISTENING = DWORD(536);
+ {$EXTERNALSYM ERROR_PIPE_LISTENING}
+
+//
+// MessageId: ERROR_EA_ACCESS_DENIED
+//
+// MessageText:
+//
+// Access to the extended attribute was denied.
+//
+ ERROR_EA_ACCESS_DENIED = DWORD(994);
+ {$EXTERNALSYM ERROR_EA_ACCESS_DENIED}
+
+//
+// MessageId: ERROR_OPERATION_ABORTED
+//
+// MessageText:
+//
+// The I/O operation has been aborted because of either a thread exit or an application request.
+//
+ ERROR_OPERATION_ABORTED = DWORD(995);
+ {$EXTERNALSYM ERROR_OPERATION_ABORTED}
+
+//
+// MessageId: ERROR_IO_INCOMPLETE
+//
+// MessageText:
+//
+// Overlapped I/O event is not in a signaled state.
+//
+ ERROR_IO_INCOMPLETE = DWORD(996);
+ {$EXTERNALSYM ERROR_IO_INCOMPLETE}
+
+//
+// MessageId: ERROR_IO_PENDING
+//
+// MessageText:
+//
+// Overlapped I/O operation is in progress.
+//
+ ERROR_IO_PENDING = DWORD(997); // dderror
+ {$EXTERNALSYM ERROR_IO_PENDING}
+
+//
+// MessageId: ERROR_NOACCESS
+//
+// MessageText:
+//
+// Invalid access to memory location.
+//
+ ERROR_NOACCESS = DWORD(998);
+ {$EXTERNALSYM ERROR_NOACCESS}
+
+//
+// MessageId: ERROR_SWAPERROR
+//
+// MessageText:
+//
+// Error performing inpage operation.
+//
+ ERROR_SWAPERROR = DWORD(999);
+ {$EXTERNALSYM ERROR_SWAPERROR}
+
+//
+// MessageId: ERROR_STACK_OVERFLOW
+//
+// MessageText:
+//
+// Recursion too deep; the stack overflowed.
+//
+ ERROR_STACK_OVERFLOW = DWORD(1001);
+ {$EXTERNALSYM ERROR_STACK_OVERFLOW}
+
+//
+// MessageId: ERROR_INVALID_MESSAGE
+//
+// MessageText:
+//
+// The window cannot act on the sent message.
+//
+ ERROR_INVALID_MESSAGE = DWORD(1002);
+ {$EXTERNALSYM ERROR_INVALID_MESSAGE}
+
+//
+// MessageId: ERROR_CAN_NOT_COMPLETE
+//
+// MessageText:
+//
+// Cannot complete this function.
+//
+ ERROR_CAN_NOT_COMPLETE = DWORD(1003);
+ {$EXTERNALSYM ERROR_CAN_NOT_COMPLETE}
+
+//
+// MessageId: ERROR_INVALID_FLAGS
+//
+// MessageText:
+//
+// Invalid flags.
+//
+ ERROR_INVALID_FLAGS = DWORD(1004);
+ {$EXTERNALSYM ERROR_INVALID_FLAGS}
+
+//
+// MessageId: ERROR_UNRECOGNIZED_VOLUME
+//
+// MessageText:
+//
+// The volume does not contain a recognized file system.
+// Please make sure that all required file system drivers are loaded and that the volume is not corrupted.
+//
+ ERROR_UNRECOGNIZED_VOLUME = DWORD(1005);
+ {$EXTERNALSYM ERROR_UNRECOGNIZED_VOLUME}
+
+//
+// MessageId: ERROR_FILE_INVALID
+//
+// MessageText:
+//
+// The volume for a file has been externally altered so that the opened file is no longer valid.
+//
+ ERROR_FILE_INVALID = DWORD(1006);
+ {$EXTERNALSYM ERROR_FILE_INVALID}
+
+//
+// MessageId: ERROR_FULLSCREEN_MODE
+//
+// MessageText:
+//
+// The requested operation cannot be performed in full-screen mode.
+//
+ ERROR_FULLSCREEN_MODE = DWORD(1007);
+ {$EXTERNALSYM ERROR_FULLSCREEN_MODE}
+
+//
+// MessageId: ERROR_NO_TOKEN
+//
+// MessageText:
+//
+// An attempt was made to reference a token that does not exist.
+//
+ ERROR_NO_TOKEN = DWORD(1008);
+ {$EXTERNALSYM ERROR_NO_TOKEN}
+
+//
+// MessageId: ERROR_BADDB
+//
+// MessageText:
+//
+// The configuration registry database is corrupt.
+//
+ ERROR_BADDB = DWORD(1009);
+ {$EXTERNALSYM ERROR_BADDB}
+
+//
+// MessageId: ERROR_BADKEY
+//
+// MessageText:
+//
+// The configuration registry key is invalid.
+//
+ ERROR_BADKEY = DWORD(1010);
+ {$EXTERNALSYM ERROR_BADKEY}
+
+//
+// MessageId: ERROR_CANTOPEN
+//
+// MessageText:
+//
+// The configuration registry key could not be opened.
+//
+ ERROR_CANTOPEN = DWORD(1011);
+ {$EXTERNALSYM ERROR_CANTOPEN}
+
+//
+// MessageId: ERROR_CANTREAD
+//
+// MessageText:
+//
+// The configuration registry key could not be read.
+//
+ ERROR_CANTREAD = DWORD(1012);
+ {$EXTERNALSYM ERROR_CANTREAD}
+
+//
+// MessageId: ERROR_CANTWRITE
+//
+// MessageText:
+//
+// The configuration registry key could not be written.
+//
+ ERROR_CANTWRITE = DWORD(1013);
+ {$EXTERNALSYM ERROR_CANTWRITE}
+
+//
+// MessageId: ERROR_REGISTRY_RECOVERED
+//
+// MessageText:
+//
+// One of the files in the registry database had to be recovered by use of a log or alternate copy. The recovery was successful.
+//
+ ERROR_REGISTRY_RECOVERED = DWORD(1014);
+ {$EXTERNALSYM ERROR_REGISTRY_RECOVERED}
+
+//
+// MessageId: ERROR_REGISTRY_CORRUPT
+//
+// MessageText:
+//
+// The registry is corrupted. The structure of one of the files containing registry data is corrupted, or the system's memory image of the file is corrupted, or the file could not be recovered because the alternate copy or log was absent or corrupted.
+//
+ ERROR_REGISTRY_CORRUPT = DWORD(1015);
+ {$EXTERNALSYM ERROR_REGISTRY_CORRUPT}
+
+//
+// MessageId: ERROR_REGISTRY_IO_FAILED
+//
+// MessageText:
+//
+// An I/O operation initiated by the registry failed unrecoverably. The registry could not read in, or write out, or flush, one of the files that contain the system's image of the registry.
+//
+ ERROR_REGISTRY_IO_FAILED = DWORD(1016);
+ {$EXTERNALSYM ERROR_REGISTRY_IO_FAILED}
+
+//
+// MessageId: ERROR_NOT_REGISTRY_FILE
+//
+// MessageText:
+//
+// The system has attempted to load or restore a file into the registry, but the specified file is not in a registry file format.
+//
+ ERROR_NOT_REGISTRY_FILE = DWORD(1017);
+ {$EXTERNALSYM ERROR_NOT_REGISTRY_FILE}
+
+//
+// MessageId: ERROR_KEY_DELETED
+//
+// MessageText:
+//
+// Illegal operation attempted on a registry key that has been marked for deletion.
+//
+ ERROR_KEY_DELETED = DWORD(1018);
+ {$EXTERNALSYM ERROR_KEY_DELETED}
+
+//
+// MessageId: ERROR_NO_LOG_SPACE
+//
+// MessageText:
+//
+// System could not allocate the required space in a registry log.
+//
+ ERROR_NO_LOG_SPACE = DWORD(1019);
+ {$EXTERNALSYM ERROR_NO_LOG_SPACE}
+
+//
+// MessageId: ERROR_KEY_HAS_CHILDREN
+//
+// MessageText:
+//
+// Cannot create a symbolic link in a registry key that already has subkeys or values.
+//
+ ERROR_KEY_HAS_CHILDREN = DWORD(1020);
+ {$EXTERNALSYM ERROR_KEY_HAS_CHILDREN}
+
+//
+// MessageId: ERROR_CHILD_MUST_BE_VOLATILE
+//
+// MessageText:
+//
+// Cannot create a stable subkey under a volatile parent key.
+//
+ ERROR_CHILD_MUST_BE_VOLATILE = DWORD(1021);
+ {$EXTERNALSYM ERROR_CHILD_MUST_BE_VOLATILE}
+
+//
+// MessageId: ERROR_NOTIFY_ENUM_DIR
+//
+// MessageText:
+//
+// A notify change request is being completed and the information is not being returned in the caller's buffer. The caller now needs to enumerate the files to find the changes.
+//
+ ERROR_NOTIFY_ENUM_DIR = DWORD(1022);
+ {$EXTERNALSYM ERROR_NOTIFY_ENUM_DIR}
+
+//
+// MessageId: ERROR_DEPENDENT_SERVICES_RUNNING
+//
+// MessageText:
+//
+// A stop control has been sent to a service that other running services are dependent on.
+//
+ ERROR_DEPENDENT_SERVICES_RUNNING = DWORD(1051);
+ {$EXTERNALSYM ERROR_DEPENDENT_SERVICES_RUNNING}
+
+//
+// MessageId: ERROR_INVALID_SERVICE_CONTROL
+//
+// MessageText:
+//
+// The requested control is not valid for this service.
+//
+ ERROR_INVALID_SERVICE_CONTROL = DWORD(1052);
+ {$EXTERNALSYM ERROR_INVALID_SERVICE_CONTROL}
+
+//
+// MessageId: ERROR_SERVICE_REQUEST_TIMEOUT
+//
+// MessageText:
+//
+// The service did not respond to the start or control request in a timely fashion.
+//
+ ERROR_SERVICE_REQUEST_TIMEOUT = DWORD(1053);
+ {$EXTERNALSYM ERROR_SERVICE_REQUEST_TIMEOUT}
+
+//
+// MessageId: ERROR_SERVICE_NO_THREAD
+//
+// MessageText:
+//
+// A thread could not be created for the service.
+//
+ ERROR_SERVICE_NO_THREAD = DWORD(1054);
+ {$EXTERNALSYM ERROR_SERVICE_NO_THREAD}
+
+//
+// MessageId: ERROR_SERVICE_DATABASE_LOCKED
+//
+// MessageText:
+//
+// The service database is locked.
+//
+ ERROR_SERVICE_DATABASE_LOCKED = DWORD(1055);
+ {$EXTERNALSYM ERROR_SERVICE_DATABASE_LOCKED}
+
+//
+// MessageId: ERROR_SERVICE_ALREADY_RUNNING
+//
+// MessageText:
+//
+// An instance of the service is already running.
+//
+ ERROR_SERVICE_ALREADY_RUNNING = DWORD(1056);
+ {$EXTERNALSYM ERROR_SERVICE_ALREADY_RUNNING}
+
+//
+// MessageId: ERROR_INVALID_SERVICE_ACCOUNT
+//
+// MessageText:
+//
+// The account name is invalid or does not exist, or the password is invalid for the account name specified.
+//
+ ERROR_INVALID_SERVICE_ACCOUNT = DWORD(1057);
+ {$EXTERNALSYM ERROR_INVALID_SERVICE_ACCOUNT}
+
+//
+// MessageId: ERROR_SERVICE_DISABLED
+//
+// MessageText:
+//
+// The service cannot be started, either because it is disabled or because it has no enabled devices associated with it.
+//
+ ERROR_SERVICE_DISABLED = DWORD(1058);
+ {$EXTERNALSYM ERROR_SERVICE_DISABLED}
+
+//
+// MessageId: ERROR_CIRCULAR_DEPENDENCY
+//
+// MessageText:
+//
+// Circular service dependency was specified.
+//
+ ERROR_CIRCULAR_DEPENDENCY = DWORD(1059);
+ {$EXTERNALSYM ERROR_CIRCULAR_DEPENDENCY}
+
+//
+// MessageId: ERROR_SERVICE_DOES_NOT_EXIST
+//
+// MessageText:
+//
+// The specified service does not exist as an installed service.
+//
+ ERROR_SERVICE_DOES_NOT_EXIST = DWORD(1060);
+ {$EXTERNALSYM ERROR_SERVICE_DOES_NOT_EXIST}
+
+//
+// MessageId: ERROR_SERVICE_CANNOT_ACCEPT_CTRL
+//
+// MessageText:
+//
+// The service cannot accept control messages at this time.
+//
+ ERROR_SERVICE_CANNOT_ACCEPT_CTRL = DWORD(1061);
+ {$EXTERNALSYM ERROR_SERVICE_CANNOT_ACCEPT_CTRL}
+
+//
+// MessageId: ERROR_SERVICE_NOT_ACTIVE
+//
+// MessageText:
+//
+// The service has not been started.
+//
+ ERROR_SERVICE_NOT_ACTIVE = DWORD(1062);
+ {$EXTERNALSYM ERROR_SERVICE_NOT_ACTIVE}
+
+//
+// MessageId: ERROR_FAILED_SERVICE_CONTROLLER_CONNECT
+//
+// MessageText:
+//
+// The service process could not connect to the service controller.
+//
+ ERROR_FAILED_SERVICE_CONTROLLER_CONNECT = DWORD(1063);
+ {$EXTERNALSYM ERROR_FAILED_SERVICE_CONTROLLER_CONNECT}
+
+//
+// MessageId: ERROR_EXCEPTION_IN_SERVICE
+//
+// MessageText:
+//
+// An exception occurred in the service when handling the control request.
+//
+ ERROR_EXCEPTION_IN_SERVICE = DWORD(1064);
+ {$EXTERNALSYM ERROR_EXCEPTION_IN_SERVICE}
+
+//
+// MessageId: ERROR_DATABASE_DOES_NOT_EXIST
+//
+// MessageText:
+//
+// The database specified does not exist.
+//
+ ERROR_DATABASE_DOES_NOT_EXIST = DWORD(1065);
+ {$EXTERNALSYM ERROR_DATABASE_DOES_NOT_EXIST}
+
+//
+// MessageId: ERROR_SERVICE_SPECIFIC_ERROR
+//
+// MessageText:
+//
+// The service has returned a service-specific error code.
+//
+ ERROR_SERVICE_SPECIFIC_ERROR = DWORD(1066);
+ {$EXTERNALSYM ERROR_SERVICE_SPECIFIC_ERROR}
+
+//
+// MessageId: ERROR_PROCESS_ABORTED
+//
+// MessageText:
+//
+// The process terminated unexpectedly.
+//
+ ERROR_PROCESS_ABORTED = DWORD(1067);
+ {$EXTERNALSYM ERROR_PROCESS_ABORTED}
+
+//
+// MessageId: ERROR_SERVICE_DEPENDENCY_FAIL
+//
+// MessageText:
+//
+// The dependency service or group failed to start.
+//
+ ERROR_SERVICE_DEPENDENCY_FAIL = DWORD(1068);
+ {$EXTERNALSYM ERROR_SERVICE_DEPENDENCY_FAIL}
+
+//
+// MessageId: ERROR_SERVICE_LOGON_FAILED
+//
+// MessageText:
+//
+// The service did not start due to a logon failure.
+//
+ ERROR_SERVICE_LOGON_FAILED = DWORD(1069);
+ {$EXTERNALSYM ERROR_SERVICE_LOGON_FAILED}
+
+//
+// MessageId: ERROR_SERVICE_START_HANG
+//
+// MessageText:
+//
+// After starting, the service hung in a start-pending state.
+//
+ ERROR_SERVICE_START_HANG = DWORD(1070);
+ {$EXTERNALSYM ERROR_SERVICE_START_HANG}
+
+//
+// MessageId: ERROR_INVALID_SERVICE_LOCK
+//
+// MessageText:
+//
+// The specified service database lock is invalid.
+//
+ ERROR_INVALID_SERVICE_LOCK = DWORD(1071);
+ {$EXTERNALSYM ERROR_INVALID_SERVICE_LOCK}
+
+//
+// MessageId: ERROR_SERVICE_MARKED_FOR_DELETE
+//
+// MessageText:
+//
+// The specified service has been marked for deletion.
+//
+ ERROR_SERVICE_MARKED_FOR_DELETE = DWORD(1072);
+ {$EXTERNALSYM ERROR_SERVICE_MARKED_FOR_DELETE}
+
+//
+// MessageId: ERROR_SERVICE_EXISTS
+//
+// MessageText:
+//
+// The specified service already exists.
+//
+ ERROR_SERVICE_EXISTS = DWORD(1073);
+ {$EXTERNALSYM ERROR_SERVICE_EXISTS}
+
+//
+// MessageId: ERROR_ALREADY_RUNNING_LKG
+//
+// MessageText:
+//
+// The system is currently running with the last-known-good configuration.
+//
+ ERROR_ALREADY_RUNNING_LKG = DWORD(1074);
+ {$EXTERNALSYM ERROR_ALREADY_RUNNING_LKG}
+
+//
+// MessageId: ERROR_SERVICE_DEPENDENCY_DELETED
+//
+// MessageText:
+//
+// The dependency service does not exist or has been marked for deletion.
+//
+ ERROR_SERVICE_DEPENDENCY_DELETED = DWORD(1075);
+ {$EXTERNALSYM ERROR_SERVICE_DEPENDENCY_DELETED}
+
+//
+// MessageId: ERROR_BOOT_ALREADY_ACCEPTED
+//
+// MessageText:
+//
+// The current boot has already been accepted for use as the last-known-good control set.
+//
+ ERROR_BOOT_ALREADY_ACCEPTED = DWORD(1076);
+ {$EXTERNALSYM ERROR_BOOT_ALREADY_ACCEPTED}
+
+//
+// MessageId: ERROR_SERVICE_NEVER_STARTED
+//
+// MessageText:
+//
+// No attempts to start the service have been made since the last boot.
+//
+ ERROR_SERVICE_NEVER_STARTED = DWORD(1077);
+ {$EXTERNALSYM ERROR_SERVICE_NEVER_STARTED}
+
+//
+// MessageId: ERROR_DUPLICATE_SERVICE_NAME
+//
+// MessageText:
+//
+// The name is already in use as either a service name or a service display name.
+//
+ ERROR_DUPLICATE_SERVICE_NAME = DWORD(1078);
+ {$EXTERNALSYM ERROR_DUPLICATE_SERVICE_NAME}
+
+//
+// MessageId: ERROR_DIFFERENT_SERVICE_ACCOUNT
+//
+// MessageText:
+//
+// The account specified for this service is different from the account specified for other services running in the same process.
+//
+ ERROR_DIFFERENT_SERVICE_ACCOUNT = DWORD(1079);
+ {$EXTERNALSYM ERROR_DIFFERENT_SERVICE_ACCOUNT}
+
+//
+// MessageId: ERROR_CANNOT_DETECT_DRIVER_FAILURE
+//
+// MessageText:
+//
+// Failure actions can only be set for Win32 services, not for drivers.
+//
+ ERROR_CANNOT_DETECT_DRIVER_FAILURE = DWORD(1080);
+ {$EXTERNALSYM ERROR_CANNOT_DETECT_DRIVER_FAILURE}
+
+//
+// MessageId: ERROR_CANNOT_DETECT_PROCESS_ABORT
+//
+// MessageText:
+//
+// This service runs in the same process as the service control manager.
+// Therefore, the service control manager cannot take action if this service's process terminates unexpectedly.
+//
+ ERROR_CANNOT_DETECT_PROCESS_ABORT = DWORD(1081);
+ {$EXTERNALSYM ERROR_CANNOT_DETECT_PROCESS_ABORT}
+
+//
+// MessageId: ERROR_NO_RECOVERY_PROGRAM
+//
+// MessageText:
+//
+// No recovery program has been configured for this service.
+//
+ ERROR_NO_RECOVERY_PROGRAM = DWORD(1082);
+ {$EXTERNALSYM ERROR_NO_RECOVERY_PROGRAM}
+
+//
+// MessageId: ERROR_SERVICE_NOT_IN_EXE
+//
+// MessageText:
+//
+// The executable program that this service is configured to run in does not implement the service.
+//
+ ERROR_SERVICE_NOT_IN_EXE = DWORD(1083);
+ {$EXTERNALSYM ERROR_SERVICE_NOT_IN_EXE}
+
+//
+// MessageId: ERROR_NOT_SAFEBOOT_SERVICE
+//
+// MessageText:
+//
+// This service cannot be started in Safe Mode
+//
+ ERROR_NOT_SAFEBOOT_SERVICE = DWORD(1084);
+ {$EXTERNALSYM ERROR_NOT_SAFEBOOT_SERVICE}
+
+//
+// MessageId: ERROR_END_OF_MEDIA
+//
+// MessageText:
+//
+// The physical end of the tape has been reached.
+//
+ ERROR_END_OF_MEDIA = DWORD(1100);
+ {$EXTERNALSYM ERROR_END_OF_MEDIA}
+
+//
+// MessageId: ERROR_FILEMARK_DETECTED
+//
+// MessageText:
+//
+// A tape access reached a filemark.
+//
+ ERROR_FILEMARK_DETECTED = DWORD(1101);
+ {$EXTERNALSYM ERROR_FILEMARK_DETECTED}
+
+//
+// MessageId: ERROR_BEGINNING_OF_MEDIA
+//
+// MessageText:
+//
+// The beginning of the tape or a partition was encountered.
+//
+ ERROR_BEGINNING_OF_MEDIA = DWORD(1102);
+ {$EXTERNALSYM ERROR_BEGINNING_OF_MEDIA}
+
+//
+// MessageId: ERROR_SETMARK_DETECTED
+//
+// MessageText:
+//
+// A tape access reached the end of a set of files.
+//
+ ERROR_SETMARK_DETECTED = DWORD(1103);
+ {$EXTERNALSYM ERROR_SETMARK_DETECTED}
+
+//
+// MessageId: ERROR_NO_DATA_DETECTED
+//
+// MessageText:
+//
+// No more data is on the tape.
+//
+ ERROR_NO_DATA_DETECTED = DWORD(1104);
+ {$EXTERNALSYM ERROR_NO_DATA_DETECTED}
+
+//
+// MessageId: ERROR_PARTITION_FAILURE
+//
+// MessageText:
+//
+// Tape could not be partitioned.
+//
+ ERROR_PARTITION_FAILURE = DWORD(1105);
+ {$EXTERNALSYM ERROR_PARTITION_FAILURE}
+
+//
+// MessageId: ERROR_INVALID_BLOCK_LENGTH
+//
+// MessageText:
+//
+// When accessing a new tape of a multivolume partition, the current block size is incorrect.
+//
+ ERROR_INVALID_BLOCK_LENGTH = DWORD(1106);
+ {$EXTERNALSYM ERROR_INVALID_BLOCK_LENGTH}
+
+//
+// MessageId: ERROR_DEVICE_NOT_PARTITIONED
+//
+// MessageText:
+//
+// Tape partition information could not be found when loading a tape.
+//
+ ERROR_DEVICE_NOT_PARTITIONED = DWORD(1107);
+ {$EXTERNALSYM ERROR_DEVICE_NOT_PARTITIONED}
+
+//
+// MessageId: ERROR_UNABLE_TO_LOCK_MEDIA
+//
+// MessageText:
+//
+// Unable to lock the media eject mechanism.
+//
+ ERROR_UNABLE_TO_LOCK_MEDIA = DWORD(1108);
+ {$EXTERNALSYM ERROR_UNABLE_TO_LOCK_MEDIA}
+
+//
+// MessageId: ERROR_UNABLE_TO_UNLOAD_MEDIA
+//
+// MessageText:
+//
+// Unable to unload the media.
+//
+ ERROR_UNABLE_TO_UNLOAD_MEDIA = DWORD(1109);
+ {$EXTERNALSYM ERROR_UNABLE_TO_UNLOAD_MEDIA}
+
+//
+// MessageId: ERROR_MEDIA_CHANGED
+//
+// MessageText:
+//
+// The media in the drive may have changed.
+//
+ ERROR_MEDIA_CHANGED = DWORD(1110);
+ {$EXTERNALSYM ERROR_MEDIA_CHANGED}
+
+//
+// MessageId: ERROR_BUS_RESET
+//
+// MessageText:
+//
+// The I/O bus was reset.
+//
+ ERROR_BUS_RESET = DWORD(1111);
+ {$EXTERNALSYM ERROR_BUS_RESET}
+
+//
+// MessageId: ERROR_NO_MEDIA_IN_DRIVE
+//
+// MessageText:
+//
+// No media in drive.
+//
+ ERROR_NO_MEDIA_IN_DRIVE = DWORD(1112);
+ {$EXTERNALSYM ERROR_NO_MEDIA_IN_DRIVE}
+
+//
+// MessageId: ERROR_NO_UNICODE_TRANSLATION
+//
+// MessageText:
+//
+// No mapping for the Unicode character exists in the target multi-byte code page.
+//
+ ERROR_NO_UNICODE_TRANSLATION = DWORD(1113);
+ {$EXTERNALSYM ERROR_NO_UNICODE_TRANSLATION}
+
+//
+// MessageId: ERROR_DLL_INIT_FAILED
+//
+// MessageText:
+//
+// A dynamic link library (DLL) initialization routine failed.
+//
+ ERROR_DLL_INIT_FAILED = DWORD(1114);
+ {$EXTERNALSYM ERROR_DLL_INIT_FAILED}
+
+//
+// MessageId: ERROR_SHUTDOWN_IN_PROGRESS
+//
+// MessageText:
+//
+// A system shutdown is in progress.
+//
+ ERROR_SHUTDOWN_IN_PROGRESS = DWORD(1115);
+ {$EXTERNALSYM ERROR_SHUTDOWN_IN_PROGRESS}
+
+//
+// MessageId: ERROR_NO_SHUTDOWN_IN_PROGRESS
+//
+// MessageText:
+//
+// Unable to abort the system shutdown because no shutdown was in progress.
+//
+ ERROR_NO_SHUTDOWN_IN_PROGRESS = DWORD(1116);
+ {$EXTERNALSYM ERROR_NO_SHUTDOWN_IN_PROGRESS}
+
+//
+// MessageId: ERROR_IO_DEVICE
+//
+// MessageText:
+//
+// The request could not be performed because of an I/O device error.
+//
+ ERROR_IO_DEVICE = DWORD(1117);
+ {$EXTERNALSYM ERROR_IO_DEVICE}
+
+//
+// MessageId: ERROR_SERIAL_NO_DEVICE
+//
+// MessageText:
+//
+// No serial device was successfully initialized. The serial driver will unload.
+//
+ ERROR_SERIAL_NO_DEVICE = DWORD(1118);
+ {$EXTERNALSYM ERROR_SERIAL_NO_DEVICE}
+
+//
+// MessageId: ERROR_IRQ_BUSY
+//
+// MessageText:
+//
+// Unable to open a device that was sharing an interrupt request (IRQ) with other devices. At least one other device that uses that IRQ was already opened.
+//
+ ERROR_IRQ_BUSY = DWORD(1119);
+ {$EXTERNALSYM ERROR_IRQ_BUSY}
+
+//
+// MessageId: ERROR_MORE_WRITES
+//
+// MessageText:
+//
+// A serial I/O operation was completed by another write to the serial port.
+// (The IOCTL_SERIAL_XOFF_COUNTER reached zero.)
+//
+ ERROR_MORE_WRITES = DWORD(1120);
+ {$EXTERNALSYM ERROR_MORE_WRITES}
+
+//
+// MessageId: ERROR_COUNTER_TIMEOUT
+//
+// MessageText:
+//
+// A serial I/O operation completed because the timeout period expired.
+// (The IOCTL_SERIAL_XOFF_COUNTER did not reach zero.)
+//
+ ERROR_COUNTER_TIMEOUT = DWORD(1121);
+ {$EXTERNALSYM ERROR_COUNTER_TIMEOUT}
+
+//
+// MessageId: ERROR_FLOPPY_ID_MARK_NOT_FOUND
+//
+// MessageText:
+//
+// No ID address mark was found on the floppy disk.
+//
+ ERROR_FLOPPY_ID_MARK_NOT_FOUND = DWORD(1122);
+ {$EXTERNALSYM ERROR_FLOPPY_ID_MARK_NOT_FOUND}
+
+//
+// MessageId: ERROR_FLOPPY_WRONG_CYLINDER
+//
+// MessageText:
+//
+// Mismatch between the floppy disk sector ID field and the floppy disk controller track address.
+//
+ ERROR_FLOPPY_WRONG_CYLINDER = DWORD(1123);
+ {$EXTERNALSYM ERROR_FLOPPY_WRONG_CYLINDER}
+
+//
+// MessageId: ERROR_FLOPPY_UNKNOWN_ERROR
+//
+// MessageText:
+//
+// The floppy disk controller reported an error that is not recognized by the floppy disk driver.
+//
+ ERROR_FLOPPY_UNKNOWN_ERROR = DWORD(1124);
+ {$EXTERNALSYM ERROR_FLOPPY_UNKNOWN_ERROR}
+
+//
+// MessageId: ERROR_FLOPPY_BAD_REGISTERS
+//
+// MessageText:
+//
+// The floppy disk controller returned inconsistent results in its registers.
+//
+ ERROR_FLOPPY_BAD_REGISTERS = DWORD(1125);
+ {$EXTERNALSYM ERROR_FLOPPY_BAD_REGISTERS}
+
+//
+// MessageId: ERROR_DISK_RECALIBRATE_FAILED
+//
+// MessageText:
+//
+// While accessing the hard disk, a recalibrate operation failed, even after retries.
+//
+ ERROR_DISK_RECALIBRATE_FAILED = DWORD(1126);
+ {$EXTERNALSYM ERROR_DISK_RECALIBRATE_FAILED}
+
+//
+// MessageId: ERROR_DISK_OPERATION_FAILED
+//
+// MessageText:
+//
+// While accessing the hard disk, a disk operation failed even after retries.
+//
+ ERROR_DISK_OPERATION_FAILED = DWORD(1127);
+ {$EXTERNALSYM ERROR_DISK_OPERATION_FAILED}
+
+//
+// MessageId: ERROR_DISK_RESET_FAILED
+//
+// MessageText:
+//
+// While accessing the hard disk, a disk controller reset was needed, but even that failed.
+//
+ ERROR_DISK_RESET_FAILED = DWORD(1128);
+ {$EXTERNALSYM ERROR_DISK_RESET_FAILED}
+
+//
+// MessageId: ERROR_EOM_OVERFLOW
+//
+// MessageText:
+//
+// Physical end of tape encountered.
+//
+ ERROR_EOM_OVERFLOW = DWORD(1129);
+ {$EXTERNALSYM ERROR_EOM_OVERFLOW}
+
+//
+// MessageId: ERROR_NOT_ENOUGH_SERVER_MEMORY
+//
+// MessageText:
+//
+// Not enough server storage is available to process this command.
+//
+ ERROR_NOT_ENOUGH_SERVER_MEMORY = DWORD(1130);
+ {$EXTERNALSYM ERROR_NOT_ENOUGH_SERVER_MEMORY}
+
+//
+// MessageId: ERROR_POSSIBLE_DEADLOCK
+//
+// MessageText:
+//
+// A potential deadlock condition has been detected.
+//
+ ERROR_POSSIBLE_DEADLOCK = DWORD(1131);
+ {$EXTERNALSYM ERROR_POSSIBLE_DEADLOCK}
+
+//
+// MessageId: ERROR_MAPPED_ALIGNMENT
+//
+// MessageText:
+//
+// The base address or the file offset specified does not have the proper alignment.
+//
+ ERROR_MAPPED_ALIGNMENT = DWORD(1132);
+ {$EXTERNALSYM ERROR_MAPPED_ALIGNMENT}
+
+//
+// MessageId: ERROR_SET_POWER_STATE_VETOED
+//
+// MessageText:
+//
+// An attempt to change the system power state was vetoed by another application or driver.
+//
+ ERROR_SET_POWER_STATE_VETOED = DWORD(1140);
+ {$EXTERNALSYM ERROR_SET_POWER_STATE_VETOED}
+
+//
+// MessageId: ERROR_SET_POWER_STATE_FAILED
+//
+// MessageText:
+//
+// The system BIOS failed an attempt to change the system power state.
+//
+ ERROR_SET_POWER_STATE_FAILED = DWORD(1141);
+ {$EXTERNALSYM ERROR_SET_POWER_STATE_FAILED}
+
+//
+// MessageId: ERROR_TOO_MANY_LINKS
+//
+// MessageText:
+//
+// An attempt was made to create more links on a file than the file system supports.
+//
+ ERROR_TOO_MANY_LINKS = DWORD(1142);
+ {$EXTERNALSYM ERROR_TOO_MANY_LINKS}
+
+//
+// MessageId: ERROR_OLD_WIN_VERSION
+//
+// MessageText:
+//
+// The specified program requires a newer version of Windows.
+//
+ ERROR_OLD_WIN_VERSION = DWORD(1150);
+ {$EXTERNALSYM ERROR_OLD_WIN_VERSION}
+
+//
+// MessageId: ERROR_APP_WRONG_OS
+//
+// MessageText:
+//
+// The specified program is not a Windows or MS-DOS program.
+//
+ ERROR_APP_WRONG_OS = DWORD(1151);
+ {$EXTERNALSYM ERROR_APP_WRONG_OS}
+
+//
+// MessageId: ERROR_SINGLE_INSTANCE_APP
+//
+// MessageText:
+//
+// Cannot start more than one instance of the specified program.
+//
+ ERROR_SINGLE_INSTANCE_APP = DWORD(1152);
+ {$EXTERNALSYM ERROR_SINGLE_INSTANCE_APP}
+
+//
+// MessageId: ERROR_RMODE_APP
+//
+// MessageText:
+//
+// The specified program was written for an earlier version of Windows.
+//
+ ERROR_RMODE_APP = DWORD(1153);
+ {$EXTERNALSYM ERROR_RMODE_APP}
+
+//
+// MessageId: ERROR_INVALID_DLL
+//
+// MessageText:
+//
+// One of the library files needed to run this application is damaged.
+//
+ ERROR_INVALID_DLL = DWORD(1154);
+ {$EXTERNALSYM ERROR_INVALID_DLL}
+
+//
+// MessageId: ERROR_NO_ASSOCIATION
+//
+// MessageText:
+//
+// No application is associated with the specified file for this operation.
+//
+ ERROR_NO_ASSOCIATION = DWORD(1155);
+ {$EXTERNALSYM ERROR_NO_ASSOCIATION}
+
+//
+// MessageId: ERROR_DDE_FAIL
+//
+// MessageText:
+//
+// An error occurred in sending the command to the application.
+//
+ ERROR_DDE_FAIL = DWORD(1156);
+ {$EXTERNALSYM ERROR_DDE_FAIL}
+
+//
+// MessageId: ERROR_DLL_NOT_FOUND
+//
+// MessageText:
+//
+// One of the library files needed to run this application cannot be found.
+//
+ ERROR_DLL_NOT_FOUND = DWORD(1157);
+ {$EXTERNALSYM ERROR_DLL_NOT_FOUND}
+
+//
+// MessageId: ERROR_NO_MORE_USER_HANDLES
+//
+// MessageText:
+//
+// The current process has used all of its system allowance of handles for Window Manager objects.
+//
+ ERROR_NO_MORE_USER_HANDLES = DWORD(1158);
+ {$EXTERNALSYM ERROR_NO_MORE_USER_HANDLES}
+
+//
+// MessageId: ERROR_MESSAGE_SYNC_ONLY
+//
+// MessageText:
+//
+// The message can be used only with synchronous operations.
+//
+ ERROR_MESSAGE_SYNC_ONLY = DWORD(1159);
+ {$EXTERNALSYM ERROR_MESSAGE_SYNC_ONLY}
+
+//
+// MessageId: ERROR_SOURCE_ELEMENT_EMPTY
+//
+// MessageText:
+//
+// The indicated source element has no media.
+//
+ ERROR_SOURCE_ELEMENT_EMPTY = DWORD(1160);
+ {$EXTERNALSYM ERROR_SOURCE_ELEMENT_EMPTY}
+
+//
+// MessageId: ERROR_DESTINATION_ELEMENT_FULL
+//
+// MessageText:
+//
+// The indicated destination element already contains media.
+//
+ ERROR_DESTINATION_ELEMENT_FULL = DWORD(1161);
+ {$EXTERNALSYM ERROR_DESTINATION_ELEMENT_FULL}
+
+//
+// MessageId: ERROR_ILLEGAL_ELEMENT_ADDRESS
+//
+// MessageText:
+//
+// The indicated element does not exist.
+//
+ ERROR_ILLEGAL_ELEMENT_ADDRESS = DWORD(1162);
+ {$EXTERNALSYM ERROR_ILLEGAL_ELEMENT_ADDRESS}
+
+//
+// MessageId: ERROR_MAGAZINE_NOT_PRESENT
+//
+// MessageText:
+//
+// The indicated element is part of a magazine that is not present.
+//
+ ERROR_MAGAZINE_NOT_PRESENT = DWORD(1163);
+ {$EXTERNALSYM ERROR_MAGAZINE_NOT_PRESENT}
+
+//
+// MessageId: ERROR_DEVICE_REINITIALIZATION_NEEDED
+//
+// MessageText:
+//
+// The indicated device requires reinitialization due to hardware errors.
+//
+ ERROR_DEVICE_REINITIALIZATION_NEEDED = DWORD(1164); // dderror
+ {$EXTERNALSYM ERROR_DEVICE_REINITIALIZATION_NEEDED}
+
+//
+// MessageId: ERROR_DEVICE_REQUIRES_CLEANING
+//
+// MessageText:
+//
+// The device has indicated that cleaning is required before further operations are attempted.
+//
+ ERROR_DEVICE_REQUIRES_CLEANING = DWORD(1165);
+ {$EXTERNALSYM ERROR_DEVICE_REQUIRES_CLEANING}
+
+//
+// MessageId: ERROR_DEVICE_DOOR_OPEN
+//
+// MessageText:
+//
+// The device has indicated that its door is open.
+//
+ ERROR_DEVICE_DOOR_OPEN = DWORD(1166);
+ {$EXTERNALSYM ERROR_DEVICE_DOOR_OPEN}
+
+//
+// MessageId: ERROR_DEVICE_NOT_CONNECTED
+//
+// MessageText:
+//
+// The device is not connected.
+//
+ ERROR_DEVICE_NOT_CONNECTED = DWORD(1167);
+ {$EXTERNALSYM ERROR_DEVICE_NOT_CONNECTED}
+
+//
+// MessageId: ERROR_NOT_FOUND
+//
+// MessageText:
+//
+// Element not found.
+//
+ ERROR_NOT_FOUND = DWORD(1168);
+ {$EXTERNALSYM ERROR_NOT_FOUND}
+
+//
+// MessageId: ERROR_NO_MATCH
+//
+// MessageText:
+//
+// There was no match for the specified key in the index.
+//
+ ERROR_NO_MATCH = DWORD(1169);
+ {$EXTERNALSYM ERROR_NO_MATCH}
+
+//
+// MessageId: ERROR_SET_NOT_FOUND
+//
+// MessageText:
+//
+// The property set specified does not exist on the object.
+//
+ ERROR_SET_NOT_FOUND = DWORD(1170);
+ {$EXTERNALSYM ERROR_SET_NOT_FOUND}
+
+//
+// MessageId: ERROR_POINT_NOT_FOUND
+//
+// MessageText:
+//
+// The point passed to GetMouseMovePoints is not in the buffer.
+//
+ ERROR_POINT_NOT_FOUND = DWORD(1171);
+ {$EXTERNALSYM ERROR_POINT_NOT_FOUND}
+
+//
+// MessageId: ERROR_NO_TRACKING_SERVICE
+//
+// MessageText:
+//
+// The tracking (workstation) service is not running.
+//
+ ERROR_NO_TRACKING_SERVICE = DWORD(1172);
+ {$EXTERNALSYM ERROR_NO_TRACKING_SERVICE}
+
+//
+// MessageId: ERROR_NO_VOLUME_ID
+//
+// MessageText:
+//
+// The Volume ID could not be found.
+//
+ ERROR_NO_VOLUME_ID = DWORD(1173);
+ {$EXTERNALSYM ERROR_NO_VOLUME_ID}
+
+//
+// MessageId: ERROR_UNABLE_TO_REMOVE_REPLACED
+//
+// MessageText:
+//
+// Unable to remove the file to be replaced.
+//
+ ERROR_UNABLE_TO_REMOVE_REPLACED = DWORD(1175);
+ {$EXTERNALSYM ERROR_UNABLE_TO_REMOVE_REPLACED}
+
+//
+// MessageId: ERROR_UNABLE_TO_MOVE_REPLACEMENT
+//
+// MessageText:
+//
+// Unable to move the replacement file to the file to be replaced. The file to be replaced has retained its original name.
+//
+ ERROR_UNABLE_TO_MOVE_REPLACEMENT = DWORD(1176);
+ {$EXTERNALSYM ERROR_UNABLE_TO_MOVE_REPLACEMENT}
+
+//
+// MessageId: ERROR_UNABLE_TO_MOVE_REPLACEMENT_2
+//
+// MessageText:
+//
+// Unable to move the replacement file to the file to be replaced. The file to be replaced has been renamed using the backup name.
+//
+ ERROR_UNABLE_TO_MOVE_REPLACEMENT_2 = DWORD(1177);
+ {$EXTERNALSYM ERROR_UNABLE_TO_MOVE_REPLACEMENT_2}
+
+//
+// MessageId: ERROR_JOURNAL_DELETE_IN_PROGRESS
+//
+// MessageText:
+//
+// The volume change journal is being deleted.
+//
+ ERROR_JOURNAL_DELETE_IN_PROGRESS = DWORD(1178);
+ {$EXTERNALSYM ERROR_JOURNAL_DELETE_IN_PROGRESS}
+
+//
+// MessageId: ERROR_JOURNAL_NOT_ACTIVE
+//
+// MessageText:
+//
+// The volume change journal is not active.
+//
+ ERROR_JOURNAL_NOT_ACTIVE = DWORD(1179);
+ {$EXTERNALSYM ERROR_JOURNAL_NOT_ACTIVE}
+
+//
+// MessageId: ERROR_POTENTIAL_FILE_FOUND
+//
+// MessageText:
+//
+// A file was found, but it may not be the correct file.
+//
+ ERROR_POTENTIAL_FILE_FOUND = DWORD(1180);
+ {$EXTERNALSYM ERROR_POTENTIAL_FILE_FOUND}
+
+//
+// MessageId: ERROR_JOURNAL_ENTRY_DELETED
+//
+// MessageText:
+//
+// The journal entry has been deleted from the journal.
+//
+ ERROR_JOURNAL_ENTRY_DELETED = DWORD(1181);
+ {$EXTERNALSYM ERROR_JOURNAL_ENTRY_DELETED}
+
+//
+// MessageId: ERROR_BAD_DEVICE
+//
+// MessageText:
+//
+// The specified device name is invalid.
+//
+ ERROR_BAD_DEVICE = DWORD(1200);
+ {$EXTERNALSYM ERROR_BAD_DEVICE}
+
+//
+// MessageId: ERROR_CONNECTION_UNAVAIL
+//
+// MessageText:
+//
+// The device is not currently connected but it is a remembered connection.
+//
+ ERROR_CONNECTION_UNAVAIL = DWORD(1201);
+ {$EXTERNALSYM ERROR_CONNECTION_UNAVAIL}
+
+//
+// MessageId: ERROR_DEVICE_ALREADY_REMEMBERED
+//
+// MessageText:
+//
+// The local device name has a remembered connection to another network resource.
+//
+ ERROR_DEVICE_ALREADY_REMEMBERED = DWORD(1202);
+ {$EXTERNALSYM ERROR_DEVICE_ALREADY_REMEMBERED}
+
+//
+// MessageId: ERROR_NO_NET_OR_BAD_PATH
+//
+// MessageText:
+//
+// No network provider accepted the given network path.
+//
+ ERROR_NO_NET_OR_BAD_PATH = DWORD(1203);
+ {$EXTERNALSYM ERROR_NO_NET_OR_BAD_PATH}
+
+//
+// MessageId: ERROR_BAD_PROVIDER
+//
+// MessageText:
+//
+// The specified network provider name is invalid.
+//
+ ERROR_BAD_PROVIDER = DWORD(1204);
+ {$EXTERNALSYM ERROR_BAD_PROVIDER}
+
+//
+// MessageId: ERROR_CANNOT_OPEN_PROFILE
+//
+// MessageText:
+//
+// Unable to open the network connection profile.
+//
+ ERROR_CANNOT_OPEN_PROFILE = DWORD(1205);
+ {$EXTERNALSYM ERROR_CANNOT_OPEN_PROFILE}
+
+//
+// MessageId: ERROR_BAD_PROFILE
+//
+// MessageText:
+//
+// The network connection profile is corrupted.
+//
+ ERROR_BAD_PROFILE = DWORD(1206);
+ {$EXTERNALSYM ERROR_BAD_PROFILE}
+
+//
+// MessageId: ERROR_NOT_CONTAINER
+//
+// MessageText:
+//
+// Cannot enumerate a noncontainer.
+//
+ ERROR_NOT_CONTAINER = DWORD(1207);
+ {$EXTERNALSYM ERROR_NOT_CONTAINER}
+
+//
+// MessageId: ERROR_EXTENDED_ERROR
+//
+// MessageText:
+//
+// An extended error has occurred.
+//
+ ERROR_EXTENDED_ERROR = DWORD(1208);
+ {$EXTERNALSYM ERROR_EXTENDED_ERROR}
+
+//
+// MessageId: ERROR_INVALID_GROUPNAME
+//
+// MessageText:
+//
+// The format of the specified group name is invalid.
+//
+ ERROR_INVALID_GROUPNAME = DWORD(1209);
+ {$EXTERNALSYM ERROR_INVALID_GROUPNAME}
+
+//
+// MessageId: ERROR_INVALID_COMPUTERNAME
+//
+// MessageText:
+//
+// The format of the specified computer name is invalid.
+//
+ ERROR_INVALID_COMPUTERNAME = DWORD(1210);
+ {$EXTERNALSYM ERROR_INVALID_COMPUTERNAME}
+
+//
+// MessageId: ERROR_INVALID_EVENTNAME
+//
+// MessageText:
+//
+// The format of the specified event name is invalid.
+//
+ ERROR_INVALID_EVENTNAME = DWORD(1211);
+ {$EXTERNALSYM ERROR_INVALID_EVENTNAME}
+
+//
+// MessageId: ERROR_INVALID_DOMAINNAME
+//
+// MessageText:
+//
+// The format of the specified domain name is invalid.
+//
+ ERROR_INVALID_DOMAINNAME = DWORD(1212);
+ {$EXTERNALSYM ERROR_INVALID_DOMAINNAME}
+
+//
+// MessageId: ERROR_INVALID_SERVICENAME
+//
+// MessageText:
+//
+// The format of the specified service name is invalid.
+//
+ ERROR_INVALID_SERVICENAME = DWORD(1213);
+ {$EXTERNALSYM ERROR_INVALID_SERVICENAME}
+
+//
+// MessageId: ERROR_INVALID_NETNAME
+//
+// MessageText:
+//
+// The format of the specified network name is invalid.
+//
+ ERROR_INVALID_NETNAME = DWORD(1214);
+ {$EXTERNALSYM ERROR_INVALID_NETNAME}
+
+//
+// MessageId: ERROR_INVALID_SHARENAME
+//
+// MessageText:
+//
+// The format of the specified share name is invalid.
+//
+ ERROR_INVALID_SHARENAME = DWORD(1215);
+ {$EXTERNALSYM ERROR_INVALID_SHARENAME}
+
+//
+// MessageId: ERROR_INVALID_PASSWORDNAME
+//
+// MessageText:
+//
+// The format of the specified password is invalid.
+//
+ ERROR_INVALID_PASSWORDNAME = DWORD(1216);
+ {$EXTERNALSYM ERROR_INVALID_PASSWORDNAME}
+
+//
+// MessageId: ERROR_INVALID_MESSAGENAME
+//
+// MessageText:
+//
+// The format of the specified message name is invalid.
+//
+ ERROR_INVALID_MESSAGENAME = DWORD(1217);
+ {$EXTERNALSYM ERROR_INVALID_MESSAGENAME}
+
+//
+// MessageId: ERROR_INVALID_MESSAGEDEST
+//
+// MessageText:
+//
+// The format of the specified message destination is invalid.
+//
+ ERROR_INVALID_MESSAGEDEST = DWORD(1218);
+ {$EXTERNALSYM ERROR_INVALID_MESSAGEDEST}
+
+//
+// MessageId: ERROR_SESSION_CREDENTIAL_CONFLICT
+//
+// MessageText:
+//
+// Multiple connections to a server or shared resource by the same user, using more than one user name, are not allowed. Disconnect all previous connections to the server or shared resource and try again.
+//
+ ERROR_SESSION_CREDENTIAL_CONFLICT = DWORD(1219);
+ {$EXTERNALSYM ERROR_SESSION_CREDENTIAL_CONFLICT}
+
+//
+// MessageId: ERROR_REMOTE_SESSION_LIMIT_EXCEEDED
+//
+// MessageText:
+//
+// An attempt was made to establish a session to a network server, but there are already too many sessions established to that server.
+//
+ ERROR_REMOTE_SESSION_LIMIT_EXCEEDED = DWORD(1220);
+ {$EXTERNALSYM ERROR_REMOTE_SESSION_LIMIT_EXCEEDED}
+
+//
+// MessageId: ERROR_DUP_DOMAINNAME
+//
+// MessageText:
+//
+// The workgroup or domain name is already in use by another computer on the network.
+//
+ ERROR_DUP_DOMAINNAME = DWORD(1221);
+ {$EXTERNALSYM ERROR_DUP_DOMAINNAME}
+
+//
+// MessageId: ERROR_NO_NETWORK
+//
+// MessageText:
+//
+// The network is not present or not started.
+//
+ ERROR_NO_NETWORK = DWORD(1222);
+ {$EXTERNALSYM ERROR_NO_NETWORK}
+
+//
+// MessageId: ERROR_CANCELLED
+//
+// MessageText:
+//
+// The operation was canceled by the user.
+//
+ ERROR_CANCELLED = DWORD(1223);
+ {$EXTERNALSYM ERROR_CANCELLED}
+
+//
+// MessageId: ERROR_USER_MAPPED_FILE
+//
+// MessageText:
+//
+// The requested operation cannot be performed on a file with a user-mapped section open.
+//
+ ERROR_USER_MAPPED_FILE = DWORD(1224);
+ {$EXTERNALSYM ERROR_USER_MAPPED_FILE}
+
+//
+// MessageId: ERROR_CONNECTION_REFUSED
+//
+// MessageText:
+//
+// The remote system refused the network connection.
+//
+ ERROR_CONNECTION_REFUSED = DWORD(1225);
+ {$EXTERNALSYM ERROR_CONNECTION_REFUSED}
+
+//
+// MessageId: ERROR_GRACEFUL_DISCONNECT
+//
+// MessageText:
+//
+// The network connection was gracefully closed.
+//
+ ERROR_GRACEFUL_DISCONNECT = DWORD(1226);
+ {$EXTERNALSYM ERROR_GRACEFUL_DISCONNECT}
+
+//
+// MessageId: ERROR_ADDRESS_ALREADY_ASSOCIATED
+//
+// MessageText:
+//
+// The network transport endpoint already has an address associated with it.
+//
+ ERROR_ADDRESS_ALREADY_ASSOCIATED = DWORD(1227);
+ {$EXTERNALSYM ERROR_ADDRESS_ALREADY_ASSOCIATED}
+
+//
+// MessageId: ERROR_ADDRESS_NOT_ASSOCIATED
+//
+// MessageText:
+//
+// An address has not yet been associated with the network endpoint.
+//
+ ERROR_ADDRESS_NOT_ASSOCIATED = DWORD(1228);
+ {$EXTERNALSYM ERROR_ADDRESS_NOT_ASSOCIATED}
+
+//
+// MessageId: ERROR_CONNECTION_INVALID
+//
+// MessageText:
+//
+// An operation was attempted on a nonexistent network connection.
+//
+ ERROR_CONNECTION_INVALID = DWORD(1229);
+ {$EXTERNALSYM ERROR_CONNECTION_INVALID}
+
+//
+// MessageId: ERROR_CONNECTION_ACTIVE
+//
+// MessageText:
+//
+// An invalid operation was attempted on an active network connection.
+//
+ ERROR_CONNECTION_ACTIVE = DWORD(1230);
+ {$EXTERNALSYM ERROR_CONNECTION_ACTIVE}
+
+//
+// MessageId: ERROR_NETWORK_UNREACHABLE
+//
+// MessageText:
+//
+// The network location cannot be reached. For information about network troubleshooting, see Windows Help.
+//
+ ERROR_NETWORK_UNREACHABLE = DWORD(1231);
+ {$EXTERNALSYM ERROR_NETWORK_UNREACHABLE}
+
+//
+// MessageId: ERROR_HOST_UNREACHABLE
+//
+// MessageText:
+//
+// The network location cannot be reached. For information about network troubleshooting, see Windows Help.
+//
+ ERROR_HOST_UNREACHABLE = DWORD(1232);
+ {$EXTERNALSYM ERROR_HOST_UNREACHABLE}
+
+//
+// MessageId: ERROR_PROTOCOL_UNREACHABLE
+//
+// MessageText:
+//
+// The network location cannot be reached. For information about network troubleshooting, see Windows Help.
+//
+ ERROR_PROTOCOL_UNREACHABLE = DWORD(1233);
+ {$EXTERNALSYM ERROR_PROTOCOL_UNREACHABLE}
+
+//
+// MessageId: ERROR_PORT_UNREACHABLE
+//
+// MessageText:
+//
+// No service is operating at the destination network endpoint on the remote system.
+//
+ ERROR_PORT_UNREACHABLE = DWORD(1234);
+ {$EXTERNALSYM ERROR_PORT_UNREACHABLE}
+
+//
+// MessageId: ERROR_REQUEST_ABORTED
+//
+// MessageText:
+//
+// The request was aborted.
+//
+ ERROR_REQUEST_ABORTED = DWORD(1235);
+ {$EXTERNALSYM ERROR_REQUEST_ABORTED}
+
+//
+// MessageId: ERROR_CONNECTION_ABORTED
+//
+// MessageText:
+//
+// The network connection was aborted by the local system.
+//
+ ERROR_CONNECTION_ABORTED = DWORD(1236);
+ {$EXTERNALSYM ERROR_CONNECTION_ABORTED}
+
+//
+// MessageId: ERROR_RETRY
+//
+// MessageText:
+//
+// The operation could not be completed. A retry should be performed.
+//
+ ERROR_RETRY = DWORD(1237);
+ {$EXTERNALSYM ERROR_RETRY}
+
+//
+// MessageId: ERROR_CONNECTION_COUNT_LIMIT
+//
+// MessageText:
+//
+// A connection to the server could not be made because the limit on the number of concurrent connections for this account has been reached.
+//
+ ERROR_CONNECTION_COUNT_LIMIT = DWORD(1238);
+ {$EXTERNALSYM ERROR_CONNECTION_COUNT_LIMIT}
+
+//
+// MessageId: ERROR_LOGIN_TIME_RESTRICTION
+//
+// MessageText:
+//
+// Attempting to log in during an unauthorized time of day for this account.
+//
+ ERROR_LOGIN_TIME_RESTRICTION = DWORD(1239);
+ {$EXTERNALSYM ERROR_LOGIN_TIME_RESTRICTION}
+
+//
+// MessageId: ERROR_LOGIN_WKSTA_RESTRICTION
+//
+// MessageText:
+//
+// The account is not authorized to log in from this station.
+//
+ ERROR_LOGIN_WKSTA_RESTRICTION = DWORD(1240);
+ {$EXTERNALSYM ERROR_LOGIN_WKSTA_RESTRICTION}
+
+//
+// MessageId: ERROR_INCORRECT_ADDRESS
+//
+// MessageText:
+//
+// The network address could not be used for the operation requested.
+//
+ ERROR_INCORRECT_ADDRESS = DWORD(1241);
+ {$EXTERNALSYM ERROR_INCORRECT_ADDRESS}
+
+//
+// MessageId: ERROR_ALREADY_REGISTERED
+//
+// MessageText:
+//
+// The service is already registered.
+//
+ ERROR_ALREADY_REGISTERED = DWORD(1242);
+ {$EXTERNALSYM ERROR_ALREADY_REGISTERED}
+
+//
+// MessageId: ERROR_SERVICE_NOT_FOUND
+//
+// MessageText:
+//
+// The specified service does not exist.
+//
+ ERROR_SERVICE_NOT_FOUND = DWORD(1243);
+ {$EXTERNALSYM ERROR_SERVICE_NOT_FOUND}
+
+//
+// MessageId: ERROR_NOT_AUTHENTICATED
+//
+// MessageText:
+//
+// The operation being requested was not performed because the user has not been authenticated.
+//
+ ERROR_NOT_AUTHENTICATED = DWORD(1244);
+ {$EXTERNALSYM ERROR_NOT_AUTHENTICATED}
+
+//
+// MessageId: ERROR_NOT_LOGGED_ON
+//
+// MessageText:
+//
+// The operation being requested was not performed because the user has not logged on to the network.
+// The specified service does not exist.
+//
+ ERROR_NOT_LOGGED_ON = DWORD(1245);
+ {$EXTERNALSYM ERROR_NOT_LOGGED_ON}
+
+//
+// MessageId: ERROR_CONTINUE
+//
+// MessageText:
+//
+// Continue with work in progress.
+//
+ ERROR_CONTINUE = DWORD(1246); // dderror
+ {$EXTERNALSYM ERROR_CONTINUE}
+
+//
+// MessageId: ERROR_ALREADY_INITIALIZED
+//
+// MessageText:
+//
+// An attempt was made to perform an initialization operation when initialization has already been completed.
+//
+ ERROR_ALREADY_INITIALIZED = DWORD(1247);
+ {$EXTERNALSYM ERROR_ALREADY_INITIALIZED}
+
+//
+// MessageId: ERROR_NO_MORE_DEVICES
+//
+// MessageText:
+//
+// No more local devices.
+//
+ ERROR_NO_MORE_DEVICES = DWORD(1248); // dderror
+ {$EXTERNALSYM ERROR_NO_MORE_DEVICES}
+
+//
+// MessageId: ERROR_NO_SUCH_SITE
+//
+// MessageText:
+//
+// The specified site does not exist.
+//
+ ERROR_NO_SUCH_SITE = DWORD(1249);
+ {$EXTERNALSYM ERROR_NO_SUCH_SITE}
+
+//
+// MessageId: ERROR_DOMAIN_CONTROLLER_EXISTS
+//
+// MessageText:
+//
+// A domain controller with the specified name already exists.
+//
+ ERROR_DOMAIN_CONTROLLER_EXISTS = DWORD(1250);
+ {$EXTERNALSYM ERROR_DOMAIN_CONTROLLER_EXISTS}
+
+//
+// MessageId: ERROR_ONLY_IF_CONNECTED
+//
+// MessageText:
+//
+// This operation is supported only when you are connected to the server.
+//
+ ERROR_ONLY_IF_CONNECTED = DWORD(1251);
+ {$EXTERNALSYM ERROR_ONLY_IF_CONNECTED}
+
+//
+// MessageId: ERROR_OVERRIDE_NOCHANGES
+//
+// MessageText:
+//
+// The group policy framework should call the extension even if there are no changes.
+//
+ ERROR_OVERRIDE_NOCHANGES = DWORD(1252);
+ {$EXTERNALSYM ERROR_OVERRIDE_NOCHANGES}
+
+//
+// MessageId: ERROR_BAD_USER_PROFILE
+//
+// MessageText:
+//
+// The specified user does not have a valid profile.
+//
+ ERROR_BAD_USER_PROFILE = DWORD(1253);
+ {$EXTERNALSYM ERROR_BAD_USER_PROFILE}
+
+//
+// MessageId: ERROR_NOT_SUPPORTED_ON_SBS
+//
+// MessageText:
+//
+// This operation is not supported on a computer running Windows Server 2003 for Small Business Server
+//
+ ERROR_NOT_SUPPORTED_ON_SBS = DWORD(1254);
+ {$EXTERNALSYM ERROR_NOT_SUPPORTED_ON_SBS}
+
+//
+// MessageId: ERROR_SERVER_SHUTDOWN_IN_PROGRESS
+//
+// MessageText:
+//
+// The server machine is shutting down.
+//
+ ERROR_SERVER_SHUTDOWN_IN_PROGRESS = DWORD(1255);
+ {$EXTERNALSYM ERROR_SERVER_SHUTDOWN_IN_PROGRESS}
+
+//
+// MessageId: ERROR_HOST_DOWN
+//
+// MessageText:
+//
+// The remote system is not available. For information about network troubleshooting, see Windows Help.
+//
+ ERROR_HOST_DOWN = DWORD(1256);
+ {$EXTERNALSYM ERROR_HOST_DOWN}
+
+//
+// MessageId: ERROR_NON_ACCOUNT_SID
+//
+// MessageText:
+//
+// The security identifier provided is not from an account domain.
+//
+ ERROR_NON_ACCOUNT_SID = DWORD(1257);
+ {$EXTERNALSYM ERROR_NON_ACCOUNT_SID}
+
+//
+// MessageId: ERROR_NON_DOMAIN_SID
+//
+// MessageText:
+//
+// The security identifier provided does not have a domain component.
+//
+ ERROR_NON_DOMAIN_SID = DWORD(1258);
+ {$EXTERNALSYM ERROR_NON_DOMAIN_SID}
+
+//
+// MessageId: ERROR_APPHELP_BLOCK
+//
+// MessageText:
+//
+// AppHelp dialog canceled thus preventing the application from starting.
+//
+ ERROR_APPHELP_BLOCK = DWORD(1259);
+ {$EXTERNALSYM ERROR_APPHELP_BLOCK}
+
+//
+// MessageId: ERROR_ACCESS_DISABLED_BY_POLICY
+//
+// MessageText:
+//
+// Windows cannot open this program because it has been prevented by a software restriction policy. For more information, open Event Viewer or contact your system administrator.
+//
+ ERROR_ACCESS_DISABLED_BY_POLICY = DWORD(1260);
+ {$EXTERNALSYM ERROR_ACCESS_DISABLED_BY_POLICY}
+
+//
+// MessageId: ERROR_REG_NAT_CONSUMPTION
+//
+// MessageText:
+//
+// A program attempt to use an invalid register value. Normally caused by an uninitialized register. This error is Itanium specific.
+//
+ ERROR_REG_NAT_CONSUMPTION = DWORD(1261);
+ {$EXTERNALSYM ERROR_REG_NAT_CONSUMPTION}
+
+//
+// MessageId: ERROR_CSCSHARE_OFFLINE
+//
+// MessageText:
+//
+// The share is currently offline or does not exist.
+//
+ ERROR_CSCSHARE_OFFLINE = DWORD(1262);
+ {$EXTERNALSYM ERROR_CSCSHARE_OFFLINE}
+
+//
+// MessageId: ERROR_PKINIT_FAILURE
+//
+// MessageText:
+//
+// The kerberos protocol encountered an error while validating the
+// KDC certificate during smartcard logon. There is more information in the
+// system event log.
+//
+ ERROR_PKINIT_FAILURE = DWORD(1263);
+ {$EXTERNALSYM ERROR_PKINIT_FAILURE}
+
+//
+// MessageId: ERROR_SMARTCARD_SUBSYSTEM_FAILURE
+//
+// MessageText:
+//
+// The kerberos protocol encountered an error while attempting to utilize
+// the smartcard subsystem.
+//
+ ERROR_SMARTCARD_SUBSYSTEM_FAILURE = DWORD(1264);
+ {$EXTERNALSYM ERROR_SMARTCARD_SUBSYSTEM_FAILURE}
+
+//
+// MessageId: ERROR_DOWNGRADE_DETECTED
+//
+// MessageText:
+//
+// The system detected a possible attempt to compromise security. Please ensure that you can contact the server that authenticated you.
+//
+ ERROR_DOWNGRADE_DETECTED = DWORD(1265);
+ {$EXTERNALSYM ERROR_DOWNGRADE_DETECTED}
+
+//
+// Do not use ID's 1266 - 1270 as the symbolicNames have been moved to SEC_E_*
+//
+//
+// MessageId: ERROR_MACHINE_LOCKED
+//
+// MessageText:
+//
+// The machine is locked and can not be shut down without the force option.
+//
+ ERROR_MACHINE_LOCKED = DWORD(1271);
+ {$EXTERNALSYM ERROR_MACHINE_LOCKED}
+
+//
+// MessageId: ERROR_CALLBACK_SUPPLIED_INVALID_DATA
+//
+// MessageText:
+//
+// An application-defined callback gave invalid data when called.
+//
+ ERROR_CALLBACK_SUPPLIED_INVALID_DATA = DWORD(1273);
+ {$EXTERNALSYM ERROR_CALLBACK_SUPPLIED_INVALID_DATA}
+
+//
+// MessageId: ERROR_SYNC_FOREGROUND_REFRESH_REQUIRED
+//
+// MessageText:
+//
+// The group policy framework should call the extension in the synchronous foreground policy refresh.
+//
+ ERROR_SYNC_FOREGROUND_REFRESH_REQUIRED = DWORD(1274);
+ {$EXTERNALSYM ERROR_SYNC_FOREGROUND_REFRESH_REQUIRED}
+
+//
+// MessageId: ERROR_DRIVER_BLOCKED
+//
+// MessageText:
+//
+// This driver has been blocked from loading
+//
+ ERROR_DRIVER_BLOCKED = DWORD(1275);
+ {$EXTERNALSYM ERROR_DRIVER_BLOCKED}
+
+//
+// MessageId: ERROR_INVALID_IMPORT_OF_NON_DLL
+//
+// MessageText:
+//
+// A dynamic link library (DLL) referenced a module that was neither a DLL nor the process's executable image.
+//
+ ERROR_INVALID_IMPORT_OF_NON_DLL = DWORD(1276);
+ {$EXTERNALSYM ERROR_INVALID_IMPORT_OF_NON_DLL}
+
+//
+// MessageId: ERROR_ACCESS_DISABLED_WEBBLADE
+//
+// MessageText:
+//
+// Windows cannot open this program since it has been disabled.
+//
+ ERROR_ACCESS_DISABLED_WEBBLADE = DWORD(1277);
+ {$EXTERNALSYM ERROR_ACCESS_DISABLED_WEBBLADE}
+
+//
+// MessageId: ERROR_ACCESS_DISABLED_WEBBLADE_TAMPER
+//
+// MessageText:
+//
+// Windows cannot open this program because the license enforcement system has been tampered with or become corrupted.
+//
+ ERROR_ACCESS_DISABLED_WEBBLADE_TAMPER = DWORD(1278);
+ {$EXTERNALSYM ERROR_ACCESS_DISABLED_WEBBLADE_TAMPER}
+
+//
+// MessageId: ERROR_RECOVERY_FAILURE
+//
+// MessageText:
+//
+// A transaction recover failed.
+//
+ ERROR_RECOVERY_FAILURE = DWORD(1279);
+ {$EXTERNALSYM ERROR_RECOVERY_FAILURE}
+
+//
+// MessageId: ERROR_ALREADY_FIBER
+//
+// MessageText:
+//
+// The current thread has already been converted to a fiber.
+//
+ ERROR_ALREADY_FIBER = DWORD(1280);
+ {$EXTERNALSYM ERROR_ALREADY_FIBER}
+
+//
+// MessageId: ERROR_ALREADY_THREAD
+//
+// MessageText:
+//
+// The current thread has already been converted from a fiber.
+//
+ ERROR_ALREADY_THREAD = DWORD(1281);
+ {$EXTERNALSYM ERROR_ALREADY_THREAD}
+
+//
+// MessageId: ERROR_STACK_BUFFER_OVERRUN
+//
+// MessageText:
+//
+// The system detected an overrun of a stack-based buffer in this application. This
+// overrun could potentially allow a malicious user to gain control of this application.
+//
+ ERROR_STACK_BUFFER_OVERRUN = DWORD(1282);
+ {$EXTERNALSYM ERROR_STACK_BUFFER_OVERRUN}
+
+//
+// MessageId: ERROR_PARAMETER_QUOTA_EXCEEDED
+//
+// MessageText:
+//
+// Data present in one of the parameters is more than the function can operate on.
+//
+ ERROR_PARAMETER_QUOTA_EXCEEDED = DWORD(1283);
+ {$EXTERNALSYM ERROR_PARAMETER_QUOTA_EXCEEDED}
+
+//
+// MessageId: ERROR_DEBUGGER_INACTIVE
+//
+// MessageText:
+//
+// An attempt to do an operation on a debug object failed because the object is in the process of being deleted.
+//
+ ERROR_DEBUGGER_INACTIVE = DWORD(1284);
+ {$EXTERNALSYM ERROR_DEBUGGER_INACTIVE}
+
+//
+// MessageId: ERROR_DELAY_LOAD_FAILED
+//
+// MessageText:
+//
+// An attempt to delay-load a .dll or get a function address in a delay-loaded .dll failed.
+//
+ ERROR_DELAY_LOAD_FAILED = DWORD(1285);
+ {$EXTERNALSYM ERROR_DELAY_LOAD_FAILED}
+
+//
+// MessageId: ERROR_VDM_DISALLOWED
+//
+// MessageText:
+//
+// %1 is a 16-bit application. You do not have permissions to execute 16-bit applications. Check your permissions with your system administrator.
+//
+ ERROR_VDM_DISALLOWED = DWORD(1286);
+ {$EXTERNALSYM ERROR_VDM_DISALLOWED}
+
+//
+// MessageId: ERROR_UNIDENTIFIED_ERROR
+//
+// MessageText:
+//
+// Insufficient information exists to identify the cause of failure.
+//
+ ERROR_UNIDENTIFIED_ERROR = DWORD(1287);
+ {$EXTERNALSYM ERROR_UNIDENTIFIED_ERROR}
+
+///////////////////////////
+//
+// Add new status codes before this point unless there is a component specific section below.
+//
+///////////////////////////
+
+///////////////////////////
+// //
+// Security Status Codes //
+// //
+///////////////////////////
+
+//
+// MessageId: ERROR_NOT_ALL_ASSIGNED
+//
+// MessageText:
+//
+// Not all privileges referenced are assigned to the caller.
+//
+ ERROR_NOT_ALL_ASSIGNED = DWORD(1300);
+ {$EXTERNALSYM ERROR_NOT_ALL_ASSIGNED}
+
+//
+// MessageId: ERROR_SOME_NOT_MAPPED
+//
+// MessageText:
+//
+// Some mapping between account names and security IDs was not done.
+//
+ ERROR_SOME_NOT_MAPPED = DWORD(1301);
+ {$EXTERNALSYM ERROR_SOME_NOT_MAPPED}
+
+//
+// MessageId: ERROR_NO_QUOTAS_FOR_ACCOUNT
+//
+// MessageText:
+//
+// No system quota limits are specifically set for this account.
+//
+ ERROR_NO_QUOTAS_FOR_ACCOUNT = DWORD(1302);
+ {$EXTERNALSYM ERROR_NO_QUOTAS_FOR_ACCOUNT}
+
+//
+// MessageId: ERROR_LOCAL_USER_SESSION_KEY
+//
+// MessageText:
+//
+// No encryption key is available. A well-known encryption key was returned.
+//
+ ERROR_LOCAL_USER_SESSION_KEY = DWORD(1303);
+ {$EXTERNALSYM ERROR_LOCAL_USER_SESSION_KEY}
+
+//
+// MessageId: ERROR_NULL_LM_PASSWORD
+//
+// MessageText:
+//
+// The password is too complex to be converted to a LAN Manager password. The LAN Manager password returned is a NULL string.
+//
+ ERROR_NULL_LM_PASSWORD = DWORD(1304);
+ {$EXTERNALSYM ERROR_NULL_LM_PASSWORD}
+
+//
+// MessageId: ERROR_UNKNOWN_REVISION
+//
+// MessageText:
+//
+// The revision level is unknown.
+//
+ ERROR_UNKNOWN_REVISION = DWORD(1305);
+ {$EXTERNALSYM ERROR_UNKNOWN_REVISION}
+
+//
+// MessageId: ERROR_REVISION_MISMATCH
+//
+// MessageText:
+//
+// Indicates two revision levels are incompatible.
+//
+ ERROR_REVISION_MISMATCH = DWORD(1306);
+ {$EXTERNALSYM ERROR_REVISION_MISMATCH}
+
+//
+// MessageId: ERROR_INVALID_OWNER
+//
+// MessageText:
+//
+// This security ID may not be assigned as the owner of this object.
+//
+ ERROR_INVALID_OWNER = DWORD(1307);
+ {$EXTERNALSYM ERROR_INVALID_OWNER}
+
+//
+// MessageId: ERROR_INVALID_PRIMARY_GROUP
+//
+// MessageText:
+//
+// This security ID may not be assigned as the primary group of an object.
+//
+ ERROR_INVALID_PRIMARY_GROUP = DWORD(1308);
+ {$EXTERNALSYM ERROR_INVALID_PRIMARY_GROUP}
+
+//
+// MessageId: ERROR_NO_IMPERSONATION_TOKEN
+//
+// MessageText:
+//
+// An attempt has been made to operate on an impersonation token by a thread that is not currently impersonating a client.
+//
+ ERROR_NO_IMPERSONATION_TOKEN = DWORD(1309);
+ {$EXTERNALSYM ERROR_NO_IMPERSONATION_TOKEN}
+
+//
+// MessageId: ERROR_CANT_DISABLE_MANDATORY
+//
+// MessageText:
+//
+// The group may not be disabled.
+//
+ ERROR_CANT_DISABLE_MANDATORY = DWORD(1310);
+ {$EXTERNALSYM ERROR_CANT_DISABLE_MANDATORY}
+
+//
+// MessageId: ERROR_NO_LOGON_SERVERS
+//
+// MessageText:
+//
+// There are currently no logon servers available to service the logon request.
+//
+ ERROR_NO_LOGON_SERVERS = DWORD(1311);
+ {$EXTERNALSYM ERROR_NO_LOGON_SERVERS}
+
+//
+// MessageId: ERROR_NO_SUCH_LOGON_SESSION
+//
+// MessageText:
+//
+// A specified logon session does not exist. It may already have been terminated.
+//
+ ERROR_NO_SUCH_LOGON_SESSION = DWORD(1312);
+ {$EXTERNALSYM ERROR_NO_SUCH_LOGON_SESSION}
+
+//
+// MessageId: ERROR_NO_SUCH_PRIVILEGE
+//
+// MessageText:
+//
+// A specified privilege does not exist.
+//
+ ERROR_NO_SUCH_PRIVILEGE = DWORD(1313);
+ {$EXTERNALSYM ERROR_NO_SUCH_PRIVILEGE}
+
+//
+// MessageId: ERROR_PRIVILEGE_NOT_HELD
+//
+// MessageText:
+//
+// A required privilege is not held by the client.
+//
+ ERROR_PRIVILEGE_NOT_HELD = DWORD(1314);
+ {$EXTERNALSYM ERROR_PRIVILEGE_NOT_HELD}
+
+//
+// MessageId: ERROR_INVALID_ACCOUNT_NAME
+//
+// MessageText:
+//
+// The name provided is not a properly formed account name.
+//
+ ERROR_INVALID_ACCOUNT_NAME = DWORD(1315);
+ {$EXTERNALSYM ERROR_INVALID_ACCOUNT_NAME}
+
+//
+// MessageId: ERROR_USER_EXISTS
+//
+// MessageText:
+//
+// The specified user already exists.
+//
+ ERROR_USER_EXISTS = DWORD(1316);
+ {$EXTERNALSYM ERROR_USER_EXISTS}
+
+//
+// MessageId: ERROR_NO_SUCH_USER
+//
+// MessageText:
+//
+// The specified user does not exist.
+//
+ ERROR_NO_SUCH_USER = DWORD(1317);
+ {$EXTERNALSYM ERROR_NO_SUCH_USER}
+
+//
+// MessageId: ERROR_GROUP_EXISTS
+//
+// MessageText:
+//
+// The specified group already exists.
+//
+ ERROR_GROUP_EXISTS = DWORD(1318);
+ {$EXTERNALSYM ERROR_GROUP_EXISTS}
+
+//
+// MessageId: ERROR_NO_SUCH_GROUP
+//
+// MessageText:
+//
+// The specified group does not exist.
+//
+ ERROR_NO_SUCH_GROUP = DWORD(1319);
+ {$EXTERNALSYM ERROR_NO_SUCH_GROUP}
+
+//
+// MessageId: ERROR_MEMBER_IN_GROUP
+//
+// MessageText:
+//
+// Either the specified user account is already a member of the specified group, or the specified group cannot be deleted because it contains a member.
+//
+ ERROR_MEMBER_IN_GROUP = DWORD(1320);
+ {$EXTERNALSYM ERROR_MEMBER_IN_GROUP}
+
+//
+// MessageId: ERROR_MEMBER_NOT_IN_GROUP
+//
+// MessageText:
+//
+// The specified user account is not a member of the specified group account.
+//
+ ERROR_MEMBER_NOT_IN_GROUP = DWORD(1321);
+ {$EXTERNALSYM ERROR_MEMBER_NOT_IN_GROUP}
+
+//
+// MessageId: ERROR_LAST_ADMIN
+//
+// MessageText:
+//
+// The last remaining administration account cannot be disabled or deleted.
+//
+ ERROR_LAST_ADMIN = DWORD(1322);
+ {$EXTERNALSYM ERROR_LAST_ADMIN}
+
+//
+// MessageId: ERROR_WRONG_PASSWORD
+//
+// MessageText:
+//
+// Unable to update the password. The value provided as the current password is incorrect.
+//
+ ERROR_WRONG_PASSWORD = DWORD(1323);
+ {$EXTERNALSYM ERROR_WRONG_PASSWORD}
+
+//
+// MessageId: ERROR_ILL_FORMED_PASSWORD
+//
+// MessageText:
+//
+// Unable to update the password. The value provided for the new password contains values that are not allowed in passwords.
+//
+ ERROR_ILL_FORMED_PASSWORD = DWORD(1324);
+ {$EXTERNALSYM ERROR_ILL_FORMED_PASSWORD}
+
+//
+// MessageId: ERROR_PASSWORD_RESTRICTION
+//
+// MessageText:
+//
+// Unable to update the password. The value provided for the new password does not meet the length, complexity, or history requirement of the domain.
+//
+ ERROR_PASSWORD_RESTRICTION = DWORD(1325);
+ {$EXTERNALSYM ERROR_PASSWORD_RESTRICTION}
+
+//
+// MessageId: ERROR_LOGON_FAILURE
+//
+// MessageText:
+//
+// Logon failure: unknown user name or bad password.
+//
+ ERROR_LOGON_FAILURE = DWORD(1326);
+ {$EXTERNALSYM ERROR_LOGON_FAILURE}
+
+//
+// MessageId: ERROR_ACCOUNT_RESTRICTION
+//
+// MessageText:
+//
+// Logon failure: user account restriction. Possible reasons are blank passwords not allowed, logon hour restrictions, or a policy restriction has been enforced.
+//
+ ERROR_ACCOUNT_RESTRICTION = DWORD(1327);
+ {$EXTERNALSYM ERROR_ACCOUNT_RESTRICTION}
+
+//
+// MessageId: ERROR_INVALID_LOGON_HOURS
+//
+// MessageText:
+//
+// Logon failure: account logon time restriction violation.
+//
+ ERROR_INVALID_LOGON_HOURS = DWORD(1328);
+ {$EXTERNALSYM ERROR_INVALID_LOGON_HOURS}
+
+//
+// MessageId: ERROR_INVALID_WORKSTATION
+//
+// MessageText:
+//
+// Logon failure: user not allowed to log on to this computer.
+//
+ ERROR_INVALID_WORKSTATION = DWORD(1329);
+ {$EXTERNALSYM ERROR_INVALID_WORKSTATION}
+
+//
+// MessageId: ERROR_PASSWORD_EXPIRED
+//
+// MessageText:
+//
+// Logon failure: the specified account password has expired.
+//
+ ERROR_PASSWORD_EXPIRED = DWORD(1330);
+ {$EXTERNALSYM ERROR_PASSWORD_EXPIRED}
+
+//
+// MessageId: ERROR_ACCOUNT_DISABLED
+//
+// MessageText:
+//
+// Logon failure: account currently disabled.
+//
+ ERROR_ACCOUNT_DISABLED = DWORD(1331);
+ {$EXTERNALSYM ERROR_ACCOUNT_DISABLED}
+
+//
+// MessageId: ERROR_NONE_MAPPED
+//
+// MessageText:
+//
+// No mapping between account names and security IDs was done.
+//
+ ERROR_NONE_MAPPED = DWORD(1332);
+ {$EXTERNALSYM ERROR_NONE_MAPPED}
+
+//
+// MessageId: ERROR_TOO_MANY_LUIDS_REQUESTED
+//
+// MessageText:
+//
+// Too many local user identifiers (LUIDs) were requested at one time.
+//
+ ERROR_TOO_MANY_LUIDS_REQUESTED = DWORD(1333);
+ {$EXTERNALSYM ERROR_TOO_MANY_LUIDS_REQUESTED}
+
+//
+// MessageId: ERROR_LUIDS_EXHAUSTED
+//
+// MessageText:
+//
+// No more local user identifiers (LUIDs) are available.
+//
+ ERROR_LUIDS_EXHAUSTED = DWORD(1334);
+ {$EXTERNALSYM ERROR_LUIDS_EXHAUSTED}
+
+//
+// MessageId: ERROR_INVALID_SUB_AUTHORITY
+//
+// MessageText:
+//
+// The subauthority part of a security ID is invalid for this particular use.
+//
+ ERROR_INVALID_SUB_AUTHORITY = DWORD(1335);
+ {$EXTERNALSYM ERROR_INVALID_SUB_AUTHORITY}
+
+//
+// MessageId: ERROR_INVALID_ACL
+//
+// MessageText:
+//
+// The access control list (ACL) structure is invalid.
+//
+ ERROR_INVALID_ACL = DWORD(1336);
+ {$EXTERNALSYM ERROR_INVALID_ACL}
+
+//
+// MessageId: ERROR_INVALID_SID
+//
+// MessageText:
+//
+// The security ID structure is invalid.
+//
+ ERROR_INVALID_SID = DWORD(1337);
+ {$EXTERNALSYM ERROR_INVALID_SID}
+
+//
+// MessageId: ERROR_INVALID_SECURITY_DESCR
+//
+// MessageText:
+//
+// The security descriptor structure is invalid.
+//
+ ERROR_INVALID_SECURITY_DESCR = DWORD(1338);
+ {$EXTERNALSYM ERROR_INVALID_SECURITY_DESCR}
+
+//
+// MessageId: ERROR_BAD_INHERITANCE_ACL
+//
+// MessageText:
+//
+// The inherited access control list (ACL) or access control entry (ACE) could not be built.
+//
+ ERROR_BAD_INHERITANCE_ACL = DWORD(1340);
+ {$EXTERNALSYM ERROR_BAD_INHERITANCE_ACL}
+
+//
+// MessageId: ERROR_SERVER_DISABLED
+//
+// MessageText:
+//
+// The server is currently disabled.
+//
+ ERROR_SERVER_DISABLED = DWORD(1341);
+ {$EXTERNALSYM ERROR_SERVER_DISABLED}
+
+//
+// MessageId: ERROR_SERVER_NOT_DISABLED
+//
+// MessageText:
+//
+// The server is currently enabled.
+//
+ ERROR_SERVER_NOT_DISABLED = DWORD(1342);
+ {$EXTERNALSYM ERROR_SERVER_NOT_DISABLED}
+
+//
+// MessageId: ERROR_INVALID_ID_AUTHORITY
+//
+// MessageText:
+//
+// The value provided was an invalid value for an identifier authority.
+//
+ ERROR_INVALID_ID_AUTHORITY = DWORD(1343);
+ {$EXTERNALSYM ERROR_INVALID_ID_AUTHORITY}
+
+//
+// MessageId: ERROR_ALLOTTED_SPACE_EXCEEDED
+//
+// MessageText:
+//
+// No more memory is available for security information updates.
+//
+ ERROR_ALLOTTED_SPACE_EXCEEDED = DWORD(1344);
+ {$EXTERNALSYM ERROR_ALLOTTED_SPACE_EXCEEDED}
+
+//
+// MessageId: ERROR_INVALID_GROUP_ATTRIBUTES
+//
+// MessageText:
+//
+// The specified attributes are invalid, or incompatible with the attributes for the group as a whole.
+//
+ ERROR_INVALID_GROUP_ATTRIBUTES = DWORD(1345);
+ {$EXTERNALSYM ERROR_INVALID_GROUP_ATTRIBUTES}
+
+//
+// MessageId: ERROR_BAD_IMPERSONATION_LEVEL
+//
+// MessageText:
+//
+// Either a required impersonation level was not provided, or the provided impersonation level is invalid.
+//
+ ERROR_BAD_IMPERSONATION_LEVEL = DWORD(1346);
+ {$EXTERNALSYM ERROR_BAD_IMPERSONATION_LEVEL}
+
+//
+// MessageId: ERROR_CANT_OPEN_ANONYMOUS
+//
+// MessageText:
+//
+// Cannot open an anonymous level security token.
+//
+ ERROR_CANT_OPEN_ANONYMOUS = DWORD(1347);
+ {$EXTERNALSYM ERROR_CANT_OPEN_ANONYMOUS}
+
+//
+// MessageId: ERROR_BAD_VALIDATION_CLASS
+//
+// MessageText:
+//
+// The validation information class requested was invalid.
+//
+ ERROR_BAD_VALIDATION_CLASS = DWORD(1348);
+ {$EXTERNALSYM ERROR_BAD_VALIDATION_CLASS}
+
+//
+// MessageId: ERROR_BAD_TOKEN_TYPE
+//
+// MessageText:
+//
+// The type of the token is inappropriate for its attempted use.
+//
+ ERROR_BAD_TOKEN_TYPE = DWORD(1349);
+ {$EXTERNALSYM ERROR_BAD_TOKEN_TYPE}
+
+//
+// MessageId: ERROR_NO_SECURITY_ON_OBJECT
+//
+// MessageText:
+//
+// Unable to perform a security operation on an object that has no associated security.
+//
+ ERROR_NO_SECURITY_ON_OBJECT = DWORD(1350);
+ {$EXTERNALSYM ERROR_NO_SECURITY_ON_OBJECT}
+
+//
+// MessageId: ERROR_CANT_ACCESS_DOMAIN_INFO
+//
+// MessageText:
+//
+// Configuration information could not be read from the domain controller, either because the machine is unavailable, or access has been denied.
+//
+ ERROR_CANT_ACCESS_DOMAIN_INFO = DWORD(1351);
+ {$EXTERNALSYM ERROR_CANT_ACCESS_DOMAIN_INFO}
+
+//
+// MessageId: ERROR_INVALID_SERVER_STATE
+//
+// MessageText:
+//
+// The security account manager (SAM) or local security authority (LSA) server was in the wrong state to perform the security operation.
+//
+ ERROR_INVALID_SERVER_STATE = DWORD(1352);
+ {$EXTERNALSYM ERROR_INVALID_SERVER_STATE}
+
+//
+// MessageId: ERROR_INVALID_DOMAIN_STATE
+//
+// MessageText:
+//
+// The domain was in the wrong state to perform the security operation.
+//
+ ERROR_INVALID_DOMAIN_STATE = DWORD(1353);
+ {$EXTERNALSYM ERROR_INVALID_DOMAIN_STATE}
+
+//
+// MessageId: ERROR_INVALID_DOMAIN_ROLE
+//
+// MessageText:
+//
+// This operation is only allowed for the Primary Domain Controller of the domain.
+//
+ ERROR_INVALID_DOMAIN_ROLE = DWORD(1354);
+ {$EXTERNALSYM ERROR_INVALID_DOMAIN_ROLE}
+
+//
+// MessageId: ERROR_NO_SUCH_DOMAIN
+//
+// MessageText:
+//
+// The specified domain either does not exist or could not be contacted.
+//
+ ERROR_NO_SUCH_DOMAIN = DWORD(1355);
+ {$EXTERNALSYM ERROR_NO_SUCH_DOMAIN}
+
+//
+// MessageId: ERROR_DOMAIN_EXISTS
+//
+// MessageText:
+//
+// The specified domain already exists.
+//
+ ERROR_DOMAIN_EXISTS = DWORD(1356);
+ {$EXTERNALSYM ERROR_DOMAIN_EXISTS}
+
+//
+// MessageId: ERROR_DOMAIN_LIMIT_EXCEEDED
+//
+// MessageText:
+//
+// An attempt was made to exceed the limit on the number of domains per server.
+//
+ ERROR_DOMAIN_LIMIT_EXCEEDED = DWORD(1357);
+ {$EXTERNALSYM ERROR_DOMAIN_LIMIT_EXCEEDED}
+
+//
+// MessageId: ERROR_INTERNAL_DB_CORRUPTION
+//
+// MessageText:
+//
+// Unable to complete the requested operation because of either a catastrophic media failure or a data structure corruption on the disk.
+//
+ ERROR_INTERNAL_DB_CORRUPTION = DWORD(1358);
+ {$EXTERNALSYM ERROR_INTERNAL_DB_CORRUPTION}
+
+//
+// MessageId: ERROR_INTERNAL_ERROR
+//
+// MessageText:
+//
+// An internal error occurred.
+//
+ ERROR_INTERNAL_ERROR = DWORD(1359);
+ {$EXTERNALSYM ERROR_INTERNAL_ERROR}
+
+//
+// MessageId: ERROR_GENERIC_NOT_MAPPED
+//
+// MessageText:
+//
+// Generic access types were contained in an access mask which should already be mapped to nongeneric types.
+//
+ ERROR_GENERIC_NOT_MAPPED = DWORD(1360);
+ {$EXTERNALSYM ERROR_GENERIC_NOT_MAPPED}
+
+//
+// MessageId: ERROR_BAD_DESCRIPTOR_FORMAT
+//
+// MessageText:
+//
+// A security descriptor is not in the right format (absolute or self-relative).
+//
+ ERROR_BAD_DESCRIPTOR_FORMAT = DWORD(1361);
+ {$EXTERNALSYM ERROR_BAD_DESCRIPTOR_FORMAT}
+
+//
+// MessageId: ERROR_NOT_LOGON_PROCESS
+//
+// MessageText:
+//
+// The requested action is restricted for use by logon processes only. The calling process has not registered as a logon process.
+//
+ ERROR_NOT_LOGON_PROCESS = DWORD(1362);
+ {$EXTERNALSYM ERROR_NOT_LOGON_PROCESS}
+
+//
+// MessageId: ERROR_LOGON_SESSION_EXISTS
+//
+// MessageText:
+//
+// Cannot start a new logon session with an ID that is already in use.
+//
+ ERROR_LOGON_SESSION_EXISTS = DWORD(1363);
+ {$EXTERNALSYM ERROR_LOGON_SESSION_EXISTS}
+
+//
+// MessageId: ERROR_NO_SUCH_PACKAGE
+//
+// MessageText:
+//
+// A specified authentication package is unknown.
+//
+ ERROR_NO_SUCH_PACKAGE = DWORD(1364);
+ {$EXTERNALSYM ERROR_NO_SUCH_PACKAGE}
+
+//
+// MessageId: ERROR_BAD_LOGON_SESSION_STATE
+//
+// MessageText:
+//
+// The logon session is not in a state that is consistent with the requested operation.
+//
+ ERROR_BAD_LOGON_SESSION_STATE = DWORD(1365);
+ {$EXTERNALSYM ERROR_BAD_LOGON_SESSION_STATE}
+
+//
+// MessageId: ERROR_LOGON_SESSION_COLLISION
+//
+// MessageText:
+//
+// The logon session ID is already in use.
+//
+ ERROR_LOGON_SESSION_COLLISION = DWORD(1366);
+ {$EXTERNALSYM ERROR_LOGON_SESSION_COLLISION}
+
+//
+// MessageId: ERROR_INVALID_LOGON_TYPE
+//
+// MessageText:
+//
+// A logon request contained an invalid logon type value.
+//
+ ERROR_INVALID_LOGON_TYPE = DWORD(1367);
+ {$EXTERNALSYM ERROR_INVALID_LOGON_TYPE}
+
+//
+// MessageId: ERROR_CANNOT_IMPERSONATE
+//
+// MessageText:
+//
+// Unable to impersonate using a named pipe until data has been read from that pipe.
+//
+ ERROR_CANNOT_IMPERSONATE = DWORD(1368);
+ {$EXTERNALSYM ERROR_CANNOT_IMPERSONATE}
+
+//
+// MessageId: ERROR_RXACT_INVALID_STATE
+//
+// MessageText:
+//
+// The transaction state of a registry subtree is incompatible with the requested operation.
+//
+ ERROR_RXACT_INVALID_STATE = DWORD(1369);
+ {$EXTERNALSYM ERROR_RXACT_INVALID_STATE}
+
+//
+// MessageId: ERROR_RXACT_COMMIT_FAILURE
+//
+// MessageText:
+//
+// An internal security database corruption has been encountered.
+//
+ ERROR_RXACT_COMMIT_FAILURE = DWORD(1370);
+ {$EXTERNALSYM ERROR_RXACT_COMMIT_FAILURE}
+
+//
+// MessageId: ERROR_SPECIAL_ACCOUNT
+//
+// MessageText:
+//
+// Cannot perform this operation on built-in accounts.
+//
+ ERROR_SPECIAL_ACCOUNT = DWORD(1371);
+ {$EXTERNALSYM ERROR_SPECIAL_ACCOUNT}
+
+//
+// MessageId: ERROR_SPECIAL_GROUP
+//
+// MessageText:
+//
+// Cannot perform this operation on this built-in special group.
+//
+ ERROR_SPECIAL_GROUP = DWORD(1372);
+ {$EXTERNALSYM ERROR_SPECIAL_GROUP}
+
+//
+// MessageId: ERROR_SPECIAL_USER
+//
+// MessageText:
+//
+// Cannot perform this operation on this built-in special user.
+//
+ ERROR_SPECIAL_USER = DWORD(1373);
+ {$EXTERNALSYM ERROR_SPECIAL_USER}
+
+//
+// MessageId: ERROR_MEMBERS_PRIMARY_GROUP
+//
+// MessageText:
+//
+// The user cannot be removed from a group because the group is currently the user's primary group.
+//
+ ERROR_MEMBERS_PRIMARY_GROUP = DWORD(1374);
+ {$EXTERNALSYM ERROR_MEMBERS_PRIMARY_GROUP}
+
+//
+// MessageId: ERROR_TOKEN_ALREADY_IN_USE
+//
+// MessageText:
+//
+// The token is already in use as a primary token.
+//
+ ERROR_TOKEN_ALREADY_IN_USE = DWORD(1375);
+ {$EXTERNALSYM ERROR_TOKEN_ALREADY_IN_USE}
+
+//
+// MessageId: ERROR_NO_SUCH_ALIAS
+//
+// MessageText:
+//
+// The specified local group does not exist.
+//
+ ERROR_NO_SUCH_ALIAS = DWORD(1376);
+ {$EXTERNALSYM ERROR_NO_SUCH_ALIAS}
+
+//
+// MessageId: ERROR_MEMBER_NOT_IN_ALIAS
+//
+// MessageText:
+//
+// The specified account name is not a member of the local group.
+//
+ ERROR_MEMBER_NOT_IN_ALIAS = DWORD(1377);
+ {$EXTERNALSYM ERROR_MEMBER_NOT_IN_ALIAS}
+
+//
+// MessageId: ERROR_MEMBER_IN_ALIAS
+//
+// MessageText:
+//
+// The specified account name is already a member of the local group.
+//
+ ERROR_MEMBER_IN_ALIAS = DWORD(1378);
+ {$EXTERNALSYM ERROR_MEMBER_IN_ALIAS}
+
+//
+// MessageId: ERROR_ALIAS_EXISTS
+//
+// MessageText:
+//
+// The specified local group already exists.
+//
+ ERROR_ALIAS_EXISTS = DWORD(1379);
+ {$EXTERNALSYM ERROR_ALIAS_EXISTS}
+
+//
+// MessageId: ERROR_LOGON_NOT_GRANTED
+//
+// MessageText:
+//
+// Logon failure: the user has not been granted the requested logon type at this computer.
+//
+ ERROR_LOGON_NOT_GRANTED = DWORD(1380);
+ {$EXTERNALSYM ERROR_LOGON_NOT_GRANTED}
+
+//
+// MessageId: ERROR_TOO_MANY_SECRETS
+//
+// MessageText:
+//
+// The maximum number of secrets that may be stored in a single system has been exceeded.
+//
+ ERROR_TOO_MANY_SECRETS = DWORD(1381);
+ {$EXTERNALSYM ERROR_TOO_MANY_SECRETS}
+
+//
+// MessageId: ERROR_SECRET_TOO_LONG
+//
+// MessageText:
+//
+// The length of a secret exceeds the maximum length allowed.
+//
+ ERROR_SECRET_TOO_LONG = DWORD(1382);
+ {$EXTERNALSYM ERROR_SECRET_TOO_LONG}
+
+//
+// MessageId: ERROR_INTERNAL_DB_ERROR
+//
+// MessageText:
+//
+// The local security authority database contains an internal inconsistency.
+//
+ ERROR_INTERNAL_DB_ERROR = DWORD(1383);
+ {$EXTERNALSYM ERROR_INTERNAL_DB_ERROR}
+
+//
+// MessageId: ERROR_TOO_MANY_CONTEXT_IDS
+//
+// MessageText:
+//
+// During a logon attempt, the user's security context accumulated too many security IDs.
+//
+ ERROR_TOO_MANY_CONTEXT_IDS = DWORD(1384);
+ {$EXTERNALSYM ERROR_TOO_MANY_CONTEXT_IDS}
+
+//
+// MessageId: ERROR_LOGON_TYPE_NOT_GRANTED
+//
+// MessageText:
+//
+// Logon failure: the user has not been granted the requested logon type at this computer.
+//
+ ERROR_LOGON_TYPE_NOT_GRANTED = DWORD(1385);
+ {$EXTERNALSYM ERROR_LOGON_TYPE_NOT_GRANTED}
+
+//
+// MessageId: ERROR_NT_CROSS_ENCRYPTION_REQUIRED
+//
+// MessageText:
+//
+// A cross-encrypted password is necessary to change a user password.
+//
+ ERROR_NT_CROSS_ENCRYPTION_REQUIRED = DWORD(1386);
+ {$EXTERNALSYM ERROR_NT_CROSS_ENCRYPTION_REQUIRED}
+
+//
+// MessageId: ERROR_NO_SUCH_MEMBER
+//
+// MessageText:
+//
+// A member could not be added to or removed from the local group because the member does not exist.
+//
+ ERROR_NO_SUCH_MEMBER = DWORD(1387);
+ {$EXTERNALSYM ERROR_NO_SUCH_MEMBER}
+
+//
+// MessageId: ERROR_INVALID_MEMBER
+//
+// MessageText:
+//
+// A new member could not be added to a local group because the member has the wrong account type.
+//
+ ERROR_INVALID_MEMBER = DWORD(1388);
+ {$EXTERNALSYM ERROR_INVALID_MEMBER}
+
+//
+// MessageId: ERROR_TOO_MANY_SIDS
+//
+// MessageText:
+//
+// Too many security IDs have been specified.
+//
+ ERROR_TOO_MANY_SIDS = DWORD(1389);
+ {$EXTERNALSYM ERROR_TOO_MANY_SIDS}
+
+//
+// MessageId: ERROR_LM_CROSS_ENCRYPTION_REQUIRED
+//
+// MessageText:
+//
+// A cross-encrypted password is necessary to change this user password.
+//
+ ERROR_LM_CROSS_ENCRYPTION_REQUIRED = DWORD(1390);
+ {$EXTERNALSYM ERROR_LM_CROSS_ENCRYPTION_REQUIRED}
+
+//
+// MessageId: ERROR_NO_INHERITANCE
+//
+// MessageText:
+//
+// Indicates an ACL contains no inheritable components.
+//
+ ERROR_NO_INHERITANCE = DWORD(1391);
+ {$EXTERNALSYM ERROR_NO_INHERITANCE}
+
+//
+// MessageId: ERROR_FILE_CORRUPT
+//
+// MessageText:
+//
+// The file or directory is corrupted and unreadable.
+//
+ ERROR_FILE_CORRUPT = DWORD(1392);
+ {$EXTERNALSYM ERROR_FILE_CORRUPT}
+
+//
+// MessageId: ERROR_DISK_CORRUPT
+//
+// MessageText:
+//
+// The disk structure is corrupted and unreadable.
+//
+ ERROR_DISK_CORRUPT = DWORD(1393);
+ {$EXTERNALSYM ERROR_DISK_CORRUPT}
+
+//
+// MessageId: ERROR_NO_USER_SESSION_KEY
+//
+// MessageText:
+//
+// There is no user session key for the specified logon session.
+//
+ ERROR_NO_USER_SESSION_KEY = DWORD(1394);
+ {$EXTERNALSYM ERROR_NO_USER_SESSION_KEY}
+
+//
+// MessageId: ERROR_LICENSE_QUOTA_EXCEEDED
+//
+// MessageText:
+//
+// The service being accessed is licensed for a particular number of connections.
+// No more connections can be made to the service at this time because there are already as many connections as the service can accept.
+//
+ ERROR_LICENSE_QUOTA_EXCEEDED = DWORD(1395);
+ {$EXTERNALSYM ERROR_LICENSE_QUOTA_EXCEEDED}
+
+//
+// MessageId: ERROR_WRONG_TARGET_NAME
+//
+// MessageText:
+//
+// Logon Failure: The target account name is incorrect.
+//
+ ERROR_WRONG_TARGET_NAME = DWORD(1396);
+ {$EXTERNALSYM ERROR_WRONG_TARGET_NAME}
+
+//
+// MessageId: ERROR_MUTUAL_AUTH_FAILED
+//
+// MessageText:
+//
+// Mutual Authentication failed. The server's password is out of date at the domain controller.
+//
+ ERROR_MUTUAL_AUTH_FAILED = DWORD(1397);
+ {$EXTERNALSYM ERROR_MUTUAL_AUTH_FAILED}
+
+//
+// MessageId: ERROR_TIME_SKEW
+//
+// MessageText:
+//
+// There is a time and/or date difference between the client and server.
+//
+ ERROR_TIME_SKEW = DWORD(1398);
+ {$EXTERNALSYM ERROR_TIME_SKEW}
+
+//
+// MessageId: ERROR_CURRENT_DOMAIN_NOT_ALLOWED
+//
+// MessageText:
+//
+// This operation can not be performed on the current domain.
+//
+ ERROR_CURRENT_DOMAIN_NOT_ALLOWED = DWORD(1399);
+ {$EXTERNALSYM ERROR_CURRENT_DOMAIN_NOT_ALLOWED}
+
+// End of security error codes
+
+
+///////////////////////////
+// //
+// WinUser Error Codes //
+// //
+///////////////////////////
+
+//
+// MessageId: ERROR_INVALID_WINDOW_HANDLE
+//
+// MessageText:
+//
+// Invalid window handle.
+//
+ ERROR_INVALID_WINDOW_HANDLE = DWORD(1400);
+ {$EXTERNALSYM ERROR_INVALID_WINDOW_HANDLE}
+
+//
+// MessageId: ERROR_INVALID_MENU_HANDLE
+//
+// MessageText:
+//
+// Invalid menu handle.
+//
+ ERROR_INVALID_MENU_HANDLE = DWORD(1401);
+ {$EXTERNALSYM ERROR_INVALID_MENU_HANDLE}
+
+//
+// MessageId: ERROR_INVALID_CURSOR_HANDLE
+//
+// MessageText:
+//
+// Invalid cursor handle.
+//
+ ERROR_INVALID_CURSOR_HANDLE = DWORD(1402);
+ {$EXTERNALSYM ERROR_INVALID_CURSOR_HANDLE}
+
+//
+// MessageId: ERROR_INVALID_ACCEL_HANDLE
+//
+// MessageText:
+//
+// Invalid accelerator table handle.
+//
+ ERROR_INVALID_ACCEL_HANDLE = DWORD(1403);
+ {$EXTERNALSYM ERROR_INVALID_ACCEL_HANDLE}
+
+//
+// MessageId: ERROR_INVALID_HOOK_HANDLE
+//
+// MessageText:
+//
+// Invalid hook handle.
+//
+ ERROR_INVALID_HOOK_HANDLE = DWORD(1404);
+ {$EXTERNALSYM ERROR_INVALID_HOOK_HANDLE}
+
+//
+// MessageId: ERROR_INVALID_DWP_HANDLE
+//
+// MessageText:
+//
+// Invalid handle to a multiple-window position structure.
+//
+ ERROR_INVALID_DWP_HANDLE = DWORD(1405);
+ {$EXTERNALSYM ERROR_INVALID_DWP_HANDLE}
+
+//
+// MessageId: ERROR_TLW_WITH_WSCHILD
+//
+// MessageText:
+//
+// Cannot create a top-level child window.
+//
+ ERROR_TLW_WITH_WSCHILD = DWORD(1406);
+ {$EXTERNALSYM ERROR_TLW_WITH_WSCHILD}
+
+//
+// MessageId: ERROR_CANNOT_FIND_WND_CLASS
+//
+// MessageText:
+//
+// Cannot find window class.
+//
+ ERROR_CANNOT_FIND_WND_CLASS = DWORD(1407);
+ {$EXTERNALSYM ERROR_CANNOT_FIND_WND_CLASS}
+
+//
+// MessageId: ERROR_WINDOW_OF_OTHER_THREAD
+//
+// MessageText:
+//
+// Invalid window; it belongs to other thread.
+//
+ ERROR_WINDOW_OF_OTHER_THREAD = DWORD(1408);
+ {$EXTERNALSYM ERROR_WINDOW_OF_OTHER_THREAD}
+
+//
+// MessageId: ERROR_HOTKEY_ALREADY_REGISTERED
+//
+// MessageText:
+//
+// Hot key is already registered.
+//
+ ERROR_HOTKEY_ALREADY_REGISTERED = DWORD(1409);
+ {$EXTERNALSYM ERROR_HOTKEY_ALREADY_REGISTERED}
+
+//
+// MessageId: ERROR_CLASS_ALREADY_EXISTS
+//
+// MessageText:
+//
+// Class already exists.
+//
+ ERROR_CLASS_ALREADY_EXISTS = DWORD(1410);
+ {$EXTERNALSYM ERROR_CLASS_ALREADY_EXISTS}
+
+//
+// MessageId: ERROR_CLASS_DOES_NOT_EXIST
+//
+// MessageText:
+//
+// Class does not exist.
+//
+ ERROR_CLASS_DOES_NOT_EXIST = DWORD(1411);
+ {$EXTERNALSYM ERROR_CLASS_DOES_NOT_EXIST}
+
+//
+// MessageId: ERROR_CLASS_HAS_WINDOWS
+//
+// MessageText:
+//
+// Class still has open windows.
+//
+ ERROR_CLASS_HAS_WINDOWS = DWORD(1412);
+ {$EXTERNALSYM ERROR_CLASS_HAS_WINDOWS}
+
+//
+// MessageId: ERROR_INVALID_INDEX
+//
+// MessageText:
+//
+// Invalid index.
+//
+ ERROR_INVALID_INDEX = DWORD(1413);
+ {$EXTERNALSYM ERROR_INVALID_INDEX}
+
+//
+// MessageId: ERROR_INVALID_ICON_HANDLE
+//
+// MessageText:
+//
+// Invalid icon handle.
+//
+ ERROR_INVALID_ICON_HANDLE = DWORD(1414);
+ {$EXTERNALSYM ERROR_INVALID_ICON_HANDLE}
+
+//
+// MessageId: ERROR_PRIVATE_DIALOG_INDEX
+//
+// MessageText:
+//
+// Using private DIALOG window words.
+//
+ ERROR_PRIVATE_DIALOG_INDEX = DWORD(1415);
+ {$EXTERNALSYM ERROR_PRIVATE_DIALOG_INDEX}
+
+//
+// MessageId: ERROR_LISTBOX_ID_NOT_FOUND
+//
+// MessageText:
+//
+// The list box identifier was not found.
+//
+ ERROR_LISTBOX_ID_NOT_FOUND = DWORD(1416);
+ {$EXTERNALSYM ERROR_LISTBOX_ID_NOT_FOUND}
+
+//
+// MessageId: ERROR_NO_WILDCARD_CHARACTERS
+//
+// MessageText:
+//
+// No wildcards were found.
+//
+ ERROR_NO_WILDCARD_CHARACTERS = DWORD(1417);
+ {$EXTERNALSYM ERROR_NO_WILDCARD_CHARACTERS}
+
+//
+// MessageId: ERROR_CLIPBOARD_NOT_OPEN
+//
+// MessageText:
+//
+// Thread does not have a clipboard open.
+//
+ ERROR_CLIPBOARD_NOT_OPEN = DWORD(1418);
+ {$EXTERNALSYM ERROR_CLIPBOARD_NOT_OPEN}
+
+//
+// MessageId: ERROR_HOTKEY_NOT_REGISTERED
+//
+// MessageText:
+//
+// Hot key is not registered.
+//
+ ERROR_HOTKEY_NOT_REGISTERED = DWORD(1419);
+ {$EXTERNALSYM ERROR_HOTKEY_NOT_REGISTERED}
+
+//
+// MessageId: ERROR_WINDOW_NOT_DIALOG
+//
+// MessageText:
+//
+// The window is not a valid dialog window.
+//
+ ERROR_WINDOW_NOT_DIALOG = DWORD(1420);
+ {$EXTERNALSYM ERROR_WINDOW_NOT_DIALOG}
+
+//
+// MessageId: ERROR_CONTROL_ID_NOT_FOUND
+//
+// MessageText:
+//
+// Control ID not found.
+//
+ ERROR_CONTROL_ID_NOT_FOUND = DWORD(1421);
+ {$EXTERNALSYM ERROR_CONTROL_ID_NOT_FOUND}
+
+//
+// MessageId: ERROR_INVALID_COMBOBOX_MESSAGE
+//
+// MessageText:
+//
+// Invalid message for a combo box because it does not have an edit control.
+//
+ ERROR_INVALID_COMBOBOX_MESSAGE = DWORD(1422);
+ {$EXTERNALSYM ERROR_INVALID_COMBOBOX_MESSAGE}
+
+//
+// MessageId: ERROR_WINDOW_NOT_COMBOBOX
+//
+// MessageText:
+//
+// The window is not a combo box.
+//
+ ERROR_WINDOW_NOT_COMBOBOX = DWORD(1423);
+ {$EXTERNALSYM ERROR_WINDOW_NOT_COMBOBOX}
+
+//
+// MessageId: ERROR_INVALID_EDIT_HEIGHT
+//
+// MessageText:
+//
+// Height must be less than 256.
+//
+ ERROR_INVALID_EDIT_HEIGHT = DWORD(1424);
+ {$EXTERNALSYM ERROR_INVALID_EDIT_HEIGHT}
+
+//
+// MessageId: ERROR_DC_NOT_FOUND
+//
+// MessageText:
+//
+// Invalid device context (DC) handle.
+//
+ ERROR_DC_NOT_FOUND = DWORD(1425);
+ {$EXTERNALSYM ERROR_DC_NOT_FOUND}
+
+//
+// MessageId: ERROR_INVALID_HOOK_FILTER
+//
+// MessageText:
+//
+// Invalid hook procedure type.
+//
+ ERROR_INVALID_HOOK_FILTER = DWORD(1426);
+ {$EXTERNALSYM ERROR_INVALID_HOOK_FILTER}
+
+//
+// MessageId: ERROR_INVALID_FILTER_PROC
+//
+// MessageText:
+//
+// Invalid hook procedure.
+//
+ ERROR_INVALID_FILTER_PROC = DWORD(1427);
+ {$EXTERNALSYM ERROR_INVALID_FILTER_PROC}
+
+//
+// MessageId: ERROR_HOOK_NEEDS_HMOD
+//
+// MessageText:
+//
+// Cannot set nonlocal hook without a module handle.
+//
+ ERROR_HOOK_NEEDS_HMOD = DWORD(1428);
+ {$EXTERNALSYM ERROR_HOOK_NEEDS_HMOD}
+
+//
+// MessageId: ERROR_GLOBAL_ONLY_HOOK
+//
+// MessageText:
+//
+// This hook procedure can only be set globally.
+//
+ ERROR_GLOBAL_ONLY_HOOK = DWORD(1429);
+ {$EXTERNALSYM ERROR_GLOBAL_ONLY_HOOK}
+
+//
+// MessageId: ERROR_JOURNAL_HOOK_SET
+//
+// MessageText:
+//
+// The journal hook procedure is already installed.
+//
+ ERROR_JOURNAL_HOOK_SET = DWORD(1430);
+ {$EXTERNALSYM ERROR_JOURNAL_HOOK_SET}
+
+//
+// MessageId: ERROR_HOOK_NOT_INSTALLED
+//
+// MessageText:
+//
+// The hook procedure is not installed.
+//
+ ERROR_HOOK_NOT_INSTALLED = DWORD(1431);
+ {$EXTERNALSYM ERROR_HOOK_NOT_INSTALLED}
+
+//
+// MessageId: ERROR_INVALID_LB_MESSAGE
+//
+// MessageText:
+//
+// Invalid message for single-selection list box.
+//
+ ERROR_INVALID_LB_MESSAGE = DWORD(1432);
+ {$EXTERNALSYM ERROR_INVALID_LB_MESSAGE}
+
+//
+// MessageId: ERROR_SETCOUNT_ON_BAD_LB
+//
+// MessageText:
+//
+// LB_SETCOUNT sent to non-lazy list box.
+//
+ ERROR_SETCOUNT_ON_BAD_LB = DWORD(1433);
+ {$EXTERNALSYM ERROR_SETCOUNT_ON_BAD_LB}
+
+//
+// MessageId: ERROR_LB_WITHOUT_TABSTOPS
+//
+// MessageText:
+//
+// This list box does not support tab stops.
+//
+ ERROR_LB_WITHOUT_TABSTOPS = DWORD(1434);
+ {$EXTERNALSYM ERROR_LB_WITHOUT_TABSTOPS}
+
+//
+// MessageId: ERROR_DESTROY_OBJECT_OF_OTHER_THREAD
+//
+// MessageText:
+//
+// Cannot destroy object created by another thread.
+//
+ ERROR_DESTROY_OBJECT_OF_OTHER_THREAD = DWORD(1435);
+ {$EXTERNALSYM ERROR_DESTROY_OBJECT_OF_OTHER_THREAD}
+
+//
+// MessageId: ERROR_CHILD_WINDOW_MENU
+//
+// MessageText:
+//
+// Child windows cannot have menus.
+//
+ ERROR_CHILD_WINDOW_MENU = DWORD(1436);
+ {$EXTERNALSYM ERROR_CHILD_WINDOW_MENU}
+
+//
+// MessageId: ERROR_NO_SYSTEM_MENU
+//
+// MessageText:
+//
+// The window does not have a system menu.
+//
+ ERROR_NO_SYSTEM_MENU = DWORD(1437);
+ {$EXTERNALSYM ERROR_NO_SYSTEM_MENU}
+
+//
+// MessageId: ERROR_INVALID_MSGBOX_STYLE
+//
+// MessageText:
+//
+// Invalid message box style.
+//
+ ERROR_INVALID_MSGBOX_STYLE = DWORD(1438);
+ {$EXTERNALSYM ERROR_INVALID_MSGBOX_STYLE}
+
+//
+// MessageId: ERROR_INVALID_SPI_VALUE
+//
+// MessageText:
+//
+// Invalid system-wide (SPI_*) parameter.
+//
+ ERROR_INVALID_SPI_VALUE = DWORD(1439);
+ {$EXTERNALSYM ERROR_INVALID_SPI_VALUE}
+
+//
+// MessageId: ERROR_SCREEN_ALREADY_LOCKED
+//
+// MessageText:
+//
+// Screen already locked.
+//
+ ERROR_SCREEN_ALREADY_LOCKED = DWORD(1440);
+ {$EXTERNALSYM ERROR_SCREEN_ALREADY_LOCKED}
+
+//
+// MessageId: ERROR_HWNDS_HAVE_DIFF_PARENT
+//
+// MessageText:
+//
+// All handles to windows in a multiple-window position structure must have the same parent.
+//
+ ERROR_HWNDS_HAVE_DIFF_PARENT = DWORD(1441);
+ {$EXTERNALSYM ERROR_HWNDS_HAVE_DIFF_PARENT}
+
+//
+// MessageId: ERROR_NOT_CHILD_WINDOW
+//
+// MessageText:
+//
+// The window is not a child window.
+//
+ ERROR_NOT_CHILD_WINDOW = DWORD(1442);
+ {$EXTERNALSYM ERROR_NOT_CHILD_WINDOW}
+
+//
+// MessageId: ERROR_INVALID_GW_COMMAND
+//
+// MessageText:
+//
+// Invalid GW_* command.
+//
+ ERROR_INVALID_GW_COMMAND = DWORD(1443);
+ {$EXTERNALSYM ERROR_INVALID_GW_COMMAND}
+
+//
+// MessageId: ERROR_INVALID_THREAD_ID
+//
+// MessageText:
+//
+// Invalid thread identifier.
+//
+ ERROR_INVALID_THREAD_ID = DWORD(1444);
+ {$EXTERNALSYM ERROR_INVALID_THREAD_ID}
+
+//
+// MessageId: ERROR_NON_MDICHILD_WINDOW
+//
+// MessageText:
+//
+// Cannot process a message from a window that is not a multiple document interface (MDI) window.
+//
+ ERROR_NON_MDICHILD_WINDOW = DWORD(1445);
+ {$EXTERNALSYM ERROR_NON_MDICHILD_WINDOW}
+
+//
+// MessageId: ERROR_POPUP_ALREADY_ACTIVE
+//
+// MessageText:
+//
+// Popup menu already active.
+//
+ ERROR_POPUP_ALREADY_ACTIVE = DWORD(1446);
+ {$EXTERNALSYM ERROR_POPUP_ALREADY_ACTIVE}
+
+//
+// MessageId: ERROR_NO_SCROLLBARS
+//
+// MessageText:
+//
+// The window does not have scroll bars.
+//
+ ERROR_NO_SCROLLBARS = DWORD(1447);
+ {$EXTERNALSYM ERROR_NO_SCROLLBARS}
+
+//
+// MessageId: ERROR_INVALID_SCROLLBAR_RANGE
+//
+// MessageText:
+//
+// Scroll bar range cannot be greater than MAXLONG.
+//
+ ERROR_INVALID_SCROLLBAR_RANGE = DWORD(1448);
+ {$EXTERNALSYM ERROR_INVALID_SCROLLBAR_RANGE}
+
+//
+// MessageId: ERROR_INVALID_SHOWWIN_COMMAND
+//
+// MessageText:
+//
+// Cannot show or remove the window in the way specified.
+//
+ ERROR_INVALID_SHOWWIN_COMMAND = DWORD(1449);
+ {$EXTERNALSYM ERROR_INVALID_SHOWWIN_COMMAND}
+
+//
+// MessageId: ERROR_NO_SYSTEM_RESOURCES
+//
+// MessageText:
+//
+// Insufficient system resources exist to complete the requested service.
+//
+ ERROR_NO_SYSTEM_RESOURCES = DWORD(1450);
+ {$EXTERNALSYM ERROR_NO_SYSTEM_RESOURCES}
+
+//
+// MessageId: ERROR_NONPAGED_SYSTEM_RESOURCES
+//
+// MessageText:
+//
+// Insufficient system resources exist to complete the requested service.
+//
+ ERROR_NONPAGED_SYSTEM_RESOURCES = DWORD(1451);
+ {$EXTERNALSYM ERROR_NONPAGED_SYSTEM_RESOURCES}
+
+//
+// MessageId: ERROR_PAGED_SYSTEM_RESOURCES
+//
+// MessageText:
+//
+// Insufficient system resources exist to complete the requested service.
+//
+ ERROR_PAGED_SYSTEM_RESOURCES = DWORD(1452);
+ {$EXTERNALSYM ERROR_PAGED_SYSTEM_RESOURCES}
+
+//
+// MessageId: ERROR_WORKING_SET_QUOTA
+//
+// MessageText:
+//
+// Insufficient quota to complete the requested service.
+//
+ ERROR_WORKING_SET_QUOTA = DWORD(1453);
+ {$EXTERNALSYM ERROR_WORKING_SET_QUOTA}
+
+//
+// MessageId: ERROR_PAGEFILE_QUOTA
+//
+// MessageText:
+//
+// Insufficient quota to complete the requested service.
+//
+ ERROR_PAGEFILE_QUOTA = DWORD(1454);
+ {$EXTERNALSYM ERROR_PAGEFILE_QUOTA}
+
+//
+// MessageId: ERROR_COMMITMENT_LIMIT
+//
+// MessageText:
+//
+// The paging file is too small for this operation to complete.
+//
+ ERROR_COMMITMENT_LIMIT = DWORD(1455);
+ {$EXTERNALSYM ERROR_COMMITMENT_LIMIT}
+
+//
+// MessageId: ERROR_MENU_ITEM_NOT_FOUND
+//
+// MessageText:
+//
+// A menu item was not found.
+//
+ ERROR_MENU_ITEM_NOT_FOUND = DWORD(1456);
+ {$EXTERNALSYM ERROR_MENU_ITEM_NOT_FOUND}
+
+//
+// MessageId: ERROR_INVALID_KEYBOARD_HANDLE
+//
+// MessageText:
+//
+// Invalid keyboard layout handle.
+//
+ ERROR_INVALID_KEYBOARD_HANDLE = DWORD(1457);
+ {$EXTERNALSYM ERROR_INVALID_KEYBOARD_HANDLE}
+
+//
+// MessageId: ERROR_HOOK_TYPE_NOT_ALLOWED
+//
+// MessageText:
+//
+// Hook type not allowed.
+//
+ ERROR_HOOK_TYPE_NOT_ALLOWED = DWORD(1458);
+ {$EXTERNALSYM ERROR_HOOK_TYPE_NOT_ALLOWED}
+
+//
+// MessageId: ERROR_REQUIRES_INTERACTIVE_WINDOWSTATION
+//
+// MessageText:
+//
+// This operation requires an interactive window station.
+//
+ ERROR_REQUIRES_INTERACTIVE_WINDOWSTATION = DWORD(1459);
+ {$EXTERNALSYM ERROR_REQUIRES_INTERACTIVE_WINDOWSTATION}
+
+//
+// MessageId: ERROR_TIMEOUT
+//
+// MessageText:
+//
+// This operation returned because the timeout period expired.
+//
+ ERROR_TIMEOUT = DWORD(1460);
+ {$EXTERNALSYM ERROR_TIMEOUT}
+
+//
+// MessageId: ERROR_INVALID_MONITOR_HANDLE
+//
+// MessageText:
+//
+// Invalid monitor handle.
+//
+ ERROR_INVALID_MONITOR_HANDLE = DWORD(1461);
+ {$EXTERNALSYM ERROR_INVALID_MONITOR_HANDLE}
+
+// End of WinUser error codes
+
+
+///////////////////////////
+// //
+// Eventlog Status Codes //
+// //
+///////////////////////////
+
+//
+// MessageId: ERROR_EVENTLOG_FILE_CORRUPT
+//
+// MessageText:
+//
+// The event log file is corrupted.
+//
+ ERROR_EVENTLOG_FILE_CORRUPT = DWORD(1500);
+ {$EXTERNALSYM ERROR_EVENTLOG_FILE_CORRUPT}
+
+//
+// MessageId: ERROR_EVENTLOG_CANT_START
+//
+// MessageText:
+//
+// No event log file could be opened, so the event logging service did not start.
+//
+ ERROR_EVENTLOG_CANT_START = DWORD(1501);
+ {$EXTERNALSYM ERROR_EVENTLOG_CANT_START}
+
+//
+// MessageId: ERROR_LOG_FILE_FULL
+//
+// MessageText:
+//
+// The event log file is full.
+//
+ ERROR_LOG_FILE_FULL = DWORD(1502);
+ {$EXTERNALSYM ERROR_LOG_FILE_FULL}
+
+//
+// MessageId: ERROR_EVENTLOG_FILE_CHANGED
+//
+// MessageText:
+//
+// The event log file has changed between read operations.
+//
+ ERROR_EVENTLOG_FILE_CHANGED = DWORD(1503);
+ {$EXTERNALSYM ERROR_EVENTLOG_FILE_CHANGED}
+
+// End of eventlog error codes
+
+
+///////////////////////////
+// //
+// MSI Error Codes //
+// //
+///////////////////////////
+
+//
+// MessageId: ERROR_INSTALL_SERVICE_FAILURE
+//
+// MessageText:
+//
+// The Windows Installer Service could not be accessed. This can occur if you are running Windows in safe mode, or if the Windows Installer is not correctly installed. Contact your support personnel for assistance.
+//
+ ERROR_INSTALL_SERVICE_FAILURE = DWORD(1601);
+ {$EXTERNALSYM ERROR_INSTALL_SERVICE_FAILURE}
+
+//
+// MessageId: ERROR_INSTALL_USEREXIT
+//
+// MessageText:
+//
+// User cancelled installation.
+//
+ ERROR_INSTALL_USEREXIT = DWORD(1602);
+ {$EXTERNALSYM ERROR_INSTALL_USEREXIT}
+
+//
+// MessageId: ERROR_INSTALL_FAILURE
+//
+// MessageText:
+//
+// Fatal error during installation.
+//
+ ERROR_INSTALL_FAILURE = DWORD(1603);
+ {$EXTERNALSYM ERROR_INSTALL_FAILURE}
+
+//
+// MessageId: ERROR_INSTALL_SUSPEND
+//
+// MessageText:
+//
+// Installation suspended, incomplete.
+//
+ ERROR_INSTALL_SUSPEND = DWORD(1604);
+ {$EXTERNALSYM ERROR_INSTALL_SUSPEND}
+
+//
+// MessageId: ERROR_UNKNOWN_PRODUCT
+//
+// MessageText:
+//
+// This action is only valid for products that are currently installed.
+//
+ ERROR_UNKNOWN_PRODUCT = DWORD(1605);
+ {$EXTERNALSYM ERROR_UNKNOWN_PRODUCT}
+
+//
+// MessageId: ERROR_UNKNOWN_FEATURE
+//
+// MessageText:
+//
+// Feature ID not registered.
+//
+ ERROR_UNKNOWN_FEATURE = DWORD(1606);
+ {$EXTERNALSYM ERROR_UNKNOWN_FEATURE}
+
+//
+// MessageId: ERROR_UNKNOWN_COMPONENT
+//
+// MessageText:
+//
+// Component ID not registered.
+//
+ ERROR_UNKNOWN_COMPONENT = DWORD(1607);
+ {$EXTERNALSYM ERROR_UNKNOWN_COMPONENT}
+
+//
+// MessageId: ERROR_UNKNOWN_PROPERTY
+//
+// MessageText:
+//
+// Unknown property.
+//
+ ERROR_UNKNOWN_PROPERTY = DWORD(1608);
+ {$EXTERNALSYM ERROR_UNKNOWN_PROPERTY}
+
+//
+// MessageId: ERROR_INVALID_HANDLE_STATE
+//
+// MessageText:
+//
+// Handle is in an invalid state.
+//
+ ERROR_INVALID_HANDLE_STATE = DWORD(1609);
+ {$EXTERNALSYM ERROR_INVALID_HANDLE_STATE}
+
+//
+// MessageId: ERROR_BAD_CONFIGURATION
+//
+// MessageText:
+//
+// The configuration data for this product is corrupt. Contact your support personnel.
+//
+ ERROR_BAD_CONFIGURATION = DWORD(1610);
+ {$EXTERNALSYM ERROR_BAD_CONFIGURATION}
+
+//
+// MessageId: ERROR_INDEX_ABSENT
+//
+// MessageText:
+//
+// Component qualifier not present.
+//
+ ERROR_INDEX_ABSENT = DWORD(1611);
+ {$EXTERNALSYM ERROR_INDEX_ABSENT}
+
+//
+// MessageId: ERROR_INSTALL_SOURCE_ABSENT
+//
+// MessageText:
+//
+// The installation source for this product is not available. Verify that the source exists and that you can access it.
+//
+ ERROR_INSTALL_SOURCE_ABSENT = DWORD(1612);
+ {$EXTERNALSYM ERROR_INSTALL_SOURCE_ABSENT}
+
+//
+// MessageId: ERROR_INSTALL_PACKAGE_VERSION
+//
+// MessageText:
+//
+// This installation package cannot be installed by the Windows Installer service. You must install a Windows service pack that contains a newer version of the Windows Installer service.
+//
+ ERROR_INSTALL_PACKAGE_VERSION = DWORD(1613);
+ {$EXTERNALSYM ERROR_INSTALL_PACKAGE_VERSION}
+
+//
+// MessageId: ERROR_PRODUCT_UNINSTALLED
+//
+// MessageText:
+//
+// Product is uninstalled.
+//
+ ERROR_PRODUCT_UNINSTALLED = DWORD(1614);
+ {$EXTERNALSYM ERROR_PRODUCT_UNINSTALLED}
+
+//
+// MessageId: ERROR_BAD_QUERY_SYNTAX
+//
+// MessageText:
+//
+// SQL query syntax invalid or unsupported.
+//
+ ERROR_BAD_QUERY_SYNTAX = DWORD(1615);
+ {$EXTERNALSYM ERROR_BAD_QUERY_SYNTAX}
+
+//
+// MessageId: ERROR_INVALID_FIELD
+//
+// MessageText:
+//
+// Record field does not exist.
+//
+ ERROR_INVALID_FIELD = DWORD(1616);
+ {$EXTERNALSYM ERROR_INVALID_FIELD}
+
+//
+// MessageId: ERROR_DEVICE_REMOVED
+//
+// MessageText:
+//
+// The device has been removed.
+//
+ ERROR_DEVICE_REMOVED = DWORD(1617);
+ {$EXTERNALSYM ERROR_DEVICE_REMOVED}
+
+//
+// MessageId: ERROR_INSTALL_ALREADY_RUNNING
+//
+// MessageText:
+//
+// Another installation is already in progress. Complete that installation before proceeding with this install.
+//
+ ERROR_INSTALL_ALREADY_RUNNING = DWORD(1618);
+ {$EXTERNALSYM ERROR_INSTALL_ALREADY_RUNNING}
+
+//
+// MessageId: ERROR_INSTALL_PACKAGE_OPEN_FAILED
+//
+// MessageText:
+//
+// This installation package could not be opened. Verify that the package exists and that you can access it, or contact the application vendor to verify that this is a valid Windows Installer package.
+//
+ ERROR_INSTALL_PACKAGE_OPEN_FAILED = DWORD(1619);
+ {$EXTERNALSYM ERROR_INSTALL_PACKAGE_OPEN_FAILED}
+
+//
+// MessageId: ERROR_INSTALL_PACKAGE_INVALID
+//
+// MessageText:
+//
+// This installation package could not be opened. Contact the application vendor to verify that this is a valid Windows Installer package.
+//
+ ERROR_INSTALL_PACKAGE_INVALID = DWORD(1620);
+ {$EXTERNALSYM ERROR_INSTALL_PACKAGE_INVALID}
+
+//
+// MessageId: ERROR_INSTALL_UI_FAILURE
+//
+// MessageText:
+//
+// There was an error starting the Windows Installer service user interface. Contact your support personnel.
+//
+ ERROR_INSTALL_UI_FAILURE = DWORD(1621);
+ {$EXTERNALSYM ERROR_INSTALL_UI_FAILURE}
+
+//
+// MessageId: ERROR_INSTALL_LOG_FAILURE
+//
+// MessageText:
+//
+// Error opening installation log file. Verify that the specified log file location exists and that you can write to it.
+//
+ ERROR_INSTALL_LOG_FAILURE = DWORD(1622);
+ {$EXTERNALSYM ERROR_INSTALL_LOG_FAILURE}
+
+//
+// MessageId: ERROR_INSTALL_LANGUAGE_UNSUPPORTED
+//
+// MessageText:
+//
+// The language of this installation package is not supported by your system.
+//
+ ERROR_INSTALL_LANGUAGE_UNSUPPORTED = DWORD(1623);
+ {$EXTERNALSYM ERROR_INSTALL_LANGUAGE_UNSUPPORTED}
+
+//
+// MessageId: ERROR_INSTALL_TRANSFORM_FAILURE
+//
+// MessageText:
+//
+// Error applying transforms. Verify that the specified transform paths are valid.
+//
+ ERROR_INSTALL_TRANSFORM_FAILURE = DWORD(1624);
+ {$EXTERNALSYM ERROR_INSTALL_TRANSFORM_FAILURE}
+
+//
+// MessageId: ERROR_INSTALL_PACKAGE_REJECTED
+//
+// MessageText:
+//
+// This installation is forbidden by system policy. Contact your system administrator.
+//
+ ERROR_INSTALL_PACKAGE_REJECTED = DWORD(1625);
+ {$EXTERNALSYM ERROR_INSTALL_PACKAGE_REJECTED}
+
+//
+// MessageId: ERROR_FUNCTION_NOT_CALLED
+//
+// MessageText:
+//
+// Function could not be executed.
+//
+ ERROR_FUNCTION_NOT_CALLED = DWORD(1626);
+ {$EXTERNALSYM ERROR_FUNCTION_NOT_CALLED}
+
+//
+// MessageId: ERROR_FUNCTION_FAILED
+//
+// MessageText:
+//
+// Function failed during execution.
+//
+ ERROR_FUNCTION_FAILED = DWORD(1627);
+ {$EXTERNALSYM ERROR_FUNCTION_FAILED}
+
+//
+// MessageId: ERROR_INVALID_TABLE
+//
+// MessageText:
+//
+// Invalid or unknown table specified.
+//
+ ERROR_INVALID_TABLE = DWORD(1628);
+ {$EXTERNALSYM ERROR_INVALID_TABLE}
+
+//
+// MessageId: ERROR_DATATYPE_MISMATCH
+//
+// MessageText:
+//
+// Data supplied is of wrong type.
+//
+ ERROR_DATATYPE_MISMATCH = DWORD(1629);
+ {$EXTERNALSYM ERROR_DATATYPE_MISMATCH}
+
+//
+// MessageId: ERROR_UNSUPPORTED_TYPE
+//
+// MessageText:
+//
+// Data of this type is not supported.
+//
+ ERROR_UNSUPPORTED_TYPE = DWORD(1630);
+ {$EXTERNALSYM ERROR_UNSUPPORTED_TYPE}
+
+//
+// MessageId: ERROR_CREATE_FAILED
+//
+// MessageText:
+//
+// The Windows Installer service failed to start. Contact your support personnel.
+//
+ ERROR_CREATE_FAILED = DWORD(1631);
+ {$EXTERNALSYM ERROR_CREATE_FAILED}
+
+//
+// MessageId: ERROR_INSTALL_TEMP_UNWRITABLE
+//
+// MessageText:
+//
+// The Temp folder is on a drive that is full or is inaccessible. Free up space on the drive or verify that you have write permission on the Temp folder.
+//
+ ERROR_INSTALL_TEMP_UNWRITABLE = DWORD(1632);
+ {$EXTERNALSYM ERROR_INSTALL_TEMP_UNWRITABLE}
+
+//
+// MessageId: ERROR_INSTALL_PLATFORM_UNSUPPORTED
+//
+// MessageText:
+//
+// This installation package is not supported by this processor type. Contact your product vendor.
+//
+ ERROR_INSTALL_PLATFORM_UNSUPPORTED = DWORD(1633);
+ {$EXTERNALSYM ERROR_INSTALL_PLATFORM_UNSUPPORTED}
+
+//
+// MessageId: ERROR_INSTALL_NOTUSED
+//
+// MessageText:
+//
+// Component not used on this computer.
+//
+ ERROR_INSTALL_NOTUSED = DWORD(1634);
+ {$EXTERNALSYM ERROR_INSTALL_NOTUSED}
+
+//
+// MessageId: ERROR_PATCH_PACKAGE_OPEN_FAILED
+//
+// MessageText:
+//
+// This patch package could not be opened. Verify that the patch package exists and that you can access it, or contact the application vendor to verify that this is a valid Windows Installer patch package.
+//
+ ERROR_PATCH_PACKAGE_OPEN_FAILED = DWORD(1635);
+ {$EXTERNALSYM ERROR_PATCH_PACKAGE_OPEN_FAILED}
+
+//
+// MessageId: ERROR_PATCH_PACKAGE_INVALID
+//
+// MessageText:
+//
+// This patch package could not be opened. Contact the application vendor to verify that this is a valid Windows Installer patch package.
+//
+ ERROR_PATCH_PACKAGE_INVALID = DWORD(1636);
+ {$EXTERNALSYM ERROR_PATCH_PACKAGE_INVALID}
+
+//
+// MessageId: ERROR_PATCH_PACKAGE_UNSUPPORTED
+//
+// MessageText:
+//
+// This patch package cannot be processed by the Windows Installer service. You must install a Windows service pack that contains a newer version of the Windows Installer service.
+//
+ ERROR_PATCH_PACKAGE_UNSUPPORTED = DWORD(1637);
+ {$EXTERNALSYM ERROR_PATCH_PACKAGE_UNSUPPORTED}
+
+//
+// MessageId: ERROR_PRODUCT_VERSION
+//
+// MessageText:
+//
+// Another version of this product is already installed. Installation of this version cannot continue. To configure or remove the existing version of this product, use Add/Remove Programs on the Control Panel.
+//
+ ERROR_PRODUCT_VERSION = DWORD(1638);
+ {$EXTERNALSYM ERROR_PRODUCT_VERSION}
+
+//
+// MessageId: ERROR_INVALID_COMMAND_LINE
+//
+// MessageText:
+//
+// Invalid command line argument. Consult the Windows Installer SDK for detailed command line help.
+//
+ ERROR_INVALID_COMMAND_LINE = DWORD(1639);
+ {$EXTERNALSYM ERROR_INVALID_COMMAND_LINE}
+
+//
+// MessageId: ERROR_INSTALL_REMOTE_DISALLOWED
+//
+// MessageText:
+//
+// Only administrators have permission to add, remove, or configure server software during a Terminal services remote session. If you want to install or configure software on the server, contact your network administrator.
+//
+ ERROR_INSTALL_REMOTE_DISALLOWED = DWORD(1640);
+ {$EXTERNALSYM ERROR_INSTALL_REMOTE_DISALLOWED}
+
+//
+// MessageId: ERROR_SUCCESS_REBOOT_INITIATED
+//
+// MessageText:
+//
+// The requested operation completed successfully. The system will be restarted so the changes can take effect.
+//
+ ERROR_SUCCESS_REBOOT_INITIATED = DWORD(1641);
+ {$EXTERNALSYM ERROR_SUCCESS_REBOOT_INITIATED}
+
+//
+// MessageId: ERROR_PATCH_TARGET_NOT_FOUND
+//
+// MessageText:
+//
+// The upgrade patch cannot be installed by the Windows Installer service because the program to be upgraded may be missing, or the upgrade patch may update a different version of the program. Verify that the program to be upgraded exists on your computer an
+// d that you have the correct upgrade patch.
+//
+ ERROR_PATCH_TARGET_NOT_FOUND = DWORD(1642);
+ {$EXTERNALSYM ERROR_PATCH_TARGET_NOT_FOUND}
+
+//
+// MessageId: ERROR_PATCH_PACKAGE_REJECTED
+//
+// MessageText:
+//
+// The patch package is not permitted by software restriction policy.
+//
+ ERROR_PATCH_PACKAGE_REJECTED = DWORD(1643);
+ {$EXTERNALSYM ERROR_PATCH_PACKAGE_REJECTED}
+
+//
+// MessageId: ERROR_INSTALL_TRANSFORM_REJECTED
+//
+// MessageText:
+//
+// One or more customizations are not permitted by software restriction policy.
+//
+ ERROR_INSTALL_TRANSFORM_REJECTED = DWORD(1644);
+ {$EXTERNALSYM ERROR_INSTALL_TRANSFORM_REJECTED}
+
+//
+// MessageId: ERROR_INSTALL_REMOTE_PROHIBITED
+//
+// MessageText:
+//
+// The Windows Installer does not permit installation from a Remote Desktop Connection.
+//
+ ERROR_INSTALL_REMOTE_PROHIBITED = DWORD(1645);
+ {$EXTERNALSYM ERROR_INSTALL_REMOTE_PROHIBITED}
+
+// End of MSI error codes
+
+
+///////////////////////////
+// //
+// RPC Status Codes //
+// //
+///////////////////////////
+
+//
+// MessageId: RPC_S_INVALID_STRING_BINDING
+//
+// MessageText:
+//
+// The string binding is invalid.
+//
+ RPC_S_INVALID_STRING_BINDING = DWORD(1700);
+ {$EXTERNALSYM RPC_S_INVALID_STRING_BINDING}
+
+//
+// MessageId: RPC_S_WRONG_KIND_OF_BINDING
+//
+// MessageText:
+//
+// The binding handle is not the correct type.
+//
+ RPC_S_WRONG_KIND_OF_BINDING = DWORD(1701);
+ {$EXTERNALSYM RPC_S_WRONG_KIND_OF_BINDING}
+
+//
+// MessageId: RPC_S_INVALID_BINDING
+//
+// MessageText:
+//
+// The binding handle is invalid.
+//
+ RPC_S_INVALID_BINDING = DWORD(1702);
+ {$EXTERNALSYM RPC_S_INVALID_BINDING}
+
+//
+// MessageId: RPC_S_PROTSEQ_NOT_SUPPORTED
+//
+// MessageText:
+//
+// The RPC protocol sequence is not supported.
+//
+ RPC_S_PROTSEQ_NOT_SUPPORTED = DWORD(1703);
+ {$EXTERNALSYM RPC_S_PROTSEQ_NOT_SUPPORTED}
+
+//
+// MessageId: RPC_S_INVALID_RPC_PROTSEQ
+//
+// MessageText:
+//
+// The RPC protocol sequence is invalid.
+//
+ RPC_S_INVALID_RPC_PROTSEQ = DWORD(1704);
+ {$EXTERNALSYM RPC_S_INVALID_RPC_PROTSEQ}
+
+//
+// MessageId: RPC_S_INVALID_STRING_UUID
+//
+// MessageText:
+//
+// The string universal unique identifier (UUID) is invalid.
+//
+ RPC_S_INVALID_STRING_UUID = DWORD(1705);
+ {$EXTERNALSYM RPC_S_INVALID_STRING_UUID}
+
+//
+// MessageId: RPC_S_INVALID_ENDPOINT_FORMAT
+//
+// MessageText:
+//
+// The endpoint format is invalid.
+//
+ RPC_S_INVALID_ENDPOINT_FORMAT = DWORD(1706);
+ {$EXTERNALSYM RPC_S_INVALID_ENDPOINT_FORMAT}
+
+//
+// MessageId: RPC_S_INVALID_NET_ADDR
+//
+// MessageText:
+//
+// The network address is invalid.
+//
+ RPC_S_INVALID_NET_ADDR = DWORD(1707);
+ {$EXTERNALSYM RPC_S_INVALID_NET_ADDR}
+
+//
+// MessageId: RPC_S_NO_ENDPOINT_FOUND
+//
+// MessageText:
+//
+// No endpoint was found.
+//
+ RPC_S_NO_ENDPOINT_FOUND = DWORD(1708);
+ {$EXTERNALSYM RPC_S_NO_ENDPOINT_FOUND}
+
+//
+// MessageId: RPC_S_INVALID_TIMEOUT
+//
+// MessageText:
+//
+// The timeout value is invalid.
+//
+ RPC_S_INVALID_TIMEOUT = DWORD(1709);
+ {$EXTERNALSYM RPC_S_INVALID_TIMEOUT}
+
+//
+// MessageId: RPC_S_OBJECT_NOT_FOUND
+//
+// MessageText:
+//
+// The object universal unique identifier (UUID) was not found.
+//
+ RPC_S_OBJECT_NOT_FOUND = DWORD(1710);
+ {$EXTERNALSYM RPC_S_OBJECT_NOT_FOUND}
+
+//
+// MessageId: RPC_S_ALREADY_REGISTERED
+//
+// MessageText:
+//
+// The object universal unique identifier (UUID) has already been registered.
+//
+ RPC_S_ALREADY_REGISTERED = DWORD(1711);
+ {$EXTERNALSYM RPC_S_ALREADY_REGISTERED}
+
+//
+// MessageId: RPC_S_TYPE_ALREADY_REGISTERED
+//
+// MessageText:
+//
+// The type universal unique identifier (UUID) has already been registered.
+//
+ RPC_S_TYPE_ALREADY_REGISTERED = DWORD(1712);
+ {$EXTERNALSYM RPC_S_TYPE_ALREADY_REGISTERED}
+
+//
+// MessageId: RPC_S_ALREADY_LISTENING
+//
+// MessageText:
+//
+// The RPC server is already listening.
+//
+ RPC_S_ALREADY_LISTENING = DWORD(1713);
+ {$EXTERNALSYM RPC_S_ALREADY_LISTENING}
+
+//
+// MessageId: RPC_S_NO_PROTSEQS_REGISTERED
+//
+// MessageText:
+//
+// No protocol sequences have been registered.
+//
+ RPC_S_NO_PROTSEQS_REGISTERED = DWORD(1714);
+ {$EXTERNALSYM RPC_S_NO_PROTSEQS_REGISTERED}
+
+//
+// MessageId: RPC_S_NOT_LISTENING
+//
+// MessageText:
+//
+// The RPC server is not listening.
+//
+ RPC_S_NOT_LISTENING = DWORD(1715);
+ {$EXTERNALSYM RPC_S_NOT_LISTENING}
+
+//
+// MessageId: RPC_S_UNKNOWN_MGR_TYPE
+//
+// MessageText:
+//
+// The manager type is unknown.
+//
+ RPC_S_UNKNOWN_MGR_TYPE = DWORD(1716);
+ {$EXTERNALSYM RPC_S_UNKNOWN_MGR_TYPE}
+
+//
+// MessageId: RPC_S_UNKNOWN_IF
+//
+// MessageText:
+//
+// The interface is unknown.
+//
+ RPC_S_UNKNOWN_IF = DWORD(1717);
+ {$EXTERNALSYM RPC_S_UNKNOWN_IF}
+
+//
+// MessageId: RPC_S_NO_BINDINGS
+//
+// MessageText:
+//
+// There are no bindings.
+//
+ RPC_S_NO_BINDINGS = DWORD(1718);
+ {$EXTERNALSYM RPC_S_NO_BINDINGS}
+
+//
+// MessageId: RPC_S_NO_PROTSEQS
+//
+// MessageText:
+//
+// There are no protocol sequences.
+//
+ RPC_S_NO_PROTSEQS = DWORD(1719);
+ {$EXTERNALSYM RPC_S_NO_PROTSEQS}
+
+//
+// MessageId: RPC_S_CANT_CREATE_ENDPOINT
+//
+// MessageText:
+//
+// The endpoint cannot be created.
+//
+ RPC_S_CANT_CREATE_ENDPOINT = DWORD(1720);
+ {$EXTERNALSYM RPC_S_CANT_CREATE_ENDPOINT}
+
+//
+// MessageId: RPC_S_OUT_OF_RESOURCES
+//
+// MessageText:
+//
+// Not enough resources are available to complete this operation.
+//
+ RPC_S_OUT_OF_RESOURCES = DWORD(1721);
+ {$EXTERNALSYM RPC_S_OUT_OF_RESOURCES}
+
+//
+// MessageId: RPC_S_SERVER_UNAVAILABLE
+//
+// MessageText:
+//
+// The RPC server is unavailable.
+//
+ RPC_S_SERVER_UNAVAILABLE = DWORD(1722);
+ {$EXTERNALSYM RPC_S_SERVER_UNAVAILABLE}
+
+//
+// MessageId: RPC_S_SERVER_TOO_BUSY
+//
+// MessageText:
+//
+// The RPC server is too busy to complete this operation.
+//
+ RPC_S_SERVER_TOO_BUSY = DWORD(1723);
+ {$EXTERNALSYM RPC_S_SERVER_TOO_BUSY}
+
+//
+// MessageId: RPC_S_INVALID_NETWORK_OPTIONS
+//
+// MessageText:
+//
+// The network options are invalid.
+//
+ RPC_S_INVALID_NETWORK_OPTIONS = DWORD(1724);
+ {$EXTERNALSYM RPC_S_INVALID_NETWORK_OPTIONS}
+
+//
+// MessageId: RPC_S_NO_CALL_ACTIVE
+//
+// MessageText:
+//
+// There are no remote procedure calls active on this thread.
+//
+ RPC_S_NO_CALL_ACTIVE = DWORD(1725);
+ {$EXTERNALSYM RPC_S_NO_CALL_ACTIVE}
+
+//
+// MessageId: RPC_S_CALL_FAILED
+//
+// MessageText:
+//
+// The remote procedure call failed.
+//
+ RPC_S_CALL_FAILED = DWORD(1726);
+ {$EXTERNALSYM RPC_S_CALL_FAILED}
+
+//
+// MessageId: RPC_S_CALL_FAILED_DNE
+//
+// MessageText:
+//
+// The remote procedure call failed and did not execute.
+//
+ RPC_S_CALL_FAILED_DNE = DWORD(1727);
+ {$EXTERNALSYM RPC_S_CALL_FAILED_DNE}
+
+//
+// MessageId: RPC_S_PROTOCOL_ERROR
+//
+// MessageText:
+//
+// A remote procedure call (RPC) protocol error occurred.
+//
+ RPC_S_PROTOCOL_ERROR = DWORD(1728);
+ {$EXTERNALSYM RPC_S_PROTOCOL_ERROR}
+
+//
+// MessageId: RPC_S_UNSUPPORTED_TRANS_SYN
+//
+// MessageText:
+//
+// The transfer syntax is not supported by the RPC server.
+//
+ RPC_S_UNSUPPORTED_TRANS_SYN = DWORD(1730);
+ {$EXTERNALSYM RPC_S_UNSUPPORTED_TRANS_SYN}
+
+//
+// MessageId: RPC_S_UNSUPPORTED_TYPE
+//
+// MessageText:
+//
+// The universal unique identifier (UUID) type is not supported.
+//
+ RPC_S_UNSUPPORTED_TYPE = DWORD(1732);
+ {$EXTERNALSYM RPC_S_UNSUPPORTED_TYPE}
+
+//
+// MessageId: RPC_S_INVALID_TAG
+//
+// MessageText:
+//
+// The tag is invalid.
+//
+ RPC_S_INVALID_TAG = DWORD(1733);
+ {$EXTERNALSYM RPC_S_INVALID_TAG}
+
+//
+// MessageId: RPC_S_INVALID_BOUND
+//
+// MessageText:
+//
+// The array bounds are invalid.
+//
+ RPC_S_INVALID_BOUND = DWORD(1734);
+ {$EXTERNALSYM RPC_S_INVALID_BOUND}
+
+//
+// MessageId: RPC_S_NO_ENTRY_NAME
+//
+// MessageText:
+//
+// The binding does not contain an entry name.
+//
+ RPC_S_NO_ENTRY_NAME = DWORD(1735);
+ {$EXTERNALSYM RPC_S_NO_ENTRY_NAME}
+
+//
+// MessageId: RPC_S_INVALID_NAME_SYNTAX
+//
+// MessageText:
+//
+// The name syntax is invalid.
+//
+ RPC_S_INVALID_NAME_SYNTAX = DWORD(1736);
+ {$EXTERNALSYM RPC_S_INVALID_NAME_SYNTAX}
+
+//
+// MessageId: RPC_S_UNSUPPORTED_NAME_SYNTAX
+//
+// MessageText:
+//
+// The name syntax is not supported.
+//
+ RPC_S_UNSUPPORTED_NAME_SYNTAX = DWORD(1737);
+ {$EXTERNALSYM RPC_S_UNSUPPORTED_NAME_SYNTAX}
+
+//
+// MessageId: RPC_S_UUID_NO_ADDRESS
+//
+// MessageText:
+//
+// No network address is available to use to construct a universal unique identifier (UUID).
+//
+ RPC_S_UUID_NO_ADDRESS = DWORD(1739);
+ {$EXTERNALSYM RPC_S_UUID_NO_ADDRESS}
+
+//
+// MessageId: RPC_S_DUPLICATE_ENDPOINT
+//
+// MessageText:
+//
+// The endpoint is a duplicate.
+//
+ RPC_S_DUPLICATE_ENDPOINT = DWORD(1740);
+ {$EXTERNALSYM RPC_S_DUPLICATE_ENDPOINT}
+
+//
+// MessageId: RPC_S_UNKNOWN_AUTHN_TYPE
+//
+// MessageText:
+//
+// The authentication type is unknown.
+//
+ RPC_S_UNKNOWN_AUTHN_TYPE = DWORD(1741);
+ {$EXTERNALSYM RPC_S_UNKNOWN_AUTHN_TYPE}
+
+//
+// MessageId: RPC_S_MAX_CALLS_TOO_SMALL
+//
+// MessageText:
+//
+// The maximum number of calls is too small.
+//
+ RPC_S_MAX_CALLS_TOO_SMALL = DWORD(1742);
+ {$EXTERNALSYM RPC_S_MAX_CALLS_TOO_SMALL}
+
+//
+// MessageId: RPC_S_STRING_TOO_LONG
+//
+// MessageText:
+//
+// The string is too long.
+//
+ RPC_S_STRING_TOO_LONG = DWORD(1743);
+ {$EXTERNALSYM RPC_S_STRING_TOO_LONG}
+
+//
+// MessageId: RPC_S_PROTSEQ_NOT_FOUND
+//
+// MessageText:
+//
+// The RPC protocol sequence was not found.
+//
+ RPC_S_PROTSEQ_NOT_FOUND = DWORD(1744);
+ {$EXTERNALSYM RPC_S_PROTSEQ_NOT_FOUND}
+
+//
+// MessageId: RPC_S_PROCNUM_OUT_OF_RANGE
+//
+// MessageText:
+//
+// The procedure number is out of range.
+//
+ RPC_S_PROCNUM_OUT_OF_RANGE = DWORD(1745);
+ {$EXTERNALSYM RPC_S_PROCNUM_OUT_OF_RANGE}
+
+//
+// MessageId: RPC_S_BINDING_HAS_NO_AUTH
+//
+// MessageText:
+//
+// The binding does not contain any authentication information.
+//
+ RPC_S_BINDING_HAS_NO_AUTH = DWORD(1746);
+ {$EXTERNALSYM RPC_S_BINDING_HAS_NO_AUTH}
+
+//
+// MessageId: RPC_S_UNKNOWN_AUTHN_SERVICE
+//
+// MessageText:
+//
+// The authentication service is unknown.
+//
+ RPC_S_UNKNOWN_AUTHN_SERVICE = DWORD(1747);
+ {$EXTERNALSYM RPC_S_UNKNOWN_AUTHN_SERVICE}
+
+//
+// MessageId: RPC_S_UNKNOWN_AUTHN_LEVEL
+//
+// MessageText:
+//
+// The authentication level is unknown.
+//
+ RPC_S_UNKNOWN_AUTHN_LEVEL = DWORD(1748);
+ {$EXTERNALSYM RPC_S_UNKNOWN_AUTHN_LEVEL}
+
+//
+// MessageId: RPC_S_INVALID_AUTH_IDENTITY
+//
+// MessageText:
+//
+// The security context is invalid.
+//
+ RPC_S_INVALID_AUTH_IDENTITY = DWORD(1749);
+ {$EXTERNALSYM RPC_S_INVALID_AUTH_IDENTITY}
+
+//
+// MessageId: RPC_S_UNKNOWN_AUTHZ_SERVICE
+//
+// MessageText:
+//
+// The authorization service is unknown.
+//
+ RPC_S_UNKNOWN_AUTHZ_SERVICE = DWORD(1750);
+ {$EXTERNALSYM RPC_S_UNKNOWN_AUTHZ_SERVICE}
+
+//
+// MessageId: EPT_S_INVALID_ENTRY
+//
+// MessageText:
+//
+// The entry is invalid.
+//
+ EPT_S_INVALID_ENTRY = DWORD(1751);
+ {$EXTERNALSYM EPT_S_INVALID_ENTRY}
+
+//
+// MessageId: EPT_S_CANT_PERFORM_OP
+//
+// MessageText:
+//
+// The server endpoint cannot perform the operation.
+//
+ EPT_S_CANT_PERFORM_OP = DWORD(1752);
+ {$EXTERNALSYM EPT_S_CANT_PERFORM_OP}
+
+//
+// MessageId: EPT_S_NOT_REGISTERED
+//
+// MessageText:
+//
+// There are no more endpoints available from the endpoint mapper.
+//
+ EPT_S_NOT_REGISTERED = DWORD(1753);
+ {$EXTERNALSYM EPT_S_NOT_REGISTERED}
+
+//
+// MessageId: RPC_S_NOTHING_TO_EXPORT
+//
+// MessageText:
+//
+// No interfaces have been exported.
+//
+ RPC_S_NOTHING_TO_EXPORT = DWORD(1754);
+ {$EXTERNALSYM RPC_S_NOTHING_TO_EXPORT}
+
+//
+// MessageId: RPC_S_INCOMPLETE_NAME
+//
+// MessageText:
+//
+// The entry name is incomplete.
+//
+ RPC_S_INCOMPLETE_NAME = DWORD(1755);
+ {$EXTERNALSYM RPC_S_INCOMPLETE_NAME}
+
+//
+// MessageId: RPC_S_INVALID_VERS_OPTION
+//
+// MessageText:
+//
+// The version option is invalid.
+//
+ RPC_S_INVALID_VERS_OPTION = DWORD(1756);
+ {$EXTERNALSYM RPC_S_INVALID_VERS_OPTION}
+
+//
+// MessageId: RPC_S_NO_MORE_MEMBERS
+//
+// MessageText:
+//
+// There are no more members.
+//
+ RPC_S_NO_MORE_MEMBERS = DWORD(1757);
+ {$EXTERNALSYM RPC_S_NO_MORE_MEMBERS}
+
+//
+// MessageId: RPC_S_NOT_ALL_OBJS_UNEXPORTED
+//
+// MessageText:
+//
+// There is nothing to unexport.
+//
+ RPC_S_NOT_ALL_OBJS_UNEXPORTED = DWORD(1758);
+ {$EXTERNALSYM RPC_S_NOT_ALL_OBJS_UNEXPORTED}
+
+//
+// MessageId: RPC_S_INTERFACE_NOT_FOUND
+//
+// MessageText:
+//
+// The interface was not found.
+//
+ RPC_S_INTERFACE_NOT_FOUND = DWORD(1759);
+ {$EXTERNALSYM RPC_S_INTERFACE_NOT_FOUND}
+
+//
+// MessageId: RPC_S_ENTRY_ALREADY_EXISTS
+//
+// MessageText:
+//
+// The entry already exists.
+//
+ RPC_S_ENTRY_ALREADY_EXISTS = DWORD(1760);
+ {$EXTERNALSYM RPC_S_ENTRY_ALREADY_EXISTS}
+
+//
+// MessageId: RPC_S_ENTRY_NOT_FOUND
+//
+// MessageText:
+//
+// The entry is not found.
+//
+ RPC_S_ENTRY_NOT_FOUND = DWORD(1761);
+ {$EXTERNALSYM RPC_S_ENTRY_NOT_FOUND}
+
+//
+// MessageId: RPC_S_NAME_SERVICE_UNAVAILABLE
+//
+// MessageText:
+//
+// The name service is unavailable.
+//
+ RPC_S_NAME_SERVICE_UNAVAILABLE = DWORD(1762);
+ {$EXTERNALSYM RPC_S_NAME_SERVICE_UNAVAILABLE}
+
+//
+// MessageId: RPC_S_INVALID_NAF_ID
+//
+// MessageText:
+//
+// The network address family is invalid.
+//
+ RPC_S_INVALID_NAF_ID = DWORD(1763);
+ {$EXTERNALSYM RPC_S_INVALID_NAF_ID}
+
+//
+// MessageId: RPC_S_CANNOT_SUPPORT
+//
+// MessageText:
+//
+// The requested operation is not supported.
+//
+ RPC_S_CANNOT_SUPPORT = DWORD(1764);
+ {$EXTERNALSYM RPC_S_CANNOT_SUPPORT}
+
+//
+// MessageId: RPC_S_NO_CONTEXT_AVAILABLE
+//
+// MessageText:
+//
+// No security context is available to allow impersonation.
+//
+ RPC_S_NO_CONTEXT_AVAILABLE = DWORD(1765);
+ {$EXTERNALSYM RPC_S_NO_CONTEXT_AVAILABLE}
+
+//
+// MessageId: RPC_S_INTERNAL_ERROR
+//
+// MessageText:
+//
+// An internal error occurred in a remote procedure call (RPC).
+//
+ RPC_S_INTERNAL_ERROR = DWORD(1766);
+ {$EXTERNALSYM RPC_S_INTERNAL_ERROR}
+
+//
+// MessageId: RPC_S_ZERO_DIVIDE
+//
+// MessageText:
+//
+// The RPC server attempted an integer division by zero.
+//
+ RPC_S_ZERO_DIVIDE = DWORD(1767);
+ {$EXTERNALSYM RPC_S_ZERO_DIVIDE}
+
+//
+// MessageId: RPC_S_ADDRESS_ERROR
+//
+// MessageText:
+//
+// An addressing error occurred in the RPC server.
+//
+ RPC_S_ADDRESS_ERROR = DWORD(1768);
+ {$EXTERNALSYM RPC_S_ADDRESS_ERROR}
+
+//
+// MessageId: RPC_S_FP_DIV_ZERO
+//
+// MessageText:
+//
+// A floating-point operation at the RPC server caused a division by zero.
+//
+ RPC_S_FP_DIV_ZERO = DWORD(1769);
+ {$EXTERNALSYM RPC_S_FP_DIV_ZERO}
+
+//
+// MessageId: RPC_S_FP_UNDERFLOW
+//
+// MessageText:
+//
+// A floating-point underflow occurred at the RPC server.
+//
+ RPC_S_FP_UNDERFLOW = DWORD(1770);
+ {$EXTERNALSYM RPC_S_FP_UNDERFLOW}
+
+//
+// MessageId: RPC_S_FP_OVERFLOW
+//
+// MessageText:
+//
+// A floating-point overflow occurred at the RPC server.
+//
+ RPC_S_FP_OVERFLOW = DWORD(1771);
+ {$EXTERNALSYM RPC_S_FP_OVERFLOW}
+
+//
+// MessageId: RPC_X_NO_MORE_ENTRIES
+//
+// MessageText:
+//
+// The list of RPC servers available for the binding of auto handles has been exhausted.
+//
+ RPC_X_NO_MORE_ENTRIES = DWORD(1772);
+ {$EXTERNALSYM RPC_X_NO_MORE_ENTRIES}
+
+//
+// MessageId: RPC_X_SS_CHAR_TRANS_OPEN_FAIL
+//
+// MessageText:
+//
+// Unable to open the character translation table file.
+//
+ RPC_X_SS_CHAR_TRANS_OPEN_FAIL = DWORD(1773);
+ {$EXTERNALSYM RPC_X_SS_CHAR_TRANS_OPEN_FAIL}
+
+//
+// MessageId: RPC_X_SS_CHAR_TRANS_SHORT_FILE
+//
+// MessageText:
+//
+// The file containing the character translation table has fewer than 512 bytes.
+//
+ RPC_X_SS_CHAR_TRANS_SHORT_FILE = DWORD(1774);
+ {$EXTERNALSYM RPC_X_SS_CHAR_TRANS_SHORT_FILE}
+
+//
+// MessageId: RPC_X_SS_IN_NULL_CONTEXT
+//
+// MessageText:
+//
+// A null context handle was passed from the client to the host during a remote procedure call.
+//
+ RPC_X_SS_IN_NULL_CONTEXT = DWORD(1775);
+ {$EXTERNALSYM RPC_X_SS_IN_NULL_CONTEXT}
+
+//
+// MessageId: RPC_X_SS_CONTEXT_DAMAGED
+//
+// MessageText:
+//
+// The context handle changed during a remote procedure call.
+//
+ RPC_X_SS_CONTEXT_DAMAGED = DWORD(1777);
+ {$EXTERNALSYM RPC_X_SS_CONTEXT_DAMAGED}
+
+//
+// MessageId: RPC_X_SS_HANDLES_MISMATCH
+//
+// MessageText:
+//
+// The binding handles passed to a remote procedure call do not match.
+//
+ RPC_X_SS_HANDLES_MISMATCH = DWORD(1778);
+ {$EXTERNALSYM RPC_X_SS_HANDLES_MISMATCH}
+
+//
+// MessageId: RPC_X_SS_CANNOT_GET_CALL_HANDLE
+//
+// MessageText:
+//
+// The stub is unable to get the remote procedure call handle.
+//
+ RPC_X_SS_CANNOT_GET_CALL_HANDLE = DWORD(1779);
+ {$EXTERNALSYM RPC_X_SS_CANNOT_GET_CALL_HANDLE}
+
+//
+// MessageId: RPC_X_NULL_REF_POINTER
+//
+// MessageText:
+//
+// A null reference pointer was passed to the stub.
+//
+ RPC_X_NULL_REF_POINTER = DWORD(1780);
+ {$EXTERNALSYM RPC_X_NULL_REF_POINTER}
+
+//
+// MessageId: RPC_X_ENUM_VALUE_OUT_OF_RANGE
+//
+// MessageText:
+//
+// The enumeration value is out of range.
+//
+ RPC_X_ENUM_VALUE_OUT_OF_RANGE = DWORD(1781);
+ {$EXTERNALSYM RPC_X_ENUM_VALUE_OUT_OF_RANGE}
+
+//
+// MessageId: RPC_X_BYTE_COUNT_TOO_SMALL
+//
+// MessageText:
+//
+// The byte count is too small.
+//
+ RPC_X_BYTE_COUNT_TOO_SMALL = DWORD(1782);
+ {$EXTERNALSYM RPC_X_BYTE_COUNT_TOO_SMALL}
+
+//
+// MessageId: RPC_X_BAD_STUB_DATA
+//
+// MessageText:
+//
+// The stub received bad data.
+//
+ RPC_X_BAD_STUB_DATA = DWORD(1783);
+ {$EXTERNALSYM RPC_X_BAD_STUB_DATA}
+
+//
+// MessageId: ERROR_INVALID_USER_BUFFER
+//
+// MessageText:
+//
+// The supplied user buffer is not valid for the requested operation.
+//
+ ERROR_INVALID_USER_BUFFER = DWORD(1784);
+ {$EXTERNALSYM ERROR_INVALID_USER_BUFFER}
+
+//
+// MessageId: ERROR_UNRECOGNIZED_MEDIA
+//
+// MessageText:
+//
+// The disk media is not recognized. It may not be formatted.
+//
+ ERROR_UNRECOGNIZED_MEDIA = DWORD(1785);
+ {$EXTERNALSYM ERROR_UNRECOGNIZED_MEDIA}
+
+//
+// MessageId: ERROR_NO_TRUST_LSA_SECRET
+//
+// MessageText:
+//
+// The workstation does not have a trust secret.
+//
+ ERROR_NO_TRUST_LSA_SECRET = DWORD(1786);
+ {$EXTERNALSYM ERROR_NO_TRUST_LSA_SECRET}
+
+//
+// MessageId: ERROR_NO_TRUST_SAM_ACCOUNT
+//
+// MessageText:
+//
+// The security database on the server does not have a computer account for this workstation trust relationship.
+//
+ ERROR_NO_TRUST_SAM_ACCOUNT = DWORD(1787);
+ {$EXTERNALSYM ERROR_NO_TRUST_SAM_ACCOUNT}
+
+//
+// MessageId: ERROR_TRUSTED_DOMAIN_FAILURE
+//
+// MessageText:
+//
+// The trust relationship between the primary domain and the trusted domain failed.
+//
+ ERROR_TRUSTED_DOMAIN_FAILURE = DWORD(1788);
+ {$EXTERNALSYM ERROR_TRUSTED_DOMAIN_FAILURE}
+
+//
+// MessageId: ERROR_TRUSTED_RELATIONSHIP_FAILURE
+//
+// MessageText:
+//
+// The trust relationship between this workstation and the primary domain failed.
+//
+ ERROR_TRUSTED_RELATIONSHIP_FAILURE = DWORD(1789);
+ {$EXTERNALSYM ERROR_TRUSTED_RELATIONSHIP_FAILURE}
+
+//
+// MessageId: ERROR_TRUST_FAILURE
+//
+// MessageText:
+//
+// The network logon failed.
+//
+ ERROR_TRUST_FAILURE = DWORD(1790);
+ {$EXTERNALSYM ERROR_TRUST_FAILURE}
+
+//
+// MessageId: RPC_S_CALL_IN_PROGRESS
+//
+// MessageText:
+//
+// A remote procedure call is already in progress for this thread.
+//
+ RPC_S_CALL_IN_PROGRESS = DWORD(1791);
+ {$EXTERNALSYM RPC_S_CALL_IN_PROGRESS}
+
+//
+// MessageId: ERROR_NETLOGON_NOT_STARTED
+//
+// MessageText:
+//
+// An attempt was made to logon, but the network logon service was not started.
+//
+ ERROR_NETLOGON_NOT_STARTED = DWORD(1792);
+ {$EXTERNALSYM ERROR_NETLOGON_NOT_STARTED}
+
+//
+// MessageId: ERROR_ACCOUNT_EXPIRED
+//
+// MessageText:
+//
+// The user's account has expired.
+//
+ ERROR_ACCOUNT_EXPIRED = DWORD(1793);
+ {$EXTERNALSYM ERROR_ACCOUNT_EXPIRED}
+
+//
+// MessageId: ERROR_REDIRECTOR_HAS_OPEN_HANDLES
+//
+// MessageText:
+//
+// The redirector is in use and cannot be unloaded.
+//
+ ERROR_REDIRECTOR_HAS_OPEN_HANDLES = DWORD(1794);
+ {$EXTERNALSYM ERROR_REDIRECTOR_HAS_OPEN_HANDLES}
+
+//
+// MessageId: ERROR_PRINTER_DRIVER_ALREADY_INSTALLED
+//
+// MessageText:
+//
+// The specified printer driver is already installed.
+//
+ ERROR_PRINTER_DRIVER_ALREADY_INSTALLED = DWORD(1795);
+ {$EXTERNALSYM ERROR_PRINTER_DRIVER_ALREADY_INSTALLED}
+
+//
+// MessageId: ERROR_UNKNOWN_PORT
+//
+// MessageText:
+//
+// The specified port is unknown.
+//
+ ERROR_UNKNOWN_PORT = DWORD(1796);
+ {$EXTERNALSYM ERROR_UNKNOWN_PORT}
+
+//
+// MessageId: ERROR_UNKNOWN_PRINTER_DRIVER
+//
+// MessageText:
+//
+// The printer driver is unknown.
+//
+ ERROR_UNKNOWN_PRINTER_DRIVER = DWORD(1797);
+ {$EXTERNALSYM ERROR_UNKNOWN_PRINTER_DRIVER}
+
+//
+// MessageId: ERROR_UNKNOWN_PRINTPROCESSOR
+//
+// MessageText:
+//
+// The print processor is unknown.
+//
+ ERROR_UNKNOWN_PRINTPROCESSOR = DWORD(1798);
+ {$EXTERNALSYM ERROR_UNKNOWN_PRINTPROCESSOR}
+
+//
+// MessageId: ERROR_INVALID_SEPARATOR_FILE
+//
+// MessageText:
+//
+// The specified separator file is invalid.
+//
+ ERROR_INVALID_SEPARATOR_FILE = DWORD(1799);
+ {$EXTERNALSYM ERROR_INVALID_SEPARATOR_FILE}
+
+//
+// MessageId: ERROR_INVALID_PRIORITY
+//
+// MessageText:
+//
+// The specified priority is invalid.
+//
+ ERROR_INVALID_PRIORITY = DWORD(1800);
+ {$EXTERNALSYM ERROR_INVALID_PRIORITY}
+
+//
+// MessageId: ERROR_INVALID_PRINTER_NAME
+//
+// MessageText:
+//
+// The printer name is invalid.
+//
+ ERROR_INVALID_PRINTER_NAME = DWORD(1801);
+ {$EXTERNALSYM ERROR_INVALID_PRINTER_NAME}
+
+//
+// MessageId: ERROR_PRINTER_ALREADY_EXISTS
+//
+// MessageText:
+//
+// The printer already exists.
+//
+ ERROR_PRINTER_ALREADY_EXISTS = DWORD(1802);
+ {$EXTERNALSYM ERROR_PRINTER_ALREADY_EXISTS}
+
+//
+// MessageId: ERROR_INVALID_PRINTER_COMMAND
+//
+// MessageText:
+//
+// The printer command is invalid.
+//
+ ERROR_INVALID_PRINTER_COMMAND = DWORD(1803);
+ {$EXTERNALSYM ERROR_INVALID_PRINTER_COMMAND}
+
+//
+// MessageId: ERROR_INVALID_DATATYPE
+//
+// MessageText:
+//
+// The specified datatype is invalid.
+//
+ ERROR_INVALID_DATATYPE = DWORD(1804);
+ {$EXTERNALSYM ERROR_INVALID_DATATYPE}
+
+//
+// MessageId: ERROR_INVALID_ENVIRONMENT
+//
+// MessageText:
+//
+// The environment specified is invalid.
+//
+ ERROR_INVALID_ENVIRONMENT = DWORD(1805);
+ {$EXTERNALSYM ERROR_INVALID_ENVIRONMENT}
+
+//
+// MessageId: RPC_S_NO_MORE_BINDINGS
+//
+// MessageText:
+//
+// There are no more bindings.
+//
+ RPC_S_NO_MORE_BINDINGS = DWORD(1806);
+ {$EXTERNALSYM RPC_S_NO_MORE_BINDINGS}
+
+//
+// MessageId: ERROR_NOLOGON_INTERDOMAIN_TRUST_ACCOUNT
+//
+// MessageText:
+//
+// The account used is an interdomain trust account. Use your global user account or local user account to access this server.
+//
+ ERROR_NOLOGON_INTERDOMAIN_TRUST_ACCOUNT = DWORD(1807);
+ {$EXTERNALSYM ERROR_NOLOGON_INTERDOMAIN_TRUST_ACCOUNT}
+
+//
+// MessageId: ERROR_NOLOGON_WORKSTATION_TRUST_ACCOUNT
+//
+// MessageText:
+//
+// The account used is a computer account. Use your global user account or local user account to access this server.
+//
+ ERROR_NOLOGON_WORKSTATION_TRUST_ACCOUNT = DWORD(1808);
+ {$EXTERNALSYM ERROR_NOLOGON_WORKSTATION_TRUST_ACCOUNT}
+
+//
+// MessageId: ERROR_NOLOGON_SERVER_TRUST_ACCOUNT
+//
+// MessageText:
+//
+// The account used is a server trust account. Use your global user account or local user account to access this server.
+//
+ ERROR_NOLOGON_SERVER_TRUST_ACCOUNT = DWORD(1809);
+ {$EXTERNALSYM ERROR_NOLOGON_SERVER_TRUST_ACCOUNT}
+
+//
+// MessageId: ERROR_DOMAIN_TRUST_INCONSISTENT
+//
+// MessageText:
+//
+// The name or security ID (SID) of the domain specified is inconsistent with the trust information for that domain.
+//
+ ERROR_DOMAIN_TRUST_INCONSISTENT = DWORD(1810);
+ {$EXTERNALSYM ERROR_DOMAIN_TRUST_INCONSISTENT}
+
+//
+// MessageId: ERROR_SERVER_HAS_OPEN_HANDLES
+//
+// MessageText:
+//
+// The server is in use and cannot be unloaded.
+//
+ ERROR_SERVER_HAS_OPEN_HANDLES = DWORD(1811);
+ {$EXTERNALSYM ERROR_SERVER_HAS_OPEN_HANDLES}
+
+//
+// MessageId: ERROR_RESOURCE_DATA_NOT_FOUND
+//
+// MessageText:
+//
+// The specified image file did not contain a resource section.
+//
+ ERROR_RESOURCE_DATA_NOT_FOUND = DWORD(1812);
+ {$EXTERNALSYM ERROR_RESOURCE_DATA_NOT_FOUND}
+
+//
+// MessageId: ERROR_RESOURCE_TYPE_NOT_FOUND
+//
+// MessageText:
+//
+// The specified resource type cannot be found in the image file.
+//
+ ERROR_RESOURCE_TYPE_NOT_FOUND = DWORD(1813);
+ {$EXTERNALSYM ERROR_RESOURCE_TYPE_NOT_FOUND}
+
+//
+// MessageId: ERROR_RESOURCE_NAME_NOT_FOUND
+//
+// MessageText:
+//
+// The specified resource name cannot be found in the image file.
+//
+ ERROR_RESOURCE_NAME_NOT_FOUND = DWORD(1814);
+ {$EXTERNALSYM ERROR_RESOURCE_NAME_NOT_FOUND}
+
+//
+// MessageId: ERROR_RESOURCE_LANG_NOT_FOUND
+//
+// MessageText:
+//
+// The specified resource language ID cannot be found in the image file.
+//
+ ERROR_RESOURCE_LANG_NOT_FOUND = DWORD(1815);
+ {$EXTERNALSYM ERROR_RESOURCE_LANG_NOT_FOUND}
+
+//
+// MessageId: ERROR_NOT_ENOUGH_QUOTA
+//
+// MessageText:
+//
+// Not enough quota is available to process this command.
+//
+ ERROR_NOT_ENOUGH_QUOTA = DWORD(1816);
+ {$EXTERNALSYM ERROR_NOT_ENOUGH_QUOTA}
+
+//
+// MessageId: RPC_S_NO_INTERFACES
+//
+// MessageText:
+//
+// No interfaces have been registered.
+//
+ RPC_S_NO_INTERFACES = DWORD(1817);
+ {$EXTERNALSYM RPC_S_NO_INTERFACES}
+
+//
+// MessageId: RPC_S_CALL_CANCELLED
+//
+// MessageText:
+//
+// The remote procedure call was cancelled.
+//
+ RPC_S_CALL_CANCELLED = DWORD(1818);
+ {$EXTERNALSYM RPC_S_CALL_CANCELLED}
+
+//
+// MessageId: RPC_S_BINDING_INCOMPLETE
+//
+// MessageText:
+//
+// The binding handle does not contain all required information.
+//
+ RPC_S_BINDING_INCOMPLETE = DWORD(1819);
+ {$EXTERNALSYM RPC_S_BINDING_INCOMPLETE}
+
+//
+// MessageId: RPC_S_COMM_FAILURE
+//
+// MessageText:
+//
+// A communications failure occurred during a remote procedure call.
+//
+ RPC_S_COMM_FAILURE = DWORD(1820);
+ {$EXTERNALSYM RPC_S_COMM_FAILURE}
+
+//
+// MessageId: RPC_S_UNSUPPORTED_AUTHN_LEVEL
+//
+// MessageText:
+//
+// The requested authentication level is not supported.
+//
+ RPC_S_UNSUPPORTED_AUTHN_LEVEL = DWORD(1821);
+ {$EXTERNALSYM RPC_S_UNSUPPORTED_AUTHN_LEVEL}
+
+//
+// MessageId: RPC_S_NO_PRINC_NAME
+//
+// MessageText:
+//
+// No principal name registered.
+//
+ RPC_S_NO_PRINC_NAME = DWORD(1822);
+ {$EXTERNALSYM RPC_S_NO_PRINC_NAME}
+
+//
+// MessageId: RPC_S_NOT_RPC_ERROR
+//
+// MessageText:
+//
+// The error specified is not a valid Windows RPC error code.
+//
+ RPC_S_NOT_RPC_ERROR = DWORD(1823);
+ {$EXTERNALSYM RPC_S_NOT_RPC_ERROR}
+
+//
+// MessageId: RPC_S_UUID_LOCAL_ONLY
+//
+// MessageText:
+//
+// A UUID that is valid only on this computer has been allocated.
+//
+ RPC_S_UUID_LOCAL_ONLY = DWORD(1824);
+ {$EXTERNALSYM RPC_S_UUID_LOCAL_ONLY}
+
+//
+// MessageId: RPC_S_SEC_PKG_ERROR
+//
+// MessageText:
+//
+// A security package specific error occurred.
+//
+ RPC_S_SEC_PKG_ERROR = DWORD(1825);
+ {$EXTERNALSYM RPC_S_SEC_PKG_ERROR}
+
+//
+// MessageId: RPC_S_NOT_CANCELLED
+//
+// MessageText:
+//
+// Thread is not canceled.
+//
+ RPC_S_NOT_CANCELLED = DWORD(1826);
+ {$EXTERNALSYM RPC_S_NOT_CANCELLED}
+
+//
+// MessageId: RPC_X_INVALID_ES_ACTION
+//
+// MessageText:
+//
+// Invalid operation on the encoding/decoding handle.
+//
+ RPC_X_INVALID_ES_ACTION = DWORD(1827);
+ {$EXTERNALSYM RPC_X_INVALID_ES_ACTION}
+
+//
+// MessageId: RPC_X_WRONG_ES_VERSION
+//
+// MessageText:
+//
+// Incompatible version of the serializing package.
+//
+ RPC_X_WRONG_ES_VERSION = DWORD(1828);
+ {$EXTERNALSYM RPC_X_WRONG_ES_VERSION}
+
+//
+// MessageId: RPC_X_WRONG_STUB_VERSION
+//
+// MessageText:
+//
+// Incompatible version of the RPC stub.
+//
+ RPC_X_WRONG_STUB_VERSION = DWORD(1829);
+ {$EXTERNALSYM RPC_X_WRONG_STUB_VERSION}
+
+//
+// MessageId: RPC_X_INVALID_PIPE_OBJECT
+//
+// MessageText:
+//
+// The RPC pipe object is invalid or corrupted.
+//
+ RPC_X_INVALID_PIPE_OBJECT = DWORD(1830);
+ {$EXTERNALSYM RPC_X_INVALID_PIPE_OBJECT}
+
+//
+// MessageId: RPC_X_WRONG_PIPE_ORDER
+//
+// MessageText:
+//
+// An invalid operation was attempted on an RPC pipe object.
+//
+ RPC_X_WRONG_PIPE_ORDER = DWORD(1831);
+ {$EXTERNALSYM RPC_X_WRONG_PIPE_ORDER}
+
+//
+// MessageId: RPC_X_WRONG_PIPE_VERSION
+//
+// MessageText:
+//
+// Unsupported RPC pipe version.
+//
+ RPC_X_WRONG_PIPE_VERSION = DWORD(1832);
+ {$EXTERNALSYM RPC_X_WRONG_PIPE_VERSION}
+
+//
+// MessageId: RPC_S_GROUP_MEMBER_NOT_FOUND
+//
+// MessageText:
+//
+// The group member was not found.
+//
+ RPC_S_GROUP_MEMBER_NOT_FOUND = DWORD(1898);
+ {$EXTERNALSYM RPC_S_GROUP_MEMBER_NOT_FOUND}
+
+//
+// MessageId: EPT_S_CANT_CREATE
+//
+// MessageText:
+//
+// The endpoint mapper database entry could not be created.
+//
+ EPT_S_CANT_CREATE = DWORD(1899);
+ {$EXTERNALSYM EPT_S_CANT_CREATE}
+
+//
+// MessageId: RPC_S_INVALID_OBJECT
+//
+// MessageText:
+//
+// The object universal unique identifier (UUID) is the nil UUID.
+//
+ RPC_S_INVALID_OBJECT = DWORD(1900);
+ {$EXTERNALSYM RPC_S_INVALID_OBJECT}
+
+//
+// MessageId: ERROR_INVALID_TIME
+//
+// MessageText:
+//
+// The specified time is invalid.
+//
+ ERROR_INVALID_TIME = DWORD(1901);
+ {$EXTERNALSYM ERROR_INVALID_TIME}
+
+//
+// MessageId: ERROR_INVALID_FORM_NAME
+//
+// MessageText:
+//
+// The specified form name is invalid.
+//
+ ERROR_INVALID_FORM_NAME = DWORD(1902);
+ {$EXTERNALSYM ERROR_INVALID_FORM_NAME}
+
+//
+// MessageId: ERROR_INVALID_FORM_SIZE
+//
+// MessageText:
+//
+// The specified form size is invalid.
+//
+ ERROR_INVALID_FORM_SIZE = DWORD(1903);
+ {$EXTERNALSYM ERROR_INVALID_FORM_SIZE}
+
+//
+// MessageId: ERROR_ALREADY_WAITING
+//
+// MessageText:
+//
+// The specified printer handle is already being waited on
+//
+ ERROR_ALREADY_WAITING = DWORD(1904);
+ {$EXTERNALSYM ERROR_ALREADY_WAITING}
+
+//
+// MessageId: ERROR_PRINTER_DELETED
+//
+// MessageText:
+//
+// The specified printer has been deleted.
+//
+ ERROR_PRINTER_DELETED = DWORD(1905);
+ {$EXTERNALSYM ERROR_PRINTER_DELETED}
+
+//
+// MessageId: ERROR_INVALID_PRINTER_STATE
+//
+// MessageText:
+//
+// The state of the printer is invalid.
+//
+ ERROR_INVALID_PRINTER_STATE = DWORD(1906);
+ {$EXTERNALSYM ERROR_INVALID_PRINTER_STATE}
+
+//
+// MessageId: ERROR_PASSWORD_MUST_CHANGE
+//
+// MessageText:
+//
+// The user's password must be changed before logging on the first time.
+//
+ ERROR_PASSWORD_MUST_CHANGE = DWORD(1907);
+ {$EXTERNALSYM ERROR_PASSWORD_MUST_CHANGE}
+
+//
+// MessageId: ERROR_DOMAIN_CONTROLLER_NOT_FOUND
+//
+// MessageText:
+//
+// Could not find the domain controller for this domain.
+//
+ ERROR_DOMAIN_CONTROLLER_NOT_FOUND = DWORD(1908);
+ {$EXTERNALSYM ERROR_DOMAIN_CONTROLLER_NOT_FOUND}
+
+//
+// MessageId: ERROR_ACCOUNT_LOCKED_OUT
+//
+// MessageText:
+//
+// The referenced account is currently locked out and may not be logged on to.
+//
+ ERROR_ACCOUNT_LOCKED_OUT = DWORD(1909);
+ {$EXTERNALSYM ERROR_ACCOUNT_LOCKED_OUT}
+
+//
+// MessageId: OR_INVALID_OXID
+//
+// MessageText:
+//
+// The object exporter specified was not found.
+//
+ OR_INVALID_OXID = DWORD(1910);
+ {$EXTERNALSYM OR_INVALID_OXID}
+
+//
+// MessageId: OR_INVALID_OID
+//
+// MessageText:
+//
+// The object specified was not found.
+//
+ OR_INVALID_OID = DWORD(1911);
+ {$EXTERNALSYM OR_INVALID_OID}
+
+//
+// MessageId: OR_INVALID_SET
+//
+// MessageText:
+//
+// The object resolver set specified was not found.
+//
+ OR_INVALID_SET = DWORD(1912);
+ {$EXTERNALSYM OR_INVALID_SET}
+
+//
+// MessageId: RPC_S_SEND_INCOMPLETE
+//
+// MessageText:
+//
+// Some data remains to be sent in the request buffer.
+//
+ RPC_S_SEND_INCOMPLETE = DWORD(1913);
+ {$EXTERNALSYM RPC_S_SEND_INCOMPLETE}
+
+//
+// MessageId: RPC_S_INVALID_ASYNC_HANDLE
+//
+// MessageText:
+//
+// Invalid asynchronous remote procedure call handle.
+//
+ RPC_S_INVALID_ASYNC_HANDLE = DWORD(1914);
+ {$EXTERNALSYM RPC_S_INVALID_ASYNC_HANDLE}
+
+//
+// MessageId: RPC_S_INVALID_ASYNC_CALL
+//
+// MessageText:
+//
+// Invalid asynchronous RPC call handle for this operation.
+//
+ RPC_S_INVALID_ASYNC_CALL = DWORD(1915);
+ {$EXTERNALSYM RPC_S_INVALID_ASYNC_CALL}
+
+//
+// MessageId: RPC_X_PIPE_CLOSED
+//
+// MessageText:
+//
+// The RPC pipe object has already been closed.
+//
+ RPC_X_PIPE_CLOSED = DWORD(1916);
+ {$EXTERNALSYM RPC_X_PIPE_CLOSED}
+
+//
+// MessageId: RPC_X_PIPE_DISCIPLINE_ERROR
+//
+// MessageText:
+//
+// The RPC call completed before all pipes were processed.
+//
+ RPC_X_PIPE_DISCIPLINE_ERROR = DWORD(1917);
+ {$EXTERNALSYM RPC_X_PIPE_DISCIPLINE_ERROR}
+
+//
+// MessageId: RPC_X_PIPE_EMPTY
+//
+// MessageText:
+//
+// No more data is available from the RPC pipe.
+//
+ RPC_X_PIPE_EMPTY = DWORD(1918);
+ {$EXTERNALSYM RPC_X_PIPE_EMPTY}
+
+//
+// MessageId: ERROR_NO_SITENAME
+//
+// MessageText:
+//
+// No site name is available for this machine.
+//
+ ERROR_NO_SITENAME = DWORD(1919);
+ {$EXTERNALSYM ERROR_NO_SITENAME}
+
+//
+// MessageId: ERROR_CANT_ACCESS_FILE
+//
+// MessageText:
+//
+// The file can not be accessed by the system.
+//
+ ERROR_CANT_ACCESS_FILE = DWORD(1920);
+ {$EXTERNALSYM ERROR_CANT_ACCESS_FILE}
+
+//
+// MessageId: ERROR_CANT_RESOLVE_FILENAME
+//
+// MessageText:
+//
+// The name of the file cannot be resolved by the system.
+//
+ ERROR_CANT_RESOLVE_FILENAME = DWORD(1921);
+ {$EXTERNALSYM ERROR_CANT_RESOLVE_FILENAME}
+
+//
+// MessageId: RPC_S_ENTRY_TYPE_MISMATCH
+//
+// MessageText:
+//
+// The entry is not of the expected type.
+//
+ RPC_S_ENTRY_TYPE_MISMATCH = DWORD(1922);
+ {$EXTERNALSYM RPC_S_ENTRY_TYPE_MISMATCH}
+
+//
+// MessageId: RPC_S_NOT_ALL_OBJS_EXPORTED
+//
+// MessageText:
+//
+// Not all object UUIDs could be exported to the specified entry.
+//
+ RPC_S_NOT_ALL_OBJS_EXPORTED = DWORD(1923);
+ {$EXTERNALSYM RPC_S_NOT_ALL_OBJS_EXPORTED}
+
+//
+// MessageId: RPC_S_INTERFACE_NOT_EXPORTED
+//
+// MessageText:
+//
+// Interface could not be exported to the specified entry.
+//
+ RPC_S_INTERFACE_NOT_EXPORTED = DWORD(1924);
+ {$EXTERNALSYM RPC_S_INTERFACE_NOT_EXPORTED}
+
+//
+// MessageId: RPC_S_PROFILE_NOT_ADDED
+//
+// MessageText:
+//
+// The specified profile entry could not be added.
+//
+ RPC_S_PROFILE_NOT_ADDED = DWORD(1925);
+ {$EXTERNALSYM RPC_S_PROFILE_NOT_ADDED}
+
+//
+// MessageId: RPC_S_PRF_ELT_NOT_ADDED
+//
+// MessageText:
+//
+// The specified profile element could not be added.
+//
+ RPC_S_PRF_ELT_NOT_ADDED = DWORD(1926);
+ {$EXTERNALSYM RPC_S_PRF_ELT_NOT_ADDED}
+
+//
+// MessageId: RPC_S_PRF_ELT_NOT_REMOVED
+//
+// MessageText:
+//
+// The specified profile element could not be removed.
+//
+ RPC_S_PRF_ELT_NOT_REMOVED = DWORD(1927);
+ {$EXTERNALSYM RPC_S_PRF_ELT_NOT_REMOVED}
+
+//
+// MessageId: RPC_S_GRP_ELT_NOT_ADDED
+//
+// MessageText:
+//
+// The group element could not be added.
+//
+ RPC_S_GRP_ELT_NOT_ADDED = DWORD(1928);
+ {$EXTERNALSYM RPC_S_GRP_ELT_NOT_ADDED}
+
+//
+// MessageId: RPC_S_GRP_ELT_NOT_REMOVED
+//
+// MessageText:
+//
+// The group element could not be removed.
+//
+ RPC_S_GRP_ELT_NOT_REMOVED = DWORD(1929);
+ {$EXTERNALSYM RPC_S_GRP_ELT_NOT_REMOVED}
+
+//
+// MessageId: ERROR_KM_DRIVER_BLOCKED
+//
+// MessageText:
+//
+// The printer driver is not compatible with a policy enabled on your computer that blocks NT 4.0 drivers.
+//
+ ERROR_KM_DRIVER_BLOCKED = DWORD(1930);
+ {$EXTERNALSYM ERROR_KM_DRIVER_BLOCKED}
+
+//
+// MessageId: ERROR_CONTEXT_EXPIRED
+//
+// MessageText:
+//
+// The context has expired and can no longer be used.
+//
+ ERROR_CONTEXT_EXPIRED = DWORD(1931);
+ {$EXTERNALSYM ERROR_CONTEXT_EXPIRED}
+
+//
+// MessageId: ERROR_PER_USER_TRUST_QUOTA_EXCEEDED
+//
+// MessageText:
+//
+// The current user's delegated trust creation quota has been exceeded.
+//
+ ERROR_PER_USER_TRUST_QUOTA_EXCEEDED = DWORD(1932);
+ {$EXTERNALSYM ERROR_PER_USER_TRUST_QUOTA_EXCEEDED}
+
+//
+// MessageId: ERROR_ALL_USER_TRUST_QUOTA_EXCEEDED
+//
+// MessageText:
+//
+// The total delegated trust creation quota has been exceeded.
+//
+ ERROR_ALL_USER_TRUST_QUOTA_EXCEEDED = DWORD(1933);
+ {$EXTERNALSYM ERROR_ALL_USER_TRUST_QUOTA_EXCEEDED}
+
+//
+// MessageId: ERROR_USER_DELETE_TRUST_QUOTA_EXCEEDED
+//
+// MessageText:
+//
+// The current user's delegated trust deletion quota has been exceeded.
+//
+ ERROR_USER_DELETE_TRUST_QUOTA_EXCEEDED = DWORD(1934);
+ {$EXTERNALSYM ERROR_USER_DELETE_TRUST_QUOTA_EXCEEDED}
+
+//
+// MessageId: ERROR_AUTHENTICATION_FIREWALL_FAILED
+//
+// MessageText:
+//
+// Logon Failure: The machine you are logging onto is protected by an authentication firewall. The specified account is not allowed to authenticate to the machine.
+//
+ ERROR_AUTHENTICATION_FIREWALL_FAILED = DWORD(1935);
+ {$EXTERNALSYM ERROR_AUTHENTICATION_FIREWALL_FAILED}
+
+//
+// MessageId: ERROR_REMOTE_PRINT_CONNECTIONS_BLOCKED
+//
+// MessageText:
+//
+// Remote connections to the Print Spooler are blocked by a policy set on your machine.
+//
+ ERROR_REMOTE_PRINT_CONNECTIONS_BLOCKED = DWORD(1936);
+ {$EXTERNALSYM ERROR_REMOTE_PRINT_CONNECTIONS_BLOCKED}
+
+
+
+///////////////////////////
+// //
+// OpenGL Error Code //
+// //
+///////////////////////////
+
+//
+// MessageId: ERROR_INVALID_PIXEL_FORMAT
+//
+// MessageText:
+//
+// The pixel format is invalid.
+//
+ ERROR_INVALID_PIXEL_FORMAT = DWORD(2000);
+ {$EXTERNALSYM ERROR_INVALID_PIXEL_FORMAT}
+
+//
+// MessageId: ERROR_BAD_DRIVER
+//
+// MessageText:
+//
+// The specified driver is invalid.
+//
+ ERROR_BAD_DRIVER = DWORD(2001);
+ {$EXTERNALSYM ERROR_BAD_DRIVER}
+
+//
+// MessageId: ERROR_INVALID_WINDOW_STYLE
+//
+// MessageText:
+//
+// The window style or class attribute is invalid for this operation.
+//
+ ERROR_INVALID_WINDOW_STYLE = DWORD(2002);
+ {$EXTERNALSYM ERROR_INVALID_WINDOW_STYLE}
+
+//
+// MessageId: ERROR_METAFILE_NOT_SUPPORTED
+//
+// MessageText:
+//
+// The requested metafile operation is not supported.
+//
+ ERROR_METAFILE_NOT_SUPPORTED = DWORD(2003);
+ {$EXTERNALSYM ERROR_METAFILE_NOT_SUPPORTED}
+
+//
+// MessageId: ERROR_TRANSFORM_NOT_SUPPORTED
+//
+// MessageText:
+//
+// The requested transformation operation is not supported.
+//
+ ERROR_TRANSFORM_NOT_SUPPORTED = DWORD(2004);
+ {$EXTERNALSYM ERROR_TRANSFORM_NOT_SUPPORTED}
+
+//
+// MessageId: ERROR_CLIPPING_NOT_SUPPORTED
+//
+// MessageText:
+//
+// The requested clipping operation is not supported.
+//
+ ERROR_CLIPPING_NOT_SUPPORTED = DWORD(2005);
+ {$EXTERNALSYM ERROR_CLIPPING_NOT_SUPPORTED}
+
+// End of OpenGL error codes
+
+
+///////////////////////////////////////////
+// //
+// Image Color Management Error Code //
+// //
+///////////////////////////////////////////
+
+//
+// MessageId: ERROR_INVALID_CMM
+//
+// MessageText:
+//
+// The specified color management module is invalid.
+//
+ ERROR_INVALID_CMM = DWORD(2010);
+ {$EXTERNALSYM ERROR_INVALID_CMM}
+
+//
+// MessageId: ERROR_INVALID_PROFILE
+//
+// MessageText:
+//
+// The specified color profile is invalid.
+//
+ ERROR_INVALID_PROFILE = DWORD(2011);
+ {$EXTERNALSYM ERROR_INVALID_PROFILE}
+
+//
+// MessageId: ERROR_TAG_NOT_FOUND
+//
+// MessageText:
+//
+// The specified tag was not found.
+//
+ ERROR_TAG_NOT_FOUND = DWORD(2012);
+ {$EXTERNALSYM ERROR_TAG_NOT_FOUND}
+
+//
+// MessageId: ERROR_TAG_NOT_PRESENT
+//
+// MessageText:
+//
+// A required tag is not present.
+//
+ ERROR_TAG_NOT_PRESENT = DWORD(2013);
+ {$EXTERNALSYM ERROR_TAG_NOT_PRESENT}
+
+//
+// MessageId: ERROR_DUPLICATE_TAG
+//
+// MessageText:
+//
+// The specified tag is already present.
+//
+ ERROR_DUPLICATE_TAG = DWORD(2014);
+ {$EXTERNALSYM ERROR_DUPLICATE_TAG}
+
+//
+// MessageId: ERROR_PROFILE_NOT_ASSOCIATED_WITH_DEVICE
+//
+// MessageText:
+//
+// The specified color profile is not associated with any device.
+//
+ ERROR_PROFILE_NOT_ASSOCIATED_WITH_DEVICE = DWORD(2015);
+ {$EXTERNALSYM ERROR_PROFILE_NOT_ASSOCIATED_WITH_DEVICE}
+
+//
+// MessageId: ERROR_PROFILE_NOT_FOUND
+//
+// MessageText:
+//
+// The specified color profile was not found.
+//
+ ERROR_PROFILE_NOT_FOUND = DWORD(2016);
+ {$EXTERNALSYM ERROR_PROFILE_NOT_FOUND}
+
+//
+// MessageId: ERROR_INVALID_COLORSPACE
+//
+// MessageText:
+//
+// The specified color space is invalid.
+//
+ ERROR_INVALID_COLORSPACE = DWORD(2017);
+ {$EXTERNALSYM ERROR_INVALID_COLORSPACE}
+
+//
+// MessageId: ERROR_ICM_NOT_ENABLED
+//
+// MessageText:
+//
+// Image Color Management is not enabled.
+//
+ ERROR_ICM_NOT_ENABLED = DWORD(2018);
+ {$EXTERNALSYM ERROR_ICM_NOT_ENABLED}
+
+//
+// MessageId: ERROR_DELETING_ICM_XFORM
+//
+// MessageText:
+//
+// There was an error while deleting the color transform.
+//
+ ERROR_DELETING_ICM_XFORM = DWORD(2019);
+ {$EXTERNALSYM ERROR_DELETING_ICM_XFORM}
+
+//
+// MessageId: ERROR_INVALID_TRANSFORM
+//
+// MessageText:
+//
+// The specified color transform is invalid.
+//
+ ERROR_INVALID_TRANSFORM = DWORD(2020);
+ {$EXTERNALSYM ERROR_INVALID_TRANSFORM}
+
+//
+// MessageId: ERROR_COLORSPACE_MISMATCH
+//
+// MessageText:
+//
+// The specified transform does not match the bitmap's color space.
+//
+ ERROR_COLORSPACE_MISMATCH = DWORD(2021);
+ {$EXTERNALSYM ERROR_COLORSPACE_MISMATCH}
+
+//
+// MessageId: ERROR_INVALID_COLORINDEX
+//
+// MessageText:
+//
+// The specified named color index is not present in the profile.
+//
+ ERROR_INVALID_COLORINDEX = DWORD(2022);
+ {$EXTERNALSYM ERROR_INVALID_COLORINDEX}
+
+
+
+///////////////////////////
+// //
+// Winnet32 Status Codes //
+// //
+// The range 2100 through 2999 is reserved for network status codes.
+// See lmerr.h for a complete listing
+///////////////////////////
+
+//
+// MessageId: ERROR_CONNECTED_OTHER_PASSWORD
+//
+// MessageText:
+//
+// The network connection was made successfully, but the user had to be prompted for a password other than the one originally specified.
+//
+ ERROR_CONNECTED_OTHER_PASSWORD = DWORD(2108);
+ {$EXTERNALSYM ERROR_CONNECTED_OTHER_PASSWORD}
+
+//
+// MessageId: ERROR_CONNECTED_OTHER_PASSWORD_DEFAULT
+//
+// MessageText:
+//
+// The network connection was made successfully using default credentials.
+//
+ ERROR_CONNECTED_OTHER_PASSWORD_DEFAULT = DWORD(2109);
+ {$EXTERNALSYM ERROR_CONNECTED_OTHER_PASSWORD_DEFAULT}
+
+//
+// MessageId: ERROR_BAD_USERNAME
+//
+// MessageText:
+//
+// The specified username is invalid.
+//
+ ERROR_BAD_USERNAME = DWORD(2202);
+ {$EXTERNALSYM ERROR_BAD_USERNAME}
+
+//
+// MessageId: ERROR_NOT_CONNECTED
+//
+// MessageText:
+//
+// This network connection does not exist.
+//
+ ERROR_NOT_CONNECTED = DWORD(2250);
+ {$EXTERNALSYM ERROR_NOT_CONNECTED}
+
+//
+// MessageId: ERROR_OPEN_FILES
+//
+// MessageText:
+//
+// This network connection has files open or requests pending.
+//
+ ERROR_OPEN_FILES = DWORD(2401);
+ {$EXTERNALSYM ERROR_OPEN_FILES}
+
+//
+// MessageId: ERROR_ACTIVE_CONNECTIONS
+//
+// MessageText:
+//
+// Active connections still exist.
+//
+ ERROR_ACTIVE_CONNECTIONS = DWORD(2402);
+ {$EXTERNALSYM ERROR_ACTIVE_CONNECTIONS}
+
+//
+// MessageId: ERROR_DEVICE_IN_USE
+//
+// MessageText:
+//
+// The device is in use by an active process and cannot be disconnected.
+//
+ ERROR_DEVICE_IN_USE = DWORD(2404);
+ {$EXTERNALSYM ERROR_DEVICE_IN_USE}
+
+////////////////////////////////////
+// //
+// Win32 Spooler Error Codes //
+// //
+////////////////////////////////////
+//
+// MessageId: ERROR_UNKNOWN_PRINT_MONITOR
+//
+// MessageText:
+//
+// The specified print monitor is unknown.
+//
+ ERROR_UNKNOWN_PRINT_MONITOR = DWORD(3000);
+ {$EXTERNALSYM ERROR_UNKNOWN_PRINT_MONITOR}
+
+//
+// MessageId: ERROR_PRINTER_DRIVER_IN_USE
+//
+// MessageText:
+//
+// The specified printer driver is currently in use.
+//
+ ERROR_PRINTER_DRIVER_IN_USE = DWORD(3001);
+ {$EXTERNALSYM ERROR_PRINTER_DRIVER_IN_USE}
+
+//
+// MessageId: ERROR_SPOOL_FILE_NOT_FOUND
+//
+// MessageText:
+//
+// The spool file was not found.
+//
+ ERROR_SPOOL_FILE_NOT_FOUND = DWORD(3002);
+ {$EXTERNALSYM ERROR_SPOOL_FILE_NOT_FOUND}
+
+//
+// MessageId: ERROR_SPL_NO_STARTDOC
+//
+// MessageText:
+//
+// A StartDocPrinter call was not issued.
+//
+ ERROR_SPL_NO_STARTDOC = DWORD(3003);
+ {$EXTERNALSYM ERROR_SPL_NO_STARTDOC}
+
+//
+// MessageId: ERROR_SPL_NO_ADDJOB
+//
+// MessageText:
+//
+// An AddJob call was not issued.
+//
+ ERROR_SPL_NO_ADDJOB = DWORD(3004);
+ {$EXTERNALSYM ERROR_SPL_NO_ADDJOB}
+
+//
+// MessageId: ERROR_PRINT_PROCESSOR_ALREADY_INSTALLED
+//
+// MessageText:
+//
+// The specified print processor has already been installed.
+//
+ ERROR_PRINT_PROCESSOR_ALREADY_INSTALLED = DWORD(3005);
+ {$EXTERNALSYM ERROR_PRINT_PROCESSOR_ALREADY_INSTALLED}
+
+//
+// MessageId: ERROR_PRINT_MONITOR_ALREADY_INSTALLED
+//
+// MessageText:
+//
+// The specified print monitor has already been installed.
+//
+ ERROR_PRINT_MONITOR_ALREADY_INSTALLED = DWORD(3006);
+ {$EXTERNALSYM ERROR_PRINT_MONITOR_ALREADY_INSTALLED}
+
+//
+// MessageId: ERROR_INVALID_PRINT_MONITOR
+//
+// MessageText:
+//
+// The specified print monitor does not have the required functions.
+//
+ ERROR_INVALID_PRINT_MONITOR = DWORD(3007);
+ {$EXTERNALSYM ERROR_INVALID_PRINT_MONITOR}
+
+//
+// MessageId: ERROR_PRINT_MONITOR_IN_USE
+//
+// MessageText:
+//
+// The specified print monitor is currently in use.
+//
+ ERROR_PRINT_MONITOR_IN_USE = DWORD(3008);
+ {$EXTERNALSYM ERROR_PRINT_MONITOR_IN_USE}
+
+//
+// MessageId: ERROR_PRINTER_HAS_JOBS_QUEUED
+//
+// MessageText:
+//
+// The requested operation is not allowed when there are jobs queued to the printer.
+//
+ ERROR_PRINTER_HAS_JOBS_QUEUED = DWORD(3009);
+ {$EXTERNALSYM ERROR_PRINTER_HAS_JOBS_QUEUED}
+
+//
+// MessageId: ERROR_SUCCESS_REBOOT_REQUIRED
+//
+// MessageText:
+//
+// The requested operation is successful. Changes will not be effective until the system is rebooted.
+//
+ ERROR_SUCCESS_REBOOT_REQUIRED = DWORD(3010);
+ {$EXTERNALSYM ERROR_SUCCESS_REBOOT_REQUIRED}
+
+//
+// MessageId: ERROR_SUCCESS_RESTART_REQUIRED
+//
+// MessageText:
+//
+// The requested operation is successful. Changes will not be effective until the service is restarted.
+//
+ ERROR_SUCCESS_RESTART_REQUIRED = DWORD(3011);
+ {$EXTERNALSYM ERROR_SUCCESS_RESTART_REQUIRED}
+
+//
+// MessageId: ERROR_PRINTER_NOT_FOUND
+//
+// MessageText:
+//
+// No printers were found.
+//
+ ERROR_PRINTER_NOT_FOUND = DWORD(3012);
+ {$EXTERNALSYM ERROR_PRINTER_NOT_FOUND}
+
+//
+// MessageId: ERROR_PRINTER_DRIVER_WARNED
+//
+// MessageText:
+//
+// The printer driver is known to be unreliable.
+//
+ ERROR_PRINTER_DRIVER_WARNED = DWORD(3013);
+ {$EXTERNALSYM ERROR_PRINTER_DRIVER_WARNED}
+
+//
+// MessageId: ERROR_PRINTER_DRIVER_BLOCKED
+//
+// MessageText:
+//
+// The printer driver is known to harm the system.
+//
+ ERROR_PRINTER_DRIVER_BLOCKED = DWORD(3014);
+ {$EXTERNALSYM ERROR_PRINTER_DRIVER_BLOCKED}
+
+////////////////////////////////////
+// //
+// Wins Error Codes //
+// //
+////////////////////////////////////
+//
+// MessageId: ERROR_WINS_INTERNAL
+//
+// MessageText:
+//
+// WINS encountered an error while processing the command.
+//
+ ERROR_WINS_INTERNAL = DWORD(4000);
+ {$EXTERNALSYM ERROR_WINS_INTERNAL}
+
+//
+// MessageId: ERROR_CAN_NOT_DEL_LOCAL_WINS
+//
+// MessageText:
+//
+// The local WINS can not be deleted.
+//
+ ERROR_CAN_NOT_DEL_LOCAL_WINS = DWORD(4001);
+ {$EXTERNALSYM ERROR_CAN_NOT_DEL_LOCAL_WINS}
+
+//
+// MessageId: ERROR_STATIC_INIT
+//
+// MessageText:
+//
+// The importation from the file failed.
+//
+ ERROR_STATIC_INIT = DWORD(4002);
+ {$EXTERNALSYM ERROR_STATIC_INIT}
+
+//
+// MessageId: ERROR_INC_BACKUP
+//
+// MessageText:
+//
+// The backup failed. Was a full backup done before?
+//
+ ERROR_INC_BACKUP = DWORD(4003);
+ {$EXTERNALSYM ERROR_INC_BACKUP}
+
+//
+// MessageId: ERROR_FULL_BACKUP
+//
+// MessageText:
+//
+// The backup failed. Check the directory to which you are backing the database.
+//
+ ERROR_FULL_BACKUP = DWORD(4004);
+ {$EXTERNALSYM ERROR_FULL_BACKUP}
+
+//
+// MessageId: ERROR_REC_NON_EXISTENT
+//
+// MessageText:
+//
+// The name does not exist in the WINS database.
+//
+ ERROR_REC_NON_EXISTENT = DWORD(4005);
+ {$EXTERNALSYM ERROR_REC_NON_EXISTENT}
+
+//
+// MessageId: ERROR_RPL_NOT_ALLOWED
+//
+// MessageText:
+//
+// Replication with a nonconfigured partner is not allowed.
+//
+ ERROR_RPL_NOT_ALLOWED = DWORD(4006);
+ {$EXTERNALSYM ERROR_RPL_NOT_ALLOWED}
+
+////////////////////////////////////
+// //
+// DHCP Error Codes //
+// //
+////////////////////////////////////
+//
+// MessageId: ERROR_DHCP_ADDRESS_CONFLICT
+//
+// MessageText:
+//
+// The DHCP client has obtained an IP address that is already in use on the network. The local interface will be disabled until the DHCP client can obtain a new address.
+//
+ ERROR_DHCP_ADDRESS_CONFLICT = DWORD(4100);
+ {$EXTERNALSYM ERROR_DHCP_ADDRESS_CONFLICT}
+
+////////////////////////////////////
+// //
+// WMI Error Codes //
+// //
+////////////////////////////////////
+//
+// MessageId: ERROR_WMI_GUID_NOT_FOUND
+//
+// MessageText:
+//
+// The GUID passed was not recognized as valid by a WMI data provider.
+//
+ ERROR_WMI_GUID_NOT_FOUND = DWORD(4200);
+ {$EXTERNALSYM ERROR_WMI_GUID_NOT_FOUND}
+
+//
+// MessageId: ERROR_WMI_INSTANCE_NOT_FOUND
+//
+// MessageText:
+//
+// The instance name passed was not recognized as valid by a WMI data provider.
+//
+ ERROR_WMI_INSTANCE_NOT_FOUND = DWORD(4201);
+ {$EXTERNALSYM ERROR_WMI_INSTANCE_NOT_FOUND}
+
+//
+// MessageId: ERROR_WMI_ITEMID_NOT_FOUND
+//
+// MessageText:
+//
+// The data item ID passed was not recognized as valid by a WMI data provider.
+//
+ ERROR_WMI_ITEMID_NOT_FOUND = DWORD(4202);
+ {$EXTERNALSYM ERROR_WMI_ITEMID_NOT_FOUND}
+
+//
+// MessageId: ERROR_WMI_TRY_AGAIN
+//
+// MessageText:
+//
+// The WMI request could not be completed and should be retried.
+//
+ ERROR_WMI_TRY_AGAIN = DWORD(4203);
+ {$EXTERNALSYM ERROR_WMI_TRY_AGAIN}
+
+//
+// MessageId: ERROR_WMI_DP_NOT_FOUND
+//
+// MessageText:
+//
+// The WMI data provider could not be located.
+//
+ ERROR_WMI_DP_NOT_FOUND = DWORD(4204);
+ {$EXTERNALSYM ERROR_WMI_DP_NOT_FOUND}
+
+//
+// MessageId: ERROR_WMI_UNRESOLVED_INSTANCE_REF
+//
+// MessageText:
+//
+// The WMI data provider references an instance set that has not been registered.
+//
+ ERROR_WMI_UNRESOLVED_INSTANCE_REF = DWORD(4205);
+ {$EXTERNALSYM ERROR_WMI_UNRESOLVED_INSTANCE_REF}
+
+//
+// MessageId: ERROR_WMI_ALREADY_ENABLED
+//
+// MessageText:
+//
+// The WMI data block or event notification has already been enabled.
+//
+ ERROR_WMI_ALREADY_ENABLED = DWORD(4206);
+ {$EXTERNALSYM ERROR_WMI_ALREADY_ENABLED}
+
+//
+// MessageId: ERROR_WMI_GUID_DISCONNECTED
+//
+// MessageText:
+//
+// The WMI data block is no longer available.
+//
+ ERROR_WMI_GUID_DISCONNECTED = DWORD(4207);
+ {$EXTERNALSYM ERROR_WMI_GUID_DISCONNECTED}
+
+//
+// MessageId: ERROR_WMI_SERVER_UNAVAILABLE
+//
+// MessageText:
+//
+// The WMI data service is not available.
+//
+ ERROR_WMI_SERVER_UNAVAILABLE = DWORD(4208);
+ {$EXTERNALSYM ERROR_WMI_SERVER_UNAVAILABLE}
+
+//
+// MessageId: ERROR_WMI_DP_FAILED
+//
+// MessageText:
+//
+// The WMI data provider failed to carry out the request.
+//
+ ERROR_WMI_DP_FAILED = DWORD(4209);
+ {$EXTERNALSYM ERROR_WMI_DP_FAILED}
+
+//
+// MessageId: ERROR_WMI_INVALID_MOF
+//
+// MessageText:
+//
+// The WMI MOF information is not valid.
+//
+ ERROR_WMI_INVALID_MOF = DWORD(4210);
+ {$EXTERNALSYM ERROR_WMI_INVALID_MOF}
+
+//
+// MessageId: ERROR_WMI_INVALID_REGINFO
+//
+// MessageText:
+//
+// The WMI registration information is not valid.
+//
+ ERROR_WMI_INVALID_REGINFO = DWORD(4211);
+ {$EXTERNALSYM ERROR_WMI_INVALID_REGINFO}
+
+//
+// MessageId: ERROR_WMI_ALREADY_DISABLED
+//
+// MessageText:
+//
+// The WMI data block or event notification has already been disabled.
+//
+ ERROR_WMI_ALREADY_DISABLED = DWORD(4212);
+ {$EXTERNALSYM ERROR_WMI_ALREADY_DISABLED}
+
+//
+// MessageId: ERROR_WMI_READ_ONLY
+//
+// MessageText:
+//
+// The WMI data item or data block is read only.
+//
+ ERROR_WMI_READ_ONLY = DWORD(4213);
+ {$EXTERNALSYM ERROR_WMI_READ_ONLY}
+
+//
+// MessageId: ERROR_WMI_SET_FAILURE
+//
+// MessageText:
+//
+// The WMI data item or data block could not be changed.
+//
+ ERROR_WMI_SET_FAILURE = DWORD(4214);
+ {$EXTERNALSYM ERROR_WMI_SET_FAILURE}
+
+//////////////////////////////////////////
+// //
+// NT Media Services (RSM) Error Codes //
+// //
+//////////////////////////////////////////
+//
+// MessageId: ERROR_INVALID_MEDIA
+//
+// MessageText:
+//
+// The media identifier does not represent a valid medium.
+//
+ ERROR_INVALID_MEDIA = DWORD(4300);
+ {$EXTERNALSYM ERROR_INVALID_MEDIA}
+
+//
+// MessageId: ERROR_INVALID_LIBRARY
+//
+// MessageText:
+//
+// The library identifier does not represent a valid library.
+//
+ ERROR_INVALID_LIBRARY = DWORD(4301);
+ {$EXTERNALSYM ERROR_INVALID_LIBRARY}
+
+//
+// MessageId: ERROR_INVALID_MEDIA_POOL
+//
+// MessageText:
+//
+// The media pool identifier does not represent a valid media pool.
+//
+ ERROR_INVALID_MEDIA_POOL = DWORD(4302);
+ {$EXTERNALSYM ERROR_INVALID_MEDIA_POOL}
+
+//
+// MessageId: ERROR_DRIVE_MEDIA_MISMATCH
+//
+// MessageText:
+//
+// The drive and medium are not compatible or exist in different libraries.
+//
+ ERROR_DRIVE_MEDIA_MISMATCH = DWORD(4303);
+ {$EXTERNALSYM ERROR_DRIVE_MEDIA_MISMATCH}
+
+//
+// MessageId: ERROR_MEDIA_OFFLINE
+//
+// MessageText:
+//
+// The medium currently exists in an offline library and must be online to perform this operation.
+//
+ ERROR_MEDIA_OFFLINE = DWORD(4304);
+ {$EXTERNALSYM ERROR_MEDIA_OFFLINE}
+
+//
+// MessageId: ERROR_LIBRARY_OFFLINE
+//
+// MessageText:
+//
+// The operation cannot be performed on an offline library.
+//
+ ERROR_LIBRARY_OFFLINE = DWORD(4305);
+ {$EXTERNALSYM ERROR_LIBRARY_OFFLINE}
+
+//
+// MessageId: ERROR_EMPTY
+//
+// MessageText:
+//
+// The library, drive, or media pool is empty.
+//
+ ERROR_EMPTY = DWORD(4306);
+ {$EXTERNALSYM ERROR_EMPTY}
+
+//
+// MessageId: ERROR_NOT_EMPTY
+//
+// MessageText:
+//
+// The library, drive, or media pool must be empty to perform this operation.
+//
+ ERROR_NOT_EMPTY = DWORD(4307);
+ {$EXTERNALSYM ERROR_NOT_EMPTY}
+
+//
+// MessageId: ERROR_MEDIA_UNAVAILABLE
+//
+// MessageText:
+//
+// No media is currently available in this media pool or library.
+//
+ ERROR_MEDIA_UNAVAILABLE = DWORD(4308);
+ {$EXTERNALSYM ERROR_MEDIA_UNAVAILABLE}
+
+//
+// MessageId: ERROR_RESOURCE_DISABLED
+//
+// MessageText:
+//
+// A resource required for this operation is disabled.
+//
+ ERROR_RESOURCE_DISABLED = DWORD(4309);
+ {$EXTERNALSYM ERROR_RESOURCE_DISABLED}
+
+//
+// MessageId: ERROR_INVALID_CLEANER
+//
+// MessageText:
+//
+// The media identifier does not represent a valid cleaner.
+//
+ ERROR_INVALID_CLEANER = DWORD(4310);
+ {$EXTERNALSYM ERROR_INVALID_CLEANER}
+
+//
+// MessageId: ERROR_UNABLE_TO_CLEAN
+//
+// MessageText:
+//
+// The drive cannot be cleaned or does not support cleaning.
+//
+ ERROR_UNABLE_TO_CLEAN = DWORD(4311);
+ {$EXTERNALSYM ERROR_UNABLE_TO_CLEAN}
+
+//
+// MessageId: ERROR_OBJECT_NOT_FOUND
+//
+// MessageText:
+//
+// The object identifier does not represent a valid object.
+//
+ ERROR_OBJECT_NOT_FOUND = DWORD(4312);
+ {$EXTERNALSYM ERROR_OBJECT_NOT_FOUND}
+
+//
+// MessageId: ERROR_DATABASE_FAILURE
+//
+// MessageText:
+//
+// Unable to read from or write to the database.
+//
+ ERROR_DATABASE_FAILURE = DWORD(4313);
+ {$EXTERNALSYM ERROR_DATABASE_FAILURE}
+
+//
+// MessageId: ERROR_DATABASE_FULL
+//
+// MessageText:
+//
+// The database is full.
+//
+ ERROR_DATABASE_FULL = DWORD(4314);
+ {$EXTERNALSYM ERROR_DATABASE_FULL}
+
+//
+// MessageId: ERROR_MEDIA_INCOMPATIBLE
+//
+// MessageText:
+//
+// The medium is not compatible with the device or media pool.
+//
+ ERROR_MEDIA_INCOMPATIBLE = DWORD(4315);
+ {$EXTERNALSYM ERROR_MEDIA_INCOMPATIBLE}
+
+//
+// MessageId: ERROR_RESOURCE_NOT_PRESENT
+//
+// MessageText:
+//
+// The resource required for this operation does not exist.
+//
+ ERROR_RESOURCE_NOT_PRESENT = DWORD(4316);
+ {$EXTERNALSYM ERROR_RESOURCE_NOT_PRESENT}
+
+//
+// MessageId: ERROR_INVALID_OPERATION
+//
+// MessageText:
+//
+// The operation identifier is not valid.
+//
+ ERROR_INVALID_OPERATION = DWORD(4317);
+ {$EXTERNALSYM ERROR_INVALID_OPERATION}
+
+//
+// MessageId: ERROR_MEDIA_NOT_AVAILABLE
+//
+// MessageText:
+//
+// The media is not mounted or ready for use.
+//
+ ERROR_MEDIA_NOT_AVAILABLE = DWORD(4318);
+ {$EXTERNALSYM ERROR_MEDIA_NOT_AVAILABLE}
+
+//
+// MessageId: ERROR_DEVICE_NOT_AVAILABLE
+//
+// MessageText:
+//
+// The device is not ready for use.
+//
+ ERROR_DEVICE_NOT_AVAILABLE = DWORD(4319);
+ {$EXTERNALSYM ERROR_DEVICE_NOT_AVAILABLE}
+
+//
+// MessageId: ERROR_REQUEST_REFUSED
+//
+// MessageText:
+//
+// The operator or administrator has refused the request.
+//
+ ERROR_REQUEST_REFUSED = DWORD(4320);
+ {$EXTERNALSYM ERROR_REQUEST_REFUSED}
+
+//
+// MessageId: ERROR_INVALID_DRIVE_OBJECT
+//
+// MessageText:
+//
+// The drive identifier does not represent a valid drive.
+//
+ ERROR_INVALID_DRIVE_OBJECT = DWORD(4321);
+ {$EXTERNALSYM ERROR_INVALID_DRIVE_OBJECT}
+
+//
+// MessageId: ERROR_LIBRARY_FULL
+//
+// MessageText:
+//
+// Library is full. No slot is available for use.
+//
+ ERROR_LIBRARY_FULL = DWORD(4322);
+ {$EXTERNALSYM ERROR_LIBRARY_FULL}
+
+//
+// MessageId: ERROR_MEDIUM_NOT_ACCESSIBLE
+//
+// MessageText:
+//
+// The transport cannot access the medium.
+//
+ ERROR_MEDIUM_NOT_ACCESSIBLE = DWORD(4323);
+ {$EXTERNALSYM ERROR_MEDIUM_NOT_ACCESSIBLE}
+
+//
+// MessageId: ERROR_UNABLE_TO_LOAD_MEDIUM
+//
+// MessageText:
+//
+// Unable to load the medium into the drive.
+//
+ ERROR_UNABLE_TO_LOAD_MEDIUM = DWORD(4324);
+ {$EXTERNALSYM ERROR_UNABLE_TO_LOAD_MEDIUM}
+
+//
+// MessageId: ERROR_UNABLE_TO_INVENTORY_DRIVE
+//
+// MessageText:
+//
+// Unable to retrieve the drive status.
+//
+ ERROR_UNABLE_TO_INVENTORY_DRIVE = DWORD(4325);
+ {$EXTERNALSYM ERROR_UNABLE_TO_INVENTORY_DRIVE}
+
+//
+// MessageId: ERROR_UNABLE_TO_INVENTORY_SLOT
+//
+// MessageText:
+//
+// Unable to retrieve the slot status.
+//
+ ERROR_UNABLE_TO_INVENTORY_SLOT = DWORD(4326);
+ {$EXTERNALSYM ERROR_UNABLE_TO_INVENTORY_SLOT}
+
+//
+// MessageId: ERROR_UNABLE_TO_INVENTORY_TRANSPORT
+//
+// MessageText:
+//
+// Unable to retrieve status about the transport.
+//
+ ERROR_UNABLE_TO_INVENTORY_TRANSPORT = DWORD(4327);
+ {$EXTERNALSYM ERROR_UNABLE_TO_INVENTORY_TRANSPORT}
+
+//
+// MessageId: ERROR_TRANSPORT_FULL
+//
+// MessageText:
+//
+// Cannot use the transport because it is already in use.
+//
+ ERROR_TRANSPORT_FULL = DWORD(4328);
+ {$EXTERNALSYM ERROR_TRANSPORT_FULL}
+
+//
+// MessageId: ERROR_CONTROLLING_IEPORT
+//
+// MessageText:
+//
+// Unable to open or close the inject/eject port.
+//
+ ERROR_CONTROLLING_IEPORT = DWORD(4329);
+ {$EXTERNALSYM ERROR_CONTROLLING_IEPORT}
+
+//
+// MessageId: ERROR_UNABLE_TO_EJECT_MOUNTED_MEDIA
+//
+// MessageText:
+//
+// Unable to eject the medium because it is in a drive.
+//
+ ERROR_UNABLE_TO_EJECT_MOUNTED_MEDIA = DWORD(4330);
+ {$EXTERNALSYM ERROR_UNABLE_TO_EJECT_MOUNTED_MEDIA}
+
+//
+// MessageId: ERROR_CLEANER_SLOT_SET
+//
+// MessageText:
+//
+// A cleaner slot is already reserved.
+//
+ ERROR_CLEANER_SLOT_SET = DWORD(4331);
+ {$EXTERNALSYM ERROR_CLEANER_SLOT_SET}
+
+//
+// MessageId: ERROR_CLEANER_SLOT_NOT_SET
+//
+// MessageText:
+//
+// A cleaner slot is not reserved.
+//
+ ERROR_CLEANER_SLOT_NOT_SET = DWORD(4332);
+ {$EXTERNALSYM ERROR_CLEANER_SLOT_NOT_SET}
+
+//
+// MessageId: ERROR_CLEANER_CARTRIDGE_SPENT
+//
+// MessageText:
+//
+// The cleaner cartridge has performed the maximum number of drive cleanings.
+//
+ ERROR_CLEANER_CARTRIDGE_SPENT = DWORD(4333);
+ {$EXTERNALSYM ERROR_CLEANER_CARTRIDGE_SPENT}
+
+//
+// MessageId: ERROR_UNEXPECTED_OMID
+//
+// MessageText:
+//
+// Unexpected on-medium identifier.
+//
+ ERROR_UNEXPECTED_OMID = DWORD(4334);
+ {$EXTERNALSYM ERROR_UNEXPECTED_OMID}
+
+//
+// MessageId: ERROR_CANT_DELETE_LAST_ITEM
+//
+// MessageText:
+//
+// The last remaining item in this group or resource cannot be deleted.
+//
+ ERROR_CANT_DELETE_LAST_ITEM = DWORD(4335);
+ {$EXTERNALSYM ERROR_CANT_DELETE_LAST_ITEM}
+
+//
+// MessageId: ERROR_MESSAGE_EXCEEDS_MAX_SIZE
+//
+// MessageText:
+//
+// The message provided exceeds the maximum size allowed for this parameter.
+//
+ ERROR_MESSAGE_EXCEEDS_MAX_SIZE = DWORD(4336);
+ {$EXTERNALSYM ERROR_MESSAGE_EXCEEDS_MAX_SIZE}
+
+//
+// MessageId: ERROR_VOLUME_CONTAINS_SYS_FILES
+//
+// MessageText:
+//
+// The volume contains system or paging files.
+//
+ ERROR_VOLUME_CONTAINS_SYS_FILES = DWORD(4337);
+ {$EXTERNALSYM ERROR_VOLUME_CONTAINS_SYS_FILES}
+
+//
+// MessageId: ERROR_INDIGENOUS_TYPE
+//
+// MessageText:
+//
+// The media type cannot be removed from this library since at least one drive in the library reports it can support this media type.
+//
+ ERROR_INDIGENOUS_TYPE = DWORD(4338);
+ {$EXTERNALSYM ERROR_INDIGENOUS_TYPE}
+
+//
+// MessageId: ERROR_NO_SUPPORTING_DRIVES
+//
+// MessageText:
+//
+// This offline media cannot be mounted on this system since no enabled drives are present which can be used.
+//
+ ERROR_NO_SUPPORTING_DRIVES = DWORD(4339);
+ {$EXTERNALSYM ERROR_NO_SUPPORTING_DRIVES}
+
+//
+// MessageId: ERROR_CLEANER_CARTRIDGE_INSTALLED
+//
+// MessageText:
+//
+// A cleaner cartridge is present in the tape library.
+//
+ ERROR_CLEANER_CARTRIDGE_INSTALLED = DWORD(4340);
+ {$EXTERNALSYM ERROR_CLEANER_CARTRIDGE_INSTALLED}
+
+//
+// MessageId: ERROR_IEPORT_FULL
+//
+// MessageText:
+//
+// Cannot use the ieport because it is not empty.
+//
+ ERROR_IEPORT_FULL = DWORD(4341);
+ {$EXTERNALSYM ERROR_IEPORT_FULL}
+
+////////////////////////////////////////////
+// //
+// NT Remote Storage Service Error Codes //
+// //
+////////////////////////////////////////////
+//
+// MessageId: ERROR_FILE_OFFLINE
+//
+// MessageText:
+//
+// The remote storage service was not able to recall the file.
+//
+ ERROR_FILE_OFFLINE = DWORD(4350);
+ {$EXTERNALSYM ERROR_FILE_OFFLINE}
+
+//
+// MessageId: ERROR_REMOTE_STORAGE_NOT_ACTIVE
+//
+// MessageText:
+//
+// The remote storage service is not operational at this time.
+//
+ ERROR_REMOTE_STORAGE_NOT_ACTIVE = DWORD(4351);
+ {$EXTERNALSYM ERROR_REMOTE_STORAGE_NOT_ACTIVE}
+
+//
+// MessageId: ERROR_REMOTE_STORAGE_MEDIA_ERROR
+//
+// MessageText:
+//
+// The remote storage service encountered a media error.
+//
+ ERROR_REMOTE_STORAGE_MEDIA_ERROR = DWORD(4352);
+ {$EXTERNALSYM ERROR_REMOTE_STORAGE_MEDIA_ERROR}
+
+////////////////////////////////////////////
+// //
+// NT Reparse Points Error Codes //
+// //
+////////////////////////////////////////////
+//
+// MessageId: ERROR_NOT_A_REPARSE_POINT
+//
+// MessageText:
+//
+// The file or directory is not a reparse point.
+//
+ ERROR_NOT_A_REPARSE_POINT = DWORD(4390);
+ {$EXTERNALSYM ERROR_NOT_A_REPARSE_POINT}
+
+//
+// MessageId: ERROR_REPARSE_ATTRIBUTE_CONFLICT
+//
+// MessageText:
+//
+// The reparse point attribute cannot be set because it conflicts with an existing attribute.
+//
+ ERROR_REPARSE_ATTRIBUTE_CONFLICT = DWORD(4391);
+ {$EXTERNALSYM ERROR_REPARSE_ATTRIBUTE_CONFLICT}
+
+//
+// MessageId: ERROR_INVALID_REPARSE_DATA
+//
+// MessageText:
+//
+// The data present in the reparse point buffer is invalid.
+//
+ ERROR_INVALID_REPARSE_DATA = DWORD(4392);
+ {$EXTERNALSYM ERROR_INVALID_REPARSE_DATA}
+
+//
+// MessageId: ERROR_REPARSE_TAG_INVALID
+//
+// MessageText:
+//
+// The tag present in the reparse point buffer is invalid.
+//
+ ERROR_REPARSE_TAG_INVALID = DWORD(4393);
+ {$EXTERNALSYM ERROR_REPARSE_TAG_INVALID}
+
+//
+// MessageId: ERROR_REPARSE_TAG_MISMATCH
+//
+// MessageText:
+//
+// There is a mismatch between the tag specified in the request and the tag present in the reparse point.
+//
+//
+ ERROR_REPARSE_TAG_MISMATCH = DWORD(4394);
+ {$EXTERNALSYM ERROR_REPARSE_TAG_MISMATCH}
+
+////////////////////////////////////////////
+// //
+// NT Single Instance Store Error Codes //
+// //
+////////////////////////////////////////////
+//
+// MessageId: ERROR_VOLUME_NOT_SIS_ENABLED
+//
+// MessageText:
+//
+// Single Instance Storage is not available on this volume.
+//
+ ERROR_VOLUME_NOT_SIS_ENABLED = DWORD(4500);
+ {$EXTERNALSYM ERROR_VOLUME_NOT_SIS_ENABLED}
+
+////////////////////////////////////
+// //
+// Cluster Error Codes //
+// //
+////////////////////////////////////
+//
+// MessageId: ERROR_DEPENDENT_RESOURCE_EXISTS
+//
+// MessageText:
+//
+// The cluster resource cannot be moved to another group because other resources are dependent on it.
+//
+ ERROR_DEPENDENT_RESOURCE_EXISTS = DWORD(5001);
+ {$EXTERNALSYM ERROR_DEPENDENT_RESOURCE_EXISTS}
+
+//
+// MessageId: ERROR_DEPENDENCY_NOT_FOUND
+//
+// MessageText:
+//
+// The cluster resource dependency cannot be found.
+//
+ ERROR_DEPENDENCY_NOT_FOUND = DWORD(5002);
+ {$EXTERNALSYM ERROR_DEPENDENCY_NOT_FOUND}
+
+//
+// MessageId: ERROR_DEPENDENCY_ALREADY_EXISTS
+//
+// MessageText:
+//
+// The cluster resource cannot be made dependent on the specified resource because it is already dependent.
+//
+ ERROR_DEPENDENCY_ALREADY_EXISTS = DWORD(5003);
+ {$EXTERNALSYM ERROR_DEPENDENCY_ALREADY_EXISTS}
+
+//
+// MessageId: ERROR_RESOURCE_NOT_ONLINE
+//
+// MessageText:
+//
+// The cluster resource is not online.
+//
+ ERROR_RESOURCE_NOT_ONLINE = DWORD(5004);
+ {$EXTERNALSYM ERROR_RESOURCE_NOT_ONLINE}
+
+//
+// MessageId: ERROR_HOST_NODE_NOT_AVAILABLE
+//
+// MessageText:
+//
+// A cluster node is not available for this operation.
+//
+ ERROR_HOST_NODE_NOT_AVAILABLE = DWORD(5005);
+ {$EXTERNALSYM ERROR_HOST_NODE_NOT_AVAILABLE}
+
+//
+// MessageId: ERROR_RESOURCE_NOT_AVAILABLE
+//
+// MessageText:
+//
+// The cluster resource is not available.
+//
+ ERROR_RESOURCE_NOT_AVAILABLE = DWORD(5006);
+ {$EXTERNALSYM ERROR_RESOURCE_NOT_AVAILABLE}
+
+//
+// MessageId: ERROR_RESOURCE_NOT_FOUND
+//
+// MessageText:
+//
+// The cluster resource could not be found.
+//
+ ERROR_RESOURCE_NOT_FOUND = DWORD(5007);
+ {$EXTERNALSYM ERROR_RESOURCE_NOT_FOUND}
+
+//
+// MessageId: ERROR_SHUTDOWN_CLUSTER
+//
+// MessageText:
+//
+// The cluster is being shut down.
+//
+ ERROR_SHUTDOWN_CLUSTER = DWORD(5008);
+ {$EXTERNALSYM ERROR_SHUTDOWN_CLUSTER}
+
+//
+// MessageId: ERROR_CANT_EVICT_ACTIVE_NODE
+//
+// MessageText:
+//
+// A cluster node cannot be evicted from the cluster unless the node is down or it is the last node.
+//
+ ERROR_CANT_EVICT_ACTIVE_NODE = DWORD(5009);
+ {$EXTERNALSYM ERROR_CANT_EVICT_ACTIVE_NODE}
+
+//
+// MessageId: ERROR_OBJECT_ALREADY_EXISTS
+//
+// MessageText:
+//
+// The object already exists.
+//
+ ERROR_OBJECT_ALREADY_EXISTS = DWORD(5010);
+ {$EXTERNALSYM ERROR_OBJECT_ALREADY_EXISTS}
+
+//
+// MessageId: ERROR_OBJECT_IN_LIST
+//
+// MessageText:
+//
+// The object is already in the list.
+//
+ ERROR_OBJECT_IN_LIST = DWORD(5011);
+ {$EXTERNALSYM ERROR_OBJECT_IN_LIST}
+
+//
+// MessageId: ERROR_GROUP_NOT_AVAILABLE
+//
+// MessageText:
+//
+// The cluster group is not available for any new requests.
+//
+ ERROR_GROUP_NOT_AVAILABLE = DWORD(5012);
+ {$EXTERNALSYM ERROR_GROUP_NOT_AVAILABLE}
+
+//
+// MessageId: ERROR_GROUP_NOT_FOUND
+//
+// MessageText:
+//
+// The cluster group could not be found.
+//
+ ERROR_GROUP_NOT_FOUND = DWORD(5013);
+ {$EXTERNALSYM ERROR_GROUP_NOT_FOUND}
+
+//
+// MessageId: ERROR_GROUP_NOT_ONLINE
+//
+// MessageText:
+//
+// The operation could not be completed because the cluster group is not online.
+//
+ ERROR_GROUP_NOT_ONLINE = DWORD(5014);
+ {$EXTERNALSYM ERROR_GROUP_NOT_ONLINE}
+
+//
+// MessageId: ERROR_HOST_NODE_NOT_RESOURCE_OWNER
+//
+// MessageText:
+//
+// The cluster node is not the owner of the resource.
+//
+ ERROR_HOST_NODE_NOT_RESOURCE_OWNER = DWORD(5015);
+ {$EXTERNALSYM ERROR_HOST_NODE_NOT_RESOURCE_OWNER}
+
+//
+// MessageId: ERROR_HOST_NODE_NOT_GROUP_OWNER
+//
+// MessageText:
+//
+// The cluster node is not the owner of the group.
+//
+ ERROR_HOST_NODE_NOT_GROUP_OWNER = DWORD(5016);
+ {$EXTERNALSYM ERROR_HOST_NODE_NOT_GROUP_OWNER}
+
+//
+// MessageId: ERROR_RESMON_CREATE_FAILED
+//
+// MessageText:
+//
+// The cluster resource could not be created in the specified resource monitor.
+//
+ ERROR_RESMON_CREATE_FAILED = DWORD(5017);
+ {$EXTERNALSYM ERROR_RESMON_CREATE_FAILED}
+
+//
+// MessageId: ERROR_RESMON_ONLINE_FAILED
+//
+// MessageText:
+//
+// The cluster resource could not be brought online by the resource monitor.
+//
+ ERROR_RESMON_ONLINE_FAILED = DWORD(5018);
+ {$EXTERNALSYM ERROR_RESMON_ONLINE_FAILED}
+
+//
+// MessageId: ERROR_RESOURCE_ONLINE
+//
+// MessageText:
+//
+// The operation could not be completed because the cluster resource is online.
+//
+ ERROR_RESOURCE_ONLINE = DWORD(5019);
+ {$EXTERNALSYM ERROR_RESOURCE_ONLINE}
+
+//
+// MessageId: ERROR_QUORUM_RESOURCE
+//
+// MessageText:
+//
+// The cluster resource could not be deleted or brought offline because it is the quorum resource.
+//
+ ERROR_QUORUM_RESOURCE = DWORD(5020);
+ {$EXTERNALSYM ERROR_QUORUM_RESOURCE}
+
+//
+// MessageId: ERROR_NOT_QUORUM_CAPABLE
+//
+// MessageText:
+//
+// The cluster could not make the specified resource a quorum resource because it is not capable of being a quorum resource.
+//
+ ERROR_NOT_QUORUM_CAPABLE = DWORD(5021);
+ {$EXTERNALSYM ERROR_NOT_QUORUM_CAPABLE}
+
+//
+// MessageId: ERROR_CLUSTER_SHUTTING_DOWN
+//
+// MessageText:
+//
+// The cluster software is shutting down.
+//
+ ERROR_CLUSTER_SHUTTING_DOWN = DWORD(5022);
+ {$EXTERNALSYM ERROR_CLUSTER_SHUTTING_DOWN}
+
+//
+// MessageId: ERROR_INVALID_STATE
+//
+// MessageText:
+//
+// The group or resource is not in the correct state to perform the requested operation.
+//
+ ERROR_INVALID_STATE = DWORD(5023);
+ {$EXTERNALSYM ERROR_INVALID_STATE}
+
+//
+// MessageId: ERROR_RESOURCE_PROPERTIES_STORED
+//
+// MessageText:
+//
+// The properties were stored but not all changes will take effect until the next time the resource is brought online.
+//
+ ERROR_RESOURCE_PROPERTIES_STORED = DWORD(5024);
+ {$EXTERNALSYM ERROR_RESOURCE_PROPERTIES_STORED}
+
+//
+// MessageId: ERROR_NOT_QUORUM_CLASS
+//
+// MessageText:
+//
+// The cluster could not make the specified resource a quorum resource because it does not belong to a shared storage class.
+//
+ ERROR_NOT_QUORUM_CLASS = DWORD(5025);
+ {$EXTERNALSYM ERROR_NOT_QUORUM_CLASS}
+
+//
+// MessageId: ERROR_CORE_RESOURCE
+//
+// MessageText:
+//
+// The cluster resource could not be deleted since it is a core resource.
+//
+ ERROR_CORE_RESOURCE = DWORD(5026);
+ {$EXTERNALSYM ERROR_CORE_RESOURCE}
+
+//
+// MessageId: ERROR_QUORUM_RESOURCE_ONLINE_FAILED
+//
+// MessageText:
+//
+// The quorum resource failed to come online.
+//
+ ERROR_QUORUM_RESOURCE_ONLINE_FAILED = DWORD(5027);
+ {$EXTERNALSYM ERROR_QUORUM_RESOURCE_ONLINE_FAILED}
+
+//
+// MessageId: ERROR_QUORUMLOG_OPEN_FAILED
+//
+// MessageText:
+//
+// The quorum log could not be created or mounted successfully.
+//
+ ERROR_QUORUMLOG_OPEN_FAILED = DWORD(5028);
+ {$EXTERNALSYM ERROR_QUORUMLOG_OPEN_FAILED}
+
+//
+// MessageId: ERROR_CLUSTERLOG_CORRUPT
+//
+// MessageText:
+//
+// The cluster log is corrupt.
+//
+ ERROR_CLUSTERLOG_CORRUPT = DWORD(5029);
+ {$EXTERNALSYM ERROR_CLUSTERLOG_CORRUPT}
+
+//
+// MessageId: ERROR_CLUSTERLOG_RECORD_EXCEEDS_MAXSIZE
+//
+// MessageText:
+//
+// The record could not be written to the cluster log since it exceeds the maximum size.
+//
+ ERROR_CLUSTERLOG_RECORD_EXCEEDS_MAXSIZE = DWORD(5030);
+ {$EXTERNALSYM ERROR_CLUSTERLOG_RECORD_EXCEEDS_MAXSIZE}
+
+//
+// MessageId: ERROR_CLUSTERLOG_EXCEEDS_MAXSIZE
+//
+// MessageText:
+//
+// The cluster log exceeds its maximum size.
+//
+ ERROR_CLUSTERLOG_EXCEEDS_MAXSIZE = DWORD(5031);
+ {$EXTERNALSYM ERROR_CLUSTERLOG_EXCEEDS_MAXSIZE}
+
+//
+// MessageId: ERROR_CLUSTERLOG_CHKPOINT_NOT_FOUND
+//
+// MessageText:
+//
+// No checkpoint record was found in the cluster log.
+//
+ ERROR_CLUSTERLOG_CHKPOINT_NOT_FOUND = DWORD(5032);
+ {$EXTERNALSYM ERROR_CLUSTERLOG_CHKPOINT_NOT_FOUND}
+
+//
+// MessageId: ERROR_CLUSTERLOG_NOT_ENOUGH_SPACE
+//
+// MessageText:
+//
+// The minimum required disk space needed for logging is not available.
+//
+ ERROR_CLUSTERLOG_NOT_ENOUGH_SPACE = DWORD(5033);
+ {$EXTERNALSYM ERROR_CLUSTERLOG_NOT_ENOUGH_SPACE}
+
+//
+// MessageId: ERROR_QUORUM_OWNER_ALIVE
+//
+// MessageText:
+//
+// The cluster node failed to take control of the quorum resource because the resource is owned by another active node.
+//
+ ERROR_QUORUM_OWNER_ALIVE = DWORD(5034);
+ {$EXTERNALSYM ERROR_QUORUM_OWNER_ALIVE}
+
+//
+// MessageId: ERROR_NETWORK_NOT_AVAILABLE
+//
+// MessageText:
+//
+// A cluster network is not available for this operation.
+//
+ ERROR_NETWORK_NOT_AVAILABLE = DWORD(5035);
+ {$EXTERNALSYM ERROR_NETWORK_NOT_AVAILABLE}
+
+//
+// MessageId: ERROR_NODE_NOT_AVAILABLE
+//
+// MessageText:
+//
+// A cluster node is not available for this operation.
+//
+ ERROR_NODE_NOT_AVAILABLE = DWORD(5036);
+ {$EXTERNALSYM ERROR_NODE_NOT_AVAILABLE}
+
+//
+// MessageId: ERROR_ALL_NODES_NOT_AVAILABLE
+//
+// MessageText:
+//
+// All cluster nodes must be running to perform this operation.
+//
+ ERROR_ALL_NODES_NOT_AVAILABLE = DWORD(5037);
+ {$EXTERNALSYM ERROR_ALL_NODES_NOT_AVAILABLE}
+
+//
+// MessageId: ERROR_RESOURCE_FAILED
+//
+// MessageText:
+//
+// A cluster resource failed.
+//
+ ERROR_RESOURCE_FAILED = DWORD(5038);
+ {$EXTERNALSYM ERROR_RESOURCE_FAILED}
+
+//
+// MessageId: ERROR_CLUSTER_INVALID_NODE
+//
+// MessageText:
+//
+// The cluster node is not valid.
+//
+ ERROR_CLUSTER_INVALID_NODE = DWORD(5039);
+ {$EXTERNALSYM ERROR_CLUSTER_INVALID_NODE}
+
+//
+// MessageId: ERROR_CLUSTER_NODE_EXISTS
+//
+// MessageText:
+//
+// The cluster node already exists.
+//
+ ERROR_CLUSTER_NODE_EXISTS = DWORD(5040);
+ {$EXTERNALSYM ERROR_CLUSTER_NODE_EXISTS}
+
+//
+// MessageId: ERROR_CLUSTER_JOIN_IN_PROGRESS
+//
+// MessageText:
+//
+// A node is in the process of joining the cluster.
+//
+ ERROR_CLUSTER_JOIN_IN_PROGRESS = DWORD(5041);
+ {$EXTERNALSYM ERROR_CLUSTER_JOIN_IN_PROGRESS}
+
+//
+// MessageId: ERROR_CLUSTER_NODE_NOT_FOUND
+//
+// MessageText:
+//
+// The cluster node was not found.
+//
+ ERROR_CLUSTER_NODE_NOT_FOUND = DWORD(5042);
+ {$EXTERNALSYM ERROR_CLUSTER_NODE_NOT_FOUND}
+
+//
+// MessageId: ERROR_CLUSTER_LOCAL_NODE_NOT_FOUND
+//
+// MessageText:
+//
+// The cluster local node information was not found.
+//
+ ERROR_CLUSTER_LOCAL_NODE_NOT_FOUND = DWORD(5043);
+ {$EXTERNALSYM ERROR_CLUSTER_LOCAL_NODE_NOT_FOUND}
+
+//
+// MessageId: ERROR_CLUSTER_NETWORK_EXISTS
+//
+// MessageText:
+//
+// The cluster network already exists.
+//
+ ERROR_CLUSTER_NETWORK_EXISTS = DWORD(5044);
+ {$EXTERNALSYM ERROR_CLUSTER_NETWORK_EXISTS}
+
+//
+// MessageId: ERROR_CLUSTER_NETWORK_NOT_FOUND
+//
+// MessageText:
+//
+// The cluster network was not found.
+//
+ ERROR_CLUSTER_NETWORK_NOT_FOUND = DWORD(5045);
+ {$EXTERNALSYM ERROR_CLUSTER_NETWORK_NOT_FOUND}
+
+//
+// MessageId: ERROR_CLUSTER_NETINTERFACE_EXISTS
+//
+// MessageText:
+//
+// The cluster network interface already exists.
+//
+ ERROR_CLUSTER_NETINTERFACE_EXISTS = DWORD(5046);
+ {$EXTERNALSYM ERROR_CLUSTER_NETINTERFACE_EXISTS}
+
+//
+// MessageId: ERROR_CLUSTER_NETINTERFACE_NOT_FOUND
+//
+// MessageText:
+//
+// The cluster network interface was not found.
+//
+ ERROR_CLUSTER_NETINTERFACE_NOT_FOUND = DWORD(5047);
+ {$EXTERNALSYM ERROR_CLUSTER_NETINTERFACE_NOT_FOUND}
+
+//
+// MessageId: ERROR_CLUSTER_INVALID_REQUEST
+//
+// MessageText:
+//
+// The cluster request is not valid for this object.
+//
+ ERROR_CLUSTER_INVALID_REQUEST = DWORD(5048);
+ {$EXTERNALSYM ERROR_CLUSTER_INVALID_REQUEST}
+
+//
+// MessageId: ERROR_CLUSTER_INVALID_NETWORK_PROVIDER
+//
+// MessageText:
+//
+// The cluster network provider is not valid.
+//
+ ERROR_CLUSTER_INVALID_NETWORK_PROVIDER = DWORD(5049);
+ {$EXTERNALSYM ERROR_CLUSTER_INVALID_NETWORK_PROVIDER}
+
+//
+// MessageId: ERROR_CLUSTER_NODE_DOWN
+//
+// MessageText:
+//
+// The cluster node is down.
+//
+ ERROR_CLUSTER_NODE_DOWN = DWORD(5050);
+ {$EXTERNALSYM ERROR_CLUSTER_NODE_DOWN}
+
+//
+// MessageId: ERROR_CLUSTER_NODE_UNREACHABLE
+//
+// MessageText:
+//
+// The cluster node is not reachable.
+//
+ ERROR_CLUSTER_NODE_UNREACHABLE = DWORD(5051);
+ {$EXTERNALSYM ERROR_CLUSTER_NODE_UNREACHABLE}
+
+//
+// MessageId: ERROR_CLUSTER_NODE_NOT_MEMBER
+//
+// MessageText:
+//
+// The cluster node is not a member of the cluster.
+//
+ ERROR_CLUSTER_NODE_NOT_MEMBER = DWORD(5052);
+ {$EXTERNALSYM ERROR_CLUSTER_NODE_NOT_MEMBER}
+
+//
+// MessageId: ERROR_CLUSTER_JOIN_NOT_IN_PROGRESS
+//
+// MessageText:
+//
+// A cluster join operation is not in progress.
+//
+ ERROR_CLUSTER_JOIN_NOT_IN_PROGRESS = DWORD(5053);
+ {$EXTERNALSYM ERROR_CLUSTER_JOIN_NOT_IN_PROGRESS}
+
+//
+// MessageId: ERROR_CLUSTER_INVALID_NETWORK
+//
+// MessageText:
+//
+// The cluster network is not valid.
+//
+ ERROR_CLUSTER_INVALID_NETWORK = DWORD(5054);
+ {$EXTERNALSYM ERROR_CLUSTER_INVALID_NETWORK}
+
+//
+// MessageId: ERROR_CLUSTER_NODE_UP
+//
+// MessageText:
+//
+// The cluster node is up.
+//
+ ERROR_CLUSTER_NODE_UP = DWORD(5056);
+ {$EXTERNALSYM ERROR_CLUSTER_NODE_UP}
+
+//
+// MessageId: ERROR_CLUSTER_IPADDR_IN_USE
+//
+// MessageText:
+//
+// The cluster IP address is already in use.
+//
+ ERROR_CLUSTER_IPADDR_IN_USE = DWORD(5057);
+ {$EXTERNALSYM ERROR_CLUSTER_IPADDR_IN_USE}
+
+//
+// MessageId: ERROR_CLUSTER_NODE_NOT_PAUSED
+//
+// MessageText:
+//
+// The cluster node is not paused.
+//
+ ERROR_CLUSTER_NODE_NOT_PAUSED = DWORD(5058);
+ {$EXTERNALSYM ERROR_CLUSTER_NODE_NOT_PAUSED}
+
+//
+// MessageId: ERROR_CLUSTER_NO_SECURITY_CONTEXT
+//
+// MessageText:
+//
+// No cluster security context is available.
+//
+ ERROR_CLUSTER_NO_SECURITY_CONTEXT = DWORD(5059);
+ {$EXTERNALSYM ERROR_CLUSTER_NO_SECURITY_CONTEXT}
+
+//
+// MessageId: ERROR_CLUSTER_NETWORK_NOT_INTERNAL
+//
+// MessageText:
+//
+// The cluster network is not configured for internal cluster communication.
+//
+ ERROR_CLUSTER_NETWORK_NOT_INTERNAL = DWORD(5060);
+ {$EXTERNALSYM ERROR_CLUSTER_NETWORK_NOT_INTERNAL}
+
+//
+// MessageId: ERROR_CLUSTER_NODE_ALREADY_UP
+//
+// MessageText:
+//
+// The cluster node is already up.
+//
+ ERROR_CLUSTER_NODE_ALREADY_UP = DWORD(5061);
+ {$EXTERNALSYM ERROR_CLUSTER_NODE_ALREADY_UP}
+
+//
+// MessageId: ERROR_CLUSTER_NODE_ALREADY_DOWN
+//
+// MessageText:
+//
+// The cluster node is already down.
+//
+ ERROR_CLUSTER_NODE_ALREADY_DOWN = DWORD(5062);
+ {$EXTERNALSYM ERROR_CLUSTER_NODE_ALREADY_DOWN}
+
+//
+// MessageId: ERROR_CLUSTER_NETWORK_ALREADY_ONLINE
+//
+// MessageText:
+//
+// The cluster network is already online.
+//
+ ERROR_CLUSTER_NETWORK_ALREADY_ONLINE = DWORD(5063);
+ {$EXTERNALSYM ERROR_CLUSTER_NETWORK_ALREADY_ONLINE}
+
+//
+// MessageId: ERROR_CLUSTER_NETWORK_ALREADY_OFFLINE
+//
+// MessageText:
+//
+// The cluster network is already offline.
+//
+ ERROR_CLUSTER_NETWORK_ALREADY_OFFLINE = DWORD(5064);
+ {$EXTERNALSYM ERROR_CLUSTER_NETWORK_ALREADY_OFFLINE}
+
+//
+// MessageId: ERROR_CLUSTER_NODE_ALREADY_MEMBER
+//
+// MessageText:
+//
+// The cluster node is already a member of the cluster.
+//
+ ERROR_CLUSTER_NODE_ALREADY_MEMBER = DWORD(5065);
+ {$EXTERNALSYM ERROR_CLUSTER_NODE_ALREADY_MEMBER}
+
+//
+// MessageId: ERROR_CLUSTER_LAST_INTERNAL_NETWORK
+//
+// MessageText:
+//
+// The cluster network is the only one configured for internal cluster communication between two or more active cluster nodes. The internal communication capability cannot be removed from the network.
+//
+ ERROR_CLUSTER_LAST_INTERNAL_NETWORK = DWORD(5066);
+ {$EXTERNALSYM ERROR_CLUSTER_LAST_INTERNAL_NETWORK}
+
+//
+// MessageId: ERROR_CLUSTER_NETWORK_HAS_DEPENDENTS
+//
+// MessageText:
+//
+// One or more cluster resources depend on the network to provide service to clients. The client access capability cannot be removed from the network.
+//
+ ERROR_CLUSTER_NETWORK_HAS_DEPENDENTS = DWORD(5067);
+ {$EXTERNALSYM ERROR_CLUSTER_NETWORK_HAS_DEPENDENTS}
+
+//
+// MessageId: ERROR_INVALID_OPERATION_ON_QUORUM
+//
+// MessageText:
+//
+// This operation cannot be performed on the cluster resource as it the quorum resource. You may not bring the quorum resource offline or modify its possible owners list.
+//
+ ERROR_INVALID_OPERATION_ON_QUORUM = DWORD(5068);
+ {$EXTERNALSYM ERROR_INVALID_OPERATION_ON_QUORUM}
+
+//
+// MessageId: ERROR_DEPENDENCY_NOT_ALLOWED
+//
+// MessageText:
+//
+// The cluster quorum resource is not allowed to have any dependencies.
+//
+ ERROR_DEPENDENCY_NOT_ALLOWED = DWORD(5069);
+ {$EXTERNALSYM ERROR_DEPENDENCY_NOT_ALLOWED}
+
+//
+// MessageId: ERROR_CLUSTER_NODE_PAUSED
+//
+// MessageText:
+//
+// The cluster node is paused.
+//
+ ERROR_CLUSTER_NODE_PAUSED = DWORD(5070);
+ {$EXTERNALSYM ERROR_CLUSTER_NODE_PAUSED}
+
+//
+// MessageId: ERROR_NODE_CANT_HOST_RESOURCE
+//
+// MessageText:
+//
+// The cluster resource cannot be brought online. The owner node cannot run this resource.
+//
+ ERROR_NODE_CANT_HOST_RESOURCE = DWORD(5071);
+ {$EXTERNALSYM ERROR_NODE_CANT_HOST_RESOURCE}
+
+//
+// MessageId: ERROR_CLUSTER_NODE_NOT_READY
+//
+// MessageText:
+//
+// The cluster node is not ready to perform the requested operation.
+//
+ ERROR_CLUSTER_NODE_NOT_READY = DWORD(5072);
+ {$EXTERNALSYM ERROR_CLUSTER_NODE_NOT_READY}
+
+//
+// MessageId: ERROR_CLUSTER_NODE_SHUTTING_DOWN
+//
+// MessageText:
+//
+// The cluster node is shutting down.
+//
+ ERROR_CLUSTER_NODE_SHUTTING_DOWN = DWORD(5073);
+ {$EXTERNALSYM ERROR_CLUSTER_NODE_SHUTTING_DOWN}
+
+//
+// MessageId: ERROR_CLUSTER_JOIN_ABORTED
+//
+// MessageText:
+//
+// The cluster join operation was aborted.
+//
+ ERROR_CLUSTER_JOIN_ABORTED = DWORD(5074);
+ {$EXTERNALSYM ERROR_CLUSTER_JOIN_ABORTED}
+
+//
+// MessageId: ERROR_CLUSTER_INCOMPATIBLE_VERSIONS
+//
+// MessageText:
+//
+// The cluster join operation failed due to incompatible software versions between the joining node and its sponsor.
+//
+ ERROR_CLUSTER_INCOMPATIBLE_VERSIONS = DWORD(5075);
+ {$EXTERNALSYM ERROR_CLUSTER_INCOMPATIBLE_VERSIONS}
+
+//
+// MessageId: ERROR_CLUSTER_MAXNUM_OF_RESOURCES_EXCEEDED
+//
+// MessageText:
+//
+// This resource cannot be created because the cluster has reached the limit on the number of resources it can monitor.
+//
+ ERROR_CLUSTER_MAXNUM_OF_RESOURCES_EXCEEDED = DWORD(5076);
+ {$EXTERNALSYM ERROR_CLUSTER_MAXNUM_OF_RESOURCES_EXCEEDED}
+
+//
+// MessageId: ERROR_CLUSTER_SYSTEM_CONFIG_CHANGED
+//
+// MessageText:
+//
+// The system configuration changed during the cluster join or form operation. The join or form operation was aborted.
+//
+ ERROR_CLUSTER_SYSTEM_CONFIG_CHANGED = DWORD(5077);
+ {$EXTERNALSYM ERROR_CLUSTER_SYSTEM_CONFIG_CHANGED}
+
+//
+// MessageId: ERROR_CLUSTER_RESOURCE_TYPE_NOT_FOUND
+//
+// MessageText:
+//
+// The specified resource type was not found.
+//
+ ERROR_CLUSTER_RESOURCE_TYPE_NOT_FOUND = DWORD(5078);
+ {$EXTERNALSYM ERROR_CLUSTER_RESOURCE_TYPE_NOT_FOUND}
+
+//
+// MessageId: ERROR_CLUSTER_RESTYPE_NOT_SUPPORTED
+//
+// MessageText:
+//
+// The specified node does not support a resource of this type. This may be due to version inconsistencies or due to the absence of the resource DLL on this node.
+//
+ ERROR_CLUSTER_RESTYPE_NOT_SUPPORTED = DWORD(5079);
+ {$EXTERNALSYM ERROR_CLUSTER_RESTYPE_NOT_SUPPORTED}
+
+//
+// MessageId: ERROR_CLUSTER_RESNAME_NOT_FOUND
+//
+// MessageText:
+//
+// The specified resource name is not supported by this resource DLL. This may be due to a bad (or changed) name supplied to the resource DLL.
+//
+ ERROR_CLUSTER_RESNAME_NOT_FOUND = DWORD(5080);
+ {$EXTERNALSYM ERROR_CLUSTER_RESNAME_NOT_FOUND}
+
+//
+// MessageId: ERROR_CLUSTER_NO_RPC_PACKAGES_REGISTERED
+//
+// MessageText:
+//
+// No authentication package could be registered with the RPC server.
+//
+ ERROR_CLUSTER_NO_RPC_PACKAGES_REGISTERED = DWORD(5081);
+ {$EXTERNALSYM ERROR_CLUSTER_NO_RPC_PACKAGES_REGISTERED}
+
+//
+// MessageId: ERROR_CLUSTER_OWNER_NOT_IN_PREFLIST
+//
+// MessageText:
+//
+// You cannot bring the group online because the owner of the group is not in the preferred list for the group. To change the owner node for the group, move the group.
+//
+ ERROR_CLUSTER_OWNER_NOT_IN_PREFLIST = DWORD(5082);
+ {$EXTERNALSYM ERROR_CLUSTER_OWNER_NOT_IN_PREFLIST}
+
+//
+// MessageId: ERROR_CLUSTER_DATABASE_SEQMISMATCH
+//
+// MessageText:
+//
+// The join operation failed because the cluster database sequence number has changed or is incompatible with the locker node. This may happen during a join operation if the cluster database was changing during the join.
+//
+ ERROR_CLUSTER_DATABASE_SEQMISMATCH = DWORD(5083);
+ {$EXTERNALSYM ERROR_CLUSTER_DATABASE_SEQMISMATCH}
+
+//
+// MessageId: ERROR_RESMON_INVALID_STATE
+//
+// MessageText:
+//
+// The resource monitor will not allow the fail operation to be performed while the resource is in its current state. This may happen if the resource is in a pending state.
+//
+ ERROR_RESMON_INVALID_STATE = DWORD(5084);
+ {$EXTERNALSYM ERROR_RESMON_INVALID_STATE}
+
+//
+// MessageId: ERROR_CLUSTER_GUM_NOT_LOCKER
+//
+// MessageText:
+//
+// A non locker code got a request to reserve the lock for making global updates.
+//
+ ERROR_CLUSTER_GUM_NOT_LOCKER = DWORD(5085);
+ {$EXTERNALSYM ERROR_CLUSTER_GUM_NOT_LOCKER}
+
+//
+// MessageId: ERROR_QUORUM_DISK_NOT_FOUND
+//
+// MessageText:
+//
+// The quorum disk could not be located by the cluster service.
+//
+ ERROR_QUORUM_DISK_NOT_FOUND = DWORD(5086);
+ {$EXTERNALSYM ERROR_QUORUM_DISK_NOT_FOUND}
+
+//
+// MessageId: ERROR_DATABASE_BACKUP_CORRUPT
+//
+// MessageText:
+//
+// The backed up cluster database is possibly corrupt.
+//
+ ERROR_DATABASE_BACKUP_CORRUPT = DWORD(5087);
+ {$EXTERNALSYM ERROR_DATABASE_BACKUP_CORRUPT}
+
+//
+// MessageId: ERROR_CLUSTER_NODE_ALREADY_HAS_DFS_ROOT
+//
+// MessageText:
+//
+// A DFS root already exists in this cluster node.
+//
+ ERROR_CLUSTER_NODE_ALREADY_HAS_DFS_ROOT = DWORD(5088);
+ {$EXTERNALSYM ERROR_CLUSTER_NODE_ALREADY_HAS_DFS_ROOT}
+
+//
+// MessageId: ERROR_RESOURCE_PROPERTY_UNCHANGEABLE
+//
+// MessageText:
+//
+// An attempt to modify a resource property failed because it conflicts with another existing property.
+//
+ ERROR_RESOURCE_PROPERTY_UNCHANGEABLE = DWORD(5089);
+ {$EXTERNALSYM ERROR_RESOURCE_PROPERTY_UNCHANGEABLE}
+
+{
+ Codes from 4300 through 5889 overlap with codes in ds\published\inc\apperr2.w.
+ Do not add any more error codes in that range.
+}
+
+//
+// MessageId: ERROR_CLUSTER_MEMBERSHIP_INVALID_STATE
+//
+// MessageText:
+//
+// An operation was attempted that is incompatible with the current membership state of the node.
+//
+ ERROR_CLUSTER_MEMBERSHIP_INVALID_STATE = DWORD(5890);
+ {$EXTERNALSYM ERROR_CLUSTER_MEMBERSHIP_INVALID_STATE}
+
+//
+// MessageId: ERROR_CLUSTER_QUORUMLOG_NOT_FOUND
+//
+// MessageText:
+//
+// The quorum resource does not contain the quorum log.
+//
+ ERROR_CLUSTER_QUORUMLOG_NOT_FOUND = DWORD(5891);
+ {$EXTERNALSYM ERROR_CLUSTER_QUORUMLOG_NOT_FOUND}
+
+//
+// MessageId: ERROR_CLUSTER_MEMBERSHIP_HALT
+//
+// MessageText:
+//
+// The membership engine requested shutdown of the cluster service on this node.
+//
+ ERROR_CLUSTER_MEMBERSHIP_HALT = DWORD(5892);
+ {$EXTERNALSYM ERROR_CLUSTER_MEMBERSHIP_HALT}
+
+//
+// MessageId: ERROR_CLUSTER_INSTANCE_ID_MISMATCH
+//
+// MessageText:
+//
+// The join operation failed because the cluster instance ID of the joining node does not match the cluster instance ID of the sponsor node.
+//
+ ERROR_CLUSTER_INSTANCE_ID_MISMATCH = DWORD(5893);
+ {$EXTERNALSYM ERROR_CLUSTER_INSTANCE_ID_MISMATCH}
+
+//
+// MessageId: ERROR_CLUSTER_NETWORK_NOT_FOUND_FOR_IP
+//
+// MessageText:
+//
+// A matching network for the specified IP address could not be found. Please also specify a subnet mask and a cluster network.
+//
+ ERROR_CLUSTER_NETWORK_NOT_FOUND_FOR_IP = DWORD(5894);
+ {$EXTERNALSYM ERROR_CLUSTER_NETWORK_NOT_FOUND_FOR_IP}
+
+//
+// MessageId: ERROR_CLUSTER_PROPERTY_DATA_TYPE_MISMATCH
+//
+// MessageText:
+//
+// The actual data type of the property did not match the expected data type of the property.
+//
+ ERROR_CLUSTER_PROPERTY_DATA_TYPE_MISMATCH = DWORD(5895);
+ {$EXTERNALSYM ERROR_CLUSTER_PROPERTY_DATA_TYPE_MISMATCH}
+
+//
+// MessageId: ERROR_CLUSTER_EVICT_WITHOUT_CLEANUP
+//
+// MessageText:
+//
+// The cluster node was evicted from the cluster successfully, but the node was not cleaned up. Extended status information explaining why the node was not cleaned up is available.
+//
+ ERROR_CLUSTER_EVICT_WITHOUT_CLEANUP = DWORD(5896);
+ {$EXTERNALSYM ERROR_CLUSTER_EVICT_WITHOUT_CLEANUP}
+
+//
+// MessageId: ERROR_CLUSTER_PARAMETER_MISMATCH
+//
+// MessageText:
+//
+// Two or more parameter values specified for a resource's properties are in conflict.
+//
+ ERROR_CLUSTER_PARAMETER_MISMATCH = DWORD(5897);
+ {$EXTERNALSYM ERROR_CLUSTER_PARAMETER_MISMATCH}
+
+//
+// MessageId: ERROR_NODE_CANNOT_BE_CLUSTERED
+//
+// MessageText:
+//
+// This computer cannot be made a member of a cluster.
+//
+ ERROR_NODE_CANNOT_BE_CLUSTERED = DWORD(5898);
+ {$EXTERNALSYM ERROR_NODE_CANNOT_BE_CLUSTERED}
+
+//
+// MessageId: ERROR_CLUSTER_WRONG_OS_VERSION
+//
+// MessageText:
+//
+// This computer cannot be made a member of a cluster because it does not have the correct version of Windows installed.
+//
+ ERROR_CLUSTER_WRONG_OS_VERSION = DWORD(5899);
+ {$EXTERNALSYM ERROR_CLUSTER_WRONG_OS_VERSION}
+
+//
+// MessageId: ERROR_CLUSTER_CANT_CREATE_DUP_CLUSTER_NAME
+//
+// MessageText:
+//
+// A cluster cannot be created with the specified cluster name because that cluster name is already in use. Specify a different name for the cluster.
+//
+ ERROR_CLUSTER_CANT_CREATE_DUP_CLUSTER_NAME = DWORD(5900);
+ {$EXTERNALSYM ERROR_CLUSTER_CANT_CREATE_DUP_CLUSTER_NAME}
+
+//
+// MessageId: ERROR_CLUSCFG_ALREADY_COMMITTED
+//
+// MessageText:
+//
+// The cluster configuration action has already been committed.
+//
+ ERROR_CLUSCFG_ALREADY_COMMITTED = DWORD(5901);
+ {$EXTERNALSYM ERROR_CLUSCFG_ALREADY_COMMITTED}
+
+//
+// MessageId: ERROR_CLUSCFG_ROLLBACK_FAILED
+//
+// MessageText:
+//
+// The cluster configuration action could not be rolled back.
+//
+ ERROR_CLUSCFG_ROLLBACK_FAILED = DWORD(5902);
+ {$EXTERNALSYM ERROR_CLUSCFG_ROLLBACK_FAILED}
+
+//
+// MessageId: ERROR_CLUSCFG_SYSTEM_DISK_DRIVE_LETTER_CONFLICT
+//
+// MessageText:
+//
+// The drive letter assigned to a system disk on one node conflicted with the drive letter assigned to a disk on another node.
+//
+ ERROR_CLUSCFG_SYSTEM_DISK_DRIVE_LETTER_CONFLICT = DWORD(5903);
+ {$EXTERNALSYM ERROR_CLUSCFG_SYSTEM_DISK_DRIVE_LETTER_CONFLICT}
+
+//
+// MessageId: ERROR_CLUSTER_OLD_VERSION
+//
+// MessageText:
+//
+// One or more nodes in the cluster are running a version of Windows that does not support this operation.
+//
+ ERROR_CLUSTER_OLD_VERSION = DWORD(5904);
+ {$EXTERNALSYM ERROR_CLUSTER_OLD_VERSION}
+
+//
+// MessageId: ERROR_CLUSTER_MISMATCHED_COMPUTER_ACCT_NAME
+//
+// MessageText:
+//
+// The name of the corresponding computer account doesn't match the Network Name for this resource.
+//
+ ERROR_CLUSTER_MISMATCHED_COMPUTER_ACCT_NAME = DWORD(5905);
+ {$EXTERNALSYM ERROR_CLUSTER_MISMATCHED_COMPUTER_ACCT_NAME}
+
+////////////////////////////////////
+// //
+// EFS Error Codes //
+// //
+////////////////////////////////////
+//
+// MessageId: ERROR_ENCRYPTION_FAILED
+//
+// MessageText:
+//
+// The specified file could not be encrypted.
+//
+ ERROR_ENCRYPTION_FAILED = DWORD(6000);
+ {$EXTERNALSYM ERROR_ENCRYPTION_FAILED}
+
+//
+// MessageId: ERROR_DECRYPTION_FAILED
+//
+// MessageText:
+//
+// The specified file could not be decrypted.
+//
+ ERROR_DECRYPTION_FAILED = DWORD(6001);
+ {$EXTERNALSYM ERROR_DECRYPTION_FAILED}
+
+//
+// MessageId: ERROR_FILE_ENCRYPTED
+//
+// MessageText:
+//
+// The specified file is encrypted and the user does not have the ability to decrypt it.
+//
+ ERROR_FILE_ENCRYPTED = DWORD(6002);
+ {$EXTERNALSYM ERROR_FILE_ENCRYPTED}
+
+//
+// MessageId: ERROR_NO_RECOVERY_POLICY
+//
+// MessageText:
+//
+// There is no valid encryption recovery policy configured for this system.
+//
+ ERROR_NO_RECOVERY_POLICY = DWORD(6003);
+ {$EXTERNALSYM ERROR_NO_RECOVERY_POLICY}
+
+//
+// MessageId: ERROR_NO_EFS
+//
+// MessageText:
+//
+// The required encryption driver is not loaded for this system.
+//
+ ERROR_NO_EFS = DWORD(6004);
+ {$EXTERNALSYM ERROR_NO_EFS}
+
+//
+// MessageId: ERROR_WRONG_EFS
+//
+// MessageText:
+//
+// The file was encrypted with a different encryption driver than is currently loaded.
+//
+ ERROR_WRONG_EFS = DWORD(6005);
+ {$EXTERNALSYM ERROR_WRONG_EFS}
+
+//
+// MessageId: ERROR_NO_USER_KEYS
+//
+// MessageText:
+//
+// There are no EFS keys defined for the user.
+//
+ ERROR_NO_USER_KEYS = DWORD(6006);
+ {$EXTERNALSYM ERROR_NO_USER_KEYS}
+
+//
+// MessageId: ERROR_FILE_NOT_ENCRYPTED
+//
+// MessageText:
+//
+// The specified file is not encrypted.
+//
+ ERROR_FILE_NOT_ENCRYPTED = DWORD(6007);
+ {$EXTERNALSYM ERROR_FILE_NOT_ENCRYPTED}
+
+//
+// MessageId: ERROR_NOT_EXPORT_FORMAT
+//
+// MessageText:
+//
+// The specified file is not in the defined EFS export format.
+//
+ ERROR_NOT_EXPORT_FORMAT = DWORD(6008);
+ {$EXTERNALSYM ERROR_NOT_EXPORT_FORMAT}
+
+//
+// MessageId: ERROR_FILE_READ_ONLY
+//
+// MessageText:
+//
+// The specified file is read only.
+//
+ ERROR_FILE_READ_ONLY = DWORD(6009);
+ {$EXTERNALSYM ERROR_FILE_READ_ONLY}
+
+//
+// MessageId: ERROR_DIR_EFS_DISALLOWED
+//
+// MessageText:
+//
+// The directory has been disabled for encryption.
+//
+ ERROR_DIR_EFS_DISALLOWED = DWORD(6010);
+ {$EXTERNALSYM ERROR_DIR_EFS_DISALLOWED}
+
+//
+// MessageId: ERROR_EFS_SERVER_NOT_TRUSTED
+//
+// MessageText:
+//
+// The server is not trusted for remote encryption operation.
+//
+ ERROR_EFS_SERVER_NOT_TRUSTED = DWORD(6011);
+ {$EXTERNALSYM ERROR_EFS_SERVER_NOT_TRUSTED}
+
+//
+// MessageId: ERROR_BAD_RECOVERY_POLICY
+//
+// MessageText:
+//
+// Recovery policy configured for this system contains invalid recovery certificate.
+//
+ ERROR_BAD_RECOVERY_POLICY = DWORD(6012);
+ {$EXTERNALSYM ERROR_BAD_RECOVERY_POLICY}
+
+//
+// MessageId: ERROR_EFS_ALG_BLOB_TOO_BIG
+//
+// MessageText:
+//
+// The encryption algorithm used on the source file needs a bigger key buffer than the one on the destination file.
+//
+ ERROR_EFS_ALG_BLOB_TOO_BIG = DWORD(6013);
+ {$EXTERNALSYM ERROR_EFS_ALG_BLOB_TOO_BIG}
+
+//
+// MessageId: ERROR_VOLUME_NOT_SUPPORT_EFS
+//
+// MessageText:
+//
+// The disk partition does not support file encryption.
+//
+ ERROR_VOLUME_NOT_SUPPORT_EFS = DWORD(6014);
+ {$EXTERNALSYM ERROR_VOLUME_NOT_SUPPORT_EFS}
+
+//
+// MessageId: ERROR_EFS_DISABLED
+//
+// MessageText:
+//
+// This machine is disabled for file encryption.
+//
+ ERROR_EFS_DISABLED = DWORD(6015);
+ {$EXTERNALSYM ERROR_EFS_DISABLED}
+
+//
+// MessageId: ERROR_EFS_VERSION_NOT_SUPPORT
+//
+// MessageText:
+//
+// A newer system is required to decrypt this encrypted file.
+//
+ ERROR_EFS_VERSION_NOT_SUPPORT = DWORD(6016);
+ {$EXTERNALSYM ERROR_EFS_VERSION_NOT_SUPPORT}
+
+// This message number is for historical purposes and cannot be changed or re-used.
+//
+// MessageId: ERROR_NO_BROWSER_SERVERS_FOUND
+//
+// MessageText:
+//
+// The list of servers for this workgroup is not currently available
+//
+ ERROR_NO_BROWSER_SERVERS_FOUND = DWORD(6118);
+ {$EXTERNALSYM ERROR_NO_BROWSER_SERVERS_FOUND}
+
+//////////////////////////////////////////////////////////////////
+// //
+// Task Scheduler Error Codes that NET START must understand //
+// //
+//////////////////////////////////////////////////////////////////
+//
+// MessageId: SCHED_E_SERVICE_NOT_LOCALSYSTEM
+//
+// MessageText:
+//
+// The Task Scheduler service must be configured to run in the System account to function properly. Individual tasks may be configured to run in other accounts.
+//
+ SCHED_E_SERVICE_NOT_LOCALSYSTEM = DWORD(6200);
+ {$EXTERNALSYM SCHED_E_SERVICE_NOT_LOCALSYSTEM}
+
+////////////////////////////////////
+// //
+// Terminal Server Error Codes //
+// //
+////////////////////////////////////
+//
+// MessageId: ERROR_CTX_WINSTATION_NAME_INVALID
+//
+// MessageText:
+//
+// The specified session name is invalid.
+//
+ ERROR_CTX_WINSTATION_NAME_INVALID = DWORD(7001);
+ {$EXTERNALSYM ERROR_CTX_WINSTATION_NAME_INVALID}
+
+//
+// MessageId: ERROR_CTX_INVALID_PD
+//
+// MessageText:
+//
+// The specified protocol driver is invalid.
+//
+ ERROR_CTX_INVALID_PD = DWORD(7002);
+ {$EXTERNALSYM ERROR_CTX_INVALID_PD}
+
+//
+// MessageId: ERROR_CTX_PD_NOT_FOUND
+//
+// MessageText:
+//
+// The specified protocol driver was not found in the system path.
+//
+ ERROR_CTX_PD_NOT_FOUND = DWORD(7003);
+ {$EXTERNALSYM ERROR_CTX_PD_NOT_FOUND}
+
+//
+// MessageId: ERROR_CTX_WD_NOT_FOUND
+//
+// MessageText:
+//
+// The specified terminal connection driver was not found in the system path.
+//
+ ERROR_CTX_WD_NOT_FOUND = DWORD(7004);
+ {$EXTERNALSYM ERROR_CTX_WD_NOT_FOUND}
+
+//
+// MessageId: ERROR_CTX_CANNOT_MAKE_EVENTLOG_ENTRY
+//
+// MessageText:
+//
+// A registry key for event logging could not be created for this session.
+//
+ ERROR_CTX_CANNOT_MAKE_EVENTLOG_ENTRY = DWORD(7005);
+ {$EXTERNALSYM ERROR_CTX_CANNOT_MAKE_EVENTLOG_ENTRY}
+
+//
+// MessageId: ERROR_CTX_SERVICE_NAME_COLLISION
+//
+// MessageText:
+//
+// A service with the same name already exists on the system.
+//
+ ERROR_CTX_SERVICE_NAME_COLLISION = DWORD(7006);
+ {$EXTERNALSYM ERROR_CTX_SERVICE_NAME_COLLISION}
+
+//
+// MessageId: ERROR_CTX_CLOSE_PENDING
+//
+// MessageText:
+//
+// A close operation is pending on the session.
+//
+ ERROR_CTX_CLOSE_PENDING = DWORD(7007);
+ {$EXTERNALSYM ERROR_CTX_CLOSE_PENDING}
+
+//
+// MessageId: ERROR_CTX_NO_OUTBUF
+//
+// MessageText:
+//
+// There are no free output buffers available.
+//
+ ERROR_CTX_NO_OUTBUF = DWORD(7008);
+ {$EXTERNALSYM ERROR_CTX_NO_OUTBUF}
+
+//
+// MessageId: ERROR_CTX_MODEM_INF_NOT_FOUND
+//
+// MessageText:
+//
+// The MODEM.INF file was not found.
+//
+ ERROR_CTX_MODEM_INF_NOT_FOUND = DWORD(7009);
+ {$EXTERNALSYM ERROR_CTX_MODEM_INF_NOT_FOUND}
+
+//
+// MessageId: ERROR_CTX_INVALID_MODEMNAME
+//
+// MessageText:
+//
+// The modem name was not found in MODEM.INF.
+//
+ ERROR_CTX_INVALID_MODEMNAME = DWORD(7010);
+ {$EXTERNALSYM ERROR_CTX_INVALID_MODEMNAME}
+
+//
+// MessageId: ERROR_CTX_MODEM_RESPONSE_ERROR
+//
+// MessageText:
+//
+// The modem did not accept the command sent to it. Verify that the configured modem name matches the attached modem.
+//
+ ERROR_CTX_MODEM_RESPONSE_ERROR = DWORD(7011);
+ {$EXTERNALSYM ERROR_CTX_MODEM_RESPONSE_ERROR}
+
+//
+// MessageId: ERROR_CTX_MODEM_RESPONSE_TIMEOUT
+//
+// MessageText:
+//
+// The modem did not respond to the command sent to it. Verify that the modem is properly cabled and powered on.
+//
+ ERROR_CTX_MODEM_RESPONSE_TIMEOUT = DWORD(7012);
+ {$EXTERNALSYM ERROR_CTX_MODEM_RESPONSE_TIMEOUT}
+
+//
+// MessageId: ERROR_CTX_MODEM_RESPONSE_NO_CARRIER
+//
+// MessageText:
+//
+// Carrier detect has failed or carrier has been dropped due to disconnect.
+//
+ ERROR_CTX_MODEM_RESPONSE_NO_CARRIER = DWORD(7013);
+ {$EXTERNALSYM ERROR_CTX_MODEM_RESPONSE_NO_CARRIER}
+
+//
+// MessageId: ERROR_CTX_MODEM_RESPONSE_NO_DIALTONE
+//
+// MessageText:
+//
+// Dial tone not detected within the required time. Verify that the phone cable is properly attached and functional.
+//
+ ERROR_CTX_MODEM_RESPONSE_NO_DIALTONE = DWORD(7014);
+ {$EXTERNALSYM ERROR_CTX_MODEM_RESPONSE_NO_DIALTONE}
+
+//
+// MessageId: ERROR_CTX_MODEM_RESPONSE_BUSY
+//
+// MessageText:
+//
+// Busy signal detected at remote site on callback.
+//
+ ERROR_CTX_MODEM_RESPONSE_BUSY = DWORD(7015);
+ {$EXTERNALSYM ERROR_CTX_MODEM_RESPONSE_BUSY}
+
+//
+// MessageId: ERROR_CTX_MODEM_RESPONSE_VOICE
+//
+// MessageText:
+//
+// Voice detected at remote site on callback.
+//
+ ERROR_CTX_MODEM_RESPONSE_VOICE = DWORD(7016);
+ {$EXTERNALSYM ERROR_CTX_MODEM_RESPONSE_VOICE}
+
+//
+// MessageId: ERROR_CTX_TD_ERROR
+//
+// MessageText:
+//
+// Transport driver error
+//
+ ERROR_CTX_TD_ERROR = DWORD(7017);
+ {$EXTERNALSYM ERROR_CTX_TD_ERROR}
+
+//
+// MessageId: ERROR_CTX_WINSTATION_NOT_FOUND
+//
+// MessageText:
+//
+// The specified session cannot be found.
+//
+ ERROR_CTX_WINSTATION_NOT_FOUND = DWORD(7022);
+ {$EXTERNALSYM ERROR_CTX_WINSTATION_NOT_FOUND}
+
+//
+// MessageId: ERROR_CTX_WINSTATION_ALREADY_EXISTS
+//
+// MessageText:
+//
+// The specified session name is already in use.
+//
+ ERROR_CTX_WINSTATION_ALREADY_EXISTS = DWORD(7023);
+ {$EXTERNALSYM ERROR_CTX_WINSTATION_ALREADY_EXISTS}
+
+//
+// MessageId: ERROR_CTX_WINSTATION_BUSY
+//
+// MessageText:
+//
+// The requested operation cannot be completed because the terminal connection is currently busy processing a connect, disconnect, reset, or delete operation.
+//
+ ERROR_CTX_WINSTATION_BUSY = DWORD(7024);
+ {$EXTERNALSYM ERROR_CTX_WINSTATION_BUSY}
+
+//
+// MessageId: ERROR_CTX_BAD_VIDEO_MODE
+//
+// MessageText:
+//
+// An attempt has been made to connect to a session whose video mode is not supported by the current client.
+//
+ ERROR_CTX_BAD_VIDEO_MODE = DWORD(7025);
+ {$EXTERNALSYM ERROR_CTX_BAD_VIDEO_MODE}
+
+//
+// MessageId: ERROR_CTX_GRAPHICS_INVALID
+//
+// MessageText:
+//
+// The application attempted to enable DOS graphics mode.
+// DOS graphics mode is not supported.
+//
+ ERROR_CTX_GRAPHICS_INVALID = DWORD(7035);
+ {$EXTERNALSYM ERROR_CTX_GRAPHICS_INVALID}
+
+//
+// MessageId: ERROR_CTX_LOGON_DISABLED
+//
+// MessageText:
+//
+// Your interactive logon privilege has been disabled.
+// Please contact your administrator.
+//
+ ERROR_CTX_LOGON_DISABLED = DWORD(7037);
+ {$EXTERNALSYM ERROR_CTX_LOGON_DISABLED}
+
+//
+// MessageId: ERROR_CTX_NOT_CONSOLE
+//
+// MessageText:
+//
+// The requested operation can be performed only on the system console.
+// This is most often the result of a driver or system DLL requiring direct console access.
+//
+ ERROR_CTX_NOT_CONSOLE = DWORD(7038);
+ {$EXTERNALSYM ERROR_CTX_NOT_CONSOLE}
+
+//
+// MessageId: ERROR_CTX_CLIENT_QUERY_TIMEOUT
+//
+// MessageText:
+//
+// The client failed to respond to the server connect message.
+//
+ ERROR_CTX_CLIENT_QUERY_TIMEOUT = DWORD(7040);
+ {$EXTERNALSYM ERROR_CTX_CLIENT_QUERY_TIMEOUT}
+
+//
+// MessageId: ERROR_CTX_CONSOLE_DISCONNECT
+//
+// MessageText:
+//
+// Disconnecting the console session is not supported.
+//
+ ERROR_CTX_CONSOLE_DISCONNECT = DWORD(7041);
+ {$EXTERNALSYM ERROR_CTX_CONSOLE_DISCONNECT}
+
+//
+// MessageId: ERROR_CTX_CONSOLE_CONNECT
+//
+// MessageText:
+//
+// Reconnecting a disconnected session to the console is not supported.
+//
+ ERROR_CTX_CONSOLE_CONNECT = DWORD(7042);
+ {$EXTERNALSYM ERROR_CTX_CONSOLE_CONNECT}
+
+//
+// MessageId: ERROR_CTX_SHADOW_DENIED
+//
+// MessageText:
+//
+// The request to control another session remotely was denied.
+//
+ ERROR_CTX_SHADOW_DENIED = DWORD(7044);
+ {$EXTERNALSYM ERROR_CTX_SHADOW_DENIED}
+
+//
+// MessageId: ERROR_CTX_WINSTATION_ACCESS_DENIED
+//
+// MessageText:
+//
+// The requested session access is denied.
+//
+ ERROR_CTX_WINSTATION_ACCESS_DENIED = DWORD(7045);
+ {$EXTERNALSYM ERROR_CTX_WINSTATION_ACCESS_DENIED}
+
+//
+// MessageId: ERROR_CTX_INVALID_WD
+//
+// MessageText:
+//
+// The specified terminal connection driver is invalid.
+//
+ ERROR_CTX_INVALID_WD = DWORD(7049);
+ {$EXTERNALSYM ERROR_CTX_INVALID_WD}
+
+//
+// MessageId: ERROR_CTX_SHADOW_INVALID
+//
+// MessageText:
+//
+// The requested session cannot be controlled remotely.
+// This may be because the session is disconnected or does not currently have a user logged on.
+//
+ ERROR_CTX_SHADOW_INVALID = DWORD(7050);
+ {$EXTERNALSYM ERROR_CTX_SHADOW_INVALID}
+
+//
+// MessageId: ERROR_CTX_SHADOW_DISABLED
+//
+// MessageText:
+//
+// The requested session is not configured to allow remote control.
+//
+ ERROR_CTX_SHADOW_DISABLED = DWORD(7051);
+ {$EXTERNALSYM ERROR_CTX_SHADOW_DISABLED}
+
+//
+// MessageId: ERROR_CTX_CLIENT_LICENSE_IN_USE
+//
+// MessageText:
+//
+// Your request to connect to this Terminal Server has been rejected. Your Terminal Server client license number is currently being used by another user.
+// Please call your system administrator to obtain a unique license number.
+//
+ ERROR_CTX_CLIENT_LICENSE_IN_USE = DWORD(7052);
+ {$EXTERNALSYM ERROR_CTX_CLIENT_LICENSE_IN_USE}
+
+//
+// MessageId: ERROR_CTX_CLIENT_LICENSE_NOT_SET
+//
+// MessageText:
+//
+// Your request to connect to this Terminal Server has been rejected. Your Terminal Server client license number has not been entered for this copy of the Terminal Server client.
+// Please contact your system administrator.
+//
+ ERROR_CTX_CLIENT_LICENSE_NOT_SET = DWORD(7053);
+ {$EXTERNALSYM ERROR_CTX_CLIENT_LICENSE_NOT_SET}
+
+//
+// MessageId: ERROR_CTX_LICENSE_NOT_AVAILABLE
+//
+// MessageText:
+//
+// The system has reached its licensed logon limit.
+// Please try again later.
+//
+ ERROR_CTX_LICENSE_NOT_AVAILABLE = DWORD(7054);
+ {$EXTERNALSYM ERROR_CTX_LICENSE_NOT_AVAILABLE}
+
+//
+// MessageId: ERROR_CTX_LICENSE_CLIENT_INVALID
+//
+// MessageText:
+//
+// The client you are using is not licensed to use this system. Your logon request is denied.
+//
+ ERROR_CTX_LICENSE_CLIENT_INVALID = DWORD(7055);
+ {$EXTERNALSYM ERROR_CTX_LICENSE_CLIENT_INVALID}
+
+//
+// MessageId: ERROR_CTX_LICENSE_EXPIRED
+//
+// MessageText:
+//
+// The system license has expired. Your logon request is denied.
+//
+ ERROR_CTX_LICENSE_EXPIRED = DWORD(7056);
+ {$EXTERNALSYM ERROR_CTX_LICENSE_EXPIRED}
+
+//
+// MessageId: ERROR_CTX_SHADOW_NOT_RUNNING
+//
+// MessageText:
+//
+// Remote control could not be terminated because the specified session is not currently being remotely controlled.
+//
+ ERROR_CTX_SHADOW_NOT_RUNNING = DWORD(7057);
+ {$EXTERNALSYM ERROR_CTX_SHADOW_NOT_RUNNING}
+
+//
+// MessageId: ERROR_CTX_SHADOW_ENDED_BY_MODE_CHANGE
+//
+// MessageText:
+//
+// The remote control of the console was terminated because the display mode was changed. Changing the display mode in a remote control session is not supported.
+//
+ ERROR_CTX_SHADOW_ENDED_BY_MODE_CHANGE = DWORD(7058);
+ {$EXTERNALSYM ERROR_CTX_SHADOW_ENDED_BY_MODE_CHANGE}
+
+//
+// MessageId: ERROR_ACTIVATION_COUNT_EXCEEDED
+//
+// MessageText:
+//
+// Activation has already been reset the maximum number of times for this installation. Your activation timer will not be cleared.
+//
+ ERROR_ACTIVATION_COUNT_EXCEEDED = DWORD(7059);
+ {$EXTERNALSYM ERROR_ACTIVATION_COUNT_EXCEEDED}
+
+///////////////////////////////////////////////////
+// /
+// Traffic Control Error Codes /
+// /
+// 7500 to 7999 /
+// /
+// defined in: tcerror.h /
+///////////////////////////////////////////////////
+///////////////////////////////////////////////////
+// /
+// Active Directory Error Codes /
+// /
+// 8000 to 8999 /
+///////////////////////////////////////////////////
+// *****************
+// FACILITY_FILE_REPLICATION_SERVICE
+// *****************
+//
+// MessageId: FRS_ERR_INVALID_API_SEQUENCE
+//
+// MessageText:
+//
+// The file replication service API was called incorrectly.
+//
+ FRS_ERR_INVALID_API_SEQUENCE = DWORD(8001);
+ {$EXTERNALSYM FRS_ERR_INVALID_API_SEQUENCE}
+
+//
+// MessageId: FRS_ERR_STARTING_SERVICE
+//
+// MessageText:
+//
+// The file replication service cannot be started.
+//
+ FRS_ERR_STARTING_SERVICE = DWORD(8002);
+ {$EXTERNALSYM FRS_ERR_STARTING_SERVICE}
+
+//
+// MessageId: FRS_ERR_STOPPING_SERVICE
+//
+// MessageText:
+//
+// The file replication service cannot be stopped.
+//
+ FRS_ERR_STOPPING_SERVICE = DWORD(8003);
+ {$EXTERNALSYM FRS_ERR_STOPPING_SERVICE}
+
+//
+// MessageId: FRS_ERR_INTERNAL_API
+//
+// MessageText:
+//
+// The file replication service API terminated the request.
+// The event log may have more information.
+//
+ FRS_ERR_INTERNAL_API = DWORD(8004);
+ {$EXTERNALSYM FRS_ERR_INTERNAL_API}
+
+//
+// MessageId: FRS_ERR_INTERNAL
+//
+// MessageText:
+//
+// The file replication service terminated the request.
+// The event log may have more information.
+//
+ FRS_ERR_INTERNAL = DWORD(8005);
+ {$EXTERNALSYM FRS_ERR_INTERNAL}
+
+//
+// MessageId: FRS_ERR_SERVICE_COMM
+//
+// MessageText:
+//
+// The file replication service cannot be contacted.
+// The event log may have more information.
+//
+ FRS_ERR_SERVICE_COMM = DWORD(8006);
+ {$EXTERNALSYM FRS_ERR_SERVICE_COMM}
+
+//
+// MessageId: FRS_ERR_INSUFFICIENT_PRIV
+//
+// MessageText:
+//
+// The file replication service cannot satisfy the request because the user has insufficient privileges.
+// The event log may have more information.
+//
+ FRS_ERR_INSUFFICIENT_PRIV = DWORD(8007);
+ {$EXTERNALSYM FRS_ERR_INSUFFICIENT_PRIV}
+
+//
+// MessageId: FRS_ERR_AUTHENTICATION
+//
+// MessageText:
+//
+// The file replication service cannot satisfy the request because authenticated RPC is not available.
+// The event log may have more information.
+//
+ FRS_ERR_AUTHENTICATION = DWORD(8008);
+ {$EXTERNALSYM FRS_ERR_AUTHENTICATION}
+
+//
+// MessageId: FRS_ERR_PARENT_INSUFFICIENT_PRIV
+//
+// MessageText:
+//
+// The file replication service cannot satisfy the request because the user has insufficient privileges on the domain controller.
+// The event log may have more information.
+//
+ FRS_ERR_PARENT_INSUFFICIENT_PRIV = DWORD(8009);
+ {$EXTERNALSYM FRS_ERR_PARENT_INSUFFICIENT_PRIV}
+
+//
+// MessageId: FRS_ERR_PARENT_AUTHENTICATION
+//
+// MessageText:
+//
+// The file replication service cannot satisfy the request because authenticated RPC is not available on the domain controller.
+// The event log may have more information.
+//
+ FRS_ERR_PARENT_AUTHENTICATION = DWORD(8010);
+ {$EXTERNALSYM FRS_ERR_PARENT_AUTHENTICATION}
+
+//
+// MessageId: FRS_ERR_CHILD_TO_PARENT_COMM
+//
+// MessageText:
+//
+// The file replication service cannot communicate with the file replication service on the domain controller.
+// The event log may have more information.
+//
+ FRS_ERR_CHILD_TO_PARENT_COMM = DWORD(8011);
+ {$EXTERNALSYM FRS_ERR_CHILD_TO_PARENT_COMM}
+
+//
+// MessageId: FRS_ERR_PARENT_TO_CHILD_COMM
+//
+// MessageText:
+//
+// The file replication service on the domain controller cannot communicate with the file replication service on this computer.
+// The event log may have more information.
+//
+ FRS_ERR_PARENT_TO_CHILD_COMM = DWORD(8012);
+ {$EXTERNALSYM FRS_ERR_PARENT_TO_CHILD_COMM}
+
+//
+// MessageId: FRS_ERR_SYSVOL_POPULATE
+//
+// MessageText:
+//
+// The file replication service cannot populate the system volume because of an internal error.
+// The event log may have more information.
+//
+ FRS_ERR_SYSVOL_POPULATE = DWORD(8013);
+ {$EXTERNALSYM FRS_ERR_SYSVOL_POPULATE}
+
+//
+// MessageId: FRS_ERR_SYSVOL_POPULATE_TIMEOUT
+//
+// MessageText:
+//
+// The file replication service cannot populate the system volume because of an internal timeout.
+// The event log may have more information.
+//
+ FRS_ERR_SYSVOL_POPULATE_TIMEOUT = DWORD(8014);
+ {$EXTERNALSYM FRS_ERR_SYSVOL_POPULATE_TIMEOUT}
+
+//
+// MessageId: FRS_ERR_SYSVOL_IS_BUSY
+//
+// MessageText:
+//
+// The file replication service cannot process the request. The system volume is busy with a previous request.
+//
+ FRS_ERR_SYSVOL_IS_BUSY = DWORD(8015);
+ {$EXTERNALSYM FRS_ERR_SYSVOL_IS_BUSY}
+
+//
+// MessageId: FRS_ERR_SYSVOL_DEMOTE
+//
+// MessageText:
+//
+// The file replication service cannot stop replicating the system volume because of an internal error.
+// The event log may have more information.
+//
+ FRS_ERR_SYSVOL_DEMOTE = DWORD(8016);
+ {$EXTERNALSYM FRS_ERR_SYSVOL_DEMOTE}
+
+//
+// MessageId: FRS_ERR_INVALID_SERVICE_PARAMETER
+//
+// MessageText:
+//
+// The file replication service detected an invalid parameter.
+//
+ FRS_ERR_INVALID_SERVICE_PARAMETER = DWORD(8017);
+ {$EXTERNALSYM FRS_ERR_INVALID_SERVICE_PARAMETER}
+
+// *****************
+// FACILITY DIRECTORY SERVICE
+// *****************
+ DS_S_SUCCESS = NO_ERROR;
+ {$EXTERNALSYM DS_S_SUCCESS}
+//
+// MessageId: ERROR_DS_NOT_INSTALLED
+//
+// MessageText:
+//
+// An error occurred while installing the directory service. For more information, see the event log.
+//
+ ERROR_DS_NOT_INSTALLED = DWORD(8200);
+ {$EXTERNALSYM ERROR_DS_NOT_INSTALLED}
+
+//
+// MessageId: ERROR_DS_MEMBERSHIP_EVALUATED_LOCALLY
+//
+// MessageText:
+//
+// The directory service evaluated group memberships locally.
+//
+ ERROR_DS_MEMBERSHIP_EVALUATED_LOCALLY = DWORD(8201);
+ {$EXTERNALSYM ERROR_DS_MEMBERSHIP_EVALUATED_LOCALLY}
+
+//
+// MessageId: ERROR_DS_NO_ATTRIBUTE_OR_VALUE
+//
+// MessageText:
+//
+// The specified directory service attribute or value does not exist.
+//
+ ERROR_DS_NO_ATTRIBUTE_OR_VALUE = DWORD(8202);
+ {$EXTERNALSYM ERROR_DS_NO_ATTRIBUTE_OR_VALUE}
+
+//
+// MessageId: ERROR_DS_INVALID_ATTRIBUTE_SYNTAX
+//
+// MessageText:
+//
+// The attribute syntax specified to the directory service is invalid.
+//
+ ERROR_DS_INVALID_ATTRIBUTE_SYNTAX = DWORD(8203);
+ {$EXTERNALSYM ERROR_DS_INVALID_ATTRIBUTE_SYNTAX}
+
+//
+// MessageId: ERROR_DS_ATTRIBUTE_TYPE_UNDEFINED
+//
+// MessageText:
+//
+// The attribute type specified to the directory service is not defined.
+//
+ ERROR_DS_ATTRIBUTE_TYPE_UNDEFINED = DWORD(8204);
+ {$EXTERNALSYM ERROR_DS_ATTRIBUTE_TYPE_UNDEFINED}
+
+//
+// MessageId: ERROR_DS_ATTRIBUTE_OR_VALUE_EXISTS
+//
+// MessageText:
+//
+// The specified directory service attribute or value already exists.
+//
+ ERROR_DS_ATTRIBUTE_OR_VALUE_EXISTS = DWORD(8205);
+ {$EXTERNALSYM ERROR_DS_ATTRIBUTE_OR_VALUE_EXISTS}
+
+//
+// MessageId: ERROR_DS_BUSY
+//
+// MessageText:
+//
+// The directory service is busy.
+//
+ ERROR_DS_BUSY = DWORD(8206);
+ {$EXTERNALSYM ERROR_DS_BUSY}
+
+//
+// MessageId: ERROR_DS_UNAVAILABLE
+//
+// MessageText:
+//
+// The directory service is unavailable.
+//
+ ERROR_DS_UNAVAILABLE = DWORD(8207);
+ {$EXTERNALSYM ERROR_DS_UNAVAILABLE}
+
+//
+// MessageId: ERROR_DS_NO_RIDS_ALLOCATED
+//
+// MessageText:
+//
+// The directory service was unable to allocate a relative identifier.
+//
+ ERROR_DS_NO_RIDS_ALLOCATED = DWORD(8208);
+ {$EXTERNALSYM ERROR_DS_NO_RIDS_ALLOCATED}
+
+//
+// MessageId: ERROR_DS_NO_MORE_RIDS
+//
+// MessageText:
+//
+// The directory service has exhausted the pool of relative identifiers.
+//
+ ERROR_DS_NO_MORE_RIDS = DWORD(8209);
+ {$EXTERNALSYM ERROR_DS_NO_MORE_RIDS}
+
+//
+// MessageId: ERROR_DS_INCORRECT_ROLE_OWNER
+//
+// MessageText:
+//
+// The requested operation could not be performed because the directory service is not the master for that type of operation.
+//
+ ERROR_DS_INCORRECT_ROLE_OWNER = DWORD(8210);
+ {$EXTERNALSYM ERROR_DS_INCORRECT_ROLE_OWNER}
+
+//
+// MessageId: ERROR_DS_RIDMGR_INIT_ERROR
+//
+// MessageText:
+//
+// The directory service was unable to initialize the subsystem that allocates relative identifiers.
+//
+ ERROR_DS_RIDMGR_INIT_ERROR = DWORD(8211);
+ {$EXTERNALSYM ERROR_DS_RIDMGR_INIT_ERROR}
+
+//
+// MessageId: ERROR_DS_OBJ_CLASS_VIOLATION
+//
+// MessageText:
+//
+// The requested operation did not satisfy one or more constraints associated with the class of the object.
+//
+ ERROR_DS_OBJ_CLASS_VIOLATION = DWORD(8212);
+ {$EXTERNALSYM ERROR_DS_OBJ_CLASS_VIOLATION}
+
+//
+// MessageId: ERROR_DS_CANT_ON_NON_LEAF
+//
+// MessageText:
+//
+// The directory service can perform the requested operation only on a leaf object.
+//
+ ERROR_DS_CANT_ON_NON_LEAF = DWORD(8213);
+ {$EXTERNALSYM ERROR_DS_CANT_ON_NON_LEAF}
+
+//
+// MessageId: ERROR_DS_CANT_ON_RDN
+//
+// MessageText:
+//
+// The directory service cannot perform the requested operation on the RDN attribute of an object.
+//
+ ERROR_DS_CANT_ON_RDN = DWORD(8214);
+ {$EXTERNALSYM ERROR_DS_CANT_ON_RDN}
+
+//
+// MessageId: ERROR_DS_CANT_MOD_OBJ_CLASS
+//
+// MessageText:
+//
+// The directory service detected an attempt to modify the object class of an object.
+//
+ ERROR_DS_CANT_MOD_OBJ_CLASS = DWORD(8215);
+ {$EXTERNALSYM ERROR_DS_CANT_MOD_OBJ_CLASS}
+
+//
+// MessageId: ERROR_DS_CROSS_DOM_MOVE_ERROR
+//
+// MessageText:
+//
+// The requested cross-domain move operation could not be performed.
+//
+ ERROR_DS_CROSS_DOM_MOVE_ERROR = DWORD(8216);
+ {$EXTERNALSYM ERROR_DS_CROSS_DOM_MOVE_ERROR}
+
+//
+// MessageId: ERROR_DS_GC_NOT_AVAILABLE
+//
+// MessageText:
+//
+// Unable to contact the global catalog server.
+//
+ ERROR_DS_GC_NOT_AVAILABLE = DWORD(8217);
+ {$EXTERNALSYM ERROR_DS_GC_NOT_AVAILABLE}
+
+//
+// MessageId: ERROR_SHARED_POLICY
+//
+// MessageText:
+//
+// The policy object is shared and can only be modified at the root.
+//
+ ERROR_SHARED_POLICY = DWORD(8218);
+ {$EXTERNALSYM ERROR_SHARED_POLICY}
+
+//
+// MessageId: ERROR_POLICY_OBJECT_NOT_FOUND
+//
+// MessageText:
+//
+// The policy object does not exist.
+//
+ ERROR_POLICY_OBJECT_NOT_FOUND = DWORD(8219);
+ {$EXTERNALSYM ERROR_POLICY_OBJECT_NOT_FOUND}
+
+//
+// MessageId: ERROR_POLICY_ONLY_IN_DS
+//
+// MessageText:
+//
+// The requested policy information is only in the directory service.
+//
+ ERROR_POLICY_ONLY_IN_DS = DWORD(8220);
+ {$EXTERNALSYM ERROR_POLICY_ONLY_IN_DS}
+
+//
+// MessageId: ERROR_PROMOTION_ACTIVE
+//
+// MessageText:
+//
+// A domain controller promotion is currently active.
+//
+ ERROR_PROMOTION_ACTIVE = DWORD(8221);
+ {$EXTERNALSYM ERROR_PROMOTION_ACTIVE}
+
+//
+// MessageId: ERROR_NO_PROMOTION_ACTIVE
+//
+// MessageText:
+//
+// A domain controller promotion is not currently active
+//
+ ERROR_NO_PROMOTION_ACTIVE = DWORD(8222);
+ {$EXTERNALSYM ERROR_NO_PROMOTION_ACTIVE}
+
+// 8223 unused
+//
+// MessageId: ERROR_DS_OPERATIONS_ERROR
+//
+// MessageText:
+//
+// An operations error occurred.
+//
+ ERROR_DS_OPERATIONS_ERROR = DWORD(8224);
+ {$EXTERNALSYM ERROR_DS_OPERATIONS_ERROR}
+
+//
+// MessageId: ERROR_DS_PROTOCOL_ERROR
+//
+// MessageText:
+//
+// A protocol error occurred.
+//
+ ERROR_DS_PROTOCOL_ERROR = DWORD(8225);
+ {$EXTERNALSYM ERROR_DS_PROTOCOL_ERROR}
+
+//
+// MessageId: ERROR_DS_TIMELIMIT_EXCEEDED
+//
+// MessageText:
+//
+// The time limit for this request was exceeded.
+//
+ ERROR_DS_TIMELIMIT_EXCEEDED = DWORD(8226);
+ {$EXTERNALSYM ERROR_DS_TIMELIMIT_EXCEEDED}
+
+//
+// MessageId: ERROR_DS_SIZELIMIT_EXCEEDED
+//
+// MessageText:
+//
+// The size limit for this request was exceeded.
+//
+ ERROR_DS_SIZELIMIT_EXCEEDED = DWORD(8227);
+ {$EXTERNALSYM ERROR_DS_SIZELIMIT_EXCEEDED}
+
+//
+// MessageId: ERROR_DS_ADMIN_LIMIT_EXCEEDED
+//
+// MessageText:
+//
+// The administrative limit for this request was exceeded.
+//
+ ERROR_DS_ADMIN_LIMIT_EXCEEDED = DWORD(8228);
+ {$EXTERNALSYM ERROR_DS_ADMIN_LIMIT_EXCEEDED}
+
+//
+// MessageId: ERROR_DS_COMPARE_FALSE
+//
+// MessageText:
+//
+// The compare response was false.
+//
+ ERROR_DS_COMPARE_FALSE = DWORD(8229);
+ {$EXTERNALSYM ERROR_DS_COMPARE_FALSE}
+
+//
+// MessageId: ERROR_DS_COMPARE_TRUE
+//
+// MessageText:
+//
+// The compare response was true.
+//
+ ERROR_DS_COMPARE_TRUE = DWORD(8230);
+ {$EXTERNALSYM ERROR_DS_COMPARE_TRUE}
+
+//
+// MessageId: ERROR_DS_AUTH_METHOD_NOT_SUPPORTED
+//
+// MessageText:
+//
+// The requested authentication method is not supported by the server.
+//
+ ERROR_DS_AUTH_METHOD_NOT_SUPPORTED = DWORD(8231);
+ {$EXTERNALSYM ERROR_DS_AUTH_METHOD_NOT_SUPPORTED}
+
+//
+// MessageId: ERROR_DS_STRONG_AUTH_REQUIRED
+//
+// MessageText:
+//
+// A more secure authentication method is required for this server.
+//
+ ERROR_DS_STRONG_AUTH_REQUIRED = DWORD(8232);
+ {$EXTERNALSYM ERROR_DS_STRONG_AUTH_REQUIRED}
+
+//
+// MessageId: ERROR_DS_INAPPROPRIATE_AUTH
+//
+// MessageText:
+//
+// Inappropriate authentication.
+//
+ ERROR_DS_INAPPROPRIATE_AUTH = DWORD(8233);
+ {$EXTERNALSYM ERROR_DS_INAPPROPRIATE_AUTH}
+
+//
+// MessageId: ERROR_DS_AUTH_UNKNOWN
+//
+// MessageText:
+//
+// The authentication mechanism is unknown.
+//
+ ERROR_DS_AUTH_UNKNOWN = DWORD(8234);
+ {$EXTERNALSYM ERROR_DS_AUTH_UNKNOWN}
+
+//
+// MessageId: ERROR_DS_REFERRAL
+//
+// MessageText:
+//
+// A referral was returned from the server.
+//
+ ERROR_DS_REFERRAL = DWORD(8235);
+ {$EXTERNALSYM ERROR_DS_REFERRAL}
+
+//
+// MessageId: ERROR_DS_UNAVAILABLE_CRIT_EXTENSION
+//
+// MessageText:
+//
+// The server does not support the requested critical extension.
+//
+ ERROR_DS_UNAVAILABLE_CRIT_EXTENSION = DWORD(8236);
+ {$EXTERNALSYM ERROR_DS_UNAVAILABLE_CRIT_EXTENSION}
+
+//
+// MessageId: ERROR_DS_CONFIDENTIALITY_REQUIRED
+//
+// MessageText:
+//
+// This request requires a secure connection.
+//
+ ERROR_DS_CONFIDENTIALITY_REQUIRED = DWORD(8237);
+ {$EXTERNALSYM ERROR_DS_CONFIDENTIALITY_REQUIRED}
+
+//
+// MessageId: ERROR_DS_INAPPROPRIATE_MATCHING
+//
+// MessageText:
+//
+// Inappropriate matching.
+//
+ ERROR_DS_INAPPROPRIATE_MATCHING = DWORD(8238);
+ {$EXTERNALSYM ERROR_DS_INAPPROPRIATE_MATCHING}
+
+//
+// MessageId: ERROR_DS_CONSTRAINT_VIOLATION
+//
+// MessageText:
+//
+// A constraint violation occurred.
+//
+ ERROR_DS_CONSTRAINT_VIOLATION = DWORD(8239);
+ {$EXTERNALSYM ERROR_DS_CONSTRAINT_VIOLATION}
+
+//
+// MessageId: ERROR_DS_NO_SUCH_OBJECT
+//
+// MessageText:
+//
+// There is no such object on the server.
+//
+ ERROR_DS_NO_SUCH_OBJECT = DWORD(8240);
+ {$EXTERNALSYM ERROR_DS_NO_SUCH_OBJECT}
+
+//
+// MessageId: ERROR_DS_ALIAS_PROBLEM
+//
+// MessageText:
+//
+// There is an alias problem.
+//
+ ERROR_DS_ALIAS_PROBLEM = DWORD(8241);
+ {$EXTERNALSYM ERROR_DS_ALIAS_PROBLEM}
+
+//
+// MessageId: ERROR_DS_INVALID_DN_SYNTAX
+//
+// MessageText:
+//
+// An invalid dn syntax has been specified.
+//
+ ERROR_DS_INVALID_DN_SYNTAX = DWORD(8242);
+ {$EXTERNALSYM ERROR_DS_INVALID_DN_SYNTAX}
+
+//
+// MessageId: ERROR_DS_IS_LEAF
+//
+// MessageText:
+//
+// The object is a leaf object.
+//
+ ERROR_DS_IS_LEAF = DWORD(8243);
+ {$EXTERNALSYM ERROR_DS_IS_LEAF}
+
+//
+// MessageId: ERROR_DS_ALIAS_DEREF_PROBLEM
+//
+// MessageText:
+//
+// There is an alias dereferencing problem.
+//
+ ERROR_DS_ALIAS_DEREF_PROBLEM = DWORD(8244);
+ {$EXTERNALSYM ERROR_DS_ALIAS_DEREF_PROBLEM}
+
+//
+// MessageId: ERROR_DS_UNWILLING_TO_PERFORM
+//
+// MessageText:
+//
+// The server is unwilling to process the request.
+//
+ ERROR_DS_UNWILLING_TO_PERFORM = DWORD(8245);
+ {$EXTERNALSYM ERROR_DS_UNWILLING_TO_PERFORM}
+
+//
+// MessageId: ERROR_DS_LOOP_DETECT
+//
+// MessageText:
+//
+// A loop has been detected.
+//
+ ERROR_DS_LOOP_DETECT = DWORD(8246);
+ {$EXTERNALSYM ERROR_DS_LOOP_DETECT}
+
+//
+// MessageId: ERROR_DS_NAMING_VIOLATION
+//
+// MessageText:
+//
+// There is a naming violation.
+//
+ ERROR_DS_NAMING_VIOLATION = DWORD(8247);
+ {$EXTERNALSYM ERROR_DS_NAMING_VIOLATION}
+
+//
+// MessageId: ERROR_DS_OBJECT_RESULTS_TOO_LARGE
+//
+// MessageText:
+//
+// The result set is too large.
+//
+ ERROR_DS_OBJECT_RESULTS_TOO_LARGE = DWORD(8248);
+ {$EXTERNALSYM ERROR_DS_OBJECT_RESULTS_TOO_LARGE}
+
+//
+// MessageId: ERROR_DS_AFFECTS_MULTIPLE_DSAS
+//
+// MessageText:
+//
+// The operation affects multiple DSAs
+//
+ ERROR_DS_AFFECTS_MULTIPLE_DSAS = DWORD(8249);
+ {$EXTERNALSYM ERROR_DS_AFFECTS_MULTIPLE_DSAS}
+
+//
+// MessageId: ERROR_DS_SERVER_DOWN
+//
+// MessageText:
+//
+// The server is not operational.
+//
+ ERROR_DS_SERVER_DOWN = DWORD(8250);
+ {$EXTERNALSYM ERROR_DS_SERVER_DOWN}
+
+//
+// MessageId: ERROR_DS_LOCAL_ERROR
+//
+// MessageText:
+//
+// A local error has occurred.
+//
+ ERROR_DS_LOCAL_ERROR = DWORD(8251);
+ {$EXTERNALSYM ERROR_DS_LOCAL_ERROR}
+
+//
+// MessageId: ERROR_DS_ENCODING_ERROR
+//
+// MessageText:
+//
+// An encoding error has occurred.
+//
+ ERROR_DS_ENCODING_ERROR = DWORD(8252);
+ {$EXTERNALSYM ERROR_DS_ENCODING_ERROR}
+
+//
+// MessageId: ERROR_DS_DECODING_ERROR
+//
+// MessageText:
+//
+// A decoding error has occurred.
+//
+ ERROR_DS_DECODING_ERROR = DWORD(8253);
+ {$EXTERNALSYM ERROR_DS_DECODING_ERROR}
+
+//
+// MessageId: ERROR_DS_FILTER_UNKNOWN
+//
+// MessageText:
+//
+// The search filter cannot be recognized.
+//
+ ERROR_DS_FILTER_UNKNOWN = DWORD(8254);
+ {$EXTERNALSYM ERROR_DS_FILTER_UNKNOWN}
+
+//
+// MessageId: ERROR_DS_PARAM_ERROR
+//
+// MessageText:
+//
+// One or more parameters are illegal.
+//
+ ERROR_DS_PARAM_ERROR = DWORD(8255);
+ {$EXTERNALSYM ERROR_DS_PARAM_ERROR}
+
+//
+// MessageId: ERROR_DS_NOT_SUPPORTED
+//
+// MessageText:
+//
+// The specified method is not supported.
+//
+ ERROR_DS_NOT_SUPPORTED = DWORD(8256);
+ {$EXTERNALSYM ERROR_DS_NOT_SUPPORTED}
+
+//
+// MessageId: ERROR_DS_NO_RESULTS_RETURNED
+//
+// MessageText:
+//
+// No results were returned.
+//
+ ERROR_DS_NO_RESULTS_RETURNED = DWORD(8257);
+ {$EXTERNALSYM ERROR_DS_NO_RESULTS_RETURNED}
+
+//
+// MessageId: ERROR_DS_CONTROL_NOT_FOUND
+//
+// MessageText:
+//
+// The specified control is not supported by the server.
+//
+ ERROR_DS_CONTROL_NOT_FOUND = DWORD(8258);
+ {$EXTERNALSYM ERROR_DS_CONTROL_NOT_FOUND}
+
+//
+// MessageId: ERROR_DS_CLIENT_LOOP
+//
+// MessageText:
+//
+// A referral loop was detected by the client.
+//
+ ERROR_DS_CLIENT_LOOP = DWORD(8259);
+ {$EXTERNALSYM ERROR_DS_CLIENT_LOOP}
+
+//
+// MessageId: ERROR_DS_REFERRAL_LIMIT_EXCEEDED
+//
+// MessageText:
+//
+// The preset referral limit was exceeded.
+//
+ ERROR_DS_REFERRAL_LIMIT_EXCEEDED = DWORD(8260);
+ {$EXTERNALSYM ERROR_DS_REFERRAL_LIMIT_EXCEEDED}
+
+//
+// MessageId: ERROR_DS_SORT_CONTROL_MISSING
+//
+// MessageText:
+//
+// The search requires a SORT control.
+//
+ ERROR_DS_SORT_CONTROL_MISSING = DWORD(8261);
+ {$EXTERNALSYM ERROR_DS_SORT_CONTROL_MISSING}
+
+//
+// MessageId: ERROR_DS_OFFSET_RANGE_ERROR
+//
+// MessageText:
+//
+// The search results exceed the offset range specified.
+//
+ ERROR_DS_OFFSET_RANGE_ERROR = DWORD(8262);
+ {$EXTERNALSYM ERROR_DS_OFFSET_RANGE_ERROR}
+
+//
+// MessageId: ERROR_DS_ROOT_MUST_BE_NC
+//
+// MessageText:
+//
+// The root object must be the head of a naming context. The root object cannot have an instantiated parent.
+//
+ ERROR_DS_ROOT_MUST_BE_NC = DWORD(8301);
+ {$EXTERNALSYM ERROR_DS_ROOT_MUST_BE_NC}
+
+//
+// MessageId: ERROR_DS_ADD_REPLICA_INHIBITED
+//
+// MessageText:
+//
+// The add replica operation cannot be performed. The naming context must be writeable in order to create the replica.
+//
+ ERROR_DS_ADD_REPLICA_INHIBITED = DWORD(8302);
+ {$EXTERNALSYM ERROR_DS_ADD_REPLICA_INHIBITED}
+
+//
+// MessageId: ERROR_DS_ATT_NOT_DEF_IN_SCHEMA
+//
+// MessageText:
+//
+// A reference to an attribute that is not defined in the schema occurred.
+//
+ ERROR_DS_ATT_NOT_DEF_IN_SCHEMA = DWORD(8303);
+ {$EXTERNALSYM ERROR_DS_ATT_NOT_DEF_IN_SCHEMA}
+
+//
+// MessageId: ERROR_DS_MAX_OBJ_SIZE_EXCEEDED
+//
+// MessageText:
+//
+// The maximum size of an object has been exceeded.
+//
+ ERROR_DS_MAX_OBJ_SIZE_EXCEEDED = DWORD(8304);
+ {$EXTERNALSYM ERROR_DS_MAX_OBJ_SIZE_EXCEEDED}
+
+//
+// MessageId: ERROR_DS_OBJ_STRING_NAME_EXISTS
+//
+// MessageText:
+//
+// An attempt was made to add an object to the directory with a name that is already in use.
+//
+ ERROR_DS_OBJ_STRING_NAME_EXISTS = DWORD(8305);
+ {$EXTERNALSYM ERROR_DS_OBJ_STRING_NAME_EXISTS}
+
+//
+// MessageId: ERROR_DS_NO_RDN_DEFINED_IN_SCHEMA
+//
+// MessageText:
+//
+// An attempt was made to add an object of a class that does not have an RDN defined in the schema.
+//
+ ERROR_DS_NO_RDN_DEFINED_IN_SCHEMA = DWORD(8306);
+ {$EXTERNALSYM ERROR_DS_NO_RDN_DEFINED_IN_SCHEMA}
+
+//
+// MessageId: ERROR_DS_RDN_DOESNT_MATCH_SCHEMA
+//
+// MessageText:
+//
+// An attempt was made to add an object using an RDN that is not the RDN defined in the schema.
+//
+ ERROR_DS_RDN_DOESNT_MATCH_SCHEMA = DWORD(8307);
+ {$EXTERNALSYM ERROR_DS_RDN_DOESNT_MATCH_SCHEMA}
+
+//
+// MessageId: ERROR_DS_NO_REQUESTED_ATTS_FOUND
+//
+// MessageText:
+//
+// None of the requested attributes were found on the objects.
+//
+ ERROR_DS_NO_REQUESTED_ATTS_FOUND = DWORD(8308);
+ {$EXTERNALSYM ERROR_DS_NO_REQUESTED_ATTS_FOUND}
+
+//
+// MessageId: ERROR_DS_USER_BUFFER_TO_SMALL
+//
+// MessageText:
+//
+// The user buffer is too small.
+//
+ ERROR_DS_USER_BUFFER_TO_SMALL = DWORD(8309);
+ {$EXTERNALSYM ERROR_DS_USER_BUFFER_TO_SMALL}
+
+//
+// MessageId: ERROR_DS_ATT_IS_NOT_ON_OBJ
+//
+// MessageText:
+//
+// The attribute specified in the operation is not present on the object.
+//
+ ERROR_DS_ATT_IS_NOT_ON_OBJ = DWORD(8310);
+ {$EXTERNALSYM ERROR_DS_ATT_IS_NOT_ON_OBJ}
+
+//
+// MessageId: ERROR_DS_ILLEGAL_MOD_OPERATION
+//
+// MessageText:
+//
+// Illegal modify operation. Some aspect of the modification is not permitted.
+//
+ ERROR_DS_ILLEGAL_MOD_OPERATION = DWORD(8311);
+ {$EXTERNALSYM ERROR_DS_ILLEGAL_MOD_OPERATION}
+
+//
+// MessageId: ERROR_DS_OBJ_TOO_LARGE
+//
+// MessageText:
+//
+// The specified object is too large.
+//
+ ERROR_DS_OBJ_TOO_LARGE = DWORD(8312);
+ {$EXTERNALSYM ERROR_DS_OBJ_TOO_LARGE}
+
+//
+// MessageId: ERROR_DS_BAD_INSTANCE_TYPE
+//
+// MessageText:
+//
+// The specified instance type is not valid.
+//
+ ERROR_DS_BAD_INSTANCE_TYPE = DWORD(8313);
+ {$EXTERNALSYM ERROR_DS_BAD_INSTANCE_TYPE}
+
+//
+// MessageId: ERROR_DS_MASTERDSA_REQUIRED
+//
+// MessageText:
+//
+// The operation must be performed at a master DSA.
+//
+ ERROR_DS_MASTERDSA_REQUIRED = DWORD(8314);
+ {$EXTERNALSYM ERROR_DS_MASTERDSA_REQUIRED}
+
+//
+// MessageId: ERROR_DS_OBJECT_CLASS_REQUIRED
+//
+// MessageText:
+//
+// The object class attribute must be specified.
+//
+ ERROR_DS_OBJECT_CLASS_REQUIRED = DWORD(8315);
+ {$EXTERNALSYM ERROR_DS_OBJECT_CLASS_REQUIRED}
+
+//
+// MessageId: ERROR_DS_MISSING_REQUIRED_ATT
+//
+// MessageText:
+//
+// A required attribute is missing.
+//
+ ERROR_DS_MISSING_REQUIRED_ATT = DWORD(8316);
+ {$EXTERNALSYM ERROR_DS_MISSING_REQUIRED_ATT}
+
+//
+// MessageId: ERROR_DS_ATT_NOT_DEF_FOR_CLASS
+//
+// MessageText:
+//
+// An attempt was made to modify an object to include an attribute that is not legal for its class.
+//
+ ERROR_DS_ATT_NOT_DEF_FOR_CLASS = DWORD(8317);
+ {$EXTERNALSYM ERROR_DS_ATT_NOT_DEF_FOR_CLASS}
+
+//
+// MessageId: ERROR_DS_ATT_ALREADY_EXISTS
+//
+// MessageText:
+//
+// The specified attribute is already present on the object.
+//
+ ERROR_DS_ATT_ALREADY_EXISTS = DWORD(8318);
+ {$EXTERNALSYM ERROR_DS_ATT_ALREADY_EXISTS}
+
+// 8319 unused
+//
+// MessageId: ERROR_DS_CANT_ADD_ATT_VALUES
+//
+// MessageText:
+//
+// The specified attribute is not present, or has no values.
+//
+ ERROR_DS_CANT_ADD_ATT_VALUES = DWORD(8320);
+ {$EXTERNALSYM ERROR_DS_CANT_ADD_ATT_VALUES}
+
+//
+// MessageId: ERROR_DS_SINGLE_VALUE_CONSTRAINT
+//
+// MessageText:
+//
+// Multiple values were specified for an attribute that can have only one value.
+//
+ ERROR_DS_SINGLE_VALUE_CONSTRAINT = DWORD(8321);
+ {$EXTERNALSYM ERROR_DS_SINGLE_VALUE_CONSTRAINT}
+
+//
+// MessageId: ERROR_DS_RANGE_CONSTRAINT
+//
+// MessageText:
+//
+// A value for the attribute was not in the acceptable range of values.
+//
+ ERROR_DS_RANGE_CONSTRAINT = DWORD(8322);
+ {$EXTERNALSYM ERROR_DS_RANGE_CONSTRAINT}
+
+//
+// MessageId: ERROR_DS_ATT_VAL_ALREADY_EXISTS
+//
+// MessageText:
+//
+// The specified value already exists.
+//
+ ERROR_DS_ATT_VAL_ALREADY_EXISTS = DWORD(8323);
+ {$EXTERNALSYM ERROR_DS_ATT_VAL_ALREADY_EXISTS}
+
+//
+// MessageId: ERROR_DS_CANT_REM_MISSING_ATT
+//
+// MessageText:
+//
+// The attribute cannot be removed because it is not present on the object.
+//
+ ERROR_DS_CANT_REM_MISSING_ATT = DWORD(8324);
+ {$EXTERNALSYM ERROR_DS_CANT_REM_MISSING_ATT}
+
+//
+// MessageId: ERROR_DS_CANT_REM_MISSING_ATT_VAL
+//
+// MessageText:
+//
+// The attribute value cannot be removed because it is not present on the object.
+//
+ ERROR_DS_CANT_REM_MISSING_ATT_VAL = DWORD(8325);
+ {$EXTERNALSYM ERROR_DS_CANT_REM_MISSING_ATT_VAL}
+
+//
+// MessageId: ERROR_DS_ROOT_CANT_BE_SUBREF
+//
+// MessageText:
+//
+// The specified root object cannot be a subref.
+//
+ ERROR_DS_ROOT_CANT_BE_SUBREF = DWORD(8326);
+ {$EXTERNALSYM ERROR_DS_ROOT_CANT_BE_SUBREF}
+
+//
+// MessageId: ERROR_DS_NO_CHAINING
+//
+// MessageText:
+//
+// Chaining is not permitted.
+//
+ ERROR_DS_NO_CHAINING = DWORD(8327);
+ {$EXTERNALSYM ERROR_DS_NO_CHAINING}
+
+//
+// MessageId: ERROR_DS_NO_CHAINED_EVAL
+//
+// MessageText:
+//
+// Chained evaluation is not permitted.
+//
+ ERROR_DS_NO_CHAINED_EVAL = DWORD(8328);
+ {$EXTERNALSYM ERROR_DS_NO_CHAINED_EVAL}
+
+//
+// MessageId: ERROR_DS_NO_PARENT_OBJECT
+//
+// MessageText:
+//
+// The operation could not be performed because the object's parent is either uninstantiated or deleted.
+//
+ ERROR_DS_NO_PARENT_OBJECT = DWORD(8329);
+ {$EXTERNALSYM ERROR_DS_NO_PARENT_OBJECT}
+
+//
+// MessageId: ERROR_DS_PARENT_IS_AN_ALIAS
+//
+// MessageText:
+//
+// Having a parent that is an alias is not permitted. Aliases are leaf objects.
+//
+ ERROR_DS_PARENT_IS_AN_ALIAS = DWORD(8330);
+ {$EXTERNALSYM ERROR_DS_PARENT_IS_AN_ALIAS}
+
+//
+// MessageId: ERROR_DS_CANT_MIX_MASTER_AND_REPS
+//
+// MessageText:
+//
+// The object and parent must be of the same type, either both masters or both replicas.
+//
+ ERROR_DS_CANT_MIX_MASTER_AND_REPS = DWORD(8331);
+ {$EXTERNALSYM ERROR_DS_CANT_MIX_MASTER_AND_REPS}
+
+//
+// MessageId: ERROR_DS_CHILDREN_EXIST
+//
+// MessageText:
+//
+// The operation cannot be performed because child objects exist. This operation can only be performed on a leaf object.
+//
+ ERROR_DS_CHILDREN_EXIST = DWORD(8332);
+ {$EXTERNALSYM ERROR_DS_CHILDREN_EXIST}
+
+//
+// MessageId: ERROR_DS_OBJ_NOT_FOUND
+//
+// MessageText:
+//
+// Directory object not found.
+//
+ ERROR_DS_OBJ_NOT_FOUND = DWORD(8333);
+ {$EXTERNALSYM ERROR_DS_OBJ_NOT_FOUND}
+
+//
+// MessageId: ERROR_DS_ALIASED_OBJ_MISSING
+//
+// MessageText:
+//
+// The aliased object is missing.
+//
+ ERROR_DS_ALIASED_OBJ_MISSING = DWORD(8334);
+ {$EXTERNALSYM ERROR_DS_ALIASED_OBJ_MISSING}
+
+//
+// MessageId: ERROR_DS_BAD_NAME_SYNTAX
+//
+// MessageText:
+//
+// The object name has bad syntax.
+//
+ ERROR_DS_BAD_NAME_SYNTAX = DWORD(8335);
+ {$EXTERNALSYM ERROR_DS_BAD_NAME_SYNTAX}
+
+//
+// MessageId: ERROR_DS_ALIAS_POINTS_TO_ALIAS
+//
+// MessageText:
+//
+// It is not permitted for an alias to refer to another alias.
+//
+ ERROR_DS_ALIAS_POINTS_TO_ALIAS = DWORD(8336);
+ {$EXTERNALSYM ERROR_DS_ALIAS_POINTS_TO_ALIAS}
+
+//
+// MessageId: ERROR_DS_CANT_DEREF_ALIAS
+//
+// MessageText:
+//
+// The alias cannot be dereferenced.
+//
+ ERROR_DS_CANT_DEREF_ALIAS = DWORD(8337);
+ {$EXTERNALSYM ERROR_DS_CANT_DEREF_ALIAS}
+
+//
+// MessageId: ERROR_DS_OUT_OF_SCOPE
+//
+// MessageText:
+//
+// The operation is out of scope.
+//
+ ERROR_DS_OUT_OF_SCOPE = DWORD(8338);
+ {$EXTERNALSYM ERROR_DS_OUT_OF_SCOPE}
+
+//
+// MessageId: ERROR_DS_OBJECT_BEING_REMOVED
+//
+// MessageText:
+//
+// The operation cannot continue because the object is in the process of being removed.
+//
+ ERROR_DS_OBJECT_BEING_REMOVED = DWORD(8339);
+ {$EXTERNALSYM ERROR_DS_OBJECT_BEING_REMOVED}
+
+//
+// MessageId: ERROR_DS_CANT_DELETE_DSA_OBJ
+//
+// MessageText:
+//
+// The DSA object cannot be deleted.
+//
+ ERROR_DS_CANT_DELETE_DSA_OBJ = DWORD(8340);
+ {$EXTERNALSYM ERROR_DS_CANT_DELETE_DSA_OBJ}
+
+//
+// MessageId: ERROR_DS_GENERIC_ERROR
+//
+// MessageText:
+//
+// A directory service error has occurred.
+//
+ ERROR_DS_GENERIC_ERROR = DWORD(8341);
+ {$EXTERNALSYM ERROR_DS_GENERIC_ERROR}
+
+//
+// MessageId: ERROR_DS_DSA_MUST_BE_INT_MASTER
+//
+// MessageText:
+//
+// The operation can only be performed on an internal master DSA object.
+//
+ ERROR_DS_DSA_MUST_BE_INT_MASTER = DWORD(8342);
+ {$EXTERNALSYM ERROR_DS_DSA_MUST_BE_INT_MASTER}
+
+//
+// MessageId: ERROR_DS_CLASS_NOT_DSA
+//
+// MessageText:
+//
+// The object must be of class DSA.
+//
+ ERROR_DS_CLASS_NOT_DSA = DWORD(8343);
+ {$EXTERNALSYM ERROR_DS_CLASS_NOT_DSA}
+
+//
+// MessageId: ERROR_DS_INSUFF_ACCESS_RIGHTS
+//
+// MessageText:
+//
+// Insufficient access rights to perform the operation.
+//
+ ERROR_DS_INSUFF_ACCESS_RIGHTS = DWORD(8344);
+ {$EXTERNALSYM ERROR_DS_INSUFF_ACCESS_RIGHTS}
+
+//
+// MessageId: ERROR_DS_ILLEGAL_SUPERIOR
+//
+// MessageText:
+//
+// The object cannot be added because the parent is not on the list of possible superiors.
+//
+ ERROR_DS_ILLEGAL_SUPERIOR = DWORD(8345);
+ {$EXTERNALSYM ERROR_DS_ILLEGAL_SUPERIOR}
+
+//
+// MessageId: ERROR_DS_ATTRIBUTE_OWNED_BY_SAM
+//
+// MessageText:
+//
+// Access to the attribute is not permitted because the attribute is owned by the Security Accounts Manager (SAM).
+//
+ ERROR_DS_ATTRIBUTE_OWNED_BY_SAM = DWORD(8346);
+ {$EXTERNALSYM ERROR_DS_ATTRIBUTE_OWNED_BY_SAM}
+
+//
+// MessageId: ERROR_DS_NAME_TOO_MANY_PARTS
+//
+// MessageText:
+//
+// The name has too many parts.
+//
+ ERROR_DS_NAME_TOO_MANY_PARTS = DWORD(8347);
+ {$EXTERNALSYM ERROR_DS_NAME_TOO_MANY_PARTS}
+
+//
+// MessageId: ERROR_DS_NAME_TOO_LONG
+//
+// MessageText:
+//
+// The name is too long.
+//
+ ERROR_DS_NAME_TOO_LONG = DWORD(8348);
+ {$EXTERNALSYM ERROR_DS_NAME_TOO_LONG}
+
+//
+// MessageId: ERROR_DS_NAME_VALUE_TOO_LONG
+//
+// MessageText:
+//
+// The name value is too long.
+//
+ ERROR_DS_NAME_VALUE_TOO_LONG = DWORD(8349);
+ {$EXTERNALSYM ERROR_DS_NAME_VALUE_TOO_LONG}
+
+//
+// MessageId: ERROR_DS_NAME_UNPARSEABLE
+//
+// MessageText:
+//
+// The directory service encountered an error parsing a name.
+//
+ ERROR_DS_NAME_UNPARSEABLE = DWORD(8350);
+ {$EXTERNALSYM ERROR_DS_NAME_UNPARSEABLE}
+
+//
+// MessageId: ERROR_DS_NAME_TYPE_UNKNOWN
+//
+// MessageText:
+//
+// The directory service cannot get the attribute type for a name.
+//
+ ERROR_DS_NAME_TYPE_UNKNOWN = DWORD(8351);
+ {$EXTERNALSYM ERROR_DS_NAME_TYPE_UNKNOWN}
+
+//
+// MessageId: ERROR_DS_NOT_AN_OBJECT
+//
+// MessageText:
+//
+// The name does not identify an object; the name identifies a phantom.
+//
+ ERROR_DS_NOT_AN_OBJECT = DWORD(8352);
+ {$EXTERNALSYM ERROR_DS_NOT_AN_OBJECT}
+
+//
+// MessageId: ERROR_DS_SEC_DESC_TOO_SHORT
+//
+// MessageText:
+//
+// The security descriptor is too short.
+//
+ ERROR_DS_SEC_DESC_TOO_SHORT = DWORD(8353);
+ {$EXTERNALSYM ERROR_DS_SEC_DESC_TOO_SHORT}
+
+//
+// MessageId: ERROR_DS_SEC_DESC_INVALID
+//
+// MessageText:
+//
+// The security descriptor is invalid.
+//
+ ERROR_DS_SEC_DESC_INVALID = DWORD(8354);
+ {$EXTERNALSYM ERROR_DS_SEC_DESC_INVALID}
+
+//
+// MessageId: ERROR_DS_NO_DELETED_NAME
+//
+// MessageText:
+//
+// Failed to create name for deleted object.
+//
+ ERROR_DS_NO_DELETED_NAME = DWORD(8355);
+ {$EXTERNALSYM ERROR_DS_NO_DELETED_NAME}
+
+//
+// MessageId: ERROR_DS_SUBREF_MUST_HAVE_PARENT
+//
+// MessageText:
+//
+// The parent of a new subref must exist.
+//
+ ERROR_DS_SUBREF_MUST_HAVE_PARENT = DWORD(8356);
+ {$EXTERNALSYM ERROR_DS_SUBREF_MUST_HAVE_PARENT}
+
+//
+// MessageId: ERROR_DS_NCNAME_MUST_BE_NC
+//
+// MessageText:
+//
+// The object must be a naming context.
+//
+ ERROR_DS_NCNAME_MUST_BE_NC = DWORD(8357);
+ {$EXTERNALSYM ERROR_DS_NCNAME_MUST_BE_NC}
+
+//
+// MessageId: ERROR_DS_CANT_ADD_SYSTEM_ONLY
+//
+// MessageText:
+//
+// It is not permitted to add an attribute which is owned by the system.
+//
+ ERROR_DS_CANT_ADD_SYSTEM_ONLY = DWORD(8358);
+ {$EXTERNALSYM ERROR_DS_CANT_ADD_SYSTEM_ONLY}
+
+//
+// MessageId: ERROR_DS_CLASS_MUST_BE_CONCRETE
+//
+// MessageText:
+//
+// The class of the object must be structural; you cannot instantiate an abstract class.
+//
+ ERROR_DS_CLASS_MUST_BE_CONCRETE = DWORD(8359);
+ {$EXTERNALSYM ERROR_DS_CLASS_MUST_BE_CONCRETE}
+
+//
+// MessageId: ERROR_DS_INVALID_DMD
+//
+// MessageText:
+//
+// The schema object could not be found.
+//
+ ERROR_DS_INVALID_DMD = DWORD(8360);
+ {$EXTERNALSYM ERROR_DS_INVALID_DMD}
+
+//
+// MessageId: ERROR_DS_OBJ_GUID_EXISTS
+//
+// MessageText:
+//
+// A local object with this GUID (dead or alive) already exists.
+//
+ ERROR_DS_OBJ_GUID_EXISTS = DWORD(8361);
+ {$EXTERNALSYM ERROR_DS_OBJ_GUID_EXISTS}
+
+//
+// MessageId: ERROR_DS_NOT_ON_BACKLINK
+//
+// MessageText:
+//
+// The operation cannot be performed on a back link.
+//
+ ERROR_DS_NOT_ON_BACKLINK = DWORD(8362);
+ {$EXTERNALSYM ERROR_DS_NOT_ON_BACKLINK}
+
+//
+// MessageId: ERROR_DS_NO_CROSSREF_FOR_NC
+//
+// MessageText:
+//
+// The cross reference for the specified naming context could not be found.
+//
+ ERROR_DS_NO_CROSSREF_FOR_NC = DWORD(8363);
+ {$EXTERNALSYM ERROR_DS_NO_CROSSREF_FOR_NC}
+
+//
+// MessageId: ERROR_DS_SHUTTING_DOWN
+//
+// MessageText:
+//
+// The operation could not be performed because the directory service is shutting down.
+//
+ ERROR_DS_SHUTTING_DOWN = DWORD(8364);
+ {$EXTERNALSYM ERROR_DS_SHUTTING_DOWN}
+
+//
+// MessageId: ERROR_DS_UNKNOWN_OPERATION
+//
+// MessageText:
+//
+// The directory service request is invalid.
+//
+ ERROR_DS_UNKNOWN_OPERATION = DWORD(8365);
+ {$EXTERNALSYM ERROR_DS_UNKNOWN_OPERATION}
+
+//
+// MessageId: ERROR_DS_INVALID_ROLE_OWNER
+//
+// MessageText:
+//
+// The role owner attribute could not be read.
+//
+ ERROR_DS_INVALID_ROLE_OWNER = DWORD(8366);
+ {$EXTERNALSYM ERROR_DS_INVALID_ROLE_OWNER}
+
+//
+// MessageId: ERROR_DS_COULDNT_CONTACT_FSMO
+//
+// MessageText:
+//
+// The requested FSMO operation failed. The current FSMO holder could not be contacted.
+//
+ ERROR_DS_COULDNT_CONTACT_FSMO = DWORD(8367);
+ {$EXTERNALSYM ERROR_DS_COULDNT_CONTACT_FSMO}
+
+//
+// MessageId: ERROR_DS_CROSS_NC_DN_RENAME
+//
+// MessageText:
+//
+// Modification of a DN across a naming context is not permitted.
+//
+ ERROR_DS_CROSS_NC_DN_RENAME = DWORD(8368);
+ {$EXTERNALSYM ERROR_DS_CROSS_NC_DN_RENAME}
+
+//
+// MessageId: ERROR_DS_CANT_MOD_SYSTEM_ONLY
+//
+// MessageText:
+//
+// The attribute cannot be modified because it is owned by the system.
+//
+ ERROR_DS_CANT_MOD_SYSTEM_ONLY = DWORD(8369);
+ {$EXTERNALSYM ERROR_DS_CANT_MOD_SYSTEM_ONLY}
+
+//
+// MessageId: ERROR_DS_REPLICATOR_ONLY
+//
+// MessageText:
+//
+// Only the replicator can perform this function.
+//
+ ERROR_DS_REPLICATOR_ONLY = DWORD(8370);
+ {$EXTERNALSYM ERROR_DS_REPLICATOR_ONLY}
+
+//
+// MessageId: ERROR_DS_OBJ_CLASS_NOT_DEFINED
+//
+// MessageText:
+//
+// The specified class is not defined.
+//
+ ERROR_DS_OBJ_CLASS_NOT_DEFINED = DWORD(8371);
+ {$EXTERNALSYM ERROR_DS_OBJ_CLASS_NOT_DEFINED}
+
+//
+// MessageId: ERROR_DS_OBJ_CLASS_NOT_SUBCLASS
+//
+// MessageText:
+//
+// The specified class is not a subclass.
+//
+ ERROR_DS_OBJ_CLASS_NOT_SUBCLASS = DWORD(8372);
+ {$EXTERNALSYM ERROR_DS_OBJ_CLASS_NOT_SUBCLASS}
+
+//
+// MessageId: ERROR_DS_NAME_REFERENCE_INVALID
+//
+// MessageText:
+//
+// The name reference is invalid.
+//
+ ERROR_DS_NAME_REFERENCE_INVALID = DWORD(8373);
+ {$EXTERNALSYM ERROR_DS_NAME_REFERENCE_INVALID}
+
+//
+// MessageId: ERROR_DS_CROSS_REF_EXISTS
+//
+// MessageText:
+//
+// A cross reference already exists.
+//
+ ERROR_DS_CROSS_REF_EXISTS = DWORD(8374);
+ {$EXTERNALSYM ERROR_DS_CROSS_REF_EXISTS}
+
+//
+// MessageId: ERROR_DS_CANT_DEL_MASTER_CROSSREF
+//
+// MessageText:
+//
+// It is not permitted to delete a master cross reference.
+//
+ ERROR_DS_CANT_DEL_MASTER_CROSSREF = DWORD(8375);
+ {$EXTERNALSYM ERROR_DS_CANT_DEL_MASTER_CROSSREF}
+
+//
+// MessageId: ERROR_DS_SUBTREE_NOTIFY_NOT_NC_HEAD
+//
+// MessageText:
+//
+// Subtree notifications are only supported on NC heads.
+//
+ ERROR_DS_SUBTREE_NOTIFY_NOT_NC_HEAD = DWORD(8376);
+ {$EXTERNALSYM ERROR_DS_SUBTREE_NOTIFY_NOT_NC_HEAD}
+
+//
+// MessageId: ERROR_DS_NOTIFY_FILTER_TOO_COMPLEX
+//
+// MessageText:
+//
+// Notification filter is too complex.
+//
+ ERROR_DS_NOTIFY_FILTER_TOO_COMPLEX = DWORD(8377);
+ {$EXTERNALSYM ERROR_DS_NOTIFY_FILTER_TOO_COMPLEX}
+
+//
+// MessageId: ERROR_DS_DUP_RDN
+//
+// MessageText:
+//
+// Schema update failed: duplicate RDN.
+//
+ ERROR_DS_DUP_RDN = DWORD(8378);
+ {$EXTERNALSYM ERROR_DS_DUP_RDN}
+
+//
+// MessageId: ERROR_DS_DUP_OID
+//
+// MessageText:
+//
+// Schema update failed: duplicate OID.
+//
+ ERROR_DS_DUP_OID = DWORD(8379);
+ {$EXTERNALSYM ERROR_DS_DUP_OID}
+
+//
+// MessageId: ERROR_DS_DUP_MAPI_ID
+//
+// MessageText:
+//
+// Schema update failed: duplicate MAPI identifier.
+//
+ ERROR_DS_DUP_MAPI_ID = DWORD(8380);
+ {$EXTERNALSYM ERROR_DS_DUP_MAPI_ID}
+
+//
+// MessageId: ERROR_DS_DUP_SCHEMA_ID_GUID
+//
+// MessageText:
+//
+// Schema update failed: duplicate schema-id GUID.
+//
+ ERROR_DS_DUP_SCHEMA_ID_GUID = DWORD(8381);
+ {$EXTERNALSYM ERROR_DS_DUP_SCHEMA_ID_GUID}
+
+//
+// MessageId: ERROR_DS_DUP_LDAP_DISPLAY_NAME
+//
+// MessageText:
+//
+// Schema update failed: duplicate LDAP display name.
+//
+ ERROR_DS_DUP_LDAP_DISPLAY_NAME = DWORD(8382);
+ {$EXTERNALSYM ERROR_DS_DUP_LDAP_DISPLAY_NAME}
+
+//
+// MessageId: ERROR_DS_SEMANTIC_ATT_TEST
+//
+// MessageText:
+//
+// Schema update failed: range-lower less than range upper.
+//
+ ERROR_DS_SEMANTIC_ATT_TEST = DWORD(8383);
+ {$EXTERNALSYM ERROR_DS_SEMANTIC_ATT_TEST}
+
+//
+// MessageId: ERROR_DS_SYNTAX_MISMATCH
+//
+// MessageText:
+//
+// Schema update failed: syntax mismatch.
+//
+ ERROR_DS_SYNTAX_MISMATCH = DWORD(8384);
+ {$EXTERNALSYM ERROR_DS_SYNTAX_MISMATCH}
+
+//
+// MessageId: ERROR_DS_EXISTS_IN_MUST_HAVE
+//
+// MessageText:
+//
+// Schema deletion failed: attribute is used in must-contain.
+//
+ ERROR_DS_EXISTS_IN_MUST_HAVE = DWORD(8385);
+ {$EXTERNALSYM ERROR_DS_EXISTS_IN_MUST_HAVE}
+
+//
+// MessageId: ERROR_DS_EXISTS_IN_MAY_HAVE
+//
+// MessageText:
+//
+// Schema deletion failed: attribute is used in may-contain.
+//
+ ERROR_DS_EXISTS_IN_MAY_HAVE = DWORD(8386);
+ {$EXTERNALSYM ERROR_DS_EXISTS_IN_MAY_HAVE}
+
+//
+// MessageId: ERROR_DS_NONEXISTENT_MAY_HAVE
+//
+// MessageText:
+//
+// Schema update failed: attribute in may-contain does not exist.
+//
+ ERROR_DS_NONEXISTENT_MAY_HAVE = DWORD(8387);
+ {$EXTERNALSYM ERROR_DS_NONEXISTENT_MAY_HAVE}
+
+//
+// MessageId: ERROR_DS_NONEXISTENT_MUST_HAVE
+//
+// MessageText:
+//
+// Schema update failed: attribute in must-contain does not exist.
+//
+ ERROR_DS_NONEXISTENT_MUST_HAVE = DWORD(8388);
+ {$EXTERNALSYM ERROR_DS_NONEXISTENT_MUST_HAVE}
+
+//
+// MessageId: ERROR_DS_AUX_CLS_TEST_FAIL
+//
+// MessageText:
+//
+// Schema update failed: class in aux-class list does not exist or is not an auxiliary class.
+//
+ ERROR_DS_AUX_CLS_TEST_FAIL = DWORD(8389);
+ {$EXTERNALSYM ERROR_DS_AUX_CLS_TEST_FAIL}
+
+//
+// MessageId: ERROR_DS_NONEXISTENT_POSS_SUP
+//
+// MessageText:
+//
+// Schema update failed: class in poss-superiors does not exist.
+//
+ ERROR_DS_NONEXISTENT_POSS_SUP = DWORD(8390);
+ {$EXTERNALSYM ERROR_DS_NONEXISTENT_POSS_SUP}
+
+//
+// MessageId: ERROR_DS_SUB_CLS_TEST_FAIL
+//
+// MessageText:
+//
+// Schema update failed: class in subclassof list does not exist or does not satisfy hierarchy rules.
+//
+ ERROR_DS_SUB_CLS_TEST_FAIL = DWORD(8391);
+ {$EXTERNALSYM ERROR_DS_SUB_CLS_TEST_FAIL}
+
+//
+// MessageId: ERROR_DS_BAD_RDN_ATT_ID_SYNTAX
+//
+// MessageText:
+//
+// Schema update failed: Rdn-Att-Id has wrong syntax.
+//
+ ERROR_DS_BAD_RDN_ATT_ID_SYNTAX = DWORD(8392);
+ {$EXTERNALSYM ERROR_DS_BAD_RDN_ATT_ID_SYNTAX}
+
+//
+// MessageId: ERROR_DS_EXISTS_IN_AUX_CLS
+//
+// MessageText:
+//
+// Schema deletion failed: class is used as auxiliary class.
+//
+ ERROR_DS_EXISTS_IN_AUX_CLS = DWORD(8393);
+ {$EXTERNALSYM ERROR_DS_EXISTS_IN_AUX_CLS}
+
+//
+// MessageId: ERROR_DS_EXISTS_IN_SUB_CLS
+//
+// MessageText:
+//
+// Schema deletion failed: class is used as sub class.
+//
+ ERROR_DS_EXISTS_IN_SUB_CLS = DWORD(8394);
+ {$EXTERNALSYM ERROR_DS_EXISTS_IN_SUB_CLS}
+
+//
+// MessageId: ERROR_DS_EXISTS_IN_POSS_SUP
+//
+// MessageText:
+//
+// Schema deletion failed: class is used as poss superior.
+//
+ ERROR_DS_EXISTS_IN_POSS_SUP = DWORD(8395);
+ {$EXTERNALSYM ERROR_DS_EXISTS_IN_POSS_SUP}
+
+//
+// MessageId: ERROR_DS_RECALCSCHEMA_FAILED
+//
+// MessageText:
+//
+// Schema update failed in recalculating validation cache.
+//
+ ERROR_DS_RECALCSCHEMA_FAILED = DWORD(8396);
+ {$EXTERNALSYM ERROR_DS_RECALCSCHEMA_FAILED}
+
+//
+// MessageId: ERROR_DS_TREE_DELETE_NOT_FINISHED
+//
+// MessageText:
+//
+// The tree deletion is not finished. The request must be made again to continue deleting the tree.
+//
+ ERROR_DS_TREE_DELETE_NOT_FINISHED = DWORD(8397);
+ {$EXTERNALSYM ERROR_DS_TREE_DELETE_NOT_FINISHED}
+
+//
+// MessageId: ERROR_DS_CANT_DELETE
+//
+// MessageText:
+//
+// The requested delete operation could not be performed.
+//
+ ERROR_DS_CANT_DELETE = DWORD(8398);
+ {$EXTERNALSYM ERROR_DS_CANT_DELETE}
+
+//
+// MessageId: ERROR_DS_ATT_SCHEMA_REQ_ID
+//
+// MessageText:
+//
+// Cannot read the governs class identifier for the schema record.
+//
+ ERROR_DS_ATT_SCHEMA_REQ_ID = DWORD(8399);
+ {$EXTERNALSYM ERROR_DS_ATT_SCHEMA_REQ_ID}
+
+//
+// MessageId: ERROR_DS_BAD_ATT_SCHEMA_SYNTAX
+//
+// MessageText:
+//
+// The attribute schema has bad syntax.
+//
+ ERROR_DS_BAD_ATT_SCHEMA_SYNTAX = DWORD(8400);
+ {$EXTERNALSYM ERROR_DS_BAD_ATT_SCHEMA_SYNTAX}
+
+//
+// MessageId: ERROR_DS_CANT_CACHE_ATT
+//
+// MessageText:
+//
+// The attribute could not be cached.
+//
+ ERROR_DS_CANT_CACHE_ATT = DWORD(8401);
+ {$EXTERNALSYM ERROR_DS_CANT_CACHE_ATT}
+
+//
+// MessageId: ERROR_DS_CANT_CACHE_CLASS
+//
+// MessageText:
+//
+// The class could not be cached.
+//
+ ERROR_DS_CANT_CACHE_CLASS = DWORD(8402);
+ {$EXTERNALSYM ERROR_DS_CANT_CACHE_CLASS}
+
+//
+// MessageId: ERROR_DS_CANT_REMOVE_ATT_CACHE
+//
+// MessageText:
+//
+// The attribute could not be removed from the cache.
+//
+ ERROR_DS_CANT_REMOVE_ATT_CACHE = DWORD(8403);
+ {$EXTERNALSYM ERROR_DS_CANT_REMOVE_ATT_CACHE}
+
+//
+// MessageId: ERROR_DS_CANT_REMOVE_CLASS_CACHE
+//
+// MessageText:
+//
+// The class could not be removed from the cache.
+//
+ ERROR_DS_CANT_REMOVE_CLASS_CACHE = DWORD(8404);
+ {$EXTERNALSYM ERROR_DS_CANT_REMOVE_CLASS_CACHE}
+
+//
+// MessageId: ERROR_DS_CANT_RETRIEVE_DN
+//
+// MessageText:
+//
+// The distinguished name attribute could not be read.
+//
+ ERROR_DS_CANT_RETRIEVE_DN = DWORD(8405);
+ {$EXTERNALSYM ERROR_DS_CANT_RETRIEVE_DN}
+
+//
+// MessageId: ERROR_DS_MISSING_SUPREF
+//
+// MessageText:
+//
+// No superior reference has been configured for the directory service. The directory service is therefore unable to issue referrals to objects outside this forest.
+//
+ ERROR_DS_MISSING_SUPREF = DWORD(8406);
+ {$EXTERNALSYM ERROR_DS_MISSING_SUPREF}
+
+//
+// MessageId: ERROR_DS_CANT_RETRIEVE_INSTANCE
+//
+// MessageText:
+//
+// The instance type attribute could not be retrieved.
+//
+ ERROR_DS_CANT_RETRIEVE_INSTANCE = DWORD(8407);
+ {$EXTERNALSYM ERROR_DS_CANT_RETRIEVE_INSTANCE}
+
+//
+// MessageId: ERROR_DS_CODE_INCONSISTENCY
+//
+// MessageText:
+//
+// An internal error has occurred.
+//
+ ERROR_DS_CODE_INCONSISTENCY = DWORD(8408);
+ {$EXTERNALSYM ERROR_DS_CODE_INCONSISTENCY}
+
+//
+// MessageId: ERROR_DS_DATABASE_ERROR
+//
+// MessageText:
+//
+// A database error has occurred.
+//
+ ERROR_DS_DATABASE_ERROR = DWORD(8409);
+ {$EXTERNALSYM ERROR_DS_DATABASE_ERROR}
+
+//
+// MessageId: ERROR_DS_GOVERNSID_MISSING
+//
+// MessageText:
+//
+// The attribute GOVERNSID is missing.
+//
+ ERROR_DS_GOVERNSID_MISSING = DWORD(8410);
+ {$EXTERNALSYM ERROR_DS_GOVERNSID_MISSING}
+
+//
+// MessageId: ERROR_DS_MISSING_EXPECTED_ATT
+//
+// MessageText:
+//
+// An expected attribute is missing.
+//
+ ERROR_DS_MISSING_EXPECTED_ATT = DWORD(8411);
+ {$EXTERNALSYM ERROR_DS_MISSING_EXPECTED_ATT}
+
+//
+// MessageId: ERROR_DS_NCNAME_MISSING_CR_REF
+//
+// MessageText:
+//
+// The specified naming context is missing a cross reference.
+//
+ ERROR_DS_NCNAME_MISSING_CR_REF = DWORD(8412);
+ {$EXTERNALSYM ERROR_DS_NCNAME_MISSING_CR_REF}
+
+//
+// MessageId: ERROR_DS_SECURITY_CHECKING_ERROR
+//
+// MessageText:
+//
+// A security checking error has occurred.
+//
+ ERROR_DS_SECURITY_CHECKING_ERROR = DWORD(8413);
+ {$EXTERNALSYM ERROR_DS_SECURITY_CHECKING_ERROR}
+
+//
+// MessageId: ERROR_DS_SCHEMA_NOT_LOADED
+//
+// MessageText:
+//
+// The schema is not loaded.
+//
+ ERROR_DS_SCHEMA_NOT_LOADED = DWORD(8414);
+ {$EXTERNALSYM ERROR_DS_SCHEMA_NOT_LOADED}
+
+//
+// MessageId: ERROR_DS_SCHEMA_ALLOC_FAILED
+//
+// MessageText:
+//
+// Schema allocation failed. Please check if the machine is running low on memory.
+//
+ ERROR_DS_SCHEMA_ALLOC_FAILED = DWORD(8415);
+ {$EXTERNALSYM ERROR_DS_SCHEMA_ALLOC_FAILED}
+
+//
+// MessageId: ERROR_DS_ATT_SCHEMA_REQ_SYNTAX
+//
+// MessageText:
+//
+// Failed to obtain the required syntax for the attribute schema.
+//
+ ERROR_DS_ATT_SCHEMA_REQ_SYNTAX = DWORD(8416);
+ {$EXTERNALSYM ERROR_DS_ATT_SCHEMA_REQ_SYNTAX}
+
+//
+// MessageId: ERROR_DS_GCVERIFY_ERROR
+//
+// MessageText:
+//
+// The global catalog verification failed. The global catalog is not available or does not support the operation. Some part of the directory is currently not available.
+//
+ ERROR_DS_GCVERIFY_ERROR = DWORD(8417);
+ {$EXTERNALSYM ERROR_DS_GCVERIFY_ERROR}
+
+//
+// MessageId: ERROR_DS_DRA_SCHEMA_MISMATCH
+//
+// MessageText:
+//
+// The replication operation failed because of a schema mismatch between the servers involved.
+//
+ ERROR_DS_DRA_SCHEMA_MISMATCH = DWORD(8418);
+ {$EXTERNALSYM ERROR_DS_DRA_SCHEMA_MISMATCH}
+
+//
+// MessageId: ERROR_DS_CANT_FIND_DSA_OBJ
+//
+// MessageText:
+//
+// The DSA object could not be found.
+//
+ ERROR_DS_CANT_FIND_DSA_OBJ = DWORD(8419);
+ {$EXTERNALSYM ERROR_DS_CANT_FIND_DSA_OBJ}
+
+//
+// MessageId: ERROR_DS_CANT_FIND_EXPECTED_NC
+//
+// MessageText:
+//
+// The naming context could not be found.
+//
+ ERROR_DS_CANT_FIND_EXPECTED_NC = DWORD(8420);
+ {$EXTERNALSYM ERROR_DS_CANT_FIND_EXPECTED_NC}
+
+//
+// MessageId: ERROR_DS_CANT_FIND_NC_IN_CACHE
+//
+// MessageText:
+//
+// The naming context could not be found in the cache.
+//
+ ERROR_DS_CANT_FIND_NC_IN_CACHE = DWORD(8421);
+ {$EXTERNALSYM ERROR_DS_CANT_FIND_NC_IN_CACHE}
+
+//
+// MessageId: ERROR_DS_CANT_RETRIEVE_CHILD
+//
+// MessageText:
+//
+// The child object could not be retrieved.
+//
+ ERROR_DS_CANT_RETRIEVE_CHILD = DWORD(8422);
+ {$EXTERNALSYM ERROR_DS_CANT_RETRIEVE_CHILD}
+
+//
+// MessageId: ERROR_DS_SECURITY_ILLEGAL_MODIFY
+//
+// MessageText:
+//
+// The modification was not permitted for security reasons.
+//
+ ERROR_DS_SECURITY_ILLEGAL_MODIFY = DWORD(8423);
+ {$EXTERNALSYM ERROR_DS_SECURITY_ILLEGAL_MODIFY}
+
+//
+// MessageId: ERROR_DS_CANT_REPLACE_HIDDEN_REC
+//
+// MessageText:
+//
+// The operation cannot replace the hidden record.
+//
+ ERROR_DS_CANT_REPLACE_HIDDEN_REC = DWORD(8424);
+ {$EXTERNALSYM ERROR_DS_CANT_REPLACE_HIDDEN_REC}
+
+//
+// MessageId: ERROR_DS_BAD_HIERARCHY_FILE
+//
+// MessageText:
+//
+// The hierarchy file is invalid.
+//
+ ERROR_DS_BAD_HIERARCHY_FILE = DWORD(8425);
+ {$EXTERNALSYM ERROR_DS_BAD_HIERARCHY_FILE}
+
+//
+// MessageId: ERROR_DS_BUILD_HIERARCHY_TABLE_FAILED
+//
+// MessageText:
+//
+// The attempt to build the hierarchy table failed.
+//
+ ERROR_DS_BUILD_HIERARCHY_TABLE_FAILED = DWORD(8426);
+ {$EXTERNALSYM ERROR_DS_BUILD_HIERARCHY_TABLE_FAILED}
+
+//
+// MessageId: ERROR_DS_CONFIG_PARAM_MISSING
+//
+// MessageText:
+//
+// The directory configuration parameter is missing from the registry.
+//
+ ERROR_DS_CONFIG_PARAM_MISSING = DWORD(8427);
+ {$EXTERNALSYM ERROR_DS_CONFIG_PARAM_MISSING}
+
+//
+// MessageId: ERROR_DS_COUNTING_AB_INDICES_FAILED
+//
+// MessageText:
+//
+// The attempt to count the address book indices failed.
+//
+ ERROR_DS_COUNTING_AB_INDICES_FAILED = DWORD(8428);
+ {$EXTERNALSYM ERROR_DS_COUNTING_AB_INDICES_FAILED}
+
+//
+// MessageId: ERROR_DS_HIERARCHY_TABLE_MALLOC_FAILED
+//
+// MessageText:
+//
+// The allocation of the hierarchy table failed.
+//
+ ERROR_DS_HIERARCHY_TABLE_MALLOC_FAILED = DWORD(8429);
+ {$EXTERNALSYM ERROR_DS_HIERARCHY_TABLE_MALLOC_FAILED}
+
+//
+// MessageId: ERROR_DS_INTERNAL_FAILURE
+//
+// MessageText:
+//
+// The directory service encountered an internal failure.
+//
+ ERROR_DS_INTERNAL_FAILURE = DWORD(8430);
+ {$EXTERNALSYM ERROR_DS_INTERNAL_FAILURE}
+
+//
+// MessageId: ERROR_DS_UNKNOWN_ERROR
+//
+// MessageText:
+//
+// The directory service encountered an unknown failure.
+//
+ ERROR_DS_UNKNOWN_ERROR = DWORD(8431);
+ {$EXTERNALSYM ERROR_DS_UNKNOWN_ERROR}
+
+//
+// MessageId: ERROR_DS_ROOT_REQUIRES_CLASS_TOP
+//
+// MessageText:
+//
+// A root object requires a class of 'top'.
+//
+ ERROR_DS_ROOT_REQUIRES_CLASS_TOP = DWORD(8432);
+ {$EXTERNALSYM ERROR_DS_ROOT_REQUIRES_CLASS_TOP}
+
+//
+// MessageId: ERROR_DS_REFUSING_FSMO_ROLES
+//
+// MessageText:
+//
+// This directory server is shutting down, and cannot take ownership of new floating single-master operation roles.
+//
+ ERROR_DS_REFUSING_FSMO_ROLES = DWORD(8433);
+ {$EXTERNALSYM ERROR_DS_REFUSING_FSMO_ROLES}
+
+//
+// MessageId: ERROR_DS_MISSING_FSMO_SETTINGS
+//
+// MessageText:
+//
+// The directory service is missing mandatory configuration information, and is unable to determine the ownership of floating single-master operation roles.
+//
+ ERROR_DS_MISSING_FSMO_SETTINGS = DWORD(8434);
+ {$EXTERNALSYM ERROR_DS_MISSING_FSMO_SETTINGS}
+
+//
+// MessageId: ERROR_DS_UNABLE_TO_SURRENDER_ROLES
+//
+// MessageText:
+//
+// The directory service was unable to transfer ownership of one or more floating single-master operation roles to other servers.
+//
+ ERROR_DS_UNABLE_TO_SURRENDER_ROLES = DWORD(8435);
+ {$EXTERNALSYM ERROR_DS_UNABLE_TO_SURRENDER_ROLES}
+
+//
+// MessageId: ERROR_DS_DRA_GENERIC
+//
+// MessageText:
+//
+// The replication operation failed.
+//
+ ERROR_DS_DRA_GENERIC = DWORD(8436);
+ {$EXTERNALSYM ERROR_DS_DRA_GENERIC}
+
+//
+// MessageId: ERROR_DS_DRA_INVALID_PARAMETER
+//
+// MessageText:
+//
+// An invalid parameter was specified for this replication operation.
+//
+ ERROR_DS_DRA_INVALID_PARAMETER = DWORD(8437);
+ {$EXTERNALSYM ERROR_DS_DRA_INVALID_PARAMETER}
+
+//
+// MessageId: ERROR_DS_DRA_BUSY
+//
+// MessageText:
+//
+// The directory service is too busy to complete the replication operation at this time.
+//
+ ERROR_DS_DRA_BUSY = DWORD(8438);
+ {$EXTERNALSYM ERROR_DS_DRA_BUSY}
+
+//
+// MessageId: ERROR_DS_DRA_BAD_DN
+//
+// MessageText:
+//
+// The distinguished name specified for this replication operation is invalid.
+//
+ ERROR_DS_DRA_BAD_DN = DWORD(8439);
+ {$EXTERNALSYM ERROR_DS_DRA_BAD_DN}
+
+//
+// MessageId: ERROR_DS_DRA_BAD_NC
+//
+// MessageText:
+//
+// The naming context specified for this replication operation is invalid.
+//
+ ERROR_DS_DRA_BAD_NC = DWORD(8440);
+ {$EXTERNALSYM ERROR_DS_DRA_BAD_NC}
+
+//
+// MessageId: ERROR_DS_DRA_DN_EXISTS
+//
+// MessageText:
+//
+// The distinguished name specified for this replication operation already exists.
+//
+ ERROR_DS_DRA_DN_EXISTS = DWORD(8441);
+ {$EXTERNALSYM ERROR_DS_DRA_DN_EXISTS}
+
+//
+// MessageId: ERROR_DS_DRA_INTERNAL_ERROR
+//
+// MessageText:
+//
+// The replication system encountered an internal error.
+//
+ ERROR_DS_DRA_INTERNAL_ERROR = DWORD(8442);
+ {$EXTERNALSYM ERROR_DS_DRA_INTERNAL_ERROR}
+
+//
+// MessageId: ERROR_DS_DRA_INCONSISTENT_DIT
+//
+// MessageText:
+//
+// The replication operation encountered a database inconsistency.
+//
+ ERROR_DS_DRA_INCONSISTENT_DIT = DWORD(8443);
+ {$EXTERNALSYM ERROR_DS_DRA_INCONSISTENT_DIT}
+
+//
+// MessageId: ERROR_DS_DRA_CONNECTION_FAILED
+//
+// MessageText:
+//
+// The server specified for this replication operation could not be contacted.
+//
+ ERROR_DS_DRA_CONNECTION_FAILED = DWORD(8444);
+ {$EXTERNALSYM ERROR_DS_DRA_CONNECTION_FAILED}
+
+//
+// MessageId: ERROR_DS_DRA_BAD_INSTANCE_TYPE
+//
+// MessageText:
+//
+// The replication operation encountered an object with an invalid instance type.
+//
+ ERROR_DS_DRA_BAD_INSTANCE_TYPE = DWORD(8445);
+ {$EXTERNALSYM ERROR_DS_DRA_BAD_INSTANCE_TYPE}
+
+//
+// MessageId: ERROR_DS_DRA_OUT_OF_MEM
+//
+// MessageText:
+//
+// The replication operation failed to allocate memory.
+//
+ ERROR_DS_DRA_OUT_OF_MEM = DWORD(8446);
+ {$EXTERNALSYM ERROR_DS_DRA_OUT_OF_MEM}
+
+//
+// MessageId: ERROR_DS_DRA_MAIL_PROBLEM
+//
+// MessageText:
+//
+// The replication operation encountered an error with the mail system.
+//
+ ERROR_DS_DRA_MAIL_PROBLEM = DWORD(8447);
+ {$EXTERNALSYM ERROR_DS_DRA_MAIL_PROBLEM}
+
+//
+// MessageId: ERROR_DS_DRA_REF_ALREADY_EXISTS
+//
+// MessageText:
+//
+// The replication reference information for the target server already exists.
+//
+ ERROR_DS_DRA_REF_ALREADY_EXISTS = DWORD(8448);
+ {$EXTERNALSYM ERROR_DS_DRA_REF_ALREADY_EXISTS}
+
+//
+// MessageId: ERROR_DS_DRA_REF_NOT_FOUND
+//
+// MessageText:
+//
+// The replication reference information for the target server does not exist.
+//
+ ERROR_DS_DRA_REF_NOT_FOUND = DWORD(8449);
+ {$EXTERNALSYM ERROR_DS_DRA_REF_NOT_FOUND}
+
+//
+// MessageId: ERROR_DS_DRA_OBJ_IS_REP_SOURCE
+//
+// MessageText:
+//
+// The naming context cannot be removed because it is replicated to another server.
+//
+ ERROR_DS_DRA_OBJ_IS_REP_SOURCE = DWORD(8450);
+ {$EXTERNALSYM ERROR_DS_DRA_OBJ_IS_REP_SOURCE}
+
+//
+// MessageId: ERROR_DS_DRA_DB_ERROR
+//
+// MessageText:
+//
+// The replication operation encountered a database error.
+//
+ ERROR_DS_DRA_DB_ERROR = DWORD(8451);
+ {$EXTERNALSYM ERROR_DS_DRA_DB_ERROR}
+
+//
+// MessageId: ERROR_DS_DRA_NO_REPLICA
+//
+// MessageText:
+//
+// The naming context is in the process of being removed or is not replicated from the specified server.
+//
+ ERROR_DS_DRA_NO_REPLICA = DWORD(8452);
+ {$EXTERNALSYM ERROR_DS_DRA_NO_REPLICA}
+
+//
+// MessageId: ERROR_DS_DRA_ACCESS_DENIED
+//
+// MessageText:
+//
+// Replication access was denied.
+//
+ ERROR_DS_DRA_ACCESS_DENIED = DWORD(8453);
+ {$EXTERNALSYM ERROR_DS_DRA_ACCESS_DENIED}
+
+//
+// MessageId: ERROR_DS_DRA_NOT_SUPPORTED
+//
+// MessageText:
+//
+// The requested operation is not supported by this version of the directory service.
+//
+ ERROR_DS_DRA_NOT_SUPPORTED = DWORD(8454);
+ {$EXTERNALSYM ERROR_DS_DRA_NOT_SUPPORTED}
+
+//
+// MessageId: ERROR_DS_DRA_RPC_CANCELLED
+//
+// MessageText:
+//
+// The replication remote procedure call was cancelled.
+//
+ ERROR_DS_DRA_RPC_CANCELLED = DWORD(8455);
+ {$EXTERNALSYM ERROR_DS_DRA_RPC_CANCELLED}
+
+//
+// MessageId: ERROR_DS_DRA_SOURCE_DISABLED
+//
+// MessageText:
+//
+// The source server is currently rejecting replication requests.
+//
+ ERROR_DS_DRA_SOURCE_DISABLED = DWORD(8456);
+ {$EXTERNALSYM ERROR_DS_DRA_SOURCE_DISABLED}
+
+//
+// MessageId: ERROR_DS_DRA_SINK_DISABLED
+//
+// MessageText:
+//
+// The destination server is currently rejecting replication requests.
+//
+ ERROR_DS_DRA_SINK_DISABLED = DWORD(8457);
+ {$EXTERNALSYM ERROR_DS_DRA_SINK_DISABLED}
+
+//
+// MessageId: ERROR_DS_DRA_NAME_COLLISION
+//
+// MessageText:
+//
+// The replication operation failed due to a collision of object names.
+//
+ ERROR_DS_DRA_NAME_COLLISION = DWORD(8458);
+ {$EXTERNALSYM ERROR_DS_DRA_NAME_COLLISION}
+
+//
+// MessageId: ERROR_DS_DRA_SOURCE_REINSTALLED
+//
+// MessageText:
+//
+// The replication source has been reinstalled.
+//
+ ERROR_DS_DRA_SOURCE_REINSTALLED = DWORD(8459);
+ {$EXTERNALSYM ERROR_DS_DRA_SOURCE_REINSTALLED}
+
+//
+// MessageId: ERROR_DS_DRA_MISSING_PARENT
+//
+// MessageText:
+//
+// The replication operation failed because a required parent object is missing.
+//
+ ERROR_DS_DRA_MISSING_PARENT = DWORD(8460);
+ {$EXTERNALSYM ERROR_DS_DRA_MISSING_PARENT}
+
+//
+// MessageId: ERROR_DS_DRA_PREEMPTED
+//
+// MessageText:
+//
+// The replication operation was preempted.
+//
+ ERROR_DS_DRA_PREEMPTED = DWORD(8461);
+ {$EXTERNALSYM ERROR_DS_DRA_PREEMPTED}
+
+//
+// MessageId: ERROR_DS_DRA_ABANDON_SYNC
+//
+// MessageText:
+//
+// The replication synchronization attempt was abandoned because of a lack of updates.
+//
+ ERROR_DS_DRA_ABANDON_SYNC = DWORD(8462);
+ {$EXTERNALSYM ERROR_DS_DRA_ABANDON_SYNC}
+
+//
+// MessageId: ERROR_DS_DRA_SHUTDOWN
+//
+// MessageText:
+//
+// The replication operation was terminated because the system is shutting down.
+//
+ ERROR_DS_DRA_SHUTDOWN = DWORD(8463);
+ {$EXTERNALSYM ERROR_DS_DRA_SHUTDOWN}
+
+//
+// MessageId: ERROR_DS_DRA_INCOMPATIBLE_PARTIAL_SET
+//
+// MessageText:
+//
+// Synchronization attempt failed because the destination DC is currently waiting to synchronize new partial attributes from source. This condition is normal if a recent schema change modified the partial attribute set. The destination partial attribute set is not a subset of source partial attribute set.
+//
+ ERROR_DS_DRA_INCOMPATIBLE_PARTIAL_SET = DWORD(8464);
+ {$EXTERNALSYM ERROR_DS_DRA_INCOMPATIBLE_PARTIAL_SET}
+
+//
+// MessageId: ERROR_DS_DRA_SOURCE_IS_PARTIAL_REPLICA
+//
+// MessageText:
+//
+// The replication synchronization attempt failed because a master replica attempted to sync from a partial replica.
+//
+ ERROR_DS_DRA_SOURCE_IS_PARTIAL_REPLICA = DWORD(8465);
+ {$EXTERNALSYM ERROR_DS_DRA_SOURCE_IS_PARTIAL_REPLICA}
+
+//
+// MessageId: ERROR_DS_DRA_EXTN_CONNECTION_FAILED
+//
+// MessageText:
+//
+// The server specified for this replication operation was contacted, but that server was unable to contact an additional server needed to complete the operation.
+//
+ ERROR_DS_DRA_EXTN_CONNECTION_FAILED = DWORD(8466);
+ {$EXTERNALSYM ERROR_DS_DRA_EXTN_CONNECTION_FAILED}
+
+//
+// MessageId: ERROR_DS_INSTALL_SCHEMA_MISMATCH
+//
+// MessageText:
+//
+// The version of the Active Directory schema of the source forest is not compatible with the version of Active Directory on this computer.
+//
+ ERROR_DS_INSTALL_SCHEMA_MISMATCH = DWORD(8467);
+ {$EXTERNALSYM ERROR_DS_INSTALL_SCHEMA_MISMATCH}
+
+//
+// MessageId: ERROR_DS_DUP_LINK_ID
+//
+// MessageText:
+//
+// Schema update failed: An attribute with the same link identifier already exists.
+//
+ ERROR_DS_DUP_LINK_ID = DWORD(8468);
+ {$EXTERNALSYM ERROR_DS_DUP_LINK_ID}
+
+//
+// MessageId: ERROR_DS_NAME_ERROR_RESOLVING
+//
+// MessageText:
+//
+// Name translation: Generic processing error.
+//
+ ERROR_DS_NAME_ERROR_RESOLVING = DWORD(8469);
+ {$EXTERNALSYM ERROR_DS_NAME_ERROR_RESOLVING}
+
+//
+// MessageId: ERROR_DS_NAME_ERROR_NOT_FOUND
+//
+// MessageText:
+//
+// Name translation: Could not find the name or insufficient right to see name.
+//
+ ERROR_DS_NAME_ERROR_NOT_FOUND = DWORD(8470);
+ {$EXTERNALSYM ERROR_DS_NAME_ERROR_NOT_FOUND}
+
+//
+// MessageId: ERROR_DS_NAME_ERROR_NOT_UNIQUE
+//
+// MessageText:
+//
+// Name translation: Input name mapped to more than one output name.
+//
+ ERROR_DS_NAME_ERROR_NOT_UNIQUE = DWORD(8471);
+ {$EXTERNALSYM ERROR_DS_NAME_ERROR_NOT_UNIQUE}
+
+//
+// MessageId: ERROR_DS_NAME_ERROR_NO_MAPPING
+//
+// MessageText:
+//
+// Name translation: Input name found, but not the associated output format.
+//
+ ERROR_DS_NAME_ERROR_NO_MAPPING = DWORD(8472);
+ {$EXTERNALSYM ERROR_DS_NAME_ERROR_NO_MAPPING}
+
+//
+// MessageId: ERROR_DS_NAME_ERROR_DOMAIN_ONLY
+//
+// MessageText:
+//
+// Name translation: Unable to resolve completely, only the domain was found.
+//
+ ERROR_DS_NAME_ERROR_DOMAIN_ONLY = DWORD(8473);
+ {$EXTERNALSYM ERROR_DS_NAME_ERROR_DOMAIN_ONLY}
+
+//
+// MessageId: ERROR_DS_NAME_ERROR_NO_SYNTACTICAL_MAPPING
+//
+// MessageText:
+//
+// Name translation: Unable to perform purely syntactical mapping at the client without going out to the wire.
+//
+ ERROR_DS_NAME_ERROR_NO_SYNTACTICAL_MAPPING = DWORD(8474);
+ {$EXTERNALSYM ERROR_DS_NAME_ERROR_NO_SYNTACTICAL_MAPPING}
+
+//
+// MessageId: ERROR_DS_CONSTRUCTED_ATT_MOD
+//
+// MessageText:
+//
+// Modification of a constructed attribute is not allowed.
+//
+ ERROR_DS_CONSTRUCTED_ATT_MOD = DWORD(8475);
+ {$EXTERNALSYM ERROR_DS_CONSTRUCTED_ATT_MOD}
+
+//
+// MessageId: ERROR_DS_WRONG_OM_OBJ_CLASS
+//
+// MessageText:
+//
+// The OM-Object-Class specified is incorrect for an attribute with the specified syntax.
+//
+ ERROR_DS_WRONG_OM_OBJ_CLASS = DWORD(8476);
+ {$EXTERNALSYM ERROR_DS_WRONG_OM_OBJ_CLASS}
+
+//
+// MessageId: ERROR_DS_DRA_REPL_PENDING
+//
+// MessageText:
+//
+// The replication request has been posted; waiting for reply.
+//
+ ERROR_DS_DRA_REPL_PENDING = DWORD(8477);
+ {$EXTERNALSYM ERROR_DS_DRA_REPL_PENDING}
+
+//
+// MessageId: ERROR_DS_DS_REQUIRED
+//
+// MessageText:
+//
+// The requested operation requires a directory service, and none was available.
+//
+ ERROR_DS_DS_REQUIRED = DWORD(8478);
+ {$EXTERNALSYM ERROR_DS_DS_REQUIRED}
+
+//
+// MessageId: ERROR_DS_INVALID_LDAP_DISPLAY_NAME
+//
+// MessageText:
+//
+// The LDAP display name of the class or attribute contains non-ASCII characters.
+//
+ ERROR_DS_INVALID_LDAP_DISPLAY_NAME = DWORD(8479);
+ {$EXTERNALSYM ERROR_DS_INVALID_LDAP_DISPLAY_NAME}
+
+//
+// MessageId: ERROR_DS_NON_BASE_SEARCH
+//
+// MessageText:
+//
+// The requested search operation is only supported for base searches.
+//
+ ERROR_DS_NON_BASE_SEARCH = DWORD(8480);
+ {$EXTERNALSYM ERROR_DS_NON_BASE_SEARCH}
+
+//
+// MessageId: ERROR_DS_CANT_RETRIEVE_ATTS
+//
+// MessageText:
+//
+// The search failed to retrieve attributes from the database.
+//
+ ERROR_DS_CANT_RETRIEVE_ATTS = DWORD(8481);
+ {$EXTERNALSYM ERROR_DS_CANT_RETRIEVE_ATTS}
+
+//
+// MessageId: ERROR_DS_BACKLINK_WITHOUT_LINK
+//
+// MessageText:
+//
+// The schema update operation tried to add a backward link attribute that has no corresponding forward link.
+//
+ ERROR_DS_BACKLINK_WITHOUT_LINK = DWORD(8482);
+ {$EXTERNALSYM ERROR_DS_BACKLINK_WITHOUT_LINK}
+
+//
+// MessageId: ERROR_DS_EPOCH_MISMATCH
+//
+// MessageText:
+//
+// Source and destination of a cross-domain move do not agree on the object's epoch number. Either source or destination does not have the latest version of the object.
+//
+ ERROR_DS_EPOCH_MISMATCH = DWORD(8483);
+ {$EXTERNALSYM ERROR_DS_EPOCH_MISMATCH}
+
+//
+// MessageId: ERROR_DS_SRC_NAME_MISMATCH
+//
+// MessageText:
+//
+// Source and destination of a cross-domain move do not agree on the object's current name. Either source or destination does not have the latest version of the object.
+//
+ ERROR_DS_SRC_NAME_MISMATCH = DWORD(8484);
+ {$EXTERNALSYM ERROR_DS_SRC_NAME_MISMATCH}
+
+//
+// MessageId: ERROR_DS_SRC_AND_DST_NC_IDENTICAL
+//
+// MessageText:
+//
+// Source and destination for the cross-domain move operation are identical. Caller should use local move operation instead of cross-domain move operation.
+//
+ ERROR_DS_SRC_AND_DST_NC_IDENTICAL = DWORD(8485);
+ {$EXTERNALSYM ERROR_DS_SRC_AND_DST_NC_IDENTICAL}
+
+//
+// MessageId: ERROR_DS_DST_NC_MISMATCH
+//
+// MessageText:
+//
+// Source and destination for a cross-domain move are not in agreement on the naming contexts in the forest. Either source or destination does not have the latest version of the Partitions container.
+//
+ ERROR_DS_DST_NC_MISMATCH = DWORD(8486);
+ {$EXTERNALSYM ERROR_DS_DST_NC_MISMATCH}
+
+//
+// MessageId: ERROR_DS_NOT_AUTHORITIVE_FOR_DST_NC
+//
+// MessageText:
+//
+// Destination of a cross-domain move is not authoritative for the destination naming context.
+//
+ ERROR_DS_NOT_AUTHORITIVE_FOR_DST_NC = DWORD(8487);
+ {$EXTERNALSYM ERROR_DS_NOT_AUTHORITIVE_FOR_DST_NC}
+
+//
+// MessageId: ERROR_DS_SRC_GUID_MISMATCH
+//
+// MessageText:
+//
+// Source and destination of a cross-domain move do not agree on the identity of the source object. Either source or destination does not have the latest version of the source object.
+//
+ ERROR_DS_SRC_GUID_MISMATCH = DWORD(8488);
+ {$EXTERNALSYM ERROR_DS_SRC_GUID_MISMATCH}
+
+//
+// MessageId: ERROR_DS_CANT_MOVE_DELETED_OBJECT
+//
+// MessageText:
+//
+// Object being moved across-domains is already known to be deleted by the destination server. The source server does not have the latest version of the source object.
+//
+ ERROR_DS_CANT_MOVE_DELETED_OBJECT = DWORD(8489);
+ {$EXTERNALSYM ERROR_DS_CANT_MOVE_DELETED_OBJECT}
+
+//
+// MessageId: ERROR_DS_PDC_OPERATION_IN_PROGRESS
+//
+// MessageText:
+//
+// Another operation which requires exclusive access to the PDC FSMO is already in progress.
+//
+ ERROR_DS_PDC_OPERATION_IN_PROGRESS = DWORD(8490);
+ {$EXTERNALSYM ERROR_DS_PDC_OPERATION_IN_PROGRESS}
+
+//
+// MessageId: ERROR_DS_CROSS_DOMAIN_CLEANUP_REQD
+//
+// MessageText:
+//
+// A cross-domain move operation failed such that two versions of the moved object exist - one each in the source and destination domains. The destination object needs to be removed to restore the system to a consistent state.
+//
+ ERROR_DS_CROSS_DOMAIN_CLEANUP_REQD = DWORD(8491);
+ {$EXTERNALSYM ERROR_DS_CROSS_DOMAIN_CLEANUP_REQD}
+
+//
+// MessageId: ERROR_DS_ILLEGAL_XDOM_MOVE_OPERATION
+//
+// MessageText:
+//
+// This object may not be moved across domain boundaries either because cross-domain moves for this class are disallowed, or the object has some special characteristics, e.g.: trust account or restricted RID, which prevent its move.
+//
+ ERROR_DS_ILLEGAL_XDOM_MOVE_OPERATION = DWORD(8492);
+ {$EXTERNALSYM ERROR_DS_ILLEGAL_XDOM_MOVE_OPERATION}
+
+//
+// MessageId: ERROR_DS_CANT_WITH_ACCT_GROUP_MEMBERSHPS
+//
+// MessageText:
+//
+// Can't move objects with memberships across domain boundaries as once moved, this would violate the membership conditions of the account group. Remove the object from any account group memberships and retry.
+//
+ ERROR_DS_CANT_WITH_ACCT_GROUP_MEMBERSHPS = DWORD(8493);
+ {$EXTERNALSYM ERROR_DS_CANT_WITH_ACCT_GROUP_MEMBERSHPS}
+
+//
+// MessageId: ERROR_DS_NC_MUST_HAVE_NC_PARENT
+//
+// MessageText:
+//
+// A naming context head must be the immediate child of another naming context head, not of an interior node.
+//
+ ERROR_DS_NC_MUST_HAVE_NC_PARENT = DWORD(8494);
+ {$EXTERNALSYM ERROR_DS_NC_MUST_HAVE_NC_PARENT}
+
+//
+// MessageId: ERROR_DS_CR_IMPOSSIBLE_TO_VALIDATE
+//
+// MessageText:
+//
+// The directory cannot validate the proposed naming context name because it does not hold a replica of the naming context above the proposed naming context. Please ensure that the domain naming master role is held by a server that is configured as a global catalog server, and that the server is up to date with its replication partners. (Applies only to Windows 2000 Domain Naming masters)
+//
+ ERROR_DS_CR_IMPOSSIBLE_TO_VALIDATE = DWORD(8495);
+ {$EXTERNALSYM ERROR_DS_CR_IMPOSSIBLE_TO_VALIDATE}
+
+//
+// MessageId: ERROR_DS_DST_DOMAIN_NOT_NATIVE
+//
+// MessageText:
+//
+// Destination domain must be in native mode.
+//
+ ERROR_DS_DST_DOMAIN_NOT_NATIVE = DWORD(8496);
+ {$EXTERNALSYM ERROR_DS_DST_DOMAIN_NOT_NATIVE}
+
+//
+// MessageId: ERROR_DS_MISSING_INFRASTRUCTURE_CONTAINER
+//
+// MessageText:
+//
+// The operation can not be performed because the server does not have an infrastructure container in the domain of interest.
+//
+ ERROR_DS_MISSING_INFRASTRUCTURE_CONTAINER = DWORD(8497);
+ {$EXTERNALSYM ERROR_DS_MISSING_INFRASTRUCTURE_CONTAINER}
+
+//
+// MessageId: ERROR_DS_CANT_MOVE_ACCOUNT_GROUP
+//
+// MessageText:
+//
+// Cross-domain move of non-empty account groups is not allowed.
+//
+ ERROR_DS_CANT_MOVE_ACCOUNT_GROUP = DWORD(8498);
+ {$EXTERNALSYM ERROR_DS_CANT_MOVE_ACCOUNT_GROUP}
+
+//
+// MessageId: ERROR_DS_CANT_MOVE_RESOURCE_GROUP
+//
+// MessageText:
+//
+// Cross-domain move of non-empty resource groups is not allowed.
+//
+ ERROR_DS_CANT_MOVE_RESOURCE_GROUP = DWORD(8499);
+ {$EXTERNALSYM ERROR_DS_CANT_MOVE_RESOURCE_GROUP}
+
+//
+// MessageId: ERROR_DS_INVALID_SEARCH_FLAG
+//
+// MessageText:
+//
+// The search flags for the attribute are invalid. The ANR bit is valid only on attributes of Unicode or Teletex strings.
+//
+ ERROR_DS_INVALID_SEARCH_FLAG = DWORD(8500);
+ {$EXTERNALSYM ERROR_DS_INVALID_SEARCH_FLAG}
+
+//
+// MessageId: ERROR_DS_NO_TREE_DELETE_ABOVE_NC
+//
+// MessageText:
+//
+// Tree deletions starting at an object which has an NC head as a descendant are not allowed.
+//
+ ERROR_DS_NO_TREE_DELETE_ABOVE_NC = DWORD(8501);
+ {$EXTERNALSYM ERROR_DS_NO_TREE_DELETE_ABOVE_NC}
+
+//
+// MessageId: ERROR_DS_COULDNT_LOCK_TREE_FOR_DELETE
+//
+// MessageText:
+//
+// The directory service failed to lock a tree in preparation for a tree deletion because the tree was in use.
+//
+ ERROR_DS_COULDNT_LOCK_TREE_FOR_DELETE = DWORD(8502);
+ {$EXTERNALSYM ERROR_DS_COULDNT_LOCK_TREE_FOR_DELETE}
+
+//
+// MessageId: ERROR_DS_COULDNT_IDENTIFY_OBJECTS_FOR_TREE_DELETE
+//
+// MessageText:
+//
+// The directory service failed to identify the list of objects to delete while attempting a tree deletion.
+//
+ ERROR_DS_COULDNT_IDENTIFY_OBJECTS_FOR_TREE_DELETE = DWORD(8503);
+ {$EXTERNALSYM ERROR_DS_COULDNT_IDENTIFY_OBJECTS_FOR_TREE_DELETE}
+
+//
+// MessageId: ERROR_DS_SAM_INIT_FAILURE
+//
+// MessageText:
+//
+// Security Accounts Manager initialization failed because of the following error: %1.
+// Error Status: 0x%2. Click OK to shut down the system and reboot into Directory Services Restore Mode. Check the event log for detailed information.
+//
+ ERROR_DS_SAM_INIT_FAILURE = DWORD(8504);
+ {$EXTERNALSYM ERROR_DS_SAM_INIT_FAILURE}
+
+//
+// MessageId: ERROR_DS_SENSITIVE_GROUP_VIOLATION
+//
+// MessageText:
+//
+// Only an administrator can modify the membership list of an administrative group.
+//
+ ERROR_DS_SENSITIVE_GROUP_VIOLATION = DWORD(8505);
+ {$EXTERNALSYM ERROR_DS_SENSITIVE_GROUP_VIOLATION}
+
+//
+// MessageId: ERROR_DS_CANT_MOD_PRIMARYGROUPID
+//
+// MessageText:
+//
+// Cannot change the primary group ID of a domain controller account.
+//
+ ERROR_DS_CANT_MOD_PRIMARYGROUPID = DWORD(8506);
+ {$EXTERNALSYM ERROR_DS_CANT_MOD_PRIMARYGROUPID}
+
+//
+// MessageId: ERROR_DS_ILLEGAL_BASE_SCHEMA_MOD
+//
+// MessageText:
+//
+// An attempt is made to modify the base schema.
+//
+ ERROR_DS_ILLEGAL_BASE_SCHEMA_MOD = DWORD(8507);
+ {$EXTERNALSYM ERROR_DS_ILLEGAL_BASE_SCHEMA_MOD}
+
+//
+// MessageId: ERROR_DS_NONSAFE_SCHEMA_CHANGE
+//
+// MessageText:
+//
+// Adding a new mandatory attribute to an existing class, deleting a mandatory attribute from an existing class, or adding an optional attribute to the special class Top that is not a backlink attribute (directly or through inheritance, for example, by adding or deleting an auxiliary class) is not allowed.
+//
+ ERROR_DS_NONSAFE_SCHEMA_CHANGE = DWORD(8508);
+ {$EXTERNALSYM ERROR_DS_NONSAFE_SCHEMA_CHANGE}
+
+//
+// MessageId: ERROR_DS_SCHEMA_UPDATE_DISALLOWED
+//
+// MessageText:
+//
+// Schema update is not allowed on this DC because the DC is not the schema FSMO Role Owner.
+//
+ ERROR_DS_SCHEMA_UPDATE_DISALLOWED = DWORD(8509);
+ {$EXTERNALSYM ERROR_DS_SCHEMA_UPDATE_DISALLOWED}
+
+//
+// MessageId: ERROR_DS_CANT_CREATE_UNDER_SCHEMA
+//
+// MessageText:
+//
+// An object of this class cannot be created under the schema container. You can only create attribute-schema and class-schema objects under the schema container.
+//
+ ERROR_DS_CANT_CREATE_UNDER_SCHEMA = DWORD(8510);
+ {$EXTERNALSYM ERROR_DS_CANT_CREATE_UNDER_SCHEMA}
+
+//
+// MessageId: ERROR_DS_INSTALL_NO_SRC_SCH_VERSION
+//
+// MessageText:
+//
+// The replica/child install failed to get the objectVersion attribute on the schema container on the source DC. Either the attribute is missing on the schema container or the credentials supplied do not have permission to read it.
+//
+ ERROR_DS_INSTALL_NO_SRC_SCH_VERSION = DWORD(8511);
+ {$EXTERNALSYM ERROR_DS_INSTALL_NO_SRC_SCH_VERSION}
+
+//
+// MessageId: ERROR_DS_INSTALL_NO_SCH_VERSION_IN_INIFILE
+//
+// MessageText:
+//
+// The replica/child install failed to read the objectVersion attribute in the SCHEMA section of the file schema.ini in the system32 directory.
+//
+ ERROR_DS_INSTALL_NO_SCH_VERSION_IN_INIFILE = DWORD(8512);
+ {$EXTERNALSYM ERROR_DS_INSTALL_NO_SCH_VERSION_IN_INIFILE}
+
+//
+// MessageId: ERROR_DS_INVALID_GROUP_TYPE
+//
+// MessageText:
+//
+// The specified group type is invalid.
+//
+ ERROR_DS_INVALID_GROUP_TYPE = DWORD(8513);
+ {$EXTERNALSYM ERROR_DS_INVALID_GROUP_TYPE}
+
+//
+// MessageId: ERROR_DS_NO_NEST_GLOBALGROUP_IN_MIXEDDOMAIN
+//
+// MessageText:
+//
+// You cannot nest global groups in a mixed domain if the group is security-enabled.
+//
+ ERROR_DS_NO_NEST_GLOBALGROUP_IN_MIXEDDOMAIN = DWORD(8514);
+ {$EXTERNALSYM ERROR_DS_NO_NEST_GLOBALGROUP_IN_MIXEDDOMAIN}
+
+//
+// MessageId: ERROR_DS_NO_NEST_LOCALGROUP_IN_MIXEDDOMAIN
+//
+// MessageText:
+//
+// You cannot nest local groups in a mixed domain if the group is security-enabled.
+//
+ ERROR_DS_NO_NEST_LOCALGROUP_IN_MIXEDDOMAIN = DWORD(8515);
+ {$EXTERNALSYM ERROR_DS_NO_NEST_LOCALGROUP_IN_MIXEDDOMAIN}
+
+//
+// MessageId: ERROR_DS_GLOBAL_CANT_HAVE_LOCAL_MEMBER
+//
+// MessageText:
+//
+// A global group cannot have a local group as a member.
+//
+ ERROR_DS_GLOBAL_CANT_HAVE_LOCAL_MEMBER = DWORD(8516);
+ {$EXTERNALSYM ERROR_DS_GLOBAL_CANT_HAVE_LOCAL_MEMBER}
+
+//
+// MessageId: ERROR_DS_GLOBAL_CANT_HAVE_UNIVERSAL_MEMBER
+//
+// MessageText:
+//
+// A global group cannot have a universal group as a member.
+//
+ ERROR_DS_GLOBAL_CANT_HAVE_UNIVERSAL_MEMBER = DWORD(8517);
+ {$EXTERNALSYM ERROR_DS_GLOBAL_CANT_HAVE_UNIVERSAL_MEMBER}
+
+//
+// MessageId: ERROR_DS_UNIVERSAL_CANT_HAVE_LOCAL_MEMBER
+//
+// MessageText:
+//
+// A universal group cannot have a local group as a member.
+//
+ ERROR_DS_UNIVERSAL_CANT_HAVE_LOCAL_MEMBER = DWORD(8518);
+ {$EXTERNALSYM ERROR_DS_UNIVERSAL_CANT_HAVE_LOCAL_MEMBER}
+
+//
+// MessageId: ERROR_DS_GLOBAL_CANT_HAVE_CROSSDOMAIN_MEMBER
+//
+// MessageText:
+//
+// A global group cannot have a cross-domain member.
+//
+ ERROR_DS_GLOBAL_CANT_HAVE_CROSSDOMAIN_MEMBER = DWORD(8519);
+ {$EXTERNALSYM ERROR_DS_GLOBAL_CANT_HAVE_CROSSDOMAIN_MEMBER}
+
+//
+// MessageId: ERROR_DS_LOCAL_CANT_HAVE_CROSSDOMAIN_LOCAL_MEMBER
+//
+// MessageText:
+//
+// A local group cannot have another cross domain local group as a member.
+//
+ ERROR_DS_LOCAL_CANT_HAVE_CROSSDOMAIN_LOCAL_MEMBER = DWORD(8520);
+ {$EXTERNALSYM ERROR_DS_LOCAL_CANT_HAVE_CROSSDOMAIN_LOCAL_MEMBER}
+
+//
+// MessageId: ERROR_DS_HAVE_PRIMARY_MEMBERS
+//
+// MessageText:
+//
+// A group with primary members cannot change to a security-disabled group.
+//
+ ERROR_DS_HAVE_PRIMARY_MEMBERS = DWORD(8521);
+ {$EXTERNALSYM ERROR_DS_HAVE_PRIMARY_MEMBERS}
+
+//
+// MessageId: ERROR_DS_STRING_SD_CONVERSION_FAILED
+//
+// MessageText:
+//
+// The schema cache load failed to convert the string default SD on a class-schema object.
+//
+ ERROR_DS_STRING_SD_CONVERSION_FAILED = DWORD(8522);
+ {$EXTERNALSYM ERROR_DS_STRING_SD_CONVERSION_FAILED}
+
+//
+// MessageId: ERROR_DS_NAMING_MASTER_GC
+//
+// MessageText:
+//
+// Only DSAs configured to be Global Catalog servers should be allowed to hold the Domain Naming Master FSMO role. (Applies only to Windows 2000 servers)
+//
+ ERROR_DS_NAMING_MASTER_GC = DWORD(8523);
+ {$EXTERNALSYM ERROR_DS_NAMING_MASTER_GC}
+
+//
+// MessageId: ERROR_DS_DNS_LOOKUP_FAILURE
+//
+// MessageText:
+//
+// The DSA operation is unable to proceed because of a DNS lookup failure.
+//
+ ERROR_DS_DNS_LOOKUP_FAILURE = DWORD(8524);
+ {$EXTERNALSYM ERROR_DS_DNS_LOOKUP_FAILURE}
+
+//
+// MessageId: ERROR_DS_COULDNT_UPDATE_SPNS
+//
+// MessageText:
+//
+// While processing a change to the DNS Host Name for an object, the Service Principal Name values could not be kept in sync.
+//
+ ERROR_DS_COULDNT_UPDATE_SPNS = DWORD(8525);
+ {$EXTERNALSYM ERROR_DS_COULDNT_UPDATE_SPNS}
+
+//
+// MessageId: ERROR_DS_CANT_RETRIEVE_SD
+//
+// MessageText:
+//
+// The Security Descriptor attribute could not be read.
+//
+ ERROR_DS_CANT_RETRIEVE_SD = DWORD(8526);
+ {$EXTERNALSYM ERROR_DS_CANT_RETRIEVE_SD}
+
+//
+// MessageId: ERROR_DS_KEY_NOT_UNIQUE
+//
+// MessageText:
+//
+// The object requested was not found, but an object with that key was found.
+//
+ ERROR_DS_KEY_NOT_UNIQUE = DWORD(8527);
+ {$EXTERNALSYM ERROR_DS_KEY_NOT_UNIQUE}
+
+//
+// MessageId: ERROR_DS_WRONG_LINKED_ATT_SYNTAX
+//
+// MessageText:
+//
+// The syntax of the linked attribute being added is incorrect. Forward links can only have syntax 2.5.5.1, 2.5.5.7, and 2.5.5.14, and backlinks can only have syntax 2.5.5.1
+//
+ ERROR_DS_WRONG_LINKED_ATT_SYNTAX = DWORD(8528);
+ {$EXTERNALSYM ERROR_DS_WRONG_LINKED_ATT_SYNTAX}
+
+//
+// MessageId: ERROR_DS_SAM_NEED_BOOTKEY_PASSWORD
+//
+// MessageText:
+//
+// Security Account Manager needs to get the boot password.
+//
+ ERROR_DS_SAM_NEED_BOOTKEY_PASSWORD = DWORD(8529);
+ {$EXTERNALSYM ERROR_DS_SAM_NEED_BOOTKEY_PASSWORD}
+
+//
+// MessageId: ERROR_DS_SAM_NEED_BOOTKEY_FLOPPY
+//
+// MessageText:
+//
+// Security Account Manager needs to get the boot key from floppy disk.
+//
+ ERROR_DS_SAM_NEED_BOOTKEY_FLOPPY = DWORD(8530);
+ {$EXTERNALSYM ERROR_DS_SAM_NEED_BOOTKEY_FLOPPY}
+
+//
+// MessageId: ERROR_DS_CANT_START
+//
+// MessageText:
+//
+// Directory Service cannot start.
+//
+ ERROR_DS_CANT_START = DWORD(8531);
+ {$EXTERNALSYM ERROR_DS_CANT_START}
+
+//
+// MessageId: ERROR_DS_INIT_FAILURE
+//
+// MessageText:
+//
+// Directory Services could not start.
+//
+ ERROR_DS_INIT_FAILURE = DWORD(8532);
+ {$EXTERNALSYM ERROR_DS_INIT_FAILURE}
+
+//
+// MessageId: ERROR_DS_NO_PKT_PRIVACY_ON_CONNECTION
+//
+// MessageText:
+//
+// The connection between client and server requires packet privacy or better.
+//
+ ERROR_DS_NO_PKT_PRIVACY_ON_CONNECTION = DWORD(8533);
+ {$EXTERNALSYM ERROR_DS_NO_PKT_PRIVACY_ON_CONNECTION}
+
+//
+// MessageId: ERROR_DS_SOURCE_DOMAIN_IN_FOREST
+//
+// MessageText:
+//
+// The source domain may not be in the same forest as destination.
+//
+ ERROR_DS_SOURCE_DOMAIN_IN_FOREST = DWORD(8534);
+ {$EXTERNALSYM ERROR_DS_SOURCE_DOMAIN_IN_FOREST}
+
+//
+// MessageId: ERROR_DS_DESTINATION_DOMAIN_NOT_IN_FOREST
+//
+// MessageText:
+//
+// The destination domain must be in the forest.
+//
+ ERROR_DS_DESTINATION_DOMAIN_NOT_IN_FOREST = DWORD(8535);
+ {$EXTERNALSYM ERROR_DS_DESTINATION_DOMAIN_NOT_IN_FOREST}
+
+//
+// MessageId: ERROR_DS_DESTINATION_AUDITING_NOT_ENABLED
+//
+// MessageText:
+//
+// The operation requires that destination domain auditing be enabled.
+//
+ ERROR_DS_DESTINATION_AUDITING_NOT_ENABLED = DWORD(8536);
+ {$EXTERNALSYM ERROR_DS_DESTINATION_AUDITING_NOT_ENABLED}
+
+//
+// MessageId: ERROR_DS_CANT_FIND_DC_FOR_SRC_DOMAIN
+//
+// MessageText:
+//
+// The operation couldn't locate a DC for the source domain.
+//
+ ERROR_DS_CANT_FIND_DC_FOR_SRC_DOMAIN = DWORD(8537);
+ {$EXTERNALSYM ERROR_DS_CANT_FIND_DC_FOR_SRC_DOMAIN}
+
+//
+// MessageId: ERROR_DS_SRC_OBJ_NOT_GROUP_OR_USER
+//
+// MessageText:
+//
+// The source object must be a group or user.
+//
+ ERROR_DS_SRC_OBJ_NOT_GROUP_OR_USER = DWORD(8538);
+ {$EXTERNALSYM ERROR_DS_SRC_OBJ_NOT_GROUP_OR_USER}
+
+//
+// MessageId: ERROR_DS_SRC_SID_EXISTS_IN_FOREST
+//
+// MessageText:
+//
+// The source object's SID already exists in destination forest.
+//
+ ERROR_DS_SRC_SID_EXISTS_IN_FOREST = DWORD(8539);
+ {$EXTERNALSYM ERROR_DS_SRC_SID_EXISTS_IN_FOREST}
+
+//
+// MessageId: ERROR_DS_SRC_AND_DST_OBJECT_CLASS_MISMATCH
+//
+// MessageText:
+//
+// The source and destination object must be of the same type.
+//
+ ERROR_DS_SRC_AND_DST_OBJECT_CLASS_MISMATCH = DWORD(8540);
+ {$EXTERNALSYM ERROR_DS_SRC_AND_DST_OBJECT_CLASS_MISMATCH}
+
+//
+// MessageId: ERROR_SAM_INIT_FAILURE
+//
+// MessageText:
+//
+// Security Accounts Manager initialization failed because of the following error: %1.
+// Error Status: 0x%2. Click OK to shut down the system and reboot into Safe Mode. Check the event log for detailed information.
+//
+ ERROR_SAM_INIT_FAILURE = DWORD(8541);
+ {$EXTERNALSYM ERROR_SAM_INIT_FAILURE}
+
+//
+// MessageId: ERROR_DS_DRA_SCHEMA_INFO_SHIP
+//
+// MessageText:
+//
+// Schema information could not be included in the replication request.
+//
+ ERROR_DS_DRA_SCHEMA_INFO_SHIP = DWORD(8542);
+ {$EXTERNALSYM ERROR_DS_DRA_SCHEMA_INFO_SHIP}
+
+//
+// MessageId: ERROR_DS_DRA_SCHEMA_CONFLICT
+//
+// MessageText:
+//
+// The replication operation could not be completed due to a schema incompatibility.
+//
+ ERROR_DS_DRA_SCHEMA_CONFLICT = DWORD(8543);
+ {$EXTERNALSYM ERROR_DS_DRA_SCHEMA_CONFLICT}
+
+//
+// MessageId: ERROR_DS_DRA_EARLIER_SCHEMA_CONFLICT
+//
+// MessageText:
+//
+// The replication operation could not be completed due to a previous schema incompatibility.
+//
+ ERROR_DS_DRA_EARLIER_SCHEMA_CONFLICT = DWORD(8544);
+ {$EXTERNALSYM ERROR_DS_DRA_EARLIER_SCHEMA_CONFLICT}
+
+//
+// MessageId: ERROR_DS_DRA_OBJ_NC_MISMATCH
+//
+// MessageText:
+//
+// The replication update could not be applied because either the source or the destination has not yet received information regarding a recent cross-domain move operation.
+//
+ ERROR_DS_DRA_OBJ_NC_MISMATCH = DWORD(8545);
+ {$EXTERNALSYM ERROR_DS_DRA_OBJ_NC_MISMATCH}
+
+//
+// MessageId: ERROR_DS_NC_STILL_HAS_DSAS
+//
+// MessageText:
+//
+// The requested domain could not be deleted because there exist domain controllers that still host this domain.
+//
+ ERROR_DS_NC_STILL_HAS_DSAS = DWORD(8546);
+ {$EXTERNALSYM ERROR_DS_NC_STILL_HAS_DSAS}
+
+//
+// MessageId: ERROR_DS_GC_REQUIRED
+//
+// MessageText:
+//
+// The requested operation can be performed only on a global catalog server.
+//
+ ERROR_DS_GC_REQUIRED = DWORD(8547);
+ {$EXTERNALSYM ERROR_DS_GC_REQUIRED}
+
+//
+// MessageId: ERROR_DS_LOCAL_MEMBER_OF_LOCAL_ONLY
+//
+// MessageText:
+//
+// A local group can only be a member of other local groups in the same domain.
+//
+ ERROR_DS_LOCAL_MEMBER_OF_LOCAL_ONLY = DWORD(8548);
+ {$EXTERNALSYM ERROR_DS_LOCAL_MEMBER_OF_LOCAL_ONLY}
+
+//
+// MessageId: ERROR_DS_NO_FPO_IN_UNIVERSAL_GROUPS
+//
+// MessageText:
+//
+// Foreign security principals cannot be members of universal groups.
+//
+ ERROR_DS_NO_FPO_IN_UNIVERSAL_GROUPS = DWORD(8549);
+ {$EXTERNALSYM ERROR_DS_NO_FPO_IN_UNIVERSAL_GROUPS}
+
+//
+// MessageId: ERROR_DS_CANT_ADD_TO_GC
+//
+// MessageText:
+//
+// The attribute is not allowed to be replicated to the GC because of security reasons.
+//
+ ERROR_DS_CANT_ADD_TO_GC = DWORD(8550);
+ {$EXTERNALSYM ERROR_DS_CANT_ADD_TO_GC}
+
+//
+// MessageId: ERROR_DS_NO_CHECKPOINT_WITH_PDC
+//
+// MessageText:
+//
+// The checkpoint with the PDC could not be taken because there too many modifications being processed currently.
+//
+ ERROR_DS_NO_CHECKPOINT_WITH_PDC = DWORD(8551);
+ {$EXTERNALSYM ERROR_DS_NO_CHECKPOINT_WITH_PDC}
+
+//
+// MessageId: ERROR_DS_SOURCE_AUDITING_NOT_ENABLED
+//
+// MessageText:
+//
+// The operation requires that source domain auditing be enabled.
+//
+ ERROR_DS_SOURCE_AUDITING_NOT_ENABLED = DWORD(8552);
+ {$EXTERNALSYM ERROR_DS_SOURCE_AUDITING_NOT_ENABLED}
+
+//
+// MessageId: ERROR_DS_CANT_CREATE_IN_NONDOMAIN_NC
+//
+// MessageText:
+//
+// Security principal objects can only be created inside domain naming contexts.
+//
+ ERROR_DS_CANT_CREATE_IN_NONDOMAIN_NC = DWORD(8553);
+ {$EXTERNALSYM ERROR_DS_CANT_CREATE_IN_NONDOMAIN_NC}
+
+//
+// MessageId: ERROR_DS_INVALID_NAME_FOR_SPN
+//
+// MessageText:
+//
+// A Service Principal Name (SPN) could not be constructed because the provided hostname is not in the necessary format.
+//
+ ERROR_DS_INVALID_NAME_FOR_SPN = DWORD(8554);
+ {$EXTERNALSYM ERROR_DS_INVALID_NAME_FOR_SPN}
+
+//
+// MessageId: ERROR_DS_FILTER_USES_CONTRUCTED_ATTRS
+//
+// MessageText:
+//
+// A Filter was passed that uses constructed attributes.
+//
+ ERROR_DS_FILTER_USES_CONTRUCTED_ATTRS = DWORD(8555);
+ {$EXTERNALSYM ERROR_DS_FILTER_USES_CONTRUCTED_ATTRS}
+
+//
+// MessageId: ERROR_DS_UNICODEPWD_NOT_IN_QUOTES
+//
+// MessageText:
+//
+// The unicodePwd attribute value must be enclosed in double quotes.
+//
+ ERROR_DS_UNICODEPWD_NOT_IN_QUOTES = DWORD(8556);
+ {$EXTERNALSYM ERROR_DS_UNICODEPWD_NOT_IN_QUOTES}
+
+//
+// MessageId: ERROR_DS_MACHINE_ACCOUNT_QUOTA_EXCEEDED
+//
+// MessageText:
+//
+// Your computer could not be joined to the domain. You have exceeded the maximum number of computer accounts you are allowed to create in this domain. Contact your system administrator to have this limit reset or increased.
+//
+ ERROR_DS_MACHINE_ACCOUNT_QUOTA_EXCEEDED = DWORD(8557);
+ {$EXTERNALSYM ERROR_DS_MACHINE_ACCOUNT_QUOTA_EXCEEDED}
+
+//
+// MessageId: ERROR_DS_MUST_BE_RUN_ON_DST_DC
+//
+// MessageText:
+//
+// For security reasons, the operation must be run on the destination DC.
+//
+ ERROR_DS_MUST_BE_RUN_ON_DST_DC = DWORD(8558);
+ {$EXTERNALSYM ERROR_DS_MUST_BE_RUN_ON_DST_DC}
+
+//
+// MessageId: ERROR_DS_SRC_DC_MUST_BE_SP4_OR_GREATER
+//
+// MessageText:
+//
+// For security reasons, the source DC must be NT4SP4 or greater.
+//
+ ERROR_DS_SRC_DC_MUST_BE_SP4_OR_GREATER = DWORD(8559);
+ {$EXTERNALSYM ERROR_DS_SRC_DC_MUST_BE_SP4_OR_GREATER}
+
+//
+// MessageId: ERROR_DS_CANT_TREE_DELETE_CRITICAL_OBJ
+//
+// MessageText:
+//
+// Critical Directory Service System objects cannot be deleted during tree delete operations. The tree delete may have been partially performed.
+//
+ ERROR_DS_CANT_TREE_DELETE_CRITICAL_OBJ = DWORD(8560);
+ {$EXTERNALSYM ERROR_DS_CANT_TREE_DELETE_CRITICAL_OBJ}
+
+//
+// MessageId: ERROR_DS_INIT_FAILURE_CONSOLE
+//
+// MessageText:
+//
+// Directory Services could not start because of the following error: %1.
+// Error Status: 0x%2. Please click OK to shutdown the system. You can use the recovery console to diagnose the system further.
+//
+ ERROR_DS_INIT_FAILURE_CONSOLE = DWORD(8561);
+ {$EXTERNALSYM ERROR_DS_INIT_FAILURE_CONSOLE}
+
+//
+// MessageId: ERROR_DS_SAM_INIT_FAILURE_CONSOLE
+//
+// MessageText:
+//
+// Security Accounts Manager initialization failed because of the following error: %1.
+// Error Status: 0x%2. Please click OK to shutdown the system. You can use the recovery console to diagnose the system further.
+//
+ ERROR_DS_SAM_INIT_FAILURE_CONSOLE = DWORD(8562);
+ {$EXTERNALSYM ERROR_DS_SAM_INIT_FAILURE_CONSOLE}
+
+//
+// MessageId: ERROR_DS_FOREST_VERSION_TOO_HIGH
+//
+// MessageText:
+//
+// The version of the operating system installed is incompatible with the current forest functional level. You must upgrade to a new version of the operating system before this server can become a domain controller in this forest.
+//
+ ERROR_DS_FOREST_VERSION_TOO_HIGH = DWORD(8563);
+ {$EXTERNALSYM ERROR_DS_FOREST_VERSION_TOO_HIGH}
+
+//
+// MessageId: ERROR_DS_DOMAIN_VERSION_TOO_HIGH
+//
+// MessageText:
+//
+// The version of the operating system installed is incompatible with the current domain functional level. You must upgrade to a new version of the operating system before this server can become a domain controller in this domain.
+//
+ ERROR_DS_DOMAIN_VERSION_TOO_HIGH = DWORD(8564);
+ {$EXTERNALSYM ERROR_DS_DOMAIN_VERSION_TOO_HIGH}
+
+//
+// MessageId: ERROR_DS_FOREST_VERSION_TOO_LOW
+//
+// MessageText:
+//
+// The version of the operating system installed on this server no longer supports the current forest functional level. You must raise the forest functional level before this server can become a domain controller in this forest.
+//
+ ERROR_DS_FOREST_VERSION_TOO_LOW = DWORD(8565);
+ {$EXTERNALSYM ERROR_DS_FOREST_VERSION_TOO_LOW}
+
+//
+// MessageId: ERROR_DS_DOMAIN_VERSION_TOO_LOW
+//
+// MessageText:
+//
+// The version of the operating system installed on this server no longer supports the current domain functional level. You must raise the domain functional level before this server can become a domain controller in this domain.
+//
+ ERROR_DS_DOMAIN_VERSION_TOO_LOW = DWORD(8566);
+ {$EXTERNALSYM ERROR_DS_DOMAIN_VERSION_TOO_LOW}
+
+//
+// MessageId: ERROR_DS_INCOMPATIBLE_VERSION
+//
+// MessageText:
+//
+// The version of the operating system installed on this server is incompatible with the functional level of the domain or forest.
+//
+ ERROR_DS_INCOMPATIBLE_VERSION = DWORD(8567);
+ {$EXTERNALSYM ERROR_DS_INCOMPATIBLE_VERSION}
+
+//
+// MessageId: ERROR_DS_LOW_DSA_VERSION
+//
+// MessageText:
+//
+// The functional level of the domain (or forest) cannot be raised to the requested value, because there exist one or more domain controllers in the domain (or forest) that are at a lower incompatible functional level.
+//
+ ERROR_DS_LOW_DSA_VERSION = DWORD(8568);
+ {$EXTERNALSYM ERROR_DS_LOW_DSA_VERSION}
+
+//
+// MessageId: ERROR_DS_NO_BEHAVIOR_VERSION_IN_MIXEDDOMAIN
+//
+// MessageText:
+//
+// The forest functional level cannot be raised to the requested value since one or more domains are still in mixed domain mode. All domains in the forest must be in native mode, for you to raise the forest functional level.
+//
+ ERROR_DS_NO_BEHAVIOR_VERSION_IN_MIXEDDOMAIN = DWORD(8569);
+ {$EXTERNALSYM ERROR_DS_NO_BEHAVIOR_VERSION_IN_MIXEDDOMAIN}
+
+//
+// MessageId: ERROR_DS_NOT_SUPPORTED_SORT_ORDER
+//
+// MessageText:
+//
+// The sort order requested is not supported.
+//
+ ERROR_DS_NOT_SUPPORTED_SORT_ORDER = DWORD(8570);
+ {$EXTERNALSYM ERROR_DS_NOT_SUPPORTED_SORT_ORDER}
+
+//
+// MessageId: ERROR_DS_NAME_NOT_UNIQUE
+//
+// MessageText:
+//
+// The requested name already exists as a unique identifier.
+//
+ ERROR_DS_NAME_NOT_UNIQUE = DWORD(8571);
+ {$EXTERNALSYM ERROR_DS_NAME_NOT_UNIQUE}
+
+//
+// MessageId: ERROR_DS_MACHINE_ACCOUNT_CREATED_PRENT4
+//
+// MessageText:
+//
+// The machine account was created pre-NT4. The account needs to be recreated.
+//
+ ERROR_DS_MACHINE_ACCOUNT_CREATED_PRENT4 = DWORD(8572);
+ {$EXTERNALSYM ERROR_DS_MACHINE_ACCOUNT_CREATED_PRENT4}
+
+//
+// MessageId: ERROR_DS_OUT_OF_VERSION_STORE
+//
+// MessageText:
+//
+// The database is out of version store.
+//
+ ERROR_DS_OUT_OF_VERSION_STORE = DWORD(8573);
+ {$EXTERNALSYM ERROR_DS_OUT_OF_VERSION_STORE}
+
+//
+// MessageId: ERROR_DS_INCOMPATIBLE_CONTROLS_USED
+//
+// MessageText:
+//
+// Unable to continue operation because multiple conflicting controls were used.
+//
+ ERROR_DS_INCOMPATIBLE_CONTROLS_USED = DWORD(8574);
+ {$EXTERNALSYM ERROR_DS_INCOMPATIBLE_CONTROLS_USED}
+
+//
+// MessageId: ERROR_DS_NO_REF_DOMAIN
+//
+// MessageText:
+//
+// Unable to find a valid security descriptor reference domain for this partition.
+//
+ ERROR_DS_NO_REF_DOMAIN = DWORD(8575);
+ {$EXTERNALSYM ERROR_DS_NO_REF_DOMAIN}
+
+//
+// MessageId: ERROR_DS_RESERVED_LINK_ID
+//
+// MessageText:
+//
+// Schema update failed: The link identifier is reserved.
+//
+ ERROR_DS_RESERVED_LINK_ID = DWORD(8576);
+ {$EXTERNALSYM ERROR_DS_RESERVED_LINK_ID}
+
+//
+// MessageId: ERROR_DS_LINK_ID_NOT_AVAILABLE
+//
+// MessageText:
+//
+// Schema update failed: There are no link identifiers available.
+//
+ ERROR_DS_LINK_ID_NOT_AVAILABLE = DWORD(8577);
+ {$EXTERNALSYM ERROR_DS_LINK_ID_NOT_AVAILABLE}
+
+//
+// MessageId: ERROR_DS_AG_CANT_HAVE_UNIVERSAL_MEMBER
+//
+// MessageText:
+//
+// An account group can not have a universal group as a member.
+//
+ ERROR_DS_AG_CANT_HAVE_UNIVERSAL_MEMBER = DWORD(8578);
+ {$EXTERNALSYM ERROR_DS_AG_CANT_HAVE_UNIVERSAL_MEMBER}
+
+//
+// MessageId: ERROR_DS_MODIFYDN_DISALLOWED_BY_INSTANCE_TYPE
+//
+// MessageText:
+//
+// Rename or move operations on naming context heads or read-only objects are not allowed.
+//
+ ERROR_DS_MODIFYDN_DISALLOWED_BY_INSTANCE_TYPE = DWORD(8579);
+ {$EXTERNALSYM ERROR_DS_MODIFYDN_DISALLOWED_BY_INSTANCE_TYPE}
+
+//
+// MessageId: ERROR_DS_NO_OBJECT_MOVE_IN_SCHEMA_NC
+//
+// MessageText:
+//
+// Move operations on objects in the schema naming context are not allowed.
+//
+ ERROR_DS_NO_OBJECT_MOVE_IN_SCHEMA_NC = DWORD(8580);
+ {$EXTERNALSYM ERROR_DS_NO_OBJECT_MOVE_IN_SCHEMA_NC}
+
+//
+// MessageId: ERROR_DS_MODIFYDN_DISALLOWED_BY_FLAG
+//
+// MessageText:
+//
+// A system flag has been set on the object and does not allow the object to be moved or renamed.
+//
+ ERROR_DS_MODIFYDN_DISALLOWED_BY_FLAG = DWORD(8581);
+ {$EXTERNALSYM ERROR_DS_MODIFYDN_DISALLOWED_BY_FLAG}
+
+//
+// MessageId: ERROR_DS_MODIFYDN_WRONG_GRANDPARENT
+//
+// MessageText:
+//
+// This object is not allowed to change its grandparent container. Moves are not forbidden on this object, but are restricted to sibling containers.
+//
+ ERROR_DS_MODIFYDN_WRONG_GRANDPARENT = DWORD(8582);
+ {$EXTERNALSYM ERROR_DS_MODIFYDN_WRONG_GRANDPARENT}
+
+//
+// MessageId: ERROR_DS_NAME_ERROR_TRUST_REFERRAL
+//
+// MessageText:
+//
+// Unable to resolve completely, a referral to another forest is generated.
+//
+ ERROR_DS_NAME_ERROR_TRUST_REFERRAL = DWORD(8583);
+ {$EXTERNALSYM ERROR_DS_NAME_ERROR_TRUST_REFERRAL}
+
+//
+// MessageId: ERROR_NOT_SUPPORTED_ON_STANDARD_SERVER
+//
+// MessageText:
+//
+// The requested action is not supported on standard server.
+//
+ ERROR_NOT_SUPPORTED_ON_STANDARD_SERVER = DWORD(8584);
+ {$EXTERNALSYM ERROR_NOT_SUPPORTED_ON_STANDARD_SERVER}
+
+//
+// MessageId: ERROR_DS_CANT_ACCESS_REMOTE_PART_OF_AD
+//
+// MessageText:
+//
+// Could not access a partition of the Active Directory located on a remote server. Make sure at least one server is running for the partition in question.
+//
+ ERROR_DS_CANT_ACCESS_REMOTE_PART_OF_AD = DWORD(8585);
+ {$EXTERNALSYM ERROR_DS_CANT_ACCESS_REMOTE_PART_OF_AD}
+
+//
+// MessageId: ERROR_DS_CR_IMPOSSIBLE_TO_VALIDATE_V2
+//
+// MessageText:
+//
+// The directory cannot validate the proposed naming context (or partition) name because it does not hold a replica nor can it contact a replica of the naming context above the proposed naming context. Please ensure that the parent naming context is properly registered in DNS, and at least one replica of this naming context is reachable by the Domain Naming master.
+//
+ ERROR_DS_CR_IMPOSSIBLE_TO_VALIDATE_V2 = DWORD(8586);
+ {$EXTERNALSYM ERROR_DS_CR_IMPOSSIBLE_TO_VALIDATE_V2}
+
+//
+// MessageId: ERROR_DS_THREAD_LIMIT_EXCEEDED
+//
+// MessageText:
+//
+// The thread limit for this request was exceeded.
+//
+ ERROR_DS_THREAD_LIMIT_EXCEEDED = DWORD(8587);
+ {$EXTERNALSYM ERROR_DS_THREAD_LIMIT_EXCEEDED}
+
+//
+// MessageId: ERROR_DS_NOT_CLOSEST
+//
+// MessageText:
+//
+// The Global catalog server is not in the closest site.
+//
+ ERROR_DS_NOT_CLOSEST = DWORD(8588);
+ {$EXTERNALSYM ERROR_DS_NOT_CLOSEST}
+
+//
+// MessageId: ERROR_DS_CANT_DERIVE_SPN_WITHOUT_SERVER_REF
+//
+// MessageText:
+//
+// The DS cannot derive a service principal name (SPN) with which to mutually authenticate the target server because the corresponding server object in the local DS database has no serverReference attribute.
+//
+ ERROR_DS_CANT_DERIVE_SPN_WITHOUT_SERVER_REF = DWORD(8589);
+ {$EXTERNALSYM ERROR_DS_CANT_DERIVE_SPN_WITHOUT_SERVER_REF}
+
+//
+// MessageId: ERROR_DS_SINGLE_USER_MODE_FAILED
+//
+// MessageText:
+//
+// The Directory Service failed to enter single user mode.
+//
+ ERROR_DS_SINGLE_USER_MODE_FAILED = DWORD(8590);
+ {$EXTERNALSYM ERROR_DS_SINGLE_USER_MODE_FAILED}
+
+//
+// MessageId: ERROR_DS_NTDSCRIPT_SYNTAX_ERROR
+//
+// MessageText:
+//
+// The Directory Service cannot parse the script because of a syntax error.
+//
+ ERROR_DS_NTDSCRIPT_SYNTAX_ERROR = DWORD(8591);
+ {$EXTERNALSYM ERROR_DS_NTDSCRIPT_SYNTAX_ERROR}
+
+//
+// MessageId: ERROR_DS_NTDSCRIPT_PROCESS_ERROR
+//
+// MessageText:
+//
+// The Directory Service cannot process the script because of an error.
+//
+ ERROR_DS_NTDSCRIPT_PROCESS_ERROR = DWORD(8592);
+ {$EXTERNALSYM ERROR_DS_NTDSCRIPT_PROCESS_ERROR}
+
+//
+// MessageId: ERROR_DS_DIFFERENT_REPL_EPOCHS
+//
+// MessageText:
+//
+// The directory service cannot perform the requested operation because the servers
+// involved are of different replication epochs (which is usually related to a
+// domain rename that is in progress).
+//
+ ERROR_DS_DIFFERENT_REPL_EPOCHS = DWORD(8593);
+ {$EXTERNALSYM ERROR_DS_DIFFERENT_REPL_EPOCHS}
+
+//
+// MessageId: ERROR_DS_DRS_EXTENSIONS_CHANGED
+//
+// MessageText:
+//
+// The directory service binding must be renegotiated due to a change in the server
+// extensions information.
+//
+ ERROR_DS_DRS_EXTENSIONS_CHANGED = DWORD(8594);
+ {$EXTERNALSYM ERROR_DS_DRS_EXTENSIONS_CHANGED}
+
+//
+// MessageId: ERROR_DS_REPLICA_SET_CHANGE_NOT_ALLOWED_ON_DISABLED_CR
+//
+// MessageText:
+//
+// Operation not allowed on a disabled cross ref.
+//
+ ERROR_DS_REPLICA_SET_CHANGE_NOT_ALLOWED_ON_DISABLED_CR = DWORD(8595);
+ {$EXTERNALSYM ERROR_DS_REPLICA_SET_CHANGE_NOT_ALLOWED_ON_DISABLED_CR}
+
+//
+// MessageId: ERROR_DS_NO_MSDS_INTID
+//
+// MessageText:
+//
+// Schema update failed: No values for msDS-IntId are available.
+//
+ ERROR_DS_NO_MSDS_INTID = DWORD(8596);
+ {$EXTERNALSYM ERROR_DS_NO_MSDS_INTID}
+
+//
+// MessageId: ERROR_DS_DUP_MSDS_INTID
+//
+// MessageText:
+//
+// Schema update failed: Duplicate msDS-INtId. Retry the operation.
+//
+ ERROR_DS_DUP_MSDS_INTID = DWORD(8597);
+ {$EXTERNALSYM ERROR_DS_DUP_MSDS_INTID}
+
+//
+// MessageId: ERROR_DS_EXISTS_IN_RDNATTID
+//
+// MessageText:
+//
+// Schema deletion failed: attribute is used in rDNAttID.
+//
+ ERROR_DS_EXISTS_IN_RDNATTID = DWORD(8598);
+ {$EXTERNALSYM ERROR_DS_EXISTS_IN_RDNATTID}
+
+//
+// MessageId: ERROR_DS_AUTHORIZATION_FAILED
+//
+// MessageText:
+//
+// The directory service failed to authorize the request.
+//
+ ERROR_DS_AUTHORIZATION_FAILED = DWORD(8599);
+ {$EXTERNALSYM ERROR_DS_AUTHORIZATION_FAILED}
+
+//
+// MessageId: ERROR_DS_INVALID_SCRIPT
+//
+// MessageText:
+//
+// The Directory Service cannot process the script because it is invalid.
+//
+ ERROR_DS_INVALID_SCRIPT = DWORD(8600);
+ {$EXTERNALSYM ERROR_DS_INVALID_SCRIPT}
+
+//
+// MessageId: ERROR_DS_REMOTE_CROSSREF_OP_FAILED
+//
+// MessageText:
+//
+// The remote create cross reference operation failed on the Domain Naming Master FSMO. The operation's error is in the extended data.
+//
+ ERROR_DS_REMOTE_CROSSREF_OP_FAILED = DWORD(8601);
+ {$EXTERNALSYM ERROR_DS_REMOTE_CROSSREF_OP_FAILED}
+
+//
+// MessageId: ERROR_DS_CROSS_REF_BUSY
+//
+// MessageText:
+//
+// A cross reference is in use locally with the same name.
+//
+ ERROR_DS_CROSS_REF_BUSY = DWORD(8602);
+ {$EXTERNALSYM ERROR_DS_CROSS_REF_BUSY}
+
+//
+// MessageId: ERROR_DS_CANT_DERIVE_SPN_FOR_DELETED_DOMAIN
+//
+// MessageText:
+//
+// The DS cannot derive a service principal name (SPN) with which to mutually authenticate the target server because the server's domain has been deleted from the forest.
+//
+ ERROR_DS_CANT_DERIVE_SPN_FOR_DELETED_DOMAIN = DWORD(8603);
+ {$EXTERNALSYM ERROR_DS_CANT_DERIVE_SPN_FOR_DELETED_DOMAIN}
+
+//
+// MessageId: ERROR_DS_CANT_DEMOTE_WITH_WRITEABLE_NC
+//
+// MessageText:
+//
+// Writeable NCs prevent this DC from demoting.
+//
+ ERROR_DS_CANT_DEMOTE_WITH_WRITEABLE_NC = DWORD(8604);
+ {$EXTERNALSYM ERROR_DS_CANT_DEMOTE_WITH_WRITEABLE_NC}
+
+//
+// MessageId: ERROR_DS_DUPLICATE_ID_FOUND
+//
+// MessageText:
+//
+// The requested object has a non-unique identifier and cannot be retrieved.
+//
+ ERROR_DS_DUPLICATE_ID_FOUND = DWORD(8605);
+ {$EXTERNALSYM ERROR_DS_DUPLICATE_ID_FOUND}
+
+//
+// MessageId: ERROR_DS_INSUFFICIENT_ATTR_TO_CREATE_OBJECT
+//
+// MessageText:
+//
+// Insufficient attributes were given to create an object. This object may not exist because it may have been deleted and already garbage collected.
+//
+ ERROR_DS_INSUFFICIENT_ATTR_TO_CREATE_OBJECT = DWORD(8606);
+ {$EXTERNALSYM ERROR_DS_INSUFFICIENT_ATTR_TO_CREATE_OBJECT}
+
+//
+// MessageId: ERROR_DS_GROUP_CONVERSION_ERROR
+//
+// MessageText:
+//
+// The group cannot be converted due to attribute restrictions on the requested group type.
+//
+ ERROR_DS_GROUP_CONVERSION_ERROR = DWORD(8607);
+ {$EXTERNALSYM ERROR_DS_GROUP_CONVERSION_ERROR}
+
+//
+// MessageId: ERROR_DS_CANT_MOVE_APP_BASIC_GROUP
+//
+// MessageText:
+//
+// Cross-domain move of non-empty basic application groups is not allowed.
+//
+ ERROR_DS_CANT_MOVE_APP_BASIC_GROUP = DWORD(8608);
+ {$EXTERNALSYM ERROR_DS_CANT_MOVE_APP_BASIC_GROUP}
+
+//
+// MessageId: ERROR_DS_CANT_MOVE_APP_QUERY_GROUP
+//
+// MessageText:
+//
+// Cross-domain move of non-empty query based application groups is not allowed.
+//
+ ERROR_DS_CANT_MOVE_APP_QUERY_GROUP = DWORD(8609);
+ {$EXTERNALSYM ERROR_DS_CANT_MOVE_APP_QUERY_GROUP}
+
+//
+// MessageId: ERROR_DS_ROLE_NOT_VERIFIED
+//
+// MessageText:
+//
+// The FSMO role ownership could not be verified because its directory partition has not replicated successfully with atleast one replication partner.
+//
+ ERROR_DS_ROLE_NOT_VERIFIED = DWORD(8610);
+ {$EXTERNALSYM ERROR_DS_ROLE_NOT_VERIFIED}
+
+//
+// MessageId: ERROR_DS_WKO_CONTAINER_CANNOT_BE_SPECIAL
+//
+// MessageText:
+//
+// The target container for a redirection of a well known object container cannot already be a special container.
+//
+ ERROR_DS_WKO_CONTAINER_CANNOT_BE_SPECIAL = DWORD(8611);
+ {$EXTERNALSYM ERROR_DS_WKO_CONTAINER_CANNOT_BE_SPECIAL}
+
+//
+// MessageId: ERROR_DS_DOMAIN_RENAME_IN_PROGRESS
+//
+// MessageText:
+//
+// The Directory Service cannot perform the requested operation because a domain rename operation is in progress.
+//
+ ERROR_DS_DOMAIN_RENAME_IN_PROGRESS = DWORD(8612);
+ {$EXTERNALSYM ERROR_DS_DOMAIN_RENAME_IN_PROGRESS}
+
+//
+// MessageId: ERROR_DS_EXISTING_AD_CHILD_NC
+//
+// MessageText:
+//
+// The Active Directory detected an Active Directory child partition below the
+// requested new partition name. The Active Directory's partition heiarchy must
+// be created in a top down method.
+//
+ ERROR_DS_EXISTING_AD_CHILD_NC = DWORD(8613);
+ {$EXTERNALSYM ERROR_DS_EXISTING_AD_CHILD_NC}
+
+//
+// MessageId: ERROR_DS_REPL_LIFETIME_EXCEEDED
+//
+// MessageText:
+//
+// The Active Directory cannot replicate with this server because the time since the last replication with this server has exceeded the tombstone lifetime.
+//
+ ERROR_DS_REPL_LIFETIME_EXCEEDED = DWORD(8614);
+ {$EXTERNALSYM ERROR_DS_REPL_LIFETIME_EXCEEDED}
+
+//
+// MessageId: ERROR_DS_DISALLOWED_IN_SYSTEM_CONTAINER
+//
+// MessageText:
+//
+// The requested operation is not allowed on an object under the system container.
+//
+ ERROR_DS_DISALLOWED_IN_SYSTEM_CONTAINER = DWORD(8615);
+ {$EXTERNALSYM ERROR_DS_DISALLOWED_IN_SYSTEM_CONTAINER}
+
+//
+// MessageId: ERROR_DS_LDAP_SEND_QUEUE_FULL
+//
+// MessageText:
+//
+// The LDAP servers network send queue has filled up because the client is not
+// processing the results of it's requests fast enough. No more requests will
+// be processed until the client catches up. If the client does not catch up
+// then it will be disconnected.
+//
+ ERROR_DS_LDAP_SEND_QUEUE_FULL = 8616;
+ {$EXTERNALSYM ERROR_DS_LDAP_SEND_QUEUE_FULL}
+
+//
+// MessageId: ERROR_DS_DRA_OUT_SCHEDULE_WINDOW
+//
+// MessageText:
+//
+// The scheduled replication did not take place because the system was too busy to execute the request within the schedule window. The replication queue is overloaded. Consider reducing the number of partners or decreasing the scheduled replication frequency.
+//
+ ERROR_DS_DRA_OUT_SCHEDULE_WINDOW = DWORD(8617);
+ {$EXTERNALSYM ERROR_DS_DRA_OUT_SCHEDULE_WINDOW}
+
+///////////////////////////////////////////////////
+// /
+// End of Active Directory Error Codes /
+// /
+// 8000 to 8999 /
+///////////////////////////////////////////////////
+
+///////////////////////////////////////////////////
+// //
+// DNS Error Codes //
+// //
+// 9000 to 9999 //
+///////////////////////////////////////////////////
+
+// =============================
+// Facility DNS Error Messages
+// =============================
+
+//
+// DNS response codes.
+//
+
+ DNS_ERROR_RESPONSE_CODES_BASE = 9000;
+ {$EXTERNALSYM DNS_ERROR_RESPONSE_CODES_BASE}
+
+ DNS_ERROR_RCODE_NO_ERROR = NO_ERROR;
+ {$EXTERNALSYM DNS_ERROR_RCODE_NO_ERROR}
+
+ DNS_ERROR_MASK = $00002328; // 9000 or DNS_ERROR_RESPONSE_CODES_BASE
+ {$EXTERNALSYM DNS_ERROR_MASK}
+
+// DNS_ERROR_RCODE_FORMAT_ERROR 0x00002329
+//
+// MessageId: DNS_ERROR_RCODE_FORMAT_ERROR
+//
+// MessageText:
+//
+// DNS server unable to interpret format.
+//
+ DNS_ERROR_RCODE_FORMAT_ERROR = DWORD(9001);
+ {$EXTERNALSYM DNS_ERROR_RCODE_FORMAT_ERROR}
+
+// DNS_ERROR_RCODE_SERVER_FAILURE 0x0000232a
+//
+// MessageId: DNS_ERROR_RCODE_SERVER_FAILURE
+//
+// MessageText:
+//
+// DNS server failure.
+//
+ DNS_ERROR_RCODE_SERVER_FAILURE = DWORD(9002);
+ {$EXTERNALSYM DNS_ERROR_RCODE_SERVER_FAILURE}
+
+// DNS_ERROR_RCODE_NAME_ERROR 0x0000232b
+//
+// MessageId: DNS_ERROR_RCODE_NAME_ERROR
+//
+// MessageText:
+//
+// DNS name does not exist.
+//
+ DNS_ERROR_RCODE_NAME_ERROR = DWORD(9003);
+ {$EXTERNALSYM DNS_ERROR_RCODE_NAME_ERROR}
+
+// DNS_ERROR_RCODE_NOT_IMPLEMENTED 0x0000232c
+//
+// MessageId: DNS_ERROR_RCODE_NOT_IMPLEMENTED
+//
+// MessageText:
+//
+// DNS request not supported by name server.
+//
+ DNS_ERROR_RCODE_NOT_IMPLEMENTED = DWORD(9004);
+ {$EXTERNALSYM DNS_ERROR_RCODE_NOT_IMPLEMENTED}
+
+// DNS_ERROR_RCODE_REFUSED 0x0000232d
+//
+// MessageId: DNS_ERROR_RCODE_REFUSED
+//
+// MessageText:
+//
+// DNS operation refused.
+//
+ DNS_ERROR_RCODE_REFUSED = DWORD(9005);
+ {$EXTERNALSYM DNS_ERROR_RCODE_REFUSED}
+
+// DNS_ERROR_RCODE_YXDOMAIN 0x0000232e
+//
+// MessageId: DNS_ERROR_RCODE_YXDOMAIN
+//
+// MessageText:
+//
+// DNS name that ought not exist, does exist.
+//
+ DNS_ERROR_RCODE_YXDOMAIN = DWORD(9006);
+ {$EXTERNALSYM DNS_ERROR_RCODE_YXDOMAIN}
+
+// DNS_ERROR_RCODE_YXRRSET 0x0000232f
+//
+// MessageId: DNS_ERROR_RCODE_YXRRSET
+//
+// MessageText:
+//
+// DNS RR set that ought not exist, does exist.
+//
+ DNS_ERROR_RCODE_YXRRSET = DWORD(9007);
+ {$EXTERNALSYM DNS_ERROR_RCODE_YXRRSET}
+
+// DNS_ERROR_RCODE_NXRRSET 0x00002330
+//
+// MessageId: DNS_ERROR_RCODE_NXRRSET
+//
+// MessageText:
+//
+// DNS RR set that ought to exist, does not exist.
+//
+ DNS_ERROR_RCODE_NXRRSET = DWORD(9008);
+ {$EXTERNALSYM DNS_ERROR_RCODE_NXRRSET}
+
+// DNS_ERROR_RCODE_NOTAUTH 0x00002331
+//
+// MessageId: DNS_ERROR_RCODE_NOTAUTH
+//
+// MessageText:
+//
+// DNS server not authoritative for zone.
+//
+ DNS_ERROR_RCODE_NOTAUTH = DWORD(9009);
+ {$EXTERNALSYM DNS_ERROR_RCODE_NOTAUTH}
+
+// DNS_ERROR_RCODE_NOTZONE 0x00002332
+//
+// MessageId: DNS_ERROR_RCODE_NOTZONE
+//
+// MessageText:
+//
+// DNS name in update or prereq is not in zone.
+//
+ DNS_ERROR_RCODE_NOTZONE = DWORD(9010);
+ {$EXTERNALSYM DNS_ERROR_RCODE_NOTZONE}
+
+// DNS_ERROR_RCODE_BADSIG 0x00002338
+//
+// MessageId: DNS_ERROR_RCODE_BADSIG
+//
+// MessageText:
+//
+// DNS signature failed to verify.
+//
+ DNS_ERROR_RCODE_BADSIG = DWORD(9016);
+ {$EXTERNALSYM DNS_ERROR_RCODE_BADSIG}
+
+// DNS_ERROR_RCODE_BADKEY 0x00002339
+//
+// MessageId: DNS_ERROR_RCODE_BADKEY
+//
+// MessageText:
+//
+// DNS bad key.
+//
+ DNS_ERROR_RCODE_BADKEY = DWORD(9017);
+ {$EXTERNALSYM DNS_ERROR_RCODE_BADKEY}
+
+// DNS_ERROR_RCODE_BADTIME 0x0000233a
+//
+// MessageId: DNS_ERROR_RCODE_BADTIME
+//
+// MessageText:
+//
+// DNS signature validity expired.
+//
+ DNS_ERROR_RCODE_BADTIME = DWORD(9018);
+ {$EXTERNALSYM DNS_ERROR_RCODE_BADTIME}
+
+ DNS_ERROR_RCODE_LAST = DNS_ERROR_RCODE_BADTIME;
+ {$EXTERNALSYM DNS_ERROR_RCODE_LAST}
+
+//
+// Packet format
+//
+
+ DNS_ERROR_PACKET_FMT_BASE = 9500;
+ {$EXTERNALSYM DNS_ERROR_PACKET_FMT_BASE}
+
+// DNS_INFO_NO_RECORDS 0x0000251d
+//
+// MessageId: DNS_INFO_NO_RECORDS
+//
+// MessageText:
+//
+// No records found for given DNS query.
+//
+ DNS_INFO_NO_RECORDS = DWORD(9501);
+ {$EXTERNALSYM DNS_INFO_NO_RECORDS}
+
+// DNS_ERROR_BAD_PACKET 0x0000251e
+//
+// MessageId: DNS_ERROR_BAD_PACKET
+//
+// MessageText:
+//
+// Bad DNS packet.
+//
+ DNS_ERROR_BAD_PACKET = DWORD(9502);
+ {$EXTERNALSYM DNS_ERROR_BAD_PACKET}
+
+// DNS_ERROR_NO_PACKET 0x0000251f
+//
+// MessageId: DNS_ERROR_NO_PACKET
+//
+// MessageText:
+//
+// No DNS packet.
+//
+ DNS_ERROR_NO_PACKET = DWORD(9503);
+ {$EXTERNALSYM DNS_ERROR_NO_PACKET}
+
+// DNS_ERROR_RCODE 0x00002520
+//
+// MessageId: DNS_ERROR_RCODE
+//
+// MessageText:
+//
+// DNS error, check rcode.
+//
+ DNS_ERROR_RCODE = DWORD(9504);
+ {$EXTERNALSYM DNS_ERROR_RCODE}
+
+// DNS_ERROR_UNSECURE_PACKET 0x00002521
+//
+// MessageId: DNS_ERROR_UNSECURE_PACKET
+//
+// MessageText:
+//
+// Unsecured DNS packet.
+//
+ DNS_ERROR_UNSECURE_PACKET = DWORD(9505);
+ {$EXTERNALSYM DNS_ERROR_UNSECURE_PACKET}
+
+ DNS_STATUS_PACKET_UNSECURE = DNS_ERROR_UNSECURE_PACKET;
+ {$EXTERNALSYM DNS_STATUS_PACKET_UNSECURE}
+
+//
+// General API errors
+//
+
+ DNS_ERROR_NO_MEMORY = ERROR_OUTOFMEMORY;
+ {$EXTERNALSYM DNS_ERROR_NO_MEMORY}
+ DNS_ERROR_INVALID_NAME = ERROR_INVALID_NAME;
+ {$EXTERNALSYM DNS_ERROR_INVALID_NAME}
+ DNS_ERROR_INVALID_DATA = ERROR_INVALID_DATA;
+ {$EXTERNALSYM DNS_ERROR_INVALID_DATA}
+
+ DNS_ERROR_GENERAL_API_BASE = 9550;
+ {$EXTERNALSYM DNS_ERROR_GENERAL_API_BASE}
+
+// DNS_ERROR_INVALID_TYPE 0x0000254f
+//
+// MessageId: DNS_ERROR_INVALID_TYPE
+//
+// MessageText:
+//
+// Invalid DNS type.
+//
+ DNS_ERROR_INVALID_TYPE = DWORD(9551);
+ {$EXTERNALSYM DNS_ERROR_INVALID_TYPE}
+
+// DNS_ERROR_INVALID_IP_ADDRESS 0x00002550
+//
+// MessageId: DNS_ERROR_INVALID_IP_ADDRESS
+//
+// MessageText:
+//
+// Invalid IP address.
+//
+ DNS_ERROR_INVALID_IP_ADDRESS = DWORD(9552);
+ {$EXTERNALSYM DNS_ERROR_INVALID_IP_ADDRESS}
+
+// DNS_ERROR_INVALID_PROPERTY 0x00002551
+//
+// MessageId: DNS_ERROR_INVALID_PROPERTY
+//
+// MessageText:
+//
+// Invalid property.
+//
+ DNS_ERROR_INVALID_PROPERTY = DWORD(9553);
+ {$EXTERNALSYM DNS_ERROR_INVALID_PROPERTY}
+
+// DNS_ERROR_TRY_AGAIN_LATER 0x00002552
+//
+// MessageId: DNS_ERROR_TRY_AGAIN_LATER
+//
+// MessageText:
+//
+// Try DNS operation again later.
+//
+ DNS_ERROR_TRY_AGAIN_LATER = DWORD(9554);
+ {$EXTERNALSYM DNS_ERROR_TRY_AGAIN_LATER}
+
+// DNS_ERROR_NOT_UNIQUE 0x00002553
+//
+// MessageId: DNS_ERROR_NOT_UNIQUE
+//
+// MessageText:
+//
+// Record for given name and type is not unique.
+//
+ DNS_ERROR_NOT_UNIQUE = DWORD(9555);
+ {$EXTERNALSYM DNS_ERROR_NOT_UNIQUE}
+
+// DNS_ERROR_NON_RFC_NAME 0x00002554
+//
+// MessageId: DNS_ERROR_NON_RFC_NAME
+//
+// MessageText:
+//
+// DNS name does not comply with RFC specifications.
+//
+ DNS_ERROR_NON_RFC_NAME = DWORD(9556);
+ {$EXTERNALSYM DNS_ERROR_NON_RFC_NAME}
+
+// DNS_STATUS_FQDN 0x00002555
+//
+// MessageId: DNS_STATUS_FQDN
+//
+// MessageText:
+//
+// DNS name is a fully-qualified DNS name.
+//
+ DNS_STATUS_FQDN = DWORD(9557);
+ {$EXTERNALSYM DNS_STATUS_FQDN}
+
+// DNS_STATUS_DOTTED_NAME 0x00002556
+//
+// MessageId: DNS_STATUS_DOTTED_NAME
+//
+// MessageText:
+//
+// DNS name is dotted (multi-label).
+//
+ DNS_STATUS_DOTTED_NAME = DWORD(9558);
+ {$EXTERNALSYM DNS_STATUS_DOTTED_NAME}
+
+// DNS_STATUS_SINGLE_PART_NAME 0x00002557
+//
+// MessageId: DNS_STATUS_SINGLE_PART_NAME
+//
+// MessageText:
+//
+// DNS name is a single-part name.
+//
+ DNS_STATUS_SINGLE_PART_NAME = DWORD(9559);
+ {$EXTERNALSYM DNS_STATUS_SINGLE_PART_NAME}
+
+// DNS_ERROR_INVALID_NAME_CHAR 0x00002558
+//
+// MessageId: DNS_ERROR_INVALID_NAME_CHAR
+//
+// MessageText:
+//
+// DNS name contains an invalid character.
+//
+ DNS_ERROR_INVALID_NAME_CHAR = DWORD(9560);
+ {$EXTERNALSYM DNS_ERROR_INVALID_NAME_CHAR}
+
+// DNS_ERROR_NUMERIC_NAME 0x00002559
+//
+// MessageId: DNS_ERROR_NUMERIC_NAME
+//
+// MessageText:
+//
+// DNS name is entirely numeric.
+//
+ DNS_ERROR_NUMERIC_NAME = DWORD(9561);
+ {$EXTERNALSYM DNS_ERROR_NUMERIC_NAME}
+
+// DNS_ERROR_NOT_ALLOWED_ON_ROOT_SERVER 0x0000255A
+//
+// MessageId: DNS_ERROR_NOT_ALLOWED_ON_ROOT_SERVER
+//
+// MessageText:
+//
+// The operation requested is not permitted on a DNS root server.
+//
+ DNS_ERROR_NOT_ALLOWED_ON_ROOT_SERVER = DWORD(9562);
+ {$EXTERNALSYM DNS_ERROR_NOT_ALLOWED_ON_ROOT_SERVER}
+
+// DNS_ERROR_NOT_ALLOWED_UNDER_DELEGATION 0x0000255B
+//
+// MessageId: DNS_ERROR_NOT_ALLOWED_UNDER_DELEGATION
+//
+// MessageText:
+//
+// The record could not be created because this part of the DNS namespace has
+// been delegated to another server.
+//
+ DNS_ERROR_NOT_ALLOWED_UNDER_DELEGATION = DWORD(9563);
+ {$EXTERNALSYM DNS_ERROR_NOT_ALLOWED_UNDER_DELEGATION}
+
+// DNS_ERROR_CANNOT_FIND_ROOT_HINTS 0x0000255C
+//
+// MessageId: DNS_ERROR_CANNOT_FIND_ROOT_HINTS
+//
+// MessageText:
+//
+// The DNS server could not find a set of root hints.
+//
+ DNS_ERROR_CANNOT_FIND_ROOT_HINTS = DWORD(9564);
+ {$EXTERNALSYM DNS_ERROR_CANNOT_FIND_ROOT_HINTS}
+
+// DNS_ERROR_INCONSISTENT_ROOT_HINTS 0x0000255D
+//
+// MessageId: DNS_ERROR_INCONSISTENT_ROOT_HINTS
+//
+// MessageText:
+//
+// The DNS server found root hints but they were not consistent across
+// all adapters.
+//
+ DNS_ERROR_INCONSISTENT_ROOT_HINTS = DWORD(9565);
+ {$EXTERNALSYM DNS_ERROR_INCONSISTENT_ROOT_HINTS}
+
+//
+// Zone errors
+//
+
+ DNS_ERROR_ZONE_BASE = 9600;
+ {$EXTERNALSYM DNS_ERROR_ZONE_BASE}
+
+// DNS_ERROR_ZONE_DOES_NOT_EXIST 0x00002581
+//
+// MessageId: DNS_ERROR_ZONE_DOES_NOT_EXIST
+//
+// MessageText:
+//
+// DNS zone does not exist.
+//
+ DNS_ERROR_ZONE_DOES_NOT_EXIST = DWORD(9601);
+ {$EXTERNALSYM DNS_ERROR_ZONE_DOES_NOT_EXIST}
+
+// DNS_ERROR_NO_ZONE_INFO 0x00002582
+//
+// MessageId: DNS_ERROR_NO_ZONE_INFO
+//
+// MessageText:
+//
+// DNS zone information not available.
+//
+ DNS_ERROR_NO_ZONE_INFO = DWORD(9602);
+ {$EXTERNALSYM DNS_ERROR_NO_ZONE_INFO}
+
+// DNS_ERROR_INVALID_ZONE_OPERATION 0x00002583
+//
+// MessageId: DNS_ERROR_INVALID_ZONE_OPERATION
+//
+// MessageText:
+//
+// Invalid operation for DNS zone.
+//
+ DNS_ERROR_INVALID_ZONE_OPERATION = DWORD(9603);
+ {$EXTERNALSYM DNS_ERROR_INVALID_ZONE_OPERATION}
+
+// DNS_ERROR_ZONE_CONFIGURATION_ERROR 0x00002584
+//
+// MessageId: DNS_ERROR_ZONE_CONFIGURATION_ERROR
+//
+// MessageText:
+//
+// Invalid DNS zone configuration.
+//
+ DNS_ERROR_ZONE_CONFIGURATION_ERROR = DWORD(9604);
+ {$EXTERNALSYM DNS_ERROR_ZONE_CONFIGURATION_ERROR}
+
+// DNS_ERROR_ZONE_HAS_NO_SOA_RECORD 0x00002585
+//
+// MessageId: DNS_ERROR_ZONE_HAS_NO_SOA_RECORD
+//
+// MessageText:
+//
+// DNS zone has no start of authority (SOA) record.
+//
+ DNS_ERROR_ZONE_HAS_NO_SOA_RECORD = DWORD(9605);
+ {$EXTERNALSYM DNS_ERROR_ZONE_HAS_NO_SOA_RECORD}
+
+// DNS_ERROR_ZONE_HAS_NO_NS_RECORDS 0x00002586
+//
+// MessageId: DNS_ERROR_ZONE_HAS_NO_NS_RECORDS
+//
+// MessageText:
+//
+// DNS zone has no Name Server (NS) record.
+//
+ DNS_ERROR_ZONE_HAS_NO_NS_RECORDS = DWORD(9606);
+ {$EXTERNALSYM DNS_ERROR_ZONE_HAS_NO_NS_RECORDS}
+
+// DNS_ERROR_ZONE_LOCKED 0x00002587
+//
+// MessageId: DNS_ERROR_ZONE_LOCKED
+//
+// MessageText:
+//
+// DNS zone is locked.
+//
+ DNS_ERROR_ZONE_LOCKED = DWORD(9607);
+ {$EXTERNALSYM DNS_ERROR_ZONE_LOCKED}
+
+// DNS_ERROR_ZONE_CREATION_FAILED 0x00002588
+//
+// MessageId: DNS_ERROR_ZONE_CREATION_FAILED
+//
+// MessageText:
+//
+// DNS zone creation failed.
+//
+ DNS_ERROR_ZONE_CREATION_FAILED = DWORD(9608);
+ {$EXTERNALSYM DNS_ERROR_ZONE_CREATION_FAILED}
+
+// DNS_ERROR_ZONE_ALREADY_EXISTS 0x00002589
+//
+// MessageId: DNS_ERROR_ZONE_ALREADY_EXISTS
+//
+// MessageText:
+//
+// DNS zone already exists.
+//
+ DNS_ERROR_ZONE_ALREADY_EXISTS = DWORD(9609);
+ {$EXTERNALSYM DNS_ERROR_ZONE_ALREADY_EXISTS}
+
+// DNS_ERROR_AUTOZONE_ALREADY_EXISTS 0x0000258a
+//
+// MessageId: DNS_ERROR_AUTOZONE_ALREADY_EXISTS
+//
+// MessageText:
+//
+// DNS automatic zone already exists.
+//
+ DNS_ERROR_AUTOZONE_ALREADY_EXISTS = DWORD(9610);
+ {$EXTERNALSYM DNS_ERROR_AUTOZONE_ALREADY_EXISTS}
+
+// DNS_ERROR_INVALID_ZONE_TYPE 0x0000258b
+//
+// MessageId: DNS_ERROR_INVALID_ZONE_TYPE
+//
+// MessageText:
+//
+// Invalid DNS zone type.
+//
+ DNS_ERROR_INVALID_ZONE_TYPE = DWORD(9611);
+ {$EXTERNALSYM DNS_ERROR_INVALID_ZONE_TYPE}
+
+// DNS_ERROR_SECONDARY_REQUIRES_MASTER_IP 0x0000258c
+//
+// MessageId: DNS_ERROR_SECONDARY_REQUIRES_MASTER_IP
+//
+// MessageText:
+//
+// Secondary DNS zone requires master IP address.
+//
+ DNS_ERROR_SECONDARY_REQUIRES_MASTER_IP = DWORD(9612);
+ {$EXTERNALSYM DNS_ERROR_SECONDARY_REQUIRES_MASTER_IP}
+
+// DNS_ERROR_ZONE_NOT_SECONDARY 0x0000258d
+//
+// MessageId: DNS_ERROR_ZONE_NOT_SECONDARY
+//
+// MessageText:
+//
+// DNS zone not secondary.
+//
+ DNS_ERROR_ZONE_NOT_SECONDARY = DWORD(9613);
+ {$EXTERNALSYM DNS_ERROR_ZONE_NOT_SECONDARY}
+
+// DNS_ERROR_NEED_SECONDARY_ADDRESSES 0x0000258e
+//
+// MessageId: DNS_ERROR_NEED_SECONDARY_ADDRESSES
+//
+// MessageText:
+//
+// Need secondary IP address.
+//
+ DNS_ERROR_NEED_SECONDARY_ADDRESSES = DWORD(9614);
+ {$EXTERNALSYM DNS_ERROR_NEED_SECONDARY_ADDRESSES}
+
+// DNS_ERROR_WINS_INIT_FAILED 0x0000258f
+//
+// MessageId: DNS_ERROR_WINS_INIT_FAILED
+//
+// MessageText:
+//
+// WINS initialization failed.
+//
+ DNS_ERROR_WINS_INIT_FAILED = DWORD(9615);
+ {$EXTERNALSYM DNS_ERROR_WINS_INIT_FAILED}
+
+// DNS_ERROR_NEED_WINS_SERVERS 0x00002590
+//
+// MessageId: DNS_ERROR_NEED_WINS_SERVERS
+//
+// MessageText:
+//
+// Need WINS servers.
+//
+ DNS_ERROR_NEED_WINS_SERVERS = DWORD(9616);
+ {$EXTERNALSYM DNS_ERROR_NEED_WINS_SERVERS}
+
+// DNS_ERROR_NBSTAT_INIT_FAILED 0x00002591
+//
+// MessageId: DNS_ERROR_NBSTAT_INIT_FAILED
+//
+// MessageText:
+//
+// NBTSTAT initialization call failed.
+//
+ DNS_ERROR_NBSTAT_INIT_FAILED = DWORD(9617);
+ {$EXTERNALSYM DNS_ERROR_NBSTAT_INIT_FAILED}
+
+// DNS_ERROR_SOA_DELETE_INVALID 0x00002592
+//
+// MessageId: DNS_ERROR_SOA_DELETE_INVALID
+//
+// MessageText:
+//
+// Invalid delete of start of authority (SOA)
+//
+ DNS_ERROR_SOA_DELETE_INVALID = DWORD(9618);
+ {$EXTERNALSYM DNS_ERROR_SOA_DELETE_INVALID}
+
+// DNS_ERROR_FORWARDER_ALREADY_EXISTS 0x00002593
+//
+// MessageId: DNS_ERROR_FORWARDER_ALREADY_EXISTS
+//
+// MessageText:
+//
+// A conditional forwarding zone already exists for that name.
+//
+ DNS_ERROR_FORWARDER_ALREADY_EXISTS = DWORD(9619);
+ {$EXTERNALSYM DNS_ERROR_FORWARDER_ALREADY_EXISTS}
+
+// DNS_ERROR_ZONE_REQUIRES_MASTER_IP 0x00002594
+//
+// MessageId: DNS_ERROR_ZONE_REQUIRES_MASTER_IP
+//
+// MessageText:
+//
+// This zone must be configured with one or more master DNS server IP addresses.
+//
+ DNS_ERROR_ZONE_REQUIRES_MASTER_IP = DWORD(9620);
+ {$EXTERNALSYM DNS_ERROR_ZONE_REQUIRES_MASTER_IP}
+
+// DNS_ERROR_ZONE_IS_SHUTDOWN 0x00002595
+//
+// MessageId: DNS_ERROR_ZONE_IS_SHUTDOWN
+//
+// MessageText:
+//
+// The operation cannot be performed because this zone is shutdown.
+//
+ DNS_ERROR_ZONE_IS_SHUTDOWN = DWORD(9621);
+ {$EXTERNALSYM DNS_ERROR_ZONE_IS_SHUTDOWN}
+
+//
+// Datafile errors
+//
+
+ DNS_ERROR_DATAFILE_BASE = 9650;
+ {$EXTERNALSYM DNS_ERROR_DATAFILE_BASE}
+
+// DNS 0x000025b3
+//
+// MessageId: DNS_ERROR_PRIMARY_REQUIRES_DATAFILE
+//
+// MessageText:
+//
+// Primary DNS zone requires datafile.
+//
+ DNS_ERROR_PRIMARY_REQUIRES_DATAFILE = DWORD(9651);
+ {$EXTERNALSYM DNS_ERROR_PRIMARY_REQUIRES_DATAFILE}
+
+// DNS 0x000025b4
+//
+// MessageId: DNS_ERROR_INVALID_DATAFILE_NAME
+//
+// MessageText:
+//
+// Invalid datafile name for DNS zone.
+//
+ DNS_ERROR_INVALID_DATAFILE_NAME = DWORD(9652);
+ {$EXTERNALSYM DNS_ERROR_INVALID_DATAFILE_NAME}
+
+// DNS 0x000025b5
+//
+// MessageId: DNS_ERROR_DATAFILE_OPEN_FAILURE
+//
+// MessageText:
+//
+// Failed to open datafile for DNS zone.
+//
+ DNS_ERROR_DATAFILE_OPEN_FAILURE = DWORD(9653);
+ {$EXTERNALSYM DNS_ERROR_DATAFILE_OPEN_FAILURE}
+
+// DNS 0x000025b6
+//
+// MessageId: DNS_ERROR_FILE_WRITEBACK_FAILED
+//
+// MessageText:
+//
+// Failed to write datafile for DNS zone.
+//
+ DNS_ERROR_FILE_WRITEBACK_FAILED = DWORD(9654);
+ {$EXTERNALSYM DNS_ERROR_FILE_WRITEBACK_FAILED}
+
+// DNS 0x000025b7
+//
+// MessageId: DNS_ERROR_DATAFILE_PARSING
+//
+// MessageText:
+//
+// Failure while reading datafile for DNS zone.
+//
+ DNS_ERROR_DATAFILE_PARSING = DWORD(9655);
+ {$EXTERNALSYM DNS_ERROR_DATAFILE_PARSING}
+
+//
+// Database errors
+//
+
+ DNS_ERROR_DATABASE_BASE = 9700;
+ {$EXTERNALSYM DNS_ERROR_DATABASE_BASE}
+
+// DNS_ERROR_RECORD_DOES_NOT_EXIST 0x000025e5
+//
+// MessageId: DNS_ERROR_RECORD_DOES_NOT_EXIST
+//
+// MessageText:
+//
+// DNS record does not exist.
+//
+ DNS_ERROR_RECORD_DOES_NOT_EXIST = DWORD(9701);
+ {$EXTERNALSYM DNS_ERROR_RECORD_DOES_NOT_EXIST}
+
+// DNS_ERROR_RECORD_FORMAT 0x000025e6
+//
+// MessageId: DNS_ERROR_RECORD_FORMAT
+//
+// MessageText:
+//
+// DNS record format error.
+//
+ DNS_ERROR_RECORD_FORMAT = DWORD(9702);
+ {$EXTERNALSYM DNS_ERROR_RECORD_FORMAT}
+
+// DNS_ERROR_NODE_CREATION_FAILED 0x000025e7
+//
+// MessageId: DNS_ERROR_NODE_CREATION_FAILED
+//
+// MessageText:
+//
+// Node creation failure in DNS.
+//
+ DNS_ERROR_NODE_CREATION_FAILED = DWORD(9703);
+ {$EXTERNALSYM DNS_ERROR_NODE_CREATION_FAILED}
+
+// DNS_ERROR_UNKNOWN_RECORD_TYPE 0x000025e8
+//
+// MessageId: DNS_ERROR_UNKNOWN_RECORD_TYPE
+//
+// MessageText:
+//
+// Unknown DNS record type.
+//
+ DNS_ERROR_UNKNOWN_RECORD_TYPE = DWORD(9704);
+ {$EXTERNALSYM DNS_ERROR_UNKNOWN_RECORD_TYPE}
+
+// DNS_ERROR_RECORD_TIMED_OUT 0x000025e9
+//
+// MessageId: DNS_ERROR_RECORD_TIMED_OUT
+//
+// MessageText:
+//
+// DNS record timed out.
+//
+ DNS_ERROR_RECORD_TIMED_OUT = DWORD(9705);
+ {$EXTERNALSYM DNS_ERROR_RECORD_TIMED_OUT}
+
+// DNS_ERROR_NAME_NOT_IN_ZONE 0x000025ea
+//
+// MessageId: DNS_ERROR_NAME_NOT_IN_ZONE
+//
+// MessageText:
+//
+// Name not in DNS zone.
+//
+ DNS_ERROR_NAME_NOT_IN_ZONE = DWORD(9706);
+ {$EXTERNALSYM DNS_ERROR_NAME_NOT_IN_ZONE}
+
+// DNS_ERROR_CNAME_LOOP 0x000025eb
+//
+// MessageId: DNS_ERROR_CNAME_LOOP
+//
+// MessageText:
+//
+// CNAME loop detected.
+//
+ DNS_ERROR_CNAME_LOOP = DWORD(9707);
+ {$EXTERNALSYM DNS_ERROR_CNAME_LOOP}
+
+// DNS_ERROR_NODE_IS_CNAME 0x000025ec
+//
+// MessageId: DNS_ERROR_NODE_IS_CNAME
+//
+// MessageText:
+//
+// Node is a CNAME DNS record.
+//
+ DNS_ERROR_NODE_IS_CNAME = DWORD(9708);
+ {$EXTERNALSYM DNS_ERROR_NODE_IS_CNAME}
+
+// DNS_ERROR_CNAME_COLLISION 0x000025ed
+//
+// MessageId: DNS_ERROR_CNAME_COLLISION
+//
+// MessageText:
+//
+// A CNAME record already exists for given name.
+//
+ DNS_ERROR_CNAME_COLLISION = DWORD(9709);
+ {$EXTERNALSYM DNS_ERROR_CNAME_COLLISION}
+
+// DNS_ERROR_RECORD_ONLY_AT_ZONE_ROOT 0x000025ee
+//
+// MessageId: DNS_ERROR_RECORD_ONLY_AT_ZONE_ROOT
+//
+// MessageText:
+//
+// Record only at DNS zone root.
+//
+ DNS_ERROR_RECORD_ONLY_AT_ZONE_ROOT = DWORD(9710);
+ {$EXTERNALSYM DNS_ERROR_RECORD_ONLY_AT_ZONE_ROOT}
+
+// DNS_ERROR_RECORD_ALREADY_EXISTS 0x000025ef
+//
+// MessageId: DNS_ERROR_RECORD_ALREADY_EXISTS
+//
+// MessageText:
+//
+// DNS record already exists.
+//
+ DNS_ERROR_RECORD_ALREADY_EXISTS = DWORD(9711);
+ {$EXTERNALSYM DNS_ERROR_RECORD_ALREADY_EXISTS}
+
+// DNS_ERROR_SECONDARY_DATA 0x000025f0
+//
+// MessageId: DNS_ERROR_SECONDARY_DATA
+//
+// MessageText:
+//
+// Secondary DNS zone data error.
+//
+ DNS_ERROR_SECONDARY_DATA = DWORD(9712);
+ {$EXTERNALSYM DNS_ERROR_SECONDARY_DATA}
+
+// DNS_ERROR_NO_CREATE_CACHE_DATA 0x000025f1
+//
+// MessageId: DNS_ERROR_NO_CREATE_CACHE_DATA
+//
+// MessageText:
+//
+// Could not create DNS cache data.
+//
+ DNS_ERROR_NO_CREATE_CACHE_DATA = DWORD(9713);
+ {$EXTERNALSYM DNS_ERROR_NO_CREATE_CACHE_DATA}
+
+// DNS_ERROR_NAME_DOES_NOT_EXIST 0x000025f2
+//
+// MessageId: DNS_ERROR_NAME_DOES_NOT_EXIST
+//
+// MessageText:
+//
+// DNS name does not exist.
+//
+ DNS_ERROR_NAME_DOES_NOT_EXIST = DWORD(9714);
+ {$EXTERNALSYM DNS_ERROR_NAME_DOES_NOT_EXIST}
+
+// DNS_WARNING_PTR_CREATE_FAILED 0x000025f3
+//
+// MessageId: DNS_WARNING_PTR_CREATE_FAILED
+//
+// MessageText:
+//
+// Could not create pointer (PTR) record.
+//
+ DNS_WARNING_PTR_CREATE_FAILED = DWORD(9715);
+ {$EXTERNALSYM DNS_WARNING_PTR_CREATE_FAILED}
+
+// DNS_WARNING_DOMAIN_UNDELETED 0x000025f4
+//
+// MessageId: DNS_WARNING_DOMAIN_UNDELETED
+//
+// MessageText:
+//
+// DNS domain was undeleted.
+//
+ DNS_WARNING_DOMAIN_UNDELETED = DWORD(9716);
+ {$EXTERNALSYM DNS_WARNING_DOMAIN_UNDELETED}
+
+// DNS_ERROR_DS_UNAVAILABLE 0x000025f5
+//
+// MessageId: DNS_ERROR_DS_UNAVAILABLE
+//
+// MessageText:
+//
+// The directory service is unavailable.
+//
+ DNS_ERROR_DS_UNAVAILABLE = DWORD(9717);
+ {$EXTERNALSYM DNS_ERROR_DS_UNAVAILABLE}
+
+// DNS_ERROR_DS_ZONE_ALREADY_EXISTS 0x000025f6
+//
+// MessageId: DNS_ERROR_DS_ZONE_ALREADY_EXISTS
+//
+// MessageText:
+//
+// DNS zone already exists in the directory service.
+//
+ DNS_ERROR_DS_ZONE_ALREADY_EXISTS = DWORD(9718);
+ {$EXTERNALSYM DNS_ERROR_DS_ZONE_ALREADY_EXISTS}
+
+// DNS_ERROR_NO_BOOTFILE_IF_DS_ZONE 0x000025f7
+//
+// MessageId: DNS_ERROR_NO_BOOTFILE_IF_DS_ZONE
+//
+// MessageText:
+//
+// DNS server not creating or reading the boot file for the directory service integrated DNS zone.
+//
+ DNS_ERROR_NO_BOOTFILE_IF_DS_ZONE = DWORD(9719);
+ {$EXTERNALSYM DNS_ERROR_NO_BOOTFILE_IF_DS_ZONE}
+
+//
+// Operation errors
+//
+
+ DNS_ERROR_OPERATION_BASE = 9750;
+ {$EXTERNALSYM DNS_ERROR_OPERATION_BASE}
+
+// DNS_INFO_AXFR_COMPLETE 0x00002617
+//
+// MessageId: DNS_INFO_AXFR_COMPLETE
+//
+// MessageText:
+//
+// DNS AXFR (zone transfer) complete.
+//
+ DNS_INFO_AXFR_COMPLETE = DWORD(9751);
+ {$EXTERNALSYM DNS_INFO_AXFR_COMPLETE}
+
+// DNS_ERROR_AXFR 0x00002618
+//
+// MessageId: DNS_ERROR_AXFR
+//
+// MessageText:
+//
+// DNS zone transfer failed.
+//
+ DNS_ERROR_AXFR = DWORD(9752);
+ {$EXTERNALSYM DNS_ERROR_AXFR}
+
+// DNS_INFO_ADDED_LOCAL_WINS 0x00002619
+//
+// MessageId: DNS_INFO_ADDED_LOCAL_WINS
+//
+// MessageText:
+//
+// Added local WINS server.
+//
+ DNS_INFO_ADDED_LOCAL_WINS = DWORD(9753);
+ {$EXTERNALSYM DNS_INFO_ADDED_LOCAL_WINS}
+
+//
+// Secure update
+//
+
+ DNS_ERROR_SECURE_BASE = 9800;
+ {$EXTERNALSYM DNS_ERROR_SECURE_BASE}
+
+// DNS_STATUS_CONTINUE_NEEDED 0x00002649
+//
+// MessageId: DNS_STATUS_CONTINUE_NEEDED
+//
+// MessageText:
+//
+// Secure update call needs to continue update request.
+//
+ DNS_STATUS_CONTINUE_NEEDED = DWORD(9801);
+ {$EXTERNALSYM DNS_STATUS_CONTINUE_NEEDED}
+
+//
+// Setup errors
+//
+
+ DNS_ERROR_SETUP_BASE = 9850;
+ {$EXTERNALSYM DNS_ERROR_SETUP_BASE}
+
+// DNS_ERROR_NO_TCPIP 0x0000267b
+//
+// MessageId: DNS_ERROR_NO_TCPIP
+//
+// MessageText:
+//
+// TCP/IP network protocol not installed.
+//
+ DNS_ERROR_NO_TCPIP = DWORD(9851);
+ {$EXTERNALSYM DNS_ERROR_NO_TCPIP}
+
+// DNS_ERROR_NO_DNS_SERVERS 0x0000267c
+//
+// MessageId: DNS_ERROR_NO_DNS_SERVERS
+//
+// MessageText:
+//
+// No DNS servers configured for local system.
+//
+ DNS_ERROR_NO_DNS_SERVERS = DWORD(9852);
+ {$EXTERNALSYM DNS_ERROR_NO_DNS_SERVERS}
+
+//
+// Directory partition (DP) errors
+//
+
+ DNS_ERROR_DP_BASE = 9900;
+ {$EXTERNALSYM DNS_ERROR_DP_BASE}
+
+// DNS_ERROR_DP_DOES_NOT_EXIST 0x000026ad
+//
+// MessageId: DNS_ERROR_DP_DOES_NOT_EXIST
+//
+// MessageText:
+//
+// The specified directory partition does not exist.
+//
+ DNS_ERROR_DP_DOES_NOT_EXIST = DWORD(9901);
+ {$EXTERNALSYM DNS_ERROR_DP_DOES_NOT_EXIST}
+
+// DNS_ERROR_DP_ALREADY_EXISTS 0x000026ae
+//
+// MessageId: DNS_ERROR_DP_ALREADY_EXISTS
+//
+// MessageText:
+//
+// The specified directory partition already exists.
+//
+ DNS_ERROR_DP_ALREADY_EXISTS = DWORD(9902);
+ {$EXTERNALSYM DNS_ERROR_DP_ALREADY_EXISTS}
+
+// DNS_ERROR_DP_NOT_ENLISTED 0x000026af
+//
+// MessageId: DNS_ERROR_DP_NOT_ENLISTED
+//
+// MessageText:
+//
+// This DNS server is not enlisted in the specified directory partition.
+//
+ DNS_ERROR_DP_NOT_ENLISTED = DWORD(9903);
+ {$EXTERNALSYM DNS_ERROR_DP_NOT_ENLISTED}
+
+// DNS_ERROR_DP_ALREADY_ENLISTED 0x000026b0
+//
+// MessageId: DNS_ERROR_DP_ALREADY_ENLISTED
+//
+// MessageText:
+//
+// This DNS server is already enlisted in the specified directory partition.
+//
+ DNS_ERROR_DP_ALREADY_ENLISTED = DWORD(9904);
+ {$EXTERNALSYM DNS_ERROR_DP_ALREADY_ENLISTED}
+
+// DNS_ERROR_DP_NOT_AVAILABLE 0x000026b1
+//
+// MessageId: DNS_ERROR_DP_NOT_AVAILABLE
+//
+// MessageText:
+//
+// The directory partition is not available at this time. Please wait
+// a few minutes and try again.
+//
+ DNS_ERROR_DP_NOT_AVAILABLE = DWORD(9905);
+ {$EXTERNALSYM DNS_ERROR_DP_NOT_AVAILABLE}
+
+// DNS_ERROR_DP_FSMO_ERROR 0x000026b2
+//
+// MessageId: DNS_ERROR_DP_FSMO_ERROR
+//
+// MessageText:
+//
+// The application directory partition operation failed. The domain controller
+// holding the domain naming master role is down or unable to service the
+// request or is not running Windows Server 2003.
+//
+ DNS_ERROR_DP_FSMO_ERROR = DWORD(9906);
+ {$EXTERNALSYM DNS_ERROR_DP_FSMO_ERROR}
+
+///////////////////////////////////////////////////
+// //
+// End of DNS Error Codes //
+// //
+// 9000 to 9999 //
+///////////////////////////////////////////////////
+
+///////////////////////////////////////////////////
+// //
+// WinSock Error Codes //
+// //
+// 10000 to 11999 //
+///////////////////////////////////////////////////
+
+//
+// WinSock error codes are also defined in WinSock.h
+// and WinSock2.h, hence the IFDEF
+//
+ WSABASEERR = 10000;
+ {$EXTERNALSYM WSABASEERR}
+//
+// MessageId: WSAEINTR
+//
+// MessageText:
+//
+// A blocking operation was interrupted by a call to WSACancelBlockingCall.
+//
+ WSAEINTR = DWORD(10004);
+ {$EXTERNALSYM WSAEINTR}
+
+//
+// MessageId: WSAEBADF
+//
+// MessageText:
+//
+// The file handle supplied is not valid.
+//
+ WSAEBADF = DWORD(10009);
+ {$EXTERNALSYM WSAEBADF}
+
+//
+// MessageId: WSAEACCES
+//
+// MessageText:
+//
+// An attempt was made to access a socket in a way forbidden by its access permissions.
+//
+ WSAEACCES = DWORD(10013);
+ {$EXTERNALSYM WSAEACCES}
+
+//
+// MessageId: WSAEFAULT
+//
+// MessageText:
+//
+// The system detected an invalid pointer address in attempting to use a pointer argument in a call.
+//
+ WSAEFAULT = DWORD(10014);
+ {$EXTERNALSYM WSAEFAULT}
+
+//
+// MessageId: WSAEINVAL
+//
+// MessageText:
+//
+// An invalid argument was supplied.
+//
+ WSAEINVAL = DWORD(10022);
+ {$EXTERNALSYM WSAEINVAL}
+
+//
+// MessageId: WSAEMFILE
+//
+// MessageText:
+//
+// Too many open sockets.
+//
+ WSAEMFILE = DWORD(10024);
+ {$EXTERNALSYM WSAEMFILE}
+
+//
+// MessageId: WSAEWOULDBLOCK
+//
+// MessageText:
+//
+// A non-blocking socket operation could not be completed immediately.
+//
+ WSAEWOULDBLOCK = DWORD(10035);
+ {$EXTERNALSYM WSAEWOULDBLOCK}
+
+//
+// MessageId: WSAEINPROGRESS
+//
+// MessageText:
+//
+// A blocking operation is currently executing.
+//
+ WSAEINPROGRESS = DWORD(10036);
+ {$EXTERNALSYM WSAEINPROGRESS}
+
+//
+// MessageId: WSAEALREADY
+//
+// MessageText:
+//
+// An operation was attempted on a non-blocking socket that already had an operation in progress.
+//
+ WSAEALREADY = DWORD(10037);
+ {$EXTERNALSYM WSAEALREADY}
+
+//
+// MessageId: WSAENOTSOCK
+//
+// MessageText:
+//
+// An operation was attempted on something that is not a socket.
+//
+ WSAENOTSOCK = DWORD(10038);
+ {$EXTERNALSYM WSAENOTSOCK}
+
+//
+// MessageId: WSAEDESTADDRREQ
+//
+// MessageText:
+//
+// A required address was omitted from an operation on a socket.
+//
+ WSAEDESTADDRREQ = DWORD(10039);
+ {$EXTERNALSYM WSAEDESTADDRREQ}
+
+//
+// MessageId: WSAEMSGSIZE
+//
+// MessageText:
+//
+// A message sent on a datagram socket was larger than the internal message buffer or some other network limit, or the buffer used to receive a datagram into was smaller than the datagram itself.
+//
+ WSAEMSGSIZE = DWORD(10040);
+ {$EXTERNALSYM WSAEMSGSIZE}
+
+//
+// MessageId: WSAEPROTOTYPE
+//
+// MessageText:
+//
+// A protocol was specified in the socket function call that does not support the semantics of the socket type requested.
+//
+ WSAEPROTOTYPE = DWORD(10041);
+ {$EXTERNALSYM WSAEPROTOTYPE}
+
+//
+// MessageId: WSAENOPROTOOPT
+//
+// MessageText:
+//
+// An unknown, invalid, or unsupported option or level was specified in a getsockopt or setsockopt call.
+//
+ WSAENOPROTOOPT = DWORD(10042);
+ {$EXTERNALSYM WSAENOPROTOOPT}
+
+//
+// MessageId: WSAEPROTONOSUPPORT
+//
+// MessageText:
+//
+// The requested protocol has not been configured into the system, or no implementation for it exists.
+//
+ WSAEPROTONOSUPPORT = DWORD(10043);
+ {$EXTERNALSYM WSAEPROTONOSUPPORT}
+
+//
+// MessageId: WSAESOCKTNOSUPPORT
+//
+// MessageText:
+//
+// The support for the specified socket type does not exist in this address family.
+//
+ WSAESOCKTNOSUPPORT = DWORD(10044);
+ {$EXTERNALSYM WSAESOCKTNOSUPPORT}
+
+//
+// MessageId: WSAEOPNOTSUPP
+//
+// MessageText:
+//
+// The attempted operation is not supported for the type of object referenced.
+//
+ WSAEOPNOTSUPP = DWORD(10045);
+ {$EXTERNALSYM WSAEOPNOTSUPP}
+
+//
+// MessageId: WSAEPFNOSUPPORT
+//
+// MessageText:
+//
+// The protocol family has not been configured into the system or no implementation for it exists.
+//
+ WSAEPFNOSUPPORT = DWORD(10046);
+ {$EXTERNALSYM WSAEPFNOSUPPORT}
+
+//
+// MessageId: WSAEAFNOSUPPORT
+//
+// MessageText:
+//
+// An address incompatible with the requested protocol was used.
+//
+ WSAEAFNOSUPPORT = DWORD(10047);
+ {$EXTERNALSYM WSAEAFNOSUPPORT}
+
+//
+// MessageId: WSAEADDRINUSE
+//
+// MessageText:
+//
+// Only one usage of each socket address (protocol/network address/port) is normally permitted.
+//
+ WSAEADDRINUSE = DWORD(10048);
+ {$EXTERNALSYM WSAEADDRINUSE}
+
+//
+// MessageId: WSAEADDRNOTAVAIL
+//
+// MessageText:
+//
+// The requested address is not valid in its context.
+//
+ WSAEADDRNOTAVAIL = DWORD(10049);
+ {$EXTERNALSYM WSAEADDRNOTAVAIL}
+
+//
+// MessageId: WSAENETDOWN
+//
+// MessageText:
+//
+// A socket operation encountered a dead network.
+//
+ WSAENETDOWN = DWORD(10050);
+ {$EXTERNALSYM WSAENETDOWN}
+
+//
+// MessageId: WSAENETUNREACH
+//
+// MessageText:
+//
+// A socket operation was attempted to an unreachable network.
+//
+ WSAENETUNREACH = DWORD(10051);
+ {$EXTERNALSYM WSAENETUNREACH}
+
+//
+// MessageId: WSAENETRESET
+//
+// MessageText:
+//
+// The connection has been broken due to keep-alive activity detecting a failure while the operation was in progress.
+//
+ WSAENETRESET = DWORD(10052);
+ {$EXTERNALSYM WSAENETRESET}
+
+//
+// MessageId: WSAECONNABORTED
+//
+// MessageText:
+//
+// An established connection was aborted by the software in your host machine.
+//
+ WSAECONNABORTED = DWORD(10053);
+ {$EXTERNALSYM WSAECONNABORTED}
+
+//
+// MessageId: WSAECONNRESET
+//
+// MessageText:
+//
+// An existing connection was forcibly closed by the remote host.
+//
+ WSAECONNRESET = DWORD(10054);
+ {$EXTERNALSYM WSAECONNRESET}
+
+//
+// MessageId: WSAENOBUFS
+//
+// MessageText:
+//
+// An operation on a socket could not be performed because the system lacked sufficient buffer space or because a queue was full.
+//
+ WSAENOBUFS = DWORD(10055);
+ {$EXTERNALSYM WSAENOBUFS}
+
+//
+// MessageId: WSAEISCONN
+//
+// MessageText:
+//
+// A connect request was made on an already connected socket.
+//
+ WSAEISCONN = DWORD(10056);
+ {$EXTERNALSYM WSAEISCONN}
+
+//
+// MessageId: WSAENOTCONN
+//
+// MessageText:
+//
+// A request to send or receive data was disallowed because the socket is not connected and (when sending on a datagram socket using a sendto call) no address was supplied.
+//
+ WSAENOTCONN = DWORD(10057);
+ {$EXTERNALSYM WSAENOTCONN}
+
+//
+// MessageId: WSAESHUTDOWN
+//
+// MessageText:
+//
+// A request to send or receive data was disallowed because the socket had already been shut down in that direction with a previous shutdown call.
+//
+ WSAESHUTDOWN = DWORD(10058);
+ {$EXTERNALSYM WSAESHUTDOWN}
+
+//
+// MessageId: WSAETOOMANYREFS
+//
+// MessageText:
+//
+// Too many references to some kernel object.
+//
+ WSAETOOMANYREFS = DWORD(10059);
+ {$EXTERNALSYM WSAETOOMANYREFS}
+
+//
+// MessageId: WSAETIMEDOUT
+//
+// MessageText:
+//
+// A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
+//
+ WSAETIMEDOUT = DWORD(10060);
+ {$EXTERNALSYM WSAETIMEDOUT}
+
+//
+// MessageId: WSAECONNREFUSED
+//
+// MessageText:
+//
+// No connection could be made because the target machine actively refused it.
+//
+ WSAECONNREFUSED = DWORD(10061);
+ {$EXTERNALSYM WSAECONNREFUSED}
+
+//
+// MessageId: WSAELOOP
+//
+// MessageText:
+//
+// Cannot translate name.
+//
+ WSAELOOP = DWORD(10062);
+ {$EXTERNALSYM WSAELOOP}
+
+//
+// MessageId: WSAENAMETOOLONG
+//
+// MessageText:
+//
+// Name component or name was too long.
+//
+ WSAENAMETOOLONG = DWORD(10063);
+ {$EXTERNALSYM WSAENAMETOOLONG}
+
+//
+// MessageId: WSAEHOSTDOWN
+//
+// MessageText:
+//
+// A socket operation failed because the destination host was down.
+//
+ WSAEHOSTDOWN = DWORD(10064);
+ {$EXTERNALSYM WSAEHOSTDOWN}
+
+//
+// MessageId: WSAEHOSTUNREACH
+//
+// MessageText:
+//
+// A socket operation was attempted to an unreachable host.
+//
+ WSAEHOSTUNREACH = DWORD(10065);
+ {$EXTERNALSYM WSAEHOSTUNREACH}
+
+//
+// MessageId: WSAENOTEMPTY
+//
+// MessageText:
+//
+// Cannot remove a directory that is not empty.
+//
+ WSAENOTEMPTY = DWORD(10066);
+ {$EXTERNALSYM WSAENOTEMPTY}
+
+//
+// MessageId: WSAEPROCLIM
+//
+// MessageText:
+//
+// A Windows Sockets implementation may have a limit on the number of applications that may use it simultaneously.
+//
+ WSAEPROCLIM = DWORD(10067);
+ {$EXTERNALSYM WSAEPROCLIM}
+
+//
+// MessageId: WSAEUSERS
+//
+// MessageText:
+//
+// Ran out of quota.
+//
+ WSAEUSERS = DWORD(10068);
+ {$EXTERNALSYM WSAEUSERS}
+
+//
+// MessageId: WSAEDQUOT
+//
+// MessageText:
+//
+// Ran out of disk quota.
+//
+ WSAEDQUOT = DWORD(10069);
+ {$EXTERNALSYM WSAEDQUOT}
+
+//
+// MessageId: WSAESTALE
+//
+// MessageText:
+//
+// File handle reference is no longer available.
+//
+ WSAESTALE = DWORD(10070);
+ {$EXTERNALSYM WSAESTALE}
+
+//
+// MessageId: WSAEREMOTE
+//
+// MessageText:
+//
+// Item is not available locally.
+//
+ WSAEREMOTE = DWORD(10071);
+ {$EXTERNALSYM WSAEREMOTE}
+
+//
+// MessageId: WSASYSNOTREADY
+//
+// MessageText:
+//
+// WSAStartup cannot function at this time because the underlying system it uses to provide network services is currently unavailable.
+//
+ WSASYSNOTREADY = DWORD(10091);
+ {$EXTERNALSYM WSASYSNOTREADY}
+
+//
+// MessageId: WSAVERNOTSUPPORTED
+//
+// MessageText:
+//
+// The Windows Sockets version requested is not supported.
+//
+ WSAVERNOTSUPPORTED = DWORD(10092);
+ {$EXTERNALSYM WSAVERNOTSUPPORTED}
+
+//
+// MessageId: WSANOTINITIALISED
+//
+// MessageText:
+//
+// Either the application has not called WSAStartup, or WSAStartup failed.
+//
+ WSANOTINITIALISED = DWORD(10093);
+ {$EXTERNALSYM WSANOTINITIALISED}
+
+//
+// MessageId: WSAEDISCON
+//
+// MessageText:
+//
+// Returned by WSARecv or WSARecvFrom to indicate the remote party has initiated a graceful shutdown sequence.
+//
+ WSAEDISCON = DWORD(10101);
+ {$EXTERNALSYM WSAEDISCON}
+
+//
+// MessageId: WSAENOMORE
+//
+// MessageText:
+//
+// No more results can be returned by WSALookupServiceNext.
+//
+ WSAENOMORE = DWORD(10102);
+ {$EXTERNALSYM WSAENOMORE}
+
+//
+// MessageId: WSAECANCELLED
+//
+// MessageText:
+//
+// A call to WSALookupServiceEnd was made while this call was still processing. The call has been canceled.
+//
+ WSAECANCELLED = DWORD(10103);
+ {$EXTERNALSYM WSAECANCELLED}
+
+//
+// MessageId: WSAEINVALIDPROCTABLE
+//
+// MessageText:
+//
+// The procedure call table is invalid.
+//
+ WSAEINVALIDPROCTABLE = DWORD(10104);
+ {$EXTERNALSYM WSAEINVALIDPROCTABLE}
+
+//
+// MessageId: WSAEINVALIDPROVIDER
+//
+// MessageText:
+//
+// The requested service provider is invalid.
+//
+ WSAEINVALIDPROVIDER = DWORD(10105);
+ {$EXTERNALSYM WSAEINVALIDPROVIDER}
+
+//
+// MessageId: WSAEPROVIDERFAILEDINIT
+//
+// MessageText:
+//
+// The requested service provider could not be loaded or initialized.
+//
+ WSAEPROVIDERFAILEDINIT = DWORD(10106);
+ {$EXTERNALSYM WSAEPROVIDERFAILEDINIT}
+
+//
+// MessageId: WSASYSCALLFAILURE
+//
+// MessageText:
+//
+// A system call that should never fail has failed.
+//
+ WSASYSCALLFAILURE = DWORD(10107);
+ {$EXTERNALSYM WSASYSCALLFAILURE}
+
+//
+// MessageId: WSASERVICE_NOT_FOUND
+//
+// MessageText:
+//
+// No such service is known. The service cannot be found in the specified name space.
+//
+ WSASERVICE_NOT_FOUND = DWORD(10108);
+ {$EXTERNALSYM WSASERVICE_NOT_FOUND}
+
+//
+// MessageId: WSATYPE_NOT_FOUND
+//
+// MessageText:
+//
+// The specified class was not found.
+//
+ WSATYPE_NOT_FOUND = DWORD(10109);
+ {$EXTERNALSYM WSATYPE_NOT_FOUND}
+
+//
+// MessageId: WSA_E_NO_MORE
+//
+// MessageText:
+//
+// No more results can be returned by WSALookupServiceNext.
+//
+ WSA_E_NO_MORE = DWORD(10110);
+ {$EXTERNALSYM WSA_E_NO_MORE}
+
+//
+// MessageId: WSA_E_CANCELLED
+//
+// MessageText:
+//
+// A call to WSALookupServiceEnd was made while this call was still processing. The call has been canceled.
+//
+ WSA_E_CANCELLED = DWORD(10111);
+ {$EXTERNALSYM WSA_E_CANCELLED}
+
+//
+// MessageId: WSAEREFUSED
+//
+// MessageText:
+//
+// A database query failed because it was actively refused.
+//
+ WSAEREFUSED = DWORD(10112);
+ {$EXTERNALSYM WSAEREFUSED}
+
+//
+// MessageId: WSAHOST_NOT_FOUND
+//
+// MessageText:
+//
+// No such host is known.
+//
+ WSAHOST_NOT_FOUND = DWORD(11001);
+ {$EXTERNALSYM WSAHOST_NOT_FOUND}
+
+//
+// MessageId: WSATRY_AGAIN
+//
+// MessageText:
+//
+// This is usually a temporary error during hostname resolution and means that the local server did not receive a response from an authoritative server.
+//
+ WSATRY_AGAIN = DWORD(11002);
+ {$EXTERNALSYM WSATRY_AGAIN}
+
+//
+// MessageId: WSANO_RECOVERY
+//
+// MessageText:
+//
+// A non-recoverable error occurred during a database lookup.
+//
+ WSANO_RECOVERY = DWORD(11003);
+ {$EXTERNALSYM WSANO_RECOVERY}
+
+//
+// MessageId: WSANO_DATA
+//
+// MessageText:
+//
+// The requested name is valid, but no data of the requested type was found.
+//
+ WSANO_DATA = DWORD(11004);
+ {$EXTERNALSYM WSANO_DATA}
+
+//
+// MessageId: WSA_QOS_RECEIVERS
+//
+// MessageText:
+//
+// At least one reserve has arrived.
+//
+ WSA_QOS_RECEIVERS = DWORD(11005);
+ {$EXTERNALSYM WSA_QOS_RECEIVERS}
+
+//
+// MessageId: WSA_QOS_SENDERS
+//
+// MessageText:
+//
+// At least one path has arrived.
+//
+ WSA_QOS_SENDERS = DWORD(11006);
+ {$EXTERNALSYM WSA_QOS_SENDERS}
+
+//
+// MessageId: WSA_QOS_NO_SENDERS
+//
+// MessageText:
+//
+// There are no senders.
+//
+ WSA_QOS_NO_SENDERS = DWORD(11007);
+ {$EXTERNALSYM WSA_QOS_NO_SENDERS}
+
+//
+// MessageId: WSA_QOS_NO_RECEIVERS
+//
+// MessageText:
+//
+// There are no receivers.
+//
+ WSA_QOS_NO_RECEIVERS = DWORD(11008);
+ {$EXTERNALSYM WSA_QOS_NO_RECEIVERS}
+
+//
+// MessageId: WSA_QOS_REQUEST_CONFIRMED
+//
+// MessageText:
+//
+// Reserve has been confirmed.
+//
+ WSA_QOS_REQUEST_CONFIRMED = DWORD(11009);
+ {$EXTERNALSYM WSA_QOS_REQUEST_CONFIRMED}
+
+//
+// MessageId: WSA_QOS_ADMISSION_FAILURE
+//
+// MessageText:
+//
+// Error due to lack of resources.
+//
+ WSA_QOS_ADMISSION_FAILURE = DWORD(11010);
+ {$EXTERNALSYM WSA_QOS_ADMISSION_FAILURE}
+
+//
+// MessageId: WSA_QOS_POLICY_FAILURE
+//
+// MessageText:
+//
+// Rejected for administrative reasons - bad credentials.
+//
+ WSA_QOS_POLICY_FAILURE = DWORD(11011);
+ {$EXTERNALSYM WSA_QOS_POLICY_FAILURE}
+
+//
+// MessageId: WSA_QOS_BAD_STYLE
+//
+// MessageText:
+//
+// Unknown or conflicting style.
+//
+ WSA_QOS_BAD_STYLE = DWORD(11012);
+ {$EXTERNALSYM WSA_QOS_BAD_STYLE}
+
+//
+// MessageId: WSA_QOS_BAD_OBJECT
+//
+// MessageText:
+//
+// Problem with some part of the filterspec or providerspecific buffer in general.
+//
+ WSA_QOS_BAD_OBJECT = DWORD(11013);
+ {$EXTERNALSYM WSA_QOS_BAD_OBJECT}
+
+//
+// MessageId: WSA_QOS_TRAFFIC_CTRL_ERROR
+//
+// MessageText:
+//
+// Problem with some part of the flowspec.
+//
+ WSA_QOS_TRAFFIC_CTRL_ERROR = DWORD(11014);
+ {$EXTERNALSYM WSA_QOS_TRAFFIC_CTRL_ERROR}
+
+//
+// MessageId: WSA_QOS_GENERIC_ERROR
+//
+// MessageText:
+//
+// General QOS error.
+//
+ WSA_QOS_GENERIC_ERROR = DWORD(11015);
+ {$EXTERNALSYM WSA_QOS_GENERIC_ERROR}
+
+//
+// MessageId: WSA_QOS_ESERVICETYPE
+//
+// MessageText:
+//
+// An invalid or unrecognized service type was found in the flowspec.
+//
+ WSA_QOS_ESERVICETYPE = DWORD(11016);
+ {$EXTERNALSYM WSA_QOS_ESERVICETYPE}
+
+//
+// MessageId: WSA_QOS_EFLOWSPEC
+//
+// MessageText:
+//
+// An invalid or inconsistent flowspec was found in the QOS structure.
+//
+ WSA_QOS_EFLOWSPEC = DWORD(11017);
+ {$EXTERNALSYM WSA_QOS_EFLOWSPEC}
+
+//
+// MessageId: WSA_QOS_EPROVSPECBUF
+//
+// MessageText:
+//
+// Invalid QOS provider-specific buffer.
+//
+ WSA_QOS_EPROVSPECBUF = DWORD(11018);
+ {$EXTERNALSYM WSA_QOS_EPROVSPECBUF}
+
+//
+// MessageId: WSA_QOS_EFILTERSTYLE
+//
+// MessageText:
+//
+// An invalid QOS filter style was used.
+//
+ WSA_QOS_EFILTERSTYLE = DWORD(11019);
+ {$EXTERNALSYM WSA_QOS_EFILTERSTYLE}
+
+//
+// MessageId: WSA_QOS_EFILTERTYPE
+//
+// MessageText:
+//
+// An invalid QOS filter type was used.
+//
+ WSA_QOS_EFILTERTYPE = DWORD(11020);
+ {$EXTERNALSYM WSA_QOS_EFILTERTYPE}
+
+//
+// MessageId: WSA_QOS_EFILTERCOUNT
+//
+// MessageText:
+//
+// An incorrect number of QOS FILTERSPECs were specified in the FLOWDESCRIPTOR.
+//
+ WSA_QOS_EFILTERCOUNT = DWORD(11021);
+ {$EXTERNALSYM WSA_QOS_EFILTERCOUNT}
+
+//
+// MessageId: WSA_QOS_EOBJLENGTH
+//
+// MessageText:
+//
+// An object with an invalid ObjectLength field was specified in the QOS provider-specific buffer.
+//
+ WSA_QOS_EOBJLENGTH = DWORD(11022);
+ {$EXTERNALSYM WSA_QOS_EOBJLENGTH}
+
+//
+// MessageId: WSA_QOS_EFLOWCOUNT
+//
+// MessageText:
+//
+// An incorrect number of flow descriptors was specified in the QOS structure.
+//
+ WSA_QOS_EFLOWCOUNT = DWORD(11023);
+ {$EXTERNALSYM WSA_QOS_EFLOWCOUNT}
+
+//
+// MessageId: WSA_QOS_EUNKOWNPSOBJ
+//
+// MessageText:
+//
+// An unrecognized object was found in the QOS provider-specific buffer.
+//
+ WSA_QOS_EUNKOWNPSOBJ = DWORD(11024);
+ {$EXTERNALSYM WSA_QOS_EUNKOWNPSOBJ}
+
+//
+// MessageId: WSA_QOS_EPOLICYOBJ
+//
+// MessageText:
+//
+// An invalid policy object was found in the QOS provider-specific buffer.
+//
+ WSA_QOS_EPOLICYOBJ = DWORD(11025);
+ {$EXTERNALSYM WSA_QOS_EPOLICYOBJ}
+
+//
+// MessageId: WSA_QOS_EFLOWDESC
+//
+// MessageText:
+//
+// An invalid QOS flow descriptor was found in the flow descriptor list.
+//
+ WSA_QOS_EFLOWDESC = DWORD(11026);
+ {$EXTERNALSYM WSA_QOS_EFLOWDESC}
+
+//
+// MessageId: WSA_QOS_EPSFLOWSPEC
+//
+// MessageText:
+//
+// An invalid or inconsistent flowspec was found in the QOS provider specific buffer.
+//
+ WSA_QOS_EPSFLOWSPEC = DWORD(11027);
+ {$EXTERNALSYM WSA_QOS_EPSFLOWSPEC}
+
+//
+// MessageId: WSA_QOS_EPSFILTERSPEC
+//
+// MessageText:
+//
+// An invalid FILTERSPEC was found in the QOS provider-specific buffer.
+//
+ WSA_QOS_EPSFILTERSPEC = DWORD(11028);
+ {$EXTERNALSYM WSA_QOS_EPSFILTERSPEC}
+
+//
+// MessageId: WSA_QOS_ESDMODEOBJ
+//
+// MessageText:
+//
+// An invalid shape discard mode object was found in the QOS provider specific buffer.
+//
+ WSA_QOS_ESDMODEOBJ = DWORD(11029);
+ {$EXTERNALSYM WSA_QOS_ESDMODEOBJ}
+
+//
+// MessageId: WSA_QOS_ESHAPERATEOBJ
+//
+// MessageText:
+//
+// An invalid shaping rate object was found in the QOS provider-specific buffer.
+//
+ WSA_QOS_ESHAPERATEOBJ = DWORD(11030);
+ {$EXTERNALSYM WSA_QOS_ESHAPERATEOBJ}
+
+//
+// MessageId: WSA_QOS_RESERVED_PETYPE
+//
+// MessageText:
+//
+// A reserved policy element was found in the QOS provider-specific buffer.
+//
+ WSA_QOS_RESERVED_PETYPE = DWORD(11031);
+ {$EXTERNALSYM WSA_QOS_RESERVED_PETYPE}
+
+///////////////////////////////////////////////////
+// //
+// End of WinSock Error Codes //
+// //
+// 10000 to 11999 //
+///////////////////////////////////////////////////
+
+
+///////////////////////////////////////////////////
+// //
+// Side By Side Error Codes //
+// //
+// 14000 to 14999 //
+///////////////////////////////////////////////////
+
+//
+// MessageId: ERROR_SXS_SECTION_NOT_FOUND
+//
+// MessageText:
+//
+// The requested section was not present in the activation context.
+//
+ ERROR_SXS_SECTION_NOT_FOUND = DWORD(14000);
+ {$EXTERNALSYM ERROR_SXS_SECTION_NOT_FOUND}
+
+//
+// MessageId: ERROR_SXS_CANT_GEN_ACTCTX
+//
+// MessageText:
+//
+// This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem.
+//
+ ERROR_SXS_CANT_GEN_ACTCTX = DWORD(14001);
+ {$EXTERNALSYM ERROR_SXS_CANT_GEN_ACTCTX}
+
+//
+// MessageId: ERROR_SXS_INVALID_ACTCTXDATA_FORMAT
+//
+// MessageText:
+//
+// The application binding data format is invalid.
+//
+ ERROR_SXS_INVALID_ACTCTXDATA_FORMAT = DWORD(14002);
+ {$EXTERNALSYM ERROR_SXS_INVALID_ACTCTXDATA_FORMAT}
+
+//
+// MessageId: ERROR_SXS_ASSEMBLY_NOT_FOUND
+//
+// MessageText:
+//
+// The referenced assembly is not installed on your system.
+//
+ ERROR_SXS_ASSEMBLY_NOT_FOUND = DWORD(14003);
+ {$EXTERNALSYM ERROR_SXS_ASSEMBLY_NOT_FOUND}
+
+//
+// MessageId: ERROR_SXS_MANIFEST_FORMAT_ERROR
+//
+// MessageText:
+//
+// The manifest file does not begin with the required tag and format information.
+//
+ ERROR_SXS_MANIFEST_FORMAT_ERROR = DWORD(14004);
+ {$EXTERNALSYM ERROR_SXS_MANIFEST_FORMAT_ERROR}
+
+//
+// MessageId: ERROR_SXS_MANIFEST_PARSE_ERROR
+//
+// MessageText:
+//
+// The manifest file contains one or more syntax errors.
+//
+ ERROR_SXS_MANIFEST_PARSE_ERROR = DWORD(14005);
+ {$EXTERNALSYM ERROR_SXS_MANIFEST_PARSE_ERROR}
+
+//
+// MessageId: ERROR_SXS_ACTIVATION_CONTEXT_DISABLED
+//
+// MessageText:
+//
+// The application attempted to activate a disabled activation context.
+//
+ ERROR_SXS_ACTIVATION_CONTEXT_DISABLED = DWORD(14006);
+ {$EXTERNALSYM ERROR_SXS_ACTIVATION_CONTEXT_DISABLED}
+
+//
+// MessageId: ERROR_SXS_KEY_NOT_FOUND
+//
+// MessageText:
+//
+// The requested lookup key was not found in any active activation context.
+//
+ ERROR_SXS_KEY_NOT_FOUND = DWORD(14007);
+ {$EXTERNALSYM ERROR_SXS_KEY_NOT_FOUND}
+
+//
+// MessageId: ERROR_SXS_VERSION_CONFLICT
+//
+// MessageText:
+//
+// A component version required by the application conflicts with another component version already active.
+//
+ ERROR_SXS_VERSION_CONFLICT = DWORD(14008);
+ {$EXTERNALSYM ERROR_SXS_VERSION_CONFLICT}
+
+//
+// MessageId: ERROR_SXS_WRONG_SECTION_TYPE
+//
+// MessageText:
+//
+// The type requested activation context section does not match the query API used.
+//
+ ERROR_SXS_WRONG_SECTION_TYPE = DWORD(14009);
+ {$EXTERNALSYM ERROR_SXS_WRONG_SECTION_TYPE}
+
+//
+// MessageId: ERROR_SXS_THREAD_QUERIES_DISABLED
+//
+// MessageText:
+//
+// Lack of system resources has required isolated activation to be disabled for the current thread of execution.
+//
+ ERROR_SXS_THREAD_QUERIES_DISABLED = DWORD(14010);
+ {$EXTERNALSYM ERROR_SXS_THREAD_QUERIES_DISABLED}
+
+//
+// MessageId: ERROR_SXS_PROCESS_DEFAULT_ALREADY_SET
+//
+// MessageText:
+//
+// An attempt to set the process default activation context failed because the process default activation context was already set.
+//
+ ERROR_SXS_PROCESS_DEFAULT_ALREADY_SET = DWORD(14011);
+ {$EXTERNALSYM ERROR_SXS_PROCESS_DEFAULT_ALREADY_SET}
+
+//
+// MessageId: ERROR_SXS_UNKNOWN_ENCODING_GROUP
+//
+// MessageText:
+//
+// The encoding group identifier specified is not recognized.
+//
+ ERROR_SXS_UNKNOWN_ENCODING_GROUP = DWORD(14012);
+ {$EXTERNALSYM ERROR_SXS_UNKNOWN_ENCODING_GROUP}
+
+//
+// MessageId: ERROR_SXS_UNKNOWN_ENCODING
+//
+// MessageText:
+//
+// The encoding requested is not recognized.
+//
+ ERROR_SXS_UNKNOWN_ENCODING = DWORD(14013);
+ {$EXTERNALSYM ERROR_SXS_UNKNOWN_ENCODING}
+
+//
+// MessageId: ERROR_SXS_INVALID_XML_NAMESPACE_URI
+//
+// MessageText:
+//
+// The manifest contains a reference to an invalid URI.
+//
+ ERROR_SXS_INVALID_XML_NAMESPACE_URI = DWORD(14014);
+ {$EXTERNALSYM ERROR_SXS_INVALID_XML_NAMESPACE_URI}
+
+//
+// MessageId: ERROR_SXS_ROOT_MANIFEST_DEPENDENCY_NOT_INSTALLED
+//
+// MessageText:
+//
+// The application manifest contains a reference to a dependent assembly which is not installed
+//
+ ERROR_SXS_ROOT_MANIFEST_DEPENDENCY_NOT_INSTALLED = DWORD(14015);
+ {$EXTERNALSYM ERROR_SXS_ROOT_MANIFEST_DEPENDENCY_NOT_INSTALLED}
+
+//
+// MessageId: ERROR_SXS_LEAF_MANIFEST_DEPENDENCY_NOT_INSTALLED
+//
+// MessageText:
+//
+// The manifest for an assembly used by the application has a reference to a dependent assembly which is not installed
+//
+ ERROR_SXS_LEAF_MANIFEST_DEPENDENCY_NOT_INSTALLED = DWORD(14016);
+ {$EXTERNALSYM ERROR_SXS_LEAF_MANIFEST_DEPENDENCY_NOT_INSTALLED}
+
+//
+// MessageId: ERROR_SXS_INVALID_ASSEMBLY_IDENTITY_ATTRIBUTE
+//
+// MessageText:
+//
+// The manifest contains an attribute for the assembly identity which is not valid.
+//
+ ERROR_SXS_INVALID_ASSEMBLY_IDENTITY_ATTRIBUTE = DWORD(14017);
+ {$EXTERNALSYM ERROR_SXS_INVALID_ASSEMBLY_IDENTITY_ATTRIBUTE}
+
+//
+// MessageId: ERROR_SXS_MANIFEST_MISSING_REQUIRED_DEFAULT_NAMESPACE
+//
+// MessageText:
+//
+// The manifest is missing the required default namespace specification on the assembly element.
+//
+ ERROR_SXS_MANIFEST_MISSING_REQUIRED_DEFAULT_NAMESPACE = DWORD(14018);
+ {$EXTERNALSYM ERROR_SXS_MANIFEST_MISSING_REQUIRED_DEFAULT_NAMESPACE}
+
+//
+// MessageId: ERROR_SXS_MANIFEST_INVALID_REQUIRED_DEFAULT_NAMESPACE
+//
+// MessageText:
+//
+// The manifest has a default namespace specified on the assembly element but its value is not "urn:schemas-microsoft-com:asm.v1".
+//
+ ERROR_SXS_MANIFEST_INVALID_REQUIRED_DEFAULT_NAMESPACE = DWORD(14019);
+ {$EXTERNALSYM ERROR_SXS_MANIFEST_INVALID_REQUIRED_DEFAULT_NAMESPACE}
+
+//
+// MessageId: ERROR_SXS_PRIVATE_MANIFEST_CROSS_PATH_WITH_REPARSE_POINT
+//
+// MessageText:
+//
+// The private manifest probed has crossed reparse-point-associated path
+//
+ ERROR_SXS_PRIVATE_MANIFEST_CROSS_PATH_WITH_REPARSE_POINT = DWORD(14020);
+ {$EXTERNALSYM ERROR_SXS_PRIVATE_MANIFEST_CROSS_PATH_WITH_REPARSE_POINT}
+
+//
+// MessageId: ERROR_SXS_DUPLICATE_DLL_NAME
+//
+// MessageText:
+//
+// Two or more components referenced directly or indirectly by the application manifest have files by the same name.
+//
+ ERROR_SXS_DUPLICATE_DLL_NAME = DWORD(14021);
+ {$EXTERNALSYM ERROR_SXS_DUPLICATE_DLL_NAME}
+
+//
+// MessageId: ERROR_SXS_DUPLICATE_WINDOWCLASS_NAME
+//
+// MessageText:
+//
+// Two or more components referenced directly or indirectly by the application manifest have window classes with the same name.
+//
+ ERROR_SXS_DUPLICATE_WINDOWCLASS_NAME = DWORD(14022);
+ {$EXTERNALSYM ERROR_SXS_DUPLICATE_WINDOWCLASS_NAME}
+
+//
+// MessageId: ERROR_SXS_DUPLICATE_CLSID
+//
+// MessageText:
+//
+// Two or more components referenced directly or indirectly by the application manifest have the same COM server CLSIDs.
+//
+ ERROR_SXS_DUPLICATE_CLSID = DWORD(14023);
+ {$EXTERNALSYM ERROR_SXS_DUPLICATE_CLSID}
+
+//
+// MessageId: ERROR_SXS_DUPLICATE_IID
+//
+// MessageText:
+//
+// Two or more components referenced directly or indirectly by the application manifest have proxies for the same COM interface IIDs.
+//
+ ERROR_SXS_DUPLICATE_IID = DWORD(14024);
+ {$EXTERNALSYM ERROR_SXS_DUPLICATE_IID}
+
+//
+// MessageId: ERROR_SXS_DUPLICATE_TLBID
+//
+// MessageText:
+//
+// Two or more components referenced directly or indirectly by the application manifest have the same COM type library TLBIDs.
+//
+ ERROR_SXS_DUPLICATE_TLBID = DWORD(14025);
+ {$EXTERNALSYM ERROR_SXS_DUPLICATE_TLBID}
+
+//
+// MessageId: ERROR_SXS_DUPLICATE_PROGID
+//
+// MessageText:
+//
+// Two or more components referenced directly or indirectly by the application manifest have the same COM ProgIDs.
+//
+ ERROR_SXS_DUPLICATE_PROGID = DWORD(14026);
+ {$EXTERNALSYM ERROR_SXS_DUPLICATE_PROGID}
+
+//
+// MessageId: ERROR_SXS_DUPLICATE_ASSEMBLY_NAME
+//
+// MessageText:
+//
+// Two or more components referenced directly or indirectly by the application manifest are different versions of the same component which is not permitted.
+//
+ ERROR_SXS_DUPLICATE_ASSEMBLY_NAME = DWORD(14027);
+ {$EXTERNALSYM ERROR_SXS_DUPLICATE_ASSEMBLY_NAME}
+
+//
+// MessageId: ERROR_SXS_FILE_HASH_MISMATCH
+//
+// MessageText:
+//
+// A component's file does not match the verification information present in the
+// component manifest.
+//
+ ERROR_SXS_FILE_HASH_MISMATCH = DWORD(14028);
+ {$EXTERNALSYM ERROR_SXS_FILE_HASH_MISMATCH}
+
+//
+// MessageId: ERROR_SXS_POLICY_PARSE_ERROR
+//
+// MessageText:
+//
+// The policy manifest contains one or more syntax errors.
+//
+ ERROR_SXS_POLICY_PARSE_ERROR = DWORD(14029);
+ {$EXTERNALSYM ERROR_SXS_POLICY_PARSE_ERROR}
+
+//
+// MessageId: ERROR_SXS_XML_E_MISSINGQUOTE
+//
+// MessageText:
+//
+// Manifest Parse Error : A string literal was expected, but no opening quote character was found.
+//
+ ERROR_SXS_XML_E_MISSINGQUOTE = DWORD(14030);
+ {$EXTERNALSYM ERROR_SXS_XML_E_MISSINGQUOTE}
+
+//
+// MessageId: ERROR_SXS_XML_E_COMMENTSYNTAX
+//
+// MessageText:
+//
+// Manifest Parse Error : Incorrect syntax was used in a comment.
+//
+ ERROR_SXS_XML_E_COMMENTSYNTAX = DWORD(14031);
+ {$EXTERNALSYM ERROR_SXS_XML_E_COMMENTSYNTAX}
+
+//
+// MessageId: ERROR_SXS_XML_E_BADSTARTNAMECHAR
+//
+// MessageText:
+//
+// Manifest Parse Error : A name was started with an invalid character.
+//
+ ERROR_SXS_XML_E_BADSTARTNAMECHAR = DWORD(14032);
+ {$EXTERNALSYM ERROR_SXS_XML_E_BADSTARTNAMECHAR}
+
+//
+// MessageId: ERROR_SXS_XML_E_BADNAMECHAR
+//
+// MessageText:
+//
+// Manifest Parse Error : A name contained an invalid character.
+//
+ ERROR_SXS_XML_E_BADNAMECHAR = DWORD(14033);
+ {$EXTERNALSYM ERROR_SXS_XML_E_BADNAMECHAR}
+
+//
+// MessageId: ERROR_SXS_XML_E_BADCHARINSTRING
+//
+// MessageText:
+//
+// Manifest Parse Error : A string literal contained an invalid character.
+//
+ ERROR_SXS_XML_E_BADCHARINSTRING = DWORD(14034);
+ {$EXTERNALSYM ERROR_SXS_XML_E_BADCHARINSTRING}
+
+//
+// MessageId: ERROR_SXS_XML_E_XMLDECLSYNTAX
+//
+// MessageText:
+//
+// Manifest Parse Error : Invalid syntax for an xml declaration.
+//
+ ERROR_SXS_XML_E_XMLDECLSYNTAX = DWORD(14035);
+ {$EXTERNALSYM ERROR_SXS_XML_E_XMLDECLSYNTAX}
+
+//
+// MessageId: ERROR_SXS_XML_E_BADCHARDATA
+//
+// MessageText:
+//
+// Manifest Parse Error : An Invalid character was found in text content.
+//
+ ERROR_SXS_XML_E_BADCHARDATA = DWORD(14036);
+ {$EXTERNALSYM ERROR_SXS_XML_E_BADCHARDATA}
+
+//
+// MessageId: ERROR_SXS_XML_E_MISSINGWHITESPACE
+//
+// MessageText:
+//
+// Manifest Parse Error : Required white space was missing.
+//
+ ERROR_SXS_XML_E_MISSINGWHITESPACE = DWORD(14037);
+ {$EXTERNALSYM ERROR_SXS_XML_E_MISSINGWHITESPACE}
+
+//
+// MessageId: ERROR_SXS_XML_E_EXPECTINGTAGEND
+//
+// MessageText:
+//
+// Manifest Parse Error : The character '>' was expected.
+//
+ ERROR_SXS_XML_E_EXPECTINGTAGEND = DWORD(14038);
+ {$EXTERNALSYM ERROR_SXS_XML_E_EXPECTINGTAGEND}
+
+//
+// MessageId: ERROR_SXS_XML_E_MISSINGSEMICOLON
+//
+// MessageText:
+//
+// Manifest Parse Error : A semi colon character was expected.
+//
+ ERROR_SXS_XML_E_MISSINGSEMICOLON = DWORD(14039);
+ {$EXTERNALSYM ERROR_SXS_XML_E_MISSINGSEMICOLON}
+
+//
+// MessageId: ERROR_SXS_XML_E_UNBALANCEDPAREN
+//
+// MessageText:
+//
+// Manifest Parse Error : Unbalanced parentheses.
+//
+ ERROR_SXS_XML_E_UNBALANCEDPAREN = DWORD(14040);
+ {$EXTERNALSYM ERROR_SXS_XML_E_UNBALANCEDPAREN}
+
+//
+// MessageId: ERROR_SXS_XML_E_INTERNALERROR
+//
+// MessageText:
+//
+// Manifest Parse Error : Internal error.
+//
+ ERROR_SXS_XML_E_INTERNALERROR = DWORD(14041);
+ {$EXTERNALSYM ERROR_SXS_XML_E_INTERNALERROR}
+
+//
+// MessageId: ERROR_SXS_XML_E_UNEXPECTED_WHITESPACE
+//
+// MessageText:
+//
+// Manifest Parse Error : Whitespace is not allowed at this location.
+//
+ ERROR_SXS_XML_E_UNEXPECTED_WHITESPACE = DWORD(14042);
+ {$EXTERNALSYM ERROR_SXS_XML_E_UNEXPECTED_WHITESPACE}
+
+//
+// MessageId: ERROR_SXS_XML_E_INCOMPLETE_ENCODING
+//
+// MessageText:
+//
+// Manifest Parse Error : End of file reached in invalid state for current encoding.
+//
+ ERROR_SXS_XML_E_INCOMPLETE_ENCODING = DWORD(14043);
+ {$EXTERNALSYM ERROR_SXS_XML_E_INCOMPLETE_ENCODING}
+
+//
+// MessageId: ERROR_SXS_XML_E_MISSING_PAREN
+//
+// MessageText:
+//
+// Manifest Parse Error : Missing parenthesis.
+//
+ ERROR_SXS_XML_E_MISSING_PAREN = DWORD(14044);
+ {$EXTERNALSYM ERROR_SXS_XML_E_MISSING_PAREN}
+
+//
+// MessageId: ERROR_SXS_XML_E_EXPECTINGCLOSEQUOTE
+//
+// MessageText:
+//
+// Manifest Parse Error : A single or double closing quote character (\' or \") is missing.
+//
+ ERROR_SXS_XML_E_EXPECTINGCLOSEQUOTE = DWORD(14045);
+ {$EXTERNALSYM ERROR_SXS_XML_E_EXPECTINGCLOSEQUOTE}
+
+//
+// MessageId: ERROR_SXS_XML_E_MULTIPLE_COLONS
+//
+// MessageText:
+//
+// Manifest Parse Error : Multiple colons are not allowed in a name.
+//
+ ERROR_SXS_XML_E_MULTIPLE_COLONS = DWORD(14046);
+ {$EXTERNALSYM ERROR_SXS_XML_E_MULTIPLE_COLONS}
+
+//
+// MessageId: ERROR_SXS_XML_E_INVALID_DECIMAL
+//
+// MessageText:
+//
+// Manifest Parse Error : Invalid character for decimal digit.
+//
+ ERROR_SXS_XML_E_INVALID_DECIMAL = DWORD(14047);
+ {$EXTERNALSYM ERROR_SXS_XML_E_INVALID_DECIMAL}
+
+//
+// MessageId: ERROR_SXS_XML_E_INVALID_HEXIDECIMAL
+//
+// MessageText:
+//
+// Manifest Parse Error : Invalid character for hexidecimal digit.
+//
+ ERROR_SXS_XML_E_INVALID_HEXIDECIMAL = DWORD(14048);
+ {$EXTERNALSYM ERROR_SXS_XML_E_INVALID_HEXIDECIMAL}
+
+//
+// MessageId: ERROR_SXS_XML_E_INVALID_UNICODE
+//
+// MessageText:
+//
+// Manifest Parse Error : Invalid unicode character value for this platform.
+//
+ ERROR_SXS_XML_E_INVALID_UNICODE = DWORD(14049);
+ {$EXTERNALSYM ERROR_SXS_XML_E_INVALID_UNICODE}
+
+//
+// MessageId: ERROR_SXS_XML_E_WHITESPACEORQUESTIONMARK
+//
+// MessageText:
+//
+// Manifest Parse Error : Expecting whitespace or '?'.
+//
+ ERROR_SXS_XML_E_WHITESPACEORQUESTIONMARK = DWORD(14050);
+ {$EXTERNALSYM ERROR_SXS_XML_E_WHITESPACEORQUESTIONMARK}
+
+//
+// MessageId: ERROR_SXS_XML_E_UNEXPECTEDENDTAG
+//
+// MessageText:
+//
+// Manifest Parse Error : End tag was not expected at this location.
+//
+ ERROR_SXS_XML_E_UNEXPECTEDENDTAG = DWORD(14051);
+ {$EXTERNALSYM ERROR_SXS_XML_E_UNEXPECTEDENDTAG}
+
+//
+// MessageId: ERROR_SXS_XML_E_UNCLOSEDTAG
+//
+// MessageText:
+//
+// Manifest Parse Error : The following tags were not closed: %1.
+//
+ ERROR_SXS_XML_E_UNCLOSEDTAG = DWORD(14052);
+ {$EXTERNALSYM ERROR_SXS_XML_E_UNCLOSEDTAG}
+
+//
+// MessageId: ERROR_SXS_XML_E_DUPLICATEATTRIBUTE
+//
+// MessageText:
+//
+// Manifest Parse Error : Duplicate attribute.
+//
+ ERROR_SXS_XML_E_DUPLICATEATTRIBUTE = DWORD(14053);
+ {$EXTERNALSYM ERROR_SXS_XML_E_DUPLICATEATTRIBUTE}
+
+//
+// MessageId: ERROR_SXS_XML_E_MULTIPLEROOTS
+//
+// MessageText:
+//
+// Manifest Parse Error : Only one top level element is allowed in an XML document.
+//
+ ERROR_SXS_XML_E_MULTIPLEROOTS = DWORD(14054);
+ {$EXTERNALSYM ERROR_SXS_XML_E_MULTIPLEROOTS}
+
+//
+// MessageId: ERROR_SXS_XML_E_INVALIDATROOTLEVEL
+//
+// MessageText:
+//
+// Manifest Parse Error : Invalid at the top level of the document.
+//
+ ERROR_SXS_XML_E_INVALIDATROOTLEVEL = DWORD(14055);
+ {$EXTERNALSYM ERROR_SXS_XML_E_INVALIDATROOTLEVEL}
+
+//
+// MessageId: ERROR_SXS_XML_E_BADXMLDECL
+//
+// MessageText:
+//
+// Manifest Parse Error : Invalid xml declaration.
+//
+ ERROR_SXS_XML_E_BADXMLDECL = DWORD(14056);
+ {$EXTERNALSYM ERROR_SXS_XML_E_BADXMLDECL}
+
+//
+// MessageId: ERROR_SXS_XML_E_MISSINGROOT
+//
+// MessageText:
+//
+// Manifest Parse Error : XML document must have a top level element.
+//
+ ERROR_SXS_XML_E_MISSINGROOT = DWORD(14057);
+ {$EXTERNALSYM ERROR_SXS_XML_E_MISSINGROOT}
+
+//
+// MessageId: ERROR_SXS_XML_E_UNEXPECTEDEOF
+//
+// MessageText:
+//
+// Manifest Parse Error : Unexpected end of file.
+//
+ ERROR_SXS_XML_E_UNEXPECTEDEOF = DWORD(14058);
+ {$EXTERNALSYM ERROR_SXS_XML_E_UNEXPECTEDEOF}
+
+//
+// MessageId: ERROR_SXS_XML_E_BADPEREFINSUBSET
+//
+// MessageText:
+//
+// Manifest Parse Error : Parameter entities cannot be used inside markup declarations in an internal subset.
+//
+ ERROR_SXS_XML_E_BADPEREFINSUBSET = DWORD(14059);
+ {$EXTERNALSYM ERROR_SXS_XML_E_BADPEREFINSUBSET}
+
+//
+// MessageId: ERROR_SXS_XML_E_UNCLOSEDSTARTTAG
+//
+// MessageText:
+//
+// Manifest Parse Error : Element was not closed.
+//
+ ERROR_SXS_XML_E_UNCLOSEDSTARTTAG = DWORD(14060);
+ {$EXTERNALSYM ERROR_SXS_XML_E_UNCLOSEDSTARTTAG}
+
+//
+// MessageId: ERROR_SXS_XML_E_UNCLOSEDENDTAG
+//
+// MessageText:
+//
+// Manifest Parse Error : End element was missing the character '>'.
+//
+ ERROR_SXS_XML_E_UNCLOSEDENDTAG = DWORD(14061);
+ {$EXTERNALSYM ERROR_SXS_XML_E_UNCLOSEDENDTAG}
+
+//
+// MessageId: ERROR_SXS_XML_E_UNCLOSEDSTRING
+//
+// MessageText:
+//
+// Manifest Parse Error : A string literal was not closed.
+//
+ ERROR_SXS_XML_E_UNCLOSEDSTRING = DWORD(14062);
+ {$EXTERNALSYM ERROR_SXS_XML_E_UNCLOSEDSTRING}
+
+//
+// MessageId: ERROR_SXS_XML_E_UNCLOSEDCOMMENT
+//
+// MessageText:
+//
+// Manifest Parse Error : A comment was not closed.
+//
+ ERROR_SXS_XML_E_UNCLOSEDCOMMENT = DWORD(14063);
+ {$EXTERNALSYM ERROR_SXS_XML_E_UNCLOSEDCOMMENT}
+
+//
+// MessageId: ERROR_SXS_XML_E_UNCLOSEDDECL
+//
+// MessageText:
+//
+// Manifest Parse Error : A declaration was not closed.
+//
+ ERROR_SXS_XML_E_UNCLOSEDDECL = DWORD(14064);
+ {$EXTERNALSYM ERROR_SXS_XML_E_UNCLOSEDDECL}
+
+//
+// MessageId: ERROR_SXS_XML_E_UNCLOSEDCDATA
+//
+// MessageText:
+//
+// Manifest Parse Error : A CDATA section was not closed.
+//
+ ERROR_SXS_XML_E_UNCLOSEDCDATA = DWORD(14065);
+ {$EXTERNALSYM ERROR_SXS_XML_E_UNCLOSEDCDATA}
+
+//
+// MessageId: ERROR_SXS_XML_E_RESERVEDNAMESPACE
+//
+// MessageText:
+//
+// Manifest Parse Error : The namespace prefix is not allowed to start with the reserved string "xml".
+//
+ ERROR_SXS_XML_E_RESERVEDNAMESPACE = DWORD(14066);
+ {$EXTERNALSYM ERROR_SXS_XML_E_RESERVEDNAMESPACE}
+
+//
+// MessageId: ERROR_SXS_XML_E_INVALIDENCODING
+//
+// MessageText:
+//
+// Manifest Parse Error : System does not support the specified encoding.
+//
+ ERROR_SXS_XML_E_INVALIDENCODING = DWORD(14067);
+ {$EXTERNALSYM ERROR_SXS_XML_E_INVALIDENCODING}
+
+//
+// MessageId: ERROR_SXS_XML_E_INVALIDSWITCH
+//
+// MessageText:
+//
+// Manifest Parse Error : Switch from current encoding to specified encoding not supported.
+//
+ ERROR_SXS_XML_E_INVALIDSWITCH = DWORD(14068);
+ {$EXTERNALSYM ERROR_SXS_XML_E_INVALIDSWITCH}
+
+//
+// MessageId: ERROR_SXS_XML_E_BADXMLCASE
+//
+// MessageText:
+//
+// Manifest Parse Error : The name 'xml' is reserved and must be lower case.
+//
+ ERROR_SXS_XML_E_BADXMLCASE = DWORD(14069);
+ {$EXTERNALSYM ERROR_SXS_XML_E_BADXMLCASE}
+
+//
+// MessageId: ERROR_SXS_XML_E_INVALID_STANDALONE
+//
+// MessageText:
+//
+// Manifest Parse Error : The standalone attribute must have the value 'yes' or 'no'.
+//
+ ERROR_SXS_XML_E_INVALID_STANDALONE = DWORD(14070);
+ {$EXTERNALSYM ERROR_SXS_XML_E_INVALID_STANDALONE}
+
+//
+// MessageId: ERROR_SXS_XML_E_UNEXPECTED_STANDALONE
+//
+// MessageText:
+//
+// Manifest Parse Error : The standalone attribute cannot be used in external entities.
+//
+ ERROR_SXS_XML_E_UNEXPECTED_STANDALONE = DWORD(14071);
+ {$EXTERNALSYM ERROR_SXS_XML_E_UNEXPECTED_STANDALONE}
+
+//
+// MessageId: ERROR_SXS_XML_E_INVALID_VERSION
+//
+// MessageText:
+//
+// Manifest Parse Error : Invalid version number.
+//
+ ERROR_SXS_XML_E_INVALID_VERSION = DWORD(14072);
+ {$EXTERNALSYM ERROR_SXS_XML_E_INVALID_VERSION}
+
+//
+// MessageId: ERROR_SXS_XML_E_MISSINGEQUALS
+//
+// MessageText:
+//
+// Manifest Parse Error : Missing equals sign between attribute and attribute value.
+//
+ ERROR_SXS_XML_E_MISSINGEQUALS = DWORD(14073);
+ {$EXTERNALSYM ERROR_SXS_XML_E_MISSINGEQUALS}
+
+//
+// MessageId: ERROR_SXS_PROTECTION_RECOVERY_FAILED
+//
+// MessageText:
+//
+// Assembly Protection Error : Unable to recover the specified assembly.
+//
+ ERROR_SXS_PROTECTION_RECOVERY_FAILED = DWORD(14074);
+ {$EXTERNALSYM ERROR_SXS_PROTECTION_RECOVERY_FAILED}
+
+//
+// MessageId: ERROR_SXS_PROTECTION_PUBLIC_KEY_TOO_SHORT
+//
+// MessageText:
+//
+// Assembly Protection Error : The public key for an assembly was too short to be allowed.
+//
+ ERROR_SXS_PROTECTION_PUBLIC_KEY_TOO_SHORT = DWORD(14075);
+ {$EXTERNALSYM ERROR_SXS_PROTECTION_PUBLIC_KEY_TOO_SHORT}
+
+//
+// MessageId: ERROR_SXS_PROTECTION_CATALOG_NOT_VALID
+//
+// MessageText:
+//
+// Assembly Protection Error : The catalog for an assembly is not valid, or does not match the assembly's manifest.
+//
+ ERROR_SXS_PROTECTION_CATALOG_NOT_VALID = DWORD(14076);
+ {$EXTERNALSYM ERROR_SXS_PROTECTION_CATALOG_NOT_VALID}
+
+//
+// MessageId: ERROR_SXS_UNTRANSLATABLE_HRESULT
+//
+// MessageText:
+//
+// An HRESULT could not be translated to a corresponding Win32 error code.
+//
+ ERROR_SXS_UNTRANSLATABLE_HRESULT = DWORD(14077);
+ {$EXTERNALSYM ERROR_SXS_UNTRANSLATABLE_HRESULT}
+
+//
+// MessageId: ERROR_SXS_PROTECTION_CATALOG_FILE_MISSING
+//
+// MessageText:
+//
+// Assembly Protection Error : The catalog for an assembly is missing.
+//
+ ERROR_SXS_PROTECTION_CATALOG_FILE_MISSING = DWORD(14078);
+ {$EXTERNALSYM ERROR_SXS_PROTECTION_CATALOG_FILE_MISSING}
+
+//
+// MessageId: ERROR_SXS_MISSING_ASSEMBLY_IDENTITY_ATTRIBUTE
+//
+// MessageText:
+//
+// The supplied assembly identity is missing one or more attributes which must be present in this context.
+//
+ ERROR_SXS_MISSING_ASSEMBLY_IDENTITY_ATTRIBUTE = DWORD(14079);
+ {$EXTERNALSYM ERROR_SXS_MISSING_ASSEMBLY_IDENTITY_ATTRIBUTE}
+
+//
+// MessageId: ERROR_SXS_INVALID_ASSEMBLY_IDENTITY_ATTRIBUTE_NAME
+//
+// MessageText:
+//
+// The supplied assembly identity has one or more attribute names that contain characters not permitted in XML names.
+//
+ ERROR_SXS_INVALID_ASSEMBLY_IDENTITY_ATTRIBUTE_NAME = DWORD(14080);
+ {$EXTERNALSYM ERROR_SXS_INVALID_ASSEMBLY_IDENTITY_ATTRIBUTE_NAME}
+
+///////////////////////////////////////////////////
+// //
+// End of Side By Side Error Codes //
+// //
+// 14000 to 14999 //
+///////////////////////////////////////////////////
+
+
+///////////////////////////////////////////////////
+// //
+// Start of IPSec Error codes //
+// //
+// 13000 to 13999 //
+///////////////////////////////////////////////////
+
+//
+// MessageId: ERROR_IPSEC_QM_POLICY_EXISTS
+//
+// MessageText:
+//
+// The specified quick mode policy already exists.
+//
+ ERROR_IPSEC_QM_POLICY_EXISTS = DWORD(13000);
+ {$EXTERNALSYM ERROR_IPSEC_QM_POLICY_EXISTS}
+
+//
+// MessageId: ERROR_IPSEC_QM_POLICY_NOT_FOUND
+//
+// MessageText:
+//
+// The specified quick mode policy was not found.
+//
+ ERROR_IPSEC_QM_POLICY_NOT_FOUND = DWORD(13001);
+ {$EXTERNALSYM ERROR_IPSEC_QM_POLICY_NOT_FOUND}
+
+//
+// MessageId: ERROR_IPSEC_QM_POLICY_IN_USE
+//
+// MessageText:
+//
+// The specified quick mode policy is being used.
+//
+ ERROR_IPSEC_QM_POLICY_IN_USE = DWORD(13002);
+ {$EXTERNALSYM ERROR_IPSEC_QM_POLICY_IN_USE}
+
+//
+// MessageId: ERROR_IPSEC_MM_POLICY_EXISTS
+//
+// MessageText:
+//
+// The specified main mode policy already exists.
+//
+ ERROR_IPSEC_MM_POLICY_EXISTS = DWORD(13003);
+ {$EXTERNALSYM ERROR_IPSEC_MM_POLICY_EXISTS}
+
+//
+// MessageId: ERROR_IPSEC_MM_POLICY_NOT_FOUND
+//
+// MessageText:
+//
+// The specified main mode policy was not found
+//
+ ERROR_IPSEC_MM_POLICY_NOT_FOUND = DWORD(13004);
+ {$EXTERNALSYM ERROR_IPSEC_MM_POLICY_NOT_FOUND}
+
+//
+// MessageId: ERROR_IPSEC_MM_POLICY_IN_USE
+//
+// MessageText:
+//
+// The specified main mode policy is being used.
+//
+ ERROR_IPSEC_MM_POLICY_IN_USE = DWORD(13005);
+ {$EXTERNALSYM ERROR_IPSEC_MM_POLICY_IN_USE}
+
+//
+// MessageId: ERROR_IPSEC_MM_FILTER_EXISTS
+//
+// MessageText:
+//
+// The specified main mode filter already exists.
+//
+ ERROR_IPSEC_MM_FILTER_EXISTS = DWORD(13006);
+ {$EXTERNALSYM ERROR_IPSEC_MM_FILTER_EXISTS}
+
+//
+// MessageId: ERROR_IPSEC_MM_FILTER_NOT_FOUND
+//
+// MessageText:
+//
+// The specified main mode filter was not found.
+//
+ ERROR_IPSEC_MM_FILTER_NOT_FOUND = DWORD(13007);
+ {$EXTERNALSYM ERROR_IPSEC_MM_FILTER_NOT_FOUND}
+
+//
+// MessageId: ERROR_IPSEC_TRANSPORT_FILTER_EXISTS
+//
+// MessageText:
+//
+// The specified transport mode filter already exists.
+//
+ ERROR_IPSEC_TRANSPORT_FILTER_EXISTS = DWORD(13008);
+ {$EXTERNALSYM ERROR_IPSEC_TRANSPORT_FILTER_EXISTS}
+
+//
+// MessageId: ERROR_IPSEC_TRANSPORT_FILTER_NOT_FOUND
+//
+// MessageText:
+//
+// The specified transport mode filter does not exist.
+//
+ ERROR_IPSEC_TRANSPORT_FILTER_NOT_FOUND = DWORD(13009);
+ {$EXTERNALSYM ERROR_IPSEC_TRANSPORT_FILTER_NOT_FOUND}
+
+//
+// MessageId: ERROR_IPSEC_MM_AUTH_EXISTS
+//
+// MessageText:
+//
+// The specified main mode authentication list exists.
+//
+ ERROR_IPSEC_MM_AUTH_EXISTS = DWORD(13010);
+ {$EXTERNALSYM ERROR_IPSEC_MM_AUTH_EXISTS}
+
+//
+// MessageId: ERROR_IPSEC_MM_AUTH_NOT_FOUND
+//
+// MessageText:
+//
+// The specified main mode authentication list was not found.
+//
+ ERROR_IPSEC_MM_AUTH_NOT_FOUND = DWORD(13011);
+ {$EXTERNALSYM ERROR_IPSEC_MM_AUTH_NOT_FOUND}
+
+//
+// MessageId: ERROR_IPSEC_MM_AUTH_IN_USE
+//
+// MessageText:
+//
+// The specified quick mode policy is being used.
+//
+ ERROR_IPSEC_MM_AUTH_IN_USE = DWORD(13012);
+ {$EXTERNALSYM ERROR_IPSEC_MM_AUTH_IN_USE}
+
+//
+// MessageId: ERROR_IPSEC_DEFAULT_MM_POLICY_NOT_FOUND
+//
+// MessageText:
+//
+// The specified main mode policy was not found.
+//
+ ERROR_IPSEC_DEFAULT_MM_POLICY_NOT_FOUND = DWORD(13013);
+ {$EXTERNALSYM ERROR_IPSEC_DEFAULT_MM_POLICY_NOT_FOUND}
+
+//
+// MessageId: ERROR_IPSEC_DEFAULT_MM_AUTH_NOT_FOUND
+//
+// MessageText:
+//
+// The specified quick mode policy was not found
+//
+ ERROR_IPSEC_DEFAULT_MM_AUTH_NOT_FOUND = DWORD(13014);
+ {$EXTERNALSYM ERROR_IPSEC_DEFAULT_MM_AUTH_NOT_FOUND}
+
+//
+// MessageId: ERROR_IPSEC_DEFAULT_QM_POLICY_NOT_FOUND
+//
+// MessageText:
+//
+// The manifest file contains one or more syntax errors.
+//
+ ERROR_IPSEC_DEFAULT_QM_POLICY_NOT_FOUND = DWORD(13015);
+ {$EXTERNALSYM ERROR_IPSEC_DEFAULT_QM_POLICY_NOT_FOUND}
+
+//
+// MessageId: ERROR_IPSEC_TUNNEL_FILTER_EXISTS
+//
+// MessageText:
+//
+// The application attempted to activate a disabled activation context.
+//
+ ERROR_IPSEC_TUNNEL_FILTER_EXISTS = DWORD(13016);
+ {$EXTERNALSYM ERROR_IPSEC_TUNNEL_FILTER_EXISTS}
+
+//
+// MessageId: ERROR_IPSEC_TUNNEL_FILTER_NOT_FOUND
+//
+// MessageText:
+//
+// The requested lookup key was not found in any active activation context.
+//
+ ERROR_IPSEC_TUNNEL_FILTER_NOT_FOUND = DWORD(13017);
+ {$EXTERNALSYM ERROR_IPSEC_TUNNEL_FILTER_NOT_FOUND}
+
+//
+// MessageId: ERROR_IPSEC_MM_FILTER_PENDING_DELETION
+//
+// MessageText:
+//
+// The Main Mode filter is pending deletion.
+//
+ ERROR_IPSEC_MM_FILTER_PENDING_DELETION = DWORD(13018);
+ {$EXTERNALSYM ERROR_IPSEC_MM_FILTER_PENDING_DELETION}
+
+//
+// MessageId: ERROR_IPSEC_TRANSPORT_FILTER_PENDING_DELETION
+//
+// MessageText:
+//
+// The transport filter is pending deletion.
+//
+ ERROR_IPSEC_TRANSPORT_FILTER_PENDING_DELETION = DWORD(13019);
+ {$EXTERNALSYM ERROR_IPSEC_TRANSPORT_FILTER_PENDING_DELETION}
+
+//
+// MessageId: ERROR_IPSEC_TUNNEL_FILTER_PENDING_DELETION
+//
+// MessageText:
+//
+// The tunnel filter is pending deletion.
+//
+ ERROR_IPSEC_TUNNEL_FILTER_PENDING_DELETION = DWORD(13020);
+ {$EXTERNALSYM ERROR_IPSEC_TUNNEL_FILTER_PENDING_DELETION}
+
+//
+// MessageId: ERROR_IPSEC_MM_POLICY_PENDING_DELETION
+//
+// MessageText:
+//
+// The Main Mode policy is pending deletion.
+//
+ ERROR_IPSEC_MM_POLICY_PENDING_DELETION = DWORD(13021);
+ {$EXTERNALSYM ERROR_IPSEC_MM_POLICY_PENDING_DELETION}
+
+//
+// MessageId: ERROR_IPSEC_MM_AUTH_PENDING_DELETION
+//
+// MessageText:
+//
+// The Main Mode authentication bundle is pending deletion.
+//
+ ERROR_IPSEC_MM_AUTH_PENDING_DELETION = DWORD(13022);
+ {$EXTERNALSYM ERROR_IPSEC_MM_AUTH_PENDING_DELETION}
+
+//
+// MessageId: ERROR_IPSEC_QM_POLICY_PENDING_DELETION
+//
+// MessageText:
+//
+// The Quick Mode policy is pending deletion.
+//
+ ERROR_IPSEC_QM_POLICY_PENDING_DELETION = DWORD(13023);
+ {$EXTERNALSYM ERROR_IPSEC_QM_POLICY_PENDING_DELETION}
+
+//
+// MessageId: WARNING_IPSEC_MM_POLICY_PRUNED
+//
+// MessageText:
+//
+// The Main Mode policy was successfully added, but some of the requested offers are not supported.
+//
+ WARNING_IPSEC_MM_POLICY_PRUNED = DWORD(13024);
+ {$EXTERNALSYM WARNING_IPSEC_MM_POLICY_PRUNED}
+
+//
+// MessageId: WARNING_IPSEC_QM_POLICY_PRUNED
+//
+// MessageText:
+//
+// The Quick Mode policy was successfully added, but some of the requested offers are not supported.
+//
+ WARNING_IPSEC_QM_POLICY_PRUNED = DWORD(13025);
+ {$EXTERNALSYM WARNING_IPSEC_QM_POLICY_PRUNED}
+
+//
+// MessageId: ERROR_IPSEC_IKE_NEG_STATUS_BEGIN
+//
+// MessageText:
+//
+// ERROR_IPSEC_IKE_NEG_STATUS_BEGIN
+//
+ ERROR_IPSEC_IKE_NEG_STATUS_BEGIN = DWORD(13800);
+ {$EXTERNALSYM ERROR_IPSEC_IKE_NEG_STATUS_BEGIN}
+
+//
+// MessageId: ERROR_IPSEC_IKE_AUTH_FAIL
+//
+// MessageText:
+//
+// IKE authentication credentials are unacceptable
+//
+ ERROR_IPSEC_IKE_AUTH_FAIL = DWORD(13801);
+ {$EXTERNALSYM ERROR_IPSEC_IKE_AUTH_FAIL}
+
+//
+// MessageId: ERROR_IPSEC_IKE_ATTRIB_FAIL
+//
+// MessageText:
+//
+// IKE security attributes are unacceptable
+//
+ ERROR_IPSEC_IKE_ATTRIB_FAIL = DWORD(13802);
+ {$EXTERNALSYM ERROR_IPSEC_IKE_ATTRIB_FAIL}
+
+//
+// MessageId: ERROR_IPSEC_IKE_NEGOTIATION_PENDING
+//
+// MessageText:
+//
+// IKE Negotiation in progress
+//
+ ERROR_IPSEC_IKE_NEGOTIATION_PENDING = DWORD(13803);
+ {$EXTERNALSYM ERROR_IPSEC_IKE_NEGOTIATION_PENDING}
+
+//
+// MessageId: ERROR_IPSEC_IKE_GENERAL_PROCESSING_ERROR
+//
+// MessageText:
+//
+// General processing error
+//
+ ERROR_IPSEC_IKE_GENERAL_PROCESSING_ERROR = DWORD(13804);
+ {$EXTERNALSYM ERROR_IPSEC_IKE_GENERAL_PROCESSING_ERROR}
+
+//
+// MessageId: ERROR_IPSEC_IKE_TIMED_OUT
+//
+// MessageText:
+//
+// Negotiation timed out
+//
+ ERROR_IPSEC_IKE_TIMED_OUT = DWORD(13805);
+ {$EXTERNALSYM ERROR_IPSEC_IKE_TIMED_OUT}
+
+//
+// MessageId: ERROR_IPSEC_IKE_NO_CERT
+//
+// MessageText:
+//
+// IKE failed to find valid machine certificate
+//
+ ERROR_IPSEC_IKE_NO_CERT = DWORD(13806);
+ {$EXTERNALSYM ERROR_IPSEC_IKE_NO_CERT}
+
+//
+// MessageId: ERROR_IPSEC_IKE_SA_DELETED
+//
+// MessageText:
+//
+// IKE SA deleted by peer before establishment completed
+//
+ ERROR_IPSEC_IKE_SA_DELETED = DWORD(13807);
+ {$EXTERNALSYM ERROR_IPSEC_IKE_SA_DELETED}
+
+//
+// MessageId: ERROR_IPSEC_IKE_SA_REAPED
+//
+// MessageText:
+//
+// IKE SA deleted before establishment completed
+//
+ ERROR_IPSEC_IKE_SA_REAPED = DWORD(13808);
+ {$EXTERNALSYM ERROR_IPSEC_IKE_SA_REAPED}
+
+//
+// MessageId: ERROR_IPSEC_IKE_MM_ACQUIRE_DROP
+//
+// MessageText:
+//
+// Negotiation request sat in Queue too long
+//
+ ERROR_IPSEC_IKE_MM_ACQUIRE_DROP = DWORD(13809);
+ {$EXTERNALSYM ERROR_IPSEC_IKE_MM_ACQUIRE_DROP}
+
+//
+// MessageId: ERROR_IPSEC_IKE_QM_ACQUIRE_DROP
+//
+// MessageText:
+//
+// Negotiation request sat in Queue too long
+//
+ ERROR_IPSEC_IKE_QM_ACQUIRE_DROP = DWORD(13810);
+ {$EXTERNALSYM ERROR_IPSEC_IKE_QM_ACQUIRE_DROP}
+
+//
+// MessageId: ERROR_IPSEC_IKE_QUEUE_DROP_MM
+//
+// MessageText:
+//
+// Negotiation request sat in Queue too long
+//
+ ERROR_IPSEC_IKE_QUEUE_DROP_MM = DWORD(13811);
+ {$EXTERNALSYM ERROR_IPSEC_IKE_QUEUE_DROP_MM}
+
+//
+// MessageId: ERROR_IPSEC_IKE_QUEUE_DROP_NO_MM
+//
+// MessageText:
+//
+// Negotiation request sat in Queue too long
+//
+ ERROR_IPSEC_IKE_QUEUE_DROP_NO_MM = DWORD(13812);
+ {$EXTERNALSYM ERROR_IPSEC_IKE_QUEUE_DROP_NO_MM}
+
+//
+// MessageId: ERROR_IPSEC_IKE_DROP_NO_RESPONSE
+//
+// MessageText:
+//
+// No response from peer
+//
+ ERROR_IPSEC_IKE_DROP_NO_RESPONSE = DWORD(13813);
+ {$EXTERNALSYM ERROR_IPSEC_IKE_DROP_NO_RESPONSE}
+
+//
+// MessageId: ERROR_IPSEC_IKE_MM_DELAY_DROP
+//
+// MessageText:
+//
+// Negotiation took too long
+//
+ ERROR_IPSEC_IKE_MM_DELAY_DROP = DWORD(13814);
+ {$EXTERNALSYM ERROR_IPSEC_IKE_MM_DELAY_DROP}
+
+//
+// MessageId: ERROR_IPSEC_IKE_QM_DELAY_DROP
+//
+// MessageText:
+//
+// Negotiation took too long
+//
+ ERROR_IPSEC_IKE_QM_DELAY_DROP = DWORD(13815);
+ {$EXTERNALSYM ERROR_IPSEC_IKE_QM_DELAY_DROP}
+
+//
+// MessageId: ERROR_IPSEC_IKE_ERROR
+//
+// MessageText:
+//
+// Unknown error occurred
+//
+ ERROR_IPSEC_IKE_ERROR = DWORD(13816);
+ {$EXTERNALSYM ERROR_IPSEC_IKE_ERROR}
+
+//
+// MessageId: ERROR_IPSEC_IKE_CRL_FAILED
+//
+// MessageText:
+//
+// Certificate Revocation Check failed
+//
+ ERROR_IPSEC_IKE_CRL_FAILED = DWORD(13817);
+ {$EXTERNALSYM ERROR_IPSEC_IKE_CRL_FAILED}
+
+//
+// MessageId: ERROR_IPSEC_IKE_INVALID_KEY_USAGE
+//
+// MessageText:
+//
+// Invalid certificate key usage
+//
+ ERROR_IPSEC_IKE_INVALID_KEY_USAGE = DWORD(13818);
+ {$EXTERNALSYM ERROR_IPSEC_IKE_INVALID_KEY_USAGE}
+
+//
+// MessageId: ERROR_IPSEC_IKE_INVALID_CERT_TYPE
+//
+// MessageText:
+//
+// Invalid certificate type
+//
+ ERROR_IPSEC_IKE_INVALID_CERT_TYPE = DWORD(13819);
+ {$EXTERNALSYM ERROR_IPSEC_IKE_INVALID_CERT_TYPE}
+
+//
+// MessageId: ERROR_IPSEC_IKE_NO_PRIVATE_KEY
+//
+// MessageText:
+//
+// No private key associated with machine certificate
+//
+ ERROR_IPSEC_IKE_NO_PRIVATE_KEY = DWORD(13820);
+ {$EXTERNALSYM ERROR_IPSEC_IKE_NO_PRIVATE_KEY}
+
+//
+// MessageId: ERROR_IPSEC_IKE_DH_FAIL
+//
+// MessageText:
+//
+// Failure in Diffie-Helman computation
+//
+ ERROR_IPSEC_IKE_DH_FAIL = DWORD(13822);
+ {$EXTERNALSYM ERROR_IPSEC_IKE_DH_FAIL}
+
+//
+// MessageId: ERROR_IPSEC_IKE_INVALID_HEADER
+//
+// MessageText:
+//
+// Invalid header
+//
+ ERROR_IPSEC_IKE_INVALID_HEADER = DWORD(13824);
+ {$EXTERNALSYM ERROR_IPSEC_IKE_INVALID_HEADER}
+
+//
+// MessageId: ERROR_IPSEC_IKE_NO_POLICY
+//
+// MessageText:
+//
+// No policy configured
+//
+ ERROR_IPSEC_IKE_NO_POLICY = DWORD(13825);
+ {$EXTERNALSYM ERROR_IPSEC_IKE_NO_POLICY}
+
+//
+// MessageId: ERROR_IPSEC_IKE_INVALID_SIGNATURE
+//
+// MessageText:
+//
+// Failed to verify signature
+//
+ ERROR_IPSEC_IKE_INVALID_SIGNATURE = DWORD(13826);
+ {$EXTERNALSYM ERROR_IPSEC_IKE_INVALID_SIGNATURE}
+
+//
+// MessageId: ERROR_IPSEC_IKE_KERBEROS_ERROR
+//
+// MessageText:
+//
+// Failed to authenticate using kerberos
+//
+ ERROR_IPSEC_IKE_KERBEROS_ERROR = DWORD(13827);
+ {$EXTERNALSYM ERROR_IPSEC_IKE_KERBEROS_ERROR}
+
+//
+// MessageId: ERROR_IPSEC_IKE_NO_PUBLIC_KEY
+//
+// MessageText:
+//
+// Peer's certificate did not have a public key
+//
+ ERROR_IPSEC_IKE_NO_PUBLIC_KEY = DWORD(13828);
+ {$EXTERNALSYM ERROR_IPSEC_IKE_NO_PUBLIC_KEY}
+
+// These must stay as a unit.
+//
+// MessageId: ERROR_IPSEC_IKE_PROCESS_ERR
+//
+// MessageText:
+//
+// Error processing error payload
+//
+ ERROR_IPSEC_IKE_PROCESS_ERR = DWORD(13829);
+ {$EXTERNALSYM ERROR_IPSEC_IKE_PROCESS_ERR}
+
+//
+// MessageId: ERROR_IPSEC_IKE_PROCESS_ERR_SA
+//
+// MessageText:
+//
+// Error processing SA payload
+//
+ ERROR_IPSEC_IKE_PROCESS_ERR_SA = DWORD(13830);
+ {$EXTERNALSYM ERROR_IPSEC_IKE_PROCESS_ERR_SA}
+
+//
+// MessageId: ERROR_IPSEC_IKE_PROCESS_ERR_PROP
+//
+// MessageText:
+//
+// Error processing Proposal payload
+//
+ ERROR_IPSEC_IKE_PROCESS_ERR_PROP = DWORD(13831);
+ {$EXTERNALSYM ERROR_IPSEC_IKE_PROCESS_ERR_PROP}
+
+//
+// MessageId: ERROR_IPSEC_IKE_PROCESS_ERR_TRANS
+//
+// MessageText:
+//
+// Error processing Transform payload
+//
+ ERROR_IPSEC_IKE_PROCESS_ERR_TRANS = DWORD(13832);
+ {$EXTERNALSYM ERROR_IPSEC_IKE_PROCESS_ERR_TRANS}
+
+//
+// MessageId: ERROR_IPSEC_IKE_PROCESS_ERR_KE
+//
+// MessageText:
+//
+// Error processing KE payload
+//
+ ERROR_IPSEC_IKE_PROCESS_ERR_KE = DWORD(13833);
+ {$EXTERNALSYM ERROR_IPSEC_IKE_PROCESS_ERR_KE}
+
+//
+// MessageId: ERROR_IPSEC_IKE_PROCESS_ERR_ID
+//
+// MessageText:
+//
+// Error processing ID payload
+//
+ ERROR_IPSEC_IKE_PROCESS_ERR_ID = DWORD(13834);
+ {$EXTERNALSYM ERROR_IPSEC_IKE_PROCESS_ERR_ID}
+
+//
+// MessageId: ERROR_IPSEC_IKE_PROCESS_ERR_CERT
+//
+// MessageText:
+//
+// Error processing Cert payload
+//
+ ERROR_IPSEC_IKE_PROCESS_ERR_CERT = DWORD(13835);
+ {$EXTERNALSYM ERROR_IPSEC_IKE_PROCESS_ERR_CERT}
+
+//
+// MessageId: ERROR_IPSEC_IKE_PROCESS_ERR_CERT_REQ
+//
+// MessageText:
+//
+// Error processing Certificate Request payload
+//
+ ERROR_IPSEC_IKE_PROCESS_ERR_CERT_REQ = DWORD(13836);
+ {$EXTERNALSYM ERROR_IPSEC_IKE_PROCESS_ERR_CERT_REQ}
+
+//
+// MessageId: ERROR_IPSEC_IKE_PROCESS_ERR_HASH
+//
+// MessageText:
+//
+// Error processing Hash payload
+//
+ ERROR_IPSEC_IKE_PROCESS_ERR_HASH = DWORD(13837);
+ {$EXTERNALSYM ERROR_IPSEC_IKE_PROCESS_ERR_HASH}
+
+//
+// MessageId: ERROR_IPSEC_IKE_PROCESS_ERR_SIG
+//
+// MessageText:
+//
+// Error processing Signature payload
+//
+ ERROR_IPSEC_IKE_PROCESS_ERR_SIG = DWORD(13838);
+ {$EXTERNALSYM ERROR_IPSEC_IKE_PROCESS_ERR_SIG}
+
+//
+// MessageId: ERROR_IPSEC_IKE_PROCESS_ERR_NONCE
+//
+// MessageText:
+//
+// Error processing Nonce payload
+//
+ ERROR_IPSEC_IKE_PROCESS_ERR_NONCE = DWORD(13839);
+ {$EXTERNALSYM ERROR_IPSEC_IKE_PROCESS_ERR_NONCE}
+
+//
+// MessageId: ERROR_IPSEC_IKE_PROCESS_ERR_NOTIFY
+//
+// MessageText:
+//
+// Error processing Notify payload
+//
+ ERROR_IPSEC_IKE_PROCESS_ERR_NOTIFY = DWORD(13840);
+ {$EXTERNALSYM ERROR_IPSEC_IKE_PROCESS_ERR_NOTIFY}
+
+//
+// MessageId: ERROR_IPSEC_IKE_PROCESS_ERR_DELETE
+//
+// MessageText:
+//
+// Error processing Delete Payload
+//
+ ERROR_IPSEC_IKE_PROCESS_ERR_DELETE = DWORD(13841);
+ {$EXTERNALSYM ERROR_IPSEC_IKE_PROCESS_ERR_DELETE}
+
+//
+// MessageId: ERROR_IPSEC_IKE_PROCESS_ERR_VENDOR
+//
+// MessageText:
+//
+// Error processing VendorId payload
+//
+ ERROR_IPSEC_IKE_PROCESS_ERR_VENDOR = DWORD(13842);
+ {$EXTERNALSYM ERROR_IPSEC_IKE_PROCESS_ERR_VENDOR}
+
+//
+// MessageId: ERROR_IPSEC_IKE_INVALID_PAYLOAD
+//
+// MessageText:
+//
+// Invalid payload received
+//
+ ERROR_IPSEC_IKE_INVALID_PAYLOAD = DWORD(13843);
+ {$EXTERNALSYM ERROR_IPSEC_IKE_INVALID_PAYLOAD}
+
+//
+// MessageId: ERROR_IPSEC_IKE_LOAD_SOFT_SA
+//
+// MessageText:
+//
+// Soft SA loaded
+//
+ ERROR_IPSEC_IKE_LOAD_SOFT_SA = DWORD(13844);
+ {$EXTERNALSYM ERROR_IPSEC_IKE_LOAD_SOFT_SA}
+
+//
+// MessageId: ERROR_IPSEC_IKE_SOFT_SA_TORN_DOWN
+//
+// MessageText:
+//
+// Soft SA torn down
+//
+ ERROR_IPSEC_IKE_SOFT_SA_TORN_DOWN = DWORD(13845);
+ {$EXTERNALSYM ERROR_IPSEC_IKE_SOFT_SA_TORN_DOWN}
+
+//
+// MessageId: ERROR_IPSEC_IKE_INVALID_COOKIE
+//
+// MessageText:
+//
+// Invalid cookie received.
+//
+ ERROR_IPSEC_IKE_INVALID_COOKIE = DWORD(13846);
+ {$EXTERNALSYM ERROR_IPSEC_IKE_INVALID_COOKIE}
+
+//
+// MessageId: ERROR_IPSEC_IKE_NO_PEER_CERT
+//
+// MessageText:
+//
+// Peer failed to send valid machine certificate
+//
+ ERROR_IPSEC_IKE_NO_PEER_CERT = DWORD(13847);
+ {$EXTERNALSYM ERROR_IPSEC_IKE_NO_PEER_CERT}
+
+//
+// MessageId: ERROR_IPSEC_IKE_PEER_CRL_FAILED
+//
+// MessageText:
+//
+// Certification Revocation check of peer's certificate failed
+//
+ ERROR_IPSEC_IKE_PEER_CRL_FAILED = DWORD(13848);
+ {$EXTERNALSYM ERROR_IPSEC_IKE_PEER_CRL_FAILED}
+
+//
+// MessageId: ERROR_IPSEC_IKE_POLICY_CHANGE
+//
+// MessageText:
+//
+// New policy invalidated SAs formed with old policy
+//
+ ERROR_IPSEC_IKE_POLICY_CHANGE = DWORD(13849);
+ {$EXTERNALSYM ERROR_IPSEC_IKE_POLICY_CHANGE}
+
+//
+// MessageId: ERROR_IPSEC_IKE_NO_MM_POLICY
+//
+// MessageText:
+//
+// There is no available Main Mode IKE policy.
+//
+ ERROR_IPSEC_IKE_NO_MM_POLICY = DWORD(13850);
+ {$EXTERNALSYM ERROR_IPSEC_IKE_NO_MM_POLICY}
+
+//
+// MessageId: ERROR_IPSEC_IKE_NOTCBPRIV
+//
+// MessageText:
+//
+// Failed to enabled TCB privilege.
+//
+ ERROR_IPSEC_IKE_NOTCBPRIV = DWORD(13851);
+ {$EXTERNALSYM ERROR_IPSEC_IKE_NOTCBPRIV}
+
+//
+// MessageId: ERROR_IPSEC_IKE_SECLOADFAIL
+//
+// MessageText:
+//
+// Failed to load SECURITY.DLL.
+//
+ ERROR_IPSEC_IKE_SECLOADFAIL = DWORD(13852);
+ {$EXTERNALSYM ERROR_IPSEC_IKE_SECLOADFAIL}
+
+//
+// MessageId: ERROR_IPSEC_IKE_FAILSSPINIT
+//
+// MessageText:
+//
+// Failed to obtain security function table dispatch address from SSPI.
+//
+ ERROR_IPSEC_IKE_FAILSSPINIT = DWORD(13853);
+ {$EXTERNALSYM ERROR_IPSEC_IKE_FAILSSPINIT}
+
+//
+// MessageId: ERROR_IPSEC_IKE_FAILQUERYSSP
+//
+// MessageText:
+//
+// Failed to query Kerberos package to obtain max token size.
+//
+ ERROR_IPSEC_IKE_FAILQUERYSSP = DWORD(13854);
+ {$EXTERNALSYM ERROR_IPSEC_IKE_FAILQUERYSSP}
+
+//
+// MessageId: ERROR_IPSEC_IKE_SRVACQFAIL
+//
+// MessageText:
+//
+// Failed to obtain Kerberos server credentials for ISAKMP/ERROR_IPSEC_IKE service. Kerberos authentication will not function. The most likely reason for this is lack of domain membership. This is normal if your computer is a member of a workgroup.
+//
+ ERROR_IPSEC_IKE_SRVACQFAIL = DWORD(13855);
+ {$EXTERNALSYM ERROR_IPSEC_IKE_SRVACQFAIL}
+
+//
+// MessageId: ERROR_IPSEC_IKE_SRVQUERYCRED
+//
+// MessageText:
+//
+// Failed to determine SSPI principal name for ISAKMP/ERROR_IPSEC_IKE service (QueryCredentialsAttributes).
+//
+ ERROR_IPSEC_IKE_SRVQUERYCRED = DWORD(13856);
+ {$EXTERNALSYM ERROR_IPSEC_IKE_SRVQUERYCRED}
+
+//
+// MessageId: ERROR_IPSEC_IKE_GETSPIFAIL
+//
+// MessageText:
+//
+// Failed to obtain new SPI for the inbound SA from Ipsec driver. The most common cause for this is that the driver does not have the correct filter. Check your policy to verify the filters.
+//
+ ERROR_IPSEC_IKE_GETSPIFAIL = DWORD(13857);
+ {$EXTERNALSYM ERROR_IPSEC_IKE_GETSPIFAIL}
+
+//
+// MessageId: ERROR_IPSEC_IKE_INVALID_FILTER
+//
+// MessageText:
+//
+// Given filter is invalid
+//
+ ERROR_IPSEC_IKE_INVALID_FILTER = DWORD(13858);
+ {$EXTERNALSYM ERROR_IPSEC_IKE_INVALID_FILTER}
+
+//
+// MessageId: ERROR_IPSEC_IKE_OUT_OF_MEMORY
+//
+// MessageText:
+//
+// Memory allocation failed.
+//
+ ERROR_IPSEC_IKE_OUT_OF_MEMORY = DWORD(13859);
+ {$EXTERNALSYM ERROR_IPSEC_IKE_OUT_OF_MEMORY}
+
+//
+// MessageId: ERROR_IPSEC_IKE_ADD_UPDATE_KEY_FAILED
+//
+// MessageText:
+//
+// Failed to add Security Association to IPSec Driver. The most common cause for this is if the IKE negotiation took too long to complete. If the problem persists, reduce the load on the faulting machine.
+//
+ ERROR_IPSEC_IKE_ADD_UPDATE_KEY_FAILED = DWORD(13860);
+ {$EXTERNALSYM ERROR_IPSEC_IKE_ADD_UPDATE_KEY_FAILED}
+
+//
+// MessageId: ERROR_IPSEC_IKE_INVALID_POLICY
+//
+// MessageText:
+//
+// Invalid policy
+//
+ ERROR_IPSEC_IKE_INVALID_POLICY = DWORD(13861);
+ {$EXTERNALSYM ERROR_IPSEC_IKE_INVALID_POLICY}
+
+//
+// MessageId: ERROR_IPSEC_IKE_UNKNOWN_DOI
+//
+// MessageText:
+//
+// Invalid DOI
+//
+ ERROR_IPSEC_IKE_UNKNOWN_DOI = DWORD(13862);
+ {$EXTERNALSYM ERROR_IPSEC_IKE_UNKNOWN_DOI}
+
+//
+// MessageId: ERROR_IPSEC_IKE_INVALID_SITUATION
+//
+// MessageText:
+//
+// Invalid situation
+//
+ ERROR_IPSEC_IKE_INVALID_SITUATION = DWORD(13863);
+ {$EXTERNALSYM ERROR_IPSEC_IKE_INVALID_SITUATION}
+
+//
+// MessageId: ERROR_IPSEC_IKE_DH_FAILURE
+//
+// MessageText:
+//
+// Diffie-Hellman failure
+//
+ ERROR_IPSEC_IKE_DH_FAILURE = DWORD(13864);
+ {$EXTERNALSYM ERROR_IPSEC_IKE_DH_FAILURE}
+
+//
+// MessageId: ERROR_IPSEC_IKE_INVALID_GROUP
+//
+// MessageText:
+//
+// Invalid Diffie-Hellman group
+//
+ ERROR_IPSEC_IKE_INVALID_GROUP = DWORD(13865);
+ {$EXTERNALSYM ERROR_IPSEC_IKE_INVALID_GROUP}
+
+//
+// MessageId: ERROR_IPSEC_IKE_ENCRYPT
+//
+// MessageText:
+//
+// Error encrypting payload
+//
+ ERROR_IPSEC_IKE_ENCRYPT = DWORD(13866);
+ {$EXTERNALSYM ERROR_IPSEC_IKE_ENCRYPT}
+
+//
+// MessageId: ERROR_IPSEC_IKE_DECRYPT
+//
+// MessageText:
+//
+// Error decrypting payload
+//
+ ERROR_IPSEC_IKE_DECRYPT = DWORD(13867);
+ {$EXTERNALSYM ERROR_IPSEC_IKE_DECRYPT}
+
+//
+// MessageId: ERROR_IPSEC_IKE_POLICY_MATCH
+//
+// MessageText:
+//
+// Policy match error
+//
+ ERROR_IPSEC_IKE_POLICY_MATCH = DWORD(13868);
+ {$EXTERNALSYM ERROR_IPSEC_IKE_POLICY_MATCH}
+
+//
+// MessageId: ERROR_IPSEC_IKE_UNSUPPORTED_ID
+//
+// MessageText:
+//
+// Unsupported ID
+//
+ ERROR_IPSEC_IKE_UNSUPPORTED_ID = DWORD(13869);
+ {$EXTERNALSYM ERROR_IPSEC_IKE_UNSUPPORTED_ID}
+
+//
+// MessageId: ERROR_IPSEC_IKE_INVALID_HASH
+//
+// MessageText:
+//
+// Hash verification failed
+//
+ ERROR_IPSEC_IKE_INVALID_HASH = DWORD(13870);
+ {$EXTERNALSYM ERROR_IPSEC_IKE_INVALID_HASH}
+
+//
+// MessageId: ERROR_IPSEC_IKE_INVALID_HASH_ALG
+//
+// MessageText:
+//
+// Invalid hash algorithm
+//
+ ERROR_IPSEC_IKE_INVALID_HASH_ALG = DWORD(13871);
+ {$EXTERNALSYM ERROR_IPSEC_IKE_INVALID_HASH_ALG}
+
+//
+// MessageId: ERROR_IPSEC_IKE_INVALID_HASH_SIZE
+//
+// MessageText:
+//
+// Invalid hash size
+//
+ ERROR_IPSEC_IKE_INVALID_HASH_SIZE = DWORD(13872);
+ {$EXTERNALSYM ERROR_IPSEC_IKE_INVALID_HASH_SIZE}
+
+//
+// MessageId: ERROR_IPSEC_IKE_INVALID_ENCRYPT_ALG
+//
+// MessageText:
+//
+// Invalid encryption algorithm
+//
+ ERROR_IPSEC_IKE_INVALID_ENCRYPT_ALG = DWORD(13873);
+ {$EXTERNALSYM ERROR_IPSEC_IKE_INVALID_ENCRYPT_ALG}
+
+//
+// MessageId: ERROR_IPSEC_IKE_INVALID_AUTH_ALG
+//
+// MessageText:
+//
+// Invalid authentication algorithm
+//
+ ERROR_IPSEC_IKE_INVALID_AUTH_ALG = DWORD(13874);
+ {$EXTERNALSYM ERROR_IPSEC_IKE_INVALID_AUTH_ALG}
+
+//
+// MessageId: ERROR_IPSEC_IKE_INVALID_SIG
+//
+// MessageText:
+//
+// Invalid certificate signature
+//
+ ERROR_IPSEC_IKE_INVALID_SIG = DWORD(13875);
+ {$EXTERNALSYM ERROR_IPSEC_IKE_INVALID_SIG}
+
+//
+// MessageId: ERROR_IPSEC_IKE_LOAD_FAILED
+//
+// MessageText:
+//
+// Load failed
+//
+ ERROR_IPSEC_IKE_LOAD_FAILED = DWORD(13876);
+ {$EXTERNALSYM ERROR_IPSEC_IKE_LOAD_FAILED}
+
+//
+// MessageId: ERROR_IPSEC_IKE_RPC_DELETE
+//
+// MessageText:
+//
+// Deleted via RPC call
+//
+ ERROR_IPSEC_IKE_RPC_DELETE = DWORD(13877);
+ {$EXTERNALSYM ERROR_IPSEC_IKE_RPC_DELETE}
+
+//
+// MessageId: ERROR_IPSEC_IKE_BENIGN_REINIT
+//
+// MessageText:
+//
+// Temporary state created to perform reinit. This is not a real failure.
+//
+ ERROR_IPSEC_IKE_BENIGN_REINIT = DWORD(13878);
+ {$EXTERNALSYM ERROR_IPSEC_IKE_BENIGN_REINIT}
+
+//
+// MessageId: ERROR_IPSEC_IKE_INVALID_RESPONDER_LIFETIME_NOTIFY
+//
+// MessageText:
+//
+// The lifetime value received in the Responder Lifetime Notify is below the Windows 2000 configured minimum value. Please fix the policy on the peer machine.
+//
+ ERROR_IPSEC_IKE_INVALID_RESPONDER_LIFETIME_NOTIFY = DWORD(13879);
+ {$EXTERNALSYM ERROR_IPSEC_IKE_INVALID_RESPONDER_LIFETIME_NOTIFY}
+
+//
+// MessageId: ERROR_IPSEC_IKE_INVALID_CERT_KEYLEN
+//
+// MessageText:
+//
+// Key length in certificate is too small for configured security requirements.
+//
+ ERROR_IPSEC_IKE_INVALID_CERT_KEYLEN = DWORD(13881);
+ {$EXTERNALSYM ERROR_IPSEC_IKE_INVALID_CERT_KEYLEN}
+
+//
+// MessageId: ERROR_IPSEC_IKE_MM_LIMIT
+//
+// MessageText:
+//
+// Max number of established MM SAs to peer exceeded.
+//
+ ERROR_IPSEC_IKE_MM_LIMIT = DWORD(13882);
+ {$EXTERNALSYM ERROR_IPSEC_IKE_MM_LIMIT}
+
+//
+// MessageId: ERROR_IPSEC_IKE_NEGOTIATION_DISABLED
+//
+// MessageText:
+//
+// IKE received a policy that disables negotiation.
+//
+ ERROR_IPSEC_IKE_NEGOTIATION_DISABLED = DWORD(13883);
+ {$EXTERNALSYM ERROR_IPSEC_IKE_NEGOTIATION_DISABLED}
+
+//
+// MessageId: ERROR_IPSEC_IKE_NEG_STATUS_END
+//
+// MessageText:
+//
+// ERROR_IPSEC_IKE_NEG_STATUS_END
+//
+ ERROR_IPSEC_IKE_NEG_STATUS_END = DWORD(13884);
+ {$EXTERNALSYM ERROR_IPSEC_IKE_NEG_STATUS_END}
+
+////////////////////////////////////
+// //
+// COM Error Codes //
+// //
+////////////////////////////////////
+
+//
+// The return value of COM functions and methods is an HRESULT.
+// This is not a handle to anything, but is merely a 32-bit value
+// with several fields encoded in the value. The parts of an
+// HRESULT are shown below.
+//
+// Many of the macros and functions below were orginally defined to
+// operate on SCODEs. SCODEs are no longer used. The macros are
+// still present for compatibility and easy porting of Win16 code.
+// Newly written code should use the HRESULT macros and functions.
+//
+
+//
+// HRESULTs are 32 bit values layed out as follows:
+//
+// 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1
+// 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
+// +-+-+-+-+-+---------------------+-------------------------------+
+// |S|R|C|N|r| Facility | Code |
+// +-+-+-+-+-+---------------------+-------------------------------+
+//
+// where
+//
+// S - Severity - indicates success/fail
+//
+// 0 - Success
+// 1 - Fail (COERROR)
+//
+// R - reserved portion of the facility code, corresponds to NT's
+// second severity bit.
+//
+// C - reserved portion of the facility code, corresponds to NT's
+// C field.
+//
+// N - reserved portion of the facility code. Used to indicate a
+// mapped NT status value.
+//
+// r - reserved portion of the facility code. Reserved for internal
+// use. Used to indicate HRESULT values that are not status
+// values, but are instead message ids for display strings.
+//
+// Facility - is the facility code
+//
+// Code - is the facility's status code
+//
+
+//
+// Severity values
+//
+
+ SEVERITY_SUCCESS = 0;
+ {$EXTERNALSYM SEVERITY_SUCCESS}
+ SEVERITY_ERROR = 1;
+ {$EXTERNALSYM SEVERITY_ERROR}
+
+//
+// Generic test for success on any status value (non-negative numbers
+// indicate success).
+//
+
+function SUCCEEDED(Status: HRESULT): BOOL;
+{$EXTERNALSYM SUCCEEDED}
+
+//
+// and the inverse
+//
+
+function FAILED(Status: HRESULT): BOOL;
+{$EXTERNALSYM FAILED}
+
+//
+// Generic test for error on any status value.
+//
+
+function IS_ERROR(Status: HRESULT): BOOL;
+{$EXTERNALSYM IS_ERROR}
+
+//
+// Return the code
+//
+
+function HRESULT_CODE(hr: HRESULT): DWORD;
+{$EXTERNALSYM HRESULT_CODE}
+
+function SCODE_CODE(sc: LONG): DWORD;
+{$EXTERNALSYM SCODE_CODE}
+
+//
+// Return the facility
+//
+
+function HRESULT_FACILITY(hr: HRESULT): DWORD;
+{$EXTERNALSYM HRESULT_FACILITY}
+
+function SCODE_FACILITY(sc: LONG): DWORD;
+{$EXTERNALSYM SCODE_FACILITY}
+
+//
+// Return the severity
+//
+
+function HRESULT_SEVERITY(hr: HRESULT): DWORD;
+{$EXTERNALSYM HRESULT_SEVERITY}
+
+function SCODE_SEVERITY(sc: LONG): DWORD;
+{$EXTERNALSYM SCODE_SEVERITY}
+
+//
+// Create an HRESULT value from component pieces
+//
+
+function MAKE_HRESULT(sev, fac, code: DWORD): HRESULT;
+{$EXTERNALSYM MAKE_HRESULT}
+
+function MAKE_SCODE(sev, fac,code: DWORD): DWORD;
+{$EXTERNALSYM MAKE_SCODE}
+
+//
+// Map a WIN32 error value into a HRESULT
+// Note: This assumes that WIN32 errors fall in the range -32k to 32k.
+//
+// Define bits here so macros are guaranteed to work
+
+const
+ FACILITY_NT_BIT = $10000000;
+ {$EXTERNALSYM FACILITY_NT_BIT}
+
+// __HRESULT_FROM_WIN32 will always be a macro.
+// The goal will be to enable INLINE_HRESULT_FROM_WIN32 all the time,
+// but there's too much code to change to do that at this time.
+
+function __HRESULT_FROM_WIN32(x: DWORD): HRESULT;
+{$EXTERNALSYM __HRESULT_FROM_WIN32}
+
+function HRESULT_FROM_WIN32(x: DWORD): HRESULT;
+{$EXTERNALSYM HRESULT_FROM_WIN32}
+
+//
+// Map an NT status value into a HRESULT
+//
+
+function HRESULT_FROM_NT(x: NTSTATUS): HRESULT;
+{$EXTERNALSYM HRESULT_FROM_NT}
+
+// ****** OBSOLETE functions
+
+// HRESULT functions
+// As noted above, these functions are obsolete and should not be used.
+
+// Extract the SCODE from a HRESULT
+
+function GetScode(hr: HRESULT): DWORD;
+{$EXTERNALSYM GetScode}
+
+// Convert an SCODE into an HRESULT.
+
+function ResultFromScode(sc: DWORD): HRESULT;
+{$EXTERNALSYM ResultFromScode}
+
+// PropagateResult is a noop
+
+function PropagateResult(hrPrevious, scBase: DWORD): HRESULT;
+{$EXTERNALSYM PropagateResult}
+
+// ****** End of OBSOLETE functions.
+
+// ---------------------- HRESULT value definitions -----------------
+//
+// HRESULT definitions
+//
+
+type
+ _HRESULT_TYPEDEF_ = HRESULT;
+ {$EXTERNALSYM _HRESULT_TYPEDEF_}
+
+const
+ NOERROR = 0;
+ {$EXTERNALSYM NOERROR}
+
+//
+// Error definitions follow
+//
+
+//
+// Codes 0x4000-0x40ff are reserved for OLE
+//
+//
+// Error codes
+//
+//
+// MessageId: E_UNEXPECTED
+//
+// MessageText:
+//
+// Catastrophic failure
+//
+ E_UNEXPECTED = HRESULT($8000FFFF);
+ {$EXTERNALSYM E_UNEXPECTED}
+
+//
+// MessageId: E_NOTIMPL
+//
+// MessageText:
+//
+// Not implemented
+//
+ E_NOTIMPL = HRESULT($80004001);
+ {$EXTERNALSYM E_NOTIMPL}
+
+//
+// MessageId: E_OUTOFMEMORY
+//
+// MessageText:
+//
+// Ran out of memory
+//
+ E_OUTOFMEMORY = HRESULT($8007000E);
+ {$EXTERNALSYM E_OUTOFMEMORY}
+
+//
+// MessageId: E_INVALIDARG
+//
+// MessageText:
+//
+// One or more arguments are invalid
+//
+ E_INVALIDARG = HRESULT($80070057);
+ {$EXTERNALSYM E_INVALIDARG}
+
+//
+// MessageId: E_NOINTERFACE
+//
+// MessageText:
+//
+// No such interface supported
+//
+ E_NOINTERFACE = HRESULT($80004002);
+ {$EXTERNALSYM E_NOINTERFACE}
+
+//
+// MessageId: E_POINTER
+//
+// MessageText:
+//
+// Invalid pointer
+//
+ E_POINTER = HRESULT($80004003);
+ {$EXTERNALSYM E_POINTER}
+
+//
+// MessageId: E_HANDLE
+//
+// MessageText:
+//
+// Invalid handle
+//
+ E_HANDLE = HRESULT($80070006);
+ {$EXTERNALSYM E_HANDLE}
+
+//
+// MessageId: E_ABORT
+//
+// MessageText:
+//
+// Operation aborted
+//
+ E_ABORT = HRESULT($80004004);
+ {$EXTERNALSYM E_ABORT}
+
+//
+// MessageId: E_FAIL
+//
+// MessageText:
+//
+// Unspecified error
+//
+ E_FAIL = HRESULT($80004005);
+ {$EXTERNALSYM E_FAIL}
+
+//
+// MessageId: E_ACCESSDENIED
+//
+// MessageText:
+//
+// General access denied error
+//
+ E_ACCESSDENIED = HRESULT($80070005);
+ {$EXTERNALSYM E_ACCESSDENIED}
+
+//
+// MessageId: E_PENDING
+//
+// MessageText:
+//
+// The data necessary to complete this operation is not yet available.
+//
+ E_PENDING = HRESULT($8000000A);
+ {$EXTERNALSYM E_PENDING}
+
+//
+// MessageId: CO_E_INIT_TLS
+//
+// MessageText:
+//
+// Thread local storage failure
+//
+ CO_E_INIT_TLS = HRESULT($80004006);
+ {$EXTERNALSYM CO_E_INIT_TLS}
+
+//
+// MessageId: CO_E_INIT_SHARED_ALLOCATOR
+//
+// MessageText:
+//
+// Get shared memory allocator failure
+//
+ CO_E_INIT_SHARED_ALLOCATOR = HRESULT($80004007);
+ {$EXTERNALSYM CO_E_INIT_SHARED_ALLOCATOR}
+
+//
+// MessageId: CO_E_INIT_MEMORY_ALLOCATOR
+//
+// MessageText:
+//
+// Get memory allocator failure
+//
+ CO_E_INIT_MEMORY_ALLOCATOR = HRESULT($80004008);
+ {$EXTERNALSYM CO_E_INIT_MEMORY_ALLOCATOR}
+
+//
+// MessageId: CO_E_INIT_CLASS_CACHE
+//
+// MessageText:
+//
+// Unable to initialize class cache
+//
+ CO_E_INIT_CLASS_CACHE = HRESULT($80004009);
+ {$EXTERNALSYM CO_E_INIT_CLASS_CACHE}
+
+//
+// MessageId: CO_E_INIT_RPC_CHANNEL
+//
+// MessageText:
+//
+// Unable to initialize RPC services
+//
+ CO_E_INIT_RPC_CHANNEL = HRESULT($8000400A);
+ {$EXTERNALSYM CO_E_INIT_RPC_CHANNEL}
+
+//
+// MessageId: CO_E_INIT_TLS_SET_CHANNEL_CONTROL
+//
+// MessageText:
+//
+// Cannot set thread local storage channel control
+//
+ CO_E_INIT_TLS_SET_CHANNEL_CONTROL = HRESULT($8000400B);
+ {$EXTERNALSYM CO_E_INIT_TLS_SET_CHANNEL_CONTROL}
+
+//
+// MessageId: CO_E_INIT_TLS_CHANNEL_CONTROL
+//
+// MessageText:
+//
+// Could not allocate thread local storage channel control
+//
+ CO_E_INIT_TLS_CHANNEL_CONTROL = HRESULT($8000400C);
+ {$EXTERNALSYM CO_E_INIT_TLS_CHANNEL_CONTROL}
+
+//
+// MessageId: CO_E_INIT_UNACCEPTED_USER_ALLOCATOR
+//
+// MessageText:
+//
+// The user supplied memory allocator is unacceptable
+//
+ CO_E_INIT_UNACCEPTED_USER_ALLOCATOR = HRESULT($8000400D);
+ {$EXTERNALSYM CO_E_INIT_UNACCEPTED_USER_ALLOCATOR}
+
+//
+// MessageId: CO_E_INIT_SCM_MUTEX_EXISTS
+//
+// MessageText:
+//
+// The OLE service mutex already exists
+//
+ CO_E_INIT_SCM_MUTEX_EXISTS = HRESULT($8000400E);
+ {$EXTERNALSYM CO_E_INIT_SCM_MUTEX_EXISTS}
+
+//
+// MessageId: CO_E_INIT_SCM_FILE_MAPPING_EXISTS
+//
+// MessageText:
+//
+// The OLE service file mapping already exists
+//
+ CO_E_INIT_SCM_FILE_MAPPING_EXISTS = HRESULT($8000400F);
+ {$EXTERNALSYM CO_E_INIT_SCM_FILE_MAPPING_EXISTS}
+
+//
+// MessageId: CO_E_INIT_SCM_MAP_VIEW_OF_FILE
+//
+// MessageText:
+//
+// Unable to map view of file for OLE service
+//
+ CO_E_INIT_SCM_MAP_VIEW_OF_FILE = HRESULT($80004010);
+ {$EXTERNALSYM CO_E_INIT_SCM_MAP_VIEW_OF_FILE}
+
+//
+// MessageId: CO_E_INIT_SCM_EXEC_FAILURE
+//
+// MessageText:
+//
+// Failure attempting to launch OLE service
+//
+ CO_E_INIT_SCM_EXEC_FAILURE = HRESULT($80004011);
+ {$EXTERNALSYM CO_E_INIT_SCM_EXEC_FAILURE}
+
+//
+// MessageId: CO_E_INIT_ONLY_SINGLE_THREADED
+//
+// MessageText:
+//
+// There was an attempt to call CoInitialize a second time while single threaded
+//
+ CO_E_INIT_ONLY_SINGLE_THREADED = HRESULT($80004012);
+ {$EXTERNALSYM CO_E_INIT_ONLY_SINGLE_THREADED}
+
+//
+// MessageId: CO_E_CANT_REMOTE
+//
+// MessageText:
+//
+// A Remote activation was necessary but was not allowed
+//
+ CO_E_CANT_REMOTE = HRESULT($80004013);
+ {$EXTERNALSYM CO_E_CANT_REMOTE}
+
+//
+// MessageId: CO_E_BAD_SERVER_NAME
+//
+// MessageText:
+//
+// A Remote activation was necessary but the server name provided was invalid
+//
+ CO_E_BAD_SERVER_NAME = HRESULT($80004014);
+ {$EXTERNALSYM CO_E_BAD_SERVER_NAME}
+
+//
+// MessageId: CO_E_WRONG_SERVER_IDENTITY
+//
+// MessageText:
+//
+// The class is configured to run as a security id different from the caller
+//
+ CO_E_WRONG_SERVER_IDENTITY = HRESULT($80004015);
+ {$EXTERNALSYM CO_E_WRONG_SERVER_IDENTITY}
+
+//
+// MessageId: CO_E_OLE1DDE_DISABLED
+//
+// MessageText:
+//
+// Use of Ole1 services requiring DDE windows is disabled
+//
+ CO_E_OLE1DDE_DISABLED = HRESULT($80004016);
+ {$EXTERNALSYM CO_E_OLE1DDE_DISABLED}
+
+//
+// MessageId: CO_E_RUNAS_SYNTAX
+//
+// MessageText:
+//
+// A RunAs specification must be <domain name>\<user name> or simply <user name>
+//
+ CO_E_RUNAS_SYNTAX = HRESULT($80004017);
+ {$EXTERNALSYM CO_E_RUNAS_SYNTAX}
+
+//
+// MessageId: CO_E_CREATEPROCESS_FAILURE
+//
+// MessageText:
+//
+// The server process could not be started. The pathname may be incorrect.
+//
+ CO_E_CREATEPROCESS_FAILURE = HRESULT($80004018);
+ {$EXTERNALSYM CO_E_CREATEPROCESS_FAILURE}
+
+//
+// MessageId: CO_E_RUNAS_CREATEPROCESS_FAILURE
+//
+// MessageText:
+//
+// The server process could not be started as the configured identity. The pathname may be incorrect or unavailable.
+//
+ CO_E_RUNAS_CREATEPROCESS_FAILURE = HRESULT($80004019);
+ {$EXTERNALSYM CO_E_RUNAS_CREATEPROCESS_FAILURE}
+
+//
+// MessageId: CO_E_RUNAS_LOGON_FAILURE
+//
+// MessageText:
+//
+// The server process could not be started because the configured identity is incorrect. Check the username and password.
+//
+ CO_E_RUNAS_LOGON_FAILURE = HRESULT($8000401A);
+ {$EXTERNALSYM CO_E_RUNAS_LOGON_FAILURE}
+
+//
+// MessageId: CO_E_LAUNCH_PERMSSION_DENIED
+//
+// MessageText:
+//
+// The client is not allowed to launch this server.
+//
+ CO_E_LAUNCH_PERMSSION_DENIED = HRESULT($8000401B);
+ {$EXTERNALSYM CO_E_LAUNCH_PERMSSION_DENIED}
+
+//
+// MessageId: CO_E_START_SERVICE_FAILURE
+//
+// MessageText:
+//
+// The service providing this server could not be started.
+//
+ CO_E_START_SERVICE_FAILURE = HRESULT($8000401C);
+ {$EXTERNALSYM CO_E_START_SERVICE_FAILURE}
+
+//
+// MessageId: CO_E_REMOTE_COMMUNICATION_FAILURE
+//
+// MessageText:
+//
+// This computer was unable to communicate with the computer providing the server.
+//
+ CO_E_REMOTE_COMMUNICATION_FAILURE = HRESULT($8000401D);
+ {$EXTERNALSYM CO_E_REMOTE_COMMUNICATION_FAILURE}
+
+//
+// MessageId: CO_E_SERVER_START_TIMEOUT
+//
+// MessageText:
+//
+// The server did not respond after being launched.
+//
+ CO_E_SERVER_START_TIMEOUT = HRESULT($8000401E);
+ {$EXTERNALSYM CO_E_SERVER_START_TIMEOUT}
+
+//
+// MessageId: CO_E_CLSREG_INCONSISTENT
+//
+// MessageText:
+//
+// The registration information for this server is inconsistent or incomplete.
+//
+ CO_E_CLSREG_INCONSISTENT = HRESULT($8000401F);
+ {$EXTERNALSYM CO_E_CLSREG_INCONSISTENT}
+
+//
+// MessageId: CO_E_IIDREG_INCONSISTENT
+//
+// MessageText:
+//
+// The registration information for this interface is inconsistent or incomplete.
+//
+ CO_E_IIDREG_INCONSISTENT = HRESULT($80004020);
+ {$EXTERNALSYM CO_E_IIDREG_INCONSISTENT}
+
+//
+// MessageId: CO_E_NOT_SUPPORTED
+//
+// MessageText:
+//
+// The operation attempted is not supported.
+//
+ CO_E_NOT_SUPPORTED = HRESULT($80004021);
+ {$EXTERNALSYM CO_E_NOT_SUPPORTED}
+
+//
+// MessageId: CO_E_RELOAD_DLL
+//
+// MessageText:
+//
+// A dll must be loaded.
+//
+ CO_E_RELOAD_DLL = HRESULT($80004022);
+ {$EXTERNALSYM CO_E_RELOAD_DLL}
+
+//
+// MessageId: CO_E_MSI_ERROR
+//
+// MessageText:
+//
+// A Microsoft Software Installer error was encountered.
+//
+ CO_E_MSI_ERROR = HRESULT($80004023);
+ {$EXTERNALSYM CO_E_MSI_ERROR}
+
+//
+// MessageId: CO_E_ATTEMPT_TO_CREATE_OUTSIDE_CLIENT_CONTEXT
+//
+// MessageText:
+//
+// The specified activation could not occur in the client context as specified.
+//
+ CO_E_ATTEMPT_TO_CREATE_OUTSIDE_CLIENT_CONTEXT = HRESULT($80004024);
+ {$EXTERNALSYM CO_E_ATTEMPT_TO_CREATE_OUTSIDE_CLIENT_CONTEXT}
+
+//
+// MessageId: CO_E_SERVER_PAUSED
+//
+// MessageText:
+//
+// Activations on the server are paused.
+//
+ CO_E_SERVER_PAUSED = HRESULT($80004025);
+ {$EXTERNALSYM CO_E_SERVER_PAUSED}
+
+//
+// MessageId: CO_E_SERVER_NOT_PAUSED
+//
+// MessageText:
+//
+// Activations on the server are not paused.
+//
+ CO_E_SERVER_NOT_PAUSED = HRESULT($80004026);
+ {$EXTERNALSYM CO_E_SERVER_NOT_PAUSED}
+
+//
+// MessageId: CO_E_CLASS_DISABLED
+//
+// MessageText:
+//
+// The component or application containing the component has been disabled.
+//
+ CO_E_CLASS_DISABLED = HRESULT($80004027);
+ {$EXTERNALSYM CO_E_CLASS_DISABLED}
+
+//
+// MessageId: CO_E_CLRNOTAVAILABLE
+//
+// MessageText:
+//
+// The common language runtime is not available
+//
+ CO_E_CLRNOTAVAILABLE = HRESULT($80004028);
+ {$EXTERNALSYM CO_E_CLRNOTAVAILABLE}
+
+//
+// MessageId: CO_E_ASYNC_WORK_REJECTED
+//
+// MessageText:
+//
+// The thread-pool rejected the submitted asynchronous work.
+//
+ CO_E_ASYNC_WORK_REJECTED = HRESULT($80004029);
+ {$EXTERNALSYM CO_E_ASYNC_WORK_REJECTED}
+
+//
+// MessageId: CO_E_SERVER_INIT_TIMEOUT
+//
+// MessageText:
+//
+// The server started, but did not finish initializing in a timely fashion.
+//
+ CO_E_SERVER_INIT_TIMEOUT = HRESULT($8000402A);
+ {$EXTERNALSYM CO_E_SERVER_INIT_TIMEOUT}
+
+//
+// MessageId: CO_E_NO_SECCTX_IN_ACTIVATE
+//
+// MessageText:
+//
+// Unable to complete the call since there is no COM+ security context inside IObjectControl.Activate.
+//
+ CO_E_NO_SECCTX_IN_ACTIVATE = HRESULT($8000402B);
+ {$EXTERNALSYM CO_E_NO_SECCTX_IN_ACTIVATE}
+
+//
+// MessageId: CO_E_TRACKER_CONFIG
+//
+// MessageText:
+//
+// The provided tracker configuration is invalid
+//
+ CO_E_TRACKER_CONFIG = HRESULT($80004030);
+ {$EXTERNALSYM CO_E_TRACKER_CONFIG}
+
+//
+// MessageId: CO_E_THREADPOOL_CONFIG
+//
+// MessageText:
+//
+// The provided thread pool configuration is invalid
+//
+ CO_E_THREADPOOL_CONFIG = HRESULT($80004031);
+ {$EXTERNALSYM CO_E_THREADPOOL_CONFIG}
+
+//
+// MessageId: CO_E_SXS_CONFIG
+//
+// MessageText:
+//
+// The provided side-by-side configuration is invalid
+//
+ CO_E_SXS_CONFIG = HRESULT($80004032);
+ {$EXTERNALSYM CO_E_SXS_CONFIG}
+
+//
+// MessageId: CO_E_MALFORMED_SPN
+//
+// MessageText:
+//
+// The server principal name (SPN) obtained during security negotiation is malformed.
+//
+ CO_E_MALFORMED_SPN = HRESULT($80004033);
+ {$EXTERNALSYM CO_E_MALFORMED_SPN}
+
+//
+// Success codes
+//
+ S_OK = HRESULT($00000000);
+ {$EXTERNALSYM S_OK}
+ S_FALSE = HRESULT($00000001);
+ {$EXTERNALSYM S_FALSE}
+
+// ******************
+// FACILITY_ITF
+// ******************
+
+//
+// Codes 0x0-0x01ff are reserved for the OLE group of
+// interfaces.
+//
+
+//
+// Generic OLE errors that may be returned by many inerfaces
+//
+
+ OLE_E_FIRST = HRESULT($80040000);
+ {$EXTERNALSYM OLE_E_FIRST}
+ OLE_E_LAST = HRESULT($800400FF);
+ {$EXTERNALSYM OLE_E_LAST}
+ OLE_S_FIRST = HRESULT($00040000);
+ {$EXTERNALSYM OLE_S_FIRST}
+ OLE_S_LAST = HRESULT($000400FF);
+ {$EXTERNALSYM OLE_S_LAST}
+
+//
+// Old OLE errors
+//
+//
+// MessageId: OLE_E_OLEVERB
+//
+// MessageText:
+//
+// Invalid OLEVERB structure
+//
+ OLE_E_OLEVERB = HRESULT($80040000);
+ {$EXTERNALSYM OLE_E_OLEVERB}
+
+//
+// MessageId: OLE_E_ADVF
+//
+// MessageText:
+//
+// Invalid advise flags
+//
+ OLE_E_ADVF = HRESULT($80040001);
+ {$EXTERNALSYM OLE_E_ADVF}
+
+//
+// MessageId: OLE_E_ENUM_NOMORE
+//
+// MessageText:
+//
+// Can't enumerate any more, because the associated data is missing
+//
+ OLE_E_ENUM_NOMORE = HRESULT($80040002);
+ {$EXTERNALSYM OLE_E_ENUM_NOMORE}
+
+//
+// MessageId: OLE_E_ADVISENOTSUPPORTED
+//
+// MessageText:
+//
+// This implementation doesn't take advises
+//
+ OLE_E_ADVISENOTSUPPORTED = HRESULT($80040003);
+ {$EXTERNALSYM OLE_E_ADVISENOTSUPPORTED}
+
+//
+// MessageId: OLE_E_NOCONNECTION
+//
+// MessageText:
+//
+// There is no connection for this connection ID
+//
+ OLE_E_NOCONNECTION = HRESULT($80040004);
+ {$EXTERNALSYM OLE_E_NOCONNECTION}
+
+//
+// MessageId: OLE_E_NOTRUNNING
+//
+// MessageText:
+//
+// Need to run the object to perform this operation
+//
+ OLE_E_NOTRUNNING = HRESULT($80040005);
+ {$EXTERNALSYM OLE_E_NOTRUNNING}
+
+//
+// MessageId: OLE_E_NOCACHE
+//
+// MessageText:
+//
+// There is no cache to operate on
+//
+ OLE_E_NOCACHE = HRESULT($80040006);
+ {$EXTERNALSYM OLE_E_NOCACHE}
+
+//
+// MessageId: OLE_E_BLANK
+//
+// MessageText:
+//
+// Uninitialized object
+//
+ OLE_E_BLANK = HRESULT($80040007);
+ {$EXTERNALSYM OLE_E_BLANK}
+
+//
+// MessageId: OLE_E_CLASSDIFF
+//
+// MessageText:
+//
+// Linked object's source class has changed
+//
+ OLE_E_CLASSDIFF = HRESULT($80040008);
+ {$EXTERNALSYM OLE_E_CLASSDIFF}
+
+//
+// MessageId: OLE_E_CANT_GETMONIKER
+//
+// MessageText:
+//
+// Not able to get the moniker of the object
+//
+ OLE_E_CANT_GETMONIKER = HRESULT($80040009);
+ {$EXTERNALSYM OLE_E_CANT_GETMONIKER}
+
+//
+// MessageId: OLE_E_CANT_BINDTOSOURCE
+//
+// MessageText:
+//
+// Not able to bind to the source
+//
+ OLE_E_CANT_BINDTOSOURCE = HRESULT($8004000A);
+ {$EXTERNALSYM OLE_E_CANT_BINDTOSOURCE}
+
+//
+// MessageId: OLE_E_STATIC
+//
+// MessageText:
+//
+// Object is static; operation not allowed
+//
+ OLE_E_STATIC = HRESULT($8004000B);
+ {$EXTERNALSYM OLE_E_STATIC}
+
+//
+// MessageId: OLE_E_PROMPTSAVECANCELLED
+//
+// MessageText:
+//
+// User canceled out of save dialog
+//
+ OLE_E_PROMPTSAVECANCELLED = HRESULT($8004000C);
+ {$EXTERNALSYM OLE_E_PROMPTSAVECANCELLED}
+
+//
+// MessageId: OLE_E_INVALIDRECT
+//
+// MessageText:
+//
+// Invalid rectangle
+//
+ OLE_E_INVALIDRECT = HRESULT($8004000D);
+ {$EXTERNALSYM OLE_E_INVALIDRECT}
+
+//
+// MessageId: OLE_E_WRONGCOMPOBJ
+//
+// MessageText:
+//
+// compobj.dll is too old for the ole2.dll initialized
+//
+ OLE_E_WRONGCOMPOBJ = HRESULT($8004000E);
+ {$EXTERNALSYM OLE_E_WRONGCOMPOBJ}
+
+//
+// MessageId: OLE_E_INVALIDHWND
+//
+// MessageText:
+//
+// Invalid window handle
+//
+ OLE_E_INVALIDHWND = HRESULT($8004000F);
+ {$EXTERNALSYM OLE_E_INVALIDHWND}
+
+//
+// MessageId: OLE_E_NOT_INPLACEACTIVE
+//
+// MessageText:
+//
+// Object is not in any of the inplace active states
+//
+ OLE_E_NOT_INPLACEACTIVE = HRESULT($80040010);
+ {$EXTERNALSYM OLE_E_NOT_INPLACEACTIVE}
+
+//
+// MessageId: OLE_E_CANTCONVERT
+//
+// MessageText:
+//
+// Not able to convert object
+//
+ OLE_E_CANTCONVERT = HRESULT($80040011);
+ {$EXTERNALSYM OLE_E_CANTCONVERT}
+
+//
+// MessageId: OLE_E_NOSTORAGE
+//
+// MessageText:
+//
+// Not able to perform the operation because object is not given storage yet
+//
+ OLE_E_NOSTORAGE = HRESULT($80040012);
+ {$EXTERNALSYM OLE_E_NOSTORAGE}
+
+//
+// MessageId: DV_E_FORMATETC
+//
+// MessageText:
+//
+// Invalid FORMATETC structure
+//
+ DV_E_FORMATETC = HRESULT($80040064);
+ {$EXTERNALSYM DV_E_FORMATETC}
+
+//
+// MessageId: DV_E_DVTARGETDEVICE
+//
+// MessageText:
+//
+// Invalid DVTARGETDEVICE structure
+//
+ DV_E_DVTARGETDEVICE = HRESULT($80040065);
+ {$EXTERNALSYM DV_E_DVTARGETDEVICE}
+
+//
+// MessageId: DV_E_STGMEDIUM
+//
+// MessageText:
+//
+// Invalid STDGMEDIUM structure
+//
+ DV_E_STGMEDIUM = HRESULT($80040066);
+ {$EXTERNALSYM DV_E_STGMEDIUM}
+
+//
+// MessageId: DV_E_STATDATA
+//
+// MessageText:
+//
+// Invalid STATDATA structure
+//
+ DV_E_STATDATA = HRESULT($80040067);
+ {$EXTERNALSYM DV_E_STATDATA}
+
+//
+// MessageId: DV_E_LINDEX
+//
+// MessageText:
+//
+// Invalid lindex
+//
+ DV_E_LINDEX = HRESULT($80040068);
+ {$EXTERNALSYM DV_E_LINDEX}
+
+//
+// MessageId: DV_E_TYMED
+//
+// MessageText:
+//
+// Invalid tymed
+//
+ DV_E_TYMED = HRESULT($80040069);
+ {$EXTERNALSYM DV_E_TYMED}
+
+//
+// MessageId: DV_E_CLIPFORMAT
+//
+// MessageText:
+//
+// Invalid clipboard format
+//
+ DV_E_CLIPFORMAT = HRESULT($8004006A);
+ {$EXTERNALSYM DV_E_CLIPFORMAT}
+
+//
+// MessageId: DV_E_DVASPECT
+//
+// MessageText:
+//
+// Invalid aspect(s)
+//
+ DV_E_DVASPECT = HRESULT($8004006B);
+ {$EXTERNALSYM DV_E_DVASPECT}
+
+//
+// MessageId: DV_E_DVTARGETDEVICE_SIZE
+//
+// MessageText:
+//
+// tdSize parameter of the DVTARGETDEVICE structure is invalid
+//
+ DV_E_DVTARGETDEVICE_SIZE = HRESULT($8004006C);
+ {$EXTERNALSYM DV_E_DVTARGETDEVICE_SIZE}
+
+//
+// MessageId: DV_E_NOIVIEWOBJECT
+//
+// MessageText:
+//
+// Object doesn't support IViewObject interface
+//
+ DV_E_NOIVIEWOBJECT = HRESULT($8004006D);
+ {$EXTERNALSYM DV_E_NOIVIEWOBJECT}
+
+ DRAGDROP_E_FIRST = DWORD($80040100);
+ {$EXTERNALSYM DRAGDROP_E_FIRST}
+ DRAGDROP_E_LAST = DWORD($8004010F);
+ {$EXTERNALSYM DRAGDROP_E_LAST}
+ DRAGDROP_S_FIRST = DWORD($00040100);
+ {$EXTERNALSYM DRAGDROP_S_FIRST}
+ DRAGDROP_S_LAST = DWORD($0004010F);
+ {$EXTERNALSYM DRAGDROP_S_LAST}
+//
+// MessageId: DRAGDROP_E_NOTREGISTERED
+//
+// MessageText:
+//
+// Trying to revoke a drop target that has not been registered
+//
+ DRAGDROP_E_NOTREGISTERED = HRESULT($80040100);
+ {$EXTERNALSYM DRAGDROP_E_NOTREGISTERED}
+
+//
+// MessageId: DRAGDROP_E_ALREADYREGISTERED
+//
+// MessageText:
+//
+// This window has already been registered as a drop target
+//
+ DRAGDROP_E_ALREADYREGISTERED = HRESULT($80040101);
+ {$EXTERNALSYM DRAGDROP_E_ALREADYREGISTERED}
+
+//
+// MessageId: DRAGDROP_E_INVALIDHWND
+//
+// MessageText:
+//
+// Invalid window handle
+//
+ DRAGDROP_E_INVALIDHWND = HRESULT($80040102);
+ {$EXTERNALSYM DRAGDROP_E_INVALIDHWND}
+
+ CLASSFACTORY_E_FIRST = DWORD($80040110);
+ {$EXTERNALSYM CLASSFACTORY_E_FIRST}
+ CLASSFACTORY_E_LAST = DWORD($8004011F);
+ {$EXTERNALSYM CLASSFACTORY_E_LAST}
+ CLASSFACTORY_S_FIRST = DWORD($00040110);
+ {$EXTERNALSYM CLASSFACTORY_S_FIRST}
+ CLASSFACTORY_S_LAST = DWORD($0004011F);
+ {$EXTERNALSYM CLASSFACTORY_S_LAST}
+//
+// MessageId: CLASS_E_NOAGGREGATION
+//
+// MessageText:
+//
+// Class does not support aggregation (or class object is remote)
+//
+ CLASS_E_NOAGGREGATION = HRESULT($80040110);
+ {$EXTERNALSYM CLASS_E_NOAGGREGATION}
+
+//
+// MessageId: CLASS_E_CLASSNOTAVAILABLE
+//
+// MessageText:
+//
+// ClassFactory cannot supply requested class
+//
+ CLASS_E_CLASSNOTAVAILABLE = HRESULT($80040111);
+ {$EXTERNALSYM CLASS_E_CLASSNOTAVAILABLE}
+
+//
+// MessageId: CLASS_E_NOTLICENSED
+//
+// MessageText:
+//
+// Class is not licensed for use
+//
+ CLASS_E_NOTLICENSED = HRESULT($80040112);
+ {$EXTERNALSYM CLASS_E_NOTLICENSED}
+
+ MARSHAL_E_FIRST = DWORD($80040120);
+ {$EXTERNALSYM MARSHAL_E_FIRST}
+ MARSHAL_E_LAST = DWORD($8004012F);
+ {$EXTERNALSYM MARSHAL_E_LAST}
+ MARSHAL_S_FIRST = DWORD($00040120);
+ {$EXTERNALSYM MARSHAL_S_FIRST}
+ MARSHAL_S_LAST = DWORD($0004012F);
+ {$EXTERNALSYM MARSHAL_S_LAST}
+ DATA_E_FIRST = DWORD($80040130);
+ {$EXTERNALSYM DATA_E_FIRST}
+ DATA_E_LAST = DWORD($8004013F);
+ {$EXTERNALSYM DATA_E_LAST}
+ DATA_S_FIRST = DWORD($00040130);
+ {$EXTERNALSYM DATA_S_FIRST}
+ DATA_S_LAST = DWORD($0004013F);
+ {$EXTERNALSYM DATA_S_LAST}
+ VIEW_E_FIRST = DWORD($80040140);
+ {$EXTERNALSYM VIEW_E_FIRST}
+ VIEW_E_LAST = DWORD($8004014F);
+ {$EXTERNALSYM VIEW_E_LAST}
+ VIEW_S_FIRST = DWORD($00040140);
+ {$EXTERNALSYM VIEW_S_FIRST}
+ VIEW_S_LAST = DWORD($0004014F);
+ {$EXTERNALSYM VIEW_S_LAST}
+//
+// MessageId: VIEW_E_DRAW
+//
+// MessageText:
+//
+// Error drawing view
+//
+ VIEW_E_DRAW = HRESULT($80040140);
+ {$EXTERNALSYM VIEW_E_DRAW}
+
+ REGDB_E_FIRST = DWORD($80040150);
+ {$EXTERNALSYM REGDB_E_FIRST}
+ REGDB_E_LAST = DWORD($8004015F);
+ {$EXTERNALSYM REGDB_E_LAST}
+ REGDB_S_FIRST = DWORD($00040150);
+ {$EXTERNALSYM REGDB_S_FIRST}
+ REGDB_S_LAST = DWORD($0004015F);
+ {$EXTERNALSYM REGDB_S_LAST}
+//
+// MessageId: REGDB_E_READREGDB
+//
+// MessageText:
+//
+// Could not read key from registry
+//
+ REGDB_E_READREGDB = HRESULT($80040150);
+ {$EXTERNALSYM REGDB_E_READREGDB}
+
+//
+// MessageId: REGDB_E_WRITEREGDB
+//
+// MessageText:
+//
+// Could not write key to registry
+//
+ REGDB_E_WRITEREGDB = HRESULT($80040151);
+ {$EXTERNALSYM REGDB_E_WRITEREGDB}
+
+//
+// MessageId: REGDB_E_KEYMISSING
+//
+// MessageText:
+//
+// Could not find the key in the registry
+//
+ REGDB_E_KEYMISSING = HRESULT($80040152);
+ {$EXTERNALSYM REGDB_E_KEYMISSING}
+
+//
+// MessageId: REGDB_E_INVALIDVALUE
+//
+// MessageText:
+//
+// Invalid value for registry
+//
+ REGDB_E_INVALIDVALUE = HRESULT($80040153);
+ {$EXTERNALSYM REGDB_E_INVALIDVALUE}
+
+//
+// MessageId: REGDB_E_CLASSNOTREG
+//
+// MessageText:
+//
+// Class not registered
+//
+ REGDB_E_CLASSNOTREG = HRESULT($80040154);
+ {$EXTERNALSYM REGDB_E_CLASSNOTREG}
+
+//
+// MessageId: REGDB_E_IIDNOTREG
+//
+// MessageText:
+//
+// Interface not registered
+//
+ REGDB_E_IIDNOTREG = HRESULT($80040155);
+ {$EXTERNALSYM REGDB_E_IIDNOTREG}
+
+//
+// MessageId: REGDB_E_BADTHREADINGMODEL
+//
+// MessageText:
+//
+// Threading model entry is not valid
+//
+ REGDB_E_BADTHREADINGMODEL = HRESULT($80040156);
+ {$EXTERNALSYM REGDB_E_BADTHREADINGMODEL}
+
+ CAT_E_FIRST = DWORD($80040160);
+ {$EXTERNALSYM CAT_E_FIRST}
+ CAT_E_LAST = DWORD($80040161);
+ {$EXTERNALSYM CAT_E_LAST}
+//
+// MessageId: CAT_E_CATIDNOEXIST
+//
+// MessageText:
+//
+// CATID does not exist
+//
+ CAT_E_CATIDNOEXIST = HRESULT($80040160);
+ {$EXTERNALSYM CAT_E_CATIDNOEXIST}
+
+//
+// MessageId: CAT_E_NODESCRIPTION
+//
+// MessageText:
+//
+// Description not found
+//
+ CAT_E_NODESCRIPTION = HRESULT($80040161);
+ {$EXTERNALSYM CAT_E_NODESCRIPTION}
+
+////////////////////////////////////
+// //
+// Class Store Error Codes //
+// //
+////////////////////////////////////
+ CS_E_FIRST = DWORD($80040164);
+ {$EXTERNALSYM CS_E_FIRST}
+ CS_E_LAST = DWORD($8004016F);
+ {$EXTERNALSYM CS_E_LAST}
+//
+// MessageId: CS_E_PACKAGE_NOTFOUND
+//
+// MessageText:
+//
+// No package in the software installation data in the Active Directory meets this criteria.
+//
+ CS_E_PACKAGE_NOTFOUND = HRESULT($80040164);
+ {$EXTERNALSYM CS_E_PACKAGE_NOTFOUND}
+
+//
+// MessageId: CS_E_NOT_DELETABLE
+//
+// MessageText:
+//
+// Deleting this will break the referential integrity of the software installation data in the Active Directory.
+//
+ CS_E_NOT_DELETABLE = HRESULT($80040165);
+ {$EXTERNALSYM CS_E_NOT_DELETABLE}
+
+//
+// MessageId: CS_E_CLASS_NOTFOUND
+//
+// MessageText:
+//
+// The CLSID was not found in the software installation data in the Active Directory.
+//
+ CS_E_CLASS_NOTFOUND = HRESULT($80040166);
+ {$EXTERNALSYM CS_E_CLASS_NOTFOUND}
+
+//
+// MessageId: CS_E_INVALID_VERSION
+//
+// MessageText:
+//
+// The software installation data in the Active Directory is corrupt.
+//
+ CS_E_INVALID_VERSION = HRESULT($80040167);
+ {$EXTERNALSYM CS_E_INVALID_VERSION}
+
+//
+// MessageId: CS_E_NO_CLASSSTORE
+//
+// MessageText:
+//
+// There is no software installation data in the Active Directory.
+//
+ CS_E_NO_CLASSSTORE = HRESULT($80040168);
+ {$EXTERNALSYM CS_E_NO_CLASSSTORE}
+
+//
+// MessageId: CS_E_OBJECT_NOTFOUND
+//
+// MessageText:
+//
+// There is no software installation data object in the Active Directory.
+//
+ CS_E_OBJECT_NOTFOUND = HRESULT($80040169);
+ {$EXTERNALSYM CS_E_OBJECT_NOTFOUND}
+
+//
+// MessageId: CS_E_OBJECT_ALREADY_EXISTS
+//
+// MessageText:
+//
+// The software installation data object in the Active Directory already exists.
+//
+ CS_E_OBJECT_ALREADY_EXISTS = HRESULT($8004016A);
+ {$EXTERNALSYM CS_E_OBJECT_ALREADY_EXISTS}
+
+//
+// MessageId: CS_E_INVALID_PATH
+//
+// MessageText:
+//
+// The path to the software installation data in the Active Directory is not correct.
+//
+ CS_E_INVALID_PATH = HRESULT($8004016B);
+ {$EXTERNALSYM CS_E_INVALID_PATH}
+
+//
+// MessageId: CS_E_NETWORK_ERROR
+//
+// MessageText:
+//
+// A network error interrupted the operation.
+//
+ CS_E_NETWORK_ERROR = HRESULT($8004016C);
+ {$EXTERNALSYM CS_E_NETWORK_ERROR}
+
+//
+// MessageId: CS_E_ADMIN_LIMIT_EXCEEDED
+//
+// MessageText:
+//
+// The size of this object exceeds the maximum size set by the Administrator.
+//
+ CS_E_ADMIN_LIMIT_EXCEEDED = HRESULT($8004016D);
+ {$EXTERNALSYM CS_E_ADMIN_LIMIT_EXCEEDED}
+
+//
+// MessageId: CS_E_SCHEMA_MISMATCH
+//
+// MessageText:
+//
+// The schema for the software installation data in the Active Directory does not match the required schema.
+//
+ CS_E_SCHEMA_MISMATCH = HRESULT($8004016E);
+ {$EXTERNALSYM CS_E_SCHEMA_MISMATCH}
+
+//
+// MessageId: CS_E_INTERNAL_ERROR
+//
+// MessageText:
+//
+// An error occurred in the software installation data in the Active Directory.
+//
+ CS_E_INTERNAL_ERROR = HRESULT($8004016F);
+ {$EXTERNALSYM CS_E_INTERNAL_ERROR}
+
+ CACHE_E_FIRST = DWORD($80040170);
+ {$EXTERNALSYM CACHE_E_FIRST}
+ CACHE_E_LAST = DWORD($8004017F);
+ {$EXTERNALSYM CACHE_E_LAST}
+ CACHE_S_FIRST = DWORD($00040170);
+ {$EXTERNALSYM CACHE_S_FIRST}
+ CACHE_S_LAST = DWORD($0004017F);
+ {$EXTERNALSYM CACHE_S_LAST}
+//
+// MessageId: CACHE_E_NOCACHE_UPDATED
+//
+// MessageText:
+//
+// Cache not updated
+//
+ CACHE_E_NOCACHE_UPDATED = HRESULT($80040170);
+ {$EXTERNALSYM CACHE_E_NOCACHE_UPDATED}
+
+ OLEOBJ_E_FIRST = DWORD($80040180);
+ {$EXTERNALSYM OLEOBJ_E_FIRST}
+ OLEOBJ_E_LAST = DWORD($8004018F);
+ {$EXTERNALSYM OLEOBJ_E_LAST}
+ OLEOBJ_S_FIRST = DWORD($00040180);
+ {$EXTERNALSYM OLEOBJ_S_FIRST}
+ OLEOBJ_S_LAST = DWORD($0004018F);
+ {$EXTERNALSYM OLEOBJ_S_LAST}
+//
+// MessageId: OLEOBJ_E_NOVERBS
+//
+// MessageText:
+//
+// No verbs for OLE object
+//
+ OLEOBJ_E_NOVERBS = HRESULT($80040180);
+ {$EXTERNALSYM OLEOBJ_E_NOVERBS}
+
+//
+// MessageId: OLEOBJ_E_INVALIDVERB
+//
+// MessageText:
+//
+// Invalid verb for OLE object
+//
+ OLEOBJ_E_INVALIDVERB = HRESULT($80040181);
+ {$EXTERNALSYM OLEOBJ_E_INVALIDVERB}
+
+ CLIENTSITE_E_FIRST = DWORD($80040190);
+ {$EXTERNALSYM CLIENTSITE_E_FIRST}
+ CLIENTSITE_E_LAST = DWORD($8004019F);
+ {$EXTERNALSYM CLIENTSITE_E_LAST}
+ CLIENTSITE_S_FIRST = DWORD($00040190);
+ {$EXTERNALSYM CLIENTSITE_S_FIRST}
+ CLIENTSITE_S_LAST = DWORD($0004019F);
+ {$EXTERNALSYM CLIENTSITE_S_LAST}
+//
+// MessageId: INPLACE_E_NOTUNDOABLE
+//
+// MessageText:
+//
+// Undo is not available
+//
+ INPLACE_E_NOTUNDOABLE = HRESULT($800401A0);
+ {$EXTERNALSYM INPLACE_E_NOTUNDOABLE}
+
+//
+// MessageId: INPLACE_E_NOTOOLSPACE
+//
+// MessageText:
+//
+// Space for tools is not available
+//
+ INPLACE_E_NOTOOLSPACE = HRESULT($800401A1);
+ {$EXTERNALSYM INPLACE_E_NOTOOLSPACE}
+
+ INPLACE_E_FIRST = DWORD($800401A0);
+ {$EXTERNALSYM INPLACE_E_FIRST}
+ INPLACE_E_LAST = DWORD($800401AF);
+ {$EXTERNALSYM INPLACE_E_LAST}
+ INPLACE_S_FIRST = DWORD($000401A0);
+ {$EXTERNALSYM INPLACE_S_FIRST}
+ INPLACE_S_LAST = DWORD($000401AF);
+ {$EXTERNALSYM INPLACE_S_LAST}
+ ENUM_E_FIRST = DWORD($800401B0);
+ {$EXTERNALSYM ENUM_E_FIRST}
+ ENUM_E_LAST = DWORD($800401BF);
+ {$EXTERNALSYM ENUM_E_LAST}
+ ENUM_S_FIRST = DWORD($000401B0);
+ {$EXTERNALSYM ENUM_S_FIRST}
+ ENUM_S_LAST = DWORD($000401BF);
+ {$EXTERNALSYM ENUM_S_LAST}
+ CONVERT10_E_FIRST = DWORD($800401C0);
+ {$EXTERNALSYM CONVERT10_E_FIRST}
+ CONVERT10_E_LAST = DWORD($800401CF);
+ {$EXTERNALSYM CONVERT10_E_LAST}
+ CONVERT10_S_FIRST = DWORD($000401C0);
+ {$EXTERNALSYM CONVERT10_S_FIRST}
+ CONVERT10_S_LAST = DWORD($000401CF);
+ {$EXTERNALSYM CONVERT10_S_LAST}
+//
+// MessageId: CONVERT10_E_OLESTREAM_GET
+//
+// MessageText:
+//
+// OLESTREAM Get method failed
+//
+ CONVERT10_E_OLESTREAM_GET = HRESULT($800401C0);
+ {$EXTERNALSYM CONVERT10_E_OLESTREAM_GET}
+
+//
+// MessageId: CONVERT10_E_OLESTREAM_PUT
+//
+// MessageText:
+//
+// OLESTREAM Put method failed
+//
+ CONVERT10_E_OLESTREAM_PUT = HRESULT($800401C1);
+ {$EXTERNALSYM CONVERT10_E_OLESTREAM_PUT}
+
+//
+// MessageId: CONVERT10_E_OLESTREAM_FMT
+//
+// MessageText:
+//
+// Contents of the OLESTREAM not in correct format
+//
+ CONVERT10_E_OLESTREAM_FMT = HRESULT($800401C2);
+ {$EXTERNALSYM CONVERT10_E_OLESTREAM_FMT}
+
+//
+// MessageId: CONVERT10_E_OLESTREAM_BITMAP_TO_DIB
+//
+// MessageText:
+//
+// There was an error in a Windows GDI call while converting the bitmap to a DIB
+//
+ CONVERT10_E_OLESTREAM_BITMAP_TO_DIB = HRESULT($800401C3);
+ {$EXTERNALSYM CONVERT10_E_OLESTREAM_BITMAP_TO_DIB}
+
+//
+// MessageId: CONVERT10_E_STG_FMT
+//
+// MessageText:
+//
+// Contents of the IStorage not in correct format
+//
+ CONVERT10_E_STG_FMT = HRESULT($800401C4);
+ {$EXTERNALSYM CONVERT10_E_STG_FMT}
+
+//
+// MessageId: CONVERT10_E_STG_NO_STD_STREAM
+//
+// MessageText:
+//
+// Contents of IStorage is missing one of the standard streams
+//
+ CONVERT10_E_STG_NO_STD_STREAM = HRESULT($800401C5);
+ {$EXTERNALSYM CONVERT10_E_STG_NO_STD_STREAM}
+
+//
+// MessageId: CONVERT10_E_STG_DIB_TO_BITMAP
+//
+// MessageText:
+//
+// There was an error in a Windows GDI call while converting the DIB to a bitmap.
+//
+//
+ CONVERT10_E_STG_DIB_TO_BITMAP = HRESULT($800401C6);
+ {$EXTERNALSYM CONVERT10_E_STG_DIB_TO_BITMAP}
+
+ CLIPBRD_E_FIRST = DWORD($800401D0);
+ {$EXTERNALSYM CLIPBRD_E_FIRST}
+ CLIPBRD_E_LAST = DWORD($800401DF);
+ {$EXTERNALSYM CLIPBRD_E_LAST}
+ CLIPBRD_S_FIRST = DWORD($000401D0);
+ {$EXTERNALSYM CLIPBRD_S_FIRST}
+ CLIPBRD_S_LAST = DWORD($000401DF);
+ {$EXTERNALSYM CLIPBRD_S_LAST}
+//
+// MessageId: CLIPBRD_E_CANT_OPEN
+//
+// MessageText:
+//
+// OpenClipboard Failed
+//
+ CLIPBRD_E_CANT_OPEN = HRESULT($800401D0);
+ {$EXTERNALSYM CLIPBRD_E_CANT_OPEN}
+
+//
+// MessageId: CLIPBRD_E_CANT_EMPTY
+//
+// MessageText:
+//
+// EmptyClipboard Failed
+//
+ CLIPBRD_E_CANT_EMPTY = HRESULT($800401D1);
+ {$EXTERNALSYM CLIPBRD_E_CANT_EMPTY}
+
+//
+// MessageId: CLIPBRD_E_CANT_SET
+//
+// MessageText:
+//
+// SetClipboard Failed
+//
+ CLIPBRD_E_CANT_SET = HRESULT($800401D2);
+ {$EXTERNALSYM CLIPBRD_E_CANT_SET}
+
+//
+// MessageId: CLIPBRD_E_BAD_DATA
+//
+// MessageText:
+//
+// Data on clipboard is invalid
+//
+ CLIPBRD_E_BAD_DATA = HRESULT($800401D3);
+ {$EXTERNALSYM CLIPBRD_E_BAD_DATA}
+
+//
+// MessageId: CLIPBRD_E_CANT_CLOSE
+//
+// MessageText:
+//
+// CloseClipboard Failed
+//
+ CLIPBRD_E_CANT_CLOSE = HRESULT($800401D4);
+ {$EXTERNALSYM CLIPBRD_E_CANT_CLOSE}
+
+ MK_E_FIRST = DWORD($800401E0);
+ {$EXTERNALSYM MK_E_FIRST}
+ MK_E_LAST = DWORD($800401EF);
+ {$EXTERNALSYM MK_E_LAST}
+ MK_S_FIRST = DWORD($000401E0);
+ {$EXTERNALSYM MK_S_FIRST}
+ MK_S_LAST = DWORD($000401EF);
+ {$EXTERNALSYM MK_S_LAST}
+//
+// MessageId: MK_E_CONNECTMANUALLY
+//
+// MessageText:
+//
+// Moniker needs to be connected manually
+//
+ MK_E_CONNECTMANUALLY = HRESULT($800401E0);
+ {$EXTERNALSYM MK_E_CONNECTMANUALLY}
+
+//
+// MessageId: MK_E_EXCEEDEDDEADLINE
+//
+// MessageText:
+//
+// Operation exceeded deadline
+//
+ MK_E_EXCEEDEDDEADLINE = HRESULT($800401E1);
+ {$EXTERNALSYM MK_E_EXCEEDEDDEADLINE}
+
+//
+// MessageId: MK_E_NEEDGENERIC
+//
+// MessageText:
+//
+// Moniker needs to be generic
+//
+ MK_E_NEEDGENERIC = HRESULT($800401E2);
+ {$EXTERNALSYM MK_E_NEEDGENERIC}
+
+//
+// MessageId: MK_E_UNAVAILABLE
+//
+// MessageText:
+//
+// Operation unavailable
+//
+ MK_E_UNAVAILABLE = HRESULT($800401E3);
+ {$EXTERNALSYM MK_E_UNAVAILABLE}
+
+//
+// MessageId: MK_E_SYNTAX
+//
+// MessageText:
+//
+// Invalid syntax
+//
+ MK_E_SYNTAX = HRESULT($800401E4);
+ {$EXTERNALSYM MK_E_SYNTAX}
+
+//
+// MessageId: MK_E_NOOBJECT
+//
+// MessageText:
+//
+// No object for moniker
+//
+ MK_E_NOOBJECT = HRESULT($800401E5);
+ {$EXTERNALSYM MK_E_NOOBJECT}
+
+//
+// MessageId: MK_E_INVALIDEXTENSION
+//
+// MessageText:
+//
+// Bad extension for file
+//
+ MK_E_INVALIDEXTENSION = HRESULT($800401E6);
+ {$EXTERNALSYM MK_E_INVALIDEXTENSION}
+
+//
+// MessageId: MK_E_INTERMEDIATEINTERFACENOTSUPPORTED
+//
+// MessageText:
+//
+// Intermediate operation failed
+//
+ MK_E_INTERMEDIATEINTERFACENOTSUPPORTED = HRESULT($800401E7);
+ {$EXTERNALSYM MK_E_INTERMEDIATEINTERFACENOTSUPPORTED}
+
+//
+// MessageId: MK_E_NOTBINDABLE
+//
+// MessageText:
+//
+// Moniker is not bindable
+//
+ MK_E_NOTBINDABLE = HRESULT($800401E8);
+ {$EXTERNALSYM MK_E_NOTBINDABLE}
+
+//
+// MessageId: MK_E_NOTBOUND
+//
+// MessageText:
+//
+// Moniker is not bound
+//
+ MK_E_NOTBOUND = HRESULT($800401E9);
+ {$EXTERNALSYM MK_E_NOTBOUND}
+
+//
+// MessageId: MK_E_CANTOPENFILE
+//
+// MessageText:
+//
+// Moniker cannot open file
+//
+ MK_E_CANTOPENFILE = HRESULT($800401EA);
+ {$EXTERNALSYM MK_E_CANTOPENFILE}
+
+//
+// MessageId: MK_E_MUSTBOTHERUSER
+//
+// MessageText:
+//
+// User input required for operation to succeed
+//
+ MK_E_MUSTBOTHERUSER = HRESULT($800401EB);
+ {$EXTERNALSYM MK_E_MUSTBOTHERUSER}
+
+//
+// MessageId: MK_E_NOINVERSE
+//
+// MessageText:
+//
+// Moniker class has no inverse
+//
+ MK_E_NOINVERSE = HRESULT($800401EC);
+ {$EXTERNALSYM MK_E_NOINVERSE}
+
+//
+// MessageId: MK_E_NOSTORAGE
+//
+// MessageText:
+//
+// Moniker does not refer to storage
+//
+ MK_E_NOSTORAGE = HRESULT($800401ED);
+ {$EXTERNALSYM MK_E_NOSTORAGE}
+
+//
+// MessageId: MK_E_NOPREFIX
+//
+// MessageText:
+//
+// No common prefix
+//
+ MK_E_NOPREFIX = HRESULT($800401EE);
+ {$EXTERNALSYM MK_E_NOPREFIX}
+
+//
+// MessageId: MK_E_ENUMERATION_FAILED
+//
+// MessageText:
+//
+// Moniker could not be enumerated
+//
+ MK_E_ENUMERATION_FAILED = HRESULT($800401EF);
+ {$EXTERNALSYM MK_E_ENUMERATION_FAILED}
+
+ CO_E_FIRST = DWORD($800401F0);
+ {$EXTERNALSYM CO_E_FIRST}
+ CO_E_LAST = DWORD($800401FF);
+ {$EXTERNALSYM CO_E_LAST}
+ CO_S_FIRST = DWORD($000401F0);
+ {$EXTERNALSYM CO_S_FIRST}
+ CO_S_LAST = DWORD($000401FF);
+ {$EXTERNALSYM CO_S_LAST}
+//
+// MessageId: CO_E_NOTINITIALIZED
+//
+// MessageText:
+//
+// CoInitialize has not been called.
+//
+ CO_E_NOTINITIALIZED = HRESULT($800401F0);
+ {$EXTERNALSYM CO_E_NOTINITIALIZED}
+
+//
+// MessageId: CO_E_ALREADYINITIALIZED
+//
+// MessageText:
+//
+// CoInitialize has already been called.
+//
+ CO_E_ALREADYINITIALIZED = HRESULT($800401F1);
+ {$EXTERNALSYM CO_E_ALREADYINITIALIZED}
+
+//
+// MessageId: CO_E_CANTDETERMINECLASS
+//
+// MessageText:
+//
+// Class of object cannot be determined
+//
+ CO_E_CANTDETERMINECLASS = HRESULT($800401F2);
+ {$EXTERNALSYM CO_E_CANTDETERMINECLASS}
+
+//
+// MessageId: CO_E_CLASSSTRING
+//
+// MessageText:
+//
+// Invalid class string
+//
+ CO_E_CLASSSTRING = HRESULT($800401F3);
+ {$EXTERNALSYM CO_E_CLASSSTRING}
+
+//
+// MessageId: CO_E_IIDSTRING
+//
+// MessageText:
+//
+// Invalid interface string
+//
+ CO_E_IIDSTRING = HRESULT($800401F4);
+ {$EXTERNALSYM CO_E_IIDSTRING}
+
+//
+// MessageId: CO_E_APPNOTFOUND
+//
+// MessageText:
+//
+// Application not found
+//
+ CO_E_APPNOTFOUND = HRESULT($800401F5);
+ {$EXTERNALSYM CO_E_APPNOTFOUND}
+
+//
+// MessageId: CO_E_APPSINGLEUSE
+//
+// MessageText:
+//
+// Application cannot be run more than once
+//
+ CO_E_APPSINGLEUSE = HRESULT($800401F6);
+ {$EXTERNALSYM CO_E_APPSINGLEUSE}
+
+//
+// MessageId: CO_E_ERRORINAPP
+//
+// MessageText:
+//
+// Some error in application program
+//
+ CO_E_ERRORINAPP = HRESULT($800401F7);
+ {$EXTERNALSYM CO_E_ERRORINAPP}
+
+//
+// MessageId: CO_E_DLLNOTFOUND
+//
+// MessageText:
+//
+// DLL for class not found
+//
+ CO_E_DLLNOTFOUND = HRESULT($800401F8);
+ {$EXTERNALSYM CO_E_DLLNOTFOUND}
+
+//
+// MessageId: CO_E_ERRORINDLL
+//
+// MessageText:
+//
+// Error in the DLL
+//
+ CO_E_ERRORINDLL = HRESULT($800401F9);
+ {$EXTERNALSYM CO_E_ERRORINDLL}
+
+//
+// MessageId: CO_E_WRONGOSFORAPP
+//
+// MessageText:
+//
+// Wrong OS or OS version for application
+//
+ CO_E_WRONGOSFORAPP = HRESULT($800401FA);
+ {$EXTERNALSYM CO_E_WRONGOSFORAPP}
+
+//
+// MessageId: CO_E_OBJNOTREG
+//
+// MessageText:
+//
+// Object is not registered
+//
+ CO_E_OBJNOTREG = HRESULT($800401FB);
+ {$EXTERNALSYM CO_E_OBJNOTREG}
+
+//
+// MessageId: CO_E_OBJISREG
+//
+// MessageText:
+//
+// Object is already registered
+//
+ CO_E_OBJISREG = HRESULT($800401FC);
+ {$EXTERNALSYM CO_E_OBJISREG}
+
+//
+// MessageId: CO_E_OBJNOTCONNECTED
+//
+// MessageText:
+//
+// Object is not connected to server
+//
+ CO_E_OBJNOTCONNECTED = HRESULT($800401FD);
+ {$EXTERNALSYM CO_E_OBJNOTCONNECTED}
+
+//
+// MessageId: CO_E_APPDIDNTREG
+//
+// MessageText:
+//
+// Application was launched but it didn't register a class factory
+//
+ CO_E_APPDIDNTREG = HRESULT($800401FE);
+ {$EXTERNALSYM CO_E_APPDIDNTREG}
+
+//
+// MessageId: CO_E_RELEASED
+//
+// MessageText:
+//
+// Object has been released
+//
+ CO_E_RELEASED = HRESULT($800401FF);
+ {$EXTERNALSYM CO_E_RELEASED}
+
+ EVENT_E_FIRST = DWORD($80040200);
+ {$EXTERNALSYM EVENT_E_FIRST}
+ EVENT_E_LAST = DWORD($8004021F);
+ {$EXTERNALSYM EVENT_E_LAST}
+ EVENT_S_FIRST = DWORD($00040200);
+ {$EXTERNALSYM EVENT_S_FIRST}
+ EVENT_S_LAST = DWORD($0004021F);
+ {$EXTERNALSYM EVENT_S_LAST}
+//
+// MessageId: EVENT_S_SOME_SUBSCRIBERS_FAILED
+//
+// MessageText:
+//
+// An event was able to invoke some but not all of the subscribers
+//
+ EVENT_S_SOME_SUBSCRIBERS_FAILED = HRESULT($00040200);
+ {$EXTERNALSYM EVENT_S_SOME_SUBSCRIBERS_FAILED}
+
+//
+// MessageId: EVENT_E_ALL_SUBSCRIBERS_FAILED
+//
+// MessageText:
+//
+// An event was unable to invoke any of the subscribers
+//
+ EVENT_E_ALL_SUBSCRIBERS_FAILED = HRESULT($80040201);
+ {$EXTERNALSYM EVENT_E_ALL_SUBSCRIBERS_FAILED}
+
+//
+// MessageId: EVENT_S_NOSUBSCRIBERS
+//
+// MessageText:
+//
+// An event was delivered but there were no subscribers
+//
+ EVENT_S_NOSUBSCRIBERS = HRESULT($00040202);
+ {$EXTERNALSYM EVENT_S_NOSUBSCRIBERS}
+
+//
+// MessageId: EVENT_E_QUERYSYNTAX
+//
+// MessageText:
+//
+// A syntax error occurred trying to evaluate a query string
+//
+ EVENT_E_QUERYSYNTAX = HRESULT($80040203);
+ {$EXTERNALSYM EVENT_E_QUERYSYNTAX}
+
+//
+// MessageId: EVENT_E_QUERYFIELD
+//
+// MessageText:
+//
+// An invalid field name was used in a query string
+//
+ EVENT_E_QUERYFIELD = HRESULT($80040204);
+ {$EXTERNALSYM EVENT_E_QUERYFIELD}
+
+//
+// MessageId: EVENT_E_INTERNALEXCEPTION
+//
+// MessageText:
+//
+// An unexpected exception was raised
+//
+ EVENT_E_INTERNALEXCEPTION = HRESULT($80040205);
+ {$EXTERNALSYM EVENT_E_INTERNALEXCEPTION}
+
+//
+// MessageId: EVENT_E_INTERNALERROR
+//
+// MessageText:
+//
+// An unexpected internal error was detected
+//
+ EVENT_E_INTERNALERROR = HRESULT($80040206);
+ {$EXTERNALSYM EVENT_E_INTERNALERROR}
+
+//
+// MessageId: EVENT_E_INVALID_PER_USER_SID
+//
+// MessageText:
+//
+// The owner SID on a per-user subscription doesn't exist
+//
+ EVENT_E_INVALID_PER_USER_SID = HRESULT($80040207);
+ {$EXTERNALSYM EVENT_E_INVALID_PER_USER_SID}
+
+//
+// MessageId: EVENT_E_USER_EXCEPTION
+//
+// MessageText:
+//
+// A user-supplied component or subscriber raised an exception
+//
+ EVENT_E_USER_EXCEPTION = HRESULT($80040208);
+ {$EXTERNALSYM EVENT_E_USER_EXCEPTION}
+
+//
+// MessageId: EVENT_E_TOO_MANY_METHODS
+//
+// MessageText:
+//
+// An interface has too many methods to fire events from
+//
+ EVENT_E_TOO_MANY_METHODS = HRESULT($80040209);
+ {$EXTERNALSYM EVENT_E_TOO_MANY_METHODS}
+
+//
+// MessageId: EVENT_E_MISSING_EVENTCLASS
+//
+// MessageText:
+//
+// A subscription cannot be stored unless its event class already exists
+//
+ EVENT_E_MISSING_EVENTCLASS = HRESULT($8004020A);
+ {$EXTERNALSYM EVENT_E_MISSING_EVENTCLASS}
+
+//
+// MessageId: EVENT_E_NOT_ALL_REMOVED
+//
+// MessageText:
+//
+// Not all the objects requested could be removed
+//
+ EVENT_E_NOT_ALL_REMOVED = HRESULT($8004020B);
+ {$EXTERNALSYM EVENT_E_NOT_ALL_REMOVED}
+
+//
+// MessageId: EVENT_E_COMPLUS_NOT_INSTALLED
+//
+// MessageText:
+//
+// COM+ is required for this operation, but is not installed
+//
+ EVENT_E_COMPLUS_NOT_INSTALLED = HRESULT($8004020C);
+ {$EXTERNALSYM EVENT_E_COMPLUS_NOT_INSTALLED}
+
+//
+// MessageId: EVENT_E_CANT_MODIFY_OR_DELETE_UNCONFIGURED_OBJECT
+//
+// MessageText:
+//
+// Cannot modify or delete an object that was not added using the COM+ Admin SDK
+//
+ EVENT_E_CANT_MODIFY_OR_DELETE_UNCONFIGURED_OBJECT = HRESULT($8004020D);
+ {$EXTERNALSYM EVENT_E_CANT_MODIFY_OR_DELETE_UNCONFIGURED_OBJECT}
+
+//
+// MessageId: EVENT_E_CANT_MODIFY_OR_DELETE_CONFIGURED_OBJECT
+//
+// MessageText:
+//
+// Cannot modify or delete an object that was added using the COM+ Admin SDK
+//
+ EVENT_E_CANT_MODIFY_OR_DELETE_CONFIGURED_OBJECT = HRESULT($8004020E);
+ {$EXTERNALSYM EVENT_E_CANT_MODIFY_OR_DELETE_CONFIGURED_OBJECT}
+
+//
+// MessageId: EVENT_E_INVALID_EVENT_CLASS_PARTITION
+//
+// MessageText:
+//
+// The event class for this subscription is in an invalid partition
+//
+ EVENT_E_INVALID_EVENT_CLASS_PARTITION = HRESULT($8004020F);
+ {$EXTERNALSYM EVENT_E_INVALID_EVENT_CLASS_PARTITION}
+
+//
+// MessageId: EVENT_E_PER_USER_SID_NOT_LOGGED_ON
+//
+// MessageText:
+//
+// The owner of the PerUser subscription is not logged on to the system specified
+//
+ EVENT_E_PER_USER_SID_NOT_LOGGED_ON = HRESULT($80040210);
+ {$EXTERNALSYM EVENT_E_PER_USER_SID_NOT_LOGGED_ON}
+
+ XACT_E_FIRST = $8004D000;
+ {$EXTERNALSYM XACT_E_FIRST}
+ XACT_E_LAST = $8004D029;
+ {$EXTERNALSYM XACT_E_LAST}
+ XACT_S_FIRST = $0004D000;
+ {$EXTERNALSYM XACT_S_FIRST}
+ XACT_S_LAST = $0004D010;
+ {$EXTERNALSYM XACT_S_LAST}
+//
+// MessageId: XACT_E_ALREADYOTHERSINGLEPHASE
+//
+// MessageText:
+//
+// Another single phase resource manager has already been enlisted in this transaction.
+//
+ XACT_E_ALREADYOTHERSINGLEPHASE = HRESULT($8004D000);
+ {$EXTERNALSYM XACT_E_ALREADYOTHERSINGLEPHASE}
+
+//
+// MessageId: XACT_E_CANTRETAIN
+//
+// MessageText:
+//
+// A retaining commit or abort is not supported
+//
+ XACT_E_CANTRETAIN = HRESULT($8004D001);
+ {$EXTERNALSYM XACT_E_CANTRETAIN}
+
+//
+// MessageId: XACT_E_COMMITFAILED
+//
+// MessageText:
+//
+// The transaction failed to commit for an unknown reason. The transaction was aborted.
+//
+ XACT_E_COMMITFAILED = HRESULT($8004D002);
+ {$EXTERNALSYM XACT_E_COMMITFAILED}
+
+//
+// MessageId: XACT_E_COMMITPREVENTED
+//
+// MessageText:
+//
+// Cannot call commit on this transaction object because the calling application did not initiate the transaction.
+//
+ XACT_E_COMMITPREVENTED = HRESULT($8004D003);
+ {$EXTERNALSYM XACT_E_COMMITPREVENTED}
+
+//
+// MessageId: XACT_E_HEURISTICABORT
+//
+// MessageText:
+//
+// Instead of committing, the resource heuristically aborted.
+//
+ XACT_E_HEURISTICABORT = HRESULT($8004D004);
+ {$EXTERNALSYM XACT_E_HEURISTICABORT}
+
+//
+// MessageId: XACT_E_HEURISTICCOMMIT
+//
+// MessageText:
+//
+// Instead of aborting, the resource heuristically committed.
+//
+ XACT_E_HEURISTICCOMMIT = HRESULT($8004D005);
+ {$EXTERNALSYM XACT_E_HEURISTICCOMMIT}
+
+//
+// MessageId: XACT_E_HEURISTICDAMAGE
+//
+// MessageText:
+//
+// Some of the states of the resource were committed while others were aborted, likely because of heuristic decisions.
+//
+ XACT_E_HEURISTICDAMAGE = HRESULT($8004D006);
+ {$EXTERNALSYM XACT_E_HEURISTICDAMAGE}
+
+//
+// MessageId: XACT_E_HEURISTICDANGER
+//
+// MessageText:
+//
+// Some of the states of the resource may have been committed while others may have been aborted, likely because of heuristic decisions.
+//
+ XACT_E_HEURISTICDANGER = HRESULT($8004D007);
+ {$EXTERNALSYM XACT_E_HEURISTICDANGER}
+
+//
+// MessageId: XACT_E_ISOLATIONLEVEL
+//
+// MessageText:
+//
+// The requested isolation level is not valid or supported.
+//
+ XACT_E_ISOLATIONLEVEL = HRESULT($8004D008);
+ {$EXTERNALSYM XACT_E_ISOLATIONLEVEL}
+
+//
+// MessageId: XACT_E_NOASYNC
+//
+// MessageText:
+//
+// The transaction manager doesn't support an asynchronous operation for this method.
+//
+ XACT_E_NOASYNC = HRESULT($8004D009);
+ {$EXTERNALSYM XACT_E_NOASYNC}
+
+//
+// MessageId: XACT_E_NOENLIST
+//
+// MessageText:
+//
+// Unable to enlist in the transaction.
+//
+ XACT_E_NOENLIST = HRESULT($8004D00A);
+ {$EXTERNALSYM XACT_E_NOENLIST}
+
+//
+// MessageId: XACT_E_NOISORETAIN
+//
+// MessageText:
+//
+// The requested semantics of retention of isolation across retaining commit and abort boundaries cannot be supported by this transaction implementation, or isoFlags was not equal to zero.
+//
+ XACT_E_NOISORETAIN = HRESULT($8004D00B);
+ {$EXTERNALSYM XACT_E_NOISORETAIN}
+
+//
+// MessageId: XACT_E_NORESOURCE
+//
+// MessageText:
+//
+// There is no resource presently associated with this enlistment
+//
+ XACT_E_NORESOURCE = HRESULT($8004D00C);
+ {$EXTERNALSYM XACT_E_NORESOURCE}
+
+//
+// MessageId: XACT_E_NOTCURRENT
+//
+// MessageText:
+//
+// The transaction failed to commit due to the failure of optimistic concurrency control in at least one of the resource managers.
+//
+ XACT_E_NOTCURRENT = HRESULT($8004D00D);
+ {$EXTERNALSYM XACT_E_NOTCURRENT}
+
+//
+// MessageId: XACT_E_NOTRANSACTION
+//
+// MessageText:
+//
+// The transaction has already been implicitly or explicitly committed or aborted
+//
+ XACT_E_NOTRANSACTION = HRESULT($8004D00E);
+ {$EXTERNALSYM XACT_E_NOTRANSACTION}
+
+//
+// MessageId: XACT_E_NOTSUPPORTED
+//
+// MessageText:
+//
+// An invalid combination of flags was specified
+//
+ XACT_E_NOTSUPPORTED = HRESULT($8004D00F);
+ {$EXTERNALSYM XACT_E_NOTSUPPORTED}
+
+//
+// MessageId: XACT_E_UNKNOWNRMGRID
+//
+// MessageText:
+//
+// The resource manager id is not associated with this transaction or the transaction manager.
+//
+ XACT_E_UNKNOWNRMGRID = HRESULT($8004D010);
+ {$EXTERNALSYM XACT_E_UNKNOWNRMGRID}
+
+//
+// MessageId: XACT_E_WRONGSTATE
+//
+// MessageText:
+//
+// This method was called in the wrong state
+//
+ XACT_E_WRONGSTATE = HRESULT($8004D011);
+ {$EXTERNALSYM XACT_E_WRONGSTATE}
+
+//
+// MessageId: XACT_E_WRONGUOW
+//
+// MessageText:
+//
+// The indicated unit of work does not match the unit of work expected by the resource manager.
+//
+ XACT_E_WRONGUOW = HRESULT($8004D012);
+ {$EXTERNALSYM XACT_E_WRONGUOW}
+
+//
+// MessageId: XACT_E_XTIONEXISTS
+//
+// MessageText:
+//
+// An enlistment in a transaction already exists.
+//
+ XACT_E_XTIONEXISTS = HRESULT($8004D013);
+ {$EXTERNALSYM XACT_E_XTIONEXISTS}
+
+//
+// MessageId: XACT_E_NOIMPORTOBJECT
+//
+// MessageText:
+//
+// An import object for the transaction could not be found.
+//
+ XACT_E_NOIMPORTOBJECT = HRESULT($8004D014);
+ {$EXTERNALSYM XACT_E_NOIMPORTOBJECT}
+
+//
+// MessageId: XACT_E_INVALIDCOOKIE
+//
+// MessageText:
+//
+// The transaction cookie is invalid.
+//
+ XACT_E_INVALIDCOOKIE = HRESULT($8004D015);
+ {$EXTERNALSYM XACT_E_INVALIDCOOKIE}
+
+//
+// MessageId: XACT_E_INDOUBT
+//
+// MessageText:
+//
+// The transaction status is in doubt. A communication failure occurred, or a transaction manager or resource manager has failed
+//
+ XACT_E_INDOUBT = HRESULT($8004D016);
+ {$EXTERNALSYM XACT_E_INDOUBT}
+
+//
+// MessageId: XACT_E_NOTIMEOUT
+//
+// MessageText:
+//
+// A time-out was specified, but time-outs are not supported.
+//
+ XACT_E_NOTIMEOUT = HRESULT($8004D017);
+ {$EXTERNALSYM XACT_E_NOTIMEOUT}
+
+//
+// MessageId: XACT_E_ALREADYINPROGRESS
+//
+// MessageText:
+//
+// The requested operation is already in progress for the transaction.
+//
+ XACT_E_ALREADYINPROGRESS = HRESULT($8004D018);
+ {$EXTERNALSYM XACT_E_ALREADYINPROGRESS}
+
+//
+// MessageId: XACT_E_ABORTED
+//
+// MessageText:
+//
+// The transaction has already been aborted.
+//
+ XACT_E_ABORTED = HRESULT($8004D019);
+ {$EXTERNALSYM XACT_E_ABORTED}
+
+//
+// MessageId: XACT_E_LOGFULL
+//
+// MessageText:
+//
+// The Transaction Manager returned a log full error.
+//
+ XACT_E_LOGFULL = HRESULT($8004D01A);
+ {$EXTERNALSYM XACT_E_LOGFULL}
+
+//
+// MessageId: XACT_E_TMNOTAVAILABLE
+//
+// MessageText:
+//
+// The Transaction Manager is not available.
+//
+ XACT_E_TMNOTAVAILABLE = HRESULT($8004D01B);
+ {$EXTERNALSYM XACT_E_TMNOTAVAILABLE}
+
+//
+// MessageId: XACT_E_CONNECTION_DOWN
+//
+// MessageText:
+//
+// A connection with the transaction manager was lost.
+//
+ XACT_E_CONNECTION_DOWN = HRESULT($8004D01C);
+ {$EXTERNALSYM XACT_E_CONNECTION_DOWN}
+
+//
+// MessageId: XACT_E_CONNECTION_DENIED
+//
+// MessageText:
+//
+// A request to establish a connection with the transaction manager was denied.
+//
+ XACT_E_CONNECTION_DENIED = HRESULT($8004D01D);
+ {$EXTERNALSYM XACT_E_CONNECTION_DENIED}
+
+//
+// MessageId: XACT_E_REENLISTTIMEOUT
+//
+// MessageText:
+//
+// Resource manager reenlistment to determine transaction status timed out.
+//
+ XACT_E_REENLISTTIMEOUT = HRESULT($8004D01E);
+ {$EXTERNALSYM XACT_E_REENLISTTIMEOUT}
+
+//
+// MessageId: XACT_E_TIP_CONNECT_FAILED
+//
+// MessageText:
+//
+// This transaction manager failed to establish a connection with another TIP transaction manager.
+//
+ XACT_E_TIP_CONNECT_FAILED = HRESULT($8004D01F);
+ {$EXTERNALSYM XACT_E_TIP_CONNECT_FAILED}
+
+//
+// MessageId: XACT_E_TIP_PROTOCOL_ERROR
+//
+// MessageText:
+//
+// This transaction manager encountered a protocol error with another TIP transaction manager.
+//
+ XACT_E_TIP_PROTOCOL_ERROR = HRESULT($8004D020);
+ {$EXTERNALSYM XACT_E_TIP_PROTOCOL_ERROR}
+
+//
+// MessageId: XACT_E_TIP_PULL_FAILED
+//
+// MessageText:
+//
+// This transaction manager could not propagate a transaction from another TIP transaction manager.
+//
+ XACT_E_TIP_PULL_FAILED = HRESULT($8004D021);
+ {$EXTERNALSYM XACT_E_TIP_PULL_FAILED}
+
+//
+// MessageId: XACT_E_DEST_TMNOTAVAILABLE
+//
+// MessageText:
+//
+// The Transaction Manager on the destination machine is not available.
+//
+ XACT_E_DEST_TMNOTAVAILABLE = HRESULT($8004D022);
+ {$EXTERNALSYM XACT_E_DEST_TMNOTAVAILABLE}
+
+//
+// MessageId: XACT_E_TIP_DISABLED
+//
+// MessageText:
+//
+// The Transaction Manager has disabled its support for TIP.
+//
+ XACT_E_TIP_DISABLED = HRESULT($8004D023);
+ {$EXTERNALSYM XACT_E_TIP_DISABLED}
+
+//
+// MessageId: XACT_E_NETWORK_TX_DISABLED
+//
+// MessageText:
+//
+// The transaction manager has disabled its support for remote/network transactions.
+//
+ XACT_E_NETWORK_TX_DISABLED = HRESULT($8004D024);
+ {$EXTERNALSYM XACT_E_NETWORK_TX_DISABLED}
+
+//
+// MessageId: XACT_E_PARTNER_NETWORK_TX_DISABLED
+//
+// MessageText:
+//
+// The partner transaction manager has disabled its support for remote/network transactions.
+//
+ XACT_E_PARTNER_NETWORK_TX_DISABLED = HRESULT($8004D025);
+ {$EXTERNALSYM XACT_E_PARTNER_NETWORK_TX_DISABLED}
+
+//
+// MessageId: XACT_E_XA_TX_DISABLED
+//
+// MessageText:
+//
+// The transaction manager has disabled its support for XA transactions.
+//
+ XACT_E_XA_TX_DISABLED = HRESULT($8004D026);
+ {$EXTERNALSYM XACT_E_XA_TX_DISABLED}
+
+//
+// MessageId: XACT_E_UNABLE_TO_READ_DTC_CONFIG
+//
+// MessageText:
+//
+// MSDTC was unable to read its configuration information.
+//
+ XACT_E_UNABLE_TO_READ_DTC_CONFIG = HRESULT($8004D027);
+ {$EXTERNALSYM XACT_E_UNABLE_TO_READ_DTC_CONFIG}
+
+//
+// MessageId: XACT_E_UNABLE_TO_LOAD_DTC_PROXY
+//
+// MessageText:
+//
+// MSDTC was unable to load the dtc proxy dll.
+//
+ XACT_E_UNABLE_TO_LOAD_DTC_PROXY = HRESULT($8004D028);
+ {$EXTERNALSYM XACT_E_UNABLE_TO_LOAD_DTC_PROXY}
+
+//
+// MessageId: XACT_E_ABORTING
+//
+// MessageText:
+//
+// The local transaction has aborted.
+//
+ XACT_E_ABORTING = HRESULT($8004D029);
+ {$EXTERNALSYM XACT_E_ABORTING}
+
+//
+// TXF & CRM errors start 4d080.
+//
+// MessageId: XACT_E_CLERKNOTFOUND
+//
+// MessageText:
+//
+// XACT_E_CLERKNOTFOUND
+//
+ XACT_E_CLERKNOTFOUND = HRESULT($8004D080);
+ {$EXTERNALSYM XACT_E_CLERKNOTFOUND}
+
+//
+// MessageId: XACT_E_CLERKEXISTS
+//
+// MessageText:
+//
+// XACT_E_CLERKEXISTS
+//
+ XACT_E_CLERKEXISTS = HRESULT($8004D081);
+ {$EXTERNALSYM XACT_E_CLERKEXISTS}
+
+//
+// MessageId: XACT_E_RECOVERYINPROGRESS
+//
+// MessageText:
+//
+// XACT_E_RECOVERYINPROGRESS
+//
+ XACT_E_RECOVERYINPROGRESS = HRESULT($8004D082);
+ {$EXTERNALSYM XACT_E_RECOVERYINPROGRESS}
+
+//
+// MessageId: XACT_E_TRANSACTIONCLOSED
+//
+// MessageText:
+//
+// XACT_E_TRANSACTIONCLOSED
+//
+ XACT_E_TRANSACTIONCLOSED = HRESULT($8004D083);
+ {$EXTERNALSYM XACT_E_TRANSACTIONCLOSED}
+
+//
+// MessageId: XACT_E_INVALIDLSN
+//
+// MessageText:
+//
+// XACT_E_INVALIDLSN
+//
+ XACT_E_INVALIDLSN = HRESULT($8004D084);
+ {$EXTERNALSYM XACT_E_INVALIDLSN}
+
+//
+// MessageId: XACT_E_REPLAYREQUEST
+//
+// MessageText:
+//
+// XACT_E_REPLAYREQUEST
+//
+ XACT_E_REPLAYREQUEST = HRESULT($8004D085);
+ {$EXTERNALSYM XACT_E_REPLAYREQUEST}
+
+//
+// OleTx Success codes.
+//
+//
+// MessageId: XACT_S_ASYNC
+//
+// MessageText:
+//
+// An asynchronous operation was specified. The operation has begun, but its outcome is not known yet.
+//
+ XACT_S_ASYNC = HRESULT($0004D000);
+ {$EXTERNALSYM XACT_S_ASYNC}
+
+//
+// MessageId: XACT_S_DEFECT
+//
+// MessageText:
+//
+// XACT_S_DEFECT
+//
+ XACT_S_DEFECT = HRESULT($0004D001);
+ {$EXTERNALSYM XACT_S_DEFECT}
+
+//
+// MessageId: XACT_S_READONLY
+//
+// MessageText:
+//
+// The method call succeeded because the transaction was read-only.
+//
+ XACT_S_READONLY = HRESULT($0004D002);
+ {$EXTERNALSYM XACT_S_READONLY}
+
+//
+// MessageId: XACT_S_SOMENORETAIN
+//
+// MessageText:
+//
+// The transaction was successfully aborted. However, this is a coordinated transaction, and some number of enlisted resources were aborted outright because they could not support abort-retaining semantics
+//
+ XACT_S_SOMENORETAIN = HRESULT($0004D003);
+ {$EXTERNALSYM XACT_S_SOMENORETAIN}
+
+//
+// MessageId: XACT_S_OKINFORM
+//
+// MessageText:
+//
+// No changes were made during this call, but the sink wants another chance to look if any other sinks make further changes.
+//
+ XACT_S_OKINFORM = HRESULT($0004D004);
+ {$EXTERNALSYM XACT_S_OKINFORM}
+
+//
+// MessageId: XACT_S_MADECHANGESCONTENT
+//
+// MessageText:
+//
+// The sink is content and wishes the transaction to proceed. Changes were made to one or more resources during this call.
+//
+ XACT_S_MADECHANGESCONTENT = HRESULT($0004D005);
+ {$EXTERNALSYM XACT_S_MADECHANGESCONTENT}
+
+//
+// MessageId: XACT_S_MADECHANGESINFORM
+//
+// MessageText:
+//
+// The sink is for the moment and wishes the transaction to proceed, but if other changes are made following this return by other event sinks then this sink wants another chance to look
+//
+ XACT_S_MADECHANGESINFORM = HRESULT($0004D006);
+ {$EXTERNALSYM XACT_S_MADECHANGESINFORM}
+
+//
+// MessageId: XACT_S_ALLNORETAIN
+//
+// MessageText:
+//
+// The transaction was successfully aborted. However, the abort was non-retaining.
+//
+ XACT_S_ALLNORETAIN = HRESULT($0004D007);
+ {$EXTERNALSYM XACT_S_ALLNORETAIN}
+
+//
+// MessageId: XACT_S_ABORTING
+//
+// MessageText:
+//
+// An abort operation was already in progress.
+//
+ XACT_S_ABORTING = HRESULT($0004D008);
+ {$EXTERNALSYM XACT_S_ABORTING}
+
+//
+// MessageId: XACT_S_SINGLEPHASE
+//
+// MessageText:
+//
+// The resource manager has performed a single-phase commit of the transaction.
+//
+ XACT_S_SINGLEPHASE = HRESULT($0004D009);
+ {$EXTERNALSYM XACT_S_SINGLEPHASE}
+
+//
+// MessageId: XACT_S_LOCALLY_OK
+//
+// MessageText:
+//
+// The local transaction has not aborted.
+//
+ XACT_S_LOCALLY_OK = HRESULT($0004D00A);
+ {$EXTERNALSYM XACT_S_LOCALLY_OK}
+
+//
+// MessageId: XACT_S_LASTRESOURCEMANAGER
+//
+// MessageText:
+//
+// The resource manager has requested to be the coordinator (last resource manager) for the transaction.
+//
+ XACT_S_LASTRESOURCEMANAGER = HRESULT($0004D010);
+ {$EXTERNALSYM XACT_S_LASTRESOURCEMANAGER}
+
+ CONTEXT_E_FIRST = DWORD($8004E000);
+ {$EXTERNALSYM CONTEXT_E_FIRST}
+ CONTEXT_E_LAST = DWORD($8004E02F);
+ {$EXTERNALSYM CONTEXT_E_LAST}
+ CONTEXT_S_FIRST = DWORD($0004E000);
+ {$EXTERNALSYM CONTEXT_S_FIRST}
+ CONTEXT_S_LAST = DWORD($0004E02F);
+ {$EXTERNALSYM CONTEXT_S_LAST}
+//
+// MessageId: CONTEXT_E_ABORTED
+//
+// MessageText:
+//
+// The root transaction wanted to commit, but transaction aborted
+//
+ CONTEXT_E_ABORTED = HRESULT($8004E002);
+ {$EXTERNALSYM CONTEXT_E_ABORTED}
+
+//
+// MessageId: CONTEXT_E_ABORTING
+//
+// MessageText:
+//
+// You made a method call on a COM+ component that has a transaction that has already aborted or in the process of aborting.
+//
+ CONTEXT_E_ABORTING = HRESULT($8004E003);
+ {$EXTERNALSYM CONTEXT_E_ABORTING}
+
+//
+// MessageId: CONTEXT_E_NOCONTEXT
+//
+// MessageText:
+//
+// There is no MTS object context
+//
+ CONTEXT_E_NOCONTEXT = HRESULT($8004E004);
+ {$EXTERNALSYM CONTEXT_E_NOCONTEXT}
+
+//
+// MessageId: CONTEXT_E_WOULD_DEADLOCK
+//
+// MessageText:
+//
+// The component is configured to use synchronization and this method call would cause a deadlock to occur.
+//
+ CONTEXT_E_WOULD_DEADLOCK = HRESULT($8004E005);
+ {$EXTERNALSYM CONTEXT_E_WOULD_DEADLOCK}
+
+//
+// MessageId: CONTEXT_E_SYNCH_TIMEOUT
+//
+// MessageText:
+//
+// The component is configured to use synchronization and a thread has timed out waiting to enter the context.
+//
+ CONTEXT_E_SYNCH_TIMEOUT = HRESULT($8004E006);
+ {$EXTERNALSYM CONTEXT_E_SYNCH_TIMEOUT}
+
+//
+// MessageId: CONTEXT_E_OLDREF
+//
+// MessageText:
+//
+// You made a method call on a COM+ component that has a transaction that has already committed or aborted.
+//
+ CONTEXT_E_OLDREF = HRESULT($8004E007);
+ {$EXTERNALSYM CONTEXT_E_OLDREF}
+
+//
+// MessageId: CONTEXT_E_ROLENOTFOUND
+//
+// MessageText:
+//
+// The specified role was not configured for the application
+//
+ CONTEXT_E_ROLENOTFOUND = HRESULT($8004E00C);
+ {$EXTERNALSYM CONTEXT_E_ROLENOTFOUND}
+
+//
+// MessageId: CONTEXT_E_TMNOTAVAILABLE
+//
+// MessageText:
+//
+// COM+ was unable to talk to the Microsoft Distributed Transaction Coordinator
+//
+ CONTEXT_E_TMNOTAVAILABLE = HRESULT($8004E00F);
+ {$EXTERNALSYM CONTEXT_E_TMNOTAVAILABLE}
+
+//
+// MessageId: CO_E_ACTIVATIONFAILED
+//
+// MessageText:
+//
+// An unexpected error occurred during COM+ Activation.
+//
+ CO_E_ACTIVATIONFAILED = HRESULT($8004E021);
+ {$EXTERNALSYM CO_E_ACTIVATIONFAILED}
+
+//
+// MessageId: CO_E_ACTIVATIONFAILED_EVENTLOGGED
+//
+// MessageText:
+//
+// COM+ Activation failed. Check the event log for more information
+//
+ CO_E_ACTIVATIONFAILED_EVENTLOGGED = HRESULT($8004E022);
+ {$EXTERNALSYM CO_E_ACTIVATIONFAILED_EVENTLOGGED}
+
+//
+// MessageId: CO_E_ACTIVATIONFAILED_CATALOGERROR
+//
+// MessageText:
+//
+// COM+ Activation failed due to a catalog or configuration error.
+//
+ CO_E_ACTIVATIONFAILED_CATALOGERROR = HRESULT($8004E023);
+ {$EXTERNALSYM CO_E_ACTIVATIONFAILED_CATALOGERROR}
+
+//
+// MessageId: CO_E_ACTIVATIONFAILED_TIMEOUT
+//
+// MessageText:
+//
+// COM+ activation failed because the activation could not be completed in the specified amount of time.
+//
+ CO_E_ACTIVATIONFAILED_TIMEOUT = HRESULT($8004E024);
+ {$EXTERNALSYM CO_E_ACTIVATIONFAILED_TIMEOUT}
+
+//
+// MessageId: CO_E_INITIALIZATIONFAILED
+//
+// MessageText:
+//
+// COM+ Activation failed because an initialization function failed. Check the event log for more information.
+//
+ CO_E_INITIALIZATIONFAILED = HRESULT($8004E025);
+ {$EXTERNALSYM CO_E_INITIALIZATIONFAILED}
+
+//
+// MessageId: CONTEXT_E_NOJIT
+//
+// MessageText:
+//
+// The requested operation requires that JIT be in the current context and it is not
+//
+ CONTEXT_E_NOJIT = HRESULT($8004E026);
+ {$EXTERNALSYM CONTEXT_E_NOJIT}
+
+//
+// MessageId: CONTEXT_E_NOTRANSACTION
+//
+// MessageText:
+//
+// The requested operation requires that the current context have a Transaction, and it does not
+//
+ CONTEXT_E_NOTRANSACTION = HRESULT($8004E027);
+ {$EXTERNALSYM CONTEXT_E_NOTRANSACTION}
+
+//
+// MessageId: CO_E_THREADINGMODEL_CHANGED
+//
+// MessageText:
+//
+// The components threading model has changed after install into a COM+ Application. Please re-install component.
+//
+ CO_E_THREADINGMODEL_CHANGED = HRESULT($8004E028);
+ {$EXTERNALSYM CO_E_THREADINGMODEL_CHANGED}
+
+//
+// MessageId: CO_E_NOIISINTRINSICS
+//
+// MessageText:
+//
+// IIS intrinsics not available. Start your work with IIS.
+//
+ CO_E_NOIISINTRINSICS = HRESULT($8004E029);
+ {$EXTERNALSYM CO_E_NOIISINTRINSICS}
+
+//
+// MessageId: CO_E_NOCOOKIES
+//
+// MessageText:
+//
+// An attempt to write a cookie failed.
+//
+ CO_E_NOCOOKIES = HRESULT($8004E02A);
+ {$EXTERNALSYM CO_E_NOCOOKIES}
+
+//
+// MessageId: CO_E_DBERROR
+//
+// MessageText:
+//
+// An attempt to use a database generated a database specific error.
+//
+ CO_E_DBERROR = HRESULT($8004E02B);
+ {$EXTERNALSYM CO_E_DBERROR}
+
+//
+// MessageId: CO_E_NOTPOOLED
+//
+// MessageText:
+//
+// The COM+ component you created must use object pooling to work.
+//
+ CO_E_NOTPOOLED = HRESULT($8004E02C);
+ {$EXTERNALSYM CO_E_NOTPOOLED}
+
+//
+// MessageId: CO_E_NOTCONSTRUCTED
+//
+// MessageText:
+//
+// The COM+ component you created must use object construction to work correctly.
+//
+ CO_E_NOTCONSTRUCTED = HRESULT($8004E02D);
+ {$EXTERNALSYM CO_E_NOTCONSTRUCTED}
+
+//
+// MessageId: CO_E_NOSYNCHRONIZATION
+//
+// MessageText:
+//
+// The COM+ component requires synchronization, and it is not configured for it.
+//
+ CO_E_NOSYNCHRONIZATION = HRESULT($8004E02E);
+ {$EXTERNALSYM CO_E_NOSYNCHRONIZATION}
+
+//
+// MessageId: CO_E_ISOLEVELMISMATCH
+//
+// MessageText:
+//
+// The TxIsolation Level property for the COM+ component being created is stronger than the TxIsolationLevel for the "root" component for the transaction. The creation failed.
+//
+ CO_E_ISOLEVELMISMATCH = HRESULT($8004E02F);
+ {$EXTERNALSYM CO_E_ISOLEVELMISMATCH}
+
+//
+// Old OLE Success Codes
+//
+//
+// MessageId: OLE_S_USEREG
+//
+// MessageText:
+//
+// Use the registry database to provide the requested information
+//
+ OLE_S_USEREG = HRESULT($00040000);
+ {$EXTERNALSYM OLE_S_USEREG}
+
+//
+// MessageId: OLE_S_STATIC
+//
+// MessageText:
+//
+// Success, but static
+//
+ OLE_S_STATIC = HRESULT($00040001);
+ {$EXTERNALSYM OLE_S_STATIC}
+
+//
+// MessageId: OLE_S_MAC_CLIPFORMAT
+//
+// MessageText:
+//
+// Macintosh clipboard format
+//
+ OLE_S_MAC_CLIPFORMAT = HRESULT($00040002);
+ {$EXTERNALSYM OLE_S_MAC_CLIPFORMAT}
+
+//
+// MessageId: DRAGDROP_S_DROP
+//
+// MessageText:
+//
+// Successful drop took place
+//
+ DRAGDROP_S_DROP = HRESULT($00040100);
+ {$EXTERNALSYM DRAGDROP_S_DROP}
+
+//
+// MessageId: DRAGDROP_S_CANCEL
+//
+// MessageText:
+//
+// Drag-drop operation canceled
+//
+ DRAGDROP_S_CANCEL = HRESULT($00040101);
+ {$EXTERNALSYM DRAGDROP_S_CANCEL}
+
+//
+// MessageId: DRAGDROP_S_USEDEFAULTCURSORS
+//
+// MessageText:
+//
+// Use the default cursor
+//
+ DRAGDROP_S_USEDEFAULTCURSORS = HRESULT($00040102);
+ {$EXTERNALSYM DRAGDROP_S_USEDEFAULTCURSORS}
+
+//
+// MessageId: DATA_S_SAMEFORMATETC
+//
+// MessageText:
+//
+// Data has same FORMATETC
+//
+ DATA_S_SAMEFORMATETC = HRESULT($00040130);
+ {$EXTERNALSYM DATA_S_SAMEFORMATETC}
+
+//
+// MessageId: VIEW_S_ALREADY_FROZEN
+//
+// MessageText:
+//
+// View is already frozen
+//
+ VIEW_S_ALREADY_FROZEN = HRESULT($00040140);
+ {$EXTERNALSYM VIEW_S_ALREADY_FROZEN}
+
+//
+// MessageId: CACHE_S_FORMATETC_NOTSUPPORTED
+//
+// MessageText:
+//
+// FORMATETC not supported
+//
+ CACHE_S_FORMATETC_NOTSUPPORTED = HRESULT($00040170);
+ {$EXTERNALSYM CACHE_S_FORMATETC_NOTSUPPORTED}
+
+//
+// MessageId: CACHE_S_SAMECACHE
+//
+// MessageText:
+//
+// Same cache
+//
+ CACHE_S_SAMECACHE = HRESULT($00040171);
+ {$EXTERNALSYM CACHE_S_SAMECACHE}
+
+//
+// MessageId: CACHE_S_SOMECACHES_NOTUPDATED
+//
+// MessageText:
+//
+// Some cache(s) not updated
+//
+ CACHE_S_SOMECACHES_NOTUPDATED = HRESULT($00040172);
+ {$EXTERNALSYM CACHE_S_SOMECACHES_NOTUPDATED}
+
+//
+// MessageId: OLEOBJ_S_INVALIDVERB
+//
+// MessageText:
+//
+// Invalid verb for OLE object
+//
+ OLEOBJ_S_INVALIDVERB = HRESULT($00040180);
+ {$EXTERNALSYM OLEOBJ_S_INVALIDVERB}
+
+//
+// MessageId: OLEOBJ_S_CANNOT_DOVERB_NOW
+//
+// MessageText:
+//
+// Verb number is valid but verb cannot be done now
+//
+ OLEOBJ_S_CANNOT_DOVERB_NOW = HRESULT($00040181);
+ {$EXTERNALSYM OLEOBJ_S_CANNOT_DOVERB_NOW}
+
+//
+// MessageId: OLEOBJ_S_INVALIDHWND
+//
+// MessageText:
+//
+// Invalid window handle passed
+//
+ OLEOBJ_S_INVALIDHWND = HRESULT($00040182);
+ {$EXTERNALSYM OLEOBJ_S_INVALIDHWND}
+
+//
+// MessageId: INPLACE_S_TRUNCATED
+//
+// MessageText:
+//
+// Message is too long; some of it had to be truncated before displaying
+//
+ INPLACE_S_TRUNCATED = HRESULT($000401A0);
+ {$EXTERNALSYM INPLACE_S_TRUNCATED}
+
+//
+// MessageId: CONVERT10_S_NO_PRESENTATION
+//
+// MessageText:
+//
+// Unable to convert OLESTREAM to IStorage
+//
+ CONVERT10_S_NO_PRESENTATION = HRESULT($000401C0);
+ {$EXTERNALSYM CONVERT10_S_NO_PRESENTATION}
+
+//
+// MessageId: MK_S_REDUCED_TO_SELF
+//
+// MessageText:
+//
+// Moniker reduced to itself
+//
+ MK_S_REDUCED_TO_SELF = HRESULT($000401E2);
+ {$EXTERNALSYM MK_S_REDUCED_TO_SELF}
+
+//
+// MessageId: MK_S_ME
+//
+// MessageText:
+//
+// Common prefix is this moniker
+//
+ MK_S_ME = HRESULT($000401E4);
+ {$EXTERNALSYM MK_S_ME}
+
+//
+// MessageId: MK_S_HIM
+//
+// MessageText:
+//
+// Common prefix is input moniker
+//
+ MK_S_HIM = HRESULT($000401E5);
+ {$EXTERNALSYM MK_S_HIM}
+
+//
+// MessageId: MK_S_US
+//
+// MessageText:
+//
+// Common prefix is both monikers
+//
+ MK_S_US = HRESULT($000401E6);
+ {$EXTERNALSYM MK_S_US}
+
+//
+// MessageId: MK_S_MONIKERALREADYREGISTERED
+//
+// MessageText:
+//
+// Moniker is already registered in running object table
+//
+ MK_S_MONIKERALREADYREGISTERED = HRESULT($000401E7);
+ {$EXTERNALSYM MK_S_MONIKERALREADYREGISTERED}
+
+//
+// Task Scheduler errors
+//
+//
+// MessageId: SCHED_S_TASK_READY
+//
+// MessageText:
+//
+// The task is ready to run at its next scheduled time.
+//
+ SCHED_S_TASK_READY = HRESULT($00041300);
+ {$EXTERNALSYM SCHED_S_TASK_READY}
+
+//
+// MessageId: SCHED_S_TASK_RUNNING
+//
+// MessageText:
+//
+// The task is currently running.
+//
+ SCHED_S_TASK_RUNNING = HRESULT($00041301);
+ {$EXTERNALSYM SCHED_S_TASK_RUNNING}
+
+//
+// MessageId: SCHED_S_TASK_DISABLED
+//
+// MessageText:
+//
+// The task will not run at the scheduled times because it has been disabled.
+//
+ SCHED_S_TASK_DISABLED = HRESULT($00041302);
+ {$EXTERNALSYM SCHED_S_TASK_DISABLED}
+
+//
+// MessageId: SCHED_S_TASK_HAS_NOT_RUN
+//
+// MessageText:
+//
+// The task has not yet run.
+//
+ SCHED_S_TASK_HAS_NOT_RUN = HRESULT($00041303);
+ {$EXTERNALSYM SCHED_S_TASK_HAS_NOT_RUN}
+
+//
+// MessageId: SCHED_S_TASK_NO_MORE_RUNS
+//
+// MessageText:
+//
+// There are no more runs scheduled for this task.
+//
+ SCHED_S_TASK_NO_MORE_RUNS = HRESULT($00041304);
+ {$EXTERNALSYM SCHED_S_TASK_NO_MORE_RUNS}
+
+//
+// MessageId: SCHED_S_TASK_NOT_SCHEDULED
+//
+// MessageText:
+//
+// One or more of the properties that are needed to run this task on a schedule have not been set.
+//
+ SCHED_S_TASK_NOT_SCHEDULED = HRESULT($00041305);
+ {$EXTERNALSYM SCHED_S_TASK_NOT_SCHEDULED}
+
+//
+// MessageId: SCHED_S_TASK_TERMINATED
+//
+// MessageText:
+//
+// The last run of the task was terminated by the user.
+//
+ SCHED_S_TASK_TERMINATED = HRESULT($00041306);
+ {$EXTERNALSYM SCHED_S_TASK_TERMINATED}
+
+//
+// MessageId: SCHED_S_TASK_NO_VALID_TRIGGERS
+//
+// MessageText:
+//
+// Either the task has no triggers or the existing triggers are disabled or not set.
+//
+ SCHED_S_TASK_NO_VALID_TRIGGERS = HRESULT($00041307);
+ {$EXTERNALSYM SCHED_S_TASK_NO_VALID_TRIGGERS}
+
+//
+// MessageId: SCHED_S_EVENT_TRIGGER
+//
+// MessageText:
+//
+// Event triggers don't have set run times.
+//
+ SCHED_S_EVENT_TRIGGER = HRESULT($00041308);
+ {$EXTERNALSYM SCHED_S_EVENT_TRIGGER}
+
+//
+// MessageId: SCHED_E_TRIGGER_NOT_FOUND
+//
+// MessageText:
+//
+// Trigger not found.
+//
+ SCHED_E_TRIGGER_NOT_FOUND = HRESULT($80041309);
+ {$EXTERNALSYM SCHED_E_TRIGGER_NOT_FOUND}
+
+//
+// MessageId: SCHED_E_TASK_NOT_READY
+//
+// MessageText:
+//
+// One or more of the properties that are needed to run this task have not been set.
+//
+ SCHED_E_TASK_NOT_READY = HRESULT($8004130A);
+ {$EXTERNALSYM SCHED_E_TASK_NOT_READY}
+
+//
+// MessageId: SCHED_E_TASK_NOT_RUNNING
+//
+// MessageText:
+//
+// There is no running instance of the task to terminate.
+//
+ SCHED_E_TASK_NOT_RUNNING = HRESULT($8004130B);
+ {$EXTERNALSYM SCHED_E_TASK_NOT_RUNNING}
+
+//
+// MessageId: SCHED_E_SERVICE_NOT_INSTALLED
+//
+// MessageText:
+//
+// The Task Scheduler Service is not installed on this computer.
+//
+ SCHED_E_SERVICE_NOT_INSTALLED = HRESULT($8004130C);
+ {$EXTERNALSYM SCHED_E_SERVICE_NOT_INSTALLED}
+
+//
+// MessageId: SCHED_E_CANNOT_OPEN_TASK
+//
+// MessageText:
+//
+// The task object could not be opened.
+//
+ SCHED_E_CANNOT_OPEN_TASK = HRESULT($8004130D);
+ {$EXTERNALSYM SCHED_E_CANNOT_OPEN_TASK}
+
+//
+// MessageId: SCHED_E_INVALID_TASK
+//
+// MessageText:
+//
+// The object is either an invalid task object or is not a task object.
+//
+ SCHED_E_INVALID_TASK = HRESULT($8004130E);
+ {$EXTERNALSYM SCHED_E_INVALID_TASK}
+
+//
+// MessageId: SCHED_E_ACCOUNT_INFORMATION_NOT_SET
+//
+// MessageText:
+//
+// No account information could be found in the Task Scheduler security database for the task indicated.
+//
+ SCHED_E_ACCOUNT_INFORMATION_NOT_SET = HRESULT($8004130F);
+ {$EXTERNALSYM SCHED_E_ACCOUNT_INFORMATION_NOT_SET}
+
+//
+// MessageId: SCHED_E_ACCOUNT_NAME_NOT_FOUND
+//
+// MessageText:
+//
+// Unable to establish existence of the account specified.
+//
+ SCHED_E_ACCOUNT_NAME_NOT_FOUND = HRESULT($80041310);
+ {$EXTERNALSYM SCHED_E_ACCOUNT_NAME_NOT_FOUND}
+
+//
+// MessageId: SCHED_E_ACCOUNT_DBASE_CORRUPT
+//
+// MessageText:
+//
+// Corruption was detected in the Task Scheduler security database; the database has been reset.
+//
+ SCHED_E_ACCOUNT_DBASE_CORRUPT = HRESULT($80041311);
+ {$EXTERNALSYM SCHED_E_ACCOUNT_DBASE_CORRUPT}
+
+//
+// MessageId: SCHED_E_NO_SECURITY_SERVICES
+//
+// MessageText:
+//
+// Task Scheduler security services are available only on Windows NT.
+//
+ SCHED_E_NO_SECURITY_SERVICES = HRESULT($80041312);
+ {$EXTERNALSYM SCHED_E_NO_SECURITY_SERVICES}
+
+//
+// MessageId: SCHED_E_UNKNOWN_OBJECT_VERSION
+//
+// MessageText:
+//
+// The task object version is either unsupported or invalid.
+//
+ SCHED_E_UNKNOWN_OBJECT_VERSION = HRESULT($80041313);
+ {$EXTERNALSYM SCHED_E_UNKNOWN_OBJECT_VERSION}
+
+//
+// MessageId: SCHED_E_UNSUPPORTED_ACCOUNT_OPTION
+//
+// MessageText:
+//
+// The task has been configured with an unsupported combination of account settings and run time options.
+//
+ SCHED_E_UNSUPPORTED_ACCOUNT_OPTION = HRESULT($80041314);
+ {$EXTERNALSYM SCHED_E_UNSUPPORTED_ACCOUNT_OPTION}
+
+//
+// MessageId: SCHED_E_SERVICE_NOT_RUNNING
+//
+// MessageText:
+//
+// The Task Scheduler Service is not running.
+//
+ SCHED_E_SERVICE_NOT_RUNNING = HRESULT($80041315);
+ {$EXTERNALSYM SCHED_E_SERVICE_NOT_RUNNING}
+
+// ******************
+// FACILITY_WINDOWS
+// ******************
+//
+// Codes 0x0-0x01ff are reserved for the OLE group of
+// interfaces.
+//
+//
+// MessageId: CO_E_CLASS_CREATE_FAILED
+//
+// MessageText:
+//
+// Attempt to create a class object failed
+//
+ CO_E_CLASS_CREATE_FAILED = HRESULT($80080001);
+ {$EXTERNALSYM CO_E_CLASS_CREATE_FAILED}
+
+//
+// MessageId: CO_E_SCM_ERROR
+//
+// MessageText:
+//
+// OLE service could not bind object
+//
+ CO_E_SCM_ERROR = HRESULT($80080002);
+ {$EXTERNALSYM CO_E_SCM_ERROR}
+
+//
+// MessageId: CO_E_SCM_RPC_FAILURE
+//
+// MessageText:
+//
+// RPC communication failed with OLE service
+//
+ CO_E_SCM_RPC_FAILURE = HRESULT($80080003);
+ {$EXTERNALSYM CO_E_SCM_RPC_FAILURE}
+
+//
+// MessageId: CO_E_BAD_PATH
+//
+// MessageText:
+//
+// Bad path to object
+//
+ CO_E_BAD_PATH = HRESULT($80080004);
+ {$EXTERNALSYM CO_E_BAD_PATH}
+
+//
+// MessageId: CO_E_SERVER_EXEC_FAILURE
+//
+// MessageText:
+//
+// Server execution failed
+//
+ CO_E_SERVER_EXEC_FAILURE = HRESULT($80080005);
+ {$EXTERNALSYM CO_E_SERVER_EXEC_FAILURE}
+
+//
+// MessageId: CO_E_OBJSRV_RPC_FAILURE
+//
+// MessageText:
+//
+// OLE service could not communicate with the object server
+//
+ CO_E_OBJSRV_RPC_FAILURE = HRESULT($80080006);
+ {$EXTERNALSYM CO_E_OBJSRV_RPC_FAILURE}
+
+//
+// MessageId: MK_E_NO_NORMALIZED
+//
+// MessageText:
+//
+// Moniker path could not be normalized
+//
+ MK_E_NO_NORMALIZED = HRESULT($80080007);
+ {$EXTERNALSYM MK_E_NO_NORMALIZED}
+
+//
+// MessageId: CO_E_SERVER_STOPPING
+//
+// MessageText:
+//
+// Object server is stopping when OLE service contacts it
+//
+ CO_E_SERVER_STOPPING = HRESULT($80080008);
+ {$EXTERNALSYM CO_E_SERVER_STOPPING}
+
+//
+// MessageId: MEM_E_INVALID_ROOT
+//
+// MessageText:
+//
+// An invalid root block pointer was specified
+//
+ MEM_E_INVALID_ROOT = HRESULT($80080009);
+ {$EXTERNALSYM MEM_E_INVALID_ROOT}
+
+//
+// MessageId: MEM_E_INVALID_LINK
+//
+// MessageText:
+//
+// An allocation chain contained an invalid link pointer
+//
+ MEM_E_INVALID_LINK = HRESULT($80080010);
+ {$EXTERNALSYM MEM_E_INVALID_LINK}
+
+//
+// MessageId: MEM_E_INVALID_SIZE
+//
+// MessageText:
+//
+// The requested allocation size was too large
+//
+ MEM_E_INVALID_SIZE = HRESULT($80080011);
+ {$EXTERNALSYM MEM_E_INVALID_SIZE}
+
+//
+// MessageId: CO_S_NOTALLINTERFACES
+//
+// MessageText:
+//
+// Not all the requested interfaces were available
+//
+ CO_S_NOTALLINTERFACES = HRESULT($00080012);
+ {$EXTERNALSYM CO_S_NOTALLINTERFACES}
+
+//
+// MessageId: CO_S_MACHINENAMENOTFOUND
+//
+// MessageText:
+//
+// The specified machine name was not found in the cache.
+//
+ CO_S_MACHINENAMENOTFOUND = HRESULT($00080013);
+ {$EXTERNALSYM CO_S_MACHINENAMENOTFOUND}
+
+// ******************
+// FACILITY_DISPATCH
+// ******************
+//
+// MessageId: DISP_E_UNKNOWNINTERFACE
+//
+// MessageText:
+//
+// Unknown interface.
+//
+ DISP_E_UNKNOWNINTERFACE = HRESULT($80020001);
+ {$EXTERNALSYM DISP_E_UNKNOWNINTERFACE}
+
+//
+// MessageId: DISP_E_MEMBERNOTFOUND
+//
+// MessageText:
+//
+// Member not found.
+//
+ DISP_E_MEMBERNOTFOUND = HRESULT($80020003);
+ {$EXTERNALSYM DISP_E_MEMBERNOTFOUND}
+
+//
+// MessageId: DISP_E_PARAMNOTFOUND
+//
+// MessageText:
+//
+// Parameter not found.
+//
+ DISP_E_PARAMNOTFOUND = HRESULT($80020004);
+ {$EXTERNALSYM DISP_E_PARAMNOTFOUND}
+
+//
+// MessageId: DISP_E_TYPEMISMATCH
+//
+// MessageText:
+//
+// Type mismatch.
+//
+ DISP_E_TYPEMISMATCH = HRESULT($80020005);
+ {$EXTERNALSYM DISP_E_TYPEMISMATCH}
+
+//
+// MessageId: DISP_E_UNKNOWNNAME
+//
+// MessageText:
+//
+// Unknown name.
+//
+ DISP_E_UNKNOWNNAME = HRESULT($80020006);
+ {$EXTERNALSYM DISP_E_UNKNOWNNAME}
+
+//
+// MessageId: DISP_E_NONAMEDARGS
+//
+// MessageText:
+//
+// No named arguments.
+//
+ DISP_E_NONAMEDARGS = HRESULT($80020007);
+ {$EXTERNALSYM DISP_E_NONAMEDARGS}
+
+//
+// MessageId: DISP_E_BADVARTYPE
+//
+// MessageText:
+//
+// Bad variable type.
+//
+ DISP_E_BADVARTYPE = HRESULT($80020008);
+ {$EXTERNALSYM DISP_E_BADVARTYPE}
+
+//
+// MessageId: DISP_E_EXCEPTION
+//
+// MessageText:
+//
+// Exception occurred.
+//
+ DISP_E_EXCEPTION = HRESULT($80020009);
+ {$EXTERNALSYM DISP_E_EXCEPTION}
+
+//
+// MessageId: DISP_E_OVERFLOW
+//
+// MessageText:
+//
+// Out of present range.
+//
+ DISP_E_OVERFLOW = HRESULT($8002000A);
+ {$EXTERNALSYM DISP_E_OVERFLOW}
+
+//
+// MessageId: DISP_E_BADINDEX
+//
+// MessageText:
+//
+// Invalid index.
+//
+ DISP_E_BADINDEX = HRESULT($8002000B);
+ {$EXTERNALSYM DISP_E_BADINDEX}
+
+//
+// MessageId: DISP_E_UNKNOWNLCID
+//
+// MessageText:
+//
+// Unknown language.
+//
+ DISP_E_UNKNOWNLCID = HRESULT($8002000C);
+ {$EXTERNALSYM DISP_E_UNKNOWNLCID}
+
+//
+// MessageId: DISP_E_ARRAYISLOCKED
+//
+// MessageText:
+//
+// Memory is locked.
+//
+ DISP_E_ARRAYISLOCKED = HRESULT($8002000D);
+ {$EXTERNALSYM DISP_E_ARRAYISLOCKED}
+
+//
+// MessageId: DISP_E_BADPARAMCOUNT
+//
+// MessageText:
+//
+// Invalid number of parameters.
+//
+ DISP_E_BADPARAMCOUNT = HRESULT($8002000E);
+ {$EXTERNALSYM DISP_E_BADPARAMCOUNT}
+
+//
+// MessageId: DISP_E_PARAMNOTOPTIONAL
+//
+// MessageText:
+//
+// Parameter not optional.
+//
+ DISP_E_PARAMNOTOPTIONAL = HRESULT($8002000F);
+ {$EXTERNALSYM DISP_E_PARAMNOTOPTIONAL}
+
+//
+// MessageId: DISP_E_BADCALLEE
+//
+// MessageText:
+//
+// Invalid callee.
+//
+ DISP_E_BADCALLEE = HRESULT($80020010);
+ {$EXTERNALSYM DISP_E_BADCALLEE}
+
+//
+// MessageId: DISP_E_NOTACOLLECTION
+//
+// MessageText:
+//
+// Does not support a collection.
+//
+ DISP_E_NOTACOLLECTION = HRESULT($80020011);
+ {$EXTERNALSYM DISP_E_NOTACOLLECTION}
+
+//
+// MessageId: DISP_E_DIVBYZERO
+//
+// MessageText:
+//
+// Division by zero.
+//
+ DISP_E_DIVBYZERO = HRESULT($80020012);
+ {$EXTERNALSYM DISP_E_DIVBYZERO}
+
+//
+// MessageId: DISP_E_BUFFERTOOSMALL
+//
+// MessageText:
+//
+// Buffer too small
+//
+ DISP_E_BUFFERTOOSMALL = HRESULT($80020013);
+ {$EXTERNALSYM DISP_E_BUFFERTOOSMALL}
+
+//
+// MessageId: TYPE_E_BUFFERTOOSMALL
+//
+// MessageText:
+//
+// Buffer too small.
+//
+ TYPE_E_BUFFERTOOSMALL = HRESULT($80028016);
+ {$EXTERNALSYM TYPE_E_BUFFERTOOSMALL}
+
+//
+// MessageId: TYPE_E_FIELDNOTFOUND
+//
+// MessageText:
+//
+// Field name not defined in the record.
+//
+ TYPE_E_FIELDNOTFOUND = HRESULT($80028017);
+ {$EXTERNALSYM TYPE_E_FIELDNOTFOUND}
+
+//
+// MessageId: TYPE_E_INVDATAREAD
+//
+// MessageText:
+//
+// Old format or invalid type library.
+//
+ TYPE_E_INVDATAREAD = HRESULT($80028018);
+ {$EXTERNALSYM TYPE_E_INVDATAREAD}
+
+//
+// MessageId: TYPE_E_UNSUPFORMAT
+//
+// MessageText:
+//
+// Old format or invalid type library.
+//
+ TYPE_E_UNSUPFORMAT = HRESULT($80028019);
+ {$EXTERNALSYM TYPE_E_UNSUPFORMAT}
+
+//
+// MessageId: TYPE_E_REGISTRYACCESS
+//
+// MessageText:
+//
+// Error accessing the OLE registry.
+//
+ TYPE_E_REGISTRYACCESS = HRESULT($8002801C);
+ {$EXTERNALSYM TYPE_E_REGISTRYACCESS}
+
+//
+// MessageId: TYPE_E_LIBNOTREGISTERED
+//
+// MessageText:
+//
+// Library not registered.
+//
+ TYPE_E_LIBNOTREGISTERED = HRESULT($8002801D);
+ {$EXTERNALSYM TYPE_E_LIBNOTREGISTERED}
+
+//
+// MessageId: TYPE_E_UNDEFINEDTYPE
+//
+// MessageText:
+//
+// Bound to unknown type.
+//
+ TYPE_E_UNDEFINEDTYPE = HRESULT($80028027);
+ {$EXTERNALSYM TYPE_E_UNDEFINEDTYPE}
+
+//
+// MessageId: TYPE_E_QUALIFIEDNAMEDISALLOWED
+//
+// MessageText:
+//
+// Qualified name disallowed.
+//
+ TYPE_E_QUALIFIEDNAMEDISALLOWED = HRESULT($80028028);
+ {$EXTERNALSYM TYPE_E_QUALIFIEDNAMEDISALLOWED}
+
+//
+// MessageId: TYPE_E_INVALIDSTATE
+//
+// MessageText:
+//
+// Invalid forward reference, or reference to uncompiled type.
+//
+ TYPE_E_INVALIDSTATE = HRESULT($80028029);
+ {$EXTERNALSYM TYPE_E_INVALIDSTATE}
+
+//
+// MessageId: TYPE_E_WRONGTYPEKIND
+//
+// MessageText:
+//
+// Type mismatch.
+//
+ TYPE_E_WRONGTYPEKIND = HRESULT($8002802A);
+ {$EXTERNALSYM TYPE_E_WRONGTYPEKIND}
+
+//
+// MessageId: TYPE_E_ELEMENTNOTFOUND
+//
+// MessageText:
+//
+// Element not found.
+//
+ TYPE_E_ELEMENTNOTFOUND = HRESULT($8002802B);
+ {$EXTERNALSYM TYPE_E_ELEMENTNOTFOUND}
+
+//
+// MessageId: TYPE_E_AMBIGUOUSNAME
+//
+// MessageText:
+//
+// Ambiguous name.
+//
+ TYPE_E_AMBIGUOUSNAME = HRESULT($8002802C);
+ {$EXTERNALSYM TYPE_E_AMBIGUOUSNAME}
+
+//
+// MessageId: TYPE_E_NAMECONFLICT
+//
+// MessageText:
+//
+// Name already exists in the library.
+//
+ TYPE_E_NAMECONFLICT = HRESULT($8002802D);
+ {$EXTERNALSYM TYPE_E_NAMECONFLICT}
+
+//
+// MessageId: TYPE_E_UNKNOWNLCID
+//
+// MessageText:
+//
+// Unknown LCID.
+//
+ TYPE_E_UNKNOWNLCID = HRESULT($8002802E);
+ {$EXTERNALSYM TYPE_E_UNKNOWNLCID}
+
+//
+// MessageId: TYPE_E_DLLFUNCTIONNOTFOUND
+//
+// MessageText:
+//
+// Function not defined in specified DLL.
+//
+ TYPE_E_DLLFUNCTIONNOTFOUND = HRESULT($8002802F);
+ {$EXTERNALSYM TYPE_E_DLLFUNCTIONNOTFOUND}
+
+//
+// MessageId: TYPE_E_BADMODULEKIND
+//
+// MessageText:
+//
+// Wrong module kind for the operation.
+//
+ TYPE_E_BADMODULEKIND = HRESULT($800288BD);
+ {$EXTERNALSYM TYPE_E_BADMODULEKIND}
+
+//
+// MessageId: TYPE_E_SIZETOOBIG
+//
+// MessageText:
+//
+// Size may not exceed 64K.
+//
+ TYPE_E_SIZETOOBIG = HRESULT($800288C5);
+ {$EXTERNALSYM TYPE_E_SIZETOOBIG}
+
+//
+// MessageId: TYPE_E_DUPLICATEID
+//
+// MessageText:
+//
+// Duplicate ID in inheritance hierarchy.
+//
+ TYPE_E_DUPLICATEID = HRESULT($800288C6);
+ {$EXTERNALSYM TYPE_E_DUPLICATEID}
+
+//
+// MessageId: TYPE_E_INVALIDID
+//
+// MessageText:
+//
+// Incorrect inheritance depth in standard OLE hmember.
+//
+ TYPE_E_INVALIDID = HRESULT($800288CF);
+ {$EXTERNALSYM TYPE_E_INVALIDID}
+
+//
+// MessageId: TYPE_E_TYPEMISMATCH
+//
+// MessageText:
+//
+// Type mismatch.
+//
+ TYPE_E_TYPEMISMATCH = HRESULT($80028CA0);
+ {$EXTERNALSYM TYPE_E_TYPEMISMATCH}
+
+//
+// MessageId: TYPE_E_OUTOFBOUNDS
+//
+// MessageText:
+//
+// Invalid number of arguments.
+//
+ TYPE_E_OUTOFBOUNDS = HRESULT($80028CA1);
+ {$EXTERNALSYM TYPE_E_OUTOFBOUNDS}
+
+//
+// MessageId: TYPE_E_IOERROR
+//
+// MessageText:
+//
+// I/O Error.
+//
+ TYPE_E_IOERROR = HRESULT($80028CA2);
+ {$EXTERNALSYM TYPE_E_IOERROR}
+
+//
+// MessageId: TYPE_E_CANTCREATETMPFILE
+//
+// MessageText:
+//
+// Error creating unique tmp file.
+//
+ TYPE_E_CANTCREATETMPFILE = HRESULT($80028CA3);
+ {$EXTERNALSYM TYPE_E_CANTCREATETMPFILE}
+
+//
+// MessageId: TYPE_E_CANTLOADLIBRARY
+//
+// MessageText:
+//
+// Error loading type library/DLL.
+//
+ TYPE_E_CANTLOADLIBRARY = HRESULT($80029C4A);
+ {$EXTERNALSYM TYPE_E_CANTLOADLIBRARY}
+
+//
+// MessageId: TYPE_E_INCONSISTENTPROPFUNCS
+//
+// MessageText:
+//
+// Inconsistent property functions.
+//
+ TYPE_E_INCONSISTENTPROPFUNCS = HRESULT($80029C83);
+ {$EXTERNALSYM TYPE_E_INCONSISTENTPROPFUNCS}
+
+//
+// MessageId: TYPE_E_CIRCULARTYPE
+//
+// MessageText:
+//
+// Circular dependency between types/modules.
+//
+ TYPE_E_CIRCULARTYPE = HRESULT($80029C84);
+ {$EXTERNALSYM TYPE_E_CIRCULARTYPE}
+
+// ******************
+// FACILITY_STORAGE
+// ******************
+//
+// MessageId: STG_E_INVALIDFUNCTION
+//
+// MessageText:
+//
+// Unable to perform requested operation.
+//
+ STG_E_INVALIDFUNCTION = HRESULT($80030001);
+ {$EXTERNALSYM STG_E_INVALIDFUNCTION}
+
+//
+// MessageId: STG_E_FILENOTFOUND
+//
+// MessageText:
+//
+// %1 could not be found.
+//
+ STG_E_FILENOTFOUND = HRESULT($80030002);
+ {$EXTERNALSYM STG_E_FILENOTFOUND}
+
+//
+// MessageId: STG_E_PATHNOTFOUND
+//
+// MessageText:
+//
+// The path %1 could not be found.
+//
+ STG_E_PATHNOTFOUND = HRESULT($80030003);
+ {$EXTERNALSYM STG_E_PATHNOTFOUND}
+
+//
+// MessageId: STG_E_TOOMANYOPENFILES
+//
+// MessageText:
+//
+// There are insufficient resources to open another file.
+//
+ STG_E_TOOMANYOPENFILES = HRESULT($80030004);
+ {$EXTERNALSYM STG_E_TOOMANYOPENFILES}
+
+//
+// MessageId: STG_E_ACCESSDENIED
+//
+// MessageText:
+//
+// Access Denied.
+//
+ STG_E_ACCESSDENIED = HRESULT($80030005);
+ {$EXTERNALSYM STG_E_ACCESSDENIED}
+
+//
+// MessageId: STG_E_INVALIDHANDLE
+//
+// MessageText:
+//
+// Attempted an operation on an invalid object.
+//
+ STG_E_INVALIDHANDLE = HRESULT($80030006);
+ {$EXTERNALSYM STG_E_INVALIDHANDLE}
+
+//
+// MessageId: STG_E_INSUFFICIENTMEMORY
+//
+// MessageText:
+//
+// There is insufficient memory available to complete operation.
+//
+ STG_E_INSUFFICIENTMEMORY = HRESULT($80030008);
+ {$EXTERNALSYM STG_E_INSUFFICIENTMEMORY}
+
+//
+// MessageId: STG_E_INVALIDPOINTER
+//
+// MessageText:
+//
+// Invalid pointer error.
+//
+ STG_E_INVALIDPOINTER = HRESULT($80030009);
+ {$EXTERNALSYM STG_E_INVALIDPOINTER}
+
+//
+// MessageId: STG_E_NOMOREFILES
+//
+// MessageText:
+//
+// There are no more entries to return.
+//
+ STG_E_NOMOREFILES = HRESULT($80030012);
+ {$EXTERNALSYM STG_E_NOMOREFILES}
+
+//
+// MessageId: STG_E_DISKISWRITEPROTECTED
+//
+// MessageText:
+//
+// Disk is write-protected.
+//
+ STG_E_DISKISWRITEPROTECTED = HRESULT($80030013);
+ {$EXTERNALSYM STG_E_DISKISWRITEPROTECTED}
+
+//
+// MessageId: STG_E_SEEKERROR
+//
+// MessageText:
+//
+// An error occurred during a seek operation.
+//
+ STG_E_SEEKERROR = HRESULT($80030019);
+ {$EXTERNALSYM STG_E_SEEKERROR}
+
+//
+// MessageId: STG_E_WRITEFAULT
+//
+// MessageText:
+//
+// A disk error occurred during a write operation.
+//
+ STG_E_WRITEFAULT = HRESULT($8003001D);
+ {$EXTERNALSYM STG_E_WRITEFAULT}
+
+//
+// MessageId: STG_E_READFAULT
+//
+// MessageText:
+//
+// A disk error occurred during a read operation.
+//
+ STG_E_READFAULT = HRESULT($8003001E);
+ {$EXTERNALSYM STG_E_READFAULT}
+
+//
+// MessageId: STG_E_SHAREVIOLATION
+//
+// MessageText:
+//
+// A share violation has occurred.
+//
+ STG_E_SHAREVIOLATION = HRESULT($80030020);
+ {$EXTERNALSYM STG_E_SHAREVIOLATION}
+
+//
+// MessageId: STG_E_LOCKVIOLATION
+//
+// MessageText:
+//
+// A lock violation has occurred.
+//
+ STG_E_LOCKVIOLATION = HRESULT($80030021);
+ {$EXTERNALSYM STG_E_LOCKVIOLATION}
+
+//
+// MessageId: STG_E_FILEALREADYEXISTS
+//
+// MessageText:
+//
+// %1 already exists.
+//
+ STG_E_FILEALREADYEXISTS = HRESULT($80030050);
+ {$EXTERNALSYM STG_E_FILEALREADYEXISTS}
+
+//
+// MessageId: STG_E_INVALIDPARAMETER
+//
+// MessageText:
+//
+// Invalid parameter error.
+//
+ STG_E_INVALIDPARAMETER = HRESULT($80030057);
+ {$EXTERNALSYM STG_E_INVALIDPARAMETER}
+
+//
+// MessageId: STG_E_MEDIUMFULL
+//
+// MessageText:
+//
+// There is insufficient disk space to complete operation.
+//
+ STG_E_MEDIUMFULL = HRESULT($80030070);
+ {$EXTERNALSYM STG_E_MEDIUMFULL}
+
+//
+// MessageId: STG_E_PROPSETMISMATCHED
+//
+// MessageText:
+//
+// Illegal write of non-simple property to simple property set.
+//
+ STG_E_PROPSETMISMATCHED = HRESULT($800300F0);
+ {$EXTERNALSYM STG_E_PROPSETMISMATCHED}
+
+//
+// MessageId: STG_E_ABNORMALAPIEXIT
+//
+// MessageText:
+//
+// An API call exited abnormally.
+//
+ STG_E_ABNORMALAPIEXIT = HRESULT($800300FA);
+ {$EXTERNALSYM STG_E_ABNORMALAPIEXIT}
+
+//
+// MessageId: STG_E_INVALIDHEADER
+//
+// MessageText:
+//
+// The file %1 is not a valid compound file.
+//
+ STG_E_INVALIDHEADER = HRESULT($800300FB);
+ {$EXTERNALSYM STG_E_INVALIDHEADER}
+
+//
+// MessageId: STG_E_INVALIDNAME
+//
+// MessageText:
+//
+// The name %1 is not valid.
+//
+ STG_E_INVALIDNAME = HRESULT($800300FC);
+ {$EXTERNALSYM STG_E_INVALIDNAME}
+
+//
+// MessageId: STG_E_UNKNOWN
+//
+// MessageText:
+//
+// An unexpected error occurred.
+//
+ STG_E_UNKNOWN = HRESULT($800300FD);
+ {$EXTERNALSYM STG_E_UNKNOWN}
+
+//
+// MessageId: STG_E_UNIMPLEMENTEDFUNCTION
+//
+// MessageText:
+//
+// That function is not implemented.
+//
+ STG_E_UNIMPLEMENTEDFUNCTION = HRESULT($800300FE);
+ {$EXTERNALSYM STG_E_UNIMPLEMENTEDFUNCTION}
+
+//
+// MessageId: STG_E_INVALIDFLAG
+//
+// MessageText:
+//
+// Invalid flag error.
+//
+ STG_E_INVALIDFLAG = HRESULT($800300FF);
+ {$EXTERNALSYM STG_E_INVALIDFLAG}
+
+//
+// MessageId: STG_E_INUSE
+//
+// MessageText:
+//
+// Attempted to use an object that is busy.
+//
+ STG_E_INUSE = HRESULT($80030100);
+ {$EXTERNALSYM STG_E_INUSE}
+
+//
+// MessageId: STG_E_NOTCURRENT
+//
+// MessageText:
+//
+// The storage has been changed since the last commit.
+//
+ STG_E_NOTCURRENT = HRESULT($80030101);
+ {$EXTERNALSYM STG_E_NOTCURRENT}
+
+//
+// MessageId: STG_E_REVERTED
+//
+// MessageText:
+//
+// Attempted to use an object that has ceased to exist.
+//
+ STG_E_REVERTED = HRESULT($80030102);
+ {$EXTERNALSYM STG_E_REVERTED}
+
+//
+// MessageId: STG_E_CANTSAVE
+//
+// MessageText:
+//
+// Can't save.
+//
+ STG_E_CANTSAVE = HRESULT($80030103);
+ {$EXTERNALSYM STG_E_CANTSAVE}
+
+//
+// MessageId: STG_E_OLDFORMAT
+//
+// MessageText:
+//
+// The compound file %1 was produced with an incompatible version of storage.
+//
+ STG_E_OLDFORMAT = HRESULT($80030104);
+ {$EXTERNALSYM STG_E_OLDFORMAT}
+
+//
+// MessageId: STG_E_OLDDLL
+//
+// MessageText:
+//
+// The compound file %1 was produced with a newer version of storage.
+//
+ STG_E_OLDDLL = HRESULT($80030105);
+ {$EXTERNALSYM STG_E_OLDDLL}
+
+//
+// MessageId: STG_E_SHAREREQUIRED
+//
+// MessageText:
+//
+// Share.exe or equivalent is required for operation.
+//
+ STG_E_SHAREREQUIRED = HRESULT($80030106);
+ {$EXTERNALSYM STG_E_SHAREREQUIRED}
+
+//
+// MessageId: STG_E_NOTFILEBASEDSTORAGE
+//
+// MessageText:
+//
+// Illegal operation called on non-file based storage.
+//
+ STG_E_NOTFILEBASEDSTORAGE = HRESULT($80030107);
+ {$EXTERNALSYM STG_E_NOTFILEBASEDSTORAGE}
+
+//
+// MessageId: STG_E_EXTANTMARSHALLINGS
+//
+// MessageText:
+//
+// Illegal operation called on object with extant marshallings.
+//
+ STG_E_EXTANTMARSHALLINGS = HRESULT($80030108);
+ {$EXTERNALSYM STG_E_EXTANTMARSHALLINGS}
+
+//
+// MessageId: STG_E_DOCFILECORRUPT
+//
+// MessageText:
+//
+// The docfile has been corrupted.
+//
+ STG_E_DOCFILECORRUPT = HRESULT($80030109);
+ {$EXTERNALSYM STG_E_DOCFILECORRUPT}
+
+//
+// MessageId: STG_E_BADBASEADDRESS
+//
+// MessageText:
+//
+// OLE32.DLL has been loaded at the wrong address.
+//
+ STG_E_BADBASEADDRESS = HRESULT($80030110);
+ {$EXTERNALSYM STG_E_BADBASEADDRESS}
+
+//
+// MessageId: STG_E_DOCFILETOOLARGE
+//
+// MessageText:
+//
+// The compound file is too large for the current implementation
+//
+ STG_E_DOCFILETOOLARGE = HRESULT($80030111);
+ {$EXTERNALSYM STG_E_DOCFILETOOLARGE}
+
+//
+// MessageId: STG_E_NOTSIMPLEFORMAT
+//
+// MessageText:
+//
+// The compound file was not created with the STGM_SIMPLE flag
+//
+ STG_E_NOTSIMPLEFORMAT = HRESULT($80030112);
+ {$EXTERNALSYM STG_E_NOTSIMPLEFORMAT}
+
+//
+// MessageId: STG_E_INCOMPLETE
+//
+// MessageText:
+//
+// The file download was aborted abnormally. The file is incomplete.
+//
+ STG_E_INCOMPLETE = HRESULT($80030201);
+ {$EXTERNALSYM STG_E_INCOMPLETE}
+
+//
+// MessageId: STG_E_TERMINATED
+//
+// MessageText:
+//
+// The file download has been terminated.
+//
+ STG_E_TERMINATED = HRESULT($80030202);
+ {$EXTERNALSYM STG_E_TERMINATED}
+
+//
+// MessageId: STG_S_CONVERTED
+//
+// MessageText:
+//
+// The underlying file was converted to compound file format.
+//
+ STG_S_CONVERTED = HRESULT($00030200);
+ {$EXTERNALSYM STG_S_CONVERTED}
+
+//
+// MessageId: STG_S_BLOCK
+//
+// MessageText:
+//
+// The storage operation should block until more data is available.
+//
+ STG_S_BLOCK = HRESULT($00030201);
+ {$EXTERNALSYM STG_S_BLOCK}
+
+//
+// MessageId: STG_S_RETRYNOW
+//
+// MessageText:
+//
+// The storage operation should retry immediately.
+//
+ STG_S_RETRYNOW = HRESULT($00030202);
+ {$EXTERNALSYM STG_S_RETRYNOW}
+
+//
+// MessageId: STG_S_MONITORING
+//
+// MessageText:
+//
+// The notified event sink will not influence the storage operation.
+//
+ STG_S_MONITORING = HRESULT($00030203);
+ {$EXTERNALSYM STG_S_MONITORING}
+
+//
+// MessageId: STG_S_MULTIPLEOPENS
+//
+// MessageText:
+//
+// Multiple opens prevent consolidated. (commit succeeded).
+//
+ STG_S_MULTIPLEOPENS = HRESULT($00030204);
+ {$EXTERNALSYM STG_S_MULTIPLEOPENS}
+
+//
+// MessageId: STG_S_CONSOLIDATIONFAILED
+//
+// MessageText:
+//
+// Consolidation of the storage file failed. (commit succeeded).
+//
+ STG_S_CONSOLIDATIONFAILED = HRESULT($00030205);
+ {$EXTERNALSYM STG_S_CONSOLIDATIONFAILED}
+
+//
+// MessageId: STG_S_CANNOTCONSOLIDATE
+//
+// MessageText:
+//
+// Consolidation of the storage file is inappropriate. (commit succeeded).
+//
+ STG_S_CANNOTCONSOLIDATE = HRESULT($00030206);
+ {$EXTERNALSYM STG_S_CANNOTCONSOLIDATE}
+
+{*++
+
+ MessageId's 0x0305 - 0x031f (inclusive) are reserved for **STORAGE**
+ copy protection errors.
+
+--*}
+//
+// MessageId: STG_E_STATUS_COPY_PROTECTION_FAILURE
+//
+// MessageText:
+//
+// Generic Copy Protection Error.
+//
+ STG_E_STATUS_COPY_PROTECTION_FAILURE = HRESULT($80030305);
+ {$EXTERNALSYM STG_E_STATUS_COPY_PROTECTION_FAILURE}
+
+//
+// MessageId: STG_E_CSS_AUTHENTICATION_FAILURE
+//
+// MessageText:
+//
+// Copy Protection Error - DVD CSS Authentication failed.
+//
+ STG_E_CSS_AUTHENTICATION_FAILURE = HRESULT($80030306);
+ {$EXTERNALSYM STG_E_CSS_AUTHENTICATION_FAILURE}
+
+//
+// MessageId: STG_E_CSS_KEY_NOT_PRESENT
+//
+// MessageText:
+//
+// Copy Protection Error - The given sector does not have a valid CSS key.
+//
+ STG_E_CSS_KEY_NOT_PRESENT = HRESULT($80030307);
+ {$EXTERNALSYM STG_E_CSS_KEY_NOT_PRESENT}
+
+//
+// MessageId: STG_E_CSS_KEY_NOT_ESTABLISHED
+//
+// MessageText:
+//
+// Copy Protection Error - DVD session key not established.
+//
+ STG_E_CSS_KEY_NOT_ESTABLISHED = HRESULT($80030308);
+ {$EXTERNALSYM STG_E_CSS_KEY_NOT_ESTABLISHED}
+
+//
+// MessageId: STG_E_CSS_SCRAMBLED_SECTOR
+//
+// MessageText:
+//
+// Copy Protection Error - The read failed because the sector is encrypted.
+//
+ STG_E_CSS_SCRAMBLED_SECTOR = HRESULT($80030309);
+ {$EXTERNALSYM STG_E_CSS_SCRAMBLED_SECTOR}
+
+//
+// MessageId: STG_E_CSS_REGION_MISMATCH
+//
+// MessageText:
+//
+// Copy Protection Error - The current DVD's region does not correspond to the region setting of the drive.
+//
+ STG_E_CSS_REGION_MISMATCH = HRESULT($8003030A);
+ {$EXTERNALSYM STG_E_CSS_REGION_MISMATCH}
+
+//
+// MessageId: STG_E_RESETS_EXHAUSTED
+//
+// MessageText:
+//
+// Copy Protection Error - The drive's region setting may be permanent or the number of user resets has been exhausted.
+//
+ STG_E_RESETS_EXHAUSTED = HRESULT($8003030B);
+ {$EXTERNALSYM STG_E_RESETS_EXHAUSTED}
+
+{*++
+
+ MessageId's 0x0305 - 0x031f (inclusive) are reserved for **STORAGE**
+ copy protection errors.
+
+--*}
+// ******************
+// FACILITY_RPC
+// ******************
+//
+// Codes 0x0-0x11 are propagated from 16 bit OLE.
+//
+//
+// MessageId: RPC_E_CALL_REJECTED
+//
+// MessageText:
+//
+// Call was rejected by callee.
+//
+ RPC_E_CALL_REJECTED = HRESULT($80010001);
+ {$EXTERNALSYM RPC_E_CALL_REJECTED}
+
+//
+// MessageId: RPC_E_CALL_CANCELED
+//
+// MessageText:
+//
+// Call was canceled by the message filter.
+//
+ RPC_E_CALL_CANCELED = HRESULT($80010002);
+ {$EXTERNALSYM RPC_E_CALL_CANCELED}
+
+//
+// MessageId: RPC_E_CANTPOST_INSENDCALL
+//
+// MessageText:
+//
+// The caller is dispatching an intertask SendMessage call and cannot call out via PostMessage.
+//
+ RPC_E_CANTPOST_INSENDCALL = HRESULT($80010003);
+ {$EXTERNALSYM RPC_E_CANTPOST_INSENDCALL}
+
+//
+// MessageId: RPC_E_CANTCALLOUT_INASYNCCALL
+//
+// MessageText:
+//
+// The caller is dispatching an asynchronous call and cannot make an outgoing call on behalf of this call.
+//
+ RPC_E_CANTCALLOUT_INASYNCCALL = HRESULT($80010004);
+ {$EXTERNALSYM RPC_E_CANTCALLOUT_INASYNCCALL}
+
+//
+// MessageId: RPC_E_CANTCALLOUT_INEXTERNALCALL
+//
+// MessageText:
+//
+// It is illegal to call out while inside message filter.
+//
+ RPC_E_CANTCALLOUT_INEXTERNALCALL = HRESULT($80010005);
+ {$EXTERNALSYM RPC_E_CANTCALLOUT_INEXTERNALCALL}
+
+//
+// MessageId: RPC_E_CONNECTION_TERMINATED
+//
+// MessageText:
+//
+// The connection terminated or is in a bogus state and cannot be used any more. Other connections are still valid.
+//
+ RPC_E_CONNECTION_TERMINATED = HRESULT($80010006);
+ {$EXTERNALSYM RPC_E_CONNECTION_TERMINATED}
+
+//
+// MessageId: RPC_E_SERVER_DIED
+//
+// MessageText:
+//
+// The callee (server [not server application]) is not available and disappeared; all connections are invalid. The call may have executed.
+//
+ RPC_E_SERVER_DIED = HRESULT($80010007);
+ {$EXTERNALSYM RPC_E_SERVER_DIED}
+
+//
+// MessageId: RPC_E_CLIENT_DIED
+//
+// MessageText:
+//
+// The caller (client) disappeared while the callee (server) was processing a call.
+//
+ RPC_E_CLIENT_DIED = HRESULT($80010008);
+ {$EXTERNALSYM RPC_E_CLIENT_DIED}
+
+//
+// MessageId: RPC_E_INVALID_DATAPACKET
+//
+// MessageText:
+//
+// The data packet with the marshalled parameter data is incorrect.
+//
+ RPC_E_INVALID_DATAPACKET = HRESULT($80010009);
+ {$EXTERNALSYM RPC_E_INVALID_DATAPACKET}
+
+//
+// MessageId: RPC_E_CANTTRANSMIT_CALL
+//
+// MessageText:
+//
+// The call was not transmitted properly; the message queue was full and was not emptied after yielding.
+//
+ RPC_E_CANTTRANSMIT_CALL = HRESULT($8001000A);
+ {$EXTERNALSYM RPC_E_CANTTRANSMIT_CALL}
+
+//
+// MessageId: RPC_E_CLIENT_CANTMARSHAL_DATA
+//
+// MessageText:
+//
+// The client (caller) cannot marshall the parameter data - low memory, etc.
+//
+ RPC_E_CLIENT_CANTMARSHAL_DATA = HRESULT($8001000B);
+ {$EXTERNALSYM RPC_E_CLIENT_CANTMARSHAL_DATA}
+
+//
+// MessageId: RPC_E_CLIENT_CANTUNMARSHAL_DATA
+//
+// MessageText:
+//
+// The client (caller) cannot unmarshall the return data - low memory, etc.
+//
+ RPC_E_CLIENT_CANTUNMARSHAL_DATA = HRESULT($8001000C);
+ {$EXTERNALSYM RPC_E_CLIENT_CANTUNMARSHAL_DATA}
+
+//
+// MessageId: RPC_E_SERVER_CANTMARSHAL_DATA
+//
+// MessageText:
+//
+// The server (callee) cannot marshall the return data - low memory, etc.
+//
+ RPC_E_SERVER_CANTMARSHAL_DATA = HRESULT($8001000D);
+ {$EXTERNALSYM RPC_E_SERVER_CANTMARSHAL_DATA}
+
+//
+// MessageId: RPC_E_SERVER_CANTUNMARSHAL_DATA
+//
+// MessageText:
+//
+// The server (callee) cannot unmarshall the parameter data - low memory, etc.
+//
+ RPC_E_SERVER_CANTUNMARSHAL_DATA = HRESULT($8001000E);
+ {$EXTERNALSYM RPC_E_SERVER_CANTUNMARSHAL_DATA}
+
+//
+// MessageId: RPC_E_INVALID_DATA
+//
+// MessageText:
+//
+// Received data is invalid; could be server or client data.
+//
+ RPC_E_INVALID_DATA = HRESULT($8001000F);
+ {$EXTERNALSYM RPC_E_INVALID_DATA}
+
+//
+// MessageId: RPC_E_INVALID_PARAMETER
+//
+// MessageText:
+//
+// A particular parameter is invalid and cannot be (un)marshalled.
+//
+ RPC_E_INVALID_PARAMETER = HRESULT($80010010);
+ {$EXTERNALSYM RPC_E_INVALID_PARAMETER}
+
+//
+// MessageId: RPC_E_CANTCALLOUT_AGAIN
+//
+// MessageText:
+//
+// There is no second outgoing call on same channel in DDE conversation.
+//
+ RPC_E_CANTCALLOUT_AGAIN = HRESULT($80010011);
+ {$EXTERNALSYM RPC_E_CANTCALLOUT_AGAIN}
+
+//
+// MessageId: RPC_E_SERVER_DIED_DNE
+//
+// MessageText:
+//
+// The callee (server [not server application]) is not available and disappeared; all connections are invalid. The call did not execute.
+//
+ RPC_E_SERVER_DIED_DNE = HRESULT($80010012);
+ {$EXTERNALSYM RPC_E_SERVER_DIED_DNE}
+
+//
+// MessageId: RPC_E_SYS_CALL_FAILED
+//
+// MessageText:
+//
+// System call failed.
+//
+ RPC_E_SYS_CALL_FAILED = HRESULT($80010100);
+ {$EXTERNALSYM RPC_E_SYS_CALL_FAILED}
+
+//
+// MessageId: RPC_E_OUT_OF_RESOURCES
+//
+// MessageText:
+//
+// Could not allocate some required resource (memory, events, ...)
+//
+ RPC_E_OUT_OF_RESOURCES = HRESULT($80010101);
+ {$EXTERNALSYM RPC_E_OUT_OF_RESOURCES}
+
+//
+// MessageId: RPC_E_ATTEMPTED_MULTITHREAD
+//
+// MessageText:
+//
+// Attempted to make calls on more than one thread in single threaded mode.
+//
+ RPC_E_ATTEMPTED_MULTITHREAD = HRESULT($80010102);
+ {$EXTERNALSYM RPC_E_ATTEMPTED_MULTITHREAD}
+
+//
+// MessageId: RPC_E_NOT_REGISTERED
+//
+// MessageText:
+//
+// The requested interface is not registered on the server object.
+//
+ RPC_E_NOT_REGISTERED = HRESULT($80010103);
+ {$EXTERNALSYM RPC_E_NOT_REGISTERED}
+
+//
+// MessageId: RPC_E_FAULT
+//
+// MessageText:
+//
+// RPC could not call the server or could not return the results of calling the server.
+//
+ RPC_E_FAULT = HRESULT($80010104);
+ {$EXTERNALSYM RPC_E_FAULT}
+
+//
+// MessageId: RPC_E_SERVERFAULT
+//
+// MessageText:
+//
+// The server threw an exception.
+//
+ RPC_E_SERVERFAULT = HRESULT($80010105);
+ {$EXTERNALSYM RPC_E_SERVERFAULT}
+
+//
+// MessageId: RPC_E_CHANGED_MODE
+//
+// MessageText:
+//
+// Cannot change thread mode after it is set.
+//
+ RPC_E_CHANGED_MODE = HRESULT($80010106);
+ {$EXTERNALSYM RPC_E_CHANGED_MODE}
+
+//
+// MessageId: RPC_E_INVALIDMETHOD
+//
+// MessageText:
+//
+// The method called does not exist on the server.
+//
+ RPC_E_INVALIDMETHOD = HRESULT($80010107);
+ {$EXTERNALSYM RPC_E_INVALIDMETHOD}
+
+//
+// MessageId: RPC_E_DISCONNECTED
+//
+// MessageText:
+//
+// The object invoked has disconnected from its clients.
+//
+ RPC_E_DISCONNECTED = HRESULT($80010108);
+ {$EXTERNALSYM RPC_E_DISCONNECTED}
+
+//
+// MessageId: RPC_E_RETRY
+//
+// MessageText:
+//
+// The object invoked chose not to process the call now. Try again later.
+//
+ RPC_E_RETRY = HRESULT($80010109);
+ {$EXTERNALSYM RPC_E_RETRY}
+
+//
+// MessageId: RPC_E_SERVERCALL_RETRYLATER
+//
+// MessageText:
+//
+// The message filter indicated that the application is busy.
+//
+ RPC_E_SERVERCALL_RETRYLATER = HRESULT($8001010A);
+ {$EXTERNALSYM RPC_E_SERVERCALL_RETRYLATER}
+
+//
+// MessageId: RPC_E_SERVERCALL_REJECTED
+//
+// MessageText:
+//
+// The message filter rejected the call.
+//
+ RPC_E_SERVERCALL_REJECTED = HRESULT($8001010B);
+ {$EXTERNALSYM RPC_E_SERVERCALL_REJECTED}
+
+//
+// MessageId: RPC_E_INVALID_CALLDATA
+//
+// MessageText:
+//
+// A call control interfaces was called with invalid data.
+//
+ RPC_E_INVALID_CALLDATA = HRESULT($8001010C);
+ {$EXTERNALSYM RPC_E_INVALID_CALLDATA}
+
+//
+// MessageId: RPC_E_CANTCALLOUT_ININPUTSYNCCALL
+//
+// MessageText:
+//
+// An outgoing call cannot be made since the application is dispatching an input-synchronous call.
+//
+ RPC_E_CANTCALLOUT_ININPUTSYNCCALL = HRESULT($8001010D);
+ {$EXTERNALSYM RPC_E_CANTCALLOUT_ININPUTSYNCCALL}
+
+//
+// MessageId: RPC_E_WRONG_THREAD
+//
+// MessageText:
+//
+// The application called an interface that was marshalled for a different thread.
+//
+ RPC_E_WRONG_THREAD = HRESULT($8001010E);
+ {$EXTERNALSYM RPC_E_WRONG_THREAD}
+
+//
+// MessageId: RPC_E_THREAD_NOT_INIT
+//
+// MessageText:
+//
+// CoInitialize has not been called on the current thread.
+//
+ RPC_E_THREAD_NOT_INIT = HRESULT($8001010F);
+ {$EXTERNALSYM RPC_E_THREAD_NOT_INIT}
+
+//
+// MessageId: RPC_E_VERSION_MISMATCH
+//
+// MessageText:
+//
+// The version of OLE on the client and server machines does not match.
+//
+ RPC_E_VERSION_MISMATCH = HRESULT($80010110);
+ {$EXTERNALSYM RPC_E_VERSION_MISMATCH}
+
+//
+// MessageId: RPC_E_INVALID_HEADER
+//
+// MessageText:
+//
+// OLE received a packet with an invalid header.
+//
+ RPC_E_INVALID_HEADER = HRESULT($80010111);
+ {$EXTERNALSYM RPC_E_INVALID_HEADER}
+
+//
+// MessageId: RPC_E_INVALID_EXTENSION
+//
+// MessageText:
+//
+// OLE received a packet with an invalid extension.
+//
+ RPC_E_INVALID_EXTENSION = HRESULT($80010112);
+ {$EXTERNALSYM RPC_E_INVALID_EXTENSION}
+
+//
+// MessageId: RPC_E_INVALID_IPID
+//
+// MessageText:
+//
+// The requested object or interface does not exist.
+//
+ RPC_E_INVALID_IPID = HRESULT($80010113);
+ {$EXTERNALSYM RPC_E_INVALID_IPID}
+
+//
+// MessageId: RPC_E_INVALID_OBJECT
+//
+// MessageText:
+//
+// The requested object does not exist.
+//
+ RPC_E_INVALID_OBJECT = HRESULT($80010114);
+ {$EXTERNALSYM RPC_E_INVALID_OBJECT}
+
+//
+// MessageId: RPC_S_CALLPENDING
+//
+// MessageText:
+//
+// OLE has sent a request and is waiting for a reply.
+//
+ RPC_S_CALLPENDING = HRESULT($80010115);
+ {$EXTERNALSYM RPC_S_CALLPENDING}
+
+//
+// MessageId: RPC_S_WAITONTIMER
+//
+// MessageText:
+//
+// OLE is waiting before retrying a request.
+//
+ RPC_S_WAITONTIMER = HRESULT($80010116);
+ {$EXTERNALSYM RPC_S_WAITONTIMER}
+
+//
+// MessageId: RPC_E_CALL_COMPLETE
+//
+// MessageText:
+//
+// Call context cannot be accessed after call completed.
+//
+ RPC_E_CALL_COMPLETE = HRESULT($80010117);
+ {$EXTERNALSYM RPC_E_CALL_COMPLETE}
+
+//
+// MessageId: RPC_E_UNSECURE_CALL
+//
+// MessageText:
+//
+// Impersonate on unsecure calls is not supported.
+//
+ RPC_E_UNSECURE_CALL = HRESULT($80010118);
+ {$EXTERNALSYM RPC_E_UNSECURE_CALL}
+
+//
+// MessageId: RPC_E_TOO_LATE
+//
+// MessageText:
+//
+// Security must be initialized before any interfaces are marshalled or unmarshalled. It cannot be changed once initialized.
+//
+ RPC_E_TOO_LATE = HRESULT($80010119);
+ {$EXTERNALSYM RPC_E_TOO_LATE}
+
+//
+// MessageId: RPC_E_NO_GOOD_SECURITY_PACKAGES
+//
+// MessageText:
+//
+// No security packages are installed on this machine or the user is not logged on or there are no compatible security packages between the client and server.
+//
+ RPC_E_NO_GOOD_SECURITY_PACKAGES = HRESULT($8001011A);
+ {$EXTERNALSYM RPC_E_NO_GOOD_SECURITY_PACKAGES}
+
+//
+// MessageId: RPC_E_ACCESS_DENIED
+//
+// MessageText:
+//
+// Access is denied.
+//
+ RPC_E_ACCESS_DENIED = HRESULT($8001011B);
+ {$EXTERNALSYM RPC_E_ACCESS_DENIED}
+
+//
+// MessageId: RPC_E_REMOTE_DISABLED
+//
+// MessageText:
+//
+// Remote calls are not allowed for this process.
+//
+ RPC_E_REMOTE_DISABLED = HRESULT($8001011C);
+ {$EXTERNALSYM RPC_E_REMOTE_DISABLED}
+
+//
+// MessageId: RPC_E_INVALID_OBJREF
+//
+// MessageText:
+//
+// The marshaled interface data packet (OBJREF) has an invalid or unknown format.
+//
+ RPC_E_INVALID_OBJREF = HRESULT($8001011D);
+ {$EXTERNALSYM RPC_E_INVALID_OBJREF}
+
+//
+// MessageId: RPC_E_NO_CONTEXT
+//
+// MessageText:
+//
+// No context is associated with this call. This happens for some custom marshalled calls and on the client side of the call.
+//
+ RPC_E_NO_CONTEXT = HRESULT($8001011E);
+ {$EXTERNALSYM RPC_E_NO_CONTEXT}
+
+//
+// MessageId: RPC_E_TIMEOUT
+//
+// MessageText:
+//
+// This operation returned because the timeout period expired.
+//
+ RPC_E_TIMEOUT = HRESULT($8001011F);
+ {$EXTERNALSYM RPC_E_TIMEOUT}
+
+//
+// MessageId: RPC_E_NO_SYNC
+//
+// MessageText:
+//
+// There are no synchronize objects to wait on.
+//
+ RPC_E_NO_SYNC = HRESULT($80010120);
+ {$EXTERNALSYM RPC_E_NO_SYNC}
+
+//
+// MessageId: RPC_E_FULLSIC_REQUIRED
+//
+// MessageText:
+//
+// Full subject issuer chain SSL principal name expected from the server.
+//
+ RPC_E_FULLSIC_REQUIRED = HRESULT($80010121);
+ {$EXTERNALSYM RPC_E_FULLSIC_REQUIRED}
+
+//
+// MessageId: RPC_E_INVALID_STD_NAME
+//
+// MessageText:
+//
+// Principal name is not a valid MSSTD name.
+//
+ RPC_E_INVALID_STD_NAME = HRESULT($80010122);
+ {$EXTERNALSYM RPC_E_INVALID_STD_NAME}
+
+//
+// MessageId: CO_E_FAILEDTOIMPERSONATE
+//
+// MessageText:
+//
+// Unable to impersonate DCOM client
+//
+ CO_E_FAILEDTOIMPERSONATE = HRESULT($80010123);
+ {$EXTERNALSYM CO_E_FAILEDTOIMPERSONATE}
+
+//
+// MessageId: CO_E_FAILEDTOGETSECCTX
+//
+// MessageText:
+//
+// Unable to obtain server's security context
+//
+ CO_E_FAILEDTOGETSECCTX = HRESULT($80010124);
+ {$EXTERNALSYM CO_E_FAILEDTOGETSECCTX}
+
+//
+// MessageId: CO_E_FAILEDTOOPENTHREADTOKEN
+//
+// MessageText:
+//
+// Unable to open the access token of the current thread
+//
+ CO_E_FAILEDTOOPENTHREADTOKEN = HRESULT($80010125);
+ {$EXTERNALSYM CO_E_FAILEDTOOPENTHREADTOKEN}
+
+//
+// MessageId: CO_E_FAILEDTOGETTOKENINFO
+//
+// MessageText:
+//
+// Unable to obtain user info from an access token
+//
+ CO_E_FAILEDTOGETTOKENINFO = HRESULT($80010126);
+ {$EXTERNALSYM CO_E_FAILEDTOGETTOKENINFO}
+
+//
+// MessageId: CO_E_TRUSTEEDOESNTMATCHCLIENT
+//
+// MessageText:
+//
+// The client who called IAccessControl::IsAccessPermitted was not the trustee provided to the method
+//
+ CO_E_TRUSTEEDOESNTMATCHCLIENT = HRESULT($80010127);
+ {$EXTERNALSYM CO_E_TRUSTEEDOESNTMATCHCLIENT}
+
+//
+// MessageId: CO_E_FAILEDTOQUERYCLIENTBLANKET
+//
+// MessageText:
+//
+// Unable to obtain the client's security blanket
+//
+ CO_E_FAILEDTOQUERYCLIENTBLANKET = HRESULT($80010128);
+ {$EXTERNALSYM CO_E_FAILEDTOQUERYCLIENTBLANKET}
+
+//
+// MessageId: CO_E_FAILEDTOSETDACL
+//
+// MessageText:
+//
+// Unable to set a discretionary ACL into a security descriptor
+//
+ CO_E_FAILEDTOSETDACL = HRESULT($80010129);
+ {$EXTERNALSYM CO_E_FAILEDTOSETDACL}
+
+//
+// MessageId: CO_E_ACCESSCHECKFAILED
+//
+// MessageText:
+//
+// The system function, AccessCheck, returned false
+//
+ CO_E_ACCESSCHECKFAILED = HRESULT($8001012A);
+ {$EXTERNALSYM CO_E_ACCESSCHECKFAILED}
+
+//
+// MessageId: CO_E_NETACCESSAPIFAILED
+//
+// MessageText:
+//
+// Either NetAccessDel or NetAccessAdd returned an error code.
+//
+ CO_E_NETACCESSAPIFAILED = HRESULT($8001012B);
+ {$EXTERNALSYM CO_E_NETACCESSAPIFAILED}
+
+//
+// MessageId: CO_E_WRONGTRUSTEENAMESYNTAX
+//
+// MessageText:
+//
+// One of the trustee strings provided by the user did not conform to the <Domain>\<Name> syntax and it was not the "*" string
+//
+ CO_E_WRONGTRUSTEENAMESYNTAX = HRESULT($8001012C);
+ {$EXTERNALSYM CO_E_WRONGTRUSTEENAMESYNTAX}
+
+//
+// MessageId: CO_E_INVALIDSID
+//
+// MessageText:
+//
+// One of the security identifiers provided by the user was invalid
+//
+ CO_E_INVALIDSID = HRESULT($8001012D);
+ {$EXTERNALSYM CO_E_INVALIDSID}
+
+//
+// MessageId: CO_E_CONVERSIONFAILED
+//
+// MessageText:
+//
+// Unable to convert a wide character trustee string to a multibyte trustee string
+//
+ CO_E_CONVERSIONFAILED = HRESULT($8001012E);
+ {$EXTERNALSYM CO_E_CONVERSIONFAILED}
+
+//
+// MessageId: CO_E_NOMATCHINGSIDFOUND
+//
+// MessageText:
+//
+// Unable to find a security identifier that corresponds to a trustee string provided by the user
+//
+ CO_E_NOMATCHINGSIDFOUND = HRESULT($8001012F);
+ {$EXTERNALSYM CO_E_NOMATCHINGSIDFOUND}
+
+//
+// MessageId: CO_E_LOOKUPACCSIDFAILED
+//
+// MessageText:
+//
+// The system function, LookupAccountSID, failed
+//
+ CO_E_LOOKUPACCSIDFAILED = HRESULT($80010130);
+ {$EXTERNALSYM CO_E_LOOKUPACCSIDFAILED}
+
+//
+// MessageId: CO_E_NOMATCHINGNAMEFOUND
+//
+// MessageText:
+//
+// Unable to find a trustee name that corresponds to a security identifier provided by the user
+//
+ CO_E_NOMATCHINGNAMEFOUND = HRESULT($80010131);
+ {$EXTERNALSYM CO_E_NOMATCHINGNAMEFOUND}
+
+//
+// MessageId: CO_E_LOOKUPACCNAMEFAILED
+//
+// MessageText:
+//
+// The system function, LookupAccountName, failed
+//
+ CO_E_LOOKUPACCNAMEFAILED = HRESULT($80010132);
+ {$EXTERNALSYM CO_E_LOOKUPACCNAMEFAILED}
+
+//
+// MessageId: CO_E_SETSERLHNDLFAILED
+//
+// MessageText:
+//
+// Unable to set or reset a serialization handle
+//
+ CO_E_SETSERLHNDLFAILED = HRESULT($80010133);
+ {$EXTERNALSYM CO_E_SETSERLHNDLFAILED}
+
+//
+// MessageId: CO_E_FAILEDTOGETWINDIR
+//
+// MessageText:
+//
+// Unable to obtain the Windows directory
+//
+ CO_E_FAILEDTOGETWINDIR = HRESULT($80010134);
+ {$EXTERNALSYM CO_E_FAILEDTOGETWINDIR}
+
+//
+// MessageId: CO_E_PATHTOOLONG
+//
+// MessageText:
+//
+// Path too long
+//
+ CO_E_PATHTOOLONG = HRESULT($80010135);
+ {$EXTERNALSYM CO_E_PATHTOOLONG}
+
+//
+// MessageId: CO_E_FAILEDTOGENUUID
+//
+// MessageText:
+//
+// Unable to generate a uuid.
+//
+ CO_E_FAILEDTOGENUUID = HRESULT($80010136);
+ {$EXTERNALSYM CO_E_FAILEDTOGENUUID}
+
+//
+// MessageId: CO_E_FAILEDTOCREATEFILE
+//
+// MessageText:
+//
+// Unable to create file
+//
+ CO_E_FAILEDTOCREATEFILE = HRESULT($80010137);
+ {$EXTERNALSYM CO_E_FAILEDTOCREATEFILE}
+
+//
+// MessageId: CO_E_FAILEDTOCLOSEHANDLE
+//
+// MessageText:
+//
+// Unable to close a serialization handle or a file handle.
+//
+ CO_E_FAILEDTOCLOSEHANDLE = HRESULT($80010138);
+ {$EXTERNALSYM CO_E_FAILEDTOCLOSEHANDLE}
+
+//
+// MessageId: CO_E_EXCEEDSYSACLLIMIT
+//
+// MessageText:
+//
+// The number of ACEs in an ACL exceeds the system limit.
+//
+ CO_E_EXCEEDSYSACLLIMIT = HRESULT($80010139);
+ {$EXTERNALSYM CO_E_EXCEEDSYSACLLIMIT}
+
+//
+// MessageId: CO_E_ACESINWRONGORDER
+//
+// MessageText:
+//
+// Not all the DENY_ACCESS ACEs are arranged in front of the GRANT_ACCESS ACEs in the stream.
+//
+ CO_E_ACESINWRONGORDER = HRESULT($8001013A);
+ {$EXTERNALSYM CO_E_ACESINWRONGORDER}
+
+//
+// MessageId: CO_E_INCOMPATIBLESTREAMVERSION
+//
+// MessageText:
+//
+// The version of ACL format in the stream is not supported by this implementation of IAccessControl
+//
+ CO_E_INCOMPATIBLESTREAMVERSION = HRESULT($8001013B);
+ {$EXTERNALSYM CO_E_INCOMPATIBLESTREAMVERSION}
+
+//
+// MessageId: CO_E_FAILEDTOOPENPROCESSTOKEN
+//
+// MessageText:
+//
+// Unable to open the access token of the server process
+//
+ CO_E_FAILEDTOOPENPROCESSTOKEN = HRESULT($8001013C);
+ {$EXTERNALSYM CO_E_FAILEDTOOPENPROCESSTOKEN}
+
+//
+// MessageId: CO_E_DECODEFAILED
+//
+// MessageText:
+//
+// Unable to decode the ACL in the stream provided by the user
+//
+ CO_E_DECODEFAILED = HRESULT($8001013D);
+ {$EXTERNALSYM CO_E_DECODEFAILED}
+
+//
+// MessageId: CO_E_ACNOTINITIALIZED
+//
+// MessageText:
+//
+// The COM IAccessControl object is not initialized
+//
+ CO_E_ACNOTINITIALIZED = HRESULT($8001013F);
+ {$EXTERNALSYM CO_E_ACNOTINITIALIZED}
+
+//
+// MessageId: CO_E_CANCEL_DISABLED
+//
+// MessageText:
+//
+// Call Cancellation is disabled
+//
+ CO_E_CANCEL_DISABLED = HRESULT($80010140);
+ {$EXTERNALSYM CO_E_CANCEL_DISABLED}
+
+//
+// MessageId: RPC_E_UNEXPECTED
+//
+// MessageText:
+//
+// An internal error occurred.
+//
+ RPC_E_UNEXPECTED = HRESULT($8001FFFF);
+ {$EXTERNALSYM RPC_E_UNEXPECTED}
+
+
+//////////////////////////////////////
+// //
+// Additional Security Status Codes //
+// //
+// Facility=Security //
+// //
+//////////////////////////////////////
+
+//
+// MessageId: ERROR_AUDITING_DISABLED
+//
+// MessageText:
+//
+// The specified event is currently not being audited.
+//
+ ERROR_AUDITING_DISABLED = HRESULT($C0090001);
+ {$EXTERNALSYM ERROR_AUDITING_DISABLED}
+
+//
+// MessageId: ERROR_ALL_SIDS_FILTERED
+//
+// MessageText:
+//
+// The SID filtering operation removed all SIDs.
+//
+ ERROR_ALL_SIDS_FILTERED = HRESULT($C0090002);
+ {$EXTERNALSYM ERROR_ALL_SIDS_FILTERED}
+
+
+/////////////////////////////////////////////
+// //
+// end of Additional Security Status Codes //
+// //
+/////////////////////////////////////////////
+
+
+ /////////////////
+ //
+ // FACILITY_SSPI
+ //
+ /////////////////
+
+//
+// MessageId: NTE_BAD_UID
+//
+// MessageText:
+//
+// Bad UID.
+//
+ NTE_BAD_UID = HRESULT($80090001);
+ {$EXTERNALSYM NTE_BAD_UID}
+
+//
+// MessageId: NTE_BAD_HASH
+//
+// MessageText:
+//
+// Bad Hash.
+//
+ NTE_BAD_HASH = HRESULT($80090002);
+ {$EXTERNALSYM NTE_BAD_HASH}
+
+//
+// MessageId: NTE_BAD_KEY
+//
+// MessageText:
+//
+// Bad Key.
+//
+ NTE_BAD_KEY = HRESULT($80090003);
+ {$EXTERNALSYM NTE_BAD_KEY}
+
+//
+// MessageId: NTE_BAD_LEN
+//
+// MessageText:
+//
+// Bad Length.
+//
+ NTE_BAD_LEN = HRESULT($80090004);
+ {$EXTERNALSYM NTE_BAD_LEN}
+
+//
+// MessageId: NTE_BAD_DATA
+//
+// MessageText:
+//
+// Bad Data.
+//
+ NTE_BAD_DATA = HRESULT($80090005);
+ {$EXTERNALSYM NTE_BAD_DATA}
+
+//
+// MessageId: NTE_BAD_SIGNATURE
+//
+// MessageText:
+//
+// Invalid Signature.
+//
+ NTE_BAD_SIGNATURE = HRESULT($80090006);
+ {$EXTERNALSYM NTE_BAD_SIGNATURE}
+
+//
+// MessageId: NTE_BAD_VER
+//
+// MessageText:
+//
+// Bad Version of provider.
+//
+ NTE_BAD_VER = HRESULT($80090007);
+ {$EXTERNALSYM NTE_BAD_VER}
+
+//
+// MessageId: NTE_BAD_ALGID
+//
+// MessageText:
+//
+// Invalid algorithm specified.
+//
+ NTE_BAD_ALGID = HRESULT($80090008);
+ {$EXTERNALSYM NTE_BAD_ALGID}
+
+//
+// MessageId: NTE_BAD_FLAGS
+//
+// MessageText:
+//
+// Invalid flags specified.
+//
+ NTE_BAD_FLAGS = HRESULT($80090009);
+ {$EXTERNALSYM NTE_BAD_FLAGS}
+
+//
+// MessageId: NTE_BAD_TYPE
+//
+// MessageText:
+//
+// Invalid type specified.
+//
+ NTE_BAD_TYPE = HRESULT($8009000A);
+ {$EXTERNALSYM NTE_BAD_TYPE}
+
+//
+// MessageId: NTE_BAD_KEY_STATE
+//
+// MessageText:
+//
+// Key not valid for use in specified state.
+//
+ NTE_BAD_KEY_STATE = HRESULT($8009000B);
+ {$EXTERNALSYM NTE_BAD_KEY_STATE}
+
+//
+// MessageId: NTE_BAD_HASH_STATE
+//
+// MessageText:
+//
+// Hash not valid for use in specified state.
+//
+ NTE_BAD_HASH_STATE = HRESULT($8009000C);
+ {$EXTERNALSYM NTE_BAD_HASH_STATE}
+
+//
+// MessageId: NTE_NO_KEY
+//
+// MessageText:
+//
+// Key does not exist.
+//
+ NTE_NO_KEY = HRESULT($8009000D);
+ {$EXTERNALSYM NTE_NO_KEY}
+
+//
+// MessageId: NTE_NO_MEMORY
+//
+// MessageText:
+//
+// Insufficient memory available for the operation.
+//
+ NTE_NO_MEMORY = HRESULT($8009000E);
+ {$EXTERNALSYM NTE_NO_MEMORY}
+
+//
+// MessageId: NTE_EXISTS
+//
+// MessageText:
+//
+// Object already exists.
+//
+ NTE_EXISTS = HRESULT($8009000F);
+ {$EXTERNALSYM NTE_EXISTS}
+
+//
+// MessageId: NTE_PERM
+//
+// MessageText:
+//
+// Access denied.
+//
+ NTE_PERM = HRESULT($80090010);
+ {$EXTERNALSYM NTE_PERM}
+
+//
+// MessageId: NTE_NOT_FOUND
+//
+// MessageText:
+//
+// Object was not found.
+//
+ NTE_NOT_FOUND = HRESULT($80090011);
+ {$EXTERNALSYM NTE_NOT_FOUND}
+
+//
+// MessageId: NTE_DOUBLE_ENCRYPT
+//
+// MessageText:
+//
+// Data already encrypted.
+//
+ NTE_DOUBLE_ENCRYPT = HRESULT($80090012);
+ {$EXTERNALSYM NTE_DOUBLE_ENCRYPT}
+
+//
+// MessageId: NTE_BAD_PROVIDER
+//
+// MessageText:
+//
+// Invalid provider specified.
+//
+ NTE_BAD_PROVIDER = HRESULT($80090013);
+ {$EXTERNALSYM NTE_BAD_PROVIDER}
+
+//
+// MessageId: NTE_BAD_PROV_TYPE
+//
+// MessageText:
+//
+// Invalid provider type specified.
+//
+ NTE_BAD_PROV_TYPE = HRESULT($80090014);
+ {$EXTERNALSYM NTE_BAD_PROV_TYPE}
+
+//
+// MessageId: NTE_BAD_PUBLIC_KEY
+//
+// MessageText:
+//
+// Provider's public key is invalid.
+//
+ NTE_BAD_PUBLIC_KEY = HRESULT($80090015);
+ {$EXTERNALSYM NTE_BAD_PUBLIC_KEY}
+
+//
+// MessageId: NTE_BAD_KEYSET
+//
+// MessageText:
+//
+// Keyset does not exist
+//
+ NTE_BAD_KEYSET = HRESULT($80090016);
+ {$EXTERNALSYM NTE_BAD_KEYSET}
+
+//
+// MessageId: NTE_PROV_TYPE_NOT_DEF
+//
+// MessageText:
+//
+// Provider type not defined.
+//
+ NTE_PROV_TYPE_NOT_DEF = HRESULT($80090017);
+ {$EXTERNALSYM NTE_PROV_TYPE_NOT_DEF}
+
+//
+// MessageId: NTE_PROV_TYPE_ENTRY_BAD
+//
+// MessageText:
+//
+// Provider type as registered is invalid.
+//
+ NTE_PROV_TYPE_ENTRY_BAD = HRESULT($80090018);
+ {$EXTERNALSYM NTE_PROV_TYPE_ENTRY_BAD}
+
+//
+// MessageId: NTE_KEYSET_NOT_DEF
+//
+// MessageText:
+//
+// The keyset is not defined.
+//
+ NTE_KEYSET_NOT_DEF = HRESULT($80090019);
+ {$EXTERNALSYM NTE_KEYSET_NOT_DEF}
+
+//
+// MessageId: NTE_KEYSET_ENTRY_BAD
+//
+// MessageText:
+//
+// Keyset as registered is invalid.
+//
+ NTE_KEYSET_ENTRY_BAD = HRESULT($8009001A);
+ {$EXTERNALSYM NTE_KEYSET_ENTRY_BAD}
+
+//
+// MessageId: NTE_PROV_TYPE_NO_MATCH
+//
+// MessageText:
+//
+// Provider type does not match registered value.
+//
+ NTE_PROV_TYPE_NO_MATCH = HRESULT($8009001B);
+ {$EXTERNALSYM NTE_PROV_TYPE_NO_MATCH}
+
+//
+// MessageId: NTE_SIGNATURE_FILE_BAD
+//
+// MessageText:
+//
+// The digital signature file is corrupt.
+//
+ NTE_SIGNATURE_FILE_BAD = HRESULT($8009001C);
+ {$EXTERNALSYM NTE_SIGNATURE_FILE_BAD}
+
+//
+// MessageId: NTE_PROVIDER_DLL_FAIL
+//
+// MessageText:
+//
+// Provider DLL failed to initialize correctly.
+//
+ NTE_PROVIDER_DLL_FAIL = HRESULT($8009001D);
+ {$EXTERNALSYM NTE_PROVIDER_DLL_FAIL}
+
+//
+// MessageId: NTE_PROV_DLL_NOT_FOUND
+//
+// MessageText:
+//
+// Provider DLL could not be found.
+//
+ NTE_PROV_DLL_NOT_FOUND = HRESULT($8009001E);
+ {$EXTERNALSYM NTE_PROV_DLL_NOT_FOUND}
+
+//
+// MessageId: NTE_BAD_KEYSET_PARAM
+//
+// MessageText:
+//
+// The Keyset parameter is invalid.
+//
+ NTE_BAD_KEYSET_PARAM = HRESULT($8009001F);
+ {$EXTERNALSYM NTE_BAD_KEYSET_PARAM}
+
+//
+// MessageId: NTE_FAIL
+//
+// MessageText:
+//
+// An internal error occurred.
+//
+ NTE_FAIL = HRESULT($80090020);
+ {$EXTERNALSYM NTE_FAIL}
+
+//
+// MessageId: NTE_SYS_ERR
+//
+// MessageText:
+//
+// A base error occurred.
+//
+ NTE_SYS_ERR = HRESULT($80090021);
+ {$EXTERNALSYM NTE_SYS_ERR}
+
+//
+// MessageId: NTE_SILENT_CONTEXT
+//
+// MessageText:
+//
+// Provider could not perform the action since the context was acquired as silent.
+//
+ NTE_SILENT_CONTEXT = HRESULT($80090022);
+ {$EXTERNALSYM NTE_SILENT_CONTEXT}
+
+//
+// MessageId: NTE_TOKEN_KEYSET_STORAGE_FULL
+//
+// MessageText:
+//
+// The security token does not have storage space available for an additional container.
+//
+ NTE_TOKEN_KEYSET_STORAGE_FULL = HRESULT($80090023);
+ {$EXTERNALSYM NTE_TOKEN_KEYSET_STORAGE_FULL}
+
+//
+// MessageId: NTE_TEMPORARY_PROFILE
+//
+// MessageText:
+//
+// The profile for the user is a temporary profile.
+//
+ NTE_TEMPORARY_PROFILE = HRESULT($80090024);
+ {$EXTERNALSYM NTE_TEMPORARY_PROFILE}
+
+//
+// MessageId: NTE_FIXEDPARAMETER
+//
+// MessageText:
+//
+// The key parameters could not be set because the CSP uses fixed parameters.
+//
+ NTE_FIXEDPARAMETER = HRESULT($80090025);
+ {$EXTERNALSYM NTE_FIXEDPARAMETER}
+
+//
+// MessageId: SEC_E_INSUFFICIENT_MEMORY
+//
+// MessageText:
+//
+// Not enough memory is available to complete this request
+//
+ SEC_E_INSUFFICIENT_MEMORY = HRESULT($80090300);
+ {$EXTERNALSYM SEC_E_INSUFFICIENT_MEMORY}
+
+//
+// MessageId: SEC_E_INVALID_HANDLE
+//
+// MessageText:
+//
+// The handle specified is invalid
+//
+ SEC_E_INVALID_HANDLE = HRESULT($80090301);
+ {$EXTERNALSYM SEC_E_INVALID_HANDLE}
+
+//
+// MessageId: SEC_E_UNSUPPORTED_FUNCTION
+//
+// MessageText:
+//
+// The function requested is not supported
+//
+ SEC_E_UNSUPPORTED_FUNCTION = HRESULT($80090302);
+ {$EXTERNALSYM SEC_E_UNSUPPORTED_FUNCTION}
+
+//
+// MessageId: SEC_E_TARGET_UNKNOWN
+//
+// MessageText:
+//
+// The specified target is unknown or unreachable
+//
+ SEC_E_TARGET_UNKNOWN = HRESULT($80090303);
+ {$EXTERNALSYM SEC_E_TARGET_UNKNOWN}
+
+//
+// MessageId: SEC_E_INTERNAL_ERROR
+//
+// MessageText:
+//
+// The Local Security Authority cannot be contacted
+//
+ SEC_E_INTERNAL_ERROR = HRESULT($80090304);
+ {$EXTERNALSYM SEC_E_INTERNAL_ERROR}
+
+//
+// MessageId: SEC_E_SECPKG_NOT_FOUND
+//
+// MessageText:
+//
+// The requested security package does not exist
+//
+ SEC_E_SECPKG_NOT_FOUND = HRESULT($80090305);
+ {$EXTERNALSYM SEC_E_SECPKG_NOT_FOUND}
+
+//
+// MessageId: SEC_E_NOT_OWNER
+//
+// MessageText:
+//
+// The caller is not the owner of the desired credentials
+//
+ SEC_E_NOT_OWNER = HRESULT($80090306);
+ {$EXTERNALSYM SEC_E_NOT_OWNER}
+
+//
+// MessageId: SEC_E_CANNOT_INSTALL
+//
+// MessageText:
+//
+// The security package failed to initialize, and cannot be installed
+//
+ SEC_E_CANNOT_INSTALL = HRESULT($80090307);
+ {$EXTERNALSYM SEC_E_CANNOT_INSTALL}
+
+//
+// MessageId: SEC_E_INVALID_TOKEN
+//
+// MessageText:
+//
+// The token supplied to the function is invalid
+//
+ SEC_E_INVALID_TOKEN = HRESULT($80090308);
+ {$EXTERNALSYM SEC_E_INVALID_TOKEN}
+
+//
+// MessageId: SEC_E_CANNOT_PACK
+//
+// MessageText:
+//
+// The security package is not able to marshall the logon buffer, so the logon attempt has failed
+//
+ SEC_E_CANNOT_PACK = HRESULT($80090309);
+ {$EXTERNALSYM SEC_E_CANNOT_PACK}
+
+//
+// MessageId: SEC_E_QOP_NOT_SUPPORTED
+//
+// MessageText:
+//
+// The per-message Quality of Protection is not supported by the security package
+//
+ SEC_E_QOP_NOT_SUPPORTED = HRESULT($8009030A);
+ {$EXTERNALSYM SEC_E_QOP_NOT_SUPPORTED}
+
+//
+// MessageId: SEC_E_NO_IMPERSONATION
+//
+// MessageText:
+//
+// The security context does not allow impersonation of the client
+//
+ SEC_E_NO_IMPERSONATION = HRESULT($8009030B);
+ {$EXTERNALSYM SEC_E_NO_IMPERSONATION}
+
+//
+// MessageId: SEC_E_LOGON_DENIED
+//
+// MessageText:
+//
+// The logon attempt failed
+//
+ SEC_E_LOGON_DENIED = HRESULT($8009030C);
+ {$EXTERNALSYM SEC_E_LOGON_DENIED}
+
+//
+// MessageId: SEC_E_UNKNOWN_CREDENTIALS
+//
+// MessageText:
+//
+// The credentials supplied to the package were not recognized
+//
+ SEC_E_UNKNOWN_CREDENTIALS = HRESULT($8009030D);
+ {$EXTERNALSYM SEC_E_UNKNOWN_CREDENTIALS}
+
+//
+// MessageId: SEC_E_NO_CREDENTIALS
+//
+// MessageText:
+//
+// No credentials are available in the security package
+//
+ SEC_E_NO_CREDENTIALS = HRESULT($8009030E);
+ {$EXTERNALSYM SEC_E_NO_CREDENTIALS}
+
+//
+// MessageId: SEC_E_MESSAGE_ALTERED
+//
+// MessageText:
+//
+// The message or signature supplied for verification has been altered
+//
+ SEC_E_MESSAGE_ALTERED = HRESULT($8009030F);
+ {$EXTERNALSYM SEC_E_MESSAGE_ALTERED}
+
+//
+// MessageId: SEC_E_OUT_OF_SEQUENCE
+//
+// MessageText:
+//
+// The message supplied for verification is out of sequence
+//
+ SEC_E_OUT_OF_SEQUENCE = HRESULT($80090310);
+ {$EXTERNALSYM SEC_E_OUT_OF_SEQUENCE}
+
+//
+// MessageId: SEC_E_NO_AUTHENTICATING_AUTHORITY
+//
+// MessageText:
+//
+// No authority could be contacted for authentication.
+//
+ SEC_E_NO_AUTHENTICATING_AUTHORITY = HRESULT($80090311);
+ {$EXTERNALSYM SEC_E_NO_AUTHENTICATING_AUTHORITY}
+
+//
+// MessageId: SEC_I_CONTINUE_NEEDED
+//
+// MessageText:
+//
+// The function completed successfully, but must be called again to complete the context
+//
+ SEC_I_CONTINUE_NEEDED = HRESULT($00090312);
+ {$EXTERNALSYM SEC_I_CONTINUE_NEEDED}
+
+//
+// MessageId: SEC_I_COMPLETE_NEEDED
+//
+// MessageText:
+//
+// The function completed successfully, but CompleteToken must be called
+//
+ SEC_I_COMPLETE_NEEDED = HRESULT($00090313);
+ {$EXTERNALSYM SEC_I_COMPLETE_NEEDED}
+
+//
+// MessageId: SEC_I_COMPLETE_AND_CONTINUE
+//
+// MessageText:
+//
+// The function completed successfully, but both CompleteToken and this function must be called to complete the context
+//
+ SEC_I_COMPLETE_AND_CONTINUE = HRESULT($00090314);
+ {$EXTERNALSYM SEC_I_COMPLETE_AND_CONTINUE}
+
+//
+// MessageId: SEC_I_LOCAL_LOGON
+//
+// MessageText:
+//
+// The logon was completed, but no network authority was available. The logon was made using locally known information
+//
+ SEC_I_LOCAL_LOGON = HRESULT($00090315);
+ {$EXTERNALSYM SEC_I_LOCAL_LOGON}
+
+//
+// MessageId: SEC_E_BAD_PKGID
+//
+// MessageText:
+//
+// The requested security package does not exist
+//
+ SEC_E_BAD_PKGID = HRESULT($80090316);
+ {$EXTERNALSYM SEC_E_BAD_PKGID}
+
+//
+// MessageId: SEC_E_CONTEXT_EXPIRED
+//
+// MessageText:
+//
+// The context has expired and can no longer be used.
+//
+ SEC_E_CONTEXT_EXPIRED = HRESULT($80090317);
+ {$EXTERNALSYM SEC_E_CONTEXT_EXPIRED}
+
+//
+// MessageId: SEC_I_CONTEXT_EXPIRED
+//
+// MessageText:
+//
+// The context has expired and can no longer be used.
+//
+ SEC_I_CONTEXT_EXPIRED = HRESULT($00090317);
+ {$EXTERNALSYM SEC_I_CONTEXT_EXPIRED}
+
+//
+// MessageId: SEC_E_INCOMPLETE_MESSAGE
+//
+// MessageText:
+//
+// The supplied message is incomplete. The signature was not verified.
+//
+ SEC_E_INCOMPLETE_MESSAGE = HRESULT($80090318);
+ {$EXTERNALSYM SEC_E_INCOMPLETE_MESSAGE}
+
+//
+// MessageId: SEC_E_INCOMPLETE_CREDENTIALS
+//
+// MessageText:
+//
+// The credentials supplied were not complete, and could not be verified. The context could not be initialized.
+//
+ SEC_E_INCOMPLETE_CREDENTIALS = HRESULT($80090320);
+ {$EXTERNALSYM SEC_E_INCOMPLETE_CREDENTIALS}
+
+//
+// MessageId: SEC_E_BUFFER_TOO_SMALL
+//
+// MessageText:
+//
+// The buffers supplied to a function was too small.
+//
+ SEC_E_BUFFER_TOO_SMALL = HRESULT($80090321);
+ {$EXTERNALSYM SEC_E_BUFFER_TOO_SMALL}
+
+//
+// MessageId: SEC_I_INCOMPLETE_CREDENTIALS
+//
+// MessageText:
+//
+// The credentials supplied were not complete, and could not be verified. Additional information can be returned from the context.
+//
+ SEC_I_INCOMPLETE_CREDENTIALS = HRESULT($00090320);
+ {$EXTERNALSYM SEC_I_INCOMPLETE_CREDENTIALS}
+
+//
+// MessageId: SEC_I_RENEGOTIATE
+//
+// MessageText:
+//
+// The context data must be renegotiated with the peer.
+//
+ SEC_I_RENEGOTIATE = HRESULT($00090321);
+ {$EXTERNALSYM SEC_I_RENEGOTIATE}
+
+//
+// MessageId: SEC_E_WRONG_PRINCIPAL
+//
+// MessageText:
+//
+// The target principal name is incorrect.
+//
+ SEC_E_WRONG_PRINCIPAL = HRESULT($80090322);
+ {$EXTERNALSYM SEC_E_WRONG_PRINCIPAL}
+
+//
+// MessageId: SEC_I_NO_LSA_CONTEXT
+//
+// MessageText:
+//
+// There is no LSA mode context associated with this context.
+//
+ SEC_I_NO_LSA_CONTEXT = HRESULT($00090323);
+ {$EXTERNALSYM SEC_I_NO_LSA_CONTEXT}
+
+//
+// MessageId: SEC_E_TIME_SKEW
+//
+// MessageText:
+//
+// The clocks on the client and server machines are skewed.
+//
+ SEC_E_TIME_SKEW = HRESULT($80090324);
+ {$EXTERNALSYM SEC_E_TIME_SKEW}
+
+//
+// MessageId: SEC_E_UNTRUSTED_ROOT
+//
+// MessageText:
+//
+// The certificate chain was issued by an authority that is not trusted.
+//
+ SEC_E_UNTRUSTED_ROOT = HRESULT($80090325);
+ {$EXTERNALSYM SEC_E_UNTRUSTED_ROOT}
+
+//
+// MessageId: SEC_E_ILLEGAL_MESSAGE
+//
+// MessageText:
+//
+// The message received was unexpected or badly formatted.
+//
+ SEC_E_ILLEGAL_MESSAGE = HRESULT($80090326);
+ {$EXTERNALSYM SEC_E_ILLEGAL_MESSAGE}
+
+//
+// MessageId: SEC_E_CERT_UNKNOWN
+//
+// MessageText:
+//
+// An unknown error occurred while processing the certificate.
+//
+ SEC_E_CERT_UNKNOWN = HRESULT($80090327);
+ {$EXTERNALSYM SEC_E_CERT_UNKNOWN}
+
+//
+// MessageId: SEC_E_CERT_EXPIRED
+//
+// MessageText:
+//
+// The received certificate has expired.
+//
+ SEC_E_CERT_EXPIRED = HRESULT($80090328);
+ {$EXTERNALSYM SEC_E_CERT_EXPIRED}
+
+//
+// MessageId: SEC_E_ENCRYPT_FAILURE
+//
+// MessageText:
+//
+// The specified data could not be encrypted.
+//
+ SEC_E_ENCRYPT_FAILURE = HRESULT($80090329);
+ {$EXTERNALSYM SEC_E_ENCRYPT_FAILURE}
+
+//
+// MessageId: SEC_E_DECRYPT_FAILURE
+//
+// MessageText:
+//
+// The specified data could not be decrypted.
+//
+//
+ SEC_E_DECRYPT_FAILURE = HRESULT($80090330);
+ {$EXTERNALSYM SEC_E_DECRYPT_FAILURE}
+
+//
+// MessageId: SEC_E_ALGORITHM_MISMATCH
+//
+// MessageText:
+//
+// The client and server cannot communicate, because they do not possess a common algorithm.
+//
+ SEC_E_ALGORITHM_MISMATCH = HRESULT($80090331);
+ {$EXTERNALSYM SEC_E_ALGORITHM_MISMATCH}
+
+//
+// MessageId: SEC_E_SECURITY_QOS_FAILED
+//
+// MessageText:
+//
+// The security context could not be established due to a failure in the requested quality of service (e.g. mutual authentication or delegation).
+//
+ SEC_E_SECURITY_QOS_FAILED = HRESULT($80090332);
+ {$EXTERNALSYM SEC_E_SECURITY_QOS_FAILED}
+
+//
+// MessageId: SEC_E_UNFINISHED_CONTEXT_DELETED
+//
+// MessageText:
+//
+// A security context was deleted before the context was completed. This is considered a logon failure.
+//
+ SEC_E_UNFINISHED_CONTEXT_DELETED = HRESULT($80090333);
+ {$EXTERNALSYM SEC_E_UNFINISHED_CONTEXT_DELETED}
+
+//
+// MessageId: SEC_E_NO_TGT_REPLY
+//
+// MessageText:
+//
+// The client is trying to negotiate a context and the server requires user-to-user but didn't send a TGT reply.
+//
+ SEC_E_NO_TGT_REPLY = HRESULT($80090334);
+ {$EXTERNALSYM SEC_E_NO_TGT_REPLY}
+
+//
+// MessageId: SEC_E_NO_IP_ADDRESSES
+//
+// MessageText:
+//
+// Unable to accomplish the requested task because the local machine does not have any IP addresses.
+//
+ SEC_E_NO_IP_ADDRESSES = HRESULT($80090335);
+ {$EXTERNALSYM SEC_E_NO_IP_ADDRESSES}
+
+//
+// MessageId: SEC_E_WRONG_CREDENTIAL_HANDLE
+//
+// MessageText:
+//
+// The supplied credential handle does not match the credential associated with the security context.
+//
+ SEC_E_WRONG_CREDENTIAL_HANDLE = HRESULT($80090336);
+ {$EXTERNALSYM SEC_E_WRONG_CREDENTIAL_HANDLE}
+
+//
+// MessageId: SEC_E_CRYPTO_SYSTEM_INVALID
+//
+// MessageText:
+//
+// The crypto system or checksum function is invalid because a required function is unavailable.
+//
+ SEC_E_CRYPTO_SYSTEM_INVALID = HRESULT($80090337);
+ {$EXTERNALSYM SEC_E_CRYPTO_SYSTEM_INVALID}
+
+//
+// MessageId: SEC_E_MAX_REFERRALS_EXCEEDED
+//
+// MessageText:
+//
+// The number of maximum ticket referrals has been exceeded.
+//
+ SEC_E_MAX_REFERRALS_EXCEEDED = HRESULT($80090338);
+ {$EXTERNALSYM SEC_E_MAX_REFERRALS_EXCEEDED}
+
+//
+// MessageId: SEC_E_MUST_BE_KDC
+//
+// MessageText:
+//
+// The local machine must be a Kerberos KDC (domain controller) and it is not.
+//
+ SEC_E_MUST_BE_KDC = HRESULT($80090339);
+ {$EXTERNALSYM SEC_E_MUST_BE_KDC}
+
+//
+// MessageId: SEC_E_STRONG_CRYPTO_NOT_SUPPORTED
+//
+// MessageText:
+//
+// The other end of the security negotiation is requires strong crypto but it is not supported on the local machine.
+//
+ SEC_E_STRONG_CRYPTO_NOT_SUPPORTED = HRESULT($8009033A);
+ {$EXTERNALSYM SEC_E_STRONG_CRYPTO_NOT_SUPPORTED}
+
+//
+// MessageId: SEC_E_TOO_MANY_PRINCIPALS
+//
+// MessageText:
+//
+// The KDC reply contained more than one principal name.
+//
+ SEC_E_TOO_MANY_PRINCIPALS = HRESULT($8009033B);
+ {$EXTERNALSYM SEC_E_TOO_MANY_PRINCIPALS}
+
+//
+// MessageId: SEC_E_NO_PA_DATA
+//
+// MessageText:
+//
+// Expected to find PA data for a hint of what etype to use, but it was not found.
+//
+ SEC_E_NO_PA_DATA = HRESULT($8009033C);
+ {$EXTERNALSYM SEC_E_NO_PA_DATA}
+
+//
+// MessageId: SEC_E_PKINIT_NAME_MISMATCH
+//
+// MessageText:
+//
+// The client certificate does not contain a valid UPN, or does not match the client name
+// in the logon request. Please contact your administrator.
+//
+ SEC_E_PKINIT_NAME_MISMATCH = HRESULT($8009033D);
+ {$EXTERNALSYM SEC_E_PKINIT_NAME_MISMATCH}
+
+//
+// MessageId: SEC_E_SMARTCARD_LOGON_REQUIRED
+//
+// MessageText:
+//
+// Smartcard logon is required and was not used.
+//
+ SEC_E_SMARTCARD_LOGON_REQUIRED = HRESULT($8009033E);
+ {$EXTERNALSYM SEC_E_SMARTCARD_LOGON_REQUIRED}
+
+//
+// MessageId: SEC_E_SHUTDOWN_IN_PROGRESS
+//
+// MessageText:
+//
+// A system shutdown is in progress.
+//
+ SEC_E_SHUTDOWN_IN_PROGRESS = HRESULT($8009033F);
+ {$EXTERNALSYM SEC_E_SHUTDOWN_IN_PROGRESS}
+
+//
+// MessageId: SEC_E_KDC_INVALID_REQUEST
+//
+// MessageText:
+//
+// An invalid request was sent to the KDC.
+//
+ SEC_E_KDC_INVALID_REQUEST = HRESULT($80090340);
+ {$EXTERNALSYM SEC_E_KDC_INVALID_REQUEST}
+
+//
+// MessageId: SEC_E_KDC_UNABLE_TO_REFER
+//
+// MessageText:
+//
+// The KDC was unable to generate a referral for the service requested.
+//
+ SEC_E_KDC_UNABLE_TO_REFER = HRESULT($80090341);
+ {$EXTERNALSYM SEC_E_KDC_UNABLE_TO_REFER}
+
+//
+// MessageId: SEC_E_KDC_UNKNOWN_ETYPE
+//
+// MessageText:
+//
+// The encryption type requested is not supported by the KDC.
+//
+ SEC_E_KDC_UNKNOWN_ETYPE = HRESULT($80090342);
+ {$EXTERNALSYM SEC_E_KDC_UNKNOWN_ETYPE}
+
+//
+// MessageId: SEC_E_UNSUPPORTED_PREAUTH
+//
+// MessageText:
+//
+// An unsupported preauthentication mechanism was presented to the kerberos package.
+//
+ SEC_E_UNSUPPORTED_PREAUTH = HRESULT($80090343);
+ {$EXTERNALSYM SEC_E_UNSUPPORTED_PREAUTH}
+
+//
+// MessageId: SEC_E_DELEGATION_REQUIRED
+//
+// MessageText:
+//
+// The requested operation requires delegation to be enabled on the machine.
+//
+ SEC_E_DELEGATION_REQUIRED = HRESULT($80090345);
+ {$EXTERNALSYM SEC_E_DELEGATION_REQUIRED}
+
+//
+// MessageId: SEC_E_BAD_BINDINGS
+//
+// MessageText:
+//
+// Client's supplied SSPI channel bindings were incorrect.
+//
+ SEC_E_BAD_BINDINGS = HRESULT($80090346);
+ {$EXTERNALSYM SEC_E_BAD_BINDINGS}
+
+//
+// MessageId: SEC_E_MULTIPLE_ACCOUNTS
+//
+// MessageText:
+//
+// The received certificate was mapped to multiple accounts.
+//
+ SEC_E_MULTIPLE_ACCOUNTS = HRESULT($80090347);
+ {$EXTERNALSYM SEC_E_MULTIPLE_ACCOUNTS}
+
+//
+// MessageId: SEC_E_NO_KERB_KEY
+//
+// MessageText:
+//
+// SEC_E_NO_KERB_KEY
+//
+ SEC_E_NO_KERB_KEY = HRESULT($80090348);
+ {$EXTERNALSYM SEC_E_NO_KERB_KEY}
+
+//
+// MessageId: SEC_E_CERT_WRONG_USAGE
+//
+// MessageText:
+//
+// The certificate is not valid for the requested usage.
+//
+ SEC_E_CERT_WRONG_USAGE = HRESULT($80090349);
+ {$EXTERNALSYM SEC_E_CERT_WRONG_USAGE}
+
+//
+// MessageId: SEC_E_DOWNGRADE_DETECTED
+//
+// MessageText:
+//
+// The system detected a possible attempt to compromise security. Please ensure that you can contact the server that authenticated you.
+//
+ SEC_E_DOWNGRADE_DETECTED = HRESULT($80090350);
+ {$EXTERNALSYM SEC_E_DOWNGRADE_DETECTED}
+
+//
+// MessageId: SEC_E_SMARTCARD_CERT_REVOKED
+//
+// MessageText:
+//
+// The smartcard certificate used for authentication has been revoked.
+// Please contact your system administrator. There may be additional information in the
+// event log.
+//
+ SEC_E_SMARTCARD_CERT_REVOKED = HRESULT($80090351);
+ {$EXTERNALSYM SEC_E_SMARTCARD_CERT_REVOKED}
+
+//
+// MessageId: SEC_E_ISSUING_CA_UNTRUSTED
+//
+// MessageText:
+//
+// An untrusted certificate authority was detected While processing the
+// smartcard certificate used for authentication. Please contact your system
+// administrator.
+//
+ SEC_E_ISSUING_CA_UNTRUSTED = HRESULT($80090352);
+ {$EXTERNALSYM SEC_E_ISSUING_CA_UNTRUSTED}
+
+//
+// MessageId: SEC_E_REVOCATION_OFFLINE_C
+//
+// MessageText:
+//
+// The revocation status of the smartcard certificate used for
+// authentication could not be determined. Please contact your system administrator.
+//
+ SEC_E_REVOCATION_OFFLINE_C = HRESULT($80090353);
+ {$EXTERNALSYM SEC_E_REVOCATION_OFFLINE_C}
+
+//
+// MessageId: SEC_E_PKINIT_CLIENT_FAILURE
+//
+// MessageText:
+//
+// The smartcard certificate used for authentication was not trusted. Please
+// contact your system administrator.
+//
+ SEC_E_PKINIT_CLIENT_FAILURE = HRESULT($80090354);
+ {$EXTERNALSYM SEC_E_PKINIT_CLIENT_FAILURE}
+
+//
+// MessageId: SEC_E_SMARTCARD_CERT_EXPIRED
+//
+// MessageText:
+//
+// The smartcard certificate used for authentication has expired. Please
+// contact your system administrator.
+//
+ SEC_E_SMARTCARD_CERT_EXPIRED = HRESULT($80090355);
+ {$EXTERNALSYM SEC_E_SMARTCARD_CERT_EXPIRED}
+
+//
+// MessageId: SEC_E_NO_S4U_PROT_SUPPORT
+//
+// MessageText:
+//
+// The Kerberos subsystem encountered an error. A service for user protocol request was made
+// against a domain controller which does not support service for user.
+//
+ SEC_E_NO_S4U_PROT_SUPPORT = HRESULT($80090356);
+ {$EXTERNALSYM SEC_E_NO_S4U_PROT_SUPPORT}
+
+//
+// MessageId: SEC_E_CROSSREALM_DELEGATION_FAILURE
+//
+// MessageText:
+//
+// An attempt was made by this server to make a Kerberos constrained delegation request for a target
+// outside of the server's realm. This is not supported, and indicates a misconfiguration on this
+// server's allowed to delegate to list. Please contact your administrator.
+//
+ SEC_E_CROSSREALM_DELEGATION_FAILURE = HRESULT($80090357);
+ {$EXTERNALSYM SEC_E_CROSSREALM_DELEGATION_FAILURE}
+
+//
+// MessageId: SEC_E_REVOCATION_OFFLINE_KDC
+//
+// MessageText:
+//
+// The revocation status of the domain controller certificate used for smartcard
+// authentication could not be determined. There is additional information in the system event
+// log. Please contact your system administrator.
+//
+ SEC_E_REVOCATION_OFFLINE_KDC = HRESULT($80090358);
+ {$EXTERNALSYM SEC_E_REVOCATION_OFFLINE_KDC}
+
+//
+// MessageId: SEC_E_ISSUING_CA_UNTRUSTED_KDC
+//
+// MessageText:
+//
+// An untrusted certificate authority was detected while processing the
+// domain controller certificate used for authentication. There is additional information in
+// the system event log. Please contact your system administrator.
+//
+ SEC_E_ISSUING_CA_UNTRUSTED_KDC = HRESULT($80090359);
+ {$EXTERNALSYM SEC_E_ISSUING_CA_UNTRUSTED_KDC}
+
+//
+// MessageId: SEC_E_KDC_CERT_EXPIRED
+//
+// MessageText:
+//
+// The domain controller certificate used for smartcard logon has expired.
+// Please contact your system administrator with the contents of your system event log.
+//
+ SEC_E_KDC_CERT_EXPIRED = HRESULT($8009035A);
+ {$EXTERNALSYM SEC_E_KDC_CERT_EXPIRED}
+
+//
+// MessageId: SEC_E_KDC_CERT_REVOKED
+//
+// MessageText:
+//
+// The domain controller certificate used for smartcard logon has been revoked.
+// Please contact your system administrator with the contents of your system event log.
+//
+ SEC_E_KDC_CERT_REVOKED = HRESULT($8009035B);
+ {$EXTERNALSYM SEC_E_KDC_CERT_REVOKED}
+
+//
+// Provided for backwards compatibility
+//
+
+ SEC_E_NO_SPM = SEC_E_INTERNAL_ERROR;
+ {$EXTERNALSYM SEC_E_NO_SPM}
+ SEC_E_NOT_SUPPORTED = SEC_E_UNSUPPORTED_FUNCTION;
+ {$EXTERNALSYM SEC_E_NOT_SUPPORTED}
+
+//
+// MessageId: CRYPT_E_MSG_ERROR
+//
+// MessageText:
+//
+// An error occurred while performing an operation on a cryptographic message.
+//
+ CRYPT_E_MSG_ERROR = HRESULT($80091001);
+ {$EXTERNALSYM CRYPT_E_MSG_ERROR}
+
+//
+// MessageId: CRYPT_E_UNKNOWN_ALGO
+//
+// MessageText:
+//
+// Unknown cryptographic algorithm.
+//
+ CRYPT_E_UNKNOWN_ALGO = HRESULT($80091002);
+ {$EXTERNALSYM CRYPT_E_UNKNOWN_ALGO}
+
+//
+// MessageId: CRYPT_E_OID_FORMAT
+//
+// MessageText:
+//
+// The object identifier is poorly formatted.
+//
+ CRYPT_E_OID_FORMAT = HRESULT($80091003);
+ {$EXTERNALSYM CRYPT_E_OID_FORMAT}
+
+//
+// MessageId: CRYPT_E_INVALID_MSG_TYPE
+//
+// MessageText:
+//
+// Invalid cryptographic message type.
+//
+ CRYPT_E_INVALID_MSG_TYPE = HRESULT($80091004);
+ {$EXTERNALSYM CRYPT_E_INVALID_MSG_TYPE}
+
+//
+// MessageId: CRYPT_E_UNEXPECTED_ENCODING
+//
+// MessageText:
+//
+// Unexpected cryptographic message encoding.
+//
+ CRYPT_E_UNEXPECTED_ENCODING = HRESULT($80091005);
+ {$EXTERNALSYM CRYPT_E_UNEXPECTED_ENCODING}
+
+//
+// MessageId: CRYPT_E_AUTH_ATTR_MISSING
+//
+// MessageText:
+//
+// The cryptographic message does not contain an expected authenticated attribute.
+//
+ CRYPT_E_AUTH_ATTR_MISSING = HRESULT($80091006);
+ {$EXTERNALSYM CRYPT_E_AUTH_ATTR_MISSING}
+
+//
+// MessageId: CRYPT_E_HASH_VALUE
+//
+// MessageText:
+//
+// The hash value is not correct.
+//
+ CRYPT_E_HASH_VALUE = HRESULT($80091007);
+ {$EXTERNALSYM CRYPT_E_HASH_VALUE}
+
+//
+// MessageId: CRYPT_E_INVALID_INDEX
+//
+// MessageText:
+//
+// The index value is not valid.
+//
+ CRYPT_E_INVALID_INDEX = HRESULT($80091008);
+ {$EXTERNALSYM CRYPT_E_INVALID_INDEX}
+
+//
+// MessageId: CRYPT_E_ALREADY_DECRYPTED
+//
+// MessageText:
+//
+// The content of the cryptographic message has already been decrypted.
+//
+ CRYPT_E_ALREADY_DECRYPTED = HRESULT($80091009);
+ {$EXTERNALSYM CRYPT_E_ALREADY_DECRYPTED}
+
+//
+// MessageId: CRYPT_E_NOT_DECRYPTED
+//
+// MessageText:
+//
+// The content of the cryptographic message has not been decrypted yet.
+//
+ CRYPT_E_NOT_DECRYPTED = HRESULT($8009100A);
+ {$EXTERNALSYM CRYPT_E_NOT_DECRYPTED}
+
+//
+// MessageId: CRYPT_E_RECIPIENT_NOT_FOUND
+//
+// MessageText:
+//
+// The enveloped-data message does not contain the specified recipient.
+//
+ CRYPT_E_RECIPIENT_NOT_FOUND = HRESULT($8009100B);
+ {$EXTERNALSYM CRYPT_E_RECIPIENT_NOT_FOUND}
+
+//
+// MessageId: CRYPT_E_CONTROL_TYPE
+//
+// MessageText:
+//
+// Invalid control type.
+//
+ CRYPT_E_CONTROL_TYPE = HRESULT($8009100C);
+ {$EXTERNALSYM CRYPT_E_CONTROL_TYPE}
+
+//
+// MessageId: CRYPT_E_ISSUER_SERIALNUMBER
+//
+// MessageText:
+//
+// Invalid issuer and/or serial number.
+//
+ CRYPT_E_ISSUER_SERIALNUMBER = HRESULT($8009100D);
+ {$EXTERNALSYM CRYPT_E_ISSUER_SERIALNUMBER}
+
+//
+// MessageId: CRYPT_E_SIGNER_NOT_FOUND
+//
+// MessageText:
+//
+// Cannot find the original signer.
+//
+ CRYPT_E_SIGNER_NOT_FOUND = HRESULT($8009100E);
+ {$EXTERNALSYM CRYPT_E_SIGNER_NOT_FOUND}
+
+//
+// MessageId: CRYPT_E_ATTRIBUTES_MISSING
+//
+// MessageText:
+//
+// The cryptographic message does not contain all of the requested attributes.
+//
+ CRYPT_E_ATTRIBUTES_MISSING = HRESULT($8009100F);
+ {$EXTERNALSYM CRYPT_E_ATTRIBUTES_MISSING}
+
+//
+// MessageId: CRYPT_E_STREAM_MSG_NOT_READY
+//
+// MessageText:
+//
+// The streamed cryptographic message is not ready to return data.
+//
+ CRYPT_E_STREAM_MSG_NOT_READY = HRESULT($80091010);
+ {$EXTERNALSYM CRYPT_E_STREAM_MSG_NOT_READY}
+
+//
+// MessageId: CRYPT_E_STREAM_INSUFFICIENT_DATA
+//
+// MessageText:
+//
+// The streamed cryptographic message requires more data to complete the decode operation.
+//
+ CRYPT_E_STREAM_INSUFFICIENT_DATA = HRESULT($80091011);
+ {$EXTERNALSYM CRYPT_E_STREAM_INSUFFICIENT_DATA}
+
+//
+// MessageId: CRYPT_I_NEW_PROTECTION_REQUIRED
+//
+// MessageText:
+//
+// The protected data needs to be re-protected.
+//
+ CRYPT_I_NEW_PROTECTION_REQUIRED = HRESULT($00091012);
+ {$EXTERNALSYM CRYPT_I_NEW_PROTECTION_REQUIRED}
+
+//
+// MessageId: CRYPT_E_BAD_LEN
+//
+// MessageText:
+//
+// The length specified for the output data was insufficient.
+//
+ CRYPT_E_BAD_LEN = HRESULT($80092001);
+ {$EXTERNALSYM CRYPT_E_BAD_LEN}
+
+//
+// MessageId: CRYPT_E_BAD_ENCODE
+//
+// MessageText:
+//
+// An error occurred during encode or decode operation.
+//
+ CRYPT_E_BAD_ENCODE = HRESULT($80092002);
+ {$EXTERNALSYM CRYPT_E_BAD_ENCODE}
+
+//
+// MessageId: CRYPT_E_FILE_ERROR
+//
+// MessageText:
+//
+// An error occurred while reading or writing to a file.
+//
+ CRYPT_E_FILE_ERROR = HRESULT($80092003);
+ {$EXTERNALSYM CRYPT_E_FILE_ERROR}
+
+//
+// MessageId: CRYPT_E_NOT_FOUND
+//
+// MessageText:
+//
+// Cannot find object or property.
+//
+ CRYPT_E_NOT_FOUND = HRESULT($80092004);
+ {$EXTERNALSYM CRYPT_E_NOT_FOUND}
+
+//
+// MessageId: CRYPT_E_EXISTS
+//
+// MessageText:
+//
+// The object or property already exists.
+//
+ CRYPT_E_EXISTS = HRESULT($80092005);
+ {$EXTERNALSYM CRYPT_E_EXISTS}
+
+//
+// MessageId: CRYPT_E_NO_PROVIDER
+//
+// MessageText:
+//
+// No provider was specified for the store or object.
+//
+ CRYPT_E_NO_PROVIDER = HRESULT($80092006);
+ {$EXTERNALSYM CRYPT_E_NO_PROVIDER}
+
+//
+// MessageId: CRYPT_E_SELF_SIGNED
+//
+// MessageText:
+//
+// The specified certificate is self signed.
+//
+ CRYPT_E_SELF_SIGNED = HRESULT($80092007);
+ {$EXTERNALSYM CRYPT_E_SELF_SIGNED}
+
+//
+// MessageId: CRYPT_E_DELETED_PREV
+//
+// MessageText:
+//
+// The previous certificate or CRL context was deleted.
+//
+ CRYPT_E_DELETED_PREV = HRESULT($80092008);
+ {$EXTERNALSYM CRYPT_E_DELETED_PREV}
+
+//
+// MessageId: CRYPT_E_NO_MATCH
+//
+// MessageText:
+//
+// Cannot find the requested object.
+//
+ CRYPT_E_NO_MATCH = HRESULT($80092009);
+ {$EXTERNALSYM CRYPT_E_NO_MATCH}
+
+//
+// MessageId: CRYPT_E_UNEXPECTED_MSG_TYPE
+//
+// MessageText:
+//
+// The certificate does not have a property that references a private key.
+//
+ CRYPT_E_UNEXPECTED_MSG_TYPE = HRESULT($8009200A);
+ {$EXTERNALSYM CRYPT_E_UNEXPECTED_MSG_TYPE}
+
+//
+// MessageId: CRYPT_E_NO_KEY_PROPERTY
+//
+// MessageText:
+//
+// Cannot find the certificate and private key for decryption.
+//
+ CRYPT_E_NO_KEY_PROPERTY = HRESULT($8009200B);
+ {$EXTERNALSYM CRYPT_E_NO_KEY_PROPERTY}
+
+//
+// MessageId: CRYPT_E_NO_DECRYPT_CERT
+//
+// MessageText:
+//
+// Cannot find the certificate and private key to use for decryption.
+//
+ CRYPT_E_NO_DECRYPT_CERT = HRESULT($8009200C);
+ {$EXTERNALSYM CRYPT_E_NO_DECRYPT_CERT}
+
+//
+// MessageId: CRYPT_E_BAD_MSG
+//
+// MessageText:
+//
+// Not a cryptographic message or the cryptographic message is not formatted correctly.
+//
+ CRYPT_E_BAD_MSG = HRESULT($8009200D);
+ {$EXTERNALSYM CRYPT_E_BAD_MSG}
+
+//
+// MessageId: CRYPT_E_NO_SIGNER
+//
+// MessageText:
+//
+// The signed cryptographic message does not have a signer for the specified signer index.
+//
+ CRYPT_E_NO_SIGNER = HRESULT($8009200E);
+ {$EXTERNALSYM CRYPT_E_NO_SIGNER}
+
+//
+// MessageId: CRYPT_E_PENDING_CLOSE
+//
+// MessageText:
+//
+// Final closure is pending until additional frees or closes.
+//
+ CRYPT_E_PENDING_CLOSE = HRESULT($8009200F);
+ {$EXTERNALSYM CRYPT_E_PENDING_CLOSE}
+
+//
+// MessageId: CRYPT_E_REVOKED
+//
+// MessageText:
+//
+// The certificate is revoked.
+//
+ CRYPT_E_REVOKED = HRESULT($80092010);
+ {$EXTERNALSYM CRYPT_E_REVOKED}
+
+//
+// MessageId: CRYPT_E_NO_REVOCATION_DLL
+//
+// MessageText:
+//
+// No Dll or exported function was found to verify revocation.
+//
+ CRYPT_E_NO_REVOCATION_DLL = HRESULT($80092011);
+ {$EXTERNALSYM CRYPT_E_NO_REVOCATION_DLL}
+
+//
+// MessageId: CRYPT_E_NO_REVOCATION_CHECK
+//
+// MessageText:
+//
+// The revocation function was unable to check revocation for the certificate.
+//
+ CRYPT_E_NO_REVOCATION_CHECK = HRESULT($80092012);
+ {$EXTERNALSYM CRYPT_E_NO_REVOCATION_CHECK}
+
+//
+// MessageId: CRYPT_E_REVOCATION_OFFLINE
+//
+// MessageText:
+//
+// The revocation function was unable to check revocation because the revocation server was offline.
+//
+ CRYPT_E_REVOCATION_OFFLINE = HRESULT($80092013);
+ {$EXTERNALSYM CRYPT_E_REVOCATION_OFFLINE}
+
+//
+// MessageId: CRYPT_E_NOT_IN_REVOCATION_DATABASE
+//
+// MessageText:
+//
+// The certificate is not in the revocation server's database.
+//
+ CRYPT_E_NOT_IN_REVOCATION_DATABASE = HRESULT($80092014);
+ {$EXTERNALSYM CRYPT_E_NOT_IN_REVOCATION_DATABASE}
+
+//
+// MessageId: CRYPT_E_INVALID_NUMERIC_STRING
+//
+// MessageText:
+//
+// The string contains a non-numeric character.
+//
+ CRYPT_E_INVALID_NUMERIC_STRING = HRESULT($80092020);
+ {$EXTERNALSYM CRYPT_E_INVALID_NUMERIC_STRING}
+
+//
+// MessageId: CRYPT_E_INVALID_PRINTABLE_STRING
+//
+// MessageText:
+//
+// The string contains a non-printable character.
+//
+ CRYPT_E_INVALID_PRINTABLE_STRING = HRESULT($80092021);
+ {$EXTERNALSYM CRYPT_E_INVALID_PRINTABLE_STRING}
+
+//
+// MessageId: CRYPT_E_INVALID_IA5_STRING
+//
+// MessageText:
+//
+// The string contains a character not in the 7 bit ASCII character set.
+//
+ CRYPT_E_INVALID_IA5_STRING = HRESULT($80092022);
+ {$EXTERNALSYM CRYPT_E_INVALID_IA5_STRING}
+
+//
+// MessageId: CRYPT_E_INVALID_X500_STRING
+//
+// MessageText:
+//
+// The string contains an invalid X500 name attribute key, oid, value or delimiter.
+//
+ CRYPT_E_INVALID_X500_STRING = HRESULT($80092023);
+ {$EXTERNALSYM CRYPT_E_INVALID_X500_STRING}
+
+//
+// MessageId: CRYPT_E_NOT_CHAR_STRING
+//
+// MessageText:
+//
+// The dwValueType for the CERT_NAME_VALUE is not one of the character strings. Most likely it is either a CERT_RDN_ENCODED_BLOB or CERT_TDN_OCTED_STRING.
+//
+ CRYPT_E_NOT_CHAR_STRING = HRESULT($80092024);
+ {$EXTERNALSYM CRYPT_E_NOT_CHAR_STRING}
+
+//
+// MessageId: CRYPT_E_FILERESIZED
+//
+// MessageText:
+//
+// The Put operation can not continue. The file needs to be resized. However, there is already a signature present. A complete signing operation must be done.
+//
+ CRYPT_E_FILERESIZED = HRESULT($80092025);
+ {$EXTERNALSYM CRYPT_E_FILERESIZED}
+
+//
+// MessageId: CRYPT_E_SECURITY_SETTINGS
+//
+// MessageText:
+//
+// The cryptographic operation failed due to a local security option setting.
+//
+ CRYPT_E_SECURITY_SETTINGS = HRESULT($80092026);
+ {$EXTERNALSYM CRYPT_E_SECURITY_SETTINGS}
+
+//
+// MessageId: CRYPT_E_NO_VERIFY_USAGE_DLL
+//
+// MessageText:
+//
+// No DLL or exported function was found to verify subject usage.
+//
+ CRYPT_E_NO_VERIFY_USAGE_DLL = HRESULT($80092027);
+ {$EXTERNALSYM CRYPT_E_NO_VERIFY_USAGE_DLL}
+
+//
+// MessageId: CRYPT_E_NO_VERIFY_USAGE_CHECK
+//
+// MessageText:
+//
+// The called function was unable to do a usage check on the subject.
+//
+ CRYPT_E_NO_VERIFY_USAGE_CHECK = HRESULT($80092028);
+ {$EXTERNALSYM CRYPT_E_NO_VERIFY_USAGE_CHECK}
+
+//
+// MessageId: CRYPT_E_VERIFY_USAGE_OFFLINE
+//
+// MessageText:
+//
+// Since the server was offline, the called function was unable to complete the usage check.
+//
+ CRYPT_E_VERIFY_USAGE_OFFLINE = HRESULT($80092029);
+ {$EXTERNALSYM CRYPT_E_VERIFY_USAGE_OFFLINE}
+
+//
+// MessageId: CRYPT_E_NOT_IN_CTL
+//
+// MessageText:
+//
+// The subject was not found in a Certificate Trust List (CTL).
+//
+ CRYPT_E_NOT_IN_CTL = HRESULT($8009202A);
+ {$EXTERNALSYM CRYPT_E_NOT_IN_CTL}
+
+//
+// MessageId: CRYPT_E_NO_TRUSTED_SIGNER
+//
+// MessageText:
+//
+// None of the signers of the cryptographic message or certificate trust list is trusted.
+//
+ CRYPT_E_NO_TRUSTED_SIGNER = HRESULT($8009202B);
+ {$EXTERNALSYM CRYPT_E_NO_TRUSTED_SIGNER}
+
+//
+// MessageId: CRYPT_E_MISSING_PUBKEY_PARA
+//
+// MessageText:
+//
+// The public key's algorithm parameters are missing.
+//
+ CRYPT_E_MISSING_PUBKEY_PARA = HRESULT($8009202C);
+ {$EXTERNALSYM CRYPT_E_MISSING_PUBKEY_PARA}
+
+//
+// MessageId: CRYPT_E_OSS_ERROR
+//
+// MessageText:
+//
+// OSS Certificate encode/decode error code base
+//
+// See asn1code.h for a definition of the OSS runtime errors. The OSS
+// error values are offset by CRYPT_E_OSS_ERROR.
+//
+ CRYPT_E_OSS_ERROR = HRESULT($80093000);
+ {$EXTERNALSYM CRYPT_E_OSS_ERROR}
+
+//
+// MessageId: OSS_MORE_BUF
+//
+// MessageText:
+//
+// OSS ASN.1 Error: Output Buffer is too small.
+//
+ OSS_MORE_BUF = HRESULT($80093001);
+ {$EXTERNALSYM OSS_MORE_BUF}
+
+//
+// MessageId: OSS_NEGATIVE_UINTEGER
+//
+// MessageText:
+//
+// OSS ASN.1 Error: Signed integer is encoded as a unsigned integer.
+//
+ OSS_NEGATIVE_UINTEGER = HRESULT($80093002);
+ {$EXTERNALSYM OSS_NEGATIVE_UINTEGER}
+
+//
+// MessageId: OSS_PDU_RANGE
+//
+// MessageText:
+//
+// OSS ASN.1 Error: Unknown ASN.1 data type.
+//
+ OSS_PDU_RANGE = HRESULT($80093003);
+ {$EXTERNALSYM OSS_PDU_RANGE}
+
+//
+// MessageId: OSS_MORE_INPUT
+//
+// MessageText:
+//
+// OSS ASN.1 Error: Output buffer is too small, the decoded data has been truncated.
+//
+ OSS_MORE_INPUT = HRESULT($80093004);
+ {$EXTERNALSYM OSS_MORE_INPUT}
+
+//
+// MessageId: OSS_DATA_ERROR
+//
+// MessageText:
+//
+// OSS ASN.1 Error: Invalid data.
+//
+ OSS_DATA_ERROR = HRESULT($80093005);
+ {$EXTERNALSYM OSS_DATA_ERROR}
+
+//
+// MessageId: OSS_BAD_ARG
+//
+// MessageText:
+//
+// OSS ASN.1 Error: Invalid argument.
+//
+ OSS_BAD_ARG = HRESULT($80093006);
+ {$EXTERNALSYM OSS_BAD_ARG}
+
+//
+// MessageId: OSS_BAD_VERSION
+//
+// MessageText:
+//
+// OSS ASN.1 Error: Encode/Decode version mismatch.
+//
+ OSS_BAD_VERSION = HRESULT($80093007);
+ {$EXTERNALSYM OSS_BAD_VERSION}
+
+//
+// MessageId: OSS_OUT_MEMORY
+//
+// MessageText:
+//
+// OSS ASN.1 Error: Out of memory.
+//
+ OSS_OUT_MEMORY = HRESULT($80093008);
+ {$EXTERNALSYM OSS_OUT_MEMORY}
+
+//
+// MessageId: OSS_PDU_MISMATCH
+//
+// MessageText:
+//
+// OSS ASN.1 Error: Encode/Decode Error.
+//
+ OSS_PDU_MISMATCH = HRESULT($80093009);
+ {$EXTERNALSYM OSS_PDU_MISMATCH}
+
+//
+// MessageId: OSS_LIMITED
+//
+// MessageText:
+//
+// OSS ASN.1 Error: Internal Error.
+//
+ OSS_LIMITED = HRESULT($8009300A);
+ {$EXTERNALSYM OSS_LIMITED}
+
+//
+// MessageId: OSS_BAD_PTR
+//
+// MessageText:
+//
+// OSS ASN.1 Error: Invalid data.
+//
+ OSS_BAD_PTR = HRESULT($8009300B);
+ {$EXTERNALSYM OSS_BAD_PTR}
+
+//
+// MessageId: OSS_BAD_TIME
+//
+// MessageText:
+//
+// OSS ASN.1 Error: Invalid data.
+//
+ OSS_BAD_TIME = HRESULT($8009300C);
+ {$EXTERNALSYM OSS_BAD_TIME}
+
+//
+// MessageId: OSS_INDEFINITE_NOT_SUPPORTED
+//
+// MessageText:
+//
+// OSS ASN.1 Error: Unsupported BER indefinite-length encoding.
+//
+ OSS_INDEFINITE_NOT_SUPPORTED = HRESULT($8009300D);
+ {$EXTERNALSYM OSS_INDEFINITE_NOT_SUPPORTED}
+
+//
+// MessageId: OSS_MEM_ERROR
+//
+// MessageText:
+//
+// OSS ASN.1 Error: Access violation.
+//
+ OSS_MEM_ERROR = HRESULT($8009300E);
+ {$EXTERNALSYM OSS_MEM_ERROR}
+
+//
+// MessageId: OSS_BAD_TABLE
+//
+// MessageText:
+//
+// OSS ASN.1 Error: Invalid data.
+//
+ OSS_BAD_TABLE = HRESULT($8009300F);
+ {$EXTERNALSYM OSS_BAD_TABLE}
+
+//
+// MessageId: OSS_TOO_LONG
+//
+// MessageText:
+//
+// OSS ASN.1 Error: Invalid data.
+//
+ OSS_TOO_LONG = HRESULT($80093010);
+ {$EXTERNALSYM OSS_TOO_LONG}
+
+//
+// MessageId: OSS_CONSTRAINT_VIOLATED
+//
+// MessageText:
+//
+// OSS ASN.1 Error: Invalid data.
+//
+ OSS_CONSTRAINT_VIOLATED = HRESULT($80093011);
+ {$EXTERNALSYM OSS_CONSTRAINT_VIOLATED}
+
+//
+// MessageId: OSS_FATAL_ERROR
+//
+// MessageText:
+//
+// OSS ASN.1 Error: Internal Error.
+//
+ OSS_FATAL_ERROR = HRESULT($80093012);
+ {$EXTERNALSYM OSS_FATAL_ERROR}
+
+//
+// MessageId: OSS_ACCESS_SERIALIZATION_ERROR
+//
+// MessageText:
+//
+// OSS ASN.1 Error: Multi-threading conflict.
+//
+ OSS_ACCESS_SERIALIZATION_ERROR = HRESULT($80093013);
+ {$EXTERNALSYM OSS_ACCESS_SERIALIZATION_ERROR}
+
+//
+// MessageId: OSS_NULL_TBL
+//
+// MessageText:
+//
+// OSS ASN.1 Error: Invalid data.
+//
+ OSS_NULL_TBL = HRESULT($80093014);
+ {$EXTERNALSYM OSS_NULL_TBL}
+
+//
+// MessageId: OSS_NULL_FCN
+//
+// MessageText:
+//
+// OSS ASN.1 Error: Invalid data.
+//
+ OSS_NULL_FCN = HRESULT($80093015);
+ {$EXTERNALSYM OSS_NULL_FCN}
+
+//
+// MessageId: OSS_BAD_ENCRULES
+//
+// MessageText:
+//
+// OSS ASN.1 Error: Invalid data.
+//
+ OSS_BAD_ENCRULES = HRESULT($80093016);
+ {$EXTERNALSYM OSS_BAD_ENCRULES}
+
+//
+// MessageId: OSS_UNAVAIL_ENCRULES
+//
+// MessageText:
+//
+// OSS ASN.1 Error: Encode/Decode function not implemented.
+//
+ OSS_UNAVAIL_ENCRULES = HRESULT($80093017);
+ {$EXTERNALSYM OSS_UNAVAIL_ENCRULES}
+
+//
+// MessageId: OSS_CANT_OPEN_TRACE_WINDOW
+//
+// MessageText:
+//
+// OSS ASN.1 Error: Trace file error.
+//
+ OSS_CANT_OPEN_TRACE_WINDOW = HRESULT($80093018);
+ {$EXTERNALSYM OSS_CANT_OPEN_TRACE_WINDOW}
+
+//
+// MessageId: OSS_UNIMPLEMENTED
+//
+// MessageText:
+//
+// OSS ASN.1 Error: Function not implemented.
+//
+ OSS_UNIMPLEMENTED = HRESULT($80093019);
+ {$EXTERNALSYM OSS_UNIMPLEMENTED}
+
+//
+// MessageId: OSS_OID_DLL_NOT_LINKED
+//
+// MessageText:
+//
+// OSS ASN.1 Error: Program link error.
+//
+ OSS_OID_DLL_NOT_LINKED = HRESULT($8009301A);
+ {$EXTERNALSYM OSS_OID_DLL_NOT_LINKED}
+
+//
+// MessageId: OSS_CANT_OPEN_TRACE_FILE
+//
+// MessageText:
+//
+// OSS ASN.1 Error: Trace file error.
+//
+ OSS_CANT_OPEN_TRACE_FILE = HRESULT($8009301B);
+ {$EXTERNALSYM OSS_CANT_OPEN_TRACE_FILE}
+
+//
+// MessageId: OSS_TRACE_FILE_ALREADY_OPEN
+//
+// MessageText:
+//
+// OSS ASN.1 Error: Trace file error.
+//
+ OSS_TRACE_FILE_ALREADY_OPEN = HRESULT($8009301C);
+ {$EXTERNALSYM OSS_TRACE_FILE_ALREADY_OPEN}
+
+//
+// MessageId: OSS_TABLE_MISMATCH
+//
+// MessageText:
+//
+// OSS ASN.1 Error: Invalid data.
+//
+ OSS_TABLE_MISMATCH = HRESULT($8009301D);
+ {$EXTERNALSYM OSS_TABLE_MISMATCH}
+
+//
+// MessageId: OSS_TYPE_NOT_SUPPORTED
+//
+// MessageText:
+//
+// OSS ASN.1 Error: Invalid data.
+//
+ OSS_TYPE_NOT_SUPPORTED = HRESULT($8009301E);
+ {$EXTERNALSYM OSS_TYPE_NOT_SUPPORTED}
+
+//
+// MessageId: OSS_REAL_DLL_NOT_LINKED
+//
+// MessageText:
+//
+// OSS ASN.1 Error: Program link error.
+//
+ OSS_REAL_DLL_NOT_LINKED = HRESULT($8009301F);
+ {$EXTERNALSYM OSS_REAL_DLL_NOT_LINKED}
+
+//
+// MessageId: OSS_REAL_CODE_NOT_LINKED
+//
+// MessageText:
+//
+// OSS ASN.1 Error: Program link error.
+//
+ OSS_REAL_CODE_NOT_LINKED = HRESULT($80093020);
+ {$EXTERNALSYM OSS_REAL_CODE_NOT_LINKED}
+
+//
+// MessageId: OSS_OUT_OF_RANGE
+//
+// MessageText:
+//
+// OSS ASN.1 Error: Program link error.
+//
+ OSS_OUT_OF_RANGE = HRESULT($80093021);
+ {$EXTERNALSYM OSS_OUT_OF_RANGE}
+
+//
+// MessageId: OSS_COPIER_DLL_NOT_LINKED
+//
+// MessageText:
+//
+// OSS ASN.1 Error: Program link error.
+//
+ OSS_COPIER_DLL_NOT_LINKED = HRESULT($80093022);
+ {$EXTERNALSYM OSS_COPIER_DLL_NOT_LINKED}
+
+//
+// MessageId: OSS_CONSTRAINT_DLL_NOT_LINKED
+//
+// MessageText:
+//
+// OSS ASN.1 Error: Program link error.
+//
+ OSS_CONSTRAINT_DLL_NOT_LINKED = HRESULT($80093023);
+ {$EXTERNALSYM OSS_CONSTRAINT_DLL_NOT_LINKED}
+
+//
+// MessageId: OSS_COMPARATOR_DLL_NOT_LINKED
+//
+// MessageText:
+//
+// OSS ASN.1 Error: Program link error.
+//
+ OSS_COMPARATOR_DLL_NOT_LINKED = HRESULT($80093024);
+ {$EXTERNALSYM OSS_COMPARATOR_DLL_NOT_LINKED}
+
+//
+// MessageId: OSS_COMPARATOR_CODE_NOT_LINKED
+//
+// MessageText:
+//
+// OSS ASN.1 Error: Program link error.
+//
+ OSS_COMPARATOR_CODE_NOT_LINKED = HRESULT($80093025);
+ {$EXTERNALSYM OSS_COMPARATOR_CODE_NOT_LINKED}
+
+//
+// MessageId: OSS_MEM_MGR_DLL_NOT_LINKED
+//
+// MessageText:
+//
+// OSS ASN.1 Error: Program link error.
+//
+ OSS_MEM_MGR_DLL_NOT_LINKED = HRESULT($80093026);
+ {$EXTERNALSYM OSS_MEM_MGR_DLL_NOT_LINKED}
+
+//
+// MessageId: OSS_PDV_DLL_NOT_LINKED
+//
+// MessageText:
+//
+// OSS ASN.1 Error: Program link error.
+//
+ OSS_PDV_DLL_NOT_LINKED = HRESULT($80093027);
+ {$EXTERNALSYM OSS_PDV_DLL_NOT_LINKED}
+
+//
+// MessageId: OSS_PDV_CODE_NOT_LINKED
+//
+// MessageText:
+//
+// OSS ASN.1 Error: Program link error.
+//
+ OSS_PDV_CODE_NOT_LINKED = HRESULT($80093028);
+ {$EXTERNALSYM OSS_PDV_CODE_NOT_LINKED}
+
+//
+// MessageId: OSS_API_DLL_NOT_LINKED
+//
+// MessageText:
+//
+// OSS ASN.1 Error: Program link error.
+//
+ OSS_API_DLL_NOT_LINKED = HRESULT($80093029);
+ {$EXTERNALSYM OSS_API_DLL_NOT_LINKED}
+
+//
+// MessageId: OSS_BERDER_DLL_NOT_LINKED
+//
+// MessageText:
+//
+// OSS ASN.1 Error: Program link error.
+//
+ OSS_BERDER_DLL_NOT_LINKED = HRESULT($8009302A);
+ {$EXTERNALSYM OSS_BERDER_DLL_NOT_LINKED}
+
+//
+// MessageId: OSS_PER_DLL_NOT_LINKED
+//
+// MessageText:
+//
+// OSS ASN.1 Error: Program link error.
+//
+ OSS_PER_DLL_NOT_LINKED = HRESULT($8009302B);
+ {$EXTERNALSYM OSS_PER_DLL_NOT_LINKED}
+
+//
+// MessageId: OSS_OPEN_TYPE_ERROR
+//
+// MessageText:
+//
+// OSS ASN.1 Error: Program link error.
+//
+ OSS_OPEN_TYPE_ERROR = HRESULT($8009302C);
+ {$EXTERNALSYM OSS_OPEN_TYPE_ERROR}
+
+//
+// MessageId: OSS_MUTEX_NOT_CREATED
+//
+// MessageText:
+//
+// OSS ASN.1 Error: System resource error.
+//
+ OSS_MUTEX_NOT_CREATED = HRESULT($8009302D);
+ {$EXTERNALSYM OSS_MUTEX_NOT_CREATED}
+
+//
+// MessageId: OSS_CANT_CLOSE_TRACE_FILE
+//
+// MessageText:
+//
+// OSS ASN.1 Error: Trace file error.
+//
+ OSS_CANT_CLOSE_TRACE_FILE = HRESULT($8009302E);
+ {$EXTERNALSYM OSS_CANT_CLOSE_TRACE_FILE}
+
+//
+// MessageId: CRYPT_E_ASN1_ERROR
+//
+// MessageText:
+//
+// ASN1 Certificate encode/decode error code base.
+//
+// The ASN1 error values are offset by CRYPT_E_ASN1_ERROR.
+//
+ CRYPT_E_ASN1_ERROR = HRESULT($80093100);
+ {$EXTERNALSYM CRYPT_E_ASN1_ERROR}
+
+//
+// MessageId: CRYPT_E_ASN1_INTERNAL
+//
+// MessageText:
+//
+// ASN1 internal encode or decode error.
+//
+ CRYPT_E_ASN1_INTERNAL = HRESULT($80093101);
+ {$EXTERNALSYM CRYPT_E_ASN1_INTERNAL}
+
+//
+// MessageId: CRYPT_E_ASN1_EOD
+//
+// MessageText:
+//
+// ASN1 unexpected end of data.
+//
+ CRYPT_E_ASN1_EOD = HRESULT($80093102);
+ {$EXTERNALSYM CRYPT_E_ASN1_EOD}
+
+//
+// MessageId: CRYPT_E_ASN1_CORRUPT
+//
+// MessageText:
+//
+// ASN1 corrupted data.
+//
+ CRYPT_E_ASN1_CORRUPT = HRESULT($80093103);
+ {$EXTERNALSYM CRYPT_E_ASN1_CORRUPT}
+
+//
+// MessageId: CRYPT_E_ASN1_LARGE
+//
+// MessageText:
+//
+// ASN1 value too large.
+//
+ CRYPT_E_ASN1_LARGE = HRESULT($80093104);
+ {$EXTERNALSYM CRYPT_E_ASN1_LARGE}
+
+//
+// MessageId: CRYPT_E_ASN1_CONSTRAINT
+//
+// MessageText:
+//
+// ASN1 constraint violated.
+//
+ CRYPT_E_ASN1_CONSTRAINT = HRESULT($80093105);
+ {$EXTERNALSYM CRYPT_E_ASN1_CONSTRAINT}
+
+//
+// MessageId: CRYPT_E_ASN1_MEMORY
+//
+// MessageText:
+//
+// ASN1 out of memory.
+//
+ CRYPT_E_ASN1_MEMORY = HRESULT($80093106);
+ {$EXTERNALSYM CRYPT_E_ASN1_MEMORY}
+
+//
+// MessageId: CRYPT_E_ASN1_OVERFLOW
+//
+// MessageText:
+//
+// ASN1 buffer overflow.
+//
+ CRYPT_E_ASN1_OVERFLOW = HRESULT($80093107);
+ {$EXTERNALSYM CRYPT_E_ASN1_OVERFLOW}
+
+//
+// MessageId: CRYPT_E_ASN1_BADPDU
+//
+// MessageText:
+//
+// ASN1 function not supported for this PDU.
+//
+ CRYPT_E_ASN1_BADPDU = HRESULT($80093108);
+ {$EXTERNALSYM CRYPT_E_ASN1_BADPDU}
+
+//
+// MessageId: CRYPT_E_ASN1_BADARGS
+//
+// MessageText:
+//
+// ASN1 bad arguments to function call.
+//
+ CRYPT_E_ASN1_BADARGS = HRESULT($80093109);
+ {$EXTERNALSYM CRYPT_E_ASN1_BADARGS}
+
+//
+// MessageId: CRYPT_E_ASN1_BADREAL
+//
+// MessageText:
+//
+// ASN1 bad real value.
+//
+ CRYPT_E_ASN1_BADREAL = HRESULT($8009310A);
+ {$EXTERNALSYM CRYPT_E_ASN1_BADREAL}
+
+//
+// MessageId: CRYPT_E_ASN1_BADTAG
+//
+// MessageText:
+//
+// ASN1 bad tag value met.
+//
+ CRYPT_E_ASN1_BADTAG = HRESULT($8009310B);
+ {$EXTERNALSYM CRYPT_E_ASN1_BADTAG}
+
+//
+// MessageId: CRYPT_E_ASN1_CHOICE
+//
+// MessageText:
+//
+// ASN1 bad choice value.
+//
+ CRYPT_E_ASN1_CHOICE = HRESULT($8009310C);
+ {$EXTERNALSYM CRYPT_E_ASN1_CHOICE}
+
+//
+// MessageId: CRYPT_E_ASN1_RULE
+//
+// MessageText:
+//
+// ASN1 bad encoding rule.
+//
+ CRYPT_E_ASN1_RULE = HRESULT($8009310D);
+ {$EXTERNALSYM CRYPT_E_ASN1_RULE}
+
+//
+// MessageId: CRYPT_E_ASN1_UTF8
+//
+// MessageText:
+//
+// ASN1 bad unicode (UTF8).
+//
+ CRYPT_E_ASN1_UTF8 = HRESULT($8009310E);
+ {$EXTERNALSYM CRYPT_E_ASN1_UTF8}
+
+//
+// MessageId: CRYPT_E_ASN1_PDU_TYPE
+//
+// MessageText:
+//
+// ASN1 bad PDU type.
+//
+ CRYPT_E_ASN1_PDU_TYPE = HRESULT($80093133);
+ {$EXTERNALSYM CRYPT_E_ASN1_PDU_TYPE}
+
+//
+// MessageId: CRYPT_E_ASN1_NYI
+//
+// MessageText:
+//
+// ASN1 not yet implemented.
+//
+ CRYPT_E_ASN1_NYI = HRESULT($80093134);
+ {$EXTERNALSYM CRYPT_E_ASN1_NYI}
+
+//
+// MessageId: CRYPT_E_ASN1_EXTENDED
+//
+// MessageText:
+//
+// ASN1 skipped unknown extension(s).
+//
+ CRYPT_E_ASN1_EXTENDED = HRESULT($80093201);
+ {$EXTERNALSYM CRYPT_E_ASN1_EXTENDED}
+
+//
+// MessageId: CRYPT_E_ASN1_NOEOD
+//
+// MessageText:
+//
+// ASN1 end of data expected
+//
+ CRYPT_E_ASN1_NOEOD = HRESULT($80093202);
+ {$EXTERNALSYM CRYPT_E_ASN1_NOEOD}
+
+//
+// MessageId: CERTSRV_E_BAD_REQUESTSUBJECT
+//
+// MessageText:
+//
+// The request subject name is invalid or too long.
+//
+ CERTSRV_E_BAD_REQUESTSUBJECT = HRESULT($80094001);
+ {$EXTERNALSYM CERTSRV_E_BAD_REQUESTSUBJECT}
+
+//
+// MessageId: CERTSRV_E_NO_REQUEST
+//
+// MessageText:
+//
+// The request does not exist.
+//
+ CERTSRV_E_NO_REQUEST = HRESULT($80094002);
+ {$EXTERNALSYM CERTSRV_E_NO_REQUEST}
+
+//
+// MessageId: CERTSRV_E_BAD_REQUESTSTATUS
+//
+// MessageText:
+//
+// The request's current status does not allow this operation.
+//
+ CERTSRV_E_BAD_REQUESTSTATUS = HRESULT($80094003);
+ {$EXTERNALSYM CERTSRV_E_BAD_REQUESTSTATUS}
+
+//
+// MessageId: CERTSRV_E_PROPERTY_EMPTY
+//
+// MessageText:
+//
+// The requested property value is empty.
+//
+ CERTSRV_E_PROPERTY_EMPTY = HRESULT($80094004);
+ {$EXTERNALSYM CERTSRV_E_PROPERTY_EMPTY}
+
+//
+// MessageId: CERTSRV_E_INVALID_CA_CERTIFICATE
+//
+// MessageText:
+//
+// The certification authority's certificate contains invalid data.
+//
+ CERTSRV_E_INVALID_CA_CERTIFICATE = HRESULT($80094005);
+ {$EXTERNALSYM CERTSRV_E_INVALID_CA_CERTIFICATE}
+
+//
+// MessageId: CERTSRV_E_SERVER_SUSPENDED
+//
+// MessageText:
+//
+// Certificate service has been suspended for a database restore operation.
+//
+ CERTSRV_E_SERVER_SUSPENDED = HRESULT($80094006);
+ {$EXTERNALSYM CERTSRV_E_SERVER_SUSPENDED}
+
+//
+// MessageId: CERTSRV_E_ENCODING_LENGTH
+//
+// MessageText:
+//
+// The certificate contains an encoded length that is potentially incompatible with older enrollment software.
+//
+ CERTSRV_E_ENCODING_LENGTH = HRESULT($80094007);
+ {$EXTERNALSYM CERTSRV_E_ENCODING_LENGTH}
+
+//
+// MessageId: CERTSRV_E_ROLECONFLICT
+//
+// MessageText:
+//
+// The operation is denied. The user has multiple roles assigned and the certification authority is configured to enforce role separation.
+//
+ CERTSRV_E_ROLECONFLICT = HRESULT($80094008);
+ {$EXTERNALSYM CERTSRV_E_ROLECONFLICT}
+
+//
+// MessageId: CERTSRV_E_RESTRICTEDOFFICER
+//
+// MessageText:
+//
+// The operation is denied. It can only be performed by a certificate manager that is allowed to manage certificates for the current requester.
+//
+ CERTSRV_E_RESTRICTEDOFFICER = HRESULT($80094009);
+ {$EXTERNALSYM CERTSRV_E_RESTRICTEDOFFICER}
+
+//
+// MessageId: CERTSRV_E_KEY_ARCHIVAL_NOT_CONFIGURED
+//
+// MessageText:
+//
+// Cannot archive private key. The certification authority is not configured for key archival.
+//
+ CERTSRV_E_KEY_ARCHIVAL_NOT_CONFIGURED = HRESULT($8009400A);
+ {$EXTERNALSYM CERTSRV_E_KEY_ARCHIVAL_NOT_CONFIGURED}
+
+//
+// MessageId: CERTSRV_E_NO_VALID_KRA
+//
+// MessageText:
+//
+// Cannot archive private key. The certification authority could not verify one or more key recovery certificates.
+//
+ CERTSRV_E_NO_VALID_KRA = HRESULT($8009400B);
+ {$EXTERNALSYM CERTSRV_E_NO_VALID_KRA}
+
+//
+// MessageId: CERTSRV_E_BAD_REQUEST_KEY_ARCHIVAL
+//
+// MessageText:
+//
+// The request is incorrectly formatted. The encrypted private key must be in an unauthenticated attribute in an outermost signature.
+//
+ CERTSRV_E_BAD_REQUEST_KEY_ARCHIVAL = HRESULT($8009400C);
+ {$EXTERNALSYM CERTSRV_E_BAD_REQUEST_KEY_ARCHIVAL}
+
+//
+// MessageId: CERTSRV_E_NO_CAADMIN_DEFINED
+//
+// MessageText:
+//
+// At least one security principal must have the permission to manage this CA.
+//
+ CERTSRV_E_NO_CAADMIN_DEFINED = HRESULT($8009400D);
+ {$EXTERNALSYM CERTSRV_E_NO_CAADMIN_DEFINED}
+
+//
+// MessageId: CERTSRV_E_BAD_RENEWAL_CERT_ATTRIBUTE
+//
+// MessageText:
+//
+// The request contains an invalid renewal certificate attribute.
+//
+ CERTSRV_E_BAD_RENEWAL_CERT_ATTRIBUTE = HRESULT($8009400E);
+ {$EXTERNALSYM CERTSRV_E_BAD_RENEWAL_CERT_ATTRIBUTE}
+
+//
+// MessageId: CERTSRV_E_NO_DB_SESSIONS
+//
+// MessageText:
+//
+// An attempt was made to open a Certification Authority database session, but there are already too many active sessions. The server may need to be configured to allow additional sessions.
+//
+ CERTSRV_E_NO_DB_SESSIONS = HRESULT($8009400F);
+ {$EXTERNALSYM CERTSRV_E_NO_DB_SESSIONS}
+
+//
+// MessageId: CERTSRV_E_ALIGNMENT_FAULT
+//
+// MessageText:
+//
+// A memory reference caused a data alignment fault.
+//
+ CERTSRV_E_ALIGNMENT_FAULT = HRESULT($80094010);
+ {$EXTERNALSYM CERTSRV_E_ALIGNMENT_FAULT}
+
+//
+// MessageId: CERTSRV_E_ENROLL_DENIED
+//
+// MessageText:
+//
+// The permissions on this certification authority do not allow the current user to enroll for certificates.
+//
+ CERTSRV_E_ENROLL_DENIED = HRESULT($80094011);
+ {$EXTERNALSYM CERTSRV_E_ENROLL_DENIED}
+
+//
+// MessageId: CERTSRV_E_TEMPLATE_DENIED
+//
+// MessageText:
+//
+// The permissions on the certificate template do not allow the current user to enroll for this type of certificate.
+//
+ CERTSRV_E_TEMPLATE_DENIED = HRESULT($80094012);
+ {$EXTERNALSYM CERTSRV_E_TEMPLATE_DENIED}
+
+//
+// MessageId: CERTSRV_E_DOWNLEVEL_DC_SSL_OR_UPGRADE
+//
+// MessageText:
+//
+// The contacted domain controller cannot support signed LDAP traffic. Update the domain controller or configure Certificate Services to use SSL for Active Directory access.
+//
+ CERTSRV_E_DOWNLEVEL_DC_SSL_OR_UPGRADE = HRESULT($80094013);
+ {$EXTERNALSYM CERTSRV_E_DOWNLEVEL_DC_SSL_OR_UPGRADE}
+
+//
+// MessageId: CERTSRV_E_UNSUPPORTED_CERT_TYPE
+//
+// MessageText:
+//
+// The requested certificate template is not supported by this CA.
+//
+ CERTSRV_E_UNSUPPORTED_CERT_TYPE = HRESULT($80094800);
+ {$EXTERNALSYM CERTSRV_E_UNSUPPORTED_CERT_TYPE}
+
+//
+// MessageId: CERTSRV_E_NO_CERT_TYPE
+//
+// MessageText:
+//
+// The request contains no certificate template information.
+//
+ CERTSRV_E_NO_CERT_TYPE = HRESULT($80094801);
+ {$EXTERNALSYM CERTSRV_E_NO_CERT_TYPE}
+
+//
+// MessageId: CERTSRV_E_TEMPLATE_CONFLICT
+//
+// MessageText:
+//
+// The request contains conflicting template information.
+//
+ CERTSRV_E_TEMPLATE_CONFLICT = HRESULT($80094802);
+ {$EXTERNALSYM CERTSRV_E_TEMPLATE_CONFLICT}
+
+//
+// MessageId: CERTSRV_E_SUBJECT_ALT_NAME_REQUIRED
+//
+// MessageText:
+//
+// The request is missing a required Subject Alternate name extension.
+//
+ CERTSRV_E_SUBJECT_ALT_NAME_REQUIRED = HRESULT($80094803);
+ {$EXTERNALSYM CERTSRV_E_SUBJECT_ALT_NAME_REQUIRED}
+
+//
+// MessageId: CERTSRV_E_ARCHIVED_KEY_REQUIRED
+//
+// MessageText:
+//
+// The request is missing a required private key for archival by the server.
+//
+ CERTSRV_E_ARCHIVED_KEY_REQUIRED = HRESULT($80094804);
+ {$EXTERNALSYM CERTSRV_E_ARCHIVED_KEY_REQUIRED}
+
+//
+// MessageId: CERTSRV_E_SMIME_REQUIRED
+//
+// MessageText:
+//
+// The request is missing a required SMIME capabilities extension.
+//
+ CERTSRV_E_SMIME_REQUIRED = HRESULT($80094805);
+ {$EXTERNALSYM CERTSRV_E_SMIME_REQUIRED}
+
+//
+// MessageId: CERTSRV_E_BAD_RENEWAL_SUBJECT
+//
+// MessageText:
+//
+// The request was made on behalf of a subject other than the caller. The certificate template must be configured to require at least one signature to authorize the request.
+//
+ CERTSRV_E_BAD_RENEWAL_SUBJECT = HRESULT($80094806);
+ {$EXTERNALSYM CERTSRV_E_BAD_RENEWAL_SUBJECT}
+
+//
+// MessageId: CERTSRV_E_BAD_TEMPLATE_VERSION
+//
+// MessageText:
+//
+// The request template version is newer than the supported template version.
+//
+ CERTSRV_E_BAD_TEMPLATE_VERSION = HRESULT($80094807);
+ {$EXTERNALSYM CERTSRV_E_BAD_TEMPLATE_VERSION}
+
+//
+// MessageId: CERTSRV_E_TEMPLATE_POLICY_REQUIRED
+//
+// MessageText:
+//
+// The template is missing a required signature policy attribute.
+//
+ CERTSRV_E_TEMPLATE_POLICY_REQUIRED = HRESULT($80094808);
+ {$EXTERNALSYM CERTSRV_E_TEMPLATE_POLICY_REQUIRED}
+
+//
+// MessageId: CERTSRV_E_SIGNATURE_POLICY_REQUIRED
+//
+// MessageText:
+//
+// The request is missing required signature policy information.
+//
+ CERTSRV_E_SIGNATURE_POLICY_REQUIRED = HRESULT($80094809);
+ {$EXTERNALSYM CERTSRV_E_SIGNATURE_POLICY_REQUIRED}
+
+//
+// MessageId: CERTSRV_E_SIGNATURE_COUNT
+//
+// MessageText:
+//
+// The request is missing one or more required signatures.
+//
+ CERTSRV_E_SIGNATURE_COUNT = HRESULT($8009480A);
+ {$EXTERNALSYM CERTSRV_E_SIGNATURE_COUNT}
+
+//
+// MessageId: CERTSRV_E_SIGNATURE_REJECTED
+//
+// MessageText:
+//
+// One or more signatures did not include the required application or issuance policies. The request is missing one or more required valid signatures.
+//
+ CERTSRV_E_SIGNATURE_REJECTED = HRESULT($8009480B);
+ {$EXTERNALSYM CERTSRV_E_SIGNATURE_REJECTED}
+
+//
+// MessageId: CERTSRV_E_ISSUANCE_POLICY_REQUIRED
+//
+// MessageText:
+//
+// The request is missing one or more required signature issuance policies.
+//
+ CERTSRV_E_ISSUANCE_POLICY_REQUIRED = HRESULT($8009480C);
+ {$EXTERNALSYM CERTSRV_E_ISSUANCE_POLICY_REQUIRED}
+
+//
+// MessageId: CERTSRV_E_SUBJECT_UPN_REQUIRED
+//
+// MessageText:
+//
+// The UPN is unavailable and cannot be added to the Subject Alternate name.
+//
+ CERTSRV_E_SUBJECT_UPN_REQUIRED = HRESULT($8009480D);
+ {$EXTERNALSYM CERTSRV_E_SUBJECT_UPN_REQUIRED}
+
+//
+// MessageId: CERTSRV_E_SUBJECT_DIRECTORY_GUID_REQUIRED
+//
+// MessageText:
+//
+// The Active Directory GUID is unavailable and cannot be added to the Subject Alternate name.
+//
+ CERTSRV_E_SUBJECT_DIRECTORY_GUID_REQUIRED = HRESULT($8009480E);
+ {$EXTERNALSYM CERTSRV_E_SUBJECT_DIRECTORY_GUID_REQUIRED}
+
+//
+// MessageId: CERTSRV_E_SUBJECT_DNS_REQUIRED
+//
+// MessageText:
+//
+// The DNS name is unavailable and cannot be added to the Subject Alternate name.
+//
+ CERTSRV_E_SUBJECT_DNS_REQUIRED = HRESULT($8009480F);
+ {$EXTERNALSYM CERTSRV_E_SUBJECT_DNS_REQUIRED}
+
+//
+// MessageId: CERTSRV_E_ARCHIVED_KEY_UNEXPECTED
+//
+// MessageText:
+//
+// The request includes a private key for archival by the server, but key archival is not enabled for the specified certificate template.
+//
+ CERTSRV_E_ARCHIVED_KEY_UNEXPECTED = HRESULT($80094810);
+ {$EXTERNALSYM CERTSRV_E_ARCHIVED_KEY_UNEXPECTED}
+
+//
+// MessageId: CERTSRV_E_KEY_LENGTH
+//
+// MessageText:
+//
+// The public key does not meet the minimum size required by the specified certificate template.
+//
+ CERTSRV_E_KEY_LENGTH = HRESULT($80094811);
+ {$EXTERNALSYM CERTSRV_E_KEY_LENGTH}
+
+//
+// MessageId: CERTSRV_E_SUBJECT_EMAIL_REQUIRED
+//
+// MessageText:
+//
+// The EMail name is unavailable and cannot be added to the Subject or Subject Alternate name.
+//
+ CERTSRV_E_SUBJECT_EMAIL_REQUIRED = HRESULT($80094812);
+ {$EXTERNALSYM CERTSRV_E_SUBJECT_EMAIL_REQUIRED}
+
+//
+// MessageId: CERTSRV_E_UNKNOWN_CERT_TYPE
+//
+// MessageText:
+//
+// One or more certificate templates to be enabled on this certification authority could not be found.
+//
+ CERTSRV_E_UNKNOWN_CERT_TYPE = HRESULT($80094813);
+ {$EXTERNALSYM CERTSRV_E_UNKNOWN_CERT_TYPE}
+
+//
+// MessageId: CERTSRV_E_CERT_TYPE_OVERLAP
+//
+// MessageText:
+//
+// The certificate template renewal period is longer than the certificate validity period. The template should be reconfigured or the CA certificate renewed.
+//
+ CERTSRV_E_CERT_TYPE_OVERLAP = HRESULT($80094814);
+ {$EXTERNALSYM CERTSRV_E_CERT_TYPE_OVERLAP}
+
+//
+// The range 0x5000-0x51ff is reserved for XENROLL errors.
+//
+//
+// MessageId: XENROLL_E_KEY_NOT_EXPORTABLE
+//
+// MessageText:
+//
+// The key is not exportable.
+//
+ XENROLL_E_KEY_NOT_EXPORTABLE = HRESULT($80095000);
+ {$EXTERNALSYM XENROLL_E_KEY_NOT_EXPORTABLE}
+
+//
+// MessageId: XENROLL_E_CANNOT_ADD_ROOT_CERT
+//
+// MessageText:
+//
+// You cannot add the root CA certificate into your local store.
+//
+ XENROLL_E_CANNOT_ADD_ROOT_CERT = HRESULT($80095001);
+ {$EXTERNALSYM XENROLL_E_CANNOT_ADD_ROOT_CERT}
+
+//
+// MessageId: XENROLL_E_RESPONSE_KA_HASH_NOT_FOUND
+//
+// MessageText:
+//
+// The key archival hash attribute was not found in the response.
+//
+ XENROLL_E_RESPONSE_KA_HASH_NOT_FOUND = HRESULT($80095002);
+ {$EXTERNALSYM XENROLL_E_RESPONSE_KA_HASH_NOT_FOUND}
+
+//
+// MessageId: XENROLL_E_RESPONSE_UNEXPECTED_KA_HASH
+//
+// MessageText:
+//
+// An unexpected key archival hash attribute was found in the response.
+//
+ XENROLL_E_RESPONSE_UNEXPECTED_KA_HASH = HRESULT($80095003);
+ {$EXTERNALSYM XENROLL_E_RESPONSE_UNEXPECTED_KA_HASH}
+
+//
+// MessageId: XENROLL_E_RESPONSE_KA_HASH_MISMATCH
+//
+// MessageText:
+//
+// There is a key archival hash mismatch between the request and the response.
+//
+ XENROLL_E_RESPONSE_KA_HASH_MISMATCH = HRESULT($80095004);
+ {$EXTERNALSYM XENROLL_E_RESPONSE_KA_HASH_MISMATCH}
+
+//
+// MessageId: XENROLL_E_KEYSPEC_SMIME_MISMATCH
+//
+// MessageText:
+//
+// Signing certificate cannot include SMIME extension.
+//
+ XENROLL_E_KEYSPEC_SMIME_MISMATCH = HRESULT($80095005);
+ {$EXTERNALSYM XENROLL_E_KEYSPEC_SMIME_MISMATCH}
+
+//
+// MessageId: TRUST_E_SYSTEM_ERROR
+//
+// MessageText:
+//
+// A system-level error occurred while verifying trust.
+//
+ TRUST_E_SYSTEM_ERROR = HRESULT($80096001);
+ {$EXTERNALSYM TRUST_E_SYSTEM_ERROR}
+
+//
+// MessageId: TRUST_E_NO_SIGNER_CERT
+//
+// MessageText:
+//
+// The certificate for the signer of the message is invalid or not found.
+//
+ TRUST_E_NO_SIGNER_CERT = HRESULT($80096002);
+ {$EXTERNALSYM TRUST_E_NO_SIGNER_CERT}
+
+//
+// MessageId: TRUST_E_COUNTER_SIGNER
+//
+// MessageText:
+//
+// One of the counter signatures was invalid.
+//
+ TRUST_E_COUNTER_SIGNER = HRESULT($80096003);
+ {$EXTERNALSYM TRUST_E_COUNTER_SIGNER}
+
+//
+// MessageId: TRUST_E_CERT_SIGNATURE
+//
+// MessageText:
+//
+// The signature of the certificate can not be verified.
+//
+ TRUST_E_CERT_SIGNATURE = HRESULT($80096004);
+ {$EXTERNALSYM TRUST_E_CERT_SIGNATURE}
+
+//
+// MessageId: TRUST_E_TIME_STAMP
+//
+// MessageText:
+//
+// The timestamp signature and/or certificate could not be verified or is malformed.
+//
+ TRUST_E_TIME_STAMP = HRESULT($80096005);
+ {$EXTERNALSYM TRUST_E_TIME_STAMP}
+
+//
+// MessageId: TRUST_E_BAD_DIGEST
+//
+// MessageText:
+//
+// The digital signature of the object did not verify.
+//
+ TRUST_E_BAD_DIGEST = HRESULT($80096010);
+ {$EXTERNALSYM TRUST_E_BAD_DIGEST}
+
+//
+// MessageId: TRUST_E_BASIC_CONSTRAINTS
+//
+// MessageText:
+//
+// A certificate's basic constraint extension has not been observed.
+//
+ TRUST_E_BASIC_CONSTRAINTS = HRESULT($80096019);
+ {$EXTERNALSYM TRUST_E_BASIC_CONSTRAINTS}
+
+//
+// MessageId: TRUST_E_FINANCIAL_CRITERIA
+//
+// MessageText:
+//
+// The certificate does not meet or contain the Authenticode(tm) financial extensions.
+//
+ TRUST_E_FINANCIAL_CRITERIA = HRESULT($8009601E);
+ {$EXTERNALSYM TRUST_E_FINANCIAL_CRITERIA}
+
+//
+// Error codes for mssipotf.dll
+// Most of the error codes can only occur when an error occurs
+// during font file signing
+//
+//
+//
+// MessageId: MSSIPOTF_E_OUTOFMEMRANGE
+//
+// MessageText:
+//
+// Tried to reference a part of the file outside the proper range.
+//
+ MSSIPOTF_E_OUTOFMEMRANGE = HRESULT($80097001);
+ {$EXTERNALSYM MSSIPOTF_E_OUTOFMEMRANGE}
+
+//
+// MessageId: MSSIPOTF_E_CANTGETOBJECT
+//
+// MessageText:
+//
+// Could not retrieve an object from the file.
+//
+ MSSIPOTF_E_CANTGETOBJECT = HRESULT($80097002);
+ {$EXTERNALSYM MSSIPOTF_E_CANTGETOBJECT}
+
+//
+// MessageId: MSSIPOTF_E_NOHEADTABLE
+//
+// MessageText:
+//
+// Could not find the head table in the file.
+//
+ MSSIPOTF_E_NOHEADTABLE = HRESULT($80097003);
+ {$EXTERNALSYM MSSIPOTF_E_NOHEADTABLE}
+
+//
+// MessageId: MSSIPOTF_E_BAD_MAGICNUMBER
+//
+// MessageText:
+//
+// The magic number in the head table is incorrect.
+//
+ MSSIPOTF_E_BAD_MAGICNUMBER = HRESULT($80097004);
+ {$EXTERNALSYM MSSIPOTF_E_BAD_MAGICNUMBER}
+
+//
+// MessageId: MSSIPOTF_E_BAD_OFFSET_TABLE
+//
+// MessageText:
+//
+// The offset table has incorrect values.
+//
+ MSSIPOTF_E_BAD_OFFSET_TABLE = HRESULT($80097005);
+ {$EXTERNALSYM MSSIPOTF_E_BAD_OFFSET_TABLE}
+
+//
+// MessageId: MSSIPOTF_E_TABLE_TAGORDER
+//
+// MessageText:
+//
+// Duplicate table tags or tags out of alphabetical order.
+//
+ MSSIPOTF_E_TABLE_TAGORDER = HRESULT($80097006);
+ {$EXTERNALSYM MSSIPOTF_E_TABLE_TAGORDER}
+
+//
+// MessageId: MSSIPOTF_E_TABLE_LONGWORD
+//
+// MessageText:
+//
+// A table does not start on a long word boundary.
+//
+ MSSIPOTF_E_TABLE_LONGWORD = HRESULT($80097007);
+ {$EXTERNALSYM MSSIPOTF_E_TABLE_LONGWORD}
+
+//
+// MessageId: MSSIPOTF_E_BAD_FIRST_TABLE_PLACEMENT
+//
+// MessageText:
+//
+// First table does not appear after header information.
+//
+ MSSIPOTF_E_BAD_FIRST_TABLE_PLACEMENT = HRESULT($80097008);
+ {$EXTERNALSYM MSSIPOTF_E_BAD_FIRST_TABLE_PLACEMENT}
+
+//
+// MessageId: MSSIPOTF_E_TABLES_OVERLAP
+//
+// MessageText:
+//
+// Two or more tables overlap.
+//
+ MSSIPOTF_E_TABLES_OVERLAP = HRESULT($80097009);
+ {$EXTERNALSYM MSSIPOTF_E_TABLES_OVERLAP}
+
+//
+// MessageId: MSSIPOTF_E_TABLE_PADBYTES
+//
+// MessageText:
+//
+// Too many pad bytes between tables or pad bytes are not 0.
+//
+ MSSIPOTF_E_TABLE_PADBYTES = HRESULT($8009700A);
+ {$EXTERNALSYM MSSIPOTF_E_TABLE_PADBYTES}
+
+//
+// MessageId: MSSIPOTF_E_FILETOOSMALL
+//
+// MessageText:
+//
+// File is too small to contain the last table.
+//
+ MSSIPOTF_E_FILETOOSMALL = HRESULT($8009700B);
+ {$EXTERNALSYM MSSIPOTF_E_FILETOOSMALL}
+
+//
+// MessageId: MSSIPOTF_E_TABLE_CHECKSUM
+//
+// MessageText:
+//
+// A table checksum is incorrect.
+//
+ MSSIPOTF_E_TABLE_CHECKSUM = HRESULT($8009700C);
+ {$EXTERNALSYM MSSIPOTF_E_TABLE_CHECKSUM}
+
+//
+// MessageId: MSSIPOTF_E_FILE_CHECKSUM
+//
+// MessageText:
+//
+// The file checksum is incorrect.
+//
+ MSSIPOTF_E_FILE_CHECKSUM = HRESULT($8009700D);
+ {$EXTERNALSYM MSSIPOTF_E_FILE_CHECKSUM}
+
+//
+// MessageId: MSSIPOTF_E_FAILED_POLICY
+//
+// MessageText:
+//
+// The signature does not have the correct attributes for the policy.
+//
+ MSSIPOTF_E_FAILED_POLICY = HRESULT($80097010);
+ {$EXTERNALSYM MSSIPOTF_E_FAILED_POLICY}
+
+//
+// MessageId: MSSIPOTF_E_FAILED_HINTS_CHECK
+//
+// MessageText:
+//
+// The file did not pass the hints check.
+//
+ MSSIPOTF_E_FAILED_HINTS_CHECK = HRESULT($80097011);
+ {$EXTERNALSYM MSSIPOTF_E_FAILED_HINTS_CHECK}
+
+//
+// MessageId: MSSIPOTF_E_NOT_OPENTYPE
+//
+// MessageText:
+//
+// The file is not an OpenType file.
+//
+ MSSIPOTF_E_NOT_OPENTYPE = HRESULT($80097012);
+ {$EXTERNALSYM MSSIPOTF_E_NOT_OPENTYPE}
+
+//
+// MessageId: MSSIPOTF_E_FILE
+//
+// MessageText:
+//
+// Failed on a file operation (open, map, read, write).
+//
+ MSSIPOTF_E_FILE = HRESULT($80097013);
+ {$EXTERNALSYM MSSIPOTF_E_FILE}
+
+//
+// MessageId: MSSIPOTF_E_CRYPT
+//
+// MessageText:
+//
+// A call to a CryptoAPI function failed.
+//
+ MSSIPOTF_E_CRYPT = HRESULT($80097014);
+ {$EXTERNALSYM MSSIPOTF_E_CRYPT}
+
+//
+// MessageId: MSSIPOTF_E_BADVERSION
+//
+// MessageText:
+//
+// There is a bad version number in the file.
+//
+ MSSIPOTF_E_BADVERSION = HRESULT($80097015);
+ {$EXTERNALSYM MSSIPOTF_E_BADVERSION}
+
+//
+// MessageId: MSSIPOTF_E_DSIG_STRUCTURE
+//
+// MessageText:
+//
+// The structure of the DSIG table is incorrect.
+//
+ MSSIPOTF_E_DSIG_STRUCTURE = HRESULT($80097016);
+ {$EXTERNALSYM MSSIPOTF_E_DSIG_STRUCTURE}
+
+//
+// MessageId: MSSIPOTF_E_PCONST_CHECK
+//
+// MessageText:
+//
+// A check failed in a partially constant table.
+//
+ MSSIPOTF_E_PCONST_CHECK = HRESULT($80097017);
+ {$EXTERNALSYM MSSIPOTF_E_PCONST_CHECK}
+
+//
+// MessageId: MSSIPOTF_E_STRUCTURE
+//
+// MessageText:
+//
+// Some kind of structural error.
+//
+ MSSIPOTF_E_STRUCTURE = HRESULT($80097018);
+ {$EXTERNALSYM MSSIPOTF_E_STRUCTURE}
+
+ NTE_OP_OK = 0;
+ {$EXTERNALSYM NTE_OP_OK}
+
+//
+// Note that additional FACILITY_SSPI errors are in issperr.h
+//
+// ******************
+// FACILITY_CERT
+// ******************
+//
+// MessageId: TRUST_E_PROVIDER_UNKNOWN
+//
+// MessageText:
+//
+// Unknown trust provider.
+//
+ TRUST_E_PROVIDER_UNKNOWN = HRESULT($800B0001);
+ {$EXTERNALSYM TRUST_E_PROVIDER_UNKNOWN}
+
+//
+// MessageId: TRUST_E_ACTION_UNKNOWN
+//
+// MessageText:
+//
+// The trust verification action specified is not supported by the specified trust provider.
+//
+ TRUST_E_ACTION_UNKNOWN = HRESULT($800B0002);
+ {$EXTERNALSYM TRUST_E_ACTION_UNKNOWN}
+
+//
+// MessageId: TRUST_E_SUBJECT_FORM_UNKNOWN
+//
+// MessageText:
+//
+// The form specified for the subject is not one supported or known by the specified trust provider.
+//
+ TRUST_E_SUBJECT_FORM_UNKNOWN = HRESULT($800B0003);
+ {$EXTERNALSYM TRUST_E_SUBJECT_FORM_UNKNOWN}
+
+//
+// MessageId: TRUST_E_SUBJECT_NOT_TRUSTED
+//
+// MessageText:
+//
+// The subject is not trusted for the specified action.
+//
+ TRUST_E_SUBJECT_NOT_TRUSTED = HRESULT($800B0004);
+ {$EXTERNALSYM TRUST_E_SUBJECT_NOT_TRUSTED}
+
+//
+// MessageId: DIGSIG_E_ENCODE
+//
+// MessageText:
+//
+// Error due to problem in ASN.1 encoding process.
+//
+ DIGSIG_E_ENCODE = HRESULT($800B0005);
+ {$EXTERNALSYM DIGSIG_E_ENCODE}
+
+//
+// MessageId: DIGSIG_E_DECODE
+//
+// MessageText:
+//
+// Error due to problem in ASN.1 decoding process.
+//
+ DIGSIG_E_DECODE = HRESULT($800B0006);
+ {$EXTERNALSYM DIGSIG_E_DECODE}
+
+//
+// MessageId: DIGSIG_E_EXTENSIBILITY
+//
+// MessageText:
+//
+// Reading / writing Extensions where Attributes are appropriate, and visa versa.
+//
+ DIGSIG_E_EXTENSIBILITY = HRESULT($800B0007);
+ {$EXTERNALSYM DIGSIG_E_EXTENSIBILITY}
+
+//
+// MessageId: DIGSIG_E_CRYPTO
+//
+// MessageText:
+//
+// Unspecified cryptographic failure.
+//
+ DIGSIG_E_CRYPTO = HRESULT($800B0008);
+ {$EXTERNALSYM DIGSIG_E_CRYPTO}
+
+//
+// MessageId: PERSIST_E_SIZEDEFINITE
+//
+// MessageText:
+//
+// The size of the data could not be determined.
+//
+ PERSIST_E_SIZEDEFINITE = HRESULT($800B0009);
+ {$EXTERNALSYM PERSIST_E_SIZEDEFINITE}
+
+//
+// MessageId: PERSIST_E_SIZEINDEFINITE
+//
+// MessageText:
+//
+// The size of the indefinite-sized data could not be determined.
+//
+ PERSIST_E_SIZEINDEFINITE = HRESULT($800B000A);
+ {$EXTERNALSYM PERSIST_E_SIZEINDEFINITE}
+
+//
+// MessageId: PERSIST_E_NOTSELFSIZING
+//
+// MessageText:
+//
+// This object does not read and write self-sizing data.
+//
+ PERSIST_E_NOTSELFSIZING = HRESULT($800B000B);
+ {$EXTERNALSYM PERSIST_E_NOTSELFSIZING}
+
+//
+// MessageId: TRUST_E_NOSIGNATURE
+//
+// MessageText:
+//
+// No signature was present in the subject.
+//
+ TRUST_E_NOSIGNATURE = HRESULT($800B0100);
+ {$EXTERNALSYM TRUST_E_NOSIGNATURE}
+
+//
+// MessageId: CERT_E_EXPIRED
+//
+// MessageText:
+//
+// A required certificate is not within its validity period when verifying against the current system clock or the timestamp in the signed file.
+//
+ CERT_E_EXPIRED = HRESULT($800B0101);
+ {$EXTERNALSYM CERT_E_EXPIRED}
+
+//
+// MessageId: CERT_E_VALIDITYPERIODNESTING
+//
+// MessageText:
+//
+// The validity periods of the certification chain do not nest correctly.
+//
+ CERT_E_VALIDITYPERIODNESTING = HRESULT($800B0102);
+ {$EXTERNALSYM CERT_E_VALIDITYPERIODNESTING}
+
+//
+// MessageId: CERT_E_ROLE
+//
+// MessageText:
+//
+// A certificate that can only be used as an end-entity is being used as a CA or visa versa.
+//
+ CERT_E_ROLE = HRESULT($800B0103);
+ {$EXTERNALSYM CERT_E_ROLE}
+
+//
+// MessageId: CERT_E_PATHLENCONST
+//
+// MessageText:
+//
+// A path length constraint in the certification chain has been violated.
+//
+ CERT_E_PATHLENCONST = HRESULT($800B0104);
+ {$EXTERNALSYM CERT_E_PATHLENCONST}
+
+//
+// MessageId: CERT_E_CRITICAL
+//
+// MessageText:
+//
+// A certificate contains an unknown extension that is marked 'critical'.
+//
+ CERT_E_CRITICAL = HRESULT($800B0105);
+ {$EXTERNALSYM CERT_E_CRITICAL}
+
+//
+// MessageId: CERT_E_PURPOSE
+//
+// MessageText:
+//
+// A certificate being used for a purpose other than the ones specified by its CA.
+//
+ CERT_E_PURPOSE = HRESULT($800B0106);
+ {$EXTERNALSYM CERT_E_PURPOSE}
+
+//
+// MessageId: CERT_E_ISSUERCHAINING
+//
+// MessageText:
+//
+// A parent of a given certificate in fact did not issue that child certificate.
+//
+ CERT_E_ISSUERCHAINING = HRESULT($800B0107);
+ {$EXTERNALSYM CERT_E_ISSUERCHAINING}
+
+//
+// MessageId: CERT_E_MALFORMED
+//
+// MessageText:
+//
+// A certificate is missing or has an empty value for an important field, such as a subject or issuer name.
+//
+ CERT_E_MALFORMED = HRESULT($800B0108);
+ {$EXTERNALSYM CERT_E_MALFORMED}
+
+//
+// MessageId: CERT_E_UNTRUSTEDROOT
+//
+// MessageText:
+//
+// A certificate chain processed, but terminated in a root certificate which is not trusted by the trust provider.
+//
+ CERT_E_UNTRUSTEDROOT = HRESULT($800B0109);
+ {$EXTERNALSYM CERT_E_UNTRUSTEDROOT}
+
+//
+// MessageId: CERT_E_CHAINING
+//
+// MessageText:
+//
+// A certificate chain could not be built to a trusted root authority.
+//
+ CERT_E_CHAINING = HRESULT($800B010A);
+ {$EXTERNALSYM CERT_E_CHAINING}
+
+//
+// MessageId: TRUST_E_FAIL
+//
+// MessageText:
+//
+// Generic trust failure.
+//
+ TRUST_E_FAIL = HRESULT($800B010B);
+ {$EXTERNALSYM TRUST_E_FAIL}
+
+//
+// MessageId: CERT_E_REVOKED
+//
+// MessageText:
+//
+// A certificate was explicitly revoked by its issuer.
+//
+ CERT_E_REVOKED = HRESULT($800B010C);
+ {$EXTERNALSYM CERT_E_REVOKED}
+
+//
+// MessageId: CERT_E_UNTRUSTEDTESTROOT
+//
+// MessageText:
+//
+// The certification path terminates with the test root which is not trusted with the current policy settings.
+//
+ CERT_E_UNTRUSTEDTESTROOT = HRESULT($800B010D);
+ {$EXTERNALSYM CERT_E_UNTRUSTEDTESTROOT}
+
+//
+// MessageId: CERT_E_REVOCATION_FAILURE
+//
+// MessageText:
+//
+// The revocation process could not continue - the certificate(s) could not be checked.
+//
+ CERT_E_REVOCATION_FAILURE = HRESULT($800B010E);
+ {$EXTERNALSYM CERT_E_REVOCATION_FAILURE}
+
+//
+// MessageId: CERT_E_CN_NO_MATCH
+//
+// MessageText:
+//
+// The certificate's CN name does not match the passed value.
+//
+ CERT_E_CN_NO_MATCH = HRESULT($800B010F);
+ {$EXTERNALSYM CERT_E_CN_NO_MATCH}
+
+//
+// MessageId: CERT_E_WRONG_USAGE
+//
+// MessageText:
+//
+// The certificate is not valid for the requested usage.
+//
+ CERT_E_WRONG_USAGE = HRESULT($800B0110);
+ {$EXTERNALSYM CERT_E_WRONG_USAGE}
+
+//
+// MessageId: TRUST_E_EXPLICIT_DISTRUST
+//
+// MessageText:
+//
+// The certificate was explicitly marked as untrusted by the user.
+//
+ TRUST_E_EXPLICIT_DISTRUST = HRESULT($800B0111);
+ {$EXTERNALSYM TRUST_E_EXPLICIT_DISTRUST}
+
+//
+// MessageId: CERT_E_UNTRUSTEDCA
+//
+// MessageText:
+//
+// A certification chain processed correctly, but one of the CA certificates is not trusted by the policy provider.
+//
+ CERT_E_UNTRUSTEDCA = HRESULT($800B0112);
+ {$EXTERNALSYM CERT_E_UNTRUSTEDCA}
+
+//
+// MessageId: CERT_E_INVALID_POLICY
+//
+// MessageText:
+//
+// The certificate has invalid policy.
+//
+ CERT_E_INVALID_POLICY = HRESULT($800B0113);
+ {$EXTERNALSYM CERT_E_INVALID_POLICY}
+
+//
+// MessageId: CERT_E_INVALID_NAME
+//
+// MessageText:
+//
+// The certificate has an invalid name. The name is not included in the permitted list or is explicitly excluded.
+//
+ CERT_E_INVALID_NAME = HRESULT($800B0114);
+ {$EXTERNALSYM CERT_E_INVALID_NAME}
+
+// *****************
+// FACILITY_SETUPAPI
+// *****************
+//
+// Since these error codes aren't in the standard Win32 range (i.e., 0-64K), define a
+// macro to map either Win32 or SetupAPI error codes into an HRESULT.
+//
+
+function HRESULT_FROM_SETUPAPI(x: DWORD): HRESULT;
+{$EXTERNALSYM HRESULT_FROM_SETUPAPI}
+
+//
+// MessageId: SPAPI_E_EXPECTED_SECTION_NAME
+//
+// MessageText:
+//
+// A non-empty line was encountered in the INF before the start of a section.
+//
+
+const
+ SPAPI_E_EXPECTED_SECTION_NAME = HRESULT($800F0000);
+ {$EXTERNALSYM SPAPI_E_EXPECTED_SECTION_NAME}
+
+//
+// MessageId: SPAPI_E_BAD_SECTION_NAME_LINE
+//
+// MessageText:
+//
+// A section name marker in the INF is not complete, or does not exist on a line by itself.
+//
+ SPAPI_E_BAD_SECTION_NAME_LINE = HRESULT($800F0001);
+ {$EXTERNALSYM SPAPI_E_BAD_SECTION_NAME_LINE}
+
+//
+// MessageId: SPAPI_E_SECTION_NAME_TOO_LONG
+//
+// MessageText:
+//
+// An INF section was encountered whose name exceeds the maximum section name length.
+//
+ SPAPI_E_SECTION_NAME_TOO_LONG = HRESULT($800F0002);
+ {$EXTERNALSYM SPAPI_E_SECTION_NAME_TOO_LONG}
+
+//
+// MessageId: SPAPI_E_GENERAL_SYNTAX
+//
+// MessageText:
+//
+// The syntax of the INF is invalid.
+//
+ SPAPI_E_GENERAL_SYNTAX = HRESULT($800F0003);
+ {$EXTERNALSYM SPAPI_E_GENERAL_SYNTAX}
+
+//
+// MessageId: SPAPI_E_WRONG_INF_STYLE
+//
+// MessageText:
+//
+// The style of the INF is different than what was requested.
+//
+ SPAPI_E_WRONG_INF_STYLE = HRESULT($800F0100);
+ {$EXTERNALSYM SPAPI_E_WRONG_INF_STYLE}
+
+//
+// MessageId: SPAPI_E_SECTION_NOT_FOUND
+//
+// MessageText:
+//
+// The required section was not found in the INF.
+//
+ SPAPI_E_SECTION_NOT_FOUND = HRESULT($800F0101);
+ {$EXTERNALSYM SPAPI_E_SECTION_NOT_FOUND}
+
+//
+// MessageId: SPAPI_E_LINE_NOT_FOUND
+//
+// MessageText:
+//
+// The required line was not found in the INF.
+//
+ SPAPI_E_LINE_NOT_FOUND = HRESULT($800F0102);
+ {$EXTERNALSYM SPAPI_E_LINE_NOT_FOUND}
+
+//
+// MessageId: SPAPI_E_NO_BACKUP
+//
+// MessageText:
+//
+// The files affected by the installation of this file queue have not been backed up for uninstall.
+//
+ SPAPI_E_NO_BACKUP = HRESULT($800F0103);
+ {$EXTERNALSYM SPAPI_E_NO_BACKUP}
+
+//
+// MessageId: SPAPI_E_NO_ASSOCIATED_CLASS
+//
+// MessageText:
+//
+// The INF or the device information set or element does not have an associated install class.
+//
+ SPAPI_E_NO_ASSOCIATED_CLASS = HRESULT($800F0200);
+ {$EXTERNALSYM SPAPI_E_NO_ASSOCIATED_CLASS}
+
+//
+// MessageId: SPAPI_E_CLASS_MISMATCH
+//
+// MessageText:
+//
+// The INF or the device information set or element does not match the specified install class.
+//
+ SPAPI_E_CLASS_MISMATCH = HRESULT($800F0201);
+ {$EXTERNALSYM SPAPI_E_CLASS_MISMATCH}
+
+//
+// MessageId: SPAPI_E_DUPLICATE_FOUND
+//
+// MessageText:
+//
+// An existing device was found that is a duplicate of the device being manually installed.
+//
+ SPAPI_E_DUPLICATE_FOUND = HRESULT($800F0202);
+ {$EXTERNALSYM SPAPI_E_DUPLICATE_FOUND}
+
+//
+// MessageId: SPAPI_E_NO_DRIVER_SELECTED
+//
+// MessageText:
+//
+// There is no driver selected for the device information set or element.
+//
+ SPAPI_E_NO_DRIVER_SELECTED = HRESULT($800F0203);
+ {$EXTERNALSYM SPAPI_E_NO_DRIVER_SELECTED}
+
+//
+// MessageId: SPAPI_E_KEY_DOES_NOT_EXIST
+//
+// MessageText:
+//
+// The requested device registry key does not exist.
+//
+ SPAPI_E_KEY_DOES_NOT_EXIST = HRESULT($800F0204);
+ {$EXTERNALSYM SPAPI_E_KEY_DOES_NOT_EXIST}
+
+//
+// MessageId: SPAPI_E_INVALID_DEVINST_NAME
+//
+// MessageText:
+//
+// The device instance name is invalid.
+//
+ SPAPI_E_INVALID_DEVINST_NAME = HRESULT($800F0205);
+ {$EXTERNALSYM SPAPI_E_INVALID_DEVINST_NAME}
+
+//
+// MessageId: SPAPI_E_INVALID_CLASS
+//
+// MessageText:
+//
+// The install class is not present or is invalid.
+//
+ SPAPI_E_INVALID_CLASS = HRESULT($800F0206);
+ {$EXTERNALSYM SPAPI_E_INVALID_CLASS}
+
+//
+// MessageId: SPAPI_E_DEVINST_ALREADY_EXISTS
+//
+// MessageText:
+//
+// The device instance cannot be created because it already exists.
+//
+ SPAPI_E_DEVINST_ALREADY_EXISTS = HRESULT($800F0207);
+ {$EXTERNALSYM SPAPI_E_DEVINST_ALREADY_EXISTS}
+
+//
+// MessageId: SPAPI_E_DEVINFO_NOT_REGISTERED
+//
+// MessageText:
+//
+// The operation cannot be performed on a device information element that has not been registered.
+//
+ SPAPI_E_DEVINFO_NOT_REGISTERED = HRESULT($800F0208);
+ {$EXTERNALSYM SPAPI_E_DEVINFO_NOT_REGISTERED}
+
+//
+// MessageId: SPAPI_E_INVALID_REG_PROPERTY
+//
+// MessageText:
+//
+// The device property code is invalid.
+//
+ SPAPI_E_INVALID_REG_PROPERTY = HRESULT($800F0209);
+ {$EXTERNALSYM SPAPI_E_INVALID_REG_PROPERTY}
+
+//
+// MessageId: SPAPI_E_NO_INF
+//
+// MessageText:
+//
+// The INF from which a driver list is to be built does not exist.
+//
+ SPAPI_E_NO_INF = HRESULT($800F020A);
+ {$EXTERNALSYM SPAPI_E_NO_INF}
+
+//
+// MessageId: SPAPI_E_NO_SUCH_DEVINST
+//
+// MessageText:
+//
+// The device instance does not exist in the hardware tree.
+//
+ SPAPI_E_NO_SUCH_DEVINST = HRESULT($800F020B);
+ {$EXTERNALSYM SPAPI_E_NO_SUCH_DEVINST}
+
+//
+// MessageId: SPAPI_E_CANT_LOAD_CLASS_ICON
+//
+// MessageText:
+//
+// The icon representing this install class cannot be loaded.
+//
+ SPAPI_E_CANT_LOAD_CLASS_ICON = HRESULT($800F020C);
+ {$EXTERNALSYM SPAPI_E_CANT_LOAD_CLASS_ICON}
+
+//
+// MessageId: SPAPI_E_INVALID_CLASS_INSTALLER
+//
+// MessageText:
+//
+// The class installer registry entry is invalid.
+//
+ SPAPI_E_INVALID_CLASS_INSTALLER = HRESULT($800F020D);
+ {$EXTERNALSYM SPAPI_E_INVALID_CLASS_INSTALLER}
+
+//
+// MessageId: SPAPI_E_DI_DO_DEFAULT
+//
+// MessageText:
+//
+// The class installer has indicated that the default action should be performed for this installation request.
+//
+ SPAPI_E_DI_DO_DEFAULT = HRESULT($800F020E);
+ {$EXTERNALSYM SPAPI_E_DI_DO_DEFAULT}
+
+//
+// MessageId: SPAPI_E_DI_NOFILECOPY
+//
+// MessageText:
+//
+// The operation does not require any files to be copied.
+//
+ SPAPI_E_DI_NOFILECOPY = HRESULT($800F020F);
+ {$EXTERNALSYM SPAPI_E_DI_NOFILECOPY}
+
+//
+// MessageId: SPAPI_E_INVALID_HWPROFILE
+//
+// MessageText:
+//
+// The specified hardware profile does not exist.
+//
+ SPAPI_E_INVALID_HWPROFILE = HRESULT($800F0210);
+ {$EXTERNALSYM SPAPI_E_INVALID_HWPROFILE}
+
+//
+// MessageId: SPAPI_E_NO_DEVICE_SELECTED
+//
+// MessageText:
+//
+// There is no device information element currently selected for this device information set.
+//
+ SPAPI_E_NO_DEVICE_SELECTED = HRESULT($800F0211);
+ {$EXTERNALSYM SPAPI_E_NO_DEVICE_SELECTED}
+
+//
+// MessageId: SPAPI_E_DEVINFO_LIST_LOCKED
+//
+// MessageText:
+//
+// The operation cannot be performed because the device information set is locked.
+//
+ SPAPI_E_DEVINFO_LIST_LOCKED = HRESULT($800F0212);
+ {$EXTERNALSYM SPAPI_E_DEVINFO_LIST_LOCKED}
+
+//
+// MessageId: SPAPI_E_DEVINFO_DATA_LOCKED
+//
+// MessageText:
+//
+// The operation cannot be performed because the device information element is locked.
+//
+ SPAPI_E_DEVINFO_DATA_LOCKED = HRESULT($800F0213);
+ {$EXTERNALSYM SPAPI_E_DEVINFO_DATA_LOCKED}
+
+//
+// MessageId: SPAPI_E_DI_BAD_PATH
+//
+// MessageText:
+//
+// The specified path does not contain any applicable device INFs.
+//
+ SPAPI_E_DI_BAD_PATH = HRESULT($800F0214);
+ {$EXTERNALSYM SPAPI_E_DI_BAD_PATH}
+
+//
+// MessageId: SPAPI_E_NO_CLASSINSTALL_PARAMS
+//
+// MessageText:
+//
+// No class installer parameters have been set for the device information set or element.
+//
+ SPAPI_E_NO_CLASSINSTALL_PARAMS = HRESULT($800F0215);
+ {$EXTERNALSYM SPAPI_E_NO_CLASSINSTALL_PARAMS}
+
+//
+// MessageId: SPAPI_E_FILEQUEUE_LOCKED
+//
+// MessageText:
+//
+// The operation cannot be performed because the file queue is locked.
+//
+ SPAPI_E_FILEQUEUE_LOCKED = HRESULT($800F0216);
+ {$EXTERNALSYM SPAPI_E_FILEQUEUE_LOCKED}
+
+//
+// MessageId: SPAPI_E_BAD_SERVICE_INSTALLSECT
+//
+// MessageText:
+//
+// A service installation section in this INF is invalid.
+//
+ SPAPI_E_BAD_SERVICE_INSTALLSECT = HRESULT($800F0217);
+ {$EXTERNALSYM SPAPI_E_BAD_SERVICE_INSTALLSECT}
+
+//
+// MessageId: SPAPI_E_NO_CLASS_DRIVER_LIST
+//
+// MessageText:
+//
+// There is no class driver list for the device information element.
+//
+ SPAPI_E_NO_CLASS_DRIVER_LIST = HRESULT($800F0218);
+ {$EXTERNALSYM SPAPI_E_NO_CLASS_DRIVER_LIST}
+
+//
+// MessageId: SPAPI_E_NO_ASSOCIATED_SERVICE
+//
+// MessageText:
+//
+// The installation failed because a function driver was not specified for this device instance.
+//
+ SPAPI_E_NO_ASSOCIATED_SERVICE = HRESULT($800F0219);
+ {$EXTERNALSYM SPAPI_E_NO_ASSOCIATED_SERVICE}
+
+//
+// MessageId: SPAPI_E_NO_DEFAULT_DEVICE_INTERFACE
+//
+// MessageText:
+//
+// There is presently no default device interface designated for this interface class.
+//
+ SPAPI_E_NO_DEFAULT_DEVICE_INTERFACE = HRESULT($800F021A);
+ {$EXTERNALSYM SPAPI_E_NO_DEFAULT_DEVICE_INTERFACE}
+
+//
+// MessageId: SPAPI_E_DEVICE_INTERFACE_ACTIVE
+//
+// MessageText:
+//
+// The operation cannot be performed because the device interface is currently active.
+//
+ SPAPI_E_DEVICE_INTERFACE_ACTIVE = HRESULT($800F021B);
+ {$EXTERNALSYM SPAPI_E_DEVICE_INTERFACE_ACTIVE}
+
+//
+// MessageId: SPAPI_E_DEVICE_INTERFACE_REMOVED
+//
+// MessageText:
+//
+// The operation cannot be performed because the device interface has been removed from the system.
+//
+ SPAPI_E_DEVICE_INTERFACE_REMOVED = HRESULT($800F021C);
+ {$EXTERNALSYM SPAPI_E_DEVICE_INTERFACE_REMOVED}
+
+//
+// MessageId: SPAPI_E_BAD_INTERFACE_INSTALLSECT
+//
+// MessageText:
+//
+// An interface installation section in this INF is invalid.
+//
+ SPAPI_E_BAD_INTERFACE_INSTALLSECT = HRESULT($800F021D);
+ {$EXTERNALSYM SPAPI_E_BAD_INTERFACE_INSTALLSECT}
+
+//
+// MessageId: SPAPI_E_NO_SUCH_INTERFACE_CLASS
+//
+// MessageText:
+//
+// This interface class does not exist in the system.
+//
+ SPAPI_E_NO_SUCH_INTERFACE_CLASS = HRESULT($800F021E);
+ {$EXTERNALSYM SPAPI_E_NO_SUCH_INTERFACE_CLASS}
+
+//
+// MessageId: SPAPI_E_INVALID_REFERENCE_STRING
+//
+// MessageText:
+//
+// The reference string supplied for this interface device is invalid.
+//
+ SPAPI_E_INVALID_REFERENCE_STRING = HRESULT($800F021F);
+ {$EXTERNALSYM SPAPI_E_INVALID_REFERENCE_STRING}
+
+//
+// MessageId: SPAPI_E_INVALID_MACHINENAME
+//
+// MessageText:
+//
+// The specified machine name does not conform to UNC naming conventions.
+//
+ SPAPI_E_INVALID_MACHINENAME = HRESULT($800F0220);
+ {$EXTERNALSYM SPAPI_E_INVALID_MACHINENAME}
+
+//
+// MessageId: SPAPI_E_REMOTE_COMM_FAILURE
+//
+// MessageText:
+//
+// A general remote communication error occurred.
+//
+ SPAPI_E_REMOTE_COMM_FAILURE = HRESULT($800F0221);
+ {$EXTERNALSYM SPAPI_E_REMOTE_COMM_FAILURE}
+
+//
+// MessageId: SPAPI_E_MACHINE_UNAVAILABLE
+//
+// MessageText:
+//
+// The machine selected for remote communication is not available at this time.
+//
+ SPAPI_E_MACHINE_UNAVAILABLE = HRESULT($800F0222);
+ {$EXTERNALSYM SPAPI_E_MACHINE_UNAVAILABLE}
+
+//
+// MessageId: SPAPI_E_NO_CONFIGMGR_SERVICES
+//
+// MessageText:
+//
+// The Plug and Play service is not available on the remote machine.
+//
+ SPAPI_E_NO_CONFIGMGR_SERVICES = HRESULT($800F0223);
+ {$EXTERNALSYM SPAPI_E_NO_CONFIGMGR_SERVICES}
+
+//
+// MessageId: SPAPI_E_INVALID_PROPPAGE_PROVIDER
+//
+// MessageText:
+//
+// The property page provider registry entry is invalid.
+//
+ SPAPI_E_INVALID_PROPPAGE_PROVIDER = HRESULT($800F0224);
+ {$EXTERNALSYM SPAPI_E_INVALID_PROPPAGE_PROVIDER}
+
+//
+// MessageId: SPAPI_E_NO_SUCH_DEVICE_INTERFACE
+//
+// MessageText:
+//
+// The requested device interface is not present in the system.
+//
+ SPAPI_E_NO_SUCH_DEVICE_INTERFACE = HRESULT($800F0225);
+ {$EXTERNALSYM SPAPI_E_NO_SUCH_DEVICE_INTERFACE}
+
+//
+// MessageId: SPAPI_E_DI_POSTPROCESSING_REQUIRED
+//
+// MessageText:
+//
+// The device's co-installer has additional work to perform after installation is complete.
+//
+ SPAPI_E_DI_POSTPROCESSING_REQUIRED = HRESULT($800F0226);
+ {$EXTERNALSYM SPAPI_E_DI_POSTPROCESSING_REQUIRED}
+
+//
+// MessageId: SPAPI_E_INVALID_COINSTALLER
+//
+// MessageText:
+//
+// The device's co-installer is invalid.
+//
+ SPAPI_E_INVALID_COINSTALLER = HRESULT($800F0227);
+ {$EXTERNALSYM SPAPI_E_INVALID_COINSTALLER}
+
+//
+// MessageId: SPAPI_E_NO_COMPAT_DRIVERS
+//
+// MessageText:
+//
+// There are no compatible drivers for this device.
+//
+ SPAPI_E_NO_COMPAT_DRIVERS = HRESULT($800F0228);
+ {$EXTERNALSYM SPAPI_E_NO_COMPAT_DRIVERS}
+
+//
+// MessageId: SPAPI_E_NO_DEVICE_ICON
+//
+// MessageText:
+//
+// There is no icon that represents this device or device type.
+//
+ SPAPI_E_NO_DEVICE_ICON = HRESULT($800F0229);
+ {$EXTERNALSYM SPAPI_E_NO_DEVICE_ICON}
+
+//
+// MessageId: SPAPI_E_INVALID_INF_LOGCONFIG
+//
+// MessageText:
+//
+// A logical configuration specified in this INF is invalid.
+//
+ SPAPI_E_INVALID_INF_LOGCONFIG = HRESULT($800F022A);
+ {$EXTERNALSYM SPAPI_E_INVALID_INF_LOGCONFIG}
+
+//
+// MessageId: SPAPI_E_DI_DONT_INSTALL
+//
+// MessageText:
+//
+// The class installer has denied the request to install or upgrade this device.
+//
+ SPAPI_E_DI_DONT_INSTALL = HRESULT($800F022B);
+ {$EXTERNALSYM SPAPI_E_DI_DONT_INSTALL}
+
+//
+// MessageId: SPAPI_E_INVALID_FILTER_DRIVER
+//
+// MessageText:
+//
+// One of the filter drivers installed for this device is invalid.
+//
+ SPAPI_E_INVALID_FILTER_DRIVER = HRESULT($800F022C);
+ {$EXTERNALSYM SPAPI_E_INVALID_FILTER_DRIVER}
+
+//
+// MessageId: SPAPI_E_NON_WINDOWS_NT_DRIVER
+//
+// MessageText:
+//
+// The driver selected for this device does not support Windows XP.
+//
+ SPAPI_E_NON_WINDOWS_NT_DRIVER = HRESULT($800F022D);
+ {$EXTERNALSYM SPAPI_E_NON_WINDOWS_NT_DRIVER}
+
+//
+// MessageId: SPAPI_E_NON_WINDOWS_DRIVER
+//
+// MessageText:
+//
+// The driver selected for this device does not support Windows.
+//
+ SPAPI_E_NON_WINDOWS_DRIVER = HRESULT($800F022E);
+ {$EXTERNALSYM SPAPI_E_NON_WINDOWS_DRIVER}
+
+//
+// MessageId: SPAPI_E_NO_CATALOG_FOR_OEM_INF
+//
+// MessageText:
+//
+// The third-party INF does not contain digital signature information.
+//
+ SPAPI_E_NO_CATALOG_FOR_OEM_INF = HRESULT($800F022F);
+ {$EXTERNALSYM SPAPI_E_NO_CATALOG_FOR_OEM_INF}
+
+//
+// MessageId: SPAPI_E_DEVINSTALL_QUEUE_NONNATIVE
+//
+// MessageText:
+//
+// An invalid attempt was made to use a device installation file queue for verification of digital signatures relative to other platforms.
+//
+ SPAPI_E_DEVINSTALL_QUEUE_NONNATIVE = HRESULT($800F0230);
+ {$EXTERNALSYM SPAPI_E_DEVINSTALL_QUEUE_NONNATIVE}
+
+//
+// MessageId: SPAPI_E_NOT_DISABLEABLE
+//
+// MessageText:
+//
+// The device cannot be disabled.
+//
+ SPAPI_E_NOT_DISABLEABLE = HRESULT($800F0231);
+ {$EXTERNALSYM SPAPI_E_NOT_DISABLEABLE}
+
+//
+// MessageId: SPAPI_E_CANT_REMOVE_DEVINST
+//
+// MessageText:
+//
+// The device could not be dynamically removed.
+//
+ SPAPI_E_CANT_REMOVE_DEVINST = HRESULT($800F0232);
+ {$EXTERNALSYM SPAPI_E_CANT_REMOVE_DEVINST}
+
+//
+// MessageId: SPAPI_E_INVALID_TARGET
+//
+// MessageText:
+//
+// Cannot copy to specified target.
+//
+ SPAPI_E_INVALID_TARGET = HRESULT($800F0233);
+ {$EXTERNALSYM SPAPI_E_INVALID_TARGET}
+
+//
+// MessageId: SPAPI_E_DRIVER_NONNATIVE
+//
+// MessageText:
+//
+// Driver is not intended for this platform.
+//
+ SPAPI_E_DRIVER_NONNATIVE = HRESULT($800F0234);
+ {$EXTERNALSYM SPAPI_E_DRIVER_NONNATIVE}
+
+//
+// MessageId: SPAPI_E_IN_WOW64
+//
+// MessageText:
+//
+// Operation not allowed in WOW64.
+//
+ SPAPI_E_IN_WOW64 = HRESULT($800F0235);
+ {$EXTERNALSYM SPAPI_E_IN_WOW64}
+
+//
+// MessageId: SPAPI_E_SET_SYSTEM_RESTORE_POINT
+//
+// MessageText:
+//
+// The operation involving unsigned file copying was rolled back, so that a system restore point could be set.
+//
+ SPAPI_E_SET_SYSTEM_RESTORE_POINT = HRESULT($800F0236);
+ {$EXTERNALSYM SPAPI_E_SET_SYSTEM_RESTORE_POINT}
+
+//
+// MessageId: SPAPI_E_INCORRECTLY_COPIED_INF
+//
+// MessageText:
+//
+// An INF was copied into the Windows INF directory in an improper manner.
+//
+ SPAPI_E_INCORRECTLY_COPIED_INF = HRESULT($800F0237);
+ {$EXTERNALSYM SPAPI_E_INCORRECTLY_COPIED_INF}
+
+//
+// MessageId: SPAPI_E_SCE_DISABLED
+//
+// MessageText:
+//
+// The Security Configuration Editor (SCE) APIs have been disabled on this Embedded product.
+//
+ SPAPI_E_SCE_DISABLED = HRESULT($800F0238);
+ {$EXTERNALSYM SPAPI_E_SCE_DISABLED}
+
+//
+// MessageId: SPAPI_E_UNKNOWN_EXCEPTION
+//
+// MessageText:
+//
+// An unknown exception was encountered.
+//
+ SPAPI_E_UNKNOWN_EXCEPTION = HRESULT($800F0239);
+ {$EXTERNALSYM SPAPI_E_UNKNOWN_EXCEPTION}
+
+//
+// MessageId: SPAPI_E_PNP_REGISTRY_ERROR
+//
+// MessageText:
+//
+// A problem was encountered when accessing the Plug and Play registry database.
+//
+ SPAPI_E_PNP_REGISTRY_ERROR = HRESULT($800F023A);
+ {$EXTERNALSYM SPAPI_E_PNP_REGISTRY_ERROR}
+
+//
+// MessageId: SPAPI_E_REMOTE_REQUEST_UNSUPPORTED
+//
+// MessageText:
+//
+// The requested operation is not supported for a remote machine.
+//
+ SPAPI_E_REMOTE_REQUEST_UNSUPPORTED = HRESULT($800F023B);
+ {$EXTERNALSYM SPAPI_E_REMOTE_REQUEST_UNSUPPORTED}
+
+//
+// MessageId: SPAPI_E_NOT_AN_INSTALLED_OEM_INF
+//
+// MessageText:
+//
+// The specified file is not an installed OEM INF.
+//
+ SPAPI_E_NOT_AN_INSTALLED_OEM_INF = HRESULT($800F023C);
+ {$EXTERNALSYM SPAPI_E_NOT_AN_INSTALLED_OEM_INF}
+
+//
+// MessageId: SPAPI_E_INF_IN_USE_BY_DEVICES
+//
+// MessageText:
+//
+// One or more devices are presently installed using the specified INF.
+//
+ SPAPI_E_INF_IN_USE_BY_DEVICES = HRESULT($800F023D);
+ {$EXTERNALSYM SPAPI_E_INF_IN_USE_BY_DEVICES}
+
+//
+// MessageId: SPAPI_E_DI_FUNCTION_OBSOLETE
+//
+// MessageText:
+//
+// The requested device install operation is obsolete.
+//
+ SPAPI_E_DI_FUNCTION_OBSOLETE = HRESULT($800F023E);
+ {$EXTERNALSYM SPAPI_E_DI_FUNCTION_OBSOLETE}
+
+//
+// MessageId: SPAPI_E_NO_AUTHENTICODE_CATALOG
+//
+// MessageText:
+//
+// A file could not be verified because it does not have an associated catalog signed via Authenticode(tm).
+//
+ SPAPI_E_NO_AUTHENTICODE_CATALOG = HRESULT($800F023F);
+ {$EXTERNALSYM SPAPI_E_NO_AUTHENTICODE_CATALOG}
+
+//
+// MessageId: SPAPI_E_AUTHENTICODE_DISALLOWED
+//
+// MessageText:
+//
+// Authenticode(tm) signature verification is not supported for the specified INF.
+//
+ SPAPI_E_AUTHENTICODE_DISALLOWED = HRESULT($800F0240);
+ {$EXTERNALSYM SPAPI_E_AUTHENTICODE_DISALLOWED}
+
+//
+// MessageId: SPAPI_E_AUTHENTICODE_TRUSTED_PUBLISHER
+//
+// MessageText:
+//
+// The INF was signed with an Authenticode(tm) catalog from a trusted publisher.
+//
+ SPAPI_E_AUTHENTICODE_TRUSTED_PUBLISHER = HRESULT($800F0241);
+ {$EXTERNALSYM SPAPI_E_AUTHENTICODE_TRUSTED_PUBLISHER}
+
+//
+// MessageId: SPAPI_E_AUTHENTICODE_TRUST_NOT_ESTABLISHED
+//
+// MessageText:
+//
+// The publisher of an Authenticode(tm) signed catalog has not yet been established as trusted.
+//
+ SPAPI_E_AUTHENTICODE_TRUST_NOT_ESTABLISHED = HRESULT($800F0242);
+ {$EXTERNALSYM SPAPI_E_AUTHENTICODE_TRUST_NOT_ESTABLISHED}
+
+//
+// MessageId: SPAPI_E_AUTHENTICODE_PUBLISHER_NOT_TRUSTED
+//
+// MessageText:
+//
+// The publisher of an Authenticode(tm) signed catalog was not established as trusted.
+//
+ SPAPI_E_AUTHENTICODE_PUBLISHER_NOT_TRUSTED = HRESULT($800F0243);
+ {$EXTERNALSYM SPAPI_E_AUTHENTICODE_PUBLISHER_NOT_TRUSTED}
+
+//
+// MessageId: SPAPI_E_SIGNATURE_OSATTRIBUTE_MISMATCH
+//
+// MessageText:
+//
+// The software was tested for compliance with Windows Logo requirements on a different version of Windows, and may not be compatible with this version.
+//
+ SPAPI_E_SIGNATURE_OSATTRIBUTE_MISMATCH = HRESULT($800F0244);
+ {$EXTERNALSYM SPAPI_E_SIGNATURE_OSATTRIBUTE_MISMATCH}
+
+//
+// MessageId: SPAPI_E_ONLY_VALIDATE_VIA_AUTHENTICODE
+//
+// MessageText:
+//
+// The file may only be validated by a catalog signed via Authenticode(tm).
+//
+ SPAPI_E_ONLY_VALIDATE_VIA_AUTHENTICODE = HRESULT($800F0245);
+ {$EXTERNALSYM SPAPI_E_ONLY_VALIDATE_VIA_AUTHENTICODE}
+
+//
+// MessageId: SPAPI_E_UNRECOVERABLE_STACK_OVERFLOW
+//
+// MessageText:
+//
+// An unrecoverable stack overflow was encountered.
+//
+ SPAPI_E_UNRECOVERABLE_STACK_OVERFLOW = HRESULT($800F0300);
+ {$EXTERNALSYM SPAPI_E_UNRECOVERABLE_STACK_OVERFLOW}
+
+//
+// MessageId: SPAPI_E_ERROR_NOT_INSTALLED
+//
+// MessageText:
+//
+// No installed components were detected.
+//
+ SPAPI_E_ERROR_NOT_INSTALLED = HRESULT($800F1000);
+ {$EXTERNALSYM SPAPI_E_ERROR_NOT_INSTALLED}
+
+// *****************
+// FACILITY_SCARD
+// *****************
+//
+// =============================
+// Facility SCARD Error Messages
+// =============================
+//
+ SCARD_S_SUCCESS = NO_ERROR;
+ {$EXTERNALSYM SCARD_S_SUCCESS}
+//
+// MessageId: SCARD_F_INTERNAL_ERROR
+//
+// MessageText:
+//
+// An internal consistency check failed.
+//
+ SCARD_F_INTERNAL_ERROR = HRESULT($80100001);
+ {$EXTERNALSYM SCARD_F_INTERNAL_ERROR}
+
+//
+// MessageId: SCARD_E_CANCELLED
+//
+// MessageText:
+//
+// The action was cancelled by an SCardCancel request.
+//
+ SCARD_E_CANCELLED = HRESULT($80100002);
+ {$EXTERNALSYM SCARD_E_CANCELLED}
+
+//
+// MessageId: SCARD_E_INVALID_HANDLE
+//
+// MessageText:
+//
+// The supplied handle was invalid.
+//
+ SCARD_E_INVALID_HANDLE = HRESULT($80100003);
+ {$EXTERNALSYM SCARD_E_INVALID_HANDLE}
+
+//
+// MessageId: SCARD_E_INVALID_PARAMETER
+//
+// MessageText:
+//
+// One or more of the supplied parameters could not be properly interpreted.
+//
+ SCARD_E_INVALID_PARAMETER = HRESULT($80100004);
+ {$EXTERNALSYM SCARD_E_INVALID_PARAMETER}
+
+//
+// MessageId: SCARD_E_INVALID_TARGET
+//
+// MessageText:
+//
+// Registry startup information is missing or invalid.
+//
+ SCARD_E_INVALID_TARGET = HRESULT($80100005);
+ {$EXTERNALSYM SCARD_E_INVALID_TARGET}
+
+//
+// MessageId: SCARD_E_NO_MEMORY
+//
+// MessageText:
+//
+// Not enough memory available to complete this command.
+//
+ SCARD_E_NO_MEMORY = HRESULT($80100006);
+ {$EXTERNALSYM SCARD_E_NO_MEMORY}
+
+//
+// MessageId: SCARD_F_WAITED_TOO_LONG
+//
+// MessageText:
+//
+// An internal consistency timer has expired.
+//
+ SCARD_F_WAITED_TOO_LONG = HRESULT($80100007);
+ {$EXTERNALSYM SCARD_F_WAITED_TOO_LONG}
+
+//
+// MessageId: SCARD_E_INSUFFICIENT_BUFFER
+//
+// MessageText:
+//
+// The data buffer to receive returned data is too small for the returned data.
+//
+ SCARD_E_INSUFFICIENT_BUFFER = HRESULT($80100008);
+ {$EXTERNALSYM SCARD_E_INSUFFICIENT_BUFFER}
+
+//
+// MessageId: SCARD_E_UNKNOWN_READER
+//
+// MessageText:
+//
+// The specified reader name is not recognized.
+//
+ SCARD_E_UNKNOWN_READER = HRESULT($80100009);
+ {$EXTERNALSYM SCARD_E_UNKNOWN_READER}
+
+//
+// MessageId: SCARD_E_TIMEOUT
+//
+// MessageText:
+//
+// The user-specified timeout value has expired.
+//
+ SCARD_E_TIMEOUT = HRESULT($8010000A);
+ {$EXTERNALSYM SCARD_E_TIMEOUT}
+
+//
+// MessageId: SCARD_E_SHARING_VIOLATION
+//
+// MessageText:
+//
+// The smart card cannot be accessed because of other connections outstanding.
+//
+ SCARD_E_SHARING_VIOLATION = HRESULT($8010000B);
+ {$EXTERNALSYM SCARD_E_SHARING_VIOLATION}
+
+//
+// MessageId: SCARD_E_NO_SMARTCARD
+//
+// MessageText:
+//
+// The operation requires a Smart Card, but no Smart Card is currently in the device.
+//
+ SCARD_E_NO_SMARTCARD = HRESULT($8010000C);
+ {$EXTERNALSYM SCARD_E_NO_SMARTCARD}
+
+//
+// MessageId: SCARD_E_UNKNOWN_CARD
+//
+// MessageText:
+//
+// The specified smart card name is not recognized.
+//
+ SCARD_E_UNKNOWN_CARD = HRESULT($8010000D);
+ {$EXTERNALSYM SCARD_E_UNKNOWN_CARD}
+
+//
+// MessageId: SCARD_E_CANT_DISPOSE
+//
+// MessageText:
+//
+// The system could not dispose of the media in the requested manner.
+//
+ SCARD_E_CANT_DISPOSE = HRESULT($8010000E);
+ {$EXTERNALSYM SCARD_E_CANT_DISPOSE}
+
+//
+// MessageId: SCARD_E_PROTO_MISMATCH
+//
+// MessageText:
+//
+// The requested protocols are incompatible with the protocol currently in use with the smart card.
+//
+ SCARD_E_PROTO_MISMATCH = HRESULT($8010000F);
+ {$EXTERNALSYM SCARD_E_PROTO_MISMATCH}
+
+//
+// MessageId: SCARD_E_NOT_READY
+//
+// MessageText:
+//
+// The reader or smart card is not ready to accept commands.
+//
+ SCARD_E_NOT_READY = HRESULT($80100010);
+ {$EXTERNALSYM SCARD_E_NOT_READY}
+
+//
+// MessageId: SCARD_E_INVALID_VALUE
+//
+// MessageText:
+//
+// One or more of the supplied parameters values could not be properly interpreted.
+//
+ SCARD_E_INVALID_VALUE = HRESULT($80100011);
+ {$EXTERNALSYM SCARD_E_INVALID_VALUE}
+
+//
+// MessageId: SCARD_E_SYSTEM_CANCELLED
+//
+// MessageText:
+//
+// The action was cancelled by the system, presumably to log off or shut down.
+//
+ SCARD_E_SYSTEM_CANCELLED = HRESULT($80100012);
+ {$EXTERNALSYM SCARD_E_SYSTEM_CANCELLED}
+
+//
+// MessageId: SCARD_F_COMM_ERROR
+//
+// MessageText:
+//
+// An internal communications error has been detected.
+//
+ SCARD_F_COMM_ERROR = HRESULT($80100013);
+ {$EXTERNALSYM SCARD_F_COMM_ERROR}
+
+//
+// MessageId: SCARD_F_UNKNOWN_ERROR
+//
+// MessageText:
+//
+// An internal error has been detected, but the source is unknown.
+//
+ SCARD_F_UNKNOWN_ERROR = HRESULT($80100014);
+ {$EXTERNALSYM SCARD_F_UNKNOWN_ERROR}
+
+//
+// MessageId: SCARD_E_INVALID_ATR
+//
+// MessageText:
+//
+// An ATR obtained from the registry is not a valid ATR string.
+//
+ SCARD_E_INVALID_ATR = HRESULT($80100015);
+ {$EXTERNALSYM SCARD_E_INVALID_ATR}
+
+//
+// MessageId: SCARD_E_NOT_TRANSACTED
+//
+// MessageText:
+//
+// An attempt was made to end a non-existent transaction.
+//
+ SCARD_E_NOT_TRANSACTED = HRESULT($80100016);
+ {$EXTERNALSYM SCARD_E_NOT_TRANSACTED}
+
+//
+// MessageId: SCARD_E_READER_UNAVAILABLE
+//
+// MessageText:
+//
+// The specified reader is not currently available for use.
+//
+ SCARD_E_READER_UNAVAILABLE = HRESULT($80100017);
+ {$EXTERNALSYM SCARD_E_READER_UNAVAILABLE}
+
+//
+// MessageId: SCARD_P_SHUTDOWN
+//
+// MessageText:
+//
+// The operation has been aborted to allow the server application to exit.
+//
+ SCARD_P_SHUTDOWN = HRESULT($80100018);
+ {$EXTERNALSYM SCARD_P_SHUTDOWN}
+
+//
+// MessageId: SCARD_E_PCI_TOO_SMALL
+//
+// MessageText:
+//
+// The PCI Receive buffer was too small.
+//
+ SCARD_E_PCI_TOO_SMALL = HRESULT($80100019);
+ {$EXTERNALSYM SCARD_E_PCI_TOO_SMALL}
+
+//
+// MessageId: SCARD_E_READER_UNSUPPORTED
+//
+// MessageText:
+//
+// The reader driver does not meet minimal requirements for support.
+//
+ SCARD_E_READER_UNSUPPORTED = HRESULT($8010001A);
+ {$EXTERNALSYM SCARD_E_READER_UNSUPPORTED}
+
+//
+// MessageId: SCARD_E_DUPLICATE_READER
+//
+// MessageText:
+//
+// The reader driver did not produce a unique reader name.
+//
+ SCARD_E_DUPLICATE_READER = HRESULT($8010001B);
+ {$EXTERNALSYM SCARD_E_DUPLICATE_READER}
+
+//
+// MessageId: SCARD_E_CARD_UNSUPPORTED
+//
+// MessageText:
+//
+// The smart card does not meet minimal requirements for support.
+//
+ SCARD_E_CARD_UNSUPPORTED = HRESULT($8010001C);
+ {$EXTERNALSYM SCARD_E_CARD_UNSUPPORTED}
+
+//
+// MessageId: SCARD_E_NO_SERVICE
+//
+// MessageText:
+//
+// The Smart card resource manager is not running.
+//
+ SCARD_E_NO_SERVICE = HRESULT($8010001D);
+ {$EXTERNALSYM SCARD_E_NO_SERVICE}
+
+//
+// MessageId: SCARD_E_SERVICE_STOPPED
+//
+// MessageText:
+//
+// The Smart card resource manager has shut down.
+//
+ SCARD_E_SERVICE_STOPPED = HRESULT($8010001E);
+ {$EXTERNALSYM SCARD_E_SERVICE_STOPPED}
+
+//
+// MessageId: SCARD_E_UNEXPECTED
+//
+// MessageText:
+//
+// An unexpected card error has occurred.
+//
+ SCARD_E_UNEXPECTED = HRESULT($8010001F);
+ {$EXTERNALSYM SCARD_E_UNEXPECTED}
+
+//
+// MessageId: SCARD_E_ICC_INSTALLATION
+//
+// MessageText:
+//
+// No Primary Provider can be found for the smart card.
+//
+ SCARD_E_ICC_INSTALLATION = HRESULT($80100020);
+ {$EXTERNALSYM SCARD_E_ICC_INSTALLATION}
+
+//
+// MessageId: SCARD_E_ICC_CREATEORDER
+//
+// MessageText:
+//
+// The requested order of object creation is not supported.
+//
+ SCARD_E_ICC_CREATEORDER = HRESULT($80100021);
+ {$EXTERNALSYM SCARD_E_ICC_CREATEORDER}
+
+//
+// MessageId: SCARD_E_UNSUPPORTED_FEATURE
+//
+// MessageText:
+//
+// This smart card does not support the requested feature.
+//
+ SCARD_E_UNSUPPORTED_FEATURE = HRESULT($80100022);
+ {$EXTERNALSYM SCARD_E_UNSUPPORTED_FEATURE}
+
+//
+// MessageId: SCARD_E_DIR_NOT_FOUND
+//
+// MessageText:
+//
+// The identified directory does not exist in the smart card.
+//
+ SCARD_E_DIR_NOT_FOUND = HRESULT($80100023);
+ {$EXTERNALSYM SCARD_E_DIR_NOT_FOUND}
+
+//
+// MessageId: SCARD_E_FILE_NOT_FOUND
+//
+// MessageText:
+//
+// The identified file does not exist in the smart card.
+//
+ SCARD_E_FILE_NOT_FOUND = HRESULT($80100024);
+ {$EXTERNALSYM SCARD_E_FILE_NOT_FOUND}
+
+//
+// MessageId: SCARD_E_NO_DIR
+//
+// MessageText:
+//
+// The supplied path does not represent a smart card directory.
+//
+ SCARD_E_NO_DIR = HRESULT($80100025);
+ {$EXTERNALSYM SCARD_E_NO_DIR}
+
+//
+// MessageId: SCARD_E_NO_FILE
+//
+// MessageText:
+//
+// The supplied path does not represent a smart card file.
+//
+ SCARD_E_NO_FILE = HRESULT($80100026);
+ {$EXTERNALSYM SCARD_E_NO_FILE}
+
+//
+// MessageId: SCARD_E_NO_ACCESS
+//
+// MessageText:
+//
+// Access is denied to this file.
+//
+ SCARD_E_NO_ACCESS = HRESULT($80100027);
+ {$EXTERNALSYM SCARD_E_NO_ACCESS}
+
+//
+// MessageId: SCARD_E_WRITE_TOO_MANY
+//
+// MessageText:
+//
+// The smartcard does not have enough memory to store the information.
+//
+ SCARD_E_WRITE_TOO_MANY = HRESULT($80100028);
+ {$EXTERNALSYM SCARD_E_WRITE_TOO_MANY}
+
+//
+// MessageId: SCARD_E_BAD_SEEK
+//
+// MessageText:
+//
+// There was an error trying to set the smart card file object pointer.
+//
+ SCARD_E_BAD_SEEK = HRESULT($80100029);
+ {$EXTERNALSYM SCARD_E_BAD_SEEK}
+
+//
+// MessageId: SCARD_E_INVALID_CHV
+//
+// MessageText:
+//
+// The supplied PIN is incorrect.
+//
+ SCARD_E_INVALID_CHV = HRESULT($8010002A);
+ {$EXTERNALSYM SCARD_E_INVALID_CHV}
+
+//
+// MessageId: SCARD_E_UNKNOWN_RES_MNG
+//
+// MessageText:
+//
+// An unrecognized error code was returned from a layered component.
+//
+ SCARD_E_UNKNOWN_RES_MNG = HRESULT($8010002B);
+ {$EXTERNALSYM SCARD_E_UNKNOWN_RES_MNG}
+
+//
+// MessageId: SCARD_E_NO_SUCH_CERTIFICATE
+//
+// MessageText:
+//
+// The requested certificate does not exist.
+//
+ SCARD_E_NO_SUCH_CERTIFICATE = HRESULT($8010002C);
+ {$EXTERNALSYM SCARD_E_NO_SUCH_CERTIFICATE}
+
+//
+// MessageId: SCARD_E_CERTIFICATE_UNAVAILABLE
+//
+// MessageText:
+//
+// The requested certificate could not be obtained.
+//
+ SCARD_E_CERTIFICATE_UNAVAILABLE = HRESULT($8010002D);
+ {$EXTERNALSYM SCARD_E_CERTIFICATE_UNAVAILABLE}
+
+//
+// MessageId: SCARD_E_NO_READERS_AVAILABLE
+//
+// MessageText:
+//
+// Cannot find a smart card reader.
+//
+ SCARD_E_NO_READERS_AVAILABLE = HRESULT($8010002E);
+ {$EXTERNALSYM SCARD_E_NO_READERS_AVAILABLE}
+
+//
+// MessageId: SCARD_E_COMM_DATA_LOST
+//
+// MessageText:
+//
+// A communications error with the smart card has been detected. Retry the operation.
+//
+ SCARD_E_COMM_DATA_LOST = HRESULT($8010002F);
+ {$EXTERNALSYM SCARD_E_COMM_DATA_LOST}
+
+//
+// MessageId: SCARD_E_NO_KEY_CONTAINER
+//
+// MessageText:
+//
+// The requested key container does not exist on the smart card.
+//
+ SCARD_E_NO_KEY_CONTAINER = HRESULT($80100030);
+ {$EXTERNALSYM SCARD_E_NO_KEY_CONTAINER}
+
+//
+// MessageId: SCARD_E_SERVER_TOO_BUSY
+//
+// MessageText:
+//
+// The Smart card resource manager is too busy to complete this operation.
+//
+ SCARD_E_SERVER_TOO_BUSY = HRESULT($80100031);
+ {$EXTERNALSYM SCARD_E_SERVER_TOO_BUSY}
+
+//
+// These are warning codes.
+//
+//
+// MessageId: SCARD_W_UNSUPPORTED_CARD
+//
+// MessageText:
+//
+// The reader cannot communicate with the smart card, due to ATR configuration conflicts.
+//
+ SCARD_W_UNSUPPORTED_CARD = HRESULT($80100065);
+ {$EXTERNALSYM SCARD_W_UNSUPPORTED_CARD}
+
+//
+// MessageId: SCARD_W_UNRESPONSIVE_CARD
+//
+// MessageText:
+//
+// The smart card is not responding to a reset.
+//
+ SCARD_W_UNRESPONSIVE_CARD = HRESULT($80100066);
+ {$EXTERNALSYM SCARD_W_UNRESPONSIVE_CARD}
+
+//
+// MessageId: SCARD_W_UNPOWERED_CARD
+//
+// MessageText:
+//
+// Power has been removed from the smart card, so that further communication is not possible.
+//
+ SCARD_W_UNPOWERED_CARD = HRESULT($80100067);
+ {$EXTERNALSYM SCARD_W_UNPOWERED_CARD}
+
+//
+// MessageId: SCARD_W_RESET_CARD
+//
+// MessageText:
+//
+// The smart card has been reset, so any shared state information is invalid.
+//
+ SCARD_W_RESET_CARD = HRESULT($80100068);
+ {$EXTERNALSYM SCARD_W_RESET_CARD}
+
+//
+// MessageId: SCARD_W_REMOVED_CARD
+//
+// MessageText:
+//
+// The smart card has been removed, so that further communication is not possible.
+//
+ SCARD_W_REMOVED_CARD = HRESULT($80100069);
+ {$EXTERNALSYM SCARD_W_REMOVED_CARD}
+
+//
+// MessageId: SCARD_W_SECURITY_VIOLATION
+//
+// MessageText:
+//
+// Access was denied because of a security violation.
+//
+ SCARD_W_SECURITY_VIOLATION = HRESULT($8010006A);
+ {$EXTERNALSYM SCARD_W_SECURITY_VIOLATION}
+
+//
+// MessageId: SCARD_W_WRONG_CHV
+//
+// MessageText:
+//
+// The card cannot be accessed because the wrong PIN was presented.
+//
+ SCARD_W_WRONG_CHV = HRESULT($8010006B);
+ {$EXTERNALSYM SCARD_W_WRONG_CHV}
+
+//
+// MessageId: SCARD_W_CHV_BLOCKED
+//
+// MessageText:
+//
+// The card cannot be accessed because the maximum number of PIN entry attempts has been reached.
+//
+ SCARD_W_CHV_BLOCKED = HRESULT($8010006C);
+ {$EXTERNALSYM SCARD_W_CHV_BLOCKED}
+
+//
+// MessageId: SCARD_W_EOF
+//
+// MessageText:
+//
+// The end of the smart card file has been reached.
+//
+ SCARD_W_EOF = HRESULT($8010006D);
+ {$EXTERNALSYM SCARD_W_EOF}
+
+//
+// MessageId: SCARD_W_CANCELLED_BY_USER
+//
+// MessageText:
+//
+// The action was cancelled by the user.
+//
+ SCARD_W_CANCELLED_BY_USER = HRESULT($8010006E);
+ {$EXTERNALSYM SCARD_W_CANCELLED_BY_USER}
+
+//
+// MessageId: SCARD_W_CARD_NOT_AUTHENTICATED
+//
+// MessageText:
+//
+// No PIN was presented to the smart card.
+//
+ SCARD_W_CARD_NOT_AUTHENTICATED = HRESULT($8010006F);
+ {$EXTERNALSYM SCARD_W_CARD_NOT_AUTHENTICATED}
+
+// *****************
+// FACILITY_COMPLUS
+// *****************
+//
+// ===============================
+// Facility COMPLUS Error Messages
+// ===============================
+//
+//
+// The following are the subranges within the COMPLUS facility
+// 0x400 - 0x4ff COMADMIN_E_CAT
+// 0x600 - 0x6ff COMQC errors
+// 0x700 - 0x7ff MSDTC errors
+// 0x800 - 0x8ff Other COMADMIN errors
+//
+// COMPLUS Admin errors
+//
+//
+// MessageId: COMADMIN_E_OBJECTERRORS
+//
+// MessageText:
+//
+// Errors occurred accessing one or more objects - the ErrorInfo collection may have more detail
+//
+ COMADMIN_E_OBJECTERRORS = HRESULT($80110401);
+ {$EXTERNALSYM COMADMIN_E_OBJECTERRORS}
+
+//
+// MessageId: COMADMIN_E_OBJECTINVALID
+//
+// MessageText:
+//
+// One or more of the object's properties are missing or invalid
+//
+ COMADMIN_E_OBJECTINVALID = HRESULT($80110402);
+ {$EXTERNALSYM COMADMIN_E_OBJECTINVALID}
+
+//
+// MessageId: COMADMIN_E_KEYMISSING
+//
+// MessageText:
+//
+// The object was not found in the catalog
+//
+ COMADMIN_E_KEYMISSING = HRESULT($80110403);
+ {$EXTERNALSYM COMADMIN_E_KEYMISSING}
+
+//
+// MessageId: COMADMIN_E_ALREADYINSTALLED
+//
+// MessageText:
+//
+// The object is already registered
+//
+ COMADMIN_E_ALREADYINSTALLED = HRESULT($80110404);
+ {$EXTERNALSYM COMADMIN_E_ALREADYINSTALLED}
+
+//
+// MessageId: COMADMIN_E_APP_FILE_WRITEFAIL
+//
+// MessageText:
+//
+// Error occurred writing to the application file
+//
+ COMADMIN_E_APP_FILE_WRITEFAIL = HRESULT($80110407);
+ {$EXTERNALSYM COMADMIN_E_APP_FILE_WRITEFAIL}
+
+//
+// MessageId: COMADMIN_E_APP_FILE_READFAIL
+//
+// MessageText:
+//
+// Error occurred reading the application file
+//
+ COMADMIN_E_APP_FILE_READFAIL = HRESULT($80110408);
+ {$EXTERNALSYM COMADMIN_E_APP_FILE_READFAIL}
+
+//
+// MessageId: COMADMIN_E_APP_FILE_VERSION
+//
+// MessageText:
+//
+// Invalid version number in application file
+//
+ COMADMIN_E_APP_FILE_VERSION = HRESULT($80110409);
+ {$EXTERNALSYM COMADMIN_E_APP_FILE_VERSION}
+
+//
+// MessageId: COMADMIN_E_BADPATH
+//
+// MessageText:
+//
+// The file path is invalid
+//
+ COMADMIN_E_BADPATH = HRESULT($8011040A);
+ {$EXTERNALSYM COMADMIN_E_BADPATH}
+
+//
+// MessageId: COMADMIN_E_APPLICATIONEXISTS
+//
+// MessageText:
+//
+// The application is already installed
+//
+ COMADMIN_E_APPLICATIONEXISTS = HRESULT($8011040B);
+ {$EXTERNALSYM COMADMIN_E_APPLICATIONEXISTS}
+
+//
+// MessageId: COMADMIN_E_ROLEEXISTS
+//
+// MessageText:
+//
+// The role already exists
+//
+ COMADMIN_E_ROLEEXISTS = HRESULT($8011040C);
+ {$EXTERNALSYM COMADMIN_E_ROLEEXISTS}
+
+//
+// MessageId: COMADMIN_E_CANTCOPYFILE
+//
+// MessageText:
+//
+// An error occurred copying the file
+//
+ COMADMIN_E_CANTCOPYFILE = HRESULT($8011040D);
+ {$EXTERNALSYM COMADMIN_E_CANTCOPYFILE}
+
+//
+// MessageId: COMADMIN_E_NOUSER
+//
+// MessageText:
+//
+// One or more users are not valid
+//
+ COMADMIN_E_NOUSER = HRESULT($8011040F);
+ {$EXTERNALSYM COMADMIN_E_NOUSER}
+
+//
+// MessageId: COMADMIN_E_INVALIDUSERIDS
+//
+// MessageText:
+//
+// One or more users in the application file are not valid
+//
+ COMADMIN_E_INVALIDUSERIDS = HRESULT($80110410);
+ {$EXTERNALSYM COMADMIN_E_INVALIDUSERIDS}
+
+//
+// MessageId: COMADMIN_E_NOREGISTRYCLSID
+//
+// MessageText:
+//
+// The component's CLSID is missing or corrupt
+//
+ COMADMIN_E_NOREGISTRYCLSID = HRESULT($80110411);
+ {$EXTERNALSYM COMADMIN_E_NOREGISTRYCLSID}
+
+//
+// MessageId: COMADMIN_E_BADREGISTRYPROGID
+//
+// MessageText:
+//
+// The component's progID is missing or corrupt
+//
+ COMADMIN_E_BADREGISTRYPROGID = HRESULT($80110412);
+ {$EXTERNALSYM COMADMIN_E_BADREGISTRYPROGID}
+
+//
+// MessageId: COMADMIN_E_AUTHENTICATIONLEVEL
+//
+// MessageText:
+//
+// Unable to set required authentication level for update request
+//
+ COMADMIN_E_AUTHENTICATIONLEVEL = HRESULT($80110413);
+ {$EXTERNALSYM COMADMIN_E_AUTHENTICATIONLEVEL}
+
+//
+// MessageId: COMADMIN_E_USERPASSWDNOTVALID
+//
+// MessageText:
+//
+// The identity or password set on the application is not valid
+//
+ COMADMIN_E_USERPASSWDNOTVALID = HRESULT($80110414);
+ {$EXTERNALSYM COMADMIN_E_USERPASSWDNOTVALID}
+
+//
+// MessageId: COMADMIN_E_CLSIDORIIDMISMATCH
+//
+// MessageText:
+//
+// Application file CLSIDs or IIDs do not match corresponding DLLs
+//
+ COMADMIN_E_CLSIDORIIDMISMATCH = HRESULT($80110418);
+ {$EXTERNALSYM COMADMIN_E_CLSIDORIIDMISMATCH}
+
+//
+// MessageId: COMADMIN_E_REMOTEINTERFACE
+//
+// MessageText:
+//
+// Interface information is either missing or changed
+//
+ COMADMIN_E_REMOTEINTERFACE = HRESULT($80110419);
+ {$EXTERNALSYM COMADMIN_E_REMOTEINTERFACE}
+
+//
+// MessageId: COMADMIN_E_DLLREGISTERSERVER
+//
+// MessageText:
+//
+// DllRegisterServer failed on component install
+//
+ COMADMIN_E_DLLREGISTERSERVER = HRESULT($8011041A);
+ {$EXTERNALSYM COMADMIN_E_DLLREGISTERSERVER}
+
+//
+// MessageId: COMADMIN_E_NOSERVERSHARE
+//
+// MessageText:
+//
+// No server file share available
+//
+ COMADMIN_E_NOSERVERSHARE = HRESULT($8011041B);
+ {$EXTERNALSYM COMADMIN_E_NOSERVERSHARE}
+
+//
+// MessageId: COMADMIN_E_DLLLOADFAILED
+//
+// MessageText:
+//
+// DLL could not be loaded
+//
+ COMADMIN_E_DLLLOADFAILED = HRESULT($8011041D);
+ {$EXTERNALSYM COMADMIN_E_DLLLOADFAILED}
+
+//
+// MessageId: COMADMIN_E_BADREGISTRYLIBID
+//
+// MessageText:
+//
+// The registered TypeLib ID is not valid
+//
+ COMADMIN_E_BADREGISTRYLIBID = HRESULT($8011041E);
+ {$EXTERNALSYM COMADMIN_E_BADREGISTRYLIBID}
+
+//
+// MessageId: COMADMIN_E_APPDIRNOTFOUND
+//
+// MessageText:
+//
+// Application install directory not found
+//
+ COMADMIN_E_APPDIRNOTFOUND = HRESULT($8011041F);
+ {$EXTERNALSYM COMADMIN_E_APPDIRNOTFOUND}
+
+//
+// MessageId: COMADMIN_E_REGISTRARFAILED
+//
+// MessageText:
+//
+// Errors occurred while in the component registrar
+//
+ COMADMIN_E_REGISTRARFAILED = HRESULT($80110423);
+ {$EXTERNALSYM COMADMIN_E_REGISTRARFAILED}
+
+//
+// MessageId: COMADMIN_E_COMPFILE_DOESNOTEXIST
+//
+// MessageText:
+//
+// The file does not exist
+//
+ COMADMIN_E_COMPFILE_DOESNOTEXIST = HRESULT($80110424);
+ {$EXTERNALSYM COMADMIN_E_COMPFILE_DOESNOTEXIST}
+
+//
+// MessageId: COMADMIN_E_COMPFILE_LOADDLLFAIL
+//
+// MessageText:
+//
+// The DLL could not be loaded
+//
+ COMADMIN_E_COMPFILE_LOADDLLFAIL = HRESULT($80110425);
+ {$EXTERNALSYM COMADMIN_E_COMPFILE_LOADDLLFAIL}
+
+//
+// MessageId: COMADMIN_E_COMPFILE_GETCLASSOBJ
+//
+// MessageText:
+//
+// GetClassObject failed in the DLL
+//
+ COMADMIN_E_COMPFILE_GETCLASSOBJ = HRESULT($80110426);
+ {$EXTERNALSYM COMADMIN_E_COMPFILE_GETCLASSOBJ}
+
+//
+// MessageId: COMADMIN_E_COMPFILE_CLASSNOTAVAIL
+//
+// MessageText:
+//
+// The DLL does not support the components listed in the TypeLib
+//
+ COMADMIN_E_COMPFILE_CLASSNOTAVAIL = HRESULT($80110427);
+ {$EXTERNALSYM COMADMIN_E_COMPFILE_CLASSNOTAVAIL}
+
+//
+// MessageId: COMADMIN_E_COMPFILE_BADTLB
+//
+// MessageText:
+//
+// The TypeLib could not be loaded
+//
+ COMADMIN_E_COMPFILE_BADTLB = HRESULT($80110428);
+ {$EXTERNALSYM COMADMIN_E_COMPFILE_BADTLB}
+
+//
+// MessageId: COMADMIN_E_COMPFILE_NOTINSTALLABLE
+//
+// MessageText:
+//
+// The file does not contain components or component information
+//
+ COMADMIN_E_COMPFILE_NOTINSTALLABLE = HRESULT($80110429);
+ {$EXTERNALSYM COMADMIN_E_COMPFILE_NOTINSTALLABLE}
+
+//
+// MessageId: COMADMIN_E_NOTCHANGEABLE
+//
+// MessageText:
+//
+// Changes to this object and its sub-objects have been disabled
+//
+ COMADMIN_E_NOTCHANGEABLE = HRESULT($8011042A);
+ {$EXTERNALSYM COMADMIN_E_NOTCHANGEABLE}
+
+//
+// MessageId: COMADMIN_E_NOTDELETEABLE
+//
+// MessageText:
+//
+// The delete function has been disabled for this object
+//
+ COMADMIN_E_NOTDELETEABLE = HRESULT($8011042B);
+ {$EXTERNALSYM COMADMIN_E_NOTDELETEABLE}
+
+//
+// MessageId: COMADMIN_E_SESSION
+//
+// MessageText:
+//
+// The server catalog version is not supported
+//
+ COMADMIN_E_SESSION = HRESULT($8011042C);
+ {$EXTERNALSYM COMADMIN_E_SESSION}
+
+//
+// MessageId: COMADMIN_E_COMP_MOVE_LOCKED
+//
+// MessageText:
+//
+// The component move was disallowed, because the source or destination application is either a system application or currently locked against changes
+//
+ COMADMIN_E_COMP_MOVE_LOCKED = HRESULT($8011042D);
+ {$EXTERNALSYM COMADMIN_E_COMP_MOVE_LOCKED}
+
+//
+// MessageId: COMADMIN_E_COMP_MOVE_BAD_DEST
+//
+// MessageText:
+//
+// The component move failed because the destination application no longer exists
+//
+ COMADMIN_E_COMP_MOVE_BAD_DEST = HRESULT($8011042E);
+ {$EXTERNALSYM COMADMIN_E_COMP_MOVE_BAD_DEST}
+
+//
+// MessageId: COMADMIN_E_REGISTERTLB
+//
+// MessageText:
+//
+// The system was unable to register the TypeLib
+//
+ COMADMIN_E_REGISTERTLB = HRESULT($80110430);
+ {$EXTERNALSYM COMADMIN_E_REGISTERTLB}
+
+//
+// MessageId: COMADMIN_E_SYSTEMAPP
+//
+// MessageText:
+//
+// This operation can not be performed on the system application
+//
+ COMADMIN_E_SYSTEMAPP = HRESULT($80110433);
+ {$EXTERNALSYM COMADMIN_E_SYSTEMAPP}
+
+//
+// MessageId: COMADMIN_E_COMPFILE_NOREGISTRAR
+//
+// MessageText:
+//
+// The component registrar referenced in this file is not available
+//
+ COMADMIN_E_COMPFILE_NOREGISTRAR = HRESULT($80110434);
+ {$EXTERNALSYM COMADMIN_E_COMPFILE_NOREGISTRAR}
+
+//
+// MessageId: COMADMIN_E_COREQCOMPINSTALLED
+//
+// MessageText:
+//
+// A component in the same DLL is already installed
+//
+ COMADMIN_E_COREQCOMPINSTALLED = HRESULT($80110435);
+ {$EXTERNALSYM COMADMIN_E_COREQCOMPINSTALLED}
+
+//
+// MessageId: COMADMIN_E_SERVICENOTINSTALLED
+//
+// MessageText:
+//
+// The service is not installed
+//
+ COMADMIN_E_SERVICENOTINSTALLED = HRESULT($80110436);
+ {$EXTERNALSYM COMADMIN_E_SERVICENOTINSTALLED}
+
+//
+// MessageId: COMADMIN_E_PROPERTYSAVEFAILED
+//
+// MessageText:
+//
+// One or more property settings are either invalid or in conflict with each other
+//
+ COMADMIN_E_PROPERTYSAVEFAILED = HRESULT($80110437);
+ {$EXTERNALSYM COMADMIN_E_PROPERTYSAVEFAILED}
+
+//
+// MessageId: COMADMIN_E_OBJECTEXISTS
+//
+// MessageText:
+//
+// The object you are attempting to add or rename already exists
+//
+ COMADMIN_E_OBJECTEXISTS = HRESULT($80110438);
+ {$EXTERNALSYM COMADMIN_E_OBJECTEXISTS}
+
+//
+// MessageId: COMADMIN_E_COMPONENTEXISTS
+//
+// MessageText:
+//
+// The component already exists
+//
+ COMADMIN_E_COMPONENTEXISTS = HRESULT($80110439);
+ {$EXTERNALSYM COMADMIN_E_COMPONENTEXISTS}
+
+//
+// MessageId: COMADMIN_E_REGFILE_CORRUPT
+//
+// MessageText:
+//
+// The registration file is corrupt
+//
+ COMADMIN_E_REGFILE_CORRUPT = HRESULT($8011043B);
+ {$EXTERNALSYM COMADMIN_E_REGFILE_CORRUPT}
+
+//
+// MessageId: COMADMIN_E_PROPERTY_OVERFLOW
+//
+// MessageText:
+//
+// The property value is too large
+//
+ COMADMIN_E_PROPERTY_OVERFLOW = HRESULT($8011043C);
+ {$EXTERNALSYM COMADMIN_E_PROPERTY_OVERFLOW}
+
+//
+// MessageId: COMADMIN_E_NOTINREGISTRY
+//
+// MessageText:
+//
+// Object was not found in registry
+//
+ COMADMIN_E_NOTINREGISTRY = HRESULT($8011043E);
+ {$EXTERNALSYM COMADMIN_E_NOTINREGISTRY}
+
+//
+// MessageId: COMADMIN_E_OBJECTNOTPOOLABLE
+//
+// MessageText:
+//
+// This object is not poolable
+//
+ COMADMIN_E_OBJECTNOTPOOLABLE = HRESULT($8011043F);
+ {$EXTERNALSYM COMADMIN_E_OBJECTNOTPOOLABLE}
+
+//
+// MessageId: COMADMIN_E_APPLID_MATCHES_CLSID
+//
+// MessageText:
+//
+// A CLSID with the same GUID as the new application ID is already installed on this machine
+//
+ COMADMIN_E_APPLID_MATCHES_CLSID = HRESULT($80110446);
+ {$EXTERNALSYM COMADMIN_E_APPLID_MATCHES_CLSID}
+
+//
+// MessageId: COMADMIN_E_ROLE_DOES_NOT_EXIST
+//
+// MessageText:
+//
+// A role assigned to a component, interface, or method did not exist in the application
+//
+ COMADMIN_E_ROLE_DOES_NOT_EXIST = HRESULT($80110447);
+ {$EXTERNALSYM COMADMIN_E_ROLE_DOES_NOT_EXIST}
+
+//
+// MessageId: COMADMIN_E_START_APP_NEEDS_COMPONENTS
+//
+// MessageText:
+//
+// You must have components in an application in order to start the application
+//
+ COMADMIN_E_START_APP_NEEDS_COMPONENTS = HRESULT($80110448);
+ {$EXTERNALSYM COMADMIN_E_START_APP_NEEDS_COMPONENTS}
+
+//
+// MessageId: COMADMIN_E_REQUIRES_DIFFERENT_PLATFORM
+//
+// MessageText:
+//
+// This operation is not enabled on this platform
+//
+ COMADMIN_E_REQUIRES_DIFFERENT_PLATFORM = HRESULT($80110449);
+ {$EXTERNALSYM COMADMIN_E_REQUIRES_DIFFERENT_PLATFORM}
+
+//
+// MessageId: COMADMIN_E_CAN_NOT_EXPORT_APP_PROXY
+//
+// MessageText:
+//
+// Application Proxy is not exportable
+//
+ COMADMIN_E_CAN_NOT_EXPORT_APP_PROXY = HRESULT($8011044A);
+ {$EXTERNALSYM COMADMIN_E_CAN_NOT_EXPORT_APP_PROXY}
+
+//
+// MessageId: COMADMIN_E_CAN_NOT_START_APP
+//
+// MessageText:
+//
+// Failed to start application because it is either a library application or an application proxy
+//
+ COMADMIN_E_CAN_NOT_START_APP = HRESULT($8011044B);
+ {$EXTERNALSYM COMADMIN_E_CAN_NOT_START_APP}
+
+//
+// MessageId: COMADMIN_E_CAN_NOT_EXPORT_SYS_APP
+//
+// MessageText:
+//
+// System application is not exportable
+//
+ COMADMIN_E_CAN_NOT_EXPORT_SYS_APP = HRESULT($8011044C);
+ {$EXTERNALSYM COMADMIN_E_CAN_NOT_EXPORT_SYS_APP}
+
+//
+// MessageId: COMADMIN_E_CANT_SUBSCRIBE_TO_COMPONENT
+//
+// MessageText:
+//
+// Can not subscribe to this component (the component may have been imported)
+//
+ COMADMIN_E_CANT_SUBSCRIBE_TO_COMPONENT = HRESULT($8011044D);
+ {$EXTERNALSYM COMADMIN_E_CANT_SUBSCRIBE_TO_COMPONENT}
+
+//
+// MessageId: COMADMIN_E_EVENTCLASS_CANT_BE_SUBSCRIBER
+//
+// MessageText:
+//
+// An event class cannot also be a subscriber component
+//
+ COMADMIN_E_EVENTCLASS_CANT_BE_SUBSCRIBER = HRESULT($8011044E);
+ {$EXTERNALSYM COMADMIN_E_EVENTCLASS_CANT_BE_SUBSCRIBER}
+
+//
+// MessageId: COMADMIN_E_LIB_APP_PROXY_INCOMPATIBLE
+//
+// MessageText:
+//
+// Library applications and application proxies are incompatible
+//
+ COMADMIN_E_LIB_APP_PROXY_INCOMPATIBLE = HRESULT($8011044F);
+ {$EXTERNALSYM COMADMIN_E_LIB_APP_PROXY_INCOMPATIBLE}
+
+//
+// MessageId: COMADMIN_E_BASE_PARTITION_ONLY
+//
+// MessageText:
+//
+// This function is valid for the base partition only
+//
+ COMADMIN_E_BASE_PARTITION_ONLY = HRESULT($80110450);
+ {$EXTERNALSYM COMADMIN_E_BASE_PARTITION_ONLY}
+
+//
+// MessageId: COMADMIN_E_START_APP_DISABLED
+//
+// MessageText:
+//
+// You cannot start an application that has been disabled
+//
+ COMADMIN_E_START_APP_DISABLED = HRESULT($80110451);
+ {$EXTERNALSYM COMADMIN_E_START_APP_DISABLED}
+
+//
+// MessageId: COMADMIN_E_CAT_DUPLICATE_PARTITION_NAME
+//
+// MessageText:
+//
+// The specified partition name is already in use on this computer
+//
+ COMADMIN_E_CAT_DUPLICATE_PARTITION_NAME = HRESULT($80110457);
+ {$EXTERNALSYM COMADMIN_E_CAT_DUPLICATE_PARTITION_NAME}
+
+//
+// MessageId: COMADMIN_E_CAT_INVALID_PARTITION_NAME
+//
+// MessageText:
+//
+// The specified partition name is invalid. Check that the name contains at least one visible character
+//
+ COMADMIN_E_CAT_INVALID_PARTITION_NAME = HRESULT($80110458);
+ {$EXTERNALSYM COMADMIN_E_CAT_INVALID_PARTITION_NAME}
+
+//
+// MessageId: COMADMIN_E_CAT_PARTITION_IN_USE
+//
+// MessageText:
+//
+// The partition cannot be deleted because it is the default partition for one or more users
+//
+ COMADMIN_E_CAT_PARTITION_IN_USE = HRESULT($80110459);
+ {$EXTERNALSYM COMADMIN_E_CAT_PARTITION_IN_USE}
+
+//
+// MessageId: COMADMIN_E_FILE_PARTITION_DUPLICATE_FILES
+//
+// MessageText:
+//
+// The partition cannot be exported, because one or more components in the partition have the same file name
+//
+ COMADMIN_E_FILE_PARTITION_DUPLICATE_FILES = HRESULT($8011045A);
+ {$EXTERNALSYM COMADMIN_E_FILE_PARTITION_DUPLICATE_FILES}
+
+//
+// MessageId: COMADMIN_E_CAT_IMPORTED_COMPONENTS_NOT_ALLOWED
+//
+// MessageText:
+//
+// Applications that contain one or more imported components cannot be installed into a non-base partition
+//
+ COMADMIN_E_CAT_IMPORTED_COMPONENTS_NOT_ALLOWED = HRESULT($8011045B);
+ {$EXTERNALSYM COMADMIN_E_CAT_IMPORTED_COMPONENTS_NOT_ALLOWED}
+
+//
+// MessageId: COMADMIN_E_AMBIGUOUS_APPLICATION_NAME
+//
+// MessageText:
+//
+// The application name is not unique and cannot be resolved to an application id
+//
+ COMADMIN_E_AMBIGUOUS_APPLICATION_NAME = HRESULT($8011045C);
+ {$EXTERNALSYM COMADMIN_E_AMBIGUOUS_APPLICATION_NAME}
+
+//
+// MessageId: COMADMIN_E_AMBIGUOUS_PARTITION_NAME
+//
+// MessageText:
+//
+// The partition name is not unique and cannot be resolved to a partition id
+//
+ COMADMIN_E_AMBIGUOUS_PARTITION_NAME = HRESULT($8011045D);
+ {$EXTERNALSYM COMADMIN_E_AMBIGUOUS_PARTITION_NAME}
+
+//
+// MessageId: COMADMIN_E_REGDB_NOTINITIALIZED
+//
+// MessageText:
+//
+// The COM+ registry database has not been initialized
+//
+ COMADMIN_E_REGDB_NOTINITIALIZED = HRESULT($80110472);
+ {$EXTERNALSYM COMADMIN_E_REGDB_NOTINITIALIZED}
+
+//
+// MessageId: COMADMIN_E_REGDB_NOTOPEN
+//
+// MessageText:
+//
+// The COM+ registry database is not open
+//
+ COMADMIN_E_REGDB_NOTOPEN = HRESULT($80110473);
+ {$EXTERNALSYM COMADMIN_E_REGDB_NOTOPEN}
+
+//
+// MessageId: COMADMIN_E_REGDB_SYSTEMERR
+//
+// MessageText:
+//
+// The COM+ registry database detected a system error
+//
+ COMADMIN_E_REGDB_SYSTEMERR = HRESULT($80110474);
+ {$EXTERNALSYM COMADMIN_E_REGDB_SYSTEMERR}
+
+//
+// MessageId: COMADMIN_E_REGDB_ALREADYRUNNING
+//
+// MessageText:
+//
+// The COM+ registry database is already running
+//
+ COMADMIN_E_REGDB_ALREADYRUNNING = HRESULT($80110475);
+ {$EXTERNALSYM COMADMIN_E_REGDB_ALREADYRUNNING}
+
+//
+// MessageId: COMADMIN_E_MIG_VERSIONNOTSUPPORTED
+//
+// MessageText:
+//
+// This version of the COM+ registry database cannot be migrated
+//
+ COMADMIN_E_MIG_VERSIONNOTSUPPORTED = HRESULT($80110480);
+ {$EXTERNALSYM COMADMIN_E_MIG_VERSIONNOTSUPPORTED}
+
+//
+// MessageId: COMADMIN_E_MIG_SCHEMANOTFOUND
+//
+// MessageText:
+//
+// The schema version to be migrated could not be found in the COM+ registry database
+//
+ COMADMIN_E_MIG_SCHEMANOTFOUND = HRESULT($80110481);
+ {$EXTERNALSYM COMADMIN_E_MIG_SCHEMANOTFOUND}
+
+//
+// MessageId: COMADMIN_E_CAT_BITNESSMISMATCH
+//
+// MessageText:
+//
+// There was a type mismatch between binaries
+//
+ COMADMIN_E_CAT_BITNESSMISMATCH = HRESULT($80110482);
+ {$EXTERNALSYM COMADMIN_E_CAT_BITNESSMISMATCH}
+
+//
+// MessageId: COMADMIN_E_CAT_UNACCEPTABLEBITNESS
+//
+// MessageText:
+//
+// A binary of unknown or invalid type was provided
+//
+ COMADMIN_E_CAT_UNACCEPTABLEBITNESS = HRESULT($80110483);
+ {$EXTERNALSYM COMADMIN_E_CAT_UNACCEPTABLEBITNESS}
+
+//
+// MessageId: COMADMIN_E_CAT_WRONGAPPBITNESS
+//
+// MessageText:
+//
+// There was a type mismatch between a binary and an application
+//
+ COMADMIN_E_CAT_WRONGAPPBITNESS = HRESULT($80110484);
+ {$EXTERNALSYM COMADMIN_E_CAT_WRONGAPPBITNESS}
+
+//
+// MessageId: COMADMIN_E_CAT_PAUSE_RESUME_NOT_SUPPORTED
+//
+// MessageText:
+//
+// The application cannot be paused or resumed
+//
+ COMADMIN_E_CAT_PAUSE_RESUME_NOT_SUPPORTED = HRESULT($80110485);
+ {$EXTERNALSYM COMADMIN_E_CAT_PAUSE_RESUME_NOT_SUPPORTED}
+
+//
+// MessageId: COMADMIN_E_CAT_SERVERFAULT
+//
+// MessageText:
+//
+// The COM+ Catalog Server threw an exception during execution
+//
+ COMADMIN_E_CAT_SERVERFAULT = HRESULT($80110486);
+ {$EXTERNALSYM COMADMIN_E_CAT_SERVERFAULT}
+
+//
+// COMPLUS Queued component errors
+//
+//
+// MessageId: COMQC_E_APPLICATION_NOT_QUEUED
+//
+// MessageText:
+//
+// Only COM+ Applications marked "queued" can be invoked using the "queue" moniker
+//
+ COMQC_E_APPLICATION_NOT_QUEUED = HRESULT($80110600);
+ {$EXTERNALSYM COMQC_E_APPLICATION_NOT_QUEUED}
+
+//
+// MessageId: COMQC_E_NO_QUEUEABLE_INTERFACES
+//
+// MessageText:
+//
+// At least one interface must be marked "queued" in order to create a queued component instance with the "queue" moniker
+//
+ COMQC_E_NO_QUEUEABLE_INTERFACES = HRESULT($80110601);
+ {$EXTERNALSYM COMQC_E_NO_QUEUEABLE_INTERFACES}
+
+//
+// MessageId: COMQC_E_QUEUING_SERVICE_NOT_AVAILABLE
+//
+// MessageText:
+//
+// MSMQ is required for the requested operation and is not installed
+//
+ COMQC_E_QUEUING_SERVICE_NOT_AVAILABLE = HRESULT($80110602);
+ {$EXTERNALSYM COMQC_E_QUEUING_SERVICE_NOT_AVAILABLE}
+
+//
+// MessageId: COMQC_E_NO_IPERSISTSTREAM
+//
+// MessageText:
+//
+// Unable to marshal an interface that does not support IPersistStream
+//
+ COMQC_E_NO_IPERSISTSTREAM = HRESULT($80110603);
+ {$EXTERNALSYM COMQC_E_NO_IPERSISTSTREAM}
+
+//
+// MessageId: COMQC_E_BAD_MESSAGE
+//
+// MessageText:
+//
+// The message is improperly formatted or was damaged in transit
+//
+ COMQC_E_BAD_MESSAGE = HRESULT($80110604);
+ {$EXTERNALSYM COMQC_E_BAD_MESSAGE}
+
+//
+// MessageId: COMQC_E_UNAUTHENTICATED
+//
+// MessageText:
+//
+// An unauthenticated message was received by an application that accepts only authenticated messages
+//
+ COMQC_E_UNAUTHENTICATED = HRESULT($80110605);
+ {$EXTERNALSYM COMQC_E_UNAUTHENTICATED}
+
+//
+// MessageId: COMQC_E_UNTRUSTED_ENQUEUER
+//
+// MessageText:
+//
+// The message was requeued or moved by a user not in the "QC Trusted User" role
+//
+ COMQC_E_UNTRUSTED_ENQUEUER = HRESULT($80110606);
+ {$EXTERNALSYM COMQC_E_UNTRUSTED_ENQUEUER}
+
+//
+// The range 0x700-0x7ff is reserved for MSDTC errors.
+//
+//
+// MessageId: MSDTC_E_DUPLICATE_RESOURCE
+//
+// MessageText:
+//
+// Cannot create a duplicate resource of type Distributed Transaction Coordinator
+//
+ MSDTC_E_DUPLICATE_RESOURCE = HRESULT($80110701);
+ {$EXTERNALSYM MSDTC_E_DUPLICATE_RESOURCE}
+
+//
+// More COMADMIN errors from 0x8**
+//
+//
+// MessageId: COMADMIN_E_OBJECT_PARENT_MISSING
+//
+// MessageText:
+//
+// One of the objects being inserted or updated does not belong to a valid parent collection
+//
+ COMADMIN_E_OBJECT_PARENT_MISSING = HRESULT($80110808);
+ {$EXTERNALSYM COMADMIN_E_OBJECT_PARENT_MISSING}
+
+//
+// MessageId: COMADMIN_E_OBJECT_DOES_NOT_EXIST
+//
+// MessageText:
+//
+// One of the specified objects cannot be found
+//
+ COMADMIN_E_OBJECT_DOES_NOT_EXIST = HRESULT($80110809);
+ {$EXTERNALSYM COMADMIN_E_OBJECT_DOES_NOT_EXIST}
+
+//
+// MessageId: COMADMIN_E_APP_NOT_RUNNING
+//
+// MessageText:
+//
+// The specified application is not currently running
+//
+ COMADMIN_E_APP_NOT_RUNNING = HRESULT($8011080A);
+ {$EXTERNALSYM COMADMIN_E_APP_NOT_RUNNING}
+
+//
+// MessageId: COMADMIN_E_INVALID_PARTITION
+//
+// MessageText:
+//
+// The partition(s) specified are not valid.
+//
+ COMADMIN_E_INVALID_PARTITION = HRESULT($8011080B);
+ {$EXTERNALSYM COMADMIN_E_INVALID_PARTITION}
+
+//
+// MessageId: COMADMIN_E_SVCAPP_NOT_POOLABLE_OR_RECYCLABLE
+//
+// MessageText:
+//
+// COM+ applications that run as NT service may not be pooled or recycled
+//
+ COMADMIN_E_SVCAPP_NOT_POOLABLE_OR_RECYCLABLE = HRESULT($8011080D);
+ {$EXTERNALSYM COMADMIN_E_SVCAPP_NOT_POOLABLE_OR_RECYCLABLE}
+
+//
+// MessageId: COMADMIN_E_USER_IN_SET
+//
+// MessageText:
+//
+// One or more users are already assigned to a local partition set.
+//
+ COMADMIN_E_USER_IN_SET = HRESULT($8011080E);
+ {$EXTERNALSYM COMADMIN_E_USER_IN_SET}
+
+//
+// MessageId: COMADMIN_E_CANTRECYCLELIBRARYAPPS
+//
+// MessageText:
+//
+// Library applications may not be recycled.
+//
+ COMADMIN_E_CANTRECYCLELIBRARYAPPS = HRESULT($8011080F);
+ {$EXTERNALSYM COMADMIN_E_CANTRECYCLELIBRARYAPPS}
+
+//
+// MessageId: COMADMIN_E_CANTRECYCLESERVICEAPPS
+//
+// MessageText:
+//
+// Applications running as NT services may not be recycled.
+//
+ COMADMIN_E_CANTRECYCLESERVICEAPPS = HRESULT($80110811);
+ {$EXTERNALSYM COMADMIN_E_CANTRECYCLESERVICEAPPS}
+
+//
+// MessageId: COMADMIN_E_PROCESSALREADYRECYCLED
+//
+// MessageText:
+//
+// The process has already been recycled.
+//
+ COMADMIN_E_PROCESSALREADYRECYCLED = HRESULT($80110812);
+ {$EXTERNALSYM COMADMIN_E_PROCESSALREADYRECYCLED}
+
+//
+// MessageId: COMADMIN_E_PAUSEDPROCESSMAYNOTBERECYCLED
+//
+// MessageText:
+//
+// A paused process may not be recycled.
+//
+ COMADMIN_E_PAUSEDPROCESSMAYNOTBERECYCLED = HRESULT($80110813);
+ {$EXTERNALSYM COMADMIN_E_PAUSEDPROCESSMAYNOTBERECYCLED}
+
+//
+// MessageId: COMADMIN_E_CANTMAKEINPROCSERVICE
+//
+// MessageText:
+//
+// Library applications may not be NT services.
+//
+ COMADMIN_E_CANTMAKEINPROCSERVICE = HRESULT($80110814);
+ {$EXTERNALSYM COMADMIN_E_CANTMAKEINPROCSERVICE}
+
+//
+// MessageId: COMADMIN_E_PROGIDINUSEBYCLSID
+//
+// MessageText:
+//
+// The ProgID provided to the copy operation is invalid. The ProgID is in use by another registered CLSID.
+//
+ COMADMIN_E_PROGIDINUSEBYCLSID = HRESULT($80110815);
+ {$EXTERNALSYM COMADMIN_E_PROGIDINUSEBYCLSID}
+
+//
+// MessageId: COMADMIN_E_DEFAULT_PARTITION_NOT_IN_SET
+//
+// MessageText:
+//
+// The partition specified as default is not a member of the partition set.
+//
+ COMADMIN_E_DEFAULT_PARTITION_NOT_IN_SET = HRESULT($80110816);
+ {$EXTERNALSYM COMADMIN_E_DEFAULT_PARTITION_NOT_IN_SET}
+
+//
+// MessageId: COMADMIN_E_RECYCLEDPROCESSMAYNOTBEPAUSED
+//
+// MessageText:
+//
+// A recycled process may not be paused.
+//
+ COMADMIN_E_RECYCLEDPROCESSMAYNOTBEPAUSED = HRESULT($80110817);
+ {$EXTERNALSYM COMADMIN_E_RECYCLEDPROCESSMAYNOTBEPAUSED}
+
+//
+// MessageId: COMADMIN_E_PARTITION_ACCESSDENIED
+//
+// MessageText:
+//
+// Access to the specified partition is denied.
+//
+ COMADMIN_E_PARTITION_ACCESSDENIED = HRESULT($80110818);
+ {$EXTERNALSYM COMADMIN_E_PARTITION_ACCESSDENIED}
+
+//
+// MessageId: COMADMIN_E_PARTITION_MSI_ONLY
+//
+// MessageText:
+//
+// Only Application Files (*.MSI files) can be installed into partitions.
+//
+ COMADMIN_E_PARTITION_MSI_ONLY = HRESULT($80110819);
+ {$EXTERNALSYM COMADMIN_E_PARTITION_MSI_ONLY}
+
+//
+// MessageId: COMADMIN_E_LEGACYCOMPS_NOT_ALLOWED_IN_1_0_FORMAT
+//
+// MessageText:
+//
+// Applications containing one or more legacy components may not be exported to 1.0 format.
+//
+ COMADMIN_E_LEGACYCOMPS_NOT_ALLOWED_IN_1_0_FORMAT = HRESULT($8011081A);
+ {$EXTERNALSYM COMADMIN_E_LEGACYCOMPS_NOT_ALLOWED_IN_1_0_FORMAT}
+
+//
+// MessageId: COMADMIN_E_LEGACYCOMPS_NOT_ALLOWED_IN_NONBASE_PARTITIONS
+//
+// MessageText:
+//
+// Legacy components may not exist in non-base partitions.
+//
+ COMADMIN_E_LEGACYCOMPS_NOT_ALLOWED_IN_NONBASE_PARTITIONS = HRESULT($8011081B);
+ {$EXTERNALSYM COMADMIN_E_LEGACYCOMPS_NOT_ALLOWED_IN_NONBASE_PARTITIONS}
+
+//
+// MessageId: COMADMIN_E_COMP_MOVE_SOURCE
+//
+// MessageText:
+//
+// A component cannot be moved (or copied) from the System Application, an application proxy or a non-changeable application
+//
+ COMADMIN_E_COMP_MOVE_SOURCE = HRESULT($8011081C);
+ {$EXTERNALSYM COMADMIN_E_COMP_MOVE_SOURCE}
+
+//
+// MessageId: COMADMIN_E_COMP_MOVE_DEST
+//
+// MessageText:
+//
+// A component cannot be moved (or copied) to the System Application, an application proxy or a non-changeable application
+//
+ COMADMIN_E_COMP_MOVE_DEST = HRESULT($8011081D);
+ {$EXTERNALSYM COMADMIN_E_COMP_MOVE_DEST}
+
+//
+// MessageId: COMADMIN_E_COMP_MOVE_PRIVATE
+//
+// MessageText:
+//
+// A private component cannot be moved (or copied) to a library application or to the base partition
+//
+ COMADMIN_E_COMP_MOVE_PRIVATE = HRESULT($8011081E);
+ {$EXTERNALSYM COMADMIN_E_COMP_MOVE_PRIVATE}
+
+//
+// MessageId: COMADMIN_E_BASEPARTITION_REQUIRED_IN_SET
+//
+// MessageText:
+//
+// The Base Application Partition exists in all partition sets and cannot be removed.
+//
+ COMADMIN_E_BASEPARTITION_REQUIRED_IN_SET = HRESULT($8011081F);
+ {$EXTERNALSYM COMADMIN_E_BASEPARTITION_REQUIRED_IN_SET}
+
+//
+// MessageId: COMADMIN_E_CANNOT_ALIAS_EVENTCLASS
+//
+// MessageText:
+//
+// Alas, Event Class components cannot be aliased.
+//
+ COMADMIN_E_CANNOT_ALIAS_EVENTCLASS = HRESULT($80110820);
+ {$EXTERNALSYM COMADMIN_E_CANNOT_ALIAS_EVENTCLASS}
+
+//
+// MessageId: COMADMIN_E_PRIVATE_ACCESSDENIED
+//
+// MessageText:
+//
+// Access is denied because the component is private.
+//
+ COMADMIN_E_PRIVATE_ACCESSDENIED = HRESULT($80110821);
+ {$EXTERNALSYM COMADMIN_E_PRIVATE_ACCESSDENIED}
+
+//
+// MessageId: COMADMIN_E_SAFERINVALID
+//
+// MessageText:
+//
+// The specified SAFER level is invalid.
+//
+ COMADMIN_E_SAFERINVALID = HRESULT($80110822);
+ {$EXTERNALSYM COMADMIN_E_SAFERINVALID}
+
+//
+// MessageId: COMADMIN_E_REGISTRY_ACCESSDENIED
+//
+// MessageText:
+//
+// The specified user cannot write to the system registry
+//
+ COMADMIN_E_REGISTRY_ACCESSDENIED = HRESULT($80110823);
+ {$EXTERNALSYM COMADMIN_E_REGISTRY_ACCESSDENIED}
+
+//
+// MessageId: COMADMIN_E_PARTITIONS_DISABLED
+//
+// MessageText:
+//
+// COM+ partitions are currently disabled.
+//
+ COMADMIN_E_PARTITIONS_DISABLED = HRESULT($80110824);
+ {$EXTERNALSYM COMADMIN_E_PARTITIONS_DISABLED}
+
+implementation
+
+function SUCCEEDED(Status: HRESULT): BOOL;
+begin
+ Result := Status >= 0;
+end;
+
+function FAILED(Status: HRESULT): BOOL;
+begin
+ Result := Status < 0;
+end;
+
+function IS_ERROR(Status: HRESULT): BOOL;
+begin
+ Result := (Status shr 31) = SEVERITY_ERROR;
+end;
+
+function HRESULT_CODE(hr: HRESULT): DWORD;
+begin
+ Result := hr and $FFFF;
+end;
+
+function SCODE_CODE(sc: LONG): DWORD;
+begin
+ Result := sc and $FFFF;
+end;
+
+function HRESULT_FACILITY(hr: HRESULT): DWORD;
+begin
+ Result := (hr shr 16) and $1FFF;
+end;
+
+function SCODE_FACILITY(sc: LONG): DWORD;
+begin
+ Result := (sc shr 16) and $1FFF;
+end;
+
+function HRESULT_SEVERITY(hr: HRESULT): DWORD;
+begin
+ Result := (hr shr 31) and $1;
+end;
+
+function SCODE_SEVERITY(sc: LONG): DWORD;
+begin
+ Result := (sc shr 31) and $1;
+end;
+
+function MAKE_HRESULT(sev, fac, code: DWORD): HRESULT;
+begin
+ Result := HRESULT((sev shl 31) or (fac shl 16) or code);
+end;
+
+function MAKE_SCODE(sev, fac,code: DWORD): DWORD;
+begin
+ Result := DWORD((sev shl 31) or (fac shl 16) or code);
+end;
+
+function __HRESULT_FROM_WIN32(x: DWORD): HRESULT;
+begin
+ if HRESULT(x) <= 0 then
+ Result := HRESULT(x)
+ else
+ Result := HRESULT((x and $0000FFFF) or (FACILITY_WIN32 shl 16) or $80000000);
+end;
+
+function HRESULT_FROM_WIN32(x: DWORD): HRESULT;
+begin
+ Result := __HRESULT_FROM_WIN32(x);
+end;
+
+function HRESULT_FROM_NT(x: NTSTATUS): HRESULT;
+begin
+ Result := HRESULT(x or FACILITY_NT_BIT);
+end;
+
+function HRESULT_FROM_SETUPAPI(x: DWORD): HRESULT;
+begin
+ if (x and (APPLICATION_ERROR_MASK or ERROR_SEVERITY_ERROR)) =
+ (APPLICATION_ERROR_MASK or ERROR_SEVERITY_ERROR) then
+ Result := HRESULT((x and $0000FFFF) or (FACILITY_SETUPAPI shl 16) or $80000000)
+ else
+ Result := HRESULT_FROM_WIN32(x);
+end;
+
+function GetScode(hr: HRESULT): DWORD;
+begin
+ Result := DWORD(hr);
+end;
+
+function ResultFromScode(sc: DWORD): HRESULT;
+begin
+ Result := HRESULT(sc);
+end;
+
+function PropagateResult(hrPrevious, scBase: DWORD): HRESULT;
+begin
+ Result := HRESULT(scBase);
+end;
+
+end.
diff --git a/packages/extra/winunits/jwawinfax.pas b/packages/extra/winunits/jwawinfax.pas
index 30acea6d6b..2196c367cd 100644
--- a/packages/extra/winunits/jwawinfax.pas
+++ b/packages/extra/winunits/jwawinfax.pas
@@ -1,1609 +1,1609 @@
-{******************************************************************************}
-{ }
-{ Windows FAX API interface unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: winfax.h, released November 2001. The original Pascal }
-{ code is: WinFax.pas, released April 2002. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwawinfax.pas,v 1.1 2005/04/04 07:56:11 marco Exp $
-
-unit JwaWinFax;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "winfax.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaWinType, JwaWinError, JwaWinBase, JwaWinNT;
-
-//
-// FAX ERROR CODES
-//
-
-const
- FAX_ERR_START = 7001; // First fax specific error code
- {$EXTERNALSYM FAX_ERR_START}
-
- FAX_ERR_SRV_OUTOFMEMORY = 7001;
- {$EXTERNALSYM FAX_ERR_SRV_OUTOFMEMORY}
- FAX_ERR_GROUP_NOT_FOUND = 7002;
- {$EXTERNALSYM FAX_ERR_GROUP_NOT_FOUND}
- FAX_ERR_BAD_GROUP_CONFIGURATION = 7003;
- {$EXTERNALSYM FAX_ERR_BAD_GROUP_CONFIGURATION}
- FAX_ERR_GROUP_IN_USE = 7004;
- {$EXTERNALSYM FAX_ERR_GROUP_IN_USE}
- FAX_ERR_RULE_NOT_FOUND = 7005;
- {$EXTERNALSYM FAX_ERR_RULE_NOT_FOUND}
- FAX_ERR_NOT_NTFS = 7006;
- {$EXTERNALSYM FAX_ERR_NOT_NTFS}
- FAX_ERR_DIRECTORY_IN_USE = 7007;
- {$EXTERNALSYM FAX_ERR_DIRECTORY_IN_USE}
- FAX_ERR_FILE_ACCESS_DENIED = 7008;
- {$EXTERNALSYM FAX_ERR_FILE_ACCESS_DENIED}
- FAX_ERR_MESSAGE_NOT_FOUND = 7009;
- {$EXTERNALSYM FAX_ERR_MESSAGE_NOT_FOUND}
- FAX_ERR_DEVICE_NUM_LIMIT_EXCEEDED = 7010;
- {$EXTERNALSYM FAX_ERR_DEVICE_NUM_LIMIT_EXCEEDED}
- FAX_ERR_NOT_SUPPORTED_ON_THIS_SKU = 7011;
- {$EXTERNALSYM FAX_ERR_NOT_SUPPORTED_ON_THIS_SKU}
- FAX_ERR_VERSION_MISMATCH = 7012; // Fax client/server versions mismtach
- {$EXTERNALSYM FAX_ERR_VERSION_MISMATCH}
- FAX_ERR_RECIPIENTS_LIMIT = 7013; // Recipients limit in a single broadcast
- {$EXTERNALSYM FAX_ERR_RECIPIENTS_LIMIT}
-
- FAX_ERR_END = 7013; // Last fax specific error code
- {$EXTERNALSYM FAX_ERR_END}
-
-//
-// MessageId: FAX_E_SRV_OUTOFMEMORY
-//
-// MessageText:
-//
-// The fax server failed to allocate memory.
-//
-
- FAX_E_SRV_OUTOFMEMORY = HRESULT((SEVERITY_ERROR shl 31) or (FACILITY_ITF shl 16) or FAX_ERR_SRV_OUTOFMEMORY);
- {$EXTERNALSYM FAX_E_SRV_OUTOFMEMORY}
-
-//
-// MessageId: FAX_E_GROUP_NOT_FOUND
-//
-// MessageText:
-//
-// The fax server failed to locate an outbound routing group by name.
-//
-
- FAX_E_GROUP_NOT_FOUND = HRESULT((SEVERITY_ERROR shl 31) or (FACILITY_ITF shl 16) or FAX_ERR_GROUP_NOT_FOUND);
- {$EXTERNALSYM FAX_E_GROUP_NOT_FOUND}
-
-//
-// MessageId: FAX_E_BAD_GROUP_CONFIGURATION
-//
-// MessageText:
-//
-// The fax server encountered an outbound routing group with bad configuration.
-//
-
- FAX_E_BAD_GROUP_CONFIGURATION = HRESULT((SEVERITY_ERROR shl 31) or (FACILITY_ITF shl 16) or FAX_ERR_BAD_GROUP_CONFIGURATION);
- {$EXTERNALSYM FAX_E_BAD_GROUP_CONFIGURATION}
-
-//
-// MessageId: FAX_E_GROUP_IN_USE
-//
-// MessageText:
-//
-// The fax server cannot remove an outbound routing group because it is in use by one or more outbound routing rules.
-//
-
- FAX_E_GROUP_IN_USE = HRESULT((SEVERITY_ERROR shl 31) or (FACILITY_ITF shl 16) or FAX_ERR_GROUP_IN_USE);
- {$EXTERNALSYM FAX_E_GROUP_IN_USE}
-
-//
-// MessageId: FAX_E_RULE_NOT_FOUND
-//
-// MessageText:
-//
-// The fax server failed to locate an outbound routing rule by country code and area code.
-//
-
- FAX_E_RULE_NOT_FOUND = HRESULT((SEVERITY_ERROR shl 31) or (FACILITY_ITF shl 16) or FAX_ERR_RULE_NOT_FOUND);
- {$EXTERNALSYM FAX_E_RULE_NOT_FOUND}
-
-//
-// MessageId: FAX_E_NOT_NTFS
-//
-// MessageText:
-//
-// The fax server cannot set an archive folder to a non-NTFS partition.
-//
-
- FAX_E_NOT_NTFS = HRESULT((SEVERITY_ERROR shl 31) or (FACILITY_ITF shl 16) or FAX_ERR_NOT_NTFS);
- {$EXTERNALSYM FAX_E_NOT_NTFS}
-
-//
-// MessageId: FAX_E_DIRECTORY_IN_USE
-//
-// MessageText:
-//
-// The fax server cannot use the same folder for both the inbox and the sent-items archives.
-//
-
- FAX_E_DIRECTORY_IN_USE = HRESULT((SEVERITY_ERROR shl 31) or (FACILITY_ITF shl 16) or FAX_ERR_DIRECTORY_IN_USE);
- {$EXTERNALSYM FAX_E_DIRECTORY_IN_USE}
-
-//
-// MessageId: FAX_E_FILE_ACCESS_DENIED
-//
-// MessageText:
-//
-// The fax server cannot access the specified file or folder.
-//
-
- FAX_E_FILE_ACCESS_DENIED = HRESULT((SEVERITY_ERROR shl 31) or (FACILITY_ITF shl 16) or FAX_ERR_FILE_ACCESS_DENIED);
- {$EXTERNALSYM FAX_E_FILE_ACCESS_DENIED}
-
-//
-// MessageId: FAX_E_MESSAGE_NOT_FOUND
-//
-// MessageText:
-//
-// The fax server cannot find the job or message by its ID.
-//
-
- FAX_E_MESSAGE_NOT_FOUND = HRESULT((SEVERITY_ERROR shl 31) or (FACILITY_ITF shl 16) or FAX_ERR_MESSAGE_NOT_FOUND);
- {$EXTERNALSYM FAX_E_MESSAGE_NOT_FOUND}
-
-//
-// MessageId: FAX_E_DEVICE_NUM_LIMIT_EXCEEDED
-//
-// MessageText:
-//
-// The fax server cannot complete the operation because the number of active fax devices allowed for this version of Windows was exceeded.
-//
-
- FAX_E_DEVICE_NUM_LIMIT_EXCEEDED = HRESULT((SEVERITY_ERROR shl 31) or (FACILITY_ITF shl 16) or FAX_ERR_DEVICE_NUM_LIMIT_EXCEEDED);
- {$EXTERNALSYM FAX_E_DEVICE_NUM_LIMIT_EXCEEDED}
-
-//
-// MessageId: FAX_E_NOT_SUPPORTED_ON_THIS_SKU
-//
-// MessageText:
-//
-// The fax server cannot complete the operation because it is not supported for this version of Windows.
-//
-
- FAX_E_NOT_SUPPORTED_ON_THIS_SKU = HRESULT((SEVERITY_ERROR shl 31) or (FACILITY_ITF shl 16) or FAX_ERR_NOT_SUPPORTED_ON_THIS_SKU);
- {$EXTERNALSYM FAX_E_NOT_SUPPORTED_ON_THIS_SKU}
-
-//
-// MessageId: FAX_E_VERSION_MISMATCH
-//
-// MessageText:
-//
-// The fax server API version does not support the requested operation.
-//
-
- FAX_E_VERSION_MISMATCH = HRESULT((SEVERITY_ERROR shl 31) or (FACILITY_ITF shl 16) or FAX_ERR_VERSION_MISMATCH);
- {$EXTERNALSYM FAX_E_VERSION_MISMATCH}
-
-//
-// MessageId: FAX_E_RECIPIENT_LIMIT
-//
-// MessageText:
-//
-// The limit on the number of recipients for a single fax broadcast was reached.
-//
-
- FAX_E_RECIPIENTS_LIMIT = HRESULT((SEVERITY_ERROR shl 31) or (FACILITY_ITF shl 16) or FAX_ERR_RECIPIENTS_LIMIT);
- {$EXTERNALSYM FAX_E_RECIPIENTS_LIMIT}
-
-type
- FAX_ENUM_LOG_LEVELS = (
- FAXLOG_LEVEL_NONE,
- FAXLOG_LEVEL_MIN,
- FAXLOG_LEVEL_MED,
- FAXLOG_LEVEL_MAX);
- {$EXTERNALSYM FAX_ENUM_LOG_LEVELS}
- TFaxEnumLogLevels = FAX_ENUM_LOG_LEVELS;
-
- FAX_ENUM_LOG_CATEGORIES = (
- FAXLOG_CATEGORY_FILLER0,
- FAXLOG_CATEGORY_INIT, // Initialization / shutdown
- FAXLOG_CATEGORY_OUTBOUND, // Outbound messages
- FAXLOG_CATEGORY_INBOUND, // Inbound messages
- FAXLOG_CATEGORY_UNKNOWN); // Unknown category (all others)
- {$EXTERNALSYM FAX_ENUM_LOG_CATEGORIES}
- TFaxEnumLogCategories = FAX_ENUM_LOG_CATEGORIES;
-
- PFAX_LOG_CATEGORYA = ^FAX_LOG_CATEGORYA;
- {$EXTERNALSYM PFAX_LOG_CATEGORYA}
- _FAX_LOG_CATEGORYA = record
- Name: LPCSTR; // logging category name
- Category: DWORD; // logging category number
- Level: DWORD; // logging level for the category
- end;
- {$EXTERNALSYM _FAX_LOG_CATEGORYA}
- FAX_LOG_CATEGORYA = _FAX_LOG_CATEGORYA;
- {$EXTERNALSYM FAX_LOG_CATEGORYA}
- TFaxLogCategoryA = FAX_LOG_CATEGORYA;
- PFaxLogCategoryA = PFAX_LOG_CATEGORYA;
-
- PFAX_LOG_CATEGORYW = ^FAX_LOG_CATEGORYW;
- {$EXTERNALSYM PFAX_LOG_CATEGORYW}
- _FAX_LOG_CATEGORYW = record
- Name: LPCWSTR; // logging category name
- Category: DWORD; // logging category number
- Level: DWORD; // logging level for the category
- end;
- {$EXTERNALSYM _FAX_LOG_CATEGORYW}
- FAX_LOG_CATEGORYW = _FAX_LOG_CATEGORYW;
- {$EXTERNALSYM FAX_LOG_CATEGORYW}
- TFaxLogCategoryW = FAX_LOG_CATEGORYW;
- PFaxLogCategoryW = PFAX_LOG_CATEGORYW;
-
- {$IFDEF UNICODE}
- FAX_LOG_CATEGORY = FAX_LOG_CATEGORYW;
- {$EXTERNALSYM FAX_LOG_CATEGORY}
- PFAX_LOG_CATEGORY = PFAX_LOG_CATEGORYW;
- {$EXTERNALSYM PFAX_LOG_CATEGORY}
- TFaxLogCategory = TFaxLogCategoryW;
- PFaxLogCategory = PFaxLogCategoryW;
- {$ELSE}
- FAX_LOG_CATEGORY = FAX_LOG_CATEGORYA;
- {$EXTERNALSYM FAX_LOG_CATEGORY}
- PFAX_LOG_CATEGORY = PFAX_LOG_CATEGORYA;
- {$EXTERNALSYM PFAX_LOG_CATEGORY}
- TFaxLogCategory = TFaxLogCategoryA;
- PFaxLogCategory = PFaxLogCategoryA;
- {$ENDIF UNICODE}
-
- PFAX_TIME = ^FAX_TIME;
- {$EXTERNALSYM PFAX_TIME}
- _FAX_TIME = record
- Hour: WORD;
- Minute: WORD;
- end;
- {$EXTERNALSYM _FAX_TIME}
- FAX_TIME = _FAX_TIME;
- {$EXTERNALSYM FAX_TIME}
- TFaxTime = FAX_TIME;
- PFaxTime = PFAX_TIME;
-
- PFAX_CONFIGURATIONA = ^FAX_CONFIGURATIONA;
- {$EXTERNALSYM PFAX_CONFIGURATIONA}
- _FAX_CONFIGURATIONA = record
- SizeOfStruct: DWORD; // size of this structure
- Retries: DWORD; // number of retries for fax send
- RetryDelay: DWORD; // number of minutes between retries
- DirtyDays: DWORD; // number of days to keep an unsent job in the queue
- Branding: BOOL; // fsp should brand outgoing faxes
- UseDeviceTsid: BOOL; // server uses device tsid only
- ServerCp: BOOL; // clients must use cover pages on the server
- PauseServerQueue: BOOL; // is the server queue paused?
- StartCheapTime: FAX_TIME; // start of discount rate period
- StopCheapTime: FAX_TIME; // end of discount rate period
- ArchiveOutgoingFaxes: BOOL; // whether outgoing faxes should be archived
- ArchiveDirectory: LPCSTR; // archive directory for outgoing faxes
- Reserved: LPCSTR; // Reserved; must be NULL
- end;
- {$EXTERNALSYM _FAX_CONFIGURATIONA}
- FAX_CONFIGURATIONA = _FAX_CONFIGURATIONA;
- {$EXTERNALSYM FAX_CONFIGURATIONA}
- TFaxConfigurationA = FAX_CONFIGURATIONA;
- PFaxConfigurationA = PFAX_CONFIGURATIONA;
-
- PFAX_CONFIGURATIONW = ^FAX_CONFIGURATIONW;
- {$EXTERNALSYM PFAX_CONFIGURATIONW}
- _FAX_CONFIGURATIONW = record
- SizeOfStruct: DWORD; // size of this structure
- Retries: DWORD; // number of retries for fax send
- RetryDelay: DWORD; // number of minutes between retries
- DirtyDays: DWORD; // number of days to keep an unsent job in the queue
- Branding: BOOL; // fsp should brand outgoing faxes
- UseDeviceTsid: BOOL; // server uses device tsid only
- ServerCp: BOOL; // clients must use cover pages on the server
- PauseServerQueue: BOOL; // is the server queue paused?
- StartCheapTime: FAX_TIME; // start of discount rate period
- StopCheapTime: FAX_TIME; // end of discount rate period
- ArchiveOutgoingFaxes: BOOL; // whether outgoing faxes should be archived
- ArchiveDirectory: LPCWSTR; // archive directory for outgoing faxes
- Reserved: LPCWSTR; // Reserved; must be NULL
- end;
- {$EXTERNALSYM _FAX_CONFIGURATIONW}
- FAX_CONFIGURATIONW = _FAX_CONFIGURATIONW;
- {$EXTERNALSYM FAX_CONFIGURATIONW}
- TFaxConfigurationW = FAX_CONFIGURATIONW;
- PFaxConfigurationW = PFAX_CONFIGURATIONW;
-
- {$IFDEF UNICODE}
- FAX_CONFIGURATION = FAX_CONFIGURATIONW;
- {$EXTERNALSYM FAX_CONFIGURATION}
- PFAX_CONFIGURATION = PFAX_CONFIGURATIONW;
- {$EXTERNALSYM PFAX_CONFIGURATION}
- TFaxConfiguration = TFaxConfigurationW;
- PFaxConfiguration = PFaxConfigurationW;
- {$ELSE}
- FAX_CONFIGURATION = FAX_CONFIGURATIONA;
- {$EXTERNALSYM FAX_CONFIGURATION}
- PFAX_CONFIGURATION = PFAX_CONFIGURATIONA;
- {$EXTERNALSYM PFAX_CONFIGURATION}
- TFaxConfiguration = TFaxConfigurationA;
- PFaxConfiguration = PFaxConfigurationA;
- {$ENDIF UNICODE}
-
-//
-// FaxSetJob() command codes
-//
-
- FAX_ENUM_JOB_COMMANDS = (
- JC_UNKNOWN,
- JC_DELETE,
- JC_PAUSE,
- JC_RESUME);
- {$EXTERNALSYM FAX_ENUM_JOB_COMMANDS}
- TFaxEnumJobCommands = FAX_ENUM_JOB_COMMANDS;
-
-const
- JC_RESTART = JC_RESUME;
- {$EXTERNALSYM JC_RESTART}
-
-//
-// job type defines
-//
-
- JT_UNKNOWN = 0;
- {$EXTERNALSYM JT_UNKNOWN}
- JT_SEND = 1;
- {$EXTERNALSYM JT_SEND}
- JT_RECEIVE = 2;
- {$EXTERNALSYM JT_RECEIVE}
- JT_ROUTING = 3;
- {$EXTERNALSYM JT_ROUTING}
- JT_FAIL_RECEIVE = 4;
- {$EXTERNALSYM JT_FAIL_RECEIVE}
-
-//
-// job status defines
-//
-
- JS_PENDING = $00000000;
- {$EXTERNALSYM JS_PENDING}
- JS_INPROGRESS = $00000001;
- {$EXTERNALSYM JS_INPROGRESS}
- JS_DELETING = $00000002;
- {$EXTERNALSYM JS_DELETING}
- JS_FAILED = $00000004;
- {$EXTERNALSYM JS_FAILED}
- JS_PAUSED = $00000008;
- {$EXTERNALSYM JS_PAUSED}
- JS_NOLINE = $00000010;
- {$EXTERNALSYM JS_NOLINE}
- JS_RETRYING = $00000020;
- {$EXTERNALSYM JS_RETRYING}
- JS_RETRIES_EXCEEDED = $00000040;
- {$EXTERNALSYM JS_RETRIES_EXCEEDED}
-
-type
- PFAX_DEVICE_STATUSA = ^FAX_DEVICE_STATUSA;
- {$EXTERNALSYM PFAX_DEVICE_STATUSA}
- _FAX_DEVICE_STATUSA = record
- SizeOfStruct: DWORD; // size of this structure
- CallerId: LPCSTR; // caller id string
- Csid: LPCSTR; // station identifier
- CurrentPage: DWORD; // current page
- DeviceId: DWORD; // permanent line id
- DeviceName: LPCSTR; // device name
- DocumentName: LPCSTR; // document name
- JobType: DWORD; // send or receive?
- PhoneNumber: LPCSTR; // sending phone number
- RoutingString: LPCSTR; // routing information
- SenderName: LPCSTR; // sender name
- RecipientName: LPCSTR; // recipient name
- Size: DWORD; // size in bytes of the document
- StartTime: FILETIME; // starting time of the fax send/receive
- Status: DWORD; // current status of the device, see FPS_??? masks
- StatusString: LPCSTR; // status string if the Status field is zero. this may be NULL.
- SubmittedTime: FILETIME; // time the document was submitted
- TotalPages: DWORD; // total number of pages in this job
- Tsid: LPCSTR; // transmitting station identifier
- UserName: LPCSTR; // user that submitted the active job
- end;
- {$EXTERNALSYM _FAX_DEVICE_STATUSA}
- FAX_DEVICE_STATUSA = _FAX_DEVICE_STATUSA;
- {$EXTERNALSYM FAX_DEVICE_STATUSA}
- TFaxDeviceStatusA = FAX_DEVICE_STATUSA;
- PFaxDeviceStatusA = PFAX_DEVICE_STATUSA;
-
- PFAX_DEVICE_STATUSW = ^FAX_DEVICE_STATUSW;
- {$EXTERNALSYM PFAX_DEVICE_STATUSW}
- _FAX_DEVICE_STATUSW = record
- SizeOfStruct: DWORD; // size of this structure
- CallerId: LPCWSTR; // caller id string
- Csid: LPCWSTR; // station identifier
- CurrentPage: DWORD; // current page
- DeviceId: DWORD; // permanent line id
- DeviceName: LPCWSTR; // device name
- DocumentName: LPCWSTR; // document name
- JobType: DWORD; // send or receive?
- PhoneNumber: LPCWSTR; // sending phone number
- RoutingString: LPCWSTR; // routing information
- SenderName: LPCWSTR; // sender name
- RecipientName: LPCWSTR; // recipient name
- Size: DWORD; // size in bytes of the document
- StartTime: FILETIME; // starting time of the fax send/receive
- Status: DWORD; // current status of the device, see FPS_??? masks
- StatusString: LPCWSTR; // status string if the Status field is zero. this may be NULL.
- SubmittedTime: FILETIME; // time the document was submitted
- TotalPages: DWORD; // total number of pages in this job
- Tsid: LPCWSTR; // transmitting station identifier
- UserName: LPCWSTR; // user that submitted the active job
- end;
- {$EXTERNALSYM _FAX_DEVICE_STATUSW}
- FAX_DEVICE_STATUSW = _FAX_DEVICE_STATUSW;
- {$EXTERNALSYM FAX_DEVICE_STATUSW}
- TFaxDeviceStatusW = FAX_DEVICE_STATUSW;
- PFaxDeviceStatusW = PFAX_DEVICE_STATUSW;
-
- {$IFDEF UNICODE}
- FAX_DEVICE_STATUS = FAX_DEVICE_STATUSW;
- {$EXTERNALSYM FAX_DEVICE_STATUS}
- PFAX_DEVICE_STATUS = PFAX_DEVICE_STATUSW;
- {$EXTERNALSYM PFAX_DEVICE_STATUS}
- TFaxDeviceStatus = TFaxDeviceStatusW;
- PFaxDeviceStatus = PFaxDeviceStatusW;
- {$ELSE}
- FAX_DEVICE_STATUS = FAX_DEVICE_STATUSA;
- {$EXTERNALSYM FAX_DEVICE_STATUS}
- PFAX_DEVICE_STATUS = PFAX_DEVICE_STATUSA;
- {$EXTERNALSYM PFAX_DEVICE_STATUS}
- TFaxDeviceStatus = TFaxDeviceStatusA;
- PFaxDeviceStatus = PFaxDeviceStatusA;
- {$ENDIF UNICODE}
-
- PFAX_JOB_ENTRYA = ^FAX_JOB_ENTRYA;
- {$EXTERNALSYM PFAX_JOB_ENTRYA}
- _FAX_JOB_ENTRYA = record
- SizeOfStruct: DWORD; // size of this structure
- JobId: DWORD; // fax job id
- UserName: LPCSTR; // user who submitted the job
- JobType: DWORD; // job type, see JT defines
- QueueStatus: DWORD; // job queue status, see JS defines
- Status: DWORD; // current status of the device, see FPS_??? masks
- Size: DWORD; // size in bytes of the document
- PageCount: DWORD; // total page count
- RecipientNumber: LPCSTR; // recipient fax number
- RecipientName: LPCSTR; // recipient name
- Tsid: LPCSTR; // transmitter's id
- SenderName: LPCSTR; // sender name
- SenderCompany: LPCSTR; // sender company
- SenderDept: LPCSTR; // sender department
- BillingCode: LPCSTR; // billing code
- ScheduleAction: DWORD; // when to schedule the fax, see JSA defines
- ScheduleTime: SYSTEMTIME; // time to send the fax when JSA_SPECIFIC_TIME is used (must be local time)
- DeliveryReportType: DWORD; // delivery report type, see DRT defines
- DeliveryReportAddress: LPCSTR; // email address for delivery report (ndr or dr) thru MAPI / SMTP
- DocumentName: LPCSTR; // document name
- end;
- {$EXTERNALSYM _FAX_JOB_ENTRYA}
- FAX_JOB_ENTRYA = _FAX_JOB_ENTRYA;
- {$EXTERNALSYM FAX_JOB_ENTRYA}
- TFaxJobEntryA = FAX_JOB_ENTRYA;
- PFaxJobEntryA = PFAX_JOB_ENTRYA;
-
- PFAX_JOB_ENTRYW = ^FAX_JOB_ENTRYW;
- {$EXTERNALSYM PFAX_JOB_ENTRYW}
- _FAX_JOB_ENTRYW = record
- SizeOfStruct: DWORD; // size of this structure
- JobId: DWORD; // fax job id
- UserName: LPCWSTR; // user who submitted the job
- JobType: DWORD; // job type, see JT defines
- QueueStatus: DWORD; // job queue status, see JS defines
- Status: DWORD; // current status of the device, see FPS_??? masks
- Size: DWORD; // size in bytes of the document
- PageCount: DWORD; // total page count
- RecipientNumber: LPCWSTR; // recipient fax number
- RecipientName: LPCWSTR; // recipient name
- Tsid: LPCWSTR; // transmitter's id
- SenderName: LPCWSTR; // sender name
- SenderCompany: LPCWSTR; // sender company
- SenderDept: LPCWSTR; // sender department
- BillingCode: LPCWSTR; // billing code
- ScheduleAction: DWORD; // when to schedule the fax, see JSA defines
- ScheduleTime: SYSTEMTIME; // time to send the fax when JSA_SPECIFIC_TIME is used (must be local time)
- DeliveryReportType: DWORD; // delivery report type, see DRT defines
- DeliveryReportAddress: LPCWSTR; // email address for delivery report (ndr or dr) thru MAPI / SMTP
- DocumentName: LPCWSTR; // document name
- end;
- {$EXTERNALSYM _FAX_JOB_ENTRYW}
- FAX_JOB_ENTRYW = _FAX_JOB_ENTRYW;
- {$EXTERNALSYM FAX_JOB_ENTRYW}
- TFaxJobEntryW = FAX_JOB_ENTRYW;
- PFaxJobEntryW = PFAX_JOB_ENTRYW;
-
- {$IFDEF UNICODE}
- FAX_JOB_ENTRY = FAX_JOB_ENTRYW;
- {$EXTERNALSYM FAX_JOB_ENTRY}
- PFAX_JOB_ENTRY = PFAX_JOB_ENTRYW;
- {$EXTERNALSYM PFAX_JOB_ENTRY}
- TFaxJobEntry = TFaxJobEntryW;
- PFaxJobEntry = PFaxJobEntryW;
- {$ELSE}
- FAX_JOB_ENTRY = FAX_JOB_ENTRYA;
- {$EXTERNALSYM FAX_JOB_ENTRY}
- PFAX_JOB_ENTRY = PFAX_JOB_ENTRYA;
- {$EXTERNALSYM PFAX_JOB_ENTRY}
- TFaxJobEntry = TFaxJobEntryA;
- PFaxJobEntry = PFaxJobEntryA;
- {$ENDIF UNICODE}
-
-//
-// fax port state masks
-//
-// if you change these defines the be sure to
-// change the resources in the fax service.
-//
-
-const
- FPS_DIALING = $20000001;
- {$EXTERNALSYM FPS_DIALING}
- FPS_SENDING = $20000002;
- {$EXTERNALSYM FPS_SENDING}
- FPS_RECEIVING = $20000004;
- {$EXTERNALSYM FPS_RECEIVING}
- FPS_COMPLETED = $20000008;
- {$EXTERNALSYM FPS_COMPLETED}
- FPS_HANDLED = $20000010;
- {$EXTERNALSYM FPS_HANDLED}
- FPS_UNAVAILABLE = $20000020;
- {$EXTERNALSYM FPS_UNAVAILABLE}
- FPS_BUSY = $20000040;
- {$EXTERNALSYM FPS_BUSY}
- FPS_NO_ANSWER = $20000080;
- {$EXTERNALSYM FPS_NO_ANSWER}
- FPS_BAD_ADDRESS = $20000100;
- {$EXTERNALSYM FPS_BAD_ADDRESS}
- FPS_NO_DIAL_TONE = $20000200;
- {$EXTERNALSYM FPS_NO_DIAL_TONE}
- FPS_DISCONNECTED = $20000400;
- {$EXTERNALSYM FPS_DISCONNECTED}
- FPS_FATAL_ERROR = $20000800;
- {$EXTERNALSYM FPS_FATAL_ERROR}
- FPS_NOT_FAX_CALL = $20001000;
- {$EXTERNALSYM FPS_NOT_FAX_CALL}
- FPS_CALL_DELAYED = $20002000;
- {$EXTERNALSYM FPS_CALL_DELAYED}
- FPS_CALL_BLACKLISTED = $20004000;
- {$EXTERNALSYM FPS_CALL_BLACKLISTED}
- FPS_INITIALIZING = $20008000;
- {$EXTERNALSYM FPS_INITIALIZING}
- FPS_OFFLINE = $20010000;
- {$EXTERNALSYM FPS_OFFLINE}
- FPS_RINGING = $20020000;
- {$EXTERNALSYM FPS_RINGING}
-
- FPS_AVAILABLE = $20100000;
- {$EXTERNALSYM FPS_AVAILABLE}
- FPS_ABORTING = $20200000;
- {$EXTERNALSYM FPS_ABORTING}
- FPS_ROUTING = $20400000;
- {$EXTERNALSYM FPS_ROUTING}
- FPS_ANSWERED = $20800000;
- {$EXTERNALSYM FPS_ANSWERED}
-
-//
-// fax port capability mask
-//
-
- FPF_RECEIVE = $00000001; // Automatically receive faxes
- {$EXTERNALSYM FPF_RECEIVE}
- FPF_SEND = $00000002;
- {$EXTERNALSYM FPF_SEND}
- FPF_VIRTUAL = $00000004;
- {$EXTERNALSYM FPF_VIRTUAL}
-
-type
- PFAX_PORT_INFOA = ^FAX_PORT_INFOA;
- {$EXTERNALSYM PFAX_PORT_INFOA}
- _FAX_PORT_INFOA = record
- SizeOfStruct: DWORD; // size of this structure
- DeviceId: DWORD; // Device ID
- State: DWORD; // State of the device
- Flags: DWORD; // Device specific flags
- Rings: DWORD; // Number of rings before answer
- Priority: DWORD; // Device priority
- DeviceName: LPCSTR; // Device name
- Tsid: LPCSTR; // Device Tsid
- Csid: LPCSTR; // Device Csid
- end;
- {$EXTERNALSYM _FAX_PORT_INFOA}
- FAX_PORT_INFOA = _FAX_PORT_INFOA;
- {$EXTERNALSYM FAX_PORT_INFOA}
- TFaxPortInfoA = FAX_PORT_INFOA;
- PFaxPortInfoA = PFAX_PORT_INFOA;
-
- PFAX_PORT_INFOW = ^FAX_PORT_INFOW;
- {$EXTERNALSYM PFAX_PORT_INFOW}
- _FAX_PORT_INFOW = record
- SizeOfStruct: DWORD; // size of this structure
- DeviceId: DWORD; // Device ID
- State: DWORD; // State of the device
- Flags: DWORD; // Device specific flags
- Rings: DWORD; // Number of rings before answer
- Priority: DWORD; // Device priority
- DeviceName: LPCWSTR; // Device name
- Tsid: LPCWSTR; // Device Tsid
- Csid: LPCWSTR; // Device Csid
- end;
- {$EXTERNALSYM _FAX_PORT_INFOW}
- FAX_PORT_INFOW = _FAX_PORT_INFOW;
- {$EXTERNALSYM FAX_PORT_INFOW}
- TFaxPortInfoW = FAX_PORT_INFOW;
- PFaxPortInfoW = PFAX_PORT_INFOW;
-
- {$IFDEF UNICODE}
- FAX_PORT_INFO = FAX_PORT_INFOW;
- {$EXTERNALSYM FAX_PORT_INFO}
- PFAX_PORT_INFO = PFAX_PORT_INFOW;
- {$EXTERNALSYM PFAX_PORT_INFO}
- TFaxPortInfo = TFaxPortInfoW;
- PFaxPortInfo = PFaxPortInfoW;
- {$ELSE}
- FAX_PORT_INFO = FAX_PORT_INFOA;
- {$EXTERNALSYM FAX_PORT_INFO}
- PFAX_PORT_INFO = PFAX_PORT_INFOA;
- {$EXTERNALSYM PFAX_PORT_INFO}
- TFaxPortInfo = TFaxPortInfoA;
- PFaxPortInfo = PFaxPortInfoA;
- {$ENDIF UNICODE}
-
- PFAX_ROUTING_METHODA = ^FAX_ROUTING_METHODA;
- {$EXTERNALSYM PFAX_ROUTING_METHODA}
- _FAX_ROUTING_METHODA = record
- SizeOfStruct: DWORD; // size of this structure
- DeviceId: DWORD; // device identifier
- Enabled: BOOL; // is this method enabled for this device?
- DeviceName: LPCSTR; // device name
- Guid: LPCSTR; // guid that identifies this routing method
- FriendlyName: LPCSTR; // friendly name for this method
- FunctionName: LPCSTR; // exported function name that identifies this method
- ExtensionImageName: LPCSTR; // module (dll) name that implements this method
- ExtensionFriendlyName: LPCSTR; // displayable string that identifies the extension
- end;
- {$EXTERNALSYM _FAX_ROUTING_METHODA}
- FAX_ROUTING_METHODA = _FAX_ROUTING_METHODA;
- {$EXTERNALSYM FAX_ROUTING_METHODA}
- TFaxRoutingMethodA = FAX_ROUTING_METHODA;
- PFaxRoutingMethodA = PFAX_ROUTING_METHODA;
-
- PFAX_ROUTING_METHODW = ^FAX_ROUTING_METHODW;
- {$EXTERNALSYM PFAX_ROUTING_METHODW}
- _FAX_ROUTING_METHODW = record
- SizeOfStruct: DWORD; // size of this structure
- DeviceId: DWORD; // device identifier
- Enabled: BOOL; // is this method enabled for this device?
- DeviceName: LPCWSTR; // device name
- Guid: LPCWSTR; // guid that identifies this routing method
- FriendlyName: LPCWSTR; // friendly name for this method
- FunctionName: LPCWSTR; // exported function name that identifies this method
- ExtensionImageName: LPCWSTR; // module (dll) name that implements this method
- ExtensionFriendlyName: LPCWSTR; // displayable string that identifies the extension
- end;
- {$EXTERNALSYM _FAX_ROUTING_METHODW}
- FAX_ROUTING_METHODW = _FAX_ROUTING_METHODW;
- {$EXTERNALSYM FAX_ROUTING_METHODW}
- TFaxRoutingMethodW = FAX_ROUTING_METHODW;
- PFaxRoutingMethodW = PFAX_ROUTING_METHODW;
-
- {$IFDEF UNICODE}
- FAX_ROUTING_METHOD = FAX_ROUTING_METHODW;
- {$EXTERNALSYM FAX_ROUTING_METHOD}
- PFAX_ROUTING_METHOD = PFAX_ROUTING_METHODW;
- {$EXTERNALSYM PFAX_ROUTING_METHOD}
- TFaxRoutingMethod = TFaxRoutingMethodW;
- PFaxRoutingMethod = PFaxRoutingMethodW;
- {$ELSE}
- FAX_ROUTING_METHOD = FAX_ROUTING_METHODA;
- {$EXTERNALSYM FAX_ROUTING_METHOD}
- PFAX_ROUTING_METHOD = PFAX_ROUTING_METHODA;
- {$EXTERNALSYM PFAX_ROUTING_METHOD}
- TFaxRoutingMethod = TFaxRoutingMethodA;
- PFaxRoutingMethod = PFaxRoutingMethodA;
- {$ENDIF UNICODE}
-
- PFAX_GLOBAL_ROUTING_INFOA = ^FAX_GLOBAL_ROUTING_INFOA;
- {$EXTERNALSYM PFAX_GLOBAL_ROUTING_INFOA}
- _FAX_GLOBAL_ROUTING_INFOA = record
- SizeOfStruct: DWORD; // size of this structure
- Priority: DWORD; // priority of this device
- Guid: LPCSTR; // guid that identifies this routing method
- FriendlyName: LPCSTR; // friendly name for this method
- FunctionName: LPCSTR; // exported function name that identifies this method
- ExtensionImageName: LPCSTR; // module (dll) name that implements this method
- ExtensionFriendlyName: LPCSTR; // displayable string that identifies the extension
- end;
- {$EXTERNALSYM _FAX_GLOBAL_ROUTING_INFOA}
- FAX_GLOBAL_ROUTING_INFOA = _FAX_GLOBAL_ROUTING_INFOA;
- {$EXTERNALSYM FAX_GLOBAL_ROUTING_INFOA}
- TFaxGlobalRoutingInfoA = FAX_GLOBAL_ROUTING_INFOA;
- PFaxGlobalRoutingInfoA = PFAX_GLOBAL_ROUTING_INFOA;
-
- PFAX_GLOBAL_ROUTING_INFOW = ^FAX_GLOBAL_ROUTING_INFOW;
- {$EXTERNALSYM PFAX_GLOBAL_ROUTING_INFOW}
- _FAX_GLOBAL_ROUTING_INFOW = record
- SizeOfStruct: DWORD; // size of this structure
- Priority: DWORD; // priority of this device
- Guid: LPCWSTR; // guid that identifies this routing method
- FriendlyName: LPCWSTR; // friendly name for this method
- FunctionName: LPCWSTR; // exported function name that identifies this method
- ExtensionImageName: LPCWSTR; // module (dll) name that implements this method
- ExtensionFriendlyName: LPCWSTR; // displayable string that identifies the extension
- end;
- {$EXTERNALSYM _FAX_GLOBAL_ROUTING_INFOW}
- FAX_GLOBAL_ROUTING_INFOW = _FAX_GLOBAL_ROUTING_INFOW;
- {$EXTERNALSYM FAX_GLOBAL_ROUTING_INFOW}
- TFaxGlobalRoutingInfoW = FAX_GLOBAL_ROUTING_INFOW;
- PFaxGlobalRoutingInfoW = PFAX_GLOBAL_ROUTING_INFOW;
-
- {$IFDEF UNICODE}
- FAX_GLOBAL_ROUTING_INFO = FAX_GLOBAL_ROUTING_INFOW;
- {$EXTERNALSYM FAX_GLOBAL_ROUTING_INFO}
- PFAX_GLOBAL_ROUTING_INFO = FAX_GLOBAL_ROUTING_INFOW;
- {$EXTERNALSYM PFAX_GLOBAL_ROUTING_INFO}
- TFaxGlobalRoutingInfo = TFaxGlobalRoutingInfoW;
- PFaxGlobalRoutingInfo = PFaxGlobalRoutingInfoW;
- {$ELSE}
- FAX_GLOBAL_ROUTING_INFO = FAX_GLOBAL_ROUTING_INFOA;
- {$EXTERNALSYM FAX_GLOBAL_ROUTING_INFO}
- PFAX_GLOBAL_ROUTING_INFO = FAX_GLOBAL_ROUTING_INFOA;
- {$EXTERNALSYM PFAX_GLOBAL_ROUTING_INFO}
- TFaxGlobalRoutingInfo = TFaxGlobalRoutingInfoA;
- PFaxGlobalRoutingInfo = PFaxGlobalRoutingInfoA;
- {$ENDIF UNICODE}
-
- PFAX_COVERPAGE_INFOA = ^FAX_COVERPAGE_INFOA;
- {$EXTERNALSYM PFAX_COVERPAGE_INFOA}
- _FAX_COVERPAGE_INFOA = record
- SizeOfStruct: DWORD; // Size of this structure
- //
- // general
- //
- CoverPageName: LPCSTR; // coverpage document name
- UseServerCoverPage: BOOL; // coverpage exists on the fax server
- //
- // Recipient information
- //
- RecName: LPCSTR;
- RecFaxNumber: LPCSTR;
- RecCompany: LPCSTR;
- RecStreetAddress: LPCSTR;
- RecCity: LPCSTR;
- RecState: LPCSTR;
- RecZip: LPCSTR;
- RecCountry: LPCSTR;
- RecTitle: LPCSTR;
- RecDepartment: LPCSTR;
- RecOfficeLocation: LPCSTR;
- RecHomePhone: LPCSTR;
- RecOfficePhone: LPCSTR;
- //
- // Sender information
- //
- SdrName: LPCSTR;
- SdrFaxNumber: LPCSTR;
- SdrCompany: LPCSTR;
- SdrAddress: LPCSTR;
- SdrTitle: LPCSTR;
- SdrDepartment: LPCSTR;
- SdrOfficeLocation: LPCSTR;
- SdrHomePhone: LPCSTR;
- SdrOfficePhone: LPCSTR;
- //
- // Misc information
- //
- Note: LPCSTR;
- Subject: LPCSTR;
- TimeSent: SYSTEMTIME; // Time the fax was sent
- PageCount: DWORD; // Number of pages
- end;
- {$EXTERNALSYM _FAX_COVERPAGE_INFOA}
- FAX_COVERPAGE_INFOA = _FAX_COVERPAGE_INFOA;
- {$EXTERNALSYM FAX_COVERPAGE_INFOA}
- TFaxCoverpageInfoA = FAX_COVERPAGE_INFOA;
- PFaxCoverpageInfoA = PFAX_COVERPAGE_INFOA;
-
- PFAX_COVERPAGE_INFOW = ^FAX_COVERPAGE_INFOW;
- {$EXTERNALSYM PFAX_COVERPAGE_INFOW}
- _FAX_COVERPAGE_INFOW = record
- SizeOfStruct: DWORD; // Size of this structure
- //
- // general
- //
- CoverPageName: LPCWSTR; // coverpage document name
- UseServerCoverPage: BOOL; // coverpage exists on the fax server
- //
- // Recipient information
- //
- RecName: LPCWSTR;
- RecFaxNumber: LPCWSTR;
- RecCompany: LPCWSTR;
- RecStreetAddress: LPCWSTR;
- RecCity: LPCWSTR;
- RecState: LPCWSTR;
- RecZip: LPCWSTR;
- RecCountry: LPCWSTR;
- RecTitle: LPCWSTR;
- RecDepartment: LPCWSTR;
- RecOfficeLocation: LPCWSTR;
- RecHomePhone: LPCWSTR;
- RecOfficePhone: LPCWSTR;
- //
- // Sender information
- //
- SdrName: LPCWSTR;
- SdrFaxNumber: LPCWSTR;
- SdrCompany: LPCWSTR;
- SdrAddress: LPCWSTR;
- SdrTitle: LPCWSTR;
- SdrDepartment: LPCWSTR;
- SdrOfficeLocation: LPCWSTR;
- SdrHomePhone: LPCWSTR;
- SdrOfficePhone: LPCWSTR;
- //
- // Misc information
- //
- Note: LPCWSTR;
- Subject: LPCWSTR;
- TimeSent: SYSTEMTIME; // Time the fax was sent
- PageCount: DWORD; // Number of pages
- end;
- {$EXTERNALSYM _FAX_COVERPAGE_INFOW}
- FAX_COVERPAGE_INFOW = _FAX_COVERPAGE_INFOW;
- {$EXTERNALSYM FAX_COVERPAGE_INFOW}
- TFaxCoverpageInfoW = FAX_COVERPAGE_INFOW;
- PFaxCoverpageInfoW = PFAX_COVERPAGE_INFOW;
-
- {$IFDEF UNICODE}
- FAX_COVERPAGE_INFO = FAX_COVERPAGE_INFOW;
- {$EXTERNALSYM FAX_COVERPAGE_INFO}
- PFAX_COVERPAGE_INFO = PFAX_COVERPAGE_INFOW;
- {$EXTERNALSYM PFAX_COVERPAGE_INFO}
- TFaxCoverpageInfo = TFaxCoverpageInfoW;
- PFaxCoverpageInfo = PFaxCoverpageInfoW;
- {$ELSE}
- FAX_COVERPAGE_INFO = FAX_COVERPAGE_INFOA;
- {$EXTERNALSYM FAX_COVERPAGE_INFO}
- PFAX_COVERPAGE_INFO = PFAX_COVERPAGE_INFOA;
- {$EXTERNALSYM PFAX_COVERPAGE_INFO}
- TFaxCoverpageInfo = TFaxCoverpageInfoA;
- PFaxCoverpageInfo = PFaxCoverpageInfoA;
- {$ENDIF UNICODE}
-
- FAX_ENUM_JOB_SEND_ATTRIBUTES = (
- JSA_NOW, // Send now
- JSA_SPECIFIC_TIME, // Send at specific time
- JSA_DISCOUNT_PERIOD); // Send at server configured discount period
- {$EXTERNALSYM FAX_ENUM_JOB_SEND_ATTRIBUTES}
- TFaxEnumJobSendAttributes = FAX_ENUM_JOB_SEND_ATTRIBUTES;
-
- FAX_ENUM_DELIVERY_REPORT_TYPES = (
- DRT_NONE, // Do not send receipt
- DRT_EMAIL, // Send receipt by email
- DRT_INBOX); // send receipt to local inbox
- {$EXTERNALSYM FAX_ENUM_DELIVERY_REPORT_TYPES}
- TFaxEnumDeliveryReportTypes = FAX_ENUM_DELIVERY_REPORT_TYPES;
-
- HCALL = HANDLE; // todo from TAPI
-
- PFAX_JOB_PARAMA = ^FAX_JOB_PARAMA;
- {$EXTERNALSYM PFAX_JOB_PARAMA}
- _FAX_JOB_PARAMA = record
- SizeOfStruct: DWORD; // size of this structure
- RecipientNumber: LPCSTR; // recipient fax number
- RecipientName: LPCSTR; // recipient name
- Tsid: LPCSTR; // transmitter's id
- SenderName: LPCSTR; // sender name
- SenderCompany: LPCSTR; // sender company
- SenderDept: LPCSTR; // sender department
- BillingCode: LPCSTR; // billing code
- ScheduleAction: DWORD; // when to schedule the fax, see JSA defines
- ScheduleTime: SYSTEMTIME; // time to send the fax when JSA_SPECIFIC_TIME is used (must be local time)
- DeliveryReportType: DWORD; // delivery report type, see DRT defines
- DeliveryReportAddress: LPCSTR; // email address for delivery report (ndr or dr) thru MAPI / SMTP
- DocumentName: LPCSTR; // document name (optional)
- CallHandle: HCALL; // optional call handle
- Reserved: array [0..3 - 1] of DWORD_PTR; // reserved for ms use only
- end;
- {$EXTERNALSYM _FAX_JOB_PARAMA}
- FAX_JOB_PARAMA = _FAX_JOB_PARAMA;
- {$EXTERNALSYM FAX_JOB_PARAMA}
- TFaxJobParamA = FAX_JOB_PARAMA;
- PFaxJobParamA = PFAX_JOB_PARAMA;
-
- PFAX_JOB_PARAMW = ^FAX_JOB_PARAMW;
- {$EXTERNALSYM PFAX_JOB_PARAMW}
- _FAX_JOB_PARAMW = record
- SizeOfStruct: DWORD; // size of this structure
- RecipientNumber: LPCWSTR; // recipient fax number
- RecipientName: LPCWSTR; // recipient name
- Tsid: LPCWSTR; // transmitter's id
- SenderName: LPCWSTR; // sender name
- SenderCompany: LPCWSTR; // sender company
- SenderDept: LPCWSTR; // sender department
- BillingCode: LPCWSTR; // billing code
- ScheduleAction: DWORD; // when to schedule the fax, see JSA defines
- ScheduleTime: SYSTEMTIME; // time to send the fax when JSA_SPECIFIC_TIME is used (must be local time)
- DeliveryReportType: DWORD; // delivery report type, see DRT defines
- DeliveryReportAddress: LPCWSTR; // email address for delivery report (ndr or dr) thru MAPI / SMTP
- DocumentName: LPCWSTR; // document name (optional)
- CallHandle: HCALL; // optional call handle
- Reserved: array [0..3 - 1] of DWORD_PTR; // reserved for ms use only
- end;
- {$EXTERNALSYM _FAX_JOB_PARAMW}
- FAX_JOB_PARAMW = _FAX_JOB_PARAMW;
- {$EXTERNALSYM FAX_JOB_PARAMW}
- TFaxJobParamW = FAX_JOB_PARAMW;
- PFaxJobParamW = PFAX_JOB_PARAMW;
-
- {$IFDEF UNICODE}
- FAX_JOB_PARAM = FAX_JOB_PARAMW;
- {$EXTERNALSYM FAX_JOB_PARAM}
- PFAX_JOB_PARAM = PFAX_JOB_PARAMW;
- {$EXTERNALSYM PFAX_JOB_PARAM}
- TFaxJobParam = TFaxJobParamW;
- PFaxJobParam = PFaxJobParamW;
- {$ELSE}
- FAX_JOB_PARAM = FAX_JOB_PARAMA;
- {$EXTERNALSYM FAX_JOB_PARAM}
- PFAX_JOB_PARAM = PFAX_JOB_PARAMA;
- {$EXTERNALSYM PFAX_JOB_PARAM}
- TFaxJobParam = TFaxJobParamA;
- PFaxJobParam = PFaxJobParamA;
- {$ENDIF UNICODE}
-
-//
-// Event Ids
-//
-// FEI_NEVENTS is the number of events
-//
-
-const
- FEI_DIALING = $00000001;
- {$EXTERNALSYM FEI_DIALING}
- FEI_SENDING = $00000002;
- {$EXTERNALSYM FEI_SENDING}
- FEI_RECEIVING = $00000003;
- {$EXTERNALSYM FEI_RECEIVING}
- FEI_COMPLETED = $00000004;
- {$EXTERNALSYM FEI_COMPLETED}
- FEI_BUSY = $00000005;
- {$EXTERNALSYM FEI_BUSY}
- FEI_NO_ANSWER = $00000006;
- {$EXTERNALSYM FEI_NO_ANSWER}
- FEI_BAD_ADDRESS = $00000007;
- {$EXTERNALSYM FEI_BAD_ADDRESS}
- FEI_NO_DIAL_TONE = $00000008;
- {$EXTERNALSYM FEI_NO_DIAL_TONE}
- FEI_DISCONNECTED = $00000009;
- {$EXTERNALSYM FEI_DISCONNECTED}
- FEI_FATAL_ERROR = $0000000a;
- {$EXTERNALSYM FEI_FATAL_ERROR}
- FEI_NOT_FAX_CALL = $0000000b;
- {$EXTERNALSYM FEI_NOT_FAX_CALL}
- FEI_CALL_DELAYED = $0000000c;
- {$EXTERNALSYM FEI_CALL_DELAYED}
- FEI_CALL_BLACKLISTED = $0000000d;
- {$EXTERNALSYM FEI_CALL_BLACKLISTED}
- FEI_RINGING = $0000000e;
- {$EXTERNALSYM FEI_RINGING}
- FEI_ABORTING = $0000000f;
- {$EXTERNALSYM FEI_ABORTING}
- FEI_ROUTING = $00000010;
- {$EXTERNALSYM FEI_ROUTING}
- FEI_MODEM_POWERED_ON = $00000011;
- {$EXTERNALSYM FEI_MODEM_POWERED_ON}
- FEI_MODEM_POWERED_OFF = $00000012;
- {$EXTERNALSYM FEI_MODEM_POWERED_OFF}
- FEI_IDLE = $00000013;
- {$EXTERNALSYM FEI_IDLE}
- FEI_FAXSVC_ENDED = $00000014;
- {$EXTERNALSYM FEI_FAXSVC_ENDED}
- FEI_ANSWERED = $00000015;
- {$EXTERNALSYM FEI_ANSWERED}
- FEI_JOB_QUEUED = $00000016;
- {$EXTERNALSYM FEI_JOB_QUEUED}
- FEI_DELETED = $00000017;
- {$EXTERNALSYM FEI_DELETED}
- FEI_INITIALIZING = $00000018;
- {$EXTERNALSYM FEI_INITIALIZING}
- FEI_LINE_UNAVAILABLE = $00000019;
- {$EXTERNALSYM FEI_LINE_UNAVAILABLE}
- FEI_HANDLED = $0000001a;
- {$EXTERNALSYM FEI_HANDLED}
- FEI_FAXSVC_STARTED = $0000001b;
- {$EXTERNALSYM FEI_FAXSVC_STARTED}
-
- FEI_NEVENTS = FEI_FAXSVC_STARTED;
- {$EXTERNALSYM FEI_NEVENTS}
-
-type
- PFAX_EVENTA = ^FAX_EVENTA;
- {$EXTERNALSYM PFAX_EVENTA}
- _FAX_EVENTA = record
- SizeOfStruct: DWORD; // Size of this structure
- TimeStamp: FILETIME; // Timestamp for when the event was generated
- DeviceId: DWORD; // Permanent line id
- EventId: DWORD; // Current event id
- JobId: DWORD; // Fax Job Id, 0xffffffff indicates inactive job
- end;
- {$EXTERNALSYM _FAX_EVENTA}
- FAX_EVENTA = _FAX_EVENTA;
- {$EXTERNALSYM FAX_EVENTA}
- TFaxEventA = FAX_EVENTA;
- PFaxEventA = PFAX_EVENTA;
-
- PFAX_EVENTW = ^FAX_EVENTW;
- {$EXTERNALSYM PFAX_EVENTW}
- _FAX_EVENTW = record
- SizeOfStruct: DWORD; // Size of this structure
- TimeStamp: FILETIME; // Timestamp for when the event was generated
- DeviceId: DWORD; // Permanent line id
- EventId: DWORD; // Current event id
- JobId: DWORD; // Fax Job Id, 0xffffffff indicates inactive job
- end;
- {$EXTERNALSYM _FAX_EVENTW}
- FAX_EVENTW = _FAX_EVENTW;
- {$EXTERNALSYM FAX_EVENTW}
- TFaxEventW = FAX_EVENTW;
- PFaxEventW = PFAX_EVENTW;
-
- {$IFDEF UNICODE}
- FAX_EVENT = FAX_EVENTW;
- {$EXTERNALSYM FAX_EVENT}
- PFAX_EVENT = PFAX_EVENTW;
- {$EXTERNALSYM PFAX_EVENT}
- TFaxEvent = TFaxEventW;
- PFaxEvent = PFaxEventW;
- {$ELSE}
- FAX_EVENT = FAX_EVENTA;
- {$EXTERNALSYM FAX_EVENT}
- PFAX_EVENT = PFAX_EVENTA;
- {$EXTERNALSYM PFAX_EVENT}
- TFaxEvent = TFaxEventA;
- PFaxEvent = PFaxEventA;
- {$ENDIF UNICODE}
-
- PFAX_PRINT_INFOA = ^FAX_PRINT_INFOA;
- {$EXTERNALSYM PFAX_PRINT_INFOA}
- _FAX_PRINT_INFOA = record
- SizeOfStruct: DWORD; // Size of this structure
- DocName: LPCSTR; // Document name that appears in the spooler
- RecipientName: LPCSTR; // Recipient name
- RecipientNumber: LPCSTR; // Recipient fax number (non-canonical number)
- SenderName: LPCSTR; // Sender name
- SenderCompany: LPCSTR; // Sender company (optional)
- SenderDept: LPCSTR; // Sender department
- SenderBillingCode: LPCSTR; // Billing code
- Reserved: LPCSTR; // Reserved; must be NULL
- DrEmailAddress: LPCSTR; // E.Mail address for delivery report
- OutputFileName: LPCSTR; // for print to file, resulting file name
- end;
- {$EXTERNALSYM _FAX_PRINT_INFOA}
- FAX_PRINT_INFOA = _FAX_PRINT_INFOA;
- {$EXTERNALSYM FAX_PRINT_INFOA}
- TFaxPrintInfoA = FAX_PRINT_INFOA;
- PFaxPrintInfoA = PFAX_PRINT_INFOA;
-
- PFAX_PRINT_INFOW = ^FAX_PRINT_INFOW;
- {$EXTERNALSYM PFAX_PRINT_INFOW}
- _FAX_PRINT_INFOW = record
- SizeOfStruct: DWORD; // Size of this structure
- DocName: LPCWSTR; // Document name that appears in the spooler
- RecipientName: LPCWSTR; // Recipient name
- RecipientNumber: LPCWSTR; // Recipient fax number (non-canonical number)
- SenderName: LPCWSTR; // Sender name
- SenderCompany: LPCWSTR; // Sender company (optional)
- SenderDept: LPCWSTR; // Sender department
- SenderBillingCode: LPCWSTR; // Billing code
- Reserved: LPCWSTR; // Reserved; must be NULL
- DrEmailAddress: LPCWSTR; // E.Mail address for delivery report
- OutputFileName: LPCWSTR; // for print to file, resulting file name
- end;
- {$EXTERNALSYM _FAX_PRINT_INFOW}
- FAX_PRINT_INFOW = _FAX_PRINT_INFOW;
- {$EXTERNALSYM FAX_PRINT_INFOW}
- TFaxPrintInfoW = FAX_PRINT_INFOW;
- PFaxPrintInfoW = PFAX_PRINT_INFOW;
-
- {$IFDEF UNICODE}
- FAX_PRINT_INFO = FAX_PRINT_INFOW;
- {$EXTERNALSYM FAX_PRINT_INFO}
- PFAX_PRINT_INFO = PFAX_PRINT_INFOW;
- {$EXTERNALSYM PFAX_PRINT_INFO}
- TFaxPrintInfo = TFaxPrintInfoW;
- PFaxPrintInfo = PFaxPrintInfoW;
- {$ELSE}
- FAX_PRINT_INFO = FAX_PRINT_INFOA;
- {$EXTERNALSYM FAX_PRINT_INFO}
- PFAX_PRINT_INFO = PFAX_PRINT_INFOA;
- {$EXTERNALSYM PFAX_PRINT_INFO}
- TFaxPrintInfo = TFaxPrintInfoA;
- PFaxPrintInfo = PFaxPrintInfoA;
- {$ENDIF UNICODE}
-
- PFAX_CONTEXT_INFOA = ^FAX_CONTEXT_INFOA;
- {$EXTERNALSYM PFAX_CONTEXT_INFOA}
- _FAX_CONTEXT_INFOA = record
- SizeOfStruct: DWORD; // Size of this structure
- hDC: HDC; // Device Context
- ServerName: array [0..MAX_COMPUTERNAME_LENGTH] of CHAR; // Server name
- end;
- {$EXTERNALSYM _FAX_CONTEXT_INFOA}
- FAX_CONTEXT_INFOA = _FAX_CONTEXT_INFOA;
- {$EXTERNALSYM FAX_CONTEXT_INFOA}
- TFaxContextInfoA = FAX_CONTEXT_INFOA;
- PFaxContextInfoA = PFAX_CONTEXT_INFOA;
-
- PFAX_CONTEXT_INFOW = ^FAX_CONTEXT_INFOW;
- {$EXTERNALSYM PFAX_CONTEXT_INFOW}
- _FAX_CONTEXT_INFOW = record
- SizeOfStruct: DWORD; // Size of this structure
- hDC: HDC; // Device Context
- ServerName: array [0..MAX_COMPUTERNAME_LENGTH] of WCHAR; // Server name
- end;
- {$EXTERNALSYM _FAX_CONTEXT_INFOW}
- FAX_CONTEXT_INFOW = _FAX_CONTEXT_INFOW;
- {$EXTERNALSYM FAX_CONTEXT_INFOW}
- TFaxContextInfoW = FAX_CONTEXT_INFOW;
- PFaxContextInfoW = PFAX_CONTEXT_INFOW;
-
- {$IFDEF UNICODE}
- FAX_CONTEXT_INFO = FAX_CONTEXT_INFOW;
- {$EXTERNALSYM FAX_CONTEXT_INFO}
- PFAX_CONTEXT_INFO = PFAX_CONTEXT_INFOW;
- {$EXTERNALSYM PFAX_CONTEXT_INFO}
- TFaxContextInfo = TFaxContextInfoW;
- PFaxContextInfo = PFaxContextInfoW;
- {$ELSE}
- FAX_CONTEXT_INFO = FAX_CONTEXT_INFOA;
- {$EXTERNALSYM FAX_CONTEXT_INFO}
- PFAX_CONTEXT_INFO = PFAX_CONTEXT_INFOA;
- {$EXTERNALSYM PFAX_CONTEXT_INFO}
- TFaxContextInfo = TFaxContextInfoA;
- PFaxContextInfo = PFaxContextInfoA;
- {$ENDIF UNICODE}
-
-//
-// prototypes
-//
-
-function FaxConnectFaxServerA(MachineName: LPCSTR; var FaxHandle: HANDLE): BOOL; stdcall;
-{$EXTERNALSYM FaxConnectFaxServerA}
-function FaxConnectFaxServerW(MachineName: LPCWSTR; var FaxHandle: HANDLE): BOOL; stdcall;
-{$EXTERNALSYM FaxConnectFaxServerW}
-function FaxConnectFaxServer(MachineName: LPCTSTR; var FaxHandle: HANDLE): BOOL; stdcall;
-{$EXTERNALSYM FaxConnectFaxServer}
-
-function FaxClose(FaxHandle: HANDLE): BOOL; stdcall;
-{$EXTERNALSYM FaxClose}
-
-type
- FAX_ENUM_PORT_OPEN_TYPE = (
- PORT_OPEN_FILLER0,
- PORT_OPEN_QUERY,
- PORT_OPEN_MODIFY);
- {$EXTERNALSYM FAX_ENUM_PORT_OPEN_TYPE}
- TFaxEnumPortOpenType = FAX_ENUM_PORT_OPEN_TYPE;
-
-function FaxOpenPort(FaxHandle: HANDLE; DeviceId: DWORD; Flags: DWORD; var FaxPortHandle: HANDLE): BOOL; stdcall;
-{$EXTERNALSYM FaxOpenPort}
-
-function FaxCompleteJobParamsA(var JobParams: PFAX_JOB_PARAMA; var CoverpageInfo: PFAX_COVERPAGE_INFOA): BOOL; stdcall;
-{$EXTERNALSYM FaxCompleteJobParamsA}
-function FaxCompleteJobParamsW(var JobParams: PFAX_JOB_PARAMW; var CoverpageInfo: PFAX_COVERPAGE_INFOW): BOOL; stdcall;
-{$EXTERNALSYM FaxCompleteJobParamsW}
-function FaxCompleteJobParams(var JobParams: PFAX_JOB_PARAM; var CoverpageInfo: PFAX_COVERPAGE_INFO): BOOL; stdcall;
-{$EXTERNALSYM FaxCompleteJobParams}
-
-function FaxSendDocumentA(FaxHandle: HANDLE; FileName: LPCSTR; JobParams: PFAX_JOB_PARAMA; CoverpageInfo: PFAX_COVERPAGE_INFOA; FaxJobId: LPDWORD): BOOL; stdcall;
-{$EXTERNALSYM FaxSendDocumentA}
-function FaxSendDocumentW(FaxHandle: HANDLE; FileName: LPCWSTR; JobParams: PFAX_JOB_PARAMW; CoverpageInfo: PFAX_COVERPAGE_INFOW; FaxJobId: LPDWORD): BOOL; stdcall;
-{$EXTERNALSYM FaxSendDocumentW}
-function FaxSendDocument(FaxHandle: HANDLE; FileName: LPCTSTR; JobParams: PFAX_JOB_PARAM; CoverpageInfo: PFAX_COVERPAGE_INFO; FaxJobId: LPDWORD): BOOL; stdcall;
-{$EXTERNALSYM FaxSendDocument}
-
-type
- PFAX_RECIPIENT_CALLBACKA = function(FaxHandle: HANDLE; RecipientNumber: DWORD; Context: LPVOID; JobParams: PFAX_JOB_PARAMA; CoverpageInfo: PFAX_COVERPAGE_INFOA): BOOL; stdcall;
- {$EXTERNALSYM PFAX_RECIPIENT_CALLBACKA}
- TFaxRecipientCallbackA = PFAX_RECIPIENT_CALLBACKA;
- PFAX_RECIPIENT_CALLBACKW = function(FaxHandle: HANDLE; RecipientNumber: DWORD; Context: LPVOID; JobParams: PFAX_JOB_PARAMW; CoverpageInfo: PFAX_COVERPAGE_INFOW): BOOL; stdcall;
- {$EXTERNALSYM PFAX_RECIPIENT_CALLBACKW}
- TFaxRecipientCallbackW = PFAX_RECIPIENT_CALLBACKW;
-
- {$IFDEF UNICODE}
- PFAX_RECIPIENT_CALLBACK = PFAX_RECIPIENT_CALLBACKW;
- {$EXTERNALSYM PFAX_RECIPIENT_CALLBACK}
- TFaxRecipientCallback = TFaxRecipientCallbackW;
- {$ELSE}
- PFAX_RECIPIENT_CALLBACK = PFAX_RECIPIENT_CALLBACKA;
- {$EXTERNALSYM PFAX_RECIPIENT_CALLBACK}
- TFaxRecipientCallback = TFaxRecipientCallbackA;
- {$ENDIF UNICODE}
-
-function FaxSendDocumentForBroadcastA(FaxHandle: HANDLE; FileName: LPCSTR; FaxJobId: LPDWORD; FaxRecipientCallback: PFAX_RECIPIENT_CALLBACKA; Context: LPVOID): BOOL; stdcall;
-{$EXTERNALSYM FaxSendDocumentForBroadcastA}
-function FaxSendDocumentForBroadcastW(FaxHandle: HANDLE; FileName: LPCWSTR; FaxJobId: LPDWORD; FaxRecipientCallback: PFAX_RECIPIENT_CALLBACKW; Context: LPVOID): BOOL; stdcall;
-{$EXTERNALSYM FaxSendDocumentForBroadcastW}
-function FaxSendDocumentForBroadcast(FaxHandle: HANDLE; FileName: LPCTSTR; FaxJobId: LPDWORD; FaxRecipientCallback: PFAX_RECIPIENT_CALLBACK; Context: LPVOID): BOOL; stdcall;
-{$EXTERNALSYM FaxSendDocumentForBroadcast}
-
-function FaxEnumJobsA(FaxHandle: HANDLE; var JobEntry: PFAX_JOB_ENTRYA; var JobsReturned: DWORD): BOOL; stdcall;
-{$EXTERNALSYM FaxEnumJobsA}
-function FaxEnumJobsW(FaxHandle: HANDLE; var JobEntry: PFAX_JOB_ENTRYW; var JobsReturned: DWORD): BOOL; stdcall;
-{$EXTERNALSYM FaxEnumJobsW}
-function FaxEnumJobs(FaxHandle: HANDLE; var JobEntry: PFAX_JOB_ENTRY; var JobsReturned: DWORD): BOOL; stdcall;
-{$EXTERNALSYM FaxEnumJobs}
-
-function FaxGetJobA(FaxHandle: HANDLE; JobId: DWORD; var JobEntry: PFAX_JOB_ENTRYA): BOOL; stdcall;
-{$EXTERNALSYM FaxGetJobA}
-function FaxGetJobW(FaxHandle: HANDLE; JobId: DWORD; var JobEntry: PFAX_JOB_ENTRYW): BOOL; stdcall;
-{$EXTERNALSYM FaxGetJobW}
-function FaxGetJob(FaxHandle: HANDLE; JobId: DWORD; var JobEntry: PFAX_JOB_ENTRY): BOOL; stdcall;
-{$EXTERNALSYM FaxGetJob}
-
-function FaxSetJobA(FaxHandle: HANDLE; JobId: DWORD; Command: DWORD; JobEntry: PFAX_JOB_ENTRYA): BOOL; stdcall;
-{$EXTERNALSYM FaxSetJobA}
-function FaxSetJobW(FaxHandle: HANDLE; JobId: DWORD; Command: DWORD; JobEntry: PFAX_JOB_ENTRYW): BOOL; stdcall;
-{$EXTERNALSYM FaxSetJobW}
-function FaxSetJob(FaxHandle: HANDLE; JobId: DWORD; Command: DWORD; JobEntry: PFAX_JOB_ENTRY): BOOL; stdcall;
-{$EXTERNALSYM FaxSetJob}
-
-function FaxGetPageData(FaxHandle: HANDLE; JobId: DWORD; var Buffer: LPBYTE; var BufferSize, ImageWidth, ImageHeight: DWORD): BOOL; stdcall;
-{$EXTERNALSYM FaxGetPageData}
-
-function FaxGetDeviceStatusA(FaxPortHandle: HANDLE; var DeviceStatus: PFAX_DEVICE_STATUSA): BOOL; stdcall;
-{$EXTERNALSYM FaxGetDeviceStatusA}
-function FaxGetDeviceStatusW(FaxPortHandle: HANDLE; var DeviceStatus: PFAX_DEVICE_STATUSW): BOOL; stdcall;
-{$EXTERNALSYM FaxGetDeviceStatusW}
-function FaxGetDeviceStatus(FaxPortHandle: HANDLE; var DeviceStatus: PFAX_DEVICE_STATUS): BOOL; stdcall;
-{$EXTERNALSYM FaxGetDeviceStatus}
-
-function FaxAbort(FaxHandle: HANDLE; JobId: DWORD): BOOL; stdcall;
-{$EXTERNALSYM FaxAbort}
-
-function FaxGetConfigurationA(FaxHandle: HANDLE; var FaxConfig: PFAX_CONFIGURATIONA): BOOL; stdcall;
-{$EXTERNALSYM FaxGetConfigurationA}
-function FaxGetConfigurationW(FaxHandle: HANDLE; var FaxConfig: PFAX_CONFIGURATIONW): BOOL; stdcall;
-{$EXTERNALSYM FaxGetConfigurationW}
-function FaxGetConfiguration(FaxHandle: HANDLE; var FaxConfig: PFAX_CONFIGURATION): BOOL; stdcall;
-{$EXTERNALSYM FaxGetConfiguration}
-
-function FaxSetConfigurationA(FaxHandle: HANDLE; const FaxConfig: FAX_CONFIGURATIONA): BOOL; stdcall;
-{$EXTERNALSYM FaxSetConfigurationA}
-function FaxSetConfigurationW(FaxHandle: HANDLE; const FaxConfig: FAX_CONFIGURATIONW): BOOL; stdcall;
-{$EXTERNALSYM FaxSetConfigurationW}
-function FaxSetConfiguration(FaxHandle: HANDLE; const FaxConfig: FAX_CONFIGURATION): BOOL; stdcall;
-{$EXTERNALSYM FaxSetConfiguration}
-
-function FaxGetLoggingCategoriesA(FaxHandle: HANDLE; var Categories: PFAX_LOG_CATEGORYA; var NumberCategories: DWORD): BOOL; stdcall;
-{$EXTERNALSYM FaxGetLoggingCategoriesA}
-function FaxGetLoggingCategoriesW(FaxHandle: HANDLE; var Categories: PFAX_LOG_CATEGORYW; var NumberCategories: DWORD): BOOL; stdcall;
-{$EXTERNALSYM FaxGetLoggingCategoriesW}
-function FaxGetLoggingCategories(FaxHandle: HANDLE; var Categories: PFAX_LOG_CATEGORY; var NumberCategories: DWORD): BOOL; stdcall;
-{$EXTERNALSYM FaxGetLoggingCategories}
-
-function FaxSetLoggingCategoriesA(FaxHandle: HANDLE; Categories: PFAX_LOG_CATEGORYA; NumberCategories: DWORD): BOOL; stdcall;
-{$EXTERNALSYM FaxSetLoggingCategoriesA}
-function FaxSetLoggingCategoriesW(FaxHandle: HANDLE; Categories: PFAX_LOG_CATEGORYW; NumberCategories: DWORD): BOOL; stdcall;
-{$EXTERNALSYM FaxSetLoggingCategoriesW}
-function FaxSetLoggingCategories(FaxHandle: HANDLE; Categories: PFAX_LOG_CATEGORY; NumberCategories: DWORD): BOOL; stdcall;
-{$EXTERNALSYM FaxSetLoggingCategories}
-
-function FaxEnumPortsA(FaxHandle: HANDLE; var PortInfo: PFAX_PORT_INFOA; var PortsReturned: DWORD): BOOL; stdcall;
-{$EXTERNALSYM FaxEnumPortsA}
-function FaxEnumPortsW(FaxHandle: HANDLE; var PortInfo: PFAX_PORT_INFOW; var PortsReturned: DWORD): BOOL; stdcall;
-{$EXTERNALSYM FaxEnumPortsW}
-function FaxEnumPorts(FaxHandle: HANDLE; var PortInfo: PFAX_PORT_INFO; var PortsReturned: DWORD): BOOL; stdcall;
-{$EXTERNALSYM FaxEnumPorts}
-
-function FaxGetPortA(FaxPortHandle: HANDLE; var PortInfo: PFAX_PORT_INFOA): BOOL; stdcall;
-{$EXTERNALSYM FaxGetPortA}
-function FaxGetPortW(FaxPortHandle: HANDLE; var PortInfo: PFAX_PORT_INFOW): BOOL; stdcall;
-{$EXTERNALSYM FaxGetPortW}
-function FaxGetPort(FaxPortHandle: HANDLE; var PortInfo: PFAX_PORT_INFO): BOOL; stdcall;
-{$EXTERNALSYM FaxGetPort}
-
-function FaxSetPortA(FaxPortHandle: HANDLE; const PortInfo: FAX_PORT_INFOA): BOOL; stdcall;
-{$EXTERNALSYM FaxSetPortA}
-function FaxSetPortW(FaxPortHandle: HANDLE; const PortInfo: FAX_PORT_INFOW): BOOL; stdcall;
-{$EXTERNALSYM FaxSetPortW}
-function FaxSetPort(FaxPortHandle: HANDLE; const PortInfo: FAX_PORT_INFO): BOOL; stdcall;
-{$EXTERNALSYM FaxSetPort}
-
-function FaxEnumRoutingMethodsA(FaxPortHandle: HANDLE; var RoutingMethod: PFAX_ROUTING_METHODA; var MethodsReturned: DWORD): BOOL; stdcall;
-{$EXTERNALSYM FaxEnumRoutingMethodsA}
-function FaxEnumRoutingMethodsW(FaxPortHandle: HANDLE; var RoutingMethod: PFAX_ROUTING_METHODW; var MethodsReturned: DWORD): BOOL; stdcall;
-{$EXTERNALSYM FaxEnumRoutingMethodsW}
-function FaxEnumRoutingMethods(FaxPortHandle: HANDLE; var RoutingMethod: PFAX_ROUTING_METHOD; var MethodsReturned: DWORD): BOOL; stdcall;
-{$EXTERNALSYM FaxEnumRoutingMethods}
-
-function FaxEnableRoutingMethodA(FaxPortHandle: HANDLE; RoutingGuid: LPCSTR; Enabled: BOOL): BOOL; stdcall;
-{$EXTERNALSYM FaxEnableRoutingMethodA}
-function FaxEnableRoutingMethodW(FaxPortHandle: HANDLE; RoutingGuid: LPCWSTR; Enabled: BOOL): BOOL; stdcall;
-{$EXTERNALSYM FaxEnableRoutingMethodW}
-function FaxEnableRoutingMethod(FaxPortHandle: HANDLE; RoutingGuid: LPCTSTR; Enabled: BOOL): BOOL; stdcall;
-{$EXTERNALSYM FaxEnableRoutingMethod}
-
-function FaxEnumGlobalRoutingInfoA(FaxHandle: HANDLE; var RoutingInfo: PFAX_GLOBAL_ROUTING_INFOA; var MethodsReturned: DWORD): BOOL; stdcall;
-{$EXTERNALSYM FaxEnumGlobalRoutingInfoA}
-function FaxEnumGlobalRoutingInfoW(FaxHandle: HANDLE; var RoutingInfo: PFAX_GLOBAL_ROUTING_INFOW; var MethodsReturned: DWORD): BOOL; stdcall;
-{$EXTERNALSYM FaxEnumGlobalRoutingInfoW}
-function FaxEnumGlobalRoutingInfo(FaxHandle: HANDLE; var RoutingInfo: PFAX_GLOBAL_ROUTING_INFO; var MethodsReturned: DWORD): BOOL; stdcall;
-{$EXTERNALSYM FaxEnumGlobalRoutingInfo}
-
-function FaxSetGlobalRoutingInfoA(FaxHandle: HANDLE; const RoutingInfo: FAX_GLOBAL_ROUTING_INFOA): BOOL; stdcall;
-{$EXTERNALSYM FaxSetGlobalRoutingInfoA}
-function FaxSetGlobalRoutingInfoW(FaxHandle: HANDLE; const RoutingInfo: FAX_GLOBAL_ROUTING_INFOW): BOOL; stdcall;
-{$EXTERNALSYM FaxSetGlobalRoutingInfoW}
-function FaxSetGlobalRoutingInfo(FaxHandle: HANDLE; const RoutingInfo: FAX_GLOBAL_ROUTING_INFO): BOOL; stdcall;
-{$EXTERNALSYM FaxSetGlobalRoutingInfo}
-
-function FaxGetRoutingInfoA(FaxPortHandle: HANDLE; RoutingGuid: LPCSTR; var RoutingInfoBuffer: LPBYTE; var RoutingInfoBufferSize: DWORD): BOOL; stdcall;
-{$EXTERNALSYM FaxGetRoutingInfoA}
-function FaxGetRoutingInfoW(FaxPortHandle: HANDLE; RoutingGuid: LPCWSTR; var RoutingInfoBuffer: LPBYTE; var RoutingInfoBufferSize: DWORD): BOOL; stdcall;
-{$EXTERNALSYM FaxGetRoutingInfoW}
-function FaxGetRoutingInfo(FaxPortHandle: HANDLE; RoutingGuid: LPCTSTR; var RoutingInfoBuffer: LPBYTE; var RoutingInfoBufferSize: DWORD): BOOL; stdcall;
-{$EXTERNALSYM FaxGetRoutingInfo}
-
-function FaxSetRoutingInfoA(FaxPortHandle: HANDLE; RoutingGuid: LPCSTR; RoutingInfoBuffer: LPBYTE; RoutingInfoBufferSize: DWORD): BOOL; stdcall;
-{$EXTERNALSYM FaxSetRoutingInfoA}
-function FaxSetRoutingInfoW(FaxPortHandle: HANDLE; RoutingGuid: LPCWSTR; RoutingInfoBuffer: LPBYTE; RoutingInfoBufferSize: DWORD): BOOL; stdcall;
-{$EXTERNALSYM FaxSetRoutingInfoW}
-function FaxSetRoutingInfo(FaxPortHandle: HANDLE; RoutingGuid: LPCTSTR; RoutingInfoBuffer: LPBYTE; RoutingInfoBufferSize: DWORD): BOOL; stdcall;
-{$EXTERNALSYM FaxSetRoutingInfo}
-
-function FaxInitializeEventQueue(FaxHandle: HANDLE; CompletionPort: HANDLE; CompletionKey: ULONG_PTR; hWnd: HWND; MessageStart: UINT): BOOL; stdcall;
-{$EXTERNALSYM FaxInitializeEventQueue}
-
-procedure FaxFreeBuffer(Buffer: LPVOID); stdcall;
-{$EXTERNALSYM FaxFreeBuffer}
-
-function FaxStartPrintJobA(PrinterName: LPCSTR; const PrintInfo: FAX_PRINT_INFOA; var FaxJobId: DWORD; FaxContextInfo: PFAX_CONTEXT_INFOA): BOOL; stdcall;
-{$EXTERNALSYM FaxStartPrintJobA}
-function FaxStartPrintJobW(PrinterName: LPCWSTR; const PrintInfo: FAX_PRINT_INFOW; var FaxJobId: DWORD; FaxContextInfo: PFAX_CONTEXT_INFOW): BOOL; stdcall;
-{$EXTERNALSYM FaxStartPrintJobW}
-function FaxStartPrintJob(PrinterName: LPCTSTR; const PrintInfo: FAX_PRINT_INFO; var FaxJobId: DWORD; FaxContextInfo: PFAX_CONTEXT_INFO): BOOL; stdcall;
-{$EXTERNALSYM FaxStartPrintJob}
-
-function FaxPrintCoverPageA(const FaxContextInfo: FAX_CONTEXT_INFOA; const CoverPageInfo: FAX_COVERPAGE_INFOA): BOOL; stdcall;
-{$EXTERNALSYM FaxPrintCoverPageA}
-function FaxPrintCoverPageW(const FaxContextInfo: FAX_CONTEXT_INFOW; const CoverPageInfo: FAX_COVERPAGE_INFOW): BOOL; stdcall;
-{$EXTERNALSYM FaxPrintCoverPageW}
-function FaxPrintCoverPage(const FaxContextInfo: FAX_CONTEXT_INFO; const CoverPageInfo: FAX_COVERPAGE_INFO): BOOL; stdcall;
-{$EXTERNALSYM FaxPrintCoverPage}
-
-function FaxRegisterServiceProviderW(DeviceProvider: LPCWSTR; FriendlyName: LPCWSTR; ImageName: LPCWSTR; TspName: LPCWSTR): BOOL; stdcall;
-{$EXTERNALSYM FaxRegisterServiceProviderW}
-
-function FaxRegisterServiceProvider(DeviceProvider: LPCWSTR; FriendlyName: LPCWSTR; ImageName: LPCWSTR; TspName: LPCWSTR): BOOL;
-{$EXTERNALSYM FaxRegisterServiceProvider}
-
-function FaxUnregisterServiceProviderW(DeviceProvider: LPCWSTR): BOOL; stdcall;
-{$EXTERNALSYM FaxUnregisterServiceProviderW}
-
-function FaxUnregisterServiceProvider(DeviceProvider: LPCWSTR): BOOL; stdcall;
-{$EXTERNALSYM FaxUnregisterServiceProvider}
-
-type
- PFAXUNREGISTERSERVICEPROVIDERW = function(DeviceProvider: LPCWSTR): BOOL; stdcall;
- {$EXTERNALSYM PFAXUNREGISTERSERVICEPROVIDERW}
- PFAXUNREGISTERSERVICEPROVIDER = PFAXUNREGISTERSERVICEPROVIDERW;
- {$EXTERNALSYM PFAXUNREGISTERSERVICEPROVIDER}
-
-type
- PFAX_ROUTING_INSTALLATION_CALLBACKW = function(FaxHandle: HANDLE; Context: LPVOID; MethodName, FriendlyName, FunctionName, Guid: LPWSTR): BOOL; stdcall;
- {$EXTERNALSYM PFAX_ROUTING_INSTALLATION_CALLBACKW}
- TFaxRoutingInstallationCallbackW = PFAX_ROUTING_INSTALLATION_CALLBACKW;
-
- PFAX_ROUTING_INSTALLATION_CALLBACK = PFAX_ROUTING_INSTALLATION_CALLBACKW;
- {$EXTERNALSYM PFAX_ROUTING_INSTALLATION_CALLBACK}
- TFaxRoutingInstallationCallback = TFaxRoutingInstallationCallbackW;
-
-function FaxRegisterRoutingExtensionW(FaxHandle: HANDLE; ExtensionName, FriendlyName, ImageName: LPCWSTR; CallBack: PFAX_ROUTING_INSTALLATION_CALLBACKW; Context: LPVOID): BOOL; stdcall;
-{$EXTERNALSYM FaxRegisterRoutingExtensionW}
-
-function FaxRegisterRoutingExtension(FaxHandle: HANDLE; ExtensionName, FriendlyName, ImageName: LPCWSTR; CallBack: PFAX_ROUTING_INSTALLATION_CALLBACKW; Context: LPVOID): BOOL;
-{$EXTERNALSYM FaxRegisterRoutingExtension}
-
-function FaxUnregisterRoutingExtensionA(hFaxHandle: HANDLE; lpctstrExtensionName: LPCSTR): BOOL; stdcall;
-{$EXTERNALSYM FaxUnregisterRoutingExtensionA}
-function FaxUnregisterRoutingExtensionW(hFaxHandle: HANDLE; lpctstrExtensionName: LPCWSTR): BOOL; stdcall;
-{$EXTERNALSYM FaxUnregisterRoutingExtensionW}
-function FaxUnregisterRoutingExtension(hFaxHandle: HANDLE; lpctstrExtensionName: LPCTSTR): BOOL; stdcall;
-{$EXTERNALSYM FaxUnregisterRoutingExtension}
-
-function FaxAccessCheck(FaxHandle: HANDLE; AccessMask: DWORD): BOOL; stdcall;
-{$EXTERNALSYM FaxAccessCheck}
-
-//
-// Fax Specific Access Rights
-//
-
-const
- FAX_JOB_SUBMIT = $0001;
- {$EXTERNALSYM FAX_JOB_SUBMIT}
- FAX_JOB_QUERY = $0002;
- {$EXTERNALSYM FAX_JOB_QUERY}
- FAX_CONFIG_QUERY = $0004;
- {$EXTERNALSYM FAX_CONFIG_QUERY}
- FAX_CONFIG_SET = $0008;
- {$EXTERNALSYM FAX_CONFIG_SET}
- FAX_PORT_QUERY = $0010;
- {$EXTERNALSYM FAX_PORT_QUERY}
- FAX_PORT_SET = $0020;
- {$EXTERNALSYM FAX_PORT_SET}
- FAX_JOB_MANAGE = $0040;
- {$EXTERNALSYM FAX_JOB_MANAGE}
-
- FAX_READ = STANDARD_RIGHTS_READ or FAX_JOB_QUERY or FAX_CONFIG_QUERY or FAX_PORT_QUERY;
- {$EXTERNALSYM FAX_READ}
-
- FAX_WRITE = STANDARD_RIGHTS_WRITE or FAX_JOB_SUBMIT ;
- {$EXTERNALSYM FAX_WRITE}
-
- FAX_ALL_ACCESS = STANDARD_RIGHTS_ALL or FAX_JOB_SUBMIT or FAX_JOB_QUERY or FAX_CONFIG_QUERY or
- FAX_CONFIG_SET or FAX_PORT_QUERY or FAX_PORT_SET or FAX_JOB_MANAGE;
- {$EXTERNALSYM FAX_ALL_ACCESS}
-
-implementation
-
-const
- winfax = 'winfax.dll';
- {$IFDEF UNICODE}
- AWSuffix = 'W';
- {$ELSE}
- AWSuffix = 'A';
- {$ENDIF UNICODE}
-
-function FaxConnectFaxServerA; external winfax name 'FaxConnectFaxServerA';
-function FaxConnectFaxServerW; external winfax name 'FaxConnectFaxServerW';
-function FaxConnectFaxServer; external winfax name 'FaxConnectFaxServer' + AWSuffix;
-function FaxClose; external winfax name 'FaxClose';
-function FaxOpenPort; external winfax name 'FaxOpenPort';
-function FaxCompleteJobParamsA; external winfax name 'FaxCompleteJobParamsA';
-function FaxCompleteJobParamsW; external winfax name 'FaxCompleteJobParamsW';
-function FaxCompleteJobParams; external winfax name 'FaxCompleteJobParams' + AWSuffix;
-function FaxSendDocumentA; external winfax name 'FaxSendDocumentA';
-function FaxSendDocumentW; external winfax name 'FaxSendDocumentW';
-function FaxSendDocument; external winfax name 'FaxSendDocument' + AWSuffix;
-function FaxSendDocumentForBroadcastA; external winfax name 'FaxSendDocumentForBroadcastA';
-function FaxSendDocumentForBroadcastW; external winfax name 'FaxSendDocumentForBroadcastW';
-function FaxSendDocumentForBroadcast; external winfax name 'FaxSendDocumentForBroadcast' + AWSuffix;
-function FaxEnumJobsA; external winfax name 'FaxEnumJobsA';
-function FaxEnumJobsW; external winfax name 'FaxEnumJobsW';
-function FaxEnumJobs; external winfax name 'FaxEnumJobs' + AWSuffix;
-function FaxGetJobA; external winfax name 'FaxGetJobA';
-function FaxGetJobW; external winfax name 'FaxGetJobW';
-function FaxGetJob; external winfax name 'FaxGetJob' + AWSuffix;
-function FaxSetJobA; external winfax name 'FaxSetJobA';
-function FaxSetJobW; external winfax name 'FaxSetJobW';
-function FaxSetJob; external winfax name 'FaxSetJob' + AWSuffix;
-function FaxGetPageData; external winfax name 'FaxGetPageData';
-function FaxGetDeviceStatusA; external winfax name 'FaxGetDeviceStatusA';
-function FaxGetDeviceStatusW; external winfax name 'FaxGetDeviceStatusW';
-function FaxGetDeviceStatus; external winfax name 'FaxGetDeviceStatus' + AWSuffix;
-function FaxAbort; external winfax name 'FaxAbort';
-function FaxGetConfigurationA; external winfax name 'FaxGetConfigurationA';
-function FaxGetConfigurationW; external winfax name 'FaxGetConfigurationW';
-function FaxGetConfiguration; external winfax name 'FaxGetConfiguration' + AWSuffix;
-function FaxSetConfigurationA; external winfax name 'FaxSetConfigurationA';
-function FaxSetConfigurationW; external winfax name 'FaxSetConfigurationW';
-function FaxSetConfiguration; external winfax name 'FaxSetConfiguration' + AWSuffix;
-function FaxGetLoggingCategoriesA; external winfax name 'FaxGetLoggingCategoriesA';
-function FaxGetLoggingCategoriesW; external winfax name 'FaxGetLoggingCategoriesW';
-function FaxGetLoggingCategories; external winfax name 'FaxGetLoggingCategories' + AWSuffix;
-function FaxSetLoggingCategoriesA; external winfax name 'FaxSetLoggingCategoriesA';
-function FaxSetLoggingCategoriesW; external winfax name 'FaxSetLoggingCategoriesW';
-function FaxSetLoggingCategories; external winfax name 'FaxSetLoggingCategories' + AWSuffix;
-function FaxEnumPortsA; external winfax name 'FaxEnumPortsA';
-function FaxEnumPortsW; external winfax name 'FaxEnumPortsW';
-function FaxEnumPorts; external winfax name 'FaxEnumPorts' + AWSuffix;
-function FaxGetPortA; external winfax name 'FaxGetPortA';
-function FaxGetPortW; external winfax name 'FaxGetPortW';
-function FaxGetPort; external winfax name 'FaxGetPort' + AWSuffix;
-function FaxSetPortA; external winfax name 'FaxSetPortA';
-function FaxSetPortW; external winfax name 'FaxSetPortW';
-function FaxSetPort; external winfax name 'FaxSetPort' + AWSuffix;
-function FaxEnumRoutingMethodsA; external winfax name 'FaxEnumRoutingMethodsA';
-function FaxEnumRoutingMethodsW; external winfax name 'FaxEnumRoutingMethodsW';
-function FaxEnumRoutingMethods; external winfax name 'FaxEnumRoutingMethods' + AWSuffix;
-function FaxEnableRoutingMethodA; external winfax name 'FaxEnableRoutingMethodA';
-function FaxEnableRoutingMethodW; external winfax name 'FaxEnableRoutingMethodW';
-function FaxEnableRoutingMethod; external winfax name 'FaxEnableRoutingMethod' + AWSuffix;
-function FaxEnumGlobalRoutingInfoA; external winfax name 'FaxEnumGlobalRoutingInfoA';
-function FaxEnumGlobalRoutingInfoW; external winfax name 'FaxEnumGlobalRoutingInfoW';
-function FaxEnumGlobalRoutingInfo; external winfax name 'FaxEnumGlobalRoutingInfo' + AWSuffix;
-function FaxSetGlobalRoutingInfoA; external winfax name 'FaxSetGlobalRoutingInfoA';
-function FaxSetGlobalRoutingInfoW; external winfax name 'FaxSetGlobalRoutingInfoW';
-function FaxSetGlobalRoutingInfo; external winfax name 'FaxSetGlobalRoutingInfo' + AWSuffix;
-function FaxGetRoutingInfoA; external winfax name 'FaxGetRoutingInfoA';
-function FaxGetRoutingInfoW; external winfax name 'FaxGetRoutingInfoW';
-function FaxGetRoutingInfo; external winfax name 'FaxGetRoutingInfo' + AWSuffix;
-function FaxSetRoutingInfoA; external winfax name 'FaxSetRoutingInfoA';
-function FaxSetRoutingInfoW; external winfax name 'FaxSetRoutingInfoW';
-function FaxSetRoutingInfo; external winfax name 'FaxSetRoutingInfo' + AWSuffix;
-function FaxInitializeEventQueue; external winfax name 'FaxInitializeEventQueue';
-procedure FaxFreeBuffer; external winfax name 'FaxFreeBuffer';
-function FaxStartPrintJobA; external winfax name 'FaxStartPrintJobA';
-function FaxStartPrintJobW; external winfax name 'FaxStartPrintJobW';
-function FaxStartPrintJob; external winfax name 'FaxStartPrintJob' + AWSuffix;
-function FaxPrintCoverPageA; external winfax name 'FaxPrintCoverPageA';
-function FaxPrintCoverPageW; external winfax name 'FaxPrintCoverPageW';
-function FaxPrintCoverPage; external winfax name 'FaxPrintCoverPage' + AWSuffix;
-function FaxRegisterServiceProviderW; external winfax name 'FaxRegisterServiceProviderW';
-
-function FaxRegisterServiceProvider(DeviceProvider: LPCWSTR; FriendlyName: LPCWSTR; ImageName: LPCWSTR; TspName: LPCWSTR): BOOL;
-begin
- Result := FaxRegisterServiceProviderW(DeviceProvider, FriendlyName, ImageName, TspName);
-end;
-
-function FaxUnregisterServiceProviderW; external winfax name 'FaxUnregisterServiceProviderW';
-
-function FaxUnregisterServiceProvider(DeviceProvider: LPCWSTR): BOOL;
-begin
- Result := FaxUnregisterServiceProviderW(DeviceProvider);
-end;
-
-function FaxRegisterRoutingExtensionW; external winfax name 'FaxRegisterRoutingExtensionW';
-
-function FaxRegisterRoutingExtension(FaxHandle: HANDLE; ExtensionName, FriendlyName, ImageName: LPCWSTR; CallBack: PFAX_ROUTING_INSTALLATION_CALLBACKW; Context: LPVOID): BOOL;
-begin
- Result := FaxRegisterRoutingExtensionW(FaxHandle, ExtensionName, FriendlyName, ImageName, CallBack, Context);
-end;
-
-function FaxUnregisterRoutingExtensionA; external winfax name 'FaxUnregisterRoutingExtensionA';
-function FaxUnregisterRoutingExtensionW; external winfax name 'FaxUnregisterRoutingExtensionW';
-function FaxUnregisterRoutingExtension; external winfax name 'FaxUnregisterRoutingExtension' + AWSuffix;
-function FaxAccessCheck; external winfax name 'FaxAccessCheck';
-
-end.
+{******************************************************************************}
+{ }
+{ Windows FAX API interface unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: winfax.h, released November 2001. The original Pascal }
+{ code is: WinFax.pas, released April 2002. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwawinfax.pas,v 1.1 2005/04/04 07:56:11 marco Exp $
+
+unit JwaWinFax;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "winfax.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaWinType, JwaWinError, JwaWinBase, JwaWinNT;
+
+//
+// FAX ERROR CODES
+//
+
+const
+ FAX_ERR_START = 7001; // First fax specific error code
+ {$EXTERNALSYM FAX_ERR_START}
+
+ FAX_ERR_SRV_OUTOFMEMORY = 7001;
+ {$EXTERNALSYM FAX_ERR_SRV_OUTOFMEMORY}
+ FAX_ERR_GROUP_NOT_FOUND = 7002;
+ {$EXTERNALSYM FAX_ERR_GROUP_NOT_FOUND}
+ FAX_ERR_BAD_GROUP_CONFIGURATION = 7003;
+ {$EXTERNALSYM FAX_ERR_BAD_GROUP_CONFIGURATION}
+ FAX_ERR_GROUP_IN_USE = 7004;
+ {$EXTERNALSYM FAX_ERR_GROUP_IN_USE}
+ FAX_ERR_RULE_NOT_FOUND = 7005;
+ {$EXTERNALSYM FAX_ERR_RULE_NOT_FOUND}
+ FAX_ERR_NOT_NTFS = 7006;
+ {$EXTERNALSYM FAX_ERR_NOT_NTFS}
+ FAX_ERR_DIRECTORY_IN_USE = 7007;
+ {$EXTERNALSYM FAX_ERR_DIRECTORY_IN_USE}
+ FAX_ERR_FILE_ACCESS_DENIED = 7008;
+ {$EXTERNALSYM FAX_ERR_FILE_ACCESS_DENIED}
+ FAX_ERR_MESSAGE_NOT_FOUND = 7009;
+ {$EXTERNALSYM FAX_ERR_MESSAGE_NOT_FOUND}
+ FAX_ERR_DEVICE_NUM_LIMIT_EXCEEDED = 7010;
+ {$EXTERNALSYM FAX_ERR_DEVICE_NUM_LIMIT_EXCEEDED}
+ FAX_ERR_NOT_SUPPORTED_ON_THIS_SKU = 7011;
+ {$EXTERNALSYM FAX_ERR_NOT_SUPPORTED_ON_THIS_SKU}
+ FAX_ERR_VERSION_MISMATCH = 7012; // Fax client/server versions mismtach
+ {$EXTERNALSYM FAX_ERR_VERSION_MISMATCH}
+ FAX_ERR_RECIPIENTS_LIMIT = 7013; // Recipients limit in a single broadcast
+ {$EXTERNALSYM FAX_ERR_RECIPIENTS_LIMIT}
+
+ FAX_ERR_END = 7013; // Last fax specific error code
+ {$EXTERNALSYM FAX_ERR_END}
+
+//
+// MessageId: FAX_E_SRV_OUTOFMEMORY
+//
+// MessageText:
+//
+// The fax server failed to allocate memory.
+//
+
+ FAX_E_SRV_OUTOFMEMORY = HRESULT((SEVERITY_ERROR shl 31) or (FACILITY_ITF shl 16) or FAX_ERR_SRV_OUTOFMEMORY);
+ {$EXTERNALSYM FAX_E_SRV_OUTOFMEMORY}
+
+//
+// MessageId: FAX_E_GROUP_NOT_FOUND
+//
+// MessageText:
+//
+// The fax server failed to locate an outbound routing group by name.
+//
+
+ FAX_E_GROUP_NOT_FOUND = HRESULT((SEVERITY_ERROR shl 31) or (FACILITY_ITF shl 16) or FAX_ERR_GROUP_NOT_FOUND);
+ {$EXTERNALSYM FAX_E_GROUP_NOT_FOUND}
+
+//
+// MessageId: FAX_E_BAD_GROUP_CONFIGURATION
+//
+// MessageText:
+//
+// The fax server encountered an outbound routing group with bad configuration.
+//
+
+ FAX_E_BAD_GROUP_CONFIGURATION = HRESULT((SEVERITY_ERROR shl 31) or (FACILITY_ITF shl 16) or FAX_ERR_BAD_GROUP_CONFIGURATION);
+ {$EXTERNALSYM FAX_E_BAD_GROUP_CONFIGURATION}
+
+//
+// MessageId: FAX_E_GROUP_IN_USE
+//
+// MessageText:
+//
+// The fax server cannot remove an outbound routing group because it is in use by one or more outbound routing rules.
+//
+
+ FAX_E_GROUP_IN_USE = HRESULT((SEVERITY_ERROR shl 31) or (FACILITY_ITF shl 16) or FAX_ERR_GROUP_IN_USE);
+ {$EXTERNALSYM FAX_E_GROUP_IN_USE}
+
+//
+// MessageId: FAX_E_RULE_NOT_FOUND
+//
+// MessageText:
+//
+// The fax server failed to locate an outbound routing rule by country code and area code.
+//
+
+ FAX_E_RULE_NOT_FOUND = HRESULT((SEVERITY_ERROR shl 31) or (FACILITY_ITF shl 16) or FAX_ERR_RULE_NOT_FOUND);
+ {$EXTERNALSYM FAX_E_RULE_NOT_FOUND}
+
+//
+// MessageId: FAX_E_NOT_NTFS
+//
+// MessageText:
+//
+// The fax server cannot set an archive folder to a non-NTFS partition.
+//
+
+ FAX_E_NOT_NTFS = HRESULT((SEVERITY_ERROR shl 31) or (FACILITY_ITF shl 16) or FAX_ERR_NOT_NTFS);
+ {$EXTERNALSYM FAX_E_NOT_NTFS}
+
+//
+// MessageId: FAX_E_DIRECTORY_IN_USE
+//
+// MessageText:
+//
+// The fax server cannot use the same folder for both the inbox and the sent-items archives.
+//
+
+ FAX_E_DIRECTORY_IN_USE = HRESULT((SEVERITY_ERROR shl 31) or (FACILITY_ITF shl 16) or FAX_ERR_DIRECTORY_IN_USE);
+ {$EXTERNALSYM FAX_E_DIRECTORY_IN_USE}
+
+//
+// MessageId: FAX_E_FILE_ACCESS_DENIED
+//
+// MessageText:
+//
+// The fax server cannot access the specified file or folder.
+//
+
+ FAX_E_FILE_ACCESS_DENIED = HRESULT((SEVERITY_ERROR shl 31) or (FACILITY_ITF shl 16) or FAX_ERR_FILE_ACCESS_DENIED);
+ {$EXTERNALSYM FAX_E_FILE_ACCESS_DENIED}
+
+//
+// MessageId: FAX_E_MESSAGE_NOT_FOUND
+//
+// MessageText:
+//
+// The fax server cannot find the job or message by its ID.
+//
+
+ FAX_E_MESSAGE_NOT_FOUND = HRESULT((SEVERITY_ERROR shl 31) or (FACILITY_ITF shl 16) or FAX_ERR_MESSAGE_NOT_FOUND);
+ {$EXTERNALSYM FAX_E_MESSAGE_NOT_FOUND}
+
+//
+// MessageId: FAX_E_DEVICE_NUM_LIMIT_EXCEEDED
+//
+// MessageText:
+//
+// The fax server cannot complete the operation because the number of active fax devices allowed for this version of Windows was exceeded.
+//
+
+ FAX_E_DEVICE_NUM_LIMIT_EXCEEDED = HRESULT((SEVERITY_ERROR shl 31) or (FACILITY_ITF shl 16) or FAX_ERR_DEVICE_NUM_LIMIT_EXCEEDED);
+ {$EXTERNALSYM FAX_E_DEVICE_NUM_LIMIT_EXCEEDED}
+
+//
+// MessageId: FAX_E_NOT_SUPPORTED_ON_THIS_SKU
+//
+// MessageText:
+//
+// The fax server cannot complete the operation because it is not supported for this version of Windows.
+//
+
+ FAX_E_NOT_SUPPORTED_ON_THIS_SKU = HRESULT((SEVERITY_ERROR shl 31) or (FACILITY_ITF shl 16) or FAX_ERR_NOT_SUPPORTED_ON_THIS_SKU);
+ {$EXTERNALSYM FAX_E_NOT_SUPPORTED_ON_THIS_SKU}
+
+//
+// MessageId: FAX_E_VERSION_MISMATCH
+//
+// MessageText:
+//
+// The fax server API version does not support the requested operation.
+//
+
+ FAX_E_VERSION_MISMATCH = HRESULT((SEVERITY_ERROR shl 31) or (FACILITY_ITF shl 16) or FAX_ERR_VERSION_MISMATCH);
+ {$EXTERNALSYM FAX_E_VERSION_MISMATCH}
+
+//
+// MessageId: FAX_E_RECIPIENT_LIMIT
+//
+// MessageText:
+//
+// The limit on the number of recipients for a single fax broadcast was reached.
+//
+
+ FAX_E_RECIPIENTS_LIMIT = HRESULT((SEVERITY_ERROR shl 31) or (FACILITY_ITF shl 16) or FAX_ERR_RECIPIENTS_LIMIT);
+ {$EXTERNALSYM FAX_E_RECIPIENTS_LIMIT}
+
+type
+ FAX_ENUM_LOG_LEVELS = (
+ FAXLOG_LEVEL_NONE,
+ FAXLOG_LEVEL_MIN,
+ FAXLOG_LEVEL_MED,
+ FAXLOG_LEVEL_MAX);
+ {$EXTERNALSYM FAX_ENUM_LOG_LEVELS}
+ TFaxEnumLogLevels = FAX_ENUM_LOG_LEVELS;
+
+ FAX_ENUM_LOG_CATEGORIES = (
+ FAXLOG_CATEGORY_FILLER0,
+ FAXLOG_CATEGORY_INIT, // Initialization / shutdown
+ FAXLOG_CATEGORY_OUTBOUND, // Outbound messages
+ FAXLOG_CATEGORY_INBOUND, // Inbound messages
+ FAXLOG_CATEGORY_UNKNOWN); // Unknown category (all others)
+ {$EXTERNALSYM FAX_ENUM_LOG_CATEGORIES}
+ TFaxEnumLogCategories = FAX_ENUM_LOG_CATEGORIES;
+
+ PFAX_LOG_CATEGORYA = ^FAX_LOG_CATEGORYA;
+ {$EXTERNALSYM PFAX_LOG_CATEGORYA}
+ _FAX_LOG_CATEGORYA = record
+ Name: LPCSTR; // logging category name
+ Category: DWORD; // logging category number
+ Level: DWORD; // logging level for the category
+ end;
+ {$EXTERNALSYM _FAX_LOG_CATEGORYA}
+ FAX_LOG_CATEGORYA = _FAX_LOG_CATEGORYA;
+ {$EXTERNALSYM FAX_LOG_CATEGORYA}
+ TFaxLogCategoryA = FAX_LOG_CATEGORYA;
+ PFaxLogCategoryA = PFAX_LOG_CATEGORYA;
+
+ PFAX_LOG_CATEGORYW = ^FAX_LOG_CATEGORYW;
+ {$EXTERNALSYM PFAX_LOG_CATEGORYW}
+ _FAX_LOG_CATEGORYW = record
+ Name: LPCWSTR; // logging category name
+ Category: DWORD; // logging category number
+ Level: DWORD; // logging level for the category
+ end;
+ {$EXTERNALSYM _FAX_LOG_CATEGORYW}
+ FAX_LOG_CATEGORYW = _FAX_LOG_CATEGORYW;
+ {$EXTERNALSYM FAX_LOG_CATEGORYW}
+ TFaxLogCategoryW = FAX_LOG_CATEGORYW;
+ PFaxLogCategoryW = PFAX_LOG_CATEGORYW;
+
+ {$IFDEF UNICODE}
+ FAX_LOG_CATEGORY = FAX_LOG_CATEGORYW;
+ {$EXTERNALSYM FAX_LOG_CATEGORY}
+ PFAX_LOG_CATEGORY = PFAX_LOG_CATEGORYW;
+ {$EXTERNALSYM PFAX_LOG_CATEGORY}
+ TFaxLogCategory = TFaxLogCategoryW;
+ PFaxLogCategory = PFaxLogCategoryW;
+ {$ELSE}
+ FAX_LOG_CATEGORY = FAX_LOG_CATEGORYA;
+ {$EXTERNALSYM FAX_LOG_CATEGORY}
+ PFAX_LOG_CATEGORY = PFAX_LOG_CATEGORYA;
+ {$EXTERNALSYM PFAX_LOG_CATEGORY}
+ TFaxLogCategory = TFaxLogCategoryA;
+ PFaxLogCategory = PFaxLogCategoryA;
+ {$ENDIF UNICODE}
+
+ PFAX_TIME = ^FAX_TIME;
+ {$EXTERNALSYM PFAX_TIME}
+ _FAX_TIME = record
+ Hour: WORD;
+ Minute: WORD;
+ end;
+ {$EXTERNALSYM _FAX_TIME}
+ FAX_TIME = _FAX_TIME;
+ {$EXTERNALSYM FAX_TIME}
+ TFaxTime = FAX_TIME;
+ PFaxTime = PFAX_TIME;
+
+ PFAX_CONFIGURATIONA = ^FAX_CONFIGURATIONA;
+ {$EXTERNALSYM PFAX_CONFIGURATIONA}
+ _FAX_CONFIGURATIONA = record
+ SizeOfStruct: DWORD; // size of this structure
+ Retries: DWORD; // number of retries for fax send
+ RetryDelay: DWORD; // number of minutes between retries
+ DirtyDays: DWORD; // number of days to keep an unsent job in the queue
+ Branding: BOOL; // fsp should brand outgoing faxes
+ UseDeviceTsid: BOOL; // server uses device tsid only
+ ServerCp: BOOL; // clients must use cover pages on the server
+ PauseServerQueue: BOOL; // is the server queue paused?
+ StartCheapTime: FAX_TIME; // start of discount rate period
+ StopCheapTime: FAX_TIME; // end of discount rate period
+ ArchiveOutgoingFaxes: BOOL; // whether outgoing faxes should be archived
+ ArchiveDirectory: LPCSTR; // archive directory for outgoing faxes
+ Reserved: LPCSTR; // Reserved; must be NULL
+ end;
+ {$EXTERNALSYM _FAX_CONFIGURATIONA}
+ FAX_CONFIGURATIONA = _FAX_CONFIGURATIONA;
+ {$EXTERNALSYM FAX_CONFIGURATIONA}
+ TFaxConfigurationA = FAX_CONFIGURATIONA;
+ PFaxConfigurationA = PFAX_CONFIGURATIONA;
+
+ PFAX_CONFIGURATIONW = ^FAX_CONFIGURATIONW;
+ {$EXTERNALSYM PFAX_CONFIGURATIONW}
+ _FAX_CONFIGURATIONW = record
+ SizeOfStruct: DWORD; // size of this structure
+ Retries: DWORD; // number of retries for fax send
+ RetryDelay: DWORD; // number of minutes between retries
+ DirtyDays: DWORD; // number of days to keep an unsent job in the queue
+ Branding: BOOL; // fsp should brand outgoing faxes
+ UseDeviceTsid: BOOL; // server uses device tsid only
+ ServerCp: BOOL; // clients must use cover pages on the server
+ PauseServerQueue: BOOL; // is the server queue paused?
+ StartCheapTime: FAX_TIME; // start of discount rate period
+ StopCheapTime: FAX_TIME; // end of discount rate period
+ ArchiveOutgoingFaxes: BOOL; // whether outgoing faxes should be archived
+ ArchiveDirectory: LPCWSTR; // archive directory for outgoing faxes
+ Reserved: LPCWSTR; // Reserved; must be NULL
+ end;
+ {$EXTERNALSYM _FAX_CONFIGURATIONW}
+ FAX_CONFIGURATIONW = _FAX_CONFIGURATIONW;
+ {$EXTERNALSYM FAX_CONFIGURATIONW}
+ TFaxConfigurationW = FAX_CONFIGURATIONW;
+ PFaxConfigurationW = PFAX_CONFIGURATIONW;
+
+ {$IFDEF UNICODE}
+ FAX_CONFIGURATION = FAX_CONFIGURATIONW;
+ {$EXTERNALSYM FAX_CONFIGURATION}
+ PFAX_CONFIGURATION = PFAX_CONFIGURATIONW;
+ {$EXTERNALSYM PFAX_CONFIGURATION}
+ TFaxConfiguration = TFaxConfigurationW;
+ PFaxConfiguration = PFaxConfigurationW;
+ {$ELSE}
+ FAX_CONFIGURATION = FAX_CONFIGURATIONA;
+ {$EXTERNALSYM FAX_CONFIGURATION}
+ PFAX_CONFIGURATION = PFAX_CONFIGURATIONA;
+ {$EXTERNALSYM PFAX_CONFIGURATION}
+ TFaxConfiguration = TFaxConfigurationA;
+ PFaxConfiguration = PFaxConfigurationA;
+ {$ENDIF UNICODE}
+
+//
+// FaxSetJob() command codes
+//
+
+ FAX_ENUM_JOB_COMMANDS = (
+ JC_UNKNOWN,
+ JC_DELETE,
+ JC_PAUSE,
+ JC_RESUME);
+ {$EXTERNALSYM FAX_ENUM_JOB_COMMANDS}
+ TFaxEnumJobCommands = FAX_ENUM_JOB_COMMANDS;
+
+const
+ JC_RESTART = JC_RESUME;
+ {$EXTERNALSYM JC_RESTART}
+
+//
+// job type defines
+//
+
+ JT_UNKNOWN = 0;
+ {$EXTERNALSYM JT_UNKNOWN}
+ JT_SEND = 1;
+ {$EXTERNALSYM JT_SEND}
+ JT_RECEIVE = 2;
+ {$EXTERNALSYM JT_RECEIVE}
+ JT_ROUTING = 3;
+ {$EXTERNALSYM JT_ROUTING}
+ JT_FAIL_RECEIVE = 4;
+ {$EXTERNALSYM JT_FAIL_RECEIVE}
+
+//
+// job status defines
+//
+
+ JS_PENDING = $00000000;
+ {$EXTERNALSYM JS_PENDING}
+ JS_INPROGRESS = $00000001;
+ {$EXTERNALSYM JS_INPROGRESS}
+ JS_DELETING = $00000002;
+ {$EXTERNALSYM JS_DELETING}
+ JS_FAILED = $00000004;
+ {$EXTERNALSYM JS_FAILED}
+ JS_PAUSED = $00000008;
+ {$EXTERNALSYM JS_PAUSED}
+ JS_NOLINE = $00000010;
+ {$EXTERNALSYM JS_NOLINE}
+ JS_RETRYING = $00000020;
+ {$EXTERNALSYM JS_RETRYING}
+ JS_RETRIES_EXCEEDED = $00000040;
+ {$EXTERNALSYM JS_RETRIES_EXCEEDED}
+
+type
+ PFAX_DEVICE_STATUSA = ^FAX_DEVICE_STATUSA;
+ {$EXTERNALSYM PFAX_DEVICE_STATUSA}
+ _FAX_DEVICE_STATUSA = record
+ SizeOfStruct: DWORD; // size of this structure
+ CallerId: LPCSTR; // caller id string
+ Csid: LPCSTR; // station identifier
+ CurrentPage: DWORD; // current page
+ DeviceId: DWORD; // permanent line id
+ DeviceName: LPCSTR; // device name
+ DocumentName: LPCSTR; // document name
+ JobType: DWORD; // send or receive?
+ PhoneNumber: LPCSTR; // sending phone number
+ RoutingString: LPCSTR; // routing information
+ SenderName: LPCSTR; // sender name
+ RecipientName: LPCSTR; // recipient name
+ Size: DWORD; // size in bytes of the document
+ StartTime: FILETIME; // starting time of the fax send/receive
+ Status: DWORD; // current status of the device, see FPS_??? masks
+ StatusString: LPCSTR; // status string if the Status field is zero. this may be NULL.
+ SubmittedTime: FILETIME; // time the document was submitted
+ TotalPages: DWORD; // total number of pages in this job
+ Tsid: LPCSTR; // transmitting station identifier
+ UserName: LPCSTR; // user that submitted the active job
+ end;
+ {$EXTERNALSYM _FAX_DEVICE_STATUSA}
+ FAX_DEVICE_STATUSA = _FAX_DEVICE_STATUSA;
+ {$EXTERNALSYM FAX_DEVICE_STATUSA}
+ TFaxDeviceStatusA = FAX_DEVICE_STATUSA;
+ PFaxDeviceStatusA = PFAX_DEVICE_STATUSA;
+
+ PFAX_DEVICE_STATUSW = ^FAX_DEVICE_STATUSW;
+ {$EXTERNALSYM PFAX_DEVICE_STATUSW}
+ _FAX_DEVICE_STATUSW = record
+ SizeOfStruct: DWORD; // size of this structure
+ CallerId: LPCWSTR; // caller id string
+ Csid: LPCWSTR; // station identifier
+ CurrentPage: DWORD; // current page
+ DeviceId: DWORD; // permanent line id
+ DeviceName: LPCWSTR; // device name
+ DocumentName: LPCWSTR; // document name
+ JobType: DWORD; // send or receive?
+ PhoneNumber: LPCWSTR; // sending phone number
+ RoutingString: LPCWSTR; // routing information
+ SenderName: LPCWSTR; // sender name
+ RecipientName: LPCWSTR; // recipient name
+ Size: DWORD; // size in bytes of the document
+ StartTime: FILETIME; // starting time of the fax send/receive
+ Status: DWORD; // current status of the device, see FPS_??? masks
+ StatusString: LPCWSTR; // status string if the Status field is zero. this may be NULL.
+ SubmittedTime: FILETIME; // time the document was submitted
+ TotalPages: DWORD; // total number of pages in this job
+ Tsid: LPCWSTR; // transmitting station identifier
+ UserName: LPCWSTR; // user that submitted the active job
+ end;
+ {$EXTERNALSYM _FAX_DEVICE_STATUSW}
+ FAX_DEVICE_STATUSW = _FAX_DEVICE_STATUSW;
+ {$EXTERNALSYM FAX_DEVICE_STATUSW}
+ TFaxDeviceStatusW = FAX_DEVICE_STATUSW;
+ PFaxDeviceStatusW = PFAX_DEVICE_STATUSW;
+
+ {$IFDEF UNICODE}
+ FAX_DEVICE_STATUS = FAX_DEVICE_STATUSW;
+ {$EXTERNALSYM FAX_DEVICE_STATUS}
+ PFAX_DEVICE_STATUS = PFAX_DEVICE_STATUSW;
+ {$EXTERNALSYM PFAX_DEVICE_STATUS}
+ TFaxDeviceStatus = TFaxDeviceStatusW;
+ PFaxDeviceStatus = PFaxDeviceStatusW;
+ {$ELSE}
+ FAX_DEVICE_STATUS = FAX_DEVICE_STATUSA;
+ {$EXTERNALSYM FAX_DEVICE_STATUS}
+ PFAX_DEVICE_STATUS = PFAX_DEVICE_STATUSA;
+ {$EXTERNALSYM PFAX_DEVICE_STATUS}
+ TFaxDeviceStatus = TFaxDeviceStatusA;
+ PFaxDeviceStatus = PFaxDeviceStatusA;
+ {$ENDIF UNICODE}
+
+ PFAX_JOB_ENTRYA = ^FAX_JOB_ENTRYA;
+ {$EXTERNALSYM PFAX_JOB_ENTRYA}
+ _FAX_JOB_ENTRYA = record
+ SizeOfStruct: DWORD; // size of this structure
+ JobId: DWORD; // fax job id
+ UserName: LPCSTR; // user who submitted the job
+ JobType: DWORD; // job type, see JT defines
+ QueueStatus: DWORD; // job queue status, see JS defines
+ Status: DWORD; // current status of the device, see FPS_??? masks
+ Size: DWORD; // size in bytes of the document
+ PageCount: DWORD; // total page count
+ RecipientNumber: LPCSTR; // recipient fax number
+ RecipientName: LPCSTR; // recipient name
+ Tsid: LPCSTR; // transmitter's id
+ SenderName: LPCSTR; // sender name
+ SenderCompany: LPCSTR; // sender company
+ SenderDept: LPCSTR; // sender department
+ BillingCode: LPCSTR; // billing code
+ ScheduleAction: DWORD; // when to schedule the fax, see JSA defines
+ ScheduleTime: SYSTEMTIME; // time to send the fax when JSA_SPECIFIC_TIME is used (must be local time)
+ DeliveryReportType: DWORD; // delivery report type, see DRT defines
+ DeliveryReportAddress: LPCSTR; // email address for delivery report (ndr or dr) thru MAPI / SMTP
+ DocumentName: LPCSTR; // document name
+ end;
+ {$EXTERNALSYM _FAX_JOB_ENTRYA}
+ FAX_JOB_ENTRYA = _FAX_JOB_ENTRYA;
+ {$EXTERNALSYM FAX_JOB_ENTRYA}
+ TFaxJobEntryA = FAX_JOB_ENTRYA;
+ PFaxJobEntryA = PFAX_JOB_ENTRYA;
+
+ PFAX_JOB_ENTRYW = ^FAX_JOB_ENTRYW;
+ {$EXTERNALSYM PFAX_JOB_ENTRYW}
+ _FAX_JOB_ENTRYW = record
+ SizeOfStruct: DWORD; // size of this structure
+ JobId: DWORD; // fax job id
+ UserName: LPCWSTR; // user who submitted the job
+ JobType: DWORD; // job type, see JT defines
+ QueueStatus: DWORD; // job queue status, see JS defines
+ Status: DWORD; // current status of the device, see FPS_??? masks
+ Size: DWORD; // size in bytes of the document
+ PageCount: DWORD; // total page count
+ RecipientNumber: LPCWSTR; // recipient fax number
+ RecipientName: LPCWSTR; // recipient name
+ Tsid: LPCWSTR; // transmitter's id
+ SenderName: LPCWSTR; // sender name
+ SenderCompany: LPCWSTR; // sender company
+ SenderDept: LPCWSTR; // sender department
+ BillingCode: LPCWSTR; // billing code
+ ScheduleAction: DWORD; // when to schedule the fax, see JSA defines
+ ScheduleTime: SYSTEMTIME; // time to send the fax when JSA_SPECIFIC_TIME is used (must be local time)
+ DeliveryReportType: DWORD; // delivery report type, see DRT defines
+ DeliveryReportAddress: LPCWSTR; // email address for delivery report (ndr or dr) thru MAPI / SMTP
+ DocumentName: LPCWSTR; // document name
+ end;
+ {$EXTERNALSYM _FAX_JOB_ENTRYW}
+ FAX_JOB_ENTRYW = _FAX_JOB_ENTRYW;
+ {$EXTERNALSYM FAX_JOB_ENTRYW}
+ TFaxJobEntryW = FAX_JOB_ENTRYW;
+ PFaxJobEntryW = PFAX_JOB_ENTRYW;
+
+ {$IFDEF UNICODE}
+ FAX_JOB_ENTRY = FAX_JOB_ENTRYW;
+ {$EXTERNALSYM FAX_JOB_ENTRY}
+ PFAX_JOB_ENTRY = PFAX_JOB_ENTRYW;
+ {$EXTERNALSYM PFAX_JOB_ENTRY}
+ TFaxJobEntry = TFaxJobEntryW;
+ PFaxJobEntry = PFaxJobEntryW;
+ {$ELSE}
+ FAX_JOB_ENTRY = FAX_JOB_ENTRYA;
+ {$EXTERNALSYM FAX_JOB_ENTRY}
+ PFAX_JOB_ENTRY = PFAX_JOB_ENTRYA;
+ {$EXTERNALSYM PFAX_JOB_ENTRY}
+ TFaxJobEntry = TFaxJobEntryA;
+ PFaxJobEntry = PFaxJobEntryA;
+ {$ENDIF UNICODE}
+
+//
+// fax port state masks
+//
+// if you change these defines the be sure to
+// change the resources in the fax service.
+//
+
+const
+ FPS_DIALING = $20000001;
+ {$EXTERNALSYM FPS_DIALING}
+ FPS_SENDING = $20000002;
+ {$EXTERNALSYM FPS_SENDING}
+ FPS_RECEIVING = $20000004;
+ {$EXTERNALSYM FPS_RECEIVING}
+ FPS_COMPLETED = $20000008;
+ {$EXTERNALSYM FPS_COMPLETED}
+ FPS_HANDLED = $20000010;
+ {$EXTERNALSYM FPS_HANDLED}
+ FPS_UNAVAILABLE = $20000020;
+ {$EXTERNALSYM FPS_UNAVAILABLE}
+ FPS_BUSY = $20000040;
+ {$EXTERNALSYM FPS_BUSY}
+ FPS_NO_ANSWER = $20000080;
+ {$EXTERNALSYM FPS_NO_ANSWER}
+ FPS_BAD_ADDRESS = $20000100;
+ {$EXTERNALSYM FPS_BAD_ADDRESS}
+ FPS_NO_DIAL_TONE = $20000200;
+ {$EXTERNALSYM FPS_NO_DIAL_TONE}
+ FPS_DISCONNECTED = $20000400;
+ {$EXTERNALSYM FPS_DISCONNECTED}
+ FPS_FATAL_ERROR = $20000800;
+ {$EXTERNALSYM FPS_FATAL_ERROR}
+ FPS_NOT_FAX_CALL = $20001000;
+ {$EXTERNALSYM FPS_NOT_FAX_CALL}
+ FPS_CALL_DELAYED = $20002000;
+ {$EXTERNALSYM FPS_CALL_DELAYED}
+ FPS_CALL_BLACKLISTED = $20004000;
+ {$EXTERNALSYM FPS_CALL_BLACKLISTED}
+ FPS_INITIALIZING = $20008000;
+ {$EXTERNALSYM FPS_INITIALIZING}
+ FPS_OFFLINE = $20010000;
+ {$EXTERNALSYM FPS_OFFLINE}
+ FPS_RINGING = $20020000;
+ {$EXTERNALSYM FPS_RINGING}
+
+ FPS_AVAILABLE = $20100000;
+ {$EXTERNALSYM FPS_AVAILABLE}
+ FPS_ABORTING = $20200000;
+ {$EXTERNALSYM FPS_ABORTING}
+ FPS_ROUTING = $20400000;
+ {$EXTERNALSYM FPS_ROUTING}
+ FPS_ANSWERED = $20800000;
+ {$EXTERNALSYM FPS_ANSWERED}
+
+//
+// fax port capability mask
+//
+
+ FPF_RECEIVE = $00000001; // Automatically receive faxes
+ {$EXTERNALSYM FPF_RECEIVE}
+ FPF_SEND = $00000002;
+ {$EXTERNALSYM FPF_SEND}
+ FPF_VIRTUAL = $00000004;
+ {$EXTERNALSYM FPF_VIRTUAL}
+
+type
+ PFAX_PORT_INFOA = ^FAX_PORT_INFOA;
+ {$EXTERNALSYM PFAX_PORT_INFOA}
+ _FAX_PORT_INFOA = record
+ SizeOfStruct: DWORD; // size of this structure
+ DeviceId: DWORD; // Device ID
+ State: DWORD; // State of the device
+ Flags: DWORD; // Device specific flags
+ Rings: DWORD; // Number of rings before answer
+ Priority: DWORD; // Device priority
+ DeviceName: LPCSTR; // Device name
+ Tsid: LPCSTR; // Device Tsid
+ Csid: LPCSTR; // Device Csid
+ end;
+ {$EXTERNALSYM _FAX_PORT_INFOA}
+ FAX_PORT_INFOA = _FAX_PORT_INFOA;
+ {$EXTERNALSYM FAX_PORT_INFOA}
+ TFaxPortInfoA = FAX_PORT_INFOA;
+ PFaxPortInfoA = PFAX_PORT_INFOA;
+
+ PFAX_PORT_INFOW = ^FAX_PORT_INFOW;
+ {$EXTERNALSYM PFAX_PORT_INFOW}
+ _FAX_PORT_INFOW = record
+ SizeOfStruct: DWORD; // size of this structure
+ DeviceId: DWORD; // Device ID
+ State: DWORD; // State of the device
+ Flags: DWORD; // Device specific flags
+ Rings: DWORD; // Number of rings before answer
+ Priority: DWORD; // Device priority
+ DeviceName: LPCWSTR; // Device name
+ Tsid: LPCWSTR; // Device Tsid
+ Csid: LPCWSTR; // Device Csid
+ end;
+ {$EXTERNALSYM _FAX_PORT_INFOW}
+ FAX_PORT_INFOW = _FAX_PORT_INFOW;
+ {$EXTERNALSYM FAX_PORT_INFOW}
+ TFaxPortInfoW = FAX_PORT_INFOW;
+ PFaxPortInfoW = PFAX_PORT_INFOW;
+
+ {$IFDEF UNICODE}
+ FAX_PORT_INFO = FAX_PORT_INFOW;
+ {$EXTERNALSYM FAX_PORT_INFO}
+ PFAX_PORT_INFO = PFAX_PORT_INFOW;
+ {$EXTERNALSYM PFAX_PORT_INFO}
+ TFaxPortInfo = TFaxPortInfoW;
+ PFaxPortInfo = PFaxPortInfoW;
+ {$ELSE}
+ FAX_PORT_INFO = FAX_PORT_INFOA;
+ {$EXTERNALSYM FAX_PORT_INFO}
+ PFAX_PORT_INFO = PFAX_PORT_INFOA;
+ {$EXTERNALSYM PFAX_PORT_INFO}
+ TFaxPortInfo = TFaxPortInfoA;
+ PFaxPortInfo = PFaxPortInfoA;
+ {$ENDIF UNICODE}
+
+ PFAX_ROUTING_METHODA = ^FAX_ROUTING_METHODA;
+ {$EXTERNALSYM PFAX_ROUTING_METHODA}
+ _FAX_ROUTING_METHODA = record
+ SizeOfStruct: DWORD; // size of this structure
+ DeviceId: DWORD; // device identifier
+ Enabled: BOOL; // is this method enabled for this device?
+ DeviceName: LPCSTR; // device name
+ Guid: LPCSTR; // guid that identifies this routing method
+ FriendlyName: LPCSTR; // friendly name for this method
+ FunctionName: LPCSTR; // exported function name that identifies this method
+ ExtensionImageName: LPCSTR; // module (dll) name that implements this method
+ ExtensionFriendlyName: LPCSTR; // displayable string that identifies the extension
+ end;
+ {$EXTERNALSYM _FAX_ROUTING_METHODA}
+ FAX_ROUTING_METHODA = _FAX_ROUTING_METHODA;
+ {$EXTERNALSYM FAX_ROUTING_METHODA}
+ TFaxRoutingMethodA = FAX_ROUTING_METHODA;
+ PFaxRoutingMethodA = PFAX_ROUTING_METHODA;
+
+ PFAX_ROUTING_METHODW = ^FAX_ROUTING_METHODW;
+ {$EXTERNALSYM PFAX_ROUTING_METHODW}
+ _FAX_ROUTING_METHODW = record
+ SizeOfStruct: DWORD; // size of this structure
+ DeviceId: DWORD; // device identifier
+ Enabled: BOOL; // is this method enabled for this device?
+ DeviceName: LPCWSTR; // device name
+ Guid: LPCWSTR; // guid that identifies this routing method
+ FriendlyName: LPCWSTR; // friendly name for this method
+ FunctionName: LPCWSTR; // exported function name that identifies this method
+ ExtensionImageName: LPCWSTR; // module (dll) name that implements this method
+ ExtensionFriendlyName: LPCWSTR; // displayable string that identifies the extension
+ end;
+ {$EXTERNALSYM _FAX_ROUTING_METHODW}
+ FAX_ROUTING_METHODW = _FAX_ROUTING_METHODW;
+ {$EXTERNALSYM FAX_ROUTING_METHODW}
+ TFaxRoutingMethodW = FAX_ROUTING_METHODW;
+ PFaxRoutingMethodW = PFAX_ROUTING_METHODW;
+
+ {$IFDEF UNICODE}
+ FAX_ROUTING_METHOD = FAX_ROUTING_METHODW;
+ {$EXTERNALSYM FAX_ROUTING_METHOD}
+ PFAX_ROUTING_METHOD = PFAX_ROUTING_METHODW;
+ {$EXTERNALSYM PFAX_ROUTING_METHOD}
+ TFaxRoutingMethod = TFaxRoutingMethodW;
+ PFaxRoutingMethod = PFaxRoutingMethodW;
+ {$ELSE}
+ FAX_ROUTING_METHOD = FAX_ROUTING_METHODA;
+ {$EXTERNALSYM FAX_ROUTING_METHOD}
+ PFAX_ROUTING_METHOD = PFAX_ROUTING_METHODA;
+ {$EXTERNALSYM PFAX_ROUTING_METHOD}
+ TFaxRoutingMethod = TFaxRoutingMethodA;
+ PFaxRoutingMethod = PFaxRoutingMethodA;
+ {$ENDIF UNICODE}
+
+ PFAX_GLOBAL_ROUTING_INFOA = ^FAX_GLOBAL_ROUTING_INFOA;
+ {$EXTERNALSYM PFAX_GLOBAL_ROUTING_INFOA}
+ _FAX_GLOBAL_ROUTING_INFOA = record
+ SizeOfStruct: DWORD; // size of this structure
+ Priority: DWORD; // priority of this device
+ Guid: LPCSTR; // guid that identifies this routing method
+ FriendlyName: LPCSTR; // friendly name for this method
+ FunctionName: LPCSTR; // exported function name that identifies this method
+ ExtensionImageName: LPCSTR; // module (dll) name that implements this method
+ ExtensionFriendlyName: LPCSTR; // displayable string that identifies the extension
+ end;
+ {$EXTERNALSYM _FAX_GLOBAL_ROUTING_INFOA}
+ FAX_GLOBAL_ROUTING_INFOA = _FAX_GLOBAL_ROUTING_INFOA;
+ {$EXTERNALSYM FAX_GLOBAL_ROUTING_INFOA}
+ TFaxGlobalRoutingInfoA = FAX_GLOBAL_ROUTING_INFOA;
+ PFaxGlobalRoutingInfoA = PFAX_GLOBAL_ROUTING_INFOA;
+
+ PFAX_GLOBAL_ROUTING_INFOW = ^FAX_GLOBAL_ROUTING_INFOW;
+ {$EXTERNALSYM PFAX_GLOBAL_ROUTING_INFOW}
+ _FAX_GLOBAL_ROUTING_INFOW = record
+ SizeOfStruct: DWORD; // size of this structure
+ Priority: DWORD; // priority of this device
+ Guid: LPCWSTR; // guid that identifies this routing method
+ FriendlyName: LPCWSTR; // friendly name for this method
+ FunctionName: LPCWSTR; // exported function name that identifies this method
+ ExtensionImageName: LPCWSTR; // module (dll) name that implements this method
+ ExtensionFriendlyName: LPCWSTR; // displayable string that identifies the extension
+ end;
+ {$EXTERNALSYM _FAX_GLOBAL_ROUTING_INFOW}
+ FAX_GLOBAL_ROUTING_INFOW = _FAX_GLOBAL_ROUTING_INFOW;
+ {$EXTERNALSYM FAX_GLOBAL_ROUTING_INFOW}
+ TFaxGlobalRoutingInfoW = FAX_GLOBAL_ROUTING_INFOW;
+ PFaxGlobalRoutingInfoW = PFAX_GLOBAL_ROUTING_INFOW;
+
+ {$IFDEF UNICODE}
+ FAX_GLOBAL_ROUTING_INFO = FAX_GLOBAL_ROUTING_INFOW;
+ {$EXTERNALSYM FAX_GLOBAL_ROUTING_INFO}
+ PFAX_GLOBAL_ROUTING_INFO = FAX_GLOBAL_ROUTING_INFOW;
+ {$EXTERNALSYM PFAX_GLOBAL_ROUTING_INFO}
+ TFaxGlobalRoutingInfo = TFaxGlobalRoutingInfoW;
+ PFaxGlobalRoutingInfo = PFaxGlobalRoutingInfoW;
+ {$ELSE}
+ FAX_GLOBAL_ROUTING_INFO = FAX_GLOBAL_ROUTING_INFOA;
+ {$EXTERNALSYM FAX_GLOBAL_ROUTING_INFO}
+ PFAX_GLOBAL_ROUTING_INFO = FAX_GLOBAL_ROUTING_INFOA;
+ {$EXTERNALSYM PFAX_GLOBAL_ROUTING_INFO}
+ TFaxGlobalRoutingInfo = TFaxGlobalRoutingInfoA;
+ PFaxGlobalRoutingInfo = PFaxGlobalRoutingInfoA;
+ {$ENDIF UNICODE}
+
+ PFAX_COVERPAGE_INFOA = ^FAX_COVERPAGE_INFOA;
+ {$EXTERNALSYM PFAX_COVERPAGE_INFOA}
+ _FAX_COVERPAGE_INFOA = record
+ SizeOfStruct: DWORD; // Size of this structure
+ //
+ // general
+ //
+ CoverPageName: LPCSTR; // coverpage document name
+ UseServerCoverPage: BOOL; // coverpage exists on the fax server
+ //
+ // Recipient information
+ //
+ RecName: LPCSTR;
+ RecFaxNumber: LPCSTR;
+ RecCompany: LPCSTR;
+ RecStreetAddress: LPCSTR;
+ RecCity: LPCSTR;
+ RecState: LPCSTR;
+ RecZip: LPCSTR;
+ RecCountry: LPCSTR;
+ RecTitle: LPCSTR;
+ RecDepartment: LPCSTR;
+ RecOfficeLocation: LPCSTR;
+ RecHomePhone: LPCSTR;
+ RecOfficePhone: LPCSTR;
+ //
+ // Sender information
+ //
+ SdrName: LPCSTR;
+ SdrFaxNumber: LPCSTR;
+ SdrCompany: LPCSTR;
+ SdrAddress: LPCSTR;
+ SdrTitle: LPCSTR;
+ SdrDepartment: LPCSTR;
+ SdrOfficeLocation: LPCSTR;
+ SdrHomePhone: LPCSTR;
+ SdrOfficePhone: LPCSTR;
+ //
+ // Misc information
+ //
+ Note: LPCSTR;
+ Subject: LPCSTR;
+ TimeSent: SYSTEMTIME; // Time the fax was sent
+ PageCount: DWORD; // Number of pages
+ end;
+ {$EXTERNALSYM _FAX_COVERPAGE_INFOA}
+ FAX_COVERPAGE_INFOA = _FAX_COVERPAGE_INFOA;
+ {$EXTERNALSYM FAX_COVERPAGE_INFOA}
+ TFaxCoverpageInfoA = FAX_COVERPAGE_INFOA;
+ PFaxCoverpageInfoA = PFAX_COVERPAGE_INFOA;
+
+ PFAX_COVERPAGE_INFOW = ^FAX_COVERPAGE_INFOW;
+ {$EXTERNALSYM PFAX_COVERPAGE_INFOW}
+ _FAX_COVERPAGE_INFOW = record
+ SizeOfStruct: DWORD; // Size of this structure
+ //
+ // general
+ //
+ CoverPageName: LPCWSTR; // coverpage document name
+ UseServerCoverPage: BOOL; // coverpage exists on the fax server
+ //
+ // Recipient information
+ //
+ RecName: LPCWSTR;
+ RecFaxNumber: LPCWSTR;
+ RecCompany: LPCWSTR;
+ RecStreetAddress: LPCWSTR;
+ RecCity: LPCWSTR;
+ RecState: LPCWSTR;
+ RecZip: LPCWSTR;
+ RecCountry: LPCWSTR;
+ RecTitle: LPCWSTR;
+ RecDepartment: LPCWSTR;
+ RecOfficeLocation: LPCWSTR;
+ RecHomePhone: LPCWSTR;
+ RecOfficePhone: LPCWSTR;
+ //
+ // Sender information
+ //
+ SdrName: LPCWSTR;
+ SdrFaxNumber: LPCWSTR;
+ SdrCompany: LPCWSTR;
+ SdrAddress: LPCWSTR;
+ SdrTitle: LPCWSTR;
+ SdrDepartment: LPCWSTR;
+ SdrOfficeLocation: LPCWSTR;
+ SdrHomePhone: LPCWSTR;
+ SdrOfficePhone: LPCWSTR;
+ //
+ // Misc information
+ //
+ Note: LPCWSTR;
+ Subject: LPCWSTR;
+ TimeSent: SYSTEMTIME; // Time the fax was sent
+ PageCount: DWORD; // Number of pages
+ end;
+ {$EXTERNALSYM _FAX_COVERPAGE_INFOW}
+ FAX_COVERPAGE_INFOW = _FAX_COVERPAGE_INFOW;
+ {$EXTERNALSYM FAX_COVERPAGE_INFOW}
+ TFaxCoverpageInfoW = FAX_COVERPAGE_INFOW;
+ PFaxCoverpageInfoW = PFAX_COVERPAGE_INFOW;
+
+ {$IFDEF UNICODE}
+ FAX_COVERPAGE_INFO = FAX_COVERPAGE_INFOW;
+ {$EXTERNALSYM FAX_COVERPAGE_INFO}
+ PFAX_COVERPAGE_INFO = PFAX_COVERPAGE_INFOW;
+ {$EXTERNALSYM PFAX_COVERPAGE_INFO}
+ TFaxCoverpageInfo = TFaxCoverpageInfoW;
+ PFaxCoverpageInfo = PFaxCoverpageInfoW;
+ {$ELSE}
+ FAX_COVERPAGE_INFO = FAX_COVERPAGE_INFOA;
+ {$EXTERNALSYM FAX_COVERPAGE_INFO}
+ PFAX_COVERPAGE_INFO = PFAX_COVERPAGE_INFOA;
+ {$EXTERNALSYM PFAX_COVERPAGE_INFO}
+ TFaxCoverpageInfo = TFaxCoverpageInfoA;
+ PFaxCoverpageInfo = PFaxCoverpageInfoA;
+ {$ENDIF UNICODE}
+
+ FAX_ENUM_JOB_SEND_ATTRIBUTES = (
+ JSA_NOW, // Send now
+ JSA_SPECIFIC_TIME, // Send at specific time
+ JSA_DISCOUNT_PERIOD); // Send at server configured discount period
+ {$EXTERNALSYM FAX_ENUM_JOB_SEND_ATTRIBUTES}
+ TFaxEnumJobSendAttributes = FAX_ENUM_JOB_SEND_ATTRIBUTES;
+
+ FAX_ENUM_DELIVERY_REPORT_TYPES = (
+ DRT_NONE, // Do not send receipt
+ DRT_EMAIL, // Send receipt by email
+ DRT_INBOX); // send receipt to local inbox
+ {$EXTERNALSYM FAX_ENUM_DELIVERY_REPORT_TYPES}
+ TFaxEnumDeliveryReportTypes = FAX_ENUM_DELIVERY_REPORT_TYPES;
+
+ HCALL = HANDLE; // todo from TAPI
+
+ PFAX_JOB_PARAMA = ^FAX_JOB_PARAMA;
+ {$EXTERNALSYM PFAX_JOB_PARAMA}
+ _FAX_JOB_PARAMA = record
+ SizeOfStruct: DWORD; // size of this structure
+ RecipientNumber: LPCSTR; // recipient fax number
+ RecipientName: LPCSTR; // recipient name
+ Tsid: LPCSTR; // transmitter's id
+ SenderName: LPCSTR; // sender name
+ SenderCompany: LPCSTR; // sender company
+ SenderDept: LPCSTR; // sender department
+ BillingCode: LPCSTR; // billing code
+ ScheduleAction: DWORD; // when to schedule the fax, see JSA defines
+ ScheduleTime: SYSTEMTIME; // time to send the fax when JSA_SPECIFIC_TIME is used (must be local time)
+ DeliveryReportType: DWORD; // delivery report type, see DRT defines
+ DeliveryReportAddress: LPCSTR; // email address for delivery report (ndr or dr) thru MAPI / SMTP
+ DocumentName: LPCSTR; // document name (optional)
+ CallHandle: HCALL; // optional call handle
+ Reserved: array [0..3 - 1] of DWORD_PTR; // reserved for ms use only
+ end;
+ {$EXTERNALSYM _FAX_JOB_PARAMA}
+ FAX_JOB_PARAMA = _FAX_JOB_PARAMA;
+ {$EXTERNALSYM FAX_JOB_PARAMA}
+ TFaxJobParamA = FAX_JOB_PARAMA;
+ PFaxJobParamA = PFAX_JOB_PARAMA;
+
+ PFAX_JOB_PARAMW = ^FAX_JOB_PARAMW;
+ {$EXTERNALSYM PFAX_JOB_PARAMW}
+ _FAX_JOB_PARAMW = record
+ SizeOfStruct: DWORD; // size of this structure
+ RecipientNumber: LPCWSTR; // recipient fax number
+ RecipientName: LPCWSTR; // recipient name
+ Tsid: LPCWSTR; // transmitter's id
+ SenderName: LPCWSTR; // sender name
+ SenderCompany: LPCWSTR; // sender company
+ SenderDept: LPCWSTR; // sender department
+ BillingCode: LPCWSTR; // billing code
+ ScheduleAction: DWORD; // when to schedule the fax, see JSA defines
+ ScheduleTime: SYSTEMTIME; // time to send the fax when JSA_SPECIFIC_TIME is used (must be local time)
+ DeliveryReportType: DWORD; // delivery report type, see DRT defines
+ DeliveryReportAddress: LPCWSTR; // email address for delivery report (ndr or dr) thru MAPI / SMTP
+ DocumentName: LPCWSTR; // document name (optional)
+ CallHandle: HCALL; // optional call handle
+ Reserved: array [0..3 - 1] of DWORD_PTR; // reserved for ms use only
+ end;
+ {$EXTERNALSYM _FAX_JOB_PARAMW}
+ FAX_JOB_PARAMW = _FAX_JOB_PARAMW;
+ {$EXTERNALSYM FAX_JOB_PARAMW}
+ TFaxJobParamW = FAX_JOB_PARAMW;
+ PFaxJobParamW = PFAX_JOB_PARAMW;
+
+ {$IFDEF UNICODE}
+ FAX_JOB_PARAM = FAX_JOB_PARAMW;
+ {$EXTERNALSYM FAX_JOB_PARAM}
+ PFAX_JOB_PARAM = PFAX_JOB_PARAMW;
+ {$EXTERNALSYM PFAX_JOB_PARAM}
+ TFaxJobParam = TFaxJobParamW;
+ PFaxJobParam = PFaxJobParamW;
+ {$ELSE}
+ FAX_JOB_PARAM = FAX_JOB_PARAMA;
+ {$EXTERNALSYM FAX_JOB_PARAM}
+ PFAX_JOB_PARAM = PFAX_JOB_PARAMA;
+ {$EXTERNALSYM PFAX_JOB_PARAM}
+ TFaxJobParam = TFaxJobParamA;
+ PFaxJobParam = PFaxJobParamA;
+ {$ENDIF UNICODE}
+
+//
+// Event Ids
+//
+// FEI_NEVENTS is the number of events
+//
+
+const
+ FEI_DIALING = $00000001;
+ {$EXTERNALSYM FEI_DIALING}
+ FEI_SENDING = $00000002;
+ {$EXTERNALSYM FEI_SENDING}
+ FEI_RECEIVING = $00000003;
+ {$EXTERNALSYM FEI_RECEIVING}
+ FEI_COMPLETED = $00000004;
+ {$EXTERNALSYM FEI_COMPLETED}
+ FEI_BUSY = $00000005;
+ {$EXTERNALSYM FEI_BUSY}
+ FEI_NO_ANSWER = $00000006;
+ {$EXTERNALSYM FEI_NO_ANSWER}
+ FEI_BAD_ADDRESS = $00000007;
+ {$EXTERNALSYM FEI_BAD_ADDRESS}
+ FEI_NO_DIAL_TONE = $00000008;
+ {$EXTERNALSYM FEI_NO_DIAL_TONE}
+ FEI_DISCONNECTED = $00000009;
+ {$EXTERNALSYM FEI_DISCONNECTED}
+ FEI_FATAL_ERROR = $0000000a;
+ {$EXTERNALSYM FEI_FATAL_ERROR}
+ FEI_NOT_FAX_CALL = $0000000b;
+ {$EXTERNALSYM FEI_NOT_FAX_CALL}
+ FEI_CALL_DELAYED = $0000000c;
+ {$EXTERNALSYM FEI_CALL_DELAYED}
+ FEI_CALL_BLACKLISTED = $0000000d;
+ {$EXTERNALSYM FEI_CALL_BLACKLISTED}
+ FEI_RINGING = $0000000e;
+ {$EXTERNALSYM FEI_RINGING}
+ FEI_ABORTING = $0000000f;
+ {$EXTERNALSYM FEI_ABORTING}
+ FEI_ROUTING = $00000010;
+ {$EXTERNALSYM FEI_ROUTING}
+ FEI_MODEM_POWERED_ON = $00000011;
+ {$EXTERNALSYM FEI_MODEM_POWERED_ON}
+ FEI_MODEM_POWERED_OFF = $00000012;
+ {$EXTERNALSYM FEI_MODEM_POWERED_OFF}
+ FEI_IDLE = $00000013;
+ {$EXTERNALSYM FEI_IDLE}
+ FEI_FAXSVC_ENDED = $00000014;
+ {$EXTERNALSYM FEI_FAXSVC_ENDED}
+ FEI_ANSWERED = $00000015;
+ {$EXTERNALSYM FEI_ANSWERED}
+ FEI_JOB_QUEUED = $00000016;
+ {$EXTERNALSYM FEI_JOB_QUEUED}
+ FEI_DELETED = $00000017;
+ {$EXTERNALSYM FEI_DELETED}
+ FEI_INITIALIZING = $00000018;
+ {$EXTERNALSYM FEI_INITIALIZING}
+ FEI_LINE_UNAVAILABLE = $00000019;
+ {$EXTERNALSYM FEI_LINE_UNAVAILABLE}
+ FEI_HANDLED = $0000001a;
+ {$EXTERNALSYM FEI_HANDLED}
+ FEI_FAXSVC_STARTED = $0000001b;
+ {$EXTERNALSYM FEI_FAXSVC_STARTED}
+
+ FEI_NEVENTS = FEI_FAXSVC_STARTED;
+ {$EXTERNALSYM FEI_NEVENTS}
+
+type
+ PFAX_EVENTA = ^FAX_EVENTA;
+ {$EXTERNALSYM PFAX_EVENTA}
+ _FAX_EVENTA = record
+ SizeOfStruct: DWORD; // Size of this structure
+ TimeStamp: FILETIME; // Timestamp for when the event was generated
+ DeviceId: DWORD; // Permanent line id
+ EventId: DWORD; // Current event id
+ JobId: DWORD; // Fax Job Id, 0xffffffff indicates inactive job
+ end;
+ {$EXTERNALSYM _FAX_EVENTA}
+ FAX_EVENTA = _FAX_EVENTA;
+ {$EXTERNALSYM FAX_EVENTA}
+ TFaxEventA = FAX_EVENTA;
+ PFaxEventA = PFAX_EVENTA;
+
+ PFAX_EVENTW = ^FAX_EVENTW;
+ {$EXTERNALSYM PFAX_EVENTW}
+ _FAX_EVENTW = record
+ SizeOfStruct: DWORD; // Size of this structure
+ TimeStamp: FILETIME; // Timestamp for when the event was generated
+ DeviceId: DWORD; // Permanent line id
+ EventId: DWORD; // Current event id
+ JobId: DWORD; // Fax Job Id, 0xffffffff indicates inactive job
+ end;
+ {$EXTERNALSYM _FAX_EVENTW}
+ FAX_EVENTW = _FAX_EVENTW;
+ {$EXTERNALSYM FAX_EVENTW}
+ TFaxEventW = FAX_EVENTW;
+ PFaxEventW = PFAX_EVENTW;
+
+ {$IFDEF UNICODE}
+ FAX_EVENT = FAX_EVENTW;
+ {$EXTERNALSYM FAX_EVENT}
+ PFAX_EVENT = PFAX_EVENTW;
+ {$EXTERNALSYM PFAX_EVENT}
+ TFaxEvent = TFaxEventW;
+ PFaxEvent = PFaxEventW;
+ {$ELSE}
+ FAX_EVENT = FAX_EVENTA;
+ {$EXTERNALSYM FAX_EVENT}
+ PFAX_EVENT = PFAX_EVENTA;
+ {$EXTERNALSYM PFAX_EVENT}
+ TFaxEvent = TFaxEventA;
+ PFaxEvent = PFaxEventA;
+ {$ENDIF UNICODE}
+
+ PFAX_PRINT_INFOA = ^FAX_PRINT_INFOA;
+ {$EXTERNALSYM PFAX_PRINT_INFOA}
+ _FAX_PRINT_INFOA = record
+ SizeOfStruct: DWORD; // Size of this structure
+ DocName: LPCSTR; // Document name that appears in the spooler
+ RecipientName: LPCSTR; // Recipient name
+ RecipientNumber: LPCSTR; // Recipient fax number (non-canonical number)
+ SenderName: LPCSTR; // Sender name
+ SenderCompany: LPCSTR; // Sender company (optional)
+ SenderDept: LPCSTR; // Sender department
+ SenderBillingCode: LPCSTR; // Billing code
+ Reserved: LPCSTR; // Reserved; must be NULL
+ DrEmailAddress: LPCSTR; // E.Mail address for delivery report
+ OutputFileName: LPCSTR; // for print to file, resulting file name
+ end;
+ {$EXTERNALSYM _FAX_PRINT_INFOA}
+ FAX_PRINT_INFOA = _FAX_PRINT_INFOA;
+ {$EXTERNALSYM FAX_PRINT_INFOA}
+ TFaxPrintInfoA = FAX_PRINT_INFOA;
+ PFaxPrintInfoA = PFAX_PRINT_INFOA;
+
+ PFAX_PRINT_INFOW = ^FAX_PRINT_INFOW;
+ {$EXTERNALSYM PFAX_PRINT_INFOW}
+ _FAX_PRINT_INFOW = record
+ SizeOfStruct: DWORD; // Size of this structure
+ DocName: LPCWSTR; // Document name that appears in the spooler
+ RecipientName: LPCWSTR; // Recipient name
+ RecipientNumber: LPCWSTR; // Recipient fax number (non-canonical number)
+ SenderName: LPCWSTR; // Sender name
+ SenderCompany: LPCWSTR; // Sender company (optional)
+ SenderDept: LPCWSTR; // Sender department
+ SenderBillingCode: LPCWSTR; // Billing code
+ Reserved: LPCWSTR; // Reserved; must be NULL
+ DrEmailAddress: LPCWSTR; // E.Mail address for delivery report
+ OutputFileName: LPCWSTR; // for print to file, resulting file name
+ end;
+ {$EXTERNALSYM _FAX_PRINT_INFOW}
+ FAX_PRINT_INFOW = _FAX_PRINT_INFOW;
+ {$EXTERNALSYM FAX_PRINT_INFOW}
+ TFaxPrintInfoW = FAX_PRINT_INFOW;
+ PFaxPrintInfoW = PFAX_PRINT_INFOW;
+
+ {$IFDEF UNICODE}
+ FAX_PRINT_INFO = FAX_PRINT_INFOW;
+ {$EXTERNALSYM FAX_PRINT_INFO}
+ PFAX_PRINT_INFO = PFAX_PRINT_INFOW;
+ {$EXTERNALSYM PFAX_PRINT_INFO}
+ TFaxPrintInfo = TFaxPrintInfoW;
+ PFaxPrintInfo = PFaxPrintInfoW;
+ {$ELSE}
+ FAX_PRINT_INFO = FAX_PRINT_INFOA;
+ {$EXTERNALSYM FAX_PRINT_INFO}
+ PFAX_PRINT_INFO = PFAX_PRINT_INFOA;
+ {$EXTERNALSYM PFAX_PRINT_INFO}
+ TFaxPrintInfo = TFaxPrintInfoA;
+ PFaxPrintInfo = PFaxPrintInfoA;
+ {$ENDIF UNICODE}
+
+ PFAX_CONTEXT_INFOA = ^FAX_CONTEXT_INFOA;
+ {$EXTERNALSYM PFAX_CONTEXT_INFOA}
+ _FAX_CONTEXT_INFOA = record
+ SizeOfStruct: DWORD; // Size of this structure
+ hDC: HDC; // Device Context
+ ServerName: array [0..MAX_COMPUTERNAME_LENGTH] of CHAR; // Server name
+ end;
+ {$EXTERNALSYM _FAX_CONTEXT_INFOA}
+ FAX_CONTEXT_INFOA = _FAX_CONTEXT_INFOA;
+ {$EXTERNALSYM FAX_CONTEXT_INFOA}
+ TFaxContextInfoA = FAX_CONTEXT_INFOA;
+ PFaxContextInfoA = PFAX_CONTEXT_INFOA;
+
+ PFAX_CONTEXT_INFOW = ^FAX_CONTEXT_INFOW;
+ {$EXTERNALSYM PFAX_CONTEXT_INFOW}
+ _FAX_CONTEXT_INFOW = record
+ SizeOfStruct: DWORD; // Size of this structure
+ hDC: HDC; // Device Context
+ ServerName: array [0..MAX_COMPUTERNAME_LENGTH] of WCHAR; // Server name
+ end;
+ {$EXTERNALSYM _FAX_CONTEXT_INFOW}
+ FAX_CONTEXT_INFOW = _FAX_CONTEXT_INFOW;
+ {$EXTERNALSYM FAX_CONTEXT_INFOW}
+ TFaxContextInfoW = FAX_CONTEXT_INFOW;
+ PFaxContextInfoW = PFAX_CONTEXT_INFOW;
+
+ {$IFDEF UNICODE}
+ FAX_CONTEXT_INFO = FAX_CONTEXT_INFOW;
+ {$EXTERNALSYM FAX_CONTEXT_INFO}
+ PFAX_CONTEXT_INFO = PFAX_CONTEXT_INFOW;
+ {$EXTERNALSYM PFAX_CONTEXT_INFO}
+ TFaxContextInfo = TFaxContextInfoW;
+ PFaxContextInfo = PFaxContextInfoW;
+ {$ELSE}
+ FAX_CONTEXT_INFO = FAX_CONTEXT_INFOA;
+ {$EXTERNALSYM FAX_CONTEXT_INFO}
+ PFAX_CONTEXT_INFO = PFAX_CONTEXT_INFOA;
+ {$EXTERNALSYM PFAX_CONTEXT_INFO}
+ TFaxContextInfo = TFaxContextInfoA;
+ PFaxContextInfo = PFaxContextInfoA;
+ {$ENDIF UNICODE}
+
+//
+// prototypes
+//
+
+function FaxConnectFaxServerA(MachineName: LPCSTR; var FaxHandle: HANDLE): BOOL; stdcall;
+{$EXTERNALSYM FaxConnectFaxServerA}
+function FaxConnectFaxServerW(MachineName: LPCWSTR; var FaxHandle: HANDLE): BOOL; stdcall;
+{$EXTERNALSYM FaxConnectFaxServerW}
+function FaxConnectFaxServer(MachineName: LPCTSTR; var FaxHandle: HANDLE): BOOL; stdcall;
+{$EXTERNALSYM FaxConnectFaxServer}
+
+function FaxClose(FaxHandle: HANDLE): BOOL; stdcall;
+{$EXTERNALSYM FaxClose}
+
+type
+ FAX_ENUM_PORT_OPEN_TYPE = (
+ PORT_OPEN_FILLER0,
+ PORT_OPEN_QUERY,
+ PORT_OPEN_MODIFY);
+ {$EXTERNALSYM FAX_ENUM_PORT_OPEN_TYPE}
+ TFaxEnumPortOpenType = FAX_ENUM_PORT_OPEN_TYPE;
+
+function FaxOpenPort(FaxHandle: HANDLE; DeviceId: DWORD; Flags: DWORD; var FaxPortHandle: HANDLE): BOOL; stdcall;
+{$EXTERNALSYM FaxOpenPort}
+
+function FaxCompleteJobParamsA(var JobParams: PFAX_JOB_PARAMA; var CoverpageInfo: PFAX_COVERPAGE_INFOA): BOOL; stdcall;
+{$EXTERNALSYM FaxCompleteJobParamsA}
+function FaxCompleteJobParamsW(var JobParams: PFAX_JOB_PARAMW; var CoverpageInfo: PFAX_COVERPAGE_INFOW): BOOL; stdcall;
+{$EXTERNALSYM FaxCompleteJobParamsW}
+function FaxCompleteJobParams(var JobParams: PFAX_JOB_PARAM; var CoverpageInfo: PFAX_COVERPAGE_INFO): BOOL; stdcall;
+{$EXTERNALSYM FaxCompleteJobParams}
+
+function FaxSendDocumentA(FaxHandle: HANDLE; FileName: LPCSTR; JobParams: PFAX_JOB_PARAMA; CoverpageInfo: PFAX_COVERPAGE_INFOA; FaxJobId: LPDWORD): BOOL; stdcall;
+{$EXTERNALSYM FaxSendDocumentA}
+function FaxSendDocumentW(FaxHandle: HANDLE; FileName: LPCWSTR; JobParams: PFAX_JOB_PARAMW; CoverpageInfo: PFAX_COVERPAGE_INFOW; FaxJobId: LPDWORD): BOOL; stdcall;
+{$EXTERNALSYM FaxSendDocumentW}
+function FaxSendDocument(FaxHandle: HANDLE; FileName: LPCTSTR; JobParams: PFAX_JOB_PARAM; CoverpageInfo: PFAX_COVERPAGE_INFO; FaxJobId: LPDWORD): BOOL; stdcall;
+{$EXTERNALSYM FaxSendDocument}
+
+type
+ PFAX_RECIPIENT_CALLBACKA = function(FaxHandle: HANDLE; RecipientNumber: DWORD; Context: LPVOID; JobParams: PFAX_JOB_PARAMA; CoverpageInfo: PFAX_COVERPAGE_INFOA): BOOL; stdcall;
+ {$EXTERNALSYM PFAX_RECIPIENT_CALLBACKA}
+ TFaxRecipientCallbackA = PFAX_RECIPIENT_CALLBACKA;
+ PFAX_RECIPIENT_CALLBACKW = function(FaxHandle: HANDLE; RecipientNumber: DWORD; Context: LPVOID; JobParams: PFAX_JOB_PARAMW; CoverpageInfo: PFAX_COVERPAGE_INFOW): BOOL; stdcall;
+ {$EXTERNALSYM PFAX_RECIPIENT_CALLBACKW}
+ TFaxRecipientCallbackW = PFAX_RECIPIENT_CALLBACKW;
+
+ {$IFDEF UNICODE}
+ PFAX_RECIPIENT_CALLBACK = PFAX_RECIPIENT_CALLBACKW;
+ {$EXTERNALSYM PFAX_RECIPIENT_CALLBACK}
+ TFaxRecipientCallback = TFaxRecipientCallbackW;
+ {$ELSE}
+ PFAX_RECIPIENT_CALLBACK = PFAX_RECIPIENT_CALLBACKA;
+ {$EXTERNALSYM PFAX_RECIPIENT_CALLBACK}
+ TFaxRecipientCallback = TFaxRecipientCallbackA;
+ {$ENDIF UNICODE}
+
+function FaxSendDocumentForBroadcastA(FaxHandle: HANDLE; FileName: LPCSTR; FaxJobId: LPDWORD; FaxRecipientCallback: PFAX_RECIPIENT_CALLBACKA; Context: LPVOID): BOOL; stdcall;
+{$EXTERNALSYM FaxSendDocumentForBroadcastA}
+function FaxSendDocumentForBroadcastW(FaxHandle: HANDLE; FileName: LPCWSTR; FaxJobId: LPDWORD; FaxRecipientCallback: PFAX_RECIPIENT_CALLBACKW; Context: LPVOID): BOOL; stdcall;
+{$EXTERNALSYM FaxSendDocumentForBroadcastW}
+function FaxSendDocumentForBroadcast(FaxHandle: HANDLE; FileName: LPCTSTR; FaxJobId: LPDWORD; FaxRecipientCallback: PFAX_RECIPIENT_CALLBACK; Context: LPVOID): BOOL; stdcall;
+{$EXTERNALSYM FaxSendDocumentForBroadcast}
+
+function FaxEnumJobsA(FaxHandle: HANDLE; var JobEntry: PFAX_JOB_ENTRYA; var JobsReturned: DWORD): BOOL; stdcall;
+{$EXTERNALSYM FaxEnumJobsA}
+function FaxEnumJobsW(FaxHandle: HANDLE; var JobEntry: PFAX_JOB_ENTRYW; var JobsReturned: DWORD): BOOL; stdcall;
+{$EXTERNALSYM FaxEnumJobsW}
+function FaxEnumJobs(FaxHandle: HANDLE; var JobEntry: PFAX_JOB_ENTRY; var JobsReturned: DWORD): BOOL; stdcall;
+{$EXTERNALSYM FaxEnumJobs}
+
+function FaxGetJobA(FaxHandle: HANDLE; JobId: DWORD; var JobEntry: PFAX_JOB_ENTRYA): BOOL; stdcall;
+{$EXTERNALSYM FaxGetJobA}
+function FaxGetJobW(FaxHandle: HANDLE; JobId: DWORD; var JobEntry: PFAX_JOB_ENTRYW): BOOL; stdcall;
+{$EXTERNALSYM FaxGetJobW}
+function FaxGetJob(FaxHandle: HANDLE; JobId: DWORD; var JobEntry: PFAX_JOB_ENTRY): BOOL; stdcall;
+{$EXTERNALSYM FaxGetJob}
+
+function FaxSetJobA(FaxHandle: HANDLE; JobId: DWORD; Command: DWORD; JobEntry: PFAX_JOB_ENTRYA): BOOL; stdcall;
+{$EXTERNALSYM FaxSetJobA}
+function FaxSetJobW(FaxHandle: HANDLE; JobId: DWORD; Command: DWORD; JobEntry: PFAX_JOB_ENTRYW): BOOL; stdcall;
+{$EXTERNALSYM FaxSetJobW}
+function FaxSetJob(FaxHandle: HANDLE; JobId: DWORD; Command: DWORD; JobEntry: PFAX_JOB_ENTRY): BOOL; stdcall;
+{$EXTERNALSYM FaxSetJob}
+
+function FaxGetPageData(FaxHandle: HANDLE; JobId: DWORD; var Buffer: LPBYTE; var BufferSize, ImageWidth, ImageHeight: DWORD): BOOL; stdcall;
+{$EXTERNALSYM FaxGetPageData}
+
+function FaxGetDeviceStatusA(FaxPortHandle: HANDLE; var DeviceStatus: PFAX_DEVICE_STATUSA): BOOL; stdcall;
+{$EXTERNALSYM FaxGetDeviceStatusA}
+function FaxGetDeviceStatusW(FaxPortHandle: HANDLE; var DeviceStatus: PFAX_DEVICE_STATUSW): BOOL; stdcall;
+{$EXTERNALSYM FaxGetDeviceStatusW}
+function FaxGetDeviceStatus(FaxPortHandle: HANDLE; var DeviceStatus: PFAX_DEVICE_STATUS): BOOL; stdcall;
+{$EXTERNALSYM FaxGetDeviceStatus}
+
+function FaxAbort(FaxHandle: HANDLE; JobId: DWORD): BOOL; stdcall;
+{$EXTERNALSYM FaxAbort}
+
+function FaxGetConfigurationA(FaxHandle: HANDLE; var FaxConfig: PFAX_CONFIGURATIONA): BOOL; stdcall;
+{$EXTERNALSYM FaxGetConfigurationA}
+function FaxGetConfigurationW(FaxHandle: HANDLE; var FaxConfig: PFAX_CONFIGURATIONW): BOOL; stdcall;
+{$EXTERNALSYM FaxGetConfigurationW}
+function FaxGetConfiguration(FaxHandle: HANDLE; var FaxConfig: PFAX_CONFIGURATION): BOOL; stdcall;
+{$EXTERNALSYM FaxGetConfiguration}
+
+function FaxSetConfigurationA(FaxHandle: HANDLE; const FaxConfig: FAX_CONFIGURATIONA): BOOL; stdcall;
+{$EXTERNALSYM FaxSetConfigurationA}
+function FaxSetConfigurationW(FaxHandle: HANDLE; const FaxConfig: FAX_CONFIGURATIONW): BOOL; stdcall;
+{$EXTERNALSYM FaxSetConfigurationW}
+function FaxSetConfiguration(FaxHandle: HANDLE; const FaxConfig: FAX_CONFIGURATION): BOOL; stdcall;
+{$EXTERNALSYM FaxSetConfiguration}
+
+function FaxGetLoggingCategoriesA(FaxHandle: HANDLE; var Categories: PFAX_LOG_CATEGORYA; var NumberCategories: DWORD): BOOL; stdcall;
+{$EXTERNALSYM FaxGetLoggingCategoriesA}
+function FaxGetLoggingCategoriesW(FaxHandle: HANDLE; var Categories: PFAX_LOG_CATEGORYW; var NumberCategories: DWORD): BOOL; stdcall;
+{$EXTERNALSYM FaxGetLoggingCategoriesW}
+function FaxGetLoggingCategories(FaxHandle: HANDLE; var Categories: PFAX_LOG_CATEGORY; var NumberCategories: DWORD): BOOL; stdcall;
+{$EXTERNALSYM FaxGetLoggingCategories}
+
+function FaxSetLoggingCategoriesA(FaxHandle: HANDLE; Categories: PFAX_LOG_CATEGORYA; NumberCategories: DWORD): BOOL; stdcall;
+{$EXTERNALSYM FaxSetLoggingCategoriesA}
+function FaxSetLoggingCategoriesW(FaxHandle: HANDLE; Categories: PFAX_LOG_CATEGORYW; NumberCategories: DWORD): BOOL; stdcall;
+{$EXTERNALSYM FaxSetLoggingCategoriesW}
+function FaxSetLoggingCategories(FaxHandle: HANDLE; Categories: PFAX_LOG_CATEGORY; NumberCategories: DWORD): BOOL; stdcall;
+{$EXTERNALSYM FaxSetLoggingCategories}
+
+function FaxEnumPortsA(FaxHandle: HANDLE; var PortInfo: PFAX_PORT_INFOA; var PortsReturned: DWORD): BOOL; stdcall;
+{$EXTERNALSYM FaxEnumPortsA}
+function FaxEnumPortsW(FaxHandle: HANDLE; var PortInfo: PFAX_PORT_INFOW; var PortsReturned: DWORD): BOOL; stdcall;
+{$EXTERNALSYM FaxEnumPortsW}
+function FaxEnumPorts(FaxHandle: HANDLE; var PortInfo: PFAX_PORT_INFO; var PortsReturned: DWORD): BOOL; stdcall;
+{$EXTERNALSYM FaxEnumPorts}
+
+function FaxGetPortA(FaxPortHandle: HANDLE; var PortInfo: PFAX_PORT_INFOA): BOOL; stdcall;
+{$EXTERNALSYM FaxGetPortA}
+function FaxGetPortW(FaxPortHandle: HANDLE; var PortInfo: PFAX_PORT_INFOW): BOOL; stdcall;
+{$EXTERNALSYM FaxGetPortW}
+function FaxGetPort(FaxPortHandle: HANDLE; var PortInfo: PFAX_PORT_INFO): BOOL; stdcall;
+{$EXTERNALSYM FaxGetPort}
+
+function FaxSetPortA(FaxPortHandle: HANDLE; const PortInfo: FAX_PORT_INFOA): BOOL; stdcall;
+{$EXTERNALSYM FaxSetPortA}
+function FaxSetPortW(FaxPortHandle: HANDLE; const PortInfo: FAX_PORT_INFOW): BOOL; stdcall;
+{$EXTERNALSYM FaxSetPortW}
+function FaxSetPort(FaxPortHandle: HANDLE; const PortInfo: FAX_PORT_INFO): BOOL; stdcall;
+{$EXTERNALSYM FaxSetPort}
+
+function FaxEnumRoutingMethodsA(FaxPortHandle: HANDLE; var RoutingMethod: PFAX_ROUTING_METHODA; var MethodsReturned: DWORD): BOOL; stdcall;
+{$EXTERNALSYM FaxEnumRoutingMethodsA}
+function FaxEnumRoutingMethodsW(FaxPortHandle: HANDLE; var RoutingMethod: PFAX_ROUTING_METHODW; var MethodsReturned: DWORD): BOOL; stdcall;
+{$EXTERNALSYM FaxEnumRoutingMethodsW}
+function FaxEnumRoutingMethods(FaxPortHandle: HANDLE; var RoutingMethod: PFAX_ROUTING_METHOD; var MethodsReturned: DWORD): BOOL; stdcall;
+{$EXTERNALSYM FaxEnumRoutingMethods}
+
+function FaxEnableRoutingMethodA(FaxPortHandle: HANDLE; RoutingGuid: LPCSTR; Enabled: BOOL): BOOL; stdcall;
+{$EXTERNALSYM FaxEnableRoutingMethodA}
+function FaxEnableRoutingMethodW(FaxPortHandle: HANDLE; RoutingGuid: LPCWSTR; Enabled: BOOL): BOOL; stdcall;
+{$EXTERNALSYM FaxEnableRoutingMethodW}
+function FaxEnableRoutingMethod(FaxPortHandle: HANDLE; RoutingGuid: LPCTSTR; Enabled: BOOL): BOOL; stdcall;
+{$EXTERNALSYM FaxEnableRoutingMethod}
+
+function FaxEnumGlobalRoutingInfoA(FaxHandle: HANDLE; var RoutingInfo: PFAX_GLOBAL_ROUTING_INFOA; var MethodsReturned: DWORD): BOOL; stdcall;
+{$EXTERNALSYM FaxEnumGlobalRoutingInfoA}
+function FaxEnumGlobalRoutingInfoW(FaxHandle: HANDLE; var RoutingInfo: PFAX_GLOBAL_ROUTING_INFOW; var MethodsReturned: DWORD): BOOL; stdcall;
+{$EXTERNALSYM FaxEnumGlobalRoutingInfoW}
+function FaxEnumGlobalRoutingInfo(FaxHandle: HANDLE; var RoutingInfo: PFAX_GLOBAL_ROUTING_INFO; var MethodsReturned: DWORD): BOOL; stdcall;
+{$EXTERNALSYM FaxEnumGlobalRoutingInfo}
+
+function FaxSetGlobalRoutingInfoA(FaxHandle: HANDLE; const RoutingInfo: FAX_GLOBAL_ROUTING_INFOA): BOOL; stdcall;
+{$EXTERNALSYM FaxSetGlobalRoutingInfoA}
+function FaxSetGlobalRoutingInfoW(FaxHandle: HANDLE; const RoutingInfo: FAX_GLOBAL_ROUTING_INFOW): BOOL; stdcall;
+{$EXTERNALSYM FaxSetGlobalRoutingInfoW}
+function FaxSetGlobalRoutingInfo(FaxHandle: HANDLE; const RoutingInfo: FAX_GLOBAL_ROUTING_INFO): BOOL; stdcall;
+{$EXTERNALSYM FaxSetGlobalRoutingInfo}
+
+function FaxGetRoutingInfoA(FaxPortHandle: HANDLE; RoutingGuid: LPCSTR; var RoutingInfoBuffer: LPBYTE; var RoutingInfoBufferSize: DWORD): BOOL; stdcall;
+{$EXTERNALSYM FaxGetRoutingInfoA}
+function FaxGetRoutingInfoW(FaxPortHandle: HANDLE; RoutingGuid: LPCWSTR; var RoutingInfoBuffer: LPBYTE; var RoutingInfoBufferSize: DWORD): BOOL; stdcall;
+{$EXTERNALSYM FaxGetRoutingInfoW}
+function FaxGetRoutingInfo(FaxPortHandle: HANDLE; RoutingGuid: LPCTSTR; var RoutingInfoBuffer: LPBYTE; var RoutingInfoBufferSize: DWORD): BOOL; stdcall;
+{$EXTERNALSYM FaxGetRoutingInfo}
+
+function FaxSetRoutingInfoA(FaxPortHandle: HANDLE; RoutingGuid: LPCSTR; RoutingInfoBuffer: LPBYTE; RoutingInfoBufferSize: DWORD): BOOL; stdcall;
+{$EXTERNALSYM FaxSetRoutingInfoA}
+function FaxSetRoutingInfoW(FaxPortHandle: HANDLE; RoutingGuid: LPCWSTR; RoutingInfoBuffer: LPBYTE; RoutingInfoBufferSize: DWORD): BOOL; stdcall;
+{$EXTERNALSYM FaxSetRoutingInfoW}
+function FaxSetRoutingInfo(FaxPortHandle: HANDLE; RoutingGuid: LPCTSTR; RoutingInfoBuffer: LPBYTE; RoutingInfoBufferSize: DWORD): BOOL; stdcall;
+{$EXTERNALSYM FaxSetRoutingInfo}
+
+function FaxInitializeEventQueue(FaxHandle: HANDLE; CompletionPort: HANDLE; CompletionKey: ULONG_PTR; hWnd: HWND; MessageStart: UINT): BOOL; stdcall;
+{$EXTERNALSYM FaxInitializeEventQueue}
+
+procedure FaxFreeBuffer(Buffer: LPVOID); stdcall;
+{$EXTERNALSYM FaxFreeBuffer}
+
+function FaxStartPrintJobA(PrinterName: LPCSTR; const PrintInfo: FAX_PRINT_INFOA; var FaxJobId: DWORD; FaxContextInfo: PFAX_CONTEXT_INFOA): BOOL; stdcall;
+{$EXTERNALSYM FaxStartPrintJobA}
+function FaxStartPrintJobW(PrinterName: LPCWSTR; const PrintInfo: FAX_PRINT_INFOW; var FaxJobId: DWORD; FaxContextInfo: PFAX_CONTEXT_INFOW): BOOL; stdcall;
+{$EXTERNALSYM FaxStartPrintJobW}
+function FaxStartPrintJob(PrinterName: LPCTSTR; const PrintInfo: FAX_PRINT_INFO; var FaxJobId: DWORD; FaxContextInfo: PFAX_CONTEXT_INFO): BOOL; stdcall;
+{$EXTERNALSYM FaxStartPrintJob}
+
+function FaxPrintCoverPageA(const FaxContextInfo: FAX_CONTEXT_INFOA; const CoverPageInfo: FAX_COVERPAGE_INFOA): BOOL; stdcall;
+{$EXTERNALSYM FaxPrintCoverPageA}
+function FaxPrintCoverPageW(const FaxContextInfo: FAX_CONTEXT_INFOW; const CoverPageInfo: FAX_COVERPAGE_INFOW): BOOL; stdcall;
+{$EXTERNALSYM FaxPrintCoverPageW}
+function FaxPrintCoverPage(const FaxContextInfo: FAX_CONTEXT_INFO; const CoverPageInfo: FAX_COVERPAGE_INFO): BOOL; stdcall;
+{$EXTERNALSYM FaxPrintCoverPage}
+
+function FaxRegisterServiceProviderW(DeviceProvider: LPCWSTR; FriendlyName: LPCWSTR; ImageName: LPCWSTR; TspName: LPCWSTR): BOOL; stdcall;
+{$EXTERNALSYM FaxRegisterServiceProviderW}
+
+function FaxRegisterServiceProvider(DeviceProvider: LPCWSTR; FriendlyName: LPCWSTR; ImageName: LPCWSTR; TspName: LPCWSTR): BOOL;
+{$EXTERNALSYM FaxRegisterServiceProvider}
+
+function FaxUnregisterServiceProviderW(DeviceProvider: LPCWSTR): BOOL; stdcall;
+{$EXTERNALSYM FaxUnregisterServiceProviderW}
+
+function FaxUnregisterServiceProvider(DeviceProvider: LPCWSTR): BOOL; stdcall;
+{$EXTERNALSYM FaxUnregisterServiceProvider}
+
+type
+ PFAXUNREGISTERSERVICEPROVIDERW = function(DeviceProvider: LPCWSTR): BOOL; stdcall;
+ {$EXTERNALSYM PFAXUNREGISTERSERVICEPROVIDERW}
+ PFAXUNREGISTERSERVICEPROVIDER = PFAXUNREGISTERSERVICEPROVIDERW;
+ {$EXTERNALSYM PFAXUNREGISTERSERVICEPROVIDER}
+
+type
+ PFAX_ROUTING_INSTALLATION_CALLBACKW = function(FaxHandle: HANDLE; Context: LPVOID; MethodName, FriendlyName, FunctionName, Guid: LPWSTR): BOOL; stdcall;
+ {$EXTERNALSYM PFAX_ROUTING_INSTALLATION_CALLBACKW}
+ TFaxRoutingInstallationCallbackW = PFAX_ROUTING_INSTALLATION_CALLBACKW;
+
+ PFAX_ROUTING_INSTALLATION_CALLBACK = PFAX_ROUTING_INSTALLATION_CALLBACKW;
+ {$EXTERNALSYM PFAX_ROUTING_INSTALLATION_CALLBACK}
+ TFaxRoutingInstallationCallback = TFaxRoutingInstallationCallbackW;
+
+function FaxRegisterRoutingExtensionW(FaxHandle: HANDLE; ExtensionName, FriendlyName, ImageName: LPCWSTR; CallBack: PFAX_ROUTING_INSTALLATION_CALLBACKW; Context: LPVOID): BOOL; stdcall;
+{$EXTERNALSYM FaxRegisterRoutingExtensionW}
+
+function FaxRegisterRoutingExtension(FaxHandle: HANDLE; ExtensionName, FriendlyName, ImageName: LPCWSTR; CallBack: PFAX_ROUTING_INSTALLATION_CALLBACKW; Context: LPVOID): BOOL;
+{$EXTERNALSYM FaxRegisterRoutingExtension}
+
+function FaxUnregisterRoutingExtensionA(hFaxHandle: HANDLE; lpctstrExtensionName: LPCSTR): BOOL; stdcall;
+{$EXTERNALSYM FaxUnregisterRoutingExtensionA}
+function FaxUnregisterRoutingExtensionW(hFaxHandle: HANDLE; lpctstrExtensionName: LPCWSTR): BOOL; stdcall;
+{$EXTERNALSYM FaxUnregisterRoutingExtensionW}
+function FaxUnregisterRoutingExtension(hFaxHandle: HANDLE; lpctstrExtensionName: LPCTSTR): BOOL; stdcall;
+{$EXTERNALSYM FaxUnregisterRoutingExtension}
+
+function FaxAccessCheck(FaxHandle: HANDLE; AccessMask: DWORD): BOOL; stdcall;
+{$EXTERNALSYM FaxAccessCheck}
+
+//
+// Fax Specific Access Rights
+//
+
+const
+ FAX_JOB_SUBMIT = $0001;
+ {$EXTERNALSYM FAX_JOB_SUBMIT}
+ FAX_JOB_QUERY = $0002;
+ {$EXTERNALSYM FAX_JOB_QUERY}
+ FAX_CONFIG_QUERY = $0004;
+ {$EXTERNALSYM FAX_CONFIG_QUERY}
+ FAX_CONFIG_SET = $0008;
+ {$EXTERNALSYM FAX_CONFIG_SET}
+ FAX_PORT_QUERY = $0010;
+ {$EXTERNALSYM FAX_PORT_QUERY}
+ FAX_PORT_SET = $0020;
+ {$EXTERNALSYM FAX_PORT_SET}
+ FAX_JOB_MANAGE = $0040;
+ {$EXTERNALSYM FAX_JOB_MANAGE}
+
+ FAX_READ = STANDARD_RIGHTS_READ or FAX_JOB_QUERY or FAX_CONFIG_QUERY or FAX_PORT_QUERY;
+ {$EXTERNALSYM FAX_READ}
+
+ FAX_WRITE = STANDARD_RIGHTS_WRITE or FAX_JOB_SUBMIT ;
+ {$EXTERNALSYM FAX_WRITE}
+
+ FAX_ALL_ACCESS = STANDARD_RIGHTS_ALL or FAX_JOB_SUBMIT or FAX_JOB_QUERY or FAX_CONFIG_QUERY or
+ FAX_CONFIG_SET or FAX_PORT_QUERY or FAX_PORT_SET or FAX_JOB_MANAGE;
+ {$EXTERNALSYM FAX_ALL_ACCESS}
+
+implementation
+
+const
+ winfax = 'winfax.dll';
+ {$IFDEF UNICODE}
+ AWSuffix = 'W';
+ {$ELSE}
+ AWSuffix = 'A';
+ {$ENDIF UNICODE}
+
+function FaxConnectFaxServerA; external winfax name 'FaxConnectFaxServerA';
+function FaxConnectFaxServerW; external winfax name 'FaxConnectFaxServerW';
+function FaxConnectFaxServer; external winfax name 'FaxConnectFaxServer' + AWSuffix;
+function FaxClose; external winfax name 'FaxClose';
+function FaxOpenPort; external winfax name 'FaxOpenPort';
+function FaxCompleteJobParamsA; external winfax name 'FaxCompleteJobParamsA';
+function FaxCompleteJobParamsW; external winfax name 'FaxCompleteJobParamsW';
+function FaxCompleteJobParams; external winfax name 'FaxCompleteJobParams' + AWSuffix;
+function FaxSendDocumentA; external winfax name 'FaxSendDocumentA';
+function FaxSendDocumentW; external winfax name 'FaxSendDocumentW';
+function FaxSendDocument; external winfax name 'FaxSendDocument' + AWSuffix;
+function FaxSendDocumentForBroadcastA; external winfax name 'FaxSendDocumentForBroadcastA';
+function FaxSendDocumentForBroadcastW; external winfax name 'FaxSendDocumentForBroadcastW';
+function FaxSendDocumentForBroadcast; external winfax name 'FaxSendDocumentForBroadcast' + AWSuffix;
+function FaxEnumJobsA; external winfax name 'FaxEnumJobsA';
+function FaxEnumJobsW; external winfax name 'FaxEnumJobsW';
+function FaxEnumJobs; external winfax name 'FaxEnumJobs' + AWSuffix;
+function FaxGetJobA; external winfax name 'FaxGetJobA';
+function FaxGetJobW; external winfax name 'FaxGetJobW';
+function FaxGetJob; external winfax name 'FaxGetJob' + AWSuffix;
+function FaxSetJobA; external winfax name 'FaxSetJobA';
+function FaxSetJobW; external winfax name 'FaxSetJobW';
+function FaxSetJob; external winfax name 'FaxSetJob' + AWSuffix;
+function FaxGetPageData; external winfax name 'FaxGetPageData';
+function FaxGetDeviceStatusA; external winfax name 'FaxGetDeviceStatusA';
+function FaxGetDeviceStatusW; external winfax name 'FaxGetDeviceStatusW';
+function FaxGetDeviceStatus; external winfax name 'FaxGetDeviceStatus' + AWSuffix;
+function FaxAbort; external winfax name 'FaxAbort';
+function FaxGetConfigurationA; external winfax name 'FaxGetConfigurationA';
+function FaxGetConfigurationW; external winfax name 'FaxGetConfigurationW';
+function FaxGetConfiguration; external winfax name 'FaxGetConfiguration' + AWSuffix;
+function FaxSetConfigurationA; external winfax name 'FaxSetConfigurationA';
+function FaxSetConfigurationW; external winfax name 'FaxSetConfigurationW';
+function FaxSetConfiguration; external winfax name 'FaxSetConfiguration' + AWSuffix;
+function FaxGetLoggingCategoriesA; external winfax name 'FaxGetLoggingCategoriesA';
+function FaxGetLoggingCategoriesW; external winfax name 'FaxGetLoggingCategoriesW';
+function FaxGetLoggingCategories; external winfax name 'FaxGetLoggingCategories' + AWSuffix;
+function FaxSetLoggingCategoriesA; external winfax name 'FaxSetLoggingCategoriesA';
+function FaxSetLoggingCategoriesW; external winfax name 'FaxSetLoggingCategoriesW';
+function FaxSetLoggingCategories; external winfax name 'FaxSetLoggingCategories' + AWSuffix;
+function FaxEnumPortsA; external winfax name 'FaxEnumPortsA';
+function FaxEnumPortsW; external winfax name 'FaxEnumPortsW';
+function FaxEnumPorts; external winfax name 'FaxEnumPorts' + AWSuffix;
+function FaxGetPortA; external winfax name 'FaxGetPortA';
+function FaxGetPortW; external winfax name 'FaxGetPortW';
+function FaxGetPort; external winfax name 'FaxGetPort' + AWSuffix;
+function FaxSetPortA; external winfax name 'FaxSetPortA';
+function FaxSetPortW; external winfax name 'FaxSetPortW';
+function FaxSetPort; external winfax name 'FaxSetPort' + AWSuffix;
+function FaxEnumRoutingMethodsA; external winfax name 'FaxEnumRoutingMethodsA';
+function FaxEnumRoutingMethodsW; external winfax name 'FaxEnumRoutingMethodsW';
+function FaxEnumRoutingMethods; external winfax name 'FaxEnumRoutingMethods' + AWSuffix;
+function FaxEnableRoutingMethodA; external winfax name 'FaxEnableRoutingMethodA';
+function FaxEnableRoutingMethodW; external winfax name 'FaxEnableRoutingMethodW';
+function FaxEnableRoutingMethod; external winfax name 'FaxEnableRoutingMethod' + AWSuffix;
+function FaxEnumGlobalRoutingInfoA; external winfax name 'FaxEnumGlobalRoutingInfoA';
+function FaxEnumGlobalRoutingInfoW; external winfax name 'FaxEnumGlobalRoutingInfoW';
+function FaxEnumGlobalRoutingInfo; external winfax name 'FaxEnumGlobalRoutingInfo' + AWSuffix;
+function FaxSetGlobalRoutingInfoA; external winfax name 'FaxSetGlobalRoutingInfoA';
+function FaxSetGlobalRoutingInfoW; external winfax name 'FaxSetGlobalRoutingInfoW';
+function FaxSetGlobalRoutingInfo; external winfax name 'FaxSetGlobalRoutingInfo' + AWSuffix;
+function FaxGetRoutingInfoA; external winfax name 'FaxGetRoutingInfoA';
+function FaxGetRoutingInfoW; external winfax name 'FaxGetRoutingInfoW';
+function FaxGetRoutingInfo; external winfax name 'FaxGetRoutingInfo' + AWSuffix;
+function FaxSetRoutingInfoA; external winfax name 'FaxSetRoutingInfoA';
+function FaxSetRoutingInfoW; external winfax name 'FaxSetRoutingInfoW';
+function FaxSetRoutingInfo; external winfax name 'FaxSetRoutingInfo' + AWSuffix;
+function FaxInitializeEventQueue; external winfax name 'FaxInitializeEventQueue';
+procedure FaxFreeBuffer; external winfax name 'FaxFreeBuffer';
+function FaxStartPrintJobA; external winfax name 'FaxStartPrintJobA';
+function FaxStartPrintJobW; external winfax name 'FaxStartPrintJobW';
+function FaxStartPrintJob; external winfax name 'FaxStartPrintJob' + AWSuffix;
+function FaxPrintCoverPageA; external winfax name 'FaxPrintCoverPageA';
+function FaxPrintCoverPageW; external winfax name 'FaxPrintCoverPageW';
+function FaxPrintCoverPage; external winfax name 'FaxPrintCoverPage' + AWSuffix;
+function FaxRegisterServiceProviderW; external winfax name 'FaxRegisterServiceProviderW';
+
+function FaxRegisterServiceProvider(DeviceProvider: LPCWSTR; FriendlyName: LPCWSTR; ImageName: LPCWSTR; TspName: LPCWSTR): BOOL;
+begin
+ Result := FaxRegisterServiceProviderW(DeviceProvider, FriendlyName, ImageName, TspName);
+end;
+
+function FaxUnregisterServiceProviderW; external winfax name 'FaxUnregisterServiceProviderW';
+
+function FaxUnregisterServiceProvider(DeviceProvider: LPCWSTR): BOOL;
+begin
+ Result := FaxUnregisterServiceProviderW(DeviceProvider);
+end;
+
+function FaxRegisterRoutingExtensionW; external winfax name 'FaxRegisterRoutingExtensionW';
+
+function FaxRegisterRoutingExtension(FaxHandle: HANDLE; ExtensionName, FriendlyName, ImageName: LPCWSTR; CallBack: PFAX_ROUTING_INSTALLATION_CALLBACKW; Context: LPVOID): BOOL;
+begin
+ Result := FaxRegisterRoutingExtensionW(FaxHandle, ExtensionName, FriendlyName, ImageName, CallBack, Context);
+end;
+
+function FaxUnregisterRoutingExtensionA; external winfax name 'FaxUnregisterRoutingExtensionA';
+function FaxUnregisterRoutingExtensionW; external winfax name 'FaxUnregisterRoutingExtensionW';
+function FaxUnregisterRoutingExtension; external winfax name 'FaxUnregisterRoutingExtension' + AWSuffix;
+function FaxAccessCheck; external winfax name 'FaxAccessCheck';
+
+end.
diff --git a/packages/extra/winunits/jwawingdi.pas b/packages/extra/winunits/jwawingdi.pas
index 93d1aaa928..ce3a829525 100644
--- a/packages/extra/winunits/jwawingdi.pas
+++ b/packages/extra/winunits/jwawingdi.pas
@@ -1,13608 +1,13608 @@
-{******************************************************************************}
-{ }
-{ Graphics Device Interface API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: wingdi.h, released June 2000. The original Pascal }
-{ code is: WinGDI.pas, released December 2000. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwawingdi.pas,v 1.1 2005/04/04 07:56:11 marco Exp $
-
-unit JwaWinGDI;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "WinGDI.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaWinNT, JwaWinType;
-
-// Binary raster ops
-
-const
- R2_BLACK = 1; // 0
- {$EXTERNALSYM R2_BLACK}
- R2_NOTMERGEPEN = 2; // DPon
- {$EXTERNALSYM R2_NOTMERGEPEN}
- R2_MASKNOTPEN = 3; // DPna
- {$EXTERNALSYM R2_MASKNOTPEN}
- R2_NOTCOPYPEN = 4; // PN
- {$EXTERNALSYM R2_NOTCOPYPEN}
- R2_MASKPENNOT = 5; // PDna
- {$EXTERNALSYM R2_MASKPENNOT}
- R2_NOT = 6; // Dn
- {$EXTERNALSYM R2_NOT}
- R2_XORPEN = 7; // DPx
- {$EXTERNALSYM R2_XORPEN}
- R2_NOTMASKPEN = 8; // DPan
- {$EXTERNALSYM R2_NOTMASKPEN}
- R2_MASKPEN = 9; // DPa
- {$EXTERNALSYM R2_MASKPEN}
- R2_NOTXORPEN = 10; // DPxn
- {$EXTERNALSYM R2_NOTXORPEN}
- R2_NOP = 11; // D
- {$EXTERNALSYM R2_NOP}
- R2_MERGENOTPEN = 12; // DPno
- {$EXTERNALSYM R2_MERGENOTPEN}
- R2_COPYPEN = 13; // P
- {$EXTERNALSYM R2_COPYPEN}
- R2_MERGEPENNOT = 14; // PDno
- {$EXTERNALSYM R2_MERGEPENNOT}
- R2_MERGEPEN = 15; // DPo
- {$EXTERNALSYM R2_MERGEPEN}
- R2_WHITE = 16; // 1
- {$EXTERNALSYM R2_WHITE}
- R2_LAST = 16;
- {$EXTERNALSYM R2_LAST}
-
-// Ternary raster operations
-
- SRCCOPY = DWORD($00CC0020); // dest = source
- {$EXTERNALSYM SRCCOPY}
- SRCPAINT = DWORD($00EE0086); // dest = source OR dest
- {$EXTERNALSYM SRCPAINT}
- SRCAND = DWORD($008800C6); // dest = source AND dest
- {$EXTERNALSYM SRCAND}
- SRCINVERT = DWORD($00660046); // dest = source XOR dest
- {$EXTERNALSYM SRCINVERT}
- SRCERASE = DWORD($00440328); // dest = source AND (NOT dest )
- {$EXTERNALSYM SRCERASE}
- NOTSRCCOPY = DWORD($00330008); // dest = (NOT source)
- {$EXTERNALSYM NOTSRCCOPY}
- NOTSRCERASE = DWORD($001100A6); // dest = (NOT src) AND (NOT dest)
- {$EXTERNALSYM NOTSRCERASE}
- MERGECOPY = DWORD($00C000CA); // dest = (source AND pattern)
- {$EXTERNALSYM MERGECOPY}
- MERGEPAINT = DWORD($00BB0226); // dest = (NOT source) OR dest
- {$EXTERNALSYM MERGEPAINT}
- PATCOPY = DWORD($00F00021); // dest = pattern
- {$EXTERNALSYM PATCOPY}
- PATPAINT = DWORD($00FB0A09); // dest = DPSnoo
- {$EXTERNALSYM PATPAINT}
- PATINVERT = DWORD($005A0049); // dest = pattern XOR dest
- {$EXTERNALSYM PATINVERT}
- DSTINVERT = DWORD($00550009); // dest = (NOT dest)
- {$EXTERNALSYM DSTINVERT}
- BLACKNESS = DWORD($00000042); // dest = BLACK
- {$EXTERNALSYM BLACKNESS}
- WHITENESS = DWORD($00FF0062); // dest = WHITE
- {$EXTERNALSYM WHITENESS}
-
- NOMIRRORBITMAP = DWORD($80000000); // Do not Mirror the bitmap in this call
- {$EXTERNALSYM NOMIRRORBITMAP}
- CAPTUREBLT = DWORD($40000000); // Include layered windows
- {$EXTERNALSYM CAPTUREBLT}
-
-// Quaternary raster codes
-
-function MAKEROP4(Fore, Back: DWORD): DWORD;
-{$EXTERNALSYM MAKEROP4}
-
-const
- GDI_ERROR = DWORD($FFFFFFFF);
- {$EXTERNALSYM GDI_ERROR}
- HGDI_ERROR = HANDLE($FFFFFFFF);
- {$EXTERNALSYM HGDI_ERROR}
-
-// Region Flags
-
- ERROR = 0;
- {$EXTERNALSYM ERROR}
- NULLREGION = 1;
- {$EXTERNALSYM NULLREGION}
- SIMPLEREGION = 2;
- {$EXTERNALSYM SIMPLEREGION}
- COMPLEXREGION = 3;
- {$EXTERNALSYM COMPLEXREGION}
- RGN_ERROR = ERROR;
- {$EXTERNALSYM RGN_ERROR}
-
-// CombineRgn() Styles
-
- RGN_AND = 1;
- {$EXTERNALSYM RGN_AND}
- RGN_OR = 2;
- {$EXTERNALSYM RGN_OR}
- RGN_XOR = 3;
- {$EXTERNALSYM RGN_XOR}
- RGN_DIFF = 4;
- {$EXTERNALSYM RGN_DIFF}
- RGN_COPY = 5;
- {$EXTERNALSYM RGN_COPY}
- RGN_MIN = RGN_AND;
- {$EXTERNALSYM RGN_MIN}
- RGN_MAX = RGN_COPY;
- {$EXTERNALSYM RGN_MAX}
-
-// StretchBlt() Modes
-
- BLACKONWHITE = 1;
- {$EXTERNALSYM BLACKONWHITE}
- WHITEONBLACK = 2;
- {$EXTERNALSYM WHITEONBLACK}
- COLORONCOLOR = 3;
- {$EXTERNALSYM COLORONCOLOR}
- HALFTONE = 4;
- {$EXTERNALSYM HALFTONE}
- MAXSTRETCHBLTMODE = 4;
- {$EXTERNALSYM MAXSTRETCHBLTMODE}
-
-// New StretchBlt() Modes
-
- STRETCH_ANDSCANS = BLACKONWHITE;
- {$EXTERNALSYM STRETCH_ANDSCANS}
- STRETCH_ORSCANS = WHITEONBLACK;
- {$EXTERNALSYM STRETCH_ORSCANS}
- STRETCH_DELETESCANS = COLORONCOLOR;
- {$EXTERNALSYM STRETCH_DELETESCANS}
- STRETCH_HALFTONE = HALFTONE;
- {$EXTERNALSYM STRETCH_HALFTONE}
-
-// PolyFill() Modes
-
- ALTERNATE = 1;
- {$EXTERNALSYM ALTERNATE}
- WINDING = 2;
- {$EXTERNALSYM WINDING}
- POLYFILL_LAST = 2;
- {$EXTERNALSYM POLYFILL_LAST}
-
-// Layout Orientation Options
-
- LAYOUT_RTL = $00000001; // Right to left
- {$EXTERNALSYM LAYOUT_RTL}
- LAYOUT_BTT = $00000002; // Bottom to top
- {$EXTERNALSYM LAYOUT_BTT}
- LAYOUT_VBH = $00000004; // Vertical before horizontal
- {$EXTERNALSYM LAYOUT_VBH}
- LAYOUT_ORIENTATIONMASK = LAYOUT_RTL or LAYOUT_BTT or LAYOUT_VBH;
- {$EXTERNALSYM LAYOUT_ORIENTATIONMASK}
- LAYOUT_BITMAPORIENTATIONPRESERVED = $00000008;
- {$EXTERNALSYM LAYOUT_BITMAPORIENTATIONPRESERVED}
-
-// Text Alignment Options
-
- TA_NOUPDATECP = 0;
- {$EXTERNALSYM TA_NOUPDATECP}
- TA_UPDATECP = 1;
- {$EXTERNALSYM TA_UPDATECP}
-
- TA_LEFT = 0;
- {$EXTERNALSYM TA_LEFT}
- TA_RIGHT = 2;
- {$EXTERNALSYM TA_RIGHT}
- TA_CENTER = 6;
- {$EXTERNALSYM TA_CENTER}
-
- TA_TOP = 0;
- {$EXTERNALSYM TA_TOP}
- TA_BOTTOM = 8;
- {$EXTERNALSYM TA_BOTTOM}
- TA_BASELINE = 24;
- {$EXTERNALSYM TA_BASELINE}
-
- TA_RTLREADING = 256;
- {$EXTERNALSYM TA_RTLREADING}
-
- TA_MASK = TA_BASELINE + TA_CENTER + TA_UPDATECP + TA_RTLREADING;
- {$EXTERNALSYM TA_MASK}
-
- VTA_BASELINE = TA_BASELINE;
- {$EXTERNALSYM VTA_BASELINE}
- VTA_LEFT = TA_BOTTOM;
- {$EXTERNALSYM VTA_LEFT}
- VTA_RIGHT = TA_TOP;
- {$EXTERNALSYM VTA_RIGHT}
- VTA_CENTER = TA_CENTER;
- {$EXTERNALSYM VTA_CENTER}
- VTA_BOTTOM = TA_RIGHT;
- {$EXTERNALSYM VTA_BOTTOM}
- VTA_TOP = TA_LEFT;
- {$EXTERNALSYM VTA_TOP}
-
- ETO_OPAQUE = $0002;
- {$EXTERNALSYM ETO_OPAQUE}
- ETO_CLIPPED = $0004;
- {$EXTERNALSYM ETO_CLIPPED}
-
- ETO_GLYPH_INDEX = $0010;
- {$EXTERNALSYM ETO_GLYPH_INDEX}
- ETO_RTLREADING = $0080;
- {$EXTERNALSYM ETO_RTLREADING}
- ETO_NUMERICSLOCAL = $0400;
- {$EXTERNALSYM ETO_NUMERICSLOCAL}
- ETO_NUMERICSLATIN = $0800;
- {$EXTERNALSYM ETO_NUMERICSLATIN}
- ETO_IGNORELANGUAGE = $1000;
- {$EXTERNALSYM ETO_IGNORELANGUAGE}
-
- ETO_PDY = $2000;
- {$EXTERNALSYM ETO_PDY}
-
- ASPECT_FILTERING = $0001;
- {$EXTERNALSYM ASPECT_FILTERING}
-
-// Bounds Accumulation APIs
-
- DCB_RESET = $0001;
- {$EXTERNALSYM DCB_RESET}
- DCB_ACCUMULATE = $0002;
- {$EXTERNALSYM DCB_ACCUMULATE}
- DCB_DIRTY = DCB_ACCUMULATE;
- {$EXTERNALSYM DCB_DIRTY}
- DCB_SET = DCB_RESET or DCB_ACCUMULATE;
- {$EXTERNALSYM DCB_SET}
- DCB_ENABLE = $0004;
- {$EXTERNALSYM DCB_ENABLE}
- DCB_DISABLE = $0008;
- {$EXTERNALSYM DCB_DISABLE}
-
-// Metafile Functions
-
- META_SETBKCOLOR = $0201;
- {$EXTERNALSYM META_SETBKCOLOR}
- META_SETBKMODE = $0102;
- {$EXTERNALSYM META_SETBKMODE}
- META_SETMAPMODE = $0103;
- {$EXTERNALSYM META_SETMAPMODE}
- META_SETROP2 = $0104;
- {$EXTERNALSYM META_SETROP2}
- META_SETRELABS = $0105;
- {$EXTERNALSYM META_SETRELABS}
- META_SETPOLYFILLMODE = $0106;
- {$EXTERNALSYM META_SETPOLYFILLMODE}
- META_SETSTRETCHBLTMODE = $0107;
- {$EXTERNALSYM META_SETSTRETCHBLTMODE}
- META_SETTEXTCHAREXTRA = $0108;
- {$EXTERNALSYM META_SETTEXTCHAREXTRA}
- META_SETTEXTCOLOR = $0209;
- {$EXTERNALSYM META_SETTEXTCOLOR}
- META_SETTEXTJUSTIFICATION = $020A;
- {$EXTERNALSYM META_SETTEXTJUSTIFICATION}
- META_SETWINDOWORG = $020B;
- {$EXTERNALSYM META_SETWINDOWORG}
- META_SETWINDOWEXT = $020C;
- {$EXTERNALSYM META_SETWINDOWEXT}
- META_SETVIEWPORTORG = $020D;
- {$EXTERNALSYM META_SETVIEWPORTORG}
- META_SETVIEWPORTEXT = $020E;
- {$EXTERNALSYM META_SETVIEWPORTEXT}
- META_OFFSETWINDOWORG = $020F;
- {$EXTERNALSYM META_OFFSETWINDOWORG}
- META_SCALEWINDOWEXT = $0410;
- {$EXTERNALSYM META_SCALEWINDOWEXT}
- META_OFFSETVIEWPORTORG = $0211;
- {$EXTERNALSYM META_OFFSETVIEWPORTORG}
- META_SCALEVIEWPORTEXT = $0412;
- {$EXTERNALSYM META_SCALEVIEWPORTEXT}
- META_LINETO = $0213;
- {$EXTERNALSYM META_LINETO}
- META_MOVETO = $0214;
- {$EXTERNALSYM META_MOVETO}
- META_EXCLUDECLIPRECT = $0415;
- {$EXTERNALSYM META_EXCLUDECLIPRECT}
- META_INTERSECTCLIPRECT = $0416;
- {$EXTERNALSYM META_INTERSECTCLIPRECT}
- META_ARC = $0817;
- {$EXTERNALSYM META_ARC}
- META_ELLIPSE = $0418;
- {$EXTERNALSYM META_ELLIPSE}
- META_FLOODFILL = $0419;
- {$EXTERNALSYM META_FLOODFILL}
- META_PIE = $081A;
- {$EXTERNALSYM META_PIE}
- META_RECTANGLE = $041B;
- {$EXTERNALSYM META_RECTANGLE}
- META_ROUNDRECT = $061C;
- {$EXTERNALSYM META_ROUNDRECT}
- META_PATBLT = $061D;
- {$EXTERNALSYM META_PATBLT}
- META_SAVEDC = $001E;
- {$EXTERNALSYM META_SAVEDC}
- META_SETPIXEL = $041F;
- {$EXTERNALSYM META_SETPIXEL}
- META_OFFSETCLIPRGN = $0220;
- {$EXTERNALSYM META_OFFSETCLIPRGN}
- META_TEXTOUT = $0521;
- {$EXTERNALSYM META_TEXTOUT}
- META_BITBLT = $0922;
- {$EXTERNALSYM META_BITBLT}
- META_STRETCHBLT = $0B23;
- {$EXTERNALSYM META_STRETCHBLT}
- META_POLYGON = $0324;
- {$EXTERNALSYM META_POLYGON}
- META_POLYLINE = $0325;
- {$EXTERNALSYM META_POLYLINE}
- META_ESCAPE = $0626;
- {$EXTERNALSYM META_ESCAPE}
- META_RESTOREDC = $0127;
- {$EXTERNALSYM META_RESTOREDC}
- META_FILLREGION = $0228;
- {$EXTERNALSYM META_FILLREGION}
- META_FRAMEREGION = $0429;
- {$EXTERNALSYM META_FRAMEREGION}
- META_INVERTREGION = $012A;
- {$EXTERNALSYM META_INVERTREGION}
- META_PAINTREGION = $012B;
- {$EXTERNALSYM META_PAINTREGION}
- META_SELECTCLIPREGION = $012C;
- {$EXTERNALSYM META_SELECTCLIPREGION}
- META_SELECTOBJECT = $012D;
- {$EXTERNALSYM META_SELECTOBJECT}
- META_SETTEXTALIGN = $012E;
- {$EXTERNALSYM META_SETTEXTALIGN}
- META_CHORD = $0830;
- {$EXTERNALSYM META_CHORD}
- META_SETMAPPERFLAGS = $0231;
- {$EXTERNALSYM META_SETMAPPERFLAGS}
- META_EXTTEXTOUT = $0a32;
- {$EXTERNALSYM META_EXTTEXTOUT}
- META_SETDIBTODEV = $0d33;
- {$EXTERNALSYM META_SETDIBTODEV}
- META_SELECTPALETTE = $0234;
- {$EXTERNALSYM META_SELECTPALETTE}
- META_REALIZEPALETTE = $0035;
- {$EXTERNALSYM META_REALIZEPALETTE}
- META_ANIMATEPALETTE = $0436;
- {$EXTERNALSYM META_ANIMATEPALETTE}
- META_SETPALENTRIES = $0037;
- {$EXTERNALSYM META_SETPALENTRIES}
- META_POLYPOLYGON = $0538;
- {$EXTERNALSYM META_POLYPOLYGON}
- META_RESIZEPALETTE = $0139;
- {$EXTERNALSYM META_RESIZEPALETTE}
- META_DIBBITBLT = $0940;
- {$EXTERNALSYM META_DIBBITBLT}
- META_DIBSTRETCHBLT = $0b41;
- {$EXTERNALSYM META_DIBSTRETCHBLT}
- META_DIBCREATEPATTERNBRUSH = $0142;
- {$EXTERNALSYM META_DIBCREATEPATTERNBRUSH}
- META_STRETCHDIB = $0f43;
- {$EXTERNALSYM META_STRETCHDIB}
- META_EXTFLOODFILL = $0548;
- {$EXTERNALSYM META_EXTFLOODFILL}
- META_SETLAYOUT = $0149;
- {$EXTERNALSYM META_SETLAYOUT}
- META_DELETEOBJECT = $01f0;
- {$EXTERNALSYM META_DELETEOBJECT}
- META_CREATEPALETTE = $00f7;
- {$EXTERNALSYM META_CREATEPALETTE}
- META_CREATEPATTERNBRUSH = $01F9;
- {$EXTERNALSYM META_CREATEPATTERNBRUSH}
- META_CREATEPENINDIRECT = $02FA;
- {$EXTERNALSYM META_CREATEPENINDIRECT}
- META_CREATEFONTINDIRECT = $02FB;
- {$EXTERNALSYM META_CREATEFONTINDIRECT}
- META_CREATEBRUSHINDIRECT = $02FC;
- {$EXTERNALSYM META_CREATEBRUSHINDIRECT}
- META_CREATEREGION = $06FF;
- {$EXTERNALSYM META_CREATEREGION}
-
-type
- PDrawPatRect = ^TDrawPatRect;
- _DRAWPATRECT = record
- ptPosition: POINT;
- ptSize: POINT;
- wStyle: WORD;
- wPattern: WORD;
- end;
- {$EXTERNALSYM _DRAWPATRECT}
- DRAWPATRECT = _DRAWPATRECT;
- {$EXTERNALSYM DRAWPATRECT}
- TDrawPatRect = _DRAWPATRECT;
-
-// GDI Escapes
-
-const
- NEWFRAME = 1;
- {$EXTERNALSYM NEWFRAME}
- _ABORTDOC = 2; // Underscore prfix by translator (nameclash)
- {$EXTERNALSYM ABORTDOC}
- NEXTBAND = 3;
- {$EXTERNALSYM NEXTBAND}
- SETCOLORTABLE = 4;
- {$EXTERNALSYM SETCOLORTABLE}
- GETCOLORTABLE = 5;
- {$EXTERNALSYM GETCOLORTABLE}
- FLUSHOUTPUT = 6;
- {$EXTERNALSYM FLUSHOUTPUT}
- DRAFTMODE = 7;
- {$EXTERNALSYM DRAFTMODE}
- QUERYESCSUPPORT = 8;
- {$EXTERNALSYM QUERYESCSUPPORT}
- SETABORTPROC_ = 9; // Underscore prfix by translator (nameclash)
- {$EXTERNALSYM SETABORTPROC}
- STARTDOC_ = 10; // Underscore prfix by translator (nameclash)
- {$EXTERNALSYM STARTDOC}
- ENDDOC_ = 11; // Underscore prfix by translator (nameclash)
- {$EXTERNALSYM ENDDOC}
- GETPHYSPAGESIZE = 12;
- {$EXTERNALSYM GETPHYSPAGESIZE}
- GETPRINTINGOFFSET = 13;
- {$EXTERNALSYM GETPRINTINGOFFSET}
- GETSCALINGFACTOR = 14;
- {$EXTERNALSYM GETSCALINGFACTOR}
- MFCOMMENT = 15;
- {$EXTERNALSYM MFCOMMENT}
- GETPENWIDTH = 16;
- {$EXTERNALSYM GETPENWIDTH}
- SETCOPYCOUNT = 17;
- {$EXTERNALSYM SETCOPYCOUNT}
- SELECTPAPERSOURCE = 18;
- {$EXTERNALSYM SELECTPAPERSOURCE}
- DEVICEDATA = 19;
- {$EXTERNALSYM DEVICEDATA}
- PASSTHROUGH = 19;
- {$EXTERNALSYM PASSTHROUGH}
- GETTECHNOLGY = 20;
- {$EXTERNALSYM GETTECHNOLGY}
- GETTECHNOLOGY = 20;
- {$EXTERNALSYM GETTECHNOLOGY}
- SETLINECAP = 21;
- {$EXTERNALSYM SETLINECAP}
- SETLINEJOIN = 22;
- {$EXTERNALSYM SETLINEJOIN}
- SETMITERLIMIT_ = 23; // underscore prefix by translator (nameclash)
- {$EXTERNALSYM SETMITERLIMIT}
- BANDINFO = 24;
- {$EXTERNALSYM BANDINFO}
- DRAWPATTERNRECT = 25;
- {$EXTERNALSYM DRAWPATTERNRECT}
- GETVECTORPENSIZE = 26;
- {$EXTERNALSYM GETVECTORPENSIZE}
- GETVECTORBRUSHSIZE = 27;
- {$EXTERNALSYM GETVECTORBRUSHSIZE}
- ENABLEDUPLEX = 28;
- {$EXTERNALSYM ENABLEDUPLEX}
- GETSETPAPERBINS = 29;
- {$EXTERNALSYM GETSETPAPERBINS}
- GETSETPRINTORIENT = 30;
- {$EXTERNALSYM GETSETPRINTORIENT}
- ENUMPAPERBINS = 31;
- {$EXTERNALSYM ENUMPAPERBINS}
- SETDIBSCALING = 32;
- {$EXTERNALSYM SETDIBSCALING}
- EPSPRINTING = 33;
- {$EXTERNALSYM EPSPRINTING}
- ENUMPAPERMETRICS = 34;
- {$EXTERNALSYM ENUMPAPERMETRICS}
- GETSETPAPERMETRICS = 35;
- {$EXTERNALSYM GETSETPAPERMETRICS}
- POSTSCRIPT_DATA = 37;
- {$EXTERNALSYM POSTSCRIPT_DATA}
- POSTSCRIPT_IGNORE = 38;
- {$EXTERNALSYM POSTSCRIPT_IGNORE}
- MOUSETRAILS = 39;
- {$EXTERNALSYM MOUSETRAILS}
- GETDEVICEUNITS = 42;
- {$EXTERNALSYM GETDEVICEUNITS}
-
- GETEXTENDEDTEXTMETRICS = 256;
- {$EXTERNALSYM GETEXTENDEDTEXTMETRICS}
- GETEXTENTTABLE = 257;
- {$EXTERNALSYM GETEXTENTTABLE}
- GETPAIRKERNTABLE = 258;
- {$EXTERNALSYM GETPAIRKERNTABLE}
- GETTRACKKERNTABLE = 259;
- {$EXTERNALSYM GETTRACKKERNTABLE}
- EXTTEXTOUT_ = 512; // underscore prefix by translator (nameclash)
- {$EXTERNALSYM EXTTEXTOUT}
- GETFACENAME = 513;
- {$EXTERNALSYM GETFACENAME}
- DOWNLOADFACE = 514;
- {$EXTERNALSYM DOWNLOADFACE}
- ENABLERELATIVEWIDTHS = 768;
- {$EXTERNALSYM ENABLERELATIVEWIDTHS}
- ENABLEPAIRKERNING = 769;
- {$EXTERNALSYM ENABLEPAIRKERNING}
- SETKERNTRACK = 770;
- {$EXTERNALSYM SETKERNTRACK}
- SETALLJUSTVALUES = 771;
- {$EXTERNALSYM SETALLJUSTVALUES}
- SETCHARSET = 772;
- {$EXTERNALSYM SETCHARSET}
-
- STRETCHBLT_ESCAPE = 2048; // suffix _ESCAPE by translator because of
- // name-clash with StretchBlt function
- {$EXTERNALSYM STRETCHBLT}
- METAFILE_DRIVER = 2049;
- {$EXTERNALSYM METAFILE_DRIVER}
- GETSETSCREENPARAMS = 3072;
- {$EXTERNALSYM GETSETSCREENPARAMS}
- QUERYDIBSUPPORT = 3073;
- {$EXTERNALSYM QUERYDIBSUPPORT}
- BEGIN_PATH = 4096;
- {$EXTERNALSYM BEGIN_PATH}
- CLIP_TO_PATH = 4097;
- {$EXTERNALSYM CLIP_TO_PATH}
- END_PATH = 4098;
- {$EXTERNALSYM END_PATH}
- EXT_DEVICE_CAPS = 4099;
- {$EXTERNALSYM EXT_DEVICE_CAPS}
- RESTORE_CTM = 4100;
- {$EXTERNALSYM RESTORE_CTM}
- SAVE_CTM = 4101;
- {$EXTERNALSYM SAVE_CTM}
- SET_ARC_DIRECTION = 4102;
- {$EXTERNALSYM SET_ARC_DIRECTION}
- SET_BACKGROUND_COLOR = 4103;
- {$EXTERNALSYM SET_BACKGROUND_COLOR}
- SET_POLY_MODE = 4104;
- {$EXTERNALSYM SET_POLY_MODE}
- SET_SCREEN_ANGLE = 4105;
- {$EXTERNALSYM SET_SCREEN_ANGLE}
- SET_SPREAD = 4106;
- {$EXTERNALSYM SET_SPREAD}
- TRANSFORM_CTM = 4107;
- {$EXTERNALSYM TRANSFORM_CTM}
- SET_CLIP_BOX = 4108;
- {$EXTERNALSYM SET_CLIP_BOX}
- SET_BOUNDS = 4109;
- {$EXTERNALSYM SET_BOUNDS}
- SET_MIRROR_MODE = 4110;
- {$EXTERNALSYM SET_MIRROR_MODE}
- OPENCHANNEL = 4110;
- {$EXTERNALSYM OPENCHANNEL}
- DOWNLOADHEADER = 4111;
- {$EXTERNALSYM DOWNLOADHEADER}
- CLOSECHANNEL = 4112;
- {$EXTERNALSYM CLOSECHANNEL}
- POSTSCRIPT_PASSTHROUGH = 4115;
- {$EXTERNALSYM POSTSCRIPT_PASSTHROUGH}
- ENCAPSULATED_POSTSCRIPT = 4116;
- {$EXTERNALSYM ENCAPSULATED_POSTSCRIPT}
-
- POSTSCRIPT_IDENTIFY = 4117; // new escape for NT5 pscript driver
- {$EXTERNALSYM POSTSCRIPT_IDENTIFY}
- POSTSCRIPT_INJECTION = 4118; // new escape for NT5 pscript driver
- {$EXTERNALSYM POSTSCRIPT_INJECTION}
-
- CHECKJPEGFORMAT = 4119;
- {$EXTERNALSYM CHECKJPEGFORMAT}
- CHECKPNGFORMAT = 4120;
- {$EXTERNALSYM CHECKPNGFORMAT}
-
- GET_PS_FEATURESETTING = 4121; // new escape for NT5 pscript driver
- {$EXTERNALSYM GET_PS_FEATURESETTING}
-
- SPCLPASSTHROUGH2 = 4568; // new escape for NT5 pscript driver
- {$EXTERNALSYM SPCLPASSTHROUGH2}
-
-//
-// Parameters for POSTSCRIPT_IDENTIFY escape
-//
-
- PSIDENT_GDICENTRIC = 0;
- {$EXTERNALSYM PSIDENT_GDICENTRIC}
- PSIDENT_PSCENTRIC = 1;
- {$EXTERNALSYM PSIDENT_PSCENTRIC}
-
-//
-// Header structure for the input buffer to POSTSCRIPT_INJECTION escape
-//
-
-type
- PPsInjectData = ^TPsInjectData;
- _PSINJECTDATA = record
- DataBytes: DWORD; // number of raw data bytes (NOT including this header)
- InjectionPoint: WORD; // injection point
- PageNumber: WORD; // page number to apply the injection
- // Followed by raw data to be injected
- end;
- {$EXTERNALSYM _PSINJECTDATA}
- PSINJECTDATA = _PSINJECTDATA;
- {$EXTERNALSYM PSINJECTDATA}
- TPsInjectData = _PSINJECTDATA;
-
-//
-// Constants for PSINJECTDATA.InjectionPoint field
-//
-
-const
- PSINJECT_BEGINSTREAM = 1;
- {$EXTERNALSYM PSINJECT_BEGINSTREAM}
- PSINJECT_PSADOBE = 2;
- {$EXTERNALSYM PSINJECT_PSADOBE}
- PSINJECT_PAGESATEND = 3;
- {$EXTERNALSYM PSINJECT_PAGESATEND}
- PSINJECT_PAGES = 4;
- {$EXTERNALSYM PSINJECT_PAGES}
-
- PSINJECT_DOCNEEDEDRES = 5;
- {$EXTERNALSYM PSINJECT_DOCNEEDEDRES}
- PSINJECT_DOCSUPPLIEDRES = 6;
- {$EXTERNALSYM PSINJECT_DOCSUPPLIEDRES}
- PSINJECT_PAGEORDER = 7;
- {$EXTERNALSYM PSINJECT_PAGEORDER}
- PSINJECT_ORIENTATION = 8;
- {$EXTERNALSYM PSINJECT_ORIENTATION}
- PSINJECT_BOUNDINGBOX = 9;
- {$EXTERNALSYM PSINJECT_BOUNDINGBOX}
- PSINJECT_DOCUMENTPROCESSCOLORS = 10;
- {$EXTERNALSYM PSINJECT_DOCUMENTPROCESSCOLORS}
-
- PSINJECT_COMMENTS = 11;
- {$EXTERNALSYM PSINJECT_COMMENTS}
- PSINJECT_BEGINDEFAULTS = 12;
- {$EXTERNALSYM PSINJECT_BEGINDEFAULTS}
- PSINJECT_ENDDEFAULTS = 13;
- {$EXTERNALSYM PSINJECT_ENDDEFAULTS}
- PSINJECT_BEGINPROLOG = 14;
- {$EXTERNALSYM PSINJECT_BEGINPROLOG}
- PSINJECT_ENDPROLOG = 15;
- {$EXTERNALSYM PSINJECT_ENDPROLOG}
- PSINJECT_BEGINSETUP = 16;
- {$EXTERNALSYM PSINJECT_BEGINSETUP}
- PSINJECT_ENDSETUP = 17;
- {$EXTERNALSYM PSINJECT_ENDSETUP}
- PSINJECT_TRAILER = 18;
- {$EXTERNALSYM PSINJECT_TRAILER}
- PSINJECT_EOF = 19;
- {$EXTERNALSYM PSINJECT_EOF}
- PSINJECT_ENDSTREAM = 20;
- {$EXTERNALSYM PSINJECT_ENDSTREAM}
- PSINJECT_DOCUMENTPROCESSCOLORSATEND = 21;
- {$EXTERNALSYM PSINJECT_DOCUMENTPROCESSCOLORSATEND}
-
- PSINJECT_PAGENUMBER = 100;
- {$EXTERNALSYM PSINJECT_PAGENUMBER}
- PSINJECT_BEGINPAGESETUP = 101;
- {$EXTERNALSYM PSINJECT_BEGINPAGESETUP}
- PSINJECT_ENDPAGESETUP = 102;
- {$EXTERNALSYM PSINJECT_ENDPAGESETUP}
- PSINJECT_PAGETRAILER = 103;
- {$EXTERNALSYM PSINJECT_PAGETRAILER}
- PSINJECT_PLATECOLOR = 104;
- {$EXTERNALSYM PSINJECT_PLATECOLOR}
-
- PSINJECT_SHOWPAGE = 105;
- {$EXTERNALSYM PSINJECT_SHOWPAGE}
- PSINJECT_PAGEBBOX = 106;
- {$EXTERNALSYM PSINJECT_PAGEBBOX}
- PSINJECT_ENDPAGECOMMENTS = 107;
- {$EXTERNALSYM PSINJECT_ENDPAGECOMMENTS}
-
- PSINJECT_VMSAVE = 200;
- {$EXTERNALSYM PSINJECT_VMSAVE}
- PSINJECT_VMRESTORE = 201;
- {$EXTERNALSYM PSINJECT_VMRESTORE}
-
-//
-// Parameter for GET_PS_FEATURESETTING escape
-//
-
- FEATURESETTING_NUP = 0;
- {$EXTERNALSYM FEATURESETTING_NUP}
- FEATURESETTING_OUTPUT = 1;
- {$EXTERNALSYM FEATURESETTING_OUTPUT}
- FEATURESETTING_PSLEVEL = 2;
- {$EXTERNALSYM FEATURESETTING_PSLEVEL}
- FEATURESETTING_CUSTPAPER = 3;
- {$EXTERNALSYM FEATURESETTING_CUSTPAPER}
- FEATURESETTING_MIRROR = 4;
- {$EXTERNALSYM FEATURESETTING_MIRROR}
- FEATURESETTING_NEGATIVE = 5;
- {$EXTERNALSYM FEATURESETTING_NEGATIVE}
- FEATURESETTING_PROTOCOL = 6;
- {$EXTERNALSYM FEATURESETTING_PROTOCOL}
-
-//
-// The range of selectors between FEATURESETTING_PRIVATE_BEGIN and
-// FEATURESETTING_PRIVATE_END is reserved by Microsoft for private use
-//
-
- FEATURESETTING_PRIVATE_BEGIN = $1000;
- {$EXTERNALSYM FEATURESETTING_PRIVATE_BEGIN}
- FEATURESETTING_PRIVATE_END = $1FFF;
- {$EXTERNALSYM FEATURESETTING_PRIVATE_END}
-
-//
-// Information about output options
-//
-
-type
- PPsFeatureOutput = ^TPsFeatureOutput;
- _PSFEATURE_OUTPUT = record
- bPageIndependent: BOOL;
- bSetPageDevice: BOOL;
- end;
- {$EXTERNALSYM _PSFEATURE_OUTPUT}
- PSFEATURE_OUTPUT = _PSFEATURE_OUTPUT;
- {$EXTERNALSYM PSFEATURE_OUTPUT}
- PPSFEATURE_OUTPUT = ^PSFEATURE_OUTPUT;
- {$EXTERNALSYM PPSFEATURE_OUTPUT}
- TPsFeatureOutput = _PSFEATURE_OUTPUT;
-
-//
-// Information about custom paper size
-//
-
- PPsFeatureCustPaper = ^TPsFeatureCustPaper;
- _PSFEATURE_CUSTPAPER = record
- lOrientation: LONG;
- lWidth: LONG;
- lHeight: LONG;
- lWidthOffset: LONG;
- lHeightOffset: LONG;
- end;
- {$EXTERNALSYM _PSFEATURE_CUSTPAPER}
- PSFEATURE_CUSTPAPER = _PSFEATURE_CUSTPAPER;
- {$EXTERNALSYM PSFEATURE_CUSTPAPER}
- PPSFEATURE_CUSTPAPER = ^PSFEATURE_CUSTPAPER;
- {$EXTERNALSYM PPSFEATURE_CUSTPAPER}
- TPsFeatureCustPaper = _PSFEATURE_CUSTPAPER;
-
-// Value returned for FEATURESETTING_PROTOCOL
-
-const
- PSPROTOCOL_ASCII = 0;
- {$EXTERNALSYM PSPROTOCOL_ASCII}
- PSPROTOCOL_BCP = 1;
- {$EXTERNALSYM PSPROTOCOL_BCP}
- PSPROTOCOL_TBCP = 2;
- {$EXTERNALSYM PSPROTOCOL_TBCP}
- PSPROTOCOL_BINARY = 3;
- {$EXTERNALSYM PSPROTOCOL_BINARY}
-
-// Flag returned from QUERYDIBSUPPORT
-
- QDI_SETDIBITS = 1;
- {$EXTERNALSYM QDI_SETDIBITS}
- QDI_GETDIBITS = 2;
- {$EXTERNALSYM QDI_GETDIBITS}
- QDI_DIBTOSCREEN = 4;
- {$EXTERNALSYM QDI_DIBTOSCREEN}
- QDI_STRETCHDIB = 8;
- {$EXTERNALSYM QDI_STRETCHDIB}
-
-// Spooler Error Codes
-
- SP_NOTREPORTED = $4000;
- {$EXTERNALSYM SP_NOTREPORTED}
- SP_ERROR = DWORD(-1);
- {$EXTERNALSYM SP_ERROR}
- SP_APPABORT = DWORD(-2);
- {$EXTERNALSYM SP_APPABORT}
- SP_USERABORT = DWORD(-3);
- {$EXTERNALSYM SP_USERABORT}
- SP_OUTOFDISK = DWORD(-4);
- {$EXTERNALSYM SP_OUTOFDISK}
- SP_OUTOFMEMORY = DWORD(-5);
- {$EXTERNALSYM SP_OUTOFMEMORY}
-
- PR_JOBSTATUS = $0000;
- {$EXTERNALSYM PR_JOBSTATUS}
-
-// Object Definitions for EnumObjects()
-
- OBJ_PEN = 1;
- {$EXTERNALSYM OBJ_PEN}
- OBJ_BRUSH = 2;
- {$EXTERNALSYM OBJ_BRUSH}
- OBJ_DC = 3;
- {$EXTERNALSYM OBJ_DC}
- OBJ_METADC = 4;
- {$EXTERNALSYM OBJ_METADC}
- OBJ_PAL = 5;
- {$EXTERNALSYM OBJ_PAL}
- OBJ_FONT = 6;
- {$EXTERNALSYM OBJ_FONT}
- OBJ_BITMAP = 7;
- {$EXTERNALSYM OBJ_BITMAP}
- OBJ_REGION = 8;
- {$EXTERNALSYM OBJ_REGION}
- OBJ_METAFILE = 9;
- {$EXTERNALSYM OBJ_METAFILE}
- OBJ_MEMDC = 10;
- {$EXTERNALSYM OBJ_MEMDC}
- OBJ_EXTPEN = 11;
- {$EXTERNALSYM OBJ_EXTPEN}
- OBJ_ENHMETADC = 12;
- {$EXTERNALSYM OBJ_ENHMETADC}
- OBJ_ENHMETAFILE = 13;
- {$EXTERNALSYM OBJ_ENHMETAFILE}
- OBJ_COLORSPACE = 14;
- {$EXTERNALSYM OBJ_COLORSPACE}
-
-// xform stuff
-
- MWT_IDENTITY = 1;
- {$EXTERNALSYM MWT_IDENTITY}
- MWT_LEFTMULTIPLY = 2;
- {$EXTERNALSYM MWT_LEFTMULTIPLY}
- MWT_RIGHTMULTIPLY = 3;
- {$EXTERNALSYM MWT_RIGHTMULTIPLY}
-
- MWT_MIN = MWT_IDENTITY;
- {$EXTERNALSYM MWT_MIN}
- MWT_MAX = MWT_RIGHTMULTIPLY;
- {$EXTERNALSYM MWT_MAX}
-
-type
- PXform = ^TXform;
- tagXFORM = record
- eM11: FLOAT;
- eM12: FLOAT;
- eM21: FLOAT;
- eM22: FLOAT;
- eDx: FLOAT;
- eDy: FLOAT;
- end;
- {$EXTERNALSYM tagXFORM}
- XFORM = tagXFORM;
- {$EXTERNALSYM XFORM}
- LPXFORM = ^XFORM;
- {$EXTERNALSYM LPXFORM}
- TXform = XFORM;
-
-// Bitmap Header Definition
-
- PBitmap = ^TBitmap;
- tagBITMAP = record
- bmType: LONG;
- bmWidth: LONG;
- bmHeight: LONG;
- bmWidthBytes: LONG;
- bmPlanes: WORD;
- bmBitsPixel: WORD;
- bmBits: LPVOID;
- end;
- {$EXTERNALSYM tagBITMAP}
- BITMAP = tagBITMAP;
- {$EXTERNALSYM BITMAP}
- LPBITMAP = ^BITMAP;
- {$EXTERNALSYM LPBITMAP}
- NPBITMAP = ^BITMAP;
- {$EXTERNALSYM NPBITMAP}
- TBitmap = BITMAP;
-
-// #include <pshpack1.h>
-
- PRgbTriple = ^TRgbTriple;
- tagRGBTRIPLE = packed record
- rgbtBlue: BYTE;
- rgbtGreen: BYTE;
- rgbtRed: BYTE;
- end;
- {$EXTERNALSYM tagRGBTRIPLE}
- RGBTRIPLE = tagRGBTRIPLE;
- {$EXTERNALSYM RGBTRIPLE}
- TRgbTriple = RGBTRIPLE;
-
-// #include <poppack.h>
-
- PRgbQuad = ^TRgbQuad;
- tagRGBQUAD = record
- rgbBlue: BYTE;
- rgbGreen: BYTE;
- rgbRed: BYTE;
- rgbReserved: BYTE;
- end;
- {$EXTERNALSYM tagRGBQUAD}
- RGBQUAD = tagRGBQUAD;
- {$EXTERNALSYM RGBQUAD}
- LPRGBQUAD = ^RGBQUAD;
- {$EXTERNALSYM LPRGBQUAD}
- TRgbQuad = RGBQUAD;
-
-// Image Color Matching color definitions
-
-const
- CS_ENABLE = $00000001;
- {$EXTERNALSYM CS_ENABLE}
- CS_DISABLE = $00000002;
- {$EXTERNALSYM CS_DISABLE}
- CS_DELETE_TRANSFORM = $00000003;
- {$EXTERNALSYM CS_DELETE_TRANSFORM}
-
-// Logcolorspace signature
-
- LCS_SIGNATURE = 'PSOC';
- {$EXTERNALSYM LCS_SIGNATURE}
-
-// Logcolorspace lcsType values
-
- LCS_sRGB = 'sRGB';
- {$EXTERNALSYM LCS_sRGB}
- LCS_WINDOWS_COLOR_SPACE = 'Win '; // Windows default color space
- {$EXTERNALSYM LCS_WINDOWS_COLOR_SPACE}
-
-type
- LCSCSTYPE = LONG;
- {$EXTERNALSYM LCSCSTYPE}
-
-const
- LCS_CALIBRATED_RGB = $00000000;
- {$EXTERNALSYM LCS_CALIBRATED_RGB}
-
-type
- LCSGAMUTMATCH = LONG;
- {$EXTERNALSYM LCSGAMUTMATCH }
-
-const
- LCS_GM_BUSINESS = $00000001;
- {$EXTERNALSYM LCS_GM_BUSINESS}
- LCS_GM_GRAPHICS = $00000002;
- {$EXTERNALSYM LCS_GM_GRAPHICS}
- LCS_GM_IMAGES = $00000004;
- {$EXTERNALSYM LCS_GM_IMAGES}
- LCS_GM_ABS_COLORIMETRIC = $00000008;
- {$EXTERNALSYM LCS_GM_ABS_COLORIMETRIC}
-
-// ICM Defines for results from CheckColorInGamut()
-
- CM_OUT_OF_GAMUT = 255;
- {$EXTERNALSYM CM_OUT_OF_GAMUT}
- CM_IN_GAMUT = 0;
- {$EXTERNALSYM CM_IN_GAMUT}
-
-// UpdateICMRegKey Constants
-
- ICM_ADDPROFILE = 1;
- {$EXTERNALSYM ICM_ADDPROFILE}
- ICM_DELETEPROFILE = 2;
- {$EXTERNALSYM ICM_DELETEPROFILE}
- ICM_QUERYPROFILE = 3;
- {$EXTERNALSYM ICM_QUERYPROFILE}
- ICM_SETDEFAULTPROFILE = 4;
- {$EXTERNALSYM ICM_SETDEFAULTPROFILE}
- ICM_REGISTERICMATCHER = 5;
- {$EXTERNALSYM ICM_REGISTERICMATCHER}
- ICM_UNREGISTERICMATCHER = 6;
- {$EXTERNALSYM ICM_UNREGISTERICMATCHER}
- ICM_QUERYMATCH = 7;
- {$EXTERNALSYM ICM_QUERYMATCH}
-
-// Macros to retrieve CMYK values from a COLORREF
-
-function GetKValue(cmyk: COLORREF): BYTE;
-{$EXTERNALSYM GetKValue}
-function GetYValue(cmyk: COLORREF): BYTE;
-{$EXTERNALSYM GetYValue}
-function GetMValue(cmyk: COLORREF): BYTE;
-{$EXTERNALSYM GetMValue}
-function GetCValue(cmyk: COLORREF): BYTE;
-{$EXTERNALSYM GetCValue}
-function CMYK(c, m, y, k: BYTE): COLORREF;
-{$EXTERNALSYM CMYK}
-
-type
- FXPT16DOT16 = Longint;
- {$EXTERNALSYM FXPT16DOT16}
- LPFXPT16DOT16 = ^FXPT16DOT16;
- {$EXTERNALSYM LPFXPT16DOT16}
-
- FXPT2DOT30 = Longint;
- {$EXTERNALSYM FXPT2DOT30}
- LPFXPT2DOT30 = ^FXPT2DOT30;
- {$EXTERNALSYM LPFXPT2DOT30}
-
-// ICM Color Definitions
-// The following two structures are used for defining RGB's in terms of CIEXYZ.
-
- PCieXyz = ^TCieXyz;
- tagCIEXYZ = record
- ciexyzX: FXPT2DOT30;
- ciexyzY: FXPT2DOT30;
- ciexyzZ: FXPT2DOT30;
- end;
- {$EXTERNALSYM tagCIEXYZ}
- CIEXYZ = tagCIEXYZ;
- {$EXTERNALSYM CIEXYZ}
- LPCIEXYZ = ^CIEXYZ;
- {$EXTERNALSYM LPCIEXYZ}
- TCieXyz = CIEXYZ;
-
- PCieXyzTriple = ^TCieXyzTriple;
- tagCIEXYZTRIPLE = record
- ciexyzRed: CIEXYZ;
- ciexyzGreen: CIEXYZ;
- ciexyzBlue: CIEXYZ;
- end;
- {$EXTERNALSYM tagCIEXYZTRIPLE}
- CIEXYZTRIPLE = tagCIEXYZTRIPLE;
- {$EXTERNALSYM CIEXYZTRIPLE}
- LPCIEXYZTRIPLE = ^CIEXYZTRIPLE;
- {$EXTERNALSYM LPCIEXYZTRIPLE}
- TCieXyzTriple = CIEXYZTRIPLE;
-
-// The next structures the logical color space. Unlike pens and brushes,
-// but like palettes, there is only one way to create a LogColorSpace.
-// A pointer to it must be passed, its elements can't be pushed as
-// arguments.
-
- PLogColorSpaceA = ^TLogColorSpaceA;
- tagLOGCOLORSPACEA = record
- lcsSignature: DWORD;
- lcsVersion: DWORD;
- lcsSize: DWORD;
- lcsCSType: LCSCSTYPE;
- lcsIntent: LCSGAMUTMATCH;
- lcsEndpoints: CIEXYZTRIPLE;
- lcsGammaRed: DWORD;
- lcsGammaGreen: DWORD;
- lcsGammaBlue: DWORD;
- lcsFilename: array [0..MAX_PATH - 1] of CHAR;
- end;
- {$EXTERNALSYM tagLOGCOLORSPACEA}
- LOGCOLORSPACEA = tagLOGCOLORSPACEA;
- {$EXTERNALSYM LOGCOLORSPACEA}
- LPLOGCOLORSPACEA = ^LOGCOLORSPACEA;
- {$EXTERNALSYM LPLOGCOLORSPACEA}
- TLogColorSpaceA = LOGCOLORSPACEA;
-
- PLogColorSpaceW = ^TLogColorSpaceW;
- tagLOGCOLORSPACEW = record
- lcsSignature: DWORD;
- lcsVersion: DWORD;
- lcsSize: DWORD;
- lcsCSType: LCSCSTYPE;
- lcsIntent: LCSGAMUTMATCH;
- lcsEndpoints: CIEXYZTRIPLE;
- lcsGammaRed: DWORD;
- lcsGammaGreen: DWORD;
- lcsGammaBlue: DWORD;
- lcsFilename: array [0..MAX_PATH - 1] of WCHAR;
- end;
- {$EXTERNALSYM tagLOGCOLORSPACEW}
- LOGCOLORSPACEW = tagLOGCOLORSPACEW;
- {$EXTERNALSYM LOGCOLORSPACEW}
- LPLOGCOLORSPACEW = ^LOGCOLORSPACEW;
- {$EXTERNALSYM LPLOGCOLORSPACEW}
- TLogColorSpaceW = LOGCOLORSPACEW;
-
- {$IFDEF UNICODE}
- LOGCOLORSPACE = LOGCOLORSPACEW;
- {$EXTERNALSYM LOGCOLORSPACE}
- LPLOGCOLORSPACE = LPLOGCOLORSPACEW;
- {$EXTERNALSYM LPLOGCOLORSPACE}
- TLogColorSpace = TLogColorSpaceW;
- PLogColorSpace = PLogColorSpaceW;
- {$ELSE}
- LOGCOLORSPACE = LOGCOLORSPACEA;
- {$EXTERNALSYM LOGCOLORSPACE}
- LPLOGCOLORSPACE = LPLOGCOLORSPACEA;
- {$EXTERNALSYM LPLOGCOLORSPACE}
- TLogColorSpace = TLogColorSpaceA;
- PLogColorSpace = PLogColorSpaceA;
- {$ENDIF UNICODE}
-
-// structures for defining DIBs
-
- PBitmapCoreHeader = ^TBitmapCoreHeader;
- tagBITMAPCOREHEADER = record
- bcSize: DWORD;
- bcWidth: WORD;
- bcHeight: WORD;
- bcPlanes: WORD;
- bcBitCount: WORD;
- end;
- {$EXTERNALSYM tagBITMAPCOREHEADER}
- BITMAPCOREHEADER = tagBITMAPCOREHEADER;
- {$EXTERNALSYM BITMAPCOREHEADER}
- LPBITMAPCOREHEADER = ^BITMAPCOREHEADER;
- {$EXTERNALSYM LPBITMAPCOREHEADER}
- TBitmapCoreHeader = BITMAPCOREHEADER;
-
- PBitmapInfoHeader = ^TBitmapInfoHeader;
- tagBITMAPINFOHEADER = record
- biSize: DWORD;
- biWidth: LONG;
- biHeight: LONG;
- biPlanes: WORD;
- biBitCount: WORD;
- biCompression: DWORD;
- biSizeImage: DWORD;
- biXPelsPerMeter: LONG;
- biYPelsPerMeter: LONG;
- biClrUsed: DWORD;
- biClrImportant: DWORD;
- end;
- {$EXTERNALSYM tagBITMAPINFOHEADER}
- BITMAPINFOHEADER = tagBITMAPINFOHEADER;
- {$EXTERNALSYM BITMAPINFOHEADER}
- LPBITMAPINFOHEADER = ^BITMAPINFOHEADER;
- {$EXTERNALSYM LPBITMAPINFOHEADER}
- TBitmapInfoHeader = BITMAPINFOHEADER;
-
- PBitmapV4Header = ^TBitmapV4Header;
- BITMAPV4HEADER = record
- bV4Size: DWORD;
- bV4Width: LONG;
- bV4Height: LONG;
- bV4Planes: WORD;
- bV4BitCount: WORD;
- bV4V4Compression: DWORD;
- bV4SizeImage: DWORD;
- bV4XPelsPerMeter: LONG;
- bV4YPelsPerMeter: LONG;
- bV4ClrUsed: DWORD;
- bV4ClrImportant: DWORD;
- bV4RedMask: DWORD;
- bV4GreenMask: DWORD;
- bV4BlueMask: DWORD;
- bV4AlphaMask: DWORD;
- bV4CSType: DWORD;
- bV4Endpoints: CIEXYZTRIPLE;
- bV4GammaRed: DWORD;
- bV4GammaGreen: DWORD;
- bV4GammaBlue: DWORD;
- end;
- {$EXTERNALSYM BITMAPV4HEADER}
- LPBITMAPV4HEADER = ^BITMAPV4HEADER;
- {$EXTERNALSYM LPBITMAPV4HEADER}
- TBitmapV4Header = BITMAPV4HEADER;
-
- PBitmapV5Header = ^TBitmapV5Header;
- BITMAPV5HEADER = record
- bV5Size: DWORD;
- bV5Width: LONG;
- bV5Height: LONG;
- bV5Planes: WORD;
- bV5BitCount: WORD;
- bV5Compression: DWORD;
- bV5SizeImage: DWORD;
- bV5XPelsPerMeter: LONG;
- bV5YPelsPerMeter: LONG;
- bV5ClrUsed: DWORD;
- bV5ClrImportant: DWORD;
- bV5RedMask: DWORD;
- bV5GreenMask: DWORD;
- bV5BlueMask: DWORD;
- bV5AlphaMask: DWORD;
- bV5CSType: DWORD;
- bV5Endpoints: CIEXYZTRIPLE;
- bV5GammaRed: DWORD;
- bV5GammaGreen: DWORD;
- bV5GammaBlue: DWORD;
- bV5Intent: DWORD;
- bV5ProfileData: DWORD;
- bV5ProfileSize: DWORD;
- bV5Reserved: DWORD;
- end;
- {$EXTERNALSYM BITMAPV5HEADER}
- LPBITMAPV5HEADER = ^BITMAPV5HEADER;
- {$EXTERNALSYM LPBITMAPV5HEADER}
- TBitmapV5Header = BITMAPV5HEADER;
-
-// Values for bV5CSType
-
-const
- PROFILE_LINKED = 'LINK';
- {$EXTERNALSYM PROFILE_LINKED}
- PROFILE_EMBEDDED = 'MBED';
- {$EXTERNALSYM PROFILE_EMBEDDED}
-
-// constants for the biCompression field
-
- BI_RGB = 0;
- {$EXTERNALSYM BI_RGB}
- BI_RLE8 = 1;
- {$EXTERNALSYM BI_RLE8}
- BI_RLE4 = 2;
- {$EXTERNALSYM BI_RLE4}
- BI_BITFIELDS = 3;
- {$EXTERNALSYM BI_BITFIELDS}
- BI_JPEG = 4;
- {$EXTERNALSYM BI_JPEG}
- BI_PNG = 5;
- {$EXTERNALSYM BI_PNG}
-
-type
- PBitmapInfo = ^TBitmapInfo;
- tagBITMAPINFO = record
- bmiHeader: BITMAPINFOHEADER;
- bmiColors: array [0..0] of RGBQUAD;
- end;
- {$EXTERNALSYM tagBITMAPINFO}
- BITMAPINFO = tagBITMAPINFO;
- {$EXTERNALSYM BITMAPINFO}
- LPBITMAPINFO = ^BITMAPINFO;
- {$EXTERNALSYM LPBITMAPINFO}
- TBitmapInfo = BITMAPINFO;
-
- PBitmapCoreInfo = ^TBitmapCoreInfo;
- tagBITMAPCOREINFO = record
- bmciHeader: BITMAPCOREHEADER;
- bmciColors: array [0..0] of RGBTRIPLE;
- end;
- {$EXTERNALSYM tagBITMAPCOREINFO}
- BITMAPCOREINFO = tagBITMAPCOREINFO;
- {$EXTERNALSYM BITMAPCOREINFO}
- LPBITMAPCOREINFO = ^BITMAPCOREINFO;
- {$EXTERNALSYM LPBITMAPCOREINFO}
- TBitmapCoreInfo = BITMAPCOREINFO;
-
-// #include <pshpack2.h>
-
- PBitmapFileHeader = ^TBitmapFileHeader;
- tagBITMAPFILEHEADER = packed record
- bfType: WORD;
- bfSize: DWORD;
- bfReserved1: WORD;
- bfReserved2: WORD;
- bfOffBits: DWORD;
- end;
- {$EXTERNALSYM tagBITMAPFILEHEADER}
- BITMAPFILEHEADER = tagBITMAPFILEHEADER;
- {$EXTERNALSYM BITMAPFILEHEADER}
- LPBITMAPFILEHEADER = ^BITMAPFILEHEADER;
- {$EXTERNALSYM BITMAPFILEHEADER}
- TBitmapFileHeader = BITMAPFILEHEADER;
-
-// #include <poppack.h>
-
-function MAKEPOINTS(l: DWORD): POINTS;
-{$EXTERNALSYM MAKEPOINTS}
-
-type
- PFontSignature = ^TFontSignature;
- tagFONTSIGNATURE = record
- fsUsb: array [0..3] of DWORD;
- fsCsb: array [0..1] of DWORD;
- end;
- {$EXTERNALSYM tagFONTSIGNATURE}
- FONTSIGNATURE = tagFONTSIGNATURE;
- {$EXTERNALSYM FONTSIGNATURE}
- LPFONTSIGNATURE = ^FONTSIGNATURE;
- {$EXTERNALSYM LPFONTSIGNATURE}
- TFontSignature = FONTSIGNATURE;
-
- PCharSetInfo = ^TCharSetInfo;
- tagCHARSETINFO = record
- ciCharset: UINT;
- ciACP: UINT;
- fs: FONTSIGNATURE;
- end;
- {$EXTERNALSYM tagCHARSETINFO}
- CHARSETINFO = tagCHARSETINFO;
- {$EXTERNALSYM CHARSETINFO}
- LPCHARSETINFO = ^CHARSETINFO;
- {$EXTERNALSYM LPCHARSETINFO}
- NPCHARSETINFO = ^CHARSETINFO;
- {$EXTERNALSYM NPCHARSETINFO}
- TCharSetInfo = CHARSETINFO;
-
-const
- TCI_SRCCHARSET = 1;
- {$EXTERNALSYM TCI_SRCCHARSET}
- TCI_SRCCODEPAGE = 2;
- {$EXTERNALSYM TCI_SRCCODEPAGE}
- TCI_SRCFONTSIG = 3;
- {$EXTERNALSYM TCI_SRCFONTSIG}
- TCI_SRCLOCALE = $1000;
- {$EXTERNALSYM TCI_SRCLOCALE}
-
-type
- PLocaleSignature = ^TLocaleSignature;
- tagLOCALESIGNATURE = record
- lsUsb: array [0..3] of DWORD;
- lsCsbDefault: array [0..1] of DWORD;
- lsCsbSupported: array [0..1] of DWORD;
- end;
- {$EXTERNALSYM tagLOCALESIGNATURE}
- LOCALESIGNATURE = tagLOCALESIGNATURE;
- {$EXTERNALSYM LOCALESIGNATURE}
- LPLOCALESIGNATURE = ^LOCALESIGNATURE;
- {$EXTERNALSYM LPLOCALESIGNATURE}
- TLocaleSignature = LOCALESIGNATURE;
-
-// Clipboard Metafile Picture Structure
-
- PHandleTable = ^THandleTable;
- tagHANDLETABLE = record
- objectHandle: array [0..0] of HGDIOBJ;
- end;
- {$EXTERNALSYM tagHANDLETABLE}
- HANDLETABLE = tagHANDLETABLE;
- {$EXTERNALSYM HANDLETABLE}
- LPHANDLETABLE = ^HANDLETABLE;
- {$EXTERNALSYM LPHANDLETABLE}
- THandleTable = HANDLETABLE;
-
- PMetaRecord = ^TMetaRecord;
- tagMETARECORD = record
- rdSize: DWORD;
- rdFunction: WORD;
- rdParm: array [0..0] of WORD;
- end;
- {$EXTERNALSYM tagMETARECORD}
- METARECORD = tagMETARECORD;
- {$EXTERNALSYM METARECORD}
- LPMETARECORD = ^METARECORD;
- {$EXTERNALSYM LPMETARECORD}
- TMetaRecord = METARECORD;
-
- PMetaFilePict = ^TMetaFilePict;
- tagMETAFILEPICT = record
- mm: LONG;
- xExt: LONG;
- yExt: LONG;
- hMF: HMETAFILE;
- end;
- {$EXTERNALSYM tagMETAFILEPICT}
- METAFILEPICT = tagMETAFILEPICT;
- {$EXTERNALSYM METAFILEPICT}
- LPMETAFILEPICT = ^METAFILEPICT;
- {$EXTERNALSYM LPMETAFILEPICT}
- TMetaFilePict = METAFILEPICT;
-
-// #include <pshpack2.h>
-
- PMetaHeader = ^TMetaHeader;
- tagMETAHEADER = packed record
- mtType: WORD;
- mtHeaderSize: WORD;
- mtVersion: WORD;
- mtSize: DWORD;
- mtNoObjects: WORD;
- mtMaxRecord: DWORD;
- mtNoParameters: WORD;
- end;
- {$EXTERNALSYM tagMETAHEADER}
- METAHEADER = tagMETAHEADER;
- {$EXTERNALSYM METAHEADER}
- LPMETAHEADER = ^METAHEADER;
- {$EXTERNALSYM LPMETAHEADER}
- TMetaHeader = METAHEADER;
-
-// #include <poppack.h>
-
-// Enhanced Metafile structures
-
- PEnhMetaRecord = ^TEnhMetaRecord;
- tagENHMETARECORD = record
- iType: DWORD; // Record type EMR_XXX
- nSize: DWORD; // Record size in bytes
- dParm: array [0..0] of DWORD; // Parameters
- end;
- {$EXTERNALSYM tagENHMETARECORD}
- ENHMETARECORD = tagENHMETARECORD;
- {$EXTERNALSYM ENHMETARECORD}
- LPENHMETARECORD = ^ENHMETARECORD;
- {$EXTERNALSYM LPENHMETARECORD}
- TEnhMetaRecord = ENHMETARECORD;
-
- PEnhMetaHeader = ^TEnhMetaHeader;
- tagENHMETAHEADER = record
- iType: DWORD; // Record type EMR_HEADER
- nSize: DWORD; // Record size in bytes. This may be greater
- // than the sizeof(ENHMETAHEADER).
- rclBounds: RECTL; // Inclusive-inclusive bounds in device units
- rclFrame: RECTL; // Inclusive-inclusive Picture Frame of metafile in .01 mm units
- dSignature: DWORD; // Signature. Must be ENHMETA_SIGNATURE.
- nVersion: DWORD; // Version number
- nBytes: DWORD; // Size of the metafile in bytes
- nRecords: DWORD; // Number of records in the metafile
- nHandles: WORD; // Number of handles in the handle table
- // Handle index zero is reserved.
- sReserved: WORD; // Reserved. Must be zero.
- nDescription: DWORD; // Number of chars in the unicode description string
- // This is 0 if there is no description string
- offDescription: DWORD; // Offset to the metafile description record.
- // This is 0 if there is no description string
- nPalEntries: DWORD; // Number of entries in the metafile palette.
- szlDevice: SIZEL; // Size of the reference device in pels
- szlMillimeters: SIZEL; // Size of the reference device in millimeters
- cbPixelFormat: DWORD; // Size of PIXELFORMATDESCRIPTOR information
- // This is 0 if no pixel format is set
- offPixelFormat: DWORD; // Offset to PIXELFORMATDESCRIPTOR
- // This is 0 if no pixel format is set
- bOpenGL: DWORD; // TRUE if OpenGL commands are present in
- // the metafile, otherwise FALSE
- {$IFDEF WIN98ME_UP}
- szlMicrometers: SIZEL; // Size of the reference device in micrometers
- {$ENDIF WIN98ME_UP}
- end;
- {$EXTERNALSYM tagENHMETAHEADER}
- ENHMETAHEADER = tagENHMETAHEADER;
- {$EXTERNALSYM ENHMETAHEADER}
- LPENHMETAHEADER = ^ENHMETAHEADER;
- {$EXTERNALSYM LPENHMETAHEADER}
- TEnhMetaHeader = tagENHMETAHEADER;
-
-// tmPitchAndFamily flags
-
-const
- TMPF_FIXED_PITCH = $01;
- {$EXTERNALSYM TMPF_FIXED_PITCH}
- TMPF_VECTOR = $02;
- {$EXTERNALSYM TMPF_VECTOR}
- TMPF_DEVICE = $08;
- {$EXTERNALSYM TMPF_DEVICE}
- TMPF_TRUETYPE = $04;
- {$EXTERNALSYM TMPF_TRUETYPE}
-
-//
-// BCHAR definition for APPs
-//
-
-type
- {$IFDEF UNICODE}
- BCHAR = WCHAR;
- {$EXTERNALSYM BCHAR}
- {$ELSE}
- BCHAR = BYTE;
- {$EXTERNALSYM BCHAR}
- {$ENDIF UNICODE}
-
-type
- PTextMetricA = ^TTextMetricA;
- tagTEXTMETRICA = record
- tmHeight: LONG;
- tmAscent: LONG;
- tmDescent: LONG;
- tmInternalLeading: LONG;
- tmExternalLeading: LONG;
- tmAveCharWidth: LONG;
- tmMaxCharWidth: LONG;
- tmWeight: LONG;
- tmOverhang: LONG;
- tmDigitizedAspectX: LONG;
- tmDigitizedAspectY: LONG;
- tmFirstChar: BYTE;
- tmLastChar: BYTE;
- tmDefaultChar: BYTE;
- tmBreakChar: BYTE;
- tmItalic: BYTE;
- tmUnderlined: BYTE;
- tmStruckOut: BYTE;
- tmPitchAndFamily: BYTE;
- tmCharSet: BYTE;
- end;
- {$EXTERNALSYM tagTEXTMETRICA}
- TEXTMETRICA = tagTEXTMETRICA;
- {$EXTERNALSYM TEXTMETRICA}
- LPTEXTMETRICA = ^TEXTMETRICA;
- {$EXTERNALSYM LPTEXTMETRICA}
- NPTEXTMETRICA = ^TEXTMETRICA;
- {$EXTERNALSYM NPTEXTMETRICA}
- TTextMetricA = TEXTMETRICA;
-
- PTextMetricW = ^TTextMetricW;
- tagTEXTMETRICW = record
- tmHeight: LONG;
- tmAscent: LONG;
- tmDescent: LONG;
- tmInternalLeading: LONG;
- tmExternalLeading: LONG;
- tmAveCharWidth: LONG;
- tmMaxCharWidth: LONG;
- tmWeight: LONG;
- tmOverhang: LONG;
- tmDigitizedAspectX: LONG;
- tmDigitizedAspectY: LONG;
- tmFirstChar: WCHAR;
- tmLastChar: WCHAR;
- tmDefaultChar: WCHAR;
- tmBreakChar: WCHAR;
- tmItalic: BYTE;
- tmUnderlined: BYTE;
- tmStruckOut: BYTE;
- tmPitchAndFamily: BYTE;
- tmCharSet: BYTE;
- end;
- {$EXTERNALSYM tagTEXTMETRICW}
- TEXTMETRICW = tagTEXTMETRICW;
- {$EXTERNALSYM TEXTMETRICW}
- LPTEXTMETRICW = ^TEXTMETRICW;
- {$EXTERNALSYM LPTEXTMETRICW}
- NPTEXTMETRICW = ^TEXTMETRICW;
- {$EXTERNALSYM NPTEXTMETRICW}
- TTextMetricW = TEXTMETRICW;
-
- {$IFDEF UNICODE}
- TEXTMETRIC = TEXTMETRICW;
- {$EXTERNALSYM TEXTMETRIC}
- PTEXTMETRIC = PTEXTMETRICW;
- {$EXTERNALSYM PTEXTMETRIC}
- NPTEXTMETRIC = NPTEXTMETRICW;
- {$EXTERNALSYM NPTEXTMETRIC}
- LPTEXTMETRIC = LPTEXTMETRICW;
- {$EXTERNALSYM LPTEXTMETRIC}
- TTextMetric = TTextMetricW;
- {$ELSE}
- TEXTMETRIC = TEXTMETRICA;
- {$EXTERNALSYM TEXTMETRIC}
- NPTEXTMETRIC = NPTEXTMETRICA;
- {$EXTERNALSYM NPTEXTMETRIC}
- LPTEXTMETRIC = LPTEXTMETRICA;
- {$EXTERNALSYM LPTEXTMETRIC}
- TTextMetric = TTextMetricA;
- {$ENDIF UNICODE}
-
-// ntmFlags field flags
-
-const
- NTM_REGULAR = $00000040;
- {$EXTERNALSYM NTM_REGULAR}
- NTM_BOLD = $00000020;
- {$EXTERNALSYM NTM_BOLD}
- NTM_ITALIC = $00000001;
- {$EXTERNALSYM NTM_ITALIC}
-
-// new in NT 5.0
-
- NTM_NONNEGATIVE_AC = $00010000;
- {$EXTERNALSYM NTM_NONNEGATIVE_AC}
- NTM_PS_OPENTYPE = $00020000;
- {$EXTERNALSYM NTM_PS_OPENTYPE}
- NTM_TT_OPENTYPE = $00040000;
- {$EXTERNALSYM NTM_TT_OPENTYPE}
- NTM_MULTIPLEMASTER = $00080000;
- {$EXTERNALSYM NTM_MULTIPLEMASTER}
- NTM_TYPE1 = $00100000;
- {$EXTERNALSYM NTM_TYPE1}
- NTM_DSIG = $00200000;
- {$EXTERNALSYM NTM_DSIG}
-
-// #include <pshpack4.h>
-
-type
- PNewTextMetricA = ^TNewTextMetricA;
- tagNEWTEXTMETRICA = record
- tmHeight: LONG;
- tmAscent: LONG;
- tmDescent: LONG;
- tmInternalLeading: LONG;
- tmExternalLeading: LONG;
- tmAveCharWidth: LONG;
- tmMaxCharWidth: LONG;
- tmWeight: LONG;
- tmOverhang: LONG;
- tmDigitizedAspectX: LONG;
- tmDigitizedAspectY: LONG;
- tmFirstChar: BYTE;
- tmLastChar: BYTE;
- tmDefaultChar: BYTE;
- tmBreakChar: BYTE;
- tmItalic: BYTE;
- tmUnderlined: BYTE;
- tmStruckOut: BYTE;
- tmPitchAndFamily: BYTE;
- tmCharSet: BYTE;
- ntmFlags: DWORD;
- ntmSizeEM: UINT;
- ntmCellHeight: UINT;
- ntmAvgWidth: UINT;
- end;
- {$EXTERNALSYM tagNEWTEXTMETRICA}
- NEWTEXTMETRICA = tagNEWTEXTMETRICA;
- {$EXTERNALSYM NEWTEXTMETRICA}
- LPNEWTEXTMETRICA = ^NEWTEXTMETRICA;
- {$EXTERNALSYM LPNEWTEXTMETRICA}
- NPNEWTEXTMETRICA = ^NEWTEXTMETRICA;
- {$EXTERNALSYM NPNEWTEXTMETRICA}
- TNewTextMetricA = NEWTEXTMETRICA;
-
- PNewTextMetricW = ^TNewTextMetricW;
- tagNEWTEXTMETRICW = record
- tmHeight: LONG;
- tmAscent: LONG;
- tmDescent: LONG;
- tmInternalLeading: LONG;
- tmExternalLeading: LONG;
- tmAveCharWidth: LONG;
- tmMaxCharWidth: LONG;
- tmWeight: LONG;
- tmOverhang: LONG;
- tmDigitizedAspectX: LONG;
- tmDigitizedAspectY: LONG;
- tmFirstChar: WCHAR;
- tmLastChar: WCHAR;
- tmDefaultChar: WCHAR;
- tmBreakChar: WCHAR;
- tmItalic: BYTE;
- tmUnderlined: BYTE;
- tmStruckOut: BYTE;
- tmPitchAndFamily: BYTE;
- tmCharSet: BYTE;
- ntmFlags: DWORD;
- ntmSizeEM: UINT;
- ntmCellHeight: UINT;
- ntmAvgWidth: UINT;
- end;
- {$EXTERNALSYM tagNEWTEXTMETRICW}
- NEWTEXTMETRICW = tagNEWTEXTMETRICW;
- {$EXTERNALSYM NEWTEXTMETRICW}
- LPNEWTEXTMETRICW = ^NEWTEXTMETRICW;
- {$EXTERNALSYM LPNEWTEXTMETRICW}
- NPNEWTEXTMETRICW = ^NEWTEXTMETRICW;
- {$EXTERNALSYM NPNEWTEXTMETRICW}
- TNewTextMetricW = NEWTEXTMETRICW;
-
- {$IFDEF UNICODE}
- NEWTEXTMETRIC = NEWTEXTMETRICW;
- {$EXTERNALSYM NEWTEXTMETRIC}
- PNEWTEXTMETRIC = PNEWTEXTMETRICW;
- {$EXTERNALSYM PNEWTEXTMETRIC}
- NPNEWTEXTMETRIC = NPNEWTEXTMETRICW;
- {$EXTERNALSYM NPNEWTEXTMETRIC}
- LPNEWTEXTMETRIC = LPNEWTEXTMETRICW;
- {$EXTERNALSYM LPNEWTEXTMETRIC}
- TNewTextMetric = TNewTextMetricW;
- {$ELSE}
- NEWTEXTMETRIC = NEWTEXTMETRICW;
- {$EXTERNALSYM NEWTEXTMETRIC}
- PNEWTEXTMETRIC = PNEWTEXTMETRICW;
- {$EXTERNALSYM PNEWTEXTMETRIC}
- NPNEWTEXTMETRIC = NPNEWTEXTMETRICW;
- {$EXTERNALSYM NPNEWTEXTMETRIC}
- LPNEWTEXTMETRIC = LPNEWTEXTMETRICW;
- {$EXTERNALSYM LPNEWTEXTMETRIC}
- TNewTextMetric = TNewTextMetricW;
- {$ENDIF UNICODE}
-
-// #include <poppack.h>
-
- PNewTextMetricExA = ^TNewTextMetricExA;
- tagNEWTEXTMETRICEXA = record
- ntmTm: NEWTEXTMETRICA;
- ntmFontSig: FONTSIGNATURE;
- end;
- {$EXTERNALSYM tagNEWTEXTMETRICEXA}
- NEWTEXTMETRICEXA = tagNEWTEXTMETRICEXA;
- {$EXTERNALSYM NEWTEXTMETRICEXA}
- TNewTextMetricExA = NEWTEXTMETRICEXA;
-
- PNewTextMetricExW = ^TNewTextMetricExW;
- tagNEWTEXTMETRICEXW = record
- ntmTm: NEWTEXTMETRICW;
- ntmFontSig: FONTSIGNATURE;
- end;
- {$EXTERNALSYM tagNEWTEXTMETRICEXW}
- NEWTEXTMETRICEXW = tagNEWTEXTMETRICEXW;
- {$EXTERNALSYM NEWTEXTMETRICEXW}
- TNewTextMetricExW = NEWTEXTMETRICEXW;
-
- {$IFDEF UNICODE}
- NEWTEXTMETRICEX = NEWTEXTMETRICEXW;
- {$EXTERNALSYM NEWTEXTMETRICEX}
- TNewTextMetricEx = TNewTextMetricExW;
- PNewTextMetricEx = PNewTextMetricExW;
- {$ELSE}
- NEWTEXTMETRICEX = NEWTEXTMETRICEXA;
- {$EXTERNALSYM NEWTEXTMETRICEX}
- TNewTextMetricEx = TNewTextMetricExA;
- PNewTextMetricEx = PNewTextMetricExA;
- {$ENDIF UNICODE}
-
-// GDI Logical Objects:
-
-// Pel Array
-
- PPelArray = ^TPelArray;
- tagPELARRAY = record
- paXCount: LONG;
- paYCount: LONG;
- paXExt: LONG;
- paYExt: LONG;
- paRGBs: BYTE;
- end;
- {$EXTERNALSYM tagPELARRAY}
- PELARRAY = tagPELARRAY;
- {$EXTERNALSYM PELARRAY}
- LPPELARRAY = ^PELARRAY;
- {$EXTERNALSYM LPPELARRAY}
- TPelArray = PELARRAY;
-
-// Logical Brush (or Pattern)
-
- PLogBrush = ^TLogBrush;
- tagLOGBRUSH = record
- lbStyle: UINT;
- lbColor: COLORREF;
- lbHatch: ULONG_PTR; // Sundown: lbHatch could hold a HANDLE
- end;
- {$EXTERNALSYM tagLOGBRUSH}
- LOGBRUSH = tagLOGBRUSH;
- {$EXTERNALSYM LOGBRUSH}
- LPLOGBRUSH = ^LOGBRUSH;
- {$EXTERNALSYM LPLOGBRUSH}
- NPLOGBRUSH = ^LOGBRUSH;
- {$EXTERNALSYM NPLOGBRUSH}
- TLogBrush = LOGBRUSH;
-
- PLogBrush32 = ^TLogBrush32;
- tagLOGBRUSH32 = record
- lbStyle: UINT;
- lbColor: COLORREF;
- lbHatch: ULONG;
- end;
- {$EXTERNALSYM tagLOGBRUSH32}
- LOGBRUSH32 = tagLOGBRUSH32;
- {$EXTERNALSYM LOGBRUSH32}
- LPLOGBRUSH32 = ^LOGBRUSH32;
- {$EXTERNALSYM LPLOGBRUSH32}
- NPLOGBRUSH32 = ^LOGBRUSH32;
- {$EXTERNALSYM NPLOGBRUSH32}
- TLogBrush32 = LOGBRUSH32;
-
- PATTERN = LOGBRUSH;
- {$EXTERNALSYM PATTERN}
- PPATTERN = ^PATTERN;
- {$EXTERNALSYM PPATTERN}
- LPPATTERN = ^PATTERN;
- {$EXTERNALSYM LPPATTERN}
- NPPATTERN = ^PATTERN;
- {$EXTERNALSYM NPPATTERN}
-
-// Logical Pen
-
- PLogPen = ^TLogPen;
- tagLOGPEN = record
- lopnStyle: UINT;
- lopnWidth: POINT;
- lopnColor: COLORREF;
- end;
- {$EXTERNALSYM tagLOGPEN}
- LOGPEN = tagLOGPEN;
- {$EXTERNALSYM LOGPEN}
- LPLOGPEN = ^LOGPEN;
- {$EXTERNALSYM LPLOGPEN}
- NPLOGPEN = ^LOGPEN;
- {$EXTERNALSYM NPLOGPEN}
- TLogPen = LOGPEN;
-
- PExtLogPen = ^TExtLogPen;
- tagEXTLOGPEN = record
- elpPenStyle: DWORD;
- elpWidth: DWORD;
- elpBrushStyle: UINT;
- elpColor: COLORREF;
- elpHatch: ULONG_PTR; // Sundown: elpHatch could take a HANDLE
- elpNumEntries: DWORD;
- elpStyleEntry: array [0..0] of DWORD;
- end;
- {$EXTERNALSYM tagEXTLOGPEN}
- EXTLOGPEN = tagEXTLOGPEN;
- {$EXTERNALSYM EXTLOGPEN}
- LPEXTLOGPEN = ^EXTLOGPEN;
- {$EXTERNALSYM LPEXTLOGPEN}
- NPEXTLOGPEN = ^EXTLOGPEN;
- {$EXTERNALSYM NPEXTLOGPEN}
- TExtLogPen = EXTLOGPEN;
-
- PPaletteEntry = ^TPaletteEntry;
- tagPALETTEENTRY = record
- peRed: BYTE;
- peGreen: BYTE;
- peBlue: BYTE;
- peFlags: BYTE;
- end;
- {$EXTERNALSYM tagPALETTEENTRY}
- PALETTEENTRY = tagPALETTEENTRY;
- {$EXTERNALSYM PALETTEENTRY}
- LPPALETTEENTRY = ^PALETTEENTRY;
- {$EXTERNALSYM LPPALETTEENTRY}
- TPaletteEntry = PALETTEENTRY;
-
-// Logical Palette
-
- PLogPalette = ^TLogPalette;
- tagLOGPALETTE = record
- palVersion: WORD;
- palNumEntries: WORD;
- palPalEntry: array [0..0] of PALETTEENTRY;
- end;
- {$EXTERNALSYM tagLOGPALETTE}
- LOGPALETTE = tagLOGPALETTE;
- {$EXTERNALSYM LOGPALETTE}
- LPLOGPALETTE = ^LOGPALETTE;
- {$EXTERNALSYM LPLOGPALETTE}
- NPLOGPALETTE = ^LOGPALETTE;
- {$EXTERNALSYM NPLOGPALETTE}
- TLogPalette = LOGPALETTE;
-
-// Logical Font
-
-const
- LF_FACESIZE = 32;
- {$EXTERNALSYM LF_FACESIZE}
-
-type
- PLogFontA = ^TLogFontA;
- tagLOGFONTA = record
- lfHeight: LONG;
- lfWidth: LONG;
- lfEscapement: LONG;
- lfOrientation: LONG;
- lfWeight: LONG;
- lfItalic: BYTE;
- lfUnderline: BYTE;
- lfStrikeOut: BYTE;
- lfCharSet: BYTE;
- lfOutPrecision: BYTE;
- lfClipPrecision: BYTE;
- lfQuality: BYTE;
- lfPitchAndFamily: BYTE;
- lfFaceName: array [0..LF_FACESIZE - 1] of CHAR;
- end;
- {$EXTERNALSYM tagLOGFONTA}
- LOGFONTA = tagLOGFONTA;
- {$EXTERNALSYM LOGFONTA}
- LPLOGFONTA = ^LOGFONTA;
- {$EXTERNALSYM LPLOGFONTA}
- NPLOGFONTA = ^LOGFONTA;
- {$EXTERNALSYM NPLOGFONTA}
- TLogFontA = LOGFONTA;
-
- PLogFontW = ^TLogFontW;
- tagLOGFONTW = record
- lfHeight: LONG;
- lfWidth: LONG;
- lfEscapement: LONG;
- lfOrientation: LONG;
- lfWeight: LONG;
- lfItalic: BYTE;
- lfUnderline: BYTE;
- lfStrikeOut: BYTE;
- lfCharSet: BYTE;
- lfOutPrecision: BYTE;
- lfClipPrecision: BYTE;
- lfQuality: BYTE;
- lfPitchAndFamily: BYTE;
- lfFaceName: array [0..LF_FACESIZE - 1] of WCHAR;
- end;
- {$EXTERNALSYM tagLOGFONTW}
- LOGFONTW = tagLOGFONTW;
- {$EXTERNALSYM LOGFONTW}
- LPLOGFONTW = ^LOGFONTW;
- {$EXTERNALSYM LPLOGFONTW}
- NPLOGFONTW = ^LOGFONTW;
- {$EXTERNALSYM NPLOGFONTW}
- TLogFontW = LOGFONTW;
-
- {$IFDEF UNICODE}
- LOGFONT = LOGFONTW;
- {$EXTERNALSYM LOGFONT}
- PLOGFONT = PLOGFONTW;
- {$EXTERNALSYM PLOGFONT}
- NPLOGFONT = NPLOGFONTW;
- {$EXTERNALSYM NPLOGFONT}
- LPLOGFONT = LPLOGFONTW;
- {$EXTERNALSYM LPLOGFONT}
- TLogFont = TLogFontW;
- {$ELSE}
- LOGFONT = LOGFONTA;
- {$EXTERNALSYM LOGFONT}
- PLOGFONT = PLOGFONTA;
- {$EXTERNALSYM PLOGFONT}
- NPLOGFONT = NPLOGFONTA;
- {$EXTERNALSYM NPLOGFONT}
- LPLOGFONT = LPLOGFONTA;
- {$EXTERNALSYM LPLOGFONT}
- TLogFont = TLogFontA;
- {$ENDIF UNICODE}
-
-const
- LF_FULLFACESIZE = 64;
- {$EXTERNALSYM LF_FULLFACESIZE}
-
-// Structure passed to FONTENUMPROC
-
-type
- PEnumLogFontA = ^TEnumLogFontA;
- tagENUMLOGFONTA = record
- elfLogFont: LOGFONTA;
- elfFullName: array [ 0..LF_FULLFACESIZE - 1] of BYTE;
- elfStyle: array [0..LF_FACESIZE - 1] of BYTE;
- end;
- {$EXTERNALSYM tagENUMLOGFONTA}
- ENUMLOGFONTA = tagENUMLOGFONTA;
- {$EXTERNALSYM ENUMLOGFONTA}
- LPENUMLOGFONTA = ^ENUMLOGFONTA;
- {$EXTERNALSYM LPENUMLOGFONTA}
- TEnumLogFontA = ENUMLOGFONTA;
-
-// Structure passed to FONTENUMPROC
-
- PEnumLogFontW = ^TEnumLogFontW;
- tagENUMLOGFONTW = record
- elfLogFont: LOGFONTW;
- elfFullName: array [0..LF_FULLFACESIZE - 1] of WCHAR;
- elfStyle: array [0..LF_FACESIZE - 1] of WCHAR;
- end;
- {$EXTERNALSYM tagENUMLOGFONTW}
- ENUMLOGFONTW = tagENUMLOGFONTW;
- {$EXTERNALSYM ENUMLOGFONTW}
- LPENUMLOGFONTW = ^ENUMLOGFONTW;
- {$EXTERNALSYM LPENUMLOGFONTW}
- TEnumLogFontW = ENUMLOGFONTW;
-
- {$IFDEF UNICODE}
- ENUMLOGFONT = ENUMLOGFONTW;
- {$EXTERNALSYM ENUMLOGFONT}
- LPENUMLOGFONT = LPENUMLOGFONTW;
- {$EXTERNALSYM LPENUMLOGFONT}
- TEnumLogFont = TEnumLogFontW;
- PEnumLogFont = PEnumLogFontW;
- {$ELSE}
- ENUMLOGFONT = ENUMLOGFONTA;
- {$EXTERNALSYM ENUMLOGFONT}
- LPENUMLOGFONT = LPENUMLOGFONTA;
- {$EXTERNALSYM LPENUMLOGFONT}
- TEnumLogFont = TEnumLogFontA;
- PEnumLogFont = PEnumLogFontA;
- {$ENDIF UNICODE}
-
- PEnumLogFontExA = ^TEnumLogFontExA;
- tagENUMLOGFONTEXA = record
- elfLogFont: LOGFONTA;
- elfFullName: array [0..LF_FULLFACESIZE - 1] of BYTE;
- elfStyle: array [0..LF_FACESIZE - 1] of BYTE;
- elfScript: array [0..LF_FACESIZE - 1] of BYTE;
- end;
- {$EXTERNALSYM tagENUMLOGFONTEXA}
- ENUMLOGFONTEXA = tagENUMLOGFONTEXA;
- {$EXTERNALSYM ENUMLOGFONTEXA}
- LPENUMLOGFONTEXA = ^ENUMLOGFONTEXA;
- {$EXTERNALSYM LPENUMLOGFONTEXA}
- TEnumLogFontExA = ENUMLOGFONTEXA;
-
- PEnumLogFontExW = ^TEnumLogFontExW;
- tagENUMLOGFONTEXW = record
- elfLogFont: LOGFONTW;
- elfFullName: array [0..LF_FULLFACESIZE - 1] of WCHAR;
- elfStyle: array [0..LF_FACESIZE - 1] of WCHAR;
- elfScript: array [0..LF_FACESIZE - 1] of WCHAR;
- end;
- {$EXTERNALSYM tagENUMLOGFONTEXW}
- ENUMLOGFONTEXW = tagENUMLOGFONTEXW;
- {$EXTERNALSYM ENUMLOGFONTEXW}
- LPENUMLOGFONTEXW = ^ENUMLOGFONTEXW;
- {$EXTERNALSYM LPENUMLOGFONTEXW}
- TEnumLogFontExW = ENUMLOGFONTEXW;
-
- {$IFDEF UNICODE}
- ENUMLOGFONTEX = ENUMLOGFONTEXW;
- {$EXTERNALSYM ENUMLOGFONTEX}
- LPENUMLOGFONTEX = LPENUMLOGFONTEXW;
- {$EXTERNALSYM LPENUMLOGFONTEX}
- TEnumLogFontEx = TEnumLogFontExW;
- PEnumLogFontEx = PEnumLogFontExW;
- {$ELSE}
- ENUMLOGFONTEX = ENUMLOGFONTEXA;
- {$EXTERNALSYM ENUMLOGFONTEX}
- LPENUMLOGFONTEX = LPENUMLOGFONTEXA;
- {$EXTERNALSYM LPENUMLOGFONTEX}
- TEnumLogFontEx = TEnumLogFontExA;
- PEnumLogFontEx = PEnumLogFontExA;
- {$ENDIF UNICODE}
-
-const
- OUT_DEFAULT_PRECIS = 0;
- {$EXTERNALSYM OUT_DEFAULT_PRECIS}
- OUT_STRING_PRECIS = 1;
- {$EXTERNALSYM OUT_STRING_PRECIS}
- OUT_CHARACTER_PRECIS = 2;
- {$EXTERNALSYM OUT_CHARACTER_PRECIS}
- OUT_STROKE_PRECIS = 3;
- {$EXTERNALSYM OUT_STROKE_PRECIS}
- OUT_TT_PRECIS = 4;
- {$EXTERNALSYM OUT_TT_PRECIS}
- OUT_DEVICE_PRECIS = 5;
- {$EXTERNALSYM OUT_DEVICE_PRECIS}
- OUT_RASTER_PRECIS = 6;
- {$EXTERNALSYM OUT_RASTER_PRECIS}
- OUT_TT_ONLY_PRECIS = 7;
- {$EXTERNALSYM OUT_TT_ONLY_PRECIS}
- OUT_OUTLINE_PRECIS = 8;
- {$EXTERNALSYM OUT_OUTLINE_PRECIS}
- OUT_SCREEN_OUTLINE_PRECIS = 9;
- {$EXTERNALSYM OUT_SCREEN_OUTLINE_PRECIS}
- OUT_PS_ONLY_PRECIS = 10;
- {$EXTERNALSYM OUT_PS_ONLY_PRECIS}
-
- CLIP_DEFAULT_PRECIS = 0;
- {$EXTERNALSYM CLIP_DEFAULT_PRECIS}
- CLIP_CHARACTER_PRECIS = 1;
- {$EXTERNALSYM CLIP_CHARACTER_PRECIS}
- CLIP_STROKE_PRECIS = 2;
- {$EXTERNALSYM CLIP_STROKE_PRECIS}
- CLIP_MASK = $f;
- {$EXTERNALSYM CLIP_MASK}
- CLIP_LH_ANGLES = 1 shl 4;
- {$EXTERNALSYM CLIP_LH_ANGLES}
- CLIP_TT_ALWAYS = 2 shl 4;
- {$EXTERNALSYM CLIP_TT_ALWAYS}
- CLIP_DFA_DISABLE = 4 shl 4;
- {$EXTERNALSYM CLIP_DFA_DISABLE}
- CLIP_EMBEDDED = 8 shl 4;
- {$EXTERNALSYM CLIP_EMBEDDED}
-
- DEFAULT_QUALITY = 0;
- {$EXTERNALSYM DEFAULT_QUALITY}
- DRAFT_QUALITY = 1;
- {$EXTERNALSYM DRAFT_QUALITY}
- PROOF_QUALITY = 2;
- {$EXTERNALSYM PROOF_QUALITY}
- NONANTIALIASED_QUALITY = 3;
- {$EXTERNALSYM NONANTIALIASED_QUALITY}
- ANTIALIASED_QUALITY = 4;
- {$EXTERNALSYM ANTIALIASED_QUALITY}
- CLEARTYPE_QUALITY = 5;
- {$EXTERNALSYM CLEARTYPE_QUALITY}
-
-//#if (_WIN32_WINNT >= 0x0501)
- CLEARTYPE_NATURAL_QUALITY = 6;
- {$EXTERNALSYM CLEARTYPE_NATURAL_QUALITY}
-//#endif
-
- DEFAULT_PITCH = 0;
- {$EXTERNALSYM DEFAULT_PITCH}
- FIXED_PITCH = 1;
- {$EXTERNALSYM FIXED_PITCH}
- VARIABLE_PITCH = 2;
- {$EXTERNALSYM VARIABLE_PITCH}
- MONO_FONT = 8;
- {$EXTERNALSYM MONO_FONT}
-
- ANSI_CHARSET = 0;
- {$EXTERNALSYM ANSI_CHARSET}
- DEFAULT_CHARSET = 1;
- {$EXTERNALSYM DEFAULT_CHARSET}
- SYMBOL_CHARSET = 2;
- {$EXTERNALSYM SYMBOL_CHARSET}
- SHIFTJIS_CHARSET = 128;
- {$EXTERNALSYM SHIFTJIS_CHARSET}
- HANGEUL_CHARSET = 129;
- {$EXTERNALSYM HANGEUL_CHARSET}
- HANGUL_CHARSET = 129;
- {$EXTERNALSYM HANGUL_CHARSET}
- GB2312_CHARSET = 134;
- {$EXTERNALSYM GB2312_CHARSET}
- CHINESEBIG5_CHARSET = 136;
- {$EXTERNALSYM CHINESEBIG5_CHARSET}
- OEM_CHARSET = 255;
- {$EXTERNALSYM OEM_CHARSET}
- JOHAB_CHARSET = 130;
- {$EXTERNALSYM JOHAB_CHARSET}
- HEBREW_CHARSET = 177;
- {$EXTERNALSYM HEBREW_CHARSET}
- ARABIC_CHARSET = 178;
- {$EXTERNALSYM ARABIC_CHARSET}
- GREEK_CHARSET = 161;
- {$EXTERNALSYM GREEK_CHARSET}
- TURKISH_CHARSET = 162;
- {$EXTERNALSYM TURKISH_CHARSET}
- VIETNAMESE_CHARSET = 163;
- {$EXTERNALSYM VIETNAMESE_CHARSET}
- THAI_CHARSET = 222;
- {$EXTERNALSYM THAI_CHARSET}
- EASTEUROPE_CHARSET = 238;
- {$EXTERNALSYM EASTEUROPE_CHARSET}
- RUSSIAN_CHARSET = 204;
- {$EXTERNALSYM RUSSIAN_CHARSET}
-
- MAC_CHARSET = 77;
- {$EXTERNALSYM MAC_CHARSET}
- BALTIC_CHARSET = 186;
- {$EXTERNALSYM BALTIC_CHARSET}
-
- FS_LATIN1 = $00000001;
- {$EXTERNALSYM FS_LATIN1}
- FS_LATIN2 = $00000002;
- {$EXTERNALSYM FS_LATIN2}
- FS_CYRILLIC = $00000004;
- {$EXTERNALSYM FS_CYRILLIC}
- FS_GREEK = $00000008;
- {$EXTERNALSYM FS_GREEK}
- FS_TURKISH = $00000010;
- {$EXTERNALSYM FS_TURKISH}
- FS_HEBREW = $00000020;
- {$EXTERNALSYM FS_HEBREW}
- FS_ARABIC = $00000040;
- {$EXTERNALSYM FS_ARABIC}
- FS_BALTIC = $00000080;
- {$EXTERNALSYM FS_BALTIC}
- FS_VIETNAMESE = $00000100;
- {$EXTERNALSYM FS_VIETNAMESE}
- FS_THAI = $00010000;
- {$EXTERNALSYM FS_THAI}
- FS_JISJAPAN = $00020000;
- {$EXTERNALSYM FS_JISJAPAN}
- FS_CHINESESIMP = $00040000;
- {$EXTERNALSYM FS_CHINESESIMP}
- FS_WANSUNG = $00080000;
- {$EXTERNALSYM FS_WANSUNG}
- FS_CHINESETRAD = $00100000;
- {$EXTERNALSYM FS_CHINESETRAD}
- FS_JOHAB = $00200000;
- {$EXTERNALSYM FS_JOHAB}
- FS_SYMBOL = $80000000;
- {$EXTERNALSYM FS_SYMBOL}
-
-// Font Families
-
- FF_DONTCARE = 0 shl 4; // Don't care or don't know.
- {$EXTERNALSYM FF_DONTCARE}
- FF_ROMAN = 1 shl 4; // Variable stroke width, serifed.
- {$EXTERNALSYM FF_ROMAN}
- // Times Roman, Century Schoolbook, etc.
- FF_SWISS = 2 shl 4; // Variable stroke width, sans-serifed.
- {$EXTERNALSYM FF_SWISS}
- // Helvetica, Swiss, etc.
- FF_MODERN = 3 shl 4; // Constant stroke width, serifed or sans-serifed.
- {$EXTERNALSYM FF_MODERN}
- // Pica, Elite, Courier, etc.
- FF_SCRIPT = 4 shl 4; // Cursive, etc.
- {$EXTERNALSYM FF_SCRIPT}
- FF_DECORATIVE = 5 shl 4; // Old English, etc.
- {$EXTERNALSYM FF_DECORATIVE}
-
-// Font Weights
-
- FW_DONTCARE = 0;
- {$EXTERNALSYM FW_DONTCARE}
- FW_THIN = 100;
- {$EXTERNALSYM FW_THIN}
- FW_EXTRALIGHT = 200;
- {$EXTERNALSYM FW_EXTRALIGHT}
- FW_LIGHT = 300;
- {$EXTERNALSYM FW_LIGHT}
- FW_NORMAL = 400;
- {$EXTERNALSYM FW_NORMAL}
- FW_MEDIUM = 500;
- {$EXTERNALSYM FW_MEDIUM}
- FW_SEMIBOLD = 600;
- {$EXTERNALSYM FW_SEMIBOLD}
- FW_BOLD = 700;
- {$EXTERNALSYM FW_BOLD}
- FW_EXTRABOLD = 800;
- {$EXTERNALSYM FW_EXTRABOLD}
- FW_HEAVY = 900;
- {$EXTERNALSYM FW_HEAVY}
-
- FW_ULTRALIGHT = FW_EXTRALIGHT;
- {$EXTERNALSYM FW_ULTRALIGHT}
- FW_REGULAR = FW_NORMAL;
- {$EXTERNALSYM FW_REGULAR}
- FW_DEMIBOLD = FW_SEMIBOLD;
- {$EXTERNALSYM FW_DEMIBOLD}
- FW_ULTRABOLD = FW_EXTRABOLD;
- {$EXTERNALSYM FW_ULTRABOLD}
- FW_BLACK = FW_HEAVY;
- {$EXTERNALSYM FW_BLACK}
-
- PANOSE_COUNT = 10;
- {$EXTERNALSYM PANOSE_COUNT}
- PAN_FAMILYTYPE_INDEX = 0;
- {$EXTERNALSYM PAN_FAMILYTYPE_INDEX}
- PAN_SERIFSTYLE_INDEX = 1;
- {$EXTERNALSYM PAN_SERIFSTYLE_INDEX}
- PAN_WEIGHT_INDEX = 2;
- {$EXTERNALSYM PAN_WEIGHT_INDEX}
- PAN_PROPORTION_INDEX = 3;
- {$EXTERNALSYM PAN_PROPORTION_INDEX}
- PAN_CONTRAST_INDEX = 4;
- {$EXTERNALSYM PAN_CONTRAST_INDEX}
- PAN_STROKEVARIATION_INDEX = 5;
- {$EXTERNALSYM PAN_STROKEVARIATION_INDEX}
- PAN_ARMSTYLE_INDEX = 6;
- {$EXTERNALSYM PAN_ARMSTYLE_INDEX}
- PAN_LETTERFORM_INDEX = 7;
- {$EXTERNALSYM PAN_LETTERFORM_INDEX}
- PAN_MIDLINE_INDEX = 8;
- {$EXTERNALSYM PAN_MIDLINE_INDEX}
- PAN_XHEIGHT_INDEX = 9;
- {$EXTERNALSYM PAN_XHEIGHT_INDEX}
-
- PAN_CULTURE_LATIN = 0;
- {$EXTERNALSYM PAN_CULTURE_LATIN}
-
-type
- PPanose = ^TPanose;
- tagPANOSE = record
- bFamilyType: BYTE;
- bSerifStyle: BYTE;
- bWeight: BYTE;
- bProportion: BYTE;
- bContrast: BYTE;
- bStrokeVariation: BYTE;
- bArmStyle: BYTE;
- bLetterform: BYTE;
- bMidline: BYTE;
- bXHeight: BYTE;
- end;
- {$EXTERNALSYM tagPANOSE}
- PANOSE = tagPANOSE;
- {$EXTERNALSYM PANOSE}
- LPPANOSE = ^PANOSE;
- {$EXTERNALSYM LPPANOSE}
- TPanose = PANOSE;
-
-const
- PAN_ANY = 0; // Any
- {$EXTERNALSYM PAN_ANY}
- PAN_NO_FIT = 1; // No Fit
- {$EXTERNALSYM PAN_NO_FIT}
-
- PAN_FAMILY_TEXT_DISPLAY = 2; // Text and Display
- {$EXTERNALSYM PAN_FAMILY_TEXT_DISPLAY}
- PAN_FAMILY_SCRIPT = 3; // Script
- {$EXTERNALSYM PAN_FAMILY_SCRIPT}
- PAN_FAMILY_DECORATIVE = 4; // Decorative
- {$EXTERNALSYM PAN_FAMILY_DECORATIVE}
- PAN_FAMILY_PICTORIAL = 5; // Pictorial
- {$EXTERNALSYM PAN_FAMILY_PICTORIAL}
-
- PAN_SERIF_COVE = 2; // Cove
- {$EXTERNALSYM PAN_SERIF_COVE}
- PAN_SERIF_OBTUSE_COVE = 3; // Obtuse Cove
- {$EXTERNALSYM PAN_SERIF_OBTUSE_COVE}
- PAN_SERIF_SQUARE_COVE = 4; // Square Cove
- {$EXTERNALSYM PAN_SERIF_SQUARE_COVE}
- PAN_SERIF_OBTUSE_SQUARE_COVE = 5; // Obtuse Square Cove
- {$EXTERNALSYM PAN_SERIF_OBTUSE_SQUARE_COVE}
- PAN_SERIF_SQUARE = 6; // Square
- {$EXTERNALSYM PAN_SERIF_SQUARE}
- PAN_SERIF_THIN = 7; // Thin
- {$EXTERNALSYM PAN_SERIF_THIN}
- PAN_SERIF_BONE = 8; // Bone
- {$EXTERNALSYM PAN_SERIF_BONE}
- PAN_SERIF_EXAGGERATED = 9; // Exaggerated
- {$EXTERNALSYM PAN_SERIF_EXAGGERATED}
- PAN_SERIF_TRIANGLE = 10; // Triangle
- {$EXTERNALSYM PAN_SERIF_TRIANGLE}
- PAN_SERIF_NORMAL_SANS = 11; // Normal Sans
- {$EXTERNALSYM PAN_SERIF_NORMAL_SANS}
- PAN_SERIF_OBTUSE_SANS = 12; // Obtuse Sans
- {$EXTERNALSYM PAN_SERIF_OBTUSE_SANS}
- PAN_SERIF_PERP_SANS = 13; // Prep Sans
- {$EXTERNALSYM PAN_SERIF_PERP_SANS}
- PAN_SERIF_FLARED = 14; // Flared
- {$EXTERNALSYM PAN_SERIF_FLARED}
- PAN_SERIF_ROUNDED = 15; // Rounded
- {$EXTERNALSYM PAN_SERIF_ROUNDED}
-
- PAN_WEIGHT_VERY_LIGHT = 2; // Very Light
- {$EXTERNALSYM PAN_WEIGHT_VERY_LIGHT}
- PAN_WEIGHT_LIGHT = 3; // Light
- {$EXTERNALSYM PAN_WEIGHT_LIGHT}
- PAN_WEIGHT_THIN = 4; // Thin
- {$EXTERNALSYM PAN_WEIGHT_THIN}
- PAN_WEIGHT_BOOK = 5; // Book
- {$EXTERNALSYM PAN_WEIGHT_BOOK}
- PAN_WEIGHT_MEDIUM = 6; // Medium
- {$EXTERNALSYM PAN_WEIGHT_MEDIUM}
- PAN_WEIGHT_DEMI = 7; // Demi
- {$EXTERNALSYM PAN_WEIGHT_DEMI}
- PAN_WEIGHT_BOLD = 8; // Bold
- {$EXTERNALSYM PAN_WEIGHT_BOLD}
- PAN_WEIGHT_HEAVY = 9; // Heavy
- {$EXTERNALSYM PAN_WEIGHT_HEAVY}
- PAN_WEIGHT_BLACK = 10; // Black
- {$EXTERNALSYM PAN_WEIGHT_BLACK}
- PAN_WEIGHT_NORD = 11; // Nord
- {$EXTERNALSYM PAN_WEIGHT_NORD}
-
- PAN_PROP_OLD_STYLE = 2; // Old Style
- {$EXTERNALSYM PAN_PROP_OLD_STYLE}
- PAN_PROP_MODERN = 3; // Modern
- {$EXTERNALSYM PAN_PROP_MODERN}
- PAN_PROP_EVEN_WIDTH = 4; // Even Width
- {$EXTERNALSYM PAN_PROP_EVEN_WIDTH}
- PAN_PROP_EXPANDED = 5; // Expanded
- {$EXTERNALSYM PAN_PROP_EXPANDED}
- PAN_PROP_CONDENSED = 6; // Condensed
- {$EXTERNALSYM PAN_PROP_CONDENSED}
- PAN_PROP_VERY_EXPANDED = 7; // Very Expanded
- {$EXTERNALSYM PAN_PROP_VERY_EXPANDED}
- PAN_PROP_VERY_CONDENSED = 8; // Very Condensed
- {$EXTERNALSYM PAN_PROP_VERY_CONDENSED}
- PAN_PROP_MONOSPACED = 9; // Monospaced
- {$EXTERNALSYM PAN_PROP_MONOSPACED}
-
- PAN_CONTRAST_NONE = 2; // None
- {$EXTERNALSYM PAN_CONTRAST_NONE}
- PAN_CONTRAST_VERY_LOW = 3; // Very Low
- {$EXTERNALSYM PAN_CONTRAST_VERY_LOW}
- PAN_CONTRAST_LOW = 4; // Low
- {$EXTERNALSYM PAN_CONTRAST_LOW}
- PAN_CONTRAST_MEDIUM_LOW = 5; // Medium Low
- {$EXTERNALSYM PAN_CONTRAST_MEDIUM_LOW}
- PAN_CONTRAST_MEDIUM = 6; // Medium
- {$EXTERNALSYM PAN_CONTRAST_MEDIUM}
- PAN_CONTRAST_MEDIUM_HIGH = 7; // Mediim High
- {$EXTERNALSYM PAN_CONTRAST_MEDIUM_HIGH}
- PAN_CONTRAST_HIGH = 8; // High
- {$EXTERNALSYM PAN_CONTRAST_HIGH}
- PAN_CONTRAST_VERY_HIGH = 9; // Very High
- {$EXTERNALSYM PAN_CONTRAST_VERY_HIGH}
-
- PAN_STROKE_GRADUAL_DIAG = 2; // Gradual/Diagonal
- {$EXTERNALSYM PAN_STROKE_GRADUAL_DIAG}
- PAN_STROKE_GRADUAL_TRAN = 3; // Gradual/Transitional
- {$EXTERNALSYM PAN_STROKE_GRADUAL_TRAN}
- PAN_STROKE_GRADUAL_VERT = 4; // Gradual/Vertical
- {$EXTERNALSYM PAN_STROKE_GRADUAL_VERT}
- PAN_STROKE_GRADUAL_HORZ = 5; // Gradual/Horizontal
- {$EXTERNALSYM PAN_STROKE_GRADUAL_HORZ}
- PAN_STROKE_RAPID_VERT = 6; // Rapid/Vertical
- {$EXTERNALSYM PAN_STROKE_RAPID_VERT}
- PAN_STROKE_RAPID_HORZ = 7; // Rapid/Horizontal
- {$EXTERNALSYM PAN_STROKE_RAPID_HORZ}
- PAN_STROKE_INSTANT_VERT = 8; // Instant/Vertical
- {$EXTERNALSYM PAN_STROKE_INSTANT_VERT}
-
- PAN_STRAIGHT_ARMS_HORZ = 2; // Straight Arms/Horizontal
- {$EXTERNALSYM PAN_STRAIGHT_ARMS_HORZ}
- PAN_STRAIGHT_ARMS_WEDGE = 3; // Straight Arms/Wedge
- {$EXTERNALSYM PAN_STRAIGHT_ARMS_WEDGE}
- PAN_STRAIGHT_ARMS_VERT = 4; // Straight Arms/Vertical
- {$EXTERNALSYM PAN_STRAIGHT_ARMS_VERT}
- PAN_STRAIGHT_ARMS_SINGLE_SERIF = 5; // Straight Arms/Single-Serif
- {$EXTERNALSYM PAN_STRAIGHT_ARMS_SINGLE_SERIF}
- PAN_STRAIGHT_ARMS_DOUBLE_SERIF = 6; // Straight Arms/Double-Serif
- {$EXTERNALSYM PAN_STRAIGHT_ARMS_DOUBLE_SERIF}
- PAN_BENT_ARMS_HORZ = 7; // Non-Straight Arms/Horizontal
- {$EXTERNALSYM PAN_BENT_ARMS_HORZ}
- PAN_BENT_ARMS_WEDGE = 8; // Non-Straight Arms/Wedge
- {$EXTERNALSYM PAN_BENT_ARMS_WEDGE}
- PAN_BENT_ARMS_VERT = 9; // Non-Straight Arms/Vertical
- {$EXTERNALSYM PAN_BENT_ARMS_VERT}
- PAN_BENT_ARMS_SINGLE_SERIF = 10; // Non-Straight Arms/Single-Serif
- {$EXTERNALSYM PAN_BENT_ARMS_SINGLE_SERIF}
- PAN_BENT_ARMS_DOUBLE_SERIF = 11; // Non-Straight Arms/Double-Serif
- {$EXTERNALSYM PAN_BENT_ARMS_DOUBLE_SERIF}
-
- PAN_LETT_NORMAL_CONTACT = 2; // Normal/Contact
- {$EXTERNALSYM PAN_LETT_NORMAL_CONTACT}
- PAN_LETT_NORMAL_WEIGHTED = 3; // Normal/Weighted
- {$EXTERNALSYM PAN_LETT_NORMAL_WEIGHTED}
- PAN_LETT_NORMAL_BOXED = 4; // Normal/Boxed
- {$EXTERNALSYM PAN_LETT_NORMAL_BOXED}
- PAN_LETT_NORMAL_FLATTENED = 5; // Normal/Flattened
- {$EXTERNALSYM PAN_LETT_NORMAL_FLATTENED}
- PAN_LETT_NORMAL_ROUNDED = 6; // Normal/Rounded
- {$EXTERNALSYM PAN_LETT_NORMAL_ROUNDED}
- PAN_LETT_NORMAL_OFF_CENTER = 7; // Normal/Off Center
- {$EXTERNALSYM PAN_LETT_NORMAL_OFF_CENTER}
- PAN_LETT_NORMAL_SQUARE = 8; // Normal/Square
- {$EXTERNALSYM PAN_LETT_NORMAL_SQUARE}
- PAN_LETT_OBLIQUE_CONTACT = 9; // Oblique/Contact
- {$EXTERNALSYM PAN_LETT_OBLIQUE_CONTACT}
- PAN_LETT_OBLIQUE_WEIGHTED = 10; // Oblique/Weighted
- {$EXTERNALSYM PAN_LETT_OBLIQUE_WEIGHTED}
- PAN_LETT_OBLIQUE_BOXED = 11; // Oblique/Boxed
- {$EXTERNALSYM PAN_LETT_OBLIQUE_BOXED}
- PAN_LETT_OBLIQUE_FLATTENED = 12; // Oblique/Flattened
- {$EXTERNALSYM PAN_LETT_OBLIQUE_FLATTENED}
- PAN_LETT_OBLIQUE_ROUNDED = 13; // Oblique/Rounded
- {$EXTERNALSYM PAN_LETT_OBLIQUE_ROUNDED}
- PAN_LETT_OBLIQUE_OFF_CENTER = 14; // Oblique/Off Center
- {$EXTERNALSYM PAN_LETT_OBLIQUE_OFF_CENTER}
- PAN_LETT_OBLIQUE_SQUARE = 15; // Oblique/Square
- {$EXTERNALSYM PAN_LETT_OBLIQUE_SQUARE}
-
- PAN_MIDLINE_STANDARD_TRIMMED = 2; // Standard/Trimmed
- {$EXTERNALSYM PAN_MIDLINE_STANDARD_TRIMMED}
- PAN_MIDLINE_STANDARD_POINTED = 3; // Standard/Pointed
- {$EXTERNALSYM PAN_MIDLINE_STANDARD_POINTED}
- PAN_MIDLINE_STANDARD_SERIFED = 4; // Standard/Serifed
- {$EXTERNALSYM PAN_MIDLINE_STANDARD_SERIFED}
- PAN_MIDLINE_HIGH_TRIMMED = 5; // High/Trimmed
- {$EXTERNALSYM PAN_MIDLINE_HIGH_TRIMMED}
- PAN_MIDLINE_HIGH_POINTED = 6; // High/Pointed
- {$EXTERNALSYM PAN_MIDLINE_HIGH_POINTED}
- PAN_MIDLINE_HIGH_SERIFED = 7; // High/Serifed
- {$EXTERNALSYM PAN_MIDLINE_HIGH_SERIFED}
- PAN_MIDLINE_CONSTANT_TRIMMED = 8; // Constant/Trimmed
- {$EXTERNALSYM PAN_MIDLINE_CONSTANT_TRIMMED}
- PAN_MIDLINE_CONSTANT_POINTED = 9; // Constant/Pointed
- {$EXTERNALSYM PAN_MIDLINE_CONSTANT_POINTED}
- PAN_MIDLINE_CONSTANT_SERIFED = 10; // Constant/Serifed
- {$EXTERNALSYM PAN_MIDLINE_CONSTANT_SERIFED}
- PAN_MIDLINE_LOW_TRIMMED = 11; // Low/Trimmed
- {$EXTERNALSYM PAN_MIDLINE_LOW_TRIMMED}
- PAN_MIDLINE_LOW_POINTED = 12; // Low/Pointed
- {$EXTERNALSYM PAN_MIDLINE_LOW_POINTED}
- PAN_MIDLINE_LOW_SERIFED = 13; // Low/Serifed
- {$EXTERNALSYM PAN_MIDLINE_LOW_SERIFED}
-
- PAN_XHEIGHT_CONSTANT_SMALL = 2; // Constant/Small
- {$EXTERNALSYM PAN_XHEIGHT_CONSTANT_SMALL}
- PAN_XHEIGHT_CONSTANT_STD = 3; // Constant/Standard
- {$EXTERNALSYM PAN_XHEIGHT_CONSTANT_STD}
- PAN_XHEIGHT_CONSTANT_LARGE = 4; // Constant/Large
- {$EXTERNALSYM PAN_XHEIGHT_CONSTANT_LARGE}
- PAN_XHEIGHT_DUCKING_SMALL = 5; // Ducking/Small
- {$EXTERNALSYM PAN_XHEIGHT_DUCKING_SMALL}
- PAN_XHEIGHT_DUCKING_STD = 6; // Ducking/Standard
- {$EXTERNALSYM PAN_XHEIGHT_DUCKING_STD}
- PAN_XHEIGHT_DUCKING_LARGE = 7; // Ducking/Large
- {$EXTERNALSYM PAN_XHEIGHT_DUCKING_LARGE}
-
- ELF_VENDOR_SIZE = 4;
- {$EXTERNALSYM ELF_VENDOR_SIZE}
-
-// The extended logical font
-// An extension of the ENUMLOGFONT
-
-type
- PExtLogFontA = ^TExtLogFontA;
- tagEXTLOGFONTA = record
- elfLogFont: LOGFONTA;
- elfFullName: array [0..LF_FULLFACESIZE - 1] of BYTE;
- elfStyle: array [0..LF_FACESIZE - 1] of BYTE;
- elfVersion: DWORD;
- elfStyleSize: DWORD;
- elfMatch: DWORD;
- elfReserved: DWORD;
- elfVendorId: array [0..ELF_VENDOR_SIZE - 1] of BYTE;
- elfCulture: DWORD;
- elfPanose: PANOSE;
- end;
- {$EXTERNALSYM tagEXTLOGFONTA}
- EXTLOGFONTA = tagEXTLOGFONTA;
- {$EXTERNALSYM EXTLOGFONTA}
- LPEXTLOGFONTA = ^EXTLOGFONTA;
- {$EXTERNALSYM LPEXTLOGFONTA}
- NPEXTLOGFONTA = ^EXTLOGFONTA;
- {$EXTERNALSYM NPEXTLOGFONTA}
- TExtLogFontA = EXTLOGFONTA;
-
- PExtLogFontW = ^TExtLogFontW;
- tagEXTLOGFONTW = record
- elfLogFont: LOGFONTW;
- elfFullName: array [0..LF_FULLFACESIZE - 1] of WCHAR;
- elfStyle: array [0..LF_FACESIZE - 1] of WCHAR;
- elfVersion: DWORD;
- elfStyleSize: DWORD;
- elfMatch: DWORD;
- elfReserved: DWORD;
- elfVendorId: array [0..ELF_VENDOR_SIZE - 1] of BYTE;
- elfCulture: DWORD;
- elfPanose: PANOSE;
- end;
- {$EXTERNALSYM tagEXTLOGFONTW}
- EXTLOGFONTW = tagEXTLOGFONTW;
- {$EXTERNALSYM EXTLOGFONTW}
- LPEXTLOGFONTW = ^EXTLOGFONTW;
- {$EXTERNALSYM LPEXTLOGFONTW}
- NPEXTLOGFONTW = ^EXTLOGFONTW;
- {$EXTERNALSYM NPEXTLOGFONTW}
- TExtLogFontW = EXTLOGFONTW;
-
- {$IFDEF UNICODE}
- EXTLOGFONT = EXTLOGFONTW;
- {$EXTERNALSYM EXTLOGFONT}
- PEXTLOGFONT = PEXTLOGFONTW;
- {$EXTERNALSYM PEXTLOGFONT}
- NPEXTLOGFONT = NPEXTLOGFONTW;
- {$EXTERNALSYM NPEXTLOGFONT}
- LPEXTLOGFONT = LPEXTLOGFONTW;
- {$EXTERNALSYM LPEXTLOGFONT}
- TExtLogFont = TExtLogFontW;
- {$ELSE}
- EXTLOGFONT = EXTLOGFONTA;
- {$EXTERNALSYM EXTLOGFONT}
- PEXTLOGFONT = PEXTLOGFONTA;
- {$EXTERNALSYM PEXTLOGFONT}
- NPEXTLOGFONT = NPEXTLOGFONTA;
- {$EXTERNALSYM NPEXTLOGFONT}
- LPEXTLOGFONT = LPEXTLOGFONTA;
- {$EXTERNALSYM LPEXTLOGFONT}
- TExtLogFont = TExtLogFontA;
- {$ENDIF UNICODE}
-
-const
- ELF_VERSION = 0;
- {$EXTERNALSYM ELF_VERSION}
- ELF_CULTURE_LATIN = 0;
- {$EXTERNALSYM ELF_CULTURE_LATIN}
-
-// EnumFonts Masks
-
- RASTER_FONTTYPE = $0001;
- {$EXTERNALSYM RASTER_FONTTYPE}
- DEVICE_FONTTYPE = $002;
- {$EXTERNALSYM DEVICE_FONTTYPE}
- TRUETYPE_FONTTYPE = $004;
- {$EXTERNALSYM TRUETYPE_FONTTYPE}
-
-function RGB(r, g, b: BYTE): COLORREF;
-{$EXTERNALSYM RGB}
-function PALETTERGB(r, g, b: BYTE): COLORREF;
-{$EXTERNALSYM PALETTERGB}
-function PALETTEINDEX(i: WORD): COLORREF;
-{$EXTERNALSYM PALETTEINDEX}
-
-// palette entry flags
-
-const
- PC_RESERVED = $01; // palette index used for animation
- {$EXTERNALSYM PC_RESERVED}
- PC_EXPLICIT = $02; // palette index is explicit to device
- {$EXTERNALSYM PC_EXPLICIT}
- PC_NOCOLLAPSE = $04; // do not match color to system palette
- {$EXTERNALSYM PC_NOCOLLAPSE}
-
-function GetRValue(rgb: COLORREF): BYTE;
-{$EXTERNALSYM GetRValue}
-function GetGValue(rgb: COLORREF): BYTE;
-{$EXTERNALSYM GetGValue}
-function GetBValue(rgb: COLORREF): BYTE;
-{$EXTERNALSYM GetBValue}
-
-// Background Modes
-
-const
- TRANSPARENT = 1;
- {$EXTERNALSYM TRANSPARENT}
- OPAQUE = 2;
- {$EXTERNALSYM OPAQUE}
- BKMODE_LAST = 2;
- {$EXTERNALSYM BKMODE_LAST}
-
-// Graphics Modes
-
- GM_COMPATIBLE = 1;
- {$EXTERNALSYM GM_COMPATIBLE}
- GM_ADVANCED = 2;
- {$EXTERNALSYM GM_ADVANCED}
- GM_LAST = 2;
- {$EXTERNALSYM GM_LAST}
-
-// PolyDraw and GetPath point types
-
- PT_CLOSEFIGURE = $01;
- {$EXTERNALSYM PT_CLOSEFIGURE}
- PT_LINETO = $02;
- {$EXTERNALSYM PT_LINETO}
- PT_BEZIERTO = $04;
- {$EXTERNALSYM PT_BEZIERTO}
- PT_MOVETO = $06;
- {$EXTERNALSYM PT_MOVETO}
-
-// Mapping Modes
-
- MM_TEXT = 1;
- {$EXTERNALSYM MM_TEXT}
- MM_LOMETRIC = 2;
- {$EXTERNALSYM MM_LOMETRIC}
- MM_HIMETRIC = 3;
- {$EXTERNALSYM MM_HIMETRIC}
- MM_LOENGLISH = 4;
- {$EXTERNALSYM MM_LOENGLISH}
- MM_HIENGLISH = 5;
- {$EXTERNALSYM MM_HIENGLISH}
- MM_TWIPS = 6;
- {$EXTERNALSYM MM_TWIPS}
- MM_ISOTROPIC = 7;
- {$EXTERNALSYM MM_ISOTROPIC}
- MM_ANISOTROPIC = 8;
- {$EXTERNALSYM MM_ANISOTROPIC}
-
-// Min and Max Mapping Mode values
-
- MM_MIN = MM_TEXT;
- {$EXTERNALSYM MM_MIN}
- MM_MAX = MM_ANISOTROPIC;
- {$EXTERNALSYM MM_MAX}
- MM_MAX_FIXEDSCALE = MM_TWIPS;
- {$EXTERNALSYM MM_MAX_FIXEDSCALE}
-
-// Coordinate Modes
-
- ABSOLUTE = 1;
- {$EXTERNALSYM ABSOLUTE}
- RELATIVE = 2;
- {$EXTERNALSYM RELATIVE}
-
-// Stock Logical Objects
-
- WHITE_BRUSH = 0;
- {$EXTERNALSYM WHITE_BRUSH}
- LTGRAY_BRUSH = 1;
- {$EXTERNALSYM LTGRAY_BRUSH}
- GRAY_BRUSH = 2;
- {$EXTERNALSYM GRAY_BRUSH}
- DKGRAY_BRUSH = 3;
- {$EXTERNALSYM DKGRAY_BRUSH}
- BLACK_BRUSH = 4;
- {$EXTERNALSYM BLACK_BRUSH}
- NULL_BRUSH = 5;
- {$EXTERNALSYM NULL_BRUSH}
- HOLLOW_BRUSH = NULL_BRUSH;
- {$EXTERNALSYM HOLLOW_BRUSH}
- WHITE_PEN = 6;
- {$EXTERNALSYM WHITE_PEN}
- BLACK_PEN = 7;
- {$EXTERNALSYM BLACK_PEN}
- NULL_PEN = 8;
- {$EXTERNALSYM NULL_PEN}
- OEM_FIXED_FONT = 10;
- {$EXTERNALSYM OEM_FIXED_FONT}
- ANSI_FIXED_FONT = 11;
- {$EXTERNALSYM ANSI_FIXED_FONT}
- ANSI_VAR_FONT = 12;
- {$EXTERNALSYM ANSI_VAR_FONT}
- SYSTEM_FONT = 13;
- {$EXTERNALSYM SYSTEM_FONT}
- DEVICE_DEFAULT_FONT = 14;
- {$EXTERNALSYM DEVICE_DEFAULT_FONT}
- DEFAULT_PALETTE = 15;
- {$EXTERNALSYM DEFAULT_PALETTE}
- SYSTEM_FIXED_FONT = 16;
- {$EXTERNALSYM SYSTEM_FIXED_FONT}
-
- DEFAULT_GUI_FONT = 17;
- {$EXTERNALSYM DEFAULT_GUI_FONT}
-
- DC_BRUSH = 18;
- {$EXTERNALSYM DC_BRUSH}
- DC_PEN = 19;
- {$EXTERNALSYM DC_PEN}
-
- {$IFDEF WIN2000_UP}
- STOCK_LAST = 19;
- {$EXTERNALSYM STOCK_LAST}
- {$ELSE}
- {$IFDEF WIN95_UP}
- STOCK_LAST = 17;
- {$EXTERNALSYM STOCK_LAST}
- {$ELSE}
- STOCK_LAST = 16;
- {$EXTERNALSYM STOCK_LAST}
- {$ENDIF WIN95_UP}
- {$ENDIF WIN2000_UP}
-
- CLR_INVALID = DWORD($FFFFFFFF);
- {$EXTERNALSYM CLR_INVALID}
-
-// Brush Styles
-
- BS_SOLID = 0;
- {$EXTERNALSYM BS_SOLID}
- BS_NULL = 1;
- {$EXTERNALSYM BS_NULL}
- BS_HOLLOW = BS_NULL;
- {$EXTERNALSYM BS_HOLLOW}
- BS_HATCHED = 2;
- {$EXTERNALSYM BS_HATCHED}
- BS_PATTERN = 3;
- {$EXTERNALSYM BS_PATTERN}
- BS_INDEXED = 4;
- {$EXTERNALSYM BS_INDEXED}
- BS_DIBPATTERN = 5;
- {$EXTERNALSYM BS_DIBPATTERN}
- BS_DIBPATTERNPT = 6;
- {$EXTERNALSYM BS_DIBPATTERNPT}
- BS_PATTERN8X8 = 7;
- {$EXTERNALSYM BS_PATTERN8X8}
- BS_DIBPATTERN8X8 = 8;
- {$EXTERNALSYM BS_DIBPATTERN8X8}
- BS_MONOPATTERN = 9;
- {$EXTERNALSYM BS_MONOPATTERN}
-
-// Hatch Styles
-
- HS_HORIZONTAL = 0; // -----
- {$EXTERNALSYM HS_HORIZONTAL}
- HS_VERTICAL = 1; // |||||
- {$EXTERNALSYM HS_VERTICAL}
- HS_FDIAGONAL = 2; // \\\\\
- {$EXTERNALSYM HS_FDIAGONAL}
- HS_BDIAGONAL = 3; // /////
- {$EXTERNALSYM HS_BDIAGONAL}
- HS_CROSS = 4; // +++++
- {$EXTERNALSYM HS_CROSS}
- HS_DIAGCROSS = 5; // xxxxx
- {$EXTERNALSYM HS_DIAGCROSS}
-
-// Pen Styles
-
- PS_SOLID = 0;
- {$EXTERNALSYM PS_SOLID}
- PS_DASH = 1; // -------
- {$EXTERNALSYM PS_DASH}
- PS_DOT = 2; // .......
- {$EXTERNALSYM PS_DOT}
- PS_DASHDOT = 3; // _._._._
- {$EXTERNALSYM PS_DASHDOT}
- PS_DASHDOTDOT = 4; // _.._.._
- {$EXTERNALSYM PS_DASHDOTDOT}
- PS_NULL = 5;
- {$EXTERNALSYM PS_NULL}
- PS_INSIDEFRAME = 6;
- {$EXTERNALSYM PS_INSIDEFRAME}
- PS_USERSTYLE = 7;
- {$EXTERNALSYM PS_USERSTYLE}
- PS_ALTERNATE = 8;
- {$EXTERNALSYM PS_ALTERNATE}
- PS_STYLE_MASK = $0000000F;
- {$EXTERNALSYM PS_STYLE_MASK}
-
- PS_ENDCAP_ROUND = $00000000;
- {$EXTERNALSYM PS_ENDCAP_ROUND}
- PS_ENDCAP_SQUARE = $00000100;
- {$EXTERNALSYM PS_ENDCAP_SQUARE}
- PS_ENDCAP_FLAT = $00000200;
- {$EXTERNALSYM PS_ENDCAP_FLAT}
- PS_ENDCAP_MASK = $00000F00;
- {$EXTERNALSYM PS_ENDCAP_MASK}
-
- PS_JOIN_ROUND = $00000000;
- {$EXTERNALSYM PS_JOIN_ROUND}
- PS_JOIN_BEVEL = $00001000;
- {$EXTERNALSYM PS_JOIN_BEVEL}
- PS_JOIN_MITER = $00002000;
- {$EXTERNALSYM PS_JOIN_MITER}
- PS_JOIN_MASK = $0000F000;
- {$EXTERNALSYM PS_JOIN_MASK}
-
- PS_COSMETIC = $00000000;
- {$EXTERNALSYM PS_COSMETIC}
- PS_GEOMETRIC = $00010000;
- {$EXTERNALSYM PS_GEOMETRIC}
- PS_TYPE_MASK = $000F0000;
- {$EXTERNALSYM PS_TYPE_MASK}
-
- AD_COUNTERCLOCKWISE = 1;
- {$EXTERNALSYM AD_COUNTERCLOCKWISE}
- AD_CLOCKWISE = 2;
- {$EXTERNALSYM AD_CLOCKWISE}
-
-// Device Parameters for GetDeviceCaps()
-
- DRIVERVERSION = 0; // Device driver version
- {$EXTERNALSYM DRIVERVERSION}
- TECHNOLOGY = 2; // Device classification
- {$EXTERNALSYM TECHNOLOGY}
- HORZSIZE = 4; // Horizontal size in millimeters
- {$EXTERNALSYM HORZSIZE}
- VERTSIZE = 6; // Vertical size in millimeters
- {$EXTERNALSYM VERTSIZE}
- HORZRES = 8; // Horizontal width in pixels
- {$EXTERNALSYM HORZRES}
- VERTRES = 10; // Vertical height in pixels
- {$EXTERNALSYM VERTRES}
- BITSPIXEL = 12; // Number of bits per pixel
- {$EXTERNALSYM BITSPIXEL}
- PLANES = 14; // Number of planes
- {$EXTERNALSYM PLANES}
- NUMBRUSHES = 16; // Number of brushes the device has
- {$EXTERNALSYM NUMBRUSHES}
- NUMPENS = 18; // Number of pens the device has
- {$EXTERNALSYM NUMPENS}
- NUMMARKERS = 20; // Number of markers the device has
- {$EXTERNALSYM NUMMARKERS}
- NUMFONTS = 22; // Number of fonts the device has
- {$EXTERNALSYM NUMFONTS}
- NUMCOLORS = 24; // Number of colors the device supports
- {$EXTERNALSYM NUMCOLORS}
- PDEVICESIZE = 26; // Size required for device descriptor
- {$EXTERNALSYM PDEVICESIZE}
- CURVECAPS = 28; // Curve capabilities
- {$EXTERNALSYM CURVECAPS}
- LINECAPS = 30; // Line capabilities
- {$EXTERNALSYM LINECAPS}
- POLYGONALCAPS = 32; // Polygonal capabilities
- {$EXTERNALSYM POLYGONALCAPS}
- TEXTCAPS = 34; // Text capabilities
- {$EXTERNALSYM TEXTCAPS}
- CLIPCAPS = 36; // Clipping capabilities
- {$EXTERNALSYM CLIPCAPS}
- RASTERCAPS = 38; // Bitblt capabilities
- {$EXTERNALSYM RASTERCAPS}
- ASPECTX = 40; // Length of the X leg
- {$EXTERNALSYM ASPECTX}
- ASPECTY = 42; // Length of the Y leg
- {$EXTERNALSYM ASPECTY}
- ASPECTXY = 44; // Length of the hypotenuse
- {$EXTERNALSYM ASPECTXY}
-
- LOGPIXELSX = 88; // Logical pixels/inch in X
- {$EXTERNALSYM LOGPIXELSX}
- LOGPIXELSY = 90; // Logical pixels/inch in Y
- {$EXTERNALSYM LOGPIXELSY}
-
- SIZEPALETTE = 104; // Number of entries in physical palette
- {$EXTERNALSYM SIZEPALETTE}
- NUMRESERVED = 106; // Number of reserved entries in palette
- {$EXTERNALSYM NUMRESERVED}
- COLORRES = 108; // Actual color resolution
- {$EXTERNALSYM COLORRES}
-
-// Printing related DeviceCaps. These replace the appropriate Escapes
-
- PHYSICALWIDTH = 110; // Physical Width in device units
- {$EXTERNALSYM PHYSICALWIDTH}
- PHYSICALHEIGHT = 111; // Physical Height in device units
- {$EXTERNALSYM PHYSICALHEIGHT}
- PHYSICALOFFSETX = 112; // Physical Printable Area x margin
- {$EXTERNALSYM PHYSICALOFFSETX}
- PHYSICALOFFSETY = 113; // Physical Printable Area y margin
- {$EXTERNALSYM PHYSICALOFFSETY}
- SCALINGFACTORX = 114; // Scaling factor x
- {$EXTERNALSYM SCALINGFACTORX}
- SCALINGFACTORY = 115; // Scaling factor y
- {$EXTERNALSYM SCALINGFACTORY}
-
-// Display driver specific
-
- VREFRESH = 116; // Current vertical refresh rate of the
- {$EXTERNALSYM VREFRESH}
- // display device (for displays only) in Hz
- DESKTOPVERTRES = 117; // Horizontal width of entire desktop in
- {$EXTERNALSYM DESKTOPVERTRES}
- // pixels
- DESKTOPHORZRES = 118; // Vertical height of entire desktop in
- {$EXTERNALSYM DESKTOPHORZRES}
- // pixels
- BLTALIGNMENT = 119; // Preferred blt alignment
- {$EXTERNALSYM BLTALIGNMENT}
-
- SHADEBLENDCAPS = 120; // Shading and blending caps
- {$EXTERNALSYM SHADEBLENDCAPS}
- COLORMGMTCAPS = 121; // Color Management caps
- {$EXTERNALSYM COLORMGMTCAPS}
-
-// Device Capability Masks:
-
-// Device Technologies
-
- DT_PLOTTER = 0; // Vector plotter
- {$EXTERNALSYM DT_PLOTTER}
- DT_RASDISPLAY = 1; // Raster display
- {$EXTERNALSYM DT_RASDISPLAY}
- DT_RASPRINTER = 2; // Raster printer
- {$EXTERNALSYM DT_RASPRINTER}
- DT_RASCAMERA = 3; // Raster camera
- {$EXTERNALSYM DT_RASCAMERA}
- DT_CHARSTREAM = 4; // Character-stream, PLP
- {$EXTERNALSYM DT_CHARSTREAM}
- DT_METAFILE = 5; // Metafile, VDM
- {$EXTERNALSYM DT_METAFILE}
- DT_DISPFILE = 6; // Display-file
- {$EXTERNALSYM DT_DISPFILE}
-
-// Curve Capabilities
-
- CC_NONE = 0; // Curves not supported
- {$EXTERNALSYM CC_NONE}
- CC_CIRCLES = 1; // Can do circles
- {$EXTERNALSYM CC_CIRCLES}
- CC_PIE = 2; // Can do pie wedges
- {$EXTERNALSYM CC_PIE}
- CC_CHORD = 4; // Can do chord arcs
- {$EXTERNALSYM CC_CHORD}
- CC_ELLIPSES = 8; // Can do ellipese
- {$EXTERNALSYM CC_ELLIPSES}
- CC_WIDE = 16; // Can do wide lines
- {$EXTERNALSYM CC_WIDE}
- CC_STYLED = 32; // Can do styled lines
- {$EXTERNALSYM CC_STYLED}
- CC_WIDESTYLED = 64; // Can do wide styled lines
- {$EXTERNALSYM CC_WIDESTYLED}
- CC_INTERIORS = 128; // Can do interiors
- {$EXTERNALSYM CC_INTERIORS}
- CC_ROUNDRECT = 256;
- {$EXTERNALSYM CC_ROUNDRECT}
-
-// Line Capabilities
-
- LC_NONE = 0; // Lines not supported
- {$EXTERNALSYM LC_NONE}
- LC_POLYLINE = 2; // Can do polylines
- {$EXTERNALSYM LC_POLYLINE}
- LC_MARKER = 4; // Can do markers
- {$EXTERNALSYM LC_MARKER}
- LC_POLYMARKER = 8; // Can do polymarkers
- {$EXTERNALSYM LC_POLYMARKER}
- LC_WIDE = 16; // Can do wide lines
- {$EXTERNALSYM LC_WIDE}
- LC_STYLED = 32; // Can do styled lines
- {$EXTERNALSYM LC_STYLED}
- LC_WIDESTYLED = 64; // Can do wide styled lines
- {$EXTERNALSYM LC_WIDESTYLED}
- LC_INTERIORS = 128; // Can do interiors
- {$EXTERNALSYM LC_INTERIORS}
-
-// Polygonal Capabilities
-
- PC_NONE = 0; // Polygonals not supported
- {$EXTERNALSYM PC_NONE}
- PC_POLYGON = 1; // Can do polygons
- {$EXTERNALSYM PC_POLYGON}
- PC_RECTANGLE = 2; // Can do rectangles
- {$EXTERNALSYM PC_RECTANGLE}
- PC_WINDPOLYGON = 4; // Can do winding polygons
- {$EXTERNALSYM PC_WINDPOLYGON}
- PC_TRAPEZOID = 4; // Can do trapezoids
- {$EXTERNALSYM PC_TRAPEZOID}
- PC_SCANLINE = 8; // Can do scanlines
- {$EXTERNALSYM PC_SCANLINE}
- PC_WIDE = 16; // Can do wide borders
- {$EXTERNALSYM PC_WIDE}
- PC_STYLED = 32; // Can do styled borders
- {$EXTERNALSYM PC_STYLED}
- PC_WIDESTYLED = 64; // Can do wide styled borders
- {$EXTERNALSYM PC_WIDESTYLED}
- PC_INTERIORS = 128; // Can do interiors
- {$EXTERNALSYM PC_INTERIORS}
- PC_POLYPOLYGON = 256; // Can do polypolygons
- {$EXTERNALSYM PC_POLYPOLYGON}
- PC_PATHS = 512; // Can do paths
- {$EXTERNALSYM PC_PATHS}
-
-// Clipping Capabilities
-
- CP_NONE = 0; // No clipping of output
- {$EXTERNALSYM CP_NONE}
- CP_RECTANGLE = 1; // Output clipped to rects
- {$EXTERNALSYM CP_RECTANGLE}
- CP_REGION = 2; // obsolete
- {$EXTERNALSYM CP_REGION}
-
-// Text Capabilities
-
- TC_OP_CHARACTER = $00000001; // Can do OutputPrecision CHARACTER
- {$EXTERNALSYM TC_OP_CHARACTER}
- TC_OP_STROKE = $00000002; // Can do OutputPrecision STROKE
- {$EXTERNALSYM TC_OP_STROKE}
- TC_CP_STROKE = $00000004; // Can do ClipPrecision STROKE
- {$EXTERNALSYM TC_CP_STROKE}
- TC_CR_90 = $00000008; // Can do CharRotAbility 90
- {$EXTERNALSYM TC_CR_90}
- TC_CR_ANY = $00000010; // Can do CharRotAbility ANY
- {$EXTERNALSYM TC_CR_ANY}
- TC_SF_X_YINDEP = $00000020; // Can do ScaleFreedom X_YINDEPENDENT
- {$EXTERNALSYM TC_SF_X_YINDEP}
- TC_SA_DOUBLE = $00000040; // Can do ScaleAbility DOUBLE
- {$EXTERNALSYM TC_SA_DOUBLE}
- TC_SA_INTEGER = $00000080; // Can do ScaleAbility INTEGER
- {$EXTERNALSYM TC_SA_INTEGER}
- TC_SA_CONTIN = $00000100; // Can do ScaleAbility CONTINUOUS
- {$EXTERNALSYM TC_SA_CONTIN}
- TC_EA_DOUBLE = $00000200; // Can do EmboldenAbility DOUBLE
- {$EXTERNALSYM TC_EA_DOUBLE}
- TC_IA_ABLE = $00000400; // Can do ItalisizeAbility ABLE
- {$EXTERNALSYM TC_IA_ABLE}
- TC_UA_ABLE = $00000800; // Can do UnderlineAbility ABLE
- {$EXTERNALSYM TC_UA_ABLE}
- TC_SO_ABLE = $00001000; // Can do StrikeOutAbility ABLE
- {$EXTERNALSYM TC_SO_ABLE}
- TC_RA_ABLE = $00002000; // Can do RasterFontAble ABLE
- {$EXTERNALSYM TC_RA_ABLE}
- TC_VA_ABLE = $00004000; // Can do VectorFontAble ABLE
- {$EXTERNALSYM TC_VA_ABLE}
- TC_RESERVED = $00008000;
- {$EXTERNALSYM TC_RESERVED}
- TC_SCROLLBLT = $00010000; // Don't do text scroll with blt
- {$EXTERNALSYM TC_SCROLLBLT}
-
-// Raster Capabilities
-
- RC_BITBLT = 1; // Can do standard BLT.
- {$EXTERNALSYM RC_BITBLT}
- RC_BANDING = 2; // Device requires banding support
- {$EXTERNALSYM RC_BANDING}
- RC_SCALING = 4; // Device requires scaling support
- {$EXTERNALSYM RC_SCALING}
- RC_BITMAP64 = 8; // Device can support >64K bitmap
- {$EXTERNALSYM RC_BITMAP64}
- RC_GDI20_OUTPUT = $0010; // has 2.0 output calls
- {$EXTERNALSYM RC_GDI20_OUTPUT}
- RC_GDI20_STATE = $0020;
- {$EXTERNALSYM RC_GDI20_STATE}
- RC_SAVEBITMAP = $0040;
- {$EXTERNALSYM RC_SAVEBITMAP}
- RC_DI_BITMAP = $0080; // supports DIB to memory
- {$EXTERNALSYM RC_DI_BITMAP}
- RC_PALETTE = $0100; // supports a palette
- {$EXTERNALSYM RC_PALETTE}
- RC_DIBTODEV = $0200; // supports DIBitsToDevice
- {$EXTERNALSYM RC_DIBTODEV}
- RC_BIGFONT = $0400; // supports >64K fonts
- {$EXTERNALSYM RC_BIGFONT}
- RC_STRETCHBLT = $0800; // supports StretchBlt
- {$EXTERNALSYM RC_STRETCHBLT}
- RC_FLOODFILL = $1000; // supports FloodFill
- {$EXTERNALSYM RC_FLOODFILL}
- RC_STRETCHDIB = $2000; // supports StretchDIBits
- {$EXTERNALSYM RC_STRETCHDIB}
- RC_OP_DX_OUTPUT = $4000;
- {$EXTERNALSYM RC_OP_DX_OUTPUT}
- RC_DEVBITS = $8000;
- {$EXTERNALSYM RC_DEVBITS}
-
-// Shading and blending caps
-
- SB_NONE = $00000000;
- {$EXTERNALSYM SB_NONE}
- SB_CONST_ALPHA = $00000001;
- {$EXTERNALSYM SB_CONST_ALPHA}
- SB_PIXEL_ALPHA = $00000002;
- {$EXTERNALSYM SB_PIXEL_ALPHA}
- SB_PREMULT_ALPHA = $00000004;
- {$EXTERNALSYM SB_PREMULT_ALPHA}
-
- SB_GRAD_RECT = $00000010;
- {$EXTERNALSYM SB_GRAD_RECT}
- SB_GRAD_TRI = $00000020;
- {$EXTERNALSYM SB_GRAD_TRI}
-
-// Color Management caps
-
- CM_NONE = $00000000;
- {$EXTERNALSYM CM_NONE}
- CM_DEVICE_ICM = $00000001;
- {$EXTERNALSYM CM_DEVICE_ICM}
- CM_GAMMA_RAMP = $00000002;
- {$EXTERNALSYM CM_GAMMA_RAMP}
- CM_CMYK_COLOR = $00000004;
- {$EXTERNALSYM CM_CMYK_COLOR}
-
-// DIB color table identifiers
-
- DIB_RGB_COLORS = 0; // color table in RGBs
- {$EXTERNALSYM DIB_RGB_COLORS}
- DIB_PAL_COLORS = 1; // color table in palette indices
- {$EXTERNALSYM DIB_PAL_COLORS}
-
-// constants for Get/SetSystemPaletteUse()
-
- SYSPAL_ERROR = 0;
- {$EXTERNALSYM SYSPAL_ERROR}
- SYSPAL_STATIC = 1;
- {$EXTERNALSYM SYSPAL_STATIC}
- SYSPAL_NOSTATIC = 2;
- {$EXTERNALSYM SYSPAL_NOSTATIC}
- SYSPAL_NOSTATIC256 = 3;
- {$EXTERNALSYM SYSPAL_NOSTATIC256}
-
-// constants for CreateDIBitmap
-
- CBM_INIT = $04; // initialize bitmap
- {$EXTERNALSYM CBM_INIT}
-
-// ExtFloodFill style flags
-
- FLOODFILLBORDER = 0;
- {$EXTERNALSYM FLOODFILLBORDER}
- FLOODFILLSURFACE = 1;
- {$EXTERNALSYM FLOODFILLSURFACE}
-
-// size of a device name string
-
- CCHDEVICENAME = 32;
- {$EXTERNALSYM CCHDEVICENAME}
-
-// size of a form name string
-
- CCHFORMNAME = 32;
- {$EXTERNALSYM CCHFORMNAME}
-
-{$IFDEF WIN98ME}
-{$IFNDEF WINNT4}
-{$DEFINE WIN98ME_UP_EXCEPT_NT4}
-{$ENDIF !WINNT4}
-{$ENDIF WIN98ME}
-
-type
- TDmDisplayFlagsUnion = record
- case Integer of
- 0: (
- dmDisplayFlags: DWORD);
- 1: (
- dmNup: DWORD);
- end;
-
- _devicemodeA = record
- dmDeviceName: array [0..CCHDEVICENAME - 1] of BYTE;
- dmSpecVersion: WORD;
- dmDriverVersion: WORD;
- dmSize: WORD;
- dmDriverExtra: WORD;
- dmFields: DWORD;
- union1: record
- case Integer of
- // printer only fields
- 0: (
- dmOrientation: Smallint;
- dmPaperSize: Smallint;
- dmPaperLength: Smallint;
- dmPaperWidth: Smallint;
- dmScale: Smallint;
- dmCopies: Smallint;
- dmDefaultSource: Smallint;
- dmPrintQuality: Smallint);
- // display only fields
- 1: (
- dmPosition: POINTL;
- dmDisplayOrientation: DWORD;
- dmDisplayFixedOutput: DWORD);
- end;
- dmColor: Shortint;
- dmDuplex: Shortint;
- dmYResolution: Shortint;
- dmTTOption: Shortint;
- dmCollate: Shortint;
- dmFormName: array [0..CCHFORMNAME - 1] of BYTE;
- dmLogPixels: WORD;
- dmBitsPerPel: DWORD;
- dmPelsWidth: DWORD;
- dmPelsHeight: DWORD;
- dmDisplayFlags: TDmDisplayFlagsUnion;
- dmDisplayFrequency: DWORD;
- dmICMMethod: DWORD;
- dmICMIntent: DWORD;
- dmMediaType: DWORD;
- dmDitherType: DWORD;
- dmReserved1: DWORD;
- dmReserved2: DWORD;
- {$IFDEF WIN98ME_UP_EXCEPT_NT4}
- dmPanningWidth: DWORD;
- dmPanningHeight: DWORD;
- {$ENDIF WIN98ME_UP_EXCEPT_NT4}
- end;
- {$EXTERNALSYM _devicemodeA}
- DEVMODEA = _devicemodeA;
- {$EXTERNALSYM DEVMODEA}
- PDEVMODEA = ^DEVMODEA;
- {$EXTERNALSYM PDEVMODEA}
- LPDEVMODEA = ^DEVMODEA;
- {$EXTERNALSYM LPDEVMODEA}
- NPDEVMODEA = ^DEVMODEA;
- {$EXTERNALSYM NPDEVMODEA}
- TDevModeA = _devicemodeA;
-
- _devicemodeW = record
- dmDeviceName: array [0..CCHDEVICENAME - 1] of WCHAR;
- dmSpecVersion: WORD;
- dmDriverVersion: WORD;
- dmSize: WORD;
- dmDriverExtra: WORD;
- dmFields: DWORD;
- union1: record
- case Integer of
- // printer only fields
- 0: (
- dmOrientation: Smallint;
- dmPaperSize: Smallint;
- dmPaperLength: Smallint;
- dmPaperWidth: Smallint;
- dmScale: Smallint;
- dmCopies: Smallint;
- dmDefaultSource: Smallint;
- dmPrintQuality: Smallint);
- // display only fields
- 1: (
- dmPosition: POINTL;
- dmDisplayOrientation: DWORD;
- dmDisplayFixedOutput: DWORD);
- end;
- dmColor: Shortint;
- dmDuplex: Shortint;
- dmYResolution: Shortint;
- dmTTOption: Shortint;
- dmCollate: Shortint;
- dmFormName: array [0..CCHFORMNAME - 1] of WCHAR;
- dmLogPixels: WORD;
- dmBitsPerPel: DWORD;
- dmPelsWidth: DWORD;
- dmPelsHeight: DWORD;
- dmDiusplayFlags: TDmDisplayFlagsUnion;
- dmDisplayFrequency: DWORD;
- dmICMMethod: DWORD;
- dmICMIntent: DWORD;
- dmMediaType: DWORD;
- dmDitherType: DWORD;
- dmReserved1: DWORD;
- dmReserved2: DWORD;
- {$IFDEF WIN98ME_UP_EXCEPT_NT4}
- dmPanningWidth: DWORD;
- dmPanningHeight: DWORD;
- {$ENDIF WIN98ME_UP_EXCEPT_NT4}
- end;
- {$EXTERNALSYM _devicemodeW}
- DEVMODEW = _devicemodeW;
- {$EXTERNALSYM DEVMODEW}
- PDEVMODEW = ^DEVMODEW;
- {$EXTERNALSYM PDEVMODEW}
- LPDEVMODEW = ^DEVMODEW;
- {$EXTERNALSYM LPDEVMODEW}
- NPDEVMODEW = ^DEVMODEW;
- {$EXTERNALSYM NPDEVMODEW}
- TDevModeW = _devicemodeW;
-
- {$IFDEF UNICODE}
- DEVMODE = DEVMODEW;
- {$EXTERNALSYM DEVMODE}
- PDEVMODE = PDEVMODEW;
- {$EXTERNALSYM PDEVMODE}
- NPDEVMODE = NPDEVMODEW;
- {$EXTERNALSYM NPDEVMODE}
- LPDEVMODE = LPDEVMODEW;
- {$EXTERNALSYM LPDEVMODE}
- TDevMode = TDevModeW;
- {$ELSE}
- DEVMODE = DEVMODEA;
- {$EXTERNALSYM DEVMODE}
- PDEVMODE = PDEVMODEA;
- {$EXTERNALSYM PDEVMODE}
- NPDEVMODE = NPDEVMODEA;
- {$EXTERNALSYM NPDEVMODE}
- LPDEVMODE = LPDEVMODEA;
- {$EXTERNALSYM LPDEVMODE}
- TDevMode = TDevModeA;
- {$ENDIF UNICODE}
-
-// current version of specification
-
-const
- {$IFDEF WIN98ME_UP_EXCEPT_NT4}
- DM_SPECVERSION = $0401;
- {$EXTERNALSYM DM_SPECVERSION}
- {$ELSE}
- DM_SPECVERSION = $0400;
- {$EXTERNALSYM DM_SPECVERSION}
- {$ENDIF WIN98ME_UP_EXCEPT_NT4}
-
-{$UNDEF WIN98ME_UP_EXCEPT_NT4}
-
-// field selection bits
-
-const
- DM_ORIENTATION = $00000001;
- {$EXTERNALSYM DM_ORIENTATION}
- DM_PAPERSIZE = $00000002;
- {$EXTERNALSYM DM_PAPERSIZE}
- DM_PAPERLENGTH = $00000004;
- {$EXTERNALSYM DM_PAPERLENGTH}
- DM_PAPERWIDTH = $00000008;
- {$EXTERNALSYM DM_PAPERWIDTH}
- DM_SCALE = $00000010;
- {$EXTERNALSYM DM_SCALE}
- DM_POSITION = $00000020;
- {$EXTERNALSYM DM_POSITION}
- DM_NUP = $00000040;
- {$EXTERNALSYM DM_NUP}
-//#if(WINVER >= 0x0501)
- DM_DISPLAYORIENTATION = $00000080;
- {$EXTERNALSYM DM_DISPLAYORIENTATION}
-//#endif /* WINVER >= 0x0501 */
- DM_COPIES = $00000100;
- {$EXTERNALSYM DM_COPIES}
- DM_DEFAULTSOURCE = $00000200;
- {$EXTERNALSYM DM_DEFAULTSOURCE}
- DM_PRINTQUALITY = $00000400;
- {$EXTERNALSYM DM_PRINTQUALITY}
- DM_COLOR = $00000800;
- {$EXTERNALSYM DM_COLOR}
- DM_DUPLEX = $00001000;
- {$EXTERNALSYM DM_DUPLEX}
- DM_YRESOLUTION = $00002000;
- {$EXTERNALSYM DM_YRESOLUTION}
- DM_TTOPTION = $00004000;
- {$EXTERNALSYM DM_TTOPTION}
- DM_COLLATE = $00008000;
- {$EXTERNALSYM DM_COLLATE}
- DM_FORMNAME = $00010000;
- {$EXTERNALSYM DM_FORMNAME}
- DM_LOGPIXELS = $00020000;
- {$EXTERNALSYM DM_LOGPIXELS}
- DM_BITSPERPEL = $00040000;
- {$EXTERNALSYM DM_BITSPERPEL}
- DM_PELSWIDTH = $00080000;
- {$EXTERNALSYM DM_PELSWIDTH}
- DM_PELSHEIGHT = $00100000;
- {$EXTERNALSYM DM_PELSHEIGHT}
- DM_DISPLAYFLAGS = $00200000;
- {$EXTERNALSYM DM_DISPLAYFLAGS}
- DM_DISPLAYFREQUENCY = $00400000;
- {$EXTERNALSYM DM_DISPLAYFREQUENCY}
- DM_ICMMETHOD = $00800000;
- {$EXTERNALSYM DM_ICMMETHOD}
- DM_ICMINTENT = $01000000;
- {$EXTERNALSYM DM_ICMINTENT}
- DM_MEDIATYPE = $02000000;
- {$EXTERNALSYM DM_MEDIATYPE}
- DM_DITHERTYPE = $04000000;
- {$EXTERNALSYM DM_DITHERTYPE}
- DM_PANNINGWIDTH = $08000000;
- {$EXTERNALSYM DM_PANNINGWIDTH}
- DM_PANNINGHEIGHT = $10000000;
- {$EXTERNALSYM DM_PANNINGHEIGHT}
-//#if(WINVER >= 0x0501)
- DM_DISPLAYFIXEDOUTPUT = $20000000;
- {$EXTERNALSYM DM_DISPLAYFIXEDOUTPUT}
-//#endif /* WINVER >= 0x0501 */
-
-// orientation selections
-
- DMORIENT_PORTRAIT = 1;
- {$EXTERNALSYM DMORIENT_PORTRAIT}
- DMORIENT_LANDSCAPE = 2;
- {$EXTERNALSYM DMORIENT_LANDSCAPE}
-
-// paper selections
-
- DMPAPER_LETTER = 1; // Letter 8 1/2 x 11 in
- {$EXTERNALSYM DMPAPER_LETTER}
- DMPAPER_FIRST = DMPAPER_LETTER;
- {$EXTERNALSYM DMPAPER_FIRST}
- DMPAPER_LETTERSMALL = 2; // Letter Small 8 1/2 x 11 in
- {$EXTERNALSYM DMPAPER_LETTERSMALL}
- DMPAPER_TABLOID = 3; // Tabloid 11 x 17 in
- {$EXTERNALSYM DMPAPER_TABLOID}
- DMPAPER_LEDGER = 4; // Ledger 17 x 11 in
- {$EXTERNALSYM DMPAPER_LEDGER}
- DMPAPER_LEGAL = 5; // Legal 8 1/2 x 14 in
- {$EXTERNALSYM DMPAPER_LEGAL}
- DMPAPER_STATEMENT = 6; // Statement 5 1/2 x 8 1/2 in
- {$EXTERNALSYM DMPAPER_STATEMENT}
- DMPAPER_EXECUTIVE = 7; // Executive 7 1/4 x 10 1/2 in
- {$EXTERNALSYM DMPAPER_EXECUTIVE}
- DMPAPER_A3 = 8; // A3 297 x 420 mm
- {$EXTERNALSYM DMPAPER_A3}
- DMPAPER_A4 = 9; // A4 210 x 297 mm
- {$EXTERNALSYM DMPAPER_A4}
- DMPAPER_A4SMALL = 10; // A4 Small 210 x 297 mm
- {$EXTERNALSYM DMPAPER_A4SMALL}
- DMPAPER_A5 = 11; // A5 148 x 210 mm
- {$EXTERNALSYM DMPAPER_A5}
- DMPAPER_B4 = 12; // B4 (JIS) 250 x 354
- {$EXTERNALSYM DMPAPER_B4}
- DMPAPER_B5 = 13; // B5 (JIS) 182 x 257 mm
- {$EXTERNALSYM DMPAPER_B5}
- DMPAPER_FOLIO = 14; // Folio 8 1/2 x 13 in
- {$EXTERNALSYM DMPAPER_FOLIO}
- DMPAPER_QUARTO = 15; // Quarto 215 x 275 mm
- {$EXTERNALSYM DMPAPER_QUARTO}
- DMPAPER_10X14 = 16; // 10x14 in
- {$EXTERNALSYM DMPAPER_10X14}
- DMPAPER_11X17 = 17; // 11x17 in
- {$EXTERNALSYM DMPAPER_11X17}
- DMPAPER_NOTE = 18; // Note 8 1/2 x 11 in
- {$EXTERNALSYM DMPAPER_NOTE}
- DMPAPER_ENV_9 = 19; // Envelope #9 3 7/8 x 8 7/8
- {$EXTERNALSYM DMPAPER_ENV_9}
- DMPAPER_ENV_10 = 20; // Envelope #10 4 1/8 x 9 1/2
- {$EXTERNALSYM DMPAPER_ENV_10}
- DMPAPER_ENV_11 = 21; // Envelope #11 4 1/2 x 10 3/8
- {$EXTERNALSYM DMPAPER_ENV_11}
- DMPAPER_ENV_12 = 22; // Envelope #12 4 \276 x 11
- {$EXTERNALSYM DMPAPER_ENV_12}
- DMPAPER_ENV_14 = 23; // Envelope #14 5 x 11 1/2
- {$EXTERNALSYM DMPAPER_ENV_14}
- DMPAPER_CSHEET = 24; // C size sheet
- {$EXTERNALSYM DMPAPER_CSHEET}
- DMPAPER_DSHEET = 25; // D size sheet
- {$EXTERNALSYM DMPAPER_DSHEET}
- DMPAPER_ESHEET = 26; // E size sheet
- {$EXTERNALSYM DMPAPER_ESHEET}
- DMPAPER_ENV_DL = 27; // Envelope DL 110 x 220mm
- {$EXTERNALSYM DMPAPER_ENV_DL}
- DMPAPER_ENV_C5 = 28; // Envelope C5 162 x 229 mm
- {$EXTERNALSYM DMPAPER_ENV_C5}
- DMPAPER_ENV_C3 = 29; // Envelope C3 324 x 458 mm
- {$EXTERNALSYM DMPAPER_ENV_C3}
- DMPAPER_ENV_C4 = 30; // Envelope C4 229 x 324 mm
- {$EXTERNALSYM DMPAPER_ENV_C4}
- DMPAPER_ENV_C6 = 31; // Envelope C6 114 x 162 mm
- {$EXTERNALSYM DMPAPER_ENV_C6}
- DMPAPER_ENV_C65 = 32; // Envelope C65 114 x 229 mm
- {$EXTERNALSYM DMPAPER_ENV_C65}
- DMPAPER_ENV_B4 = 33; // Envelope B4 250 x 353 mm
- {$EXTERNALSYM DMPAPER_ENV_B4}
- DMPAPER_ENV_B5 = 34; // Envelope B5 176 x 250 mm
- {$EXTERNALSYM DMPAPER_ENV_B5}
- DMPAPER_ENV_B6 = 35; // Envelope B6 176 x 125 mm
- {$EXTERNALSYM DMPAPER_ENV_B6}
- DMPAPER_ENV_ITALY = 36; // Envelope 110 x 230 mm
- {$EXTERNALSYM DMPAPER_ENV_ITALY}
- DMPAPER_ENV_MONARCH = 37; // Envelope Monarch 3.875 x 7.5 in
- {$EXTERNALSYM DMPAPER_ENV_MONARCH}
- DMPAPER_ENV_PERSONAL = 38; // 6 3/4 Envelope 3 5/8 x 6 1/2 in
- {$EXTERNALSYM DMPAPER_ENV_PERSONAL}
- DMPAPER_FANFOLD_US = 39; // US Std Fanfold 14 7/8 x 11 in
- {$EXTERNALSYM DMPAPER_FANFOLD_US}
- DMPAPER_FANFOLD_STD_GERMAN = 40; // German Std Fanfold 8 1/2 x 12 in
- {$EXTERNALSYM DMPAPER_FANFOLD_STD_GERMAN}
- DMPAPER_FANFOLD_LGL_GERMAN = 41; // German Legal Fanfold 8 1/2 x 13 in
- {$EXTERNALSYM DMPAPER_FANFOLD_LGL_GERMAN}
- DMPAPER_ISO_B4 = 42; // B4 (ISO) 250 x 353 mm
- {$EXTERNALSYM DMPAPER_ISO_B4}
- DMPAPER_JAPANESE_POSTCARD = 43; // Japanese Postcard 100 x 148 mm
- {$EXTERNALSYM DMPAPER_JAPANESE_POSTCARD}
- DMPAPER_9X11 = 44; // 9 x 11 in
- {$EXTERNALSYM DMPAPER_9X11}
- DMPAPER_10X11 = 45; // 10 x 11 in
- {$EXTERNALSYM DMPAPER_10X11}
- DMPAPER_15X11 = 46; // 15 x 11 in
- {$EXTERNALSYM DMPAPER_15X11}
- DMPAPER_ENV_INVITE = 47; // Envelope Invite 220 x 220 mm
- {$EXTERNALSYM DMPAPER_ENV_INVITE}
- DMPAPER_RESERVED_48 = 48; // RESERVED--DO NOT USE
- {$EXTERNALSYM DMPAPER_RESERVED_48}
- DMPAPER_RESERVED_49 = 49; // RESERVED--DO NOT USE
- {$EXTERNALSYM DMPAPER_RESERVED_49}
- DMPAPER_LETTER_EXTRA = 50; // Letter Extra 9 \275 x 12 in
- {$EXTERNALSYM DMPAPER_LETTER_EXTRA}
- DMPAPER_LEGAL_EXTRA = 51; // Legal Extra 9 \275 x 15 in
- {$EXTERNALSYM DMPAPER_LEGAL_EXTRA}
- DMPAPER_TABLOID_EXTRA = 52; // Tabloid Extra 11.69 x 18 in
- {$EXTERNALSYM DMPAPER_TABLOID_EXTRA}
- DMPAPER_A4_EXTRA = 53; // A4 Extra 9.27 x 12.69 in
- {$EXTERNALSYM DMPAPER_A4_EXTRA}
- DMPAPER_LETTER_TRANSVERSE = 54; // Letter Transverse 8 \275 x 11 in
- {$EXTERNALSYM DMPAPER_LETTER_TRANSVERSE}
- DMPAPER_A4_TRANSVERSE = 55; // A4 Transverse 210 x 297 mm
- {$EXTERNALSYM DMPAPER_A4_TRANSVERSE}
- DMPAPER_LETTER_EXTRA_TRANSVERSE = 56; // Letter Extra Transverse 9\275 x 12 in
- {$EXTERNALSYM DMPAPER_LETTER_EXTRA_TRANSVERSE}
- DMPAPER_A_PLUS = 57; // SuperA/SuperA/A4 227 x 356 mm
- {$EXTERNALSYM DMPAPER_A_PLUS}
- DMPAPER_B_PLUS = 58; // SuperB/SuperB/A3 305 x 487 mm
- {$EXTERNALSYM DMPAPER_B_PLUS}
- DMPAPER_LETTER_PLUS = 59; // Letter Plus 8.5 x 12.69 in
- {$EXTERNALSYM DMPAPER_LETTER_PLUS}
- DMPAPER_A4_PLUS = 60; // A4 Plus 210 x 330 mm
- {$EXTERNALSYM DMPAPER_A4_PLUS}
- DMPAPER_A5_TRANSVERSE = 61; // A5 Transverse 148 x 210 mm
- {$EXTERNALSYM DMPAPER_A5_TRANSVERSE}
- DMPAPER_B5_TRANSVERSE = 62; // B5 (JIS) Transverse 182 x 257 mm
- {$EXTERNALSYM DMPAPER_B5_TRANSVERSE}
- DMPAPER_A3_EXTRA = 63; // A3 Extra 322 x 445 mm
- {$EXTERNALSYM DMPAPER_A3_EXTRA}
- DMPAPER_A5_EXTRA = 64; // A5 Extra 174 x 235 mm
- {$EXTERNALSYM DMPAPER_A5_EXTRA}
- DMPAPER_B5_EXTRA = 65; // B5 (ISO) Extra 201 x 276 mm
- {$EXTERNALSYM DMPAPER_B5_EXTRA}
- DMPAPER_A2 = 66; // A2 420 x 594 mm
- {$EXTERNALSYM DMPAPER_A2}
- DMPAPER_A3_TRANSVERSE = 67; // A3 Transverse 297 x 420 mm
- {$EXTERNALSYM DMPAPER_A3_TRANSVERSE}
- DMPAPER_A3_EXTRA_TRANSVERSE = 68; // A3 Extra Transverse 322 x 445 mm
- {$EXTERNALSYM DMPAPER_A3_EXTRA_TRANSVERSE}
-
- DMPAPER_DBL_JAPANESE_POSTCARD = 69; // Japanese Double Postcard 200 x 148 mm
- {$EXTERNALSYM DMPAPER_DBL_JAPANESE_POSTCARD}
- DMPAPER_A6 = 70; // A6 105 x 148 mm
- {$EXTERNALSYM DMPAPER_A6}
- DMPAPER_JENV_KAKU2 = 71; // Japanese Envelope Kaku #2
- {$EXTERNALSYM DMPAPER_JENV_KAKU2}
- DMPAPER_JENV_KAKU3 = 72; // Japanese Envelope Kaku #3
- {$EXTERNALSYM DMPAPER_JENV_KAKU3}
- DMPAPER_JENV_CHOU3 = 73; // Japanese Envelope Chou #3
- {$EXTERNALSYM DMPAPER_JENV_CHOU3}
- DMPAPER_JENV_CHOU4 = 74; // Japanese Envelope Chou #4
- {$EXTERNALSYM DMPAPER_JENV_CHOU4}
- DMPAPER_LETTER_ROTATED = 75; // Letter Rotated 11 x 8 1/2 11 in
- {$EXTERNALSYM DMPAPER_LETTER_ROTATED}
- DMPAPER_A3_ROTATED = 76; // A3 Rotated 420 x 297 mm
- {$EXTERNALSYM DMPAPER_A3_ROTATED}
- DMPAPER_A4_ROTATED = 77; // A4 Rotated 297 x 210 mm
- {$EXTERNALSYM DMPAPER_A4_ROTATED}
- DMPAPER_A5_ROTATED = 78; // A5 Rotated 210 x 148 mm
- {$EXTERNALSYM DMPAPER_A5_ROTATED}
- DMPAPER_B4_JIS_ROTATED = 79; // B4 (JIS) Rotated 364 x 257 mm
- {$EXTERNALSYM DMPAPER_B4_JIS_ROTATED}
- DMPAPER_B5_JIS_ROTATED = 80; // B5 (JIS) Rotated 257 x 182 mm
- {$EXTERNALSYM DMPAPER_B5_JIS_ROTATED}
- DMPAPER_JAPANESE_POSTCARD_ROTATED = 81; // Japanese Postcard Rotated 148 x 100 mm
- {$EXTERNALSYM DMPAPER_JAPANESE_POSTCARD_ROTATED}
- DMPAPER_DBL_JAPANESE_POSTCARD_ROTATED = 82; // Double Japanese Postcard Rotated 148 x 200 mm
- {$EXTERNALSYM DMPAPER_DBL_JAPANESE_POSTCARD_ROTATED}
- DMPAPER_A6_ROTATED = 83; // A6 Rotated 148 x 105 mm
- {$EXTERNALSYM DMPAPER_A6_ROTATED}
- DMPAPER_JENV_KAKU2_ROTATED = 84; // Japanese Envelope Kaku #2 Rotated
- {$EXTERNALSYM DMPAPER_JENV_KAKU2_ROTATED}
- DMPAPER_JENV_KAKU3_ROTATED = 85; // Japanese Envelope Kaku #3 Rotated
- {$EXTERNALSYM DMPAPER_JENV_KAKU3_ROTATED}
- DMPAPER_JENV_CHOU3_ROTATED = 86; // Japanese Envelope Chou #3 Rotated
- {$EXTERNALSYM DMPAPER_JENV_CHOU3_ROTATED}
- DMPAPER_JENV_CHOU4_ROTATED = 87; // Japanese Envelope Chou #4 Rotated
- {$EXTERNALSYM DMPAPER_JENV_CHOU4_ROTATED}
- DMPAPER_B6_JIS = 88; // B6 (JIS) 128 x 182 mm
- {$EXTERNALSYM DMPAPER_B6_JIS}
- DMPAPER_B6_JIS_ROTATED = 89; // B6 (JIS) Rotated 182 x 128 mm
- {$EXTERNALSYM DMPAPER_B6_JIS_ROTATED}
- DMPAPER_12X11 = 90; // 12 x 11 in
- {$EXTERNALSYM DMPAPER_12X11}
- DMPAPER_JENV_YOU4 = 91; // Japanese Envelope You #4
- {$EXTERNALSYM DMPAPER_JENV_YOU4}
- DMPAPER_JENV_YOU4_ROTATED = 92; // Japanese Envelope You #4 Rotated
- {$EXTERNALSYM DMPAPER_JENV_YOU4_ROTATED}
- DMPAPER_P16K = 93; // PRC 16K 146 x 215 mm
- {$EXTERNALSYM DMPAPER_P16K}
- DMPAPER_P32K = 94; // PRC 32K 97 x 151 mm
- {$EXTERNALSYM DMPAPER_P32K}
- DMPAPER_P32KBIG = 95; // PRC 32K(Big) 97 x 151 mm
- {$EXTERNALSYM DMPAPER_P32KBIG}
- DMPAPER_PENV_1 = 96; // PRC Envelope #1 102 x 165 mm
- {$EXTERNALSYM DMPAPER_PENV_1}
- DMPAPER_PENV_2 = 97; // PRC Envelope #2 102 x 176 mm
- {$EXTERNALSYM DMPAPER_PENV_2}
- DMPAPER_PENV_3 = 98; // PRC Envelope #3 125 x 176 mm
- {$EXTERNALSYM DMPAPER_PENV_3}
- DMPAPER_PENV_4 = 99; // PRC Envelope #4 110 x 208 mm
- {$EXTERNALSYM DMPAPER_PENV_4}
- DMPAPER_PENV_5 = 100; // PRC Envelope #5 110 x 220 mm
- {$EXTERNALSYM DMPAPER_PENV_5}
- DMPAPER_PENV_6 = 101; // PRC Envelope #6 120 x 230 mm
- {$EXTERNALSYM DMPAPER_PENV_6}
- DMPAPER_PENV_7 = 102; // PRC Envelope #7 160 x 230 mm
- {$EXTERNALSYM DMPAPER_PENV_7}
- DMPAPER_PENV_8 = 103; // PRC Envelope #8 120 x 309 mm
- {$EXTERNALSYM DMPAPER_PENV_8}
- DMPAPER_PENV_9 = 104; // PRC Envelope #9 229 x 324 mm
- {$EXTERNALSYM DMPAPER_PENV_9}
- DMPAPER_PENV_10 = 105; // PRC Envelope #10 324 x 458 mm
- {$EXTERNALSYM DMPAPER_PENV_10}
- DMPAPER_P16K_ROTATED = 106; // PRC 16K Rotated
- {$EXTERNALSYM DMPAPER_P16K_ROTATED}
- DMPAPER_P32K_ROTATED = 107; // PRC 32K Rotated
- {$EXTERNALSYM DMPAPER_P32K_ROTATED}
- DMPAPER_P32KBIG_ROTATED = 108; // PRC 32K(Big) Rotated
- {$EXTERNALSYM DMPAPER_P32KBIG_ROTATED}
- DMPAPER_PENV_1_ROTATED = 109; // PRC Envelope #1 Rotated 165 x 102 mm
- {$EXTERNALSYM DMPAPER_PENV_1_ROTATED}
- DMPAPER_PENV_2_ROTATED = 110; // PRC Envelope #2 Rotated 176 x 102 mm
- {$EXTERNALSYM DMPAPER_PENV_2_ROTATED}
- DMPAPER_PENV_3_ROTATED = 111; // PRC Envelope #3 Rotated 176 x 125 mm
- {$EXTERNALSYM DMPAPER_PENV_3_ROTATED}
- DMPAPER_PENV_4_ROTATED = 112; // PRC Envelope #4 Rotated 208 x 110 mm
- {$EXTERNALSYM DMPAPER_PENV_4_ROTATED}
- DMPAPER_PENV_5_ROTATED = 113; // PRC Envelope #5 Rotated 220 x 110 mm
- {$EXTERNALSYM DMPAPER_PENV_5_ROTATED}
- DMPAPER_PENV_6_ROTATED = 114; // PRC Envelope #6 Rotated 230 x 120 mm
- {$EXTERNALSYM DMPAPER_PENV_6_ROTATED}
- DMPAPER_PENV_7_ROTATED = 115; // PRC Envelope #7 Rotated 230 x 160 mm
- {$EXTERNALSYM DMPAPER_PENV_7_ROTATED}
- DMPAPER_PENV_8_ROTATED = 116; // PRC Envelope #8 Rotated 309 x 120 mm
- {$EXTERNALSYM DMPAPER_PENV_8_ROTATED}
- DMPAPER_PENV_9_ROTATED = 117; // PRC Envelope #9 Rotated 324 x 229 mm
- {$EXTERNALSYM DMPAPER_PENV_9_ROTATED}
- DMPAPER_PENV_10_ROTATED = 118; // PRC Envelope #10 Rotated 458 x 324 mm
- {$EXTERNALSYM DMPAPER_PENV_10_ROTATED}
-
- {$IFDEF WIN98ME_UP}
- DMPAPER_LAST = DMPAPER_PENV_10_ROTATED;
- {$EXTERNALSYM DMPAPER_LAST}
- {$ELSE}
- DMPAPER_LAST = DMPAPER_A3_EXTRA_TRANSVERSE;
- {$EXTERNALSYM DMPAPER_LAST}
- {$ENDIF WIN98ME_UP}
-
- DMPAPER_USER = 256;
- {$EXTERNALSYM DMPAPER_USER}
-
-// bin selections
-
- DMBIN_UPPER = 1;
- {$EXTERNALSYM DMBIN_UPPER}
- DMBIN_FIRST = DMBIN_UPPER;
- {$EXTERNALSYM DMBIN_FIRST}
- DMBIN_ONLYONE = 1;
- {$EXTERNALSYM DMBIN_ONLYONE}
- DMBIN_LOWER = 2;
- {$EXTERNALSYM DMBIN_LOWER}
- DMBIN_MIDDLE = 3;
- {$EXTERNALSYM DMBIN_MIDDLE}
- DMBIN_MANUAL = 4;
- {$EXTERNALSYM DMBIN_MANUAL}
- DMBIN_ENVELOPE = 5;
- {$EXTERNALSYM DMBIN_ENVELOPE}
- DMBIN_ENVMANUAL = 6;
- {$EXTERNALSYM DMBIN_ENVMANUAL}
- DMBIN_AUTO = 7;
- {$EXTERNALSYM DMBIN_AUTO}
- DMBIN_TRACTOR = 8;
- {$EXTERNALSYM DMBIN_TRACTOR}
- DMBIN_SMALLFMT = 9;
- {$EXTERNALSYM DMBIN_SMALLFMT}
- DMBIN_LARGEFMT = 10;
- {$EXTERNALSYM DMBIN_LARGEFMT}
- DMBIN_LARGECAPACITY = 11;
- {$EXTERNALSYM DMBIN_LARGECAPACITY}
- DMBIN_CASSETTE = 14;
- {$EXTERNALSYM DMBIN_CASSETTE}
- DMBIN_FORMSOURCE = 15;
- {$EXTERNALSYM DMBIN_FORMSOURCE}
- DMBIN_LAST = DMBIN_FORMSOURCE;
- {$EXTERNALSYM DMBIN_LAST}
-
- DMBIN_USER = 256; // device specific bins start here
- {$EXTERNALSYM DMBIN_USER}
-
-// print qualities
-
- DMRES_DRAFT = DWORD(-1);
- {$EXTERNALSYM DMRES_DRAFT}
- DMRES_LOW = DWORD(-2);
- {$EXTERNALSYM DMRES_LOW}
- DMRES_MEDIUM = DWORD(-3);
- {$EXTERNALSYM DMRES_MEDIUM}
- DMRES_HIGH = DWORD(-4);
- {$EXTERNALSYM DMRES_HIGH}
-
-// color enable/disable for color printers
-
- DMCOLOR_MONOCHROME = 1;
- {$EXTERNALSYM DMCOLOR_MONOCHROME}
- DMCOLOR_COLOR = 2;
- {$EXTERNALSYM DMCOLOR_COLOR}
-
-// duplex enable
-
- DMDUP_SIMPLEX = 1;
- {$EXTERNALSYM DMDUP_SIMPLEX}
- DMDUP_VERTICAL = 2;
- {$EXTERNALSYM DMDUP_VERTICAL}
- DMDUP_HORIZONTAL = 3;
- {$EXTERNALSYM DMDUP_HORIZONTAL}
-
-// TrueType options
-
- DMTT_BITMAP = 1; // print TT fonts as graphics
- {$EXTERNALSYM DMTT_BITMAP}
- DMTT_DOWNLOAD = 2; // download TT fonts as soft fonts
- {$EXTERNALSYM DMTT_DOWNLOAD}
- DMTT_SUBDEV = 3; // substitute device fonts for TT fonts
- {$EXTERNALSYM DMTT_SUBDEV}
- DMTT_DOWNLOAD_OUTLINE = 4; // download TT fonts as outline soft fonts
- {$EXTERNALSYM DMTT_DOWNLOAD_OUTLINE}
-
-// Collation selections
-
- DMCOLLATE_FALSE = 0;
- {$EXTERNALSYM DMCOLLATE_FALSE}
- DMCOLLATE_TRUE = 1;
- {$EXTERNALSYM DMCOLLATE_TRUE}
-
-//#if(WINVER >= 0x0501)
-
-// DEVMODE dmDisplayOrientation specifiations
-
- DMDO_DEFAULT = 0;
- {$EXTERNALSYM DMDO_DEFAULT}
- DMDO_90 = 1;
- {$EXTERNALSYM DMDO_90}
- DMDO_180 = 2;
- {$EXTERNALSYM DMDO_180}
- DMDO_270 = 3;
- {$EXTERNALSYM DMDO_270}
-
-// DEVMODE dmDisplayFixedOutput specifiations
-
- DMDFO_DEFAULT = 0;
- {$EXTERNALSYM DMDFO_DEFAULT}
- DMDFO_STRETCH = 1;
- {$EXTERNALSYM DMDFO_STRETCH}
- DMDFO_CENTER = 2;
- {$EXTERNALSYM DMDFO_CENTER}
-
-//#endif /* WINVER >= 0x0501 */
-
-// DEVMODE dmDisplayFlags flags
-
-// #define DM_GRAYSCALE 0x00000001 /* This flag is no longer valid */
-// #define DM_INTERLACED 0x00000002 /* This flag is no longer valid */
-
- DMDISPLAYFLAGS_TEXTMODE = $00000004;
- {$EXTERNALSYM DMDISPLAYFLAGS_TEXTMODE}
-
-// dmNup , multiple logical page per physical page options
-
- DMNUP_SYSTEM = 1;
- {$EXTERNALSYM DMNUP_SYSTEM}
- DMNUP_ONEUP = 2;
- {$EXTERNALSYM DMNUP_ONEUP}
-
-// ICM methods
-
- DMICMMETHOD_NONE = 1; // ICM disabled
- {$EXTERNALSYM DMICMMETHOD_NONE}
- DMICMMETHOD_SYSTEM = 2; // ICM handled by system
- {$EXTERNALSYM DMICMMETHOD_SYSTEM}
- DMICMMETHOD_DRIVER = 3; // ICM handled by driver
- {$EXTERNALSYM DMICMMETHOD_DRIVER}
- DMICMMETHOD_DEVICE = 4; // ICM handled by device
- {$EXTERNALSYM DMICMMETHOD_DEVICE}
-
- DMICMMETHOD_USER = 256; // Device-specific methods start here
- {$EXTERNALSYM DMICMMETHOD_USER}
-
-// ICM Intents
-
- DMICM_SATURATE = 1; // Maximize color saturation
- {$EXTERNALSYM DMICM_SATURATE}
- DMICM_CONTRAST = 2; // Maximize color contrast
- {$EXTERNALSYM DMICM_CONTRAST}
- DMICM_COLORIMETRIC = 3; // Use specific color metric
- {$EXTERNALSYM DMICM_COLORIMETRIC}
- DMICM_ABS_COLORIMETRIC = 4; // Use specific color metric
- {$EXTERNALSYM DMICM_ABS_COLORIMETRIC}
-
- DMICM_USER = 256; // Device-specific intents start here
- {$EXTERNALSYM DMICM_USER}
-
-// Media types
-
- DMMEDIA_STANDARD = 1; // Standard paper
- {$EXTERNALSYM DMMEDIA_STANDARD}
- DMMEDIA_TRANSPARENCY = 2; // Transparency
- {$EXTERNALSYM DMMEDIA_TRANSPARENCY}
- DMMEDIA_GLOSSY = 3; // Glossy paper
- {$EXTERNALSYM DMMEDIA_GLOSSY}
-
- DMMEDIA_USER = 256; // Device-specific media start here
- {$EXTERNALSYM DMMEDIA_USER}
-
-// Dither types
-
- DMDITHER_NONE = 1; // No dithering
- {$EXTERNALSYM DMDITHER_NONE}
- DMDITHER_COARSE = 2; // Dither with a coarse brush
- {$EXTERNALSYM DMDITHER_COARSE}
- DMDITHER_FINE = 3; // Dither with a fine brush
- {$EXTERNALSYM DMDITHER_FINE}
- DMDITHER_LINEART = 4; // LineArt dithering
- {$EXTERNALSYM DMDITHER_LINEART}
- DMDITHER_ERRORDIFFUSION = 5; // LineArt dithering
- {$EXTERNALSYM DMDITHER_ERRORDIFFUSION}
- DMDITHER_RESERVED6 = 6; // LineArt dithering
- {$EXTERNALSYM DMDITHER_RESERVED6}
- DMDITHER_RESERVED7 = 7; // LineArt dithering
- {$EXTERNALSYM DMDITHER_RESERVED7}
- DMDITHER_RESERVED8 = 8; // LineArt dithering
- {$EXTERNALSYM DMDITHER_RESERVED8}
- DMDITHER_RESERVED9 = 9; // LineArt dithering
- {$EXTERNALSYM DMDITHER_RESERVED9}
- DMDITHER_GRAYSCALE = 10; // Device does grayscaling
- {$EXTERNALSYM DMDITHER_GRAYSCALE}
-
- DMDITHER_USER = 256; // Device-specific dithers start here
- {$EXTERNALSYM DMDITHER_USER}
-
-type
- PDisplayDeviceA = ^TDisplayDeviceA;
- _DISPLAY_DEVICEA = record
- cb: DWORD;
- DeviceName: array [0..32 - 1] of CHAR;
- DeviceString: array [0..128 - 1] of CHAR;
- StateFlags: DWORD;
- DeviceID: array [0..128 - 1] of CHAR;
- DeviceKey: array [0..128 - 1] of CHAR;
- end;
- {$EXTERNALSYM _DISPLAY_DEVICEA}
- DISPLAY_DEVICEA = _DISPLAY_DEVICEA;
- {$EXTERNALSYM DISPLAY_DEVICEA}
- LPDISPLAY_DEVICEA = ^DISPLAY_DEVICEA;
- {$EXTERNALSYM LPDISPLAY_DEVICEA}
- PDISPLAY_DEVICEA = ^DISPLAY_DEVICEA;
- {$EXTERNALSYM PDISPLAY_DEVICEA}
- TDisplayDeviceA = _DISPLAY_DEVICEA;
-
- PDisplayDeviceW = ^TDisplayDeviceW;
- _DISPLAY_DEVICEW = record
- cb: DWORD;
- DeviceName: array [0..32 - 1] of WCHAR;
- DeviceString: array [0..128 - 1] of WCHAR;
- StateFlags: DWORD;
- DeviceID: array [0..128 - 1] of WCHAR;
- DeviceKey: array [0..128 - 1] of WCHAR;
- end;
- {$EXTERNALSYM _DISPLAY_DEVICEW}
- DISPLAY_DEVICEW = _DISPLAY_DEVICEW;
- {$EXTERNALSYM DISPLAY_DEVICEW}
- LPDISPLAY_DEVICEW = ^DISPLAY_DEVICEW;
- {$EXTERNALSYM LPDISPLAY_DEVICEW}
- PDISPLAY_DEVICEW = ^DISPLAY_DEVICEW;
- {$EXTERNALSYM PDISPLAY_DEVICEW}
- TDisplayDeviceW = _DISPLAY_DEVICEW;
-
- {$IFDEF UNICODE}
- DISPLAY_DEVICE = DISPLAY_DEVICEW;
- {$EXTERNALSYM DISPLAY_DEVICE}
- PDISPLAY_DEVICE = PDISPLAY_DEVICEW;
- {$EXTERNALSYM PDISPLAY_DEVICE}
- LPDISPLAY_DEVICE = LPDISPLAY_DEVICEW;
- {$EXTERNALSYM LPDISPLAY_DEVICE}
- TDisplayDevice = TDisplayDeviceW;
- PDisplayDevice = PDisplayDeviceW;
- {$ELSE}
- DISPLAY_DEVICE = DISPLAY_DEVICEA;
- {$EXTERNALSYM DISPLAY_DEVICE}
- PDISPLAY_DEVICE = PDISPLAY_DEVICEA;
- {$EXTERNALSYM PDISPLAY_DEVICE}
- LPDISPLAY_DEVICE = LPDISPLAY_DEVICEA;
- {$EXTERNALSYM LPDISPLAY_DEVICE}
- TDisplayDevice = TDisplayDeviceA;
- PDisplayDevice = PDisplayDeviceA;
- {$ENDIF UNICODE}
-
-const
- DISPLAY_DEVICE_ATTACHED_TO_DESKTOP = $00000001;
- {$EXTERNALSYM DISPLAY_DEVICE_ATTACHED_TO_DESKTOP}
- DISPLAY_DEVICE_MULTI_DRIVER = $00000002;
- {$EXTERNALSYM DISPLAY_DEVICE_MULTI_DRIVER}
- DISPLAY_DEVICE_PRIMARY_DEVICE = $00000004;
- {$EXTERNALSYM DISPLAY_DEVICE_PRIMARY_DEVICE}
- DISPLAY_DEVICE_MIRRORING_DRIVER = $00000008;
- {$EXTERNALSYM DISPLAY_DEVICE_MIRRORING_DRIVER}
- DISPLAY_DEVICE_VGA_COMPATIBLE = $00000010;
- {$EXTERNALSYM DISPLAY_DEVICE_VGA_COMPATIBLE}
- DISPLAY_DEVICE_REMOVABLE = $00000020;
- {$EXTERNALSYM DISPLAY_DEVICE_REMOVABLE}
- DISPLAY_DEVICE_MODESPRUNED = $08000000;
- {$EXTERNALSYM DISPLAY_DEVICE_MODESPRUNED}
- DISPLAY_DEVICE_REMOTE = $04000000;
- {$EXTERNALSYM DISPLAY_DEVICE_REMOTE}
- DISPLAY_DEVICE_DISCONNECT = $02000000;
- {$EXTERNALSYM DISPLAY_DEVICE_DISCONNECT}
-
-// Child device state
-
- DISPLAY_DEVICE_ACTIVE = $00000001;
- {$EXTERNALSYM DISPLAY_DEVICE_ACTIVE}
- DISPLAY_DEVICE_ATTACHED = $00000002;
- {$EXTERNALSYM DISPLAY_DEVICE_ATTACHED}
-
-// GetRegionData/ExtCreateRegion
-
- RDH_RECTANGLES = 1;
- {$EXTERNALSYM RDH_RECTANGLES}
-
-type
- PRgnDataHeader = ^TRgnDataHeader;
- _RGNDATAHEADER = record
- dwSize: DWORD;
- iType: DWORD;
- nCount: DWORD;
- nRgnSize: DWORD;
- rcBound: RECT;
- end;
- {$EXTERNALSYM _RGNDATAHEADER}
- RGNDATAHEADER = _RGNDATAHEADER;
- {$EXTERNALSYM RGNDATAHEADER}
- TRgnDataHeader = _RGNDATAHEADER;
-
- PRgnData = ^TRgnData;
- _RGNDATA = record
- rdh: RGNDATAHEADER;
- Buffer: array [0..0] of Char;
- end;
- {$EXTERNALSYM _RGNDATA}
- RGNDATA = _RGNDATA;
- {$EXTERNALSYM RGNDATA}
- LPRGNDATA = ^RGNDATA;
- {$EXTERNALSYM LPRGNDATA}
- NPRGNDATA = ^RGNDATA;
- {$EXTERNALSYM NPRGNDATA}
- TRgnData = _RGNDATA;
-
-// for GetRandomRgn
-
-const
- SYSRGN = 4;
- {$EXTERNALSYM SYSRGN}
-
-type
- PAbc = ^TAbc;
- _ABC = record
- abcA: Integer;
- abcB: UINT;
- abcC: Integer;
- end;
- {$EXTERNALSYM _ABC}
- ABC = _ABC;
- {$EXTERNALSYM ABC}
- LPABC = ^ABC;
- {$EXTERNALSYM LPABC}
- NPABC = ^ABC;
- {$EXTERNALSYM NPABC}
- TAbc = _ABC;
-
- PAbcFloat = ^TAbcFloat;
- _ABCFLOAT = record
- abcfA: FLOAT;
- abcfB: FLOAT;
- abcfC: FLOAT;
- end;
- {$EXTERNALSYM _ABCFLOAT}
- ABCFLOAT = _ABCFLOAT;
- {$EXTERNALSYM ABCFLOAT}
- LPABCFLOAT = ^ABCFLOAT;
- {$EXTERNALSYM LPABCFLOAT}
- NPABCFLOAT = ^ABCFLOAT;
- {$EXTERNALSYM NPABCFLOAT}
- TAbcFloat = _ABCFLOAT;
-
- POutlineTextMetricA = ^TOutlineTextMetricA;
- _OUTLINETEXTMETRICA = record
- otmSize: UINT;
- otmTextMetrics: TEXTMETRICA;
- otmFiller: BYTE;
- otmPanoseNumber: PANOSE;
- otmfsSelection: UINT;
- otmfsType: UINT;
- otmsCharSlopeRise: Integer;
- otmsCharSlopeRun: Integer;
- otmItalicAngle: Integer;
- otmEMSquare: UINT;
- otmAscent: Integer;
- otmDescent: Integer;
- otmLineGap: UINT;
- otmsCapEmHeight: UINT;
- otmsXHeight: UINT;
- otmrcFontBox: RECT;
- otmMacAscent: Integer;
- otmMacDescent: Integer;
- otmMacLineGap: UINT;
- otmusMinimumPPEM: UINT;
- otmptSubscriptSize: POINT;
- otmptSubscriptOffset: POINT;
- otmptSuperscriptSize: POINT;
- otmptSuperscriptOffset: POINT;
- otmsStrikeoutSize: UINT;
- otmsStrikeoutPosition: Integer;
- otmsUnderscoreSize: Integer;
- otmsUnderscorePosition: Integer;
- otmpFamilyName: PSTR;
- otmpFaceName: PSTR;
- otmpStyleName: PSTR;
- otmpFullName: PSTR;
- end;
- {$EXTERNALSYM _OUTLINETEXTMETRICA}
- OUTLINETEXTMETRICA = _OUTLINETEXTMETRICA;
- {$EXTERNALSYM OUTLINETEXTMETRICA}
- LPOUTLINETEXTMETRICA = ^OUTLINETEXTMETRICA;
- {$EXTERNALSYM LPOUTLINETEXTMETRICA}
- NPOUTLINETEXTMETRICA = ^OUTLINETEXTMETRICA;
- {$EXTERNALSYM NPOUTLINETEXTMETRICA}
- TOutlineTextMetricA = _OUTLINETEXTMETRICA;
-
- POutlineTextMetricW = ^TOutlineTextMetricW;
- _OUTLINETEXTMETRICW = record
- otmSize: UINT;
- otmTextMetrics: TEXTMETRICW;
- otmFiller: BYTE;
- otmPanoseNumber: PANOSE;
- otmfsSelection: UINT;
- otmfsType: UINT;
- otmsCharSlopeRise: Integer;
- otmsCharSlopeRun: Integer;
- otmItalicAngle: Integer;
- otmEMSquare: UINT;
- otmAscent: Integer;
- otmDescent: Integer;
- otmLineGap: UINT;
- otmsCapEmHeight: UINT;
- otmsXHeight: UINT;
- otmrcFontBox: RECT;
- otmMacAscent: Integer;
- otmMacDescent: Integer;
- otmMacLineGap: UINT;
- otmusMinimumPPEM: UINT;
- otmptSubscriptSize: POINT;
- otmptSubscriptOffset: POINT;
- otmptSuperscriptSize: POINT;
- otmptSuperscriptOffset: POINT;
- otmsStrikeoutSize: UINT;
- otmsStrikeoutPosition: Integer;
- otmsUnderscoreSize: Integer;
- otmsUnderscorePosition: Integer;
- otmpFamilyName: PSTR;
- otmpFaceName: PSTR;
- otmpStyleName: PSTR;
- otmpFullName: PSTR;
- end;
- {$EXTERNALSYM _OUTLINETEXTMETRICW}
- OUTLINETEXTMETRICW = _OUTLINETEXTMETRICW;
- {$EXTERNALSYM OUTLINETEXTMETRICW}
- LPOUTLINETEXTMETRICW = ^OUTLINETEXTMETRICW;
- {$EXTERNALSYM LPOUTLINETEXTMETRICW}
- NPOUTLINETEXTMETRICW = ^OUTLINETEXTMETRICW;
- {$EXTERNALSYM NPOUTLINETEXTMETRICW}
- TOutlineTextMetricW = _OUTLINETEXTMETRICW;
-
- {$IFDEF UNICODE}
- OUTLINETEXTMETRIC = OUTLINETEXTMETRICW;
- {$EXTERNALSYM OUTLINETEXTMETRIC}
- POUTLINETEXTMETRIC = POUTLINETEXTMETRICW;
- {$EXTERNALSYM POUTLINETEXTMETRIC}
- NPOUTLINETEXTMETRIC = NPOUTLINETEXTMETRICW;
- {$EXTERNALSYM NPOUTLINETEXTMETRIC}
- LPOUTLINETEXTMETRIC = LPOUTLINETEXTMETRICW;
- {$EXTERNALSYM LPOUTLINETEXTMETRIC}
- TOutlineTextMetric = TOutlineTextMetricW;
- {$ELSE}
- OUTLINETEXTMETRIC = OUTLINETEXTMETRICA;
- {$EXTERNALSYM OUTLINETEXTMETRIC}
- POUTLINETEXTMETRIC = POUTLINETEXTMETRICA;
- {$EXTERNALSYM POUTLINETEXTMETRIC}
- NPOUTLINETEXTMETRIC = NPOUTLINETEXTMETRICA;
- {$EXTERNALSYM NPOUTLINETEXTMETRIC}
- LPOUTLINETEXTMETRIC = LPOUTLINETEXTMETRICA;
- {$EXTERNALSYM LPOUTLINETEXTMETRIC}
- TOutlineTextMetric = TOutlineTextMetricA;
- {$ENDIF UNICODE}
-
- PPolytextA = ^TPolytextA;
- tagPOLYTEXTA = record
- x: Integer;
- y: Integer;
- n: UINT;
- lpstr: LPCSTR;
- uiFlags: UINT;
- rcl: RECT;
- pdx: PINT;
- end;
- {$EXTERNALSYM tagPOLYTEXTA}
- POLYTEXTA = tagPOLYTEXTA;
- {$EXTERNALSYM POLYTEXTA}
- LPPOLYTEXTA = ^POLYTEXTA;
- {$EXTERNALSYM LPPOLYTEXTA}
- NPPOLYTEXTA = ^POLYTEXTA;
- {$EXTERNALSYM NPPOLYTEXTA}
- TPolytextA = POLYTEXTA;
-
- PPolytextW = ^TPolytextW;
- tagPOLYTEXTW = record
- x: Integer;
- y: Integer;
- n: UINT;
- lpstr: LPCWSTR;
- uiFlags: UINT;
- rcl: RECT;
- pdx: PINT;
- end;
- {$EXTERNALSYM tagPOLYTEXTW}
- POLYTEXTW = tagPOLYTEXTW;
- {$EXTERNALSYM POLYTEXTW}
- LPPOLYTEXTW = ^POLYTEXTW;
- {$EXTERNALSYM LPPOLYTEXTW}
- NPPOLYTEXTW = ^POLYTEXTW;
- {$EXTERNALSYM NPPOLYTEXTW}
- TPolytextW = POLYTEXTW;
-
- {$IFDEF UNICODE}
- POLYTEXT = POLYTEXTW;
- {$EXTERNALSYM POLYTEXT}
- PPOLYTEXT = PPOLYTEXTW;
- {$EXTERNALSYM PPOLYTEXT}
- NPPOLYTEXT = NPPOLYTEXTW;
- {$EXTERNALSYM NPPOLYTEXT}
- LPPOLYTEXT = LPPOLYTEXTW;
- {$EXTERNALSYM LPPOLYTEXT}
- TPolyText = TPolyTextW;
- {$ELSE}
- POLYTEXT = POLYTEXTA;
- {$EXTERNALSYM POLYTEXT}
- PPOLYTEXT = PPOLYTEXTA;
- {$EXTERNALSYM PPOLYTEXT}
- NPPOLYTEXT = NPPOLYTEXTA;
- {$EXTERNALSYM NPPOLYTEXT}
- LPPOLYTEXT = LPPOLYTEXTA;
- {$EXTERNALSYM LPPOLYTEXT}
- TPolyText = TPolyTextA;
- {$ENDIF UNICODE}
-
- PFixed = ^TFixed;
- _FIXED = record
- fract: WORD;
- value: short;
- end;
- {$EXTERNALSYM _FIXED}
- FIXED = _FIXED;
- {$EXTERNALSYM FIXED}
- TFixed = _FIXED;
-
- PMat2 = ^TMat2;
- _MAT2 = record
- eM11: FIXED;
- eM12: FIXED;
- eM21: FIXED;
- eM22: FIXED;
- end;
- {$EXTERNALSYM _MAT2}
- MAT2 = _MAT2;
- {$EXTERNALSYM MAT2}
- LPMAT2 = ^MAT2;
- {$EXTERNALSYM LPMAT2}
- TMat2 = _MAT2;
-
- PGlyphMetrics = ^TGlyphMetrics;
- _GLYPHMETRICS = record
- gmBlackBoxX: UINT;
- gmBlackBoxY: UINT;
- gmptGlyphOrigin: POINT;
- gmCellIncX: short;
- gmCellIncY: short;
- end;
- {$EXTERNALSYM _GLYPHMETRICS}
- GLYPHMETRICS = _GLYPHMETRICS;
- {$EXTERNALSYM GLYPHMETRICS}
- LPGLYPHMETRICS = ^GLYPHMETRICS;
- {$EXTERNALSYM LPGLYPHMETRICS}
- TGlyphMetrics = _GLYPHMETRICS;
-
-// GetGlyphOutline constants
-
-const
- GGO_METRICS = 0;
- {$EXTERNALSYM GGO_METRICS}
- GGO_BITMAP = 1;
- {$EXTERNALSYM GGO_BITMAP}
- GGO_NATIVE = 2;
- {$EXTERNALSYM GGO_NATIVE}
- GGO_BEZIER = 3;
- {$EXTERNALSYM GGO_BEZIER}
-
- GGO_GRAY2_BITMAP = 4;
- {$EXTERNALSYM GGO_GRAY2_BITMAP}
- GGO_GRAY4_BITMAP = 5;
- {$EXTERNALSYM GGO_GRAY4_BITMAP}
- GGO_GRAY8_BITMAP = 6;
- {$EXTERNALSYM GGO_GRAY8_BITMAP}
- GGO_GLYPH_INDEX = $0080;
- {$EXTERNALSYM GGO_GLYPH_INDEX}
-
- GGO_UNHINTED = $0100;
- {$EXTERNALSYM GGO_UNHINTED}
-
- TT_POLYGON_TYPE = 24;
- {$EXTERNALSYM TT_POLYGON_TYPE}
-
- TT_PRIM_LINE = 1;
- {$EXTERNALSYM TT_PRIM_LINE}
- TT_PRIM_QSPLINE = 2;
- {$EXTERNALSYM TT_PRIM_QSPLINE}
- TT_PRIM_CSPLINE = 3;
- {$EXTERNALSYM TT_PRIM_CSPLINE}
-
-type
- PPointFx = ^TPointFx;
- tagPOINTFX = record
- x: FIXED;
- y: FIXED;
- end;
- {$EXTERNALSYM tagPOINTFX}
- POINTFX = tagPOINTFX;
- {$EXTERNALSYM POINTFX}
- LPPOINTFX = ^POINTFX;
- {$EXTERNALSYM LPPOINTFX}
- TPointFx = POINTFX;
-
- PTtPolyCurve = ^TTtPolyCurve;
- tagTTPOLYCURVE = record
- wType: WORD;
- cpfx: WORD;
- apfx: array [0..0] of POINTFX;
- end;
- {$EXTERNALSYM tagTTPOLYCURVE}
- TTPOLYCURVE = tagTTPOLYCURVE;
- {$EXTERNALSYM TTPOLYCURVE}
- LPTTPOLYCURVE = ^TTPOLYCURVE;
- {$EXTERNALSYM LPTTPOLYCURVE}
- TTtPolyCurve = TTPOLYCURVE;
-
- PTtPolygonHeader = ^TTtPolygonHeader;
- tagTTPOLYGONHEADER = record
- cb: DWORD;
- dwType: DWORD;
- pfxStart: POINTFX;
- end;
- {$EXTERNALSYM tagTTPOLYGONHEADER}
- TTPOLYGONHEADER = tagTTPOLYGONHEADER;
- {$EXTERNALSYM TTPOLYGONHEADER}
- LPTTPOLYGONHEADER = ^TTPOLYGONHEADER;
- {$EXTERNALSYM LPTTPOLYGONHEADER}
- TTtPolygonHeader = TTPOLYGONHEADER;
-
-const
- GCP_DBCS = $0001;
- {$EXTERNALSYM GCP_DBCS}
- GCP_REORDER = $0002;
- {$EXTERNALSYM GCP_REORDER}
- GCP_USEKERNING = $0008;
- {$EXTERNALSYM GCP_USEKERNING}
- GCP_GLYPHSHAPE = $0010;
- {$EXTERNALSYM GCP_GLYPHSHAPE}
- GCP_LIGATE = $0020;
- {$EXTERNALSYM GCP_LIGATE}
-////#define GCP_GLYPHINDEXING 0x0080
- GCP_DIACRITIC = $0100;
- {$EXTERNALSYM GCP_DIACRITIC}
- GCP_KASHIDA = $0400;
- {$EXTERNALSYM GCP_KASHIDA}
- GCP_ERROR = $8000;
- {$EXTERNALSYM GCP_ERROR}
- FLI_MASK = $103B;
- {$EXTERNALSYM FLI_MASK}
-
- GCP_JUSTIFY = $00010000;
- {$EXTERNALSYM GCP_JUSTIFY}
-////#define GCP_NODIACRITICS 0x00020000L
- FLI_GLYPHS = $00040000;
- {$EXTERNALSYM FLI_GLYPHS}
- GCP_CLASSIN = $00080000;
- {$EXTERNALSYM GCP_CLASSIN}
- GCP_MAXEXTENT = $00100000;
- {$EXTERNALSYM GCP_MAXEXTENT}
- GCP_JUSTIFYIN = $00200000;
- {$EXTERNALSYM GCP_JUSTIFYIN}
- GCP_DISPLAYZWG = $00400000;
- {$EXTERNALSYM GCP_DISPLAYZWG}
- GCP_SYMSWAPOFF = $00800000;
- {$EXTERNALSYM GCP_SYMSWAPOFF}
- GCP_NUMERICOVERRIDE = $01000000;
- {$EXTERNALSYM GCP_NUMERICOVERRIDE}
- GCP_NEUTRALOVERRIDE = $02000000;
- {$EXTERNALSYM GCP_NEUTRALOVERRIDE}
- GCP_NUMERICSLATIN = $04000000;
- {$EXTERNALSYM GCP_NUMERICSLATIN}
- GCP_NUMERICSLOCAL = $08000000;
- {$EXTERNALSYM GCP_NUMERICSLOCAL}
-
- GCPCLASS_LATIN = 1;
- {$EXTERNALSYM GCPCLASS_LATIN}
- GCPCLASS_HEBREW = 2;
- {$EXTERNALSYM GCPCLASS_HEBREW}
- GCPCLASS_ARABIC = 2;
- {$EXTERNALSYM GCPCLASS_ARABIC}
- GCPCLASS_NEUTRAL = 3;
- {$EXTERNALSYM GCPCLASS_NEUTRAL}
- GCPCLASS_LOCALNUMBER = 4;
- {$EXTERNALSYM GCPCLASS_LOCALNUMBER}
- GCPCLASS_LATINNUMBER = 5;
- {$EXTERNALSYM GCPCLASS_LATINNUMBER}
- GCPCLASS_LATINNUMERICTERMINATOR = 6;
- {$EXTERNALSYM GCPCLASS_LATINNUMERICTERMINATOR}
- GCPCLASS_LATINNUMERICSEPARATOR = 7;
- {$EXTERNALSYM GCPCLASS_LATINNUMERICSEPARATOR}
- GCPCLASS_NUMERICSEPARATOR = 8;
- {$EXTERNALSYM GCPCLASS_NUMERICSEPARATOR}
- GCPCLASS_PREBOUNDLTR = $80;
- {$EXTERNALSYM GCPCLASS_PREBOUNDLTR}
- GCPCLASS_PREBOUNDRTL = $40;
- {$EXTERNALSYM GCPCLASS_PREBOUNDRTL}
- GCPCLASS_POSTBOUNDLTR = $20;
- {$EXTERNALSYM GCPCLASS_POSTBOUNDLTR}
- GCPCLASS_POSTBOUNDRTL = $10;
- {$EXTERNALSYM GCPCLASS_POSTBOUNDRTL}
-
- GCPGLYPH_LINKBEFORE = $8000;
- {$EXTERNALSYM GCPGLYPH_LINKBEFORE}
- GCPGLYPH_LINKAFTER = $4000;
- {$EXTERNALSYM GCPGLYPH_LINKAFTER}
-
-type
- PGcpResultsA = ^TGcpResultsA;
- tagGCP_RESULTSA = record
- lStructSize: DWORD;
- lpOutString: LPSTR;
- lpOrder: LPUINT;
- lpDx: PINT;
- lpCaretPos: PINT;
- lpClass: LPSTR;
- lpGlyphs: LPWSTR;
- nGlyphs: UINT;
- nMaxFit: Integer;
- end;
- {$EXTERNALSYM tagGCP_RESULTSA}
- GCP_RESULTSA = tagGCP_RESULTSA;
- {$EXTERNALSYM GCP_RESULTSA}
- LPGCP_RESULTSA = ^GCP_RESULTSA;
- {$EXTERNALSYM LPGCP_RESULTSA}
- TGcpResultsA = GCP_RESULTSA;
-
- PGcpResultsW = ^TGcpResultsW;
- tagGCP_RESULTSW = record
- lStructSize: DWORD;
- lpOutString: LPWSTR;
- lpOrder: LPUINT;
- lpDx: PINT;
- lpCaretPos: PINT;
- lpClass: LPSTR;
- lpGlyphs: LPWSTR;
- nGlyphs: UINT;
- nMaxFit: Integer;
- end;
- {$EXTERNALSYM tagGCP_RESULTSW}
- GCP_RESULTSW = tagGCP_RESULTSW;
- {$EXTERNALSYM GCP_RESULTSW}
- LPGCP_RESULTSW = ^GCP_RESULTSW;
- {$EXTERNALSYM LPGCP_RESULTSW}
- TGcpResultsW = GCP_RESULTSW;
-
- {$IFDEF UNICODE}
- GCP_RESULTS = GCP_RESULTSW;
- {$EXTERNALSYM GCP_RESULTS}
- LPGCP_RESULTS = LPGCP_RESULTSW;
- {$EXTERNALSYM LPGCP_RESULTS}
- TGcpResults = TGcpResultsW;
- PGcpResults = PGcpResultsW;
- {$ELSE}
- GCP_RESULTS = GCP_RESULTSA;
- {$EXTERNALSYM GCP_RESULTS}
- LPGCP_RESULTS = LPGCP_RESULTSA;
- {$EXTERNALSYM LPGCP_RESULTS}
- TGcpResults = TGcpResultsA;
- PGcpResults = PGcpResultsA;
- {$ENDIF UNICODE}
-
- PRasterizerStatus = ^TRasterizerStatus;
- _RASTERIZER_STATUS = record
- nSize: short;
- wFlags: short;
- nLanguageID: short;
- end;
- {$EXTERNALSYM _RASTERIZER_STATUS}
- RASTERIZER_STATUS = _RASTERIZER_STATUS;
- {$EXTERNALSYM RASTERIZER_STATUS}
- LPRASTERIZER_STATUS = ^RASTERIZER_STATUS;
- {$EXTERNALSYM LPRASTERIZER_STATUS}
- TRasterizerStatus = _RASTERIZER_STATUS;
-
-// bits defined in wFlags of RASTERIZER_STATUS
-
-const
- TT_AVAILABLE = $0001;
- {$EXTERNALSYM TT_AVAILABLE}
- TT_ENABLED = $0002;
- {$EXTERNALSYM TT_ENABLED}
-
-// Pixel format descriptor
-
-type
- PPixelFormatDescriptor = ^TPixelFormatDescriptor;
- tagPIXELFORMATDESCRIPTOR = record
- nSize: WORD;
- nVersion: WORD;
- dwFlags: DWORD;
- iPixelType: BYTE;
- cColorBits: BYTE;
- cRedBits: BYTE;
- cRedShift: BYTE;
- cGreenBits: BYTE;
- cGreenShift: BYTE;
- cBlueBits: BYTE;
- cBlueShift: BYTE;
- cAlphaBits: BYTE;
- cAlphaShift: BYTE;
- cAccumBits: BYTE;
- cAccumRedBits: BYTE;
- cAccumGreenBits: BYTE;
- cAccumBlueBits: BYTE;
- cAccumAlphaBits: BYTE;
- cDepthBits: BYTE;
- cStencilBits: BYTE;
- cAuxBuffers: BYTE;
- iLayerType: BYTE;
- bReserved: BYTE;
- dwLayerMask: DWORD;
- dwVisibleMask: DWORD;
- dwDamageMask: DWORD;
- end;
- {$EXTERNALSYM tagPIXELFORMATDESCRIPTOR}
- PIXELFORMATDESCRIPTOR = tagPIXELFORMATDESCRIPTOR;
- {$EXTERNALSYM PIXELFORMATDESCRIPTOR}
- LPPIXELFORMATDESCRIPTOR = ^PIXELFORMATDESCRIPTOR;
- {$EXTERNALSYM LPPIXELFORMATDESCRIPTOR}
- TPixelFormatDescriptor = PIXELFORMATDESCRIPTOR;
-
-// pixel types
-
-const
- PFD_TYPE_RGBA = 0;
- {$EXTERNALSYM PFD_TYPE_RGBA}
- PFD_TYPE_COLORINDEX = 1;
- {$EXTERNALSYM PFD_TYPE_COLORINDEX}
-
-// layer types
-
- PFD_MAIN_PLANE = 0;
- {$EXTERNALSYM PFD_MAIN_PLANE}
- PFD_OVERLAY_PLANE = 1;
- {$EXTERNALSYM PFD_OVERLAY_PLANE}
- PFD_UNDERLAY_PLANE = DWORD(-1);
- {$EXTERNALSYM PFD_UNDERLAY_PLANE}
-
-// PIXELFORMATDESCRIPTOR flags
-
- PFD_DOUBLEBUFFER = $00000001;
- {$EXTERNALSYM PFD_DOUBLEBUFFER}
- PFD_STEREO = $00000002;
- {$EXTERNALSYM PFD_STEREO}
- PFD_DRAW_TO_WINDOW = $00000004;
- {$EXTERNALSYM PFD_DRAW_TO_WINDOW}
- PFD_DRAW_TO_BITMAP = $00000008;
- {$EXTERNALSYM PFD_DRAW_TO_BITMAP}
- PFD_SUPPORT_GDI = $00000010;
- {$EXTERNALSYM PFD_SUPPORT_GDI}
- PFD_SUPPORT_OPENGL = $00000020;
- {$EXTERNALSYM PFD_SUPPORT_OPENGL}
- PFD_GENERIC_FORMAT = $00000040;
- {$EXTERNALSYM PFD_GENERIC_FORMAT}
- PFD_NEED_PALETTE = $00000080;
- {$EXTERNALSYM PFD_NEED_PALETTE}
- PFD_NEED_SYSTEM_PALETTE = $00000100;
- {$EXTERNALSYM PFD_NEED_SYSTEM_PALETTE}
- PFD_SWAP_EXCHANGE = $00000200;
- {$EXTERNALSYM PFD_SWAP_EXCHANGE}
- PFD_SWAP_COPY = $00000400;
- {$EXTERNALSYM PFD_SWAP_COPY}
- PFD_SWAP_LAYER_BUFFERS = $00000800;
- {$EXTERNALSYM PFD_SWAP_LAYER_BUFFERS}
- PFD_GENERIC_ACCELERATED = $00001000;
- {$EXTERNALSYM PFD_GENERIC_ACCELERATED}
- PFD_SUPPORT_DIRECTDRAW = $00002000;
- {$EXTERNALSYM PFD_SUPPORT_DIRECTDRAW}
-
-// PIXELFORMATDESCRIPTOR flags for use in ChoosePixelFormat only
-
- PFD_DEPTH_DONTCARE = DWORD($20000000);
- {$EXTERNALSYM PFD_DEPTH_DONTCARE}
- PFD_DOUBLEBUFFER_DONTCARE = DWORD($40000000);
- {$EXTERNALSYM PFD_DOUBLEBUFFER_DONTCARE}
- PFD_STEREO_DONTCARE = DWORD($80000000);
- {$EXTERNALSYM PFD_STEREO_DONTCARE}
-
-type
- OLDFONTENUMPROCA = function(lpelf: LPLOGFONTA; lpntm: LPTEXTMETRICA; FontType: DWORD; lParam: LPARAM): Integer; stdcall;
- {$EXTERNALSYM OLDFONTENUMPROCA}
- OLDFONTENUMPROCW = function(lpelf: LPLOGFONTW; lpntm: LPTEXTMETRICW; FontType: DWORD; lParam: LPARAM): Integer; stdcall;
- {$EXTERNALSYM OLDFONTENUMPROCW}
- OLDFONTENUMPROC = function(lpelf: LPLOGFONT; lpntm: LPTEXTMETRIC; FontType: DWORD; lParam: LPARAM): Integer; stdcall;
- {$EXTERNALSYM OLDFONTENUMPROC}
-
- FONTENUMPROCA = OLDFONTENUMPROCA;
- {$EXTERNALSYM FONTENUMPROCA}
- FONTENUMPROCW = OLDFONTENUMPROCW;
- {$EXTERNALSYM FONTENUMPROCW}
- FONTENUMPROC = OLDFONTENUMPROC;
- {$EXTERNALSYM FONTENUMPROC}
-
- GOBJENUMPROC = function(lpLogObject: LPVOID; lpData: LPARAM): Integer; stdcall;
- {$EXTERNALSYM GOBJENUMPROC}
- LINEDDAPROC = procedure(X, Y: Integer; lpData: LPARAM); stdcall;
- {$EXTERNALSYM LINEDDAPROC}
-
-function AddFontResourceA(lpszFileName: LPCSTR): Integer; stdcall;
-{$EXTERNALSYM AddFontResourceA}
-function AddFontResourceW(lpszFileName: LPCWSTR): Integer; stdcall;
-{$EXTERNALSYM AddFontResourceW}
-function AddFontResource(lpszFileName: LPCTSTR): Integer; stdcall;
-{$EXTERNALSYM AddFontResource}
-
-function AnimatePalette(hPal: HPALETTE; iStartIndex: UINT; cEntries: UINT; ppe: PPALETTEENTRY): BOOL; stdcall;
-{$EXTERNALSYM AnimatePalette}
-function Arc(hdc: HDC; nLeftRect, nTopRect, nRightRect, nBottomRect, nxStartArc, nyStartArc, nXEndArc, nYEndArc: Integer): BOOL; stdcall;
-{$EXTERNALSYM Arc}
-function BitBlt(hdcDEst: HDC; nXDest, nYDest, nWidth, nHeight: Integer; hdcSrc: HDC; nXSrc, nYSrc: Integer; dwRop: DWORD): BOOL; stdcall;
-{$EXTERNALSYM BitBlt}
-function CancelDC(hdc: HDC): BOOL; stdcall;
-{$EXTERNALSYM CancelDC}
-function Chord(hdc: HDC; nLeftRect, nTopRect, nRightRect, nBottomRect, nXRadial1, nYRadial1, nXRadial2, nYRadial2: Integer): BOOL; stdcall;
-{$EXTERNALSYM Chord}
-function ChoosePixelFormat(hdc: HDC; const ppfd: PIXELFORMATDESCRIPTOR): Integer; stdcall;
-{$EXTERNALSYM ChoosePixelFormat}
-function CloseMetaFile(hdc: HDC): HMETAFILE; stdcall;
-{$EXTERNALSYM CloseMetaFile}
-function CombineRgn(hrgnDest, hrgnSrc1, hrgnSrc2: HRGN; fnCombineMode: Integer): Integer; stdcall;
-{$EXTERNALSYM CombineRgn}
-function CopyMetaFileA(hmfSrc: HMETAFILE; lpszFile: LPCSTR): HMETAFILE; stdcall;
-{$EXTERNALSYM CopyMetaFileA}
-function CopyMetaFileW(hmfSrc: HMETAFILE; lpszFile: LPCWSTR): HMETAFILE; stdcall;
-{$EXTERNALSYM CopyMetaFileW}
-function CopyMetaFile(hmfSrc: HMETAFILE; lpszFile: LPCTSTR): HMETAFILE; stdcall;
-{$EXTERNALSYM CopyMetaFile}
-function CreateBitmap(nWidth, nHeight: Integer; Cplanes, cBitsPerPel: UINT; lpvBits: PVOID): HBITMAP; stdcall;
-{$EXTERNALSYM CreateBitmap}
-function CreateBitmapIndirect(const lpbm: BITMAP): HBITMAP; stdcall;
-{$EXTERNALSYM CreateBitmapIndirect}
-function CreateBrushIndirect(const lplb: LOGBRUSH): HBRUSH; stdcall;
-{$EXTERNALSYM CreateBrushIndirect}
-function CreateCompatibleBitmap(hdc: HDC; nWidth, nHeight: Integer): HBITMAP; stdcall;
-{$EXTERNALSYM CreateCompatibleBitmap}
-function CreateDiscardableBitmap(hdc: HDC; nWidth, nHeight: Integer): HBITMAP; stdcall;
-{$EXTERNALSYM CreateDiscardableBitmap}
-function CreateCompatibleDC(hdc: HDC): HDC; stdcall;
-{$EXTERNALSYM CreateCompatibleDC}
-function CreateDCA(lpszDriver, lpszDevice, lpszOutput: LPCSTR; lpInitData: LPDEVMODEA): HDC; stdcall;
-{$EXTERNALSYM CreateDCA}
-function CreateDCW(lpszDriver, lpszDevice, lpszOutput: LPCWSTR; lpInitData: LPDEVMODEW): HDC; stdcall;
-{$EXTERNALSYM CreateDCW}
-function CreateDC(lpszDriver, lpszDevice, lpszOutput: LPCTSTR; lpInitData: LPDEVMODE): HDC; stdcall;
-{$EXTERNALSYM CreateDC}
-function CreateDIBitmap(hdc: HDC; const lpbmih: BITMAPINFOHEADER; fdwInit: DWORD; lpbInit: PVOID; const lpbmi: BITMAPINFO; fuUsage: UINT): HBITMAP; stdcall;
-{$EXTERNALSYM CreateDIBitmap}
-function CreateDIBPatternBrush(hglbDIBPacked: HGLOBAL; fuColorSpec: UINT): HBRUSH; stdcall;
-{$EXTERNALSYM CreateDIBPatternBrush}
-function CreateDIBPatternBrushPt(lpPackedDIB: PVOID; iUsage: UINT): HBRUSH; stdcall;
-{$EXTERNALSYM CreateDIBPatternBrushPt}
-function CreateEllipticRgn(nLeftRect, nTopRect, nRightRect, nBottomRect: Integer): HRGN; stdcall;
-{$EXTERNALSYM CreateEllipticRgn}
-function CreateEllipticRgnIndirect(const lprc: RECT): HRGN; stdcall;
-{$EXTERNALSYM CreateEllipticRgnIndirect}
-function CreateFontIndirectA(const lplf: LOGFONTA): HFONT; stdcall;
-{$EXTERNALSYM CreateFontIndirectA}
-function CreateFontIndirectW(const lplf: LOGFONTW): HFONT; stdcall;
-{$EXTERNALSYM CreateFontIndirectW}
-function CreateFontIndirect(const lplf: LOGFONT): HFONT; stdcall;
-{$EXTERNALSYM CreateFontIndirect}
-function CreateFontA(nHeight, nWidth, nEscapement, nOrientation, fnWeight: Integer; fdwItalic, fdwUnderline, fdwStrikeOut, fdwCharSet, fdwOutputPrecision, fdwClipPrecision, fdwQuality, fdwPitchAndFamily: DWORD; lpszFace: LPCSTR): HFONT; stdcall;
-{$EXTERNALSYM CreateFontA}
-function CreateFontW(nHeight, nWidth, nEscapement, nOrientation, fnWeight: Integer; fdwItalic, fdwUnderline, fdwStrikeOut, fdwCharSet, fdwOutputPrecision, fdwClipPrecision, fdwQuality, fdwPitchAndFamily: DWORD; lpszFace: LPCWSTR): HFONT; stdcall;
-{$EXTERNALSYM CreateFontW}
-function CreateFont(nHeight, nWidth, nEscapement, nOrientation, fnWeight: Integer; fdwItalic, fdwUnderline, fdwStrikeOut, fdwCharSet, fdwOutputPrecision, fdwClipPrecision, fdwQuality, fdwPitchAndFamily: DWORD; lpszFace: LPCTSTR): HFONT; stdcall;
-{$EXTERNALSYM CreateFont}
-function CreateHatchBrush(fnStyle: Integer; clrref: COLORREF): HBRUSH; stdcall;
-{$EXTERNALSYM CreateHatchBrush}
-function CreateICA(lpszDriver, lpszDevice, lpszOutput: LPCSTR; lpdvmInit: LPDEVMODEA): HDC; stdcall;
-{$EXTERNALSYM CreateICA}
-function CreateICW(lpszDriver, lpszDevice, lpszOutput: LPCWSTR; lpdvmInit: LPDEVMODEW): HDC; stdcall;
-{$EXTERNALSYM CreateICW}
-function CreateIC(lpszDriver, lpszDevice, lpszOutput: LPCWSTR; lpdvmInit: LPDEVMODE): HDC; stdcall;
-{$EXTERNALSYM CreateIC}
-function CreateMetaFileA(lpszFile: LPCSTR): HDC; stdcall;
-{$EXTERNALSYM CreateMetaFileA}
-function CreateMetaFileW(lpszFile: LPCWSTR): HDC; stdcall;
-{$EXTERNALSYM CreateMetaFileW}
-function CreateMetaFile(lpszFile: LPCTSTR): HDC; stdcall;
-{$EXTERNALSYM CreateMetaFile}
-function CreatePalette(const lplgpl: LOGPALETTE): HPALETTE; stdcall;
-{$EXTERNALSYM CreatePalette}
-function CreatePen(fnPenStyle, nWidth: Integer; crColor: COLORREF): HPEN; stdcall;
-{$EXTERNALSYM CreatePen}
-function CreatePenIndirect(const lplgpn: LOGPEN): HPEN; stdcall;
-{$EXTERNALSYM CreatePenIndirect}
-function CreatePolyPolygonRgn(lppt: LPPOINT; lpPolyCounts: LPINT; nCount, fnPolyFillMode: Integer): HRGN; stdcall;
-{$EXTERNALSYM CreatePolyPolygonRgn}
-function CreatePatternBrush(hbmp: HBITMAP): HBRUSH; stdcall;
-{$EXTERNALSYM CreatePatternBrush}
-function CreateRectRgn(nLeftRect, nTopRect, nRightRect, nBottomRect: Integer): HRGN; stdcall;
-{$EXTERNALSYM CreateRectRgn}
-function CreateRectRgnIndirect(const lprc: RECT): HRGN; stdcall;
-{$EXTERNALSYM CreateRectRgnIndirect}
-function CreateRoundRectRgn(nLeftRect, nTopRect, nRightRect, nBottomRect, nWidthEllipse, nHeightEllipse: Integer): HRGN; stdcall;
-{$EXTERNALSYM CreateRoundRectRgn}
-function CreateScalableFontResourceA(fdwHidden: DWORD; lpszFontRes, lpszFontFile, lpszCurrentPath: LPCSTR): BOOL; stdcall;
-{$EXTERNALSYM CreateScalableFontResourceA}
-function CreateScalableFontResourceW(fdwHidden: DWORD; lpszFontRes, lpszFontFile, lpszCurrentPath: LPCWSTR): BOOL; stdcall;
-{$EXTERNALSYM CreateScalableFontResourceW}
-function CreateScalableFontResource(fdwHidden: DWORD; lpszFontRes, lpszFontFile, lpszCurrentPath: LPCTSTR): BOOL; stdcall;
-{$EXTERNALSYM CreateScalableFontResource}
-function CreateSolidBrush(crColor: COLORREF): HBRUSH; stdcall;
-{$EXTERNALSYM CreateSolidBrush}
-function DeleteDC(hdc: HDC): BOOL; stdcall;
-{$EXTERNALSYM DeleteDC}
-function DeleteMetaFile(hmf: HMETAFILE): BOOL; stdcall;
-{$EXTERNALSYM DeleteMetaFile}
-function DeleteObject(hObject: HGDIOBJ): BOOL; stdcall;
-{$EXTERNALSYM DeleteObject}
-function DescribePixelFormat(hdc: HDC; iPixelFormat: Integer; nBytes: UINT; ppfd: LPPIXELFORMATDESCRIPTOR): Integer; stdcall;
-{$EXTERNALSYM DescribePixelFormat}
-
-// mode selections for the device mode function
-
-const
- DM_UPDATE = 1;
- {$EXTERNALSYM DM_UPDATE}
- DM_COPY = 2;
- {$EXTERNALSYM DM_COPY}
- DM_PROMPT = 4;
- {$EXTERNALSYM DM_PROMPT}
- DM_MODIFY = 8;
- {$EXTERNALSYM DM_MODIFY}
-
- DM_IN_BUFFER = DM_MODIFY;
- {$EXTERNALSYM DM_IN_BUFFER}
- DM_IN_PROMPT = DM_PROMPT;
- {$EXTERNALSYM DM_IN_PROMPT}
- DM_OUT_BUFFER = DM_COPY;
- {$EXTERNALSYM DM_OUT_BUFFER}
- DM_OUT_DEFAULT = DM_UPDATE;
- {$EXTERNALSYM DM_OUT_DEFAULT}
-
-// device capabilities indices
-
- DC_FIELDS = 1;
- {$EXTERNALSYM DC_FIELDS}
- DC_PAPERS = 2;
- {$EXTERNALSYM DC_PAPERS}
- DC_PAPERSIZE = 3;
- {$EXTERNALSYM DC_PAPERSIZE}
- DC_MINEXTENT = 4;
- {$EXTERNALSYM DC_MINEXTENT}
- DC_MAXEXTENT = 5;
- {$EXTERNALSYM DC_MAXEXTENT}
- DC_BINS = 6;
- {$EXTERNALSYM DC_BINS}
- DC_DUPLEX = 7;
- {$EXTERNALSYM DC_DUPLEX}
- DC_SIZE = 8;
- {$EXTERNALSYM DC_SIZE}
- DC_EXTRA = 9;
- {$EXTERNALSYM DC_EXTRA}
- DC_VERSION = 10;
- {$EXTERNALSYM DC_VERSION}
- DC_DRIVER = 11;
- {$EXTERNALSYM DC_DRIVER}
- DC_BINNAMES = 12;
- {$EXTERNALSYM DC_BINNAMES}
- DC_ENUMRESOLUTIONS = 13;
- {$EXTERNALSYM DC_ENUMRESOLUTIONS}
- DC_FILEDEPENDENCIES = 14;
- {$EXTERNALSYM DC_FILEDEPENDENCIES}
- DC_TRUETYPE = 15;
- {$EXTERNALSYM DC_TRUETYPE}
- DC_PAPERNAMES = 16;
- {$EXTERNALSYM DC_PAPERNAMES}
- DC_ORIENTATION = 17;
- {$EXTERNALSYM DC_ORIENTATION}
- DC_COPIES = 18;
- {$EXTERNALSYM DC_COPIES}
- DC_BINADJUST = 19;
- {$EXTERNALSYM DC_BINADJUST}
- DC_EMF_COMPLIANT = 20;
- {$EXTERNALSYM DC_EMF_COMPLIANT}
- DC_DATATYPE_PRODUCED = 21;
- {$EXTERNALSYM DC_DATATYPE_PRODUCED}
- DC_COLLATE = 22;
- {$EXTERNALSYM DC_COLLATE}
- DC_MANUFACTURER = 23;
- {$EXTERNALSYM DC_MANUFACTURER}
- DC_MODEL = 24;
- {$EXTERNALSYM DC_MODEL}
-
- DC_PERSONALITY = 25;
- {$EXTERNALSYM DC_PERSONALITY}
- DC_PRINTRATE = 26;
- {$EXTERNALSYM DC_PRINTRATE}
- DC_PRINTRATEUNIT = 27;
- {$EXTERNALSYM DC_PRINTRATEUNIT}
- PRINTRATEUNIT_PPM = 1;
- {$EXTERNALSYM PRINTRATEUNIT_PPM}
- PRINTRATEUNIT_CPS = 2;
- {$EXTERNALSYM PRINTRATEUNIT_CPS}
- PRINTRATEUNIT_LPM = 3;
- {$EXTERNALSYM PRINTRATEUNIT_LPM}
- PRINTRATEUNIT_IPM = 4;
- {$EXTERNALSYM PRINTRATEUNIT_IPM}
- DC_PRINTERMEM = 28;
- {$EXTERNALSYM DC_PRINTERMEM}
- DC_MEDIAREADY = 29;
- {$EXTERNALSYM DC_MEDIAREADY}
- DC_STAPLE = 30;
- {$EXTERNALSYM DC_STAPLE}
- DC_PRINTRATEPPM = 31;
- {$EXTERNALSYM DC_PRINTRATEPPM}
- DC_COLORDEVICE = 32;
- {$EXTERNALSYM DC_COLORDEVICE}
- DC_NUP = 33;
- {$EXTERNALSYM DC_NUP}
- DC_MEDIATYPENAMES = 34;
- {$EXTERNALSYM DC_MEDIATYPENAMES}
- DC_MEDIATYPES = 35;
- {$EXTERNALSYM DC_MEDIATYPES}
-
-// bit fields of the return value (DWORD) for DC_TRUETYPE
-
- DCTT_BITMAP = $0000001;
- {$EXTERNALSYM DCTT_BITMAP}
- DCTT_DOWNLOAD = $0000002;
- {$EXTERNALSYM DCTT_DOWNLOAD}
- DCTT_SUBDEV = $0000004;
- {$EXTERNALSYM DCTT_SUBDEV}
- DCTT_DOWNLOAD_OUTLINE = $0000008;
- {$EXTERNALSYM DCTT_DOWNLOAD_OUTLINE}
-
-// return values for DC_BINADJUST
-
- DCBA_FACEUPNONE = $0000;
- {$EXTERNALSYM DCBA_FACEUPNONE}
- DCBA_FACEUPCENTER = $0001;
- {$EXTERNALSYM DCBA_FACEUPCENTER}
- DCBA_FACEUPLEFT = $0002;
- {$EXTERNALSYM DCBA_FACEUPLEFT}
- DCBA_FACEUPRIGHT = $0003;
- {$EXTERNALSYM DCBA_FACEUPRIGHT}
- DCBA_FACEDOWNNONE = $0100;
- {$EXTERNALSYM DCBA_FACEDOWNNONE}
- DCBA_FACEDOWNCENTER = $0101;
- {$EXTERNALSYM DCBA_FACEDOWNCENTER}
- DCBA_FACEDOWNLEFT = $0102;
- {$EXTERNALSYM DCBA_FACEDOWNLEFT}
- DCBA_FACEDOWNRIGHT = $0103;
- {$EXTERNALSYM DCBA_FACEDOWNRIGHT}
-
-function DeviceCapabilitiesA(pDevice, pPort: LPCSTR; fwCapability: WORD; pOutput: LPSTR; pDevMode: LPDEVMODEA): Integer; stdcall;
-{$EXTERNALSYM DeviceCapabilitiesA}
-function DeviceCapabilitiesW(pDevice, pPort: LPCWSTR; fwCapability: WORD; pOutput: LPWSTR; pDevMode: LPDEVMODEW): Integer; stdcall;
-{$EXTERNALSYM DeviceCapabilitiesW}
-function DeviceCapabilities(pDevice, pPort: LPCTSTR; fwCapability: WORD; pOutput: LPTSTR; pDevMode: LPDEVMODE): Integer; stdcall;
-{$EXTERNALSYM DeviceCapabilities}
-function DrawEscape(hdc: HDC; nEscape, cbInput: Integer; lpszInData: LPCSTR): Integer; stdcall;
-{$EXTERNALSYM DrawEscape}
-function Ellipse(hdc: HDC; nLeftRect, nTopRect, nRightRect, nBottomRect: Integer): BOOL; stdcall;
-{$EXTERNALSYM Ellipse}
-function EnumFontFamiliesExA(hdc: HDC; lpLogFont: LPLOGFONTA; lpEnumFontFamExProc: FONTENUMPROCA; lParam: LPARAM; dwFlags: DWORD): Integer; stdcall;
-{$EXTERNALSYM EnumFontFamiliesExA}
-function EnumFontFamiliesExW(hdc: HDC; lpLogFont: LPLOGFONTW; lpEnumFontFamExProc: FONTENUMPROCW; lParam: LPARAM; dwFlags: DWORD): Integer; stdcall;
-{$EXTERNALSYM EnumFontFamiliesExW}
-function EnumFontFamiliesEx(hdc: HDC; lpLogFont: LPLOGFONT; lpEnumFontFamExProc: FONTENUMPROC; lParam: LPARAM; dwFlags: DWORD): Integer; stdcall;
-{$EXTERNALSYM EnumFontFamiliesEx}
-
-function EnumFontFamiliesA(hdc: HDC; lpszFamily: LPCSTR; lpEnumFontFamProc: FONTENUMPROCA; lParam: LPARAM): Integer; stdcall;
-{$EXTERNALSYM EnumFontFamiliesA}
-function EnumFontFamiliesW(hdc: HDC; lpszFamily: LPCWSTR; lpEnumFontFamProc: FONTENUMPROCW; lParam: LPARAM): Integer; stdcall;
-{$EXTERNALSYM EnumFontFamiliesW}
-function EnumFontFamilies(hdc: HDC; lpszFamily: LPCTSTR; lpEnumFontFamProc: FONTENUMPROC; lParam: LPARAM): Integer; stdcall;
-{$EXTERNALSYM EnumFontFamilies}
-
-function EnumFontsA(hdc: HDC; lpFaceName: LPCSTR; lpFontFunc: FONTENUMPROCA; lParam: LPARAM): Integer; stdcall;
-{$EXTERNALSYM EnumFontsA}
-function EnumFontsW(hdc: HDC; lpFaceName: LPCWSTR; lpFontFunc: FONTENUMPROCW; lParam: LPARAM): Integer; stdcall;
-{$EXTERNALSYM EnumFontsW}
-function EnumFonts(hdc: HDC; lpFaceName: LPCTSTR; lpFontFunc: FONTENUMPROC; lParam: LPARAM): Integer; stdcall;
-{$EXTERNALSYM EnumFonts}
-
-function EnumObjects(hdc: HDC; mObjectType: Integer; lpObjectFunc: GOBJENUMPROC; lParam: LPARAM): Integer; stdcall;
-{$EXTERNALSYM EnumObjects}
-
-function EqualRgn(hSrcRgn1, hSrcRgn2: HRGN): BOOL; stdcall;
-{$EXTERNALSYM EqualRgn}
-function Escape(hdc: HDC; nEscape, cbInput: Integer; lpvInData: LPCSTR; lpvOutData: LPVOID): Integer; stdcall;
-{$EXTERNALSYM Escape}
-function ExtEscape(hdc: HDC; nEscape, cbInput: Integer; lpszInData: LPCSTR; cbOutput: Integer; lpszOutData: LPSTR): Integer; stdcall;
-{$EXTERNALSYM ExtEscape}
-function ExcludeClipRect(hdc: HDC; nLeftRect, nTopRect, nRightRect, nBottomRect: Integer): Integer; stdcall;
-{$EXTERNALSYM ExcludeClipRect}
-function ExtCreateRegion(lpXForm: LPXFORM; nCount: DWORD; lpRgnData: LPRGNDATA): HRGN; stdcall;
-{$EXTERNALSYM ExtCreateRegion}
-function ExtFloodFill(hdc: HDC; nXStart, nYStart: Integer; crColor: COLORREF; fuFillType: UINT): BOOL; stdcall;
-{$EXTERNALSYM ExtFloodFill}
-function FillRgn(hdc: HDC; hrgn: HRGN; hbr: HBRUSH): BOOL; stdcall;
-{$EXTERNALSYM FillRgn}
-function FloodFill(hdc: HDC; nXStart, nYStart: Integer; crFill: COLORREF): BOOL; stdcall;
-{$EXTERNALSYM FloodFill}
-function FrameRgn(hdc: HDC; hrgn: HRGN; hbr: HBRUSH; nWidth, nHeight: Integer): BOOL; stdcall;
-{$EXTERNALSYM FrameRgn}
-function GetROP2(hdc: HDC): Integer; stdcall;
-{$EXTERNALSYM GetROP2}
-function GetAspectRatioFilterEx(hdc: HDC; var lpAspectRatio: TSize): BOOL; stdcall;
-{$EXTERNALSYM GetAspectRatioFilterEx}
-function GetBkColor(hdc: HDC): COLORREF; stdcall;
-{$EXTERNALSYM GetBkColor}
-
-function GetDCBrushColor(hdc: HDC): COLORREF; stdcall;
-{$EXTERNALSYM GetDCBrushColor}
-function GetDCPenColor(hdc: HDC): COLORREF; stdcall;
-{$EXTERNALSYM GetDCPenColor}
-
-function GetBkMode(hdc: HDC): Integer; stdcall;
-{$EXTERNALSYM GetBkMode}
-function GetBitmapBits(hbmp: HBITMAP; cbBuffer: LONG; lpvBits: LPVOID): LONG; stdcall;
-{$EXTERNALSYM GetBitmapBits}
-function GetBitmapDimensionEx(hBitmap: HBITMAP; var lpDimension: TSize): BOOL; stdcall;
-{$EXTERNALSYM GetBitmapDimensionEx}
-function GetBoundsRect(hdc: HDC; var lprcBounds: RECT; flags: UINT): UINT; stdcall;
-{$EXTERNALSYM GetBoundsRect}
-
-function GetBrushOrgEx(hdc: HDC; var lppt: POINT): BOOL; stdcall;
-{$EXTERNALSYM GetBrushOrgEx}
-
-function GetCharWidthA(hdc: HDC; iFirstChar, iLastChar: UINT; lpBuffer: LPINT): BOOL; stdcall;
-{$EXTERNALSYM GetCharWidthA}
-function GetCharWidthW(hdc: HDC; iFirstChar, iLastChar: UINT; lpBuffer: LPINT): BOOL; stdcall;
-{$EXTERNALSYM GetCharWidthW}
-function GetCharWidth(hdc: HDC; iFirstChar, iLastChar: UINT; lpBuffer: LPINT): BOOL; stdcall;
-{$EXTERNALSYM GetCharWidth}
-function GetCharWidth32A(hdc: HDC; iFirstChar, iLastChar: UINT; lpBuffer: LPINT): BOOL; stdcall;
-{$EXTERNALSYM GetCharWidth32A}
-function GetCharWidth32W(hdc: HDC; iFirstChar, iLastChar: UINT; lpBuffer: LPINT): BOOL; stdcall;
-{$EXTERNALSYM GetCharWidth32W}
-function GetCharWidth32(hdc: HDC; iFirstChar, iLastChar: UINT; lpBuffer: LPINT): BOOL; stdcall;
-{$EXTERNALSYM GetCharWidth32}
-function GetCharWidthFloatA(hdc: HDC; iFirstChar, iLastChar: UINT; pxBuffer: PFLOAT): BOOL; stdcall;
-{$EXTERNALSYM GetCharWidthFloatA}
-function GetCharWidthFloatW(hdc: HDC; iFirstChar, iLastChar: UINT; pxBuffer: PFLOAT): BOOL; stdcall;
-{$EXTERNALSYM GetCharWidthFloatW}
-function GetCharWidthFloat(hdc: HDC; iFirstChar, iLastChar: UINT; pxBuffer: PFLOAT): BOOL; stdcall;
-{$EXTERNALSYM GetCharWidthFloat}
-function GetCharABCWidthsA(hdc: HDC; uFirstChar, uLastChar: UINT; lpAbc: LPABC): BOOL; stdcall;
-{$EXTERNALSYM GetCharABCWidthsA}
-function GetCharABCWidthsW(hdc: HDC; uFirstChar, uLastChar: UINT; lpAbc: LPABC): BOOL; stdcall;
-{$EXTERNALSYM GetCharABCWidthsW}
-function GetCharABCWidths(hdc: HDC; uFirstChar, uLastChar: UINT; lpAbc: LPABC): BOOL; stdcall;
-{$EXTERNALSYM GetCharABCWidths}
-function GetCharABCWidthsFloatA(hdc: HDC; iFirstChar, iLastChar: UINT; lpAbcF: LPABCFLOAT): BOOL; stdcall;
-{$EXTERNALSYM GetCharABCWidthsFloatA}
-function GetCharABCWidthsFloatW(hdc: HDC; iFirstChar, iLastChar: UINT; lpAbcF: LPABCFLOAT): BOOL; stdcall;
-{$EXTERNALSYM GetCharABCWidthsFloatW}
-function GetCharABCWidthsFloat(hdc: HDC; iFirstChar, iLastChar: UINT; lpAbcF: LPABCFLOAT): BOOL; stdcall;
-{$EXTERNALSYM GetCharABCWidthsFloat}
-
-function GetClipBox(hdc: HDC; var lprc: RECT): Integer; stdcall;
-{$EXTERNALSYM GetClipBox}
-function GetClipRgn(hdc: HDC; hrgn: HRGN): Integer; stdcall;
-{$EXTERNALSYM GetClipRgn}
-function GetMetaRgn(hdc: HDC; hrgn: HRGN): Integer; stdcall;
-{$EXTERNALSYM GetMetaRgn}
-function GetCurrentObject(hdc: HDC; uObjectType: UINT): HGDIOBJ; stdcall;
-{$EXTERNALSYM GetCurrentObject}
-function GetCurrentPositionEx(hdc: HDC; var lpPoint: POINT): BOOL; stdcall;
-{$EXTERNALSYM GetCurrentPositionEx}
-function GetDeviceCaps(hdc: HDC; nIndex: Integer): Integer; stdcall;
-{$EXTERNALSYM GetDeviceCaps}
-function GetDIBits(hdc: HDC; hbmp: HBITMAP; uStartScan, cScanLines: UINT; lpvBits: LPVOID; var lpbi: BITMAPINFO; uUsage: UINT): Integer; stdcall;
-{$EXTERNALSYM GetDIBits}
-function GetFontData(hdc: HDC; dwTable, dwOffset: DWORD; lpvBuffer: LPVOID; cbData: DWORD): DWORD; stdcall;
-{$EXTERNALSYM GetFontData}
-function GetGlyphOutlineA(hdc: HDC; uChar, uFormat: UINT; var lpgm: GLYPHMETRICS; cbBuffer: DWORD; lpvBuffer: LPVOID; const lpMat2: MAT2): DWORD; stdcall;
-{$EXTERNALSYM GetGlyphOutlineA}
-function GetGlyphOutlineW(hdc: HDC; uChar, uFormat: UINT; var lpgm: GLYPHMETRICS; cbBuffer: DWORD; lpvBuffer: LPVOID; const lpMat2: MAT2): DWORD; stdcall;
-{$EXTERNALSYM GetGlyphOutlineW}
-function GetGlyphOutline(hdc: HDC; uChar, uFormat: UINT; var lpgm: GLYPHMETRICS; cbBuffer: DWORD; lpvBuffer: LPVOID; const lpMat2: MAT2): DWORD; stdcall;
-{$EXTERNALSYM GetGlyphOutline}
-function GetGraphicsMode(hdc: HDC): Integer; stdcall;
-{$EXTERNALSYM GetGraphicsMode}
-function GetMapMode(hdc: HDC): Integer; stdcall;
-{$EXTERNALSYM GetMapMode}
-function GetMetaFileBitsEx(hmf: HMETAFILE; nSize: UINT; lpvData: LPVOID): UINT; stdcall;
-{$EXTERNALSYM GetMetaFileBitsEx}
-function GetMetaFileA(lpszMetaFile: LPCSTR): HMETAFILE; stdcall;
-{$EXTERNALSYM GetMetaFileA}
-function GetMetaFileW(lpszMetaFile: LPCWSTR): HMETAFILE; stdcall;
-{$EXTERNALSYM GetMetaFileW}
-function GetMetaFile(lpszMetaFile: LPCTSTR): HMETAFILE; stdcall;
-{$EXTERNALSYM GetMetaFile}
-function GetNearestColor(hdc: HDC; crColor: COLORREF): COLORREF; stdcall;
-{$EXTERNALSYM GetNearestColor}
-function GetNearestPaletteIndex(hPal: HPALETTE; crColor: COLORREF): UINT; stdcall;
-{$EXTERNALSYM GetNearestPaletteIndex}
-function GetObjectType(h: HGDIOBJ): DWORD; stdcall;
-{$EXTERNALSYM GetObjectType}
-
-function GetOutlineTextMetricsA(hdc: HDC; cbData: UINT; lpOTM: LPOUTLINETEXTMETRICA): UINT; stdcall;
-{$EXTERNALSYM GetOutlineTextMetricsA}
-function GetOutlineTextMetricsW(hdc: HDC; cbData: UINT; lpOTM: LPOUTLINETEXTMETRICW): UINT; stdcall;
-{$EXTERNALSYM GetOutlineTextMetricsW}
-function GetOutlineTextMetrics(hdc: HDC; cbData: UINT; lpOTM: LPOUTLINETEXTMETRIC): UINT; stdcall;
-{$EXTERNALSYM GetOutlineTextMetrics}
-function GetPaletteEntries(hPal: HPALETTE; iStartIndex, nEntries: UINT; lppe: LPPALETTEENTRY): UINT; stdcall;
-{$EXTERNALSYM GetPaletteEntries}
-function GetPixel(hdc: HDC; nXPos, nYPos: Integer): COLORREF; stdcall;
-{$EXTERNALSYM GetPixel}
-function GetPixelFormat(hdc: HDC): Integer; stdcall;
-{$EXTERNALSYM GetPixelFormat}
-function GetPolyFillMode(hdc: HDC): Integer; stdcall;
-{$EXTERNALSYM GetPolyFillMode}
-function GetRasterizerCaps(var lprs: RASTERIZER_STATUS; cb: UINT): BOOL; stdcall;
-{$EXTERNALSYM GetRasterizerCaps}
-function GetRandomRgn(hdc: HDC; hrgn: HRGN; iNum: Integer): Integer; stdcall;
-{$EXTERNALSYM GetRandomRgn}
-function GetRegionData(hrgn: HRGN; dwCount: DWORD; lpRgnData: LPRGNDATA): DWORD; stdcall;
-{$EXTERNALSYM GetRegionData}
-function GetRgnBox(hrgn: HRGN; var lprc: RECT): Integer; stdcall;
-{$EXTERNALSYM GetRgnBox}
-function GetStockObject(fnObject: Integer): HGDIOBJ; stdcall;
-{$EXTERNALSYM GetStockObject}
-function GetStretchBltMode(hdc: HDC): Integer; stdcall;
-{$EXTERNALSYM GetStretchBltMode}
-function GetSystemPaletteEntries(hdc: HDC; iStartIndex, nEntries: UINT; lppe: LPPALETTEENTRY): UINT; stdcall;
-{$EXTERNALSYM GetSystemPaletteEntries}
-function GetSystemPaletteUse(hdc: HDC): UINT; stdcall;
-{$EXTERNALSYM GetSystemPaletteUse}
-function GetTextCharacterExtra(hdc: HDC): Integer; stdcall;
-{$EXTERNALSYM GetTextCharacterExtra}
-function GetTextAlign(hdc: HDC): UINT; stdcall;
-{$EXTERNALSYM GetTextAlign}
-function GetTextColor(hdc: HDC): COLORREF; stdcall;
-{$EXTERNALSYM GetTextColor}
-
-function GetTextExtentPointA(hdc: HDC; lpString: LPCSTR; cbString: Integer; var Size: TSize): BOOL; stdcall;
-{$EXTERNALSYM GetTextExtentPointA}
-function GetTextExtentPointW(hdc: HDC; lpString: LPCWSTR; cbString: Integer; var Size: TSize): BOOL; stdcall;
-{$EXTERNALSYM GetTextExtentPointW}
-function GetTextExtentPoint(hdc: HDC; lpString: LPCTSTR; cbString: Integer; var Size: TSize): BOOL; stdcall;
-{$EXTERNALSYM GetTextExtentPoint}
-function GetTextExtentPoint32A(hdc: HDC; lpString: LPCSTR; cbString: Integer; var Size: TSize): BOOL; stdcall;
-{$EXTERNALSYM GetTextExtentPoint32A}
-function GetTextExtentPoint32W(hdc: HDC; lpString: LPCWSTR; cbString: Integer; var Size: TSize): BOOL; stdcall;
-{$EXTERNALSYM GetTextExtentPoint32W}
-function GetTextExtentPoint32(hdc: HDC; lpString: LPCTSTR; cbString: Integer; var Size: TSize): BOOL; stdcall;
-{$EXTERNALSYM GetTextExtentPoint32}
-function GetTextExtentExPointA(hdc: HDC; lpszStr: LPCSTR; cchString, nMaxExtend: Integer; lpnFit, alpDx: LPINT; var lpSize: TSize): BOOL; stdcall;
-{$EXTERNALSYM GetTextExtentExPointA}
-function GetTextExtentExPointW(hdc: HDC; lpszStr: LPCWSTR; cchString, nMaxExtend: Integer; lpnFit, alpDx: LPINT; var lpSize: TSize): BOOL; stdcall;
-{$EXTERNALSYM GetTextExtentExPointW}
-function GetTextExtentExPoint(hdc: HDC; lpszStr: LPCTSTR; cchString, nMaxExtend: Integer; lpnFit, alpDx: LPINT; var lpSize: TSize): BOOL; stdcall;
-{$EXTERNALSYM GetTextExtentExPoint}
-function GetTextCharset(hdc: HDC): Integer; stdcall;
-{$EXTERNALSYM GetTextCharset}
-function GetTextCharsetInfo(hdc: HDC; lpSig: LPFONTSIGNATURE; dwFlags: DWORD): Integer; stdcall;
-{$EXTERNALSYM GetTextCharsetInfo}
-function TranslateCharsetInfo(lpSrc: LPDWORD; lpCs: LPCHARSETINFO; dwFlags: DWORD): BOOL; stdcall;
-{$EXTERNALSYM TranslateCharsetInfo}
-function GetFontLanguageInfo(hdc: HDC): DWORD; stdcall;
-{$EXTERNALSYM GetFontLanguageInfo}
-function GetCharacterPlacementA(hdc: HDC; lpString: LPCSTR; nCount, nMaxExtend: Integer; var lpResults: GCP_RESULTSA; dwFlags: DWORD): DWORD; stdcall;
-{$EXTERNALSYM GetCharacterPlacementA}
-function GetCharacterPlacementW(hdc: HDC; lpString: LPCWSTR; nCount, nMaxExtend: Integer; var lpResults: GCP_RESULTSW; dwFlags: DWORD): DWORD; stdcall;
-{$EXTERNALSYM GetCharacterPlacementW}
-function GetCharacterPlacement(hdc: HDC; lpString: LPCTSTR; nCount, nMaxExtend: Integer; var lpResults: GCP_RESULTS; dwFlags: DWORD): DWORD; stdcall;
-{$EXTERNALSYM GetCharacterPlacement}
-
-type
- PWcRange = ^TWcRange;
- tagWCRANGE = record
- wcLow: WCHAR;
- cGlyphs: USHORT;
- end;
- {$EXTERNALSYM tagWCRANGE}
- WCRANGE = tagWCRANGE;
- {$EXTERNALSYM WCRANGE}
- LPWCRANGE = ^WCRANGE;
- {$EXTERNALSYM LPWCRANGE}
- TWcRange = WCRANGE;
-
- PGlyphSet = ^TGlyphSet;
- tagGLYPHSET = record
- cbThis: DWORD;
- flAccel: DWORD;
- cGlyphsSupported: DWORD;
- cRanges: DWORD;
- ranges: array [0..0] of WCRANGE;
- end;
- {$EXTERNALSYM tagGLYPHSET}
- GLYPHSET = tagGLYPHSET;
- {$EXTERNALSYM GLYPHSET}
- LPGLYPHSET = ^GLYPHSET;
- {$EXTERNALSYM LPGLYPHSET}
- TGlyphSet = GLYPHSET;
-
-// flAccel flags for the GLYPHSET structure above
-
-const
- GS_8BIT_INDICES = $00000001;
- {$EXTERNALSYM GS_8BIT_INDICES}
-
-// flags for GetGlyphIndices
-
- GGI_MARK_NONEXISTING_GLYPHS = $0001;
- {$EXTERNALSYM GGI_MARK_NONEXISTING_GLYPHS}
-
-function GetFontUnicodeRanges(hdc: HDC; lpgs: LPGLYPHSET): DWORD; stdcall;
-{$EXTERNALSYM GetFontUnicodeRanges}
-
-function GetGlyphIndicesA(hdc: HDC; lpstr: LPCSTR; c: Integer; pgi: LPWORD; fl: DWORD): DWORD; stdcall;
-{$EXTERNALSYM GetGlyphIndicesA}
-function GetGlyphIndicesW(hdc: HDC; lpstr: LPCWSTR; c: Integer; pgi: LPWORD; fl: DWORD): DWORD; stdcall;
-{$EXTERNALSYM GetGlyphIndicesW}
-function GetGlyphIndices(hdc: HDC; lpstr: LPCTSTR; c: Integer; pgi: LPWORD; fl: DWORD): DWORD; stdcall;
-{$EXTERNALSYM GetGlyphIndices}
-
-function GetTextExtentPointI(hdc: HDC; pgiIn: LPWORD; cgi: Integer; lpSize: LPSIZE): BOOL; stdcall;
-{$EXTERNALSYM GetTextExtentPointI}
-function GetTextExtentExPointI(hdc: HDC; pgiIn: LPWORD; cgi, nMaxExtend: Integer;
- lpnFit, alpDx: LPINT; lpSize: LPSIZE): BOOL; stdcall;
-{$EXTERNALSYM GetTextExtentExPointI}
-function GetCharWidthI(hdc: HDC; giFirst, cgi: UINT; pgi: LPWORD; lpBuffer: LPINT): BOOL; stdcall;
-{$EXTERNALSYM GetCharWidthI}
-function GetCharABCWidthsI(hdc: HDC; giFirst, cgi: UINT; pgi: LPWORD; lpAbc: LPABC): BOOL; stdcall;
-{$EXTERNALSYM GetCharABCWidthsI}
-
-const
- STAMP_DESIGNVECTOR = $8000000 + Ord('d') + (Ord('v') shl 8);
- {$EXTERNALSYM STAMP_DESIGNVECTOR}
- STAMP_AXESLIST = $8000000 + Ord('a') + (Ord('l') shl 8);
- {$EXTERNALSYM STAMP_AXESLIST}
- MM_MAX_NUMAXES = 16;
- {$EXTERNALSYM MM_MAX_NUMAXES}
-
-type
- PDesignVector = ^TDesignVector;
- tagDESIGNVECTOR = record
- dvReserved: DWORD;
- dvNumAxes: DWORD;
- dvValues: array [0..MM_MAX_NUMAXES - 1] of LONG;
- end;
- {$EXTERNALSYM tagDESIGNVECTOR}
- DESIGNVECTOR = tagDESIGNVECTOR;
- {$EXTERNALSYM DESIGNVECTOR}
- LPDESIGNVECTOR = ^DESIGNVECTOR;
- {$EXTERNALSYM LPDESIGNVECTOR}
- TDesignVector = DESIGNVECTOR;
-
-function AddFontResourceExA(lpszFilename: LPCSTR; fl: DWORD; pdv: PVOID): Integer; stdcall;
-{$EXTERNALSYM AddFontResourceExA}
-function AddFontResourceExW(lpszFilename: LPCWSTR; fl: DWORD; pdv: PVOID): Integer; stdcall;
-{$EXTERNALSYM AddFontResourceExW}
-function AddFontResourceEx(lpszFilename: LPCTSTR; fl: DWORD; pdv: PVOID): Integer; stdcall;
-{$EXTERNALSYM AddFontResourceEx}
-
-function RemoveFontResourceExA(lpFilename: LPCSTR; fl: DWORD; pdv: PVOID): BOOL; stdcall;
-{$EXTERNALSYM RemoveFontResourceExA}
-function RemoveFontResourceExW(lpFilename: LPCWSTR; fl: DWORD; pdv: PVOID): BOOL; stdcall;
-{$EXTERNALSYM RemoveFontResourceExW}
-function RemoveFontResourceEx(lpFilename: LPCTSTR; fl: DWORD; pdv: PVOID): BOOL; stdcall;
-{$EXTERNALSYM RemoveFontResourceEx}
-
-function AddFontMemResourceEx(pbFont: PVOID; cbFont: DWORD; pdv: PVOID; pcFonts: LPDWORD): HANDLE; stdcall;
-{$EXTERNALSYM AddFontMemResourceEx}
-function RemoveFontMemResourceEx(fh: HANDLE): BOOL; stdcall;
-{$EXTERNALSYM RemoveFontMemResourceEx}
-
-const
- FR_PRIVATE = $10;
- {$EXTERNALSYM FR_PRIVATE}
- FR_NOT_ENUM = $20;
- {$EXTERNALSYM FR_NOT_ENUM}
-
-// The actual size of the DESIGNVECTOR and ENUMLOGFONTEXDV structures
-// is determined by dvNumAxes,
-// MM_MAX_NUMAXES only detemines the maximal size allowed
-
-const
- MM_MAX_AXES_NAMELEN = 16;
- {$EXTERNALSYM MM_MAX_AXES_NAMELEN}
-
-type
- PAxisInfoA = ^TAxisInfoA;
- tagAXISINFOA = record
- axMinValue: LONG;
- axMaxValue: LONG;
- axAxisName: array [0..MM_MAX_AXES_NAMELEN - 1] of BYTE;
- end;
- {$EXTERNALSYM tagAXISINFOA}
- AXISINFOA = tagAXISINFOA;
- {$EXTERNALSYM AXISINFOA}
- LPAXISINFOA = ^AXISINFOA;
- {$EXTERNALSYM LPAXISINFOA}
- TAxisInfoA = AXISINFOA;
-
- PAxisInfoW = ^TAxisInfoW;
- tagAXISINFOW = record
- axMinValue: LONG;
- axMaxValue: LONG;
- axAxisName: array [0..MM_MAX_AXES_NAMELEN - 1] of WCHAR;
- end;
- {$EXTERNALSYM tagAXISINFOW}
- AXISINFOW = tagAXISINFOW;
- {$EXTERNALSYM AXISINFOW}
- LPAXISINFOW = ^AXISINFOW;
- {$EXTERNALSYM LPAXISINFOW}
- TAxisInfoW = AXISINFOW;
-
- {$IFDEF UNICODE}
- AXISINFO = AXISINFOW;
- {$EXTERNALSYM AXISINFO}
- PAXISINFO = PAXISINFOW;
- {$EXTERNALSYM PAXISINFO}
- LPAXISINFO = LPAXISINFOW;
- {$EXTERNALSYM LPAXISINFO}
- TAxisInfo = TAxisInfoW;
- {$ELSE}
- AXISINFO = AXISINFOA;
- {$EXTERNALSYM AXISINFO}
- PAXISINFO = PAXISINFOA;
- {$EXTERNALSYM PAXISINFO}
- LPAXISINFO = LPAXISINFOA;
- {$EXTERNALSYM LPAXISINFO}
- TAxisInfo = TAxisInfoA;
- {$ENDIF UNICODE}
-
- PAxesListA = ^TAxesListA;
- tagAXESLISTA = record
- axlReserved: DWORD;
- axlNumAxes: DWORD;
- axlAxisInfo: array [0..MM_MAX_NUMAXES - 1] of AXISINFOA;
- end;
- {$EXTERNALSYM tagAXESLISTA}
- AXESLISTA = tagAXESLISTA;
- {$EXTERNALSYM AXESLISTA}
- LPAXESLISTA = ^AXESLISTA;
- {$EXTERNALSYM LPAXESLISTA}
- TAxesListA = tagAXESLISTA;
-
- PAxesListW = ^TAxesListW;
- tagAXESLISTW = record
- axlReserved: DWORD;
- axlNumAxes: DWORD;
- axlAxisInfo: array [0..MM_MAX_NUMAXES - 1] of AXISINFOW;
- end;
- {$EXTERNALSYM tagAXESLISTW}
- AXESLISTW = tagAXESLISTW;
- {$EXTERNALSYM AXESLISTW}
- LPAXESLISTW = ^AXESLISTW;
- {$EXTERNALSYM LPAXESLISTW}
- TAxesListW = tagAXESLISTW;
-
- {$IFDEF UNICODE}
- AXESLIST = AXESLISTW;
- {$EXTERNALSYM AXESLIST}
- PAXESLIST = PAXESLISTW;
- {$EXTERNALSYM PAXESLIST}
- LPAXESLIST = LPAXESLISTW;
- {$EXTERNALSYM LPAXESLIST}
- TAxesList = TAxesListW;
- {$ELSE}
- AXESLIST = AXESLISTA;
- {$EXTERNALSYM AXESLIST}
- PAXESLIST = PAXESLISTA;
- {$EXTERNALSYM PAXESLIST}
- LPAXESLIST = LPAXESLISTA;
- {$EXTERNALSYM LPAXESLIST}
- TAxesList = TAxesListA;
- {$ENDIF UNICODE}
-
-// The actual size of the AXESLIST and ENUMTEXTMETRIC structure is
-// determined by axlNumAxes,
-// MM_MAX_NUMAXES only detemines the maximal size allowed
-
- PEnumLogFontExDVA = ^TEnumLogFontExDVA;
- tagENUMLOGFONTEXDVA = record
- elfEnumLogfontEx: ENUMLOGFONTEXA;
- elfDesignVector: DESIGNVECTOR;
- end;
- {$EXTERNALSYM tagENUMLOGFONTEXDVA}
- ENUMLOGFONTEXDVA = tagENUMLOGFONTEXDVA;
- {$EXTERNALSYM ENUMLOGFONTEXDVA}
- LPENUMLOGFONTEXDVA = ^ENUMLOGFONTEXDVA;
- {$EXTERNALSYM LPENUMLOGFONTEXDVA}
- TEnumLogFontExDVA = tagENUMLOGFONTEXDVA;
-
- PEnumLogFontExDVW = ^TEnumLogFontExDVW;
- tagENUMLOGFONTEXDVW = record
- elfEnumLogfontEx: ENUMLOGFONTEXW;
- elfDesignVector: DESIGNVECTOR;
- end;
- {$EXTERNALSYM tagENUMLOGFONTEXDVw}
- ENUMLOGFONTEXDVW = tagENUMLOGFONTEXDVW;
- {$EXTERNALSYM ENUMLOGFONTEXDVW}
- LPENUMLOGFONTEXDVW = ^ENUMLOGFONTEXDVW;
- {$EXTERNALSYM LPENUMLOGFONTEXDVW}
- TEnumLogFontExDVW = tagENUMLOGFONTEXDVW;
-
- {$IFDEF UNICODE}
- ENUMLOGFONTEXDV = ENUMLOGFONTEXDVW;
- {$EXTERNALSYM ENUMLOGFONTEXDV}
- PENUMLOGFONTEXDV = PENUMLOGFONTEXDVW;
- {$EXTERNALSYM PENUMLOGFONTEXDV}
- LPENUMLOGFONTEXDV = LPENUMLOGFONTEXDVW;
- {$EXTERNALSYM LPENUMLOGFONTEXDV}
- TEnumLogFontExDV = TEnumLogFontExDVW;
- {$ELSE}
- ENUMLOGFONTEXDV = ENUMLOGFONTEXDVA;
- {$EXTERNALSYM ENUMLOGFONTEXDV}
- PENUMLOGFONTEXDV = PENUMLOGFONTEXDVA;
- {$EXTERNALSYM PENUMLOGFONTEXDV}
- LPENUMLOGFONTEXDV = LPENUMLOGFONTEXDVA;
- {$EXTERNALSYM LPENUMLOGFONTEXDV}
- TEnumLogFontExDV = TEnumLogFontExDVA;
- {$ENDIF UNICODE}
-
-function CreateFontIndirectExA(penumlfex: LPENUMLOGFONTEXDVA): HFONT; stdcall;
-{$EXTERNALSYM CreateFontIndirectExA}
-function CreateFontIndirectExW(penumlfex: LPENUMLOGFONTEXDVW): HFONT; stdcall;
-{$EXTERNALSYM CreateFontIndirectExW}
-function CreateFontIndirectEx(penumlfex: LPENUMLOGFONTEXDV): HFONT; stdcall;
-{$EXTERNALSYM CreateFontIndirectEx}
-
-type
- PEnumTextMetricA = ^TEnumTextMetricA;
- tagENUMTEXTMETRICA = record
- etmNewTextMetricEx: NEWTEXTMETRICEXA;
- etmAxesList: AXESLISTA;
- end;
- {$EXTERNALSYM tagENUMTEXTMETRICA}
- ENUMTEXTMETRICA = tagENUMTEXTMETRICA;
- {$EXTERNALSYM ENUMTEXTMETRICA}
- LPENUMTEXTMETRICA = ^ENUMTEXTMETRICA;
- {$EXTERNALSYM LPENUMTEXTMETRICA}
- TEnumTextMetricA = tagENUMTEXTMETRICA;
-
- PEnumTextMetricW = ^TEnumTextMetricW;
- tagENUMTEXTMETRICW = record
- etmNewTextMetricEx: NEWTEXTMETRICEXW;
- etmAxesList: AXESLISTW;
- end;
- {$EXTERNALSYM tagENUMTEXTMETRICW}
- ENUMTEXTMETRICW = tagENUMTEXTMETRICW;
- {$EXTERNALSYM ENUMTEXTMETRICW}
- LPENUMTEXTMETRICW = ^ENUMTEXTMETRICW;
- {$EXTERNALSYM LPENUMTEXTMETRICW}
- TEnumTextMetricW = tagENUMTEXTMETRICW;
-
- {$IFDEF UNICODE}
- ENUMTEXTMETRIC = ENUMTEXTMETRICW;
- {$EXTERNALSYM ENUMTEXTMETRIC}
- PENUMTEXTMETRIC = PENUMTEXTMETRICW;
- {$EXTERNALSYM PENUMTEXTMETRIC}
- LPENUMTEXTMETRIC = LPENUMTEXTMETRICW;
- {$EXTERNALSYM LPENUMTEXTMETRIC}
- TEnumTextMetric = TEnumTextMetricW;
- {$ELSE}
- ENUMTEXTMETRIC = ENUMTEXTMETRICA;
- {$EXTERNALSYM ENUMTEXTMETRIC}
- PENUMTEXTMETRIC = PENUMTEXTMETRICA;
- {$EXTERNALSYM PENUMTEXTMETRIC}
- LPENUMTEXTMETRIC = LPENUMTEXTMETRICA;
- {$EXTERNALSYM LPENUMTEXTMETRIC}
- TEnumTextMetric = TEnumTextMetricA;
- {$ENDIF UNICODE}
-
-function GetViewportExtEx(hdc: HDC; var lpSize: TSize): BOOL; stdcall;
-{$EXTERNALSYM GetViewportExtEx}
-function GetViewportOrgEx(hdc: HDC; var lpPoint: POINT): BOOL; stdcall;
-{$EXTERNALSYM GetViewportOrgEx}
-function GetWindowExtEx(hdc: HDC; var lpSize: TSize): BOOL; stdcall;
-{$EXTERNALSYM GetWindowExtEx}
-function GetWindowOrgEx(hdc: HDC; var lpPoint: POINT): BOOL; stdcall;
-{$EXTERNALSYM GetWindowOrgEx}
-
-function IntersectClipRect(hdc: HDC; nLeftRect, nTopRect, nRightRect, nBottomRect: Integer): Integer; stdcall;
-{$EXTERNALSYM IntersectClipRect}
-function InvertRgn(hdc: HDC; hrgn: HRGN): BOOL; stdcall;
-{$EXTERNALSYM InvertRgn}
-function LineDDA(nXStart, nYStart, nXEnd, nYEnd: Integer; lpLineFunc: LINEDDAPROC; lpData: LPARAM): BOOL; stdcall;
-{$EXTERNALSYM LineDDA}
-function LineTo(hdc: HDC; nXEnd, nYEnd: Integer): BOOL; stdcall;
-{$EXTERNALSYM LineTo}
-function MaskBlt(hdc: HDC; nXDest, nYDest, nWidth, nHeight: Integer; hdcSrc: HDC; nXSrc, nYSrc: Integer; hbmMask: HBITMAP; xMask, yMask: Integer; dwRop: DWORD): BOOL; stdcall;
-{$EXTERNALSYM MaskBlt}
-function PlgBlt(hdc: HDC; lpPoint: LPPOINT; hdcSrc: HDC; nXSrc, nYSrc, nWidth, nHeight: Integer; hbmMask: HBITMAP; xMask, yMask: Integer): BOOL; stdcall;
-{$EXTERNALSYM PlgBlt}
-
-function OffsetClipRgn(hdc: HDC; nXOffset, nYOffset: Integer): Integer; stdcall;
-{$EXTERNALSYM OffsetClipRgn}
-function OffsetRgn(hrgn: HRGN; nXOffset, nYOffset: Integer): Integer; stdcall;
-{$EXTERNALSYM OffsetRgn}
-function PatBlt(hdc: HDC; nXLeft, nYLeft, nWidth, nHeight: Integer; dwRop: DWORD): BOOL; stdcall;
-{$EXTERNALSYM PatBlt}
-function Pie(hdc: HDC; nLeftRect, nTopRect, nRightRect, nBottomRect, nXRadial1, nYRadial1, nXRadial2, nYRadial2: Integer): BOOL; stdcall;
-{$EXTERNALSYM Pie}
-function PlayMetaFile(hdc: HDC; hmf: HMETAFILE): BOOL; stdcall;
-{$EXTERNALSYM PlayMetaFile}
-function PaintRgn(hdc: HDC; hrgn: HRGN): BOOL; stdcall;
-{$EXTERNALSYM PaintRgn}
-function PolyPolygon(hdc: HDC; lpPoints: LPPOINT; lpPolyCounts: LPINT; nCount: Integer): BOOL; stdcall;
-{$EXTERNALSYM PolyPolygon}
-function PtInRegion(hrgn: HRGN; X, Y: Integer): BOOL; stdcall;
-{$EXTERNALSYM PtInRegion}
-function PtVisible(hdc: HDC; X, Y: Integer): BOOL; stdcall;
-{$EXTERNALSYM PtVisible}
-function RectInRegion(hrgn: HRGN; const lprc: RECT): BOOL; stdcall;
-{$EXTERNALSYM RectInRegion}
-function RectVisible(hdc: HDC; const lprc: RECT): BOOL; stdcall;
-{$EXTERNALSYM RectVisible}
-function Rectangle(hdc: HDC; nLeftRect, nTopRect, nRightRect, nBottomRect: Integer): BOOL; stdcall;
-{$EXTERNALSYM Rectangle}
-function RestoreDC(hdc: HDC; nSavedDc: Integer): BOOL; stdcall;
-{$EXTERNALSYM RestoreDC}
-function ResetDCA(hdc: HDC; const lpInitData: DEVMODEA): HDC; stdcall;
-{$EXTERNALSYM ResetDCA}
-function ResetDCW(hdc: HDC; const lpInitData: DEVMODEW): HDC; stdcall;
-{$EXTERNALSYM ResetDCW}
-function ResetDC(hdc: HDC; const lpInitData: DEVMODE): HDC; stdcall;
-{$EXTERNALSYM ResetDC}
-function RealizePalette(hdc: HDC): UINT; stdcall;
-{$EXTERNALSYM RealizePalette}
-function RemoveFontResourceA(lpFileName: LPCSTR): BOOL; stdcall;
-{$EXTERNALSYM RemoveFontResourceA}
-function RemoveFontResourceW(lpFileName: LPCWSTR): BOOL; stdcall;
-{$EXTERNALSYM RemoveFontResourceW}
-function RemoveFontResource(lpFileName: LPCTSTR): BOOL; stdcall;
-{$EXTERNALSYM RemoveFontResource}
-function RoundRect(hdc: HDC; nLeftRect, nTopRect, nRightRect, nBottomRect, nWidth, nHeight: Integer): BOOL; stdcall;
-{$EXTERNALSYM RoundRect}
-function ResizePalette(hPal: HPALETTE; nEntries: UINT): BOOL; stdcall;
-{$EXTERNALSYM ResizePalette}
-function SaveDC(hdc: HDC): Integer; stdcall;
-{$EXTERNALSYM SaveDC}
-function SelectClipRgn(hdc: HDC; hrgn: HRGN): Integer; stdcall;
-{$EXTERNALSYM SelectClipRgn}
-function ExtSelectClipRgn(hdc: HDC; hrgn: HRGN; fnMode: Integer): Integer; stdcall;
-{$EXTERNALSYM ExtSelectClipRgn}
-function SetMetaRgn(hdc: HDC): Integer; stdcall;
-{$EXTERNALSYM SetMetaRgn}
-function SelectObject(hdc: HDC; hgdiobj: HGDIOBJ): HGDIOBJ; stdcall;
-{$EXTERNALSYM SelectObject}
-function SelectPalette(hdc: HDC; hpal: HPALETTE; nForceBackground: BOOL): HPALETTE; stdcall;
-{$EXTERNALSYM SelectPalette}
-function SetBkColor(hdc: HDC; crColor: COLORREF): COLORREF; stdcall;
-{$EXTERNALSYM SetBkColor}
-
-function SetDCBrushColor(hdc: HDC; crColor: COLORREF): COLORREF; stdcall;
-{$EXTERNALSYM SetDCBrushColor}
-function SetDCPenColor(hdc: HDC; crColor: COLORREF): COLORREF; stdcall;
-{$EXTERNALSYM SetDCPenColor}
-
-function SetBkMode(hdc: HDC; iBlMode: Integer): Integer; stdcall;
-{$EXTERNALSYM SetBkMode}
-function SetBitmapBits(hbmp: HBITMAP; cBytes: DWORD; lpBits: LPVOID): LONG; stdcall;
-{$EXTERNALSYM SetBitmapBits}
-
-function SetBoundsRect(hdc: HDC; lprcBounds: LPRECT; flags: UINT): UINT; stdcall;
-{$EXTERNALSYM SetBoundsRect}
-function SetDIBits(hdc: HDC; hbmp: HBITMAP; uStartScan, cScanLines: UINT; lpvBits: LPVOID; const lpbmi: BITMAPINFO; fuColorUse: UINT): Integer; stdcall;
-{$EXTERNALSYM SetDIBits}
-function SetDIBitsToDevice(hdc: HDC; xDest, yDest: Integer; dwWidth, dwHeight: DWORD; XSrc, YSrc: Integer; uStartScan, cScanLines: UINT; lpvBits: LPVOID; const lpbmi: BITMAPINFO; fuColorUse: UINT): Integer; stdcall;
-{$EXTERNALSYM SetDIBitsToDevice}
-function SetMapperFlags(hdc: HDC; dwFlag: DWORD): DWORD; stdcall;
-{$EXTERNALSYM SetMapperFlags}
-function SetGraphicsMode(hdc: HDC; iMode: Integer): Integer; stdcall;
-{$EXTERNALSYM SetGraphicsMode}
-function SetMapMode(hdc: HDC; fnMapMode: Integer): Integer; stdcall;
-{$EXTERNALSYM SetMapMode}
-
-function SetLayout(hdc: HDC; dwLayOut: DWORD): DWORD; stdcall;
-{$EXTERNALSYM SetLayout}
-function GetLayout(hdc: HDC): DWORD; stdcall;
-{$EXTERNALSYM GetLayout}
-
-function SetMetaFileBitsEx(nSize: UINT; lpData: LPBYTE): HMETAFILE; stdcall;
-{$EXTERNALSYM SetMetaFileBitsEx}
-function SetPaletteEntries(hPal: HPALETTE; cStart, nEntries: UINT; lppe: LPPALETTEENTRY): UINT; stdcall;
-{$EXTERNALSYM SetPaletteEntries}
-function SetPixel(hdc: HDC; X, Y: Integer; crColor: COLORREF): COLORREF; stdcall;
-{$EXTERNALSYM SetPixel}
-function SetPixelV(hdc: HDC; X, Y: Integer; crColor: COLORREF): BOOL; stdcall;
-{$EXTERNALSYM SetPixelV}
-function SetPixelFormat(hdc: HDC; iPixelFormat: Integer; const ppfd: PIXELFORMATDESCRIPTOR): BOOL; stdcall;
-{$EXTERNALSYM SetPixelFormat}
-function SetPolyFillMode(hdc: HDC; iPolyFillMode: Integer): Integer; stdcall;
-{$EXTERNALSYM SetPolyFillMode}
-function StretchBlt(hdc: HDC; nXOriginDest, nYOriginDest, nWidthDest, nHeightDest: Integer; hdcSrc: HDC; nXOriginSrc, nYOriginSrc, nWidthSrc, nHeightSrc: Integer; dwRop: DWORD): BOOL; stdcall;
-{$EXTERNALSYM StretchBlt}
-function SetRectRgn(hrgn: HRGN; nLeftRect, nTopRect, nRightRect, nBottomRect: Integer): BOOL; stdcall;
-{$EXTERNALSYM SetRectRgn}
-function StretchDIBits(hdc: HDC; XDest, YDest, nDestWidth, nYDestHeight, XSrc, YSrc, nSrcWidth, nSrcHeight: Integer; lpBits: LPVOID; const lpBitsInfo: BITMAPINFO; iUsage: UINT; dwRop: DWORD): Integer; stdcall;
-{$EXTERNALSYM StretchDIBits}
-function SetROP2(hdc: HDC; fnDrawMode: Integer): Integer; stdcall;
-{$EXTERNALSYM SetROP2}
-function SetStretchBltMode(hdc: HDC; iStretchMode: Integer): Integer; stdcall;
-{$EXTERNALSYM SetStretchBltMode}
-function SetSystemPaletteUse(hdc: HDC; uUsage: UINT): UINT; stdcall;
-{$EXTERNALSYM SetSystemPaletteUse}
-function SetTextCharacterExtra(hdc: HDC; nCharExtra: Integer): Integer; stdcall;
-{$EXTERNALSYM SetTextCharacterExtra}
-function SetTextColor(hdc: HDC; crColor: COLORREF): COLORREF; stdcall;
-{$EXTERNALSYM SetTextColor}
-function SetTextAlign(hdc: HDC; fMode: UINT): UINT; stdcall;
-{$EXTERNALSYM SetTextAlign}
-function SetTextJustification(hdc: HDC; nBreakExtra, nBreakCount: Integer): BOOL; stdcall;
-{$EXTERNALSYM SetTextJustification}
-function UpdateColors(hdc: HDC): BOOL; stdcall;
-{$EXTERNALSYM UpdateColors}
-
-//
-// image blt
-//
-
-type
- COLOR16 = USHORT;
- {$EXTERNALSYM COLOR16}
-
- PTriVertex = ^TTriVertex;
- _TRIVERTEX = record
- x: LONG;
- y: LONG;
- Red: COLOR16;
- Green: COLOR16;
- Blue: COLOR16;
- Alpha: COLOR16;
- end;
- {$EXTERNALSYM _TRIVERTEX}
- TRIVERTEX = _TRIVERTEX;
- {$EXTERNALSYM TRIVERTEX}
- LPTRIVERTEX = ^TRIVERTEX;
- {$EXTERNALSYM LPTRIVERTEX}
- TTriVertex = _TRIVERTEX;
-
- PGradientTriangle = ^TGradientTriangle;
- _GRADIENT_TRIANGLE = record
- Vertex1: ULONG;
- Vertex2: ULONG;
- Vertex3: ULONG;
- end;
- {$EXTERNALSYM _GRADIENT_TRIANGLE}
- GRADIENT_TRIANGLE = _GRADIENT_TRIANGLE;
- {$EXTERNALSYM GRADIENT_TRIANGLE}
- LPGRADIENT_TRIANGLE = ^GRADIENT_TRIANGLE;
- {$EXTERNALSYM LPGRADIENT_TRIANGLE}
- PGRADIENT_TRIANGLE = ^GRADIENT_TRIANGLE;
- {$EXTERNALSYM PGRADIENT_TRIANGLE}
- TGradientTriangle = _GRADIENT_TRIANGLE;
-
- PGradientRect = ^TGradientRect;
- _GRADIENT_RECT = record
- UpperLeft: ULONG;
- LowerRight: ULONG;
- end;
- {$EXTERNALSYM _GRADIENT_RECT}
- GRADIENT_RECT = _GRADIENT_RECT;
- {$EXTERNALSYM GRADIENT_RECT}
- LPGRADIENT_RECT = ^GRADIENT_RECT;
- {$EXTERNALSYM LPGRADIENT_RECT}
- PGRADIENT_RECT = ^GRADIENT_RECT;
- {$EXTERNALSYM PGRADIENT_RECT}
- TGradientRect = _GRADIENT_RECT;
-
- PBlendFunction = ^TBlendFunction;
- _BLENDFUNCTION = record
- BlendOp: BYTE;
- BlendFlags: BYTE;
- SourceConstantAlpha: BYTE;
- AlphaFormat: BYTE;
- end;
- {$EXTERNALSYM _BLENDFUNCTION}
- BLENDFUNCTION = _BLENDFUNCTION;
- {$EXTERNALSYM BLENDFUNCTION}
- LPBLENDFUNCTION = ^BLENDFUNCTION;
- {$EXTERNALSYM LPBLENDFUNCTION}
- TBlendFunction = _BLENDFUNCTION;
-
-//
-// currentlly defined blend function
-//
-
-const
- AC_SRC_OVER = $00;
- {$EXTERNALSYM AC_SRC_OVER}
-
-//
-// alpha format flags
-//
-
- AC_SRC_ALPHA = $01;
- {$EXTERNALSYM AC_SRC_ALPHA}
-
-function AlphaBlend(hdcDest: HDC; nXOriginDest, nYOriginDest, nWidthDest,
- nHeightDest: Integer; hdcSrc: HDC; nXOriginSrc, nYOriginSrc, nWidthSrc,
- nHeightSrc: Integer; blendFunction: BLENDFUNCTION): BOOL; stdcall;
-{$EXTERNALSYM AlphaBlend}
-
-function TransparentBlt(hdcSrc: HDC; nXOriginSrc, nYOriginSrc, nWidthSrc,
- nHeightSrc: Integer; hdcDest: HDC; nXOriginDest, nYOriginDest, nWidthDest,
- nHeightDest: Integer; blendFunction: BLENDFUNCTION): BOOL; stdcall;
-{$EXTERNALSYM TransparentBlt}
-
-//
-// gradient drawing modes
-//
-
-const
- GRADIENT_FILL_RECT_H = $00000000;
- {$EXTERNALSYM GRADIENT_FILL_RECT_H}
- GRADIENT_FILL_RECT_V = $00000001;
- {$EXTERNALSYM GRADIENT_FILL_RECT_V}
- GRADIENT_FILL_TRIANGLE = $00000002;
- {$EXTERNALSYM GRADIENT_FILL_TRIANGLE}
- GRADIENT_FILL_OP_FLAG = $000000ff;
- {$EXTERNALSYM GRADIENT_FILL_OP_FLAG}
-
-function GradientFill(hdc: HDC; pVertex: PTRIVERTEX; dwNumVertex: ULONG; pMesh: PVOID; dwNumMesh, dwMode: ULONG): BOOL; stdcall;
-{$EXTERNALSYM GradientFill}
-function PlayMetaFileRecord(hdc: HDC; lpHandleTable: LPHANDLETABLE; lpMetaRecord: LPMETARECORD; nHandles: UINT): BOOL; stdcall;
-{$EXTERNALSYM PlayMetaFileRecord}
-
-type
- MFENUMPROC = function(hdc: HDC; lpHTable: LPHANDLETABLE; lpMFR: LPMETARECORD; nObj: Integer; lpClientData: LPARAM): Integer; stdcall;
- {$EXTERNALSYM MFENUMPROC}
-
-function EnumMetaFile(hdc: HDC; hemf: HMETAFILE; lpMetaFunc: MFENUMPROC; lParam: LPARAM): BOOL; stdcall;
-{$EXTERNALSYM EnumMetaFile}
-
-type
- ENHMFENUMPROC = function(hdc: HDC; lpHTable: LPHANDLETABLE; lpEMFR: LPENHMETARECORD; nObj: Integer; lpData: LPARAM): Integer; stdcall;
- {$EXTERNALSYM ENHMFENUMPROC}
-
-// Enhanced Metafile Function Declarations
-
-function CloseEnhMetaFile(hdc: HDC): HENHMETAFILE; stdcall;
-{$EXTERNALSYM CloseEnhMetaFile}
-function CopyEnhMetaFileA(hemfSrc: HENHMETAFILE; lpszFile: LPCSTR): HENHMETAFILE; stdcall;
-{$EXTERNALSYM CopyEnhMetaFileA}
-function CopyEnhMetaFileW(hemfSrc: HENHMETAFILE; lpszFile: LPCWSTR): HENHMETAFILE; stdcall;
-{$EXTERNALSYM CopyEnhMetaFileW}
-function CopyEnhMetaFile(hemfSrc: HENHMETAFILE; lpszFile: LPCTSTR): HENHMETAFILE; stdcall;
-{$EXTERNALSYM CopyEnhMetaFile}
-function CreateEnhMetaFileA(hdcRef: HDC; lpFileName: LPCSTR; const lpRect: RECT; lpDescription: LPCSTR): HDC; stdcall;
-{$EXTERNALSYM CreateEnhMetaFileA}
-function CreateEnhMetaFileW(hdcRef: HDC; lpFileName: LPCWSTR; const lpRect: RECT; lpDescription: LPCWSTR): HDC; stdcall;
-{$EXTERNALSYM CreateEnhMetaFileW}
-function CreateEnhMetaFile(hdcRef: HDC; lpFileName: LPCTSTR; const lpRect: RECT; lpDescription: LPCTSTR): HDC; stdcall;
-{$EXTERNALSYM CreateEnhMetaFile}
-
-function DeleteEnhMetaFile(hemf: HENHMETAFILE): BOOL; stdcall;
-{$EXTERNALSYM DeleteEnhMetaFile}
-function EnumEnhMetaFile(hdc: HDC; hemf: HENHMETAFILE; lpEnhMetaFunc: ENHMFENUMPROC; lpData: LPVOID; const lpRect: RECT): BOOL; stdcall;
-{$EXTERNALSYM EnumEnhMetaFile}
-function GetEnhMetaFileA(lpszMetaFile: LPCSTR): HENHMETAFILE; stdcall;
-{$EXTERNALSYM GetEnhMetaFileA}
-function GetEnhMetaFileW(lpszMetaFile: LPCWSTR): HENHMETAFILE; stdcall;
-{$EXTERNALSYM GetEnhMetaFileW}
-function GetEnhMetaFile(lpszMetaFile: LPCTSTR): HENHMETAFILE; stdcall;
-{$EXTERNALSYM GetEnhMetaFile}
-function GetEnhMetaFileBits(hemf: HENHMETAFILE; cbBuffer: UINT; lpBuffer: LPBYTE): UINT; stdcall;
-{$EXTERNALSYM GetEnhMetaFileBits}
-function GetEnhMetaFileDescriptionA(hemf: HENHMETAFILE; cchBuffer: UINT; lpszDescription: LPSTR): UINT; stdcall;
-{$EXTERNALSYM GetEnhMetaFileDescriptionA}
-function GetEnhMetaFileDescriptionW(hemf: HENHMETAFILE; cchBuffer: UINT; lpszDescription: LPWSTR): UINT; stdcall;
-{$EXTERNALSYM GetEnhMetaFileDescriptionW}
-function GetEnhMetaFileDescription(hemf: HENHMETAFILE; cchBuffer: UINT; lpszDescription: LPTSTR): UINT; stdcall;
-{$EXTERNALSYM GetEnhMetaFileDescription}
-function GetEnhMetaFileHeader(hemf: HENHMETAFILE; cbBuffer: UINT; lpemh: LPENHMETAHEADER ): UINT; stdcall;
-{$EXTERNALSYM GetEnhMetaFileHeader}
-function GetEnhMetaFilePaletteEntries(hemf: HENHMETAFILE; cEntries: UINT; lppe: LPPALETTEENTRY ): UINT; stdcall;
-{$EXTERNALSYM GetEnhMetaFilePaletteEntries}
-function GetEnhMetaFilePixelFormat(hemf: HENHMETAFILE; cbBuffer: UINT; var ppfd: PIXELFORMATDESCRIPTOR): UINT; stdcall;
-{$EXTERNALSYM GetEnhMetaFilePixelFormat}
-function GetWinMetaFileBits(hemf: HENHMETAFILE; cbBuffer: UINT; lpbBuffer: LPBYTE; fnMapMode: Integer; hdcRef: HDC): UINT; stdcall;
-{$EXTERNALSYM GetWinMetaFileBits}
-function PlayEnhMetaFile(hdc: HDC; hemf: HENHMETAFILE; const lpRect: RECT): BOOL; stdcall;
-{$EXTERNALSYM PlayEnhMetaFile}
-function PlayEnhMetaFileRecord(hdc: HDC; lpHandleTable: LPHANDLETABLE; lpEnhMetaRecord: LPENHMETARECORD; nHandles: UINT): BOOL; stdcall;
-{$EXTERNALSYM PlayEnhMetaFileRecord}
-function SetEnhMetaFileBits(cbBuffer: UINT; lpData: LPBYTE): HENHMETAFILE; stdcall;
-{$EXTERNALSYM SetEnhMetaFileBits}
-function SetWinMetaFileBits(cbBuffer: UINT; lpbBuffer: LPBYTE; hdcRef: HDC; const lpmfp: METAFILEPICT): HENHMETAFILE; stdcall;
-{$EXTERNALSYM SetWinMetaFileBits}
-function GdiComment(hdc: HDC; cbSize: UINT; lpData: LPBYTE): BOOL; stdcall;
-{$EXTERNALSYM GdiComment}
-
-function GetTextMetricsA(hdc: HDC; var lptm: TEXTMETRICA): BOOL; stdcall;
-{$EXTERNALSYM GetTextMetricsA}
-function GetTextMetricsW(hdc: HDC; var lptm: TEXTMETRICW): BOOL; stdcall;
-{$EXTERNALSYM GetTextMetricsW}
-function GetTextMetrics(hdc: HDC; var lptm: TEXTMETRIC): BOOL; stdcall;
-{$EXTERNALSYM GetTextMetrics}
-
-// new GDI
-
-type
- PDibSection = ^TDibSection;
- tagDIBSECTION = record
- dsBm: BITMAP;
- dsBmih: BITMAPINFOHEADER;
- dsBitfields: array [0..2] of DWORD;
- dshSection: HANDLE;
- dsOffset: DWORD;
- end;
- {$EXTERNALSYM tagDIBSECTION}
- DIBSECTION = tagDIBSECTION;
- {$EXTERNALSYM DIBSECTION}
- LPDIBSECTION = ^DIBSECTION;
- {$EXTERNALSYM LPDIBSECTION}
- TDibSection = DIBSECTION;
-
-function AngleArc(hdc: HDC; X, Y: Integer; dwRadius: DWORD; eStartAngle, eSweepAngle: FLOAT): BOOL; stdcall;
-{$EXTERNALSYM AngleArc}
-function PolyPolyline(hdc: HDC; lppt: LPPOINT; lpdwPolyPoints: LPDWORD; cCount: DWORD): BOOL; stdcall;
-{$EXTERNALSYM PolyPolyline}
-function GetWorldTransform(hdc: HDC; lpXform: LPXFORM): BOOL; stdcall;
-{$EXTERNALSYM GetWorldTransform}
-function SetWorldTransform(hdc: HDC; lpXform: LPXFORM): BOOL; stdcall;
-{$EXTERNALSYM SetWorldTransform}
-function ModifyWorldTransform(hdc: HDC; lpXform: LPXFORM; iMode: DWORD): BOOL; stdcall;
-{$EXTERNALSYM ModifyWorldTransform}
-function CombineTransform(lpxformResult, lpXform1, lpXform2: LPXFORM): BOOL; stdcall;
-{$EXTERNALSYM CombineTransform}
-function CreateDIBSection(hdc: HDC; pbmi: LPBITMAPINFO; iUsage: UINT;
- ppvBits: PPVOID; hSection: HANDLE; dwOffset: DWORD): HBITMAP; stdcall;
-{$EXTERNALSYM CreateDIBSection}
-function GetDIBColorTable(hdc: HDC; uStartIndex, cEntries: UINT; pColors: PRGBQUAD): UINT; stdcall;
-{$EXTERNALSYM GetDIBColorTable}
-function SetDIBColorTable(hdc: HDC; uStartIndex, cEntries: UINT; pColors: PRGBQUAD): UINT; stdcall;
-{$EXTERNALSYM SetDIBColorTable}
-
-// Flags value for COLORADJUSTMENT
-
-const
- CA_NEGATIVE = $0001;
- {$EXTERNALSYM CA_NEGATIVE}
- CA_LOG_FILTER = $0002;
- {$EXTERNALSYM CA_LOG_FILTER}
-
-// IlluminantIndex values
-
- ILLUMINANT_DEVICE_DEFAULT = 0;
- {$EXTERNALSYM ILLUMINANT_DEVICE_DEFAULT}
- ILLUMINANT_A = 1;
- {$EXTERNALSYM ILLUMINANT_A}
- ILLUMINANT_B = 2;
- {$EXTERNALSYM ILLUMINANT_B}
- ILLUMINANT_C = 3;
- {$EXTERNALSYM ILLUMINANT_C}
- ILLUMINANT_D50 = 4;
- {$EXTERNALSYM ILLUMINANT_D50}
- ILLUMINANT_D55 = 5;
- {$EXTERNALSYM ILLUMINANT_D55}
- ILLUMINANT_D65 = 6;
- {$EXTERNALSYM ILLUMINANT_D65}
- ILLUMINANT_D75 = 7;
- {$EXTERNALSYM ILLUMINANT_D75}
- ILLUMINANT_F2 = 8;
- {$EXTERNALSYM ILLUMINANT_F2}
- ILLUMINANT_MAX_INDEX = ILLUMINANT_F2;
- {$EXTERNALSYM ILLUMINANT_MAX_INDEX}
-
- ILLUMINANT_TUNGSTEN = ILLUMINANT_A;
- {$EXTERNALSYM ILLUMINANT_TUNGSTEN}
- ILLUMINANT_DAYLIGHT = ILLUMINANT_C;
- {$EXTERNALSYM ILLUMINANT_DAYLIGHT}
- ILLUMINANT_FLUORESCENT = ILLUMINANT_F2;
- {$EXTERNALSYM ILLUMINANT_FLUORESCENT}
- ILLUMINANT_NTSC = ILLUMINANT_C;
- {$EXTERNALSYM ILLUMINANT_NTSC}
-
-// Min and max for RedGamma, GreenGamma, BlueGamma
-
- RGB_GAMMA_MIN = WORD(02500);
- {$EXTERNALSYM RGB_GAMMA_MIN}
- RGB_GAMMA_MAX = WORD(65000);
- {$EXTERNALSYM RGB_GAMMA_MAX}
-
-// Min and max for ReferenceBlack and ReferenceWhite
-
- REFERENCE_WHITE_MIN = WORD(6000);
- {$EXTERNALSYM REFERENCE_WHITE_MIN}
- REFERENCE_WHITE_MAX = WORD(10000);
- {$EXTERNALSYM REFERENCE_WHITE_MAX}
- REFERENCE_BLACK_MIN = WORD(0);
- {$EXTERNALSYM REFERENCE_BLACK_MIN}
- REFERENCE_BLACK_MAX = WORD(4000);
- {$EXTERNALSYM REFERENCE_BLACK_MAX}
-
-// Min and max for Contrast, Brightness, Colorfulness, RedGreenTint
-
- COLOR_ADJ_MIN = SHORT(-100);
- {$EXTERNALSYM COLOR_ADJ_MIN}
- COLOR_ADJ_MAX = SHORT(100);
- {$EXTERNALSYM COLOR_ADJ_MAX}
-
-type
- PColorAdjustment = ^TColorAdjustment;
- tagCOLORADJUSTMENT = record
- caSize: WORD;
- caFlags: WORD;
- caIlluminantIndex: WORD;
- caRedGamma: WORD;
- caGreenGamma: WORD;
- caBlueGamma: WORD;
- caReferenceBlack: WORD;
- caReferenceWhite: WORD;
- caContrast: SHORT;
- caBrightness: SHORT;
- caColorfulness: SHORT;
- caRedGreenTint: SHORT;
- end;
- {$EXTERNALSYM tagCOLORADJUSTMENT}
- COLORADJUSTMENT = tagCOLORADJUSTMENT;
- {$EXTERNALSYM COLORADJUSTMENT}
- LPCOLORADJUSTMENT = ^COLORADJUSTMENT;
- {$EXTERNALSYM LPCOLORADJUSTMENT}
- TColorAdjustment = COLORADJUSTMENT;
-
-function SetColorAdjustment(hdc: HDC; lpca: LPCOLORADJUSTMENT): BOOL; stdcall;
-{$EXTERNALSYM SetColorAdjustment}
-function GetColorAdjustment(hdc: HDC; lpca: LPCOLORADJUSTMENT): BOOL; stdcall;
-{$EXTERNALSYM GetColorAdjustment}
-function CreateHalftonePalette(hdc: HDC): HPALETTE; stdcall;
-{$EXTERNALSYM CreateHalftonePalette}
-
-type
- ABORTPROC = function(hdc: HDC; iError: Integer): BOOL; stdcall;
- {$EXTERNALSYM ABORTPROC}
-
- PDocInfoA = ^TDocInfoA;
- _DOCINFOA = record
- cbSize: Integer;
- lpszDocName: LPCSTR;
- lpszOutput: LPCSTR;
- lpszDatatype: LPCSTR;
- fwType: DWORD;
- end;
- {$EXTERNALSYM _DOCINFOA}
- DOCINFOA = _DOCINFOA;
- {$EXTERNALSYM DOCINFOA}
- LPDOCINFOA = ^DOCINFOA;
- {$EXTERNALSYM LPDOCINFOA}
- TDocInfoA = _DOCINFOA;
-
- PDocInfoW = ^TDocInfoW;
- _DOCINFOW = record
- cbSize: Integer;
- lpszDocName: LPCWSTR;
- lpszOutput: LPCWSTR;
- lpszDatatype: LPCWSTR;
- fwType: DWORD;
- end;
- {$EXTERNALSYM _DOCINFOW}
- DOCINFOW = _DOCINFOW;
- {$EXTERNALSYM DOCINFOW}
- LPDOCINFOW = ^DOCINFOW;
- {$EXTERNALSYM LPDOCINFOW}
- TDocInfoW = _DOCINFOW;
-
- {$IFDEF UNICODE}
- DOCINFO = DOCINFOW;
- {$EXTERNALSYM DOCINFO}
- LPDOCINFO = LPDOCINFOW;
- {$EXTERNALSYM LPDOCINFO}
- TDocInfo = TDocInfoW;
- PDocInfo = PDocInfoW;
- {$ELSE}
- DOCINFO = DOCINFOA;
- {$EXTERNALSYM DOCINFO}
- LPDOCINFO = LPDOCINFOA;
- {$EXTERNALSYM LPDOCINFO}
- TDocInfo = TDocInfoA;
- PDocInfo = PDocInfoA;
- {$ENDIF UNICODE}
-
-const
- DI_APPBANDING = $00000001;
- {$EXTERNALSYM DI_APPBANDING}
- DI_ROPS_READ_DESTINATION = $00000002;
- {$EXTERNALSYM DI_ROPS_READ_DESTINATION}
-
-function StartDocA(hdc: HDC; const lpdi: DOCINFOA): Integer; stdcall;
-{$EXTERNALSYM StartDocA}
-function StartDocW(hdc: HDC; const lpdi: DOCINFOW): Integer; stdcall;
-{$EXTERNALSYM StartDocW}
-function StartDoc(hdc: HDC; const lpdi: DOCINFO): Integer; stdcall;
-{$EXTERNALSYM StartDoc}
-function EndDoc(dc: HDC): Integer; stdcall;
-{$EXTERNALSYM EndDoc}
-function StartPage(dc: HDC): Integer; stdcall;
-{$EXTERNALSYM StartPage}
-function EndPage(dc: HDC): Integer; stdcall;
-{$EXTERNALSYM EndPage}
-function AbortDoc(dc: HDC): Integer; stdcall;
-{$EXTERNALSYM AbortDoc}
-function SetAbortProc(dc: HDC; lpAbortProc: ABORTPROC): Integer; stdcall;
-{$EXTERNALSYM SetAbortProc}
-
-function AbortPath(hdc: HDC): BOOL; stdcall;
-{$EXTERNALSYM AbortPath}
-function ArcTo(hdc: HDC; nLeftRect, nTopRect, nRightRect, nBottomRect, nXRadial1, nYRadial1, nXRadial2, nYRadial2: Integer): BOOL; stdcall;
-{$EXTERNALSYM ArcTo}
-function BeginPath(hdc: HDC): BOOL; stdcall;
-{$EXTERNALSYM BeginPath}
-function CloseFigure(hdc: HDC): BOOL; stdcall;
-{$EXTERNALSYM CloseFigure}
-function EndPath(hdc: HDC): BOOL; stdcall;
-{$EXTERNALSYM EndPath}
-function FillPath(hdc: HDC): BOOL; stdcall;
-{$EXTERNALSYM FillPath}
-function FlattenPath(hdc: HDC): BOOL; stdcall;
-{$EXTERNALSYM FlattenPath}
-function GetPath(hdc: HDC; lpPoints: LPPOINT; lpTypes: LPBYTE; nSize: Integer): Integer; stdcall;
-{$EXTERNALSYM GetPath}
-function PathToRegion(hdc: HDC): HRGN; stdcall;
-{$EXTERNALSYM PathToRegion}
-function PolyDraw(hdc: HDC; lppt: LPPOINT; lpbTypes: LPBYTE; cCount: Integer): BOOL; stdcall;
-{$EXTERNALSYM PolyDraw}
-function SelectClipPath(hdc: HDC; iMode: Integer): BOOL; stdcall;
-{$EXTERNALSYM SelectClipPath}
-function SetArcDirection(hdc: HDC; ArcDirection: Integer): Integer; stdcall;
-{$EXTERNALSYM SetArcDirection}
-function SetMiterLimit(hdc: HDC; eNewLimit: FLOAT; peOldLimit: PFLOAT): BOOL; stdcall;
-{$EXTERNALSYM SetMiterLimit}
-function StrokeAndFillPath(hdc: HDC): BOOL; stdcall;
-{$EXTERNALSYM StrokeAndFillPath}
-function StrokePath(hdc: HDC): BOOL; stdcall;
-{$EXTERNALSYM StrokePath}
-function WidenPath(hdc: HDC): BOOL; stdcall;
-{$EXTERNALSYM WidenPath}
-function ExtCreatePen(dwPenStyle, dwWidth: DWORD; const lplb: LOGBRUSH; dwStyleCount: DWORD; lpStyle: DWORD): HPEN; stdcall;
-{$EXTERNALSYM ExtCreatePen}
-function GetMiterLimit(hdc: HDC; var peLimit: FLOAT): BOOL; stdcall;
-{$EXTERNALSYM GetMiterLimit}
-function GetArcDirection(hdc: HDC): Integer; stdcall;
-{$EXTERNALSYM GetArcDirection}
-
-function GetObjectA(hgdiobj: HGDIOBJ; cbBuffer: Integer; lpvObject: LPVOID): Integer; stdcall;
-{$EXTERNALSYM GetObjectA}
-function GetObjectW(hgdiobj: HGDIOBJ; cbBuffer: Integer; lpvObject: LPVOID): Integer; stdcall;
-{$EXTERNALSYM GetObjectW}
-function GetObject(hgdiobj: HGDIOBJ; cbBuffer: Integer; lpvObject: LPVOID): Integer; stdcall;
-{$EXTERNALSYM GetObject}
-function MoveToEx(hdc: HDC; X, Y: Integer; lpPoint: LPPOINT): BOOL; stdcall;
-{$EXTERNALSYM MoveToEx}
-function TextOutA(hdc: HDC; nXStart, nYStart: Integer; lpString: LPCSTR; cbString: Integer): BOOL; stdcall;
-{$EXTERNALSYM TextOutA}
-function TextOutW(hdc: HDC; nXStart, nYStart: Integer; lpString: LPCWSTR; cbString: Integer): BOOL; stdcall;
-{$EXTERNALSYM TextOutW}
-function TextOut(hdc: HDC; nXStart, nYStart: Integer; lpString: LPCTSTR; cbString: Integer): BOOL; stdcall;
-{$EXTERNALSYM TextOut}
-function ExtTextOutA(hdc: HDC; X, Y: Integer; fuOptions: UINT; lprc: LPRECT; lpString: LPCSTR; cbCount: UINT; lpDx: LPINT): BOOL; stdcall;
-{$EXTERNALSYM ExtTextOutA}
-function ExtTextOutW(hdc: HDC; X, Y: Integer; fuOptions: UINT; lprc: LPRECT; lpString: LPCWSTR; cbCount: UINT; lpDx: LPINT): BOOL; stdcall;
-{$EXTERNALSYM ExtTextOutW}
-function ExtTextOut(hdc: HDC; X, Y: Integer; fuOptions: UINT; lprc: LPRECT; lpString: LPCTSTR; cbCount: UINT; lpDx: LPINT): BOOL; stdcall;
-{$EXTERNALSYM ExtTextOut}
-function PolyTextOutA(hdc: HDC; pptxt: LPPOLYTEXTA; cStrings: Integer): BOOL; stdcall;
-{$EXTERNALSYM PolyTextOutA}
-function PolyTextOutW(hdc: HDC; pptxt: LPPOLYTEXTW; cStrings: Integer): BOOL; stdcall;
-{$EXTERNALSYM PolyTextOutW}
-function PolyTextOut(hdc: HDC; pptxt: LPPOLYTEXT; cStrings: Integer): BOOL; stdcall;
-{$EXTERNALSYM PolyTextOut}
-
-function CreatePolygonRgn(lppt: LPPOINT; cPoints, fnPolyFillMode: Integer): HRGN; stdcall;
-{$EXTERNALSYM CreatePolygonRgn}
-function DPtoLP(hdc: HDC; lpPoints: LPPOINT; nCount: Integer): BOOL; stdcall;
-{$EXTERNALSYM DPtoLP}
-function LPtoDP(hdc: HDC; lpPoints: LPPOINT; nCount: Integer): BOOL; stdcall;
-{$EXTERNALSYM LPtoDP}
-function Polygon(hdc: HDC; lpPoints: LPPOINT; nCount: Integer): BOOL; stdcall;
-{$EXTERNALSYM Polygon}
-function Polyline(hdc: HDC; lppt: LPPOINT; nCount: Integer): BOOL; stdcall;
-{$EXTERNALSYM Polyline}
-
-function PolyBezier(hdc: HDC; lppt: LPPOINT; cPoints: DWORD): BOOL; stdcall;
-{$EXTERNALSYM PolyBezier}
-function PolyBezierTo(hdc: HDC; lppt: LPPOINT; cCount: DWORD): BOOL; stdcall;
-{$EXTERNALSYM PolyBezierTo}
-function PolylineTo(hdc: HDC; lppt: LPPOINT; cCount: DWORD): BOOL; stdcall;
-{$EXTERNALSYM PolylineTo}
-
-function SetViewportExtEx(hdc: HDC; nXExtend, nYExtend: Integer; lpSize: LPSIZE): BOOL; stdcall;
-{$EXTERNALSYM SetViewportExtEx}
-function SetViewportOrgEx(hdc: HDC; X, Y: Integer; lpPoint: LPPOINT): BOOL; stdcall;
-{$EXTERNALSYM SetViewportOrgEx}
-function SetWindowExtEx(hdc: HDC; nXExtend, nYExtend: Integer; lpSize: LPSIZE): BOOL; stdcall;
-{$EXTERNALSYM SetWindowExtEx}
-function SetWindowOrgEx(hdc: HDC; X, Y: Integer; lpPoint: LPPOINT): BOOL; stdcall;
-{$EXTERNALSYM SetWindowOrgEx}
-
-function OffsetViewportOrgEx(hdc: HDC; nXOffset, nYOffset: Integer; lpPoint: LPPOINT): BOOL; stdcall;
-{$EXTERNALSYM OffsetViewportOrgEx}
-function OffsetWindowOrgEx(hdc: HDC; nXOffset, nYOffset: Integer; lpPoint: LPPOINT): BOOL; stdcall;
-{$EXTERNALSYM OffsetWindowOrgEx}
-function ScaleViewportExtEx(hdc: HDC; Xnum, Xdenom, Ynum, Ydenom: Integer; lpSize: LPSIZE): BOOL; stdcall;
-{$EXTERNALSYM ScaleViewportExtEx}
-function ScaleWindowExtEx(hdc: HDC; Xnum, Xdenom, Ynum, Ydenom: Integer; lpSize: LPSIZE): BOOL; stdcall;
-{$EXTERNALSYM ScaleWindowExtEx}
-function SetBitmapDimensionEx(hBitmap: HBITMAP; nWidth, nHeight: Integer; lpSize: LPSIZE): BOOL; stdcall;
-{$EXTERNALSYM SetBitmapDimensionEx}
-function SetBrushOrgEx(hdc: HDC; nXOrg, nYOrg: Integer; lppt: LPPOINT): BOOL; stdcall;
-{$EXTERNALSYM SetBrushOrgEx}
-
-function GetTextFaceA(hdc: HDC; nCount: Integer; lpFaceName: LPSTR): Integer; stdcall;
-{$EXTERNALSYM GetTextFaceA}
-function GetTextFaceW(hdc: HDC; nCount: Integer; lpFaceName: LPWSTR): Integer; stdcall;
-{$EXTERNALSYM GetTextFaceW}
-function GetTextFace(hdc: HDC; nCount: Integer; lpFaceName: LPTSTR): Integer; stdcall;
-{$EXTERNALSYM GetTextFace}
-
-const
- FONTMAPPER_MAX = 10;
- {$EXTERNALSYM FONTMAPPER_MAX}
-
-type
- PKerningPair = ^TKerningPair;
- tagKERNINGPAIR = record
- wFirst: WORD;
- wSecond: WORD;
- iKernAmount: Integer;
- end;
- {$EXTERNALSYM tagKERNINGPAIR}
- KERNINGPAIR = tagKERNINGPAIR;
- {$EXTERNALSYM KERNINGPAIR}
- LPKERNINGPAIR = ^KERNINGPAIR;
- {$EXTERNALSYM LPKERNINGPAIR}
- TKerningPair = KERNINGPAIR;
-
-function GetKerningPairsA(hDc: HDC; nNumPairs: DWORD; lpkrnpair: LPKERNINGPAIR): DWORD; stdcall;
-{$EXTERNALSYM GetKerningPairsA}
-function GetKerningPairsW(hDc: HDC; nNumPairs: DWORD; lpkrnpair: LPKERNINGPAIR): DWORD; stdcall;
-{$EXTERNALSYM GetKerningPairsW}
-function GetKerningPairs(hDc: HDC; nNumPairs: DWORD; lpkrnpair: LPKERNINGPAIR): DWORD; stdcall;
-{$EXTERNALSYM GetKerningPairs}
-
-function GetDCOrgEx(hdc: HDC; lpPoint: LPPOINT): BOOL; stdcall;
-{$EXTERNALSYM GetDCOrgEx}
-function FixBrushOrgEx(hDc: HDC; I1, I2: Integer; lpPoint: LPPOINT): BOOL; stdcall;
-{$EXTERNALSYM FixBrushOrgEx}
-function UnrealizeObject(hgdiobj: HGDIOBJ): BOOL; stdcall;
-{$EXTERNALSYM UnrealizeObject}
-
-function GdiFlush: BOOL; stdcall;
-{$EXTERNALSYM GdiFlush}
-function GdiSetBatchLimit(dwLimit: DWORD): DWORD; stdcall;
-{$EXTERNALSYM GdiSetBatchLimit}
-function GdiGetBatchLimit: DWORD; stdcall;
-{$EXTERNALSYM GdiGetBatchLimit}
-
-const
- ICM_OFF = 1;
- {$EXTERNALSYM ICM_OFF}
- ICM_ON = 2;
- {$EXTERNALSYM ICM_ON}
- ICM_QUERY = 3;
- {$EXTERNALSYM ICM_QUERY}
- ICM_DONE_OUTSIDEDC = 4;
- {$EXTERNALSYM ICM_DONE_OUTSIDEDC}
-
-type
- ICMENUMPROCA = function(lpszFileName: LPSTR; lParam: LPARAM): Integer; stdcall;
- {$EXTERNALSYM ICMENUMPROCA}
- ICMENUMPROCW = function(lpszFileName: LPWSTR; lParam: LPARAM): Integer; stdcall;
- {$EXTERNALSYM ICMENUMPROCW}
- ICMENUMPROC = function(lpszFileName: LPTSTR; lParam: LPARAM): Integer; stdcall;
- {$EXTERNALSYM ICMENUMPROC}
-
-function SetICMMode(hDc: HDC; iEnableICM: Integer): Integer; stdcall;
-{$EXTERNALSYM SetICMMode}
-function CheckColorsInGamut(hDc: HDC; lpRGBTriples, lpBuffer: LPVOID; nCount: DWORD): BOOL; stdcall;
-{$EXTERNALSYM CheckColorsInGamut}
-function GetColorSpace(hDc: HDC): HCOLORSPACE; stdcall;
-{$EXTERNALSYM GetColorSpace}
-
-function GetLogColorSpaceA(hColorSpace: HCOLORSPACE; lpBuffer: LPLOGCOLORSPACEA; nSize: DWORD): BOOL; stdcall;
-{$EXTERNALSYM GetLogColorSpaceA}
-function GetLogColorSpaceW(hColorSpace: HCOLORSPACE; lpBuffer: LPLOGCOLORSPACEW; nSize: DWORD): BOOL; stdcall;
-{$EXTERNALSYM GetLogColorSpaceW}
-function GetLogColorSpace(hColorSpace: HCOLORSPACE; lpBuffer: LPLOGCOLORSPACE; nSize: DWORD): BOOL; stdcall;
-{$EXTERNALSYM GetLogColorSpace}
-
-function CreateColorSpaceA(lpLogColorSpace: LPLOGCOLORSPACEA): HCOLORSPACE; stdcall;
-{$EXTERNALSYM CreateColorSpaceA}
-function CreateColorSpaceW(lpLogColorSpace: LPLOGCOLORSPACEW): HCOLORSPACE; stdcall;
-{$EXTERNALSYM CreateColorSpaceW}
-function CreateColorSpace(lpLogColorSpace: LPLOGCOLORSPACE): HCOLORSPACE; stdcall;
-{$EXTERNALSYM CreateColorSpace}
-
-function SetColorSpace(hDc: HDC; hColorSpace: HCOLORSPACE): HCOLORSPACE; stdcall;
-{$EXTERNALSYM SetColorSpace}
-function DeleteColorSpace(hColorSpace: HCOLORSPACE): BOOL; stdcall;
-{$EXTERNALSYM DeleteColorSpace}
-function GetICMProfileA(hDc: HDC; lpcbName: LPDWORD; lpszFilename: LPSTR): BOOL; stdcall;
-{$EXTERNALSYM GetICMProfileA}
-function GetICMProfileW(hDc: HDC; lpcbName: LPDWORD; lpszFilename: LPWSTR): BOOL; stdcall;
-{$EXTERNALSYM GetICMProfileW}
-function GetICMProfile(hDc: HDC; lpcbName: LPDWORD; lpszFilename: LPTSTR): BOOL; stdcall;
-{$EXTERNALSYM GetICMProfile}
-
-function SetICMProfileA(hDc: HDC; lpFileName: LPSTR): BOOL; stdcall;
-{$EXTERNALSYM SetICMProfileA}
-function SetICMProfileW(hDc: HDC; lpFileName: LPWSTR): BOOL; stdcall;
-{$EXTERNALSYM SetICMProfileW}
-function SetICMProfile(hDc: HDC; lpFileName: LPTSTR): BOOL; stdcall;
-{$EXTERNALSYM SetICMProfile}
-
-function GetDeviceGammaRamp(hDc: HDC; lpRamp: LPVOID): BOOL; stdcall;
-{$EXTERNALSYM GetDeviceGammaRamp}
-function SetDeviceGammaRamp(hDc: HDC; lpRamp: LPVOID): BOOL; stdcall;
-{$EXTERNALSYM SetDeviceGammaRamp}
-function ColorMatchToTarget(hDc, hdcTarget: HDC; uiAction: DWORD): BOOL; stdcall;
-{$EXTERNALSYM ColorMatchToTarget}
-
-function EnumICMProfilesA(hDc: HDC; lpEnumProc: ICMENUMPROCA; lParam: LPARAM): Integer; stdcall;
-{$EXTERNALSYM EnumICMProfilesA}
-function EnumICMProfilesW(hDc: HDC; lpEnumProc: ICMENUMPROCW; lParam: LPARAM): Integer; stdcall;
-{$EXTERNALSYM EnumICMProfilesW}
-function EnumICMProfiles(hDc: HDC; lpEnumProc: ICMENUMPROC; lParam: LPARAM): Integer; stdcall;
-{$EXTERNALSYM EnumICMProfiles}
-
-function UpdateICMRegKeyA(dwReserved: DWORD; lpszCMID, lpszFileName: LPSTR; nCommand: UINT): BOOL; stdcall;
-{$EXTERNALSYM UpdateICMRegKeyA}
-function UpdateICMRegKeyW(dwReserved: DWORD; lpszCMID, lpszFileName: LPWSTR; nCommand: UINT): BOOL; stdcall;
-{$EXTERNALSYM UpdateICMRegKeyW}
-function UpdateICMRegKey(dwReserved: DWORD; lpszCMID, lpszFileName: LPTSTR; nCommand: UINT): BOOL; stdcall;
-{$EXTERNALSYM UpdateICMRegKey}
-
-function ColorCorrectPalette(hDc: HDC; hColorPalette: HPALETTE; dwFirstEntry, dwNumOfEntries: DWORD): BOOL; stdcall;
-{$EXTERNALSYM ColorCorrectPalette}
-
-// Enhanced metafile constants.
-
-const
- ENHMETA_SIGNATURE = $464D4520;
- {$EXTERNALSYM ENHMETA_SIGNATURE}
-
-// Stock object flag used in the object handle index in the enhanced
-// metafile records.
-// E.g. The object handle index (META_STOCK_OBJECT | BLACK_BRUSH)
-// represents the stock object BLACK_BRUSH.
-
- ENHMETA_STOCK_OBJECT = DWORD($80000000);
- {$EXTERNALSYM ENHMETA_STOCK_OBJECT}
-
-// Enhanced metafile record types.
-
- EMR_HEADER = 1;
- {$EXTERNALSYM EMR_HEADER}
- EMR_POLYBEZIER = 2;
- {$EXTERNALSYM EMR_POLYBEZIER}
- EMR_POLYGON = 3;
- {$EXTERNALSYM EMR_POLYGON}
- EMR_POLYLINE = 4;
- {$EXTERNALSYM EMR_POLYLINE}
- EMR_POLYBEZIERTO = 5;
- {$EXTERNALSYM EMR_POLYBEZIERTO}
- EMR_POLYLINETO = 6;
- {$EXTERNALSYM EMR_POLYLINETO}
- EMR_POLYPOLYLINE = 7;
- {$EXTERNALSYM EMR_POLYPOLYLINE}
- EMR_POLYPOLYGON = 8;
- {$EXTERNALSYM EMR_POLYPOLYGON}
- EMR_SETWINDOWEXTEX = 9;
- {$EXTERNALSYM EMR_SETWINDOWEXTEX}
- EMR_SETWINDOWORGEX = 10;
- {$EXTERNALSYM EMR_SETWINDOWORGEX}
- EMR_SETVIEWPORTEXTEX = 11;
- {$EXTERNALSYM EMR_SETVIEWPORTEXTEX}
- EMR_SETVIEWPORTORGEX = 12;
- {$EXTERNALSYM EMR_SETVIEWPORTORGEX}
- EMR_SETBRUSHORGEX = 13;
- {$EXTERNALSYM EMR_SETBRUSHORGEX}
- EMR_EOF = 14;
- {$EXTERNALSYM EMR_EOF}
- EMR_SETPIXELV = 15;
- {$EXTERNALSYM EMR_SETPIXELV}
- EMR_SETMAPPERFLAGS = 16;
- {$EXTERNALSYM EMR_SETMAPPERFLAGS}
- EMR_SETMAPMODE = 17;
- {$EXTERNALSYM EMR_SETMAPMODE}
- EMR_SETBKMODE = 18;
- {$EXTERNALSYM EMR_SETBKMODE}
- EMR_SETPOLYFILLMODE = 19;
- {$EXTERNALSYM EMR_SETPOLYFILLMODE}
- EMR_SETROP2 = 20;
- {$EXTERNALSYM EMR_SETROP2}
- EMR_SETSTRETCHBLTMODE = 21;
- {$EXTERNALSYM EMR_SETSTRETCHBLTMODE}
- EMR_SETTEXTALIGN = 22;
- {$EXTERNALSYM EMR_SETTEXTALIGN}
- EMR_SETCOLORADJUSTMENT = 23;
- {$EXTERNALSYM EMR_SETCOLORADJUSTMENT}
- EMR_SETTEXTCOLOR = 24;
- {$EXTERNALSYM EMR_SETTEXTCOLOR}
- EMR_SETBKCOLOR = 25;
- {$EXTERNALSYM EMR_SETBKCOLOR}
- EMR_OFFSETCLIPRGN = 26;
- {$EXTERNALSYM EMR_OFFSETCLIPRGN}
- EMR_MOVETOEX = 27;
- {$EXTERNALSYM EMR_MOVETOEX}
- EMR_SETMETARGN = 28;
- {$EXTERNALSYM EMR_SETMETARGN}
- EMR_EXCLUDECLIPRECT = 29;
- {$EXTERNALSYM EMR_EXCLUDECLIPRECT}
- EMR_INTERSECTCLIPRECT = 30;
- {$EXTERNALSYM EMR_INTERSECTCLIPRECT}
- EMR_SCALEVIEWPORTEXTEX = 31;
- {$EXTERNALSYM EMR_SCALEVIEWPORTEXTEX}
- EMR_SCALEWINDOWEXTEX = 32;
- {$EXTERNALSYM EMR_SCALEWINDOWEXTEX}
- EMR_SAVEDC = 33;
- {$EXTERNALSYM EMR_SAVEDC}
- EMR_RESTOREDC = 34;
- {$EXTERNALSYM EMR_RESTOREDC}
- EMR_SETWORLDTRANSFORM = 35;
- {$EXTERNALSYM EMR_SETWORLDTRANSFORM}
- EMR_MODIFYWORLDTRANSFORM = 36;
- {$EXTERNALSYM EMR_MODIFYWORLDTRANSFORM}
- EMR_SELECTOBJECT = 37;
- {$EXTERNALSYM EMR_SELECTOBJECT}
- EMR_CREATEPEN = 38;
- {$EXTERNALSYM EMR_CREATEPEN}
- EMR_CREATEBRUSHINDIRECT = 39;
- {$EXTERNALSYM EMR_CREATEBRUSHINDIRECT}
- EMR_DELETEOBJECT = 40;
- {$EXTERNALSYM EMR_DELETEOBJECT}
- EMR_ANGLEARC = 41;
- {$EXTERNALSYM EMR_ANGLEARC}
- EMR_ELLIPSE = 42;
- {$EXTERNALSYM EMR_ELLIPSE}
- EMR_RECTANGLE = 43;
- {$EXTERNALSYM EMR_RECTANGLE}
- EMR_ROUNDRECT = 44;
- {$EXTERNALSYM EMR_ROUNDRECT}
- EMR_ARC = 45;
- {$EXTERNALSYM EMR_ARC}
- EMR_CHORD = 46;
- {$EXTERNALSYM EMR_CHORD}
- EMR_PIE = 47;
- {$EXTERNALSYM EMR_PIE}
- EMR_SELECTPALETTE = 48;
- {$EXTERNALSYM EMR_SELECTPALETTE}
- EMR_CREATEPALETTE = 49;
- {$EXTERNALSYM EMR_CREATEPALETTE}
- EMR_SETPALETTEENTRIES = 50;
- {$EXTERNALSYM EMR_SETPALETTEENTRIES}
- EMR_RESIZEPALETTE = 51;
- {$EXTERNALSYM EMR_RESIZEPALETTE}
- EMR_REALIZEPALETTE = 52;
- {$EXTERNALSYM EMR_REALIZEPALETTE}
- EMR_EXTFLOODFILL = 53;
- {$EXTERNALSYM EMR_EXTFLOODFILL}
- EMR_LINETO = 54;
- {$EXTERNALSYM EMR_LINETO}
- EMR_ARCTO = 55;
- {$EXTERNALSYM EMR_ARCTO}
- EMR_POLYDRAW = 56;
- {$EXTERNALSYM EMR_POLYDRAW}
- EMR_SETARCDIRECTION = 57;
- {$EXTERNALSYM EMR_SETARCDIRECTION}
- EMR_SETMITERLIMIT = 58;
- {$EXTERNALSYM EMR_SETMITERLIMIT}
- EMR_BEGINPATH = 59;
- {$EXTERNALSYM EMR_BEGINPATH}
- EMR_ENDPATH = 60;
- {$EXTERNALSYM EMR_ENDPATH}
- EMR_CLOSEFIGURE = 61;
- {$EXTERNALSYM EMR_CLOSEFIGURE}
- EMR_FILLPATH = 62;
- {$EXTERNALSYM EMR_FILLPATH}
- EMR_STROKEANDFILLPATH = 63;
- {$EXTERNALSYM EMR_STROKEANDFILLPATH}
- EMR_STROKEPATH = 64;
- {$EXTERNALSYM EMR_STROKEPATH}
- EMR_FLATTENPATH = 65;
- {$EXTERNALSYM EMR_FLATTENPATH}
- EMR_WIDENPATH = 66;
- {$EXTERNALSYM EMR_WIDENPATH}
- EMR_SELECTCLIPPATH = 67;
- {$EXTERNALSYM EMR_SELECTCLIPPATH}
- EMR_ABORTPATH = 68;
- {$EXTERNALSYM EMR_ABORTPATH}
-
- EMR_GDICOMMENT = 70;
- {$EXTERNALSYM EMR_GDICOMMENT}
- EMR_FILLRGN = 71;
- {$EXTERNALSYM EMR_FILLRGN}
- EMR_FRAMERGN = 72;
- {$EXTERNALSYM EMR_FRAMERGN}
- EMR_INVERTRGN = 73;
- {$EXTERNALSYM EMR_INVERTRGN}
- EMR_PAINTRGN = 74;
- {$EXTERNALSYM EMR_PAINTRGN}
- EMR_EXTSELECTCLIPRGN = 75;
- {$EXTERNALSYM EMR_EXTSELECTCLIPRGN}
- EMR_BITBLT = 76;
- {$EXTERNALSYM EMR_BITBLT}
- EMR_STRETCHBLT = 77;
- {$EXTERNALSYM EMR_STRETCHBLT}
- EMR_MASKBLT = 78;
- {$EXTERNALSYM EMR_MASKBLT}
- EMR_PLGBLT = 79;
- {$EXTERNALSYM EMR_PLGBLT}
- EMR_SETDIBITSTODEVICE = 80;
- {$EXTERNALSYM EMR_SETDIBITSTODEVICE}
- EMR_STRETCHDIBITS = 81;
- {$EXTERNALSYM EMR_STRETCHDIBITS}
- EMR_EXTCREATEFONTINDIRECTW = 82;
- {$EXTERNALSYM EMR_EXTCREATEFONTINDIRECTW}
- EMR_EXTTEXTOUTA = 83;
- {$EXTERNALSYM EMR_EXTTEXTOUTA}
- EMR_EXTTEXTOUTW = 84;
- {$EXTERNALSYM EMR_EXTTEXTOUTW}
- EMR_POLYBEZIER16 = 85;
- {$EXTERNALSYM EMR_POLYBEZIER16}
- EMR_POLYGON16 = 86;
- {$EXTERNALSYM EMR_POLYGON16}
- EMR_POLYLINE16 = 87;
- {$EXTERNALSYM EMR_POLYLINE16}
- EMR_POLYBEZIERTO16 = 88;
- {$EXTERNALSYM EMR_POLYBEZIERTO16}
- EMR_POLYLINETO16 = 89;
- {$EXTERNALSYM EMR_POLYLINETO16}
- EMR_POLYPOLYLINE16 = 90;
- {$EXTERNALSYM EMR_POLYPOLYLINE16}
- EMR_POLYPOLYGON16 = 91;
- {$EXTERNALSYM EMR_POLYPOLYGON16}
- EMR_POLYDRAW16 = 92;
- {$EXTERNALSYM EMR_POLYDRAW16}
- EMR_CREATEMONOBRUSH = 93;
- {$EXTERNALSYM EMR_CREATEMONOBRUSH}
- EMR_CREATEDIBPATTERNBRUSHPT = 94;
- {$EXTERNALSYM EMR_CREATEDIBPATTERNBRUSHPT}
- EMR_EXTCREATEPEN = 95;
- {$EXTERNALSYM EMR_EXTCREATEPEN}
- EMR_POLYTEXTOUTA = 96;
- {$EXTERNALSYM EMR_POLYTEXTOUTA}
- EMR_POLYTEXTOUTW = 97;
- {$EXTERNALSYM EMR_POLYTEXTOUTW}
-
- EMR_SETICMMODE = 98;
- {$EXTERNALSYM EMR_SETICMMODE}
- EMR_CREATECOLORSPACE = 99;
- {$EXTERNALSYM EMR_CREATECOLORSPACE}
- EMR_SETCOLORSPACE = 100;
- {$EXTERNALSYM EMR_SETCOLORSPACE}
- EMR_DELETECOLORSPACE = 101;
- {$EXTERNALSYM EMR_DELETECOLORSPACE}
- EMR_GLSRECORD = 102;
- {$EXTERNALSYM EMR_GLSRECORD}
- EMR_GLSBOUNDEDRECORD = 103;
- {$EXTERNALSYM EMR_GLSBOUNDEDRECORD}
- EMR_PIXELFORMAT = 104;
- {$EXTERNALSYM EMR_PIXELFORMAT}
-
- EMR_RESERVED_105 = 105;
- {$EXTERNALSYM EMR_RESERVED_105}
- EMR_RESERVED_106 = 106;
- {$EXTERNALSYM EMR_RESERVED_106}
- EMR_RESERVED_107 = 107;
- {$EXTERNALSYM EMR_RESERVED_107}
- EMR_RESERVED_108 = 108;
- {$EXTERNALSYM EMR_RESERVED_108}
- EMR_RESERVED_109 = 109;
- {$EXTERNALSYM EMR_RESERVED_109}
- EMR_RESERVED_110 = 110;
- {$EXTERNALSYM EMR_RESERVED_110}
- EMR_COLORCORRECTPALETTE = 111;
- {$EXTERNALSYM EMR_COLORCORRECTPALETTE}
- EMR_SETICMPROFILEA = 112;
- {$EXTERNALSYM EMR_SETICMPROFILEA}
- EMR_SETICMPROFILEW = 113;
- {$EXTERNALSYM EMR_SETICMPROFILEW}
- EMR_ALPHABLEND = 114;
- {$EXTERNALSYM EMR_ALPHABLEND}
- EMR_SETLAYOUT = 115;
- {$EXTERNALSYM EMR_SETLAYOUT}
- EMR_TRANSPARENTBLT = 116;
- {$EXTERNALSYM EMR_TRANSPARENTBLT}
- EMR_RESERVED_117 = 117;
- {$EXTERNALSYM EMR_RESERVED_117}
- EMR_GRADIENTFILL = 118;
- {$EXTERNALSYM EMR_GRADIENTFILL}
- EMR_RESERVED_119 = 119;
- {$EXTERNALSYM EMR_RESERVED_119}
- EMR_RESERVED_120 = 120;
- {$EXTERNALSYM EMR_RESERVED_120}
- EMR_COLORMATCHTOTARGETW = 121;
- {$EXTERNALSYM EMR_COLORMATCHTOTARGETW}
- EMR_CREATECOLORSPACEW = 122;
- {$EXTERNALSYM EMR_CREATECOLORSPACEW}
-
- EMR_MIN = 1;
- {$EXTERNALSYM EMR_MIN}
-
- {$IFDEF WIN98ME_UP}
- EMR_MAX = 122;
- {$EXTERNALSYM EMR_MAX}
- {$ELSE}
- EMR_MAX = 104;
- {$EXTERNALSYM EMR_MAX}
- {$ENDIF WIN98ME_UP}
-
-// Base record type for the enhanced metafile.
-
-type
- PEmr = ^TEmr;
- tagEMR = record
- iType: DWORD; // Enhanced metafile record type
- nSize: DWORD; // Length of the record in bytes.
- // This must be a multiple of 4.
- end;
- {$EXTERNALSYM tagEMR}
- EMR = tagEMR;
- {$EXTERNALSYM EMR}
- TEmr = EMR;
-
-// Base text record type for the enhanced metafile.
-
- PEmrText = ^TEmrText;
- tagEMRTEXT = record
- ptlReference: POINTL;
- nChars: DWORD;
- offString: DWORD; // Offset to the string
- fOptions: DWORD;
- rcl: RECTL;
- offDx: DWORD; // Offset to the inter-character spacing array.
- // This is always given.
- end;
- {$EXTERNALSYM tagEMRTEXT}
- EMRTEXT = tagEMRTEXT;
- {$EXTERNALSYM EMRTEXT}
- TEmrText = EMRTEXT;
-
-// Record structures for the enhanced metafile.
-
- PAbortPath = ^TAbortPath;
- tagABORTPATH = record
- emr: EMR;
- end;
- {$EXTERNALSYM tagABORTPATH}
- TAbortPath = tagABORTPATH;
- EMRABORTPATH = tagABORTPATH;
- {$EXTERNALSYM EMRABORTPATH}
- PEMRABORTPATH = ^EMRABORTPATH;
- {$EXTERNALSYM PEMRABORTPATH}
- EMRBEGINPATH = tagABORTPATH;
- {$EXTERNALSYM EMRBEGINPATH}
- PEMRBEGINPATH = ^EMRBEGINPATH;
- {$EXTERNALSYM PEMRBEGINPATH}
- EMRENDPATH = tagABORTPATH;
- {$EXTERNALSYM EMRENDPATH}
- PEMRENDPATH = ^EMRENDPATH;
- {$EXTERNALSYM PEMRENDPATH}
- EMRCLOSEFIGURE = tagABORTPATH;
- {$EXTERNALSYM EMRCLOSEFIGURE}
- PEMRCLOSEFIGURE = ^EMRCLOSEFIGURE;
- {$EXTERNALSYM PEMRCLOSEFIGURE}
- EMRFLATTENPATH = tagABORTPATH;
- {$EXTERNALSYM EMRFLATTENPATH}
- PEMRFLATTENPATH = ^EMRFLATTENPATH;
- {$EXTERNALSYM PEMRFLATTENPATH}
- EMRWIDENPATH = tagABORTPATH;
- {$EXTERNALSYM EMRWIDENPATH}
- PEMRWIDENPATH = ^EMRWIDENPATH;
- {$EXTERNALSYM PEMRWIDENPATH}
- EMRSETMETARGN = tagABORTPATH;
- {$EXTERNALSYM EMRSETMETARGN}
- PEMRSETMETARGN = ^EMRSETMETARGN;
- {$EXTERNALSYM PEMRSETMETARGN}
- EMRSAVEDC = tagABORTPATH;
- {$EXTERNALSYM EMRSAVEDC}
- PEMRSAVEDC = ^EMRSAVEDC;
- {$EXTERNALSYM PEMRSAVEDC}
- EMRREALIZEPALETTE = tagABORTPATH;
- {$EXTERNALSYM EMRREALIZEPALETTE}
- PEMRREALIZEPALETTE = ^EMRREALIZEPALETTE;
- {$EXTERNALSYM PEMRREALIZEPALETTE}
-
- PEmrSelectClipPath = ^TEmrSelectClipPath;
- tagEMRSELECTCLIPPATH = record
- emr: EMR;
- iMode: DWORD;
- end;
- {$EXTERNALSYM tagEMRSELECTCLIPPATH}
- EMRSELECTCLIPPATH = tagEMRSELECTCLIPPATH;
- {$EXTERNALSYM EMRSELECTCLIPPATH}
- LPEMRSELECTCLIPPATH = ^EMRSELECTCLIPPATH;
- {$EXTERNALSYM LPEMRSELECTCLIPPATH}
- TEmrSelectClipPath = EMRSELECTCLIPPATH;
-
- EMRSETBKMODE = tagEMRSELECTCLIPPATH;
- {$EXTERNALSYM EMRSETBKMODE}
- PEMRSETBKMODE = ^EMRSETBKMODE;
- {$EXTERNALSYM PEMRSETBKMODE}
- EMRSETMAPMODE = tagEMRSELECTCLIPPATH;
- {$EXTERNALSYM EMRSETMAPMODE}
- PEMRSETMAPMODE = ^EMRSETMAPMODE;
- {$EXTERNALSYM PEMRSETMAPMODE}
- EMRSETLAYOUT = tagEMRSELECTCLIPPATH;
- {$EXTERNALSYM EMRSETLAYOUT}
- PEMRSETLAYOUT = ^EMRSETLAYOUT;
- {$EXTERNALSYM PEMRSETLAYOUT}
- EMRSETPOLYFILLMODE = tagEMRSELECTCLIPPATH;
- {$EXTERNALSYM EMRSETPOLYFILLMODE}
- PEMRSETPOLYFILLMODE = EMRSETPOLYFILLMODE;
- {$EXTERNALSYM PEMRSETPOLYFILLMODE}
- EMRSETROP2 = tagEMRSELECTCLIPPATH;
- {$EXTERNALSYM EMRSETROP2}
- PEMRSETROP2 = ^EMRSETROP2;
- {$EXTERNALSYM PEMRSETROP2}
- EMRSETSTRETCHBLTMODE = tagEMRSELECTCLIPPATH;
- {$EXTERNALSYM EMRSETSTRETCHBLTMODE}
- PEMRSETSTRETCHBLTMODE = ^EMRSETSTRETCHBLTMODE;
- {$EXTERNALSYM PEMRSETSTRETCHBLTMODE}
- EMRSETICMMODE = tagEMRSELECTCLIPPATH;
- {$EXTERNALSYM EMRSETICMMODE}
- PEMRSETICMMODE = ^EMRSETICMMODE;
- {$EXTERNALSYM PEMRSETICMMODE}
- EMRSETTEXTALIGN = tagEMRSELECTCLIPPATH;
- {$EXTERNALSYM EMRSETTEXTALIGN}
- PEMRSETTEXTALIGN = ^EMRSETTEXTALIGN;
- {$EXTERNALSYM PEMRSETTEXTALIGN}
-
- PEmrSetMiterLimit = ^TEmrSetMiterLimit;
- tagEMRSETMITERLIMIT = record
- emr: EMR;
- eMiterLimit: FLOAT;
- end;
- {$EXTERNALSYM tagEMRSETMITERLIMIT}
- EMRSETMITERLIMIT = tagEMRSETMITERLIMIT;
- {$EXTERNALSYM EMRSETMITERLIMIT}
- TEmrSetMiterLimit = EMRSETMITERLIMIT;
-
- PEmrRestoreDc = ^TEmrRestoreDc;
- tagEMRRESTOREDC = record
- emr: EMR;
- iRelative: LONG; // Specifies a relative instance
- end;
- {$EXTERNALSYM tagEMRRESTOREDC}
- EMRRESTOREDC = tagEMRRESTOREDC;
- {$EXTERNALSYM EMRRESTOREDC}
- TEmrRestoreDc = EMRRESTOREDC;
-
- PEmrSetArcDirection = ^TEmrSetArcDirection;
- tagEMRSETARCDIRECTION = record
- emr: EMR;
- iArcDirection: DWORD; // Specifies the arc direction in the
- // advanced graphics mode.
- end;
- {$EXTERNALSYM tagEMRSETARCDIRECTION}
- EMRSETARCDIRECTION = tagEMRSETARCDIRECTION;
- {$EXTERNALSYM EMRSETARCDIRECTION}
- TEmrSetArcDirection = EMRSETARCDIRECTION;
-
- PEmrSetMapperFlags = ^TEmrSetMapperFlags;
- tagEMRSETMAPPERFLAGS = record
- emr: EMR;
- dwFlags: DWORD;
- end;
- {$EXTERNALSYM tagEMRSETMAPPERFLAGS}
- EMRSETMAPPERFLAGS = tagEMRSETMAPPERFLAGS;
- {$EXTERNALSYM EMRSETMAPPERFLAGS}
- TEmrSetMapperFlags = EMRSETMAPPERFLAGS;
-
- PEmrSetTextColor = ^TEmrSetTextColor;
- tagEMRSETTEXTCOLOR = record
- emr: EMR;
- crColor: COLORREF;
- end;
- {$EXTERNALSYM tagEMRSETTEXTCOLOR}
- EMRSETTEXTCOLOR = tagEMRSETTEXTCOLOR;
- {$EXTERNALSYM EMRSETTEXTCOLOR}
- EMRSETBKCOLOR = tagEMRSETTEXTCOLOR;
- {$EXTERNALSYM EMRSETBKCOLOR}
- PEMRSETBKCOLOR = ^EMRSETTEXTCOLOR;
- {$EXTERNALSYM PEMRSETBKCOLOR}
- TEmrSetTextColor = EMRSETTEXTCOLOR;
-
- PEmrSelectObject = ^TEmrSelectObject;
- tagEMRSELECTOBJECT = record
- emr: EMR;
- ihObject: DWORD; // Object handle index
- end;
- {$EXTERNALSYM tagEMRSELECTOBJECT}
- EMRSELECTOBJECT = tagEMRSELECTOBJECT;
- {$EXTERNALSYM EMRSELECTOBJECT}
- EMRDELETEOBJECT = tagEMRSELECTOBJECT;
- {$EXTERNALSYM EMRDELETEOBJECT}
- PEMRDELETEOBJECT = ^EMRDELETEOBJECT;
- {$EXTERNALSYM PEMRDELETEOBJECT}
- TEmrSelectObject = EMRSELECTOBJECT;
-
- PEmrSelectPalette = ^TEmrSelectPalette;
- tagEMRSELECTPALETTE = record
- emr: EMR;
- ihPal: DWORD; // Palette handle index, background mode only
- end;
- {$EXTERNALSYM tagEMRSELECTPALETTE}
- EMRSELECTPALETTE = tagEMRSELECTPALETTE;
- {$EXTERNALSYM EMRSELECTPALETTE}
- TEmrSelectPalette = EMRSELECTPALETTE;
-
- PEmrResizePalette = ^TEmrResizePalette;
- tagEMRRESIZEPALETTE = record
- emr: EMR;
- ihPal: DWORD; // Palette handle index
- cEntries: DWORD;
- end;
- {$EXTERNALSYM tagEMRRESIZEPALETTE}
- EMRRESIZEPALETTE = tagEMRRESIZEPALETTE;
- {$EXTERNALSYM EMRRESIZEPALETTE}
- TEmrResizePalette = EMRRESIZEPALETTE;
-
- PEmrSetPaletteEntries = ^TEmrSetPaletteEntries;
- tagEMRSETPALETTEENTRIES = record
- emr: EMR;
- ihPal: DWORD; // Palette handle index
- iStart: DWORD;
- cEntries: DWORD;
- aPalEntries: array [0..0] of PALETTEENTRY; // The peFlags fields do not contain any flags
- end;
- {$EXTERNALSYM tagEMRSETPALETTEENTRIES}
- EMRSETPALETTEENTRIES = tagEMRSETPALETTEENTRIES;
- {$EXTERNALSYM EMRSETPALETTEENTRIES}
- TEmrSetPaletteEntries = EMRSETPALETTEENTRIES;
-
- PEmrSetColorAdjustment = ^TEmrSetColorAdjustment;
- tagEMRSETCOLORADJUSTMENT = record
- emr: EMR;
- ColorAdjustment: COLORADJUSTMENT;
- end;
- {$EXTERNALSYM tagEMRSETCOLORADJUSTMENT}
- EMRSETCOLORADJUSTMENT = tagEMRSETCOLORADJUSTMENT;
- {$EXTERNALSYM EMRSETCOLORADJUSTMENT}
- TEmrSetColorAdjustment = EMRSETCOLORADJUSTMENT;
-
- PEmrGdiComment = ^TEmrGdiComment;
- tagEMRGDICOMMENT = record
- emr: EMR;
- cbData: DWORD; // Size of data in bytes
- Data: array [0..0] of BYTE;
- end;
- {$EXTERNALSYM tagEMRGDICOMMENT}
- EMRGDICOMMENT = tagEMRGDICOMMENT;
- {$EXTERNALSYM EMRGDICOMMENT}
- TEmrGdiComment = EMRGDICOMMENT;
-
- PEmrEof = ^TEmrEof;
- tagEMREOF = record
- emr: EMR;
- nPalEntries: DWORD; // Number of palette entries
- offPalEntries: DWORD; // Offset to the palette entries
- nSizeLast: DWORD; // Same as nSize and must be the last DWORD
- // of the record. The palette entries,
- // if exist, precede this field.
- end;
- {$EXTERNALSYM tagEMREOF}
- EMREOF = tagEMREOF;
- {$EXTERNALSYM EMREOF}
- TEmrEof = EMREOF;
-
- PEmrLineTo = ^TEmrLineTo;
- tagEMRLINETO = record
- emr: EMR;
- ptl: POINTL;
- end;
- {$EXTERNALSYM tagEMRLINETO}
- EMRLINETO = tagEMRLINETO;
- {$EXTERNALSYM EMRLINETO}
- EMRMOVETOEX = tagEMRLINETO;
- {$EXTERNALSYM EMRMOVETOEX}
- PEMRMOVETOEX = ^EMRMOVETOEX;
- {$EXTERNALSYM PEMRMOVETOEX}
- TEmrLineTo = EMRLINETO;
-
- PEmrOffsetClipRgn = ^TEmrOffsetClipRgn;
- tagEMROFFSETCLIPRGN = record
- emr: EMR;
- ptlOffset: POINTL;
- end;
- {$EXTERNALSYM tagEMROFFSETCLIPRGN}
- EMROFFSETCLIPRGN = tagEMROFFSETCLIPRGN;
- {$EXTERNALSYM EMROFFSETCLIPRGN}
- TEmrOffsetClipRgn = EMROFFSETCLIPRGN;
-
- PEmrFillPath = ^TEmrFillPath;
- tagEMRFILLPATH = record
- emr: EMR;
- rclBounds: RECTL; // Inclusive-inclusive bounds in device units
- end;
- {$EXTERNALSYM tagEMRFILLPATH}
- EMRFILLPATH = tagEMRFILLPATH;
- {$EXTERNALSYM EMRFILLPATH}
- EMRSTROKEANDFILLPATH = tagEMRFILLPATH;
- {$EXTERNALSYM EMRSTROKEANDFILLPATH}
- PEMRSTROKEANDFILLPATH = ^EMRSTROKEANDFILLPATH;
- {$EXTERNALSYM PEMRSTROKEANDFILLPATH}
- EMRSTROKEPATH = tagEMRFILLPATH;
- {$EXTERNALSYM EMRSTROKEPATH}
- PEMRSTROKEPATH = ^EMRSTROKEPATH;
- {$EXTERNALSYM PEMRSTROKEPATH}
- TEmrFillPath = EMRFILLPATH;
-
- PEmrExcludeClipRect = ^TEmrExcludeClipRect;
- tagEMREXCLUDECLIPRECT = record
- emr: EMR;
- rclClip: RECTL;
- end;
- {$EXTERNALSYM tagEMREXCLUDECLIPRECT}
- EMREXCLUDECLIPRECT = tagEMREXCLUDECLIPRECT;
- {$EXTERNALSYM EMREXCLUDECLIPRECT}
- EMRINTERSECTCLIPRECT = tagEMREXCLUDECLIPRECT;
- {$EXTERNALSYM EMRINTERSECTCLIPRECT}
- PEMRINTERSECTCLIPRECT = ^EMRINTERSECTCLIPRECT;
- {$EXTERNALSYM PEMRINTERSECTCLIPRECT}
- TEmrExcludeClipRect = EMREXCLUDECLIPRECT;
-
- PEmrSetViewPortOrgEx = ^TEmrSetViewPortOrgEx;
- tagEMRSETVIEWPORTORGEX = record
- emr: EMR;
- ptlOrigin: POINTL;
- end;
- {$EXTERNALSYM tagEMRSETVIEWPORTORGEX}
- EMRSETVIEWPORTORGEX = tagEMRSETVIEWPORTORGEX;
- {$EXTERNALSYM EMRSETVIEWPORTORGEX}
- EMRSETWINDOWORGEX = tagEMRSETVIEWPORTORGEX;
- {$EXTERNALSYM EMRSETWINDOWORGEX}
- PEMRSETWINDOWORGEX = ^EMRSETWINDOWORGEX;
- {$EXTERNALSYM PEMRSETWINDOWORGEX}
- EMRSETBRUSHORGEX = tagEMRSETVIEWPORTORGEX;
- {$EXTERNALSYM EMRSETBRUSHORGEX}
- PEMRSETBRUSHORGEX = ^EMRSETBRUSHORGEX;
- {$EXTERNALSYM PEMRSETBRUSHORGEX}
- TEmrSetViewPortOrgEx = EMRSETVIEWPORTORGEX;
-
- PEmrSetViewPortExtEx = ^TEmrSetViewPortExtEx;
- tagEMRSETVIEWPORTEXTEX = record
- emr: EMR;
- szlExtent: SIZEL;
- end;
- {$EXTERNALSYM tagEMRSETVIEWPORTEXTEX}
- EMRSETVIEWPORTEXTEX = tagEMRSETVIEWPORTEXTEX;
- {$EXTERNALSYM EMRSETVIEWPORTEXTEX}
- EMRSETWINDOWEXTEX = tagEMRSETVIEWPORTEXTEX;
- {$EXTERNALSYM EMRSETWINDOWEXTEX}
- TEmrSetViewPortExtEx = EMRSETVIEWPORTEXTEX;
-
- PEmrScaleViewPortExtEx = ^TEmrScaleViewPortExtEx;
- tagEMRSCALEVIEWPORTEXTEX = record
- emr: EMR;
- xNum: LONG;
- xDenom: LONG;
- yNum: LONG;
- yDenom: LONG;
- end;
- {$EXTERNALSYM tagEMRSCALEVIEWPORTEXTEX}
- EMRSCALEVIEWPORTEXTEX = tagEMRSCALEVIEWPORTEXTEX;
- {$EXTERNALSYM EMRSCALEVIEWPORTEXTEX}
- EMRSCALEWINDOWEXTEX = tagEMRSCALEVIEWPORTEXTEX;
- {$EXTERNALSYM EMRSCALEWINDOWEXTEX}
- PEMRSCALEWINDOWEXTEX = ^EMRSCALEWINDOWEXTEX;
- {$EXTERNALSYM PEMRSCALEWINDOWEXTEX}
- TEmrScaleViewPortExtEx = EMRSCALEVIEWPORTEXTEX;
-
- PEmrSetWorldTransform = ^TEmrSetWorldTransform;
- tagEMRSETWORLDTRANSFORM = record
- emr: EMR;
- xform: XFORM;
- end;
- {$EXTERNALSYM tagEMRSETWORLDTRANSFORM}
- EMRSETWORLDTRANSFORM = tagEMRSETWORLDTRANSFORM;
- {$EXTERNALSYM EMRSETWORLDTRANSFORM}
- TEmrSetWorldTransform = EMRSETWORLDTRANSFORM;
-
- PEmrModifyWorldTransform = ^TEmrModifyWorldTransform;
- tagEMRMODIFYWORLDTRANSFORM = record
- emr: EMR;
- xform: XFORM;
- iMode: DWORD;
- end;
- {$EXTERNALSYM tagEMRMODIFYWORLDTRANSFORM}
- EMRMODIFYWORLDTRANSFORM = tagEMRMODIFYWORLDTRANSFORM;
- {$EXTERNALSYM EMRMODIFYWORLDTRANSFORM}
- TEmrModifyWorldTransform = EMRMODIFYWORLDTRANSFORM;
-
- PEmrSetPixelV = ^TEmrSetPixelV;
- tagEMRSETPIXELV = record
- emr: EMR;
- ptlPixel: POINTL;
- crColor: COLORREF;
- end;
- {$EXTERNALSYM tagEMRSETPIXELV}
- EMRSETPIXELV = tagEMRSETPIXELV;
- {$EXTERNALSYM EMRSETPIXELV}
- TEmrSetPixelV = EMRSETPIXELV;
-
- PEmrExtFloodFill = ^TEmrExtFloodFill;
- tagEMREXTFLOODFILL = record
- emr: EMR;
- ptlStart: POINTL;
- crColor: COLORREF;
- iMode: DWORD;
- end;
- {$EXTERNALSYM tagEMREXTFLOODFILL}
- EMREXTFLOODFILL = tagEMREXTFLOODFILL;
- {$EXTERNALSYM EMREXTFLOODFILL}
- TEmrExtFloodFill = EMREXTFLOODFILL;
-
- PEmrEllipse = ^TEmrEllipse;
- tagEMRELLIPSE = record
- emr: EMR;
- rclBox: RECTL; // Inclusive-inclusive bounding rectangle
- end;
- {$EXTERNALSYM tagEMRELLIPSE}
- EMRELLIPSE = tagEMRELLIPSE;
- {$EXTERNALSYM EMRELLIPSE}
- EMRRECTANGLE = tagEMRELLIPSE;
- {$EXTERNALSYM EMRRECTANGLE}
- PEMRRECTANGLE = ^EMRRECTANGLE;
- {$EXTERNALSYM PEMRRECTANGLE}
- TEmrEllipse = EMRELLIPSE;
-
- PEmrRoundRect = ^TEmrRoundRect;
- tagEMRROUNDRECT = record
- emr: EMR;
- rclBox: RECTL; // Inclusive-inclusive bounding rectangle
- szlCorner: SIZEL;
- end;
- {$EXTERNALSYM tagEMRROUNDRECT}
- EMRROUNDRECT = tagEMRROUNDRECT;
- {$EXTERNALSYM EMRROUNDRECT}
- TEmrRoundRect = EMRROUNDRECT;
-
- PEmrArc = ^TEmrArc;
- tagEMRARC = record
- emr: EMR;
- rclBox: RECTL; // Inclusive-inclusive bounding rectangle
- ptlStart: POINTL;
- ptlEnd: POINTL;
- end;
- {$EXTERNALSYM tagEMRARC}
- EMRARC = tagEMRARC;
- {$EXTERNALSYM EMRARC}
- EMRARCTO = tagEMRARC;
- {$EXTERNALSYM EMRARCTO}
- PEMRARCTO = ^EMRARCTO;
- {$EXTERNALSYM PEMRARCTO}
- EMRCHORD = tagEMRARC;
- {$EXTERNALSYM EMRCHORD}
- PEMRCHORD = ^EMRCHORD;
- {$EXTERNALSYM PEMRCHORD}
- EMRPIE = tagEMRARC;
- {$EXTERNALSYM EMRPIE}
- PEMRPIE = ^EMRPIE;
- {$EXTERNALSYM PEMRPIE}
- TEmrArc = EMRARC;
-
- PEmrAngleArc = ^TEmrAngleArc;
- tagEMRANGLEARC = record
- emr: EMR;
- ptlCenter: POINTL;
- nRadius: DWORD;
- eStartAngle: FLOAT;
- eSweepAngle: FLOAT;
- end;
- {$EXTERNALSYM tagEMRANGLEARC}
- EMRANGLEARC = tagEMRANGLEARC;
- {$EXTERNALSYM EMRANGLEARC}
- TEmrAngleArc = EMRANGLEARC;
-
- PEmrPolyline = ^TEmrPolyline;
- tagEMRPOLYLINE = record
- emr: EMR;
- rclBounds: RECTL; // Inclusive-inclusive bounds in device units
- cptl: DWORD;
- aptl: array [0..0] of POINTL;
- end;
- {$EXTERNALSYM tagEMRPOLYLINE}
- EMRPOLYLINE = tagEMRPOLYLINE;
- {$EXTERNALSYM EMRPOLYLINE}
- EMRPOLYBEZIER = tagEMRPOLYLINE;
- {$EXTERNALSYM EMRPOLYBEZIER}
- PEMRPOLYBEZIER = ^EMRPOLYBEZIER;
- {$EXTERNALSYM PEMRPOLYBEZIER}
- EMRPOLYGON = tagEMRPOLYLINE;
- {$EXTERNALSYM EMRPOLYGON}
- PEMRPOLYGON = ^EMRPOLYGON;
- {$EXTERNALSYM PEMRPOLYGON}
- EMRPOLYBEZIERTO = tagEMRPOLYLINE;
- {$EXTERNALSYM EMRPOLYBEZIERTO}
- PEMRPOLYBEZIERTO = ^EMRPOLYBEZIERTO;
- {$EXTERNALSYM PEMRPOLYBEZIERTO}
- EMRPOLYLINETO = tagEMRPOLYLINE;
- {$EXTERNALSYM EMRPOLYLINETO}
- PEMRPOLYLINETO = ^EMRPOLYLINETO;
- {$EXTERNALSYM PEMRPOLYLINETO}
- TEmrPolyline = EMRPOLYLINE;
-
- PEmrPolyline16 = ^TEmrPolyline16;
- tagEMRPOLYLINE16 = record
- emr: EMR;
- rclBounds: RECTL; // Inclusive-inclusive bounds in device units
- cpts: DWORD;
- apts: array [0..0] of POINTS;
- end;
- {$EXTERNALSYM tagEMRPOLYLINE16}
- EMRPOLYLINE16 = tagEMRPOLYLINE16;
- {$EXTERNALSYM EMRPOLYLINE16}
- EMRPOLYBEZIER16 = tagEMRPOLYLINE16;
- {$EXTERNALSYM EMRPOLYBEZIER16}
- PEMRPOLYBEZIER16 = ^EMRPOLYBEZIER16;
- {$EXTERNALSYM PEMRPOLYBEZIER16}
- EMRPOLYGON16 = tagEMRPOLYLINE16;
- {$EXTERNALSYM EMRPOLYGON16}
- PEMRPOLYGON16 = ^EMRPOLYGON16;
- {$EXTERNALSYM PEMRPOLYGON16}
- EMRPOLYBEZIERTO16 = tagEMRPOLYLINE16;
- {$EXTERNALSYM EMRPOLYBEZIERTO16}
- PEMRPOLYBEZIERTO16 = ^EMRPOLYBEZIERTO16;
- {$EXTERNALSYM PEMRPOLYBEZIERTO16}
- EMRPOLYLINETO16 = tagEMRPOLYLINE16;
- {$EXTERNALSYM EMRPOLYLINETO16}
- PEMRPOLYLINETO16 = ^EMRPOLYLINETO16;
- {$EXTERNALSYM PEMRPOLYLINETO16}
- TEmrPolyline16 = EMRPOLYLINE16;
-
- PEmrPolyDraw = ^TEmrPolyDraw;
- tagEMRPOLYDRAW = record
- emr: EMR;
- rclBounds: RECTL; // Inclusive-inclusive bounds in device units
- cptl: DWORD; // Number of points
- aptl: array [0..0] of POINTL; // Array of points
- abTypes: array [0..0] of BYTE; // Array of point types
- end;
- {$EXTERNALSYM tagEMRPOLYDRAW}
- EMRPOLYDRAW = tagEMRPOLYDRAW;
- {$EXTERNALSYM EMRPOLYDRAW}
- TEmrPolyDraw = EMRPOLYDRAW;
-
- PEmrPolyDraw16 = ^TEmrPolyDraw16;
- tagEMRPOLYDRAW16 = record
- emr: EMR;
- rclBounds: RECTL; // Inclusive-inclusive bounds in device units
- cpts: DWORD; // Number of points
- apts: array [0..0] of POINTS; // Array of points
- abTypes: array [0..0] of BYTE; // Array of point types
- end;
- {$EXTERNALSYM tagEMRPOLYDRAW16}
- EMRPOLYDRAW16 = tagEMRPOLYDRAW16;
- {$EXTERNALSYM EMRPOLYDRAW16}
- TEmrPolyDraw16 = EMRPOLYDRAW16;
-
- PEmrPolyPolyline = ^TEmrPolyPolyline;
- tagEMRPOLYPOLYLINE = record
- emr: EMR;
- rclBounds: RECTL; // Inclusive-inclusive bounds in device units
- nPolys: DWORD; // Number of polys
- cptl: DWORD; // Total number of points in all polys
- aPolyCounts: array [0..0] of DWORD; // Array of point counts for each poly
- aptl: array [0..0] of POINTL; // Array of points
- end;
- {$EXTERNALSYM tagEMRPOLYPOLYLINE}
- EMRPOLYPOLYLINE = tagEMRPOLYPOLYLINE;
- {$EXTERNALSYM EMRPOLYPOLYLINE}
- EMRPOLYPOLYGON = tagEMRPOLYPOLYLINE;
- {$EXTERNALSYM EMRPOLYPOLYGON}
- TEmrPolyPolyline = EMRPOLYPOLYLINE;
-
- PEmrPolyPolyline16 = ^TEmrPolyPolyline16;
- tagEMRPOLYPOLYLINE16 = record
- emr: EMR;
- rclBounds: RECTL; // Inclusive-inclusive bounds in device units
- nPolys: DWORD; // Number of polys
- cpts: DWORD; // Total number of points in all polys
- aPolyCounts: array [0..0] of DWORD; // Array of point counts for each poly
- apts: array [0..0] of POINTS; // Array of points
- end;
- {$EXTERNALSYM tagEMRPOLYPOLYLINE16}
- EMRPOLYPOLYLINE16 = tagEMRPOLYPOLYLINE16;
- {$EXTERNALSYM EMRPOLYPOLYLINE16}
- EMRPOLYPOLYGON16 = tagEMRPOLYPOLYLINE16;
- {$EXTERNALSYM EMRPOLYPOLYGON16}
- PEMRPOLYPOLYGON16 = ^EMRPOLYPOLYGON16;
- {$EXTERNALSYM PEMRPOLYPOLYGON16}
- TEmrPolyPolyline16 = EMRPOLYPOLYLINE16;
-
- PEmrInvertRgn = ^TEmrInvertRgn;
- tagEMRINVERTRGN = record
- emr: EMR;
- rclBounds: RECTL; // Inclusive-inclusive bounds in device units
- cbRgnData: DWORD; // Size of region data in bytes
- RgnData: array [0..0] of BYTE;
- end;
- {$EXTERNALSYM tagEMRINVERTRGN}
- EMRINVERTRGN = tagEMRINVERTRGN;
- {$EXTERNALSYM EMRINVERTRGN}
- EMRPAINTRGN = tagEMRINVERTRGN;
- {$EXTERNALSYM EMRPAINTRGN}
- TEmrInvertRgn = EMRINVERTRGN;
-
- PEmrFillRgn = ^TEmrFillRgn;
- tagEMRFILLRGN = record
- emr: EMR;
- rclBounds: RECTL; // Inclusive-inclusive bounds in device units
- cbRgnData: DWORD; // Size of region data in bytes
- ihBrush: DWORD; // Brush handle index
- RgnData: array [0..0] of BYTE;
- end;
- {$EXTERNALSYM tagEMRFILLRGN}
- EMRFILLRGN = tagEMRFILLRGN;
- {$EXTERNALSYM EMRFILLRGN}
- TEmrFillRgn = EMRFILLRGN;
-
- PEmrFrameRgn = ^TEmrFrameRgn;
- tagEMRFRAMERGN = record
- emr: EMR;
- rclBounds: RECTL; // Inclusive-inclusive bounds in device units
- cbRgnData: DWORD; // Size of region data in bytes
- ihBrush: DWORD; // Brush handle index
- szlStroke: SIZEL;
- RgnData: array [0..0] of BYTE;
- end;
- {$EXTERNALSYM tagEMRFRAMERGN}
- EMRFRAMERGN = tagEMRFRAMERGN;
- {$EXTERNALSYM EMRFRAMERGN}
- TEmrFrameRgn = EMRFRAMERGN;
-
- PEmrExtSelectClipRgn = ^TEmrExtSelectClipRgn;
- tagEMREXTSELECTCLIPRGN = record
- emr: EMR;
- cbRgnData: DWORD; // Size of region data in bytes
- iMode: DWORD;
- RgnData: array [0..0] of BYTE;
- end;
- {$EXTERNALSYM tagEMREXTSELECTCLIPRGN}
- EMREXTSELECTCLIPRGN = tagEMREXTSELECTCLIPRGN;
- {$EXTERNALSYM EMREXTSELECTCLIPRGN}
- TEmrExtSelectClipRgn = EMREXTSELECTCLIPRGN;
-
- PEmrExtTextOutA = ^TEmrExtTextOutA;
- tagEMREXTTEXTOUTA = record
- emr: EMR;
- rclBounds: RECTL; // Inclusive-inclusive bounds in device units
- iGraphicsMode: DWORD; // Current graphics mode
- exScale: FLOAT; // X and Y scales from Page units to .01mm units
- eyScale: FLOAT; // if graphics mode is GM_COMPATIBLE.
- emrtext: EMRTEXT; // This is followed by the string and spacing array
- end;
- {$EXTERNALSYM tagEMREXTTEXTOUTA}
- EMREXTTEXTOUTA = tagEMREXTTEXTOUTA;
- {$EXTERNALSYM EMREXTTEXTOUTA}
- EMREXTTEXTOUTW = tagEMREXTTEXTOUTA;
- {$EXTERNALSYM EMREXTTEXTOUTW}
- PEMREXTTEXTOUTW = ^EMREXTTEXTOUTW;
- {$EXTERNALSYM PEMREXTTEXTOUTW}
- TEmrExtTextOutA = EMREXTTEXTOUTA;
-
- PEmrPolyTextOutA = ^TEmrPolyTextOutA;
- tagEMRPOLYTEXTOUTA = record
- emr: EMR;
- rclBounds: RECTL; // Inclusive-inclusive bounds in device units
- iGraphicsMode: DWORD; // Current graphics mode
- exScale: FLOAT; // X and Y scales from Page units to .01mm units
- eyScale: FLOAT; // if graphics mode is GM_COMPATIBLE.
- cStrings: LONG;
- aemrtext: array [0..0] of EMRTEXT; // Array of EMRTEXT structures. This is
- // followed by the strings and spacing arrays.
- end;
- {$EXTERNALSYM tagEMRPOLYTEXTOUTA}
- EMRPOLYTEXTOUTA = tagEMRPOLYTEXTOUTA;
- {$EXTERNALSYM EMRPOLYTEXTOUTA}
- EMRPOLYTEXTOUTW = tagEMRPOLYTEXTOUTA;
- {$EXTERNALSYM EMRPOLYTEXTOUTW}
- PEMRPOLYTEXTOUTW = ^EMRPOLYTEXTOUTW;
- {$EXTERNALSYM PEMRPOLYTEXTOUTW}
- TEmrPolyTextOutA = EMRPOLYTEXTOUTA;
-
- PEmrBitBlt = ^TEmrBitBlt;
- tagEMRBITBLT = record
- emr: EMR;
- rclBounds: RECTL; // Inclusive-inclusive bounds in device units
- xDest: LONG;
- yDest: LONG;
- cxDest: LONG;
- cyDest: LONG;
- dwRop: DWORD;
- xSrc: LONG;
- ySrc: LONG;
- xformSrc: XFORM; // Source DC transform
- crBkColorSrc: COLORREF; // Source DC BkColor in RGB
- iUsageSrc: DWORD; // Source bitmap info color table usage
- // (DIB_RGB_COLORS)
- offBmiSrc: DWORD; // Offset to the source BITMAPINFO structure
- cbBmiSrc: DWORD; // Size of the source BITMAPINFO structure
- offBitsSrc: DWORD; // Offset to the source bitmap bits
- cbBitsSrc: DWORD; // Size of the source bitmap bits
- end;
- {$EXTERNALSYM tagEMRBITBLT}
- EMRBITBLT = tagEMRBITBLT;
- {$EXTERNALSYM EMRBITBLT}
- TEmrBitBlt = EMRBITBLT;
-
- PEmrStretchBlt = ^TEmrStretchBlt;
- tagEMRSTRETCHBLT = record
- emr: EMR;
- rclBounds: RECTL; // Inclusive-inclusive bounds in device units
- xDest: LONG;
- yDest: LONG;
- cxDest: LONG;
- cyDest: LONG;
- dwRop: DWORD;
- xSrc: LONG;
- ySrc: LONG;
- xformSrc: XFORM; // Source DC transform
- crBkColorSrc: COLORREF; // Source DC BkColor in RGB
- iUsageSrc: DWORD; // Source bitmap info color table usage
- // (DIB_RGB_COLORS)
- offBmiSrc: DWORD; // Offset to the source BITMAPINFO structure
- cbBmiSrc: DWORD; // Size of the source BITMAPINFO structure
- offBitsSrc: DWORD; // Offset to the source bitmap bits
- cbBitsSrc: DWORD; // Size of the source bitmap bits
- cxSrc: LONG;
- cySrc: LONG;
- end;
- {$EXTERNALSYM tagEMRSTRETCHBLT}
- EMRSTRETCHBLT = tagEMRSTRETCHBLT;
- {$EXTERNALSYM EMRSTRETCHBLT}
- TEmrStretchBlt = EMRSTRETCHBLT;
-
- PEmrMaskBlt = ^TEmrMaskBlt;
- tagEMRMASKBLT = record
- emr: EMR;
- rclBounds: RECTL; // Inclusive-inclusive bounds in device units
- xDest: LONG;
- yDest: LONG;
- cxDest: LONG;
- cyDest: LONG;
- dwRop: DWORD;
- xSrc: LONG;
- ySrc: LONG;
- xformSrc: XFORM; // Source DC transform
- crBkColorSrc: COLORREF; // Source DC BkColor in RGB
- iUsageSrc: DWORD; // Source bitmap info color table usage
- // (DIB_RGB_COLORS)
- offBmiSrc: DWORD; // Offset to the source BITMAPINFO structure
- cbBmiSrc: DWORD; // Size of the source BITMAPINFO structure
- offBitsSrc: DWORD; // Offset to the source bitmap bits
- cbBitsSrc: DWORD; // Size of the source bitmap bits
- xMask: LONG;
- yMask: LONG;
- iUsageMask: DWORD; // Mask bitmap info color table usage
- offBmiMask: DWORD; // Offset to the mask BITMAPINFO structure if any
- cbBmiMask: DWORD; // Size of the mask BITMAPINFO structure if any
- offBitsMask: DWORD; // Offset to the mask bitmap bits if any
- cbBitsMask: DWORD; // Size of the mask bitmap bits if any
- end;
- {$EXTERNALSYM tagEMRMASKBLT}
- EMRMASKBLT = tagEMRMASKBLT;
- {$EXTERNALSYM EMRMASKBLT}
- TEmrMaskBlt = EMRMASKBLT;
-
- PEmrPlgBlt = ^TEmrPlgBlt;
- tagEMRPLGBLT = record
- emr: EMR;
- rclBounds: RECTL; // Inclusive-inclusive bounds in device units
- aptlDest: array[0..2] of POINTL;
- xSrc: LONG;
- ySrc: LONG;
- cxSrc: LONG;
- cySrc: LONG;
- xformSrc: XFORM; // Source DC transform
- crBkColorSrc: COLORREF; // Source DC BkColor in RGB
- iUsageSrc: DWORD; // Source bitmap info color table usage
- // (DIB_RGB_COLORS)
- offBmiSrc: DWORD; // Offset to the source BITMAPINFO structure
- cbBmiSrc: DWORD; // Size of the source BITMAPINFO structure
- offBitsSrc: DWORD; // Offset to the source bitmap bits
- cbBitsSrc: DWORD; // Size of the source bitmap bits
- xMask: LONG;
- yMask: LONG;
- iUsageMask: DWORD; // Mask bitmap info color table usage
- offBmiMask: DWORD; // Offset to the mask BITMAPINFO structure if any
- cbBmiMask: DWORD; // Size of the mask BITMAPINFO structure if any
- offBitsMask: DWORD; // Offset to the mask bitmap bits if any
- cbBitsMask: DWORD; // Size of the mask bitmap bits if any
- end;
- {$EXTERNALSYM tagEMRPLGBLT}
- EMRPLGBLT = tagEMRPLGBLT;
- {$EXTERNALSYM EMRPLGBLT}
- TEmrPlgBlt = EMRPLGBLT;
-
- PEmrSetDiBitsToDevice = ^TEmrSetDiBitsToDevice;
- tagEMRSETDIBITSTODEVICE = record
- emr: EMR;
- rclBounds: RECTL; // Inclusive-inclusive bounds in device units
- xDest: LONG;
- yDest: LONG;
- xSrc: LONG;
- ySrc: LONG;
- cxSrc: LONG;
- cySrc: LONG;
- offBmiSrc: DWORD; // Offset to the source BITMAPINFO structure
- cbBmiSrc: DWORD; // Size of the source BITMAPINFO structure
- offBitsSrc: DWORD; // Offset to the source bitmap bits
- cbBitsSrc: DWORD; // Size of the source bitmap bits
- iUsageSrc: DWORD; // Source bitmap info color table usage
- iStartScan: DWORD;
- cScans: DWORD;
- end;
- {$EXTERNALSYM tagEMRSETDIBITSTODEVICE}
- EMRSETDIBITSTODEVICE = tagEMRSETDIBITSTODEVICE;
- {$EXTERNALSYM EMRSETDIBITSTODEVICE}
- TEmrSetDiBitsToDevice = EMRSETDIBITSTODEVICE;
-
- PEmrStretchDiBits = ^TEmrStretchDiBits;
- tagEMRSTRETCHDIBITS = record
- emr: EMR;
- rclBounds: RECTL; // Inclusive-inclusive bounds in device units
- xDest: LONG;
- yDest: LONG;
- xSrc: LONG;
- ySrc: LONG;
- cxSrc: LONG;
- cySrc: LONG;
- offBmiSrc: DWORD; // Offset to the source BITMAPINFO structure
- cbBmiSrc: DWORD; // Size of the source BITMAPINFO structure
- offBitsSrc: DWORD; // Offset to the source bitmap bits
- cbBitsSrc: DWORD; // Size of the source bitmap bits
- iUsageSrc: DWORD; // Source bitmap info color table usage
- dwRop: DWORD;
- cxDest: LONG;
- cyDest: LONG;
- end;
- {$EXTERNALSYM tagEMRSTRETCHDIBITS}
- EMRSTRETCHDIBITS = tagEMRSTRETCHDIBITS;
- {$EXTERNALSYM EMRSTRETCHDIBITS}
- TEmrStretchDiBits = EMRSTRETCHDIBITS;
-
- PEmrExtCreateFontIndirectW = ^TEmrExtCreateFontIndirectW;
- tagEMREXTCREATEFONTINDIRECTW = record
- emr: EMR;
- ihFont: DWORD; // Font handle index
- elfw: EXTLOGFONTW;
- end;
- {$EXTERNALSYM tagEMREXTCREATEFONTINDIRECTW}
- EMREXTCREATEFONTINDIRECTW = tagEMREXTCREATEFONTINDIRECTW;
- {$EXTERNALSYM EMREXTCREATEFONTINDIRECTW}
- TEmrExtCreateFontIndirectW = EMREXTCREATEFONTINDIRECTW;
-
- PEmrCreatePalette = ^TEmrCreatePalette;
- tagEMRCREATEPALETTE = record
- emr: EMR;
- ihPal: DWORD; // Palette handle index
- lgpl: LOGPALETTE; // The peFlags fields in the palette entries
- // do not contain any flags
- end;
- {$EXTERNALSYM tagEMRCREATEPALETTE}
- EMRCREATEPALETTE = tagEMRCREATEPALETTE;
- {$EXTERNALSYM EMRCREATEPALETTE}
- TEmrCreatePalette = EMRCREATEPALETTE;
-
- PEmrCreatePen = ^TEmrCreatePen;
- tagEMRCREATEPEN = record
- emr: EMR;
- ihPen: DWORD; // Pen handle index
- lopn: LOGPEN;
- end;
- {$EXTERNALSYM tagEMRCREATEPEN}
- EMRCREATEPEN = tagEMRCREATEPEN;
- {$EXTERNALSYM EMRCREATEPEN}
- TEmrCreatePen = EMRCREATEPEN;
-
- PEmrExtCreatePen = ^TEmrExtCreatePen;
- tagEMREXTCREATEPEN = record
- emr: EMR;
- ihPen: DWORD; // Pen handle index
- offBmi: DWORD; // Offset to the BITMAPINFO structure if any
- cbBmi: DWORD; // Size of the BITMAPINFO structure if any
- // The bitmap info is followed by the bitmap
- // bits to form a packed DIB.
- offBits: DWORD; // Offset to the brush bitmap bits if any
- cbBits: DWORD; // Size of the brush bitmap bits if any
- elp: EXTLOGPEN; // The extended pen with the style array.
- end;
- {$EXTERNALSYM tagEMREXTCREATEPEN}
- EMREXTCREATEPEN = tagEMREXTCREATEPEN;
- {$EXTERNALSYM EMREXTCREATEPEN}
- TEmrExtCreatePen = EMREXTCREATEPEN;
-
- PEmrCreateBrushIndirect = ^TEmrCreateBrushIndirect;
- tagEMRCREATEBRUSHINDIRECT = record
- emr: EMR;
- ihBrush: DWORD; // Brush handle index
- lb: LOGBRUSH32; // The style must be BS_SOLID, BS_HOLLOW,
- // BS_NULL or BS_HATCHED.
- end;
- {$EXTERNALSYM tagEMRCREATEBRUSHINDIRECT}
- EMRCREATEBRUSHINDIRECT = tagEMRCREATEBRUSHINDIRECT;
- {$EXTERNALSYM EMRCREATEBRUSHINDIRECT}
- TEmrCreateBrushIndirect = EMRCREATEBRUSHINDIRECT;
-
- PEmrCreateMonoBrush = ^TEmrCreateMonoBrush;
- tagEMRCREATEMONOBRUSH = record
- emr: EMR;
- ihBrush: DWORD; // Brush handle index
- iUsage: DWORD; // Bitmap info color table usage
- offBmi: DWORD; // Offset to the BITMAPINFO structure
- cbBmi: DWORD; // Size of the BITMAPINFO structure
- offBits: DWORD; // Offset to the bitmap bits
- cbBits: DWORD; // Size of the bitmap bits
- end;
- {$EXTERNALSYM tagEMRCREATEMONOBRUSH}
- EMRCREATEMONOBRUSH = tagEMRCREATEMONOBRUSH;
- {$EXTERNALSYM EMRCREATEMONOBRUSH}
- TEmrCreateMonoBrush = EMRCREATEMONOBRUSH;
-
- PEmrCreateDibPatternBrushPt = ^TEmrCreateDibPatternBrushPt;
- tagEMRCREATEDIBPATTERNBRUSHPT = record
- emr: EMR;
- ihBrush: DWORD; // Brush handle index
- iUsage: DWORD; // Bitmap info color table usage
- offBmi: DWORD; // Offset to the BITMAPINFO structure
- cbBmi: DWORD; // Size of the BITMAPINFO structure
- // The bitmap info is followed by the bitmap
- // bits to form a packed DIB.
- offBits: DWORD; // Offset to the bitmap bits
- cbBits: DWORD; // Size of the bitmap bits
- end;
- {$EXTERNALSYM tagEMRCREATEDIBPATTERNBRUSHPT}
- EMRCREATEDIBPATTERNBRUSHPT = tagEMRCREATEDIBPATTERNBRUSHPT;
- {$EXTERNALSYM EMRCREATEDIBPATTERNBRUSHPT}
- TEmrCreateDibPatternBrushPt = EMRCREATEDIBPATTERNBRUSHPT;
-
- PEmrFormat = ^TEmrFormat;
- tagEMRFORMAT = record
- dSignature: DWORD; // Format signature, e.g. ENHMETA_SIGNATURE.
- nVersion: DWORD; // Format version number.
- cbData: DWORD; // Size of data in bytes.
- offData: DWORD; // Offset to data from GDICOMMENT_IDENTIFIER.
- // It must begin at a DWORD offset.
- end;
- {$EXTERNALSYM tagEMRFORMAT}
- EMRFORMAT = tagEMRFORMAT;
- {$EXTERNALSYM EMRFORMAT}
- TEmrFormat = EMRFORMAT;
-
- PEmrGlsRecord = ^TEmrGlsRecord;
- tagEMRGLSRECORD = record
- emr: EMR;
- cbData: DWORD; // Size of data in bytes
- Data: array [0..0] of BYTE;
- end;
- {$EXTERNALSYM tagEMRGLSRECORD}
- EMRGLSRECORD = tagEMRGLSRECORD;
- {$EXTERNALSYM EMRGLSRECORD}
- TEmrGlsRecord = EMRGLSRECORD;
-
- PEmrGlsBoundedRecord = ^TEmrGlsBoundedRecord;
- tagEMRGLSBOUNDEDRECORD = record
- emr: EMR;
- rclBounds: RECTL; // Bounds in recording coordinates
- cbData: DWORD; // Size of data in bytes
- Data: array [0..0] of BYTE;
- end;
- {$EXTERNALSYM tagEMRGLSBOUNDEDRECORD}
- EMRGLSBOUNDEDRECORD = tagEMRGLSBOUNDEDRECORD;
- {$EXTERNALSYM EMRGLSBOUNDEDRECORD}
- TEmrGlsBoundedRecord = EMRGLSBOUNDEDRECORD;
-
- PEmrPixelFormat = ^TEmrPixelFormat;
- tagEMRPIXELFORMAT = record
- emr: EMR;
- pfd: PIXELFORMATDESCRIPTOR;
- end;
- {$EXTERNALSYM tagEMRPIXELFORMAT}
- EMRPIXELFORMAT = tagEMRPIXELFORMAT;
- {$EXTERNALSYM EMRPIXELFORMAT}
- TEmrPixelFormat = EMRPIXELFORMAT;
-
- PEmrCreateColorSpace = ^TEmrCreateColorSpace;
- tagEMRCREATECOLORSPACE = record
- emr: EMR;
- ihCS: DWORD; // ColorSpace handle index
- lcs: LOGCOLORSPACEA; // Ansi version of LOGCOLORSPACE
- end;
- {$EXTERNALSYM tagEMRCREATECOLORSPACE}
- EMRCREATECOLORSPACE = tagEMRCREATECOLORSPACE;
- {$EXTERNALSYM EMRCREATECOLORSPACE}
- TEmrCreateColorSpace = EMRCREATECOLORSPACE;
-
- PEmrSetColorSpace = ^TEmrSetColorSpace;
- tagEMRSETCOLORSPACE = record
- emr: EMR;
- ihCS: DWORD; // ColorSpace handle index
- end;
- {$EXTERNALSYM tagEMRSETCOLORSPACE}
- EMRSETCOLORSPACE = tagEMRSETCOLORSPACE;
- {$EXTERNALSYM EMRSETCOLORSPACE}
- EMRSELECTCOLORSPACE = tagEMRSETCOLORSPACE;
- {$EXTERNALSYM EMRSELECTCOLORSPACE}
- PEMRSELECTCOLORSPACE = ^EMRSELECTCOLORSPACE;
- {$EXTERNALSYM PEMRSELECTCOLORSPACE}
- EMRDELETECOLORSPACE = tagEMRSETCOLORSPACE;
- {$EXTERNALSYM EMRDELETECOLORSPACE}
- PEMRDELETECOLORSPACE = ^EMRDELETECOLORSPACE;
- {$EXTERNALSYM PEMRDELETECOLORSPACE}
- TEmrSetColorSpace = EMRSETCOLORSPACE;
-
- PEmrExtEscape = ^TEmrExtEscape;
- tagEMREXTESCAPE = record
- emr: EMR;
- iEscape: INT; // Escape code
- cbEscData: INT; // Size of escape data
- EscData: array [0..0] of BYTE; // Escape data
- end;
- {$EXTERNALSYM tagEMREXTESCAPE}
- EMREXTESCAPE = tagEMREXTESCAPE;
- {$EXTERNALSYM EMREXTESCAPE}
- EMRDRAWESCAPE = tagEMREXTESCAPE;
- {$EXTERNALSYM EMRDRAWESCAPE}
- PEMRDRAWESCAPE = ^EMRDRAWESCAPE;
- {$EXTERNALSYM PEMRDRAWESCAPE}
- TEmrExtEscape = EMREXTESCAPE;
-
- PEmrNamedEscape = ^TEmrNamedEscape;
- tagEMRNAMEDESCAPE = record
- emr: EMR;
- iEscape: INT; // Escape code
- cbDriver: INT; // Size of driver name
- cbEscData: INT; // Size of escape data
- EscData: array [0..0] of BYTE; // Driver name and Escape data
- end;
- {$EXTERNALSYM tagEMRNAMEDESCAPE}
- EMRNAMEDESCAPE = tagEMRNAMEDESCAPE;
- {$EXTERNALSYM EMRNAMEDESCAPE}
- TEmrNamedEscape = EMRNAMEDESCAPE;
-
-const
- SETICMPROFILE_EMBEDED = $00000001;
- {$EXTERNALSYM SETICMPROFILE_EMBEDED}
-
-type
- PEmrSetIcmProfile = ^TEmrSetIcmProfile;
- tagEMRSETICMPROFILE = record
- emr: EMR;
- dwFlags: DWORD; // flags
- cbName: DWORD; // Size of desired profile name
- cbData: DWORD; // Size of raw profile data if attached
- Data: array [0..0] of BYTE; // Array size is cbName + cbData
- end;
- {$EXTERNALSYM tagEMRSETICMPROFILE}
- EMRSETICMPROFILE = tagEMRSETICMPROFILE;
- {$EXTERNALSYM EMRSETICMPROFILE}
- EMRSETICMPROFILEA = tagEMRSETICMPROFILE;
- {$EXTERNALSYM EMRSETICMPROFILEA}
- PEMRSETICMPROFILEA = ^EMRSETICMPROFILEA;
- {$EXTERNALSYM PEMRSETICMPROFILEA}
- EMRSETICMPROFILEW = tagEMRSETICMPROFILE;
- {$EXTERNALSYM EMRSETICMPROFILEW}
- PEMRSETICMPROFILEW = ^EMRSETICMPROFILEW;
- {$EXTERNALSYM PEMRSETICMPROFILEW}
- TEmrSetIcmProfile = EMRSETICMPROFILE;
-
-const
- CREATECOLORSPACE_EMBEDED = $00000001;
- {$EXTERNALSYM CREATECOLORSPACE_EMBEDED}
-
-type
- PEmrCreateColorSpaceW = ^TEmrCreateColorSpaceW;
- tagEMRCREATECOLORSPACEW = record
- emr: EMR;
- ihCS: DWORD; // ColorSpace handle index
- lcs: LOGCOLORSPACEW; // Unicode version of logical color space structure
- dwFlags: DWORD; // flags
- cbData: DWORD; // size of raw source profile data if attached
- Data: array [0..0] of BYTE; // Array size is cbData
- end;
- {$EXTERNALSYM tagEMRCREATECOLORSPACEW}
- EMRCREATECOLORSPACEW = tagEMRCREATECOLORSPACEW;
- {$EXTERNALSYM EMRCREATECOLORSPACEW}
- TEmrCreateColorSpaceW = EMRCREATECOLORSPACEW;
-
-const
- COLORMATCHTOTARGET_EMBEDED = $00000001;
- {$EXTERNALSYM COLORMATCHTOTARGET_EMBEDED}
-
-type
- PColorMatchToTarget = ^TColorMatchToTarget;
- tagCOLORMATCHTOTARGET = record
- emr: EMR;
- dwAction: DWORD; // CS_ENABLE, CS_DISABLE or CS_DELETE_TRANSFORM
- dwFlags: DWORD; // flags
- cbName: DWORD; // Size of desired target profile name
- cbData: DWORD; // Size of raw target profile data if attached
- Data: array [0..0] of BYTE; // Array size is cbName + cbData
- end;
- {$EXTERNALSYM tagCOLORMATCHTOTARGET}
- //COLORMATCHTOTARGET = tagCOLORMATCHTOTARGET;
- //{$EXTERNALSYM COLORMATCHTOTARGET}
- TColorMatchToTarget = tagCOLORMATCHTOTARGET;
-
- PColorCorrectPalette = ^TColorCorrectPalette;
- tagCOLORCORRECTPALETTE = record
- emr: EMR;
- ihPalette: DWORD; // Palette handle index
- nFirstEntry: DWORD; // Index of first entry to correct
- nPalEntries: DWORD; // Number of palette entries to correct
- nReserved: DWORD; // Reserved
- end;
- {$EXTERNALSYM tagCOLORCORRECTPALETTE}
- //COLORCORRECTPALETTE = tagCOLORCORRECTPALETTE;
- //{$EXTERNALSYM COLORCORRECTPALETTE}
- TColorCorrectPalette = tagCOLORCORRECTPALETTE;
-
- PEmrAlphaBlend = ^TEmrAlphaBlend;
- tagEMRALPHABLEND = record
- emr: EMR;
- rclBounds: RECTL; // Inclusive-inclusive bounds in device units
- xDest: LONG;
- yDest: LONG;
- cxDest: LONG;
- cyDest: LONG;
- dwRop: DWORD;
- xSrc: LONG;
- ySrc: LONG;
- xformSrc: XFORM; // Source DC transform
- crBkColorSrc: COLORREF; // Source DC BkColor in RGB
- iUsageSrc: DWORD; // Source bitmap info color table usage (DIB_RGB_COLORS)
- offBmiSrc: DWORD; // Offset to the source BITMAPINFO structure
- cbBmiSrc: DWORD; // Size of the source BITMAPINFO structure
- offBitsSrc: DWORD; // Offset to the source bitmap bits
- cbBitsSrc: DWORD; // Size of the source bitmap bits
- cxSrc: LONG;
- cySrc: LONG;
- end;
- {$EXTERNALSYM tagEMRALPHABLEND}
- EMRALPHABLEND = tagEMRALPHABLEND;
- {$EXTERNALSYM EMRALPHABLEND}
- TEmrAlphaBlend = EMRALPHABLEND;
-
- PEmrGradientFill = ^TEmrGradientFill;
- tagEMRGRADIENTFILL = record
- emr: EMR;
- rclBounds: RECTL; // Inclusive-inclusive bounds in device units
- nVer: DWORD;
- nTri: DWORD;
- ulMode: ULONG;
- Ver: array [0..0] of TRIVERTEX;
- end;
- {$EXTERNALSYM tagEMRGRADIENTFILL}
- EMRGRADIENTFILL = tagEMRGRADIENTFILL;
- {$EXTERNALSYM EMRGRADIENTFILL}
- TEmrGradientFill = EMRGRADIENTFILL;
-
- PEmrTransparentBlt = ^TEmrTransparentBlt;
- tagEMRTRANSPARENTBLT = record
- emr: EMR;
- rclBounds: RECTL; // Inclusive-inclusive bounds in device units
- xDest: LONG;
- yDest: LONG;
- cxDest: LONG;
- cyDest: LONG;
- dwRop: DWORD;
- xSrc: LONG;
- ySrc: LONG;
- xformSrc: XFORM; // Source DC transform
- crBkColorSrc: COLORREF; // Source DC BkColor in RGB
- iUsageSrc: DWORD; // Source bitmap info color table usage
- // (DIB_RGB_COLORS)
- offBmiSrc: DWORD; // Offset to the source BITMAPINFO structure
- cbBmiSrc: DWORD; // Size of the source BITMAPINFO structure
- offBitsSrc: DWORD; // Offset to the source bitmap bits
- cbBitsSrc: DWORD; // Size of the source bitmap bits
- cxSrc: LONG;
- cySrc: LONG;
- end;
- {$EXTERNALSYM tagEMRTRANSPARENTBLT}
- EMRTRANSPARENTBLT = tagEMRTRANSPARENTBLT;
- {$EXTERNALSYM EMRTRANSPARENTBLT}
- TEmrTransparentBlt = EMRTRANSPARENTBLT;
-
-const
- GDICOMMENT_IDENTIFIER = $43494447;
- {$EXTERNALSYM GDICOMMENT_IDENTIFIER}
- GDICOMMENT_WINDOWS_METAFILE = DWORD($80000001);
- {$EXTERNALSYM GDICOMMENT_WINDOWS_METAFILE}
- GDICOMMENT_BEGINGROUP = $00000002;
- {$EXTERNALSYM GDICOMMENT_BEGINGROUP}
- GDICOMMENT_ENDGROUP = $00000003;
- {$EXTERNALSYM GDICOMMENT_ENDGROUP}
- GDICOMMENT_MULTIFORMATS = $40000004;
- {$EXTERNALSYM GDICOMMENT_MULTIFORMATS}
- EPS_SIGNATURE = $46535045;
- {$EXTERNALSYM EPS_SIGNATURE}
- GDICOMMENT_UNICODE_STRING = $00000040;
- {$EXTERNALSYM GDICOMMENT_UNICODE_STRING}
- GDICOMMENT_UNICODE_END = $00000080;
- {$EXTERNALSYM GDICOMMENT_UNICODE_END}
-
-// OpenGL wgl prototypes
-
-function wglCopyContext(hglrcSrc, hglrcDest: HGLRC; mask: UINT): BOOL; stdcall;
-{$EXTERNALSYM wglCopyContext}
-function wglCreateContext(hdc: HDC): HGLRC; stdcall;
-{$EXTERNALSYM wglCreateContext}
-function wglCreateLayerContext(hdc: HDC; iLayerPlane: Integer): HGLRC; stdcall;
-{$EXTERNALSYM wglCreateLayerContext}
-function wglDeleteContext(hglrc: HGLRC): BOOL; stdcall;
-{$EXTERNALSYM wglDeleteContext}
-function wglGetCurrentContext: HGLRC; stdcall;
-{$EXTERNALSYM wglGetCurrentContext}
-function wglGetCurrentDC: HDC; stdcall;
-{$EXTERNALSYM wglGetCurrentDC}
-function wglGetProcAddress(lpszProc: LPCSTR): PROC; stdcall;
-{$EXTERNALSYM wglGetProcAddress}
-function wglMakeCurrent(hdc: HDC; hglrc: HGLRC): BOOL; stdcall;
-{$EXTERNALSYM wglMakeCurrent}
-function wglShareLists(hglrc1, hglrc2: HGLRC): BOOL; stdcall;
-{$EXTERNALSYM wglShareLists}
-
-function wglUseFontBitmapsA(hdc: HDC; first, count, listBase: DWORD): BOOL; stdcall;
-{$EXTERNALSYM wglUseFontBitmapsA}
-function wglUseFontBitmapsW(hdc: HDC; first, count, listBase: DWORD): BOOL; stdcall;
-{$EXTERNALSYM wglUseFontBitmapsW}
-function wglUseFontBitmaps(hdc: HDC; first, count, listBase: DWORD): BOOL; stdcall;
-{$EXTERNALSYM wglUseFontBitmaps}
-
-function SwapBuffers(hdc: HDC): BOOL; stdcall;
-{$EXTERNALSYM SwapBuffers}
-
-type
- PPointFloat = ^TPointFloat;
- _POINTFLOAT = record
- x: FLOAT;
- y: FLOAT;
- end;
- {$EXTERNALSYM _POINTFLOAT}
- POINTFLOAT = _POINTFLOAT;
- {$EXTERNALSYM POINTFLOAT}
- TPointFloat = _POINTFLOAT;
-
- PGlyphMetricsFloat = ^TGlyphMetricsFloat;
- _GLYPHMETRICSFLOAT = record
- gmfBlackBoxX: FLOAT;
- gmfBlackBoxY: FLOAT;
- gmfptGlyphOrigin: POINTFLOAT;
- gmfCellIncX: FLOAT;
- gmfCellIncY: FLOAT;
- end;
- {$EXTERNALSYM _GLYPHMETRICSFLOAT}
- GLYPHMETRICSFLOAT = _GLYPHMETRICSFLOAT;
- {$EXTERNALSYM GLYPHMETRICSFLOAT}
- LPGLYPHMETRICSFLOAT = ^GLYPHMETRICSFLOAT;
- {$EXTERNALSYM LPGLYPHMETRICSFLOAT}
- TGlyphMetricsFloat = _GLYPHMETRICSFLOAT;
-
-const
- WGL_FONT_LINES = 0;
- {$EXTERNALSYM WGL_FONT_LINES}
- WGL_FONT_POLYGONS = 1;
- {$EXTERNALSYM WGL_FONT_POLYGONS}
-
-function wglUseFontOutlinesA(hdc: HDC; first, count, listBase: DWORD; deviation,
- extrusion: FLOAT; format: Integer; lpgmf: LPGLYPHMETRICSFLOAT): BOOL; stdcall;
-{$EXTERNALSYM wglUseFontOutlinesA}
-function wglUseFontOutlinesW(hdc: HDC; first, count, listBase: DWORD; deviation,
- extrusion: FLOAT; format: Integer; lpgmf: LPGLYPHMETRICSFLOAT): BOOL; stdcall;
-{$EXTERNALSYM wglUseFontOutlinesW}
-function wglUseFontOutlines(hdc: HDC; first, count, listBase: DWORD; deviation,
- extrusion: FLOAT; format: Integer; lpgmf: LPGLYPHMETRICSFLOAT): BOOL; stdcall;
-{$EXTERNALSYM wglUseFontOutlines}
-
-// Layer plane descriptor
-
-type
- PLayerPlaneDescriptor = ^TLayerPlaneDescriptor;
- tagLAYERPLANEDESCRIPTOR = record
- nSize: WORD;
- nVersion: WORD;
- dwFlags: DWORD;
- iPixelType: BYTE;
- cColorBits: BYTE;
- cRedBits: BYTE;
- cRedShift: BYTE;
- cGreenBits: BYTE;
- cGreenShift: BYTE;
- cBlueBits: BYTE;
- cBlueShift: BYTE;
- cAlphaBits: BYTE;
- cAlphaShift: BYTE;
- cAccumBits: BYTE;
- cAccumRedBits: BYTE;
- cAccumGreenBits: BYTE;
- cAccumBlueBits: BYTE;
- cAccumAlphaBits: BYTE;
- cDepthBits: BYTE;
- cStencilBits: BYTE;
- cAuxBuffers: BYTE;
- iLayerPlane: BYTE;
- bReserved: BYTE;
- crTransparent: COLORREF;
- end;
- {$EXTERNALSYM tagLAYERPLANEDESCRIPTOR}
- LAYERPLANEDESCRIPTOR = tagLAYERPLANEDESCRIPTOR;
- {$EXTERNALSYM LAYERPLANEDESCRIPTOR}
- LPLAYERPLANEDESCRIPTOR = ^LAYERPLANEDESCRIPTOR;
- {$EXTERNALSYM LPLAYERPLANEDESCRIPTOR}
- TLayerPlaneDescriptor = LAYERPLANEDESCRIPTOR;
-
-// LAYERPLANEDESCRIPTOR flags
-
-const
- LPD_DOUBLEBUFFER = $00000001;
- {$EXTERNALSYM LPD_DOUBLEBUFFER}
- LPD_STEREO = $00000002;
- {$EXTERNALSYM LPD_STEREO}
- LPD_SUPPORT_GDI = $00000010;
- {$EXTERNALSYM LPD_SUPPORT_GDI}
- LPD_SUPPORT_OPENGL = $00000020;
- {$EXTERNALSYM LPD_SUPPORT_OPENGL}
- LPD_SHARE_DEPTH = $00000040;
- {$EXTERNALSYM LPD_SHARE_DEPTH}
- LPD_SHARE_STENCIL = $00000080;
- {$EXTERNALSYM LPD_SHARE_STENCIL}
- LPD_SHARE_ACCUM = $00000100;
- {$EXTERNALSYM LPD_SHARE_ACCUM}
- LPD_SWAP_EXCHANGE = $00000200;
- {$EXTERNALSYM LPD_SWAP_EXCHANGE}
- LPD_SWAP_COPY = $00000400;
- {$EXTERNALSYM LPD_SWAP_COPY}
- LPD_TRANSPARENT = $00001000;
- {$EXTERNALSYM LPD_TRANSPARENT}
-
- LPD_TYPE_RGBA = 0;
- {$EXTERNALSYM LPD_TYPE_RGBA}
- LPD_TYPE_COLORINDEX = 1;
- {$EXTERNALSYM LPD_TYPE_COLORINDEX}
-
-// wglSwapLayerBuffers flags
-
- WGL_SWAP_MAIN_PLANE = $00000001;
- {$EXTERNALSYM WGL_SWAP_MAIN_PLANE}
- WGL_SWAP_OVERLAY1 = $00000002;
- {$EXTERNALSYM WGL_SWAP_OVERLAY1}
- WGL_SWAP_OVERLAY2 = $00000004;
- {$EXTERNALSYM WGL_SWAP_OVERLAY2}
- WGL_SWAP_OVERLAY3 = $00000008;
- {$EXTERNALSYM WGL_SWAP_OVERLAY3}
- WGL_SWAP_OVERLAY4 = $00000010;
- {$EXTERNALSYM WGL_SWAP_OVERLAY4}
- WGL_SWAP_OVERLAY5 = $00000020;
- {$EXTERNALSYM WGL_SWAP_OVERLAY5}
- WGL_SWAP_OVERLAY6 = $00000040;
- {$EXTERNALSYM WGL_SWAP_OVERLAY6}
- WGL_SWAP_OVERLAY7 = $00000080;
- {$EXTERNALSYM WGL_SWAP_OVERLAY7}
- WGL_SWAP_OVERLAY8 = $00000100;
- {$EXTERNALSYM WGL_SWAP_OVERLAY8}
- WGL_SWAP_OVERLAY9 = $00000200;
- {$EXTERNALSYM WGL_SWAP_OVERLAY9}
- WGL_SWAP_OVERLAY10 = $00000400;
- {$EXTERNALSYM WGL_SWAP_OVERLAY10}
- WGL_SWAP_OVERLAY11 = $00000800;
- {$EXTERNALSYM WGL_SWAP_OVERLAY11}
- WGL_SWAP_OVERLAY12 = $00001000;
- {$EXTERNALSYM WGL_SWAP_OVERLAY12}
- WGL_SWAP_OVERLAY13 = $00002000;
- {$EXTERNALSYM WGL_SWAP_OVERLAY13}
- WGL_SWAP_OVERLAY14 = $00004000;
- {$EXTERNALSYM WGL_SWAP_OVERLAY14}
- WGL_SWAP_OVERLAY15 = $00008000;
- {$EXTERNALSYM WGL_SWAP_OVERLAY15}
- WGL_SWAP_UNDERLAY1 = $00010000;
- {$EXTERNALSYM WGL_SWAP_UNDERLAY1}
- WGL_SWAP_UNDERLAY2 = $00020000;
- {$EXTERNALSYM WGL_SWAP_UNDERLAY2}
- WGL_SWAP_UNDERLAY3 = $00040000;
- {$EXTERNALSYM WGL_SWAP_UNDERLAY3}
- WGL_SWAP_UNDERLAY4 = $00080000;
- {$EXTERNALSYM WGL_SWAP_UNDERLAY4}
- WGL_SWAP_UNDERLAY5 = $00100000;
- {$EXTERNALSYM WGL_SWAP_UNDERLAY5}
- WGL_SWAP_UNDERLAY6 = $00200000;
- {$EXTERNALSYM WGL_SWAP_UNDERLAY6}
- WGL_SWAP_UNDERLAY7 = $00400000;
- {$EXTERNALSYM WGL_SWAP_UNDERLAY7}
- WGL_SWAP_UNDERLAY8 = $00800000;
- {$EXTERNALSYM WGL_SWAP_UNDERLAY8}
- WGL_SWAP_UNDERLAY9 = $01000000;
- {$EXTERNALSYM WGL_SWAP_UNDERLAY9}
- WGL_SWAP_UNDERLAY10 = $02000000;
- {$EXTERNALSYM WGL_SWAP_UNDERLAY10}
- WGL_SWAP_UNDERLAY11 = $04000000;
- {$EXTERNALSYM WGL_SWAP_UNDERLAY11}
- WGL_SWAP_UNDERLAY12 = $08000000;
- {$EXTERNALSYM WGL_SWAP_UNDERLAY12}
- WGL_SWAP_UNDERLAY13 = $10000000;
- {$EXTERNALSYM WGL_SWAP_UNDERLAY13}
- WGL_SWAP_UNDERLAY14 = $20000000;
- {$EXTERNALSYM WGL_SWAP_UNDERLAY14}
- WGL_SWAP_UNDERLAY15 = $40000000;
- {$EXTERNALSYM WGL_SWAP_UNDERLAY15}
-
-function wglDescribeLayerPlane(hdc: HDC; iPixelFormat, iLayerPlane: Integer;
- nBytes: UINT; plpd: LPLAYERPLANEDESCRIPTOR): BOOL; stdcall;
-{$EXTERNALSYM wglDescribeLayerPlane}
-function wglSetLayerPaletteEntries(hdc: HDC; iLayerPlane, iStart, cEntries: Integer;
- pcr: LPCOLORREF): Integer; stdcall;
-{$EXTERNALSYM wglSetLayerPaletteEntries}
-function wglGetLayerPaletteEntries(hdc: HDC; iLayerPlane, iStart, cEntries: Integer;
- pcr: LPCOLORREF): Integer; stdcall;
-{$EXTERNALSYM wglGetLayerPaletteEntries}
-function wglRealizeLayerPalette(hdc: HDC; iLayerPlane: Integer; bRealize: BOOL): BOOL; stdcall;
-{$EXTERNALSYM wglRealizeLayerPalette}
-function wglSwapLayerBuffers(hdc: HDC; fuPlanes: UINT): BOOL; stdcall;
-{$EXTERNALSYM wglSwapLayerBuffers}
-
-type
- PWglSwap = ^TWglSwap;
- _WGLSWAP = record
- hdc: HDC;
- uiFlags: UINT;
- end;
- {$EXTERNALSYM _WGLSWAP}
- WGLSWAP = _WGLSWAP;
- {$EXTERNALSYM WGLSWAP}
- LPWGLSWAP = ^WGLSWAP;
- {$EXTERNALSYM LPWGLSWAP}
- TWglSwap = _WGLSWAP;
-
-const
- WGL_SWAPMULTIPLE_MAX = 16;
- {$EXTERNALSYM WGL_SWAPMULTIPLE_MAX}
-
-function wglSwapMultipleBuffers(fuCount: UINT; lpBuffers: LPWGLSWAP): DWORD; stdcall;
-{$EXTERNALSYM wglSwapMultipleBuffers}
-
-implementation
-
-const
- gdi32 = 'gdi32.dll';
- msimg32 = 'msimg32.dll';
- winspool32 = 'winspool32.drv';
- opengl32 = 'opengl32.dll';
- {$IFDEF UNICODE}
- AWSuffix = 'W';
- {$ELSE}
- AWSuffix = 'A';
- {$ENDIF UNICODE}
-
-function MAKEROP4(Fore, Back: DWORD): DWORD;
-begin
- Result := ((Back shl 8) and DWORD($FF000000)) or Fore;
-end;
-
-function GetKValue(cmyk: COLORREF): BYTE;
-begin
- Result := BYTE(cmyk);
-end;
-
-function GetYValue(cmyk: COLORREF): BYTE;
-begin
- Result := BYTE(cmyk shr 8);
-end;
-
-function GetMValue(cmyk: COLORREF): BYTE;
-begin
- Result := BYTE(cmyk shr 16);
-end;
-
-function GetCValue(cmyk: COLORREF): BYTE;
-begin
- Result := BYTE(cmyk shr 24);
-end;
-
-function CMYK(c, m, y, k: BYTE): COLORREF;
-begin
- Result := COLORREF(k or (y shl 8) or (m shl 16) or (c shl 24));
-end;
-
-function MAKEPOINTS(l: DWORD): POINTS;
-begin
- Result.x := LOWORD(l);
- Result.y := HIWORD(l);
-end;
-
-function RGB(r, g, b: BYTE): COLORREF;
-begin
- Result := COLORREF(r or (g shl 8) or (b shl 16));
-end;
-
-function PALETTERGB(r, g, b: BYTE): COLORREF;
-begin
- Result := $02000000 or RGB(r, g, b);
-end;
-
-function PALETTEINDEX(i: WORD): COLORREF;
-begin
- Result := COLORREF($01000000 or DWORD(i));
-end;
-
-function GetRValue(rgb: COLORREF): BYTE;
-begin
- Result := BYTE(RGB);
-end;
-
-function GetGValue(rgb: COLORREF): BYTE;
-begin
- Result := BYTE(rgb shr 8);
-end;
-
-function GetBValue(rgb: COLORREF): BYTE;
-begin
- Result := BYTE(rgb shr 16);
-end;
-
-{$IFDEF DYNAMIC_LINK}
-
-var
- _AddFontResourceA: Pointer;
-
-function AddFontResourceA;
-begin
- GetProcedureAddress(_AddFontResourceA, gdi32, 'AddFontResourceA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_AddFontResourceA]
- end;
-end;
-
-var
- _AddFontResourceW: Pointer;
-
-function AddFontResourceW;
-begin
- GetProcedureAddress(_AddFontResourceW, gdi32, 'AddFontResourceW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_AddFontResourceW]
- end;
-end;
-
-var
- _AddFontResource: Pointer;
-
-function AddFontResource;
-begin
- GetProcedureAddress(_AddFontResource, gdi32, 'AddFontResource' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_AddFontResource]
- end;
-end;
-
-var
- _AnimatePalette: Pointer;
-
-function AnimatePalette;
-begin
- GetProcedureAddress(_AnimatePalette, gdi32, 'AnimatePalette');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_AnimatePalette]
- end;
-end;
-
-var
- _Arc: Pointer;
-
-function Arc;
-begin
- GetProcedureAddress(_Arc, gdi32, 'Arc');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_Arc]
- end;
-end;
-
-var
- _BitBlt: Pointer;
-
-function BitBlt;
-begin
- GetProcedureAddress(_BitBlt, gdi32, 'BitBlt');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_BitBlt]
- end;
-end;
-
-var
- _CancelDC: Pointer;
-
-function CancelDC;
-begin
- GetProcedureAddress(_CancelDC, gdi32, 'CancelDC');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CancelDC]
- end;
-end;
-
-var
- _Chord: Pointer;
-
-function Chord;
-begin
- GetProcedureAddress(_Chord, gdi32, 'Chord');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_Chord]
- end;
-end;
-
-var
- _ChoosePixelFormat: Pointer;
-
-function ChoosePixelFormat;
-begin
- GetProcedureAddress(_ChoosePixelFormat, gdi32, 'ChoosePixelFormat');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ChoosePixelFormat]
- end;
-end;
-
-var
- _CloseMetaFile: Pointer;
-
-function CloseMetaFile;
-begin
- GetProcedureAddress(_CloseMetaFile, gdi32, 'CloseMetaFile');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CloseMetaFile]
- end;
-end;
-
-var
- _CombineRgn: Pointer;
-
-function CombineRgn;
-begin
- GetProcedureAddress(_CombineRgn, gdi32, 'CombineRgn');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CombineRgn]
- end;
-end;
-
-var
- _CopyMetaFileA: Pointer;
-
-function CopyMetaFileA;
-begin
- GetProcedureAddress(_CopyMetaFileA, gdi32, 'CopyMetaFileA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CopyMetaFileA]
- end;
-end;
-
-var
- _CopyMetaFileW: Pointer;
-
-function CopyMetaFileW;
-begin
- GetProcedureAddress(_CopyMetaFileW, gdi32, 'CopyMetaFileW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CopyMetaFileW]
- end;
-end;
-
-var
- _CopyMetaFile: Pointer;
-
-function CopyMetaFile;
-begin
- GetProcedureAddress(_CopyMetaFile, gdi32, 'CopyMetaFile' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CopyMetaFile]
- end;
-end;
-
-var
- _CreateBitmap: Pointer;
-
-function CreateBitmap;
-begin
- GetProcedureAddress(_CreateBitmap, gdi32, 'CreateBitmap');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreateBitmap]
- end;
-end;
-
-var
- _CreateBitmapIndirect: Pointer;
-
-function CreateBitmapIndirect;
-begin
- GetProcedureAddress(_CreateBitmapIndirect, gdi32, 'CreateBitmapIndirect');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreateBitmapIndirect]
- end;
-end;
-
-var
- _CreateBrushIndirect: Pointer;
-
-function CreateBrushIndirect;
-begin
- GetProcedureAddress(_CreateBrushIndirect, gdi32, 'CreateBrushIndirect');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreateBrushIndirect]
- end;
-end;
-
-var
- _CreateCompatibleBitmap: Pointer;
-
-function CreateCompatibleBitmap;
-begin
- GetProcedureAddress(_CreateCompatibleBitmap, gdi32, 'CreateCompatibleBitmap');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreateCompatibleBitmap]
- end;
-end;
-
-var
- _CreateDiscardableBitmap: Pointer;
-
-function CreateDiscardableBitmap;
-begin
- GetProcedureAddress(_CreateDiscardableBitmap, gdi32, 'CreateDiscardableBitmap');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreateDiscardableBitmap]
- end;
-end;
-
-var
- _CreateCompatibleDC: Pointer;
-
-function CreateCompatibleDC;
-begin
- GetProcedureAddress(_CreateCompatibleDC, gdi32, 'CreateCompatibleDC');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreateCompatibleDC]
- end;
-end;
-
-var
- _CreateDCA: Pointer;
-
-function CreateDCA;
-begin
- GetProcedureAddress(_CreateDCA, gdi32, 'CreateDCA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreateDCA]
- end;
-end;
-
-var
- _CreateDCW: Pointer;
-
-function CreateDCW;
-begin
- GetProcedureAddress(_CreateDCW, gdi32, 'CreateDCW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreateDCW]
- end;
-end;
-
-var
- _CreateDC: Pointer;
-
-function CreateDC;
-begin
- GetProcedureAddress(_CreateDC, gdi32, 'CreateDC' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreateDC]
- end;
-end;
-
-var
- _CreateDIBitmap: Pointer;
-
-function CreateDIBitmap;
-begin
- GetProcedureAddress(_CreateDIBitmap, gdi32, 'CreateDIBitmap');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreateDIBitmap]
- end;
-end;
-
-var
- _CreateDIBPatternBrush: Pointer;
-
-function CreateDIBPatternBrush;
-begin
- GetProcedureAddress(_CreateDIBPatternBrush, gdi32, 'CreateDIBPatternBrush');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreateDIBPatternBrush]
- end;
-end;
-
-var
- _CreateDIBPatternBrushPt: Pointer;
-
-function CreateDIBPatternBrushPt;
-begin
- GetProcedureAddress(_CreateDIBPatternBrushPt, gdi32, 'CreateDIBPatternBrushPt');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreateDIBPatternBrushPt]
- end;
-end;
-
-var
- _CreateEllipticRgn: Pointer;
-
-function CreateEllipticRgn;
-begin
- GetProcedureAddress(_CreateEllipticRgn, gdi32, 'CreateEllipticRgn');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreateEllipticRgn]
- end;
-end;
-
-var
- _CreateEllipticRgnIndirect: Pointer;
-
-function CreateEllipticRgnIndirect;
-begin
- GetProcedureAddress(_CreateEllipticRgnIndirect, gdi32, 'CreateEllipticRgnIndirect');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreateEllipticRgnIndirect]
- end;
-end;
-
-var
- _CreateFontIndirectA: Pointer;
-
-function CreateFontIndirectA;
-begin
- GetProcedureAddress(_CreateFontIndirectA, gdi32, 'CreateFontIndirectA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreateFontIndirectA]
- end;
-end;
-
-var
- _CreateFontIndirectW: Pointer;
-
-function CreateFontIndirectW;
-begin
- GetProcedureAddress(_CreateFontIndirectW, gdi32, 'CreateFontIndirectW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreateFontIndirectW]
- end;
-end;
-
-var
- _CreateFontIndirect: Pointer;
-
-function CreateFontIndirect;
-begin
- GetProcedureAddress(_CreateFontIndirect, gdi32, 'CreateFontIndirect' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreateFontIndirect]
- end;
-end;
-
-var
- _CreateFontA: Pointer;
-
-function CreateFontA;
-begin
- GetProcedureAddress(_CreateFontA, gdi32, 'CreateFontA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreateFontA]
- end;
-end;
-
-var
- _CreateFontW: Pointer;
-
-function CreateFontW;
-begin
- GetProcedureAddress(_CreateFontW, gdi32, 'CreateFontW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreateFontW]
- end;
-end;
-
-var
- _CreateFont: Pointer;
-
-function CreateFont;
-begin
- GetProcedureAddress(_CreateFont, gdi32, 'CreateFont' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreateFont]
- end;
-end;
-
-var
- _CreateHatchBrush: Pointer;
-
-function CreateHatchBrush;
-begin
- GetProcedureAddress(_CreateHatchBrush, gdi32, 'CreateHatchBrush');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreateHatchBrush]
- end;
-end;
-
-var
- _CreateICA: Pointer;
-
-function CreateICA;
-begin
- GetProcedureAddress(_CreateICA, gdi32, 'CreateICA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreateICA]
- end;
-end;
-
-var
- _CreateICW: Pointer;
-
-function CreateICW;
-begin
- GetProcedureAddress(_CreateICW, gdi32, 'CreateICW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreateICW]
- end;
-end;
-
-var
- _CreateIC: Pointer;
-
-function CreateIC;
-begin
- GetProcedureAddress(_CreateIC, gdi32, 'CreateIC' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreateIC]
- end;
-end;
-
-var
- _CreateMetaFileA: Pointer;
-
-function CreateMetaFileA;
-begin
- GetProcedureAddress(_CreateMetaFileA, gdi32, 'CreateMetaFileA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreateMetaFileA]
- end;
-end;
-
-var
- _CreateMetaFileW: Pointer;
-
-function CreateMetaFileW;
-begin
- GetProcedureAddress(_CreateMetaFileW, gdi32, 'CreateMetaFileW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreateMetaFileW]
- end;
-end;
-
-var
- _CreateMetaFile: Pointer;
-
-function CreateMetaFile;
-begin
- GetProcedureAddress(_CreateMetaFile, gdi32, 'CreateMetaFile' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreateMetaFile]
- end;
-end;
-
-var
- _CreatePalette: Pointer;
-
-function CreatePalette;
-begin
- GetProcedureAddress(_CreatePalette, gdi32, 'CreatePalette');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreatePalette]
- end;
-end;
-
-var
- _CreatePen: Pointer;
-
-function CreatePen;
-begin
- GetProcedureAddress(_CreatePen, gdi32, 'CreatePen');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreatePen]
- end;
-end;
-
-var
- _CreatePenIndirect: Pointer;
-
-function CreatePenIndirect;
-begin
- GetProcedureAddress(_CreatePenIndirect, gdi32, 'CreatePenIndirect');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreatePenIndirect]
- end;
-end;
-
-var
- _CreatePolyPolygonRgn: Pointer;
-
-function CreatePolyPolygonRgn;
-begin
- GetProcedureAddress(_CreatePolyPolygonRgn, gdi32, 'CreatePolyPolygonRgn');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreatePolyPolygonRgn]
- end;
-end;
-
-var
- _CreatePatternBrush: Pointer;
-
-function CreatePatternBrush;
-begin
- GetProcedureAddress(_CreatePatternBrush, gdi32, 'CreatePatternBrush');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreatePatternBrush]
- end;
-end;
-
-var
- _CreateRectRgn: Pointer;
-
-function CreateRectRgn;
-begin
- GetProcedureAddress(_CreateRectRgn, gdi32, 'CreateRectRgn');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreateRectRgn]
- end;
-end;
-
-var
- _CreateRectRgnIndirect: Pointer;
-
-function CreateRectRgnIndirect;
-begin
- GetProcedureAddress(_CreateRectRgnIndirect, gdi32, 'CreateRectRgnIndirect');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreateRectRgnIndirect]
- end;
-end;
-
-var
- _CreateRoundRectRgn: Pointer;
-
-function CreateRoundRectRgn;
-begin
- GetProcedureAddress(_CreateRoundRectRgn, gdi32, 'CreateRoundRectRgn');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreateRoundRectRgn]
- end;
-end;
-
-var
- _CreateScalableFontResourceA: Pointer;
-
-function CreateScalableFontResourceA;
-begin
- GetProcedureAddress(_CreateScalableFontResourceA, gdi32, 'CreateScalableFontResourceA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreateScalableFontResourceA]
- end;
-end;
-
-var
- _CreateScalableFontResourceW: Pointer;
-
-function CreateScalableFontResourceW;
-begin
- GetProcedureAddress(_CreateScalableFontResourceW, gdi32, 'CreateScalableFontResourceW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreateScalableFontResourceW]
- end;
-end;
-
-var
- _CreateScalableFontResource: Pointer;
-
-function CreateScalableFontResource;
-begin
- GetProcedureAddress(_CreateScalableFontResource, gdi32, 'CreateScalableFontResource' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreateScalableFontResource]
- end;
-end;
-
-var
- _CreateSolidBrush: Pointer;
-
-function CreateSolidBrush;
-begin
- GetProcedureAddress(_CreateSolidBrush, gdi32, 'CreateSolidBrush');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreateSolidBrush]
- end;
-end;
-
-var
- _DeleteDC: Pointer;
-
-function DeleteDC;
-begin
- GetProcedureAddress(_DeleteDC, gdi32, 'DeleteDC');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DeleteDC]
- end;
-end;
-
-var
- _DeleteMetaFile: Pointer;
-
-function DeleteMetaFile;
-begin
- GetProcedureAddress(_DeleteMetaFile, gdi32, 'DeleteMetaFile');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DeleteMetaFile]
- end;
-end;
-
-var
- _DeleteObject: Pointer;
-
-function DeleteObject;
-begin
- GetProcedureAddress(_DeleteObject, gdi32, 'DeleteObject');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DeleteObject]
- end;
-end;
-
-var
- _DescribePixelFormat: Pointer;
-
-function DescribePixelFormat;
-begin
- GetProcedureAddress(_DescribePixelFormat, gdi32, 'DescribePixelFormat');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DescribePixelFormat]
- end;
-end;
-
-var
- _DeviceCapabilitiesA: Pointer;
-
-function DeviceCapabilitiesA;
-begin
- GetProcedureAddress(_DeviceCapabilitiesA, winspool32, 'DeviceCapabilitiesA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DeviceCapabilitiesA]
- end;
-end;
-
-var
- _DeviceCapabilitiesW: Pointer;
-
-function DeviceCapabilitiesW;
-begin
- GetProcedureAddress(_DeviceCapabilitiesW, winspool32, 'DeviceCapabilitiesW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DeviceCapabilitiesW]
- end;
-end;
-
-var
- _DeviceCapabilities: Pointer;
-
-function DeviceCapabilities;
-begin
- GetProcedureAddress(_DeviceCapabilities, winspool32, 'DeviceCapabilities' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DeviceCapabilities]
- end;
-end;
-
-var
- _DrawEscape: Pointer;
-
-function DrawEscape;
-begin
- GetProcedureAddress(_DrawEscape, gdi32, 'DrawEscape');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DrawEscape]
- end;
-end;
-
-var
- _Ellipse: Pointer;
-
-function Ellipse;
-begin
- GetProcedureAddress(_Ellipse, gdi32, 'Ellipse');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_Ellipse]
- end;
-end;
-
-var
- _EnumFontFamiliesExA: Pointer;
-
-function EnumFontFamiliesExA;
-begin
- GetProcedureAddress(_EnumFontFamiliesExA, gdi32, 'EnumFontFamiliesExA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_EnumFontFamiliesExA]
- end;
-end;
-
-var
- _EnumFontFamiliesExW: Pointer;
-
-function EnumFontFamiliesExW;
-begin
- GetProcedureAddress(_EnumFontFamiliesExW, gdi32, 'EnumFontFamiliesExW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_EnumFontFamiliesExW]
- end;
-end;
-
-var
- _EnumFontFamiliesEx: Pointer;
-
-function EnumFontFamiliesEx;
-begin
- GetProcedureAddress(_EnumFontFamiliesEx, gdi32, 'EnumFontFamiliesEx' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_EnumFontFamiliesEx]
- end;
-end;
-
-var
- _EnumFontFamiliesA: Pointer;
-
-function EnumFontFamiliesA;
-begin
- GetProcedureAddress(_EnumFontFamiliesA, gdi32, 'EnumFontFamiliesA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_EnumFontFamiliesA]
- end;
-end;
-
-var
- _EnumFontFamiliesW: Pointer;
-
-function EnumFontFamiliesW;
-begin
- GetProcedureAddress(_EnumFontFamiliesW, gdi32, 'EnumFontFamiliesW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_EnumFontFamiliesW]
- end;
-end;
-
-var
- _EnumFontFamilies: Pointer;
-
-function EnumFontFamilies;
-begin
- GetProcedureAddress(_EnumFontFamilies, gdi32, 'EnumFontFamilies' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_EnumFontFamilies]
- end;
-end;
-
-var
- _EnumFontsA: Pointer;
-
-function EnumFontsA;
-begin
- GetProcedureAddress(_EnumFontsA, gdi32, 'EnumFontsA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_EnumFontsA]
- end;
-end;
-
-var
- _EnumFontsW: Pointer;
-
-function EnumFontsW;
-begin
- GetProcedureAddress(_EnumFontsW, gdi32, 'EnumFontsW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_EnumFontsW]
- end;
-end;
-
-var
- _EnumFonts: Pointer;
-
-function EnumFonts;
-begin
- GetProcedureAddress(_EnumFonts, gdi32, 'EnumFonts' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_EnumFonts]
- end;
-end;
-
-var
- _EnumObjects: Pointer;
-
-function EnumObjects;
-begin
- GetProcedureAddress(_EnumObjects, gdi32, 'EnumObjects');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_EnumObjects]
- end;
-end;
-
-var
- _EqualRgn: Pointer;
-
-function EqualRgn;
-begin
- GetProcedureAddress(_EqualRgn, gdi32, 'EqualRgn');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_EqualRgn]
- end;
-end;
-
-var
- _Escape: Pointer;
-
-function Escape;
-begin
- GetProcedureAddress(_Escape, gdi32, 'Escape');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_Escape]
- end;
-end;
-
-var
- _ExtEscape: Pointer;
-
-function ExtEscape;
-begin
- GetProcedureAddress(_ExtEscape, gdi32, 'ExtEscape');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ExtEscape]
- end;
-end;
-
-var
- _ExcludeClipRect: Pointer;
-
-function ExcludeClipRect;
-begin
- GetProcedureAddress(_ExcludeClipRect, gdi32, 'ExcludeClipRect');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ExcludeClipRect]
- end;
-end;
-
-var
- _ExtCreateRegion: Pointer;
-
-function ExtCreateRegion;
-begin
- GetProcedureAddress(_ExtCreateRegion, gdi32, 'ExtCreateRegion');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ExtCreateRegion]
- end;
-end;
-
-var
- _ExtFloodFill: Pointer;
-
-function ExtFloodFill;
-begin
- GetProcedureAddress(_ExtFloodFill, gdi32, 'ExtFloodFill');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ExtFloodFill]
- end;
-end;
-
-var
- _FillRgn: Pointer;
-
-function FillRgn;
-begin
- GetProcedureAddress(_FillRgn, gdi32, 'FillRgn');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_FillRgn]
- end;
-end;
-
-var
- _FloodFill: Pointer;
-
-function FloodFill;
-begin
- GetProcedureAddress(_FloodFill, gdi32, 'FloodFill');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_FloodFill]
- end;
-end;
-
-var
- _FrameRgn: Pointer;
-
-function FrameRgn;
-begin
- GetProcedureAddress(_FrameRgn, gdi32, 'FrameRgn');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_FrameRgn]
- end;
-end;
-
-var
- _GetROP2: Pointer;
-
-function GetROP2;
-begin
- GetProcedureAddress(_GetROP2, gdi32, 'GetROP2');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetROP2]
- end;
-end;
-
-var
- _GetAspectRatioFilterEx: Pointer;
-
-function GetAspectRatioFilterEx;
-begin
- GetProcedureAddress(_GetAspectRatioFilterEx, gdi32, 'GetAspectRatioFilterEx');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetAspectRatioFilterEx]
- end;
-end;
-
-var
- _GetBkColor: Pointer;
-
-function GetBkColor;
-begin
- GetProcedureAddress(_GetBkColor, gdi32, 'GetBkColor');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetBkColor]
- end;
-end;
-
-var
- _GetDCBrushColor: Pointer;
-
-function GetDCBrushColor;
-begin
- GetProcedureAddress(_GetDCBrushColor, gdi32, 'GetDCBrushColor');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetDCBrushColor]
- end;
-end;
-
-var
- _GetDCPenColor: Pointer;
-
-function GetDCPenColor;
-begin
- GetProcedureAddress(_GetDCPenColor, gdi32, 'GetDCPenColor');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetDCPenColor]
- end;
-end;
-
-var
- _GetBkMode: Pointer;
-
-function GetBkMode;
-begin
- GetProcedureAddress(_GetBkMode, gdi32, 'GetBkMode');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetBkMode]
- end;
-end;
-
-var
- _GetBitmapBits: Pointer;
-
-function GetBitmapBits;
-begin
- GetProcedureAddress(_GetBitmapBits, gdi32, 'GetBitmapBits');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetBitmapBits]
- end;
-end;
-
-var
- _GetBitmapDimensionEx: Pointer;
-
-function GetBitmapDimensionEx;
-begin
- GetProcedureAddress(_GetBitmapDimensionEx, gdi32, 'GetBitmapDimensionEx');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetBitmapDimensionEx]
- end;
-end;
-
-var
- _GetBoundsRect: Pointer;
-
-function GetBoundsRect;
-begin
- GetProcedureAddress(_GetBoundsRect, gdi32, 'GetBoundsRect');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetBoundsRect]
- end;
-end;
-
-var
- _GetBrushOrgEx: Pointer;
-
-function GetBrushOrgEx;
-begin
- GetProcedureAddress(_GetBrushOrgEx, gdi32, 'GetBrushOrgEx');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetBrushOrgEx]
- end;
-end;
-
-var
- _GetCharWidthA: Pointer;
-
-function GetCharWidthA;
-begin
- GetProcedureAddress(_GetCharWidthA, gdi32, 'GetCharWidthA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetCharWidthA]
- end;
-end;
-
-var
- _GetCharWidthW: Pointer;
-
-function GetCharWidthW;
-begin
- GetProcedureAddress(_GetCharWidthW, gdi32, 'GetCharWidthW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetCharWidthW]
- end;
-end;
-
-var
- _GetCharWidth: Pointer;
-
-function GetCharWidth;
-begin
- GetProcedureAddress(_GetCharWidth, gdi32, 'GetCharWidth' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetCharWidth]
- end;
-end;
-
-var
- _GetCharWidth32A: Pointer;
-
-function GetCharWidth32A;
-begin
- GetProcedureAddress(_GetCharWidth32A, gdi32, 'GetCharWidth32A');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetCharWidth32A]
- end;
-end;
-
-var
- _GetCharWidth32W: Pointer;
-
-function GetCharWidth32W;
-begin
- GetProcedureAddress(_GetCharWidth32W, gdi32, 'GetCharWidth32W');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetCharWidth32W]
- end;
-end;
-
-var
- _GetCharWidth32: Pointer;
-
-function GetCharWidth32;
-begin
- GetProcedureAddress(_GetCharWidth32, gdi32, 'GetCharWidth32' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetCharWidth32]
- end;
-end;
-
-var
- _GetCharWidthFloatA: Pointer;
-
-function GetCharWidthFloatA;
-begin
- GetProcedureAddress(_GetCharWidthFloatA, gdi32, 'GetCharWidthFloatA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetCharWidthFloatA]
- end;
-end;
-
-var
- _GetCharWidthFloatW: Pointer;
-
-function GetCharWidthFloatW;
-begin
- GetProcedureAddress(_GetCharWidthFloatW, gdi32, 'GetCharWidthFloatW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetCharWidthFloatW]
- end;
-end;
-
-var
- _GetCharWidthFloat: Pointer;
-
-function GetCharWidthFloat;
-begin
- GetProcedureAddress(_GetCharWidthFloat, gdi32, 'GetCharWidthFloat' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetCharWidthFloat]
- end;
-end;
-
-var
- _GetCharABCWidthsA: Pointer;
-
-function GetCharABCWidthsA;
-begin
- GetProcedureAddress(_GetCharABCWidthsA, gdi32, 'GetCharABCWidthsA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetCharABCWidthsA]
- end;
-end;
-
-var
- _GetCharABCWidthsW: Pointer;
-
-function GetCharABCWidthsW;
-begin
- GetProcedureAddress(_GetCharABCWidthsW, gdi32, 'GetCharABCWidthsW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetCharABCWidthsW]
- end;
-end;
-
-var
- _GetCharABCWidths: Pointer;
-
-function GetCharABCWidths;
-begin
- GetProcedureAddress(_GetCharABCWidths, gdi32, 'GetCharABCWidths' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetCharABCWidths]
- end;
-end;
-
-var
- _GetCharABCWidthsFloatA: Pointer;
-
-function GetCharABCWidthsFloatA;
-begin
- GetProcedureAddress(_GetCharABCWidthsFloatA, gdi32, 'GetCharABCWidthsFloatA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetCharABCWidthsFloatA]
- end;
-end;
-
-var
- _GetCharABCWidthsFloatW: Pointer;
-
-function GetCharABCWidthsFloatW;
-begin
- GetProcedureAddress(_GetCharABCWidthsFloatW, gdi32, 'GetCharABCWidthsFloatW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetCharABCWidthsFloatW]
- end;
-end;
-
-var
- _GetCharABCWidthsFloat: Pointer;
-
-function GetCharABCWidthsFloat;
-begin
- GetProcedureAddress(_GetCharABCWidthsFloat, gdi32, 'GetCharABCWidthsFloat' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetCharABCWidthsFloat]
- end;
-end;
-
-var
- _GetClipBox: Pointer;
-
-function GetClipBox;
-begin
- GetProcedureAddress(_GetClipBox, gdi32, 'GetClipBox');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetClipBox]
- end;
-end;
-
-var
- _GetClipRgn: Pointer;
-
-function GetClipRgn;
-begin
- GetProcedureAddress(_GetClipRgn, gdi32, 'GetClipRgn');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetClipRgn]
- end;
-end;
-
-var
- _GetMetaRgn: Pointer;
-
-function GetMetaRgn;
-begin
- GetProcedureAddress(_GetMetaRgn, gdi32, 'GetMetaRgn');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetMetaRgn]
- end;
-end;
-
-var
- _GetCurrentObject: Pointer;
-
-function GetCurrentObject;
-begin
- GetProcedureAddress(_GetCurrentObject, gdi32, 'GetCurrentObject');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetCurrentObject]
- end;
-end;
-
-var
- _GetCurrentPositionEx: Pointer;
-
-function GetCurrentPositionEx;
-begin
- GetProcedureAddress(_GetCurrentPositionEx, gdi32, 'GetCurrentPositionEx');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetCurrentPositionEx]
- end;
-end;
-
-var
- _GetDeviceCaps: Pointer;
-
-function GetDeviceCaps;
-begin
- GetProcedureAddress(_GetDeviceCaps, gdi32, 'GetDeviceCaps');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetDeviceCaps]
- end;
-end;
-
-var
- _GetDIBits: Pointer;
-
-function GetDIBits;
-begin
- GetProcedureAddress(_GetDIBits, gdi32, 'GetDIBits');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetDIBits]
- end;
-end;
-
-var
- _GetFontData: Pointer;
-
-function GetFontData;
-begin
- GetProcedureAddress(_GetFontData, gdi32, 'GetFontData');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetFontData]
- end;
-end;
-
-var
- _GetGlyphOutlineA: Pointer;
-
-function GetGlyphOutlineA;
-begin
- GetProcedureAddress(_GetGlyphOutlineA, gdi32, 'GetGlyphOutlineA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetGlyphOutlineA]
- end;
-end;
-
-var
- _GetGlyphOutlineW: Pointer;
-
-function GetGlyphOutlineW;
-begin
- GetProcedureAddress(_GetGlyphOutlineW, gdi32, 'GetGlyphOutlineW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetGlyphOutlineW]
- end;
-end;
-
-var
- _GetGlyphOutline: Pointer;
-
-function GetGlyphOutline;
-begin
- GetProcedureAddress(_GetGlyphOutline, gdi32, 'GetGlyphOutline' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetGlyphOutline]
- end;
-end;
-
-var
- _GetGraphicsMode: Pointer;
-
-function GetGraphicsMode;
-begin
- GetProcedureAddress(_GetGraphicsMode, gdi32, 'GetGraphicsMode');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetGraphicsMode]
- end;
-end;
-
-var
- _GetMapMode: Pointer;
-
-function GetMapMode;
-begin
- GetProcedureAddress(_GetMapMode, gdi32, 'GetMapMode');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetMapMode]
- end;
-end;
-
-var
- _GetMetaFileBitsEx: Pointer;
-
-function GetMetaFileBitsEx;
-begin
- GetProcedureAddress(_GetMetaFileBitsEx, gdi32, 'GetMetaFileBitsEx');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetMetaFileBitsEx]
- end;
-end;
-
-var
- _GetMetaFileA: Pointer;
-
-function GetMetaFileA;
-begin
- GetProcedureAddress(_GetMetaFileA, gdi32, 'GetMetaFileA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetMetaFileA]
- end;
-end;
-
-var
- _GetMetaFileW: Pointer;
-
-function GetMetaFileW;
-begin
- GetProcedureAddress(_GetMetaFileW, gdi32, 'GetMetaFileW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetMetaFileW]
- end;
-end;
-
-var
- _GetMetaFile: Pointer;
-
-function GetMetaFile;
-begin
- GetProcedureAddress(_GetMetaFile, gdi32, 'GetMetaFile' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetMetaFile]
- end;
-end;
-
-var
- _GetNearestColor: Pointer;
-
-function GetNearestColor;
-begin
- GetProcedureAddress(_GetNearestColor, gdi32, 'GetNearestColor');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetNearestColor]
- end;
-end;
-
-var
- _GetNearestPaletteIndex: Pointer;
-
-function GetNearestPaletteIndex;
-begin
- GetProcedureAddress(_GetNearestPaletteIndex, gdi32, 'GetNearestPaletteIndex');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetNearestPaletteIndex]
- end;
-end;
-
-var
- _GetObjectType: Pointer;
-
-function GetObjectType;
-begin
- GetProcedureAddress(_GetObjectType, gdi32, 'GetObjectType');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetObjectType]
- end;
-end;
-
-var
- _GetOutlineTextMetricsA: Pointer;
-
-function GetOutlineTextMetricsA;
-begin
- GetProcedureAddress(_GetOutlineTextMetricsA, gdi32, 'GetOutlineTextMetricsA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetOutlineTextMetricsA]
- end;
-end;
-
-var
- _GetOutlineTextMetricsW: Pointer;
-
-function GetOutlineTextMetricsW;
-begin
- GetProcedureAddress(_GetOutlineTextMetricsW, gdi32, 'GetOutlineTextMetricsW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetOutlineTextMetricsW]
- end;
-end;
-
-var
- _GetOutlineTextMetrics: Pointer;
-
-function GetOutlineTextMetrics;
-begin
- GetProcedureAddress(_GetOutlineTextMetrics, gdi32, 'GetOutlineTextMetrics' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetOutlineTextMetrics]
- end;
-end;
-
-var
- _GetPaletteEntries: Pointer;
-
-function GetPaletteEntries;
-begin
- GetProcedureAddress(_GetPaletteEntries, gdi32, 'GetPaletteEntries');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetPaletteEntries]
- end;
-end;
-
-var
- _GetPixel: Pointer;
-
-function GetPixel;
-begin
- GetProcedureAddress(_GetPixel, gdi32, 'GetPixel');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetPixel]
- end;
-end;
-
-var
- _GetPixelFormat: Pointer;
-
-function GetPixelFormat;
-begin
- GetProcedureAddress(_GetPixelFormat, gdi32, 'GetPixelFormat');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetPixelFormat]
- end;
-end;
-
-var
- _GetPolyFillMode: Pointer;
-
-function GetPolyFillMode;
-begin
- GetProcedureAddress(_GetPolyFillMode, gdi32, 'GetPolyFillMode');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetPolyFillMode]
- end;
-end;
-
-var
- _GetRasterizerCaps: Pointer;
-
-function GetRasterizerCaps;
-begin
- GetProcedureAddress(_GetRasterizerCaps, gdi32, 'GetRasterizerCaps');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetRasterizerCaps]
- end;
-end;
-
-var
- _GetRandomRgn: Pointer;
-
-function GetRandomRgn;
-begin
- GetProcedureAddress(_GetRandomRgn, gdi32, 'GetRandomRgn');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetRandomRgn]
- end;
-end;
-
-var
- _GetRegionData: Pointer;
-
-function GetRegionData;
-begin
- GetProcedureAddress(_GetRegionData, gdi32, 'GetRegionData');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetRegionData]
- end;
-end;
-
-var
- _GetRgnBox: Pointer;
-
-function GetRgnBox;
-begin
- GetProcedureAddress(_GetRgnBox, gdi32, 'GetRgnBox');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetRgnBox]
- end;
-end;
-
-var
- _GetStockObject: Pointer;
-
-function GetStockObject;
-begin
- GetProcedureAddress(_GetStockObject, gdi32, 'GetStockObject');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetStockObject]
- end;
-end;
-
-var
- _GetStretchBltMode: Pointer;
-
-function GetStretchBltMode;
-begin
- GetProcedureAddress(_GetStretchBltMode, gdi32, 'GetStretchBltMode');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetStretchBltMode]
- end;
-end;
-
-var
- _GetSystemPaletteEntries: Pointer;
-
-function GetSystemPaletteEntries;
-begin
- GetProcedureAddress(_GetSystemPaletteEntries, gdi32, 'GetSystemPaletteEntries');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetSystemPaletteEntries]
- end;
-end;
-
-var
- _GetSystemPaletteUse: Pointer;
-
-function GetSystemPaletteUse;
-begin
- GetProcedureAddress(_GetSystemPaletteUse, gdi32, 'GetSystemPaletteUse');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetSystemPaletteUse]
- end;
-end;
-
-var
- _GetTextCharacterExtra: Pointer;
-
-function GetTextCharacterExtra;
-begin
- GetProcedureAddress(_GetTextCharacterExtra, gdi32, 'GetTextCharacterExtra');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetTextCharacterExtra]
- end;
-end;
-
-var
- _GetTextAlign: Pointer;
-
-function GetTextAlign;
-begin
- GetProcedureAddress(_GetTextAlign, gdi32, 'GetTextAlign');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetTextAlign]
- end;
-end;
-
-var
- _GetTextColor: Pointer;
-
-function GetTextColor;
-begin
- GetProcedureAddress(_GetTextColor, gdi32, 'GetTextColor');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetTextColor]
- end;
-end;
-
-var
- _GetTextExtentPointA: Pointer;
-
-function GetTextExtentPointA;
-begin
- GetProcedureAddress(_GetTextExtentPointA, gdi32, 'GetTextExtentPointA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetTextExtentPointA]
- end;
-end;
-
-var
- _GetTextExtentPointW: Pointer;
-
-function GetTextExtentPointW;
-begin
- GetProcedureAddress(_GetTextExtentPointW, gdi32, 'GetTextExtentPointW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetTextExtentPointW]
- end;
-end;
-
-var
- _GetTextExtentPoint: Pointer;
-
-function GetTextExtentPoint;
-begin
- GetProcedureAddress(_GetTextExtentPoint, gdi32, 'GetTextExtentPoint' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetTextExtentPoint]
- end;
-end;
-
-var
- _GetTextExtentPoint32A: Pointer;
-
-function GetTextExtentPoint32A;
-begin
- GetProcedureAddress(_GetTextExtentPoint32A, gdi32, 'GetTextExtentPoint32A');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetTextExtentPoint32A]
- end;
-end;
-
-var
- _GetTextExtentPoint32W: Pointer;
-
-function GetTextExtentPoint32W;
-begin
- GetProcedureAddress(_GetTextExtentPoint32W, gdi32, 'GetTextExtentPoint32W');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetTextExtentPoint32W]
- end;
-end;
-
-var
- _GetTextExtentPoint32: Pointer;
-
-function GetTextExtentPoint32;
-begin
- GetProcedureAddress(_GetTextExtentPoint32, gdi32, 'GetTextExtentPoint32' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetTextExtentPoint32]
- end;
-end;
-
-var
- _GetTextExtentExPointA: Pointer;
-
-function GetTextExtentExPointA;
-begin
- GetProcedureAddress(_GetTextExtentExPointA, gdi32, 'GetTextExtentExPointA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetTextExtentExPointA]
- end;
-end;
-
-var
- _GetTextExtentExPointW: Pointer;
-
-function GetTextExtentExPointW;
-begin
- GetProcedureAddress(_GetTextExtentExPointW, gdi32, 'GetTextExtentExPointW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetTextExtentExPointW]
- end;
-end;
-
-var
- _GetTextExtentExPoint: Pointer;
-
-function GetTextExtentExPoint;
-begin
- GetProcedureAddress(_GetTextExtentExPoint, gdi32, 'GetTextExtentExPoint' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetTextExtentExPoint]
- end;
-end;
-
-var
- _GetTextCharset: Pointer;
-
-function GetTextCharset;
-begin
- GetProcedureAddress(_GetTextCharset, gdi32, 'GetTextCharset');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetTextCharset]
- end;
-end;
-
-var
- _GetTextCharsetInfo: Pointer;
-
-function GetTextCharsetInfo;
-begin
- GetProcedureAddress(_GetTextCharsetInfo, gdi32, 'GetTextCharsetInfo');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetTextCharsetInfo]
- end;
-end;
-
-var
- _TranslateCharsetInfo: Pointer;
-
-function TranslateCharsetInfo;
-begin
- GetProcedureAddress(_TranslateCharsetInfo, gdi32, 'TranslateCharsetInfo');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_TranslateCharsetInfo]
- end;
-end;
-
-var
- _GetFontLanguageInfo: Pointer;
-
-function GetFontLanguageInfo;
-begin
- GetProcedureAddress(_GetFontLanguageInfo, gdi32, 'GetFontLanguageInfo');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetFontLanguageInfo]
- end;
-end;
-
-var
- _GetCharacterPlacementA: Pointer;
-
-function GetCharacterPlacementA;
-begin
- GetProcedureAddress(_GetCharacterPlacementA, gdi32, 'GetCharacterPlacementA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetCharacterPlacementA]
- end;
-end;
-
-var
- _GetCharacterPlacementW: Pointer;
-
-function GetCharacterPlacementW;
-begin
- GetProcedureAddress(_GetCharacterPlacementW, gdi32, 'GetCharacterPlacementW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetCharacterPlacementW]
- end;
-end;
-
-var
- _GetCharacterPlacement: Pointer;
-
-function GetCharacterPlacement;
-begin
- GetProcedureAddress(_GetCharacterPlacement, gdi32, 'GetCharacterPlacement' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetCharacterPlacement]
- end;
-end;
-
-var
- _GetFontUnicodeRanges: Pointer;
-
-function GetFontUnicodeRanges;
-begin
- GetProcedureAddress(_GetFontUnicodeRanges, gdi32, 'GetFontUnicodeRanges');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetFontUnicodeRanges]
- end;
-end;
-
-var
- _GetGlyphIndicesA: Pointer;
-
-function GetGlyphIndicesA;
-begin
- GetProcedureAddress(_GetGlyphIndicesA, gdi32, 'GetGlyphIndicesA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetGlyphIndicesA]
- end;
-end;
-
-var
- _GetGlyphIndicesW: Pointer;
-
-function GetGlyphIndicesW;
-begin
- GetProcedureAddress(_GetGlyphIndicesW, gdi32, 'GetGlyphIndicesW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetGlyphIndicesW]
- end;
-end;
-
-var
- _GetGlyphIndices: Pointer;
-
-function GetGlyphIndices;
-begin
- GetProcedureAddress(_GetGlyphIndices, gdi32, 'GetGlyphIndices' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetGlyphIndices]
- end;
-end;
-
-var
- _GetTextExtentPointI: Pointer;
-
-function GetTextExtentPointI;
-begin
- GetProcedureAddress(_GetTextExtentPointI, gdi32, 'GetTextExtentPointI');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetTextExtentPointI]
- end;
-end;
-
-var
- _GetTextExtentExPointI: Pointer;
-
-function GetTextExtentExPointI;
-begin
- GetProcedureAddress(_GetTextExtentExPointI, gdi32, 'GetTextExtentExPointI');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetTextExtentExPointI]
- end;
-end;
-
-var
- _GetCharWidthI: Pointer;
-
-function GetCharWidthI;
-begin
- GetProcedureAddress(_GetCharWidthI, gdi32, 'GetCharWidthI');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetCharWidthI]
- end;
-end;
-
-var
- _GetCharABCWidthsI: Pointer;
-
-function GetCharABCWidthsI;
-begin
- GetProcedureAddress(_GetCharABCWidthsI, gdi32, 'GetCharABCWidthsI');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetCharABCWidthsI]
- end;
-end;
-
-var
- _AddFontResourceExA: Pointer;
-
-function AddFontResourceExA;
-begin
- GetProcedureAddress(_AddFontResourceExA, gdi32, 'AddFontResourceExA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_AddFontResourceExA]
- end;
-end;
-
-var
- _AddFontResourceExW: Pointer;
-
-function AddFontResourceExW;
-begin
- GetProcedureAddress(_AddFontResourceExW, gdi32, 'AddFontResourceExW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_AddFontResourceExW]
- end;
-end;
-
-var
- _AddFontResourceEx: Pointer;
-
-function AddFontResourceEx;
-begin
- GetProcedureAddress(_AddFontResourceEx, gdi32, 'AddFontResourceEx' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_AddFontResourceEx]
- end;
-end;
-
-var
- _RemoveFontResourceExA: Pointer;
-
-function RemoveFontResourceExA;
-begin
- GetProcedureAddress(_RemoveFontResourceExA, gdi32, 'RemoveFontResourceExA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RemoveFontResourceExA]
- end;
-end;
-
-var
- _RemoveFontResourceExW: Pointer;
-
-function RemoveFontResourceExW;
-begin
- GetProcedureAddress(_RemoveFontResourceExW, gdi32, 'RemoveFontResourceExW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RemoveFontResourceExW]
- end;
-end;
-
-var
- _RemoveFontResourceEx: Pointer;
-
-function RemoveFontResourceEx;
-begin
- GetProcedureAddress(_RemoveFontResourceEx, gdi32, 'RemoveFontResourceEx' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RemoveFontResourceEx]
- end;
-end;
-
-var
- _AddFontMemResourceEx: Pointer;
-
-function AddFontMemResourceEx;
-begin
- GetProcedureAddress(_AddFontMemResourceEx, gdi32, 'AddFontMemResourceEx');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_AddFontMemResourceEx]
- end;
-end;
-
-var
- _RemoveFontMemResourceEx: Pointer;
-
-function RemoveFontMemResourceEx;
-begin
- GetProcedureAddress(_RemoveFontMemResourceEx, gdi32, 'RemoveFontMemResourceEx');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RemoveFontMemResourceEx]
- end;
-end;
-
-var
- _CreateFontIndirectExA: Pointer;
-
-function CreateFontIndirectExA;
-begin
- GetProcedureAddress(_CreateFontIndirectExA, gdi32, 'CreateFontIndirectExA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreateFontIndirectExA]
- end;
-end;
-
-var
- _CreateFontIndirectExW: Pointer;
-
-function CreateFontIndirectExW;
-begin
- GetProcedureAddress(_CreateFontIndirectExW, gdi32, 'CreateFontIndirectExW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreateFontIndirectExW]
- end;
-end;
-
-var
- _CreateFontIndirectEx: Pointer;
-
-function CreateFontIndirectEx;
-begin
- GetProcedureAddress(_CreateFontIndirectEx, gdi32, 'CreateFontIndirectEx' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreateFontIndirectEx]
- end;
-end;
-
-var
- _GetViewportExtEx: Pointer;
-
-function GetViewportExtEx;
-begin
- GetProcedureAddress(_GetViewportExtEx, gdi32, 'GetViewportExtEx');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetViewportExtEx]
- end;
-end;
-
-var
- _GetViewportOrgEx: Pointer;
-
-function GetViewportOrgEx;
-begin
- GetProcedureAddress(_GetViewportOrgEx, gdi32, 'GetViewportOrgEx');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetViewportOrgEx]
- end;
-end;
-
-var
- _GetWindowExtEx: Pointer;
-
-function GetWindowExtEx;
-begin
- GetProcedureAddress(_GetWindowExtEx, gdi32, 'GetWindowExtEx');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetWindowExtEx]
- end;
-end;
-
-var
- _GetWindowOrgEx: Pointer;
-
-function GetWindowOrgEx;
-begin
- GetProcedureAddress(_GetWindowOrgEx, gdi32, 'GetWindowOrgEx');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetWindowOrgEx]
- end;
-end;
-
-var
- _IntersectClipRect: Pointer;
-
-function IntersectClipRect;
-begin
- GetProcedureAddress(_IntersectClipRect, gdi32, 'IntersectClipRect');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_IntersectClipRect]
- end;
-end;
-
-var
- _InvertRgn: Pointer;
-
-function InvertRgn;
-begin
- GetProcedureAddress(_InvertRgn, gdi32, 'InvertRgn');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_InvertRgn]
- end;
-end;
-
-var
- _LineDDA: Pointer;
-
-function LineDDA;
-begin
- GetProcedureAddress(_LineDDA, gdi32, 'LineDDA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_LineDDA]
- end;
-end;
-
-var
- _LineTo: Pointer;
-
-function LineTo;
-begin
- GetProcedureAddress(_LineTo, gdi32, 'LineTo');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_LineTo]
- end;
-end;
-
-var
- _MaskBlt: Pointer;
-
-function MaskBlt;
-begin
- GetProcedureAddress(_MaskBlt, gdi32, 'MaskBlt');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MaskBlt]
- end;
-end;
-
-var
- _PlgBlt: Pointer;
-
-function PlgBlt;
-begin
- GetProcedureAddress(_PlgBlt, gdi32, 'PlgBlt');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PlgBlt]
- end;
-end;
-
-var
- _OffsetClipRgn: Pointer;
-
-function OffsetClipRgn;
-begin
- GetProcedureAddress(_OffsetClipRgn, gdi32, 'OffsetClipRgn');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_OffsetClipRgn]
- end;
-end;
-
-var
- _OffsetRgn: Pointer;
-
-function OffsetRgn;
-begin
- GetProcedureAddress(_OffsetRgn, gdi32, 'OffsetRgn');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_OffsetRgn]
- end;
-end;
-
-var
- _PatBlt: Pointer;
-
-function PatBlt;
-begin
- GetProcedureAddress(_PatBlt, gdi32, 'PatBlt');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PatBlt]
- end;
-end;
-
-var
- _Pie: Pointer;
-
-function Pie;
-begin
- GetProcedureAddress(_Pie, gdi32, 'Pie');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_Pie]
- end;
-end;
-
-var
- _PlayMetaFile: Pointer;
-
-function PlayMetaFile;
-begin
- GetProcedureAddress(_PlayMetaFile, gdi32, 'PlayMetaFile');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PlayMetaFile]
- end;
-end;
-
-var
- _PaintRgn: Pointer;
-
-function PaintRgn;
-begin
- GetProcedureAddress(_PaintRgn, gdi32, 'PaintRgn');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PaintRgn]
- end;
-end;
-
-var
- _PolyPolygon: Pointer;
-
-function PolyPolygon;
-begin
- GetProcedureAddress(_PolyPolygon, gdi32, 'PolyPolygon');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PolyPolygon]
- end;
-end;
-
-var
- _PtInRegion: Pointer;
-
-function PtInRegion;
-begin
- GetProcedureAddress(_PtInRegion, gdi32, 'PtInRegion');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PtInRegion]
- end;
-end;
-
-var
- _PtVisible: Pointer;
-
-function PtVisible;
-begin
- GetProcedureAddress(_PtVisible, gdi32, 'PtVisible');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PtVisible]
- end;
-end;
-
-var
- _RectInRegion: Pointer;
-
-function RectInRegion;
-begin
- GetProcedureAddress(_RectInRegion, gdi32, 'RectInRegion');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RectInRegion]
- end;
-end;
-
-var
- _RectVisible: Pointer;
-
-function RectVisible;
-begin
- GetProcedureAddress(_RectVisible, gdi32, 'RectVisible');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RectVisible]
- end;
-end;
-
-var
- _Rectangle: Pointer;
-
-function Rectangle;
-begin
- GetProcedureAddress(_Rectangle, gdi32, 'Rectangle');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_Rectangle]
- end;
-end;
-
-var
- _RestoreDC: Pointer;
-
-function RestoreDC;
-begin
- GetProcedureAddress(_RestoreDC, gdi32, 'RestoreDC');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RestoreDC]
- end;
-end;
-
-var
- _ResetDCA: Pointer;
-
-function ResetDCA;
-begin
- GetProcedureAddress(_ResetDCA, gdi32, 'ResetDCA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ResetDCA]
- end;
-end;
-
-var
- _ResetDCW: Pointer;
-
-function ResetDCW;
-begin
- GetProcedureAddress(_ResetDCW, gdi32, 'ResetDCW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ResetDCW]
- end;
-end;
-
-var
- _ResetDC: Pointer;
-
-function ResetDC;
-begin
- GetProcedureAddress(_ResetDC, gdi32, 'ResetDC' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ResetDC]
- end;
-end;
-
-var
- _RealizePalette: Pointer;
-
-function RealizePalette;
-begin
- GetProcedureAddress(_RealizePalette, gdi32, 'RealizePalette');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RealizePalette]
- end;
-end;
-
-var
- _RemoveFontResourceA: Pointer;
-
-function RemoveFontResourceA;
-begin
- GetProcedureAddress(_RemoveFontResourceA, gdi32, 'RemoveFontResourceA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RemoveFontResourceA]
- end;
-end;
-
-var
- _RemoveFontResourceW: Pointer;
-
-function RemoveFontResourceW;
-begin
- GetProcedureAddress(_RemoveFontResourceW, gdi32, 'RemoveFontResourceW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RemoveFontResourceW]
- end;
-end;
-
-var
- _RemoveFontResource: Pointer;
-
-function RemoveFontResource;
-begin
- GetProcedureAddress(_RemoveFontResource, gdi32, 'RemoveFontResource' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RemoveFontResource]
- end;
-end;
-
-var
- _RoundRect: Pointer;
-
-function RoundRect;
-begin
- GetProcedureAddress(_RoundRect, gdi32, 'RoundRect');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RoundRect]
- end;
-end;
-
-var
- _ResizePalette: Pointer;
-
-function ResizePalette;
-begin
- GetProcedureAddress(_ResizePalette, gdi32, 'ResizePalette');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ResizePalette]
- end;
-end;
-
-var
- _SaveDC: Pointer;
-
-function SaveDC;
-begin
- GetProcedureAddress(_SaveDC, gdi32, 'SaveDC');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SaveDC]
- end;
-end;
-
-var
- _SelectClipRgn: Pointer;
-
-function SelectClipRgn;
-begin
- GetProcedureAddress(_SelectClipRgn, gdi32, 'SelectClipRgn');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SelectClipRgn]
- end;
-end;
-
-var
- _ExtSelectClipRgn: Pointer;
-
-function ExtSelectClipRgn;
-begin
- GetProcedureAddress(_ExtSelectClipRgn, gdi32, 'ExtSelectClipRgn');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ExtSelectClipRgn]
- end;
-end;
-
-var
- _SetMetaRgn: Pointer;
-
-function SetMetaRgn;
-begin
- GetProcedureAddress(_SetMetaRgn, gdi32, 'SetMetaRgn');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetMetaRgn]
- end;
-end;
-
-var
- _SelectObject: Pointer;
-
-function SelectObject;
-begin
- GetProcedureAddress(_SelectObject, gdi32, 'SelectObject');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SelectObject]
- end;
-end;
-
-var
- _SelectPalette: Pointer;
-
-function SelectPalette;
-begin
- GetProcedureAddress(_SelectPalette, gdi32, 'SelectPalette');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SelectPalette]
- end;
-end;
-
-var
- _SetBkColor: Pointer;
-
-function SetBkColor;
-begin
- GetProcedureAddress(_SetBkColor, gdi32, 'SetBkColor');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetBkColor]
- end;
-end;
-
-var
- _SetDCBrushColor: Pointer;
-
-function SetDCBrushColor;
-begin
- GetProcedureAddress(_SetDCBrushColor, gdi32, 'SetDCBrushColor');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetDCBrushColor]
- end;
-end;
-
-var
- _SetDCPenColor: Pointer;
-
-function SetDCPenColor;
-begin
- GetProcedureAddress(_SetDCPenColor, gdi32, 'SetDCPenColor');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetDCPenColor]
- end;
-end;
-
-var
- _SetBkMode: Pointer;
-
-function SetBkMode;
-begin
- GetProcedureAddress(_SetBkMode, gdi32, 'SetBkMode');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetBkMode]
- end;
-end;
-
-var
- _SetBitmapBits: Pointer;
-
-function SetBitmapBits;
-begin
- GetProcedureAddress(_SetBitmapBits, gdi32, 'SetBitmapBits');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetBitmapBits]
- end;
-end;
-
-var
- _SetBoundsRect: Pointer;
-
-function SetBoundsRect;
-begin
- GetProcedureAddress(_SetBoundsRect, gdi32, 'SetBoundsRect');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetBoundsRect]
- end;
-end;
-
-var
- _SetDIBits: Pointer;
-
-function SetDIBits;
-begin
- GetProcedureAddress(_SetDIBits, gdi32, 'SetDIBits');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetDIBits]
- end;
-end;
-
-var
- _SetDIBitsToDevice: Pointer;
-
-function SetDIBitsToDevice;
-begin
- GetProcedureAddress(_SetDIBitsToDevice, gdi32, 'SetDIBitsToDevice');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetDIBitsToDevice]
- end;
-end;
-
-var
- _SetMapperFlags: Pointer;
-
-function SetMapperFlags;
-begin
- GetProcedureAddress(_SetMapperFlags, gdi32, 'SetMapperFlags');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetMapperFlags]
- end;
-end;
-
-var
- _SetGraphicsMode: Pointer;
-
-function SetGraphicsMode;
-begin
- GetProcedureAddress(_SetGraphicsMode, gdi32, 'SetGraphicsMode');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetGraphicsMode]
- end;
-end;
-
-var
- _SetMapMode: Pointer;
-
-function SetMapMode;
-begin
- GetProcedureAddress(_SetMapMode, gdi32, 'SetMapMode');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetMapMode]
- end;
-end;
-
-var
- _SetLayout: Pointer;
-
-function SetLayout;
-begin
- GetProcedureAddress(_SetLayout, gdi32, 'SetLayout');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetLayout]
- end;
-end;
-
-var
- _GetLayout: Pointer;
-
-function GetLayout;
-begin
- GetProcedureAddress(_GetLayout, gdi32, 'GetLayout');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetLayout]
- end;
-end;
-
-var
- _SetMetaFileBitsEx: Pointer;
-
-function SetMetaFileBitsEx;
-begin
- GetProcedureAddress(_SetMetaFileBitsEx, gdi32, 'SetMetaFileBitsEx');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetMetaFileBitsEx]
- end;
-end;
-
-var
- _SetPaletteEntries: Pointer;
-
-function SetPaletteEntries;
-begin
- GetProcedureAddress(_SetPaletteEntries, gdi32, 'SetPaletteEntries');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetPaletteEntries]
- end;
-end;
-
-var
- _SetPixel: Pointer;
-
-function SetPixel;
-begin
- GetProcedureAddress(_SetPixel, gdi32, 'SetPixel');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetPixel]
- end;
-end;
-
-var
- _SetPixelV: Pointer;
-
-function SetPixelV;
-begin
- GetProcedureAddress(_SetPixelV, gdi32, 'SetPixelV');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetPixelV]
- end;
-end;
-
-var
- _SetPixelFormat: Pointer;
-
-function SetPixelFormat;
-begin
- GetProcedureAddress(_SetPixelFormat, gdi32, 'SetPixelFormat');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetPixelFormat]
- end;
-end;
-
-var
- _SetPolyFillMode: Pointer;
-
-function SetPolyFillMode;
-begin
- GetProcedureAddress(_SetPolyFillMode, gdi32, 'SetPolyFillMode');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetPolyFillMode]
- end;
-end;
-
-var
- _StretchBlt: Pointer;
-
-function StretchBlt;
-begin
- GetProcedureAddress(_StretchBlt, gdi32, 'StretchBlt');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_StretchBlt]
- end;
-end;
-
-var
- _SetRectRgn: Pointer;
-
-function SetRectRgn;
-begin
- GetProcedureAddress(_SetRectRgn, gdi32, 'SetRectRgn');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetRectRgn]
- end;
-end;
-
-var
- _StretchDIBits: Pointer;
-
-function StretchDIBits;
-begin
- GetProcedureAddress(_StretchDIBits, gdi32, 'StretchDIBits');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_StretchDIBits]
- end;
-end;
-
-var
- _SetROP2: Pointer;
-
-function SetROP2;
-begin
- GetProcedureAddress(_SetROP2, gdi32, 'SetROP2');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetROP2]
- end;
-end;
-
-var
- _SetStretchBltMode: Pointer;
-
-function SetStretchBltMode;
-begin
- GetProcedureAddress(_SetStretchBltMode, gdi32, 'SetStretchBltMode');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetStretchBltMode]
- end;
-end;
-
-var
- _SetSystemPaletteUse: Pointer;
-
-function SetSystemPaletteUse;
-begin
- GetProcedureAddress(_SetSystemPaletteUse, gdi32, 'SetSystemPaletteUse');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetSystemPaletteUse]
- end;
-end;
-
-var
- _SetTextCharacterExtra: Pointer;
-
-function SetTextCharacterExtra;
-begin
- GetProcedureAddress(_SetTextCharacterExtra, gdi32, 'SetTextCharacterExtra');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetTextCharacterExtra]
- end;
-end;
-
-var
- _SetTextColor: Pointer;
-
-function SetTextColor;
-begin
- GetProcedureAddress(_SetTextColor, gdi32, 'SetTextColor');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetTextColor]
- end;
-end;
-
-var
- _SetTextAlign: Pointer;
-
-function SetTextAlign;
-begin
- GetProcedureAddress(_SetTextAlign, gdi32, 'SetTextAlign');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetTextAlign]
- end;
-end;
-
-var
- _SetTextJustification: Pointer;
-
-function SetTextJustification;
-begin
- GetProcedureAddress(_SetTextJustification, gdi32, 'SetTextJustification');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetTextJustification]
- end;
-end;
-
-var
- _UpdateColors: Pointer;
-
-function UpdateColors;
-begin
- GetProcedureAddress(_UpdateColors, gdi32, 'UpdateColors');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_UpdateColors]
- end;
-end;
-
-var
- _AlphaBlend: Pointer;
-
-function AlphaBlend;
-begin
- GetProcedureAddress(_AlphaBlend, msimg32, 'AlphaBlend');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_AlphaBlend]
- end;
-end;
-
-var
- _TransparentBlt: Pointer;
-
-function TransparentBlt;
-begin
- GetProcedureAddress(_TransparentBlt, msimg32, 'TransparentBlt');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_TransparentBlt]
- end;
-end;
-
-var
- _GradientFill: Pointer;
-
-function GradientFill;
-begin
- GetProcedureAddress(_GradientFill, msimg32, 'GradientFill');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GradientFill]
- end;
-end;
-
-var
- _PlayMetaFileRecord: Pointer;
-
-function PlayMetaFileRecord;
-begin
- GetProcedureAddress(_PlayMetaFileRecord, gdi32, 'PlayMetaFileRecord');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PlayMetaFileRecord]
- end;
-end;
-
-var
- _EnumMetaFile: Pointer;
-
-function EnumMetaFile;
-begin
- GetProcedureAddress(_EnumMetaFile, gdi32, 'EnumMetaFile');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_EnumMetaFile]
- end;
-end;
-
-var
- _CloseEnhMetaFile: Pointer;
-
-function CloseEnhMetaFile;
-begin
- GetProcedureAddress(_CloseEnhMetaFile, gdi32, 'CloseEnhMetaFile');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CloseEnhMetaFile]
- end;
-end;
-
-var
- _CopyEnhMetaFileA: Pointer;
-
-function CopyEnhMetaFileA;
-begin
- GetProcedureAddress(_CopyEnhMetaFileA, gdi32, 'CopyEnhMetaFileA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CopyEnhMetaFileA]
- end;
-end;
-
-var
- _CopyEnhMetaFileW: Pointer;
-
-function CopyEnhMetaFileW;
-begin
- GetProcedureAddress(_CopyEnhMetaFileW, gdi32, 'CopyEnhMetaFileW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CopyEnhMetaFileW]
- end;
-end;
-
-var
- _CopyEnhMetaFile: Pointer;
-
-function CopyEnhMetaFile;
-begin
- GetProcedureAddress(_CopyEnhMetaFile, gdi32, 'CopyEnhMetaFile' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CopyEnhMetaFile]
- end;
-end;
-
-var
- _CreateEnhMetaFileA: Pointer;
-
-function CreateEnhMetaFileA;
-begin
- GetProcedureAddress(_CreateEnhMetaFileA, gdi32, 'CreateEnhMetaFileA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreateEnhMetaFileA]
- end;
-end;
-
-var
- _CreateEnhMetaFileW: Pointer;
-
-function CreateEnhMetaFileW;
-begin
- GetProcedureAddress(_CreateEnhMetaFileW, gdi32, 'CreateEnhMetaFileW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreateEnhMetaFileW]
- end;
-end;
-
-var
- _CreateEnhMetaFile: Pointer;
-
-function CreateEnhMetaFile;
-begin
- GetProcedureAddress(_CreateEnhMetaFile, gdi32, 'CreateEnhMetaFile' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreateEnhMetaFile]
- end;
-end;
-
-var
- _DeleteEnhMetaFile: Pointer;
-
-function DeleteEnhMetaFile;
-begin
- GetProcedureAddress(_DeleteEnhMetaFile, gdi32, 'DeleteEnhMetaFile');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DeleteEnhMetaFile]
- end;
-end;
-
-var
- _EnumEnhMetaFile: Pointer;
-
-function EnumEnhMetaFile;
-begin
- GetProcedureAddress(_EnumEnhMetaFile, gdi32, 'EnumEnhMetaFile');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_EnumEnhMetaFile]
- end;
-end;
-
-var
- _GetEnhMetaFileA: Pointer;
-
-function GetEnhMetaFileA;
-begin
- GetProcedureAddress(_GetEnhMetaFileA, gdi32, 'GetEnhMetaFileA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetEnhMetaFileA]
- end;
-end;
-
-var
- _GetEnhMetaFileW: Pointer;
-
-function GetEnhMetaFileW;
-begin
- GetProcedureAddress(_GetEnhMetaFileW, gdi32, 'GetEnhMetaFileW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetEnhMetaFileW]
- end;
-end;
-
-var
- _GetEnhMetaFile: Pointer;
-
-function GetEnhMetaFile;
-begin
- GetProcedureAddress(_GetEnhMetaFile, gdi32, 'GetEnhMetaFile' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetEnhMetaFile]
- end;
-end;
-
-var
- _GetEnhMetaFileBits: Pointer;
-
-function GetEnhMetaFileBits;
-begin
- GetProcedureAddress(_GetEnhMetaFileBits, gdi32, 'GetEnhMetaFileBits');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetEnhMetaFileBits]
- end;
-end;
-
-var
- _GetEnhMetaFileDescriptionA: Pointer;
-
-function GetEnhMetaFileDescriptionA;
-begin
- GetProcedureAddress(_GetEnhMetaFileDescriptionA, gdi32, 'GetEnhMetaFileDescriptionA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetEnhMetaFileDescriptionA]
- end;
-end;
-
-var
- _GetEnhMetaFileDescriptionW: Pointer;
-
-function GetEnhMetaFileDescriptionW;
-begin
- GetProcedureAddress(_GetEnhMetaFileDescriptionW, gdi32, 'GetEnhMetaFileDescriptionW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetEnhMetaFileDescriptionW]
- end;
-end;
-
-var
- _GetEnhMetaFileDescription: Pointer;
-
-function GetEnhMetaFileDescription;
-begin
- GetProcedureAddress(_GetEnhMetaFileDescription, gdi32, 'GetEnhMetaFileDescription' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetEnhMetaFileDescription]
- end;
-end;
-
-var
- _GetEnhMetaFileHeader: Pointer;
-
-function GetEnhMetaFileHeader;
-begin
- GetProcedureAddress(_GetEnhMetaFileHeader, gdi32, 'GetEnhMetaFileHeader');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetEnhMetaFileHeader]
- end;
-end;
-
-var
- _GetEnhMetaFilePaletteEntries: Pointer;
-
-function GetEnhMetaFilePaletteEntries;
-begin
- GetProcedureAddress(_GetEnhMetaFilePaletteEntries, gdi32, 'GetEnhMetaFilePaletteEntries');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetEnhMetaFilePaletteEntries]
- end;
-end;
-
-var
- _GetEnhMetaFilePixelFormat: Pointer;
-
-function GetEnhMetaFilePixelFormat;
-begin
- GetProcedureAddress(_GetEnhMetaFilePixelFormat, gdi32, 'GetEnhMetaFilePixelFormat');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetEnhMetaFilePixelFormat]
- end;
-end;
-
-var
- _GetWinMetaFileBits: Pointer;
-
-function GetWinMetaFileBits;
-begin
- GetProcedureAddress(_GetWinMetaFileBits, gdi32, 'GetWinMetaFileBits');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetWinMetaFileBits]
- end;
-end;
-
-var
- _PlayEnhMetaFile: Pointer;
-
-function PlayEnhMetaFile;
-begin
- GetProcedureAddress(_PlayEnhMetaFile, gdi32, 'PlayEnhMetaFile');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PlayEnhMetaFile]
- end;
-end;
-
-var
- _PlayEnhMetaFileRecord: Pointer;
-
-function PlayEnhMetaFileRecord;
-begin
- GetProcedureAddress(_PlayEnhMetaFileRecord, gdi32, 'PlayEnhMetaFileRecord');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PlayEnhMetaFileRecord]
- end;
-end;
-
-var
- _SetEnhMetaFileBits: Pointer;
-
-function SetEnhMetaFileBits;
-begin
- GetProcedureAddress(_SetEnhMetaFileBits, gdi32, 'SetEnhMetaFileBits');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetEnhMetaFileBits]
- end;
-end;
-
-var
- _SetWinMetaFileBits: Pointer;
-
-function SetWinMetaFileBits;
-begin
- GetProcedureAddress(_SetWinMetaFileBits, gdi32, 'SetWinMetaFileBits');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetWinMetaFileBits]
- end;
-end;
-
-var
- _GdiComment: Pointer;
-
-function GdiComment;
-begin
- GetProcedureAddress(_GdiComment, gdi32, 'GdiComment');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GdiComment]
- end;
-end;
-
-var
- _GetTextMetricsA: Pointer;
-
-function GetTextMetricsA;
-begin
- GetProcedureAddress(_GetTextMetricsA, gdi32, 'GetTextMetricsA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetTextMetricsA]
- end;
-end;
-
-var
- _GetTextMetricsW: Pointer;
-
-function GetTextMetricsW;
-begin
- GetProcedureAddress(_GetTextMetricsW, gdi32, 'GetTextMetricsW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetTextMetricsW]
- end;
-end;
-
-var
- _GetTextMetrics: Pointer;
-
-function GetTextMetrics;
-begin
- GetProcedureAddress(_GetTextMetrics, gdi32, 'GetTextMetrics' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetTextMetrics]
- end;
-end;
-
-var
- _AngleArc: Pointer;
-
-function AngleArc;
-begin
- GetProcedureAddress(_AngleArc, gdi32, 'AngleArc');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_AngleArc]
- end;
-end;
-
-var
- _PolyPolyline: Pointer;
-
-function PolyPolyline;
-begin
- GetProcedureAddress(_PolyPolyline, gdi32, 'PolyPolyline');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PolyPolyline]
- end;
-end;
-
-var
- _GetWorldTransform: Pointer;
-
-function GetWorldTransform;
-begin
- GetProcedureAddress(_GetWorldTransform, gdi32, 'GetWorldTransform');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetWorldTransform]
- end;
-end;
-
-var
- _SetWorldTransform: Pointer;
-
-function SetWorldTransform;
-begin
- GetProcedureAddress(_SetWorldTransform, gdi32, 'SetWorldTransform');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetWorldTransform]
- end;
-end;
-
-var
- _ModifyWorldTransform: Pointer;
-
-function ModifyWorldTransform;
-begin
- GetProcedureAddress(_ModifyWorldTransform, gdi32, 'ModifyWorldTransform');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ModifyWorldTransform]
- end;
-end;
-
-var
- _CombineTransform: Pointer;
-
-function CombineTransform;
-begin
- GetProcedureAddress(_CombineTransform, gdi32, 'CombineTransform');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CombineTransform]
- end;
-end;
-
-var
- _CreateDIBSection: Pointer;
-
-function CreateDIBSection;
-begin
- GetProcedureAddress(_CreateDIBSection, gdi32, 'CreateDIBSection');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreateDIBSection]
- end;
-end;
-
-var
- _GetDIBColorTable: Pointer;
-
-function GetDIBColorTable;
-begin
- GetProcedureAddress(_GetDIBColorTable, gdi32, 'GetDIBColorTable');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetDIBColorTable]
- end;
-end;
-
-var
- _SetDIBColorTable: Pointer;
-
-function SetDIBColorTable;
-begin
- GetProcedureAddress(_SetDIBColorTable, gdi32, 'SetDIBColorTable');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetDIBColorTable]
- end;
-end;
-
-var
- _SetColorAdjustment: Pointer;
-
-function SetColorAdjustment;
-begin
- GetProcedureAddress(_SetColorAdjustment, gdi32, 'SetColorAdjustment');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetColorAdjustment]
- end;
-end;
-
-var
- _GetColorAdjustment: Pointer;
-
-function GetColorAdjustment;
-begin
- GetProcedureAddress(_GetColorAdjustment, gdi32, 'GetColorAdjustment');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetColorAdjustment]
- end;
-end;
-
-var
- _CreateHalftonePalette: Pointer;
-
-function CreateHalftonePalette;
-begin
- GetProcedureAddress(_CreateHalftonePalette, gdi32, 'CreateHalftonePalette');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreateHalftonePalette]
- end;
-end;
-
-var
- _StartDocA: Pointer;
-
-function StartDocA;
-begin
- GetProcedureAddress(_StartDocA, gdi32, 'StartDocA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_StartDocA]
- end;
-end;
-
-var
- _StartDocW: Pointer;
-
-function StartDocW;
-begin
- GetProcedureAddress(_StartDocW, gdi32, 'StartDocW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_StartDocW]
- end;
-end;
-
-var
- _StartDoc: Pointer;
-
-function StartDoc;
-begin
- GetProcedureAddress(_StartDoc, gdi32, 'StartDoc' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_StartDoc]
- end;
-end;
-
-var
- __EndDoc: Pointer;
-
-function EndDoc;
-begin
- GetProcedureAddress(__EndDoc, gdi32, 'EndDoc');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [__EndDoc]
- end;
-end;
-
-var
- _StartPage: Pointer;
-
-function StartPage;
-begin
- GetProcedureAddress(_StartPage, gdi32, 'StartPage');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_StartPage]
- end;
-end;
-
-var
- _EndPage: Pointer;
-
-function EndPage;
-begin
- GetProcedureAddress(_EndPage, gdi32, 'EndPage');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_EndPage]
- end;
-end;
-
-var
- __AbortDoc: Pointer;
-
-function AbortDoc;
-begin
- GetProcedureAddress(__AbortDoc, gdi32, 'AbortDoc');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [__AbortDoc]
- end;
-end;
-
-var
- _SetAbortProc: Pointer;
-
-function SetAbortProc;
-begin
- GetProcedureAddress(_SetAbortProc, gdi32, 'SetAbortProc');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetAbortProc]
- end;
-end;
-
-var
- _AbortPath: Pointer;
-
-function AbortPath;
-begin
- GetProcedureAddress(_AbortPath, gdi32, 'AbortPath');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_AbortPath]
- end;
-end;
-
-var
- _ArcTo: Pointer;
-
-function ArcTo;
-begin
- GetProcedureAddress(_ArcTo, gdi32, 'ArcTo');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ArcTo]
- end;
-end;
-
-var
- _BeginPath: Pointer;
-
-function BeginPath;
-begin
- GetProcedureAddress(_BeginPath, gdi32, 'BeginPath');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_BeginPath]
- end;
-end;
-
-var
- _CloseFigure: Pointer;
-
-function CloseFigure;
-begin
- GetProcedureAddress(_CloseFigure, gdi32, 'CloseFigure');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CloseFigure]
- end;
-end;
-
-var
- _EndPath: Pointer;
-
-function EndPath;
-begin
- GetProcedureAddress(_EndPath, gdi32, 'EndPath');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_EndPath]
- end;
-end;
-
-var
- _FillPath: Pointer;
-
-function FillPath;
-begin
- GetProcedureAddress(_FillPath, gdi32, 'FillPath');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_FillPath]
- end;
-end;
-
-var
- _FlattenPath: Pointer;
-
-function FlattenPath;
-begin
- GetProcedureAddress(_FlattenPath, gdi32, 'FlattenPath');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_FlattenPath]
- end;
-end;
-
-var
- _GetPath: Pointer;
-
-function GetPath;
-begin
- GetProcedureAddress(_GetPath, gdi32, 'GetPath');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetPath]
- end;
-end;
-
-var
- _PathToRegion: Pointer;
-
-function PathToRegion;
-begin
- GetProcedureAddress(_PathToRegion, gdi32, 'PathToRegion');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PathToRegion]
- end;
-end;
-
-var
- _PolyDraw: Pointer;
-
-function PolyDraw;
-begin
- GetProcedureAddress(_PolyDraw, gdi32, 'PolyDraw');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PolyDraw]
- end;
-end;
-
-var
- _SelectClipPath: Pointer;
-
-function SelectClipPath;
-begin
- GetProcedureAddress(_SelectClipPath, gdi32, 'SelectClipPath');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SelectClipPath]
- end;
-end;
-
-var
- _SetArcDirection: Pointer;
-
-function SetArcDirection;
-begin
- GetProcedureAddress(_SetArcDirection, gdi32, 'SetArcDirection');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetArcDirection]
- end;
-end;
-
-var
- _SetMiterLimit: Pointer;
-
-function SetMiterLimit;
-begin
- GetProcedureAddress(_SetMiterLimit, gdi32, 'SetMiterLimit');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetMiterLimit]
- end;
-end;
-
-var
- _StrokeAndFillPath: Pointer;
-
-function StrokeAndFillPath;
-begin
- GetProcedureAddress(_StrokeAndFillPath, gdi32, 'StrokeAndFillPath');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_StrokeAndFillPath]
- end;
-end;
-
-var
- _StrokePath: Pointer;
-
-function StrokePath;
-begin
- GetProcedureAddress(_StrokePath, gdi32, 'StrokePath');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_StrokePath]
- end;
-end;
-
-var
- _WidenPath: Pointer;
-
-function WidenPath;
-begin
- GetProcedureAddress(_WidenPath, gdi32, 'WidenPath');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WidenPath]
- end;
-end;
-
-var
- _ExtCreatePen: Pointer;
-
-function ExtCreatePen;
-begin
- GetProcedureAddress(_ExtCreatePen, gdi32, 'ExtCreatePen');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ExtCreatePen]
- end;
-end;
-
-var
- _GetMiterLimit: Pointer;
-
-function GetMiterLimit;
-begin
- GetProcedureAddress(_GetMiterLimit, gdi32, 'GetMiterLimit');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetMiterLimit]
- end;
-end;
-
-var
- _GetArcDirection: Pointer;
-
-function GetArcDirection;
-begin
- GetProcedureAddress(_GetArcDirection, gdi32, 'GetArcDirection');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetArcDirection]
- end;
-end;
-
-var
- _GetObjectA: Pointer;
-
-function GetObjectA;
-begin
- GetProcedureAddress(_GetObjectA, gdi32, 'GetObjectA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetObjectA]
- end;
-end;
-
-var
- _GetObjectW: Pointer;
-
-function GetObjectW;
-begin
- GetProcedureAddress(_GetObjectW, gdi32, 'GetObjectW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetObjectW]
- end;
-end;
-
-var
- _GetObject: Pointer;
-
-function GetObject;
-begin
- GetProcedureAddress(_GetObject, gdi32, 'GetObject' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetObject]
- end;
-end;
-
-var
- _MoveToEx: Pointer;
-
-function MoveToEx;
-begin
- GetProcedureAddress(_MoveToEx, gdi32, 'MoveToEx');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MoveToEx]
- end;
-end;
-
-var
- _TextOutA: Pointer;
-
-function TextOutA;
-begin
- GetProcedureAddress(_TextOutA, gdi32, 'TextOutA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_TextOutA]
- end;
-end;
-
-var
- _TextOutW: Pointer;
-
-function TextOutW;
-begin
- GetProcedureAddress(_TextOutW, gdi32, 'TextOutW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_TextOutW]
- end;
-end;
-
-var
- _TextOut: Pointer;
-
-function TextOut;
-begin
- GetProcedureAddress(_TextOut, gdi32, 'TextOut' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_TextOut]
- end;
-end;
-
-var
- _ExtTextOutA: Pointer;
-
-function ExtTextOutA;
-begin
- GetProcedureAddress(_ExtTextOutA, gdi32, 'ExtTextOutA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ExtTextOutA]
- end;
-end;
-
-var
- _ExtTextOutW: Pointer;
-
-function ExtTextOutW;
-begin
- GetProcedureAddress(_ExtTextOutW, gdi32, 'ExtTextOutW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ExtTextOutW]
- end;
-end;
-
-var
- _ExtTextOut: Pointer;
-
-function ExtTextOut;
-begin
- GetProcedureAddress(_ExtTextOut, gdi32, 'ExtTextOut' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ExtTextOut]
- end;
-end;
-
-var
- _PolyTextOutA: Pointer;
-
-function PolyTextOutA;
-begin
- GetProcedureAddress(_PolyTextOutA, gdi32, 'PolyTextOutA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PolyTextOutA]
- end;
-end;
-
-var
- _PolyTextOutW: Pointer;
-
-function PolyTextOutW;
-begin
- GetProcedureAddress(_PolyTextOutW, gdi32, 'PolyTextOutW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PolyTextOutW]
- end;
-end;
-
-var
- _PolyTextOut: Pointer;
-
-function PolyTextOut;
-begin
- GetProcedureAddress(_PolyTextOut, gdi32, 'PolyTextOut' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PolyTextOut]
- end;
-end;
-
-var
- _CreatePolygonRgn: Pointer;
-
-function CreatePolygonRgn;
-begin
- GetProcedureAddress(_CreatePolygonRgn, gdi32, 'CreatePolygonRgn');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreatePolygonRgn]
- end;
-end;
-
-var
- _DPtoLP: Pointer;
-
-function DPtoLP;
-begin
- GetProcedureAddress(_DPtoLP, gdi32, 'DPtoLP');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DPtoLP]
- end;
-end;
-
-var
- _LPtoDP: Pointer;
-
-function LPtoDP;
-begin
- GetProcedureAddress(_LPtoDP, gdi32, 'LPtoDP');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_LPtoDP]
- end;
-end;
-
-var
- _Polygon: Pointer;
-
-function Polygon;
-begin
- GetProcedureAddress(_Polygon, gdi32, 'Polygon');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_Polygon]
- end;
-end;
-
-var
- _Polyline: Pointer;
-
-function Polyline;
-begin
- GetProcedureAddress(_Polyline, gdi32, 'Polyline');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_Polyline]
- end;
-end;
-
-var
- _PolyBezier: Pointer;
-
-function PolyBezier;
-begin
- GetProcedureAddress(_PolyBezier, gdi32, 'PolyBezier');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PolyBezier]
- end;
-end;
-
-var
- _PolyBezierTo: Pointer;
-
-function PolyBezierTo;
-begin
- GetProcedureAddress(_PolyBezierTo, gdi32, 'PolyBezierTo');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PolyBezierTo]
- end;
-end;
-
-var
- _PolylineTo: Pointer;
-
-function PolylineTo;
-begin
- GetProcedureAddress(_PolylineTo, gdi32, 'PolylineTo');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PolylineTo]
- end;
-end;
-
-var
- _SetViewportExtEx: Pointer;
-
-function SetViewportExtEx;
-begin
- GetProcedureAddress(_SetViewportExtEx, gdi32, 'SetViewportExtEx');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetViewportExtEx]
- end;
-end;
-
-var
- _SetViewportOrgEx: Pointer;
-
-function SetViewportOrgEx;
-begin
- GetProcedureAddress(_SetViewportOrgEx, gdi32, 'SetViewportOrgEx');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetViewportOrgEx]
- end;
-end;
-
-var
- _SetWindowExtEx: Pointer;
-
-function SetWindowExtEx;
-begin
- GetProcedureAddress(_SetWindowExtEx, gdi32, 'SetWindowExtEx');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetWindowExtEx]
- end;
-end;
-
-var
- _SetWindowOrgEx: Pointer;
-
-function SetWindowOrgEx;
-begin
- GetProcedureAddress(_SetWindowOrgEx, gdi32, 'SetWindowOrgEx');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetWindowOrgEx]
- end;
-end;
-
-var
- _OffsetViewportOrgEx: Pointer;
-
-function OffsetViewportOrgEx;
-begin
- GetProcedureAddress(_OffsetViewportOrgEx, gdi32, 'OffsetViewportOrgEx');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_OffsetViewportOrgEx]
- end;
-end;
-
-var
- _OffsetWindowOrgEx: Pointer;
-
-function OffsetWindowOrgEx;
-begin
- GetProcedureAddress(_OffsetWindowOrgEx, gdi32, 'OffsetWindowOrgEx');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_OffsetWindowOrgEx]
- end;
-end;
-
-var
- _ScaleViewportExtEx: Pointer;
-
-function ScaleViewportExtEx;
-begin
- GetProcedureAddress(_ScaleViewportExtEx, gdi32, 'ScaleViewportExtEx');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ScaleViewportExtEx]
- end;
-end;
-
-var
- _ScaleWindowExtEx: Pointer;
-
-function ScaleWindowExtEx;
-begin
- GetProcedureAddress(_ScaleWindowExtEx, gdi32, 'ScaleWindowExtEx');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ScaleWindowExtEx]
- end;
-end;
-
-var
- _SetBitmapDimensionEx: Pointer;
-
-function SetBitmapDimensionEx;
-begin
- GetProcedureAddress(_SetBitmapDimensionEx, gdi32, 'SetBitmapDimensionEx');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetBitmapDimensionEx]
- end;
-end;
-
-var
- _SetBrushOrgEx: Pointer;
-
-function SetBrushOrgEx;
-begin
- GetProcedureAddress(_SetBrushOrgEx, gdi32, 'SetBrushOrgEx');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetBrushOrgEx]
- end;
-end;
-
-var
- _GetTextFaceA: Pointer;
-
-function GetTextFaceA;
-begin
- GetProcedureAddress(_GetTextFaceA, gdi32, 'GetTextFaceA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetTextFaceA]
- end;
-end;
-
-var
- _GetTextFaceW: Pointer;
-
-function GetTextFaceW;
-begin
- GetProcedureAddress(_GetTextFaceW, gdi32, 'GetTextFaceW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetTextFaceW]
- end;
-end;
-
-var
- _GetTextFace: Pointer;
-
-function GetTextFace;
-begin
- GetProcedureAddress(_GetTextFace, gdi32, 'GetTextFace' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetTextFace]
- end;
-end;
-
-var
- _GetKerningPairsA: Pointer;
-
-function GetKerningPairsA;
-begin
- GetProcedureAddress(_GetKerningPairsA, gdi32, 'GetKerningPairsA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetKerningPairsA]
- end;
-end;
-
-var
- _GetKerningPairsW: Pointer;
-
-function GetKerningPairsW;
-begin
- GetProcedureAddress(_GetKerningPairsW, gdi32, 'GetKerningPairsW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetKerningPairsW]
- end;
-end;
-
-var
- _GetKerningPairs: Pointer;
-
-function GetKerningPairs;
-begin
- GetProcedureAddress(_GetKerningPairs, gdi32, 'GetKerningPairs' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetKerningPairs]
- end;
-end;
-
-var
- _GetDCOrgEx: Pointer;
-
-function GetDCOrgEx;
-begin
- GetProcedureAddress(_GetDCOrgEx, gdi32, 'GetDCOrgEx');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetDCOrgEx]
- end;
-end;
-
-var
- _FixBrushOrgEx: Pointer;
-
-function FixBrushOrgEx;
-begin
- GetProcedureAddress(_FixBrushOrgEx, gdi32, 'FixBrushOrgEx');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_FixBrushOrgEx]
- end;
-end;
-
-var
- _UnrealizeObject: Pointer;
-
-function UnrealizeObject;
-begin
- GetProcedureAddress(_UnrealizeObject, gdi32, 'UnrealizeObject');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_UnrealizeObject]
- end;
-end;
-
-var
- _GdiFlush: Pointer;
-
-function GdiFlush;
-begin
- GetProcedureAddress(_GdiFlush, gdi32, 'GdiFlush');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GdiFlush]
- end;
-end;
-
-var
- _GdiSetBatchLimit: Pointer;
-
-function GdiSetBatchLimit;
-begin
- GetProcedureAddress(_GdiSetBatchLimit, gdi32, 'GdiSetBatchLimit');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GdiSetBatchLimit]
- end;
-end;
-
-var
- _GdiGetBatchLimit: Pointer;
-
-function GdiGetBatchLimit;
-begin
- GetProcedureAddress(_GdiGetBatchLimit, gdi32, 'GdiGetBatchLimit');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GdiGetBatchLimit]
- end;
-end;
-
-var
- _SetICMMode: Pointer;
-
-function SetICMMode;
-begin
- GetProcedureAddress(_SetICMMode, gdi32, 'SetICMMode');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetICMMode]
- end;
-end;
-
-var
- _CheckColorsInGamut: Pointer;
-
-function CheckColorsInGamut;
-begin
- GetProcedureAddress(_CheckColorsInGamut, gdi32, 'CheckColorsInGamut');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CheckColorsInGamut]
- end;
-end;
-
-var
- _GetColorSpace: Pointer;
-
-function GetColorSpace;
-begin
- GetProcedureAddress(_GetColorSpace, gdi32, 'GetColorSpace');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetColorSpace]
- end;
-end;
-
-var
- _GetLogColorSpaceA: Pointer;
-
-function GetLogColorSpaceA;
-begin
- GetProcedureAddress(_GetLogColorSpaceA, gdi32, 'GetLogColorSpaceA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetLogColorSpaceA]
- end;
-end;
-
-var
- _GetLogColorSpaceW: Pointer;
-
-function GetLogColorSpaceW;
-begin
- GetProcedureAddress(_GetLogColorSpaceW, gdi32, 'GetLogColorSpaceW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetLogColorSpaceW]
- end;
-end;
-
-var
- _GetLogColorSpace: Pointer;
-
-function GetLogColorSpace;
-begin
- GetProcedureAddress(_GetLogColorSpace, gdi32, 'GetLogColorSpace' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetLogColorSpace]
- end;
-end;
-
-var
- _CreateColorSpaceA: Pointer;
-
-function CreateColorSpaceA;
-begin
- GetProcedureAddress(_CreateColorSpaceA, gdi32, 'CreateColorSpaceA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreateColorSpaceA]
- end;
-end;
-
-var
- _CreateColorSpaceW: Pointer;
-
-function CreateColorSpaceW;
-begin
- GetProcedureAddress(_CreateColorSpaceW, gdi32, 'CreateColorSpaceW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreateColorSpaceW]
- end;
-end;
-
-var
- _CreateColorSpace: Pointer;
-
-function CreateColorSpace;
-begin
- GetProcedureAddress(_CreateColorSpace, gdi32, 'CreateColorSpace' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreateColorSpace]
- end;
-end;
-
-var
- _SetColorSpace: Pointer;
-
-function SetColorSpace;
-begin
- GetProcedureAddress(_SetColorSpace, gdi32, 'SetColorSpace');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetColorSpace]
- end;
-end;
-
-var
- _DeleteColorSpace: Pointer;
-
-function DeleteColorSpace;
-begin
- GetProcedureAddress(_DeleteColorSpace, gdi32, 'DeleteColorSpace');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DeleteColorSpace]
- end;
-end;
-
-var
- _GetICMProfileA: Pointer;
-
-function GetICMProfileA;
-begin
- GetProcedureAddress(_GetICMProfileA, gdi32, 'GetICMProfileA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetICMProfileA]
- end;
-end;
-
-var
- _GetICMProfileW: Pointer;
-
-function GetICMProfileW;
-begin
- GetProcedureAddress(_GetICMProfileW, gdi32, 'GetICMProfileW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetICMProfileW]
- end;
-end;
-
-var
- _GetICMProfile: Pointer;
-
-function GetICMProfile;
-begin
- GetProcedureAddress(_GetICMProfile, gdi32, 'GetICMProfile' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetICMProfile]
- end;
-end;
-
-var
- _SetICMProfileA: Pointer;
-
-function SetICMProfileA;
-begin
- GetProcedureAddress(_SetICMProfileA, gdi32, 'SetICMProfileA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetICMProfileA]
- end;
-end;
-
-var
- _SetICMProfileW: Pointer;
-
-function SetICMProfileW;
-begin
- GetProcedureAddress(_SetICMProfileW, gdi32, 'SetICMProfileW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetICMProfileW]
- end;
-end;
-
-var
- _SetICMProfile: Pointer;
-
-function SetICMProfile;
-begin
- GetProcedureAddress(_SetICMProfile, gdi32, 'SetICMProfile' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetICMProfile]
- end;
-end;
-
-var
- _GetDeviceGammaRamp: Pointer;
-
-function GetDeviceGammaRamp;
-begin
- GetProcedureAddress(_GetDeviceGammaRamp, gdi32, 'GetDeviceGammaRamp');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetDeviceGammaRamp]
- end;
-end;
-
-var
- _SetDeviceGammaRamp: Pointer;
-
-function SetDeviceGammaRamp;
-begin
- GetProcedureAddress(_SetDeviceGammaRamp, gdi32, 'SetDeviceGammaRamp');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetDeviceGammaRamp]
- end;
-end;
-
-var
- _ColorMatchToTarget: Pointer;
-
-function ColorMatchToTarget;
-begin
- GetProcedureAddress(_ColorMatchToTarget, gdi32, 'ColorMatchToTarget');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ColorMatchToTarget]
- end;
-end;
-
-var
- _EnumICMProfilesA: Pointer;
-
-function EnumICMProfilesA;
-begin
- GetProcedureAddress(_EnumICMProfilesA, gdi32, 'EnumICMProfilesA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_EnumICMProfilesA]
- end;
-end;
-
-var
- _EnumICMProfilesW: Pointer;
-
-function EnumICMProfilesW;
-begin
- GetProcedureAddress(_EnumICMProfilesW, gdi32, 'EnumICMProfilesW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_EnumICMProfilesW]
- end;
-end;
-
-var
- _EnumICMProfiles: Pointer;
-
-function EnumICMProfiles;
-begin
- GetProcedureAddress(_EnumICMProfiles, gdi32, 'EnumICMProfiles' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_EnumICMProfiles]
- end;
-end;
-
-var
- _UpdateICMRegKeyA: Pointer;
-
-function UpdateICMRegKeyA;
-begin
- GetProcedureAddress(_UpdateICMRegKeyA, gdi32, 'UpdateICMRegKeyA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_UpdateICMRegKeyA]
- end;
-end;
-
-var
- _UpdateICMRegKeyW: Pointer;
-
-function UpdateICMRegKeyW;
-begin
- GetProcedureAddress(_UpdateICMRegKeyW, gdi32, 'UpdateICMRegKeyW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_UpdateICMRegKeyW]
- end;
-end;
-
-var
- _UpdateICMRegKey: Pointer;
-
-function UpdateICMRegKey;
-begin
- GetProcedureAddress(_UpdateICMRegKey, gdi32, 'UpdateICMRegKey' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_UpdateICMRegKey]
- end;
-end;
-
-var
- _ColorCorrectPalette: Pointer;
-
-function ColorCorrectPalette;
-begin
- GetProcedureAddress(_ColorCorrectPalette, gdi32, 'ColorCorrectPalette');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ColorCorrectPalette]
- end;
-end;
-
-var
- _wglCopyContext: Pointer;
-
-function wglCopyContext;
-begin
- GetProcedureAddress(_wglCopyContext, opengl32, 'wglCopyContext');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_wglCopyContext]
- end;
-end;
-
-var
- _wglCreateContext: Pointer;
-
-function wglCreateContext;
-begin
- GetProcedureAddress(_wglCreateContext, opengl32, 'wglCreateContext');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_wglCreateContext]
- end;
-end;
-
-var
- _wglCreateLayerContext: Pointer;
-
-function wglCreateLayerContext;
-begin
- GetProcedureAddress(_wglCreateLayerContext, opengl32, 'wglCreateLayerContext');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_wglCreateLayerContext]
- end;
-end;
-
-var
- _wglDeleteContext: Pointer;
-
-function wglDeleteContext;
-begin
- GetProcedureAddress(_wglDeleteContext, opengl32, 'wglDeleteContext');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_wglDeleteContext]
- end;
-end;
-
-var
- _wglGetCurrentContext: Pointer;
-
-function wglGetCurrentContext;
-begin
- GetProcedureAddress(_wglGetCurrentContext, opengl32, 'wglGetCurrentContext');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_wglGetCurrentContext]
- end;
-end;
-
-var
- _wglGetCurrentDC: Pointer;
-
-function wglGetCurrentDC;
-begin
- GetProcedureAddress(_wglGetCurrentDC, opengl32, 'wglGetCurrentDC');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_wglGetCurrentDC]
- end;
-end;
-
-var
- _wglGetProcAddress: Pointer;
-
-function wglGetProcAddress;
-begin
- GetProcedureAddress(_wglGetProcAddress, opengl32, 'wglGetProcAddress');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_wglGetProcAddress]
- end;
-end;
-
-var
- _wglMakeCurrent: Pointer;
-
-function wglMakeCurrent;
-begin
- GetProcedureAddress(_wglMakeCurrent, opengl32, 'wglMakeCurrent');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_wglMakeCurrent]
- end;
-end;
-
-var
- _wglShareLists: Pointer;
-
-function wglShareLists;
-begin
- GetProcedureAddress(_wglShareLists, opengl32, 'wglShareLists');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_wglShareLists]
- end;
-end;
-
-var
- _wglUseFontBitmapsA: Pointer;
-
-function wglUseFontBitmapsA;
-begin
- GetProcedureAddress(_wglUseFontBitmapsA, opengl32, 'wglUseFontBitmapsA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_wglUseFontBitmapsA]
- end;
-end;
-
-var
- _wglUseFontBitmapsW: Pointer;
-
-function wglUseFontBitmapsW;
-begin
- GetProcedureAddress(_wglUseFontBitmapsW, opengl32, 'wglUseFontBitmapsW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_wglUseFontBitmapsW]
- end;
-end;
-
-var
- _wglUseFontBitmaps: Pointer;
-
-function wglUseFontBitmaps;
-begin
- GetProcedureAddress(_wglUseFontBitmaps, opengl32, 'wglUseFontBitmaps' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_wglUseFontBitmaps]
- end;
-end;
-
-var
- _SwapBuffers: Pointer;
-
-function SwapBuffers;
-begin
- GetProcedureAddress(_SwapBuffers, opengl32, 'SwapBuffers');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SwapBuffers]
- end;
-end;
-
-var
- _wglUseFontOutlinesA: Pointer;
-
-function wglUseFontOutlinesA;
-begin
- GetProcedureAddress(_wglUseFontOutlinesA, opengl32, 'wglUseFontOutlinesA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_wglUseFontOutlinesA]
- end;
-end;
-
-var
- _wglUseFontOutlinesW: Pointer;
-
-function wglUseFontOutlinesW;
-begin
- GetProcedureAddress(_wglUseFontOutlinesW, opengl32, 'wglUseFontOutlinesW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_wglUseFontOutlinesW]
- end;
-end;
-
-var
- _wglUseFontOutlines: Pointer;
-
-function wglUseFontOutlines;
-begin
- GetProcedureAddress(_wglUseFontOutlines, opengl32, 'wglUseFontOutlines' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_wglUseFontOutlines]
- end;
-end;
-
-var
- _wglDescribeLayerPlane: Pointer;
-
-function wglDescribeLayerPlane;
-begin
- GetProcedureAddress(_wglDescribeLayerPlane, opengl32, 'wglDescribeLayerPlane');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_wglDescribeLayerPlane]
- end;
-end;
-
-var
- _wglSetLayerPaletteEntries: Pointer;
-
-function wglSetLayerPaletteEntries;
-begin
- GetProcedureAddress(_wglSetLayerPaletteEntries, opengl32, 'wglSetLayerPaletteEntries');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_wglSetLayerPaletteEntries]
- end;
-end;
-
-var
- _wglGetLayerPaletteEntries: Pointer;
-
-function wglGetLayerPaletteEntries;
-begin
- GetProcedureAddress(_wglGetLayerPaletteEntries, opengl32, 'wglGetLayerPaletteEntries');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_wglGetLayerPaletteEntries]
- end;
-end;
-
-var
- _wglRealizeLayerPalette: Pointer;
-
-function wglRealizeLayerPalette;
-begin
- GetProcedureAddress(_wglRealizeLayerPalette, opengl32, 'wglRealizeLayerPalette');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_wglRealizeLayerPalette]
- end;
-end;
-
-var
- _wglSwapLayerBuffers: Pointer;
-
-function wglSwapLayerBuffers;
-begin
- GetProcedureAddress(_wglSwapLayerBuffers, opengl32, 'wglSwapLayerBuffers');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_wglSwapLayerBuffers]
- end;
-end;
-
-var
- _wglSwapMultipleBuffers: Pointer;
-
-function wglSwapMultipleBuffers;
-begin
- GetProcedureAddress(_wglSwapMultipleBuffers, opengl32, 'wglSwapMultipleBuffers');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_wglSwapMultipleBuffers]
- end;
-end;
-
-{$ELSE}
-
-function AddFontResourceA; external gdi32 name 'AddFontResourceA';
-function AddFontResourceW; external gdi32 name 'AddFontResourceW';
-function AddFontResource; external gdi32 name 'AddFontResource' + AWSuffix;
-function AnimatePalette; external gdi32 name 'AnimatePalette';
-function Arc; external gdi32 name 'Arc';
-function BitBlt; external gdi32 name 'BitBlt';
-function CancelDC; external gdi32 name 'CancelDC';
-function Chord; external gdi32 name 'Chord';
-function ChoosePixelFormat; external gdi32 name 'ChoosePixelFormat';
-function CloseMetaFile; external gdi32 name 'CloseMetaFile';
-function CombineRgn; external gdi32 name 'CombineRgn';
-function CopyMetaFileA; external gdi32 name 'CopyMetaFileA';
-function CopyMetaFileW; external gdi32 name 'CopyMetaFileW';
-function CopyMetaFile; external gdi32 name 'CopyMetaFile' + AWSuffix;
-function CreateBitmap; external gdi32 name 'CreateBitmap';
-function CreateBitmapIndirect; external gdi32 name 'CreateBitmapIndirect';
-function CreateBrushIndirect; external gdi32 name 'CreateBrushIndirect';
-function CreateCompatibleBitmap; external gdi32 name 'CreateCompatibleBitmap';
-function CreateDiscardableBitmap; external gdi32 name 'CreateDiscardableBitmap';
-function CreateCompatibleDC; external gdi32 name 'CreateCompatibleDC';
-function CreateDCA; external gdi32 name 'CreateDCA';
-function CreateDCW; external gdi32 name 'CreateDCW';
-function CreateDC; external gdi32 name 'CreateDC' + AWSuffix;
-function CreateDIBitmap; external gdi32 name 'CreateDIBitmap';
-function CreateDIBPatternBrush; external gdi32 name 'CreateDIBPatternBrush';
-function CreateDIBPatternBrushPt; external gdi32 name 'CreateDIBPatternBrushPt';
-function CreateEllipticRgn; external gdi32 name 'CreateEllipticRgn';
-function CreateEllipticRgnIndirect; external gdi32 name 'CreateEllipticRgnIndirect';
-function CreateFontIndirectA; external gdi32 name 'CreateFontIndirectA';
-function CreateFontIndirectW; external gdi32 name 'CreateFontIndirectW';
-function CreateFontIndirect; external gdi32 name 'CreateFontIndirect' + AWSuffix;
-function CreateFontA; external gdi32 name 'CreateFontA';
-function CreateFontW; external gdi32 name 'CreateFontW';
-function CreateFont; external gdi32 name 'CreateFont' + AWSuffix;
-function CreateHatchBrush; external gdi32 name 'CreateHatchBrush';
-function CreateICA; external gdi32 name 'CreateICA';
-function CreateICW; external gdi32 name 'CreateICW';
-function CreateIC; external gdi32 name 'CreateIC' + AWSuffix;
-function CreateMetaFileA; external gdi32 name 'CreateMetaFileA';
-function CreateMetaFileW; external gdi32 name 'CreateMetaFileW';
-function CreateMetaFile; external gdi32 name 'CreateMetaFile' + AWSuffix;
-function CreatePalette; external gdi32 name 'CreatePalette';
-function CreatePen; external gdi32 name 'CreatePen';
-function CreatePenIndirect; external gdi32 name 'CreatePenIndirect';
-function CreatePolyPolygonRgn; external gdi32 name 'CreatePolyPolygonRgn';
-function CreatePatternBrush; external gdi32 name 'CreatePatternBrush';
-function CreateRectRgn; external gdi32 name 'CreateRectRgn';
-function CreateRectRgnIndirect; external gdi32 name 'CreateRectRgnIndirect';
-function CreateRoundRectRgn; external gdi32 name 'CreateRoundRectRgn';
-function CreateScalableFontResourceA; external gdi32 name 'CreateScalableFontResourceA';
-function CreateScalableFontResourceW; external gdi32 name 'CreateScalableFontResourceW';
-function CreateScalableFontResource; external gdi32 name 'CreateScalableFontResource' + AWSuffix;
-function CreateSolidBrush; external gdi32 name 'CreateSolidBrush';
-function DeleteDC; external gdi32 name 'DeleteDC';
-function DeleteMetaFile; external gdi32 name 'DeleteMetaFile';
-function DeleteObject; external gdi32 name 'DeleteObject';
-function DescribePixelFormat; external gdi32 name 'DescribePixelFormat';
-function DeviceCapabilitiesA; external winspool32 name 'DeviceCapabilitiesA';
-function DeviceCapabilitiesW; external winspool32 name 'DeviceCapabilitiesW';
-function DeviceCapabilities; external winspool32 name 'DeviceCapabilities' + AWSuffix;
-function DrawEscape; external gdi32 name 'DrawEscape';
-function Ellipse; external gdi32 name 'Ellipse';
-function EnumFontFamiliesExA; external gdi32 name 'EnumFontFamiliesExA';
-function EnumFontFamiliesExW; external gdi32 name 'EnumFontFamiliesExW';
-function EnumFontFamiliesEx; external gdi32 name 'EnumFontFamiliesEx' + AWSuffix;
-function EnumFontFamiliesA; external gdi32 name 'EnumFontFamiliesA';
-function EnumFontFamiliesW; external gdi32 name 'EnumFontFamiliesW';
-function EnumFontFamilies; external gdi32 name 'EnumFontFamilies' + AWSuffix;
-function EnumFontsA; external gdi32 name 'EnumFontsA';
-function EnumFontsW; external gdi32 name 'EnumFontsW';
-function EnumFonts; external gdi32 name 'EnumFonts' + AWSuffix;
-function EnumObjects; external gdi32 name 'EnumObjects';
-function EqualRgn; external gdi32 name 'EqualRgn';
-function Escape; external gdi32 name 'Escape';
-function ExtEscape; external gdi32 name 'ExtEscape';
-function ExcludeClipRect; external gdi32 name 'ExcludeClipRect';
-function ExtCreateRegion; external gdi32 name 'ExtCreateRegion';
-function ExtFloodFill; external gdi32 name 'ExtFloodFill';
-function FillRgn; external gdi32 name 'FillRgn';
-function FloodFill; external gdi32 name 'FloodFill';
-function FrameRgn; external gdi32 name 'FrameRgn';
-function GetROP2; external gdi32 name 'GetROP2';
-function GetAspectRatioFilterEx; external gdi32 name 'GetAspectRatioFilterEx';
-function GetBkColor; external gdi32 name 'GetBkColor';
-function GetDCBrushColor; external gdi32 name 'GetDCBrushColor';
-function GetDCPenColor; external gdi32 name 'GetDCPenColor';
-function GetBkMode; external gdi32 name 'GetBkMode';
-function GetBitmapBits; external gdi32 name 'GetBitmapBits';
-function GetBitmapDimensionEx; external gdi32 name 'GetBitmapDimensionEx';
-function GetBoundsRect; external gdi32 name 'GetBoundsRect';
-function GetBrushOrgEx; external gdi32 name 'GetBrushOrgEx';
-function GetCharWidthA; external gdi32 name 'GetCharWidthA';
-function GetCharWidthW; external gdi32 name 'GetCharWidthW';
-function GetCharWidth; external gdi32 name 'GetCharWidth' + AWSuffix;
-function GetCharWidth32A; external gdi32 name 'GetCharWidth32A';
-function GetCharWidth32W; external gdi32 name 'GetCharWidth32W';
-function GetCharWidth32; external gdi32 name 'GetCharWidth32' + AWSuffix;
-function GetCharWidthFloatA; external gdi32 name 'GetCharWidthFloatA';
-function GetCharWidthFloatW; external gdi32 name 'GetCharWidthFloatW';
-function GetCharWidthFloat; external gdi32 name 'GetCharWidthFloat' + AWSuffix;
-function GetCharABCWidthsA; external gdi32 name 'GetCharABCWidthsA';
-function GetCharABCWidthsW; external gdi32 name 'GetCharABCWidthsW';
-function GetCharABCWidths; external gdi32 name 'GetCharABCWidths' + AWSuffix;
-function GetCharABCWidthsFloatA; external gdi32 name 'GetCharABCWidthsFloatA';
-function GetCharABCWidthsFloatW; external gdi32 name 'GetCharABCWidthsFloatW';
-function GetCharABCWidthsFloat; external gdi32 name 'GetCharABCWidthsFloat' + AWSuffix;
-function GetClipBox; external gdi32 name 'GetClipBox';
-function GetClipRgn; external gdi32 name 'GetClipRgn';
-function GetMetaRgn; external gdi32 name 'GetMetaRgn';
-function GetCurrentObject; external gdi32 name 'GetCurrentObject';
-function GetCurrentPositionEx; external gdi32 name 'GetCurrentPositionEx';
-function GetDeviceCaps; external gdi32 name 'GetDeviceCaps';
-function GetDIBits; external gdi32 name 'GetDIBits';
-function GetFontData; external gdi32 name 'GetFontData';
-function GetGlyphOutlineA; external gdi32 name 'GetGlyphOutlineA';
-function GetGlyphOutlineW; external gdi32 name 'GetGlyphOutlineW';
-function GetGlyphOutline; external gdi32 name 'GetGlyphOutline' + AWSuffix;
-function GetGraphicsMode; external gdi32 name 'GetGraphicsMode';
-function GetMapMode; external gdi32 name 'GetMapMode';
-function GetMetaFileBitsEx; external gdi32 name 'GetMetaFileBitsEx';
-function GetMetaFileA; external gdi32 name 'GetMetaFileA';
-function GetMetaFileW; external gdi32 name 'GetMetaFileW';
-function GetMetaFile; external gdi32 name 'GetMetaFile' + AWSuffix;
-function GetNearestColor; external gdi32 name 'GetNearestColor';
-function GetNearestPaletteIndex; external gdi32 name 'GetNearestPaletteIndex';
-function GetObjectType; external gdi32 name 'GetObjectType';
-function GetOutlineTextMetricsA; external gdi32 name 'GetOutlineTextMetricsA';
-function GetOutlineTextMetricsW; external gdi32 name 'GetOutlineTextMetricsW';
-function GetOutlineTextMetrics; external gdi32 name 'GetOutlineTextMetrics' + AWSuffix;
-function GetPaletteEntries; external gdi32 name 'GetPaletteEntries';
-function GetPixel; external gdi32 name 'GetPixel';
-function GetPixelFormat; external gdi32 name 'GetPixelFormat';
-function GetPolyFillMode; external gdi32 name 'GetPolyFillMode';
-function GetRasterizerCaps; external gdi32 name 'GetRasterizerCaps';
-function GetRandomRgn; external gdi32 name 'GetRandomRgn';
-function GetRegionData; external gdi32 name 'GetRegionData';
-function GetRgnBox; external gdi32 name 'GetRgnBox';
-function GetStockObject; external gdi32 name 'GetStockObject';
-function GetStretchBltMode; external gdi32 name 'GetStretchBltMode';
-function GetSystemPaletteEntries; external gdi32 name 'GetSystemPaletteEntries';
-function GetSystemPaletteUse; external gdi32 name 'GetSystemPaletteUse';
-function GetTextCharacterExtra; external gdi32 name 'GetTextCharacterExtra';
-function GetTextAlign; external gdi32 name 'GetTextAlign';
-function GetTextColor; external gdi32 name 'GetTextColor';
-function GetTextExtentPointA; external gdi32 name 'GetTextExtentPointA';
-function GetTextExtentPointW; external gdi32 name 'GetTextExtentPointW';
-function GetTextExtentPoint; external gdi32 name 'GetTextExtentPoint' + AWSuffix;
-function GetTextExtentPoint32A; external gdi32 name 'GetTextExtentPoint32A';
-function GetTextExtentPoint32W; external gdi32 name 'GetTextExtentPoint32W';
-function GetTextExtentPoint32; external gdi32 name 'GetTextExtentPoint32' + AWSuffix;
-function GetTextExtentExPointA; external gdi32 name 'GetTextExtentExPointA';
-function GetTextExtentExPointW; external gdi32 name 'GetTextExtentExPointW';
-function GetTextExtentExPoint; external gdi32 name 'GetTextExtentExPoint' + AWSuffix;
-function GetTextCharset; external gdi32 name 'GetTextCharset';
-function GetTextCharsetInfo; external gdi32 name 'GetTextCharsetInfo';
-function TranslateCharsetInfo; external gdi32 name 'TranslateCharsetInfo';
-function GetFontLanguageInfo; external gdi32 name 'GetFontLanguageInfo';
-function GetCharacterPlacementA; external gdi32 name 'GetCharacterPlacementA';
-function GetCharacterPlacementW; external gdi32 name 'GetCharacterPlacementW';
-function GetCharacterPlacement; external gdi32 name 'GetCharacterPlacement' + AWSuffix;
-function GetFontUnicodeRanges; external gdi32 name 'GetFontUnicodeRanges';
-function GetGlyphIndicesA; external gdi32 name 'GetGlyphIndicesA';
-function GetGlyphIndicesW; external gdi32 name 'GetGlyphIndicesW';
-function GetGlyphIndices; external gdi32 name 'GetGlyphIndices' + AWSuffix;
-function GetTextExtentPointI; external gdi32 name 'GetTextExtentPointI';
-function GetTextExtentExPointI; external gdi32 name 'GetTextExtentExPointI';
-function GetCharWidthI; external gdi32 name 'GetCharWidthI';
-function GetCharABCWidthsI; external gdi32 name 'GetCharABCWidthsI';
-function AddFontResourceExA; external gdi32 name 'AddFontResourceExA';
-function AddFontResourceExW; external gdi32 name 'AddFontResourceExW';
-function AddFontResourceEx; external gdi32 name 'AddFontResourceEx' + AWSuffix;
-function RemoveFontResourceExA; external gdi32 name 'RemoveFontResourceExA';
-function RemoveFontResourceExW; external gdi32 name 'RemoveFontResourceExW';
-function RemoveFontResourceEx; external gdi32 name 'RemoveFontResourceEx' + AWSuffix;
-function AddFontMemResourceEx; external gdi32 name 'AddFontMemResourceEx';
-function RemoveFontMemResourceEx; external gdi32 name 'RemoveFontMemResourceEx';
-function CreateFontIndirectExA; external gdi32 name 'CreateFontIndirectExA';
-function CreateFontIndirectExW; external gdi32 name 'CreateFontIndirectExW';
-function CreateFontIndirectEx; external gdi32 name 'CreateFontIndirectEx' + AWSuffix;
-function GetViewportExtEx; external gdi32 name 'GetViewportExtEx';
-function GetViewportOrgEx; external gdi32 name 'GetViewportOrgEx';
-function GetWindowExtEx; external gdi32 name 'GetWindowExtEx';
-function GetWindowOrgEx; external gdi32 name 'GetWindowOrgEx';
-function IntersectClipRect; external gdi32 name 'IntersectClipRect';
-function InvertRgn; external gdi32 name 'InvertRgn';
-function LineDDA; external gdi32 name 'LineDDA';
-function LineTo; external gdi32 name 'LineTo';
-function MaskBlt; external gdi32 name 'MaskBlt';
-function PlgBlt; external gdi32 name 'PlgBlt';
-function OffsetClipRgn; external gdi32 name 'OffsetClipRgn';
-function OffsetRgn; external gdi32 name 'OffsetRgn';
-function PatBlt; external gdi32 name 'PatBlt';
-function Pie; external gdi32 name 'Pie';
-function PlayMetaFile; external gdi32 name 'PlayMetaFile';
-function PaintRgn; external gdi32 name 'PaintRgn';
-function PolyPolygon; external gdi32 name 'PolyPolygon';
-function PtInRegion; external gdi32 name 'PtInRegion';
-function PtVisible; external gdi32 name 'PtVisible';
-function RectInRegion; external gdi32 name 'RectInRegion';
-function RectVisible; external gdi32 name 'RectVisible';
-function Rectangle; external gdi32 name 'Rectangle';
-function RestoreDC; external gdi32 name 'RestoreDC';
-function ResetDCA; external gdi32 name 'ResetDCA';
-function ResetDCW; external gdi32 name 'ResetDCW';
-function ResetDC; external gdi32 name 'ResetDC' + AWSuffix;
-function RealizePalette; external gdi32 name 'RealizePalette';
-function RemoveFontResourceA; external gdi32 name 'RemoveFontResourceA';
-function RemoveFontResourceW; external gdi32 name 'RemoveFontResourceW';
-function RemoveFontResource; external gdi32 name 'RemoveFontResource' + AWSuffix;
-function RoundRect; external gdi32 name 'RoundRect';
-function ResizePalette; external gdi32 name 'ResizePalette';
-function SaveDC; external gdi32 name 'SaveDC';
-function SelectClipRgn; external gdi32 name 'SelectClipRgn';
-function ExtSelectClipRgn; external gdi32 name 'ExtSelectClipRgn';
-function SetMetaRgn; external gdi32 name 'SetMetaRgn';
-function SelectObject; external gdi32 name 'SelectObject';
-function SelectPalette; external gdi32 name 'SelectPalette';
-function SetBkColor; external gdi32 name 'SetBkColor';
-function SetDCBrushColor; external gdi32 name 'SetDCBrushColor';
-function SetDCPenColor; external gdi32 name 'SetDCPenColor';
-function SetBkMode; external gdi32 name 'SetBkMode';
-function SetBitmapBits; external gdi32 name 'SetBitmapBits';
-function SetBoundsRect; external gdi32 name 'SetBoundsRect';
-function SetDIBits; external gdi32 name 'SetDIBits';
-function SetDIBitsToDevice; external gdi32 name 'SetDIBitsToDevice';
-function SetMapperFlags; external gdi32 name 'SetMapperFlags';
-function SetGraphicsMode; external gdi32 name 'SetGraphicsMode';
-function SetMapMode; external gdi32 name 'SetMapMode';
-function SetLayout; external gdi32 name 'SetLayout';
-function GetLayout; external gdi32 name 'GetLayout';
-function SetMetaFileBitsEx; external gdi32 name 'SetMetaFileBitsEx';
-function SetPaletteEntries; external gdi32 name 'SetPaletteEntries';
-function SetPixel; external gdi32 name 'SetPixel';
-function SetPixelV; external gdi32 name 'SetPixelV';
-function SetPixelFormat; external gdi32 name 'SetPixelFormat';
-function SetPolyFillMode; external gdi32 name 'SetPolyFillMode';
-function StretchBlt; external gdi32 name 'StretchBlt';
-function SetRectRgn; external gdi32 name 'SetRectRgn';
-function StretchDIBits; external gdi32 name 'StretchDIBits';
-function SetROP2; external gdi32 name 'SetROP2';
-function SetStretchBltMode; external gdi32 name 'SetStretchBltMode';
-function SetSystemPaletteUse; external gdi32 name 'SetSystemPaletteUse';
-function SetTextCharacterExtra; external gdi32 name 'SetTextCharacterExtra';
-function SetTextColor; external gdi32 name 'SetTextColor';
-function SetTextAlign; external gdi32 name 'SetTextAlign';
-function SetTextJustification; external gdi32 name 'SetTextJustification';
-function UpdateColors; external gdi32 name 'UpdateColors';
-function AlphaBlend; external msimg32 name 'AlphaBlend';
-function TransparentBlt; external msimg32 name 'TransparentBlt';
-function GradientFill; external msimg32 name 'GradientFill';
-function PlayMetaFileRecord; external gdi32 name 'PlayMetaFileRecord';
-function EnumMetaFile; external gdi32 name 'EnumMetaFile';
-function CloseEnhMetaFile; external gdi32 name 'CloseEnhMetaFile';
-function CopyEnhMetaFileA; external gdi32 name 'CopyEnhMetaFileA';
-function CopyEnhMetaFileW; external gdi32 name 'CopyEnhMetaFileW';
-function CopyEnhMetaFile; external gdi32 name 'CopyEnhMetaFile' + AWSuffix;
-function CreateEnhMetaFileA; external gdi32 name 'CreateEnhMetaFileA';
-function CreateEnhMetaFileW; external gdi32 name 'CreateEnhMetaFileW';
-function CreateEnhMetaFile; external gdi32 name 'CreateEnhMetaFile' + AWSuffix;
-function DeleteEnhMetaFile; external gdi32 name 'DeleteEnhMetaFile';
-function EnumEnhMetaFile; external gdi32 name 'EnumEnhMetaFile';
-function GetEnhMetaFileA; external gdi32 name 'GetEnhMetaFileA';
-function GetEnhMetaFileW; external gdi32 name 'GetEnhMetaFileW';
-function GetEnhMetaFile; external gdi32 name 'GetEnhMetaFile' + AWSuffix;
-function GetEnhMetaFileBits; external gdi32 name 'GetEnhMetaFileBits';
-function GetEnhMetaFileDescriptionA; external gdi32 name 'GetEnhMetaFileDescriptionA';
-function GetEnhMetaFileDescriptionW; external gdi32 name 'GetEnhMetaFileDescriptionW';
-function GetEnhMetaFileDescription; external gdi32 name 'GetEnhMetaFileDescription' + AWSuffix;
-function GetEnhMetaFileHeader; external gdi32 name 'GetEnhMetaFileHeader';
-function GetEnhMetaFilePaletteEntries; external gdi32 name 'GetEnhMetaFilePaletteEntries';
-function GetEnhMetaFilePixelFormat; external gdi32 name 'GetEnhMetaFilePixelFormat';
-function GetWinMetaFileBits; external gdi32 name 'GetWinMetaFileBits';
-function PlayEnhMetaFile; external gdi32 name 'PlayEnhMetaFile';
-function PlayEnhMetaFileRecord; external gdi32 name 'PlayEnhMetaFileRecord';
-function SetEnhMetaFileBits; external gdi32 name 'SetEnhMetaFileBits';
-function SetWinMetaFileBits; external gdi32 name 'SetWinMetaFileBits';
-function GdiComment; external gdi32 name 'GdiComment';
-function GetTextMetricsA; external gdi32 name 'GetTextMetricsA';
-function GetTextMetricsW; external gdi32 name 'GetTextMetricsW';
-function GetTextMetrics; external gdi32 name 'GetTextMetrics' + AWSuffix;
-function AngleArc; external gdi32 name 'AngleArc';
-function PolyPolyline; external gdi32 name 'PolyPolyline';
-function GetWorldTransform; external gdi32 name 'GetWorldTransform';
-function SetWorldTransform; external gdi32 name 'SetWorldTransform';
-function ModifyWorldTransform; external gdi32 name 'ModifyWorldTransform';
-function CombineTransform; external gdi32 name 'CombineTransform';
-function CreateDIBSection; external gdi32 name 'CreateDIBSection';
-function GetDIBColorTable; external gdi32 name 'GetDIBColorTable';
-function SetDIBColorTable; external gdi32 name 'SetDIBColorTable';
-function SetColorAdjustment; external gdi32 name 'SetColorAdjustment';
-function GetColorAdjustment; external gdi32 name 'GetColorAdjustment';
-function CreateHalftonePalette; external gdi32 name 'CreateHalftonePalette';
-function StartDocA; external gdi32 name 'StartDocA';
-function StartDocW; external gdi32 name 'StartDocW';
-function StartDoc; external gdi32 name 'StartDoc' + AWSuffix;
-function EndDoc; external gdi32 name 'EndDoc';
-function StartPage; external gdi32 name 'StartPage';
-function EndPage; external gdi32 name 'EndPage';
-function AbortDoc; external gdi32 name 'AbortDoc';
-function SetAbortProc; external gdi32 name 'SetAbortProc';
-function AbortPath; external gdi32 name 'AbortPath';
-function ArcTo; external gdi32 name 'ArcTo';
-function BeginPath; external gdi32 name 'BeginPath';
-function CloseFigure; external gdi32 name 'CloseFigure';
-function EndPath; external gdi32 name 'EndPath';
-function FillPath; external gdi32 name 'FillPath';
-function FlattenPath; external gdi32 name 'FlattenPath';
-function GetPath; external gdi32 name 'GetPath';
-function PathToRegion; external gdi32 name 'PathToRegion';
-function PolyDraw; external gdi32 name 'PolyDraw';
-function SelectClipPath; external gdi32 name 'SelectClipPath';
-function SetArcDirection; external gdi32 name 'SetArcDirection';
-function SetMiterLimit; external gdi32 name 'SetMiterLimit';
-function StrokeAndFillPath; external gdi32 name 'StrokeAndFillPath';
-function StrokePath; external gdi32 name 'StrokePath';
-function WidenPath; external gdi32 name 'WidenPath';
-function ExtCreatePen; external gdi32 name 'ExtCreatePen';
-function GetMiterLimit; external gdi32 name 'GetMiterLimit';
-function GetArcDirection; external gdi32 name 'GetArcDirection';
-function GetObjectA; external gdi32 name 'GetObjectA';
-function GetObjectW; external gdi32 name 'GetObjectW';
-function GetObject; external gdi32 name 'GetObject' + AWSuffix;
-function MoveToEx; external gdi32 name 'MoveToEx';
-function TextOutA; external gdi32 name 'TextOutA';
-function TextOutW; external gdi32 name 'TextOutW';
-function TextOut; external gdi32 name 'TextOut' + AWSuffix;
-function ExtTextOutA; external gdi32 name 'ExtTextOutA';
-function ExtTextOutW; external gdi32 name 'ExtTextOutW';
-function ExtTextOut; external gdi32 name 'ExtTextOut' + AWSuffix;
-function PolyTextOutA; external gdi32 name 'PolyTextOutA';
-function PolyTextOutW; external gdi32 name 'PolyTextOutW';
-function PolyTextOut; external gdi32 name 'PolyTextOut' + AWSuffix;
-function CreatePolygonRgn; external gdi32 name 'CreatePolygonRgn';
-function DPtoLP; external gdi32 name 'DPtoLP';
-function LPtoDP; external gdi32 name 'LPtoDP';
-function Polygon; external gdi32 name 'Polygon';
-function Polyline; external gdi32 name 'Polyline';
-function PolyBezier; external gdi32 name 'PolyBezier';
-function PolyBezierTo; external gdi32 name 'PolyBezierTo';
-function PolylineTo; external gdi32 name 'PolylineTo';
-function SetViewportExtEx; external gdi32 name 'SetViewportExtEx';
-function SetViewportOrgEx; external gdi32 name 'SetViewportOrgEx';
-function SetWindowExtEx; external gdi32 name 'SetWindowExtEx';
-function SetWindowOrgEx; external gdi32 name 'SetWindowOrgEx';
-function OffsetViewportOrgEx; external gdi32 name 'OffsetViewportOrgEx';
-function OffsetWindowOrgEx; external gdi32 name 'OffsetWindowOrgEx';
-function ScaleViewportExtEx; external gdi32 name 'ScaleViewportExtEx';
-function ScaleWindowExtEx; external gdi32 name 'ScaleWindowExtEx';
-function SetBitmapDimensionEx; external gdi32 name 'SetBitmapDimensionEx';
-function SetBrushOrgEx; external gdi32 name 'SetBrushOrgEx';
-function GetTextFaceA; external gdi32 name 'GetTextFaceA';
-function GetTextFaceW; external gdi32 name 'GetTextFaceW';
-function GetTextFace; external gdi32 name 'GetTextFace' + AWSuffix;
-function GetKerningPairsA; external gdi32 name 'GetKerningPairsA';
-function GetKerningPairsW; external gdi32 name 'GetKerningPairsW';
-function GetKerningPairs; external gdi32 name 'GetKerningPairs' + AWSuffix;
-function GetDCOrgEx; external gdi32 name 'GetDCOrgEx';
-function FixBrushOrgEx; external gdi32 name 'FixBrushOrgEx';
-function UnrealizeObject; external gdi32 name 'UnrealizeObject';
-function GdiFlush; external gdi32 name 'GdiFlush';
-function GdiSetBatchLimit; external gdi32 name 'GdiSetBatchLimit';
-function GdiGetBatchLimit; external gdi32 name 'GdiGetBatchLimit';
-function SetICMMode; external gdi32 name 'SetICMMode';
-function CheckColorsInGamut; external gdi32 name 'CheckColorsInGamut';
-function GetColorSpace; external gdi32 name 'GetColorSpace';
-function GetLogColorSpaceA; external gdi32 name 'GetLogColorSpaceA';
-function GetLogColorSpaceW; external gdi32 name 'GetLogColorSpaceW';
-function GetLogColorSpace; external gdi32 name 'GetLogColorSpace' + AWSuffix;
-function CreateColorSpaceA; external gdi32 name 'CreateColorSpaceA';
-function CreateColorSpaceW; external gdi32 name 'CreateColorSpaceW';
-function CreateColorSpace; external gdi32 name 'CreateColorSpace' + AWSuffix;
-function SetColorSpace; external gdi32 name 'SetColorSpace';
-function DeleteColorSpace; external gdi32 name 'DeleteColorSpace';
-function GetICMProfileA; external gdi32 name 'GetICMProfileA';
-function GetICMProfileW; external gdi32 name 'GetICMProfileW';
-function GetICMProfile; external gdi32 name 'GetICMProfile' + AWSuffix;
-function SetICMProfileA; external gdi32 name 'SetICMProfileA';
-function SetICMProfileW; external gdi32 name 'SetICMProfileW';
-function SetICMProfile; external gdi32 name 'SetICMProfile' + AWSuffix;
-function GetDeviceGammaRamp; external gdi32 name 'GetDeviceGammaRamp';
-function SetDeviceGammaRamp; external gdi32 name 'SetDeviceGammaRamp';
-function ColorMatchToTarget; external gdi32 name 'ColorMatchToTarget';
-function EnumICMProfilesA; external gdi32 name 'EnumICMProfilesA';
-function EnumICMProfilesW; external gdi32 name 'EnumICMProfilesW';
-function EnumICMProfiles; external gdi32 name 'EnumICMProfiles' + AWSuffix;
-function UpdateICMRegKeyA; external gdi32 name 'UpdateICMRegKeyA';
-function UpdateICMRegKeyW; external gdi32 name 'UpdateICMRegKeyW';
-function UpdateICMRegKey; external gdi32 name 'UpdateICMRegKey' + AWSuffix;
-function ColorCorrectPalette; external gdi32 name 'ColorCorrectPalette';
-function wglCopyContext; external opengl32 name 'wglCopyContext';
-function wglCreateContext; external opengl32 name 'wglCreateContext';
-function wglCreateLayerContext; external opengl32 name 'wglCreateLayerContext';
-function wglDeleteContext; external opengl32 name 'wglDeleteContext';
-function wglGetCurrentContext; external opengl32 name 'wglGetCurrentContext';
-function wglGetCurrentDC; external opengl32 name 'wglGetCurrentDC';
-function wglGetProcAddress; external opengl32 name 'wglGetProcAddress';
-function wglMakeCurrent; external opengl32 name 'wglMakeCurrent';
-function wglShareLists; external opengl32 name 'wglShareLists';
-function wglUseFontBitmapsA; external opengl32 name 'wglUseFontBitmapsA';
-function wglUseFontBitmapsW; external opengl32 name 'wglUseFontBitmapsW';
-function wglUseFontBitmaps; external opengl32 name 'wglUseFontBitmaps' + AWSuffix;
-function SwapBuffers; external opengl32 name 'SwapBuffers';
-function wglUseFontOutlinesA; external opengl32 name 'wglUseFontOutlinesA';
-function wglUseFontOutlinesW; external opengl32 name 'wglUseFontOutlinesW';
-function wglUseFontOutlines; external opengl32 name 'wglUseFontOutlines' + AWSuffix;
-function wglDescribeLayerPlane; external opengl32 name 'wglDescribeLayerPlane';
-function wglSetLayerPaletteEntries; external opengl32 name 'wglSetLayerPaletteEntries';
-function wglGetLayerPaletteEntries; external opengl32 name 'wglGetLayerPaletteEntries';
-function wglRealizeLayerPalette; external opengl32 name 'wglRealizeLayerPalette';
-function wglSwapLayerBuffers; external opengl32 name 'wglSwapLayerBuffers';
-function wglSwapMultipleBuffers; external opengl32 name 'wglSwapMultipleBuffers';
-
-{$ENDIF DYNAMIC_LINK}
-
-end.
+{******************************************************************************}
+{ }
+{ Graphics Device Interface API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: wingdi.h, released June 2000. The original Pascal }
+{ code is: WinGDI.pas, released December 2000. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwawingdi.pas,v 1.1 2005/04/04 07:56:11 marco Exp $
+
+unit JwaWinGDI;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "WinGDI.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaWinNT, JwaWinType;
+
+// Binary raster ops
+
+const
+ R2_BLACK = 1; // 0
+ {$EXTERNALSYM R2_BLACK}
+ R2_NOTMERGEPEN = 2; // DPon
+ {$EXTERNALSYM R2_NOTMERGEPEN}
+ R2_MASKNOTPEN = 3; // DPna
+ {$EXTERNALSYM R2_MASKNOTPEN}
+ R2_NOTCOPYPEN = 4; // PN
+ {$EXTERNALSYM R2_NOTCOPYPEN}
+ R2_MASKPENNOT = 5; // PDna
+ {$EXTERNALSYM R2_MASKPENNOT}
+ R2_NOT = 6; // Dn
+ {$EXTERNALSYM R2_NOT}
+ R2_XORPEN = 7; // DPx
+ {$EXTERNALSYM R2_XORPEN}
+ R2_NOTMASKPEN = 8; // DPan
+ {$EXTERNALSYM R2_NOTMASKPEN}
+ R2_MASKPEN = 9; // DPa
+ {$EXTERNALSYM R2_MASKPEN}
+ R2_NOTXORPEN = 10; // DPxn
+ {$EXTERNALSYM R2_NOTXORPEN}
+ R2_NOP = 11; // D
+ {$EXTERNALSYM R2_NOP}
+ R2_MERGENOTPEN = 12; // DPno
+ {$EXTERNALSYM R2_MERGENOTPEN}
+ R2_COPYPEN = 13; // P
+ {$EXTERNALSYM R2_COPYPEN}
+ R2_MERGEPENNOT = 14; // PDno
+ {$EXTERNALSYM R2_MERGEPENNOT}
+ R2_MERGEPEN = 15; // DPo
+ {$EXTERNALSYM R2_MERGEPEN}
+ R2_WHITE = 16; // 1
+ {$EXTERNALSYM R2_WHITE}
+ R2_LAST = 16;
+ {$EXTERNALSYM R2_LAST}
+
+// Ternary raster operations
+
+ SRCCOPY = DWORD($00CC0020); // dest = source
+ {$EXTERNALSYM SRCCOPY}
+ SRCPAINT = DWORD($00EE0086); // dest = source OR dest
+ {$EXTERNALSYM SRCPAINT}
+ SRCAND = DWORD($008800C6); // dest = source AND dest
+ {$EXTERNALSYM SRCAND}
+ SRCINVERT = DWORD($00660046); // dest = source XOR dest
+ {$EXTERNALSYM SRCINVERT}
+ SRCERASE = DWORD($00440328); // dest = source AND (NOT dest )
+ {$EXTERNALSYM SRCERASE}
+ NOTSRCCOPY = DWORD($00330008); // dest = (NOT source)
+ {$EXTERNALSYM NOTSRCCOPY}
+ NOTSRCERASE = DWORD($001100A6); // dest = (NOT src) AND (NOT dest)
+ {$EXTERNALSYM NOTSRCERASE}
+ MERGECOPY = DWORD($00C000CA); // dest = (source AND pattern)
+ {$EXTERNALSYM MERGECOPY}
+ MERGEPAINT = DWORD($00BB0226); // dest = (NOT source) OR dest
+ {$EXTERNALSYM MERGEPAINT}
+ PATCOPY = DWORD($00F00021); // dest = pattern
+ {$EXTERNALSYM PATCOPY}
+ PATPAINT = DWORD($00FB0A09); // dest = DPSnoo
+ {$EXTERNALSYM PATPAINT}
+ PATINVERT = DWORD($005A0049); // dest = pattern XOR dest
+ {$EXTERNALSYM PATINVERT}
+ DSTINVERT = DWORD($00550009); // dest = (NOT dest)
+ {$EXTERNALSYM DSTINVERT}
+ BLACKNESS = DWORD($00000042); // dest = BLACK
+ {$EXTERNALSYM BLACKNESS}
+ WHITENESS = DWORD($00FF0062); // dest = WHITE
+ {$EXTERNALSYM WHITENESS}
+
+ NOMIRRORBITMAP = DWORD($80000000); // Do not Mirror the bitmap in this call
+ {$EXTERNALSYM NOMIRRORBITMAP}
+ CAPTUREBLT = DWORD($40000000); // Include layered windows
+ {$EXTERNALSYM CAPTUREBLT}
+
+// Quaternary raster codes
+
+function MAKEROP4(Fore, Back: DWORD): DWORD;
+{$EXTERNALSYM MAKEROP4}
+
+const
+ GDI_ERROR = DWORD($FFFFFFFF);
+ {$EXTERNALSYM GDI_ERROR}
+ HGDI_ERROR = HANDLE($FFFFFFFF);
+ {$EXTERNALSYM HGDI_ERROR}
+
+// Region Flags
+
+ ERROR = 0;
+ {$EXTERNALSYM ERROR}
+ NULLREGION = 1;
+ {$EXTERNALSYM NULLREGION}
+ SIMPLEREGION = 2;
+ {$EXTERNALSYM SIMPLEREGION}
+ COMPLEXREGION = 3;
+ {$EXTERNALSYM COMPLEXREGION}
+ RGN_ERROR = ERROR;
+ {$EXTERNALSYM RGN_ERROR}
+
+// CombineRgn() Styles
+
+ RGN_AND = 1;
+ {$EXTERNALSYM RGN_AND}
+ RGN_OR = 2;
+ {$EXTERNALSYM RGN_OR}
+ RGN_XOR = 3;
+ {$EXTERNALSYM RGN_XOR}
+ RGN_DIFF = 4;
+ {$EXTERNALSYM RGN_DIFF}
+ RGN_COPY = 5;
+ {$EXTERNALSYM RGN_COPY}
+ RGN_MIN = RGN_AND;
+ {$EXTERNALSYM RGN_MIN}
+ RGN_MAX = RGN_COPY;
+ {$EXTERNALSYM RGN_MAX}
+
+// StretchBlt() Modes
+
+ BLACKONWHITE = 1;
+ {$EXTERNALSYM BLACKONWHITE}
+ WHITEONBLACK = 2;
+ {$EXTERNALSYM WHITEONBLACK}
+ COLORONCOLOR = 3;
+ {$EXTERNALSYM COLORONCOLOR}
+ HALFTONE = 4;
+ {$EXTERNALSYM HALFTONE}
+ MAXSTRETCHBLTMODE = 4;
+ {$EXTERNALSYM MAXSTRETCHBLTMODE}
+
+// New StretchBlt() Modes
+
+ STRETCH_ANDSCANS = BLACKONWHITE;
+ {$EXTERNALSYM STRETCH_ANDSCANS}
+ STRETCH_ORSCANS = WHITEONBLACK;
+ {$EXTERNALSYM STRETCH_ORSCANS}
+ STRETCH_DELETESCANS = COLORONCOLOR;
+ {$EXTERNALSYM STRETCH_DELETESCANS}
+ STRETCH_HALFTONE = HALFTONE;
+ {$EXTERNALSYM STRETCH_HALFTONE}
+
+// PolyFill() Modes
+
+ ALTERNATE = 1;
+ {$EXTERNALSYM ALTERNATE}
+ WINDING = 2;
+ {$EXTERNALSYM WINDING}
+ POLYFILL_LAST = 2;
+ {$EXTERNALSYM POLYFILL_LAST}
+
+// Layout Orientation Options
+
+ LAYOUT_RTL = $00000001; // Right to left
+ {$EXTERNALSYM LAYOUT_RTL}
+ LAYOUT_BTT = $00000002; // Bottom to top
+ {$EXTERNALSYM LAYOUT_BTT}
+ LAYOUT_VBH = $00000004; // Vertical before horizontal
+ {$EXTERNALSYM LAYOUT_VBH}
+ LAYOUT_ORIENTATIONMASK = LAYOUT_RTL or LAYOUT_BTT or LAYOUT_VBH;
+ {$EXTERNALSYM LAYOUT_ORIENTATIONMASK}
+ LAYOUT_BITMAPORIENTATIONPRESERVED = $00000008;
+ {$EXTERNALSYM LAYOUT_BITMAPORIENTATIONPRESERVED}
+
+// Text Alignment Options
+
+ TA_NOUPDATECP = 0;
+ {$EXTERNALSYM TA_NOUPDATECP}
+ TA_UPDATECP = 1;
+ {$EXTERNALSYM TA_UPDATECP}
+
+ TA_LEFT = 0;
+ {$EXTERNALSYM TA_LEFT}
+ TA_RIGHT = 2;
+ {$EXTERNALSYM TA_RIGHT}
+ TA_CENTER = 6;
+ {$EXTERNALSYM TA_CENTER}
+
+ TA_TOP = 0;
+ {$EXTERNALSYM TA_TOP}
+ TA_BOTTOM = 8;
+ {$EXTERNALSYM TA_BOTTOM}
+ TA_BASELINE = 24;
+ {$EXTERNALSYM TA_BASELINE}
+
+ TA_RTLREADING = 256;
+ {$EXTERNALSYM TA_RTLREADING}
+
+ TA_MASK = TA_BASELINE + TA_CENTER + TA_UPDATECP + TA_RTLREADING;
+ {$EXTERNALSYM TA_MASK}
+
+ VTA_BASELINE = TA_BASELINE;
+ {$EXTERNALSYM VTA_BASELINE}
+ VTA_LEFT = TA_BOTTOM;
+ {$EXTERNALSYM VTA_LEFT}
+ VTA_RIGHT = TA_TOP;
+ {$EXTERNALSYM VTA_RIGHT}
+ VTA_CENTER = TA_CENTER;
+ {$EXTERNALSYM VTA_CENTER}
+ VTA_BOTTOM = TA_RIGHT;
+ {$EXTERNALSYM VTA_BOTTOM}
+ VTA_TOP = TA_LEFT;
+ {$EXTERNALSYM VTA_TOP}
+
+ ETO_OPAQUE = $0002;
+ {$EXTERNALSYM ETO_OPAQUE}
+ ETO_CLIPPED = $0004;
+ {$EXTERNALSYM ETO_CLIPPED}
+
+ ETO_GLYPH_INDEX = $0010;
+ {$EXTERNALSYM ETO_GLYPH_INDEX}
+ ETO_RTLREADING = $0080;
+ {$EXTERNALSYM ETO_RTLREADING}
+ ETO_NUMERICSLOCAL = $0400;
+ {$EXTERNALSYM ETO_NUMERICSLOCAL}
+ ETO_NUMERICSLATIN = $0800;
+ {$EXTERNALSYM ETO_NUMERICSLATIN}
+ ETO_IGNORELANGUAGE = $1000;
+ {$EXTERNALSYM ETO_IGNORELANGUAGE}
+
+ ETO_PDY = $2000;
+ {$EXTERNALSYM ETO_PDY}
+
+ ASPECT_FILTERING = $0001;
+ {$EXTERNALSYM ASPECT_FILTERING}
+
+// Bounds Accumulation APIs
+
+ DCB_RESET = $0001;
+ {$EXTERNALSYM DCB_RESET}
+ DCB_ACCUMULATE = $0002;
+ {$EXTERNALSYM DCB_ACCUMULATE}
+ DCB_DIRTY = DCB_ACCUMULATE;
+ {$EXTERNALSYM DCB_DIRTY}
+ DCB_SET = DCB_RESET or DCB_ACCUMULATE;
+ {$EXTERNALSYM DCB_SET}
+ DCB_ENABLE = $0004;
+ {$EXTERNALSYM DCB_ENABLE}
+ DCB_DISABLE = $0008;
+ {$EXTERNALSYM DCB_DISABLE}
+
+// Metafile Functions
+
+ META_SETBKCOLOR = $0201;
+ {$EXTERNALSYM META_SETBKCOLOR}
+ META_SETBKMODE = $0102;
+ {$EXTERNALSYM META_SETBKMODE}
+ META_SETMAPMODE = $0103;
+ {$EXTERNALSYM META_SETMAPMODE}
+ META_SETROP2 = $0104;
+ {$EXTERNALSYM META_SETROP2}
+ META_SETRELABS = $0105;
+ {$EXTERNALSYM META_SETRELABS}
+ META_SETPOLYFILLMODE = $0106;
+ {$EXTERNALSYM META_SETPOLYFILLMODE}
+ META_SETSTRETCHBLTMODE = $0107;
+ {$EXTERNALSYM META_SETSTRETCHBLTMODE}
+ META_SETTEXTCHAREXTRA = $0108;
+ {$EXTERNALSYM META_SETTEXTCHAREXTRA}
+ META_SETTEXTCOLOR = $0209;
+ {$EXTERNALSYM META_SETTEXTCOLOR}
+ META_SETTEXTJUSTIFICATION = $020A;
+ {$EXTERNALSYM META_SETTEXTJUSTIFICATION}
+ META_SETWINDOWORG = $020B;
+ {$EXTERNALSYM META_SETWINDOWORG}
+ META_SETWINDOWEXT = $020C;
+ {$EXTERNALSYM META_SETWINDOWEXT}
+ META_SETVIEWPORTORG = $020D;
+ {$EXTERNALSYM META_SETVIEWPORTORG}
+ META_SETVIEWPORTEXT = $020E;
+ {$EXTERNALSYM META_SETVIEWPORTEXT}
+ META_OFFSETWINDOWORG = $020F;
+ {$EXTERNALSYM META_OFFSETWINDOWORG}
+ META_SCALEWINDOWEXT = $0410;
+ {$EXTERNALSYM META_SCALEWINDOWEXT}
+ META_OFFSETVIEWPORTORG = $0211;
+ {$EXTERNALSYM META_OFFSETVIEWPORTORG}
+ META_SCALEVIEWPORTEXT = $0412;
+ {$EXTERNALSYM META_SCALEVIEWPORTEXT}
+ META_LINETO = $0213;
+ {$EXTERNALSYM META_LINETO}
+ META_MOVETO = $0214;
+ {$EXTERNALSYM META_MOVETO}
+ META_EXCLUDECLIPRECT = $0415;
+ {$EXTERNALSYM META_EXCLUDECLIPRECT}
+ META_INTERSECTCLIPRECT = $0416;
+ {$EXTERNALSYM META_INTERSECTCLIPRECT}
+ META_ARC = $0817;
+ {$EXTERNALSYM META_ARC}
+ META_ELLIPSE = $0418;
+ {$EXTERNALSYM META_ELLIPSE}
+ META_FLOODFILL = $0419;
+ {$EXTERNALSYM META_FLOODFILL}
+ META_PIE = $081A;
+ {$EXTERNALSYM META_PIE}
+ META_RECTANGLE = $041B;
+ {$EXTERNALSYM META_RECTANGLE}
+ META_ROUNDRECT = $061C;
+ {$EXTERNALSYM META_ROUNDRECT}
+ META_PATBLT = $061D;
+ {$EXTERNALSYM META_PATBLT}
+ META_SAVEDC = $001E;
+ {$EXTERNALSYM META_SAVEDC}
+ META_SETPIXEL = $041F;
+ {$EXTERNALSYM META_SETPIXEL}
+ META_OFFSETCLIPRGN = $0220;
+ {$EXTERNALSYM META_OFFSETCLIPRGN}
+ META_TEXTOUT = $0521;
+ {$EXTERNALSYM META_TEXTOUT}
+ META_BITBLT = $0922;
+ {$EXTERNALSYM META_BITBLT}
+ META_STRETCHBLT = $0B23;
+ {$EXTERNALSYM META_STRETCHBLT}
+ META_POLYGON = $0324;
+ {$EXTERNALSYM META_POLYGON}
+ META_POLYLINE = $0325;
+ {$EXTERNALSYM META_POLYLINE}
+ META_ESCAPE = $0626;
+ {$EXTERNALSYM META_ESCAPE}
+ META_RESTOREDC = $0127;
+ {$EXTERNALSYM META_RESTOREDC}
+ META_FILLREGION = $0228;
+ {$EXTERNALSYM META_FILLREGION}
+ META_FRAMEREGION = $0429;
+ {$EXTERNALSYM META_FRAMEREGION}
+ META_INVERTREGION = $012A;
+ {$EXTERNALSYM META_INVERTREGION}
+ META_PAINTREGION = $012B;
+ {$EXTERNALSYM META_PAINTREGION}
+ META_SELECTCLIPREGION = $012C;
+ {$EXTERNALSYM META_SELECTCLIPREGION}
+ META_SELECTOBJECT = $012D;
+ {$EXTERNALSYM META_SELECTOBJECT}
+ META_SETTEXTALIGN = $012E;
+ {$EXTERNALSYM META_SETTEXTALIGN}
+ META_CHORD = $0830;
+ {$EXTERNALSYM META_CHORD}
+ META_SETMAPPERFLAGS = $0231;
+ {$EXTERNALSYM META_SETMAPPERFLAGS}
+ META_EXTTEXTOUT = $0a32;
+ {$EXTERNALSYM META_EXTTEXTOUT}
+ META_SETDIBTODEV = $0d33;
+ {$EXTERNALSYM META_SETDIBTODEV}
+ META_SELECTPALETTE = $0234;
+ {$EXTERNALSYM META_SELECTPALETTE}
+ META_REALIZEPALETTE = $0035;
+ {$EXTERNALSYM META_REALIZEPALETTE}
+ META_ANIMATEPALETTE = $0436;
+ {$EXTERNALSYM META_ANIMATEPALETTE}
+ META_SETPALENTRIES = $0037;
+ {$EXTERNALSYM META_SETPALENTRIES}
+ META_POLYPOLYGON = $0538;
+ {$EXTERNALSYM META_POLYPOLYGON}
+ META_RESIZEPALETTE = $0139;
+ {$EXTERNALSYM META_RESIZEPALETTE}
+ META_DIBBITBLT = $0940;
+ {$EXTERNALSYM META_DIBBITBLT}
+ META_DIBSTRETCHBLT = $0b41;
+ {$EXTERNALSYM META_DIBSTRETCHBLT}
+ META_DIBCREATEPATTERNBRUSH = $0142;
+ {$EXTERNALSYM META_DIBCREATEPATTERNBRUSH}
+ META_STRETCHDIB = $0f43;
+ {$EXTERNALSYM META_STRETCHDIB}
+ META_EXTFLOODFILL = $0548;
+ {$EXTERNALSYM META_EXTFLOODFILL}
+ META_SETLAYOUT = $0149;
+ {$EXTERNALSYM META_SETLAYOUT}
+ META_DELETEOBJECT = $01f0;
+ {$EXTERNALSYM META_DELETEOBJECT}
+ META_CREATEPALETTE = $00f7;
+ {$EXTERNALSYM META_CREATEPALETTE}
+ META_CREATEPATTERNBRUSH = $01F9;
+ {$EXTERNALSYM META_CREATEPATTERNBRUSH}
+ META_CREATEPENINDIRECT = $02FA;
+ {$EXTERNALSYM META_CREATEPENINDIRECT}
+ META_CREATEFONTINDIRECT = $02FB;
+ {$EXTERNALSYM META_CREATEFONTINDIRECT}
+ META_CREATEBRUSHINDIRECT = $02FC;
+ {$EXTERNALSYM META_CREATEBRUSHINDIRECT}
+ META_CREATEREGION = $06FF;
+ {$EXTERNALSYM META_CREATEREGION}
+
+type
+ PDrawPatRect = ^TDrawPatRect;
+ _DRAWPATRECT = record
+ ptPosition: POINT;
+ ptSize: POINT;
+ wStyle: WORD;
+ wPattern: WORD;
+ end;
+ {$EXTERNALSYM _DRAWPATRECT}
+ DRAWPATRECT = _DRAWPATRECT;
+ {$EXTERNALSYM DRAWPATRECT}
+ TDrawPatRect = _DRAWPATRECT;
+
+// GDI Escapes
+
+const
+ NEWFRAME = 1;
+ {$EXTERNALSYM NEWFRAME}
+ _ABORTDOC = 2; // Underscore prfix by translator (nameclash)
+ {$EXTERNALSYM ABORTDOC}
+ NEXTBAND = 3;
+ {$EXTERNALSYM NEXTBAND}
+ SETCOLORTABLE = 4;
+ {$EXTERNALSYM SETCOLORTABLE}
+ GETCOLORTABLE = 5;
+ {$EXTERNALSYM GETCOLORTABLE}
+ FLUSHOUTPUT = 6;
+ {$EXTERNALSYM FLUSHOUTPUT}
+ DRAFTMODE = 7;
+ {$EXTERNALSYM DRAFTMODE}
+ QUERYESCSUPPORT = 8;
+ {$EXTERNALSYM QUERYESCSUPPORT}
+ SETABORTPROC_ = 9; // Underscore prfix by translator (nameclash)
+ {$EXTERNALSYM SETABORTPROC}
+ STARTDOC_ = 10; // Underscore prfix by translator (nameclash)
+ {$EXTERNALSYM STARTDOC}
+ ENDDOC_ = 11; // Underscore prfix by translator (nameclash)
+ {$EXTERNALSYM ENDDOC}
+ GETPHYSPAGESIZE = 12;
+ {$EXTERNALSYM GETPHYSPAGESIZE}
+ GETPRINTINGOFFSET = 13;
+ {$EXTERNALSYM GETPRINTINGOFFSET}
+ GETSCALINGFACTOR = 14;
+ {$EXTERNALSYM GETSCALINGFACTOR}
+ MFCOMMENT = 15;
+ {$EXTERNALSYM MFCOMMENT}
+ GETPENWIDTH = 16;
+ {$EXTERNALSYM GETPENWIDTH}
+ SETCOPYCOUNT = 17;
+ {$EXTERNALSYM SETCOPYCOUNT}
+ SELECTPAPERSOURCE = 18;
+ {$EXTERNALSYM SELECTPAPERSOURCE}
+ DEVICEDATA = 19;
+ {$EXTERNALSYM DEVICEDATA}
+ PASSTHROUGH = 19;
+ {$EXTERNALSYM PASSTHROUGH}
+ GETTECHNOLGY = 20;
+ {$EXTERNALSYM GETTECHNOLGY}
+ GETTECHNOLOGY = 20;
+ {$EXTERNALSYM GETTECHNOLOGY}
+ SETLINECAP = 21;
+ {$EXTERNALSYM SETLINECAP}
+ SETLINEJOIN = 22;
+ {$EXTERNALSYM SETLINEJOIN}
+ SETMITERLIMIT_ = 23; // underscore prefix by translator (nameclash)
+ {$EXTERNALSYM SETMITERLIMIT}
+ BANDINFO = 24;
+ {$EXTERNALSYM BANDINFO}
+ DRAWPATTERNRECT = 25;
+ {$EXTERNALSYM DRAWPATTERNRECT}
+ GETVECTORPENSIZE = 26;
+ {$EXTERNALSYM GETVECTORPENSIZE}
+ GETVECTORBRUSHSIZE = 27;
+ {$EXTERNALSYM GETVECTORBRUSHSIZE}
+ ENABLEDUPLEX = 28;
+ {$EXTERNALSYM ENABLEDUPLEX}
+ GETSETPAPERBINS = 29;
+ {$EXTERNALSYM GETSETPAPERBINS}
+ GETSETPRINTORIENT = 30;
+ {$EXTERNALSYM GETSETPRINTORIENT}
+ ENUMPAPERBINS = 31;
+ {$EXTERNALSYM ENUMPAPERBINS}
+ SETDIBSCALING = 32;
+ {$EXTERNALSYM SETDIBSCALING}
+ EPSPRINTING = 33;
+ {$EXTERNALSYM EPSPRINTING}
+ ENUMPAPERMETRICS = 34;
+ {$EXTERNALSYM ENUMPAPERMETRICS}
+ GETSETPAPERMETRICS = 35;
+ {$EXTERNALSYM GETSETPAPERMETRICS}
+ POSTSCRIPT_DATA = 37;
+ {$EXTERNALSYM POSTSCRIPT_DATA}
+ POSTSCRIPT_IGNORE = 38;
+ {$EXTERNALSYM POSTSCRIPT_IGNORE}
+ MOUSETRAILS = 39;
+ {$EXTERNALSYM MOUSETRAILS}
+ GETDEVICEUNITS = 42;
+ {$EXTERNALSYM GETDEVICEUNITS}
+
+ GETEXTENDEDTEXTMETRICS = 256;
+ {$EXTERNALSYM GETEXTENDEDTEXTMETRICS}
+ GETEXTENTTABLE = 257;
+ {$EXTERNALSYM GETEXTENTTABLE}
+ GETPAIRKERNTABLE = 258;
+ {$EXTERNALSYM GETPAIRKERNTABLE}
+ GETTRACKKERNTABLE = 259;
+ {$EXTERNALSYM GETTRACKKERNTABLE}
+ EXTTEXTOUT_ = 512; // underscore prefix by translator (nameclash)
+ {$EXTERNALSYM EXTTEXTOUT}
+ GETFACENAME = 513;
+ {$EXTERNALSYM GETFACENAME}
+ DOWNLOADFACE = 514;
+ {$EXTERNALSYM DOWNLOADFACE}
+ ENABLERELATIVEWIDTHS = 768;
+ {$EXTERNALSYM ENABLERELATIVEWIDTHS}
+ ENABLEPAIRKERNING = 769;
+ {$EXTERNALSYM ENABLEPAIRKERNING}
+ SETKERNTRACK = 770;
+ {$EXTERNALSYM SETKERNTRACK}
+ SETALLJUSTVALUES = 771;
+ {$EXTERNALSYM SETALLJUSTVALUES}
+ SETCHARSET = 772;
+ {$EXTERNALSYM SETCHARSET}
+
+ STRETCHBLT_ESCAPE = 2048; // suffix _ESCAPE by translator because of
+ // name-clash with StretchBlt function
+ {$EXTERNALSYM STRETCHBLT}
+ METAFILE_DRIVER = 2049;
+ {$EXTERNALSYM METAFILE_DRIVER}
+ GETSETSCREENPARAMS = 3072;
+ {$EXTERNALSYM GETSETSCREENPARAMS}
+ QUERYDIBSUPPORT = 3073;
+ {$EXTERNALSYM QUERYDIBSUPPORT}
+ BEGIN_PATH = 4096;
+ {$EXTERNALSYM BEGIN_PATH}
+ CLIP_TO_PATH = 4097;
+ {$EXTERNALSYM CLIP_TO_PATH}
+ END_PATH = 4098;
+ {$EXTERNALSYM END_PATH}
+ EXT_DEVICE_CAPS = 4099;
+ {$EXTERNALSYM EXT_DEVICE_CAPS}
+ RESTORE_CTM = 4100;
+ {$EXTERNALSYM RESTORE_CTM}
+ SAVE_CTM = 4101;
+ {$EXTERNALSYM SAVE_CTM}
+ SET_ARC_DIRECTION = 4102;
+ {$EXTERNALSYM SET_ARC_DIRECTION}
+ SET_BACKGROUND_COLOR = 4103;
+ {$EXTERNALSYM SET_BACKGROUND_COLOR}
+ SET_POLY_MODE = 4104;
+ {$EXTERNALSYM SET_POLY_MODE}
+ SET_SCREEN_ANGLE = 4105;
+ {$EXTERNALSYM SET_SCREEN_ANGLE}
+ SET_SPREAD = 4106;
+ {$EXTERNALSYM SET_SPREAD}
+ TRANSFORM_CTM = 4107;
+ {$EXTERNALSYM TRANSFORM_CTM}
+ SET_CLIP_BOX = 4108;
+ {$EXTERNALSYM SET_CLIP_BOX}
+ SET_BOUNDS = 4109;
+ {$EXTERNALSYM SET_BOUNDS}
+ SET_MIRROR_MODE = 4110;
+ {$EXTERNALSYM SET_MIRROR_MODE}
+ OPENCHANNEL = 4110;
+ {$EXTERNALSYM OPENCHANNEL}
+ DOWNLOADHEADER = 4111;
+ {$EXTERNALSYM DOWNLOADHEADER}
+ CLOSECHANNEL = 4112;
+ {$EXTERNALSYM CLOSECHANNEL}
+ POSTSCRIPT_PASSTHROUGH = 4115;
+ {$EXTERNALSYM POSTSCRIPT_PASSTHROUGH}
+ ENCAPSULATED_POSTSCRIPT = 4116;
+ {$EXTERNALSYM ENCAPSULATED_POSTSCRIPT}
+
+ POSTSCRIPT_IDENTIFY = 4117; // new escape for NT5 pscript driver
+ {$EXTERNALSYM POSTSCRIPT_IDENTIFY}
+ POSTSCRIPT_INJECTION = 4118; // new escape for NT5 pscript driver
+ {$EXTERNALSYM POSTSCRIPT_INJECTION}
+
+ CHECKJPEGFORMAT = 4119;
+ {$EXTERNALSYM CHECKJPEGFORMAT}
+ CHECKPNGFORMAT = 4120;
+ {$EXTERNALSYM CHECKPNGFORMAT}
+
+ GET_PS_FEATURESETTING = 4121; // new escape for NT5 pscript driver
+ {$EXTERNALSYM GET_PS_FEATURESETTING}
+
+ SPCLPASSTHROUGH2 = 4568; // new escape for NT5 pscript driver
+ {$EXTERNALSYM SPCLPASSTHROUGH2}
+
+//
+// Parameters for POSTSCRIPT_IDENTIFY escape
+//
+
+ PSIDENT_GDICENTRIC = 0;
+ {$EXTERNALSYM PSIDENT_GDICENTRIC}
+ PSIDENT_PSCENTRIC = 1;
+ {$EXTERNALSYM PSIDENT_PSCENTRIC}
+
+//
+// Header structure for the input buffer to POSTSCRIPT_INJECTION escape
+//
+
+type
+ PPsInjectData = ^TPsInjectData;
+ _PSINJECTDATA = record
+ DataBytes: DWORD; // number of raw data bytes (NOT including this header)
+ InjectionPoint: WORD; // injection point
+ PageNumber: WORD; // page number to apply the injection
+ // Followed by raw data to be injected
+ end;
+ {$EXTERNALSYM _PSINJECTDATA}
+ PSINJECTDATA = _PSINJECTDATA;
+ {$EXTERNALSYM PSINJECTDATA}
+ TPsInjectData = _PSINJECTDATA;
+
+//
+// Constants for PSINJECTDATA.InjectionPoint field
+//
+
+const
+ PSINJECT_BEGINSTREAM = 1;
+ {$EXTERNALSYM PSINJECT_BEGINSTREAM}
+ PSINJECT_PSADOBE = 2;
+ {$EXTERNALSYM PSINJECT_PSADOBE}
+ PSINJECT_PAGESATEND = 3;
+ {$EXTERNALSYM PSINJECT_PAGESATEND}
+ PSINJECT_PAGES = 4;
+ {$EXTERNALSYM PSINJECT_PAGES}
+
+ PSINJECT_DOCNEEDEDRES = 5;
+ {$EXTERNALSYM PSINJECT_DOCNEEDEDRES}
+ PSINJECT_DOCSUPPLIEDRES = 6;
+ {$EXTERNALSYM PSINJECT_DOCSUPPLIEDRES}
+ PSINJECT_PAGEORDER = 7;
+ {$EXTERNALSYM PSINJECT_PAGEORDER}
+ PSINJECT_ORIENTATION = 8;
+ {$EXTERNALSYM PSINJECT_ORIENTATION}
+ PSINJECT_BOUNDINGBOX = 9;
+ {$EXTERNALSYM PSINJECT_BOUNDINGBOX}
+ PSINJECT_DOCUMENTPROCESSCOLORS = 10;
+ {$EXTERNALSYM PSINJECT_DOCUMENTPROCESSCOLORS}
+
+ PSINJECT_COMMENTS = 11;
+ {$EXTERNALSYM PSINJECT_COMMENTS}
+ PSINJECT_BEGINDEFAULTS = 12;
+ {$EXTERNALSYM PSINJECT_BEGINDEFAULTS}
+ PSINJECT_ENDDEFAULTS = 13;
+ {$EXTERNALSYM PSINJECT_ENDDEFAULTS}
+ PSINJECT_BEGINPROLOG = 14;
+ {$EXTERNALSYM PSINJECT_BEGINPROLOG}
+ PSINJECT_ENDPROLOG = 15;
+ {$EXTERNALSYM PSINJECT_ENDPROLOG}
+ PSINJECT_BEGINSETUP = 16;
+ {$EXTERNALSYM PSINJECT_BEGINSETUP}
+ PSINJECT_ENDSETUP = 17;
+ {$EXTERNALSYM PSINJECT_ENDSETUP}
+ PSINJECT_TRAILER = 18;
+ {$EXTERNALSYM PSINJECT_TRAILER}
+ PSINJECT_EOF = 19;
+ {$EXTERNALSYM PSINJECT_EOF}
+ PSINJECT_ENDSTREAM = 20;
+ {$EXTERNALSYM PSINJECT_ENDSTREAM}
+ PSINJECT_DOCUMENTPROCESSCOLORSATEND = 21;
+ {$EXTERNALSYM PSINJECT_DOCUMENTPROCESSCOLORSATEND}
+
+ PSINJECT_PAGENUMBER = 100;
+ {$EXTERNALSYM PSINJECT_PAGENUMBER}
+ PSINJECT_BEGINPAGESETUP = 101;
+ {$EXTERNALSYM PSINJECT_BEGINPAGESETUP}
+ PSINJECT_ENDPAGESETUP = 102;
+ {$EXTERNALSYM PSINJECT_ENDPAGESETUP}
+ PSINJECT_PAGETRAILER = 103;
+ {$EXTERNALSYM PSINJECT_PAGETRAILER}
+ PSINJECT_PLATECOLOR = 104;
+ {$EXTERNALSYM PSINJECT_PLATECOLOR}
+
+ PSINJECT_SHOWPAGE = 105;
+ {$EXTERNALSYM PSINJECT_SHOWPAGE}
+ PSINJECT_PAGEBBOX = 106;
+ {$EXTERNALSYM PSINJECT_PAGEBBOX}
+ PSINJECT_ENDPAGECOMMENTS = 107;
+ {$EXTERNALSYM PSINJECT_ENDPAGECOMMENTS}
+
+ PSINJECT_VMSAVE = 200;
+ {$EXTERNALSYM PSINJECT_VMSAVE}
+ PSINJECT_VMRESTORE = 201;
+ {$EXTERNALSYM PSINJECT_VMRESTORE}
+
+//
+// Parameter for GET_PS_FEATURESETTING escape
+//
+
+ FEATURESETTING_NUP = 0;
+ {$EXTERNALSYM FEATURESETTING_NUP}
+ FEATURESETTING_OUTPUT = 1;
+ {$EXTERNALSYM FEATURESETTING_OUTPUT}
+ FEATURESETTING_PSLEVEL = 2;
+ {$EXTERNALSYM FEATURESETTING_PSLEVEL}
+ FEATURESETTING_CUSTPAPER = 3;
+ {$EXTERNALSYM FEATURESETTING_CUSTPAPER}
+ FEATURESETTING_MIRROR = 4;
+ {$EXTERNALSYM FEATURESETTING_MIRROR}
+ FEATURESETTING_NEGATIVE = 5;
+ {$EXTERNALSYM FEATURESETTING_NEGATIVE}
+ FEATURESETTING_PROTOCOL = 6;
+ {$EXTERNALSYM FEATURESETTING_PROTOCOL}
+
+//
+// The range of selectors between FEATURESETTING_PRIVATE_BEGIN and
+// FEATURESETTING_PRIVATE_END is reserved by Microsoft for private use
+//
+
+ FEATURESETTING_PRIVATE_BEGIN = $1000;
+ {$EXTERNALSYM FEATURESETTING_PRIVATE_BEGIN}
+ FEATURESETTING_PRIVATE_END = $1FFF;
+ {$EXTERNALSYM FEATURESETTING_PRIVATE_END}
+
+//
+// Information about output options
+//
+
+type
+ PPsFeatureOutput = ^TPsFeatureOutput;
+ _PSFEATURE_OUTPUT = record
+ bPageIndependent: BOOL;
+ bSetPageDevice: BOOL;
+ end;
+ {$EXTERNALSYM _PSFEATURE_OUTPUT}
+ PSFEATURE_OUTPUT = _PSFEATURE_OUTPUT;
+ {$EXTERNALSYM PSFEATURE_OUTPUT}
+ PPSFEATURE_OUTPUT = ^PSFEATURE_OUTPUT;
+ {$EXTERNALSYM PPSFEATURE_OUTPUT}
+ TPsFeatureOutput = _PSFEATURE_OUTPUT;
+
+//
+// Information about custom paper size
+//
+
+ PPsFeatureCustPaper = ^TPsFeatureCustPaper;
+ _PSFEATURE_CUSTPAPER = record
+ lOrientation: LONG;
+ lWidth: LONG;
+ lHeight: LONG;
+ lWidthOffset: LONG;
+ lHeightOffset: LONG;
+ end;
+ {$EXTERNALSYM _PSFEATURE_CUSTPAPER}
+ PSFEATURE_CUSTPAPER = _PSFEATURE_CUSTPAPER;
+ {$EXTERNALSYM PSFEATURE_CUSTPAPER}
+ PPSFEATURE_CUSTPAPER = ^PSFEATURE_CUSTPAPER;
+ {$EXTERNALSYM PPSFEATURE_CUSTPAPER}
+ TPsFeatureCustPaper = _PSFEATURE_CUSTPAPER;
+
+// Value returned for FEATURESETTING_PROTOCOL
+
+const
+ PSPROTOCOL_ASCII = 0;
+ {$EXTERNALSYM PSPROTOCOL_ASCII}
+ PSPROTOCOL_BCP = 1;
+ {$EXTERNALSYM PSPROTOCOL_BCP}
+ PSPROTOCOL_TBCP = 2;
+ {$EXTERNALSYM PSPROTOCOL_TBCP}
+ PSPROTOCOL_BINARY = 3;
+ {$EXTERNALSYM PSPROTOCOL_BINARY}
+
+// Flag returned from QUERYDIBSUPPORT
+
+ QDI_SETDIBITS = 1;
+ {$EXTERNALSYM QDI_SETDIBITS}
+ QDI_GETDIBITS = 2;
+ {$EXTERNALSYM QDI_GETDIBITS}
+ QDI_DIBTOSCREEN = 4;
+ {$EXTERNALSYM QDI_DIBTOSCREEN}
+ QDI_STRETCHDIB = 8;
+ {$EXTERNALSYM QDI_STRETCHDIB}
+
+// Spooler Error Codes
+
+ SP_NOTREPORTED = $4000;
+ {$EXTERNALSYM SP_NOTREPORTED}
+ SP_ERROR = DWORD(-1);
+ {$EXTERNALSYM SP_ERROR}
+ SP_APPABORT = DWORD(-2);
+ {$EXTERNALSYM SP_APPABORT}
+ SP_USERABORT = DWORD(-3);
+ {$EXTERNALSYM SP_USERABORT}
+ SP_OUTOFDISK = DWORD(-4);
+ {$EXTERNALSYM SP_OUTOFDISK}
+ SP_OUTOFMEMORY = DWORD(-5);
+ {$EXTERNALSYM SP_OUTOFMEMORY}
+
+ PR_JOBSTATUS = $0000;
+ {$EXTERNALSYM PR_JOBSTATUS}
+
+// Object Definitions for EnumObjects()
+
+ OBJ_PEN = 1;
+ {$EXTERNALSYM OBJ_PEN}
+ OBJ_BRUSH = 2;
+ {$EXTERNALSYM OBJ_BRUSH}
+ OBJ_DC = 3;
+ {$EXTERNALSYM OBJ_DC}
+ OBJ_METADC = 4;
+ {$EXTERNALSYM OBJ_METADC}
+ OBJ_PAL = 5;
+ {$EXTERNALSYM OBJ_PAL}
+ OBJ_FONT = 6;
+ {$EXTERNALSYM OBJ_FONT}
+ OBJ_BITMAP = 7;
+ {$EXTERNALSYM OBJ_BITMAP}
+ OBJ_REGION = 8;
+ {$EXTERNALSYM OBJ_REGION}
+ OBJ_METAFILE = 9;
+ {$EXTERNALSYM OBJ_METAFILE}
+ OBJ_MEMDC = 10;
+ {$EXTERNALSYM OBJ_MEMDC}
+ OBJ_EXTPEN = 11;
+ {$EXTERNALSYM OBJ_EXTPEN}
+ OBJ_ENHMETADC = 12;
+ {$EXTERNALSYM OBJ_ENHMETADC}
+ OBJ_ENHMETAFILE = 13;
+ {$EXTERNALSYM OBJ_ENHMETAFILE}
+ OBJ_COLORSPACE = 14;
+ {$EXTERNALSYM OBJ_COLORSPACE}
+
+// xform stuff
+
+ MWT_IDENTITY = 1;
+ {$EXTERNALSYM MWT_IDENTITY}
+ MWT_LEFTMULTIPLY = 2;
+ {$EXTERNALSYM MWT_LEFTMULTIPLY}
+ MWT_RIGHTMULTIPLY = 3;
+ {$EXTERNALSYM MWT_RIGHTMULTIPLY}
+
+ MWT_MIN = MWT_IDENTITY;
+ {$EXTERNALSYM MWT_MIN}
+ MWT_MAX = MWT_RIGHTMULTIPLY;
+ {$EXTERNALSYM MWT_MAX}
+
+type
+ PXform = ^TXform;
+ tagXFORM = record
+ eM11: FLOAT;
+ eM12: FLOAT;
+ eM21: FLOAT;
+ eM22: FLOAT;
+ eDx: FLOAT;
+ eDy: FLOAT;
+ end;
+ {$EXTERNALSYM tagXFORM}
+ XFORM = tagXFORM;
+ {$EXTERNALSYM XFORM}
+ LPXFORM = ^XFORM;
+ {$EXTERNALSYM LPXFORM}
+ TXform = XFORM;
+
+// Bitmap Header Definition
+
+ PBitmap = ^TBitmap;
+ tagBITMAP = record
+ bmType: LONG;
+ bmWidth: LONG;
+ bmHeight: LONG;
+ bmWidthBytes: LONG;
+ bmPlanes: WORD;
+ bmBitsPixel: WORD;
+ bmBits: LPVOID;
+ end;
+ {$EXTERNALSYM tagBITMAP}
+ BITMAP = tagBITMAP;
+ {$EXTERNALSYM BITMAP}
+ LPBITMAP = ^BITMAP;
+ {$EXTERNALSYM LPBITMAP}
+ NPBITMAP = ^BITMAP;
+ {$EXTERNALSYM NPBITMAP}
+ TBitmap = BITMAP;
+
+// #include <pshpack1.h>
+
+ PRgbTriple = ^TRgbTriple;
+ tagRGBTRIPLE = packed record
+ rgbtBlue: BYTE;
+ rgbtGreen: BYTE;
+ rgbtRed: BYTE;
+ end;
+ {$EXTERNALSYM tagRGBTRIPLE}
+ RGBTRIPLE = tagRGBTRIPLE;
+ {$EXTERNALSYM RGBTRIPLE}
+ TRgbTriple = RGBTRIPLE;
+
+// #include <poppack.h>
+
+ PRgbQuad = ^TRgbQuad;
+ tagRGBQUAD = record
+ rgbBlue: BYTE;
+ rgbGreen: BYTE;
+ rgbRed: BYTE;
+ rgbReserved: BYTE;
+ end;
+ {$EXTERNALSYM tagRGBQUAD}
+ RGBQUAD = tagRGBQUAD;
+ {$EXTERNALSYM RGBQUAD}
+ LPRGBQUAD = ^RGBQUAD;
+ {$EXTERNALSYM LPRGBQUAD}
+ TRgbQuad = RGBQUAD;
+
+// Image Color Matching color definitions
+
+const
+ CS_ENABLE = $00000001;
+ {$EXTERNALSYM CS_ENABLE}
+ CS_DISABLE = $00000002;
+ {$EXTERNALSYM CS_DISABLE}
+ CS_DELETE_TRANSFORM = $00000003;
+ {$EXTERNALSYM CS_DELETE_TRANSFORM}
+
+// Logcolorspace signature
+
+ LCS_SIGNATURE = 'PSOC';
+ {$EXTERNALSYM LCS_SIGNATURE}
+
+// Logcolorspace lcsType values
+
+ LCS_sRGB = 'sRGB';
+ {$EXTERNALSYM LCS_sRGB}
+ LCS_WINDOWS_COLOR_SPACE = 'Win '; // Windows default color space
+ {$EXTERNALSYM LCS_WINDOWS_COLOR_SPACE}
+
+type
+ LCSCSTYPE = LONG;
+ {$EXTERNALSYM LCSCSTYPE}
+
+const
+ LCS_CALIBRATED_RGB = $00000000;
+ {$EXTERNALSYM LCS_CALIBRATED_RGB}
+
+type
+ LCSGAMUTMATCH = LONG;
+ {$EXTERNALSYM LCSGAMUTMATCH }
+
+const
+ LCS_GM_BUSINESS = $00000001;
+ {$EXTERNALSYM LCS_GM_BUSINESS}
+ LCS_GM_GRAPHICS = $00000002;
+ {$EXTERNALSYM LCS_GM_GRAPHICS}
+ LCS_GM_IMAGES = $00000004;
+ {$EXTERNALSYM LCS_GM_IMAGES}
+ LCS_GM_ABS_COLORIMETRIC = $00000008;
+ {$EXTERNALSYM LCS_GM_ABS_COLORIMETRIC}
+
+// ICM Defines for results from CheckColorInGamut()
+
+ CM_OUT_OF_GAMUT = 255;
+ {$EXTERNALSYM CM_OUT_OF_GAMUT}
+ CM_IN_GAMUT = 0;
+ {$EXTERNALSYM CM_IN_GAMUT}
+
+// UpdateICMRegKey Constants
+
+ ICM_ADDPROFILE = 1;
+ {$EXTERNALSYM ICM_ADDPROFILE}
+ ICM_DELETEPROFILE = 2;
+ {$EXTERNALSYM ICM_DELETEPROFILE}
+ ICM_QUERYPROFILE = 3;
+ {$EXTERNALSYM ICM_QUERYPROFILE}
+ ICM_SETDEFAULTPROFILE = 4;
+ {$EXTERNALSYM ICM_SETDEFAULTPROFILE}
+ ICM_REGISTERICMATCHER = 5;
+ {$EXTERNALSYM ICM_REGISTERICMATCHER}
+ ICM_UNREGISTERICMATCHER = 6;
+ {$EXTERNALSYM ICM_UNREGISTERICMATCHER}
+ ICM_QUERYMATCH = 7;
+ {$EXTERNALSYM ICM_QUERYMATCH}
+
+// Macros to retrieve CMYK values from a COLORREF
+
+function GetKValue(cmyk: COLORREF): BYTE;
+{$EXTERNALSYM GetKValue}
+function GetYValue(cmyk: COLORREF): BYTE;
+{$EXTERNALSYM GetYValue}
+function GetMValue(cmyk: COLORREF): BYTE;
+{$EXTERNALSYM GetMValue}
+function GetCValue(cmyk: COLORREF): BYTE;
+{$EXTERNALSYM GetCValue}
+function CMYK(c, m, y, k: BYTE): COLORREF;
+{$EXTERNALSYM CMYK}
+
+type
+ FXPT16DOT16 = Longint;
+ {$EXTERNALSYM FXPT16DOT16}
+ LPFXPT16DOT16 = ^FXPT16DOT16;
+ {$EXTERNALSYM LPFXPT16DOT16}
+
+ FXPT2DOT30 = Longint;
+ {$EXTERNALSYM FXPT2DOT30}
+ LPFXPT2DOT30 = ^FXPT2DOT30;
+ {$EXTERNALSYM LPFXPT2DOT30}
+
+// ICM Color Definitions
+// The following two structures are used for defining RGB's in terms of CIEXYZ.
+
+ PCieXyz = ^TCieXyz;
+ tagCIEXYZ = record
+ ciexyzX: FXPT2DOT30;
+ ciexyzY: FXPT2DOT30;
+ ciexyzZ: FXPT2DOT30;
+ end;
+ {$EXTERNALSYM tagCIEXYZ}
+ CIEXYZ = tagCIEXYZ;
+ {$EXTERNALSYM CIEXYZ}
+ LPCIEXYZ = ^CIEXYZ;
+ {$EXTERNALSYM LPCIEXYZ}
+ TCieXyz = CIEXYZ;
+
+ PCieXyzTriple = ^TCieXyzTriple;
+ tagCIEXYZTRIPLE = record
+ ciexyzRed: CIEXYZ;
+ ciexyzGreen: CIEXYZ;
+ ciexyzBlue: CIEXYZ;
+ end;
+ {$EXTERNALSYM tagCIEXYZTRIPLE}
+ CIEXYZTRIPLE = tagCIEXYZTRIPLE;
+ {$EXTERNALSYM CIEXYZTRIPLE}
+ LPCIEXYZTRIPLE = ^CIEXYZTRIPLE;
+ {$EXTERNALSYM LPCIEXYZTRIPLE}
+ TCieXyzTriple = CIEXYZTRIPLE;
+
+// The next structures the logical color space. Unlike pens and brushes,
+// but like palettes, there is only one way to create a LogColorSpace.
+// A pointer to it must be passed, its elements can't be pushed as
+// arguments.
+
+ PLogColorSpaceA = ^TLogColorSpaceA;
+ tagLOGCOLORSPACEA = record
+ lcsSignature: DWORD;
+ lcsVersion: DWORD;
+ lcsSize: DWORD;
+ lcsCSType: LCSCSTYPE;
+ lcsIntent: LCSGAMUTMATCH;
+ lcsEndpoints: CIEXYZTRIPLE;
+ lcsGammaRed: DWORD;
+ lcsGammaGreen: DWORD;
+ lcsGammaBlue: DWORD;
+ lcsFilename: array [0..MAX_PATH - 1] of CHAR;
+ end;
+ {$EXTERNALSYM tagLOGCOLORSPACEA}
+ LOGCOLORSPACEA = tagLOGCOLORSPACEA;
+ {$EXTERNALSYM LOGCOLORSPACEA}
+ LPLOGCOLORSPACEA = ^LOGCOLORSPACEA;
+ {$EXTERNALSYM LPLOGCOLORSPACEA}
+ TLogColorSpaceA = LOGCOLORSPACEA;
+
+ PLogColorSpaceW = ^TLogColorSpaceW;
+ tagLOGCOLORSPACEW = record
+ lcsSignature: DWORD;
+ lcsVersion: DWORD;
+ lcsSize: DWORD;
+ lcsCSType: LCSCSTYPE;
+ lcsIntent: LCSGAMUTMATCH;
+ lcsEndpoints: CIEXYZTRIPLE;
+ lcsGammaRed: DWORD;
+ lcsGammaGreen: DWORD;
+ lcsGammaBlue: DWORD;
+ lcsFilename: array [0..MAX_PATH - 1] of WCHAR;
+ end;
+ {$EXTERNALSYM tagLOGCOLORSPACEW}
+ LOGCOLORSPACEW = tagLOGCOLORSPACEW;
+ {$EXTERNALSYM LOGCOLORSPACEW}
+ LPLOGCOLORSPACEW = ^LOGCOLORSPACEW;
+ {$EXTERNALSYM LPLOGCOLORSPACEW}
+ TLogColorSpaceW = LOGCOLORSPACEW;
+
+ {$IFDEF UNICODE}
+ LOGCOLORSPACE = LOGCOLORSPACEW;
+ {$EXTERNALSYM LOGCOLORSPACE}
+ LPLOGCOLORSPACE = LPLOGCOLORSPACEW;
+ {$EXTERNALSYM LPLOGCOLORSPACE}
+ TLogColorSpace = TLogColorSpaceW;
+ PLogColorSpace = PLogColorSpaceW;
+ {$ELSE}
+ LOGCOLORSPACE = LOGCOLORSPACEA;
+ {$EXTERNALSYM LOGCOLORSPACE}
+ LPLOGCOLORSPACE = LPLOGCOLORSPACEA;
+ {$EXTERNALSYM LPLOGCOLORSPACE}
+ TLogColorSpace = TLogColorSpaceA;
+ PLogColorSpace = PLogColorSpaceA;
+ {$ENDIF UNICODE}
+
+// structures for defining DIBs
+
+ PBitmapCoreHeader = ^TBitmapCoreHeader;
+ tagBITMAPCOREHEADER = record
+ bcSize: DWORD;
+ bcWidth: WORD;
+ bcHeight: WORD;
+ bcPlanes: WORD;
+ bcBitCount: WORD;
+ end;
+ {$EXTERNALSYM tagBITMAPCOREHEADER}
+ BITMAPCOREHEADER = tagBITMAPCOREHEADER;
+ {$EXTERNALSYM BITMAPCOREHEADER}
+ LPBITMAPCOREHEADER = ^BITMAPCOREHEADER;
+ {$EXTERNALSYM LPBITMAPCOREHEADER}
+ TBitmapCoreHeader = BITMAPCOREHEADER;
+
+ PBitmapInfoHeader = ^TBitmapInfoHeader;
+ tagBITMAPINFOHEADER = record
+ biSize: DWORD;
+ biWidth: LONG;
+ biHeight: LONG;
+ biPlanes: WORD;
+ biBitCount: WORD;
+ biCompression: DWORD;
+ biSizeImage: DWORD;
+ biXPelsPerMeter: LONG;
+ biYPelsPerMeter: LONG;
+ biClrUsed: DWORD;
+ biClrImportant: DWORD;
+ end;
+ {$EXTERNALSYM tagBITMAPINFOHEADER}
+ BITMAPINFOHEADER = tagBITMAPINFOHEADER;
+ {$EXTERNALSYM BITMAPINFOHEADER}
+ LPBITMAPINFOHEADER = ^BITMAPINFOHEADER;
+ {$EXTERNALSYM LPBITMAPINFOHEADER}
+ TBitmapInfoHeader = BITMAPINFOHEADER;
+
+ PBitmapV4Header = ^TBitmapV4Header;
+ BITMAPV4HEADER = record
+ bV4Size: DWORD;
+ bV4Width: LONG;
+ bV4Height: LONG;
+ bV4Planes: WORD;
+ bV4BitCount: WORD;
+ bV4V4Compression: DWORD;
+ bV4SizeImage: DWORD;
+ bV4XPelsPerMeter: LONG;
+ bV4YPelsPerMeter: LONG;
+ bV4ClrUsed: DWORD;
+ bV4ClrImportant: DWORD;
+ bV4RedMask: DWORD;
+ bV4GreenMask: DWORD;
+ bV4BlueMask: DWORD;
+ bV4AlphaMask: DWORD;
+ bV4CSType: DWORD;
+ bV4Endpoints: CIEXYZTRIPLE;
+ bV4GammaRed: DWORD;
+ bV4GammaGreen: DWORD;
+ bV4GammaBlue: DWORD;
+ end;
+ {$EXTERNALSYM BITMAPV4HEADER}
+ LPBITMAPV4HEADER = ^BITMAPV4HEADER;
+ {$EXTERNALSYM LPBITMAPV4HEADER}
+ TBitmapV4Header = BITMAPV4HEADER;
+
+ PBitmapV5Header = ^TBitmapV5Header;
+ BITMAPV5HEADER = record
+ bV5Size: DWORD;
+ bV5Width: LONG;
+ bV5Height: LONG;
+ bV5Planes: WORD;
+ bV5BitCount: WORD;
+ bV5Compression: DWORD;
+ bV5SizeImage: DWORD;
+ bV5XPelsPerMeter: LONG;
+ bV5YPelsPerMeter: LONG;
+ bV5ClrUsed: DWORD;
+ bV5ClrImportant: DWORD;
+ bV5RedMask: DWORD;
+ bV5GreenMask: DWORD;
+ bV5BlueMask: DWORD;
+ bV5AlphaMask: DWORD;
+ bV5CSType: DWORD;
+ bV5Endpoints: CIEXYZTRIPLE;
+ bV5GammaRed: DWORD;
+ bV5GammaGreen: DWORD;
+ bV5GammaBlue: DWORD;
+ bV5Intent: DWORD;
+ bV5ProfileData: DWORD;
+ bV5ProfileSize: DWORD;
+ bV5Reserved: DWORD;
+ end;
+ {$EXTERNALSYM BITMAPV5HEADER}
+ LPBITMAPV5HEADER = ^BITMAPV5HEADER;
+ {$EXTERNALSYM LPBITMAPV5HEADER}
+ TBitmapV5Header = BITMAPV5HEADER;
+
+// Values for bV5CSType
+
+const
+ PROFILE_LINKED = 'LINK';
+ {$EXTERNALSYM PROFILE_LINKED}
+ PROFILE_EMBEDDED = 'MBED';
+ {$EXTERNALSYM PROFILE_EMBEDDED}
+
+// constants for the biCompression field
+
+ BI_RGB = 0;
+ {$EXTERNALSYM BI_RGB}
+ BI_RLE8 = 1;
+ {$EXTERNALSYM BI_RLE8}
+ BI_RLE4 = 2;
+ {$EXTERNALSYM BI_RLE4}
+ BI_BITFIELDS = 3;
+ {$EXTERNALSYM BI_BITFIELDS}
+ BI_JPEG = 4;
+ {$EXTERNALSYM BI_JPEG}
+ BI_PNG = 5;
+ {$EXTERNALSYM BI_PNG}
+
+type
+ PBitmapInfo = ^TBitmapInfo;
+ tagBITMAPINFO = record
+ bmiHeader: BITMAPINFOHEADER;
+ bmiColors: array [0..0] of RGBQUAD;
+ end;
+ {$EXTERNALSYM tagBITMAPINFO}
+ BITMAPINFO = tagBITMAPINFO;
+ {$EXTERNALSYM BITMAPINFO}
+ LPBITMAPINFO = ^BITMAPINFO;
+ {$EXTERNALSYM LPBITMAPINFO}
+ TBitmapInfo = BITMAPINFO;
+
+ PBitmapCoreInfo = ^TBitmapCoreInfo;
+ tagBITMAPCOREINFO = record
+ bmciHeader: BITMAPCOREHEADER;
+ bmciColors: array [0..0] of RGBTRIPLE;
+ end;
+ {$EXTERNALSYM tagBITMAPCOREINFO}
+ BITMAPCOREINFO = tagBITMAPCOREINFO;
+ {$EXTERNALSYM BITMAPCOREINFO}
+ LPBITMAPCOREINFO = ^BITMAPCOREINFO;
+ {$EXTERNALSYM LPBITMAPCOREINFO}
+ TBitmapCoreInfo = BITMAPCOREINFO;
+
+// #include <pshpack2.h>
+
+ PBitmapFileHeader = ^TBitmapFileHeader;
+ tagBITMAPFILEHEADER = packed record
+ bfType: WORD;
+ bfSize: DWORD;
+ bfReserved1: WORD;
+ bfReserved2: WORD;
+ bfOffBits: DWORD;
+ end;
+ {$EXTERNALSYM tagBITMAPFILEHEADER}
+ BITMAPFILEHEADER = tagBITMAPFILEHEADER;
+ {$EXTERNALSYM BITMAPFILEHEADER}
+ LPBITMAPFILEHEADER = ^BITMAPFILEHEADER;
+ {$EXTERNALSYM BITMAPFILEHEADER}
+ TBitmapFileHeader = BITMAPFILEHEADER;
+
+// #include <poppack.h>
+
+function MAKEPOINTS(l: DWORD): POINTS;
+{$EXTERNALSYM MAKEPOINTS}
+
+type
+ PFontSignature = ^TFontSignature;
+ tagFONTSIGNATURE = record
+ fsUsb: array [0..3] of DWORD;
+ fsCsb: array [0..1] of DWORD;
+ end;
+ {$EXTERNALSYM tagFONTSIGNATURE}
+ FONTSIGNATURE = tagFONTSIGNATURE;
+ {$EXTERNALSYM FONTSIGNATURE}
+ LPFONTSIGNATURE = ^FONTSIGNATURE;
+ {$EXTERNALSYM LPFONTSIGNATURE}
+ TFontSignature = FONTSIGNATURE;
+
+ PCharSetInfo = ^TCharSetInfo;
+ tagCHARSETINFO = record
+ ciCharset: UINT;
+ ciACP: UINT;
+ fs: FONTSIGNATURE;
+ end;
+ {$EXTERNALSYM tagCHARSETINFO}
+ CHARSETINFO = tagCHARSETINFO;
+ {$EXTERNALSYM CHARSETINFO}
+ LPCHARSETINFO = ^CHARSETINFO;
+ {$EXTERNALSYM LPCHARSETINFO}
+ NPCHARSETINFO = ^CHARSETINFO;
+ {$EXTERNALSYM NPCHARSETINFO}
+ TCharSetInfo = CHARSETINFO;
+
+const
+ TCI_SRCCHARSET = 1;
+ {$EXTERNALSYM TCI_SRCCHARSET}
+ TCI_SRCCODEPAGE = 2;
+ {$EXTERNALSYM TCI_SRCCODEPAGE}
+ TCI_SRCFONTSIG = 3;
+ {$EXTERNALSYM TCI_SRCFONTSIG}
+ TCI_SRCLOCALE = $1000;
+ {$EXTERNALSYM TCI_SRCLOCALE}
+
+type
+ PLocaleSignature = ^TLocaleSignature;
+ tagLOCALESIGNATURE = record
+ lsUsb: array [0..3] of DWORD;
+ lsCsbDefault: array [0..1] of DWORD;
+ lsCsbSupported: array [0..1] of DWORD;
+ end;
+ {$EXTERNALSYM tagLOCALESIGNATURE}
+ LOCALESIGNATURE = tagLOCALESIGNATURE;
+ {$EXTERNALSYM LOCALESIGNATURE}
+ LPLOCALESIGNATURE = ^LOCALESIGNATURE;
+ {$EXTERNALSYM LPLOCALESIGNATURE}
+ TLocaleSignature = LOCALESIGNATURE;
+
+// Clipboard Metafile Picture Structure
+
+ PHandleTable = ^THandleTable;
+ tagHANDLETABLE = record
+ objectHandle: array [0..0] of HGDIOBJ;
+ end;
+ {$EXTERNALSYM tagHANDLETABLE}
+ HANDLETABLE = tagHANDLETABLE;
+ {$EXTERNALSYM HANDLETABLE}
+ LPHANDLETABLE = ^HANDLETABLE;
+ {$EXTERNALSYM LPHANDLETABLE}
+ THandleTable = HANDLETABLE;
+
+ PMetaRecord = ^TMetaRecord;
+ tagMETARECORD = record
+ rdSize: DWORD;
+ rdFunction: WORD;
+ rdParm: array [0..0] of WORD;
+ end;
+ {$EXTERNALSYM tagMETARECORD}
+ METARECORD = tagMETARECORD;
+ {$EXTERNALSYM METARECORD}
+ LPMETARECORD = ^METARECORD;
+ {$EXTERNALSYM LPMETARECORD}
+ TMetaRecord = METARECORD;
+
+ PMetaFilePict = ^TMetaFilePict;
+ tagMETAFILEPICT = record
+ mm: LONG;
+ xExt: LONG;
+ yExt: LONG;
+ hMF: HMETAFILE;
+ end;
+ {$EXTERNALSYM tagMETAFILEPICT}
+ METAFILEPICT = tagMETAFILEPICT;
+ {$EXTERNALSYM METAFILEPICT}
+ LPMETAFILEPICT = ^METAFILEPICT;
+ {$EXTERNALSYM LPMETAFILEPICT}
+ TMetaFilePict = METAFILEPICT;
+
+// #include <pshpack2.h>
+
+ PMetaHeader = ^TMetaHeader;
+ tagMETAHEADER = packed record
+ mtType: WORD;
+ mtHeaderSize: WORD;
+ mtVersion: WORD;
+ mtSize: DWORD;
+ mtNoObjects: WORD;
+ mtMaxRecord: DWORD;
+ mtNoParameters: WORD;
+ end;
+ {$EXTERNALSYM tagMETAHEADER}
+ METAHEADER = tagMETAHEADER;
+ {$EXTERNALSYM METAHEADER}
+ LPMETAHEADER = ^METAHEADER;
+ {$EXTERNALSYM LPMETAHEADER}
+ TMetaHeader = METAHEADER;
+
+// #include <poppack.h>
+
+// Enhanced Metafile structures
+
+ PEnhMetaRecord = ^TEnhMetaRecord;
+ tagENHMETARECORD = record
+ iType: DWORD; // Record type EMR_XXX
+ nSize: DWORD; // Record size in bytes
+ dParm: array [0..0] of DWORD; // Parameters
+ end;
+ {$EXTERNALSYM tagENHMETARECORD}
+ ENHMETARECORD = tagENHMETARECORD;
+ {$EXTERNALSYM ENHMETARECORD}
+ LPENHMETARECORD = ^ENHMETARECORD;
+ {$EXTERNALSYM LPENHMETARECORD}
+ TEnhMetaRecord = ENHMETARECORD;
+
+ PEnhMetaHeader = ^TEnhMetaHeader;
+ tagENHMETAHEADER = record
+ iType: DWORD; // Record type EMR_HEADER
+ nSize: DWORD; // Record size in bytes. This may be greater
+ // than the sizeof(ENHMETAHEADER).
+ rclBounds: RECTL; // Inclusive-inclusive bounds in device units
+ rclFrame: RECTL; // Inclusive-inclusive Picture Frame of metafile in .01 mm units
+ dSignature: DWORD; // Signature. Must be ENHMETA_SIGNATURE.
+ nVersion: DWORD; // Version number
+ nBytes: DWORD; // Size of the metafile in bytes
+ nRecords: DWORD; // Number of records in the metafile
+ nHandles: WORD; // Number of handles in the handle table
+ // Handle index zero is reserved.
+ sReserved: WORD; // Reserved. Must be zero.
+ nDescription: DWORD; // Number of chars in the unicode description string
+ // This is 0 if there is no description string
+ offDescription: DWORD; // Offset to the metafile description record.
+ // This is 0 if there is no description string
+ nPalEntries: DWORD; // Number of entries in the metafile palette.
+ szlDevice: SIZEL; // Size of the reference device in pels
+ szlMillimeters: SIZEL; // Size of the reference device in millimeters
+ cbPixelFormat: DWORD; // Size of PIXELFORMATDESCRIPTOR information
+ // This is 0 if no pixel format is set
+ offPixelFormat: DWORD; // Offset to PIXELFORMATDESCRIPTOR
+ // This is 0 if no pixel format is set
+ bOpenGL: DWORD; // TRUE if OpenGL commands are present in
+ // the metafile, otherwise FALSE
+ {$IFDEF WIN98ME_UP}
+ szlMicrometers: SIZEL; // Size of the reference device in micrometers
+ {$ENDIF WIN98ME_UP}
+ end;
+ {$EXTERNALSYM tagENHMETAHEADER}
+ ENHMETAHEADER = tagENHMETAHEADER;
+ {$EXTERNALSYM ENHMETAHEADER}
+ LPENHMETAHEADER = ^ENHMETAHEADER;
+ {$EXTERNALSYM LPENHMETAHEADER}
+ TEnhMetaHeader = tagENHMETAHEADER;
+
+// tmPitchAndFamily flags
+
+const
+ TMPF_FIXED_PITCH = $01;
+ {$EXTERNALSYM TMPF_FIXED_PITCH}
+ TMPF_VECTOR = $02;
+ {$EXTERNALSYM TMPF_VECTOR}
+ TMPF_DEVICE = $08;
+ {$EXTERNALSYM TMPF_DEVICE}
+ TMPF_TRUETYPE = $04;
+ {$EXTERNALSYM TMPF_TRUETYPE}
+
+//
+// BCHAR definition for APPs
+//
+
+type
+ {$IFDEF UNICODE}
+ BCHAR = WCHAR;
+ {$EXTERNALSYM BCHAR}
+ {$ELSE}
+ BCHAR = BYTE;
+ {$EXTERNALSYM BCHAR}
+ {$ENDIF UNICODE}
+
+type
+ PTextMetricA = ^TTextMetricA;
+ tagTEXTMETRICA = record
+ tmHeight: LONG;
+ tmAscent: LONG;
+ tmDescent: LONG;
+ tmInternalLeading: LONG;
+ tmExternalLeading: LONG;
+ tmAveCharWidth: LONG;
+ tmMaxCharWidth: LONG;
+ tmWeight: LONG;
+ tmOverhang: LONG;
+ tmDigitizedAspectX: LONG;
+ tmDigitizedAspectY: LONG;
+ tmFirstChar: BYTE;
+ tmLastChar: BYTE;
+ tmDefaultChar: BYTE;
+ tmBreakChar: BYTE;
+ tmItalic: BYTE;
+ tmUnderlined: BYTE;
+ tmStruckOut: BYTE;
+ tmPitchAndFamily: BYTE;
+ tmCharSet: BYTE;
+ end;
+ {$EXTERNALSYM tagTEXTMETRICA}
+ TEXTMETRICA = tagTEXTMETRICA;
+ {$EXTERNALSYM TEXTMETRICA}
+ LPTEXTMETRICA = ^TEXTMETRICA;
+ {$EXTERNALSYM LPTEXTMETRICA}
+ NPTEXTMETRICA = ^TEXTMETRICA;
+ {$EXTERNALSYM NPTEXTMETRICA}
+ TTextMetricA = TEXTMETRICA;
+
+ PTextMetricW = ^TTextMetricW;
+ tagTEXTMETRICW = record
+ tmHeight: LONG;
+ tmAscent: LONG;
+ tmDescent: LONG;
+ tmInternalLeading: LONG;
+ tmExternalLeading: LONG;
+ tmAveCharWidth: LONG;
+ tmMaxCharWidth: LONG;
+ tmWeight: LONG;
+ tmOverhang: LONG;
+ tmDigitizedAspectX: LONG;
+ tmDigitizedAspectY: LONG;
+ tmFirstChar: WCHAR;
+ tmLastChar: WCHAR;
+ tmDefaultChar: WCHAR;
+ tmBreakChar: WCHAR;
+ tmItalic: BYTE;
+ tmUnderlined: BYTE;
+ tmStruckOut: BYTE;
+ tmPitchAndFamily: BYTE;
+ tmCharSet: BYTE;
+ end;
+ {$EXTERNALSYM tagTEXTMETRICW}
+ TEXTMETRICW = tagTEXTMETRICW;
+ {$EXTERNALSYM TEXTMETRICW}
+ LPTEXTMETRICW = ^TEXTMETRICW;
+ {$EXTERNALSYM LPTEXTMETRICW}
+ NPTEXTMETRICW = ^TEXTMETRICW;
+ {$EXTERNALSYM NPTEXTMETRICW}
+ TTextMetricW = TEXTMETRICW;
+
+ {$IFDEF UNICODE}
+ TEXTMETRIC = TEXTMETRICW;
+ {$EXTERNALSYM TEXTMETRIC}
+ PTEXTMETRIC = PTEXTMETRICW;
+ {$EXTERNALSYM PTEXTMETRIC}
+ NPTEXTMETRIC = NPTEXTMETRICW;
+ {$EXTERNALSYM NPTEXTMETRIC}
+ LPTEXTMETRIC = LPTEXTMETRICW;
+ {$EXTERNALSYM LPTEXTMETRIC}
+ TTextMetric = TTextMetricW;
+ {$ELSE}
+ TEXTMETRIC = TEXTMETRICA;
+ {$EXTERNALSYM TEXTMETRIC}
+ NPTEXTMETRIC = NPTEXTMETRICA;
+ {$EXTERNALSYM NPTEXTMETRIC}
+ LPTEXTMETRIC = LPTEXTMETRICA;
+ {$EXTERNALSYM LPTEXTMETRIC}
+ TTextMetric = TTextMetricA;
+ {$ENDIF UNICODE}
+
+// ntmFlags field flags
+
+const
+ NTM_REGULAR = $00000040;
+ {$EXTERNALSYM NTM_REGULAR}
+ NTM_BOLD = $00000020;
+ {$EXTERNALSYM NTM_BOLD}
+ NTM_ITALIC = $00000001;
+ {$EXTERNALSYM NTM_ITALIC}
+
+// new in NT 5.0
+
+ NTM_NONNEGATIVE_AC = $00010000;
+ {$EXTERNALSYM NTM_NONNEGATIVE_AC}
+ NTM_PS_OPENTYPE = $00020000;
+ {$EXTERNALSYM NTM_PS_OPENTYPE}
+ NTM_TT_OPENTYPE = $00040000;
+ {$EXTERNALSYM NTM_TT_OPENTYPE}
+ NTM_MULTIPLEMASTER = $00080000;
+ {$EXTERNALSYM NTM_MULTIPLEMASTER}
+ NTM_TYPE1 = $00100000;
+ {$EXTERNALSYM NTM_TYPE1}
+ NTM_DSIG = $00200000;
+ {$EXTERNALSYM NTM_DSIG}
+
+// #include <pshpack4.h>
+
+type
+ PNewTextMetricA = ^TNewTextMetricA;
+ tagNEWTEXTMETRICA = record
+ tmHeight: LONG;
+ tmAscent: LONG;
+ tmDescent: LONG;
+ tmInternalLeading: LONG;
+ tmExternalLeading: LONG;
+ tmAveCharWidth: LONG;
+ tmMaxCharWidth: LONG;
+ tmWeight: LONG;
+ tmOverhang: LONG;
+ tmDigitizedAspectX: LONG;
+ tmDigitizedAspectY: LONG;
+ tmFirstChar: BYTE;
+ tmLastChar: BYTE;
+ tmDefaultChar: BYTE;
+ tmBreakChar: BYTE;
+ tmItalic: BYTE;
+ tmUnderlined: BYTE;
+ tmStruckOut: BYTE;
+ tmPitchAndFamily: BYTE;
+ tmCharSet: BYTE;
+ ntmFlags: DWORD;
+ ntmSizeEM: UINT;
+ ntmCellHeight: UINT;
+ ntmAvgWidth: UINT;
+ end;
+ {$EXTERNALSYM tagNEWTEXTMETRICA}
+ NEWTEXTMETRICA = tagNEWTEXTMETRICA;
+ {$EXTERNALSYM NEWTEXTMETRICA}
+ LPNEWTEXTMETRICA = ^NEWTEXTMETRICA;
+ {$EXTERNALSYM LPNEWTEXTMETRICA}
+ NPNEWTEXTMETRICA = ^NEWTEXTMETRICA;
+ {$EXTERNALSYM NPNEWTEXTMETRICA}
+ TNewTextMetricA = NEWTEXTMETRICA;
+
+ PNewTextMetricW = ^TNewTextMetricW;
+ tagNEWTEXTMETRICW = record
+ tmHeight: LONG;
+ tmAscent: LONG;
+ tmDescent: LONG;
+ tmInternalLeading: LONG;
+ tmExternalLeading: LONG;
+ tmAveCharWidth: LONG;
+ tmMaxCharWidth: LONG;
+ tmWeight: LONG;
+ tmOverhang: LONG;
+ tmDigitizedAspectX: LONG;
+ tmDigitizedAspectY: LONG;
+ tmFirstChar: WCHAR;
+ tmLastChar: WCHAR;
+ tmDefaultChar: WCHAR;
+ tmBreakChar: WCHAR;
+ tmItalic: BYTE;
+ tmUnderlined: BYTE;
+ tmStruckOut: BYTE;
+ tmPitchAndFamily: BYTE;
+ tmCharSet: BYTE;
+ ntmFlags: DWORD;
+ ntmSizeEM: UINT;
+ ntmCellHeight: UINT;
+ ntmAvgWidth: UINT;
+ end;
+ {$EXTERNALSYM tagNEWTEXTMETRICW}
+ NEWTEXTMETRICW = tagNEWTEXTMETRICW;
+ {$EXTERNALSYM NEWTEXTMETRICW}
+ LPNEWTEXTMETRICW = ^NEWTEXTMETRICW;
+ {$EXTERNALSYM LPNEWTEXTMETRICW}
+ NPNEWTEXTMETRICW = ^NEWTEXTMETRICW;
+ {$EXTERNALSYM NPNEWTEXTMETRICW}
+ TNewTextMetricW = NEWTEXTMETRICW;
+
+ {$IFDEF UNICODE}
+ NEWTEXTMETRIC = NEWTEXTMETRICW;
+ {$EXTERNALSYM NEWTEXTMETRIC}
+ PNEWTEXTMETRIC = PNEWTEXTMETRICW;
+ {$EXTERNALSYM PNEWTEXTMETRIC}
+ NPNEWTEXTMETRIC = NPNEWTEXTMETRICW;
+ {$EXTERNALSYM NPNEWTEXTMETRIC}
+ LPNEWTEXTMETRIC = LPNEWTEXTMETRICW;
+ {$EXTERNALSYM LPNEWTEXTMETRIC}
+ TNewTextMetric = TNewTextMetricW;
+ {$ELSE}
+ NEWTEXTMETRIC = NEWTEXTMETRICW;
+ {$EXTERNALSYM NEWTEXTMETRIC}
+ PNEWTEXTMETRIC = PNEWTEXTMETRICW;
+ {$EXTERNALSYM PNEWTEXTMETRIC}
+ NPNEWTEXTMETRIC = NPNEWTEXTMETRICW;
+ {$EXTERNALSYM NPNEWTEXTMETRIC}
+ LPNEWTEXTMETRIC = LPNEWTEXTMETRICW;
+ {$EXTERNALSYM LPNEWTEXTMETRIC}
+ TNewTextMetric = TNewTextMetricW;
+ {$ENDIF UNICODE}
+
+// #include <poppack.h>
+
+ PNewTextMetricExA = ^TNewTextMetricExA;
+ tagNEWTEXTMETRICEXA = record
+ ntmTm: NEWTEXTMETRICA;
+ ntmFontSig: FONTSIGNATURE;
+ end;
+ {$EXTERNALSYM tagNEWTEXTMETRICEXA}
+ NEWTEXTMETRICEXA = tagNEWTEXTMETRICEXA;
+ {$EXTERNALSYM NEWTEXTMETRICEXA}
+ TNewTextMetricExA = NEWTEXTMETRICEXA;
+
+ PNewTextMetricExW = ^TNewTextMetricExW;
+ tagNEWTEXTMETRICEXW = record
+ ntmTm: NEWTEXTMETRICW;
+ ntmFontSig: FONTSIGNATURE;
+ end;
+ {$EXTERNALSYM tagNEWTEXTMETRICEXW}
+ NEWTEXTMETRICEXW = tagNEWTEXTMETRICEXW;
+ {$EXTERNALSYM NEWTEXTMETRICEXW}
+ TNewTextMetricExW = NEWTEXTMETRICEXW;
+
+ {$IFDEF UNICODE}
+ NEWTEXTMETRICEX = NEWTEXTMETRICEXW;
+ {$EXTERNALSYM NEWTEXTMETRICEX}
+ TNewTextMetricEx = TNewTextMetricExW;
+ PNewTextMetricEx = PNewTextMetricExW;
+ {$ELSE}
+ NEWTEXTMETRICEX = NEWTEXTMETRICEXA;
+ {$EXTERNALSYM NEWTEXTMETRICEX}
+ TNewTextMetricEx = TNewTextMetricExA;
+ PNewTextMetricEx = PNewTextMetricExA;
+ {$ENDIF UNICODE}
+
+// GDI Logical Objects:
+
+// Pel Array
+
+ PPelArray = ^TPelArray;
+ tagPELARRAY = record
+ paXCount: LONG;
+ paYCount: LONG;
+ paXExt: LONG;
+ paYExt: LONG;
+ paRGBs: BYTE;
+ end;
+ {$EXTERNALSYM tagPELARRAY}
+ PELARRAY = tagPELARRAY;
+ {$EXTERNALSYM PELARRAY}
+ LPPELARRAY = ^PELARRAY;
+ {$EXTERNALSYM LPPELARRAY}
+ TPelArray = PELARRAY;
+
+// Logical Brush (or Pattern)
+
+ PLogBrush = ^TLogBrush;
+ tagLOGBRUSH = record
+ lbStyle: UINT;
+ lbColor: COLORREF;
+ lbHatch: ULONG_PTR; // Sundown: lbHatch could hold a HANDLE
+ end;
+ {$EXTERNALSYM tagLOGBRUSH}
+ LOGBRUSH = tagLOGBRUSH;
+ {$EXTERNALSYM LOGBRUSH}
+ LPLOGBRUSH = ^LOGBRUSH;
+ {$EXTERNALSYM LPLOGBRUSH}
+ NPLOGBRUSH = ^LOGBRUSH;
+ {$EXTERNALSYM NPLOGBRUSH}
+ TLogBrush = LOGBRUSH;
+
+ PLogBrush32 = ^TLogBrush32;
+ tagLOGBRUSH32 = record
+ lbStyle: UINT;
+ lbColor: COLORREF;
+ lbHatch: ULONG;
+ end;
+ {$EXTERNALSYM tagLOGBRUSH32}
+ LOGBRUSH32 = tagLOGBRUSH32;
+ {$EXTERNALSYM LOGBRUSH32}
+ LPLOGBRUSH32 = ^LOGBRUSH32;
+ {$EXTERNALSYM LPLOGBRUSH32}
+ NPLOGBRUSH32 = ^LOGBRUSH32;
+ {$EXTERNALSYM NPLOGBRUSH32}
+ TLogBrush32 = LOGBRUSH32;
+
+ PATTERN = LOGBRUSH;
+ {$EXTERNALSYM PATTERN}
+ PPATTERN = ^PATTERN;
+ {$EXTERNALSYM PPATTERN}
+ LPPATTERN = ^PATTERN;
+ {$EXTERNALSYM LPPATTERN}
+ NPPATTERN = ^PATTERN;
+ {$EXTERNALSYM NPPATTERN}
+
+// Logical Pen
+
+ PLogPen = ^TLogPen;
+ tagLOGPEN = record
+ lopnStyle: UINT;
+ lopnWidth: POINT;
+ lopnColor: COLORREF;
+ end;
+ {$EXTERNALSYM tagLOGPEN}
+ LOGPEN = tagLOGPEN;
+ {$EXTERNALSYM LOGPEN}
+ LPLOGPEN = ^LOGPEN;
+ {$EXTERNALSYM LPLOGPEN}
+ NPLOGPEN = ^LOGPEN;
+ {$EXTERNALSYM NPLOGPEN}
+ TLogPen = LOGPEN;
+
+ PExtLogPen = ^TExtLogPen;
+ tagEXTLOGPEN = record
+ elpPenStyle: DWORD;
+ elpWidth: DWORD;
+ elpBrushStyle: UINT;
+ elpColor: COLORREF;
+ elpHatch: ULONG_PTR; // Sundown: elpHatch could take a HANDLE
+ elpNumEntries: DWORD;
+ elpStyleEntry: array [0..0] of DWORD;
+ end;
+ {$EXTERNALSYM tagEXTLOGPEN}
+ EXTLOGPEN = tagEXTLOGPEN;
+ {$EXTERNALSYM EXTLOGPEN}
+ LPEXTLOGPEN = ^EXTLOGPEN;
+ {$EXTERNALSYM LPEXTLOGPEN}
+ NPEXTLOGPEN = ^EXTLOGPEN;
+ {$EXTERNALSYM NPEXTLOGPEN}
+ TExtLogPen = EXTLOGPEN;
+
+ PPaletteEntry = ^TPaletteEntry;
+ tagPALETTEENTRY = record
+ peRed: BYTE;
+ peGreen: BYTE;
+ peBlue: BYTE;
+ peFlags: BYTE;
+ end;
+ {$EXTERNALSYM tagPALETTEENTRY}
+ PALETTEENTRY = tagPALETTEENTRY;
+ {$EXTERNALSYM PALETTEENTRY}
+ LPPALETTEENTRY = ^PALETTEENTRY;
+ {$EXTERNALSYM LPPALETTEENTRY}
+ TPaletteEntry = PALETTEENTRY;
+
+// Logical Palette
+
+ PLogPalette = ^TLogPalette;
+ tagLOGPALETTE = record
+ palVersion: WORD;
+ palNumEntries: WORD;
+ palPalEntry: array [0..0] of PALETTEENTRY;
+ end;
+ {$EXTERNALSYM tagLOGPALETTE}
+ LOGPALETTE = tagLOGPALETTE;
+ {$EXTERNALSYM LOGPALETTE}
+ LPLOGPALETTE = ^LOGPALETTE;
+ {$EXTERNALSYM LPLOGPALETTE}
+ NPLOGPALETTE = ^LOGPALETTE;
+ {$EXTERNALSYM NPLOGPALETTE}
+ TLogPalette = LOGPALETTE;
+
+// Logical Font
+
+const
+ LF_FACESIZE = 32;
+ {$EXTERNALSYM LF_FACESIZE}
+
+type
+ PLogFontA = ^TLogFontA;
+ tagLOGFONTA = record
+ lfHeight: LONG;
+ lfWidth: LONG;
+ lfEscapement: LONG;
+ lfOrientation: LONG;
+ lfWeight: LONG;
+ lfItalic: BYTE;
+ lfUnderline: BYTE;
+ lfStrikeOut: BYTE;
+ lfCharSet: BYTE;
+ lfOutPrecision: BYTE;
+ lfClipPrecision: BYTE;
+ lfQuality: BYTE;
+ lfPitchAndFamily: BYTE;
+ lfFaceName: array [0..LF_FACESIZE - 1] of CHAR;
+ end;
+ {$EXTERNALSYM tagLOGFONTA}
+ LOGFONTA = tagLOGFONTA;
+ {$EXTERNALSYM LOGFONTA}
+ LPLOGFONTA = ^LOGFONTA;
+ {$EXTERNALSYM LPLOGFONTA}
+ NPLOGFONTA = ^LOGFONTA;
+ {$EXTERNALSYM NPLOGFONTA}
+ TLogFontA = LOGFONTA;
+
+ PLogFontW = ^TLogFontW;
+ tagLOGFONTW = record
+ lfHeight: LONG;
+ lfWidth: LONG;
+ lfEscapement: LONG;
+ lfOrientation: LONG;
+ lfWeight: LONG;
+ lfItalic: BYTE;
+ lfUnderline: BYTE;
+ lfStrikeOut: BYTE;
+ lfCharSet: BYTE;
+ lfOutPrecision: BYTE;
+ lfClipPrecision: BYTE;
+ lfQuality: BYTE;
+ lfPitchAndFamily: BYTE;
+ lfFaceName: array [0..LF_FACESIZE - 1] of WCHAR;
+ end;
+ {$EXTERNALSYM tagLOGFONTW}
+ LOGFONTW = tagLOGFONTW;
+ {$EXTERNALSYM LOGFONTW}
+ LPLOGFONTW = ^LOGFONTW;
+ {$EXTERNALSYM LPLOGFONTW}
+ NPLOGFONTW = ^LOGFONTW;
+ {$EXTERNALSYM NPLOGFONTW}
+ TLogFontW = LOGFONTW;
+
+ {$IFDEF UNICODE}
+ LOGFONT = LOGFONTW;
+ {$EXTERNALSYM LOGFONT}
+ PLOGFONT = PLOGFONTW;
+ {$EXTERNALSYM PLOGFONT}
+ NPLOGFONT = NPLOGFONTW;
+ {$EXTERNALSYM NPLOGFONT}
+ LPLOGFONT = LPLOGFONTW;
+ {$EXTERNALSYM LPLOGFONT}
+ TLogFont = TLogFontW;
+ {$ELSE}
+ LOGFONT = LOGFONTA;
+ {$EXTERNALSYM LOGFONT}
+ PLOGFONT = PLOGFONTA;
+ {$EXTERNALSYM PLOGFONT}
+ NPLOGFONT = NPLOGFONTA;
+ {$EXTERNALSYM NPLOGFONT}
+ LPLOGFONT = LPLOGFONTA;
+ {$EXTERNALSYM LPLOGFONT}
+ TLogFont = TLogFontA;
+ {$ENDIF UNICODE}
+
+const
+ LF_FULLFACESIZE = 64;
+ {$EXTERNALSYM LF_FULLFACESIZE}
+
+// Structure passed to FONTENUMPROC
+
+type
+ PEnumLogFontA = ^TEnumLogFontA;
+ tagENUMLOGFONTA = record
+ elfLogFont: LOGFONTA;
+ elfFullName: array [ 0..LF_FULLFACESIZE - 1] of BYTE;
+ elfStyle: array [0..LF_FACESIZE - 1] of BYTE;
+ end;
+ {$EXTERNALSYM tagENUMLOGFONTA}
+ ENUMLOGFONTA = tagENUMLOGFONTA;
+ {$EXTERNALSYM ENUMLOGFONTA}
+ LPENUMLOGFONTA = ^ENUMLOGFONTA;
+ {$EXTERNALSYM LPENUMLOGFONTA}
+ TEnumLogFontA = ENUMLOGFONTA;
+
+// Structure passed to FONTENUMPROC
+
+ PEnumLogFontW = ^TEnumLogFontW;
+ tagENUMLOGFONTW = record
+ elfLogFont: LOGFONTW;
+ elfFullName: array [0..LF_FULLFACESIZE - 1] of WCHAR;
+ elfStyle: array [0..LF_FACESIZE - 1] of WCHAR;
+ end;
+ {$EXTERNALSYM tagENUMLOGFONTW}
+ ENUMLOGFONTW = tagENUMLOGFONTW;
+ {$EXTERNALSYM ENUMLOGFONTW}
+ LPENUMLOGFONTW = ^ENUMLOGFONTW;
+ {$EXTERNALSYM LPENUMLOGFONTW}
+ TEnumLogFontW = ENUMLOGFONTW;
+
+ {$IFDEF UNICODE}
+ ENUMLOGFONT = ENUMLOGFONTW;
+ {$EXTERNALSYM ENUMLOGFONT}
+ LPENUMLOGFONT = LPENUMLOGFONTW;
+ {$EXTERNALSYM LPENUMLOGFONT}
+ TEnumLogFont = TEnumLogFontW;
+ PEnumLogFont = PEnumLogFontW;
+ {$ELSE}
+ ENUMLOGFONT = ENUMLOGFONTA;
+ {$EXTERNALSYM ENUMLOGFONT}
+ LPENUMLOGFONT = LPENUMLOGFONTA;
+ {$EXTERNALSYM LPENUMLOGFONT}
+ TEnumLogFont = TEnumLogFontA;
+ PEnumLogFont = PEnumLogFontA;
+ {$ENDIF UNICODE}
+
+ PEnumLogFontExA = ^TEnumLogFontExA;
+ tagENUMLOGFONTEXA = record
+ elfLogFont: LOGFONTA;
+ elfFullName: array [0..LF_FULLFACESIZE - 1] of BYTE;
+ elfStyle: array [0..LF_FACESIZE - 1] of BYTE;
+ elfScript: array [0..LF_FACESIZE - 1] of BYTE;
+ end;
+ {$EXTERNALSYM tagENUMLOGFONTEXA}
+ ENUMLOGFONTEXA = tagENUMLOGFONTEXA;
+ {$EXTERNALSYM ENUMLOGFONTEXA}
+ LPENUMLOGFONTEXA = ^ENUMLOGFONTEXA;
+ {$EXTERNALSYM LPENUMLOGFONTEXA}
+ TEnumLogFontExA = ENUMLOGFONTEXA;
+
+ PEnumLogFontExW = ^TEnumLogFontExW;
+ tagENUMLOGFONTEXW = record
+ elfLogFont: LOGFONTW;
+ elfFullName: array [0..LF_FULLFACESIZE - 1] of WCHAR;
+ elfStyle: array [0..LF_FACESIZE - 1] of WCHAR;
+ elfScript: array [0..LF_FACESIZE - 1] of WCHAR;
+ end;
+ {$EXTERNALSYM tagENUMLOGFONTEXW}
+ ENUMLOGFONTEXW = tagENUMLOGFONTEXW;
+ {$EXTERNALSYM ENUMLOGFONTEXW}
+ LPENUMLOGFONTEXW = ^ENUMLOGFONTEXW;
+ {$EXTERNALSYM LPENUMLOGFONTEXW}
+ TEnumLogFontExW = ENUMLOGFONTEXW;
+
+ {$IFDEF UNICODE}
+ ENUMLOGFONTEX = ENUMLOGFONTEXW;
+ {$EXTERNALSYM ENUMLOGFONTEX}
+ LPENUMLOGFONTEX = LPENUMLOGFONTEXW;
+ {$EXTERNALSYM LPENUMLOGFONTEX}
+ TEnumLogFontEx = TEnumLogFontExW;
+ PEnumLogFontEx = PEnumLogFontExW;
+ {$ELSE}
+ ENUMLOGFONTEX = ENUMLOGFONTEXA;
+ {$EXTERNALSYM ENUMLOGFONTEX}
+ LPENUMLOGFONTEX = LPENUMLOGFONTEXA;
+ {$EXTERNALSYM LPENUMLOGFONTEX}
+ TEnumLogFontEx = TEnumLogFontExA;
+ PEnumLogFontEx = PEnumLogFontExA;
+ {$ENDIF UNICODE}
+
+const
+ OUT_DEFAULT_PRECIS = 0;
+ {$EXTERNALSYM OUT_DEFAULT_PRECIS}
+ OUT_STRING_PRECIS = 1;
+ {$EXTERNALSYM OUT_STRING_PRECIS}
+ OUT_CHARACTER_PRECIS = 2;
+ {$EXTERNALSYM OUT_CHARACTER_PRECIS}
+ OUT_STROKE_PRECIS = 3;
+ {$EXTERNALSYM OUT_STROKE_PRECIS}
+ OUT_TT_PRECIS = 4;
+ {$EXTERNALSYM OUT_TT_PRECIS}
+ OUT_DEVICE_PRECIS = 5;
+ {$EXTERNALSYM OUT_DEVICE_PRECIS}
+ OUT_RASTER_PRECIS = 6;
+ {$EXTERNALSYM OUT_RASTER_PRECIS}
+ OUT_TT_ONLY_PRECIS = 7;
+ {$EXTERNALSYM OUT_TT_ONLY_PRECIS}
+ OUT_OUTLINE_PRECIS = 8;
+ {$EXTERNALSYM OUT_OUTLINE_PRECIS}
+ OUT_SCREEN_OUTLINE_PRECIS = 9;
+ {$EXTERNALSYM OUT_SCREEN_OUTLINE_PRECIS}
+ OUT_PS_ONLY_PRECIS = 10;
+ {$EXTERNALSYM OUT_PS_ONLY_PRECIS}
+
+ CLIP_DEFAULT_PRECIS = 0;
+ {$EXTERNALSYM CLIP_DEFAULT_PRECIS}
+ CLIP_CHARACTER_PRECIS = 1;
+ {$EXTERNALSYM CLIP_CHARACTER_PRECIS}
+ CLIP_STROKE_PRECIS = 2;
+ {$EXTERNALSYM CLIP_STROKE_PRECIS}
+ CLIP_MASK = $f;
+ {$EXTERNALSYM CLIP_MASK}
+ CLIP_LH_ANGLES = 1 shl 4;
+ {$EXTERNALSYM CLIP_LH_ANGLES}
+ CLIP_TT_ALWAYS = 2 shl 4;
+ {$EXTERNALSYM CLIP_TT_ALWAYS}
+ CLIP_DFA_DISABLE = 4 shl 4;
+ {$EXTERNALSYM CLIP_DFA_DISABLE}
+ CLIP_EMBEDDED = 8 shl 4;
+ {$EXTERNALSYM CLIP_EMBEDDED}
+
+ DEFAULT_QUALITY = 0;
+ {$EXTERNALSYM DEFAULT_QUALITY}
+ DRAFT_QUALITY = 1;
+ {$EXTERNALSYM DRAFT_QUALITY}
+ PROOF_QUALITY = 2;
+ {$EXTERNALSYM PROOF_QUALITY}
+ NONANTIALIASED_QUALITY = 3;
+ {$EXTERNALSYM NONANTIALIASED_QUALITY}
+ ANTIALIASED_QUALITY = 4;
+ {$EXTERNALSYM ANTIALIASED_QUALITY}
+ CLEARTYPE_QUALITY = 5;
+ {$EXTERNALSYM CLEARTYPE_QUALITY}
+
+//#if (_WIN32_WINNT >= 0x0501)
+ CLEARTYPE_NATURAL_QUALITY = 6;
+ {$EXTERNALSYM CLEARTYPE_NATURAL_QUALITY}
+//#endif
+
+ DEFAULT_PITCH = 0;
+ {$EXTERNALSYM DEFAULT_PITCH}
+ FIXED_PITCH = 1;
+ {$EXTERNALSYM FIXED_PITCH}
+ VARIABLE_PITCH = 2;
+ {$EXTERNALSYM VARIABLE_PITCH}
+ MONO_FONT = 8;
+ {$EXTERNALSYM MONO_FONT}
+
+ ANSI_CHARSET = 0;
+ {$EXTERNALSYM ANSI_CHARSET}
+ DEFAULT_CHARSET = 1;
+ {$EXTERNALSYM DEFAULT_CHARSET}
+ SYMBOL_CHARSET = 2;
+ {$EXTERNALSYM SYMBOL_CHARSET}
+ SHIFTJIS_CHARSET = 128;
+ {$EXTERNALSYM SHIFTJIS_CHARSET}
+ HANGEUL_CHARSET = 129;
+ {$EXTERNALSYM HANGEUL_CHARSET}
+ HANGUL_CHARSET = 129;
+ {$EXTERNALSYM HANGUL_CHARSET}
+ GB2312_CHARSET = 134;
+ {$EXTERNALSYM GB2312_CHARSET}
+ CHINESEBIG5_CHARSET = 136;
+ {$EXTERNALSYM CHINESEBIG5_CHARSET}
+ OEM_CHARSET = 255;
+ {$EXTERNALSYM OEM_CHARSET}
+ JOHAB_CHARSET = 130;
+ {$EXTERNALSYM JOHAB_CHARSET}
+ HEBREW_CHARSET = 177;
+ {$EXTERNALSYM HEBREW_CHARSET}
+ ARABIC_CHARSET = 178;
+ {$EXTERNALSYM ARABIC_CHARSET}
+ GREEK_CHARSET = 161;
+ {$EXTERNALSYM GREEK_CHARSET}
+ TURKISH_CHARSET = 162;
+ {$EXTERNALSYM TURKISH_CHARSET}
+ VIETNAMESE_CHARSET = 163;
+ {$EXTERNALSYM VIETNAMESE_CHARSET}
+ THAI_CHARSET = 222;
+ {$EXTERNALSYM THAI_CHARSET}
+ EASTEUROPE_CHARSET = 238;
+ {$EXTERNALSYM EASTEUROPE_CHARSET}
+ RUSSIAN_CHARSET = 204;
+ {$EXTERNALSYM RUSSIAN_CHARSET}
+
+ MAC_CHARSET = 77;
+ {$EXTERNALSYM MAC_CHARSET}
+ BALTIC_CHARSET = 186;
+ {$EXTERNALSYM BALTIC_CHARSET}
+
+ FS_LATIN1 = $00000001;
+ {$EXTERNALSYM FS_LATIN1}
+ FS_LATIN2 = $00000002;
+ {$EXTERNALSYM FS_LATIN2}
+ FS_CYRILLIC = $00000004;
+ {$EXTERNALSYM FS_CYRILLIC}
+ FS_GREEK = $00000008;
+ {$EXTERNALSYM FS_GREEK}
+ FS_TURKISH = $00000010;
+ {$EXTERNALSYM FS_TURKISH}
+ FS_HEBREW = $00000020;
+ {$EXTERNALSYM FS_HEBREW}
+ FS_ARABIC = $00000040;
+ {$EXTERNALSYM FS_ARABIC}
+ FS_BALTIC = $00000080;
+ {$EXTERNALSYM FS_BALTIC}
+ FS_VIETNAMESE = $00000100;
+ {$EXTERNALSYM FS_VIETNAMESE}
+ FS_THAI = $00010000;
+ {$EXTERNALSYM FS_THAI}
+ FS_JISJAPAN = $00020000;
+ {$EXTERNALSYM FS_JISJAPAN}
+ FS_CHINESESIMP = $00040000;
+ {$EXTERNALSYM FS_CHINESESIMP}
+ FS_WANSUNG = $00080000;
+ {$EXTERNALSYM FS_WANSUNG}
+ FS_CHINESETRAD = $00100000;
+ {$EXTERNALSYM FS_CHINESETRAD}
+ FS_JOHAB = $00200000;
+ {$EXTERNALSYM FS_JOHAB}
+ FS_SYMBOL = $80000000;
+ {$EXTERNALSYM FS_SYMBOL}
+
+// Font Families
+
+ FF_DONTCARE = 0 shl 4; // Don't care or don't know.
+ {$EXTERNALSYM FF_DONTCARE}
+ FF_ROMAN = 1 shl 4; // Variable stroke width, serifed.
+ {$EXTERNALSYM FF_ROMAN}
+ // Times Roman, Century Schoolbook, etc.
+ FF_SWISS = 2 shl 4; // Variable stroke width, sans-serifed.
+ {$EXTERNALSYM FF_SWISS}
+ // Helvetica, Swiss, etc.
+ FF_MODERN = 3 shl 4; // Constant stroke width, serifed or sans-serifed.
+ {$EXTERNALSYM FF_MODERN}
+ // Pica, Elite, Courier, etc.
+ FF_SCRIPT = 4 shl 4; // Cursive, etc.
+ {$EXTERNALSYM FF_SCRIPT}
+ FF_DECORATIVE = 5 shl 4; // Old English, etc.
+ {$EXTERNALSYM FF_DECORATIVE}
+
+// Font Weights
+
+ FW_DONTCARE = 0;
+ {$EXTERNALSYM FW_DONTCARE}
+ FW_THIN = 100;
+ {$EXTERNALSYM FW_THIN}
+ FW_EXTRALIGHT = 200;
+ {$EXTERNALSYM FW_EXTRALIGHT}
+ FW_LIGHT = 300;
+ {$EXTERNALSYM FW_LIGHT}
+ FW_NORMAL = 400;
+ {$EXTERNALSYM FW_NORMAL}
+ FW_MEDIUM = 500;
+ {$EXTERNALSYM FW_MEDIUM}
+ FW_SEMIBOLD = 600;
+ {$EXTERNALSYM FW_SEMIBOLD}
+ FW_BOLD = 700;
+ {$EXTERNALSYM FW_BOLD}
+ FW_EXTRABOLD = 800;
+ {$EXTERNALSYM FW_EXTRABOLD}
+ FW_HEAVY = 900;
+ {$EXTERNALSYM FW_HEAVY}
+
+ FW_ULTRALIGHT = FW_EXTRALIGHT;
+ {$EXTERNALSYM FW_ULTRALIGHT}
+ FW_REGULAR = FW_NORMAL;
+ {$EXTERNALSYM FW_REGULAR}
+ FW_DEMIBOLD = FW_SEMIBOLD;
+ {$EXTERNALSYM FW_DEMIBOLD}
+ FW_ULTRABOLD = FW_EXTRABOLD;
+ {$EXTERNALSYM FW_ULTRABOLD}
+ FW_BLACK = FW_HEAVY;
+ {$EXTERNALSYM FW_BLACK}
+
+ PANOSE_COUNT = 10;
+ {$EXTERNALSYM PANOSE_COUNT}
+ PAN_FAMILYTYPE_INDEX = 0;
+ {$EXTERNALSYM PAN_FAMILYTYPE_INDEX}
+ PAN_SERIFSTYLE_INDEX = 1;
+ {$EXTERNALSYM PAN_SERIFSTYLE_INDEX}
+ PAN_WEIGHT_INDEX = 2;
+ {$EXTERNALSYM PAN_WEIGHT_INDEX}
+ PAN_PROPORTION_INDEX = 3;
+ {$EXTERNALSYM PAN_PROPORTION_INDEX}
+ PAN_CONTRAST_INDEX = 4;
+ {$EXTERNALSYM PAN_CONTRAST_INDEX}
+ PAN_STROKEVARIATION_INDEX = 5;
+ {$EXTERNALSYM PAN_STROKEVARIATION_INDEX}
+ PAN_ARMSTYLE_INDEX = 6;
+ {$EXTERNALSYM PAN_ARMSTYLE_INDEX}
+ PAN_LETTERFORM_INDEX = 7;
+ {$EXTERNALSYM PAN_LETTERFORM_INDEX}
+ PAN_MIDLINE_INDEX = 8;
+ {$EXTERNALSYM PAN_MIDLINE_INDEX}
+ PAN_XHEIGHT_INDEX = 9;
+ {$EXTERNALSYM PAN_XHEIGHT_INDEX}
+
+ PAN_CULTURE_LATIN = 0;
+ {$EXTERNALSYM PAN_CULTURE_LATIN}
+
+type
+ PPanose = ^TPanose;
+ tagPANOSE = record
+ bFamilyType: BYTE;
+ bSerifStyle: BYTE;
+ bWeight: BYTE;
+ bProportion: BYTE;
+ bContrast: BYTE;
+ bStrokeVariation: BYTE;
+ bArmStyle: BYTE;
+ bLetterform: BYTE;
+ bMidline: BYTE;
+ bXHeight: BYTE;
+ end;
+ {$EXTERNALSYM tagPANOSE}
+ PANOSE = tagPANOSE;
+ {$EXTERNALSYM PANOSE}
+ LPPANOSE = ^PANOSE;
+ {$EXTERNALSYM LPPANOSE}
+ TPanose = PANOSE;
+
+const
+ PAN_ANY = 0; // Any
+ {$EXTERNALSYM PAN_ANY}
+ PAN_NO_FIT = 1; // No Fit
+ {$EXTERNALSYM PAN_NO_FIT}
+
+ PAN_FAMILY_TEXT_DISPLAY = 2; // Text and Display
+ {$EXTERNALSYM PAN_FAMILY_TEXT_DISPLAY}
+ PAN_FAMILY_SCRIPT = 3; // Script
+ {$EXTERNALSYM PAN_FAMILY_SCRIPT}
+ PAN_FAMILY_DECORATIVE = 4; // Decorative
+ {$EXTERNALSYM PAN_FAMILY_DECORATIVE}
+ PAN_FAMILY_PICTORIAL = 5; // Pictorial
+ {$EXTERNALSYM PAN_FAMILY_PICTORIAL}
+
+ PAN_SERIF_COVE = 2; // Cove
+ {$EXTERNALSYM PAN_SERIF_COVE}
+ PAN_SERIF_OBTUSE_COVE = 3; // Obtuse Cove
+ {$EXTERNALSYM PAN_SERIF_OBTUSE_COVE}
+ PAN_SERIF_SQUARE_COVE = 4; // Square Cove
+ {$EXTERNALSYM PAN_SERIF_SQUARE_COVE}
+ PAN_SERIF_OBTUSE_SQUARE_COVE = 5; // Obtuse Square Cove
+ {$EXTERNALSYM PAN_SERIF_OBTUSE_SQUARE_COVE}
+ PAN_SERIF_SQUARE = 6; // Square
+ {$EXTERNALSYM PAN_SERIF_SQUARE}
+ PAN_SERIF_THIN = 7; // Thin
+ {$EXTERNALSYM PAN_SERIF_THIN}
+ PAN_SERIF_BONE = 8; // Bone
+ {$EXTERNALSYM PAN_SERIF_BONE}
+ PAN_SERIF_EXAGGERATED = 9; // Exaggerated
+ {$EXTERNALSYM PAN_SERIF_EXAGGERATED}
+ PAN_SERIF_TRIANGLE = 10; // Triangle
+ {$EXTERNALSYM PAN_SERIF_TRIANGLE}
+ PAN_SERIF_NORMAL_SANS = 11; // Normal Sans
+ {$EXTERNALSYM PAN_SERIF_NORMAL_SANS}
+ PAN_SERIF_OBTUSE_SANS = 12; // Obtuse Sans
+ {$EXTERNALSYM PAN_SERIF_OBTUSE_SANS}
+ PAN_SERIF_PERP_SANS = 13; // Prep Sans
+ {$EXTERNALSYM PAN_SERIF_PERP_SANS}
+ PAN_SERIF_FLARED = 14; // Flared
+ {$EXTERNALSYM PAN_SERIF_FLARED}
+ PAN_SERIF_ROUNDED = 15; // Rounded
+ {$EXTERNALSYM PAN_SERIF_ROUNDED}
+
+ PAN_WEIGHT_VERY_LIGHT = 2; // Very Light
+ {$EXTERNALSYM PAN_WEIGHT_VERY_LIGHT}
+ PAN_WEIGHT_LIGHT = 3; // Light
+ {$EXTERNALSYM PAN_WEIGHT_LIGHT}
+ PAN_WEIGHT_THIN = 4; // Thin
+ {$EXTERNALSYM PAN_WEIGHT_THIN}
+ PAN_WEIGHT_BOOK = 5; // Book
+ {$EXTERNALSYM PAN_WEIGHT_BOOK}
+ PAN_WEIGHT_MEDIUM = 6; // Medium
+ {$EXTERNALSYM PAN_WEIGHT_MEDIUM}
+ PAN_WEIGHT_DEMI = 7; // Demi
+ {$EXTERNALSYM PAN_WEIGHT_DEMI}
+ PAN_WEIGHT_BOLD = 8; // Bold
+ {$EXTERNALSYM PAN_WEIGHT_BOLD}
+ PAN_WEIGHT_HEAVY = 9; // Heavy
+ {$EXTERNALSYM PAN_WEIGHT_HEAVY}
+ PAN_WEIGHT_BLACK = 10; // Black
+ {$EXTERNALSYM PAN_WEIGHT_BLACK}
+ PAN_WEIGHT_NORD = 11; // Nord
+ {$EXTERNALSYM PAN_WEIGHT_NORD}
+
+ PAN_PROP_OLD_STYLE = 2; // Old Style
+ {$EXTERNALSYM PAN_PROP_OLD_STYLE}
+ PAN_PROP_MODERN = 3; // Modern
+ {$EXTERNALSYM PAN_PROP_MODERN}
+ PAN_PROP_EVEN_WIDTH = 4; // Even Width
+ {$EXTERNALSYM PAN_PROP_EVEN_WIDTH}
+ PAN_PROP_EXPANDED = 5; // Expanded
+ {$EXTERNALSYM PAN_PROP_EXPANDED}
+ PAN_PROP_CONDENSED = 6; // Condensed
+ {$EXTERNALSYM PAN_PROP_CONDENSED}
+ PAN_PROP_VERY_EXPANDED = 7; // Very Expanded
+ {$EXTERNALSYM PAN_PROP_VERY_EXPANDED}
+ PAN_PROP_VERY_CONDENSED = 8; // Very Condensed
+ {$EXTERNALSYM PAN_PROP_VERY_CONDENSED}
+ PAN_PROP_MONOSPACED = 9; // Monospaced
+ {$EXTERNALSYM PAN_PROP_MONOSPACED}
+
+ PAN_CONTRAST_NONE = 2; // None
+ {$EXTERNALSYM PAN_CONTRAST_NONE}
+ PAN_CONTRAST_VERY_LOW = 3; // Very Low
+ {$EXTERNALSYM PAN_CONTRAST_VERY_LOW}
+ PAN_CONTRAST_LOW = 4; // Low
+ {$EXTERNALSYM PAN_CONTRAST_LOW}
+ PAN_CONTRAST_MEDIUM_LOW = 5; // Medium Low
+ {$EXTERNALSYM PAN_CONTRAST_MEDIUM_LOW}
+ PAN_CONTRAST_MEDIUM = 6; // Medium
+ {$EXTERNALSYM PAN_CONTRAST_MEDIUM}
+ PAN_CONTRAST_MEDIUM_HIGH = 7; // Mediim High
+ {$EXTERNALSYM PAN_CONTRAST_MEDIUM_HIGH}
+ PAN_CONTRAST_HIGH = 8; // High
+ {$EXTERNALSYM PAN_CONTRAST_HIGH}
+ PAN_CONTRAST_VERY_HIGH = 9; // Very High
+ {$EXTERNALSYM PAN_CONTRAST_VERY_HIGH}
+
+ PAN_STROKE_GRADUAL_DIAG = 2; // Gradual/Diagonal
+ {$EXTERNALSYM PAN_STROKE_GRADUAL_DIAG}
+ PAN_STROKE_GRADUAL_TRAN = 3; // Gradual/Transitional
+ {$EXTERNALSYM PAN_STROKE_GRADUAL_TRAN}
+ PAN_STROKE_GRADUAL_VERT = 4; // Gradual/Vertical
+ {$EXTERNALSYM PAN_STROKE_GRADUAL_VERT}
+ PAN_STROKE_GRADUAL_HORZ = 5; // Gradual/Horizontal
+ {$EXTERNALSYM PAN_STROKE_GRADUAL_HORZ}
+ PAN_STROKE_RAPID_VERT = 6; // Rapid/Vertical
+ {$EXTERNALSYM PAN_STROKE_RAPID_VERT}
+ PAN_STROKE_RAPID_HORZ = 7; // Rapid/Horizontal
+ {$EXTERNALSYM PAN_STROKE_RAPID_HORZ}
+ PAN_STROKE_INSTANT_VERT = 8; // Instant/Vertical
+ {$EXTERNALSYM PAN_STROKE_INSTANT_VERT}
+
+ PAN_STRAIGHT_ARMS_HORZ = 2; // Straight Arms/Horizontal
+ {$EXTERNALSYM PAN_STRAIGHT_ARMS_HORZ}
+ PAN_STRAIGHT_ARMS_WEDGE = 3; // Straight Arms/Wedge
+ {$EXTERNALSYM PAN_STRAIGHT_ARMS_WEDGE}
+ PAN_STRAIGHT_ARMS_VERT = 4; // Straight Arms/Vertical
+ {$EXTERNALSYM PAN_STRAIGHT_ARMS_VERT}
+ PAN_STRAIGHT_ARMS_SINGLE_SERIF = 5; // Straight Arms/Single-Serif
+ {$EXTERNALSYM PAN_STRAIGHT_ARMS_SINGLE_SERIF}
+ PAN_STRAIGHT_ARMS_DOUBLE_SERIF = 6; // Straight Arms/Double-Serif
+ {$EXTERNALSYM PAN_STRAIGHT_ARMS_DOUBLE_SERIF}
+ PAN_BENT_ARMS_HORZ = 7; // Non-Straight Arms/Horizontal
+ {$EXTERNALSYM PAN_BENT_ARMS_HORZ}
+ PAN_BENT_ARMS_WEDGE = 8; // Non-Straight Arms/Wedge
+ {$EXTERNALSYM PAN_BENT_ARMS_WEDGE}
+ PAN_BENT_ARMS_VERT = 9; // Non-Straight Arms/Vertical
+ {$EXTERNALSYM PAN_BENT_ARMS_VERT}
+ PAN_BENT_ARMS_SINGLE_SERIF = 10; // Non-Straight Arms/Single-Serif
+ {$EXTERNALSYM PAN_BENT_ARMS_SINGLE_SERIF}
+ PAN_BENT_ARMS_DOUBLE_SERIF = 11; // Non-Straight Arms/Double-Serif
+ {$EXTERNALSYM PAN_BENT_ARMS_DOUBLE_SERIF}
+
+ PAN_LETT_NORMAL_CONTACT = 2; // Normal/Contact
+ {$EXTERNALSYM PAN_LETT_NORMAL_CONTACT}
+ PAN_LETT_NORMAL_WEIGHTED = 3; // Normal/Weighted
+ {$EXTERNALSYM PAN_LETT_NORMAL_WEIGHTED}
+ PAN_LETT_NORMAL_BOXED = 4; // Normal/Boxed
+ {$EXTERNALSYM PAN_LETT_NORMAL_BOXED}
+ PAN_LETT_NORMAL_FLATTENED = 5; // Normal/Flattened
+ {$EXTERNALSYM PAN_LETT_NORMAL_FLATTENED}
+ PAN_LETT_NORMAL_ROUNDED = 6; // Normal/Rounded
+ {$EXTERNALSYM PAN_LETT_NORMAL_ROUNDED}
+ PAN_LETT_NORMAL_OFF_CENTER = 7; // Normal/Off Center
+ {$EXTERNALSYM PAN_LETT_NORMAL_OFF_CENTER}
+ PAN_LETT_NORMAL_SQUARE = 8; // Normal/Square
+ {$EXTERNALSYM PAN_LETT_NORMAL_SQUARE}
+ PAN_LETT_OBLIQUE_CONTACT = 9; // Oblique/Contact
+ {$EXTERNALSYM PAN_LETT_OBLIQUE_CONTACT}
+ PAN_LETT_OBLIQUE_WEIGHTED = 10; // Oblique/Weighted
+ {$EXTERNALSYM PAN_LETT_OBLIQUE_WEIGHTED}
+ PAN_LETT_OBLIQUE_BOXED = 11; // Oblique/Boxed
+ {$EXTERNALSYM PAN_LETT_OBLIQUE_BOXED}
+ PAN_LETT_OBLIQUE_FLATTENED = 12; // Oblique/Flattened
+ {$EXTERNALSYM PAN_LETT_OBLIQUE_FLATTENED}
+ PAN_LETT_OBLIQUE_ROUNDED = 13; // Oblique/Rounded
+ {$EXTERNALSYM PAN_LETT_OBLIQUE_ROUNDED}
+ PAN_LETT_OBLIQUE_OFF_CENTER = 14; // Oblique/Off Center
+ {$EXTERNALSYM PAN_LETT_OBLIQUE_OFF_CENTER}
+ PAN_LETT_OBLIQUE_SQUARE = 15; // Oblique/Square
+ {$EXTERNALSYM PAN_LETT_OBLIQUE_SQUARE}
+
+ PAN_MIDLINE_STANDARD_TRIMMED = 2; // Standard/Trimmed
+ {$EXTERNALSYM PAN_MIDLINE_STANDARD_TRIMMED}
+ PAN_MIDLINE_STANDARD_POINTED = 3; // Standard/Pointed
+ {$EXTERNALSYM PAN_MIDLINE_STANDARD_POINTED}
+ PAN_MIDLINE_STANDARD_SERIFED = 4; // Standard/Serifed
+ {$EXTERNALSYM PAN_MIDLINE_STANDARD_SERIFED}
+ PAN_MIDLINE_HIGH_TRIMMED = 5; // High/Trimmed
+ {$EXTERNALSYM PAN_MIDLINE_HIGH_TRIMMED}
+ PAN_MIDLINE_HIGH_POINTED = 6; // High/Pointed
+ {$EXTERNALSYM PAN_MIDLINE_HIGH_POINTED}
+ PAN_MIDLINE_HIGH_SERIFED = 7; // High/Serifed
+ {$EXTERNALSYM PAN_MIDLINE_HIGH_SERIFED}
+ PAN_MIDLINE_CONSTANT_TRIMMED = 8; // Constant/Trimmed
+ {$EXTERNALSYM PAN_MIDLINE_CONSTANT_TRIMMED}
+ PAN_MIDLINE_CONSTANT_POINTED = 9; // Constant/Pointed
+ {$EXTERNALSYM PAN_MIDLINE_CONSTANT_POINTED}
+ PAN_MIDLINE_CONSTANT_SERIFED = 10; // Constant/Serifed
+ {$EXTERNALSYM PAN_MIDLINE_CONSTANT_SERIFED}
+ PAN_MIDLINE_LOW_TRIMMED = 11; // Low/Trimmed
+ {$EXTERNALSYM PAN_MIDLINE_LOW_TRIMMED}
+ PAN_MIDLINE_LOW_POINTED = 12; // Low/Pointed
+ {$EXTERNALSYM PAN_MIDLINE_LOW_POINTED}
+ PAN_MIDLINE_LOW_SERIFED = 13; // Low/Serifed
+ {$EXTERNALSYM PAN_MIDLINE_LOW_SERIFED}
+
+ PAN_XHEIGHT_CONSTANT_SMALL = 2; // Constant/Small
+ {$EXTERNALSYM PAN_XHEIGHT_CONSTANT_SMALL}
+ PAN_XHEIGHT_CONSTANT_STD = 3; // Constant/Standard
+ {$EXTERNALSYM PAN_XHEIGHT_CONSTANT_STD}
+ PAN_XHEIGHT_CONSTANT_LARGE = 4; // Constant/Large
+ {$EXTERNALSYM PAN_XHEIGHT_CONSTANT_LARGE}
+ PAN_XHEIGHT_DUCKING_SMALL = 5; // Ducking/Small
+ {$EXTERNALSYM PAN_XHEIGHT_DUCKING_SMALL}
+ PAN_XHEIGHT_DUCKING_STD = 6; // Ducking/Standard
+ {$EXTERNALSYM PAN_XHEIGHT_DUCKING_STD}
+ PAN_XHEIGHT_DUCKING_LARGE = 7; // Ducking/Large
+ {$EXTERNALSYM PAN_XHEIGHT_DUCKING_LARGE}
+
+ ELF_VENDOR_SIZE = 4;
+ {$EXTERNALSYM ELF_VENDOR_SIZE}
+
+// The extended logical font
+// An extension of the ENUMLOGFONT
+
+type
+ PExtLogFontA = ^TExtLogFontA;
+ tagEXTLOGFONTA = record
+ elfLogFont: LOGFONTA;
+ elfFullName: array [0..LF_FULLFACESIZE - 1] of BYTE;
+ elfStyle: array [0..LF_FACESIZE - 1] of BYTE;
+ elfVersion: DWORD;
+ elfStyleSize: DWORD;
+ elfMatch: DWORD;
+ elfReserved: DWORD;
+ elfVendorId: array [0..ELF_VENDOR_SIZE - 1] of BYTE;
+ elfCulture: DWORD;
+ elfPanose: PANOSE;
+ end;
+ {$EXTERNALSYM tagEXTLOGFONTA}
+ EXTLOGFONTA = tagEXTLOGFONTA;
+ {$EXTERNALSYM EXTLOGFONTA}
+ LPEXTLOGFONTA = ^EXTLOGFONTA;
+ {$EXTERNALSYM LPEXTLOGFONTA}
+ NPEXTLOGFONTA = ^EXTLOGFONTA;
+ {$EXTERNALSYM NPEXTLOGFONTA}
+ TExtLogFontA = EXTLOGFONTA;
+
+ PExtLogFontW = ^TExtLogFontW;
+ tagEXTLOGFONTW = record
+ elfLogFont: LOGFONTW;
+ elfFullName: array [0..LF_FULLFACESIZE - 1] of WCHAR;
+ elfStyle: array [0..LF_FACESIZE - 1] of WCHAR;
+ elfVersion: DWORD;
+ elfStyleSize: DWORD;
+ elfMatch: DWORD;
+ elfReserved: DWORD;
+ elfVendorId: array [0..ELF_VENDOR_SIZE - 1] of BYTE;
+ elfCulture: DWORD;
+ elfPanose: PANOSE;
+ end;
+ {$EXTERNALSYM tagEXTLOGFONTW}
+ EXTLOGFONTW = tagEXTLOGFONTW;
+ {$EXTERNALSYM EXTLOGFONTW}
+ LPEXTLOGFONTW = ^EXTLOGFONTW;
+ {$EXTERNALSYM LPEXTLOGFONTW}
+ NPEXTLOGFONTW = ^EXTLOGFONTW;
+ {$EXTERNALSYM NPEXTLOGFONTW}
+ TExtLogFontW = EXTLOGFONTW;
+
+ {$IFDEF UNICODE}
+ EXTLOGFONT = EXTLOGFONTW;
+ {$EXTERNALSYM EXTLOGFONT}
+ PEXTLOGFONT = PEXTLOGFONTW;
+ {$EXTERNALSYM PEXTLOGFONT}
+ NPEXTLOGFONT = NPEXTLOGFONTW;
+ {$EXTERNALSYM NPEXTLOGFONT}
+ LPEXTLOGFONT = LPEXTLOGFONTW;
+ {$EXTERNALSYM LPEXTLOGFONT}
+ TExtLogFont = TExtLogFontW;
+ {$ELSE}
+ EXTLOGFONT = EXTLOGFONTA;
+ {$EXTERNALSYM EXTLOGFONT}
+ PEXTLOGFONT = PEXTLOGFONTA;
+ {$EXTERNALSYM PEXTLOGFONT}
+ NPEXTLOGFONT = NPEXTLOGFONTA;
+ {$EXTERNALSYM NPEXTLOGFONT}
+ LPEXTLOGFONT = LPEXTLOGFONTA;
+ {$EXTERNALSYM LPEXTLOGFONT}
+ TExtLogFont = TExtLogFontA;
+ {$ENDIF UNICODE}
+
+const
+ ELF_VERSION = 0;
+ {$EXTERNALSYM ELF_VERSION}
+ ELF_CULTURE_LATIN = 0;
+ {$EXTERNALSYM ELF_CULTURE_LATIN}
+
+// EnumFonts Masks
+
+ RASTER_FONTTYPE = $0001;
+ {$EXTERNALSYM RASTER_FONTTYPE}
+ DEVICE_FONTTYPE = $002;
+ {$EXTERNALSYM DEVICE_FONTTYPE}
+ TRUETYPE_FONTTYPE = $004;
+ {$EXTERNALSYM TRUETYPE_FONTTYPE}
+
+function RGB(r, g, b: BYTE): COLORREF;
+{$EXTERNALSYM RGB}
+function PALETTERGB(r, g, b: BYTE): COLORREF;
+{$EXTERNALSYM PALETTERGB}
+function PALETTEINDEX(i: WORD): COLORREF;
+{$EXTERNALSYM PALETTEINDEX}
+
+// palette entry flags
+
+const
+ PC_RESERVED = $01; // palette index used for animation
+ {$EXTERNALSYM PC_RESERVED}
+ PC_EXPLICIT = $02; // palette index is explicit to device
+ {$EXTERNALSYM PC_EXPLICIT}
+ PC_NOCOLLAPSE = $04; // do not match color to system palette
+ {$EXTERNALSYM PC_NOCOLLAPSE}
+
+function GetRValue(rgb: COLORREF): BYTE;
+{$EXTERNALSYM GetRValue}
+function GetGValue(rgb: COLORREF): BYTE;
+{$EXTERNALSYM GetGValue}
+function GetBValue(rgb: COLORREF): BYTE;
+{$EXTERNALSYM GetBValue}
+
+// Background Modes
+
+const
+ TRANSPARENT = 1;
+ {$EXTERNALSYM TRANSPARENT}
+ OPAQUE = 2;
+ {$EXTERNALSYM OPAQUE}
+ BKMODE_LAST = 2;
+ {$EXTERNALSYM BKMODE_LAST}
+
+// Graphics Modes
+
+ GM_COMPATIBLE = 1;
+ {$EXTERNALSYM GM_COMPATIBLE}
+ GM_ADVANCED = 2;
+ {$EXTERNALSYM GM_ADVANCED}
+ GM_LAST = 2;
+ {$EXTERNALSYM GM_LAST}
+
+// PolyDraw and GetPath point types
+
+ PT_CLOSEFIGURE = $01;
+ {$EXTERNALSYM PT_CLOSEFIGURE}
+ PT_LINETO = $02;
+ {$EXTERNALSYM PT_LINETO}
+ PT_BEZIERTO = $04;
+ {$EXTERNALSYM PT_BEZIERTO}
+ PT_MOVETO = $06;
+ {$EXTERNALSYM PT_MOVETO}
+
+// Mapping Modes
+
+ MM_TEXT = 1;
+ {$EXTERNALSYM MM_TEXT}
+ MM_LOMETRIC = 2;
+ {$EXTERNALSYM MM_LOMETRIC}
+ MM_HIMETRIC = 3;
+ {$EXTERNALSYM MM_HIMETRIC}
+ MM_LOENGLISH = 4;
+ {$EXTERNALSYM MM_LOENGLISH}
+ MM_HIENGLISH = 5;
+ {$EXTERNALSYM MM_HIENGLISH}
+ MM_TWIPS = 6;
+ {$EXTERNALSYM MM_TWIPS}
+ MM_ISOTROPIC = 7;
+ {$EXTERNALSYM MM_ISOTROPIC}
+ MM_ANISOTROPIC = 8;
+ {$EXTERNALSYM MM_ANISOTROPIC}
+
+// Min and Max Mapping Mode values
+
+ MM_MIN = MM_TEXT;
+ {$EXTERNALSYM MM_MIN}
+ MM_MAX = MM_ANISOTROPIC;
+ {$EXTERNALSYM MM_MAX}
+ MM_MAX_FIXEDSCALE = MM_TWIPS;
+ {$EXTERNALSYM MM_MAX_FIXEDSCALE}
+
+// Coordinate Modes
+
+ ABSOLUTE = 1;
+ {$EXTERNALSYM ABSOLUTE}
+ RELATIVE = 2;
+ {$EXTERNALSYM RELATIVE}
+
+// Stock Logical Objects
+
+ WHITE_BRUSH = 0;
+ {$EXTERNALSYM WHITE_BRUSH}
+ LTGRAY_BRUSH = 1;
+ {$EXTERNALSYM LTGRAY_BRUSH}
+ GRAY_BRUSH = 2;
+ {$EXTERNALSYM GRAY_BRUSH}
+ DKGRAY_BRUSH = 3;
+ {$EXTERNALSYM DKGRAY_BRUSH}
+ BLACK_BRUSH = 4;
+ {$EXTERNALSYM BLACK_BRUSH}
+ NULL_BRUSH = 5;
+ {$EXTERNALSYM NULL_BRUSH}
+ HOLLOW_BRUSH = NULL_BRUSH;
+ {$EXTERNALSYM HOLLOW_BRUSH}
+ WHITE_PEN = 6;
+ {$EXTERNALSYM WHITE_PEN}
+ BLACK_PEN = 7;
+ {$EXTERNALSYM BLACK_PEN}
+ NULL_PEN = 8;
+ {$EXTERNALSYM NULL_PEN}
+ OEM_FIXED_FONT = 10;
+ {$EXTERNALSYM OEM_FIXED_FONT}
+ ANSI_FIXED_FONT = 11;
+ {$EXTERNALSYM ANSI_FIXED_FONT}
+ ANSI_VAR_FONT = 12;
+ {$EXTERNALSYM ANSI_VAR_FONT}
+ SYSTEM_FONT = 13;
+ {$EXTERNALSYM SYSTEM_FONT}
+ DEVICE_DEFAULT_FONT = 14;
+ {$EXTERNALSYM DEVICE_DEFAULT_FONT}
+ DEFAULT_PALETTE = 15;
+ {$EXTERNALSYM DEFAULT_PALETTE}
+ SYSTEM_FIXED_FONT = 16;
+ {$EXTERNALSYM SYSTEM_FIXED_FONT}
+
+ DEFAULT_GUI_FONT = 17;
+ {$EXTERNALSYM DEFAULT_GUI_FONT}
+
+ DC_BRUSH = 18;
+ {$EXTERNALSYM DC_BRUSH}
+ DC_PEN = 19;
+ {$EXTERNALSYM DC_PEN}
+
+ {$IFDEF WIN2000_UP}
+ STOCK_LAST = 19;
+ {$EXTERNALSYM STOCK_LAST}
+ {$ELSE}
+ {$IFDEF WIN95_UP}
+ STOCK_LAST = 17;
+ {$EXTERNALSYM STOCK_LAST}
+ {$ELSE}
+ STOCK_LAST = 16;
+ {$EXTERNALSYM STOCK_LAST}
+ {$ENDIF WIN95_UP}
+ {$ENDIF WIN2000_UP}
+
+ CLR_INVALID = DWORD($FFFFFFFF);
+ {$EXTERNALSYM CLR_INVALID}
+
+// Brush Styles
+
+ BS_SOLID = 0;
+ {$EXTERNALSYM BS_SOLID}
+ BS_NULL = 1;
+ {$EXTERNALSYM BS_NULL}
+ BS_HOLLOW = BS_NULL;
+ {$EXTERNALSYM BS_HOLLOW}
+ BS_HATCHED = 2;
+ {$EXTERNALSYM BS_HATCHED}
+ BS_PATTERN = 3;
+ {$EXTERNALSYM BS_PATTERN}
+ BS_INDEXED = 4;
+ {$EXTERNALSYM BS_INDEXED}
+ BS_DIBPATTERN = 5;
+ {$EXTERNALSYM BS_DIBPATTERN}
+ BS_DIBPATTERNPT = 6;
+ {$EXTERNALSYM BS_DIBPATTERNPT}
+ BS_PATTERN8X8 = 7;
+ {$EXTERNALSYM BS_PATTERN8X8}
+ BS_DIBPATTERN8X8 = 8;
+ {$EXTERNALSYM BS_DIBPATTERN8X8}
+ BS_MONOPATTERN = 9;
+ {$EXTERNALSYM BS_MONOPATTERN}
+
+// Hatch Styles
+
+ HS_HORIZONTAL = 0; // -----
+ {$EXTERNALSYM HS_HORIZONTAL}
+ HS_VERTICAL = 1; // |||||
+ {$EXTERNALSYM HS_VERTICAL}
+ HS_FDIAGONAL = 2; // \\\\\
+ {$EXTERNALSYM HS_FDIAGONAL}
+ HS_BDIAGONAL = 3; // /////
+ {$EXTERNALSYM HS_BDIAGONAL}
+ HS_CROSS = 4; // +++++
+ {$EXTERNALSYM HS_CROSS}
+ HS_DIAGCROSS = 5; // xxxxx
+ {$EXTERNALSYM HS_DIAGCROSS}
+
+// Pen Styles
+
+ PS_SOLID = 0;
+ {$EXTERNALSYM PS_SOLID}
+ PS_DASH = 1; // -------
+ {$EXTERNALSYM PS_DASH}
+ PS_DOT = 2; // .......
+ {$EXTERNALSYM PS_DOT}
+ PS_DASHDOT = 3; // _._._._
+ {$EXTERNALSYM PS_DASHDOT}
+ PS_DASHDOTDOT = 4; // _.._.._
+ {$EXTERNALSYM PS_DASHDOTDOT}
+ PS_NULL = 5;
+ {$EXTERNALSYM PS_NULL}
+ PS_INSIDEFRAME = 6;
+ {$EXTERNALSYM PS_INSIDEFRAME}
+ PS_USERSTYLE = 7;
+ {$EXTERNALSYM PS_USERSTYLE}
+ PS_ALTERNATE = 8;
+ {$EXTERNALSYM PS_ALTERNATE}
+ PS_STYLE_MASK = $0000000F;
+ {$EXTERNALSYM PS_STYLE_MASK}
+
+ PS_ENDCAP_ROUND = $00000000;
+ {$EXTERNALSYM PS_ENDCAP_ROUND}
+ PS_ENDCAP_SQUARE = $00000100;
+ {$EXTERNALSYM PS_ENDCAP_SQUARE}
+ PS_ENDCAP_FLAT = $00000200;
+ {$EXTERNALSYM PS_ENDCAP_FLAT}
+ PS_ENDCAP_MASK = $00000F00;
+ {$EXTERNALSYM PS_ENDCAP_MASK}
+
+ PS_JOIN_ROUND = $00000000;
+ {$EXTERNALSYM PS_JOIN_ROUND}
+ PS_JOIN_BEVEL = $00001000;
+ {$EXTERNALSYM PS_JOIN_BEVEL}
+ PS_JOIN_MITER = $00002000;
+ {$EXTERNALSYM PS_JOIN_MITER}
+ PS_JOIN_MASK = $0000F000;
+ {$EXTERNALSYM PS_JOIN_MASK}
+
+ PS_COSMETIC = $00000000;
+ {$EXTERNALSYM PS_COSMETIC}
+ PS_GEOMETRIC = $00010000;
+ {$EXTERNALSYM PS_GEOMETRIC}
+ PS_TYPE_MASK = $000F0000;
+ {$EXTERNALSYM PS_TYPE_MASK}
+
+ AD_COUNTERCLOCKWISE = 1;
+ {$EXTERNALSYM AD_COUNTERCLOCKWISE}
+ AD_CLOCKWISE = 2;
+ {$EXTERNALSYM AD_CLOCKWISE}
+
+// Device Parameters for GetDeviceCaps()
+
+ DRIVERVERSION = 0; // Device driver version
+ {$EXTERNALSYM DRIVERVERSION}
+ TECHNOLOGY = 2; // Device classification
+ {$EXTERNALSYM TECHNOLOGY}
+ HORZSIZE = 4; // Horizontal size in millimeters
+ {$EXTERNALSYM HORZSIZE}
+ VERTSIZE = 6; // Vertical size in millimeters
+ {$EXTERNALSYM VERTSIZE}
+ HORZRES = 8; // Horizontal width in pixels
+ {$EXTERNALSYM HORZRES}
+ VERTRES = 10; // Vertical height in pixels
+ {$EXTERNALSYM VERTRES}
+ BITSPIXEL = 12; // Number of bits per pixel
+ {$EXTERNALSYM BITSPIXEL}
+ PLANES = 14; // Number of planes
+ {$EXTERNALSYM PLANES}
+ NUMBRUSHES = 16; // Number of brushes the device has
+ {$EXTERNALSYM NUMBRUSHES}
+ NUMPENS = 18; // Number of pens the device has
+ {$EXTERNALSYM NUMPENS}
+ NUMMARKERS = 20; // Number of markers the device has
+ {$EXTERNALSYM NUMMARKERS}
+ NUMFONTS = 22; // Number of fonts the device has
+ {$EXTERNALSYM NUMFONTS}
+ NUMCOLORS = 24; // Number of colors the device supports
+ {$EXTERNALSYM NUMCOLORS}
+ PDEVICESIZE = 26; // Size required for device descriptor
+ {$EXTERNALSYM PDEVICESIZE}
+ CURVECAPS = 28; // Curve capabilities
+ {$EXTERNALSYM CURVECAPS}
+ LINECAPS = 30; // Line capabilities
+ {$EXTERNALSYM LINECAPS}
+ POLYGONALCAPS = 32; // Polygonal capabilities
+ {$EXTERNALSYM POLYGONALCAPS}
+ TEXTCAPS = 34; // Text capabilities
+ {$EXTERNALSYM TEXTCAPS}
+ CLIPCAPS = 36; // Clipping capabilities
+ {$EXTERNALSYM CLIPCAPS}
+ RASTERCAPS = 38; // Bitblt capabilities
+ {$EXTERNALSYM RASTERCAPS}
+ ASPECTX = 40; // Length of the X leg
+ {$EXTERNALSYM ASPECTX}
+ ASPECTY = 42; // Length of the Y leg
+ {$EXTERNALSYM ASPECTY}
+ ASPECTXY = 44; // Length of the hypotenuse
+ {$EXTERNALSYM ASPECTXY}
+
+ LOGPIXELSX = 88; // Logical pixels/inch in X
+ {$EXTERNALSYM LOGPIXELSX}
+ LOGPIXELSY = 90; // Logical pixels/inch in Y
+ {$EXTERNALSYM LOGPIXELSY}
+
+ SIZEPALETTE = 104; // Number of entries in physical palette
+ {$EXTERNALSYM SIZEPALETTE}
+ NUMRESERVED = 106; // Number of reserved entries in palette
+ {$EXTERNALSYM NUMRESERVED}
+ COLORRES = 108; // Actual color resolution
+ {$EXTERNALSYM COLORRES}
+
+// Printing related DeviceCaps. These replace the appropriate Escapes
+
+ PHYSICALWIDTH = 110; // Physical Width in device units
+ {$EXTERNALSYM PHYSICALWIDTH}
+ PHYSICALHEIGHT = 111; // Physical Height in device units
+ {$EXTERNALSYM PHYSICALHEIGHT}
+ PHYSICALOFFSETX = 112; // Physical Printable Area x margin
+ {$EXTERNALSYM PHYSICALOFFSETX}
+ PHYSICALOFFSETY = 113; // Physical Printable Area y margin
+ {$EXTERNALSYM PHYSICALOFFSETY}
+ SCALINGFACTORX = 114; // Scaling factor x
+ {$EXTERNALSYM SCALINGFACTORX}
+ SCALINGFACTORY = 115; // Scaling factor y
+ {$EXTERNALSYM SCALINGFACTORY}
+
+// Display driver specific
+
+ VREFRESH = 116; // Current vertical refresh rate of the
+ {$EXTERNALSYM VREFRESH}
+ // display device (for displays only) in Hz
+ DESKTOPVERTRES = 117; // Horizontal width of entire desktop in
+ {$EXTERNALSYM DESKTOPVERTRES}
+ // pixels
+ DESKTOPHORZRES = 118; // Vertical height of entire desktop in
+ {$EXTERNALSYM DESKTOPHORZRES}
+ // pixels
+ BLTALIGNMENT = 119; // Preferred blt alignment
+ {$EXTERNALSYM BLTALIGNMENT}
+
+ SHADEBLENDCAPS = 120; // Shading and blending caps
+ {$EXTERNALSYM SHADEBLENDCAPS}
+ COLORMGMTCAPS = 121; // Color Management caps
+ {$EXTERNALSYM COLORMGMTCAPS}
+
+// Device Capability Masks:
+
+// Device Technologies
+
+ DT_PLOTTER = 0; // Vector plotter
+ {$EXTERNALSYM DT_PLOTTER}
+ DT_RASDISPLAY = 1; // Raster display
+ {$EXTERNALSYM DT_RASDISPLAY}
+ DT_RASPRINTER = 2; // Raster printer
+ {$EXTERNALSYM DT_RASPRINTER}
+ DT_RASCAMERA = 3; // Raster camera
+ {$EXTERNALSYM DT_RASCAMERA}
+ DT_CHARSTREAM = 4; // Character-stream, PLP
+ {$EXTERNALSYM DT_CHARSTREAM}
+ DT_METAFILE = 5; // Metafile, VDM
+ {$EXTERNALSYM DT_METAFILE}
+ DT_DISPFILE = 6; // Display-file
+ {$EXTERNALSYM DT_DISPFILE}
+
+// Curve Capabilities
+
+ CC_NONE = 0; // Curves not supported
+ {$EXTERNALSYM CC_NONE}
+ CC_CIRCLES = 1; // Can do circles
+ {$EXTERNALSYM CC_CIRCLES}
+ CC_PIE = 2; // Can do pie wedges
+ {$EXTERNALSYM CC_PIE}
+ CC_CHORD = 4; // Can do chord arcs
+ {$EXTERNALSYM CC_CHORD}
+ CC_ELLIPSES = 8; // Can do ellipese
+ {$EXTERNALSYM CC_ELLIPSES}
+ CC_WIDE = 16; // Can do wide lines
+ {$EXTERNALSYM CC_WIDE}
+ CC_STYLED = 32; // Can do styled lines
+ {$EXTERNALSYM CC_STYLED}
+ CC_WIDESTYLED = 64; // Can do wide styled lines
+ {$EXTERNALSYM CC_WIDESTYLED}
+ CC_INTERIORS = 128; // Can do interiors
+ {$EXTERNALSYM CC_INTERIORS}
+ CC_ROUNDRECT = 256;
+ {$EXTERNALSYM CC_ROUNDRECT}
+
+// Line Capabilities
+
+ LC_NONE = 0; // Lines not supported
+ {$EXTERNALSYM LC_NONE}
+ LC_POLYLINE = 2; // Can do polylines
+ {$EXTERNALSYM LC_POLYLINE}
+ LC_MARKER = 4; // Can do markers
+ {$EXTERNALSYM LC_MARKER}
+ LC_POLYMARKER = 8; // Can do polymarkers
+ {$EXTERNALSYM LC_POLYMARKER}
+ LC_WIDE = 16; // Can do wide lines
+ {$EXTERNALSYM LC_WIDE}
+ LC_STYLED = 32; // Can do styled lines
+ {$EXTERNALSYM LC_STYLED}
+ LC_WIDESTYLED = 64; // Can do wide styled lines
+ {$EXTERNALSYM LC_WIDESTYLED}
+ LC_INTERIORS = 128; // Can do interiors
+ {$EXTERNALSYM LC_INTERIORS}
+
+// Polygonal Capabilities
+
+ PC_NONE = 0; // Polygonals not supported
+ {$EXTERNALSYM PC_NONE}
+ PC_POLYGON = 1; // Can do polygons
+ {$EXTERNALSYM PC_POLYGON}
+ PC_RECTANGLE = 2; // Can do rectangles
+ {$EXTERNALSYM PC_RECTANGLE}
+ PC_WINDPOLYGON = 4; // Can do winding polygons
+ {$EXTERNALSYM PC_WINDPOLYGON}
+ PC_TRAPEZOID = 4; // Can do trapezoids
+ {$EXTERNALSYM PC_TRAPEZOID}
+ PC_SCANLINE = 8; // Can do scanlines
+ {$EXTERNALSYM PC_SCANLINE}
+ PC_WIDE = 16; // Can do wide borders
+ {$EXTERNALSYM PC_WIDE}
+ PC_STYLED = 32; // Can do styled borders
+ {$EXTERNALSYM PC_STYLED}
+ PC_WIDESTYLED = 64; // Can do wide styled borders
+ {$EXTERNALSYM PC_WIDESTYLED}
+ PC_INTERIORS = 128; // Can do interiors
+ {$EXTERNALSYM PC_INTERIORS}
+ PC_POLYPOLYGON = 256; // Can do polypolygons
+ {$EXTERNALSYM PC_POLYPOLYGON}
+ PC_PATHS = 512; // Can do paths
+ {$EXTERNALSYM PC_PATHS}
+
+// Clipping Capabilities
+
+ CP_NONE = 0; // No clipping of output
+ {$EXTERNALSYM CP_NONE}
+ CP_RECTANGLE = 1; // Output clipped to rects
+ {$EXTERNALSYM CP_RECTANGLE}
+ CP_REGION = 2; // obsolete
+ {$EXTERNALSYM CP_REGION}
+
+// Text Capabilities
+
+ TC_OP_CHARACTER = $00000001; // Can do OutputPrecision CHARACTER
+ {$EXTERNALSYM TC_OP_CHARACTER}
+ TC_OP_STROKE = $00000002; // Can do OutputPrecision STROKE
+ {$EXTERNALSYM TC_OP_STROKE}
+ TC_CP_STROKE = $00000004; // Can do ClipPrecision STROKE
+ {$EXTERNALSYM TC_CP_STROKE}
+ TC_CR_90 = $00000008; // Can do CharRotAbility 90
+ {$EXTERNALSYM TC_CR_90}
+ TC_CR_ANY = $00000010; // Can do CharRotAbility ANY
+ {$EXTERNALSYM TC_CR_ANY}
+ TC_SF_X_YINDEP = $00000020; // Can do ScaleFreedom X_YINDEPENDENT
+ {$EXTERNALSYM TC_SF_X_YINDEP}
+ TC_SA_DOUBLE = $00000040; // Can do ScaleAbility DOUBLE
+ {$EXTERNALSYM TC_SA_DOUBLE}
+ TC_SA_INTEGER = $00000080; // Can do ScaleAbility INTEGER
+ {$EXTERNALSYM TC_SA_INTEGER}
+ TC_SA_CONTIN = $00000100; // Can do ScaleAbility CONTINUOUS
+ {$EXTERNALSYM TC_SA_CONTIN}
+ TC_EA_DOUBLE = $00000200; // Can do EmboldenAbility DOUBLE
+ {$EXTERNALSYM TC_EA_DOUBLE}
+ TC_IA_ABLE = $00000400; // Can do ItalisizeAbility ABLE
+ {$EXTERNALSYM TC_IA_ABLE}
+ TC_UA_ABLE = $00000800; // Can do UnderlineAbility ABLE
+ {$EXTERNALSYM TC_UA_ABLE}
+ TC_SO_ABLE = $00001000; // Can do StrikeOutAbility ABLE
+ {$EXTERNALSYM TC_SO_ABLE}
+ TC_RA_ABLE = $00002000; // Can do RasterFontAble ABLE
+ {$EXTERNALSYM TC_RA_ABLE}
+ TC_VA_ABLE = $00004000; // Can do VectorFontAble ABLE
+ {$EXTERNALSYM TC_VA_ABLE}
+ TC_RESERVED = $00008000;
+ {$EXTERNALSYM TC_RESERVED}
+ TC_SCROLLBLT = $00010000; // Don't do text scroll with blt
+ {$EXTERNALSYM TC_SCROLLBLT}
+
+// Raster Capabilities
+
+ RC_BITBLT = 1; // Can do standard BLT.
+ {$EXTERNALSYM RC_BITBLT}
+ RC_BANDING = 2; // Device requires banding support
+ {$EXTERNALSYM RC_BANDING}
+ RC_SCALING = 4; // Device requires scaling support
+ {$EXTERNALSYM RC_SCALING}
+ RC_BITMAP64 = 8; // Device can support >64K bitmap
+ {$EXTERNALSYM RC_BITMAP64}
+ RC_GDI20_OUTPUT = $0010; // has 2.0 output calls
+ {$EXTERNALSYM RC_GDI20_OUTPUT}
+ RC_GDI20_STATE = $0020;
+ {$EXTERNALSYM RC_GDI20_STATE}
+ RC_SAVEBITMAP = $0040;
+ {$EXTERNALSYM RC_SAVEBITMAP}
+ RC_DI_BITMAP = $0080; // supports DIB to memory
+ {$EXTERNALSYM RC_DI_BITMAP}
+ RC_PALETTE = $0100; // supports a palette
+ {$EXTERNALSYM RC_PALETTE}
+ RC_DIBTODEV = $0200; // supports DIBitsToDevice
+ {$EXTERNALSYM RC_DIBTODEV}
+ RC_BIGFONT = $0400; // supports >64K fonts
+ {$EXTERNALSYM RC_BIGFONT}
+ RC_STRETCHBLT = $0800; // supports StretchBlt
+ {$EXTERNALSYM RC_STRETCHBLT}
+ RC_FLOODFILL = $1000; // supports FloodFill
+ {$EXTERNALSYM RC_FLOODFILL}
+ RC_STRETCHDIB = $2000; // supports StretchDIBits
+ {$EXTERNALSYM RC_STRETCHDIB}
+ RC_OP_DX_OUTPUT = $4000;
+ {$EXTERNALSYM RC_OP_DX_OUTPUT}
+ RC_DEVBITS = $8000;
+ {$EXTERNALSYM RC_DEVBITS}
+
+// Shading and blending caps
+
+ SB_NONE = $00000000;
+ {$EXTERNALSYM SB_NONE}
+ SB_CONST_ALPHA = $00000001;
+ {$EXTERNALSYM SB_CONST_ALPHA}
+ SB_PIXEL_ALPHA = $00000002;
+ {$EXTERNALSYM SB_PIXEL_ALPHA}
+ SB_PREMULT_ALPHA = $00000004;
+ {$EXTERNALSYM SB_PREMULT_ALPHA}
+
+ SB_GRAD_RECT = $00000010;
+ {$EXTERNALSYM SB_GRAD_RECT}
+ SB_GRAD_TRI = $00000020;
+ {$EXTERNALSYM SB_GRAD_TRI}
+
+// Color Management caps
+
+ CM_NONE = $00000000;
+ {$EXTERNALSYM CM_NONE}
+ CM_DEVICE_ICM = $00000001;
+ {$EXTERNALSYM CM_DEVICE_ICM}
+ CM_GAMMA_RAMP = $00000002;
+ {$EXTERNALSYM CM_GAMMA_RAMP}
+ CM_CMYK_COLOR = $00000004;
+ {$EXTERNALSYM CM_CMYK_COLOR}
+
+// DIB color table identifiers
+
+ DIB_RGB_COLORS = 0; // color table in RGBs
+ {$EXTERNALSYM DIB_RGB_COLORS}
+ DIB_PAL_COLORS = 1; // color table in palette indices
+ {$EXTERNALSYM DIB_PAL_COLORS}
+
+// constants for Get/SetSystemPaletteUse()
+
+ SYSPAL_ERROR = 0;
+ {$EXTERNALSYM SYSPAL_ERROR}
+ SYSPAL_STATIC = 1;
+ {$EXTERNALSYM SYSPAL_STATIC}
+ SYSPAL_NOSTATIC = 2;
+ {$EXTERNALSYM SYSPAL_NOSTATIC}
+ SYSPAL_NOSTATIC256 = 3;
+ {$EXTERNALSYM SYSPAL_NOSTATIC256}
+
+// constants for CreateDIBitmap
+
+ CBM_INIT = $04; // initialize bitmap
+ {$EXTERNALSYM CBM_INIT}
+
+// ExtFloodFill style flags
+
+ FLOODFILLBORDER = 0;
+ {$EXTERNALSYM FLOODFILLBORDER}
+ FLOODFILLSURFACE = 1;
+ {$EXTERNALSYM FLOODFILLSURFACE}
+
+// size of a device name string
+
+ CCHDEVICENAME = 32;
+ {$EXTERNALSYM CCHDEVICENAME}
+
+// size of a form name string
+
+ CCHFORMNAME = 32;
+ {$EXTERNALSYM CCHFORMNAME}
+
+{$IFDEF WIN98ME}
+{$IFNDEF WINNT4}
+{$DEFINE WIN98ME_UP_EXCEPT_NT4}
+{$ENDIF !WINNT4}
+{$ENDIF WIN98ME}
+
+type
+ TDmDisplayFlagsUnion = record
+ case Integer of
+ 0: (
+ dmDisplayFlags: DWORD);
+ 1: (
+ dmNup: DWORD);
+ end;
+
+ _devicemodeA = record
+ dmDeviceName: array [0..CCHDEVICENAME - 1] of BYTE;
+ dmSpecVersion: WORD;
+ dmDriverVersion: WORD;
+ dmSize: WORD;
+ dmDriverExtra: WORD;
+ dmFields: DWORD;
+ union1: record
+ case Integer of
+ // printer only fields
+ 0: (
+ dmOrientation: Smallint;
+ dmPaperSize: Smallint;
+ dmPaperLength: Smallint;
+ dmPaperWidth: Smallint;
+ dmScale: Smallint;
+ dmCopies: Smallint;
+ dmDefaultSource: Smallint;
+ dmPrintQuality: Smallint);
+ // display only fields
+ 1: (
+ dmPosition: POINTL;
+ dmDisplayOrientation: DWORD;
+ dmDisplayFixedOutput: DWORD);
+ end;
+ dmColor: Shortint;
+ dmDuplex: Shortint;
+ dmYResolution: Shortint;
+ dmTTOption: Shortint;
+ dmCollate: Shortint;
+ dmFormName: array [0..CCHFORMNAME - 1] of BYTE;
+ dmLogPixels: WORD;
+ dmBitsPerPel: DWORD;
+ dmPelsWidth: DWORD;
+ dmPelsHeight: DWORD;
+ dmDisplayFlags: TDmDisplayFlagsUnion;
+ dmDisplayFrequency: DWORD;
+ dmICMMethod: DWORD;
+ dmICMIntent: DWORD;
+ dmMediaType: DWORD;
+ dmDitherType: DWORD;
+ dmReserved1: DWORD;
+ dmReserved2: DWORD;
+ {$IFDEF WIN98ME_UP_EXCEPT_NT4}
+ dmPanningWidth: DWORD;
+ dmPanningHeight: DWORD;
+ {$ENDIF WIN98ME_UP_EXCEPT_NT4}
+ end;
+ {$EXTERNALSYM _devicemodeA}
+ DEVMODEA = _devicemodeA;
+ {$EXTERNALSYM DEVMODEA}
+ PDEVMODEA = ^DEVMODEA;
+ {$EXTERNALSYM PDEVMODEA}
+ LPDEVMODEA = ^DEVMODEA;
+ {$EXTERNALSYM LPDEVMODEA}
+ NPDEVMODEA = ^DEVMODEA;
+ {$EXTERNALSYM NPDEVMODEA}
+ TDevModeA = _devicemodeA;
+
+ _devicemodeW = record
+ dmDeviceName: array [0..CCHDEVICENAME - 1] of WCHAR;
+ dmSpecVersion: WORD;
+ dmDriverVersion: WORD;
+ dmSize: WORD;
+ dmDriverExtra: WORD;
+ dmFields: DWORD;
+ union1: record
+ case Integer of
+ // printer only fields
+ 0: (
+ dmOrientation: Smallint;
+ dmPaperSize: Smallint;
+ dmPaperLength: Smallint;
+ dmPaperWidth: Smallint;
+ dmScale: Smallint;
+ dmCopies: Smallint;
+ dmDefaultSource: Smallint;
+ dmPrintQuality: Smallint);
+ // display only fields
+ 1: (
+ dmPosition: POINTL;
+ dmDisplayOrientation: DWORD;
+ dmDisplayFixedOutput: DWORD);
+ end;
+ dmColor: Shortint;
+ dmDuplex: Shortint;
+ dmYResolution: Shortint;
+ dmTTOption: Shortint;
+ dmCollate: Shortint;
+ dmFormName: array [0..CCHFORMNAME - 1] of WCHAR;
+ dmLogPixels: WORD;
+ dmBitsPerPel: DWORD;
+ dmPelsWidth: DWORD;
+ dmPelsHeight: DWORD;
+ dmDiusplayFlags: TDmDisplayFlagsUnion;
+ dmDisplayFrequency: DWORD;
+ dmICMMethod: DWORD;
+ dmICMIntent: DWORD;
+ dmMediaType: DWORD;
+ dmDitherType: DWORD;
+ dmReserved1: DWORD;
+ dmReserved2: DWORD;
+ {$IFDEF WIN98ME_UP_EXCEPT_NT4}
+ dmPanningWidth: DWORD;
+ dmPanningHeight: DWORD;
+ {$ENDIF WIN98ME_UP_EXCEPT_NT4}
+ end;
+ {$EXTERNALSYM _devicemodeW}
+ DEVMODEW = _devicemodeW;
+ {$EXTERNALSYM DEVMODEW}
+ PDEVMODEW = ^DEVMODEW;
+ {$EXTERNALSYM PDEVMODEW}
+ LPDEVMODEW = ^DEVMODEW;
+ {$EXTERNALSYM LPDEVMODEW}
+ NPDEVMODEW = ^DEVMODEW;
+ {$EXTERNALSYM NPDEVMODEW}
+ TDevModeW = _devicemodeW;
+
+ {$IFDEF UNICODE}
+ DEVMODE = DEVMODEW;
+ {$EXTERNALSYM DEVMODE}
+ PDEVMODE = PDEVMODEW;
+ {$EXTERNALSYM PDEVMODE}
+ NPDEVMODE = NPDEVMODEW;
+ {$EXTERNALSYM NPDEVMODE}
+ LPDEVMODE = LPDEVMODEW;
+ {$EXTERNALSYM LPDEVMODE}
+ TDevMode = TDevModeW;
+ {$ELSE}
+ DEVMODE = DEVMODEA;
+ {$EXTERNALSYM DEVMODE}
+ PDEVMODE = PDEVMODEA;
+ {$EXTERNALSYM PDEVMODE}
+ NPDEVMODE = NPDEVMODEA;
+ {$EXTERNALSYM NPDEVMODE}
+ LPDEVMODE = LPDEVMODEA;
+ {$EXTERNALSYM LPDEVMODE}
+ TDevMode = TDevModeA;
+ {$ENDIF UNICODE}
+
+// current version of specification
+
+const
+ {$IFDEF WIN98ME_UP_EXCEPT_NT4}
+ DM_SPECVERSION = $0401;
+ {$EXTERNALSYM DM_SPECVERSION}
+ {$ELSE}
+ DM_SPECVERSION = $0400;
+ {$EXTERNALSYM DM_SPECVERSION}
+ {$ENDIF WIN98ME_UP_EXCEPT_NT4}
+
+{$UNDEF WIN98ME_UP_EXCEPT_NT4}
+
+// field selection bits
+
+const
+ DM_ORIENTATION = $00000001;
+ {$EXTERNALSYM DM_ORIENTATION}
+ DM_PAPERSIZE = $00000002;
+ {$EXTERNALSYM DM_PAPERSIZE}
+ DM_PAPERLENGTH = $00000004;
+ {$EXTERNALSYM DM_PAPERLENGTH}
+ DM_PAPERWIDTH = $00000008;
+ {$EXTERNALSYM DM_PAPERWIDTH}
+ DM_SCALE = $00000010;
+ {$EXTERNALSYM DM_SCALE}
+ DM_POSITION = $00000020;
+ {$EXTERNALSYM DM_POSITION}
+ DM_NUP = $00000040;
+ {$EXTERNALSYM DM_NUP}
+//#if(WINVER >= 0x0501)
+ DM_DISPLAYORIENTATION = $00000080;
+ {$EXTERNALSYM DM_DISPLAYORIENTATION}
+//#endif /* WINVER >= 0x0501 */
+ DM_COPIES = $00000100;
+ {$EXTERNALSYM DM_COPIES}
+ DM_DEFAULTSOURCE = $00000200;
+ {$EXTERNALSYM DM_DEFAULTSOURCE}
+ DM_PRINTQUALITY = $00000400;
+ {$EXTERNALSYM DM_PRINTQUALITY}
+ DM_COLOR = $00000800;
+ {$EXTERNALSYM DM_COLOR}
+ DM_DUPLEX = $00001000;
+ {$EXTERNALSYM DM_DUPLEX}
+ DM_YRESOLUTION = $00002000;
+ {$EXTERNALSYM DM_YRESOLUTION}
+ DM_TTOPTION = $00004000;
+ {$EXTERNALSYM DM_TTOPTION}
+ DM_COLLATE = $00008000;
+ {$EXTERNALSYM DM_COLLATE}
+ DM_FORMNAME = $00010000;
+ {$EXTERNALSYM DM_FORMNAME}
+ DM_LOGPIXELS = $00020000;
+ {$EXTERNALSYM DM_LOGPIXELS}
+ DM_BITSPERPEL = $00040000;
+ {$EXTERNALSYM DM_BITSPERPEL}
+ DM_PELSWIDTH = $00080000;
+ {$EXTERNALSYM DM_PELSWIDTH}
+ DM_PELSHEIGHT = $00100000;
+ {$EXTERNALSYM DM_PELSHEIGHT}
+ DM_DISPLAYFLAGS = $00200000;
+ {$EXTERNALSYM DM_DISPLAYFLAGS}
+ DM_DISPLAYFREQUENCY = $00400000;
+ {$EXTERNALSYM DM_DISPLAYFREQUENCY}
+ DM_ICMMETHOD = $00800000;
+ {$EXTERNALSYM DM_ICMMETHOD}
+ DM_ICMINTENT = $01000000;
+ {$EXTERNALSYM DM_ICMINTENT}
+ DM_MEDIATYPE = $02000000;
+ {$EXTERNALSYM DM_MEDIATYPE}
+ DM_DITHERTYPE = $04000000;
+ {$EXTERNALSYM DM_DITHERTYPE}
+ DM_PANNINGWIDTH = $08000000;
+ {$EXTERNALSYM DM_PANNINGWIDTH}
+ DM_PANNINGHEIGHT = $10000000;
+ {$EXTERNALSYM DM_PANNINGHEIGHT}
+//#if(WINVER >= 0x0501)
+ DM_DISPLAYFIXEDOUTPUT = $20000000;
+ {$EXTERNALSYM DM_DISPLAYFIXEDOUTPUT}
+//#endif /* WINVER >= 0x0501 */
+
+// orientation selections
+
+ DMORIENT_PORTRAIT = 1;
+ {$EXTERNALSYM DMORIENT_PORTRAIT}
+ DMORIENT_LANDSCAPE = 2;
+ {$EXTERNALSYM DMORIENT_LANDSCAPE}
+
+// paper selections
+
+ DMPAPER_LETTER = 1; // Letter 8 1/2 x 11 in
+ {$EXTERNALSYM DMPAPER_LETTER}
+ DMPAPER_FIRST = DMPAPER_LETTER;
+ {$EXTERNALSYM DMPAPER_FIRST}
+ DMPAPER_LETTERSMALL = 2; // Letter Small 8 1/2 x 11 in
+ {$EXTERNALSYM DMPAPER_LETTERSMALL}
+ DMPAPER_TABLOID = 3; // Tabloid 11 x 17 in
+ {$EXTERNALSYM DMPAPER_TABLOID}
+ DMPAPER_LEDGER = 4; // Ledger 17 x 11 in
+ {$EXTERNALSYM DMPAPER_LEDGER}
+ DMPAPER_LEGAL = 5; // Legal 8 1/2 x 14 in
+ {$EXTERNALSYM DMPAPER_LEGAL}
+ DMPAPER_STATEMENT = 6; // Statement 5 1/2 x 8 1/2 in
+ {$EXTERNALSYM DMPAPER_STATEMENT}
+ DMPAPER_EXECUTIVE = 7; // Executive 7 1/4 x 10 1/2 in
+ {$EXTERNALSYM DMPAPER_EXECUTIVE}
+ DMPAPER_A3 = 8; // A3 297 x 420 mm
+ {$EXTERNALSYM DMPAPER_A3}
+ DMPAPER_A4 = 9; // A4 210 x 297 mm
+ {$EXTERNALSYM DMPAPER_A4}
+ DMPAPER_A4SMALL = 10; // A4 Small 210 x 297 mm
+ {$EXTERNALSYM DMPAPER_A4SMALL}
+ DMPAPER_A5 = 11; // A5 148 x 210 mm
+ {$EXTERNALSYM DMPAPER_A5}
+ DMPAPER_B4 = 12; // B4 (JIS) 250 x 354
+ {$EXTERNALSYM DMPAPER_B4}
+ DMPAPER_B5 = 13; // B5 (JIS) 182 x 257 mm
+ {$EXTERNALSYM DMPAPER_B5}
+ DMPAPER_FOLIO = 14; // Folio 8 1/2 x 13 in
+ {$EXTERNALSYM DMPAPER_FOLIO}
+ DMPAPER_QUARTO = 15; // Quarto 215 x 275 mm
+ {$EXTERNALSYM DMPAPER_QUARTO}
+ DMPAPER_10X14 = 16; // 10x14 in
+ {$EXTERNALSYM DMPAPER_10X14}
+ DMPAPER_11X17 = 17; // 11x17 in
+ {$EXTERNALSYM DMPAPER_11X17}
+ DMPAPER_NOTE = 18; // Note 8 1/2 x 11 in
+ {$EXTERNALSYM DMPAPER_NOTE}
+ DMPAPER_ENV_9 = 19; // Envelope #9 3 7/8 x 8 7/8
+ {$EXTERNALSYM DMPAPER_ENV_9}
+ DMPAPER_ENV_10 = 20; // Envelope #10 4 1/8 x 9 1/2
+ {$EXTERNALSYM DMPAPER_ENV_10}
+ DMPAPER_ENV_11 = 21; // Envelope #11 4 1/2 x 10 3/8
+ {$EXTERNALSYM DMPAPER_ENV_11}
+ DMPAPER_ENV_12 = 22; // Envelope #12 4 \276 x 11
+ {$EXTERNALSYM DMPAPER_ENV_12}
+ DMPAPER_ENV_14 = 23; // Envelope #14 5 x 11 1/2
+ {$EXTERNALSYM DMPAPER_ENV_14}
+ DMPAPER_CSHEET = 24; // C size sheet
+ {$EXTERNALSYM DMPAPER_CSHEET}
+ DMPAPER_DSHEET = 25; // D size sheet
+ {$EXTERNALSYM DMPAPER_DSHEET}
+ DMPAPER_ESHEET = 26; // E size sheet
+ {$EXTERNALSYM DMPAPER_ESHEET}
+ DMPAPER_ENV_DL = 27; // Envelope DL 110 x 220mm
+ {$EXTERNALSYM DMPAPER_ENV_DL}
+ DMPAPER_ENV_C5 = 28; // Envelope C5 162 x 229 mm
+ {$EXTERNALSYM DMPAPER_ENV_C5}
+ DMPAPER_ENV_C3 = 29; // Envelope C3 324 x 458 mm
+ {$EXTERNALSYM DMPAPER_ENV_C3}
+ DMPAPER_ENV_C4 = 30; // Envelope C4 229 x 324 mm
+ {$EXTERNALSYM DMPAPER_ENV_C4}
+ DMPAPER_ENV_C6 = 31; // Envelope C6 114 x 162 mm
+ {$EXTERNALSYM DMPAPER_ENV_C6}
+ DMPAPER_ENV_C65 = 32; // Envelope C65 114 x 229 mm
+ {$EXTERNALSYM DMPAPER_ENV_C65}
+ DMPAPER_ENV_B4 = 33; // Envelope B4 250 x 353 mm
+ {$EXTERNALSYM DMPAPER_ENV_B4}
+ DMPAPER_ENV_B5 = 34; // Envelope B5 176 x 250 mm
+ {$EXTERNALSYM DMPAPER_ENV_B5}
+ DMPAPER_ENV_B6 = 35; // Envelope B6 176 x 125 mm
+ {$EXTERNALSYM DMPAPER_ENV_B6}
+ DMPAPER_ENV_ITALY = 36; // Envelope 110 x 230 mm
+ {$EXTERNALSYM DMPAPER_ENV_ITALY}
+ DMPAPER_ENV_MONARCH = 37; // Envelope Monarch 3.875 x 7.5 in
+ {$EXTERNALSYM DMPAPER_ENV_MONARCH}
+ DMPAPER_ENV_PERSONAL = 38; // 6 3/4 Envelope 3 5/8 x 6 1/2 in
+ {$EXTERNALSYM DMPAPER_ENV_PERSONAL}
+ DMPAPER_FANFOLD_US = 39; // US Std Fanfold 14 7/8 x 11 in
+ {$EXTERNALSYM DMPAPER_FANFOLD_US}
+ DMPAPER_FANFOLD_STD_GERMAN = 40; // German Std Fanfold 8 1/2 x 12 in
+ {$EXTERNALSYM DMPAPER_FANFOLD_STD_GERMAN}
+ DMPAPER_FANFOLD_LGL_GERMAN = 41; // German Legal Fanfold 8 1/2 x 13 in
+ {$EXTERNALSYM DMPAPER_FANFOLD_LGL_GERMAN}
+ DMPAPER_ISO_B4 = 42; // B4 (ISO) 250 x 353 mm
+ {$EXTERNALSYM DMPAPER_ISO_B4}
+ DMPAPER_JAPANESE_POSTCARD = 43; // Japanese Postcard 100 x 148 mm
+ {$EXTERNALSYM DMPAPER_JAPANESE_POSTCARD}
+ DMPAPER_9X11 = 44; // 9 x 11 in
+ {$EXTERNALSYM DMPAPER_9X11}
+ DMPAPER_10X11 = 45; // 10 x 11 in
+ {$EXTERNALSYM DMPAPER_10X11}
+ DMPAPER_15X11 = 46; // 15 x 11 in
+ {$EXTERNALSYM DMPAPER_15X11}
+ DMPAPER_ENV_INVITE = 47; // Envelope Invite 220 x 220 mm
+ {$EXTERNALSYM DMPAPER_ENV_INVITE}
+ DMPAPER_RESERVED_48 = 48; // RESERVED--DO NOT USE
+ {$EXTERNALSYM DMPAPER_RESERVED_48}
+ DMPAPER_RESERVED_49 = 49; // RESERVED--DO NOT USE
+ {$EXTERNALSYM DMPAPER_RESERVED_49}
+ DMPAPER_LETTER_EXTRA = 50; // Letter Extra 9 \275 x 12 in
+ {$EXTERNALSYM DMPAPER_LETTER_EXTRA}
+ DMPAPER_LEGAL_EXTRA = 51; // Legal Extra 9 \275 x 15 in
+ {$EXTERNALSYM DMPAPER_LEGAL_EXTRA}
+ DMPAPER_TABLOID_EXTRA = 52; // Tabloid Extra 11.69 x 18 in
+ {$EXTERNALSYM DMPAPER_TABLOID_EXTRA}
+ DMPAPER_A4_EXTRA = 53; // A4 Extra 9.27 x 12.69 in
+ {$EXTERNALSYM DMPAPER_A4_EXTRA}
+ DMPAPER_LETTER_TRANSVERSE = 54; // Letter Transverse 8 \275 x 11 in
+ {$EXTERNALSYM DMPAPER_LETTER_TRANSVERSE}
+ DMPAPER_A4_TRANSVERSE = 55; // A4 Transverse 210 x 297 mm
+ {$EXTERNALSYM DMPAPER_A4_TRANSVERSE}
+ DMPAPER_LETTER_EXTRA_TRANSVERSE = 56; // Letter Extra Transverse 9\275 x 12 in
+ {$EXTERNALSYM DMPAPER_LETTER_EXTRA_TRANSVERSE}
+ DMPAPER_A_PLUS = 57; // SuperA/SuperA/A4 227 x 356 mm
+ {$EXTERNALSYM DMPAPER_A_PLUS}
+ DMPAPER_B_PLUS = 58; // SuperB/SuperB/A3 305 x 487 mm
+ {$EXTERNALSYM DMPAPER_B_PLUS}
+ DMPAPER_LETTER_PLUS = 59; // Letter Plus 8.5 x 12.69 in
+ {$EXTERNALSYM DMPAPER_LETTER_PLUS}
+ DMPAPER_A4_PLUS = 60; // A4 Plus 210 x 330 mm
+ {$EXTERNALSYM DMPAPER_A4_PLUS}
+ DMPAPER_A5_TRANSVERSE = 61; // A5 Transverse 148 x 210 mm
+ {$EXTERNALSYM DMPAPER_A5_TRANSVERSE}
+ DMPAPER_B5_TRANSVERSE = 62; // B5 (JIS) Transverse 182 x 257 mm
+ {$EXTERNALSYM DMPAPER_B5_TRANSVERSE}
+ DMPAPER_A3_EXTRA = 63; // A3 Extra 322 x 445 mm
+ {$EXTERNALSYM DMPAPER_A3_EXTRA}
+ DMPAPER_A5_EXTRA = 64; // A5 Extra 174 x 235 mm
+ {$EXTERNALSYM DMPAPER_A5_EXTRA}
+ DMPAPER_B5_EXTRA = 65; // B5 (ISO) Extra 201 x 276 mm
+ {$EXTERNALSYM DMPAPER_B5_EXTRA}
+ DMPAPER_A2 = 66; // A2 420 x 594 mm
+ {$EXTERNALSYM DMPAPER_A2}
+ DMPAPER_A3_TRANSVERSE = 67; // A3 Transverse 297 x 420 mm
+ {$EXTERNALSYM DMPAPER_A3_TRANSVERSE}
+ DMPAPER_A3_EXTRA_TRANSVERSE = 68; // A3 Extra Transverse 322 x 445 mm
+ {$EXTERNALSYM DMPAPER_A3_EXTRA_TRANSVERSE}
+
+ DMPAPER_DBL_JAPANESE_POSTCARD = 69; // Japanese Double Postcard 200 x 148 mm
+ {$EXTERNALSYM DMPAPER_DBL_JAPANESE_POSTCARD}
+ DMPAPER_A6 = 70; // A6 105 x 148 mm
+ {$EXTERNALSYM DMPAPER_A6}
+ DMPAPER_JENV_KAKU2 = 71; // Japanese Envelope Kaku #2
+ {$EXTERNALSYM DMPAPER_JENV_KAKU2}
+ DMPAPER_JENV_KAKU3 = 72; // Japanese Envelope Kaku #3
+ {$EXTERNALSYM DMPAPER_JENV_KAKU3}
+ DMPAPER_JENV_CHOU3 = 73; // Japanese Envelope Chou #3
+ {$EXTERNALSYM DMPAPER_JENV_CHOU3}
+ DMPAPER_JENV_CHOU4 = 74; // Japanese Envelope Chou #4
+ {$EXTERNALSYM DMPAPER_JENV_CHOU4}
+ DMPAPER_LETTER_ROTATED = 75; // Letter Rotated 11 x 8 1/2 11 in
+ {$EXTERNALSYM DMPAPER_LETTER_ROTATED}
+ DMPAPER_A3_ROTATED = 76; // A3 Rotated 420 x 297 mm
+ {$EXTERNALSYM DMPAPER_A3_ROTATED}
+ DMPAPER_A4_ROTATED = 77; // A4 Rotated 297 x 210 mm
+ {$EXTERNALSYM DMPAPER_A4_ROTATED}
+ DMPAPER_A5_ROTATED = 78; // A5 Rotated 210 x 148 mm
+ {$EXTERNALSYM DMPAPER_A5_ROTATED}
+ DMPAPER_B4_JIS_ROTATED = 79; // B4 (JIS) Rotated 364 x 257 mm
+ {$EXTERNALSYM DMPAPER_B4_JIS_ROTATED}
+ DMPAPER_B5_JIS_ROTATED = 80; // B5 (JIS) Rotated 257 x 182 mm
+ {$EXTERNALSYM DMPAPER_B5_JIS_ROTATED}
+ DMPAPER_JAPANESE_POSTCARD_ROTATED = 81; // Japanese Postcard Rotated 148 x 100 mm
+ {$EXTERNALSYM DMPAPER_JAPANESE_POSTCARD_ROTATED}
+ DMPAPER_DBL_JAPANESE_POSTCARD_ROTATED = 82; // Double Japanese Postcard Rotated 148 x 200 mm
+ {$EXTERNALSYM DMPAPER_DBL_JAPANESE_POSTCARD_ROTATED}
+ DMPAPER_A6_ROTATED = 83; // A6 Rotated 148 x 105 mm
+ {$EXTERNALSYM DMPAPER_A6_ROTATED}
+ DMPAPER_JENV_KAKU2_ROTATED = 84; // Japanese Envelope Kaku #2 Rotated
+ {$EXTERNALSYM DMPAPER_JENV_KAKU2_ROTATED}
+ DMPAPER_JENV_KAKU3_ROTATED = 85; // Japanese Envelope Kaku #3 Rotated
+ {$EXTERNALSYM DMPAPER_JENV_KAKU3_ROTATED}
+ DMPAPER_JENV_CHOU3_ROTATED = 86; // Japanese Envelope Chou #3 Rotated
+ {$EXTERNALSYM DMPAPER_JENV_CHOU3_ROTATED}
+ DMPAPER_JENV_CHOU4_ROTATED = 87; // Japanese Envelope Chou #4 Rotated
+ {$EXTERNALSYM DMPAPER_JENV_CHOU4_ROTATED}
+ DMPAPER_B6_JIS = 88; // B6 (JIS) 128 x 182 mm
+ {$EXTERNALSYM DMPAPER_B6_JIS}
+ DMPAPER_B6_JIS_ROTATED = 89; // B6 (JIS) Rotated 182 x 128 mm
+ {$EXTERNALSYM DMPAPER_B6_JIS_ROTATED}
+ DMPAPER_12X11 = 90; // 12 x 11 in
+ {$EXTERNALSYM DMPAPER_12X11}
+ DMPAPER_JENV_YOU4 = 91; // Japanese Envelope You #4
+ {$EXTERNALSYM DMPAPER_JENV_YOU4}
+ DMPAPER_JENV_YOU4_ROTATED = 92; // Japanese Envelope You #4 Rotated
+ {$EXTERNALSYM DMPAPER_JENV_YOU4_ROTATED}
+ DMPAPER_P16K = 93; // PRC 16K 146 x 215 mm
+ {$EXTERNALSYM DMPAPER_P16K}
+ DMPAPER_P32K = 94; // PRC 32K 97 x 151 mm
+ {$EXTERNALSYM DMPAPER_P32K}
+ DMPAPER_P32KBIG = 95; // PRC 32K(Big) 97 x 151 mm
+ {$EXTERNALSYM DMPAPER_P32KBIG}
+ DMPAPER_PENV_1 = 96; // PRC Envelope #1 102 x 165 mm
+ {$EXTERNALSYM DMPAPER_PENV_1}
+ DMPAPER_PENV_2 = 97; // PRC Envelope #2 102 x 176 mm
+ {$EXTERNALSYM DMPAPER_PENV_2}
+ DMPAPER_PENV_3 = 98; // PRC Envelope #3 125 x 176 mm
+ {$EXTERNALSYM DMPAPER_PENV_3}
+ DMPAPER_PENV_4 = 99; // PRC Envelope #4 110 x 208 mm
+ {$EXTERNALSYM DMPAPER_PENV_4}
+ DMPAPER_PENV_5 = 100; // PRC Envelope #5 110 x 220 mm
+ {$EXTERNALSYM DMPAPER_PENV_5}
+ DMPAPER_PENV_6 = 101; // PRC Envelope #6 120 x 230 mm
+ {$EXTERNALSYM DMPAPER_PENV_6}
+ DMPAPER_PENV_7 = 102; // PRC Envelope #7 160 x 230 mm
+ {$EXTERNALSYM DMPAPER_PENV_7}
+ DMPAPER_PENV_8 = 103; // PRC Envelope #8 120 x 309 mm
+ {$EXTERNALSYM DMPAPER_PENV_8}
+ DMPAPER_PENV_9 = 104; // PRC Envelope #9 229 x 324 mm
+ {$EXTERNALSYM DMPAPER_PENV_9}
+ DMPAPER_PENV_10 = 105; // PRC Envelope #10 324 x 458 mm
+ {$EXTERNALSYM DMPAPER_PENV_10}
+ DMPAPER_P16K_ROTATED = 106; // PRC 16K Rotated
+ {$EXTERNALSYM DMPAPER_P16K_ROTATED}
+ DMPAPER_P32K_ROTATED = 107; // PRC 32K Rotated
+ {$EXTERNALSYM DMPAPER_P32K_ROTATED}
+ DMPAPER_P32KBIG_ROTATED = 108; // PRC 32K(Big) Rotated
+ {$EXTERNALSYM DMPAPER_P32KBIG_ROTATED}
+ DMPAPER_PENV_1_ROTATED = 109; // PRC Envelope #1 Rotated 165 x 102 mm
+ {$EXTERNALSYM DMPAPER_PENV_1_ROTATED}
+ DMPAPER_PENV_2_ROTATED = 110; // PRC Envelope #2 Rotated 176 x 102 mm
+ {$EXTERNALSYM DMPAPER_PENV_2_ROTATED}
+ DMPAPER_PENV_3_ROTATED = 111; // PRC Envelope #3 Rotated 176 x 125 mm
+ {$EXTERNALSYM DMPAPER_PENV_3_ROTATED}
+ DMPAPER_PENV_4_ROTATED = 112; // PRC Envelope #4 Rotated 208 x 110 mm
+ {$EXTERNALSYM DMPAPER_PENV_4_ROTATED}
+ DMPAPER_PENV_5_ROTATED = 113; // PRC Envelope #5 Rotated 220 x 110 mm
+ {$EXTERNALSYM DMPAPER_PENV_5_ROTATED}
+ DMPAPER_PENV_6_ROTATED = 114; // PRC Envelope #6 Rotated 230 x 120 mm
+ {$EXTERNALSYM DMPAPER_PENV_6_ROTATED}
+ DMPAPER_PENV_7_ROTATED = 115; // PRC Envelope #7 Rotated 230 x 160 mm
+ {$EXTERNALSYM DMPAPER_PENV_7_ROTATED}
+ DMPAPER_PENV_8_ROTATED = 116; // PRC Envelope #8 Rotated 309 x 120 mm
+ {$EXTERNALSYM DMPAPER_PENV_8_ROTATED}
+ DMPAPER_PENV_9_ROTATED = 117; // PRC Envelope #9 Rotated 324 x 229 mm
+ {$EXTERNALSYM DMPAPER_PENV_9_ROTATED}
+ DMPAPER_PENV_10_ROTATED = 118; // PRC Envelope #10 Rotated 458 x 324 mm
+ {$EXTERNALSYM DMPAPER_PENV_10_ROTATED}
+
+ {$IFDEF WIN98ME_UP}
+ DMPAPER_LAST = DMPAPER_PENV_10_ROTATED;
+ {$EXTERNALSYM DMPAPER_LAST}
+ {$ELSE}
+ DMPAPER_LAST = DMPAPER_A3_EXTRA_TRANSVERSE;
+ {$EXTERNALSYM DMPAPER_LAST}
+ {$ENDIF WIN98ME_UP}
+
+ DMPAPER_USER = 256;
+ {$EXTERNALSYM DMPAPER_USER}
+
+// bin selections
+
+ DMBIN_UPPER = 1;
+ {$EXTERNALSYM DMBIN_UPPER}
+ DMBIN_FIRST = DMBIN_UPPER;
+ {$EXTERNALSYM DMBIN_FIRST}
+ DMBIN_ONLYONE = 1;
+ {$EXTERNALSYM DMBIN_ONLYONE}
+ DMBIN_LOWER = 2;
+ {$EXTERNALSYM DMBIN_LOWER}
+ DMBIN_MIDDLE = 3;
+ {$EXTERNALSYM DMBIN_MIDDLE}
+ DMBIN_MANUAL = 4;
+ {$EXTERNALSYM DMBIN_MANUAL}
+ DMBIN_ENVELOPE = 5;
+ {$EXTERNALSYM DMBIN_ENVELOPE}
+ DMBIN_ENVMANUAL = 6;
+ {$EXTERNALSYM DMBIN_ENVMANUAL}
+ DMBIN_AUTO = 7;
+ {$EXTERNALSYM DMBIN_AUTO}
+ DMBIN_TRACTOR = 8;
+ {$EXTERNALSYM DMBIN_TRACTOR}
+ DMBIN_SMALLFMT = 9;
+ {$EXTERNALSYM DMBIN_SMALLFMT}
+ DMBIN_LARGEFMT = 10;
+ {$EXTERNALSYM DMBIN_LARGEFMT}
+ DMBIN_LARGECAPACITY = 11;
+ {$EXTERNALSYM DMBIN_LARGECAPACITY}
+ DMBIN_CASSETTE = 14;
+ {$EXTERNALSYM DMBIN_CASSETTE}
+ DMBIN_FORMSOURCE = 15;
+ {$EXTERNALSYM DMBIN_FORMSOURCE}
+ DMBIN_LAST = DMBIN_FORMSOURCE;
+ {$EXTERNALSYM DMBIN_LAST}
+
+ DMBIN_USER = 256; // device specific bins start here
+ {$EXTERNALSYM DMBIN_USER}
+
+// print qualities
+
+ DMRES_DRAFT = DWORD(-1);
+ {$EXTERNALSYM DMRES_DRAFT}
+ DMRES_LOW = DWORD(-2);
+ {$EXTERNALSYM DMRES_LOW}
+ DMRES_MEDIUM = DWORD(-3);
+ {$EXTERNALSYM DMRES_MEDIUM}
+ DMRES_HIGH = DWORD(-4);
+ {$EXTERNALSYM DMRES_HIGH}
+
+// color enable/disable for color printers
+
+ DMCOLOR_MONOCHROME = 1;
+ {$EXTERNALSYM DMCOLOR_MONOCHROME}
+ DMCOLOR_COLOR = 2;
+ {$EXTERNALSYM DMCOLOR_COLOR}
+
+// duplex enable
+
+ DMDUP_SIMPLEX = 1;
+ {$EXTERNALSYM DMDUP_SIMPLEX}
+ DMDUP_VERTICAL = 2;
+ {$EXTERNALSYM DMDUP_VERTICAL}
+ DMDUP_HORIZONTAL = 3;
+ {$EXTERNALSYM DMDUP_HORIZONTAL}
+
+// TrueType options
+
+ DMTT_BITMAP = 1; // print TT fonts as graphics
+ {$EXTERNALSYM DMTT_BITMAP}
+ DMTT_DOWNLOAD = 2; // download TT fonts as soft fonts
+ {$EXTERNALSYM DMTT_DOWNLOAD}
+ DMTT_SUBDEV = 3; // substitute device fonts for TT fonts
+ {$EXTERNALSYM DMTT_SUBDEV}
+ DMTT_DOWNLOAD_OUTLINE = 4; // download TT fonts as outline soft fonts
+ {$EXTERNALSYM DMTT_DOWNLOAD_OUTLINE}
+
+// Collation selections
+
+ DMCOLLATE_FALSE = 0;
+ {$EXTERNALSYM DMCOLLATE_FALSE}
+ DMCOLLATE_TRUE = 1;
+ {$EXTERNALSYM DMCOLLATE_TRUE}
+
+//#if(WINVER >= 0x0501)
+
+// DEVMODE dmDisplayOrientation specifiations
+
+ DMDO_DEFAULT = 0;
+ {$EXTERNALSYM DMDO_DEFAULT}
+ DMDO_90 = 1;
+ {$EXTERNALSYM DMDO_90}
+ DMDO_180 = 2;
+ {$EXTERNALSYM DMDO_180}
+ DMDO_270 = 3;
+ {$EXTERNALSYM DMDO_270}
+
+// DEVMODE dmDisplayFixedOutput specifiations
+
+ DMDFO_DEFAULT = 0;
+ {$EXTERNALSYM DMDFO_DEFAULT}
+ DMDFO_STRETCH = 1;
+ {$EXTERNALSYM DMDFO_STRETCH}
+ DMDFO_CENTER = 2;
+ {$EXTERNALSYM DMDFO_CENTER}
+
+//#endif /* WINVER >= 0x0501 */
+
+// DEVMODE dmDisplayFlags flags
+
+// #define DM_GRAYSCALE 0x00000001 /* This flag is no longer valid */
+// #define DM_INTERLACED 0x00000002 /* This flag is no longer valid */
+
+ DMDISPLAYFLAGS_TEXTMODE = $00000004;
+ {$EXTERNALSYM DMDISPLAYFLAGS_TEXTMODE}
+
+// dmNup , multiple logical page per physical page options
+
+ DMNUP_SYSTEM = 1;
+ {$EXTERNALSYM DMNUP_SYSTEM}
+ DMNUP_ONEUP = 2;
+ {$EXTERNALSYM DMNUP_ONEUP}
+
+// ICM methods
+
+ DMICMMETHOD_NONE = 1; // ICM disabled
+ {$EXTERNALSYM DMICMMETHOD_NONE}
+ DMICMMETHOD_SYSTEM = 2; // ICM handled by system
+ {$EXTERNALSYM DMICMMETHOD_SYSTEM}
+ DMICMMETHOD_DRIVER = 3; // ICM handled by driver
+ {$EXTERNALSYM DMICMMETHOD_DRIVER}
+ DMICMMETHOD_DEVICE = 4; // ICM handled by device
+ {$EXTERNALSYM DMICMMETHOD_DEVICE}
+
+ DMICMMETHOD_USER = 256; // Device-specific methods start here
+ {$EXTERNALSYM DMICMMETHOD_USER}
+
+// ICM Intents
+
+ DMICM_SATURATE = 1; // Maximize color saturation
+ {$EXTERNALSYM DMICM_SATURATE}
+ DMICM_CONTRAST = 2; // Maximize color contrast
+ {$EXTERNALSYM DMICM_CONTRAST}
+ DMICM_COLORIMETRIC = 3; // Use specific color metric
+ {$EXTERNALSYM DMICM_COLORIMETRIC}
+ DMICM_ABS_COLORIMETRIC = 4; // Use specific color metric
+ {$EXTERNALSYM DMICM_ABS_COLORIMETRIC}
+
+ DMICM_USER = 256; // Device-specific intents start here
+ {$EXTERNALSYM DMICM_USER}
+
+// Media types
+
+ DMMEDIA_STANDARD = 1; // Standard paper
+ {$EXTERNALSYM DMMEDIA_STANDARD}
+ DMMEDIA_TRANSPARENCY = 2; // Transparency
+ {$EXTERNALSYM DMMEDIA_TRANSPARENCY}
+ DMMEDIA_GLOSSY = 3; // Glossy paper
+ {$EXTERNALSYM DMMEDIA_GLOSSY}
+
+ DMMEDIA_USER = 256; // Device-specific media start here
+ {$EXTERNALSYM DMMEDIA_USER}
+
+// Dither types
+
+ DMDITHER_NONE = 1; // No dithering
+ {$EXTERNALSYM DMDITHER_NONE}
+ DMDITHER_COARSE = 2; // Dither with a coarse brush
+ {$EXTERNALSYM DMDITHER_COARSE}
+ DMDITHER_FINE = 3; // Dither with a fine brush
+ {$EXTERNALSYM DMDITHER_FINE}
+ DMDITHER_LINEART = 4; // LineArt dithering
+ {$EXTERNALSYM DMDITHER_LINEART}
+ DMDITHER_ERRORDIFFUSION = 5; // LineArt dithering
+ {$EXTERNALSYM DMDITHER_ERRORDIFFUSION}
+ DMDITHER_RESERVED6 = 6; // LineArt dithering
+ {$EXTERNALSYM DMDITHER_RESERVED6}
+ DMDITHER_RESERVED7 = 7; // LineArt dithering
+ {$EXTERNALSYM DMDITHER_RESERVED7}
+ DMDITHER_RESERVED8 = 8; // LineArt dithering
+ {$EXTERNALSYM DMDITHER_RESERVED8}
+ DMDITHER_RESERVED9 = 9; // LineArt dithering
+ {$EXTERNALSYM DMDITHER_RESERVED9}
+ DMDITHER_GRAYSCALE = 10; // Device does grayscaling
+ {$EXTERNALSYM DMDITHER_GRAYSCALE}
+
+ DMDITHER_USER = 256; // Device-specific dithers start here
+ {$EXTERNALSYM DMDITHER_USER}
+
+type
+ PDisplayDeviceA = ^TDisplayDeviceA;
+ _DISPLAY_DEVICEA = record
+ cb: DWORD;
+ DeviceName: array [0..32 - 1] of CHAR;
+ DeviceString: array [0..128 - 1] of CHAR;
+ StateFlags: DWORD;
+ DeviceID: array [0..128 - 1] of CHAR;
+ DeviceKey: array [0..128 - 1] of CHAR;
+ end;
+ {$EXTERNALSYM _DISPLAY_DEVICEA}
+ DISPLAY_DEVICEA = _DISPLAY_DEVICEA;
+ {$EXTERNALSYM DISPLAY_DEVICEA}
+ LPDISPLAY_DEVICEA = ^DISPLAY_DEVICEA;
+ {$EXTERNALSYM LPDISPLAY_DEVICEA}
+ PDISPLAY_DEVICEA = ^DISPLAY_DEVICEA;
+ {$EXTERNALSYM PDISPLAY_DEVICEA}
+ TDisplayDeviceA = _DISPLAY_DEVICEA;
+
+ PDisplayDeviceW = ^TDisplayDeviceW;
+ _DISPLAY_DEVICEW = record
+ cb: DWORD;
+ DeviceName: array [0..32 - 1] of WCHAR;
+ DeviceString: array [0..128 - 1] of WCHAR;
+ StateFlags: DWORD;
+ DeviceID: array [0..128 - 1] of WCHAR;
+ DeviceKey: array [0..128 - 1] of WCHAR;
+ end;
+ {$EXTERNALSYM _DISPLAY_DEVICEW}
+ DISPLAY_DEVICEW = _DISPLAY_DEVICEW;
+ {$EXTERNALSYM DISPLAY_DEVICEW}
+ LPDISPLAY_DEVICEW = ^DISPLAY_DEVICEW;
+ {$EXTERNALSYM LPDISPLAY_DEVICEW}
+ PDISPLAY_DEVICEW = ^DISPLAY_DEVICEW;
+ {$EXTERNALSYM PDISPLAY_DEVICEW}
+ TDisplayDeviceW = _DISPLAY_DEVICEW;
+
+ {$IFDEF UNICODE}
+ DISPLAY_DEVICE = DISPLAY_DEVICEW;
+ {$EXTERNALSYM DISPLAY_DEVICE}
+ PDISPLAY_DEVICE = PDISPLAY_DEVICEW;
+ {$EXTERNALSYM PDISPLAY_DEVICE}
+ LPDISPLAY_DEVICE = LPDISPLAY_DEVICEW;
+ {$EXTERNALSYM LPDISPLAY_DEVICE}
+ TDisplayDevice = TDisplayDeviceW;
+ PDisplayDevice = PDisplayDeviceW;
+ {$ELSE}
+ DISPLAY_DEVICE = DISPLAY_DEVICEA;
+ {$EXTERNALSYM DISPLAY_DEVICE}
+ PDISPLAY_DEVICE = PDISPLAY_DEVICEA;
+ {$EXTERNALSYM PDISPLAY_DEVICE}
+ LPDISPLAY_DEVICE = LPDISPLAY_DEVICEA;
+ {$EXTERNALSYM LPDISPLAY_DEVICE}
+ TDisplayDevice = TDisplayDeviceA;
+ PDisplayDevice = PDisplayDeviceA;
+ {$ENDIF UNICODE}
+
+const
+ DISPLAY_DEVICE_ATTACHED_TO_DESKTOP = $00000001;
+ {$EXTERNALSYM DISPLAY_DEVICE_ATTACHED_TO_DESKTOP}
+ DISPLAY_DEVICE_MULTI_DRIVER = $00000002;
+ {$EXTERNALSYM DISPLAY_DEVICE_MULTI_DRIVER}
+ DISPLAY_DEVICE_PRIMARY_DEVICE = $00000004;
+ {$EXTERNALSYM DISPLAY_DEVICE_PRIMARY_DEVICE}
+ DISPLAY_DEVICE_MIRRORING_DRIVER = $00000008;
+ {$EXTERNALSYM DISPLAY_DEVICE_MIRRORING_DRIVER}
+ DISPLAY_DEVICE_VGA_COMPATIBLE = $00000010;
+ {$EXTERNALSYM DISPLAY_DEVICE_VGA_COMPATIBLE}
+ DISPLAY_DEVICE_REMOVABLE = $00000020;
+ {$EXTERNALSYM DISPLAY_DEVICE_REMOVABLE}
+ DISPLAY_DEVICE_MODESPRUNED = $08000000;
+ {$EXTERNALSYM DISPLAY_DEVICE_MODESPRUNED}
+ DISPLAY_DEVICE_REMOTE = $04000000;
+ {$EXTERNALSYM DISPLAY_DEVICE_REMOTE}
+ DISPLAY_DEVICE_DISCONNECT = $02000000;
+ {$EXTERNALSYM DISPLAY_DEVICE_DISCONNECT}
+
+// Child device state
+
+ DISPLAY_DEVICE_ACTIVE = $00000001;
+ {$EXTERNALSYM DISPLAY_DEVICE_ACTIVE}
+ DISPLAY_DEVICE_ATTACHED = $00000002;
+ {$EXTERNALSYM DISPLAY_DEVICE_ATTACHED}
+
+// GetRegionData/ExtCreateRegion
+
+ RDH_RECTANGLES = 1;
+ {$EXTERNALSYM RDH_RECTANGLES}
+
+type
+ PRgnDataHeader = ^TRgnDataHeader;
+ _RGNDATAHEADER = record
+ dwSize: DWORD;
+ iType: DWORD;
+ nCount: DWORD;
+ nRgnSize: DWORD;
+ rcBound: RECT;
+ end;
+ {$EXTERNALSYM _RGNDATAHEADER}
+ RGNDATAHEADER = _RGNDATAHEADER;
+ {$EXTERNALSYM RGNDATAHEADER}
+ TRgnDataHeader = _RGNDATAHEADER;
+
+ PRgnData = ^TRgnData;
+ _RGNDATA = record
+ rdh: RGNDATAHEADER;
+ Buffer: array [0..0] of Char;
+ end;
+ {$EXTERNALSYM _RGNDATA}
+ RGNDATA = _RGNDATA;
+ {$EXTERNALSYM RGNDATA}
+ LPRGNDATA = ^RGNDATA;
+ {$EXTERNALSYM LPRGNDATA}
+ NPRGNDATA = ^RGNDATA;
+ {$EXTERNALSYM NPRGNDATA}
+ TRgnData = _RGNDATA;
+
+// for GetRandomRgn
+
+const
+ SYSRGN = 4;
+ {$EXTERNALSYM SYSRGN}
+
+type
+ PAbc = ^TAbc;
+ _ABC = record
+ abcA: Integer;
+ abcB: UINT;
+ abcC: Integer;
+ end;
+ {$EXTERNALSYM _ABC}
+ ABC = _ABC;
+ {$EXTERNALSYM ABC}
+ LPABC = ^ABC;
+ {$EXTERNALSYM LPABC}
+ NPABC = ^ABC;
+ {$EXTERNALSYM NPABC}
+ TAbc = _ABC;
+
+ PAbcFloat = ^TAbcFloat;
+ _ABCFLOAT = record
+ abcfA: FLOAT;
+ abcfB: FLOAT;
+ abcfC: FLOAT;
+ end;
+ {$EXTERNALSYM _ABCFLOAT}
+ ABCFLOAT = _ABCFLOAT;
+ {$EXTERNALSYM ABCFLOAT}
+ LPABCFLOAT = ^ABCFLOAT;
+ {$EXTERNALSYM LPABCFLOAT}
+ NPABCFLOAT = ^ABCFLOAT;
+ {$EXTERNALSYM NPABCFLOAT}
+ TAbcFloat = _ABCFLOAT;
+
+ POutlineTextMetricA = ^TOutlineTextMetricA;
+ _OUTLINETEXTMETRICA = record
+ otmSize: UINT;
+ otmTextMetrics: TEXTMETRICA;
+ otmFiller: BYTE;
+ otmPanoseNumber: PANOSE;
+ otmfsSelection: UINT;
+ otmfsType: UINT;
+ otmsCharSlopeRise: Integer;
+ otmsCharSlopeRun: Integer;
+ otmItalicAngle: Integer;
+ otmEMSquare: UINT;
+ otmAscent: Integer;
+ otmDescent: Integer;
+ otmLineGap: UINT;
+ otmsCapEmHeight: UINT;
+ otmsXHeight: UINT;
+ otmrcFontBox: RECT;
+ otmMacAscent: Integer;
+ otmMacDescent: Integer;
+ otmMacLineGap: UINT;
+ otmusMinimumPPEM: UINT;
+ otmptSubscriptSize: POINT;
+ otmptSubscriptOffset: POINT;
+ otmptSuperscriptSize: POINT;
+ otmptSuperscriptOffset: POINT;
+ otmsStrikeoutSize: UINT;
+ otmsStrikeoutPosition: Integer;
+ otmsUnderscoreSize: Integer;
+ otmsUnderscorePosition: Integer;
+ otmpFamilyName: PSTR;
+ otmpFaceName: PSTR;
+ otmpStyleName: PSTR;
+ otmpFullName: PSTR;
+ end;
+ {$EXTERNALSYM _OUTLINETEXTMETRICA}
+ OUTLINETEXTMETRICA = _OUTLINETEXTMETRICA;
+ {$EXTERNALSYM OUTLINETEXTMETRICA}
+ LPOUTLINETEXTMETRICA = ^OUTLINETEXTMETRICA;
+ {$EXTERNALSYM LPOUTLINETEXTMETRICA}
+ NPOUTLINETEXTMETRICA = ^OUTLINETEXTMETRICA;
+ {$EXTERNALSYM NPOUTLINETEXTMETRICA}
+ TOutlineTextMetricA = _OUTLINETEXTMETRICA;
+
+ POutlineTextMetricW = ^TOutlineTextMetricW;
+ _OUTLINETEXTMETRICW = record
+ otmSize: UINT;
+ otmTextMetrics: TEXTMETRICW;
+ otmFiller: BYTE;
+ otmPanoseNumber: PANOSE;
+ otmfsSelection: UINT;
+ otmfsType: UINT;
+ otmsCharSlopeRise: Integer;
+ otmsCharSlopeRun: Integer;
+ otmItalicAngle: Integer;
+ otmEMSquare: UINT;
+ otmAscent: Integer;
+ otmDescent: Integer;
+ otmLineGap: UINT;
+ otmsCapEmHeight: UINT;
+ otmsXHeight: UINT;
+ otmrcFontBox: RECT;
+ otmMacAscent: Integer;
+ otmMacDescent: Integer;
+ otmMacLineGap: UINT;
+ otmusMinimumPPEM: UINT;
+ otmptSubscriptSize: POINT;
+ otmptSubscriptOffset: POINT;
+ otmptSuperscriptSize: POINT;
+ otmptSuperscriptOffset: POINT;
+ otmsStrikeoutSize: UINT;
+ otmsStrikeoutPosition: Integer;
+ otmsUnderscoreSize: Integer;
+ otmsUnderscorePosition: Integer;
+ otmpFamilyName: PSTR;
+ otmpFaceName: PSTR;
+ otmpStyleName: PSTR;
+ otmpFullName: PSTR;
+ end;
+ {$EXTERNALSYM _OUTLINETEXTMETRICW}
+ OUTLINETEXTMETRICW = _OUTLINETEXTMETRICW;
+ {$EXTERNALSYM OUTLINETEXTMETRICW}
+ LPOUTLINETEXTMETRICW = ^OUTLINETEXTMETRICW;
+ {$EXTERNALSYM LPOUTLINETEXTMETRICW}
+ NPOUTLINETEXTMETRICW = ^OUTLINETEXTMETRICW;
+ {$EXTERNALSYM NPOUTLINETEXTMETRICW}
+ TOutlineTextMetricW = _OUTLINETEXTMETRICW;
+
+ {$IFDEF UNICODE}
+ OUTLINETEXTMETRIC = OUTLINETEXTMETRICW;
+ {$EXTERNALSYM OUTLINETEXTMETRIC}
+ POUTLINETEXTMETRIC = POUTLINETEXTMETRICW;
+ {$EXTERNALSYM POUTLINETEXTMETRIC}
+ NPOUTLINETEXTMETRIC = NPOUTLINETEXTMETRICW;
+ {$EXTERNALSYM NPOUTLINETEXTMETRIC}
+ LPOUTLINETEXTMETRIC = LPOUTLINETEXTMETRICW;
+ {$EXTERNALSYM LPOUTLINETEXTMETRIC}
+ TOutlineTextMetric = TOutlineTextMetricW;
+ {$ELSE}
+ OUTLINETEXTMETRIC = OUTLINETEXTMETRICA;
+ {$EXTERNALSYM OUTLINETEXTMETRIC}
+ POUTLINETEXTMETRIC = POUTLINETEXTMETRICA;
+ {$EXTERNALSYM POUTLINETEXTMETRIC}
+ NPOUTLINETEXTMETRIC = NPOUTLINETEXTMETRICA;
+ {$EXTERNALSYM NPOUTLINETEXTMETRIC}
+ LPOUTLINETEXTMETRIC = LPOUTLINETEXTMETRICA;
+ {$EXTERNALSYM LPOUTLINETEXTMETRIC}
+ TOutlineTextMetric = TOutlineTextMetricA;
+ {$ENDIF UNICODE}
+
+ PPolytextA = ^TPolytextA;
+ tagPOLYTEXTA = record
+ x: Integer;
+ y: Integer;
+ n: UINT;
+ lpstr: LPCSTR;
+ uiFlags: UINT;
+ rcl: RECT;
+ pdx: PINT;
+ end;
+ {$EXTERNALSYM tagPOLYTEXTA}
+ POLYTEXTA = tagPOLYTEXTA;
+ {$EXTERNALSYM POLYTEXTA}
+ LPPOLYTEXTA = ^POLYTEXTA;
+ {$EXTERNALSYM LPPOLYTEXTA}
+ NPPOLYTEXTA = ^POLYTEXTA;
+ {$EXTERNALSYM NPPOLYTEXTA}
+ TPolytextA = POLYTEXTA;
+
+ PPolytextW = ^TPolytextW;
+ tagPOLYTEXTW = record
+ x: Integer;
+ y: Integer;
+ n: UINT;
+ lpstr: LPCWSTR;
+ uiFlags: UINT;
+ rcl: RECT;
+ pdx: PINT;
+ end;
+ {$EXTERNALSYM tagPOLYTEXTW}
+ POLYTEXTW = tagPOLYTEXTW;
+ {$EXTERNALSYM POLYTEXTW}
+ LPPOLYTEXTW = ^POLYTEXTW;
+ {$EXTERNALSYM LPPOLYTEXTW}
+ NPPOLYTEXTW = ^POLYTEXTW;
+ {$EXTERNALSYM NPPOLYTEXTW}
+ TPolytextW = POLYTEXTW;
+
+ {$IFDEF UNICODE}
+ POLYTEXT = POLYTEXTW;
+ {$EXTERNALSYM POLYTEXT}
+ PPOLYTEXT = PPOLYTEXTW;
+ {$EXTERNALSYM PPOLYTEXT}
+ NPPOLYTEXT = NPPOLYTEXTW;
+ {$EXTERNALSYM NPPOLYTEXT}
+ LPPOLYTEXT = LPPOLYTEXTW;
+ {$EXTERNALSYM LPPOLYTEXT}
+ TPolyText = TPolyTextW;
+ {$ELSE}
+ POLYTEXT = POLYTEXTA;
+ {$EXTERNALSYM POLYTEXT}
+ PPOLYTEXT = PPOLYTEXTA;
+ {$EXTERNALSYM PPOLYTEXT}
+ NPPOLYTEXT = NPPOLYTEXTA;
+ {$EXTERNALSYM NPPOLYTEXT}
+ LPPOLYTEXT = LPPOLYTEXTA;
+ {$EXTERNALSYM LPPOLYTEXT}
+ TPolyText = TPolyTextA;
+ {$ENDIF UNICODE}
+
+ PFixed = ^TFixed;
+ _FIXED = record
+ fract: WORD;
+ value: short;
+ end;
+ {$EXTERNALSYM _FIXED}
+ FIXED = _FIXED;
+ {$EXTERNALSYM FIXED}
+ TFixed = _FIXED;
+
+ PMat2 = ^TMat2;
+ _MAT2 = record
+ eM11: FIXED;
+ eM12: FIXED;
+ eM21: FIXED;
+ eM22: FIXED;
+ end;
+ {$EXTERNALSYM _MAT2}
+ MAT2 = _MAT2;
+ {$EXTERNALSYM MAT2}
+ LPMAT2 = ^MAT2;
+ {$EXTERNALSYM LPMAT2}
+ TMat2 = _MAT2;
+
+ PGlyphMetrics = ^TGlyphMetrics;
+ _GLYPHMETRICS = record
+ gmBlackBoxX: UINT;
+ gmBlackBoxY: UINT;
+ gmptGlyphOrigin: POINT;
+ gmCellIncX: short;
+ gmCellIncY: short;
+ end;
+ {$EXTERNALSYM _GLYPHMETRICS}
+ GLYPHMETRICS = _GLYPHMETRICS;
+ {$EXTERNALSYM GLYPHMETRICS}
+ LPGLYPHMETRICS = ^GLYPHMETRICS;
+ {$EXTERNALSYM LPGLYPHMETRICS}
+ TGlyphMetrics = _GLYPHMETRICS;
+
+// GetGlyphOutline constants
+
+const
+ GGO_METRICS = 0;
+ {$EXTERNALSYM GGO_METRICS}
+ GGO_BITMAP = 1;
+ {$EXTERNALSYM GGO_BITMAP}
+ GGO_NATIVE = 2;
+ {$EXTERNALSYM GGO_NATIVE}
+ GGO_BEZIER = 3;
+ {$EXTERNALSYM GGO_BEZIER}
+
+ GGO_GRAY2_BITMAP = 4;
+ {$EXTERNALSYM GGO_GRAY2_BITMAP}
+ GGO_GRAY4_BITMAP = 5;
+ {$EXTERNALSYM GGO_GRAY4_BITMAP}
+ GGO_GRAY8_BITMAP = 6;
+ {$EXTERNALSYM GGO_GRAY8_BITMAP}
+ GGO_GLYPH_INDEX = $0080;
+ {$EXTERNALSYM GGO_GLYPH_INDEX}
+
+ GGO_UNHINTED = $0100;
+ {$EXTERNALSYM GGO_UNHINTED}
+
+ TT_POLYGON_TYPE = 24;
+ {$EXTERNALSYM TT_POLYGON_TYPE}
+
+ TT_PRIM_LINE = 1;
+ {$EXTERNALSYM TT_PRIM_LINE}
+ TT_PRIM_QSPLINE = 2;
+ {$EXTERNALSYM TT_PRIM_QSPLINE}
+ TT_PRIM_CSPLINE = 3;
+ {$EXTERNALSYM TT_PRIM_CSPLINE}
+
+type
+ PPointFx = ^TPointFx;
+ tagPOINTFX = record
+ x: FIXED;
+ y: FIXED;
+ end;
+ {$EXTERNALSYM tagPOINTFX}
+ POINTFX = tagPOINTFX;
+ {$EXTERNALSYM POINTFX}
+ LPPOINTFX = ^POINTFX;
+ {$EXTERNALSYM LPPOINTFX}
+ TPointFx = POINTFX;
+
+ PTtPolyCurve = ^TTtPolyCurve;
+ tagTTPOLYCURVE = record
+ wType: WORD;
+ cpfx: WORD;
+ apfx: array [0..0] of POINTFX;
+ end;
+ {$EXTERNALSYM tagTTPOLYCURVE}
+ TTPOLYCURVE = tagTTPOLYCURVE;
+ {$EXTERNALSYM TTPOLYCURVE}
+ LPTTPOLYCURVE = ^TTPOLYCURVE;
+ {$EXTERNALSYM LPTTPOLYCURVE}
+ TTtPolyCurve = TTPOLYCURVE;
+
+ PTtPolygonHeader = ^TTtPolygonHeader;
+ tagTTPOLYGONHEADER = record
+ cb: DWORD;
+ dwType: DWORD;
+ pfxStart: POINTFX;
+ end;
+ {$EXTERNALSYM tagTTPOLYGONHEADER}
+ TTPOLYGONHEADER = tagTTPOLYGONHEADER;
+ {$EXTERNALSYM TTPOLYGONHEADER}
+ LPTTPOLYGONHEADER = ^TTPOLYGONHEADER;
+ {$EXTERNALSYM LPTTPOLYGONHEADER}
+ TTtPolygonHeader = TTPOLYGONHEADER;
+
+const
+ GCP_DBCS = $0001;
+ {$EXTERNALSYM GCP_DBCS}
+ GCP_REORDER = $0002;
+ {$EXTERNALSYM GCP_REORDER}
+ GCP_USEKERNING = $0008;
+ {$EXTERNALSYM GCP_USEKERNING}
+ GCP_GLYPHSHAPE = $0010;
+ {$EXTERNALSYM GCP_GLYPHSHAPE}
+ GCP_LIGATE = $0020;
+ {$EXTERNALSYM GCP_LIGATE}
+////#define GCP_GLYPHINDEXING 0x0080
+ GCP_DIACRITIC = $0100;
+ {$EXTERNALSYM GCP_DIACRITIC}
+ GCP_KASHIDA = $0400;
+ {$EXTERNALSYM GCP_KASHIDA}
+ GCP_ERROR = $8000;
+ {$EXTERNALSYM GCP_ERROR}
+ FLI_MASK = $103B;
+ {$EXTERNALSYM FLI_MASK}
+
+ GCP_JUSTIFY = $00010000;
+ {$EXTERNALSYM GCP_JUSTIFY}
+////#define GCP_NODIACRITICS 0x00020000L
+ FLI_GLYPHS = $00040000;
+ {$EXTERNALSYM FLI_GLYPHS}
+ GCP_CLASSIN = $00080000;
+ {$EXTERNALSYM GCP_CLASSIN}
+ GCP_MAXEXTENT = $00100000;
+ {$EXTERNALSYM GCP_MAXEXTENT}
+ GCP_JUSTIFYIN = $00200000;
+ {$EXTERNALSYM GCP_JUSTIFYIN}
+ GCP_DISPLAYZWG = $00400000;
+ {$EXTERNALSYM GCP_DISPLAYZWG}
+ GCP_SYMSWAPOFF = $00800000;
+ {$EXTERNALSYM GCP_SYMSWAPOFF}
+ GCP_NUMERICOVERRIDE = $01000000;
+ {$EXTERNALSYM GCP_NUMERICOVERRIDE}
+ GCP_NEUTRALOVERRIDE = $02000000;
+ {$EXTERNALSYM GCP_NEUTRALOVERRIDE}
+ GCP_NUMERICSLATIN = $04000000;
+ {$EXTERNALSYM GCP_NUMERICSLATIN}
+ GCP_NUMERICSLOCAL = $08000000;
+ {$EXTERNALSYM GCP_NUMERICSLOCAL}
+
+ GCPCLASS_LATIN = 1;
+ {$EXTERNALSYM GCPCLASS_LATIN}
+ GCPCLASS_HEBREW = 2;
+ {$EXTERNALSYM GCPCLASS_HEBREW}
+ GCPCLASS_ARABIC = 2;
+ {$EXTERNALSYM GCPCLASS_ARABIC}
+ GCPCLASS_NEUTRAL = 3;
+ {$EXTERNALSYM GCPCLASS_NEUTRAL}
+ GCPCLASS_LOCALNUMBER = 4;
+ {$EXTERNALSYM GCPCLASS_LOCALNUMBER}
+ GCPCLASS_LATINNUMBER = 5;
+ {$EXTERNALSYM GCPCLASS_LATINNUMBER}
+ GCPCLASS_LATINNUMERICTERMINATOR = 6;
+ {$EXTERNALSYM GCPCLASS_LATINNUMERICTERMINATOR}
+ GCPCLASS_LATINNUMERICSEPARATOR = 7;
+ {$EXTERNALSYM GCPCLASS_LATINNUMERICSEPARATOR}
+ GCPCLASS_NUMERICSEPARATOR = 8;
+ {$EXTERNALSYM GCPCLASS_NUMERICSEPARATOR}
+ GCPCLASS_PREBOUNDLTR = $80;
+ {$EXTERNALSYM GCPCLASS_PREBOUNDLTR}
+ GCPCLASS_PREBOUNDRTL = $40;
+ {$EXTERNALSYM GCPCLASS_PREBOUNDRTL}
+ GCPCLASS_POSTBOUNDLTR = $20;
+ {$EXTERNALSYM GCPCLASS_POSTBOUNDLTR}
+ GCPCLASS_POSTBOUNDRTL = $10;
+ {$EXTERNALSYM GCPCLASS_POSTBOUNDRTL}
+
+ GCPGLYPH_LINKBEFORE = $8000;
+ {$EXTERNALSYM GCPGLYPH_LINKBEFORE}
+ GCPGLYPH_LINKAFTER = $4000;
+ {$EXTERNALSYM GCPGLYPH_LINKAFTER}
+
+type
+ PGcpResultsA = ^TGcpResultsA;
+ tagGCP_RESULTSA = record
+ lStructSize: DWORD;
+ lpOutString: LPSTR;
+ lpOrder: LPUINT;
+ lpDx: PINT;
+ lpCaretPos: PINT;
+ lpClass: LPSTR;
+ lpGlyphs: LPWSTR;
+ nGlyphs: UINT;
+ nMaxFit: Integer;
+ end;
+ {$EXTERNALSYM tagGCP_RESULTSA}
+ GCP_RESULTSA = tagGCP_RESULTSA;
+ {$EXTERNALSYM GCP_RESULTSA}
+ LPGCP_RESULTSA = ^GCP_RESULTSA;
+ {$EXTERNALSYM LPGCP_RESULTSA}
+ TGcpResultsA = GCP_RESULTSA;
+
+ PGcpResultsW = ^TGcpResultsW;
+ tagGCP_RESULTSW = record
+ lStructSize: DWORD;
+ lpOutString: LPWSTR;
+ lpOrder: LPUINT;
+ lpDx: PINT;
+ lpCaretPos: PINT;
+ lpClass: LPSTR;
+ lpGlyphs: LPWSTR;
+ nGlyphs: UINT;
+ nMaxFit: Integer;
+ end;
+ {$EXTERNALSYM tagGCP_RESULTSW}
+ GCP_RESULTSW = tagGCP_RESULTSW;
+ {$EXTERNALSYM GCP_RESULTSW}
+ LPGCP_RESULTSW = ^GCP_RESULTSW;
+ {$EXTERNALSYM LPGCP_RESULTSW}
+ TGcpResultsW = GCP_RESULTSW;
+
+ {$IFDEF UNICODE}
+ GCP_RESULTS = GCP_RESULTSW;
+ {$EXTERNALSYM GCP_RESULTS}
+ LPGCP_RESULTS = LPGCP_RESULTSW;
+ {$EXTERNALSYM LPGCP_RESULTS}
+ TGcpResults = TGcpResultsW;
+ PGcpResults = PGcpResultsW;
+ {$ELSE}
+ GCP_RESULTS = GCP_RESULTSA;
+ {$EXTERNALSYM GCP_RESULTS}
+ LPGCP_RESULTS = LPGCP_RESULTSA;
+ {$EXTERNALSYM LPGCP_RESULTS}
+ TGcpResults = TGcpResultsA;
+ PGcpResults = PGcpResultsA;
+ {$ENDIF UNICODE}
+
+ PRasterizerStatus = ^TRasterizerStatus;
+ _RASTERIZER_STATUS = record
+ nSize: short;
+ wFlags: short;
+ nLanguageID: short;
+ end;
+ {$EXTERNALSYM _RASTERIZER_STATUS}
+ RASTERIZER_STATUS = _RASTERIZER_STATUS;
+ {$EXTERNALSYM RASTERIZER_STATUS}
+ LPRASTERIZER_STATUS = ^RASTERIZER_STATUS;
+ {$EXTERNALSYM LPRASTERIZER_STATUS}
+ TRasterizerStatus = _RASTERIZER_STATUS;
+
+// bits defined in wFlags of RASTERIZER_STATUS
+
+const
+ TT_AVAILABLE = $0001;
+ {$EXTERNALSYM TT_AVAILABLE}
+ TT_ENABLED = $0002;
+ {$EXTERNALSYM TT_ENABLED}
+
+// Pixel format descriptor
+
+type
+ PPixelFormatDescriptor = ^TPixelFormatDescriptor;
+ tagPIXELFORMATDESCRIPTOR = record
+ nSize: WORD;
+ nVersion: WORD;
+ dwFlags: DWORD;
+ iPixelType: BYTE;
+ cColorBits: BYTE;
+ cRedBits: BYTE;
+ cRedShift: BYTE;
+ cGreenBits: BYTE;
+ cGreenShift: BYTE;
+ cBlueBits: BYTE;
+ cBlueShift: BYTE;
+ cAlphaBits: BYTE;
+ cAlphaShift: BYTE;
+ cAccumBits: BYTE;
+ cAccumRedBits: BYTE;
+ cAccumGreenBits: BYTE;
+ cAccumBlueBits: BYTE;
+ cAccumAlphaBits: BYTE;
+ cDepthBits: BYTE;
+ cStencilBits: BYTE;
+ cAuxBuffers: BYTE;
+ iLayerType: BYTE;
+ bReserved: BYTE;
+ dwLayerMask: DWORD;
+ dwVisibleMask: DWORD;
+ dwDamageMask: DWORD;
+ end;
+ {$EXTERNALSYM tagPIXELFORMATDESCRIPTOR}
+ PIXELFORMATDESCRIPTOR = tagPIXELFORMATDESCRIPTOR;
+ {$EXTERNALSYM PIXELFORMATDESCRIPTOR}
+ LPPIXELFORMATDESCRIPTOR = ^PIXELFORMATDESCRIPTOR;
+ {$EXTERNALSYM LPPIXELFORMATDESCRIPTOR}
+ TPixelFormatDescriptor = PIXELFORMATDESCRIPTOR;
+
+// pixel types
+
+const
+ PFD_TYPE_RGBA = 0;
+ {$EXTERNALSYM PFD_TYPE_RGBA}
+ PFD_TYPE_COLORINDEX = 1;
+ {$EXTERNALSYM PFD_TYPE_COLORINDEX}
+
+// layer types
+
+ PFD_MAIN_PLANE = 0;
+ {$EXTERNALSYM PFD_MAIN_PLANE}
+ PFD_OVERLAY_PLANE = 1;
+ {$EXTERNALSYM PFD_OVERLAY_PLANE}
+ PFD_UNDERLAY_PLANE = DWORD(-1);
+ {$EXTERNALSYM PFD_UNDERLAY_PLANE}
+
+// PIXELFORMATDESCRIPTOR flags
+
+ PFD_DOUBLEBUFFER = $00000001;
+ {$EXTERNALSYM PFD_DOUBLEBUFFER}
+ PFD_STEREO = $00000002;
+ {$EXTERNALSYM PFD_STEREO}
+ PFD_DRAW_TO_WINDOW = $00000004;
+ {$EXTERNALSYM PFD_DRAW_TO_WINDOW}
+ PFD_DRAW_TO_BITMAP = $00000008;
+ {$EXTERNALSYM PFD_DRAW_TO_BITMAP}
+ PFD_SUPPORT_GDI = $00000010;
+ {$EXTERNALSYM PFD_SUPPORT_GDI}
+ PFD_SUPPORT_OPENGL = $00000020;
+ {$EXTERNALSYM PFD_SUPPORT_OPENGL}
+ PFD_GENERIC_FORMAT = $00000040;
+ {$EXTERNALSYM PFD_GENERIC_FORMAT}
+ PFD_NEED_PALETTE = $00000080;
+ {$EXTERNALSYM PFD_NEED_PALETTE}
+ PFD_NEED_SYSTEM_PALETTE = $00000100;
+ {$EXTERNALSYM PFD_NEED_SYSTEM_PALETTE}
+ PFD_SWAP_EXCHANGE = $00000200;
+ {$EXTERNALSYM PFD_SWAP_EXCHANGE}
+ PFD_SWAP_COPY = $00000400;
+ {$EXTERNALSYM PFD_SWAP_COPY}
+ PFD_SWAP_LAYER_BUFFERS = $00000800;
+ {$EXTERNALSYM PFD_SWAP_LAYER_BUFFERS}
+ PFD_GENERIC_ACCELERATED = $00001000;
+ {$EXTERNALSYM PFD_GENERIC_ACCELERATED}
+ PFD_SUPPORT_DIRECTDRAW = $00002000;
+ {$EXTERNALSYM PFD_SUPPORT_DIRECTDRAW}
+
+// PIXELFORMATDESCRIPTOR flags for use in ChoosePixelFormat only
+
+ PFD_DEPTH_DONTCARE = DWORD($20000000);
+ {$EXTERNALSYM PFD_DEPTH_DONTCARE}
+ PFD_DOUBLEBUFFER_DONTCARE = DWORD($40000000);
+ {$EXTERNALSYM PFD_DOUBLEBUFFER_DONTCARE}
+ PFD_STEREO_DONTCARE = DWORD($80000000);
+ {$EXTERNALSYM PFD_STEREO_DONTCARE}
+
+type
+ OLDFONTENUMPROCA = function(lpelf: LPLOGFONTA; lpntm: LPTEXTMETRICA; FontType: DWORD; lParam: LPARAM): Integer; stdcall;
+ {$EXTERNALSYM OLDFONTENUMPROCA}
+ OLDFONTENUMPROCW = function(lpelf: LPLOGFONTW; lpntm: LPTEXTMETRICW; FontType: DWORD; lParam: LPARAM): Integer; stdcall;
+ {$EXTERNALSYM OLDFONTENUMPROCW}
+ OLDFONTENUMPROC = function(lpelf: LPLOGFONT; lpntm: LPTEXTMETRIC; FontType: DWORD; lParam: LPARAM): Integer; stdcall;
+ {$EXTERNALSYM OLDFONTENUMPROC}
+
+ FONTENUMPROCA = OLDFONTENUMPROCA;
+ {$EXTERNALSYM FONTENUMPROCA}
+ FONTENUMPROCW = OLDFONTENUMPROCW;
+ {$EXTERNALSYM FONTENUMPROCW}
+ FONTENUMPROC = OLDFONTENUMPROC;
+ {$EXTERNALSYM FONTENUMPROC}
+
+ GOBJENUMPROC = function(lpLogObject: LPVOID; lpData: LPARAM): Integer; stdcall;
+ {$EXTERNALSYM GOBJENUMPROC}
+ LINEDDAPROC = procedure(X, Y: Integer; lpData: LPARAM); stdcall;
+ {$EXTERNALSYM LINEDDAPROC}
+
+function AddFontResourceA(lpszFileName: LPCSTR): Integer; stdcall;
+{$EXTERNALSYM AddFontResourceA}
+function AddFontResourceW(lpszFileName: LPCWSTR): Integer; stdcall;
+{$EXTERNALSYM AddFontResourceW}
+function AddFontResource(lpszFileName: LPCTSTR): Integer; stdcall;
+{$EXTERNALSYM AddFontResource}
+
+function AnimatePalette(hPal: HPALETTE; iStartIndex: UINT; cEntries: UINT; ppe: PPALETTEENTRY): BOOL; stdcall;
+{$EXTERNALSYM AnimatePalette}
+function Arc(hdc: HDC; nLeftRect, nTopRect, nRightRect, nBottomRect, nxStartArc, nyStartArc, nXEndArc, nYEndArc: Integer): BOOL; stdcall;
+{$EXTERNALSYM Arc}
+function BitBlt(hdcDEst: HDC; nXDest, nYDest, nWidth, nHeight: Integer; hdcSrc: HDC; nXSrc, nYSrc: Integer; dwRop: DWORD): BOOL; stdcall;
+{$EXTERNALSYM BitBlt}
+function CancelDC(hdc: HDC): BOOL; stdcall;
+{$EXTERNALSYM CancelDC}
+function Chord(hdc: HDC; nLeftRect, nTopRect, nRightRect, nBottomRect, nXRadial1, nYRadial1, nXRadial2, nYRadial2: Integer): BOOL; stdcall;
+{$EXTERNALSYM Chord}
+function ChoosePixelFormat(hdc: HDC; const ppfd: PIXELFORMATDESCRIPTOR): Integer; stdcall;
+{$EXTERNALSYM ChoosePixelFormat}
+function CloseMetaFile(hdc: HDC): HMETAFILE; stdcall;
+{$EXTERNALSYM CloseMetaFile}
+function CombineRgn(hrgnDest, hrgnSrc1, hrgnSrc2: HRGN; fnCombineMode: Integer): Integer; stdcall;
+{$EXTERNALSYM CombineRgn}
+function CopyMetaFileA(hmfSrc: HMETAFILE; lpszFile: LPCSTR): HMETAFILE; stdcall;
+{$EXTERNALSYM CopyMetaFileA}
+function CopyMetaFileW(hmfSrc: HMETAFILE; lpszFile: LPCWSTR): HMETAFILE; stdcall;
+{$EXTERNALSYM CopyMetaFileW}
+function CopyMetaFile(hmfSrc: HMETAFILE; lpszFile: LPCTSTR): HMETAFILE; stdcall;
+{$EXTERNALSYM CopyMetaFile}
+function CreateBitmap(nWidth, nHeight: Integer; Cplanes, cBitsPerPel: UINT; lpvBits: PVOID): HBITMAP; stdcall;
+{$EXTERNALSYM CreateBitmap}
+function CreateBitmapIndirect(const lpbm: BITMAP): HBITMAP; stdcall;
+{$EXTERNALSYM CreateBitmapIndirect}
+function CreateBrushIndirect(const lplb: LOGBRUSH): HBRUSH; stdcall;
+{$EXTERNALSYM CreateBrushIndirect}
+function CreateCompatibleBitmap(hdc: HDC; nWidth, nHeight: Integer): HBITMAP; stdcall;
+{$EXTERNALSYM CreateCompatibleBitmap}
+function CreateDiscardableBitmap(hdc: HDC; nWidth, nHeight: Integer): HBITMAP; stdcall;
+{$EXTERNALSYM CreateDiscardableBitmap}
+function CreateCompatibleDC(hdc: HDC): HDC; stdcall;
+{$EXTERNALSYM CreateCompatibleDC}
+function CreateDCA(lpszDriver, lpszDevice, lpszOutput: LPCSTR; lpInitData: LPDEVMODEA): HDC; stdcall;
+{$EXTERNALSYM CreateDCA}
+function CreateDCW(lpszDriver, lpszDevice, lpszOutput: LPCWSTR; lpInitData: LPDEVMODEW): HDC; stdcall;
+{$EXTERNALSYM CreateDCW}
+function CreateDC(lpszDriver, lpszDevice, lpszOutput: LPCTSTR; lpInitData: LPDEVMODE): HDC; stdcall;
+{$EXTERNALSYM CreateDC}
+function CreateDIBitmap(hdc: HDC; const lpbmih: BITMAPINFOHEADER; fdwInit: DWORD; lpbInit: PVOID; const lpbmi: BITMAPINFO; fuUsage: UINT): HBITMAP; stdcall;
+{$EXTERNALSYM CreateDIBitmap}
+function CreateDIBPatternBrush(hglbDIBPacked: HGLOBAL; fuColorSpec: UINT): HBRUSH; stdcall;
+{$EXTERNALSYM CreateDIBPatternBrush}
+function CreateDIBPatternBrushPt(lpPackedDIB: PVOID; iUsage: UINT): HBRUSH; stdcall;
+{$EXTERNALSYM CreateDIBPatternBrushPt}
+function CreateEllipticRgn(nLeftRect, nTopRect, nRightRect, nBottomRect: Integer): HRGN; stdcall;
+{$EXTERNALSYM CreateEllipticRgn}
+function CreateEllipticRgnIndirect(const lprc: RECT): HRGN; stdcall;
+{$EXTERNALSYM CreateEllipticRgnIndirect}
+function CreateFontIndirectA(const lplf: LOGFONTA): HFONT; stdcall;
+{$EXTERNALSYM CreateFontIndirectA}
+function CreateFontIndirectW(const lplf: LOGFONTW): HFONT; stdcall;
+{$EXTERNALSYM CreateFontIndirectW}
+function CreateFontIndirect(const lplf: LOGFONT): HFONT; stdcall;
+{$EXTERNALSYM CreateFontIndirect}
+function CreateFontA(nHeight, nWidth, nEscapement, nOrientation, fnWeight: Integer; fdwItalic, fdwUnderline, fdwStrikeOut, fdwCharSet, fdwOutputPrecision, fdwClipPrecision, fdwQuality, fdwPitchAndFamily: DWORD; lpszFace: LPCSTR): HFONT; stdcall;
+{$EXTERNALSYM CreateFontA}
+function CreateFontW(nHeight, nWidth, nEscapement, nOrientation, fnWeight: Integer; fdwItalic, fdwUnderline, fdwStrikeOut, fdwCharSet, fdwOutputPrecision, fdwClipPrecision, fdwQuality, fdwPitchAndFamily: DWORD; lpszFace: LPCWSTR): HFONT; stdcall;
+{$EXTERNALSYM CreateFontW}
+function CreateFont(nHeight, nWidth, nEscapement, nOrientation, fnWeight: Integer; fdwItalic, fdwUnderline, fdwStrikeOut, fdwCharSet, fdwOutputPrecision, fdwClipPrecision, fdwQuality, fdwPitchAndFamily: DWORD; lpszFace: LPCTSTR): HFONT; stdcall;
+{$EXTERNALSYM CreateFont}
+function CreateHatchBrush(fnStyle: Integer; clrref: COLORREF): HBRUSH; stdcall;
+{$EXTERNALSYM CreateHatchBrush}
+function CreateICA(lpszDriver, lpszDevice, lpszOutput: LPCSTR; lpdvmInit: LPDEVMODEA): HDC; stdcall;
+{$EXTERNALSYM CreateICA}
+function CreateICW(lpszDriver, lpszDevice, lpszOutput: LPCWSTR; lpdvmInit: LPDEVMODEW): HDC; stdcall;
+{$EXTERNALSYM CreateICW}
+function CreateIC(lpszDriver, lpszDevice, lpszOutput: LPCWSTR; lpdvmInit: LPDEVMODE): HDC; stdcall;
+{$EXTERNALSYM CreateIC}
+function CreateMetaFileA(lpszFile: LPCSTR): HDC; stdcall;
+{$EXTERNALSYM CreateMetaFileA}
+function CreateMetaFileW(lpszFile: LPCWSTR): HDC; stdcall;
+{$EXTERNALSYM CreateMetaFileW}
+function CreateMetaFile(lpszFile: LPCTSTR): HDC; stdcall;
+{$EXTERNALSYM CreateMetaFile}
+function CreatePalette(const lplgpl: LOGPALETTE): HPALETTE; stdcall;
+{$EXTERNALSYM CreatePalette}
+function CreatePen(fnPenStyle, nWidth: Integer; crColor: COLORREF): HPEN; stdcall;
+{$EXTERNALSYM CreatePen}
+function CreatePenIndirect(const lplgpn: LOGPEN): HPEN; stdcall;
+{$EXTERNALSYM CreatePenIndirect}
+function CreatePolyPolygonRgn(lppt: LPPOINT; lpPolyCounts: LPINT; nCount, fnPolyFillMode: Integer): HRGN; stdcall;
+{$EXTERNALSYM CreatePolyPolygonRgn}
+function CreatePatternBrush(hbmp: HBITMAP): HBRUSH; stdcall;
+{$EXTERNALSYM CreatePatternBrush}
+function CreateRectRgn(nLeftRect, nTopRect, nRightRect, nBottomRect: Integer): HRGN; stdcall;
+{$EXTERNALSYM CreateRectRgn}
+function CreateRectRgnIndirect(const lprc: RECT): HRGN; stdcall;
+{$EXTERNALSYM CreateRectRgnIndirect}
+function CreateRoundRectRgn(nLeftRect, nTopRect, nRightRect, nBottomRect, nWidthEllipse, nHeightEllipse: Integer): HRGN; stdcall;
+{$EXTERNALSYM CreateRoundRectRgn}
+function CreateScalableFontResourceA(fdwHidden: DWORD; lpszFontRes, lpszFontFile, lpszCurrentPath: LPCSTR): BOOL; stdcall;
+{$EXTERNALSYM CreateScalableFontResourceA}
+function CreateScalableFontResourceW(fdwHidden: DWORD; lpszFontRes, lpszFontFile, lpszCurrentPath: LPCWSTR): BOOL; stdcall;
+{$EXTERNALSYM CreateScalableFontResourceW}
+function CreateScalableFontResource(fdwHidden: DWORD; lpszFontRes, lpszFontFile, lpszCurrentPath: LPCTSTR): BOOL; stdcall;
+{$EXTERNALSYM CreateScalableFontResource}
+function CreateSolidBrush(crColor: COLORREF): HBRUSH; stdcall;
+{$EXTERNALSYM CreateSolidBrush}
+function DeleteDC(hdc: HDC): BOOL; stdcall;
+{$EXTERNALSYM DeleteDC}
+function DeleteMetaFile(hmf: HMETAFILE): BOOL; stdcall;
+{$EXTERNALSYM DeleteMetaFile}
+function DeleteObject(hObject: HGDIOBJ): BOOL; stdcall;
+{$EXTERNALSYM DeleteObject}
+function DescribePixelFormat(hdc: HDC; iPixelFormat: Integer; nBytes: UINT; ppfd: LPPIXELFORMATDESCRIPTOR): Integer; stdcall;
+{$EXTERNALSYM DescribePixelFormat}
+
+// mode selections for the device mode function
+
+const
+ DM_UPDATE = 1;
+ {$EXTERNALSYM DM_UPDATE}
+ DM_COPY = 2;
+ {$EXTERNALSYM DM_COPY}
+ DM_PROMPT = 4;
+ {$EXTERNALSYM DM_PROMPT}
+ DM_MODIFY = 8;
+ {$EXTERNALSYM DM_MODIFY}
+
+ DM_IN_BUFFER = DM_MODIFY;
+ {$EXTERNALSYM DM_IN_BUFFER}
+ DM_IN_PROMPT = DM_PROMPT;
+ {$EXTERNALSYM DM_IN_PROMPT}
+ DM_OUT_BUFFER = DM_COPY;
+ {$EXTERNALSYM DM_OUT_BUFFER}
+ DM_OUT_DEFAULT = DM_UPDATE;
+ {$EXTERNALSYM DM_OUT_DEFAULT}
+
+// device capabilities indices
+
+ DC_FIELDS = 1;
+ {$EXTERNALSYM DC_FIELDS}
+ DC_PAPERS = 2;
+ {$EXTERNALSYM DC_PAPERS}
+ DC_PAPERSIZE = 3;
+ {$EXTERNALSYM DC_PAPERSIZE}
+ DC_MINEXTENT = 4;
+ {$EXTERNALSYM DC_MINEXTENT}
+ DC_MAXEXTENT = 5;
+ {$EXTERNALSYM DC_MAXEXTENT}
+ DC_BINS = 6;
+ {$EXTERNALSYM DC_BINS}
+ DC_DUPLEX = 7;
+ {$EXTERNALSYM DC_DUPLEX}
+ DC_SIZE = 8;
+ {$EXTERNALSYM DC_SIZE}
+ DC_EXTRA = 9;
+ {$EXTERNALSYM DC_EXTRA}
+ DC_VERSION = 10;
+ {$EXTERNALSYM DC_VERSION}
+ DC_DRIVER = 11;
+ {$EXTERNALSYM DC_DRIVER}
+ DC_BINNAMES = 12;
+ {$EXTERNALSYM DC_BINNAMES}
+ DC_ENUMRESOLUTIONS = 13;
+ {$EXTERNALSYM DC_ENUMRESOLUTIONS}
+ DC_FILEDEPENDENCIES = 14;
+ {$EXTERNALSYM DC_FILEDEPENDENCIES}
+ DC_TRUETYPE = 15;
+ {$EXTERNALSYM DC_TRUETYPE}
+ DC_PAPERNAMES = 16;
+ {$EXTERNALSYM DC_PAPERNAMES}
+ DC_ORIENTATION = 17;
+ {$EXTERNALSYM DC_ORIENTATION}
+ DC_COPIES = 18;
+ {$EXTERNALSYM DC_COPIES}
+ DC_BINADJUST = 19;
+ {$EXTERNALSYM DC_BINADJUST}
+ DC_EMF_COMPLIANT = 20;
+ {$EXTERNALSYM DC_EMF_COMPLIANT}
+ DC_DATATYPE_PRODUCED = 21;
+ {$EXTERNALSYM DC_DATATYPE_PRODUCED}
+ DC_COLLATE = 22;
+ {$EXTERNALSYM DC_COLLATE}
+ DC_MANUFACTURER = 23;
+ {$EXTERNALSYM DC_MANUFACTURER}
+ DC_MODEL = 24;
+ {$EXTERNALSYM DC_MODEL}
+
+ DC_PERSONALITY = 25;
+ {$EXTERNALSYM DC_PERSONALITY}
+ DC_PRINTRATE = 26;
+ {$EXTERNALSYM DC_PRINTRATE}
+ DC_PRINTRATEUNIT = 27;
+ {$EXTERNALSYM DC_PRINTRATEUNIT}
+ PRINTRATEUNIT_PPM = 1;
+ {$EXTERNALSYM PRINTRATEUNIT_PPM}
+ PRINTRATEUNIT_CPS = 2;
+ {$EXTERNALSYM PRINTRATEUNIT_CPS}
+ PRINTRATEUNIT_LPM = 3;
+ {$EXTERNALSYM PRINTRATEUNIT_LPM}
+ PRINTRATEUNIT_IPM = 4;
+ {$EXTERNALSYM PRINTRATEUNIT_IPM}
+ DC_PRINTERMEM = 28;
+ {$EXTERNALSYM DC_PRINTERMEM}
+ DC_MEDIAREADY = 29;
+ {$EXTERNALSYM DC_MEDIAREADY}
+ DC_STAPLE = 30;
+ {$EXTERNALSYM DC_STAPLE}
+ DC_PRINTRATEPPM = 31;
+ {$EXTERNALSYM DC_PRINTRATEPPM}
+ DC_COLORDEVICE = 32;
+ {$EXTERNALSYM DC_COLORDEVICE}
+ DC_NUP = 33;
+ {$EXTERNALSYM DC_NUP}
+ DC_MEDIATYPENAMES = 34;
+ {$EXTERNALSYM DC_MEDIATYPENAMES}
+ DC_MEDIATYPES = 35;
+ {$EXTERNALSYM DC_MEDIATYPES}
+
+// bit fields of the return value (DWORD) for DC_TRUETYPE
+
+ DCTT_BITMAP = $0000001;
+ {$EXTERNALSYM DCTT_BITMAP}
+ DCTT_DOWNLOAD = $0000002;
+ {$EXTERNALSYM DCTT_DOWNLOAD}
+ DCTT_SUBDEV = $0000004;
+ {$EXTERNALSYM DCTT_SUBDEV}
+ DCTT_DOWNLOAD_OUTLINE = $0000008;
+ {$EXTERNALSYM DCTT_DOWNLOAD_OUTLINE}
+
+// return values for DC_BINADJUST
+
+ DCBA_FACEUPNONE = $0000;
+ {$EXTERNALSYM DCBA_FACEUPNONE}
+ DCBA_FACEUPCENTER = $0001;
+ {$EXTERNALSYM DCBA_FACEUPCENTER}
+ DCBA_FACEUPLEFT = $0002;
+ {$EXTERNALSYM DCBA_FACEUPLEFT}
+ DCBA_FACEUPRIGHT = $0003;
+ {$EXTERNALSYM DCBA_FACEUPRIGHT}
+ DCBA_FACEDOWNNONE = $0100;
+ {$EXTERNALSYM DCBA_FACEDOWNNONE}
+ DCBA_FACEDOWNCENTER = $0101;
+ {$EXTERNALSYM DCBA_FACEDOWNCENTER}
+ DCBA_FACEDOWNLEFT = $0102;
+ {$EXTERNALSYM DCBA_FACEDOWNLEFT}
+ DCBA_FACEDOWNRIGHT = $0103;
+ {$EXTERNALSYM DCBA_FACEDOWNRIGHT}
+
+function DeviceCapabilitiesA(pDevice, pPort: LPCSTR; fwCapability: WORD; pOutput: LPSTR; pDevMode: LPDEVMODEA): Integer; stdcall;
+{$EXTERNALSYM DeviceCapabilitiesA}
+function DeviceCapabilitiesW(pDevice, pPort: LPCWSTR; fwCapability: WORD; pOutput: LPWSTR; pDevMode: LPDEVMODEW): Integer; stdcall;
+{$EXTERNALSYM DeviceCapabilitiesW}
+function DeviceCapabilities(pDevice, pPort: LPCTSTR; fwCapability: WORD; pOutput: LPTSTR; pDevMode: LPDEVMODE): Integer; stdcall;
+{$EXTERNALSYM DeviceCapabilities}
+function DrawEscape(hdc: HDC; nEscape, cbInput: Integer; lpszInData: LPCSTR): Integer; stdcall;
+{$EXTERNALSYM DrawEscape}
+function Ellipse(hdc: HDC; nLeftRect, nTopRect, nRightRect, nBottomRect: Integer): BOOL; stdcall;
+{$EXTERNALSYM Ellipse}
+function EnumFontFamiliesExA(hdc: HDC; lpLogFont: LPLOGFONTA; lpEnumFontFamExProc: FONTENUMPROCA; lParam: LPARAM; dwFlags: DWORD): Integer; stdcall;
+{$EXTERNALSYM EnumFontFamiliesExA}
+function EnumFontFamiliesExW(hdc: HDC; lpLogFont: LPLOGFONTW; lpEnumFontFamExProc: FONTENUMPROCW; lParam: LPARAM; dwFlags: DWORD): Integer; stdcall;
+{$EXTERNALSYM EnumFontFamiliesExW}
+function EnumFontFamiliesEx(hdc: HDC; lpLogFont: LPLOGFONT; lpEnumFontFamExProc: FONTENUMPROC; lParam: LPARAM; dwFlags: DWORD): Integer; stdcall;
+{$EXTERNALSYM EnumFontFamiliesEx}
+
+function EnumFontFamiliesA(hdc: HDC; lpszFamily: LPCSTR; lpEnumFontFamProc: FONTENUMPROCA; lParam: LPARAM): Integer; stdcall;
+{$EXTERNALSYM EnumFontFamiliesA}
+function EnumFontFamiliesW(hdc: HDC; lpszFamily: LPCWSTR; lpEnumFontFamProc: FONTENUMPROCW; lParam: LPARAM): Integer; stdcall;
+{$EXTERNALSYM EnumFontFamiliesW}
+function EnumFontFamilies(hdc: HDC; lpszFamily: LPCTSTR; lpEnumFontFamProc: FONTENUMPROC; lParam: LPARAM): Integer; stdcall;
+{$EXTERNALSYM EnumFontFamilies}
+
+function EnumFontsA(hdc: HDC; lpFaceName: LPCSTR; lpFontFunc: FONTENUMPROCA; lParam: LPARAM): Integer; stdcall;
+{$EXTERNALSYM EnumFontsA}
+function EnumFontsW(hdc: HDC; lpFaceName: LPCWSTR; lpFontFunc: FONTENUMPROCW; lParam: LPARAM): Integer; stdcall;
+{$EXTERNALSYM EnumFontsW}
+function EnumFonts(hdc: HDC; lpFaceName: LPCTSTR; lpFontFunc: FONTENUMPROC; lParam: LPARAM): Integer; stdcall;
+{$EXTERNALSYM EnumFonts}
+
+function EnumObjects(hdc: HDC; mObjectType: Integer; lpObjectFunc: GOBJENUMPROC; lParam: LPARAM): Integer; stdcall;
+{$EXTERNALSYM EnumObjects}
+
+function EqualRgn(hSrcRgn1, hSrcRgn2: HRGN): BOOL; stdcall;
+{$EXTERNALSYM EqualRgn}
+function Escape(hdc: HDC; nEscape, cbInput: Integer; lpvInData: LPCSTR; lpvOutData: LPVOID): Integer; stdcall;
+{$EXTERNALSYM Escape}
+function ExtEscape(hdc: HDC; nEscape, cbInput: Integer; lpszInData: LPCSTR; cbOutput: Integer; lpszOutData: LPSTR): Integer; stdcall;
+{$EXTERNALSYM ExtEscape}
+function ExcludeClipRect(hdc: HDC; nLeftRect, nTopRect, nRightRect, nBottomRect: Integer): Integer; stdcall;
+{$EXTERNALSYM ExcludeClipRect}
+function ExtCreateRegion(lpXForm: LPXFORM; nCount: DWORD; lpRgnData: LPRGNDATA): HRGN; stdcall;
+{$EXTERNALSYM ExtCreateRegion}
+function ExtFloodFill(hdc: HDC; nXStart, nYStart: Integer; crColor: COLORREF; fuFillType: UINT): BOOL; stdcall;
+{$EXTERNALSYM ExtFloodFill}
+function FillRgn(hdc: HDC; hrgn: HRGN; hbr: HBRUSH): BOOL; stdcall;
+{$EXTERNALSYM FillRgn}
+function FloodFill(hdc: HDC; nXStart, nYStart: Integer; crFill: COLORREF): BOOL; stdcall;
+{$EXTERNALSYM FloodFill}
+function FrameRgn(hdc: HDC; hrgn: HRGN; hbr: HBRUSH; nWidth, nHeight: Integer): BOOL; stdcall;
+{$EXTERNALSYM FrameRgn}
+function GetROP2(hdc: HDC): Integer; stdcall;
+{$EXTERNALSYM GetROP2}
+function GetAspectRatioFilterEx(hdc: HDC; var lpAspectRatio: TSize): BOOL; stdcall;
+{$EXTERNALSYM GetAspectRatioFilterEx}
+function GetBkColor(hdc: HDC): COLORREF; stdcall;
+{$EXTERNALSYM GetBkColor}
+
+function GetDCBrushColor(hdc: HDC): COLORREF; stdcall;
+{$EXTERNALSYM GetDCBrushColor}
+function GetDCPenColor(hdc: HDC): COLORREF; stdcall;
+{$EXTERNALSYM GetDCPenColor}
+
+function GetBkMode(hdc: HDC): Integer; stdcall;
+{$EXTERNALSYM GetBkMode}
+function GetBitmapBits(hbmp: HBITMAP; cbBuffer: LONG; lpvBits: LPVOID): LONG; stdcall;
+{$EXTERNALSYM GetBitmapBits}
+function GetBitmapDimensionEx(hBitmap: HBITMAP; var lpDimension: TSize): BOOL; stdcall;
+{$EXTERNALSYM GetBitmapDimensionEx}
+function GetBoundsRect(hdc: HDC; var lprcBounds: RECT; flags: UINT): UINT; stdcall;
+{$EXTERNALSYM GetBoundsRect}
+
+function GetBrushOrgEx(hdc: HDC; var lppt: POINT): BOOL; stdcall;
+{$EXTERNALSYM GetBrushOrgEx}
+
+function GetCharWidthA(hdc: HDC; iFirstChar, iLastChar: UINT; lpBuffer: LPINT): BOOL; stdcall;
+{$EXTERNALSYM GetCharWidthA}
+function GetCharWidthW(hdc: HDC; iFirstChar, iLastChar: UINT; lpBuffer: LPINT): BOOL; stdcall;
+{$EXTERNALSYM GetCharWidthW}
+function GetCharWidth(hdc: HDC; iFirstChar, iLastChar: UINT; lpBuffer: LPINT): BOOL; stdcall;
+{$EXTERNALSYM GetCharWidth}
+function GetCharWidth32A(hdc: HDC; iFirstChar, iLastChar: UINT; lpBuffer: LPINT): BOOL; stdcall;
+{$EXTERNALSYM GetCharWidth32A}
+function GetCharWidth32W(hdc: HDC; iFirstChar, iLastChar: UINT; lpBuffer: LPINT): BOOL; stdcall;
+{$EXTERNALSYM GetCharWidth32W}
+function GetCharWidth32(hdc: HDC; iFirstChar, iLastChar: UINT; lpBuffer: LPINT): BOOL; stdcall;
+{$EXTERNALSYM GetCharWidth32}
+function GetCharWidthFloatA(hdc: HDC; iFirstChar, iLastChar: UINT; pxBuffer: PFLOAT): BOOL; stdcall;
+{$EXTERNALSYM GetCharWidthFloatA}
+function GetCharWidthFloatW(hdc: HDC; iFirstChar, iLastChar: UINT; pxBuffer: PFLOAT): BOOL; stdcall;
+{$EXTERNALSYM GetCharWidthFloatW}
+function GetCharWidthFloat(hdc: HDC; iFirstChar, iLastChar: UINT; pxBuffer: PFLOAT): BOOL; stdcall;
+{$EXTERNALSYM GetCharWidthFloat}
+function GetCharABCWidthsA(hdc: HDC; uFirstChar, uLastChar: UINT; lpAbc: LPABC): BOOL; stdcall;
+{$EXTERNALSYM GetCharABCWidthsA}
+function GetCharABCWidthsW(hdc: HDC; uFirstChar, uLastChar: UINT; lpAbc: LPABC): BOOL; stdcall;
+{$EXTERNALSYM GetCharABCWidthsW}
+function GetCharABCWidths(hdc: HDC; uFirstChar, uLastChar: UINT; lpAbc: LPABC): BOOL; stdcall;
+{$EXTERNALSYM GetCharABCWidths}
+function GetCharABCWidthsFloatA(hdc: HDC; iFirstChar, iLastChar: UINT; lpAbcF: LPABCFLOAT): BOOL; stdcall;
+{$EXTERNALSYM GetCharABCWidthsFloatA}
+function GetCharABCWidthsFloatW(hdc: HDC; iFirstChar, iLastChar: UINT; lpAbcF: LPABCFLOAT): BOOL; stdcall;
+{$EXTERNALSYM GetCharABCWidthsFloatW}
+function GetCharABCWidthsFloat(hdc: HDC; iFirstChar, iLastChar: UINT; lpAbcF: LPABCFLOAT): BOOL; stdcall;
+{$EXTERNALSYM GetCharABCWidthsFloat}
+
+function GetClipBox(hdc: HDC; var lprc: RECT): Integer; stdcall;
+{$EXTERNALSYM GetClipBox}
+function GetClipRgn(hdc: HDC; hrgn: HRGN): Integer; stdcall;
+{$EXTERNALSYM GetClipRgn}
+function GetMetaRgn(hdc: HDC; hrgn: HRGN): Integer; stdcall;
+{$EXTERNALSYM GetMetaRgn}
+function GetCurrentObject(hdc: HDC; uObjectType: UINT): HGDIOBJ; stdcall;
+{$EXTERNALSYM GetCurrentObject}
+function GetCurrentPositionEx(hdc: HDC; var lpPoint: POINT): BOOL; stdcall;
+{$EXTERNALSYM GetCurrentPositionEx}
+function GetDeviceCaps(hdc: HDC; nIndex: Integer): Integer; stdcall;
+{$EXTERNALSYM GetDeviceCaps}
+function GetDIBits(hdc: HDC; hbmp: HBITMAP; uStartScan, cScanLines: UINT; lpvBits: LPVOID; var lpbi: BITMAPINFO; uUsage: UINT): Integer; stdcall;
+{$EXTERNALSYM GetDIBits}
+function GetFontData(hdc: HDC; dwTable, dwOffset: DWORD; lpvBuffer: LPVOID; cbData: DWORD): DWORD; stdcall;
+{$EXTERNALSYM GetFontData}
+function GetGlyphOutlineA(hdc: HDC; uChar, uFormat: UINT; var lpgm: GLYPHMETRICS; cbBuffer: DWORD; lpvBuffer: LPVOID; const lpMat2: MAT2): DWORD; stdcall;
+{$EXTERNALSYM GetGlyphOutlineA}
+function GetGlyphOutlineW(hdc: HDC; uChar, uFormat: UINT; var lpgm: GLYPHMETRICS; cbBuffer: DWORD; lpvBuffer: LPVOID; const lpMat2: MAT2): DWORD; stdcall;
+{$EXTERNALSYM GetGlyphOutlineW}
+function GetGlyphOutline(hdc: HDC; uChar, uFormat: UINT; var lpgm: GLYPHMETRICS; cbBuffer: DWORD; lpvBuffer: LPVOID; const lpMat2: MAT2): DWORD; stdcall;
+{$EXTERNALSYM GetGlyphOutline}
+function GetGraphicsMode(hdc: HDC): Integer; stdcall;
+{$EXTERNALSYM GetGraphicsMode}
+function GetMapMode(hdc: HDC): Integer; stdcall;
+{$EXTERNALSYM GetMapMode}
+function GetMetaFileBitsEx(hmf: HMETAFILE; nSize: UINT; lpvData: LPVOID): UINT; stdcall;
+{$EXTERNALSYM GetMetaFileBitsEx}
+function GetMetaFileA(lpszMetaFile: LPCSTR): HMETAFILE; stdcall;
+{$EXTERNALSYM GetMetaFileA}
+function GetMetaFileW(lpszMetaFile: LPCWSTR): HMETAFILE; stdcall;
+{$EXTERNALSYM GetMetaFileW}
+function GetMetaFile(lpszMetaFile: LPCTSTR): HMETAFILE; stdcall;
+{$EXTERNALSYM GetMetaFile}
+function GetNearestColor(hdc: HDC; crColor: COLORREF): COLORREF; stdcall;
+{$EXTERNALSYM GetNearestColor}
+function GetNearestPaletteIndex(hPal: HPALETTE; crColor: COLORREF): UINT; stdcall;
+{$EXTERNALSYM GetNearestPaletteIndex}
+function GetObjectType(h: HGDIOBJ): DWORD; stdcall;
+{$EXTERNALSYM GetObjectType}
+
+function GetOutlineTextMetricsA(hdc: HDC; cbData: UINT; lpOTM: LPOUTLINETEXTMETRICA): UINT; stdcall;
+{$EXTERNALSYM GetOutlineTextMetricsA}
+function GetOutlineTextMetricsW(hdc: HDC; cbData: UINT; lpOTM: LPOUTLINETEXTMETRICW): UINT; stdcall;
+{$EXTERNALSYM GetOutlineTextMetricsW}
+function GetOutlineTextMetrics(hdc: HDC; cbData: UINT; lpOTM: LPOUTLINETEXTMETRIC): UINT; stdcall;
+{$EXTERNALSYM GetOutlineTextMetrics}
+function GetPaletteEntries(hPal: HPALETTE; iStartIndex, nEntries: UINT; lppe: LPPALETTEENTRY): UINT; stdcall;
+{$EXTERNALSYM GetPaletteEntries}
+function GetPixel(hdc: HDC; nXPos, nYPos: Integer): COLORREF; stdcall;
+{$EXTERNALSYM GetPixel}
+function GetPixelFormat(hdc: HDC): Integer; stdcall;
+{$EXTERNALSYM GetPixelFormat}
+function GetPolyFillMode(hdc: HDC): Integer; stdcall;
+{$EXTERNALSYM GetPolyFillMode}
+function GetRasterizerCaps(var lprs: RASTERIZER_STATUS; cb: UINT): BOOL; stdcall;
+{$EXTERNALSYM GetRasterizerCaps}
+function GetRandomRgn(hdc: HDC; hrgn: HRGN; iNum: Integer): Integer; stdcall;
+{$EXTERNALSYM GetRandomRgn}
+function GetRegionData(hrgn: HRGN; dwCount: DWORD; lpRgnData: LPRGNDATA): DWORD; stdcall;
+{$EXTERNALSYM GetRegionData}
+function GetRgnBox(hrgn: HRGN; var lprc: RECT): Integer; stdcall;
+{$EXTERNALSYM GetRgnBox}
+function GetStockObject(fnObject: Integer): HGDIOBJ; stdcall;
+{$EXTERNALSYM GetStockObject}
+function GetStretchBltMode(hdc: HDC): Integer; stdcall;
+{$EXTERNALSYM GetStretchBltMode}
+function GetSystemPaletteEntries(hdc: HDC; iStartIndex, nEntries: UINT; lppe: LPPALETTEENTRY): UINT; stdcall;
+{$EXTERNALSYM GetSystemPaletteEntries}
+function GetSystemPaletteUse(hdc: HDC): UINT; stdcall;
+{$EXTERNALSYM GetSystemPaletteUse}
+function GetTextCharacterExtra(hdc: HDC): Integer; stdcall;
+{$EXTERNALSYM GetTextCharacterExtra}
+function GetTextAlign(hdc: HDC): UINT; stdcall;
+{$EXTERNALSYM GetTextAlign}
+function GetTextColor(hdc: HDC): COLORREF; stdcall;
+{$EXTERNALSYM GetTextColor}
+
+function GetTextExtentPointA(hdc: HDC; lpString: LPCSTR; cbString: Integer; var Size: TSize): BOOL; stdcall;
+{$EXTERNALSYM GetTextExtentPointA}
+function GetTextExtentPointW(hdc: HDC; lpString: LPCWSTR; cbString: Integer; var Size: TSize): BOOL; stdcall;
+{$EXTERNALSYM GetTextExtentPointW}
+function GetTextExtentPoint(hdc: HDC; lpString: LPCTSTR; cbString: Integer; var Size: TSize): BOOL; stdcall;
+{$EXTERNALSYM GetTextExtentPoint}
+function GetTextExtentPoint32A(hdc: HDC; lpString: LPCSTR; cbString: Integer; var Size: TSize): BOOL; stdcall;
+{$EXTERNALSYM GetTextExtentPoint32A}
+function GetTextExtentPoint32W(hdc: HDC; lpString: LPCWSTR; cbString: Integer; var Size: TSize): BOOL; stdcall;
+{$EXTERNALSYM GetTextExtentPoint32W}
+function GetTextExtentPoint32(hdc: HDC; lpString: LPCTSTR; cbString: Integer; var Size: TSize): BOOL; stdcall;
+{$EXTERNALSYM GetTextExtentPoint32}
+function GetTextExtentExPointA(hdc: HDC; lpszStr: LPCSTR; cchString, nMaxExtend: Integer; lpnFit, alpDx: LPINT; var lpSize: TSize): BOOL; stdcall;
+{$EXTERNALSYM GetTextExtentExPointA}
+function GetTextExtentExPointW(hdc: HDC; lpszStr: LPCWSTR; cchString, nMaxExtend: Integer; lpnFit, alpDx: LPINT; var lpSize: TSize): BOOL; stdcall;
+{$EXTERNALSYM GetTextExtentExPointW}
+function GetTextExtentExPoint(hdc: HDC; lpszStr: LPCTSTR; cchString, nMaxExtend: Integer; lpnFit, alpDx: LPINT; var lpSize: TSize): BOOL; stdcall;
+{$EXTERNALSYM GetTextExtentExPoint}
+function GetTextCharset(hdc: HDC): Integer; stdcall;
+{$EXTERNALSYM GetTextCharset}
+function GetTextCharsetInfo(hdc: HDC; lpSig: LPFONTSIGNATURE; dwFlags: DWORD): Integer; stdcall;
+{$EXTERNALSYM GetTextCharsetInfo}
+function TranslateCharsetInfo(lpSrc: LPDWORD; lpCs: LPCHARSETINFO; dwFlags: DWORD): BOOL; stdcall;
+{$EXTERNALSYM TranslateCharsetInfo}
+function GetFontLanguageInfo(hdc: HDC): DWORD; stdcall;
+{$EXTERNALSYM GetFontLanguageInfo}
+function GetCharacterPlacementA(hdc: HDC; lpString: LPCSTR; nCount, nMaxExtend: Integer; var lpResults: GCP_RESULTSA; dwFlags: DWORD): DWORD; stdcall;
+{$EXTERNALSYM GetCharacterPlacementA}
+function GetCharacterPlacementW(hdc: HDC; lpString: LPCWSTR; nCount, nMaxExtend: Integer; var lpResults: GCP_RESULTSW; dwFlags: DWORD): DWORD; stdcall;
+{$EXTERNALSYM GetCharacterPlacementW}
+function GetCharacterPlacement(hdc: HDC; lpString: LPCTSTR; nCount, nMaxExtend: Integer; var lpResults: GCP_RESULTS; dwFlags: DWORD): DWORD; stdcall;
+{$EXTERNALSYM GetCharacterPlacement}
+
+type
+ PWcRange = ^TWcRange;
+ tagWCRANGE = record
+ wcLow: WCHAR;
+ cGlyphs: USHORT;
+ end;
+ {$EXTERNALSYM tagWCRANGE}
+ WCRANGE = tagWCRANGE;
+ {$EXTERNALSYM WCRANGE}
+ LPWCRANGE = ^WCRANGE;
+ {$EXTERNALSYM LPWCRANGE}
+ TWcRange = WCRANGE;
+
+ PGlyphSet = ^TGlyphSet;
+ tagGLYPHSET = record
+ cbThis: DWORD;
+ flAccel: DWORD;
+ cGlyphsSupported: DWORD;
+ cRanges: DWORD;
+ ranges: array [0..0] of WCRANGE;
+ end;
+ {$EXTERNALSYM tagGLYPHSET}
+ GLYPHSET = tagGLYPHSET;
+ {$EXTERNALSYM GLYPHSET}
+ LPGLYPHSET = ^GLYPHSET;
+ {$EXTERNALSYM LPGLYPHSET}
+ TGlyphSet = GLYPHSET;
+
+// flAccel flags for the GLYPHSET structure above
+
+const
+ GS_8BIT_INDICES = $00000001;
+ {$EXTERNALSYM GS_8BIT_INDICES}
+
+// flags for GetGlyphIndices
+
+ GGI_MARK_NONEXISTING_GLYPHS = $0001;
+ {$EXTERNALSYM GGI_MARK_NONEXISTING_GLYPHS}
+
+function GetFontUnicodeRanges(hdc: HDC; lpgs: LPGLYPHSET): DWORD; stdcall;
+{$EXTERNALSYM GetFontUnicodeRanges}
+
+function GetGlyphIndicesA(hdc: HDC; lpstr: LPCSTR; c: Integer; pgi: LPWORD; fl: DWORD): DWORD; stdcall;
+{$EXTERNALSYM GetGlyphIndicesA}
+function GetGlyphIndicesW(hdc: HDC; lpstr: LPCWSTR; c: Integer; pgi: LPWORD; fl: DWORD): DWORD; stdcall;
+{$EXTERNALSYM GetGlyphIndicesW}
+function GetGlyphIndices(hdc: HDC; lpstr: LPCTSTR; c: Integer; pgi: LPWORD; fl: DWORD): DWORD; stdcall;
+{$EXTERNALSYM GetGlyphIndices}
+
+function GetTextExtentPointI(hdc: HDC; pgiIn: LPWORD; cgi: Integer; lpSize: LPSIZE): BOOL; stdcall;
+{$EXTERNALSYM GetTextExtentPointI}
+function GetTextExtentExPointI(hdc: HDC; pgiIn: LPWORD; cgi, nMaxExtend: Integer;
+ lpnFit, alpDx: LPINT; lpSize: LPSIZE): BOOL; stdcall;
+{$EXTERNALSYM GetTextExtentExPointI}
+function GetCharWidthI(hdc: HDC; giFirst, cgi: UINT; pgi: LPWORD; lpBuffer: LPINT): BOOL; stdcall;
+{$EXTERNALSYM GetCharWidthI}
+function GetCharABCWidthsI(hdc: HDC; giFirst, cgi: UINT; pgi: LPWORD; lpAbc: LPABC): BOOL; stdcall;
+{$EXTERNALSYM GetCharABCWidthsI}
+
+const
+ STAMP_DESIGNVECTOR = $8000000 + Ord('d') + (Ord('v') shl 8);
+ {$EXTERNALSYM STAMP_DESIGNVECTOR}
+ STAMP_AXESLIST = $8000000 + Ord('a') + (Ord('l') shl 8);
+ {$EXTERNALSYM STAMP_AXESLIST}
+ MM_MAX_NUMAXES = 16;
+ {$EXTERNALSYM MM_MAX_NUMAXES}
+
+type
+ PDesignVector = ^TDesignVector;
+ tagDESIGNVECTOR = record
+ dvReserved: DWORD;
+ dvNumAxes: DWORD;
+ dvValues: array [0..MM_MAX_NUMAXES - 1] of LONG;
+ end;
+ {$EXTERNALSYM tagDESIGNVECTOR}
+ DESIGNVECTOR = tagDESIGNVECTOR;
+ {$EXTERNALSYM DESIGNVECTOR}
+ LPDESIGNVECTOR = ^DESIGNVECTOR;
+ {$EXTERNALSYM LPDESIGNVECTOR}
+ TDesignVector = DESIGNVECTOR;
+
+function AddFontResourceExA(lpszFilename: LPCSTR; fl: DWORD; pdv: PVOID): Integer; stdcall;
+{$EXTERNALSYM AddFontResourceExA}
+function AddFontResourceExW(lpszFilename: LPCWSTR; fl: DWORD; pdv: PVOID): Integer; stdcall;
+{$EXTERNALSYM AddFontResourceExW}
+function AddFontResourceEx(lpszFilename: LPCTSTR; fl: DWORD; pdv: PVOID): Integer; stdcall;
+{$EXTERNALSYM AddFontResourceEx}
+
+function RemoveFontResourceExA(lpFilename: LPCSTR; fl: DWORD; pdv: PVOID): BOOL; stdcall;
+{$EXTERNALSYM RemoveFontResourceExA}
+function RemoveFontResourceExW(lpFilename: LPCWSTR; fl: DWORD; pdv: PVOID): BOOL; stdcall;
+{$EXTERNALSYM RemoveFontResourceExW}
+function RemoveFontResourceEx(lpFilename: LPCTSTR; fl: DWORD; pdv: PVOID): BOOL; stdcall;
+{$EXTERNALSYM RemoveFontResourceEx}
+
+function AddFontMemResourceEx(pbFont: PVOID; cbFont: DWORD; pdv: PVOID; pcFonts: LPDWORD): HANDLE; stdcall;
+{$EXTERNALSYM AddFontMemResourceEx}
+function RemoveFontMemResourceEx(fh: HANDLE): BOOL; stdcall;
+{$EXTERNALSYM RemoveFontMemResourceEx}
+
+const
+ FR_PRIVATE = $10;
+ {$EXTERNALSYM FR_PRIVATE}
+ FR_NOT_ENUM = $20;
+ {$EXTERNALSYM FR_NOT_ENUM}
+
+// The actual size of the DESIGNVECTOR and ENUMLOGFONTEXDV structures
+// is determined by dvNumAxes,
+// MM_MAX_NUMAXES only detemines the maximal size allowed
+
+const
+ MM_MAX_AXES_NAMELEN = 16;
+ {$EXTERNALSYM MM_MAX_AXES_NAMELEN}
+
+type
+ PAxisInfoA = ^TAxisInfoA;
+ tagAXISINFOA = record
+ axMinValue: LONG;
+ axMaxValue: LONG;
+ axAxisName: array [0..MM_MAX_AXES_NAMELEN - 1] of BYTE;
+ end;
+ {$EXTERNALSYM tagAXISINFOA}
+ AXISINFOA = tagAXISINFOA;
+ {$EXTERNALSYM AXISINFOA}
+ LPAXISINFOA = ^AXISINFOA;
+ {$EXTERNALSYM LPAXISINFOA}
+ TAxisInfoA = AXISINFOA;
+
+ PAxisInfoW = ^TAxisInfoW;
+ tagAXISINFOW = record
+ axMinValue: LONG;
+ axMaxValue: LONG;
+ axAxisName: array [0..MM_MAX_AXES_NAMELEN - 1] of WCHAR;
+ end;
+ {$EXTERNALSYM tagAXISINFOW}
+ AXISINFOW = tagAXISINFOW;
+ {$EXTERNALSYM AXISINFOW}
+ LPAXISINFOW = ^AXISINFOW;
+ {$EXTERNALSYM LPAXISINFOW}
+ TAxisInfoW = AXISINFOW;
+
+ {$IFDEF UNICODE}
+ AXISINFO = AXISINFOW;
+ {$EXTERNALSYM AXISINFO}
+ PAXISINFO = PAXISINFOW;
+ {$EXTERNALSYM PAXISINFO}
+ LPAXISINFO = LPAXISINFOW;
+ {$EXTERNALSYM LPAXISINFO}
+ TAxisInfo = TAxisInfoW;
+ {$ELSE}
+ AXISINFO = AXISINFOA;
+ {$EXTERNALSYM AXISINFO}
+ PAXISINFO = PAXISINFOA;
+ {$EXTERNALSYM PAXISINFO}
+ LPAXISINFO = LPAXISINFOA;
+ {$EXTERNALSYM LPAXISINFO}
+ TAxisInfo = TAxisInfoA;
+ {$ENDIF UNICODE}
+
+ PAxesListA = ^TAxesListA;
+ tagAXESLISTA = record
+ axlReserved: DWORD;
+ axlNumAxes: DWORD;
+ axlAxisInfo: array [0..MM_MAX_NUMAXES - 1] of AXISINFOA;
+ end;
+ {$EXTERNALSYM tagAXESLISTA}
+ AXESLISTA = tagAXESLISTA;
+ {$EXTERNALSYM AXESLISTA}
+ LPAXESLISTA = ^AXESLISTA;
+ {$EXTERNALSYM LPAXESLISTA}
+ TAxesListA = tagAXESLISTA;
+
+ PAxesListW = ^TAxesListW;
+ tagAXESLISTW = record
+ axlReserved: DWORD;
+ axlNumAxes: DWORD;
+ axlAxisInfo: array [0..MM_MAX_NUMAXES - 1] of AXISINFOW;
+ end;
+ {$EXTERNALSYM tagAXESLISTW}
+ AXESLISTW = tagAXESLISTW;
+ {$EXTERNALSYM AXESLISTW}
+ LPAXESLISTW = ^AXESLISTW;
+ {$EXTERNALSYM LPAXESLISTW}
+ TAxesListW = tagAXESLISTW;
+
+ {$IFDEF UNICODE}
+ AXESLIST = AXESLISTW;
+ {$EXTERNALSYM AXESLIST}
+ PAXESLIST = PAXESLISTW;
+ {$EXTERNALSYM PAXESLIST}
+ LPAXESLIST = LPAXESLISTW;
+ {$EXTERNALSYM LPAXESLIST}
+ TAxesList = TAxesListW;
+ {$ELSE}
+ AXESLIST = AXESLISTA;
+ {$EXTERNALSYM AXESLIST}
+ PAXESLIST = PAXESLISTA;
+ {$EXTERNALSYM PAXESLIST}
+ LPAXESLIST = LPAXESLISTA;
+ {$EXTERNALSYM LPAXESLIST}
+ TAxesList = TAxesListA;
+ {$ENDIF UNICODE}
+
+// The actual size of the AXESLIST and ENUMTEXTMETRIC structure is
+// determined by axlNumAxes,
+// MM_MAX_NUMAXES only detemines the maximal size allowed
+
+ PEnumLogFontExDVA = ^TEnumLogFontExDVA;
+ tagENUMLOGFONTEXDVA = record
+ elfEnumLogfontEx: ENUMLOGFONTEXA;
+ elfDesignVector: DESIGNVECTOR;
+ end;
+ {$EXTERNALSYM tagENUMLOGFONTEXDVA}
+ ENUMLOGFONTEXDVA = tagENUMLOGFONTEXDVA;
+ {$EXTERNALSYM ENUMLOGFONTEXDVA}
+ LPENUMLOGFONTEXDVA = ^ENUMLOGFONTEXDVA;
+ {$EXTERNALSYM LPENUMLOGFONTEXDVA}
+ TEnumLogFontExDVA = tagENUMLOGFONTEXDVA;
+
+ PEnumLogFontExDVW = ^TEnumLogFontExDVW;
+ tagENUMLOGFONTEXDVW = record
+ elfEnumLogfontEx: ENUMLOGFONTEXW;
+ elfDesignVector: DESIGNVECTOR;
+ end;
+ {$EXTERNALSYM tagENUMLOGFONTEXDVw}
+ ENUMLOGFONTEXDVW = tagENUMLOGFONTEXDVW;
+ {$EXTERNALSYM ENUMLOGFONTEXDVW}
+ LPENUMLOGFONTEXDVW = ^ENUMLOGFONTEXDVW;
+ {$EXTERNALSYM LPENUMLOGFONTEXDVW}
+ TEnumLogFontExDVW = tagENUMLOGFONTEXDVW;
+
+ {$IFDEF UNICODE}
+ ENUMLOGFONTEXDV = ENUMLOGFONTEXDVW;
+ {$EXTERNALSYM ENUMLOGFONTEXDV}
+ PENUMLOGFONTEXDV = PENUMLOGFONTEXDVW;
+ {$EXTERNALSYM PENUMLOGFONTEXDV}
+ LPENUMLOGFONTEXDV = LPENUMLOGFONTEXDVW;
+ {$EXTERNALSYM LPENUMLOGFONTEXDV}
+ TEnumLogFontExDV = TEnumLogFontExDVW;
+ {$ELSE}
+ ENUMLOGFONTEXDV = ENUMLOGFONTEXDVA;
+ {$EXTERNALSYM ENUMLOGFONTEXDV}
+ PENUMLOGFONTEXDV = PENUMLOGFONTEXDVA;
+ {$EXTERNALSYM PENUMLOGFONTEXDV}
+ LPENUMLOGFONTEXDV = LPENUMLOGFONTEXDVA;
+ {$EXTERNALSYM LPENUMLOGFONTEXDV}
+ TEnumLogFontExDV = TEnumLogFontExDVA;
+ {$ENDIF UNICODE}
+
+function CreateFontIndirectExA(penumlfex: LPENUMLOGFONTEXDVA): HFONT; stdcall;
+{$EXTERNALSYM CreateFontIndirectExA}
+function CreateFontIndirectExW(penumlfex: LPENUMLOGFONTEXDVW): HFONT; stdcall;
+{$EXTERNALSYM CreateFontIndirectExW}
+function CreateFontIndirectEx(penumlfex: LPENUMLOGFONTEXDV): HFONT; stdcall;
+{$EXTERNALSYM CreateFontIndirectEx}
+
+type
+ PEnumTextMetricA = ^TEnumTextMetricA;
+ tagENUMTEXTMETRICA = record
+ etmNewTextMetricEx: NEWTEXTMETRICEXA;
+ etmAxesList: AXESLISTA;
+ end;
+ {$EXTERNALSYM tagENUMTEXTMETRICA}
+ ENUMTEXTMETRICA = tagENUMTEXTMETRICA;
+ {$EXTERNALSYM ENUMTEXTMETRICA}
+ LPENUMTEXTMETRICA = ^ENUMTEXTMETRICA;
+ {$EXTERNALSYM LPENUMTEXTMETRICA}
+ TEnumTextMetricA = tagENUMTEXTMETRICA;
+
+ PEnumTextMetricW = ^TEnumTextMetricW;
+ tagENUMTEXTMETRICW = record
+ etmNewTextMetricEx: NEWTEXTMETRICEXW;
+ etmAxesList: AXESLISTW;
+ end;
+ {$EXTERNALSYM tagENUMTEXTMETRICW}
+ ENUMTEXTMETRICW = tagENUMTEXTMETRICW;
+ {$EXTERNALSYM ENUMTEXTMETRICW}
+ LPENUMTEXTMETRICW = ^ENUMTEXTMETRICW;
+ {$EXTERNALSYM LPENUMTEXTMETRICW}
+ TEnumTextMetricW = tagENUMTEXTMETRICW;
+
+ {$IFDEF UNICODE}
+ ENUMTEXTMETRIC = ENUMTEXTMETRICW;
+ {$EXTERNALSYM ENUMTEXTMETRIC}
+ PENUMTEXTMETRIC = PENUMTEXTMETRICW;
+ {$EXTERNALSYM PENUMTEXTMETRIC}
+ LPENUMTEXTMETRIC = LPENUMTEXTMETRICW;
+ {$EXTERNALSYM LPENUMTEXTMETRIC}
+ TEnumTextMetric = TEnumTextMetricW;
+ {$ELSE}
+ ENUMTEXTMETRIC = ENUMTEXTMETRICA;
+ {$EXTERNALSYM ENUMTEXTMETRIC}
+ PENUMTEXTMETRIC = PENUMTEXTMETRICA;
+ {$EXTERNALSYM PENUMTEXTMETRIC}
+ LPENUMTEXTMETRIC = LPENUMTEXTMETRICA;
+ {$EXTERNALSYM LPENUMTEXTMETRIC}
+ TEnumTextMetric = TEnumTextMetricA;
+ {$ENDIF UNICODE}
+
+function GetViewportExtEx(hdc: HDC; var lpSize: TSize): BOOL; stdcall;
+{$EXTERNALSYM GetViewportExtEx}
+function GetViewportOrgEx(hdc: HDC; var lpPoint: POINT): BOOL; stdcall;
+{$EXTERNALSYM GetViewportOrgEx}
+function GetWindowExtEx(hdc: HDC; var lpSize: TSize): BOOL; stdcall;
+{$EXTERNALSYM GetWindowExtEx}
+function GetWindowOrgEx(hdc: HDC; var lpPoint: POINT): BOOL; stdcall;
+{$EXTERNALSYM GetWindowOrgEx}
+
+function IntersectClipRect(hdc: HDC; nLeftRect, nTopRect, nRightRect, nBottomRect: Integer): Integer; stdcall;
+{$EXTERNALSYM IntersectClipRect}
+function InvertRgn(hdc: HDC; hrgn: HRGN): BOOL; stdcall;
+{$EXTERNALSYM InvertRgn}
+function LineDDA(nXStart, nYStart, nXEnd, nYEnd: Integer; lpLineFunc: LINEDDAPROC; lpData: LPARAM): BOOL; stdcall;
+{$EXTERNALSYM LineDDA}
+function LineTo(hdc: HDC; nXEnd, nYEnd: Integer): BOOL; stdcall;
+{$EXTERNALSYM LineTo}
+function MaskBlt(hdc: HDC; nXDest, nYDest, nWidth, nHeight: Integer; hdcSrc: HDC; nXSrc, nYSrc: Integer; hbmMask: HBITMAP; xMask, yMask: Integer; dwRop: DWORD): BOOL; stdcall;
+{$EXTERNALSYM MaskBlt}
+function PlgBlt(hdc: HDC; lpPoint: LPPOINT; hdcSrc: HDC; nXSrc, nYSrc, nWidth, nHeight: Integer; hbmMask: HBITMAP; xMask, yMask: Integer): BOOL; stdcall;
+{$EXTERNALSYM PlgBlt}
+
+function OffsetClipRgn(hdc: HDC; nXOffset, nYOffset: Integer): Integer; stdcall;
+{$EXTERNALSYM OffsetClipRgn}
+function OffsetRgn(hrgn: HRGN; nXOffset, nYOffset: Integer): Integer; stdcall;
+{$EXTERNALSYM OffsetRgn}
+function PatBlt(hdc: HDC; nXLeft, nYLeft, nWidth, nHeight: Integer; dwRop: DWORD): BOOL; stdcall;
+{$EXTERNALSYM PatBlt}
+function Pie(hdc: HDC; nLeftRect, nTopRect, nRightRect, nBottomRect, nXRadial1, nYRadial1, nXRadial2, nYRadial2: Integer): BOOL; stdcall;
+{$EXTERNALSYM Pie}
+function PlayMetaFile(hdc: HDC; hmf: HMETAFILE): BOOL; stdcall;
+{$EXTERNALSYM PlayMetaFile}
+function PaintRgn(hdc: HDC; hrgn: HRGN): BOOL; stdcall;
+{$EXTERNALSYM PaintRgn}
+function PolyPolygon(hdc: HDC; lpPoints: LPPOINT; lpPolyCounts: LPINT; nCount: Integer): BOOL; stdcall;
+{$EXTERNALSYM PolyPolygon}
+function PtInRegion(hrgn: HRGN; X, Y: Integer): BOOL; stdcall;
+{$EXTERNALSYM PtInRegion}
+function PtVisible(hdc: HDC; X, Y: Integer): BOOL; stdcall;
+{$EXTERNALSYM PtVisible}
+function RectInRegion(hrgn: HRGN; const lprc: RECT): BOOL; stdcall;
+{$EXTERNALSYM RectInRegion}
+function RectVisible(hdc: HDC; const lprc: RECT): BOOL; stdcall;
+{$EXTERNALSYM RectVisible}
+function Rectangle(hdc: HDC; nLeftRect, nTopRect, nRightRect, nBottomRect: Integer): BOOL; stdcall;
+{$EXTERNALSYM Rectangle}
+function RestoreDC(hdc: HDC; nSavedDc: Integer): BOOL; stdcall;
+{$EXTERNALSYM RestoreDC}
+function ResetDCA(hdc: HDC; const lpInitData: DEVMODEA): HDC; stdcall;
+{$EXTERNALSYM ResetDCA}
+function ResetDCW(hdc: HDC; const lpInitData: DEVMODEW): HDC; stdcall;
+{$EXTERNALSYM ResetDCW}
+function ResetDC(hdc: HDC; const lpInitData: DEVMODE): HDC; stdcall;
+{$EXTERNALSYM ResetDC}
+function RealizePalette(hdc: HDC): UINT; stdcall;
+{$EXTERNALSYM RealizePalette}
+function RemoveFontResourceA(lpFileName: LPCSTR): BOOL; stdcall;
+{$EXTERNALSYM RemoveFontResourceA}
+function RemoveFontResourceW(lpFileName: LPCWSTR): BOOL; stdcall;
+{$EXTERNALSYM RemoveFontResourceW}
+function RemoveFontResource(lpFileName: LPCTSTR): BOOL; stdcall;
+{$EXTERNALSYM RemoveFontResource}
+function RoundRect(hdc: HDC; nLeftRect, nTopRect, nRightRect, nBottomRect, nWidth, nHeight: Integer): BOOL; stdcall;
+{$EXTERNALSYM RoundRect}
+function ResizePalette(hPal: HPALETTE; nEntries: UINT): BOOL; stdcall;
+{$EXTERNALSYM ResizePalette}
+function SaveDC(hdc: HDC): Integer; stdcall;
+{$EXTERNALSYM SaveDC}
+function SelectClipRgn(hdc: HDC; hrgn: HRGN): Integer; stdcall;
+{$EXTERNALSYM SelectClipRgn}
+function ExtSelectClipRgn(hdc: HDC; hrgn: HRGN; fnMode: Integer): Integer; stdcall;
+{$EXTERNALSYM ExtSelectClipRgn}
+function SetMetaRgn(hdc: HDC): Integer; stdcall;
+{$EXTERNALSYM SetMetaRgn}
+function SelectObject(hdc: HDC; hgdiobj: HGDIOBJ): HGDIOBJ; stdcall;
+{$EXTERNALSYM SelectObject}
+function SelectPalette(hdc: HDC; hpal: HPALETTE; nForceBackground: BOOL): HPALETTE; stdcall;
+{$EXTERNALSYM SelectPalette}
+function SetBkColor(hdc: HDC; crColor: COLORREF): COLORREF; stdcall;
+{$EXTERNALSYM SetBkColor}
+
+function SetDCBrushColor(hdc: HDC; crColor: COLORREF): COLORREF; stdcall;
+{$EXTERNALSYM SetDCBrushColor}
+function SetDCPenColor(hdc: HDC; crColor: COLORREF): COLORREF; stdcall;
+{$EXTERNALSYM SetDCPenColor}
+
+function SetBkMode(hdc: HDC; iBlMode: Integer): Integer; stdcall;
+{$EXTERNALSYM SetBkMode}
+function SetBitmapBits(hbmp: HBITMAP; cBytes: DWORD; lpBits: LPVOID): LONG; stdcall;
+{$EXTERNALSYM SetBitmapBits}
+
+function SetBoundsRect(hdc: HDC; lprcBounds: LPRECT; flags: UINT): UINT; stdcall;
+{$EXTERNALSYM SetBoundsRect}
+function SetDIBits(hdc: HDC; hbmp: HBITMAP; uStartScan, cScanLines: UINT; lpvBits: LPVOID; const lpbmi: BITMAPINFO; fuColorUse: UINT): Integer; stdcall;
+{$EXTERNALSYM SetDIBits}
+function SetDIBitsToDevice(hdc: HDC; xDest, yDest: Integer; dwWidth, dwHeight: DWORD; XSrc, YSrc: Integer; uStartScan, cScanLines: UINT; lpvBits: LPVOID; const lpbmi: BITMAPINFO; fuColorUse: UINT): Integer; stdcall;
+{$EXTERNALSYM SetDIBitsToDevice}
+function SetMapperFlags(hdc: HDC; dwFlag: DWORD): DWORD; stdcall;
+{$EXTERNALSYM SetMapperFlags}
+function SetGraphicsMode(hdc: HDC; iMode: Integer): Integer; stdcall;
+{$EXTERNALSYM SetGraphicsMode}
+function SetMapMode(hdc: HDC; fnMapMode: Integer): Integer; stdcall;
+{$EXTERNALSYM SetMapMode}
+
+function SetLayout(hdc: HDC; dwLayOut: DWORD): DWORD; stdcall;
+{$EXTERNALSYM SetLayout}
+function GetLayout(hdc: HDC): DWORD; stdcall;
+{$EXTERNALSYM GetLayout}
+
+function SetMetaFileBitsEx(nSize: UINT; lpData: LPBYTE): HMETAFILE; stdcall;
+{$EXTERNALSYM SetMetaFileBitsEx}
+function SetPaletteEntries(hPal: HPALETTE; cStart, nEntries: UINT; lppe: LPPALETTEENTRY): UINT; stdcall;
+{$EXTERNALSYM SetPaletteEntries}
+function SetPixel(hdc: HDC; X, Y: Integer; crColor: COLORREF): COLORREF; stdcall;
+{$EXTERNALSYM SetPixel}
+function SetPixelV(hdc: HDC; X, Y: Integer; crColor: COLORREF): BOOL; stdcall;
+{$EXTERNALSYM SetPixelV}
+function SetPixelFormat(hdc: HDC; iPixelFormat: Integer; const ppfd: PIXELFORMATDESCRIPTOR): BOOL; stdcall;
+{$EXTERNALSYM SetPixelFormat}
+function SetPolyFillMode(hdc: HDC; iPolyFillMode: Integer): Integer; stdcall;
+{$EXTERNALSYM SetPolyFillMode}
+function StretchBlt(hdc: HDC; nXOriginDest, nYOriginDest, nWidthDest, nHeightDest: Integer; hdcSrc: HDC; nXOriginSrc, nYOriginSrc, nWidthSrc, nHeightSrc: Integer; dwRop: DWORD): BOOL; stdcall;
+{$EXTERNALSYM StretchBlt}
+function SetRectRgn(hrgn: HRGN; nLeftRect, nTopRect, nRightRect, nBottomRect: Integer): BOOL; stdcall;
+{$EXTERNALSYM SetRectRgn}
+function StretchDIBits(hdc: HDC; XDest, YDest, nDestWidth, nYDestHeight, XSrc, YSrc, nSrcWidth, nSrcHeight: Integer; lpBits: LPVOID; const lpBitsInfo: BITMAPINFO; iUsage: UINT; dwRop: DWORD): Integer; stdcall;
+{$EXTERNALSYM StretchDIBits}
+function SetROP2(hdc: HDC; fnDrawMode: Integer): Integer; stdcall;
+{$EXTERNALSYM SetROP2}
+function SetStretchBltMode(hdc: HDC; iStretchMode: Integer): Integer; stdcall;
+{$EXTERNALSYM SetStretchBltMode}
+function SetSystemPaletteUse(hdc: HDC; uUsage: UINT): UINT; stdcall;
+{$EXTERNALSYM SetSystemPaletteUse}
+function SetTextCharacterExtra(hdc: HDC; nCharExtra: Integer): Integer; stdcall;
+{$EXTERNALSYM SetTextCharacterExtra}
+function SetTextColor(hdc: HDC; crColor: COLORREF): COLORREF; stdcall;
+{$EXTERNALSYM SetTextColor}
+function SetTextAlign(hdc: HDC; fMode: UINT): UINT; stdcall;
+{$EXTERNALSYM SetTextAlign}
+function SetTextJustification(hdc: HDC; nBreakExtra, nBreakCount: Integer): BOOL; stdcall;
+{$EXTERNALSYM SetTextJustification}
+function UpdateColors(hdc: HDC): BOOL; stdcall;
+{$EXTERNALSYM UpdateColors}
+
+//
+// image blt
+//
+
+type
+ COLOR16 = USHORT;
+ {$EXTERNALSYM COLOR16}
+
+ PTriVertex = ^TTriVertex;
+ _TRIVERTEX = record
+ x: LONG;
+ y: LONG;
+ Red: COLOR16;
+ Green: COLOR16;
+ Blue: COLOR16;
+ Alpha: COLOR16;
+ end;
+ {$EXTERNALSYM _TRIVERTEX}
+ TRIVERTEX = _TRIVERTEX;
+ {$EXTERNALSYM TRIVERTEX}
+ LPTRIVERTEX = ^TRIVERTEX;
+ {$EXTERNALSYM LPTRIVERTEX}
+ TTriVertex = _TRIVERTEX;
+
+ PGradientTriangle = ^TGradientTriangle;
+ _GRADIENT_TRIANGLE = record
+ Vertex1: ULONG;
+ Vertex2: ULONG;
+ Vertex3: ULONG;
+ end;
+ {$EXTERNALSYM _GRADIENT_TRIANGLE}
+ GRADIENT_TRIANGLE = _GRADIENT_TRIANGLE;
+ {$EXTERNALSYM GRADIENT_TRIANGLE}
+ LPGRADIENT_TRIANGLE = ^GRADIENT_TRIANGLE;
+ {$EXTERNALSYM LPGRADIENT_TRIANGLE}
+ PGRADIENT_TRIANGLE = ^GRADIENT_TRIANGLE;
+ {$EXTERNALSYM PGRADIENT_TRIANGLE}
+ TGradientTriangle = _GRADIENT_TRIANGLE;
+
+ PGradientRect = ^TGradientRect;
+ _GRADIENT_RECT = record
+ UpperLeft: ULONG;
+ LowerRight: ULONG;
+ end;
+ {$EXTERNALSYM _GRADIENT_RECT}
+ GRADIENT_RECT = _GRADIENT_RECT;
+ {$EXTERNALSYM GRADIENT_RECT}
+ LPGRADIENT_RECT = ^GRADIENT_RECT;
+ {$EXTERNALSYM LPGRADIENT_RECT}
+ PGRADIENT_RECT = ^GRADIENT_RECT;
+ {$EXTERNALSYM PGRADIENT_RECT}
+ TGradientRect = _GRADIENT_RECT;
+
+ PBlendFunction = ^TBlendFunction;
+ _BLENDFUNCTION = record
+ BlendOp: BYTE;
+ BlendFlags: BYTE;
+ SourceConstantAlpha: BYTE;
+ AlphaFormat: BYTE;
+ end;
+ {$EXTERNALSYM _BLENDFUNCTION}
+ BLENDFUNCTION = _BLENDFUNCTION;
+ {$EXTERNALSYM BLENDFUNCTION}
+ LPBLENDFUNCTION = ^BLENDFUNCTION;
+ {$EXTERNALSYM LPBLENDFUNCTION}
+ TBlendFunction = _BLENDFUNCTION;
+
+//
+// currentlly defined blend function
+//
+
+const
+ AC_SRC_OVER = $00;
+ {$EXTERNALSYM AC_SRC_OVER}
+
+//
+// alpha format flags
+//
+
+ AC_SRC_ALPHA = $01;
+ {$EXTERNALSYM AC_SRC_ALPHA}
+
+function AlphaBlend(hdcDest: HDC; nXOriginDest, nYOriginDest, nWidthDest,
+ nHeightDest: Integer; hdcSrc: HDC; nXOriginSrc, nYOriginSrc, nWidthSrc,
+ nHeightSrc: Integer; blendFunction: BLENDFUNCTION): BOOL; stdcall;
+{$EXTERNALSYM AlphaBlend}
+
+function TransparentBlt(hdcSrc: HDC; nXOriginSrc, nYOriginSrc, nWidthSrc,
+ nHeightSrc: Integer; hdcDest: HDC; nXOriginDest, nYOriginDest, nWidthDest,
+ nHeightDest: Integer; blendFunction: BLENDFUNCTION): BOOL; stdcall;
+{$EXTERNALSYM TransparentBlt}
+
+//
+// gradient drawing modes
+//
+
+const
+ GRADIENT_FILL_RECT_H = $00000000;
+ {$EXTERNALSYM GRADIENT_FILL_RECT_H}
+ GRADIENT_FILL_RECT_V = $00000001;
+ {$EXTERNALSYM GRADIENT_FILL_RECT_V}
+ GRADIENT_FILL_TRIANGLE = $00000002;
+ {$EXTERNALSYM GRADIENT_FILL_TRIANGLE}
+ GRADIENT_FILL_OP_FLAG = $000000ff;
+ {$EXTERNALSYM GRADIENT_FILL_OP_FLAG}
+
+function GradientFill(hdc: HDC; pVertex: PTRIVERTEX; dwNumVertex: ULONG; pMesh: PVOID; dwNumMesh, dwMode: ULONG): BOOL; stdcall;
+{$EXTERNALSYM GradientFill}
+function PlayMetaFileRecord(hdc: HDC; lpHandleTable: LPHANDLETABLE; lpMetaRecord: LPMETARECORD; nHandles: UINT): BOOL; stdcall;
+{$EXTERNALSYM PlayMetaFileRecord}
+
+type
+ MFENUMPROC = function(hdc: HDC; lpHTable: LPHANDLETABLE; lpMFR: LPMETARECORD; nObj: Integer; lpClientData: LPARAM): Integer; stdcall;
+ {$EXTERNALSYM MFENUMPROC}
+
+function EnumMetaFile(hdc: HDC; hemf: HMETAFILE; lpMetaFunc: MFENUMPROC; lParam: LPARAM): BOOL; stdcall;
+{$EXTERNALSYM EnumMetaFile}
+
+type
+ ENHMFENUMPROC = function(hdc: HDC; lpHTable: LPHANDLETABLE; lpEMFR: LPENHMETARECORD; nObj: Integer; lpData: LPARAM): Integer; stdcall;
+ {$EXTERNALSYM ENHMFENUMPROC}
+
+// Enhanced Metafile Function Declarations
+
+function CloseEnhMetaFile(hdc: HDC): HENHMETAFILE; stdcall;
+{$EXTERNALSYM CloseEnhMetaFile}
+function CopyEnhMetaFileA(hemfSrc: HENHMETAFILE; lpszFile: LPCSTR): HENHMETAFILE; stdcall;
+{$EXTERNALSYM CopyEnhMetaFileA}
+function CopyEnhMetaFileW(hemfSrc: HENHMETAFILE; lpszFile: LPCWSTR): HENHMETAFILE; stdcall;
+{$EXTERNALSYM CopyEnhMetaFileW}
+function CopyEnhMetaFile(hemfSrc: HENHMETAFILE; lpszFile: LPCTSTR): HENHMETAFILE; stdcall;
+{$EXTERNALSYM CopyEnhMetaFile}
+function CreateEnhMetaFileA(hdcRef: HDC; lpFileName: LPCSTR; const lpRect: RECT; lpDescription: LPCSTR): HDC; stdcall;
+{$EXTERNALSYM CreateEnhMetaFileA}
+function CreateEnhMetaFileW(hdcRef: HDC; lpFileName: LPCWSTR; const lpRect: RECT; lpDescription: LPCWSTR): HDC; stdcall;
+{$EXTERNALSYM CreateEnhMetaFileW}
+function CreateEnhMetaFile(hdcRef: HDC; lpFileName: LPCTSTR; const lpRect: RECT; lpDescription: LPCTSTR): HDC; stdcall;
+{$EXTERNALSYM CreateEnhMetaFile}
+
+function DeleteEnhMetaFile(hemf: HENHMETAFILE): BOOL; stdcall;
+{$EXTERNALSYM DeleteEnhMetaFile}
+function EnumEnhMetaFile(hdc: HDC; hemf: HENHMETAFILE; lpEnhMetaFunc: ENHMFENUMPROC; lpData: LPVOID; const lpRect: RECT): BOOL; stdcall;
+{$EXTERNALSYM EnumEnhMetaFile}
+function GetEnhMetaFileA(lpszMetaFile: LPCSTR): HENHMETAFILE; stdcall;
+{$EXTERNALSYM GetEnhMetaFileA}
+function GetEnhMetaFileW(lpszMetaFile: LPCWSTR): HENHMETAFILE; stdcall;
+{$EXTERNALSYM GetEnhMetaFileW}
+function GetEnhMetaFile(lpszMetaFile: LPCTSTR): HENHMETAFILE; stdcall;
+{$EXTERNALSYM GetEnhMetaFile}
+function GetEnhMetaFileBits(hemf: HENHMETAFILE; cbBuffer: UINT; lpBuffer: LPBYTE): UINT; stdcall;
+{$EXTERNALSYM GetEnhMetaFileBits}
+function GetEnhMetaFileDescriptionA(hemf: HENHMETAFILE; cchBuffer: UINT; lpszDescription: LPSTR): UINT; stdcall;
+{$EXTERNALSYM GetEnhMetaFileDescriptionA}
+function GetEnhMetaFileDescriptionW(hemf: HENHMETAFILE; cchBuffer: UINT; lpszDescription: LPWSTR): UINT; stdcall;
+{$EXTERNALSYM GetEnhMetaFileDescriptionW}
+function GetEnhMetaFileDescription(hemf: HENHMETAFILE; cchBuffer: UINT; lpszDescription: LPTSTR): UINT; stdcall;
+{$EXTERNALSYM GetEnhMetaFileDescription}
+function GetEnhMetaFileHeader(hemf: HENHMETAFILE; cbBuffer: UINT; lpemh: LPENHMETAHEADER ): UINT; stdcall;
+{$EXTERNALSYM GetEnhMetaFileHeader}
+function GetEnhMetaFilePaletteEntries(hemf: HENHMETAFILE; cEntries: UINT; lppe: LPPALETTEENTRY ): UINT; stdcall;
+{$EXTERNALSYM GetEnhMetaFilePaletteEntries}
+function GetEnhMetaFilePixelFormat(hemf: HENHMETAFILE; cbBuffer: UINT; var ppfd: PIXELFORMATDESCRIPTOR): UINT; stdcall;
+{$EXTERNALSYM GetEnhMetaFilePixelFormat}
+function GetWinMetaFileBits(hemf: HENHMETAFILE; cbBuffer: UINT; lpbBuffer: LPBYTE; fnMapMode: Integer; hdcRef: HDC): UINT; stdcall;
+{$EXTERNALSYM GetWinMetaFileBits}
+function PlayEnhMetaFile(hdc: HDC; hemf: HENHMETAFILE; const lpRect: RECT): BOOL; stdcall;
+{$EXTERNALSYM PlayEnhMetaFile}
+function PlayEnhMetaFileRecord(hdc: HDC; lpHandleTable: LPHANDLETABLE; lpEnhMetaRecord: LPENHMETARECORD; nHandles: UINT): BOOL; stdcall;
+{$EXTERNALSYM PlayEnhMetaFileRecord}
+function SetEnhMetaFileBits(cbBuffer: UINT; lpData: LPBYTE): HENHMETAFILE; stdcall;
+{$EXTERNALSYM SetEnhMetaFileBits}
+function SetWinMetaFileBits(cbBuffer: UINT; lpbBuffer: LPBYTE; hdcRef: HDC; const lpmfp: METAFILEPICT): HENHMETAFILE; stdcall;
+{$EXTERNALSYM SetWinMetaFileBits}
+function GdiComment(hdc: HDC; cbSize: UINT; lpData: LPBYTE): BOOL; stdcall;
+{$EXTERNALSYM GdiComment}
+
+function GetTextMetricsA(hdc: HDC; var lptm: TEXTMETRICA): BOOL; stdcall;
+{$EXTERNALSYM GetTextMetricsA}
+function GetTextMetricsW(hdc: HDC; var lptm: TEXTMETRICW): BOOL; stdcall;
+{$EXTERNALSYM GetTextMetricsW}
+function GetTextMetrics(hdc: HDC; var lptm: TEXTMETRIC): BOOL; stdcall;
+{$EXTERNALSYM GetTextMetrics}
+
+// new GDI
+
+type
+ PDibSection = ^TDibSection;
+ tagDIBSECTION = record
+ dsBm: BITMAP;
+ dsBmih: BITMAPINFOHEADER;
+ dsBitfields: array [0..2] of DWORD;
+ dshSection: HANDLE;
+ dsOffset: DWORD;
+ end;
+ {$EXTERNALSYM tagDIBSECTION}
+ DIBSECTION = tagDIBSECTION;
+ {$EXTERNALSYM DIBSECTION}
+ LPDIBSECTION = ^DIBSECTION;
+ {$EXTERNALSYM LPDIBSECTION}
+ TDibSection = DIBSECTION;
+
+function AngleArc(hdc: HDC; X, Y: Integer; dwRadius: DWORD; eStartAngle, eSweepAngle: FLOAT): BOOL; stdcall;
+{$EXTERNALSYM AngleArc}
+function PolyPolyline(hdc: HDC; lppt: LPPOINT; lpdwPolyPoints: LPDWORD; cCount: DWORD): BOOL; stdcall;
+{$EXTERNALSYM PolyPolyline}
+function GetWorldTransform(hdc: HDC; lpXform: LPXFORM): BOOL; stdcall;
+{$EXTERNALSYM GetWorldTransform}
+function SetWorldTransform(hdc: HDC; lpXform: LPXFORM): BOOL; stdcall;
+{$EXTERNALSYM SetWorldTransform}
+function ModifyWorldTransform(hdc: HDC; lpXform: LPXFORM; iMode: DWORD): BOOL; stdcall;
+{$EXTERNALSYM ModifyWorldTransform}
+function CombineTransform(lpxformResult, lpXform1, lpXform2: LPXFORM): BOOL; stdcall;
+{$EXTERNALSYM CombineTransform}
+function CreateDIBSection(hdc: HDC; pbmi: LPBITMAPINFO; iUsage: UINT;
+ ppvBits: PPVOID; hSection: HANDLE; dwOffset: DWORD): HBITMAP; stdcall;
+{$EXTERNALSYM CreateDIBSection}
+function GetDIBColorTable(hdc: HDC; uStartIndex, cEntries: UINT; pColors: PRGBQUAD): UINT; stdcall;
+{$EXTERNALSYM GetDIBColorTable}
+function SetDIBColorTable(hdc: HDC; uStartIndex, cEntries: UINT; pColors: PRGBQUAD): UINT; stdcall;
+{$EXTERNALSYM SetDIBColorTable}
+
+// Flags value for COLORADJUSTMENT
+
+const
+ CA_NEGATIVE = $0001;
+ {$EXTERNALSYM CA_NEGATIVE}
+ CA_LOG_FILTER = $0002;
+ {$EXTERNALSYM CA_LOG_FILTER}
+
+// IlluminantIndex values
+
+ ILLUMINANT_DEVICE_DEFAULT = 0;
+ {$EXTERNALSYM ILLUMINANT_DEVICE_DEFAULT}
+ ILLUMINANT_A = 1;
+ {$EXTERNALSYM ILLUMINANT_A}
+ ILLUMINANT_B = 2;
+ {$EXTERNALSYM ILLUMINANT_B}
+ ILLUMINANT_C = 3;
+ {$EXTERNALSYM ILLUMINANT_C}
+ ILLUMINANT_D50 = 4;
+ {$EXTERNALSYM ILLUMINANT_D50}
+ ILLUMINANT_D55 = 5;
+ {$EXTERNALSYM ILLUMINANT_D55}
+ ILLUMINANT_D65 = 6;
+ {$EXTERNALSYM ILLUMINANT_D65}
+ ILLUMINANT_D75 = 7;
+ {$EXTERNALSYM ILLUMINANT_D75}
+ ILLUMINANT_F2 = 8;
+ {$EXTERNALSYM ILLUMINANT_F2}
+ ILLUMINANT_MAX_INDEX = ILLUMINANT_F2;
+ {$EXTERNALSYM ILLUMINANT_MAX_INDEX}
+
+ ILLUMINANT_TUNGSTEN = ILLUMINANT_A;
+ {$EXTERNALSYM ILLUMINANT_TUNGSTEN}
+ ILLUMINANT_DAYLIGHT = ILLUMINANT_C;
+ {$EXTERNALSYM ILLUMINANT_DAYLIGHT}
+ ILLUMINANT_FLUORESCENT = ILLUMINANT_F2;
+ {$EXTERNALSYM ILLUMINANT_FLUORESCENT}
+ ILLUMINANT_NTSC = ILLUMINANT_C;
+ {$EXTERNALSYM ILLUMINANT_NTSC}
+
+// Min and max for RedGamma, GreenGamma, BlueGamma
+
+ RGB_GAMMA_MIN = WORD(02500);
+ {$EXTERNALSYM RGB_GAMMA_MIN}
+ RGB_GAMMA_MAX = WORD(65000);
+ {$EXTERNALSYM RGB_GAMMA_MAX}
+
+// Min and max for ReferenceBlack and ReferenceWhite
+
+ REFERENCE_WHITE_MIN = WORD(6000);
+ {$EXTERNALSYM REFERENCE_WHITE_MIN}
+ REFERENCE_WHITE_MAX = WORD(10000);
+ {$EXTERNALSYM REFERENCE_WHITE_MAX}
+ REFERENCE_BLACK_MIN = WORD(0);
+ {$EXTERNALSYM REFERENCE_BLACK_MIN}
+ REFERENCE_BLACK_MAX = WORD(4000);
+ {$EXTERNALSYM REFERENCE_BLACK_MAX}
+
+// Min and max for Contrast, Brightness, Colorfulness, RedGreenTint
+
+ COLOR_ADJ_MIN = SHORT(-100);
+ {$EXTERNALSYM COLOR_ADJ_MIN}
+ COLOR_ADJ_MAX = SHORT(100);
+ {$EXTERNALSYM COLOR_ADJ_MAX}
+
+type
+ PColorAdjustment = ^TColorAdjustment;
+ tagCOLORADJUSTMENT = record
+ caSize: WORD;
+ caFlags: WORD;
+ caIlluminantIndex: WORD;
+ caRedGamma: WORD;
+ caGreenGamma: WORD;
+ caBlueGamma: WORD;
+ caReferenceBlack: WORD;
+ caReferenceWhite: WORD;
+ caContrast: SHORT;
+ caBrightness: SHORT;
+ caColorfulness: SHORT;
+ caRedGreenTint: SHORT;
+ end;
+ {$EXTERNALSYM tagCOLORADJUSTMENT}
+ COLORADJUSTMENT = tagCOLORADJUSTMENT;
+ {$EXTERNALSYM COLORADJUSTMENT}
+ LPCOLORADJUSTMENT = ^COLORADJUSTMENT;
+ {$EXTERNALSYM LPCOLORADJUSTMENT}
+ TColorAdjustment = COLORADJUSTMENT;
+
+function SetColorAdjustment(hdc: HDC; lpca: LPCOLORADJUSTMENT): BOOL; stdcall;
+{$EXTERNALSYM SetColorAdjustment}
+function GetColorAdjustment(hdc: HDC; lpca: LPCOLORADJUSTMENT): BOOL; stdcall;
+{$EXTERNALSYM GetColorAdjustment}
+function CreateHalftonePalette(hdc: HDC): HPALETTE; stdcall;
+{$EXTERNALSYM CreateHalftonePalette}
+
+type
+ ABORTPROC = function(hdc: HDC; iError: Integer): BOOL; stdcall;
+ {$EXTERNALSYM ABORTPROC}
+
+ PDocInfoA = ^TDocInfoA;
+ _DOCINFOA = record
+ cbSize: Integer;
+ lpszDocName: LPCSTR;
+ lpszOutput: LPCSTR;
+ lpszDatatype: LPCSTR;
+ fwType: DWORD;
+ end;
+ {$EXTERNALSYM _DOCINFOA}
+ DOCINFOA = _DOCINFOA;
+ {$EXTERNALSYM DOCINFOA}
+ LPDOCINFOA = ^DOCINFOA;
+ {$EXTERNALSYM LPDOCINFOA}
+ TDocInfoA = _DOCINFOA;
+
+ PDocInfoW = ^TDocInfoW;
+ _DOCINFOW = record
+ cbSize: Integer;
+ lpszDocName: LPCWSTR;
+ lpszOutput: LPCWSTR;
+ lpszDatatype: LPCWSTR;
+ fwType: DWORD;
+ end;
+ {$EXTERNALSYM _DOCINFOW}
+ DOCINFOW = _DOCINFOW;
+ {$EXTERNALSYM DOCINFOW}
+ LPDOCINFOW = ^DOCINFOW;
+ {$EXTERNALSYM LPDOCINFOW}
+ TDocInfoW = _DOCINFOW;
+
+ {$IFDEF UNICODE}
+ DOCINFO = DOCINFOW;
+ {$EXTERNALSYM DOCINFO}
+ LPDOCINFO = LPDOCINFOW;
+ {$EXTERNALSYM LPDOCINFO}
+ TDocInfo = TDocInfoW;
+ PDocInfo = PDocInfoW;
+ {$ELSE}
+ DOCINFO = DOCINFOA;
+ {$EXTERNALSYM DOCINFO}
+ LPDOCINFO = LPDOCINFOA;
+ {$EXTERNALSYM LPDOCINFO}
+ TDocInfo = TDocInfoA;
+ PDocInfo = PDocInfoA;
+ {$ENDIF UNICODE}
+
+const
+ DI_APPBANDING = $00000001;
+ {$EXTERNALSYM DI_APPBANDING}
+ DI_ROPS_READ_DESTINATION = $00000002;
+ {$EXTERNALSYM DI_ROPS_READ_DESTINATION}
+
+function StartDocA(hdc: HDC; const lpdi: DOCINFOA): Integer; stdcall;
+{$EXTERNALSYM StartDocA}
+function StartDocW(hdc: HDC; const lpdi: DOCINFOW): Integer; stdcall;
+{$EXTERNALSYM StartDocW}
+function StartDoc(hdc: HDC; const lpdi: DOCINFO): Integer; stdcall;
+{$EXTERNALSYM StartDoc}
+function EndDoc(dc: HDC): Integer; stdcall;
+{$EXTERNALSYM EndDoc}
+function StartPage(dc: HDC): Integer; stdcall;
+{$EXTERNALSYM StartPage}
+function EndPage(dc: HDC): Integer; stdcall;
+{$EXTERNALSYM EndPage}
+function AbortDoc(dc: HDC): Integer; stdcall;
+{$EXTERNALSYM AbortDoc}
+function SetAbortProc(dc: HDC; lpAbortProc: ABORTPROC): Integer; stdcall;
+{$EXTERNALSYM SetAbortProc}
+
+function AbortPath(hdc: HDC): BOOL; stdcall;
+{$EXTERNALSYM AbortPath}
+function ArcTo(hdc: HDC; nLeftRect, nTopRect, nRightRect, nBottomRect, nXRadial1, nYRadial1, nXRadial2, nYRadial2: Integer): BOOL; stdcall;
+{$EXTERNALSYM ArcTo}
+function BeginPath(hdc: HDC): BOOL; stdcall;
+{$EXTERNALSYM BeginPath}
+function CloseFigure(hdc: HDC): BOOL; stdcall;
+{$EXTERNALSYM CloseFigure}
+function EndPath(hdc: HDC): BOOL; stdcall;
+{$EXTERNALSYM EndPath}
+function FillPath(hdc: HDC): BOOL; stdcall;
+{$EXTERNALSYM FillPath}
+function FlattenPath(hdc: HDC): BOOL; stdcall;
+{$EXTERNALSYM FlattenPath}
+function GetPath(hdc: HDC; lpPoints: LPPOINT; lpTypes: LPBYTE; nSize: Integer): Integer; stdcall;
+{$EXTERNALSYM GetPath}
+function PathToRegion(hdc: HDC): HRGN; stdcall;
+{$EXTERNALSYM PathToRegion}
+function PolyDraw(hdc: HDC; lppt: LPPOINT; lpbTypes: LPBYTE; cCount: Integer): BOOL; stdcall;
+{$EXTERNALSYM PolyDraw}
+function SelectClipPath(hdc: HDC; iMode: Integer): BOOL; stdcall;
+{$EXTERNALSYM SelectClipPath}
+function SetArcDirection(hdc: HDC; ArcDirection: Integer): Integer; stdcall;
+{$EXTERNALSYM SetArcDirection}
+function SetMiterLimit(hdc: HDC; eNewLimit: FLOAT; peOldLimit: PFLOAT): BOOL; stdcall;
+{$EXTERNALSYM SetMiterLimit}
+function StrokeAndFillPath(hdc: HDC): BOOL; stdcall;
+{$EXTERNALSYM StrokeAndFillPath}
+function StrokePath(hdc: HDC): BOOL; stdcall;
+{$EXTERNALSYM StrokePath}
+function WidenPath(hdc: HDC): BOOL; stdcall;
+{$EXTERNALSYM WidenPath}
+function ExtCreatePen(dwPenStyle, dwWidth: DWORD; const lplb: LOGBRUSH; dwStyleCount: DWORD; lpStyle: DWORD): HPEN; stdcall;
+{$EXTERNALSYM ExtCreatePen}
+function GetMiterLimit(hdc: HDC; var peLimit: FLOAT): BOOL; stdcall;
+{$EXTERNALSYM GetMiterLimit}
+function GetArcDirection(hdc: HDC): Integer; stdcall;
+{$EXTERNALSYM GetArcDirection}
+
+function GetObjectA(hgdiobj: HGDIOBJ; cbBuffer: Integer; lpvObject: LPVOID): Integer; stdcall;
+{$EXTERNALSYM GetObjectA}
+function GetObjectW(hgdiobj: HGDIOBJ; cbBuffer: Integer; lpvObject: LPVOID): Integer; stdcall;
+{$EXTERNALSYM GetObjectW}
+function GetObject(hgdiobj: HGDIOBJ; cbBuffer: Integer; lpvObject: LPVOID): Integer; stdcall;
+{$EXTERNALSYM GetObject}
+function MoveToEx(hdc: HDC; X, Y: Integer; lpPoint: LPPOINT): BOOL; stdcall;
+{$EXTERNALSYM MoveToEx}
+function TextOutA(hdc: HDC; nXStart, nYStart: Integer; lpString: LPCSTR; cbString: Integer): BOOL; stdcall;
+{$EXTERNALSYM TextOutA}
+function TextOutW(hdc: HDC; nXStart, nYStart: Integer; lpString: LPCWSTR; cbString: Integer): BOOL; stdcall;
+{$EXTERNALSYM TextOutW}
+function TextOut(hdc: HDC; nXStart, nYStart: Integer; lpString: LPCTSTR; cbString: Integer): BOOL; stdcall;
+{$EXTERNALSYM TextOut}
+function ExtTextOutA(hdc: HDC; X, Y: Integer; fuOptions: UINT; lprc: LPRECT; lpString: LPCSTR; cbCount: UINT; lpDx: LPINT): BOOL; stdcall;
+{$EXTERNALSYM ExtTextOutA}
+function ExtTextOutW(hdc: HDC; X, Y: Integer; fuOptions: UINT; lprc: LPRECT; lpString: LPCWSTR; cbCount: UINT; lpDx: LPINT): BOOL; stdcall;
+{$EXTERNALSYM ExtTextOutW}
+function ExtTextOut(hdc: HDC; X, Y: Integer; fuOptions: UINT; lprc: LPRECT; lpString: LPCTSTR; cbCount: UINT; lpDx: LPINT): BOOL; stdcall;
+{$EXTERNALSYM ExtTextOut}
+function PolyTextOutA(hdc: HDC; pptxt: LPPOLYTEXTA; cStrings: Integer): BOOL; stdcall;
+{$EXTERNALSYM PolyTextOutA}
+function PolyTextOutW(hdc: HDC; pptxt: LPPOLYTEXTW; cStrings: Integer): BOOL; stdcall;
+{$EXTERNALSYM PolyTextOutW}
+function PolyTextOut(hdc: HDC; pptxt: LPPOLYTEXT; cStrings: Integer): BOOL; stdcall;
+{$EXTERNALSYM PolyTextOut}
+
+function CreatePolygonRgn(lppt: LPPOINT; cPoints, fnPolyFillMode: Integer): HRGN; stdcall;
+{$EXTERNALSYM CreatePolygonRgn}
+function DPtoLP(hdc: HDC; lpPoints: LPPOINT; nCount: Integer): BOOL; stdcall;
+{$EXTERNALSYM DPtoLP}
+function LPtoDP(hdc: HDC; lpPoints: LPPOINT; nCount: Integer): BOOL; stdcall;
+{$EXTERNALSYM LPtoDP}
+function Polygon(hdc: HDC; lpPoints: LPPOINT; nCount: Integer): BOOL; stdcall;
+{$EXTERNALSYM Polygon}
+function Polyline(hdc: HDC; lppt: LPPOINT; nCount: Integer): BOOL; stdcall;
+{$EXTERNALSYM Polyline}
+
+function PolyBezier(hdc: HDC; lppt: LPPOINT; cPoints: DWORD): BOOL; stdcall;
+{$EXTERNALSYM PolyBezier}
+function PolyBezierTo(hdc: HDC; lppt: LPPOINT; cCount: DWORD): BOOL; stdcall;
+{$EXTERNALSYM PolyBezierTo}
+function PolylineTo(hdc: HDC; lppt: LPPOINT; cCount: DWORD): BOOL; stdcall;
+{$EXTERNALSYM PolylineTo}
+
+function SetViewportExtEx(hdc: HDC; nXExtend, nYExtend: Integer; lpSize: LPSIZE): BOOL; stdcall;
+{$EXTERNALSYM SetViewportExtEx}
+function SetViewportOrgEx(hdc: HDC; X, Y: Integer; lpPoint: LPPOINT): BOOL; stdcall;
+{$EXTERNALSYM SetViewportOrgEx}
+function SetWindowExtEx(hdc: HDC; nXExtend, nYExtend: Integer; lpSize: LPSIZE): BOOL; stdcall;
+{$EXTERNALSYM SetWindowExtEx}
+function SetWindowOrgEx(hdc: HDC; X, Y: Integer; lpPoint: LPPOINT): BOOL; stdcall;
+{$EXTERNALSYM SetWindowOrgEx}
+
+function OffsetViewportOrgEx(hdc: HDC; nXOffset, nYOffset: Integer; lpPoint: LPPOINT): BOOL; stdcall;
+{$EXTERNALSYM OffsetViewportOrgEx}
+function OffsetWindowOrgEx(hdc: HDC; nXOffset, nYOffset: Integer; lpPoint: LPPOINT): BOOL; stdcall;
+{$EXTERNALSYM OffsetWindowOrgEx}
+function ScaleViewportExtEx(hdc: HDC; Xnum, Xdenom, Ynum, Ydenom: Integer; lpSize: LPSIZE): BOOL; stdcall;
+{$EXTERNALSYM ScaleViewportExtEx}
+function ScaleWindowExtEx(hdc: HDC; Xnum, Xdenom, Ynum, Ydenom: Integer; lpSize: LPSIZE): BOOL; stdcall;
+{$EXTERNALSYM ScaleWindowExtEx}
+function SetBitmapDimensionEx(hBitmap: HBITMAP; nWidth, nHeight: Integer; lpSize: LPSIZE): BOOL; stdcall;
+{$EXTERNALSYM SetBitmapDimensionEx}
+function SetBrushOrgEx(hdc: HDC; nXOrg, nYOrg: Integer; lppt: LPPOINT): BOOL; stdcall;
+{$EXTERNALSYM SetBrushOrgEx}
+
+function GetTextFaceA(hdc: HDC; nCount: Integer; lpFaceName: LPSTR): Integer; stdcall;
+{$EXTERNALSYM GetTextFaceA}
+function GetTextFaceW(hdc: HDC; nCount: Integer; lpFaceName: LPWSTR): Integer; stdcall;
+{$EXTERNALSYM GetTextFaceW}
+function GetTextFace(hdc: HDC; nCount: Integer; lpFaceName: LPTSTR): Integer; stdcall;
+{$EXTERNALSYM GetTextFace}
+
+const
+ FONTMAPPER_MAX = 10;
+ {$EXTERNALSYM FONTMAPPER_MAX}
+
+type
+ PKerningPair = ^TKerningPair;
+ tagKERNINGPAIR = record
+ wFirst: WORD;
+ wSecond: WORD;
+ iKernAmount: Integer;
+ end;
+ {$EXTERNALSYM tagKERNINGPAIR}
+ KERNINGPAIR = tagKERNINGPAIR;
+ {$EXTERNALSYM KERNINGPAIR}
+ LPKERNINGPAIR = ^KERNINGPAIR;
+ {$EXTERNALSYM LPKERNINGPAIR}
+ TKerningPair = KERNINGPAIR;
+
+function GetKerningPairsA(hDc: HDC; nNumPairs: DWORD; lpkrnpair: LPKERNINGPAIR): DWORD; stdcall;
+{$EXTERNALSYM GetKerningPairsA}
+function GetKerningPairsW(hDc: HDC; nNumPairs: DWORD; lpkrnpair: LPKERNINGPAIR): DWORD; stdcall;
+{$EXTERNALSYM GetKerningPairsW}
+function GetKerningPairs(hDc: HDC; nNumPairs: DWORD; lpkrnpair: LPKERNINGPAIR): DWORD; stdcall;
+{$EXTERNALSYM GetKerningPairs}
+
+function GetDCOrgEx(hdc: HDC; lpPoint: LPPOINT): BOOL; stdcall;
+{$EXTERNALSYM GetDCOrgEx}
+function FixBrushOrgEx(hDc: HDC; I1, I2: Integer; lpPoint: LPPOINT): BOOL; stdcall;
+{$EXTERNALSYM FixBrushOrgEx}
+function UnrealizeObject(hgdiobj: HGDIOBJ): BOOL; stdcall;
+{$EXTERNALSYM UnrealizeObject}
+
+function GdiFlush: BOOL; stdcall;
+{$EXTERNALSYM GdiFlush}
+function GdiSetBatchLimit(dwLimit: DWORD): DWORD; stdcall;
+{$EXTERNALSYM GdiSetBatchLimit}
+function GdiGetBatchLimit: DWORD; stdcall;
+{$EXTERNALSYM GdiGetBatchLimit}
+
+const
+ ICM_OFF = 1;
+ {$EXTERNALSYM ICM_OFF}
+ ICM_ON = 2;
+ {$EXTERNALSYM ICM_ON}
+ ICM_QUERY = 3;
+ {$EXTERNALSYM ICM_QUERY}
+ ICM_DONE_OUTSIDEDC = 4;
+ {$EXTERNALSYM ICM_DONE_OUTSIDEDC}
+
+type
+ ICMENUMPROCA = function(lpszFileName: LPSTR; lParam: LPARAM): Integer; stdcall;
+ {$EXTERNALSYM ICMENUMPROCA}
+ ICMENUMPROCW = function(lpszFileName: LPWSTR; lParam: LPARAM): Integer; stdcall;
+ {$EXTERNALSYM ICMENUMPROCW}
+ ICMENUMPROC = function(lpszFileName: LPTSTR; lParam: LPARAM): Integer; stdcall;
+ {$EXTERNALSYM ICMENUMPROC}
+
+function SetICMMode(hDc: HDC; iEnableICM: Integer): Integer; stdcall;
+{$EXTERNALSYM SetICMMode}
+function CheckColorsInGamut(hDc: HDC; lpRGBTriples, lpBuffer: LPVOID; nCount: DWORD): BOOL; stdcall;
+{$EXTERNALSYM CheckColorsInGamut}
+function GetColorSpace(hDc: HDC): HCOLORSPACE; stdcall;
+{$EXTERNALSYM GetColorSpace}
+
+function GetLogColorSpaceA(hColorSpace: HCOLORSPACE; lpBuffer: LPLOGCOLORSPACEA; nSize: DWORD): BOOL; stdcall;
+{$EXTERNALSYM GetLogColorSpaceA}
+function GetLogColorSpaceW(hColorSpace: HCOLORSPACE; lpBuffer: LPLOGCOLORSPACEW; nSize: DWORD): BOOL; stdcall;
+{$EXTERNALSYM GetLogColorSpaceW}
+function GetLogColorSpace(hColorSpace: HCOLORSPACE; lpBuffer: LPLOGCOLORSPACE; nSize: DWORD): BOOL; stdcall;
+{$EXTERNALSYM GetLogColorSpace}
+
+function CreateColorSpaceA(lpLogColorSpace: LPLOGCOLORSPACEA): HCOLORSPACE; stdcall;
+{$EXTERNALSYM CreateColorSpaceA}
+function CreateColorSpaceW(lpLogColorSpace: LPLOGCOLORSPACEW): HCOLORSPACE; stdcall;
+{$EXTERNALSYM CreateColorSpaceW}
+function CreateColorSpace(lpLogColorSpace: LPLOGCOLORSPACE): HCOLORSPACE; stdcall;
+{$EXTERNALSYM CreateColorSpace}
+
+function SetColorSpace(hDc: HDC; hColorSpace: HCOLORSPACE): HCOLORSPACE; stdcall;
+{$EXTERNALSYM SetColorSpace}
+function DeleteColorSpace(hColorSpace: HCOLORSPACE): BOOL; stdcall;
+{$EXTERNALSYM DeleteColorSpace}
+function GetICMProfileA(hDc: HDC; lpcbName: LPDWORD; lpszFilename: LPSTR): BOOL; stdcall;
+{$EXTERNALSYM GetICMProfileA}
+function GetICMProfileW(hDc: HDC; lpcbName: LPDWORD; lpszFilename: LPWSTR): BOOL; stdcall;
+{$EXTERNALSYM GetICMProfileW}
+function GetICMProfile(hDc: HDC; lpcbName: LPDWORD; lpszFilename: LPTSTR): BOOL; stdcall;
+{$EXTERNALSYM GetICMProfile}
+
+function SetICMProfileA(hDc: HDC; lpFileName: LPSTR): BOOL; stdcall;
+{$EXTERNALSYM SetICMProfileA}
+function SetICMProfileW(hDc: HDC; lpFileName: LPWSTR): BOOL; stdcall;
+{$EXTERNALSYM SetICMProfileW}
+function SetICMProfile(hDc: HDC; lpFileName: LPTSTR): BOOL; stdcall;
+{$EXTERNALSYM SetICMProfile}
+
+function GetDeviceGammaRamp(hDc: HDC; lpRamp: LPVOID): BOOL; stdcall;
+{$EXTERNALSYM GetDeviceGammaRamp}
+function SetDeviceGammaRamp(hDc: HDC; lpRamp: LPVOID): BOOL; stdcall;
+{$EXTERNALSYM SetDeviceGammaRamp}
+function ColorMatchToTarget(hDc, hdcTarget: HDC; uiAction: DWORD): BOOL; stdcall;
+{$EXTERNALSYM ColorMatchToTarget}
+
+function EnumICMProfilesA(hDc: HDC; lpEnumProc: ICMENUMPROCA; lParam: LPARAM): Integer; stdcall;
+{$EXTERNALSYM EnumICMProfilesA}
+function EnumICMProfilesW(hDc: HDC; lpEnumProc: ICMENUMPROCW; lParam: LPARAM): Integer; stdcall;
+{$EXTERNALSYM EnumICMProfilesW}
+function EnumICMProfiles(hDc: HDC; lpEnumProc: ICMENUMPROC; lParam: LPARAM): Integer; stdcall;
+{$EXTERNALSYM EnumICMProfiles}
+
+function UpdateICMRegKeyA(dwReserved: DWORD; lpszCMID, lpszFileName: LPSTR; nCommand: UINT): BOOL; stdcall;
+{$EXTERNALSYM UpdateICMRegKeyA}
+function UpdateICMRegKeyW(dwReserved: DWORD; lpszCMID, lpszFileName: LPWSTR; nCommand: UINT): BOOL; stdcall;
+{$EXTERNALSYM UpdateICMRegKeyW}
+function UpdateICMRegKey(dwReserved: DWORD; lpszCMID, lpszFileName: LPTSTR; nCommand: UINT): BOOL; stdcall;
+{$EXTERNALSYM UpdateICMRegKey}
+
+function ColorCorrectPalette(hDc: HDC; hColorPalette: HPALETTE; dwFirstEntry, dwNumOfEntries: DWORD): BOOL; stdcall;
+{$EXTERNALSYM ColorCorrectPalette}
+
+// Enhanced metafile constants.
+
+const
+ ENHMETA_SIGNATURE = $464D4520;
+ {$EXTERNALSYM ENHMETA_SIGNATURE}
+
+// Stock object flag used in the object handle index in the enhanced
+// metafile records.
+// E.g. The object handle index (META_STOCK_OBJECT | BLACK_BRUSH)
+// represents the stock object BLACK_BRUSH.
+
+ ENHMETA_STOCK_OBJECT = DWORD($80000000);
+ {$EXTERNALSYM ENHMETA_STOCK_OBJECT}
+
+// Enhanced metafile record types.
+
+ EMR_HEADER = 1;
+ {$EXTERNALSYM EMR_HEADER}
+ EMR_POLYBEZIER = 2;
+ {$EXTERNALSYM EMR_POLYBEZIER}
+ EMR_POLYGON = 3;
+ {$EXTERNALSYM EMR_POLYGON}
+ EMR_POLYLINE = 4;
+ {$EXTERNALSYM EMR_POLYLINE}
+ EMR_POLYBEZIERTO = 5;
+ {$EXTERNALSYM EMR_POLYBEZIERTO}
+ EMR_POLYLINETO = 6;
+ {$EXTERNALSYM EMR_POLYLINETO}
+ EMR_POLYPOLYLINE = 7;
+ {$EXTERNALSYM EMR_POLYPOLYLINE}
+ EMR_POLYPOLYGON = 8;
+ {$EXTERNALSYM EMR_POLYPOLYGON}
+ EMR_SETWINDOWEXTEX = 9;
+ {$EXTERNALSYM EMR_SETWINDOWEXTEX}
+ EMR_SETWINDOWORGEX = 10;
+ {$EXTERNALSYM EMR_SETWINDOWORGEX}
+ EMR_SETVIEWPORTEXTEX = 11;
+ {$EXTERNALSYM EMR_SETVIEWPORTEXTEX}
+ EMR_SETVIEWPORTORGEX = 12;
+ {$EXTERNALSYM EMR_SETVIEWPORTORGEX}
+ EMR_SETBRUSHORGEX = 13;
+ {$EXTERNALSYM EMR_SETBRUSHORGEX}
+ EMR_EOF = 14;
+ {$EXTERNALSYM EMR_EOF}
+ EMR_SETPIXELV = 15;
+ {$EXTERNALSYM EMR_SETPIXELV}
+ EMR_SETMAPPERFLAGS = 16;
+ {$EXTERNALSYM EMR_SETMAPPERFLAGS}
+ EMR_SETMAPMODE = 17;
+ {$EXTERNALSYM EMR_SETMAPMODE}
+ EMR_SETBKMODE = 18;
+ {$EXTERNALSYM EMR_SETBKMODE}
+ EMR_SETPOLYFILLMODE = 19;
+ {$EXTERNALSYM EMR_SETPOLYFILLMODE}
+ EMR_SETROP2 = 20;
+ {$EXTERNALSYM EMR_SETROP2}
+ EMR_SETSTRETCHBLTMODE = 21;
+ {$EXTERNALSYM EMR_SETSTRETCHBLTMODE}
+ EMR_SETTEXTALIGN = 22;
+ {$EXTERNALSYM EMR_SETTEXTALIGN}
+ EMR_SETCOLORADJUSTMENT = 23;
+ {$EXTERNALSYM EMR_SETCOLORADJUSTMENT}
+ EMR_SETTEXTCOLOR = 24;
+ {$EXTERNALSYM EMR_SETTEXTCOLOR}
+ EMR_SETBKCOLOR = 25;
+ {$EXTERNALSYM EMR_SETBKCOLOR}
+ EMR_OFFSETCLIPRGN = 26;
+ {$EXTERNALSYM EMR_OFFSETCLIPRGN}
+ EMR_MOVETOEX = 27;
+ {$EXTERNALSYM EMR_MOVETOEX}
+ EMR_SETMETARGN = 28;
+ {$EXTERNALSYM EMR_SETMETARGN}
+ EMR_EXCLUDECLIPRECT = 29;
+ {$EXTERNALSYM EMR_EXCLUDECLIPRECT}
+ EMR_INTERSECTCLIPRECT = 30;
+ {$EXTERNALSYM EMR_INTERSECTCLIPRECT}
+ EMR_SCALEVIEWPORTEXTEX = 31;
+ {$EXTERNALSYM EMR_SCALEVIEWPORTEXTEX}
+ EMR_SCALEWINDOWEXTEX = 32;
+ {$EXTERNALSYM EMR_SCALEWINDOWEXTEX}
+ EMR_SAVEDC = 33;
+ {$EXTERNALSYM EMR_SAVEDC}
+ EMR_RESTOREDC = 34;
+ {$EXTERNALSYM EMR_RESTOREDC}
+ EMR_SETWORLDTRANSFORM = 35;
+ {$EXTERNALSYM EMR_SETWORLDTRANSFORM}
+ EMR_MODIFYWORLDTRANSFORM = 36;
+ {$EXTERNALSYM EMR_MODIFYWORLDTRANSFORM}
+ EMR_SELECTOBJECT = 37;
+ {$EXTERNALSYM EMR_SELECTOBJECT}
+ EMR_CREATEPEN = 38;
+ {$EXTERNALSYM EMR_CREATEPEN}
+ EMR_CREATEBRUSHINDIRECT = 39;
+ {$EXTERNALSYM EMR_CREATEBRUSHINDIRECT}
+ EMR_DELETEOBJECT = 40;
+ {$EXTERNALSYM EMR_DELETEOBJECT}
+ EMR_ANGLEARC = 41;
+ {$EXTERNALSYM EMR_ANGLEARC}
+ EMR_ELLIPSE = 42;
+ {$EXTERNALSYM EMR_ELLIPSE}
+ EMR_RECTANGLE = 43;
+ {$EXTERNALSYM EMR_RECTANGLE}
+ EMR_ROUNDRECT = 44;
+ {$EXTERNALSYM EMR_ROUNDRECT}
+ EMR_ARC = 45;
+ {$EXTERNALSYM EMR_ARC}
+ EMR_CHORD = 46;
+ {$EXTERNALSYM EMR_CHORD}
+ EMR_PIE = 47;
+ {$EXTERNALSYM EMR_PIE}
+ EMR_SELECTPALETTE = 48;
+ {$EXTERNALSYM EMR_SELECTPALETTE}
+ EMR_CREATEPALETTE = 49;
+ {$EXTERNALSYM EMR_CREATEPALETTE}
+ EMR_SETPALETTEENTRIES = 50;
+ {$EXTERNALSYM EMR_SETPALETTEENTRIES}
+ EMR_RESIZEPALETTE = 51;
+ {$EXTERNALSYM EMR_RESIZEPALETTE}
+ EMR_REALIZEPALETTE = 52;
+ {$EXTERNALSYM EMR_REALIZEPALETTE}
+ EMR_EXTFLOODFILL = 53;
+ {$EXTERNALSYM EMR_EXTFLOODFILL}
+ EMR_LINETO = 54;
+ {$EXTERNALSYM EMR_LINETO}
+ EMR_ARCTO = 55;
+ {$EXTERNALSYM EMR_ARCTO}
+ EMR_POLYDRAW = 56;
+ {$EXTERNALSYM EMR_POLYDRAW}
+ EMR_SETARCDIRECTION = 57;
+ {$EXTERNALSYM EMR_SETARCDIRECTION}
+ EMR_SETMITERLIMIT = 58;
+ {$EXTERNALSYM EMR_SETMITERLIMIT}
+ EMR_BEGINPATH = 59;
+ {$EXTERNALSYM EMR_BEGINPATH}
+ EMR_ENDPATH = 60;
+ {$EXTERNALSYM EMR_ENDPATH}
+ EMR_CLOSEFIGURE = 61;
+ {$EXTERNALSYM EMR_CLOSEFIGURE}
+ EMR_FILLPATH = 62;
+ {$EXTERNALSYM EMR_FILLPATH}
+ EMR_STROKEANDFILLPATH = 63;
+ {$EXTERNALSYM EMR_STROKEANDFILLPATH}
+ EMR_STROKEPATH = 64;
+ {$EXTERNALSYM EMR_STROKEPATH}
+ EMR_FLATTENPATH = 65;
+ {$EXTERNALSYM EMR_FLATTENPATH}
+ EMR_WIDENPATH = 66;
+ {$EXTERNALSYM EMR_WIDENPATH}
+ EMR_SELECTCLIPPATH = 67;
+ {$EXTERNALSYM EMR_SELECTCLIPPATH}
+ EMR_ABORTPATH = 68;
+ {$EXTERNALSYM EMR_ABORTPATH}
+
+ EMR_GDICOMMENT = 70;
+ {$EXTERNALSYM EMR_GDICOMMENT}
+ EMR_FILLRGN = 71;
+ {$EXTERNALSYM EMR_FILLRGN}
+ EMR_FRAMERGN = 72;
+ {$EXTERNALSYM EMR_FRAMERGN}
+ EMR_INVERTRGN = 73;
+ {$EXTERNALSYM EMR_INVERTRGN}
+ EMR_PAINTRGN = 74;
+ {$EXTERNALSYM EMR_PAINTRGN}
+ EMR_EXTSELECTCLIPRGN = 75;
+ {$EXTERNALSYM EMR_EXTSELECTCLIPRGN}
+ EMR_BITBLT = 76;
+ {$EXTERNALSYM EMR_BITBLT}
+ EMR_STRETCHBLT = 77;
+ {$EXTERNALSYM EMR_STRETCHBLT}
+ EMR_MASKBLT = 78;
+ {$EXTERNALSYM EMR_MASKBLT}
+ EMR_PLGBLT = 79;
+ {$EXTERNALSYM EMR_PLGBLT}
+ EMR_SETDIBITSTODEVICE = 80;
+ {$EXTERNALSYM EMR_SETDIBITSTODEVICE}
+ EMR_STRETCHDIBITS = 81;
+ {$EXTERNALSYM EMR_STRETCHDIBITS}
+ EMR_EXTCREATEFONTINDIRECTW = 82;
+ {$EXTERNALSYM EMR_EXTCREATEFONTINDIRECTW}
+ EMR_EXTTEXTOUTA = 83;
+ {$EXTERNALSYM EMR_EXTTEXTOUTA}
+ EMR_EXTTEXTOUTW = 84;
+ {$EXTERNALSYM EMR_EXTTEXTOUTW}
+ EMR_POLYBEZIER16 = 85;
+ {$EXTERNALSYM EMR_POLYBEZIER16}
+ EMR_POLYGON16 = 86;
+ {$EXTERNALSYM EMR_POLYGON16}
+ EMR_POLYLINE16 = 87;
+ {$EXTERNALSYM EMR_POLYLINE16}
+ EMR_POLYBEZIERTO16 = 88;
+ {$EXTERNALSYM EMR_POLYBEZIERTO16}
+ EMR_POLYLINETO16 = 89;
+ {$EXTERNALSYM EMR_POLYLINETO16}
+ EMR_POLYPOLYLINE16 = 90;
+ {$EXTERNALSYM EMR_POLYPOLYLINE16}
+ EMR_POLYPOLYGON16 = 91;
+ {$EXTERNALSYM EMR_POLYPOLYGON16}
+ EMR_POLYDRAW16 = 92;
+ {$EXTERNALSYM EMR_POLYDRAW16}
+ EMR_CREATEMONOBRUSH = 93;
+ {$EXTERNALSYM EMR_CREATEMONOBRUSH}
+ EMR_CREATEDIBPATTERNBRUSHPT = 94;
+ {$EXTERNALSYM EMR_CREATEDIBPATTERNBRUSHPT}
+ EMR_EXTCREATEPEN = 95;
+ {$EXTERNALSYM EMR_EXTCREATEPEN}
+ EMR_POLYTEXTOUTA = 96;
+ {$EXTERNALSYM EMR_POLYTEXTOUTA}
+ EMR_POLYTEXTOUTW = 97;
+ {$EXTERNALSYM EMR_POLYTEXTOUTW}
+
+ EMR_SETICMMODE = 98;
+ {$EXTERNALSYM EMR_SETICMMODE}
+ EMR_CREATECOLORSPACE = 99;
+ {$EXTERNALSYM EMR_CREATECOLORSPACE}
+ EMR_SETCOLORSPACE = 100;
+ {$EXTERNALSYM EMR_SETCOLORSPACE}
+ EMR_DELETECOLORSPACE = 101;
+ {$EXTERNALSYM EMR_DELETECOLORSPACE}
+ EMR_GLSRECORD = 102;
+ {$EXTERNALSYM EMR_GLSRECORD}
+ EMR_GLSBOUNDEDRECORD = 103;
+ {$EXTERNALSYM EMR_GLSBOUNDEDRECORD}
+ EMR_PIXELFORMAT = 104;
+ {$EXTERNALSYM EMR_PIXELFORMAT}
+
+ EMR_RESERVED_105 = 105;
+ {$EXTERNALSYM EMR_RESERVED_105}
+ EMR_RESERVED_106 = 106;
+ {$EXTERNALSYM EMR_RESERVED_106}
+ EMR_RESERVED_107 = 107;
+ {$EXTERNALSYM EMR_RESERVED_107}
+ EMR_RESERVED_108 = 108;
+ {$EXTERNALSYM EMR_RESERVED_108}
+ EMR_RESERVED_109 = 109;
+ {$EXTERNALSYM EMR_RESERVED_109}
+ EMR_RESERVED_110 = 110;
+ {$EXTERNALSYM EMR_RESERVED_110}
+ EMR_COLORCORRECTPALETTE = 111;
+ {$EXTERNALSYM EMR_COLORCORRECTPALETTE}
+ EMR_SETICMPROFILEA = 112;
+ {$EXTERNALSYM EMR_SETICMPROFILEA}
+ EMR_SETICMPROFILEW = 113;
+ {$EXTERNALSYM EMR_SETICMPROFILEW}
+ EMR_ALPHABLEND = 114;
+ {$EXTERNALSYM EMR_ALPHABLEND}
+ EMR_SETLAYOUT = 115;
+ {$EXTERNALSYM EMR_SETLAYOUT}
+ EMR_TRANSPARENTBLT = 116;
+ {$EXTERNALSYM EMR_TRANSPARENTBLT}
+ EMR_RESERVED_117 = 117;
+ {$EXTERNALSYM EMR_RESERVED_117}
+ EMR_GRADIENTFILL = 118;
+ {$EXTERNALSYM EMR_GRADIENTFILL}
+ EMR_RESERVED_119 = 119;
+ {$EXTERNALSYM EMR_RESERVED_119}
+ EMR_RESERVED_120 = 120;
+ {$EXTERNALSYM EMR_RESERVED_120}
+ EMR_COLORMATCHTOTARGETW = 121;
+ {$EXTERNALSYM EMR_COLORMATCHTOTARGETW}
+ EMR_CREATECOLORSPACEW = 122;
+ {$EXTERNALSYM EMR_CREATECOLORSPACEW}
+
+ EMR_MIN = 1;
+ {$EXTERNALSYM EMR_MIN}
+
+ {$IFDEF WIN98ME_UP}
+ EMR_MAX = 122;
+ {$EXTERNALSYM EMR_MAX}
+ {$ELSE}
+ EMR_MAX = 104;
+ {$EXTERNALSYM EMR_MAX}
+ {$ENDIF WIN98ME_UP}
+
+// Base record type for the enhanced metafile.
+
+type
+ PEmr = ^TEmr;
+ tagEMR = record
+ iType: DWORD; // Enhanced metafile record type
+ nSize: DWORD; // Length of the record in bytes.
+ // This must be a multiple of 4.
+ end;
+ {$EXTERNALSYM tagEMR}
+ EMR = tagEMR;
+ {$EXTERNALSYM EMR}
+ TEmr = EMR;
+
+// Base text record type for the enhanced metafile.
+
+ PEmrText = ^TEmrText;
+ tagEMRTEXT = record
+ ptlReference: POINTL;
+ nChars: DWORD;
+ offString: DWORD; // Offset to the string
+ fOptions: DWORD;
+ rcl: RECTL;
+ offDx: DWORD; // Offset to the inter-character spacing array.
+ // This is always given.
+ end;
+ {$EXTERNALSYM tagEMRTEXT}
+ EMRTEXT = tagEMRTEXT;
+ {$EXTERNALSYM EMRTEXT}
+ TEmrText = EMRTEXT;
+
+// Record structures for the enhanced metafile.
+
+ PAbortPath = ^TAbortPath;
+ tagABORTPATH = record
+ emr: EMR;
+ end;
+ {$EXTERNALSYM tagABORTPATH}
+ TAbortPath = tagABORTPATH;
+ EMRABORTPATH = tagABORTPATH;
+ {$EXTERNALSYM EMRABORTPATH}
+ PEMRABORTPATH = ^EMRABORTPATH;
+ {$EXTERNALSYM PEMRABORTPATH}
+ EMRBEGINPATH = tagABORTPATH;
+ {$EXTERNALSYM EMRBEGINPATH}
+ PEMRBEGINPATH = ^EMRBEGINPATH;
+ {$EXTERNALSYM PEMRBEGINPATH}
+ EMRENDPATH = tagABORTPATH;
+ {$EXTERNALSYM EMRENDPATH}
+ PEMRENDPATH = ^EMRENDPATH;
+ {$EXTERNALSYM PEMRENDPATH}
+ EMRCLOSEFIGURE = tagABORTPATH;
+ {$EXTERNALSYM EMRCLOSEFIGURE}
+ PEMRCLOSEFIGURE = ^EMRCLOSEFIGURE;
+ {$EXTERNALSYM PEMRCLOSEFIGURE}
+ EMRFLATTENPATH = tagABORTPATH;
+ {$EXTERNALSYM EMRFLATTENPATH}
+ PEMRFLATTENPATH = ^EMRFLATTENPATH;
+ {$EXTERNALSYM PEMRFLATTENPATH}
+ EMRWIDENPATH = tagABORTPATH;
+ {$EXTERNALSYM EMRWIDENPATH}
+ PEMRWIDENPATH = ^EMRWIDENPATH;
+ {$EXTERNALSYM PEMRWIDENPATH}
+ EMRSETMETARGN = tagABORTPATH;
+ {$EXTERNALSYM EMRSETMETARGN}
+ PEMRSETMETARGN = ^EMRSETMETARGN;
+ {$EXTERNALSYM PEMRSETMETARGN}
+ EMRSAVEDC = tagABORTPATH;
+ {$EXTERNALSYM EMRSAVEDC}
+ PEMRSAVEDC = ^EMRSAVEDC;
+ {$EXTERNALSYM PEMRSAVEDC}
+ EMRREALIZEPALETTE = tagABORTPATH;
+ {$EXTERNALSYM EMRREALIZEPALETTE}
+ PEMRREALIZEPALETTE = ^EMRREALIZEPALETTE;
+ {$EXTERNALSYM PEMRREALIZEPALETTE}
+
+ PEmrSelectClipPath = ^TEmrSelectClipPath;
+ tagEMRSELECTCLIPPATH = record
+ emr: EMR;
+ iMode: DWORD;
+ end;
+ {$EXTERNALSYM tagEMRSELECTCLIPPATH}
+ EMRSELECTCLIPPATH = tagEMRSELECTCLIPPATH;
+ {$EXTERNALSYM EMRSELECTCLIPPATH}
+ LPEMRSELECTCLIPPATH = ^EMRSELECTCLIPPATH;
+ {$EXTERNALSYM LPEMRSELECTCLIPPATH}
+ TEmrSelectClipPath = EMRSELECTCLIPPATH;
+
+ EMRSETBKMODE = tagEMRSELECTCLIPPATH;
+ {$EXTERNALSYM EMRSETBKMODE}
+ PEMRSETBKMODE = ^EMRSETBKMODE;
+ {$EXTERNALSYM PEMRSETBKMODE}
+ EMRSETMAPMODE = tagEMRSELECTCLIPPATH;
+ {$EXTERNALSYM EMRSETMAPMODE}
+ PEMRSETMAPMODE = ^EMRSETMAPMODE;
+ {$EXTERNALSYM PEMRSETMAPMODE}
+ EMRSETLAYOUT = tagEMRSELECTCLIPPATH;
+ {$EXTERNALSYM EMRSETLAYOUT}
+ PEMRSETLAYOUT = ^EMRSETLAYOUT;
+ {$EXTERNALSYM PEMRSETLAYOUT}
+ EMRSETPOLYFILLMODE = tagEMRSELECTCLIPPATH;
+ {$EXTERNALSYM EMRSETPOLYFILLMODE}
+ PEMRSETPOLYFILLMODE = EMRSETPOLYFILLMODE;
+ {$EXTERNALSYM PEMRSETPOLYFILLMODE}
+ EMRSETROP2 = tagEMRSELECTCLIPPATH;
+ {$EXTERNALSYM EMRSETROP2}
+ PEMRSETROP2 = ^EMRSETROP2;
+ {$EXTERNALSYM PEMRSETROP2}
+ EMRSETSTRETCHBLTMODE = tagEMRSELECTCLIPPATH;
+ {$EXTERNALSYM EMRSETSTRETCHBLTMODE}
+ PEMRSETSTRETCHBLTMODE = ^EMRSETSTRETCHBLTMODE;
+ {$EXTERNALSYM PEMRSETSTRETCHBLTMODE}
+ EMRSETICMMODE = tagEMRSELECTCLIPPATH;
+ {$EXTERNALSYM EMRSETICMMODE}
+ PEMRSETICMMODE = ^EMRSETICMMODE;
+ {$EXTERNALSYM PEMRSETICMMODE}
+ EMRSETTEXTALIGN = tagEMRSELECTCLIPPATH;
+ {$EXTERNALSYM EMRSETTEXTALIGN}
+ PEMRSETTEXTALIGN = ^EMRSETTEXTALIGN;
+ {$EXTERNALSYM PEMRSETTEXTALIGN}
+
+ PEmrSetMiterLimit = ^TEmrSetMiterLimit;
+ tagEMRSETMITERLIMIT = record
+ emr: EMR;
+ eMiterLimit: FLOAT;
+ end;
+ {$EXTERNALSYM tagEMRSETMITERLIMIT}
+ EMRSETMITERLIMIT = tagEMRSETMITERLIMIT;
+ {$EXTERNALSYM EMRSETMITERLIMIT}
+ TEmrSetMiterLimit = EMRSETMITERLIMIT;
+
+ PEmrRestoreDc = ^TEmrRestoreDc;
+ tagEMRRESTOREDC = record
+ emr: EMR;
+ iRelative: LONG; // Specifies a relative instance
+ end;
+ {$EXTERNALSYM tagEMRRESTOREDC}
+ EMRRESTOREDC = tagEMRRESTOREDC;
+ {$EXTERNALSYM EMRRESTOREDC}
+ TEmrRestoreDc = EMRRESTOREDC;
+
+ PEmrSetArcDirection = ^TEmrSetArcDirection;
+ tagEMRSETARCDIRECTION = record
+ emr: EMR;
+ iArcDirection: DWORD; // Specifies the arc direction in the
+ // advanced graphics mode.
+ end;
+ {$EXTERNALSYM tagEMRSETARCDIRECTION}
+ EMRSETARCDIRECTION = tagEMRSETARCDIRECTION;
+ {$EXTERNALSYM EMRSETARCDIRECTION}
+ TEmrSetArcDirection = EMRSETARCDIRECTION;
+
+ PEmrSetMapperFlags = ^TEmrSetMapperFlags;
+ tagEMRSETMAPPERFLAGS = record
+ emr: EMR;
+ dwFlags: DWORD;
+ end;
+ {$EXTERNALSYM tagEMRSETMAPPERFLAGS}
+ EMRSETMAPPERFLAGS = tagEMRSETMAPPERFLAGS;
+ {$EXTERNALSYM EMRSETMAPPERFLAGS}
+ TEmrSetMapperFlags = EMRSETMAPPERFLAGS;
+
+ PEmrSetTextColor = ^TEmrSetTextColor;
+ tagEMRSETTEXTCOLOR = record
+ emr: EMR;
+ crColor: COLORREF;
+ end;
+ {$EXTERNALSYM tagEMRSETTEXTCOLOR}
+ EMRSETTEXTCOLOR = tagEMRSETTEXTCOLOR;
+ {$EXTERNALSYM EMRSETTEXTCOLOR}
+ EMRSETBKCOLOR = tagEMRSETTEXTCOLOR;
+ {$EXTERNALSYM EMRSETBKCOLOR}
+ PEMRSETBKCOLOR = ^EMRSETTEXTCOLOR;
+ {$EXTERNALSYM PEMRSETBKCOLOR}
+ TEmrSetTextColor = EMRSETTEXTCOLOR;
+
+ PEmrSelectObject = ^TEmrSelectObject;
+ tagEMRSELECTOBJECT = record
+ emr: EMR;
+ ihObject: DWORD; // Object handle index
+ end;
+ {$EXTERNALSYM tagEMRSELECTOBJECT}
+ EMRSELECTOBJECT = tagEMRSELECTOBJECT;
+ {$EXTERNALSYM EMRSELECTOBJECT}
+ EMRDELETEOBJECT = tagEMRSELECTOBJECT;
+ {$EXTERNALSYM EMRDELETEOBJECT}
+ PEMRDELETEOBJECT = ^EMRDELETEOBJECT;
+ {$EXTERNALSYM PEMRDELETEOBJECT}
+ TEmrSelectObject = EMRSELECTOBJECT;
+
+ PEmrSelectPalette = ^TEmrSelectPalette;
+ tagEMRSELECTPALETTE = record
+ emr: EMR;
+ ihPal: DWORD; // Palette handle index, background mode only
+ end;
+ {$EXTERNALSYM tagEMRSELECTPALETTE}
+ EMRSELECTPALETTE = tagEMRSELECTPALETTE;
+ {$EXTERNALSYM EMRSELECTPALETTE}
+ TEmrSelectPalette = EMRSELECTPALETTE;
+
+ PEmrResizePalette = ^TEmrResizePalette;
+ tagEMRRESIZEPALETTE = record
+ emr: EMR;
+ ihPal: DWORD; // Palette handle index
+ cEntries: DWORD;
+ end;
+ {$EXTERNALSYM tagEMRRESIZEPALETTE}
+ EMRRESIZEPALETTE = tagEMRRESIZEPALETTE;
+ {$EXTERNALSYM EMRRESIZEPALETTE}
+ TEmrResizePalette = EMRRESIZEPALETTE;
+
+ PEmrSetPaletteEntries = ^TEmrSetPaletteEntries;
+ tagEMRSETPALETTEENTRIES = record
+ emr: EMR;
+ ihPal: DWORD; // Palette handle index
+ iStart: DWORD;
+ cEntries: DWORD;
+ aPalEntries: array [0..0] of PALETTEENTRY; // The peFlags fields do not contain any flags
+ end;
+ {$EXTERNALSYM tagEMRSETPALETTEENTRIES}
+ EMRSETPALETTEENTRIES = tagEMRSETPALETTEENTRIES;
+ {$EXTERNALSYM EMRSETPALETTEENTRIES}
+ TEmrSetPaletteEntries = EMRSETPALETTEENTRIES;
+
+ PEmrSetColorAdjustment = ^TEmrSetColorAdjustment;
+ tagEMRSETCOLORADJUSTMENT = record
+ emr: EMR;
+ ColorAdjustment: COLORADJUSTMENT;
+ end;
+ {$EXTERNALSYM tagEMRSETCOLORADJUSTMENT}
+ EMRSETCOLORADJUSTMENT = tagEMRSETCOLORADJUSTMENT;
+ {$EXTERNALSYM EMRSETCOLORADJUSTMENT}
+ TEmrSetColorAdjustment = EMRSETCOLORADJUSTMENT;
+
+ PEmrGdiComment = ^TEmrGdiComment;
+ tagEMRGDICOMMENT = record
+ emr: EMR;
+ cbData: DWORD; // Size of data in bytes
+ Data: array [0..0] of BYTE;
+ end;
+ {$EXTERNALSYM tagEMRGDICOMMENT}
+ EMRGDICOMMENT = tagEMRGDICOMMENT;
+ {$EXTERNALSYM EMRGDICOMMENT}
+ TEmrGdiComment = EMRGDICOMMENT;
+
+ PEmrEof = ^TEmrEof;
+ tagEMREOF = record
+ emr: EMR;
+ nPalEntries: DWORD; // Number of palette entries
+ offPalEntries: DWORD; // Offset to the palette entries
+ nSizeLast: DWORD; // Same as nSize and must be the last DWORD
+ // of the record. The palette entries,
+ // if exist, precede this field.
+ end;
+ {$EXTERNALSYM tagEMREOF}
+ EMREOF = tagEMREOF;
+ {$EXTERNALSYM EMREOF}
+ TEmrEof = EMREOF;
+
+ PEmrLineTo = ^TEmrLineTo;
+ tagEMRLINETO = record
+ emr: EMR;
+ ptl: POINTL;
+ end;
+ {$EXTERNALSYM tagEMRLINETO}
+ EMRLINETO = tagEMRLINETO;
+ {$EXTERNALSYM EMRLINETO}
+ EMRMOVETOEX = tagEMRLINETO;
+ {$EXTERNALSYM EMRMOVETOEX}
+ PEMRMOVETOEX = ^EMRMOVETOEX;
+ {$EXTERNALSYM PEMRMOVETOEX}
+ TEmrLineTo = EMRLINETO;
+
+ PEmrOffsetClipRgn = ^TEmrOffsetClipRgn;
+ tagEMROFFSETCLIPRGN = record
+ emr: EMR;
+ ptlOffset: POINTL;
+ end;
+ {$EXTERNALSYM tagEMROFFSETCLIPRGN}
+ EMROFFSETCLIPRGN = tagEMROFFSETCLIPRGN;
+ {$EXTERNALSYM EMROFFSETCLIPRGN}
+ TEmrOffsetClipRgn = EMROFFSETCLIPRGN;
+
+ PEmrFillPath = ^TEmrFillPath;
+ tagEMRFILLPATH = record
+ emr: EMR;
+ rclBounds: RECTL; // Inclusive-inclusive bounds in device units
+ end;
+ {$EXTERNALSYM tagEMRFILLPATH}
+ EMRFILLPATH = tagEMRFILLPATH;
+ {$EXTERNALSYM EMRFILLPATH}
+ EMRSTROKEANDFILLPATH = tagEMRFILLPATH;
+ {$EXTERNALSYM EMRSTROKEANDFILLPATH}
+ PEMRSTROKEANDFILLPATH = ^EMRSTROKEANDFILLPATH;
+ {$EXTERNALSYM PEMRSTROKEANDFILLPATH}
+ EMRSTROKEPATH = tagEMRFILLPATH;
+ {$EXTERNALSYM EMRSTROKEPATH}
+ PEMRSTROKEPATH = ^EMRSTROKEPATH;
+ {$EXTERNALSYM PEMRSTROKEPATH}
+ TEmrFillPath = EMRFILLPATH;
+
+ PEmrExcludeClipRect = ^TEmrExcludeClipRect;
+ tagEMREXCLUDECLIPRECT = record
+ emr: EMR;
+ rclClip: RECTL;
+ end;
+ {$EXTERNALSYM tagEMREXCLUDECLIPRECT}
+ EMREXCLUDECLIPRECT = tagEMREXCLUDECLIPRECT;
+ {$EXTERNALSYM EMREXCLUDECLIPRECT}
+ EMRINTERSECTCLIPRECT = tagEMREXCLUDECLIPRECT;
+ {$EXTERNALSYM EMRINTERSECTCLIPRECT}
+ PEMRINTERSECTCLIPRECT = ^EMRINTERSECTCLIPRECT;
+ {$EXTERNALSYM PEMRINTERSECTCLIPRECT}
+ TEmrExcludeClipRect = EMREXCLUDECLIPRECT;
+
+ PEmrSetViewPortOrgEx = ^TEmrSetViewPortOrgEx;
+ tagEMRSETVIEWPORTORGEX = record
+ emr: EMR;
+ ptlOrigin: POINTL;
+ end;
+ {$EXTERNALSYM tagEMRSETVIEWPORTORGEX}
+ EMRSETVIEWPORTORGEX = tagEMRSETVIEWPORTORGEX;
+ {$EXTERNALSYM EMRSETVIEWPORTORGEX}
+ EMRSETWINDOWORGEX = tagEMRSETVIEWPORTORGEX;
+ {$EXTERNALSYM EMRSETWINDOWORGEX}
+ PEMRSETWINDOWORGEX = ^EMRSETWINDOWORGEX;
+ {$EXTERNALSYM PEMRSETWINDOWORGEX}
+ EMRSETBRUSHORGEX = tagEMRSETVIEWPORTORGEX;
+ {$EXTERNALSYM EMRSETBRUSHORGEX}
+ PEMRSETBRUSHORGEX = ^EMRSETBRUSHORGEX;
+ {$EXTERNALSYM PEMRSETBRUSHORGEX}
+ TEmrSetViewPortOrgEx = EMRSETVIEWPORTORGEX;
+
+ PEmrSetViewPortExtEx = ^TEmrSetViewPortExtEx;
+ tagEMRSETVIEWPORTEXTEX = record
+ emr: EMR;
+ szlExtent: SIZEL;
+ end;
+ {$EXTERNALSYM tagEMRSETVIEWPORTEXTEX}
+ EMRSETVIEWPORTEXTEX = tagEMRSETVIEWPORTEXTEX;
+ {$EXTERNALSYM EMRSETVIEWPORTEXTEX}
+ EMRSETWINDOWEXTEX = tagEMRSETVIEWPORTEXTEX;
+ {$EXTERNALSYM EMRSETWINDOWEXTEX}
+ TEmrSetViewPortExtEx = EMRSETVIEWPORTEXTEX;
+
+ PEmrScaleViewPortExtEx = ^TEmrScaleViewPortExtEx;
+ tagEMRSCALEVIEWPORTEXTEX = record
+ emr: EMR;
+ xNum: LONG;
+ xDenom: LONG;
+ yNum: LONG;
+ yDenom: LONG;
+ end;
+ {$EXTERNALSYM tagEMRSCALEVIEWPORTEXTEX}
+ EMRSCALEVIEWPORTEXTEX = tagEMRSCALEVIEWPORTEXTEX;
+ {$EXTERNALSYM EMRSCALEVIEWPORTEXTEX}
+ EMRSCALEWINDOWEXTEX = tagEMRSCALEVIEWPORTEXTEX;
+ {$EXTERNALSYM EMRSCALEWINDOWEXTEX}
+ PEMRSCALEWINDOWEXTEX = ^EMRSCALEWINDOWEXTEX;
+ {$EXTERNALSYM PEMRSCALEWINDOWEXTEX}
+ TEmrScaleViewPortExtEx = EMRSCALEVIEWPORTEXTEX;
+
+ PEmrSetWorldTransform = ^TEmrSetWorldTransform;
+ tagEMRSETWORLDTRANSFORM = record
+ emr: EMR;
+ xform: XFORM;
+ end;
+ {$EXTERNALSYM tagEMRSETWORLDTRANSFORM}
+ EMRSETWORLDTRANSFORM = tagEMRSETWORLDTRANSFORM;
+ {$EXTERNALSYM EMRSETWORLDTRANSFORM}
+ TEmrSetWorldTransform = EMRSETWORLDTRANSFORM;
+
+ PEmrModifyWorldTransform = ^TEmrModifyWorldTransform;
+ tagEMRMODIFYWORLDTRANSFORM = record
+ emr: EMR;
+ xform: XFORM;
+ iMode: DWORD;
+ end;
+ {$EXTERNALSYM tagEMRMODIFYWORLDTRANSFORM}
+ EMRMODIFYWORLDTRANSFORM = tagEMRMODIFYWORLDTRANSFORM;
+ {$EXTERNALSYM EMRMODIFYWORLDTRANSFORM}
+ TEmrModifyWorldTransform = EMRMODIFYWORLDTRANSFORM;
+
+ PEmrSetPixelV = ^TEmrSetPixelV;
+ tagEMRSETPIXELV = record
+ emr: EMR;
+ ptlPixel: POINTL;
+ crColor: COLORREF;
+ end;
+ {$EXTERNALSYM tagEMRSETPIXELV}
+ EMRSETPIXELV = tagEMRSETPIXELV;
+ {$EXTERNALSYM EMRSETPIXELV}
+ TEmrSetPixelV = EMRSETPIXELV;
+
+ PEmrExtFloodFill = ^TEmrExtFloodFill;
+ tagEMREXTFLOODFILL = record
+ emr: EMR;
+ ptlStart: POINTL;
+ crColor: COLORREF;
+ iMode: DWORD;
+ end;
+ {$EXTERNALSYM tagEMREXTFLOODFILL}
+ EMREXTFLOODFILL = tagEMREXTFLOODFILL;
+ {$EXTERNALSYM EMREXTFLOODFILL}
+ TEmrExtFloodFill = EMREXTFLOODFILL;
+
+ PEmrEllipse = ^TEmrEllipse;
+ tagEMRELLIPSE = record
+ emr: EMR;
+ rclBox: RECTL; // Inclusive-inclusive bounding rectangle
+ end;
+ {$EXTERNALSYM tagEMRELLIPSE}
+ EMRELLIPSE = tagEMRELLIPSE;
+ {$EXTERNALSYM EMRELLIPSE}
+ EMRRECTANGLE = tagEMRELLIPSE;
+ {$EXTERNALSYM EMRRECTANGLE}
+ PEMRRECTANGLE = ^EMRRECTANGLE;
+ {$EXTERNALSYM PEMRRECTANGLE}
+ TEmrEllipse = EMRELLIPSE;
+
+ PEmrRoundRect = ^TEmrRoundRect;
+ tagEMRROUNDRECT = record
+ emr: EMR;
+ rclBox: RECTL; // Inclusive-inclusive bounding rectangle
+ szlCorner: SIZEL;
+ end;
+ {$EXTERNALSYM tagEMRROUNDRECT}
+ EMRROUNDRECT = tagEMRROUNDRECT;
+ {$EXTERNALSYM EMRROUNDRECT}
+ TEmrRoundRect = EMRROUNDRECT;
+
+ PEmrArc = ^TEmrArc;
+ tagEMRARC = record
+ emr: EMR;
+ rclBox: RECTL; // Inclusive-inclusive bounding rectangle
+ ptlStart: POINTL;
+ ptlEnd: POINTL;
+ end;
+ {$EXTERNALSYM tagEMRARC}
+ EMRARC = tagEMRARC;
+ {$EXTERNALSYM EMRARC}
+ EMRARCTO = tagEMRARC;
+ {$EXTERNALSYM EMRARCTO}
+ PEMRARCTO = ^EMRARCTO;
+ {$EXTERNALSYM PEMRARCTO}
+ EMRCHORD = tagEMRARC;
+ {$EXTERNALSYM EMRCHORD}
+ PEMRCHORD = ^EMRCHORD;
+ {$EXTERNALSYM PEMRCHORD}
+ EMRPIE = tagEMRARC;
+ {$EXTERNALSYM EMRPIE}
+ PEMRPIE = ^EMRPIE;
+ {$EXTERNALSYM PEMRPIE}
+ TEmrArc = EMRARC;
+
+ PEmrAngleArc = ^TEmrAngleArc;
+ tagEMRANGLEARC = record
+ emr: EMR;
+ ptlCenter: POINTL;
+ nRadius: DWORD;
+ eStartAngle: FLOAT;
+ eSweepAngle: FLOAT;
+ end;
+ {$EXTERNALSYM tagEMRANGLEARC}
+ EMRANGLEARC = tagEMRANGLEARC;
+ {$EXTERNALSYM EMRANGLEARC}
+ TEmrAngleArc = EMRANGLEARC;
+
+ PEmrPolyline = ^TEmrPolyline;
+ tagEMRPOLYLINE = record
+ emr: EMR;
+ rclBounds: RECTL; // Inclusive-inclusive bounds in device units
+ cptl: DWORD;
+ aptl: array [0..0] of POINTL;
+ end;
+ {$EXTERNALSYM tagEMRPOLYLINE}
+ EMRPOLYLINE = tagEMRPOLYLINE;
+ {$EXTERNALSYM EMRPOLYLINE}
+ EMRPOLYBEZIER = tagEMRPOLYLINE;
+ {$EXTERNALSYM EMRPOLYBEZIER}
+ PEMRPOLYBEZIER = ^EMRPOLYBEZIER;
+ {$EXTERNALSYM PEMRPOLYBEZIER}
+ EMRPOLYGON = tagEMRPOLYLINE;
+ {$EXTERNALSYM EMRPOLYGON}
+ PEMRPOLYGON = ^EMRPOLYGON;
+ {$EXTERNALSYM PEMRPOLYGON}
+ EMRPOLYBEZIERTO = tagEMRPOLYLINE;
+ {$EXTERNALSYM EMRPOLYBEZIERTO}
+ PEMRPOLYBEZIERTO = ^EMRPOLYBEZIERTO;
+ {$EXTERNALSYM PEMRPOLYBEZIERTO}
+ EMRPOLYLINETO = tagEMRPOLYLINE;
+ {$EXTERNALSYM EMRPOLYLINETO}
+ PEMRPOLYLINETO = ^EMRPOLYLINETO;
+ {$EXTERNALSYM PEMRPOLYLINETO}
+ TEmrPolyline = EMRPOLYLINE;
+
+ PEmrPolyline16 = ^TEmrPolyline16;
+ tagEMRPOLYLINE16 = record
+ emr: EMR;
+ rclBounds: RECTL; // Inclusive-inclusive bounds in device units
+ cpts: DWORD;
+ apts: array [0..0] of POINTS;
+ end;
+ {$EXTERNALSYM tagEMRPOLYLINE16}
+ EMRPOLYLINE16 = tagEMRPOLYLINE16;
+ {$EXTERNALSYM EMRPOLYLINE16}
+ EMRPOLYBEZIER16 = tagEMRPOLYLINE16;
+ {$EXTERNALSYM EMRPOLYBEZIER16}
+ PEMRPOLYBEZIER16 = ^EMRPOLYBEZIER16;
+ {$EXTERNALSYM PEMRPOLYBEZIER16}
+ EMRPOLYGON16 = tagEMRPOLYLINE16;
+ {$EXTERNALSYM EMRPOLYGON16}
+ PEMRPOLYGON16 = ^EMRPOLYGON16;
+ {$EXTERNALSYM PEMRPOLYGON16}
+ EMRPOLYBEZIERTO16 = tagEMRPOLYLINE16;
+ {$EXTERNALSYM EMRPOLYBEZIERTO16}
+ PEMRPOLYBEZIERTO16 = ^EMRPOLYBEZIERTO16;
+ {$EXTERNALSYM PEMRPOLYBEZIERTO16}
+ EMRPOLYLINETO16 = tagEMRPOLYLINE16;
+ {$EXTERNALSYM EMRPOLYLINETO16}
+ PEMRPOLYLINETO16 = ^EMRPOLYLINETO16;
+ {$EXTERNALSYM PEMRPOLYLINETO16}
+ TEmrPolyline16 = EMRPOLYLINE16;
+
+ PEmrPolyDraw = ^TEmrPolyDraw;
+ tagEMRPOLYDRAW = record
+ emr: EMR;
+ rclBounds: RECTL; // Inclusive-inclusive bounds in device units
+ cptl: DWORD; // Number of points
+ aptl: array [0..0] of POINTL; // Array of points
+ abTypes: array [0..0] of BYTE; // Array of point types
+ end;
+ {$EXTERNALSYM tagEMRPOLYDRAW}
+ EMRPOLYDRAW = tagEMRPOLYDRAW;
+ {$EXTERNALSYM EMRPOLYDRAW}
+ TEmrPolyDraw = EMRPOLYDRAW;
+
+ PEmrPolyDraw16 = ^TEmrPolyDraw16;
+ tagEMRPOLYDRAW16 = record
+ emr: EMR;
+ rclBounds: RECTL; // Inclusive-inclusive bounds in device units
+ cpts: DWORD; // Number of points
+ apts: array [0..0] of POINTS; // Array of points
+ abTypes: array [0..0] of BYTE; // Array of point types
+ end;
+ {$EXTERNALSYM tagEMRPOLYDRAW16}
+ EMRPOLYDRAW16 = tagEMRPOLYDRAW16;
+ {$EXTERNALSYM EMRPOLYDRAW16}
+ TEmrPolyDraw16 = EMRPOLYDRAW16;
+
+ PEmrPolyPolyline = ^TEmrPolyPolyline;
+ tagEMRPOLYPOLYLINE = record
+ emr: EMR;
+ rclBounds: RECTL; // Inclusive-inclusive bounds in device units
+ nPolys: DWORD; // Number of polys
+ cptl: DWORD; // Total number of points in all polys
+ aPolyCounts: array [0..0] of DWORD; // Array of point counts for each poly
+ aptl: array [0..0] of POINTL; // Array of points
+ end;
+ {$EXTERNALSYM tagEMRPOLYPOLYLINE}
+ EMRPOLYPOLYLINE = tagEMRPOLYPOLYLINE;
+ {$EXTERNALSYM EMRPOLYPOLYLINE}
+ EMRPOLYPOLYGON = tagEMRPOLYPOLYLINE;
+ {$EXTERNALSYM EMRPOLYPOLYGON}
+ TEmrPolyPolyline = EMRPOLYPOLYLINE;
+
+ PEmrPolyPolyline16 = ^TEmrPolyPolyline16;
+ tagEMRPOLYPOLYLINE16 = record
+ emr: EMR;
+ rclBounds: RECTL; // Inclusive-inclusive bounds in device units
+ nPolys: DWORD; // Number of polys
+ cpts: DWORD; // Total number of points in all polys
+ aPolyCounts: array [0..0] of DWORD; // Array of point counts for each poly
+ apts: array [0..0] of POINTS; // Array of points
+ end;
+ {$EXTERNALSYM tagEMRPOLYPOLYLINE16}
+ EMRPOLYPOLYLINE16 = tagEMRPOLYPOLYLINE16;
+ {$EXTERNALSYM EMRPOLYPOLYLINE16}
+ EMRPOLYPOLYGON16 = tagEMRPOLYPOLYLINE16;
+ {$EXTERNALSYM EMRPOLYPOLYGON16}
+ PEMRPOLYPOLYGON16 = ^EMRPOLYPOLYGON16;
+ {$EXTERNALSYM PEMRPOLYPOLYGON16}
+ TEmrPolyPolyline16 = EMRPOLYPOLYLINE16;
+
+ PEmrInvertRgn = ^TEmrInvertRgn;
+ tagEMRINVERTRGN = record
+ emr: EMR;
+ rclBounds: RECTL; // Inclusive-inclusive bounds in device units
+ cbRgnData: DWORD; // Size of region data in bytes
+ RgnData: array [0..0] of BYTE;
+ end;
+ {$EXTERNALSYM tagEMRINVERTRGN}
+ EMRINVERTRGN = tagEMRINVERTRGN;
+ {$EXTERNALSYM EMRINVERTRGN}
+ EMRPAINTRGN = tagEMRINVERTRGN;
+ {$EXTERNALSYM EMRPAINTRGN}
+ TEmrInvertRgn = EMRINVERTRGN;
+
+ PEmrFillRgn = ^TEmrFillRgn;
+ tagEMRFILLRGN = record
+ emr: EMR;
+ rclBounds: RECTL; // Inclusive-inclusive bounds in device units
+ cbRgnData: DWORD; // Size of region data in bytes
+ ihBrush: DWORD; // Brush handle index
+ RgnData: array [0..0] of BYTE;
+ end;
+ {$EXTERNALSYM tagEMRFILLRGN}
+ EMRFILLRGN = tagEMRFILLRGN;
+ {$EXTERNALSYM EMRFILLRGN}
+ TEmrFillRgn = EMRFILLRGN;
+
+ PEmrFrameRgn = ^TEmrFrameRgn;
+ tagEMRFRAMERGN = record
+ emr: EMR;
+ rclBounds: RECTL; // Inclusive-inclusive bounds in device units
+ cbRgnData: DWORD; // Size of region data in bytes
+ ihBrush: DWORD; // Brush handle index
+ szlStroke: SIZEL;
+ RgnData: array [0..0] of BYTE;
+ end;
+ {$EXTERNALSYM tagEMRFRAMERGN}
+ EMRFRAMERGN = tagEMRFRAMERGN;
+ {$EXTERNALSYM EMRFRAMERGN}
+ TEmrFrameRgn = EMRFRAMERGN;
+
+ PEmrExtSelectClipRgn = ^TEmrExtSelectClipRgn;
+ tagEMREXTSELECTCLIPRGN = record
+ emr: EMR;
+ cbRgnData: DWORD; // Size of region data in bytes
+ iMode: DWORD;
+ RgnData: array [0..0] of BYTE;
+ end;
+ {$EXTERNALSYM tagEMREXTSELECTCLIPRGN}
+ EMREXTSELECTCLIPRGN = tagEMREXTSELECTCLIPRGN;
+ {$EXTERNALSYM EMREXTSELECTCLIPRGN}
+ TEmrExtSelectClipRgn = EMREXTSELECTCLIPRGN;
+
+ PEmrExtTextOutA = ^TEmrExtTextOutA;
+ tagEMREXTTEXTOUTA = record
+ emr: EMR;
+ rclBounds: RECTL; // Inclusive-inclusive bounds in device units
+ iGraphicsMode: DWORD; // Current graphics mode
+ exScale: FLOAT; // X and Y scales from Page units to .01mm units
+ eyScale: FLOAT; // if graphics mode is GM_COMPATIBLE.
+ emrtext: EMRTEXT; // This is followed by the string and spacing array
+ end;
+ {$EXTERNALSYM tagEMREXTTEXTOUTA}
+ EMREXTTEXTOUTA = tagEMREXTTEXTOUTA;
+ {$EXTERNALSYM EMREXTTEXTOUTA}
+ EMREXTTEXTOUTW = tagEMREXTTEXTOUTA;
+ {$EXTERNALSYM EMREXTTEXTOUTW}
+ PEMREXTTEXTOUTW = ^EMREXTTEXTOUTW;
+ {$EXTERNALSYM PEMREXTTEXTOUTW}
+ TEmrExtTextOutA = EMREXTTEXTOUTA;
+
+ PEmrPolyTextOutA = ^TEmrPolyTextOutA;
+ tagEMRPOLYTEXTOUTA = record
+ emr: EMR;
+ rclBounds: RECTL; // Inclusive-inclusive bounds in device units
+ iGraphicsMode: DWORD; // Current graphics mode
+ exScale: FLOAT; // X and Y scales from Page units to .01mm units
+ eyScale: FLOAT; // if graphics mode is GM_COMPATIBLE.
+ cStrings: LONG;
+ aemrtext: array [0..0] of EMRTEXT; // Array of EMRTEXT structures. This is
+ // followed by the strings and spacing arrays.
+ end;
+ {$EXTERNALSYM tagEMRPOLYTEXTOUTA}
+ EMRPOLYTEXTOUTA = tagEMRPOLYTEXTOUTA;
+ {$EXTERNALSYM EMRPOLYTEXTOUTA}
+ EMRPOLYTEXTOUTW = tagEMRPOLYTEXTOUTA;
+ {$EXTERNALSYM EMRPOLYTEXTOUTW}
+ PEMRPOLYTEXTOUTW = ^EMRPOLYTEXTOUTW;
+ {$EXTERNALSYM PEMRPOLYTEXTOUTW}
+ TEmrPolyTextOutA = EMRPOLYTEXTOUTA;
+
+ PEmrBitBlt = ^TEmrBitBlt;
+ tagEMRBITBLT = record
+ emr: EMR;
+ rclBounds: RECTL; // Inclusive-inclusive bounds in device units
+ xDest: LONG;
+ yDest: LONG;
+ cxDest: LONG;
+ cyDest: LONG;
+ dwRop: DWORD;
+ xSrc: LONG;
+ ySrc: LONG;
+ xformSrc: XFORM; // Source DC transform
+ crBkColorSrc: COLORREF; // Source DC BkColor in RGB
+ iUsageSrc: DWORD; // Source bitmap info color table usage
+ // (DIB_RGB_COLORS)
+ offBmiSrc: DWORD; // Offset to the source BITMAPINFO structure
+ cbBmiSrc: DWORD; // Size of the source BITMAPINFO structure
+ offBitsSrc: DWORD; // Offset to the source bitmap bits
+ cbBitsSrc: DWORD; // Size of the source bitmap bits
+ end;
+ {$EXTERNALSYM tagEMRBITBLT}
+ EMRBITBLT = tagEMRBITBLT;
+ {$EXTERNALSYM EMRBITBLT}
+ TEmrBitBlt = EMRBITBLT;
+
+ PEmrStretchBlt = ^TEmrStretchBlt;
+ tagEMRSTRETCHBLT = record
+ emr: EMR;
+ rclBounds: RECTL; // Inclusive-inclusive bounds in device units
+ xDest: LONG;
+ yDest: LONG;
+ cxDest: LONG;
+ cyDest: LONG;
+ dwRop: DWORD;
+ xSrc: LONG;
+ ySrc: LONG;
+ xformSrc: XFORM; // Source DC transform
+ crBkColorSrc: COLORREF; // Source DC BkColor in RGB
+ iUsageSrc: DWORD; // Source bitmap info color table usage
+ // (DIB_RGB_COLORS)
+ offBmiSrc: DWORD; // Offset to the source BITMAPINFO structure
+ cbBmiSrc: DWORD; // Size of the source BITMAPINFO structure
+ offBitsSrc: DWORD; // Offset to the source bitmap bits
+ cbBitsSrc: DWORD; // Size of the source bitmap bits
+ cxSrc: LONG;
+ cySrc: LONG;
+ end;
+ {$EXTERNALSYM tagEMRSTRETCHBLT}
+ EMRSTRETCHBLT = tagEMRSTRETCHBLT;
+ {$EXTERNALSYM EMRSTRETCHBLT}
+ TEmrStretchBlt = EMRSTRETCHBLT;
+
+ PEmrMaskBlt = ^TEmrMaskBlt;
+ tagEMRMASKBLT = record
+ emr: EMR;
+ rclBounds: RECTL; // Inclusive-inclusive bounds in device units
+ xDest: LONG;
+ yDest: LONG;
+ cxDest: LONG;
+ cyDest: LONG;
+ dwRop: DWORD;
+ xSrc: LONG;
+ ySrc: LONG;
+ xformSrc: XFORM; // Source DC transform
+ crBkColorSrc: COLORREF; // Source DC BkColor in RGB
+ iUsageSrc: DWORD; // Source bitmap info color table usage
+ // (DIB_RGB_COLORS)
+ offBmiSrc: DWORD; // Offset to the source BITMAPINFO structure
+ cbBmiSrc: DWORD; // Size of the source BITMAPINFO structure
+ offBitsSrc: DWORD; // Offset to the source bitmap bits
+ cbBitsSrc: DWORD; // Size of the source bitmap bits
+ xMask: LONG;
+ yMask: LONG;
+ iUsageMask: DWORD; // Mask bitmap info color table usage
+ offBmiMask: DWORD; // Offset to the mask BITMAPINFO structure if any
+ cbBmiMask: DWORD; // Size of the mask BITMAPINFO structure if any
+ offBitsMask: DWORD; // Offset to the mask bitmap bits if any
+ cbBitsMask: DWORD; // Size of the mask bitmap bits if any
+ end;
+ {$EXTERNALSYM tagEMRMASKBLT}
+ EMRMASKBLT = tagEMRMASKBLT;
+ {$EXTERNALSYM EMRMASKBLT}
+ TEmrMaskBlt = EMRMASKBLT;
+
+ PEmrPlgBlt = ^TEmrPlgBlt;
+ tagEMRPLGBLT = record
+ emr: EMR;
+ rclBounds: RECTL; // Inclusive-inclusive bounds in device units
+ aptlDest: array[0..2] of POINTL;
+ xSrc: LONG;
+ ySrc: LONG;
+ cxSrc: LONG;
+ cySrc: LONG;
+ xformSrc: XFORM; // Source DC transform
+ crBkColorSrc: COLORREF; // Source DC BkColor in RGB
+ iUsageSrc: DWORD; // Source bitmap info color table usage
+ // (DIB_RGB_COLORS)
+ offBmiSrc: DWORD; // Offset to the source BITMAPINFO structure
+ cbBmiSrc: DWORD; // Size of the source BITMAPINFO structure
+ offBitsSrc: DWORD; // Offset to the source bitmap bits
+ cbBitsSrc: DWORD; // Size of the source bitmap bits
+ xMask: LONG;
+ yMask: LONG;
+ iUsageMask: DWORD; // Mask bitmap info color table usage
+ offBmiMask: DWORD; // Offset to the mask BITMAPINFO structure if any
+ cbBmiMask: DWORD; // Size of the mask BITMAPINFO structure if any
+ offBitsMask: DWORD; // Offset to the mask bitmap bits if any
+ cbBitsMask: DWORD; // Size of the mask bitmap bits if any
+ end;
+ {$EXTERNALSYM tagEMRPLGBLT}
+ EMRPLGBLT = tagEMRPLGBLT;
+ {$EXTERNALSYM EMRPLGBLT}
+ TEmrPlgBlt = EMRPLGBLT;
+
+ PEmrSetDiBitsToDevice = ^TEmrSetDiBitsToDevice;
+ tagEMRSETDIBITSTODEVICE = record
+ emr: EMR;
+ rclBounds: RECTL; // Inclusive-inclusive bounds in device units
+ xDest: LONG;
+ yDest: LONG;
+ xSrc: LONG;
+ ySrc: LONG;
+ cxSrc: LONG;
+ cySrc: LONG;
+ offBmiSrc: DWORD; // Offset to the source BITMAPINFO structure
+ cbBmiSrc: DWORD; // Size of the source BITMAPINFO structure
+ offBitsSrc: DWORD; // Offset to the source bitmap bits
+ cbBitsSrc: DWORD; // Size of the source bitmap bits
+ iUsageSrc: DWORD; // Source bitmap info color table usage
+ iStartScan: DWORD;
+ cScans: DWORD;
+ end;
+ {$EXTERNALSYM tagEMRSETDIBITSTODEVICE}
+ EMRSETDIBITSTODEVICE = tagEMRSETDIBITSTODEVICE;
+ {$EXTERNALSYM EMRSETDIBITSTODEVICE}
+ TEmrSetDiBitsToDevice = EMRSETDIBITSTODEVICE;
+
+ PEmrStretchDiBits = ^TEmrStretchDiBits;
+ tagEMRSTRETCHDIBITS = record
+ emr: EMR;
+ rclBounds: RECTL; // Inclusive-inclusive bounds in device units
+ xDest: LONG;
+ yDest: LONG;
+ xSrc: LONG;
+ ySrc: LONG;
+ cxSrc: LONG;
+ cySrc: LONG;
+ offBmiSrc: DWORD; // Offset to the source BITMAPINFO structure
+ cbBmiSrc: DWORD; // Size of the source BITMAPINFO structure
+ offBitsSrc: DWORD; // Offset to the source bitmap bits
+ cbBitsSrc: DWORD; // Size of the source bitmap bits
+ iUsageSrc: DWORD; // Source bitmap info color table usage
+ dwRop: DWORD;
+ cxDest: LONG;
+ cyDest: LONG;
+ end;
+ {$EXTERNALSYM tagEMRSTRETCHDIBITS}
+ EMRSTRETCHDIBITS = tagEMRSTRETCHDIBITS;
+ {$EXTERNALSYM EMRSTRETCHDIBITS}
+ TEmrStretchDiBits = EMRSTRETCHDIBITS;
+
+ PEmrExtCreateFontIndirectW = ^TEmrExtCreateFontIndirectW;
+ tagEMREXTCREATEFONTINDIRECTW = record
+ emr: EMR;
+ ihFont: DWORD; // Font handle index
+ elfw: EXTLOGFONTW;
+ end;
+ {$EXTERNALSYM tagEMREXTCREATEFONTINDIRECTW}
+ EMREXTCREATEFONTINDIRECTW = tagEMREXTCREATEFONTINDIRECTW;
+ {$EXTERNALSYM EMREXTCREATEFONTINDIRECTW}
+ TEmrExtCreateFontIndirectW = EMREXTCREATEFONTINDIRECTW;
+
+ PEmrCreatePalette = ^TEmrCreatePalette;
+ tagEMRCREATEPALETTE = record
+ emr: EMR;
+ ihPal: DWORD; // Palette handle index
+ lgpl: LOGPALETTE; // The peFlags fields in the palette entries
+ // do not contain any flags
+ end;
+ {$EXTERNALSYM tagEMRCREATEPALETTE}
+ EMRCREATEPALETTE = tagEMRCREATEPALETTE;
+ {$EXTERNALSYM EMRCREATEPALETTE}
+ TEmrCreatePalette = EMRCREATEPALETTE;
+
+ PEmrCreatePen = ^TEmrCreatePen;
+ tagEMRCREATEPEN = record
+ emr: EMR;
+ ihPen: DWORD; // Pen handle index
+ lopn: LOGPEN;
+ end;
+ {$EXTERNALSYM tagEMRCREATEPEN}
+ EMRCREATEPEN = tagEMRCREATEPEN;
+ {$EXTERNALSYM EMRCREATEPEN}
+ TEmrCreatePen = EMRCREATEPEN;
+
+ PEmrExtCreatePen = ^TEmrExtCreatePen;
+ tagEMREXTCREATEPEN = record
+ emr: EMR;
+ ihPen: DWORD; // Pen handle index
+ offBmi: DWORD; // Offset to the BITMAPINFO structure if any
+ cbBmi: DWORD; // Size of the BITMAPINFO structure if any
+ // The bitmap info is followed by the bitmap
+ // bits to form a packed DIB.
+ offBits: DWORD; // Offset to the brush bitmap bits if any
+ cbBits: DWORD; // Size of the brush bitmap bits if any
+ elp: EXTLOGPEN; // The extended pen with the style array.
+ end;
+ {$EXTERNALSYM tagEMREXTCREATEPEN}
+ EMREXTCREATEPEN = tagEMREXTCREATEPEN;
+ {$EXTERNALSYM EMREXTCREATEPEN}
+ TEmrExtCreatePen = EMREXTCREATEPEN;
+
+ PEmrCreateBrushIndirect = ^TEmrCreateBrushIndirect;
+ tagEMRCREATEBRUSHINDIRECT = record
+ emr: EMR;
+ ihBrush: DWORD; // Brush handle index
+ lb: LOGBRUSH32; // The style must be BS_SOLID, BS_HOLLOW,
+ // BS_NULL or BS_HATCHED.
+ end;
+ {$EXTERNALSYM tagEMRCREATEBRUSHINDIRECT}
+ EMRCREATEBRUSHINDIRECT = tagEMRCREATEBRUSHINDIRECT;
+ {$EXTERNALSYM EMRCREATEBRUSHINDIRECT}
+ TEmrCreateBrushIndirect = EMRCREATEBRUSHINDIRECT;
+
+ PEmrCreateMonoBrush = ^TEmrCreateMonoBrush;
+ tagEMRCREATEMONOBRUSH = record
+ emr: EMR;
+ ihBrush: DWORD; // Brush handle index
+ iUsage: DWORD; // Bitmap info color table usage
+ offBmi: DWORD; // Offset to the BITMAPINFO structure
+ cbBmi: DWORD; // Size of the BITMAPINFO structure
+ offBits: DWORD; // Offset to the bitmap bits
+ cbBits: DWORD; // Size of the bitmap bits
+ end;
+ {$EXTERNALSYM tagEMRCREATEMONOBRUSH}
+ EMRCREATEMONOBRUSH = tagEMRCREATEMONOBRUSH;
+ {$EXTERNALSYM EMRCREATEMONOBRUSH}
+ TEmrCreateMonoBrush = EMRCREATEMONOBRUSH;
+
+ PEmrCreateDibPatternBrushPt = ^TEmrCreateDibPatternBrushPt;
+ tagEMRCREATEDIBPATTERNBRUSHPT = record
+ emr: EMR;
+ ihBrush: DWORD; // Brush handle index
+ iUsage: DWORD; // Bitmap info color table usage
+ offBmi: DWORD; // Offset to the BITMAPINFO structure
+ cbBmi: DWORD; // Size of the BITMAPINFO structure
+ // The bitmap info is followed by the bitmap
+ // bits to form a packed DIB.
+ offBits: DWORD; // Offset to the bitmap bits
+ cbBits: DWORD; // Size of the bitmap bits
+ end;
+ {$EXTERNALSYM tagEMRCREATEDIBPATTERNBRUSHPT}
+ EMRCREATEDIBPATTERNBRUSHPT = tagEMRCREATEDIBPATTERNBRUSHPT;
+ {$EXTERNALSYM EMRCREATEDIBPATTERNBRUSHPT}
+ TEmrCreateDibPatternBrushPt = EMRCREATEDIBPATTERNBRUSHPT;
+
+ PEmrFormat = ^TEmrFormat;
+ tagEMRFORMAT = record
+ dSignature: DWORD; // Format signature, e.g. ENHMETA_SIGNATURE.
+ nVersion: DWORD; // Format version number.
+ cbData: DWORD; // Size of data in bytes.
+ offData: DWORD; // Offset to data from GDICOMMENT_IDENTIFIER.
+ // It must begin at a DWORD offset.
+ end;
+ {$EXTERNALSYM tagEMRFORMAT}
+ EMRFORMAT = tagEMRFORMAT;
+ {$EXTERNALSYM EMRFORMAT}
+ TEmrFormat = EMRFORMAT;
+
+ PEmrGlsRecord = ^TEmrGlsRecord;
+ tagEMRGLSRECORD = record
+ emr: EMR;
+ cbData: DWORD; // Size of data in bytes
+ Data: array [0..0] of BYTE;
+ end;
+ {$EXTERNALSYM tagEMRGLSRECORD}
+ EMRGLSRECORD = tagEMRGLSRECORD;
+ {$EXTERNALSYM EMRGLSRECORD}
+ TEmrGlsRecord = EMRGLSRECORD;
+
+ PEmrGlsBoundedRecord = ^TEmrGlsBoundedRecord;
+ tagEMRGLSBOUNDEDRECORD = record
+ emr: EMR;
+ rclBounds: RECTL; // Bounds in recording coordinates
+ cbData: DWORD; // Size of data in bytes
+ Data: array [0..0] of BYTE;
+ end;
+ {$EXTERNALSYM tagEMRGLSBOUNDEDRECORD}
+ EMRGLSBOUNDEDRECORD = tagEMRGLSBOUNDEDRECORD;
+ {$EXTERNALSYM EMRGLSBOUNDEDRECORD}
+ TEmrGlsBoundedRecord = EMRGLSBOUNDEDRECORD;
+
+ PEmrPixelFormat = ^TEmrPixelFormat;
+ tagEMRPIXELFORMAT = record
+ emr: EMR;
+ pfd: PIXELFORMATDESCRIPTOR;
+ end;
+ {$EXTERNALSYM tagEMRPIXELFORMAT}
+ EMRPIXELFORMAT = tagEMRPIXELFORMAT;
+ {$EXTERNALSYM EMRPIXELFORMAT}
+ TEmrPixelFormat = EMRPIXELFORMAT;
+
+ PEmrCreateColorSpace = ^TEmrCreateColorSpace;
+ tagEMRCREATECOLORSPACE = record
+ emr: EMR;
+ ihCS: DWORD; // ColorSpace handle index
+ lcs: LOGCOLORSPACEA; // Ansi version of LOGCOLORSPACE
+ end;
+ {$EXTERNALSYM tagEMRCREATECOLORSPACE}
+ EMRCREATECOLORSPACE = tagEMRCREATECOLORSPACE;
+ {$EXTERNALSYM EMRCREATECOLORSPACE}
+ TEmrCreateColorSpace = EMRCREATECOLORSPACE;
+
+ PEmrSetColorSpace = ^TEmrSetColorSpace;
+ tagEMRSETCOLORSPACE = record
+ emr: EMR;
+ ihCS: DWORD; // ColorSpace handle index
+ end;
+ {$EXTERNALSYM tagEMRSETCOLORSPACE}
+ EMRSETCOLORSPACE = tagEMRSETCOLORSPACE;
+ {$EXTERNALSYM EMRSETCOLORSPACE}
+ EMRSELECTCOLORSPACE = tagEMRSETCOLORSPACE;
+ {$EXTERNALSYM EMRSELECTCOLORSPACE}
+ PEMRSELECTCOLORSPACE = ^EMRSELECTCOLORSPACE;
+ {$EXTERNALSYM PEMRSELECTCOLORSPACE}
+ EMRDELETECOLORSPACE = tagEMRSETCOLORSPACE;
+ {$EXTERNALSYM EMRDELETECOLORSPACE}
+ PEMRDELETECOLORSPACE = ^EMRDELETECOLORSPACE;
+ {$EXTERNALSYM PEMRDELETECOLORSPACE}
+ TEmrSetColorSpace = EMRSETCOLORSPACE;
+
+ PEmrExtEscape = ^TEmrExtEscape;
+ tagEMREXTESCAPE = record
+ emr: EMR;
+ iEscape: INT; // Escape code
+ cbEscData: INT; // Size of escape data
+ EscData: array [0..0] of BYTE; // Escape data
+ end;
+ {$EXTERNALSYM tagEMREXTESCAPE}
+ EMREXTESCAPE = tagEMREXTESCAPE;
+ {$EXTERNALSYM EMREXTESCAPE}
+ EMRDRAWESCAPE = tagEMREXTESCAPE;
+ {$EXTERNALSYM EMRDRAWESCAPE}
+ PEMRDRAWESCAPE = ^EMRDRAWESCAPE;
+ {$EXTERNALSYM PEMRDRAWESCAPE}
+ TEmrExtEscape = EMREXTESCAPE;
+
+ PEmrNamedEscape = ^TEmrNamedEscape;
+ tagEMRNAMEDESCAPE = record
+ emr: EMR;
+ iEscape: INT; // Escape code
+ cbDriver: INT; // Size of driver name
+ cbEscData: INT; // Size of escape data
+ EscData: array [0..0] of BYTE; // Driver name and Escape data
+ end;
+ {$EXTERNALSYM tagEMRNAMEDESCAPE}
+ EMRNAMEDESCAPE = tagEMRNAMEDESCAPE;
+ {$EXTERNALSYM EMRNAMEDESCAPE}
+ TEmrNamedEscape = EMRNAMEDESCAPE;
+
+const
+ SETICMPROFILE_EMBEDED = $00000001;
+ {$EXTERNALSYM SETICMPROFILE_EMBEDED}
+
+type
+ PEmrSetIcmProfile = ^TEmrSetIcmProfile;
+ tagEMRSETICMPROFILE = record
+ emr: EMR;
+ dwFlags: DWORD; // flags
+ cbName: DWORD; // Size of desired profile name
+ cbData: DWORD; // Size of raw profile data if attached
+ Data: array [0..0] of BYTE; // Array size is cbName + cbData
+ end;
+ {$EXTERNALSYM tagEMRSETICMPROFILE}
+ EMRSETICMPROFILE = tagEMRSETICMPROFILE;
+ {$EXTERNALSYM EMRSETICMPROFILE}
+ EMRSETICMPROFILEA = tagEMRSETICMPROFILE;
+ {$EXTERNALSYM EMRSETICMPROFILEA}
+ PEMRSETICMPROFILEA = ^EMRSETICMPROFILEA;
+ {$EXTERNALSYM PEMRSETICMPROFILEA}
+ EMRSETICMPROFILEW = tagEMRSETICMPROFILE;
+ {$EXTERNALSYM EMRSETICMPROFILEW}
+ PEMRSETICMPROFILEW = ^EMRSETICMPROFILEW;
+ {$EXTERNALSYM PEMRSETICMPROFILEW}
+ TEmrSetIcmProfile = EMRSETICMPROFILE;
+
+const
+ CREATECOLORSPACE_EMBEDED = $00000001;
+ {$EXTERNALSYM CREATECOLORSPACE_EMBEDED}
+
+type
+ PEmrCreateColorSpaceW = ^TEmrCreateColorSpaceW;
+ tagEMRCREATECOLORSPACEW = record
+ emr: EMR;
+ ihCS: DWORD; // ColorSpace handle index
+ lcs: LOGCOLORSPACEW; // Unicode version of logical color space structure
+ dwFlags: DWORD; // flags
+ cbData: DWORD; // size of raw source profile data if attached
+ Data: array [0..0] of BYTE; // Array size is cbData
+ end;
+ {$EXTERNALSYM tagEMRCREATECOLORSPACEW}
+ EMRCREATECOLORSPACEW = tagEMRCREATECOLORSPACEW;
+ {$EXTERNALSYM EMRCREATECOLORSPACEW}
+ TEmrCreateColorSpaceW = EMRCREATECOLORSPACEW;
+
+const
+ COLORMATCHTOTARGET_EMBEDED = $00000001;
+ {$EXTERNALSYM COLORMATCHTOTARGET_EMBEDED}
+
+type
+ PColorMatchToTarget = ^TColorMatchToTarget;
+ tagCOLORMATCHTOTARGET = record
+ emr: EMR;
+ dwAction: DWORD; // CS_ENABLE, CS_DISABLE or CS_DELETE_TRANSFORM
+ dwFlags: DWORD; // flags
+ cbName: DWORD; // Size of desired target profile name
+ cbData: DWORD; // Size of raw target profile data if attached
+ Data: array [0..0] of BYTE; // Array size is cbName + cbData
+ end;
+ {$EXTERNALSYM tagCOLORMATCHTOTARGET}
+ //COLORMATCHTOTARGET = tagCOLORMATCHTOTARGET;
+ //{$EXTERNALSYM COLORMATCHTOTARGET}
+ TColorMatchToTarget = tagCOLORMATCHTOTARGET;
+
+ PColorCorrectPalette = ^TColorCorrectPalette;
+ tagCOLORCORRECTPALETTE = record
+ emr: EMR;
+ ihPalette: DWORD; // Palette handle index
+ nFirstEntry: DWORD; // Index of first entry to correct
+ nPalEntries: DWORD; // Number of palette entries to correct
+ nReserved: DWORD; // Reserved
+ end;
+ {$EXTERNALSYM tagCOLORCORRECTPALETTE}
+ //COLORCORRECTPALETTE = tagCOLORCORRECTPALETTE;
+ //{$EXTERNALSYM COLORCORRECTPALETTE}
+ TColorCorrectPalette = tagCOLORCORRECTPALETTE;
+
+ PEmrAlphaBlend = ^TEmrAlphaBlend;
+ tagEMRALPHABLEND = record
+ emr: EMR;
+ rclBounds: RECTL; // Inclusive-inclusive bounds in device units
+ xDest: LONG;
+ yDest: LONG;
+ cxDest: LONG;
+ cyDest: LONG;
+ dwRop: DWORD;
+ xSrc: LONG;
+ ySrc: LONG;
+ xformSrc: XFORM; // Source DC transform
+ crBkColorSrc: COLORREF; // Source DC BkColor in RGB
+ iUsageSrc: DWORD; // Source bitmap info color table usage (DIB_RGB_COLORS)
+ offBmiSrc: DWORD; // Offset to the source BITMAPINFO structure
+ cbBmiSrc: DWORD; // Size of the source BITMAPINFO structure
+ offBitsSrc: DWORD; // Offset to the source bitmap bits
+ cbBitsSrc: DWORD; // Size of the source bitmap bits
+ cxSrc: LONG;
+ cySrc: LONG;
+ end;
+ {$EXTERNALSYM tagEMRALPHABLEND}
+ EMRALPHABLEND = tagEMRALPHABLEND;
+ {$EXTERNALSYM EMRALPHABLEND}
+ TEmrAlphaBlend = EMRALPHABLEND;
+
+ PEmrGradientFill = ^TEmrGradientFill;
+ tagEMRGRADIENTFILL = record
+ emr: EMR;
+ rclBounds: RECTL; // Inclusive-inclusive bounds in device units
+ nVer: DWORD;
+ nTri: DWORD;
+ ulMode: ULONG;
+ Ver: array [0..0] of TRIVERTEX;
+ end;
+ {$EXTERNALSYM tagEMRGRADIENTFILL}
+ EMRGRADIENTFILL = tagEMRGRADIENTFILL;
+ {$EXTERNALSYM EMRGRADIENTFILL}
+ TEmrGradientFill = EMRGRADIENTFILL;
+
+ PEmrTransparentBlt = ^TEmrTransparentBlt;
+ tagEMRTRANSPARENTBLT = record
+ emr: EMR;
+ rclBounds: RECTL; // Inclusive-inclusive bounds in device units
+ xDest: LONG;
+ yDest: LONG;
+ cxDest: LONG;
+ cyDest: LONG;
+ dwRop: DWORD;
+ xSrc: LONG;
+ ySrc: LONG;
+ xformSrc: XFORM; // Source DC transform
+ crBkColorSrc: COLORREF; // Source DC BkColor in RGB
+ iUsageSrc: DWORD; // Source bitmap info color table usage
+ // (DIB_RGB_COLORS)
+ offBmiSrc: DWORD; // Offset to the source BITMAPINFO structure
+ cbBmiSrc: DWORD; // Size of the source BITMAPINFO structure
+ offBitsSrc: DWORD; // Offset to the source bitmap bits
+ cbBitsSrc: DWORD; // Size of the source bitmap bits
+ cxSrc: LONG;
+ cySrc: LONG;
+ end;
+ {$EXTERNALSYM tagEMRTRANSPARENTBLT}
+ EMRTRANSPARENTBLT = tagEMRTRANSPARENTBLT;
+ {$EXTERNALSYM EMRTRANSPARENTBLT}
+ TEmrTransparentBlt = EMRTRANSPARENTBLT;
+
+const
+ GDICOMMENT_IDENTIFIER = $43494447;
+ {$EXTERNALSYM GDICOMMENT_IDENTIFIER}
+ GDICOMMENT_WINDOWS_METAFILE = DWORD($80000001);
+ {$EXTERNALSYM GDICOMMENT_WINDOWS_METAFILE}
+ GDICOMMENT_BEGINGROUP = $00000002;
+ {$EXTERNALSYM GDICOMMENT_BEGINGROUP}
+ GDICOMMENT_ENDGROUP = $00000003;
+ {$EXTERNALSYM GDICOMMENT_ENDGROUP}
+ GDICOMMENT_MULTIFORMATS = $40000004;
+ {$EXTERNALSYM GDICOMMENT_MULTIFORMATS}
+ EPS_SIGNATURE = $46535045;
+ {$EXTERNALSYM EPS_SIGNATURE}
+ GDICOMMENT_UNICODE_STRING = $00000040;
+ {$EXTERNALSYM GDICOMMENT_UNICODE_STRING}
+ GDICOMMENT_UNICODE_END = $00000080;
+ {$EXTERNALSYM GDICOMMENT_UNICODE_END}
+
+// OpenGL wgl prototypes
+
+function wglCopyContext(hglrcSrc, hglrcDest: HGLRC; mask: UINT): BOOL; stdcall;
+{$EXTERNALSYM wglCopyContext}
+function wglCreateContext(hdc: HDC): HGLRC; stdcall;
+{$EXTERNALSYM wglCreateContext}
+function wglCreateLayerContext(hdc: HDC; iLayerPlane: Integer): HGLRC; stdcall;
+{$EXTERNALSYM wglCreateLayerContext}
+function wglDeleteContext(hglrc: HGLRC): BOOL; stdcall;
+{$EXTERNALSYM wglDeleteContext}
+function wglGetCurrentContext: HGLRC; stdcall;
+{$EXTERNALSYM wglGetCurrentContext}
+function wglGetCurrentDC: HDC; stdcall;
+{$EXTERNALSYM wglGetCurrentDC}
+function wglGetProcAddress(lpszProc: LPCSTR): PROC; stdcall;
+{$EXTERNALSYM wglGetProcAddress}
+function wglMakeCurrent(hdc: HDC; hglrc: HGLRC): BOOL; stdcall;
+{$EXTERNALSYM wglMakeCurrent}
+function wglShareLists(hglrc1, hglrc2: HGLRC): BOOL; stdcall;
+{$EXTERNALSYM wglShareLists}
+
+function wglUseFontBitmapsA(hdc: HDC; first, count, listBase: DWORD): BOOL; stdcall;
+{$EXTERNALSYM wglUseFontBitmapsA}
+function wglUseFontBitmapsW(hdc: HDC; first, count, listBase: DWORD): BOOL; stdcall;
+{$EXTERNALSYM wglUseFontBitmapsW}
+function wglUseFontBitmaps(hdc: HDC; first, count, listBase: DWORD): BOOL; stdcall;
+{$EXTERNALSYM wglUseFontBitmaps}
+
+function SwapBuffers(hdc: HDC): BOOL; stdcall;
+{$EXTERNALSYM SwapBuffers}
+
+type
+ PPointFloat = ^TPointFloat;
+ _POINTFLOAT = record
+ x: FLOAT;
+ y: FLOAT;
+ end;
+ {$EXTERNALSYM _POINTFLOAT}
+ POINTFLOAT = _POINTFLOAT;
+ {$EXTERNALSYM POINTFLOAT}
+ TPointFloat = _POINTFLOAT;
+
+ PGlyphMetricsFloat = ^TGlyphMetricsFloat;
+ _GLYPHMETRICSFLOAT = record
+ gmfBlackBoxX: FLOAT;
+ gmfBlackBoxY: FLOAT;
+ gmfptGlyphOrigin: POINTFLOAT;
+ gmfCellIncX: FLOAT;
+ gmfCellIncY: FLOAT;
+ end;
+ {$EXTERNALSYM _GLYPHMETRICSFLOAT}
+ GLYPHMETRICSFLOAT = _GLYPHMETRICSFLOAT;
+ {$EXTERNALSYM GLYPHMETRICSFLOAT}
+ LPGLYPHMETRICSFLOAT = ^GLYPHMETRICSFLOAT;
+ {$EXTERNALSYM LPGLYPHMETRICSFLOAT}
+ TGlyphMetricsFloat = _GLYPHMETRICSFLOAT;
+
+const
+ WGL_FONT_LINES = 0;
+ {$EXTERNALSYM WGL_FONT_LINES}
+ WGL_FONT_POLYGONS = 1;
+ {$EXTERNALSYM WGL_FONT_POLYGONS}
+
+function wglUseFontOutlinesA(hdc: HDC; first, count, listBase: DWORD; deviation,
+ extrusion: FLOAT; format: Integer; lpgmf: LPGLYPHMETRICSFLOAT): BOOL; stdcall;
+{$EXTERNALSYM wglUseFontOutlinesA}
+function wglUseFontOutlinesW(hdc: HDC; first, count, listBase: DWORD; deviation,
+ extrusion: FLOAT; format: Integer; lpgmf: LPGLYPHMETRICSFLOAT): BOOL; stdcall;
+{$EXTERNALSYM wglUseFontOutlinesW}
+function wglUseFontOutlines(hdc: HDC; first, count, listBase: DWORD; deviation,
+ extrusion: FLOAT; format: Integer; lpgmf: LPGLYPHMETRICSFLOAT): BOOL; stdcall;
+{$EXTERNALSYM wglUseFontOutlines}
+
+// Layer plane descriptor
+
+type
+ PLayerPlaneDescriptor = ^TLayerPlaneDescriptor;
+ tagLAYERPLANEDESCRIPTOR = record
+ nSize: WORD;
+ nVersion: WORD;
+ dwFlags: DWORD;
+ iPixelType: BYTE;
+ cColorBits: BYTE;
+ cRedBits: BYTE;
+ cRedShift: BYTE;
+ cGreenBits: BYTE;
+ cGreenShift: BYTE;
+ cBlueBits: BYTE;
+ cBlueShift: BYTE;
+ cAlphaBits: BYTE;
+ cAlphaShift: BYTE;
+ cAccumBits: BYTE;
+ cAccumRedBits: BYTE;
+ cAccumGreenBits: BYTE;
+ cAccumBlueBits: BYTE;
+ cAccumAlphaBits: BYTE;
+ cDepthBits: BYTE;
+ cStencilBits: BYTE;
+ cAuxBuffers: BYTE;
+ iLayerPlane: BYTE;
+ bReserved: BYTE;
+ crTransparent: COLORREF;
+ end;
+ {$EXTERNALSYM tagLAYERPLANEDESCRIPTOR}
+ LAYERPLANEDESCRIPTOR = tagLAYERPLANEDESCRIPTOR;
+ {$EXTERNALSYM LAYERPLANEDESCRIPTOR}
+ LPLAYERPLANEDESCRIPTOR = ^LAYERPLANEDESCRIPTOR;
+ {$EXTERNALSYM LPLAYERPLANEDESCRIPTOR}
+ TLayerPlaneDescriptor = LAYERPLANEDESCRIPTOR;
+
+// LAYERPLANEDESCRIPTOR flags
+
+const
+ LPD_DOUBLEBUFFER = $00000001;
+ {$EXTERNALSYM LPD_DOUBLEBUFFER}
+ LPD_STEREO = $00000002;
+ {$EXTERNALSYM LPD_STEREO}
+ LPD_SUPPORT_GDI = $00000010;
+ {$EXTERNALSYM LPD_SUPPORT_GDI}
+ LPD_SUPPORT_OPENGL = $00000020;
+ {$EXTERNALSYM LPD_SUPPORT_OPENGL}
+ LPD_SHARE_DEPTH = $00000040;
+ {$EXTERNALSYM LPD_SHARE_DEPTH}
+ LPD_SHARE_STENCIL = $00000080;
+ {$EXTERNALSYM LPD_SHARE_STENCIL}
+ LPD_SHARE_ACCUM = $00000100;
+ {$EXTERNALSYM LPD_SHARE_ACCUM}
+ LPD_SWAP_EXCHANGE = $00000200;
+ {$EXTERNALSYM LPD_SWAP_EXCHANGE}
+ LPD_SWAP_COPY = $00000400;
+ {$EXTERNALSYM LPD_SWAP_COPY}
+ LPD_TRANSPARENT = $00001000;
+ {$EXTERNALSYM LPD_TRANSPARENT}
+
+ LPD_TYPE_RGBA = 0;
+ {$EXTERNALSYM LPD_TYPE_RGBA}
+ LPD_TYPE_COLORINDEX = 1;
+ {$EXTERNALSYM LPD_TYPE_COLORINDEX}
+
+// wglSwapLayerBuffers flags
+
+ WGL_SWAP_MAIN_PLANE = $00000001;
+ {$EXTERNALSYM WGL_SWAP_MAIN_PLANE}
+ WGL_SWAP_OVERLAY1 = $00000002;
+ {$EXTERNALSYM WGL_SWAP_OVERLAY1}
+ WGL_SWAP_OVERLAY2 = $00000004;
+ {$EXTERNALSYM WGL_SWAP_OVERLAY2}
+ WGL_SWAP_OVERLAY3 = $00000008;
+ {$EXTERNALSYM WGL_SWAP_OVERLAY3}
+ WGL_SWAP_OVERLAY4 = $00000010;
+ {$EXTERNALSYM WGL_SWAP_OVERLAY4}
+ WGL_SWAP_OVERLAY5 = $00000020;
+ {$EXTERNALSYM WGL_SWAP_OVERLAY5}
+ WGL_SWAP_OVERLAY6 = $00000040;
+ {$EXTERNALSYM WGL_SWAP_OVERLAY6}
+ WGL_SWAP_OVERLAY7 = $00000080;
+ {$EXTERNALSYM WGL_SWAP_OVERLAY7}
+ WGL_SWAP_OVERLAY8 = $00000100;
+ {$EXTERNALSYM WGL_SWAP_OVERLAY8}
+ WGL_SWAP_OVERLAY9 = $00000200;
+ {$EXTERNALSYM WGL_SWAP_OVERLAY9}
+ WGL_SWAP_OVERLAY10 = $00000400;
+ {$EXTERNALSYM WGL_SWAP_OVERLAY10}
+ WGL_SWAP_OVERLAY11 = $00000800;
+ {$EXTERNALSYM WGL_SWAP_OVERLAY11}
+ WGL_SWAP_OVERLAY12 = $00001000;
+ {$EXTERNALSYM WGL_SWAP_OVERLAY12}
+ WGL_SWAP_OVERLAY13 = $00002000;
+ {$EXTERNALSYM WGL_SWAP_OVERLAY13}
+ WGL_SWAP_OVERLAY14 = $00004000;
+ {$EXTERNALSYM WGL_SWAP_OVERLAY14}
+ WGL_SWAP_OVERLAY15 = $00008000;
+ {$EXTERNALSYM WGL_SWAP_OVERLAY15}
+ WGL_SWAP_UNDERLAY1 = $00010000;
+ {$EXTERNALSYM WGL_SWAP_UNDERLAY1}
+ WGL_SWAP_UNDERLAY2 = $00020000;
+ {$EXTERNALSYM WGL_SWAP_UNDERLAY2}
+ WGL_SWAP_UNDERLAY3 = $00040000;
+ {$EXTERNALSYM WGL_SWAP_UNDERLAY3}
+ WGL_SWAP_UNDERLAY4 = $00080000;
+ {$EXTERNALSYM WGL_SWAP_UNDERLAY4}
+ WGL_SWAP_UNDERLAY5 = $00100000;
+ {$EXTERNALSYM WGL_SWAP_UNDERLAY5}
+ WGL_SWAP_UNDERLAY6 = $00200000;
+ {$EXTERNALSYM WGL_SWAP_UNDERLAY6}
+ WGL_SWAP_UNDERLAY7 = $00400000;
+ {$EXTERNALSYM WGL_SWAP_UNDERLAY7}
+ WGL_SWAP_UNDERLAY8 = $00800000;
+ {$EXTERNALSYM WGL_SWAP_UNDERLAY8}
+ WGL_SWAP_UNDERLAY9 = $01000000;
+ {$EXTERNALSYM WGL_SWAP_UNDERLAY9}
+ WGL_SWAP_UNDERLAY10 = $02000000;
+ {$EXTERNALSYM WGL_SWAP_UNDERLAY10}
+ WGL_SWAP_UNDERLAY11 = $04000000;
+ {$EXTERNALSYM WGL_SWAP_UNDERLAY11}
+ WGL_SWAP_UNDERLAY12 = $08000000;
+ {$EXTERNALSYM WGL_SWAP_UNDERLAY12}
+ WGL_SWAP_UNDERLAY13 = $10000000;
+ {$EXTERNALSYM WGL_SWAP_UNDERLAY13}
+ WGL_SWAP_UNDERLAY14 = $20000000;
+ {$EXTERNALSYM WGL_SWAP_UNDERLAY14}
+ WGL_SWAP_UNDERLAY15 = $40000000;
+ {$EXTERNALSYM WGL_SWAP_UNDERLAY15}
+
+function wglDescribeLayerPlane(hdc: HDC; iPixelFormat, iLayerPlane: Integer;
+ nBytes: UINT; plpd: LPLAYERPLANEDESCRIPTOR): BOOL; stdcall;
+{$EXTERNALSYM wglDescribeLayerPlane}
+function wglSetLayerPaletteEntries(hdc: HDC; iLayerPlane, iStart, cEntries: Integer;
+ pcr: LPCOLORREF): Integer; stdcall;
+{$EXTERNALSYM wglSetLayerPaletteEntries}
+function wglGetLayerPaletteEntries(hdc: HDC; iLayerPlane, iStart, cEntries: Integer;
+ pcr: LPCOLORREF): Integer; stdcall;
+{$EXTERNALSYM wglGetLayerPaletteEntries}
+function wglRealizeLayerPalette(hdc: HDC; iLayerPlane: Integer; bRealize: BOOL): BOOL; stdcall;
+{$EXTERNALSYM wglRealizeLayerPalette}
+function wglSwapLayerBuffers(hdc: HDC; fuPlanes: UINT): BOOL; stdcall;
+{$EXTERNALSYM wglSwapLayerBuffers}
+
+type
+ PWglSwap = ^TWglSwap;
+ _WGLSWAP = record
+ hdc: HDC;
+ uiFlags: UINT;
+ end;
+ {$EXTERNALSYM _WGLSWAP}
+ WGLSWAP = _WGLSWAP;
+ {$EXTERNALSYM WGLSWAP}
+ LPWGLSWAP = ^WGLSWAP;
+ {$EXTERNALSYM LPWGLSWAP}
+ TWglSwap = _WGLSWAP;
+
+const
+ WGL_SWAPMULTIPLE_MAX = 16;
+ {$EXTERNALSYM WGL_SWAPMULTIPLE_MAX}
+
+function wglSwapMultipleBuffers(fuCount: UINT; lpBuffers: LPWGLSWAP): DWORD; stdcall;
+{$EXTERNALSYM wglSwapMultipleBuffers}
+
+implementation
+
+const
+ gdi32 = 'gdi32.dll';
+ msimg32 = 'msimg32.dll';
+ winspool32 = 'winspool32.drv';
+ opengl32 = 'opengl32.dll';
+ {$IFDEF UNICODE}
+ AWSuffix = 'W';
+ {$ELSE}
+ AWSuffix = 'A';
+ {$ENDIF UNICODE}
+
+function MAKEROP4(Fore, Back: DWORD): DWORD;
+begin
+ Result := ((Back shl 8) and DWORD($FF000000)) or Fore;
+end;
+
+function GetKValue(cmyk: COLORREF): BYTE;
+begin
+ Result := BYTE(cmyk);
+end;
+
+function GetYValue(cmyk: COLORREF): BYTE;
+begin
+ Result := BYTE(cmyk shr 8);
+end;
+
+function GetMValue(cmyk: COLORREF): BYTE;
+begin
+ Result := BYTE(cmyk shr 16);
+end;
+
+function GetCValue(cmyk: COLORREF): BYTE;
+begin
+ Result := BYTE(cmyk shr 24);
+end;
+
+function CMYK(c, m, y, k: BYTE): COLORREF;
+begin
+ Result := COLORREF(k or (y shl 8) or (m shl 16) or (c shl 24));
+end;
+
+function MAKEPOINTS(l: DWORD): POINTS;
+begin
+ Result.x := LOWORD(l);
+ Result.y := HIWORD(l);
+end;
+
+function RGB(r, g, b: BYTE): COLORREF;
+begin
+ Result := COLORREF(r or (g shl 8) or (b shl 16));
+end;
+
+function PALETTERGB(r, g, b: BYTE): COLORREF;
+begin
+ Result := $02000000 or RGB(r, g, b);
+end;
+
+function PALETTEINDEX(i: WORD): COLORREF;
+begin
+ Result := COLORREF($01000000 or DWORD(i));
+end;
+
+function GetRValue(rgb: COLORREF): BYTE;
+begin
+ Result := BYTE(RGB);
+end;
+
+function GetGValue(rgb: COLORREF): BYTE;
+begin
+ Result := BYTE(rgb shr 8);
+end;
+
+function GetBValue(rgb: COLORREF): BYTE;
+begin
+ Result := BYTE(rgb shr 16);
+end;
+
+{$IFDEF DYNAMIC_LINK}
+
+var
+ _AddFontResourceA: Pointer;
+
+function AddFontResourceA;
+begin
+ GetProcedureAddress(_AddFontResourceA, gdi32, 'AddFontResourceA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_AddFontResourceA]
+ end;
+end;
+
+var
+ _AddFontResourceW: Pointer;
+
+function AddFontResourceW;
+begin
+ GetProcedureAddress(_AddFontResourceW, gdi32, 'AddFontResourceW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_AddFontResourceW]
+ end;
+end;
+
+var
+ _AddFontResource: Pointer;
+
+function AddFontResource;
+begin
+ GetProcedureAddress(_AddFontResource, gdi32, 'AddFontResource' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_AddFontResource]
+ end;
+end;
+
+var
+ _AnimatePalette: Pointer;
+
+function AnimatePalette;
+begin
+ GetProcedureAddress(_AnimatePalette, gdi32, 'AnimatePalette');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_AnimatePalette]
+ end;
+end;
+
+var
+ _Arc: Pointer;
+
+function Arc;
+begin
+ GetProcedureAddress(_Arc, gdi32, 'Arc');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_Arc]
+ end;
+end;
+
+var
+ _BitBlt: Pointer;
+
+function BitBlt;
+begin
+ GetProcedureAddress(_BitBlt, gdi32, 'BitBlt');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_BitBlt]
+ end;
+end;
+
+var
+ _CancelDC: Pointer;
+
+function CancelDC;
+begin
+ GetProcedureAddress(_CancelDC, gdi32, 'CancelDC');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CancelDC]
+ end;
+end;
+
+var
+ _Chord: Pointer;
+
+function Chord;
+begin
+ GetProcedureAddress(_Chord, gdi32, 'Chord');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_Chord]
+ end;
+end;
+
+var
+ _ChoosePixelFormat: Pointer;
+
+function ChoosePixelFormat;
+begin
+ GetProcedureAddress(_ChoosePixelFormat, gdi32, 'ChoosePixelFormat');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ChoosePixelFormat]
+ end;
+end;
+
+var
+ _CloseMetaFile: Pointer;
+
+function CloseMetaFile;
+begin
+ GetProcedureAddress(_CloseMetaFile, gdi32, 'CloseMetaFile');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CloseMetaFile]
+ end;
+end;
+
+var
+ _CombineRgn: Pointer;
+
+function CombineRgn;
+begin
+ GetProcedureAddress(_CombineRgn, gdi32, 'CombineRgn');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CombineRgn]
+ end;
+end;
+
+var
+ _CopyMetaFileA: Pointer;
+
+function CopyMetaFileA;
+begin
+ GetProcedureAddress(_CopyMetaFileA, gdi32, 'CopyMetaFileA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CopyMetaFileA]
+ end;
+end;
+
+var
+ _CopyMetaFileW: Pointer;
+
+function CopyMetaFileW;
+begin
+ GetProcedureAddress(_CopyMetaFileW, gdi32, 'CopyMetaFileW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CopyMetaFileW]
+ end;
+end;
+
+var
+ _CopyMetaFile: Pointer;
+
+function CopyMetaFile;
+begin
+ GetProcedureAddress(_CopyMetaFile, gdi32, 'CopyMetaFile' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CopyMetaFile]
+ end;
+end;
+
+var
+ _CreateBitmap: Pointer;
+
+function CreateBitmap;
+begin
+ GetProcedureAddress(_CreateBitmap, gdi32, 'CreateBitmap');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreateBitmap]
+ end;
+end;
+
+var
+ _CreateBitmapIndirect: Pointer;
+
+function CreateBitmapIndirect;
+begin
+ GetProcedureAddress(_CreateBitmapIndirect, gdi32, 'CreateBitmapIndirect');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreateBitmapIndirect]
+ end;
+end;
+
+var
+ _CreateBrushIndirect: Pointer;
+
+function CreateBrushIndirect;
+begin
+ GetProcedureAddress(_CreateBrushIndirect, gdi32, 'CreateBrushIndirect');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreateBrushIndirect]
+ end;
+end;
+
+var
+ _CreateCompatibleBitmap: Pointer;
+
+function CreateCompatibleBitmap;
+begin
+ GetProcedureAddress(_CreateCompatibleBitmap, gdi32, 'CreateCompatibleBitmap');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreateCompatibleBitmap]
+ end;
+end;
+
+var
+ _CreateDiscardableBitmap: Pointer;
+
+function CreateDiscardableBitmap;
+begin
+ GetProcedureAddress(_CreateDiscardableBitmap, gdi32, 'CreateDiscardableBitmap');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreateDiscardableBitmap]
+ end;
+end;
+
+var
+ _CreateCompatibleDC: Pointer;
+
+function CreateCompatibleDC;
+begin
+ GetProcedureAddress(_CreateCompatibleDC, gdi32, 'CreateCompatibleDC');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreateCompatibleDC]
+ end;
+end;
+
+var
+ _CreateDCA: Pointer;
+
+function CreateDCA;
+begin
+ GetProcedureAddress(_CreateDCA, gdi32, 'CreateDCA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreateDCA]
+ end;
+end;
+
+var
+ _CreateDCW: Pointer;
+
+function CreateDCW;
+begin
+ GetProcedureAddress(_CreateDCW, gdi32, 'CreateDCW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreateDCW]
+ end;
+end;
+
+var
+ _CreateDC: Pointer;
+
+function CreateDC;
+begin
+ GetProcedureAddress(_CreateDC, gdi32, 'CreateDC' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreateDC]
+ end;
+end;
+
+var
+ _CreateDIBitmap: Pointer;
+
+function CreateDIBitmap;
+begin
+ GetProcedureAddress(_CreateDIBitmap, gdi32, 'CreateDIBitmap');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreateDIBitmap]
+ end;
+end;
+
+var
+ _CreateDIBPatternBrush: Pointer;
+
+function CreateDIBPatternBrush;
+begin
+ GetProcedureAddress(_CreateDIBPatternBrush, gdi32, 'CreateDIBPatternBrush');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreateDIBPatternBrush]
+ end;
+end;
+
+var
+ _CreateDIBPatternBrushPt: Pointer;
+
+function CreateDIBPatternBrushPt;
+begin
+ GetProcedureAddress(_CreateDIBPatternBrushPt, gdi32, 'CreateDIBPatternBrushPt');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreateDIBPatternBrushPt]
+ end;
+end;
+
+var
+ _CreateEllipticRgn: Pointer;
+
+function CreateEllipticRgn;
+begin
+ GetProcedureAddress(_CreateEllipticRgn, gdi32, 'CreateEllipticRgn');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreateEllipticRgn]
+ end;
+end;
+
+var
+ _CreateEllipticRgnIndirect: Pointer;
+
+function CreateEllipticRgnIndirect;
+begin
+ GetProcedureAddress(_CreateEllipticRgnIndirect, gdi32, 'CreateEllipticRgnIndirect');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreateEllipticRgnIndirect]
+ end;
+end;
+
+var
+ _CreateFontIndirectA: Pointer;
+
+function CreateFontIndirectA;
+begin
+ GetProcedureAddress(_CreateFontIndirectA, gdi32, 'CreateFontIndirectA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreateFontIndirectA]
+ end;
+end;
+
+var
+ _CreateFontIndirectW: Pointer;
+
+function CreateFontIndirectW;
+begin
+ GetProcedureAddress(_CreateFontIndirectW, gdi32, 'CreateFontIndirectW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreateFontIndirectW]
+ end;
+end;
+
+var
+ _CreateFontIndirect: Pointer;
+
+function CreateFontIndirect;
+begin
+ GetProcedureAddress(_CreateFontIndirect, gdi32, 'CreateFontIndirect' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreateFontIndirect]
+ end;
+end;
+
+var
+ _CreateFontA: Pointer;
+
+function CreateFontA;
+begin
+ GetProcedureAddress(_CreateFontA, gdi32, 'CreateFontA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreateFontA]
+ end;
+end;
+
+var
+ _CreateFontW: Pointer;
+
+function CreateFontW;
+begin
+ GetProcedureAddress(_CreateFontW, gdi32, 'CreateFontW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreateFontW]
+ end;
+end;
+
+var
+ _CreateFont: Pointer;
+
+function CreateFont;
+begin
+ GetProcedureAddress(_CreateFont, gdi32, 'CreateFont' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreateFont]
+ end;
+end;
+
+var
+ _CreateHatchBrush: Pointer;
+
+function CreateHatchBrush;
+begin
+ GetProcedureAddress(_CreateHatchBrush, gdi32, 'CreateHatchBrush');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreateHatchBrush]
+ end;
+end;
+
+var
+ _CreateICA: Pointer;
+
+function CreateICA;
+begin
+ GetProcedureAddress(_CreateICA, gdi32, 'CreateICA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreateICA]
+ end;
+end;
+
+var
+ _CreateICW: Pointer;
+
+function CreateICW;
+begin
+ GetProcedureAddress(_CreateICW, gdi32, 'CreateICW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreateICW]
+ end;
+end;
+
+var
+ _CreateIC: Pointer;
+
+function CreateIC;
+begin
+ GetProcedureAddress(_CreateIC, gdi32, 'CreateIC' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreateIC]
+ end;
+end;
+
+var
+ _CreateMetaFileA: Pointer;
+
+function CreateMetaFileA;
+begin
+ GetProcedureAddress(_CreateMetaFileA, gdi32, 'CreateMetaFileA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreateMetaFileA]
+ end;
+end;
+
+var
+ _CreateMetaFileW: Pointer;
+
+function CreateMetaFileW;
+begin
+ GetProcedureAddress(_CreateMetaFileW, gdi32, 'CreateMetaFileW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreateMetaFileW]
+ end;
+end;
+
+var
+ _CreateMetaFile: Pointer;
+
+function CreateMetaFile;
+begin
+ GetProcedureAddress(_CreateMetaFile, gdi32, 'CreateMetaFile' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreateMetaFile]
+ end;
+end;
+
+var
+ _CreatePalette: Pointer;
+
+function CreatePalette;
+begin
+ GetProcedureAddress(_CreatePalette, gdi32, 'CreatePalette');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreatePalette]
+ end;
+end;
+
+var
+ _CreatePen: Pointer;
+
+function CreatePen;
+begin
+ GetProcedureAddress(_CreatePen, gdi32, 'CreatePen');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreatePen]
+ end;
+end;
+
+var
+ _CreatePenIndirect: Pointer;
+
+function CreatePenIndirect;
+begin
+ GetProcedureAddress(_CreatePenIndirect, gdi32, 'CreatePenIndirect');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreatePenIndirect]
+ end;
+end;
+
+var
+ _CreatePolyPolygonRgn: Pointer;
+
+function CreatePolyPolygonRgn;
+begin
+ GetProcedureAddress(_CreatePolyPolygonRgn, gdi32, 'CreatePolyPolygonRgn');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreatePolyPolygonRgn]
+ end;
+end;
+
+var
+ _CreatePatternBrush: Pointer;
+
+function CreatePatternBrush;
+begin
+ GetProcedureAddress(_CreatePatternBrush, gdi32, 'CreatePatternBrush');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreatePatternBrush]
+ end;
+end;
+
+var
+ _CreateRectRgn: Pointer;
+
+function CreateRectRgn;
+begin
+ GetProcedureAddress(_CreateRectRgn, gdi32, 'CreateRectRgn');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreateRectRgn]
+ end;
+end;
+
+var
+ _CreateRectRgnIndirect: Pointer;
+
+function CreateRectRgnIndirect;
+begin
+ GetProcedureAddress(_CreateRectRgnIndirect, gdi32, 'CreateRectRgnIndirect');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreateRectRgnIndirect]
+ end;
+end;
+
+var
+ _CreateRoundRectRgn: Pointer;
+
+function CreateRoundRectRgn;
+begin
+ GetProcedureAddress(_CreateRoundRectRgn, gdi32, 'CreateRoundRectRgn');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreateRoundRectRgn]
+ end;
+end;
+
+var
+ _CreateScalableFontResourceA: Pointer;
+
+function CreateScalableFontResourceA;
+begin
+ GetProcedureAddress(_CreateScalableFontResourceA, gdi32, 'CreateScalableFontResourceA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreateScalableFontResourceA]
+ end;
+end;
+
+var
+ _CreateScalableFontResourceW: Pointer;
+
+function CreateScalableFontResourceW;
+begin
+ GetProcedureAddress(_CreateScalableFontResourceW, gdi32, 'CreateScalableFontResourceW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreateScalableFontResourceW]
+ end;
+end;
+
+var
+ _CreateScalableFontResource: Pointer;
+
+function CreateScalableFontResource;
+begin
+ GetProcedureAddress(_CreateScalableFontResource, gdi32, 'CreateScalableFontResource' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreateScalableFontResource]
+ end;
+end;
+
+var
+ _CreateSolidBrush: Pointer;
+
+function CreateSolidBrush;
+begin
+ GetProcedureAddress(_CreateSolidBrush, gdi32, 'CreateSolidBrush');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreateSolidBrush]
+ end;
+end;
+
+var
+ _DeleteDC: Pointer;
+
+function DeleteDC;
+begin
+ GetProcedureAddress(_DeleteDC, gdi32, 'DeleteDC');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DeleteDC]
+ end;
+end;
+
+var
+ _DeleteMetaFile: Pointer;
+
+function DeleteMetaFile;
+begin
+ GetProcedureAddress(_DeleteMetaFile, gdi32, 'DeleteMetaFile');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DeleteMetaFile]
+ end;
+end;
+
+var
+ _DeleteObject: Pointer;
+
+function DeleteObject;
+begin
+ GetProcedureAddress(_DeleteObject, gdi32, 'DeleteObject');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DeleteObject]
+ end;
+end;
+
+var
+ _DescribePixelFormat: Pointer;
+
+function DescribePixelFormat;
+begin
+ GetProcedureAddress(_DescribePixelFormat, gdi32, 'DescribePixelFormat');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DescribePixelFormat]
+ end;
+end;
+
+var
+ _DeviceCapabilitiesA: Pointer;
+
+function DeviceCapabilitiesA;
+begin
+ GetProcedureAddress(_DeviceCapabilitiesA, winspool32, 'DeviceCapabilitiesA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DeviceCapabilitiesA]
+ end;
+end;
+
+var
+ _DeviceCapabilitiesW: Pointer;
+
+function DeviceCapabilitiesW;
+begin
+ GetProcedureAddress(_DeviceCapabilitiesW, winspool32, 'DeviceCapabilitiesW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DeviceCapabilitiesW]
+ end;
+end;
+
+var
+ _DeviceCapabilities: Pointer;
+
+function DeviceCapabilities;
+begin
+ GetProcedureAddress(_DeviceCapabilities, winspool32, 'DeviceCapabilities' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DeviceCapabilities]
+ end;
+end;
+
+var
+ _DrawEscape: Pointer;
+
+function DrawEscape;
+begin
+ GetProcedureAddress(_DrawEscape, gdi32, 'DrawEscape');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DrawEscape]
+ end;
+end;
+
+var
+ _Ellipse: Pointer;
+
+function Ellipse;
+begin
+ GetProcedureAddress(_Ellipse, gdi32, 'Ellipse');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_Ellipse]
+ end;
+end;
+
+var
+ _EnumFontFamiliesExA: Pointer;
+
+function EnumFontFamiliesExA;
+begin
+ GetProcedureAddress(_EnumFontFamiliesExA, gdi32, 'EnumFontFamiliesExA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_EnumFontFamiliesExA]
+ end;
+end;
+
+var
+ _EnumFontFamiliesExW: Pointer;
+
+function EnumFontFamiliesExW;
+begin
+ GetProcedureAddress(_EnumFontFamiliesExW, gdi32, 'EnumFontFamiliesExW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_EnumFontFamiliesExW]
+ end;
+end;
+
+var
+ _EnumFontFamiliesEx: Pointer;
+
+function EnumFontFamiliesEx;
+begin
+ GetProcedureAddress(_EnumFontFamiliesEx, gdi32, 'EnumFontFamiliesEx' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_EnumFontFamiliesEx]
+ end;
+end;
+
+var
+ _EnumFontFamiliesA: Pointer;
+
+function EnumFontFamiliesA;
+begin
+ GetProcedureAddress(_EnumFontFamiliesA, gdi32, 'EnumFontFamiliesA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_EnumFontFamiliesA]
+ end;
+end;
+
+var
+ _EnumFontFamiliesW: Pointer;
+
+function EnumFontFamiliesW;
+begin
+ GetProcedureAddress(_EnumFontFamiliesW, gdi32, 'EnumFontFamiliesW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_EnumFontFamiliesW]
+ end;
+end;
+
+var
+ _EnumFontFamilies: Pointer;
+
+function EnumFontFamilies;
+begin
+ GetProcedureAddress(_EnumFontFamilies, gdi32, 'EnumFontFamilies' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_EnumFontFamilies]
+ end;
+end;
+
+var
+ _EnumFontsA: Pointer;
+
+function EnumFontsA;
+begin
+ GetProcedureAddress(_EnumFontsA, gdi32, 'EnumFontsA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_EnumFontsA]
+ end;
+end;
+
+var
+ _EnumFontsW: Pointer;
+
+function EnumFontsW;
+begin
+ GetProcedureAddress(_EnumFontsW, gdi32, 'EnumFontsW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_EnumFontsW]
+ end;
+end;
+
+var
+ _EnumFonts: Pointer;
+
+function EnumFonts;
+begin
+ GetProcedureAddress(_EnumFonts, gdi32, 'EnumFonts' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_EnumFonts]
+ end;
+end;
+
+var
+ _EnumObjects: Pointer;
+
+function EnumObjects;
+begin
+ GetProcedureAddress(_EnumObjects, gdi32, 'EnumObjects');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_EnumObjects]
+ end;
+end;
+
+var
+ _EqualRgn: Pointer;
+
+function EqualRgn;
+begin
+ GetProcedureAddress(_EqualRgn, gdi32, 'EqualRgn');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_EqualRgn]
+ end;
+end;
+
+var
+ _Escape: Pointer;
+
+function Escape;
+begin
+ GetProcedureAddress(_Escape, gdi32, 'Escape');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_Escape]
+ end;
+end;
+
+var
+ _ExtEscape: Pointer;
+
+function ExtEscape;
+begin
+ GetProcedureAddress(_ExtEscape, gdi32, 'ExtEscape');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ExtEscape]
+ end;
+end;
+
+var
+ _ExcludeClipRect: Pointer;
+
+function ExcludeClipRect;
+begin
+ GetProcedureAddress(_ExcludeClipRect, gdi32, 'ExcludeClipRect');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ExcludeClipRect]
+ end;
+end;
+
+var
+ _ExtCreateRegion: Pointer;
+
+function ExtCreateRegion;
+begin
+ GetProcedureAddress(_ExtCreateRegion, gdi32, 'ExtCreateRegion');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ExtCreateRegion]
+ end;
+end;
+
+var
+ _ExtFloodFill: Pointer;
+
+function ExtFloodFill;
+begin
+ GetProcedureAddress(_ExtFloodFill, gdi32, 'ExtFloodFill');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ExtFloodFill]
+ end;
+end;
+
+var
+ _FillRgn: Pointer;
+
+function FillRgn;
+begin
+ GetProcedureAddress(_FillRgn, gdi32, 'FillRgn');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_FillRgn]
+ end;
+end;
+
+var
+ _FloodFill: Pointer;
+
+function FloodFill;
+begin
+ GetProcedureAddress(_FloodFill, gdi32, 'FloodFill');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_FloodFill]
+ end;
+end;
+
+var
+ _FrameRgn: Pointer;
+
+function FrameRgn;
+begin
+ GetProcedureAddress(_FrameRgn, gdi32, 'FrameRgn');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_FrameRgn]
+ end;
+end;
+
+var
+ _GetROP2: Pointer;
+
+function GetROP2;
+begin
+ GetProcedureAddress(_GetROP2, gdi32, 'GetROP2');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetROP2]
+ end;
+end;
+
+var
+ _GetAspectRatioFilterEx: Pointer;
+
+function GetAspectRatioFilterEx;
+begin
+ GetProcedureAddress(_GetAspectRatioFilterEx, gdi32, 'GetAspectRatioFilterEx');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetAspectRatioFilterEx]
+ end;
+end;
+
+var
+ _GetBkColor: Pointer;
+
+function GetBkColor;
+begin
+ GetProcedureAddress(_GetBkColor, gdi32, 'GetBkColor');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetBkColor]
+ end;
+end;
+
+var
+ _GetDCBrushColor: Pointer;
+
+function GetDCBrushColor;
+begin
+ GetProcedureAddress(_GetDCBrushColor, gdi32, 'GetDCBrushColor');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetDCBrushColor]
+ end;
+end;
+
+var
+ _GetDCPenColor: Pointer;
+
+function GetDCPenColor;
+begin
+ GetProcedureAddress(_GetDCPenColor, gdi32, 'GetDCPenColor');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetDCPenColor]
+ end;
+end;
+
+var
+ _GetBkMode: Pointer;
+
+function GetBkMode;
+begin
+ GetProcedureAddress(_GetBkMode, gdi32, 'GetBkMode');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetBkMode]
+ end;
+end;
+
+var
+ _GetBitmapBits: Pointer;
+
+function GetBitmapBits;
+begin
+ GetProcedureAddress(_GetBitmapBits, gdi32, 'GetBitmapBits');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetBitmapBits]
+ end;
+end;
+
+var
+ _GetBitmapDimensionEx: Pointer;
+
+function GetBitmapDimensionEx;
+begin
+ GetProcedureAddress(_GetBitmapDimensionEx, gdi32, 'GetBitmapDimensionEx');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetBitmapDimensionEx]
+ end;
+end;
+
+var
+ _GetBoundsRect: Pointer;
+
+function GetBoundsRect;
+begin
+ GetProcedureAddress(_GetBoundsRect, gdi32, 'GetBoundsRect');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetBoundsRect]
+ end;
+end;
+
+var
+ _GetBrushOrgEx: Pointer;
+
+function GetBrushOrgEx;
+begin
+ GetProcedureAddress(_GetBrushOrgEx, gdi32, 'GetBrushOrgEx');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetBrushOrgEx]
+ end;
+end;
+
+var
+ _GetCharWidthA: Pointer;
+
+function GetCharWidthA;
+begin
+ GetProcedureAddress(_GetCharWidthA, gdi32, 'GetCharWidthA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetCharWidthA]
+ end;
+end;
+
+var
+ _GetCharWidthW: Pointer;
+
+function GetCharWidthW;
+begin
+ GetProcedureAddress(_GetCharWidthW, gdi32, 'GetCharWidthW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetCharWidthW]
+ end;
+end;
+
+var
+ _GetCharWidth: Pointer;
+
+function GetCharWidth;
+begin
+ GetProcedureAddress(_GetCharWidth, gdi32, 'GetCharWidth' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetCharWidth]
+ end;
+end;
+
+var
+ _GetCharWidth32A: Pointer;
+
+function GetCharWidth32A;
+begin
+ GetProcedureAddress(_GetCharWidth32A, gdi32, 'GetCharWidth32A');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetCharWidth32A]
+ end;
+end;
+
+var
+ _GetCharWidth32W: Pointer;
+
+function GetCharWidth32W;
+begin
+ GetProcedureAddress(_GetCharWidth32W, gdi32, 'GetCharWidth32W');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetCharWidth32W]
+ end;
+end;
+
+var
+ _GetCharWidth32: Pointer;
+
+function GetCharWidth32;
+begin
+ GetProcedureAddress(_GetCharWidth32, gdi32, 'GetCharWidth32' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetCharWidth32]
+ end;
+end;
+
+var
+ _GetCharWidthFloatA: Pointer;
+
+function GetCharWidthFloatA;
+begin
+ GetProcedureAddress(_GetCharWidthFloatA, gdi32, 'GetCharWidthFloatA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetCharWidthFloatA]
+ end;
+end;
+
+var
+ _GetCharWidthFloatW: Pointer;
+
+function GetCharWidthFloatW;
+begin
+ GetProcedureAddress(_GetCharWidthFloatW, gdi32, 'GetCharWidthFloatW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetCharWidthFloatW]
+ end;
+end;
+
+var
+ _GetCharWidthFloat: Pointer;
+
+function GetCharWidthFloat;
+begin
+ GetProcedureAddress(_GetCharWidthFloat, gdi32, 'GetCharWidthFloat' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetCharWidthFloat]
+ end;
+end;
+
+var
+ _GetCharABCWidthsA: Pointer;
+
+function GetCharABCWidthsA;
+begin
+ GetProcedureAddress(_GetCharABCWidthsA, gdi32, 'GetCharABCWidthsA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetCharABCWidthsA]
+ end;
+end;
+
+var
+ _GetCharABCWidthsW: Pointer;
+
+function GetCharABCWidthsW;
+begin
+ GetProcedureAddress(_GetCharABCWidthsW, gdi32, 'GetCharABCWidthsW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetCharABCWidthsW]
+ end;
+end;
+
+var
+ _GetCharABCWidths: Pointer;
+
+function GetCharABCWidths;
+begin
+ GetProcedureAddress(_GetCharABCWidths, gdi32, 'GetCharABCWidths' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetCharABCWidths]
+ end;
+end;
+
+var
+ _GetCharABCWidthsFloatA: Pointer;
+
+function GetCharABCWidthsFloatA;
+begin
+ GetProcedureAddress(_GetCharABCWidthsFloatA, gdi32, 'GetCharABCWidthsFloatA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetCharABCWidthsFloatA]
+ end;
+end;
+
+var
+ _GetCharABCWidthsFloatW: Pointer;
+
+function GetCharABCWidthsFloatW;
+begin
+ GetProcedureAddress(_GetCharABCWidthsFloatW, gdi32, 'GetCharABCWidthsFloatW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetCharABCWidthsFloatW]
+ end;
+end;
+
+var
+ _GetCharABCWidthsFloat: Pointer;
+
+function GetCharABCWidthsFloat;
+begin
+ GetProcedureAddress(_GetCharABCWidthsFloat, gdi32, 'GetCharABCWidthsFloat' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetCharABCWidthsFloat]
+ end;
+end;
+
+var
+ _GetClipBox: Pointer;
+
+function GetClipBox;
+begin
+ GetProcedureAddress(_GetClipBox, gdi32, 'GetClipBox');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetClipBox]
+ end;
+end;
+
+var
+ _GetClipRgn: Pointer;
+
+function GetClipRgn;
+begin
+ GetProcedureAddress(_GetClipRgn, gdi32, 'GetClipRgn');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetClipRgn]
+ end;
+end;
+
+var
+ _GetMetaRgn: Pointer;
+
+function GetMetaRgn;
+begin
+ GetProcedureAddress(_GetMetaRgn, gdi32, 'GetMetaRgn');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetMetaRgn]
+ end;
+end;
+
+var
+ _GetCurrentObject: Pointer;
+
+function GetCurrentObject;
+begin
+ GetProcedureAddress(_GetCurrentObject, gdi32, 'GetCurrentObject');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetCurrentObject]
+ end;
+end;
+
+var
+ _GetCurrentPositionEx: Pointer;
+
+function GetCurrentPositionEx;
+begin
+ GetProcedureAddress(_GetCurrentPositionEx, gdi32, 'GetCurrentPositionEx');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetCurrentPositionEx]
+ end;
+end;
+
+var
+ _GetDeviceCaps: Pointer;
+
+function GetDeviceCaps;
+begin
+ GetProcedureAddress(_GetDeviceCaps, gdi32, 'GetDeviceCaps');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetDeviceCaps]
+ end;
+end;
+
+var
+ _GetDIBits: Pointer;
+
+function GetDIBits;
+begin
+ GetProcedureAddress(_GetDIBits, gdi32, 'GetDIBits');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetDIBits]
+ end;
+end;
+
+var
+ _GetFontData: Pointer;
+
+function GetFontData;
+begin
+ GetProcedureAddress(_GetFontData, gdi32, 'GetFontData');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetFontData]
+ end;
+end;
+
+var
+ _GetGlyphOutlineA: Pointer;
+
+function GetGlyphOutlineA;
+begin
+ GetProcedureAddress(_GetGlyphOutlineA, gdi32, 'GetGlyphOutlineA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetGlyphOutlineA]
+ end;
+end;
+
+var
+ _GetGlyphOutlineW: Pointer;
+
+function GetGlyphOutlineW;
+begin
+ GetProcedureAddress(_GetGlyphOutlineW, gdi32, 'GetGlyphOutlineW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetGlyphOutlineW]
+ end;
+end;
+
+var
+ _GetGlyphOutline: Pointer;
+
+function GetGlyphOutline;
+begin
+ GetProcedureAddress(_GetGlyphOutline, gdi32, 'GetGlyphOutline' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetGlyphOutline]
+ end;
+end;
+
+var
+ _GetGraphicsMode: Pointer;
+
+function GetGraphicsMode;
+begin
+ GetProcedureAddress(_GetGraphicsMode, gdi32, 'GetGraphicsMode');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetGraphicsMode]
+ end;
+end;
+
+var
+ _GetMapMode: Pointer;
+
+function GetMapMode;
+begin
+ GetProcedureAddress(_GetMapMode, gdi32, 'GetMapMode');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetMapMode]
+ end;
+end;
+
+var
+ _GetMetaFileBitsEx: Pointer;
+
+function GetMetaFileBitsEx;
+begin
+ GetProcedureAddress(_GetMetaFileBitsEx, gdi32, 'GetMetaFileBitsEx');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetMetaFileBitsEx]
+ end;
+end;
+
+var
+ _GetMetaFileA: Pointer;
+
+function GetMetaFileA;
+begin
+ GetProcedureAddress(_GetMetaFileA, gdi32, 'GetMetaFileA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetMetaFileA]
+ end;
+end;
+
+var
+ _GetMetaFileW: Pointer;
+
+function GetMetaFileW;
+begin
+ GetProcedureAddress(_GetMetaFileW, gdi32, 'GetMetaFileW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetMetaFileW]
+ end;
+end;
+
+var
+ _GetMetaFile: Pointer;
+
+function GetMetaFile;
+begin
+ GetProcedureAddress(_GetMetaFile, gdi32, 'GetMetaFile' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetMetaFile]
+ end;
+end;
+
+var
+ _GetNearestColor: Pointer;
+
+function GetNearestColor;
+begin
+ GetProcedureAddress(_GetNearestColor, gdi32, 'GetNearestColor');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetNearestColor]
+ end;
+end;
+
+var
+ _GetNearestPaletteIndex: Pointer;
+
+function GetNearestPaletteIndex;
+begin
+ GetProcedureAddress(_GetNearestPaletteIndex, gdi32, 'GetNearestPaletteIndex');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetNearestPaletteIndex]
+ end;
+end;
+
+var
+ _GetObjectType: Pointer;
+
+function GetObjectType;
+begin
+ GetProcedureAddress(_GetObjectType, gdi32, 'GetObjectType');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetObjectType]
+ end;
+end;
+
+var
+ _GetOutlineTextMetricsA: Pointer;
+
+function GetOutlineTextMetricsA;
+begin
+ GetProcedureAddress(_GetOutlineTextMetricsA, gdi32, 'GetOutlineTextMetricsA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetOutlineTextMetricsA]
+ end;
+end;
+
+var
+ _GetOutlineTextMetricsW: Pointer;
+
+function GetOutlineTextMetricsW;
+begin
+ GetProcedureAddress(_GetOutlineTextMetricsW, gdi32, 'GetOutlineTextMetricsW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetOutlineTextMetricsW]
+ end;
+end;
+
+var
+ _GetOutlineTextMetrics: Pointer;
+
+function GetOutlineTextMetrics;
+begin
+ GetProcedureAddress(_GetOutlineTextMetrics, gdi32, 'GetOutlineTextMetrics' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetOutlineTextMetrics]
+ end;
+end;
+
+var
+ _GetPaletteEntries: Pointer;
+
+function GetPaletteEntries;
+begin
+ GetProcedureAddress(_GetPaletteEntries, gdi32, 'GetPaletteEntries');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetPaletteEntries]
+ end;
+end;
+
+var
+ _GetPixel: Pointer;
+
+function GetPixel;
+begin
+ GetProcedureAddress(_GetPixel, gdi32, 'GetPixel');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetPixel]
+ end;
+end;
+
+var
+ _GetPixelFormat: Pointer;
+
+function GetPixelFormat;
+begin
+ GetProcedureAddress(_GetPixelFormat, gdi32, 'GetPixelFormat');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetPixelFormat]
+ end;
+end;
+
+var
+ _GetPolyFillMode: Pointer;
+
+function GetPolyFillMode;
+begin
+ GetProcedureAddress(_GetPolyFillMode, gdi32, 'GetPolyFillMode');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetPolyFillMode]
+ end;
+end;
+
+var
+ _GetRasterizerCaps: Pointer;
+
+function GetRasterizerCaps;
+begin
+ GetProcedureAddress(_GetRasterizerCaps, gdi32, 'GetRasterizerCaps');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetRasterizerCaps]
+ end;
+end;
+
+var
+ _GetRandomRgn: Pointer;
+
+function GetRandomRgn;
+begin
+ GetProcedureAddress(_GetRandomRgn, gdi32, 'GetRandomRgn');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetRandomRgn]
+ end;
+end;
+
+var
+ _GetRegionData: Pointer;
+
+function GetRegionData;
+begin
+ GetProcedureAddress(_GetRegionData, gdi32, 'GetRegionData');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetRegionData]
+ end;
+end;
+
+var
+ _GetRgnBox: Pointer;
+
+function GetRgnBox;
+begin
+ GetProcedureAddress(_GetRgnBox, gdi32, 'GetRgnBox');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetRgnBox]
+ end;
+end;
+
+var
+ _GetStockObject: Pointer;
+
+function GetStockObject;
+begin
+ GetProcedureAddress(_GetStockObject, gdi32, 'GetStockObject');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetStockObject]
+ end;
+end;
+
+var
+ _GetStretchBltMode: Pointer;
+
+function GetStretchBltMode;
+begin
+ GetProcedureAddress(_GetStretchBltMode, gdi32, 'GetStretchBltMode');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetStretchBltMode]
+ end;
+end;
+
+var
+ _GetSystemPaletteEntries: Pointer;
+
+function GetSystemPaletteEntries;
+begin
+ GetProcedureAddress(_GetSystemPaletteEntries, gdi32, 'GetSystemPaletteEntries');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetSystemPaletteEntries]
+ end;
+end;
+
+var
+ _GetSystemPaletteUse: Pointer;
+
+function GetSystemPaletteUse;
+begin
+ GetProcedureAddress(_GetSystemPaletteUse, gdi32, 'GetSystemPaletteUse');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetSystemPaletteUse]
+ end;
+end;
+
+var
+ _GetTextCharacterExtra: Pointer;
+
+function GetTextCharacterExtra;
+begin
+ GetProcedureAddress(_GetTextCharacterExtra, gdi32, 'GetTextCharacterExtra');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetTextCharacterExtra]
+ end;
+end;
+
+var
+ _GetTextAlign: Pointer;
+
+function GetTextAlign;
+begin
+ GetProcedureAddress(_GetTextAlign, gdi32, 'GetTextAlign');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetTextAlign]
+ end;
+end;
+
+var
+ _GetTextColor: Pointer;
+
+function GetTextColor;
+begin
+ GetProcedureAddress(_GetTextColor, gdi32, 'GetTextColor');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetTextColor]
+ end;
+end;
+
+var
+ _GetTextExtentPointA: Pointer;
+
+function GetTextExtentPointA;
+begin
+ GetProcedureAddress(_GetTextExtentPointA, gdi32, 'GetTextExtentPointA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetTextExtentPointA]
+ end;
+end;
+
+var
+ _GetTextExtentPointW: Pointer;
+
+function GetTextExtentPointW;
+begin
+ GetProcedureAddress(_GetTextExtentPointW, gdi32, 'GetTextExtentPointW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetTextExtentPointW]
+ end;
+end;
+
+var
+ _GetTextExtentPoint: Pointer;
+
+function GetTextExtentPoint;
+begin
+ GetProcedureAddress(_GetTextExtentPoint, gdi32, 'GetTextExtentPoint' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetTextExtentPoint]
+ end;
+end;
+
+var
+ _GetTextExtentPoint32A: Pointer;
+
+function GetTextExtentPoint32A;
+begin
+ GetProcedureAddress(_GetTextExtentPoint32A, gdi32, 'GetTextExtentPoint32A');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetTextExtentPoint32A]
+ end;
+end;
+
+var
+ _GetTextExtentPoint32W: Pointer;
+
+function GetTextExtentPoint32W;
+begin
+ GetProcedureAddress(_GetTextExtentPoint32W, gdi32, 'GetTextExtentPoint32W');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetTextExtentPoint32W]
+ end;
+end;
+
+var
+ _GetTextExtentPoint32: Pointer;
+
+function GetTextExtentPoint32;
+begin
+ GetProcedureAddress(_GetTextExtentPoint32, gdi32, 'GetTextExtentPoint32' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetTextExtentPoint32]
+ end;
+end;
+
+var
+ _GetTextExtentExPointA: Pointer;
+
+function GetTextExtentExPointA;
+begin
+ GetProcedureAddress(_GetTextExtentExPointA, gdi32, 'GetTextExtentExPointA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetTextExtentExPointA]
+ end;
+end;
+
+var
+ _GetTextExtentExPointW: Pointer;
+
+function GetTextExtentExPointW;
+begin
+ GetProcedureAddress(_GetTextExtentExPointW, gdi32, 'GetTextExtentExPointW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetTextExtentExPointW]
+ end;
+end;
+
+var
+ _GetTextExtentExPoint: Pointer;
+
+function GetTextExtentExPoint;
+begin
+ GetProcedureAddress(_GetTextExtentExPoint, gdi32, 'GetTextExtentExPoint' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetTextExtentExPoint]
+ end;
+end;
+
+var
+ _GetTextCharset: Pointer;
+
+function GetTextCharset;
+begin
+ GetProcedureAddress(_GetTextCharset, gdi32, 'GetTextCharset');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetTextCharset]
+ end;
+end;
+
+var
+ _GetTextCharsetInfo: Pointer;
+
+function GetTextCharsetInfo;
+begin
+ GetProcedureAddress(_GetTextCharsetInfo, gdi32, 'GetTextCharsetInfo');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetTextCharsetInfo]
+ end;
+end;
+
+var
+ _TranslateCharsetInfo: Pointer;
+
+function TranslateCharsetInfo;
+begin
+ GetProcedureAddress(_TranslateCharsetInfo, gdi32, 'TranslateCharsetInfo');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_TranslateCharsetInfo]
+ end;
+end;
+
+var
+ _GetFontLanguageInfo: Pointer;
+
+function GetFontLanguageInfo;
+begin
+ GetProcedureAddress(_GetFontLanguageInfo, gdi32, 'GetFontLanguageInfo');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetFontLanguageInfo]
+ end;
+end;
+
+var
+ _GetCharacterPlacementA: Pointer;
+
+function GetCharacterPlacementA;
+begin
+ GetProcedureAddress(_GetCharacterPlacementA, gdi32, 'GetCharacterPlacementA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetCharacterPlacementA]
+ end;
+end;
+
+var
+ _GetCharacterPlacementW: Pointer;
+
+function GetCharacterPlacementW;
+begin
+ GetProcedureAddress(_GetCharacterPlacementW, gdi32, 'GetCharacterPlacementW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetCharacterPlacementW]
+ end;
+end;
+
+var
+ _GetCharacterPlacement: Pointer;
+
+function GetCharacterPlacement;
+begin
+ GetProcedureAddress(_GetCharacterPlacement, gdi32, 'GetCharacterPlacement' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetCharacterPlacement]
+ end;
+end;
+
+var
+ _GetFontUnicodeRanges: Pointer;
+
+function GetFontUnicodeRanges;
+begin
+ GetProcedureAddress(_GetFontUnicodeRanges, gdi32, 'GetFontUnicodeRanges');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetFontUnicodeRanges]
+ end;
+end;
+
+var
+ _GetGlyphIndicesA: Pointer;
+
+function GetGlyphIndicesA;
+begin
+ GetProcedureAddress(_GetGlyphIndicesA, gdi32, 'GetGlyphIndicesA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetGlyphIndicesA]
+ end;
+end;
+
+var
+ _GetGlyphIndicesW: Pointer;
+
+function GetGlyphIndicesW;
+begin
+ GetProcedureAddress(_GetGlyphIndicesW, gdi32, 'GetGlyphIndicesW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetGlyphIndicesW]
+ end;
+end;
+
+var
+ _GetGlyphIndices: Pointer;
+
+function GetGlyphIndices;
+begin
+ GetProcedureAddress(_GetGlyphIndices, gdi32, 'GetGlyphIndices' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetGlyphIndices]
+ end;
+end;
+
+var
+ _GetTextExtentPointI: Pointer;
+
+function GetTextExtentPointI;
+begin
+ GetProcedureAddress(_GetTextExtentPointI, gdi32, 'GetTextExtentPointI');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetTextExtentPointI]
+ end;
+end;
+
+var
+ _GetTextExtentExPointI: Pointer;
+
+function GetTextExtentExPointI;
+begin
+ GetProcedureAddress(_GetTextExtentExPointI, gdi32, 'GetTextExtentExPointI');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetTextExtentExPointI]
+ end;
+end;
+
+var
+ _GetCharWidthI: Pointer;
+
+function GetCharWidthI;
+begin
+ GetProcedureAddress(_GetCharWidthI, gdi32, 'GetCharWidthI');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetCharWidthI]
+ end;
+end;
+
+var
+ _GetCharABCWidthsI: Pointer;
+
+function GetCharABCWidthsI;
+begin
+ GetProcedureAddress(_GetCharABCWidthsI, gdi32, 'GetCharABCWidthsI');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetCharABCWidthsI]
+ end;
+end;
+
+var
+ _AddFontResourceExA: Pointer;
+
+function AddFontResourceExA;
+begin
+ GetProcedureAddress(_AddFontResourceExA, gdi32, 'AddFontResourceExA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_AddFontResourceExA]
+ end;
+end;
+
+var
+ _AddFontResourceExW: Pointer;
+
+function AddFontResourceExW;
+begin
+ GetProcedureAddress(_AddFontResourceExW, gdi32, 'AddFontResourceExW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_AddFontResourceExW]
+ end;
+end;
+
+var
+ _AddFontResourceEx: Pointer;
+
+function AddFontResourceEx;
+begin
+ GetProcedureAddress(_AddFontResourceEx, gdi32, 'AddFontResourceEx' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_AddFontResourceEx]
+ end;
+end;
+
+var
+ _RemoveFontResourceExA: Pointer;
+
+function RemoveFontResourceExA;
+begin
+ GetProcedureAddress(_RemoveFontResourceExA, gdi32, 'RemoveFontResourceExA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RemoveFontResourceExA]
+ end;
+end;
+
+var
+ _RemoveFontResourceExW: Pointer;
+
+function RemoveFontResourceExW;
+begin
+ GetProcedureAddress(_RemoveFontResourceExW, gdi32, 'RemoveFontResourceExW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RemoveFontResourceExW]
+ end;
+end;
+
+var
+ _RemoveFontResourceEx: Pointer;
+
+function RemoveFontResourceEx;
+begin
+ GetProcedureAddress(_RemoveFontResourceEx, gdi32, 'RemoveFontResourceEx' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RemoveFontResourceEx]
+ end;
+end;
+
+var
+ _AddFontMemResourceEx: Pointer;
+
+function AddFontMemResourceEx;
+begin
+ GetProcedureAddress(_AddFontMemResourceEx, gdi32, 'AddFontMemResourceEx');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_AddFontMemResourceEx]
+ end;
+end;
+
+var
+ _RemoveFontMemResourceEx: Pointer;
+
+function RemoveFontMemResourceEx;
+begin
+ GetProcedureAddress(_RemoveFontMemResourceEx, gdi32, 'RemoveFontMemResourceEx');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RemoveFontMemResourceEx]
+ end;
+end;
+
+var
+ _CreateFontIndirectExA: Pointer;
+
+function CreateFontIndirectExA;
+begin
+ GetProcedureAddress(_CreateFontIndirectExA, gdi32, 'CreateFontIndirectExA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreateFontIndirectExA]
+ end;
+end;
+
+var
+ _CreateFontIndirectExW: Pointer;
+
+function CreateFontIndirectExW;
+begin
+ GetProcedureAddress(_CreateFontIndirectExW, gdi32, 'CreateFontIndirectExW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreateFontIndirectExW]
+ end;
+end;
+
+var
+ _CreateFontIndirectEx: Pointer;
+
+function CreateFontIndirectEx;
+begin
+ GetProcedureAddress(_CreateFontIndirectEx, gdi32, 'CreateFontIndirectEx' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreateFontIndirectEx]
+ end;
+end;
+
+var
+ _GetViewportExtEx: Pointer;
+
+function GetViewportExtEx;
+begin
+ GetProcedureAddress(_GetViewportExtEx, gdi32, 'GetViewportExtEx');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetViewportExtEx]
+ end;
+end;
+
+var
+ _GetViewportOrgEx: Pointer;
+
+function GetViewportOrgEx;
+begin
+ GetProcedureAddress(_GetViewportOrgEx, gdi32, 'GetViewportOrgEx');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetViewportOrgEx]
+ end;
+end;
+
+var
+ _GetWindowExtEx: Pointer;
+
+function GetWindowExtEx;
+begin
+ GetProcedureAddress(_GetWindowExtEx, gdi32, 'GetWindowExtEx');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetWindowExtEx]
+ end;
+end;
+
+var
+ _GetWindowOrgEx: Pointer;
+
+function GetWindowOrgEx;
+begin
+ GetProcedureAddress(_GetWindowOrgEx, gdi32, 'GetWindowOrgEx');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetWindowOrgEx]
+ end;
+end;
+
+var
+ _IntersectClipRect: Pointer;
+
+function IntersectClipRect;
+begin
+ GetProcedureAddress(_IntersectClipRect, gdi32, 'IntersectClipRect');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_IntersectClipRect]
+ end;
+end;
+
+var
+ _InvertRgn: Pointer;
+
+function InvertRgn;
+begin
+ GetProcedureAddress(_InvertRgn, gdi32, 'InvertRgn');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_InvertRgn]
+ end;
+end;
+
+var
+ _LineDDA: Pointer;
+
+function LineDDA;
+begin
+ GetProcedureAddress(_LineDDA, gdi32, 'LineDDA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_LineDDA]
+ end;
+end;
+
+var
+ _LineTo: Pointer;
+
+function LineTo;
+begin
+ GetProcedureAddress(_LineTo, gdi32, 'LineTo');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_LineTo]
+ end;
+end;
+
+var
+ _MaskBlt: Pointer;
+
+function MaskBlt;
+begin
+ GetProcedureAddress(_MaskBlt, gdi32, 'MaskBlt');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MaskBlt]
+ end;
+end;
+
+var
+ _PlgBlt: Pointer;
+
+function PlgBlt;
+begin
+ GetProcedureAddress(_PlgBlt, gdi32, 'PlgBlt');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PlgBlt]
+ end;
+end;
+
+var
+ _OffsetClipRgn: Pointer;
+
+function OffsetClipRgn;
+begin
+ GetProcedureAddress(_OffsetClipRgn, gdi32, 'OffsetClipRgn');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_OffsetClipRgn]
+ end;
+end;
+
+var
+ _OffsetRgn: Pointer;
+
+function OffsetRgn;
+begin
+ GetProcedureAddress(_OffsetRgn, gdi32, 'OffsetRgn');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_OffsetRgn]
+ end;
+end;
+
+var
+ _PatBlt: Pointer;
+
+function PatBlt;
+begin
+ GetProcedureAddress(_PatBlt, gdi32, 'PatBlt');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PatBlt]
+ end;
+end;
+
+var
+ _Pie: Pointer;
+
+function Pie;
+begin
+ GetProcedureAddress(_Pie, gdi32, 'Pie');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_Pie]
+ end;
+end;
+
+var
+ _PlayMetaFile: Pointer;
+
+function PlayMetaFile;
+begin
+ GetProcedureAddress(_PlayMetaFile, gdi32, 'PlayMetaFile');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PlayMetaFile]
+ end;
+end;
+
+var
+ _PaintRgn: Pointer;
+
+function PaintRgn;
+begin
+ GetProcedureAddress(_PaintRgn, gdi32, 'PaintRgn');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PaintRgn]
+ end;
+end;
+
+var
+ _PolyPolygon: Pointer;
+
+function PolyPolygon;
+begin
+ GetProcedureAddress(_PolyPolygon, gdi32, 'PolyPolygon');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PolyPolygon]
+ end;
+end;
+
+var
+ _PtInRegion: Pointer;
+
+function PtInRegion;
+begin
+ GetProcedureAddress(_PtInRegion, gdi32, 'PtInRegion');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PtInRegion]
+ end;
+end;
+
+var
+ _PtVisible: Pointer;
+
+function PtVisible;
+begin
+ GetProcedureAddress(_PtVisible, gdi32, 'PtVisible');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PtVisible]
+ end;
+end;
+
+var
+ _RectInRegion: Pointer;
+
+function RectInRegion;
+begin
+ GetProcedureAddress(_RectInRegion, gdi32, 'RectInRegion');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RectInRegion]
+ end;
+end;
+
+var
+ _RectVisible: Pointer;
+
+function RectVisible;
+begin
+ GetProcedureAddress(_RectVisible, gdi32, 'RectVisible');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RectVisible]
+ end;
+end;
+
+var
+ _Rectangle: Pointer;
+
+function Rectangle;
+begin
+ GetProcedureAddress(_Rectangle, gdi32, 'Rectangle');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_Rectangle]
+ end;
+end;
+
+var
+ _RestoreDC: Pointer;
+
+function RestoreDC;
+begin
+ GetProcedureAddress(_RestoreDC, gdi32, 'RestoreDC');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RestoreDC]
+ end;
+end;
+
+var
+ _ResetDCA: Pointer;
+
+function ResetDCA;
+begin
+ GetProcedureAddress(_ResetDCA, gdi32, 'ResetDCA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ResetDCA]
+ end;
+end;
+
+var
+ _ResetDCW: Pointer;
+
+function ResetDCW;
+begin
+ GetProcedureAddress(_ResetDCW, gdi32, 'ResetDCW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ResetDCW]
+ end;
+end;
+
+var
+ _ResetDC: Pointer;
+
+function ResetDC;
+begin
+ GetProcedureAddress(_ResetDC, gdi32, 'ResetDC' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ResetDC]
+ end;
+end;
+
+var
+ _RealizePalette: Pointer;
+
+function RealizePalette;
+begin
+ GetProcedureAddress(_RealizePalette, gdi32, 'RealizePalette');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RealizePalette]
+ end;
+end;
+
+var
+ _RemoveFontResourceA: Pointer;
+
+function RemoveFontResourceA;
+begin
+ GetProcedureAddress(_RemoveFontResourceA, gdi32, 'RemoveFontResourceA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RemoveFontResourceA]
+ end;
+end;
+
+var
+ _RemoveFontResourceW: Pointer;
+
+function RemoveFontResourceW;
+begin
+ GetProcedureAddress(_RemoveFontResourceW, gdi32, 'RemoveFontResourceW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RemoveFontResourceW]
+ end;
+end;
+
+var
+ _RemoveFontResource: Pointer;
+
+function RemoveFontResource;
+begin
+ GetProcedureAddress(_RemoveFontResource, gdi32, 'RemoveFontResource' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RemoveFontResource]
+ end;
+end;
+
+var
+ _RoundRect: Pointer;
+
+function RoundRect;
+begin
+ GetProcedureAddress(_RoundRect, gdi32, 'RoundRect');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RoundRect]
+ end;
+end;
+
+var
+ _ResizePalette: Pointer;
+
+function ResizePalette;
+begin
+ GetProcedureAddress(_ResizePalette, gdi32, 'ResizePalette');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ResizePalette]
+ end;
+end;
+
+var
+ _SaveDC: Pointer;
+
+function SaveDC;
+begin
+ GetProcedureAddress(_SaveDC, gdi32, 'SaveDC');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SaveDC]
+ end;
+end;
+
+var
+ _SelectClipRgn: Pointer;
+
+function SelectClipRgn;
+begin
+ GetProcedureAddress(_SelectClipRgn, gdi32, 'SelectClipRgn');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SelectClipRgn]
+ end;
+end;
+
+var
+ _ExtSelectClipRgn: Pointer;
+
+function ExtSelectClipRgn;
+begin
+ GetProcedureAddress(_ExtSelectClipRgn, gdi32, 'ExtSelectClipRgn');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ExtSelectClipRgn]
+ end;
+end;
+
+var
+ _SetMetaRgn: Pointer;
+
+function SetMetaRgn;
+begin
+ GetProcedureAddress(_SetMetaRgn, gdi32, 'SetMetaRgn');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetMetaRgn]
+ end;
+end;
+
+var
+ _SelectObject: Pointer;
+
+function SelectObject;
+begin
+ GetProcedureAddress(_SelectObject, gdi32, 'SelectObject');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SelectObject]
+ end;
+end;
+
+var
+ _SelectPalette: Pointer;
+
+function SelectPalette;
+begin
+ GetProcedureAddress(_SelectPalette, gdi32, 'SelectPalette');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SelectPalette]
+ end;
+end;
+
+var
+ _SetBkColor: Pointer;
+
+function SetBkColor;
+begin
+ GetProcedureAddress(_SetBkColor, gdi32, 'SetBkColor');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetBkColor]
+ end;
+end;
+
+var
+ _SetDCBrushColor: Pointer;
+
+function SetDCBrushColor;
+begin
+ GetProcedureAddress(_SetDCBrushColor, gdi32, 'SetDCBrushColor');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetDCBrushColor]
+ end;
+end;
+
+var
+ _SetDCPenColor: Pointer;
+
+function SetDCPenColor;
+begin
+ GetProcedureAddress(_SetDCPenColor, gdi32, 'SetDCPenColor');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetDCPenColor]
+ end;
+end;
+
+var
+ _SetBkMode: Pointer;
+
+function SetBkMode;
+begin
+ GetProcedureAddress(_SetBkMode, gdi32, 'SetBkMode');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetBkMode]
+ end;
+end;
+
+var
+ _SetBitmapBits: Pointer;
+
+function SetBitmapBits;
+begin
+ GetProcedureAddress(_SetBitmapBits, gdi32, 'SetBitmapBits');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetBitmapBits]
+ end;
+end;
+
+var
+ _SetBoundsRect: Pointer;
+
+function SetBoundsRect;
+begin
+ GetProcedureAddress(_SetBoundsRect, gdi32, 'SetBoundsRect');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetBoundsRect]
+ end;
+end;
+
+var
+ _SetDIBits: Pointer;
+
+function SetDIBits;
+begin
+ GetProcedureAddress(_SetDIBits, gdi32, 'SetDIBits');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetDIBits]
+ end;
+end;
+
+var
+ _SetDIBitsToDevice: Pointer;
+
+function SetDIBitsToDevice;
+begin
+ GetProcedureAddress(_SetDIBitsToDevice, gdi32, 'SetDIBitsToDevice');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetDIBitsToDevice]
+ end;
+end;
+
+var
+ _SetMapperFlags: Pointer;
+
+function SetMapperFlags;
+begin
+ GetProcedureAddress(_SetMapperFlags, gdi32, 'SetMapperFlags');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetMapperFlags]
+ end;
+end;
+
+var
+ _SetGraphicsMode: Pointer;
+
+function SetGraphicsMode;
+begin
+ GetProcedureAddress(_SetGraphicsMode, gdi32, 'SetGraphicsMode');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetGraphicsMode]
+ end;
+end;
+
+var
+ _SetMapMode: Pointer;
+
+function SetMapMode;
+begin
+ GetProcedureAddress(_SetMapMode, gdi32, 'SetMapMode');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetMapMode]
+ end;
+end;
+
+var
+ _SetLayout: Pointer;
+
+function SetLayout;
+begin
+ GetProcedureAddress(_SetLayout, gdi32, 'SetLayout');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetLayout]
+ end;
+end;
+
+var
+ _GetLayout: Pointer;
+
+function GetLayout;
+begin
+ GetProcedureAddress(_GetLayout, gdi32, 'GetLayout');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetLayout]
+ end;
+end;
+
+var
+ _SetMetaFileBitsEx: Pointer;
+
+function SetMetaFileBitsEx;
+begin
+ GetProcedureAddress(_SetMetaFileBitsEx, gdi32, 'SetMetaFileBitsEx');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetMetaFileBitsEx]
+ end;
+end;
+
+var
+ _SetPaletteEntries: Pointer;
+
+function SetPaletteEntries;
+begin
+ GetProcedureAddress(_SetPaletteEntries, gdi32, 'SetPaletteEntries');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetPaletteEntries]
+ end;
+end;
+
+var
+ _SetPixel: Pointer;
+
+function SetPixel;
+begin
+ GetProcedureAddress(_SetPixel, gdi32, 'SetPixel');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetPixel]
+ end;
+end;
+
+var
+ _SetPixelV: Pointer;
+
+function SetPixelV;
+begin
+ GetProcedureAddress(_SetPixelV, gdi32, 'SetPixelV');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetPixelV]
+ end;
+end;
+
+var
+ _SetPixelFormat: Pointer;
+
+function SetPixelFormat;
+begin
+ GetProcedureAddress(_SetPixelFormat, gdi32, 'SetPixelFormat');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetPixelFormat]
+ end;
+end;
+
+var
+ _SetPolyFillMode: Pointer;
+
+function SetPolyFillMode;
+begin
+ GetProcedureAddress(_SetPolyFillMode, gdi32, 'SetPolyFillMode');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetPolyFillMode]
+ end;
+end;
+
+var
+ _StretchBlt: Pointer;
+
+function StretchBlt;
+begin
+ GetProcedureAddress(_StretchBlt, gdi32, 'StretchBlt');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_StretchBlt]
+ end;
+end;
+
+var
+ _SetRectRgn: Pointer;
+
+function SetRectRgn;
+begin
+ GetProcedureAddress(_SetRectRgn, gdi32, 'SetRectRgn');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetRectRgn]
+ end;
+end;
+
+var
+ _StretchDIBits: Pointer;
+
+function StretchDIBits;
+begin
+ GetProcedureAddress(_StretchDIBits, gdi32, 'StretchDIBits');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_StretchDIBits]
+ end;
+end;
+
+var
+ _SetROP2: Pointer;
+
+function SetROP2;
+begin
+ GetProcedureAddress(_SetROP2, gdi32, 'SetROP2');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetROP2]
+ end;
+end;
+
+var
+ _SetStretchBltMode: Pointer;
+
+function SetStretchBltMode;
+begin
+ GetProcedureAddress(_SetStretchBltMode, gdi32, 'SetStretchBltMode');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetStretchBltMode]
+ end;
+end;
+
+var
+ _SetSystemPaletteUse: Pointer;
+
+function SetSystemPaletteUse;
+begin
+ GetProcedureAddress(_SetSystemPaletteUse, gdi32, 'SetSystemPaletteUse');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetSystemPaletteUse]
+ end;
+end;
+
+var
+ _SetTextCharacterExtra: Pointer;
+
+function SetTextCharacterExtra;
+begin
+ GetProcedureAddress(_SetTextCharacterExtra, gdi32, 'SetTextCharacterExtra');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetTextCharacterExtra]
+ end;
+end;
+
+var
+ _SetTextColor: Pointer;
+
+function SetTextColor;
+begin
+ GetProcedureAddress(_SetTextColor, gdi32, 'SetTextColor');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetTextColor]
+ end;
+end;
+
+var
+ _SetTextAlign: Pointer;
+
+function SetTextAlign;
+begin
+ GetProcedureAddress(_SetTextAlign, gdi32, 'SetTextAlign');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetTextAlign]
+ end;
+end;
+
+var
+ _SetTextJustification: Pointer;
+
+function SetTextJustification;
+begin
+ GetProcedureAddress(_SetTextJustification, gdi32, 'SetTextJustification');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetTextJustification]
+ end;
+end;
+
+var
+ _UpdateColors: Pointer;
+
+function UpdateColors;
+begin
+ GetProcedureAddress(_UpdateColors, gdi32, 'UpdateColors');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_UpdateColors]
+ end;
+end;
+
+var
+ _AlphaBlend: Pointer;
+
+function AlphaBlend;
+begin
+ GetProcedureAddress(_AlphaBlend, msimg32, 'AlphaBlend');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_AlphaBlend]
+ end;
+end;
+
+var
+ _TransparentBlt: Pointer;
+
+function TransparentBlt;
+begin
+ GetProcedureAddress(_TransparentBlt, msimg32, 'TransparentBlt');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_TransparentBlt]
+ end;
+end;
+
+var
+ _GradientFill: Pointer;
+
+function GradientFill;
+begin
+ GetProcedureAddress(_GradientFill, msimg32, 'GradientFill');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GradientFill]
+ end;
+end;
+
+var
+ _PlayMetaFileRecord: Pointer;
+
+function PlayMetaFileRecord;
+begin
+ GetProcedureAddress(_PlayMetaFileRecord, gdi32, 'PlayMetaFileRecord');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PlayMetaFileRecord]
+ end;
+end;
+
+var
+ _EnumMetaFile: Pointer;
+
+function EnumMetaFile;
+begin
+ GetProcedureAddress(_EnumMetaFile, gdi32, 'EnumMetaFile');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_EnumMetaFile]
+ end;
+end;
+
+var
+ _CloseEnhMetaFile: Pointer;
+
+function CloseEnhMetaFile;
+begin
+ GetProcedureAddress(_CloseEnhMetaFile, gdi32, 'CloseEnhMetaFile');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CloseEnhMetaFile]
+ end;
+end;
+
+var
+ _CopyEnhMetaFileA: Pointer;
+
+function CopyEnhMetaFileA;
+begin
+ GetProcedureAddress(_CopyEnhMetaFileA, gdi32, 'CopyEnhMetaFileA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CopyEnhMetaFileA]
+ end;
+end;
+
+var
+ _CopyEnhMetaFileW: Pointer;
+
+function CopyEnhMetaFileW;
+begin
+ GetProcedureAddress(_CopyEnhMetaFileW, gdi32, 'CopyEnhMetaFileW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CopyEnhMetaFileW]
+ end;
+end;
+
+var
+ _CopyEnhMetaFile: Pointer;
+
+function CopyEnhMetaFile;
+begin
+ GetProcedureAddress(_CopyEnhMetaFile, gdi32, 'CopyEnhMetaFile' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CopyEnhMetaFile]
+ end;
+end;
+
+var
+ _CreateEnhMetaFileA: Pointer;
+
+function CreateEnhMetaFileA;
+begin
+ GetProcedureAddress(_CreateEnhMetaFileA, gdi32, 'CreateEnhMetaFileA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreateEnhMetaFileA]
+ end;
+end;
+
+var
+ _CreateEnhMetaFileW: Pointer;
+
+function CreateEnhMetaFileW;
+begin
+ GetProcedureAddress(_CreateEnhMetaFileW, gdi32, 'CreateEnhMetaFileW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreateEnhMetaFileW]
+ end;
+end;
+
+var
+ _CreateEnhMetaFile: Pointer;
+
+function CreateEnhMetaFile;
+begin
+ GetProcedureAddress(_CreateEnhMetaFile, gdi32, 'CreateEnhMetaFile' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreateEnhMetaFile]
+ end;
+end;
+
+var
+ _DeleteEnhMetaFile: Pointer;
+
+function DeleteEnhMetaFile;
+begin
+ GetProcedureAddress(_DeleteEnhMetaFile, gdi32, 'DeleteEnhMetaFile');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DeleteEnhMetaFile]
+ end;
+end;
+
+var
+ _EnumEnhMetaFile: Pointer;
+
+function EnumEnhMetaFile;
+begin
+ GetProcedureAddress(_EnumEnhMetaFile, gdi32, 'EnumEnhMetaFile');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_EnumEnhMetaFile]
+ end;
+end;
+
+var
+ _GetEnhMetaFileA: Pointer;
+
+function GetEnhMetaFileA;
+begin
+ GetProcedureAddress(_GetEnhMetaFileA, gdi32, 'GetEnhMetaFileA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetEnhMetaFileA]
+ end;
+end;
+
+var
+ _GetEnhMetaFileW: Pointer;
+
+function GetEnhMetaFileW;
+begin
+ GetProcedureAddress(_GetEnhMetaFileW, gdi32, 'GetEnhMetaFileW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetEnhMetaFileW]
+ end;
+end;
+
+var
+ _GetEnhMetaFile: Pointer;
+
+function GetEnhMetaFile;
+begin
+ GetProcedureAddress(_GetEnhMetaFile, gdi32, 'GetEnhMetaFile' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetEnhMetaFile]
+ end;
+end;
+
+var
+ _GetEnhMetaFileBits: Pointer;
+
+function GetEnhMetaFileBits;
+begin
+ GetProcedureAddress(_GetEnhMetaFileBits, gdi32, 'GetEnhMetaFileBits');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetEnhMetaFileBits]
+ end;
+end;
+
+var
+ _GetEnhMetaFileDescriptionA: Pointer;
+
+function GetEnhMetaFileDescriptionA;
+begin
+ GetProcedureAddress(_GetEnhMetaFileDescriptionA, gdi32, 'GetEnhMetaFileDescriptionA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetEnhMetaFileDescriptionA]
+ end;
+end;
+
+var
+ _GetEnhMetaFileDescriptionW: Pointer;
+
+function GetEnhMetaFileDescriptionW;
+begin
+ GetProcedureAddress(_GetEnhMetaFileDescriptionW, gdi32, 'GetEnhMetaFileDescriptionW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetEnhMetaFileDescriptionW]
+ end;
+end;
+
+var
+ _GetEnhMetaFileDescription: Pointer;
+
+function GetEnhMetaFileDescription;
+begin
+ GetProcedureAddress(_GetEnhMetaFileDescription, gdi32, 'GetEnhMetaFileDescription' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetEnhMetaFileDescription]
+ end;
+end;
+
+var
+ _GetEnhMetaFileHeader: Pointer;
+
+function GetEnhMetaFileHeader;
+begin
+ GetProcedureAddress(_GetEnhMetaFileHeader, gdi32, 'GetEnhMetaFileHeader');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetEnhMetaFileHeader]
+ end;
+end;
+
+var
+ _GetEnhMetaFilePaletteEntries: Pointer;
+
+function GetEnhMetaFilePaletteEntries;
+begin
+ GetProcedureAddress(_GetEnhMetaFilePaletteEntries, gdi32, 'GetEnhMetaFilePaletteEntries');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetEnhMetaFilePaletteEntries]
+ end;
+end;
+
+var
+ _GetEnhMetaFilePixelFormat: Pointer;
+
+function GetEnhMetaFilePixelFormat;
+begin
+ GetProcedureAddress(_GetEnhMetaFilePixelFormat, gdi32, 'GetEnhMetaFilePixelFormat');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetEnhMetaFilePixelFormat]
+ end;
+end;
+
+var
+ _GetWinMetaFileBits: Pointer;
+
+function GetWinMetaFileBits;
+begin
+ GetProcedureAddress(_GetWinMetaFileBits, gdi32, 'GetWinMetaFileBits');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetWinMetaFileBits]
+ end;
+end;
+
+var
+ _PlayEnhMetaFile: Pointer;
+
+function PlayEnhMetaFile;
+begin
+ GetProcedureAddress(_PlayEnhMetaFile, gdi32, 'PlayEnhMetaFile');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PlayEnhMetaFile]
+ end;
+end;
+
+var
+ _PlayEnhMetaFileRecord: Pointer;
+
+function PlayEnhMetaFileRecord;
+begin
+ GetProcedureAddress(_PlayEnhMetaFileRecord, gdi32, 'PlayEnhMetaFileRecord');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PlayEnhMetaFileRecord]
+ end;
+end;
+
+var
+ _SetEnhMetaFileBits: Pointer;
+
+function SetEnhMetaFileBits;
+begin
+ GetProcedureAddress(_SetEnhMetaFileBits, gdi32, 'SetEnhMetaFileBits');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetEnhMetaFileBits]
+ end;
+end;
+
+var
+ _SetWinMetaFileBits: Pointer;
+
+function SetWinMetaFileBits;
+begin
+ GetProcedureAddress(_SetWinMetaFileBits, gdi32, 'SetWinMetaFileBits');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetWinMetaFileBits]
+ end;
+end;
+
+var
+ _GdiComment: Pointer;
+
+function GdiComment;
+begin
+ GetProcedureAddress(_GdiComment, gdi32, 'GdiComment');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GdiComment]
+ end;
+end;
+
+var
+ _GetTextMetricsA: Pointer;
+
+function GetTextMetricsA;
+begin
+ GetProcedureAddress(_GetTextMetricsA, gdi32, 'GetTextMetricsA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetTextMetricsA]
+ end;
+end;
+
+var
+ _GetTextMetricsW: Pointer;
+
+function GetTextMetricsW;
+begin
+ GetProcedureAddress(_GetTextMetricsW, gdi32, 'GetTextMetricsW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetTextMetricsW]
+ end;
+end;
+
+var
+ _GetTextMetrics: Pointer;
+
+function GetTextMetrics;
+begin
+ GetProcedureAddress(_GetTextMetrics, gdi32, 'GetTextMetrics' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetTextMetrics]
+ end;
+end;
+
+var
+ _AngleArc: Pointer;
+
+function AngleArc;
+begin
+ GetProcedureAddress(_AngleArc, gdi32, 'AngleArc');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_AngleArc]
+ end;
+end;
+
+var
+ _PolyPolyline: Pointer;
+
+function PolyPolyline;
+begin
+ GetProcedureAddress(_PolyPolyline, gdi32, 'PolyPolyline');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PolyPolyline]
+ end;
+end;
+
+var
+ _GetWorldTransform: Pointer;
+
+function GetWorldTransform;
+begin
+ GetProcedureAddress(_GetWorldTransform, gdi32, 'GetWorldTransform');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetWorldTransform]
+ end;
+end;
+
+var
+ _SetWorldTransform: Pointer;
+
+function SetWorldTransform;
+begin
+ GetProcedureAddress(_SetWorldTransform, gdi32, 'SetWorldTransform');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetWorldTransform]
+ end;
+end;
+
+var
+ _ModifyWorldTransform: Pointer;
+
+function ModifyWorldTransform;
+begin
+ GetProcedureAddress(_ModifyWorldTransform, gdi32, 'ModifyWorldTransform');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ModifyWorldTransform]
+ end;
+end;
+
+var
+ _CombineTransform: Pointer;
+
+function CombineTransform;
+begin
+ GetProcedureAddress(_CombineTransform, gdi32, 'CombineTransform');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CombineTransform]
+ end;
+end;
+
+var
+ _CreateDIBSection: Pointer;
+
+function CreateDIBSection;
+begin
+ GetProcedureAddress(_CreateDIBSection, gdi32, 'CreateDIBSection');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreateDIBSection]
+ end;
+end;
+
+var
+ _GetDIBColorTable: Pointer;
+
+function GetDIBColorTable;
+begin
+ GetProcedureAddress(_GetDIBColorTable, gdi32, 'GetDIBColorTable');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetDIBColorTable]
+ end;
+end;
+
+var
+ _SetDIBColorTable: Pointer;
+
+function SetDIBColorTable;
+begin
+ GetProcedureAddress(_SetDIBColorTable, gdi32, 'SetDIBColorTable');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetDIBColorTable]
+ end;
+end;
+
+var
+ _SetColorAdjustment: Pointer;
+
+function SetColorAdjustment;
+begin
+ GetProcedureAddress(_SetColorAdjustment, gdi32, 'SetColorAdjustment');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetColorAdjustment]
+ end;
+end;
+
+var
+ _GetColorAdjustment: Pointer;
+
+function GetColorAdjustment;
+begin
+ GetProcedureAddress(_GetColorAdjustment, gdi32, 'GetColorAdjustment');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetColorAdjustment]
+ end;
+end;
+
+var
+ _CreateHalftonePalette: Pointer;
+
+function CreateHalftonePalette;
+begin
+ GetProcedureAddress(_CreateHalftonePalette, gdi32, 'CreateHalftonePalette');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreateHalftonePalette]
+ end;
+end;
+
+var
+ _StartDocA: Pointer;
+
+function StartDocA;
+begin
+ GetProcedureAddress(_StartDocA, gdi32, 'StartDocA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_StartDocA]
+ end;
+end;
+
+var
+ _StartDocW: Pointer;
+
+function StartDocW;
+begin
+ GetProcedureAddress(_StartDocW, gdi32, 'StartDocW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_StartDocW]
+ end;
+end;
+
+var
+ _StartDoc: Pointer;
+
+function StartDoc;
+begin
+ GetProcedureAddress(_StartDoc, gdi32, 'StartDoc' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_StartDoc]
+ end;
+end;
+
+var
+ __EndDoc: Pointer;
+
+function EndDoc;
+begin
+ GetProcedureAddress(__EndDoc, gdi32, 'EndDoc');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [__EndDoc]
+ end;
+end;
+
+var
+ _StartPage: Pointer;
+
+function StartPage;
+begin
+ GetProcedureAddress(_StartPage, gdi32, 'StartPage');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_StartPage]
+ end;
+end;
+
+var
+ _EndPage: Pointer;
+
+function EndPage;
+begin
+ GetProcedureAddress(_EndPage, gdi32, 'EndPage');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_EndPage]
+ end;
+end;
+
+var
+ __AbortDoc: Pointer;
+
+function AbortDoc;
+begin
+ GetProcedureAddress(__AbortDoc, gdi32, 'AbortDoc');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [__AbortDoc]
+ end;
+end;
+
+var
+ _SetAbortProc: Pointer;
+
+function SetAbortProc;
+begin
+ GetProcedureAddress(_SetAbortProc, gdi32, 'SetAbortProc');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetAbortProc]
+ end;
+end;
+
+var
+ _AbortPath: Pointer;
+
+function AbortPath;
+begin
+ GetProcedureAddress(_AbortPath, gdi32, 'AbortPath');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_AbortPath]
+ end;
+end;
+
+var
+ _ArcTo: Pointer;
+
+function ArcTo;
+begin
+ GetProcedureAddress(_ArcTo, gdi32, 'ArcTo');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ArcTo]
+ end;
+end;
+
+var
+ _BeginPath: Pointer;
+
+function BeginPath;
+begin
+ GetProcedureAddress(_BeginPath, gdi32, 'BeginPath');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_BeginPath]
+ end;
+end;
+
+var
+ _CloseFigure: Pointer;
+
+function CloseFigure;
+begin
+ GetProcedureAddress(_CloseFigure, gdi32, 'CloseFigure');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CloseFigure]
+ end;
+end;
+
+var
+ _EndPath: Pointer;
+
+function EndPath;
+begin
+ GetProcedureAddress(_EndPath, gdi32, 'EndPath');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_EndPath]
+ end;
+end;
+
+var
+ _FillPath: Pointer;
+
+function FillPath;
+begin
+ GetProcedureAddress(_FillPath, gdi32, 'FillPath');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_FillPath]
+ end;
+end;
+
+var
+ _FlattenPath: Pointer;
+
+function FlattenPath;
+begin
+ GetProcedureAddress(_FlattenPath, gdi32, 'FlattenPath');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_FlattenPath]
+ end;
+end;
+
+var
+ _GetPath: Pointer;
+
+function GetPath;
+begin
+ GetProcedureAddress(_GetPath, gdi32, 'GetPath');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetPath]
+ end;
+end;
+
+var
+ _PathToRegion: Pointer;
+
+function PathToRegion;
+begin
+ GetProcedureAddress(_PathToRegion, gdi32, 'PathToRegion');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PathToRegion]
+ end;
+end;
+
+var
+ _PolyDraw: Pointer;
+
+function PolyDraw;
+begin
+ GetProcedureAddress(_PolyDraw, gdi32, 'PolyDraw');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PolyDraw]
+ end;
+end;
+
+var
+ _SelectClipPath: Pointer;
+
+function SelectClipPath;
+begin
+ GetProcedureAddress(_SelectClipPath, gdi32, 'SelectClipPath');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SelectClipPath]
+ end;
+end;
+
+var
+ _SetArcDirection: Pointer;
+
+function SetArcDirection;
+begin
+ GetProcedureAddress(_SetArcDirection, gdi32, 'SetArcDirection');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetArcDirection]
+ end;
+end;
+
+var
+ _SetMiterLimit: Pointer;
+
+function SetMiterLimit;
+begin
+ GetProcedureAddress(_SetMiterLimit, gdi32, 'SetMiterLimit');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetMiterLimit]
+ end;
+end;
+
+var
+ _StrokeAndFillPath: Pointer;
+
+function StrokeAndFillPath;
+begin
+ GetProcedureAddress(_StrokeAndFillPath, gdi32, 'StrokeAndFillPath');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_StrokeAndFillPath]
+ end;
+end;
+
+var
+ _StrokePath: Pointer;
+
+function StrokePath;
+begin
+ GetProcedureAddress(_StrokePath, gdi32, 'StrokePath');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_StrokePath]
+ end;
+end;
+
+var
+ _WidenPath: Pointer;
+
+function WidenPath;
+begin
+ GetProcedureAddress(_WidenPath, gdi32, 'WidenPath');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WidenPath]
+ end;
+end;
+
+var
+ _ExtCreatePen: Pointer;
+
+function ExtCreatePen;
+begin
+ GetProcedureAddress(_ExtCreatePen, gdi32, 'ExtCreatePen');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ExtCreatePen]
+ end;
+end;
+
+var
+ _GetMiterLimit: Pointer;
+
+function GetMiterLimit;
+begin
+ GetProcedureAddress(_GetMiterLimit, gdi32, 'GetMiterLimit');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetMiterLimit]
+ end;
+end;
+
+var
+ _GetArcDirection: Pointer;
+
+function GetArcDirection;
+begin
+ GetProcedureAddress(_GetArcDirection, gdi32, 'GetArcDirection');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetArcDirection]
+ end;
+end;
+
+var
+ _GetObjectA: Pointer;
+
+function GetObjectA;
+begin
+ GetProcedureAddress(_GetObjectA, gdi32, 'GetObjectA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetObjectA]
+ end;
+end;
+
+var
+ _GetObjectW: Pointer;
+
+function GetObjectW;
+begin
+ GetProcedureAddress(_GetObjectW, gdi32, 'GetObjectW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetObjectW]
+ end;
+end;
+
+var
+ _GetObject: Pointer;
+
+function GetObject;
+begin
+ GetProcedureAddress(_GetObject, gdi32, 'GetObject' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetObject]
+ end;
+end;
+
+var
+ _MoveToEx: Pointer;
+
+function MoveToEx;
+begin
+ GetProcedureAddress(_MoveToEx, gdi32, 'MoveToEx');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MoveToEx]
+ end;
+end;
+
+var
+ _TextOutA: Pointer;
+
+function TextOutA;
+begin
+ GetProcedureAddress(_TextOutA, gdi32, 'TextOutA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_TextOutA]
+ end;
+end;
+
+var
+ _TextOutW: Pointer;
+
+function TextOutW;
+begin
+ GetProcedureAddress(_TextOutW, gdi32, 'TextOutW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_TextOutW]
+ end;
+end;
+
+var
+ _TextOut: Pointer;
+
+function TextOut;
+begin
+ GetProcedureAddress(_TextOut, gdi32, 'TextOut' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_TextOut]
+ end;
+end;
+
+var
+ _ExtTextOutA: Pointer;
+
+function ExtTextOutA;
+begin
+ GetProcedureAddress(_ExtTextOutA, gdi32, 'ExtTextOutA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ExtTextOutA]
+ end;
+end;
+
+var
+ _ExtTextOutW: Pointer;
+
+function ExtTextOutW;
+begin
+ GetProcedureAddress(_ExtTextOutW, gdi32, 'ExtTextOutW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ExtTextOutW]
+ end;
+end;
+
+var
+ _ExtTextOut: Pointer;
+
+function ExtTextOut;
+begin
+ GetProcedureAddress(_ExtTextOut, gdi32, 'ExtTextOut' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ExtTextOut]
+ end;
+end;
+
+var
+ _PolyTextOutA: Pointer;
+
+function PolyTextOutA;
+begin
+ GetProcedureAddress(_PolyTextOutA, gdi32, 'PolyTextOutA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PolyTextOutA]
+ end;
+end;
+
+var
+ _PolyTextOutW: Pointer;
+
+function PolyTextOutW;
+begin
+ GetProcedureAddress(_PolyTextOutW, gdi32, 'PolyTextOutW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PolyTextOutW]
+ end;
+end;
+
+var
+ _PolyTextOut: Pointer;
+
+function PolyTextOut;
+begin
+ GetProcedureAddress(_PolyTextOut, gdi32, 'PolyTextOut' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PolyTextOut]
+ end;
+end;
+
+var
+ _CreatePolygonRgn: Pointer;
+
+function CreatePolygonRgn;
+begin
+ GetProcedureAddress(_CreatePolygonRgn, gdi32, 'CreatePolygonRgn');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreatePolygonRgn]
+ end;
+end;
+
+var
+ _DPtoLP: Pointer;
+
+function DPtoLP;
+begin
+ GetProcedureAddress(_DPtoLP, gdi32, 'DPtoLP');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DPtoLP]
+ end;
+end;
+
+var
+ _LPtoDP: Pointer;
+
+function LPtoDP;
+begin
+ GetProcedureAddress(_LPtoDP, gdi32, 'LPtoDP');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_LPtoDP]
+ end;
+end;
+
+var
+ _Polygon: Pointer;
+
+function Polygon;
+begin
+ GetProcedureAddress(_Polygon, gdi32, 'Polygon');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_Polygon]
+ end;
+end;
+
+var
+ _Polyline: Pointer;
+
+function Polyline;
+begin
+ GetProcedureAddress(_Polyline, gdi32, 'Polyline');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_Polyline]
+ end;
+end;
+
+var
+ _PolyBezier: Pointer;
+
+function PolyBezier;
+begin
+ GetProcedureAddress(_PolyBezier, gdi32, 'PolyBezier');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PolyBezier]
+ end;
+end;
+
+var
+ _PolyBezierTo: Pointer;
+
+function PolyBezierTo;
+begin
+ GetProcedureAddress(_PolyBezierTo, gdi32, 'PolyBezierTo');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PolyBezierTo]
+ end;
+end;
+
+var
+ _PolylineTo: Pointer;
+
+function PolylineTo;
+begin
+ GetProcedureAddress(_PolylineTo, gdi32, 'PolylineTo');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PolylineTo]
+ end;
+end;
+
+var
+ _SetViewportExtEx: Pointer;
+
+function SetViewportExtEx;
+begin
+ GetProcedureAddress(_SetViewportExtEx, gdi32, 'SetViewportExtEx');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetViewportExtEx]
+ end;
+end;
+
+var
+ _SetViewportOrgEx: Pointer;
+
+function SetViewportOrgEx;
+begin
+ GetProcedureAddress(_SetViewportOrgEx, gdi32, 'SetViewportOrgEx');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetViewportOrgEx]
+ end;
+end;
+
+var
+ _SetWindowExtEx: Pointer;
+
+function SetWindowExtEx;
+begin
+ GetProcedureAddress(_SetWindowExtEx, gdi32, 'SetWindowExtEx');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetWindowExtEx]
+ end;
+end;
+
+var
+ _SetWindowOrgEx: Pointer;
+
+function SetWindowOrgEx;
+begin
+ GetProcedureAddress(_SetWindowOrgEx, gdi32, 'SetWindowOrgEx');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetWindowOrgEx]
+ end;
+end;
+
+var
+ _OffsetViewportOrgEx: Pointer;
+
+function OffsetViewportOrgEx;
+begin
+ GetProcedureAddress(_OffsetViewportOrgEx, gdi32, 'OffsetViewportOrgEx');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_OffsetViewportOrgEx]
+ end;
+end;
+
+var
+ _OffsetWindowOrgEx: Pointer;
+
+function OffsetWindowOrgEx;
+begin
+ GetProcedureAddress(_OffsetWindowOrgEx, gdi32, 'OffsetWindowOrgEx');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_OffsetWindowOrgEx]
+ end;
+end;
+
+var
+ _ScaleViewportExtEx: Pointer;
+
+function ScaleViewportExtEx;
+begin
+ GetProcedureAddress(_ScaleViewportExtEx, gdi32, 'ScaleViewportExtEx');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ScaleViewportExtEx]
+ end;
+end;
+
+var
+ _ScaleWindowExtEx: Pointer;
+
+function ScaleWindowExtEx;
+begin
+ GetProcedureAddress(_ScaleWindowExtEx, gdi32, 'ScaleWindowExtEx');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ScaleWindowExtEx]
+ end;
+end;
+
+var
+ _SetBitmapDimensionEx: Pointer;
+
+function SetBitmapDimensionEx;
+begin
+ GetProcedureAddress(_SetBitmapDimensionEx, gdi32, 'SetBitmapDimensionEx');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetBitmapDimensionEx]
+ end;
+end;
+
+var
+ _SetBrushOrgEx: Pointer;
+
+function SetBrushOrgEx;
+begin
+ GetProcedureAddress(_SetBrushOrgEx, gdi32, 'SetBrushOrgEx');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetBrushOrgEx]
+ end;
+end;
+
+var
+ _GetTextFaceA: Pointer;
+
+function GetTextFaceA;
+begin
+ GetProcedureAddress(_GetTextFaceA, gdi32, 'GetTextFaceA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetTextFaceA]
+ end;
+end;
+
+var
+ _GetTextFaceW: Pointer;
+
+function GetTextFaceW;
+begin
+ GetProcedureAddress(_GetTextFaceW, gdi32, 'GetTextFaceW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetTextFaceW]
+ end;
+end;
+
+var
+ _GetTextFace: Pointer;
+
+function GetTextFace;
+begin
+ GetProcedureAddress(_GetTextFace, gdi32, 'GetTextFace' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetTextFace]
+ end;
+end;
+
+var
+ _GetKerningPairsA: Pointer;
+
+function GetKerningPairsA;
+begin
+ GetProcedureAddress(_GetKerningPairsA, gdi32, 'GetKerningPairsA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetKerningPairsA]
+ end;
+end;
+
+var
+ _GetKerningPairsW: Pointer;
+
+function GetKerningPairsW;
+begin
+ GetProcedureAddress(_GetKerningPairsW, gdi32, 'GetKerningPairsW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetKerningPairsW]
+ end;
+end;
+
+var
+ _GetKerningPairs: Pointer;
+
+function GetKerningPairs;
+begin
+ GetProcedureAddress(_GetKerningPairs, gdi32, 'GetKerningPairs' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetKerningPairs]
+ end;
+end;
+
+var
+ _GetDCOrgEx: Pointer;
+
+function GetDCOrgEx;
+begin
+ GetProcedureAddress(_GetDCOrgEx, gdi32, 'GetDCOrgEx');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetDCOrgEx]
+ end;
+end;
+
+var
+ _FixBrushOrgEx: Pointer;
+
+function FixBrushOrgEx;
+begin
+ GetProcedureAddress(_FixBrushOrgEx, gdi32, 'FixBrushOrgEx');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_FixBrushOrgEx]
+ end;
+end;
+
+var
+ _UnrealizeObject: Pointer;
+
+function UnrealizeObject;
+begin
+ GetProcedureAddress(_UnrealizeObject, gdi32, 'UnrealizeObject');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_UnrealizeObject]
+ end;
+end;
+
+var
+ _GdiFlush: Pointer;
+
+function GdiFlush;
+begin
+ GetProcedureAddress(_GdiFlush, gdi32, 'GdiFlush');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GdiFlush]
+ end;
+end;
+
+var
+ _GdiSetBatchLimit: Pointer;
+
+function GdiSetBatchLimit;
+begin
+ GetProcedureAddress(_GdiSetBatchLimit, gdi32, 'GdiSetBatchLimit');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GdiSetBatchLimit]
+ end;
+end;
+
+var
+ _GdiGetBatchLimit: Pointer;
+
+function GdiGetBatchLimit;
+begin
+ GetProcedureAddress(_GdiGetBatchLimit, gdi32, 'GdiGetBatchLimit');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GdiGetBatchLimit]
+ end;
+end;
+
+var
+ _SetICMMode: Pointer;
+
+function SetICMMode;
+begin
+ GetProcedureAddress(_SetICMMode, gdi32, 'SetICMMode');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetICMMode]
+ end;
+end;
+
+var
+ _CheckColorsInGamut: Pointer;
+
+function CheckColorsInGamut;
+begin
+ GetProcedureAddress(_CheckColorsInGamut, gdi32, 'CheckColorsInGamut');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CheckColorsInGamut]
+ end;
+end;
+
+var
+ _GetColorSpace: Pointer;
+
+function GetColorSpace;
+begin
+ GetProcedureAddress(_GetColorSpace, gdi32, 'GetColorSpace');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetColorSpace]
+ end;
+end;
+
+var
+ _GetLogColorSpaceA: Pointer;
+
+function GetLogColorSpaceA;
+begin
+ GetProcedureAddress(_GetLogColorSpaceA, gdi32, 'GetLogColorSpaceA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetLogColorSpaceA]
+ end;
+end;
+
+var
+ _GetLogColorSpaceW: Pointer;
+
+function GetLogColorSpaceW;
+begin
+ GetProcedureAddress(_GetLogColorSpaceW, gdi32, 'GetLogColorSpaceW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetLogColorSpaceW]
+ end;
+end;
+
+var
+ _GetLogColorSpace: Pointer;
+
+function GetLogColorSpace;
+begin
+ GetProcedureAddress(_GetLogColorSpace, gdi32, 'GetLogColorSpace' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetLogColorSpace]
+ end;
+end;
+
+var
+ _CreateColorSpaceA: Pointer;
+
+function CreateColorSpaceA;
+begin
+ GetProcedureAddress(_CreateColorSpaceA, gdi32, 'CreateColorSpaceA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreateColorSpaceA]
+ end;
+end;
+
+var
+ _CreateColorSpaceW: Pointer;
+
+function CreateColorSpaceW;
+begin
+ GetProcedureAddress(_CreateColorSpaceW, gdi32, 'CreateColorSpaceW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreateColorSpaceW]
+ end;
+end;
+
+var
+ _CreateColorSpace: Pointer;
+
+function CreateColorSpace;
+begin
+ GetProcedureAddress(_CreateColorSpace, gdi32, 'CreateColorSpace' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreateColorSpace]
+ end;
+end;
+
+var
+ _SetColorSpace: Pointer;
+
+function SetColorSpace;
+begin
+ GetProcedureAddress(_SetColorSpace, gdi32, 'SetColorSpace');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetColorSpace]
+ end;
+end;
+
+var
+ _DeleteColorSpace: Pointer;
+
+function DeleteColorSpace;
+begin
+ GetProcedureAddress(_DeleteColorSpace, gdi32, 'DeleteColorSpace');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DeleteColorSpace]
+ end;
+end;
+
+var
+ _GetICMProfileA: Pointer;
+
+function GetICMProfileA;
+begin
+ GetProcedureAddress(_GetICMProfileA, gdi32, 'GetICMProfileA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetICMProfileA]
+ end;
+end;
+
+var
+ _GetICMProfileW: Pointer;
+
+function GetICMProfileW;
+begin
+ GetProcedureAddress(_GetICMProfileW, gdi32, 'GetICMProfileW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetICMProfileW]
+ end;
+end;
+
+var
+ _GetICMProfile: Pointer;
+
+function GetICMProfile;
+begin
+ GetProcedureAddress(_GetICMProfile, gdi32, 'GetICMProfile' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetICMProfile]
+ end;
+end;
+
+var
+ _SetICMProfileA: Pointer;
+
+function SetICMProfileA;
+begin
+ GetProcedureAddress(_SetICMProfileA, gdi32, 'SetICMProfileA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetICMProfileA]
+ end;
+end;
+
+var
+ _SetICMProfileW: Pointer;
+
+function SetICMProfileW;
+begin
+ GetProcedureAddress(_SetICMProfileW, gdi32, 'SetICMProfileW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetICMProfileW]
+ end;
+end;
+
+var
+ _SetICMProfile: Pointer;
+
+function SetICMProfile;
+begin
+ GetProcedureAddress(_SetICMProfile, gdi32, 'SetICMProfile' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetICMProfile]
+ end;
+end;
+
+var
+ _GetDeviceGammaRamp: Pointer;
+
+function GetDeviceGammaRamp;
+begin
+ GetProcedureAddress(_GetDeviceGammaRamp, gdi32, 'GetDeviceGammaRamp');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetDeviceGammaRamp]
+ end;
+end;
+
+var
+ _SetDeviceGammaRamp: Pointer;
+
+function SetDeviceGammaRamp;
+begin
+ GetProcedureAddress(_SetDeviceGammaRamp, gdi32, 'SetDeviceGammaRamp');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetDeviceGammaRamp]
+ end;
+end;
+
+var
+ _ColorMatchToTarget: Pointer;
+
+function ColorMatchToTarget;
+begin
+ GetProcedureAddress(_ColorMatchToTarget, gdi32, 'ColorMatchToTarget');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ColorMatchToTarget]
+ end;
+end;
+
+var
+ _EnumICMProfilesA: Pointer;
+
+function EnumICMProfilesA;
+begin
+ GetProcedureAddress(_EnumICMProfilesA, gdi32, 'EnumICMProfilesA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_EnumICMProfilesA]
+ end;
+end;
+
+var
+ _EnumICMProfilesW: Pointer;
+
+function EnumICMProfilesW;
+begin
+ GetProcedureAddress(_EnumICMProfilesW, gdi32, 'EnumICMProfilesW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_EnumICMProfilesW]
+ end;
+end;
+
+var
+ _EnumICMProfiles: Pointer;
+
+function EnumICMProfiles;
+begin
+ GetProcedureAddress(_EnumICMProfiles, gdi32, 'EnumICMProfiles' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_EnumICMProfiles]
+ end;
+end;
+
+var
+ _UpdateICMRegKeyA: Pointer;
+
+function UpdateICMRegKeyA;
+begin
+ GetProcedureAddress(_UpdateICMRegKeyA, gdi32, 'UpdateICMRegKeyA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_UpdateICMRegKeyA]
+ end;
+end;
+
+var
+ _UpdateICMRegKeyW: Pointer;
+
+function UpdateICMRegKeyW;
+begin
+ GetProcedureAddress(_UpdateICMRegKeyW, gdi32, 'UpdateICMRegKeyW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_UpdateICMRegKeyW]
+ end;
+end;
+
+var
+ _UpdateICMRegKey: Pointer;
+
+function UpdateICMRegKey;
+begin
+ GetProcedureAddress(_UpdateICMRegKey, gdi32, 'UpdateICMRegKey' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_UpdateICMRegKey]
+ end;
+end;
+
+var
+ _ColorCorrectPalette: Pointer;
+
+function ColorCorrectPalette;
+begin
+ GetProcedureAddress(_ColorCorrectPalette, gdi32, 'ColorCorrectPalette');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ColorCorrectPalette]
+ end;
+end;
+
+var
+ _wglCopyContext: Pointer;
+
+function wglCopyContext;
+begin
+ GetProcedureAddress(_wglCopyContext, opengl32, 'wglCopyContext');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_wglCopyContext]
+ end;
+end;
+
+var
+ _wglCreateContext: Pointer;
+
+function wglCreateContext;
+begin
+ GetProcedureAddress(_wglCreateContext, opengl32, 'wglCreateContext');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_wglCreateContext]
+ end;
+end;
+
+var
+ _wglCreateLayerContext: Pointer;
+
+function wglCreateLayerContext;
+begin
+ GetProcedureAddress(_wglCreateLayerContext, opengl32, 'wglCreateLayerContext');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_wglCreateLayerContext]
+ end;
+end;
+
+var
+ _wglDeleteContext: Pointer;
+
+function wglDeleteContext;
+begin
+ GetProcedureAddress(_wglDeleteContext, opengl32, 'wglDeleteContext');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_wglDeleteContext]
+ end;
+end;
+
+var
+ _wglGetCurrentContext: Pointer;
+
+function wglGetCurrentContext;
+begin
+ GetProcedureAddress(_wglGetCurrentContext, opengl32, 'wglGetCurrentContext');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_wglGetCurrentContext]
+ end;
+end;
+
+var
+ _wglGetCurrentDC: Pointer;
+
+function wglGetCurrentDC;
+begin
+ GetProcedureAddress(_wglGetCurrentDC, opengl32, 'wglGetCurrentDC');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_wglGetCurrentDC]
+ end;
+end;
+
+var
+ _wglGetProcAddress: Pointer;
+
+function wglGetProcAddress;
+begin
+ GetProcedureAddress(_wglGetProcAddress, opengl32, 'wglGetProcAddress');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_wglGetProcAddress]
+ end;
+end;
+
+var
+ _wglMakeCurrent: Pointer;
+
+function wglMakeCurrent;
+begin
+ GetProcedureAddress(_wglMakeCurrent, opengl32, 'wglMakeCurrent');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_wglMakeCurrent]
+ end;
+end;
+
+var
+ _wglShareLists: Pointer;
+
+function wglShareLists;
+begin
+ GetProcedureAddress(_wglShareLists, opengl32, 'wglShareLists');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_wglShareLists]
+ end;
+end;
+
+var
+ _wglUseFontBitmapsA: Pointer;
+
+function wglUseFontBitmapsA;
+begin
+ GetProcedureAddress(_wglUseFontBitmapsA, opengl32, 'wglUseFontBitmapsA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_wglUseFontBitmapsA]
+ end;
+end;
+
+var
+ _wglUseFontBitmapsW: Pointer;
+
+function wglUseFontBitmapsW;
+begin
+ GetProcedureAddress(_wglUseFontBitmapsW, opengl32, 'wglUseFontBitmapsW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_wglUseFontBitmapsW]
+ end;
+end;
+
+var
+ _wglUseFontBitmaps: Pointer;
+
+function wglUseFontBitmaps;
+begin
+ GetProcedureAddress(_wglUseFontBitmaps, opengl32, 'wglUseFontBitmaps' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_wglUseFontBitmaps]
+ end;
+end;
+
+var
+ _SwapBuffers: Pointer;
+
+function SwapBuffers;
+begin
+ GetProcedureAddress(_SwapBuffers, opengl32, 'SwapBuffers');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SwapBuffers]
+ end;
+end;
+
+var
+ _wglUseFontOutlinesA: Pointer;
+
+function wglUseFontOutlinesA;
+begin
+ GetProcedureAddress(_wglUseFontOutlinesA, opengl32, 'wglUseFontOutlinesA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_wglUseFontOutlinesA]
+ end;
+end;
+
+var
+ _wglUseFontOutlinesW: Pointer;
+
+function wglUseFontOutlinesW;
+begin
+ GetProcedureAddress(_wglUseFontOutlinesW, opengl32, 'wglUseFontOutlinesW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_wglUseFontOutlinesW]
+ end;
+end;
+
+var
+ _wglUseFontOutlines: Pointer;
+
+function wglUseFontOutlines;
+begin
+ GetProcedureAddress(_wglUseFontOutlines, opengl32, 'wglUseFontOutlines' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_wglUseFontOutlines]
+ end;
+end;
+
+var
+ _wglDescribeLayerPlane: Pointer;
+
+function wglDescribeLayerPlane;
+begin
+ GetProcedureAddress(_wglDescribeLayerPlane, opengl32, 'wglDescribeLayerPlane');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_wglDescribeLayerPlane]
+ end;
+end;
+
+var
+ _wglSetLayerPaletteEntries: Pointer;
+
+function wglSetLayerPaletteEntries;
+begin
+ GetProcedureAddress(_wglSetLayerPaletteEntries, opengl32, 'wglSetLayerPaletteEntries');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_wglSetLayerPaletteEntries]
+ end;
+end;
+
+var
+ _wglGetLayerPaletteEntries: Pointer;
+
+function wglGetLayerPaletteEntries;
+begin
+ GetProcedureAddress(_wglGetLayerPaletteEntries, opengl32, 'wglGetLayerPaletteEntries');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_wglGetLayerPaletteEntries]
+ end;
+end;
+
+var
+ _wglRealizeLayerPalette: Pointer;
+
+function wglRealizeLayerPalette;
+begin
+ GetProcedureAddress(_wglRealizeLayerPalette, opengl32, 'wglRealizeLayerPalette');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_wglRealizeLayerPalette]
+ end;
+end;
+
+var
+ _wglSwapLayerBuffers: Pointer;
+
+function wglSwapLayerBuffers;
+begin
+ GetProcedureAddress(_wglSwapLayerBuffers, opengl32, 'wglSwapLayerBuffers');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_wglSwapLayerBuffers]
+ end;
+end;
+
+var
+ _wglSwapMultipleBuffers: Pointer;
+
+function wglSwapMultipleBuffers;
+begin
+ GetProcedureAddress(_wglSwapMultipleBuffers, opengl32, 'wglSwapMultipleBuffers');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_wglSwapMultipleBuffers]
+ end;
+end;
+
+{$ELSE}
+
+function AddFontResourceA; external gdi32 name 'AddFontResourceA';
+function AddFontResourceW; external gdi32 name 'AddFontResourceW';
+function AddFontResource; external gdi32 name 'AddFontResource' + AWSuffix;
+function AnimatePalette; external gdi32 name 'AnimatePalette';
+function Arc; external gdi32 name 'Arc';
+function BitBlt; external gdi32 name 'BitBlt';
+function CancelDC; external gdi32 name 'CancelDC';
+function Chord; external gdi32 name 'Chord';
+function ChoosePixelFormat; external gdi32 name 'ChoosePixelFormat';
+function CloseMetaFile; external gdi32 name 'CloseMetaFile';
+function CombineRgn; external gdi32 name 'CombineRgn';
+function CopyMetaFileA; external gdi32 name 'CopyMetaFileA';
+function CopyMetaFileW; external gdi32 name 'CopyMetaFileW';
+function CopyMetaFile; external gdi32 name 'CopyMetaFile' + AWSuffix;
+function CreateBitmap; external gdi32 name 'CreateBitmap';
+function CreateBitmapIndirect; external gdi32 name 'CreateBitmapIndirect';
+function CreateBrushIndirect; external gdi32 name 'CreateBrushIndirect';
+function CreateCompatibleBitmap; external gdi32 name 'CreateCompatibleBitmap';
+function CreateDiscardableBitmap; external gdi32 name 'CreateDiscardableBitmap';
+function CreateCompatibleDC; external gdi32 name 'CreateCompatibleDC';
+function CreateDCA; external gdi32 name 'CreateDCA';
+function CreateDCW; external gdi32 name 'CreateDCW';
+function CreateDC; external gdi32 name 'CreateDC' + AWSuffix;
+function CreateDIBitmap; external gdi32 name 'CreateDIBitmap';
+function CreateDIBPatternBrush; external gdi32 name 'CreateDIBPatternBrush';
+function CreateDIBPatternBrushPt; external gdi32 name 'CreateDIBPatternBrushPt';
+function CreateEllipticRgn; external gdi32 name 'CreateEllipticRgn';
+function CreateEllipticRgnIndirect; external gdi32 name 'CreateEllipticRgnIndirect';
+function CreateFontIndirectA; external gdi32 name 'CreateFontIndirectA';
+function CreateFontIndirectW; external gdi32 name 'CreateFontIndirectW';
+function CreateFontIndirect; external gdi32 name 'CreateFontIndirect' + AWSuffix;
+function CreateFontA; external gdi32 name 'CreateFontA';
+function CreateFontW; external gdi32 name 'CreateFontW';
+function CreateFont; external gdi32 name 'CreateFont' + AWSuffix;
+function CreateHatchBrush; external gdi32 name 'CreateHatchBrush';
+function CreateICA; external gdi32 name 'CreateICA';
+function CreateICW; external gdi32 name 'CreateICW';
+function CreateIC; external gdi32 name 'CreateIC' + AWSuffix;
+function CreateMetaFileA; external gdi32 name 'CreateMetaFileA';
+function CreateMetaFileW; external gdi32 name 'CreateMetaFileW';
+function CreateMetaFile; external gdi32 name 'CreateMetaFile' + AWSuffix;
+function CreatePalette; external gdi32 name 'CreatePalette';
+function CreatePen; external gdi32 name 'CreatePen';
+function CreatePenIndirect; external gdi32 name 'CreatePenIndirect';
+function CreatePolyPolygonRgn; external gdi32 name 'CreatePolyPolygonRgn';
+function CreatePatternBrush; external gdi32 name 'CreatePatternBrush';
+function CreateRectRgn; external gdi32 name 'CreateRectRgn';
+function CreateRectRgnIndirect; external gdi32 name 'CreateRectRgnIndirect';
+function CreateRoundRectRgn; external gdi32 name 'CreateRoundRectRgn';
+function CreateScalableFontResourceA; external gdi32 name 'CreateScalableFontResourceA';
+function CreateScalableFontResourceW; external gdi32 name 'CreateScalableFontResourceW';
+function CreateScalableFontResource; external gdi32 name 'CreateScalableFontResource' + AWSuffix;
+function CreateSolidBrush; external gdi32 name 'CreateSolidBrush';
+function DeleteDC; external gdi32 name 'DeleteDC';
+function DeleteMetaFile; external gdi32 name 'DeleteMetaFile';
+function DeleteObject; external gdi32 name 'DeleteObject';
+function DescribePixelFormat; external gdi32 name 'DescribePixelFormat';
+function DeviceCapabilitiesA; external winspool32 name 'DeviceCapabilitiesA';
+function DeviceCapabilitiesW; external winspool32 name 'DeviceCapabilitiesW';
+function DeviceCapabilities; external winspool32 name 'DeviceCapabilities' + AWSuffix;
+function DrawEscape; external gdi32 name 'DrawEscape';
+function Ellipse; external gdi32 name 'Ellipse';
+function EnumFontFamiliesExA; external gdi32 name 'EnumFontFamiliesExA';
+function EnumFontFamiliesExW; external gdi32 name 'EnumFontFamiliesExW';
+function EnumFontFamiliesEx; external gdi32 name 'EnumFontFamiliesEx' + AWSuffix;
+function EnumFontFamiliesA; external gdi32 name 'EnumFontFamiliesA';
+function EnumFontFamiliesW; external gdi32 name 'EnumFontFamiliesW';
+function EnumFontFamilies; external gdi32 name 'EnumFontFamilies' + AWSuffix;
+function EnumFontsA; external gdi32 name 'EnumFontsA';
+function EnumFontsW; external gdi32 name 'EnumFontsW';
+function EnumFonts; external gdi32 name 'EnumFonts' + AWSuffix;
+function EnumObjects; external gdi32 name 'EnumObjects';
+function EqualRgn; external gdi32 name 'EqualRgn';
+function Escape; external gdi32 name 'Escape';
+function ExtEscape; external gdi32 name 'ExtEscape';
+function ExcludeClipRect; external gdi32 name 'ExcludeClipRect';
+function ExtCreateRegion; external gdi32 name 'ExtCreateRegion';
+function ExtFloodFill; external gdi32 name 'ExtFloodFill';
+function FillRgn; external gdi32 name 'FillRgn';
+function FloodFill; external gdi32 name 'FloodFill';
+function FrameRgn; external gdi32 name 'FrameRgn';
+function GetROP2; external gdi32 name 'GetROP2';
+function GetAspectRatioFilterEx; external gdi32 name 'GetAspectRatioFilterEx';
+function GetBkColor; external gdi32 name 'GetBkColor';
+function GetDCBrushColor; external gdi32 name 'GetDCBrushColor';
+function GetDCPenColor; external gdi32 name 'GetDCPenColor';
+function GetBkMode; external gdi32 name 'GetBkMode';
+function GetBitmapBits; external gdi32 name 'GetBitmapBits';
+function GetBitmapDimensionEx; external gdi32 name 'GetBitmapDimensionEx';
+function GetBoundsRect; external gdi32 name 'GetBoundsRect';
+function GetBrushOrgEx; external gdi32 name 'GetBrushOrgEx';
+function GetCharWidthA; external gdi32 name 'GetCharWidthA';
+function GetCharWidthW; external gdi32 name 'GetCharWidthW';
+function GetCharWidth; external gdi32 name 'GetCharWidth' + AWSuffix;
+function GetCharWidth32A; external gdi32 name 'GetCharWidth32A';
+function GetCharWidth32W; external gdi32 name 'GetCharWidth32W';
+function GetCharWidth32; external gdi32 name 'GetCharWidth32' + AWSuffix;
+function GetCharWidthFloatA; external gdi32 name 'GetCharWidthFloatA';
+function GetCharWidthFloatW; external gdi32 name 'GetCharWidthFloatW';
+function GetCharWidthFloat; external gdi32 name 'GetCharWidthFloat' + AWSuffix;
+function GetCharABCWidthsA; external gdi32 name 'GetCharABCWidthsA';
+function GetCharABCWidthsW; external gdi32 name 'GetCharABCWidthsW';
+function GetCharABCWidths; external gdi32 name 'GetCharABCWidths' + AWSuffix;
+function GetCharABCWidthsFloatA; external gdi32 name 'GetCharABCWidthsFloatA';
+function GetCharABCWidthsFloatW; external gdi32 name 'GetCharABCWidthsFloatW';
+function GetCharABCWidthsFloat; external gdi32 name 'GetCharABCWidthsFloat' + AWSuffix;
+function GetClipBox; external gdi32 name 'GetClipBox';
+function GetClipRgn; external gdi32 name 'GetClipRgn';
+function GetMetaRgn; external gdi32 name 'GetMetaRgn';
+function GetCurrentObject; external gdi32 name 'GetCurrentObject';
+function GetCurrentPositionEx; external gdi32 name 'GetCurrentPositionEx';
+function GetDeviceCaps; external gdi32 name 'GetDeviceCaps';
+function GetDIBits; external gdi32 name 'GetDIBits';
+function GetFontData; external gdi32 name 'GetFontData';
+function GetGlyphOutlineA; external gdi32 name 'GetGlyphOutlineA';
+function GetGlyphOutlineW; external gdi32 name 'GetGlyphOutlineW';
+function GetGlyphOutline; external gdi32 name 'GetGlyphOutline' + AWSuffix;
+function GetGraphicsMode; external gdi32 name 'GetGraphicsMode';
+function GetMapMode; external gdi32 name 'GetMapMode';
+function GetMetaFileBitsEx; external gdi32 name 'GetMetaFileBitsEx';
+function GetMetaFileA; external gdi32 name 'GetMetaFileA';
+function GetMetaFileW; external gdi32 name 'GetMetaFileW';
+function GetMetaFile; external gdi32 name 'GetMetaFile' + AWSuffix;
+function GetNearestColor; external gdi32 name 'GetNearestColor';
+function GetNearestPaletteIndex; external gdi32 name 'GetNearestPaletteIndex';
+function GetObjectType; external gdi32 name 'GetObjectType';
+function GetOutlineTextMetricsA; external gdi32 name 'GetOutlineTextMetricsA';
+function GetOutlineTextMetricsW; external gdi32 name 'GetOutlineTextMetricsW';
+function GetOutlineTextMetrics; external gdi32 name 'GetOutlineTextMetrics' + AWSuffix;
+function GetPaletteEntries; external gdi32 name 'GetPaletteEntries';
+function GetPixel; external gdi32 name 'GetPixel';
+function GetPixelFormat; external gdi32 name 'GetPixelFormat';
+function GetPolyFillMode; external gdi32 name 'GetPolyFillMode';
+function GetRasterizerCaps; external gdi32 name 'GetRasterizerCaps';
+function GetRandomRgn; external gdi32 name 'GetRandomRgn';
+function GetRegionData; external gdi32 name 'GetRegionData';
+function GetRgnBox; external gdi32 name 'GetRgnBox';
+function GetStockObject; external gdi32 name 'GetStockObject';
+function GetStretchBltMode; external gdi32 name 'GetStretchBltMode';
+function GetSystemPaletteEntries; external gdi32 name 'GetSystemPaletteEntries';
+function GetSystemPaletteUse; external gdi32 name 'GetSystemPaletteUse';
+function GetTextCharacterExtra; external gdi32 name 'GetTextCharacterExtra';
+function GetTextAlign; external gdi32 name 'GetTextAlign';
+function GetTextColor; external gdi32 name 'GetTextColor';
+function GetTextExtentPointA; external gdi32 name 'GetTextExtentPointA';
+function GetTextExtentPointW; external gdi32 name 'GetTextExtentPointW';
+function GetTextExtentPoint; external gdi32 name 'GetTextExtentPoint' + AWSuffix;
+function GetTextExtentPoint32A; external gdi32 name 'GetTextExtentPoint32A';
+function GetTextExtentPoint32W; external gdi32 name 'GetTextExtentPoint32W';
+function GetTextExtentPoint32; external gdi32 name 'GetTextExtentPoint32' + AWSuffix;
+function GetTextExtentExPointA; external gdi32 name 'GetTextExtentExPointA';
+function GetTextExtentExPointW; external gdi32 name 'GetTextExtentExPointW';
+function GetTextExtentExPoint; external gdi32 name 'GetTextExtentExPoint' + AWSuffix;
+function GetTextCharset; external gdi32 name 'GetTextCharset';
+function GetTextCharsetInfo; external gdi32 name 'GetTextCharsetInfo';
+function TranslateCharsetInfo; external gdi32 name 'TranslateCharsetInfo';
+function GetFontLanguageInfo; external gdi32 name 'GetFontLanguageInfo';
+function GetCharacterPlacementA; external gdi32 name 'GetCharacterPlacementA';
+function GetCharacterPlacementW; external gdi32 name 'GetCharacterPlacementW';
+function GetCharacterPlacement; external gdi32 name 'GetCharacterPlacement' + AWSuffix;
+function GetFontUnicodeRanges; external gdi32 name 'GetFontUnicodeRanges';
+function GetGlyphIndicesA; external gdi32 name 'GetGlyphIndicesA';
+function GetGlyphIndicesW; external gdi32 name 'GetGlyphIndicesW';
+function GetGlyphIndices; external gdi32 name 'GetGlyphIndices' + AWSuffix;
+function GetTextExtentPointI; external gdi32 name 'GetTextExtentPointI';
+function GetTextExtentExPointI; external gdi32 name 'GetTextExtentExPointI';
+function GetCharWidthI; external gdi32 name 'GetCharWidthI';
+function GetCharABCWidthsI; external gdi32 name 'GetCharABCWidthsI';
+function AddFontResourceExA; external gdi32 name 'AddFontResourceExA';
+function AddFontResourceExW; external gdi32 name 'AddFontResourceExW';
+function AddFontResourceEx; external gdi32 name 'AddFontResourceEx' + AWSuffix;
+function RemoveFontResourceExA; external gdi32 name 'RemoveFontResourceExA';
+function RemoveFontResourceExW; external gdi32 name 'RemoveFontResourceExW';
+function RemoveFontResourceEx; external gdi32 name 'RemoveFontResourceEx' + AWSuffix;
+function AddFontMemResourceEx; external gdi32 name 'AddFontMemResourceEx';
+function RemoveFontMemResourceEx; external gdi32 name 'RemoveFontMemResourceEx';
+function CreateFontIndirectExA; external gdi32 name 'CreateFontIndirectExA';
+function CreateFontIndirectExW; external gdi32 name 'CreateFontIndirectExW';
+function CreateFontIndirectEx; external gdi32 name 'CreateFontIndirectEx' + AWSuffix;
+function GetViewportExtEx; external gdi32 name 'GetViewportExtEx';
+function GetViewportOrgEx; external gdi32 name 'GetViewportOrgEx';
+function GetWindowExtEx; external gdi32 name 'GetWindowExtEx';
+function GetWindowOrgEx; external gdi32 name 'GetWindowOrgEx';
+function IntersectClipRect; external gdi32 name 'IntersectClipRect';
+function InvertRgn; external gdi32 name 'InvertRgn';
+function LineDDA; external gdi32 name 'LineDDA';
+function LineTo; external gdi32 name 'LineTo';
+function MaskBlt; external gdi32 name 'MaskBlt';
+function PlgBlt; external gdi32 name 'PlgBlt';
+function OffsetClipRgn; external gdi32 name 'OffsetClipRgn';
+function OffsetRgn; external gdi32 name 'OffsetRgn';
+function PatBlt; external gdi32 name 'PatBlt';
+function Pie; external gdi32 name 'Pie';
+function PlayMetaFile; external gdi32 name 'PlayMetaFile';
+function PaintRgn; external gdi32 name 'PaintRgn';
+function PolyPolygon; external gdi32 name 'PolyPolygon';
+function PtInRegion; external gdi32 name 'PtInRegion';
+function PtVisible; external gdi32 name 'PtVisible';
+function RectInRegion; external gdi32 name 'RectInRegion';
+function RectVisible; external gdi32 name 'RectVisible';
+function Rectangle; external gdi32 name 'Rectangle';
+function RestoreDC; external gdi32 name 'RestoreDC';
+function ResetDCA; external gdi32 name 'ResetDCA';
+function ResetDCW; external gdi32 name 'ResetDCW';
+function ResetDC; external gdi32 name 'ResetDC' + AWSuffix;
+function RealizePalette; external gdi32 name 'RealizePalette';
+function RemoveFontResourceA; external gdi32 name 'RemoveFontResourceA';
+function RemoveFontResourceW; external gdi32 name 'RemoveFontResourceW';
+function RemoveFontResource; external gdi32 name 'RemoveFontResource' + AWSuffix;
+function RoundRect; external gdi32 name 'RoundRect';
+function ResizePalette; external gdi32 name 'ResizePalette';
+function SaveDC; external gdi32 name 'SaveDC';
+function SelectClipRgn; external gdi32 name 'SelectClipRgn';
+function ExtSelectClipRgn; external gdi32 name 'ExtSelectClipRgn';
+function SetMetaRgn; external gdi32 name 'SetMetaRgn';
+function SelectObject; external gdi32 name 'SelectObject';
+function SelectPalette; external gdi32 name 'SelectPalette';
+function SetBkColor; external gdi32 name 'SetBkColor';
+function SetDCBrushColor; external gdi32 name 'SetDCBrushColor';
+function SetDCPenColor; external gdi32 name 'SetDCPenColor';
+function SetBkMode; external gdi32 name 'SetBkMode';
+function SetBitmapBits; external gdi32 name 'SetBitmapBits';
+function SetBoundsRect; external gdi32 name 'SetBoundsRect';
+function SetDIBits; external gdi32 name 'SetDIBits';
+function SetDIBitsToDevice; external gdi32 name 'SetDIBitsToDevice';
+function SetMapperFlags; external gdi32 name 'SetMapperFlags';
+function SetGraphicsMode; external gdi32 name 'SetGraphicsMode';
+function SetMapMode; external gdi32 name 'SetMapMode';
+function SetLayout; external gdi32 name 'SetLayout';
+function GetLayout; external gdi32 name 'GetLayout';
+function SetMetaFileBitsEx; external gdi32 name 'SetMetaFileBitsEx';
+function SetPaletteEntries; external gdi32 name 'SetPaletteEntries';
+function SetPixel; external gdi32 name 'SetPixel';
+function SetPixelV; external gdi32 name 'SetPixelV';
+function SetPixelFormat; external gdi32 name 'SetPixelFormat';
+function SetPolyFillMode; external gdi32 name 'SetPolyFillMode';
+function StretchBlt; external gdi32 name 'StretchBlt';
+function SetRectRgn; external gdi32 name 'SetRectRgn';
+function StretchDIBits; external gdi32 name 'StretchDIBits';
+function SetROP2; external gdi32 name 'SetROP2';
+function SetStretchBltMode; external gdi32 name 'SetStretchBltMode';
+function SetSystemPaletteUse; external gdi32 name 'SetSystemPaletteUse';
+function SetTextCharacterExtra; external gdi32 name 'SetTextCharacterExtra';
+function SetTextColor; external gdi32 name 'SetTextColor';
+function SetTextAlign; external gdi32 name 'SetTextAlign';
+function SetTextJustification; external gdi32 name 'SetTextJustification';
+function UpdateColors; external gdi32 name 'UpdateColors';
+function AlphaBlend; external msimg32 name 'AlphaBlend';
+function TransparentBlt; external msimg32 name 'TransparentBlt';
+function GradientFill; external msimg32 name 'GradientFill';
+function PlayMetaFileRecord; external gdi32 name 'PlayMetaFileRecord';
+function EnumMetaFile; external gdi32 name 'EnumMetaFile';
+function CloseEnhMetaFile; external gdi32 name 'CloseEnhMetaFile';
+function CopyEnhMetaFileA; external gdi32 name 'CopyEnhMetaFileA';
+function CopyEnhMetaFileW; external gdi32 name 'CopyEnhMetaFileW';
+function CopyEnhMetaFile; external gdi32 name 'CopyEnhMetaFile' + AWSuffix;
+function CreateEnhMetaFileA; external gdi32 name 'CreateEnhMetaFileA';
+function CreateEnhMetaFileW; external gdi32 name 'CreateEnhMetaFileW';
+function CreateEnhMetaFile; external gdi32 name 'CreateEnhMetaFile' + AWSuffix;
+function DeleteEnhMetaFile; external gdi32 name 'DeleteEnhMetaFile';
+function EnumEnhMetaFile; external gdi32 name 'EnumEnhMetaFile';
+function GetEnhMetaFileA; external gdi32 name 'GetEnhMetaFileA';
+function GetEnhMetaFileW; external gdi32 name 'GetEnhMetaFileW';
+function GetEnhMetaFile; external gdi32 name 'GetEnhMetaFile' + AWSuffix;
+function GetEnhMetaFileBits; external gdi32 name 'GetEnhMetaFileBits';
+function GetEnhMetaFileDescriptionA; external gdi32 name 'GetEnhMetaFileDescriptionA';
+function GetEnhMetaFileDescriptionW; external gdi32 name 'GetEnhMetaFileDescriptionW';
+function GetEnhMetaFileDescription; external gdi32 name 'GetEnhMetaFileDescription' + AWSuffix;
+function GetEnhMetaFileHeader; external gdi32 name 'GetEnhMetaFileHeader';
+function GetEnhMetaFilePaletteEntries; external gdi32 name 'GetEnhMetaFilePaletteEntries';
+function GetEnhMetaFilePixelFormat; external gdi32 name 'GetEnhMetaFilePixelFormat';
+function GetWinMetaFileBits; external gdi32 name 'GetWinMetaFileBits';
+function PlayEnhMetaFile; external gdi32 name 'PlayEnhMetaFile';
+function PlayEnhMetaFileRecord; external gdi32 name 'PlayEnhMetaFileRecord';
+function SetEnhMetaFileBits; external gdi32 name 'SetEnhMetaFileBits';
+function SetWinMetaFileBits; external gdi32 name 'SetWinMetaFileBits';
+function GdiComment; external gdi32 name 'GdiComment';
+function GetTextMetricsA; external gdi32 name 'GetTextMetricsA';
+function GetTextMetricsW; external gdi32 name 'GetTextMetricsW';
+function GetTextMetrics; external gdi32 name 'GetTextMetrics' + AWSuffix;
+function AngleArc; external gdi32 name 'AngleArc';
+function PolyPolyline; external gdi32 name 'PolyPolyline';
+function GetWorldTransform; external gdi32 name 'GetWorldTransform';
+function SetWorldTransform; external gdi32 name 'SetWorldTransform';
+function ModifyWorldTransform; external gdi32 name 'ModifyWorldTransform';
+function CombineTransform; external gdi32 name 'CombineTransform';
+function CreateDIBSection; external gdi32 name 'CreateDIBSection';
+function GetDIBColorTable; external gdi32 name 'GetDIBColorTable';
+function SetDIBColorTable; external gdi32 name 'SetDIBColorTable';
+function SetColorAdjustment; external gdi32 name 'SetColorAdjustment';
+function GetColorAdjustment; external gdi32 name 'GetColorAdjustment';
+function CreateHalftonePalette; external gdi32 name 'CreateHalftonePalette';
+function StartDocA; external gdi32 name 'StartDocA';
+function StartDocW; external gdi32 name 'StartDocW';
+function StartDoc; external gdi32 name 'StartDoc' + AWSuffix;
+function EndDoc; external gdi32 name 'EndDoc';
+function StartPage; external gdi32 name 'StartPage';
+function EndPage; external gdi32 name 'EndPage';
+function AbortDoc; external gdi32 name 'AbortDoc';
+function SetAbortProc; external gdi32 name 'SetAbortProc';
+function AbortPath; external gdi32 name 'AbortPath';
+function ArcTo; external gdi32 name 'ArcTo';
+function BeginPath; external gdi32 name 'BeginPath';
+function CloseFigure; external gdi32 name 'CloseFigure';
+function EndPath; external gdi32 name 'EndPath';
+function FillPath; external gdi32 name 'FillPath';
+function FlattenPath; external gdi32 name 'FlattenPath';
+function GetPath; external gdi32 name 'GetPath';
+function PathToRegion; external gdi32 name 'PathToRegion';
+function PolyDraw; external gdi32 name 'PolyDraw';
+function SelectClipPath; external gdi32 name 'SelectClipPath';
+function SetArcDirection; external gdi32 name 'SetArcDirection';
+function SetMiterLimit; external gdi32 name 'SetMiterLimit';
+function StrokeAndFillPath; external gdi32 name 'StrokeAndFillPath';
+function StrokePath; external gdi32 name 'StrokePath';
+function WidenPath; external gdi32 name 'WidenPath';
+function ExtCreatePen; external gdi32 name 'ExtCreatePen';
+function GetMiterLimit; external gdi32 name 'GetMiterLimit';
+function GetArcDirection; external gdi32 name 'GetArcDirection';
+function GetObjectA; external gdi32 name 'GetObjectA';
+function GetObjectW; external gdi32 name 'GetObjectW';
+function GetObject; external gdi32 name 'GetObject' + AWSuffix;
+function MoveToEx; external gdi32 name 'MoveToEx';
+function TextOutA; external gdi32 name 'TextOutA';
+function TextOutW; external gdi32 name 'TextOutW';
+function TextOut; external gdi32 name 'TextOut' + AWSuffix;
+function ExtTextOutA; external gdi32 name 'ExtTextOutA';
+function ExtTextOutW; external gdi32 name 'ExtTextOutW';
+function ExtTextOut; external gdi32 name 'ExtTextOut' + AWSuffix;
+function PolyTextOutA; external gdi32 name 'PolyTextOutA';
+function PolyTextOutW; external gdi32 name 'PolyTextOutW';
+function PolyTextOut; external gdi32 name 'PolyTextOut' + AWSuffix;
+function CreatePolygonRgn; external gdi32 name 'CreatePolygonRgn';
+function DPtoLP; external gdi32 name 'DPtoLP';
+function LPtoDP; external gdi32 name 'LPtoDP';
+function Polygon; external gdi32 name 'Polygon';
+function Polyline; external gdi32 name 'Polyline';
+function PolyBezier; external gdi32 name 'PolyBezier';
+function PolyBezierTo; external gdi32 name 'PolyBezierTo';
+function PolylineTo; external gdi32 name 'PolylineTo';
+function SetViewportExtEx; external gdi32 name 'SetViewportExtEx';
+function SetViewportOrgEx; external gdi32 name 'SetViewportOrgEx';
+function SetWindowExtEx; external gdi32 name 'SetWindowExtEx';
+function SetWindowOrgEx; external gdi32 name 'SetWindowOrgEx';
+function OffsetViewportOrgEx; external gdi32 name 'OffsetViewportOrgEx';
+function OffsetWindowOrgEx; external gdi32 name 'OffsetWindowOrgEx';
+function ScaleViewportExtEx; external gdi32 name 'ScaleViewportExtEx';
+function ScaleWindowExtEx; external gdi32 name 'ScaleWindowExtEx';
+function SetBitmapDimensionEx; external gdi32 name 'SetBitmapDimensionEx';
+function SetBrushOrgEx; external gdi32 name 'SetBrushOrgEx';
+function GetTextFaceA; external gdi32 name 'GetTextFaceA';
+function GetTextFaceW; external gdi32 name 'GetTextFaceW';
+function GetTextFace; external gdi32 name 'GetTextFace' + AWSuffix;
+function GetKerningPairsA; external gdi32 name 'GetKerningPairsA';
+function GetKerningPairsW; external gdi32 name 'GetKerningPairsW';
+function GetKerningPairs; external gdi32 name 'GetKerningPairs' + AWSuffix;
+function GetDCOrgEx; external gdi32 name 'GetDCOrgEx';
+function FixBrushOrgEx; external gdi32 name 'FixBrushOrgEx';
+function UnrealizeObject; external gdi32 name 'UnrealizeObject';
+function GdiFlush; external gdi32 name 'GdiFlush';
+function GdiSetBatchLimit; external gdi32 name 'GdiSetBatchLimit';
+function GdiGetBatchLimit; external gdi32 name 'GdiGetBatchLimit';
+function SetICMMode; external gdi32 name 'SetICMMode';
+function CheckColorsInGamut; external gdi32 name 'CheckColorsInGamut';
+function GetColorSpace; external gdi32 name 'GetColorSpace';
+function GetLogColorSpaceA; external gdi32 name 'GetLogColorSpaceA';
+function GetLogColorSpaceW; external gdi32 name 'GetLogColorSpaceW';
+function GetLogColorSpace; external gdi32 name 'GetLogColorSpace' + AWSuffix;
+function CreateColorSpaceA; external gdi32 name 'CreateColorSpaceA';
+function CreateColorSpaceW; external gdi32 name 'CreateColorSpaceW';
+function CreateColorSpace; external gdi32 name 'CreateColorSpace' + AWSuffix;
+function SetColorSpace; external gdi32 name 'SetColorSpace';
+function DeleteColorSpace; external gdi32 name 'DeleteColorSpace';
+function GetICMProfileA; external gdi32 name 'GetICMProfileA';
+function GetICMProfileW; external gdi32 name 'GetICMProfileW';
+function GetICMProfile; external gdi32 name 'GetICMProfile' + AWSuffix;
+function SetICMProfileA; external gdi32 name 'SetICMProfileA';
+function SetICMProfileW; external gdi32 name 'SetICMProfileW';
+function SetICMProfile; external gdi32 name 'SetICMProfile' + AWSuffix;
+function GetDeviceGammaRamp; external gdi32 name 'GetDeviceGammaRamp';
+function SetDeviceGammaRamp; external gdi32 name 'SetDeviceGammaRamp';
+function ColorMatchToTarget; external gdi32 name 'ColorMatchToTarget';
+function EnumICMProfilesA; external gdi32 name 'EnumICMProfilesA';
+function EnumICMProfilesW; external gdi32 name 'EnumICMProfilesW';
+function EnumICMProfiles; external gdi32 name 'EnumICMProfiles' + AWSuffix;
+function UpdateICMRegKeyA; external gdi32 name 'UpdateICMRegKeyA';
+function UpdateICMRegKeyW; external gdi32 name 'UpdateICMRegKeyW';
+function UpdateICMRegKey; external gdi32 name 'UpdateICMRegKey' + AWSuffix;
+function ColorCorrectPalette; external gdi32 name 'ColorCorrectPalette';
+function wglCopyContext; external opengl32 name 'wglCopyContext';
+function wglCreateContext; external opengl32 name 'wglCreateContext';
+function wglCreateLayerContext; external opengl32 name 'wglCreateLayerContext';
+function wglDeleteContext; external opengl32 name 'wglDeleteContext';
+function wglGetCurrentContext; external opengl32 name 'wglGetCurrentContext';
+function wglGetCurrentDC; external opengl32 name 'wglGetCurrentDC';
+function wglGetProcAddress; external opengl32 name 'wglGetProcAddress';
+function wglMakeCurrent; external opengl32 name 'wglMakeCurrent';
+function wglShareLists; external opengl32 name 'wglShareLists';
+function wglUseFontBitmapsA; external opengl32 name 'wglUseFontBitmapsA';
+function wglUseFontBitmapsW; external opengl32 name 'wglUseFontBitmapsW';
+function wglUseFontBitmaps; external opengl32 name 'wglUseFontBitmaps' + AWSuffix;
+function SwapBuffers; external opengl32 name 'SwapBuffers';
+function wglUseFontOutlinesA; external opengl32 name 'wglUseFontOutlinesA';
+function wglUseFontOutlinesW; external opengl32 name 'wglUseFontOutlinesW';
+function wglUseFontOutlines; external opengl32 name 'wglUseFontOutlines' + AWSuffix;
+function wglDescribeLayerPlane; external opengl32 name 'wglDescribeLayerPlane';
+function wglSetLayerPaletteEntries; external opengl32 name 'wglSetLayerPaletteEntries';
+function wglGetLayerPaletteEntries; external opengl32 name 'wglGetLayerPaletteEntries';
+function wglRealizeLayerPalette; external opengl32 name 'wglRealizeLayerPalette';
+function wglSwapLayerBuffers; external opengl32 name 'wglSwapLayerBuffers';
+function wglSwapMultipleBuffers; external opengl32 name 'wglSwapMultipleBuffers';
+
+{$ENDIF DYNAMIC_LINK}
+
+end.
diff --git a/packages/extra/winunits/jwawinioctl.pas b/packages/extra/winunits/jwawinioctl.pas
index c634b1be66..e1d77beec7 100644
--- a/packages/extra/winunits/jwawinioctl.pas
+++ b/packages/extra/winunits/jwawinioctl.pas
@@ -1,5006 +1,5006 @@
-{******************************************************************************}
-{ }
-{ I/O Control Codes API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: winioctl.h, released June 2000. The original Pascal }
-{ code is: WinIoCtl.pas, released December 2000. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwawinioctl.pas,v 1.1 2005/04/04 07:56:11 marco Exp $
-
-unit JwaWinIoctl;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "WinIoCtl.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaWinNT, JwaWinType;
-
-//
-// Device interface class GUIDs.
-//
-// need these GUIDs outside conditional includes so that user can
-// #include <winioctl.h> in precompiled header
-// #include <initguid.h> in a single source file
-// #include <winioctl.h> in that source file a second time to instantiate the GUIDs
-//
-
-const
- GUID_DEVINTERFACE_DISK: TGUID = (
- D1:$53f56307; D2:$b6bf; D3:$11d0; D4:($94, $f2, $00, $a0, $c9, $1e, $fb, $8b));
- {$EXTERNALSYM GUID_DEVINTERFACE_DISK}
- GUID_DEVINTERFACE_CDROM: TGUID = (
- D1:$53f56308; D2:$b6bf; D3:$11d0; D4:($94, $f2, $00, $a0, $c9, $1e, $fb, $8b));
- {$EXTERNALSYM GUID_DEVINTERFACE_CDROM}
- GUID_DEVINTERFACE_PARTITION: TGUID = (
- D1:$53f5630a; D2:$b6bf; D3:$11d0; D4:($94, $f2, $00, $a0, $c9, $1e, $fb, $8b));
- {$EXTERNALSYM GUID_DEVINTERFACE_PARTITION}
- GUID_DEVINTERFACE_TAPE: TGUID = (
- D1:$53f5630b; D2:$b6bf; D3:$11d0; D4:($94, $f2, $00, $a0, $c9, $1e, $fb, $8b));
- {$EXTERNALSYM GUID_DEVINTERFACE_TAPE}
- GUID_DEVINTERFACE_WRITEONCEDISK: TGUID = (
- D1:$53f5630c; D2:$b6bf; D3:$11d0; D4:($94, $f2, $00, $a0, $c9, $1e, $fb, $8b));
- {$EXTERNALSYM GUID_DEVINTERFACE_WRITEONCEDISK}
- GUID_DEVINTERFACE_VOLUME: TGUID = (
- D1:$53f5630d; D2:$b6bf; D3:$11d0; D4:($94, $f2, $00, $a0, $c9, $1e, $fb, $8b));
- {$EXTERNALSYM GUID_DEVINTERFACE_VOLUME}
- GUID_DEVINTERFACE_MEDIUMCHANGER: TGUID = (
- D1:$53f56310; D2:$b6bf; D3:$11d0; D4:($94, $f2, $00, $a0, $c9, $1e, $fb, $8b));
- {$EXTERNALSYM GUID_DEVINTERFACE_MEDIUMCHANGER}
- GUID_DEVINTERFACE_FLOPPY: TGUID = (
- D1:$53f56311; D2:$b6bf; D3:$11d0; D4:($94, $f2, $00, $a0, $c9, $1e, $fb, $8b));
- {$EXTERNALSYM GUID_DEVINTERFACE_FLOPPY}
- GUID_DEVINTERFACE_CDCHANGER: TGUID = (
- D1:$53f56312; D2:$b6bf; D3:$11d0; D4:($94, $f2, $00, $a0, $c9, $1e, $fb, $8b));
- {$EXTERNALSYM GUID_DEVINTERFACE_CDCHANGER}
- GUID_DEVINTERFACE_STORAGEPORT: TGUID = (
- D1:$2accfe60; D2:$c130; D3:$11d2; D4:($b0, $82, $00, $a0, $c9, $1e, $fb, $8b));
- {$EXTERNALSYM GUID_DEVINTERFACE_STORAGEPORT}
- GUID_DEVINTERFACE_COMPORT: TGUID = (
- D1:$86e0d1e0; D2:$8089; D3:$11d0; D4:($9c, $e4, $08, $00, $3e, $30, $1f, $73));
- {$EXTERNALSYM GUID_DEVINTERFACE_COMPORT}
- GUID_DEVINTERFACE_SERENUM_BUS_ENUMERATOR: TGUID = (
- D1:$4D36E978; D2:$E325; D3:$11CE; D4:($BF, $C1, $08, $00, $2B, $E1, $03, $18));
- {$EXTERNALSYM GUID_DEVINTERFACE_SERENUM_BUS_ENUMERATOR}
-
-//
-// Obsolete device interface class GUID names.
-// (use of above GUID_DEVINTERFACE_* names is recommended).
-//
-
- // MVB: Note that these "constants" are in reality aliases for the list above. Unfortunately you can't
- // define a GUID without using a type constant and you can't alias a type constant in Delphi...
-
- DiskClassGuid: TGUID = (
- D1:$53f56307; D2:$b6bf; D3:$11d0; D4:($94, $f2, $00, $a0, $c9, $1e, $fb, $8b));
- {$EXTERNALSYM DiskClassGuid}
- CdRomClassGuid: TGUID = (
- D1:$53f56308; D2:$b6bf; D3:$11d0; D4:($94, $f2, $00, $a0, $c9, $1e, $fb, $8b));
- {$EXTERNALSYM CdRomClassGuid}
- PartitionClassGuid: TGUID = (
- D1:$53f5630a; D2:$b6bf; D3:$11d0; D4:($94, $f2, $00, $a0, $c9, $1e, $fb, $8b));
- {$EXTERNALSYM PartitionClassGuid}
- TapeClassGuid: TGUID = (
- D1:$53f5630b; D2:$b6bf; D3:$11d0; D4:($94, $f2, $00, $a0, $c9, $1e, $fb, $8b));
- {$EXTERNALSYM TapeClassGuid}
- WriteOnceDiskClassGuid: TGUID = (
- D1:$53f5630c; D2:$b6bf; D3:$11d0; D4:($94, $f2, $00, $a0, $c9, $1e, $fb, $8b));
- {$EXTERNALSYM WriteOnceDiskClassGuid}
- VolumeClassGuid: TGUID = (
- D1:$53f5630d; D2:$b6bf; D3:$11d0; D4:($94, $f2, $00, $a0, $c9, $1e, $fb, $8b));
- {$EXTERNALSYM VolumeClassGuid}
- MediumChangerClassGuid: TGUID = (
- D1:$53f56310; D2:$b6bf; D3:$11d0; D4:($94, $f2, $00, $a0, $c9, $1e, $fb, $8b));
- {$EXTERNALSYM MediumChangerClassGuid}
- FloppyClassGuid: TGUID = (
- D1:$53f56311; D2:$b6bf; D3:$11d0; D4:($94, $f2, $00, $a0, $c9, $1e, $fb, $8b));
- {$EXTERNALSYM FloppyClassGuid}
- CdChangerClassGuid: TGUID = (
- D1:$53f56312; D2:$b6bf; D3:$11d0; D4:($94, $f2, $00, $a0, $c9, $1e, $fb, $8b));
- {$EXTERNALSYM CdChangerClassGuid}
- StoragePortClassGuid: TGUID = (
- D1:$2accfe60; D2:$c130; D3:$11d2; D4:($b0, $82, $00, $a0, $c9, $1e, $fb, $8b));
- {$EXTERNALSYM StoragePortClassGuid}
- GUID_CLASS_COMPORT: TGUID = (
- D1:$86e0d1e0; D2:$8089; D3:$11d0; D4:($9c, $e4, $08, $00, $3e, $30, $1f, $73));
- {$EXTERNALSYM GUID_CLASS_COMPORT}
- GUID_SERENUM_BUS_ENUMERATOR: TGUID = (
- D1:$4D36E978; D2:$E325; D3:$11CE; D4:($BF, $C1, $08, $00, $2B, $E1, $03, $18));
- {$EXTERNALSYM GUID_SERENUM_BUS_ENUMERATOR}
-
-//
-// Define the various device type values. Note that values used by Microsoft
-// Corporation are in the range 0-32767, and 32768-65535 are reserved for use
-// by customers.
-//
-
-type
- DEVICE_TYPE = DWORD;
- {$EXTERNALSYM DEVICE_TYPE}
-
-const
- FILE_DEVICE_BEEP = $00000001;
- {$EXTERNALSYM FILE_DEVICE_BEEP}
- FILE_DEVICE_CD_ROM = $00000002;
- {$EXTERNALSYM FILE_DEVICE_CD_ROM}
- FILE_DEVICE_CD_ROM_FILE_SYSTEM = $00000003;
- {$EXTERNALSYM FILE_DEVICE_CD_ROM_FILE_SYSTEM}
- FILE_DEVICE_CONTROLLER = $00000004;
- {$EXTERNALSYM FILE_DEVICE_CONTROLLER}
- FILE_DEVICE_DATALINK = $00000005;
- {$EXTERNALSYM FILE_DEVICE_DATALINK}
- FILE_DEVICE_DFS = $00000006;
- {$EXTERNALSYM FILE_DEVICE_DFS}
- FILE_DEVICE_DISK = $00000007;
- {$EXTERNALSYM FILE_DEVICE_DISK}
- FILE_DEVICE_DISK_FILE_SYSTEM = $00000008;
- {$EXTERNALSYM FILE_DEVICE_DISK_FILE_SYSTEM}
- FILE_DEVICE_FILE_SYSTEM = $00000009;
- {$EXTERNALSYM FILE_DEVICE_FILE_SYSTEM}
- FILE_DEVICE_INPORT_PORT = $0000000a;
- {$EXTERNALSYM FILE_DEVICE_INPORT_PORT}
- FILE_DEVICE_KEYBOARD = $0000000b;
- {$EXTERNALSYM FILE_DEVICE_KEYBOARD}
- FILE_DEVICE_MAILSLOT = $0000000c;
- {$EXTERNALSYM FILE_DEVICE_MAILSLOT}
- FILE_DEVICE_MIDI_IN = $0000000d;
- {$EXTERNALSYM FILE_DEVICE_MIDI_IN}
- FILE_DEVICE_MIDI_OUT = $0000000e;
- {$EXTERNALSYM FILE_DEVICE_MIDI_OUT}
- FILE_DEVICE_MOUSE = $0000000f;
- {$EXTERNALSYM FILE_DEVICE_MOUSE}
- FILE_DEVICE_MULTI_UNC_PROVIDER = $00000010;
- {$EXTERNALSYM FILE_DEVICE_MULTI_UNC_PROVIDER}
- FILE_DEVICE_NAMED_PIPE = $00000011;
- {$EXTERNALSYM FILE_DEVICE_NAMED_PIPE}
- FILE_DEVICE_NETWORK = $00000012;
- {$EXTERNALSYM FILE_DEVICE_NETWORK}
- FILE_DEVICE_NETWORK_BROWSER = $00000013;
- {$EXTERNALSYM FILE_DEVICE_NETWORK_BROWSER}
- FILE_DEVICE_NETWORK_FILE_SYSTEM = $00000014;
- {$EXTERNALSYM FILE_DEVICE_NETWORK_FILE_SYSTEM}
- FILE_DEVICE_NULL = $00000015;
- {$EXTERNALSYM FILE_DEVICE_NULL}
- FILE_DEVICE_PARALLEL_PORT = $00000016;
- {$EXTERNALSYM FILE_DEVICE_PARALLEL_PORT}
- FILE_DEVICE_PHYSICAL_NETCARD = $00000017;
- {$EXTERNALSYM FILE_DEVICE_PHYSICAL_NETCARD}
- FILE_DEVICE_PRINTER = $00000018;
- {$EXTERNALSYM FILE_DEVICE_PRINTER}
- FILE_DEVICE_SCANNER = $00000019;
- {$EXTERNALSYM FILE_DEVICE_SCANNER}
- FILE_DEVICE_SERIAL_MOUSE_PORT = $0000001a;
- {$EXTERNALSYM FILE_DEVICE_SERIAL_MOUSE_PORT}
- FILE_DEVICE_SERIAL_PORT = $0000001b;
- {$EXTERNALSYM FILE_DEVICE_SERIAL_PORT}
- FILE_DEVICE_SCREEN = $0000001c;
- {$EXTERNALSYM FILE_DEVICE_SCREEN}
- FILE_DEVICE_SOUND = $0000001d;
- {$EXTERNALSYM FILE_DEVICE_SOUND}
- FILE_DEVICE_STREAMS = $0000001e;
- {$EXTERNALSYM FILE_DEVICE_STREAMS}
- FILE_DEVICE_TAPE = $0000001f;
- {$EXTERNALSYM FILE_DEVICE_TAPE}
- FILE_DEVICE_TAPE_FILE_SYSTEM = $00000020;
- {$EXTERNALSYM FILE_DEVICE_TAPE_FILE_SYSTEM}
- FILE_DEVICE_TRANSPORT = $00000021;
- {$EXTERNALSYM FILE_DEVICE_TRANSPORT}
- FILE_DEVICE_UNKNOWN = $00000022;
- {$EXTERNALSYM FILE_DEVICE_UNKNOWN}
- FILE_DEVICE_VIDEO = $00000023;
- {$EXTERNALSYM FILE_DEVICE_VIDEO}
- FILE_DEVICE_VIRTUAL_DISK = $00000024;
- {$EXTERNALSYM FILE_DEVICE_VIRTUAL_DISK}
- FILE_DEVICE_WAVE_IN = $00000025;
- {$EXTERNALSYM FILE_DEVICE_WAVE_IN}
- FILE_DEVICE_WAVE_OUT = $00000026;
- {$EXTERNALSYM FILE_DEVICE_WAVE_OUT}
- FILE_DEVICE_8042_PORT = $00000027;
- {$EXTERNALSYM FILE_DEVICE_8042_PORT}
- FILE_DEVICE_NETWORK_REDIRECTOR = $00000028;
- {$EXTERNALSYM FILE_DEVICE_NETWORK_REDIRECTOR}
- FILE_DEVICE_BATTERY = $00000029;
- {$EXTERNALSYM FILE_DEVICE_BATTERY}
- FILE_DEVICE_BUS_EXTENDER = $0000002a;
- {$EXTERNALSYM FILE_DEVICE_BUS_EXTENDER}
- FILE_DEVICE_MODEM = $0000002b;
- {$EXTERNALSYM FILE_DEVICE_MODEM}
- FILE_DEVICE_VDM = $0000002c;
- {$EXTERNALSYM FILE_DEVICE_VDM}
- FILE_DEVICE_MASS_STORAGE = $0000002d;
- {$EXTERNALSYM FILE_DEVICE_MASS_STORAGE}
- FILE_DEVICE_SMB = $0000002e;
- {$EXTERNALSYM FILE_DEVICE_SMB}
- FILE_DEVICE_KS = $0000002f;
- {$EXTERNALSYM FILE_DEVICE_KS}
- FILE_DEVICE_CHANGER = $00000030;
- {$EXTERNALSYM FILE_DEVICE_CHANGER}
- FILE_DEVICE_SMARTCARD = $00000031;
- {$EXTERNALSYM FILE_DEVICE_SMARTCARD}
- FILE_DEVICE_ACPI = $00000032;
- {$EXTERNALSYM FILE_DEVICE_ACPI}
- FILE_DEVICE_DVD = $00000033;
- {$EXTERNALSYM FILE_DEVICE_DVD}
- FILE_DEVICE_FULLSCREEN_VIDEO = $00000034;
- {$EXTERNALSYM FILE_DEVICE_FULLSCREEN_VIDEO}
- FILE_DEVICE_DFS_FILE_SYSTEM = $00000035;
- {$EXTERNALSYM FILE_DEVICE_DFS_FILE_SYSTEM}
- FILE_DEVICE_DFS_VOLUME = $00000036;
- {$EXTERNALSYM FILE_DEVICE_DFS_VOLUME}
- FILE_DEVICE_SERENUM = $00000037;
- {$EXTERNALSYM FILE_DEVICE_SERENUM}
- FILE_DEVICE_TERMSRV = $00000038;
- {$EXTERNALSYM FILE_DEVICE_TERMSRV}
- FILE_DEVICE_KSEC = $00000039;
- {$EXTERNALSYM FILE_DEVICE_KSEC}
- FILE_DEVICE_FIPS = $0000003A;
- {$EXTERNALSYM FILE_DEVICE_FIPS}
- FILE_DEVICE_INFINIBAND = $0000003B;
- {$EXTERNALSYM FILE_DEVICE_INFINIBAND}
-
-//
-// Macro definition for defining IOCTL and FSCTL function control codes. Note
-// that function codes 0-2047 are reserved for Microsoft Corporation, and
-// 2048-4095 are reserved for customers.
-//
-
-function CTL_CODE(DeviceType, Func, Method, Access: WORD): DWORD;
-{$EXTERNALSYM CTL_CODE}
-
-//
-// Macro to extract device type out of the device io control code
-//
-
-function DEVICE_TYPE_FROM_CTL_CODE(CtrlCode: DWORD): WORD;
-{$EXTERNALSYM DEVICE_TYPE_FROM_CTL_CODE}
-
-//
-// Define the method codes for how buffers are passed for I/O and FS controls
-//
-
-const
- METHOD_BUFFERED = 0;
- {$EXTERNALSYM METHOD_BUFFERED}
- METHOD_IN_DIRECT = 1;
- {$EXTERNALSYM METHOD_IN_DIRECT}
- METHOD_OUT_DIRECT = 2;
- {$EXTERNALSYM METHOD_OUT_DIRECT}
- METHOD_NEITHER = 3;
- {$EXTERNALSYM METHOD_NEITHER}
-
-//
-// Define some easier to comprehend aliases:
-// METHOD_DIRECT_TO_HARDWARE (writes, aka METHOD_IN_DIRECT)
-// METHOD_DIRECT_FROM_HARDWARE (reads, aka METHOD_OUT_DIRECT)
-//
-
- METHOD_DIRECT_TO_HARDWARE = METHOD_IN_DIRECT;
- {$EXTERNALSYM METHOD_DIRECT_TO_HARDWARE}
- METHOD_DIRECT_FROM_HARDWARE = METHOD_OUT_DIRECT;
- {$EXTERNALSYM METHOD_DIRECT_FROM_HARDWARE}
-
-//
-// Define the access check value for any access
-//
-//
-// The FILE_READ_ACCESS and FILE_WRITE_ACCESS constants are also defined in
-// ntioapi.h as FILE_READ_DATA and FILE_WRITE_DATA. The values for these
-// constants *MUST* always be in sync.
-//
-//
-// FILE_SPECIAL_ACCESS is checked by the NT I/O system the same as FILE_ANY_ACCESS.
-// The file systems, however, may add additional access checks for I/O and FS controls
-// that use this value.
-//
-
-const
- FILE_ANY_ACCESS = 0;
- {$EXTERNALSYM FILE_ANY_ACCESS}
- FILE_SPECIAL_ACCESS = FILE_ANY_ACCESS;
- {$EXTERNALSYM FILE_SPECIAL_ACCESS}
- FILE_READ_ACCESS = $0001; // file & pipe
- {$EXTERNALSYM FILE_READ_ACCESS}
- FILE_WRITE_ACCESS = $0002; // file & pipe
- {$EXTERNALSYM FILE_WRITE_ACCESS}
-
-//
-// IoControlCode values for storage devices
-//
-
- IOCTL_STORAGE_BASE = FILE_DEVICE_MASS_STORAGE;
- {$EXTERNALSYM IOCTL_STORAGE_BASE}
-
-//
-// The following device control codes are common for all class drivers. They
-// should be used in place of the older IOCTL_DISK, IOCTL_CDROM and IOCTL_TAPE
-// common codes
-//
-
-const
- IOCTL_STORAGE_CHECK_VERIFY = (
- (IOCTL_STORAGE_BASE shl 16) or (FILE_READ_ACCESS shl 14) or
- ($0200 shl 2) or METHOD_BUFFERED);
- {$EXTERNALSYM IOCTL_STORAGE_CHECK_VERIFY}
- IOCTL_STORAGE_CHECK_VERIFY2 = (
- (IOCTL_STORAGE_BASE shl 16) or (FILE_ANY_ACCESS shl 14) or
- ($0200 shl 2) or METHOD_BUFFERED);
- {$EXTERNALSYM IOCTL_STORAGE_CHECK_VERIFY2}
- IOCTL_STORAGE_MEDIA_REMOVAL = (
- (IOCTL_STORAGE_BASE shl 16) or (FILE_READ_ACCESS shl 14) or
- ($0201 shl 2) or METHOD_BUFFERED);
- {$EXTERNALSYM IOCTL_STORAGE_MEDIA_REMOVAL}
- IOCTL_STORAGE_EJECT_MEDIA = (
- (IOCTL_STORAGE_BASE shl 16) or (FILE_READ_ACCESS shl 14) or
- ($0202 shl 2) or METHOD_BUFFERED);
- {$EXTERNALSYM IOCTL_STORAGE_EJECT_MEDIA}
- IOCTL_STORAGE_LOAD_MEDIA = (
- (IOCTL_STORAGE_BASE shl 16) or (FILE_READ_ACCESS shl 14) or
- ($0203 shl 2) or METHOD_BUFFERED);
- {$EXTERNALSYM IOCTL_STORAGE_LOAD_MEDIA}
- IOCTL_STORAGE_LOAD_MEDIA2 = (
- (IOCTL_STORAGE_BASE shl 16) or (FILE_ANY_ACCESS shl 14) or
- ($0203 shl 2) or METHOD_BUFFERED);
- {$EXTERNALSYM IOCTL_STORAGE_LOAD_MEDIA2}
- IOCTL_STORAGE_RESERVE = (
- (IOCTL_STORAGE_BASE shl 16) or (FILE_READ_ACCESS shl 14) or
- ($0204 shl 2) or METHOD_BUFFERED);
- {$EXTERNALSYM IOCTL_STORAGE_RESERVE}
- IOCTL_STORAGE_RELEASE = (
- (IOCTL_STORAGE_BASE shl 16) or (FILE_READ_ACCESS shl 14) or
- ($0205 shl 2) or METHOD_BUFFERED);
- {$EXTERNALSYM IOCTL_STORAGE_RELEASE}
- IOCTL_STORAGE_FIND_NEW_DEVICES = (
- (IOCTL_STORAGE_BASE shl 16) or (FILE_READ_ACCESS shl 14) or
- ($0206 shl 2) or METHOD_BUFFERED);
- {$EXTERNALSYM IOCTL_STORAGE_FIND_NEW_DEVICES}
-
- IOCTL_STORAGE_EJECTION_CONTROL = (
- (IOCTL_STORAGE_BASE shl 16) or (FILE_ANY_ACCESS shl 14) or
- ($0250 shl 2) or METHOD_BUFFERED);
- {$EXTERNALSYM IOCTL_STORAGE_EJECTION_CONTROL}
- IOCTL_STORAGE_MCN_CONTROL = (
- (IOCTL_STORAGE_BASE shl 16) or (FILE_ANY_ACCESS shl 14) or
- ($0251 shl 2) or METHOD_BUFFERED);
- {$EXTERNALSYM IOCTL_STORAGE_MCN_CONTROL}
-
- IOCTL_STORAGE_GET_MEDIA_TYPES = (
- (IOCTL_STORAGE_BASE shl 16) or (FILE_ANY_ACCESS shl 14) or
- ($0300 shl 2) or METHOD_BUFFERED);
- {$EXTERNALSYM IOCTL_STORAGE_GET_MEDIA_TYPES}
- IOCTL_STORAGE_GET_MEDIA_TYPES_EX = (
- (IOCTL_STORAGE_BASE shl 16) or (FILE_ANY_ACCESS shl 14) or
- ($0301 shl 2) or METHOD_BUFFERED);
- {$EXTERNALSYM IOCTL_STORAGE_GET_MEDIA_TYPES_EX}
- IOCTL_STORAGE_GET_MEDIA_SERIAL_NUMBER = (
- (IOCTL_STORAGE_BASE shl 16) or (FILE_ANY_ACCESS shl 14) or
- ($0304 shl 2) or METHOD_BUFFERED);
- {$EXTERNALSYM IOCTL_STORAGE_GET_MEDIA_SERIAL_NUMBER}
- IOCTL_STORAGE_GET_HOTPLUG_INFO = (
- (IOCTL_STORAGE_BASE shl 16) or (FILE_ANY_ACCESS shl 14) or
- ($0305 shl 2) or METHOD_BUFFERED);
- {$EXTERNALSYM IOCTL_STORAGE_GET_HOTPLUG_INFO}
- IOCTL_STORAGE_SET_HOTPLUG_INFO = (
- (IOCTL_STORAGE_BASE shl 16) or ((FILE_READ_ACCESS or FILE_WRITE_ACCESS) shl 14) or
- ($0306 shl 2) or METHOD_BUFFERED);
- {$EXTERNALSYM IOCTL_STORAGE_SET_HOTPLUG_INFO}
-
- IOCTL_STORAGE_RESET_BUS = (
- (IOCTL_STORAGE_BASE shl 16) or (FILE_READ_ACCESS shl 14) or
- ($0400 shl 2) or METHOD_BUFFERED);
- {$EXTERNALSYM IOCTL_STORAGE_RESET_BUS}
- IOCTL_STORAGE_RESET_DEVICE = (
- (IOCTL_STORAGE_BASE shl 16) or (FILE_READ_ACCESS shl 14) or
- ($0401 shl 2) or METHOD_BUFFERED);
- {$EXTERNALSYM IOCTL_STORAGE_RESET_DEVICE}
- IOCTL_STORAGE_BREAK_RESERVATION = (
- (IOCTL_STORAGE_BASE shl 16) or (FILE_READ_ACCESS shl 14) or
- ($0405 shl 2) or METHOD_BUFFERED);
- {$EXTERNALSYM IOCTL_STORAGE_BREAK_RESERVATION}
-
- IOCTL_STORAGE_GET_DEVICE_NUMBER = (
- (IOCTL_STORAGE_BASE shl 16) or (FILE_ANY_ACCESS shl 14) or
- ($0420 shl 2) or METHOD_BUFFERED);
- {$EXTERNALSYM IOCTL_STORAGE_GET_DEVICE_NUMBER}
-
- IOCTL_STORAGE_PREDICT_FAILURE = (
- (IOCTL_STORAGE_BASE shl 16) or (FILE_ANY_ACCESS shl 14) or
- ($0440 shl 2) or METHOD_BUFFERED);
- {$EXTERNALSYM IOCTL_STORAGE_PREDICT_FAILURE}
-
-//
-// These ioctl codes are obsolete. They are defined here to avoid resuing them
-// and to allow class drivers to respond to them more easily.
-//
-
- OBSOLETE_IOCTL_STORAGE_RESET_BUS = (
- (IOCTL_STORAGE_BASE shl 16) or ((FILE_READ_ACCESS or FILE_WRITE_ACCESS) shl 14) or
- ($0400 shl 2) or METHOD_BUFFERED);
- {$EXTERNALSYM OBSOLETE_IOCTL_STORAGE_RESET_BUS}
-
- OBSOLETE_IOCTL_STORAGE_RESET_DEVICE = (
- (IOCTL_STORAGE_BASE shl 16) or ((FILE_READ_ACCESS or FILE_WRITE_ACCESS) shl 14) or
- ($0401 shl 2) or METHOD_BUFFERED);
- {$EXTERNALSYM OBSOLETE_IOCTL_STORAGE_RESET_DEVICE}
-
-//
-// IOCTL_STORAGE_GET_HOTPLUG_INFO
-//
-
-type
- PSTORAGE_HOTPLUG_INFO = ^STORAGE_HOTPLUG_INFO;
- {$EXTERNALSYM PSTORAGE_HOTPLUG_INFO}
- _STORAGE_HOTPLUG_INFO = record
- Size: DWORD; // version
- MediaRemovable: BOOLEAN; // ie. zip, jaz, cdrom, mo, etc. vs hdd
- MediaHotplug: BOOLEAN; // ie. does the device succeed a lock even though its not lockable media?
- DeviceHotplug: BOOLEAN; // ie. 1394, USB, etc.
- WriteCacheEnableOverride: BOOLEAN; // This field should not be relied upon because it is no longer used
- end;
- {$EXTERNALSYM _STORAGE_HOTPLUG_INFO}
- STORAGE_HOTPLUG_INFO = _STORAGE_HOTPLUG_INFO;
- {$EXTERNALSYM STORAGE_HOTPLUG_INFO}
- TStorageHotplugInfo = STORAGE_HOTPLUG_INFO;
- PStorageHotplugInfo = PSTORAGE_HOTPLUG_INFO;
-
-//
-// IOCTL_STORAGE_GET_DEVICE_NUMBER
-//
-// input - none
-//
-// output - STORAGE_DEVICE_NUMBER structure
-// The values in the STORAGE_DEVICE_NUMBER structure are guaranteed
-// to remain unchanged until the system is rebooted. They are not
-// guaranteed to be persistant across boots.
-//
-
-type
- PSTORAGE_DEVICE_NUMBER = ^STORAGE_DEVICE_NUMBER;
- {$EXTERNALSYM PSTORAGE_DEVICE_NUMBER}
- _STORAGE_DEVICE_NUMBER = record
- //
- // The FILE_DEVICE_XXX type for this device.
- //
- DeviceType: DEVICE_TYPE;
- //
- // The number of this device
- //
- DeviceNumber: DWORD;
- //
- // If the device is partitionable, the partition number of the device.
- // Otherwise -1
- //
- PartitionNumber: DWORD;
- end;
- {$EXTERNALSYM _STORAGE_DEVICE_NUMBER}
- STORAGE_DEVICE_NUMBER = _STORAGE_DEVICE_NUMBER;
- {$EXTERNALSYM STORAGE_DEVICE_NUMBER}
- TStorageDeviceNumber = STORAGE_DEVICE_NUMBER;
- PStorageDeviceNumber = PSTORAGE_DEVICE_NUMBER;
-
-//
-// Define the structures for scsi resets
-//
-
- PSTORAGE_BUS_RESET_REQUEST = ^STORAGE_BUS_RESET_REQUEST;
- {$EXTERNALSYM PSTORAGE_BUS_RESET_REQUEST}
- _STORAGE_BUS_RESET_REQUEST = record
- PathId: BYTE;
- end;
- {$EXTERNALSYM _STORAGE_BUS_RESET_REQUEST}
- STORAGE_BUS_RESET_REQUEST = _STORAGE_BUS_RESET_REQUEST;
- {$EXTERNALSYM STORAGE_BUS_RESET_REQUEST}
- TStorageBusResetRequest = STORAGE_BUS_RESET_REQUEST;
- PStorageBusResetRequest = PSTORAGE_BUS_RESET_REQUEST;
-
-//
-// Break reservation is sent to the Adapter/FDO with the given lun information.
-//
-
- STORAGE_BREAK_RESERVATION_REQUEST = record
- Length: DWORD;
- _unused: Byte;
- PathId: Byte;
- TargetId: Byte;
- Lun: Byte;
- end;
- {$EXTERNALSYM STORAGE_BREAK_RESERVATION_REQUEST}
- PSTORAGE_BREAK_RESERVATION_REQUEST = ^STORAGE_BREAK_RESERVATION_REQUEST;
- {$EXTERNALSYM PSTORAGE_BREAK_RESERVATION_REQUEST}
- TStorageBreakReservationRequest = STORAGE_BREAK_RESERVATION_REQUEST;
- PStorageBreakReservationRequest = PSTORAGE_BREAK_RESERVATION_REQUEST;
-
-//
-// IOCTL_STORAGE_MEDIA_REMOVAL disables the mechanism
-// on a storage device that ejects media. This function
-// may or may not be supported on storage devices that
-// support removable media.
-//
-// TRUE means prevent media from being removed.
-// FALSE means allow media removal.
-//
-
- PPREVENT_MEDIA_REMOVAL = ^PREVENT_MEDIA_REMOVAL;
- {$EXTERNALSYM PPREVENT_MEDIA_REMOVAL}
- _PREVENT_MEDIA_REMOVAL = record
- PreventMediaRemoval: ByteBool;
- end;
- {$EXTERNALSYM _PREVENT_MEDIA_REMOVAL}
- PREVENT_MEDIA_REMOVAL = _PREVENT_MEDIA_REMOVAL;
- {$EXTERNALSYM PREVENT_MEDIA_REMOVAL}
- TPreventMediaRemoval = PREVENT_MEDIA_REMOVAL;
- PPreventMediaRemoval = PPREVENT_MEDIA_REMOVAL;
-
-//
-// This is the format of TARGET_DEVICE_CUSTOM_NOTIFICATION.CustomDataBuffer
-// passed to applications by the classpnp autorun code (via IoReportTargetDeviceChangeAsynchronous).
-//
-
- _CLASS_MEDIA_CHANGE_CONTEXT = record
- MediaChangeCount: DWORD;
- NewState: DWORD; // see MEDIA_CHANGE_DETECTION_STATE enum in classpnp.h in DDK
- end;
- {$EXTERNALSYM _CLASS_MEDIA_CHANGE_CONTEXT}
- CLASS_MEDIA_CHANGE_CONTEXT = _CLASS_MEDIA_CHANGE_CONTEXT;
- {$EXTERNALSYM CLASS_MEDIA_CHANGE_CONTEXT}
- PCLASS_MEDIA_CHANGE_CONTEXT = ^CLASS_MEDIA_CHANGE_CONTEXT;
- {$EXTERNALSYM PCLASS_MEDIA_CHANGE_CONTEXT}
- TClassMediaChangeContext = CLASS_MEDIA_CHANGE_CONTEXT;
- PClassMediaChangeContext = PCLASS_MEDIA_CHANGE_CONTEXT;
-
- PTAPE_STATISTICS = ^TAPE_STATISTICS;
- {$EXTERNALSYM PTAPE_STATISTICS}
- _TAPE_STATISTICS = record
- Version: DWORD;
- Flags: DWORD;
- RecoveredWrites: LARGE_INTEGER;
- UnrecoveredWrites: LARGE_INTEGER;
- RecoveredReads: LARGE_INTEGER;
- UnrecoveredReads: LARGE_INTEGER;
- CompressionRatioReads: BYTE;
- CompressionRatioWrites: BYTE;
- end;
- {$EXTERNALSYM _TAPE_STATISTICS}
- TAPE_STATISTICS = _TAPE_STATISTICS;
- {$EXTERNALSYM TAPE_STATISTICS}
- TTapeStatistics = TAPE_STATISTICS;
- PTapeStatistics = PTAPE_STATISTICS;
-
-const
- RECOVERED_WRITES_VALID = $00000001;
- {$EXTERNALSYM RECOVERED_WRITES_VALID}
- UNRECOVERED_WRITES_VALID = $00000002;
- {$EXTERNALSYM UNRECOVERED_WRITES_VALID}
- RECOVERED_READS_VALID = $00000004;
- {$EXTERNALSYM RECOVERED_READS_VALID}
- UNRECOVERED_READS_VALID = $00000008;
- {$EXTERNALSYM UNRECOVERED_READS_VALID}
- WRITE_COMPRESSION_INFO_VALID = $00000010;
- {$EXTERNALSYM WRITE_COMPRESSION_INFO_VALID}
- READ_COMPRESSION_INFO_VALID = $00000020;
- {$EXTERNALSYM READ_COMPRESSION_INFO_VALID}
-
-type
- PTAPE_GET_STATISTICS = ^TAPE_GET_STATISTICS;
- {$EXTERNALSYM PTAPE_GET_STATISTICS}
- _TAPE_GET_STATISTICS = record
- Operation: DWORD;
- end;
- {$EXTERNALSYM _TAPE_GET_STATISTICS}
- TAPE_GET_STATISTICS = _TAPE_GET_STATISTICS;
- {$EXTERNALSYM TAPE_GET_STATISTICS}
- TTapeGetStatistics = TAPE_GET_STATISTICS;
- PTapeGetStatistics = PTAPE_GET_STATISTICS;
-
-const
- TAPE_RETURN_STATISTICS = 0;
- {$EXTERNALSYM TAPE_RETURN_STATISTICS}
- TAPE_RETURN_ENV_INFO = 1;
- {$EXTERNALSYM TAPE_RETURN_ENV_INFO}
- TAPE_RESET_STATISTICS = 2;
- {$EXTERNALSYM TAPE_RESET_STATISTICS}
-
-//
-// IOCTL_STORAGE_GET_MEDIA_TYPES_EX will return an array of DEVICE_MEDIA_INFO
-// structures, one per supported type, embedded in the GET_MEDIA_TYPES struct.
-//
-
-const
-
- //
- // Following are defined in ntdddisk.h in the MEDIA_TYPE enum
- //
- // Unknown, // Format is unknown
- // F5_1Pt2_512, // 5.25", 1.2MB, 512 bytes/sector
- // F3_1Pt44_512, // 3.5", 1.44MB, 512 bytes/sector
- // F3_2Pt88_512, // 3.5", 2.88MB, 512 bytes/sector
- // F3_20Pt8_512, // 3.5", 20.8MB, 512 bytes/sector
- // F3_720_512, // 3.5", 720KB, 512 bytes/sector
- // F5_360_512, // 5.25", 360KB, 512 bytes/sector
- // F5_320_512, // 5.25", 320KB, 512 bytes/sector
- // F5_320_1024, // 5.25", 320KB, 1024 bytes/sector
- // F5_180_512, // 5.25", 180KB, 512 bytes/sector
- // F5_160_512, // 5.25", 160KB, 512 bytes/sector
- // RemovableMedia, // Removable media other than floppy
- // FixedMedia, // Fixed hard disk media
- // F3_120M_512, // 3.5", 120M Floppy
- // F3_640_512, // 3.5" , 640KB, 512 bytes/sector
- // F5_640_512, // 5.25", 640KB, 512 bytes/sector
- // F5_720_512, // 5.25", 720KB, 512 bytes/sector
- // F3_1Pt2_512, // 3.5" , 1.2Mb, 512 bytes/sector
- // F3_1Pt23_1024, // 3.5" , 1.23Mb, 1024 bytes/sector
- // F5_1Pt23_1024, // 5.25", 1.23MB, 1024 bytes/sector
- // F3_128Mb_512, // 3.5" MO 128Mb 512 bytes/sector
- // F3_230Mb_512, // 3.5" MO 230Mb 512 bytes/sector
- // F8_256_128, // 8", 256KB, 128 bytes/sector
- // F3_200Mb_512, // 3.5", 200M Floppy (HiFD)
- //
-
- DDS_4mm = $20; // Tape - DAT DDS1,2,... (all vendors)
- MiniQic = $21; // Tape - miniQIC Tape
- Travan = $22; // Tape - Travan TR-1,2,3,...
- QIC = $23; // Tape - QIC
- MP_8mm = $24; // Tape - 8mm Exabyte Metal Particle
- AME_8mm = $25; // Tape - 8mm Exabyte Advanced Metal Evap
- AIT1_8mm = $26; // Tape - 8mm Sony AIT
- DLT = $27; // Tape - DLT Compact IIIxt, IV
- NCTP = $28; // Tape - Philips NCTP
- IBM_3480 = $29; // Tape - IBM 3480
- IBM_3490E = $2A; // Tape - IBM 3490E
- IBM_Magstar_3590 = $2B; // Tape - IBM Magstar 3590
- IBM_Magstar_MP = $2C; // Tape - IBM Magstar MP
- STK_DATA_D3 = $2D; // Tape - STK Data D3
- SONY_DTF = $2E; // Tape - Sony DTF
- DV_6mm = $2F; // Tape - 6mm Digital Video
- DMI = $30; // Tape - Exabyte DMI and compatibles
- SONY_D2 = $31; // Tape - Sony D2S and D2L
- CLEANER_CARTRIDGE = $32; // Cleaner - All Drive types that support Drive Cleaners
- CD_ROM = $33; // Opt_Disk - CD
- CD_R = $34; // Opt_Disk - CD-Recordable (Write Once)
- CD_RW = $35; // Opt_Disk - CD-Rewriteable
- DVD_ROM = $36; // Opt_Disk - DVD-ROM
- DVD_R = $37; // Opt_Disk - DVD-Recordable (Write Once)
- DVD_RW = $38; // Opt_Disk - DVD-Rewriteable
- MO_3_RW = $39; // Opt_Disk - 3.5" Rewriteable MO Disk
- MO_5_WO = $3A; // Opt_Disk - MO 5.25" Write Once
- MO_5_RW = $3B; // Opt_Disk - MO 5.25" Rewriteable (not LIMDOW)
- MO_5_LIMDOW = $3C; // Opt_Disk - MO 5.25" Rewriteable (LIMDOW)
- PC_5_WO = $3D; // Opt_Disk - Phase Change 5.25" Write Once Optical
- PC_5_RW = $3E; // Opt_Disk - Phase Change 5.25" Rewriteable
- PD_5_RW = $3F; // Opt_Disk - PhaseChange Dual Rewriteable
- ABL_5_WO = $40; // Opt_Disk - Ablative 5.25" Write Once Optical
- PINNACLE_APEX_5_RW = $41; // Opt_Disk - Pinnacle Apex 4.6GB Rewriteable Optical
- SONY_12_WO = $42; // Opt_Disk - Sony 12" Write Once
- PHILIPS_12_WO = $43; // Opt_Disk - Philips/LMS 12" Write Once
- HITACHI_12_WO = $44; // Opt_Disk - Hitachi 12" Write Once
- CYGNET_12_WO = $45; // Opt_Disk - Cygnet/ATG 12" Write Once
- KODAK_14_WO = $46; // Opt_Disk - Kodak 14" Write Once
- MO_NFR_525 = $47; // Opt_Disk - Near Field Recording (Terastor)
- NIKON_12_RW = $48; // Opt_Disk - Nikon 12" Rewriteable
- IOMEGA_ZIP = $49; // Mag_Disk - Iomega Zip
- IOMEGA_JAZ = $4A; // Mag_Disk - Iomega Jaz
- SYQUEST_EZ135 = $4B; // Mag_Disk - Syquest EZ135
- SYQUEST_EZFLYER = $4C; // Mag_Disk - Syquest EzFlyer
- SYQUEST_SYJET = $4D; // Mag_Disk - Syquest SyJet
- AVATAR_F2 = $4E; // Mag_Disk - 2.5" Floppy
- MP2_8mm = $4F; // Tape - 8mm Hitachi
- DST_S = $50; // Ampex DST Small Tapes
- DST_M = $51; // Ampex DST Medium Tapes
- DST_L = $52; // Ampex DST Large Tapes
- VXATape_1 = $53; // Ecrix 8mm Tape
- VXATape_2 = $54; // Ecrix 8mm Tape
- STK_9840 = $55; // STK 9840
- LTO_Ultrium = $56; // IBM, HP, Seagate LTO Ultrium
- LTO_Accelis = $57; // IBM, HP, Seagate LTO Accelis
- DVD_RAM = $58; // Opt_Disk - DVD-RAM
- AIT_8mm = $59; // AIT2 or higher
- ADR_1 = $5A; // OnStream ADR Mediatypes
- ADR_2 = $5B;
- STK_9940 = $5C; // STK 9940
-
-type
- STORAGE_MEDIA_TYPE = DWORD;
- {$EXTERNALSYM STORAGE_MEDIA_TYPE}
- PSTORAGE_MEDIA_TYPE = ^STORAGE_MEDIA_TYPE;
- {$EXTERNALSYM PSTORAGE_MEDIA_TYPE}
- TStorageMediaType = STORAGE_MEDIA_TYPE;
- PStorageMediaType = ^TStorageMediaType;
-
-const
- MEDIA_ERASEABLE = $00000001;
- {$EXTERNALSYM MEDIA_ERASEABLE}
- MEDIA_WRITE_ONCE = $00000002;
- {$EXTERNALSYM MEDIA_WRITE_ONCE}
- MEDIA_READ_ONLY = $00000004;
- {$EXTERNALSYM MEDIA_READ_ONLY}
- MEDIA_READ_WRITE = $00000008;
- {$EXTERNALSYM MEDIA_READ_WRITE}
-
- MEDIA_WRITE_PROTECTED = $00000100;
- {$EXTERNALSYM MEDIA_WRITE_PROTECTED}
- MEDIA_CURRENTLY_MOUNTED = DWORD($80000000);
- {$EXTERNALSYM MEDIA_CURRENTLY_MOUNTED}
-
-//
-// Define the different storage bus types
-// Bus types below 128 (0x80) are reserved for Microsoft use
-//
-
-const
- BusTypeUnknown = 0;
- BusTypeScsi = 1;
- BusTypeAtapi = 2;
- BusTypeAta = 3;
- BusType1394 = 4;
- BusTypeSsa = 5;
- BusTypeFibre = 6;
- BusTypeUsb = 7;
- BusTypeRAID = 8;
- BusTypeMaxReserved = $7F;
-
-type
- STORAGE_BUS_TYPE = DWORD;
- {$EXTERNALSYM STORAGE_BUS_TYPE}
- PSTORAGE_BUS_TYPE = ^STORAGE_BUS_TYPE;
- {$EXTERNALSYM PSTORAGE_BUS_TYPE}
- TStorageBusType = STORAGE_BUS_TYPE;
- PStorageBusType = PSTORAGE_BUS_TYPE;
-
- TDMIDiskInfo = record
- Cylinders: LARGE_INTEGER;
- MediaType: STORAGE_MEDIA_TYPE;
- TracksPerCylinder: DWORD;
- SectorsPerTrack: DWORD;
- BytesPerSector: DWORD;
- NumberMediaSides: DWORD;
- MediaCharacteristics: DWORD; // Bitmask of MEDIA_XXX values.
- end;
-
- TDMIRemovableDiskInfo = record
- Cylinders: LARGE_INTEGER;
- MediaType: STORAGE_MEDIA_TYPE;
- TracksPerCylinder: DWORD;
- SectorsPerTrack: DWORD;
- BytesPerSector: DWORD;
- NumberMediaSides: DWORD;
- MediaCharacteristics: DWORD; // Bitmask of MEDIA_XXX values.
- end;
-
- TDMITapeInfo = record
- MediaType: STORAGE_MEDIA_TYPE;
- MediaCharacteristics: DWORD; // Bitmask of MEDIA_XXX values.
- CurrentBlockSize: DWORD;
- BusType: STORAGE_BUS_TYPE;
- //
- // Bus specific information describing the medium supported.
- //
- case Integer of {BusSpecificData}
- 0: ( {ScsiInformation}
- MediumType: BYTE;
- DensityCode: BYTE);
- end;
-
- PDEVICE_MEDIA_INFO = ^DEVICE_MEDIA_INFO;
- {$EXTERNALSYM PDEVICE_MEDIA_INFO}
- _DEVICE_MEDIA_INFO = record
- case Integer of
- 0: (DiskInfo: TDMIDiskInfo);
- 1: (RemovableDiskInfo: TDMIRemovableDiskInfo);
- 2: (TapeInfo: TDMITapeInfo);
- end;
- {$EXTERNALSYM _DEVICE_MEDIA_INFO}
- DEVICE_MEDIA_INFO = _DEVICE_MEDIA_INFO;
- {$EXTERNALSYM DEVICE_MEDIA_INFO}
- TDeviceMediaInfo = DEVICE_MEDIA_INFO;
- PDeviceMediaInfo = PDEVICE_MEDIA_INFO;
-
- PGET_MEDIA_TYPES = ^GET_MEDIA_TYPES;
- {$EXTERNALSYM PGET_MEDIA_TYPES}
- _GET_MEDIA_TYPES = record
- DeviceType: DWORD; // FILE_DEVICE_XXX values
- MediaInfoCount: DWORD;
- MediaInfo: array [0..0] of DEVICE_MEDIA_INFO;
- end;
- {$EXTERNALSYM _GET_MEDIA_TYPES}
- GET_MEDIA_TYPES = _GET_MEDIA_TYPES;
- {$EXTERNALSYM GET_MEDIA_TYPES}
- TGetMediaTypes = GET_MEDIA_TYPES;
- PGetMediaTypes = PGET_MEDIA_TYPES;
-
-//
-// IOCTL_STORAGE_PREDICT_FAILURE
-//
-// input - none
-//
-// output - STORAGE_PREDICT_FAILURE structure
-// PredictFailure returns zero if no failure predicted and non zero
-// if a failure is predicted.
-//
-// VendorSpecific returns 512 bytes of vendor specific information
-// if a failure is predicted
-//
-
- PSTORAGE_PREDICT_FAILURE = ^STORAGE_PREDICT_FAILURE;
- {$EXTERNALSYM PSTORAGE_PREDICT_FAILURE}
- _STORAGE_PREDICT_FAILURE = record
- PredictFailure: DWORD;
- VendorSpecific: array [0..511] of BYTE;
- end;
- {$EXTERNALSYM _STORAGE_PREDICT_FAILURE}
- STORAGE_PREDICT_FAILURE = _STORAGE_PREDICT_FAILURE;
- {$EXTERNALSYM STORAGE_PREDICT_FAILURE}
- TStoragePredictFailure = STORAGE_PREDICT_FAILURE;
- PStoragePredictFailure = PSTORAGE_PREDICT_FAILURE;
-
-//
-// IoControlCode values for disk devices.
-//
-
-const
- IOCTL_DISK_BASE = FILE_DEVICE_DISK;
- {$EXTERNALSYM IOCTL_DISK_BASE}
-
- IOCTL_DISK_GET_DRIVE_GEOMETRY = (
- (IOCTL_DISK_BASE shl 16) or (FILE_ANY_ACCESS shl 14) or
- ($0000 shl 2) or METHOD_BUFFERED);
- {$EXTERNALSYM IOCTL_DISK_GET_DRIVE_GEOMETRY}
-
- IOCTL_DISK_GET_PARTITION_INFO = (
- (IOCTL_DISK_BASE shl 16) or (FILE_READ_ACCESS shl 14) or
- ($0001 shl 2) or METHOD_BUFFERED);
- {$EXTERNALSYM IOCTL_DISK_GET_PARTITION_INFO}
-
- IOCTL_DISK_SET_PARTITION_INFO = (
- (IOCTL_DISK_BASE shl 16) or ((FILE_READ_ACCESS or FILE_WRITE_ACCESS) shl 14) or
- ($0002 shl 2) or METHOD_BUFFERED);
- {$EXTERNALSYM IOCTL_DISK_SET_PARTITION_INFO}
-
- IOCTL_DISK_GET_DRIVE_LAYOUT = (
- (IOCTL_DISK_BASE shl 16) or (FILE_READ_ACCESS shl 14) or
- ($0003 shl 2) or METHOD_BUFFERED);
- {$EXTERNALSYM IOCTL_DISK_GET_DRIVE_LAYOUT}
-
- IOCTL_DISK_SET_DRIVE_LAYOUT = (
- (IOCTL_DISK_BASE shl 16) or ((FILE_READ_ACCESS or FILE_WRITE_ACCESS) shl 14) or
- ($0004 shl 2) or METHOD_BUFFERED);
- {$EXTERNALSYM IOCTL_DISK_SET_DRIVE_LAYOUT}
-
- IOCTL_DISK_VERIFY = (
- (IOCTL_DISK_BASE shl 16) or (FILE_ANY_ACCESS shl 14) or
- ($0005 shl 2) or METHOD_BUFFERED);
- {$EXTERNALSYM IOCTL_DISK_VERIFY}
-
- IOCTL_DISK_FORMAT_TRACKS = (
- (IOCTL_DISK_BASE shl 16) or ((FILE_READ_ACCESS or FILE_WRITE_ACCESS) shl 14) or
- ($0006 shl 2) or METHOD_BUFFERED);
- {$EXTERNALSYM IOCTL_DISK_FORMAT_TRACKS}
-
- IOCTL_DISK_REASSIGN_BLOCKS = (
- (IOCTL_DISK_BASE shl 16) or ((FILE_READ_ACCESS or FILE_WRITE_ACCESS) shl 14) or
- ($0007 shl 2) or METHOD_BUFFERED);
- {$EXTERNALSYM IOCTL_DISK_REASSIGN_BLOCKS}
-
- IOCTL_DISK_PERFORMANCE = (
- (IOCTL_DISK_BASE shl 16) or (FILE_ANY_ACCESS shl 14) or
- ($0008 shl 2) or METHOD_BUFFERED);
- {$EXTERNALSYM IOCTL_DISK_PERFORMANCE}
-
- IOCTL_DISK_IS_WRITABLE = (
- (IOCTL_DISK_BASE shl 16) or (FILE_ANY_ACCESS shl 14) or
- ($0009 shl 2) or METHOD_BUFFERED);
- {$EXTERNALSYM IOCTL_DISK_IS_WRITABLE}
-
- IOCTL_DISK_LOGGING = (
- (IOCTL_DISK_BASE shl 16) or (FILE_ANY_ACCESS shl 14) or
- ($000a shl 2) or METHOD_BUFFERED);
- {$EXTERNALSYM IOCTL_DISK_LOGGING}
-
- IOCTL_DISK_FORMAT_TRACKS_EX = (
- (IOCTL_DISK_BASE shl 16) or ((FILE_READ_ACCESS or FILE_WRITE_ACCESS) shl 14) or
- ($000b shl 2) or METHOD_BUFFERED);
- {$EXTERNALSYM IOCTL_DISK_FORMAT_TRACKS_EX}
-
- IOCTL_DISK_HISTOGRAM_STRUCTURE = (
- (IOCTL_DISK_BASE shl 16) or (FILE_ANY_ACCESS shl 14) or
- ($000c shl 2) or METHOD_BUFFERED);
- {$EXTERNALSYM IOCTL_DISK_HISTOGRAM_STRUCTURE}
-
- IOCTL_DISK_HISTOGRAM_DATA = (
- (IOCTL_DISK_BASE shl 16) or (FILE_ANY_ACCESS shl 14) or
- ($000d shl 2) or METHOD_BUFFERED);
- {$EXTERNALSYM IOCTL_DISK_HISTOGRAM_DATA}
-
- IOCTL_DISK_HISTOGRAM_RESET = (
- (IOCTL_DISK_BASE shl 16) or (FILE_ANY_ACCESS shl 14) or
- ($000e shl 2) or METHOD_BUFFERED);
- {$EXTERNALSYM IOCTL_DISK_HISTOGRAM_RESET}
-
- IOCTL_DISK_REQUEST_STRUCTURE = (
- (IOCTL_DISK_BASE shl 16) or (FILE_ANY_ACCESS shl 14) or
- ($000f shl 2) or METHOD_BUFFERED);
- {$EXTERNALSYM IOCTL_DISK_REQUEST_STRUCTURE}
-
- IOCTL_DISK_REQUEST_DATA = (
- (IOCTL_DISK_BASE shl 16) or (FILE_ANY_ACCESS shl 14) or
- ($0010 shl 2) or METHOD_BUFFERED);
- {$EXTERNALSYM IOCTL_DISK_REQUEST_DATA}
-
- IOCTL_DISK_PERFORMANCE_OFF = (
- (IOCTL_DISK_BASE shl 16) or (FILE_ANY_ACCESS shl 14) or
- ($0018 shl 2) or METHOD_BUFFERED);
- {$EXTERNALSYM IOCTL_DISK_PERFORMANCE_OFF}
-
- IOCTL_DISK_CONTROLLER_NUMBER = (
- (IOCTL_DISK_BASE shl 16) or (FILE_ANY_ACCESS shl 14) or
- ($0011 shl 2) or METHOD_BUFFERED);
- {$EXTERNALSYM IOCTL_DISK_CONTROLLER_NUMBER}
-
-//
-// IOCTL support for SMART drive fault prediction.
-//
-
- SMART_GET_VERSION = (
- (IOCTL_DISK_BASE shl 16) or (FILE_READ_ACCESS shl 14) or
- ($0020 shl 2) or METHOD_BUFFERED);
- {$EXTERNALSYM SMART_GET_VERSION}
-
- SMART_SEND_DRIVE_COMMAND = (
- (IOCTL_DISK_BASE shl 16) or ((FILE_READ_ACCESS or FILE_WRITE_ACCESS) shl 14) or
- ($0021 shl 2) or METHOD_BUFFERED);
- {$EXTERNALSYM SMART_SEND_DRIVE_COMMAND}
-
- SMART_RCV_DRIVE_DATA = (
- (IOCTL_DISK_BASE shl 16) or ((FILE_READ_ACCESS or FILE_WRITE_ACCESS) shl 14) or
- ($0022 shl 2) or METHOD_BUFFERED);
- {$EXTERNALSYM SMART_RCV_DRIVE_DATA}
-
-//
-// New IOCTLs for GUID Partition tabled disks.
-//
-
-// 23-11-2002: various bugs reported by Carsten Grafflage corrected
-
- IOCTL_DISK_GET_PARTITION_INFO_EX = (
- (IOCTL_DISK_BASE shl 16) or (FILE_ANY_ACCESS shl 14) or
- ($0012 shl 2) or METHOD_BUFFERED);
- {$EXTERNALSYM IOCTL_DISK_GET_PARTITION_INFO_EX}
-
- IOCTL_DISK_SET_PARTITION_INFO_EX = (
- (IOCTL_DISK_BASE shl 16) or ((FILE_READ_ACCESS or FILE_WRITE_ACCESS) shl 14) or
- ($0013 shl 2) or METHOD_BUFFERED);
- {$EXTERNALSYM IOCTL_DISK_SET_PARTITION_INFO_EX}
-
- IOCTL_DISK_GET_DRIVE_LAYOUT_EX = (
- (IOCTL_DISK_BASE shl 16) or (FILE_ANY_ACCESS shl 14) or
- ($0014 shl 2) or METHOD_BUFFERED);
- {$EXTERNALSYM IOCTL_DISK_GET_DRIVE_LAYOUT_EX}
-
- IOCTL_DISK_SET_DRIVE_LAYOUT_EX = (
- (IOCTL_DISK_BASE shl 16) or ((FILE_READ_ACCESS or FILE_WRITE_ACCESS) shl 14) or
- ($0015 shl 2) or METHOD_BUFFERED);
- {$EXTERNALSYM IOCTL_DISK_SET_DRIVE_LAYOUT_EX}
-
- IOCTL_DISK_CREATE_DISK = (
- (IOCTL_DISK_BASE shl 16) or ((FILE_READ_ACCESS or FILE_WRITE_ACCESS) shl 14) or
- ($0016 shl 2) or METHOD_BUFFERED);
- {$EXTERNALSYM IOCTL_DISK_CREATE_DISK}
-
- IOCTL_DISK_GET_LENGTH_INFO = (
- (IOCTL_DISK_BASE shl 16) or (FILE_READ_ACCESS shl 14) or
- ($0017 shl 2) or METHOD_BUFFERED);
- {$EXTERNALSYM IOCTL_DISK_GET_LENGTH_INFO}
-
- IOCTL_DISK_GET_DRIVE_GEOMETRY_EX = (
- (IOCTL_DISK_BASE shl 16) or (FILE_ANY_ACCESS shl 14) or
- ($0028 shl 2) or METHOD_BUFFERED);
- {$EXTERNALSYM IOCTL_DISK_GET_DRIVE_GEOMETRY_EX}
-
- IOCTL_DISK_UPDATE_DRIVE_SIZE = (
- (IOCTL_DISK_BASE shl 16) or ((FILE_READ_ACCESS or FILE_WRITE_ACCESS) shl 14) or
- ($0032 shl 2) or METHOD_BUFFERED);
- {$EXTERNALSYM IOCTL_DISK_UPDATE_DRIVE_SIZE}
-
- IOCTL_DISK_GROW_PARTITION = (
- (IOCTL_DISK_BASE shl 16) or ((FILE_READ_ACCESS or FILE_WRITE_ACCESS) shl 14) or
- ($0034 shl 2) or METHOD_BUFFERED);
- {$EXTERNALSYM IOCTL_DISK_GROW_PARTITION}
-
- IOCTL_DISK_GET_CACHE_INFORMATION = (
- (IOCTL_DISK_BASE shl 16) or (FILE_READ_ACCESS shl 14) or
- ($0035 shl 2) or METHOD_BUFFERED);
- {$EXTERNALSYM IOCTL_DISK_GET_CACHE_INFORMATION}
-
- IOCTL_DISK_SET_CACHE_INFORMATION = (
- (IOCTL_DISK_BASE shl 16) or ((FILE_READ_ACCESS or FILE_WRITE_ACCESS) shl 14) or
- ($0036 shl 2) or METHOD_BUFFERED);
- {$EXTERNALSYM IOCTL_DISK_SET_CACHE_INFORMATION}
-
- OBSOLETE_DISK_GET_WRITE_CACHE_STATE = (
- (IOCTL_DISK_BASE shl 16) or (FILE_READ_ACCESS shl 14) or
- ($0037 shl 2) or METHOD_BUFFERED);
- {$EXTERNALSYM OBSOLETE_DISK_GET_WRITE_CACHE_STATE}
-
- IOCTL_DISK_DELETE_DRIVE_LAYOUT = (
- (IOCTL_DISK_BASE shl 16) or ((FILE_READ_ACCESS or FILE_WRITE_ACCESS) shl 14) or
- ($0040 shl 2) or METHOD_BUFFERED);
- {$EXTERNALSYM IOCTL_DISK_DELETE_DRIVE_LAYOUT}
-
-//
-// Called to flush cached information that the driver may have about this
-// device's characteristics. Not all drivers cache characteristics, and not
-// cached properties can be flushed. This simply serves as an update to the
-// driver that it may want to do an expensive reexamination of the device's
-// characteristics now (fixed media size, partition table, etc...)
-//
-
- IOCTL_DISK_UPDATE_PROPERTIES = (
- (IOCTL_DISK_BASE shl 16) or (FILE_ANY_ACCESS shl 14) or
- ($0050 shl 2) or METHOD_BUFFERED);
- {$EXTERNALSYM IOCTL_DISK_UPDATE_PROPERTIES}
-
-//
-// Special IOCTLs needed to support PC-98 machines in Japan
-//
-
- IOCTL_DISK_FORMAT_DRIVE = (
- (IOCTL_DISK_BASE shl 16) or ((FILE_READ_ACCESS or FILE_WRITE_ACCESS) shl 14) or
- ($00f3 shl 2) or METHOD_BUFFERED);
- {$EXTERNALSYM IOCTL_DISK_FORMAT_DRIVE}
-
- IOCTL_DISK_SENSE_DEVICE = (
- (IOCTL_DISK_BASE shl 16) or (FILE_ANY_ACCESS shl 14) or
- ($00f8 shl 2) or METHOD_BUFFERED);
- {$EXTERNALSYM IOCTL_DISK_SENSE_DEVICE}
-
-//
-// The following device control codes are common for all class drivers. The
-// functions codes defined here must match all of the other class drivers.
-//
-// Warning: these codes will be replaced in the future by equivalent
-// IOCTL_STORAGE codes
-//
-
- IOCTL_DISK_CHECK_VERIFY = (
- (IOCTL_DISK_BASE shl 16) or (FILE_READ_ACCESS shl 14) or
- ($0200 shl 2) or METHOD_BUFFERED);
- {$EXTERNALSYM IOCTL_DISK_CHECK_VERIFY}
-
- IOCTL_DISK_MEDIA_REMOVAL = (
- (IOCTL_DISK_BASE shl 16) or (FILE_READ_ACCESS shl 14) or
- ($0201 shl 2) or METHOD_BUFFERED);
- {$EXTERNALSYM IOCTL_DISK_MEDIA_REMOVAL}
-
- IOCTL_DISK_EJECT_MEDIA = (
- (IOCTL_DISK_BASE shl 16) or (FILE_READ_ACCESS shl 14) or
- ($0202 shl 2) or METHOD_BUFFERED);
- {$EXTERNALSYM IOCTL_DISK_EJECT_MEDIA}
-
- IOCTL_DISK_LOAD_MEDIA = (
- (IOCTL_DISK_BASE shl 16) or (FILE_READ_ACCESS shl 14) or
- ($0203 shl 2) or METHOD_BUFFERED);
- {$EXTERNALSYM IOCTL_DISK_LOAD_MEDIA}
-
- IOCTL_DISK_RESERVE = (
- (IOCTL_DISK_BASE shl 16) or (FILE_READ_ACCESS shl 14) or
- ($0204 shl 2) or METHOD_BUFFERED);
- {$EXTERNALSYM IOCTL_DISK_RESERVE}
-
- IOCTL_DISK_RELEASE = (
- (IOCTL_DISK_BASE shl 16) or (FILE_READ_ACCESS shl 14) or
- ($0205 shl 2) or METHOD_BUFFERED);
- {$EXTERNALSYM IOCTL_DISK_RELEASE}
-
- IOCTL_DISK_FIND_NEW_DEVICES = (
- (IOCTL_DISK_BASE shl 16) or (FILE_READ_ACCESS shl 14) or
- ($0206 shl 2) or METHOD_BUFFERED);
- {$EXTERNALSYM IOCTL_DISK_FIND_NEW_DEVICES}
-
- IOCTL_DISK_GET_MEDIA_TYPES = (
- (IOCTL_DISK_BASE shl 16) or (FILE_ANY_ACCESS shl 14) or
- ($0300 shl 2) or METHOD_BUFFERED);
- {$EXTERNALSYM IOCTL_DISK_GET_MEDIA_TYPES}
-
-//
-// Define the partition types returnable by known disk drivers.
-//
-
-const
- PARTITION_ENTRY_UNUSED = $00; // Entry unused
- {$EXTERNALSYM PARTITION_ENTRY_UNUSED}
- PARTITION_FAT_12 = $01; // 12-bit FAT entries
- {$EXTERNALSYM PARTITION_FAT_12}
- PARTITION_XENIX_1 = $02; // Xenix
- {$EXTERNALSYM PARTITION_XENIX_1}
- PARTITION_XENIX_2 = $03; // Xenix
- {$EXTERNALSYM PARTITION_XENIX_2}
- PARTITION_FAT_16 = $04; // 16-bit FAT entries
- {$EXTERNALSYM PARTITION_FAT_16}
- PARTITION_EXTENDED = $05; // Extended partition entry
- {$EXTERNALSYM PARTITION_EXTENDED}
- PARTITION_HUGE = $06; // Huge partition MS-DOS V4
- {$EXTERNALSYM PARTITION_HUGE}
- PARTITION_IFS = $07; // IFS Partition
- {$EXTERNALSYM PARTITION_IFS}
- PARTITION_OS2BOOTMGR = $0A; // OS/2 Boot Manager/OPUS/Coherent swap
- {$EXTERNALSYM PARTITION_OS2BOOTMGR}
- PARTITION_FAT32 = $0B; // FAT32
- {$EXTERNALSYM PARTITION_FAT32}
- PARTITION_FAT32_XINT13 = $0C; // FAT32 using extended int13 services
- {$EXTERNALSYM PARTITION_FAT32_XINT13}
- PARTITION_XINT13 = $0E; // Win95 partition using extended int13 services
- {$EXTERNALSYM PARTITION_XINT13}
- PARTITION_XINT13_EXTENDED = $0F; // Same as type 5 but uses extended int13 services
- {$EXTERNALSYM PARTITION_XINT13_EXTENDED}
- PARTITION_PREP = $41; // PowerPC Reference Platform (PReP) Boot Partition
- {$EXTERNALSYM PARTITION_PREP}
- PARTITION_LDM = $42; // Logical Disk Manager partition
- {$EXTERNALSYM PARTITION_LDM}
- PARTITION_UNIX = $63; // Unix
- {$EXTERNALSYM PARTITION_UNIX}
-
- VALID_NTFT = $C0; // NTFT uses high order bits
- {$EXTERNALSYM VALID_NTFT}
-
-//
-// The high bit of the partition type code indicates that a partition
-// is part of an NTFT mirror or striped array.
-//
-
- PARTITION_NTFT = $80; // NTFT partition
- {$EXTERNALSYM PARTITION_NTFT}
-
-//
-// The following macro is used to determine which partitions should be
-// assigned drive letters.
-//
-
-//++
-//
-// BOOLEAN
-// IsRecognizedPartition(
-// IN DWORD PartitionType
-// )
-//
-// Routine Description:
-//
-// This macro is used to determine to which partitions drive letters
-// should be assigned.
-//
-// Arguments:
-//
-// PartitionType - Supplies the type of the partition being examined.
-//
-// Return Value:
-//
-// The return value is TRUE if the partition type is recognized,
-// otherwise FALSE is returned.
-//
-//--
-
-function IsRecognizedPartition(PartitionType: DWORD): Boolean;
-{$EXTERNALSYM IsRecognizedPartition}
-
-//++
-//
-// BOOLEAN
-// IsContainerPartition(
-// IN DWORD PartitionType
-// )
-//
-// Routine Description:
-//
-// This macro is used to determine to which partition types are actually
-// containers for other partitions (ie, extended partitions).
-//
-// Arguments:
-//
-// PartitionType - Supplies the type of the partition being examined.
-//
-// Return Value:
-//
-// The return value is TRUE if the partition type is a container,
-// otherwise FALSE is returned.
-//
-//--
-
-function IsContainerPartition(PartitionType: DWORD): Boolean;
-{$EXTERNALSYM IsContainerPartition}
-
-//++
-//
-// BOOLEAN
-// IsFTPartition(
-// IN DWORD PartitionType
-// )
-//
-// Routine Description:
-//
-// This macro is used to determine if the given partition is an FT
-// partition.
-//
-// Arguments:
-//
-// PartitionType - Supplies the type of the partition being examined.
-//
-// Return Value:
-//
-// The return value is TRUE if the partition type is an FT partition,
-// otherwise FALSE is returned.
-//
-//--
-
-function IsFTPartition(PartitionType: DWORD): Boolean;
-{$EXTERNALSYM IsFTPartition}
-
-//
-// Define the media types supported by the driver.
-//
-
-type
- _MEDIA_TYPE = (
- Unknown, // Format is unknown
- F5_1Pt2_512, // 5.25", 1.2MB, 512 bytes/sector
- F3_1Pt44_512, // 3.5", 1.44MB, 512 bytes/sector
- F3_2Pt88_512, // 3.5", 2.88MB, 512 bytes/sector
- F3_20Pt8_512, // 3.5", 20.8MB, 512 bytes/sector
- F3_720_512, // 3.5", 720KB, 512 bytes/sector
- F5_360_512, // 5.25", 360KB, 512 bytes/sector
- F5_320_512, // 5.25", 320KB, 512 bytes/sector
- F5_320_1024, // 5.25", 320KB, 1024 bytes/sector
- F5_180_512, // 5.25", 180KB, 512 bytes/sector
- F5_160_512, // 5.25", 160KB, 512 bytes/sector
- RemovableMedia, // Removable media other than floppy
- FixedMedia, // Fixed hard disk media
- F3_120M_512, // 3.5", 120M Floppy
- F3_640_512, // 3.5" , 640KB, 512 bytes/sector
- F5_640_512, // 5.25", 640KB, 512 bytes/sector
- F5_720_512, // 5.25", 720KB, 512 bytes/sector
- F3_1Pt2_512, // 3.5" , 1.2Mb, 512 bytes/sector
- F3_1Pt23_1024, // 3.5" , 1.23Mb, 1024 bytes/sector
- F5_1Pt23_1024, // 5.25", 1.23MB, 1024 bytes/sector
- F3_128Mb_512, // 3.5" MO 128Mb 512 bytes/sector
- F3_230Mb_512, // 3.5" MO 230Mb 512 bytes/sector
- F8_256_128, // 8", 256KB, 128 bytes/sector
- F3_200Mb_512, // 3.5", 200M Floppy (HiFD)
- F3_240M_512, // 3.5", 240Mb Floppy (HiFD)
- F3_32M_512); // 3.5", 32Mb Floppy
- {$EXTERNALSYM _MEDIA_TYPE}
- MEDIA_TYPE = _MEDIA_TYPE;
- {$EXTERNALSYM MEDIA_TYPE}
- PMEDIA_TYPE = ^MEDIA_TYPE;
- {$EXTERNALSYM PMEDIA_TYPE}
- TMediaType = MEDIA_TYPE;
- PMediaType = PMEDIA_TYPE;
-
-//
-// Define the input buffer structure for the driver, when
-// it is called with IOCTL_DISK_FORMAT_TRACKS.
-//
-
- PFORMAT_PARAMETERS = ^FORMAT_PARAMETERS;
- {$EXTERNALSYM PFORMAT_PARAMETERS}
- _FORMAT_PARAMETERS = record
- MediaType: MEDIA_TYPE;
- StartCylinderNumber: DWORD;
- EndCylinderNumber: DWORD;
- StartHeadNumber: DWORD;
- EndHeadNumber: DWORD;
- end;
- {$EXTERNALSYM _FORMAT_PARAMETERS}
- FORMAT_PARAMETERS = _FORMAT_PARAMETERS;
- {$EXTERNALSYM FORMAT_PARAMETERS}
- TFormatParameters = FORMAT_PARAMETERS;
- PFormatParameters = PFORMAT_PARAMETERS;
-
-//
-// Define the BAD_TRACK_NUMBER type. An array of elements of this type is
-// returned by the driver on IOCTL_DISK_FORMAT_TRACKS requests, to indicate
-// what tracks were bad during formatting. The length of that array is
-// reported in the `Information' field of the I/O Status Block.
-//
-
- BAD_TRACK_NUMBER = WORD;
- {$EXTERNALSYM BAD_TRACK_NUMBER}
- PBAD_TRACK_NUMBER = ^WORD;
- {$EXTERNALSYM PBAD_TRACK_NUMBER}
-
-//
-// Define the input buffer structure for the driver, when
-// it is called with IOCTL_DISK_FORMAT_TRACKS_EX.
-//
-
- PFORMAT_EX_PARAMETERS = ^FORMAT_EX_PARAMETERS;
- {$EXTERNALSYM PFORMAT_EX_PARAMETERS}
- _FORMAT_EX_PARAMETERS = record
- MediaType: MEDIA_TYPE;
- StartCylinderNumber: DWORD;
- EndCylinderNumber: DWORD;
- StartHeadNumber: DWORD;
- EndHeadNumber: DWORD;
- FormatGapLength: WORD;
- SectorsPerTrack: WORD;
- SectorNumber: array [0..0] of WORD;
- end;
- {$EXTERNALSYM _FORMAT_EX_PARAMETERS}
- FORMAT_EX_PARAMETERS = _FORMAT_EX_PARAMETERS;
- {$EXTERNALSYM FORMAT_EX_PARAMETERS}
- TFormatExParameters = FORMAT_EX_PARAMETERS;
- PFormatExParameters = PFORMAT_EX_PARAMETERS;
-
-//
-// The following structure is returned on an IOCTL_DISK_GET_DRIVE_GEOMETRY
-// request and an array of them is returned on an IOCTL_DISK_GET_MEDIA_TYPES
-// request.
-//
-
- PDISK_GEOMETRY = ^DISK_GEOMETRY;
- {$EXTERNALSYM PDISK_GEOMETRY}
- _DISK_GEOMETRY = record
- Cylinders: LARGE_INTEGER;
- MediaType: MEDIA_TYPE;
- TracksPerCylinder: DWORD;
- SectorsPerTrack: DWORD;
- BytesPerSector: DWORD;
- end;
- {$EXTERNALSYM _DISK_GEOMETRY}
- DISK_GEOMETRY = _DISK_GEOMETRY;
- {$EXTERNALSYM DISK_GEOMETRY}
- TDiskGeometry = DISK_GEOMETRY;
- PDiskGeometry = PDISK_GEOMETRY;
-
-//
-// This wmi guid returns a DISK_GEOMETRY structure
-//
-
-const
- WMI_DISK_GEOMETRY_GUID: TGUID = (
- D1:$25007f51; D2:$57c2; D3:$11d1; D4:($a5, $28, $00, $a0, $c9, $06, $29, $10));
- {$EXTERNALSYM WMI_DISK_GEOMETRY_GUID}
-
-//
-// The following structure is returned on an IOCTL_DISK_GET_PARTITION_INFO
-// and an IOCTL_DISK_GET_DRIVE_LAYOUT request. It is also used in a request
-// to change the drive layout, IOCTL_DISK_SET_DRIVE_LAYOUT.
-//
-
-type
- PPARTITION_INFORMATION = ^PARTITION_INFORMATION;
- {$EXTERNALSYM PPARTITION_INFORMATION}
- _PARTITION_INFORMATION = record
- StartingOffset: LARGE_INTEGER;
- PartitionLength: LARGE_INTEGER;
- HiddenSectors: DWORD;
- PartitionNumber: DWORD;
- PartitionType: BYTE;
- BootIndicator: ByteBool;
- RecognizedPartition: ByteBool;
- RewritePartition: ByteBool;
- end;
- {$EXTERNALSYM _PARTITION_INFORMATION}
- PARTITION_INFORMATION = _PARTITION_INFORMATION;
- {$EXTERNALSYM PARTITION_INFORMATION}
- TPartitionInformation = PARTITION_INFORMATION;
- PPartitionInformation = PPARTITION_INFORMATION;
-
-//
-// The following structure is used to change the partition type of a
-// specified disk partition using an IOCTL_DISK_SET_PARTITION_INFO
-// request.
-//
-
- PSET_PARTITION_INFORMATION = ^SET_PARTITION_INFORMATION;
- {$EXTERNALSYM PSET_PARTITION_INFORMATION}
- _SET_PARTITION_INFORMATION = record
- PartitionType: BYTE;
- end;
- {$EXTERNALSYM _SET_PARTITION_INFORMATION}
- SET_PARTITION_INFORMATION = _SET_PARTITION_INFORMATION;
- {$EXTERNALSYM SET_PARTITION_INFORMATION}
- TSetPartitionInformation = _SET_PARTITION_INFORMATION;
- PSetPartitionInformation = PSET_PARTITION_INFORMATION;
-
-//
-// The following structures is returned on an IOCTL_DISK_GET_DRIVE_LAYOUT
-// request and given as input to an IOCTL_DISK_SET_DRIVE_LAYOUT request.
-//
-
- PDRIVE_LAYOUT_INFORMATION = ^DRIVE_LAYOUT_INFORMATION;
- {$EXTERNALSYM PDRIVE_LAYOUT_INFORMATION}
- _DRIVE_LAYOUT_INFORMATION = record
- PartitionCount: DWORD;
- Signature: DWORD;
- PartitionEntry: array [0..0] of PARTITION_INFORMATION;
- end;
- {$EXTERNALSYM _DRIVE_LAYOUT_INFORMATION}
- DRIVE_LAYOUT_INFORMATION = _DRIVE_LAYOUT_INFORMATION;
- {$EXTERNALSYM DRIVE_LAYOUT_INFORMATION}
- TDriveLayoutInformation = DRIVE_LAYOUT_INFORMATION;
- PDriveLayoutInformation = PDRIVE_LAYOUT_INFORMATION;
-
-//
-// The following structure is passed in on an IOCTL_DISK_VERIFY request.
-// The offset and length parameters are both given in bytes.
-//
-
- PVERIFY_INFORMATION = ^VERIFY_INFORMATION;
- {$EXTERNALSYM PVERIFY_INFORMATION}
- _VERIFY_INFORMATION = record
- StartingOffset: LARGE_INTEGER;
- Length: DWORD;
- end;
- {$EXTERNALSYM _VERIFY_INFORMATION}
- VERIFY_INFORMATION = _VERIFY_INFORMATION;
- {$EXTERNALSYM VERIFY_INFORMATION}
- TVerifyInformation = VERIFY_INFORMATION;
- PVerifyInformation = PVERIFY_INFORMATION;
-
-//
-// The following structure is passed in on an IOCTL_DISK_REASSIGN_BLOCKS
-// request.
-//
-
- PREASSIGN_BLOCKS = ^REASSIGN_BLOCKS;
- {$EXTERNALSYM PREASSIGN_BLOCKS}
- _REASSIGN_BLOCKS = record
- Reserved: WORD;
- Count: WORD;
- BlockNumber: array [0..0] of DWORD;
- end;
- {$EXTERNALSYM _REASSIGN_BLOCKS}
- REASSIGN_BLOCKS = _REASSIGN_BLOCKS;
- {$EXTERNALSYM REASSIGN_BLOCKS}
- TReassignBlocks = REASSIGN_BLOCKS;
- PReassignBlocks = PREASSIGN_BLOCKS;
-
-//
-// Support for GUID Partition Table (GPT) disks.
-//
-
-//
-// There are currently two ways a disk can be partitioned. With a traditional
-// AT-style master boot record (PARTITION_STYLE_MBR) and with a new, GPT
-// partition table (PARTITION_STYLE_GPT). RAW is for an unrecognizable
-// partition style. There are a very limited number of things you can
-// do with a RAW partititon.
-//
-
-type
- _PARTITION_STYLE = (
- PARTITION_STYLE_MBR,
- PARTITION_STYLE_GPT,
- PARTITION_STYLE_RAW);
- {$EXTERNALSYM _PARTITION_STYLE}
- PARTITION_STYLE = _PARTITION_STYLE;
- {$EXTERNALSYM PARTITION_STYLE}
- TPartitionStyle = PARTITION_STYLE;
-
-//
-// The following structure defines information in a GPT partition that is
-// not common to both GPT and MBR partitions.
-//
-
- PPARTITION_INFORMATION_GPT = ^PARTITION_INFORMATION_GPT;
- {$EXTERNALSYM PPARTITION_INFORMATION_GPT}
- _PARTITION_INFORMATION_GPT = record
- PartitionType: GUID; // Partition type. See table 16-3.
- PartitionId: GUID; // Unique GUID for this partition.
- Attributes: DWORD64; // See table 16-4.
- Name: array [0..35] of WCHAR; // Partition Name in Unicode.
- end;
- {$EXTERNALSYM _PARTITION_INFORMATION_GPT}
- PARTITION_INFORMATION_GPT = _PARTITION_INFORMATION_GPT;
- {$EXTERNALSYM PARTITION_INFORMATION_GPT}
- TPartitionInformationGpt = PARTITION_INFORMATION_GPT;
- PPartitionInformationGpt = PPARTITION_INFORMATION_GPT;
-
-//
-// The following are GPT partition attributes applicable for any
-// partition type. These attributes are not OS-specific
-//
-
-const
- GPT_ATTRIBUTE_PLATFORM_REQUIRED = $0000000000000001;
- {$EXTERNALSYM GPT_ATTRIBUTE_PLATFORM_REQUIRED}
-
-//
-// The following are GPT partition attributes applicable when the
-// PartitionType is PARTITION_BASIC_DATA_GUID.
-//
-
- GPT_BASIC_DATA_ATTRIBUTE_NO_DRIVE_LETTER = DWORD($8000000000000000);
- {$EXTERNALSYM GPT_BASIC_DATA_ATTRIBUTE_NO_DRIVE_LETTER}
- GPT_BASIC_DATA_ATTRIBUTE_HIDDEN = $4000000000000000;
- {$EXTERNALSYM GPT_BASIC_DATA_ATTRIBUTE_HIDDEN}
- GPT_BASIC_DATA_ATTRIBUTE_READ_ONLY = $1000000000000000;
- {$EXTERNALSYM GPT_BASIC_DATA_ATTRIBUTE_READ_ONLY}
-
-//
-// The following structure defines information in an MBR partition that is not
-// common to both GPT and MBR partitions.
-//
-
-type
- PPARTITION_INFORMATION_MBR = ^PARTITION_INFORMATION_MBR;
- {$EXTERNALSYM PPARTITION_INFORMATION_MBR}
- _PARTITION_INFORMATION_MBR = record
- PartitionType: BYTE;
- BootIndicator: BOOLEAN;
- RecognizedPartition: BOOLEAN;
- HiddenSectors: DWORD;
- end;
- {$EXTERNALSYM _PARTITION_INFORMATION_MBR}
- PARTITION_INFORMATION_MBR = _PARTITION_INFORMATION_MBR;
- {$EXTERNALSYM PARTITION_INFORMATION_MBR}
- TPartitionInformationMbr = PARTITION_INFORMATION_MBR;
- PPartitionInformationMbr = PPARTITION_INFORMATION_MBR;
-
-//
-// The structure SET_PARTITION_INFO_EX is used with the ioctl
-// IOCTL_SET_PARTITION_INFO_EX to set information about a specific
-// partition. Note that for MBR partitions, you can only set the partition
-// signature, whereas GPT partitions allow setting of all fields that
-// you can get.
-//
-
- SET_PARTITION_INFORMATION_MBR = SET_PARTITION_INFORMATION;
- {$EXTERNALSYM SET_PARTITION_INFORMATION_MBR}
- TSetPartitionInformationMbr = SET_PARTITION_INFORMATION_MBR;
- SET_PARTITION_INFORMATION_GPT = PARTITION_INFORMATION_GPT;
- {$EXTERNALSYM SET_PARTITION_INFORMATION_GPT}
- TSetPartitionInformationGpt = SET_PARTITION_INFORMATION_GPT;
-
- PSET_PARTITION_INFORMATION_EX = ^SET_PARTITION_INFORMATION_EX;
- {$EXTERNALSYM PSET_PARTITION_INFORMATION_EX}
- _SET_PARTITION_INFORMATION_EX = record
- PartitionStyle: PARTITION_STYLE;
- case Integer of
- 0: (Mbr: SET_PARTITION_INFORMATION_MBR);
- 1: (Gpt: SET_PARTITION_INFORMATION_GPT);
- end;
- {$EXTERNALSYM _SET_PARTITION_INFORMATION_EX}
- SET_PARTITION_INFORMATION_EX = _SET_PARTITION_INFORMATION_EX;
- {$EXTERNALSYM SET_PARTITION_INFORMATION_EX}
- TSetPartitionInformationEx = SET_PARTITION_INFORMATION_EX;
- PSetPartitionInformationEx = PSET_PARTITION_INFORMATION_EX;
-
-//
-// The structure CREATE_DISK_GPT with the ioctl IOCTL_DISK_CREATE_DISK
-// to initialize an virgin disk with an empty GPT partition table.
-//
-
- PCREATE_DISK_GPT = ^CREATE_DISK_GPT;
- {$EXTERNALSYM PCREATE_DISK_GPT}
- _CREATE_DISK_GPT = record
- DiskId: GUID; // Unique disk id for the disk.
- MaxPartitionCount: DWORD; // Maximim number of partitions allowable.
- end;
- {$EXTERNALSYM _CREATE_DISK_GPT}
- CREATE_DISK_GPT = _CREATE_DISK_GPT;
- {$EXTERNALSYM CREATE_DISK_GPT}
- TCreateDiskGpt = CREATE_DISK_GPT;
- PCreateDiskGpt = PCREATE_DISK_GPT;
-
-//
-// The structure CREATE_DISK_MBR with the ioctl IOCTL_DISK_CREATE_DISK
-// to initialize an virgin disk with an empty MBR partition table.
-//
-
- PCREATE_DISK_MBR = ^CREATE_DISK_MBR;
- {$EXTERNALSYM PCREATE_DISK_MBR}
- _CREATE_DISK_MBR = record
- Signature: DWORD;
- end;
- {$EXTERNALSYM _CREATE_DISK_MBR}
- CREATE_DISK_MBR = _CREATE_DISK_MBR;
- {$EXTERNALSYM CREATE_DISK_MBR}
- TCreateDiskMbr = CREATE_DISK_MBR;
- PCreateDiskMbr = PCREATE_DISK_MBR;
-
- PCREATE_DISK = ^CREATE_DISK;
- {$EXTERNALSYM PCREATE_DISK}
- _CREATE_DISK = record
- PartitionStyle: PARTITION_STYLE;
- case Integer of
- 0: (Mbr: CREATE_DISK_MBR);
- 1: (Gpt: CREATE_DISK_GPT);
- end;
- {$EXTERNALSYM _CREATE_DISK}
- CREATE_DISK = _CREATE_DISK;
- {$EXTERNALSYM CREATE_DISK}
- TCreateDisk = CREATE_DISK;
- PCreateDisk = PCREATE_DISK;
-
-//
-// The structure GET_LENGTH_INFORMATION is used with the ioctl
-// IOCTL_DISK_GET_LENGTH_INFO to obtain the length, in bytes, of the
-// disk, partition, or volume.
-//
-
- PGET_LENGTH_INFORMATION = ^GET_LENGTH_INFORMATION;
- {$EXTERNALSYM PGET_LENGTH_INFORMATION}
- _GET_LENGTH_INFORMATION = record
- Length: LARGE_INTEGER;
- end;
- {$EXTERNALSYM _GET_LENGTH_INFORMATION}
- GET_LENGTH_INFORMATION = _GET_LENGTH_INFORMATION;
- {$EXTERNALSYM GET_LENGTH_INFORMATION}
- TGetLengthInformation = GET_LENGTH_INFORMATION;
- PGetLengthInformation = PGET_LENGTH_INFORMATION;
-
-//
-// The PARTITION_INFORMATION_EX structure is used with the
-// IOCTL_DISK_GET_DRIVE_LAYOUT_EX, IOCTL_DISK_SET_DRIVE_LAYOUT_EX,
-// IOCTL_DISK_GET_PARTITION_INFO_EX and IOCTL_DISK_GET_PARTITION_INFO_EX calls.
-//
-
- PPARTITION_INFORMATION_EX = ^PARTITION_INFORMATION_EX;
- {$EXTERNALSYM PPARTITION_INFORMATION_EX}
- _PARTITION_INFORMATION_EX = record
- PartitionStyle: PARTITION_STYLE;
- StartingOffset: LARGE_INTEGER;
- PartitionLength: LARGE_INTEGER;
- PartitionNumber: DWORD;
- RewritePartition: BOOLEAN;
- case Integer of
- 0: (Mbr: PARTITION_INFORMATION_MBR);
- 1: (Gpt: PARTITION_INFORMATION_GPT);
- end;
- {$EXTERNALSYM _PARTITION_INFORMATION_EX}
- PARTITION_INFORMATION_EX = _PARTITION_INFORMATION_EX;
- {$EXTERNALSYM PARTITION_INFORMATION_EX}
- TPartitionInformationEx = PARTITION_INFORMATION_EX;
- PPartitionInformationEx = PPARTITION_INFORMATION_EX;
-
-//
-// GPT specific drive layout information.
-//
-
- PDRIVE_LAYOUT_INFORMATION_GPT = ^DRIVE_LAYOUT_INFORMATION_GPT;
- {$EXTERNALSYM PDRIVE_LAYOUT_INFORMATION_GPT}
- _DRIVE_LAYOUT_INFORMATION_GPT = record
- DiskId: GUID;
- StartingUsableOffset: LARGE_INTEGER;
- UsableLength: LARGE_INTEGER;
- MaxPartitionCount: DWORD;
- end;
- {$EXTERNALSYM _DRIVE_LAYOUT_INFORMATION_GPT}
- DRIVE_LAYOUT_INFORMATION_GPT = _DRIVE_LAYOUT_INFORMATION_GPT;
- {$EXTERNALSYM DRIVE_LAYOUT_INFORMATION_GPT}
- TDriveLayoutInformationGpt = DRIVE_LAYOUT_INFORMATION_GPT;
- PDriveLayoutInformationGpt = PDRIVE_LAYOUT_INFORMATION_GPT;
-
-//
-// MBR specific drive layout information.
-//
-
- PDRIVE_LAYOUT_INFORMATION_MBR = ^DRIVE_LAYOUT_INFORMATION_MBR;
- {$EXTERNALSYM PDRIVE_LAYOUT_INFORMATION_MBR}
- _DRIVE_LAYOUT_INFORMATION_MBR = record
- Signature: DWORD;
- end;
- {$EXTERNALSYM _DRIVE_LAYOUT_INFORMATION_MBR}
- DRIVE_LAYOUT_INFORMATION_MBR = _DRIVE_LAYOUT_INFORMATION_MBR;
- {$EXTERNALSYM DRIVE_LAYOUT_INFORMATION_MBR}
- TDriveLayoutInformationMbr = DRIVE_LAYOUT_INFORMATION_MBR;
- PDriveLayoutInformationMbr = PDRIVE_LAYOUT_INFORMATION_MBR;
-
-//
-// The structure DRIVE_LAYOUT_INFORMATION_EX is used with the
-// IOCTL_SET_DRIVE_LAYOUT_EX and IOCTL_GET_DRIVE_LAYOUT_EX calls.
-//
-
- PDRIVE_LAYOUT_INFORMATION_EX = ^DRIVE_LAYOUT_INFORMATION_EX;
- {$EXTERNALSYM PDRIVE_LAYOUT_INFORMATION_EX}
- _DRIVE_LAYOUT_INFORMATION_EX = record
- PartitionStyle: DWORD;
- PartitionCount: DWORD;
- Union: record
- case Integer of
- 0: (Mbr: DRIVE_LAYOUT_INFORMATION_MBR);
- 1: (Gpt: DRIVE_LAYOUT_INFORMATION_GPT);
- end;
- PartitionEntry: array [0..0] of PARTITION_INFORMATION_EX;
- end;
- {$EXTERNALSYM _DRIVE_LAYOUT_INFORMATION_EX}
- DRIVE_LAYOUT_INFORMATION_EX = _DRIVE_LAYOUT_INFORMATION_EX;
- {$EXTERNALSYM DRIVE_LAYOUT_INFORMATION_EX}
- TDriveLayoutInformationEx = DRIVE_LAYOUT_INFORMATION_EX;
- PDriveLayoutInformationEx = PDRIVE_LAYOUT_INFORMATION_EX;
-
-//
-// The DISK_GEOMETRY_EX structure is returned on issuing an
-// IOCTL_DISK_GET_DRIVE_GEOMETRY_EX ioctl.
-//
-
- _DETECTION_TYPE = (
- DetectNone,
- DetectInt13,
- DetectExInt13);
- {$EXTERNALSYM _DETECTION_TYPE}
- DETECTION_TYPE = _DETECTION_TYPE;
- {$EXTERNALSYM DETECTION_TYPE}
- TDetectionType = DETECTION_TYPE;
-
- PDISK_INT13_INFO = ^DISK_INT13_INFO;
- {$EXTERNALSYM PDISK_INT13_INFO}
- _DISK_INT13_INFO = record
- DriveSelect: WORD;
- MaxCylinders: DWORD;
- SectorsPerTrack: WORD;
- MaxHeads: WORD;
- NumberDrives: WORD;
- end;
- {$EXTERNALSYM _DISK_INT13_INFO}
- DISK_INT13_INFO = _DISK_INT13_INFO;
- {$EXTERNALSYM DISK_INT13_INFO}
- TDiskInt13Info = DISK_INT13_INFO;
- PDiskInt13Info = PDISK_INT13_INFO;
-
- PDISK_EX_INT13_INFO = ^DISK_EX_INT13_INFO;
- {$EXTERNALSYM PDISK_EX_INT13_INFO}
- _DISK_EX_INT13_INFO = record
- ExBufferSize: WORD;
- ExFlags: WORD;
- ExCylinders: DWORD;
- ExHeads: DWORD;
- ExSectorsPerTrack: DWORD;
- ExSectorsPerDrive: DWORD64;
- ExSectorSize: WORD;
- ExReserved: WORD;
- end;
- {$EXTERNALSYM _DISK_EX_INT13_INFO}
- DISK_EX_INT13_INFO = _DISK_EX_INT13_INFO;
- {$EXTERNALSYM DISK_EX_INT13_INFO}
- TDiskExInt13Info = DISK_EX_INT13_INFO;
- PDiskExInt13Info = PDISK_EX_INT13_INFO;
-
- PDISK_DETECTION_INFO = ^DISK_DETECTION_INFO;
- {$EXTERNALSYM PDISK_DETECTION_INFO}
- _DISK_DETECTION_INFO = record
- SizeOfDetectInfo: DWORD;
- DetectionType: DETECTION_TYPE;
- case Integer of
- 0: (
- //
- // If DetectionType == DETECTION_INT13 then we have just the Int13
- // information.
- //
- Int13: DISK_INT13_INFO;
- //
- // If DetectionType == DETECTION_EX_INT13, then we have the
- // extended int 13 information.
- //
- ExInt13: DISK_EX_INT13_INFO); // If DetectionType == DetectExInt13
- end;
- {$EXTERNALSYM _DISK_DETECTION_INFO}
- DISK_DETECTION_INFO = _DISK_DETECTION_INFO;
- {$EXTERNALSYM DISK_DETECTION_INFO}
- TDiskDetectionInfo = DISK_DETECTION_INFO;
- PDiskDetectionInfo = PDISK_DETECTION_INFO;
-
- PDISK_PARTITION_INFO = ^DISK_PARTITION_INFO;
- {$EXTERNALSYM PDISK_PARTITION_INFO}
- _DISK_PARTITION_INFO = record
- SizeOfPartitionInfo: DWORD;
- PartitionStyle: PARTITION_STYLE; // PartitionStyle = RAW, GPT or MBR
- case Integer of
- 0: ( // If PartitionStyle == MBR
- Signature: DWORD; // MBR Signature
- CheckSum: DWORD); // MBR CheckSum
- 1: ( // If PartitionStyle == GPT
- DiskId: GUID);
- end;
- {$EXTERNALSYM _DISK_PARTITION_INFO}
- DISK_PARTITION_INFO = _DISK_PARTITION_INFO;
- {$EXTERNALSYM DISK_PARTITION_INFO}
- TDiskPartitionInfo = DISK_PARTITION_INFO;
- PDiskPartitionInfo = PDISK_PARTITION_INFO;
-
-//
-// The Geometry structure is a variable length structure composed of a
-// DISK_GEOMETRY_EX structure followed by a DISK_PARTITION_INFO structure
-// followed by a DISK_DETECTION_DATA structure.
-//
-
-type
- PDISK_GEOMETRY_EX = ^DISK_GEOMETRY_EX;
- {$EXTERNALSYM PDISK_GEOMETRY_EX}
- _DISK_GEOMETRY_EX = record
- Geometry: DISK_GEOMETRY; // Standard disk geometry: may be faked by driver.
- DiskSize: LARGE_INTEGER; // Must always be correct
- Data: array [0..0] of BYTE; // Partition, Detect info
- end;
- {$EXTERNALSYM _DISK_GEOMETRY_EX}
- DISK_GEOMETRY_EX = _DISK_GEOMETRY_EX;
- {$EXTERNALSYM DISK_GEOMETRY_EX}
- TDiskGeometryEx = DISK_GEOMETRY_EX;
- PDiskGeometryEx = PDISK_GEOMETRY_EX;
-
-function DiskGeometryGetPartition(Geometry: PDiskGeometryEx): PDiskPartitionInfo;
-{$EXTERNALSYM DiskGeometryGetPartition}
-
-function DiskGeometryGetDetect(Geometry: PDiskGeometryEx): PDiskDetectionInfo;
-{$EXTERNALSYM DiskGeometryGetDetect}
-
-//
-// IOCTL_DISK_CONTROLLER_NUMBER returns the controller and disk
-// number for the handle. This is used to determine if a disk
-// is attached to the primary or secondary IDE controller.
-//
-type
- PDISK_CONTROLLER_NUMBER = ^DISK_CONTROLLER_NUMBER;
- {$EXTERNALSYM PDISK_CONTROLLER_NUMBER}
- _DISK_CONTROLLER_NUMBER = record
- ControllerNumber: DWORD;
- DiskNumber: DWORD;
- end;
- {$EXTERNALSYM _DISK_CONTROLLER_NUMBER}
- DISK_CONTROLLER_NUMBER = _DISK_CONTROLLER_NUMBER;
- {$EXTERNALSYM DISK_CONTROLLER_NUMBER}
- TDiskControllerNumber = DISK_CONTROLLER_NUMBER;
- PDiskControllerNumber = PDISK_CONTROLLER_NUMBER;
-
-//
-// IOCTL_DISK_SET_CACHE allows the caller to get or set the state of the disk
-// read/write caches.
-//
-// If the structure is provided as the input buffer for the ioctl the read &
-// write caches will be enabled or disabled depending on the parameters
-// provided.
-//
-// If the structure is provided as an output buffer for the ioctl the state
-// of the read & write caches will be returned. If both input and outut buffers
-// are provided the output buffer will contain the cache state BEFORE any
-// changes are made
-//
-
- DISK_CACHE_RETENTION_PRIORITY = (EqualPriority, KeepPrefetchedData, KeepReadData);
- {$EXTERNALSYM DISK_CACHE_RETENTION_PRIORITY}
- TDiskCacheRetentionPriority = DISK_CACHE_RETENTION_PRIORITY;
-
- TDCIScalarPrefetch = record
- Minimum: WORD;
- Maximum: WORD;
- //
- // The maximum number of blocks which will be prefetched - useful
- // with the scalar limits to set definite upper limits.
- //
- MaximumBlocks: WORD;
- end;
-
- TDCIBlockPrefetch = record
- Minimum: WORD;
- Maximum: WORD;
- end;
-
- PDISK_CACHE_INFORMATION = ^DISK_CACHE_INFORMATION;
- {$EXTERNALSYM PDISK_CACHE_INFORMATION}
- _DISK_CACHE_INFORMATION = record
-
- //
- // on return indicates that the device is capable of saving any parameters
- // in non-volatile storage. On send indicates that the device should
- // save the state in non-volatile storage.
- //
-
- ParametersSavable: ByteBool;
-
- //
- // Indicates whether the write and read caches are enabled.
- //
-
- ReadCacheEnabled: ByteBool;
- WriteCacheEnabled: ByteBool;
-
- //
- // Controls the likelyhood of data remaining in the cache depending on how
- // it got there. Data cached from a READ or WRITE operation may be given
- // higher, lower or equal priority to data entered into the cache for other
- // means (like prefetch)
- //
-
- ReadRetentionPriority: DISK_CACHE_RETENTION_PRIORITY;
- WriteRetentionPriority: DISK_CACHE_RETENTION_PRIORITY;
-
- //
- // Requests for a larger number of blocks than this may have prefetching
- // disabled. If this value is set to 0 prefetch will be disabled.
- //
-
- DisablePrefetchTransferLength: WORD;
-
- //
- // If TRUE then ScalarPrefetch (below) will be valid. If FALSE then
- // the minimum and maximum values should be treated as a block count
- // (BlockPrefetch)
- //
-
- PrefetchScalar: ByteBool;
-
- //
- // Contains the minimum and maximum amount of data which will be
- // will be prefetched into the cache on a disk operation. This value
- // may either be a scalar multiplier of the transfer length of the request,
- // or an abolute number of disk blocks. PrefetchScalar (above) indicates
- // which interpretation is used.
- //
-
- case Integer of
- 0: (ScalarPrefetch: TDCIScalarPrefetch);
- 1: (BlockPrefetch: TDCIBlockPrefetch);
-
- end;
- {$EXTERNALSYM _DISK_CACHE_INFORMATION}
- DISK_CACHE_INFORMATION = _DISK_CACHE_INFORMATION;
- {$EXTERNALSYM DISK_CACHE_INFORMATION}
- TDiskCacheInformation = DISK_CACHE_INFORMATION;
- PDiskCacheInformation = PDISK_CACHE_INFORMATION;
-
-//
-// IOCTL_DISK_GROW_PARTITION will update the size of a partition
-// by adding sectors to the length. The number of sectors must be
-// predetermined by examining PARTITION_INFORMATION.
-//
-
- PDISK_GROW_PARTITION = ^DISK_GROW_PARTITION;
- {$EXTERNALSYM PDISK_GROW_PARTITION}
- _DISK_GROW_PARTITION = record
- PartitionNumber: DWORD;
- BytesToGrow: LARGE_INTEGER;
- end;
- {$EXTERNALSYM _DISK_GROW_PARTITION}
- DISK_GROW_PARTITION = _DISK_GROW_PARTITION;
- {$EXTERNALSYM DISK_GROW_PARTITION}
- TDiskGrowPartition = DISK_GROW_PARTITION;
- PDiskGrowPartition = PDISK_GROW_PARTITION;
-
-///////////////////////////////////////////////////////
-// //
-// The following structures define disk performance //
-// statistics: specifically the locations of all the //
-// reads and writes which have occured on the disk. //
-// //
-// To use these structures, you must issue an IOCTL_ //
-// DISK_HIST_STRUCTURE (with a DISK_HISTOGRAM) to //
-// obtain the basic histogram information. The //
-// number of buckets which must allocated is part of //
-// this structure. Allocate the required number of //
-// buckets and call an IOCTL_DISK_HIST_DATA to fill //
-// in the data //
-// //
-///////////////////////////////////////////////////////
-
-const
- HIST_NO_OF_BUCKETS = 24;
- {$EXTERNALSYM HIST_NO_OF_BUCKETS}
-
-type
- PHISTOGRAM_BUCKET = ^HISTOGRAM_BUCKET;
- {$EXTERNALSYM PHISTOGRAM_BUCKET}
- _HISTOGRAM_BUCKET = record
- Reads: DWORD;
- Writes: DWORD;
- end;
- {$EXTERNALSYM _HISTOGRAM_BUCKET}
- HISTOGRAM_BUCKET = _HISTOGRAM_BUCKET;
- {$EXTERNALSYM HISTOGRAM_BUCKET}
- THistogramBucket = HISTOGRAM_BUCKET;
- PHistogramBucket = PHISTOGRAM_BUCKET;
-
-const
- HISTOGRAM_BUCKET_SIZE = SizeOf(HISTOGRAM_BUCKET);
- {$EXTERNALSYM HISTOGRAM_BUCKET_SIZE}
-
-type
- PDISK_HISTOGRAM = ^DISK_HISTOGRAM;
- {$EXTERNALSYM PDISK_HISTOGRAM}
- _DISK_HISTOGRAM = record
- DiskSize: LARGE_INTEGER;
- Start: LARGE_INTEGER;
- End_: LARGE_INTEGER;
- Average: LARGE_INTEGER;
- AverageRead: LARGE_INTEGER;
- AverageWrite: LARGE_INTEGER;
- Granularity: DWORD;
- Size: DWORD;
- ReadCount: DWORD;
- WriteCount: DWORD;
- Histogram: PHISTOGRAM_BUCKET;
- end;
- {$EXTERNALSYM _DISK_HISTOGRAM}
- DISK_HISTOGRAM = _DISK_HISTOGRAM;
- {$EXTERNALSYM DISK_HISTOGRAM}
- TDiskHistogram = DISK_HISTOGRAM;
- PDiskHistogram = PDISK_HISTOGRAM;
-
-const
- DISK_HISTOGRAM_SIZE = SizeOf(DISK_HISTOGRAM);
- {$EXTERNALSYM DISK_HISTOGRAM_SIZE}
-
-///////////////////////////////////////////////////////
-// //
-// The following structures define disk debugging //
-// capabilities. The IOCTLs are directed to one of //
-// the two disk filter drivers. //
-// //
-// DISKPERF is a utilty for collecting disk request //
-// statistics. //
-// //
-// SIMBAD is a utility for injecting faults in //
-// IO requests to disks. //
-// //
-///////////////////////////////////////////////////////
-
-//
-// The following structure is exchanged on an IOCTL_DISK_GET_PERFORMANCE
-// request. This ioctl collects summary disk request statistics used
-// in measuring performance.
-//
-
-type
- PDISK_PERFORMANCE = ^DISK_PERFORMANCE;
- {$EXTERNALSYM PDISK_PERFORMANCE}
- _DISK_PERFORMANCE = record
- BytesRead: LARGE_INTEGER;
- BytesWritten: LARGE_INTEGER;
- ReadTime: LARGE_INTEGER;
- WriteTime: LARGE_INTEGER;
- IdleTime: LARGE_INTEGER;
- ReadCount: DWORD;
- WriteCount: DWORD;
- QueueDepth: DWORD;
- SplitCount: DWORD;
- QueryTime: LARGE_INTEGER;
- StorageDeviceNumber: DWORD;
- StorageManagerName: array [0..7] of WCHAR;
- end;
- {$EXTERNALSYM _DISK_PERFORMANCE}
- DISK_PERFORMANCE = _DISK_PERFORMANCE;
- {$EXTERNALSYM DISK_PERFORMANCE}
- TDiskPerformance = DISK_PERFORMANCE;
- PDiskPerformance = PDISK_PERFORMANCE;
-
-//
-// This structure defines the disk logging record. When disk logging
-// is enabled, one of these is written to an internal buffer for each
-// disk request.
-//
-
- PDISK_RECORD = ^DISK_RECORD;
- {$EXTERNALSYM PDISK_RECORD}
- _DISK_RECORD = record
- ByteOffset: LARGE_INTEGER;
- StartTime: LARGE_INTEGER;
- EndTime: LARGE_INTEGER;
- VirtualAddress: PVOID;
- NumberOfBytes: DWORD;
- DeviceNumber: BYTE;
- ReadRequest: ByteBool;
- end;
- {$EXTERNALSYM _DISK_RECORD}
- DISK_RECORD = _DISK_RECORD;
- {$EXTERNALSYM DISK_RECORD}
- TDiskRecord = DISK_RECORD;
- PDiskRecord = PDISK_RECORD;
-
-//
-// The following structure is exchanged on an IOCTL_DISK_LOG request.
-// Not all fields are valid with each function type.
-//
-
- PDISK_LOGGING = ^DISK_LOGGING;
- {$EXTERNALSYM PDISK_LOGGING}
- _DISK_LOGGING = record
- Function_: BYTE;
- BufferAddress: PVOID;
- BufferSize: DWORD;
- end;
- {$EXTERNALSYM _DISK_LOGGING}
- DISK_LOGGING = _DISK_LOGGING;
- {$EXTERNALSYM DISK_LOGGING}
- TDiskLogging = DISK_LOGGING;
- PDiskLogging = PDISK_LOGGING;
-
-//
-// Disk logging functions
-//
-// Start disk logging. Only the Function and BufferSize fields are valid.
-//
-
-const
- DISK_LOGGING_START = 0;
- {$EXTERNALSYM DISK_LOGGING_START}
-
-//
-// Stop disk logging. Only the Function field is valid.
-//
-
- DISK_LOGGING_STOP = 1;
- {$EXTERNALSYM DISK_LOGGING_STOP}
-
-//
-// Return disk log. All fields are valid. Data will be copied from internal
-// buffer to buffer specified for the number of bytes requested.
-//
-
- DISK_LOGGING_DUMP = 2;
- {$EXTERNALSYM DISK_LOGGING_DUMP}
-
-//
-// DISK BINNING
-//
-// DISKPERF will keep counters for IO that falls in each of these ranges.
-// The application determines the number and size of the ranges.
-// Joe Lin wanted me to keep it flexible as possible, for instance, IO
-// sizes are interesting in ranges like 0-4096, 4097-16384, 16385-65536, 65537+.
-//
-
- DISK_BINNING = 3;
- {$EXTERNALSYM DISK_BINNING}
-
-//
-// Bin types
-//
-
-type
- _BIN_TYPES = (RequestSize, RequestLocation);
- {$EXTERNALSYM _BIN_TYPES}
- BIN_TYPES = _BIN_TYPES;
- {$EXTERNALSYM BIN_TYPES}
- TBinTypes = _BIN_TYPES;
-
-//
-// Bin ranges
-//
-
- PBIN_RANGE = ^BIN_RANGE;
- {$EXTERNALSYM PBIN_RANGE}
- _BIN_RANGE = record
- StartValue: LARGE_INTEGER;
- Length: LARGE_INTEGER;
- end;
- {$EXTERNALSYM _BIN_RANGE}
- BIN_RANGE = _BIN_RANGE;
- {$EXTERNALSYM BIN_RANGE}
- TBinRange = BIN_RANGE;
- PBinRange = PBIN_RANGE;
-
-//
-// Bin definition
-//
-
- PPERF_BIN = ^PERF_BIN;
- {$EXTERNALSYM PPERF_BIN}
- _PERF_BIN = record
- NumberOfBins: DWORD;
- TypeOfBin: DWORD;
- BinsRanges: array [0..0] of BIN_RANGE;
- end;
- {$EXTERNALSYM _PERF_BIN}
- PERF_BIN = _PERF_BIN;
- {$EXTERNALSYM PERF_BIN}
- TPerfBin = PERF_BIN;
- PPerfBin = PPERF_BIN;
-
-//
-// Bin count
-//
-
- PBIN_COUNT = ^BIN_COUNT;
- {$EXTERNALSYM PBIN_COUNT}
- _BIN_COUNT = record
- BinRange: BIN_RANGE;
- BinCount: DWORD;
- end;
- {$EXTERNALSYM _BIN_COUNT}
- BIN_COUNT = _BIN_COUNT;
- {$EXTERNALSYM BIN_COUNT}
- TBinCount = BIN_COUNT;
- PBinCount = PBIN_COUNT;
-
-//
-// Bin results
-//
-
- PBIN_RESULTS = ^BIN_RESULTS;
- {$EXTERNALSYM PBIN_RESULTS}
- _BIN_RESULTS = record
- NumberOfBins: DWORD;
- BinCounts: array [0..0] of BIN_COUNT;
- end;
- {$EXTERNALSYM _BIN_RESULTS}
- BIN_RESULTS = _BIN_RESULTS;
- {$EXTERNALSYM BIN_RESULTS}
- TBinResults = BIN_RESULTS;
- PBinResults = PBIN_RESULTS;
-
-//
-// Data structures for SMART drive fault prediction.
-//
-// GETVERSIONINPARAMS contains the data returned from the
-// Get Driver Version function.
-//
-
-//#include <pshpack1.h>
-
- LPGETVERSIONINPARAMS = ^GETVERSIONINPARAMS;
- {$EXTERNALSYM LPGETVERSIONINPARAMS}
- _GETVERSIONINPARAMS = packed record
- bVersion: BYTE; // Binary driver version.
- bRevision: BYTE; // Binary driver revision.
- bReserved: BYTE; // Not used.
- bIDEDeviceMap: BYTE; // Bit map of IDE devices.
- fCapabilities: DWORD; // Bit mask of driver capabilities.
- dwReserved: array [0..3] of DWORD; // For future use.
- end;
- {$EXTERNALSYM _GETVERSIONINPARAMS}
- GETVERSIONINPARAMS = _GETVERSIONINPARAMS;
- {$EXTERNALSYM GETVERSIONINPARAMS}
- TGetVersionInParams = GETVERSIONINPARAMS;
- PGetVersionInParams = LPGETVERSIONINPARAMS;
-
-//#include <poppack.h>
-
-//
-// Bits returned in the fCapabilities member of GETVERSIONINPARAMS
-//
-
-const
- CAP_ATA_ID_CMD = 1; // ATA ID command supported
- {$EXTERNALSYM CAP_ATA_ID_CMD}
- CAP_ATAPI_ID_CMD = 2; // ATAPI ID command supported
- {$EXTERNALSYM CAP_ATAPI_ID_CMD}
- CAP_SMART_CMD = 4; // SMART commannds supported
- {$EXTERNALSYM CAP_SMART_CMD}
-
-//
-// IDE registers
-//
-
-//#include <pshpack1.h>
-
-type
- LPIDEREGS = ^IDEREGS;
- {$EXTERNALSYM LPIDEREGS}
- _IDEREGS = packed record
- bFeaturesReg: BYTE; // Used for specifying SMART "commands".
- bSectorCountReg: BYTE; // IDE sector count register
- bSectorNumberReg: BYTE; // IDE sector number register
- bCylLowReg: BYTE; // IDE low order cylinder value
- bCylHighReg: BYTE; // IDE high order cylinder value
- bDriveHeadReg: BYTE; // IDE drive/head register
- bCommandReg: BYTE; // Actual IDE command.
- bReserved: BYTE; // reserved for future use. Must be zero.
- end;
- {$EXTERNALSYM _IDEREGS}
- IDEREGS = _IDEREGS;
- {$EXTERNALSYM IDEREGS}
- TIdeRegs = IDEREGS;
- PIdeRegs = LPIDEREGS;
-
-//#include <poppack.h>
-
-//
-// Valid values for the bCommandReg member of IDEREGS.
-//
-
-const
- ATAPI_ID_CMD = $A1; // Returns ID sector for ATAPI.
- {$EXTERNALSYM ATAPI_ID_CMD}
- ID_CMD = $EC; // Returns ID sector for ATA.
- {$EXTERNALSYM ID_CMD}
- SMART_CMD = $B0; // Performs SMART cmd.
- // Requires valid bFeaturesReg,
- // bCylLowReg, and bCylHighReg
- {$EXTERNALSYM SMART_CMD}
-
-//
-// Cylinder register defines for SMART command
-//
-
- SMART_CYL_LOW = $4F;
- {$EXTERNALSYM SMART_CYL_LOW}
- SMART_CYL_HI = $C2;
- {$EXTERNALSYM SMART_CYL_HI}
-
-//
-// SENDCMDINPARAMS contains the input parameters for the
-// Send Command to Drive function.
-//
-
-//#include <pshpack1.h>
-
-type
- LPSENDCMDINPARAMS = ^SENDCMDINPARAMS;
- {$EXTERNALSYM LPSENDCMDINPARAMS}
- _SENDCMDINPARAMS = packed record
- cBufferSize: DWORD; // Buffer size in bytes
- irDriveRegs: IDEREGS; // Structure with drive register values.
- bDriveNumber: BYTE; // Physical drive number to send
- // command to (0,1,2,3).
- bReserved: array [0..2] of BYTE; // Reserved for future expansion.
- dwReserved: array [0..3] of DWORD; // For future use.
- bBuffer: array [0..0] of BYTE; // Input buffer.
- end;
- {$EXTERNALSYM _SENDCMDINPARAMS}
- SENDCMDINPARAMS = _SENDCMDINPARAMS;
- {$EXTERNALSYM SENDCMDINPARAMS}
- TSendCmdInParams = SENDCMDINPARAMS;
- PSendCmdInParams = LPSENDCMDINPARAMS;
-
-//#include <poppack.h>
-
-//
-// Status returned from driver
-//
-
-//#include <pshpack1.h>
-
- LPDRIVERSTATUS = ^DRIVERSTATUS;
- {$EXTERNALSYM LPDRIVERSTATUS}
- _DRIVERSTATUS = packed record
- bDriverError: BYTE; // Error code from driver,
- // or 0 if no error.
- bIDEError: BYTE; // Contents of IDE Error register.
- // Only valid when bDriverError
- // is SMART_IDE_ERROR.
- bReserved: array [0..1] of BYTE; // Reserved for future expansion.
- dwReserved: array [0..1] of DWORD; // Reserved for future expansion.
- end;
- {$EXTERNALSYM _DRIVERSTATUS}
- DRIVERSTATUS = _DRIVERSTATUS;
- {$EXTERNALSYM DRIVERSTATUS}
- TDriverStatus = DRIVERSTATUS;
- PDriverStatus = LPDRIVERSTATUS;
-
-//#include <poppack.h>
-
-//
-// bDriverError values
-//
-
-const
- SMART_NO_ERROR = 0; // No error
- {$EXTERNALSYM SMART_NO_ERROR}
- SMART_IDE_ERROR = 1; // Error from IDE controller
- {$EXTERNALSYM SMART_IDE_ERROR}
- SMART_INVALID_FLAG = 2; // Invalid command flag
- {$EXTERNALSYM SMART_INVALID_FLAG}
- SMART_INVALID_COMMAND = 3; // Invalid command byte
- {$EXTERNALSYM SMART_INVALID_COMMAND}
- SMART_INVALID_BUFFER = 4; // Bad buffer (null, invalid addr..)
- {$EXTERNALSYM SMART_INVALID_BUFFER}
- SMART_INVALID_DRIVE = 5; // Drive number not valid
- {$EXTERNALSYM SMART_INVALID_DRIVE}
- SMART_INVALID_IOCTL = 6; // Invalid IOCTL
- {$EXTERNALSYM SMART_INVALID_IOCTL}
- SMART_ERROR_NO_MEM = 7; // Could not lock user's buffer
- {$EXTERNALSYM SMART_ERROR_NO_MEM}
- SMART_INVALID_REGISTER = 8; // Some IDE Register not valid
- {$EXTERNALSYM SMART_INVALID_REGISTER}
- SMART_NOT_SUPPORTED = 9; // Invalid cmd flag set
- {$EXTERNALSYM SMART_NOT_SUPPORTED}
- SMART_NO_IDE_DEVICE = 10; // Cmd issued to device not present
- {$EXTERNALSYM SMART_NO_IDE_DEVICE}
- // although drive number is valid
-
-//
-// SMART sub commands for execute offline diags
-//
-
- SMART_OFFLINE_ROUTINE_OFFLINE = 0;
- {$EXTERNALSYM SMART_OFFLINE_ROUTINE_OFFLINE}
- SMART_SHORT_SELFTEST_OFFLINE = 1;
- {$EXTERNALSYM SMART_SHORT_SELFTEST_OFFLINE}
- SMART_EXTENDED_SELFTEST_OFFLINE = 2;
- {$EXTERNALSYM SMART_EXTENDED_SELFTEST_OFFLINE}
- SMART_ABORT_OFFLINE_SELFTEST = 127;
- {$EXTERNALSYM SMART_ABORT_OFFLINE_SELFTEST}
- SMART_SHORT_SELFTEST_CAPTIVE = 129;
- {$EXTERNALSYM SMART_SHORT_SELFTEST_CAPTIVE}
- SMART_EXTENDED_SELFTEST_CAPTIVE = 130;
- {$EXTERNALSYM SMART_EXTENDED_SELFTEST_CAPTIVE}
-
-//#include <pshpack1.h>
-
-type
- LPSENDCMDOUTPARAMS = ^SENDCMDOUTPARAMS;
- {$EXTERNALSYM LPSENDCMDOUTPARAMS}
- _SENDCMDOUTPARAMS = packed record
- cBufferSize: DWORD; // Size of bBuffer in bytes
- DriverStatus: DRIVERSTATUS; // Driver status structure.
- bBuffer: array [0..0] of BYTE; // Buffer of arbitrary length in which to store the data read from the // drive.
- end;
- {$EXTERNALSYM _SENDCMDOUTPARAMS}
- SENDCMDOUTPARAMS = _SENDCMDOUTPARAMS;
- {$EXTERNALSYM SENDCMDOUTPARAMS}
- TSendCmdOutParams = SENDCMDOUTPARAMS;
- PSendCmdOutParams = LPSENDCMDOUTPARAMS;
-
-//#include <poppack.h>
-
-const
- READ_ATTRIBUTE_BUFFER_SIZE = 512;
- {$EXTERNALSYM READ_ATTRIBUTE_BUFFER_SIZE}
- IDENTIFY_BUFFER_SIZE = 512;
- {$EXTERNALSYM IDENTIFY_BUFFER_SIZE}
- READ_THRESHOLD_BUFFER_SIZE = 512;
- {$EXTERNALSYM READ_THRESHOLD_BUFFER_SIZE}
- SMART_LOG_SECTOR_SIZE = 512;
- {$EXTERNALSYM SMART_LOG_SECTOR_SIZE}
-
-//
-// Feature register defines for SMART "sub commands"
-//
-
- READ_ATTRIBUTES = $D0;
- {$EXTERNALSYM READ_ATTRIBUTES}
- READ_THRESHOLDS = $D1;
- {$EXTERNALSYM READ_THRESHOLDS}
- ENABLE_DISABLE_AUTOSAVE = $D2;
- {$EXTERNALSYM ENABLE_DISABLE_AUTOSAVE}
- SAVE_ATTRIBUTE_VALUES = $D3;
- {$EXTERNALSYM SAVE_ATTRIBUTE_VALUES}
- EXECUTE_OFFLINE_DIAGS = $D4;
- {$EXTERNALSYM EXECUTE_OFFLINE_DIAGS}
- SMART_READ_LOG = $D5;
- {$EXTERNALSYM SMART_READ_LOG}
- SMART_WRITE_LOG = $d6;
- {$EXTERNALSYM SMART_WRITE_LOG}
- ENABLE_SMART = $D8;
- {$EXTERNALSYM ENABLE_SMART}
- DISABLE_SMART = $D9;
- {$EXTERNALSYM DISABLE_SMART}
- RETURN_SMART_STATUS = $DA;
- {$EXTERNALSYM RETURN_SMART_STATUS}
- ENABLE_DISABLE_AUTO_OFFLINE = $DB;
- {$EXTERNALSYM ENABLE_DISABLE_AUTO_OFFLINE}
-
- IOCTL_CHANGER_BASE = FILE_DEVICE_CHANGER;
- {$EXTERNALSYM IOCTL_CHANGER_BASE}
-
- IOCTL_CHANGER_GET_PARAMETERS = (
- (IOCTL_CHANGER_BASE shl 16) or (FILE_READ_ACCESS shl 14) or
- ($0000 shl 2) or METHOD_BUFFERED);
- {$EXTERNALSYM IOCTL_CHANGER_GET_PARAMETERS}
-
- IOCTL_CHANGER_GET_STATUS = (
- (IOCTL_CHANGER_BASE shl 16) or (FILE_READ_ACCESS shl 14) or
- ($0001 shl 2) or METHOD_BUFFERED);
- {$EXTERNALSYM IOCTL_CHANGER_GET_STATUS}
-
- IOCTL_CHANGER_GET_PRODUCT_DATA = (
- (IOCTL_CHANGER_BASE shl 16) or (FILE_READ_ACCESS shl 14) or
- ($0002 shl 2) or METHOD_BUFFERED);
- {$EXTERNALSYM IOCTL_CHANGER_GET_PRODUCT_DATA}
-
- IOCTL_CHANGER_SET_ACCESS = (
- (IOCTL_CHANGER_BASE shl 16) or ((FILE_READ_ACCESS or FILE_WRITE_ACCESS) shl 14) or
- ($0004 shl 2) or METHOD_BUFFERED);
- {$EXTERNALSYM IOCTL_CHANGER_SET_ACCESS}
-
- IOCTL_CHANGER_GET_ELEMENT_STATUS = (
- (IOCTL_CHANGER_BASE shl 16) or ((FILE_READ_ACCESS or FILE_WRITE_ACCESS) shl 14) or
- ($0005 shl 2) or METHOD_BUFFERED);
- {$EXTERNALSYM IOCTL_CHANGER_GET_ELEMENT_STATUS}
-
- IOCTL_CHANGER_INITIALIZE_ELEMENT_STATUS = (
- (IOCTL_CHANGER_BASE shl 16) or (FILE_READ_ACCESS shl 14) or
- ($0006 shl 2) or METHOD_BUFFERED);
- {$EXTERNALSYM IOCTL_CHANGER_INITIALIZE_ELEMENT_STATUS}
-
- IOCTL_CHANGER_SET_POSITION = (
- (IOCTL_CHANGER_BASE shl 16) or (FILE_READ_ACCESS shl 14) or
- ($0007 shl 2) or METHOD_BUFFERED);
- {$EXTERNALSYM IOCTL_CHANGER_SET_POSITION}
-
- IOCTL_CHANGER_EXCHANGE_MEDIUM = (
- (IOCTL_CHANGER_BASE shl 16) or (FILE_READ_ACCESS shl 14) or
- ($0008 shl 2) or METHOD_BUFFERED);
- {$EXTERNALSYM IOCTL_CHANGER_EXCHANGE_MEDIUM}
-
- IOCTL_CHANGER_MOVE_MEDIUM = (
- (IOCTL_CHANGER_BASE shl 16) or (FILE_READ_ACCESS shl 14) or
- ($0009 shl 2) or METHOD_BUFFERED);
- {$EXTERNALSYM IOCTL_CHANGER_MOVE_MEDIUM}
-
- IOCTL_CHANGER_REINITIALIZE_TRANSPORT = (
- (IOCTL_CHANGER_BASE shl 16) or (FILE_READ_ACCESS shl 14) or
- ($000A shl 2) or METHOD_BUFFERED);
- {$EXTERNALSYM IOCTL_CHANGER_REINITIALIZE_TRANSPORT}
-
- IOCTL_CHANGER_QUERY_VOLUME_TAGS = (
- (IOCTL_CHANGER_BASE shl 16) or ((FILE_READ_ACCESS or FILE_WRITE_ACCESS) shl 14) or
- ($000B shl 2) or METHOD_BUFFERED);
- {$EXTERNALSYM IOCTL_CHANGER_QUERY_VOLUME_TAGS}
-
- MAX_VOLUME_ID_SIZE = 36;
- {$EXTERNALSYM MAX_VOLUME_ID_SIZE}
- MAX_VOLUME_TEMPLATE_SIZE = 40;
- {$EXTERNALSYM MAX_VOLUME_TEMPLATE_SIZE}
-
- VENDOR_ID_LENGTH = 8;
- {$EXTERNALSYM VENDOR_ID_LENGTH}
- PRODUCT_ID_LENGTH = 16;
- {$EXTERNALSYM PRODUCT_ID_LENGTH}
- REVISION_LENGTH = 4;
- {$EXTERNALSYM REVISION_LENGTH}
- SERIAL_NUMBER_LENGTH = 32;
- {$EXTERNALSYM SERIAL_NUMBER_LENGTH}
-
-//
-// Common structures describing elements.
-//
-
-type
- _ELEMENT_TYPE = (
- AllElements, // As defined by SCSI
- ChangerTransport, // As defined by SCSI
- ChangerSlot, // As defined by SCSI
- ChangerIEPort, // As defined by SCSI
- ChangerDrive, // As defined by SCSI
- ChangerDoor, // Front panel, used to access internal of cabinet.
- ChangerKeypad, // Keypad/input on front panel.
- ChangerMaxElement); // Placeholder only. Not a valid type.
- {$EXTERNALSYM _ELEMENT_TYPE}
- ELEMENT_TYPE = _ELEMENT_TYPE;
- {$EXTERNALSYM ELEMENT_TYPE}
- PELEMENT_TYPE = ^ELEMENT_TYPE;
- {$EXTERNALSYM PELEMENT_TYPE}
- TElementType = ELEMENT_TYPE;
- PElementType = PELEMENT_TYPE;
-
- PCHANGER_ELEMENT = ^CHANGER_ELEMENT;
- {$EXTERNALSYM PCHANGER_ELEMENT}
- _CHANGER_ELEMENT = record
- ElementType: ELEMENT_TYPE;
- ElementAddress: DWORD;
- end;
- {$EXTERNALSYM _CHANGER_ELEMENT}
- CHANGER_ELEMENT = _CHANGER_ELEMENT;
- {$EXTERNALSYM CHANGER_ELEMENT}
- TChangerElement = CHANGER_ELEMENT;
- PChangerElement = PCHANGER_ELEMENT;
-
- PCHANGER_ELEMENT_LIST = ^CHANGER_ELEMENT_LIST;
- {$EXTERNALSYM PCHANGER_ELEMENT_LIST}
- _CHANGER_ELEMENT_LIST = record
- Element: CHANGER_ELEMENT;
- NumberOfElements: DWORD;
- end;
- {$EXTERNALSYM _CHANGER_ELEMENT_LIST}
- CHANGER_ELEMENT_LIST = _CHANGER_ELEMENT_LIST;
- {$EXTERNALSYM CHANGER_ELEMENT_LIST}
- TChangerElementList = CHANGER_ELEMENT_LIST;
- PChangerElementList = PCHANGER_ELEMENT_LIST;
-
-//
-// Definitions for IOCTL_CHANGER_GET_PARAMETERS
-//
-
-//
-// Definitions for Features0 of GET_CHANGER_PARAMETERS
-//
-
-const
- CHANGER_BAR_CODE_SCANNER_INSTALLED = $00000001; // The medium-changer has a bar code scanner installed.
- {$EXTERNALSYM CHANGER_BAR_CODE_SCANNER_INSTALLED}
- CHANGER_INIT_ELEM_STAT_WITH_RANGE = $00000002; // The medium-changer has the ability to initialize elements within a specified range.
- {$EXTERNALSYM CHANGER_INIT_ELEM_STAT_WITH_RANGE}
- CHANGER_CLOSE_IEPORT = $00000004; // The medium-changer has the ability to close the i/e port door.
- {$EXTERNALSYM CHANGER_CLOSE_IEPORT}
- CHANGER_OPEN_IEPORT = $00000008; // The medium-changer can open the i/e port door.
- {$EXTERNALSYM CHANGER_OPEN_IEPORT}
-
- CHANGER_STATUS_NON_VOLATILE = $00000010; // The medium-changer uses non-volatile memory for element status information.
- {$EXTERNALSYM CHANGER_STATUS_NON_VOLATILE}
- CHANGER_EXCHANGE_MEDIA = $00000020; // The medium-changer supports exchange operations.
- {$EXTERNALSYM CHANGER_EXCHANGE_MEDIA}
- CHANGER_CLEANER_SLOT = $00000040; // The medium-changer has a fixed slot designated for cleaner cartridges.
- {$EXTERNALSYM CHANGER_CLEANER_SLOT}
- CHANGER_LOCK_UNLOCK = $00000080; // The medium-changer can be (un)secured to (allow)prevent media removal.
- {$EXTERNALSYM CHANGER_LOCK_UNLOCK}
-
- CHANGER_CARTRIDGE_MAGAZINE = $00000100; // The medium-changer uses cartridge magazines for some storage slots.
- {$EXTERNALSYM CHANGER_CARTRIDGE_MAGAZINE}
- CHANGER_MEDIUM_FLIP = $00000200; // The medium-changer can flip medium.
- {$EXTERNALSYM CHANGER_MEDIUM_FLIP}
- CHANGER_POSITION_TO_ELEMENT = $00000400; // The medium-changer can position the transport to a particular element.
- {$EXTERNALSYM CHANGER_POSITION_TO_ELEMENT}
- CHANGER_REPORT_IEPORT_STATE = $00000800; // The medium-changer can determine whether media is present
- {$EXTERNALSYM CHANGER_REPORT_IEPORT_STATE}
- // in the IE Port.
-
- CHANGER_STORAGE_DRIVE = $00001000; // The medium-changer can use a drive as an independent storage element.
- {$EXTERNALSYM CHANGER_STORAGE_DRIVE}
- CHANGER_STORAGE_IEPORT = $00002000; // The medium-changer can use a i/e port as an independent storage element.
- {$EXTERNALSYM CHANGER_STORAGE_IEPORT}
- CHANGER_STORAGE_SLOT = $00004000; // The medium-changer can use a slot as an independent storage element.
- {$EXTERNALSYM CHANGER_STORAGE_SLOT}
- CHANGER_STORAGE_TRANSPORT = $00008000; // The medium-changer can use a transport as an independent storage element.
- {$EXTERNALSYM CHANGER_STORAGE_TRANSPORT}
-
- CHANGER_DRIVE_CLEANING_REQUIRED = $00010000; // The drives controlled by the medium changer require periodic cleaning
- {$EXTERNALSYM CHANGER_DRIVE_CLEANING_REQUIRED}
- // initiated by an application.
-
- CHANGER_PREDISMOUNT_EJECT_REQUIRED = $00020000; // The medium-changer requires a drive eject command to be issued, before a changer
- {$EXTERNALSYM CHANGER_PREDISMOUNT_EJECT_REQUIRED}
- // move / exchange command can be issued to the drive.
-
- CHANGER_CLEANER_ACCESS_NOT_VALID = $00040000; // The access bit in GES isn't valid for cleaner cartridges.
- {$EXTERNALSYM CHANGER_CLEANER_ACCESS_NOT_VALID}
- CHANGER_PREMOUNT_EJECT_REQUIRED = $00080000; // The medium-changer requires a drive eject command to be issued
- {$EXTERNALSYM CHANGER_PREMOUNT_EJECT_REQUIRED}
- // before a move / exchange command can be issued with the drive as src/dst.
-
- CHANGER_VOLUME_IDENTIFICATION = $00100000; // The medium-changer supports volume identification.
- {$EXTERNALSYM CHANGER_VOLUME_IDENTIFICATION}
- CHANGER_VOLUME_SEARCH = $00200000; // The medium-changer can search for volume information.
- {$EXTERNALSYM CHANGER_VOLUME_SEARCH}
- CHANGER_VOLUME_ASSERT = $00400000; // The medium-changer can verify volume information.
- {$EXTERNALSYM CHANGER_VOLUME_ASSERT}
- CHANGER_VOLUME_REPLACE = $00800000; // The medium-changer can replace volume information.
- {$EXTERNALSYM CHANGER_VOLUME_REPLACE}
- CHANGER_VOLUME_UNDEFINE = $01000000; // The medium-changer can undefine volume information.
- {$EXTERNALSYM CHANGER_VOLUME_UNDEFINE}
-
- CHANGER_SERIAL_NUMBER_VALID = $04000000; // The serial number reported in GetProductData is valid
- {$EXTERNALSYM CHANGER_SERIAL_NUMBER_VALID}
- // and unique.
-
- CHANGER_DEVICE_REINITIALIZE_CAPABLE = $08000000; // The medium-changer can be issued a ChangerReinitializeUnit.
- {$EXTERNALSYM CHANGER_DEVICE_REINITIALIZE_CAPABLE}
- CHANGER_KEYPAD_ENABLE_DISABLE = $10000000; // Indicates that the keypad can be enabled/disabled.
- {$EXTERNALSYM CHANGER_KEYPAD_ENABLE_DISABLE}
- CHANGER_DRIVE_EMPTY_ON_DOOR_ACCESS = $20000000; // Drives must be empty before access via the door is possible.
- {$EXTERNALSYM CHANGER_DRIVE_EMPTY_ON_DOOR_ACCESS}
-
- CHANGER_RESERVED_BIT = DWORD($80000000); // Will be used to indicate Features1 capability bits.
- {$EXTERNALSYM CHANGER_RESERVED_BIT}
-
-//
-// Definitions for Features1 of GET_CHANGER_PARAMETERS
-//
-
- CHANGER_PREDISMOUNT_ALIGN_TO_SLOT = DWORD($80000001); // The transport must be prepositioned to the slot prior to ejecting the media.
- {$EXTERNALSYM CHANGER_PREDISMOUNT_ALIGN_TO_SLOT}
- CHANGER_PREDISMOUNT_ALIGN_TO_DRIVE = DWORD($80000002); // The transport must be prepositioned to the drive prior to ejecting the media.
- {$EXTERNALSYM CHANGER_PREDISMOUNT_ALIGN_TO_DRIVE}
- CHANGER_CLEANER_AUTODISMOUNT = DWORD($80000004); // The device will move the cleaner cartridge back into the slot when cleaning has completed.
- {$EXTERNALSYM CHANGER_CLEANER_AUTODISMOUNT}
- CHANGER_TRUE_EXCHANGE_CAPABLE = DWORD($80000008); // Device can do src -> dest2 exchanges.
- {$EXTERNALSYM CHANGER_TRUE_EXCHANGE_CAPABLE}
- CHANGER_SLOTS_USE_TRAYS = DWORD($80000010); // Slots have removable trays, requiring multiple moves for inject/eject.
- {$EXTERNALSYM CHANGER_SLOTS_USE_TRAYS}
- CHANGER_RTN_MEDIA_TO_ORIGINAL_ADDR = DWORD($80000020); // Media must be returned to the slot from which it originated after a move to another element.
- {$EXTERNALSYM CHANGER_RTN_MEDIA_TO_ORIGINAL_ADDR}
- CHANGER_CLEANER_OPS_NOT_SUPPORTED = DWORD($80000040); // Automated cleaning operations are not supported on this device.
- {$EXTERNALSYM CHANGER_CLEANER_OPS_NOT_SUPPORTED}
- CHANGER_IEPORT_USER_CONTROL_OPEN = DWORD($80000080); // Indicates that user action is necessary to open a closed ieport.
- {$EXTERNALSYM CHANGER_IEPORT_USER_CONTROL_OPEN}
- CHANGER_IEPORT_USER_CONTROL_CLOSE = DWORD($80000100); // Indicates that user action is necessary to close an opened ieport.
- {$EXTERNALSYM CHANGER_IEPORT_USER_CONTROL_CLOSE}
- CHANGER_MOVE_EXTENDS_IEPORT = DWORD($80000200); // Indicates that a move media to the ieport extends the tray.
- {$EXTERNALSYM CHANGER_MOVE_EXTENDS_IEPORT}
- CHANGER_MOVE_RETRACTS_IEPORT = DWORD($80000400); // Indicates that a move media from the ieport retracts the tray.
- {$EXTERNALSYM CHANGER_MOVE_RETRACTS_IEPORT}
-
-//
-// Definitions for MoveFrom, ExchangeFrom, and PositionCapabilities
-//
-
- CHANGER_TO_TRANSPORT = $01; // The device can carry out the operation to a transport from the specified element.
- {$EXTERNALSYM CHANGER_TO_TRANSPORT}
- CHANGER_TO_SLOT = $02; // The device can carry out the operation to a slot from the specified element.
- {$EXTERNALSYM CHANGER_TO_SLOT}
- CHANGER_TO_IEPORT = $04; // The device can carry out the operation to an IE Port from the specified element.
- {$EXTERNALSYM CHANGER_TO_IEPORT}
- CHANGER_TO_DRIVE = $08; // The device can carry out the operation to a drive from the specified element.
- {$EXTERNALSYM CHANGER_TO_DRIVE}
-
-//
-// Definitions for LockUnlockCapabilities
-//
-
- LOCK_UNLOCK_IEPORT = $01; // The device can lock/unlock the ieport(s).
- {$EXTERNALSYM LOCK_UNLOCK_IEPORT}
- LOCK_UNLOCK_DOOR = $02; // The device can lock/unlock the door(s).
- {$EXTERNALSYM LOCK_UNLOCK_DOOR}
- LOCK_UNLOCK_KEYPAD = $04; // The device can lock/unlock the keypad.
- {$EXTERNALSYM LOCK_UNLOCK_KEYPAD}
-
-type
- PGET_CHANGER_PARAMETERS = ^GET_CHANGER_PARAMETERS;
- {$EXTERNALSYM PGET_CHANGER_PARAMETERS}
- _GET_CHANGER_PARAMETERS = record
- //
- // Size of the structure. Can be used for versioning.
- //
- Size: DWORD;
- //
- // Number of N element(s) as defined by the Element Address Page (or equivalent...).
- //
- NumberTransportElements: WORD;
- NumberStorageElements: WORD; // for data cartridges only
- NumberCleanerSlots: WORD; // for cleaner cartridges
- NumberIEElements: WORD;
- NumberDataTransferElements: WORD;
- //
- // Number of doors/front panels (allows user entry into the cabinet).
- //
- NumberOfDoors: WORD;
- //
- // The device-specific address (from user manual of the device) of the first N element. Used
- // by the UI to relate the various elements to the user.
- //
- FirstSlotNumber: WORD;
- FirstDriveNumber: WORD;
- FirstTransportNumber: WORD;
- FirstIEPortNumber: WORD;
- FirstCleanerSlotAddress: WORD;
- //
- // Indicates the capacity of each magazine, if they exist.
- //
- MagazineSize: WORD;
- //
- // Specifies the approximate number of seconds for when a cleaning should be completed.
- // Only applicable if drive cleaning is supported. See Features0.
- //
- DriveCleanTimeout: DWORD;
- //
- // See features bits, above.
- //
- Features0: DWORD;
- Features1: DWORD;
- //
- // Bitmask defining Move from N element to element. Defined by Device Capabilities Page (or equivalent).
- // AND-masking with the TO_XXX values will indicate legal destinations.
- //
- MoveFromTransport: BYTE;
- MoveFromSlot: BYTE;
- MoveFromIePort: BYTE;
- MoveFromDrive: BYTE;
- //
- // Bitmask defining Exchange from N element to element. Defined by Device Capabilities Page (or equivalent).
- // AND-masking with the TO_XXX values will indicate legal destinations.
- //
- ExchangeFromTransport: BYTE;
- ExchangeFromSlot: BYTE;
- ExchangeFromIePort: BYTE;
- ExchangeFromDrive: BYTE;
- //
- // Bitmask defining which elements are capable of lock/unlock. Valid only if
- // CHANGER_LOCK_UNLOCK is set in Features0.
- //
- LockUnlockCapabilities: BYTE;
- //
- // Bitmask defining which elements valid for positioning operations. Valid only if
- // CHANGER_POSITION_TO_ELEMENT is set in Features0.
- //
- PositionCapabilities: BYTE;
- //
- // For future expansion.
- //
- Reserved1: array [0..1] of BYTE;
- Reserved2: array [0..1] of DWORD;
- end;
- {$EXTERNALSYM _GET_CHANGER_PARAMETERS}
- GET_CHANGER_PARAMETERS = _GET_CHANGER_PARAMETERS;
- {$EXTERNALSYM GET_CHANGER_PARAMETERS}
- TGetChangerParameters = GET_CHANGER_PARAMETERS;
- PGetChangerParameters = PGET_CHANGER_PARAMETERS;
-
-//
-// Definitions for IOCTL_CHANGER_GET_PRODUCT_DATA
-//
-
- PCHANGER_PRODUCT_DATA = ^CHANGER_PRODUCT_DATA;
- {$EXTERNALSYM PCHANGER_PRODUCT_DATA}
- _CHANGER_PRODUCT_DATA = record
- //
- // Device manufacturer's name - based on inquiry data
- //
- VendorId: array [0..VENDOR_ID_LENGTH - 1] of BYTE;
- //
- // Product identification as defined by the vendor - based on Inquiry data
- //
- ProductId: array [0..PRODUCT_ID_LENGTH - 1] of BYTE;
- //
- // Product revision as defined by the vendor.
- //
- Revision: array [0..REVISION_LENGTH - 1] of BYTE;
- //
- // Vendor unique value used to globally identify this device. Can
- // be from Vital Product Data, for example.
- //
- SerialNumber: array [0..SERIAL_NUMBER_LENGTH - 1] of BYTE;
- //
- // Indicates device type of data transports, as defined by SCSI-2.
- //
- DeviceType: BYTE;
- end;
- {$EXTERNALSYM _CHANGER_PRODUCT_DATA}
- CHANGER_PRODUCT_DATA = _CHANGER_PRODUCT_DATA;
- {$EXTERNALSYM CHANGER_PRODUCT_DATA}
- TChangerProductData = CHANGER_PRODUCT_DATA;
- PChangerProductData = PCHANGER_PRODUCT_DATA;
-
-//
-// Definitions for IOCTL_CHANGER_SET_ACCESS
-//
-
-const
- LOCK_ELEMENT = 0;
- {$EXTERNALSYM LOCK_ELEMENT}
- UNLOCK_ELEMENT = 1;
- {$EXTERNALSYM UNLOCK_ELEMENT}
- EXTEND_IEPORT = 2;
- {$EXTERNALSYM EXTEND_IEPORT}
- RETRACT_IEPORT = 3;
- {$EXTERNALSYM RETRACT_IEPORT}
-
-type
- PCHANGER_SET_ACCESS = ^CHANGER_SET_ACCESS;
- {$EXTERNALSYM PCHANGER_SET_ACCESS}
- _CHANGER_SET_ACCESS = record
- //
- // Element can be ChangerIEPort, ChangerDoor, ChangerKeypad
- //
- Element: CHANGER_ELEMENT;
- //
- // See above for possible operations.
- //
- Control: DWORD;
- end;
- {$EXTERNALSYM _CHANGER_SET_ACCESS}
- CHANGER_SET_ACCESS = _CHANGER_SET_ACCESS;
- {$EXTERNALSYM CHANGER_SET_ACCESS}
- TChangerSetAccess = CHANGER_SET_ACCESS;
- PChangerSetAccess = PCHANGER_SET_ACCESS;
-
-//
-// Definitions for IOCTL_CHANGER_GET_ELEMENT_STATUS
-//
-
-//
-// Input buffer.
-//
-
- PCHANGER_READ_ELEMENT_STATUS = ^CHANGER_READ_ELEMENT_STATUS;
- {$EXTERNALSYM PCHANGER_READ_ELEMENT_STATUS}
- _CHANGER_READ_ELEMENT_STATUS = record
- //
- // List describing the elements and range on which to return information.
- //
- ElementList: CHANGER_ELEMENT_LIST;
- //
- // Indicates whether volume tag information is to be returned.
- //
- VolumeTagInfo: ByteBool;
- end;
- {$EXTERNALSYM _CHANGER_READ_ELEMENT_STATUS}
- CHANGER_READ_ELEMENT_STATUS = _CHANGER_READ_ELEMENT_STATUS;
- {$EXTERNALSYM CHANGER_READ_ELEMENT_STATUS}
- TChangerReadElementStatus = CHANGER_READ_ELEMENT_STATUS;
- PChangerReadElementStatus = PCHANGER_READ_ELEMENT_STATUS;
-
-//
-// Output buffer.
-//
-
- PCHANGER_ELEMENT_STATUS = ^CHANGER_ELEMENT_STATUS;
- {$EXTERNALSYM PCHANGER_ELEMENT_STATUS}
- _CHANGER_ELEMENT_STATUS = record
- //
- // Element to which this structure refers.
- //
- Element: CHANGER_ELEMENT;
- //
- // Address of the element from which the media was originally moved.
- // Valid if ELEMENT_STATUS_SVALID bit of Flags DWORD is set.
- // Needs to be converted to a zero-based offset from the device-unique value.
- //
- SrcElementAddress: CHANGER_ELEMENT;
- //
- // See below.
- //
- Flags: DWORD;
- //
- // See below for possible values.
- //
- ExceptionCode: DWORD;
- //
- // Scsi Target Id of this element.
- // Valid only if ELEMENT_STATUS_ID_VALID is set in Flags.
- //
- TargetId: BYTE;
- //
- // LogicalUnitNumber of this element.
- // Valid only if ELEMENT_STATUS_LUN_VALID is set in Flags.
- //
- Lun: BYTE;
- Reserved: WORD;
- //
- // Primary volume identification for the media.
- // Valid only if ELEMENT_STATUS_PVOLTAG bit is set in Flags.
- //
- PrimaryVolumeID: array [0..MAX_VOLUME_ID_SIZE - 1] of BYTE;
- //
- // Alternate volume identification for the media.
- // Valid for two-sided media only, and pertains to the id. of the inverted side.
- // Valid only if ELEMENT_STATUS_AVOLTAG bit is set in Flags.
- //
- AlternateVolumeID: array [0..MAX_VOLUME_ID_SIZE - 1] of BYTE;
- end;
- {$EXTERNALSYM _CHANGER_ELEMENT_STATUS}
- CHANGER_ELEMENT_STATUS = _CHANGER_ELEMENT_STATUS;
- {$EXTERNALSYM CHANGER_ELEMENT_STATUS}
- TChangerElementStatus = CHANGER_ELEMENT_STATUS;
- PChangerElementStatus = PCHANGER_ELEMENT_STATUS;
-
- PCHANGER_ELEMENT_STATUS_EX = ^CHANGER_ELEMENT_STATUS_EX;
- {$EXTERNALSYM PCHANGER_ELEMENT_STATUS_EX}
- _CHANGER_ELEMENT_STATUS_EX = record
- //
- // Element to which this structure refers.
- //
- Element: CHANGER_ELEMENT;
- //
- // Address of the element from which the media was originally moved.
- // Valid if ELEMENT_STATUS_SVALID bit of Flags DWORD is set.
- // Needs to be converted to a zero-based offset from the device-unique value.
- //
- SrcElementAddress: CHANGER_ELEMENT;
- //
- // See below.
- //
- Flags: DWORD;
- //
- // See below for possible values.
- //
- ExceptionCode: DWORD;
- //
- // Scsi Target Id of this element.
- // Valid only if ELEMENT_STATUS_ID_VALID is set in Flags.
- //
- TargetId: BYTE;
- //
- // LogicalUnitNumber of this element.
- // Valid only if ELEMENT_STATUS_LUN_VALID is set in Flags.
- //
- Lun: BYTE;
- Reserved: WORD;
- //
- // Primary volume identification for the media.
- // Valid only if ELEMENT_STATUS_PVOLTAG bit is set in Flags.
- //
- PrimaryVolumeID: array [0..MAX_VOLUME_ID_SIZE - 1] of BYTE;
- //
- // Alternate volume identification for the media.
- // Valid for two-sided media only, and pertains to the id. of the inverted side.
- // Valid only if ELEMENT_STATUS_AVOLTAG bit is set in Flags.
- //
- AlternateVolumeID: array [0..MAX_VOLUME_ID_SIZE - 1] of BYTE;
- //
- // Vendor ID
- //
- VendorIdentification: array [0..VENDOR_ID_LENGTH - 1] of BYTE;
- //
- // Product ID
- //
- ProductIdentification: array [0..PRODUCT_ID_LENGTH - 1] of BYTE;
- //
- // Serial number
- //
- SerialNumber: array [0..SERIAL_NUMBER_LENGTH - 1] of BYTE;
- end;
- {$EXTERNALSYM _CHANGER_ELEMENT_STATUS_EX}
- CHANGER_ELEMENT_STATUS_EX = _CHANGER_ELEMENT_STATUS_EX;
- {$EXTERNALSYM CHANGER_ELEMENT_STATUS_EX}
- TChangerElementStatusEx = CHANGER_ELEMENT_STATUS_EX;
- PChangerElementStatusEx = PCHANGER_ELEMENT_STATUS_EX;
-
-//
-// Possible flag values
-//
-
-const
- ELEMENT_STATUS_FULL = $00000001; // Element contains a unit of media.
- {$EXTERNALSYM ELEMENT_STATUS_FULL}
- ELEMENT_STATUS_IMPEXP = $00000002; // Media in i/e port was placed there by an operator.
- {$EXTERNALSYM ELEMENT_STATUS_IMPEXP}
- ELEMENT_STATUS_EXCEPT = $00000004; // Element is in an abnormal state; check ExceptionCode field for more information.
- {$EXTERNALSYM ELEMENT_STATUS_EXCEPT}
- ELEMENT_STATUS_ACCESS = $00000008; // Access to the i/e port from the medium changer is allowed.
- {$EXTERNALSYM ELEMENT_STATUS_ACCESS}
- ELEMENT_STATUS_EXENAB = $00000010; // Export of media is supported.
- {$EXTERNALSYM ELEMENT_STATUS_EXENAB}
- ELEMENT_STATUS_INENAB = $00000020; // Import of media is supported.
- {$EXTERNALSYM ELEMENT_STATUS_INENAB}
-
- ELEMENT_STATUS_PRODUCT_DATA = $00000040; // Serial number valid for the drive
- {$EXTERNALSYM ELEMENT_STATUS_PRODUCT_DATA}
-
- ELEMENT_STATUS_LUN_VALID = $00001000; // Lun information is valid.
- {$EXTERNALSYM ELEMENT_STATUS_LUN_VALID}
- ELEMENT_STATUS_ID_VALID = $00002000; // SCSI Id information is valid.
- {$EXTERNALSYM ELEMENT_STATUS_ID_VALID}
- ELEMENT_STATUS_NOT_BUS = $00008000; // Lun and SCSI Id fields are not on same bus as medium changer.
- {$EXTERNALSYM ELEMENT_STATUS_NOT_BUS}
- ELEMENT_STATUS_INVERT = $00400000; // Media in element was inverted (valid only if ELEMENT_STATUS_SVALID bit is set)
- {$EXTERNALSYM ELEMENT_STATUS_INVERT}
-
- ELEMENT_STATUS_SVALID = $00800000; // SourceElementAddress field and ELEMENT_STATUS_INVERT bit are valid.
- {$EXTERNALSYM ELEMENT_STATUS_SVALID}
- ELEMENT_STATUS_PVOLTAG = $10000000; // Primary volume information is valid.
- {$EXTERNALSYM ELEMENT_STATUS_PVOLTAG}
- ELEMENT_STATUS_AVOLTAG = $20000000; // Alternate volume information is valid.
- {$EXTERNALSYM ELEMENT_STATUS_AVOLTAG}
-
-//
-// ExceptionCode values.
-//
-
- ERROR_LABEL_UNREADABLE = $00000001; // Bar code scanner could not read bar code label.
- {$EXTERNALSYM ERROR_LABEL_UNREADABLE}
- ERROR_LABEL_QUESTIONABLE = $00000002; // Label could be invalid due to unit attention condition.
- {$EXTERNALSYM ERROR_LABEL_QUESTIONABLE}
- ERROR_SLOT_NOT_PRESENT = $00000004; // Slot is currently not addressable in the device.
- {$EXTERNALSYM ERROR_SLOT_NOT_PRESENT}
- ERROR_DRIVE_NOT_INSTALLED = $00000008; // Drive is not installed.
- {$EXTERNALSYM ERROR_DRIVE_NOT_INSTALLED}
- ERROR_TRAY_MALFUNCTION = $00000010; // Media tray is malfunctioning/broken.
- {$EXTERNALSYM ERROR_TRAY_MALFUNCTION}
- ERROR_INIT_STATUS_NEEDED = $00000011; // An Initialize Element Status command is needed.
- {$EXTERNALSYM ERROR_INIT_STATUS_NEEDED}
- ERROR_UNHANDLED_ERROR = DWORD($FFFFFFFF); // Unknown error condition
- {$EXTERNALSYM ERROR_UNHANDLED_ERROR}
-
-//
-// Definitions for IOCTL_CHANGER_INITIALIZE_ELEMENT_STATUS
-//
-
-type
- PCHANGER_INITIALIZE_ELEMENT_STATUS = ^CHANGER_INITIALIZE_ELEMENT_STATUS;
- {$EXTERNALSYM PCHANGER_INITIALIZE_ELEMENT_STATUS}
- _CHANGER_INITIALIZE_ELEMENT_STATUS = record
- //
- // List describing the elements and range on which to initialize.
- //
- ElementList: CHANGER_ELEMENT_LIST;
- //
- // Indicates whether a bar code scan should be used. Only applicable if
- // CHANGER_BAR_CODE_SCANNER_INSTALLED is set in Features0 of CHANGER_GET_PARAMETERS.
- //
- BarCodeScan: ByteBool;
- end;
- {$EXTERNALSYM _CHANGER_INITIALIZE_ELEMENT_STATUS}
- CHANGER_INITIALIZE_ELEMENT_STATUS = _CHANGER_INITIALIZE_ELEMENT_STATUS;
- {$EXTERNALSYM CHANGER_INITIALIZE_ELEMENT_STATUS}
- TChangerInitializeElementStatus = CHANGER_INITIALIZE_ELEMENT_STATUS;
- PChangerInitializeElementStatus = PCHANGER_INITIALIZE_ELEMENT_STATUS;
-
-//
-// Definitions for IOCTL_CHANGER_SET_POSITION
-//
-
- PCHANGER_SET_POSITION = ^CHANGER_SET_POSITION;
- {$EXTERNALSYM PCHANGER_SET_POSITION}
- _CHANGER_SET_POSITION = record
- //
- // Indicates which transport to move.
- //
- Transport: CHANGER_ELEMENT;
- //
- // Indicates the final destination of the transport.
- //
- Destination: CHANGER_ELEMENT;
- //
- // Indicates whether the media currently carried by Transport, should be flipped.
- //
- Flip: ByteBool;
- end;
- {$EXTERNALSYM _CHANGER_SET_POSITION}
- CHANGER_SET_POSITION = _CHANGER_SET_POSITION;
- {$EXTERNALSYM CHANGER_SET_POSITION}
- TChangerSetPosition = CHANGER_SET_POSITION;
- PChangerSetPosition = PCHANGER_SET_POSITION;
-
-//
-// Definitions for IOCTL_CHANGER_EXCHANGE_MEDIUM
-//
-
- PCHANGER_EXCHANGE_MEDIUM = ^CHANGER_EXCHANGE_MEDIUM;
- {$EXTERNALSYM PCHANGER_EXCHANGE_MEDIUM}
- _CHANGER_EXCHANGE_MEDIUM = record
- //
- // Indicates which transport to use for the exchange operation.
- //
- Transport: CHANGER_ELEMENT;
- //
- // Indicates the source for the media that is to be moved.
- //
- Source: CHANGER_ELEMENT;
- //
- // Indicates the final destination of the media originally at Source.
- //
- Destination1: CHANGER_ELEMENT;
- //
- // Indicates the destination of the media moved from Destination1.
- //
- Destination2: CHANGER_ELEMENT;
- //
- // Indicates whether the medium should be flipped.
- //
- Flip1: ByteBool;
- Flip2: ByteBool;
- end;
- {$EXTERNALSYM _CHANGER_EXCHANGE_MEDIUM}
- CHANGER_EXCHANGE_MEDIUM = _CHANGER_EXCHANGE_MEDIUM;
- {$EXTERNALSYM CHANGER_EXCHANGE_MEDIUM}
- TChangerExchangeMedium = CHANGER_EXCHANGE_MEDIUM;
- PChangerExchangeMedium = PCHANGER_EXCHANGE_MEDIUM;
-
-//
-// Definitions for IOCTL_CHANGER_MOVE_MEDIUM
-//
-
- PCHANGER_MOVE_MEDIUM = ^CHANGER_MOVE_MEDIUM;
- {$EXTERNALSYM PCHANGER_MOVE_MEDIUM}
- _CHANGER_MOVE_MEDIUM = record
- //
- // Indicates which transport to use for the move operation.
- //
- Transport: CHANGER_ELEMENT;
- //
- // Indicates the source for the media that is to be moved.
- //
- Source: CHANGER_ELEMENT;
- //
- // Indicates the destination of the media originally at Source.
- //
- Destination: CHANGER_ELEMENT;
- //
- // Indicates whether the media should be flipped.
- //
- Flip: ByteBool;
- end;
- {$EXTERNALSYM _CHANGER_MOVE_MEDIUM}
- CHANGER_MOVE_MEDIUM = _CHANGER_MOVE_MEDIUM;
- {$EXTERNALSYM CHANGER_MOVE_MEDIUM}
- TChangerMoveMedium = CHANGER_MOVE_MEDIUM;
- PChangerMoveMedium = PCHANGER_MOVE_MEDIUM;
-
-//
-// Definitions for IOCTL_QUERY_VOLUME_TAGS
-//
-
-//
-// Input buffer.
-//
-
- PCHANGER_SEND_VOLUME_TAG_INFORMATION = ^CHANGER_SEND_VOLUME_TAG_INFORMATION;
- {$EXTERNALSYM PCHANGER_SEND_VOLUME_TAG_INFORMATION}
- _CHANGER_SEND_VOLUME_TAG_INFORMATION = record
- //
- // Describes the starting element for which to return information.
- //
- StartingElement: CHANGER_ELEMENT;
- //
- // Indicates the specific action to perform. See below.
- //
- ActionCode: DWORD;
- //
- // Template used by the device to search for volume ids.
- //
- VolumeIDTemplate: array [0..MAX_VOLUME_TEMPLATE_SIZE - 1] of BYTE;
- end;
- {$EXTERNALSYM _CHANGER_SEND_VOLUME_TAG_INFORMATION}
- CHANGER_SEND_VOLUME_TAG_INFORMATION = _CHANGER_SEND_VOLUME_TAG_INFORMATION;
- {$EXTERNALSYM CHANGER_SEND_VOLUME_TAG_INFORMATION}
- TChangerSendVolumeTagInformation = CHANGER_SEND_VOLUME_TAG_INFORMATION;
- PChangerSendVolumeTagInformation = PCHANGER_SEND_VOLUME_TAG_INFORMATION;
-
-//
-// Output buffer.
-//
-
- PREAD_ELEMENT_ADDRESS_INFO = ^READ_ELEMENT_ADDRESS_INFO;
- {$EXTERNALSYM PREAD_ELEMENT_ADDRESS_INFO}
- _READ_ELEMENT_ADDRESS_INFO = record
- //
- // Number of elements matching criteria set forth by ActionCode.
- //
- NumberOfElements: DWORD;
- //
- // Array of CHANGER_ELEMENT_STATUS structures, one for each element that corresponded
- // with the information passed in with the CHANGER_SEND_VOLUME_TAG_INFORMATION structure.
- //
- ElementStatus: array [0..0] of CHANGER_ELEMENT_STATUS;
- end;
- {$EXTERNALSYM _READ_ELEMENT_ADDRESS_INFO}
- READ_ELEMENT_ADDRESS_INFO = _READ_ELEMENT_ADDRESS_INFO;
- {$EXTERNALSYM READ_ELEMENT_ADDRESS_INFO}
- TReadElementAddressInfo = READ_ELEMENT_ADDRESS_INFO;
- PReadElementAddressInfo = PREAD_ELEMENT_ADDRESS_INFO;
-
-//
-// Possible ActionCode values. See Features0 of CHANGER_GET_PARAMETERS for compatibility with
-// the current device.
-//
-
-const
- SEARCH_ALL = $0; // Translate - search all defined volume tags.
- {$EXTERNALSYM SEARCH_ALL}
- SEARCH_PRIMARY = $1; // Translate - search only primary volume tags.
- {$EXTERNALSYM SEARCH_PRIMARY}
- SEARCH_ALTERNATE = $2; // Translate - search only alternate volume tags.
- {$EXTERNALSYM SEARCH_ALTERNATE}
- SEARCH_ALL_NO_SEQ = $4; // Translate - search all defined volume tags but ignore sequence numbers.
- {$EXTERNALSYM SEARCH_ALL_NO_SEQ}
- SEARCH_PRI_NO_SEQ = $5; // Translate - search only primary volume tags but ignore sequence numbers.
- {$EXTERNALSYM SEARCH_PRI_NO_SEQ}
- SEARCH_ALT_NO_SEQ = $6; // Translate - search only alternate volume tags but ignore sequence numbers.
- {$EXTERNALSYM SEARCH_ALT_NO_SEQ}
-
- ASSERT_PRIMARY = $8; // Assert - as the primary volume tag - if tag now undefined.
- {$EXTERNALSYM ASSERT_PRIMARY}
- ASSERT_ALTERNATE = $9; // Assert - as the alternate volume tag - if tag now undefined.
- {$EXTERNALSYM ASSERT_ALTERNATE}
-
- REPLACE_PRIMARY = $A; // Replace - the primary volume tag - current tag ignored.
- {$EXTERNALSYM REPLACE_PRIMARY}
- REPLACE_ALTERNATE = $B; // Replace - the alternate volume tag - current tag ignored.
- {$EXTERNALSYM REPLACE_ALTERNATE}
-
- UNDEFINE_PRIMARY = $C; // Undefine - the primary volume tag - current tag ignored.
- {$EXTERNALSYM UNDEFINE_PRIMARY}
- UNDEFINE_ALTERNATE = $D; // Undefine - the alternate volume tag - current tag ignored.
- {$EXTERNALSYM UNDEFINE_ALTERNATE}
-
-//
-// Changer diagnostic test related definitions
-//
-
-type
- _CHANGER_DEVICE_PROBLEM_TYPE = (
- DeviceProblemNone,
- DeviceProblemHardware,
- DeviceProblemCHMError,
- DeviceProblemDoorOpen,
- DeviceProblemCalibrationError,
- DeviceProblemTargetFailure,
- DeviceProblemCHMMoveError,
- DeviceProblemCHMZeroError,
- DeviceProblemCartridgeInsertError,
- DeviceProblemPositionError,
- DeviceProblemSensorError,
- DeviceProblemCartridgeEjectError,
- DeviceProblemGripperError,
- DeviceProblemDriveError);
- {$EXTERNALSYM _CHANGER_DEVICE_PROBLEM_TYPE}
- CHANGER_DEVICE_PROBLEM_TYPE = _CHANGER_DEVICE_PROBLEM_TYPE;
- {$EXTERNALSYM CHANGER_DEVICE_PROBLEM_TYPE}
- PCHANGER_DEVICE_PROBLEM_TYPE = ^CHANGER_DEVICE_PROBLEM_TYPE;
- {$EXTERNALSYM PCHANGER_DEVICE_PROBLEM_TYPE}
- TChangerDeviceProblemType = CHANGER_DEVICE_PROBLEM_TYPE;
- PChangerDeviceProblemType = PCHANGER_DEVICE_PROBLEM_TYPE;
-
-const
- IOCTL_SERIAL_LSRMST_INSERT = (
- (FILE_DEVICE_SERIAL_PORT shl 16) or (FILE_ANY_ACCESS shl 14) or
- (31 shl 2) or METHOD_BUFFERED);
- {$EXTERNALSYM IOCTL_SERIAL_LSRMST_INSERT}
-
- IOCTL_SERENUM_EXPOSE_HARDWARE = (
- (FILE_DEVICE_SERENUM shl 16) or (FILE_ANY_ACCESS shl 14) or
- (128 shl 2) or METHOD_BUFFERED);
- {$EXTERNALSYM IOCTL_SERENUM_EXPOSE_HARDWARE}
-
- IOCTL_SERENUM_REMOVE_HARDWARE = (
- (FILE_DEVICE_SERENUM shl 16) or (FILE_ANY_ACCESS shl 14) or
- (129 shl 2) or METHOD_BUFFERED);
- {$EXTERNALSYM IOCTL_SERENUM_REMOVE_HARDWARE}
-
- IOCTL_SERENUM_PORT_DESC = (
- (FILE_DEVICE_SERENUM shl 16) or (FILE_ANY_ACCESS shl 14) or
- (130 shl 2) or METHOD_BUFFERED);
- {$EXTERNALSYM IOCTL_SERENUM_PORT_DESC}
-
- IOCTL_SERENUM_GET_PORT_NAME = (
- (FILE_DEVICE_SERENUM shl 16) or (FILE_ANY_ACCESS shl 14) or
- (131 shl 2) or METHOD_BUFFERED);
- {$EXTERNALSYM IOCTL_SERENUM_GET_PORT_NAME}
-
-//
-// The following values follow the escape designator in the
-// data stream if the LSRMST_INSERT mode has been turned on.
-//
-
- SERIAL_LSRMST_ESCAPE = BYTE($00);
- {$EXTERNALSYM SERIAL_LSRMST_ESCAPE}
-
-//
-// Following this value is the contents of the line status
-// register, and then the character in the RX hardware when
-// the line status register was encountered.
-//
-
- SERIAL_LSRMST_LSR_DATA = BYTE($01);
- {$EXTERNALSYM SERIAL_LSRMST_LSR_DATA}
-
-//
-// Following this value is the contents of the line status
-// register. No error character follows
-//
-
- SERIAL_LSRMST_LSR_NODATA = BYTE($02);
- {$EXTERNALSYM SERIAL_LSRMST_LSR_NODATA}
-
-//
-// Following this value is the contents of the modem status
-// register.
-//
-
- SERIAL_LSRMST_MST = BYTE($03);
- {$EXTERNALSYM SERIAL_LSRMST_MST}
-
-//
-// Bit values for FIFO Control Register
-//
-
- SERIAL_IOC_FCR_FIFO_ENABLE = DWORD($00000001);
- {$EXTERNALSYM SERIAL_IOC_FCR_FIFO_ENABLE}
- SERIAL_IOC_FCR_RCVR_RESET = DWORD($00000002);
- {$EXTERNALSYM SERIAL_IOC_FCR_RCVR_RESET}
- SERIAL_IOC_FCR_XMIT_RESET = DWORD($00000004);
- {$EXTERNALSYM SERIAL_IOC_FCR_XMIT_RESET}
- SERIAL_IOC_FCR_DMA_MODE = DWORD($00000008);
- {$EXTERNALSYM SERIAL_IOC_FCR_DMA_MODE}
- SERIAL_IOC_FCR_RES1 = DWORD($00000010);
- {$EXTERNALSYM SERIAL_IOC_FCR_RES1}
- SERIAL_IOC_FCR_RES2 = DWORD($00000020);
- {$EXTERNALSYM SERIAL_IOC_FCR_RES2}
- SERIAL_IOC_FCR_RCVR_TRIGGER_LSB = DWORD($00000040);
- {$EXTERNALSYM SERIAL_IOC_FCR_RCVR_TRIGGER_LSB}
- SERIAL_IOC_FCR_RCVR_TRIGGER_MSB = DWORD($00000080);
- {$EXTERNALSYM SERIAL_IOC_FCR_RCVR_TRIGGER_MSB}
-
-//
-// Bit values for Modem Control Register
-//
-
- SERIAL_IOC_MCR_DTR = DWORD($00000001);
- {$EXTERNALSYM SERIAL_IOC_MCR_DTR}
- SERIAL_IOC_MCR_RTS = DWORD($00000002);
- {$EXTERNALSYM SERIAL_IOC_MCR_RTS}
- SERIAL_IOC_MCR_OUT1 = DWORD($00000004);
- {$EXTERNALSYM SERIAL_IOC_MCR_OUT1}
- SERIAL_IOC_MCR_OUT2 = DWORD($00000008);
- {$EXTERNALSYM SERIAL_IOC_MCR_OUT2}
- SERIAL_IOC_MCR_LOOP = DWORD($00000010);
- {$EXTERNALSYM SERIAL_IOC_MCR_LOOP}
-
-//
-// The following is a list of the native file system fsctls followed by
-// additional network file system fsctls. Some values have been
-// decommissioned.
-//
-
- FSCTL_REQUEST_OPLOCK_LEVEL_1 = (
- (FILE_DEVICE_FILE_SYSTEM shl 16) or (FILE_ANY_ACCESS shl 14) or
- (0 shl 2) or METHOD_BUFFERED);
- {$EXTERNALSYM FSCTL_REQUEST_OPLOCK_LEVEL_1}
-
- FSCTL_REQUEST_OPLOCK_LEVEL_2 = (
- (FILE_DEVICE_FILE_SYSTEM shl 16) or (FILE_ANY_ACCESS shl 14) or
- (1 shl 2) or METHOD_BUFFERED);
- {$EXTERNALSYM FSCTL_REQUEST_OPLOCK_LEVEL_2}
-
- FSCTL_REQUEST_BATCH_OPLOCK = (
- (FILE_DEVICE_FILE_SYSTEM shl 16) or (FILE_ANY_ACCESS shl 14) or
- (2 shl 2) or METHOD_BUFFERED);
- {$EXTERNALSYM FSCTL_REQUEST_BATCH_OPLOCK}
-
- FSCTL_OPLOCK_BREAK_ACKNOWLEDGE = (
- (FILE_DEVICE_FILE_SYSTEM shl 16) or (FILE_ANY_ACCESS shl 14) or
- (3 shl 2) or METHOD_BUFFERED);
- {$EXTERNALSYM FSCTL_OPLOCK_BREAK_ACKNOWLEDGE}
-
- FSCTL_OPBATCH_ACK_CLOSE_PENDING = (
- (FILE_DEVICE_FILE_SYSTEM shl 16) or (FILE_ANY_ACCESS shl 14) or
- (4 shl 2) or METHOD_BUFFERED);
- {$EXTERNALSYM FSCTL_OPBATCH_ACK_CLOSE_PENDING}
-
- FSCTL_OPLOCK_BREAK_NOTIFY = (
- (FILE_DEVICE_FILE_SYSTEM shl 16) or (FILE_ANY_ACCESS shl 14) or
- (5 shl 2) or METHOD_BUFFERED);
- {$EXTERNALSYM FSCTL_OPLOCK_BREAK_NOTIFY}
-
- FSCTL_LOCK_VOLUME = (FILE_DEVICE_FILE_SYSTEM shl 16) or (FILE_ANY_ACCESS shl 14) or (6 shl 2) or METHOD_BUFFERED;
- {$EXTERNALSYM FSCTL_LOCK_VOLUME}
-
- FSCTL_UNLOCK_VOLUME = (
- (FILE_DEVICE_FILE_SYSTEM shl 16) or (FILE_ANY_ACCESS shl 14) or
- (7 shl 2) or METHOD_BUFFERED);
- {$EXTERNALSYM FSCTL_UNLOCK_VOLUME}
-
- FSCTL_DISMOUNT_VOLUME = (
- (FILE_DEVICE_FILE_SYSTEM shl 16) or (FILE_ANY_ACCESS shl 14) or
- (8 shl 2) or METHOD_BUFFERED);
- {$EXTERNALSYM FSCTL_DISMOUNT_VOLUME}
-
-// decommissioned fsctl value 9
-
- FSCTL_IS_VOLUME_MOUNTED = (
- (FILE_DEVICE_FILE_SYSTEM shl 16) or (FILE_ANY_ACCESS shl 14) or
- (10 shl 2) or METHOD_BUFFERED);
- {$EXTERNALSYM FSCTL_IS_VOLUME_MOUNTED}
-
- FSCTL_IS_PATHNAME_VALID = (
- (FILE_DEVICE_FILE_SYSTEM shl 16) or (FILE_ANY_ACCESS shl 14) or
- (11 shl 2) or METHOD_BUFFERED); // PATHNAME_BUFFER,
- {$EXTERNALSYM FSCTL_IS_PATHNAME_VALID}
-
- FSCTL_MARK_VOLUME_DIRTY = (
- (FILE_DEVICE_FILE_SYSTEM shl 16) or (FILE_ANY_ACCESS shl 14) or
- (12 shl 2) or METHOD_BUFFERED);
- {$EXTERNALSYM FSCTL_MARK_VOLUME_DIRTY}
-
-// decommissioned fsctl value 13
-
- FSCTL_QUERY_RETRIEVAL_POINTERS = (
- (FILE_DEVICE_FILE_SYSTEM shl 16) or (FILE_ANY_ACCESS shl 14) or
- (14 shl 2) or METHOD_NEITHER);
- {$EXTERNALSYM FSCTL_QUERY_RETRIEVAL_POINTERS}
-
- FSCTL_GET_COMPRESSION = (
- (FILE_DEVICE_FILE_SYSTEM shl 16) or (FILE_ANY_ACCESS shl 14) or
- (15 shl 2) or METHOD_BUFFERED);
- {$EXTERNALSYM FSCTL_GET_COMPRESSION}
-
- FSCTL_SET_COMPRESSION = (
- (FILE_DEVICE_FILE_SYSTEM shl 16) or ((FILE_READ_DATA or FILE_WRITE_DATA) shl 14) or
- (16 shl 2) or METHOD_BUFFERED);
- {$EXTERNALSYM FSCTL_SET_COMPRESSION}
-
-// decommissioned fsctl value 17
-// decommissioned fsctl value 18
-
- FSCTL_MARK_AS_SYSTEM_HIVE = (
- (FILE_DEVICE_FILE_SYSTEM shl 16) or (FILE_ANY_ACCESS shl 14) or
- (19 shl 2) or METHOD_NEITHER);
- {$EXTERNALSYM FSCTL_MARK_AS_SYSTEM_HIVE}
-
- FSCTL_OPLOCK_BREAK_ACK_NO_2 = (
- (FILE_DEVICE_FILE_SYSTEM shl 16) or (FILE_ANY_ACCESS shl 14) or
- (20 shl 2) or METHOD_BUFFERED);
- {$EXTERNALSYM FSCTL_OPLOCK_BREAK_ACK_NO_2}
-
- FSCTL_INVALIDATE_VOLUMES = (
- (FILE_DEVICE_FILE_SYSTEM shl 16) or (FILE_ANY_ACCESS shl 14) or
- (21 shl 2) or METHOD_BUFFERED);
- {$EXTERNALSYM FSCTL_INVALIDATE_VOLUMES}
-
- FSCTL_QUERY_FAT_BPB = (
- (FILE_DEVICE_FILE_SYSTEM shl 16) or (FILE_ANY_ACCESS shl 14) or
- (22 shl 2) or METHOD_BUFFERED); // FSCTL_QUERY_FAT_BPB_BUFFER
- {$EXTERNALSYM FSCTL_QUERY_FAT_BPB}
-
- FSCTL_REQUEST_FILTER_OPLOCK = (
- (FILE_DEVICE_FILE_SYSTEM shl 16) or (FILE_ANY_ACCESS shl 14) or
- (23 shl 2) or METHOD_BUFFERED);
- {$EXTERNALSYM FSCTL_REQUEST_FILTER_OPLOCK}
-
- FSCTL_FILESYSTEM_GET_STATISTICS = (
- (FILE_DEVICE_FILE_SYSTEM shl 16) or (FILE_ANY_ACCESS shl 14) or
- (24 shl 2) or METHOD_BUFFERED); // FILESYSTEM_STATISTICS
- {$EXTERNALSYM FSCTL_FILESYSTEM_GET_STATISTICS}
-
- FSCTL_GET_NTFS_VOLUME_DATA = (
- (FILE_DEVICE_FILE_SYSTEM shl 16) or (FILE_ANY_ACCESS shl 14) or
- (25 shl 2) or METHOD_BUFFERED);
- {$EXTERNALSYM FSCTL_GET_NTFS_VOLUME_DATA}
-
- FSCTL_GET_NTFS_FILE_RECORD = (
- (FILE_DEVICE_FILE_SYSTEM shl 16) or (FILE_ANY_ACCESS shl 14) or
- (26 shl 2) or METHOD_BUFFERED);
- {$EXTERNALSYM FSCTL_GET_NTFS_FILE_RECORD}
-
- FSCTL_GET_VOLUME_BITMAP = (
- (FILE_DEVICE_FILE_SYSTEM shl 16) or (FILE_ANY_ACCESS shl 14) or
- (27 shl 2) or METHOD_NEITHER);
- {$EXTERNALSYM FSCTL_GET_VOLUME_BITMAP}
-
- FSCTL_GET_RETRIEVAL_POINTERS = (
- (FILE_DEVICE_FILE_SYSTEM shl 16) or (FILE_ANY_ACCESS shl 14) or
- (28 shl 2) or METHOD_NEITHER);
- {$EXTERNALSYM FSCTL_GET_RETRIEVAL_POINTERS}
-
- FSCTL_MOVE_FILE = (
- (FILE_DEVICE_FILE_SYSTEM shl 16) or (FILE_SPECIAL_ACCESS shl 14) or
- (29 shl 2) or METHOD_BUFFERED);
- {$EXTERNALSYM FSCTL_MOVE_FILE}
-
- FSCTL_IS_VOLUME_DIRTY = (
- (FILE_DEVICE_FILE_SYSTEM shl 16) or (FILE_ANY_ACCESS shl 14) or
- (30 shl 2) or METHOD_BUFFERED);
- {$EXTERNALSYM FSCTL_IS_VOLUME_DIRTY}
-
-// decomissioned fsctl value 31
-(* FSCTL_GET_HFS_INFORMATION = (
- (FILE_DEVICE_FILE_SYSTEM shl 16) or (FILE_ANY_ACCESS shl 14) or
- (31 shl 2) or METHOD_BUFFERED);
- {$EXTERNALSYM FSCTL_GET_HFS_INFORMATION}
-*)
-
- FSCTL_ALLOW_EXTENDED_DASD_IO = (
- (FILE_DEVICE_FILE_SYSTEM shl 16) or (FILE_ANY_ACCESS shl 14) or
- (32 shl 2) or METHOD_NEITHER);
- {$EXTERNALSYM FSCTL_ALLOW_EXTENDED_DASD_IO}
-
-// decommissioned fsctl value 33
-// decommissioned fsctl value 34
-
-(*
- FSCTL_READ_PROPERTY_DATA = (
- (FILE_DEVICE_FILE_SYSTEM shl 16) or (FILE_ANY_ACCESS shl 14) or
- (33 shl 2) or METHOD_NEITHER);
- {$EXTERNALSYM FSCTL_READ_PROPERTY_DATA}
-
- FSCTL_WRITE_PROPERTY_DATA = (
- (FILE_DEVICE_FILE_SYSTEM shl 16) or (FILE_ANY_ACCESS shl 14) or
- (34 shl 2) or METHOD_NEITHER);
- {$EXTERNALSYM FSCTL_WRITE_PROPERTY_DATA}
-*)
-
- FSCTL_FIND_FILES_BY_SID = (
- (FILE_DEVICE_FILE_SYSTEM shl 16) or (FILE_ANY_ACCESS shl 14) or
- (35 shl 2) or METHOD_NEITHER);
- {$EXTERNALSYM FSCTL_FIND_FILES_BY_SID}
-
-// decommissioned fsctl value 36
-// decommissioned fsctl value 37
-
-(* FSCTL_DUMP_PROPERTY_DATA = (
- (FILE_DEVICE_FILE_SYSTEM shl 16) or (FILE_ANY_ACCESS shl 14) or
- (37 shl 2) or METHOD_NEITHER);
- {$EXTERNALSYM FSCTL_DUMP_PROPERTY_DATA}
-*)
-
- FSCTL_SET_OBJECT_ID = (
- (FILE_DEVICE_FILE_SYSTEM shl 16) or (FILE_SPECIAL_ACCESS shl 14) or
- (38 shl 2) or METHOD_BUFFERED);
- {$EXTERNALSYM FSCTL_SET_OBJECT_ID}
-
- FSCTL_GET_OBJECT_ID = (
- (FILE_DEVICE_FILE_SYSTEM shl 16) or (FILE_ANY_ACCESS shl 14) or
- (39 shl 2) or METHOD_BUFFERED);
- {$EXTERNALSYM FSCTL_GET_OBJECT_ID}
-
- FSCTL_DELETE_OBJECT_ID = (
- (FILE_DEVICE_FILE_SYSTEM shl 16) or (FILE_SPECIAL_ACCESS shl 14) or
- (40 shl 2) or METHOD_BUFFERED);
- {$EXTERNALSYM FSCTL_DELETE_OBJECT_ID}
-
- FSCTL_SET_REPARSE_POINT = (
- (FILE_DEVICE_FILE_SYSTEM shl 16) or (FILE_SPECIAL_ACCESS shl 14) or
- (41 shl 2) or METHOD_BUFFERED);
- {$EXTERNALSYM FSCTL_SET_REPARSE_POINT}
-
- FSCTL_GET_REPARSE_POINT = (
- (FILE_DEVICE_FILE_SYSTEM shl 16) or (FILE_ANY_ACCESS shl 14) or
- (42 shl 2) or METHOD_BUFFERED);
- {$EXTERNALSYM FSCTL_GET_REPARSE_POINT}
-
- FSCTL_DELETE_REPARSE_POINT = (
- (FILE_DEVICE_FILE_SYSTEM shl 16) or (FILE_SPECIAL_ACCESS shl 14) or
- (43 shl 2) or METHOD_BUFFERED);
- {$EXTERNALSYM FSCTL_DELETE_REPARSE_POINT}
-
- FSCTL_ENUM_USN_DATA = (
- (FILE_DEVICE_FILE_SYSTEM shl 16) or (FILE_ANY_ACCESS shl 14) or
- (44 shl 2) or METHOD_NEITHER);
- {$EXTERNALSYM FSCTL_ENUM_USN_DATA}
-
- FSCTL_SECURITY_ID_CHECK = (
- (FILE_DEVICE_FILE_SYSTEM shl 16) or (FILE_READ_DATA shl 14) or
- (45 shl 2) or METHOD_NEITHER);
- {$EXTERNALSYM FSCTL_SECURITY_ID_CHECK}
-
- FSCTL_READ_USN_JOURNAL = (
- (FILE_DEVICE_FILE_SYSTEM shl 16) or (FILE_ANY_ACCESS shl 14) or
- (46 shl 2) or METHOD_NEITHER);
- {$EXTERNALSYM FSCTL_READ_USN_JOURNAL}
-
- FSCTL_SET_OBJECT_ID_EXTENDED = (
- (FILE_DEVICE_FILE_SYSTEM shl 16) or (FILE_SPECIAL_ACCESS shl 14) or
- (47 shl 2) or METHOD_BUFFERED);
- {$EXTERNALSYM FSCTL_SET_OBJECT_ID_EXTENDED}
-
- FSCTL_CREATE_OR_GET_OBJECT_ID = (
- (FILE_DEVICE_FILE_SYSTEM shl 16) or (FILE_ANY_ACCESS shl 14) or
- (48 shl 2) or METHOD_BUFFERED);
- {$EXTERNALSYM FSCTL_CREATE_OR_GET_OBJECT_ID}
-
- FSCTL_SET_SPARSE = (
- (FILE_DEVICE_FILE_SYSTEM shl 16) or (FILE_SPECIAL_ACCESS shl 14) or
- (49 shl 2) or METHOD_BUFFERED);
- {$EXTERNALSYM FSCTL_SET_SPARSE}
-
- FSCTL_SET_ZERO_DATA = (
- (FILE_DEVICE_FILE_SYSTEM shl 16) or (FILE_WRITE_DATA shl 14) or
- (50 shl 2) or METHOD_BUFFERED);
- {$EXTERNALSYM FSCTL_SET_ZERO_DATA}
-
- FSCTL_QUERY_ALLOCATED_RANGES = (
- (FILE_DEVICE_FILE_SYSTEM shl 16) or (FILE_READ_DATA shl 14) or
- (51 shl 2) or METHOD_NEITHER);
- {$EXTERNALSYM FSCTL_QUERY_ALLOCATED_RANGES}
-
-// decommissioned fsctl value 52
-(*
- FSCTL_ENABLE_UPGRADE = (
- (FILE_DEVICE_FILE_SYSTEM shl 16) or (FILE_WRITE_DATA shl 14) or
- (52 shl 2) or METHOD_BUFFERED);
- {$EXTERNALSYM FSCTL_ENABLE_UPGRADE}
-*)
-
- FSCTL_SET_ENCRYPTION = (
- (FILE_DEVICE_FILE_SYSTEM shl 16) or (FILE_ANY_ACCESS shl 14) or
- (53 shl 2) or METHOD_NEITHER);
- {$EXTERNALSYM FSCTL_SET_ENCRYPTION}
-
- FSCTL_ENCRYPTION_FSCTL_IO = (
- (FILE_DEVICE_FILE_SYSTEM shl 16) or (FILE_ANY_ACCESS shl 14) or
- (54 shl 2) or METHOD_NEITHER);
- {$EXTERNALSYM FSCTL_ENCRYPTION_FSCTL_IO}
-
- FSCTL_WRITE_RAW_ENCRYPTED = (
- (FILE_DEVICE_FILE_SYSTEM shl 16) or (FILE_SPECIAL_ACCESS shl 14) or
- (55 shl 2) or METHOD_NEITHER);
- {$EXTERNALSYM FSCTL_WRITE_RAW_ENCRYPTED}
-
- FSCTL_READ_RAW_ENCRYPTED = (
- (FILE_DEVICE_FILE_SYSTEM shl 16) or (FILE_SPECIAL_ACCESS shl 14) or
- (56 shl 2) or METHOD_NEITHER);
- {$EXTERNALSYM FSCTL_READ_RAW_ENCRYPTED}
-
- FSCTL_CREATE_USN_JOURNAL = (
- (FILE_DEVICE_FILE_SYSTEM shl 16) or (FILE_ANY_ACCESS shl 14) or
- (57 shl 2) or METHOD_NEITHER);
- {$EXTERNALSYM FSCTL_CREATE_USN_JOURNAL}
-
- FSCTL_READ_FILE_USN_DATA = (
- (FILE_DEVICE_FILE_SYSTEM shl 16) or (FILE_ANY_ACCESS shl 14) or
- (58 shl 2) or METHOD_NEITHER);
- {$EXTERNALSYM FSCTL_READ_FILE_USN_DATA}
-
- FSCTL_WRITE_USN_CLOSE_RECORD = (
- (FILE_DEVICE_FILE_SYSTEM shl 16) or (FILE_ANY_ACCESS shl 14) or
- (59 shl 2) or METHOD_NEITHER);
- {$EXTERNALSYM FSCTL_WRITE_USN_CLOSE_RECORD}
-
- FSCTL_EXTEND_VOLUME = (
- (FILE_DEVICE_FILE_SYSTEM shl 16) or (FILE_ANY_ACCESS shl 14) or
- (60 shl 2) or METHOD_BUFFERED);
- {$EXTERNALSYM FSCTL_EXTEND_VOLUME}
-
- FSCTL_QUERY_USN_JOURNAL = (
- (FILE_DEVICE_FILE_SYSTEM shl 16) or (FILE_ANY_ACCESS shl 14) or
- (61 shl 2) or METHOD_BUFFERED);
- {$EXTERNALSYM FSCTL_QUERY_USN_JOURNAL}
-
- FSCTL_DELETE_USN_JOURNAL = (
- (FILE_DEVICE_FILE_SYSTEM shl 16) or (FILE_ANY_ACCESS shl 14) or
- (62 shl 2) or METHOD_BUFFERED);
- {$EXTERNALSYM FSCTL_DELETE_USN_JOURNAL}
-
- FSCTL_MARK_HANDLE = (
- (FILE_DEVICE_FILE_SYSTEM shl 16) or (FILE_ANY_ACCESS shl 14) or
- (63 shl 2) or METHOD_BUFFERED);
- {$EXTERNALSYM FSCTL_MARK_HANDLE}
-
- FSCTL_SIS_COPYFILE = (
- (FILE_DEVICE_FILE_SYSTEM shl 16) or (FILE_ANY_ACCESS shl 14) or
- (64 shl 2) or METHOD_BUFFERED);
- {$EXTERNALSYM FSCTL_SIS_COPYFILE}
-
- FSCTL_SIS_LINK_FILES = (
- (FILE_DEVICE_FILE_SYSTEM shl 16) or ((FILE_READ_DATA or FILE_WRITE_DATA) shl 14) or
- (65 shl 2) or METHOD_BUFFERED);
- {$EXTERNALSYM FSCTL_SIS_LINK_FILES}
-
- FSCTL_HSM_MSG = (
- (FILE_DEVICE_FILE_SYSTEM shl 16) or ((FILE_READ_DATA or FILE_WRITE_DATA) shl 14) or
- (66 shl 2) or METHOD_BUFFERED);
- {$EXTERNALSYM FSCTL_HSM_MSG}
-
-// decommissioned fsctl value 67
-(*
- FSCTL_NSS_CONTROL = (
- (FILE_DEVICE_FILE_SYSTEM shl 16) or (FILE_WRITE_DATA shl 14) or
- (67 shl 2) or METHOD_BUFFERED);
- {$EXTERNALSYM FSCTL_NSS_CONTROL}
-*)
-
- FSCTL_HSM_DATA = (
- (FILE_DEVICE_FILE_SYSTEM shl 16) or ((FILE_READ_DATA or FILE_WRITE_DATA) shl 14) or
- (68 shl 2) or METHOD_NEITHER);
- {$EXTERNALSYM FSCTL_HSM_DATA}
-
- FSCTL_RECALL_FILE = (
- (FILE_DEVICE_FILE_SYSTEM shl 16) or (FILE_ANY_ACCESS shl 14) or
- (69 shl 2) or METHOD_NEITHER);
- {$EXTERNALSYM FSCTL_RECALL_FILE}
-
-// decommissioned fsctl value 70
-(*
- FSCTL_NSS_RCONTROL = (
- (FILE_DEVICE_FILE_SYSTEM shl 16) or (FILE_READ_DATA shl 14) or
- (70 shl 2) or METHOD_BUFFERED);
- {$EXTERNALSYM FSCTL_NSS_RCONTROL}
-*)
-
- FSCTL_READ_FROM_PLEX = (
- (FILE_DEVICE_FILE_SYSTEM shl 16) or (FILE_READ_DATA shl 14) or
- (71 shl 2) or METHOD_OUT_DIRECT);
- {$EXTERNALSYM FSCTL_READ_FROM_PLEX}
-
- FSCTL_FILE_PREFETCH = (
- (FILE_DEVICE_FILE_SYSTEM shl 16) or (FILE_SPECIAL_ACCESS shl 14) or
- (72 shl 2) or METHOD_BUFFERED);
- {$EXTERNALSYM FSCTL_FILE_PREFETCH}
-
-//
-// The following long list of structs are associated with the preceeding
-// file system fsctls.
-//
-// Note that the structs for the property sets fsctls are not included
-// in this file. They can be found in ntfsprop.h where they should stay
-// because of their dependency on objidl.h.
-//
-
-//
-// Structure for FSCTL_IS_PATHNAME_VALID
-//
-
-type
- PPATHNAME_BUFFER = ^PATHNAME_BUFFER;
- {$EXTERNALSYM PPATHNAME_BUFFER}
- _PATHNAME_BUFFER = record
- PathNameLength: DWORD;
- Name: array [0..0] of WCHAR;
- end;
- {$EXTERNALSYM _PATHNAME_BUFFER}
- PATHNAME_BUFFER = _PATHNAME_BUFFER;
- {$EXTERNALSYM PATHNAME_BUFFER}
- TPathnameBuffer = PATHNAME_BUFFER;
- PPathnameBuffer = PPATHNAME_BUFFER;
-
-//
-// Structure for FSCTL_QUERY_BPB_INFO
-//
-
- PFSCTL_QUERY_FAT_BPB_BUFFER = ^FSCTL_QUERY_FAT_BPB_BUFFER;
- {$EXTERNALSYM PFSCTL_QUERY_FAT_BPB_BUFFER}
- _FSCTL_QUERY_FAT_BPB_BUFFER = record
- First0x24BytesOfBootSector: array [0..$23] of BYTE;
- end;
- {$EXTERNALSYM _FSCTL_QUERY_FAT_BPB_BUFFER}
- FSCTL_QUERY_FAT_BPB_BUFFER = _FSCTL_QUERY_FAT_BPB_BUFFER;
- {$EXTERNALSYM FSCTL_QUERY_FAT_BPB_BUFFER}
- TFsctlQueryFatBpbBuffer = FSCTL_QUERY_FAT_BPB_BUFFER;
- PFsctlQueryFatBpbBuffer = PFSCTL_QUERY_FAT_BPB_BUFFER;
-
-//
-// Structures for FSCTL_GET_NTFS_VOLUME_DATA.
-// The user must pass the basic buffer below. Ntfs
-// will return as many fields as available in the extended
-// buffer which follows immediately after the VOLUME_DATA_BUFFER.
-//
-
- PNTFS_VOLUME_DATA_BUFFER = ^NTFS_VOLUME_DATA_BUFFER;
- {$EXTERNALSYM PNTFS_VOLUME_DATA_BUFFER}
- NTFS_VOLUME_DATA_BUFFER = record
- VolumeSerialNumber: LARGE_INTEGER;
- NumberSectors: LARGE_INTEGER;
- TotalClusters: LARGE_INTEGER;
- FreeClusters: LARGE_INTEGER;
- TotalReserved: LARGE_INTEGER;
- BytesPerSector: DWORD;
- BytesPerCluster: DWORD;
- BytesPerFileRecordSegment: DWORD;
- ClustersPerFileRecordSegment: DWORD;
- MftValidDataLength: LARGE_INTEGER;
- MftStartLcn: LARGE_INTEGER;
- Mft2StartLcn: LARGE_INTEGER;
- MftZoneStart: LARGE_INTEGER;
- MftZoneEnd: LARGE_INTEGER;
- end;
- {$EXTERNALSYM NTFS_VOLUME_DATA_BUFFER}
- TNtfsVolumeDataBuffer = NTFS_VOLUME_DATA_BUFFER;
- PNtfsVolumeDataBuffer = PNTFS_VOLUME_DATA_BUFFER;
-
- PNTFS_EXTENDED_VOLUME_DATA = ^NTFS_EXTENDED_VOLUME_DATA;
- {$EXTERNALSYM PNTFS_EXTENDED_VOLUME_DATA}
- NTFS_EXTENDED_VOLUME_DATA = record
- ByteCount: DWORD;
- MajorVersion: WORD;
- MinorVersion: WORD;
- end;
- {$EXTERNALSYM NTFS_EXTENDED_VOLUME_DATA}
- TNtfsExtendedVolumeData = NTFS_EXTENDED_VOLUME_DATA;
- PNtfsExtendedVolumeData = PNTFS_EXTENDED_VOLUME_DATA;
-
-//
-// Structure for FSCTL_GET_VOLUME_BITMAP
-//
-
- PSTARTING_LCN_INPUT_BUFFER = ^STARTING_LCN_INPUT_BUFFER;
- {$EXTERNALSYM PSTARTING_LCN_INPUT_BUFFER}
- STARTING_LCN_INPUT_BUFFER = record
- StartingLcn: LARGE_INTEGER;
- end;
- {$EXTERNALSYM STARTING_LCN_INPUT_BUFFER}
- TStartingLcnInputBuffer = STARTING_LCN_INPUT_BUFFER;
- PStartingLcnInputBuffer = PSTARTING_LCN_INPUT_BUFFER;
-
- PVOLUME_BITMAP_BUFFER = ^VOLUME_BITMAP_BUFFER;
- {$EXTERNALSYM PVOLUME_BITMAP_BUFFER}
- VOLUME_BITMAP_BUFFER = record
- StartingLcn: LARGE_INTEGER;
- BitmapSize: LARGE_INTEGER;
- Buffer: array [0..0] of BYTE;
- end;
- {$EXTERNALSYM VOLUME_BITMAP_BUFFER}
- TVolumeBitmapBuffer = VOLUME_BITMAP_BUFFER;
- PVolumeBitmapBuffer = PVOLUME_BITMAP_BUFFER;
-
-//
-// Structure for FSCTL_GET_RETRIEVAL_POINTERS
-//
-
- PSTARTING_VCN_INPUT_BUFFER = ^STARTING_VCN_INPUT_BUFFER;
- {$EXTERNALSYM PSTARTING_VCN_INPUT_BUFFER}
- STARTING_VCN_INPUT_BUFFER = record
- StartingVcn: LARGE_INTEGER;
- end;
- {$EXTERNALSYM STARTING_VCN_INPUT_BUFFER}
- TStartingVcnInputBuffer = STARTING_VCN_INPUT_BUFFER;
- PStartingVcnInputBuffer = PSTARTING_VCN_INPUT_BUFFER;
-
- TRPBExtends = record
- NextVcn: LARGE_INTEGER;
- Lcn: LARGE_INTEGER;
- end;
-
- PRETRIEVAL_POINTERS_BUFFER = ^RETRIEVAL_POINTERS_BUFFER;
- {$EXTERNALSYM PRETRIEVAL_POINTERS_BUFFER}
- RETRIEVAL_POINTERS_BUFFER = record
- ExtentCount: DWORD;
- StartingVcn: LARGE_INTEGER;
- Extends: array [0..0] of TRPBExtends;
- end;
- {$EXTERNALSYM RETRIEVAL_POINTERS_BUFFER}
- TRetrievalPointersBuffer = RETRIEVAL_POINTERS_BUFFER;
- PRetrievalPointersBuffer = PRETRIEVAL_POINTERS_BUFFER;
-
-//
-// Structures for FSCTL_GET_NTFS_FILE_RECORD
-//
-
- PNTFS_FILE_RECORD_INPUT_BUFFER = ^NTFS_FILE_RECORD_INPUT_BUFFER;
- {$EXTERNALSYM PNTFS_FILE_RECORD_INPUT_BUFFER}
- NTFS_FILE_RECORD_INPUT_BUFFER = record
- FileReferenceNumber: LARGE_INTEGER;
- end;
- {$EXTERNALSYM NTFS_FILE_RECORD_INPUT_BUFFER}
- TNtfsFileRecordInputBuffer = NTFS_FILE_RECORD_INPUT_BUFFER;
- PNtfsFileRecordInputBuffer = PNTFS_FILE_RECORD_INPUT_BUFFER;
-
- PNTFS_FILE_RECORD_OUTPUT_BUFFER = ^NTFS_FILE_RECORD_OUTPUT_BUFFER;
- {$EXTERNALSYM PNTFS_FILE_RECORD_OUTPUT_BUFFER}
- NTFS_FILE_RECORD_OUTPUT_BUFFER = record
- FileReferenceNumber: LARGE_INTEGER;
- FileRecordLength: DWORD;
- FileRecordBuffer: array [0..0] of BYTE;
- end;
- {$EXTERNALSYM NTFS_FILE_RECORD_OUTPUT_BUFFER}
- TNtfsFileRecordOutputBuffer = NTFS_FILE_RECORD_OUTPUT_BUFFER;
- PNtfsFileRecordOutputBuffer = PNTFS_FILE_RECORD_OUTPUT_BUFFER;
-
-//
-// Structure for FSCTL_MOVE_FILE
-//
-
- PMOVE_FILE_DATA = ^MOVE_FILE_DATA;
- {$EXTERNALSYM PMOVE_FILE_DATA}
- MOVE_FILE_DATA = record
- FileHandle: HANDLE;
- StartingVcn: LARGE_INTEGER;
- StartingLcn: LARGE_INTEGER;
- ClusterCount: DWORD;
- end;
- {$EXTERNALSYM MOVE_FILE_DATA}
- TMoveFileData = MOVE_FILE_DATA;
- PMoveFileData = PMOVE_FILE_DATA;
-
-{$IFDEF _WIN64}
-
-//
-// 32/64 Bit thunking support structure
-//
-
- _MOVE_FILE_DATA32 = record
- FileHandle: UINT32;
- StartingVcn: LARGE_INTEGER;
- StartingLcn: LARGE_INTEGER;
- ClusterCount: DWORD;
- end;
- {$EXTERNALSYM _MOVE_FILE_DATA32}
- MOVE_FILE_DATA32 = _MOVE_FILE_DATA32;
- {$EXTERNALSYM MOVE_FILE_DATA32}
- PMOVE_FILE_DATA32 = ^MOVE_FILE_DATA32;
- {$EXTERNALSYM PMOVE_FILE_DATA32}
- TMoveFileData32 = MOVE_FILE_DATA32;
- PMoveFileData32 = PMOVE_FILE_DATA32;
-
-{$ENDIF _WIN64}
-
-//
-// Structures for FSCTL_FIND_FILES_BY_SID
-//
-
- PFIND_BY_SID_DATA = ^FIND_BY_SID_DATA;
- {$EXTERNALSYM PFIND_BY_SID_DATA}
- FIND_BY_SID_DATA = record
- Restart: DWORD;
- Sid: SID;
- end;
- {$EXTERNALSYM FIND_BY_SID_DATA}
- TFindBySidData = FIND_BY_SID_DATA;
- PFindBySidData = PFIND_BY_SID_DATA;
-
- FIND_BY_SID_OUTPUT = record
- NextEntryOffset: DWORD;
- FileIndex: DWORD;
- FileNameLength: DWORD;
- FileName: array [0..0] of WCHAR;
- end;
- {$EXTERNALSYM FIND_BY_SID_OUTPUT}
- PFIND_BY_SID_OUTPUT = ^FIND_BY_SID_OUTPUT;
- TFindBySidOutput = FIND_BY_SID_OUTPUT;
- PFindBySidOutput = PFIND_BY_SID_OUTPUT;
-
-//
-// The following structures apply to Usn operations.
-//
-
-//
-// Structure for FSCTL_ENUM_USN_DATA
-//
-
- PMFT_ENUM_DATA = ^MFT_ENUM_DATA;
- {$EXTERNALSYM PMFT_ENUM_DATA}
- MFT_ENUM_DATA = record
- StartFileReferenceNumber: DWORDLONG;
- LowUsn: USN;
- HighUsn: USN;
- end;
- {$EXTERNALSYM MFT_ENUM_DATA}
- TMftEnumData = MFT_ENUM_DATA;
- PMftEnumData = PMFT_ENUM_DATA;
-
-//
-// Structure for FSCTL_CREATE_USN_JOURNAL
-//
-
- PCREATE_USN_JOURNAL_DATA = ^CREATE_USN_JOURNAL_DATA;
- {$EXTERNALSYM PCREATE_USN_JOURNAL_DATA}
- CREATE_USN_JOURNAL_DATA = record
- MaximumSize: DWORDLONG;
- AllocationDelta: DWORDLONG;
- end;
- {$EXTERNALSYM CREATE_USN_JOURNAL_DATA}
- TCreateUsnJournalData = CREATE_USN_JOURNAL_DATA;
- PCreateUsnJournalData = PCREATE_USN_JOURNAL_DATA;
-
-//
-// Structure for FSCTL_READ_USN_JOURNAL
-//
-
- PREAD_USN_JOURNAL_DATA = ^READ_USN_JOURNAL_DATA;
- {$EXTERNALSYM PREAD_USN_JOURNAL_DATA}
- READ_USN_JOURNAL_DATA = record
- StartUsn: USN;
- ReasonMask: DWORD;
- ReturnOnlyOnClose: DWORD;
- Timeout: DWORDLONG;
- BytesToWaitFor: DWORDLONG;
- UsnJournalID: DWORDLONG;
- end;
- {$EXTERNALSYM READ_USN_JOURNAL_DATA}
- TReadUsnJournalData = READ_USN_JOURNAL_DATA;
- PReadUsnJournalData = PREAD_USN_JOURNAL_DATA;
-
-//
-// The initial Major.Minor version of the Usn record will be 2.0.
-// In general, the MinorVersion may be changed if fields are added
-// to this structure in such a way that the previous version of the
-// software can still correctly the fields it knows about. The
-// MajorVersion should only be changed if the previous version of
-// any software using this structure would incorrectly handle new
-// records due to structure changes.
-//
-// The first update to this will force the structure to version 2.0.
-// This will add the extended information about the source as
-// well as indicate the file name offset within the structure.
-//
-// The following structure is returned with these fsctls.
-//
-// FSCTL_READ_USN_JOURNAL
-// FSCTL_READ_FILE_USN_DATA
-// FSCTL_ENUM_USN_DATA
-//
-
- PUSN_RECORD = ^USN_RECORD;
- {$EXTERNALSYM PUSN_RECORD}
- USN_RECORD = record
- RecordLength: DWORD;
- MajorVersion: WORD;
- MinorVersion: WORD;
- FileReferenceNumber: DWORDLONG;
- ParentFileReferenceNumber: DWORDLONG;
- Usn: USN;
- TimeStamp: LARGE_INTEGER;
- Reason: DWORD;
- SourceInfo: DWORD;
- SecurityId: DWORD;
- FileAttributes: DWORD;
- FileNameLength: WORD;
- FileNameOffset: WORD;
- FileName: array [0..0] of WCHAR;
- end;
- {$EXTERNALSYM USN_RECORD}
- TUsnRecord = USN_RECORD;
- PUsnRecord = PUSN_RECORD;
-
-const
- USN_PAGE_SIZE = $1000;
- {$EXTERNALSYM USN_PAGE_SIZE}
-
- USN_REASON_DATA_OVERWRITE = $00000001;
- {$EXTERNALSYM USN_REASON_DATA_OVERWRITE}
- USN_REASON_DATA_EXTEND = $00000002;
- {$EXTERNALSYM USN_REASON_DATA_EXTEND}
- USN_REASON_DATA_TRUNCATION = $00000004;
- {$EXTERNALSYM USN_REASON_DATA_TRUNCATION}
- USN_REASON_NAMED_DATA_OVERWRITE = $00000010;
- {$EXTERNALSYM USN_REASON_NAMED_DATA_OVERWRITE}
- USN_REASON_NAMED_DATA_EXTEND = $00000020;
- {$EXTERNALSYM USN_REASON_NAMED_DATA_EXTEND}
- USN_REASON_NAMED_DATA_TRUNCATION = $00000040;
- {$EXTERNALSYM USN_REASON_NAMED_DATA_TRUNCATION}
- USN_REASON_FILE_CREATE = $00000100;
- {$EXTERNALSYM USN_REASON_FILE_CREATE}
- USN_REASON_FILE_DELETE = $00000200;
- {$EXTERNALSYM USN_REASON_FILE_DELETE}
- USN_REASON_EA_CHANGE = $00000400;
- {$EXTERNALSYM USN_REASON_EA_CHANGE}
- USN_REASON_SECURITY_CHANGE = $00000800;
- {$EXTERNALSYM USN_REASON_SECURITY_CHANGE}
- USN_REASON_RENAME_OLD_NAME = $00001000;
- {$EXTERNALSYM USN_REASON_RENAME_OLD_NAME}
- USN_REASON_RENAME_NEW_NAME = $00002000;
- {$EXTERNALSYM USN_REASON_RENAME_NEW_NAME}
- USN_REASON_INDEXABLE_CHANGE = $00004000;
- {$EXTERNALSYM USN_REASON_INDEXABLE_CHANGE}
- USN_REASON_BASIC_INFO_CHANGE = $00008000;
- {$EXTERNALSYM USN_REASON_BASIC_INFO_CHANGE}
- USN_REASON_HARD_LINK_CHANGE = $00010000;
- {$EXTERNALSYM USN_REASON_HARD_LINK_CHANGE}
- USN_REASON_COMPRESSION_CHANGE = $00020000;
- {$EXTERNALSYM USN_REASON_COMPRESSION_CHANGE}
- USN_REASON_ENCRYPTION_CHANGE = $00040000;
- {$EXTERNALSYM USN_REASON_ENCRYPTION_CHANGE}
- USN_REASON_OBJECT_ID_CHANGE = $00080000;
- {$EXTERNALSYM USN_REASON_OBJECT_ID_CHANGE}
- USN_REASON_REPARSE_POINT_CHANGE = $00100000;
- {$EXTERNALSYM USN_REASON_REPARSE_POINT_CHANGE}
- USN_REASON_STREAM_CHANGE = $00200000;
- {$EXTERNALSYM USN_REASON_STREAM_CHANGE}
-
- USN_REASON_CLOSE = DWORD($80000000);
- {$EXTERNALSYM USN_REASON_CLOSE}
-
-//
-// Structure for FSCTL_QUERY_USN_JOUNAL
-//
-
-type
- PUSN_JOURNAL_DATA = ^USN_JOURNAL_DATA;
- {$EXTERNALSYM PUSN_JOURNAL_DATA}
- USN_JOURNAL_DATA = record
- UsnJournalID: DWORDLONG;
- FirstUsn: USN;
- NextUsn: USN;
- LowestValidUsn: USN;
- MaxUsn: USN;
- MaximumSize: DWORDLONG;
- AllocationDelta: DWORDLONG;
- end;
- {$EXTERNALSYM USN_JOURNAL_DATA}
- TUsnJournalData = USN_JOURNAL_DATA;
- PUsnJournalData = PUSN_JOURNAL_DATA;
-
-//
-// Structure for FSCTL_DELETE_USN_JOURNAL
-//
-
- PDELETE_USN_JOURNAL_DATA = ^DELETE_USN_JOURNAL_DATA;
- {$EXTERNALSYM PDELETE_USN_JOURNAL_DATA}
- DELETE_USN_JOURNAL_DATA = record
- UsnJournalID: DWORDLONG;
- DeleteFlags: DWORD;
- end;
- {$EXTERNALSYM DELETE_USN_JOURNAL_DATA}
- TDeleteUsnJournalData = DELETE_USN_JOURNAL_DATA;
- PDeleteUsnJournalData = PDELETE_USN_JOURNAL_DATA;
-
-const
- USN_DELETE_FLAG_DELETE = $00000001;
- {$EXTERNALSYM USN_DELETE_FLAG_DELETE}
- USN_DELETE_FLAG_NOTIFY = $00000002;
- {$EXTERNALSYM USN_DELETE_FLAG_NOTIFY}
-
- USN_DELETE_VALID_FLAGS = $00000003;
- {$EXTERNALSYM USN_DELETE_VALID_FLAGS}
-
-//
-// Structure for FSCTL_MARK_HANDLE
-//
-
-type
- PMARK_HANDLE_INFO = ^MARK_HANDLE_INFO;
- {$EXTERNALSYM PMARK_HANDLE_INFO}
- MARK_HANDLE_INFO = record
- UsnSourceInfo: DWORD;
- VolumeHandle: HANDLE;
- HandleInfo: DWORD;
- end;
- {$EXTERNALSYM MARK_HANDLE_INFO}
- TMarkHandleInfo = MARK_HANDLE_INFO;
- PMarkHandleInfo = PMARK_HANDLE_INFO;
-
-{$IFDEF _WIN64}
-
-//
-// 32/64 Bit thunking support structure
-//
-
- MARK_HANDLE_INFO32 = record
- UsnSourceInfo: DWORD;
- VolumeHandle: UINT32;
- HandleInfo: DWORD;
- end;
- {$EXTERNALSYM MARK_HANDLE_INFO32}
- PMARK_HANDLE_INFO32 = ^MARK_HANDLE_INFO32;
- {$EXTERNALSYM PMARK_HANDLE_INFO32}
- TMarkHandleInfo32 = MARK_HANDLE_INFO32;
- PMarkHandleInfo32 = PMARK_HANDLE_INFO32;
-
-{$ENDIF _WIN64}
-
-//
-// Flags for the additional source information above.
-//
-// USN_SOURCE_DATA_MANAGEMENT - Service is not modifying the external view
-// of any part of the file. Typical case is HSM moving data to
-// and from external storage.
-//
-// USN_SOURCE_AUXILIARY_DATA - Service is not modifying the external view
-// of the file with regard to the application that created this file.
-// Can be used to add private data streams to a file.
-//
-// USN_SOURCE_REPLICATION_MANAGEMENT - Service is modifying a file to match
-// the contents of the same file which exists in another member of the
-// replica set.
-//
-
-const
- USN_SOURCE_DATA_MANAGEMENT = $00000001;
- {$EXTERNALSYM USN_SOURCE_DATA_MANAGEMENT}
- USN_SOURCE_AUXILIARY_DATA = $00000002;
- {$EXTERNALSYM USN_SOURCE_AUXILIARY_DATA}
- USN_SOURCE_REPLICATION_MANAGEMENT = $00000004;
- {$EXTERNALSYM USN_SOURCE_REPLICATION_MANAGEMENT}
-
-//
-// Flags for the HandleInfo field above
-//
-// MARK_HANDLE_PROTECT_CLUSTERS - disallow any defragmenting (FSCTL_MOVE_FILE) until the
-// the handle is closed
-//
-
- MARK_HANDLE_PROTECT_CLUSTERS = $00000001;
- {$EXTERNALSYM MARK_HANDLE_PROTECT_CLUSTERS}
-
-//
-// Structure for FSCTL_SECURITY_ID_CHECK
-//
-
-type
- PBULK_SECURITY_TEST_DATA = ^BULK_SECURITY_TEST_DATA;
- {$EXTERNALSYM PBULK_SECURITY_TEST_DATA}
- BULK_SECURITY_TEST_DATA = record
- DesiredAccess: ACCESS_MASK;
- SecurityIds: array [0..0] of DWORD;
- end;
- {$EXTERNALSYM BULK_SECURITY_TEST_DATA}
- TBulkSecurityTestData = BULK_SECURITY_TEST_DATA;
- PBulkSecurityTestData = PBULK_SECURITY_TEST_DATA;
-
-//
-// Output flags for the FSCTL_IS_VOLUME_DIRTY
-//
-
-const
- VOLUME_IS_DIRTY = $00000001;
- {$EXTERNALSYM VOLUME_IS_DIRTY}
- VOLUME_UPGRADE_SCHEDULED = $00000002;
- {$EXTERNALSYM VOLUME_UPGRADE_SCHEDULED}
-
-//
-// Structures for FSCTL_FILE_PREFETCH
-//
-
-type
- _FILE_PREFETCH = record
- Type_: DWORD;
- Count: DWORD;
- Prefetch: array [0..0] of DWORDLONG;
- end;
- {$EXTERNALSYM _FILE_PREFETCH}
- FILE_PREFETCH = _FILE_PREFETCH;
- {$EXTERNALSYM FILE_PREFETCH}
- PFILE_PREFETCH = ^FILE_PREFETCH;
- {$EXTERNALSYM PFILE_PREFETCH}
- TFilePrefetch = FILE_PREFETCH;
- PFilePrefetch = PFILE_PREFETCH;
-
-const
- FILE_PREFETCH_TYPE_FOR_CREATE = $1;
- {$EXTERNALSYM FILE_PREFETCH_TYPE_FOR_CREATE}
-//
-// Structures for FSCTL_FILESYSTEM_GET_STATISTICS
-//
-// Filesystem performance counters
-//
-
-type
- PFILESYSTEM_STATISTICS = ^FILESYSTEM_STATISTICS;
- {$EXTERNALSYM PFILESYSTEM_STATISTICS}
- _FILESYSTEM_STATISTICS = record
- FileSystemType: WORD;
- Version: WORD; // currently version 1
- SizeOfCompleteStructure: DWORD; // must by a mutiple of 64 bytes
- UserFileReads: DWORD;
- UserFileReadBytes: DWORD;
- UserDiskReads: DWORD;
- UserFileWrites: DWORD;
- UserFileWriteBytes: DWORD;
- UserDiskWrites: DWORD;
- MetaDataReads: DWORD;
- MetaDataReadBytes: DWORD;
- MetaDataDiskReads: DWORD;
- MetaDataWrites: DWORD;
- MetaDataWriteBytes: DWORD;
- MetaDataDiskWrites: DWORD;
- //
- // The file system's private structure is appended here.
- //
- end;
- {$EXTERNALSYM _FILESYSTEM_STATISTICS}
- FILESYSTEM_STATISTICS = _FILESYSTEM_STATISTICS;
- {$EXTERNALSYM FILESYSTEM_STATISTICS}
- TFilesystemStatistics = FILESYSTEM_STATISTICS;
- PFilesystemStatistics = PFILESYSTEM_STATISTICS;
-
-// values for FS_STATISTICS.FileSystemType
-
-const
- FILESYSTEM_STATISTICS_TYPE_NTFS = 1;
- {$EXTERNALSYM FILESYSTEM_STATISTICS_TYPE_NTFS}
- FILESYSTEM_STATISTICS_TYPE_FAT = 2;
- {$EXTERNALSYM FILESYSTEM_STATISTICS_TYPE_FAT}
-
-//
-// File System Specific Statistics Data
-//
-
-type
- PFAT_STATISTICS = ^FAT_STATISTICS;
- {$EXTERNALSYM PFAT_STATISTICS}
- _FAT_STATISTICS = record
- CreateHits: DWORD;
- SuccessfulCreates: DWORD;
- FailedCreates: DWORD;
- NonCachedReads: DWORD;
- NonCachedReadBytes: DWORD;
- NonCachedWrites: DWORD;
- NonCachedWriteBytes: DWORD;
- NonCachedDiskReads: DWORD;
- NonCachedDiskWrites: DWORD;
- end;
- {$EXTERNALSYM _FAT_STATISTICS}
- FAT_STATISTICS = _FAT_STATISTICS;
- {$EXTERNALSYM FAT_STATISTICS}
- TFatStatistics = FAT_STATISTICS;
- PFatStatistics = PFAT_STATISTICS;
-
- // NTFS Statistics
-
- TMftWritesUserLevel = record
- Write: WORD;
- Create: WORD;
- SetInfo: WORD;
- Flush: WORD;
- end;
-
- TMft2WritesUserLevel = record
- Write: WORD;
- Create: WORD;
- SetInfo: WORD;
- Flush: WORD;
- end;
-
- TBitmapWritesUserLevel = record
- Write: WORD;
- Create: WORD;
- SetInfo: WORD;
- end;
-
- TMftBitmapWritesUserLevel = record
- Write: WORD;
- Create: WORD;
- SetInfo: WORD;
- Flush: WORD;
- end;
-
- TAllocate = record
- Calls: DWORD; // number of individual calls to allocate clusters
- Clusters: DWORD; // number of clusters allocated
- Hints: DWORD; // number of times a hint was specified
-
- RunsReturned: DWORD; // number of runs used to satisify all the requests
-
- HintsHonored: DWORD; // number of times the hint was useful
- HintsClusters: DWORD; // number of clusters allocated via the hint
- Cache: DWORD; // number of times the cache was useful other than the hint
- CacheClusters: DWORD; // number of clusters allocated via the cache other than the hint
- CacheMiss: DWORD; // number of times the cache wasn't useful
- CacheMissClusters: DWORD; // number of clusters allocated without the cache
- end;
-
- {$EXTERNALSYM NTFS_STATISTICS}
- PNTFS_STATISTICS = ^NTFS_STATISTICS;
- _NTFS_STATISTICS = record
-
- LogFileFullExceptions: DWORD;
- OtherExceptions: DWORD;
-
- //
- // Other meta data io's
- //
-
- MftReads: DWORD;
- MftReadBytes: DWORD;
- MftWrites: DWORD;
- MftWriteBytes: DWORD;
- MftWritesUserLevel: TMftWritesUserLevel;
-
- MftWritesFlushForLogFileFull: WORD;
- MftWritesLazyWriter: WORD;
- MftWritesUserRequest: WORD;
-
- Mft2Writes: DWORD;
- Mft2WriteBytes: DWORD;
- Mft2WritesUserLevel: TMft2WritesUserLevel;
-
- Mft2WritesFlushForLogFileFull: WORD;
- Mft2WritesLazyWriter: WORD;
- Mft2WritesUserRequest: WORD;
-
- RootIndexReads: DWORD;
- RootIndexReadBytes: DWORD;
- RootIndexWrites: DWORD;
- RootIndexWriteBytes: DWORD;
-
- BitmapReads: DWORD;
- BitmapReadBytes: DWORD;
- BitmapWrites: DWORD;
- BitmapWriteBytes: DWORD;
-
- BitmapWritesFlushForLogFileFull: WORD;
- BitmapWritesLazyWriter: WORD;
- BitmapWritesUserRequest: WORD;
-
- BitmapWritesUserLevel: TBitmapWritesUserLevel;
-
- MftBitmapReads: DWORD;
- MftBitmapReadBytes: DWORD;
- MftBitmapWrites: DWORD;
- MftBitmapWriteBytes: DWORD;
-
- MftBitmapWritesFlushForLogFileFull: WORD;
- MftBitmapWritesLazyWriter: WORD;
- MftBitmapWritesUserRequest: WORD;
- MftBitmapWritesUserLevel: TMftBitmapWritesUserLevel;
-
- UserIndexReads: DWORD;
- UserIndexReadBytes: DWORD;
- UserIndexWrites: DWORD;
- UserIndexWriteBytes: DWORD;
-
- //
- // Additions for NT 5.0
- //
-
- LogFileReads: DWORD;
- LogFileReadBytes: DWORD;
- LogFileWrites: DWORD;
- LogFileWriteBytes: DWORD;
-
- Allocate: TAllocate;
- end;
- {$EXTERNALSYM _NTFS_STATISTICS}
- NTFS_STATISTICS = _NTFS_STATISTICS;
- {$EXTERNALSYM PNTFS_STATISTICS}
- TNTFSStatistics = NTFS_STATISTICS;
- PNTFSStatistics = PNTFS_STATISTICS;
-
-//
-// Structure for FSCTL_SET_OBJECT_ID, FSCTL_GET_OBJECT_ID, and FSCTL_CREATE_OR_GET_OBJECT_ID
-//
-
- PFILE_OBJECTID_BUFFER = ^FILE_OBJECTID_BUFFER;
- {$EXTERNALSYM PFILE_OBJECTID_BUFFER}
- _FILE_OBJECTID_BUFFER = record
-
- //
- // This is the portion of the object id that is indexed.
- //
-
- ObjectId: array [0..15] of BYTE;
-
- //
- // This portion of the object id is not indexed, it's just
- // some metadata for the user's benefit.
- //
-
- case Integer of
- 0: (
- BirthVolumeId: array [0..15] of BYTE;
- BirthObjectId: array [0..15] of BYTE;
- DomainId: array [0..15] of BYTE);
- 1: (
- ExtendedInfo: array [0..47] of BYTE);
- end;
- {$EXTERNALSYM _FILE_OBJECTID_BUFFER}
- FILE_OBJECTID_BUFFER = _FILE_OBJECTID_BUFFER;
- {$EXTERNALSYM FILE_OBJECTID_BUFFER}
- TFileObjectIdBuffer = FILE_OBJECTID_BUFFER;
- PFileObjectIdBuffer = PFILE_OBJECTID_BUFFER;
-
-//
-// Structure for FSCTL_SET_SPARSE
-//
-
- PFILE_SET_SPARSE_BUFFER = ^FILE_SET_SPARSE_BUFFER;
- {$EXTERNALSYM PFILE_SET_SPARSE_BUFFER}
- _FILE_SET_SPARSE_BUFFER = record
- SetSparse: ByteBool;
- end;
- {$EXTERNALSYM _FILE_SET_SPARSE_BUFFER}
- FILE_SET_SPARSE_BUFFER = _FILE_SET_SPARSE_BUFFER;
- {$EXTERNALSYM FILE_SET_SPARSE_BUFFER}
- TFileSetSparseBuffer = FILE_SET_SPARSE_BUFFER;
- PFileSetSparseBuffer = PFILE_SET_SPARSE_BUFFER;
-
-//
-// Structure for FSCTL_SET_ZERO_DATA
-//
-
- PFILE_ZERO_DATA_INFORMATION = ^FILE_ZERO_DATA_INFORMATION;
- {$EXTERNALSYM PFILE_ZERO_DATA_INFORMATION}
- _FILE_ZERO_DATA_INFORMATION = record
- FileOffset: LARGE_INTEGER;
- BeyondFinalZero: LARGE_INTEGER;
- end;
- {$EXTERNALSYM _FILE_ZERO_DATA_INFORMATION}
- FILE_ZERO_DATA_INFORMATION = _FILE_ZERO_DATA_INFORMATION;
- {$EXTERNALSYM FILE_ZERO_DATA_INFORMATION}
- TFileZeroDataInformation = FILE_ZERO_DATA_INFORMATION;
- PFileZeroDataInformation = PFILE_ZERO_DATA_INFORMATION;
-
-//
-// Structure for FSCTL_QUERY_ALLOCATED_RANGES
-//
-
-//
-// Querying the allocated ranges requires an output buffer to store the
-// allocated ranges and an input buffer to specify the range to query.
-// The input buffer contains a single entry, the output buffer is an
-// array of the following structure.
-//
-
- PFILE_ALLOCATED_RANGE_BUFFER = ^FILE_ALLOCATED_RANGE_BUFFER;
- {$EXTERNALSYM PFILE_ALLOCATED_RANGE_BUFFER}
- _FILE_ALLOCATED_RANGE_BUFFER = record
- FileOffset: LARGE_INTEGER;
- Length: LARGE_INTEGER;
- end;
- {$EXTERNALSYM _FILE_ALLOCATED_RANGE_BUFFER}
- FILE_ALLOCATED_RANGE_BUFFER = _FILE_ALLOCATED_RANGE_BUFFER;
- {$EXTERNALSYM FILE_ALLOCATED_RANGE_BUFFER}
- TFileAllocatedRangeBuffer = FILE_ALLOCATED_RANGE_BUFFER;
- PFileAllocatedRangeBuffer = PFILE_ALLOCATED_RANGE_BUFFER;
-
-//
-// Structures for FSCTL_SET_ENCRYPTION, FSCTL_WRITE_RAW_ENCRYPTED, and FSCTL_READ_RAW_ENCRYPTED
-//
-
-//
-// The input buffer to set encryption indicates whether we are to encrypt/decrypt a file
-// or an individual stream.
-//
-
- PENCRYPTION_BUFFER = ^ENCRYPTION_BUFFER;
- {$EXTERNALSYM PENCRYPTION_BUFFER}
- _ENCRYPTION_BUFFER = record
- EncryptionOperation: DWORD;
- Private_: array [0..0] of BYTE;
- end;
- {$EXTERNALSYM _ENCRYPTION_BUFFER}
- ENCRYPTION_BUFFER = _ENCRYPTION_BUFFER;
- {$EXTERNALSYM ENCRYPTION_BUFFER}
- TEncryptionBuffer = ENCRYPTION_BUFFER;
- PEncryptionBuffer = PENCRYPTION_BUFFER;
-
-const
- FILE_SET_ENCRYPTION = $00000001;
- {$EXTERNALSYM FILE_SET_ENCRYPTION}
- FILE_CLEAR_ENCRYPTION = $00000002;
- {$EXTERNALSYM FILE_CLEAR_ENCRYPTION}
- STREAM_SET_ENCRYPTION = $00000003;
- {$EXTERNALSYM STREAM_SET_ENCRYPTION}
- STREAM_CLEAR_ENCRYPTION = $00000004;
- {$EXTERNALSYM STREAM_CLEAR_ENCRYPTION}
-
- MAXIMUM_ENCRYPTION_VALUE = $00000004;
- {$EXTERNALSYM MAXIMUM_ENCRYPTION_VALUE}
-
-//
-// The optional output buffer to set encryption indicates that the last encrypted
-// stream in a file has been marked as decrypted.
-//
-
-type
- PDECRYPTION_STATUS_BUFFER = ^DECRYPTION_STATUS_BUFFER;
- {$EXTERNALSYM PDECRYPTION_STATUS_BUFFER}
- _DECRYPTION_STATUS_BUFFER = record
- NoEncryptedStreams: ByteBool;
- end;
- {$EXTERNALSYM _DECRYPTION_STATUS_BUFFER}
- DECRYPTION_STATUS_BUFFER = _DECRYPTION_STATUS_BUFFER;
- {$EXTERNALSYM DECRYPTION_STATUS_BUFFER}
- TDecryptionStatusBuffer = DECRYPTION_STATUS_BUFFER;
- PDecryptionStatusBuffer = PDECRYPTION_STATUS_BUFFER;
-
-const
- ENCRYPTION_FORMAT_DEFAULT = $01;
- {$EXTERNALSYM ENCRYPTION_FORMAT_DEFAULT}
-
- COMPRESSION_FORMAT_SPARSE = $4000;
- {$EXTERNALSYM COMPRESSION_FORMAT_SPARSE}
-
-//
-// Request Encrypted Data structure. This is used to indicate
-// the range of the file to read. It also describes the
-// output buffer used to return the data.
-//
-
-type
- PREQUEST_RAW_ENCRYPTED_DATA = ^REQUEST_RAW_ENCRYPTED_DATA;
- {$EXTERNALSYM PREQUEST_RAW_ENCRYPTED_DATA}
- _REQUEST_RAW_ENCRYPTED_DATA = record
- //
- // Requested file offset and requested length to read.
- // The fsctl will round the starting offset down
- // to a file system boundary. It will also
- // round the length up to a file system boundary.
- //
- FileOffset: LONGLONG;
- Length: DWORD;
- end;
- {$EXTERNALSYM _REQUEST_RAW_ENCRYPTED_DATA}
- REQUEST_RAW_ENCRYPTED_DATA = _REQUEST_RAW_ENCRYPTED_DATA;
- {$EXTERNALSYM REQUEST_RAW_ENCRYPTED_DATA}
- TRequestRawEncryptedData = REQUEST_RAW_ENCRYPTED_DATA;
- PRequestRawEncryptedData = PREQUEST_RAW_ENCRYPTED_DATA;
-
-//
-// Encrypted Data Information structure. This structure
-// is used to return raw encrypted data from a file in
-// order to perform off-line recovery. The data will be
-// encrypted or encrypted and compressed. The off-line
-// service will need to use the encryption and compression
-// format information to recover the file data. In the
-// event that the data is both encrypted and compressed then
-// the decryption must occur before decompression. All
-// the data units below must be encrypted and compressed
-// with the same format.
-//
-// The data will be returned in units. The data unit size
-// will be fixed per request. If the data is compressed
-// then the data unit size will be the compression unit size.
-//
-// This structure is at the beginning of the buffer used to
-// return the encrypted data. The actual raw bytes from
-// the file will follow this buffer. The offset of the
-// raw bytes from the beginning of this structure is
-// specified in the REQUEST_RAW_ENCRYPTED_DATA structure
-// described above.
-//
-
- PENCRYPTED_DATA_INFO = ^ENCRYPTED_DATA_INFO;
- {$EXTERNALSYM PENCRYPTED_DATA_INFO}
- _ENCRYPTED_DATA_INFO = record
-
- //
- // This is the file offset for the first entry in the
- // data block array. The file system will round
- // the requested start offset down to a boundary
- // that is consistent with the format of the file.
- //
-
- StartingFileOffset: DWORDLONG;
-
- //
- // Data offset in output buffer. The output buffer
- // begins with an ENCRYPTED_DATA_INFO structure.
- // The file system will then store the raw bytes from
- // disk beginning at the following offset within the
- // output buffer.
- //
-
- OutputBufferOffset: DWORD;
-
- //
- // The number of bytes being returned that are within
- // the size of the file. If this value is less than
- // (NumberOfDataBlocks << DataUnitShift), it means the
- // end of the file occurs within this transfer. Any
- // data beyond file size is invalid and was never
- // passed to the encryption driver.
- //
-
- BytesWithinFileSize: DWORD;
-
- //
- // The number of bytes being returned that are below
- // valid data length. If this value is less than
- // (NumberOfDataBlocks << DataUnitShift), it means the
- // end of the valid data occurs within this transfer.
- // After decrypting the data from this transfer, any
- // byte(s) beyond valid data length must be zeroed.
- //
-
- BytesWithinValidDataLength: DWORD;
-
- //
- // Code for the compression format as defined in
- // ntrtl.h. Note that COMPRESSION_FORMAT_NONE
- // and COMPRESSION_FORMAT_DEFAULT are invalid if
- // any of the described chunks are compressed.
- //
-
- CompressionFormat: WORD;
-
- //
- // The DataUnit is the granularity used to access the
- // disk. It will be the same as the compression unit
- // size for a compressed file. For an uncompressed
- // file, it will be some cluster-aligned power of 2 that
- // the file system deems convenient. A caller should
- // not expect that successive calls will have the
- // same data unit shift value as the previous call.
- //
- // Since chunks and compression units are expected to be
- // powers of 2 in size, we express them log2. So, for
- // example (1 << ChunkShift) == ChunkSizeInBytes. The
- // ClusterShift indicates how much space must be saved
- // to successfully compress a compression unit - each
- // successfully compressed data unit must occupy
- // at least one cluster less in bytes than an uncompressed
- // data block unit.
- //
-
- DataUnitShift: BYTE;
- ChunkShift: BYTE;
- ClusterShift: BYTE;
-
- //
- // The format for the encryption.
- //
-
- EncryptionFormat: BYTE;
-
- //
- // This is the number of entries in the data block size
- // array.
- //
-
- NumberOfDataBlocks: WORD;
-
- //
- // This is an array of sizes in the data block array. There
- // must be one entry in this array for each data block
- // read from disk. The size has a different meaning
- // depending on whether the file is compressed.
- //
- // A size of zero always indicates that the final data consists entirely
- // of zeroes. There is no decryption or decompression to
- // perform.
- //
- // If the file is compressed then the data block size indicates
- // whether this block is compressed. A size equal to
- // the block size indicates that the corresponding block did
- // not compress. Any other non-zero size indicates the
- // size of the compressed data which needs to be
- // decrypted/decompressed.
- //
- // If the file is not compressed then the data block size
- // indicates the amount of data within the block that
- // needs to be decrypted. Any other non-zero size indicates
- // that the remaining bytes in the data unit within the file
- // consists of zeros. An example of this is when the
- // the read spans the valid data length of the file. There
- // is no data to decrypt past the valid data length.
- //
-
- DataBlockSize: array [0..ANYSIZE_ARRAY - 1] of DWORD;
- end;
- {$EXTERNALSYM _ENCRYPTED_DATA_INFO}
- ENCRYPTED_DATA_INFO = _ENCRYPTED_DATA_INFO;
- {$EXTERNALSYM ENCRYPTED_DATA_INFO}
- TEncryptedDataInfo = ENCRYPTED_DATA_INFO;
- PEncryptedDataInfo = PENCRYPTED_DATA_INFO;
-
-//
-// FSCTL_READ_FROM_PLEX support
-// Request Plex Read Data structure. This is used to indicate
-// the range of the file to read. It also describes
-// which plex to perform the read from.
-//
-
- _PLEX_READ_DATA_REQUEST = record
-
- //
- // Requested offset and length to read.
- // The offset can be the virtual offset (vbo) in to a file,
- // or a volume. In the case of a file offset,
- // the fsd will round the starting offset down
- // to a file system boundary. It will also
- // round the length up to a file system boundary and
- // enforce any other applicable limits.
- //
-
- ByteOffset: LARGE_INTEGER;
- ByteLength: DWORD;
- PlexNumber: DWORD;
- end;
- {$EXTERNALSYM _PLEX_READ_DATA_REQUEST}
- PLEX_READ_DATA_REQUEST = _PLEX_READ_DATA_REQUEST;
- {$EXTERNALSYM PLEX_READ_DATA_REQUEST}
- PPLEX_READ_DATA_REQUEST = ^PLEX_READ_DATA_REQUEST;
- {$EXTERNALSYM PPLEX_READ_DATA_REQUEST}
- TPlexReadDataRequest = PLEX_READ_DATA_REQUEST;
- PPlexReadDataRequest = PPLEX_READ_DATA_REQUEST;
-
-//
-// FSCTL_SIS_COPYFILE support
-// Source and destination file names are passed in the FileNameBuffer.
-// Both strings are null terminated, with the source name starting at
-// the beginning of FileNameBuffer, and the destination name immediately
-// following. Length fields include terminating nulls.
-//
-
- PSI_COPYFILE = ^SI_COPYFILE;
- {$EXTERNALSYM PSI_COPYFILE}
- _SI_COPYFILE = record
- SourceFileNameLength: DWORD;
- DestinationFileNameLength: DWORD;
- Flags: DWORD;
- FileNameBuffer: array [0..0] of WCHAR;
- end;
- {$EXTERNALSYM _SI_COPYFILE}
- SI_COPYFILE = _SI_COPYFILE;
- {$EXTERNALSYM SI_COPYFILE}
- TSiCopyfile = SI_COPYFILE;
- PSiCopyfile = PSI_COPYFILE;
-
-const
- COPYFILE_SIS_LINK = $0001; // Copy only if source is SIS
- {$EXTERNALSYM COPYFILE_SIS_LINK}
- COPYFILE_SIS_REPLACE = $0002; // Replace destination if it exists, otherwise don't.
- {$EXTERNALSYM COPYFILE_SIS_REPLACE}
- COPYFILE_SIS_FLAGS = $0003;
- {$EXTERNALSYM COPYFILE_SIS_FLAGS}
-
-//
-// These IOCTLs are handled by hard disk volumes.
-//
-
- IOCTL_VOLUME_BASE = DWORD('V');
- {$EXTERNALSYM IOCTL_VOLUME_BASE}
-
- IOCTL_VOLUME_GET_VOLUME_DISK_EXTENTS = (
- (IOCTL_VOLUME_BASE shl 16) or (FILE_ANY_ACCESS shl 14) or
- (0 shl 2) or METHOD_BUFFERED);
- {$EXTERNALSYM IOCTL_VOLUME_GET_VOLUME_DISK_EXTENTS}
-
- IOCTL_VOLUME_IS_CLUSTERED = (
- (IOCTL_VOLUME_BASE shl 16) or (FILE_ANY_ACCESS shl 14) or
- (12 shl 2) or METHOD_BUFFERED);
- {$EXTERNALSYM IOCTL_VOLUME_IS_CLUSTERED}
-
-//
-// Disk extent definition.
-//
-
-type
- PDISK_EXTENT = ^DISK_EXTENT;
- {$EXTERNALSYM PDISK_EXTENT}
- _DISK_EXTENT = record
- DiskNumber: DWORD;
- StartingOffset: LARGE_INTEGER;
- ExtentLength: LARGE_INTEGER;
- end;
- {$EXTERNALSYM _DISK_EXTENT}
- DISK_EXTENT = _DISK_EXTENT;
- {$EXTERNALSYM DISK_EXTENT}
- TDiskExtent = DISK_EXTENT;
- PDiskExtent = PDISK_EXTENT;
-
-//
-// Output structure for IOCTL_VOLUME_GET_VOLUME_DISK_EXTENTS.
-//
-
- PVOLUME_DISK_EXTENTS = ^VOLUME_DISK_EXTENTS;
- {$EXTERNALSYM PVOLUME_DISK_EXTENTS}
- _VOLUME_DISK_EXTENTS = record
- NumberOfDiskExtents: DWORD;
- Extents: array [0..0] of DISK_EXTENT;
- end;
- {$EXTERNALSYM _VOLUME_DISK_EXTENTS}
- VOLUME_DISK_EXTENTS = _VOLUME_DISK_EXTENTS;
- {$EXTERNALSYM VOLUME_DISK_EXTENTS}
- TVolumeDiskExtents = VOLUME_DISK_EXTENTS;
- PVolumeDiskExtents = PVOLUME_DISK_EXTENTS;
-
-implementation
-
-function CTL_CODE(DeviceType, Func, Method, Access: WORD): DWORD;
-begin
- Result := (DeviceType shl 16) or (Access shl 14) or (Func shl 2) or Method;
-end;
-
-function DEVICE_TYPE_FROM_CTL_CODE(CtrlCode: DWORD): WORD;
-begin
- Result := (CtrlCode and DWORD($FFFF0000)) shr 16;
-end;
-
-{
-#define IsRecognizedPartition( PartitionType ) ( \
- ((PartitionType & PARTITION_NTFT) && ((PartitionType & ~0xC0) == PARTITION_FAT_12)) || \
- ((PartitionType & PARTITION_NTFT) && ((PartitionType & ~0xC0) == PARTITION_IFS)) || \
- ((PartitionType & PARTITION_NTFT) && ((PartitionType & ~0xC0) == PARTITION_HUGE)) || \
- ((PartitionType & PARTITION_NTFT) && ((PartitionType & ~0xC0) == PARTITION_FAT32)) || \
- ((PartitionType & PARTITION_NTFT) && ((PartitionType & ~0xC0) == PARTITION_FAT32_XINT13)) || \
- ((PartitionType & PARTITION_NTFT) && ((PartitionType & ~0xC0) == PARTITION_XINT13)) || \
- ((PartitionType) == PARTITION_FAT_12) || \
- ((PartitionType) == PARTITION_FAT_16) || \
- ((PartitionType) == PARTITION_IFS) || \
- ((PartitionType) == PARTITION_HUGE) || \
- ((PartitionType) == PARTITION_FAT32) || \
- ((PartitionType) == PARTITION_FAT32_XINT13) || \
- ((PartitionType) == PARTITION_XINT13) )
-}
-
-function IsRecognizedPartition(PartitionType: DWORD): Boolean;
-begin
- Result :=
- (((PartitionType and PARTITION_NTFT) <> 0) and ((PartitionType and not $C0) = PARTITION_FAT_12)) or
- (((PartitionType and PARTITION_NTFT) <> 0) and ((PartitionType and not $C0) = PARTITION_IFS)) or
- (((PartitionType and PARTITION_NTFT) <> 0) and ((PartitionType and not $C0) = PARTITION_HUGE)) or
- (((PartitionType and PARTITION_NTFT) <> 0) and ((PartitionType and not $C0) = PARTITION_FAT32)) or
- (((PartitionType and PARTITION_NTFT) <> 0) and ((PartitionType and not $C0) = PARTITION_FAT32_XINT13)) or
- (((PartitionType and PARTITION_NTFT) <> 0) and ((PartitionType and not $C0) = PARTITION_XINT13)) or
- ((PartitionType) = PARTITION_FAT_12) or
- ((PartitionType) = PARTITION_FAT_16) or
- ((PartitionType) = PARTITION_IFS) or
- ((PartitionType) = PARTITION_HUGE) or
- ((PartitionType) = PARTITION_FAT32) or
- ((PartitionType) = PARTITION_FAT32_XINT13) or
- ((PartitionType) = PARTITION_XINT13);
-end;
-
-function IsContainerPartition(PartitionType: DWORD): Boolean;
-begin
- Result :=
- (PartitionType = PARTITION_EXTENDED) or
- (PartitionType = PARTITION_XINT13_EXTENDED);
-end;
-
-function IsFTPartition(PartitionType: DWORD): Boolean;
-begin
- Result := ((PartitionType and PARTITION_NTFT) <> 0) and IsRecognizedPartition(PartitionType);
-end;
-
-function DiskGeometryGetPartition(Geometry: PDiskGeometryEx): PDiskPartitionInfo;
-begin
- Result := @Geometry^.Data[0];
-end;
-
-function DiskGeometryGetDetect(Geometry: PDiskGeometryEx): PDiskDetectionInfo;
-var
- Partition: PDiskPartitionInfo;
-begin
- Partition := DiskGeometryGetPartition(Geometry);
- Result := PDiskDetectionInfo(PChar(Partition) + Partition^.SizeOfPartitionInfo*SizeOf(DWORD));
-end;
-
-end.
+{******************************************************************************}
+{ }
+{ I/O Control Codes API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: winioctl.h, released June 2000. The original Pascal }
+{ code is: WinIoCtl.pas, released December 2000. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwawinioctl.pas,v 1.1 2005/04/04 07:56:11 marco Exp $
+
+unit JwaWinIoctl;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "WinIoCtl.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaWinNT, JwaWinType;
+
+//
+// Device interface class GUIDs.
+//
+// need these GUIDs outside conditional includes so that user can
+// #include <winioctl.h> in precompiled header
+// #include <initguid.h> in a single source file
+// #include <winioctl.h> in that source file a second time to instantiate the GUIDs
+//
+
+const
+ GUID_DEVINTERFACE_DISK: TGUID = (
+ D1:$53f56307; D2:$b6bf; D3:$11d0; D4:($94, $f2, $00, $a0, $c9, $1e, $fb, $8b));
+ {$EXTERNALSYM GUID_DEVINTERFACE_DISK}
+ GUID_DEVINTERFACE_CDROM: TGUID = (
+ D1:$53f56308; D2:$b6bf; D3:$11d0; D4:($94, $f2, $00, $a0, $c9, $1e, $fb, $8b));
+ {$EXTERNALSYM GUID_DEVINTERFACE_CDROM}
+ GUID_DEVINTERFACE_PARTITION: TGUID = (
+ D1:$53f5630a; D2:$b6bf; D3:$11d0; D4:($94, $f2, $00, $a0, $c9, $1e, $fb, $8b));
+ {$EXTERNALSYM GUID_DEVINTERFACE_PARTITION}
+ GUID_DEVINTERFACE_TAPE: TGUID = (
+ D1:$53f5630b; D2:$b6bf; D3:$11d0; D4:($94, $f2, $00, $a0, $c9, $1e, $fb, $8b));
+ {$EXTERNALSYM GUID_DEVINTERFACE_TAPE}
+ GUID_DEVINTERFACE_WRITEONCEDISK: TGUID = (
+ D1:$53f5630c; D2:$b6bf; D3:$11d0; D4:($94, $f2, $00, $a0, $c9, $1e, $fb, $8b));
+ {$EXTERNALSYM GUID_DEVINTERFACE_WRITEONCEDISK}
+ GUID_DEVINTERFACE_VOLUME: TGUID = (
+ D1:$53f5630d; D2:$b6bf; D3:$11d0; D4:($94, $f2, $00, $a0, $c9, $1e, $fb, $8b));
+ {$EXTERNALSYM GUID_DEVINTERFACE_VOLUME}
+ GUID_DEVINTERFACE_MEDIUMCHANGER: TGUID = (
+ D1:$53f56310; D2:$b6bf; D3:$11d0; D4:($94, $f2, $00, $a0, $c9, $1e, $fb, $8b));
+ {$EXTERNALSYM GUID_DEVINTERFACE_MEDIUMCHANGER}
+ GUID_DEVINTERFACE_FLOPPY: TGUID = (
+ D1:$53f56311; D2:$b6bf; D3:$11d0; D4:($94, $f2, $00, $a0, $c9, $1e, $fb, $8b));
+ {$EXTERNALSYM GUID_DEVINTERFACE_FLOPPY}
+ GUID_DEVINTERFACE_CDCHANGER: TGUID = (
+ D1:$53f56312; D2:$b6bf; D3:$11d0; D4:($94, $f2, $00, $a0, $c9, $1e, $fb, $8b));
+ {$EXTERNALSYM GUID_DEVINTERFACE_CDCHANGER}
+ GUID_DEVINTERFACE_STORAGEPORT: TGUID = (
+ D1:$2accfe60; D2:$c130; D3:$11d2; D4:($b0, $82, $00, $a0, $c9, $1e, $fb, $8b));
+ {$EXTERNALSYM GUID_DEVINTERFACE_STORAGEPORT}
+ GUID_DEVINTERFACE_COMPORT: TGUID = (
+ D1:$86e0d1e0; D2:$8089; D3:$11d0; D4:($9c, $e4, $08, $00, $3e, $30, $1f, $73));
+ {$EXTERNALSYM GUID_DEVINTERFACE_COMPORT}
+ GUID_DEVINTERFACE_SERENUM_BUS_ENUMERATOR: TGUID = (
+ D1:$4D36E978; D2:$E325; D3:$11CE; D4:($BF, $C1, $08, $00, $2B, $E1, $03, $18));
+ {$EXTERNALSYM GUID_DEVINTERFACE_SERENUM_BUS_ENUMERATOR}
+
+//
+// Obsolete device interface class GUID names.
+// (use of above GUID_DEVINTERFACE_* names is recommended).
+//
+
+ // MVB: Note that these "constants" are in reality aliases for the list above. Unfortunately you can't
+ // define a GUID without using a type constant and you can't alias a type constant in Delphi...
+
+ DiskClassGuid: TGUID = (
+ D1:$53f56307; D2:$b6bf; D3:$11d0; D4:($94, $f2, $00, $a0, $c9, $1e, $fb, $8b));
+ {$EXTERNALSYM DiskClassGuid}
+ CdRomClassGuid: TGUID = (
+ D1:$53f56308; D2:$b6bf; D3:$11d0; D4:($94, $f2, $00, $a0, $c9, $1e, $fb, $8b));
+ {$EXTERNALSYM CdRomClassGuid}
+ PartitionClassGuid: TGUID = (
+ D1:$53f5630a; D2:$b6bf; D3:$11d0; D4:($94, $f2, $00, $a0, $c9, $1e, $fb, $8b));
+ {$EXTERNALSYM PartitionClassGuid}
+ TapeClassGuid: TGUID = (
+ D1:$53f5630b; D2:$b6bf; D3:$11d0; D4:($94, $f2, $00, $a0, $c9, $1e, $fb, $8b));
+ {$EXTERNALSYM TapeClassGuid}
+ WriteOnceDiskClassGuid: TGUID = (
+ D1:$53f5630c; D2:$b6bf; D3:$11d0; D4:($94, $f2, $00, $a0, $c9, $1e, $fb, $8b));
+ {$EXTERNALSYM WriteOnceDiskClassGuid}
+ VolumeClassGuid: TGUID = (
+ D1:$53f5630d; D2:$b6bf; D3:$11d0; D4:($94, $f2, $00, $a0, $c9, $1e, $fb, $8b));
+ {$EXTERNALSYM VolumeClassGuid}
+ MediumChangerClassGuid: TGUID = (
+ D1:$53f56310; D2:$b6bf; D3:$11d0; D4:($94, $f2, $00, $a0, $c9, $1e, $fb, $8b));
+ {$EXTERNALSYM MediumChangerClassGuid}
+ FloppyClassGuid: TGUID = (
+ D1:$53f56311; D2:$b6bf; D3:$11d0; D4:($94, $f2, $00, $a0, $c9, $1e, $fb, $8b));
+ {$EXTERNALSYM FloppyClassGuid}
+ CdChangerClassGuid: TGUID = (
+ D1:$53f56312; D2:$b6bf; D3:$11d0; D4:($94, $f2, $00, $a0, $c9, $1e, $fb, $8b));
+ {$EXTERNALSYM CdChangerClassGuid}
+ StoragePortClassGuid: TGUID = (
+ D1:$2accfe60; D2:$c130; D3:$11d2; D4:($b0, $82, $00, $a0, $c9, $1e, $fb, $8b));
+ {$EXTERNALSYM StoragePortClassGuid}
+ GUID_CLASS_COMPORT: TGUID = (
+ D1:$86e0d1e0; D2:$8089; D3:$11d0; D4:($9c, $e4, $08, $00, $3e, $30, $1f, $73));
+ {$EXTERNALSYM GUID_CLASS_COMPORT}
+ GUID_SERENUM_BUS_ENUMERATOR: TGUID = (
+ D1:$4D36E978; D2:$E325; D3:$11CE; D4:($BF, $C1, $08, $00, $2B, $E1, $03, $18));
+ {$EXTERNALSYM GUID_SERENUM_BUS_ENUMERATOR}
+
+//
+// Define the various device type values. Note that values used by Microsoft
+// Corporation are in the range 0-32767, and 32768-65535 are reserved for use
+// by customers.
+//
+
+type
+ DEVICE_TYPE = DWORD;
+ {$EXTERNALSYM DEVICE_TYPE}
+
+const
+ FILE_DEVICE_BEEP = $00000001;
+ {$EXTERNALSYM FILE_DEVICE_BEEP}
+ FILE_DEVICE_CD_ROM = $00000002;
+ {$EXTERNALSYM FILE_DEVICE_CD_ROM}
+ FILE_DEVICE_CD_ROM_FILE_SYSTEM = $00000003;
+ {$EXTERNALSYM FILE_DEVICE_CD_ROM_FILE_SYSTEM}
+ FILE_DEVICE_CONTROLLER = $00000004;
+ {$EXTERNALSYM FILE_DEVICE_CONTROLLER}
+ FILE_DEVICE_DATALINK = $00000005;
+ {$EXTERNALSYM FILE_DEVICE_DATALINK}
+ FILE_DEVICE_DFS = $00000006;
+ {$EXTERNALSYM FILE_DEVICE_DFS}
+ FILE_DEVICE_DISK = $00000007;
+ {$EXTERNALSYM FILE_DEVICE_DISK}
+ FILE_DEVICE_DISK_FILE_SYSTEM = $00000008;
+ {$EXTERNALSYM FILE_DEVICE_DISK_FILE_SYSTEM}
+ FILE_DEVICE_FILE_SYSTEM = $00000009;
+ {$EXTERNALSYM FILE_DEVICE_FILE_SYSTEM}
+ FILE_DEVICE_INPORT_PORT = $0000000a;
+ {$EXTERNALSYM FILE_DEVICE_INPORT_PORT}
+ FILE_DEVICE_KEYBOARD = $0000000b;
+ {$EXTERNALSYM FILE_DEVICE_KEYBOARD}
+ FILE_DEVICE_MAILSLOT = $0000000c;
+ {$EXTERNALSYM FILE_DEVICE_MAILSLOT}
+ FILE_DEVICE_MIDI_IN = $0000000d;
+ {$EXTERNALSYM FILE_DEVICE_MIDI_IN}
+ FILE_DEVICE_MIDI_OUT = $0000000e;
+ {$EXTERNALSYM FILE_DEVICE_MIDI_OUT}
+ FILE_DEVICE_MOUSE = $0000000f;
+ {$EXTERNALSYM FILE_DEVICE_MOUSE}
+ FILE_DEVICE_MULTI_UNC_PROVIDER = $00000010;
+ {$EXTERNALSYM FILE_DEVICE_MULTI_UNC_PROVIDER}
+ FILE_DEVICE_NAMED_PIPE = $00000011;
+ {$EXTERNALSYM FILE_DEVICE_NAMED_PIPE}
+ FILE_DEVICE_NETWORK = $00000012;
+ {$EXTERNALSYM FILE_DEVICE_NETWORK}
+ FILE_DEVICE_NETWORK_BROWSER = $00000013;
+ {$EXTERNALSYM FILE_DEVICE_NETWORK_BROWSER}
+ FILE_DEVICE_NETWORK_FILE_SYSTEM = $00000014;
+ {$EXTERNALSYM FILE_DEVICE_NETWORK_FILE_SYSTEM}
+ FILE_DEVICE_NULL = $00000015;
+ {$EXTERNALSYM FILE_DEVICE_NULL}
+ FILE_DEVICE_PARALLEL_PORT = $00000016;
+ {$EXTERNALSYM FILE_DEVICE_PARALLEL_PORT}
+ FILE_DEVICE_PHYSICAL_NETCARD = $00000017;
+ {$EXTERNALSYM FILE_DEVICE_PHYSICAL_NETCARD}
+ FILE_DEVICE_PRINTER = $00000018;
+ {$EXTERNALSYM FILE_DEVICE_PRINTER}
+ FILE_DEVICE_SCANNER = $00000019;
+ {$EXTERNALSYM FILE_DEVICE_SCANNER}
+ FILE_DEVICE_SERIAL_MOUSE_PORT = $0000001a;
+ {$EXTERNALSYM FILE_DEVICE_SERIAL_MOUSE_PORT}
+ FILE_DEVICE_SERIAL_PORT = $0000001b;
+ {$EXTERNALSYM FILE_DEVICE_SERIAL_PORT}
+ FILE_DEVICE_SCREEN = $0000001c;
+ {$EXTERNALSYM FILE_DEVICE_SCREEN}
+ FILE_DEVICE_SOUND = $0000001d;
+ {$EXTERNALSYM FILE_DEVICE_SOUND}
+ FILE_DEVICE_STREAMS = $0000001e;
+ {$EXTERNALSYM FILE_DEVICE_STREAMS}
+ FILE_DEVICE_TAPE = $0000001f;
+ {$EXTERNALSYM FILE_DEVICE_TAPE}
+ FILE_DEVICE_TAPE_FILE_SYSTEM = $00000020;
+ {$EXTERNALSYM FILE_DEVICE_TAPE_FILE_SYSTEM}
+ FILE_DEVICE_TRANSPORT = $00000021;
+ {$EXTERNALSYM FILE_DEVICE_TRANSPORT}
+ FILE_DEVICE_UNKNOWN = $00000022;
+ {$EXTERNALSYM FILE_DEVICE_UNKNOWN}
+ FILE_DEVICE_VIDEO = $00000023;
+ {$EXTERNALSYM FILE_DEVICE_VIDEO}
+ FILE_DEVICE_VIRTUAL_DISK = $00000024;
+ {$EXTERNALSYM FILE_DEVICE_VIRTUAL_DISK}
+ FILE_DEVICE_WAVE_IN = $00000025;
+ {$EXTERNALSYM FILE_DEVICE_WAVE_IN}
+ FILE_DEVICE_WAVE_OUT = $00000026;
+ {$EXTERNALSYM FILE_DEVICE_WAVE_OUT}
+ FILE_DEVICE_8042_PORT = $00000027;
+ {$EXTERNALSYM FILE_DEVICE_8042_PORT}
+ FILE_DEVICE_NETWORK_REDIRECTOR = $00000028;
+ {$EXTERNALSYM FILE_DEVICE_NETWORK_REDIRECTOR}
+ FILE_DEVICE_BATTERY = $00000029;
+ {$EXTERNALSYM FILE_DEVICE_BATTERY}
+ FILE_DEVICE_BUS_EXTENDER = $0000002a;
+ {$EXTERNALSYM FILE_DEVICE_BUS_EXTENDER}
+ FILE_DEVICE_MODEM = $0000002b;
+ {$EXTERNALSYM FILE_DEVICE_MODEM}
+ FILE_DEVICE_VDM = $0000002c;
+ {$EXTERNALSYM FILE_DEVICE_VDM}
+ FILE_DEVICE_MASS_STORAGE = $0000002d;
+ {$EXTERNALSYM FILE_DEVICE_MASS_STORAGE}
+ FILE_DEVICE_SMB = $0000002e;
+ {$EXTERNALSYM FILE_DEVICE_SMB}
+ FILE_DEVICE_KS = $0000002f;
+ {$EXTERNALSYM FILE_DEVICE_KS}
+ FILE_DEVICE_CHANGER = $00000030;
+ {$EXTERNALSYM FILE_DEVICE_CHANGER}
+ FILE_DEVICE_SMARTCARD = $00000031;
+ {$EXTERNALSYM FILE_DEVICE_SMARTCARD}
+ FILE_DEVICE_ACPI = $00000032;
+ {$EXTERNALSYM FILE_DEVICE_ACPI}
+ FILE_DEVICE_DVD = $00000033;
+ {$EXTERNALSYM FILE_DEVICE_DVD}
+ FILE_DEVICE_FULLSCREEN_VIDEO = $00000034;
+ {$EXTERNALSYM FILE_DEVICE_FULLSCREEN_VIDEO}
+ FILE_DEVICE_DFS_FILE_SYSTEM = $00000035;
+ {$EXTERNALSYM FILE_DEVICE_DFS_FILE_SYSTEM}
+ FILE_DEVICE_DFS_VOLUME = $00000036;
+ {$EXTERNALSYM FILE_DEVICE_DFS_VOLUME}
+ FILE_DEVICE_SERENUM = $00000037;
+ {$EXTERNALSYM FILE_DEVICE_SERENUM}
+ FILE_DEVICE_TERMSRV = $00000038;
+ {$EXTERNALSYM FILE_DEVICE_TERMSRV}
+ FILE_DEVICE_KSEC = $00000039;
+ {$EXTERNALSYM FILE_DEVICE_KSEC}
+ FILE_DEVICE_FIPS = $0000003A;
+ {$EXTERNALSYM FILE_DEVICE_FIPS}
+ FILE_DEVICE_INFINIBAND = $0000003B;
+ {$EXTERNALSYM FILE_DEVICE_INFINIBAND}
+
+//
+// Macro definition for defining IOCTL and FSCTL function control codes. Note
+// that function codes 0-2047 are reserved for Microsoft Corporation, and
+// 2048-4095 are reserved for customers.
+//
+
+function CTL_CODE(DeviceType, Func, Method, Access: WORD): DWORD;
+{$EXTERNALSYM CTL_CODE}
+
+//
+// Macro to extract device type out of the device io control code
+//
+
+function DEVICE_TYPE_FROM_CTL_CODE(CtrlCode: DWORD): WORD;
+{$EXTERNALSYM DEVICE_TYPE_FROM_CTL_CODE}
+
+//
+// Define the method codes for how buffers are passed for I/O and FS controls
+//
+
+const
+ METHOD_BUFFERED = 0;
+ {$EXTERNALSYM METHOD_BUFFERED}
+ METHOD_IN_DIRECT = 1;
+ {$EXTERNALSYM METHOD_IN_DIRECT}
+ METHOD_OUT_DIRECT = 2;
+ {$EXTERNALSYM METHOD_OUT_DIRECT}
+ METHOD_NEITHER = 3;
+ {$EXTERNALSYM METHOD_NEITHER}
+
+//
+// Define some easier to comprehend aliases:
+// METHOD_DIRECT_TO_HARDWARE (writes, aka METHOD_IN_DIRECT)
+// METHOD_DIRECT_FROM_HARDWARE (reads, aka METHOD_OUT_DIRECT)
+//
+
+ METHOD_DIRECT_TO_HARDWARE = METHOD_IN_DIRECT;
+ {$EXTERNALSYM METHOD_DIRECT_TO_HARDWARE}
+ METHOD_DIRECT_FROM_HARDWARE = METHOD_OUT_DIRECT;
+ {$EXTERNALSYM METHOD_DIRECT_FROM_HARDWARE}
+
+//
+// Define the access check value for any access
+//
+//
+// The FILE_READ_ACCESS and FILE_WRITE_ACCESS constants are also defined in
+// ntioapi.h as FILE_READ_DATA and FILE_WRITE_DATA. The values for these
+// constants *MUST* always be in sync.
+//
+//
+// FILE_SPECIAL_ACCESS is checked by the NT I/O system the same as FILE_ANY_ACCESS.
+// The file systems, however, may add additional access checks for I/O and FS controls
+// that use this value.
+//
+
+const
+ FILE_ANY_ACCESS = 0;
+ {$EXTERNALSYM FILE_ANY_ACCESS}
+ FILE_SPECIAL_ACCESS = FILE_ANY_ACCESS;
+ {$EXTERNALSYM FILE_SPECIAL_ACCESS}
+ FILE_READ_ACCESS = $0001; // file & pipe
+ {$EXTERNALSYM FILE_READ_ACCESS}
+ FILE_WRITE_ACCESS = $0002; // file & pipe
+ {$EXTERNALSYM FILE_WRITE_ACCESS}
+
+//
+// IoControlCode values for storage devices
+//
+
+ IOCTL_STORAGE_BASE = FILE_DEVICE_MASS_STORAGE;
+ {$EXTERNALSYM IOCTL_STORAGE_BASE}
+
+//
+// The following device control codes are common for all class drivers. They
+// should be used in place of the older IOCTL_DISK, IOCTL_CDROM and IOCTL_TAPE
+// common codes
+//
+
+const
+ IOCTL_STORAGE_CHECK_VERIFY = (
+ (IOCTL_STORAGE_BASE shl 16) or (FILE_READ_ACCESS shl 14) or
+ ($0200 shl 2) or METHOD_BUFFERED);
+ {$EXTERNALSYM IOCTL_STORAGE_CHECK_VERIFY}
+ IOCTL_STORAGE_CHECK_VERIFY2 = (
+ (IOCTL_STORAGE_BASE shl 16) or (FILE_ANY_ACCESS shl 14) or
+ ($0200 shl 2) or METHOD_BUFFERED);
+ {$EXTERNALSYM IOCTL_STORAGE_CHECK_VERIFY2}
+ IOCTL_STORAGE_MEDIA_REMOVAL = (
+ (IOCTL_STORAGE_BASE shl 16) or (FILE_READ_ACCESS shl 14) or
+ ($0201 shl 2) or METHOD_BUFFERED);
+ {$EXTERNALSYM IOCTL_STORAGE_MEDIA_REMOVAL}
+ IOCTL_STORAGE_EJECT_MEDIA = (
+ (IOCTL_STORAGE_BASE shl 16) or (FILE_READ_ACCESS shl 14) or
+ ($0202 shl 2) or METHOD_BUFFERED);
+ {$EXTERNALSYM IOCTL_STORAGE_EJECT_MEDIA}
+ IOCTL_STORAGE_LOAD_MEDIA = (
+ (IOCTL_STORAGE_BASE shl 16) or (FILE_READ_ACCESS shl 14) or
+ ($0203 shl 2) or METHOD_BUFFERED);
+ {$EXTERNALSYM IOCTL_STORAGE_LOAD_MEDIA}
+ IOCTL_STORAGE_LOAD_MEDIA2 = (
+ (IOCTL_STORAGE_BASE shl 16) or (FILE_ANY_ACCESS shl 14) or
+ ($0203 shl 2) or METHOD_BUFFERED);
+ {$EXTERNALSYM IOCTL_STORAGE_LOAD_MEDIA2}
+ IOCTL_STORAGE_RESERVE = (
+ (IOCTL_STORAGE_BASE shl 16) or (FILE_READ_ACCESS shl 14) or
+ ($0204 shl 2) or METHOD_BUFFERED);
+ {$EXTERNALSYM IOCTL_STORAGE_RESERVE}
+ IOCTL_STORAGE_RELEASE = (
+ (IOCTL_STORAGE_BASE shl 16) or (FILE_READ_ACCESS shl 14) or
+ ($0205 shl 2) or METHOD_BUFFERED);
+ {$EXTERNALSYM IOCTL_STORAGE_RELEASE}
+ IOCTL_STORAGE_FIND_NEW_DEVICES = (
+ (IOCTL_STORAGE_BASE shl 16) or (FILE_READ_ACCESS shl 14) or
+ ($0206 shl 2) or METHOD_BUFFERED);
+ {$EXTERNALSYM IOCTL_STORAGE_FIND_NEW_DEVICES}
+
+ IOCTL_STORAGE_EJECTION_CONTROL = (
+ (IOCTL_STORAGE_BASE shl 16) or (FILE_ANY_ACCESS shl 14) or
+ ($0250 shl 2) or METHOD_BUFFERED);
+ {$EXTERNALSYM IOCTL_STORAGE_EJECTION_CONTROL}
+ IOCTL_STORAGE_MCN_CONTROL = (
+ (IOCTL_STORAGE_BASE shl 16) or (FILE_ANY_ACCESS shl 14) or
+ ($0251 shl 2) or METHOD_BUFFERED);
+ {$EXTERNALSYM IOCTL_STORAGE_MCN_CONTROL}
+
+ IOCTL_STORAGE_GET_MEDIA_TYPES = (
+ (IOCTL_STORAGE_BASE shl 16) or (FILE_ANY_ACCESS shl 14) or
+ ($0300 shl 2) or METHOD_BUFFERED);
+ {$EXTERNALSYM IOCTL_STORAGE_GET_MEDIA_TYPES}
+ IOCTL_STORAGE_GET_MEDIA_TYPES_EX = (
+ (IOCTL_STORAGE_BASE shl 16) or (FILE_ANY_ACCESS shl 14) or
+ ($0301 shl 2) or METHOD_BUFFERED);
+ {$EXTERNALSYM IOCTL_STORAGE_GET_MEDIA_TYPES_EX}
+ IOCTL_STORAGE_GET_MEDIA_SERIAL_NUMBER = (
+ (IOCTL_STORAGE_BASE shl 16) or (FILE_ANY_ACCESS shl 14) or
+ ($0304 shl 2) or METHOD_BUFFERED);
+ {$EXTERNALSYM IOCTL_STORAGE_GET_MEDIA_SERIAL_NUMBER}
+ IOCTL_STORAGE_GET_HOTPLUG_INFO = (
+ (IOCTL_STORAGE_BASE shl 16) or (FILE_ANY_ACCESS shl 14) or
+ ($0305 shl 2) or METHOD_BUFFERED);
+ {$EXTERNALSYM IOCTL_STORAGE_GET_HOTPLUG_INFO}
+ IOCTL_STORAGE_SET_HOTPLUG_INFO = (
+ (IOCTL_STORAGE_BASE shl 16) or ((FILE_READ_ACCESS or FILE_WRITE_ACCESS) shl 14) or
+ ($0306 shl 2) or METHOD_BUFFERED);
+ {$EXTERNALSYM IOCTL_STORAGE_SET_HOTPLUG_INFO}
+
+ IOCTL_STORAGE_RESET_BUS = (
+ (IOCTL_STORAGE_BASE shl 16) or (FILE_READ_ACCESS shl 14) or
+ ($0400 shl 2) or METHOD_BUFFERED);
+ {$EXTERNALSYM IOCTL_STORAGE_RESET_BUS}
+ IOCTL_STORAGE_RESET_DEVICE = (
+ (IOCTL_STORAGE_BASE shl 16) or (FILE_READ_ACCESS shl 14) or
+ ($0401 shl 2) or METHOD_BUFFERED);
+ {$EXTERNALSYM IOCTL_STORAGE_RESET_DEVICE}
+ IOCTL_STORAGE_BREAK_RESERVATION = (
+ (IOCTL_STORAGE_BASE shl 16) or (FILE_READ_ACCESS shl 14) or
+ ($0405 shl 2) or METHOD_BUFFERED);
+ {$EXTERNALSYM IOCTL_STORAGE_BREAK_RESERVATION}
+
+ IOCTL_STORAGE_GET_DEVICE_NUMBER = (
+ (IOCTL_STORAGE_BASE shl 16) or (FILE_ANY_ACCESS shl 14) or
+ ($0420 shl 2) or METHOD_BUFFERED);
+ {$EXTERNALSYM IOCTL_STORAGE_GET_DEVICE_NUMBER}
+
+ IOCTL_STORAGE_PREDICT_FAILURE = (
+ (IOCTL_STORAGE_BASE shl 16) or (FILE_ANY_ACCESS shl 14) or
+ ($0440 shl 2) or METHOD_BUFFERED);
+ {$EXTERNALSYM IOCTL_STORAGE_PREDICT_FAILURE}
+
+//
+// These ioctl codes are obsolete. They are defined here to avoid resuing them
+// and to allow class drivers to respond to them more easily.
+//
+
+ OBSOLETE_IOCTL_STORAGE_RESET_BUS = (
+ (IOCTL_STORAGE_BASE shl 16) or ((FILE_READ_ACCESS or FILE_WRITE_ACCESS) shl 14) or
+ ($0400 shl 2) or METHOD_BUFFERED);
+ {$EXTERNALSYM OBSOLETE_IOCTL_STORAGE_RESET_BUS}
+
+ OBSOLETE_IOCTL_STORAGE_RESET_DEVICE = (
+ (IOCTL_STORAGE_BASE shl 16) or ((FILE_READ_ACCESS or FILE_WRITE_ACCESS) shl 14) or
+ ($0401 shl 2) or METHOD_BUFFERED);
+ {$EXTERNALSYM OBSOLETE_IOCTL_STORAGE_RESET_DEVICE}
+
+//
+// IOCTL_STORAGE_GET_HOTPLUG_INFO
+//
+
+type
+ PSTORAGE_HOTPLUG_INFO = ^STORAGE_HOTPLUG_INFO;
+ {$EXTERNALSYM PSTORAGE_HOTPLUG_INFO}
+ _STORAGE_HOTPLUG_INFO = record
+ Size: DWORD; // version
+ MediaRemovable: BOOLEAN; // ie. zip, jaz, cdrom, mo, etc. vs hdd
+ MediaHotplug: BOOLEAN; // ie. does the device succeed a lock even though its not lockable media?
+ DeviceHotplug: BOOLEAN; // ie. 1394, USB, etc.
+ WriteCacheEnableOverride: BOOLEAN; // This field should not be relied upon because it is no longer used
+ end;
+ {$EXTERNALSYM _STORAGE_HOTPLUG_INFO}
+ STORAGE_HOTPLUG_INFO = _STORAGE_HOTPLUG_INFO;
+ {$EXTERNALSYM STORAGE_HOTPLUG_INFO}
+ TStorageHotplugInfo = STORAGE_HOTPLUG_INFO;
+ PStorageHotplugInfo = PSTORAGE_HOTPLUG_INFO;
+
+//
+// IOCTL_STORAGE_GET_DEVICE_NUMBER
+//
+// input - none
+//
+// output - STORAGE_DEVICE_NUMBER structure
+// The values in the STORAGE_DEVICE_NUMBER structure are guaranteed
+// to remain unchanged until the system is rebooted. They are not
+// guaranteed to be persistant across boots.
+//
+
+type
+ PSTORAGE_DEVICE_NUMBER = ^STORAGE_DEVICE_NUMBER;
+ {$EXTERNALSYM PSTORAGE_DEVICE_NUMBER}
+ _STORAGE_DEVICE_NUMBER = record
+ //
+ // The FILE_DEVICE_XXX type for this device.
+ //
+ DeviceType: DEVICE_TYPE;
+ //
+ // The number of this device
+ //
+ DeviceNumber: DWORD;
+ //
+ // If the device is partitionable, the partition number of the device.
+ // Otherwise -1
+ //
+ PartitionNumber: DWORD;
+ end;
+ {$EXTERNALSYM _STORAGE_DEVICE_NUMBER}
+ STORAGE_DEVICE_NUMBER = _STORAGE_DEVICE_NUMBER;
+ {$EXTERNALSYM STORAGE_DEVICE_NUMBER}
+ TStorageDeviceNumber = STORAGE_DEVICE_NUMBER;
+ PStorageDeviceNumber = PSTORAGE_DEVICE_NUMBER;
+
+//
+// Define the structures for scsi resets
+//
+
+ PSTORAGE_BUS_RESET_REQUEST = ^STORAGE_BUS_RESET_REQUEST;
+ {$EXTERNALSYM PSTORAGE_BUS_RESET_REQUEST}
+ _STORAGE_BUS_RESET_REQUEST = record
+ PathId: BYTE;
+ end;
+ {$EXTERNALSYM _STORAGE_BUS_RESET_REQUEST}
+ STORAGE_BUS_RESET_REQUEST = _STORAGE_BUS_RESET_REQUEST;
+ {$EXTERNALSYM STORAGE_BUS_RESET_REQUEST}
+ TStorageBusResetRequest = STORAGE_BUS_RESET_REQUEST;
+ PStorageBusResetRequest = PSTORAGE_BUS_RESET_REQUEST;
+
+//
+// Break reservation is sent to the Adapter/FDO with the given lun information.
+//
+
+ STORAGE_BREAK_RESERVATION_REQUEST = record
+ Length: DWORD;
+ _unused: Byte;
+ PathId: Byte;
+ TargetId: Byte;
+ Lun: Byte;
+ end;
+ {$EXTERNALSYM STORAGE_BREAK_RESERVATION_REQUEST}
+ PSTORAGE_BREAK_RESERVATION_REQUEST = ^STORAGE_BREAK_RESERVATION_REQUEST;
+ {$EXTERNALSYM PSTORAGE_BREAK_RESERVATION_REQUEST}
+ TStorageBreakReservationRequest = STORAGE_BREAK_RESERVATION_REQUEST;
+ PStorageBreakReservationRequest = PSTORAGE_BREAK_RESERVATION_REQUEST;
+
+//
+// IOCTL_STORAGE_MEDIA_REMOVAL disables the mechanism
+// on a storage device that ejects media. This function
+// may or may not be supported on storage devices that
+// support removable media.
+//
+// TRUE means prevent media from being removed.
+// FALSE means allow media removal.
+//
+
+ PPREVENT_MEDIA_REMOVAL = ^PREVENT_MEDIA_REMOVAL;
+ {$EXTERNALSYM PPREVENT_MEDIA_REMOVAL}
+ _PREVENT_MEDIA_REMOVAL = record
+ PreventMediaRemoval: ByteBool;
+ end;
+ {$EXTERNALSYM _PREVENT_MEDIA_REMOVAL}
+ PREVENT_MEDIA_REMOVAL = _PREVENT_MEDIA_REMOVAL;
+ {$EXTERNALSYM PREVENT_MEDIA_REMOVAL}
+ TPreventMediaRemoval = PREVENT_MEDIA_REMOVAL;
+ PPreventMediaRemoval = PPREVENT_MEDIA_REMOVAL;
+
+//
+// This is the format of TARGET_DEVICE_CUSTOM_NOTIFICATION.CustomDataBuffer
+// passed to applications by the classpnp autorun code (via IoReportTargetDeviceChangeAsynchronous).
+//
+
+ _CLASS_MEDIA_CHANGE_CONTEXT = record
+ MediaChangeCount: DWORD;
+ NewState: DWORD; // see MEDIA_CHANGE_DETECTION_STATE enum in classpnp.h in DDK
+ end;
+ {$EXTERNALSYM _CLASS_MEDIA_CHANGE_CONTEXT}
+ CLASS_MEDIA_CHANGE_CONTEXT = _CLASS_MEDIA_CHANGE_CONTEXT;
+ {$EXTERNALSYM CLASS_MEDIA_CHANGE_CONTEXT}
+ PCLASS_MEDIA_CHANGE_CONTEXT = ^CLASS_MEDIA_CHANGE_CONTEXT;
+ {$EXTERNALSYM PCLASS_MEDIA_CHANGE_CONTEXT}
+ TClassMediaChangeContext = CLASS_MEDIA_CHANGE_CONTEXT;
+ PClassMediaChangeContext = PCLASS_MEDIA_CHANGE_CONTEXT;
+
+ PTAPE_STATISTICS = ^TAPE_STATISTICS;
+ {$EXTERNALSYM PTAPE_STATISTICS}
+ _TAPE_STATISTICS = record
+ Version: DWORD;
+ Flags: DWORD;
+ RecoveredWrites: LARGE_INTEGER;
+ UnrecoveredWrites: LARGE_INTEGER;
+ RecoveredReads: LARGE_INTEGER;
+ UnrecoveredReads: LARGE_INTEGER;
+ CompressionRatioReads: BYTE;
+ CompressionRatioWrites: BYTE;
+ end;
+ {$EXTERNALSYM _TAPE_STATISTICS}
+ TAPE_STATISTICS = _TAPE_STATISTICS;
+ {$EXTERNALSYM TAPE_STATISTICS}
+ TTapeStatistics = TAPE_STATISTICS;
+ PTapeStatistics = PTAPE_STATISTICS;
+
+const
+ RECOVERED_WRITES_VALID = $00000001;
+ {$EXTERNALSYM RECOVERED_WRITES_VALID}
+ UNRECOVERED_WRITES_VALID = $00000002;
+ {$EXTERNALSYM UNRECOVERED_WRITES_VALID}
+ RECOVERED_READS_VALID = $00000004;
+ {$EXTERNALSYM RECOVERED_READS_VALID}
+ UNRECOVERED_READS_VALID = $00000008;
+ {$EXTERNALSYM UNRECOVERED_READS_VALID}
+ WRITE_COMPRESSION_INFO_VALID = $00000010;
+ {$EXTERNALSYM WRITE_COMPRESSION_INFO_VALID}
+ READ_COMPRESSION_INFO_VALID = $00000020;
+ {$EXTERNALSYM READ_COMPRESSION_INFO_VALID}
+
+type
+ PTAPE_GET_STATISTICS = ^TAPE_GET_STATISTICS;
+ {$EXTERNALSYM PTAPE_GET_STATISTICS}
+ _TAPE_GET_STATISTICS = record
+ Operation: DWORD;
+ end;
+ {$EXTERNALSYM _TAPE_GET_STATISTICS}
+ TAPE_GET_STATISTICS = _TAPE_GET_STATISTICS;
+ {$EXTERNALSYM TAPE_GET_STATISTICS}
+ TTapeGetStatistics = TAPE_GET_STATISTICS;
+ PTapeGetStatistics = PTAPE_GET_STATISTICS;
+
+const
+ TAPE_RETURN_STATISTICS = 0;
+ {$EXTERNALSYM TAPE_RETURN_STATISTICS}
+ TAPE_RETURN_ENV_INFO = 1;
+ {$EXTERNALSYM TAPE_RETURN_ENV_INFO}
+ TAPE_RESET_STATISTICS = 2;
+ {$EXTERNALSYM TAPE_RESET_STATISTICS}
+
+//
+// IOCTL_STORAGE_GET_MEDIA_TYPES_EX will return an array of DEVICE_MEDIA_INFO
+// structures, one per supported type, embedded in the GET_MEDIA_TYPES struct.
+//
+
+const
+
+ //
+ // Following are defined in ntdddisk.h in the MEDIA_TYPE enum
+ //
+ // Unknown, // Format is unknown
+ // F5_1Pt2_512, // 5.25", 1.2MB, 512 bytes/sector
+ // F3_1Pt44_512, // 3.5", 1.44MB, 512 bytes/sector
+ // F3_2Pt88_512, // 3.5", 2.88MB, 512 bytes/sector
+ // F3_20Pt8_512, // 3.5", 20.8MB, 512 bytes/sector
+ // F3_720_512, // 3.5", 720KB, 512 bytes/sector
+ // F5_360_512, // 5.25", 360KB, 512 bytes/sector
+ // F5_320_512, // 5.25", 320KB, 512 bytes/sector
+ // F5_320_1024, // 5.25", 320KB, 1024 bytes/sector
+ // F5_180_512, // 5.25", 180KB, 512 bytes/sector
+ // F5_160_512, // 5.25", 160KB, 512 bytes/sector
+ // RemovableMedia, // Removable media other than floppy
+ // FixedMedia, // Fixed hard disk media
+ // F3_120M_512, // 3.5", 120M Floppy
+ // F3_640_512, // 3.5" , 640KB, 512 bytes/sector
+ // F5_640_512, // 5.25", 640KB, 512 bytes/sector
+ // F5_720_512, // 5.25", 720KB, 512 bytes/sector
+ // F3_1Pt2_512, // 3.5" , 1.2Mb, 512 bytes/sector
+ // F3_1Pt23_1024, // 3.5" , 1.23Mb, 1024 bytes/sector
+ // F5_1Pt23_1024, // 5.25", 1.23MB, 1024 bytes/sector
+ // F3_128Mb_512, // 3.5" MO 128Mb 512 bytes/sector
+ // F3_230Mb_512, // 3.5" MO 230Mb 512 bytes/sector
+ // F8_256_128, // 8", 256KB, 128 bytes/sector
+ // F3_200Mb_512, // 3.5", 200M Floppy (HiFD)
+ //
+
+ DDS_4mm = $20; // Tape - DAT DDS1,2,... (all vendors)
+ MiniQic = $21; // Tape - miniQIC Tape
+ Travan = $22; // Tape - Travan TR-1,2,3,...
+ QIC = $23; // Tape - QIC
+ MP_8mm = $24; // Tape - 8mm Exabyte Metal Particle
+ AME_8mm = $25; // Tape - 8mm Exabyte Advanced Metal Evap
+ AIT1_8mm = $26; // Tape - 8mm Sony AIT
+ DLT = $27; // Tape - DLT Compact IIIxt, IV
+ NCTP = $28; // Tape - Philips NCTP
+ IBM_3480 = $29; // Tape - IBM 3480
+ IBM_3490E = $2A; // Tape - IBM 3490E
+ IBM_Magstar_3590 = $2B; // Tape - IBM Magstar 3590
+ IBM_Magstar_MP = $2C; // Tape - IBM Magstar MP
+ STK_DATA_D3 = $2D; // Tape - STK Data D3
+ SONY_DTF = $2E; // Tape - Sony DTF
+ DV_6mm = $2F; // Tape - 6mm Digital Video
+ DMI = $30; // Tape - Exabyte DMI and compatibles
+ SONY_D2 = $31; // Tape - Sony D2S and D2L
+ CLEANER_CARTRIDGE = $32; // Cleaner - All Drive types that support Drive Cleaners
+ CD_ROM = $33; // Opt_Disk - CD
+ CD_R = $34; // Opt_Disk - CD-Recordable (Write Once)
+ CD_RW = $35; // Opt_Disk - CD-Rewriteable
+ DVD_ROM = $36; // Opt_Disk - DVD-ROM
+ DVD_R = $37; // Opt_Disk - DVD-Recordable (Write Once)
+ DVD_RW = $38; // Opt_Disk - DVD-Rewriteable
+ MO_3_RW = $39; // Opt_Disk - 3.5" Rewriteable MO Disk
+ MO_5_WO = $3A; // Opt_Disk - MO 5.25" Write Once
+ MO_5_RW = $3B; // Opt_Disk - MO 5.25" Rewriteable (not LIMDOW)
+ MO_5_LIMDOW = $3C; // Opt_Disk - MO 5.25" Rewriteable (LIMDOW)
+ PC_5_WO = $3D; // Opt_Disk - Phase Change 5.25" Write Once Optical
+ PC_5_RW = $3E; // Opt_Disk - Phase Change 5.25" Rewriteable
+ PD_5_RW = $3F; // Opt_Disk - PhaseChange Dual Rewriteable
+ ABL_5_WO = $40; // Opt_Disk - Ablative 5.25" Write Once Optical
+ PINNACLE_APEX_5_RW = $41; // Opt_Disk - Pinnacle Apex 4.6GB Rewriteable Optical
+ SONY_12_WO = $42; // Opt_Disk - Sony 12" Write Once
+ PHILIPS_12_WO = $43; // Opt_Disk - Philips/LMS 12" Write Once
+ HITACHI_12_WO = $44; // Opt_Disk - Hitachi 12" Write Once
+ CYGNET_12_WO = $45; // Opt_Disk - Cygnet/ATG 12" Write Once
+ KODAK_14_WO = $46; // Opt_Disk - Kodak 14" Write Once
+ MO_NFR_525 = $47; // Opt_Disk - Near Field Recording (Terastor)
+ NIKON_12_RW = $48; // Opt_Disk - Nikon 12" Rewriteable
+ IOMEGA_ZIP = $49; // Mag_Disk - Iomega Zip
+ IOMEGA_JAZ = $4A; // Mag_Disk - Iomega Jaz
+ SYQUEST_EZ135 = $4B; // Mag_Disk - Syquest EZ135
+ SYQUEST_EZFLYER = $4C; // Mag_Disk - Syquest EzFlyer
+ SYQUEST_SYJET = $4D; // Mag_Disk - Syquest SyJet
+ AVATAR_F2 = $4E; // Mag_Disk - 2.5" Floppy
+ MP2_8mm = $4F; // Tape - 8mm Hitachi
+ DST_S = $50; // Ampex DST Small Tapes
+ DST_M = $51; // Ampex DST Medium Tapes
+ DST_L = $52; // Ampex DST Large Tapes
+ VXATape_1 = $53; // Ecrix 8mm Tape
+ VXATape_2 = $54; // Ecrix 8mm Tape
+ STK_9840 = $55; // STK 9840
+ LTO_Ultrium = $56; // IBM, HP, Seagate LTO Ultrium
+ LTO_Accelis = $57; // IBM, HP, Seagate LTO Accelis
+ DVD_RAM = $58; // Opt_Disk - DVD-RAM
+ AIT_8mm = $59; // AIT2 or higher
+ ADR_1 = $5A; // OnStream ADR Mediatypes
+ ADR_2 = $5B;
+ STK_9940 = $5C; // STK 9940
+
+type
+ STORAGE_MEDIA_TYPE = DWORD;
+ {$EXTERNALSYM STORAGE_MEDIA_TYPE}
+ PSTORAGE_MEDIA_TYPE = ^STORAGE_MEDIA_TYPE;
+ {$EXTERNALSYM PSTORAGE_MEDIA_TYPE}
+ TStorageMediaType = STORAGE_MEDIA_TYPE;
+ PStorageMediaType = ^TStorageMediaType;
+
+const
+ MEDIA_ERASEABLE = $00000001;
+ {$EXTERNALSYM MEDIA_ERASEABLE}
+ MEDIA_WRITE_ONCE = $00000002;
+ {$EXTERNALSYM MEDIA_WRITE_ONCE}
+ MEDIA_READ_ONLY = $00000004;
+ {$EXTERNALSYM MEDIA_READ_ONLY}
+ MEDIA_READ_WRITE = $00000008;
+ {$EXTERNALSYM MEDIA_READ_WRITE}
+
+ MEDIA_WRITE_PROTECTED = $00000100;
+ {$EXTERNALSYM MEDIA_WRITE_PROTECTED}
+ MEDIA_CURRENTLY_MOUNTED = DWORD($80000000);
+ {$EXTERNALSYM MEDIA_CURRENTLY_MOUNTED}
+
+//
+// Define the different storage bus types
+// Bus types below 128 (0x80) are reserved for Microsoft use
+//
+
+const
+ BusTypeUnknown = 0;
+ BusTypeScsi = 1;
+ BusTypeAtapi = 2;
+ BusTypeAta = 3;
+ BusType1394 = 4;
+ BusTypeSsa = 5;
+ BusTypeFibre = 6;
+ BusTypeUsb = 7;
+ BusTypeRAID = 8;
+ BusTypeMaxReserved = $7F;
+
+type
+ STORAGE_BUS_TYPE = DWORD;
+ {$EXTERNALSYM STORAGE_BUS_TYPE}
+ PSTORAGE_BUS_TYPE = ^STORAGE_BUS_TYPE;
+ {$EXTERNALSYM PSTORAGE_BUS_TYPE}
+ TStorageBusType = STORAGE_BUS_TYPE;
+ PStorageBusType = PSTORAGE_BUS_TYPE;
+
+ TDMIDiskInfo = record
+ Cylinders: LARGE_INTEGER;
+ MediaType: STORAGE_MEDIA_TYPE;
+ TracksPerCylinder: DWORD;
+ SectorsPerTrack: DWORD;
+ BytesPerSector: DWORD;
+ NumberMediaSides: DWORD;
+ MediaCharacteristics: DWORD; // Bitmask of MEDIA_XXX values.
+ end;
+
+ TDMIRemovableDiskInfo = record
+ Cylinders: LARGE_INTEGER;
+ MediaType: STORAGE_MEDIA_TYPE;
+ TracksPerCylinder: DWORD;
+ SectorsPerTrack: DWORD;
+ BytesPerSector: DWORD;
+ NumberMediaSides: DWORD;
+ MediaCharacteristics: DWORD; // Bitmask of MEDIA_XXX values.
+ end;
+
+ TDMITapeInfo = record
+ MediaType: STORAGE_MEDIA_TYPE;
+ MediaCharacteristics: DWORD; // Bitmask of MEDIA_XXX values.
+ CurrentBlockSize: DWORD;
+ BusType: STORAGE_BUS_TYPE;
+ //
+ // Bus specific information describing the medium supported.
+ //
+ case Integer of {BusSpecificData}
+ 0: ( {ScsiInformation}
+ MediumType: BYTE;
+ DensityCode: BYTE);
+ end;
+
+ PDEVICE_MEDIA_INFO = ^DEVICE_MEDIA_INFO;
+ {$EXTERNALSYM PDEVICE_MEDIA_INFO}
+ _DEVICE_MEDIA_INFO = record
+ case Integer of
+ 0: (DiskInfo: TDMIDiskInfo);
+ 1: (RemovableDiskInfo: TDMIRemovableDiskInfo);
+ 2: (TapeInfo: TDMITapeInfo);
+ end;
+ {$EXTERNALSYM _DEVICE_MEDIA_INFO}
+ DEVICE_MEDIA_INFO = _DEVICE_MEDIA_INFO;
+ {$EXTERNALSYM DEVICE_MEDIA_INFO}
+ TDeviceMediaInfo = DEVICE_MEDIA_INFO;
+ PDeviceMediaInfo = PDEVICE_MEDIA_INFO;
+
+ PGET_MEDIA_TYPES = ^GET_MEDIA_TYPES;
+ {$EXTERNALSYM PGET_MEDIA_TYPES}
+ _GET_MEDIA_TYPES = record
+ DeviceType: DWORD; // FILE_DEVICE_XXX values
+ MediaInfoCount: DWORD;
+ MediaInfo: array [0..0] of DEVICE_MEDIA_INFO;
+ end;
+ {$EXTERNALSYM _GET_MEDIA_TYPES}
+ GET_MEDIA_TYPES = _GET_MEDIA_TYPES;
+ {$EXTERNALSYM GET_MEDIA_TYPES}
+ TGetMediaTypes = GET_MEDIA_TYPES;
+ PGetMediaTypes = PGET_MEDIA_TYPES;
+
+//
+// IOCTL_STORAGE_PREDICT_FAILURE
+//
+// input - none
+//
+// output - STORAGE_PREDICT_FAILURE structure
+// PredictFailure returns zero if no failure predicted and non zero
+// if a failure is predicted.
+//
+// VendorSpecific returns 512 bytes of vendor specific information
+// if a failure is predicted
+//
+
+ PSTORAGE_PREDICT_FAILURE = ^STORAGE_PREDICT_FAILURE;
+ {$EXTERNALSYM PSTORAGE_PREDICT_FAILURE}
+ _STORAGE_PREDICT_FAILURE = record
+ PredictFailure: DWORD;
+ VendorSpecific: array [0..511] of BYTE;
+ end;
+ {$EXTERNALSYM _STORAGE_PREDICT_FAILURE}
+ STORAGE_PREDICT_FAILURE = _STORAGE_PREDICT_FAILURE;
+ {$EXTERNALSYM STORAGE_PREDICT_FAILURE}
+ TStoragePredictFailure = STORAGE_PREDICT_FAILURE;
+ PStoragePredictFailure = PSTORAGE_PREDICT_FAILURE;
+
+//
+// IoControlCode values for disk devices.
+//
+
+const
+ IOCTL_DISK_BASE = FILE_DEVICE_DISK;
+ {$EXTERNALSYM IOCTL_DISK_BASE}
+
+ IOCTL_DISK_GET_DRIVE_GEOMETRY = (
+ (IOCTL_DISK_BASE shl 16) or (FILE_ANY_ACCESS shl 14) or
+ ($0000 shl 2) or METHOD_BUFFERED);
+ {$EXTERNALSYM IOCTL_DISK_GET_DRIVE_GEOMETRY}
+
+ IOCTL_DISK_GET_PARTITION_INFO = (
+ (IOCTL_DISK_BASE shl 16) or (FILE_READ_ACCESS shl 14) or
+ ($0001 shl 2) or METHOD_BUFFERED);
+ {$EXTERNALSYM IOCTL_DISK_GET_PARTITION_INFO}
+
+ IOCTL_DISK_SET_PARTITION_INFO = (
+ (IOCTL_DISK_BASE shl 16) or ((FILE_READ_ACCESS or FILE_WRITE_ACCESS) shl 14) or
+ ($0002 shl 2) or METHOD_BUFFERED);
+ {$EXTERNALSYM IOCTL_DISK_SET_PARTITION_INFO}
+
+ IOCTL_DISK_GET_DRIVE_LAYOUT = (
+ (IOCTL_DISK_BASE shl 16) or (FILE_READ_ACCESS shl 14) or
+ ($0003 shl 2) or METHOD_BUFFERED);
+ {$EXTERNALSYM IOCTL_DISK_GET_DRIVE_LAYOUT}
+
+ IOCTL_DISK_SET_DRIVE_LAYOUT = (
+ (IOCTL_DISK_BASE shl 16) or ((FILE_READ_ACCESS or FILE_WRITE_ACCESS) shl 14) or
+ ($0004 shl 2) or METHOD_BUFFERED);
+ {$EXTERNALSYM IOCTL_DISK_SET_DRIVE_LAYOUT}
+
+ IOCTL_DISK_VERIFY = (
+ (IOCTL_DISK_BASE shl 16) or (FILE_ANY_ACCESS shl 14) or
+ ($0005 shl 2) or METHOD_BUFFERED);
+ {$EXTERNALSYM IOCTL_DISK_VERIFY}
+
+ IOCTL_DISK_FORMAT_TRACKS = (
+ (IOCTL_DISK_BASE shl 16) or ((FILE_READ_ACCESS or FILE_WRITE_ACCESS) shl 14) or
+ ($0006 shl 2) or METHOD_BUFFERED);
+ {$EXTERNALSYM IOCTL_DISK_FORMAT_TRACKS}
+
+ IOCTL_DISK_REASSIGN_BLOCKS = (
+ (IOCTL_DISK_BASE shl 16) or ((FILE_READ_ACCESS or FILE_WRITE_ACCESS) shl 14) or
+ ($0007 shl 2) or METHOD_BUFFERED);
+ {$EXTERNALSYM IOCTL_DISK_REASSIGN_BLOCKS}
+
+ IOCTL_DISK_PERFORMANCE = (
+ (IOCTL_DISK_BASE shl 16) or (FILE_ANY_ACCESS shl 14) or
+ ($0008 shl 2) or METHOD_BUFFERED);
+ {$EXTERNALSYM IOCTL_DISK_PERFORMANCE}
+
+ IOCTL_DISK_IS_WRITABLE = (
+ (IOCTL_DISK_BASE shl 16) or (FILE_ANY_ACCESS shl 14) or
+ ($0009 shl 2) or METHOD_BUFFERED);
+ {$EXTERNALSYM IOCTL_DISK_IS_WRITABLE}
+
+ IOCTL_DISK_LOGGING = (
+ (IOCTL_DISK_BASE shl 16) or (FILE_ANY_ACCESS shl 14) or
+ ($000a shl 2) or METHOD_BUFFERED);
+ {$EXTERNALSYM IOCTL_DISK_LOGGING}
+
+ IOCTL_DISK_FORMAT_TRACKS_EX = (
+ (IOCTL_DISK_BASE shl 16) or ((FILE_READ_ACCESS or FILE_WRITE_ACCESS) shl 14) or
+ ($000b shl 2) or METHOD_BUFFERED);
+ {$EXTERNALSYM IOCTL_DISK_FORMAT_TRACKS_EX}
+
+ IOCTL_DISK_HISTOGRAM_STRUCTURE = (
+ (IOCTL_DISK_BASE shl 16) or (FILE_ANY_ACCESS shl 14) or
+ ($000c shl 2) or METHOD_BUFFERED);
+ {$EXTERNALSYM IOCTL_DISK_HISTOGRAM_STRUCTURE}
+
+ IOCTL_DISK_HISTOGRAM_DATA = (
+ (IOCTL_DISK_BASE shl 16) or (FILE_ANY_ACCESS shl 14) or
+ ($000d shl 2) or METHOD_BUFFERED);
+ {$EXTERNALSYM IOCTL_DISK_HISTOGRAM_DATA}
+
+ IOCTL_DISK_HISTOGRAM_RESET = (
+ (IOCTL_DISK_BASE shl 16) or (FILE_ANY_ACCESS shl 14) or
+ ($000e shl 2) or METHOD_BUFFERED);
+ {$EXTERNALSYM IOCTL_DISK_HISTOGRAM_RESET}
+
+ IOCTL_DISK_REQUEST_STRUCTURE = (
+ (IOCTL_DISK_BASE shl 16) or (FILE_ANY_ACCESS shl 14) or
+ ($000f shl 2) or METHOD_BUFFERED);
+ {$EXTERNALSYM IOCTL_DISK_REQUEST_STRUCTURE}
+
+ IOCTL_DISK_REQUEST_DATA = (
+ (IOCTL_DISK_BASE shl 16) or (FILE_ANY_ACCESS shl 14) or
+ ($0010 shl 2) or METHOD_BUFFERED);
+ {$EXTERNALSYM IOCTL_DISK_REQUEST_DATA}
+
+ IOCTL_DISK_PERFORMANCE_OFF = (
+ (IOCTL_DISK_BASE shl 16) or (FILE_ANY_ACCESS shl 14) or
+ ($0018 shl 2) or METHOD_BUFFERED);
+ {$EXTERNALSYM IOCTL_DISK_PERFORMANCE_OFF}
+
+ IOCTL_DISK_CONTROLLER_NUMBER = (
+ (IOCTL_DISK_BASE shl 16) or (FILE_ANY_ACCESS shl 14) or
+ ($0011 shl 2) or METHOD_BUFFERED);
+ {$EXTERNALSYM IOCTL_DISK_CONTROLLER_NUMBER}
+
+//
+// IOCTL support for SMART drive fault prediction.
+//
+
+ SMART_GET_VERSION = (
+ (IOCTL_DISK_BASE shl 16) or (FILE_READ_ACCESS shl 14) or
+ ($0020 shl 2) or METHOD_BUFFERED);
+ {$EXTERNALSYM SMART_GET_VERSION}
+
+ SMART_SEND_DRIVE_COMMAND = (
+ (IOCTL_DISK_BASE shl 16) or ((FILE_READ_ACCESS or FILE_WRITE_ACCESS) shl 14) or
+ ($0021 shl 2) or METHOD_BUFFERED);
+ {$EXTERNALSYM SMART_SEND_DRIVE_COMMAND}
+
+ SMART_RCV_DRIVE_DATA = (
+ (IOCTL_DISK_BASE shl 16) or ((FILE_READ_ACCESS or FILE_WRITE_ACCESS) shl 14) or
+ ($0022 shl 2) or METHOD_BUFFERED);
+ {$EXTERNALSYM SMART_RCV_DRIVE_DATA}
+
+//
+// New IOCTLs for GUID Partition tabled disks.
+//
+
+// 23-11-2002: various bugs reported by Carsten Grafflage corrected
+
+ IOCTL_DISK_GET_PARTITION_INFO_EX = (
+ (IOCTL_DISK_BASE shl 16) or (FILE_ANY_ACCESS shl 14) or
+ ($0012 shl 2) or METHOD_BUFFERED);
+ {$EXTERNALSYM IOCTL_DISK_GET_PARTITION_INFO_EX}
+
+ IOCTL_DISK_SET_PARTITION_INFO_EX = (
+ (IOCTL_DISK_BASE shl 16) or ((FILE_READ_ACCESS or FILE_WRITE_ACCESS) shl 14) or
+ ($0013 shl 2) or METHOD_BUFFERED);
+ {$EXTERNALSYM IOCTL_DISK_SET_PARTITION_INFO_EX}
+
+ IOCTL_DISK_GET_DRIVE_LAYOUT_EX = (
+ (IOCTL_DISK_BASE shl 16) or (FILE_ANY_ACCESS shl 14) or
+ ($0014 shl 2) or METHOD_BUFFERED);
+ {$EXTERNALSYM IOCTL_DISK_GET_DRIVE_LAYOUT_EX}
+
+ IOCTL_DISK_SET_DRIVE_LAYOUT_EX = (
+ (IOCTL_DISK_BASE shl 16) or ((FILE_READ_ACCESS or FILE_WRITE_ACCESS) shl 14) or
+ ($0015 shl 2) or METHOD_BUFFERED);
+ {$EXTERNALSYM IOCTL_DISK_SET_DRIVE_LAYOUT_EX}
+
+ IOCTL_DISK_CREATE_DISK = (
+ (IOCTL_DISK_BASE shl 16) or ((FILE_READ_ACCESS or FILE_WRITE_ACCESS) shl 14) or
+ ($0016 shl 2) or METHOD_BUFFERED);
+ {$EXTERNALSYM IOCTL_DISK_CREATE_DISK}
+
+ IOCTL_DISK_GET_LENGTH_INFO = (
+ (IOCTL_DISK_BASE shl 16) or (FILE_READ_ACCESS shl 14) or
+ ($0017 shl 2) or METHOD_BUFFERED);
+ {$EXTERNALSYM IOCTL_DISK_GET_LENGTH_INFO}
+
+ IOCTL_DISK_GET_DRIVE_GEOMETRY_EX = (
+ (IOCTL_DISK_BASE shl 16) or (FILE_ANY_ACCESS shl 14) or
+ ($0028 shl 2) or METHOD_BUFFERED);
+ {$EXTERNALSYM IOCTL_DISK_GET_DRIVE_GEOMETRY_EX}
+
+ IOCTL_DISK_UPDATE_DRIVE_SIZE = (
+ (IOCTL_DISK_BASE shl 16) or ((FILE_READ_ACCESS or FILE_WRITE_ACCESS) shl 14) or
+ ($0032 shl 2) or METHOD_BUFFERED);
+ {$EXTERNALSYM IOCTL_DISK_UPDATE_DRIVE_SIZE}
+
+ IOCTL_DISK_GROW_PARTITION = (
+ (IOCTL_DISK_BASE shl 16) or ((FILE_READ_ACCESS or FILE_WRITE_ACCESS) shl 14) or
+ ($0034 shl 2) or METHOD_BUFFERED);
+ {$EXTERNALSYM IOCTL_DISK_GROW_PARTITION}
+
+ IOCTL_DISK_GET_CACHE_INFORMATION = (
+ (IOCTL_DISK_BASE shl 16) or (FILE_READ_ACCESS shl 14) or
+ ($0035 shl 2) or METHOD_BUFFERED);
+ {$EXTERNALSYM IOCTL_DISK_GET_CACHE_INFORMATION}
+
+ IOCTL_DISK_SET_CACHE_INFORMATION = (
+ (IOCTL_DISK_BASE shl 16) or ((FILE_READ_ACCESS or FILE_WRITE_ACCESS) shl 14) or
+ ($0036 shl 2) or METHOD_BUFFERED);
+ {$EXTERNALSYM IOCTL_DISK_SET_CACHE_INFORMATION}
+
+ OBSOLETE_DISK_GET_WRITE_CACHE_STATE = (
+ (IOCTL_DISK_BASE shl 16) or (FILE_READ_ACCESS shl 14) or
+ ($0037 shl 2) or METHOD_BUFFERED);
+ {$EXTERNALSYM OBSOLETE_DISK_GET_WRITE_CACHE_STATE}
+
+ IOCTL_DISK_DELETE_DRIVE_LAYOUT = (
+ (IOCTL_DISK_BASE shl 16) or ((FILE_READ_ACCESS or FILE_WRITE_ACCESS) shl 14) or
+ ($0040 shl 2) or METHOD_BUFFERED);
+ {$EXTERNALSYM IOCTL_DISK_DELETE_DRIVE_LAYOUT}
+
+//
+// Called to flush cached information that the driver may have about this
+// device's characteristics. Not all drivers cache characteristics, and not
+// cached properties can be flushed. This simply serves as an update to the
+// driver that it may want to do an expensive reexamination of the device's
+// characteristics now (fixed media size, partition table, etc...)
+//
+
+ IOCTL_DISK_UPDATE_PROPERTIES = (
+ (IOCTL_DISK_BASE shl 16) or (FILE_ANY_ACCESS shl 14) or
+ ($0050 shl 2) or METHOD_BUFFERED);
+ {$EXTERNALSYM IOCTL_DISK_UPDATE_PROPERTIES}
+
+//
+// Special IOCTLs needed to support PC-98 machines in Japan
+//
+
+ IOCTL_DISK_FORMAT_DRIVE = (
+ (IOCTL_DISK_BASE shl 16) or ((FILE_READ_ACCESS or FILE_WRITE_ACCESS) shl 14) or
+ ($00f3 shl 2) or METHOD_BUFFERED);
+ {$EXTERNALSYM IOCTL_DISK_FORMAT_DRIVE}
+
+ IOCTL_DISK_SENSE_DEVICE = (
+ (IOCTL_DISK_BASE shl 16) or (FILE_ANY_ACCESS shl 14) or
+ ($00f8 shl 2) or METHOD_BUFFERED);
+ {$EXTERNALSYM IOCTL_DISK_SENSE_DEVICE}
+
+//
+// The following device control codes are common for all class drivers. The
+// functions codes defined here must match all of the other class drivers.
+//
+// Warning: these codes will be replaced in the future by equivalent
+// IOCTL_STORAGE codes
+//
+
+ IOCTL_DISK_CHECK_VERIFY = (
+ (IOCTL_DISK_BASE shl 16) or (FILE_READ_ACCESS shl 14) or
+ ($0200 shl 2) or METHOD_BUFFERED);
+ {$EXTERNALSYM IOCTL_DISK_CHECK_VERIFY}
+
+ IOCTL_DISK_MEDIA_REMOVAL = (
+ (IOCTL_DISK_BASE shl 16) or (FILE_READ_ACCESS shl 14) or
+ ($0201 shl 2) or METHOD_BUFFERED);
+ {$EXTERNALSYM IOCTL_DISK_MEDIA_REMOVAL}
+
+ IOCTL_DISK_EJECT_MEDIA = (
+ (IOCTL_DISK_BASE shl 16) or (FILE_READ_ACCESS shl 14) or
+ ($0202 shl 2) or METHOD_BUFFERED);
+ {$EXTERNALSYM IOCTL_DISK_EJECT_MEDIA}
+
+ IOCTL_DISK_LOAD_MEDIA = (
+ (IOCTL_DISK_BASE shl 16) or (FILE_READ_ACCESS shl 14) or
+ ($0203 shl 2) or METHOD_BUFFERED);
+ {$EXTERNALSYM IOCTL_DISK_LOAD_MEDIA}
+
+ IOCTL_DISK_RESERVE = (
+ (IOCTL_DISK_BASE shl 16) or (FILE_READ_ACCESS shl 14) or
+ ($0204 shl 2) or METHOD_BUFFERED);
+ {$EXTERNALSYM IOCTL_DISK_RESERVE}
+
+ IOCTL_DISK_RELEASE = (
+ (IOCTL_DISK_BASE shl 16) or (FILE_READ_ACCESS shl 14) or
+ ($0205 shl 2) or METHOD_BUFFERED);
+ {$EXTERNALSYM IOCTL_DISK_RELEASE}
+
+ IOCTL_DISK_FIND_NEW_DEVICES = (
+ (IOCTL_DISK_BASE shl 16) or (FILE_READ_ACCESS shl 14) or
+ ($0206 shl 2) or METHOD_BUFFERED);
+ {$EXTERNALSYM IOCTL_DISK_FIND_NEW_DEVICES}
+
+ IOCTL_DISK_GET_MEDIA_TYPES = (
+ (IOCTL_DISK_BASE shl 16) or (FILE_ANY_ACCESS shl 14) or
+ ($0300 shl 2) or METHOD_BUFFERED);
+ {$EXTERNALSYM IOCTL_DISK_GET_MEDIA_TYPES}
+
+//
+// Define the partition types returnable by known disk drivers.
+//
+
+const
+ PARTITION_ENTRY_UNUSED = $00; // Entry unused
+ {$EXTERNALSYM PARTITION_ENTRY_UNUSED}
+ PARTITION_FAT_12 = $01; // 12-bit FAT entries
+ {$EXTERNALSYM PARTITION_FAT_12}
+ PARTITION_XENIX_1 = $02; // Xenix
+ {$EXTERNALSYM PARTITION_XENIX_1}
+ PARTITION_XENIX_2 = $03; // Xenix
+ {$EXTERNALSYM PARTITION_XENIX_2}
+ PARTITION_FAT_16 = $04; // 16-bit FAT entries
+ {$EXTERNALSYM PARTITION_FAT_16}
+ PARTITION_EXTENDED = $05; // Extended partition entry
+ {$EXTERNALSYM PARTITION_EXTENDED}
+ PARTITION_HUGE = $06; // Huge partition MS-DOS V4
+ {$EXTERNALSYM PARTITION_HUGE}
+ PARTITION_IFS = $07; // IFS Partition
+ {$EXTERNALSYM PARTITION_IFS}
+ PARTITION_OS2BOOTMGR = $0A; // OS/2 Boot Manager/OPUS/Coherent swap
+ {$EXTERNALSYM PARTITION_OS2BOOTMGR}
+ PARTITION_FAT32 = $0B; // FAT32
+ {$EXTERNALSYM PARTITION_FAT32}
+ PARTITION_FAT32_XINT13 = $0C; // FAT32 using extended int13 services
+ {$EXTERNALSYM PARTITION_FAT32_XINT13}
+ PARTITION_XINT13 = $0E; // Win95 partition using extended int13 services
+ {$EXTERNALSYM PARTITION_XINT13}
+ PARTITION_XINT13_EXTENDED = $0F; // Same as type 5 but uses extended int13 services
+ {$EXTERNALSYM PARTITION_XINT13_EXTENDED}
+ PARTITION_PREP = $41; // PowerPC Reference Platform (PReP) Boot Partition
+ {$EXTERNALSYM PARTITION_PREP}
+ PARTITION_LDM = $42; // Logical Disk Manager partition
+ {$EXTERNALSYM PARTITION_LDM}
+ PARTITION_UNIX = $63; // Unix
+ {$EXTERNALSYM PARTITION_UNIX}
+
+ VALID_NTFT = $C0; // NTFT uses high order bits
+ {$EXTERNALSYM VALID_NTFT}
+
+//
+// The high bit of the partition type code indicates that a partition
+// is part of an NTFT mirror or striped array.
+//
+
+ PARTITION_NTFT = $80; // NTFT partition
+ {$EXTERNALSYM PARTITION_NTFT}
+
+//
+// The following macro is used to determine which partitions should be
+// assigned drive letters.
+//
+
+//++
+//
+// BOOLEAN
+// IsRecognizedPartition(
+// IN DWORD PartitionType
+// )
+//
+// Routine Description:
+//
+// This macro is used to determine to which partitions drive letters
+// should be assigned.
+//
+// Arguments:
+//
+// PartitionType - Supplies the type of the partition being examined.
+//
+// Return Value:
+//
+// The return value is TRUE if the partition type is recognized,
+// otherwise FALSE is returned.
+//
+//--
+
+function IsRecognizedPartition(PartitionType: DWORD): Boolean;
+{$EXTERNALSYM IsRecognizedPartition}
+
+//++
+//
+// BOOLEAN
+// IsContainerPartition(
+// IN DWORD PartitionType
+// )
+//
+// Routine Description:
+//
+// This macro is used to determine to which partition types are actually
+// containers for other partitions (ie, extended partitions).
+//
+// Arguments:
+//
+// PartitionType - Supplies the type of the partition being examined.
+//
+// Return Value:
+//
+// The return value is TRUE if the partition type is a container,
+// otherwise FALSE is returned.
+//
+//--
+
+function IsContainerPartition(PartitionType: DWORD): Boolean;
+{$EXTERNALSYM IsContainerPartition}
+
+//++
+//
+// BOOLEAN
+// IsFTPartition(
+// IN DWORD PartitionType
+// )
+//
+// Routine Description:
+//
+// This macro is used to determine if the given partition is an FT
+// partition.
+//
+// Arguments:
+//
+// PartitionType - Supplies the type of the partition being examined.
+//
+// Return Value:
+//
+// The return value is TRUE if the partition type is an FT partition,
+// otherwise FALSE is returned.
+//
+//--
+
+function IsFTPartition(PartitionType: DWORD): Boolean;
+{$EXTERNALSYM IsFTPartition}
+
+//
+// Define the media types supported by the driver.
+//
+
+type
+ _MEDIA_TYPE = (
+ Unknown, // Format is unknown
+ F5_1Pt2_512, // 5.25", 1.2MB, 512 bytes/sector
+ F3_1Pt44_512, // 3.5", 1.44MB, 512 bytes/sector
+ F3_2Pt88_512, // 3.5", 2.88MB, 512 bytes/sector
+ F3_20Pt8_512, // 3.5", 20.8MB, 512 bytes/sector
+ F3_720_512, // 3.5", 720KB, 512 bytes/sector
+ F5_360_512, // 5.25", 360KB, 512 bytes/sector
+ F5_320_512, // 5.25", 320KB, 512 bytes/sector
+ F5_320_1024, // 5.25", 320KB, 1024 bytes/sector
+ F5_180_512, // 5.25", 180KB, 512 bytes/sector
+ F5_160_512, // 5.25", 160KB, 512 bytes/sector
+ RemovableMedia, // Removable media other than floppy
+ FixedMedia, // Fixed hard disk media
+ F3_120M_512, // 3.5", 120M Floppy
+ F3_640_512, // 3.5" , 640KB, 512 bytes/sector
+ F5_640_512, // 5.25", 640KB, 512 bytes/sector
+ F5_720_512, // 5.25", 720KB, 512 bytes/sector
+ F3_1Pt2_512, // 3.5" , 1.2Mb, 512 bytes/sector
+ F3_1Pt23_1024, // 3.5" , 1.23Mb, 1024 bytes/sector
+ F5_1Pt23_1024, // 5.25", 1.23MB, 1024 bytes/sector
+ F3_128Mb_512, // 3.5" MO 128Mb 512 bytes/sector
+ F3_230Mb_512, // 3.5" MO 230Mb 512 bytes/sector
+ F8_256_128, // 8", 256KB, 128 bytes/sector
+ F3_200Mb_512, // 3.5", 200M Floppy (HiFD)
+ F3_240M_512, // 3.5", 240Mb Floppy (HiFD)
+ F3_32M_512); // 3.5", 32Mb Floppy
+ {$EXTERNALSYM _MEDIA_TYPE}
+ MEDIA_TYPE = _MEDIA_TYPE;
+ {$EXTERNALSYM MEDIA_TYPE}
+ PMEDIA_TYPE = ^MEDIA_TYPE;
+ {$EXTERNALSYM PMEDIA_TYPE}
+ TMediaType = MEDIA_TYPE;
+ PMediaType = PMEDIA_TYPE;
+
+//
+// Define the input buffer structure for the driver, when
+// it is called with IOCTL_DISK_FORMAT_TRACKS.
+//
+
+ PFORMAT_PARAMETERS = ^FORMAT_PARAMETERS;
+ {$EXTERNALSYM PFORMAT_PARAMETERS}
+ _FORMAT_PARAMETERS = record
+ MediaType: MEDIA_TYPE;
+ StartCylinderNumber: DWORD;
+ EndCylinderNumber: DWORD;
+ StartHeadNumber: DWORD;
+ EndHeadNumber: DWORD;
+ end;
+ {$EXTERNALSYM _FORMAT_PARAMETERS}
+ FORMAT_PARAMETERS = _FORMAT_PARAMETERS;
+ {$EXTERNALSYM FORMAT_PARAMETERS}
+ TFormatParameters = FORMAT_PARAMETERS;
+ PFormatParameters = PFORMAT_PARAMETERS;
+
+//
+// Define the BAD_TRACK_NUMBER type. An array of elements of this type is
+// returned by the driver on IOCTL_DISK_FORMAT_TRACKS requests, to indicate
+// what tracks were bad during formatting. The length of that array is
+// reported in the `Information' field of the I/O Status Block.
+//
+
+ BAD_TRACK_NUMBER = WORD;
+ {$EXTERNALSYM BAD_TRACK_NUMBER}
+ PBAD_TRACK_NUMBER = ^WORD;
+ {$EXTERNALSYM PBAD_TRACK_NUMBER}
+
+//
+// Define the input buffer structure for the driver, when
+// it is called with IOCTL_DISK_FORMAT_TRACKS_EX.
+//
+
+ PFORMAT_EX_PARAMETERS = ^FORMAT_EX_PARAMETERS;
+ {$EXTERNALSYM PFORMAT_EX_PARAMETERS}
+ _FORMAT_EX_PARAMETERS = record
+ MediaType: MEDIA_TYPE;
+ StartCylinderNumber: DWORD;
+ EndCylinderNumber: DWORD;
+ StartHeadNumber: DWORD;
+ EndHeadNumber: DWORD;
+ FormatGapLength: WORD;
+ SectorsPerTrack: WORD;
+ SectorNumber: array [0..0] of WORD;
+ end;
+ {$EXTERNALSYM _FORMAT_EX_PARAMETERS}
+ FORMAT_EX_PARAMETERS = _FORMAT_EX_PARAMETERS;
+ {$EXTERNALSYM FORMAT_EX_PARAMETERS}
+ TFormatExParameters = FORMAT_EX_PARAMETERS;
+ PFormatExParameters = PFORMAT_EX_PARAMETERS;
+
+//
+// The following structure is returned on an IOCTL_DISK_GET_DRIVE_GEOMETRY
+// request and an array of them is returned on an IOCTL_DISK_GET_MEDIA_TYPES
+// request.
+//
+
+ PDISK_GEOMETRY = ^DISK_GEOMETRY;
+ {$EXTERNALSYM PDISK_GEOMETRY}
+ _DISK_GEOMETRY = record
+ Cylinders: LARGE_INTEGER;
+ MediaType: MEDIA_TYPE;
+ TracksPerCylinder: DWORD;
+ SectorsPerTrack: DWORD;
+ BytesPerSector: DWORD;
+ end;
+ {$EXTERNALSYM _DISK_GEOMETRY}
+ DISK_GEOMETRY = _DISK_GEOMETRY;
+ {$EXTERNALSYM DISK_GEOMETRY}
+ TDiskGeometry = DISK_GEOMETRY;
+ PDiskGeometry = PDISK_GEOMETRY;
+
+//
+// This wmi guid returns a DISK_GEOMETRY structure
+//
+
+const
+ WMI_DISK_GEOMETRY_GUID: TGUID = (
+ D1:$25007f51; D2:$57c2; D3:$11d1; D4:($a5, $28, $00, $a0, $c9, $06, $29, $10));
+ {$EXTERNALSYM WMI_DISK_GEOMETRY_GUID}
+
+//
+// The following structure is returned on an IOCTL_DISK_GET_PARTITION_INFO
+// and an IOCTL_DISK_GET_DRIVE_LAYOUT request. It is also used in a request
+// to change the drive layout, IOCTL_DISK_SET_DRIVE_LAYOUT.
+//
+
+type
+ PPARTITION_INFORMATION = ^PARTITION_INFORMATION;
+ {$EXTERNALSYM PPARTITION_INFORMATION}
+ _PARTITION_INFORMATION = record
+ StartingOffset: LARGE_INTEGER;
+ PartitionLength: LARGE_INTEGER;
+ HiddenSectors: DWORD;
+ PartitionNumber: DWORD;
+ PartitionType: BYTE;
+ BootIndicator: ByteBool;
+ RecognizedPartition: ByteBool;
+ RewritePartition: ByteBool;
+ end;
+ {$EXTERNALSYM _PARTITION_INFORMATION}
+ PARTITION_INFORMATION = _PARTITION_INFORMATION;
+ {$EXTERNALSYM PARTITION_INFORMATION}
+ TPartitionInformation = PARTITION_INFORMATION;
+ PPartitionInformation = PPARTITION_INFORMATION;
+
+//
+// The following structure is used to change the partition type of a
+// specified disk partition using an IOCTL_DISK_SET_PARTITION_INFO
+// request.
+//
+
+ PSET_PARTITION_INFORMATION = ^SET_PARTITION_INFORMATION;
+ {$EXTERNALSYM PSET_PARTITION_INFORMATION}
+ _SET_PARTITION_INFORMATION = record
+ PartitionType: BYTE;
+ end;
+ {$EXTERNALSYM _SET_PARTITION_INFORMATION}
+ SET_PARTITION_INFORMATION = _SET_PARTITION_INFORMATION;
+ {$EXTERNALSYM SET_PARTITION_INFORMATION}
+ TSetPartitionInformation = _SET_PARTITION_INFORMATION;
+ PSetPartitionInformation = PSET_PARTITION_INFORMATION;
+
+//
+// The following structures is returned on an IOCTL_DISK_GET_DRIVE_LAYOUT
+// request and given as input to an IOCTL_DISK_SET_DRIVE_LAYOUT request.
+//
+
+ PDRIVE_LAYOUT_INFORMATION = ^DRIVE_LAYOUT_INFORMATION;
+ {$EXTERNALSYM PDRIVE_LAYOUT_INFORMATION}
+ _DRIVE_LAYOUT_INFORMATION = record
+ PartitionCount: DWORD;
+ Signature: DWORD;
+ PartitionEntry: array [0..0] of PARTITION_INFORMATION;
+ end;
+ {$EXTERNALSYM _DRIVE_LAYOUT_INFORMATION}
+ DRIVE_LAYOUT_INFORMATION = _DRIVE_LAYOUT_INFORMATION;
+ {$EXTERNALSYM DRIVE_LAYOUT_INFORMATION}
+ TDriveLayoutInformation = DRIVE_LAYOUT_INFORMATION;
+ PDriveLayoutInformation = PDRIVE_LAYOUT_INFORMATION;
+
+//
+// The following structure is passed in on an IOCTL_DISK_VERIFY request.
+// The offset and length parameters are both given in bytes.
+//
+
+ PVERIFY_INFORMATION = ^VERIFY_INFORMATION;
+ {$EXTERNALSYM PVERIFY_INFORMATION}
+ _VERIFY_INFORMATION = record
+ StartingOffset: LARGE_INTEGER;
+ Length: DWORD;
+ end;
+ {$EXTERNALSYM _VERIFY_INFORMATION}
+ VERIFY_INFORMATION = _VERIFY_INFORMATION;
+ {$EXTERNALSYM VERIFY_INFORMATION}
+ TVerifyInformation = VERIFY_INFORMATION;
+ PVerifyInformation = PVERIFY_INFORMATION;
+
+//
+// The following structure is passed in on an IOCTL_DISK_REASSIGN_BLOCKS
+// request.
+//
+
+ PREASSIGN_BLOCKS = ^REASSIGN_BLOCKS;
+ {$EXTERNALSYM PREASSIGN_BLOCKS}
+ _REASSIGN_BLOCKS = record
+ Reserved: WORD;
+ Count: WORD;
+ BlockNumber: array [0..0] of DWORD;
+ end;
+ {$EXTERNALSYM _REASSIGN_BLOCKS}
+ REASSIGN_BLOCKS = _REASSIGN_BLOCKS;
+ {$EXTERNALSYM REASSIGN_BLOCKS}
+ TReassignBlocks = REASSIGN_BLOCKS;
+ PReassignBlocks = PREASSIGN_BLOCKS;
+
+//
+// Support for GUID Partition Table (GPT) disks.
+//
+
+//
+// There are currently two ways a disk can be partitioned. With a traditional
+// AT-style master boot record (PARTITION_STYLE_MBR) and with a new, GPT
+// partition table (PARTITION_STYLE_GPT). RAW is for an unrecognizable
+// partition style. There are a very limited number of things you can
+// do with a RAW partititon.
+//
+
+type
+ _PARTITION_STYLE = (
+ PARTITION_STYLE_MBR,
+ PARTITION_STYLE_GPT,
+ PARTITION_STYLE_RAW);
+ {$EXTERNALSYM _PARTITION_STYLE}
+ PARTITION_STYLE = _PARTITION_STYLE;
+ {$EXTERNALSYM PARTITION_STYLE}
+ TPartitionStyle = PARTITION_STYLE;
+
+//
+// The following structure defines information in a GPT partition that is
+// not common to both GPT and MBR partitions.
+//
+
+ PPARTITION_INFORMATION_GPT = ^PARTITION_INFORMATION_GPT;
+ {$EXTERNALSYM PPARTITION_INFORMATION_GPT}
+ _PARTITION_INFORMATION_GPT = record
+ PartitionType: GUID; // Partition type. See table 16-3.
+ PartitionId: GUID; // Unique GUID for this partition.
+ Attributes: DWORD64; // See table 16-4.
+ Name: array [0..35] of WCHAR; // Partition Name in Unicode.
+ end;
+ {$EXTERNALSYM _PARTITION_INFORMATION_GPT}
+ PARTITION_INFORMATION_GPT = _PARTITION_INFORMATION_GPT;
+ {$EXTERNALSYM PARTITION_INFORMATION_GPT}
+ TPartitionInformationGpt = PARTITION_INFORMATION_GPT;
+ PPartitionInformationGpt = PPARTITION_INFORMATION_GPT;
+
+//
+// The following are GPT partition attributes applicable for any
+// partition type. These attributes are not OS-specific
+//
+
+const
+ GPT_ATTRIBUTE_PLATFORM_REQUIRED = $0000000000000001;
+ {$EXTERNALSYM GPT_ATTRIBUTE_PLATFORM_REQUIRED}
+
+//
+// The following are GPT partition attributes applicable when the
+// PartitionType is PARTITION_BASIC_DATA_GUID.
+//
+
+ GPT_BASIC_DATA_ATTRIBUTE_NO_DRIVE_LETTER = DWORD($8000000000000000);
+ {$EXTERNALSYM GPT_BASIC_DATA_ATTRIBUTE_NO_DRIVE_LETTER}
+ GPT_BASIC_DATA_ATTRIBUTE_HIDDEN = $4000000000000000;
+ {$EXTERNALSYM GPT_BASIC_DATA_ATTRIBUTE_HIDDEN}
+ GPT_BASIC_DATA_ATTRIBUTE_READ_ONLY = $1000000000000000;
+ {$EXTERNALSYM GPT_BASIC_DATA_ATTRIBUTE_READ_ONLY}
+
+//
+// The following structure defines information in an MBR partition that is not
+// common to both GPT and MBR partitions.
+//
+
+type
+ PPARTITION_INFORMATION_MBR = ^PARTITION_INFORMATION_MBR;
+ {$EXTERNALSYM PPARTITION_INFORMATION_MBR}
+ _PARTITION_INFORMATION_MBR = record
+ PartitionType: BYTE;
+ BootIndicator: BOOLEAN;
+ RecognizedPartition: BOOLEAN;
+ HiddenSectors: DWORD;
+ end;
+ {$EXTERNALSYM _PARTITION_INFORMATION_MBR}
+ PARTITION_INFORMATION_MBR = _PARTITION_INFORMATION_MBR;
+ {$EXTERNALSYM PARTITION_INFORMATION_MBR}
+ TPartitionInformationMbr = PARTITION_INFORMATION_MBR;
+ PPartitionInformationMbr = PPARTITION_INFORMATION_MBR;
+
+//
+// The structure SET_PARTITION_INFO_EX is used with the ioctl
+// IOCTL_SET_PARTITION_INFO_EX to set information about a specific
+// partition. Note that for MBR partitions, you can only set the partition
+// signature, whereas GPT partitions allow setting of all fields that
+// you can get.
+//
+
+ SET_PARTITION_INFORMATION_MBR = SET_PARTITION_INFORMATION;
+ {$EXTERNALSYM SET_PARTITION_INFORMATION_MBR}
+ TSetPartitionInformationMbr = SET_PARTITION_INFORMATION_MBR;
+ SET_PARTITION_INFORMATION_GPT = PARTITION_INFORMATION_GPT;
+ {$EXTERNALSYM SET_PARTITION_INFORMATION_GPT}
+ TSetPartitionInformationGpt = SET_PARTITION_INFORMATION_GPT;
+
+ PSET_PARTITION_INFORMATION_EX = ^SET_PARTITION_INFORMATION_EX;
+ {$EXTERNALSYM PSET_PARTITION_INFORMATION_EX}
+ _SET_PARTITION_INFORMATION_EX = record
+ PartitionStyle: PARTITION_STYLE;
+ case Integer of
+ 0: (Mbr: SET_PARTITION_INFORMATION_MBR);
+ 1: (Gpt: SET_PARTITION_INFORMATION_GPT);
+ end;
+ {$EXTERNALSYM _SET_PARTITION_INFORMATION_EX}
+ SET_PARTITION_INFORMATION_EX = _SET_PARTITION_INFORMATION_EX;
+ {$EXTERNALSYM SET_PARTITION_INFORMATION_EX}
+ TSetPartitionInformationEx = SET_PARTITION_INFORMATION_EX;
+ PSetPartitionInformationEx = PSET_PARTITION_INFORMATION_EX;
+
+//
+// The structure CREATE_DISK_GPT with the ioctl IOCTL_DISK_CREATE_DISK
+// to initialize an virgin disk with an empty GPT partition table.
+//
+
+ PCREATE_DISK_GPT = ^CREATE_DISK_GPT;
+ {$EXTERNALSYM PCREATE_DISK_GPT}
+ _CREATE_DISK_GPT = record
+ DiskId: GUID; // Unique disk id for the disk.
+ MaxPartitionCount: DWORD; // Maximim number of partitions allowable.
+ end;
+ {$EXTERNALSYM _CREATE_DISK_GPT}
+ CREATE_DISK_GPT = _CREATE_DISK_GPT;
+ {$EXTERNALSYM CREATE_DISK_GPT}
+ TCreateDiskGpt = CREATE_DISK_GPT;
+ PCreateDiskGpt = PCREATE_DISK_GPT;
+
+//
+// The structure CREATE_DISK_MBR with the ioctl IOCTL_DISK_CREATE_DISK
+// to initialize an virgin disk with an empty MBR partition table.
+//
+
+ PCREATE_DISK_MBR = ^CREATE_DISK_MBR;
+ {$EXTERNALSYM PCREATE_DISK_MBR}
+ _CREATE_DISK_MBR = record
+ Signature: DWORD;
+ end;
+ {$EXTERNALSYM _CREATE_DISK_MBR}
+ CREATE_DISK_MBR = _CREATE_DISK_MBR;
+ {$EXTERNALSYM CREATE_DISK_MBR}
+ TCreateDiskMbr = CREATE_DISK_MBR;
+ PCreateDiskMbr = PCREATE_DISK_MBR;
+
+ PCREATE_DISK = ^CREATE_DISK;
+ {$EXTERNALSYM PCREATE_DISK}
+ _CREATE_DISK = record
+ PartitionStyle: PARTITION_STYLE;
+ case Integer of
+ 0: (Mbr: CREATE_DISK_MBR);
+ 1: (Gpt: CREATE_DISK_GPT);
+ end;
+ {$EXTERNALSYM _CREATE_DISK}
+ CREATE_DISK = _CREATE_DISK;
+ {$EXTERNALSYM CREATE_DISK}
+ TCreateDisk = CREATE_DISK;
+ PCreateDisk = PCREATE_DISK;
+
+//
+// The structure GET_LENGTH_INFORMATION is used with the ioctl
+// IOCTL_DISK_GET_LENGTH_INFO to obtain the length, in bytes, of the
+// disk, partition, or volume.
+//
+
+ PGET_LENGTH_INFORMATION = ^GET_LENGTH_INFORMATION;
+ {$EXTERNALSYM PGET_LENGTH_INFORMATION}
+ _GET_LENGTH_INFORMATION = record
+ Length: LARGE_INTEGER;
+ end;
+ {$EXTERNALSYM _GET_LENGTH_INFORMATION}
+ GET_LENGTH_INFORMATION = _GET_LENGTH_INFORMATION;
+ {$EXTERNALSYM GET_LENGTH_INFORMATION}
+ TGetLengthInformation = GET_LENGTH_INFORMATION;
+ PGetLengthInformation = PGET_LENGTH_INFORMATION;
+
+//
+// The PARTITION_INFORMATION_EX structure is used with the
+// IOCTL_DISK_GET_DRIVE_LAYOUT_EX, IOCTL_DISK_SET_DRIVE_LAYOUT_EX,
+// IOCTL_DISK_GET_PARTITION_INFO_EX and IOCTL_DISK_GET_PARTITION_INFO_EX calls.
+//
+
+ PPARTITION_INFORMATION_EX = ^PARTITION_INFORMATION_EX;
+ {$EXTERNALSYM PPARTITION_INFORMATION_EX}
+ _PARTITION_INFORMATION_EX = record
+ PartitionStyle: PARTITION_STYLE;
+ StartingOffset: LARGE_INTEGER;
+ PartitionLength: LARGE_INTEGER;
+ PartitionNumber: DWORD;
+ RewritePartition: BOOLEAN;
+ case Integer of
+ 0: (Mbr: PARTITION_INFORMATION_MBR);
+ 1: (Gpt: PARTITION_INFORMATION_GPT);
+ end;
+ {$EXTERNALSYM _PARTITION_INFORMATION_EX}
+ PARTITION_INFORMATION_EX = _PARTITION_INFORMATION_EX;
+ {$EXTERNALSYM PARTITION_INFORMATION_EX}
+ TPartitionInformationEx = PARTITION_INFORMATION_EX;
+ PPartitionInformationEx = PPARTITION_INFORMATION_EX;
+
+//
+// GPT specific drive layout information.
+//
+
+ PDRIVE_LAYOUT_INFORMATION_GPT = ^DRIVE_LAYOUT_INFORMATION_GPT;
+ {$EXTERNALSYM PDRIVE_LAYOUT_INFORMATION_GPT}
+ _DRIVE_LAYOUT_INFORMATION_GPT = record
+ DiskId: GUID;
+ StartingUsableOffset: LARGE_INTEGER;
+ UsableLength: LARGE_INTEGER;
+ MaxPartitionCount: DWORD;
+ end;
+ {$EXTERNALSYM _DRIVE_LAYOUT_INFORMATION_GPT}
+ DRIVE_LAYOUT_INFORMATION_GPT = _DRIVE_LAYOUT_INFORMATION_GPT;
+ {$EXTERNALSYM DRIVE_LAYOUT_INFORMATION_GPT}
+ TDriveLayoutInformationGpt = DRIVE_LAYOUT_INFORMATION_GPT;
+ PDriveLayoutInformationGpt = PDRIVE_LAYOUT_INFORMATION_GPT;
+
+//
+// MBR specific drive layout information.
+//
+
+ PDRIVE_LAYOUT_INFORMATION_MBR = ^DRIVE_LAYOUT_INFORMATION_MBR;
+ {$EXTERNALSYM PDRIVE_LAYOUT_INFORMATION_MBR}
+ _DRIVE_LAYOUT_INFORMATION_MBR = record
+ Signature: DWORD;
+ end;
+ {$EXTERNALSYM _DRIVE_LAYOUT_INFORMATION_MBR}
+ DRIVE_LAYOUT_INFORMATION_MBR = _DRIVE_LAYOUT_INFORMATION_MBR;
+ {$EXTERNALSYM DRIVE_LAYOUT_INFORMATION_MBR}
+ TDriveLayoutInformationMbr = DRIVE_LAYOUT_INFORMATION_MBR;
+ PDriveLayoutInformationMbr = PDRIVE_LAYOUT_INFORMATION_MBR;
+
+//
+// The structure DRIVE_LAYOUT_INFORMATION_EX is used with the
+// IOCTL_SET_DRIVE_LAYOUT_EX and IOCTL_GET_DRIVE_LAYOUT_EX calls.
+//
+
+ PDRIVE_LAYOUT_INFORMATION_EX = ^DRIVE_LAYOUT_INFORMATION_EX;
+ {$EXTERNALSYM PDRIVE_LAYOUT_INFORMATION_EX}
+ _DRIVE_LAYOUT_INFORMATION_EX = record
+ PartitionStyle: DWORD;
+ PartitionCount: DWORD;
+ Union: record
+ case Integer of
+ 0: (Mbr: DRIVE_LAYOUT_INFORMATION_MBR);
+ 1: (Gpt: DRIVE_LAYOUT_INFORMATION_GPT);
+ end;
+ PartitionEntry: array [0..0] of PARTITION_INFORMATION_EX;
+ end;
+ {$EXTERNALSYM _DRIVE_LAYOUT_INFORMATION_EX}
+ DRIVE_LAYOUT_INFORMATION_EX = _DRIVE_LAYOUT_INFORMATION_EX;
+ {$EXTERNALSYM DRIVE_LAYOUT_INFORMATION_EX}
+ TDriveLayoutInformationEx = DRIVE_LAYOUT_INFORMATION_EX;
+ PDriveLayoutInformationEx = PDRIVE_LAYOUT_INFORMATION_EX;
+
+//
+// The DISK_GEOMETRY_EX structure is returned on issuing an
+// IOCTL_DISK_GET_DRIVE_GEOMETRY_EX ioctl.
+//
+
+ _DETECTION_TYPE = (
+ DetectNone,
+ DetectInt13,
+ DetectExInt13);
+ {$EXTERNALSYM _DETECTION_TYPE}
+ DETECTION_TYPE = _DETECTION_TYPE;
+ {$EXTERNALSYM DETECTION_TYPE}
+ TDetectionType = DETECTION_TYPE;
+
+ PDISK_INT13_INFO = ^DISK_INT13_INFO;
+ {$EXTERNALSYM PDISK_INT13_INFO}
+ _DISK_INT13_INFO = record
+ DriveSelect: WORD;
+ MaxCylinders: DWORD;
+ SectorsPerTrack: WORD;
+ MaxHeads: WORD;
+ NumberDrives: WORD;
+ end;
+ {$EXTERNALSYM _DISK_INT13_INFO}
+ DISK_INT13_INFO = _DISK_INT13_INFO;
+ {$EXTERNALSYM DISK_INT13_INFO}
+ TDiskInt13Info = DISK_INT13_INFO;
+ PDiskInt13Info = PDISK_INT13_INFO;
+
+ PDISK_EX_INT13_INFO = ^DISK_EX_INT13_INFO;
+ {$EXTERNALSYM PDISK_EX_INT13_INFO}
+ _DISK_EX_INT13_INFO = record
+ ExBufferSize: WORD;
+ ExFlags: WORD;
+ ExCylinders: DWORD;
+ ExHeads: DWORD;
+ ExSectorsPerTrack: DWORD;
+ ExSectorsPerDrive: DWORD64;
+ ExSectorSize: WORD;
+ ExReserved: WORD;
+ end;
+ {$EXTERNALSYM _DISK_EX_INT13_INFO}
+ DISK_EX_INT13_INFO = _DISK_EX_INT13_INFO;
+ {$EXTERNALSYM DISK_EX_INT13_INFO}
+ TDiskExInt13Info = DISK_EX_INT13_INFO;
+ PDiskExInt13Info = PDISK_EX_INT13_INFO;
+
+ PDISK_DETECTION_INFO = ^DISK_DETECTION_INFO;
+ {$EXTERNALSYM PDISK_DETECTION_INFO}
+ _DISK_DETECTION_INFO = record
+ SizeOfDetectInfo: DWORD;
+ DetectionType: DETECTION_TYPE;
+ case Integer of
+ 0: (
+ //
+ // If DetectionType == DETECTION_INT13 then we have just the Int13
+ // information.
+ //
+ Int13: DISK_INT13_INFO;
+ //
+ // If DetectionType == DETECTION_EX_INT13, then we have the
+ // extended int 13 information.
+ //
+ ExInt13: DISK_EX_INT13_INFO); // If DetectionType == DetectExInt13
+ end;
+ {$EXTERNALSYM _DISK_DETECTION_INFO}
+ DISK_DETECTION_INFO = _DISK_DETECTION_INFO;
+ {$EXTERNALSYM DISK_DETECTION_INFO}
+ TDiskDetectionInfo = DISK_DETECTION_INFO;
+ PDiskDetectionInfo = PDISK_DETECTION_INFO;
+
+ PDISK_PARTITION_INFO = ^DISK_PARTITION_INFO;
+ {$EXTERNALSYM PDISK_PARTITION_INFO}
+ _DISK_PARTITION_INFO = record
+ SizeOfPartitionInfo: DWORD;
+ PartitionStyle: PARTITION_STYLE; // PartitionStyle = RAW, GPT or MBR
+ case Integer of
+ 0: ( // If PartitionStyle == MBR
+ Signature: DWORD; // MBR Signature
+ CheckSum: DWORD); // MBR CheckSum
+ 1: ( // If PartitionStyle == GPT
+ DiskId: GUID);
+ end;
+ {$EXTERNALSYM _DISK_PARTITION_INFO}
+ DISK_PARTITION_INFO = _DISK_PARTITION_INFO;
+ {$EXTERNALSYM DISK_PARTITION_INFO}
+ TDiskPartitionInfo = DISK_PARTITION_INFO;
+ PDiskPartitionInfo = PDISK_PARTITION_INFO;
+
+//
+// The Geometry structure is a variable length structure composed of a
+// DISK_GEOMETRY_EX structure followed by a DISK_PARTITION_INFO structure
+// followed by a DISK_DETECTION_DATA structure.
+//
+
+type
+ PDISK_GEOMETRY_EX = ^DISK_GEOMETRY_EX;
+ {$EXTERNALSYM PDISK_GEOMETRY_EX}
+ _DISK_GEOMETRY_EX = record
+ Geometry: DISK_GEOMETRY; // Standard disk geometry: may be faked by driver.
+ DiskSize: LARGE_INTEGER; // Must always be correct
+ Data: array [0..0] of BYTE; // Partition, Detect info
+ end;
+ {$EXTERNALSYM _DISK_GEOMETRY_EX}
+ DISK_GEOMETRY_EX = _DISK_GEOMETRY_EX;
+ {$EXTERNALSYM DISK_GEOMETRY_EX}
+ TDiskGeometryEx = DISK_GEOMETRY_EX;
+ PDiskGeometryEx = PDISK_GEOMETRY_EX;
+
+function DiskGeometryGetPartition(Geometry: PDiskGeometryEx): PDiskPartitionInfo;
+{$EXTERNALSYM DiskGeometryGetPartition}
+
+function DiskGeometryGetDetect(Geometry: PDiskGeometryEx): PDiskDetectionInfo;
+{$EXTERNALSYM DiskGeometryGetDetect}
+
+//
+// IOCTL_DISK_CONTROLLER_NUMBER returns the controller and disk
+// number for the handle. This is used to determine if a disk
+// is attached to the primary or secondary IDE controller.
+//
+type
+ PDISK_CONTROLLER_NUMBER = ^DISK_CONTROLLER_NUMBER;
+ {$EXTERNALSYM PDISK_CONTROLLER_NUMBER}
+ _DISK_CONTROLLER_NUMBER = record
+ ControllerNumber: DWORD;
+ DiskNumber: DWORD;
+ end;
+ {$EXTERNALSYM _DISK_CONTROLLER_NUMBER}
+ DISK_CONTROLLER_NUMBER = _DISK_CONTROLLER_NUMBER;
+ {$EXTERNALSYM DISK_CONTROLLER_NUMBER}
+ TDiskControllerNumber = DISK_CONTROLLER_NUMBER;
+ PDiskControllerNumber = PDISK_CONTROLLER_NUMBER;
+
+//
+// IOCTL_DISK_SET_CACHE allows the caller to get or set the state of the disk
+// read/write caches.
+//
+// If the structure is provided as the input buffer for the ioctl the read &
+// write caches will be enabled or disabled depending on the parameters
+// provided.
+//
+// If the structure is provided as an output buffer for the ioctl the state
+// of the read & write caches will be returned. If both input and outut buffers
+// are provided the output buffer will contain the cache state BEFORE any
+// changes are made
+//
+
+ DISK_CACHE_RETENTION_PRIORITY = (EqualPriority, KeepPrefetchedData, KeepReadData);
+ {$EXTERNALSYM DISK_CACHE_RETENTION_PRIORITY}
+ TDiskCacheRetentionPriority = DISK_CACHE_RETENTION_PRIORITY;
+
+ TDCIScalarPrefetch = record
+ Minimum: WORD;
+ Maximum: WORD;
+ //
+ // The maximum number of blocks which will be prefetched - useful
+ // with the scalar limits to set definite upper limits.
+ //
+ MaximumBlocks: WORD;
+ end;
+
+ TDCIBlockPrefetch = record
+ Minimum: WORD;
+ Maximum: WORD;
+ end;
+
+ PDISK_CACHE_INFORMATION = ^DISK_CACHE_INFORMATION;
+ {$EXTERNALSYM PDISK_CACHE_INFORMATION}
+ _DISK_CACHE_INFORMATION = record
+
+ //
+ // on return indicates that the device is capable of saving any parameters
+ // in non-volatile storage. On send indicates that the device should
+ // save the state in non-volatile storage.
+ //
+
+ ParametersSavable: ByteBool;
+
+ //
+ // Indicates whether the write and read caches are enabled.
+ //
+
+ ReadCacheEnabled: ByteBool;
+ WriteCacheEnabled: ByteBool;
+
+ //
+ // Controls the likelyhood of data remaining in the cache depending on how
+ // it got there. Data cached from a READ or WRITE operation may be given
+ // higher, lower or equal priority to data entered into the cache for other
+ // means (like prefetch)
+ //
+
+ ReadRetentionPriority: DISK_CACHE_RETENTION_PRIORITY;
+ WriteRetentionPriority: DISK_CACHE_RETENTION_PRIORITY;
+
+ //
+ // Requests for a larger number of blocks than this may have prefetching
+ // disabled. If this value is set to 0 prefetch will be disabled.
+ //
+
+ DisablePrefetchTransferLength: WORD;
+
+ //
+ // If TRUE then ScalarPrefetch (below) will be valid. If FALSE then
+ // the minimum and maximum values should be treated as a block count
+ // (BlockPrefetch)
+ //
+
+ PrefetchScalar: ByteBool;
+
+ //
+ // Contains the minimum and maximum amount of data which will be
+ // will be prefetched into the cache on a disk operation. This value
+ // may either be a scalar multiplier of the transfer length of the request,
+ // or an abolute number of disk blocks. PrefetchScalar (above) indicates
+ // which interpretation is used.
+ //
+
+ case Integer of
+ 0: (ScalarPrefetch: TDCIScalarPrefetch);
+ 1: (BlockPrefetch: TDCIBlockPrefetch);
+
+ end;
+ {$EXTERNALSYM _DISK_CACHE_INFORMATION}
+ DISK_CACHE_INFORMATION = _DISK_CACHE_INFORMATION;
+ {$EXTERNALSYM DISK_CACHE_INFORMATION}
+ TDiskCacheInformation = DISK_CACHE_INFORMATION;
+ PDiskCacheInformation = PDISK_CACHE_INFORMATION;
+
+//
+// IOCTL_DISK_GROW_PARTITION will update the size of a partition
+// by adding sectors to the length. The number of sectors must be
+// predetermined by examining PARTITION_INFORMATION.
+//
+
+ PDISK_GROW_PARTITION = ^DISK_GROW_PARTITION;
+ {$EXTERNALSYM PDISK_GROW_PARTITION}
+ _DISK_GROW_PARTITION = record
+ PartitionNumber: DWORD;
+ BytesToGrow: LARGE_INTEGER;
+ end;
+ {$EXTERNALSYM _DISK_GROW_PARTITION}
+ DISK_GROW_PARTITION = _DISK_GROW_PARTITION;
+ {$EXTERNALSYM DISK_GROW_PARTITION}
+ TDiskGrowPartition = DISK_GROW_PARTITION;
+ PDiskGrowPartition = PDISK_GROW_PARTITION;
+
+///////////////////////////////////////////////////////
+// //
+// The following structures define disk performance //
+// statistics: specifically the locations of all the //
+// reads and writes which have occured on the disk. //
+// //
+// To use these structures, you must issue an IOCTL_ //
+// DISK_HIST_STRUCTURE (with a DISK_HISTOGRAM) to //
+// obtain the basic histogram information. The //
+// number of buckets which must allocated is part of //
+// this structure. Allocate the required number of //
+// buckets and call an IOCTL_DISK_HIST_DATA to fill //
+// in the data //
+// //
+///////////////////////////////////////////////////////
+
+const
+ HIST_NO_OF_BUCKETS = 24;
+ {$EXTERNALSYM HIST_NO_OF_BUCKETS}
+
+type
+ PHISTOGRAM_BUCKET = ^HISTOGRAM_BUCKET;
+ {$EXTERNALSYM PHISTOGRAM_BUCKET}
+ _HISTOGRAM_BUCKET = record
+ Reads: DWORD;
+ Writes: DWORD;
+ end;
+ {$EXTERNALSYM _HISTOGRAM_BUCKET}
+ HISTOGRAM_BUCKET = _HISTOGRAM_BUCKET;
+ {$EXTERNALSYM HISTOGRAM_BUCKET}
+ THistogramBucket = HISTOGRAM_BUCKET;
+ PHistogramBucket = PHISTOGRAM_BUCKET;
+
+const
+ HISTOGRAM_BUCKET_SIZE = SizeOf(HISTOGRAM_BUCKET);
+ {$EXTERNALSYM HISTOGRAM_BUCKET_SIZE}
+
+type
+ PDISK_HISTOGRAM = ^DISK_HISTOGRAM;
+ {$EXTERNALSYM PDISK_HISTOGRAM}
+ _DISK_HISTOGRAM = record
+ DiskSize: LARGE_INTEGER;
+ Start: LARGE_INTEGER;
+ End_: LARGE_INTEGER;
+ Average: LARGE_INTEGER;
+ AverageRead: LARGE_INTEGER;
+ AverageWrite: LARGE_INTEGER;
+ Granularity: DWORD;
+ Size: DWORD;
+ ReadCount: DWORD;
+ WriteCount: DWORD;
+ Histogram: PHISTOGRAM_BUCKET;
+ end;
+ {$EXTERNALSYM _DISK_HISTOGRAM}
+ DISK_HISTOGRAM = _DISK_HISTOGRAM;
+ {$EXTERNALSYM DISK_HISTOGRAM}
+ TDiskHistogram = DISK_HISTOGRAM;
+ PDiskHistogram = PDISK_HISTOGRAM;
+
+const
+ DISK_HISTOGRAM_SIZE = SizeOf(DISK_HISTOGRAM);
+ {$EXTERNALSYM DISK_HISTOGRAM_SIZE}
+
+///////////////////////////////////////////////////////
+// //
+// The following structures define disk debugging //
+// capabilities. The IOCTLs are directed to one of //
+// the two disk filter drivers. //
+// //
+// DISKPERF is a utilty for collecting disk request //
+// statistics. //
+// //
+// SIMBAD is a utility for injecting faults in //
+// IO requests to disks. //
+// //
+///////////////////////////////////////////////////////
+
+//
+// The following structure is exchanged on an IOCTL_DISK_GET_PERFORMANCE
+// request. This ioctl collects summary disk request statistics used
+// in measuring performance.
+//
+
+type
+ PDISK_PERFORMANCE = ^DISK_PERFORMANCE;
+ {$EXTERNALSYM PDISK_PERFORMANCE}
+ _DISK_PERFORMANCE = record
+ BytesRead: LARGE_INTEGER;
+ BytesWritten: LARGE_INTEGER;
+ ReadTime: LARGE_INTEGER;
+ WriteTime: LARGE_INTEGER;
+ IdleTime: LARGE_INTEGER;
+ ReadCount: DWORD;
+ WriteCount: DWORD;
+ QueueDepth: DWORD;
+ SplitCount: DWORD;
+ QueryTime: LARGE_INTEGER;
+ StorageDeviceNumber: DWORD;
+ StorageManagerName: array [0..7] of WCHAR;
+ end;
+ {$EXTERNALSYM _DISK_PERFORMANCE}
+ DISK_PERFORMANCE = _DISK_PERFORMANCE;
+ {$EXTERNALSYM DISK_PERFORMANCE}
+ TDiskPerformance = DISK_PERFORMANCE;
+ PDiskPerformance = PDISK_PERFORMANCE;
+
+//
+// This structure defines the disk logging record. When disk logging
+// is enabled, one of these is written to an internal buffer for each
+// disk request.
+//
+
+ PDISK_RECORD = ^DISK_RECORD;
+ {$EXTERNALSYM PDISK_RECORD}
+ _DISK_RECORD = record
+ ByteOffset: LARGE_INTEGER;
+ StartTime: LARGE_INTEGER;
+ EndTime: LARGE_INTEGER;
+ VirtualAddress: PVOID;
+ NumberOfBytes: DWORD;
+ DeviceNumber: BYTE;
+ ReadRequest: ByteBool;
+ end;
+ {$EXTERNALSYM _DISK_RECORD}
+ DISK_RECORD = _DISK_RECORD;
+ {$EXTERNALSYM DISK_RECORD}
+ TDiskRecord = DISK_RECORD;
+ PDiskRecord = PDISK_RECORD;
+
+//
+// The following structure is exchanged on an IOCTL_DISK_LOG request.
+// Not all fields are valid with each function type.
+//
+
+ PDISK_LOGGING = ^DISK_LOGGING;
+ {$EXTERNALSYM PDISK_LOGGING}
+ _DISK_LOGGING = record
+ Function_: BYTE;
+ BufferAddress: PVOID;
+ BufferSize: DWORD;
+ end;
+ {$EXTERNALSYM _DISK_LOGGING}
+ DISK_LOGGING = _DISK_LOGGING;
+ {$EXTERNALSYM DISK_LOGGING}
+ TDiskLogging = DISK_LOGGING;
+ PDiskLogging = PDISK_LOGGING;
+
+//
+// Disk logging functions
+//
+// Start disk logging. Only the Function and BufferSize fields are valid.
+//
+
+const
+ DISK_LOGGING_START = 0;
+ {$EXTERNALSYM DISK_LOGGING_START}
+
+//
+// Stop disk logging. Only the Function field is valid.
+//
+
+ DISK_LOGGING_STOP = 1;
+ {$EXTERNALSYM DISK_LOGGING_STOP}
+
+//
+// Return disk log. All fields are valid. Data will be copied from internal
+// buffer to buffer specified for the number of bytes requested.
+//
+
+ DISK_LOGGING_DUMP = 2;
+ {$EXTERNALSYM DISK_LOGGING_DUMP}
+
+//
+// DISK BINNING
+//
+// DISKPERF will keep counters for IO that falls in each of these ranges.
+// The application determines the number and size of the ranges.
+// Joe Lin wanted me to keep it flexible as possible, for instance, IO
+// sizes are interesting in ranges like 0-4096, 4097-16384, 16385-65536, 65537+.
+//
+
+ DISK_BINNING = 3;
+ {$EXTERNALSYM DISK_BINNING}
+
+//
+// Bin types
+//
+
+type
+ _BIN_TYPES = (RequestSize, RequestLocation);
+ {$EXTERNALSYM _BIN_TYPES}
+ BIN_TYPES = _BIN_TYPES;
+ {$EXTERNALSYM BIN_TYPES}
+ TBinTypes = _BIN_TYPES;
+
+//
+// Bin ranges
+//
+
+ PBIN_RANGE = ^BIN_RANGE;
+ {$EXTERNALSYM PBIN_RANGE}
+ _BIN_RANGE = record
+ StartValue: LARGE_INTEGER;
+ Length: LARGE_INTEGER;
+ end;
+ {$EXTERNALSYM _BIN_RANGE}
+ BIN_RANGE = _BIN_RANGE;
+ {$EXTERNALSYM BIN_RANGE}
+ TBinRange = BIN_RANGE;
+ PBinRange = PBIN_RANGE;
+
+//
+// Bin definition
+//
+
+ PPERF_BIN = ^PERF_BIN;
+ {$EXTERNALSYM PPERF_BIN}
+ _PERF_BIN = record
+ NumberOfBins: DWORD;
+ TypeOfBin: DWORD;
+ BinsRanges: array [0..0] of BIN_RANGE;
+ end;
+ {$EXTERNALSYM _PERF_BIN}
+ PERF_BIN = _PERF_BIN;
+ {$EXTERNALSYM PERF_BIN}
+ TPerfBin = PERF_BIN;
+ PPerfBin = PPERF_BIN;
+
+//
+// Bin count
+//
+
+ PBIN_COUNT = ^BIN_COUNT;
+ {$EXTERNALSYM PBIN_COUNT}
+ _BIN_COUNT = record
+ BinRange: BIN_RANGE;
+ BinCount: DWORD;
+ end;
+ {$EXTERNALSYM _BIN_COUNT}
+ BIN_COUNT = _BIN_COUNT;
+ {$EXTERNALSYM BIN_COUNT}
+ TBinCount = BIN_COUNT;
+ PBinCount = PBIN_COUNT;
+
+//
+// Bin results
+//
+
+ PBIN_RESULTS = ^BIN_RESULTS;
+ {$EXTERNALSYM PBIN_RESULTS}
+ _BIN_RESULTS = record
+ NumberOfBins: DWORD;
+ BinCounts: array [0..0] of BIN_COUNT;
+ end;
+ {$EXTERNALSYM _BIN_RESULTS}
+ BIN_RESULTS = _BIN_RESULTS;
+ {$EXTERNALSYM BIN_RESULTS}
+ TBinResults = BIN_RESULTS;
+ PBinResults = PBIN_RESULTS;
+
+//
+// Data structures for SMART drive fault prediction.
+//
+// GETVERSIONINPARAMS contains the data returned from the
+// Get Driver Version function.
+//
+
+//#include <pshpack1.h>
+
+ LPGETVERSIONINPARAMS = ^GETVERSIONINPARAMS;
+ {$EXTERNALSYM LPGETVERSIONINPARAMS}
+ _GETVERSIONINPARAMS = packed record
+ bVersion: BYTE; // Binary driver version.
+ bRevision: BYTE; // Binary driver revision.
+ bReserved: BYTE; // Not used.
+ bIDEDeviceMap: BYTE; // Bit map of IDE devices.
+ fCapabilities: DWORD; // Bit mask of driver capabilities.
+ dwReserved: array [0..3] of DWORD; // For future use.
+ end;
+ {$EXTERNALSYM _GETVERSIONINPARAMS}
+ GETVERSIONINPARAMS = _GETVERSIONINPARAMS;
+ {$EXTERNALSYM GETVERSIONINPARAMS}
+ TGetVersionInParams = GETVERSIONINPARAMS;
+ PGetVersionInParams = LPGETVERSIONINPARAMS;
+
+//#include <poppack.h>
+
+//
+// Bits returned in the fCapabilities member of GETVERSIONINPARAMS
+//
+
+const
+ CAP_ATA_ID_CMD = 1; // ATA ID command supported
+ {$EXTERNALSYM CAP_ATA_ID_CMD}
+ CAP_ATAPI_ID_CMD = 2; // ATAPI ID command supported
+ {$EXTERNALSYM CAP_ATAPI_ID_CMD}
+ CAP_SMART_CMD = 4; // SMART commannds supported
+ {$EXTERNALSYM CAP_SMART_CMD}
+
+//
+// IDE registers
+//
+
+//#include <pshpack1.h>
+
+type
+ LPIDEREGS = ^IDEREGS;
+ {$EXTERNALSYM LPIDEREGS}
+ _IDEREGS = packed record
+ bFeaturesReg: BYTE; // Used for specifying SMART "commands".
+ bSectorCountReg: BYTE; // IDE sector count register
+ bSectorNumberReg: BYTE; // IDE sector number register
+ bCylLowReg: BYTE; // IDE low order cylinder value
+ bCylHighReg: BYTE; // IDE high order cylinder value
+ bDriveHeadReg: BYTE; // IDE drive/head register
+ bCommandReg: BYTE; // Actual IDE command.
+ bReserved: BYTE; // reserved for future use. Must be zero.
+ end;
+ {$EXTERNALSYM _IDEREGS}
+ IDEREGS = _IDEREGS;
+ {$EXTERNALSYM IDEREGS}
+ TIdeRegs = IDEREGS;
+ PIdeRegs = LPIDEREGS;
+
+//#include <poppack.h>
+
+//
+// Valid values for the bCommandReg member of IDEREGS.
+//
+
+const
+ ATAPI_ID_CMD = $A1; // Returns ID sector for ATAPI.
+ {$EXTERNALSYM ATAPI_ID_CMD}
+ ID_CMD = $EC; // Returns ID sector for ATA.
+ {$EXTERNALSYM ID_CMD}
+ SMART_CMD = $B0; // Performs SMART cmd.
+ // Requires valid bFeaturesReg,
+ // bCylLowReg, and bCylHighReg
+ {$EXTERNALSYM SMART_CMD}
+
+//
+// Cylinder register defines for SMART command
+//
+
+ SMART_CYL_LOW = $4F;
+ {$EXTERNALSYM SMART_CYL_LOW}
+ SMART_CYL_HI = $C2;
+ {$EXTERNALSYM SMART_CYL_HI}
+
+//
+// SENDCMDINPARAMS contains the input parameters for the
+// Send Command to Drive function.
+//
+
+//#include <pshpack1.h>
+
+type
+ LPSENDCMDINPARAMS = ^SENDCMDINPARAMS;
+ {$EXTERNALSYM LPSENDCMDINPARAMS}
+ _SENDCMDINPARAMS = packed record
+ cBufferSize: DWORD; // Buffer size in bytes
+ irDriveRegs: IDEREGS; // Structure with drive register values.
+ bDriveNumber: BYTE; // Physical drive number to send
+ // command to (0,1,2,3).
+ bReserved: array [0..2] of BYTE; // Reserved for future expansion.
+ dwReserved: array [0..3] of DWORD; // For future use.
+ bBuffer: array [0..0] of BYTE; // Input buffer.
+ end;
+ {$EXTERNALSYM _SENDCMDINPARAMS}
+ SENDCMDINPARAMS = _SENDCMDINPARAMS;
+ {$EXTERNALSYM SENDCMDINPARAMS}
+ TSendCmdInParams = SENDCMDINPARAMS;
+ PSendCmdInParams = LPSENDCMDINPARAMS;
+
+//#include <poppack.h>
+
+//
+// Status returned from driver
+//
+
+//#include <pshpack1.h>
+
+ LPDRIVERSTATUS = ^DRIVERSTATUS;
+ {$EXTERNALSYM LPDRIVERSTATUS}
+ _DRIVERSTATUS = packed record
+ bDriverError: BYTE; // Error code from driver,
+ // or 0 if no error.
+ bIDEError: BYTE; // Contents of IDE Error register.
+ // Only valid when bDriverError
+ // is SMART_IDE_ERROR.
+ bReserved: array [0..1] of BYTE; // Reserved for future expansion.
+ dwReserved: array [0..1] of DWORD; // Reserved for future expansion.
+ end;
+ {$EXTERNALSYM _DRIVERSTATUS}
+ DRIVERSTATUS = _DRIVERSTATUS;
+ {$EXTERNALSYM DRIVERSTATUS}
+ TDriverStatus = DRIVERSTATUS;
+ PDriverStatus = LPDRIVERSTATUS;
+
+//#include <poppack.h>
+
+//
+// bDriverError values
+//
+
+const
+ SMART_NO_ERROR = 0; // No error
+ {$EXTERNALSYM SMART_NO_ERROR}
+ SMART_IDE_ERROR = 1; // Error from IDE controller
+ {$EXTERNALSYM SMART_IDE_ERROR}
+ SMART_INVALID_FLAG = 2; // Invalid command flag
+ {$EXTERNALSYM SMART_INVALID_FLAG}
+ SMART_INVALID_COMMAND = 3; // Invalid command byte
+ {$EXTERNALSYM SMART_INVALID_COMMAND}
+ SMART_INVALID_BUFFER = 4; // Bad buffer (null, invalid addr..)
+ {$EXTERNALSYM SMART_INVALID_BUFFER}
+ SMART_INVALID_DRIVE = 5; // Drive number not valid
+ {$EXTERNALSYM SMART_INVALID_DRIVE}
+ SMART_INVALID_IOCTL = 6; // Invalid IOCTL
+ {$EXTERNALSYM SMART_INVALID_IOCTL}
+ SMART_ERROR_NO_MEM = 7; // Could not lock user's buffer
+ {$EXTERNALSYM SMART_ERROR_NO_MEM}
+ SMART_INVALID_REGISTER = 8; // Some IDE Register not valid
+ {$EXTERNALSYM SMART_INVALID_REGISTER}
+ SMART_NOT_SUPPORTED = 9; // Invalid cmd flag set
+ {$EXTERNALSYM SMART_NOT_SUPPORTED}
+ SMART_NO_IDE_DEVICE = 10; // Cmd issued to device not present
+ {$EXTERNALSYM SMART_NO_IDE_DEVICE}
+ // although drive number is valid
+
+//
+// SMART sub commands for execute offline diags
+//
+
+ SMART_OFFLINE_ROUTINE_OFFLINE = 0;
+ {$EXTERNALSYM SMART_OFFLINE_ROUTINE_OFFLINE}
+ SMART_SHORT_SELFTEST_OFFLINE = 1;
+ {$EXTERNALSYM SMART_SHORT_SELFTEST_OFFLINE}
+ SMART_EXTENDED_SELFTEST_OFFLINE = 2;
+ {$EXTERNALSYM SMART_EXTENDED_SELFTEST_OFFLINE}
+ SMART_ABORT_OFFLINE_SELFTEST = 127;
+ {$EXTERNALSYM SMART_ABORT_OFFLINE_SELFTEST}
+ SMART_SHORT_SELFTEST_CAPTIVE = 129;
+ {$EXTERNALSYM SMART_SHORT_SELFTEST_CAPTIVE}
+ SMART_EXTENDED_SELFTEST_CAPTIVE = 130;
+ {$EXTERNALSYM SMART_EXTENDED_SELFTEST_CAPTIVE}
+
+//#include <pshpack1.h>
+
+type
+ LPSENDCMDOUTPARAMS = ^SENDCMDOUTPARAMS;
+ {$EXTERNALSYM LPSENDCMDOUTPARAMS}
+ _SENDCMDOUTPARAMS = packed record
+ cBufferSize: DWORD; // Size of bBuffer in bytes
+ DriverStatus: DRIVERSTATUS; // Driver status structure.
+ bBuffer: array [0..0] of BYTE; // Buffer of arbitrary length in which to store the data read from the // drive.
+ end;
+ {$EXTERNALSYM _SENDCMDOUTPARAMS}
+ SENDCMDOUTPARAMS = _SENDCMDOUTPARAMS;
+ {$EXTERNALSYM SENDCMDOUTPARAMS}
+ TSendCmdOutParams = SENDCMDOUTPARAMS;
+ PSendCmdOutParams = LPSENDCMDOUTPARAMS;
+
+//#include <poppack.h>
+
+const
+ READ_ATTRIBUTE_BUFFER_SIZE = 512;
+ {$EXTERNALSYM READ_ATTRIBUTE_BUFFER_SIZE}
+ IDENTIFY_BUFFER_SIZE = 512;
+ {$EXTERNALSYM IDENTIFY_BUFFER_SIZE}
+ READ_THRESHOLD_BUFFER_SIZE = 512;
+ {$EXTERNALSYM READ_THRESHOLD_BUFFER_SIZE}
+ SMART_LOG_SECTOR_SIZE = 512;
+ {$EXTERNALSYM SMART_LOG_SECTOR_SIZE}
+
+//
+// Feature register defines for SMART "sub commands"
+//
+
+ READ_ATTRIBUTES = $D0;
+ {$EXTERNALSYM READ_ATTRIBUTES}
+ READ_THRESHOLDS = $D1;
+ {$EXTERNALSYM READ_THRESHOLDS}
+ ENABLE_DISABLE_AUTOSAVE = $D2;
+ {$EXTERNALSYM ENABLE_DISABLE_AUTOSAVE}
+ SAVE_ATTRIBUTE_VALUES = $D3;
+ {$EXTERNALSYM SAVE_ATTRIBUTE_VALUES}
+ EXECUTE_OFFLINE_DIAGS = $D4;
+ {$EXTERNALSYM EXECUTE_OFFLINE_DIAGS}
+ SMART_READ_LOG = $D5;
+ {$EXTERNALSYM SMART_READ_LOG}
+ SMART_WRITE_LOG = $d6;
+ {$EXTERNALSYM SMART_WRITE_LOG}
+ ENABLE_SMART = $D8;
+ {$EXTERNALSYM ENABLE_SMART}
+ DISABLE_SMART = $D9;
+ {$EXTERNALSYM DISABLE_SMART}
+ RETURN_SMART_STATUS = $DA;
+ {$EXTERNALSYM RETURN_SMART_STATUS}
+ ENABLE_DISABLE_AUTO_OFFLINE = $DB;
+ {$EXTERNALSYM ENABLE_DISABLE_AUTO_OFFLINE}
+
+ IOCTL_CHANGER_BASE = FILE_DEVICE_CHANGER;
+ {$EXTERNALSYM IOCTL_CHANGER_BASE}
+
+ IOCTL_CHANGER_GET_PARAMETERS = (
+ (IOCTL_CHANGER_BASE shl 16) or (FILE_READ_ACCESS shl 14) or
+ ($0000 shl 2) or METHOD_BUFFERED);
+ {$EXTERNALSYM IOCTL_CHANGER_GET_PARAMETERS}
+
+ IOCTL_CHANGER_GET_STATUS = (
+ (IOCTL_CHANGER_BASE shl 16) or (FILE_READ_ACCESS shl 14) or
+ ($0001 shl 2) or METHOD_BUFFERED);
+ {$EXTERNALSYM IOCTL_CHANGER_GET_STATUS}
+
+ IOCTL_CHANGER_GET_PRODUCT_DATA = (
+ (IOCTL_CHANGER_BASE shl 16) or (FILE_READ_ACCESS shl 14) or
+ ($0002 shl 2) or METHOD_BUFFERED);
+ {$EXTERNALSYM IOCTL_CHANGER_GET_PRODUCT_DATA}
+
+ IOCTL_CHANGER_SET_ACCESS = (
+ (IOCTL_CHANGER_BASE shl 16) or ((FILE_READ_ACCESS or FILE_WRITE_ACCESS) shl 14) or
+ ($0004 shl 2) or METHOD_BUFFERED);
+ {$EXTERNALSYM IOCTL_CHANGER_SET_ACCESS}
+
+ IOCTL_CHANGER_GET_ELEMENT_STATUS = (
+ (IOCTL_CHANGER_BASE shl 16) or ((FILE_READ_ACCESS or FILE_WRITE_ACCESS) shl 14) or
+ ($0005 shl 2) or METHOD_BUFFERED);
+ {$EXTERNALSYM IOCTL_CHANGER_GET_ELEMENT_STATUS}
+
+ IOCTL_CHANGER_INITIALIZE_ELEMENT_STATUS = (
+ (IOCTL_CHANGER_BASE shl 16) or (FILE_READ_ACCESS shl 14) or
+ ($0006 shl 2) or METHOD_BUFFERED);
+ {$EXTERNALSYM IOCTL_CHANGER_INITIALIZE_ELEMENT_STATUS}
+
+ IOCTL_CHANGER_SET_POSITION = (
+ (IOCTL_CHANGER_BASE shl 16) or (FILE_READ_ACCESS shl 14) or
+ ($0007 shl 2) or METHOD_BUFFERED);
+ {$EXTERNALSYM IOCTL_CHANGER_SET_POSITION}
+
+ IOCTL_CHANGER_EXCHANGE_MEDIUM = (
+ (IOCTL_CHANGER_BASE shl 16) or (FILE_READ_ACCESS shl 14) or
+ ($0008 shl 2) or METHOD_BUFFERED);
+ {$EXTERNALSYM IOCTL_CHANGER_EXCHANGE_MEDIUM}
+
+ IOCTL_CHANGER_MOVE_MEDIUM = (
+ (IOCTL_CHANGER_BASE shl 16) or (FILE_READ_ACCESS shl 14) or
+ ($0009 shl 2) or METHOD_BUFFERED);
+ {$EXTERNALSYM IOCTL_CHANGER_MOVE_MEDIUM}
+
+ IOCTL_CHANGER_REINITIALIZE_TRANSPORT = (
+ (IOCTL_CHANGER_BASE shl 16) or (FILE_READ_ACCESS shl 14) or
+ ($000A shl 2) or METHOD_BUFFERED);
+ {$EXTERNALSYM IOCTL_CHANGER_REINITIALIZE_TRANSPORT}
+
+ IOCTL_CHANGER_QUERY_VOLUME_TAGS = (
+ (IOCTL_CHANGER_BASE shl 16) or ((FILE_READ_ACCESS or FILE_WRITE_ACCESS) shl 14) or
+ ($000B shl 2) or METHOD_BUFFERED);
+ {$EXTERNALSYM IOCTL_CHANGER_QUERY_VOLUME_TAGS}
+
+ MAX_VOLUME_ID_SIZE = 36;
+ {$EXTERNALSYM MAX_VOLUME_ID_SIZE}
+ MAX_VOLUME_TEMPLATE_SIZE = 40;
+ {$EXTERNALSYM MAX_VOLUME_TEMPLATE_SIZE}
+
+ VENDOR_ID_LENGTH = 8;
+ {$EXTERNALSYM VENDOR_ID_LENGTH}
+ PRODUCT_ID_LENGTH = 16;
+ {$EXTERNALSYM PRODUCT_ID_LENGTH}
+ REVISION_LENGTH = 4;
+ {$EXTERNALSYM REVISION_LENGTH}
+ SERIAL_NUMBER_LENGTH = 32;
+ {$EXTERNALSYM SERIAL_NUMBER_LENGTH}
+
+//
+// Common structures describing elements.
+//
+
+type
+ _ELEMENT_TYPE = (
+ AllElements, // As defined by SCSI
+ ChangerTransport, // As defined by SCSI
+ ChangerSlot, // As defined by SCSI
+ ChangerIEPort, // As defined by SCSI
+ ChangerDrive, // As defined by SCSI
+ ChangerDoor, // Front panel, used to access internal of cabinet.
+ ChangerKeypad, // Keypad/input on front panel.
+ ChangerMaxElement); // Placeholder only. Not a valid type.
+ {$EXTERNALSYM _ELEMENT_TYPE}
+ ELEMENT_TYPE = _ELEMENT_TYPE;
+ {$EXTERNALSYM ELEMENT_TYPE}
+ PELEMENT_TYPE = ^ELEMENT_TYPE;
+ {$EXTERNALSYM PELEMENT_TYPE}
+ TElementType = ELEMENT_TYPE;
+ PElementType = PELEMENT_TYPE;
+
+ PCHANGER_ELEMENT = ^CHANGER_ELEMENT;
+ {$EXTERNALSYM PCHANGER_ELEMENT}
+ _CHANGER_ELEMENT = record
+ ElementType: ELEMENT_TYPE;
+ ElementAddress: DWORD;
+ end;
+ {$EXTERNALSYM _CHANGER_ELEMENT}
+ CHANGER_ELEMENT = _CHANGER_ELEMENT;
+ {$EXTERNALSYM CHANGER_ELEMENT}
+ TChangerElement = CHANGER_ELEMENT;
+ PChangerElement = PCHANGER_ELEMENT;
+
+ PCHANGER_ELEMENT_LIST = ^CHANGER_ELEMENT_LIST;
+ {$EXTERNALSYM PCHANGER_ELEMENT_LIST}
+ _CHANGER_ELEMENT_LIST = record
+ Element: CHANGER_ELEMENT;
+ NumberOfElements: DWORD;
+ end;
+ {$EXTERNALSYM _CHANGER_ELEMENT_LIST}
+ CHANGER_ELEMENT_LIST = _CHANGER_ELEMENT_LIST;
+ {$EXTERNALSYM CHANGER_ELEMENT_LIST}
+ TChangerElementList = CHANGER_ELEMENT_LIST;
+ PChangerElementList = PCHANGER_ELEMENT_LIST;
+
+//
+// Definitions for IOCTL_CHANGER_GET_PARAMETERS
+//
+
+//
+// Definitions for Features0 of GET_CHANGER_PARAMETERS
+//
+
+const
+ CHANGER_BAR_CODE_SCANNER_INSTALLED = $00000001; // The medium-changer has a bar code scanner installed.
+ {$EXTERNALSYM CHANGER_BAR_CODE_SCANNER_INSTALLED}
+ CHANGER_INIT_ELEM_STAT_WITH_RANGE = $00000002; // The medium-changer has the ability to initialize elements within a specified range.
+ {$EXTERNALSYM CHANGER_INIT_ELEM_STAT_WITH_RANGE}
+ CHANGER_CLOSE_IEPORT = $00000004; // The medium-changer has the ability to close the i/e port door.
+ {$EXTERNALSYM CHANGER_CLOSE_IEPORT}
+ CHANGER_OPEN_IEPORT = $00000008; // The medium-changer can open the i/e port door.
+ {$EXTERNALSYM CHANGER_OPEN_IEPORT}
+
+ CHANGER_STATUS_NON_VOLATILE = $00000010; // The medium-changer uses non-volatile memory for element status information.
+ {$EXTERNALSYM CHANGER_STATUS_NON_VOLATILE}
+ CHANGER_EXCHANGE_MEDIA = $00000020; // The medium-changer supports exchange operations.
+ {$EXTERNALSYM CHANGER_EXCHANGE_MEDIA}
+ CHANGER_CLEANER_SLOT = $00000040; // The medium-changer has a fixed slot designated for cleaner cartridges.
+ {$EXTERNALSYM CHANGER_CLEANER_SLOT}
+ CHANGER_LOCK_UNLOCK = $00000080; // The medium-changer can be (un)secured to (allow)prevent media removal.
+ {$EXTERNALSYM CHANGER_LOCK_UNLOCK}
+
+ CHANGER_CARTRIDGE_MAGAZINE = $00000100; // The medium-changer uses cartridge magazines for some storage slots.
+ {$EXTERNALSYM CHANGER_CARTRIDGE_MAGAZINE}
+ CHANGER_MEDIUM_FLIP = $00000200; // The medium-changer can flip medium.
+ {$EXTERNALSYM CHANGER_MEDIUM_FLIP}
+ CHANGER_POSITION_TO_ELEMENT = $00000400; // The medium-changer can position the transport to a particular element.
+ {$EXTERNALSYM CHANGER_POSITION_TO_ELEMENT}
+ CHANGER_REPORT_IEPORT_STATE = $00000800; // The medium-changer can determine whether media is present
+ {$EXTERNALSYM CHANGER_REPORT_IEPORT_STATE}
+ // in the IE Port.
+
+ CHANGER_STORAGE_DRIVE = $00001000; // The medium-changer can use a drive as an independent storage element.
+ {$EXTERNALSYM CHANGER_STORAGE_DRIVE}
+ CHANGER_STORAGE_IEPORT = $00002000; // The medium-changer can use a i/e port as an independent storage element.
+ {$EXTERNALSYM CHANGER_STORAGE_IEPORT}
+ CHANGER_STORAGE_SLOT = $00004000; // The medium-changer can use a slot as an independent storage element.
+ {$EXTERNALSYM CHANGER_STORAGE_SLOT}
+ CHANGER_STORAGE_TRANSPORT = $00008000; // The medium-changer can use a transport as an independent storage element.
+ {$EXTERNALSYM CHANGER_STORAGE_TRANSPORT}
+
+ CHANGER_DRIVE_CLEANING_REQUIRED = $00010000; // The drives controlled by the medium changer require periodic cleaning
+ {$EXTERNALSYM CHANGER_DRIVE_CLEANING_REQUIRED}
+ // initiated by an application.
+
+ CHANGER_PREDISMOUNT_EJECT_REQUIRED = $00020000; // The medium-changer requires a drive eject command to be issued, before a changer
+ {$EXTERNALSYM CHANGER_PREDISMOUNT_EJECT_REQUIRED}
+ // move / exchange command can be issued to the drive.
+
+ CHANGER_CLEANER_ACCESS_NOT_VALID = $00040000; // The access bit in GES isn't valid for cleaner cartridges.
+ {$EXTERNALSYM CHANGER_CLEANER_ACCESS_NOT_VALID}
+ CHANGER_PREMOUNT_EJECT_REQUIRED = $00080000; // The medium-changer requires a drive eject command to be issued
+ {$EXTERNALSYM CHANGER_PREMOUNT_EJECT_REQUIRED}
+ // before a move / exchange command can be issued with the drive as src/dst.
+
+ CHANGER_VOLUME_IDENTIFICATION = $00100000; // The medium-changer supports volume identification.
+ {$EXTERNALSYM CHANGER_VOLUME_IDENTIFICATION}
+ CHANGER_VOLUME_SEARCH = $00200000; // The medium-changer can search for volume information.
+ {$EXTERNALSYM CHANGER_VOLUME_SEARCH}
+ CHANGER_VOLUME_ASSERT = $00400000; // The medium-changer can verify volume information.
+ {$EXTERNALSYM CHANGER_VOLUME_ASSERT}
+ CHANGER_VOLUME_REPLACE = $00800000; // The medium-changer can replace volume information.
+ {$EXTERNALSYM CHANGER_VOLUME_REPLACE}
+ CHANGER_VOLUME_UNDEFINE = $01000000; // The medium-changer can undefine volume information.
+ {$EXTERNALSYM CHANGER_VOLUME_UNDEFINE}
+
+ CHANGER_SERIAL_NUMBER_VALID = $04000000; // The serial number reported in GetProductData is valid
+ {$EXTERNALSYM CHANGER_SERIAL_NUMBER_VALID}
+ // and unique.
+
+ CHANGER_DEVICE_REINITIALIZE_CAPABLE = $08000000; // The medium-changer can be issued a ChangerReinitializeUnit.
+ {$EXTERNALSYM CHANGER_DEVICE_REINITIALIZE_CAPABLE}
+ CHANGER_KEYPAD_ENABLE_DISABLE = $10000000; // Indicates that the keypad can be enabled/disabled.
+ {$EXTERNALSYM CHANGER_KEYPAD_ENABLE_DISABLE}
+ CHANGER_DRIVE_EMPTY_ON_DOOR_ACCESS = $20000000; // Drives must be empty before access via the door is possible.
+ {$EXTERNALSYM CHANGER_DRIVE_EMPTY_ON_DOOR_ACCESS}
+
+ CHANGER_RESERVED_BIT = DWORD($80000000); // Will be used to indicate Features1 capability bits.
+ {$EXTERNALSYM CHANGER_RESERVED_BIT}
+
+//
+// Definitions for Features1 of GET_CHANGER_PARAMETERS
+//
+
+ CHANGER_PREDISMOUNT_ALIGN_TO_SLOT = DWORD($80000001); // The transport must be prepositioned to the slot prior to ejecting the media.
+ {$EXTERNALSYM CHANGER_PREDISMOUNT_ALIGN_TO_SLOT}
+ CHANGER_PREDISMOUNT_ALIGN_TO_DRIVE = DWORD($80000002); // The transport must be prepositioned to the drive prior to ejecting the media.
+ {$EXTERNALSYM CHANGER_PREDISMOUNT_ALIGN_TO_DRIVE}
+ CHANGER_CLEANER_AUTODISMOUNT = DWORD($80000004); // The device will move the cleaner cartridge back into the slot when cleaning has completed.
+ {$EXTERNALSYM CHANGER_CLEANER_AUTODISMOUNT}
+ CHANGER_TRUE_EXCHANGE_CAPABLE = DWORD($80000008); // Device can do src -> dest2 exchanges.
+ {$EXTERNALSYM CHANGER_TRUE_EXCHANGE_CAPABLE}
+ CHANGER_SLOTS_USE_TRAYS = DWORD($80000010); // Slots have removable trays, requiring multiple moves for inject/eject.
+ {$EXTERNALSYM CHANGER_SLOTS_USE_TRAYS}
+ CHANGER_RTN_MEDIA_TO_ORIGINAL_ADDR = DWORD($80000020); // Media must be returned to the slot from which it originated after a move to another element.
+ {$EXTERNALSYM CHANGER_RTN_MEDIA_TO_ORIGINAL_ADDR}
+ CHANGER_CLEANER_OPS_NOT_SUPPORTED = DWORD($80000040); // Automated cleaning operations are not supported on this device.
+ {$EXTERNALSYM CHANGER_CLEANER_OPS_NOT_SUPPORTED}
+ CHANGER_IEPORT_USER_CONTROL_OPEN = DWORD($80000080); // Indicates that user action is necessary to open a closed ieport.
+ {$EXTERNALSYM CHANGER_IEPORT_USER_CONTROL_OPEN}
+ CHANGER_IEPORT_USER_CONTROL_CLOSE = DWORD($80000100); // Indicates that user action is necessary to close an opened ieport.
+ {$EXTERNALSYM CHANGER_IEPORT_USER_CONTROL_CLOSE}
+ CHANGER_MOVE_EXTENDS_IEPORT = DWORD($80000200); // Indicates that a move media to the ieport extends the tray.
+ {$EXTERNALSYM CHANGER_MOVE_EXTENDS_IEPORT}
+ CHANGER_MOVE_RETRACTS_IEPORT = DWORD($80000400); // Indicates that a move media from the ieport retracts the tray.
+ {$EXTERNALSYM CHANGER_MOVE_RETRACTS_IEPORT}
+
+//
+// Definitions for MoveFrom, ExchangeFrom, and PositionCapabilities
+//
+
+ CHANGER_TO_TRANSPORT = $01; // The device can carry out the operation to a transport from the specified element.
+ {$EXTERNALSYM CHANGER_TO_TRANSPORT}
+ CHANGER_TO_SLOT = $02; // The device can carry out the operation to a slot from the specified element.
+ {$EXTERNALSYM CHANGER_TO_SLOT}
+ CHANGER_TO_IEPORT = $04; // The device can carry out the operation to an IE Port from the specified element.
+ {$EXTERNALSYM CHANGER_TO_IEPORT}
+ CHANGER_TO_DRIVE = $08; // The device can carry out the operation to a drive from the specified element.
+ {$EXTERNALSYM CHANGER_TO_DRIVE}
+
+//
+// Definitions for LockUnlockCapabilities
+//
+
+ LOCK_UNLOCK_IEPORT = $01; // The device can lock/unlock the ieport(s).
+ {$EXTERNALSYM LOCK_UNLOCK_IEPORT}
+ LOCK_UNLOCK_DOOR = $02; // The device can lock/unlock the door(s).
+ {$EXTERNALSYM LOCK_UNLOCK_DOOR}
+ LOCK_UNLOCK_KEYPAD = $04; // The device can lock/unlock the keypad.
+ {$EXTERNALSYM LOCK_UNLOCK_KEYPAD}
+
+type
+ PGET_CHANGER_PARAMETERS = ^GET_CHANGER_PARAMETERS;
+ {$EXTERNALSYM PGET_CHANGER_PARAMETERS}
+ _GET_CHANGER_PARAMETERS = record
+ //
+ // Size of the structure. Can be used for versioning.
+ //
+ Size: DWORD;
+ //
+ // Number of N element(s) as defined by the Element Address Page (or equivalent...).
+ //
+ NumberTransportElements: WORD;
+ NumberStorageElements: WORD; // for data cartridges only
+ NumberCleanerSlots: WORD; // for cleaner cartridges
+ NumberIEElements: WORD;
+ NumberDataTransferElements: WORD;
+ //
+ // Number of doors/front panels (allows user entry into the cabinet).
+ //
+ NumberOfDoors: WORD;
+ //
+ // The device-specific address (from user manual of the device) of the first N element. Used
+ // by the UI to relate the various elements to the user.
+ //
+ FirstSlotNumber: WORD;
+ FirstDriveNumber: WORD;
+ FirstTransportNumber: WORD;
+ FirstIEPortNumber: WORD;
+ FirstCleanerSlotAddress: WORD;
+ //
+ // Indicates the capacity of each magazine, if they exist.
+ //
+ MagazineSize: WORD;
+ //
+ // Specifies the approximate number of seconds for when a cleaning should be completed.
+ // Only applicable if drive cleaning is supported. See Features0.
+ //
+ DriveCleanTimeout: DWORD;
+ //
+ // See features bits, above.
+ //
+ Features0: DWORD;
+ Features1: DWORD;
+ //
+ // Bitmask defining Move from N element to element. Defined by Device Capabilities Page (or equivalent).
+ // AND-masking with the TO_XXX values will indicate legal destinations.
+ //
+ MoveFromTransport: BYTE;
+ MoveFromSlot: BYTE;
+ MoveFromIePort: BYTE;
+ MoveFromDrive: BYTE;
+ //
+ // Bitmask defining Exchange from N element to element. Defined by Device Capabilities Page (or equivalent).
+ // AND-masking with the TO_XXX values will indicate legal destinations.
+ //
+ ExchangeFromTransport: BYTE;
+ ExchangeFromSlot: BYTE;
+ ExchangeFromIePort: BYTE;
+ ExchangeFromDrive: BYTE;
+ //
+ // Bitmask defining which elements are capable of lock/unlock. Valid only if
+ // CHANGER_LOCK_UNLOCK is set in Features0.
+ //
+ LockUnlockCapabilities: BYTE;
+ //
+ // Bitmask defining which elements valid for positioning operations. Valid only if
+ // CHANGER_POSITION_TO_ELEMENT is set in Features0.
+ //
+ PositionCapabilities: BYTE;
+ //
+ // For future expansion.
+ //
+ Reserved1: array [0..1] of BYTE;
+ Reserved2: array [0..1] of DWORD;
+ end;
+ {$EXTERNALSYM _GET_CHANGER_PARAMETERS}
+ GET_CHANGER_PARAMETERS = _GET_CHANGER_PARAMETERS;
+ {$EXTERNALSYM GET_CHANGER_PARAMETERS}
+ TGetChangerParameters = GET_CHANGER_PARAMETERS;
+ PGetChangerParameters = PGET_CHANGER_PARAMETERS;
+
+//
+// Definitions for IOCTL_CHANGER_GET_PRODUCT_DATA
+//
+
+ PCHANGER_PRODUCT_DATA = ^CHANGER_PRODUCT_DATA;
+ {$EXTERNALSYM PCHANGER_PRODUCT_DATA}
+ _CHANGER_PRODUCT_DATA = record
+ //
+ // Device manufacturer's name - based on inquiry data
+ //
+ VendorId: array [0..VENDOR_ID_LENGTH - 1] of BYTE;
+ //
+ // Product identification as defined by the vendor - based on Inquiry data
+ //
+ ProductId: array [0..PRODUCT_ID_LENGTH - 1] of BYTE;
+ //
+ // Product revision as defined by the vendor.
+ //
+ Revision: array [0..REVISION_LENGTH - 1] of BYTE;
+ //
+ // Vendor unique value used to globally identify this device. Can
+ // be from Vital Product Data, for example.
+ //
+ SerialNumber: array [0..SERIAL_NUMBER_LENGTH - 1] of BYTE;
+ //
+ // Indicates device type of data transports, as defined by SCSI-2.
+ //
+ DeviceType: BYTE;
+ end;
+ {$EXTERNALSYM _CHANGER_PRODUCT_DATA}
+ CHANGER_PRODUCT_DATA = _CHANGER_PRODUCT_DATA;
+ {$EXTERNALSYM CHANGER_PRODUCT_DATA}
+ TChangerProductData = CHANGER_PRODUCT_DATA;
+ PChangerProductData = PCHANGER_PRODUCT_DATA;
+
+//
+// Definitions for IOCTL_CHANGER_SET_ACCESS
+//
+
+const
+ LOCK_ELEMENT = 0;
+ {$EXTERNALSYM LOCK_ELEMENT}
+ UNLOCK_ELEMENT = 1;
+ {$EXTERNALSYM UNLOCK_ELEMENT}
+ EXTEND_IEPORT = 2;
+ {$EXTERNALSYM EXTEND_IEPORT}
+ RETRACT_IEPORT = 3;
+ {$EXTERNALSYM RETRACT_IEPORT}
+
+type
+ PCHANGER_SET_ACCESS = ^CHANGER_SET_ACCESS;
+ {$EXTERNALSYM PCHANGER_SET_ACCESS}
+ _CHANGER_SET_ACCESS = record
+ //
+ // Element can be ChangerIEPort, ChangerDoor, ChangerKeypad
+ //
+ Element: CHANGER_ELEMENT;
+ //
+ // See above for possible operations.
+ //
+ Control: DWORD;
+ end;
+ {$EXTERNALSYM _CHANGER_SET_ACCESS}
+ CHANGER_SET_ACCESS = _CHANGER_SET_ACCESS;
+ {$EXTERNALSYM CHANGER_SET_ACCESS}
+ TChangerSetAccess = CHANGER_SET_ACCESS;
+ PChangerSetAccess = PCHANGER_SET_ACCESS;
+
+//
+// Definitions for IOCTL_CHANGER_GET_ELEMENT_STATUS
+//
+
+//
+// Input buffer.
+//
+
+ PCHANGER_READ_ELEMENT_STATUS = ^CHANGER_READ_ELEMENT_STATUS;
+ {$EXTERNALSYM PCHANGER_READ_ELEMENT_STATUS}
+ _CHANGER_READ_ELEMENT_STATUS = record
+ //
+ // List describing the elements and range on which to return information.
+ //
+ ElementList: CHANGER_ELEMENT_LIST;
+ //
+ // Indicates whether volume tag information is to be returned.
+ //
+ VolumeTagInfo: ByteBool;
+ end;
+ {$EXTERNALSYM _CHANGER_READ_ELEMENT_STATUS}
+ CHANGER_READ_ELEMENT_STATUS = _CHANGER_READ_ELEMENT_STATUS;
+ {$EXTERNALSYM CHANGER_READ_ELEMENT_STATUS}
+ TChangerReadElementStatus = CHANGER_READ_ELEMENT_STATUS;
+ PChangerReadElementStatus = PCHANGER_READ_ELEMENT_STATUS;
+
+//
+// Output buffer.
+//
+
+ PCHANGER_ELEMENT_STATUS = ^CHANGER_ELEMENT_STATUS;
+ {$EXTERNALSYM PCHANGER_ELEMENT_STATUS}
+ _CHANGER_ELEMENT_STATUS = record
+ //
+ // Element to which this structure refers.
+ //
+ Element: CHANGER_ELEMENT;
+ //
+ // Address of the element from which the media was originally moved.
+ // Valid if ELEMENT_STATUS_SVALID bit of Flags DWORD is set.
+ // Needs to be converted to a zero-based offset from the device-unique value.
+ //
+ SrcElementAddress: CHANGER_ELEMENT;
+ //
+ // See below.
+ //
+ Flags: DWORD;
+ //
+ // See below for possible values.
+ //
+ ExceptionCode: DWORD;
+ //
+ // Scsi Target Id of this element.
+ // Valid only if ELEMENT_STATUS_ID_VALID is set in Flags.
+ //
+ TargetId: BYTE;
+ //
+ // LogicalUnitNumber of this element.
+ // Valid only if ELEMENT_STATUS_LUN_VALID is set in Flags.
+ //
+ Lun: BYTE;
+ Reserved: WORD;
+ //
+ // Primary volume identification for the media.
+ // Valid only if ELEMENT_STATUS_PVOLTAG bit is set in Flags.
+ //
+ PrimaryVolumeID: array [0..MAX_VOLUME_ID_SIZE - 1] of BYTE;
+ //
+ // Alternate volume identification for the media.
+ // Valid for two-sided media only, and pertains to the id. of the inverted side.
+ // Valid only if ELEMENT_STATUS_AVOLTAG bit is set in Flags.
+ //
+ AlternateVolumeID: array [0..MAX_VOLUME_ID_SIZE - 1] of BYTE;
+ end;
+ {$EXTERNALSYM _CHANGER_ELEMENT_STATUS}
+ CHANGER_ELEMENT_STATUS = _CHANGER_ELEMENT_STATUS;
+ {$EXTERNALSYM CHANGER_ELEMENT_STATUS}
+ TChangerElementStatus = CHANGER_ELEMENT_STATUS;
+ PChangerElementStatus = PCHANGER_ELEMENT_STATUS;
+
+ PCHANGER_ELEMENT_STATUS_EX = ^CHANGER_ELEMENT_STATUS_EX;
+ {$EXTERNALSYM PCHANGER_ELEMENT_STATUS_EX}
+ _CHANGER_ELEMENT_STATUS_EX = record
+ //
+ // Element to which this structure refers.
+ //
+ Element: CHANGER_ELEMENT;
+ //
+ // Address of the element from which the media was originally moved.
+ // Valid if ELEMENT_STATUS_SVALID bit of Flags DWORD is set.
+ // Needs to be converted to a zero-based offset from the device-unique value.
+ //
+ SrcElementAddress: CHANGER_ELEMENT;
+ //
+ // See below.
+ //
+ Flags: DWORD;
+ //
+ // See below for possible values.
+ //
+ ExceptionCode: DWORD;
+ //
+ // Scsi Target Id of this element.
+ // Valid only if ELEMENT_STATUS_ID_VALID is set in Flags.
+ //
+ TargetId: BYTE;
+ //
+ // LogicalUnitNumber of this element.
+ // Valid only if ELEMENT_STATUS_LUN_VALID is set in Flags.
+ //
+ Lun: BYTE;
+ Reserved: WORD;
+ //
+ // Primary volume identification for the media.
+ // Valid only if ELEMENT_STATUS_PVOLTAG bit is set in Flags.
+ //
+ PrimaryVolumeID: array [0..MAX_VOLUME_ID_SIZE - 1] of BYTE;
+ //
+ // Alternate volume identification for the media.
+ // Valid for two-sided media only, and pertains to the id. of the inverted side.
+ // Valid only if ELEMENT_STATUS_AVOLTAG bit is set in Flags.
+ //
+ AlternateVolumeID: array [0..MAX_VOLUME_ID_SIZE - 1] of BYTE;
+ //
+ // Vendor ID
+ //
+ VendorIdentification: array [0..VENDOR_ID_LENGTH - 1] of BYTE;
+ //
+ // Product ID
+ //
+ ProductIdentification: array [0..PRODUCT_ID_LENGTH - 1] of BYTE;
+ //
+ // Serial number
+ //
+ SerialNumber: array [0..SERIAL_NUMBER_LENGTH - 1] of BYTE;
+ end;
+ {$EXTERNALSYM _CHANGER_ELEMENT_STATUS_EX}
+ CHANGER_ELEMENT_STATUS_EX = _CHANGER_ELEMENT_STATUS_EX;
+ {$EXTERNALSYM CHANGER_ELEMENT_STATUS_EX}
+ TChangerElementStatusEx = CHANGER_ELEMENT_STATUS_EX;
+ PChangerElementStatusEx = PCHANGER_ELEMENT_STATUS_EX;
+
+//
+// Possible flag values
+//
+
+const
+ ELEMENT_STATUS_FULL = $00000001; // Element contains a unit of media.
+ {$EXTERNALSYM ELEMENT_STATUS_FULL}
+ ELEMENT_STATUS_IMPEXP = $00000002; // Media in i/e port was placed there by an operator.
+ {$EXTERNALSYM ELEMENT_STATUS_IMPEXP}
+ ELEMENT_STATUS_EXCEPT = $00000004; // Element is in an abnormal state; check ExceptionCode field for more information.
+ {$EXTERNALSYM ELEMENT_STATUS_EXCEPT}
+ ELEMENT_STATUS_ACCESS = $00000008; // Access to the i/e port from the medium changer is allowed.
+ {$EXTERNALSYM ELEMENT_STATUS_ACCESS}
+ ELEMENT_STATUS_EXENAB = $00000010; // Export of media is supported.
+ {$EXTERNALSYM ELEMENT_STATUS_EXENAB}
+ ELEMENT_STATUS_INENAB = $00000020; // Import of media is supported.
+ {$EXTERNALSYM ELEMENT_STATUS_INENAB}
+
+ ELEMENT_STATUS_PRODUCT_DATA = $00000040; // Serial number valid for the drive
+ {$EXTERNALSYM ELEMENT_STATUS_PRODUCT_DATA}
+
+ ELEMENT_STATUS_LUN_VALID = $00001000; // Lun information is valid.
+ {$EXTERNALSYM ELEMENT_STATUS_LUN_VALID}
+ ELEMENT_STATUS_ID_VALID = $00002000; // SCSI Id information is valid.
+ {$EXTERNALSYM ELEMENT_STATUS_ID_VALID}
+ ELEMENT_STATUS_NOT_BUS = $00008000; // Lun and SCSI Id fields are not on same bus as medium changer.
+ {$EXTERNALSYM ELEMENT_STATUS_NOT_BUS}
+ ELEMENT_STATUS_INVERT = $00400000; // Media in element was inverted (valid only if ELEMENT_STATUS_SVALID bit is set)
+ {$EXTERNALSYM ELEMENT_STATUS_INVERT}
+
+ ELEMENT_STATUS_SVALID = $00800000; // SourceElementAddress field and ELEMENT_STATUS_INVERT bit are valid.
+ {$EXTERNALSYM ELEMENT_STATUS_SVALID}
+ ELEMENT_STATUS_PVOLTAG = $10000000; // Primary volume information is valid.
+ {$EXTERNALSYM ELEMENT_STATUS_PVOLTAG}
+ ELEMENT_STATUS_AVOLTAG = $20000000; // Alternate volume information is valid.
+ {$EXTERNALSYM ELEMENT_STATUS_AVOLTAG}
+
+//
+// ExceptionCode values.
+//
+
+ ERROR_LABEL_UNREADABLE = $00000001; // Bar code scanner could not read bar code label.
+ {$EXTERNALSYM ERROR_LABEL_UNREADABLE}
+ ERROR_LABEL_QUESTIONABLE = $00000002; // Label could be invalid due to unit attention condition.
+ {$EXTERNALSYM ERROR_LABEL_QUESTIONABLE}
+ ERROR_SLOT_NOT_PRESENT = $00000004; // Slot is currently not addressable in the device.
+ {$EXTERNALSYM ERROR_SLOT_NOT_PRESENT}
+ ERROR_DRIVE_NOT_INSTALLED = $00000008; // Drive is not installed.
+ {$EXTERNALSYM ERROR_DRIVE_NOT_INSTALLED}
+ ERROR_TRAY_MALFUNCTION = $00000010; // Media tray is malfunctioning/broken.
+ {$EXTERNALSYM ERROR_TRAY_MALFUNCTION}
+ ERROR_INIT_STATUS_NEEDED = $00000011; // An Initialize Element Status command is needed.
+ {$EXTERNALSYM ERROR_INIT_STATUS_NEEDED}
+ ERROR_UNHANDLED_ERROR = DWORD($FFFFFFFF); // Unknown error condition
+ {$EXTERNALSYM ERROR_UNHANDLED_ERROR}
+
+//
+// Definitions for IOCTL_CHANGER_INITIALIZE_ELEMENT_STATUS
+//
+
+type
+ PCHANGER_INITIALIZE_ELEMENT_STATUS = ^CHANGER_INITIALIZE_ELEMENT_STATUS;
+ {$EXTERNALSYM PCHANGER_INITIALIZE_ELEMENT_STATUS}
+ _CHANGER_INITIALIZE_ELEMENT_STATUS = record
+ //
+ // List describing the elements and range on which to initialize.
+ //
+ ElementList: CHANGER_ELEMENT_LIST;
+ //
+ // Indicates whether a bar code scan should be used. Only applicable if
+ // CHANGER_BAR_CODE_SCANNER_INSTALLED is set in Features0 of CHANGER_GET_PARAMETERS.
+ //
+ BarCodeScan: ByteBool;
+ end;
+ {$EXTERNALSYM _CHANGER_INITIALIZE_ELEMENT_STATUS}
+ CHANGER_INITIALIZE_ELEMENT_STATUS = _CHANGER_INITIALIZE_ELEMENT_STATUS;
+ {$EXTERNALSYM CHANGER_INITIALIZE_ELEMENT_STATUS}
+ TChangerInitializeElementStatus = CHANGER_INITIALIZE_ELEMENT_STATUS;
+ PChangerInitializeElementStatus = PCHANGER_INITIALIZE_ELEMENT_STATUS;
+
+//
+// Definitions for IOCTL_CHANGER_SET_POSITION
+//
+
+ PCHANGER_SET_POSITION = ^CHANGER_SET_POSITION;
+ {$EXTERNALSYM PCHANGER_SET_POSITION}
+ _CHANGER_SET_POSITION = record
+ //
+ // Indicates which transport to move.
+ //
+ Transport: CHANGER_ELEMENT;
+ //
+ // Indicates the final destination of the transport.
+ //
+ Destination: CHANGER_ELEMENT;
+ //
+ // Indicates whether the media currently carried by Transport, should be flipped.
+ //
+ Flip: ByteBool;
+ end;
+ {$EXTERNALSYM _CHANGER_SET_POSITION}
+ CHANGER_SET_POSITION = _CHANGER_SET_POSITION;
+ {$EXTERNALSYM CHANGER_SET_POSITION}
+ TChangerSetPosition = CHANGER_SET_POSITION;
+ PChangerSetPosition = PCHANGER_SET_POSITION;
+
+//
+// Definitions for IOCTL_CHANGER_EXCHANGE_MEDIUM
+//
+
+ PCHANGER_EXCHANGE_MEDIUM = ^CHANGER_EXCHANGE_MEDIUM;
+ {$EXTERNALSYM PCHANGER_EXCHANGE_MEDIUM}
+ _CHANGER_EXCHANGE_MEDIUM = record
+ //
+ // Indicates which transport to use for the exchange operation.
+ //
+ Transport: CHANGER_ELEMENT;
+ //
+ // Indicates the source for the media that is to be moved.
+ //
+ Source: CHANGER_ELEMENT;
+ //
+ // Indicates the final destination of the media originally at Source.
+ //
+ Destination1: CHANGER_ELEMENT;
+ //
+ // Indicates the destination of the media moved from Destination1.
+ //
+ Destination2: CHANGER_ELEMENT;
+ //
+ // Indicates whether the medium should be flipped.
+ //
+ Flip1: ByteBool;
+ Flip2: ByteBool;
+ end;
+ {$EXTERNALSYM _CHANGER_EXCHANGE_MEDIUM}
+ CHANGER_EXCHANGE_MEDIUM = _CHANGER_EXCHANGE_MEDIUM;
+ {$EXTERNALSYM CHANGER_EXCHANGE_MEDIUM}
+ TChangerExchangeMedium = CHANGER_EXCHANGE_MEDIUM;
+ PChangerExchangeMedium = PCHANGER_EXCHANGE_MEDIUM;
+
+//
+// Definitions for IOCTL_CHANGER_MOVE_MEDIUM
+//
+
+ PCHANGER_MOVE_MEDIUM = ^CHANGER_MOVE_MEDIUM;
+ {$EXTERNALSYM PCHANGER_MOVE_MEDIUM}
+ _CHANGER_MOVE_MEDIUM = record
+ //
+ // Indicates which transport to use for the move operation.
+ //
+ Transport: CHANGER_ELEMENT;
+ //
+ // Indicates the source for the media that is to be moved.
+ //
+ Source: CHANGER_ELEMENT;
+ //
+ // Indicates the destination of the media originally at Source.
+ //
+ Destination: CHANGER_ELEMENT;
+ //
+ // Indicates whether the media should be flipped.
+ //
+ Flip: ByteBool;
+ end;
+ {$EXTERNALSYM _CHANGER_MOVE_MEDIUM}
+ CHANGER_MOVE_MEDIUM = _CHANGER_MOVE_MEDIUM;
+ {$EXTERNALSYM CHANGER_MOVE_MEDIUM}
+ TChangerMoveMedium = CHANGER_MOVE_MEDIUM;
+ PChangerMoveMedium = PCHANGER_MOVE_MEDIUM;
+
+//
+// Definitions for IOCTL_QUERY_VOLUME_TAGS
+//
+
+//
+// Input buffer.
+//
+
+ PCHANGER_SEND_VOLUME_TAG_INFORMATION = ^CHANGER_SEND_VOLUME_TAG_INFORMATION;
+ {$EXTERNALSYM PCHANGER_SEND_VOLUME_TAG_INFORMATION}
+ _CHANGER_SEND_VOLUME_TAG_INFORMATION = record
+ //
+ // Describes the starting element for which to return information.
+ //
+ StartingElement: CHANGER_ELEMENT;
+ //
+ // Indicates the specific action to perform. See below.
+ //
+ ActionCode: DWORD;
+ //
+ // Template used by the device to search for volume ids.
+ //
+ VolumeIDTemplate: array [0..MAX_VOLUME_TEMPLATE_SIZE - 1] of BYTE;
+ end;
+ {$EXTERNALSYM _CHANGER_SEND_VOLUME_TAG_INFORMATION}
+ CHANGER_SEND_VOLUME_TAG_INFORMATION = _CHANGER_SEND_VOLUME_TAG_INFORMATION;
+ {$EXTERNALSYM CHANGER_SEND_VOLUME_TAG_INFORMATION}
+ TChangerSendVolumeTagInformation = CHANGER_SEND_VOLUME_TAG_INFORMATION;
+ PChangerSendVolumeTagInformation = PCHANGER_SEND_VOLUME_TAG_INFORMATION;
+
+//
+// Output buffer.
+//
+
+ PREAD_ELEMENT_ADDRESS_INFO = ^READ_ELEMENT_ADDRESS_INFO;
+ {$EXTERNALSYM PREAD_ELEMENT_ADDRESS_INFO}
+ _READ_ELEMENT_ADDRESS_INFO = record
+ //
+ // Number of elements matching criteria set forth by ActionCode.
+ //
+ NumberOfElements: DWORD;
+ //
+ // Array of CHANGER_ELEMENT_STATUS structures, one for each element that corresponded
+ // with the information passed in with the CHANGER_SEND_VOLUME_TAG_INFORMATION structure.
+ //
+ ElementStatus: array [0..0] of CHANGER_ELEMENT_STATUS;
+ end;
+ {$EXTERNALSYM _READ_ELEMENT_ADDRESS_INFO}
+ READ_ELEMENT_ADDRESS_INFO = _READ_ELEMENT_ADDRESS_INFO;
+ {$EXTERNALSYM READ_ELEMENT_ADDRESS_INFO}
+ TReadElementAddressInfo = READ_ELEMENT_ADDRESS_INFO;
+ PReadElementAddressInfo = PREAD_ELEMENT_ADDRESS_INFO;
+
+//
+// Possible ActionCode values. See Features0 of CHANGER_GET_PARAMETERS for compatibility with
+// the current device.
+//
+
+const
+ SEARCH_ALL = $0; // Translate - search all defined volume tags.
+ {$EXTERNALSYM SEARCH_ALL}
+ SEARCH_PRIMARY = $1; // Translate - search only primary volume tags.
+ {$EXTERNALSYM SEARCH_PRIMARY}
+ SEARCH_ALTERNATE = $2; // Translate - search only alternate volume tags.
+ {$EXTERNALSYM SEARCH_ALTERNATE}
+ SEARCH_ALL_NO_SEQ = $4; // Translate - search all defined volume tags but ignore sequence numbers.
+ {$EXTERNALSYM SEARCH_ALL_NO_SEQ}
+ SEARCH_PRI_NO_SEQ = $5; // Translate - search only primary volume tags but ignore sequence numbers.
+ {$EXTERNALSYM SEARCH_PRI_NO_SEQ}
+ SEARCH_ALT_NO_SEQ = $6; // Translate - search only alternate volume tags but ignore sequence numbers.
+ {$EXTERNALSYM SEARCH_ALT_NO_SEQ}
+
+ ASSERT_PRIMARY = $8; // Assert - as the primary volume tag - if tag now undefined.
+ {$EXTERNALSYM ASSERT_PRIMARY}
+ ASSERT_ALTERNATE = $9; // Assert - as the alternate volume tag - if tag now undefined.
+ {$EXTERNALSYM ASSERT_ALTERNATE}
+
+ REPLACE_PRIMARY = $A; // Replace - the primary volume tag - current tag ignored.
+ {$EXTERNALSYM REPLACE_PRIMARY}
+ REPLACE_ALTERNATE = $B; // Replace - the alternate volume tag - current tag ignored.
+ {$EXTERNALSYM REPLACE_ALTERNATE}
+
+ UNDEFINE_PRIMARY = $C; // Undefine - the primary volume tag - current tag ignored.
+ {$EXTERNALSYM UNDEFINE_PRIMARY}
+ UNDEFINE_ALTERNATE = $D; // Undefine - the alternate volume tag - current tag ignored.
+ {$EXTERNALSYM UNDEFINE_ALTERNATE}
+
+//
+// Changer diagnostic test related definitions
+//
+
+type
+ _CHANGER_DEVICE_PROBLEM_TYPE = (
+ DeviceProblemNone,
+ DeviceProblemHardware,
+ DeviceProblemCHMError,
+ DeviceProblemDoorOpen,
+ DeviceProblemCalibrationError,
+ DeviceProblemTargetFailure,
+ DeviceProblemCHMMoveError,
+ DeviceProblemCHMZeroError,
+ DeviceProblemCartridgeInsertError,
+ DeviceProblemPositionError,
+ DeviceProblemSensorError,
+ DeviceProblemCartridgeEjectError,
+ DeviceProblemGripperError,
+ DeviceProblemDriveError);
+ {$EXTERNALSYM _CHANGER_DEVICE_PROBLEM_TYPE}
+ CHANGER_DEVICE_PROBLEM_TYPE = _CHANGER_DEVICE_PROBLEM_TYPE;
+ {$EXTERNALSYM CHANGER_DEVICE_PROBLEM_TYPE}
+ PCHANGER_DEVICE_PROBLEM_TYPE = ^CHANGER_DEVICE_PROBLEM_TYPE;
+ {$EXTERNALSYM PCHANGER_DEVICE_PROBLEM_TYPE}
+ TChangerDeviceProblemType = CHANGER_DEVICE_PROBLEM_TYPE;
+ PChangerDeviceProblemType = PCHANGER_DEVICE_PROBLEM_TYPE;
+
+const
+ IOCTL_SERIAL_LSRMST_INSERT = (
+ (FILE_DEVICE_SERIAL_PORT shl 16) or (FILE_ANY_ACCESS shl 14) or
+ (31 shl 2) or METHOD_BUFFERED);
+ {$EXTERNALSYM IOCTL_SERIAL_LSRMST_INSERT}
+
+ IOCTL_SERENUM_EXPOSE_HARDWARE = (
+ (FILE_DEVICE_SERENUM shl 16) or (FILE_ANY_ACCESS shl 14) or
+ (128 shl 2) or METHOD_BUFFERED);
+ {$EXTERNALSYM IOCTL_SERENUM_EXPOSE_HARDWARE}
+
+ IOCTL_SERENUM_REMOVE_HARDWARE = (
+ (FILE_DEVICE_SERENUM shl 16) or (FILE_ANY_ACCESS shl 14) or
+ (129 shl 2) or METHOD_BUFFERED);
+ {$EXTERNALSYM IOCTL_SERENUM_REMOVE_HARDWARE}
+
+ IOCTL_SERENUM_PORT_DESC = (
+ (FILE_DEVICE_SERENUM shl 16) or (FILE_ANY_ACCESS shl 14) or
+ (130 shl 2) or METHOD_BUFFERED);
+ {$EXTERNALSYM IOCTL_SERENUM_PORT_DESC}
+
+ IOCTL_SERENUM_GET_PORT_NAME = (
+ (FILE_DEVICE_SERENUM shl 16) or (FILE_ANY_ACCESS shl 14) or
+ (131 shl 2) or METHOD_BUFFERED);
+ {$EXTERNALSYM IOCTL_SERENUM_GET_PORT_NAME}
+
+//
+// The following values follow the escape designator in the
+// data stream if the LSRMST_INSERT mode has been turned on.
+//
+
+ SERIAL_LSRMST_ESCAPE = BYTE($00);
+ {$EXTERNALSYM SERIAL_LSRMST_ESCAPE}
+
+//
+// Following this value is the contents of the line status
+// register, and then the character in the RX hardware when
+// the line status register was encountered.
+//
+
+ SERIAL_LSRMST_LSR_DATA = BYTE($01);
+ {$EXTERNALSYM SERIAL_LSRMST_LSR_DATA}
+
+//
+// Following this value is the contents of the line status
+// register. No error character follows
+//
+
+ SERIAL_LSRMST_LSR_NODATA = BYTE($02);
+ {$EXTERNALSYM SERIAL_LSRMST_LSR_NODATA}
+
+//
+// Following this value is the contents of the modem status
+// register.
+//
+
+ SERIAL_LSRMST_MST = BYTE($03);
+ {$EXTERNALSYM SERIAL_LSRMST_MST}
+
+//
+// Bit values for FIFO Control Register
+//
+
+ SERIAL_IOC_FCR_FIFO_ENABLE = DWORD($00000001);
+ {$EXTERNALSYM SERIAL_IOC_FCR_FIFO_ENABLE}
+ SERIAL_IOC_FCR_RCVR_RESET = DWORD($00000002);
+ {$EXTERNALSYM SERIAL_IOC_FCR_RCVR_RESET}
+ SERIAL_IOC_FCR_XMIT_RESET = DWORD($00000004);
+ {$EXTERNALSYM SERIAL_IOC_FCR_XMIT_RESET}
+ SERIAL_IOC_FCR_DMA_MODE = DWORD($00000008);
+ {$EXTERNALSYM SERIAL_IOC_FCR_DMA_MODE}
+ SERIAL_IOC_FCR_RES1 = DWORD($00000010);
+ {$EXTERNALSYM SERIAL_IOC_FCR_RES1}
+ SERIAL_IOC_FCR_RES2 = DWORD($00000020);
+ {$EXTERNALSYM SERIAL_IOC_FCR_RES2}
+ SERIAL_IOC_FCR_RCVR_TRIGGER_LSB = DWORD($00000040);
+ {$EXTERNALSYM SERIAL_IOC_FCR_RCVR_TRIGGER_LSB}
+ SERIAL_IOC_FCR_RCVR_TRIGGER_MSB = DWORD($00000080);
+ {$EXTERNALSYM SERIAL_IOC_FCR_RCVR_TRIGGER_MSB}
+
+//
+// Bit values for Modem Control Register
+//
+
+ SERIAL_IOC_MCR_DTR = DWORD($00000001);
+ {$EXTERNALSYM SERIAL_IOC_MCR_DTR}
+ SERIAL_IOC_MCR_RTS = DWORD($00000002);
+ {$EXTERNALSYM SERIAL_IOC_MCR_RTS}
+ SERIAL_IOC_MCR_OUT1 = DWORD($00000004);
+ {$EXTERNALSYM SERIAL_IOC_MCR_OUT1}
+ SERIAL_IOC_MCR_OUT2 = DWORD($00000008);
+ {$EXTERNALSYM SERIAL_IOC_MCR_OUT2}
+ SERIAL_IOC_MCR_LOOP = DWORD($00000010);
+ {$EXTERNALSYM SERIAL_IOC_MCR_LOOP}
+
+//
+// The following is a list of the native file system fsctls followed by
+// additional network file system fsctls. Some values have been
+// decommissioned.
+//
+
+ FSCTL_REQUEST_OPLOCK_LEVEL_1 = (
+ (FILE_DEVICE_FILE_SYSTEM shl 16) or (FILE_ANY_ACCESS shl 14) or
+ (0 shl 2) or METHOD_BUFFERED);
+ {$EXTERNALSYM FSCTL_REQUEST_OPLOCK_LEVEL_1}
+
+ FSCTL_REQUEST_OPLOCK_LEVEL_2 = (
+ (FILE_DEVICE_FILE_SYSTEM shl 16) or (FILE_ANY_ACCESS shl 14) or
+ (1 shl 2) or METHOD_BUFFERED);
+ {$EXTERNALSYM FSCTL_REQUEST_OPLOCK_LEVEL_2}
+
+ FSCTL_REQUEST_BATCH_OPLOCK = (
+ (FILE_DEVICE_FILE_SYSTEM shl 16) or (FILE_ANY_ACCESS shl 14) or
+ (2 shl 2) or METHOD_BUFFERED);
+ {$EXTERNALSYM FSCTL_REQUEST_BATCH_OPLOCK}
+
+ FSCTL_OPLOCK_BREAK_ACKNOWLEDGE = (
+ (FILE_DEVICE_FILE_SYSTEM shl 16) or (FILE_ANY_ACCESS shl 14) or
+ (3 shl 2) or METHOD_BUFFERED);
+ {$EXTERNALSYM FSCTL_OPLOCK_BREAK_ACKNOWLEDGE}
+
+ FSCTL_OPBATCH_ACK_CLOSE_PENDING = (
+ (FILE_DEVICE_FILE_SYSTEM shl 16) or (FILE_ANY_ACCESS shl 14) or
+ (4 shl 2) or METHOD_BUFFERED);
+ {$EXTERNALSYM FSCTL_OPBATCH_ACK_CLOSE_PENDING}
+
+ FSCTL_OPLOCK_BREAK_NOTIFY = (
+ (FILE_DEVICE_FILE_SYSTEM shl 16) or (FILE_ANY_ACCESS shl 14) or
+ (5 shl 2) or METHOD_BUFFERED);
+ {$EXTERNALSYM FSCTL_OPLOCK_BREAK_NOTIFY}
+
+ FSCTL_LOCK_VOLUME = (FILE_DEVICE_FILE_SYSTEM shl 16) or (FILE_ANY_ACCESS shl 14) or (6 shl 2) or METHOD_BUFFERED;
+ {$EXTERNALSYM FSCTL_LOCK_VOLUME}
+
+ FSCTL_UNLOCK_VOLUME = (
+ (FILE_DEVICE_FILE_SYSTEM shl 16) or (FILE_ANY_ACCESS shl 14) or
+ (7 shl 2) or METHOD_BUFFERED);
+ {$EXTERNALSYM FSCTL_UNLOCK_VOLUME}
+
+ FSCTL_DISMOUNT_VOLUME = (
+ (FILE_DEVICE_FILE_SYSTEM shl 16) or (FILE_ANY_ACCESS shl 14) or
+ (8 shl 2) or METHOD_BUFFERED);
+ {$EXTERNALSYM FSCTL_DISMOUNT_VOLUME}
+
+// decommissioned fsctl value 9
+
+ FSCTL_IS_VOLUME_MOUNTED = (
+ (FILE_DEVICE_FILE_SYSTEM shl 16) or (FILE_ANY_ACCESS shl 14) or
+ (10 shl 2) or METHOD_BUFFERED);
+ {$EXTERNALSYM FSCTL_IS_VOLUME_MOUNTED}
+
+ FSCTL_IS_PATHNAME_VALID = (
+ (FILE_DEVICE_FILE_SYSTEM shl 16) or (FILE_ANY_ACCESS shl 14) or
+ (11 shl 2) or METHOD_BUFFERED); // PATHNAME_BUFFER,
+ {$EXTERNALSYM FSCTL_IS_PATHNAME_VALID}
+
+ FSCTL_MARK_VOLUME_DIRTY = (
+ (FILE_DEVICE_FILE_SYSTEM shl 16) or (FILE_ANY_ACCESS shl 14) or
+ (12 shl 2) or METHOD_BUFFERED);
+ {$EXTERNALSYM FSCTL_MARK_VOLUME_DIRTY}
+
+// decommissioned fsctl value 13
+
+ FSCTL_QUERY_RETRIEVAL_POINTERS = (
+ (FILE_DEVICE_FILE_SYSTEM shl 16) or (FILE_ANY_ACCESS shl 14) or
+ (14 shl 2) or METHOD_NEITHER);
+ {$EXTERNALSYM FSCTL_QUERY_RETRIEVAL_POINTERS}
+
+ FSCTL_GET_COMPRESSION = (
+ (FILE_DEVICE_FILE_SYSTEM shl 16) or (FILE_ANY_ACCESS shl 14) or
+ (15 shl 2) or METHOD_BUFFERED);
+ {$EXTERNALSYM FSCTL_GET_COMPRESSION}
+
+ FSCTL_SET_COMPRESSION = (
+ (FILE_DEVICE_FILE_SYSTEM shl 16) or ((FILE_READ_DATA or FILE_WRITE_DATA) shl 14) or
+ (16 shl 2) or METHOD_BUFFERED);
+ {$EXTERNALSYM FSCTL_SET_COMPRESSION}
+
+// decommissioned fsctl value 17
+// decommissioned fsctl value 18
+
+ FSCTL_MARK_AS_SYSTEM_HIVE = (
+ (FILE_DEVICE_FILE_SYSTEM shl 16) or (FILE_ANY_ACCESS shl 14) or
+ (19 shl 2) or METHOD_NEITHER);
+ {$EXTERNALSYM FSCTL_MARK_AS_SYSTEM_HIVE}
+
+ FSCTL_OPLOCK_BREAK_ACK_NO_2 = (
+ (FILE_DEVICE_FILE_SYSTEM shl 16) or (FILE_ANY_ACCESS shl 14) or
+ (20 shl 2) or METHOD_BUFFERED);
+ {$EXTERNALSYM FSCTL_OPLOCK_BREAK_ACK_NO_2}
+
+ FSCTL_INVALIDATE_VOLUMES = (
+ (FILE_DEVICE_FILE_SYSTEM shl 16) or (FILE_ANY_ACCESS shl 14) or
+ (21 shl 2) or METHOD_BUFFERED);
+ {$EXTERNALSYM FSCTL_INVALIDATE_VOLUMES}
+
+ FSCTL_QUERY_FAT_BPB = (
+ (FILE_DEVICE_FILE_SYSTEM shl 16) or (FILE_ANY_ACCESS shl 14) or
+ (22 shl 2) or METHOD_BUFFERED); // FSCTL_QUERY_FAT_BPB_BUFFER
+ {$EXTERNALSYM FSCTL_QUERY_FAT_BPB}
+
+ FSCTL_REQUEST_FILTER_OPLOCK = (
+ (FILE_DEVICE_FILE_SYSTEM shl 16) or (FILE_ANY_ACCESS shl 14) or
+ (23 shl 2) or METHOD_BUFFERED);
+ {$EXTERNALSYM FSCTL_REQUEST_FILTER_OPLOCK}
+
+ FSCTL_FILESYSTEM_GET_STATISTICS = (
+ (FILE_DEVICE_FILE_SYSTEM shl 16) or (FILE_ANY_ACCESS shl 14) or
+ (24 shl 2) or METHOD_BUFFERED); // FILESYSTEM_STATISTICS
+ {$EXTERNALSYM FSCTL_FILESYSTEM_GET_STATISTICS}
+
+ FSCTL_GET_NTFS_VOLUME_DATA = (
+ (FILE_DEVICE_FILE_SYSTEM shl 16) or (FILE_ANY_ACCESS shl 14) or
+ (25 shl 2) or METHOD_BUFFERED);
+ {$EXTERNALSYM FSCTL_GET_NTFS_VOLUME_DATA}
+
+ FSCTL_GET_NTFS_FILE_RECORD = (
+ (FILE_DEVICE_FILE_SYSTEM shl 16) or (FILE_ANY_ACCESS shl 14) or
+ (26 shl 2) or METHOD_BUFFERED);
+ {$EXTERNALSYM FSCTL_GET_NTFS_FILE_RECORD}
+
+ FSCTL_GET_VOLUME_BITMAP = (
+ (FILE_DEVICE_FILE_SYSTEM shl 16) or (FILE_ANY_ACCESS shl 14) or
+ (27 shl 2) or METHOD_NEITHER);
+ {$EXTERNALSYM FSCTL_GET_VOLUME_BITMAP}
+
+ FSCTL_GET_RETRIEVAL_POINTERS = (
+ (FILE_DEVICE_FILE_SYSTEM shl 16) or (FILE_ANY_ACCESS shl 14) or
+ (28 shl 2) or METHOD_NEITHER);
+ {$EXTERNALSYM FSCTL_GET_RETRIEVAL_POINTERS}
+
+ FSCTL_MOVE_FILE = (
+ (FILE_DEVICE_FILE_SYSTEM shl 16) or (FILE_SPECIAL_ACCESS shl 14) or
+ (29 shl 2) or METHOD_BUFFERED);
+ {$EXTERNALSYM FSCTL_MOVE_FILE}
+
+ FSCTL_IS_VOLUME_DIRTY = (
+ (FILE_DEVICE_FILE_SYSTEM shl 16) or (FILE_ANY_ACCESS shl 14) or
+ (30 shl 2) or METHOD_BUFFERED);
+ {$EXTERNALSYM FSCTL_IS_VOLUME_DIRTY}
+
+// decomissioned fsctl value 31
+(* FSCTL_GET_HFS_INFORMATION = (
+ (FILE_DEVICE_FILE_SYSTEM shl 16) or (FILE_ANY_ACCESS shl 14) or
+ (31 shl 2) or METHOD_BUFFERED);
+ {$EXTERNALSYM FSCTL_GET_HFS_INFORMATION}
+*)
+
+ FSCTL_ALLOW_EXTENDED_DASD_IO = (
+ (FILE_DEVICE_FILE_SYSTEM shl 16) or (FILE_ANY_ACCESS shl 14) or
+ (32 shl 2) or METHOD_NEITHER);
+ {$EXTERNALSYM FSCTL_ALLOW_EXTENDED_DASD_IO}
+
+// decommissioned fsctl value 33
+// decommissioned fsctl value 34
+
+(*
+ FSCTL_READ_PROPERTY_DATA = (
+ (FILE_DEVICE_FILE_SYSTEM shl 16) or (FILE_ANY_ACCESS shl 14) or
+ (33 shl 2) or METHOD_NEITHER);
+ {$EXTERNALSYM FSCTL_READ_PROPERTY_DATA}
+
+ FSCTL_WRITE_PROPERTY_DATA = (
+ (FILE_DEVICE_FILE_SYSTEM shl 16) or (FILE_ANY_ACCESS shl 14) or
+ (34 shl 2) or METHOD_NEITHER);
+ {$EXTERNALSYM FSCTL_WRITE_PROPERTY_DATA}
+*)
+
+ FSCTL_FIND_FILES_BY_SID = (
+ (FILE_DEVICE_FILE_SYSTEM shl 16) or (FILE_ANY_ACCESS shl 14) or
+ (35 shl 2) or METHOD_NEITHER);
+ {$EXTERNALSYM FSCTL_FIND_FILES_BY_SID}
+
+// decommissioned fsctl value 36
+// decommissioned fsctl value 37
+
+(* FSCTL_DUMP_PROPERTY_DATA = (
+ (FILE_DEVICE_FILE_SYSTEM shl 16) or (FILE_ANY_ACCESS shl 14) or
+ (37 shl 2) or METHOD_NEITHER);
+ {$EXTERNALSYM FSCTL_DUMP_PROPERTY_DATA}
+*)
+
+ FSCTL_SET_OBJECT_ID = (
+ (FILE_DEVICE_FILE_SYSTEM shl 16) or (FILE_SPECIAL_ACCESS shl 14) or
+ (38 shl 2) or METHOD_BUFFERED);
+ {$EXTERNALSYM FSCTL_SET_OBJECT_ID}
+
+ FSCTL_GET_OBJECT_ID = (
+ (FILE_DEVICE_FILE_SYSTEM shl 16) or (FILE_ANY_ACCESS shl 14) or
+ (39 shl 2) or METHOD_BUFFERED);
+ {$EXTERNALSYM FSCTL_GET_OBJECT_ID}
+
+ FSCTL_DELETE_OBJECT_ID = (
+ (FILE_DEVICE_FILE_SYSTEM shl 16) or (FILE_SPECIAL_ACCESS shl 14) or
+ (40 shl 2) or METHOD_BUFFERED);
+ {$EXTERNALSYM FSCTL_DELETE_OBJECT_ID}
+
+ FSCTL_SET_REPARSE_POINT = (
+ (FILE_DEVICE_FILE_SYSTEM shl 16) or (FILE_SPECIAL_ACCESS shl 14) or
+ (41 shl 2) or METHOD_BUFFERED);
+ {$EXTERNALSYM FSCTL_SET_REPARSE_POINT}
+
+ FSCTL_GET_REPARSE_POINT = (
+ (FILE_DEVICE_FILE_SYSTEM shl 16) or (FILE_ANY_ACCESS shl 14) or
+ (42 shl 2) or METHOD_BUFFERED);
+ {$EXTERNALSYM FSCTL_GET_REPARSE_POINT}
+
+ FSCTL_DELETE_REPARSE_POINT = (
+ (FILE_DEVICE_FILE_SYSTEM shl 16) or (FILE_SPECIAL_ACCESS shl 14) or
+ (43 shl 2) or METHOD_BUFFERED);
+ {$EXTERNALSYM FSCTL_DELETE_REPARSE_POINT}
+
+ FSCTL_ENUM_USN_DATA = (
+ (FILE_DEVICE_FILE_SYSTEM shl 16) or (FILE_ANY_ACCESS shl 14) or
+ (44 shl 2) or METHOD_NEITHER);
+ {$EXTERNALSYM FSCTL_ENUM_USN_DATA}
+
+ FSCTL_SECURITY_ID_CHECK = (
+ (FILE_DEVICE_FILE_SYSTEM shl 16) or (FILE_READ_DATA shl 14) or
+ (45 shl 2) or METHOD_NEITHER);
+ {$EXTERNALSYM FSCTL_SECURITY_ID_CHECK}
+
+ FSCTL_READ_USN_JOURNAL = (
+ (FILE_DEVICE_FILE_SYSTEM shl 16) or (FILE_ANY_ACCESS shl 14) or
+ (46 shl 2) or METHOD_NEITHER);
+ {$EXTERNALSYM FSCTL_READ_USN_JOURNAL}
+
+ FSCTL_SET_OBJECT_ID_EXTENDED = (
+ (FILE_DEVICE_FILE_SYSTEM shl 16) or (FILE_SPECIAL_ACCESS shl 14) or
+ (47 shl 2) or METHOD_BUFFERED);
+ {$EXTERNALSYM FSCTL_SET_OBJECT_ID_EXTENDED}
+
+ FSCTL_CREATE_OR_GET_OBJECT_ID = (
+ (FILE_DEVICE_FILE_SYSTEM shl 16) or (FILE_ANY_ACCESS shl 14) or
+ (48 shl 2) or METHOD_BUFFERED);
+ {$EXTERNALSYM FSCTL_CREATE_OR_GET_OBJECT_ID}
+
+ FSCTL_SET_SPARSE = (
+ (FILE_DEVICE_FILE_SYSTEM shl 16) or (FILE_SPECIAL_ACCESS shl 14) or
+ (49 shl 2) or METHOD_BUFFERED);
+ {$EXTERNALSYM FSCTL_SET_SPARSE}
+
+ FSCTL_SET_ZERO_DATA = (
+ (FILE_DEVICE_FILE_SYSTEM shl 16) or (FILE_WRITE_DATA shl 14) or
+ (50 shl 2) or METHOD_BUFFERED);
+ {$EXTERNALSYM FSCTL_SET_ZERO_DATA}
+
+ FSCTL_QUERY_ALLOCATED_RANGES = (
+ (FILE_DEVICE_FILE_SYSTEM shl 16) or (FILE_READ_DATA shl 14) or
+ (51 shl 2) or METHOD_NEITHER);
+ {$EXTERNALSYM FSCTL_QUERY_ALLOCATED_RANGES}
+
+// decommissioned fsctl value 52
+(*
+ FSCTL_ENABLE_UPGRADE = (
+ (FILE_DEVICE_FILE_SYSTEM shl 16) or (FILE_WRITE_DATA shl 14) or
+ (52 shl 2) or METHOD_BUFFERED);
+ {$EXTERNALSYM FSCTL_ENABLE_UPGRADE}
+*)
+
+ FSCTL_SET_ENCRYPTION = (
+ (FILE_DEVICE_FILE_SYSTEM shl 16) or (FILE_ANY_ACCESS shl 14) or
+ (53 shl 2) or METHOD_NEITHER);
+ {$EXTERNALSYM FSCTL_SET_ENCRYPTION}
+
+ FSCTL_ENCRYPTION_FSCTL_IO = (
+ (FILE_DEVICE_FILE_SYSTEM shl 16) or (FILE_ANY_ACCESS shl 14) or
+ (54 shl 2) or METHOD_NEITHER);
+ {$EXTERNALSYM FSCTL_ENCRYPTION_FSCTL_IO}
+
+ FSCTL_WRITE_RAW_ENCRYPTED = (
+ (FILE_DEVICE_FILE_SYSTEM shl 16) or (FILE_SPECIAL_ACCESS shl 14) or
+ (55 shl 2) or METHOD_NEITHER);
+ {$EXTERNALSYM FSCTL_WRITE_RAW_ENCRYPTED}
+
+ FSCTL_READ_RAW_ENCRYPTED = (
+ (FILE_DEVICE_FILE_SYSTEM shl 16) or (FILE_SPECIAL_ACCESS shl 14) or
+ (56 shl 2) or METHOD_NEITHER);
+ {$EXTERNALSYM FSCTL_READ_RAW_ENCRYPTED}
+
+ FSCTL_CREATE_USN_JOURNAL = (
+ (FILE_DEVICE_FILE_SYSTEM shl 16) or (FILE_ANY_ACCESS shl 14) or
+ (57 shl 2) or METHOD_NEITHER);
+ {$EXTERNALSYM FSCTL_CREATE_USN_JOURNAL}
+
+ FSCTL_READ_FILE_USN_DATA = (
+ (FILE_DEVICE_FILE_SYSTEM shl 16) or (FILE_ANY_ACCESS shl 14) or
+ (58 shl 2) or METHOD_NEITHER);
+ {$EXTERNALSYM FSCTL_READ_FILE_USN_DATA}
+
+ FSCTL_WRITE_USN_CLOSE_RECORD = (
+ (FILE_DEVICE_FILE_SYSTEM shl 16) or (FILE_ANY_ACCESS shl 14) or
+ (59 shl 2) or METHOD_NEITHER);
+ {$EXTERNALSYM FSCTL_WRITE_USN_CLOSE_RECORD}
+
+ FSCTL_EXTEND_VOLUME = (
+ (FILE_DEVICE_FILE_SYSTEM shl 16) or (FILE_ANY_ACCESS shl 14) or
+ (60 shl 2) or METHOD_BUFFERED);
+ {$EXTERNALSYM FSCTL_EXTEND_VOLUME}
+
+ FSCTL_QUERY_USN_JOURNAL = (
+ (FILE_DEVICE_FILE_SYSTEM shl 16) or (FILE_ANY_ACCESS shl 14) or
+ (61 shl 2) or METHOD_BUFFERED);
+ {$EXTERNALSYM FSCTL_QUERY_USN_JOURNAL}
+
+ FSCTL_DELETE_USN_JOURNAL = (
+ (FILE_DEVICE_FILE_SYSTEM shl 16) or (FILE_ANY_ACCESS shl 14) or
+ (62 shl 2) or METHOD_BUFFERED);
+ {$EXTERNALSYM FSCTL_DELETE_USN_JOURNAL}
+
+ FSCTL_MARK_HANDLE = (
+ (FILE_DEVICE_FILE_SYSTEM shl 16) or (FILE_ANY_ACCESS shl 14) or
+ (63 shl 2) or METHOD_BUFFERED);
+ {$EXTERNALSYM FSCTL_MARK_HANDLE}
+
+ FSCTL_SIS_COPYFILE = (
+ (FILE_DEVICE_FILE_SYSTEM shl 16) or (FILE_ANY_ACCESS shl 14) or
+ (64 shl 2) or METHOD_BUFFERED);
+ {$EXTERNALSYM FSCTL_SIS_COPYFILE}
+
+ FSCTL_SIS_LINK_FILES = (
+ (FILE_DEVICE_FILE_SYSTEM shl 16) or ((FILE_READ_DATA or FILE_WRITE_DATA) shl 14) or
+ (65 shl 2) or METHOD_BUFFERED);
+ {$EXTERNALSYM FSCTL_SIS_LINK_FILES}
+
+ FSCTL_HSM_MSG = (
+ (FILE_DEVICE_FILE_SYSTEM shl 16) or ((FILE_READ_DATA or FILE_WRITE_DATA) shl 14) or
+ (66 shl 2) or METHOD_BUFFERED);
+ {$EXTERNALSYM FSCTL_HSM_MSG}
+
+// decommissioned fsctl value 67
+(*
+ FSCTL_NSS_CONTROL = (
+ (FILE_DEVICE_FILE_SYSTEM shl 16) or (FILE_WRITE_DATA shl 14) or
+ (67 shl 2) or METHOD_BUFFERED);
+ {$EXTERNALSYM FSCTL_NSS_CONTROL}
+*)
+
+ FSCTL_HSM_DATA = (
+ (FILE_DEVICE_FILE_SYSTEM shl 16) or ((FILE_READ_DATA or FILE_WRITE_DATA) shl 14) or
+ (68 shl 2) or METHOD_NEITHER);
+ {$EXTERNALSYM FSCTL_HSM_DATA}
+
+ FSCTL_RECALL_FILE = (
+ (FILE_DEVICE_FILE_SYSTEM shl 16) or (FILE_ANY_ACCESS shl 14) or
+ (69 shl 2) or METHOD_NEITHER);
+ {$EXTERNALSYM FSCTL_RECALL_FILE}
+
+// decommissioned fsctl value 70
+(*
+ FSCTL_NSS_RCONTROL = (
+ (FILE_DEVICE_FILE_SYSTEM shl 16) or (FILE_READ_DATA shl 14) or
+ (70 shl 2) or METHOD_BUFFERED);
+ {$EXTERNALSYM FSCTL_NSS_RCONTROL}
+*)
+
+ FSCTL_READ_FROM_PLEX = (
+ (FILE_DEVICE_FILE_SYSTEM shl 16) or (FILE_READ_DATA shl 14) or
+ (71 shl 2) or METHOD_OUT_DIRECT);
+ {$EXTERNALSYM FSCTL_READ_FROM_PLEX}
+
+ FSCTL_FILE_PREFETCH = (
+ (FILE_DEVICE_FILE_SYSTEM shl 16) or (FILE_SPECIAL_ACCESS shl 14) or
+ (72 shl 2) or METHOD_BUFFERED);
+ {$EXTERNALSYM FSCTL_FILE_PREFETCH}
+
+//
+// The following long list of structs are associated with the preceeding
+// file system fsctls.
+//
+// Note that the structs for the property sets fsctls are not included
+// in this file. They can be found in ntfsprop.h where they should stay
+// because of their dependency on objidl.h.
+//
+
+//
+// Structure for FSCTL_IS_PATHNAME_VALID
+//
+
+type
+ PPATHNAME_BUFFER = ^PATHNAME_BUFFER;
+ {$EXTERNALSYM PPATHNAME_BUFFER}
+ _PATHNAME_BUFFER = record
+ PathNameLength: DWORD;
+ Name: array [0..0] of WCHAR;
+ end;
+ {$EXTERNALSYM _PATHNAME_BUFFER}
+ PATHNAME_BUFFER = _PATHNAME_BUFFER;
+ {$EXTERNALSYM PATHNAME_BUFFER}
+ TPathnameBuffer = PATHNAME_BUFFER;
+ PPathnameBuffer = PPATHNAME_BUFFER;
+
+//
+// Structure for FSCTL_QUERY_BPB_INFO
+//
+
+ PFSCTL_QUERY_FAT_BPB_BUFFER = ^FSCTL_QUERY_FAT_BPB_BUFFER;
+ {$EXTERNALSYM PFSCTL_QUERY_FAT_BPB_BUFFER}
+ _FSCTL_QUERY_FAT_BPB_BUFFER = record
+ First0x24BytesOfBootSector: array [0..$23] of BYTE;
+ end;
+ {$EXTERNALSYM _FSCTL_QUERY_FAT_BPB_BUFFER}
+ FSCTL_QUERY_FAT_BPB_BUFFER = _FSCTL_QUERY_FAT_BPB_BUFFER;
+ {$EXTERNALSYM FSCTL_QUERY_FAT_BPB_BUFFER}
+ TFsctlQueryFatBpbBuffer = FSCTL_QUERY_FAT_BPB_BUFFER;
+ PFsctlQueryFatBpbBuffer = PFSCTL_QUERY_FAT_BPB_BUFFER;
+
+//
+// Structures for FSCTL_GET_NTFS_VOLUME_DATA.
+// The user must pass the basic buffer below. Ntfs
+// will return as many fields as available in the extended
+// buffer which follows immediately after the VOLUME_DATA_BUFFER.
+//
+
+ PNTFS_VOLUME_DATA_BUFFER = ^NTFS_VOLUME_DATA_BUFFER;
+ {$EXTERNALSYM PNTFS_VOLUME_DATA_BUFFER}
+ NTFS_VOLUME_DATA_BUFFER = record
+ VolumeSerialNumber: LARGE_INTEGER;
+ NumberSectors: LARGE_INTEGER;
+ TotalClusters: LARGE_INTEGER;
+ FreeClusters: LARGE_INTEGER;
+ TotalReserved: LARGE_INTEGER;
+ BytesPerSector: DWORD;
+ BytesPerCluster: DWORD;
+ BytesPerFileRecordSegment: DWORD;
+ ClustersPerFileRecordSegment: DWORD;
+ MftValidDataLength: LARGE_INTEGER;
+ MftStartLcn: LARGE_INTEGER;
+ Mft2StartLcn: LARGE_INTEGER;
+ MftZoneStart: LARGE_INTEGER;
+ MftZoneEnd: LARGE_INTEGER;
+ end;
+ {$EXTERNALSYM NTFS_VOLUME_DATA_BUFFER}
+ TNtfsVolumeDataBuffer = NTFS_VOLUME_DATA_BUFFER;
+ PNtfsVolumeDataBuffer = PNTFS_VOLUME_DATA_BUFFER;
+
+ PNTFS_EXTENDED_VOLUME_DATA = ^NTFS_EXTENDED_VOLUME_DATA;
+ {$EXTERNALSYM PNTFS_EXTENDED_VOLUME_DATA}
+ NTFS_EXTENDED_VOLUME_DATA = record
+ ByteCount: DWORD;
+ MajorVersion: WORD;
+ MinorVersion: WORD;
+ end;
+ {$EXTERNALSYM NTFS_EXTENDED_VOLUME_DATA}
+ TNtfsExtendedVolumeData = NTFS_EXTENDED_VOLUME_DATA;
+ PNtfsExtendedVolumeData = PNTFS_EXTENDED_VOLUME_DATA;
+
+//
+// Structure for FSCTL_GET_VOLUME_BITMAP
+//
+
+ PSTARTING_LCN_INPUT_BUFFER = ^STARTING_LCN_INPUT_BUFFER;
+ {$EXTERNALSYM PSTARTING_LCN_INPUT_BUFFER}
+ STARTING_LCN_INPUT_BUFFER = record
+ StartingLcn: LARGE_INTEGER;
+ end;
+ {$EXTERNALSYM STARTING_LCN_INPUT_BUFFER}
+ TStartingLcnInputBuffer = STARTING_LCN_INPUT_BUFFER;
+ PStartingLcnInputBuffer = PSTARTING_LCN_INPUT_BUFFER;
+
+ PVOLUME_BITMAP_BUFFER = ^VOLUME_BITMAP_BUFFER;
+ {$EXTERNALSYM PVOLUME_BITMAP_BUFFER}
+ VOLUME_BITMAP_BUFFER = record
+ StartingLcn: LARGE_INTEGER;
+ BitmapSize: LARGE_INTEGER;
+ Buffer: array [0..0] of BYTE;
+ end;
+ {$EXTERNALSYM VOLUME_BITMAP_BUFFER}
+ TVolumeBitmapBuffer = VOLUME_BITMAP_BUFFER;
+ PVolumeBitmapBuffer = PVOLUME_BITMAP_BUFFER;
+
+//
+// Structure for FSCTL_GET_RETRIEVAL_POINTERS
+//
+
+ PSTARTING_VCN_INPUT_BUFFER = ^STARTING_VCN_INPUT_BUFFER;
+ {$EXTERNALSYM PSTARTING_VCN_INPUT_BUFFER}
+ STARTING_VCN_INPUT_BUFFER = record
+ StartingVcn: LARGE_INTEGER;
+ end;
+ {$EXTERNALSYM STARTING_VCN_INPUT_BUFFER}
+ TStartingVcnInputBuffer = STARTING_VCN_INPUT_BUFFER;
+ PStartingVcnInputBuffer = PSTARTING_VCN_INPUT_BUFFER;
+
+ TRPBExtends = record
+ NextVcn: LARGE_INTEGER;
+ Lcn: LARGE_INTEGER;
+ end;
+
+ PRETRIEVAL_POINTERS_BUFFER = ^RETRIEVAL_POINTERS_BUFFER;
+ {$EXTERNALSYM PRETRIEVAL_POINTERS_BUFFER}
+ RETRIEVAL_POINTERS_BUFFER = record
+ ExtentCount: DWORD;
+ StartingVcn: LARGE_INTEGER;
+ Extends: array [0..0] of TRPBExtends;
+ end;
+ {$EXTERNALSYM RETRIEVAL_POINTERS_BUFFER}
+ TRetrievalPointersBuffer = RETRIEVAL_POINTERS_BUFFER;
+ PRetrievalPointersBuffer = PRETRIEVAL_POINTERS_BUFFER;
+
+//
+// Structures for FSCTL_GET_NTFS_FILE_RECORD
+//
+
+ PNTFS_FILE_RECORD_INPUT_BUFFER = ^NTFS_FILE_RECORD_INPUT_BUFFER;
+ {$EXTERNALSYM PNTFS_FILE_RECORD_INPUT_BUFFER}
+ NTFS_FILE_RECORD_INPUT_BUFFER = record
+ FileReferenceNumber: LARGE_INTEGER;
+ end;
+ {$EXTERNALSYM NTFS_FILE_RECORD_INPUT_BUFFER}
+ TNtfsFileRecordInputBuffer = NTFS_FILE_RECORD_INPUT_BUFFER;
+ PNtfsFileRecordInputBuffer = PNTFS_FILE_RECORD_INPUT_BUFFER;
+
+ PNTFS_FILE_RECORD_OUTPUT_BUFFER = ^NTFS_FILE_RECORD_OUTPUT_BUFFER;
+ {$EXTERNALSYM PNTFS_FILE_RECORD_OUTPUT_BUFFER}
+ NTFS_FILE_RECORD_OUTPUT_BUFFER = record
+ FileReferenceNumber: LARGE_INTEGER;
+ FileRecordLength: DWORD;
+ FileRecordBuffer: array [0..0] of BYTE;
+ end;
+ {$EXTERNALSYM NTFS_FILE_RECORD_OUTPUT_BUFFER}
+ TNtfsFileRecordOutputBuffer = NTFS_FILE_RECORD_OUTPUT_BUFFER;
+ PNtfsFileRecordOutputBuffer = PNTFS_FILE_RECORD_OUTPUT_BUFFER;
+
+//
+// Structure for FSCTL_MOVE_FILE
+//
+
+ PMOVE_FILE_DATA = ^MOVE_FILE_DATA;
+ {$EXTERNALSYM PMOVE_FILE_DATA}
+ MOVE_FILE_DATA = record
+ FileHandle: HANDLE;
+ StartingVcn: LARGE_INTEGER;
+ StartingLcn: LARGE_INTEGER;
+ ClusterCount: DWORD;
+ end;
+ {$EXTERNALSYM MOVE_FILE_DATA}
+ TMoveFileData = MOVE_FILE_DATA;
+ PMoveFileData = PMOVE_FILE_DATA;
+
+{$IFDEF _WIN64}
+
+//
+// 32/64 Bit thunking support structure
+//
+
+ _MOVE_FILE_DATA32 = record
+ FileHandle: UINT32;
+ StartingVcn: LARGE_INTEGER;
+ StartingLcn: LARGE_INTEGER;
+ ClusterCount: DWORD;
+ end;
+ {$EXTERNALSYM _MOVE_FILE_DATA32}
+ MOVE_FILE_DATA32 = _MOVE_FILE_DATA32;
+ {$EXTERNALSYM MOVE_FILE_DATA32}
+ PMOVE_FILE_DATA32 = ^MOVE_FILE_DATA32;
+ {$EXTERNALSYM PMOVE_FILE_DATA32}
+ TMoveFileData32 = MOVE_FILE_DATA32;
+ PMoveFileData32 = PMOVE_FILE_DATA32;
+
+{$ENDIF _WIN64}
+
+//
+// Structures for FSCTL_FIND_FILES_BY_SID
+//
+
+ PFIND_BY_SID_DATA = ^FIND_BY_SID_DATA;
+ {$EXTERNALSYM PFIND_BY_SID_DATA}
+ FIND_BY_SID_DATA = record
+ Restart: DWORD;
+ Sid: SID;
+ end;
+ {$EXTERNALSYM FIND_BY_SID_DATA}
+ TFindBySidData = FIND_BY_SID_DATA;
+ PFindBySidData = PFIND_BY_SID_DATA;
+
+ FIND_BY_SID_OUTPUT = record
+ NextEntryOffset: DWORD;
+ FileIndex: DWORD;
+ FileNameLength: DWORD;
+ FileName: array [0..0] of WCHAR;
+ end;
+ {$EXTERNALSYM FIND_BY_SID_OUTPUT}
+ PFIND_BY_SID_OUTPUT = ^FIND_BY_SID_OUTPUT;
+ TFindBySidOutput = FIND_BY_SID_OUTPUT;
+ PFindBySidOutput = PFIND_BY_SID_OUTPUT;
+
+//
+// The following structures apply to Usn operations.
+//
+
+//
+// Structure for FSCTL_ENUM_USN_DATA
+//
+
+ PMFT_ENUM_DATA = ^MFT_ENUM_DATA;
+ {$EXTERNALSYM PMFT_ENUM_DATA}
+ MFT_ENUM_DATA = record
+ StartFileReferenceNumber: DWORDLONG;
+ LowUsn: USN;
+ HighUsn: USN;
+ end;
+ {$EXTERNALSYM MFT_ENUM_DATA}
+ TMftEnumData = MFT_ENUM_DATA;
+ PMftEnumData = PMFT_ENUM_DATA;
+
+//
+// Structure for FSCTL_CREATE_USN_JOURNAL
+//
+
+ PCREATE_USN_JOURNAL_DATA = ^CREATE_USN_JOURNAL_DATA;
+ {$EXTERNALSYM PCREATE_USN_JOURNAL_DATA}
+ CREATE_USN_JOURNAL_DATA = record
+ MaximumSize: DWORDLONG;
+ AllocationDelta: DWORDLONG;
+ end;
+ {$EXTERNALSYM CREATE_USN_JOURNAL_DATA}
+ TCreateUsnJournalData = CREATE_USN_JOURNAL_DATA;
+ PCreateUsnJournalData = PCREATE_USN_JOURNAL_DATA;
+
+//
+// Structure for FSCTL_READ_USN_JOURNAL
+//
+
+ PREAD_USN_JOURNAL_DATA = ^READ_USN_JOURNAL_DATA;
+ {$EXTERNALSYM PREAD_USN_JOURNAL_DATA}
+ READ_USN_JOURNAL_DATA = record
+ StartUsn: USN;
+ ReasonMask: DWORD;
+ ReturnOnlyOnClose: DWORD;
+ Timeout: DWORDLONG;
+ BytesToWaitFor: DWORDLONG;
+ UsnJournalID: DWORDLONG;
+ end;
+ {$EXTERNALSYM READ_USN_JOURNAL_DATA}
+ TReadUsnJournalData = READ_USN_JOURNAL_DATA;
+ PReadUsnJournalData = PREAD_USN_JOURNAL_DATA;
+
+//
+// The initial Major.Minor version of the Usn record will be 2.0.
+// In general, the MinorVersion may be changed if fields are added
+// to this structure in such a way that the previous version of the
+// software can still correctly the fields it knows about. The
+// MajorVersion should only be changed if the previous version of
+// any software using this structure would incorrectly handle new
+// records due to structure changes.
+//
+// The first update to this will force the structure to version 2.0.
+// This will add the extended information about the source as
+// well as indicate the file name offset within the structure.
+//
+// The following structure is returned with these fsctls.
+//
+// FSCTL_READ_USN_JOURNAL
+// FSCTL_READ_FILE_USN_DATA
+// FSCTL_ENUM_USN_DATA
+//
+
+ PUSN_RECORD = ^USN_RECORD;
+ {$EXTERNALSYM PUSN_RECORD}
+ USN_RECORD = record
+ RecordLength: DWORD;
+ MajorVersion: WORD;
+ MinorVersion: WORD;
+ FileReferenceNumber: DWORDLONG;
+ ParentFileReferenceNumber: DWORDLONG;
+ Usn: USN;
+ TimeStamp: LARGE_INTEGER;
+ Reason: DWORD;
+ SourceInfo: DWORD;
+ SecurityId: DWORD;
+ FileAttributes: DWORD;
+ FileNameLength: WORD;
+ FileNameOffset: WORD;
+ FileName: array [0..0] of WCHAR;
+ end;
+ {$EXTERNALSYM USN_RECORD}
+ TUsnRecord = USN_RECORD;
+ PUsnRecord = PUSN_RECORD;
+
+const
+ USN_PAGE_SIZE = $1000;
+ {$EXTERNALSYM USN_PAGE_SIZE}
+
+ USN_REASON_DATA_OVERWRITE = $00000001;
+ {$EXTERNALSYM USN_REASON_DATA_OVERWRITE}
+ USN_REASON_DATA_EXTEND = $00000002;
+ {$EXTERNALSYM USN_REASON_DATA_EXTEND}
+ USN_REASON_DATA_TRUNCATION = $00000004;
+ {$EXTERNALSYM USN_REASON_DATA_TRUNCATION}
+ USN_REASON_NAMED_DATA_OVERWRITE = $00000010;
+ {$EXTERNALSYM USN_REASON_NAMED_DATA_OVERWRITE}
+ USN_REASON_NAMED_DATA_EXTEND = $00000020;
+ {$EXTERNALSYM USN_REASON_NAMED_DATA_EXTEND}
+ USN_REASON_NAMED_DATA_TRUNCATION = $00000040;
+ {$EXTERNALSYM USN_REASON_NAMED_DATA_TRUNCATION}
+ USN_REASON_FILE_CREATE = $00000100;
+ {$EXTERNALSYM USN_REASON_FILE_CREATE}
+ USN_REASON_FILE_DELETE = $00000200;
+ {$EXTERNALSYM USN_REASON_FILE_DELETE}
+ USN_REASON_EA_CHANGE = $00000400;
+ {$EXTERNALSYM USN_REASON_EA_CHANGE}
+ USN_REASON_SECURITY_CHANGE = $00000800;
+ {$EXTERNALSYM USN_REASON_SECURITY_CHANGE}
+ USN_REASON_RENAME_OLD_NAME = $00001000;
+ {$EXTERNALSYM USN_REASON_RENAME_OLD_NAME}
+ USN_REASON_RENAME_NEW_NAME = $00002000;
+ {$EXTERNALSYM USN_REASON_RENAME_NEW_NAME}
+ USN_REASON_INDEXABLE_CHANGE = $00004000;
+ {$EXTERNALSYM USN_REASON_INDEXABLE_CHANGE}
+ USN_REASON_BASIC_INFO_CHANGE = $00008000;
+ {$EXTERNALSYM USN_REASON_BASIC_INFO_CHANGE}
+ USN_REASON_HARD_LINK_CHANGE = $00010000;
+ {$EXTERNALSYM USN_REASON_HARD_LINK_CHANGE}
+ USN_REASON_COMPRESSION_CHANGE = $00020000;
+ {$EXTERNALSYM USN_REASON_COMPRESSION_CHANGE}
+ USN_REASON_ENCRYPTION_CHANGE = $00040000;
+ {$EXTERNALSYM USN_REASON_ENCRYPTION_CHANGE}
+ USN_REASON_OBJECT_ID_CHANGE = $00080000;
+ {$EXTERNALSYM USN_REASON_OBJECT_ID_CHANGE}
+ USN_REASON_REPARSE_POINT_CHANGE = $00100000;
+ {$EXTERNALSYM USN_REASON_REPARSE_POINT_CHANGE}
+ USN_REASON_STREAM_CHANGE = $00200000;
+ {$EXTERNALSYM USN_REASON_STREAM_CHANGE}
+
+ USN_REASON_CLOSE = DWORD($80000000);
+ {$EXTERNALSYM USN_REASON_CLOSE}
+
+//
+// Structure for FSCTL_QUERY_USN_JOUNAL
+//
+
+type
+ PUSN_JOURNAL_DATA = ^USN_JOURNAL_DATA;
+ {$EXTERNALSYM PUSN_JOURNAL_DATA}
+ USN_JOURNAL_DATA = record
+ UsnJournalID: DWORDLONG;
+ FirstUsn: USN;
+ NextUsn: USN;
+ LowestValidUsn: USN;
+ MaxUsn: USN;
+ MaximumSize: DWORDLONG;
+ AllocationDelta: DWORDLONG;
+ end;
+ {$EXTERNALSYM USN_JOURNAL_DATA}
+ TUsnJournalData = USN_JOURNAL_DATA;
+ PUsnJournalData = PUSN_JOURNAL_DATA;
+
+//
+// Structure for FSCTL_DELETE_USN_JOURNAL
+//
+
+ PDELETE_USN_JOURNAL_DATA = ^DELETE_USN_JOURNAL_DATA;
+ {$EXTERNALSYM PDELETE_USN_JOURNAL_DATA}
+ DELETE_USN_JOURNAL_DATA = record
+ UsnJournalID: DWORDLONG;
+ DeleteFlags: DWORD;
+ end;
+ {$EXTERNALSYM DELETE_USN_JOURNAL_DATA}
+ TDeleteUsnJournalData = DELETE_USN_JOURNAL_DATA;
+ PDeleteUsnJournalData = PDELETE_USN_JOURNAL_DATA;
+
+const
+ USN_DELETE_FLAG_DELETE = $00000001;
+ {$EXTERNALSYM USN_DELETE_FLAG_DELETE}
+ USN_DELETE_FLAG_NOTIFY = $00000002;
+ {$EXTERNALSYM USN_DELETE_FLAG_NOTIFY}
+
+ USN_DELETE_VALID_FLAGS = $00000003;
+ {$EXTERNALSYM USN_DELETE_VALID_FLAGS}
+
+//
+// Structure for FSCTL_MARK_HANDLE
+//
+
+type
+ PMARK_HANDLE_INFO = ^MARK_HANDLE_INFO;
+ {$EXTERNALSYM PMARK_HANDLE_INFO}
+ MARK_HANDLE_INFO = record
+ UsnSourceInfo: DWORD;
+ VolumeHandle: HANDLE;
+ HandleInfo: DWORD;
+ end;
+ {$EXTERNALSYM MARK_HANDLE_INFO}
+ TMarkHandleInfo = MARK_HANDLE_INFO;
+ PMarkHandleInfo = PMARK_HANDLE_INFO;
+
+{$IFDEF _WIN64}
+
+//
+// 32/64 Bit thunking support structure
+//
+
+ MARK_HANDLE_INFO32 = record
+ UsnSourceInfo: DWORD;
+ VolumeHandle: UINT32;
+ HandleInfo: DWORD;
+ end;
+ {$EXTERNALSYM MARK_HANDLE_INFO32}
+ PMARK_HANDLE_INFO32 = ^MARK_HANDLE_INFO32;
+ {$EXTERNALSYM PMARK_HANDLE_INFO32}
+ TMarkHandleInfo32 = MARK_HANDLE_INFO32;
+ PMarkHandleInfo32 = PMARK_HANDLE_INFO32;
+
+{$ENDIF _WIN64}
+
+//
+// Flags for the additional source information above.
+//
+// USN_SOURCE_DATA_MANAGEMENT - Service is not modifying the external view
+// of any part of the file. Typical case is HSM moving data to
+// and from external storage.
+//
+// USN_SOURCE_AUXILIARY_DATA - Service is not modifying the external view
+// of the file with regard to the application that created this file.
+// Can be used to add private data streams to a file.
+//
+// USN_SOURCE_REPLICATION_MANAGEMENT - Service is modifying a file to match
+// the contents of the same file which exists in another member of the
+// replica set.
+//
+
+const
+ USN_SOURCE_DATA_MANAGEMENT = $00000001;
+ {$EXTERNALSYM USN_SOURCE_DATA_MANAGEMENT}
+ USN_SOURCE_AUXILIARY_DATA = $00000002;
+ {$EXTERNALSYM USN_SOURCE_AUXILIARY_DATA}
+ USN_SOURCE_REPLICATION_MANAGEMENT = $00000004;
+ {$EXTERNALSYM USN_SOURCE_REPLICATION_MANAGEMENT}
+
+//
+// Flags for the HandleInfo field above
+//
+// MARK_HANDLE_PROTECT_CLUSTERS - disallow any defragmenting (FSCTL_MOVE_FILE) until the
+// the handle is closed
+//
+
+ MARK_HANDLE_PROTECT_CLUSTERS = $00000001;
+ {$EXTERNALSYM MARK_HANDLE_PROTECT_CLUSTERS}
+
+//
+// Structure for FSCTL_SECURITY_ID_CHECK
+//
+
+type
+ PBULK_SECURITY_TEST_DATA = ^BULK_SECURITY_TEST_DATA;
+ {$EXTERNALSYM PBULK_SECURITY_TEST_DATA}
+ BULK_SECURITY_TEST_DATA = record
+ DesiredAccess: ACCESS_MASK;
+ SecurityIds: array [0..0] of DWORD;
+ end;
+ {$EXTERNALSYM BULK_SECURITY_TEST_DATA}
+ TBulkSecurityTestData = BULK_SECURITY_TEST_DATA;
+ PBulkSecurityTestData = PBULK_SECURITY_TEST_DATA;
+
+//
+// Output flags for the FSCTL_IS_VOLUME_DIRTY
+//
+
+const
+ VOLUME_IS_DIRTY = $00000001;
+ {$EXTERNALSYM VOLUME_IS_DIRTY}
+ VOLUME_UPGRADE_SCHEDULED = $00000002;
+ {$EXTERNALSYM VOLUME_UPGRADE_SCHEDULED}
+
+//
+// Structures for FSCTL_FILE_PREFETCH
+//
+
+type
+ _FILE_PREFETCH = record
+ Type_: DWORD;
+ Count: DWORD;
+ Prefetch: array [0..0] of DWORDLONG;
+ end;
+ {$EXTERNALSYM _FILE_PREFETCH}
+ FILE_PREFETCH = _FILE_PREFETCH;
+ {$EXTERNALSYM FILE_PREFETCH}
+ PFILE_PREFETCH = ^FILE_PREFETCH;
+ {$EXTERNALSYM PFILE_PREFETCH}
+ TFilePrefetch = FILE_PREFETCH;
+ PFilePrefetch = PFILE_PREFETCH;
+
+const
+ FILE_PREFETCH_TYPE_FOR_CREATE = $1;
+ {$EXTERNALSYM FILE_PREFETCH_TYPE_FOR_CREATE}
+//
+// Structures for FSCTL_FILESYSTEM_GET_STATISTICS
+//
+// Filesystem performance counters
+//
+
+type
+ PFILESYSTEM_STATISTICS = ^FILESYSTEM_STATISTICS;
+ {$EXTERNALSYM PFILESYSTEM_STATISTICS}
+ _FILESYSTEM_STATISTICS = record
+ FileSystemType: WORD;
+ Version: WORD; // currently version 1
+ SizeOfCompleteStructure: DWORD; // must by a mutiple of 64 bytes
+ UserFileReads: DWORD;
+ UserFileReadBytes: DWORD;
+ UserDiskReads: DWORD;
+ UserFileWrites: DWORD;
+ UserFileWriteBytes: DWORD;
+ UserDiskWrites: DWORD;
+ MetaDataReads: DWORD;
+ MetaDataReadBytes: DWORD;
+ MetaDataDiskReads: DWORD;
+ MetaDataWrites: DWORD;
+ MetaDataWriteBytes: DWORD;
+ MetaDataDiskWrites: DWORD;
+ //
+ // The file system's private structure is appended here.
+ //
+ end;
+ {$EXTERNALSYM _FILESYSTEM_STATISTICS}
+ FILESYSTEM_STATISTICS = _FILESYSTEM_STATISTICS;
+ {$EXTERNALSYM FILESYSTEM_STATISTICS}
+ TFilesystemStatistics = FILESYSTEM_STATISTICS;
+ PFilesystemStatistics = PFILESYSTEM_STATISTICS;
+
+// values for FS_STATISTICS.FileSystemType
+
+const
+ FILESYSTEM_STATISTICS_TYPE_NTFS = 1;
+ {$EXTERNALSYM FILESYSTEM_STATISTICS_TYPE_NTFS}
+ FILESYSTEM_STATISTICS_TYPE_FAT = 2;
+ {$EXTERNALSYM FILESYSTEM_STATISTICS_TYPE_FAT}
+
+//
+// File System Specific Statistics Data
+//
+
+type
+ PFAT_STATISTICS = ^FAT_STATISTICS;
+ {$EXTERNALSYM PFAT_STATISTICS}
+ _FAT_STATISTICS = record
+ CreateHits: DWORD;
+ SuccessfulCreates: DWORD;
+ FailedCreates: DWORD;
+ NonCachedReads: DWORD;
+ NonCachedReadBytes: DWORD;
+ NonCachedWrites: DWORD;
+ NonCachedWriteBytes: DWORD;
+ NonCachedDiskReads: DWORD;
+ NonCachedDiskWrites: DWORD;
+ end;
+ {$EXTERNALSYM _FAT_STATISTICS}
+ FAT_STATISTICS = _FAT_STATISTICS;
+ {$EXTERNALSYM FAT_STATISTICS}
+ TFatStatistics = FAT_STATISTICS;
+ PFatStatistics = PFAT_STATISTICS;
+
+ // NTFS Statistics
+
+ TMftWritesUserLevel = record
+ Write: WORD;
+ Create: WORD;
+ SetInfo: WORD;
+ Flush: WORD;
+ end;
+
+ TMft2WritesUserLevel = record
+ Write: WORD;
+ Create: WORD;
+ SetInfo: WORD;
+ Flush: WORD;
+ end;
+
+ TBitmapWritesUserLevel = record
+ Write: WORD;
+ Create: WORD;
+ SetInfo: WORD;
+ end;
+
+ TMftBitmapWritesUserLevel = record
+ Write: WORD;
+ Create: WORD;
+ SetInfo: WORD;
+ Flush: WORD;
+ end;
+
+ TAllocate = record
+ Calls: DWORD; // number of individual calls to allocate clusters
+ Clusters: DWORD; // number of clusters allocated
+ Hints: DWORD; // number of times a hint was specified
+
+ RunsReturned: DWORD; // number of runs used to satisify all the requests
+
+ HintsHonored: DWORD; // number of times the hint was useful
+ HintsClusters: DWORD; // number of clusters allocated via the hint
+ Cache: DWORD; // number of times the cache was useful other than the hint
+ CacheClusters: DWORD; // number of clusters allocated via the cache other than the hint
+ CacheMiss: DWORD; // number of times the cache wasn't useful
+ CacheMissClusters: DWORD; // number of clusters allocated without the cache
+ end;
+
+ {$EXTERNALSYM NTFS_STATISTICS}
+ PNTFS_STATISTICS = ^NTFS_STATISTICS;
+ _NTFS_STATISTICS = record
+
+ LogFileFullExceptions: DWORD;
+ OtherExceptions: DWORD;
+
+ //
+ // Other meta data io's
+ //
+
+ MftReads: DWORD;
+ MftReadBytes: DWORD;
+ MftWrites: DWORD;
+ MftWriteBytes: DWORD;
+ MftWritesUserLevel: TMftWritesUserLevel;
+
+ MftWritesFlushForLogFileFull: WORD;
+ MftWritesLazyWriter: WORD;
+ MftWritesUserRequest: WORD;
+
+ Mft2Writes: DWORD;
+ Mft2WriteBytes: DWORD;
+ Mft2WritesUserLevel: TMft2WritesUserLevel;
+
+ Mft2WritesFlushForLogFileFull: WORD;
+ Mft2WritesLazyWriter: WORD;
+ Mft2WritesUserRequest: WORD;
+
+ RootIndexReads: DWORD;
+ RootIndexReadBytes: DWORD;
+ RootIndexWrites: DWORD;
+ RootIndexWriteBytes: DWORD;
+
+ BitmapReads: DWORD;
+ BitmapReadBytes: DWORD;
+ BitmapWrites: DWORD;
+ BitmapWriteBytes: DWORD;
+
+ BitmapWritesFlushForLogFileFull: WORD;
+ BitmapWritesLazyWriter: WORD;
+ BitmapWritesUserRequest: WORD;
+
+ BitmapWritesUserLevel: TBitmapWritesUserLevel;
+
+ MftBitmapReads: DWORD;
+ MftBitmapReadBytes: DWORD;
+ MftBitmapWrites: DWORD;
+ MftBitmapWriteBytes: DWORD;
+
+ MftBitmapWritesFlushForLogFileFull: WORD;
+ MftBitmapWritesLazyWriter: WORD;
+ MftBitmapWritesUserRequest: WORD;
+ MftBitmapWritesUserLevel: TMftBitmapWritesUserLevel;
+
+ UserIndexReads: DWORD;
+ UserIndexReadBytes: DWORD;
+ UserIndexWrites: DWORD;
+ UserIndexWriteBytes: DWORD;
+
+ //
+ // Additions for NT 5.0
+ //
+
+ LogFileReads: DWORD;
+ LogFileReadBytes: DWORD;
+ LogFileWrites: DWORD;
+ LogFileWriteBytes: DWORD;
+
+ Allocate: TAllocate;
+ end;
+ {$EXTERNALSYM _NTFS_STATISTICS}
+ NTFS_STATISTICS = _NTFS_STATISTICS;
+ {$EXTERNALSYM PNTFS_STATISTICS}
+ TNTFSStatistics = NTFS_STATISTICS;
+ PNTFSStatistics = PNTFS_STATISTICS;
+
+//
+// Structure for FSCTL_SET_OBJECT_ID, FSCTL_GET_OBJECT_ID, and FSCTL_CREATE_OR_GET_OBJECT_ID
+//
+
+ PFILE_OBJECTID_BUFFER = ^FILE_OBJECTID_BUFFER;
+ {$EXTERNALSYM PFILE_OBJECTID_BUFFER}
+ _FILE_OBJECTID_BUFFER = record
+
+ //
+ // This is the portion of the object id that is indexed.
+ //
+
+ ObjectId: array [0..15] of BYTE;
+
+ //
+ // This portion of the object id is not indexed, it's just
+ // some metadata for the user's benefit.
+ //
+
+ case Integer of
+ 0: (
+ BirthVolumeId: array [0..15] of BYTE;
+ BirthObjectId: array [0..15] of BYTE;
+ DomainId: array [0..15] of BYTE);
+ 1: (
+ ExtendedInfo: array [0..47] of BYTE);
+ end;
+ {$EXTERNALSYM _FILE_OBJECTID_BUFFER}
+ FILE_OBJECTID_BUFFER = _FILE_OBJECTID_BUFFER;
+ {$EXTERNALSYM FILE_OBJECTID_BUFFER}
+ TFileObjectIdBuffer = FILE_OBJECTID_BUFFER;
+ PFileObjectIdBuffer = PFILE_OBJECTID_BUFFER;
+
+//
+// Structure for FSCTL_SET_SPARSE
+//
+
+ PFILE_SET_SPARSE_BUFFER = ^FILE_SET_SPARSE_BUFFER;
+ {$EXTERNALSYM PFILE_SET_SPARSE_BUFFER}
+ _FILE_SET_SPARSE_BUFFER = record
+ SetSparse: ByteBool;
+ end;
+ {$EXTERNALSYM _FILE_SET_SPARSE_BUFFER}
+ FILE_SET_SPARSE_BUFFER = _FILE_SET_SPARSE_BUFFER;
+ {$EXTERNALSYM FILE_SET_SPARSE_BUFFER}
+ TFileSetSparseBuffer = FILE_SET_SPARSE_BUFFER;
+ PFileSetSparseBuffer = PFILE_SET_SPARSE_BUFFER;
+
+//
+// Structure for FSCTL_SET_ZERO_DATA
+//
+
+ PFILE_ZERO_DATA_INFORMATION = ^FILE_ZERO_DATA_INFORMATION;
+ {$EXTERNALSYM PFILE_ZERO_DATA_INFORMATION}
+ _FILE_ZERO_DATA_INFORMATION = record
+ FileOffset: LARGE_INTEGER;
+ BeyondFinalZero: LARGE_INTEGER;
+ end;
+ {$EXTERNALSYM _FILE_ZERO_DATA_INFORMATION}
+ FILE_ZERO_DATA_INFORMATION = _FILE_ZERO_DATA_INFORMATION;
+ {$EXTERNALSYM FILE_ZERO_DATA_INFORMATION}
+ TFileZeroDataInformation = FILE_ZERO_DATA_INFORMATION;
+ PFileZeroDataInformation = PFILE_ZERO_DATA_INFORMATION;
+
+//
+// Structure for FSCTL_QUERY_ALLOCATED_RANGES
+//
+
+//
+// Querying the allocated ranges requires an output buffer to store the
+// allocated ranges and an input buffer to specify the range to query.
+// The input buffer contains a single entry, the output buffer is an
+// array of the following structure.
+//
+
+ PFILE_ALLOCATED_RANGE_BUFFER = ^FILE_ALLOCATED_RANGE_BUFFER;
+ {$EXTERNALSYM PFILE_ALLOCATED_RANGE_BUFFER}
+ _FILE_ALLOCATED_RANGE_BUFFER = record
+ FileOffset: LARGE_INTEGER;
+ Length: LARGE_INTEGER;
+ end;
+ {$EXTERNALSYM _FILE_ALLOCATED_RANGE_BUFFER}
+ FILE_ALLOCATED_RANGE_BUFFER = _FILE_ALLOCATED_RANGE_BUFFER;
+ {$EXTERNALSYM FILE_ALLOCATED_RANGE_BUFFER}
+ TFileAllocatedRangeBuffer = FILE_ALLOCATED_RANGE_BUFFER;
+ PFileAllocatedRangeBuffer = PFILE_ALLOCATED_RANGE_BUFFER;
+
+//
+// Structures for FSCTL_SET_ENCRYPTION, FSCTL_WRITE_RAW_ENCRYPTED, and FSCTL_READ_RAW_ENCRYPTED
+//
+
+//
+// The input buffer to set encryption indicates whether we are to encrypt/decrypt a file
+// or an individual stream.
+//
+
+ PENCRYPTION_BUFFER = ^ENCRYPTION_BUFFER;
+ {$EXTERNALSYM PENCRYPTION_BUFFER}
+ _ENCRYPTION_BUFFER = record
+ EncryptionOperation: DWORD;
+ Private_: array [0..0] of BYTE;
+ end;
+ {$EXTERNALSYM _ENCRYPTION_BUFFER}
+ ENCRYPTION_BUFFER = _ENCRYPTION_BUFFER;
+ {$EXTERNALSYM ENCRYPTION_BUFFER}
+ TEncryptionBuffer = ENCRYPTION_BUFFER;
+ PEncryptionBuffer = PENCRYPTION_BUFFER;
+
+const
+ FILE_SET_ENCRYPTION = $00000001;
+ {$EXTERNALSYM FILE_SET_ENCRYPTION}
+ FILE_CLEAR_ENCRYPTION = $00000002;
+ {$EXTERNALSYM FILE_CLEAR_ENCRYPTION}
+ STREAM_SET_ENCRYPTION = $00000003;
+ {$EXTERNALSYM STREAM_SET_ENCRYPTION}
+ STREAM_CLEAR_ENCRYPTION = $00000004;
+ {$EXTERNALSYM STREAM_CLEAR_ENCRYPTION}
+
+ MAXIMUM_ENCRYPTION_VALUE = $00000004;
+ {$EXTERNALSYM MAXIMUM_ENCRYPTION_VALUE}
+
+//
+// The optional output buffer to set encryption indicates that the last encrypted
+// stream in a file has been marked as decrypted.
+//
+
+type
+ PDECRYPTION_STATUS_BUFFER = ^DECRYPTION_STATUS_BUFFER;
+ {$EXTERNALSYM PDECRYPTION_STATUS_BUFFER}
+ _DECRYPTION_STATUS_BUFFER = record
+ NoEncryptedStreams: ByteBool;
+ end;
+ {$EXTERNALSYM _DECRYPTION_STATUS_BUFFER}
+ DECRYPTION_STATUS_BUFFER = _DECRYPTION_STATUS_BUFFER;
+ {$EXTERNALSYM DECRYPTION_STATUS_BUFFER}
+ TDecryptionStatusBuffer = DECRYPTION_STATUS_BUFFER;
+ PDecryptionStatusBuffer = PDECRYPTION_STATUS_BUFFER;
+
+const
+ ENCRYPTION_FORMAT_DEFAULT = $01;
+ {$EXTERNALSYM ENCRYPTION_FORMAT_DEFAULT}
+
+ COMPRESSION_FORMAT_SPARSE = $4000;
+ {$EXTERNALSYM COMPRESSION_FORMAT_SPARSE}
+
+//
+// Request Encrypted Data structure. This is used to indicate
+// the range of the file to read. It also describes the
+// output buffer used to return the data.
+//
+
+type
+ PREQUEST_RAW_ENCRYPTED_DATA = ^REQUEST_RAW_ENCRYPTED_DATA;
+ {$EXTERNALSYM PREQUEST_RAW_ENCRYPTED_DATA}
+ _REQUEST_RAW_ENCRYPTED_DATA = record
+ //
+ // Requested file offset and requested length to read.
+ // The fsctl will round the starting offset down
+ // to a file system boundary. It will also
+ // round the length up to a file system boundary.
+ //
+ FileOffset: LONGLONG;
+ Length: DWORD;
+ end;
+ {$EXTERNALSYM _REQUEST_RAW_ENCRYPTED_DATA}
+ REQUEST_RAW_ENCRYPTED_DATA = _REQUEST_RAW_ENCRYPTED_DATA;
+ {$EXTERNALSYM REQUEST_RAW_ENCRYPTED_DATA}
+ TRequestRawEncryptedData = REQUEST_RAW_ENCRYPTED_DATA;
+ PRequestRawEncryptedData = PREQUEST_RAW_ENCRYPTED_DATA;
+
+//
+// Encrypted Data Information structure. This structure
+// is used to return raw encrypted data from a file in
+// order to perform off-line recovery. The data will be
+// encrypted or encrypted and compressed. The off-line
+// service will need to use the encryption and compression
+// format information to recover the file data. In the
+// event that the data is both encrypted and compressed then
+// the decryption must occur before decompression. All
+// the data units below must be encrypted and compressed
+// with the same format.
+//
+// The data will be returned in units. The data unit size
+// will be fixed per request. If the data is compressed
+// then the data unit size will be the compression unit size.
+//
+// This structure is at the beginning of the buffer used to
+// return the encrypted data. The actual raw bytes from
+// the file will follow this buffer. The offset of the
+// raw bytes from the beginning of this structure is
+// specified in the REQUEST_RAW_ENCRYPTED_DATA structure
+// described above.
+//
+
+ PENCRYPTED_DATA_INFO = ^ENCRYPTED_DATA_INFO;
+ {$EXTERNALSYM PENCRYPTED_DATA_INFO}
+ _ENCRYPTED_DATA_INFO = record
+
+ //
+ // This is the file offset for the first entry in the
+ // data block array. The file system will round
+ // the requested start offset down to a boundary
+ // that is consistent with the format of the file.
+ //
+
+ StartingFileOffset: DWORDLONG;
+
+ //
+ // Data offset in output buffer. The output buffer
+ // begins with an ENCRYPTED_DATA_INFO structure.
+ // The file system will then store the raw bytes from
+ // disk beginning at the following offset within the
+ // output buffer.
+ //
+
+ OutputBufferOffset: DWORD;
+
+ //
+ // The number of bytes being returned that are within
+ // the size of the file. If this value is less than
+ // (NumberOfDataBlocks << DataUnitShift), it means the
+ // end of the file occurs within this transfer. Any
+ // data beyond file size is invalid and was never
+ // passed to the encryption driver.
+ //
+
+ BytesWithinFileSize: DWORD;
+
+ //
+ // The number of bytes being returned that are below
+ // valid data length. If this value is less than
+ // (NumberOfDataBlocks << DataUnitShift), it means the
+ // end of the valid data occurs within this transfer.
+ // After decrypting the data from this transfer, any
+ // byte(s) beyond valid data length must be zeroed.
+ //
+
+ BytesWithinValidDataLength: DWORD;
+
+ //
+ // Code for the compression format as defined in
+ // ntrtl.h. Note that COMPRESSION_FORMAT_NONE
+ // and COMPRESSION_FORMAT_DEFAULT are invalid if
+ // any of the described chunks are compressed.
+ //
+
+ CompressionFormat: WORD;
+
+ //
+ // The DataUnit is the granularity used to access the
+ // disk. It will be the same as the compression unit
+ // size for a compressed file. For an uncompressed
+ // file, it will be some cluster-aligned power of 2 that
+ // the file system deems convenient. A caller should
+ // not expect that successive calls will have the
+ // same data unit shift value as the previous call.
+ //
+ // Since chunks and compression units are expected to be
+ // powers of 2 in size, we express them log2. So, for
+ // example (1 << ChunkShift) == ChunkSizeInBytes. The
+ // ClusterShift indicates how much space must be saved
+ // to successfully compress a compression unit - each
+ // successfully compressed data unit must occupy
+ // at least one cluster less in bytes than an uncompressed
+ // data block unit.
+ //
+
+ DataUnitShift: BYTE;
+ ChunkShift: BYTE;
+ ClusterShift: BYTE;
+
+ //
+ // The format for the encryption.
+ //
+
+ EncryptionFormat: BYTE;
+
+ //
+ // This is the number of entries in the data block size
+ // array.
+ //
+
+ NumberOfDataBlocks: WORD;
+
+ //
+ // This is an array of sizes in the data block array. There
+ // must be one entry in this array for each data block
+ // read from disk. The size has a different meaning
+ // depending on whether the file is compressed.
+ //
+ // A size of zero always indicates that the final data consists entirely
+ // of zeroes. There is no decryption or decompression to
+ // perform.
+ //
+ // If the file is compressed then the data block size indicates
+ // whether this block is compressed. A size equal to
+ // the block size indicates that the corresponding block did
+ // not compress. Any other non-zero size indicates the
+ // size of the compressed data which needs to be
+ // decrypted/decompressed.
+ //
+ // If the file is not compressed then the data block size
+ // indicates the amount of data within the block that
+ // needs to be decrypted. Any other non-zero size indicates
+ // that the remaining bytes in the data unit within the file
+ // consists of zeros. An example of this is when the
+ // the read spans the valid data length of the file. There
+ // is no data to decrypt past the valid data length.
+ //
+
+ DataBlockSize: array [0..ANYSIZE_ARRAY - 1] of DWORD;
+ end;
+ {$EXTERNALSYM _ENCRYPTED_DATA_INFO}
+ ENCRYPTED_DATA_INFO = _ENCRYPTED_DATA_INFO;
+ {$EXTERNALSYM ENCRYPTED_DATA_INFO}
+ TEncryptedDataInfo = ENCRYPTED_DATA_INFO;
+ PEncryptedDataInfo = PENCRYPTED_DATA_INFO;
+
+//
+// FSCTL_READ_FROM_PLEX support
+// Request Plex Read Data structure. This is used to indicate
+// the range of the file to read. It also describes
+// which plex to perform the read from.
+//
+
+ _PLEX_READ_DATA_REQUEST = record
+
+ //
+ // Requested offset and length to read.
+ // The offset can be the virtual offset (vbo) in to a file,
+ // or a volume. In the case of a file offset,
+ // the fsd will round the starting offset down
+ // to a file system boundary. It will also
+ // round the length up to a file system boundary and
+ // enforce any other applicable limits.
+ //
+
+ ByteOffset: LARGE_INTEGER;
+ ByteLength: DWORD;
+ PlexNumber: DWORD;
+ end;
+ {$EXTERNALSYM _PLEX_READ_DATA_REQUEST}
+ PLEX_READ_DATA_REQUEST = _PLEX_READ_DATA_REQUEST;
+ {$EXTERNALSYM PLEX_READ_DATA_REQUEST}
+ PPLEX_READ_DATA_REQUEST = ^PLEX_READ_DATA_REQUEST;
+ {$EXTERNALSYM PPLEX_READ_DATA_REQUEST}
+ TPlexReadDataRequest = PLEX_READ_DATA_REQUEST;
+ PPlexReadDataRequest = PPLEX_READ_DATA_REQUEST;
+
+//
+// FSCTL_SIS_COPYFILE support
+// Source and destination file names are passed in the FileNameBuffer.
+// Both strings are null terminated, with the source name starting at
+// the beginning of FileNameBuffer, and the destination name immediately
+// following. Length fields include terminating nulls.
+//
+
+ PSI_COPYFILE = ^SI_COPYFILE;
+ {$EXTERNALSYM PSI_COPYFILE}
+ _SI_COPYFILE = record
+ SourceFileNameLength: DWORD;
+ DestinationFileNameLength: DWORD;
+ Flags: DWORD;
+ FileNameBuffer: array [0..0] of WCHAR;
+ end;
+ {$EXTERNALSYM _SI_COPYFILE}
+ SI_COPYFILE = _SI_COPYFILE;
+ {$EXTERNALSYM SI_COPYFILE}
+ TSiCopyfile = SI_COPYFILE;
+ PSiCopyfile = PSI_COPYFILE;
+
+const
+ COPYFILE_SIS_LINK = $0001; // Copy only if source is SIS
+ {$EXTERNALSYM COPYFILE_SIS_LINK}
+ COPYFILE_SIS_REPLACE = $0002; // Replace destination if it exists, otherwise don't.
+ {$EXTERNALSYM COPYFILE_SIS_REPLACE}
+ COPYFILE_SIS_FLAGS = $0003;
+ {$EXTERNALSYM COPYFILE_SIS_FLAGS}
+
+//
+// These IOCTLs are handled by hard disk volumes.
+//
+
+ IOCTL_VOLUME_BASE = DWORD('V');
+ {$EXTERNALSYM IOCTL_VOLUME_BASE}
+
+ IOCTL_VOLUME_GET_VOLUME_DISK_EXTENTS = (
+ (IOCTL_VOLUME_BASE shl 16) or (FILE_ANY_ACCESS shl 14) or
+ (0 shl 2) or METHOD_BUFFERED);
+ {$EXTERNALSYM IOCTL_VOLUME_GET_VOLUME_DISK_EXTENTS}
+
+ IOCTL_VOLUME_IS_CLUSTERED = (
+ (IOCTL_VOLUME_BASE shl 16) or (FILE_ANY_ACCESS shl 14) or
+ (12 shl 2) or METHOD_BUFFERED);
+ {$EXTERNALSYM IOCTL_VOLUME_IS_CLUSTERED}
+
+//
+// Disk extent definition.
+//
+
+type
+ PDISK_EXTENT = ^DISK_EXTENT;
+ {$EXTERNALSYM PDISK_EXTENT}
+ _DISK_EXTENT = record
+ DiskNumber: DWORD;
+ StartingOffset: LARGE_INTEGER;
+ ExtentLength: LARGE_INTEGER;
+ end;
+ {$EXTERNALSYM _DISK_EXTENT}
+ DISK_EXTENT = _DISK_EXTENT;
+ {$EXTERNALSYM DISK_EXTENT}
+ TDiskExtent = DISK_EXTENT;
+ PDiskExtent = PDISK_EXTENT;
+
+//
+// Output structure for IOCTL_VOLUME_GET_VOLUME_DISK_EXTENTS.
+//
+
+ PVOLUME_DISK_EXTENTS = ^VOLUME_DISK_EXTENTS;
+ {$EXTERNALSYM PVOLUME_DISK_EXTENTS}
+ _VOLUME_DISK_EXTENTS = record
+ NumberOfDiskExtents: DWORD;
+ Extents: array [0..0] of DISK_EXTENT;
+ end;
+ {$EXTERNALSYM _VOLUME_DISK_EXTENTS}
+ VOLUME_DISK_EXTENTS = _VOLUME_DISK_EXTENTS;
+ {$EXTERNALSYM VOLUME_DISK_EXTENTS}
+ TVolumeDiskExtents = VOLUME_DISK_EXTENTS;
+ PVolumeDiskExtents = PVOLUME_DISK_EXTENTS;
+
+implementation
+
+function CTL_CODE(DeviceType, Func, Method, Access: WORD): DWORD;
+begin
+ Result := (DeviceType shl 16) or (Access shl 14) or (Func shl 2) or Method;
+end;
+
+function DEVICE_TYPE_FROM_CTL_CODE(CtrlCode: DWORD): WORD;
+begin
+ Result := (CtrlCode and DWORD($FFFF0000)) shr 16;
+end;
+
+{
+#define IsRecognizedPartition( PartitionType ) ( \
+ ((PartitionType & PARTITION_NTFT) && ((PartitionType & ~0xC0) == PARTITION_FAT_12)) || \
+ ((PartitionType & PARTITION_NTFT) && ((PartitionType & ~0xC0) == PARTITION_IFS)) || \
+ ((PartitionType & PARTITION_NTFT) && ((PartitionType & ~0xC0) == PARTITION_HUGE)) || \
+ ((PartitionType & PARTITION_NTFT) && ((PartitionType & ~0xC0) == PARTITION_FAT32)) || \
+ ((PartitionType & PARTITION_NTFT) && ((PartitionType & ~0xC0) == PARTITION_FAT32_XINT13)) || \
+ ((PartitionType & PARTITION_NTFT) && ((PartitionType & ~0xC0) == PARTITION_XINT13)) || \
+ ((PartitionType) == PARTITION_FAT_12) || \
+ ((PartitionType) == PARTITION_FAT_16) || \
+ ((PartitionType) == PARTITION_IFS) || \
+ ((PartitionType) == PARTITION_HUGE) || \
+ ((PartitionType) == PARTITION_FAT32) || \
+ ((PartitionType) == PARTITION_FAT32_XINT13) || \
+ ((PartitionType) == PARTITION_XINT13) )
+}
+
+function IsRecognizedPartition(PartitionType: DWORD): Boolean;
+begin
+ Result :=
+ (((PartitionType and PARTITION_NTFT) <> 0) and ((PartitionType and not $C0) = PARTITION_FAT_12)) or
+ (((PartitionType and PARTITION_NTFT) <> 0) and ((PartitionType and not $C0) = PARTITION_IFS)) or
+ (((PartitionType and PARTITION_NTFT) <> 0) and ((PartitionType and not $C0) = PARTITION_HUGE)) or
+ (((PartitionType and PARTITION_NTFT) <> 0) and ((PartitionType and not $C0) = PARTITION_FAT32)) or
+ (((PartitionType and PARTITION_NTFT) <> 0) and ((PartitionType and not $C0) = PARTITION_FAT32_XINT13)) or
+ (((PartitionType and PARTITION_NTFT) <> 0) and ((PartitionType and not $C0) = PARTITION_XINT13)) or
+ ((PartitionType) = PARTITION_FAT_12) or
+ ((PartitionType) = PARTITION_FAT_16) or
+ ((PartitionType) = PARTITION_IFS) or
+ ((PartitionType) = PARTITION_HUGE) or
+ ((PartitionType) = PARTITION_FAT32) or
+ ((PartitionType) = PARTITION_FAT32_XINT13) or
+ ((PartitionType) = PARTITION_XINT13);
+end;
+
+function IsContainerPartition(PartitionType: DWORD): Boolean;
+begin
+ Result :=
+ (PartitionType = PARTITION_EXTENDED) or
+ (PartitionType = PARTITION_XINT13_EXTENDED);
+end;
+
+function IsFTPartition(PartitionType: DWORD): Boolean;
+begin
+ Result := ((PartitionType and PARTITION_NTFT) <> 0) and IsRecognizedPartition(PartitionType);
+end;
+
+function DiskGeometryGetPartition(Geometry: PDiskGeometryEx): PDiskPartitionInfo;
+begin
+ Result := @Geometry^.Data[0];
+end;
+
+function DiskGeometryGetDetect(Geometry: PDiskGeometryEx): PDiskDetectionInfo;
+var
+ Partition: PDiskPartitionInfo;
+begin
+ Partition := DiskGeometryGetPartition(Geometry);
+ Result := PDiskDetectionInfo(PChar(Partition) + Partition^.SizeOfPartitionInfo*SizeOf(DWORD));
+end;
+
+end.
diff --git a/packages/extra/winunits/jwawinldap.pas b/packages/extra/winunits/jwawinldap.pas
index b67b65d442..77b17f28ee 100644
--- a/packages/extra/winunits/jwawinldap.pas
+++ b/packages/extra/winunits/jwawinldap.pas
@@ -1,2764 +1,2764 @@
-{******************************************************************************}
-{ }
-{ LDAP Client 32 API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: winldap.h, released August 1999. The original Pascal }
-{ code is: WinLDAP.pas, released December 1998. The initial developer of the }
-{ Pascal code is Luk Vermeulen (lvermeulen att seria dott com). }
-{ }
-{ Portions created by Luk Vermeulen are Copyright (C) 1998 Luk Vermeulen. }
-{ Portions created by Rudy Velthuis are Copyright (C) 2000 Rudy Velthuis. }
-{ Portions created by M. van Brakel are Copyright (C) 2001 Marcel van Brakel. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{******************************************************************************}
-
-// $Id: jwawinldap.pas,v 1.1 2005/04/04 07:56:11 marco Exp $
-
-unit JwaWinLDAP;
-
-{$WEAKPACKAGEUNIT}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- Windows;
-
-{$HPPEMIT '#ifndef LDAP_CLIENT_DEFINED'}
-{$HPPEMIT '#pragma option push -b -a8 -pc -A- /*P_O_Push_S*/'}
-{$HPPEMIT '#define LDAP_CLIENT_DEFINED'}
-
-{$HPPEMIT '#ifndef BASETYPES'}
-{$HPPEMIT '#include <windef.h>'}
-{$HPPEMIT '#endif'}
-
-(*
-Copyright (c) 1996-1999 Microsoft Corporation
-
-Module Name:
-
- winldap.h LDAP client 32 API header file
-
-Abstract:
-
- This module is the header file for the 32 bit LDAP client API for
- Windows NT and Windows 95. This API is based on RFC 1823 with some
- enhancements for LDAP v3.
-
- Notes about Unicode support :
-
- If you have UNICODE defined at compile time, you'll pull in the unicode
- versions of the calls. Note that your executable may then not work with
- other implementations of the LDAP API that don't support Unicode. If
- UNICODE is not defined, then we define the LDAP calls without the trailing
- 'A'(as in ldap_bind rather than ldap_bindA)so that your app may work
- with other implementations that don't support Unicode.
-
- The import library has all three forms of the call present... ldap_bindW,
- ldap_bindA, and ldap_bind. ldap_bindA simply calls ldap_bind. ldap_bind
- simply converts the arguments to unicode and calls ldap_bindW. The
- reason this is done is because we have to put UTF-8 on the wire, so if
- we converted from Unicode to single byte, we'd loose information. Since
- all core processing is done in Unicode, nothing is lost.
-
-Updates :
-
- 11/01/96 Modified for new API RFC draft.
-
-Environments :
-
- Win32 user mode
-
-*)
-
-// Extra defines to keep compiler happy.
-type
- PPCharA = ^PAnsiChar;
- {$NODEFINE PPCharA}
- PPCharW = ^PWideChar;
- {$NODEFINE PPCharW}
- PPChar = PPCharA;
-
- PPPCharA = ^PPCharA;
- {$NODEFINE PPPCharA}
- PPPCharW = ^PPCharW;
- {$NODEFINE PPPCharW}
- PPPChar = PPPCharA;
-
-//
-// The #define LDAP_UNICODE controls if we map the undecorated calls to
-// their unicode counterparts or just leave them defined as the normal
-// single byte entry points.
-//
-// If you want to write a UNICODE enabled application, you'd normally
-// just have UNICODE defined and then we'll default to using all LDAP
-// Unicode calls.
-//
-
-const
- //
- // Global constants
- //
-
- {$EXTERNALSYM LDAP_PORT}
- LDAP_PORT = 389;
- {$EXTERNALSYM LDAP_SSL_PORT}
- LDAP_SSL_PORT = 636;
- {$EXTERNALSYM LDAP_GC_PORT}
- LDAP_GC_PORT = 3268;
- {$EXTERNALSYM LDAP_SSL_GC_PORT}
- LDAP_SSL_GC_PORT = 3269;
-
-//
-// We currently support going to either v2 or v3 servers, though the API
-// is only a V2 API. We'll add support for result sets, server side
-// sorting, extended operations, etc as soon as they stabilize.
-//
-
- {$EXTERNALSYM LDAP_VERSION1}
- LDAP_VERSION1 = 1;
- {$EXTERNALSYM LDAP_VERSION2}
- LDAP_VERSION2 = 2;
- {$EXTERNALSYM LDAP_VERSION3}
- LDAP_VERSION3 = 3;
- {$EXTERNALSYM LDAP_VERSION}
- LDAP_VERSION = LDAP_VERSION2;
-
-//
-// All tags are CCFTTTTT.
-// CC Tag Class 00 = universal
-// 01 = application wide
-// 10 = context specific
-// 11 = private use
-//
-// F Form 0 primitive
-// 1 constructed
-//
-// TTTTT Tag Number
-//
-
-//
-// LDAP v2 & v3 commands.
-//
-
- {$EXTERNALSYM LDAP_BIND_CMD}
- LDAP_BIND_CMD = $60; // application + constructed
- {$EXTERNALSYM LDAP_UNBIND_CMD}
- LDAP_UNBIND_CMD = $42; // application + primitive
- {$EXTERNALSYM LDAP_SEARCH_CMD}
- LDAP_SEARCH_CMD = $63; // application + constructed
- {$EXTERNALSYM LDAP_MODIFY_CMD}
- LDAP_MODIFY_CMD = $66; // application + constructed
- {$EXTERNALSYM LDAP_ADD_CMD}
- LDAP_ADD_CMD = $68; // application + constructed
- {$EXTERNALSYM LDAP_DELETE_CMD}
- LDAP_DELETE_CMD = $4a; // application + primitive
- {$EXTERNALSYM LDAP_MODRDN_CMD}
- LDAP_MODRDN_CMD = $6c; // application + constructed
- {$EXTERNALSYM LDAP_COMPARE_CMD}
- LDAP_COMPARE_CMD = $6e; // application + constructed
- {$EXTERNALSYM LDAP_ABANDON_CMD}
- LDAP_ABANDON_CMD = $50; // application + primitive
- {$EXTERNALSYM LDAP_SESSION_CMD}
- LDAP_SESSION_CMD = $71; // application + constructed
- {$EXTERNALSYM LDAP_EXTENDED_CMD}
- LDAP_EXTENDED_CMD = $77; // application + constructed
-
-//
-// Responses/Results for LDAP v2 & v3
-//
-
- {$EXTERNALSYM LDAP_RES_BIND}
- LDAP_RES_BIND = $61; // application + constructed
- {$EXTERNALSYM LDAP_RES_SEARCH_ENTRY}
- LDAP_RES_SEARCH_ENTRY = $64; // application + constructed
- {$EXTERNALSYM LDAP_RES_SEARCH_RESULT}
- LDAP_RES_SEARCH_RESULT = $65; // application + constructed
- {$EXTERNALSYM LDAP_RES_MODIFY}
- LDAP_RES_MODIFY = $67; // application + constructed
- {$EXTERNALSYM LDAP_RES_ADD}
- LDAP_RES_ADD = $69; // application + constructed
- {$EXTERNALSYM LDAP_RES_DELETE}
- LDAP_RES_DELETE = $6b; // application + constructed
- {$EXTERNALSYM LDAP_RES_MODRDN}
- LDAP_RES_MODRDN = $6d; // application + constructed
- {$EXTERNALSYM LDAP_RES_COMPARE}
- LDAP_RES_COMPARE = $6f; // application + constructed
- {$EXTERNALSYM LDAP_RES_SESSION}
- LDAP_RES_SESSION = $72; // application + constructed
- {$EXTERNALSYM LDAP_RES_REFERRAL}
- LDAP_RES_REFERRAL = $73; // application + constructed
- {$EXTERNALSYM LDAP_RES_EXTENDED}
- LDAP_RES_EXTENDED = $78; // application + constructed
- {$EXTERNALSYM LDAP_RES_ANY}
- LDAP_RES_ANY = -1;
-
- {$EXTERNALSYM LDAP_INVALID_CMD}
- LDAP_INVALID_CMD = $FF;
- {$EXTERNALSYM LDAP_INVALID_RES}
- LDAP_INVALID_RES = $FF;
-
-//
-// We'll make the error codes compatible with reference implementation
-//
-
-type
- {$EXTERNALSYM LDAP_RETCODE}
- LDAP_RETCODE = ULONG;
-
-const
- {$EXTERNALSYM LDAP_SUCCESS}
- LDAP_SUCCESS = $00;
- {$EXTERNALSYM LDAP_OPERATIONS_ERROR}
- LDAP_OPERATIONS_ERROR = $01;
- {$EXTERNALSYM LDAP_PROTOCOL_ERROR}
- LDAP_PROTOCOL_ERROR = $02;
- {$EXTERNALSYM LDAP_TIMELIMIT_EXCEEDED}
- LDAP_TIMELIMIT_EXCEEDED = $03;
- {$EXTERNALSYM LDAP_SIZELIMIT_EXCEEDED}
- LDAP_SIZELIMIT_EXCEEDED = $04;
- {$EXTERNALSYM LDAP_COMPARE_FALSE}
- LDAP_COMPARE_FALSE = $05;
- {$EXTERNALSYM LDAP_COMPARE_TRUE}
- LDAP_COMPARE_TRUE = $06;
- {$EXTERNALSYM LDAP_AUTH_METHOD_NOT_SUPPORTED}
- LDAP_AUTH_METHOD_NOT_SUPPORTED = $07;
- {$EXTERNALSYM LDAP_STRONG_AUTH_REQUIRED}
- LDAP_STRONG_AUTH_REQUIRED = $08;
- {$EXTERNALSYM LDAP_REFERRAL_V2}
- LDAP_REFERRAL_V2 = $09;
- {$EXTERNALSYM LDAP_PARTIAL_RESULTS}
- LDAP_PARTIAL_RESULTS = $09;
- {$EXTERNALSYM LDAP_REFERRAL}
- LDAP_REFERRAL = $0a;
- {$EXTERNALSYM LDAP_ADMIN_LIMIT_EXCEEDED}
- LDAP_ADMIN_LIMIT_EXCEEDED = $0b;
- {$EXTERNALSYM LDAP_UNAVAILABLE_CRIT_EXTENSION}
- LDAP_UNAVAILABLE_CRIT_EXTENSION = $0c;
- {$EXTERNALSYM LDAP_CONFIDENTIALITY_REQUIRED}
- LDAP_CONFIDENTIALITY_REQUIRED = $0d;
- {$EXTERNALSYM LDAP_SASL_BIND_IN_PROGRESS}
- LDAP_SASL_BIND_IN_PROGRESS = $0e;
-
- {$EXTERNALSYM LDAP_NO_SUCH_ATTRIBUTE}
- LDAP_NO_SUCH_ATTRIBUTE = $10;
- {$EXTERNALSYM LDAP_UNDEFINED_TYPE}
- LDAP_UNDEFINED_TYPE = $11;
- {$EXTERNALSYM LDAP_INAPPROPRIATE_MATCHING}
- LDAP_INAPPROPRIATE_MATCHING = $12;
- {$EXTERNALSYM LDAP_CONSTRAINT_VIOLATION}
- LDAP_CONSTRAINT_VIOLATION = $13;
- {$EXTERNALSYM LDAP_ATTRIBUTE_OR_VALUE_EXISTS}
- LDAP_ATTRIBUTE_OR_VALUE_EXISTS = $14;
- {$EXTERNALSYM LDAP_INVALID_SYNTAX}
- LDAP_INVALID_SYNTAX = $15;
-
- {$EXTERNALSYM LDAP_NO_SUCH_OBJECT}
- LDAP_NO_SUCH_OBJECT = $20;
- {$EXTERNALSYM LDAP_ALIAS_PROBLEM}
- LDAP_ALIAS_PROBLEM = $21;
- {$EXTERNALSYM LDAP_INVALID_DN_SYNTAX}
- LDAP_INVALID_DN_SYNTAX = $22;
- {$EXTERNALSYM LDAP_IS_LEAF}
- LDAP_IS_LEAF = $23;
- {$EXTERNALSYM LDAP_ALIAS_DEREF_PROBLEM}
- LDAP_ALIAS_DEREF_PROBLEM = $24;
-
- {$EXTERNALSYM LDAP_INAPPROPRIATE_AUTH}
- LDAP_INAPPROPRIATE_AUTH = $30;
- {$EXTERNALSYM LDAP_INVALID_CREDENTIALS}
- LDAP_INVALID_CREDENTIALS = $31;
- {$EXTERNALSYM LDAP_INSUFFICIENT_RIGHTS}
- LDAP_INSUFFICIENT_RIGHTS = $32;
- {$EXTERNALSYM LDAP_BUSY}
- LDAP_BUSY = $33;
- {$EXTERNALSYM LDAP_UNAVAILABLE}
- LDAP_UNAVAILABLE = $34;
- {$EXTERNALSYM LDAP_UNWILLING_TO_PERFORM}
- LDAP_UNWILLING_TO_PERFORM = $35;
- {$EXTERNALSYM LDAP_LOOP_DETECT}
- LDAP_LOOP_DETECT = $36;
-
- {$EXTERNALSYM LDAP_NAMING_VIOLATION}
- LDAP_NAMING_VIOLATION = $40;
- {$EXTERNALSYM LDAP_OBJECT_CLASS_VIOLATION}
- LDAP_OBJECT_CLASS_VIOLATION = $41;
- {$EXTERNALSYM LDAP_NOT_ALLOWED_ON_NONLEAF}
- LDAP_NOT_ALLOWED_ON_NONLEAF = $42;
- {$EXTERNALSYM LDAP_NOT_ALLOWED_ON_RDN}
- LDAP_NOT_ALLOWED_ON_RDN = $43;
- {$EXTERNALSYM LDAP_ALREADY_EXISTS}
- LDAP_ALREADY_EXISTS = $44;
- {$EXTERNALSYM LDAP_NO_OBJECT_CLASS_MODS}
- LDAP_NO_OBJECT_CLASS_MODS = $45;
- {$EXTERNALSYM LDAP_RESULTS_TOO_LARGE}
- LDAP_RESULTS_TOO_LARGE = $46;
- {$EXTERNALSYM LDAP_AFFECTS_MULTIPLE_DSAS}
- LDAP_AFFECTS_MULTIPLE_DSAS = $47;
-
- {$EXTERNALSYM LDAP_OTHER}
- LDAP_OTHER = $50;
- {$EXTERNALSYM LDAP_SERVER_DOWN}
- LDAP_SERVER_DOWN = $51;
- {$EXTERNALSYM LDAP_LOCAL_ERROR}
- LDAP_LOCAL_ERROR = $52;
- {$EXTERNALSYM LDAP_ENCODING_ERROR}
- LDAP_ENCODING_ERROR = $53;
- {$EXTERNALSYM LDAP_DECODING_ERROR}
- LDAP_DECODING_ERROR = $54;
- {$EXTERNALSYM LDAP_TIMEOUT}
- LDAP_TIMEOUT = $55;
- {$EXTERNALSYM LDAP_AUTH_UNKNOWN}
- LDAP_AUTH_UNKNOWN = $56;
- {$EXTERNALSYM LDAP_FILTER_ERROR}
- LDAP_FILTER_ERROR = $57;
- {$EXTERNALSYM LDAP_USER_CANCELLED}
- LDAP_USER_CANCELLED = $58;
- {$EXTERNALSYM LDAP_PARAM_ERROR}
- LDAP_PARAM_ERROR = $59;
- {$EXTERNALSYM LDAP_NO_MEMORY}
- LDAP_NO_MEMORY = $5a;
- {$EXTERNALSYM LDAP_CONNECT_ERROR}
- LDAP_CONNECT_ERROR = $5b;
- {$EXTERNALSYM LDAP_NOT_SUPPORTED}
- LDAP_NOT_SUPPORTED = $5c;
- {$EXTERNALSYM LDAP_NO_RESULTS_RETURNED}
- LDAP_NO_RESULTS_RETURNED = $5e;
- {$EXTERNALSYM LDAP_CONTROL_NOT_FOUND}
- LDAP_CONTROL_NOT_FOUND = $5d;
- {$EXTERNALSYM LDAP_MORE_RESULTS_TO_RETURN}
- LDAP_MORE_RESULTS_TO_RETURN = $5f;
-
- {$EXTERNALSYM LDAP_CLIENT_LOOP}
- LDAP_CLIENT_LOOP = $60;
- {$EXTERNALSYM LDAP_REFERRAL_LIMIT_EXCEEDED}
- LDAP_REFERRAL_LIMIT_EXCEEDED = $61;
-
-//
-// Bind methods. We support the following methods :
-//
-// Simple Clear text password... try not to use as it's not secure.
-//
-// MSN MSN(Microsoft Network)authentication. This package
-// may bring up UI to prompt the user for MSN credentials.
-//
-// DPA Normandy authentication... new MSN authentication. Same
-// usage as MSN.
-//
-// NTLM NT domain authentication. Use NULL credentials and
-// we'll try to use default logged in user credentials.
-//
-// Sicily Negotiate with the server for any of: MSN, DPA, NTLM
-//
-// SSPI Use GSSAPI Negotiate package to negotiate security
-// package of either Kerberos v5 or NTLM(or any other
-// package the client and server negotiate). Pass in
-// NULL credentials to specify default logged in user or
-// you may pass in a SEC_WINNT_AUTH_IDENTITY_W(defined
-// in rpcdce.h)to specify alternate credentials.
-//
-// For all bind methods except for Simple, you may pass in a
-// SEC_WINNT_AUTH_IDENTITY_W (defined in rpcdce.h) or the newer
-// SEC_WINNT_AUTH_IDENTITY_EXW (defined in secext.h) to specify alternate
-// credentials.
-//
-// All bind methods other than simple are synchronous only calls.
-// Calling the asynchronous bind call for any of these messages will
-// return LDAP_PARAM_ERROR.
-//
-// Using any other method besides simple will cause WLDAP32 to pull in
-// the SSPI security DLLs(SECURITY.DLL etc).
-//
-// On NTLM and SSPI, if you specify NULL credentials, we'll attempt to use
-// the default logged in user.
-//
-
-const
- {$EXTERNALSYM LDAP_AUTH_SIMPLE}
- LDAP_AUTH_SIMPLE = $80;
- {$EXTERNALSYM LDAP_AUTH_SASL}
- LDAP_AUTH_SASL = $83;
-
- {$EXTERNALSYM LDAP_AUTH_OTHERKIND}
- LDAP_AUTH_OTHERKIND = $86;
-
-// The SICILY type covers package negotiation to MSN servers.
-// Each of the supported types can also be specified without
-// doing the package negotiation, assuming the caller knows
-// what the server supports.
-
- {$EXTERNALSYM LDAP_AUTH_SICILY}
- LDAP_AUTH_SICILY = LDAP_AUTH_OTHERKIND or $0200;
-
- {$EXTERNALSYM LDAP_AUTH_MSN}
- LDAP_AUTH_MSN = LDAP_AUTH_OTHERKIND or $0800;
- {$EXTERNALSYM LDAP_AUTH_NTLM}
- LDAP_AUTH_NTLM = LDAP_AUTH_OTHERKIND or $1000;
- {$EXTERNALSYM LDAP_AUTH_DPA}
- LDAP_AUTH_DPA = LDAP_AUTH_OTHERKIND or $2000;
-
-// This will cause the client to use the GSSAPI negotiation
-// package to determine the most appropriate authentication type.
-// This type should be used when talking to NT5.
-
- {$EXTERNALSYM LDAP_AUTH_NEGOTIATE}
- LDAP_AUTH_NEGOTIATE = LDAP_AUTH_OTHERKIND or $0400;
-
-// backward compatible #define for older constant name.
-
- {$EXTERNALSYM LDAP_AUTH_SSPI}
- LDAP_AUTH_SSPI = LDAP_AUTH_NEGOTIATE;
-
-//
-// Client applications typically don't have to encode/decode LDAP filters,
-// but if they do, we define the operators here.
-//
-// Filter types.
-
- {$EXTERNALSYM LDAP_FILTER_AND}
- LDAP_FILTER_AND = $a0; // context specific + constructed - SET OF Filters.
- {$EXTERNALSYM LDAP_FILTER_OR}
- LDAP_FILTER_OR = $a1; // context specific + constructed - SET OF Filters.
- {$EXTERNALSYM LDAP_FILTER_NOT}
- LDAP_FILTER_NOT = $a2; // context specific + constructed - Filter
- {$EXTERNALSYM LDAP_FILTER_EQUALITY}
- LDAP_FILTER_EQUALITY = $a3; // context specific + constructed - AttributeValueAssertion.
- {$EXTERNALSYM LDAP_FILTER_SUBSTRINGS}
- LDAP_FILTER_SUBSTRINGS = $a4; // context specific + constructed - SubstringFilter
- {$EXTERNALSYM LDAP_FILTER_GE}
- LDAP_FILTER_GE = $a5; // context specific + constructed - AttributeValueAssertion.
- {$EXTERNALSYM LDAP_FILTER_LE}
- LDAP_FILTER_LE = $a6; // context specific + constructed - AttributeValueAssertion.
- {$EXTERNALSYM LDAP_FILTER_PRESENT}
- LDAP_FILTER_PRESENT = $87; // context specific + primitive - AttributeType.
- {$EXTERNALSYM LDAP_FILTER_APPROX}
- LDAP_FILTER_APPROX = $a8; // context specific + constructed - AttributeValueAssertion.
- {$EXTERNALSYM LDAP_FILTER_EXTENSIBLE}
- LDAP_FILTER_EXTENSIBLE = $a9; // context specific + constructed - MatchingRuleAssertion.
-
-// Substring filter types
-
- {$EXTERNALSYM LDAP_SUBSTRING_INITIAL}
- LDAP_SUBSTRING_INITIAL = $80; // class context specific
- {$EXTERNALSYM LDAP_SUBSTRING_ANY}
- LDAP_SUBSTRING_ANY = $81; // class context specific
- {$EXTERNALSYM LDAP_SUBSTRING_FINAL}
- LDAP_SUBSTRING_FINAL = $82; // class context specific
-
-//
-// Possible values for ld_deref field.
-// "Never" - never deref aliases. return only the alias.
-// "Searching" - only deref aliases when searching, not when locating
-// the base object of a search.
-// "Finding" - dereference the alias when locating the base object but
-// not during a search.
-// "Always" - always dereference aliases.
-//
-
- {$EXTERNALSYM LDAP_DEREF_NEVER}
- LDAP_DEREF_NEVER = 0;
- {$EXTERNALSYM LDAP_DEREF_SEARCHING}
- LDAP_DEREF_SEARCHING = 1;
- {$EXTERNALSYM LDAP_DEREF_FINDING}
- LDAP_DEREF_FINDING = 2;
- {$EXTERNALSYM LDAP_DEREF_ALWAYS}
- LDAP_DEREF_ALWAYS = 3;
-
-// Special values for ld_sizelimit :
-
- {$EXTERNALSYM LDAP_NO_LIMIT}
- LDAP_NO_LIMIT = 0;
-
-// Flags for ld_options field :
-
- {$EXTERNALSYM LDAP_OPT_DNS}
- LDAP_OPT_DNS = $00000001; // utilize DN & DNS
- {$EXTERNALSYM LDAP_OPT_CHASE_REFERRALS}
- LDAP_OPT_CHASE_REFERRALS = $00000002; // chase referrals
- {$EXTERNALSYM LDAP_OPT_RETURN_REFS}
- LDAP_OPT_RETURN_REFS = $00000004; // return referrals to calling app
-
-//
-// LDAP structure per connection
-//
-
-{$HPPEMIT '#pragma pack(push, 4)'}
-{$ALIGN ON}
-
-type
- {$EXTERNALSYM PLDAP}
- PLDAP = ^LDAP;
- {$EXTERNALSYM LDAP}
- LDAP = record
-
- ld_sb: record
- sb_sd: ULONG;
- Reserved1: array [0..10*SizeOf(ULONG)] of Byte;
- sb_naddr: ULONG; // notzero implies CLDAP available
- Reserved2: array [0..6*SizeOf(ULONG)-1] of Byte;
- end;
-
- //
- // Following parameters MAY match up to reference implementation of LDAP
- //
-
- ld_host: PChar;
- ld_version: ULONG;
- ld_lberoptions: Byte;
-
- //
- // Safe to assume that these parameters are in same location as
- // reference implementation of LDAP API.
- //
-
- ld_deref: ULONG;
-
- ld_timelimit: ULONG;
- ld_sizelimit: ULONG;
-
- ld_errno: ULONG;
- ld_matched: PChar;
- ld_error: PChar;
- ld_msgid: ULONG;
-
- Reserved3: array [0..6*SizeOf(ULONG)] of Byte;
-
- //
- // Following parameters may match up to reference implementation of LDAP API.
- //
-
- ld_cldaptries: ULONG;
- ld_cldaptimeout: ULONG;
- ld_refhoplimit: ULONG;
- ld_options: ULONG;
- end;
-
-//
-// Our timeval structure is a bit different from the reference implementation
-// since Win32 defines a _timeval structure that is different from the LDAP
-// one.
-//
-
- PLDAPTimeVal = ^TLDAPTimeVal;
- {$EXTERNALSYM l_timeval}
- l_timeval = packed record
- tv_sec: Longint;
- tv_usec: Longint;
- end;
- {$EXTERNALSYM LDAP_TIMEVAL}
- LDAP_TIMEVAL = l_timeval;
- {$EXTERNALSYM PLDAP_TIMEVAL}
- PLDAP_TIMEVAL = ^LDAP_TIMEVAL;
- TLDAPTimeVal = l_timeval;
-
-//
-// The berval structure is used to pass in any arbitrary octet string. It
-// is useful for attributes that cannot be represented using a null
-// terminated string.
-//
-
- PLDAPBerVal = ^TLDAPBerVal;
- PPLDAPBerVal = ^PLDAPBerVal;
- {$EXTERNALSYM PLDAP_BERVAL}
- PLDAP_BERVAL = ^berval;
- {$EXTERNALSYM PBERVAL}
- PBERVAL = ^berval;
- {$EXTERNALSYM berval}
- berval = record
- bv_len: ULONG;
- bv_val: PChar;
- end;
- {$EXTERNALSYM LDAP_BERVAL}
- LDAP_BERVAL = berval;
- TLDAPBerVal = berval;
-
-//
-// The following structure has to be compatible with reference implementation.
-//
-
- PPLDAPMessage = ^PLDAPMessage;
- {$EXTERNALSYM PLDAPMessage}
- PLDAPMessage = ^LDAPMessage;
- {$EXTERNALSYM ldapmsg}
- ldapmsg = record
- lm_msgid: ULONG; // message number for given connection
- lm_msgtype: ULONG; // message type of the form LDAP_RES_xxx
-
- lm_ber: Pointer; // ber form of message
-
- lm_chain: PLDAPMessage; // pointer to next result value
- lm_next: PLDAPMessage; // pointer to next message
- lm_time: ULONG;
-
- //
- // new fields below not in reference implementation
- //
-
- Connection: PLDAP; // connection from which we received response
- Request: Pointer; // owning request(opaque structure)
- lm_returncode: ULONG; // server's return code
- lm_referral: Word; // index of referral within ref table
- lm_chased: ByteBool; // has referral been chased already?
- lm_eom: ByteBool; // is this the last entry for this message?
- ConnectionReferenced: ByteBool; // is the Connection still valid?
- end;
- {$EXTERNALSYM LDAPMessage}
- LDAPMessage = ldapmsg;
-
-//
-// Controls... there are three types :
-//
-// 1) those passed to the server
-// 2) those passed to the client and handled by the client API
-// 3) those returned by the server
-//
-
-// Extra types defined for use as parameter.
- PPPLDAPControlA = ^PPLDAPControlA;
- {$NODEFINE PPPLDAPControlA}
- PPPLDAPControlW = ^PPLDAPControlW;
- {$NODEFINE PPPLDAPControlW}
- PPPLDAPControl = PPPLDAPControlA;
- PPLDAPControlA = ^PLDAPControlA;
- {$NODEFINE PPLDAPControlA}
- PPLDAPControlW = ^PLDAPControlW;
- {$NODEFINE PPLDAPControlW}
- PPLDAPControl = PPLDAPControlA;
-
- {$EXTERNALSYM PLDAPControlA}
- PLDAPControlA = ^LDAPControlA;
- {$EXTERNALSYM PLDAPControlW}
- PLDAPControlW = ^LDAPControlW;
- {$EXTERNALSYM PLDAPControl}
- PLDAPControl = PLDAPControlA;
-
- {$EXTERNALSYM LDAPControlA}
- LDAPControlA = record
- ldctl_oid: PAnsiChar;
- ldctl_value: TLDAPBerVal;
- ldctl_iscritical: ByteBool;
- end;
- {$EXTERNALSYM LDAPControlW}
- LDAPControlW = record
- ldctl_oid: PWideChar;
- ldctl_value: TLDAPBerVal;
- ldctl_iscritical: ByteBool;
- end;
- {$EXTERNALSYM LDAPControl}
- LDAPControl = LDAPControlA;
-
- TLDAPControlA = LDAPControlA;
- TLDAPControlW = LDAPControlW;
- TLDAPControl = TLDAPControlA;
-
-//
-// Client controls section : these are the client controls that wldap32.dll
-// supports.
-//
-// If you specify LDAP_CONTROL_REFERRALS in a control, the value field should
-// point to a ULONG of the following flags :
-//
-// LDAP_CHASE_SUBORDINATE_REFERRALS
-// LDAP_CHASE_EXTERNAL_REFERRALS
-//
-const
- {$EXTERNALSYM LDAP_CONTROL_REFERRALS_W}
- LDAP_CONTROL_REFERRALS_W = '1.2.840.113556.1.4.616';
- {$EXTERNALSYM LDAP_CONTROL_REFERRALS}
- LDAP_CONTROL_REFERRALS = '1.2.840.113556.1.4.616';
-
-//
-// Values required for Modification command These are options for the
-// mod_op field of LDAPMod structure
-//
-
-const
- {$EXTERNALSYM LDAP_MOD_ADD}
- LDAP_MOD_ADD = $00;
- {$EXTERNALSYM LDAP_MOD_DELETE}
- LDAP_MOD_DELETE = $01;
- {$EXTERNALSYM LDAP_MOD_REPLACE}
- LDAP_MOD_REPLACE = $02;
- {$EXTERNALSYM LDAP_MOD_BVALUES}
- LDAP_MOD_BVALUES = $80;
-
-type
- {$EXTERNALSYM PLDAPModA}
- PLDAPModA = ^LDAPModA;
- {$EXTERNALSYM PLDAPModW}
- PLDAPModW = ^LDAPModW;
- {$EXTERNALSYM PLDAPMod}
- PLDAPMod = PLDAPModA;
- {$EXTERNALSYM LDAPModA}
- LDAPModA = record
- mod_op: ULONG;
- mod_type: PAnsiChar;
- case integer of
- 0:(modv_strvals: ^PAnsiChar);
- 1:(modv_bvals: ^PLDAPBerVal);
- end;
- {$EXTERNALSYM LDAPModW}
- LDAPModW = record
- mod_op: ULONG;
- mod_type: PWideChar;
- case integer of
- 0:(modv_strvals: ^PWideChar);
- 1:(modv_bvals: ^PLDAPBerVal);
- end;
- {$EXTERNALSYM LDAPMod}
- LDAPMod = LDAPModA;
- TLDAPModA = LDAPModA;
- TLDAPModW = LDAPModW;
- TLDAPMod = TLDAPModA;
-
-{$HPPEMIT '#pragma pack(pop)'}
-
-//
-// macros compatible with reference implementation...
-//
-
-{$EXTERNALSYM LDAP_IS_CLDAP}
-function LDAP_IS_CLDAP(ld: PLDAP): Boolean;
-{$EXTERNALSYM NAME_ERROR}
-function NAME_ERROR(n: Integer): Boolean;
-
-//
-// function definitions for LDAP API
-//
-
-//
-// Create a connection block to an LDAP server. HostName can be NULL, in
-// which case we'll try to go off and find the "default" LDAP server.
-//
-// Note that if we have to go off and find the default server, we'll pull
-// in NETAPI32.DLL and ADVAPI32.DLL.
-//
-// If it returns NULL, an error occurred. Pick up error code with
-// GetLastError().
-//
-// ldap_open actually opens the connection at the time of the call,
-// whereas ldap_init only opens the connection when an operation is performed
-// that requires it.
-
-{$EXTERNALSYM ldap_openA}
-function ldap_openA(HostName: PAnsiChar; PortNumber: ULONG): PLDAP; cdecl;
-{$EXTERNALSYM ldap_openW}
-function ldap_openW(HostName: PWideChar; PortNumber: ULONG): PLDAP; cdecl;
-{$EXTERNALSYM ldap_open}
-function ldap_open(HostName: PChar; PortNumber: ULONG): PLDAP; cdecl;
-
-{$EXTERNALSYM ldap_initA}
-function ldap_initA(HostName: PAnsiChar; PortNumber: ULONG): PLDAP; cdecl;
-{$EXTERNALSYM ldap_initW}
-function ldap_initW(HostName: PWideChar; PortNumber: ULONG): PLDAP; cdecl;
-{$EXTERNALSYM ldap_init}
-function ldap_init(HostName: PChar; PortNumber: ULONG): PLDAP; cdecl;
-
-{$EXTERNALSYM ldap_sslinitA}
-function ldap_sslinitA(HostName: PAnsiChar; PortNumber: ULONG; secure: integer): PLDAP; cdecl;
-{$EXTERNALSYM ldap_sslinitW}
-function ldap_sslinitW(HostName: PWideChar; PortNumber: ULONG; secure: integer): PLDAP; cdecl;
-{$EXTERNALSYM ldap_sslinit}
-function ldap_sslinit(HostName: PChar; PortNumber: ULONG; secure: integer): PLDAP; cdecl;
-
-//
-// when calling ldap_init, you can call ldap_connect explicitly to have the
-// library contact the server. This is useful for checking for server
-// availability. This call is not required however, since the other functions
-// will call it internally if it hasn't already been called.
-//
-
-{$EXTERNALSYM ldap_connect}
-function ldap_connect(ld: PLDAP; timeout: PLDAPTimeval): ULONG; cdecl;
-
-//
-// This is similar to ldap_open except it creates a connection block for
-// UDP based Connectionless LDAP services. No TCP session is maintained.
-//
-// If it returns NULL, an error occurred. Pick up error code with
-// GetLastError().
-//
-
-{$EXTERNALSYM cldap_openA}
-function cldap_openA(HostName: PAnsiChar; PortNumber: ULONG): PLDAP; cdecl;
-{$EXTERNALSYM cldap_openW}
-function cldap_openW(HostName: PWideChar; PortNumber: ULONG): PLDAP; cdecl;
-{$EXTERNALSYM cldap_open}
-function cldap_open(HostName: PChar; PortNumber: ULONG): PLDAP; cdecl;
-
-//
-// Call unbind when you're done with the connection, it will free all
-// resources associated with the connection.
-//
-// There is no ldap_close... use ldap_unbind even if you haven't called
-// ldap_bind on the connection.
-//
-
-{$EXTERNALSYM ldap_unbind}
-function ldap_unbind(ld: PLDAP): ULONG; cdecl;
-{$EXTERNALSYM ldap_unbind_s}
-function ldap_unbind_s(ld: PLDAP): ULONG; cdecl; // calls ldap_unbind
-
-//
-// Calls to get and set options on connection blocks... use them rather
-// than modifying the LDAP block directly.
-//
-
-{$EXTERNALSYM ldap_get_option}
-function ldap_get_option(ld: PLDAP; option: integer; outvalue: pointer): ULONG; cdecl;
-{$EXTERNALSYM ldap_get_optionW}
-function ldap_get_optionW(ld: PLDAP; option: integer; outvalue: pointer): ULONG; cdecl;
-{$EXTERNALSYM ldap_set_option}
-function ldap_set_option(ld: PLDAP; option: integer; invalue: pointer): ULONG; cdecl;
-{$EXTERNALSYM ldap_set_optionW}
-function ldap_set_optionW(ld: PLDAP; option: integer; invalue: pointer): ULONG; cdecl;
-
-//
-// These are the values to pass to ldap_get/set_option :
-//
-
-const
- {$EXTERNALSYM LDAP_OPT_DESC}
- LDAP_OPT_DESC = $01;
- {$EXTERNALSYM LDAP_OPT_DEREF}
- LDAP_OPT_DEREF = $02;
- {$EXTERNALSYM LDAP_OPT_SIZELIMIT}
- LDAP_OPT_SIZELIMIT = $03;
- {$EXTERNALSYM LDAP_OPT_TIMELIMIT}
- LDAP_OPT_TIMELIMIT = $04;
- {$EXTERNALSYM LDAP_OPT_THREAD_FN_PTRS}
- LDAP_OPT_THREAD_FN_PTRS = $05;
- {$EXTERNALSYM LDAP_OPT_REBIND_FN}
- LDAP_OPT_REBIND_FN = $06;
- {$EXTERNALSYM LDAP_OPT_REBIND_ARG}
- LDAP_OPT_REBIND_ARG = $07;
- {$EXTERNALSYM LDAP_OPT_REFERRALS}
- LDAP_OPT_REFERRALS = $08;
- {$EXTERNALSYM LDAP_OPT_RESTART}
- LDAP_OPT_RESTART = $09;
-
- LDAP_OPT_SSL = $0a;
- {$EXTERNALSYM LDAP_OPT_IO_FN_PTRS}
- LDAP_OPT_IO_FN_PTRS = $0b;
- {$EXTERNALSYM LDAP_OPT_CACHE_FN_PTRS}
- LDAP_OPT_CACHE_FN_PTRS = $0d;
- {$EXTERNALSYM LDAP_OPT_CACHE_STRATEGY}
- LDAP_OPT_CACHE_STRATEGY = $0e;
- {$EXTERNALSYM LDAP_OPT_CACHE_ENABLE}
- LDAP_OPT_CACHE_ENABLE = $0f;
- {$EXTERNALSYM LDAP_OPT_REFERRAL_HOP_LIMIT}
- LDAP_OPT_REFERRAL_HOP_LIMIT = $10;
-
- {$EXTERNALSYM LDAP_OPT_PROTOCOL_VERSION}
- LDAP_OPT_PROTOCOL_VERSION = $11;
- {$EXTERNALSYM LDAP_OPT_VERSION}
- LDAP_OPT_VERSION = $11;
- {$EXTERNALSYM LDAP_OPT_SORTKEYS}
- LDAP_OPT_SORTKEYS = $11;
-
-//
-// These are new ones that we've defined, not in current RFC draft.
-//
-
- {$EXTERNALSYM LDAP_OPT_HOST_NAME}
- LDAP_OPT_HOST_NAME = $30;
- {$EXTERNALSYM LDAP_OPT_ERROR_NUMBER}
- LDAP_OPT_ERROR_NUMBER = $31;
- {$EXTERNALSYM LDAP_OPT_ERROR_STRING}
- LDAP_OPT_ERROR_STRING = $32;
- {$EXTERNALSYM LDAP_OPT_SERVER_ERROR}
- LDAP_OPT_SERVER_ERROR = $33;
- {$EXTERNALSYM LDAP_OPT_SERVER_EXT_ERROR}
- LDAP_OPT_SERVER_EXT_ERROR = $34;
- {$EXTERNALSYM LDAP_OPT_HOST_REACHABLE}
- LDAP_OPT_HOST_REACHABLE = $3E;
-
-//
-// These options control the keep-alive logic. Keep alives are sent as
-// ICMP ping messages (which currently don't go through firewalls).
-//
-// There are three values that control how this works :
-// PING_KEEP_ALIVE : min number of seconds since we last received a response
-// from the server before we send a keep-alive ping
-// PING_WAIT_TIME : number of milliseconds we wait for the response to
-// come back when we send a ping
-// PING_LIMIT : number of unanswered pings we send before we close the
-// connection.
-//
-// To disable the keep-alive logic, set any of the values (PING_KEEP_ALIVE,
-// PING_LIMIT, or PING_WAIT_TIME) to zero.
-//
-// The current default/min/max for these values are as follows :
-//
-// PING_KEEP_ALIVE : 120/5/maxInt seconds (may also be zero)
-// PING_WAIT_TIME : 2000/10/60000 milliseconds (may also be zero)
-// PING_LIMIT : 4/0/maxInt
-//
-
- {$EXTERNALSYM LDAP_OPT_PING_KEEP_ALIVE}
- LDAP_OPT_PING_KEEP_ALIVE = $36;
- {$EXTERNALSYM LDAP_OPT_PING_WAIT_TIME}
- LDAP_OPT_PING_WAIT_TIME = $37;
- {$EXTERNALSYM LDAP_OPT_PING_LIMIT}
- LDAP_OPT_PING_LIMIT = $38;
-
-//
-// These won't be in the RFC. Only use these if you're going to be dependent
-// on our implementation.
-//
-
- {$EXTERNALSYM LDAP_OPT_DNSDOMAIN_NAME}
- LDAP_OPT_DNSDOMAIN_NAME = $3B; // return DNS name of domain
- {$EXTERNALSYM LDAP_OPT_GETDSNAME_FLAGS}
- LDAP_OPT_GETDSNAME_FLAGS = $3D; // flags for DsGetDcName
-
- {$EXTERNALSYM LDAP_OPT_PROMPT_CREDENTIALS}
- LDAP_OPT_PROMPT_CREDENTIALS = $3F; // prompt for creds? currently
- // only for DPA & NTLM if no creds
- // are loaded
-
- {$EXTERNALSYM LDAP_OPT_AUTO_RECONNECT}
- LDAP_OPT_AUTO_RECONNECT = $91; // enable/disable autoreconnect
- {$EXTERNALSYM LDAP_OPT_SSPI_FLAGS}
- LDAP_OPT_SSPI_FLAGS = $92; // flags to pass to InitSecurityContext
-
-//
-// To retrieve information on an secure connection, a pointer to a
-// SecPkgContext_connectionInfo structure (defined in schnlsp.h) must be
-// passed in. On success, it is filled with relevent security information.
-//
-
- {$EXTERNALSYM LDAP_OPT_SSL_INFO}
- LDAP_OPT_SSL_INFO = $93;
-
-//
-// Turing on either the sign or the encrypt option prior to binding using
-// LDAP_AUTH_NEGOTIATE will result in the ensuing LDAP session to be signed
-// or encrypted using either Kerberos or NTLM (as negotiated by the underlying
-// security packages). Note that these options can't be used with SSL.
-//
-
- {$EXTERNALSYM LDAP_OPT_SIGN}
- LDAP_OPT_SIGN = $95;
- {$EXTERNALSYM LDAP_OPT_ENCRYPT}
- LDAP_OPT_ENCRYPT = $96;
-
-//
-// The user can set a preferred SASL method prior to binding using LDAP_AUTH_NEGOTIATE
-// We will try to use this mechanism while binding. One example is "GSSAPI".
-//
-
- {$EXTERNALSYM LDAP_OPT_SASL_METHOD}
- LDAP_OPT_SASL_METHOD = $97;
-
-//
-// Setting this option to LDAP_OPT_ON will instruct the library to only perform an
-// A-Record DNS lookup on the supplied host string. This option is OFF by default.
-//
-
- {$EXTERNALSYM LDAP_OPT_AREC_EXCLUSIVE}
- LDAP_OPT_AREC_EXCLUSIVE = $98;
-
-//
-// Retrieve the security context associated with the connection.
-//
-
- {$EXTERNALSYM LDAP_OPT_SECURITY_CONTEXT}
- LDAP_OPT_SECURITY_CONTEXT = $99;
-
-//
-// End of Microsoft only options
-//
-
- {$EXTERNALSYM LDAP_OPT_ON}
- LDAP_OPT_ON = Pointer(1);
- {$EXTERNALSYM LDAP_OPT_OFF}
- LDAP_OPT_OFF = Pointer(0);
-
-//
-// For chasing referrals, we extend this a bit for LDAP_OPT_REFERRALS. If
-// the value is not LDAP_OPT_ON or LDAP_OPT_OFF, we'll treat them as the
-// following :
-//
-// LDAP_CHASE_SUBORDINATE_REFERRALS : chase subordinate referrals (or
-// references) returned in a v3 search
-// LDAP_CHASE_EXTERNAL_REFERRALS : chase external referrals. These are
-// returned possibly on any operation except bind.
-//
-// If you OR these flags together, it's equivalent to setting referrals to
-// LDAP_OPT_ON.
-//
-
- {$EXTERNALSYM LDAP_CHASE_SUBORDINATE_REFERRALS}
- LDAP_CHASE_SUBORDINATE_REFERRALS = $00000020;
- {$EXTERNALSYM LDAP_CHASE_EXTERNAL_REFERRALS}
- LDAP_CHASE_EXTERNAL_REFERRALS = $00000040;
-
-//
-// Bind is required as the first operation to v2 servers, not so for v3
-// servers. See above description of authentication methods.
-//
-
-{$EXTERNALSYM ldap_simple_bindA}
-function ldap_simple_bindA(ld: PLDAP; dn, passwd: PAnsiChar): ULONG; cdecl;
-{$EXTERNALSYM ldap_simple_bindW}
-function ldap_simple_bindW(ld: PLDAP; dn, passwd: PWideChar): ULONG; cdecl;
-{$EXTERNALSYM ldap_simple_bind}
-function ldap_simple_bind(ld: PLDAP; dn, passwd: PChar): ULONG; cdecl;
-{$EXTERNALSYM ldap_simple_bind_sA}
-function ldap_simple_bind_sA(ld: PLDAP; dn, passwd: PAnsiChar): ULONG; cdecl;
-{$EXTERNALSYM ldap_simple_bind_sW}
-function ldap_simple_bind_sW(ld: PLDAP; dn, passwd: PWideChar): ULONG; cdecl;
-{$EXTERNALSYM ldap_simple_bind_s}
-function ldap_simple_bind_s(ld: PLDAP; dn, passwd: PChar): ULONG; cdecl;
-
-{$EXTERNALSYM ldap_bindA}
-function ldap_bindA(ld: PLDAP; dn, cred: PAnsiChar; method: ULONG): ULONG; cdecl;
-{$EXTERNALSYM ldap_bindW}
-function ldap_bindW(ld: PLDAP; dn, cred: PWideChar; method: ULONG): ULONG; cdecl;
-{$EXTERNALSYM ldap_bind}
-function ldap_bind(ld: PLDAP; dn, cred: PChar; method: ULONG): ULONG; cdecl;
-{$EXTERNALSYM ldap_bind_sA}
-function ldap_bind_sA(ld: PLDAP; dn, cred: PAnsiChar; method: ULONG): ULONG; cdecl;
-{$EXTERNALSYM ldap_bind_sW}
-function ldap_bind_sW(ld: PLDAP; dn, cred: PWideChar; method: ULONG): ULONG; cdecl;
-{$EXTERNALSYM ldap_bind_s}
-function ldap_bind_s(ld: PLDAP; dn, cred: PChar; method: ULONG): ULONG; cdecl;
-
-// The following functions can be used to pass in any arbitrary credentials
-// to the server. The application must be ready to interpret the response
-// sent back from the server.
-//
-
-{$EXTERNALSYM ldap_sasl_bindA}
-function ldap_sasl_bindA(ExternalHandle: PLDAP; DistName: PAnsiChar;
- AuthMechanism: PAnsiChar; cred: PBERVAL;
- var ServerCtrls, ClientCtrls: PLDAPControlA;
- var MessageNumber: Integer): Integer; cdecl;
-{$EXTERNALSYM ldap_sasl_bindW}
-function ldap_sasl_bindW(ExternalHandle: PLDAP; DistName: PWideChar;
- AuthMechanism: PWideChar; cred: PBERVAL;
- var ServerCtrls, ClientCtrls: PLDAPControlW;
- var MessageNumber: Integer): Integer; cdecl;
-{$EXTERNALSYM ldap_sasl_bind}
-function ldap_sasl_bind(ExternalHandle: PLDAP; DistName: PChar;
- AuthMechanism: PChar; cred: PBERVAL;
- var ServerCtrls, ClientCtrls: PLDAPControl;
- var MessageNumber: Integer): Integer; cdecl;
-
-function ldap_sasl_bind_sA(ExternalHandle: PLDAP; DistName: PAnsiChar;
- AuthMechanism: PAnsiChar; cred: PBERVAL;
- var ServerCtrls, ClientCtrls: PLDAPControlA;
- var ServerData: PBERVAL): Integer; cdecl;
-function ldap_sasl_bind_sW(ExternalHandle: PLDAP; DistName: PWideChar;
- AuthMechanism: PWideChar; cred: PBERVAL;
- var ServerCtrls, ClientCtrls: PLDAPControlW;
- var ServerData: PBERVAL): Integer; cdecl;
-function ldap_sasl_bind_s(ExternalHandle: PLDAP; DistName: PChar;
- AuthMechanism: PChar; cred: PBERVAL;
- var ServerCtrls, ClientCtrls: PLDAPControl;
- var ServerData: PBERVAL): Integer; cdecl;
-
-//
-// Synchronous and asynch search routines.
-//
-// filter follows RFC 1960 with the addition that '(' ')' '*' ' ' '\' and
-// '\0' are all escaped with '\'
-//
-// Scope of search. This corresponds to the "scope" parameter on search
-
-const
- {$EXTERNALSYM LDAP_SCOPE_BASE}
- LDAP_SCOPE_BASE = $00;
- {$EXTERNALSYM LDAP_SCOPE_ONELEVEL}
- LDAP_SCOPE_ONELEVEL = $01;
- {$EXTERNALSYM LDAP_SCOPE_SUBTREE}
- LDAP_SCOPE_SUBTREE = $02;
-
-{$EXTERNALSYM ldap_searchA}
-function ldap_searchA(
- ld: PLDAP;
- base: PAnsiChar; // distinguished name or ''
- scope: ULONG; // LDAP_SCOPE_xxxx
- filter: PAnsiChar;
- attrs: PAnsiChar; // pointer to an array of PAnsiChar attribute names
- attrsonly: ULONG // boolean on whether to only return attr names
-): ULONG; cdecl;
-{$EXTERNALSYM ldap_searchW}
-function ldap_searchW(
- ld: PLDAP;
- base: PWideChar; // distinguished name or ''
- scope: ULONG; // LDAP_SCOPE_xxxx
- filter: PWideChar;
- attrs: PWideChar; // pointer to an array of PAnsiChar attribute names
- attrsonly: ULONG // boolean on whether to only return attr names
-): ULONG; cdecl;
-{$EXTERNALSYM ldap_search}
-function ldap_search(
- ld: PLDAP;
- base: PChar; // distinguished name or ''
- scope: ULONG; // LDAP_SCOPE_xxxx
- filter: PChar;
- attrs: PChar; // pointer to an array of PAnsiChar attribute names
- attrsonly: ULONG // boolean on whether to only return attr names
-): ULONG; cdecl;
-
-{$EXTERNALSYM ldap_search_sA}
-function ldap_search_sA(ld: PLDAP; base: PAnsiChar; scope: ULONG;
- filter, attrs: PAnsiChar; attrsonly: ULONG;
- var res: PLDAPMessage): ULONG; cdecl;
-{$EXTERNALSYM ldap_search_sW}
-function ldap_search_sW(ld: PLDAP; base: PWideChar; scope: ULONG;
- filter, attrs: PWideChar; attrsonly: ULONG;
- var res: PLDAPMessage): ULONG; cdecl;
-{$EXTERNALSYM ldap_search_s}
-function ldap_search_s(ld: PLDAP; base: PChar; scope: ULONG;
- filter, attrs: PChar; attrsonly: ULONG;
- var res: PLDAPMessage): ULONG; cdecl;
-
-{$EXTERNALSYM ldap_search_stA}
-function ldap_search_stA(ld: PLDAP; base: PAnsiChar; scope: ULONG;
- filter, attrs: PAnsiChar; attrsonly: ULONG; var timeout: TLDAPTimeVal;
- var res: PLDAPMessage): ULONG; cdecl;
-{$EXTERNALSYM ldap_search_stW}
-function ldap_search_stW(ld: PLDAP; base: PWideChar; scope: ULONG;
- filter, attrs: PWideChar; attrsonly: ULONG; var timeout: TLDAPTimeVal;
- var res: PLDAPMessage): ULONG; cdecl;
-{$EXTERNALSYM ldap_search_st}
-function ldap_search_st(ld: PLDAP; base: PChar; scope: ULONG;
- filter, attrs: PChar; attrsonly: ULONG; var timeout: TLDAPTimeVal;
- var res: PLDAPMessage): ULONG; cdecl;
-
-{$EXTERNALSYM ldap_search_extA}
-function ldap_search_extA(ld: PLDAP; base: PAnsiChar; scope: ULONG;
- filter, attrs: PAnsiChar; attrsonly: ULONG;
- var ServerControls, ClientControls: PLDAPControlA;
- TimeLimit, SizeLimit: ULONG; var MessageNumber: ULONG): ULONG; cdecl;
-{$EXTERNALSYM ldap_search_extW}
-function ldap_search_extW(ld: PLDAP; base: PWideChar; scope: ULONG;
- filter, attrs: PWideChar; attrsonly: ULONG;
- var ServerControls, ClientControls: PLDAPControlW;
- TimeLimit, SizeLimit: ULONG; var MessageNumber: ULONG): ULONG; cdecl;
-{$EXTERNALSYM ldap_search_ext}
-function ldap_search_ext(ld: PLDAP; base: PChar; scope: ULONG;
- filter, attrs: PChar; attrsonly: ULONG;
- ServerControls, ClientControls: PPLDAPControl;
- TimeLimit, SizeLimit: ULONG; var MessageNumber: ULONG): ULONG; cdecl;
-
-{$EXTERNALSYM ldap_search_ext_sA}
-function ldap_search_ext_sA(ld: PLDAP; base: PAnsiChar; scope: ULONG;
- filter, attrs: PAnsiChar; attrsonly: ULONG;
- var ServerControls, ClientControls: PLDAPControlA;
- var timeout: TLDAPTimeVal; SizeLimit: ULONG;
- var res: PLDAPMessage): ULONG; cdecl;
-{$EXTERNALSYM ldap_search_ext_sW}
-function ldap_search_ext_sW(ld: PLDAP; base: PWideChar; scope: ULONG;
- filter, attrs: PWideChar; attrsonly: ULONG;
- var ServerControls, ClientControls: PLDAPControlW;
- var timeout: TLDAPTimeVal; SizeLimit: ULONG;
- var res: PLDAPMessage): ULONG; cdecl;
-{$EXTERNALSYM ldap_search_ext_s}
-function ldap_search_ext_s(ld: PLDAP; base: PChar; scope: ULONG;
- filter, attrs: PChar; attrsonly: ULONG;
- ServerControls, ClientControls: PPLDAPControl;
- timeout: PLDAPTimeVal; SizeLimit: ULONG;
- var res: PLDAPMessage): ULONG; cdecl;
-
-//
-// Extended API to check filter syntax. Returns LDAP error code if syntax
-// is invalid or LDAP_SUCCESS if it's ok.
-//
-
-{$EXTERNALSYM ldap_check_filterA}
-function ldap_check_filterA(ld: PLDAP; SearchFilter: PAnsiChar): ULONG; cdecl;
-{$EXTERNALSYM ldap_check_filterW}
-function ldap_check_filterW(ld: PLDAP; SearchFilter: PWideChar): ULONG; cdecl;
-{$EXTERNALSYM ldap_check_filter}
-function ldap_check_filter(ld: PLDAP; SearchFilter: PChar): ULONG; cdecl;
-
-//
-// modify an existing entry
-//
-
-//
-// multi-thread: ldap_modify calls are not safe in that the message number
-// is returned rather than the return code. You have to look
-// at the connection block in an error case and the return code
-// may be overwritten by another thread inbetween.
-//
-// Use ldap_modify_ext instead, as these are thread safe.
-//
-// ldap_modify_s and ldap_modify_ext* calls are thread safe.
-//
-
-{$EXTERNALSYM ldap_modifyA}
-function ldap_modifyA(ld: PLDAP; dn: PAnsiChar; var mods: PLDAPModA): ULONG; cdecl;
-{$EXTERNALSYM ldap_modifyW}
-function ldap_modifyW(ld: PLDAP; dn: PWideChar; var mods: PLDAPModW): ULONG; cdecl;
-{$EXTERNALSYM ldap_modify}
-function ldap_modify(ld: PLDAP; dn: PChar; var mods: PLDAPMod): ULONG; cdecl;
-
-{$EXTERNALSYM ldap_modify_sA}
-function ldap_modify_sA(ld: PLDAP; dn: PAnsiChar; var mods: PLDAPModA): ULONG; cdecl;
-{$EXTERNALSYM ldap_modify_sW}
-function ldap_modify_sW(ld: PLDAP; dn: PWideChar; var mods: PLDAPModW): ULONG; cdecl;
-{$EXTERNALSYM ldap_modify_s}
-function ldap_modify_s(ld: PLDAP; dn: PChar; var mods: PLDAPMod): ULONG; cdecl;
-
-{$EXTERNALSYM ldap_modify_extA}
-function ldap_modify_extA(ld: PLDAP; dn: PAnsiChar; var mods: PLDAPModA;
- var ServerControls, ClientControls: PLDAPControlA;
- var MessageNumber: ULONG): ULONG; cdecl;
-{$EXTERNALSYM ldap_modify_extW}
-function ldap_modify_extW(ld: PLDAP; dn: PWideChar; var mods: PLDAPModW;
- var ServerControls, ClientControls: PLDAPControlW;
- var MessageNumber: ULONG): ULONG; cdecl;
-{$EXTERNALSYM ldap_modify_ext}
-function ldap_modify_ext(ld: PLDAP; dn: PChar; var mods: PLDAPMod;
- var ServerControls, ClientControls: PLDAPControl;
- var MessageNumber: ULONG): ULONG; cdecl;
-
-{$EXTERNALSYM ldap_modify_ext_sA}
-function ldap_modify_ext_sA(ld: PLDAP; dn: PAnsiChar; var mods: PLDAPModA;
- var ServerControls, ClientControls: PLDAPControlA): ULONG; cdecl;
-{$EXTERNALSYM ldap_modify_ext_sW}
-function ldap_modify_ext_sW(ld: PLDAP; dn: PWideChar; var mods: PLDAPModW;
- var ServerControls, ClientControls: PLDAPControlW): ULONG; cdecl;
-{$EXTERNALSYM ldap_modify_ext_s}
-function ldap_modify_ext_s(ld: PLDAP; dn: PChar; var mods: PLDAPMod;
- var ServerControls, ClientControls: PLDAPControl): ULONG; cdecl;
-
-//
-// modrdn and modrdn2 function both as RenameObject and MoveObject.
-//
-// Note that to LDAP v2 servers, only rename within a given container
-// is supported... therefore NewDistinguishedName is actually NewRDN.
-// Here are some examples :
-//
-// This works to both v2 and v3 servers :
-//
-// DN = CN=Bob,OU=FOO,O=BAR
-// NewDN = CN=Joe
-//
-// result is: CN=Joe,OU=FOO,O=BAR
-//
-// This works to only v3 and above servers :
-//
-// DN = CN=Bob,OU=FOO,O=BAR
-// NewDN = CN=Joe,OU=FOOBAR,O=BAR
-//
-// result is: CN=Joe,OU=FOOBAR,O=BAR
-//
-// If you try the second example to a v2 server, we'll send the whole
-// NewDN over as the new RDN(rather than break up the parent OU and
-// child). The server will then give you back some unknown error.
-//
-
-//
-// multi-thread: ldap_modrdn and ldap_modrdn2 calls are not safe in that
-// the message number is returned rather than the return code.
-// You have to look at the connection block in an error case
-// and the return code may be overwritten by another thread
-// inbetween.
-//
-// Use ldap_rename_ext instead, as these are thread safe.
-//
-
-{$EXTERNALSYM ldap_modrdn2A}
-function ldap_modrdn2A(var ExternalHandle: LDAP;
- DistinguishedName, NewDistinguishedName: PAnsiChar;
- DeleteOldRdn: Integer): ULONG; cdecl;
-{$EXTERNALSYM ldap_modrdn2W}
-function ldap_modrdn2W(var ExternalHandle: LDAP;
- DistinguishedName, NewDistinguishedName: PWideChar;
- DeleteOldRdn: Integer): ULONG; cdecl;
-{$EXTERNALSYM ldap_modrdn2}
-function ldap_modrdn2(var ExternalHandle: LDAP;
- DistinguishedName, NewDistinguishedName: PChar;
- DeleteOldRdn: Integer): ULONG; cdecl;
-
-//
-// ldap_modrdn simply calls ldap_modrdn2 with a value of 1 for DeleteOldRdn.
-//
-
-{$EXTERNALSYM ldap_modrdnA}
-function ldap_modrdnA(var ExternalHandle: LDAP;
- DistinguishedName, NewDistinguishedName: PAnsiChar): ULONG; cdecl;
-{$EXTERNALSYM ldap_modrdnW}
-function ldap_modrdnW(var ExternalHandle: LDAP;
- DistinguishedName, NewDistinguishedName: PWideChar): ULONG; cdecl;
-{$EXTERNALSYM ldap_modrdn}
-function ldap_modrdn(var ExternalHandle: LDAP;
- DistinguishedName, NewDistinguishedName: PChar): ULONG; cdecl;
-
-{$EXTERNALSYM ldap_modrdn2_sA}
-function ldap_modrdn2_sA(var ExternalHandle: LDAP;
- DistinguishedName, NewDistinguishedName: PAnsiChar;
- DeleteOldRdn: Integer): ULONG; cdecl;
-{$EXTERNALSYM ldap_modrdn2_sW}
-function ldap_modrdn2_sW(var ExternalHandle: LDAP;
- DistinguishedName, NewDistinguishedName: PWideChar;
- DeleteOldRdn: Integer): ULONG; cdecl;
-{$EXTERNALSYM ldap_modrdn2_s}
-function ldap_modrdn2_s(var ExternalHandle: LDAP;
- DistinguishedName, NewDistinguishedName: PChar;
- DeleteOldRdn: Integer): ULONG; cdecl;
-
-{$EXTERNALSYM ldap_modrdn_sA}
-function ldap_modrdn_sA(var ExternalHandle: LDAP;
- DistinguishedName, NewDistinguishedName: PAnsiChar): ULONG; cdecl;
-{$EXTERNALSYM ldap_modrdn_sW}
-function ldap_modrdn_sW(var ExternalHandle: LDAP;
- DistinguishedName, NewDistinguishedName: PWideChar): ULONG; cdecl;
-{$EXTERNALSYM ldap_modrdn_s}
-function ldap_modrdn_s(var ExternalHandle: LDAP;
- DistinguishedName, NewDistinguishedName: PChar): ULONG; cdecl;
-
-//
-// Extended Rename operations. These take controls and separate out the
-// parent from the RDN, for clarity.
-//
-
-{$EXTERNALSYM ldap_rename_extA}
-function ldap_rename_extA(ld: PLDAP; dn, NewRDN, NewParent: PAnsiChar;
- DeleteOldRdn: Integer; var ServerControls, ClientControls: PLDAPControlA;
- var MessageNumber: ULONG): ULONG; cdecl;
-{$EXTERNALSYM ldap_rename_extW}
-function ldap_rename_extW(ld: PLDAP; dn, NewRDN, NewParent: PWideChar;
- DeleteOldRdn: Integer; var ServerControls, ClientControls: PLDAPControlW;
- var MessageNumber: ULONG): ULONG; cdecl;
-{$EXTERNALSYM ldap_rename_ext}
-function ldap_rename_ext(ld: PLDAP; dn, NewRDN, NewParent: PChar;
- DeleteOldRdn: Integer; var ServerControls, ClientControls: PLDAPControl;
- var MessageNumber: ULONG): ULONG; cdecl;
-
-{$EXTERNALSYM ldap_rename_ext_sA}
-function ldap_rename_ext_sA(ld: PLDAP;
- dn, NewRDN, NewParent: PAnsiChar; DeleteOldRdn: Integer;
- var ServerControls, ClientControls: PLDAPControlA): ULONG; cdecl;
-{$EXTERNALSYM ldap_rename_ext_sW}
-function ldap_rename_ext_sW(ld: PLDAP;
- dn, NewRDN, NewParent: PWideChar; DeleteOldRdn: Integer;
- var ServerControls, ClientControls: PLDAPControlW): ULONG; cdecl;
-{$EXTERNALSYM ldap_rename_ext_s}
-function ldap_rename_ext_s(ld: PLDAP;
- dn, NewRDN, NewParent: PChar; DeleteOldRdn: Integer;
- var ServerControls, ClientControls: PLDAPControl): ULONG; cdecl;
-
-//
-// Add an entry to the tree
-//
-
-//
-// multi-thread: ldap_add calls are not safe in that the message number
-// is returned rather than the return code. You have to look
-// at the connection block in an error case and the return code
-// may be overwritten by another thread inbetween.
-//
-// Use ldap_add_ext instead, as these are thread safe.
-//
-// ldap_add_s and ldap_add_ext* calls are thread safe.
-//
-
-{$EXTERNALSYM ldap_addA}
-function ldap_addA(ld: PLDAP; dn: PAnsiChar; var attrs: PLDAPModA): ULONG; cdecl;
-{$EXTERNALSYM ldap_addW}
-function ldap_addW(ld: PLDAP; dn: PWideChar; var attrs: PLDAPModW): ULONG; cdecl;
-{$EXTERNALSYM ldap_add}
-function ldap_add(ld: PLDAP; dn: PChar; var attrs: PLDAPMod): ULONG; cdecl;
-
-{$EXTERNALSYM ldap_add_sA}
-function ldap_add_sA(ld: PLDAP; dn: PAnsiChar; var attrs: PLDAPModA): ULONG; cdecl;
-{$EXTERNALSYM ldap_add_sW}
-function ldap_add_sW(ld: PLDAP; dn: PWideChar; var attrs: PLDAPModW): ULONG; cdecl;
-{$EXTERNALSYM ldap_add_s}
-function ldap_add_s(ld: PLDAP; dn: PChar; var attrs: PLDAPMod): ULONG; cdecl;
-
-{$EXTERNALSYM ldap_add_extA}
-function ldap_add_extA(ld: PLDAP; dn: PAnsiChar; var attrs: PLDAPModA;
- var ServerControls, ClientControls: PLDAPControlA;
- var MessageNumber: ULONG): ULONG; cdecl;
-{$EXTERNALSYM ldap_add_extW}
-function ldap_add_extW(ld: PLDAP; dn: PWideChar; var attrs: PLDAPModW;
- var ServerControls, ClientControls: PLDAPControlW;
- var MessageNumber: ULONG): ULONG; cdecl;
-{$EXTERNALSYM ldap_add_ext}
-function ldap_add_ext(ld: PLDAP; dn: PChar; var attrs: PLDAPMod;
- var ServerControls, ClientControls: PLDAPControl;
- var MessageNumber: ULONG): ULONG; cdecl;
-
-{$EXTERNALSYM ldap_add_ext_sA}
-function ldap_add_ext_sA(ld: PLDAP; dn: PAnsiChar; var attrs: PLDAPModA;
- var ServerControls, ClientControls: PLDAPControlA): ULONG; cdecl;
-{$EXTERNALSYM ldap_add_ext_sW}
-function ldap_add_ext_sW(ld: PLDAP; dn: PWideChar; var attrs: PLDAPModW;
- var ServerControls, ClientControls: PLDAPControlW): ULONG; cdecl;
-{$EXTERNALSYM ldap_add_ext_s}
-function ldap_add_ext_s(ld: PLDAP; dn: PChar; var attrs: PLDAPMod;
- var ServerControls, ClientControls: PLDAPControl): ULONG; cdecl;
-
-//
-// Compare the attribute for a given entry to a known value.
-//
-
-{$EXTERNALSYM ldap_compareA}
-function ldap_compareA(ld: PLDAP; dn, attr, value: PAnsiChar): ULONG; cdecl;
-{$EXTERNALSYM ldap_compareW}
-function ldap_compareW(ld: PLDAP; dn, attr, value: PWideChar): ULONG; cdecl;
-{$EXTERNALSYM ldap_compare}
-function ldap_compare(ld: PLDAP; dn, attr, value: PChar): ULONG; cdecl;
-
-{$EXTERNALSYM ldap_compare_sA}
-function ldap_compare_sA(ld: PLDAP; dn, attr, value: PAnsiChar): ULONG; cdecl;
-{$EXTERNALSYM ldap_compare_sW}
-function ldap_compare_sW(ld: PLDAP; dn, attr, value: PWideChar): ULONG; cdecl;
-{$EXTERNALSYM ldap_compare_s}
-function ldap_compare_s(ld: PLDAP; dn, attr, value: PChar): ULONG; cdecl;
-
-//
-// Extended Compare operations. These take controls and are thread safe.
-// They also allow you to specify a bval structure for the data, so that it
-// isn't translated from Unicode or ANSI to UTF8. Allows for comparison of
-// raw binary data.
-//
-// Specify either Data or Value as not NULL. If both are not NULL, the
-// berval Data will be used.
-//
-
-// either value or Data is not null, not both
-{$EXTERNALSYM ldap_compare_extA}
-function ldap_compare_extA(ld: PLDAP; dn, Attr, Value: PAnsiChar;
- Data: PLDAPBerVal; var ServerControls, ClientControls: PLDAPControlA;
- var MessageNumber: ULONG): ULONG; cdecl;
-{$EXTERNALSYM ldap_compare_extW}
-function ldap_compare_extW(ld: PLDAP; dn, Attr, Value: PWideChar;
- Data: PLDAPBerVal; var ServerControls, ClientControls: PLDAPControlW;
- var MessageNumber: ULONG): ULONG; cdecl;
-{$EXTERNALSYM ldap_compare_ext}
-function ldap_compare_ext(ld: PLDAP; dn, Attr, Value: PChar;
- Data: PLDAPBerVal; var ServerControls, ClientControls: PLDAPControl;
- var MessageNumber: ULONG): ULONG; cdecl;
-
-{$EXTERNALSYM ldap_compare_ext_sA}
-function ldap_compare_ext_sA(ld: PLDAP;
- dn, Attr, Value: PAnsiChar; Data: PLDAPBerVal;
- var ServerControls, ClientControls: PLDAPControlA): ULONG; cdecl;
-{$EXTERNALSYM ldap_compare_ext_sW}
-function ldap_compare_ext_sW(ld: PLDAP;
- dn, Attr, Value: PWideChar; Data: PLDAPBerVal;
- var ServerControls, ClientControls: PLDAPControlW): ULONG; cdecl;
-{$EXTERNALSYM ldap_compare_ext_s}
-function ldap_compare_ext_s(ld: PLDAP;
- dn, Attr, Value: PChar; Data: PLDAPBerVal;
- var ServerControls, ClientControls: PLDAPControl): ULONG; cdecl;
-
-//
-// Delete an object out of the tree
-//
-
-//
-// multi-thread: ldap_delete calls are not safe in that the message number
-// is returned rather than the return code. You have to look
-// at the connection block in an error case and the return code
-// may be overwritten by another thread inbetween.
-//
-// Use ldap_delete_ext instead, as these are thread safe.
-//
-// ldap_delete_s and ldap_delete_ext* calls are thread safe.
-//
-
-{$EXTERNALSYM ldap_deleteA}
-function ldap_deleteA(ld: PLDAP; dn: PAnsiChar): ULONG; cdecl;
-{$EXTERNALSYM ldap_deleteW}
-function ldap_deleteW(ld: PLDAP; dn: PWideChar): ULONG; cdecl;
-{$EXTERNALSYM ldap_delete}
-function ldap_delete(ld: PLDAP; dn: PChar): ULONG; cdecl;
-
-{$EXTERNALSYM ldap_delete_sA}
-function ldap_delete_sA(ld: PLDAP; dn: PAnsiChar): ULONG; cdecl;
-{$EXTERNALSYM ldap_delete_sW}
-function ldap_delete_sW(ld: PLDAP; dn: PWideChar): ULONG; cdecl;
-{$EXTERNALSYM ldap_delete_s}
-function ldap_delete_s(ld: PLDAP; dn: PChar): ULONG; cdecl;
-
-{$EXTERNALSYM ldap_delete_extA}
-function ldap_delete_extA(ld: PLDAP; dn: PAnsiChar;
- var ServerControls, ClientControls: PLDAPControlA;
- var MessageNumber: ULONG): ULONG; cdecl;
-{$EXTERNALSYM ldap_delete_extW}
-function ldap_delete_extW(ld: PLDAP; dn: PWideChar;
- var ServerControls, ClientControls: PLDAPControlW;
- var MessageNumber: ULONG): ULONG; cdecl;
-{$EXTERNALSYM ldap_delete_ext}
-function ldap_delete_ext(ld: PLDAP; dn: PChar;
- var ServerControls, ClientControls: PLDAPControl;
- var MessageNumber: ULONG): ULONG; cdecl;
-
-{$EXTERNALSYM ldap_delete_ext_sA}
-function ldap_delete_ext_sA(ld: PLDAP; dn: PAnsiChar;
- var ServerControls, ClientControls: PLDAPControlA): ULONG; cdecl;
-{$EXTERNALSYM ldap_delete_ext_sW}
-function ldap_delete_ext_sW(ld: PLDAP; dn: PWideChar;
- var ServerControls, ClientControls: PLDAPControlW): ULONG; cdecl;
-{$EXTERNALSYM ldap_delete_ext_s}
-function ldap_delete_ext_s(ld: PLDAP; dn: PChar;
- var ServerControls, ClientControls: PLDAPControl): ULONG; cdecl;
-
-//
-// Give up on a request. No guarentee that it got there as there is no
-// response from the server.
-//
-
-{$EXTERNALSYM ldap_abandon}
-function ldap_abandon(ld: PLDAP; msgid: ULONG): ULONG; cdecl;
-
-//
-// Possible values for "all" field in ldap_result. We've enhanced it such
-// that if someone passes in LDAP_MSG_RECEIVED, we'll pass all values we've
-// received up to that point.
-//
-
-const
- {$EXTERNALSYM LDAP_MSG_ONE}
- LDAP_MSG_ONE = 0;
- {$EXTERNALSYM LDAP_MSG_ALL}
- LDAP_MSG_ALL = 1;
- {$EXTERNALSYM LDAP_MSG_RECEIVED}
- LDAP_MSG_RECEIVED = 2;
-
-//
-// Get a response from a connection. One enhancement here is that ld can
-// be null, in which case we'll return responses from any server. Free
-// responses here with ldap_msgfree.
-//
-// For connection-less LDAP, you should pass in both a LDAP connection
-// handle and a msgid. This will ensure we know which request the app
-// is waiting on a reply to. (we actively resend request until we get
-// a response.)
-//
-
-{$EXTERNALSYM ldap_result}
-function ldap_result(ld: PLDAP; msgid, all: ULONG;
- timeout: PLDAP_TIMEVAL; var res: PLDAPMessage): ULONG; cdecl;
-
-{$EXTERNALSYM ldap_msgfree}
-function ldap_msgfree(res: PLDAPMessage): ULONG; cdecl;
-
-//
-// This parses a message and returns the error code. It optionally frees
-// the message by calling ldap_msgfree.
-//
-
-// multi-thread: ldap_result2error call is thread safe
-
-// freeit is boolean.. free the message?
-{$EXTERNALSYM ldap_result2error}
-function ldap_result2error(ld: PLDAP; res: PLDAPMessage;
- freeit: ULONG): ULONG; cdecl;
-
-//
-// Similar to ldap_result2error, this parses responses from the server and
-// returns the appropriate fields. Use this one if you want to get at the
-// referrals, matchingDNs, or server controls returned.
-//
-
-// multi-thread: ldap_parse_result call is thread safe
-
-{$EXTERNALSYM ldap_parse_resultA}
-function ldap_parse_resultA (
- var Connection: LDAP;
- ResultMessage: PLDAPMessage;
- ReturnCode: PULONG; // returned by server
- MatchedDNs: PPCharA; // free with ldap_memfree
- ErrorMessage: PPCharA; // free with ldap_memfree
- Referrals: PPPCharA; // free with ldap_value_freeW
- var ServerControls: PPLDAPControlA; // free with ldap_free_controlsW
- Freeit: BOOL): ULONG; cdecl;
-{$EXTERNALSYM ldap_parse_resultW}
-function ldap_parse_resultW (
- var Connection: LDAP;
- ResultMessage: PLDAPMessage;
- ReturnCode: PULONG; // returned by server
- MatchedDNs: PPCharW; // free with ldap_memfree
- ErrorMessage: PPCharW; // free with ldap_memfree
- Referrals: PPPCharW; // free with ldap_value_freeW
- var ServerControls: PPLDAPControlW; // free with ldap_free_controlsW
- Freeit: BOOL): ULONG; cdecl;
-{$EXTERNALSYM ldap_parse_result}
-function ldap_parse_result (
- var Connection: LDAP;
- ResultMessage: PLDAPMessage;
- ReturnCode: PULONG; // returned by server
- MatchedDNs: PPChar; // free with ldap_memfree
- ErrorMessage: PPChar; // free with ldap_memfree
- Referrals: PPPChar; // free with ldap_value_freeW
- var ServerControls: PPLDAPControl; // free with ldap_free_controlsW
- Freeit: BOOL): ULONG; cdecl;
-
-{$EXTERNALSYM ldap_controls_freeA}
-function ldap_controls_freeA(var Controls: PLDAPControlA): ULONG; cdecl;
-{$EXTERNALSYM ldap_controls_freeW}
-function ldap_controls_freeW(var Controls: PLDAPControlW): ULONG; cdecl;
-{$EXTERNALSYM ldap_controls_free}
-function ldap_controls_free(var Controls: PLDAPControl): ULONG; cdecl;
-
-{$EXTERNALSYM ldap_parse_extended_resultA}
-function ldap_parse_extended_resultA(
- Connection: PLDAP;
- ResultMessage: PLDAPMessage; // returned by server
- var ResultOID: PAnsiChar; // free with ldap_memfree
- var ResultData: PBERVAL; // free with ldap_memfree
- Freeit: ByteBool // Don't need the message anymore
-): ULONG; cdecl;
-{$EXTERNALSYM ldap_parse_extended_resultW}
-function ldap_parse_extended_resultW(
- Connection: PLDAP;
- ResultMessage: PLDAPMessage; // returned by server
- var ResultOID: PWideChar; // free with ldap_memfree
- var ResultData: PBERVAL; // free with ldap_memfree
- Freeit: ByteBool // Don't need the message anymore
-): ULONG; cdecl;
-{$EXTERNALSYM ldap_parse_extended_result}
-function ldap_parse_extended_result(
- Connection: PLDAP;
- ResultMessage: PLDAPMessage; // returned by server
- var ResultOID: PChar; // free with ldap_memfree
- var ResultData: PBERVAL; // free with ldap_memfree
- Freeit: ByteBool // Don't need the message anymore
-): ULONG; cdecl;
-
-{$EXTERNALSYM ldap_control_freeA}
-function ldap_control_freeA(var Control: LDAPControlA): ULONG; cdecl;
-{$EXTERNALSYM ldap_control_freeW}
-function ldap_control_freeW(var Control: LDAPControlW): ULONG; cdecl;
-{$EXTERNALSYM ldap_control_free}
-function ldap_control_free(var Control: LDAPControl): ULONG; cdecl;
-
-//
-// ldap_free_controls are old, use ldap_controls_free
-//
-
-{$EXTERNALSYM ldap_free_controlsA}
-function ldap_free_controlsA(var Controls: PLDAPControlA): ULONG; cdecl;
-{$EXTERNALSYM ldap_free_controlsW}
-function ldap_free_controlsW(var Controls: PLDAPControlW): ULONG; cdecl;
-{$EXTERNALSYM ldap_free_controls}
-function ldap_free_controls(var Controls: PLDAPControl): ULONG; cdecl;
-
-//
-// ldap_err2string returns a pointer to a string describing the error. This
-// string should not be freed.
-//
-
-{$EXTERNALSYM ldap_err2stringA}
-function ldap_err2stringA(err: ULONG): PAnsiChar; cdecl;
-{$EXTERNALSYM ldap_err2stringW}
-function ldap_err2stringW(err: ULONG): PWideChar; cdecl;
-{$EXTERNALSYM ldap_err2string}
-function ldap_err2string(err: ULONG): PChar; cdecl;
-
-//
-// ldap_perror does nothing and is here just for compatibility.
-//
-
-{$EXTERNALSYM ldap_perror}
-procedure ldap_perror(ld: PLDAP; msg: PChar); cdecl;
-
-//
-// Return the first entry of a message. It is freed when the message is
-// freed so should not be freed explicitly.
-//
-
-{$EXTERNALSYM ldap_first_entry}
-function ldap_first_entry(ld: PLDAP; res: PLDAPMessage): PLDAPMessage; cdecl;
-
-//
-// Return the next entry of a message. It is freed when the message is
-// freed so should not be freed explicitly.
-//
-
-{$EXTERNALSYM ldap_next_entry}
-function ldap_next_entry(ld: PLDAP; entry: PLDAPMessage): PLDAPMessage; cdecl;
-
-//
-// Count the number of search entries returned by the server in a response
-// to a server request.
-//
-
-{$EXTERNALSYM ldap_count_entries}
-function ldap_count_entries(ld: PLDAP; res: PLDAPMessage): ULONG; cdecl;
-
-//
-// A BerElement really maps out to a C++ class object that does BER encoding.
-// Don't mess with it as it's opaque.
-//
-type
- PBerElement = ^BerElement;
- {$EXTERNALSYM BerElement}
- BerElement = record
- opaque: PChar; // this is an opaque structure used just for
- // compatibility with reference implementation
- end;
-
-const
- {$EXTERNALSYM NULLBER}
- NULLBER = PBerElement(nil);
-
-//
-// For a given entry, return the first attribute. The pointer returned is
-// actually a buffer in the connection block(with allowances for
-// multi-threaded apps)so it should not be freed.
-//
-
-{$EXTERNALSYM ldap_first_attributeA}
-function ldap_first_attributeA(ld: PLDAP; entry: PLDAPMessage;
- var ptr: PBerElement): PAnsiChar; cdecl;
-{$EXTERNALSYM ldap_first_attributeW}
-function ldap_first_attributeW(ld: PLDAP; entry: PLDAPMessage;
- var ptr: PBerElement): PWideChar; cdecl;
-{$EXTERNALSYM ldap_first_attribute}
-function ldap_first_attribute(ld: PLDAP; entry: PLDAPMessage;
- var ptr: PBerElement): PChar; cdecl;
-
-//
-// Return the next attribute... again, the attribute pointer should not be
-// freed.
-//
-
-{$EXTERNALSYM ldap_next_attributeA}
-function ldap_next_attributeA(ld: PLDAP; entry: PLDAPMessage;
- ptr: PBerElement): PAnsiChar; cdecl;
-{$EXTERNALSYM ldap_next_attributeW}
-function ldap_next_attributeW(ld: PLDAP; entry: PLDAPMessage;
- ptr: PBerElement): PWideChar; cdecl;
-{$EXTERNALSYM ldap_next_attribute}
-function ldap_next_attribute(ld: PLDAP; entry: PLDAPMessage;
- ptr: PBerElement): PChar; cdecl;
-
-//
-// Get a given attribute's list of values. This is used during parsing of
-// a search response. It returns a list of pointers to values, the list is
-// null terminated.
-//
-// If the values are generic octet strings and not null terminated strings,
-// use ldap_get_values_len instead.
-//
-// The returned value should be freed when your done with it by calling
-// ldap_value_free.
-//
-
-{$EXTERNALSYM ldap_get_valuesA}
-function ldap_get_valuesA(ld: PLDAP; entry: PLDAPMessage;
- attr: PAnsiChar): PPCharA; cdecl;
-{$EXTERNALSYM ldap_get_valuesW}
-function ldap_get_valuesW(ld: PLDAP; entry: PLDAPMessage;
- attr: PWideChar): PPCharW; cdecl;
-{$EXTERNALSYM ldap_get_values}
-function ldap_get_values(ld: PLDAP; entry: PLDAPMessage;
- attr: PChar): PPChar; cdecl;
-
-//
-// Get a given attribute's list of values. This is used during parsing of
-// a search response. It returns a list of berval structures to values,
-// the list is null terminated.
-//
-// If the values are null terminated strings, it may be easier to process them
-// by calling ldap_get_values instead.
-//
-// The returned value should be freed when your done with it by calling
-// ldap_value_free_len.
-//
-
-{$EXTERNALSYM ldap_get_values_lenA}
-function ldap_get_values_lenA(ExternalHandle: PLDAP; Message: PLDAPMessage;
- attr: PAnsiChar): PPLDAPBerVal; cdecl;
-{$EXTERNALSYM ldap_get_values_lenW}
-function ldap_get_values_lenW(ExternalHandle: PLDAP; Message: PLDAPMessage;
- attr: PWideChar): PPLDAPBerVal; cdecl;
-{$EXTERNALSYM ldap_get_values_len}
-function ldap_get_values_len(ExternalHandle: PLDAP; Message: PLDAPMessage;
- attr: PChar): PPLDAPBerVal; cdecl;
-
-//
-// Return the number of values in a list returned by ldap_get_values.
-//
-
-{$EXTERNALSYM ldap_count_valuesA}
-function ldap_count_valuesA(vals: PPCharA): ULONG; cdecl;
-{$EXTERNALSYM ldap_count_valuesW}
-function ldap_count_valuesW(vals: PPCharW): ULONG; cdecl;
-{$EXTERNALSYM ldap_count_values}
-function ldap_count_values(vals: PPChar): ULONG; cdecl;
-
-//
-// Return the number of values in a list returned by ldap_get_values_len.
-//
-
-{$EXTERNALSYM ldap_count_values_len}
-function ldap_count_values_len(vals: PPLDAPBerVal): ULONG; cdecl;
-
-//
-// Free structures returned by ldap_get_values.
-//
-
-{$EXTERNALSYM ldap_value_freeA}
-function ldap_value_freeA(vals: PPCharA): ULONG; cdecl;
-{$EXTERNALSYM ldap_value_freeW}
-function ldap_value_freeW(vals: PPCharW): ULONG; cdecl;
-{$EXTERNALSYM ldap_value_free}
-function ldap_value_free(vals: PPChar): ULONG; cdecl;
-
-//
-// Free structures returned by ldap_get_values_len.
-//
-
-{$EXTERNALSYM ldap_value_free_len}
-function ldap_value_free_len(vals: PPLDAPBerVal): ULONG; cdecl;
-
-//
-// Get the distinguished name for a given search entry. It should be freed
-// by calling ldap_memfree.
-//
-
-{$EXTERNALSYM ldap_get_dnA}
-function ldap_get_dnA(ld: PLDAP; entry: PLDAPMessage): PAnsiChar; cdecl;
-{$EXTERNALSYM ldap_get_dnW}
-function ldap_get_dnW(ld: PLDAP; entry: PLDAPMessage): PWideChar; cdecl;
-{$EXTERNALSYM ldap_get_dn}
-function ldap_get_dn(ld: PLDAP; entry: PLDAPMessage): PChar; cdecl;
-
-//
-// When using ldap_explode_dn, you should free the returned string by
-// calling ldap_value_free.
-//
-
-{$EXTERNALSYM ldap_explode_dnA}
-function ldap_explode_dnA(dn: PAnsiChar; notypes: ULONG): PPCharA; cdecl;
-{$EXTERNALSYM ldap_explode_dnW}
-function ldap_explode_dnW(dn: PWideChar; notypes: ULONG): PPCharW; cdecl;
-{$EXTERNALSYM ldap_explode_dn}
-function ldap_explode_dn(dn: PChar; notypes: ULONG): PPChar; cdecl;
-
-//
-// When calling ldap_dn2ufn, you should free the returned string by calling
-// ldap_memfree.
-//
-
-{$EXTERNALSYM ldap_dn2ufnA}
-function ldap_dn2ufnA(dn: PAnsiChar): PAnsiChar; cdecl;
-{$EXTERNALSYM ldap_dn2ufnW}
-function ldap_dn2ufnW(dn: PWideChar): PWideChar; cdecl;
-{$EXTERNALSYM ldap_dn2ufn}
-function ldap_dn2ufn(dn: PChar): PChar; cdecl;
-
-//
-// This is used to free strings back to the LDAP API heap. Don't pass in
-// values that you've gotten from ldap_open, ldap_get_values, etc.
-//
-
-{$EXTERNALSYM ldap_memfreeA}
-procedure ldap_memfreeA(Block: PAnsiChar); cdecl;
-{$EXTERNALSYM ldap_memfreeW}
-procedure ldap_memfreeW(Block: PWideChar); cdecl;
-{$EXTERNALSYM ldap_memfree}
-procedure ldap_memfree(Block: PChar); cdecl;
-
-{$EXTERNALSYM ber_bvfree}
-procedure ber_bvfree(bv: PLDAPBerVal); cdecl;
-
-//
-// The function ldap_ufn2dn attempts to "normalize" a user specified DN
-// to make it "proper". It follows RFC 1781(add CN= if not present,
-// add OU= if none present, etc). If it runs into any problems at all
-// while normalizing, it simply returns a copy of what was passed in.
-//
-// It allocates the output string from the LDAP memory pool. If the pDn
-// comes back as non-NULL, you should free it when you're done with a call
-// to ldap_memfree.
-//
-
-{$EXTERNALSYM ldap_ufn2dnA}
-function ldap_ufn2dnA(ufn: PAnsiChar; var pDn: PAnsiChar): ULONG; cdecl;
-{$EXTERNALSYM ldap_ufn2dnW}
-function ldap_ufn2dnW(ufn: PWideChar; var pDn: PWideChar): ULONG; cdecl;
-{$EXTERNALSYM ldap_ufn2dn}
-function ldap_ufn2dn(ufn: PChar; var pDn: PChar): ULONG; cdecl;
-
-const
- {$EXTERNALSYM LBER_USE_DER}
- LBER_USE_DER = $01;
- {$EXTERNALSYM LBER_USE_INDEFINITE_LEN}
- LBER_USE_INDEFINITE_LEN = $02;
- {$EXTERNALSYM LBER_TRANSLATE_STRINGS}
- LBER_TRANSLATE_STRINGS = $04;
-
-//
-// Call to initialize the LDAP library. Pass in a version structure with
-// lv_size set to sizeof(LDAP_VERSION), lv_major set to LAPI_MAJOR_VER1,
-// and lv_minor set to LAPI_MINOR_VER1. Return value will be either
-// LDAP_SUCCESS if OK or LDAP_OPERATIONS_ERROR if can't be supported.
-//
-
- {$EXTERNALSYM LAPI_MAJOR_VER1}
- LAPI_MAJOR_VER1 = 1;
- {$EXTERNALSYM LAPI_MINOR_VER1}
- LAPI_MINOR_VER1 = 1;
-
-type
- PLDAPVersionInfo = ^TLDAPVersionInfo;
- {$EXTERNALSYM PLDAP_VERSION_INFO}
- PLDAP_VERSION_INFO = ^LDAP_VERSION_INFO;
- {$EXTERNALSYM LDAP_VERSION_INFO}
- LDAP_VERSION_INFO = record
- lv_size: ULONG;
- lv_major: ULONG;
- lv_minor: ULONG;
- end;
- TLDAPVersionInfo = LDAP_VERSION_INFO;
-
-{$EXTERNALSYM ldap_startup}
-function ldap_startup(var version: TLDAPVersionInfo): ULONG; cdecl;
-
-//
-// ldap_cleanup unloads the library when the refcount of opens goes to zero.
-// (i.e. if a DLL calls it within a program that is also using it, it won't
-// free all resources)
-//
-
-{$EXTERNALSYM ldap_cleanup}
-function ldap_cleanup(hInstance: THandle): ULONG; cdecl;
-
-//
-// Extended API to support allowing opaque blobs of data in search filters.
-// This API takes any filter element and converts it to a safe text string that
-// can safely be passed in a search filter.
-// An example of using this is :
-//
-// filter is something like guid=4826BF6CF0123444
-// this will put out on the wire guid of binary 0x4826BF6CF0123444
-//
-// call ldap_escape_filter_element with sourceFilterElement pointing to
-// raw data, sourceCount set appropriately to length of data.
-//
-// if destFilterElement is NULL, then return value is length required for
-// output buffer.
-//
-// if destFilterElement is not NULL, then the function will copy the source
-// into the dest buffer and ensure that it is of a safe format.
-//
-// then simply insert the dest buffer into your search filter after the
-// "attributetype=".
-//
-// this will put out on the wire guid of binary 0x004826BF6CF000123444
-//
-// Note : don't call this for attribute values that are really strings, as
-// we won't do any conversion from what you passed in to UTF-8. Should only
-// be used for attributes that really are raw binary.
-//
-
-{$EXTERNALSYM ldap_escape_filter_elementA}
-function ldap_escape_filter_elementA(
- sourceFilterElement: PChar; sourceLength: ULONG;
- destFilterElement: PAnsiChar; destLength: ULONG): ULONG; cdecl;
-{$EXTERNALSYM ldap_escape_filter_elementW}
-function ldap_escape_filter_elementW(
- sourceFilterElement: PChar; sourceLength: ULONG;
- destFilterElement: PWideChar; destLength: ULONG): ULONG; cdecl;
-{$EXTERNALSYM ldap_escape_filter_element}
-function ldap_escape_filter_element(
- sourceFilterElement: PChar; sourceLength: ULONG;
- destFilterElement: PChar; destLength: ULONG): ULONG; cdecl;
-
-//
-// Misc extensions for additional debugging.
-//
-// Note that these do nothing on free builds.
-//
-
-{$EXTERNALSYM ldap_set_dbg_flags}
-function ldap_set_dbg_flags(NewFlags: ULONG): ULONG; cdecl;
-
-// NOTE by translator: Original function type has ellipsis, which means
-// there can be var_args. Object Pascal doesn't support this, so you'll
-// have to define a function that does what you want (probably using BASM
-// to get the extra parameters, or linking a C function), and then cast
-// that to TDbgPrint.
-
-type
- {$EXTERNALSYM DBGPRINT}
- DBGPRINT = function(Format: PChar {; ...} ): ULONG cdecl;
- TDbgPrint = DBGPRINT;
-
-{$EXTERNALSYM ldap_set_dbg_routine}
-procedure ldap_set_dbg_routine(DebugPrintRoutine: TDbgPrint); cdecl;
-
-//
-// These routines are possibly useful by other modules. Note that Win95
-// doesn't by default have the UTF-8 codepage loaded. So a good way to
-// convert from UTF-8 to Unicode.
-//
-
-{$EXTERNALSYM LdapUTF8ToUnicode}
-function LdapUTF8ToUnicode(lpSrcStr: LPCSTR; cchSrc: Integer;
- lpDestStr: LPWSTR; cchDest: Integer): Integer; cdecl;
-
-{$EXTERNALSYM LdapUnicodeToUTF8}
-function LdapUnicodeToUTF8(lpSrcStr: LPCWSTR; cchSrc: Integer;
- lpDestStr: LPSTR; cchDest: Integer): Integer; cdecl;
-
-//
-// LDAPv3 features :
-//
-// Sort Keys... these are used to ask the server to sort the results
-// before sending the results back. LDAPv3 only and optional to implement
-// on the server side. Check supportedControl for an OID of
-// "1.2.840.113556.1.4.473" to see if the server supports it.
-//
-
-const
- {$EXTERNALSYM LDAP_SERVER_SORT_OID}
- LDAP_SERVER_SORT_OID = '1.2.840.113556.1.4.473';
- {$EXTERNALSYM LDAP_SERVER_SORT_OID_W}
- LDAP_SERVER_SORT_OID_W = '1.2.840.113556.1.4.473';
-
- {$EXTERNALSYM LDAP_SERVER_RESP_SORT_OID}
- LDAP_SERVER_RESP_SORT_OID = '1.2.840.113556.1.4.474';
- {$EXTERNALSYM LDAP_SERVER_RESP_SORT_OID_W}
- LDAP_SERVER_RESP_SORT_OID_W = '1.2.840.113556.1.4.474';
-
-{
- NOTE from translator: I'm not quite sure about the following
- declaration:
-
- typedef struct ldapsearch LDAPSearch, *PLDAPSearch;
-}
-
-type
-// Note from translator:
-// The following two types don't have a TLDAPxxx type declared, since they are
-// meant as opaque pointer types only, so a TLDAPxxx is not needed.
-
- {$EXTERNALSYM PLDAPSearch}
- PLDAPSearch = ^LDAPSearch;
- {$EXTERNALSYM LDAPSearch}
- LDAPSearch = record end;
-
- {$EXTERNALSYM PLDAPSortKeyA}
- PLDAPSortKeyA = ^LDAPSortKeyA;
- {$EXTERNALSYM PLDAPSortKeyW}
- PLDAPSortKeyW = ^LDAPSortKeyW;
- {$EXTERNALSYM PLDAPSortKey}
- PLDAPSortKey = PLDAPSortKeyA;
- {$EXTERNALSYM LDAPSortKeyA}
- LDAPSortKeyA = packed record
- sk_attrtype: PAnsiChar;
- sk_matchruleoid: PAnsiChar;
- sk_reverseorder: ByteBool;
- end;
- {$EXTERNALSYM LDAPSortKeyW}
- LDAPSortKeyW = packed record
- sk_attrtype: PWideChar;
- sk_matchruleoid: PWideChar;
- sk_reverseorder: ByteBool;
- end;
- {$EXTERNALSYM LDAPSortKey}
- LDAPSortKey = LDAPSortKeyA;
-
-//
-// This API formats a list of sort keys into a search control. Call
-// ldap_control_free when you're finished with the control.
-//
-// Use this one rather than ldap_encode_sort_control as this is per RFC.
-//
-
-{$EXTERNALSYM ldap_create_sort_controlA}
-function ldap_create_sort_controlA(ExternalHandle: PLDAP;
- var SortKeys: PLDAPSortKeyA; IsCritical: UCHAR;
- var Control: PLDAPControlA): ULONG; cdecl;
-{$EXTERNALSYM ldap_create_sort_controlW}
-function ldap_create_sort_controlW(ExternalHandle: PLDAP;
- var SortKeys: PLDAPSortKeyW; IsCritical: UCHAR;
- var Control: PLDAPControlW): ULONG; cdecl;
-{$EXTERNALSYM ldap_create_sort_control}
-function ldap_create_sort_control(ExternalHandle: PLDAP;
- var SortKeys: PLDAPSortKey; IsCritical: UCHAR;
- var Control: PLDAPControl): ULONG; cdecl;
-
-//
-// This API parses the sort control returned by the server. Use ldap_memfree
-// to free the attribute value, if it's returned.
-//
-
-{$EXTERNALSYM ldap_parse_sort_controlA}
-function ldap_parse_sort_controlA(ExternalHandle: PLDAP;
- var Control: PLDAPControlA; var Result: ULONG;
- var Attribute: PAnsiChar): ULONG; cdecl;
-{$EXTERNALSYM ldap_parse_sort_controlW}
-function ldap_parse_sort_controlW(ExternalHandle: PLDAP;
- var Control: PLDAPControlW; var Result: ULONG;
- var Attribute: PWideChar): ULONG; cdecl;
-{$EXTERNALSYM ldap_parse_sort_control}
-function ldap_parse_sort_control(ExternalHandle: PLDAP;
- var Control: PLDAPControl; var Result: ULONG;
- var Attribute: PChar): ULONG; cdecl;
-
-//
-// This API formats a list of sort keys into a search control. Call
-// ldap_memfree for both Control->ldctl_value.bv_val and
-// Control->currentControl->ldctl_oid when you're finished with the control.
-//
-// This is the old sort API that will be shortly pulled. Please use
-// ldap_create_sort_control defined above.
-//
-
-{$EXTERNALSYM ldap_encode_sort_controlA}
-function ldap_encode_sort_controlA(ExternalHandle: PLDAP;
- var SortKeys: PLDAPSortKeyA; Control: PLDAPControlA;
- Criticality: ByteBool): ULONG; cdecl;
-{$EXTERNALSYM ldap_encode_sort_controlW}
-function ldap_encode_sort_controlW(ExternalHandle: PLDAP;
- var SortKeys: PLDAPSortKeyW; Control: PLDAPControlW;
- Criticality: ByteBool): ULONG; cdecl;
-{$EXTERNALSYM ldap_encode_sort_control}
-function ldap_encode_sort_control(ExternalHandle: PLDAP;
- var SortKeys: PLDAPSortKey; Control: PLDAPControl;
- Criticality: ByteBool): ULONG; cdecl;
-
-//
-// LDAPv3: This is the RFC defined API for the simple paging of results
-// control. Use ldap_control_free to free the control allocated by
-// ldap_create_page_control.
-//
-
-{$EXTERNALSYM ldap_create_page_controlA}
-function ldap_create_page_controlA(ExternalHandle: PLDAP;
- PageSize: ULONG; var Cookie: TLDAPBerVal; IsCritical: UCHAR;
- var Control: PLDAPControlA): ULONG; cdecl;
-{$EXTERNALSYM ldap_create_page_controlW}
-function ldap_create_page_controlW(ExternalHandle: PLDAP;
- PageSize: ULONG; var Cookie: TLDAPBerVal; IsCritical: UCHAR;
- var Control: PLDAPControlW): ULONG; cdecl;
-{$EXTERNALSYM ldap_create_page_control}
-function ldap_create_page_control(ExternalHandle: PLDAP;
- PageSize: ULONG; var Cookie: TLDAPBerVal; IsCritical: UCHAR;
- var Control: PLDAPControl): ULONG; cdecl;
-
-{$EXTERNALSYM ldap_parse_page_controlA}
-function ldap_parse_page_controlA(ExternalHandle: PLDAP;
- ServerControls: PPLDAPControlA; var TotalCount: ULONG;
- var Cookie: PLDAPBerVal): ULONG; cdecl; // Use ber_bvfree to free Cookie
-{$EXTERNALSYM ldap_parse_page_controlW}
-function ldap_parse_page_controlW(ExternalHandle: PLDAP;
- ServerControls: PPLDAPControlW; var TotalCount: ULONG;
- var Cookie: PLDAPBerVal): ULONG; cdecl; // Use ber_bvfree to free Cookie
-{$EXTERNALSYM ldap_parse_page_control}
-function ldap_parse_page_control(ExternalHandle: PLDAP;
- ServerControls: PPLDAPControl; var TotalCount: ULONG;
- var Cookie: PLDAPBerVal): ULONG; cdecl; // Use ber_bvfree to free Cookie
-
-//
-// LDAPv3: This is the interface for simple paging of results. To ensure
-// that the server supports it, check the supportedControl property off of
-// the root for an OID of 1.2.840.113556.1.4.319. If it is there, then it
-// supports this feature.
-//
-// If you're going to specify sort keys, see section above on sort keys on
-// now to tell if they're supported by the server.
-//
-// You first call ldap_search_init_page. If it returns a non-NULL LDAPSearch
-// block, then it worked ok. Otherwise call LdapGetLastError to find error.
-//
-// With a valid LDAPSearch block (there are opaque), call ldap_get_next_page
-// or ldap_get_next_page_s. If you call ldap_get_next_page, you MUST call
-// ldap_get_paged_count for each set of results that you get for that message.
-// This allows the library to save off the cookie that the server sent to
-// resume the search.
-//
-// Other than calling ldap_get_paged_count, the results you get back from
-// ldap_get_next_page can be treated as any other search result, and should
-// be freed when you're done by calling ldap_msgfree.
-//
-// When the end of the search is hit, you'll get a return code of
-// LDAP_NO_RESULTS_RETURNED. At this point, (or any point after LDAPSearch
-// structure has been allocated), you call ldap_search_abandon_page. You
-// need to call this even after you get a return code of
-// LDAP_NO_RESULTS_RETURNED.
-//
-// If you call ldap_get_next_page_s, you don't need to call
-// ldap_get_paged_count.
-//
-
-const
- {$EXTERNALSYM LDAP_PAGED_RESULT_OID_STRING}
- LDAP_PAGED_RESULT_OID_STRING = '1.2.840.113556.1.4.319';
- {$EXTERNALSYM LDAP_PAGED_RESULT_OID_STRING_W}
- LDAP_PAGED_RESULT_OID_STRING_W = '1.2.840.113556.1.4.319';
-
-{$EXTERNALSYM ldap_search_init_pageA}
-function ldap_search_init_pageA(ExternalHandle: PLDAP;
- DistinguishedName: PAnsiChar; ScopeOfSearch: ULONG; SearchFilter: PAnsiChar;
- AttributeList: PPCharA; AttributesOnly: ULONG;
- var ServerControls, ClientControls: PLDAPControlA;
- PageTimeLimit, TotalSizeLimit: ULONG;
- var SortKeys: PLDAPSortKeyA): PLDAPSearch; cdecl;
-
-{$EXTERNALSYM ldap_search_init_pageW}
-function ldap_search_init_pageW(ExternalHandle: PLDAP;
- DistinguishedName: PWideChar; ScopeOfSearch: ULONG; SearchFilter: PWideChar;
- AttributeList: PPCharW; AttributesOnly: ULONG;
- var ServerControls, ClientControls: PLDAPControlW;
- PageTimeLimit, TotalSizeLimit: ULONG;
- var SortKeys: PLDAPSortKeyW): PLDAPSearch; cdecl;
-
-{$EXTERNALSYM ldap_search_init_page}
-function ldap_search_init_page(ExternalHandle: PLDAP;
- DistinguishedName: PChar; ScopeOfSearch: ULONG; SearchFilter: PChar;
- AttributeList: PPChar; AttributesOnly: ULONG;
- var ServerControls, ClientControls: PLDAPControl;
- PageTimeLimit, TotalSizeLimit: ULONG;
- var SortKeys: PLDAPSortKey): PLDAPSearch; cdecl;
-
-{$EXTERNALSYM ldap_get_next_page}
-function ldap_get_next_page(ExternalHandle: PLDAP; SearchHandle: PLDAPSearch;
- PageSize: ULONG; var MessageNumber: ULONG): ULONG; cdecl;
-
-{$EXTERNALSYM ldap_get_next_page_s}
-function ldap_get_next_page_s(ExternalHandle: PLDAP; SearchHandle: PLDAPSearch;
- var timeout: TLDAPTimeVal; PageSize: ULONG; var TotalCount: ULONG;
- var Results: PLDAPMessage): ULONG; cdecl;
-
-{$EXTERNALSYM ldap_get_paged_count}
-function ldap_get_paged_count(ExternalHandle: PLDAP; SearchBlock: PLDAPSearch;
- var TotalCount: ULONG; Results: PLDAPMessage): ULONG; cdecl;
-
-{$EXTERNALSYM ldap_search_abandon_page}
-function ldap_search_abandon_page(ExternalHandle: PLDAP;
- SearchBlock: PLDAPSearch): ULONG; cdecl;
-
-//
-// These functions return subordinate referrals (references) that are returned
-// in search responses. There are two types of referrals. External referrals
-// where the naming context doesn't reside on the server (e.g. server says 'I
-// don't have the data, look over there') and Subordinate referrals (or
-// references) where some data has been returned and the referrals are passed
-// to other naming contexts below the current one (e.g. servers says 'Here's
-// some data from the tree I hold, go look here, there, and over there for
-// more data that is further down in the tree.').
-//
-// These routines handle the latter. For external references, use
-// ldap_parse_result.
-//
-// Return the first reference from a message. It is freed when the message is
-// freed so should not be freed explicitly.
-//
-
-{$EXTERNALSYM ldap_first_reference}
-function ldap_first_reference(ld: PLDAP; res: PLDAPMessage): PLDAPMessage;
-
-//
-// Return the next entry of a message. It is freed when the message is
-// freed so should not be freed explicitly.
-//
-
-{$EXTERNALSYM ldap_next_reference}
-function ldap_next_reference(ld: PLDAP; entry: PLDAPMessage): PLDAPMessage;
-
-//
-// Count the number of subordinate references returned by the server in a
-// response to a search request.
-//
-
-{$EXTERNALSYM ldap_count_references}
-function ldap_count_references(ld: PLDAP; res: PLDAPMessage): ULONG; cdecl;
-
-//
-// We return the list of subordinate referrals in a search response message.
-//
-
-// free Referrals with ldap_value_freeW
-{$EXTERNALSYM ldap_parse_referenceA}
-function ldap_parse_referenceA(Connection: PLDAP; ResultMessage: PLDAPMessage;
- var Referrals: PPCharA): ULONG; cdecl;
-{$EXTERNALSYM ldap_parse_referenceW}
-function ldap_parse_referenceW(Connection: PLDAP; ResultMessage: PLDAPMessage;
- var Referrals: PPCharW): ULONG; cdecl;
-{$EXTERNALSYM ldap_parse_reference}
-function ldap_parse_reference(Connection: PLDAP; ResultMessage: PLDAPMessage;
- var Referrals: PPChar): ULONG; cdecl;
-
-//
-// These APIs allow a client to send an extended request (free for all) to
-// an LDAPv3 (or above) server. The functionality is fairly open... you can
-// send any request you'd like. Note that since we don't know if you'll
-// be receiving a single or multiple responses, you'll have to explicitly tell
-// us when you're done with the request by calling ldap_close_extended_op.
-//
-// These are thread safe.
-//
-
-{$EXTERNALSYM ldap_extended_operationA}
-function ldap_extended_operationA(ld: PLDAP; Oid: PAnsiChar;
- var Data: TLDAPBerVal; var ServerControls, ClientControls: PLDAPControlA;
- var MessageNumber: ULONG): ULONG; cdecl;
-{$EXTERNALSYM ldap_extended_operationW}
-function ldap_extended_operationW(ld: PLDAP; Oid: PWideChar;
- var Data: TLDAPBerVal; var ServerControls, ClientControls: PLDAPControlW;
- var MessageNumber: ULONG): ULONG; cdecl;
-{$EXTERNALSYM ldap_extended_operation}
-function ldap_extended_operation(ld: PLDAP; Oid: PChar;
- var Data: TLDAPBerVal; var ServerControls, ClientControls: PLDAPControl;
- var MessageNumber: ULONG): ULONG; cdecl;
-
-{$EXTERNALSYM ldap_close_extended_op}
-function ldap_close_extended_op(ld: PLDAP; MessageNumber: ULONG): ULONG; cdecl;
-
-//
-// Some enhancements that will probably never make it into the RFC related
-// to callouts to allow external caching of connections.
-//
-// Call ldap_set_option( conn, LDAP_OPT_REFERRAL_CALLBACK, &referralRoutines )
-// where referralRoutines is the address of an LDAP_REFERRAL_CALLBACK
-// structure with your routines. They may be NULL, in which case we'll
-// obviously not make the calls.
-//
-// Any connections that are created will inherit the current callbacks from
-// the primary connection that the request was initiated on.
-//
-
-const
- {$EXTERNALSYM LDAP_OPT_REFERRAL_CALLBACK}
- LDAP_OPT_REFERRAL_CALLBACK = $70;
-
-//
-// This first routine is called when we're about to chase a referral. We
-// callout to it to see if there is already a connection cached that we
-// can use. If so, the callback routine returns the pointer to the
-// connection to use in ConnectionToUse. If not, it sets
-// *ConnectionToUse to NULL.
-//
-// For a return code, it should return 0 if we should continue to chase the
-// referral. If it returns a non-zero return code, we'll treat that as the
-// error code for chasing the referral. This allows caching of host names
-// that are not reachable, if we decide to add that in the future.
-//
-
-type
- {$EXTERNALSYM QUERYFORCONNECTION}
- QUERYFORCONNECTION = function(
- PrimaryConnection: PLDAP;
- ReferralFromConnection: PLDAP;
- NewDN: PWideChar;
- HostName: PChar;
- PortNumber: ULONG;
- SecAuthIdentity: Pointer; // if null, use CurrentUser below
- CurrentUserToken: Pointer; // pointer to current user's LUID
- var ConnectionToUse: PLDAP):ULONG cdecl;
- TQueryForConnection = QUERYFORCONNECTION;
-
-//
-// This next function is called when we've created a new connection while
-// chasing a referral. Note that it gets assigned the same callback functions
-// as the PrimaryConnection. If the return code is FALSE, then the call
-// back function doesn't want to cache the connection and it will be
-// destroyed after the operation is complete. If TRUE is returned, we'll
-// assume that the callee has taken ownership of the connection and it will
-// not be destroyed after the operation is complete.
-//
-// If the ErrorCodeFromBind field is not 0, then the bind operation to
-// that server failed.
-//
-
- {$EXTERNALSYM NOTIFYOFNEWCONNECTION}
- NOTIFYOFNEWCONNECTION = function(
- PrimaryConnection: PLDAP;
- ReferralFromConnection: PLDAP;
- NewDN: PWideChar;
- HostName: PChar;
- NewConnection: PLDAP;
- PortNumber: ULONG;
- SecAuthIdentity: Pointer; // if null, use CurrentUser below
- CurrentUser: Pointer; // pointer to current user's LUID
- ErrorCodeFromBind: ULONG): ByteBool cdecl;
- TNotifyOfNewConnection = NOTIFYOFNEWCONNECTION;
-
-//
-// This next function is called when we've successfully called off to the
-// QueryForConnection call and received a connection OR when we called off
-// to the NotifyOfNewConnection call and it returned TRUE. We call this
-// function when we're dereferencing the connection after we're done with it.
-//
-// Return code is currently ignored, but the function should return
-// LDAP_SUCCESS if all went well.
-//
-
- {$EXTERNALSYM DEREFERENCECONNECTION}
- DEREFERENCECONNECTION = function(PrimaryConnection: PLDAP;
- ConnectionToDereference: PLDAP): ULONG cdecl;
- TDereferenceConnection = DEREFERENCECONNECTION;
-
- PLDAPReferralCallback = ^TLDAPReferralCallback;
- {$EXTERNALSYM LdapReferralCallback}
- LdapReferralCallback = packed record
- SizeOfCallbacks: ULONG; // set to sizeof( LDAP_REFERRAL_CALLBACK )
- QueryForConnection: QUERYFORCONNECTION;
- NotifyRoutine: NOTIFYOFNEWCONNECTION;
- DereferenceRoutine: DEREFERENCECONNECTION;
- end;
- {$EXTERNALSYM LDAP_REFERRAL_CALLBACK}
- LDAP_REFERRAL_CALLBACK = LdapReferralCallback;
- {$EXTERNALSYM PLDAP_REFERRAL_CALLBACK}
- PLDAP_REFERRAL_CALLBACK = ^LdapReferralCallback;
- TLDAPReferralCallback = LdapReferralCallback;
-
-//
-// Thread Safe way to get last error code returned by LDAP API is to call
-// LdapGetLastError();
-//
-
-{$EXTERNALSYM LdapGetLastError}
-function LdapGetLastError: ULONG; cdecl;
-
-//
-// Translate from LdapError to closest Win32 error code.
-//
-
-{$EXTERNALSYM LdapMapErrorToWin32}
-function LdapMapErrorToWin32(LdapError: ULONG): ULONG; cdecl;
-
-//
-// This is an arrangement for specifying client certificates while establishing
-// an SSL connection.
-// Simply Call ldap_set_option( conn, LDAP_OPT_CLIENT_CERTIFICATE, &CertRoutine )
-// where CertRoutine is the address of your callback routine. If it is NULL,
-// we will obviously not make the call.
-//
-
-const
- {$EXTERNALSYM LDAP_OPT_CLIENT_CERTIFICATE}
- LDAP_OPT_CLIENT_CERTIFICATE = $80;
-
-//
-// This callback is invoked when the server demands a client certificate for
-// authorization. We pass a structure containing a list of server-trusted
-// Certificate Authorities. If the client has certificates to provide, it
-// converts them to CERT_CONTEXTs and adds them to the given certificate
-// store. LDAP subsequently passes these credentials to the SSL server as part
-// of the handshake.
-//
-
-type
- {$EXTERNALSYM QUERYCLIENTCERT}
- QUERYCLIENTCERT = function(
- Connection: PLDAP;
- trusted_CAs: Pointer {PSecPkgContext_IssuerListInfoEx};
- hCertStore: LongWord {HCERTSTORE};
- var pcCreds: DWORD
- ): ByteBool cdecl;
-
-//
-// We are also giving an opportunity for the client to verify the certificate
-// of the server. The client registers a callback which is invoked after the
-// secure connection is setup. The server certificate is presented to the
-// client who invokes it and decides it it is acceptable. To register this
-// callback, simply call ldap_set_option( conn, LDAP_OPT_SERVER_CERTIFICATE, &CertRoutine )
-//
-
-const
- {$EXTERNALSYM LDAP_OPT_SERVER_CERTIFICATE}
- LDAP_OPT_SERVER_CERTIFICATE = $81;
-
-//
-// This function is called after the secure connection has been established. The
-// certificate of the server is supplied for examination by the client. If the
-// client approves it, it returns TRUE else, it returns false and the secure
-// connection is torn down.
-//
-
-type
- VERIFYSERVERCERT = function(
- Connection: PLDAP;
- pServerCert: Pointer {PCCERT_CONTEXT}
- ): ByteBool cdecl;
-
-
-//
-// Given an LDAP message, return the connection pointer where the message
-// came from. It can return NULL if the connection has already been freed.
-//
-
-{$EXTERNALSYM ldap_conn_from_msg}
-function ldap_conn_from_msg(PrimaryConn: PLDAP; res: PLDAPMessage): PLDAP; cdecl;
-
-//
-// Do we reference the connection for each message so that we can safely get
-// the connection pointer back by calling ldap_conn_from_msg?
-//
-const
- {$EXTERNALSYM LDAP_OPT_REF_DEREF_CONN_PER_MSG}
- LDAP_OPT_REF_DEREF_CONN_PER_MSG = $94;
-
-implementation
-
-const
- LDAPLib = 'wldap32.dll';
-
-function ldap_openA; external LDAPLib name 'ldap_openA';
-function ldap_openW; external LDAPLib name 'ldap_openW';
-function ldap_open; external LDAPLib name 'ldap_openA';
-function ldap_initA; external LDAPLib name 'ldap_initA';
-function ldap_initW; external LDAPLib name 'ldap_initW';
-function ldap_init; external LDAPLib name 'ldap_initA';
-function ldap_sslinitA; external LDAPLib name 'ldap_sslinitA';
-function ldap_sslinitW; external LDAPLib name 'ldap_sslinitW';
-function ldap_sslinit; external LDAPLib name 'ldap_sslinitA';
-function cldap_openA; external LDAPLib name 'cldap_openA';
-function cldap_openW; external LDAPLib name 'cldap_openW';
-function cldap_open; external LDAPLib name 'cldap_openA';
-function ldap_simple_bindA; external LDAPLib name 'ldap_simple_bindA';
-function ldap_simple_bindW; external LDAPLib name 'ldap_simple_bindW';
-function ldap_simple_bind; external LDAPLib name 'ldap_simple_bindA';
-function ldap_simple_bind_sA; external LDAPLib name 'ldap_simple_bind_sA';
-function ldap_simple_bind_sW; external LDAPLib name 'ldap_simple_bind_sW';
-function ldap_simple_bind_s; external LDAPLib name 'ldap_simple_bind_sA';
-function ldap_bindA; external LDAPLib name 'ldap_bindA';
-function ldap_bindW; external LDAPLib name 'ldap_bindW';
-function ldap_bind; external LDAPLib name 'ldap_bindA';
-function ldap_bind_sA; external LDAPLib name 'ldap_bind_sA';
-function ldap_bind_sW; external LDAPLib name 'ldap_bind_sW';
-function ldap_bind_s; external LDAPLib name 'ldap_bind_sA';
-function ldap_sasl_bindA; external LDAPLib name 'ldap_sasl_bindA';
-function ldap_sasl_bindW; external LDAPLib name 'ldap_sasl_bindW';
-function ldap_sasl_bind; external LDAPLib name 'ldap_sasl_bindA';
-function ldap_sasl_bind_sA; external LDAPLib name 'ldap_sasl_bind_sA';
-function ldap_sasl_bind_sW; external LDAPLib name 'ldap_sasl_bind_sW';
-function ldap_sasl_bind_s; external LDAPLib name 'ldap_sasl_bind_sA';
-function ldap_searchA; external LDAPLib name 'ldap_searchA';
-function ldap_searchW; external LDAPLib name 'ldap_searchW';
-function ldap_search; external LDAPLib name 'ldap_searchA';
-function ldap_search_sA; external LDAPLib name 'ldap_search_sA';
-function ldap_search_sW; external LDAPLib name 'ldap_search_sW';
-function ldap_search_s; external LDAPLib name 'ldap_search_sA';
-function ldap_search_stA; external LDAPLib name 'ldap_search_stA';
-function ldap_search_stW; external LDAPLib name 'ldap_search_stW';
-function ldap_search_st; external LDAPLib name 'ldap_search_stA';
-function ldap_modifyA; external LDAPLib name 'ldap_modifyA';
-function ldap_modifyW; external LDAPLib name 'ldap_modifyW';
-function ldap_modify; external LDAPLib name 'ldap_modifyA';
-function ldap_modify_sA; external LDAPLib name 'ldap_modify_sA';
-function ldap_modify_sW; external LDAPLib name 'ldap_modify_sW';
-function ldap_modify_s; external LDAPLib name 'ldap_modify_sA';
-function ldap_modrdn2A; external LDAPLib name 'ldap_modrdn2A';
-function ldap_modrdn2W; external LDAPLib name 'ldap_modrdn2W';
-function ldap_modrdn2; external LDAPLib name 'ldap_modrdn2A';
-function ldap_modrdnA; external LDAPLib name 'ldap_modrdnA';
-function ldap_modrdnW; external LDAPLib name 'ldap_modrdnW';
-function ldap_modrdn; external LDAPLib name 'ldap_modrdnA';
-function ldap_modrdn2_sA; external LDAPLib name 'ldap_modrdn2_sA';
-function ldap_modrdn2_sW; external LDAPLib name 'ldap_modrdn2_sW';
-function ldap_modrdn2_s; external LDAPLib name 'ldap_modrdn2_sA';
-function ldap_modrdn_sA; external LDAPLib name 'ldap_modrdn_sA';
-function ldap_modrdn_sW; external LDAPLib name 'ldap_modrdn_sW';
-function ldap_modrdn_s; external LDAPLib name 'ldap_modrdn_sA';
-function ldap_addA; external LDAPLib name 'ldap_addA';
-function ldap_addW; external LDAPLib name 'ldap_addW';
-function ldap_add; external LDAPLib name 'ldap_addA';
-function ldap_add_sA; external LDAPLib name 'ldap_add_sA';
-function ldap_add_sW; external LDAPLib name 'ldap_add_sW';
-function ldap_add_s; external LDAPLib name 'ldap_add_sA';
-function ldap_compareA; external LDAPLib name 'ldap_compareA';
-function ldap_compareW; external LDAPLib name 'ldap_compareW';
-function ldap_compare; external LDAPLib name 'ldap_compareA';
-function ldap_compare_sA; external LDAPLib name 'ldap_compare_sA';
-function ldap_compare_sW; external LDAPLib name 'ldap_compare_sW';
-function ldap_compare_s; external LDAPLib name 'ldap_compare_sA';
-function ldap_deleteA; external LDAPLib name 'ldap_deleteA';
-function ldap_deleteW; external LDAPLib name 'ldap_deleteW';
-function ldap_delete; external LDAPLib name 'ldap_deleteA';
-function ldap_delete_sA; external LDAPLib name 'ldap_delete_sA';
-function ldap_delete_sW; external LDAPLib name 'ldap_delete_sW';
-function ldap_delete_s; external LDAPLib name 'ldap_delete_sA';
-function ldap_err2stringA; external LDAPLib name 'ldap_err2stringA';
-function ldap_err2stringW; external LDAPLib name 'ldap_err2stringW';
-function ldap_err2string; external LDAPLib name 'ldap_err2stringA';
-function ldap_first_attributeA; external LDAPLib name 'ldap_first_attributeA';
-function ldap_first_attributeW; external LDAPLib name 'ldap_first_attributeW';
-function ldap_first_attribute; external LDAPLib name 'ldap_first_attributeA';
-function ldap_next_attributeA; external LDAPLib name 'ldap_next_attributeA';
-function ldap_next_attributeW; external LDAPLib name 'ldap_next_attributeW';
-function ldap_next_attribute; external LDAPLib name 'ldap_next_attributeA';
-function ldap_get_valuesA; external LDAPLib name 'ldap_get_valuesA';
-function ldap_get_valuesW; external LDAPLib name 'ldap_get_valuesW';
-function ldap_get_values; external LDAPLib name 'ldap_get_valuesA';
-function ldap_get_values_lenA; external LDAPLib name 'ldap_get_values_lenA';
-function ldap_get_values_lenW; external LDAPLib name 'ldap_get_values_lenW';
-function ldap_get_values_len; external LDAPLib name 'ldap_get_values_lenA';
-function ldap_count_valuesA; external LDAPLib name 'ldap_count_valuesA';
-function ldap_count_valuesW; external LDAPLib name 'ldap_count_valuesW';
-function ldap_count_values; external LDAPLib name 'ldap_count_valuesA';
-function ldap_value_freeA; external LDAPLib name 'ldap_value_freeA';
-function ldap_value_freeW; external LDAPLib name 'ldap_value_freeW';
-function ldap_value_free; external LDAPLib name 'ldap_value_freeA';
-function ldap_get_dnA; external LDAPLib name 'ldap_get_dnA';
-function ldap_get_dnW; external LDAPLib name 'ldap_get_dnW';
-function ldap_get_dn; external LDAPLib name 'ldap_get_dnA';
-function ldap_explode_dnA; external LDAPLib name 'ldap_explode_dnA';
-function ldap_explode_dnW; external LDAPLib name 'ldap_explode_dnW';
-function ldap_explode_dn; external LDAPLib name 'ldap_explode_dnA';
-function ldap_dn2ufnA; external LDAPLib name 'ldap_dn2ufnA';
-function ldap_dn2ufnW; external LDAPLib name 'ldap_dn2ufnW';
-function ldap_dn2ufn; external LDAPLib name 'ldap_dn2ufnA';
-procedure ldap_memfreeA; external LDAPLib name 'ldap_memfreeA';
-procedure ldap_memfreeW; external LDAPLib name 'ldap_memfreeW';
-procedure ldap_memfree; external LDAPLib name 'ldap_memfreeA';
-function ldap_ufn2dnA; external LDAPLib name 'ldap_ufn2dnA';
-function ldap_ufn2dnW; external LDAPLib name 'ldap_ufn2dnW';
-function ldap_ufn2dn; external LDAPLib name 'ldap_ufn2dnA';
-function ldap_escape_filter_elementA; external LDAPLib name 'ldap_escape_filter_elementA';
-function ldap_escape_filter_elementW; external LDAPLib name 'ldap_escape_filter_elementW';
-function ldap_escape_filter_element; external LDAPLib name 'ldap_escape_filter_elementA';
-function ldap_search_extA; external LDAPLib name 'ldap_search_extA';
-function ldap_search_extW; external LDAPLib name 'ldap_search_extW';
-function ldap_search_ext; external LDAPLib name 'ldap_search_extA';
-function ldap_search_ext_sA; external LDAPLib name 'ldap_search_ext_sA';
-function ldap_search_ext_sW; external LDAPLib name 'ldap_search_ext_sW';
-function ldap_search_ext_s; external LDAPLib name 'ldap_search_ext_sA';
-function ldap_check_filterA; EXTERNAL LDAPLib name 'ldap_check_filterA';
-function ldap_check_filterW; EXTERNAL LDAPLib name 'ldap_check_filterW';
-function ldap_check_filter; EXTERNAL LDAPLib name 'ldap_check_filterA';
-function ldap_modify_extA; external LDAPLib name 'ldap_modify_extA';
-function ldap_modify_extW; external LDAPLib name 'ldap_modify_extW';
-function ldap_modify_ext; external LDAPLib name 'ldap_modify_extA';
-function ldap_modify_ext_sA; external LDAPLib name 'ldap_modify_ext_sA';
-function ldap_modify_ext_sW; external LDAPLib name 'ldap_modify_ext_sW';
-function ldap_modify_ext_s; external LDAPLib name 'ldap_modify_ext_sA';
-function ldap_rename_extA; external LDAPLib name 'ldap_rename_extA';
-function ldap_rename_extW; external LDAPLib name 'ldap_rename_extW';
-function ldap_rename_ext; external LDAPLib name 'ldap_rename_extA';
-function ldap_rename_ext_sA; external LDAPLib name 'ldap_rename_ext_sA';
-function ldap_rename_ext_sW; external LDAPLib name 'ldap_rename_ext_sW';
-function ldap_rename_ext_s; external LDAPLib name 'ldap_rename_ext_sA';
-function ldap_add_extA; external LDAPLib name 'ldap_add_extA';
-function ldap_add_extW; external LDAPLib name 'ldap_add_extW';
-function ldap_add_ext; external LDAPLib name 'ldap_add_extA';
-function ldap_add_ext_sA; external LDAPLib name 'ldap_add_ext_sA';
-function ldap_add_ext_sW; external LDAPLib name 'ldap_add_ext_sW';
-function ldap_add_ext_s; external LDAPLib name 'ldap_add_ext_sA';
-function ldap_compare_extA; external LDAPLib name 'ldap_compare_extA';
-function ldap_compare_extW; external LDAPLib name 'ldap_compare_extW';
-function ldap_compare_ext; external LDAPLib name 'ldap_compare_extA';
-function ldap_compare_ext_sA; external LDAPLib name 'ldap_compare_ext_sA';
-function ldap_compare_ext_sW; external LDAPLib name 'ldap_compare_ext_sW';
-function ldap_compare_ext_s; external LDAPLib name 'ldap_compare_ext_sA';
-function ldap_delete_extA; external LDAPLib name 'ldap_delete_extA';
-function ldap_delete_extW; external LDAPLib name 'ldap_delete_extW';
-function ldap_delete_ext; external LDAPLib name 'ldap_delete_extA';
-function ldap_delete_ext_sA; external LDAPLib name 'ldap_delete_ext_sA';
-function ldap_delete_ext_sW; external LDAPLib name 'ldap_delete_ext_sW';
-function ldap_delete_ext_s; external LDAPLib name 'ldap_delete_ext_sA';
-function ldap_parse_resultA; external LDAPLib name 'ldap_parse_resultA';
-function ldap_parse_resultW; external LDAPLib name 'ldap_parse_resultW';
-function ldap_parse_result; external LDAPLib name 'ldap_parse_resultA';
-function ldap_controls_freeA; external LDAPLib name 'ldap_controls_freeA';
-function ldap_controls_freeW; external LDAPLib name 'ldap_controls_freeW';
-function ldap_controls_free; external LDAPLib name 'ldap_controls_freeA';
-function ldap_parse_extended_resultA; external LDAPLib name 'ldap_parse_extended_resultA';
-function ldap_parse_extended_resultW; external LDAPLib name 'ldap_parse_extended_resultW';
-function ldap_parse_extended_result; external LDAPLib name 'ldap_parse_extended_resultA';
-function ldap_control_freeA; external LDAPLib name 'ldap_control_freeA';
-function ldap_control_freeW; external LDAPLib name 'ldap_control_freeW';
-function ldap_control_free; external LDAPLib name 'ldap_control_freeA';
-function ldap_free_controlsA; external LDAPLib name 'ldap_free_controlsA';
-function ldap_free_controlsW; external LDAPLib name 'ldap_free_controlsW';
-function ldap_free_controls; external LDAPLib name 'ldap_free_controlsA';
-function ldap_create_sort_controlA; external LDAPLib name 'ldap_create_sort_controlA';
-function ldap_create_sort_controlW; external LDAPLib name 'ldap_create_sort_controlW';
-function ldap_create_sort_control; external LDAPLib name 'ldap_create_sort_controlA';
-function ldap_parse_sort_controlA; external LDAPLib name 'ldap_parse_sort_controlA';
-function ldap_parse_sort_controlW; external LDAPLib name 'ldap_parse_sort_controlW';
-function ldap_parse_sort_control; external LDAPLib name 'ldap_parse_sort_controlA';
-function ldap_encode_sort_controlA; external LDAPLib name 'ldap_encode_sort_controlA';
-function ldap_encode_sort_controlW; external LDAPLib name 'ldap_encode_sort_controlW';
-function ldap_encode_sort_control; external LDAPLib name 'ldap_encode_sort_controlA';
-function ldap_create_page_controlA; external LDAPLib name 'ldap_create_page_controlA';
-function ldap_create_page_controlW; external LDAPLib name 'ldap_create_page_controlW';
-function ldap_create_page_control; external LDAPLib name 'ldap_create_page_controlA';
-function ldap_parse_page_controlA; external LDAPLib name 'ldap_parse_page_controlA';
-function ldap_parse_page_controlW; external LDAPLib name 'ldap_parse_page_controlW';
-function ldap_parse_page_control; external LDAPLib name 'ldap_parse_page_controlA';
-function ldap_search_init_pageA; external LDAPLib name 'ldap_search_init_pageA';
-function ldap_search_init_pageW; external LDAPLib name 'ldap_search_init_pageW';
-function ldap_search_init_page; external LDAPLib name 'ldap_search_init_pageA';
-function ldap_parse_referenceA; external LDAPLib name 'ldap_parse_referenceA';
-function ldap_parse_referenceW; external LDAPLib name 'ldap_parse_referenceW';
-function ldap_parse_reference; external LDAPLib name 'ldap_parse_referenceA';
-function ldap_extended_operationA; external LDAPLib name 'ldap_extended_operationA';
-function ldap_extended_operationW; external LDAPLib name 'ldap_extended_operationW';
-function ldap_extended_operation; external LDAPLib name 'ldap_extended_operationA';
-function ldap_unbind; external LDAPLib name 'ldap_unbind';
-function ldap_unbind_s; external LDAPLib name 'ldap_unbind_s';
-function ldap_get_option; external LDAPLib name 'ldap_get_option';
-function ldap_set_option; external LDAPLib name 'ldap_set_option';
-function ldap_get_optionW; external LDAPLib name 'ldap_get_optionW';
-function ldap_set_optionW; external LDAPLib name 'ldap_set_optionW';
-function ldap_abandon; external LDAPLib name 'ldap_abandon';
-function ldap_result; external LDAPLib name 'ldap_result';
-function ldap_msgfree; external LDAPLib name 'ldap_msgfree';
-function ldap_result2error; external LDAPLib name 'ldap_result2error';
-procedure ldap_perror; external LDAPLib name 'ldap_perror';
-function ldap_first_entry; external LDAPLib name 'ldap_first_entry';
-function ldap_next_entry; external LDAPLib name 'ldap_next_entry';
-function ldap_count_entries; external LDAPLib name 'ldap_count_entries';
-function ldap_count_values_len; external LDAPLib name 'ldap_count_values_len';
-function ldap_value_free_len; external LDAPLib name 'ldap_value_free_len';
-function ldap_startup; external LDAPLib name 'ldap_startup';
-function ldap_cleanup; external LDAPLib name 'ldap_cleanup';
-function ldap_set_dbg_flags; external LDAPLib name 'ldap_set_dbg_flags';
-function ldap_connect; external LDAPLib name 'ldap_connect';
-procedure ber_bvfree; external LDAPLib name 'ber_bvfree';
-procedure ldap_set_dbg_routine; external LDAPLib name 'ldap_set_dbg_routine';
-function LdapUTF8ToUnicode; external LDAPLib name 'LdapUTF8ToUnicode';
-function LdapUnicodeToUTF8; external LDAPLib name 'LdapUnicodeToUTF8';
-function ldap_get_next_page; external LDAPLib name 'ldap_get_next_page';
-function ldap_get_next_page_s; external LDAPLib name 'ldap_get_next_page_s';
-function ldap_get_paged_count; external LDAPLib name 'ldap_get_paged_count';
-function ldap_search_abandon_page; external LDAPLib name 'ldap_search_abandon_page';
-function ldap_first_reference; external LDAPLib name 'ldap_first_reference';
-function ldap_next_reference; external LDAPLib name 'ldap_next_reference';
-function ldap_count_references; external LDAPLib name 'ldap_count_references';
-function ldap_close_extended_op; external LDAPLib name 'ldap_close_extended_op';
-function LdapGetLastError; external LDAPLib name 'LdapGetLastError';
-function LdapMapErrorToWin32; external LDAPLib name 'LdapMapErrorToWin32';
-function ldap_conn_from_msg; external LDAPLib name 'ldap_conn_from_msg';
-
-
-// Macros.
-function LDAP_IS_CLDAP(ld: PLDAP): boolean;
-begin
- Result :=(ld^.ld_sb.sb_naddr > 0);
-end;
-
-function NAME_ERROR(n: integer): boolean;
-begin
- Result :=((n and $f0) = $20);
-end;
-
-end.
-
+{******************************************************************************}
+{ }
+{ LDAP Client 32 API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: winldap.h, released August 1999. The original Pascal }
+{ code is: WinLDAP.pas, released December 1998. The initial developer of the }
+{ Pascal code is Luk Vermeulen (lvermeulen att seria dott com). }
+{ }
+{ Portions created by Luk Vermeulen are Copyright (C) 1998 Luk Vermeulen. }
+{ Portions created by Rudy Velthuis are Copyright (C) 2000 Rudy Velthuis. }
+{ Portions created by M. van Brakel are Copyright (C) 2001 Marcel van Brakel. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{******************************************************************************}
+
+// $Id: jwawinldap.pas,v 1.1 2005/04/04 07:56:11 marco Exp $
+
+unit JwaWinLDAP;
+
+{$WEAKPACKAGEUNIT}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ Windows;
+
+{$HPPEMIT '#ifndef LDAP_CLIENT_DEFINED'}
+{$HPPEMIT '#pragma option push -b -a8 -pc -A- /*P_O_Push_S*/'}
+{$HPPEMIT '#define LDAP_CLIENT_DEFINED'}
+
+{$HPPEMIT '#ifndef BASETYPES'}
+{$HPPEMIT '#include <windef.h>'}
+{$HPPEMIT '#endif'}
+
+(*
+Copyright (c) 1996-1999 Microsoft Corporation
+
+Module Name:
+
+ winldap.h LDAP client 32 API header file
+
+Abstract:
+
+ This module is the header file for the 32 bit LDAP client API for
+ Windows NT and Windows 95. This API is based on RFC 1823 with some
+ enhancements for LDAP v3.
+
+ Notes about Unicode support :
+
+ If you have UNICODE defined at compile time, you'll pull in the unicode
+ versions of the calls. Note that your executable may then not work with
+ other implementations of the LDAP API that don't support Unicode. If
+ UNICODE is not defined, then we define the LDAP calls without the trailing
+ 'A'(as in ldap_bind rather than ldap_bindA)so that your app may work
+ with other implementations that don't support Unicode.
+
+ The import library has all three forms of the call present... ldap_bindW,
+ ldap_bindA, and ldap_bind. ldap_bindA simply calls ldap_bind. ldap_bind
+ simply converts the arguments to unicode and calls ldap_bindW. The
+ reason this is done is because we have to put UTF-8 on the wire, so if
+ we converted from Unicode to single byte, we'd loose information. Since
+ all core processing is done in Unicode, nothing is lost.
+
+Updates :
+
+ 11/01/96 Modified for new API RFC draft.
+
+Environments :
+
+ Win32 user mode
+
+*)
+
+// Extra defines to keep compiler happy.
+type
+ PPCharA = ^PAnsiChar;
+ {$NODEFINE PPCharA}
+ PPCharW = ^PWideChar;
+ {$NODEFINE PPCharW}
+ PPChar = PPCharA;
+
+ PPPCharA = ^PPCharA;
+ {$NODEFINE PPPCharA}
+ PPPCharW = ^PPCharW;
+ {$NODEFINE PPPCharW}
+ PPPChar = PPPCharA;
+
+//
+// The #define LDAP_UNICODE controls if we map the undecorated calls to
+// their unicode counterparts or just leave them defined as the normal
+// single byte entry points.
+//
+// If you want to write a UNICODE enabled application, you'd normally
+// just have UNICODE defined and then we'll default to using all LDAP
+// Unicode calls.
+//
+
+const
+ //
+ // Global constants
+ //
+
+ {$EXTERNALSYM LDAP_PORT}
+ LDAP_PORT = 389;
+ {$EXTERNALSYM LDAP_SSL_PORT}
+ LDAP_SSL_PORT = 636;
+ {$EXTERNALSYM LDAP_GC_PORT}
+ LDAP_GC_PORT = 3268;
+ {$EXTERNALSYM LDAP_SSL_GC_PORT}
+ LDAP_SSL_GC_PORT = 3269;
+
+//
+// We currently support going to either v2 or v3 servers, though the API
+// is only a V2 API. We'll add support for result sets, server side
+// sorting, extended operations, etc as soon as they stabilize.
+//
+
+ {$EXTERNALSYM LDAP_VERSION1}
+ LDAP_VERSION1 = 1;
+ {$EXTERNALSYM LDAP_VERSION2}
+ LDAP_VERSION2 = 2;
+ {$EXTERNALSYM LDAP_VERSION3}
+ LDAP_VERSION3 = 3;
+ {$EXTERNALSYM LDAP_VERSION}
+ LDAP_VERSION = LDAP_VERSION2;
+
+//
+// All tags are CCFTTTTT.
+// CC Tag Class 00 = universal
+// 01 = application wide
+// 10 = context specific
+// 11 = private use
+//
+// F Form 0 primitive
+// 1 constructed
+//
+// TTTTT Tag Number
+//
+
+//
+// LDAP v2 & v3 commands.
+//
+
+ {$EXTERNALSYM LDAP_BIND_CMD}
+ LDAP_BIND_CMD = $60; // application + constructed
+ {$EXTERNALSYM LDAP_UNBIND_CMD}
+ LDAP_UNBIND_CMD = $42; // application + primitive
+ {$EXTERNALSYM LDAP_SEARCH_CMD}
+ LDAP_SEARCH_CMD = $63; // application + constructed
+ {$EXTERNALSYM LDAP_MODIFY_CMD}
+ LDAP_MODIFY_CMD = $66; // application + constructed
+ {$EXTERNALSYM LDAP_ADD_CMD}
+ LDAP_ADD_CMD = $68; // application + constructed
+ {$EXTERNALSYM LDAP_DELETE_CMD}
+ LDAP_DELETE_CMD = $4a; // application + primitive
+ {$EXTERNALSYM LDAP_MODRDN_CMD}
+ LDAP_MODRDN_CMD = $6c; // application + constructed
+ {$EXTERNALSYM LDAP_COMPARE_CMD}
+ LDAP_COMPARE_CMD = $6e; // application + constructed
+ {$EXTERNALSYM LDAP_ABANDON_CMD}
+ LDAP_ABANDON_CMD = $50; // application + primitive
+ {$EXTERNALSYM LDAP_SESSION_CMD}
+ LDAP_SESSION_CMD = $71; // application + constructed
+ {$EXTERNALSYM LDAP_EXTENDED_CMD}
+ LDAP_EXTENDED_CMD = $77; // application + constructed
+
+//
+// Responses/Results for LDAP v2 & v3
+//
+
+ {$EXTERNALSYM LDAP_RES_BIND}
+ LDAP_RES_BIND = $61; // application + constructed
+ {$EXTERNALSYM LDAP_RES_SEARCH_ENTRY}
+ LDAP_RES_SEARCH_ENTRY = $64; // application + constructed
+ {$EXTERNALSYM LDAP_RES_SEARCH_RESULT}
+ LDAP_RES_SEARCH_RESULT = $65; // application + constructed
+ {$EXTERNALSYM LDAP_RES_MODIFY}
+ LDAP_RES_MODIFY = $67; // application + constructed
+ {$EXTERNALSYM LDAP_RES_ADD}
+ LDAP_RES_ADD = $69; // application + constructed
+ {$EXTERNALSYM LDAP_RES_DELETE}
+ LDAP_RES_DELETE = $6b; // application + constructed
+ {$EXTERNALSYM LDAP_RES_MODRDN}
+ LDAP_RES_MODRDN = $6d; // application + constructed
+ {$EXTERNALSYM LDAP_RES_COMPARE}
+ LDAP_RES_COMPARE = $6f; // application + constructed
+ {$EXTERNALSYM LDAP_RES_SESSION}
+ LDAP_RES_SESSION = $72; // application + constructed
+ {$EXTERNALSYM LDAP_RES_REFERRAL}
+ LDAP_RES_REFERRAL = $73; // application + constructed
+ {$EXTERNALSYM LDAP_RES_EXTENDED}
+ LDAP_RES_EXTENDED = $78; // application + constructed
+ {$EXTERNALSYM LDAP_RES_ANY}
+ LDAP_RES_ANY = -1;
+
+ {$EXTERNALSYM LDAP_INVALID_CMD}
+ LDAP_INVALID_CMD = $FF;
+ {$EXTERNALSYM LDAP_INVALID_RES}
+ LDAP_INVALID_RES = $FF;
+
+//
+// We'll make the error codes compatible with reference implementation
+//
+
+type
+ {$EXTERNALSYM LDAP_RETCODE}
+ LDAP_RETCODE = ULONG;
+
+const
+ {$EXTERNALSYM LDAP_SUCCESS}
+ LDAP_SUCCESS = $00;
+ {$EXTERNALSYM LDAP_OPERATIONS_ERROR}
+ LDAP_OPERATIONS_ERROR = $01;
+ {$EXTERNALSYM LDAP_PROTOCOL_ERROR}
+ LDAP_PROTOCOL_ERROR = $02;
+ {$EXTERNALSYM LDAP_TIMELIMIT_EXCEEDED}
+ LDAP_TIMELIMIT_EXCEEDED = $03;
+ {$EXTERNALSYM LDAP_SIZELIMIT_EXCEEDED}
+ LDAP_SIZELIMIT_EXCEEDED = $04;
+ {$EXTERNALSYM LDAP_COMPARE_FALSE}
+ LDAP_COMPARE_FALSE = $05;
+ {$EXTERNALSYM LDAP_COMPARE_TRUE}
+ LDAP_COMPARE_TRUE = $06;
+ {$EXTERNALSYM LDAP_AUTH_METHOD_NOT_SUPPORTED}
+ LDAP_AUTH_METHOD_NOT_SUPPORTED = $07;
+ {$EXTERNALSYM LDAP_STRONG_AUTH_REQUIRED}
+ LDAP_STRONG_AUTH_REQUIRED = $08;
+ {$EXTERNALSYM LDAP_REFERRAL_V2}
+ LDAP_REFERRAL_V2 = $09;
+ {$EXTERNALSYM LDAP_PARTIAL_RESULTS}
+ LDAP_PARTIAL_RESULTS = $09;
+ {$EXTERNALSYM LDAP_REFERRAL}
+ LDAP_REFERRAL = $0a;
+ {$EXTERNALSYM LDAP_ADMIN_LIMIT_EXCEEDED}
+ LDAP_ADMIN_LIMIT_EXCEEDED = $0b;
+ {$EXTERNALSYM LDAP_UNAVAILABLE_CRIT_EXTENSION}
+ LDAP_UNAVAILABLE_CRIT_EXTENSION = $0c;
+ {$EXTERNALSYM LDAP_CONFIDENTIALITY_REQUIRED}
+ LDAP_CONFIDENTIALITY_REQUIRED = $0d;
+ {$EXTERNALSYM LDAP_SASL_BIND_IN_PROGRESS}
+ LDAP_SASL_BIND_IN_PROGRESS = $0e;
+
+ {$EXTERNALSYM LDAP_NO_SUCH_ATTRIBUTE}
+ LDAP_NO_SUCH_ATTRIBUTE = $10;
+ {$EXTERNALSYM LDAP_UNDEFINED_TYPE}
+ LDAP_UNDEFINED_TYPE = $11;
+ {$EXTERNALSYM LDAP_INAPPROPRIATE_MATCHING}
+ LDAP_INAPPROPRIATE_MATCHING = $12;
+ {$EXTERNALSYM LDAP_CONSTRAINT_VIOLATION}
+ LDAP_CONSTRAINT_VIOLATION = $13;
+ {$EXTERNALSYM LDAP_ATTRIBUTE_OR_VALUE_EXISTS}
+ LDAP_ATTRIBUTE_OR_VALUE_EXISTS = $14;
+ {$EXTERNALSYM LDAP_INVALID_SYNTAX}
+ LDAP_INVALID_SYNTAX = $15;
+
+ {$EXTERNALSYM LDAP_NO_SUCH_OBJECT}
+ LDAP_NO_SUCH_OBJECT = $20;
+ {$EXTERNALSYM LDAP_ALIAS_PROBLEM}
+ LDAP_ALIAS_PROBLEM = $21;
+ {$EXTERNALSYM LDAP_INVALID_DN_SYNTAX}
+ LDAP_INVALID_DN_SYNTAX = $22;
+ {$EXTERNALSYM LDAP_IS_LEAF}
+ LDAP_IS_LEAF = $23;
+ {$EXTERNALSYM LDAP_ALIAS_DEREF_PROBLEM}
+ LDAP_ALIAS_DEREF_PROBLEM = $24;
+
+ {$EXTERNALSYM LDAP_INAPPROPRIATE_AUTH}
+ LDAP_INAPPROPRIATE_AUTH = $30;
+ {$EXTERNALSYM LDAP_INVALID_CREDENTIALS}
+ LDAP_INVALID_CREDENTIALS = $31;
+ {$EXTERNALSYM LDAP_INSUFFICIENT_RIGHTS}
+ LDAP_INSUFFICIENT_RIGHTS = $32;
+ {$EXTERNALSYM LDAP_BUSY}
+ LDAP_BUSY = $33;
+ {$EXTERNALSYM LDAP_UNAVAILABLE}
+ LDAP_UNAVAILABLE = $34;
+ {$EXTERNALSYM LDAP_UNWILLING_TO_PERFORM}
+ LDAP_UNWILLING_TO_PERFORM = $35;
+ {$EXTERNALSYM LDAP_LOOP_DETECT}
+ LDAP_LOOP_DETECT = $36;
+
+ {$EXTERNALSYM LDAP_NAMING_VIOLATION}
+ LDAP_NAMING_VIOLATION = $40;
+ {$EXTERNALSYM LDAP_OBJECT_CLASS_VIOLATION}
+ LDAP_OBJECT_CLASS_VIOLATION = $41;
+ {$EXTERNALSYM LDAP_NOT_ALLOWED_ON_NONLEAF}
+ LDAP_NOT_ALLOWED_ON_NONLEAF = $42;
+ {$EXTERNALSYM LDAP_NOT_ALLOWED_ON_RDN}
+ LDAP_NOT_ALLOWED_ON_RDN = $43;
+ {$EXTERNALSYM LDAP_ALREADY_EXISTS}
+ LDAP_ALREADY_EXISTS = $44;
+ {$EXTERNALSYM LDAP_NO_OBJECT_CLASS_MODS}
+ LDAP_NO_OBJECT_CLASS_MODS = $45;
+ {$EXTERNALSYM LDAP_RESULTS_TOO_LARGE}
+ LDAP_RESULTS_TOO_LARGE = $46;
+ {$EXTERNALSYM LDAP_AFFECTS_MULTIPLE_DSAS}
+ LDAP_AFFECTS_MULTIPLE_DSAS = $47;
+
+ {$EXTERNALSYM LDAP_OTHER}
+ LDAP_OTHER = $50;
+ {$EXTERNALSYM LDAP_SERVER_DOWN}
+ LDAP_SERVER_DOWN = $51;
+ {$EXTERNALSYM LDAP_LOCAL_ERROR}
+ LDAP_LOCAL_ERROR = $52;
+ {$EXTERNALSYM LDAP_ENCODING_ERROR}
+ LDAP_ENCODING_ERROR = $53;
+ {$EXTERNALSYM LDAP_DECODING_ERROR}
+ LDAP_DECODING_ERROR = $54;
+ {$EXTERNALSYM LDAP_TIMEOUT}
+ LDAP_TIMEOUT = $55;
+ {$EXTERNALSYM LDAP_AUTH_UNKNOWN}
+ LDAP_AUTH_UNKNOWN = $56;
+ {$EXTERNALSYM LDAP_FILTER_ERROR}
+ LDAP_FILTER_ERROR = $57;
+ {$EXTERNALSYM LDAP_USER_CANCELLED}
+ LDAP_USER_CANCELLED = $58;
+ {$EXTERNALSYM LDAP_PARAM_ERROR}
+ LDAP_PARAM_ERROR = $59;
+ {$EXTERNALSYM LDAP_NO_MEMORY}
+ LDAP_NO_MEMORY = $5a;
+ {$EXTERNALSYM LDAP_CONNECT_ERROR}
+ LDAP_CONNECT_ERROR = $5b;
+ {$EXTERNALSYM LDAP_NOT_SUPPORTED}
+ LDAP_NOT_SUPPORTED = $5c;
+ {$EXTERNALSYM LDAP_NO_RESULTS_RETURNED}
+ LDAP_NO_RESULTS_RETURNED = $5e;
+ {$EXTERNALSYM LDAP_CONTROL_NOT_FOUND}
+ LDAP_CONTROL_NOT_FOUND = $5d;
+ {$EXTERNALSYM LDAP_MORE_RESULTS_TO_RETURN}
+ LDAP_MORE_RESULTS_TO_RETURN = $5f;
+
+ {$EXTERNALSYM LDAP_CLIENT_LOOP}
+ LDAP_CLIENT_LOOP = $60;
+ {$EXTERNALSYM LDAP_REFERRAL_LIMIT_EXCEEDED}
+ LDAP_REFERRAL_LIMIT_EXCEEDED = $61;
+
+//
+// Bind methods. We support the following methods :
+//
+// Simple Clear text password... try not to use as it's not secure.
+//
+// MSN MSN(Microsoft Network)authentication. This package
+// may bring up UI to prompt the user for MSN credentials.
+//
+// DPA Normandy authentication... new MSN authentication. Same
+// usage as MSN.
+//
+// NTLM NT domain authentication. Use NULL credentials and
+// we'll try to use default logged in user credentials.
+//
+// Sicily Negotiate with the server for any of: MSN, DPA, NTLM
+//
+// SSPI Use GSSAPI Negotiate package to negotiate security
+// package of either Kerberos v5 or NTLM(or any other
+// package the client and server negotiate). Pass in
+// NULL credentials to specify default logged in user or
+// you may pass in a SEC_WINNT_AUTH_IDENTITY_W(defined
+// in rpcdce.h)to specify alternate credentials.
+//
+// For all bind methods except for Simple, you may pass in a
+// SEC_WINNT_AUTH_IDENTITY_W (defined in rpcdce.h) or the newer
+// SEC_WINNT_AUTH_IDENTITY_EXW (defined in secext.h) to specify alternate
+// credentials.
+//
+// All bind methods other than simple are synchronous only calls.
+// Calling the asynchronous bind call for any of these messages will
+// return LDAP_PARAM_ERROR.
+//
+// Using any other method besides simple will cause WLDAP32 to pull in
+// the SSPI security DLLs(SECURITY.DLL etc).
+//
+// On NTLM and SSPI, if you specify NULL credentials, we'll attempt to use
+// the default logged in user.
+//
+
+const
+ {$EXTERNALSYM LDAP_AUTH_SIMPLE}
+ LDAP_AUTH_SIMPLE = $80;
+ {$EXTERNALSYM LDAP_AUTH_SASL}
+ LDAP_AUTH_SASL = $83;
+
+ {$EXTERNALSYM LDAP_AUTH_OTHERKIND}
+ LDAP_AUTH_OTHERKIND = $86;
+
+// The SICILY type covers package negotiation to MSN servers.
+// Each of the supported types can also be specified without
+// doing the package negotiation, assuming the caller knows
+// what the server supports.
+
+ {$EXTERNALSYM LDAP_AUTH_SICILY}
+ LDAP_AUTH_SICILY = LDAP_AUTH_OTHERKIND or $0200;
+
+ {$EXTERNALSYM LDAP_AUTH_MSN}
+ LDAP_AUTH_MSN = LDAP_AUTH_OTHERKIND or $0800;
+ {$EXTERNALSYM LDAP_AUTH_NTLM}
+ LDAP_AUTH_NTLM = LDAP_AUTH_OTHERKIND or $1000;
+ {$EXTERNALSYM LDAP_AUTH_DPA}
+ LDAP_AUTH_DPA = LDAP_AUTH_OTHERKIND or $2000;
+
+// This will cause the client to use the GSSAPI negotiation
+// package to determine the most appropriate authentication type.
+// This type should be used when talking to NT5.
+
+ {$EXTERNALSYM LDAP_AUTH_NEGOTIATE}
+ LDAP_AUTH_NEGOTIATE = LDAP_AUTH_OTHERKIND or $0400;
+
+// backward compatible #define for older constant name.
+
+ {$EXTERNALSYM LDAP_AUTH_SSPI}
+ LDAP_AUTH_SSPI = LDAP_AUTH_NEGOTIATE;
+
+//
+// Client applications typically don't have to encode/decode LDAP filters,
+// but if they do, we define the operators here.
+//
+// Filter types.
+
+ {$EXTERNALSYM LDAP_FILTER_AND}
+ LDAP_FILTER_AND = $a0; // context specific + constructed - SET OF Filters.
+ {$EXTERNALSYM LDAP_FILTER_OR}
+ LDAP_FILTER_OR = $a1; // context specific + constructed - SET OF Filters.
+ {$EXTERNALSYM LDAP_FILTER_NOT}
+ LDAP_FILTER_NOT = $a2; // context specific + constructed - Filter
+ {$EXTERNALSYM LDAP_FILTER_EQUALITY}
+ LDAP_FILTER_EQUALITY = $a3; // context specific + constructed - AttributeValueAssertion.
+ {$EXTERNALSYM LDAP_FILTER_SUBSTRINGS}
+ LDAP_FILTER_SUBSTRINGS = $a4; // context specific + constructed - SubstringFilter
+ {$EXTERNALSYM LDAP_FILTER_GE}
+ LDAP_FILTER_GE = $a5; // context specific + constructed - AttributeValueAssertion.
+ {$EXTERNALSYM LDAP_FILTER_LE}
+ LDAP_FILTER_LE = $a6; // context specific + constructed - AttributeValueAssertion.
+ {$EXTERNALSYM LDAP_FILTER_PRESENT}
+ LDAP_FILTER_PRESENT = $87; // context specific + primitive - AttributeType.
+ {$EXTERNALSYM LDAP_FILTER_APPROX}
+ LDAP_FILTER_APPROX = $a8; // context specific + constructed - AttributeValueAssertion.
+ {$EXTERNALSYM LDAP_FILTER_EXTENSIBLE}
+ LDAP_FILTER_EXTENSIBLE = $a9; // context specific + constructed - MatchingRuleAssertion.
+
+// Substring filter types
+
+ {$EXTERNALSYM LDAP_SUBSTRING_INITIAL}
+ LDAP_SUBSTRING_INITIAL = $80; // class context specific
+ {$EXTERNALSYM LDAP_SUBSTRING_ANY}
+ LDAP_SUBSTRING_ANY = $81; // class context specific
+ {$EXTERNALSYM LDAP_SUBSTRING_FINAL}
+ LDAP_SUBSTRING_FINAL = $82; // class context specific
+
+//
+// Possible values for ld_deref field.
+// "Never" - never deref aliases. return only the alias.
+// "Searching" - only deref aliases when searching, not when locating
+// the base object of a search.
+// "Finding" - dereference the alias when locating the base object but
+// not during a search.
+// "Always" - always dereference aliases.
+//
+
+ {$EXTERNALSYM LDAP_DEREF_NEVER}
+ LDAP_DEREF_NEVER = 0;
+ {$EXTERNALSYM LDAP_DEREF_SEARCHING}
+ LDAP_DEREF_SEARCHING = 1;
+ {$EXTERNALSYM LDAP_DEREF_FINDING}
+ LDAP_DEREF_FINDING = 2;
+ {$EXTERNALSYM LDAP_DEREF_ALWAYS}
+ LDAP_DEREF_ALWAYS = 3;
+
+// Special values for ld_sizelimit :
+
+ {$EXTERNALSYM LDAP_NO_LIMIT}
+ LDAP_NO_LIMIT = 0;
+
+// Flags for ld_options field :
+
+ {$EXTERNALSYM LDAP_OPT_DNS}
+ LDAP_OPT_DNS = $00000001; // utilize DN & DNS
+ {$EXTERNALSYM LDAP_OPT_CHASE_REFERRALS}
+ LDAP_OPT_CHASE_REFERRALS = $00000002; // chase referrals
+ {$EXTERNALSYM LDAP_OPT_RETURN_REFS}
+ LDAP_OPT_RETURN_REFS = $00000004; // return referrals to calling app
+
+//
+// LDAP structure per connection
+//
+
+{$HPPEMIT '#pragma pack(push, 4)'}
+{$ALIGN ON}
+
+type
+ {$EXTERNALSYM PLDAP}
+ PLDAP = ^LDAP;
+ {$EXTERNALSYM LDAP}
+ LDAP = record
+
+ ld_sb: record
+ sb_sd: ULONG;
+ Reserved1: array [0..10*SizeOf(ULONG)] of Byte;
+ sb_naddr: ULONG; // notzero implies CLDAP available
+ Reserved2: array [0..6*SizeOf(ULONG)-1] of Byte;
+ end;
+
+ //
+ // Following parameters MAY match up to reference implementation of LDAP
+ //
+
+ ld_host: PChar;
+ ld_version: ULONG;
+ ld_lberoptions: Byte;
+
+ //
+ // Safe to assume that these parameters are in same location as
+ // reference implementation of LDAP API.
+ //
+
+ ld_deref: ULONG;
+
+ ld_timelimit: ULONG;
+ ld_sizelimit: ULONG;
+
+ ld_errno: ULONG;
+ ld_matched: PChar;
+ ld_error: PChar;
+ ld_msgid: ULONG;
+
+ Reserved3: array [0..6*SizeOf(ULONG)] of Byte;
+
+ //
+ // Following parameters may match up to reference implementation of LDAP API.
+ //
+
+ ld_cldaptries: ULONG;
+ ld_cldaptimeout: ULONG;
+ ld_refhoplimit: ULONG;
+ ld_options: ULONG;
+ end;
+
+//
+// Our timeval structure is a bit different from the reference implementation
+// since Win32 defines a _timeval structure that is different from the LDAP
+// one.
+//
+
+ PLDAPTimeVal = ^TLDAPTimeVal;
+ {$EXTERNALSYM l_timeval}
+ l_timeval = packed record
+ tv_sec: Longint;
+ tv_usec: Longint;
+ end;
+ {$EXTERNALSYM LDAP_TIMEVAL}
+ LDAP_TIMEVAL = l_timeval;
+ {$EXTERNALSYM PLDAP_TIMEVAL}
+ PLDAP_TIMEVAL = ^LDAP_TIMEVAL;
+ TLDAPTimeVal = l_timeval;
+
+//
+// The berval structure is used to pass in any arbitrary octet string. It
+// is useful for attributes that cannot be represented using a null
+// terminated string.
+//
+
+ PLDAPBerVal = ^TLDAPBerVal;
+ PPLDAPBerVal = ^PLDAPBerVal;
+ {$EXTERNALSYM PLDAP_BERVAL}
+ PLDAP_BERVAL = ^berval;
+ {$EXTERNALSYM PBERVAL}
+ PBERVAL = ^berval;
+ {$EXTERNALSYM berval}
+ berval = record
+ bv_len: ULONG;
+ bv_val: PChar;
+ end;
+ {$EXTERNALSYM LDAP_BERVAL}
+ LDAP_BERVAL = berval;
+ TLDAPBerVal = berval;
+
+//
+// The following structure has to be compatible with reference implementation.
+//
+
+ PPLDAPMessage = ^PLDAPMessage;
+ {$EXTERNALSYM PLDAPMessage}
+ PLDAPMessage = ^LDAPMessage;
+ {$EXTERNALSYM ldapmsg}
+ ldapmsg = record
+ lm_msgid: ULONG; // message number for given connection
+ lm_msgtype: ULONG; // message type of the form LDAP_RES_xxx
+
+ lm_ber: Pointer; // ber form of message
+
+ lm_chain: PLDAPMessage; // pointer to next result value
+ lm_next: PLDAPMessage; // pointer to next message
+ lm_time: ULONG;
+
+ //
+ // new fields below not in reference implementation
+ //
+
+ Connection: PLDAP; // connection from which we received response
+ Request: Pointer; // owning request(opaque structure)
+ lm_returncode: ULONG; // server's return code
+ lm_referral: Word; // index of referral within ref table
+ lm_chased: ByteBool; // has referral been chased already?
+ lm_eom: ByteBool; // is this the last entry for this message?
+ ConnectionReferenced: ByteBool; // is the Connection still valid?
+ end;
+ {$EXTERNALSYM LDAPMessage}
+ LDAPMessage = ldapmsg;
+
+//
+// Controls... there are three types :
+//
+// 1) those passed to the server
+// 2) those passed to the client and handled by the client API
+// 3) those returned by the server
+//
+
+// Extra types defined for use as parameter.
+ PPPLDAPControlA = ^PPLDAPControlA;
+ {$NODEFINE PPPLDAPControlA}
+ PPPLDAPControlW = ^PPLDAPControlW;
+ {$NODEFINE PPPLDAPControlW}
+ PPPLDAPControl = PPPLDAPControlA;
+ PPLDAPControlA = ^PLDAPControlA;
+ {$NODEFINE PPLDAPControlA}
+ PPLDAPControlW = ^PLDAPControlW;
+ {$NODEFINE PPLDAPControlW}
+ PPLDAPControl = PPLDAPControlA;
+
+ {$EXTERNALSYM PLDAPControlA}
+ PLDAPControlA = ^LDAPControlA;
+ {$EXTERNALSYM PLDAPControlW}
+ PLDAPControlW = ^LDAPControlW;
+ {$EXTERNALSYM PLDAPControl}
+ PLDAPControl = PLDAPControlA;
+
+ {$EXTERNALSYM LDAPControlA}
+ LDAPControlA = record
+ ldctl_oid: PAnsiChar;
+ ldctl_value: TLDAPBerVal;
+ ldctl_iscritical: ByteBool;
+ end;
+ {$EXTERNALSYM LDAPControlW}
+ LDAPControlW = record
+ ldctl_oid: PWideChar;
+ ldctl_value: TLDAPBerVal;
+ ldctl_iscritical: ByteBool;
+ end;
+ {$EXTERNALSYM LDAPControl}
+ LDAPControl = LDAPControlA;
+
+ TLDAPControlA = LDAPControlA;
+ TLDAPControlW = LDAPControlW;
+ TLDAPControl = TLDAPControlA;
+
+//
+// Client controls section : these are the client controls that wldap32.dll
+// supports.
+//
+// If you specify LDAP_CONTROL_REFERRALS in a control, the value field should
+// point to a ULONG of the following flags :
+//
+// LDAP_CHASE_SUBORDINATE_REFERRALS
+// LDAP_CHASE_EXTERNAL_REFERRALS
+//
+const
+ {$EXTERNALSYM LDAP_CONTROL_REFERRALS_W}
+ LDAP_CONTROL_REFERRALS_W = '1.2.840.113556.1.4.616';
+ {$EXTERNALSYM LDAP_CONTROL_REFERRALS}
+ LDAP_CONTROL_REFERRALS = '1.2.840.113556.1.4.616';
+
+//
+// Values required for Modification command These are options for the
+// mod_op field of LDAPMod structure
+//
+
+const
+ {$EXTERNALSYM LDAP_MOD_ADD}
+ LDAP_MOD_ADD = $00;
+ {$EXTERNALSYM LDAP_MOD_DELETE}
+ LDAP_MOD_DELETE = $01;
+ {$EXTERNALSYM LDAP_MOD_REPLACE}
+ LDAP_MOD_REPLACE = $02;
+ {$EXTERNALSYM LDAP_MOD_BVALUES}
+ LDAP_MOD_BVALUES = $80;
+
+type
+ {$EXTERNALSYM PLDAPModA}
+ PLDAPModA = ^LDAPModA;
+ {$EXTERNALSYM PLDAPModW}
+ PLDAPModW = ^LDAPModW;
+ {$EXTERNALSYM PLDAPMod}
+ PLDAPMod = PLDAPModA;
+ {$EXTERNALSYM LDAPModA}
+ LDAPModA = record
+ mod_op: ULONG;
+ mod_type: PAnsiChar;
+ case integer of
+ 0:(modv_strvals: ^PAnsiChar);
+ 1:(modv_bvals: ^PLDAPBerVal);
+ end;
+ {$EXTERNALSYM LDAPModW}
+ LDAPModW = record
+ mod_op: ULONG;
+ mod_type: PWideChar;
+ case integer of
+ 0:(modv_strvals: ^PWideChar);
+ 1:(modv_bvals: ^PLDAPBerVal);
+ end;
+ {$EXTERNALSYM LDAPMod}
+ LDAPMod = LDAPModA;
+ TLDAPModA = LDAPModA;
+ TLDAPModW = LDAPModW;
+ TLDAPMod = TLDAPModA;
+
+{$HPPEMIT '#pragma pack(pop)'}
+
+//
+// macros compatible with reference implementation...
+//
+
+{$EXTERNALSYM LDAP_IS_CLDAP}
+function LDAP_IS_CLDAP(ld: PLDAP): Boolean;
+{$EXTERNALSYM NAME_ERROR}
+function NAME_ERROR(n: Integer): Boolean;
+
+//
+// function definitions for LDAP API
+//
+
+//
+// Create a connection block to an LDAP server. HostName can be NULL, in
+// which case we'll try to go off and find the "default" LDAP server.
+//
+// Note that if we have to go off and find the default server, we'll pull
+// in NETAPI32.DLL and ADVAPI32.DLL.
+//
+// If it returns NULL, an error occurred. Pick up error code with
+// GetLastError().
+//
+// ldap_open actually opens the connection at the time of the call,
+// whereas ldap_init only opens the connection when an operation is performed
+// that requires it.
+
+{$EXTERNALSYM ldap_openA}
+function ldap_openA(HostName: PAnsiChar; PortNumber: ULONG): PLDAP; cdecl;
+{$EXTERNALSYM ldap_openW}
+function ldap_openW(HostName: PWideChar; PortNumber: ULONG): PLDAP; cdecl;
+{$EXTERNALSYM ldap_open}
+function ldap_open(HostName: PChar; PortNumber: ULONG): PLDAP; cdecl;
+
+{$EXTERNALSYM ldap_initA}
+function ldap_initA(HostName: PAnsiChar; PortNumber: ULONG): PLDAP; cdecl;
+{$EXTERNALSYM ldap_initW}
+function ldap_initW(HostName: PWideChar; PortNumber: ULONG): PLDAP; cdecl;
+{$EXTERNALSYM ldap_init}
+function ldap_init(HostName: PChar; PortNumber: ULONG): PLDAP; cdecl;
+
+{$EXTERNALSYM ldap_sslinitA}
+function ldap_sslinitA(HostName: PAnsiChar; PortNumber: ULONG; secure: integer): PLDAP; cdecl;
+{$EXTERNALSYM ldap_sslinitW}
+function ldap_sslinitW(HostName: PWideChar; PortNumber: ULONG; secure: integer): PLDAP; cdecl;
+{$EXTERNALSYM ldap_sslinit}
+function ldap_sslinit(HostName: PChar; PortNumber: ULONG; secure: integer): PLDAP; cdecl;
+
+//
+// when calling ldap_init, you can call ldap_connect explicitly to have the
+// library contact the server. This is useful for checking for server
+// availability. This call is not required however, since the other functions
+// will call it internally if it hasn't already been called.
+//
+
+{$EXTERNALSYM ldap_connect}
+function ldap_connect(ld: PLDAP; timeout: PLDAPTimeval): ULONG; cdecl;
+
+//
+// This is similar to ldap_open except it creates a connection block for
+// UDP based Connectionless LDAP services. No TCP session is maintained.
+//
+// If it returns NULL, an error occurred. Pick up error code with
+// GetLastError().
+//
+
+{$EXTERNALSYM cldap_openA}
+function cldap_openA(HostName: PAnsiChar; PortNumber: ULONG): PLDAP; cdecl;
+{$EXTERNALSYM cldap_openW}
+function cldap_openW(HostName: PWideChar; PortNumber: ULONG): PLDAP; cdecl;
+{$EXTERNALSYM cldap_open}
+function cldap_open(HostName: PChar; PortNumber: ULONG): PLDAP; cdecl;
+
+//
+// Call unbind when you're done with the connection, it will free all
+// resources associated with the connection.
+//
+// There is no ldap_close... use ldap_unbind even if you haven't called
+// ldap_bind on the connection.
+//
+
+{$EXTERNALSYM ldap_unbind}
+function ldap_unbind(ld: PLDAP): ULONG; cdecl;
+{$EXTERNALSYM ldap_unbind_s}
+function ldap_unbind_s(ld: PLDAP): ULONG; cdecl; // calls ldap_unbind
+
+//
+// Calls to get and set options on connection blocks... use them rather
+// than modifying the LDAP block directly.
+//
+
+{$EXTERNALSYM ldap_get_option}
+function ldap_get_option(ld: PLDAP; option: integer; outvalue: pointer): ULONG; cdecl;
+{$EXTERNALSYM ldap_get_optionW}
+function ldap_get_optionW(ld: PLDAP; option: integer; outvalue: pointer): ULONG; cdecl;
+{$EXTERNALSYM ldap_set_option}
+function ldap_set_option(ld: PLDAP; option: integer; invalue: pointer): ULONG; cdecl;
+{$EXTERNALSYM ldap_set_optionW}
+function ldap_set_optionW(ld: PLDAP; option: integer; invalue: pointer): ULONG; cdecl;
+
+//
+// These are the values to pass to ldap_get/set_option :
+//
+
+const
+ {$EXTERNALSYM LDAP_OPT_DESC}
+ LDAP_OPT_DESC = $01;
+ {$EXTERNALSYM LDAP_OPT_DEREF}
+ LDAP_OPT_DEREF = $02;
+ {$EXTERNALSYM LDAP_OPT_SIZELIMIT}
+ LDAP_OPT_SIZELIMIT = $03;
+ {$EXTERNALSYM LDAP_OPT_TIMELIMIT}
+ LDAP_OPT_TIMELIMIT = $04;
+ {$EXTERNALSYM LDAP_OPT_THREAD_FN_PTRS}
+ LDAP_OPT_THREAD_FN_PTRS = $05;
+ {$EXTERNALSYM LDAP_OPT_REBIND_FN}
+ LDAP_OPT_REBIND_FN = $06;
+ {$EXTERNALSYM LDAP_OPT_REBIND_ARG}
+ LDAP_OPT_REBIND_ARG = $07;
+ {$EXTERNALSYM LDAP_OPT_REFERRALS}
+ LDAP_OPT_REFERRALS = $08;
+ {$EXTERNALSYM LDAP_OPT_RESTART}
+ LDAP_OPT_RESTART = $09;
+
+ LDAP_OPT_SSL = $0a;
+ {$EXTERNALSYM LDAP_OPT_IO_FN_PTRS}
+ LDAP_OPT_IO_FN_PTRS = $0b;
+ {$EXTERNALSYM LDAP_OPT_CACHE_FN_PTRS}
+ LDAP_OPT_CACHE_FN_PTRS = $0d;
+ {$EXTERNALSYM LDAP_OPT_CACHE_STRATEGY}
+ LDAP_OPT_CACHE_STRATEGY = $0e;
+ {$EXTERNALSYM LDAP_OPT_CACHE_ENABLE}
+ LDAP_OPT_CACHE_ENABLE = $0f;
+ {$EXTERNALSYM LDAP_OPT_REFERRAL_HOP_LIMIT}
+ LDAP_OPT_REFERRAL_HOP_LIMIT = $10;
+
+ {$EXTERNALSYM LDAP_OPT_PROTOCOL_VERSION}
+ LDAP_OPT_PROTOCOL_VERSION = $11;
+ {$EXTERNALSYM LDAP_OPT_VERSION}
+ LDAP_OPT_VERSION = $11;
+ {$EXTERNALSYM LDAP_OPT_SORTKEYS}
+ LDAP_OPT_SORTKEYS = $11;
+
+//
+// These are new ones that we've defined, not in current RFC draft.
+//
+
+ {$EXTERNALSYM LDAP_OPT_HOST_NAME}
+ LDAP_OPT_HOST_NAME = $30;
+ {$EXTERNALSYM LDAP_OPT_ERROR_NUMBER}
+ LDAP_OPT_ERROR_NUMBER = $31;
+ {$EXTERNALSYM LDAP_OPT_ERROR_STRING}
+ LDAP_OPT_ERROR_STRING = $32;
+ {$EXTERNALSYM LDAP_OPT_SERVER_ERROR}
+ LDAP_OPT_SERVER_ERROR = $33;
+ {$EXTERNALSYM LDAP_OPT_SERVER_EXT_ERROR}
+ LDAP_OPT_SERVER_EXT_ERROR = $34;
+ {$EXTERNALSYM LDAP_OPT_HOST_REACHABLE}
+ LDAP_OPT_HOST_REACHABLE = $3E;
+
+//
+// These options control the keep-alive logic. Keep alives are sent as
+// ICMP ping messages (which currently don't go through firewalls).
+//
+// There are three values that control how this works :
+// PING_KEEP_ALIVE : min number of seconds since we last received a response
+// from the server before we send a keep-alive ping
+// PING_WAIT_TIME : number of milliseconds we wait for the response to
+// come back when we send a ping
+// PING_LIMIT : number of unanswered pings we send before we close the
+// connection.
+//
+// To disable the keep-alive logic, set any of the values (PING_KEEP_ALIVE,
+// PING_LIMIT, or PING_WAIT_TIME) to zero.
+//
+// The current default/min/max for these values are as follows :
+//
+// PING_KEEP_ALIVE : 120/5/maxInt seconds (may also be zero)
+// PING_WAIT_TIME : 2000/10/60000 milliseconds (may also be zero)
+// PING_LIMIT : 4/0/maxInt
+//
+
+ {$EXTERNALSYM LDAP_OPT_PING_KEEP_ALIVE}
+ LDAP_OPT_PING_KEEP_ALIVE = $36;
+ {$EXTERNALSYM LDAP_OPT_PING_WAIT_TIME}
+ LDAP_OPT_PING_WAIT_TIME = $37;
+ {$EXTERNALSYM LDAP_OPT_PING_LIMIT}
+ LDAP_OPT_PING_LIMIT = $38;
+
+//
+// These won't be in the RFC. Only use these if you're going to be dependent
+// on our implementation.
+//
+
+ {$EXTERNALSYM LDAP_OPT_DNSDOMAIN_NAME}
+ LDAP_OPT_DNSDOMAIN_NAME = $3B; // return DNS name of domain
+ {$EXTERNALSYM LDAP_OPT_GETDSNAME_FLAGS}
+ LDAP_OPT_GETDSNAME_FLAGS = $3D; // flags for DsGetDcName
+
+ {$EXTERNALSYM LDAP_OPT_PROMPT_CREDENTIALS}
+ LDAP_OPT_PROMPT_CREDENTIALS = $3F; // prompt for creds? currently
+ // only for DPA & NTLM if no creds
+ // are loaded
+
+ {$EXTERNALSYM LDAP_OPT_AUTO_RECONNECT}
+ LDAP_OPT_AUTO_RECONNECT = $91; // enable/disable autoreconnect
+ {$EXTERNALSYM LDAP_OPT_SSPI_FLAGS}
+ LDAP_OPT_SSPI_FLAGS = $92; // flags to pass to InitSecurityContext
+
+//
+// To retrieve information on an secure connection, a pointer to a
+// SecPkgContext_connectionInfo structure (defined in schnlsp.h) must be
+// passed in. On success, it is filled with relevent security information.
+//
+
+ {$EXTERNALSYM LDAP_OPT_SSL_INFO}
+ LDAP_OPT_SSL_INFO = $93;
+
+//
+// Turing on either the sign or the encrypt option prior to binding using
+// LDAP_AUTH_NEGOTIATE will result in the ensuing LDAP session to be signed
+// or encrypted using either Kerberos or NTLM (as negotiated by the underlying
+// security packages). Note that these options can't be used with SSL.
+//
+
+ {$EXTERNALSYM LDAP_OPT_SIGN}
+ LDAP_OPT_SIGN = $95;
+ {$EXTERNALSYM LDAP_OPT_ENCRYPT}
+ LDAP_OPT_ENCRYPT = $96;
+
+//
+// The user can set a preferred SASL method prior to binding using LDAP_AUTH_NEGOTIATE
+// We will try to use this mechanism while binding. One example is "GSSAPI".
+//
+
+ {$EXTERNALSYM LDAP_OPT_SASL_METHOD}
+ LDAP_OPT_SASL_METHOD = $97;
+
+//
+// Setting this option to LDAP_OPT_ON will instruct the library to only perform an
+// A-Record DNS lookup on the supplied host string. This option is OFF by default.
+//
+
+ {$EXTERNALSYM LDAP_OPT_AREC_EXCLUSIVE}
+ LDAP_OPT_AREC_EXCLUSIVE = $98;
+
+//
+// Retrieve the security context associated with the connection.
+//
+
+ {$EXTERNALSYM LDAP_OPT_SECURITY_CONTEXT}
+ LDAP_OPT_SECURITY_CONTEXT = $99;
+
+//
+// End of Microsoft only options
+//
+
+ {$EXTERNALSYM LDAP_OPT_ON}
+ LDAP_OPT_ON = Pointer(1);
+ {$EXTERNALSYM LDAP_OPT_OFF}
+ LDAP_OPT_OFF = Pointer(0);
+
+//
+// For chasing referrals, we extend this a bit for LDAP_OPT_REFERRALS. If
+// the value is not LDAP_OPT_ON or LDAP_OPT_OFF, we'll treat them as the
+// following :
+//
+// LDAP_CHASE_SUBORDINATE_REFERRALS : chase subordinate referrals (or
+// references) returned in a v3 search
+// LDAP_CHASE_EXTERNAL_REFERRALS : chase external referrals. These are
+// returned possibly on any operation except bind.
+//
+// If you OR these flags together, it's equivalent to setting referrals to
+// LDAP_OPT_ON.
+//
+
+ {$EXTERNALSYM LDAP_CHASE_SUBORDINATE_REFERRALS}
+ LDAP_CHASE_SUBORDINATE_REFERRALS = $00000020;
+ {$EXTERNALSYM LDAP_CHASE_EXTERNAL_REFERRALS}
+ LDAP_CHASE_EXTERNAL_REFERRALS = $00000040;
+
+//
+// Bind is required as the first operation to v2 servers, not so for v3
+// servers. See above description of authentication methods.
+//
+
+{$EXTERNALSYM ldap_simple_bindA}
+function ldap_simple_bindA(ld: PLDAP; dn, passwd: PAnsiChar): ULONG; cdecl;
+{$EXTERNALSYM ldap_simple_bindW}
+function ldap_simple_bindW(ld: PLDAP; dn, passwd: PWideChar): ULONG; cdecl;
+{$EXTERNALSYM ldap_simple_bind}
+function ldap_simple_bind(ld: PLDAP; dn, passwd: PChar): ULONG; cdecl;
+{$EXTERNALSYM ldap_simple_bind_sA}
+function ldap_simple_bind_sA(ld: PLDAP; dn, passwd: PAnsiChar): ULONG; cdecl;
+{$EXTERNALSYM ldap_simple_bind_sW}
+function ldap_simple_bind_sW(ld: PLDAP; dn, passwd: PWideChar): ULONG; cdecl;
+{$EXTERNALSYM ldap_simple_bind_s}
+function ldap_simple_bind_s(ld: PLDAP; dn, passwd: PChar): ULONG; cdecl;
+
+{$EXTERNALSYM ldap_bindA}
+function ldap_bindA(ld: PLDAP; dn, cred: PAnsiChar; method: ULONG): ULONG; cdecl;
+{$EXTERNALSYM ldap_bindW}
+function ldap_bindW(ld: PLDAP; dn, cred: PWideChar; method: ULONG): ULONG; cdecl;
+{$EXTERNALSYM ldap_bind}
+function ldap_bind(ld: PLDAP; dn, cred: PChar; method: ULONG): ULONG; cdecl;
+{$EXTERNALSYM ldap_bind_sA}
+function ldap_bind_sA(ld: PLDAP; dn, cred: PAnsiChar; method: ULONG): ULONG; cdecl;
+{$EXTERNALSYM ldap_bind_sW}
+function ldap_bind_sW(ld: PLDAP; dn, cred: PWideChar; method: ULONG): ULONG; cdecl;
+{$EXTERNALSYM ldap_bind_s}
+function ldap_bind_s(ld: PLDAP; dn, cred: PChar; method: ULONG): ULONG; cdecl;
+
+// The following functions can be used to pass in any arbitrary credentials
+// to the server. The application must be ready to interpret the response
+// sent back from the server.
+//
+
+{$EXTERNALSYM ldap_sasl_bindA}
+function ldap_sasl_bindA(ExternalHandle: PLDAP; DistName: PAnsiChar;
+ AuthMechanism: PAnsiChar; cred: PBERVAL;
+ var ServerCtrls, ClientCtrls: PLDAPControlA;
+ var MessageNumber: Integer): Integer; cdecl;
+{$EXTERNALSYM ldap_sasl_bindW}
+function ldap_sasl_bindW(ExternalHandle: PLDAP; DistName: PWideChar;
+ AuthMechanism: PWideChar; cred: PBERVAL;
+ var ServerCtrls, ClientCtrls: PLDAPControlW;
+ var MessageNumber: Integer): Integer; cdecl;
+{$EXTERNALSYM ldap_sasl_bind}
+function ldap_sasl_bind(ExternalHandle: PLDAP; DistName: PChar;
+ AuthMechanism: PChar; cred: PBERVAL;
+ var ServerCtrls, ClientCtrls: PLDAPControl;
+ var MessageNumber: Integer): Integer; cdecl;
+
+function ldap_sasl_bind_sA(ExternalHandle: PLDAP; DistName: PAnsiChar;
+ AuthMechanism: PAnsiChar; cred: PBERVAL;
+ var ServerCtrls, ClientCtrls: PLDAPControlA;
+ var ServerData: PBERVAL): Integer; cdecl;
+function ldap_sasl_bind_sW(ExternalHandle: PLDAP; DistName: PWideChar;
+ AuthMechanism: PWideChar; cred: PBERVAL;
+ var ServerCtrls, ClientCtrls: PLDAPControlW;
+ var ServerData: PBERVAL): Integer; cdecl;
+function ldap_sasl_bind_s(ExternalHandle: PLDAP; DistName: PChar;
+ AuthMechanism: PChar; cred: PBERVAL;
+ var ServerCtrls, ClientCtrls: PLDAPControl;
+ var ServerData: PBERVAL): Integer; cdecl;
+
+//
+// Synchronous and asynch search routines.
+//
+// filter follows RFC 1960 with the addition that '(' ')' '*' ' ' '\' and
+// '\0' are all escaped with '\'
+//
+// Scope of search. This corresponds to the "scope" parameter on search
+
+const
+ {$EXTERNALSYM LDAP_SCOPE_BASE}
+ LDAP_SCOPE_BASE = $00;
+ {$EXTERNALSYM LDAP_SCOPE_ONELEVEL}
+ LDAP_SCOPE_ONELEVEL = $01;
+ {$EXTERNALSYM LDAP_SCOPE_SUBTREE}
+ LDAP_SCOPE_SUBTREE = $02;
+
+{$EXTERNALSYM ldap_searchA}
+function ldap_searchA(
+ ld: PLDAP;
+ base: PAnsiChar; // distinguished name or ''
+ scope: ULONG; // LDAP_SCOPE_xxxx
+ filter: PAnsiChar;
+ attrs: PAnsiChar; // pointer to an array of PAnsiChar attribute names
+ attrsonly: ULONG // boolean on whether to only return attr names
+): ULONG; cdecl;
+{$EXTERNALSYM ldap_searchW}
+function ldap_searchW(
+ ld: PLDAP;
+ base: PWideChar; // distinguished name or ''
+ scope: ULONG; // LDAP_SCOPE_xxxx
+ filter: PWideChar;
+ attrs: PWideChar; // pointer to an array of PAnsiChar attribute names
+ attrsonly: ULONG // boolean on whether to only return attr names
+): ULONG; cdecl;
+{$EXTERNALSYM ldap_search}
+function ldap_search(
+ ld: PLDAP;
+ base: PChar; // distinguished name or ''
+ scope: ULONG; // LDAP_SCOPE_xxxx
+ filter: PChar;
+ attrs: PChar; // pointer to an array of PAnsiChar attribute names
+ attrsonly: ULONG // boolean on whether to only return attr names
+): ULONG; cdecl;
+
+{$EXTERNALSYM ldap_search_sA}
+function ldap_search_sA(ld: PLDAP; base: PAnsiChar; scope: ULONG;
+ filter, attrs: PAnsiChar; attrsonly: ULONG;
+ var res: PLDAPMessage): ULONG; cdecl;
+{$EXTERNALSYM ldap_search_sW}
+function ldap_search_sW(ld: PLDAP; base: PWideChar; scope: ULONG;
+ filter, attrs: PWideChar; attrsonly: ULONG;
+ var res: PLDAPMessage): ULONG; cdecl;
+{$EXTERNALSYM ldap_search_s}
+function ldap_search_s(ld: PLDAP; base: PChar; scope: ULONG;
+ filter, attrs: PChar; attrsonly: ULONG;
+ var res: PLDAPMessage): ULONG; cdecl;
+
+{$EXTERNALSYM ldap_search_stA}
+function ldap_search_stA(ld: PLDAP; base: PAnsiChar; scope: ULONG;
+ filter, attrs: PAnsiChar; attrsonly: ULONG; var timeout: TLDAPTimeVal;
+ var res: PLDAPMessage): ULONG; cdecl;
+{$EXTERNALSYM ldap_search_stW}
+function ldap_search_stW(ld: PLDAP; base: PWideChar; scope: ULONG;
+ filter, attrs: PWideChar; attrsonly: ULONG; var timeout: TLDAPTimeVal;
+ var res: PLDAPMessage): ULONG; cdecl;
+{$EXTERNALSYM ldap_search_st}
+function ldap_search_st(ld: PLDAP; base: PChar; scope: ULONG;
+ filter, attrs: PChar; attrsonly: ULONG; var timeout: TLDAPTimeVal;
+ var res: PLDAPMessage): ULONG; cdecl;
+
+{$EXTERNALSYM ldap_search_extA}
+function ldap_search_extA(ld: PLDAP; base: PAnsiChar; scope: ULONG;
+ filter, attrs: PAnsiChar; attrsonly: ULONG;
+ var ServerControls, ClientControls: PLDAPControlA;
+ TimeLimit, SizeLimit: ULONG; var MessageNumber: ULONG): ULONG; cdecl;
+{$EXTERNALSYM ldap_search_extW}
+function ldap_search_extW(ld: PLDAP; base: PWideChar; scope: ULONG;
+ filter, attrs: PWideChar; attrsonly: ULONG;
+ var ServerControls, ClientControls: PLDAPControlW;
+ TimeLimit, SizeLimit: ULONG; var MessageNumber: ULONG): ULONG; cdecl;
+{$EXTERNALSYM ldap_search_ext}
+function ldap_search_ext(ld: PLDAP; base: PChar; scope: ULONG;
+ filter, attrs: PChar; attrsonly: ULONG;
+ ServerControls, ClientControls: PPLDAPControl;
+ TimeLimit, SizeLimit: ULONG; var MessageNumber: ULONG): ULONG; cdecl;
+
+{$EXTERNALSYM ldap_search_ext_sA}
+function ldap_search_ext_sA(ld: PLDAP; base: PAnsiChar; scope: ULONG;
+ filter, attrs: PAnsiChar; attrsonly: ULONG;
+ var ServerControls, ClientControls: PLDAPControlA;
+ var timeout: TLDAPTimeVal; SizeLimit: ULONG;
+ var res: PLDAPMessage): ULONG; cdecl;
+{$EXTERNALSYM ldap_search_ext_sW}
+function ldap_search_ext_sW(ld: PLDAP; base: PWideChar; scope: ULONG;
+ filter, attrs: PWideChar; attrsonly: ULONG;
+ var ServerControls, ClientControls: PLDAPControlW;
+ var timeout: TLDAPTimeVal; SizeLimit: ULONG;
+ var res: PLDAPMessage): ULONG; cdecl;
+{$EXTERNALSYM ldap_search_ext_s}
+function ldap_search_ext_s(ld: PLDAP; base: PChar; scope: ULONG;
+ filter, attrs: PChar; attrsonly: ULONG;
+ ServerControls, ClientControls: PPLDAPControl;
+ timeout: PLDAPTimeVal; SizeLimit: ULONG;
+ var res: PLDAPMessage): ULONG; cdecl;
+
+//
+// Extended API to check filter syntax. Returns LDAP error code if syntax
+// is invalid or LDAP_SUCCESS if it's ok.
+//
+
+{$EXTERNALSYM ldap_check_filterA}
+function ldap_check_filterA(ld: PLDAP; SearchFilter: PAnsiChar): ULONG; cdecl;
+{$EXTERNALSYM ldap_check_filterW}
+function ldap_check_filterW(ld: PLDAP; SearchFilter: PWideChar): ULONG; cdecl;
+{$EXTERNALSYM ldap_check_filter}
+function ldap_check_filter(ld: PLDAP; SearchFilter: PChar): ULONG; cdecl;
+
+//
+// modify an existing entry
+//
+
+//
+// multi-thread: ldap_modify calls are not safe in that the message number
+// is returned rather than the return code. You have to look
+// at the connection block in an error case and the return code
+// may be overwritten by another thread inbetween.
+//
+// Use ldap_modify_ext instead, as these are thread safe.
+//
+// ldap_modify_s and ldap_modify_ext* calls are thread safe.
+//
+
+{$EXTERNALSYM ldap_modifyA}
+function ldap_modifyA(ld: PLDAP; dn: PAnsiChar; var mods: PLDAPModA): ULONG; cdecl;
+{$EXTERNALSYM ldap_modifyW}
+function ldap_modifyW(ld: PLDAP; dn: PWideChar; var mods: PLDAPModW): ULONG; cdecl;
+{$EXTERNALSYM ldap_modify}
+function ldap_modify(ld: PLDAP; dn: PChar; var mods: PLDAPMod): ULONG; cdecl;
+
+{$EXTERNALSYM ldap_modify_sA}
+function ldap_modify_sA(ld: PLDAP; dn: PAnsiChar; var mods: PLDAPModA): ULONG; cdecl;
+{$EXTERNALSYM ldap_modify_sW}
+function ldap_modify_sW(ld: PLDAP; dn: PWideChar; var mods: PLDAPModW): ULONG; cdecl;
+{$EXTERNALSYM ldap_modify_s}
+function ldap_modify_s(ld: PLDAP; dn: PChar; var mods: PLDAPMod): ULONG; cdecl;
+
+{$EXTERNALSYM ldap_modify_extA}
+function ldap_modify_extA(ld: PLDAP; dn: PAnsiChar; var mods: PLDAPModA;
+ var ServerControls, ClientControls: PLDAPControlA;
+ var MessageNumber: ULONG): ULONG; cdecl;
+{$EXTERNALSYM ldap_modify_extW}
+function ldap_modify_extW(ld: PLDAP; dn: PWideChar; var mods: PLDAPModW;
+ var ServerControls, ClientControls: PLDAPControlW;
+ var MessageNumber: ULONG): ULONG; cdecl;
+{$EXTERNALSYM ldap_modify_ext}
+function ldap_modify_ext(ld: PLDAP; dn: PChar; var mods: PLDAPMod;
+ var ServerControls, ClientControls: PLDAPControl;
+ var MessageNumber: ULONG): ULONG; cdecl;
+
+{$EXTERNALSYM ldap_modify_ext_sA}
+function ldap_modify_ext_sA(ld: PLDAP; dn: PAnsiChar; var mods: PLDAPModA;
+ var ServerControls, ClientControls: PLDAPControlA): ULONG; cdecl;
+{$EXTERNALSYM ldap_modify_ext_sW}
+function ldap_modify_ext_sW(ld: PLDAP; dn: PWideChar; var mods: PLDAPModW;
+ var ServerControls, ClientControls: PLDAPControlW): ULONG; cdecl;
+{$EXTERNALSYM ldap_modify_ext_s}
+function ldap_modify_ext_s(ld: PLDAP; dn: PChar; var mods: PLDAPMod;
+ var ServerControls, ClientControls: PLDAPControl): ULONG; cdecl;
+
+//
+// modrdn and modrdn2 function both as RenameObject and MoveObject.
+//
+// Note that to LDAP v2 servers, only rename within a given container
+// is supported... therefore NewDistinguishedName is actually NewRDN.
+// Here are some examples :
+//
+// This works to both v2 and v3 servers :
+//
+// DN = CN=Bob,OU=FOO,O=BAR
+// NewDN = CN=Joe
+//
+// result is: CN=Joe,OU=FOO,O=BAR
+//
+// This works to only v3 and above servers :
+//
+// DN = CN=Bob,OU=FOO,O=BAR
+// NewDN = CN=Joe,OU=FOOBAR,O=BAR
+//
+// result is: CN=Joe,OU=FOOBAR,O=BAR
+//
+// If you try the second example to a v2 server, we'll send the whole
+// NewDN over as the new RDN(rather than break up the parent OU and
+// child). The server will then give you back some unknown error.
+//
+
+//
+// multi-thread: ldap_modrdn and ldap_modrdn2 calls are not safe in that
+// the message number is returned rather than the return code.
+// You have to look at the connection block in an error case
+// and the return code may be overwritten by another thread
+// inbetween.
+//
+// Use ldap_rename_ext instead, as these are thread safe.
+//
+
+{$EXTERNALSYM ldap_modrdn2A}
+function ldap_modrdn2A(var ExternalHandle: LDAP;
+ DistinguishedName, NewDistinguishedName: PAnsiChar;
+ DeleteOldRdn: Integer): ULONG; cdecl;
+{$EXTERNALSYM ldap_modrdn2W}
+function ldap_modrdn2W(var ExternalHandle: LDAP;
+ DistinguishedName, NewDistinguishedName: PWideChar;
+ DeleteOldRdn: Integer): ULONG; cdecl;
+{$EXTERNALSYM ldap_modrdn2}
+function ldap_modrdn2(var ExternalHandle: LDAP;
+ DistinguishedName, NewDistinguishedName: PChar;
+ DeleteOldRdn: Integer): ULONG; cdecl;
+
+//
+// ldap_modrdn simply calls ldap_modrdn2 with a value of 1 for DeleteOldRdn.
+//
+
+{$EXTERNALSYM ldap_modrdnA}
+function ldap_modrdnA(var ExternalHandle: LDAP;
+ DistinguishedName, NewDistinguishedName: PAnsiChar): ULONG; cdecl;
+{$EXTERNALSYM ldap_modrdnW}
+function ldap_modrdnW(var ExternalHandle: LDAP;
+ DistinguishedName, NewDistinguishedName: PWideChar): ULONG; cdecl;
+{$EXTERNALSYM ldap_modrdn}
+function ldap_modrdn(var ExternalHandle: LDAP;
+ DistinguishedName, NewDistinguishedName: PChar): ULONG; cdecl;
+
+{$EXTERNALSYM ldap_modrdn2_sA}
+function ldap_modrdn2_sA(var ExternalHandle: LDAP;
+ DistinguishedName, NewDistinguishedName: PAnsiChar;
+ DeleteOldRdn: Integer): ULONG; cdecl;
+{$EXTERNALSYM ldap_modrdn2_sW}
+function ldap_modrdn2_sW(var ExternalHandle: LDAP;
+ DistinguishedName, NewDistinguishedName: PWideChar;
+ DeleteOldRdn: Integer): ULONG; cdecl;
+{$EXTERNALSYM ldap_modrdn2_s}
+function ldap_modrdn2_s(var ExternalHandle: LDAP;
+ DistinguishedName, NewDistinguishedName: PChar;
+ DeleteOldRdn: Integer): ULONG; cdecl;
+
+{$EXTERNALSYM ldap_modrdn_sA}
+function ldap_modrdn_sA(var ExternalHandle: LDAP;
+ DistinguishedName, NewDistinguishedName: PAnsiChar): ULONG; cdecl;
+{$EXTERNALSYM ldap_modrdn_sW}
+function ldap_modrdn_sW(var ExternalHandle: LDAP;
+ DistinguishedName, NewDistinguishedName: PWideChar): ULONG; cdecl;
+{$EXTERNALSYM ldap_modrdn_s}
+function ldap_modrdn_s(var ExternalHandle: LDAP;
+ DistinguishedName, NewDistinguishedName: PChar): ULONG; cdecl;
+
+//
+// Extended Rename operations. These take controls and separate out the
+// parent from the RDN, for clarity.
+//
+
+{$EXTERNALSYM ldap_rename_extA}
+function ldap_rename_extA(ld: PLDAP; dn, NewRDN, NewParent: PAnsiChar;
+ DeleteOldRdn: Integer; var ServerControls, ClientControls: PLDAPControlA;
+ var MessageNumber: ULONG): ULONG; cdecl;
+{$EXTERNALSYM ldap_rename_extW}
+function ldap_rename_extW(ld: PLDAP; dn, NewRDN, NewParent: PWideChar;
+ DeleteOldRdn: Integer; var ServerControls, ClientControls: PLDAPControlW;
+ var MessageNumber: ULONG): ULONG; cdecl;
+{$EXTERNALSYM ldap_rename_ext}
+function ldap_rename_ext(ld: PLDAP; dn, NewRDN, NewParent: PChar;
+ DeleteOldRdn: Integer; var ServerControls, ClientControls: PLDAPControl;
+ var MessageNumber: ULONG): ULONG; cdecl;
+
+{$EXTERNALSYM ldap_rename_ext_sA}
+function ldap_rename_ext_sA(ld: PLDAP;
+ dn, NewRDN, NewParent: PAnsiChar; DeleteOldRdn: Integer;
+ var ServerControls, ClientControls: PLDAPControlA): ULONG; cdecl;
+{$EXTERNALSYM ldap_rename_ext_sW}
+function ldap_rename_ext_sW(ld: PLDAP;
+ dn, NewRDN, NewParent: PWideChar; DeleteOldRdn: Integer;
+ var ServerControls, ClientControls: PLDAPControlW): ULONG; cdecl;
+{$EXTERNALSYM ldap_rename_ext_s}
+function ldap_rename_ext_s(ld: PLDAP;
+ dn, NewRDN, NewParent: PChar; DeleteOldRdn: Integer;
+ var ServerControls, ClientControls: PLDAPControl): ULONG; cdecl;
+
+//
+// Add an entry to the tree
+//
+
+//
+// multi-thread: ldap_add calls are not safe in that the message number
+// is returned rather than the return code. You have to look
+// at the connection block in an error case and the return code
+// may be overwritten by another thread inbetween.
+//
+// Use ldap_add_ext instead, as these are thread safe.
+//
+// ldap_add_s and ldap_add_ext* calls are thread safe.
+//
+
+{$EXTERNALSYM ldap_addA}
+function ldap_addA(ld: PLDAP; dn: PAnsiChar; var attrs: PLDAPModA): ULONG; cdecl;
+{$EXTERNALSYM ldap_addW}
+function ldap_addW(ld: PLDAP; dn: PWideChar; var attrs: PLDAPModW): ULONG; cdecl;
+{$EXTERNALSYM ldap_add}
+function ldap_add(ld: PLDAP; dn: PChar; var attrs: PLDAPMod): ULONG; cdecl;
+
+{$EXTERNALSYM ldap_add_sA}
+function ldap_add_sA(ld: PLDAP; dn: PAnsiChar; var attrs: PLDAPModA): ULONG; cdecl;
+{$EXTERNALSYM ldap_add_sW}
+function ldap_add_sW(ld: PLDAP; dn: PWideChar; var attrs: PLDAPModW): ULONG; cdecl;
+{$EXTERNALSYM ldap_add_s}
+function ldap_add_s(ld: PLDAP; dn: PChar; var attrs: PLDAPMod): ULONG; cdecl;
+
+{$EXTERNALSYM ldap_add_extA}
+function ldap_add_extA(ld: PLDAP; dn: PAnsiChar; var attrs: PLDAPModA;
+ var ServerControls, ClientControls: PLDAPControlA;
+ var MessageNumber: ULONG): ULONG; cdecl;
+{$EXTERNALSYM ldap_add_extW}
+function ldap_add_extW(ld: PLDAP; dn: PWideChar; var attrs: PLDAPModW;
+ var ServerControls, ClientControls: PLDAPControlW;
+ var MessageNumber: ULONG): ULONG; cdecl;
+{$EXTERNALSYM ldap_add_ext}
+function ldap_add_ext(ld: PLDAP; dn: PChar; var attrs: PLDAPMod;
+ var ServerControls, ClientControls: PLDAPControl;
+ var MessageNumber: ULONG): ULONG; cdecl;
+
+{$EXTERNALSYM ldap_add_ext_sA}
+function ldap_add_ext_sA(ld: PLDAP; dn: PAnsiChar; var attrs: PLDAPModA;
+ var ServerControls, ClientControls: PLDAPControlA): ULONG; cdecl;
+{$EXTERNALSYM ldap_add_ext_sW}
+function ldap_add_ext_sW(ld: PLDAP; dn: PWideChar; var attrs: PLDAPModW;
+ var ServerControls, ClientControls: PLDAPControlW): ULONG; cdecl;
+{$EXTERNALSYM ldap_add_ext_s}
+function ldap_add_ext_s(ld: PLDAP; dn: PChar; var attrs: PLDAPMod;
+ var ServerControls, ClientControls: PLDAPControl): ULONG; cdecl;
+
+//
+// Compare the attribute for a given entry to a known value.
+//
+
+{$EXTERNALSYM ldap_compareA}
+function ldap_compareA(ld: PLDAP; dn, attr, value: PAnsiChar): ULONG; cdecl;
+{$EXTERNALSYM ldap_compareW}
+function ldap_compareW(ld: PLDAP; dn, attr, value: PWideChar): ULONG; cdecl;
+{$EXTERNALSYM ldap_compare}
+function ldap_compare(ld: PLDAP; dn, attr, value: PChar): ULONG; cdecl;
+
+{$EXTERNALSYM ldap_compare_sA}
+function ldap_compare_sA(ld: PLDAP; dn, attr, value: PAnsiChar): ULONG; cdecl;
+{$EXTERNALSYM ldap_compare_sW}
+function ldap_compare_sW(ld: PLDAP; dn, attr, value: PWideChar): ULONG; cdecl;
+{$EXTERNALSYM ldap_compare_s}
+function ldap_compare_s(ld: PLDAP; dn, attr, value: PChar): ULONG; cdecl;
+
+//
+// Extended Compare operations. These take controls and are thread safe.
+// They also allow you to specify a bval structure for the data, so that it
+// isn't translated from Unicode or ANSI to UTF8. Allows for comparison of
+// raw binary data.
+//
+// Specify either Data or Value as not NULL. If both are not NULL, the
+// berval Data will be used.
+//
+
+// either value or Data is not null, not both
+{$EXTERNALSYM ldap_compare_extA}
+function ldap_compare_extA(ld: PLDAP; dn, Attr, Value: PAnsiChar;
+ Data: PLDAPBerVal; var ServerControls, ClientControls: PLDAPControlA;
+ var MessageNumber: ULONG): ULONG; cdecl;
+{$EXTERNALSYM ldap_compare_extW}
+function ldap_compare_extW(ld: PLDAP; dn, Attr, Value: PWideChar;
+ Data: PLDAPBerVal; var ServerControls, ClientControls: PLDAPControlW;
+ var MessageNumber: ULONG): ULONG; cdecl;
+{$EXTERNALSYM ldap_compare_ext}
+function ldap_compare_ext(ld: PLDAP; dn, Attr, Value: PChar;
+ Data: PLDAPBerVal; var ServerControls, ClientControls: PLDAPControl;
+ var MessageNumber: ULONG): ULONG; cdecl;
+
+{$EXTERNALSYM ldap_compare_ext_sA}
+function ldap_compare_ext_sA(ld: PLDAP;
+ dn, Attr, Value: PAnsiChar; Data: PLDAPBerVal;
+ var ServerControls, ClientControls: PLDAPControlA): ULONG; cdecl;
+{$EXTERNALSYM ldap_compare_ext_sW}
+function ldap_compare_ext_sW(ld: PLDAP;
+ dn, Attr, Value: PWideChar; Data: PLDAPBerVal;
+ var ServerControls, ClientControls: PLDAPControlW): ULONG; cdecl;
+{$EXTERNALSYM ldap_compare_ext_s}
+function ldap_compare_ext_s(ld: PLDAP;
+ dn, Attr, Value: PChar; Data: PLDAPBerVal;
+ var ServerControls, ClientControls: PLDAPControl): ULONG; cdecl;
+
+//
+// Delete an object out of the tree
+//
+
+//
+// multi-thread: ldap_delete calls are not safe in that the message number
+// is returned rather than the return code. You have to look
+// at the connection block in an error case and the return code
+// may be overwritten by another thread inbetween.
+//
+// Use ldap_delete_ext instead, as these are thread safe.
+//
+// ldap_delete_s and ldap_delete_ext* calls are thread safe.
+//
+
+{$EXTERNALSYM ldap_deleteA}
+function ldap_deleteA(ld: PLDAP; dn: PAnsiChar): ULONG; cdecl;
+{$EXTERNALSYM ldap_deleteW}
+function ldap_deleteW(ld: PLDAP; dn: PWideChar): ULONG; cdecl;
+{$EXTERNALSYM ldap_delete}
+function ldap_delete(ld: PLDAP; dn: PChar): ULONG; cdecl;
+
+{$EXTERNALSYM ldap_delete_sA}
+function ldap_delete_sA(ld: PLDAP; dn: PAnsiChar): ULONG; cdecl;
+{$EXTERNALSYM ldap_delete_sW}
+function ldap_delete_sW(ld: PLDAP; dn: PWideChar): ULONG; cdecl;
+{$EXTERNALSYM ldap_delete_s}
+function ldap_delete_s(ld: PLDAP; dn: PChar): ULONG; cdecl;
+
+{$EXTERNALSYM ldap_delete_extA}
+function ldap_delete_extA(ld: PLDAP; dn: PAnsiChar;
+ var ServerControls, ClientControls: PLDAPControlA;
+ var MessageNumber: ULONG): ULONG; cdecl;
+{$EXTERNALSYM ldap_delete_extW}
+function ldap_delete_extW(ld: PLDAP; dn: PWideChar;
+ var ServerControls, ClientControls: PLDAPControlW;
+ var MessageNumber: ULONG): ULONG; cdecl;
+{$EXTERNALSYM ldap_delete_ext}
+function ldap_delete_ext(ld: PLDAP; dn: PChar;
+ var ServerControls, ClientControls: PLDAPControl;
+ var MessageNumber: ULONG): ULONG; cdecl;
+
+{$EXTERNALSYM ldap_delete_ext_sA}
+function ldap_delete_ext_sA(ld: PLDAP; dn: PAnsiChar;
+ var ServerControls, ClientControls: PLDAPControlA): ULONG; cdecl;
+{$EXTERNALSYM ldap_delete_ext_sW}
+function ldap_delete_ext_sW(ld: PLDAP; dn: PWideChar;
+ var ServerControls, ClientControls: PLDAPControlW): ULONG; cdecl;
+{$EXTERNALSYM ldap_delete_ext_s}
+function ldap_delete_ext_s(ld: PLDAP; dn: PChar;
+ var ServerControls, ClientControls: PLDAPControl): ULONG; cdecl;
+
+//
+// Give up on a request. No guarentee that it got there as there is no
+// response from the server.
+//
+
+{$EXTERNALSYM ldap_abandon}
+function ldap_abandon(ld: PLDAP; msgid: ULONG): ULONG; cdecl;
+
+//
+// Possible values for "all" field in ldap_result. We've enhanced it such
+// that if someone passes in LDAP_MSG_RECEIVED, we'll pass all values we've
+// received up to that point.
+//
+
+const
+ {$EXTERNALSYM LDAP_MSG_ONE}
+ LDAP_MSG_ONE = 0;
+ {$EXTERNALSYM LDAP_MSG_ALL}
+ LDAP_MSG_ALL = 1;
+ {$EXTERNALSYM LDAP_MSG_RECEIVED}
+ LDAP_MSG_RECEIVED = 2;
+
+//
+// Get a response from a connection. One enhancement here is that ld can
+// be null, in which case we'll return responses from any server. Free
+// responses here with ldap_msgfree.
+//
+// For connection-less LDAP, you should pass in both a LDAP connection
+// handle and a msgid. This will ensure we know which request the app
+// is waiting on a reply to. (we actively resend request until we get
+// a response.)
+//
+
+{$EXTERNALSYM ldap_result}
+function ldap_result(ld: PLDAP; msgid, all: ULONG;
+ timeout: PLDAP_TIMEVAL; var res: PLDAPMessage): ULONG; cdecl;
+
+{$EXTERNALSYM ldap_msgfree}
+function ldap_msgfree(res: PLDAPMessage): ULONG; cdecl;
+
+//
+// This parses a message and returns the error code. It optionally frees
+// the message by calling ldap_msgfree.
+//
+
+// multi-thread: ldap_result2error call is thread safe
+
+// freeit is boolean.. free the message?
+{$EXTERNALSYM ldap_result2error}
+function ldap_result2error(ld: PLDAP; res: PLDAPMessage;
+ freeit: ULONG): ULONG; cdecl;
+
+//
+// Similar to ldap_result2error, this parses responses from the server and
+// returns the appropriate fields. Use this one if you want to get at the
+// referrals, matchingDNs, or server controls returned.
+//
+
+// multi-thread: ldap_parse_result call is thread safe
+
+{$EXTERNALSYM ldap_parse_resultA}
+function ldap_parse_resultA (
+ var Connection: LDAP;
+ ResultMessage: PLDAPMessage;
+ ReturnCode: PULONG; // returned by server
+ MatchedDNs: PPCharA; // free with ldap_memfree
+ ErrorMessage: PPCharA; // free with ldap_memfree
+ Referrals: PPPCharA; // free with ldap_value_freeW
+ var ServerControls: PPLDAPControlA; // free with ldap_free_controlsW
+ Freeit: BOOL): ULONG; cdecl;
+{$EXTERNALSYM ldap_parse_resultW}
+function ldap_parse_resultW (
+ var Connection: LDAP;
+ ResultMessage: PLDAPMessage;
+ ReturnCode: PULONG; // returned by server
+ MatchedDNs: PPCharW; // free with ldap_memfree
+ ErrorMessage: PPCharW; // free with ldap_memfree
+ Referrals: PPPCharW; // free with ldap_value_freeW
+ var ServerControls: PPLDAPControlW; // free with ldap_free_controlsW
+ Freeit: BOOL): ULONG; cdecl;
+{$EXTERNALSYM ldap_parse_result}
+function ldap_parse_result (
+ var Connection: LDAP;
+ ResultMessage: PLDAPMessage;
+ ReturnCode: PULONG; // returned by server
+ MatchedDNs: PPChar; // free with ldap_memfree
+ ErrorMessage: PPChar; // free with ldap_memfree
+ Referrals: PPPChar; // free with ldap_value_freeW
+ var ServerControls: PPLDAPControl; // free with ldap_free_controlsW
+ Freeit: BOOL): ULONG; cdecl;
+
+{$EXTERNALSYM ldap_controls_freeA}
+function ldap_controls_freeA(var Controls: PLDAPControlA): ULONG; cdecl;
+{$EXTERNALSYM ldap_controls_freeW}
+function ldap_controls_freeW(var Controls: PLDAPControlW): ULONG; cdecl;
+{$EXTERNALSYM ldap_controls_free}
+function ldap_controls_free(var Controls: PLDAPControl): ULONG; cdecl;
+
+{$EXTERNALSYM ldap_parse_extended_resultA}
+function ldap_parse_extended_resultA(
+ Connection: PLDAP;
+ ResultMessage: PLDAPMessage; // returned by server
+ var ResultOID: PAnsiChar; // free with ldap_memfree
+ var ResultData: PBERVAL; // free with ldap_memfree
+ Freeit: ByteBool // Don't need the message anymore
+): ULONG; cdecl;
+{$EXTERNALSYM ldap_parse_extended_resultW}
+function ldap_parse_extended_resultW(
+ Connection: PLDAP;
+ ResultMessage: PLDAPMessage; // returned by server
+ var ResultOID: PWideChar; // free with ldap_memfree
+ var ResultData: PBERVAL; // free with ldap_memfree
+ Freeit: ByteBool // Don't need the message anymore
+): ULONG; cdecl;
+{$EXTERNALSYM ldap_parse_extended_result}
+function ldap_parse_extended_result(
+ Connection: PLDAP;
+ ResultMessage: PLDAPMessage; // returned by server
+ var ResultOID: PChar; // free with ldap_memfree
+ var ResultData: PBERVAL; // free with ldap_memfree
+ Freeit: ByteBool // Don't need the message anymore
+): ULONG; cdecl;
+
+{$EXTERNALSYM ldap_control_freeA}
+function ldap_control_freeA(var Control: LDAPControlA): ULONG; cdecl;
+{$EXTERNALSYM ldap_control_freeW}
+function ldap_control_freeW(var Control: LDAPControlW): ULONG; cdecl;
+{$EXTERNALSYM ldap_control_free}
+function ldap_control_free(var Control: LDAPControl): ULONG; cdecl;
+
+//
+// ldap_free_controls are old, use ldap_controls_free
+//
+
+{$EXTERNALSYM ldap_free_controlsA}
+function ldap_free_controlsA(var Controls: PLDAPControlA): ULONG; cdecl;
+{$EXTERNALSYM ldap_free_controlsW}
+function ldap_free_controlsW(var Controls: PLDAPControlW): ULONG; cdecl;
+{$EXTERNALSYM ldap_free_controls}
+function ldap_free_controls(var Controls: PLDAPControl): ULONG; cdecl;
+
+//
+// ldap_err2string returns a pointer to a string describing the error. This
+// string should not be freed.
+//
+
+{$EXTERNALSYM ldap_err2stringA}
+function ldap_err2stringA(err: ULONG): PAnsiChar; cdecl;
+{$EXTERNALSYM ldap_err2stringW}
+function ldap_err2stringW(err: ULONG): PWideChar; cdecl;
+{$EXTERNALSYM ldap_err2string}
+function ldap_err2string(err: ULONG): PChar; cdecl;
+
+//
+// ldap_perror does nothing and is here just for compatibility.
+//
+
+{$EXTERNALSYM ldap_perror}
+procedure ldap_perror(ld: PLDAP; msg: PChar); cdecl;
+
+//
+// Return the first entry of a message. It is freed when the message is
+// freed so should not be freed explicitly.
+//
+
+{$EXTERNALSYM ldap_first_entry}
+function ldap_first_entry(ld: PLDAP; res: PLDAPMessage): PLDAPMessage; cdecl;
+
+//
+// Return the next entry of a message. It is freed when the message is
+// freed so should not be freed explicitly.
+//
+
+{$EXTERNALSYM ldap_next_entry}
+function ldap_next_entry(ld: PLDAP; entry: PLDAPMessage): PLDAPMessage; cdecl;
+
+//
+// Count the number of search entries returned by the server in a response
+// to a server request.
+//
+
+{$EXTERNALSYM ldap_count_entries}
+function ldap_count_entries(ld: PLDAP; res: PLDAPMessage): ULONG; cdecl;
+
+//
+// A BerElement really maps out to a C++ class object that does BER encoding.
+// Don't mess with it as it's opaque.
+//
+type
+ PBerElement = ^BerElement;
+ {$EXTERNALSYM BerElement}
+ BerElement = record
+ opaque: PChar; // this is an opaque structure used just for
+ // compatibility with reference implementation
+ end;
+
+const
+ {$EXTERNALSYM NULLBER}
+ NULLBER = PBerElement(nil);
+
+//
+// For a given entry, return the first attribute. The pointer returned is
+// actually a buffer in the connection block(with allowances for
+// multi-threaded apps)so it should not be freed.
+//
+
+{$EXTERNALSYM ldap_first_attributeA}
+function ldap_first_attributeA(ld: PLDAP; entry: PLDAPMessage;
+ var ptr: PBerElement): PAnsiChar; cdecl;
+{$EXTERNALSYM ldap_first_attributeW}
+function ldap_first_attributeW(ld: PLDAP; entry: PLDAPMessage;
+ var ptr: PBerElement): PWideChar; cdecl;
+{$EXTERNALSYM ldap_first_attribute}
+function ldap_first_attribute(ld: PLDAP; entry: PLDAPMessage;
+ var ptr: PBerElement): PChar; cdecl;
+
+//
+// Return the next attribute... again, the attribute pointer should not be
+// freed.
+//
+
+{$EXTERNALSYM ldap_next_attributeA}
+function ldap_next_attributeA(ld: PLDAP; entry: PLDAPMessage;
+ ptr: PBerElement): PAnsiChar; cdecl;
+{$EXTERNALSYM ldap_next_attributeW}
+function ldap_next_attributeW(ld: PLDAP; entry: PLDAPMessage;
+ ptr: PBerElement): PWideChar; cdecl;
+{$EXTERNALSYM ldap_next_attribute}
+function ldap_next_attribute(ld: PLDAP; entry: PLDAPMessage;
+ ptr: PBerElement): PChar; cdecl;
+
+//
+// Get a given attribute's list of values. This is used during parsing of
+// a search response. It returns a list of pointers to values, the list is
+// null terminated.
+//
+// If the values are generic octet strings and not null terminated strings,
+// use ldap_get_values_len instead.
+//
+// The returned value should be freed when your done with it by calling
+// ldap_value_free.
+//
+
+{$EXTERNALSYM ldap_get_valuesA}
+function ldap_get_valuesA(ld: PLDAP; entry: PLDAPMessage;
+ attr: PAnsiChar): PPCharA; cdecl;
+{$EXTERNALSYM ldap_get_valuesW}
+function ldap_get_valuesW(ld: PLDAP; entry: PLDAPMessage;
+ attr: PWideChar): PPCharW; cdecl;
+{$EXTERNALSYM ldap_get_values}
+function ldap_get_values(ld: PLDAP; entry: PLDAPMessage;
+ attr: PChar): PPChar; cdecl;
+
+//
+// Get a given attribute's list of values. This is used during parsing of
+// a search response. It returns a list of berval structures to values,
+// the list is null terminated.
+//
+// If the values are null terminated strings, it may be easier to process them
+// by calling ldap_get_values instead.
+//
+// The returned value should be freed when your done with it by calling
+// ldap_value_free_len.
+//
+
+{$EXTERNALSYM ldap_get_values_lenA}
+function ldap_get_values_lenA(ExternalHandle: PLDAP; Message: PLDAPMessage;
+ attr: PAnsiChar): PPLDAPBerVal; cdecl;
+{$EXTERNALSYM ldap_get_values_lenW}
+function ldap_get_values_lenW(ExternalHandle: PLDAP; Message: PLDAPMessage;
+ attr: PWideChar): PPLDAPBerVal; cdecl;
+{$EXTERNALSYM ldap_get_values_len}
+function ldap_get_values_len(ExternalHandle: PLDAP; Message: PLDAPMessage;
+ attr: PChar): PPLDAPBerVal; cdecl;
+
+//
+// Return the number of values in a list returned by ldap_get_values.
+//
+
+{$EXTERNALSYM ldap_count_valuesA}
+function ldap_count_valuesA(vals: PPCharA): ULONG; cdecl;
+{$EXTERNALSYM ldap_count_valuesW}
+function ldap_count_valuesW(vals: PPCharW): ULONG; cdecl;
+{$EXTERNALSYM ldap_count_values}
+function ldap_count_values(vals: PPChar): ULONG; cdecl;
+
+//
+// Return the number of values in a list returned by ldap_get_values_len.
+//
+
+{$EXTERNALSYM ldap_count_values_len}
+function ldap_count_values_len(vals: PPLDAPBerVal): ULONG; cdecl;
+
+//
+// Free structures returned by ldap_get_values.
+//
+
+{$EXTERNALSYM ldap_value_freeA}
+function ldap_value_freeA(vals: PPCharA): ULONG; cdecl;
+{$EXTERNALSYM ldap_value_freeW}
+function ldap_value_freeW(vals: PPCharW): ULONG; cdecl;
+{$EXTERNALSYM ldap_value_free}
+function ldap_value_free(vals: PPChar): ULONG; cdecl;
+
+//
+// Free structures returned by ldap_get_values_len.
+//
+
+{$EXTERNALSYM ldap_value_free_len}
+function ldap_value_free_len(vals: PPLDAPBerVal): ULONG; cdecl;
+
+//
+// Get the distinguished name for a given search entry. It should be freed
+// by calling ldap_memfree.
+//
+
+{$EXTERNALSYM ldap_get_dnA}
+function ldap_get_dnA(ld: PLDAP; entry: PLDAPMessage): PAnsiChar; cdecl;
+{$EXTERNALSYM ldap_get_dnW}
+function ldap_get_dnW(ld: PLDAP; entry: PLDAPMessage): PWideChar; cdecl;
+{$EXTERNALSYM ldap_get_dn}
+function ldap_get_dn(ld: PLDAP; entry: PLDAPMessage): PChar; cdecl;
+
+//
+// When using ldap_explode_dn, you should free the returned string by
+// calling ldap_value_free.
+//
+
+{$EXTERNALSYM ldap_explode_dnA}
+function ldap_explode_dnA(dn: PAnsiChar; notypes: ULONG): PPCharA; cdecl;
+{$EXTERNALSYM ldap_explode_dnW}
+function ldap_explode_dnW(dn: PWideChar; notypes: ULONG): PPCharW; cdecl;
+{$EXTERNALSYM ldap_explode_dn}
+function ldap_explode_dn(dn: PChar; notypes: ULONG): PPChar; cdecl;
+
+//
+// When calling ldap_dn2ufn, you should free the returned string by calling
+// ldap_memfree.
+//
+
+{$EXTERNALSYM ldap_dn2ufnA}
+function ldap_dn2ufnA(dn: PAnsiChar): PAnsiChar; cdecl;
+{$EXTERNALSYM ldap_dn2ufnW}
+function ldap_dn2ufnW(dn: PWideChar): PWideChar; cdecl;
+{$EXTERNALSYM ldap_dn2ufn}
+function ldap_dn2ufn(dn: PChar): PChar; cdecl;
+
+//
+// This is used to free strings back to the LDAP API heap. Don't pass in
+// values that you've gotten from ldap_open, ldap_get_values, etc.
+//
+
+{$EXTERNALSYM ldap_memfreeA}
+procedure ldap_memfreeA(Block: PAnsiChar); cdecl;
+{$EXTERNALSYM ldap_memfreeW}
+procedure ldap_memfreeW(Block: PWideChar); cdecl;
+{$EXTERNALSYM ldap_memfree}
+procedure ldap_memfree(Block: PChar); cdecl;
+
+{$EXTERNALSYM ber_bvfree}
+procedure ber_bvfree(bv: PLDAPBerVal); cdecl;
+
+//
+// The function ldap_ufn2dn attempts to "normalize" a user specified DN
+// to make it "proper". It follows RFC 1781(add CN= if not present,
+// add OU= if none present, etc). If it runs into any problems at all
+// while normalizing, it simply returns a copy of what was passed in.
+//
+// It allocates the output string from the LDAP memory pool. If the pDn
+// comes back as non-NULL, you should free it when you're done with a call
+// to ldap_memfree.
+//
+
+{$EXTERNALSYM ldap_ufn2dnA}
+function ldap_ufn2dnA(ufn: PAnsiChar; var pDn: PAnsiChar): ULONG; cdecl;
+{$EXTERNALSYM ldap_ufn2dnW}
+function ldap_ufn2dnW(ufn: PWideChar; var pDn: PWideChar): ULONG; cdecl;
+{$EXTERNALSYM ldap_ufn2dn}
+function ldap_ufn2dn(ufn: PChar; var pDn: PChar): ULONG; cdecl;
+
+const
+ {$EXTERNALSYM LBER_USE_DER}
+ LBER_USE_DER = $01;
+ {$EXTERNALSYM LBER_USE_INDEFINITE_LEN}
+ LBER_USE_INDEFINITE_LEN = $02;
+ {$EXTERNALSYM LBER_TRANSLATE_STRINGS}
+ LBER_TRANSLATE_STRINGS = $04;
+
+//
+// Call to initialize the LDAP library. Pass in a version structure with
+// lv_size set to sizeof(LDAP_VERSION), lv_major set to LAPI_MAJOR_VER1,
+// and lv_minor set to LAPI_MINOR_VER1. Return value will be either
+// LDAP_SUCCESS if OK or LDAP_OPERATIONS_ERROR if can't be supported.
+//
+
+ {$EXTERNALSYM LAPI_MAJOR_VER1}
+ LAPI_MAJOR_VER1 = 1;
+ {$EXTERNALSYM LAPI_MINOR_VER1}
+ LAPI_MINOR_VER1 = 1;
+
+type
+ PLDAPVersionInfo = ^TLDAPVersionInfo;
+ {$EXTERNALSYM PLDAP_VERSION_INFO}
+ PLDAP_VERSION_INFO = ^LDAP_VERSION_INFO;
+ {$EXTERNALSYM LDAP_VERSION_INFO}
+ LDAP_VERSION_INFO = record
+ lv_size: ULONG;
+ lv_major: ULONG;
+ lv_minor: ULONG;
+ end;
+ TLDAPVersionInfo = LDAP_VERSION_INFO;
+
+{$EXTERNALSYM ldap_startup}
+function ldap_startup(var version: TLDAPVersionInfo): ULONG; cdecl;
+
+//
+// ldap_cleanup unloads the library when the refcount of opens goes to zero.
+// (i.e. if a DLL calls it within a program that is also using it, it won't
+// free all resources)
+//
+
+{$EXTERNALSYM ldap_cleanup}
+function ldap_cleanup(hInstance: THandle): ULONG; cdecl;
+
+//
+// Extended API to support allowing opaque blobs of data in search filters.
+// This API takes any filter element and converts it to a safe text string that
+// can safely be passed in a search filter.
+// An example of using this is :
+//
+// filter is something like guid=4826BF6CF0123444
+// this will put out on the wire guid of binary 0x4826BF6CF0123444
+//
+// call ldap_escape_filter_element with sourceFilterElement pointing to
+// raw data, sourceCount set appropriately to length of data.
+//
+// if destFilterElement is NULL, then return value is length required for
+// output buffer.
+//
+// if destFilterElement is not NULL, then the function will copy the source
+// into the dest buffer and ensure that it is of a safe format.
+//
+// then simply insert the dest buffer into your search filter after the
+// "attributetype=".
+//
+// this will put out on the wire guid of binary 0x004826BF6CF000123444
+//
+// Note : don't call this for attribute values that are really strings, as
+// we won't do any conversion from what you passed in to UTF-8. Should only
+// be used for attributes that really are raw binary.
+//
+
+{$EXTERNALSYM ldap_escape_filter_elementA}
+function ldap_escape_filter_elementA(
+ sourceFilterElement: PChar; sourceLength: ULONG;
+ destFilterElement: PAnsiChar; destLength: ULONG): ULONG; cdecl;
+{$EXTERNALSYM ldap_escape_filter_elementW}
+function ldap_escape_filter_elementW(
+ sourceFilterElement: PChar; sourceLength: ULONG;
+ destFilterElement: PWideChar; destLength: ULONG): ULONG; cdecl;
+{$EXTERNALSYM ldap_escape_filter_element}
+function ldap_escape_filter_element(
+ sourceFilterElement: PChar; sourceLength: ULONG;
+ destFilterElement: PChar; destLength: ULONG): ULONG; cdecl;
+
+//
+// Misc extensions for additional debugging.
+//
+// Note that these do nothing on free builds.
+//
+
+{$EXTERNALSYM ldap_set_dbg_flags}
+function ldap_set_dbg_flags(NewFlags: ULONG): ULONG; cdecl;
+
+// NOTE by translator: Original function type has ellipsis, which means
+// there can be var_args. Object Pascal doesn't support this, so you'll
+// have to define a function that does what you want (probably using BASM
+// to get the extra parameters, or linking a C function), and then cast
+// that to TDbgPrint.
+
+type
+ {$EXTERNALSYM DBGPRINT}
+ DBGPRINT = function(Format: PChar {; ...} ): ULONG cdecl;
+ TDbgPrint = DBGPRINT;
+
+{$EXTERNALSYM ldap_set_dbg_routine}
+procedure ldap_set_dbg_routine(DebugPrintRoutine: TDbgPrint); cdecl;
+
+//
+// These routines are possibly useful by other modules. Note that Win95
+// doesn't by default have the UTF-8 codepage loaded. So a good way to
+// convert from UTF-8 to Unicode.
+//
+
+{$EXTERNALSYM LdapUTF8ToUnicode}
+function LdapUTF8ToUnicode(lpSrcStr: LPCSTR; cchSrc: Integer;
+ lpDestStr: LPWSTR; cchDest: Integer): Integer; cdecl;
+
+{$EXTERNALSYM LdapUnicodeToUTF8}
+function LdapUnicodeToUTF8(lpSrcStr: LPCWSTR; cchSrc: Integer;
+ lpDestStr: LPSTR; cchDest: Integer): Integer; cdecl;
+
+//
+// LDAPv3 features :
+//
+// Sort Keys... these are used to ask the server to sort the results
+// before sending the results back. LDAPv3 only and optional to implement
+// on the server side. Check supportedControl for an OID of
+// "1.2.840.113556.1.4.473" to see if the server supports it.
+//
+
+const
+ {$EXTERNALSYM LDAP_SERVER_SORT_OID}
+ LDAP_SERVER_SORT_OID = '1.2.840.113556.1.4.473';
+ {$EXTERNALSYM LDAP_SERVER_SORT_OID_W}
+ LDAP_SERVER_SORT_OID_W = '1.2.840.113556.1.4.473';
+
+ {$EXTERNALSYM LDAP_SERVER_RESP_SORT_OID}
+ LDAP_SERVER_RESP_SORT_OID = '1.2.840.113556.1.4.474';
+ {$EXTERNALSYM LDAP_SERVER_RESP_SORT_OID_W}
+ LDAP_SERVER_RESP_SORT_OID_W = '1.2.840.113556.1.4.474';
+
+{
+ NOTE from translator: I'm not quite sure about the following
+ declaration:
+
+ typedef struct ldapsearch LDAPSearch, *PLDAPSearch;
+}
+
+type
+// Note from translator:
+// The following two types don't have a TLDAPxxx type declared, since they are
+// meant as opaque pointer types only, so a TLDAPxxx is not needed.
+
+ {$EXTERNALSYM PLDAPSearch}
+ PLDAPSearch = ^LDAPSearch;
+ {$EXTERNALSYM LDAPSearch}
+ LDAPSearch = record end;
+
+ {$EXTERNALSYM PLDAPSortKeyA}
+ PLDAPSortKeyA = ^LDAPSortKeyA;
+ {$EXTERNALSYM PLDAPSortKeyW}
+ PLDAPSortKeyW = ^LDAPSortKeyW;
+ {$EXTERNALSYM PLDAPSortKey}
+ PLDAPSortKey = PLDAPSortKeyA;
+ {$EXTERNALSYM LDAPSortKeyA}
+ LDAPSortKeyA = packed record
+ sk_attrtype: PAnsiChar;
+ sk_matchruleoid: PAnsiChar;
+ sk_reverseorder: ByteBool;
+ end;
+ {$EXTERNALSYM LDAPSortKeyW}
+ LDAPSortKeyW = packed record
+ sk_attrtype: PWideChar;
+ sk_matchruleoid: PWideChar;
+ sk_reverseorder: ByteBool;
+ end;
+ {$EXTERNALSYM LDAPSortKey}
+ LDAPSortKey = LDAPSortKeyA;
+
+//
+// This API formats a list of sort keys into a search control. Call
+// ldap_control_free when you're finished with the control.
+//
+// Use this one rather than ldap_encode_sort_control as this is per RFC.
+//
+
+{$EXTERNALSYM ldap_create_sort_controlA}
+function ldap_create_sort_controlA(ExternalHandle: PLDAP;
+ var SortKeys: PLDAPSortKeyA; IsCritical: UCHAR;
+ var Control: PLDAPControlA): ULONG; cdecl;
+{$EXTERNALSYM ldap_create_sort_controlW}
+function ldap_create_sort_controlW(ExternalHandle: PLDAP;
+ var SortKeys: PLDAPSortKeyW; IsCritical: UCHAR;
+ var Control: PLDAPControlW): ULONG; cdecl;
+{$EXTERNALSYM ldap_create_sort_control}
+function ldap_create_sort_control(ExternalHandle: PLDAP;
+ var SortKeys: PLDAPSortKey; IsCritical: UCHAR;
+ var Control: PLDAPControl): ULONG; cdecl;
+
+//
+// This API parses the sort control returned by the server. Use ldap_memfree
+// to free the attribute value, if it's returned.
+//
+
+{$EXTERNALSYM ldap_parse_sort_controlA}
+function ldap_parse_sort_controlA(ExternalHandle: PLDAP;
+ var Control: PLDAPControlA; var Result: ULONG;
+ var Attribute: PAnsiChar): ULONG; cdecl;
+{$EXTERNALSYM ldap_parse_sort_controlW}
+function ldap_parse_sort_controlW(ExternalHandle: PLDAP;
+ var Control: PLDAPControlW; var Result: ULONG;
+ var Attribute: PWideChar): ULONG; cdecl;
+{$EXTERNALSYM ldap_parse_sort_control}
+function ldap_parse_sort_control(ExternalHandle: PLDAP;
+ var Control: PLDAPControl; var Result: ULONG;
+ var Attribute: PChar): ULONG; cdecl;
+
+//
+// This API formats a list of sort keys into a search control. Call
+// ldap_memfree for both Control->ldctl_value.bv_val and
+// Control->currentControl->ldctl_oid when you're finished with the control.
+//
+// This is the old sort API that will be shortly pulled. Please use
+// ldap_create_sort_control defined above.
+//
+
+{$EXTERNALSYM ldap_encode_sort_controlA}
+function ldap_encode_sort_controlA(ExternalHandle: PLDAP;
+ var SortKeys: PLDAPSortKeyA; Control: PLDAPControlA;
+ Criticality: ByteBool): ULONG; cdecl;
+{$EXTERNALSYM ldap_encode_sort_controlW}
+function ldap_encode_sort_controlW(ExternalHandle: PLDAP;
+ var SortKeys: PLDAPSortKeyW; Control: PLDAPControlW;
+ Criticality: ByteBool): ULONG; cdecl;
+{$EXTERNALSYM ldap_encode_sort_control}
+function ldap_encode_sort_control(ExternalHandle: PLDAP;
+ var SortKeys: PLDAPSortKey; Control: PLDAPControl;
+ Criticality: ByteBool): ULONG; cdecl;
+
+//
+// LDAPv3: This is the RFC defined API for the simple paging of results
+// control. Use ldap_control_free to free the control allocated by
+// ldap_create_page_control.
+//
+
+{$EXTERNALSYM ldap_create_page_controlA}
+function ldap_create_page_controlA(ExternalHandle: PLDAP;
+ PageSize: ULONG; var Cookie: TLDAPBerVal; IsCritical: UCHAR;
+ var Control: PLDAPControlA): ULONG; cdecl;
+{$EXTERNALSYM ldap_create_page_controlW}
+function ldap_create_page_controlW(ExternalHandle: PLDAP;
+ PageSize: ULONG; var Cookie: TLDAPBerVal; IsCritical: UCHAR;
+ var Control: PLDAPControlW): ULONG; cdecl;
+{$EXTERNALSYM ldap_create_page_control}
+function ldap_create_page_control(ExternalHandle: PLDAP;
+ PageSize: ULONG; var Cookie: TLDAPBerVal; IsCritical: UCHAR;
+ var Control: PLDAPControl): ULONG; cdecl;
+
+{$EXTERNALSYM ldap_parse_page_controlA}
+function ldap_parse_page_controlA(ExternalHandle: PLDAP;
+ ServerControls: PPLDAPControlA; var TotalCount: ULONG;
+ var Cookie: PLDAPBerVal): ULONG; cdecl; // Use ber_bvfree to free Cookie
+{$EXTERNALSYM ldap_parse_page_controlW}
+function ldap_parse_page_controlW(ExternalHandle: PLDAP;
+ ServerControls: PPLDAPControlW; var TotalCount: ULONG;
+ var Cookie: PLDAPBerVal): ULONG; cdecl; // Use ber_bvfree to free Cookie
+{$EXTERNALSYM ldap_parse_page_control}
+function ldap_parse_page_control(ExternalHandle: PLDAP;
+ ServerControls: PPLDAPControl; var TotalCount: ULONG;
+ var Cookie: PLDAPBerVal): ULONG; cdecl; // Use ber_bvfree to free Cookie
+
+//
+// LDAPv3: This is the interface for simple paging of results. To ensure
+// that the server supports it, check the supportedControl property off of
+// the root for an OID of 1.2.840.113556.1.4.319. If it is there, then it
+// supports this feature.
+//
+// If you're going to specify sort keys, see section above on sort keys on
+// now to tell if they're supported by the server.
+//
+// You first call ldap_search_init_page. If it returns a non-NULL LDAPSearch
+// block, then it worked ok. Otherwise call LdapGetLastError to find error.
+//
+// With a valid LDAPSearch block (there are opaque), call ldap_get_next_page
+// or ldap_get_next_page_s. If you call ldap_get_next_page, you MUST call
+// ldap_get_paged_count for each set of results that you get for that message.
+// This allows the library to save off the cookie that the server sent to
+// resume the search.
+//
+// Other than calling ldap_get_paged_count, the results you get back from
+// ldap_get_next_page can be treated as any other search result, and should
+// be freed when you're done by calling ldap_msgfree.
+//
+// When the end of the search is hit, you'll get a return code of
+// LDAP_NO_RESULTS_RETURNED. At this point, (or any point after LDAPSearch
+// structure has been allocated), you call ldap_search_abandon_page. You
+// need to call this even after you get a return code of
+// LDAP_NO_RESULTS_RETURNED.
+//
+// If you call ldap_get_next_page_s, you don't need to call
+// ldap_get_paged_count.
+//
+
+const
+ {$EXTERNALSYM LDAP_PAGED_RESULT_OID_STRING}
+ LDAP_PAGED_RESULT_OID_STRING = '1.2.840.113556.1.4.319';
+ {$EXTERNALSYM LDAP_PAGED_RESULT_OID_STRING_W}
+ LDAP_PAGED_RESULT_OID_STRING_W = '1.2.840.113556.1.4.319';
+
+{$EXTERNALSYM ldap_search_init_pageA}
+function ldap_search_init_pageA(ExternalHandle: PLDAP;
+ DistinguishedName: PAnsiChar; ScopeOfSearch: ULONG; SearchFilter: PAnsiChar;
+ AttributeList: PPCharA; AttributesOnly: ULONG;
+ var ServerControls, ClientControls: PLDAPControlA;
+ PageTimeLimit, TotalSizeLimit: ULONG;
+ var SortKeys: PLDAPSortKeyA): PLDAPSearch; cdecl;
+
+{$EXTERNALSYM ldap_search_init_pageW}
+function ldap_search_init_pageW(ExternalHandle: PLDAP;
+ DistinguishedName: PWideChar; ScopeOfSearch: ULONG; SearchFilter: PWideChar;
+ AttributeList: PPCharW; AttributesOnly: ULONG;
+ var ServerControls, ClientControls: PLDAPControlW;
+ PageTimeLimit, TotalSizeLimit: ULONG;
+ var SortKeys: PLDAPSortKeyW): PLDAPSearch; cdecl;
+
+{$EXTERNALSYM ldap_search_init_page}
+function ldap_search_init_page(ExternalHandle: PLDAP;
+ DistinguishedName: PChar; ScopeOfSearch: ULONG; SearchFilter: PChar;
+ AttributeList: PPChar; AttributesOnly: ULONG;
+ var ServerControls, ClientControls: PLDAPControl;
+ PageTimeLimit, TotalSizeLimit: ULONG;
+ var SortKeys: PLDAPSortKey): PLDAPSearch; cdecl;
+
+{$EXTERNALSYM ldap_get_next_page}
+function ldap_get_next_page(ExternalHandle: PLDAP; SearchHandle: PLDAPSearch;
+ PageSize: ULONG; var MessageNumber: ULONG): ULONG; cdecl;
+
+{$EXTERNALSYM ldap_get_next_page_s}
+function ldap_get_next_page_s(ExternalHandle: PLDAP; SearchHandle: PLDAPSearch;
+ var timeout: TLDAPTimeVal; PageSize: ULONG; var TotalCount: ULONG;
+ var Results: PLDAPMessage): ULONG; cdecl;
+
+{$EXTERNALSYM ldap_get_paged_count}
+function ldap_get_paged_count(ExternalHandle: PLDAP; SearchBlock: PLDAPSearch;
+ var TotalCount: ULONG; Results: PLDAPMessage): ULONG; cdecl;
+
+{$EXTERNALSYM ldap_search_abandon_page}
+function ldap_search_abandon_page(ExternalHandle: PLDAP;
+ SearchBlock: PLDAPSearch): ULONG; cdecl;
+
+//
+// These functions return subordinate referrals (references) that are returned
+// in search responses. There are two types of referrals. External referrals
+// where the naming context doesn't reside on the server (e.g. server says 'I
+// don't have the data, look over there') and Subordinate referrals (or
+// references) where some data has been returned and the referrals are passed
+// to other naming contexts below the current one (e.g. servers says 'Here's
+// some data from the tree I hold, go look here, there, and over there for
+// more data that is further down in the tree.').
+//
+// These routines handle the latter. For external references, use
+// ldap_parse_result.
+//
+// Return the first reference from a message. It is freed when the message is
+// freed so should not be freed explicitly.
+//
+
+{$EXTERNALSYM ldap_first_reference}
+function ldap_first_reference(ld: PLDAP; res: PLDAPMessage): PLDAPMessage;
+
+//
+// Return the next entry of a message. It is freed when the message is
+// freed so should not be freed explicitly.
+//
+
+{$EXTERNALSYM ldap_next_reference}
+function ldap_next_reference(ld: PLDAP; entry: PLDAPMessage): PLDAPMessage;
+
+//
+// Count the number of subordinate references returned by the server in a
+// response to a search request.
+//
+
+{$EXTERNALSYM ldap_count_references}
+function ldap_count_references(ld: PLDAP; res: PLDAPMessage): ULONG; cdecl;
+
+//
+// We return the list of subordinate referrals in a search response message.
+//
+
+// free Referrals with ldap_value_freeW
+{$EXTERNALSYM ldap_parse_referenceA}
+function ldap_parse_referenceA(Connection: PLDAP; ResultMessage: PLDAPMessage;
+ var Referrals: PPCharA): ULONG; cdecl;
+{$EXTERNALSYM ldap_parse_referenceW}
+function ldap_parse_referenceW(Connection: PLDAP; ResultMessage: PLDAPMessage;
+ var Referrals: PPCharW): ULONG; cdecl;
+{$EXTERNALSYM ldap_parse_reference}
+function ldap_parse_reference(Connection: PLDAP; ResultMessage: PLDAPMessage;
+ var Referrals: PPChar): ULONG; cdecl;
+
+//
+// These APIs allow a client to send an extended request (free for all) to
+// an LDAPv3 (or above) server. The functionality is fairly open... you can
+// send any request you'd like. Note that since we don't know if you'll
+// be receiving a single or multiple responses, you'll have to explicitly tell
+// us when you're done with the request by calling ldap_close_extended_op.
+//
+// These are thread safe.
+//
+
+{$EXTERNALSYM ldap_extended_operationA}
+function ldap_extended_operationA(ld: PLDAP; Oid: PAnsiChar;
+ var Data: TLDAPBerVal; var ServerControls, ClientControls: PLDAPControlA;
+ var MessageNumber: ULONG): ULONG; cdecl;
+{$EXTERNALSYM ldap_extended_operationW}
+function ldap_extended_operationW(ld: PLDAP; Oid: PWideChar;
+ var Data: TLDAPBerVal; var ServerControls, ClientControls: PLDAPControlW;
+ var MessageNumber: ULONG): ULONG; cdecl;
+{$EXTERNALSYM ldap_extended_operation}
+function ldap_extended_operation(ld: PLDAP; Oid: PChar;
+ var Data: TLDAPBerVal; var ServerControls, ClientControls: PLDAPControl;
+ var MessageNumber: ULONG): ULONG; cdecl;
+
+{$EXTERNALSYM ldap_close_extended_op}
+function ldap_close_extended_op(ld: PLDAP; MessageNumber: ULONG): ULONG; cdecl;
+
+//
+// Some enhancements that will probably never make it into the RFC related
+// to callouts to allow external caching of connections.
+//
+// Call ldap_set_option( conn, LDAP_OPT_REFERRAL_CALLBACK, &referralRoutines )
+// where referralRoutines is the address of an LDAP_REFERRAL_CALLBACK
+// structure with your routines. They may be NULL, in which case we'll
+// obviously not make the calls.
+//
+// Any connections that are created will inherit the current callbacks from
+// the primary connection that the request was initiated on.
+//
+
+const
+ {$EXTERNALSYM LDAP_OPT_REFERRAL_CALLBACK}
+ LDAP_OPT_REFERRAL_CALLBACK = $70;
+
+//
+// This first routine is called when we're about to chase a referral. We
+// callout to it to see if there is already a connection cached that we
+// can use. If so, the callback routine returns the pointer to the
+// connection to use in ConnectionToUse. If not, it sets
+// *ConnectionToUse to NULL.
+//
+// For a return code, it should return 0 if we should continue to chase the
+// referral. If it returns a non-zero return code, we'll treat that as the
+// error code for chasing the referral. This allows caching of host names
+// that are not reachable, if we decide to add that in the future.
+//
+
+type
+ {$EXTERNALSYM QUERYFORCONNECTION}
+ QUERYFORCONNECTION = function(
+ PrimaryConnection: PLDAP;
+ ReferralFromConnection: PLDAP;
+ NewDN: PWideChar;
+ HostName: PChar;
+ PortNumber: ULONG;
+ SecAuthIdentity: Pointer; // if null, use CurrentUser below
+ CurrentUserToken: Pointer; // pointer to current user's LUID
+ var ConnectionToUse: PLDAP):ULONG cdecl;
+ TQueryForConnection = QUERYFORCONNECTION;
+
+//
+// This next function is called when we've created a new connection while
+// chasing a referral. Note that it gets assigned the same callback functions
+// as the PrimaryConnection. If the return code is FALSE, then the call
+// back function doesn't want to cache the connection and it will be
+// destroyed after the operation is complete. If TRUE is returned, we'll
+// assume that the callee has taken ownership of the connection and it will
+// not be destroyed after the operation is complete.
+//
+// If the ErrorCodeFromBind field is not 0, then the bind operation to
+// that server failed.
+//
+
+ {$EXTERNALSYM NOTIFYOFNEWCONNECTION}
+ NOTIFYOFNEWCONNECTION = function(
+ PrimaryConnection: PLDAP;
+ ReferralFromConnection: PLDAP;
+ NewDN: PWideChar;
+ HostName: PChar;
+ NewConnection: PLDAP;
+ PortNumber: ULONG;
+ SecAuthIdentity: Pointer; // if null, use CurrentUser below
+ CurrentUser: Pointer; // pointer to current user's LUID
+ ErrorCodeFromBind: ULONG): ByteBool cdecl;
+ TNotifyOfNewConnection = NOTIFYOFNEWCONNECTION;
+
+//
+// This next function is called when we've successfully called off to the
+// QueryForConnection call and received a connection OR when we called off
+// to the NotifyOfNewConnection call and it returned TRUE. We call this
+// function when we're dereferencing the connection after we're done with it.
+//
+// Return code is currently ignored, but the function should return
+// LDAP_SUCCESS if all went well.
+//
+
+ {$EXTERNALSYM DEREFERENCECONNECTION}
+ DEREFERENCECONNECTION = function(PrimaryConnection: PLDAP;
+ ConnectionToDereference: PLDAP): ULONG cdecl;
+ TDereferenceConnection = DEREFERENCECONNECTION;
+
+ PLDAPReferralCallback = ^TLDAPReferralCallback;
+ {$EXTERNALSYM LdapReferralCallback}
+ LdapReferralCallback = packed record
+ SizeOfCallbacks: ULONG; // set to sizeof( LDAP_REFERRAL_CALLBACK )
+ QueryForConnection: QUERYFORCONNECTION;
+ NotifyRoutine: NOTIFYOFNEWCONNECTION;
+ DereferenceRoutine: DEREFERENCECONNECTION;
+ end;
+ {$EXTERNALSYM LDAP_REFERRAL_CALLBACK}
+ LDAP_REFERRAL_CALLBACK = LdapReferralCallback;
+ {$EXTERNALSYM PLDAP_REFERRAL_CALLBACK}
+ PLDAP_REFERRAL_CALLBACK = ^LdapReferralCallback;
+ TLDAPReferralCallback = LdapReferralCallback;
+
+//
+// Thread Safe way to get last error code returned by LDAP API is to call
+// LdapGetLastError();
+//
+
+{$EXTERNALSYM LdapGetLastError}
+function LdapGetLastError: ULONG; cdecl;
+
+//
+// Translate from LdapError to closest Win32 error code.
+//
+
+{$EXTERNALSYM LdapMapErrorToWin32}
+function LdapMapErrorToWin32(LdapError: ULONG): ULONG; cdecl;
+
+//
+// This is an arrangement for specifying client certificates while establishing
+// an SSL connection.
+// Simply Call ldap_set_option( conn, LDAP_OPT_CLIENT_CERTIFICATE, &CertRoutine )
+// where CertRoutine is the address of your callback routine. If it is NULL,
+// we will obviously not make the call.
+//
+
+const
+ {$EXTERNALSYM LDAP_OPT_CLIENT_CERTIFICATE}
+ LDAP_OPT_CLIENT_CERTIFICATE = $80;
+
+//
+// This callback is invoked when the server demands a client certificate for
+// authorization. We pass a structure containing a list of server-trusted
+// Certificate Authorities. If the client has certificates to provide, it
+// converts them to CERT_CONTEXTs and adds them to the given certificate
+// store. LDAP subsequently passes these credentials to the SSL server as part
+// of the handshake.
+//
+
+type
+ {$EXTERNALSYM QUERYCLIENTCERT}
+ QUERYCLIENTCERT = function(
+ Connection: PLDAP;
+ trusted_CAs: Pointer {PSecPkgContext_IssuerListInfoEx};
+ hCertStore: LongWord {HCERTSTORE};
+ var pcCreds: DWORD
+ ): ByteBool cdecl;
+
+//
+// We are also giving an opportunity for the client to verify the certificate
+// of the server. The client registers a callback which is invoked after the
+// secure connection is setup. The server certificate is presented to the
+// client who invokes it and decides it it is acceptable. To register this
+// callback, simply call ldap_set_option( conn, LDAP_OPT_SERVER_CERTIFICATE, &CertRoutine )
+//
+
+const
+ {$EXTERNALSYM LDAP_OPT_SERVER_CERTIFICATE}
+ LDAP_OPT_SERVER_CERTIFICATE = $81;
+
+//
+// This function is called after the secure connection has been established. The
+// certificate of the server is supplied for examination by the client. If the
+// client approves it, it returns TRUE else, it returns false and the secure
+// connection is torn down.
+//
+
+type
+ VERIFYSERVERCERT = function(
+ Connection: PLDAP;
+ pServerCert: Pointer {PCCERT_CONTEXT}
+ ): ByteBool cdecl;
+
+
+//
+// Given an LDAP message, return the connection pointer where the message
+// came from. It can return NULL if the connection has already been freed.
+//
+
+{$EXTERNALSYM ldap_conn_from_msg}
+function ldap_conn_from_msg(PrimaryConn: PLDAP; res: PLDAPMessage): PLDAP; cdecl;
+
+//
+// Do we reference the connection for each message so that we can safely get
+// the connection pointer back by calling ldap_conn_from_msg?
+//
+const
+ {$EXTERNALSYM LDAP_OPT_REF_DEREF_CONN_PER_MSG}
+ LDAP_OPT_REF_DEREF_CONN_PER_MSG = $94;
+
+implementation
+
+const
+ LDAPLib = 'wldap32.dll';
+
+function ldap_openA; external LDAPLib name 'ldap_openA';
+function ldap_openW; external LDAPLib name 'ldap_openW';
+function ldap_open; external LDAPLib name 'ldap_openA';
+function ldap_initA; external LDAPLib name 'ldap_initA';
+function ldap_initW; external LDAPLib name 'ldap_initW';
+function ldap_init; external LDAPLib name 'ldap_initA';
+function ldap_sslinitA; external LDAPLib name 'ldap_sslinitA';
+function ldap_sslinitW; external LDAPLib name 'ldap_sslinitW';
+function ldap_sslinit; external LDAPLib name 'ldap_sslinitA';
+function cldap_openA; external LDAPLib name 'cldap_openA';
+function cldap_openW; external LDAPLib name 'cldap_openW';
+function cldap_open; external LDAPLib name 'cldap_openA';
+function ldap_simple_bindA; external LDAPLib name 'ldap_simple_bindA';
+function ldap_simple_bindW; external LDAPLib name 'ldap_simple_bindW';
+function ldap_simple_bind; external LDAPLib name 'ldap_simple_bindA';
+function ldap_simple_bind_sA; external LDAPLib name 'ldap_simple_bind_sA';
+function ldap_simple_bind_sW; external LDAPLib name 'ldap_simple_bind_sW';
+function ldap_simple_bind_s; external LDAPLib name 'ldap_simple_bind_sA';
+function ldap_bindA; external LDAPLib name 'ldap_bindA';
+function ldap_bindW; external LDAPLib name 'ldap_bindW';
+function ldap_bind; external LDAPLib name 'ldap_bindA';
+function ldap_bind_sA; external LDAPLib name 'ldap_bind_sA';
+function ldap_bind_sW; external LDAPLib name 'ldap_bind_sW';
+function ldap_bind_s; external LDAPLib name 'ldap_bind_sA';
+function ldap_sasl_bindA; external LDAPLib name 'ldap_sasl_bindA';
+function ldap_sasl_bindW; external LDAPLib name 'ldap_sasl_bindW';
+function ldap_sasl_bind; external LDAPLib name 'ldap_sasl_bindA';
+function ldap_sasl_bind_sA; external LDAPLib name 'ldap_sasl_bind_sA';
+function ldap_sasl_bind_sW; external LDAPLib name 'ldap_sasl_bind_sW';
+function ldap_sasl_bind_s; external LDAPLib name 'ldap_sasl_bind_sA';
+function ldap_searchA; external LDAPLib name 'ldap_searchA';
+function ldap_searchW; external LDAPLib name 'ldap_searchW';
+function ldap_search; external LDAPLib name 'ldap_searchA';
+function ldap_search_sA; external LDAPLib name 'ldap_search_sA';
+function ldap_search_sW; external LDAPLib name 'ldap_search_sW';
+function ldap_search_s; external LDAPLib name 'ldap_search_sA';
+function ldap_search_stA; external LDAPLib name 'ldap_search_stA';
+function ldap_search_stW; external LDAPLib name 'ldap_search_stW';
+function ldap_search_st; external LDAPLib name 'ldap_search_stA';
+function ldap_modifyA; external LDAPLib name 'ldap_modifyA';
+function ldap_modifyW; external LDAPLib name 'ldap_modifyW';
+function ldap_modify; external LDAPLib name 'ldap_modifyA';
+function ldap_modify_sA; external LDAPLib name 'ldap_modify_sA';
+function ldap_modify_sW; external LDAPLib name 'ldap_modify_sW';
+function ldap_modify_s; external LDAPLib name 'ldap_modify_sA';
+function ldap_modrdn2A; external LDAPLib name 'ldap_modrdn2A';
+function ldap_modrdn2W; external LDAPLib name 'ldap_modrdn2W';
+function ldap_modrdn2; external LDAPLib name 'ldap_modrdn2A';
+function ldap_modrdnA; external LDAPLib name 'ldap_modrdnA';
+function ldap_modrdnW; external LDAPLib name 'ldap_modrdnW';
+function ldap_modrdn; external LDAPLib name 'ldap_modrdnA';
+function ldap_modrdn2_sA; external LDAPLib name 'ldap_modrdn2_sA';
+function ldap_modrdn2_sW; external LDAPLib name 'ldap_modrdn2_sW';
+function ldap_modrdn2_s; external LDAPLib name 'ldap_modrdn2_sA';
+function ldap_modrdn_sA; external LDAPLib name 'ldap_modrdn_sA';
+function ldap_modrdn_sW; external LDAPLib name 'ldap_modrdn_sW';
+function ldap_modrdn_s; external LDAPLib name 'ldap_modrdn_sA';
+function ldap_addA; external LDAPLib name 'ldap_addA';
+function ldap_addW; external LDAPLib name 'ldap_addW';
+function ldap_add; external LDAPLib name 'ldap_addA';
+function ldap_add_sA; external LDAPLib name 'ldap_add_sA';
+function ldap_add_sW; external LDAPLib name 'ldap_add_sW';
+function ldap_add_s; external LDAPLib name 'ldap_add_sA';
+function ldap_compareA; external LDAPLib name 'ldap_compareA';
+function ldap_compareW; external LDAPLib name 'ldap_compareW';
+function ldap_compare; external LDAPLib name 'ldap_compareA';
+function ldap_compare_sA; external LDAPLib name 'ldap_compare_sA';
+function ldap_compare_sW; external LDAPLib name 'ldap_compare_sW';
+function ldap_compare_s; external LDAPLib name 'ldap_compare_sA';
+function ldap_deleteA; external LDAPLib name 'ldap_deleteA';
+function ldap_deleteW; external LDAPLib name 'ldap_deleteW';
+function ldap_delete; external LDAPLib name 'ldap_deleteA';
+function ldap_delete_sA; external LDAPLib name 'ldap_delete_sA';
+function ldap_delete_sW; external LDAPLib name 'ldap_delete_sW';
+function ldap_delete_s; external LDAPLib name 'ldap_delete_sA';
+function ldap_err2stringA; external LDAPLib name 'ldap_err2stringA';
+function ldap_err2stringW; external LDAPLib name 'ldap_err2stringW';
+function ldap_err2string; external LDAPLib name 'ldap_err2stringA';
+function ldap_first_attributeA; external LDAPLib name 'ldap_first_attributeA';
+function ldap_first_attributeW; external LDAPLib name 'ldap_first_attributeW';
+function ldap_first_attribute; external LDAPLib name 'ldap_first_attributeA';
+function ldap_next_attributeA; external LDAPLib name 'ldap_next_attributeA';
+function ldap_next_attributeW; external LDAPLib name 'ldap_next_attributeW';
+function ldap_next_attribute; external LDAPLib name 'ldap_next_attributeA';
+function ldap_get_valuesA; external LDAPLib name 'ldap_get_valuesA';
+function ldap_get_valuesW; external LDAPLib name 'ldap_get_valuesW';
+function ldap_get_values; external LDAPLib name 'ldap_get_valuesA';
+function ldap_get_values_lenA; external LDAPLib name 'ldap_get_values_lenA';
+function ldap_get_values_lenW; external LDAPLib name 'ldap_get_values_lenW';
+function ldap_get_values_len; external LDAPLib name 'ldap_get_values_lenA';
+function ldap_count_valuesA; external LDAPLib name 'ldap_count_valuesA';
+function ldap_count_valuesW; external LDAPLib name 'ldap_count_valuesW';
+function ldap_count_values; external LDAPLib name 'ldap_count_valuesA';
+function ldap_value_freeA; external LDAPLib name 'ldap_value_freeA';
+function ldap_value_freeW; external LDAPLib name 'ldap_value_freeW';
+function ldap_value_free; external LDAPLib name 'ldap_value_freeA';
+function ldap_get_dnA; external LDAPLib name 'ldap_get_dnA';
+function ldap_get_dnW; external LDAPLib name 'ldap_get_dnW';
+function ldap_get_dn; external LDAPLib name 'ldap_get_dnA';
+function ldap_explode_dnA; external LDAPLib name 'ldap_explode_dnA';
+function ldap_explode_dnW; external LDAPLib name 'ldap_explode_dnW';
+function ldap_explode_dn; external LDAPLib name 'ldap_explode_dnA';
+function ldap_dn2ufnA; external LDAPLib name 'ldap_dn2ufnA';
+function ldap_dn2ufnW; external LDAPLib name 'ldap_dn2ufnW';
+function ldap_dn2ufn; external LDAPLib name 'ldap_dn2ufnA';
+procedure ldap_memfreeA; external LDAPLib name 'ldap_memfreeA';
+procedure ldap_memfreeW; external LDAPLib name 'ldap_memfreeW';
+procedure ldap_memfree; external LDAPLib name 'ldap_memfreeA';
+function ldap_ufn2dnA; external LDAPLib name 'ldap_ufn2dnA';
+function ldap_ufn2dnW; external LDAPLib name 'ldap_ufn2dnW';
+function ldap_ufn2dn; external LDAPLib name 'ldap_ufn2dnA';
+function ldap_escape_filter_elementA; external LDAPLib name 'ldap_escape_filter_elementA';
+function ldap_escape_filter_elementW; external LDAPLib name 'ldap_escape_filter_elementW';
+function ldap_escape_filter_element; external LDAPLib name 'ldap_escape_filter_elementA';
+function ldap_search_extA; external LDAPLib name 'ldap_search_extA';
+function ldap_search_extW; external LDAPLib name 'ldap_search_extW';
+function ldap_search_ext; external LDAPLib name 'ldap_search_extA';
+function ldap_search_ext_sA; external LDAPLib name 'ldap_search_ext_sA';
+function ldap_search_ext_sW; external LDAPLib name 'ldap_search_ext_sW';
+function ldap_search_ext_s; external LDAPLib name 'ldap_search_ext_sA';
+function ldap_check_filterA; EXTERNAL LDAPLib name 'ldap_check_filterA';
+function ldap_check_filterW; EXTERNAL LDAPLib name 'ldap_check_filterW';
+function ldap_check_filter; EXTERNAL LDAPLib name 'ldap_check_filterA';
+function ldap_modify_extA; external LDAPLib name 'ldap_modify_extA';
+function ldap_modify_extW; external LDAPLib name 'ldap_modify_extW';
+function ldap_modify_ext; external LDAPLib name 'ldap_modify_extA';
+function ldap_modify_ext_sA; external LDAPLib name 'ldap_modify_ext_sA';
+function ldap_modify_ext_sW; external LDAPLib name 'ldap_modify_ext_sW';
+function ldap_modify_ext_s; external LDAPLib name 'ldap_modify_ext_sA';
+function ldap_rename_extA; external LDAPLib name 'ldap_rename_extA';
+function ldap_rename_extW; external LDAPLib name 'ldap_rename_extW';
+function ldap_rename_ext; external LDAPLib name 'ldap_rename_extA';
+function ldap_rename_ext_sA; external LDAPLib name 'ldap_rename_ext_sA';
+function ldap_rename_ext_sW; external LDAPLib name 'ldap_rename_ext_sW';
+function ldap_rename_ext_s; external LDAPLib name 'ldap_rename_ext_sA';
+function ldap_add_extA; external LDAPLib name 'ldap_add_extA';
+function ldap_add_extW; external LDAPLib name 'ldap_add_extW';
+function ldap_add_ext; external LDAPLib name 'ldap_add_extA';
+function ldap_add_ext_sA; external LDAPLib name 'ldap_add_ext_sA';
+function ldap_add_ext_sW; external LDAPLib name 'ldap_add_ext_sW';
+function ldap_add_ext_s; external LDAPLib name 'ldap_add_ext_sA';
+function ldap_compare_extA; external LDAPLib name 'ldap_compare_extA';
+function ldap_compare_extW; external LDAPLib name 'ldap_compare_extW';
+function ldap_compare_ext; external LDAPLib name 'ldap_compare_extA';
+function ldap_compare_ext_sA; external LDAPLib name 'ldap_compare_ext_sA';
+function ldap_compare_ext_sW; external LDAPLib name 'ldap_compare_ext_sW';
+function ldap_compare_ext_s; external LDAPLib name 'ldap_compare_ext_sA';
+function ldap_delete_extA; external LDAPLib name 'ldap_delete_extA';
+function ldap_delete_extW; external LDAPLib name 'ldap_delete_extW';
+function ldap_delete_ext; external LDAPLib name 'ldap_delete_extA';
+function ldap_delete_ext_sA; external LDAPLib name 'ldap_delete_ext_sA';
+function ldap_delete_ext_sW; external LDAPLib name 'ldap_delete_ext_sW';
+function ldap_delete_ext_s; external LDAPLib name 'ldap_delete_ext_sA';
+function ldap_parse_resultA; external LDAPLib name 'ldap_parse_resultA';
+function ldap_parse_resultW; external LDAPLib name 'ldap_parse_resultW';
+function ldap_parse_result; external LDAPLib name 'ldap_parse_resultA';
+function ldap_controls_freeA; external LDAPLib name 'ldap_controls_freeA';
+function ldap_controls_freeW; external LDAPLib name 'ldap_controls_freeW';
+function ldap_controls_free; external LDAPLib name 'ldap_controls_freeA';
+function ldap_parse_extended_resultA; external LDAPLib name 'ldap_parse_extended_resultA';
+function ldap_parse_extended_resultW; external LDAPLib name 'ldap_parse_extended_resultW';
+function ldap_parse_extended_result; external LDAPLib name 'ldap_parse_extended_resultA';
+function ldap_control_freeA; external LDAPLib name 'ldap_control_freeA';
+function ldap_control_freeW; external LDAPLib name 'ldap_control_freeW';
+function ldap_control_free; external LDAPLib name 'ldap_control_freeA';
+function ldap_free_controlsA; external LDAPLib name 'ldap_free_controlsA';
+function ldap_free_controlsW; external LDAPLib name 'ldap_free_controlsW';
+function ldap_free_controls; external LDAPLib name 'ldap_free_controlsA';
+function ldap_create_sort_controlA; external LDAPLib name 'ldap_create_sort_controlA';
+function ldap_create_sort_controlW; external LDAPLib name 'ldap_create_sort_controlW';
+function ldap_create_sort_control; external LDAPLib name 'ldap_create_sort_controlA';
+function ldap_parse_sort_controlA; external LDAPLib name 'ldap_parse_sort_controlA';
+function ldap_parse_sort_controlW; external LDAPLib name 'ldap_parse_sort_controlW';
+function ldap_parse_sort_control; external LDAPLib name 'ldap_parse_sort_controlA';
+function ldap_encode_sort_controlA; external LDAPLib name 'ldap_encode_sort_controlA';
+function ldap_encode_sort_controlW; external LDAPLib name 'ldap_encode_sort_controlW';
+function ldap_encode_sort_control; external LDAPLib name 'ldap_encode_sort_controlA';
+function ldap_create_page_controlA; external LDAPLib name 'ldap_create_page_controlA';
+function ldap_create_page_controlW; external LDAPLib name 'ldap_create_page_controlW';
+function ldap_create_page_control; external LDAPLib name 'ldap_create_page_controlA';
+function ldap_parse_page_controlA; external LDAPLib name 'ldap_parse_page_controlA';
+function ldap_parse_page_controlW; external LDAPLib name 'ldap_parse_page_controlW';
+function ldap_parse_page_control; external LDAPLib name 'ldap_parse_page_controlA';
+function ldap_search_init_pageA; external LDAPLib name 'ldap_search_init_pageA';
+function ldap_search_init_pageW; external LDAPLib name 'ldap_search_init_pageW';
+function ldap_search_init_page; external LDAPLib name 'ldap_search_init_pageA';
+function ldap_parse_referenceA; external LDAPLib name 'ldap_parse_referenceA';
+function ldap_parse_referenceW; external LDAPLib name 'ldap_parse_referenceW';
+function ldap_parse_reference; external LDAPLib name 'ldap_parse_referenceA';
+function ldap_extended_operationA; external LDAPLib name 'ldap_extended_operationA';
+function ldap_extended_operationW; external LDAPLib name 'ldap_extended_operationW';
+function ldap_extended_operation; external LDAPLib name 'ldap_extended_operationA';
+function ldap_unbind; external LDAPLib name 'ldap_unbind';
+function ldap_unbind_s; external LDAPLib name 'ldap_unbind_s';
+function ldap_get_option; external LDAPLib name 'ldap_get_option';
+function ldap_set_option; external LDAPLib name 'ldap_set_option';
+function ldap_get_optionW; external LDAPLib name 'ldap_get_optionW';
+function ldap_set_optionW; external LDAPLib name 'ldap_set_optionW';
+function ldap_abandon; external LDAPLib name 'ldap_abandon';
+function ldap_result; external LDAPLib name 'ldap_result';
+function ldap_msgfree; external LDAPLib name 'ldap_msgfree';
+function ldap_result2error; external LDAPLib name 'ldap_result2error';
+procedure ldap_perror; external LDAPLib name 'ldap_perror';
+function ldap_first_entry; external LDAPLib name 'ldap_first_entry';
+function ldap_next_entry; external LDAPLib name 'ldap_next_entry';
+function ldap_count_entries; external LDAPLib name 'ldap_count_entries';
+function ldap_count_values_len; external LDAPLib name 'ldap_count_values_len';
+function ldap_value_free_len; external LDAPLib name 'ldap_value_free_len';
+function ldap_startup; external LDAPLib name 'ldap_startup';
+function ldap_cleanup; external LDAPLib name 'ldap_cleanup';
+function ldap_set_dbg_flags; external LDAPLib name 'ldap_set_dbg_flags';
+function ldap_connect; external LDAPLib name 'ldap_connect';
+procedure ber_bvfree; external LDAPLib name 'ber_bvfree';
+procedure ldap_set_dbg_routine; external LDAPLib name 'ldap_set_dbg_routine';
+function LdapUTF8ToUnicode; external LDAPLib name 'LdapUTF8ToUnicode';
+function LdapUnicodeToUTF8; external LDAPLib name 'LdapUnicodeToUTF8';
+function ldap_get_next_page; external LDAPLib name 'ldap_get_next_page';
+function ldap_get_next_page_s; external LDAPLib name 'ldap_get_next_page_s';
+function ldap_get_paged_count; external LDAPLib name 'ldap_get_paged_count';
+function ldap_search_abandon_page; external LDAPLib name 'ldap_search_abandon_page';
+function ldap_first_reference; external LDAPLib name 'ldap_first_reference';
+function ldap_next_reference; external LDAPLib name 'ldap_next_reference';
+function ldap_count_references; external LDAPLib name 'ldap_count_references';
+function ldap_close_extended_op; external LDAPLib name 'ldap_close_extended_op';
+function LdapGetLastError; external LDAPLib name 'LdapGetLastError';
+function LdapMapErrorToWin32; external LDAPLib name 'LdapMapErrorToWin32';
+function ldap_conn_from_msg; external LDAPLib name 'ldap_conn_from_msg';
+
+
+// Macros.
+function LDAP_IS_CLDAP(ld: PLDAP): boolean;
+begin
+ Result :=(ld^.ld_sb.sb_naddr > 0);
+end;
+
+function NAME_ERROR(n: integer): boolean;
+begin
+ Result :=((n and $f0) = $20);
+end;
+
+end.
+
diff --git a/packages/extra/winunits/jwawinnetwk.pas b/packages/extra/winunits/jwawinnetwk.pas
index 1a36aaf32b..feba415b26 100644
--- a/packages/extra/winunits/jwawinnetwk.pas
+++ b/packages/extra/winunits/jwawinnetwk.pas
@@ -1,1879 +1,1879 @@
-{******************************************************************************}
-{ }
-{ Windows Networking API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: winnetwk.h, released June 2000. The original Pascal }
-{ code is: WinNetWk.pas, released December 2000. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwawinnetwk.pas,v 1.1 2005/04/04 07:56:11 marco Exp $
-
-unit JwaWinNetWk;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "WinNetWk.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaWinError, JwaWinType;
-
-//
-// Network types
-//
-
-const
- WNNC_NET_MSNET = $00010000;
- {$EXTERNALSYM WNNC_NET_MSNET}
- WNNC_NET_LANMAN = $00020000;
- {$EXTERNALSYM WNNC_NET_LANMAN}
- WNNC_NET_NETWARE = $00030000;
- {$EXTERNALSYM WNNC_NET_NETWARE}
- WNNC_NET_VINES = $00040000;
- {$EXTERNALSYM WNNC_NET_VINES}
- WNNC_NET_10NET = $00050000;
- {$EXTERNALSYM WNNC_NET_10NET}
- WNNC_NET_LOCUS = $00060000;
- {$EXTERNALSYM WNNC_NET_LOCUS}
- WNNC_NET_SUN_PC_NFS = $00070000;
- {$EXTERNALSYM WNNC_NET_SUN_PC_NFS}
- WNNC_NET_LANSTEP = $00080000;
- {$EXTERNALSYM WNNC_NET_LANSTEP}
- WNNC_NET_9TILES = $00090000;
- {$EXTERNALSYM WNNC_NET_9TILES}
- WNNC_NET_LANTASTIC = $000A0000;
- {$EXTERNALSYM WNNC_NET_LANTASTIC}
- WNNC_NET_AS400 = $000B0000;
- {$EXTERNALSYM WNNC_NET_AS400}
- WNNC_NET_FTP_NFS = $000C0000;
- {$EXTERNALSYM WNNC_NET_FTP_NFS}
- WNNC_NET_PATHWORKS = $000D0000;
- {$EXTERNALSYM WNNC_NET_PATHWORKS}
- WNNC_NET_LIFENET = $000E0000;
- {$EXTERNALSYM WNNC_NET_LIFENET}
- WNNC_NET_POWERLAN = $000F0000;
- {$EXTERNALSYM WNNC_NET_POWERLAN}
- WNNC_NET_BWNFS = $00100000;
- {$EXTERNALSYM WNNC_NET_BWNFS}
- WNNC_NET_COGENT = $00110000;
- {$EXTERNALSYM WNNC_NET_COGENT}
- WNNC_NET_FARALLON = $00120000;
- {$EXTERNALSYM WNNC_NET_FARALLON}
- WNNC_NET_APPLETALK = $00130000;
- {$EXTERNALSYM WNNC_NET_APPLETALK}
- WNNC_NET_INTERGRAPH = $00140000;
- {$EXTERNALSYM WNNC_NET_INTERGRAPH}
- WNNC_NET_SYMFONET = $00150000;
- {$EXTERNALSYM WNNC_NET_SYMFONET}
- WNNC_NET_CLEARCASE = $00160000;
- {$EXTERNALSYM WNNC_NET_CLEARCASE}
- WNNC_NET_FRONTIER = $00170000;
- {$EXTERNALSYM WNNC_NET_FRONTIER}
- WNNC_NET_BMC = $00180000;
- {$EXTERNALSYM WNNC_NET_BMC}
- WNNC_NET_DCE = $00190000;
- {$EXTERNALSYM WNNC_NET_DCE}
- WNNC_NET_AVID = $001A0000;
- {$EXTERNALSYM WNNC_NET_AVID}
- WNNC_NET_DOCUSPACE = $001B0000;
- {$EXTERNALSYM WNNC_NET_DOCUSPACE}
- WNNC_NET_MANGOSOFT = $001C0000;
- {$EXTERNALSYM WNNC_NET_MANGOSOFT}
- WNNC_NET_SERNET = $001D0000;
- {$EXTERNALSYM WNNC_NET_SERNET}
- WNNC_NET_RIVERFRONT1 = $001E0000;
- {$EXTERNALSYM WNNC_NET_RIVERFRONT1}
- WNNC_NET_RIVERFRONT2 = $001F0000;
- {$EXTERNALSYM WNNC_NET_RIVERFRONT2}
- WNNC_NET_DECORB = $00200000;
- {$EXTERNALSYM WNNC_NET_DECORB}
- WNNC_NET_PROTSTOR = $00210000;
- {$EXTERNALSYM WNNC_NET_PROTSTOR}
- WNNC_NET_FJ_REDIR = $00220000;
- {$EXTERNALSYM WNNC_NET_FJ_REDIR}
- WNNC_NET_DISTINCT = $00230000;
- {$EXTERNALSYM WNNC_NET_DISTINCT}
- WNNC_NET_TWINS = $00240000;
- {$EXTERNALSYM WNNC_NET_TWINS}
- WNNC_NET_RDR2SAMPLE = $00250000;
- {$EXTERNALSYM WNNC_NET_RDR2SAMPLE}
- WNNC_NET_CSC = $00260000;
- {$EXTERNALSYM WNNC_NET_CSC}
- WNNC_NET_3IN1 = $00270000;
- {$EXTERNALSYM WNNC_NET_3IN1}
- WNNC_NET_EXTENDNET = $00290000;
- {$EXTERNALSYM WNNC_NET_EXTENDNET}
- WNNC_NET_STAC = $002A0000;
- {$EXTERNALSYM WNNC_NET_STAC}
- WNNC_NET_FOXBAT = $002B0000;
- {$EXTERNALSYM WNNC_NET_FOXBAT}
- WNNC_NET_YAHOO = $002C0000;
- {$EXTERNALSYM WNNC_NET_YAHOO}
- WNNC_NET_EXIFS = $002D0000;
- {$EXTERNALSYM WNNC_NET_EXIFS}
- WNNC_NET_DAV = $002E0000;
- {$EXTERNALSYM WNNC_NET_DAV}
- WNNC_NET_KNOWARE = $002F0000;
- {$EXTERNALSYM WNNC_NET_KNOWARE}
- WNNC_NET_OBJECT_DIRE = $00300000;
- {$EXTERNALSYM WNNC_NET_OBJECT_DIRE}
- WNNC_NET_MASFAX = $00310000;
- {$EXTERNALSYM WNNC_NET_MASFAX}
- WNNC_NET_HOB_NFS = $00320000;
- {$EXTERNALSYM WNNC_NET_HOB_NFS}
- WNNC_NET_SHIVA = $00330000;
- {$EXTERNALSYM WNNC_NET_SHIVA}
- WNNC_NET_IBMAL = $00340000;
- {$EXTERNALSYM WNNC_NET_IBMAL}
- WNNC_NET_LOCK = $00350000;
- {$EXTERNALSYM WNNC_NET_LOCK}
- WNNC_NET_TERMSRV = $00360000;
- {$EXTERNALSYM WNNC_NET_TERMSRV}
- WNNC_NET_SRT = $00370000;
- {$EXTERNALSYM WNNC_NET_SRT}
- WNNC_NET_QUINCY = $00380000;
- {$EXTERNALSYM WNNC_NET_QUINCY}
-
- WNNC_CRED_MANAGER = DWORD($FFFF0000);
- {$EXTERNALSYM WNNC_CRED_MANAGER}
-
-//
-// Network Resources.
-//
-
- RESOURCE_CONNECTED = $00000001;
- {$EXTERNALSYM RESOURCE_CONNECTED}
- RESOURCE_GLOBALNET = $00000002;
- {$EXTERNALSYM RESOURCE_GLOBALNET}
- RESOURCE_REMEMBERED = $00000003;
- {$EXTERNALSYM RESOURCE_REMEMBERED}
- RESOURCE_RECENT = $00000004;
- {$EXTERNALSYM RESOURCE_RECENT}
- RESOURCE_CONTEXT = $00000005;
- {$EXTERNALSYM RESOURCE_CONTEXT}
-
- RESOURCETYPE_ANY = $00000000;
- {$EXTERNALSYM RESOURCETYPE_ANY}
- RESOURCETYPE_DISK = $00000001;
- {$EXTERNALSYM RESOURCETYPE_DISK}
- RESOURCETYPE_PRINT = $00000002;
- {$EXTERNALSYM RESOURCETYPE_PRINT}
- RESOURCETYPE_RESERVED = $00000008;
- {$EXTERNALSYM RESOURCETYPE_RESERVED}
- RESOURCETYPE_UNKNOWN = DWORD($FFFFFFFF);
- {$EXTERNALSYM RESOURCETYPE_UNKNOWN}
-
- RESOURCEUSAGE_CONNECTABLE = $00000001;
- {$EXTERNALSYM RESOURCEUSAGE_CONNECTABLE}
- RESOURCEUSAGE_CONTAINER = $00000002;
- {$EXTERNALSYM RESOURCEUSAGE_CONTAINER}
- RESOURCEUSAGE_NOLOCALDEVICE = $00000004;
- {$EXTERNALSYM RESOURCEUSAGE_NOLOCALDEVICE}
- RESOURCEUSAGE_SIBLING = $00000008;
- {$EXTERNALSYM RESOURCEUSAGE_SIBLING}
- RESOURCEUSAGE_ATTACHED = $00000010;
- {$EXTERNALSYM RESOURCEUSAGE_ATTACHED}
- RESOURCEUSAGE_ALL = (RESOURCEUSAGE_CONNECTABLE or
- RESOURCEUSAGE_CONTAINER or RESOURCEUSAGE_ATTACHED);
- {$EXTERNALSYM RESOURCEUSAGE_ALL}
- RESOURCEUSAGE_RESERVED = DWORD($80000000);
- {$EXTERNALSYM RESOURCEUSAGE_RESERVED}
-
- RESOURCEDISPLAYTYPE_GENERIC = $00000000;
- {$EXTERNALSYM RESOURCEDISPLAYTYPE_GENERIC}
- RESOURCEDISPLAYTYPE_DOMAIN = $00000001;
- {$EXTERNALSYM RESOURCEDISPLAYTYPE_DOMAIN}
- RESOURCEDISPLAYTYPE_SERVER = $00000002;
- {$EXTERNALSYM RESOURCEDISPLAYTYPE_SERVER}
- RESOURCEDISPLAYTYPE_SHARE = $00000003;
- {$EXTERNALSYM RESOURCEDISPLAYTYPE_SHARE}
- RESOURCEDISPLAYTYPE_FILE = $00000004;
- {$EXTERNALSYM RESOURCEDISPLAYTYPE_FILE}
- RESOURCEDISPLAYTYPE_GROUP = $00000005;
- {$EXTERNALSYM RESOURCEDISPLAYTYPE_GROUP}
- RESOURCEDISPLAYTYPE_NETWORK = $00000006;
- {$EXTERNALSYM RESOURCEDISPLAYTYPE_NETWORK}
- RESOURCEDISPLAYTYPE_ROOT = $00000007;
- {$EXTERNALSYM RESOURCEDISPLAYTYPE_ROOT}
- RESOURCEDISPLAYTYPE_SHAREADMIN = $00000008;
- {$EXTERNALSYM RESOURCEDISPLAYTYPE_SHAREADMIN}
- RESOURCEDISPLAYTYPE_DIRECTORY = $00000009;
- {$EXTERNALSYM RESOURCEDISPLAYTYPE_DIRECTORY}
- RESOURCEDISPLAYTYPE_TREE = $0000000A;
- {$EXTERNALSYM RESOURCEDISPLAYTYPE_TREE}
- RESOURCEDISPLAYTYPE_NDSCONTAINER = $0000000B;
- {$EXTERNALSYM RESOURCEDISPLAYTYPE_NDSCONTAINER}
-
-type
- LPNETRESOURCEA = ^NETRESOURCEA;
- {$EXTERNALSYM LPNETRESOURCEA}
- _NETRESOURCEA = record
- dwScope: DWORD;
- dwType: DWORD;
- dwDisplayType: DWORD;
- dwUsage: DWORD;
- lpLocalName: LPSTR;
- lpRemoteName: LPSTR;
- lpComment: LPSTR;
- lpProvider: LPSTR;
- end;
- {$EXTERNALSYM _NETRESOURCEA}
- NETRESOURCEA = _NETRESOURCEA;
- {$EXTERNALSYM NETRESOURCEA}
- TNetResourceA = NETRESOURCEA;
- PNetResourceA = LPNETRESOURCEA;
-
- LPNETRESOURCEW = ^NETRESOURCEW;
- {$EXTERNALSYM LPNETRESOURCEW}
- _NETRESOURCEW = record
- dwScope: DWORD;
- dwType: DWORD;
- dwDisplayType: DWORD;
- dwUsage: DWORD;
- lpLocalName: LPWSTR;
- lpRemoteName: LPWSTR;
- lpComment: LPWSTR;
- lpProvider: LPWSTR;
- end;
- {$EXTERNALSYM _NETRESOURCEW}
- NETRESOURCEW = _NETRESOURCEW;
- {$EXTERNALSYM NETRESOURCEW}
- TNetResourceW = NETRESOURCEW;
- PNetResourceW = LPNETRESOURCEW;
-
- {$IFDEF UNICODE}
- NETRESOURCE = NETRESOURCEW;
- {$EXTERNALSYM NETRESOURCE}
- LPNETRESOURCE = LPNETRESOURCEW;
- {$EXTERNALSYM LPNETRESOURCE}
- TNetResource = TNetResourceW;
- PNetResource = PNetResourceW;
- {$ELSE}
- NETRESOURCE = NETRESOURCEA;
- {$EXTERNALSYM NETRESOURCE}
- LPNETRESOURCE = LPNETRESOURCEA;
- {$EXTERNALSYM LPNETRESOURCE}
- TNetResource = TNetResourceA;
- PNetResource = PNetResourceA;
- {$ENDIF UNICODE}
-
-//
-// Network Connections.
-//
-
-const
- NETPROPERTY_PERSISTENT = 1;
- {$EXTERNALSYM NETPROPERTY_PERSISTENT}
-
- CONNECT_UPDATE_PROFILE = $00000001;
- {$EXTERNALSYM CONNECT_UPDATE_PROFILE}
- CONNECT_UPDATE_RECENT = $00000002;
- {$EXTERNALSYM CONNECT_UPDATE_RECENT}
- CONNECT_TEMPORARY = $00000004;
- {$EXTERNALSYM CONNECT_TEMPORARY}
- CONNECT_INTERACTIVE = $00000008;
- {$EXTERNALSYM CONNECT_INTERACTIVE}
- CONNECT_PROMPT = $00000010;
- {$EXTERNALSYM CONNECT_PROMPT}
- CONNECT_NEED_DRIVE = $00000020;
- {$EXTERNALSYM CONNECT_NEED_DRIVE}
- CONNECT_REFCOUNT = $00000040;
- {$EXTERNALSYM CONNECT_REFCOUNT}
- CONNECT_REDIRECT = $00000080;
- {$EXTERNALSYM CONNECT_REDIRECT}
- CONNECT_LOCALDRIVE = $00000100;
- {$EXTERNALSYM CONNECT_LOCALDRIVE}
- CONNECT_CURRENT_MEDIA = $00000200;
- {$EXTERNALSYM CONNECT_CURRENT_MEDIA}
- CONNECT_DEFERRED = $00000400;
- {$EXTERNALSYM CONNECT_DEFERRED}
- CONNECT_RESERVED = DWORD($FF000000);
- {$EXTERNALSYM CONNECT_RESERVED}
- CONNECT_COMMANDLINE = $00000800;
- {$EXTERNALSYM CONNECT_COMMANDLINE}
- CONNECT_CMD_SAVECRED = $00001000;
- {$EXTERNALSYM CONNECT_CMD_SAVECRED}
-
-function WNetAddConnectionA(lpRemoteName, lpPassword, lpLocalName: LPCSTR): DWORD; stdcall;
-{$EXTERNALSYM WNetAddConnectionA}
-function WNetAddConnectionW(lpRemoteName, lpPassword, lpLocalName: LPCWSTR): DWORD; stdcall;
-{$EXTERNALSYM WNetAddConnectionW}
-function WNetAddConnection(lpRemoteName, lpPassword, lpLocalName: LPCTSTR): DWORD; stdcall;
-{$EXTERNALSYM WNetAddConnection}
-
-function WNetAddConnection2A(const lpNetResource: NETRESOURCEA; lpPassword: LPCSTR;
- lpUserName: LPCSTR; dwFlags: DWORD): DWORD; stdcall;
-{$EXTERNALSYM WNetAddConnection2A}
-function WNetAddConnection2W(const lpNetResource: NETRESOURCEW; lpPassword: LPCWSTR;
- lpUserName: LPCWSTR; dwFlags: DWORD): DWORD; stdcall;
-{$EXTERNALSYM WNetAddConnection2W}
-function WNetAddConnection2(const lpNetResource: NETRESOURCE; lpPassword: LPCTSTR;
- lpUserName: LPCTSTR; dwFlags: DWORD): DWORD; stdcall;
-{$EXTERNALSYM WNetAddConnection2}
-
-function WNetAddConnection3A(hwndOwner: HWND; const lpNetResource: NETRESOURCEA;
- lpPassword: LPCSTR; lpUserName: LPCSTR; dwFlags: DWORD): DWORD; stdcall;
-{$EXTERNALSYM WNetAddConnection3A}
-function WNetAddConnection3W(hwndOwner: HWND; const lpNetResource: NETRESOURCEW;
- lpPassword: LPCWSTR; lpUserName: LPCWSTR; dwFlags: DWORD): DWORD; stdcall;
-{$EXTERNALSYM WNetAddConnection3W}
-function WNetAddConnection3(hwndOwner: HWND; const lpNetResource: LPNETRESOURCE;
- lpPassword: LPCTSTR; lpUserName: LPCTSTR; dwFlags: DWORD): DWORD; stdcall;
-{$EXTERNALSYM WNetAddConnection3}
-
-function WNetCancelConnectionA(lpName: LPCSTR; fForce: BOOL): DWORD; stdcall;
-{$EXTERNALSYM WNetCancelConnectionA}
-function WNetCancelConnectionW(lpName: LPCWSTR; fForce: BOOL): DWORD; stdcall;
-{$EXTERNALSYM WNetCancelConnectionW}
-function WNetCancelConnection(lpName: LPCTSTR; fForce: BOOL): DWORD; stdcall;
-{$EXTERNALSYM WNetCancelConnection}
-
-function WNetCancelConnection2A(lpName: LPCSTR; dwFlags: DWORD; fForce: BOOL): DWORD; stdcall;
-{$EXTERNALSYM WNetCancelConnection2A}
-function WNetCancelConnection2W(lpName: LPCWSTR; dwFlags: DWORD; fForce: BOOL): DWORD; stdcall;
-{$EXTERNALSYM WNetCancelConnection2W}
-function WNetCancelConnection2(lpName: LPCTSTR; dwFlags: DWORD; fForce: BOOL): DWORD; stdcall;
-{$EXTERNALSYM WNetCancelConnection2}
-
-function WNetGetConnectionA(lpLocalName, lpRemoteName: LPSTR; var lpnLength: DWORD): DWORD; stdcall;
-{$EXTERNALSYM WNetGetConnectionA}
-function WNetGetConnectionW(lpLocalName, lpRemoteName: LPWSTR; var lpnLength: DWORD): DWORD; stdcall;
-{$EXTERNALSYM WNetGetConnectionW}
-function WNetGetConnection(lpLocalName, lpRemoteName: LPTSTR; var lpnLength: DWORD): DWORD; stdcall;
-{$EXTERNALSYM WNetGetConnection}
-
-function WNetRestoreConnectionA(hwndParent: HWND; lpDevice: LPCSTR): DWORD; stdcall;
-{$EXTERNALSYM WNetRestoreConnectionA}
-function WNetRestoreConnectionW(hwndParent: HWND; lpDevice: LPCWSTR): DWORD; stdcall;
-{$EXTERNALSYM WNetRestoreConnectionW}
-function WNetRestoreConnection(hwndParent: HWND; lpDevice: LPCTSTR): DWORD; stdcall;
-{$EXTERNALSYM WNetRestoreConnection}
-
-function WNetUseConnectionA(hwndOwner: HWND; const lpNetResource: NETRESOURCEA;
- lpPassword, lpUserID: LPCSTR; dwFlags: DWORD; lpAccessName: LPSTR;
- var lpBufferSize, lpResult: DWORD): DWORD; stdcall;
-{$EXTERNALSYM WNetUseConnectionA}
-function WNetUseConnectionW(hwndOwner: HWND; const lpNetResource: NETRESOURCEW;
- lpPassword, lpUserID: LPCWSTR; dwFlags: DWORD; lpAccessName: LPWSTR;
- var lpBufferSize, lpResult: DWORD): DWORD; stdcall;
-{$EXTERNALSYM WNetUseConnectionW}
-function WNetUseConnection(hwndOwner: HWND; const lpNetResource: NETRESOURCE;
- lpPassword, lpUserID: LPCTSTR; dwFlags: DWORD; lpAccessName: LPTSTR;
- var lpBufferSize, lpResult: DWORD): DWORD; stdcall;
-{$EXTERNALSYM WNetUseConnection}
-
-//
-// Network Connection Dialogs.
-//
-
-function WNetConnectionDialog(hwnd: HWND; dwType: DWORD): DWORD; stdcall;
-{$EXTERNALSYM WNetConnectionDialog}
-
-function WNetDisconnectDialog(hwnd: HWND; dwType: DWORD): DWORD; stdcall;
-{$EXTERNALSYM WNetDisconnectDialog}
-
-type
- LPCONNECTDLGSTRUCTA = ^CONNECTDLGSTRUCTA;
- {$EXTERNALSYM LPCONNECTDLGSTRUCTA}
- _CONNECTDLGSTRUCTA = record
- cbStructure: DWORD; // size of this structure in bytes
- hwndOwner: HWND; // owner window for the dialog
- lpConnRes: LPNETRESOURCEA; // Requested Resource info
- dwFlags: DWORD; // flags (see below)
- dwDevNum: DWORD; // number of devices connected to
- end;
- {$EXTERNALSYM _CONNECTDLGSTRUCTA}
- CONNECTDLGSTRUCTA = _CONNECTDLGSTRUCTA;
- {$EXTERNALSYM CONNECTDLGSTRUCTA}
- TConnectDlgStructA = CONNECTDLGSTRUCTA;
- PConnectDlgStructA = LPCONNECTDLGSTRUCTA;
-
- LPCONNECTDLGSTRUCTW = ^CONNECTDLGSTRUCTW;
- {$EXTERNALSYM LPCONNECTDLGSTRUCTW}
- _CONNECTDLGSTRUCTW = record
- cbStructure: DWORD; // size of this structure in bytes
- hwndOwner: HWND; // owner window for the dialog
- lpConnRes: LPNETRESOURCEW; // Requested Resource info
- dwFlags: DWORD; // flags (see below)
- dwDevNum: DWORD; // number of devices connected to
- end;
- {$EXTERNALSYM _CONNECTDLGSTRUCTW}
- CONNECTDLGSTRUCTW = _CONNECTDLGSTRUCTW;
- {$EXTERNALSYM CONNECTDLGSTRUCTW}
- TConnectDlgStructW = CONNECTDLGSTRUCTW;
- PConnectDlgStructW = LPCONNECTDLGSTRUCTW;
-
- {$IFDEF UNICODE}
- CONNECTDLGSTRUCT = CONNECTDLGSTRUCTW;
- {$EXTERNALSYM CONNECTDLGSTRUCT}
- LPCONNECTDLGSTRUCT = LPCONNECTDLGSTRUCTW;
- {$EXTERNALSYM LPCONNECTDLGSTRUCT}
- TConnectDlgStruct = TConnectDlgStructW;
- PConnectDlgStruct = PConnectDlgStructW;
- {$ELSE}
- CONNECTDLGSTRUCT = CONNECTDLGSTRUCTA;
- {$EXTERNALSYM CONNECTDLGSTRUCT}
- LPCONNECTDLGSTRUCT = LPCONNECTDLGSTRUCTA;
- {$EXTERNALSYM LPCONNECTDLGSTRUCT}
- TConnectDlgStruct = TConnectDlgStructA;
- PConnectDlgStruct = PConnectDlgStructA;
- {$ENDIF UNICODE}
-
-const
- CONNDLG_RO_PATH = $00000001; // Resource path should be read-only
- {$EXTERNALSYM CONNDLG_RO_PATH}
- CONNDLG_CONN_POINT = $00000002; // Netware -style movable connection point enabled
- {$EXTERNALSYM CONNDLG_CONN_POINT}
- CONNDLG_USE_MRU = $00000004; // Use MRU combobox
- {$EXTERNALSYM CONNDLG_USE_MRU}
- CONNDLG_HIDE_BOX = $00000008; // Hide persistent connect checkbox
- {$EXTERNALSYM CONNDLG_HIDE_BOX}
-
-//
-// NOTE: Set at most ONE of the below flags. If neither flag is set,
-// then the persistence is set to whatever the user chose during
-// a previous connection
-//
-
- CONNDLG_PERSIST = $00000010; // Force persistent connection
- {$EXTERNALSYM CONNDLG_PERSIST}
- CONNDLG_NOT_PERSIST = $00000020; // Force connection NOT persistent
- {$EXTERNALSYM CONNDLG_NOT_PERSIST}
-
-function WNetConnectionDialog1A(var lpConnDlgStruct: CONNECTDLGSTRUCTA): DWORD; stdcall;
-{$EXTERNALSYM WNetConnectionDialog1A}
-function WNetConnectionDialog1W(var lpConnDlgStruct: CONNECTDLGSTRUCTW): DWORD; stdcall;
-{$EXTERNALSYM WNetConnectionDialog1W}
-function WNetConnectionDialog1(var lpConnDlgStruct: CONNECTDLGSTRUCT): DWORD; stdcall;
-{$EXTERNALSYM WNetConnectionDialog1}
-
-type
- LPDISCDLGSTRUCTA = ^DISCDLGSTRUCTA;
- {$EXTERNALSYM LPDISCDLGSTRUCTA}
- _DISCDLGSTRUCTA = record
- cbStructure: DWORD; // size of this structure in bytes
- hwndOwner: HWND; // owner window for the dialog
- lpLocalName: LPSTR; // local device name
- lpRemoteName: LPSTR; // network resource name
- dwFlags: DWORD; // flags
- end;
- {$EXTERNALSYM _DISCDLGSTRUCTA}
- DISCDLGSTRUCTA = _DISCDLGSTRUCTA;
- {$EXTERNALSYM DISCDLGSTRUCTA}
- TDiscDlgStructA = DISCDLGSTRUCTA;
- PDiscDlgStructA = LPDISCDLGSTRUCTA;
-
- LPDISCDLGSTRUCTW = ^DISCDLGSTRUCTW;
- {$EXTERNALSYM LPDISCDLGSTRUCTW}
- _DISCDLGSTRUCTW = record
- cbStructure: DWORD; // size of this structure in bytes
- hwndOwner: HWND; // owner window for the dialog
- lpLocalName: LPWSTR; // local device name
- lpRemoteName: LPWSTR; // network resource name
- dwFlags: DWORD; // flags
- end;
- {$EXTERNALSYM _DISCDLGSTRUCTW}
- DISCDLGSTRUCTW = _DISCDLGSTRUCTW;
- {$EXTERNALSYM DISCDLGSTRUCTW}
- TDiscDlgStructW = DISCDLGSTRUCTW;
- PDiscDlgStructW = LPDISCDLGSTRUCTW;
-
- {$IFDEF UNICODE}
- DISCDLGSTRUCT = DISCDLGSTRUCTW;
- {$EXTERNALSYM DISCDLGSTRUCT}
- LPDISCDLGSTRUCT = LPDISCDLGSTRUCTW;
- {$EXTERNALSYM LPDISCDLGSTRUCT}
- TDiscDlgStruct = TDiscDlgStructW;
- PDiscDlgStruct = PDiscDlgStructW;
- {$ELSE}
- DISCDLGSTRUCT = DISCDLGSTRUCTA;
- {$EXTERNALSYM DISCDLGSTRUCT}
- LPDISCDLGSTRUCT = LPDISCDLGSTRUCTA;
- {$EXTERNALSYM LPDISCDLGSTRUCT}
- TDiscDlgStruct = TDiscDlgStructA;
- PDiscDlgStruct = PDiscDlgStructA;
- {$ENDIF UNICODE}
-
-const
- DISC_UPDATE_PROFILE = $00000001;
- {$EXTERNALSYM DISC_UPDATE_PROFILE}
- DISC_NO_FORCE = $00000040;
- {$EXTERNALSYM DISC_NO_FORCE}
-
-function WNetDisconnectDialog1A(const lpConnDlgStruct: DISCDLGSTRUCTA): DWORD; stdcall;
-{$EXTERNALSYM WNetDisconnectDialog1A}
-function WNetDisconnectDialog1W(const lpConnDlgStruct: DISCDLGSTRUCTW): DWORD; stdcall;
-{$EXTERNALSYM WNetDisconnectDialog1W}
-function WNetDisconnectDialog1(const lpConnDlgStruct: DISCDLGSTRUCT): DWORD; stdcall;
-{$EXTERNALSYM WNetDisconnectDialog1}
-
-//
-// Network Browsing.
-//
-
-function WNetOpenEnumA(dwScope, dwType, dwUsage: DWORD; lpNetResource: LPNETRESOURCEA;
- var lphEnum: HANDLE): DWORD; stdcall;
-{$EXTERNALSYM WNetOpenEnumA}
-function WNetOpenEnumW(dwScope, dwType, dwUsage: DWORD; lpNetResource: LPNETRESOURCEW;
- var lphEnum: HANDLE): DWORD; stdcall;
-{$EXTERNALSYM WNetOpenEnumW}
-function WNetOpenEnum(dwScope, dwType, dwUsage: DWORD; lpNetResource: LPNETRESOURCE;
- var lphEnum: HANDLE): DWORD; stdcall;
-{$EXTERNALSYM WNetOpenEnum}
-
-function WNetEnumResourceA(hEnum: HANDLE; var lpcCount: DWORD; lpBuffer: LPVOID;
- var lpBufferSize: DWORD): DWORD; stdcall;
-{$EXTERNALSYM WNetEnumResourceA}
-function WNetEnumResourceW(hEnum: HANDLE; var lpcCount: DWORD; lpBuffer: LPVOID;
- var lpBufferSize: DWORD): DWORD; stdcall;
-{$EXTERNALSYM WNetEnumResourceW}
-function WNetEnumResource(hEnum: HANDLE; var lpcCount: DWORD; lpBuffer: LPVOID;
- var lpBufferSize: DWORD): DWORD; stdcall;
-{$EXTERNALSYM WNetEnumResource}
-
-function WNetCloseEnum(hEnum: HANDLE): DWORD; stdcall;
-{$EXTERNALSYM WNetCloseEnum}
-
-function WNetGetResourceParentA(const lpNetResource: NETRESOURCEA;
- lpBuffer: LPVOID; var lpcbBuffer: DWORD): DWORD; stdcall;
-{$EXTERNALSYM WNetGetResourceParentA}
-function WNetGetResourceParentW(const lpNetResource: NETRESOURCEW;
- lpBuffer: LPVOID; var lpcbBuffer: DWORD): DWORD; stdcall;
-{$EXTERNALSYM WNetGetResourceParentW}
-function WNetGetResourceParent(const lpNetResource: NETRESOURCE;
- lpBuffer: LPVOID; var lpcbBuffer: DWORD): DWORD; stdcall;
-{$EXTERNALSYM WNetGetResourceParent}
-
-function WNetGetResourceInformationA(const lpNetResource: NETRESOURCEA;
- lpBuffer: LPVOID; var lpcbBuffer: DWORD; var lplpSystem: LPSTR): DWORD; stdcall;
-{$EXTERNALSYM WNetGetResourceInformationA}
-function WNetGetResourceInformationW(const lpNetResource: NETRESOURCEW;
- lpBuffer: LPVOID; var lpcbBuffer: DWORD; var lplpSystem: LPWSTR): DWORD; stdcall;
-{$EXTERNALSYM WNetGetResourceInformationW}
-function WNetGetResourceInformation(const lpNetResource: NETRESOURCE;
- lpBuffer: LPVOID; var lpcbBuffer: DWORD; var lplpSystem: LPTSTR): DWORD; stdcall;
-{$EXTERNALSYM WNetGetResourceInformation}
-
-//
-// Universal Naming.
-//
-
-const
- UNIVERSAL_NAME_INFO_LEVEL = $00000001;
- {$EXTERNALSYM UNIVERSAL_NAME_INFO_LEVEL}
- REMOTE_NAME_INFO_LEVEL = $00000002;
- {$EXTERNALSYM REMOTE_NAME_INFO_LEVEL}
-
-type
- LPUNIVERSAL_NAME_INFOA = ^UNIVERSAL_NAME_INFOA;
- {$EXTERNALSYM LPUNIVERSAL_NAME_INFOA}
- _UNIVERSAL_NAME_INFOA = record
- lpUniversalName: LPSTR;
- end;
- {$EXTERNALSYM _UNIVERSAL_NAME_INFOA}
- UNIVERSAL_NAME_INFOA = _UNIVERSAL_NAME_INFOA;
- {$EXTERNALSYM UNIVERSAL_NAME_INFOA}
- TUniversalNameInfoA = UNIVERSAL_NAME_INFOA;
- PUniversalNameInfoA = LPUNIVERSAL_NAME_INFOA;
-
- LPUNIVERSAL_NAME_INFOW = ^UNIVERSAL_NAME_INFOW;
- {$EXTERNALSYM LPUNIVERSAL_NAME_INFOW}
- _UNIVERSAL_NAME_INFOW = record
- lpUniversalName: LPWSTR;
- end;
- {$EXTERNALSYM _UNIVERSAL_NAME_INFOW}
- UNIVERSAL_NAME_INFOW = _UNIVERSAL_NAME_INFOW;
- {$EXTERNALSYM UNIVERSAL_NAME_INFOW}
- TUniversalNameInfoW = UNIVERSAL_NAME_INFOW;
- PUniversalNameInfoW = LPUNIVERSAL_NAME_INFOW;
-
- {$IFDEF UNICODE}
- UNIVERSAL_NAME_INFO = UNIVERSAL_NAME_INFOW;
- {$EXTERNALSYM UNIVERSAL_NAME_INFO}
- LPUNIVERSAL_NAME_INFO = LPUNIVERSAL_NAME_INFOW;
- {$EXTERNALSYM LPUNIVERSAL_NAME_INFO}
- TUniversalNameInfo = TUniversalNameInfoW;
- PUniversalNameInfo = PUniversalNameInfoW;
- {$ELSE}
- UNIVERSAL_NAME_INFO = UNIVERSAL_NAME_INFOA;
- {$EXTERNALSYM UNIVERSAL_NAME_INFO}
- LPUNIVERSAL_NAME_INFO = LPUNIVERSAL_NAME_INFOA;
- {$EXTERNALSYM LPUNIVERSAL_NAME_INFO}
- TUniversalNameInfo = TUniversalNameInfoA;
- PUniversalNameInfo = PUniversalNameInfoA;
- {$ENDIF UNICODE}
-
- LPREMOTE_NAME_INFOA = ^REMOTE_NAME_INFOA;
- {$EXTERNALSYM LPREMOTE_NAME_INFOA}
- _REMOTE_NAME_INFOA = record
- lpUniversalName: LPSTR;
- lpConnectionName: LPSTR;
- lpRemainingPath: LPSTR;
- end;
- {$EXTERNALSYM _REMOTE_NAME_INFOA}
- REMOTE_NAME_INFOA = _REMOTE_NAME_INFOA;
- {$EXTERNALSYM REMOTE_NAME_INFOA}
- TRemoteNameInfoA = REMOTE_NAME_INFOA;
- PRemoteNameInfoA = LPREMOTE_NAME_INFOA;
-
- LPREMOTE_NAME_INFOW = ^REMOTE_NAME_INFOW;
- {$EXTERNALSYM LPREMOTE_NAME_INFOW}
- _REMOTE_NAME_INFOW = record
- lpUniversalName: LPWSTR;
- lpConnectionName: LPWSTR;
- lpRemainingPath: LPWSTR;
- end;
- {$EXTERNALSYM _REMOTE_NAME_INFOW}
- REMOTE_NAME_INFOW = _REMOTE_NAME_INFOW;
- {$EXTERNALSYM REMOTE_NAME_INFOW}
- TRemoteNameInfoW = REMOTE_NAME_INFOW;
- PRemoteNameInfoW = LPREMOTE_NAME_INFOW;
-
- {$IFDEF UNICODE}
- REMOTE_NAME_INFO = REMOTE_NAME_INFOW;
- {$EXTERNALSYM REMOTE_NAME_INFO}
- LPREMOTE_NAME_INFO = LPREMOTE_NAME_INFOW;
- {$EXTERNALSYM LPREMOTE_NAME_INFO}
- TRemoteNameInfo = TRemoteNameInfoW;
- PRemoteNameInfo = PRemoteNameInfoW;
- {$ELSE}
- REMOTE_NAME_INFO = REMOTE_NAME_INFOA;
- {$EXTERNALSYM REMOTE_NAME_INFO}
- LPREMOTE_NAME_INFO = LPREMOTE_NAME_INFOA;
- {$EXTERNALSYM LPREMOTE_NAME_INFO}
- TRemoteNameInfo = TRemoteNameInfoA;
- PRemoteNameInfo = PRemoteNameInfoA;
- {$ENDIF UNICODE}
-
-function WNetGetUniversalNameA(lpLocalPath: LPCSTR; dwInfoLevel: DWORD;
- lpBuffer: LPVOID; var lpBufferSize: DWORD): DWORD; stdcall;
-{$EXTERNALSYM WNetGetUniversalNameA}
-function WNetGetUniversalNameW(lpLocalPath: LPCWSTR; dwInfoLevel: DWORD;
- lpBuffer: LPVOID; var lpBufferSize: DWORD): DWORD; stdcall;
-{$EXTERNALSYM WNetGetUniversalNameW}
-function WNetGetUniversalName(lpLocalPath: LPCTSTR; dwInfoLevel: DWORD;
- lpBuffer: LPVOID; var lpBufferSize: DWORD): DWORD; stdcall;
-{$EXTERNALSYM WNetGetUniversalName}
-
-//
-// Authentication and Logon/Logoff.
-//
-
-function WNetGetUserA(lpName: LPCSTR; lpUserName: LPSTR; var lpnLength: DWORD): DWORD; stdcall;
-{$EXTERNALSYM WNetGetUserA}
-function WNetGetUserW(lpName: LPCWSTR; lpUserName: LPWSTR; var lpnLength: DWORD): DWORD; stdcall;
-{$EXTERNALSYM WNetGetUserW}
-function WNetGetUser(lpName: LPCTSTR; lpUserName: LPTSTR; var lpnLength: DWORD): DWORD; stdcall;
-{$EXTERNALSYM WNetGetUser}
-
-//
-// Other.
-//
-
-const
- WNFMT_MULTILINE = $01;
- {$EXTERNALSYM WNFMT_MULTILINE}
- WNFMT_ABBREVIATED = $02;
- {$EXTERNALSYM WNFMT_ABBREVIATED}
- WNFMT_INENUM = $10;
- {$EXTERNALSYM WNFMT_INENUM}
- WNFMT_CONNECTION = $20;
- {$EXTERNALSYM WNFMT_CONNECTION}
-
-function WNetGetProviderNameA(dwNetType: DWORD; lpProviderName: LPSTR;
- var lpBufferSize: DWORD): DWORD; stdcall;
-{$EXTERNALSYM WNetGetProviderNameA}
-function WNetGetProviderNameW(dwNetType: DWORD; lpProviderName: LPWSTR;
- var lpBufferSize: DWORD): DWORD; stdcall;
-{$EXTERNALSYM WNetGetProviderNameW}
-function WNetGetProviderName(dwNetType: DWORD; lpProviderName: LPTSTR;
- var lpBufferSize: DWORD): DWORD; stdcall;
-{$EXTERNALSYM WNetGetProviderName}
-
-type
- LPNETINFOSTRUCT = ^NETINFOSTRUCT;
- {$EXTERNALSYM LPNETINFOSTRUCT}
- _NETINFOSTRUCT = record
- cbStructure: DWORD;
- dwProviderVersion: DWORD;
- dwStatus: DWORD;
- dwCharacteristics: DWORD;
- dwHandle: ULONG_PTR;
- wNetType: WORD;
- dwPrinters: DWORD;
- dwDrives: DWORD;
- end;
- {$EXTERNALSYM _NETINFOSTRUCT}
- NETINFOSTRUCT = _NETINFOSTRUCT;
- {$EXTERNALSYM NETINFOSTRUCT}
- TNetInfoStruct = NETINFOSTRUCT;
- PNetInfoStruct = LPNETINFOSTRUCT;
-
-const
- NETINFO_DLL16 = $00000001; // Provider running as 16 bit Winnet Driver
- {$EXTERNALSYM NETINFO_DLL16}
- NETINFO_DISKRED = $00000004; // Provider requires disk redirections to connect
- {$EXTERNALSYM NETINFO_DISKRED}
- NETINFO_PRINTERRED = $00000008; // Provider requires printer redirections to connect
- {$EXTERNALSYM NETINFO_PRINTERRED}
-
-function WNetGetNetworkInformationA(lpProvider: LPCSTR;
- var lpNetInfoStruct: NETINFOSTRUCT): DWORD; stdcall;
-{$EXTERNALSYM WNetGetNetworkInformationA}
-function WNetGetNetworkInformationW(lpProvider: LPCWSTR;
- var lpNetInfoStruct: NETINFOSTRUCT): DWORD; stdcall;
-{$EXTERNALSYM WNetGetNetworkInformationW}
-function WNetGetNetworkInformation(lpProvider: LPCTSTR;
- var lpNetInfoStruct: NETINFOSTRUCT): DWORD; stdcall;
-{$EXTERNALSYM WNetGetNetworkInformation}
-
-//
-// User Profiles.
-//
-
-type
- PFNGETPROFILEPATHA = function(pszUsername: LPCSTR; pszBuffer: LPSTR;
- cbBuffer: UINT): UINT; stdcall;
- {$EXTERNALSYM PFNGETPROFILEPATHA}
-
- PFNGETPROFILEPATHW = function(pszUsername: LPCWSTR; pszBuffer: LPWSTR;
- cbBuffer: UINT): UINT; stdcall;
- {$EXTERNALSYM PFNGETPROFILEPATHW}
-
- {$IFDEF UNICODE}
- PFNGETPROFILEPATH = PFNGETPROFILEPATHW;
- {$EXTERNALSYM PFNGETPROFILEPATH}
- {$ELSE}
- PFNGETPROFILEPATH = PFNGETPROFILEPATHA;
- {$EXTERNALSYM PFNGETPROFILEPATH}
- {$ENDIF UNICODE}
-
- PFNRECONCILEPROFILEA = function(pszCentralFile, pszLocalFile: LPCSTR;
- dwFlags: DWORD): UINT; stdcall;
- {$EXTERNALSYM PFNRECONCILEPROFILEA}
- PFNRECONCILEPROFILEW = function(pszCentralFile, pszLocalFile: LPCWSTR;
- dwFlags: DWORD): UINT; stdcall;
- {$EXTERNALSYM PFNRECONCILEPROFILEW}
- PFNRECONCILEPROFILE = function(pszCentralFile, pszLocalFile: LPCTSTR;
- dwFlags: DWORD): UINT; stdcall;
- {$EXTERNALSYM PFNRECONCILEPROFILE}
-
-const
- RP_LOGON = $01; // if set, do for logon, else for logoff
- {$EXTERNALSYM RP_LOGON}
- RP_INIFILE = $02; // if set, reconcile .INI file, else reg. hive
- {$EXTERNALSYM RP_INIFILE}
-
-//
-// Policies.
-//
-
-type
- PFNPROCESSPOLICIESA = function(hwnd: HWND; pszPath, pszUsername,
- pszComputerName: LPCSTR; dwFlags: DWORD): BOOL; stdcall;
- {$EXTERNALSYM PFNPROCESSPOLICIESA}
- PFNPROCESSPOLICIESW = function(hwnd: HWND; pszPath, pszUsername,
- pszComputerName: LPCWSTR; dwFlags: DWORD): BOOL; stdcall;
- {$EXTERNALSYM PFNPROCESSPOLICIESW}
- PFNPROCESSPOLICIES = function(hwnd: HWND; pszPath, pszUsername,
- pszComputerName: LPCTSTR; dwFlags: DWORD): BOOL; stdcall;
- {$EXTERNALSYM PFNPROCESSPOLICIES}
-
-const
- PP_DISPLAYERRORS = $01; // if set, display error messages, else fail silently if error
- {$EXTERNALSYM PP_DISPLAYERRORS}
-
-//
-// Error handling.
-//
-
-function WNetGetLastErrorA(var lpError: DWORD; lpErrorBuf: LPSTR;
- nErrorBufSize: DWORD; lpNameBuf: LPSTR; nNameBufSize: DWORD): DWORD; stdcall;
-{$EXTERNALSYM WNetGetLastErrorA}
-function WNetGetLastErrorW(var lpError: DWORD; lpErrorBuf: LPWSTR;
- nErrorBufSize: DWORD; lpNameBuf: LPWSTR; nNameBufSize: DWORD): DWORD; stdcall;
-{$EXTERNALSYM WNetGetLastErrorW}
-function WNetGetLastError(var lpError: DWORD; lpErrorBuf: LPTSTR;
- nErrorBufSize: DWORD; lpNameBuf: LPTSTR; nNameBufSize: DWORD): DWORD; stdcall;
-{$EXTERNALSYM WNetGetLastError}
-
-//
-// STATUS CODES
-//
-
-// General
-
-const
- WN_SUCCESS = NO_ERROR;
- {$EXTERNALSYM WN_SUCCESS}
- WN_NO_ERROR = NO_ERROR;
- {$EXTERNALSYM WN_NO_ERROR}
- WN_NOT_SUPPORTED = ERROR_NOT_SUPPORTED;
- {$EXTERNALSYM WN_NOT_SUPPORTED}
- WN_CANCEL = ERROR_CANCELLED;
- {$EXTERNALSYM WN_CANCEL}
- WN_RETRY = ERROR_RETRY;
- {$EXTERNALSYM WN_RETRY}
- WN_NET_ERROR = ERROR_UNEXP_NET_ERR;
- {$EXTERNALSYM WN_NET_ERROR}
- WN_MORE_DATA = ERROR_MORE_DATA;
- {$EXTERNALSYM WN_MORE_DATA}
- WN_BAD_POINTER = ERROR_INVALID_ADDRESS;
- {$EXTERNALSYM WN_BAD_POINTER}
- WN_BAD_VALUE = ERROR_INVALID_PARAMETER;
- {$EXTERNALSYM WN_BAD_VALUE}
- WN_BAD_USER = ERROR_BAD_USERNAME;
- {$EXTERNALSYM WN_BAD_USER}
- WN_BAD_PASSWORD = ERROR_INVALID_PASSWORD;
- {$EXTERNALSYM WN_BAD_PASSWORD}
- WN_ACCESS_DENIED = ERROR_ACCESS_DENIED;
- {$EXTERNALSYM WN_ACCESS_DENIED}
- WN_FUNCTION_BUSY = ERROR_BUSY;
- {$EXTERNALSYM WN_FUNCTION_BUSY}
- WN_WINDOWS_ERROR = ERROR_UNEXP_NET_ERR;
- {$EXTERNALSYM WN_WINDOWS_ERROR}
- WN_OUT_OF_MEMORY = ERROR_NOT_ENOUGH_MEMORY;
- {$EXTERNALSYM WN_OUT_OF_MEMORY}
- WN_NO_NETWORK = ERROR_NO_NETWORK;
- {$EXTERNALSYM WN_NO_NETWORK}
- WN_EXTENDED_ERROR = ERROR_EXTENDED_ERROR;
- {$EXTERNALSYM WN_EXTENDED_ERROR}
- WN_BAD_LEVEL = ERROR_INVALID_LEVEL;
- {$EXTERNALSYM WN_BAD_LEVEL}
- WN_BAD_HANDLE = ERROR_INVALID_HANDLE;
- {$EXTERNALSYM WN_BAD_HANDLE}
- WN_NOT_INITIALIZING = ERROR_ALREADY_INITIALIZED;
- {$EXTERNALSYM WN_NOT_INITIALIZING}
- WN_NO_MORE_DEVICES = ERROR_NO_MORE_DEVICES;
- {$EXTERNALSYM WN_NO_MORE_DEVICES}
-
-// Connection
-
- WN_NOT_CONNECTED = ERROR_NOT_CONNECTED;
- {$EXTERNALSYM WN_NOT_CONNECTED}
- WN_OPEN_FILES = ERROR_OPEN_FILES;
- {$EXTERNALSYM WN_OPEN_FILES}
- WN_DEVICE_IN_USE = ERROR_DEVICE_IN_USE;
- {$EXTERNALSYM WN_DEVICE_IN_USE}
- WN_BAD_NETNAME = ERROR_BAD_NET_NAME;
- {$EXTERNALSYM WN_BAD_NETNAME}
- WN_BAD_LOCALNAME = ERROR_BAD_DEVICE;
- {$EXTERNALSYM WN_BAD_LOCALNAME}
- WN_ALREADY_CONNECTED = ERROR_ALREADY_ASSIGNED;
- {$EXTERNALSYM WN_ALREADY_CONNECTED}
- WN_DEVICE_ERROR = ERROR_GEN_FAILURE;
- {$EXTERNALSYM WN_DEVICE_ERROR}
- WN_CONNECTION_CLOSED = ERROR_CONNECTION_UNAVAIL;
- {$EXTERNALSYM WN_CONNECTION_CLOSED}
- WN_NO_NET_OR_BAD_PATH = ERROR_NO_NET_OR_BAD_PATH;
- {$EXTERNALSYM WN_NO_NET_OR_BAD_PATH}
- WN_BAD_PROVIDER = ERROR_BAD_PROVIDER;
- {$EXTERNALSYM WN_BAD_PROVIDER}
- WN_CANNOT_OPEN_PROFILE = ERROR_CANNOT_OPEN_PROFILE;
- {$EXTERNALSYM WN_CANNOT_OPEN_PROFILE}
- WN_BAD_PROFILE = ERROR_BAD_PROFILE;
- {$EXTERNALSYM WN_BAD_PROFILE}
- WN_BAD_DEV_TYPE = ERROR_BAD_DEV_TYPE;
- {$EXTERNALSYM WN_BAD_DEV_TYPE}
- WN_DEVICE_ALREADY_REMEMBERED = ERROR_DEVICE_ALREADY_REMEMBERED;
- {$EXTERNALSYM WN_DEVICE_ALREADY_REMEMBERED}
- WN_CONNECTED_OTHER_PASSWORD = ERROR_CONNECTED_OTHER_PASSWORD;
- {$EXTERNALSYM WN_CONNECTED_OTHER_PASSWORD}
- WN_CONNECTED_OTHER_PASSWORD_DEFAULT = ERROR_CONNECTED_OTHER_PASSWORD_DEFAULT;
- {$EXTERNALSYM WN_CONNECTED_OTHER_PASSWORD_DEFAULT}
-
-// Enumeration
-
- WN_NO_MORE_ENTRIES = ERROR_NO_MORE_ITEMS;
- {$EXTERNALSYM WN_NO_MORE_ENTRIES}
- WN_NOT_CONTAINER = ERROR_NOT_CONTAINER;
- {$EXTERNALSYM WN_NOT_CONTAINER}
-
-// Authentication
-
- WN_NOT_AUTHENTICATED = ERROR_NOT_AUTHENTICATED;
- {$EXTERNALSYM WN_NOT_AUTHENTICATED}
- WN_NOT_LOGGED_ON = ERROR_NOT_LOGGED_ON;
- {$EXTERNALSYM WN_NOT_LOGGED_ON}
- WN_NOT_VALIDATED = ERROR_NO_LOGON_SERVERS;
- {$EXTERNALSYM WN_NOT_VALIDATED}
-
-//
-// For Shell
-//
-
-type
- LPNETCONNECTINFOSTRUCT = ^NETCONNECTINFOSTRUCT;
- {$EXTERNALSYM LPNETCONNECTINFOSTRUCT}
- _NETCONNECTINFOSTRUCT = record
- cbStructure: DWORD;
- dwFlags: DWORD;
- dwSpeed: DWORD;
- dwDelay: DWORD;
- dwOptDataSize: DWORD;
- end;
- {$EXTERNALSYM _NETCONNECTINFOSTRUCT}
- NETCONNECTINFOSTRUCT = _NETCONNECTINFOSTRUCT;
- {$EXTERNALSYM NETCONNECTINFOSTRUCT}
- TNetConnectInfoStruct = NETCONNECTINFOSTRUCT;
- PNetConnectInfoStruct = LPNETCONNECTINFOSTRUCT;
-
-const
- WNCON_FORNETCARD = $00000001;
- {$EXTERNALSYM WNCON_FORNETCARD}
- WNCON_NOTROUTED = $00000002;
- {$EXTERNALSYM WNCON_NOTROUTED}
- WNCON_SLOWLINK = $00000004;
- {$EXTERNALSYM WNCON_SLOWLINK}
- WNCON_DYNAMIC = $00000008;
- {$EXTERNALSYM WNCON_DYNAMIC}
-
-function MultinetGetConnectionPerformanceA(const lpNetResource: NETRESOURCEA;
- var lpNetConnectInfoStruct: NETCONNECTINFOSTRUCT): DWORD; stdcall;
-{$EXTERNALSYM MultinetGetConnectionPerformanceA}
-function MultinetGetConnectionPerformanceW(const lpNetResource: NETRESOURCEW;
- var lpNetConnectInfoStruct: NETCONNECTINFOSTRUCT): DWORD; stdcall;
-{$EXTERNALSYM MultinetGetConnectionPerformanceW}
-function MultinetGetConnectionPerformance(const lpNetResource: NETRESOURCE;
- var lpNetConnectInfoStruct: NETCONNECTINFOSTRUCT): DWORD; stdcall;
-{$EXTERNALSYM MultinetGetConnectionPerformance}
-
-implementation
-
-const
- mpr = 'mpr.dll';
- {$IFDEF UNICODE}
- AWSuffix = 'W';
- {$ELSE}
- AWSuffix = 'A';
- {$ENDIF UNICODE}
-
-{$IFDEF DYNAMIC_LINK}
-
-var
- _WNetAddConnectionA: Pointer;
-
-function WNetAddConnectionA;
-begin
- GetProcedureAddress(_WNetAddConnectionA, mpr, 'WNetAddConnectionA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WNetAddConnectionA]
- end;
-end;
-
-var
- _WNetAddConnectionW: Pointer;
-
-function WNetAddConnectionW;
-begin
- GetProcedureAddress(_WNetAddConnectionW, mpr, 'WNetAddConnectionW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WNetAddConnectionW]
- end;
-end;
-
-var
- _WNetAddConnection: Pointer;
-
-function WNetAddConnection;
-begin
- GetProcedureAddress(_WNetAddConnection, mpr, 'WNetAddConnection' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WNetAddConnection]
- end;
-end;
-
-var
- _WNetAddConnection2A: Pointer;
-
-function WNetAddConnection2A;
-begin
- GetProcedureAddress(_WNetAddConnection2A, mpr, 'WNetAddConnection2A');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WNetAddConnection2A]
- end;
-end;
-
-var
- _WNetAddConnection2W: Pointer;
-
-function WNetAddConnection2W;
-begin
- GetProcedureAddress(_WNetAddConnection2W, mpr, 'WNetAddConnection2W');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WNetAddConnection2W]
- end;
-end;
-
-var
- _WNetAddConnection2: Pointer;
-
-function WNetAddConnection2;
-begin
- GetProcedureAddress(_WNetAddConnection2, mpr, 'WNetAddConnection2' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WNetAddConnection2]
- end;
-end;
-
-var
- _WNetAddConnection3A: Pointer;
-
-function WNetAddConnection3A;
-begin
- GetProcedureAddress(_WNetAddConnection3A, mpr, 'WNetAddConnection3A');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WNetAddConnection3A]
- end;
-end;
-
-var
- _WNetAddConnection3W: Pointer;
-
-function WNetAddConnection3W;
-begin
- GetProcedureAddress(_WNetAddConnection3W, mpr, 'WNetAddConnection3W');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WNetAddConnection3W]
- end;
-end;
-
-var
- _WNetAddConnection3: Pointer;
-
-function WNetAddConnection3;
-begin
- GetProcedureAddress(_WNetAddConnection3, mpr, 'WNetAddConnection3' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WNetAddConnection3]
- end;
-end;
-
-var
- _WNetCancelConnectionA: Pointer;
-
-function WNetCancelConnectionA;
-begin
- GetProcedureAddress(_WNetCancelConnectionA, mpr, 'WNetCancelConnectionA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WNetCancelConnectionA]
- end;
-end;
-
-var
- _WNetCancelConnectionW: Pointer;
-
-function WNetCancelConnectionW;
-begin
- GetProcedureAddress(_WNetCancelConnectionW, mpr, 'WNetCancelConnectionW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WNetCancelConnectionW]
- end;
-end;
-
-var
- _WNetCancelConnection: Pointer;
-
-function WNetCancelConnection;
-begin
- GetProcedureAddress(_WNetCancelConnection, mpr, 'WNetCancelConnection' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WNetCancelConnection]
- end;
-end;
-
-var
- _WNetCancelConnection2A: Pointer;
-
-function WNetCancelConnection2A;
-begin
- GetProcedureAddress(_WNetCancelConnection2A, mpr, 'WNetCancelConnection2A');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WNetCancelConnection2A]
- end;
-end;
-
-var
- _WNetCancelConnection2W: Pointer;
-
-function WNetCancelConnection2W;
-begin
- GetProcedureAddress(_WNetCancelConnection2W, mpr, 'WNetCancelConnection2W');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WNetCancelConnection2W]
- end;
-end;
-
-var
- _WNetCancelConnection2: Pointer;
-
-function WNetCancelConnection2;
-begin
- GetProcedureAddress(_WNetCancelConnection2, mpr, 'WNetCancelConnection2' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WNetCancelConnection2]
- end;
-end;
-
-var
- _WNetGetConnectionA: Pointer;
-
-function WNetGetConnectionA;
-begin
- GetProcedureAddress(_WNetGetConnectionA, mpr, 'WNetGetConnectionA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WNetGetConnectionA]
- end;
-end;
-
-var
- _WNetGetConnectionW: Pointer;
-
-function WNetGetConnectionW;
-begin
- GetProcedureAddress(_WNetGetConnectionW, mpr, 'WNetGetConnectionW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WNetGetConnectionW]
- end;
-end;
-
-var
- _WNetGetConnection: Pointer;
-
-function WNetGetConnection;
-begin
- GetProcedureAddress(_WNetGetConnection, mpr, 'WNetGetConnection' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WNetGetConnection]
- end;
-end;
-
-var
- _WNetRestoreConnectionA: Pointer;
-
-function WNetRestoreConnectionA;
-begin
- GetProcedureAddress(_WNetRestoreConnectionA, mpr, 'WNetRestoreConnectionA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WNetRestoreConnectionA]
- end;
-end;
-
-var
- _WNetRestoreConnectionW: Pointer;
-
-function WNetRestoreConnectionW;
-begin
- GetProcedureAddress(_WNetRestoreConnectionW, mpr, 'WNetRestoreConnectionW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WNetRestoreConnectionW]
- end;
-end;
-
-var
- _WNetRestoreConnection: Pointer;
-
-function WNetRestoreConnection;
-begin
- GetProcedureAddress(_WNetRestoreConnection, mpr, 'WNetRestoreConnection' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WNetRestoreConnection]
- end;
-end;
-
-var
- _WNetUseConnectionA: Pointer;
-
-function WNetUseConnectionA;
-begin
- GetProcedureAddress(_WNetUseConnectionA, mpr, 'WNetUseConnectionA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WNetUseConnectionA]
- end;
-end;
-
-var
- _WNetUseConnectionW: Pointer;
-
-function WNetUseConnectionW;
-begin
- GetProcedureAddress(_WNetUseConnectionW, mpr, 'WNetUseConnectionW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WNetUseConnectionW]
- end;
-end;
-
-var
- _WNetUseConnection: Pointer;
-
-function WNetUseConnection;
-begin
- GetProcedureAddress(_WNetUseConnection, mpr, 'WNetUseConnection' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WNetUseConnection]
- end;
-end;
-
-var
- _WNetConnectionDialog: Pointer;
-
-function WNetConnectionDialog;
-begin
- GetProcedureAddress(_WNetConnectionDialog, mpr, 'WNetConnectionDialog');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WNetConnectionDialog]
- end;
-end;
-
-var
- _WNetDisconnectDialog: Pointer;
-
-function WNetDisconnectDialog;
-begin
- GetProcedureAddress(_WNetDisconnectDialog, mpr, 'WNetDisconnectDialog');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WNetDisconnectDialog]
- end;
-end;
-
-var
- _WNetConnectionDialog1A: Pointer;
-
-function WNetConnectionDialog1A;
-begin
- GetProcedureAddress(_WNetConnectionDialog1A, mpr, 'WNetConnectionDialog1A');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WNetConnectionDialog1A]
- end;
-end;
-
-var
- _WNetConnectionDialog1W: Pointer;
-
-function WNetConnectionDialog1W;
-begin
- GetProcedureAddress(_WNetConnectionDialog1W, mpr, 'WNetConnectionDialog1W');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WNetConnectionDialog1W]
- end;
-end;
-
-var
- _WNetConnectionDialog1: Pointer;
-
-function WNetConnectionDialog1;
-begin
- GetProcedureAddress(_WNetConnectionDialog1, mpr, 'WNetConnectionDialog1' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WNetConnectionDialog1]
- end;
-end;
-
-var
- _WNetDisconnectDialog1A: Pointer;
-
-function WNetDisconnectDialog1A;
-begin
- GetProcedureAddress(_WNetDisconnectDialog1A, mpr, 'WNetDisconnectDialog1A');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WNetDisconnectDialog1A]
- end;
-end;
-
-var
- _WNetDisconnectDialog1W: Pointer;
-
-function WNetDisconnectDialog1W;
-begin
- GetProcedureAddress(_WNetDisconnectDialog1W, mpr, 'WNetDisconnectDialog1W');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WNetDisconnectDialog1W]
- end;
-end;
-
-var
- _WNetDisconnectDialog1: Pointer;
-
-function WNetDisconnectDialog1;
-begin
- GetProcedureAddress(_WNetDisconnectDialog1, mpr, 'WNetDisconnectDialog1' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WNetDisconnectDialog1]
- end;
-end;
-
-var
- _WNetOpenEnumA: Pointer;
-
-function WNetOpenEnumA;
-begin
- GetProcedureAddress(_WNetOpenEnumA, mpr, 'WNetOpenEnumA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WNetOpenEnumA]
- end;
-end;
-
-var
- _WNetOpenEnumW: Pointer;
-
-function WNetOpenEnumW;
-begin
- GetProcedureAddress(_WNetOpenEnumW, mpr, 'WNetOpenEnumW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WNetOpenEnumW]
- end;
-end;
-
-var
- _WNetOpenEnum: Pointer;
-
-function WNetOpenEnum;
-begin
- GetProcedureAddress(_WNetOpenEnum, mpr, 'WNetOpenEnum' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WNetOpenEnum]
- end;
-end;
-
-var
- _WNetEnumResourceA: Pointer;
-
-function WNetEnumResourceA;
-begin
- GetProcedureAddress(_WNetEnumResourceA, mpr, 'WNetEnumResourceA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WNetEnumResourceA]
- end;
-end;
-
-var
- _WNetEnumResourceW: Pointer;
-
-function WNetEnumResourceW;
-begin
- GetProcedureAddress(_WNetEnumResourceW, mpr, 'WNetEnumResourceW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WNetEnumResourceW]
- end;
-end;
-
-var
- _WNetEnumResource: Pointer;
-
-function WNetEnumResource;
-begin
- GetProcedureAddress(_WNetEnumResource, mpr, 'WNetEnumResource' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WNetEnumResource]
- end;
-end;
-
-var
- _WNetCloseEnum: Pointer;
-
-function WNetCloseEnum;
-begin
- GetProcedureAddress(_WNetCloseEnum, mpr, 'WNetCloseEnum');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WNetCloseEnum]
- end;
-end;
-
-var
- _WNetGetResourceParentA: Pointer;
-
-function WNetGetResourceParentA;
-begin
- GetProcedureAddress(_WNetGetResourceParentA, mpr, 'WNetGetResourceParentA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WNetGetResourceParentA]
- end;
-end;
-
-var
- _WNetGetResourceParentW: Pointer;
-
-function WNetGetResourceParentW;
-begin
- GetProcedureAddress(_WNetGetResourceParentW, mpr, 'WNetGetResourceParentW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WNetGetResourceParentW]
- end;
-end;
-
-var
- _WNetGetResourceParent: Pointer;
-
-function WNetGetResourceParent;
-begin
- GetProcedureAddress(_WNetGetResourceParent, mpr, 'WNetGetResourceParent' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WNetGetResourceParent]
- end;
-end;
-
-var
- _WNetGetResourceInformationA: Pointer;
-
-function WNetGetResourceInformationA;
-begin
- GetProcedureAddress(_WNetGetResourceInformationA, mpr, 'WNetGetResourceInformationA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WNetGetResourceInformationA]
- end;
-end;
-
-var
- _WNetGetResourceInformationW: Pointer;
-
-function WNetGetResourceInformationW;
-begin
- GetProcedureAddress(_WNetGetResourceInformationW, mpr, 'WNetGetResourceInformationW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WNetGetResourceInformationW]
- end;
-end;
-
-var
- _WNetGetResourceInformation: Pointer;
-
-function WNetGetResourceInformation;
-begin
- GetProcedureAddress(_WNetGetResourceInformation, mpr, 'WNetGetResourceInformation' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WNetGetResourceInformation]
- end;
-end;
-
-var
- _WNetGetUniversalNameA: Pointer;
-
-function WNetGetUniversalNameA;
-begin
- GetProcedureAddress(_WNetGetUniversalNameA, mpr, 'WNetGetUniversalNameA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WNetGetUniversalNameA]
- end;
-end;
-
-var
- _WNetGetUniversalNameW: Pointer;
-
-function WNetGetUniversalNameW;
-begin
- GetProcedureAddress(_WNetGetUniversalNameW, mpr, 'WNetGetUniversalNameW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WNetGetUniversalNameW]
- end;
-end;
-
-var
- _WNetGetUniversalName: Pointer;
-
-function WNetGetUniversalName;
-begin
- GetProcedureAddress(_WNetGetUniversalName, mpr, 'WNetGetUniversalName' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WNetGetUniversalName]
- end;
-end;
-
-var
- _WNetGetUserA: Pointer;
-
-function WNetGetUserA;
-begin
- GetProcedureAddress(_WNetGetUserA, mpr, 'WNetGetUserA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WNetGetUserA]
- end;
-end;
-
-var
- _WNetGetUserW: Pointer;
-
-function WNetGetUserW;
-begin
- GetProcedureAddress(_WNetGetUserW, mpr, 'WNetGetUserW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WNetGetUserW]
- end;
-end;
-
-var
- _WNetGetUser: Pointer;
-
-function WNetGetUser;
-begin
- GetProcedureAddress(_WNetGetUser, mpr, 'WNetGetUser' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WNetGetUser]
- end;
-end;
-
-var
- _WNetGetProviderNameA: Pointer;
-
-function WNetGetProviderNameA;
-begin
- GetProcedureAddress(_WNetGetProviderNameA, mpr, 'WNetGetProviderNameA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WNetGetProviderNameA]
- end;
-end;
-
-var
- _WNetGetProviderNameW: Pointer;
-
-function WNetGetProviderNameW;
-begin
- GetProcedureAddress(_WNetGetProviderNameW, mpr, 'WNetGetProviderNameW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WNetGetProviderNameW]
- end;
-end;
-
-var
- _WNetGetProviderName: Pointer;
-
-function WNetGetProviderName;
-begin
- GetProcedureAddress(_WNetGetProviderName, mpr, 'WNetGetProviderName' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WNetGetProviderName]
- end;
-end;
-
-var
- _WNetGetNetworkInformationA: Pointer;
-
-function WNetGetNetworkInformationA;
-begin
- GetProcedureAddress(_WNetGetNetworkInformationA, mpr, 'WNetGetNetworkInformationA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WNetGetNetworkInformationA]
- end;
-end;
-
-var
- _WNetGetNetworkInformationW: Pointer;
-
-function WNetGetNetworkInformationW;
-begin
- GetProcedureAddress(_WNetGetNetworkInformationW, mpr, 'WNetGetNetworkInformationW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WNetGetNetworkInformationW]
- end;
-end;
-
-var
- _WNetGetNetworkInformation: Pointer;
-
-function WNetGetNetworkInformation;
-begin
- GetProcedureAddress(_WNetGetNetworkInformation, mpr, 'WNetGetNetworkInformation' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WNetGetNetworkInformation]
- end;
-end;
-
-var
- _WNetGetLastErrorA: Pointer;
-
-function WNetGetLastErrorA;
-begin
- GetProcedureAddress(_WNetGetLastErrorA, mpr, 'WNetGetLastErrorA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WNetGetLastErrorA]
- end;
-end;
-
-var
- _WNetGetLastErrorW: Pointer;
-
-function WNetGetLastErrorW;
-begin
- GetProcedureAddress(_WNetGetLastErrorW, mpr, 'WNetGetLastErrorW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WNetGetLastErrorW]
- end;
-end;
-
-var
- _WNetGetLastError: Pointer;
-
-function WNetGetLastError;
-begin
- GetProcedureAddress(_WNetGetLastError, mpr, 'WNetGetLastError' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WNetGetLastError]
- end;
-end;
-
-var
- _MultinetGetConnectionPerfA: Pointer;
-
-function MultinetGetConnectionPerformanceA;
-begin
- GetProcedureAddress(_MultinetGetConnectionPerfA, mpr, 'MultinetGetConnectionPerformanceA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MultinetGetConnectionPerfA]
- end;
-end;
-
-var
- _MultinetGetConnectionPerfW: Pointer;
-
-function MultinetGetConnectionPerformanceW;
-begin
- GetProcedureAddress(_MultinetGetConnectionPerfW, mpr, 'MultinetGetConnectionPerformanceW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MultinetGetConnectionPerfW]
- end;
-end;
-
-var
- _MultinetGetConnectionPerf: Pointer;
-
-function MultinetGetConnectionPerformance;
-begin
- GetProcedureAddress(_MultinetGetConnectionPerf, mpr, 'MultinetGetConnectionPerformance' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MultinetGetConnectionPerf]
- end;
-end;
-
-{$ELSE}
-
-function WNetAddConnectionA; external mpr name 'WNetAddConnectionA';
-function WNetAddConnectionW; external mpr name 'WNetAddConnectionW';
-function WNetAddConnection; external mpr name 'WNetAddConnection' + AWSuffix;
-function WNetAddConnection2A; external mpr name 'WNetAddConnection2A';
-function WNetAddConnection2W; external mpr name 'WNetAddConnection2W';
-function WNetAddConnection2; external mpr name 'WNetAddConnection2' + AWSuffix;
-function WNetAddConnection3A; external mpr name 'WNetAddConnection3A';
-function WNetAddConnection3W; external mpr name 'WNetAddConnection3W';
-function WNetAddConnection3; external mpr name 'WNetAddConnection3' + AWSuffix;
-function WNetCancelConnectionA; external mpr name 'WNetCancelConnectionA';
-function WNetCancelConnectionW; external mpr name 'WNetCancelConnectionW';
-function WNetCancelConnection; external mpr name 'WNetCancelConnection' + AWSuffix;
-function WNetCancelConnection2A; external mpr name 'WNetCancelConnection2A';
-function WNetCancelConnection2W; external mpr name 'WNetCancelConnection2W';
-function WNetCancelConnection2; external mpr name 'WNetCancelConnection2' + AWSuffix;
-function WNetGetConnectionA; external mpr name 'WNetGetConnectionA';
-function WNetGetConnectionW; external mpr name 'WNetGetConnectionW';
-function WNetGetConnection; external mpr name 'WNetGetConnection' + AWSuffix;
-function WNetRestoreConnectionA; external mpr name 'WNetRestoreConnectionA';
-function WNetRestoreConnectionW; external mpr name 'WNetRestoreConnectionW';
-function WNetRestoreConnection; external mpr name 'WNetRestoreConnection' + AWSuffix;
-function WNetUseConnectionA; external mpr name 'WNetUseConnectionA';
-function WNetUseConnectionW; external mpr name 'WNetUseConnectionW';
-function WNetUseConnection; external mpr name 'WNetUseConnection' + AWSuffix;
-function WNetConnectionDialog; external mpr name 'WNetConnectionDialog';
-function WNetDisconnectDialog; external mpr name 'WNetDisconnectDialog';
-function WNetConnectionDialog1A; external mpr name 'WNetConnectionDialog1A';
-function WNetConnectionDialog1W; external mpr name 'WNetConnectionDialog1W';
-function WNetConnectionDialog1; external mpr name 'WNetConnectionDialog1' + AWSuffix;
-function WNetDisconnectDialog1A; external mpr name 'WNetDisconnectDialog1A';
-function WNetDisconnectDialog1W; external mpr name 'WNetDisconnectDialog1W';
-function WNetDisconnectDialog1; external mpr name 'WNetDisconnectDialog1' + AWSuffix;
-function WNetOpenEnumA; external mpr name 'WNetOpenEnumA';
-function WNetOpenEnumW; external mpr name 'WNetOpenEnumW';
-function WNetOpenEnum; external mpr name 'WNetOpenEnum' + AWSuffix;
-function WNetEnumResourceA; external mpr name 'WNetEnumResourceA';
-function WNetEnumResourceW; external mpr name 'WNetEnumResourceW';
-function WNetEnumResource; external mpr name 'WNetEnumResource' + AWSuffix;
-function WNetCloseEnum; external mpr name 'WNetCloseEnum';
-function WNetGetResourceParentA; external mpr name 'WNetGetResourceParentA';
-function WNetGetResourceParentW; external mpr name 'WNetGetResourceParentW';
-function WNetGetResourceParent; external mpr name 'WNetGetResourceParent' + AWSuffix;
-function WNetGetResourceInformationA; external mpr name 'WNetGetResourceInformationA';
-function WNetGetResourceInformationW; external mpr name 'WNetGetResourceInformationW';
-function WNetGetResourceInformation; external mpr name 'WNetGetResourceInformation' + AWSuffix;
-function WNetGetUniversalNameA; external mpr name 'WNetGetUniversalNameA';
-function WNetGetUniversalNameW; external mpr name 'WNetGetUniversalNameW';
-function WNetGetUniversalName; external mpr name 'WNetGetUniversalName' + AWSuffix;
-function WNetGetUserA; external mpr name 'WNetGetUserA';
-function WNetGetUserW; external mpr name 'WNetGetUserW';
-function WNetGetUser; external mpr name 'WNetGetUser' + AWSuffix;
-function WNetGetProviderNameA; external mpr name 'WNetGetProviderNameA';
-function WNetGetProviderNameW; external mpr name 'WNetGetProviderNameW';
-function WNetGetProviderName; external mpr name 'WNetGetProviderName' + AWSuffix;
-function WNetGetNetworkInformationA; external mpr name 'WNetGetNetworkInformationA';
-function WNetGetNetworkInformationW; external mpr name 'WNetGetNetworkInformationW';
-function WNetGetNetworkInformation; external mpr name 'WNetGetNetworkInformation' + AWSuffix;
-function WNetGetLastErrorA; external mpr name 'WNetGetLastErrorA';
-function WNetGetLastErrorW; external mpr name 'WNetGetLastErrorW';
-function WNetGetLastError; external mpr name 'WNetGetLastError' + AWSuffix;
-function MultinetGetConnectionPerformanceA; external mpr name 'MultinetGetConnectionPerformanceA';
-function MultinetGetConnectionPerformanceW; external mpr name 'MultinetGetConnectionPerformanceW';
-function MultinetGetConnectionPerformance; external mpr name 'MultinetGetConnectionPerformance' + AWSuffix;
-
-{$ENDIF DYNAMIC_LINK}
-
-end.
+{******************************************************************************}
+{ }
+{ Windows Networking API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: winnetwk.h, released June 2000. The original Pascal }
+{ code is: WinNetWk.pas, released December 2000. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwawinnetwk.pas,v 1.1 2005/04/04 07:56:11 marco Exp $
+
+unit JwaWinNetWk;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "WinNetWk.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaWinError, JwaWinType;
+
+//
+// Network types
+//
+
+const
+ WNNC_NET_MSNET = $00010000;
+ {$EXTERNALSYM WNNC_NET_MSNET}
+ WNNC_NET_LANMAN = $00020000;
+ {$EXTERNALSYM WNNC_NET_LANMAN}
+ WNNC_NET_NETWARE = $00030000;
+ {$EXTERNALSYM WNNC_NET_NETWARE}
+ WNNC_NET_VINES = $00040000;
+ {$EXTERNALSYM WNNC_NET_VINES}
+ WNNC_NET_10NET = $00050000;
+ {$EXTERNALSYM WNNC_NET_10NET}
+ WNNC_NET_LOCUS = $00060000;
+ {$EXTERNALSYM WNNC_NET_LOCUS}
+ WNNC_NET_SUN_PC_NFS = $00070000;
+ {$EXTERNALSYM WNNC_NET_SUN_PC_NFS}
+ WNNC_NET_LANSTEP = $00080000;
+ {$EXTERNALSYM WNNC_NET_LANSTEP}
+ WNNC_NET_9TILES = $00090000;
+ {$EXTERNALSYM WNNC_NET_9TILES}
+ WNNC_NET_LANTASTIC = $000A0000;
+ {$EXTERNALSYM WNNC_NET_LANTASTIC}
+ WNNC_NET_AS400 = $000B0000;
+ {$EXTERNALSYM WNNC_NET_AS400}
+ WNNC_NET_FTP_NFS = $000C0000;
+ {$EXTERNALSYM WNNC_NET_FTP_NFS}
+ WNNC_NET_PATHWORKS = $000D0000;
+ {$EXTERNALSYM WNNC_NET_PATHWORKS}
+ WNNC_NET_LIFENET = $000E0000;
+ {$EXTERNALSYM WNNC_NET_LIFENET}
+ WNNC_NET_POWERLAN = $000F0000;
+ {$EXTERNALSYM WNNC_NET_POWERLAN}
+ WNNC_NET_BWNFS = $00100000;
+ {$EXTERNALSYM WNNC_NET_BWNFS}
+ WNNC_NET_COGENT = $00110000;
+ {$EXTERNALSYM WNNC_NET_COGENT}
+ WNNC_NET_FARALLON = $00120000;
+ {$EXTERNALSYM WNNC_NET_FARALLON}
+ WNNC_NET_APPLETALK = $00130000;
+ {$EXTERNALSYM WNNC_NET_APPLETALK}
+ WNNC_NET_INTERGRAPH = $00140000;
+ {$EXTERNALSYM WNNC_NET_INTERGRAPH}
+ WNNC_NET_SYMFONET = $00150000;
+ {$EXTERNALSYM WNNC_NET_SYMFONET}
+ WNNC_NET_CLEARCASE = $00160000;
+ {$EXTERNALSYM WNNC_NET_CLEARCASE}
+ WNNC_NET_FRONTIER = $00170000;
+ {$EXTERNALSYM WNNC_NET_FRONTIER}
+ WNNC_NET_BMC = $00180000;
+ {$EXTERNALSYM WNNC_NET_BMC}
+ WNNC_NET_DCE = $00190000;
+ {$EXTERNALSYM WNNC_NET_DCE}
+ WNNC_NET_AVID = $001A0000;
+ {$EXTERNALSYM WNNC_NET_AVID}
+ WNNC_NET_DOCUSPACE = $001B0000;
+ {$EXTERNALSYM WNNC_NET_DOCUSPACE}
+ WNNC_NET_MANGOSOFT = $001C0000;
+ {$EXTERNALSYM WNNC_NET_MANGOSOFT}
+ WNNC_NET_SERNET = $001D0000;
+ {$EXTERNALSYM WNNC_NET_SERNET}
+ WNNC_NET_RIVERFRONT1 = $001E0000;
+ {$EXTERNALSYM WNNC_NET_RIVERFRONT1}
+ WNNC_NET_RIVERFRONT2 = $001F0000;
+ {$EXTERNALSYM WNNC_NET_RIVERFRONT2}
+ WNNC_NET_DECORB = $00200000;
+ {$EXTERNALSYM WNNC_NET_DECORB}
+ WNNC_NET_PROTSTOR = $00210000;
+ {$EXTERNALSYM WNNC_NET_PROTSTOR}
+ WNNC_NET_FJ_REDIR = $00220000;
+ {$EXTERNALSYM WNNC_NET_FJ_REDIR}
+ WNNC_NET_DISTINCT = $00230000;
+ {$EXTERNALSYM WNNC_NET_DISTINCT}
+ WNNC_NET_TWINS = $00240000;
+ {$EXTERNALSYM WNNC_NET_TWINS}
+ WNNC_NET_RDR2SAMPLE = $00250000;
+ {$EXTERNALSYM WNNC_NET_RDR2SAMPLE}
+ WNNC_NET_CSC = $00260000;
+ {$EXTERNALSYM WNNC_NET_CSC}
+ WNNC_NET_3IN1 = $00270000;
+ {$EXTERNALSYM WNNC_NET_3IN1}
+ WNNC_NET_EXTENDNET = $00290000;
+ {$EXTERNALSYM WNNC_NET_EXTENDNET}
+ WNNC_NET_STAC = $002A0000;
+ {$EXTERNALSYM WNNC_NET_STAC}
+ WNNC_NET_FOXBAT = $002B0000;
+ {$EXTERNALSYM WNNC_NET_FOXBAT}
+ WNNC_NET_YAHOO = $002C0000;
+ {$EXTERNALSYM WNNC_NET_YAHOO}
+ WNNC_NET_EXIFS = $002D0000;
+ {$EXTERNALSYM WNNC_NET_EXIFS}
+ WNNC_NET_DAV = $002E0000;
+ {$EXTERNALSYM WNNC_NET_DAV}
+ WNNC_NET_KNOWARE = $002F0000;
+ {$EXTERNALSYM WNNC_NET_KNOWARE}
+ WNNC_NET_OBJECT_DIRE = $00300000;
+ {$EXTERNALSYM WNNC_NET_OBJECT_DIRE}
+ WNNC_NET_MASFAX = $00310000;
+ {$EXTERNALSYM WNNC_NET_MASFAX}
+ WNNC_NET_HOB_NFS = $00320000;
+ {$EXTERNALSYM WNNC_NET_HOB_NFS}
+ WNNC_NET_SHIVA = $00330000;
+ {$EXTERNALSYM WNNC_NET_SHIVA}
+ WNNC_NET_IBMAL = $00340000;
+ {$EXTERNALSYM WNNC_NET_IBMAL}
+ WNNC_NET_LOCK = $00350000;
+ {$EXTERNALSYM WNNC_NET_LOCK}
+ WNNC_NET_TERMSRV = $00360000;
+ {$EXTERNALSYM WNNC_NET_TERMSRV}
+ WNNC_NET_SRT = $00370000;
+ {$EXTERNALSYM WNNC_NET_SRT}
+ WNNC_NET_QUINCY = $00380000;
+ {$EXTERNALSYM WNNC_NET_QUINCY}
+
+ WNNC_CRED_MANAGER = DWORD($FFFF0000);
+ {$EXTERNALSYM WNNC_CRED_MANAGER}
+
+//
+// Network Resources.
+//
+
+ RESOURCE_CONNECTED = $00000001;
+ {$EXTERNALSYM RESOURCE_CONNECTED}
+ RESOURCE_GLOBALNET = $00000002;
+ {$EXTERNALSYM RESOURCE_GLOBALNET}
+ RESOURCE_REMEMBERED = $00000003;
+ {$EXTERNALSYM RESOURCE_REMEMBERED}
+ RESOURCE_RECENT = $00000004;
+ {$EXTERNALSYM RESOURCE_RECENT}
+ RESOURCE_CONTEXT = $00000005;
+ {$EXTERNALSYM RESOURCE_CONTEXT}
+
+ RESOURCETYPE_ANY = $00000000;
+ {$EXTERNALSYM RESOURCETYPE_ANY}
+ RESOURCETYPE_DISK = $00000001;
+ {$EXTERNALSYM RESOURCETYPE_DISK}
+ RESOURCETYPE_PRINT = $00000002;
+ {$EXTERNALSYM RESOURCETYPE_PRINT}
+ RESOURCETYPE_RESERVED = $00000008;
+ {$EXTERNALSYM RESOURCETYPE_RESERVED}
+ RESOURCETYPE_UNKNOWN = DWORD($FFFFFFFF);
+ {$EXTERNALSYM RESOURCETYPE_UNKNOWN}
+
+ RESOURCEUSAGE_CONNECTABLE = $00000001;
+ {$EXTERNALSYM RESOURCEUSAGE_CONNECTABLE}
+ RESOURCEUSAGE_CONTAINER = $00000002;
+ {$EXTERNALSYM RESOURCEUSAGE_CONTAINER}
+ RESOURCEUSAGE_NOLOCALDEVICE = $00000004;
+ {$EXTERNALSYM RESOURCEUSAGE_NOLOCALDEVICE}
+ RESOURCEUSAGE_SIBLING = $00000008;
+ {$EXTERNALSYM RESOURCEUSAGE_SIBLING}
+ RESOURCEUSAGE_ATTACHED = $00000010;
+ {$EXTERNALSYM RESOURCEUSAGE_ATTACHED}
+ RESOURCEUSAGE_ALL = (RESOURCEUSAGE_CONNECTABLE or
+ RESOURCEUSAGE_CONTAINER or RESOURCEUSAGE_ATTACHED);
+ {$EXTERNALSYM RESOURCEUSAGE_ALL}
+ RESOURCEUSAGE_RESERVED = DWORD($80000000);
+ {$EXTERNALSYM RESOURCEUSAGE_RESERVED}
+
+ RESOURCEDISPLAYTYPE_GENERIC = $00000000;
+ {$EXTERNALSYM RESOURCEDISPLAYTYPE_GENERIC}
+ RESOURCEDISPLAYTYPE_DOMAIN = $00000001;
+ {$EXTERNALSYM RESOURCEDISPLAYTYPE_DOMAIN}
+ RESOURCEDISPLAYTYPE_SERVER = $00000002;
+ {$EXTERNALSYM RESOURCEDISPLAYTYPE_SERVER}
+ RESOURCEDISPLAYTYPE_SHARE = $00000003;
+ {$EXTERNALSYM RESOURCEDISPLAYTYPE_SHARE}
+ RESOURCEDISPLAYTYPE_FILE = $00000004;
+ {$EXTERNALSYM RESOURCEDISPLAYTYPE_FILE}
+ RESOURCEDISPLAYTYPE_GROUP = $00000005;
+ {$EXTERNALSYM RESOURCEDISPLAYTYPE_GROUP}
+ RESOURCEDISPLAYTYPE_NETWORK = $00000006;
+ {$EXTERNALSYM RESOURCEDISPLAYTYPE_NETWORK}
+ RESOURCEDISPLAYTYPE_ROOT = $00000007;
+ {$EXTERNALSYM RESOURCEDISPLAYTYPE_ROOT}
+ RESOURCEDISPLAYTYPE_SHAREADMIN = $00000008;
+ {$EXTERNALSYM RESOURCEDISPLAYTYPE_SHAREADMIN}
+ RESOURCEDISPLAYTYPE_DIRECTORY = $00000009;
+ {$EXTERNALSYM RESOURCEDISPLAYTYPE_DIRECTORY}
+ RESOURCEDISPLAYTYPE_TREE = $0000000A;
+ {$EXTERNALSYM RESOURCEDISPLAYTYPE_TREE}
+ RESOURCEDISPLAYTYPE_NDSCONTAINER = $0000000B;
+ {$EXTERNALSYM RESOURCEDISPLAYTYPE_NDSCONTAINER}
+
+type
+ LPNETRESOURCEA = ^NETRESOURCEA;
+ {$EXTERNALSYM LPNETRESOURCEA}
+ _NETRESOURCEA = record
+ dwScope: DWORD;
+ dwType: DWORD;
+ dwDisplayType: DWORD;
+ dwUsage: DWORD;
+ lpLocalName: LPSTR;
+ lpRemoteName: LPSTR;
+ lpComment: LPSTR;
+ lpProvider: LPSTR;
+ end;
+ {$EXTERNALSYM _NETRESOURCEA}
+ NETRESOURCEA = _NETRESOURCEA;
+ {$EXTERNALSYM NETRESOURCEA}
+ TNetResourceA = NETRESOURCEA;
+ PNetResourceA = LPNETRESOURCEA;
+
+ LPNETRESOURCEW = ^NETRESOURCEW;
+ {$EXTERNALSYM LPNETRESOURCEW}
+ _NETRESOURCEW = record
+ dwScope: DWORD;
+ dwType: DWORD;
+ dwDisplayType: DWORD;
+ dwUsage: DWORD;
+ lpLocalName: LPWSTR;
+ lpRemoteName: LPWSTR;
+ lpComment: LPWSTR;
+ lpProvider: LPWSTR;
+ end;
+ {$EXTERNALSYM _NETRESOURCEW}
+ NETRESOURCEW = _NETRESOURCEW;
+ {$EXTERNALSYM NETRESOURCEW}
+ TNetResourceW = NETRESOURCEW;
+ PNetResourceW = LPNETRESOURCEW;
+
+ {$IFDEF UNICODE}
+ NETRESOURCE = NETRESOURCEW;
+ {$EXTERNALSYM NETRESOURCE}
+ LPNETRESOURCE = LPNETRESOURCEW;
+ {$EXTERNALSYM LPNETRESOURCE}
+ TNetResource = TNetResourceW;
+ PNetResource = PNetResourceW;
+ {$ELSE}
+ NETRESOURCE = NETRESOURCEA;
+ {$EXTERNALSYM NETRESOURCE}
+ LPNETRESOURCE = LPNETRESOURCEA;
+ {$EXTERNALSYM LPNETRESOURCE}
+ TNetResource = TNetResourceA;
+ PNetResource = PNetResourceA;
+ {$ENDIF UNICODE}
+
+//
+// Network Connections.
+//
+
+const
+ NETPROPERTY_PERSISTENT = 1;
+ {$EXTERNALSYM NETPROPERTY_PERSISTENT}
+
+ CONNECT_UPDATE_PROFILE = $00000001;
+ {$EXTERNALSYM CONNECT_UPDATE_PROFILE}
+ CONNECT_UPDATE_RECENT = $00000002;
+ {$EXTERNALSYM CONNECT_UPDATE_RECENT}
+ CONNECT_TEMPORARY = $00000004;
+ {$EXTERNALSYM CONNECT_TEMPORARY}
+ CONNECT_INTERACTIVE = $00000008;
+ {$EXTERNALSYM CONNECT_INTERACTIVE}
+ CONNECT_PROMPT = $00000010;
+ {$EXTERNALSYM CONNECT_PROMPT}
+ CONNECT_NEED_DRIVE = $00000020;
+ {$EXTERNALSYM CONNECT_NEED_DRIVE}
+ CONNECT_REFCOUNT = $00000040;
+ {$EXTERNALSYM CONNECT_REFCOUNT}
+ CONNECT_REDIRECT = $00000080;
+ {$EXTERNALSYM CONNECT_REDIRECT}
+ CONNECT_LOCALDRIVE = $00000100;
+ {$EXTERNALSYM CONNECT_LOCALDRIVE}
+ CONNECT_CURRENT_MEDIA = $00000200;
+ {$EXTERNALSYM CONNECT_CURRENT_MEDIA}
+ CONNECT_DEFERRED = $00000400;
+ {$EXTERNALSYM CONNECT_DEFERRED}
+ CONNECT_RESERVED = DWORD($FF000000);
+ {$EXTERNALSYM CONNECT_RESERVED}
+ CONNECT_COMMANDLINE = $00000800;
+ {$EXTERNALSYM CONNECT_COMMANDLINE}
+ CONNECT_CMD_SAVECRED = $00001000;
+ {$EXTERNALSYM CONNECT_CMD_SAVECRED}
+
+function WNetAddConnectionA(lpRemoteName, lpPassword, lpLocalName: LPCSTR): DWORD; stdcall;
+{$EXTERNALSYM WNetAddConnectionA}
+function WNetAddConnectionW(lpRemoteName, lpPassword, lpLocalName: LPCWSTR): DWORD; stdcall;
+{$EXTERNALSYM WNetAddConnectionW}
+function WNetAddConnection(lpRemoteName, lpPassword, lpLocalName: LPCTSTR): DWORD; stdcall;
+{$EXTERNALSYM WNetAddConnection}
+
+function WNetAddConnection2A(const lpNetResource: NETRESOURCEA; lpPassword: LPCSTR;
+ lpUserName: LPCSTR; dwFlags: DWORD): DWORD; stdcall;
+{$EXTERNALSYM WNetAddConnection2A}
+function WNetAddConnection2W(const lpNetResource: NETRESOURCEW; lpPassword: LPCWSTR;
+ lpUserName: LPCWSTR; dwFlags: DWORD): DWORD; stdcall;
+{$EXTERNALSYM WNetAddConnection2W}
+function WNetAddConnection2(const lpNetResource: NETRESOURCE; lpPassword: LPCTSTR;
+ lpUserName: LPCTSTR; dwFlags: DWORD): DWORD; stdcall;
+{$EXTERNALSYM WNetAddConnection2}
+
+function WNetAddConnection3A(hwndOwner: HWND; const lpNetResource: NETRESOURCEA;
+ lpPassword: LPCSTR; lpUserName: LPCSTR; dwFlags: DWORD): DWORD; stdcall;
+{$EXTERNALSYM WNetAddConnection3A}
+function WNetAddConnection3W(hwndOwner: HWND; const lpNetResource: NETRESOURCEW;
+ lpPassword: LPCWSTR; lpUserName: LPCWSTR; dwFlags: DWORD): DWORD; stdcall;
+{$EXTERNALSYM WNetAddConnection3W}
+function WNetAddConnection3(hwndOwner: HWND; const lpNetResource: LPNETRESOURCE;
+ lpPassword: LPCTSTR; lpUserName: LPCTSTR; dwFlags: DWORD): DWORD; stdcall;
+{$EXTERNALSYM WNetAddConnection3}
+
+function WNetCancelConnectionA(lpName: LPCSTR; fForce: BOOL): DWORD; stdcall;
+{$EXTERNALSYM WNetCancelConnectionA}
+function WNetCancelConnectionW(lpName: LPCWSTR; fForce: BOOL): DWORD; stdcall;
+{$EXTERNALSYM WNetCancelConnectionW}
+function WNetCancelConnection(lpName: LPCTSTR; fForce: BOOL): DWORD; stdcall;
+{$EXTERNALSYM WNetCancelConnection}
+
+function WNetCancelConnection2A(lpName: LPCSTR; dwFlags: DWORD; fForce: BOOL): DWORD; stdcall;
+{$EXTERNALSYM WNetCancelConnection2A}
+function WNetCancelConnection2W(lpName: LPCWSTR; dwFlags: DWORD; fForce: BOOL): DWORD; stdcall;
+{$EXTERNALSYM WNetCancelConnection2W}
+function WNetCancelConnection2(lpName: LPCTSTR; dwFlags: DWORD; fForce: BOOL): DWORD; stdcall;
+{$EXTERNALSYM WNetCancelConnection2}
+
+function WNetGetConnectionA(lpLocalName, lpRemoteName: LPSTR; var lpnLength: DWORD): DWORD; stdcall;
+{$EXTERNALSYM WNetGetConnectionA}
+function WNetGetConnectionW(lpLocalName, lpRemoteName: LPWSTR; var lpnLength: DWORD): DWORD; stdcall;
+{$EXTERNALSYM WNetGetConnectionW}
+function WNetGetConnection(lpLocalName, lpRemoteName: LPTSTR; var lpnLength: DWORD): DWORD; stdcall;
+{$EXTERNALSYM WNetGetConnection}
+
+function WNetRestoreConnectionA(hwndParent: HWND; lpDevice: LPCSTR): DWORD; stdcall;
+{$EXTERNALSYM WNetRestoreConnectionA}
+function WNetRestoreConnectionW(hwndParent: HWND; lpDevice: LPCWSTR): DWORD; stdcall;
+{$EXTERNALSYM WNetRestoreConnectionW}
+function WNetRestoreConnection(hwndParent: HWND; lpDevice: LPCTSTR): DWORD; stdcall;
+{$EXTERNALSYM WNetRestoreConnection}
+
+function WNetUseConnectionA(hwndOwner: HWND; const lpNetResource: NETRESOURCEA;
+ lpPassword, lpUserID: LPCSTR; dwFlags: DWORD; lpAccessName: LPSTR;
+ var lpBufferSize, lpResult: DWORD): DWORD; stdcall;
+{$EXTERNALSYM WNetUseConnectionA}
+function WNetUseConnectionW(hwndOwner: HWND; const lpNetResource: NETRESOURCEW;
+ lpPassword, lpUserID: LPCWSTR; dwFlags: DWORD; lpAccessName: LPWSTR;
+ var lpBufferSize, lpResult: DWORD): DWORD; stdcall;
+{$EXTERNALSYM WNetUseConnectionW}
+function WNetUseConnection(hwndOwner: HWND; const lpNetResource: NETRESOURCE;
+ lpPassword, lpUserID: LPCTSTR; dwFlags: DWORD; lpAccessName: LPTSTR;
+ var lpBufferSize, lpResult: DWORD): DWORD; stdcall;
+{$EXTERNALSYM WNetUseConnection}
+
+//
+// Network Connection Dialogs.
+//
+
+function WNetConnectionDialog(hwnd: HWND; dwType: DWORD): DWORD; stdcall;
+{$EXTERNALSYM WNetConnectionDialog}
+
+function WNetDisconnectDialog(hwnd: HWND; dwType: DWORD): DWORD; stdcall;
+{$EXTERNALSYM WNetDisconnectDialog}
+
+type
+ LPCONNECTDLGSTRUCTA = ^CONNECTDLGSTRUCTA;
+ {$EXTERNALSYM LPCONNECTDLGSTRUCTA}
+ _CONNECTDLGSTRUCTA = record
+ cbStructure: DWORD; // size of this structure in bytes
+ hwndOwner: HWND; // owner window for the dialog
+ lpConnRes: LPNETRESOURCEA; // Requested Resource info
+ dwFlags: DWORD; // flags (see below)
+ dwDevNum: DWORD; // number of devices connected to
+ end;
+ {$EXTERNALSYM _CONNECTDLGSTRUCTA}
+ CONNECTDLGSTRUCTA = _CONNECTDLGSTRUCTA;
+ {$EXTERNALSYM CONNECTDLGSTRUCTA}
+ TConnectDlgStructA = CONNECTDLGSTRUCTA;
+ PConnectDlgStructA = LPCONNECTDLGSTRUCTA;
+
+ LPCONNECTDLGSTRUCTW = ^CONNECTDLGSTRUCTW;
+ {$EXTERNALSYM LPCONNECTDLGSTRUCTW}
+ _CONNECTDLGSTRUCTW = record
+ cbStructure: DWORD; // size of this structure in bytes
+ hwndOwner: HWND; // owner window for the dialog
+ lpConnRes: LPNETRESOURCEW; // Requested Resource info
+ dwFlags: DWORD; // flags (see below)
+ dwDevNum: DWORD; // number of devices connected to
+ end;
+ {$EXTERNALSYM _CONNECTDLGSTRUCTW}
+ CONNECTDLGSTRUCTW = _CONNECTDLGSTRUCTW;
+ {$EXTERNALSYM CONNECTDLGSTRUCTW}
+ TConnectDlgStructW = CONNECTDLGSTRUCTW;
+ PConnectDlgStructW = LPCONNECTDLGSTRUCTW;
+
+ {$IFDEF UNICODE}
+ CONNECTDLGSTRUCT = CONNECTDLGSTRUCTW;
+ {$EXTERNALSYM CONNECTDLGSTRUCT}
+ LPCONNECTDLGSTRUCT = LPCONNECTDLGSTRUCTW;
+ {$EXTERNALSYM LPCONNECTDLGSTRUCT}
+ TConnectDlgStruct = TConnectDlgStructW;
+ PConnectDlgStruct = PConnectDlgStructW;
+ {$ELSE}
+ CONNECTDLGSTRUCT = CONNECTDLGSTRUCTA;
+ {$EXTERNALSYM CONNECTDLGSTRUCT}
+ LPCONNECTDLGSTRUCT = LPCONNECTDLGSTRUCTA;
+ {$EXTERNALSYM LPCONNECTDLGSTRUCT}
+ TConnectDlgStruct = TConnectDlgStructA;
+ PConnectDlgStruct = PConnectDlgStructA;
+ {$ENDIF UNICODE}
+
+const
+ CONNDLG_RO_PATH = $00000001; // Resource path should be read-only
+ {$EXTERNALSYM CONNDLG_RO_PATH}
+ CONNDLG_CONN_POINT = $00000002; // Netware -style movable connection point enabled
+ {$EXTERNALSYM CONNDLG_CONN_POINT}
+ CONNDLG_USE_MRU = $00000004; // Use MRU combobox
+ {$EXTERNALSYM CONNDLG_USE_MRU}
+ CONNDLG_HIDE_BOX = $00000008; // Hide persistent connect checkbox
+ {$EXTERNALSYM CONNDLG_HIDE_BOX}
+
+//
+// NOTE: Set at most ONE of the below flags. If neither flag is set,
+// then the persistence is set to whatever the user chose during
+// a previous connection
+//
+
+ CONNDLG_PERSIST = $00000010; // Force persistent connection
+ {$EXTERNALSYM CONNDLG_PERSIST}
+ CONNDLG_NOT_PERSIST = $00000020; // Force connection NOT persistent
+ {$EXTERNALSYM CONNDLG_NOT_PERSIST}
+
+function WNetConnectionDialog1A(var lpConnDlgStruct: CONNECTDLGSTRUCTA): DWORD; stdcall;
+{$EXTERNALSYM WNetConnectionDialog1A}
+function WNetConnectionDialog1W(var lpConnDlgStruct: CONNECTDLGSTRUCTW): DWORD; stdcall;
+{$EXTERNALSYM WNetConnectionDialog1W}
+function WNetConnectionDialog1(var lpConnDlgStruct: CONNECTDLGSTRUCT): DWORD; stdcall;
+{$EXTERNALSYM WNetConnectionDialog1}
+
+type
+ LPDISCDLGSTRUCTA = ^DISCDLGSTRUCTA;
+ {$EXTERNALSYM LPDISCDLGSTRUCTA}
+ _DISCDLGSTRUCTA = record
+ cbStructure: DWORD; // size of this structure in bytes
+ hwndOwner: HWND; // owner window for the dialog
+ lpLocalName: LPSTR; // local device name
+ lpRemoteName: LPSTR; // network resource name
+ dwFlags: DWORD; // flags
+ end;
+ {$EXTERNALSYM _DISCDLGSTRUCTA}
+ DISCDLGSTRUCTA = _DISCDLGSTRUCTA;
+ {$EXTERNALSYM DISCDLGSTRUCTA}
+ TDiscDlgStructA = DISCDLGSTRUCTA;
+ PDiscDlgStructA = LPDISCDLGSTRUCTA;
+
+ LPDISCDLGSTRUCTW = ^DISCDLGSTRUCTW;
+ {$EXTERNALSYM LPDISCDLGSTRUCTW}
+ _DISCDLGSTRUCTW = record
+ cbStructure: DWORD; // size of this structure in bytes
+ hwndOwner: HWND; // owner window for the dialog
+ lpLocalName: LPWSTR; // local device name
+ lpRemoteName: LPWSTR; // network resource name
+ dwFlags: DWORD; // flags
+ end;
+ {$EXTERNALSYM _DISCDLGSTRUCTW}
+ DISCDLGSTRUCTW = _DISCDLGSTRUCTW;
+ {$EXTERNALSYM DISCDLGSTRUCTW}
+ TDiscDlgStructW = DISCDLGSTRUCTW;
+ PDiscDlgStructW = LPDISCDLGSTRUCTW;
+
+ {$IFDEF UNICODE}
+ DISCDLGSTRUCT = DISCDLGSTRUCTW;
+ {$EXTERNALSYM DISCDLGSTRUCT}
+ LPDISCDLGSTRUCT = LPDISCDLGSTRUCTW;
+ {$EXTERNALSYM LPDISCDLGSTRUCT}
+ TDiscDlgStruct = TDiscDlgStructW;
+ PDiscDlgStruct = PDiscDlgStructW;
+ {$ELSE}
+ DISCDLGSTRUCT = DISCDLGSTRUCTA;
+ {$EXTERNALSYM DISCDLGSTRUCT}
+ LPDISCDLGSTRUCT = LPDISCDLGSTRUCTA;
+ {$EXTERNALSYM LPDISCDLGSTRUCT}
+ TDiscDlgStruct = TDiscDlgStructA;
+ PDiscDlgStruct = PDiscDlgStructA;
+ {$ENDIF UNICODE}
+
+const
+ DISC_UPDATE_PROFILE = $00000001;
+ {$EXTERNALSYM DISC_UPDATE_PROFILE}
+ DISC_NO_FORCE = $00000040;
+ {$EXTERNALSYM DISC_NO_FORCE}
+
+function WNetDisconnectDialog1A(const lpConnDlgStruct: DISCDLGSTRUCTA): DWORD; stdcall;
+{$EXTERNALSYM WNetDisconnectDialog1A}
+function WNetDisconnectDialog1W(const lpConnDlgStruct: DISCDLGSTRUCTW): DWORD; stdcall;
+{$EXTERNALSYM WNetDisconnectDialog1W}
+function WNetDisconnectDialog1(const lpConnDlgStruct: DISCDLGSTRUCT): DWORD; stdcall;
+{$EXTERNALSYM WNetDisconnectDialog1}
+
+//
+// Network Browsing.
+//
+
+function WNetOpenEnumA(dwScope, dwType, dwUsage: DWORD; lpNetResource: LPNETRESOURCEA;
+ var lphEnum: HANDLE): DWORD; stdcall;
+{$EXTERNALSYM WNetOpenEnumA}
+function WNetOpenEnumW(dwScope, dwType, dwUsage: DWORD; lpNetResource: LPNETRESOURCEW;
+ var lphEnum: HANDLE): DWORD; stdcall;
+{$EXTERNALSYM WNetOpenEnumW}
+function WNetOpenEnum(dwScope, dwType, dwUsage: DWORD; lpNetResource: LPNETRESOURCE;
+ var lphEnum: HANDLE): DWORD; stdcall;
+{$EXTERNALSYM WNetOpenEnum}
+
+function WNetEnumResourceA(hEnum: HANDLE; var lpcCount: DWORD; lpBuffer: LPVOID;
+ var lpBufferSize: DWORD): DWORD; stdcall;
+{$EXTERNALSYM WNetEnumResourceA}
+function WNetEnumResourceW(hEnum: HANDLE; var lpcCount: DWORD; lpBuffer: LPVOID;
+ var lpBufferSize: DWORD): DWORD; stdcall;
+{$EXTERNALSYM WNetEnumResourceW}
+function WNetEnumResource(hEnum: HANDLE; var lpcCount: DWORD; lpBuffer: LPVOID;
+ var lpBufferSize: DWORD): DWORD; stdcall;
+{$EXTERNALSYM WNetEnumResource}
+
+function WNetCloseEnum(hEnum: HANDLE): DWORD; stdcall;
+{$EXTERNALSYM WNetCloseEnum}
+
+function WNetGetResourceParentA(const lpNetResource: NETRESOURCEA;
+ lpBuffer: LPVOID; var lpcbBuffer: DWORD): DWORD; stdcall;
+{$EXTERNALSYM WNetGetResourceParentA}
+function WNetGetResourceParentW(const lpNetResource: NETRESOURCEW;
+ lpBuffer: LPVOID; var lpcbBuffer: DWORD): DWORD; stdcall;
+{$EXTERNALSYM WNetGetResourceParentW}
+function WNetGetResourceParent(const lpNetResource: NETRESOURCE;
+ lpBuffer: LPVOID; var lpcbBuffer: DWORD): DWORD; stdcall;
+{$EXTERNALSYM WNetGetResourceParent}
+
+function WNetGetResourceInformationA(const lpNetResource: NETRESOURCEA;
+ lpBuffer: LPVOID; var lpcbBuffer: DWORD; var lplpSystem: LPSTR): DWORD; stdcall;
+{$EXTERNALSYM WNetGetResourceInformationA}
+function WNetGetResourceInformationW(const lpNetResource: NETRESOURCEW;
+ lpBuffer: LPVOID; var lpcbBuffer: DWORD; var lplpSystem: LPWSTR): DWORD; stdcall;
+{$EXTERNALSYM WNetGetResourceInformationW}
+function WNetGetResourceInformation(const lpNetResource: NETRESOURCE;
+ lpBuffer: LPVOID; var lpcbBuffer: DWORD; var lplpSystem: LPTSTR): DWORD; stdcall;
+{$EXTERNALSYM WNetGetResourceInformation}
+
+//
+// Universal Naming.
+//
+
+const
+ UNIVERSAL_NAME_INFO_LEVEL = $00000001;
+ {$EXTERNALSYM UNIVERSAL_NAME_INFO_LEVEL}
+ REMOTE_NAME_INFO_LEVEL = $00000002;
+ {$EXTERNALSYM REMOTE_NAME_INFO_LEVEL}
+
+type
+ LPUNIVERSAL_NAME_INFOA = ^UNIVERSAL_NAME_INFOA;
+ {$EXTERNALSYM LPUNIVERSAL_NAME_INFOA}
+ _UNIVERSAL_NAME_INFOA = record
+ lpUniversalName: LPSTR;
+ end;
+ {$EXTERNALSYM _UNIVERSAL_NAME_INFOA}
+ UNIVERSAL_NAME_INFOA = _UNIVERSAL_NAME_INFOA;
+ {$EXTERNALSYM UNIVERSAL_NAME_INFOA}
+ TUniversalNameInfoA = UNIVERSAL_NAME_INFOA;
+ PUniversalNameInfoA = LPUNIVERSAL_NAME_INFOA;
+
+ LPUNIVERSAL_NAME_INFOW = ^UNIVERSAL_NAME_INFOW;
+ {$EXTERNALSYM LPUNIVERSAL_NAME_INFOW}
+ _UNIVERSAL_NAME_INFOW = record
+ lpUniversalName: LPWSTR;
+ end;
+ {$EXTERNALSYM _UNIVERSAL_NAME_INFOW}
+ UNIVERSAL_NAME_INFOW = _UNIVERSAL_NAME_INFOW;
+ {$EXTERNALSYM UNIVERSAL_NAME_INFOW}
+ TUniversalNameInfoW = UNIVERSAL_NAME_INFOW;
+ PUniversalNameInfoW = LPUNIVERSAL_NAME_INFOW;
+
+ {$IFDEF UNICODE}
+ UNIVERSAL_NAME_INFO = UNIVERSAL_NAME_INFOW;
+ {$EXTERNALSYM UNIVERSAL_NAME_INFO}
+ LPUNIVERSAL_NAME_INFO = LPUNIVERSAL_NAME_INFOW;
+ {$EXTERNALSYM LPUNIVERSAL_NAME_INFO}
+ TUniversalNameInfo = TUniversalNameInfoW;
+ PUniversalNameInfo = PUniversalNameInfoW;
+ {$ELSE}
+ UNIVERSAL_NAME_INFO = UNIVERSAL_NAME_INFOA;
+ {$EXTERNALSYM UNIVERSAL_NAME_INFO}
+ LPUNIVERSAL_NAME_INFO = LPUNIVERSAL_NAME_INFOA;
+ {$EXTERNALSYM LPUNIVERSAL_NAME_INFO}
+ TUniversalNameInfo = TUniversalNameInfoA;
+ PUniversalNameInfo = PUniversalNameInfoA;
+ {$ENDIF UNICODE}
+
+ LPREMOTE_NAME_INFOA = ^REMOTE_NAME_INFOA;
+ {$EXTERNALSYM LPREMOTE_NAME_INFOA}
+ _REMOTE_NAME_INFOA = record
+ lpUniversalName: LPSTR;
+ lpConnectionName: LPSTR;
+ lpRemainingPath: LPSTR;
+ end;
+ {$EXTERNALSYM _REMOTE_NAME_INFOA}
+ REMOTE_NAME_INFOA = _REMOTE_NAME_INFOA;
+ {$EXTERNALSYM REMOTE_NAME_INFOA}
+ TRemoteNameInfoA = REMOTE_NAME_INFOA;
+ PRemoteNameInfoA = LPREMOTE_NAME_INFOA;
+
+ LPREMOTE_NAME_INFOW = ^REMOTE_NAME_INFOW;
+ {$EXTERNALSYM LPREMOTE_NAME_INFOW}
+ _REMOTE_NAME_INFOW = record
+ lpUniversalName: LPWSTR;
+ lpConnectionName: LPWSTR;
+ lpRemainingPath: LPWSTR;
+ end;
+ {$EXTERNALSYM _REMOTE_NAME_INFOW}
+ REMOTE_NAME_INFOW = _REMOTE_NAME_INFOW;
+ {$EXTERNALSYM REMOTE_NAME_INFOW}
+ TRemoteNameInfoW = REMOTE_NAME_INFOW;
+ PRemoteNameInfoW = LPREMOTE_NAME_INFOW;
+
+ {$IFDEF UNICODE}
+ REMOTE_NAME_INFO = REMOTE_NAME_INFOW;
+ {$EXTERNALSYM REMOTE_NAME_INFO}
+ LPREMOTE_NAME_INFO = LPREMOTE_NAME_INFOW;
+ {$EXTERNALSYM LPREMOTE_NAME_INFO}
+ TRemoteNameInfo = TRemoteNameInfoW;
+ PRemoteNameInfo = PRemoteNameInfoW;
+ {$ELSE}
+ REMOTE_NAME_INFO = REMOTE_NAME_INFOA;
+ {$EXTERNALSYM REMOTE_NAME_INFO}
+ LPREMOTE_NAME_INFO = LPREMOTE_NAME_INFOA;
+ {$EXTERNALSYM LPREMOTE_NAME_INFO}
+ TRemoteNameInfo = TRemoteNameInfoA;
+ PRemoteNameInfo = PRemoteNameInfoA;
+ {$ENDIF UNICODE}
+
+function WNetGetUniversalNameA(lpLocalPath: LPCSTR; dwInfoLevel: DWORD;
+ lpBuffer: LPVOID; var lpBufferSize: DWORD): DWORD; stdcall;
+{$EXTERNALSYM WNetGetUniversalNameA}
+function WNetGetUniversalNameW(lpLocalPath: LPCWSTR; dwInfoLevel: DWORD;
+ lpBuffer: LPVOID; var lpBufferSize: DWORD): DWORD; stdcall;
+{$EXTERNALSYM WNetGetUniversalNameW}
+function WNetGetUniversalName(lpLocalPath: LPCTSTR; dwInfoLevel: DWORD;
+ lpBuffer: LPVOID; var lpBufferSize: DWORD): DWORD; stdcall;
+{$EXTERNALSYM WNetGetUniversalName}
+
+//
+// Authentication and Logon/Logoff.
+//
+
+function WNetGetUserA(lpName: LPCSTR; lpUserName: LPSTR; var lpnLength: DWORD): DWORD; stdcall;
+{$EXTERNALSYM WNetGetUserA}
+function WNetGetUserW(lpName: LPCWSTR; lpUserName: LPWSTR; var lpnLength: DWORD): DWORD; stdcall;
+{$EXTERNALSYM WNetGetUserW}
+function WNetGetUser(lpName: LPCTSTR; lpUserName: LPTSTR; var lpnLength: DWORD): DWORD; stdcall;
+{$EXTERNALSYM WNetGetUser}
+
+//
+// Other.
+//
+
+const
+ WNFMT_MULTILINE = $01;
+ {$EXTERNALSYM WNFMT_MULTILINE}
+ WNFMT_ABBREVIATED = $02;
+ {$EXTERNALSYM WNFMT_ABBREVIATED}
+ WNFMT_INENUM = $10;
+ {$EXTERNALSYM WNFMT_INENUM}
+ WNFMT_CONNECTION = $20;
+ {$EXTERNALSYM WNFMT_CONNECTION}
+
+function WNetGetProviderNameA(dwNetType: DWORD; lpProviderName: LPSTR;
+ var lpBufferSize: DWORD): DWORD; stdcall;
+{$EXTERNALSYM WNetGetProviderNameA}
+function WNetGetProviderNameW(dwNetType: DWORD; lpProviderName: LPWSTR;
+ var lpBufferSize: DWORD): DWORD; stdcall;
+{$EXTERNALSYM WNetGetProviderNameW}
+function WNetGetProviderName(dwNetType: DWORD; lpProviderName: LPTSTR;
+ var lpBufferSize: DWORD): DWORD; stdcall;
+{$EXTERNALSYM WNetGetProviderName}
+
+type
+ LPNETINFOSTRUCT = ^NETINFOSTRUCT;
+ {$EXTERNALSYM LPNETINFOSTRUCT}
+ _NETINFOSTRUCT = record
+ cbStructure: DWORD;
+ dwProviderVersion: DWORD;
+ dwStatus: DWORD;
+ dwCharacteristics: DWORD;
+ dwHandle: ULONG_PTR;
+ wNetType: WORD;
+ dwPrinters: DWORD;
+ dwDrives: DWORD;
+ end;
+ {$EXTERNALSYM _NETINFOSTRUCT}
+ NETINFOSTRUCT = _NETINFOSTRUCT;
+ {$EXTERNALSYM NETINFOSTRUCT}
+ TNetInfoStruct = NETINFOSTRUCT;
+ PNetInfoStruct = LPNETINFOSTRUCT;
+
+const
+ NETINFO_DLL16 = $00000001; // Provider running as 16 bit Winnet Driver
+ {$EXTERNALSYM NETINFO_DLL16}
+ NETINFO_DISKRED = $00000004; // Provider requires disk redirections to connect
+ {$EXTERNALSYM NETINFO_DISKRED}
+ NETINFO_PRINTERRED = $00000008; // Provider requires printer redirections to connect
+ {$EXTERNALSYM NETINFO_PRINTERRED}
+
+function WNetGetNetworkInformationA(lpProvider: LPCSTR;
+ var lpNetInfoStruct: NETINFOSTRUCT): DWORD; stdcall;
+{$EXTERNALSYM WNetGetNetworkInformationA}
+function WNetGetNetworkInformationW(lpProvider: LPCWSTR;
+ var lpNetInfoStruct: NETINFOSTRUCT): DWORD; stdcall;
+{$EXTERNALSYM WNetGetNetworkInformationW}
+function WNetGetNetworkInformation(lpProvider: LPCTSTR;
+ var lpNetInfoStruct: NETINFOSTRUCT): DWORD; stdcall;
+{$EXTERNALSYM WNetGetNetworkInformation}
+
+//
+// User Profiles.
+//
+
+type
+ PFNGETPROFILEPATHA = function(pszUsername: LPCSTR; pszBuffer: LPSTR;
+ cbBuffer: UINT): UINT; stdcall;
+ {$EXTERNALSYM PFNGETPROFILEPATHA}
+
+ PFNGETPROFILEPATHW = function(pszUsername: LPCWSTR; pszBuffer: LPWSTR;
+ cbBuffer: UINT): UINT; stdcall;
+ {$EXTERNALSYM PFNGETPROFILEPATHW}
+
+ {$IFDEF UNICODE}
+ PFNGETPROFILEPATH = PFNGETPROFILEPATHW;
+ {$EXTERNALSYM PFNGETPROFILEPATH}
+ {$ELSE}
+ PFNGETPROFILEPATH = PFNGETPROFILEPATHA;
+ {$EXTERNALSYM PFNGETPROFILEPATH}
+ {$ENDIF UNICODE}
+
+ PFNRECONCILEPROFILEA = function(pszCentralFile, pszLocalFile: LPCSTR;
+ dwFlags: DWORD): UINT; stdcall;
+ {$EXTERNALSYM PFNRECONCILEPROFILEA}
+ PFNRECONCILEPROFILEW = function(pszCentralFile, pszLocalFile: LPCWSTR;
+ dwFlags: DWORD): UINT; stdcall;
+ {$EXTERNALSYM PFNRECONCILEPROFILEW}
+ PFNRECONCILEPROFILE = function(pszCentralFile, pszLocalFile: LPCTSTR;
+ dwFlags: DWORD): UINT; stdcall;
+ {$EXTERNALSYM PFNRECONCILEPROFILE}
+
+const
+ RP_LOGON = $01; // if set, do for logon, else for logoff
+ {$EXTERNALSYM RP_LOGON}
+ RP_INIFILE = $02; // if set, reconcile .INI file, else reg. hive
+ {$EXTERNALSYM RP_INIFILE}
+
+//
+// Policies.
+//
+
+type
+ PFNPROCESSPOLICIESA = function(hwnd: HWND; pszPath, pszUsername,
+ pszComputerName: LPCSTR; dwFlags: DWORD): BOOL; stdcall;
+ {$EXTERNALSYM PFNPROCESSPOLICIESA}
+ PFNPROCESSPOLICIESW = function(hwnd: HWND; pszPath, pszUsername,
+ pszComputerName: LPCWSTR; dwFlags: DWORD): BOOL; stdcall;
+ {$EXTERNALSYM PFNPROCESSPOLICIESW}
+ PFNPROCESSPOLICIES = function(hwnd: HWND; pszPath, pszUsername,
+ pszComputerName: LPCTSTR; dwFlags: DWORD): BOOL; stdcall;
+ {$EXTERNALSYM PFNPROCESSPOLICIES}
+
+const
+ PP_DISPLAYERRORS = $01; // if set, display error messages, else fail silently if error
+ {$EXTERNALSYM PP_DISPLAYERRORS}
+
+//
+// Error handling.
+//
+
+function WNetGetLastErrorA(var lpError: DWORD; lpErrorBuf: LPSTR;
+ nErrorBufSize: DWORD; lpNameBuf: LPSTR; nNameBufSize: DWORD): DWORD; stdcall;
+{$EXTERNALSYM WNetGetLastErrorA}
+function WNetGetLastErrorW(var lpError: DWORD; lpErrorBuf: LPWSTR;
+ nErrorBufSize: DWORD; lpNameBuf: LPWSTR; nNameBufSize: DWORD): DWORD; stdcall;
+{$EXTERNALSYM WNetGetLastErrorW}
+function WNetGetLastError(var lpError: DWORD; lpErrorBuf: LPTSTR;
+ nErrorBufSize: DWORD; lpNameBuf: LPTSTR; nNameBufSize: DWORD): DWORD; stdcall;
+{$EXTERNALSYM WNetGetLastError}
+
+//
+// STATUS CODES
+//
+
+// General
+
+const
+ WN_SUCCESS = NO_ERROR;
+ {$EXTERNALSYM WN_SUCCESS}
+ WN_NO_ERROR = NO_ERROR;
+ {$EXTERNALSYM WN_NO_ERROR}
+ WN_NOT_SUPPORTED = ERROR_NOT_SUPPORTED;
+ {$EXTERNALSYM WN_NOT_SUPPORTED}
+ WN_CANCEL = ERROR_CANCELLED;
+ {$EXTERNALSYM WN_CANCEL}
+ WN_RETRY = ERROR_RETRY;
+ {$EXTERNALSYM WN_RETRY}
+ WN_NET_ERROR = ERROR_UNEXP_NET_ERR;
+ {$EXTERNALSYM WN_NET_ERROR}
+ WN_MORE_DATA = ERROR_MORE_DATA;
+ {$EXTERNALSYM WN_MORE_DATA}
+ WN_BAD_POINTER = ERROR_INVALID_ADDRESS;
+ {$EXTERNALSYM WN_BAD_POINTER}
+ WN_BAD_VALUE = ERROR_INVALID_PARAMETER;
+ {$EXTERNALSYM WN_BAD_VALUE}
+ WN_BAD_USER = ERROR_BAD_USERNAME;
+ {$EXTERNALSYM WN_BAD_USER}
+ WN_BAD_PASSWORD = ERROR_INVALID_PASSWORD;
+ {$EXTERNALSYM WN_BAD_PASSWORD}
+ WN_ACCESS_DENIED = ERROR_ACCESS_DENIED;
+ {$EXTERNALSYM WN_ACCESS_DENIED}
+ WN_FUNCTION_BUSY = ERROR_BUSY;
+ {$EXTERNALSYM WN_FUNCTION_BUSY}
+ WN_WINDOWS_ERROR = ERROR_UNEXP_NET_ERR;
+ {$EXTERNALSYM WN_WINDOWS_ERROR}
+ WN_OUT_OF_MEMORY = ERROR_NOT_ENOUGH_MEMORY;
+ {$EXTERNALSYM WN_OUT_OF_MEMORY}
+ WN_NO_NETWORK = ERROR_NO_NETWORK;
+ {$EXTERNALSYM WN_NO_NETWORK}
+ WN_EXTENDED_ERROR = ERROR_EXTENDED_ERROR;
+ {$EXTERNALSYM WN_EXTENDED_ERROR}
+ WN_BAD_LEVEL = ERROR_INVALID_LEVEL;
+ {$EXTERNALSYM WN_BAD_LEVEL}
+ WN_BAD_HANDLE = ERROR_INVALID_HANDLE;
+ {$EXTERNALSYM WN_BAD_HANDLE}
+ WN_NOT_INITIALIZING = ERROR_ALREADY_INITIALIZED;
+ {$EXTERNALSYM WN_NOT_INITIALIZING}
+ WN_NO_MORE_DEVICES = ERROR_NO_MORE_DEVICES;
+ {$EXTERNALSYM WN_NO_MORE_DEVICES}
+
+// Connection
+
+ WN_NOT_CONNECTED = ERROR_NOT_CONNECTED;
+ {$EXTERNALSYM WN_NOT_CONNECTED}
+ WN_OPEN_FILES = ERROR_OPEN_FILES;
+ {$EXTERNALSYM WN_OPEN_FILES}
+ WN_DEVICE_IN_USE = ERROR_DEVICE_IN_USE;
+ {$EXTERNALSYM WN_DEVICE_IN_USE}
+ WN_BAD_NETNAME = ERROR_BAD_NET_NAME;
+ {$EXTERNALSYM WN_BAD_NETNAME}
+ WN_BAD_LOCALNAME = ERROR_BAD_DEVICE;
+ {$EXTERNALSYM WN_BAD_LOCALNAME}
+ WN_ALREADY_CONNECTED = ERROR_ALREADY_ASSIGNED;
+ {$EXTERNALSYM WN_ALREADY_CONNECTED}
+ WN_DEVICE_ERROR = ERROR_GEN_FAILURE;
+ {$EXTERNALSYM WN_DEVICE_ERROR}
+ WN_CONNECTION_CLOSED = ERROR_CONNECTION_UNAVAIL;
+ {$EXTERNALSYM WN_CONNECTION_CLOSED}
+ WN_NO_NET_OR_BAD_PATH = ERROR_NO_NET_OR_BAD_PATH;
+ {$EXTERNALSYM WN_NO_NET_OR_BAD_PATH}
+ WN_BAD_PROVIDER = ERROR_BAD_PROVIDER;
+ {$EXTERNALSYM WN_BAD_PROVIDER}
+ WN_CANNOT_OPEN_PROFILE = ERROR_CANNOT_OPEN_PROFILE;
+ {$EXTERNALSYM WN_CANNOT_OPEN_PROFILE}
+ WN_BAD_PROFILE = ERROR_BAD_PROFILE;
+ {$EXTERNALSYM WN_BAD_PROFILE}
+ WN_BAD_DEV_TYPE = ERROR_BAD_DEV_TYPE;
+ {$EXTERNALSYM WN_BAD_DEV_TYPE}
+ WN_DEVICE_ALREADY_REMEMBERED = ERROR_DEVICE_ALREADY_REMEMBERED;
+ {$EXTERNALSYM WN_DEVICE_ALREADY_REMEMBERED}
+ WN_CONNECTED_OTHER_PASSWORD = ERROR_CONNECTED_OTHER_PASSWORD;
+ {$EXTERNALSYM WN_CONNECTED_OTHER_PASSWORD}
+ WN_CONNECTED_OTHER_PASSWORD_DEFAULT = ERROR_CONNECTED_OTHER_PASSWORD_DEFAULT;
+ {$EXTERNALSYM WN_CONNECTED_OTHER_PASSWORD_DEFAULT}
+
+// Enumeration
+
+ WN_NO_MORE_ENTRIES = ERROR_NO_MORE_ITEMS;
+ {$EXTERNALSYM WN_NO_MORE_ENTRIES}
+ WN_NOT_CONTAINER = ERROR_NOT_CONTAINER;
+ {$EXTERNALSYM WN_NOT_CONTAINER}
+
+// Authentication
+
+ WN_NOT_AUTHENTICATED = ERROR_NOT_AUTHENTICATED;
+ {$EXTERNALSYM WN_NOT_AUTHENTICATED}
+ WN_NOT_LOGGED_ON = ERROR_NOT_LOGGED_ON;
+ {$EXTERNALSYM WN_NOT_LOGGED_ON}
+ WN_NOT_VALIDATED = ERROR_NO_LOGON_SERVERS;
+ {$EXTERNALSYM WN_NOT_VALIDATED}
+
+//
+// For Shell
+//
+
+type
+ LPNETCONNECTINFOSTRUCT = ^NETCONNECTINFOSTRUCT;
+ {$EXTERNALSYM LPNETCONNECTINFOSTRUCT}
+ _NETCONNECTINFOSTRUCT = record
+ cbStructure: DWORD;
+ dwFlags: DWORD;
+ dwSpeed: DWORD;
+ dwDelay: DWORD;
+ dwOptDataSize: DWORD;
+ end;
+ {$EXTERNALSYM _NETCONNECTINFOSTRUCT}
+ NETCONNECTINFOSTRUCT = _NETCONNECTINFOSTRUCT;
+ {$EXTERNALSYM NETCONNECTINFOSTRUCT}
+ TNetConnectInfoStruct = NETCONNECTINFOSTRUCT;
+ PNetConnectInfoStruct = LPNETCONNECTINFOSTRUCT;
+
+const
+ WNCON_FORNETCARD = $00000001;
+ {$EXTERNALSYM WNCON_FORNETCARD}
+ WNCON_NOTROUTED = $00000002;
+ {$EXTERNALSYM WNCON_NOTROUTED}
+ WNCON_SLOWLINK = $00000004;
+ {$EXTERNALSYM WNCON_SLOWLINK}
+ WNCON_DYNAMIC = $00000008;
+ {$EXTERNALSYM WNCON_DYNAMIC}
+
+function MultinetGetConnectionPerformanceA(const lpNetResource: NETRESOURCEA;
+ var lpNetConnectInfoStruct: NETCONNECTINFOSTRUCT): DWORD; stdcall;
+{$EXTERNALSYM MultinetGetConnectionPerformanceA}
+function MultinetGetConnectionPerformanceW(const lpNetResource: NETRESOURCEW;
+ var lpNetConnectInfoStruct: NETCONNECTINFOSTRUCT): DWORD; stdcall;
+{$EXTERNALSYM MultinetGetConnectionPerformanceW}
+function MultinetGetConnectionPerformance(const lpNetResource: NETRESOURCE;
+ var lpNetConnectInfoStruct: NETCONNECTINFOSTRUCT): DWORD; stdcall;
+{$EXTERNALSYM MultinetGetConnectionPerformance}
+
+implementation
+
+const
+ mpr = 'mpr.dll';
+ {$IFDEF UNICODE}
+ AWSuffix = 'W';
+ {$ELSE}
+ AWSuffix = 'A';
+ {$ENDIF UNICODE}
+
+{$IFDEF DYNAMIC_LINK}
+
+var
+ _WNetAddConnectionA: Pointer;
+
+function WNetAddConnectionA;
+begin
+ GetProcedureAddress(_WNetAddConnectionA, mpr, 'WNetAddConnectionA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WNetAddConnectionA]
+ end;
+end;
+
+var
+ _WNetAddConnectionW: Pointer;
+
+function WNetAddConnectionW;
+begin
+ GetProcedureAddress(_WNetAddConnectionW, mpr, 'WNetAddConnectionW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WNetAddConnectionW]
+ end;
+end;
+
+var
+ _WNetAddConnection: Pointer;
+
+function WNetAddConnection;
+begin
+ GetProcedureAddress(_WNetAddConnection, mpr, 'WNetAddConnection' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WNetAddConnection]
+ end;
+end;
+
+var
+ _WNetAddConnection2A: Pointer;
+
+function WNetAddConnection2A;
+begin
+ GetProcedureAddress(_WNetAddConnection2A, mpr, 'WNetAddConnection2A');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WNetAddConnection2A]
+ end;
+end;
+
+var
+ _WNetAddConnection2W: Pointer;
+
+function WNetAddConnection2W;
+begin
+ GetProcedureAddress(_WNetAddConnection2W, mpr, 'WNetAddConnection2W');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WNetAddConnection2W]
+ end;
+end;
+
+var
+ _WNetAddConnection2: Pointer;
+
+function WNetAddConnection2;
+begin
+ GetProcedureAddress(_WNetAddConnection2, mpr, 'WNetAddConnection2' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WNetAddConnection2]
+ end;
+end;
+
+var
+ _WNetAddConnection3A: Pointer;
+
+function WNetAddConnection3A;
+begin
+ GetProcedureAddress(_WNetAddConnection3A, mpr, 'WNetAddConnection3A');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WNetAddConnection3A]
+ end;
+end;
+
+var
+ _WNetAddConnection3W: Pointer;
+
+function WNetAddConnection3W;
+begin
+ GetProcedureAddress(_WNetAddConnection3W, mpr, 'WNetAddConnection3W');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WNetAddConnection3W]
+ end;
+end;
+
+var
+ _WNetAddConnection3: Pointer;
+
+function WNetAddConnection3;
+begin
+ GetProcedureAddress(_WNetAddConnection3, mpr, 'WNetAddConnection3' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WNetAddConnection3]
+ end;
+end;
+
+var
+ _WNetCancelConnectionA: Pointer;
+
+function WNetCancelConnectionA;
+begin
+ GetProcedureAddress(_WNetCancelConnectionA, mpr, 'WNetCancelConnectionA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WNetCancelConnectionA]
+ end;
+end;
+
+var
+ _WNetCancelConnectionW: Pointer;
+
+function WNetCancelConnectionW;
+begin
+ GetProcedureAddress(_WNetCancelConnectionW, mpr, 'WNetCancelConnectionW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WNetCancelConnectionW]
+ end;
+end;
+
+var
+ _WNetCancelConnection: Pointer;
+
+function WNetCancelConnection;
+begin
+ GetProcedureAddress(_WNetCancelConnection, mpr, 'WNetCancelConnection' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WNetCancelConnection]
+ end;
+end;
+
+var
+ _WNetCancelConnection2A: Pointer;
+
+function WNetCancelConnection2A;
+begin
+ GetProcedureAddress(_WNetCancelConnection2A, mpr, 'WNetCancelConnection2A');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WNetCancelConnection2A]
+ end;
+end;
+
+var
+ _WNetCancelConnection2W: Pointer;
+
+function WNetCancelConnection2W;
+begin
+ GetProcedureAddress(_WNetCancelConnection2W, mpr, 'WNetCancelConnection2W');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WNetCancelConnection2W]
+ end;
+end;
+
+var
+ _WNetCancelConnection2: Pointer;
+
+function WNetCancelConnection2;
+begin
+ GetProcedureAddress(_WNetCancelConnection2, mpr, 'WNetCancelConnection2' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WNetCancelConnection2]
+ end;
+end;
+
+var
+ _WNetGetConnectionA: Pointer;
+
+function WNetGetConnectionA;
+begin
+ GetProcedureAddress(_WNetGetConnectionA, mpr, 'WNetGetConnectionA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WNetGetConnectionA]
+ end;
+end;
+
+var
+ _WNetGetConnectionW: Pointer;
+
+function WNetGetConnectionW;
+begin
+ GetProcedureAddress(_WNetGetConnectionW, mpr, 'WNetGetConnectionW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WNetGetConnectionW]
+ end;
+end;
+
+var
+ _WNetGetConnection: Pointer;
+
+function WNetGetConnection;
+begin
+ GetProcedureAddress(_WNetGetConnection, mpr, 'WNetGetConnection' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WNetGetConnection]
+ end;
+end;
+
+var
+ _WNetRestoreConnectionA: Pointer;
+
+function WNetRestoreConnectionA;
+begin
+ GetProcedureAddress(_WNetRestoreConnectionA, mpr, 'WNetRestoreConnectionA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WNetRestoreConnectionA]
+ end;
+end;
+
+var
+ _WNetRestoreConnectionW: Pointer;
+
+function WNetRestoreConnectionW;
+begin
+ GetProcedureAddress(_WNetRestoreConnectionW, mpr, 'WNetRestoreConnectionW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WNetRestoreConnectionW]
+ end;
+end;
+
+var
+ _WNetRestoreConnection: Pointer;
+
+function WNetRestoreConnection;
+begin
+ GetProcedureAddress(_WNetRestoreConnection, mpr, 'WNetRestoreConnection' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WNetRestoreConnection]
+ end;
+end;
+
+var
+ _WNetUseConnectionA: Pointer;
+
+function WNetUseConnectionA;
+begin
+ GetProcedureAddress(_WNetUseConnectionA, mpr, 'WNetUseConnectionA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WNetUseConnectionA]
+ end;
+end;
+
+var
+ _WNetUseConnectionW: Pointer;
+
+function WNetUseConnectionW;
+begin
+ GetProcedureAddress(_WNetUseConnectionW, mpr, 'WNetUseConnectionW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WNetUseConnectionW]
+ end;
+end;
+
+var
+ _WNetUseConnection: Pointer;
+
+function WNetUseConnection;
+begin
+ GetProcedureAddress(_WNetUseConnection, mpr, 'WNetUseConnection' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WNetUseConnection]
+ end;
+end;
+
+var
+ _WNetConnectionDialog: Pointer;
+
+function WNetConnectionDialog;
+begin
+ GetProcedureAddress(_WNetConnectionDialog, mpr, 'WNetConnectionDialog');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WNetConnectionDialog]
+ end;
+end;
+
+var
+ _WNetDisconnectDialog: Pointer;
+
+function WNetDisconnectDialog;
+begin
+ GetProcedureAddress(_WNetDisconnectDialog, mpr, 'WNetDisconnectDialog');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WNetDisconnectDialog]
+ end;
+end;
+
+var
+ _WNetConnectionDialog1A: Pointer;
+
+function WNetConnectionDialog1A;
+begin
+ GetProcedureAddress(_WNetConnectionDialog1A, mpr, 'WNetConnectionDialog1A');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WNetConnectionDialog1A]
+ end;
+end;
+
+var
+ _WNetConnectionDialog1W: Pointer;
+
+function WNetConnectionDialog1W;
+begin
+ GetProcedureAddress(_WNetConnectionDialog1W, mpr, 'WNetConnectionDialog1W');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WNetConnectionDialog1W]
+ end;
+end;
+
+var
+ _WNetConnectionDialog1: Pointer;
+
+function WNetConnectionDialog1;
+begin
+ GetProcedureAddress(_WNetConnectionDialog1, mpr, 'WNetConnectionDialog1' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WNetConnectionDialog1]
+ end;
+end;
+
+var
+ _WNetDisconnectDialog1A: Pointer;
+
+function WNetDisconnectDialog1A;
+begin
+ GetProcedureAddress(_WNetDisconnectDialog1A, mpr, 'WNetDisconnectDialog1A');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WNetDisconnectDialog1A]
+ end;
+end;
+
+var
+ _WNetDisconnectDialog1W: Pointer;
+
+function WNetDisconnectDialog1W;
+begin
+ GetProcedureAddress(_WNetDisconnectDialog1W, mpr, 'WNetDisconnectDialog1W');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WNetDisconnectDialog1W]
+ end;
+end;
+
+var
+ _WNetDisconnectDialog1: Pointer;
+
+function WNetDisconnectDialog1;
+begin
+ GetProcedureAddress(_WNetDisconnectDialog1, mpr, 'WNetDisconnectDialog1' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WNetDisconnectDialog1]
+ end;
+end;
+
+var
+ _WNetOpenEnumA: Pointer;
+
+function WNetOpenEnumA;
+begin
+ GetProcedureAddress(_WNetOpenEnumA, mpr, 'WNetOpenEnumA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WNetOpenEnumA]
+ end;
+end;
+
+var
+ _WNetOpenEnumW: Pointer;
+
+function WNetOpenEnumW;
+begin
+ GetProcedureAddress(_WNetOpenEnumW, mpr, 'WNetOpenEnumW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WNetOpenEnumW]
+ end;
+end;
+
+var
+ _WNetOpenEnum: Pointer;
+
+function WNetOpenEnum;
+begin
+ GetProcedureAddress(_WNetOpenEnum, mpr, 'WNetOpenEnum' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WNetOpenEnum]
+ end;
+end;
+
+var
+ _WNetEnumResourceA: Pointer;
+
+function WNetEnumResourceA;
+begin
+ GetProcedureAddress(_WNetEnumResourceA, mpr, 'WNetEnumResourceA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WNetEnumResourceA]
+ end;
+end;
+
+var
+ _WNetEnumResourceW: Pointer;
+
+function WNetEnumResourceW;
+begin
+ GetProcedureAddress(_WNetEnumResourceW, mpr, 'WNetEnumResourceW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WNetEnumResourceW]
+ end;
+end;
+
+var
+ _WNetEnumResource: Pointer;
+
+function WNetEnumResource;
+begin
+ GetProcedureAddress(_WNetEnumResource, mpr, 'WNetEnumResource' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WNetEnumResource]
+ end;
+end;
+
+var
+ _WNetCloseEnum: Pointer;
+
+function WNetCloseEnum;
+begin
+ GetProcedureAddress(_WNetCloseEnum, mpr, 'WNetCloseEnum');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WNetCloseEnum]
+ end;
+end;
+
+var
+ _WNetGetResourceParentA: Pointer;
+
+function WNetGetResourceParentA;
+begin
+ GetProcedureAddress(_WNetGetResourceParentA, mpr, 'WNetGetResourceParentA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WNetGetResourceParentA]
+ end;
+end;
+
+var
+ _WNetGetResourceParentW: Pointer;
+
+function WNetGetResourceParentW;
+begin
+ GetProcedureAddress(_WNetGetResourceParentW, mpr, 'WNetGetResourceParentW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WNetGetResourceParentW]
+ end;
+end;
+
+var
+ _WNetGetResourceParent: Pointer;
+
+function WNetGetResourceParent;
+begin
+ GetProcedureAddress(_WNetGetResourceParent, mpr, 'WNetGetResourceParent' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WNetGetResourceParent]
+ end;
+end;
+
+var
+ _WNetGetResourceInformationA: Pointer;
+
+function WNetGetResourceInformationA;
+begin
+ GetProcedureAddress(_WNetGetResourceInformationA, mpr, 'WNetGetResourceInformationA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WNetGetResourceInformationA]
+ end;
+end;
+
+var
+ _WNetGetResourceInformationW: Pointer;
+
+function WNetGetResourceInformationW;
+begin
+ GetProcedureAddress(_WNetGetResourceInformationW, mpr, 'WNetGetResourceInformationW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WNetGetResourceInformationW]
+ end;
+end;
+
+var
+ _WNetGetResourceInformation: Pointer;
+
+function WNetGetResourceInformation;
+begin
+ GetProcedureAddress(_WNetGetResourceInformation, mpr, 'WNetGetResourceInformation' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WNetGetResourceInformation]
+ end;
+end;
+
+var
+ _WNetGetUniversalNameA: Pointer;
+
+function WNetGetUniversalNameA;
+begin
+ GetProcedureAddress(_WNetGetUniversalNameA, mpr, 'WNetGetUniversalNameA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WNetGetUniversalNameA]
+ end;
+end;
+
+var
+ _WNetGetUniversalNameW: Pointer;
+
+function WNetGetUniversalNameW;
+begin
+ GetProcedureAddress(_WNetGetUniversalNameW, mpr, 'WNetGetUniversalNameW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WNetGetUniversalNameW]
+ end;
+end;
+
+var
+ _WNetGetUniversalName: Pointer;
+
+function WNetGetUniversalName;
+begin
+ GetProcedureAddress(_WNetGetUniversalName, mpr, 'WNetGetUniversalName' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WNetGetUniversalName]
+ end;
+end;
+
+var
+ _WNetGetUserA: Pointer;
+
+function WNetGetUserA;
+begin
+ GetProcedureAddress(_WNetGetUserA, mpr, 'WNetGetUserA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WNetGetUserA]
+ end;
+end;
+
+var
+ _WNetGetUserW: Pointer;
+
+function WNetGetUserW;
+begin
+ GetProcedureAddress(_WNetGetUserW, mpr, 'WNetGetUserW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WNetGetUserW]
+ end;
+end;
+
+var
+ _WNetGetUser: Pointer;
+
+function WNetGetUser;
+begin
+ GetProcedureAddress(_WNetGetUser, mpr, 'WNetGetUser' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WNetGetUser]
+ end;
+end;
+
+var
+ _WNetGetProviderNameA: Pointer;
+
+function WNetGetProviderNameA;
+begin
+ GetProcedureAddress(_WNetGetProviderNameA, mpr, 'WNetGetProviderNameA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WNetGetProviderNameA]
+ end;
+end;
+
+var
+ _WNetGetProviderNameW: Pointer;
+
+function WNetGetProviderNameW;
+begin
+ GetProcedureAddress(_WNetGetProviderNameW, mpr, 'WNetGetProviderNameW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WNetGetProviderNameW]
+ end;
+end;
+
+var
+ _WNetGetProviderName: Pointer;
+
+function WNetGetProviderName;
+begin
+ GetProcedureAddress(_WNetGetProviderName, mpr, 'WNetGetProviderName' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WNetGetProviderName]
+ end;
+end;
+
+var
+ _WNetGetNetworkInformationA: Pointer;
+
+function WNetGetNetworkInformationA;
+begin
+ GetProcedureAddress(_WNetGetNetworkInformationA, mpr, 'WNetGetNetworkInformationA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WNetGetNetworkInformationA]
+ end;
+end;
+
+var
+ _WNetGetNetworkInformationW: Pointer;
+
+function WNetGetNetworkInformationW;
+begin
+ GetProcedureAddress(_WNetGetNetworkInformationW, mpr, 'WNetGetNetworkInformationW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WNetGetNetworkInformationW]
+ end;
+end;
+
+var
+ _WNetGetNetworkInformation: Pointer;
+
+function WNetGetNetworkInformation;
+begin
+ GetProcedureAddress(_WNetGetNetworkInformation, mpr, 'WNetGetNetworkInformation' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WNetGetNetworkInformation]
+ end;
+end;
+
+var
+ _WNetGetLastErrorA: Pointer;
+
+function WNetGetLastErrorA;
+begin
+ GetProcedureAddress(_WNetGetLastErrorA, mpr, 'WNetGetLastErrorA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WNetGetLastErrorA]
+ end;
+end;
+
+var
+ _WNetGetLastErrorW: Pointer;
+
+function WNetGetLastErrorW;
+begin
+ GetProcedureAddress(_WNetGetLastErrorW, mpr, 'WNetGetLastErrorW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WNetGetLastErrorW]
+ end;
+end;
+
+var
+ _WNetGetLastError: Pointer;
+
+function WNetGetLastError;
+begin
+ GetProcedureAddress(_WNetGetLastError, mpr, 'WNetGetLastError' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WNetGetLastError]
+ end;
+end;
+
+var
+ _MultinetGetConnectionPerfA: Pointer;
+
+function MultinetGetConnectionPerformanceA;
+begin
+ GetProcedureAddress(_MultinetGetConnectionPerfA, mpr, 'MultinetGetConnectionPerformanceA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MultinetGetConnectionPerfA]
+ end;
+end;
+
+var
+ _MultinetGetConnectionPerfW: Pointer;
+
+function MultinetGetConnectionPerformanceW;
+begin
+ GetProcedureAddress(_MultinetGetConnectionPerfW, mpr, 'MultinetGetConnectionPerformanceW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MultinetGetConnectionPerfW]
+ end;
+end;
+
+var
+ _MultinetGetConnectionPerf: Pointer;
+
+function MultinetGetConnectionPerformance;
+begin
+ GetProcedureAddress(_MultinetGetConnectionPerf, mpr, 'MultinetGetConnectionPerformance' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MultinetGetConnectionPerf]
+ end;
+end;
+
+{$ELSE}
+
+function WNetAddConnectionA; external mpr name 'WNetAddConnectionA';
+function WNetAddConnectionW; external mpr name 'WNetAddConnectionW';
+function WNetAddConnection; external mpr name 'WNetAddConnection' + AWSuffix;
+function WNetAddConnection2A; external mpr name 'WNetAddConnection2A';
+function WNetAddConnection2W; external mpr name 'WNetAddConnection2W';
+function WNetAddConnection2; external mpr name 'WNetAddConnection2' + AWSuffix;
+function WNetAddConnection3A; external mpr name 'WNetAddConnection3A';
+function WNetAddConnection3W; external mpr name 'WNetAddConnection3W';
+function WNetAddConnection3; external mpr name 'WNetAddConnection3' + AWSuffix;
+function WNetCancelConnectionA; external mpr name 'WNetCancelConnectionA';
+function WNetCancelConnectionW; external mpr name 'WNetCancelConnectionW';
+function WNetCancelConnection; external mpr name 'WNetCancelConnection' + AWSuffix;
+function WNetCancelConnection2A; external mpr name 'WNetCancelConnection2A';
+function WNetCancelConnection2W; external mpr name 'WNetCancelConnection2W';
+function WNetCancelConnection2; external mpr name 'WNetCancelConnection2' + AWSuffix;
+function WNetGetConnectionA; external mpr name 'WNetGetConnectionA';
+function WNetGetConnectionW; external mpr name 'WNetGetConnectionW';
+function WNetGetConnection; external mpr name 'WNetGetConnection' + AWSuffix;
+function WNetRestoreConnectionA; external mpr name 'WNetRestoreConnectionA';
+function WNetRestoreConnectionW; external mpr name 'WNetRestoreConnectionW';
+function WNetRestoreConnection; external mpr name 'WNetRestoreConnection' + AWSuffix;
+function WNetUseConnectionA; external mpr name 'WNetUseConnectionA';
+function WNetUseConnectionW; external mpr name 'WNetUseConnectionW';
+function WNetUseConnection; external mpr name 'WNetUseConnection' + AWSuffix;
+function WNetConnectionDialog; external mpr name 'WNetConnectionDialog';
+function WNetDisconnectDialog; external mpr name 'WNetDisconnectDialog';
+function WNetConnectionDialog1A; external mpr name 'WNetConnectionDialog1A';
+function WNetConnectionDialog1W; external mpr name 'WNetConnectionDialog1W';
+function WNetConnectionDialog1; external mpr name 'WNetConnectionDialog1' + AWSuffix;
+function WNetDisconnectDialog1A; external mpr name 'WNetDisconnectDialog1A';
+function WNetDisconnectDialog1W; external mpr name 'WNetDisconnectDialog1W';
+function WNetDisconnectDialog1; external mpr name 'WNetDisconnectDialog1' + AWSuffix;
+function WNetOpenEnumA; external mpr name 'WNetOpenEnumA';
+function WNetOpenEnumW; external mpr name 'WNetOpenEnumW';
+function WNetOpenEnum; external mpr name 'WNetOpenEnum' + AWSuffix;
+function WNetEnumResourceA; external mpr name 'WNetEnumResourceA';
+function WNetEnumResourceW; external mpr name 'WNetEnumResourceW';
+function WNetEnumResource; external mpr name 'WNetEnumResource' + AWSuffix;
+function WNetCloseEnum; external mpr name 'WNetCloseEnum';
+function WNetGetResourceParentA; external mpr name 'WNetGetResourceParentA';
+function WNetGetResourceParentW; external mpr name 'WNetGetResourceParentW';
+function WNetGetResourceParent; external mpr name 'WNetGetResourceParent' + AWSuffix;
+function WNetGetResourceInformationA; external mpr name 'WNetGetResourceInformationA';
+function WNetGetResourceInformationW; external mpr name 'WNetGetResourceInformationW';
+function WNetGetResourceInformation; external mpr name 'WNetGetResourceInformation' + AWSuffix;
+function WNetGetUniversalNameA; external mpr name 'WNetGetUniversalNameA';
+function WNetGetUniversalNameW; external mpr name 'WNetGetUniversalNameW';
+function WNetGetUniversalName; external mpr name 'WNetGetUniversalName' + AWSuffix;
+function WNetGetUserA; external mpr name 'WNetGetUserA';
+function WNetGetUserW; external mpr name 'WNetGetUserW';
+function WNetGetUser; external mpr name 'WNetGetUser' + AWSuffix;
+function WNetGetProviderNameA; external mpr name 'WNetGetProviderNameA';
+function WNetGetProviderNameW; external mpr name 'WNetGetProviderNameW';
+function WNetGetProviderName; external mpr name 'WNetGetProviderName' + AWSuffix;
+function WNetGetNetworkInformationA; external mpr name 'WNetGetNetworkInformationA';
+function WNetGetNetworkInformationW; external mpr name 'WNetGetNetworkInformationW';
+function WNetGetNetworkInformation; external mpr name 'WNetGetNetworkInformation' + AWSuffix;
+function WNetGetLastErrorA; external mpr name 'WNetGetLastErrorA';
+function WNetGetLastErrorW; external mpr name 'WNetGetLastErrorW';
+function WNetGetLastError; external mpr name 'WNetGetLastError' + AWSuffix;
+function MultinetGetConnectionPerformanceA; external mpr name 'MultinetGetConnectionPerformanceA';
+function MultinetGetConnectionPerformanceW; external mpr name 'MultinetGetConnectionPerformanceW';
+function MultinetGetConnectionPerformance; external mpr name 'MultinetGetConnectionPerformance' + AWSuffix;
+
+{$ENDIF DYNAMIC_LINK}
+
+end.
diff --git a/packages/extra/winunits/jwawinnls.pas b/packages/extra/winunits/jwawinnls.pas
index 8d1f13e4db..f2dd22d4ae 100644
--- a/packages/extra/winunits/jwawinnls.pas
+++ b/packages/extra/winunits/jwawinnls.pas
@@ -1,3222 +1,3222 @@
-{******************************************************************************}
-{ }
-{ National Language Support API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: winnls.h, released June 2000. The original Pascal }
-{ code is: WinNLS.pas, released December 2000. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwawinnls.pas,v 1.1 2005/04/04 07:56:11 marco Exp $
-
-unit JwaWinNLS;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "WinNls.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaWinType, JwaWinBase;
-
-////////////////////////////////////////////////////////////////////////////
-//
-// Constants
-//
-// Define all constants for the NLS component here.
-//
-////////////////////////////////////////////////////////////////////////////
-
-//
-// String Length Maximums.
-//
-
-const
- MAX_LEADBYTES = 12; // 5 ranges, 2 bytes ea., 0 term.
- {$EXTERNALSYM MAX_LEADBYTES}
- MAX_DEFAULTCHAR = 2; // single or double byte
- {$EXTERNALSYM MAX_DEFAULTCHAR}
-
-//
-// MBCS and Unicode Translation Flags.
-//
-
- MB_PRECOMPOSED = $00000001; // use precomposed chars
- {$EXTERNALSYM MB_PRECOMPOSED}
- MB_COMPOSITE = $00000002; // use composite chars
- {$EXTERNALSYM MB_COMPOSITE}
- MB_USEGLYPHCHARS = $00000004; // use glyph chars, not ctrl chars
- {$EXTERNALSYM MB_USEGLYPHCHARS}
- MB_ERR_INVALID_CHARS = $00000008; // error for invalid chars
- {$EXTERNALSYM MB_ERR_INVALID_CHARS}
-
- WC_COMPOSITECHECK = $00000200; // convert composite to precomposed
- {$EXTERNALSYM WC_COMPOSITECHECK}
- WC_DISCARDNS = $00000010; // discard non-spacing chars
- {$EXTERNALSYM WC_DISCARDNS}
- WC_SEPCHARS = $00000020; // generate separate chars
- {$EXTERNALSYM WC_SEPCHARS}
- WC_DEFAULTCHAR = $00000040; // replace w/ default char
- {$EXTERNALSYM WC_DEFAULTCHAR}
-
- WC_NO_BEST_FIT_CHARS = $00000400; // do not use best fit chars
- {$EXTERNALSYM WC_NO_BEST_FIT_CHARS}
-
-//
-// Character Type Flags.
-//
-
- CT_CTYPE1 = $00000001; // ctype 1 information
- {$EXTERNALSYM CT_CTYPE1}
- CT_CTYPE2 = $00000002; // ctype 2 information
- {$EXTERNALSYM CT_CTYPE2}
- CT_CTYPE3 = $00000004; // ctype 3 information
- {$EXTERNALSYM CT_CTYPE3}
-
-//
-// CType 1 Flag Bits.
-//
-
- C1_UPPER = $0001; // upper case
- {$EXTERNALSYM C1_UPPER}
- C1_LOWER = $0002; // lower case
- {$EXTERNALSYM C1_LOWER}
- C1_DIGIT = $0004; // decimal digits
- {$EXTERNALSYM C1_DIGIT}
- C1_SPACE = $0008; // spacing characters
- {$EXTERNALSYM C1_SPACE}
- C1_PUNCT = $0010; // punctuation characters
- {$EXTERNALSYM C1_PUNCT}
- C1_CNTRL = $0020; // control characters
- {$EXTERNALSYM C1_CNTRL}
- C1_BLANK = $0040; // blank characters
- {$EXTERNALSYM C1_BLANK}
- C1_XDIGIT = $0080; // other digits
- {$EXTERNALSYM C1_XDIGIT}
- C1_ALPHA = $0100; // any linguistic character
- {$EXTERNALSYM C1_ALPHA}
- C1_DEFINED = $0200; // defined character
- {$EXTERNALSYM C1_DEFINED}
-
-//
-// CType 2 Flag Bits.
-//
-
- C2_LEFTTORIGHT = $0001; // left to right
- {$EXTERNALSYM C2_LEFTTORIGHT}
- C2_RIGHTTOLEFT = $0002; // right to left
- {$EXTERNALSYM C2_RIGHTTOLEFT}
-
- C2_EUROPENUMBER = $0003; // European number, digit
- {$EXTERNALSYM C2_EUROPENUMBER}
- C2_EUROPESEPARATOR = $0004; // European numeric separator
- {$EXTERNALSYM C2_EUROPESEPARATOR}
- C2_EUROPETERMINATOR = $0005; // European numeric terminator
- {$EXTERNALSYM C2_EUROPETERMINATOR}
- C2_ARABICNUMBER = $0006; // Arabic number
- {$EXTERNALSYM C2_ARABICNUMBER}
- C2_COMMONSEPARATOR = $0007; // common numeric separator
- {$EXTERNALSYM C2_COMMONSEPARATOR}
-
- C2_BLOCKSEPARATOR = $0008; // block separator
- {$EXTERNALSYM C2_BLOCKSEPARATOR}
- C2_SEGMENTSEPARATOR = $0009; // segment separator
- {$EXTERNALSYM C2_SEGMENTSEPARATOR}
- C2_WHITESPACE = $000A; // white space
- {$EXTERNALSYM C2_WHITESPACE}
- C2_OTHERNEUTRAL = $000B; // other neutrals
- {$EXTERNALSYM C2_OTHERNEUTRAL}
-
- C2_NOTAPPLICABLE = $0000; // no implicit directionality
- {$EXTERNALSYM C2_NOTAPPLICABLE}
-
-//
-// CType 3 Flag Bits.
-//
-
- C3_NONSPACING = $0001; // nonspacing character
- {$EXTERNALSYM C3_NONSPACING}
- C3_DIACRITIC = $0002; // diacritic mark
- {$EXTERNALSYM C3_DIACRITIC}
- C3_VOWELMARK = $0004; // vowel mark
- {$EXTERNALSYM C3_VOWELMARK}
- C3_SYMBOL = $0008; // symbols
- {$EXTERNALSYM C3_SYMBOL}
-
- C3_KATAKANA = $0010; // katakana character
- {$EXTERNALSYM C3_KATAKANA}
- C3_HIRAGANA = $0020; // hiragana character
- {$EXTERNALSYM C3_HIRAGANA}
- C3_HALFWIDTH = $0040; // half width character
- {$EXTERNALSYM C3_HALFWIDTH}
- C3_FULLWIDTH = $0080; // full width character
- {$EXTERNALSYM C3_FULLWIDTH}
- C3_IDEOGRAPH = $0100; // ideographic character
- {$EXTERNALSYM C3_IDEOGRAPH}
- C3_KASHIDA = $0200; // Arabic kashida character
- {$EXTERNALSYM C3_KASHIDA}
- C3_LEXICAL = $0400; // lexical character
- {$EXTERNALSYM C3_LEXICAL}
-
- C3_ALPHA = $8000; // any linguistic char (C1_ALPHA)
- {$EXTERNALSYM C3_ALPHA}
-
- C3_NOTAPPLICABLE = $0000; // ctype 3 is not applicable
- {$EXTERNALSYM C3_NOTAPPLICABLE}
-
-//
-// String Flags.
-//
-
- NORM_IGNORECASE = $00000001; // ignore case
- {$EXTERNALSYM NORM_IGNORECASE}
- NORM_IGNORENONSPACE = $00000002; // ignore nonspacing chars
- {$EXTERNALSYM NORM_IGNORENONSPACE}
- NORM_IGNORESYMBOLS = $00000004; // ignore symbols
- {$EXTERNALSYM NORM_IGNORESYMBOLS}
-
- NORM_IGNOREKANATYPE = $00010000; // ignore kanatype
- {$EXTERNALSYM NORM_IGNOREKANATYPE}
- NORM_IGNOREWIDTH = $00020000; // ignore width
- {$EXTERNALSYM NORM_IGNOREWIDTH}
-
-//
-// Locale Independent Mapping Flags.
-//
-
- MAP_FOLDCZONE = $00000010; // fold compatibility zone chars
- {$EXTERNALSYM MAP_FOLDCZONE}
- MAP_PRECOMPOSED = $00000020; // convert to precomposed chars
- {$EXTERNALSYM MAP_PRECOMPOSED}
- MAP_COMPOSITE = $00000040; // convert to composite chars
- {$EXTERNALSYM MAP_COMPOSITE}
- MAP_FOLDDIGITS = $00000080; // all digits to ASCII 0-9
- {$EXTERNALSYM MAP_FOLDDIGITS}
-
- MAP_EXPAND_LIGATURES = $00002000; // expand all ligatures
- {$EXTERNALSYM MAP_EXPAND_LIGATURES}
-
-//
-// Locale Dependent Mapping Flags.
-//
-
- LCMAP_LOWERCASE = $00000100; // lower case letters
- {$EXTERNALSYM LCMAP_LOWERCASE}
- LCMAP_UPPERCASE = $00000200; // upper case letters
- {$EXTERNALSYM LCMAP_UPPERCASE}
- LCMAP_SORTKEY = $00000400; // WC sort key (normalize)
- {$EXTERNALSYM LCMAP_SORTKEY}
- LCMAP_BYTEREV = $00000800; // byte reversal
- {$EXTERNALSYM LCMAP_BYTEREV}
-
- LCMAP_HIRAGANA = $00100000; // map katakana to hiragana
- {$EXTERNALSYM LCMAP_HIRAGANA}
- LCMAP_KATAKANA = $00200000; // map hiragana to katakana
- {$EXTERNALSYM LCMAP_KATAKANA}
- LCMAP_HALFWIDTH = $00400000; // map double byte to single byte
- {$EXTERNALSYM LCMAP_HALFWIDTH}
- LCMAP_FULLWIDTH = $00800000; // map single byte to double byte
- {$EXTERNALSYM LCMAP_FULLWIDTH}
-
- LCMAP_LINGUISTIC_CASING = $01000000; // use linguistic rules for casing
- {$EXTERNALSYM LCMAP_LINGUISTIC_CASING}
-
- LCMAP_SIMPLIFIED_CHINESE = $02000000; // map traditional chinese to simplified chinese
- {$EXTERNALSYM LCMAP_SIMPLIFIED_CHINESE}
- LCMAP_TRADITIONAL_CHINESE = $04000000; // map simplified chinese to traditional chinese
- {$EXTERNALSYM LCMAP_TRADITIONAL_CHINESE}
-
-//
-// Language Group Enumeration Flags.
-//
-
- LGRPID_INSTALLED = $00000001; // installed language group ids
- {$EXTERNALSYM LGRPID_INSTALLED}
- LGRPID_SUPPORTED = $00000002; // supported language group ids
- {$EXTERNALSYM LGRPID_SUPPORTED}
-
-//
-// Locale Enumeration Flags.
-//
-
- LCID_INSTALLED = $00000001; // installed locale ids
- {$EXTERNALSYM LCID_INSTALLED}
- LCID_SUPPORTED = $00000002; // supported locale ids
- {$EXTERNALSYM LCID_SUPPORTED}
- LCID_ALTERNATE_SORTS = $00000004; // alternate sort locale ids
- {$EXTERNALSYM LCID_ALTERNATE_SORTS}
-
-//
-// Code Page Enumeration Flags.
-//
-
- CP_INSTALLED = $00000001; // installed code page ids
- {$EXTERNALSYM CP_INSTALLED}
- CP_SUPPORTED = $00000002; // supported code page ids
- {$EXTERNALSYM CP_SUPPORTED}
-
-//
-// Sorting Flags.
-//
-// WORD Sort: culturally correct sort
-// hyphen and apostrophe are special cased
-// example: "coop" and "co-op" will sort together in a list
-//
-// co_op <------- underscore (symbol)
-// coat
-// comb
-// coop
-// co-op <------- hyphen (punctuation)
-// cork
-// went
-// were
-// we're <------- apostrophe (punctuation)
-//
-//
-// STRING Sort: hyphen and apostrophe will sort with all other symbols
-//
-// co-op <------- hyphen (punctuation)
-// co_op <------- underscore (symbol)
-// coat
-// comb
-// coop
-// cork
-// we're <------- apostrophe (punctuation)
-// went
-// were
-//
-
- SORT_STRINGSORT = $00001000; // use string sort method
- {$EXTERNALSYM SORT_STRINGSORT}
-
-//
-// Compare String Return Values.
-//
-
- CSTR_LESS_THAN = 1; // string 1 less than string 2
- {$EXTERNALSYM CSTR_LESS_THAN}
- CSTR_EQUAL = 2; // string 1 equal to string 2
- {$EXTERNALSYM CSTR_EQUAL}
- CSTR_GREATER_THAN = 3; // string 1 greater than string 2
- {$EXTERNALSYM CSTR_GREATER_THAN}
-
-//
-// Code Page Default Values.
-//
-
- CP_ACP = 0; // default to ANSI code page
- {$EXTERNALSYM CP_ACP}
- CP_OEMCP = 1; // default to OEM code page
- {$EXTERNALSYM CP_OEMCP}
- CP_MACCP = 2; // default to MAC code page
- {$EXTERNALSYM CP_MACCP}
- CP_THREAD_ACP = 3; // current thread's ANSI code page
- {$EXTERNALSYM CP_THREAD_ACP}
- CP_SYMBOL = 42; // SYMBOL translations
- {$EXTERNALSYM CP_SYMBOL}
-
- CP_UTF7 = 65000; // UTF-7 translation
- {$EXTERNALSYM CP_UTF7}
- CP_UTF8 = 65001; // UTF-8 translation
- {$EXTERNALSYM CP_UTF8}
-
-//
-// Country/Region Codes.
-//
-
- CTRY_DEFAULT = 0;
- {$EXTERNALSYM CTRY_DEFAULT}
-
- CTRY_ALBANIA = 355; // Albania
- {$EXTERNALSYM CTRY_ALBANIA}
- CTRY_ALGERIA = 213; // Algeria
- {$EXTERNALSYM CTRY_ALGERIA}
- CTRY_ARGENTINA = 54; // Argentina
- {$EXTERNALSYM CTRY_ARGENTINA}
- CTRY_ARMENIA = 374; // Armenia
- {$EXTERNALSYM CTRY_ARMENIA}
- CTRY_AUSTRALIA = 61; // Australia
- {$EXTERNALSYM CTRY_AUSTRALIA}
- CTRY_AUSTRIA = 43; // Austria
- {$EXTERNALSYM CTRY_AUSTRIA}
- CTRY_AZERBAIJAN = 994; // Azerbaijan
- {$EXTERNALSYM CTRY_AZERBAIJAN}
- CTRY_BAHRAIN = 973; // Bahrain
- {$EXTERNALSYM CTRY_BAHRAIN}
- CTRY_BELARUS = 375; // Belarus
- {$EXTERNALSYM CTRY_BELARUS}
- CTRY_BELGIUM = 32; // Belgium
- {$EXTERNALSYM CTRY_BELGIUM}
- CTRY_BELIZE = 501; // Belize
- {$EXTERNALSYM CTRY_BELIZE}
- CTRY_BOLIVIA = 591; // Bolivia
- {$EXTERNALSYM CTRY_BOLIVIA}
- CTRY_BRAZIL = 55; // Brazil
- {$EXTERNALSYM CTRY_BRAZIL}
- CTRY_BRUNEI_DARUSSALAM = 673; // Brunei Darussalam
- {$EXTERNALSYM CTRY_BRUNEI_DARUSSALAM}
- CTRY_BULGARIA = 359; // Bulgaria
- {$EXTERNALSYM CTRY_BULGARIA}
- CTRY_CANADA = 2; // Canada
- {$EXTERNALSYM CTRY_CANADA}
- CTRY_CARIBBEAN = 1; // Caribbean
- {$EXTERNALSYM CTRY_CARIBBEAN}
- CTRY_CHILE = 56; // Chile
- {$EXTERNALSYM CTRY_CHILE}
- CTRY_COLOMBIA = 57; // Colombia
- {$EXTERNALSYM CTRY_COLOMBIA}
- CTRY_COSTA_RICA = 506; // Costa Rica
- {$EXTERNALSYM CTRY_COSTA_RICA}
- CTRY_CROATIA = 385; // Croatia
- {$EXTERNALSYM CTRY_CROATIA}
- CTRY_CZECH = 420; // Czech Republic
- {$EXTERNALSYM CTRY_CZECH}
- CTRY_DENMARK = 45; // Denmark
- {$EXTERNALSYM CTRY_DENMARK}
- CTRY_DOMINICAN_REPUBLIC = 1; // Dominican Republic
- {$EXTERNALSYM CTRY_DOMINICAN_REPUBLIC}
- CTRY_ECUADOR = 593; // Ecuador
- {$EXTERNALSYM CTRY_ECUADOR}
- CTRY_EGYPT = 20; // Egypt
- {$EXTERNALSYM CTRY_EGYPT}
- CTRY_EL_SALVADOR = 503; // El Salvador
- {$EXTERNALSYM CTRY_EL_SALVADOR}
- CTRY_ESTONIA = 372; // Estonia
- {$EXTERNALSYM CTRY_ESTONIA}
- CTRY_FAEROE_ISLANDS = 298; // Faeroe Islands
- {$EXTERNALSYM CTRY_FAEROE_ISLANDS}
- CTRY_FINLAND = 358; // Finland
- {$EXTERNALSYM CTRY_FINLAND}
- CTRY_FRANCE = 33; // France
- {$EXTERNALSYM CTRY_FRANCE}
- CTRY_GEORGIA = 995; // Georgia
- {$EXTERNALSYM CTRY_GEORGIA}
- CTRY_GERMANY = 49; // Germany
- {$EXTERNALSYM CTRY_GERMANY}
- CTRY_GREECE = 30; // Greece
- {$EXTERNALSYM CTRY_GREECE}
- CTRY_GUATEMALA = 502; // Guatemala
- {$EXTERNALSYM CTRY_GUATEMALA}
- CTRY_HONDURAS = 504; // Honduras
- {$EXTERNALSYM CTRY_HONDURAS}
- CTRY_HONG_KONG = 852; // Hong Kong S.A.R., P.R.C.
- {$EXTERNALSYM CTRY_HONG_KONG}
- CTRY_HUNGARY = 36; // Hungary
- {$EXTERNALSYM CTRY_HUNGARY}
- CTRY_ICELAND = 354; // Iceland
- {$EXTERNALSYM CTRY_ICELAND}
- CTRY_INDIA = 91; // India
- {$EXTERNALSYM CTRY_INDIA}
- CTRY_INDONESIA = 62; // Indonesia
- {$EXTERNALSYM CTRY_INDONESIA}
- CTRY_IRAN = 981; // Iran
- {$EXTERNALSYM CTRY_IRAN}
- CTRY_IRAQ = 964; // Iraq
- {$EXTERNALSYM CTRY_IRAQ}
- CTRY_IRELAND = 353; // Ireland
- {$EXTERNALSYM CTRY_IRELAND}
- CTRY_ISRAEL = 972; // Israel
- {$EXTERNALSYM CTRY_ISRAEL}
- CTRY_ITALY = 39; // Italy
- {$EXTERNALSYM CTRY_ITALY}
- CTRY_JAMAICA = 1; // Jamaica
- {$EXTERNALSYM CTRY_JAMAICA}
- CTRY_JAPAN = 81; // Japan
- {$EXTERNALSYM CTRY_JAPAN}
- CTRY_JORDAN = 962; // Jordan
- {$EXTERNALSYM CTRY_JORDAN}
- CTRY_KAZAKSTAN = 7; // Kazakstan
- {$EXTERNALSYM CTRY_KAZAKSTAN}
- CTRY_KENYA = 254; // Kenya
- {$EXTERNALSYM CTRY_KENYA}
- CTRY_KUWAIT = 965; // Kuwait
- {$EXTERNALSYM CTRY_KUWAIT}
- CTRY_KYRGYZSTAN = 996; // Kyrgyzstan
- {$EXTERNALSYM CTRY_KYRGYZSTAN}
- CTRY_LATVIA = 371; // Latvia
- {$EXTERNALSYM CTRY_LATVIA}
- CTRY_LEBANON = 961; // Lebanon
- {$EXTERNALSYM CTRY_LEBANON}
- CTRY_LIBYA = 218; // Libya
- {$EXTERNALSYM CTRY_LIBYA}
- CTRY_LIECHTENSTEIN = 41; // Liechtenstein
- {$EXTERNALSYM CTRY_LIECHTENSTEIN}
- CTRY_LITHUANIA = 370; // Lithuania
- {$EXTERNALSYM CTRY_LITHUANIA}
- CTRY_LUXEMBOURG = 352; // Luxembourg
- {$EXTERNALSYM CTRY_LUXEMBOURG}
- CTRY_MACAU = 853; // Macau S.A.R., PRC
- {$EXTERNALSYM CTRY_MACAU}
- CTRY_MACEDONIA = 389; // Former Yugoslav Republic of Macedonia
- {$EXTERNALSYM CTRY_MACEDONIA}
- CTRY_MALAYSIA = 60; // Malaysia
- {$EXTERNALSYM CTRY_MALAYSIA}
- CTRY_MALDIVES = 960; // Maldives
- {$EXTERNALSYM CTRY_MALDIVES}
- CTRY_MEXICO = 52; // Mexico
- {$EXTERNALSYM CTRY_MEXICO}
- CTRY_MONACO = 33; // Principality of Monaco
- {$EXTERNALSYM CTRY_MONACO}
- CTRY_MONGOLIA = 976; // Mongolia
- {$EXTERNALSYM CTRY_MONGOLIA}
- CTRY_MOROCCO = 212; // Morocco
- {$EXTERNALSYM CTRY_MOROCCO}
- CTRY_NETHERLANDS = 31; // Netherlands
- {$EXTERNALSYM CTRY_NETHERLANDS}
- CTRY_NEW_ZEALAND = 64; // New Zealand
- {$EXTERNALSYM CTRY_NEW_ZEALAND}
- CTRY_NICARAGUA = 505; // Nicaragua
- {$EXTERNALSYM CTRY_NICARAGUA}
- CTRY_NORWAY = 47; // Norway
- {$EXTERNALSYM CTRY_NORWAY}
- CTRY_OMAN = 968; // Oman
- {$EXTERNALSYM CTRY_OMAN}
- CTRY_PAKISTAN = 92; // Islamic Republic of Pakistan
- {$EXTERNALSYM CTRY_PAKISTAN}
- CTRY_PANAMA = 507; // Panama
- {$EXTERNALSYM CTRY_PANAMA}
- CTRY_PARAGUAY = 595; // Paraguay
- {$EXTERNALSYM CTRY_PARAGUAY}
- CTRY_PERU = 51; // Peru
- {$EXTERNALSYM CTRY_PERU}
- CTRY_PHILIPPINES = 63; // Republic of the Philippines
- {$EXTERNALSYM CTRY_PHILIPPINES}
- CTRY_POLAND = 48; // Poland
- {$EXTERNALSYM CTRY_POLAND}
- CTRY_PORTUGAL = 351; // Portugal
- {$EXTERNALSYM CTRY_PORTUGAL}
- CTRY_PRCHINA = 86; // People's Republic of China
- {$EXTERNALSYM CTRY_PRCHINA}
- CTRY_PUERTO_RICO = 1; // Puerto Rico
- {$EXTERNALSYM CTRY_PUERTO_RICO}
- CTRY_QATAR = 974; // Qatar
- {$EXTERNALSYM CTRY_QATAR}
- CTRY_ROMANIA = 40; // Romania
- {$EXTERNALSYM CTRY_ROMANIA}
- CTRY_RUSSIA = 7; // Russia
- {$EXTERNALSYM CTRY_RUSSIA}
- CTRY_SAUDI_ARABIA = 966; // Saudi Arabia
- {$EXTERNALSYM CTRY_SAUDI_ARABIA}
- CTRY_SERBIA = 381; // Serbia
- {$EXTERNALSYM CTRY_SERBIA}
- CTRY_SINGAPORE = 65; // Singapore
- {$EXTERNALSYM CTRY_SINGAPORE}
- CTRY_SLOVAK = 421; // Slovak Republic
- {$EXTERNALSYM CTRY_SLOVAK}
- CTRY_SLOVENIA = 386; // Slovenia
- {$EXTERNALSYM CTRY_SLOVENIA}
- CTRY_SOUTH_AFRICA = 27; // South Africa
- {$EXTERNALSYM CTRY_SOUTH_AFRICA}
- CTRY_SOUTH_KOREA = 82; // Korea
- {$EXTERNALSYM CTRY_SOUTH_KOREA}
- CTRY_SPAIN = 34; // Spain
- {$EXTERNALSYM CTRY_SPAIN}
- CTRY_SWEDEN = 46; // Sweden
- {$EXTERNALSYM CTRY_SWEDEN}
- CTRY_SWITZERLAND = 41; // Switzerland
- {$EXTERNALSYM CTRY_SWITZERLAND}
- CTRY_SYRIA = 963; // Syria
- {$EXTERNALSYM CTRY_SYRIA}
- CTRY_TAIWAN = 886; // Taiwan
- {$EXTERNALSYM CTRY_TAIWAN}
- CTRY_TATARSTAN = 7; // Tatarstan
- {$EXTERNALSYM CTRY_TATARSTAN}
- CTRY_THAILAND = 66; // Thailand
- {$EXTERNALSYM CTRY_THAILAND}
- CTRY_TRINIDAD_Y_TOBAGO = 1; // Trinidad y Tobago
- {$EXTERNALSYM CTRY_TRINIDAD_Y_TOBAGO}
- CTRY_TUNISIA = 216; // Tunisia
- {$EXTERNALSYM CTRY_TUNISIA}
- CTRY_TURKEY = 90; // Turkey
- {$EXTERNALSYM CTRY_TURKEY}
- CTRY_UAE = 971; // U.A.E.
- {$EXTERNALSYM CTRY_UAE}
- CTRY_UKRAINE = 380; // Ukraine
- {$EXTERNALSYM CTRY_UKRAINE}
- CTRY_UNITED_KINGDOM = 44; // United Kingdom
- {$EXTERNALSYM CTRY_UNITED_KINGDOM}
- CTRY_UNITED_STATES = 1; // United States
- {$EXTERNALSYM CTRY_UNITED_STATES}
- CTRY_URUGUAY = 598; // Uruguay
- {$EXTERNALSYM CTRY_URUGUAY}
- CTRY_UZBEKISTAN = 7; // Uzbekistan
- {$EXTERNALSYM CTRY_UZBEKISTAN}
- CTRY_VENEZUELA = 58; // Venezuela
- {$EXTERNALSYM CTRY_VENEZUELA}
- CTRY_VIET_NAM = 84; // Viet Nam
- {$EXTERNALSYM CTRY_VIET_NAM}
- CTRY_YEMEN = 967; // Yemen
- {$EXTERNALSYM CTRY_YEMEN}
- CTRY_ZIMBABWE = 263; // Zimbabwe
- {$EXTERNALSYM CTRY_ZIMBABWE}
-
-//
-// Locale Types.
-//
-// These types are used for the GetLocaleInfo NLS API routine.
-// Some of these types are also used for the SetLocaleInfo NLS API routine.
-//
-
-//
-// The following LCTypes may be used in combination with any other LCTypes.
-//
-// LOCALE_NOUSEROVERRIDE is also used in GetTimeFormat and
-// GetDateFormat.
-//
-// LOCALE_USE_CP_ACP is used in many of the A (Ansi) apis that need
-// to do string translation.
-//
-// LOCALE_RETURN_NUMBER will return the result from GetLocaleInfo as a
-// number instead of a string. This flag is only valid for the LCTypes
-// beginning with LOCALE_I.
-//
-
- LOCALE_NOUSEROVERRIDE = DWORD($80000000); // do not use user overrides
- {$EXTERNALSYM LOCALE_NOUSEROVERRIDE}
- LOCALE_USE_CP_ACP = $40000000; // use the system ACP
- {$EXTERNALSYM LOCALE_USE_CP_ACP}
-
- LOCALE_RETURN_NUMBER = $20000000; // return number instead of string
- {$EXTERNALSYM LOCALE_RETURN_NUMBER}
-
-//
-// The following LCTypes are mutually exclusive in that they may NOT
-// be used in combination with each other.
-//
-
- LOCALE_ILANGUAGE = $00000001; // language id
- {$EXTERNALSYM LOCALE_ILANGUAGE}
- LOCALE_SLANGUAGE = $00000002; // localized name of language
- {$EXTERNALSYM LOCALE_SLANGUAGE}
- LOCALE_SENGLANGUAGE = $00001001; // English name of language
- {$EXTERNALSYM LOCALE_SENGLANGUAGE}
- LOCALE_SABBREVLANGNAME = $00000003; // abbreviated language name
- {$EXTERNALSYM LOCALE_SABBREVLANGNAME}
- LOCALE_SNATIVELANGNAME = $00000004; // native name of language
- {$EXTERNALSYM LOCALE_SNATIVELANGNAME}
-
- LOCALE_ICOUNTRY = $00000005; // country code
- {$EXTERNALSYM LOCALE_ICOUNTRY}
- LOCALE_SCOUNTRY = $00000006; // localized name of country
- {$EXTERNALSYM LOCALE_SCOUNTRY}
- LOCALE_SENGCOUNTRY = $00001002; // English name of country
- {$EXTERNALSYM LOCALE_SENGCOUNTRY}
- LOCALE_SABBREVCTRYNAME = $00000007; // abbreviated country name
- {$EXTERNALSYM LOCALE_SABBREVCTRYNAME}
- LOCALE_SNATIVECTRYNAME = $00000008; // native name of country
- {$EXTERNALSYM LOCALE_SNATIVECTRYNAME}
-
- LOCALE_IDEFAULTLANGUAGE = $00000009; // default language id
- {$EXTERNALSYM LOCALE_IDEFAULTLANGUAGE}
- LOCALE_IDEFAULTCOUNTRY = $0000000A; // default country code
- {$EXTERNALSYM LOCALE_IDEFAULTCOUNTRY}
- LOCALE_IDEFAULTCODEPAGE = $0000000B; // default oem code page
- {$EXTERNALSYM LOCALE_IDEFAULTCODEPAGE}
- LOCALE_IDEFAULTANSICODEPAGE = $00001004; // default ansi code page
- {$EXTERNALSYM LOCALE_IDEFAULTANSICODEPAGE}
- LOCALE_IDEFAULTMACCODEPAGE = $00001011; // default mac code page
- {$EXTERNALSYM LOCALE_IDEFAULTMACCODEPAGE}
-
- LOCALE_SLIST = $0000000C; // list item separator
- {$EXTERNALSYM LOCALE_SLIST}
- LOCALE_IMEASURE = $0000000D; // 0 = metric, 1 = US
- {$EXTERNALSYM LOCALE_IMEASURE}
-
- LOCALE_SDECIMAL = $0000000E; // decimal separator
- {$EXTERNALSYM LOCALE_SDECIMAL}
- LOCALE_STHOUSAND = $0000000F; // thousand separator
- {$EXTERNALSYM LOCALE_STHOUSAND}
- LOCALE_SGROUPING = $00000010; // digit grouping
- {$EXTERNALSYM LOCALE_SGROUPING}
- LOCALE_IDIGITS = $00000011; // number of fractional digits
- {$EXTERNALSYM LOCALE_IDIGITS}
- LOCALE_ILZERO = $00000012; // leading zeros for decimal
- {$EXTERNALSYM LOCALE_ILZERO}
- LOCALE_INEGNUMBER = $00001010; // negative number mode
- {$EXTERNALSYM LOCALE_INEGNUMBER}
- LOCALE_SNATIVEDIGITS = $00000013; // native ascii 0-9
- {$EXTERNALSYM LOCALE_SNATIVEDIGITS}
-
- LOCALE_SCURRENCY = $00000014; // local monetary symbol
- {$EXTERNALSYM LOCALE_SCURRENCY}
- LOCALE_SINTLSYMBOL = $00000015; // intl monetary symbol
- {$EXTERNALSYM LOCALE_SINTLSYMBOL}
- LOCALE_SMONDECIMALSEP = $00000016; // monetary decimal separator
- {$EXTERNALSYM LOCALE_SMONDECIMALSEP}
- LOCALE_SMONTHOUSANDSEP = $00000017; // monetary thousand separator
- {$EXTERNALSYM LOCALE_SMONTHOUSANDSEP}
- LOCALE_SMONGROUPING = $00000018; // monetary grouping
- {$EXTERNALSYM LOCALE_SMONGROUPING}
- LOCALE_ICURRDIGITS = $00000019; // # local monetary digits
- {$EXTERNALSYM LOCALE_ICURRDIGITS}
- LOCALE_IINTLCURRDIGITS = $0000001A; // # intl monetary digits
- {$EXTERNALSYM LOCALE_IINTLCURRDIGITS}
- LOCALE_ICURRENCY = $0000001B; // positive currency mode
- {$EXTERNALSYM LOCALE_ICURRENCY}
- LOCALE_INEGCURR = $0000001C; // negative currency mode
- {$EXTERNALSYM LOCALE_INEGCURR}
-
- LOCALE_SDATE = $0000001D; // date separator
- {$EXTERNALSYM LOCALE_SDATE}
- LOCALE_STIME = $0000001E; // time separator
- {$EXTERNALSYM LOCALE_STIME}
- LOCALE_SSHORTDATE = $0000001F; // short date format string
- {$EXTERNALSYM LOCALE_SSHORTDATE}
- LOCALE_SLONGDATE = $00000020; // long date format string
- {$EXTERNALSYM LOCALE_SLONGDATE}
- LOCALE_STIMEFORMAT = $00001003; // time format string
- {$EXTERNALSYM LOCALE_STIMEFORMAT}
- LOCALE_IDATE = $00000021; // short date format ordering
- {$EXTERNALSYM LOCALE_IDATE}
- LOCALE_ILDATE = $00000022; // long date format ordering
- {$EXTERNALSYM LOCALE_ILDATE}
- LOCALE_ITIME = $00000023; // time format specifier
- {$EXTERNALSYM LOCALE_ITIME}
- LOCALE_ITIMEMARKPOSN = $00001005; // time marker position
- {$EXTERNALSYM LOCALE_ITIMEMARKPOSN}
- LOCALE_ICENTURY = $00000024; // century format specifier (short date)
- {$EXTERNALSYM LOCALE_ICENTURY}
- LOCALE_ITLZERO = $00000025; // leading zeros in time field
- {$EXTERNALSYM LOCALE_ITLZERO}
- LOCALE_IDAYLZERO = $00000026; // leading zeros in day field (short date)
- {$EXTERNALSYM LOCALE_IDAYLZERO}
- LOCALE_IMONLZERO = $00000027; // leading zeros in month field (short date)
- {$EXTERNALSYM LOCALE_IMONLZERO}
- LOCALE_S1159 = $00000028; // AM designator
- {$EXTERNALSYM LOCALE_S1159}
- LOCALE_S2359 = $00000029; // PM designator
- {$EXTERNALSYM LOCALE_S2359}
-
- LOCALE_ICALENDARTYPE = $00001009; // type of calendar specifier
- {$EXTERNALSYM LOCALE_ICALENDARTYPE}
- LOCALE_IOPTIONALCALENDAR = $0000100B; // additional calendar types specifier
- {$EXTERNALSYM LOCALE_IOPTIONALCALENDAR}
- LOCALE_IFIRSTDAYOFWEEK = $0000100C; // first day of week specifier
- {$EXTERNALSYM LOCALE_IFIRSTDAYOFWEEK}
- LOCALE_IFIRSTWEEKOFYEAR = $0000100D; // first week of year specifier
- {$EXTERNALSYM LOCALE_IFIRSTWEEKOFYEAR}
-
- LOCALE_SDAYNAME1 = $0000002A; // long name for Monday
- {$EXTERNALSYM LOCALE_SDAYNAME1}
- LOCALE_SDAYNAME2 = $0000002B; // long name for Tuesday
- {$EXTERNALSYM LOCALE_SDAYNAME2}
- LOCALE_SDAYNAME3 = $0000002C; // long name for Wednesday
- {$EXTERNALSYM LOCALE_SDAYNAME3}
- LOCALE_SDAYNAME4 = $0000002D; // long name for Thursday
- {$EXTERNALSYM LOCALE_SDAYNAME4}
- LOCALE_SDAYNAME5 = $0000002E; // long name for Friday
- {$EXTERNALSYM LOCALE_SDAYNAME5}
- LOCALE_SDAYNAME6 = $0000002F; // long name for Saturday
- {$EXTERNALSYM LOCALE_SDAYNAME6}
- LOCALE_SDAYNAME7 = $00000030; // long name for Sunday
- {$EXTERNALSYM LOCALE_SDAYNAME7}
- LOCALE_SABBREVDAYNAME1 = $00000031; // abbreviated name for Monday
- {$EXTERNALSYM LOCALE_SABBREVDAYNAME1}
- LOCALE_SABBREVDAYNAME2 = $00000032; // abbreviated name for Tuesday
- {$EXTERNALSYM LOCALE_SABBREVDAYNAME2}
- LOCALE_SABBREVDAYNAME3 = $00000033; // abbreviated name for Wednesday
- {$EXTERNALSYM LOCALE_SABBREVDAYNAME3}
- LOCALE_SABBREVDAYNAME4 = $00000034; // abbreviated name for Thursday
- {$EXTERNALSYM LOCALE_SABBREVDAYNAME4}
- LOCALE_SABBREVDAYNAME5 = $00000035; // abbreviated name for Friday
- {$EXTERNALSYM LOCALE_SABBREVDAYNAME5}
- LOCALE_SABBREVDAYNAME6 = $00000036; // abbreviated name for Saturday
- {$EXTERNALSYM LOCALE_SABBREVDAYNAME6}
- LOCALE_SABBREVDAYNAME7 = $00000037; // abbreviated name for Sunday
- {$EXTERNALSYM LOCALE_SABBREVDAYNAME7}
- LOCALE_SMONTHNAME1 = $00000038; // long name for January
- {$EXTERNALSYM LOCALE_SMONTHNAME1}
- LOCALE_SMONTHNAME2 = $00000039; // long name for February
- {$EXTERNALSYM LOCALE_SMONTHNAME2}
- LOCALE_SMONTHNAME3 = $0000003A; // long name for March
- {$EXTERNALSYM LOCALE_SMONTHNAME3}
- LOCALE_SMONTHNAME4 = $0000003B; // long name for April
- {$EXTERNALSYM LOCALE_SMONTHNAME4}
- LOCALE_SMONTHNAME5 = $0000003C; // long name for May
- {$EXTERNALSYM LOCALE_SMONTHNAME5}
- LOCALE_SMONTHNAME6 = $0000003D; // long name for June
- {$EXTERNALSYM LOCALE_SMONTHNAME6}
- LOCALE_SMONTHNAME7 = $0000003E; // long name for July
- {$EXTERNALSYM LOCALE_SMONTHNAME7}
- LOCALE_SMONTHNAME8 = $0000003F; // long name for August
- {$EXTERNALSYM LOCALE_SMONTHNAME8}
- LOCALE_SMONTHNAME9 = $00000040; // long name for September
- {$EXTERNALSYM LOCALE_SMONTHNAME9}
- LOCALE_SMONTHNAME10 = $00000041; // long name for October
- {$EXTERNALSYM LOCALE_SMONTHNAME10}
- LOCALE_SMONTHNAME11 = $00000042; // long name for November
- {$EXTERNALSYM LOCALE_SMONTHNAME11}
- LOCALE_SMONTHNAME12 = $00000043; // long name for December
- {$EXTERNALSYM LOCALE_SMONTHNAME12}
- LOCALE_SMONTHNAME13 = $0000100E; // long name for 13th month (if exists)
- {$EXTERNALSYM LOCALE_SMONTHNAME13}
- LOCALE_SABBREVMONTHNAME1 = $00000044; // abbreviated name for January
- {$EXTERNALSYM LOCALE_SABBREVMONTHNAME1}
- LOCALE_SABBREVMONTHNAME2 = $00000045; // abbreviated name for February
- {$EXTERNALSYM LOCALE_SABBREVMONTHNAME2}
- LOCALE_SABBREVMONTHNAME3 = $00000046; // abbreviated name for March
- {$EXTERNALSYM LOCALE_SABBREVMONTHNAME3}
- LOCALE_SABBREVMONTHNAME4 = $00000047; // abbreviated name for April
- {$EXTERNALSYM LOCALE_SABBREVMONTHNAME4}
- LOCALE_SABBREVMONTHNAME5 = $00000048; // abbreviated name for May
- {$EXTERNALSYM LOCALE_SABBREVMONTHNAME5}
- LOCALE_SABBREVMONTHNAME6 = $00000049; // abbreviated name for June
- {$EXTERNALSYM LOCALE_SABBREVMONTHNAME6}
- LOCALE_SABBREVMONTHNAME7 = $0000004A; // abbreviated name for July
- {$EXTERNALSYM LOCALE_SABBREVMONTHNAME7}
- LOCALE_SABBREVMONTHNAME8 = $0000004B; // abbreviated name for August
- {$EXTERNALSYM LOCALE_SABBREVMONTHNAME8}
- LOCALE_SABBREVMONTHNAME9 = $0000004C; // abbreviated name for September
- {$EXTERNALSYM LOCALE_SABBREVMONTHNAME9}
- LOCALE_SABBREVMONTHNAME10 = $0000004D; // abbreviated name for October
- {$EXTERNALSYM LOCALE_SABBREVMONTHNAME10}
- LOCALE_SABBREVMONTHNAME11 = $0000004E; // abbreviated name for November
- {$EXTERNALSYM LOCALE_SABBREVMONTHNAME11}
- LOCALE_SABBREVMONTHNAME12 = $0000004F; // abbreviated name for December
- {$EXTERNALSYM LOCALE_SABBREVMONTHNAME12}
- LOCALE_SABBREVMONTHNAME13 = $0000100F; // abbreviated name for 13th month (if exists)
- {$EXTERNALSYM LOCALE_SABBREVMONTHNAME13}
-
- LOCALE_SPOSITIVESIGN = $00000050; // positive sign
- {$EXTERNALSYM LOCALE_SPOSITIVESIGN}
- LOCALE_SNEGATIVESIGN = $00000051; // negative sign
- {$EXTERNALSYM LOCALE_SNEGATIVESIGN}
- LOCALE_IPOSSIGNPOSN = $00000052; // positive sign position
- {$EXTERNALSYM LOCALE_IPOSSIGNPOSN}
- LOCALE_INEGSIGNPOSN = $00000053; // negative sign position
- {$EXTERNALSYM LOCALE_INEGSIGNPOSN}
- LOCALE_IPOSSYMPRECEDES = $00000054; // mon sym precedes pos amt
- {$EXTERNALSYM LOCALE_IPOSSYMPRECEDES}
- LOCALE_IPOSSEPBYSPACE = $00000055; // mon sym sep by space from pos amt
- {$EXTERNALSYM LOCALE_IPOSSEPBYSPACE}
- LOCALE_INEGSYMPRECEDES = $00000056; // mon sym precedes neg amt
- {$EXTERNALSYM LOCALE_INEGSYMPRECEDES}
- LOCALE_INEGSEPBYSPACE = $00000057; // mon sym sep by space from neg amt
- {$EXTERNALSYM LOCALE_INEGSEPBYSPACE}
-
- LOCALE_FONTSIGNATURE = $00000058; // font signature
- {$EXTERNALSYM LOCALE_FONTSIGNATURE}
- LOCALE_SISO639LANGNAME = $00000059; // ISO abbreviated language name
- {$EXTERNALSYM LOCALE_SISO639LANGNAME}
- LOCALE_SISO3166CTRYNAME = $0000005A; // ISO abbreviated country name
- {$EXTERNALSYM LOCALE_SISO3166CTRYNAME}
-
- LOCALE_IDEFAULTEBCDICCODEPAGE = $00001012; // default ebcdic code page
- {$EXTERNALSYM LOCALE_IDEFAULTEBCDICCODEPAGE}
- LOCALE_IPAPERSIZE = $0000100A; // 1 = letter, 5 = legal, 8 = a3, 9 = a4
- {$EXTERNALSYM LOCALE_IPAPERSIZE}
- LOCALE_SENGCURRNAME = $00001007; // english name of currency
- {$EXTERNALSYM LOCALE_SENGCURRNAME}
- LOCALE_SNATIVECURRNAME = $00001008; // native name of currency
- {$EXTERNALSYM LOCALE_SNATIVECURRNAME}
- LOCALE_SYEARMONTH = $00001006; // year month format string
- {$EXTERNALSYM LOCALE_SYEARMONTH}
- LOCALE_SSORTNAME = $00001013; // sort name
- {$EXTERNALSYM LOCALE_SSORTNAME}
- LOCALE_IDIGITSUBSTITUTION = $00001014; // 0 = context, 1 = none, 2 = national
- {$EXTERNALSYM LOCALE_IDIGITSUBSTITUTION}
-
-//
-// Time Flags for GetTimeFormat.
-//
-
- TIME_NOMINUTESORSECONDS = $00000001; // do not use minutes or seconds
- {$EXTERNALSYM TIME_NOMINUTESORSECONDS}
- TIME_NOSECONDS = $00000002; // do not use seconds
- {$EXTERNALSYM TIME_NOSECONDS}
- TIME_NOTIMEMARKER = $00000004; // do not use time marker
- {$EXTERNALSYM TIME_NOTIMEMARKER}
- TIME_FORCE24HOURFORMAT = $00000008; // always use 24 hour format
- {$EXTERNALSYM TIME_FORCE24HOURFORMAT}
-
-//
-// Date Flags for GetDateFormat.
-//
-
- DATE_SHORTDATE = $00000001; // use short date picture
- {$EXTERNALSYM DATE_SHORTDATE}
- DATE_LONGDATE = $00000002; // use long date picture
- {$EXTERNALSYM DATE_LONGDATE}
- DATE_USE_ALT_CALENDAR = $00000004; // use alternate calendar (if any)
- {$EXTERNALSYM DATE_USE_ALT_CALENDAR}
-
- DATE_YEARMONTH = $00000008; // use year month picture
- {$EXTERNALSYM DATE_YEARMONTH}
- DATE_LTRREADING = $00000010; // add marks for left to right reading order layout
- {$EXTERNALSYM DATE_LTRREADING}
- DATE_RTLREADING = $00000020; // add marks for right to left reading order layout
- {$EXTERNALSYM DATE_RTLREADING}
-
-//
-// Calendar Types.
-//
-// These types are used for the EnumCalendarInfo and GetCalendarInfo
-// NLS API routines.
-// Some of these types are also used for the SetCalendarInfo NLS API
-// routine.
-//
-
-//
-// The following CalTypes may be used in combination with any other CalTypes.
-//
-// CAL_NOUSEROVERRIDE
-//
-// CAL_USE_CP_ACP is used in the A (Ansi) apis that need to do string
-// translation.
-//
-// CAL_RETURN_NUMBER will return the result from GetCalendarInfo as a
-// number instead of a string. This flag is only valid for the CalTypes
-// beginning with CAL_I.
-//
-
- CAL_NOUSEROVERRIDE = LOCALE_NOUSEROVERRIDE; // do not use user overrides
- {$EXTERNALSYM CAL_NOUSEROVERRIDE}
- CAL_USE_CP_ACP = LOCALE_USE_CP_ACP; // use the system ACP
- {$EXTERNALSYM CAL_USE_CP_ACP}
- CAL_RETURN_NUMBER = LOCALE_RETURN_NUMBER; // return number instead of string
- {$EXTERNALSYM CAL_RETURN_NUMBER}
-
-//
-// The following CalTypes are mutually exclusive in that they may NOT
-// be used in combination with each other.
-//
-
- CAL_ICALINTVALUE = $00000001; // calendar type
- {$EXTERNALSYM CAL_ICALINTVALUE}
- CAL_SCALNAME = $00000002; // native name of calendar
- {$EXTERNALSYM CAL_SCALNAME}
- CAL_IYEAROFFSETRANGE = $00000003; // starting years of eras
- {$EXTERNALSYM CAL_IYEAROFFSETRANGE}
- CAL_SERASTRING = $00000004; // era name for IYearOffsetRanges
- {$EXTERNALSYM CAL_SERASTRING}
- CAL_SSHORTDATE = $00000005; // short date format string
- {$EXTERNALSYM CAL_SSHORTDATE}
- CAL_SLONGDATE = $00000006; // long date format string
- {$EXTERNALSYM CAL_SLONGDATE}
- CAL_SDAYNAME1 = $00000007; // native name for Monday
- {$EXTERNALSYM CAL_SDAYNAME1}
- CAL_SDAYNAME2 = $00000008; // native name for Tuesday
- {$EXTERNALSYM CAL_SDAYNAME2}
- CAL_SDAYNAME3 = $00000009; // native name for Wednesday
- {$EXTERNALSYM CAL_SDAYNAME3}
- CAL_SDAYNAME4 = $0000000a; // native name for Thursday
- {$EXTERNALSYM CAL_SDAYNAME4}
- CAL_SDAYNAME5 = $0000000b; // native name for Friday
- {$EXTERNALSYM CAL_SDAYNAME5}
- CAL_SDAYNAME6 = $0000000c; // native name for Saturday
- {$EXTERNALSYM CAL_SDAYNAME6}
- CAL_SDAYNAME7 = $0000000d; // native name for Sunday
- {$EXTERNALSYM CAL_SDAYNAME7}
- CAL_SABBREVDAYNAME1 = $0000000e; // abbreviated name for Monday
- {$EXTERNALSYM CAL_SABBREVDAYNAME1}
- CAL_SABBREVDAYNAME2 = $0000000f; // abbreviated name for Tuesday
- {$EXTERNALSYM CAL_SABBREVDAYNAME2}
- CAL_SABBREVDAYNAME3 = $00000010; // abbreviated name for Wednesday
- {$EXTERNALSYM CAL_SABBREVDAYNAME3}
- CAL_SABBREVDAYNAME4 = $00000011; // abbreviated name for Thursday
- {$EXTERNALSYM CAL_SABBREVDAYNAME4}
- CAL_SABBREVDAYNAME5 = $00000012; // abbreviated name for Friday
- {$EXTERNALSYM CAL_SABBREVDAYNAME5}
- CAL_SABBREVDAYNAME6 = $00000013; // abbreviated name for Saturday
- {$EXTERNALSYM CAL_SABBREVDAYNAME6}
- CAL_SABBREVDAYNAME7 = $00000014; // abbreviated name for Sunday
- {$EXTERNALSYM CAL_SABBREVDAYNAME7}
- CAL_SMONTHNAME1 = $00000015; // native name for January
- {$EXTERNALSYM CAL_SMONTHNAME1}
- CAL_SMONTHNAME2 = $00000016; // native name for February
- {$EXTERNALSYM CAL_SMONTHNAME2}
- CAL_SMONTHNAME3 = $00000017; // native name for March
- {$EXTERNALSYM CAL_SMONTHNAME3}
- CAL_SMONTHNAME4 = $00000018; // native name for April
- {$EXTERNALSYM CAL_SMONTHNAME4}
- CAL_SMONTHNAME5 = $00000019; // native name for May
- {$EXTERNALSYM CAL_SMONTHNAME5}
- CAL_SMONTHNAME6 = $0000001a; // native name for June
- {$EXTERNALSYM CAL_SMONTHNAME6}
- CAL_SMONTHNAME7 = $0000001b; // native name for July
- {$EXTERNALSYM CAL_SMONTHNAME7}
- CAL_SMONTHNAME8 = $0000001c; // native name for August
- {$EXTERNALSYM CAL_SMONTHNAME8}
- CAL_SMONTHNAME9 = $0000001d; // native name for September
- {$EXTERNALSYM CAL_SMONTHNAME9}
- CAL_SMONTHNAME10 = $0000001e; // native name for October
- {$EXTERNALSYM CAL_SMONTHNAME10}
- CAL_SMONTHNAME11 = $0000001f; // native name for November
- {$EXTERNALSYM CAL_SMONTHNAME11}
- CAL_SMONTHNAME12 = $00000020; // native name for December
- {$EXTERNALSYM CAL_SMONTHNAME12}
- CAL_SMONTHNAME13 = $00000021; // native name for 13th month (if any)
- {$EXTERNALSYM CAL_SMONTHNAME13}
- CAL_SABBREVMONTHNAME1 = $00000022; // abbreviated name for January
- {$EXTERNALSYM CAL_SABBREVMONTHNAME1}
- CAL_SABBREVMONTHNAME2 = $00000023; // abbreviated name for February
- {$EXTERNALSYM CAL_SABBREVMONTHNAME2}
- CAL_SABBREVMONTHNAME3 = $00000024; // abbreviated name for March
- {$EXTERNALSYM CAL_SABBREVMONTHNAME3}
- CAL_SABBREVMONTHNAME4 = $00000025; // abbreviated name for April
- {$EXTERNALSYM CAL_SABBREVMONTHNAME4}
- CAL_SABBREVMONTHNAME5 = $00000026; // abbreviated name for May
- {$EXTERNALSYM CAL_SABBREVMONTHNAME5}
- CAL_SABBREVMONTHNAME6 = $00000027; // abbreviated name for June
- {$EXTERNALSYM CAL_SABBREVMONTHNAME6}
- CAL_SABBREVMONTHNAME7 = $00000028; // abbreviated name for July
- {$EXTERNALSYM CAL_SABBREVMONTHNAME7}
- CAL_SABBREVMONTHNAME8 = $00000029; // abbreviated name for August
- {$EXTERNALSYM CAL_SABBREVMONTHNAME8}
- CAL_SABBREVMONTHNAME9 = $0000002a; // abbreviated name for September
- {$EXTERNALSYM CAL_SABBREVMONTHNAME9}
- CAL_SABBREVMONTHNAME10 = $0000002b; // abbreviated name for October
- {$EXTERNALSYM CAL_SABBREVMONTHNAME10}
- CAL_SABBREVMONTHNAME11 = $0000002c; // abbreviated name for November
- {$EXTERNALSYM CAL_SABBREVMONTHNAME11}
- CAL_SABBREVMONTHNAME12 = $0000002d; // abbreviated name for December
- {$EXTERNALSYM CAL_SABBREVMONTHNAME12}
- CAL_SABBREVMONTHNAME13 = $0000002e; // abbreviated name for 13th month (if any)
- {$EXTERNALSYM CAL_SABBREVMONTHNAME13}
-
- CAL_SYEARMONTH = $0000002f; // year month format string
- {$EXTERNALSYM CAL_SYEARMONTH}
- CAL_ITWODIGITYEARMAX = $00000030; // two digit year max
- {$EXTERNALSYM CAL_ITWODIGITYEARMAX}
-
-//
-// Calendar Enumeration Value.
-//
-
- ENUM_ALL_CALENDARS = DWORD($ffffffff); // enumerate all calendars
- {$EXTERNALSYM ENUM_ALL_CALENDARS}
-
-//
-// Calendar ID Values.
-//
-
- CAL_GREGORIAN = 1; // Gregorian (localized) calendar
- {$EXTERNALSYM CAL_GREGORIAN}
- CAL_GREGORIAN_US = 2; // Gregorian (U.S.) calendar
- {$EXTERNALSYM CAL_GREGORIAN_US}
- CAL_JAPAN = 3; // Japanese Emperor Era calendar
- {$EXTERNALSYM CAL_JAPAN}
- CAL_TAIWAN = 4; // Taiwan Era calendar
- {$EXTERNALSYM CAL_TAIWAN}
- CAL_KOREA = 5; // Korean Tangun calendar
- {$EXTERNALSYM CAL_KOREA}
- CAL_HIJRI = 6; // Hijri (Arabic Lunar) calendar
- {$EXTERNALSYM CAL_HIJRI}
- CAL_THAI = 7; // Thai calendar
- {$EXTERNALSYM CAL_THAI}
- CAL_HEBREW = 8; // Hebrew (Lunar) calendar
- {$EXTERNALSYM CAL_HEBREW}
- CAL_GREGORIAN_ME_FRENCH = 9; // Gregorian Middle East French calendar
- {$EXTERNALSYM CAL_GREGORIAN_ME_FRENCH}
- CAL_GREGORIAN_ARABIC = 10; // Gregorian Arabic calendar
- {$EXTERNALSYM CAL_GREGORIAN_ARABIC}
- CAL_GREGORIAN_XLIT_ENGLISH = 11; // Gregorian Transliterated English calendar
- {$EXTERNALSYM CAL_GREGORIAN_XLIT_ENGLISH}
- CAL_GREGORIAN_XLIT_FRENCH = 12; // Gregorian Transliterated French calendar
- {$EXTERNALSYM CAL_GREGORIAN_XLIT_FRENCH}
-
-//
-// Language Group ID Values.
-//
-
- LGRPID_WESTERN_EUROPE = $0001; // Western Europe & U.S.
- {$EXTERNALSYM LGRPID_WESTERN_EUROPE}
- LGRPID_CENTRAL_EUROPE = $0002; // Central Europe
- {$EXTERNALSYM LGRPID_CENTRAL_EUROPE}
- LGRPID_BALTIC = $0003; // Baltic
- {$EXTERNALSYM LGRPID_BALTIC}
- LGRPID_GREEK = $0004; // Greek
- {$EXTERNALSYM LGRPID_GREEK}
- LGRPID_CYRILLIC = $0005; // Cyrillic
- {$EXTERNALSYM LGRPID_CYRILLIC}
- LGRPID_TURKISH = $0006; // Turkish
- {$EXTERNALSYM LGRPID_TURKISH}
- LGRPID_JAPANESE = $0007; // Japanese
- {$EXTERNALSYM LGRPID_JAPANESE}
- LGRPID_KOREAN = $0008; // Korean
- {$EXTERNALSYM LGRPID_KOREAN}
- LGRPID_TRADITIONAL_CHINESE = $0009; // Traditional Chinese
- {$EXTERNALSYM LGRPID_TRADITIONAL_CHINESE}
- LGRPID_SIMPLIFIED_CHINESE = $000a; // Simplified Chinese
- {$EXTERNALSYM LGRPID_SIMPLIFIED_CHINESE}
- LGRPID_THAI = $000b; // Thai
- {$EXTERNALSYM LGRPID_THAI}
- LGRPID_HEBREW = $000c; // Hebrew
- {$EXTERNALSYM LGRPID_HEBREW}
- LGRPID_ARABIC = $000d; // Arabic
- {$EXTERNALSYM LGRPID_ARABIC}
- LGRPID_VIETNAMESE = $000e; // Vietnamese
- {$EXTERNALSYM LGRPID_VIETNAMESE}
- LGRPID_INDIC = $000f; // Indic
- {$EXTERNALSYM LGRPID_INDIC}
- LGRPID_GEORGIAN = $0010; // Georgian
- {$EXTERNALSYM LGRPID_GEORGIAN}
- LGRPID_ARMENIAN = $0011; // Armenian
- {$EXTERNALSYM LGRPID_ARMENIAN}
-
-////////////////////////////////////////////////////////////////////////////
-//
-// Typedefs
-//
-// Define all types for the NLS component here.
-//
-////////////////////////////////////////////////////////////////////////////
-
-//
-// Language Group ID.
-//
-
-type
- LGRPID = DWORD;
- {$EXTERNALSYM LGRPID}
-
-//
-// Locale type constant.
-//
-
- LCTYPE = DWORD;
- {$EXTERNALSYM LCTYPE}
-
-//
-// Calendar type constant.
-//
-
- CALTYPE = DWORD;
- {$EXTERNALSYM CALTYPE}
-
-//
-// Calendar ID.
-//
-
- CALID = DWORD;
- {$EXTERNALSYM CALID}
-
-//
-// CP Info.
-//
-
- LPCPINFO = ^CPINFO;
- {$EXTERNALSYM LPCPINFO}
- _cpinfo = record
- MaxCharSize: UINT; // max length (in bytes) of a char
- DefaultChar: array [0..MAX_DEFAULTCHAR - 1] of BYTE; // default character
- LeadByte: array [0..MAX_LEADBYTES - 1] of BYTE; // lead byte ranges
- end;
- {$EXTERNALSYM _cpinfo}
- CPINFO = _cpinfo;
- {$EXTERNALSYM CPINFO}
- TCpInfo = CPINFO;
- PCpInfo = LPCPINFO;
-
- {$EXTERNALSYM CPINFOEXA}
- LPCPINFOEXA = ^CPINFOEXA;
- _cpinfoexA = record
- MaxCharSize: UINT; // max length (in bytes) of a char
- DefaultChar: array [0..MAX_DEFAULTCHAR - 1] of BYTE; // default character (MB)
- LeadByte: array [0..MAX_LEADBYTES - 1] of BYTE; // lead byte ranges
- UnicodeDefaultChar: WCHAR; // default character (Unicode)
- CodePage: UINT; // code page id
- CodePageName: array [0..MAX_PATH - 1] of CHAR; // code page name (Unicode)
- end;
- {$EXTERNALSYM _cpinfoexA}
- CPINFOEXA = _cpinfoexA;
- {$EXTERNALSYM LPCPINFOEXA}
- TCpInfoExA = CPINFOEXA;
- PCpInfoExA = LPCPINFOEXA;
-
- LPCPINFOEXW = ^CPINFOEXW;
- {$EXTERNALSYM LPCPINFOEXW}
- _cpinfoexW = record
- MaxCharSize: UINT; // max length (in bytes) of a char
- DefaultChar: array [0..MAX_DEFAULTCHAR - 1] of BYTE; // default character (MB)
- LeadByte: array [0..MAX_LEADBYTES - 1] of BYTE; // lead byte ranges
- UnicodeDefaultChar: WCHAR; // default character (Unicode)
- CodePage: UINT; // code page id
- CodePageName: array [0..MAX_PATH - 1] of WCHAR; // code page name (Unicode)
- end;
- {$EXTERNALSYM _cpinfoexW}
- CPINFOEXW = _cpinfoexW;
- {$EXTERNALSYM CPINFOEXW}
- TCpInfoExW = CPINFOEXW;
- PCpInfoExW = LPCPINFOEXW;
-
- {$IFDEF UNICODE}
- CPINFOEX = CPINFOEXW;
- {$EXTERNALSYM CPINFOEX}
- LPCPINFOEX = LPCPINFOEXW;
- {$EXTERNALSYM LPCPINFOEX}
- TCpInfoEx = TCpInfoExW;
- PCpInfoEx = PCpInfoExW;
- {$ELSE}
- CPINFOEX = CPINFOEXA;
- {$EXTERNALSYM CPINFOEX}
- LPCPINFOEX = LPCPINFOEXA;
- {$EXTERNALSYM LPCPINFOEX}
- TCpInfoEx = TCpInfoExA;
- PCpInfoEx = PCpInfoExA;
- {$ENDIF UNICODE}
-
-//
-// Number format.
-//
-
- LPNUMBERFMTA = ^NUMBERFMTA;
- {$EXTERNALSYM LPNUMBERFMTA}
- _numberfmtA = record
- NumDigits: UINT; // number of decimal digits
- LeadingZero: UINT; // if leading zero in decimal fields
- Grouping: UINT; // group size left of decimal
- lpDecimalSep: LPSTR; // ptr to decimal separator string
- lpThousandSep: LPSTR; // ptr to thousand separator string
- NegativeOrder: UINT; // negative number ordering
- end;
- {$EXTERNALSYM _numberfmtA}
- NUMBERFMTA = _numberfmtA;
- {$EXTERNALSYM NUMBERFMTA}
- TNumberFmtA = NUMBERFMTA;
- PNumberFmtA = LPNUMBERFMTA;
-
- LPNUMBERFMTW = ^NUMBERFMTW;
- {$EXTERNALSYM LPNUMBERFMTW}
- _numberfmtW = record
- NumDigits: UINT; // number of decimal digits
- LeadingZero: UINT; // if leading zero in decimal fields
- Grouping: UINT; // group size left of decimal
- lpDecimalSep: LPWSTR; // ptr to decimal separator string
- lpThousandSep: LPWSTR; // ptr to thousand separator string
- NegativeOrder: UINT; // negative number ordering
- end;
- {$EXTERNALSYM _numberfmtW}
- NUMBERFMTW = _numberfmtW;
- {$EXTERNALSYM NUMBERFMTW}
- TNumberFmtW = NUMBERFMTW;
- PNumberFmtW = LPNUMBERFMTW;
-
- {$IFDEF UNICODE}
- NUMBERFMT = NUMBERFMTW;
- {$EXTERNALSYM NUMBERFMT}
- LPNUMBERFMT = LPNUMBERFMTW;
- {$EXTERNALSYM LPNUMBERFMT}
- TNumberFmt = TNumberFmtW;
- PNumberFmt = TNumberFmtW;
- {$ELSE}
- NUMBERFMT = NUMBERFMTA;
- {$EXTERNALSYM NUMBERFMT}
- LPNUMBERFMT = LPNUMBERFMTA;
- {$EXTERNALSYM LPNUMBERFMT}
- TNumberFmt = TNumberFmtA;
- PNumberFmt = TNumberFmtA;
- {$ENDIF UNICODE}
-
-//
-// Currency format.
-//
-
- LPCURRENCYFMTA = ^CURRENCYFMTA;
- {$EXTERNALSYM LPCURRENCYFMTA}
- _currencyfmtA = record
- NumDigits: UINT; // number of decimal digits
- LeadingZero: UINT; // if leading zero in decimal fields
- Grouping: UINT; // group size left of decimal
- lpDecimalSep: LPSTR; // ptr to decimal separator string
- lpThousandSep: LPSTR; // ptr to thousand separator string
- NegativeOrder: UINT; // negative currency ordering
- PositiveOrder: UINT; // positive currency ordering
- lpCurrencySymbol: LPSTR; // ptr to currency symbol string
- end;
- {$EXTERNALSYM _currencyfmtA}
- CURRENCYFMTA = _currencyfmtA;
- {$EXTERNALSYM CURRENCYFMTA}
- TCurrencyFmtA = CURRENCYFMTA;
- PCurrencyFmtA = LPCURRENCYFMTA;
-
- LPCURRENCYFMTW = ^CURRENCYFMTW;
- {$EXTERNALSYM LPCURRENCYFMTW}
- _currencyfmtW = record
- NumDigits: UINT; // number of decimal digits
- LeadingZero: UINT; // if leading zero in decimal fields
- Grouping: UINT; // group size left of decimal
- lpDecimalSep: LPWSTR; // ptr to decimal separator string
- lpThousandSep: LPWSTR; // ptr to thousand separator string
- NegativeOrder: UINT; // negative currency ordering
- PositiveOrder: UINT; // positive currency ordering
- lpCurrencySymbol: LPWSTR; // ptr to currency symbol string
- end;
- {$EXTERNALSYM _currencyfmtW}
- CURRENCYFMTW = _currencyfmtW;
- {$EXTERNALSYM CURRENCYFMTW}
- TCurrencyFmtW = CURRENCYFMTW;
- PCurrencyFmtW = LPCURRENCYFMTW;
-
- {$IFDEF UNICODE}
- CURRENCYFMT = CURRENCYFMTW;
- {$EXTERNALSYM CURRENCYFMT}
- LPCURRENCYFMT = LPCURRENCYFMTW;
- {$EXTERNALSYM LPCURRENCYFMT}
- TCurrencyFmt = TCurrencyFmtW;
- PCurrencyFmt = PCurrencyFmtW;
- {$ELSE}
- CURRENCYFMT = CURRENCYFMTA;
- {$EXTERNALSYM CURRENCYFMT}
- LPCURRENCYFMT = LPCURRENCYFMTA;
- {$EXTERNALSYM LPCURRENCYFMT}
- TCurrencyFmt = TCurrencyFmtA;
- PCurrencyFmt = PCurrencyFmtA;
- {$ENDIF UNICODE}
-
-//
-// NLS function capabilities
-//
-
-const
- COMPARE_STRING = $0001;
- {$EXTERNALSYM COMPARE_STRING}
-
-type
- SYSNLS_FUNCTION = DWORD;
- {$EXTERNALSYM SYSNLS_FUNCTION}
- NLS_FUNCTION = DWORD;
- {$EXTERNALSYM NLS_FUNCTION}
- TSysNlsFunction = SYSNLS_FUNCTION;
- TNlsFunction = NLS_FUNCTION;
-
-//
-// NLS version structure.
-//
-
- _nlsversioninfo = record
- dwNLSVersionInfoSize: DWORD;
- dwNLSVersion: DWORD;
- dwDefinedVersion: DWORD;
- end;
- {$EXTERNALSYM _nlsversioninfo}
- NLSVERSIONINFO = _nlsversioninfo;
- {$EXTERNALSYM NLSVERSIONINFO}
- LPNLSVERSIONINFO = ^NLSVERSIONINFO;
- {$EXTERNALSYM LPNLSVERSIONINFO}
- TNlsVersionInfo = NLSVERSIONINFO;
- PNlsVersionInfo = LPNLSVERSIONINFO;
-
-//
-// GEO defines
-//
-
-type
- GEOID = LONG;
- {$EXTERNALSYM GEOID}
- GEOTYPE = DWORD;
- {$EXTERNALSYM GEOTYPE}
- GEOCLASS = DWORD;
- {$EXTERNALSYM GEOCLASS}
-
-const
- GEOID_NOT_AVAILABLE = -1;
- {$EXTERNALSYM GEOID_NOT_AVAILABLE}
-
-//
-// GEO information types for clients to query
-//
-
-const
- GEO_NATION = $0001;
- {$EXTERNALSYM GEO_NATION}
- GEO_LATITUDE = $0002;
- {$EXTERNALSYM GEO_LATITUDE}
- GEO_LONGITUDE = $0003;
- {$EXTERNALSYM GEO_LONGITUDE}
- GEO_ISO2 = $0004;
- {$EXTERNALSYM GEO_ISO2}
- GEO_ISO3 = $0005;
- {$EXTERNALSYM GEO_ISO3}
- GEO_RFC1766 = $0006;
- {$EXTERNALSYM GEO_RFC1766}
- GEO_LCID = $0007;
- {$EXTERNALSYM GEO_LCID}
- GEO_FRIENDLYNAME = $0008;
- {$EXTERNALSYM GEO_FRIENDLYNAME}
- GEO_OFFICIALNAME = $0009;
- {$EXTERNALSYM GEO_OFFICIALNAME}
- GEO_TIMEZONES = $000A;
- {$EXTERNALSYM GEO_TIMEZONES}
- GEO_OFFICIALLANGUAGES = $000B;
- {$EXTERNALSYM GEO_OFFICIALLANGUAGES}
-
-type
- SYSGEOTYPE = DWORD;
- {$EXTERNALSYM SYSGEOTYPE}
-
-//
-// More GEOCLASS defines will be listed here
-//
-
-const
- GEOCLASS_NATION = 16;
- {$EXTERNALSYM GEOCLASS_NATION}
- GEOCLASS_REGION = 14;
- {$EXTERNALSYM GEOCLASS_REGION}
-
-type
- SYSGEOCLASS = DWORD;
- {$EXTERNALSYM SYSGEOCLASS}
-
-//
-// Enumeration function constants.
-//
-
-type
- LANGUAGEGROUP_ENUMPROCA = function(LanguageGroup: LGRPID; lpLanguageGroupString,
- lpLanguageGroupNameSting: LPSTR; dwFlags: DWORD; lParam: LONG_PTR): BOOL; stdcall;
- {$EXTERNALSYM LANGUAGEGROUP_ENUMPROCA}
- LANGGROUPLOCALE_ENUMPROCA = function(LanguageGroup: LGRPID; Locale: LCID;
- lpLocaleString: LPSTR; lParam: LONG_PTR): BOOL; stdcall;
- {$EXTERNALSYM LANGGROUPLOCALE_ENUMPROCA}
- UILANGUAGE_ENUMPROCA = function(lpUILanguageString: LPSTR; lParam: LONG_PTR): BOOL; stdcall;
- {$EXTERNALSYM UILANGUAGE_ENUMPROCA}
- LOCALE_ENUMPROCA = function(lpLocaleString: LPSTR): BOOL; stdcall;
- {$EXTERNALSYM LOCALE_ENUMPROCA}
- CODEPAGE_ENUMPROCA = function(lpCodePAgeString: LPSTR): BOOL; stdcall;
- {$EXTERNALSYM CODEPAGE_ENUMPROCA}
- DATEFMT_ENUMPROCA = function(lpDateFormatString: LPSTR): BOOL; stdcall;
- {$EXTERNALSYM DATEFMT_ENUMPROCA}
- DATEFMT_ENUMPROCEXA = function(lpDateFormatString: LPSTR; CalenderId: CALID): BOOL; stdcall;
- {$EXTERNALSYM DATEFMT_ENUMPROCEXA}
- TIMEFMT_ENUMPROCA = function(lpTimeFormatString: LPSTR): BOOL; stdcall;
- {$EXTERNALSYM TIMEFMT_ENUMPROCA}
- CALINFO_ENUMPROCA = function(lpCalendarInfoString: LPSTR): BOOL; stdcall;
- {$EXTERNALSYM CALINFO_ENUMPROCA}
- CALINFO_ENUMPROCEXA = function(lpCalendarInfoString: LPSTR; Calendar: CALID): BOOL; stdcall;
- {$EXTERNALSYM CALINFO_ENUMPROCEXA}
-
- LANGUAGEGROUP_ENUMPROCW = function(LanguageGroup: LGRPID; lpLanguageGroupString,
- lpLanguageGroupNameSting: LPWSTR; dwFlags: DWORD; lParam: LONG_PTR): BOOL; stdcall;
- {$EXTERNALSYM LANGUAGEGROUP_ENUMPROCW}
- LANGGROUPLOCALE_ENUMPROCW = function(LanguageGroup: LGRPID; Locale: LCID;
- lpLocaleString: LPWSTR; lParam: LONG_PTR): BOOL; stdcall;
- {$EXTERNALSYM LANGGROUPLOCALE_ENUMPROCW}
- UILANGUAGE_ENUMPROCW = function(lpUILanguageString: LPWSTR; lParam: LONG_PTR): BOOL; stdcall;
- {$EXTERNALSYM UILANGUAGE_ENUMPROCW}
- LOCALE_ENUMPROCW = function(lpLocaleString: LPWSTR): BOOL; stdcall;
- {$EXTERNALSYM LOCALE_ENUMPROCW}
- CODEPAGE_ENUMPROCW = function(lpCodePAgeString: LPWSTR): BOOL; stdcall;
- {$EXTERNALSYM CODEPAGE_ENUMPROCW}
- DATEFMT_ENUMPROCW = function(lpDateFormatString: LPWSTR): BOOL; stdcall;
- {$EXTERNALSYM DATEFMT_ENUMPROCW}
- DATEFMT_ENUMPROCEXW = function(lpDateFormatString: LPWSTR; CalenderId: CALID): BOOL; stdcall;
- {$EXTERNALSYM DATEFMT_ENUMPROCEXW}
- TIMEFMT_ENUMPROCW = function(lpTimeFormatString: LPWSTR): BOOL; stdcall;
- {$EXTERNALSYM TIMEFMT_ENUMPROCW}
- CALINFO_ENUMPROCW = function(lpCalendarInfoString: LPWSTR): BOOL; stdcall;
- {$EXTERNALSYM CALINFO_ENUMPROCW}
- CALINFO_ENUMPROCEXW = function(lpCalendarInfoString: LPWSTR; Calendar: CALID): BOOL; stdcall;
- {$EXTERNALSYM CALINFO_ENUMPROCEXW}
- GEO_ENUMPROC = function(geo: GEOID): BOOL; stdcall;
- {$EXTERNALSYM GEO_ENUMPROC}
-
- LANGUAGEGROUP_ENUMPROC = function(LanguageGroup: LGRPID; lpLanguageGroupString,
- lpLanguageGroupNameSting: LPTSTR; dwFlags: DWORD; lParam: LONG_PTR): BOOL; stdcall;
- {$EXTERNALSYM LANGUAGEGROUP_ENUMPROC}
- LANGGROUPLOCALE_ENUMPROC = function(LanguageGroup: LGRPID; Locale: LCID;
- lpLocaleString: LPTSTR; lParam: LONG_PTR): BOOL; stdcall;
- {$EXTERNALSYM LANGGROUPLOCALE_ENUMPROC}
- UILANGUAGE_ENUMPROC = function(lpUILanguageString: LPTSTR; lParam: LONG_PTR): BOOL; stdcall;
- {$EXTERNALSYM UILANGUAGE_ENUMPROC}
- LOCALE_ENUMPROC = function(lpLocaleString: LPTSTR): BOOL; stdcall;
- {$EXTERNALSYM LOCALE_ENUMPROC}
- CODEPAGE_ENUMPROC = function(lpCodePAgeString: LPTSTR): BOOL; stdcall;
- {$EXTERNALSYM CODEPAGE_ENUMPROC}
- DATEFMT_ENUMPROC = function(lpDateFormatString: LPTSTR): BOOL; stdcall;
- {$EXTERNALSYM DATEFMT_ENUMPROC}
- DATEFMT_ENUMPROCEX = function(lpDateFormatString: LPTSTR; CalenderId: CALID): BOOL; stdcall;
- {$EXTERNALSYM DATEFMT_ENUMPROCEX}
- TIMEFMT_ENUMPROC = function(lpTimeFormatString: LPTSTR): BOOL; stdcall;
- {$EXTERNALSYM TIMEFMT_ENUMPROC}
- CALINFO_ENUMPROC = function(lpCalendarInfoString: LPTSTR): BOOL; stdcall;
- {$EXTERNALSYM CALINFO_ENUMPROC}
- CALINFO_ENUMPROCEX = function(lpCalendarInfoString: LPTSTR; Calendar: CALID): BOOL; stdcall;
- {$EXTERNALSYM CALINFO_ENUMPROCEX}
-
-////////////////////////////////////////////////////////////////////////////
-//
-// Macros
-//
-// Define all macros for the NLS component here.
-//
-////////////////////////////////////////////////////////////////////////////
-
-////////////////////////////////////////////////////////////////////////////
-//
-// Function Prototypes
-//
-// Only prototypes for the NLS APIs should go here.
-//
-////////////////////////////////////////////////////////////////////////////
-
-//
-// Code Page Dependent APIs.
-//
-
-function IsValidCodePage(CodePage: UINT): BOOL; stdcall;
-{$EXTERNALSYM IsValidCodePage}
-
-function GetACP: UINT; stdcall;
-{$EXTERNALSYM GetACP}
-
-function GetOEMCP: UINT; stdcall;
-{$EXTERNALSYM GetOEMCP}
-
-function GetCPInfo(CodePage: UINT; var lpCPInfo: CPINFO): BOOL; stdcall;
-{$EXTERNALSYM GetCPInfo}
-
-function GetCPInfoExA(CodePage: UINT; dwFlags: DWORD; var lpCPInfoEx: CPINFOEXA): BOOL; stdcall;
-{$EXTERNALSYM GetCPInfoExA}
-function GetCPInfoExW(CodePage: UINT; dwFlags: DWORD; var lpCPInfoEx: CPINFOEXW): BOOL; stdcall;
-{$EXTERNALSYM GetCPInfoExW}
-function GetCPInfoEx(CodePage: UINT; dwFlags: DWORD; var lpCPInfoEx: CPINFOEX): BOOL; stdcall;
-{$EXTERNALSYM GetCPInfoEx}
-
-function IsDBCSLeadByte(TestChar: BYTE): BOOL; stdcall;
-{$EXTERNALSYM IsDBCSLeadByte}
-
-function IsDBCSLeadByteEx(CodePage: UINT; TestChar: BYTE): BOOL; stdcall;
-{$EXTERNALSYM IsDBCSLeadByteEx}
-
-function MultiByteToWideChar(CodePage: UINT; dwFlags: DWORD; lpMultiByteStr: LPCSTR;
- cbMultiByte: Integer; lpWideCharStr: LPWSTR; cchWideChar: Integer): Integer; stdcall;
-{$EXTERNALSYM MultiByteToWideChar}
-
-function WideCharToMultiByte(CodePage: UINT; dwFlags: DWORD; lpWideCharStr: LPCWSTR;
- cchWideChar: Integer; lpMultiByteStr: LPSTR; cbMultiByte: Integer;
- lpDefaultChar: LPCSTR; lpUsedDefaultChar: LPBOOL): Integer; stdcall;
-{$EXTERNALSYM WideCharToMultiByte}
-
-//
-// Locale Dependent APIs.
-//
-
-function CompareStringA(Locale: LCID; dwCmpFlags: DWORD; lpString1: LPCSTR;
- cchCount1: Integer; lpString2: LPCSTR; cchCount2: Integer): Integer; stdcall;
-{$EXTERNALSYM CompareStringA}
-function CompareStringW(Locale: LCID; dwCmpFlags: DWORD; lpString1: LPCWSTR;
- cchCount1: Integer; lpString2: LPCWSTR; cchCount2: Integer): Integer; stdcall;
-{$EXTERNALSYM CompareStringW}
-function CompareString(Locale: LCID; dwCmpFlags: DWORD; lpString1: LPCTSTR;
- cchCount1: Integer; lpString2: LPCTSTR; cchCount2: Integer): Integer; stdcall;
-{$EXTERNALSYM CompareString}
-
-function LCMapStringA(Locale: LCID; dwMapFlags: DWORD; lpSrcStr: LPCSTR;
- cchSrc: Integer; lpDestStr: LPSTR; cchDest: Integer): Integer; stdcall;
-{$EXTERNALSYM LCMapStringA}
-function LCMapStringW(Locale: LCID; dwMapFlags: DWORD; lpSrcStr: LPCWSTR;
- cchSrc: Integer; lpDestStr: LPWSTR; cchDest: Integer): Integer; stdcall;
-{$EXTERNALSYM LCMapStringW}
-function LCMapString(Locale: LCID; dwMapFlags: DWORD; lpSrcStr: LPCTSTR;
- cchSrc: Integer; lpDestStr: LPTSTR; cchDest: Integer): Integer; stdcall;
-{$EXTERNALSYM LCMapString}
-
-function GetLocaleInfoA(Locale: LCID; LCType: LCTYPE; lpLCData: LPSTR;
- cchData: Integer): Integer; stdcall;
-{$EXTERNALSYM GetLocaleInfoA}
-function GetLocaleInfoW(Locale: LCID; LCType: LCTYPE; lpLCData: LPWSTR;
- cchData: Integer): Integer; stdcall;
-{$EXTERNALSYM GetLocaleInfoW}
-function GetLocaleInfo(Locale: LCID; LCType: LCTYPE; lpLCData: LPTSTR;
- cchData: Integer): Integer; stdcall;
-{$EXTERNALSYM GetLocaleInfo}
-
-function SetLocaleInfoA(Locale: LCID; LCType: LCTYPE; lpLCData: LPCSTR): BOOL; stdcall;
-{$EXTERNALSYM SetLocaleInfoA}
-function SetLocaleInfoW(Locale: LCID; LCType: LCTYPE; lpLCData: LPCWSTR): BOOL; stdcall;
-{$EXTERNALSYM SetLocaleInfoW}
-function SetLocaleInfo(Locale: LCID; LCType: LCTYPE; lpLCData: LPCTSTR): BOOL; stdcall;
-{$EXTERNALSYM SetLocaleInfo}
-
-function GetCalendarInfoA(Locale: LCID; Calendar: CALID; CalType: CALTYPE;
- lpCalData: LPSTR; cchData: Integer; lpValue: LPDWORD): Integer; stdcall;
-{$EXTERNALSYM GetCalendarInfoA}
-function GetCalendarInfoW(Locale: LCID; Calendar: CALID; CalType: CALTYPE;
- lpCalData: LPWSTR; cchData: Integer; lpValue: LPDWORD): Integer; stdcall;
-{$EXTERNALSYM GetCalendarInfoW}
-function GetCalendarInfo(Locale: LCID; Calendar: CALID; CalType: CALTYPE;
- lpCalData: LPTSTR; cchData: Integer; lpValue: LPDWORD): Integer; stdcall;
-{$EXTERNALSYM GetCalendarInfo}
-
-function SetCalendarInfoA(Locale: LCID; Calendar: CALID; CalType: CALTYPE;
- lpCalData: LPCSTR): BOOL; stdcall;
-{$EXTERNALSYM SetCalendarInfoA}
-function SetCalendarInfoW(Locale: LCID; Calendar: CALID; CalType: CALTYPE;
- lpCalData: LPCWSTR): BOOL; stdcall;
-{$EXTERNALSYM SetCalendarInfoW}
-function SetCalendarInfo(Locale: LCID; Calendar: CALID; CalType: CALTYPE;
- lpCalData: LPCTSTR): BOOL; stdcall;
-{$EXTERNALSYM SetCalendarInfo}
-
-function GetTimeFormatA(Locale: LCID; dwFlags: DWORD; lpTime: LPSYSTEMTIME;
- lpFormat: LPCSTR; lpTimeStr: LPSTR; cchTime: Integer): Integer; stdcall;
-{$EXTERNALSYM GetTimeFormatA}
-function GetTimeFormatW(Locale: LCID; dwFlags: DWORD; lpTime: LPSYSTEMTIME;
- lpFormat: LPCWSTR; lpTimeStr: LPWSTR; cchTime: Integer): Integer; stdcall;
-{$EXTERNALSYM GetTimeFormatW}
-function GetTimeFormat(Locale: LCID; dwFlags: DWORD; lpTime: LPSYSTEMTIME;
- lpFormat: LPCTSTR; lpTimeStr: LPTSTR; cchTime: Integer): Integer; stdcall;
-{$EXTERNALSYM GetTimeFormat}
-
-function GetDateFormatA(Locale: LCID; dwFlags: DWORD; lpDate: LPSYSTEMTIME;
- lpFormat: LPCSTR; lpDateStr: LPSTR; cchDate: Integer): Integer; stdcall;
-{$EXTERNALSYM GetDateFormatA}
-function GetDateFormatW(Locale: LCID; dwFlags: DWORD; lpDate: LPSYSTEMTIME;
- lpFormat: LPCWSTR; lpDateStr: LPWSTR; cchDate: Integer): Integer; stdcall;
-{$EXTERNALSYM GetDateFormatW}
-function GetDateFormat(Locale: LCID; dwFlags: DWORD; lpDate: LPSYSTEMTIME;
- lpFormat: LPCTSTR; lpDateStr: LPTSTR; cchDate: Integer): Integer; stdcall;
-{$EXTERNALSYM GetDateFormat}
-
-function GetNumberFormatA(Locale: LCID; dwFlags: DWORD; lpValue: LPCSTR;
- lpFormat: LPNUMBERFMTA; lpNumberStr: LPSTR; cchNumber: Integer): Integer; stdcall;
-{$EXTERNALSYM GetNumberFormatA}
-function GetNumberFormatW(Locale: LCID; dwFlags: DWORD; lpValue: LPCWSTR;
- lpFormat: LPNUMBERFMTW; lpNumberStr: LPWSTR; cchNumber: Integer): Integer; stdcall;
-{$EXTERNALSYM GetNumberFormatW}
-function GetNumberFormat(Locale: LCID; dwFlags: DWORD; lpValue: LPCTSTR;
- lpFormat: LPNUMBERFMT; lpNumberStr: LPTSTR; cchNumber: Integer): Integer; stdcall;
-{$EXTERNALSYM GetNumberFormat}
-
-function GetCurrencyFormatA(Locale: LCID; dwFlags: DWORD; lpValue: LPCSTR;
- lpFormat: LPCURRENCYFMTA; lpCurrencyStr: LPSTR; cchCurrency: Integer): Integer; stdcall;
-{$EXTERNALSYM GetCurrencyFormatA}
-function GetCurrencyFormatW(Locale: LCID; dwFlags: DWORD; lpValue: LPCWSTR;
- lpFormat: LPCURRENCYFMTW; lpCurrencyStr: LPWSTR; cchCurrency: Integer): Integer; stdcall;
-{$EXTERNALSYM GetCurrencyFormatW}
-function GetCurrencyFormat(Locale: LCID; dwFlags: DWORD; lpValue: LPCTSTR;
- lpFormat: LPCURRENCYFMT; lpCurrencyStr: LPTSTR; cchCurrency: Integer): Integer; stdcall;
-{$EXTERNALSYM GetCurrencyFormat}
-
-function EnumCalendarInfoA(lpCalInfoEnumProc: CALINFO_ENUMPROCA; Locale: LCID;
- Calendar: CALID; CalType: CALTYPE): BOOL; stdcall;
-{$EXTERNALSYM EnumCalendarInfoA}
-function EnumCalendarInfoW(lpCalInfoEnumProc: CALINFO_ENUMPROCW; Locale: LCID;
- Calendar: CALID; CalType: CALTYPE): BOOL; stdcall;
-{$EXTERNALSYM EnumCalendarInfoW}
-function EnumCalendarInfo(lpCalInfoEnumProc: CALINFO_ENUMPROC; Locale: LCID;
- Calendar: CALID; CalType: CALTYPE): BOOL; stdcall;
-{$EXTERNALSYM EnumCalendarInfo}
-
-function EnumCalendarInfoExA(lpCalInfoEnumProcEx: CALINFO_ENUMPROCEXA;
- Locale: LCID; Calendar: CALID; CalType: CALTYPE): BOOL; stdcall;
-{$EXTERNALSYM EnumCalendarInfoExA}
-function EnumCalendarInfoExW(lpCalInfoEnumProcEx: CALINFO_ENUMPROCEXW;
- Locale: LCID; Calendar: CALID; CalType: CALTYPE): BOOL; stdcall;
-{$EXTERNALSYM EnumCalendarInfoExW}
-function EnumCalendarInfoEx(lpCalInfoEnumProcEx: CALINFO_ENUMPROCEX;
- Locale: LCID; Calendar: CALID; CalType: CALTYPE): BOOL; stdcall;
-{$EXTERNALSYM EnumCalendarInfoEx}
-
-function EnumTimeFormatsA(lpTimeFmtEnumProc: TIMEFMT_ENUMPROCA; Locale:
- LCID; dwFlags: DWORD): BOOL; stdcall;
-{$EXTERNALSYM EnumTimeFormatsA}
-function EnumTimeFormatsW(lpTimeFmtEnumProc: TIMEFMT_ENUMPROCW; Locale:
- LCID; dwFlags: DWORD): BOOL; stdcall;
-{$EXTERNALSYM EnumTimeFormatsW}
-function EnumTimeFormats(lpTimeFmtEnumProc: TIMEFMT_ENUMPROC; Locale: LCID;
- dwFlags: DWORD): BOOL; stdcall;
-{$EXTERNALSYM EnumTimeFormats}
-
-function EnumDateFormatsA(lpDateFmtEnumProc: DATEFMT_ENUMPROCA; Locale: LCID;
- dwFlags: DWORD): BOOL; stdcall;
-{$EXTERNALSYM EnumDateFormatsA}
-function EnumDateFormatsW(lpDateFmtEnumProc: DATEFMT_ENUMPROCW; Locale: LCID;
- dwFlags: DWORD): BOOL; stdcall;
-{$EXTERNALSYM EnumDateFormatsW}
-function EnumDateFormats(lpDateFmtEnumProc: DATEFMT_ENUMPROC; Locale: LCID;
- dwFlags: DWORD): BOOL; stdcall;
-{$EXTERNALSYM EnumDateFormats}
-
-function EnumDateFormatsExA(lpDateFmtEnumProcEx: DATEFMT_ENUMPROCEXA;
- Locale: LCID; dwFlags: DWORD): BOOL; stdcall;
-{$EXTERNALSYM EnumDateFormatsExA}
-function EnumDateFormatsExW(lpDateFmtEnumProcEx: DATEFMT_ENUMPROCEXW;
- Locale: LCID; dwFlags: DWORD): BOOL; stdcall;
-{$EXTERNALSYM EnumDateFormatsExW}
-function EnumDateFormatsEx(lpDateFmtEnumProcEx: DATEFMT_ENUMPROCEX;
- Locale: LCID; dwFlags: DWORD): BOOL; stdcall;
-{$EXTERNALSYM EnumDateFormatsEx}
-
-function IsValidLanguageGroup(LanguageGroup: LGRPID; dwFlags: DWORD): BOOL; stdcall;
-{$EXTERNALSYM IsValidLanguageGroup}
-
-function GetNLSVersion(Function_: NLS_FUNCTION; Locale: LCID; lpVersionInformation: LPNLSVERSIONINFO): BOOL; stdcall;
-{$EXTERNALSYM GetNLSVersion}
-
-function IsNLSDefinedString(Function_: NLS_FUNCTION; dwFlags: DWORD; lpVersionInformation: LPNLSVERSIONINFO;
- lpString: LPCWSTR; cchStr: Integer): BOOL; stdcall;
-{$EXTERNALSYM IsNLSDefinedString}
-
-function IsValidLocale(Locale: LCID; dwFlags: DWORD): BOOL; stdcall;
-{$EXTERNALSYM IsValidLocale}
-
-function GetGeoInfoA(Location: GEOID; GeoType: GEOTYPE; lpGeoData: LPSTR;
- cchData: Integer; LangId: LANGID): Integer; stdcall;
-{$EXTERNALSYM GetGeoInfoA}
-function GetGeoInfoW(Location: GEOID; GeoType: GEOTYPE; lpGeoData: LPWSTR;
- cchData: Integer; LangId: LANGID): Integer; stdcall;
-{$EXTERNALSYM GetGeoInfoW}
-function GetGeoInfo(Location: GEOID; GeoType: GEOTYPE; lpGeoData: LPTSTR;
- cchData: Integer; LangId: LANGID): Integer; stdcall;
-{$EXTERNALSYM GetGeoInfo}
-
-function EnumSystemGeoID(GeoClass: GEOCLASS; ParentGeoId: GEOID; lpGeoEnumProc: GEO_ENUMPROC): BOOL; stdcall;
-{$EXTERNALSYM EnumSystemGeoID}
-
-function GetUserGeoID(GeoClass: GEOCLASS): GEOID; stdcall;
-{$EXTERNALSYM GetUserGeoID}
-
-function SetUserGeoID(GeoId: GEOID): BOOL; stdcall;
-{$EXTERNALSYM SetUserGeoID}
-
-function ConvertDefaultLocale(Locale: LCID): LCID; stdcall;
-{$EXTERNALSYM ConvertDefaultLocale}
-
-function GetThreadLocale: LCID; stdcall;
-{$EXTERNALSYM GetThreadLocale}
-
-function SetThreadLocale(Locale: LCID): BOOL; stdcall;
-{$EXTERNALSYM SetThreadLocale}
-
-function GetSystemDefaultUILanguage: LANGID; stdcall;
-{$EXTERNALSYM GetSystemDefaultUILanguage}
-
-function GetUserDefaultUILanguage: LANGID; stdcall;
-{$EXTERNALSYM GetUserDefaultUILanguage}
-
-function GetSystemDefaultLangID: LANGID; stdcall;
-{$EXTERNALSYM GetSystemDefaultLangID}
-
-function GetUserDefaultLangID: LANGID; stdcall;
-{$EXTERNALSYM GetUserDefaultLangID}
-
-function GetSystemDefaultLCID: LCID; stdcall;
-{$EXTERNALSYM GetSystemDefaultLCID}
-
-function GetUserDefaultLCID: LCID; stdcall;
-{$EXTERNALSYM GetUserDefaultLCID}
-
-//
-// Locale Independent APIs.
-//
-
-function GetStringTypeExA(Locale: LCID; dwInfoType: DWORD; lpSrcStr: LPCSTR;
- cchSrc: Integer; lpCharType: LPWORD): BOOL; stdcall;
-{$EXTERNALSYM GetStringTypeExA}
-function GetStringTypeExW(Locale: LCID; dwInfoType: DWORD; lpSrcStr: LPCWSTR;
- cchSrc: Integer; lpCharType: LPWORD): BOOL; stdcall;
-{$EXTERNALSYM GetStringTypeExW}
-function GetStringTypeEx(Locale: LCID; dwInfoType: DWORD; lpSrcStr: LPCTSTR;
- cchSrc: Integer; lpCharType: LPWORD): BOOL; stdcall;
-{$EXTERNALSYM GetStringTypeEx}
-
-//
-// NOTE: The parameters for GetStringTypeA and GetStringTypeW are
-// NOT the same. The W version was shipped in NT 3.1. The
-// A version was then shipped in 16-bit OLE with the wrong
-// parameters (ported from Win95). To be compatible, we
-// must break the relationship between the A and W versions
-// of GetStringType. There will be NO function call for the
-// generic GetStringType.
-//
-// GetStringTypeEx (above) should be used instead.
-//
-
-function GetStringTypeA(Locale: LCID; dwInfoType: DWORD; lpSrcStr: LPCSTR;
- cchSrc: Integer; lpCharType: LPWORD): BOOL; stdcall;
-{$EXTERNALSYM GetStringTypeA}
-function GetStringTypeW(dwInfoType: DWORD; lpSrcStr: LPCWSTR; cchSrc: Integer;
- lpCharType: LPWORD): BOOL; stdcall;
-{$EXTERNALSYM GetStringTypeW}
-
-function FoldStringA(dwMapFlags: DWORD; lpSrcStr: LPCSTR; cchSrc: Integer;
- lpDestStr: LPSTR; cchDest: Integer): Integer; stdcall;
-{$EXTERNALSYM FoldStringA}
-function FoldStringW(dwMapFlags: DWORD; lpSrcStr: LPCWSTR; cchSrc: Integer;
- lpDestStr: LPWSTR; cchDest: Integer): Integer; stdcall;
-{$EXTERNALSYM FoldStringW}
-function FoldString(dwMapFlags: DWORD; lpSrcStr: LPCTSTR; cchSrc: Integer;
- lpDestStr: LPTSTR; cchDest: Integer): Integer; stdcall;
-{$EXTERNALSYM FoldString}
-
-function EnumSystemLanguageGroupsA(lpLanguageGroupEnumProc: LANGUAGEGROUP_ENUMPROCA;
- dwFlags: DWORD; lParam: LONG_PTR): BOOL; stdcall;
-{$EXTERNALSYM EnumSystemLanguageGroupsA}
-function EnumSystemLanguageGroupsW(lpLanguageGroupEnumProc: LANGUAGEGROUP_ENUMPROCW;
- dwFlags: DWORD; lParam: LONG_PTR): BOOL; stdcall;
-{$EXTERNALSYM EnumSystemLanguageGroupsW}
-function EnumSystemLanguageGroups(lpLanguageGroupEnumProc: LANGUAGEGROUP_ENUMPROC;
- dwFlags: DWORD; lParam: LONG_PTR): BOOL; stdcall;
-{$EXTERNALSYM EnumSystemLanguageGroups}
-
-function EnumLanguageGroupLocalesA(lpLangGroupLocaleEnumProc: LANGGROUPLOCALE_ENUMPROCA;
- LanguageGroup: LGRPID; dwFlags: DWORD; lParam: LONG_PTR): BOOL; stdcall;
-{$EXTERNALSYM EnumLanguageGroupLocalesA}
-function EnumLanguageGroupLocalesW(lpLangGroupLocaleEnumProc: LANGGROUPLOCALE_ENUMPROCW;
- LanguageGroup: LGRPID; dwFlags: DWORD; lParam: LONG_PTR): BOOL; stdcall;
-{$EXTERNALSYM EnumLanguageGroupLocalesW}
-function EnumLanguageGroupLocales(lpLangGroupLocaleEnumProc: LANGGROUPLOCALE_ENUMPROC;
- LanguageGroup: LGRPID; dwFlags: DWORD; lParam: LONG_PTR): BOOL; stdcall;
-{$EXTERNALSYM EnumLanguageGroupLocales}
-
-function EnumUILanguagesA(lpUILanguageEnumProc: UILANGUAGE_ENUMPROCA;
- dwFlags: DWORD; lParam: LONG_PTR): BOOL; stdcall;
-{$EXTERNALSYM EnumUILanguagesA}
-function EnumUILanguagesW(lpUILanguageEnumProc: UILANGUAGE_ENUMPROCW;
- dwFlags: DWORD; lParam: LONG_PTR): BOOL; stdcall;
-{$EXTERNALSYM EnumUILanguagesW}
-function EnumUILanguages(lpUILanguageEnumProc: UILANGUAGE_ENUMPROC;
- dwFlags: DWORD; lParam: LONG_PTR): BOOL; stdcall;
-{$EXTERNALSYM EnumUILanguages}
-
-function EnumSystemLocalesA(lpLocaleEnumProc: LOCALE_ENUMPROCA;
- dwFlags: DWORD): BOOL; stdcall;
-{$EXTERNALSYM EnumSystemLocalesA}
-function EnumSystemLocalesW(lpLocaleEnumProc: LOCALE_ENUMPROCW;
- dwFlags: DWORD): BOOL; stdcall;
-{$EXTERNALSYM EnumSystemLocalesW}
-function EnumSystemLocales(lpLocaleEnumProc: LOCALE_ENUMPROC;
- dwFlags: DWORD): BOOL; stdcall;
-{$EXTERNALSYM EnumSystemLocales}
-
-function EnumSystemCodePagesA(lpCodePageEnumProc: CODEPAGE_ENUMPROCA;
- dwFlags: DWORD): BOOL; stdcall;
-{$EXTERNALSYM EnumSystemCodePagesA}
-function EnumSystemCodePagesW(lpCodePageEnumProc: CODEPAGE_ENUMPROCW;
- dwFlags: DWORD): BOOL; stdcall;
-{$EXTERNALSYM EnumSystemCodePagesW}
-function EnumSystemCodePages(lpCodePageEnumProc: CODEPAGE_ENUMPROC;
- dwFlags: DWORD): BOOL; stdcall;
-{$EXTERNALSYM EnumSystemCodePages}
-
-implementation
-
-const
- kernel32 = 'kernel32.dll';
- {$IFDEF UNICODE}
- AWSuffix = 'W';
- {$ELSE}
- AWSuffix = 'A';
- {$ENDIF UNICODE}
-
-{$IFDEF DYNAMIC_LINK}
-
-var
- _IsValidCodePage: Pointer;
-
-function IsValidCodePage;
-begin
- GetProcedureAddress(_IsValidCodePage, kernel32, 'IsValidCodePage');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_IsValidCodePage]
- end;
-end;
-
-var
- _GetACP: Pointer;
-
-function GetACP;
-begin
- GetProcedureAddress(_GetACP, kernel32, 'GetACP');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetACP]
- end;
-end;
-
-var
- _GetOEMCP: Pointer;
-
-function GetOEMCP;
-begin
- GetProcedureAddress(_GetOEMCP, kernel32, 'GetOEMCP');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetOEMCP]
- end;
-end;
-
-var
- _GetCPInfo: Pointer;
-
-function GetCPInfo;
-begin
- GetProcedureAddress(_GetCPInfo, kernel32, 'GetCPInfo');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetCPInfo]
- end;
-end;
-
-var
- _GetCPInfoExA: Pointer;
-
-function GetCPInfoExA;
-begin
- GetProcedureAddress(_GetCPInfoExA, kernel32, 'GetCPInfoExA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetCPInfoExA]
- end;
-end;
-
-var
- _GetCPInfoExW: Pointer;
-
-function GetCPInfoExW;
-begin
- GetProcedureAddress(_GetCPInfoExW, kernel32, 'GetCPInfoExW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetCPInfoExW]
- end;
-end;
-
-var
- _GetCPInfoEx: Pointer;
-
-function GetCPInfoEx;
-begin
- GetProcedureAddress(_GetCPInfoEx, kernel32, 'GetCPInfoEx' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetCPInfoEx]
- end;
-end;
-
-var
- _IsDBCSLeadByte: Pointer;
-
-function IsDBCSLeadByte;
-begin
- GetProcedureAddress(_IsDBCSLeadByte, kernel32, 'IsDBCSLeadByte');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_IsDBCSLeadByte]
- end;
-end;
-
-var
- _IsDBCSLeadByteEx: Pointer;
-
-function IsDBCSLeadByteEx;
-begin
- GetProcedureAddress(_IsDBCSLeadByteEx, kernel32, 'IsDBCSLeadByteEx');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_IsDBCSLeadByteEx]
- end;
-end;
-
-var
- _MultiByteToWideChar: Pointer;
-
-function MultiByteToWideChar;
-begin
- GetProcedureAddress(_MultiByteToWideChar, kernel32, 'MultiByteToWideChar');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MultiByteToWideChar]
- end;
-end;
-
-var
- _WideCharToMultiByte: Pointer;
-
-function WideCharToMultiByte;
-begin
- GetProcedureAddress(_WideCharToMultiByte, kernel32, 'WideCharToMultiByte');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WideCharToMultiByte]
- end;
-end;
-
-var
- _CompareStringA: Pointer;
-
-function CompareStringA;
-begin
- GetProcedureAddress(_CompareStringA, kernel32, 'CompareStringA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CompareStringA]
- end;
-end;
-
-var
- _CompareStringW: Pointer;
-
-function CompareStringW;
-begin
- GetProcedureAddress(_CompareStringW, kernel32, 'CompareStringW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CompareStringW]
- end;
-end;
-
-var
- _CompareString: Pointer;
-
-function CompareString;
-begin
- GetProcedureAddress(_CompareString, kernel32, 'CompareString' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CompareString]
- end;
-end;
-
-var
- _LCMapStringA: Pointer;
-
-function LCMapStringA;
-begin
- GetProcedureAddress(_LCMapStringA, kernel32, 'LCMapStringA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_LCMapStringA]
- end;
-end;
-
-var
- _LCMapStringW: Pointer;
-
-function LCMapStringW;
-begin
- GetProcedureAddress(_LCMapStringW, kernel32, 'LCMapStringW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_LCMapStringW]
- end;
-end;
-
-var
- _LCMapString: Pointer;
-
-function LCMapString;
-begin
- GetProcedureAddress(_LCMapString, kernel32, 'LCMapString' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_LCMapString]
- end;
-end;
-
-var
- _GetLocaleInfoA: Pointer;
-
-function GetLocaleInfoA;
-begin
- GetProcedureAddress(_GetLocaleInfoA, kernel32, 'GetLocaleInfoA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetLocaleInfoA]
- end;
-end;
-
-var
- _GetLocaleInfoW: Pointer;
-
-function GetLocaleInfoW;
-begin
- GetProcedureAddress(_GetLocaleInfoW, kernel32, 'GetLocaleInfoW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetLocaleInfoW]
- end;
-end;
-
-var
- _GetLocaleInfo: Pointer;
-
-function GetLocaleInfo;
-begin
- GetProcedureAddress(_GetLocaleInfo, kernel32, 'GetLocaleInfo' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetLocaleInfo]
- end;
-end;
-
-var
- _SetLocaleInfoA: Pointer;
-
-function SetLocaleInfoA;
-begin
- GetProcedureAddress(_SetLocaleInfoA, kernel32, 'SetLocaleInfoA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetLocaleInfoA]
- end;
-end;
-
-var
- _SetLocaleInfoW: Pointer;
-
-function SetLocaleInfoW;
-begin
- GetProcedureAddress(_SetLocaleInfoW, kernel32, 'SetLocaleInfoW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetLocaleInfoW]
- end;
-end;
-
-var
- _SetLocaleInfo: Pointer;
-
-function SetLocaleInfo;
-begin
- GetProcedureAddress(_SetLocaleInfo, kernel32, 'SetLocaleInfo' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetLocaleInfo]
- end;
-end;
-
-var
- _GetCalendarInfoA: Pointer;
-
-function GetCalendarInfoA;
-begin
- GetProcedureAddress(_GetCalendarInfoA, kernel32, 'GetCalendarInfoA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetCalendarInfoA]
- end;
-end;
-
-var
- _GetCalendarInfoW: Pointer;
-
-function GetCalendarInfoW;
-begin
- GetProcedureAddress(_GetCalendarInfoW, kernel32, 'GetCalendarInfoW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetCalendarInfoW]
- end;
-end;
-
-var
- _GetCalendarInfo: Pointer;
-
-function GetCalendarInfo;
-begin
- GetProcedureAddress(_GetCalendarInfo, kernel32, 'GetCalendarInfo' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetCalendarInfo]
- end;
-end;
-
-var
- _SetCalendarInfoA: Pointer;
-
-function SetCalendarInfoA;
-begin
- GetProcedureAddress(_SetCalendarInfoA, kernel32, 'SetCalendarInfoA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetCalendarInfoA]
- end;
-end;
-
-var
- _SetCalendarInfoW: Pointer;
-
-function SetCalendarInfoW;
-begin
- GetProcedureAddress(_SetCalendarInfoW, kernel32, 'SetCalendarInfoW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetCalendarInfoW]
- end;
-end;
-
-var
- _SetCalendarInfo: Pointer;
-
-function SetCalendarInfo;
-begin
- GetProcedureAddress(_SetCalendarInfo, kernel32, 'SetCalendarInfo' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetCalendarInfo]
- end;
-end;
-
-var
- _GetTimeFormatA: Pointer;
-
-function GetTimeFormatA;
-begin
- GetProcedureAddress(_GetTimeFormatA, kernel32, 'GetTimeFormatA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetTimeFormatA]
- end;
-end;
-
-var
- _GetTimeFormatW: Pointer;
-
-function GetTimeFormatW;
-begin
- GetProcedureAddress(_GetTimeFormatW, kernel32, 'GetTimeFormatW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetTimeFormatW]
- end;
-end;
-
-var
- _GetTimeFormat: Pointer;
-
-function GetTimeFormat;
-begin
- GetProcedureAddress(_GetTimeFormat, kernel32, 'GetTimeFormat' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetTimeFormat]
- end;
-end;
-
-var
- _GetDateFormatA: Pointer;
-
-function GetDateFormatA;
-begin
- GetProcedureAddress(_GetDateFormatA, kernel32, 'GetDateFormatA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetDateFormatA]
- end;
-end;
-
-var
- _GetDateFormatW: Pointer;
-
-function GetDateFormatW;
-begin
- GetProcedureAddress(_GetDateFormatW, kernel32, 'GetDateFormatW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetDateFormatW]
- end;
-end;
-
-var
- _GetDateFormat: Pointer;
-
-function GetDateFormat;
-begin
- GetProcedureAddress(_GetDateFormat, kernel32, 'GetDateFormat' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetDateFormat]
- end;
-end;
-
-var
- _GetNumberFormatA: Pointer;
-
-function GetNumberFormatA;
-begin
- GetProcedureAddress(_GetNumberFormatA, kernel32, 'GetNumberFormatA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetNumberFormatA]
- end;
-end;
-
-var
- _GetNumberFormatW: Pointer;
-
-function GetNumberFormatW;
-begin
- GetProcedureAddress(_GetNumberFormatW, kernel32, 'GetNumberFormatW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetNumberFormatW]
- end;
-end;
-
-var
- _GetNumberFormat: Pointer;
-
-function GetNumberFormat;
-begin
- GetProcedureAddress(_GetNumberFormat, kernel32, 'GetNumberFormat' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetNumberFormat]
- end;
-end;
-
-var
- _GetCurrencyFormatA: Pointer;
-
-function GetCurrencyFormatA;
-begin
- GetProcedureAddress(_GetCurrencyFormatA, kernel32, 'GetCurrencyFormatA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetCurrencyFormatA]
- end;
-end;
-
-var
- _GetCurrencyFormatW: Pointer;
-
-function GetCurrencyFormatW;
-begin
- GetProcedureAddress(_GetCurrencyFormatW, kernel32, 'GetCurrencyFormatW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetCurrencyFormatW]
- end;
-end;
-
-var
- _GetCurrencyFormat: Pointer;
-
-function GetCurrencyFormat;
-begin
- GetProcedureAddress(_GetCurrencyFormat, kernel32, 'GetCurrencyFormat' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetCurrencyFormat]
- end;
-end;
-
-var
- _EnumCalendarInfoA: Pointer;
-
-function EnumCalendarInfoA;
-begin
- GetProcedureAddress(_EnumCalendarInfoA, kernel32, 'EnumCalendarInfoA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_EnumCalendarInfoA]
- end;
-end;
-
-var
- _EnumCalendarInfoW: Pointer;
-
-function EnumCalendarInfoW;
-begin
- GetProcedureAddress(_EnumCalendarInfoW, kernel32, 'EnumCalendarInfoW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_EnumCalendarInfoW]
- end;
-end;
-
-var
- _EnumCalendarInfo: Pointer;
-
-function EnumCalendarInfo;
-begin
- GetProcedureAddress(_EnumCalendarInfo, kernel32, 'EnumCalendarInfo' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_EnumCalendarInfo]
- end;
-end;
-
-var
- _EnumCalendarInfoExA: Pointer;
-
-function EnumCalendarInfoExA;
-begin
- GetProcedureAddress(_EnumCalendarInfoExA, kernel32, 'EnumCalendarInfoExA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_EnumCalendarInfoExA]
- end;
-end;
-
-var
- _EnumCalendarInfoExW: Pointer;
-
-function EnumCalendarInfoExW;
-begin
- GetProcedureAddress(_EnumCalendarInfoExW, kernel32, 'EnumCalendarInfoExW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_EnumCalendarInfoExW]
- end;
-end;
-
-var
- _EnumCalendarInfoEx: Pointer;
-
-function EnumCalendarInfoEx;
-begin
- GetProcedureAddress(_EnumCalendarInfoEx, kernel32, 'EnumCalendarInfoEx' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_EnumCalendarInfoEx]
- end;
-end;
-
-var
- _EnumTimeFormatsA: Pointer;
-
-function EnumTimeFormatsA;
-begin
- GetProcedureAddress(_EnumTimeFormatsA, kernel32, 'EnumTimeFormatsA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_EnumTimeFormatsA]
- end;
-end;
-
-var
- _EnumTimeFormatsW: Pointer;
-
-function EnumTimeFormatsW;
-begin
- GetProcedureAddress(_EnumTimeFormatsW, kernel32, 'EnumTimeFormatsW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_EnumTimeFormatsW]
- end;
-end;
-
-var
- _EnumTimeFormats: Pointer;
-
-function EnumTimeFormats;
-begin
- GetProcedureAddress(_EnumTimeFormats, kernel32, 'EnumTimeFormats' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_EnumTimeFormats]
- end;
-end;
-
-var
- _EnumDateFormatsA: Pointer;
-
-function EnumDateFormatsA;
-begin
- GetProcedureAddress(_EnumDateFormatsA, kernel32, 'EnumDateFormatsA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_EnumDateFormatsA]
- end;
-end;
-
-var
- _EnumDateFormatsW: Pointer;
-
-function EnumDateFormatsW;
-begin
- GetProcedureAddress(_EnumDateFormatsW, kernel32, 'EnumDateFormatsW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_EnumDateFormatsW]
- end;
-end;
-
-var
- _EnumDateFormats: Pointer;
-
-function EnumDateFormats;
-begin
- GetProcedureAddress(_EnumDateFormats, kernel32, 'EnumDateFormats' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_EnumDateFormats]
- end;
-end;
-
-var
- _EnumDateFormatsExA: Pointer;
-
-function EnumDateFormatsExA;
-begin
- GetProcedureAddress(_EnumDateFormatsExA, kernel32, 'EnumDateFormatsExA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_EnumDateFormatsExA]
- end;
-end;
-
-var
- _EnumDateFormatsExW: Pointer;
-
-function EnumDateFormatsExW;
-begin
- GetProcedureAddress(_EnumDateFormatsExW, kernel32, 'EnumDateFormatsExW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_EnumDateFormatsExW]
- end;
-end;
-
-var
- _EnumDateFormatsEx: Pointer;
-
-function EnumDateFormatsEx;
-begin
- GetProcedureAddress(_EnumDateFormatsEx, kernel32, 'EnumDateFormatsEx' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_EnumDateFormatsEx]
- end;
-end;
-
-var
- _IsValidLanguageGroup: Pointer;
-
-function IsValidLanguageGroup;
-begin
- GetProcedureAddress(_IsValidLanguageGroup, kernel32, 'IsValidLanguageGroup');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_IsValidLanguageGroup]
- end;
-end;
-
-var
- _GetNLSVersion: Pointer;
-
-function GetNLSVersion;
-begin
- GetProcedureAddress(_GetNLSVersion, kernel32, 'GetNLSVersion');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetNLSVersion]
- end;
-end;
-
-var
- _IsNLSDefinedString: Pointer;
-
-function IsNLSDefinedString;
-begin
- GetProcedureAddress(_IsNLSDefinedString, kernel32, 'IsNLSDefinedString');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_IsNLSDefinedString]
- end;
-end;
-
-var
- _IsValidLocale: Pointer;
-
-function IsValidLocale;
-begin
- GetProcedureAddress(_IsValidLocale, kernel32, 'IsValidLocale');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_IsValidLocale]
- end;
-end;
-
-var
- _GetGeoInfoA: Pointer;
-
-function GetGeoInfoA;
-begin
- GetProcedureAddress(_GetGeoInfoA, kernel32, 'GetGeoInfoA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetGeoInfoA]
- end;
-end;
-
-var
- _GetGeoInfoW: Pointer;
-
-function GetGeoInfoW;
-begin
- GetProcedureAddress(_GetGeoInfoW, kernel32, 'GetGeoInfoW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetGeoInfoW]
- end;
-end;
-
-var
- _GetGeoInfo: Pointer;
-
-function GetGeoInfo;
-begin
- GetProcedureAddress(_GetGeoInfo, kernel32, 'GetGeoInfo');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetGeoInfo]
- end;
-end;
-
-var
- _EnumSystemGeoID: Pointer;
-
-function EnumSystemGeoID;
-begin
- GetProcedureAddress(_EnumSystemGeoID, kernel32, 'EnumSystemGeoID');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_EnumSystemGeoID]
- end;
-end;
-
-var
- _GetUserGeoID: Pointer;
-
-function GetUserGeoID;
-begin
- GetProcedureAddress(_GetUserGeoID, kernel32, 'GetUserGeoID');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetUserGeoID]
- end;
-end;
-
-var
- _SetUserGeoID: Pointer;
-
-function SetUserGeoID;
-begin
- GetProcedureAddress(_SetUserGeoID, kernel32, 'SetUserGeoID');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetUserGeoID]
- end;
-end;
-
-var
- _ConvertDefaultLocale: Pointer;
-
-function ConvertDefaultLocale;
-begin
- GetProcedureAddress(_ConvertDefaultLocale, kernel32, 'ConvertDefaultLocale');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ConvertDefaultLocale]
- end;
-end;
-
-var
- _GetThreadLocale: Pointer;
-
-function GetThreadLocale;
-begin
- GetProcedureAddress(_GetThreadLocale, kernel32, 'GetThreadLocale');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetThreadLocale]
- end;
-end;
-
-var
- _SetThreadLocale: Pointer;
-
-function SetThreadLocale;
-begin
- GetProcedureAddress(_SetThreadLocale, kernel32, 'SetThreadLocale');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetThreadLocale]
- end;
-end;
-
-var
- _GetSystemDefaultUILanguage: Pointer;
-
-function GetSystemDefaultUILanguage;
-begin
- GetProcedureAddress(_GetSystemDefaultUILanguage, kernel32, 'GetSystemDefaultUILanguage');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetSystemDefaultUILanguage]
- end;
-end;
-
-var
- _GetUserDefaultUILanguage: Pointer;
-
-function GetUserDefaultUILanguage;
-begin
- GetProcedureAddress(_GetUserDefaultUILanguage, kernel32, 'GetUserDefaultUILanguage');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetUserDefaultUILanguage]
- end;
-end;
-
-var
- _GetSystemDefaultLangID: Pointer;
-
-function GetSystemDefaultLangID;
-begin
- GetProcedureAddress(_GetSystemDefaultLangID, kernel32, 'GetSystemDefaultLangID');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetSystemDefaultLangID]
- end;
-end;
-
-var
- _GetUserDefaultLangID: Pointer;
-
-function GetUserDefaultLangID;
-begin
- GetProcedureAddress(_GetUserDefaultLangID, kernel32, 'GetUserDefaultLangID');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetUserDefaultLangID]
- end;
-end;
-
-var
- _GetSystemDefaultLCID: Pointer;
-
-function GetSystemDefaultLCID;
-begin
- GetProcedureAddress(_GetSystemDefaultLCID, kernel32, 'GetSystemDefaultLCID');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetSystemDefaultLCID]
- end;
-end;
-
-var
- _GetUserDefaultLCID: Pointer;
-
-function GetUserDefaultLCID;
-begin
- GetProcedureAddress(_GetUserDefaultLCID, kernel32, 'GetUserDefaultLCID');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetUserDefaultLCID]
- end;
-end;
-
-var
- _GetStringTypeExA: Pointer;
-
-function GetStringTypeExA;
-begin
- GetProcedureAddress(_GetStringTypeExA, kernel32, 'GetStringTypeExA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetStringTypeExA]
- end;
-end;
-
-var
- _GetStringTypeExW: Pointer;
-
-function GetStringTypeExW;
-begin
- GetProcedureAddress(_GetStringTypeExW, kernel32, 'GetStringTypeExW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetStringTypeExW]
- end;
-end;
-
-var
- _GetStringTypeEx: Pointer;
-
-function GetStringTypeEx;
-begin
- GetProcedureAddress(_GetStringTypeEx, kernel32, 'GetStringTypeEx' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetStringTypeEx]
- end;
-end;
-
-var
- _GetStringTypeA: Pointer;
-
-function GetStringTypeA;
-begin
- GetProcedureAddress(_GetStringTypeA, kernel32, 'GetStringTypeA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetStringTypeA]
- end;
-end;
-
-var
- _GetStringTypeW: Pointer;
-
-function GetStringTypeW;
-begin
- GetProcedureAddress(_GetStringTypeW, kernel32, 'GetStringTypeW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetStringTypeW]
- end;
-end;
-
-var
- _FoldStringA: Pointer;
-
-function FoldStringA;
-begin
- GetProcedureAddress(_FoldStringA, kernel32, 'FoldStringA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_FoldStringA]
- end;
-end;
-
-var
- _FoldStringW: Pointer;
-
-function FoldStringW;
-begin
- GetProcedureAddress(_FoldStringW, kernel32, 'FoldStringW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_FoldStringW]
- end;
-end;
-
-var
- _FoldString: Pointer;
-
-function FoldString;
-begin
- GetProcedureAddress(_FoldString, kernel32, 'FoldString' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_FoldString]
- end;
-end;
-
-var
- _EnumSystemLanguageGroupsA: Pointer;
-
-function EnumSystemLanguageGroupsA;
-begin
- GetProcedureAddress(_EnumSystemLanguageGroupsA, kernel32, 'EnumSystemLanguageGroupsA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_EnumSystemLanguageGroupsA]
- end;
-end;
-
-var
- _EnumSystemLanguageGroupsW: Pointer;
-
-function EnumSystemLanguageGroupsW;
-begin
- GetProcedureAddress(_EnumSystemLanguageGroupsW, kernel32, 'EnumSystemLanguageGroupsW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_EnumSystemLanguageGroupsW]
- end;
-end;
-
-var
- _EnumSystemLanguageGroups: Pointer;
-
-function EnumSystemLanguageGroups;
-begin
- GetProcedureAddress(_EnumSystemLanguageGroups, kernel32, 'EnumSystemLanguageGroups' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_EnumSystemLanguageGroups]
- end;
-end;
-
-var
- _EnumLanguageGroupLocalesA: Pointer;
-
-function EnumLanguageGroupLocalesA;
-begin
- GetProcedureAddress(_EnumLanguageGroupLocalesA, kernel32, 'EnumLanguageGroupLocalesA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_EnumLanguageGroupLocalesA]
- end;
-end;
-
-var
- _EnumLanguageGroupLocalesW: Pointer;
-
-function EnumLanguageGroupLocalesW;
-begin
- GetProcedureAddress(_EnumLanguageGroupLocalesW, kernel32, 'EnumLanguageGroupLocalesW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_EnumLanguageGroupLocalesW]
- end;
-end;
-
-var
- _EnumLanguageGroupLocales: Pointer;
-
-function EnumLanguageGroupLocales;
-begin
- GetProcedureAddress(_EnumLanguageGroupLocales, kernel32, 'EnumLanguageGroupLocales' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_EnumLanguageGroupLocales]
- end;
-end;
-
-var
- _EnumUILanguagesA: Pointer;
-
-function EnumUILanguagesA;
-begin
- GetProcedureAddress(_EnumUILanguagesA, kernel32, 'EnumUILanguagesA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_EnumUILanguagesA]
- end;
-end;
-
-var
- _EnumUILanguagesW: Pointer;
-
-function EnumUILanguagesW;
-begin
- GetProcedureAddress(_EnumUILanguagesW, kernel32, 'EnumUILanguagesW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_EnumUILanguagesW]
- end;
-end;
-
-var
- _EnumUILanguages: Pointer;
-
-function EnumUILanguages;
-begin
- GetProcedureAddress(_EnumUILanguages, kernel32, 'EnumUILanguages' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_EnumUILanguages]
- end;
-end;
-
-var
- _EnumSystemLocalesA: Pointer;
-
-function EnumSystemLocalesA;
-begin
- GetProcedureAddress(_EnumSystemLocalesA, kernel32, 'EnumSystemLocalesA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_EnumSystemLocalesA]
- end;
-end;
-
-var
- _EnumSystemLocalesW: Pointer;
-
-function EnumSystemLocalesW;
-begin
- GetProcedureAddress(_EnumSystemLocalesW, kernel32, 'EnumSystemLocalesW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_EnumSystemLocalesW]
- end;
-end;
-
-var
- _EnumSystemLocales: Pointer;
-
-function EnumSystemLocales;
-begin
- GetProcedureAddress(_EnumSystemLocales, kernel32, 'EnumSystemLocales' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_EnumSystemLocales]
- end;
-end;
-
-var
- _EnumSystemCodePagesA: Pointer;
-
-function EnumSystemCodePagesA;
-begin
- GetProcedureAddress(_EnumSystemCodePagesA, kernel32, 'EnumSystemCodePagesA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_EnumSystemCodePagesA]
- end;
-end;
-
-var
- _EnumSystemCodePagesW: Pointer;
-
-function EnumSystemCodePagesW;
-begin
- GetProcedureAddress(_EnumSystemCodePagesW, kernel32, 'EnumSystemCodePagesW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_EnumSystemCodePagesW]
- end;
-end;
-
-var
- _EnumSystemCodePages: Pointer;
-
-function EnumSystemCodePages;
-begin
- GetProcedureAddress(_EnumSystemCodePages, kernel32, 'EnumSystemCodePages' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_EnumSystemCodePages]
- end;
-end;
-
-{$ELSE}
-
-function IsValidCodePage; external kernel32 name 'IsValidCodePage';
-function GetACP; external kernel32 name 'GetACP';
-function GetOEMCP; external kernel32 name 'GetOEMCP';
-function GetCPInfo; external kernel32 name 'GetCPInfo';
-function GetCPInfoExA; external kernel32 name 'GetCPInfoExA';
-function GetCPInfoExW; external kernel32 name 'GetCPInfoExW';
-function GetCPInfoEx; external kernel32 name 'GetCPInfoEx' + AWSuffix;
-function IsDBCSLeadByte; external kernel32 name 'IsDBCSLeadByte';
-function IsDBCSLeadByteEx; external kernel32 name 'IsDBCSLeadByteEx';
-function MultiByteToWideChar; external kernel32 name 'MultiByteToWideChar';
-function WideCharToMultiByte; external kernel32 name 'WideCharToMultiByte';
-function CompareStringA; external kernel32 name 'CompareStringA';
-function CompareStringW; external kernel32 name 'CompareStringW';
-function CompareString; external kernel32 name 'CompareString' + AWSuffix;
-function LCMapStringA; external kernel32 name 'LCMapStringA';
-function LCMapStringW; external kernel32 name 'LCMapStringW';
-function LCMapString; external kernel32 name 'LCMapString' + AWSuffix;
-function GetLocaleInfoA; external kernel32 name 'GetLocaleInfoA';
-function GetLocaleInfoW; external kernel32 name 'GetLocaleInfoW';
-function GetLocaleInfo; external kernel32 name 'GetLocaleInfo' + AWSuffix;
-function SetLocaleInfoA; external kernel32 name 'SetLocaleInfoA';
-function SetLocaleInfoW; external kernel32 name 'SetLocaleInfoW';
-function SetLocaleInfo; external kernel32 name 'SetLocaleInfo' + AWSuffix;
-function GetCalendarInfoA; external kernel32 name 'GetCalendarInfoA';
-function GetCalendarInfoW; external kernel32 name 'GetCalendarInfoW';
-function GetCalendarInfo; external kernel32 name 'GetCalendarInfo' + AWSuffix;
-function SetCalendarInfoA; external kernel32 name 'SetCalendarInfoA';
-function SetCalendarInfoW; external kernel32 name 'SetCalendarInfoW';
-function SetCalendarInfo; external kernel32 name 'SetCalendarInfo' + AWSuffix;
-function GetTimeFormatA; external kernel32 name 'GetTimeFormatA';
-function GetTimeFormatW; external kernel32 name 'GetTimeFormatW';
-function GetTimeFormat; external kernel32 name 'GetTimeFormat' + AWSuffix;
-function GetDateFormatA; external kernel32 name 'GetDateFormatA';
-function GetDateFormatW; external kernel32 name 'GetDateFormatW';
-function GetDateFormat; external kernel32 name 'GetDateFormat' + AWSuffix;
-function GetNumberFormatA; external kernel32 name 'GetNumberFormatA';
-function GetNumberFormatW; external kernel32 name 'GetNumberFormatW';
-function GetNumberFormat; external kernel32 name 'GetNumberFormat' + AWSuffix;
-function GetCurrencyFormatA; external kernel32 name 'GetCurrencyFormatA';
-function GetCurrencyFormatW; external kernel32 name 'GetCurrencyFormatW';
-function GetCurrencyFormat; external kernel32 name 'GetCurrencyFormat' + AWSuffix;
-function EnumCalendarInfoA; external kernel32 name 'EnumCalendarInfoA';
-function EnumCalendarInfoW; external kernel32 name 'EnumCalendarInfoW';
-function EnumCalendarInfo; external kernel32 name 'EnumCalendarInfo' + AWSuffix;
-function EnumCalendarInfoExA; external kernel32 name 'EnumCalendarInfoExA';
-function EnumCalendarInfoExW; external kernel32 name 'EnumCalendarInfoExW';
-function EnumCalendarInfoEx; external kernel32 name 'EnumCalendarInfoEx' + AWSuffix;
-function EnumTimeFormatsA; external kernel32 name 'EnumTimeFormatsA';
-function EnumTimeFormatsW; external kernel32 name 'EnumTimeFormatsW';
-function EnumTimeFormats; external kernel32 name 'EnumTimeFormats' + AWSuffix;
-function EnumDateFormatsA; external kernel32 name 'EnumDateFormatsA';
-function EnumDateFormatsW; external kernel32 name 'EnumDateFormatsW';
-function EnumDateFormats; external kernel32 name 'EnumDateFormats' + AWSuffix;
-function EnumDateFormatsExA; external kernel32 name 'EnumDateFormatsExA';
-function EnumDateFormatsExW; external kernel32 name 'EnumDateFormatsExW';
-function EnumDateFormatsEx; external kernel32 name 'EnumDateFormatsEx' + AWSuffix;
-function IsValidLanguageGroup; external kernel32 name 'IsValidLanguageGroup';
-function GetNLSVersion; external kernel32 name 'GetNLSVersion';
-function IsNLSDefinedString; external kernel32 name 'IsNLSDefinedString';
-function IsValidLocale; external kernel32 name 'IsValidLocale';
-function GetGeoInfoA; external kernel32 name 'GetGeoInfoA';
-function GetGeoInfoW; external kernel32 name 'GetGeoInfoW';
-function GetGeoInfo; external kernel32 name 'GetGeoInfo';
-function EnumSystemGeoID; external kernel32 name 'EnumSystemGeoID';
-function GetUserGeoID; external kernel32 name 'GetUserGeoID';
-function SetUserGeoID; external kernel32 name 'SetUserGeoID';
-function ConvertDefaultLocale; external kernel32 name 'ConvertDefaultLocale';
-function GetThreadLocale; external kernel32 name 'GetThreadLocale';
-function SetThreadLocale; external kernel32 name 'SetThreadLocale';
-function GetSystemDefaultUILanguage; external kernel32 name 'GetSystemDefaultUILanguage';
-function GetUserDefaultUILanguage; external kernel32 name 'GetUserDefaultUILanguage';
-function GetSystemDefaultLangID; external kernel32 name 'GetSystemDefaultLangID';
-function GetUserDefaultLangID; external kernel32 name 'GetUserDefaultLangID';
-function GetSystemDefaultLCID; external kernel32 name 'GetSystemDefaultLCID';
-function GetUserDefaultLCID; external kernel32 name 'GetUserDefaultLCID';
-function GetStringTypeExA; external kernel32 name 'GetStringTypeExA';
-function GetStringTypeExW; external kernel32 name 'GetStringTypeExW';
-function GetStringTypeEx; external kernel32 name 'GetStringTypeEx' + AWSuffix;
-function GetStringTypeA; external kernel32 name 'GetStringTypeA';
-function GetStringTypeW; external kernel32 name 'GetStringTypeW';
-function FoldStringA; external kernel32 name 'FoldStringA';
-function FoldStringW; external kernel32 name 'FoldStringW';
-function FoldString; external kernel32 name 'FoldString' + AWSuffix;
-function EnumSystemLanguageGroupsA; external kernel32 name 'EnumSystemLanguageGroupsA';
-function EnumSystemLanguageGroupsW; external kernel32 name 'EnumSystemLanguageGroupsW';
-function EnumSystemLanguageGroups; external kernel32 name 'EnumSystemLanguageGroups' + AWSuffix;
-function EnumLanguageGroupLocalesA; external kernel32 name 'EnumLanguageGroupLocalesA';
-function EnumLanguageGroupLocalesW; external kernel32 name 'EnumLanguageGroupLocalesW';
-function EnumLanguageGroupLocales; external kernel32 name 'EnumLanguageGroupLocales' + AWSuffix;
-function EnumUILanguagesA; external kernel32 name 'EnumUILanguagesA';
-function EnumUILanguagesW; external kernel32 name 'EnumUILanguagesW';
-function EnumUILanguages; external kernel32 name 'EnumUILanguages' + AWSuffix;
-function EnumSystemLocalesA; external kernel32 name 'EnumSystemLocalesA';
-function EnumSystemLocalesW; external kernel32 name 'EnumSystemLocalesW';
-function EnumSystemLocales; external kernel32 name 'EnumSystemLocales' + AWSuffix;
-function EnumSystemCodePagesA; external kernel32 name 'EnumSystemCodePagesA';
-function EnumSystemCodePagesW; external kernel32 name 'EnumSystemCodePagesW';
-function EnumSystemCodePages; external kernel32 name 'EnumSystemCodePages' + AWSuffix;
-
-{$ENDIF DYNAMIC_LINK}
-
-end.
+{******************************************************************************}
+{ }
+{ National Language Support API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: winnls.h, released June 2000. The original Pascal }
+{ code is: WinNLS.pas, released December 2000. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwawinnls.pas,v 1.1 2005/04/04 07:56:11 marco Exp $
+
+unit JwaWinNLS;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "WinNls.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaWinType, JwaWinBase;
+
+////////////////////////////////////////////////////////////////////////////
+//
+// Constants
+//
+// Define all constants for the NLS component here.
+//
+////////////////////////////////////////////////////////////////////////////
+
+//
+// String Length Maximums.
+//
+
+const
+ MAX_LEADBYTES = 12; // 5 ranges, 2 bytes ea., 0 term.
+ {$EXTERNALSYM MAX_LEADBYTES}
+ MAX_DEFAULTCHAR = 2; // single or double byte
+ {$EXTERNALSYM MAX_DEFAULTCHAR}
+
+//
+// MBCS and Unicode Translation Flags.
+//
+
+ MB_PRECOMPOSED = $00000001; // use precomposed chars
+ {$EXTERNALSYM MB_PRECOMPOSED}
+ MB_COMPOSITE = $00000002; // use composite chars
+ {$EXTERNALSYM MB_COMPOSITE}
+ MB_USEGLYPHCHARS = $00000004; // use glyph chars, not ctrl chars
+ {$EXTERNALSYM MB_USEGLYPHCHARS}
+ MB_ERR_INVALID_CHARS = $00000008; // error for invalid chars
+ {$EXTERNALSYM MB_ERR_INVALID_CHARS}
+
+ WC_COMPOSITECHECK = $00000200; // convert composite to precomposed
+ {$EXTERNALSYM WC_COMPOSITECHECK}
+ WC_DISCARDNS = $00000010; // discard non-spacing chars
+ {$EXTERNALSYM WC_DISCARDNS}
+ WC_SEPCHARS = $00000020; // generate separate chars
+ {$EXTERNALSYM WC_SEPCHARS}
+ WC_DEFAULTCHAR = $00000040; // replace w/ default char
+ {$EXTERNALSYM WC_DEFAULTCHAR}
+
+ WC_NO_BEST_FIT_CHARS = $00000400; // do not use best fit chars
+ {$EXTERNALSYM WC_NO_BEST_FIT_CHARS}
+
+//
+// Character Type Flags.
+//
+
+ CT_CTYPE1 = $00000001; // ctype 1 information
+ {$EXTERNALSYM CT_CTYPE1}
+ CT_CTYPE2 = $00000002; // ctype 2 information
+ {$EXTERNALSYM CT_CTYPE2}
+ CT_CTYPE3 = $00000004; // ctype 3 information
+ {$EXTERNALSYM CT_CTYPE3}
+
+//
+// CType 1 Flag Bits.
+//
+
+ C1_UPPER = $0001; // upper case
+ {$EXTERNALSYM C1_UPPER}
+ C1_LOWER = $0002; // lower case
+ {$EXTERNALSYM C1_LOWER}
+ C1_DIGIT = $0004; // decimal digits
+ {$EXTERNALSYM C1_DIGIT}
+ C1_SPACE = $0008; // spacing characters
+ {$EXTERNALSYM C1_SPACE}
+ C1_PUNCT = $0010; // punctuation characters
+ {$EXTERNALSYM C1_PUNCT}
+ C1_CNTRL = $0020; // control characters
+ {$EXTERNALSYM C1_CNTRL}
+ C1_BLANK = $0040; // blank characters
+ {$EXTERNALSYM C1_BLANK}
+ C1_XDIGIT = $0080; // other digits
+ {$EXTERNALSYM C1_XDIGIT}
+ C1_ALPHA = $0100; // any linguistic character
+ {$EXTERNALSYM C1_ALPHA}
+ C1_DEFINED = $0200; // defined character
+ {$EXTERNALSYM C1_DEFINED}
+
+//
+// CType 2 Flag Bits.
+//
+
+ C2_LEFTTORIGHT = $0001; // left to right
+ {$EXTERNALSYM C2_LEFTTORIGHT}
+ C2_RIGHTTOLEFT = $0002; // right to left
+ {$EXTERNALSYM C2_RIGHTTOLEFT}
+
+ C2_EUROPENUMBER = $0003; // European number, digit
+ {$EXTERNALSYM C2_EUROPENUMBER}
+ C2_EUROPESEPARATOR = $0004; // European numeric separator
+ {$EXTERNALSYM C2_EUROPESEPARATOR}
+ C2_EUROPETERMINATOR = $0005; // European numeric terminator
+ {$EXTERNALSYM C2_EUROPETERMINATOR}
+ C2_ARABICNUMBER = $0006; // Arabic number
+ {$EXTERNALSYM C2_ARABICNUMBER}
+ C2_COMMONSEPARATOR = $0007; // common numeric separator
+ {$EXTERNALSYM C2_COMMONSEPARATOR}
+
+ C2_BLOCKSEPARATOR = $0008; // block separator
+ {$EXTERNALSYM C2_BLOCKSEPARATOR}
+ C2_SEGMENTSEPARATOR = $0009; // segment separator
+ {$EXTERNALSYM C2_SEGMENTSEPARATOR}
+ C2_WHITESPACE = $000A; // white space
+ {$EXTERNALSYM C2_WHITESPACE}
+ C2_OTHERNEUTRAL = $000B; // other neutrals
+ {$EXTERNALSYM C2_OTHERNEUTRAL}
+
+ C2_NOTAPPLICABLE = $0000; // no implicit directionality
+ {$EXTERNALSYM C2_NOTAPPLICABLE}
+
+//
+// CType 3 Flag Bits.
+//
+
+ C3_NONSPACING = $0001; // nonspacing character
+ {$EXTERNALSYM C3_NONSPACING}
+ C3_DIACRITIC = $0002; // diacritic mark
+ {$EXTERNALSYM C3_DIACRITIC}
+ C3_VOWELMARK = $0004; // vowel mark
+ {$EXTERNALSYM C3_VOWELMARK}
+ C3_SYMBOL = $0008; // symbols
+ {$EXTERNALSYM C3_SYMBOL}
+
+ C3_KATAKANA = $0010; // katakana character
+ {$EXTERNALSYM C3_KATAKANA}
+ C3_HIRAGANA = $0020; // hiragana character
+ {$EXTERNALSYM C3_HIRAGANA}
+ C3_HALFWIDTH = $0040; // half width character
+ {$EXTERNALSYM C3_HALFWIDTH}
+ C3_FULLWIDTH = $0080; // full width character
+ {$EXTERNALSYM C3_FULLWIDTH}
+ C3_IDEOGRAPH = $0100; // ideographic character
+ {$EXTERNALSYM C3_IDEOGRAPH}
+ C3_KASHIDA = $0200; // Arabic kashida character
+ {$EXTERNALSYM C3_KASHIDA}
+ C3_LEXICAL = $0400; // lexical character
+ {$EXTERNALSYM C3_LEXICAL}
+
+ C3_ALPHA = $8000; // any linguistic char (C1_ALPHA)
+ {$EXTERNALSYM C3_ALPHA}
+
+ C3_NOTAPPLICABLE = $0000; // ctype 3 is not applicable
+ {$EXTERNALSYM C3_NOTAPPLICABLE}
+
+//
+// String Flags.
+//
+
+ NORM_IGNORECASE = $00000001; // ignore case
+ {$EXTERNALSYM NORM_IGNORECASE}
+ NORM_IGNORENONSPACE = $00000002; // ignore nonspacing chars
+ {$EXTERNALSYM NORM_IGNORENONSPACE}
+ NORM_IGNORESYMBOLS = $00000004; // ignore symbols
+ {$EXTERNALSYM NORM_IGNORESYMBOLS}
+
+ NORM_IGNOREKANATYPE = $00010000; // ignore kanatype
+ {$EXTERNALSYM NORM_IGNOREKANATYPE}
+ NORM_IGNOREWIDTH = $00020000; // ignore width
+ {$EXTERNALSYM NORM_IGNOREWIDTH}
+
+//
+// Locale Independent Mapping Flags.
+//
+
+ MAP_FOLDCZONE = $00000010; // fold compatibility zone chars
+ {$EXTERNALSYM MAP_FOLDCZONE}
+ MAP_PRECOMPOSED = $00000020; // convert to precomposed chars
+ {$EXTERNALSYM MAP_PRECOMPOSED}
+ MAP_COMPOSITE = $00000040; // convert to composite chars
+ {$EXTERNALSYM MAP_COMPOSITE}
+ MAP_FOLDDIGITS = $00000080; // all digits to ASCII 0-9
+ {$EXTERNALSYM MAP_FOLDDIGITS}
+
+ MAP_EXPAND_LIGATURES = $00002000; // expand all ligatures
+ {$EXTERNALSYM MAP_EXPAND_LIGATURES}
+
+//
+// Locale Dependent Mapping Flags.
+//
+
+ LCMAP_LOWERCASE = $00000100; // lower case letters
+ {$EXTERNALSYM LCMAP_LOWERCASE}
+ LCMAP_UPPERCASE = $00000200; // upper case letters
+ {$EXTERNALSYM LCMAP_UPPERCASE}
+ LCMAP_SORTKEY = $00000400; // WC sort key (normalize)
+ {$EXTERNALSYM LCMAP_SORTKEY}
+ LCMAP_BYTEREV = $00000800; // byte reversal
+ {$EXTERNALSYM LCMAP_BYTEREV}
+
+ LCMAP_HIRAGANA = $00100000; // map katakana to hiragana
+ {$EXTERNALSYM LCMAP_HIRAGANA}
+ LCMAP_KATAKANA = $00200000; // map hiragana to katakana
+ {$EXTERNALSYM LCMAP_KATAKANA}
+ LCMAP_HALFWIDTH = $00400000; // map double byte to single byte
+ {$EXTERNALSYM LCMAP_HALFWIDTH}
+ LCMAP_FULLWIDTH = $00800000; // map single byte to double byte
+ {$EXTERNALSYM LCMAP_FULLWIDTH}
+
+ LCMAP_LINGUISTIC_CASING = $01000000; // use linguistic rules for casing
+ {$EXTERNALSYM LCMAP_LINGUISTIC_CASING}
+
+ LCMAP_SIMPLIFIED_CHINESE = $02000000; // map traditional chinese to simplified chinese
+ {$EXTERNALSYM LCMAP_SIMPLIFIED_CHINESE}
+ LCMAP_TRADITIONAL_CHINESE = $04000000; // map simplified chinese to traditional chinese
+ {$EXTERNALSYM LCMAP_TRADITIONAL_CHINESE}
+
+//
+// Language Group Enumeration Flags.
+//
+
+ LGRPID_INSTALLED = $00000001; // installed language group ids
+ {$EXTERNALSYM LGRPID_INSTALLED}
+ LGRPID_SUPPORTED = $00000002; // supported language group ids
+ {$EXTERNALSYM LGRPID_SUPPORTED}
+
+//
+// Locale Enumeration Flags.
+//
+
+ LCID_INSTALLED = $00000001; // installed locale ids
+ {$EXTERNALSYM LCID_INSTALLED}
+ LCID_SUPPORTED = $00000002; // supported locale ids
+ {$EXTERNALSYM LCID_SUPPORTED}
+ LCID_ALTERNATE_SORTS = $00000004; // alternate sort locale ids
+ {$EXTERNALSYM LCID_ALTERNATE_SORTS}
+
+//
+// Code Page Enumeration Flags.
+//
+
+ CP_INSTALLED = $00000001; // installed code page ids
+ {$EXTERNALSYM CP_INSTALLED}
+ CP_SUPPORTED = $00000002; // supported code page ids
+ {$EXTERNALSYM CP_SUPPORTED}
+
+//
+// Sorting Flags.
+//
+// WORD Sort: culturally correct sort
+// hyphen and apostrophe are special cased
+// example: "coop" and "co-op" will sort together in a list
+//
+// co_op <------- underscore (symbol)
+// coat
+// comb
+// coop
+// co-op <------- hyphen (punctuation)
+// cork
+// went
+// were
+// we're <------- apostrophe (punctuation)
+//
+//
+// STRING Sort: hyphen and apostrophe will sort with all other symbols
+//
+// co-op <------- hyphen (punctuation)
+// co_op <------- underscore (symbol)
+// coat
+// comb
+// coop
+// cork
+// we're <------- apostrophe (punctuation)
+// went
+// were
+//
+
+ SORT_STRINGSORT = $00001000; // use string sort method
+ {$EXTERNALSYM SORT_STRINGSORT}
+
+//
+// Compare String Return Values.
+//
+
+ CSTR_LESS_THAN = 1; // string 1 less than string 2
+ {$EXTERNALSYM CSTR_LESS_THAN}
+ CSTR_EQUAL = 2; // string 1 equal to string 2
+ {$EXTERNALSYM CSTR_EQUAL}
+ CSTR_GREATER_THAN = 3; // string 1 greater than string 2
+ {$EXTERNALSYM CSTR_GREATER_THAN}
+
+//
+// Code Page Default Values.
+//
+
+ CP_ACP = 0; // default to ANSI code page
+ {$EXTERNALSYM CP_ACP}
+ CP_OEMCP = 1; // default to OEM code page
+ {$EXTERNALSYM CP_OEMCP}
+ CP_MACCP = 2; // default to MAC code page
+ {$EXTERNALSYM CP_MACCP}
+ CP_THREAD_ACP = 3; // current thread's ANSI code page
+ {$EXTERNALSYM CP_THREAD_ACP}
+ CP_SYMBOL = 42; // SYMBOL translations
+ {$EXTERNALSYM CP_SYMBOL}
+
+ CP_UTF7 = 65000; // UTF-7 translation
+ {$EXTERNALSYM CP_UTF7}
+ CP_UTF8 = 65001; // UTF-8 translation
+ {$EXTERNALSYM CP_UTF8}
+
+//
+// Country/Region Codes.
+//
+
+ CTRY_DEFAULT = 0;
+ {$EXTERNALSYM CTRY_DEFAULT}
+
+ CTRY_ALBANIA = 355; // Albania
+ {$EXTERNALSYM CTRY_ALBANIA}
+ CTRY_ALGERIA = 213; // Algeria
+ {$EXTERNALSYM CTRY_ALGERIA}
+ CTRY_ARGENTINA = 54; // Argentina
+ {$EXTERNALSYM CTRY_ARGENTINA}
+ CTRY_ARMENIA = 374; // Armenia
+ {$EXTERNALSYM CTRY_ARMENIA}
+ CTRY_AUSTRALIA = 61; // Australia
+ {$EXTERNALSYM CTRY_AUSTRALIA}
+ CTRY_AUSTRIA = 43; // Austria
+ {$EXTERNALSYM CTRY_AUSTRIA}
+ CTRY_AZERBAIJAN = 994; // Azerbaijan
+ {$EXTERNALSYM CTRY_AZERBAIJAN}
+ CTRY_BAHRAIN = 973; // Bahrain
+ {$EXTERNALSYM CTRY_BAHRAIN}
+ CTRY_BELARUS = 375; // Belarus
+ {$EXTERNALSYM CTRY_BELARUS}
+ CTRY_BELGIUM = 32; // Belgium
+ {$EXTERNALSYM CTRY_BELGIUM}
+ CTRY_BELIZE = 501; // Belize
+ {$EXTERNALSYM CTRY_BELIZE}
+ CTRY_BOLIVIA = 591; // Bolivia
+ {$EXTERNALSYM CTRY_BOLIVIA}
+ CTRY_BRAZIL = 55; // Brazil
+ {$EXTERNALSYM CTRY_BRAZIL}
+ CTRY_BRUNEI_DARUSSALAM = 673; // Brunei Darussalam
+ {$EXTERNALSYM CTRY_BRUNEI_DARUSSALAM}
+ CTRY_BULGARIA = 359; // Bulgaria
+ {$EXTERNALSYM CTRY_BULGARIA}
+ CTRY_CANADA = 2; // Canada
+ {$EXTERNALSYM CTRY_CANADA}
+ CTRY_CARIBBEAN = 1; // Caribbean
+ {$EXTERNALSYM CTRY_CARIBBEAN}
+ CTRY_CHILE = 56; // Chile
+ {$EXTERNALSYM CTRY_CHILE}
+ CTRY_COLOMBIA = 57; // Colombia
+ {$EXTERNALSYM CTRY_COLOMBIA}
+ CTRY_COSTA_RICA = 506; // Costa Rica
+ {$EXTERNALSYM CTRY_COSTA_RICA}
+ CTRY_CROATIA = 385; // Croatia
+ {$EXTERNALSYM CTRY_CROATIA}
+ CTRY_CZECH = 420; // Czech Republic
+ {$EXTERNALSYM CTRY_CZECH}
+ CTRY_DENMARK = 45; // Denmark
+ {$EXTERNALSYM CTRY_DENMARK}
+ CTRY_DOMINICAN_REPUBLIC = 1; // Dominican Republic
+ {$EXTERNALSYM CTRY_DOMINICAN_REPUBLIC}
+ CTRY_ECUADOR = 593; // Ecuador
+ {$EXTERNALSYM CTRY_ECUADOR}
+ CTRY_EGYPT = 20; // Egypt
+ {$EXTERNALSYM CTRY_EGYPT}
+ CTRY_EL_SALVADOR = 503; // El Salvador
+ {$EXTERNALSYM CTRY_EL_SALVADOR}
+ CTRY_ESTONIA = 372; // Estonia
+ {$EXTERNALSYM CTRY_ESTONIA}
+ CTRY_FAEROE_ISLANDS = 298; // Faeroe Islands
+ {$EXTERNALSYM CTRY_FAEROE_ISLANDS}
+ CTRY_FINLAND = 358; // Finland
+ {$EXTERNALSYM CTRY_FINLAND}
+ CTRY_FRANCE = 33; // France
+ {$EXTERNALSYM CTRY_FRANCE}
+ CTRY_GEORGIA = 995; // Georgia
+ {$EXTERNALSYM CTRY_GEORGIA}
+ CTRY_GERMANY = 49; // Germany
+ {$EXTERNALSYM CTRY_GERMANY}
+ CTRY_GREECE = 30; // Greece
+ {$EXTERNALSYM CTRY_GREECE}
+ CTRY_GUATEMALA = 502; // Guatemala
+ {$EXTERNALSYM CTRY_GUATEMALA}
+ CTRY_HONDURAS = 504; // Honduras
+ {$EXTERNALSYM CTRY_HONDURAS}
+ CTRY_HONG_KONG = 852; // Hong Kong S.A.R., P.R.C.
+ {$EXTERNALSYM CTRY_HONG_KONG}
+ CTRY_HUNGARY = 36; // Hungary
+ {$EXTERNALSYM CTRY_HUNGARY}
+ CTRY_ICELAND = 354; // Iceland
+ {$EXTERNALSYM CTRY_ICELAND}
+ CTRY_INDIA = 91; // India
+ {$EXTERNALSYM CTRY_INDIA}
+ CTRY_INDONESIA = 62; // Indonesia
+ {$EXTERNALSYM CTRY_INDONESIA}
+ CTRY_IRAN = 981; // Iran
+ {$EXTERNALSYM CTRY_IRAN}
+ CTRY_IRAQ = 964; // Iraq
+ {$EXTERNALSYM CTRY_IRAQ}
+ CTRY_IRELAND = 353; // Ireland
+ {$EXTERNALSYM CTRY_IRELAND}
+ CTRY_ISRAEL = 972; // Israel
+ {$EXTERNALSYM CTRY_ISRAEL}
+ CTRY_ITALY = 39; // Italy
+ {$EXTERNALSYM CTRY_ITALY}
+ CTRY_JAMAICA = 1; // Jamaica
+ {$EXTERNALSYM CTRY_JAMAICA}
+ CTRY_JAPAN = 81; // Japan
+ {$EXTERNALSYM CTRY_JAPAN}
+ CTRY_JORDAN = 962; // Jordan
+ {$EXTERNALSYM CTRY_JORDAN}
+ CTRY_KAZAKSTAN = 7; // Kazakstan
+ {$EXTERNALSYM CTRY_KAZAKSTAN}
+ CTRY_KENYA = 254; // Kenya
+ {$EXTERNALSYM CTRY_KENYA}
+ CTRY_KUWAIT = 965; // Kuwait
+ {$EXTERNALSYM CTRY_KUWAIT}
+ CTRY_KYRGYZSTAN = 996; // Kyrgyzstan
+ {$EXTERNALSYM CTRY_KYRGYZSTAN}
+ CTRY_LATVIA = 371; // Latvia
+ {$EXTERNALSYM CTRY_LATVIA}
+ CTRY_LEBANON = 961; // Lebanon
+ {$EXTERNALSYM CTRY_LEBANON}
+ CTRY_LIBYA = 218; // Libya
+ {$EXTERNALSYM CTRY_LIBYA}
+ CTRY_LIECHTENSTEIN = 41; // Liechtenstein
+ {$EXTERNALSYM CTRY_LIECHTENSTEIN}
+ CTRY_LITHUANIA = 370; // Lithuania
+ {$EXTERNALSYM CTRY_LITHUANIA}
+ CTRY_LUXEMBOURG = 352; // Luxembourg
+ {$EXTERNALSYM CTRY_LUXEMBOURG}
+ CTRY_MACAU = 853; // Macau S.A.R., PRC
+ {$EXTERNALSYM CTRY_MACAU}
+ CTRY_MACEDONIA = 389; // Former Yugoslav Republic of Macedonia
+ {$EXTERNALSYM CTRY_MACEDONIA}
+ CTRY_MALAYSIA = 60; // Malaysia
+ {$EXTERNALSYM CTRY_MALAYSIA}
+ CTRY_MALDIVES = 960; // Maldives
+ {$EXTERNALSYM CTRY_MALDIVES}
+ CTRY_MEXICO = 52; // Mexico
+ {$EXTERNALSYM CTRY_MEXICO}
+ CTRY_MONACO = 33; // Principality of Monaco
+ {$EXTERNALSYM CTRY_MONACO}
+ CTRY_MONGOLIA = 976; // Mongolia
+ {$EXTERNALSYM CTRY_MONGOLIA}
+ CTRY_MOROCCO = 212; // Morocco
+ {$EXTERNALSYM CTRY_MOROCCO}
+ CTRY_NETHERLANDS = 31; // Netherlands
+ {$EXTERNALSYM CTRY_NETHERLANDS}
+ CTRY_NEW_ZEALAND = 64; // New Zealand
+ {$EXTERNALSYM CTRY_NEW_ZEALAND}
+ CTRY_NICARAGUA = 505; // Nicaragua
+ {$EXTERNALSYM CTRY_NICARAGUA}
+ CTRY_NORWAY = 47; // Norway
+ {$EXTERNALSYM CTRY_NORWAY}
+ CTRY_OMAN = 968; // Oman
+ {$EXTERNALSYM CTRY_OMAN}
+ CTRY_PAKISTAN = 92; // Islamic Republic of Pakistan
+ {$EXTERNALSYM CTRY_PAKISTAN}
+ CTRY_PANAMA = 507; // Panama
+ {$EXTERNALSYM CTRY_PANAMA}
+ CTRY_PARAGUAY = 595; // Paraguay
+ {$EXTERNALSYM CTRY_PARAGUAY}
+ CTRY_PERU = 51; // Peru
+ {$EXTERNALSYM CTRY_PERU}
+ CTRY_PHILIPPINES = 63; // Republic of the Philippines
+ {$EXTERNALSYM CTRY_PHILIPPINES}
+ CTRY_POLAND = 48; // Poland
+ {$EXTERNALSYM CTRY_POLAND}
+ CTRY_PORTUGAL = 351; // Portugal
+ {$EXTERNALSYM CTRY_PORTUGAL}
+ CTRY_PRCHINA = 86; // People's Republic of China
+ {$EXTERNALSYM CTRY_PRCHINA}
+ CTRY_PUERTO_RICO = 1; // Puerto Rico
+ {$EXTERNALSYM CTRY_PUERTO_RICO}
+ CTRY_QATAR = 974; // Qatar
+ {$EXTERNALSYM CTRY_QATAR}
+ CTRY_ROMANIA = 40; // Romania
+ {$EXTERNALSYM CTRY_ROMANIA}
+ CTRY_RUSSIA = 7; // Russia
+ {$EXTERNALSYM CTRY_RUSSIA}
+ CTRY_SAUDI_ARABIA = 966; // Saudi Arabia
+ {$EXTERNALSYM CTRY_SAUDI_ARABIA}
+ CTRY_SERBIA = 381; // Serbia
+ {$EXTERNALSYM CTRY_SERBIA}
+ CTRY_SINGAPORE = 65; // Singapore
+ {$EXTERNALSYM CTRY_SINGAPORE}
+ CTRY_SLOVAK = 421; // Slovak Republic
+ {$EXTERNALSYM CTRY_SLOVAK}
+ CTRY_SLOVENIA = 386; // Slovenia
+ {$EXTERNALSYM CTRY_SLOVENIA}
+ CTRY_SOUTH_AFRICA = 27; // South Africa
+ {$EXTERNALSYM CTRY_SOUTH_AFRICA}
+ CTRY_SOUTH_KOREA = 82; // Korea
+ {$EXTERNALSYM CTRY_SOUTH_KOREA}
+ CTRY_SPAIN = 34; // Spain
+ {$EXTERNALSYM CTRY_SPAIN}
+ CTRY_SWEDEN = 46; // Sweden
+ {$EXTERNALSYM CTRY_SWEDEN}
+ CTRY_SWITZERLAND = 41; // Switzerland
+ {$EXTERNALSYM CTRY_SWITZERLAND}
+ CTRY_SYRIA = 963; // Syria
+ {$EXTERNALSYM CTRY_SYRIA}
+ CTRY_TAIWAN = 886; // Taiwan
+ {$EXTERNALSYM CTRY_TAIWAN}
+ CTRY_TATARSTAN = 7; // Tatarstan
+ {$EXTERNALSYM CTRY_TATARSTAN}
+ CTRY_THAILAND = 66; // Thailand
+ {$EXTERNALSYM CTRY_THAILAND}
+ CTRY_TRINIDAD_Y_TOBAGO = 1; // Trinidad y Tobago
+ {$EXTERNALSYM CTRY_TRINIDAD_Y_TOBAGO}
+ CTRY_TUNISIA = 216; // Tunisia
+ {$EXTERNALSYM CTRY_TUNISIA}
+ CTRY_TURKEY = 90; // Turkey
+ {$EXTERNALSYM CTRY_TURKEY}
+ CTRY_UAE = 971; // U.A.E.
+ {$EXTERNALSYM CTRY_UAE}
+ CTRY_UKRAINE = 380; // Ukraine
+ {$EXTERNALSYM CTRY_UKRAINE}
+ CTRY_UNITED_KINGDOM = 44; // United Kingdom
+ {$EXTERNALSYM CTRY_UNITED_KINGDOM}
+ CTRY_UNITED_STATES = 1; // United States
+ {$EXTERNALSYM CTRY_UNITED_STATES}
+ CTRY_URUGUAY = 598; // Uruguay
+ {$EXTERNALSYM CTRY_URUGUAY}
+ CTRY_UZBEKISTAN = 7; // Uzbekistan
+ {$EXTERNALSYM CTRY_UZBEKISTAN}
+ CTRY_VENEZUELA = 58; // Venezuela
+ {$EXTERNALSYM CTRY_VENEZUELA}
+ CTRY_VIET_NAM = 84; // Viet Nam
+ {$EXTERNALSYM CTRY_VIET_NAM}
+ CTRY_YEMEN = 967; // Yemen
+ {$EXTERNALSYM CTRY_YEMEN}
+ CTRY_ZIMBABWE = 263; // Zimbabwe
+ {$EXTERNALSYM CTRY_ZIMBABWE}
+
+//
+// Locale Types.
+//
+// These types are used for the GetLocaleInfo NLS API routine.
+// Some of these types are also used for the SetLocaleInfo NLS API routine.
+//
+
+//
+// The following LCTypes may be used in combination with any other LCTypes.
+//
+// LOCALE_NOUSEROVERRIDE is also used in GetTimeFormat and
+// GetDateFormat.
+//
+// LOCALE_USE_CP_ACP is used in many of the A (Ansi) apis that need
+// to do string translation.
+//
+// LOCALE_RETURN_NUMBER will return the result from GetLocaleInfo as a
+// number instead of a string. This flag is only valid for the LCTypes
+// beginning with LOCALE_I.
+//
+
+ LOCALE_NOUSEROVERRIDE = DWORD($80000000); // do not use user overrides
+ {$EXTERNALSYM LOCALE_NOUSEROVERRIDE}
+ LOCALE_USE_CP_ACP = $40000000; // use the system ACP
+ {$EXTERNALSYM LOCALE_USE_CP_ACP}
+
+ LOCALE_RETURN_NUMBER = $20000000; // return number instead of string
+ {$EXTERNALSYM LOCALE_RETURN_NUMBER}
+
+//
+// The following LCTypes are mutually exclusive in that they may NOT
+// be used in combination with each other.
+//
+
+ LOCALE_ILANGUAGE = $00000001; // language id
+ {$EXTERNALSYM LOCALE_ILANGUAGE}
+ LOCALE_SLANGUAGE = $00000002; // localized name of language
+ {$EXTERNALSYM LOCALE_SLANGUAGE}
+ LOCALE_SENGLANGUAGE = $00001001; // English name of language
+ {$EXTERNALSYM LOCALE_SENGLANGUAGE}
+ LOCALE_SABBREVLANGNAME = $00000003; // abbreviated language name
+ {$EXTERNALSYM LOCALE_SABBREVLANGNAME}
+ LOCALE_SNATIVELANGNAME = $00000004; // native name of language
+ {$EXTERNALSYM LOCALE_SNATIVELANGNAME}
+
+ LOCALE_ICOUNTRY = $00000005; // country code
+ {$EXTERNALSYM LOCALE_ICOUNTRY}
+ LOCALE_SCOUNTRY = $00000006; // localized name of country
+ {$EXTERNALSYM LOCALE_SCOUNTRY}
+ LOCALE_SENGCOUNTRY = $00001002; // English name of country
+ {$EXTERNALSYM LOCALE_SENGCOUNTRY}
+ LOCALE_SABBREVCTRYNAME = $00000007; // abbreviated country name
+ {$EXTERNALSYM LOCALE_SABBREVCTRYNAME}
+ LOCALE_SNATIVECTRYNAME = $00000008; // native name of country
+ {$EXTERNALSYM LOCALE_SNATIVECTRYNAME}
+
+ LOCALE_IDEFAULTLANGUAGE = $00000009; // default language id
+ {$EXTERNALSYM LOCALE_IDEFAULTLANGUAGE}
+ LOCALE_IDEFAULTCOUNTRY = $0000000A; // default country code
+ {$EXTERNALSYM LOCALE_IDEFAULTCOUNTRY}
+ LOCALE_IDEFAULTCODEPAGE = $0000000B; // default oem code page
+ {$EXTERNALSYM LOCALE_IDEFAULTCODEPAGE}
+ LOCALE_IDEFAULTANSICODEPAGE = $00001004; // default ansi code page
+ {$EXTERNALSYM LOCALE_IDEFAULTANSICODEPAGE}
+ LOCALE_IDEFAULTMACCODEPAGE = $00001011; // default mac code page
+ {$EXTERNALSYM LOCALE_IDEFAULTMACCODEPAGE}
+
+ LOCALE_SLIST = $0000000C; // list item separator
+ {$EXTERNALSYM LOCALE_SLIST}
+ LOCALE_IMEASURE = $0000000D; // 0 = metric, 1 = US
+ {$EXTERNALSYM LOCALE_IMEASURE}
+
+ LOCALE_SDECIMAL = $0000000E; // decimal separator
+ {$EXTERNALSYM LOCALE_SDECIMAL}
+ LOCALE_STHOUSAND = $0000000F; // thousand separator
+ {$EXTERNALSYM LOCALE_STHOUSAND}
+ LOCALE_SGROUPING = $00000010; // digit grouping
+ {$EXTERNALSYM LOCALE_SGROUPING}
+ LOCALE_IDIGITS = $00000011; // number of fractional digits
+ {$EXTERNALSYM LOCALE_IDIGITS}
+ LOCALE_ILZERO = $00000012; // leading zeros for decimal
+ {$EXTERNALSYM LOCALE_ILZERO}
+ LOCALE_INEGNUMBER = $00001010; // negative number mode
+ {$EXTERNALSYM LOCALE_INEGNUMBER}
+ LOCALE_SNATIVEDIGITS = $00000013; // native ascii 0-9
+ {$EXTERNALSYM LOCALE_SNATIVEDIGITS}
+
+ LOCALE_SCURRENCY = $00000014; // local monetary symbol
+ {$EXTERNALSYM LOCALE_SCURRENCY}
+ LOCALE_SINTLSYMBOL = $00000015; // intl monetary symbol
+ {$EXTERNALSYM LOCALE_SINTLSYMBOL}
+ LOCALE_SMONDECIMALSEP = $00000016; // monetary decimal separator
+ {$EXTERNALSYM LOCALE_SMONDECIMALSEP}
+ LOCALE_SMONTHOUSANDSEP = $00000017; // monetary thousand separator
+ {$EXTERNALSYM LOCALE_SMONTHOUSANDSEP}
+ LOCALE_SMONGROUPING = $00000018; // monetary grouping
+ {$EXTERNALSYM LOCALE_SMONGROUPING}
+ LOCALE_ICURRDIGITS = $00000019; // # local monetary digits
+ {$EXTERNALSYM LOCALE_ICURRDIGITS}
+ LOCALE_IINTLCURRDIGITS = $0000001A; // # intl monetary digits
+ {$EXTERNALSYM LOCALE_IINTLCURRDIGITS}
+ LOCALE_ICURRENCY = $0000001B; // positive currency mode
+ {$EXTERNALSYM LOCALE_ICURRENCY}
+ LOCALE_INEGCURR = $0000001C; // negative currency mode
+ {$EXTERNALSYM LOCALE_INEGCURR}
+
+ LOCALE_SDATE = $0000001D; // date separator
+ {$EXTERNALSYM LOCALE_SDATE}
+ LOCALE_STIME = $0000001E; // time separator
+ {$EXTERNALSYM LOCALE_STIME}
+ LOCALE_SSHORTDATE = $0000001F; // short date format string
+ {$EXTERNALSYM LOCALE_SSHORTDATE}
+ LOCALE_SLONGDATE = $00000020; // long date format string
+ {$EXTERNALSYM LOCALE_SLONGDATE}
+ LOCALE_STIMEFORMAT = $00001003; // time format string
+ {$EXTERNALSYM LOCALE_STIMEFORMAT}
+ LOCALE_IDATE = $00000021; // short date format ordering
+ {$EXTERNALSYM LOCALE_IDATE}
+ LOCALE_ILDATE = $00000022; // long date format ordering
+ {$EXTERNALSYM LOCALE_ILDATE}
+ LOCALE_ITIME = $00000023; // time format specifier
+ {$EXTERNALSYM LOCALE_ITIME}
+ LOCALE_ITIMEMARKPOSN = $00001005; // time marker position
+ {$EXTERNALSYM LOCALE_ITIMEMARKPOSN}
+ LOCALE_ICENTURY = $00000024; // century format specifier (short date)
+ {$EXTERNALSYM LOCALE_ICENTURY}
+ LOCALE_ITLZERO = $00000025; // leading zeros in time field
+ {$EXTERNALSYM LOCALE_ITLZERO}
+ LOCALE_IDAYLZERO = $00000026; // leading zeros in day field (short date)
+ {$EXTERNALSYM LOCALE_IDAYLZERO}
+ LOCALE_IMONLZERO = $00000027; // leading zeros in month field (short date)
+ {$EXTERNALSYM LOCALE_IMONLZERO}
+ LOCALE_S1159 = $00000028; // AM designator
+ {$EXTERNALSYM LOCALE_S1159}
+ LOCALE_S2359 = $00000029; // PM designator
+ {$EXTERNALSYM LOCALE_S2359}
+
+ LOCALE_ICALENDARTYPE = $00001009; // type of calendar specifier
+ {$EXTERNALSYM LOCALE_ICALENDARTYPE}
+ LOCALE_IOPTIONALCALENDAR = $0000100B; // additional calendar types specifier
+ {$EXTERNALSYM LOCALE_IOPTIONALCALENDAR}
+ LOCALE_IFIRSTDAYOFWEEK = $0000100C; // first day of week specifier
+ {$EXTERNALSYM LOCALE_IFIRSTDAYOFWEEK}
+ LOCALE_IFIRSTWEEKOFYEAR = $0000100D; // first week of year specifier
+ {$EXTERNALSYM LOCALE_IFIRSTWEEKOFYEAR}
+
+ LOCALE_SDAYNAME1 = $0000002A; // long name for Monday
+ {$EXTERNALSYM LOCALE_SDAYNAME1}
+ LOCALE_SDAYNAME2 = $0000002B; // long name for Tuesday
+ {$EXTERNALSYM LOCALE_SDAYNAME2}
+ LOCALE_SDAYNAME3 = $0000002C; // long name for Wednesday
+ {$EXTERNALSYM LOCALE_SDAYNAME3}
+ LOCALE_SDAYNAME4 = $0000002D; // long name for Thursday
+ {$EXTERNALSYM LOCALE_SDAYNAME4}
+ LOCALE_SDAYNAME5 = $0000002E; // long name for Friday
+ {$EXTERNALSYM LOCALE_SDAYNAME5}
+ LOCALE_SDAYNAME6 = $0000002F; // long name for Saturday
+ {$EXTERNALSYM LOCALE_SDAYNAME6}
+ LOCALE_SDAYNAME7 = $00000030; // long name for Sunday
+ {$EXTERNALSYM LOCALE_SDAYNAME7}
+ LOCALE_SABBREVDAYNAME1 = $00000031; // abbreviated name for Monday
+ {$EXTERNALSYM LOCALE_SABBREVDAYNAME1}
+ LOCALE_SABBREVDAYNAME2 = $00000032; // abbreviated name for Tuesday
+ {$EXTERNALSYM LOCALE_SABBREVDAYNAME2}
+ LOCALE_SABBREVDAYNAME3 = $00000033; // abbreviated name for Wednesday
+ {$EXTERNALSYM LOCALE_SABBREVDAYNAME3}
+ LOCALE_SABBREVDAYNAME4 = $00000034; // abbreviated name for Thursday
+ {$EXTERNALSYM LOCALE_SABBREVDAYNAME4}
+ LOCALE_SABBREVDAYNAME5 = $00000035; // abbreviated name for Friday
+ {$EXTERNALSYM LOCALE_SABBREVDAYNAME5}
+ LOCALE_SABBREVDAYNAME6 = $00000036; // abbreviated name for Saturday
+ {$EXTERNALSYM LOCALE_SABBREVDAYNAME6}
+ LOCALE_SABBREVDAYNAME7 = $00000037; // abbreviated name for Sunday
+ {$EXTERNALSYM LOCALE_SABBREVDAYNAME7}
+ LOCALE_SMONTHNAME1 = $00000038; // long name for January
+ {$EXTERNALSYM LOCALE_SMONTHNAME1}
+ LOCALE_SMONTHNAME2 = $00000039; // long name for February
+ {$EXTERNALSYM LOCALE_SMONTHNAME2}
+ LOCALE_SMONTHNAME3 = $0000003A; // long name for March
+ {$EXTERNALSYM LOCALE_SMONTHNAME3}
+ LOCALE_SMONTHNAME4 = $0000003B; // long name for April
+ {$EXTERNALSYM LOCALE_SMONTHNAME4}
+ LOCALE_SMONTHNAME5 = $0000003C; // long name for May
+ {$EXTERNALSYM LOCALE_SMONTHNAME5}
+ LOCALE_SMONTHNAME6 = $0000003D; // long name for June
+ {$EXTERNALSYM LOCALE_SMONTHNAME6}
+ LOCALE_SMONTHNAME7 = $0000003E; // long name for July
+ {$EXTERNALSYM LOCALE_SMONTHNAME7}
+ LOCALE_SMONTHNAME8 = $0000003F; // long name for August
+ {$EXTERNALSYM LOCALE_SMONTHNAME8}
+ LOCALE_SMONTHNAME9 = $00000040; // long name for September
+ {$EXTERNALSYM LOCALE_SMONTHNAME9}
+ LOCALE_SMONTHNAME10 = $00000041; // long name for October
+ {$EXTERNALSYM LOCALE_SMONTHNAME10}
+ LOCALE_SMONTHNAME11 = $00000042; // long name for November
+ {$EXTERNALSYM LOCALE_SMONTHNAME11}
+ LOCALE_SMONTHNAME12 = $00000043; // long name for December
+ {$EXTERNALSYM LOCALE_SMONTHNAME12}
+ LOCALE_SMONTHNAME13 = $0000100E; // long name for 13th month (if exists)
+ {$EXTERNALSYM LOCALE_SMONTHNAME13}
+ LOCALE_SABBREVMONTHNAME1 = $00000044; // abbreviated name for January
+ {$EXTERNALSYM LOCALE_SABBREVMONTHNAME1}
+ LOCALE_SABBREVMONTHNAME2 = $00000045; // abbreviated name for February
+ {$EXTERNALSYM LOCALE_SABBREVMONTHNAME2}
+ LOCALE_SABBREVMONTHNAME3 = $00000046; // abbreviated name for March
+ {$EXTERNALSYM LOCALE_SABBREVMONTHNAME3}
+ LOCALE_SABBREVMONTHNAME4 = $00000047; // abbreviated name for April
+ {$EXTERNALSYM LOCALE_SABBREVMONTHNAME4}
+ LOCALE_SABBREVMONTHNAME5 = $00000048; // abbreviated name for May
+ {$EXTERNALSYM LOCALE_SABBREVMONTHNAME5}
+ LOCALE_SABBREVMONTHNAME6 = $00000049; // abbreviated name for June
+ {$EXTERNALSYM LOCALE_SABBREVMONTHNAME6}
+ LOCALE_SABBREVMONTHNAME7 = $0000004A; // abbreviated name for July
+ {$EXTERNALSYM LOCALE_SABBREVMONTHNAME7}
+ LOCALE_SABBREVMONTHNAME8 = $0000004B; // abbreviated name for August
+ {$EXTERNALSYM LOCALE_SABBREVMONTHNAME8}
+ LOCALE_SABBREVMONTHNAME9 = $0000004C; // abbreviated name for September
+ {$EXTERNALSYM LOCALE_SABBREVMONTHNAME9}
+ LOCALE_SABBREVMONTHNAME10 = $0000004D; // abbreviated name for October
+ {$EXTERNALSYM LOCALE_SABBREVMONTHNAME10}
+ LOCALE_SABBREVMONTHNAME11 = $0000004E; // abbreviated name for November
+ {$EXTERNALSYM LOCALE_SABBREVMONTHNAME11}
+ LOCALE_SABBREVMONTHNAME12 = $0000004F; // abbreviated name for December
+ {$EXTERNALSYM LOCALE_SABBREVMONTHNAME12}
+ LOCALE_SABBREVMONTHNAME13 = $0000100F; // abbreviated name for 13th month (if exists)
+ {$EXTERNALSYM LOCALE_SABBREVMONTHNAME13}
+
+ LOCALE_SPOSITIVESIGN = $00000050; // positive sign
+ {$EXTERNALSYM LOCALE_SPOSITIVESIGN}
+ LOCALE_SNEGATIVESIGN = $00000051; // negative sign
+ {$EXTERNALSYM LOCALE_SNEGATIVESIGN}
+ LOCALE_IPOSSIGNPOSN = $00000052; // positive sign position
+ {$EXTERNALSYM LOCALE_IPOSSIGNPOSN}
+ LOCALE_INEGSIGNPOSN = $00000053; // negative sign position
+ {$EXTERNALSYM LOCALE_INEGSIGNPOSN}
+ LOCALE_IPOSSYMPRECEDES = $00000054; // mon sym precedes pos amt
+ {$EXTERNALSYM LOCALE_IPOSSYMPRECEDES}
+ LOCALE_IPOSSEPBYSPACE = $00000055; // mon sym sep by space from pos amt
+ {$EXTERNALSYM LOCALE_IPOSSEPBYSPACE}
+ LOCALE_INEGSYMPRECEDES = $00000056; // mon sym precedes neg amt
+ {$EXTERNALSYM LOCALE_INEGSYMPRECEDES}
+ LOCALE_INEGSEPBYSPACE = $00000057; // mon sym sep by space from neg amt
+ {$EXTERNALSYM LOCALE_INEGSEPBYSPACE}
+
+ LOCALE_FONTSIGNATURE = $00000058; // font signature
+ {$EXTERNALSYM LOCALE_FONTSIGNATURE}
+ LOCALE_SISO639LANGNAME = $00000059; // ISO abbreviated language name
+ {$EXTERNALSYM LOCALE_SISO639LANGNAME}
+ LOCALE_SISO3166CTRYNAME = $0000005A; // ISO abbreviated country name
+ {$EXTERNALSYM LOCALE_SISO3166CTRYNAME}
+
+ LOCALE_IDEFAULTEBCDICCODEPAGE = $00001012; // default ebcdic code page
+ {$EXTERNALSYM LOCALE_IDEFAULTEBCDICCODEPAGE}
+ LOCALE_IPAPERSIZE = $0000100A; // 1 = letter, 5 = legal, 8 = a3, 9 = a4
+ {$EXTERNALSYM LOCALE_IPAPERSIZE}
+ LOCALE_SENGCURRNAME = $00001007; // english name of currency
+ {$EXTERNALSYM LOCALE_SENGCURRNAME}
+ LOCALE_SNATIVECURRNAME = $00001008; // native name of currency
+ {$EXTERNALSYM LOCALE_SNATIVECURRNAME}
+ LOCALE_SYEARMONTH = $00001006; // year month format string
+ {$EXTERNALSYM LOCALE_SYEARMONTH}
+ LOCALE_SSORTNAME = $00001013; // sort name
+ {$EXTERNALSYM LOCALE_SSORTNAME}
+ LOCALE_IDIGITSUBSTITUTION = $00001014; // 0 = context, 1 = none, 2 = national
+ {$EXTERNALSYM LOCALE_IDIGITSUBSTITUTION}
+
+//
+// Time Flags for GetTimeFormat.
+//
+
+ TIME_NOMINUTESORSECONDS = $00000001; // do not use minutes or seconds
+ {$EXTERNALSYM TIME_NOMINUTESORSECONDS}
+ TIME_NOSECONDS = $00000002; // do not use seconds
+ {$EXTERNALSYM TIME_NOSECONDS}
+ TIME_NOTIMEMARKER = $00000004; // do not use time marker
+ {$EXTERNALSYM TIME_NOTIMEMARKER}
+ TIME_FORCE24HOURFORMAT = $00000008; // always use 24 hour format
+ {$EXTERNALSYM TIME_FORCE24HOURFORMAT}
+
+//
+// Date Flags for GetDateFormat.
+//
+
+ DATE_SHORTDATE = $00000001; // use short date picture
+ {$EXTERNALSYM DATE_SHORTDATE}
+ DATE_LONGDATE = $00000002; // use long date picture
+ {$EXTERNALSYM DATE_LONGDATE}
+ DATE_USE_ALT_CALENDAR = $00000004; // use alternate calendar (if any)
+ {$EXTERNALSYM DATE_USE_ALT_CALENDAR}
+
+ DATE_YEARMONTH = $00000008; // use year month picture
+ {$EXTERNALSYM DATE_YEARMONTH}
+ DATE_LTRREADING = $00000010; // add marks for left to right reading order layout
+ {$EXTERNALSYM DATE_LTRREADING}
+ DATE_RTLREADING = $00000020; // add marks for right to left reading order layout
+ {$EXTERNALSYM DATE_RTLREADING}
+
+//
+// Calendar Types.
+//
+// These types are used for the EnumCalendarInfo and GetCalendarInfo
+// NLS API routines.
+// Some of these types are also used for the SetCalendarInfo NLS API
+// routine.
+//
+
+//
+// The following CalTypes may be used in combination with any other CalTypes.
+//
+// CAL_NOUSEROVERRIDE
+//
+// CAL_USE_CP_ACP is used in the A (Ansi) apis that need to do string
+// translation.
+//
+// CAL_RETURN_NUMBER will return the result from GetCalendarInfo as a
+// number instead of a string. This flag is only valid for the CalTypes
+// beginning with CAL_I.
+//
+
+ CAL_NOUSEROVERRIDE = LOCALE_NOUSEROVERRIDE; // do not use user overrides
+ {$EXTERNALSYM CAL_NOUSEROVERRIDE}
+ CAL_USE_CP_ACP = LOCALE_USE_CP_ACP; // use the system ACP
+ {$EXTERNALSYM CAL_USE_CP_ACP}
+ CAL_RETURN_NUMBER = LOCALE_RETURN_NUMBER; // return number instead of string
+ {$EXTERNALSYM CAL_RETURN_NUMBER}
+
+//
+// The following CalTypes are mutually exclusive in that they may NOT
+// be used in combination with each other.
+//
+
+ CAL_ICALINTVALUE = $00000001; // calendar type
+ {$EXTERNALSYM CAL_ICALINTVALUE}
+ CAL_SCALNAME = $00000002; // native name of calendar
+ {$EXTERNALSYM CAL_SCALNAME}
+ CAL_IYEAROFFSETRANGE = $00000003; // starting years of eras
+ {$EXTERNALSYM CAL_IYEAROFFSETRANGE}
+ CAL_SERASTRING = $00000004; // era name for IYearOffsetRanges
+ {$EXTERNALSYM CAL_SERASTRING}
+ CAL_SSHORTDATE = $00000005; // short date format string
+ {$EXTERNALSYM CAL_SSHORTDATE}
+ CAL_SLONGDATE = $00000006; // long date format string
+ {$EXTERNALSYM CAL_SLONGDATE}
+ CAL_SDAYNAME1 = $00000007; // native name for Monday
+ {$EXTERNALSYM CAL_SDAYNAME1}
+ CAL_SDAYNAME2 = $00000008; // native name for Tuesday
+ {$EXTERNALSYM CAL_SDAYNAME2}
+ CAL_SDAYNAME3 = $00000009; // native name for Wednesday
+ {$EXTERNALSYM CAL_SDAYNAME3}
+ CAL_SDAYNAME4 = $0000000a; // native name for Thursday
+ {$EXTERNALSYM CAL_SDAYNAME4}
+ CAL_SDAYNAME5 = $0000000b; // native name for Friday
+ {$EXTERNALSYM CAL_SDAYNAME5}
+ CAL_SDAYNAME6 = $0000000c; // native name for Saturday
+ {$EXTERNALSYM CAL_SDAYNAME6}
+ CAL_SDAYNAME7 = $0000000d; // native name for Sunday
+ {$EXTERNALSYM CAL_SDAYNAME7}
+ CAL_SABBREVDAYNAME1 = $0000000e; // abbreviated name for Monday
+ {$EXTERNALSYM CAL_SABBREVDAYNAME1}
+ CAL_SABBREVDAYNAME2 = $0000000f; // abbreviated name for Tuesday
+ {$EXTERNALSYM CAL_SABBREVDAYNAME2}
+ CAL_SABBREVDAYNAME3 = $00000010; // abbreviated name for Wednesday
+ {$EXTERNALSYM CAL_SABBREVDAYNAME3}
+ CAL_SABBREVDAYNAME4 = $00000011; // abbreviated name for Thursday
+ {$EXTERNALSYM CAL_SABBREVDAYNAME4}
+ CAL_SABBREVDAYNAME5 = $00000012; // abbreviated name for Friday
+ {$EXTERNALSYM CAL_SABBREVDAYNAME5}
+ CAL_SABBREVDAYNAME6 = $00000013; // abbreviated name for Saturday
+ {$EXTERNALSYM CAL_SABBREVDAYNAME6}
+ CAL_SABBREVDAYNAME7 = $00000014; // abbreviated name for Sunday
+ {$EXTERNALSYM CAL_SABBREVDAYNAME7}
+ CAL_SMONTHNAME1 = $00000015; // native name for January
+ {$EXTERNALSYM CAL_SMONTHNAME1}
+ CAL_SMONTHNAME2 = $00000016; // native name for February
+ {$EXTERNALSYM CAL_SMONTHNAME2}
+ CAL_SMONTHNAME3 = $00000017; // native name for March
+ {$EXTERNALSYM CAL_SMONTHNAME3}
+ CAL_SMONTHNAME4 = $00000018; // native name for April
+ {$EXTERNALSYM CAL_SMONTHNAME4}
+ CAL_SMONTHNAME5 = $00000019; // native name for May
+ {$EXTERNALSYM CAL_SMONTHNAME5}
+ CAL_SMONTHNAME6 = $0000001a; // native name for June
+ {$EXTERNALSYM CAL_SMONTHNAME6}
+ CAL_SMONTHNAME7 = $0000001b; // native name for July
+ {$EXTERNALSYM CAL_SMONTHNAME7}
+ CAL_SMONTHNAME8 = $0000001c; // native name for August
+ {$EXTERNALSYM CAL_SMONTHNAME8}
+ CAL_SMONTHNAME9 = $0000001d; // native name for September
+ {$EXTERNALSYM CAL_SMONTHNAME9}
+ CAL_SMONTHNAME10 = $0000001e; // native name for October
+ {$EXTERNALSYM CAL_SMONTHNAME10}
+ CAL_SMONTHNAME11 = $0000001f; // native name for November
+ {$EXTERNALSYM CAL_SMONTHNAME11}
+ CAL_SMONTHNAME12 = $00000020; // native name for December
+ {$EXTERNALSYM CAL_SMONTHNAME12}
+ CAL_SMONTHNAME13 = $00000021; // native name for 13th month (if any)
+ {$EXTERNALSYM CAL_SMONTHNAME13}
+ CAL_SABBREVMONTHNAME1 = $00000022; // abbreviated name for January
+ {$EXTERNALSYM CAL_SABBREVMONTHNAME1}
+ CAL_SABBREVMONTHNAME2 = $00000023; // abbreviated name for February
+ {$EXTERNALSYM CAL_SABBREVMONTHNAME2}
+ CAL_SABBREVMONTHNAME3 = $00000024; // abbreviated name for March
+ {$EXTERNALSYM CAL_SABBREVMONTHNAME3}
+ CAL_SABBREVMONTHNAME4 = $00000025; // abbreviated name for April
+ {$EXTERNALSYM CAL_SABBREVMONTHNAME4}
+ CAL_SABBREVMONTHNAME5 = $00000026; // abbreviated name for May
+ {$EXTERNALSYM CAL_SABBREVMONTHNAME5}
+ CAL_SABBREVMONTHNAME6 = $00000027; // abbreviated name for June
+ {$EXTERNALSYM CAL_SABBREVMONTHNAME6}
+ CAL_SABBREVMONTHNAME7 = $00000028; // abbreviated name for July
+ {$EXTERNALSYM CAL_SABBREVMONTHNAME7}
+ CAL_SABBREVMONTHNAME8 = $00000029; // abbreviated name for August
+ {$EXTERNALSYM CAL_SABBREVMONTHNAME8}
+ CAL_SABBREVMONTHNAME9 = $0000002a; // abbreviated name for September
+ {$EXTERNALSYM CAL_SABBREVMONTHNAME9}
+ CAL_SABBREVMONTHNAME10 = $0000002b; // abbreviated name for October
+ {$EXTERNALSYM CAL_SABBREVMONTHNAME10}
+ CAL_SABBREVMONTHNAME11 = $0000002c; // abbreviated name for November
+ {$EXTERNALSYM CAL_SABBREVMONTHNAME11}
+ CAL_SABBREVMONTHNAME12 = $0000002d; // abbreviated name for December
+ {$EXTERNALSYM CAL_SABBREVMONTHNAME12}
+ CAL_SABBREVMONTHNAME13 = $0000002e; // abbreviated name for 13th month (if any)
+ {$EXTERNALSYM CAL_SABBREVMONTHNAME13}
+
+ CAL_SYEARMONTH = $0000002f; // year month format string
+ {$EXTERNALSYM CAL_SYEARMONTH}
+ CAL_ITWODIGITYEARMAX = $00000030; // two digit year max
+ {$EXTERNALSYM CAL_ITWODIGITYEARMAX}
+
+//
+// Calendar Enumeration Value.
+//
+
+ ENUM_ALL_CALENDARS = DWORD($ffffffff); // enumerate all calendars
+ {$EXTERNALSYM ENUM_ALL_CALENDARS}
+
+//
+// Calendar ID Values.
+//
+
+ CAL_GREGORIAN = 1; // Gregorian (localized) calendar
+ {$EXTERNALSYM CAL_GREGORIAN}
+ CAL_GREGORIAN_US = 2; // Gregorian (U.S.) calendar
+ {$EXTERNALSYM CAL_GREGORIAN_US}
+ CAL_JAPAN = 3; // Japanese Emperor Era calendar
+ {$EXTERNALSYM CAL_JAPAN}
+ CAL_TAIWAN = 4; // Taiwan Era calendar
+ {$EXTERNALSYM CAL_TAIWAN}
+ CAL_KOREA = 5; // Korean Tangun calendar
+ {$EXTERNALSYM CAL_KOREA}
+ CAL_HIJRI = 6; // Hijri (Arabic Lunar) calendar
+ {$EXTERNALSYM CAL_HIJRI}
+ CAL_THAI = 7; // Thai calendar
+ {$EXTERNALSYM CAL_THAI}
+ CAL_HEBREW = 8; // Hebrew (Lunar) calendar
+ {$EXTERNALSYM CAL_HEBREW}
+ CAL_GREGORIAN_ME_FRENCH = 9; // Gregorian Middle East French calendar
+ {$EXTERNALSYM CAL_GREGORIAN_ME_FRENCH}
+ CAL_GREGORIAN_ARABIC = 10; // Gregorian Arabic calendar
+ {$EXTERNALSYM CAL_GREGORIAN_ARABIC}
+ CAL_GREGORIAN_XLIT_ENGLISH = 11; // Gregorian Transliterated English calendar
+ {$EXTERNALSYM CAL_GREGORIAN_XLIT_ENGLISH}
+ CAL_GREGORIAN_XLIT_FRENCH = 12; // Gregorian Transliterated French calendar
+ {$EXTERNALSYM CAL_GREGORIAN_XLIT_FRENCH}
+
+//
+// Language Group ID Values.
+//
+
+ LGRPID_WESTERN_EUROPE = $0001; // Western Europe & U.S.
+ {$EXTERNALSYM LGRPID_WESTERN_EUROPE}
+ LGRPID_CENTRAL_EUROPE = $0002; // Central Europe
+ {$EXTERNALSYM LGRPID_CENTRAL_EUROPE}
+ LGRPID_BALTIC = $0003; // Baltic
+ {$EXTERNALSYM LGRPID_BALTIC}
+ LGRPID_GREEK = $0004; // Greek
+ {$EXTERNALSYM LGRPID_GREEK}
+ LGRPID_CYRILLIC = $0005; // Cyrillic
+ {$EXTERNALSYM LGRPID_CYRILLIC}
+ LGRPID_TURKISH = $0006; // Turkish
+ {$EXTERNALSYM LGRPID_TURKISH}
+ LGRPID_JAPANESE = $0007; // Japanese
+ {$EXTERNALSYM LGRPID_JAPANESE}
+ LGRPID_KOREAN = $0008; // Korean
+ {$EXTERNALSYM LGRPID_KOREAN}
+ LGRPID_TRADITIONAL_CHINESE = $0009; // Traditional Chinese
+ {$EXTERNALSYM LGRPID_TRADITIONAL_CHINESE}
+ LGRPID_SIMPLIFIED_CHINESE = $000a; // Simplified Chinese
+ {$EXTERNALSYM LGRPID_SIMPLIFIED_CHINESE}
+ LGRPID_THAI = $000b; // Thai
+ {$EXTERNALSYM LGRPID_THAI}
+ LGRPID_HEBREW = $000c; // Hebrew
+ {$EXTERNALSYM LGRPID_HEBREW}
+ LGRPID_ARABIC = $000d; // Arabic
+ {$EXTERNALSYM LGRPID_ARABIC}
+ LGRPID_VIETNAMESE = $000e; // Vietnamese
+ {$EXTERNALSYM LGRPID_VIETNAMESE}
+ LGRPID_INDIC = $000f; // Indic
+ {$EXTERNALSYM LGRPID_INDIC}
+ LGRPID_GEORGIAN = $0010; // Georgian
+ {$EXTERNALSYM LGRPID_GEORGIAN}
+ LGRPID_ARMENIAN = $0011; // Armenian
+ {$EXTERNALSYM LGRPID_ARMENIAN}
+
+////////////////////////////////////////////////////////////////////////////
+//
+// Typedefs
+//
+// Define all types for the NLS component here.
+//
+////////////////////////////////////////////////////////////////////////////
+
+//
+// Language Group ID.
+//
+
+type
+ LGRPID = DWORD;
+ {$EXTERNALSYM LGRPID}
+
+//
+// Locale type constant.
+//
+
+ LCTYPE = DWORD;
+ {$EXTERNALSYM LCTYPE}
+
+//
+// Calendar type constant.
+//
+
+ CALTYPE = DWORD;
+ {$EXTERNALSYM CALTYPE}
+
+//
+// Calendar ID.
+//
+
+ CALID = DWORD;
+ {$EXTERNALSYM CALID}
+
+//
+// CP Info.
+//
+
+ LPCPINFO = ^CPINFO;
+ {$EXTERNALSYM LPCPINFO}
+ _cpinfo = record
+ MaxCharSize: UINT; // max length (in bytes) of a char
+ DefaultChar: array [0..MAX_DEFAULTCHAR - 1] of BYTE; // default character
+ LeadByte: array [0..MAX_LEADBYTES - 1] of BYTE; // lead byte ranges
+ end;
+ {$EXTERNALSYM _cpinfo}
+ CPINFO = _cpinfo;
+ {$EXTERNALSYM CPINFO}
+ TCpInfo = CPINFO;
+ PCpInfo = LPCPINFO;
+
+ {$EXTERNALSYM CPINFOEXA}
+ LPCPINFOEXA = ^CPINFOEXA;
+ _cpinfoexA = record
+ MaxCharSize: UINT; // max length (in bytes) of a char
+ DefaultChar: array [0..MAX_DEFAULTCHAR - 1] of BYTE; // default character (MB)
+ LeadByte: array [0..MAX_LEADBYTES - 1] of BYTE; // lead byte ranges
+ UnicodeDefaultChar: WCHAR; // default character (Unicode)
+ CodePage: UINT; // code page id
+ CodePageName: array [0..MAX_PATH - 1] of CHAR; // code page name (Unicode)
+ end;
+ {$EXTERNALSYM _cpinfoexA}
+ CPINFOEXA = _cpinfoexA;
+ {$EXTERNALSYM LPCPINFOEXA}
+ TCpInfoExA = CPINFOEXA;
+ PCpInfoExA = LPCPINFOEXA;
+
+ LPCPINFOEXW = ^CPINFOEXW;
+ {$EXTERNALSYM LPCPINFOEXW}
+ _cpinfoexW = record
+ MaxCharSize: UINT; // max length (in bytes) of a char
+ DefaultChar: array [0..MAX_DEFAULTCHAR - 1] of BYTE; // default character (MB)
+ LeadByte: array [0..MAX_LEADBYTES - 1] of BYTE; // lead byte ranges
+ UnicodeDefaultChar: WCHAR; // default character (Unicode)
+ CodePage: UINT; // code page id
+ CodePageName: array [0..MAX_PATH - 1] of WCHAR; // code page name (Unicode)
+ end;
+ {$EXTERNALSYM _cpinfoexW}
+ CPINFOEXW = _cpinfoexW;
+ {$EXTERNALSYM CPINFOEXW}
+ TCpInfoExW = CPINFOEXW;
+ PCpInfoExW = LPCPINFOEXW;
+
+ {$IFDEF UNICODE}
+ CPINFOEX = CPINFOEXW;
+ {$EXTERNALSYM CPINFOEX}
+ LPCPINFOEX = LPCPINFOEXW;
+ {$EXTERNALSYM LPCPINFOEX}
+ TCpInfoEx = TCpInfoExW;
+ PCpInfoEx = PCpInfoExW;
+ {$ELSE}
+ CPINFOEX = CPINFOEXA;
+ {$EXTERNALSYM CPINFOEX}
+ LPCPINFOEX = LPCPINFOEXA;
+ {$EXTERNALSYM LPCPINFOEX}
+ TCpInfoEx = TCpInfoExA;
+ PCpInfoEx = PCpInfoExA;
+ {$ENDIF UNICODE}
+
+//
+// Number format.
+//
+
+ LPNUMBERFMTA = ^NUMBERFMTA;
+ {$EXTERNALSYM LPNUMBERFMTA}
+ _numberfmtA = record
+ NumDigits: UINT; // number of decimal digits
+ LeadingZero: UINT; // if leading zero in decimal fields
+ Grouping: UINT; // group size left of decimal
+ lpDecimalSep: LPSTR; // ptr to decimal separator string
+ lpThousandSep: LPSTR; // ptr to thousand separator string
+ NegativeOrder: UINT; // negative number ordering
+ end;
+ {$EXTERNALSYM _numberfmtA}
+ NUMBERFMTA = _numberfmtA;
+ {$EXTERNALSYM NUMBERFMTA}
+ TNumberFmtA = NUMBERFMTA;
+ PNumberFmtA = LPNUMBERFMTA;
+
+ LPNUMBERFMTW = ^NUMBERFMTW;
+ {$EXTERNALSYM LPNUMBERFMTW}
+ _numberfmtW = record
+ NumDigits: UINT; // number of decimal digits
+ LeadingZero: UINT; // if leading zero in decimal fields
+ Grouping: UINT; // group size left of decimal
+ lpDecimalSep: LPWSTR; // ptr to decimal separator string
+ lpThousandSep: LPWSTR; // ptr to thousand separator string
+ NegativeOrder: UINT; // negative number ordering
+ end;
+ {$EXTERNALSYM _numberfmtW}
+ NUMBERFMTW = _numberfmtW;
+ {$EXTERNALSYM NUMBERFMTW}
+ TNumberFmtW = NUMBERFMTW;
+ PNumberFmtW = LPNUMBERFMTW;
+
+ {$IFDEF UNICODE}
+ NUMBERFMT = NUMBERFMTW;
+ {$EXTERNALSYM NUMBERFMT}
+ LPNUMBERFMT = LPNUMBERFMTW;
+ {$EXTERNALSYM LPNUMBERFMT}
+ TNumberFmt = TNumberFmtW;
+ PNumberFmt = TNumberFmtW;
+ {$ELSE}
+ NUMBERFMT = NUMBERFMTA;
+ {$EXTERNALSYM NUMBERFMT}
+ LPNUMBERFMT = LPNUMBERFMTA;
+ {$EXTERNALSYM LPNUMBERFMT}
+ TNumberFmt = TNumberFmtA;
+ PNumberFmt = TNumberFmtA;
+ {$ENDIF UNICODE}
+
+//
+// Currency format.
+//
+
+ LPCURRENCYFMTA = ^CURRENCYFMTA;
+ {$EXTERNALSYM LPCURRENCYFMTA}
+ _currencyfmtA = record
+ NumDigits: UINT; // number of decimal digits
+ LeadingZero: UINT; // if leading zero in decimal fields
+ Grouping: UINT; // group size left of decimal
+ lpDecimalSep: LPSTR; // ptr to decimal separator string
+ lpThousandSep: LPSTR; // ptr to thousand separator string
+ NegativeOrder: UINT; // negative currency ordering
+ PositiveOrder: UINT; // positive currency ordering
+ lpCurrencySymbol: LPSTR; // ptr to currency symbol string
+ end;
+ {$EXTERNALSYM _currencyfmtA}
+ CURRENCYFMTA = _currencyfmtA;
+ {$EXTERNALSYM CURRENCYFMTA}
+ TCurrencyFmtA = CURRENCYFMTA;
+ PCurrencyFmtA = LPCURRENCYFMTA;
+
+ LPCURRENCYFMTW = ^CURRENCYFMTW;
+ {$EXTERNALSYM LPCURRENCYFMTW}
+ _currencyfmtW = record
+ NumDigits: UINT; // number of decimal digits
+ LeadingZero: UINT; // if leading zero in decimal fields
+ Grouping: UINT; // group size left of decimal
+ lpDecimalSep: LPWSTR; // ptr to decimal separator string
+ lpThousandSep: LPWSTR; // ptr to thousand separator string
+ NegativeOrder: UINT; // negative currency ordering
+ PositiveOrder: UINT; // positive currency ordering
+ lpCurrencySymbol: LPWSTR; // ptr to currency symbol string
+ end;
+ {$EXTERNALSYM _currencyfmtW}
+ CURRENCYFMTW = _currencyfmtW;
+ {$EXTERNALSYM CURRENCYFMTW}
+ TCurrencyFmtW = CURRENCYFMTW;
+ PCurrencyFmtW = LPCURRENCYFMTW;
+
+ {$IFDEF UNICODE}
+ CURRENCYFMT = CURRENCYFMTW;
+ {$EXTERNALSYM CURRENCYFMT}
+ LPCURRENCYFMT = LPCURRENCYFMTW;
+ {$EXTERNALSYM LPCURRENCYFMT}
+ TCurrencyFmt = TCurrencyFmtW;
+ PCurrencyFmt = PCurrencyFmtW;
+ {$ELSE}
+ CURRENCYFMT = CURRENCYFMTA;
+ {$EXTERNALSYM CURRENCYFMT}
+ LPCURRENCYFMT = LPCURRENCYFMTA;
+ {$EXTERNALSYM LPCURRENCYFMT}
+ TCurrencyFmt = TCurrencyFmtA;
+ PCurrencyFmt = PCurrencyFmtA;
+ {$ENDIF UNICODE}
+
+//
+// NLS function capabilities
+//
+
+const
+ COMPARE_STRING = $0001;
+ {$EXTERNALSYM COMPARE_STRING}
+
+type
+ SYSNLS_FUNCTION = DWORD;
+ {$EXTERNALSYM SYSNLS_FUNCTION}
+ NLS_FUNCTION = DWORD;
+ {$EXTERNALSYM NLS_FUNCTION}
+ TSysNlsFunction = SYSNLS_FUNCTION;
+ TNlsFunction = NLS_FUNCTION;
+
+//
+// NLS version structure.
+//
+
+ _nlsversioninfo = record
+ dwNLSVersionInfoSize: DWORD;
+ dwNLSVersion: DWORD;
+ dwDefinedVersion: DWORD;
+ end;
+ {$EXTERNALSYM _nlsversioninfo}
+ NLSVERSIONINFO = _nlsversioninfo;
+ {$EXTERNALSYM NLSVERSIONINFO}
+ LPNLSVERSIONINFO = ^NLSVERSIONINFO;
+ {$EXTERNALSYM LPNLSVERSIONINFO}
+ TNlsVersionInfo = NLSVERSIONINFO;
+ PNlsVersionInfo = LPNLSVERSIONINFO;
+
+//
+// GEO defines
+//
+
+type
+ GEOID = LONG;
+ {$EXTERNALSYM GEOID}
+ GEOTYPE = DWORD;
+ {$EXTERNALSYM GEOTYPE}
+ GEOCLASS = DWORD;
+ {$EXTERNALSYM GEOCLASS}
+
+const
+ GEOID_NOT_AVAILABLE = -1;
+ {$EXTERNALSYM GEOID_NOT_AVAILABLE}
+
+//
+// GEO information types for clients to query
+//
+
+const
+ GEO_NATION = $0001;
+ {$EXTERNALSYM GEO_NATION}
+ GEO_LATITUDE = $0002;
+ {$EXTERNALSYM GEO_LATITUDE}
+ GEO_LONGITUDE = $0003;
+ {$EXTERNALSYM GEO_LONGITUDE}
+ GEO_ISO2 = $0004;
+ {$EXTERNALSYM GEO_ISO2}
+ GEO_ISO3 = $0005;
+ {$EXTERNALSYM GEO_ISO3}
+ GEO_RFC1766 = $0006;
+ {$EXTERNALSYM GEO_RFC1766}
+ GEO_LCID = $0007;
+ {$EXTERNALSYM GEO_LCID}
+ GEO_FRIENDLYNAME = $0008;
+ {$EXTERNALSYM GEO_FRIENDLYNAME}
+ GEO_OFFICIALNAME = $0009;
+ {$EXTERNALSYM GEO_OFFICIALNAME}
+ GEO_TIMEZONES = $000A;
+ {$EXTERNALSYM GEO_TIMEZONES}
+ GEO_OFFICIALLANGUAGES = $000B;
+ {$EXTERNALSYM GEO_OFFICIALLANGUAGES}
+
+type
+ SYSGEOTYPE = DWORD;
+ {$EXTERNALSYM SYSGEOTYPE}
+
+//
+// More GEOCLASS defines will be listed here
+//
+
+const
+ GEOCLASS_NATION = 16;
+ {$EXTERNALSYM GEOCLASS_NATION}
+ GEOCLASS_REGION = 14;
+ {$EXTERNALSYM GEOCLASS_REGION}
+
+type
+ SYSGEOCLASS = DWORD;
+ {$EXTERNALSYM SYSGEOCLASS}
+
+//
+// Enumeration function constants.
+//
+
+type
+ LANGUAGEGROUP_ENUMPROCA = function(LanguageGroup: LGRPID; lpLanguageGroupString,
+ lpLanguageGroupNameSting: LPSTR; dwFlags: DWORD; lParam: LONG_PTR): BOOL; stdcall;
+ {$EXTERNALSYM LANGUAGEGROUP_ENUMPROCA}
+ LANGGROUPLOCALE_ENUMPROCA = function(LanguageGroup: LGRPID; Locale: LCID;
+ lpLocaleString: LPSTR; lParam: LONG_PTR): BOOL; stdcall;
+ {$EXTERNALSYM LANGGROUPLOCALE_ENUMPROCA}
+ UILANGUAGE_ENUMPROCA = function(lpUILanguageString: LPSTR; lParam: LONG_PTR): BOOL; stdcall;
+ {$EXTERNALSYM UILANGUAGE_ENUMPROCA}
+ LOCALE_ENUMPROCA = function(lpLocaleString: LPSTR): BOOL; stdcall;
+ {$EXTERNALSYM LOCALE_ENUMPROCA}
+ CODEPAGE_ENUMPROCA = function(lpCodePAgeString: LPSTR): BOOL; stdcall;
+ {$EXTERNALSYM CODEPAGE_ENUMPROCA}
+ DATEFMT_ENUMPROCA = function(lpDateFormatString: LPSTR): BOOL; stdcall;
+ {$EXTERNALSYM DATEFMT_ENUMPROCA}
+ DATEFMT_ENUMPROCEXA = function(lpDateFormatString: LPSTR; CalenderId: CALID): BOOL; stdcall;
+ {$EXTERNALSYM DATEFMT_ENUMPROCEXA}
+ TIMEFMT_ENUMPROCA = function(lpTimeFormatString: LPSTR): BOOL; stdcall;
+ {$EXTERNALSYM TIMEFMT_ENUMPROCA}
+ CALINFO_ENUMPROCA = function(lpCalendarInfoString: LPSTR): BOOL; stdcall;
+ {$EXTERNALSYM CALINFO_ENUMPROCA}
+ CALINFO_ENUMPROCEXA = function(lpCalendarInfoString: LPSTR; Calendar: CALID): BOOL; stdcall;
+ {$EXTERNALSYM CALINFO_ENUMPROCEXA}
+
+ LANGUAGEGROUP_ENUMPROCW = function(LanguageGroup: LGRPID; lpLanguageGroupString,
+ lpLanguageGroupNameSting: LPWSTR; dwFlags: DWORD; lParam: LONG_PTR): BOOL; stdcall;
+ {$EXTERNALSYM LANGUAGEGROUP_ENUMPROCW}
+ LANGGROUPLOCALE_ENUMPROCW = function(LanguageGroup: LGRPID; Locale: LCID;
+ lpLocaleString: LPWSTR; lParam: LONG_PTR): BOOL; stdcall;
+ {$EXTERNALSYM LANGGROUPLOCALE_ENUMPROCW}
+ UILANGUAGE_ENUMPROCW = function(lpUILanguageString: LPWSTR; lParam: LONG_PTR): BOOL; stdcall;
+ {$EXTERNALSYM UILANGUAGE_ENUMPROCW}
+ LOCALE_ENUMPROCW = function(lpLocaleString: LPWSTR): BOOL; stdcall;
+ {$EXTERNALSYM LOCALE_ENUMPROCW}
+ CODEPAGE_ENUMPROCW = function(lpCodePAgeString: LPWSTR): BOOL; stdcall;
+ {$EXTERNALSYM CODEPAGE_ENUMPROCW}
+ DATEFMT_ENUMPROCW = function(lpDateFormatString: LPWSTR): BOOL; stdcall;
+ {$EXTERNALSYM DATEFMT_ENUMPROCW}
+ DATEFMT_ENUMPROCEXW = function(lpDateFormatString: LPWSTR; CalenderId: CALID): BOOL; stdcall;
+ {$EXTERNALSYM DATEFMT_ENUMPROCEXW}
+ TIMEFMT_ENUMPROCW = function(lpTimeFormatString: LPWSTR): BOOL; stdcall;
+ {$EXTERNALSYM TIMEFMT_ENUMPROCW}
+ CALINFO_ENUMPROCW = function(lpCalendarInfoString: LPWSTR): BOOL; stdcall;
+ {$EXTERNALSYM CALINFO_ENUMPROCW}
+ CALINFO_ENUMPROCEXW = function(lpCalendarInfoString: LPWSTR; Calendar: CALID): BOOL; stdcall;
+ {$EXTERNALSYM CALINFO_ENUMPROCEXW}
+ GEO_ENUMPROC = function(geo: GEOID): BOOL; stdcall;
+ {$EXTERNALSYM GEO_ENUMPROC}
+
+ LANGUAGEGROUP_ENUMPROC = function(LanguageGroup: LGRPID; lpLanguageGroupString,
+ lpLanguageGroupNameSting: LPTSTR; dwFlags: DWORD; lParam: LONG_PTR): BOOL; stdcall;
+ {$EXTERNALSYM LANGUAGEGROUP_ENUMPROC}
+ LANGGROUPLOCALE_ENUMPROC = function(LanguageGroup: LGRPID; Locale: LCID;
+ lpLocaleString: LPTSTR; lParam: LONG_PTR): BOOL; stdcall;
+ {$EXTERNALSYM LANGGROUPLOCALE_ENUMPROC}
+ UILANGUAGE_ENUMPROC = function(lpUILanguageString: LPTSTR; lParam: LONG_PTR): BOOL; stdcall;
+ {$EXTERNALSYM UILANGUAGE_ENUMPROC}
+ LOCALE_ENUMPROC = function(lpLocaleString: LPTSTR): BOOL; stdcall;
+ {$EXTERNALSYM LOCALE_ENUMPROC}
+ CODEPAGE_ENUMPROC = function(lpCodePAgeString: LPTSTR): BOOL; stdcall;
+ {$EXTERNALSYM CODEPAGE_ENUMPROC}
+ DATEFMT_ENUMPROC = function(lpDateFormatString: LPTSTR): BOOL; stdcall;
+ {$EXTERNALSYM DATEFMT_ENUMPROC}
+ DATEFMT_ENUMPROCEX = function(lpDateFormatString: LPTSTR; CalenderId: CALID): BOOL; stdcall;
+ {$EXTERNALSYM DATEFMT_ENUMPROCEX}
+ TIMEFMT_ENUMPROC = function(lpTimeFormatString: LPTSTR): BOOL; stdcall;
+ {$EXTERNALSYM TIMEFMT_ENUMPROC}
+ CALINFO_ENUMPROC = function(lpCalendarInfoString: LPTSTR): BOOL; stdcall;
+ {$EXTERNALSYM CALINFO_ENUMPROC}
+ CALINFO_ENUMPROCEX = function(lpCalendarInfoString: LPTSTR; Calendar: CALID): BOOL; stdcall;
+ {$EXTERNALSYM CALINFO_ENUMPROCEX}
+
+////////////////////////////////////////////////////////////////////////////
+//
+// Macros
+//
+// Define all macros for the NLS component here.
+//
+////////////////////////////////////////////////////////////////////////////
+
+////////////////////////////////////////////////////////////////////////////
+//
+// Function Prototypes
+//
+// Only prototypes for the NLS APIs should go here.
+//
+////////////////////////////////////////////////////////////////////////////
+
+//
+// Code Page Dependent APIs.
+//
+
+function IsValidCodePage(CodePage: UINT): BOOL; stdcall;
+{$EXTERNALSYM IsValidCodePage}
+
+function GetACP: UINT; stdcall;
+{$EXTERNALSYM GetACP}
+
+function GetOEMCP: UINT; stdcall;
+{$EXTERNALSYM GetOEMCP}
+
+function GetCPInfo(CodePage: UINT; var lpCPInfo: CPINFO): BOOL; stdcall;
+{$EXTERNALSYM GetCPInfo}
+
+function GetCPInfoExA(CodePage: UINT; dwFlags: DWORD; var lpCPInfoEx: CPINFOEXA): BOOL; stdcall;
+{$EXTERNALSYM GetCPInfoExA}
+function GetCPInfoExW(CodePage: UINT; dwFlags: DWORD; var lpCPInfoEx: CPINFOEXW): BOOL; stdcall;
+{$EXTERNALSYM GetCPInfoExW}
+function GetCPInfoEx(CodePage: UINT; dwFlags: DWORD; var lpCPInfoEx: CPINFOEX): BOOL; stdcall;
+{$EXTERNALSYM GetCPInfoEx}
+
+function IsDBCSLeadByte(TestChar: BYTE): BOOL; stdcall;
+{$EXTERNALSYM IsDBCSLeadByte}
+
+function IsDBCSLeadByteEx(CodePage: UINT; TestChar: BYTE): BOOL; stdcall;
+{$EXTERNALSYM IsDBCSLeadByteEx}
+
+function MultiByteToWideChar(CodePage: UINT; dwFlags: DWORD; lpMultiByteStr: LPCSTR;
+ cbMultiByte: Integer; lpWideCharStr: LPWSTR; cchWideChar: Integer): Integer; stdcall;
+{$EXTERNALSYM MultiByteToWideChar}
+
+function WideCharToMultiByte(CodePage: UINT; dwFlags: DWORD; lpWideCharStr: LPCWSTR;
+ cchWideChar: Integer; lpMultiByteStr: LPSTR; cbMultiByte: Integer;
+ lpDefaultChar: LPCSTR; lpUsedDefaultChar: LPBOOL): Integer; stdcall;
+{$EXTERNALSYM WideCharToMultiByte}
+
+//
+// Locale Dependent APIs.
+//
+
+function CompareStringA(Locale: LCID; dwCmpFlags: DWORD; lpString1: LPCSTR;
+ cchCount1: Integer; lpString2: LPCSTR; cchCount2: Integer): Integer; stdcall;
+{$EXTERNALSYM CompareStringA}
+function CompareStringW(Locale: LCID; dwCmpFlags: DWORD; lpString1: LPCWSTR;
+ cchCount1: Integer; lpString2: LPCWSTR; cchCount2: Integer): Integer; stdcall;
+{$EXTERNALSYM CompareStringW}
+function CompareString(Locale: LCID; dwCmpFlags: DWORD; lpString1: LPCTSTR;
+ cchCount1: Integer; lpString2: LPCTSTR; cchCount2: Integer): Integer; stdcall;
+{$EXTERNALSYM CompareString}
+
+function LCMapStringA(Locale: LCID; dwMapFlags: DWORD; lpSrcStr: LPCSTR;
+ cchSrc: Integer; lpDestStr: LPSTR; cchDest: Integer): Integer; stdcall;
+{$EXTERNALSYM LCMapStringA}
+function LCMapStringW(Locale: LCID; dwMapFlags: DWORD; lpSrcStr: LPCWSTR;
+ cchSrc: Integer; lpDestStr: LPWSTR; cchDest: Integer): Integer; stdcall;
+{$EXTERNALSYM LCMapStringW}
+function LCMapString(Locale: LCID; dwMapFlags: DWORD; lpSrcStr: LPCTSTR;
+ cchSrc: Integer; lpDestStr: LPTSTR; cchDest: Integer): Integer; stdcall;
+{$EXTERNALSYM LCMapString}
+
+function GetLocaleInfoA(Locale: LCID; LCType: LCTYPE; lpLCData: LPSTR;
+ cchData: Integer): Integer; stdcall;
+{$EXTERNALSYM GetLocaleInfoA}
+function GetLocaleInfoW(Locale: LCID; LCType: LCTYPE; lpLCData: LPWSTR;
+ cchData: Integer): Integer; stdcall;
+{$EXTERNALSYM GetLocaleInfoW}
+function GetLocaleInfo(Locale: LCID; LCType: LCTYPE; lpLCData: LPTSTR;
+ cchData: Integer): Integer; stdcall;
+{$EXTERNALSYM GetLocaleInfo}
+
+function SetLocaleInfoA(Locale: LCID; LCType: LCTYPE; lpLCData: LPCSTR): BOOL; stdcall;
+{$EXTERNALSYM SetLocaleInfoA}
+function SetLocaleInfoW(Locale: LCID; LCType: LCTYPE; lpLCData: LPCWSTR): BOOL; stdcall;
+{$EXTERNALSYM SetLocaleInfoW}
+function SetLocaleInfo(Locale: LCID; LCType: LCTYPE; lpLCData: LPCTSTR): BOOL; stdcall;
+{$EXTERNALSYM SetLocaleInfo}
+
+function GetCalendarInfoA(Locale: LCID; Calendar: CALID; CalType: CALTYPE;
+ lpCalData: LPSTR; cchData: Integer; lpValue: LPDWORD): Integer; stdcall;
+{$EXTERNALSYM GetCalendarInfoA}
+function GetCalendarInfoW(Locale: LCID; Calendar: CALID; CalType: CALTYPE;
+ lpCalData: LPWSTR; cchData: Integer; lpValue: LPDWORD): Integer; stdcall;
+{$EXTERNALSYM GetCalendarInfoW}
+function GetCalendarInfo(Locale: LCID; Calendar: CALID; CalType: CALTYPE;
+ lpCalData: LPTSTR; cchData: Integer; lpValue: LPDWORD): Integer; stdcall;
+{$EXTERNALSYM GetCalendarInfo}
+
+function SetCalendarInfoA(Locale: LCID; Calendar: CALID; CalType: CALTYPE;
+ lpCalData: LPCSTR): BOOL; stdcall;
+{$EXTERNALSYM SetCalendarInfoA}
+function SetCalendarInfoW(Locale: LCID; Calendar: CALID; CalType: CALTYPE;
+ lpCalData: LPCWSTR): BOOL; stdcall;
+{$EXTERNALSYM SetCalendarInfoW}
+function SetCalendarInfo(Locale: LCID; Calendar: CALID; CalType: CALTYPE;
+ lpCalData: LPCTSTR): BOOL; stdcall;
+{$EXTERNALSYM SetCalendarInfo}
+
+function GetTimeFormatA(Locale: LCID; dwFlags: DWORD; lpTime: LPSYSTEMTIME;
+ lpFormat: LPCSTR; lpTimeStr: LPSTR; cchTime: Integer): Integer; stdcall;
+{$EXTERNALSYM GetTimeFormatA}
+function GetTimeFormatW(Locale: LCID; dwFlags: DWORD; lpTime: LPSYSTEMTIME;
+ lpFormat: LPCWSTR; lpTimeStr: LPWSTR; cchTime: Integer): Integer; stdcall;
+{$EXTERNALSYM GetTimeFormatW}
+function GetTimeFormat(Locale: LCID; dwFlags: DWORD; lpTime: LPSYSTEMTIME;
+ lpFormat: LPCTSTR; lpTimeStr: LPTSTR; cchTime: Integer): Integer; stdcall;
+{$EXTERNALSYM GetTimeFormat}
+
+function GetDateFormatA(Locale: LCID; dwFlags: DWORD; lpDate: LPSYSTEMTIME;
+ lpFormat: LPCSTR; lpDateStr: LPSTR; cchDate: Integer): Integer; stdcall;
+{$EXTERNALSYM GetDateFormatA}
+function GetDateFormatW(Locale: LCID; dwFlags: DWORD; lpDate: LPSYSTEMTIME;
+ lpFormat: LPCWSTR; lpDateStr: LPWSTR; cchDate: Integer): Integer; stdcall;
+{$EXTERNALSYM GetDateFormatW}
+function GetDateFormat(Locale: LCID; dwFlags: DWORD; lpDate: LPSYSTEMTIME;
+ lpFormat: LPCTSTR; lpDateStr: LPTSTR; cchDate: Integer): Integer; stdcall;
+{$EXTERNALSYM GetDateFormat}
+
+function GetNumberFormatA(Locale: LCID; dwFlags: DWORD; lpValue: LPCSTR;
+ lpFormat: LPNUMBERFMTA; lpNumberStr: LPSTR; cchNumber: Integer): Integer; stdcall;
+{$EXTERNALSYM GetNumberFormatA}
+function GetNumberFormatW(Locale: LCID; dwFlags: DWORD; lpValue: LPCWSTR;
+ lpFormat: LPNUMBERFMTW; lpNumberStr: LPWSTR; cchNumber: Integer): Integer; stdcall;
+{$EXTERNALSYM GetNumberFormatW}
+function GetNumberFormat(Locale: LCID; dwFlags: DWORD; lpValue: LPCTSTR;
+ lpFormat: LPNUMBERFMT; lpNumberStr: LPTSTR; cchNumber: Integer): Integer; stdcall;
+{$EXTERNALSYM GetNumberFormat}
+
+function GetCurrencyFormatA(Locale: LCID; dwFlags: DWORD; lpValue: LPCSTR;
+ lpFormat: LPCURRENCYFMTA; lpCurrencyStr: LPSTR; cchCurrency: Integer): Integer; stdcall;
+{$EXTERNALSYM GetCurrencyFormatA}
+function GetCurrencyFormatW(Locale: LCID; dwFlags: DWORD; lpValue: LPCWSTR;
+ lpFormat: LPCURRENCYFMTW; lpCurrencyStr: LPWSTR; cchCurrency: Integer): Integer; stdcall;
+{$EXTERNALSYM GetCurrencyFormatW}
+function GetCurrencyFormat(Locale: LCID; dwFlags: DWORD; lpValue: LPCTSTR;
+ lpFormat: LPCURRENCYFMT; lpCurrencyStr: LPTSTR; cchCurrency: Integer): Integer; stdcall;
+{$EXTERNALSYM GetCurrencyFormat}
+
+function EnumCalendarInfoA(lpCalInfoEnumProc: CALINFO_ENUMPROCA; Locale: LCID;
+ Calendar: CALID; CalType: CALTYPE): BOOL; stdcall;
+{$EXTERNALSYM EnumCalendarInfoA}
+function EnumCalendarInfoW(lpCalInfoEnumProc: CALINFO_ENUMPROCW; Locale: LCID;
+ Calendar: CALID; CalType: CALTYPE): BOOL; stdcall;
+{$EXTERNALSYM EnumCalendarInfoW}
+function EnumCalendarInfo(lpCalInfoEnumProc: CALINFO_ENUMPROC; Locale: LCID;
+ Calendar: CALID; CalType: CALTYPE): BOOL; stdcall;
+{$EXTERNALSYM EnumCalendarInfo}
+
+function EnumCalendarInfoExA(lpCalInfoEnumProcEx: CALINFO_ENUMPROCEXA;
+ Locale: LCID; Calendar: CALID; CalType: CALTYPE): BOOL; stdcall;
+{$EXTERNALSYM EnumCalendarInfoExA}
+function EnumCalendarInfoExW(lpCalInfoEnumProcEx: CALINFO_ENUMPROCEXW;
+ Locale: LCID; Calendar: CALID; CalType: CALTYPE): BOOL; stdcall;
+{$EXTERNALSYM EnumCalendarInfoExW}
+function EnumCalendarInfoEx(lpCalInfoEnumProcEx: CALINFO_ENUMPROCEX;
+ Locale: LCID; Calendar: CALID; CalType: CALTYPE): BOOL; stdcall;
+{$EXTERNALSYM EnumCalendarInfoEx}
+
+function EnumTimeFormatsA(lpTimeFmtEnumProc: TIMEFMT_ENUMPROCA; Locale:
+ LCID; dwFlags: DWORD): BOOL; stdcall;
+{$EXTERNALSYM EnumTimeFormatsA}
+function EnumTimeFormatsW(lpTimeFmtEnumProc: TIMEFMT_ENUMPROCW; Locale:
+ LCID; dwFlags: DWORD): BOOL; stdcall;
+{$EXTERNALSYM EnumTimeFormatsW}
+function EnumTimeFormats(lpTimeFmtEnumProc: TIMEFMT_ENUMPROC; Locale: LCID;
+ dwFlags: DWORD): BOOL; stdcall;
+{$EXTERNALSYM EnumTimeFormats}
+
+function EnumDateFormatsA(lpDateFmtEnumProc: DATEFMT_ENUMPROCA; Locale: LCID;
+ dwFlags: DWORD): BOOL; stdcall;
+{$EXTERNALSYM EnumDateFormatsA}
+function EnumDateFormatsW(lpDateFmtEnumProc: DATEFMT_ENUMPROCW; Locale: LCID;
+ dwFlags: DWORD): BOOL; stdcall;
+{$EXTERNALSYM EnumDateFormatsW}
+function EnumDateFormats(lpDateFmtEnumProc: DATEFMT_ENUMPROC; Locale: LCID;
+ dwFlags: DWORD): BOOL; stdcall;
+{$EXTERNALSYM EnumDateFormats}
+
+function EnumDateFormatsExA(lpDateFmtEnumProcEx: DATEFMT_ENUMPROCEXA;
+ Locale: LCID; dwFlags: DWORD): BOOL; stdcall;
+{$EXTERNALSYM EnumDateFormatsExA}
+function EnumDateFormatsExW(lpDateFmtEnumProcEx: DATEFMT_ENUMPROCEXW;
+ Locale: LCID; dwFlags: DWORD): BOOL; stdcall;
+{$EXTERNALSYM EnumDateFormatsExW}
+function EnumDateFormatsEx(lpDateFmtEnumProcEx: DATEFMT_ENUMPROCEX;
+ Locale: LCID; dwFlags: DWORD): BOOL; stdcall;
+{$EXTERNALSYM EnumDateFormatsEx}
+
+function IsValidLanguageGroup(LanguageGroup: LGRPID; dwFlags: DWORD): BOOL; stdcall;
+{$EXTERNALSYM IsValidLanguageGroup}
+
+function GetNLSVersion(Function_: NLS_FUNCTION; Locale: LCID; lpVersionInformation: LPNLSVERSIONINFO): BOOL; stdcall;
+{$EXTERNALSYM GetNLSVersion}
+
+function IsNLSDefinedString(Function_: NLS_FUNCTION; dwFlags: DWORD; lpVersionInformation: LPNLSVERSIONINFO;
+ lpString: LPCWSTR; cchStr: Integer): BOOL; stdcall;
+{$EXTERNALSYM IsNLSDefinedString}
+
+function IsValidLocale(Locale: LCID; dwFlags: DWORD): BOOL; stdcall;
+{$EXTERNALSYM IsValidLocale}
+
+function GetGeoInfoA(Location: GEOID; GeoType: GEOTYPE; lpGeoData: LPSTR;
+ cchData: Integer; LangId: LANGID): Integer; stdcall;
+{$EXTERNALSYM GetGeoInfoA}
+function GetGeoInfoW(Location: GEOID; GeoType: GEOTYPE; lpGeoData: LPWSTR;
+ cchData: Integer; LangId: LANGID): Integer; stdcall;
+{$EXTERNALSYM GetGeoInfoW}
+function GetGeoInfo(Location: GEOID; GeoType: GEOTYPE; lpGeoData: LPTSTR;
+ cchData: Integer; LangId: LANGID): Integer; stdcall;
+{$EXTERNALSYM GetGeoInfo}
+
+function EnumSystemGeoID(GeoClass: GEOCLASS; ParentGeoId: GEOID; lpGeoEnumProc: GEO_ENUMPROC): BOOL; stdcall;
+{$EXTERNALSYM EnumSystemGeoID}
+
+function GetUserGeoID(GeoClass: GEOCLASS): GEOID; stdcall;
+{$EXTERNALSYM GetUserGeoID}
+
+function SetUserGeoID(GeoId: GEOID): BOOL; stdcall;
+{$EXTERNALSYM SetUserGeoID}
+
+function ConvertDefaultLocale(Locale: LCID): LCID; stdcall;
+{$EXTERNALSYM ConvertDefaultLocale}
+
+function GetThreadLocale: LCID; stdcall;
+{$EXTERNALSYM GetThreadLocale}
+
+function SetThreadLocale(Locale: LCID): BOOL; stdcall;
+{$EXTERNALSYM SetThreadLocale}
+
+function GetSystemDefaultUILanguage: LANGID; stdcall;
+{$EXTERNALSYM GetSystemDefaultUILanguage}
+
+function GetUserDefaultUILanguage: LANGID; stdcall;
+{$EXTERNALSYM GetUserDefaultUILanguage}
+
+function GetSystemDefaultLangID: LANGID; stdcall;
+{$EXTERNALSYM GetSystemDefaultLangID}
+
+function GetUserDefaultLangID: LANGID; stdcall;
+{$EXTERNALSYM GetUserDefaultLangID}
+
+function GetSystemDefaultLCID: LCID; stdcall;
+{$EXTERNALSYM GetSystemDefaultLCID}
+
+function GetUserDefaultLCID: LCID; stdcall;
+{$EXTERNALSYM GetUserDefaultLCID}
+
+//
+// Locale Independent APIs.
+//
+
+function GetStringTypeExA(Locale: LCID; dwInfoType: DWORD; lpSrcStr: LPCSTR;
+ cchSrc: Integer; lpCharType: LPWORD): BOOL; stdcall;
+{$EXTERNALSYM GetStringTypeExA}
+function GetStringTypeExW(Locale: LCID; dwInfoType: DWORD; lpSrcStr: LPCWSTR;
+ cchSrc: Integer; lpCharType: LPWORD): BOOL; stdcall;
+{$EXTERNALSYM GetStringTypeExW}
+function GetStringTypeEx(Locale: LCID; dwInfoType: DWORD; lpSrcStr: LPCTSTR;
+ cchSrc: Integer; lpCharType: LPWORD): BOOL; stdcall;
+{$EXTERNALSYM GetStringTypeEx}
+
+//
+// NOTE: The parameters for GetStringTypeA and GetStringTypeW are
+// NOT the same. The W version was shipped in NT 3.1. The
+// A version was then shipped in 16-bit OLE with the wrong
+// parameters (ported from Win95). To be compatible, we
+// must break the relationship between the A and W versions
+// of GetStringType. There will be NO function call for the
+// generic GetStringType.
+//
+// GetStringTypeEx (above) should be used instead.
+//
+
+function GetStringTypeA(Locale: LCID; dwInfoType: DWORD; lpSrcStr: LPCSTR;
+ cchSrc: Integer; lpCharType: LPWORD): BOOL; stdcall;
+{$EXTERNALSYM GetStringTypeA}
+function GetStringTypeW(dwInfoType: DWORD; lpSrcStr: LPCWSTR; cchSrc: Integer;
+ lpCharType: LPWORD): BOOL; stdcall;
+{$EXTERNALSYM GetStringTypeW}
+
+function FoldStringA(dwMapFlags: DWORD; lpSrcStr: LPCSTR; cchSrc: Integer;
+ lpDestStr: LPSTR; cchDest: Integer): Integer; stdcall;
+{$EXTERNALSYM FoldStringA}
+function FoldStringW(dwMapFlags: DWORD; lpSrcStr: LPCWSTR; cchSrc: Integer;
+ lpDestStr: LPWSTR; cchDest: Integer): Integer; stdcall;
+{$EXTERNALSYM FoldStringW}
+function FoldString(dwMapFlags: DWORD; lpSrcStr: LPCTSTR; cchSrc: Integer;
+ lpDestStr: LPTSTR; cchDest: Integer): Integer; stdcall;
+{$EXTERNALSYM FoldString}
+
+function EnumSystemLanguageGroupsA(lpLanguageGroupEnumProc: LANGUAGEGROUP_ENUMPROCA;
+ dwFlags: DWORD; lParam: LONG_PTR): BOOL; stdcall;
+{$EXTERNALSYM EnumSystemLanguageGroupsA}
+function EnumSystemLanguageGroupsW(lpLanguageGroupEnumProc: LANGUAGEGROUP_ENUMPROCW;
+ dwFlags: DWORD; lParam: LONG_PTR): BOOL; stdcall;
+{$EXTERNALSYM EnumSystemLanguageGroupsW}
+function EnumSystemLanguageGroups(lpLanguageGroupEnumProc: LANGUAGEGROUP_ENUMPROC;
+ dwFlags: DWORD; lParam: LONG_PTR): BOOL; stdcall;
+{$EXTERNALSYM EnumSystemLanguageGroups}
+
+function EnumLanguageGroupLocalesA(lpLangGroupLocaleEnumProc: LANGGROUPLOCALE_ENUMPROCA;
+ LanguageGroup: LGRPID; dwFlags: DWORD; lParam: LONG_PTR): BOOL; stdcall;
+{$EXTERNALSYM EnumLanguageGroupLocalesA}
+function EnumLanguageGroupLocalesW(lpLangGroupLocaleEnumProc: LANGGROUPLOCALE_ENUMPROCW;
+ LanguageGroup: LGRPID; dwFlags: DWORD; lParam: LONG_PTR): BOOL; stdcall;
+{$EXTERNALSYM EnumLanguageGroupLocalesW}
+function EnumLanguageGroupLocales(lpLangGroupLocaleEnumProc: LANGGROUPLOCALE_ENUMPROC;
+ LanguageGroup: LGRPID; dwFlags: DWORD; lParam: LONG_PTR): BOOL; stdcall;
+{$EXTERNALSYM EnumLanguageGroupLocales}
+
+function EnumUILanguagesA(lpUILanguageEnumProc: UILANGUAGE_ENUMPROCA;
+ dwFlags: DWORD; lParam: LONG_PTR): BOOL; stdcall;
+{$EXTERNALSYM EnumUILanguagesA}
+function EnumUILanguagesW(lpUILanguageEnumProc: UILANGUAGE_ENUMPROCW;
+ dwFlags: DWORD; lParam: LONG_PTR): BOOL; stdcall;
+{$EXTERNALSYM EnumUILanguagesW}
+function EnumUILanguages(lpUILanguageEnumProc: UILANGUAGE_ENUMPROC;
+ dwFlags: DWORD; lParam: LONG_PTR): BOOL; stdcall;
+{$EXTERNALSYM EnumUILanguages}
+
+function EnumSystemLocalesA(lpLocaleEnumProc: LOCALE_ENUMPROCA;
+ dwFlags: DWORD): BOOL; stdcall;
+{$EXTERNALSYM EnumSystemLocalesA}
+function EnumSystemLocalesW(lpLocaleEnumProc: LOCALE_ENUMPROCW;
+ dwFlags: DWORD): BOOL; stdcall;
+{$EXTERNALSYM EnumSystemLocalesW}
+function EnumSystemLocales(lpLocaleEnumProc: LOCALE_ENUMPROC;
+ dwFlags: DWORD): BOOL; stdcall;
+{$EXTERNALSYM EnumSystemLocales}
+
+function EnumSystemCodePagesA(lpCodePageEnumProc: CODEPAGE_ENUMPROCA;
+ dwFlags: DWORD): BOOL; stdcall;
+{$EXTERNALSYM EnumSystemCodePagesA}
+function EnumSystemCodePagesW(lpCodePageEnumProc: CODEPAGE_ENUMPROCW;
+ dwFlags: DWORD): BOOL; stdcall;
+{$EXTERNALSYM EnumSystemCodePagesW}
+function EnumSystemCodePages(lpCodePageEnumProc: CODEPAGE_ENUMPROC;
+ dwFlags: DWORD): BOOL; stdcall;
+{$EXTERNALSYM EnumSystemCodePages}
+
+implementation
+
+const
+ kernel32 = 'kernel32.dll';
+ {$IFDEF UNICODE}
+ AWSuffix = 'W';
+ {$ELSE}
+ AWSuffix = 'A';
+ {$ENDIF UNICODE}
+
+{$IFDEF DYNAMIC_LINK}
+
+var
+ _IsValidCodePage: Pointer;
+
+function IsValidCodePage;
+begin
+ GetProcedureAddress(_IsValidCodePage, kernel32, 'IsValidCodePage');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_IsValidCodePage]
+ end;
+end;
+
+var
+ _GetACP: Pointer;
+
+function GetACP;
+begin
+ GetProcedureAddress(_GetACP, kernel32, 'GetACP');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetACP]
+ end;
+end;
+
+var
+ _GetOEMCP: Pointer;
+
+function GetOEMCP;
+begin
+ GetProcedureAddress(_GetOEMCP, kernel32, 'GetOEMCP');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetOEMCP]
+ end;
+end;
+
+var
+ _GetCPInfo: Pointer;
+
+function GetCPInfo;
+begin
+ GetProcedureAddress(_GetCPInfo, kernel32, 'GetCPInfo');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetCPInfo]
+ end;
+end;
+
+var
+ _GetCPInfoExA: Pointer;
+
+function GetCPInfoExA;
+begin
+ GetProcedureAddress(_GetCPInfoExA, kernel32, 'GetCPInfoExA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetCPInfoExA]
+ end;
+end;
+
+var
+ _GetCPInfoExW: Pointer;
+
+function GetCPInfoExW;
+begin
+ GetProcedureAddress(_GetCPInfoExW, kernel32, 'GetCPInfoExW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetCPInfoExW]
+ end;
+end;
+
+var
+ _GetCPInfoEx: Pointer;
+
+function GetCPInfoEx;
+begin
+ GetProcedureAddress(_GetCPInfoEx, kernel32, 'GetCPInfoEx' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetCPInfoEx]
+ end;
+end;
+
+var
+ _IsDBCSLeadByte: Pointer;
+
+function IsDBCSLeadByte;
+begin
+ GetProcedureAddress(_IsDBCSLeadByte, kernel32, 'IsDBCSLeadByte');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_IsDBCSLeadByte]
+ end;
+end;
+
+var
+ _IsDBCSLeadByteEx: Pointer;
+
+function IsDBCSLeadByteEx;
+begin
+ GetProcedureAddress(_IsDBCSLeadByteEx, kernel32, 'IsDBCSLeadByteEx');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_IsDBCSLeadByteEx]
+ end;
+end;
+
+var
+ _MultiByteToWideChar: Pointer;
+
+function MultiByteToWideChar;
+begin
+ GetProcedureAddress(_MultiByteToWideChar, kernel32, 'MultiByteToWideChar');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MultiByteToWideChar]
+ end;
+end;
+
+var
+ _WideCharToMultiByte: Pointer;
+
+function WideCharToMultiByte;
+begin
+ GetProcedureAddress(_WideCharToMultiByte, kernel32, 'WideCharToMultiByte');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WideCharToMultiByte]
+ end;
+end;
+
+var
+ _CompareStringA: Pointer;
+
+function CompareStringA;
+begin
+ GetProcedureAddress(_CompareStringA, kernel32, 'CompareStringA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CompareStringA]
+ end;
+end;
+
+var
+ _CompareStringW: Pointer;
+
+function CompareStringW;
+begin
+ GetProcedureAddress(_CompareStringW, kernel32, 'CompareStringW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CompareStringW]
+ end;
+end;
+
+var
+ _CompareString: Pointer;
+
+function CompareString;
+begin
+ GetProcedureAddress(_CompareString, kernel32, 'CompareString' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CompareString]
+ end;
+end;
+
+var
+ _LCMapStringA: Pointer;
+
+function LCMapStringA;
+begin
+ GetProcedureAddress(_LCMapStringA, kernel32, 'LCMapStringA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_LCMapStringA]
+ end;
+end;
+
+var
+ _LCMapStringW: Pointer;
+
+function LCMapStringW;
+begin
+ GetProcedureAddress(_LCMapStringW, kernel32, 'LCMapStringW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_LCMapStringW]
+ end;
+end;
+
+var
+ _LCMapString: Pointer;
+
+function LCMapString;
+begin
+ GetProcedureAddress(_LCMapString, kernel32, 'LCMapString' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_LCMapString]
+ end;
+end;
+
+var
+ _GetLocaleInfoA: Pointer;
+
+function GetLocaleInfoA;
+begin
+ GetProcedureAddress(_GetLocaleInfoA, kernel32, 'GetLocaleInfoA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetLocaleInfoA]
+ end;
+end;
+
+var
+ _GetLocaleInfoW: Pointer;
+
+function GetLocaleInfoW;
+begin
+ GetProcedureAddress(_GetLocaleInfoW, kernel32, 'GetLocaleInfoW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetLocaleInfoW]
+ end;
+end;
+
+var
+ _GetLocaleInfo: Pointer;
+
+function GetLocaleInfo;
+begin
+ GetProcedureAddress(_GetLocaleInfo, kernel32, 'GetLocaleInfo' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetLocaleInfo]
+ end;
+end;
+
+var
+ _SetLocaleInfoA: Pointer;
+
+function SetLocaleInfoA;
+begin
+ GetProcedureAddress(_SetLocaleInfoA, kernel32, 'SetLocaleInfoA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetLocaleInfoA]
+ end;
+end;
+
+var
+ _SetLocaleInfoW: Pointer;
+
+function SetLocaleInfoW;
+begin
+ GetProcedureAddress(_SetLocaleInfoW, kernel32, 'SetLocaleInfoW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetLocaleInfoW]
+ end;
+end;
+
+var
+ _SetLocaleInfo: Pointer;
+
+function SetLocaleInfo;
+begin
+ GetProcedureAddress(_SetLocaleInfo, kernel32, 'SetLocaleInfo' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetLocaleInfo]
+ end;
+end;
+
+var
+ _GetCalendarInfoA: Pointer;
+
+function GetCalendarInfoA;
+begin
+ GetProcedureAddress(_GetCalendarInfoA, kernel32, 'GetCalendarInfoA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetCalendarInfoA]
+ end;
+end;
+
+var
+ _GetCalendarInfoW: Pointer;
+
+function GetCalendarInfoW;
+begin
+ GetProcedureAddress(_GetCalendarInfoW, kernel32, 'GetCalendarInfoW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetCalendarInfoW]
+ end;
+end;
+
+var
+ _GetCalendarInfo: Pointer;
+
+function GetCalendarInfo;
+begin
+ GetProcedureAddress(_GetCalendarInfo, kernel32, 'GetCalendarInfo' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetCalendarInfo]
+ end;
+end;
+
+var
+ _SetCalendarInfoA: Pointer;
+
+function SetCalendarInfoA;
+begin
+ GetProcedureAddress(_SetCalendarInfoA, kernel32, 'SetCalendarInfoA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetCalendarInfoA]
+ end;
+end;
+
+var
+ _SetCalendarInfoW: Pointer;
+
+function SetCalendarInfoW;
+begin
+ GetProcedureAddress(_SetCalendarInfoW, kernel32, 'SetCalendarInfoW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetCalendarInfoW]
+ end;
+end;
+
+var
+ _SetCalendarInfo: Pointer;
+
+function SetCalendarInfo;
+begin
+ GetProcedureAddress(_SetCalendarInfo, kernel32, 'SetCalendarInfo' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetCalendarInfo]
+ end;
+end;
+
+var
+ _GetTimeFormatA: Pointer;
+
+function GetTimeFormatA;
+begin
+ GetProcedureAddress(_GetTimeFormatA, kernel32, 'GetTimeFormatA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetTimeFormatA]
+ end;
+end;
+
+var
+ _GetTimeFormatW: Pointer;
+
+function GetTimeFormatW;
+begin
+ GetProcedureAddress(_GetTimeFormatW, kernel32, 'GetTimeFormatW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetTimeFormatW]
+ end;
+end;
+
+var
+ _GetTimeFormat: Pointer;
+
+function GetTimeFormat;
+begin
+ GetProcedureAddress(_GetTimeFormat, kernel32, 'GetTimeFormat' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetTimeFormat]
+ end;
+end;
+
+var
+ _GetDateFormatA: Pointer;
+
+function GetDateFormatA;
+begin
+ GetProcedureAddress(_GetDateFormatA, kernel32, 'GetDateFormatA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetDateFormatA]
+ end;
+end;
+
+var
+ _GetDateFormatW: Pointer;
+
+function GetDateFormatW;
+begin
+ GetProcedureAddress(_GetDateFormatW, kernel32, 'GetDateFormatW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetDateFormatW]
+ end;
+end;
+
+var
+ _GetDateFormat: Pointer;
+
+function GetDateFormat;
+begin
+ GetProcedureAddress(_GetDateFormat, kernel32, 'GetDateFormat' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetDateFormat]
+ end;
+end;
+
+var
+ _GetNumberFormatA: Pointer;
+
+function GetNumberFormatA;
+begin
+ GetProcedureAddress(_GetNumberFormatA, kernel32, 'GetNumberFormatA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetNumberFormatA]
+ end;
+end;
+
+var
+ _GetNumberFormatW: Pointer;
+
+function GetNumberFormatW;
+begin
+ GetProcedureAddress(_GetNumberFormatW, kernel32, 'GetNumberFormatW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetNumberFormatW]
+ end;
+end;
+
+var
+ _GetNumberFormat: Pointer;
+
+function GetNumberFormat;
+begin
+ GetProcedureAddress(_GetNumberFormat, kernel32, 'GetNumberFormat' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetNumberFormat]
+ end;
+end;
+
+var
+ _GetCurrencyFormatA: Pointer;
+
+function GetCurrencyFormatA;
+begin
+ GetProcedureAddress(_GetCurrencyFormatA, kernel32, 'GetCurrencyFormatA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetCurrencyFormatA]
+ end;
+end;
+
+var
+ _GetCurrencyFormatW: Pointer;
+
+function GetCurrencyFormatW;
+begin
+ GetProcedureAddress(_GetCurrencyFormatW, kernel32, 'GetCurrencyFormatW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetCurrencyFormatW]
+ end;
+end;
+
+var
+ _GetCurrencyFormat: Pointer;
+
+function GetCurrencyFormat;
+begin
+ GetProcedureAddress(_GetCurrencyFormat, kernel32, 'GetCurrencyFormat' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetCurrencyFormat]
+ end;
+end;
+
+var
+ _EnumCalendarInfoA: Pointer;
+
+function EnumCalendarInfoA;
+begin
+ GetProcedureAddress(_EnumCalendarInfoA, kernel32, 'EnumCalendarInfoA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_EnumCalendarInfoA]
+ end;
+end;
+
+var
+ _EnumCalendarInfoW: Pointer;
+
+function EnumCalendarInfoW;
+begin
+ GetProcedureAddress(_EnumCalendarInfoW, kernel32, 'EnumCalendarInfoW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_EnumCalendarInfoW]
+ end;
+end;
+
+var
+ _EnumCalendarInfo: Pointer;
+
+function EnumCalendarInfo;
+begin
+ GetProcedureAddress(_EnumCalendarInfo, kernel32, 'EnumCalendarInfo' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_EnumCalendarInfo]
+ end;
+end;
+
+var
+ _EnumCalendarInfoExA: Pointer;
+
+function EnumCalendarInfoExA;
+begin
+ GetProcedureAddress(_EnumCalendarInfoExA, kernel32, 'EnumCalendarInfoExA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_EnumCalendarInfoExA]
+ end;
+end;
+
+var
+ _EnumCalendarInfoExW: Pointer;
+
+function EnumCalendarInfoExW;
+begin
+ GetProcedureAddress(_EnumCalendarInfoExW, kernel32, 'EnumCalendarInfoExW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_EnumCalendarInfoExW]
+ end;
+end;
+
+var
+ _EnumCalendarInfoEx: Pointer;
+
+function EnumCalendarInfoEx;
+begin
+ GetProcedureAddress(_EnumCalendarInfoEx, kernel32, 'EnumCalendarInfoEx' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_EnumCalendarInfoEx]
+ end;
+end;
+
+var
+ _EnumTimeFormatsA: Pointer;
+
+function EnumTimeFormatsA;
+begin
+ GetProcedureAddress(_EnumTimeFormatsA, kernel32, 'EnumTimeFormatsA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_EnumTimeFormatsA]
+ end;
+end;
+
+var
+ _EnumTimeFormatsW: Pointer;
+
+function EnumTimeFormatsW;
+begin
+ GetProcedureAddress(_EnumTimeFormatsW, kernel32, 'EnumTimeFormatsW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_EnumTimeFormatsW]
+ end;
+end;
+
+var
+ _EnumTimeFormats: Pointer;
+
+function EnumTimeFormats;
+begin
+ GetProcedureAddress(_EnumTimeFormats, kernel32, 'EnumTimeFormats' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_EnumTimeFormats]
+ end;
+end;
+
+var
+ _EnumDateFormatsA: Pointer;
+
+function EnumDateFormatsA;
+begin
+ GetProcedureAddress(_EnumDateFormatsA, kernel32, 'EnumDateFormatsA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_EnumDateFormatsA]
+ end;
+end;
+
+var
+ _EnumDateFormatsW: Pointer;
+
+function EnumDateFormatsW;
+begin
+ GetProcedureAddress(_EnumDateFormatsW, kernel32, 'EnumDateFormatsW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_EnumDateFormatsW]
+ end;
+end;
+
+var
+ _EnumDateFormats: Pointer;
+
+function EnumDateFormats;
+begin
+ GetProcedureAddress(_EnumDateFormats, kernel32, 'EnumDateFormats' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_EnumDateFormats]
+ end;
+end;
+
+var
+ _EnumDateFormatsExA: Pointer;
+
+function EnumDateFormatsExA;
+begin
+ GetProcedureAddress(_EnumDateFormatsExA, kernel32, 'EnumDateFormatsExA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_EnumDateFormatsExA]
+ end;
+end;
+
+var
+ _EnumDateFormatsExW: Pointer;
+
+function EnumDateFormatsExW;
+begin
+ GetProcedureAddress(_EnumDateFormatsExW, kernel32, 'EnumDateFormatsExW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_EnumDateFormatsExW]
+ end;
+end;
+
+var
+ _EnumDateFormatsEx: Pointer;
+
+function EnumDateFormatsEx;
+begin
+ GetProcedureAddress(_EnumDateFormatsEx, kernel32, 'EnumDateFormatsEx' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_EnumDateFormatsEx]
+ end;
+end;
+
+var
+ _IsValidLanguageGroup: Pointer;
+
+function IsValidLanguageGroup;
+begin
+ GetProcedureAddress(_IsValidLanguageGroup, kernel32, 'IsValidLanguageGroup');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_IsValidLanguageGroup]
+ end;
+end;
+
+var
+ _GetNLSVersion: Pointer;
+
+function GetNLSVersion;
+begin
+ GetProcedureAddress(_GetNLSVersion, kernel32, 'GetNLSVersion');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetNLSVersion]
+ end;
+end;
+
+var
+ _IsNLSDefinedString: Pointer;
+
+function IsNLSDefinedString;
+begin
+ GetProcedureAddress(_IsNLSDefinedString, kernel32, 'IsNLSDefinedString');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_IsNLSDefinedString]
+ end;
+end;
+
+var
+ _IsValidLocale: Pointer;
+
+function IsValidLocale;
+begin
+ GetProcedureAddress(_IsValidLocale, kernel32, 'IsValidLocale');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_IsValidLocale]
+ end;
+end;
+
+var
+ _GetGeoInfoA: Pointer;
+
+function GetGeoInfoA;
+begin
+ GetProcedureAddress(_GetGeoInfoA, kernel32, 'GetGeoInfoA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetGeoInfoA]
+ end;
+end;
+
+var
+ _GetGeoInfoW: Pointer;
+
+function GetGeoInfoW;
+begin
+ GetProcedureAddress(_GetGeoInfoW, kernel32, 'GetGeoInfoW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetGeoInfoW]
+ end;
+end;
+
+var
+ _GetGeoInfo: Pointer;
+
+function GetGeoInfo;
+begin
+ GetProcedureAddress(_GetGeoInfo, kernel32, 'GetGeoInfo');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetGeoInfo]
+ end;
+end;
+
+var
+ _EnumSystemGeoID: Pointer;
+
+function EnumSystemGeoID;
+begin
+ GetProcedureAddress(_EnumSystemGeoID, kernel32, 'EnumSystemGeoID');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_EnumSystemGeoID]
+ end;
+end;
+
+var
+ _GetUserGeoID: Pointer;
+
+function GetUserGeoID;
+begin
+ GetProcedureAddress(_GetUserGeoID, kernel32, 'GetUserGeoID');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetUserGeoID]
+ end;
+end;
+
+var
+ _SetUserGeoID: Pointer;
+
+function SetUserGeoID;
+begin
+ GetProcedureAddress(_SetUserGeoID, kernel32, 'SetUserGeoID');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetUserGeoID]
+ end;
+end;
+
+var
+ _ConvertDefaultLocale: Pointer;
+
+function ConvertDefaultLocale;
+begin
+ GetProcedureAddress(_ConvertDefaultLocale, kernel32, 'ConvertDefaultLocale');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ConvertDefaultLocale]
+ end;
+end;
+
+var
+ _GetThreadLocale: Pointer;
+
+function GetThreadLocale;
+begin
+ GetProcedureAddress(_GetThreadLocale, kernel32, 'GetThreadLocale');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetThreadLocale]
+ end;
+end;
+
+var
+ _SetThreadLocale: Pointer;
+
+function SetThreadLocale;
+begin
+ GetProcedureAddress(_SetThreadLocale, kernel32, 'SetThreadLocale');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetThreadLocale]
+ end;
+end;
+
+var
+ _GetSystemDefaultUILanguage: Pointer;
+
+function GetSystemDefaultUILanguage;
+begin
+ GetProcedureAddress(_GetSystemDefaultUILanguage, kernel32, 'GetSystemDefaultUILanguage');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetSystemDefaultUILanguage]
+ end;
+end;
+
+var
+ _GetUserDefaultUILanguage: Pointer;
+
+function GetUserDefaultUILanguage;
+begin
+ GetProcedureAddress(_GetUserDefaultUILanguage, kernel32, 'GetUserDefaultUILanguage');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetUserDefaultUILanguage]
+ end;
+end;
+
+var
+ _GetSystemDefaultLangID: Pointer;
+
+function GetSystemDefaultLangID;
+begin
+ GetProcedureAddress(_GetSystemDefaultLangID, kernel32, 'GetSystemDefaultLangID');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetSystemDefaultLangID]
+ end;
+end;
+
+var
+ _GetUserDefaultLangID: Pointer;
+
+function GetUserDefaultLangID;
+begin
+ GetProcedureAddress(_GetUserDefaultLangID, kernel32, 'GetUserDefaultLangID');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetUserDefaultLangID]
+ end;
+end;
+
+var
+ _GetSystemDefaultLCID: Pointer;
+
+function GetSystemDefaultLCID;
+begin
+ GetProcedureAddress(_GetSystemDefaultLCID, kernel32, 'GetSystemDefaultLCID');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetSystemDefaultLCID]
+ end;
+end;
+
+var
+ _GetUserDefaultLCID: Pointer;
+
+function GetUserDefaultLCID;
+begin
+ GetProcedureAddress(_GetUserDefaultLCID, kernel32, 'GetUserDefaultLCID');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetUserDefaultLCID]
+ end;
+end;
+
+var
+ _GetStringTypeExA: Pointer;
+
+function GetStringTypeExA;
+begin
+ GetProcedureAddress(_GetStringTypeExA, kernel32, 'GetStringTypeExA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetStringTypeExA]
+ end;
+end;
+
+var
+ _GetStringTypeExW: Pointer;
+
+function GetStringTypeExW;
+begin
+ GetProcedureAddress(_GetStringTypeExW, kernel32, 'GetStringTypeExW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetStringTypeExW]
+ end;
+end;
+
+var
+ _GetStringTypeEx: Pointer;
+
+function GetStringTypeEx;
+begin
+ GetProcedureAddress(_GetStringTypeEx, kernel32, 'GetStringTypeEx' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetStringTypeEx]
+ end;
+end;
+
+var
+ _GetStringTypeA: Pointer;
+
+function GetStringTypeA;
+begin
+ GetProcedureAddress(_GetStringTypeA, kernel32, 'GetStringTypeA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetStringTypeA]
+ end;
+end;
+
+var
+ _GetStringTypeW: Pointer;
+
+function GetStringTypeW;
+begin
+ GetProcedureAddress(_GetStringTypeW, kernel32, 'GetStringTypeW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetStringTypeW]
+ end;
+end;
+
+var
+ _FoldStringA: Pointer;
+
+function FoldStringA;
+begin
+ GetProcedureAddress(_FoldStringA, kernel32, 'FoldStringA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_FoldStringA]
+ end;
+end;
+
+var
+ _FoldStringW: Pointer;
+
+function FoldStringW;
+begin
+ GetProcedureAddress(_FoldStringW, kernel32, 'FoldStringW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_FoldStringW]
+ end;
+end;
+
+var
+ _FoldString: Pointer;
+
+function FoldString;
+begin
+ GetProcedureAddress(_FoldString, kernel32, 'FoldString' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_FoldString]
+ end;
+end;
+
+var
+ _EnumSystemLanguageGroupsA: Pointer;
+
+function EnumSystemLanguageGroupsA;
+begin
+ GetProcedureAddress(_EnumSystemLanguageGroupsA, kernel32, 'EnumSystemLanguageGroupsA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_EnumSystemLanguageGroupsA]
+ end;
+end;
+
+var
+ _EnumSystemLanguageGroupsW: Pointer;
+
+function EnumSystemLanguageGroupsW;
+begin
+ GetProcedureAddress(_EnumSystemLanguageGroupsW, kernel32, 'EnumSystemLanguageGroupsW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_EnumSystemLanguageGroupsW]
+ end;
+end;
+
+var
+ _EnumSystemLanguageGroups: Pointer;
+
+function EnumSystemLanguageGroups;
+begin
+ GetProcedureAddress(_EnumSystemLanguageGroups, kernel32, 'EnumSystemLanguageGroups' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_EnumSystemLanguageGroups]
+ end;
+end;
+
+var
+ _EnumLanguageGroupLocalesA: Pointer;
+
+function EnumLanguageGroupLocalesA;
+begin
+ GetProcedureAddress(_EnumLanguageGroupLocalesA, kernel32, 'EnumLanguageGroupLocalesA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_EnumLanguageGroupLocalesA]
+ end;
+end;
+
+var
+ _EnumLanguageGroupLocalesW: Pointer;
+
+function EnumLanguageGroupLocalesW;
+begin
+ GetProcedureAddress(_EnumLanguageGroupLocalesW, kernel32, 'EnumLanguageGroupLocalesW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_EnumLanguageGroupLocalesW]
+ end;
+end;
+
+var
+ _EnumLanguageGroupLocales: Pointer;
+
+function EnumLanguageGroupLocales;
+begin
+ GetProcedureAddress(_EnumLanguageGroupLocales, kernel32, 'EnumLanguageGroupLocales' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_EnumLanguageGroupLocales]
+ end;
+end;
+
+var
+ _EnumUILanguagesA: Pointer;
+
+function EnumUILanguagesA;
+begin
+ GetProcedureAddress(_EnumUILanguagesA, kernel32, 'EnumUILanguagesA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_EnumUILanguagesA]
+ end;
+end;
+
+var
+ _EnumUILanguagesW: Pointer;
+
+function EnumUILanguagesW;
+begin
+ GetProcedureAddress(_EnumUILanguagesW, kernel32, 'EnumUILanguagesW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_EnumUILanguagesW]
+ end;
+end;
+
+var
+ _EnumUILanguages: Pointer;
+
+function EnumUILanguages;
+begin
+ GetProcedureAddress(_EnumUILanguages, kernel32, 'EnumUILanguages' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_EnumUILanguages]
+ end;
+end;
+
+var
+ _EnumSystemLocalesA: Pointer;
+
+function EnumSystemLocalesA;
+begin
+ GetProcedureAddress(_EnumSystemLocalesA, kernel32, 'EnumSystemLocalesA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_EnumSystemLocalesA]
+ end;
+end;
+
+var
+ _EnumSystemLocalesW: Pointer;
+
+function EnumSystemLocalesW;
+begin
+ GetProcedureAddress(_EnumSystemLocalesW, kernel32, 'EnumSystemLocalesW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_EnumSystemLocalesW]
+ end;
+end;
+
+var
+ _EnumSystemLocales: Pointer;
+
+function EnumSystemLocales;
+begin
+ GetProcedureAddress(_EnumSystemLocales, kernel32, 'EnumSystemLocales' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_EnumSystemLocales]
+ end;
+end;
+
+var
+ _EnumSystemCodePagesA: Pointer;
+
+function EnumSystemCodePagesA;
+begin
+ GetProcedureAddress(_EnumSystemCodePagesA, kernel32, 'EnumSystemCodePagesA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_EnumSystemCodePagesA]
+ end;
+end;
+
+var
+ _EnumSystemCodePagesW: Pointer;
+
+function EnumSystemCodePagesW;
+begin
+ GetProcedureAddress(_EnumSystemCodePagesW, kernel32, 'EnumSystemCodePagesW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_EnumSystemCodePagesW]
+ end;
+end;
+
+var
+ _EnumSystemCodePages: Pointer;
+
+function EnumSystemCodePages;
+begin
+ GetProcedureAddress(_EnumSystemCodePages, kernel32, 'EnumSystemCodePages' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_EnumSystemCodePages]
+ end;
+end;
+
+{$ELSE}
+
+function IsValidCodePage; external kernel32 name 'IsValidCodePage';
+function GetACP; external kernel32 name 'GetACP';
+function GetOEMCP; external kernel32 name 'GetOEMCP';
+function GetCPInfo; external kernel32 name 'GetCPInfo';
+function GetCPInfoExA; external kernel32 name 'GetCPInfoExA';
+function GetCPInfoExW; external kernel32 name 'GetCPInfoExW';
+function GetCPInfoEx; external kernel32 name 'GetCPInfoEx' + AWSuffix;
+function IsDBCSLeadByte; external kernel32 name 'IsDBCSLeadByte';
+function IsDBCSLeadByteEx; external kernel32 name 'IsDBCSLeadByteEx';
+function MultiByteToWideChar; external kernel32 name 'MultiByteToWideChar';
+function WideCharToMultiByte; external kernel32 name 'WideCharToMultiByte';
+function CompareStringA; external kernel32 name 'CompareStringA';
+function CompareStringW; external kernel32 name 'CompareStringW';
+function CompareString; external kernel32 name 'CompareString' + AWSuffix;
+function LCMapStringA; external kernel32 name 'LCMapStringA';
+function LCMapStringW; external kernel32 name 'LCMapStringW';
+function LCMapString; external kernel32 name 'LCMapString' + AWSuffix;
+function GetLocaleInfoA; external kernel32 name 'GetLocaleInfoA';
+function GetLocaleInfoW; external kernel32 name 'GetLocaleInfoW';
+function GetLocaleInfo; external kernel32 name 'GetLocaleInfo' + AWSuffix;
+function SetLocaleInfoA; external kernel32 name 'SetLocaleInfoA';
+function SetLocaleInfoW; external kernel32 name 'SetLocaleInfoW';
+function SetLocaleInfo; external kernel32 name 'SetLocaleInfo' + AWSuffix;
+function GetCalendarInfoA; external kernel32 name 'GetCalendarInfoA';
+function GetCalendarInfoW; external kernel32 name 'GetCalendarInfoW';
+function GetCalendarInfo; external kernel32 name 'GetCalendarInfo' + AWSuffix;
+function SetCalendarInfoA; external kernel32 name 'SetCalendarInfoA';
+function SetCalendarInfoW; external kernel32 name 'SetCalendarInfoW';
+function SetCalendarInfo; external kernel32 name 'SetCalendarInfo' + AWSuffix;
+function GetTimeFormatA; external kernel32 name 'GetTimeFormatA';
+function GetTimeFormatW; external kernel32 name 'GetTimeFormatW';
+function GetTimeFormat; external kernel32 name 'GetTimeFormat' + AWSuffix;
+function GetDateFormatA; external kernel32 name 'GetDateFormatA';
+function GetDateFormatW; external kernel32 name 'GetDateFormatW';
+function GetDateFormat; external kernel32 name 'GetDateFormat' + AWSuffix;
+function GetNumberFormatA; external kernel32 name 'GetNumberFormatA';
+function GetNumberFormatW; external kernel32 name 'GetNumberFormatW';
+function GetNumberFormat; external kernel32 name 'GetNumberFormat' + AWSuffix;
+function GetCurrencyFormatA; external kernel32 name 'GetCurrencyFormatA';
+function GetCurrencyFormatW; external kernel32 name 'GetCurrencyFormatW';
+function GetCurrencyFormat; external kernel32 name 'GetCurrencyFormat' + AWSuffix;
+function EnumCalendarInfoA; external kernel32 name 'EnumCalendarInfoA';
+function EnumCalendarInfoW; external kernel32 name 'EnumCalendarInfoW';
+function EnumCalendarInfo; external kernel32 name 'EnumCalendarInfo' + AWSuffix;
+function EnumCalendarInfoExA; external kernel32 name 'EnumCalendarInfoExA';
+function EnumCalendarInfoExW; external kernel32 name 'EnumCalendarInfoExW';
+function EnumCalendarInfoEx; external kernel32 name 'EnumCalendarInfoEx' + AWSuffix;
+function EnumTimeFormatsA; external kernel32 name 'EnumTimeFormatsA';
+function EnumTimeFormatsW; external kernel32 name 'EnumTimeFormatsW';
+function EnumTimeFormats; external kernel32 name 'EnumTimeFormats' + AWSuffix;
+function EnumDateFormatsA; external kernel32 name 'EnumDateFormatsA';
+function EnumDateFormatsW; external kernel32 name 'EnumDateFormatsW';
+function EnumDateFormats; external kernel32 name 'EnumDateFormats' + AWSuffix;
+function EnumDateFormatsExA; external kernel32 name 'EnumDateFormatsExA';
+function EnumDateFormatsExW; external kernel32 name 'EnumDateFormatsExW';
+function EnumDateFormatsEx; external kernel32 name 'EnumDateFormatsEx' + AWSuffix;
+function IsValidLanguageGroup; external kernel32 name 'IsValidLanguageGroup';
+function GetNLSVersion; external kernel32 name 'GetNLSVersion';
+function IsNLSDefinedString; external kernel32 name 'IsNLSDefinedString';
+function IsValidLocale; external kernel32 name 'IsValidLocale';
+function GetGeoInfoA; external kernel32 name 'GetGeoInfoA';
+function GetGeoInfoW; external kernel32 name 'GetGeoInfoW';
+function GetGeoInfo; external kernel32 name 'GetGeoInfo';
+function EnumSystemGeoID; external kernel32 name 'EnumSystemGeoID';
+function GetUserGeoID; external kernel32 name 'GetUserGeoID';
+function SetUserGeoID; external kernel32 name 'SetUserGeoID';
+function ConvertDefaultLocale; external kernel32 name 'ConvertDefaultLocale';
+function GetThreadLocale; external kernel32 name 'GetThreadLocale';
+function SetThreadLocale; external kernel32 name 'SetThreadLocale';
+function GetSystemDefaultUILanguage; external kernel32 name 'GetSystemDefaultUILanguage';
+function GetUserDefaultUILanguage; external kernel32 name 'GetUserDefaultUILanguage';
+function GetSystemDefaultLangID; external kernel32 name 'GetSystemDefaultLangID';
+function GetUserDefaultLangID; external kernel32 name 'GetUserDefaultLangID';
+function GetSystemDefaultLCID; external kernel32 name 'GetSystemDefaultLCID';
+function GetUserDefaultLCID; external kernel32 name 'GetUserDefaultLCID';
+function GetStringTypeExA; external kernel32 name 'GetStringTypeExA';
+function GetStringTypeExW; external kernel32 name 'GetStringTypeExW';
+function GetStringTypeEx; external kernel32 name 'GetStringTypeEx' + AWSuffix;
+function GetStringTypeA; external kernel32 name 'GetStringTypeA';
+function GetStringTypeW; external kernel32 name 'GetStringTypeW';
+function FoldStringA; external kernel32 name 'FoldStringA';
+function FoldStringW; external kernel32 name 'FoldStringW';
+function FoldString; external kernel32 name 'FoldString' + AWSuffix;
+function EnumSystemLanguageGroupsA; external kernel32 name 'EnumSystemLanguageGroupsA';
+function EnumSystemLanguageGroupsW; external kernel32 name 'EnumSystemLanguageGroupsW';
+function EnumSystemLanguageGroups; external kernel32 name 'EnumSystemLanguageGroups' + AWSuffix;
+function EnumLanguageGroupLocalesA; external kernel32 name 'EnumLanguageGroupLocalesA';
+function EnumLanguageGroupLocalesW; external kernel32 name 'EnumLanguageGroupLocalesW';
+function EnumLanguageGroupLocales; external kernel32 name 'EnumLanguageGroupLocales' + AWSuffix;
+function EnumUILanguagesA; external kernel32 name 'EnumUILanguagesA';
+function EnumUILanguagesW; external kernel32 name 'EnumUILanguagesW';
+function EnumUILanguages; external kernel32 name 'EnumUILanguages' + AWSuffix;
+function EnumSystemLocalesA; external kernel32 name 'EnumSystemLocalesA';
+function EnumSystemLocalesW; external kernel32 name 'EnumSystemLocalesW';
+function EnumSystemLocales; external kernel32 name 'EnumSystemLocales' + AWSuffix;
+function EnumSystemCodePagesA; external kernel32 name 'EnumSystemCodePagesA';
+function EnumSystemCodePagesW; external kernel32 name 'EnumSystemCodePagesW';
+function EnumSystemCodePages; external kernel32 name 'EnumSystemCodePages' + AWSuffix;
+
+{$ENDIF DYNAMIC_LINK}
+
+end.
diff --git a/packages/extra/winunits/jwawinnt.pas b/packages/extra/winunits/jwawinnt.pas
index 2b28488532..b3e70f6883 100644
--- a/packages/extra/winunits/jwawinnt.pas
+++ b/packages/extra/winunits/jwawinnt.pas
@@ -1,9306 +1,9306 @@
-{******************************************************************************}
-{ }
-{ Windows Types API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: winnt.h, released August 2001. The original Pascal }
-{ code is: WinNT.pas, released December 2000. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwawinnt.pas,v 1.1 2005/04/04 07:56:11 marco Exp $
-
-unit JwaWinNT;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "winnt.h"'}
-{$HPPEMIT ''}
-{$HPPEMIT 'typedef PACL *PPACL'}
-{$HPPEMIT 'typedef PSID *PPSID'}
-{$HPPEMIT 'typedef PSECURITY_DESCRIPTOR *PPSECURITY_DESCRIPTOR'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaWinType;
-
-const
- MAXBYTE = BYTE($ff);
- {$EXTERNALSYM MAXBYTE}
- MAXWORD = WORD($ffff);
- {$EXTERNALSYM MAXWORD}
- MAXDWORD = DWORD($ffffffff);
- {$EXTERNALSYM MAXDWORD}
-
-const
- VER_SERVER_NT = DWORD($80000000);
- {$EXTERNALSYM VER_SERVER_NT}
- VER_WORKSTATION_NT = $40000000;
- {$EXTERNALSYM VER_WORKSTATION_NT}
- VER_SUITE_SMALLBUSINESS = $00000001;
- {$EXTERNALSYM VER_SUITE_SMALLBUSINESS}
- VER_SUITE_ENTERPRISE = $00000002;
- {$EXTERNALSYM VER_SUITE_ENTERPRISE}
- VER_SUITE_BACKOFFICE = $00000004;
- {$EXTERNALSYM VER_SUITE_BACKOFFICE}
- VER_SUITE_COMMUNICATIONS = $00000008;
- {$EXTERNALSYM VER_SUITE_COMMUNICATIONS}
- VER_SUITE_TERMINAL = $00000010;
- {$EXTERNALSYM VER_SUITE_TERMINAL}
- VER_SUITE_SMALLBUSINESS_RESTRICTED = $00000020;
- {$EXTERNALSYM VER_SUITE_SMALLBUSINESS_RESTRICTED}
- VER_SUITE_EMBEDDEDNT = $00000040;
- {$EXTERNALSYM VER_SUITE_EMBEDDEDNT}
- VER_SUITE_DATACENTER = $00000080;
- {$EXTERNALSYM VER_SUITE_DATACENTER}
- VER_SUITE_SINGLEUSERTS = $00000100;
- {$EXTERNALSYM VER_SUITE_SINGLEUSERTS}
- VER_SUITE_PERSONAL = $00000200;
- {$EXTERNALSYM VER_SUITE_PERSONAL}
- VER_SUITE_BLADE = $00000400;
- {$EXTERNALSYM VER_SUITE_BLADE}
- VER_SUITE_EMBEDDED_RESTRICTED = $00000800;
- {$EXTERNALSYM VER_SUITE_EMBEDDED_RESTRICTED}
- VER_SUITE_SECURITY_APPLIANCE = $00001000;
- {$EXTERNALSYM VER_SUITE_SECURITY_APPLIANCE}
-
-//
-// Language IDs.
-//
-// The following two combinations of primary language ID and
-// sublanguage ID have special semantics:
-//
-// Primary Language ID Sublanguage ID Result
-// ------------------- --------------- ------------------------
-// LANG_NEUTRAL SUBLANG_NEUTRAL Language neutral
-// LANG_NEUTRAL SUBLANG_DEFAULT User default language
-// LANG_NEUTRAL SUBLANG_SYS_DEFAULT System default language
-// LANG_INVARIANT SUBLANG_NEUTRAL Invariant locale
-//
-
-//
-// Primary language IDs.
-//
-
-const
- LANG_NEUTRAL = $00;
- {$EXTERNALSYM LANG_NEUTRAL}
- LANG_INVARIANT = $7f;
- {$EXTERNALSYM LANG_INVARIANT}
-
- LANG_AFRIKAANS = $36;
- {$EXTERNALSYM LANG_AFRIKAANS}
- LANG_ALBANIAN = $1c;
- {$EXTERNALSYM LANG_ALBANIAN}
- LANG_ARABIC = $01;
- {$EXTERNALSYM LANG_ARABIC}
- LANG_ARMENIAN = $2b;
- {$EXTERNALSYM LANG_ARMENIAN}
- LANG_ASSAMESE = $4d;
- {$EXTERNALSYM LANG_ASSAMESE}
- LANG_AZERI = $2c;
- {$EXTERNALSYM LANG_AZERI}
- LANG_BASQUE = $2d;
- {$EXTERNALSYM LANG_BASQUE}
- LANG_BELARUSIAN = $23;
- {$EXTERNALSYM LANG_BELARUSIAN}
- LANG_BENGALI = $45;
- {$EXTERNALSYM LANG_BENGALI}
- LANG_BULGARIAN = $02;
- {$EXTERNALSYM LANG_BULGARIAN}
- LANG_CATALAN = $03;
- {$EXTERNALSYM LANG_CATALAN}
- LANG_CHINESE = $04;
- {$EXTERNALSYM LANG_CHINESE}
- LANG_CROATIAN = $1a;
- {$EXTERNALSYM LANG_CROATIAN}
- LANG_CZECH = $05;
- {$EXTERNALSYM LANG_CZECH}
- LANG_DANISH = $06;
- {$EXTERNALSYM LANG_DANISH}
- LANG_DIVEHI = $65;
- {$EXTERNALSYM LANG_DIVEHI}
- LANG_DUTCH = $13;
- {$EXTERNALSYM LANG_DUTCH}
- LANG_ENGLISH = $09;
- {$EXTERNALSYM LANG_ENGLISH}
- LANG_ESTONIAN = $25;
- {$EXTERNALSYM LANG_ESTONIAN}
- LANG_FAEROESE = $38;
- {$EXTERNALSYM LANG_FAEROESE}
- LANG_FARSI = $29;
- {$EXTERNALSYM LANG_FARSI}
- LANG_FINNISH = $0b;
- {$EXTERNALSYM LANG_FINNISH}
- LANG_FRENCH = $0c;
- {$EXTERNALSYM LANG_FRENCH}
- LANG_GALICIAN = $56;
- {$EXTERNALSYM LANG_GALICIAN}
- LANG_GEORGIAN = $37;
- {$EXTERNALSYM LANG_GEORGIAN}
- LANG_GERMAN = $07;
- {$EXTERNALSYM LANG_GERMAN}
- LANG_GREEK = $08;
- {$EXTERNALSYM LANG_GREEK}
- LANG_GUJARATI = $47;
- {$EXTERNALSYM LANG_GUJARATI}
- LANG_HEBREW = $0d;
- {$EXTERNALSYM LANG_HEBREW}
- LANG_HINDI = $39;
- {$EXTERNALSYM LANG_HINDI}
- LANG_HUNGARIAN = $0e;
- {$EXTERNALSYM LANG_HUNGARIAN}
- LANG_ICELANDIC = $0f;
- {$EXTERNALSYM LANG_ICELANDIC}
- LANG_INDONESIAN = $21;
- {$EXTERNALSYM LANG_INDONESIAN}
- LANG_ITALIAN = $10;
- {$EXTERNALSYM LANG_ITALIAN}
- LANG_JAPANESE = $11;
- {$EXTERNALSYM LANG_JAPANESE}
- LANG_KANNADA = $4b;
- {$EXTERNALSYM LANG_KANNADA}
- LANG_KASHMIRI = $60;
- {$EXTERNALSYM LANG_KASHMIRI}
- LANG_KAZAK = $3f;
- {$EXTERNALSYM LANG_KAZAK}
- LANG_KONKANI = $57;
- {$EXTERNALSYM LANG_KONKANI}
- LANG_KOREAN = $12;
- {$EXTERNALSYM LANG_KOREAN}
- LANG_KYRGYZ = $40;
- {$EXTERNALSYM LANG_KYRGYZ}
- LANG_LATVIAN = $26;
- {$EXTERNALSYM LANG_LATVIAN}
- LANG_LITHUANIAN = $27;
- {$EXTERNALSYM LANG_LITHUANIAN}
- LANG_MACEDONIAN = $2f; // the Former Yugoslav Republic of Macedonia
- {$EXTERNALSYM LANG_MACEDONIAN}
- LANG_MALAY = $3e;
- {$EXTERNALSYM LANG_MALAY}
- LANG_MALAYALAM = $4c;
- {$EXTERNALSYM LANG_MALAYALAM}
- LANG_MANIPURI = $58;
- {$EXTERNALSYM LANG_MANIPURI}
- LANG_MARATHI = $4e;
- {$EXTERNALSYM LANG_MARATHI}
- LANG_MONGOLIAN = $50;
- {$EXTERNALSYM LANG_MONGOLIAN}
- LANG_NEPALI = $61;
- {$EXTERNALSYM LANG_NEPALI}
- LANG_NORWEGIAN = $14;
- {$EXTERNALSYM LANG_NORWEGIAN}
- LANG_ORIYA = $48;
- {$EXTERNALSYM LANG_ORIYA}
- LANG_POLISH = $15;
- {$EXTERNALSYM LANG_POLISH}
- LANG_PORTUGUESE = $16;
- {$EXTERNALSYM LANG_PORTUGUESE}
- LANG_PUNJABI = $46;
- {$EXTERNALSYM LANG_PUNJABI}
- LANG_ROMANIAN = $18;
- {$EXTERNALSYM LANG_ROMANIAN}
- LANG_RUSSIAN = $19;
- {$EXTERNALSYM LANG_RUSSIAN}
- LANG_SANSKRIT = $4f;
- {$EXTERNALSYM LANG_SANSKRIT}
- LANG_SERBIAN = $1a;
- {$EXTERNALSYM LANG_SERBIAN}
- LANG_SINDHI = $59;
- {$EXTERNALSYM LANG_SINDHI}
- LANG_SLOVAK = $1b;
- {$EXTERNALSYM LANG_SLOVAK}
- LANG_SLOVENIAN = $24;
- {$EXTERNALSYM LANG_SLOVENIAN}
- LANG_SPANISH = $0a;
- {$EXTERNALSYM LANG_SPANISH}
- LANG_SWAHILI = $41;
- {$EXTERNALSYM LANG_SWAHILI}
- LANG_SWEDISH = $1d;
- {$EXTERNALSYM LANG_SWEDISH}
- LANG_SYRIAC = $5a;
- {$EXTERNALSYM LANG_SYRIAC}
- LANG_TAMIL = $49;
- {$EXTERNALSYM LANG_TAMIL}
- LANG_TATAR = $44;
- {$EXTERNALSYM LANG_TATAR}
- LANG_TELUGU = $4a;
- {$EXTERNALSYM LANG_TELUGU}
- LANG_THAI = $1e;
- {$EXTERNALSYM LANG_THAI}
- LANG_TURKISH = $1f;
- {$EXTERNALSYM LANG_TURKISH}
- LANG_UKRAINIAN = $22;
- {$EXTERNALSYM LANG_UKRAINIAN}
- LANG_URDU = $20;
- {$EXTERNALSYM LANG_URDU}
- LANG_UZBEK = $43;
- {$EXTERNALSYM LANG_UZBEK}
- LANG_VIETNAMESE = $2a;
- {$EXTERNALSYM LANG_VIETNAMESE}
-
-//
-// Sublanguage IDs.
-//
-// The name immediately following SUBLANG_ dictates which primary
-// language ID that sublanguage ID can be combined with to form a
-// valid language ID.
-//
-
- SUBLANG_NEUTRAL = $00; // language neutral
- {$EXTERNALSYM SUBLANG_NEUTRAL}
- SUBLANG_DEFAULT = $01; // user default
- {$EXTERNALSYM SUBLANG_DEFAULT}
- SUBLANG_SYS_DEFAULT = $02; // system default
- {$EXTERNALSYM SUBLANG_SYS_DEFAULT}
-
- SUBLANG_ARABIC_SAUDI_ARABIA = $01; // Arabic (Saudi Arabia)
- {$EXTERNALSYM SUBLANG_ARABIC_SAUDI_ARABIA}
- SUBLANG_ARABIC_IRAQ = $02; // Arabic (Iraq)
- {$EXTERNALSYM SUBLANG_ARABIC_IRAQ}
- SUBLANG_ARABIC_EGYPT = $03; // Arabic (Egypt)
- {$EXTERNALSYM SUBLANG_ARABIC_EGYPT}
- SUBLANG_ARABIC_LIBYA = $04; // Arabic (Libya)
- {$EXTERNALSYM SUBLANG_ARABIC_LIBYA}
- SUBLANG_ARABIC_ALGERIA = $05; // Arabic (Algeria)
- {$EXTERNALSYM SUBLANG_ARABIC_ALGERIA}
- SUBLANG_ARABIC_MOROCCO = $06; // Arabic (Morocco)
- {$EXTERNALSYM SUBLANG_ARABIC_MOROCCO}
- SUBLANG_ARABIC_TUNISIA = $07; // Arabic (Tunisia)
- {$EXTERNALSYM SUBLANG_ARABIC_TUNISIA}
- SUBLANG_ARABIC_OMAN = $08; // Arabic (Oman)
- {$EXTERNALSYM SUBLANG_ARABIC_OMAN}
- SUBLANG_ARABIC_YEMEN = $09; // Arabic (Yemen)
- {$EXTERNALSYM SUBLANG_ARABIC_YEMEN}
- SUBLANG_ARABIC_SYRIA = $0a; // Arabic (Syria)
- {$EXTERNALSYM SUBLANG_ARABIC_SYRIA}
- SUBLANG_ARABIC_JORDAN = $0b; // Arabic (Jordan)
- {$EXTERNALSYM SUBLANG_ARABIC_JORDAN}
- SUBLANG_ARABIC_LEBANON = $0c; // Arabic (Lebanon)
- {$EXTERNALSYM SUBLANG_ARABIC_LEBANON}
- SUBLANG_ARABIC_KUWAIT = $0d; // Arabic (Kuwait)
- {$EXTERNALSYM SUBLANG_ARABIC_KUWAIT}
- SUBLANG_ARABIC_UAE = $0e; // Arabic (U.A.E)
- {$EXTERNALSYM SUBLANG_ARABIC_UAE}
- SUBLANG_ARABIC_BAHRAIN = $0f; // Arabic (Bahrain)
- {$EXTERNALSYM SUBLANG_ARABIC_BAHRAIN}
- SUBLANG_ARABIC_QATAR = $10; // Arabic (Qatar)
- {$EXTERNALSYM SUBLANG_ARABIC_QATAR}
- SUBLANG_AZERI_LATIN = $01; // Azeri (Latin)
- {$EXTERNALSYM SUBLANG_AZERI_LATIN}
- SUBLANG_AZERI_CYRILLIC = $02; // Azeri (Cyrillic)
- {$EXTERNALSYM SUBLANG_AZERI_CYRILLIC}
- SUBLANG_CHINESE_TRADITIONAL = $01; // Chinese (Taiwan)
- {$EXTERNALSYM SUBLANG_CHINESE_TRADITIONAL}
- SUBLANG_CHINESE_SIMPLIFIED = $02; // Chinese (PR China)
- {$EXTERNALSYM SUBLANG_CHINESE_SIMPLIFIED}
- SUBLANG_CHINESE_HONGKONG = $03; // Chinese (Hong Kong S.A.R., P.R.C.)
- {$EXTERNALSYM SUBLANG_CHINESE_HONGKONG}
- SUBLANG_CHINESE_SINGAPORE = $04; // Chinese (Singapore)
- {$EXTERNALSYM SUBLANG_CHINESE_SINGAPORE}
- SUBLANG_CHINESE_MACAU = $05; // Chinese (Macau S.A.R.)
- {$EXTERNALSYM SUBLANG_CHINESE_MACAU}
- SUBLANG_DUTCH = $01; // Dutch
- {$EXTERNALSYM SUBLANG_DUTCH}
- SUBLANG_DUTCH_BELGIAN = $02; // Dutch (Belgian)
- {$EXTERNALSYM SUBLANG_DUTCH_BELGIAN}
- SUBLANG_ENGLISH_US = $01; // English (USA)
- {$EXTERNALSYM SUBLANG_ENGLISH_US}
- SUBLANG_ENGLISH_UK = $02; // English (UK)
- {$EXTERNALSYM SUBLANG_ENGLISH_UK}
- SUBLANG_ENGLISH_AUS = $03; // English (Australian)
- {$EXTERNALSYM SUBLANG_ENGLISH_AUS}
- SUBLANG_ENGLISH_CAN = $04; // English (Canadian)
- {$EXTERNALSYM SUBLANG_ENGLISH_CAN}
- SUBLANG_ENGLISH_NZ = $05; // English (New Zealand)
- {$EXTERNALSYM SUBLANG_ENGLISH_NZ}
- SUBLANG_ENGLISH_EIRE = $06; // English (Irish)
- {$EXTERNALSYM SUBLANG_ENGLISH_EIRE}
- SUBLANG_ENGLISH_SOUTH_AFRICA = $07; // English (South Africa)
- {$EXTERNALSYM SUBLANG_ENGLISH_SOUTH_AFRICA}
- SUBLANG_ENGLISH_JAMAICA = $08; // English (Jamaica)
- {$EXTERNALSYM SUBLANG_ENGLISH_JAMAICA}
- SUBLANG_ENGLISH_CARIBBEAN = $09; // English (Caribbean)
- {$EXTERNALSYM SUBLANG_ENGLISH_CARIBBEAN}
- SUBLANG_ENGLISH_BELIZE = $0a; // English (Belize)
- {$EXTERNALSYM SUBLANG_ENGLISH_BELIZE}
- SUBLANG_ENGLISH_TRINIDAD = $0b; // English (Trinidad)
- {$EXTERNALSYM SUBLANG_ENGLISH_TRINIDAD}
- SUBLANG_ENGLISH_ZIMBABWE = $0c; // English (Zimbabwe)
- {$EXTERNALSYM SUBLANG_ENGLISH_ZIMBABWE}
- SUBLANG_ENGLISH_PHILIPPINES = $0d; // English (Philippines)
- {$EXTERNALSYM SUBLANG_ENGLISH_PHILIPPINES}
- SUBLANG_FRENCH = $01; // French
- {$EXTERNALSYM SUBLANG_FRENCH}
- SUBLANG_FRENCH_BELGIAN = $02; // French (Belgian)
- {$EXTERNALSYM SUBLANG_FRENCH_BELGIAN}
- SUBLANG_FRENCH_CANADIAN = $03; // French (Canadian)
- {$EXTERNALSYM SUBLANG_FRENCH_CANADIAN}
- SUBLANG_FRENCH_SWISS = $04; // French (Swiss)
- {$EXTERNALSYM SUBLANG_FRENCH_SWISS}
- SUBLANG_FRENCH_LUXEMBOURG = $05; // French (Luxembourg)
- {$EXTERNALSYM SUBLANG_FRENCH_LUXEMBOURG}
- SUBLANG_FRENCH_MONACO = $06; // French (Monaco)
- {$EXTERNALSYM SUBLANG_FRENCH_MONACO}
- SUBLANG_GERMAN = $01; // German
- {$EXTERNALSYM SUBLANG_GERMAN}
- SUBLANG_GERMAN_SWISS = $02; // German (Swiss)
- {$EXTERNALSYM SUBLANG_GERMAN_SWISS}
- SUBLANG_GERMAN_AUSTRIAN = $03; // German (Austrian)
- {$EXTERNALSYM SUBLANG_GERMAN_AUSTRIAN}
- SUBLANG_GERMAN_LUXEMBOURG = $04; // German (Luxembourg)
- {$EXTERNALSYM SUBLANG_GERMAN_LUXEMBOURG}
- SUBLANG_GERMAN_LIECHTENSTEIN = $05; // German (Liechtenstein)
- {$EXTERNALSYM SUBLANG_GERMAN_LIECHTENSTEIN}
- SUBLANG_ITALIAN = $01; // Italian
- {$EXTERNALSYM SUBLANG_ITALIAN}
- SUBLANG_ITALIAN_SWISS = $02; // Italian (Swiss)
- {$EXTERNALSYM SUBLANG_ITALIAN_SWISS}
- SUBLANG_KASHMIRI_SASIA = $02; // Kashmiri (South Asia)
- {$EXTERNALSYM SUBLANG_KASHMIRI_SASIA}
- SUBLANG_KASHMIRI_INDIA = $02; // For app compatibility only
- {$EXTERNALSYM SUBLANG_KASHMIRI_INDIA}
- SUBLANG_KOREAN = $01; // Korean (Extended Wansung)
- {$EXTERNALSYM SUBLANG_KOREAN}
- SUBLANG_LITHUANIAN = $01; // Lithuanian
- {$EXTERNALSYM SUBLANG_LITHUANIAN}
- SUBLANG_MALAY_MALAYSIA = $01; // Malay (Malaysia)
- {$EXTERNALSYM SUBLANG_MALAY_MALAYSIA}
- SUBLANG_MALAY_BRUNEI_DARUSSALAM = $02; // Malay (Brunei Darussalam)
- {$EXTERNALSYM SUBLANG_MALAY_BRUNEI_DARUSSALAM}
- SUBLANG_NEPALI_INDIA = $02; // Nepali (India)
- {$EXTERNALSYM SUBLANG_NEPALI_INDIA}
- SUBLANG_NORWEGIAN_BOKMAL = $01; // Norwegian (Bokmal)
- {$EXTERNALSYM SUBLANG_NORWEGIAN_BOKMAL}
- SUBLANG_NORWEGIAN_NYNORSK = $02; // Norwegian (Nynorsk)
- {$EXTERNALSYM SUBLANG_NORWEGIAN_NYNORSK}
- SUBLANG_PORTUGUESE = $02; // Portuguese
- {$EXTERNALSYM SUBLANG_PORTUGUESE}
- SUBLANG_PORTUGUESE_BRAZILIAN = $01; // Portuguese (Brazilian)
- {$EXTERNALSYM SUBLANG_PORTUGUESE_BRAZILIAN}
- SUBLANG_SERBIAN_LATIN = $02; // Serbian (Latin)
- {$EXTERNALSYM SUBLANG_SERBIAN_LATIN}
- SUBLANG_SERBIAN_CYRILLIC = $03; // Serbian (Cyrillic)
- {$EXTERNALSYM SUBLANG_SERBIAN_CYRILLIC}
- SUBLANG_SPANISH = $01; // Spanish (Castilian)
- {$EXTERNALSYM SUBLANG_SPANISH}
- SUBLANG_SPANISH_MEXICAN = $02; // Spanish (Mexican)
- {$EXTERNALSYM SUBLANG_SPANISH_MEXICAN}
- SUBLANG_SPANISH_MODERN = $03; // Spanish (Spain)
- {$EXTERNALSYM SUBLANG_SPANISH_MODERN}
- SUBLANG_SPANISH_GUATEMALA = $04; // Spanish (Guatemala)
- {$EXTERNALSYM SUBLANG_SPANISH_GUATEMALA}
- SUBLANG_SPANISH_COSTA_RICA = $05; // Spanish (Costa Rica)
- {$EXTERNALSYM SUBLANG_SPANISH_COSTA_RICA}
- SUBLANG_SPANISH_PANAMA = $06; // Spanish (Panama)
- {$EXTERNALSYM SUBLANG_SPANISH_PANAMA}
- SUBLANG_SPANISH_DOMINICAN_REPUBLIC = $07; // Spanish (Dominican Republic)
- {$EXTERNALSYM SUBLANG_SPANISH_DOMINICAN_REPUBLIC}
- SUBLANG_SPANISH_VENEZUELA = $08; // Spanish (Venezuela)
- {$EXTERNALSYM SUBLANG_SPANISH_VENEZUELA}
- SUBLANG_SPANISH_COLOMBIA = $09; // Spanish (Colombia)
- {$EXTERNALSYM SUBLANG_SPANISH_COLOMBIA}
- SUBLANG_SPANISH_PERU = $0a; // Spanish (Peru)
- {$EXTERNALSYM SUBLANG_SPANISH_PERU}
- SUBLANG_SPANISH_ARGENTINA = $0b; // Spanish (Argentina)
- {$EXTERNALSYM SUBLANG_SPANISH_ARGENTINA}
- SUBLANG_SPANISH_ECUADOR = $0c; // Spanish (Ecuador)
- {$EXTERNALSYM SUBLANG_SPANISH_ECUADOR}
- SUBLANG_SPANISH_CHILE = $0d; // Spanish (Chile)
- {$EXTERNALSYM SUBLANG_SPANISH_CHILE}
- SUBLANG_SPANISH_URUGUAY = $0e; // Spanish (Uruguay)
- {$EXTERNALSYM SUBLANG_SPANISH_URUGUAY}
- SUBLANG_SPANISH_PARAGUAY = $0f; // Spanish (Paraguay)
- {$EXTERNALSYM SUBLANG_SPANISH_PARAGUAY}
- SUBLANG_SPANISH_BOLIVIA = $10; // Spanish (Bolivia)
- {$EXTERNALSYM SUBLANG_SPANISH_BOLIVIA}
- SUBLANG_SPANISH_EL_SALVADOR = $11; // Spanish (El Salvador)
- {$EXTERNALSYM SUBLANG_SPANISH_EL_SALVADOR}
- SUBLANG_SPANISH_HONDURAS = $12; // Spanish (Honduras)
- {$EXTERNALSYM SUBLANG_SPANISH_HONDURAS}
- SUBLANG_SPANISH_NICARAGUA = $13; // Spanish (Nicaragua)
- {$EXTERNALSYM SUBLANG_SPANISH_NICARAGUA}
- SUBLANG_SPANISH_PUERTO_RICO = $14; // Spanish (Puerto Rico)
- {$EXTERNALSYM SUBLANG_SPANISH_PUERTO_RICO}
- SUBLANG_SWEDISH = $01; // Swedish
- {$EXTERNALSYM SUBLANG_SWEDISH}
- SUBLANG_SWEDISH_FINLAND = $02; // Swedish (Finland)
- {$EXTERNALSYM SUBLANG_SWEDISH_FINLAND}
- SUBLANG_URDU_PAKISTAN = $01; // Urdu (Pakistan)
- {$EXTERNALSYM SUBLANG_URDU_PAKISTAN}
- SUBLANG_URDU_INDIA = $02; // Urdu (India)
- {$EXTERNALSYM SUBLANG_URDU_INDIA}
- SUBLANG_UZBEK_LATIN = $01; // Uzbek (Latin)
- {$EXTERNALSYM SUBLANG_UZBEK_LATIN}
- SUBLANG_UZBEK_CYRILLIC = $02; // Uzbek (Cyrillic)
- {$EXTERNALSYM SUBLANG_UZBEK_CYRILLIC}
-
-//
-// Sorting IDs.
-//
-
- SORT_DEFAULT = $0; // sorting default
- {$EXTERNALSYM SORT_DEFAULT}
-
- SORT_JAPANESE_XJIS = $0; // Japanese XJIS order
- {$EXTERNALSYM SORT_JAPANESE_XJIS}
- SORT_JAPANESE_UNICODE = $1; // Japanese Unicode order
- {$EXTERNALSYM SORT_JAPANESE_UNICODE}
-
- SORT_CHINESE_BIG5 = $0; // Chinese BIG5 order
- {$EXTERNALSYM SORT_CHINESE_BIG5}
- SORT_CHINESE_PRCP = $0; // PRC Chinese Phonetic order
- {$EXTERNALSYM SORT_CHINESE_PRCP}
- SORT_CHINESE_UNICODE = $1; // Chinese Unicode order
- {$EXTERNALSYM SORT_CHINESE_UNICODE}
- SORT_CHINESE_PRC = $2; // PRC Chinese Stroke Count order
- {$EXTERNALSYM SORT_CHINESE_PRC}
- SORT_CHINESE_BOPOMOFO = $3; // Traditional Chinese Bopomofo order
- {$EXTERNALSYM SORT_CHINESE_BOPOMOFO}
-
- SORT_KOREAN_KSC = $0; // Korean KSC order
- {$EXTERNALSYM SORT_KOREAN_KSC}
- SORT_KOREAN_UNICODE = $1; // Korean Unicode order
- {$EXTERNALSYM SORT_KOREAN_UNICODE}
-
- SORT_GERMAN_PHONE_BOOK = $1; // German Phone Book order
- {$EXTERNALSYM SORT_GERMAN_PHONE_BOOK}
-
- SORT_HUNGARIAN_DEFAULT = $0; // Hungarian Default order
- {$EXTERNALSYM SORT_HUNGARIAN_DEFAULT}
- SORT_HUNGARIAN_TECHNICAL = $1; // Hungarian Technical order
- {$EXTERNALSYM SORT_HUNGARIAN_TECHNICAL}
-
- SORT_GEORGIAN_TRADITIONAL = $0; // Georgian Traditional order
- {$EXTERNALSYM SORT_GEORGIAN_TRADITIONAL}
- SORT_GEORGIAN_MODERN = $1; // Georgian Modern order
- {$EXTERNALSYM SORT_GEORGIAN_MODERN}
-
-//
-// A language ID is a 16 bit value which is the combination of a
-// primary language ID and a secondary language ID. The bits are
-// allocated as follows:
-//
-// +-----------------------+-------------------------+
-// | Sublanguage ID | Primary Language ID |
-// +-----------------------+-------------------------+
-// 15 10 9 0 bit
-//
-//
-// Language ID creation/extraction macros:
-//
-// MAKELANGID - construct language id from a primary language id and
-// a sublanguage id.
-// PRIMARYLANGID - extract primary language id from a language id.
-// SUBLANGID - extract sublanguage id from a language id.
-//
-
-function MAKELANGID(PrimaryLang, SubLang: USHORT): WORD;
-{$EXTERNALSYM MAKELANGID}
-function PRIMARYLANGID(LangId: WORD): WORD;
-{$EXTERNALSYM PRIMARYLANGID}
-function SUBLANGID(LangId: WORD): WORD;
-{$EXTERNALSYM SUBLANGID}
-
-//
-// A locale ID is a 32 bit value which is the combination of a
-// language ID, a sort ID, and a reserved area. The bits are
-// allocated as follows:
-//
-// +-------------+---------+-------------------------+
-// | Reserved | Sort ID | Language ID |
-// +-------------+---------+-------------------------+
-// 31 20 19 16 15 0 bit
-//
-//
-// Locale ID creation/extraction macros:
-//
-// MAKELCID - construct the locale id from a language id and a sort id.
-// MAKESORTLCID - construct the locale id from a language id, sort id, and sort version.
-// LANGIDFROMLCID - extract the language id from a locale id.
-// SORTIDFROMLCID - extract the sort id from a locale id.
-// SORTVERSIONFROMLCID - extract the sort version from a locale id.
-//
-
-const
- NLS_VALID_LOCALE_MASK = $000fffff;
- {$EXTERNALSYM NLS_VALID_LOCALE_MASK}
-
-function MAKELCID(LangId, SortId: WORD): DWORD;
-{$EXTERNALSYM MAKELCID}
-function MAKESORTLCID(LangId, SortId, SortVersion: WORD): DWORD;
-{$EXTERNALSYM MAKESORTLCID}
-function LANGIDFROMLCID(LocaleId: LCID): WORD;
-{$EXTERNALSYM LANGIDFROMLCID}
-function SORTIDFROMLCID(LocaleId: LCID): WORD;
-{$EXTERNALSYM SORTIDFROMLCID}
-function SORTVERSIONFROMLCID(LocaleId: LCID): WORD;
-{$EXTERNALSYM SORTVERSIONFROMLCID}
-
-//
-// Default System and User IDs for language and locale.
-//
-
-function LANG_SYSTEM_DEFAULT: WORD;
-{$EXTERNALSYM LANG_SYSTEM_DEFAULT}
-function LANG_USER_DEFAULT: WORD;
-{$EXTERNALSYM LANG_USER_DEFAULT}
-function LOCALE_SYSTEM_DEFAULT: DWORD;
-{$EXTERNALSYM LOCALE_SYSTEM_DEFAULT}
-function LOCALE_USER_DEFAULT: DWORD;
-{$EXTERNALSYM LOCALE_USER_DEFAULT}
-function LOCALE_NEUTRAL: DWORD;
-{$EXTERNALSYM LOCALE_NEUTRAL}
-function LOCALE_INVARIANT: DWORD;
-{$EXTERNALSYM LOCALE_NEUTRAL}
-
-const
- // (rom) deleted status codes already in JwaWinStatus.pas
- DBG_COMMAND_EXCEPTION = DWORD($40010009);
- {$EXTERNALSYM DBG_COMMAND_EXCEPTION}
- STATUS_SXS_EARLY_DEACTIVATION = DWORD($C015000F);
- {$EXTERNALSYM STATUS_SXS_EARLY_DEACTIVATION}
- STATUS_SXS_INVALID_DEACTIVATION = DWORD($C0150010);
- {$EXTERNALSYM STATUS_SXS_INVALID_DEACTIVATION}
-
-const
- MAXIMUM_WAIT_OBJECTS = 64; // Maximum number of wait objects
- {$EXTERNALSYM MAXIMUM_WAIT_OBJECTS}
-
- MAXIMUM_SUSPEND_COUNT = MAXCHAR; // Maximum times thread can be suspended
- {$EXTERNALSYM MAXIMUM_SUSPEND_COUNT}
-
-type
- KSPIN_LOCK = ULONG_PTR;
- {$EXTERNALSYM KSPIN_LOCK}
- PKSPIN_LOCK = ^KSPIN_LOCK;
- {$EXTERNALSYM PKSPIN_LOCK}
-
-//
-// Define functions to get the address of the current fiber and the
-// current fiber data.
-//
-
-//
-// Disable these two pramas that evaluate to "sti" "cli" on x86 so that driver
-// writers to not leave them inadvertantly in their code.
-//
-
-function GetFiberData: PVOID;
-{$EXTERNALSYM GetFiberData}
-
-function GetCurrentFiber: PVOID;
-{$EXTERNALSYM GetCurrentFiber}
-
-//
-// Define the size of the 80387 save area, which is in the context frame.
-//
-
-const
- SIZE_OF_80387_REGISTERS = 80;
- {$EXTERNALSYM SIZE_OF_80387_REGISTERS}
-
-//
-// The following flags control the contents of the CONTEXT structure.
-//
-
-const
- CONTEXT_i386 = $00010000; // this assumes that i386 and
- {$EXTERNALSYM CONTEXT_i386}
- CONTEXT_i486 = $00010000; // i486 have identical context records
- {$EXTERNALSYM CONTEXT_i486}
-
-const
- CONTEXT_CONTROL = CONTEXT_i386 or $00000001; // SS:SP, CS:IP, FLAGS, BP
- {$EXTERNALSYM CONTEXT_CONTROL}
- CONTEXT_INTEGER = CONTEXT_i386 or $00000002; // AX, BX, CX, DX, SI, DI
- {$EXTERNALSYM CONTEXT_INTEGER}
- CONTEXT_SEGMENTS = CONTEXT_i386 or $00000004; // DS, ES, FS, GS
- {$EXTERNALSYM CONTEXT_SEGMENTS}
- CONTEXT_FLOATING_POINT = CONTEXT_i386 or $00000008; // 387 state
- {$EXTERNALSYM CONTEXT_FLOATING_POINT}
- CONTEXT_DEBUG_REGISTERS = CONTEXT_i386 or $00000010; // DB 0-3,6,7
- {$EXTERNALSYM CONTEXT_DEBUG_REGISTERS}
- CONTEXT_EXTENDED_REGISTERS = CONTEXT_i386 or $00000020; // cpu specific extensions
- {$EXTERNALSYM CONTEXT_EXTENDED_REGISTERS}
-
- CONTEXT_FULL = CONTEXT_CONTROL or CONTEXT_INTEGER or CONTEXT_SEGMENTS;
- {$EXTERNALSYM CONTEXT_FULL}
-
- CONTEXT_ALL = CONTEXT_CONTROL or CONTEXT_INTEGER or CONTEXT_SEGMENTS or CONTEXT_FLOATING_POINT or CONTEXT_DEBUG_REGISTERS;
- {$EXTERNALSYM CONTEXT_ALL}
-
-//
-// Define initial MxCsr control.
-//
-
- INITIAL_MXCSR = $1f80; // initial MXCSR value
- {$EXTERNALSYM INITIAL_MXCSR}
-
- MAXIMUM_SUPPORTED_EXTENSION = 512;
- {$EXTERNALSYM MAXIMUM_SUPPORTED_EXTENSION}
-
-type
- PFLOATING_SAVE_AREA = ^FLOATING_SAVE_AREA;
- {$EXTERNALSYM PFLOATING_SAVE_AREA}
- _FLOATING_SAVE_AREA = record
- ControlWord: DWORD;
- StatusWord: DWORD;
- TagWord: DWORD;
- ErrorOffset: DWORD;
- ErrorSelector: DWORD;
- DataOffset: DWORD;
- DataSelector: DWORD;
- RegisterArea: array [0..SIZE_OF_80387_REGISTERS - 1] of BYTE;
- Cr0NpxState: DWORD;
- end;
- {$EXTERNALSYM _FLOATING_SAVE_AREA}
- FLOATING_SAVE_AREA = _FLOATING_SAVE_AREA;
- {$EXTERNALSYM FLOATING_SAVE_AREA}
- TFloatingSaveArea = FLOATING_SAVE_AREA;
- PFloatingSaveArea = PFLOATING_SAVE_AREA;
-
-//
-// Context Frame
-//
-// This frame has a several purposes: 1) it is used as an argument to
-// NtContinue, 2) is is used to constuct a call frame for APC delivery,
-// and 3) it is used in the user level thread creation routines.
-//
-// The layout of the record conforms to a standard call frame.
-//
-
-type
- PContext = ^CONTEXT;
- _CONTEXT = record
-
- //
- // The flags values within this flag control the contents of
- // a CONTEXT record.
- //
- // If the context record is used as an input parameter, then
- // for each portion of the context record controlled by a flag
- // whose value is set, it is assumed that that portion of the
- // context record contains valid context. If the context record
- // is being used to modify a threads context, then only that
- // portion of the threads context will be modified.
- //
- // If the context record is used as an IN OUT parameter to capture
- // the context of a thread, then only those portions of the thread's
- // context corresponding to set flags will be returned.
- //
- // The context record is never used as an OUT only parameter.
- //
-
- ContextFlags: DWORD;
-
- //
- // This section is specified/returned if CONTEXT_DEBUG_REGISTERS is
- // set in ContextFlags. Note that CONTEXT_DEBUG_REGISTERS is NOT
- // included in CONTEXT_FULL.
- //
-
- Dr0: DWORD;
- Dr1: DWORD;
- Dr2: DWORD;
- Dr3: DWORD;
- Dr6: DWORD;
- Dr7: DWORD;
-
- //
- // This section is specified/returned if the
- // ContextFlags word contians the flag CONTEXT_FLOATING_POINT.
- //
-
- FloatSave: FLOATING_SAVE_AREA;
-
- //
- // This section is specified/returned if the
- // ContextFlags word contians the flag CONTEXT_SEGMENTS.
- //
-
- SegGs: DWORD;
- SegFs: DWORD;
- SegEs: DWORD;
- SegDs: DWORD;
-
- //
- // This section is specified/returned if the
- // ContextFlags word contians the flag CONTEXT_INTEGER.
- //
-
- Edi: DWORD;
- Esi: DWORD;
- Ebx: DWORD;
- Edx: DWORD;
- Ecx: DWORD;
- Eax: DWORD;
-
- //
- // This section is specified/returned if the
- // ContextFlags word contians the flag CONTEXT_CONTROL.
- //
-
- Ebp: DWORD;
- Eip: DWORD;
- SegCs: DWORD; // MUST BE SANITIZED
- EFlags: DWORD; // MUST BE SANITIZED
- Esp: DWORD;
- SegSs: DWORD;
-
- //
- // This section is specified/returned if the ContextFlags word
- // contains the flag CONTEXT_EXTENDED_REGISTERS.
- // The format and contexts are processor specific
- //
-
- ExtendedRegisters: array [0..MAXIMUM_SUPPORTED_EXTENSION - 1] of BYTE;
- end;
- {$EXTERNALSYM _CONTEXT}
- CONTEXT = _CONTEXT;
- {$EXTERNALSYM CONTEXT}
- TContext = CONTEXT;
-
-const
- LDTENTRY_FLAGS1_TYPE = $1F;
- LDTENTRY_FLAGS1_DPL = $60;
- LDTENTRY_FLAGS1_PRES = $80;
-
- LDTENTRY_FLAGS2_LIMITHI = $0F;
- LDTENTRY_FLAGS2_SYS = $10;
- LDTENTRY_FLAGS2_RESERVED_0 = $20;
- LDTENTRY_FLAGS2_DEFAULT_BIG = $40;
- LDTENTRY_FLAGS2_GRANULARITY = $80;
-
-type
- PLDT_ENTRY = ^LDT_ENTRY;
- {$EXTERNALSYM PLDT_ENTRY}
- _LDT_ENTRY = record
- LimitLow: WORD;
- BaseLow: WORD;
- BaseMid: BYTE;
- Flags1: BYTE; // Declare as bytes to avoid alignment
- Flags2: BYTE; // Problems.
- BaseHi: BYTE;
- end;
- {$EXTERNALSYM _LDT_ENTRY}
- LDT_ENTRY = _LDT_ENTRY;
- {$EXTERNALSYM LDT_ENTRY}
- TLdtEntry = LDT_ENTRY;
- PLdtEntry = PLDT_ENTRY;
-
-// Please contact INTEL to get IA64-specific information
-
-const
- EXCEPTION_NONCONTINUABLE = $1; // Noncontinuable exception
- {$EXTERNALSYM EXCEPTION_NONCONTINUABLE}
- EXCEPTION_MAXIMUM_PARAMETERS = 15; // maximum number of exception parameters
- {$EXTERNALSYM EXCEPTION_MAXIMUM_PARAMETERS}
-
-//
-// Exception record definition.
-//
-
-type
- PEXCEPTION_RECORD = ^EXCEPTION_RECORD;
- {$EXTERNALSYM PEXCEPTION_RECORD}
- _EXCEPTION_RECORD = record
- ExceptionCode: DWORD;
- ExceptionFlags: DWORD;
- ExceptionRecord: PEXCEPTION_RECORD;
- ExceptionAddress: Pointer;
- NumberParameters: DWORD;
- ExceptionInformation: array [0..EXCEPTION_MAXIMUM_PARAMETERS - 1] of ULONG_PTR;
- end;
- {$EXTERNALSYM _EXCEPTION_RECORD}
- EXCEPTION_RECORD = _EXCEPTION_RECORD;
- {$EXTERNALSYM EXCEPTION_RECORD}
- TExceptionRecord = EXCEPTION_RECORD;
- PExceptionRecord = PEXCEPTION_RECORD;
-
- PEXCEPTION_RECORD32 = ^EXCEPTION_RECORD32;
- {$EXTERNALSYM PEXCEPTION_RECORD32}
- _EXCEPTION_RECORD32 = record
- ExceptionCode: DWORD;
- ExceptionFlags: DWORD;
- ExceptionRecord: DWORD;
- ExceptionAddress: DWORD;
- NumberParameters: DWORD;
- ExceptionInformation: array [0..EXCEPTION_MAXIMUM_PARAMETERS - 1] of DWORD;
- end;
- {$EXTERNALSYM _EXCEPTION_RECORD32}
- EXCEPTION_RECORD32 = _EXCEPTION_RECORD32;
- {$EXTERNALSYM EXCEPTION_RECORD32}
- TExceptionRecord32 = EXCEPTION_RECORD32;
- PExceptionRecord32 = PEXCEPTION_RECORD32;
-
- PEXCEPTION_RECORD64 = ^EXCEPTION_RECORD64;
- {$EXTERNALSYM PEXCEPTION_RECORD64}
- _EXCEPTION_RECORD64 = record
- ExceptionCode: DWORD;
- ExceptionFlags: DWORD;
- ExceptionRecord: DWORD64;
- ExceptionAddress: DWORD64;
- NumberParameters: DWORD;
- __unusedAlignment: DWORD;
- ExceptionInformation: array [0..EXCEPTION_MAXIMUM_PARAMETERS - 1] of DWORD64;
- end;
- {$EXTERNALSYM _EXCEPTION_RECORD64}
- EXCEPTION_RECORD64 = _EXCEPTION_RECORD64;
- {$EXTERNALSYM EXCEPTION_RECORD64}
- TExceptionRecord64 = EXCEPTION_RECORD64;
- PExceptionRecord64 = PEXCEPTION_RECORD64;
-
-//
-// Typedef for pointer returned by exception_info()
-//
-
- PEXCEPTION_POINTERS = ^EXCEPTION_POINTERS;
- {$EXTERNALSYM PEXCEPTION_POINTERS}
- _EXCEPTION_POINTERS = record
- ExceptionRecord: PEXCEPTION_RECORD;
- ContextRecord: PCONTEXT;
- end;
- {$EXTERNALSYM _EXCEPTION_POINTERS}
- EXCEPTION_POINTERS = _EXCEPTION_POINTERS;
- {$EXTERNALSYM EXCEPTION_POINTERS}
- TExceptionPointers = EXCEPTION_POINTERS;
- PExceptionPointers = ^TExceptionPointers;
-
- PACCESS_TOKEN = Pointer;
- {$EXTERNALSYM PACCESS_TOKEN}
-
-////////////////////////////////////////////////////////////////////////
-// //
-// ACCESS MASK //
-// //
-////////////////////////////////////////////////////////////////////////
-
-//
-// Define the access mask as a longword sized structure divided up as
-// follows:
-//
-// 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1
-// 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
-// +---------------+---------------+-------------------------------+
-// |G|G|G|G|Res'd|A| StandardRights| SpecificRights |
-// |R|W|E|A| |S| | |
-// +-+-------------+---------------+-------------------------------+
-//
-// typedef struct _ACCESS_MASK {
-// WORD SpecificRights;
-// BYTE StandardRights;
-// BYTE AccessSystemAcl : 1;
-// BYTE Reserved : 3;
-// BYTE GenericAll : 1;
-// BYTE GenericExecute : 1;
-// BYTE GenericWrite : 1;
-// BYTE GenericRead : 1;
-// } ACCESS_MASK;
-// typedef ACCESS_MASK *PACCESS_MASK;
-//
-// but to make life simple for programmer's we'll allow them to specify
-// a desired access mask by simply OR'ing together mulitple single rights
-// and treat an access mask as a DWORD. For example
-//
-// DesiredAccess = DELETE | READ_CONTROL
-//
-// So we'll declare ACCESS_MASK as DWORD
-//
-
-type
- ACCESS_MASK = DWORD;
- {$EXTERNALSYM ACCESS_MASK}
- PACCESS_MASK = ^ACCESS_MASK;
- {$EXTERNALSYM PACCESS_MASK}
- TAccessMask = ACCESS_MASK;
- PAccessMask = PACCESS_MASK;
-
-////////////////////////////////////////////////////////////////////////
-// //
-// ACCESS TYPES //
-// //
-////////////////////////////////////////////////////////////////////////
-
-//
-// The following are masks for the predefined standard access types
-//
-
-const
- DELETE = $00010000;
- {$EXTERNALSYM DELETE}
- READ_CONTROL = $00020000;
- {$EXTERNALSYM READ_CONTROL}
- WRITE_DAC = $00040000;
- {$EXTERNALSYM WRITE_DAC}
- WRITE_OWNER = $00080000;
- {$EXTERNALSYM WRITE_OWNER}
- SYNCHRONIZE = $00100000;
- {$EXTERNALSYM SYNCHRONIZE}
-
- STANDARD_RIGHTS_REQUIRED = $000F0000;
- {$EXTERNALSYM STANDARD_RIGHTS_REQUIRED}
-
- STANDARD_RIGHTS_READ = READ_CONTROL;
- {$EXTERNALSYM STANDARD_RIGHTS_READ}
- STANDARD_RIGHTS_WRITE = READ_CONTROL;
- {$EXTERNALSYM STANDARD_RIGHTS_WRITE}
- STANDARD_RIGHTS_EXECUTE = READ_CONTROL;
- {$EXTERNALSYM STANDARD_RIGHTS_EXECUTE}
-
- STANDARD_RIGHTS_ALL = $001F0000;
- {$EXTERNALSYM STANDARD_RIGHTS_ALL}
- SPECIFIC_RIGHTS_ALL = $0000FFFF;
- {$EXTERNALSYM SPECIFIC_RIGHTS_ALL}
-
-//
-// AccessSystemAcl access type
-//
-
- ACCESS_SYSTEM_SECURITY = $01000000;
- {$EXTERNALSYM ACCESS_SYSTEM_SECURITY}
-
-//
-// MaximumAllowed access type
-//
-
- MAXIMUM_ALLOWED = $02000000;
- {$EXTERNALSYM MAXIMUM_ALLOWED}
-
-//
-// These are the generic rights.
-//
-
- GENERIC_READ = DWORD($80000000);
- {$EXTERNALSYM GENERIC_READ}
- GENERIC_WRITE = $40000000;
- {$EXTERNALSYM GENERIC_WRITE}
- GENERIC_EXECUTE = $20000000;
- {$EXTERNALSYM GENERIC_EXECUTE}
- GENERIC_ALL = $10000000;
- {$EXTERNALSYM GENERIC_ALL}
-
-//
-// Define the generic mapping array. This is used to denote the
-// mapping of each generic access right to a specific access mask.
-//
-
-type
- PGENERIC_MAPPING = ^GENERIC_MAPPING;
- {$EXTERNALSYM PGENERIC_MAPPING}
- _GENERIC_MAPPING = record
- GenericRead: ACCESS_MASK;
- GenericWrite: ACCESS_MASK;
- GenericExecute: ACCESS_MASK;
- GenericAll: ACCESS_MASK;
- end;
- {$EXTERNALSYM _GENERIC_MAPPING}
- GENERIC_MAPPING = _GENERIC_MAPPING;
- {$EXTERNALSYM GENERIC_MAPPING}
- TGenericMapping = GENERIC_MAPPING;
- PGenericMapping = PGENERIC_MAPPING;
-
-////////////////////////////////////////////////////////////////////////
-// //
-// LUID_AND_ATTRIBUTES //
-// //
-////////////////////////////////////////////////////////////////////////
-//
-//
-
-//#include <pshpack4.h>
-
- PLUID_AND_ATTRIBUTES = ^LUID_AND_ATTRIBUTES;
- {$EXTERNALSYM PLUID_AND_ATTRIBUTES}
- _LUID_AND_ATTRIBUTES = record
- Luid: LUID;
- Attributes: DWORD;
- end;
- {$EXTERNALSYM _LUID_AND_ATTRIBUTES}
- LUID_AND_ATTRIBUTES = _LUID_AND_ATTRIBUTES;
- {$EXTERNALSYM LUID_AND_ATTRIBUTES}
- TLuidAndAttributes = LUID_AND_ATTRIBUTES;
- PLuidAndAttributes = PLUID_AND_ATTRIBUTES;
-
- LUID_AND_ATTRIBUTES_ARRAY = array [0..ANYSIZE_ARRAY - 1] of LUID_AND_ATTRIBUTES;
- {$EXTERNALSYM LUID_AND_ATTRIBUTES_ARRAY}
- PLUID_AND_ATTRIBUTES_ARRAY = ^LUID_AND_ATTRIBUTES_ARRAY;
- {$EXTERNALSYM PLUID_AND_ATTRIBUTES_ARRAY}
- TLuidAndAttributesArray = LUID_AND_ATTRIBUTES_ARRAY;
- PLuidAndAttributesArray = ^TLuidAndAttributesArray;
-
-//#include <poppack.h>
-
-////////////////////////////////////////////////////////////////////////
-// //
-// Security Id (SID) //
-// //
-////////////////////////////////////////////////////////////////////////
-//
-//
-// Pictorially the structure of an SID is as follows:
-//
-// 1 1 1 1 1 1
-// 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
-// +---------------------------------------------------------------+
-// | SubAuthorityCount |Reserved1 (SBZ)| Revision |
-// +---------------------------------------------------------------+
-// | IdentifierAuthority[0] |
-// +---------------------------------------------------------------+
-// | IdentifierAuthority[1] |
-// +---------------------------------------------------------------+
-// | IdentifierAuthority[2] |
-// +---------------------------------------------------------------+
-// | |
-// +- - - - - - - - SubAuthority[] - - - - - - - - -+
-// | |
-// +---------------------------------------------------------------+
-//
-//
-
-type
- PSID_IDENTIFIER_AUTHORITY = ^SID_IDENTIFIER_AUTHORITY;
- {$EXTERNALSYM PSID_IDENTIFIER_AUTHORITY}
- _SID_IDENTIFIER_AUTHORITY = record
- Value: array [0..5] of Byte;
- end;
- {$EXTERNALSYM _SID_IDENTIFIER_AUTHORITY}
- SID_IDENTIFIER_AUTHORITY = _SID_IDENTIFIER_AUTHORITY;
- {$EXTERNALSYM SID_IDENTIFIER_AUTHORITY}
- TSidIdentifierAuthority = SID_IDENTIFIER_AUTHORITY;
- PSidIdentifierAuthority = PSID_IDENTIFIER_AUTHORITY;
-
- PSid = ^SID;
- _SID = record
- Revision: Byte;
- SubAuthorityCount: Byte;
- IdentifierAuthority: SID_IDENTIFIER_AUTHORITY;
- SubAuthority: array [0..ANYSIZE_ARRAY - 1] of DWORD;
- end;
- {$EXTERNALSYM _SID}
- SID = _SID;
- {$EXTERNALSYM SID}
- PPSID = ^PSID;
- {$NODEFINE PPSID}
- TSid = SID;
-
-const
- SID_REVISION = 1; // Current revision level
- {$EXTERNALSYM SID_REVISION}
- SID_MAX_SUB_AUTHORITIES = 15;
- {$EXTERNALSYM SID_MAX_SUB_AUTHORITIES}
- SID_RECOMMENDED_SUB_AUTHORITIES = 1; // Will change to around 6 in a future release.
- {$EXTERNALSYM SID_RECOMMENDED_SUB_AUTHORITIES}
-
- SECURITY_MAX_SID_SIZE = SizeOf(SID) - SizeOf(DWORD) + (SID_MAX_SUB_AUTHORITIES * SizeOf(DWORD));
- {$EXTERNALSYM SECURITY_MAX_SID_SIZE}
-
- SidTypeUser = 1;
- {$EXTERNALSYM SidTypeUser}
- SidTypeGroup = 2;
- {$EXTERNALSYM SidTypeGroup}
- SidTypeDomain = 3;
- {$EXTERNALSYM SidTypeDomain}
- SidTypeAlias = 4;
- {$EXTERNALSYM SidTypeAlias}
- SidTypeWellKnownGroup = 5;
- {$EXTERNALSYM SidTypeWellKnownGroup}
- SidTypeDeletedAccount = 6;
- {$EXTERNALSYM SidTypeDeletedAccount}
- SidTypeInvalid = 7;
- {$EXTERNALSYM SidTypeInvalid}
- SidTypeUnknown = 8;
- {$EXTERNALSYM SidTypeUnknown}
- SidTypeComputer = 9;
- {$EXTERNALSYM SidTypeComputer}
-
-type
- _SID_NAME_USE = DWORD;
- {$EXTERNALSYM _SID_NAME_USE}
- SID_NAME_USE = _SID_NAME_USE;
- {$EXTERNALSYM SID_NAME_USE}
- PSID_NAME_USE = ^SID_NAME_USE;
- {$EXTERNALSYM PSID_NAME_USE}
- TSidNameUse = SID_NAME_USE;
- PSidNameUSe = PSID_NAME_USE;
-
- PSID_AND_ATTRIBUTES = ^SID_AND_ATTRIBUTES;
- {$EXTERNALSYM PSID_AND_ATTRIBUTES}
- _SID_AND_ATTRIBUTES = record
- Sid: PSID;
- Attributes: DWORD;
- end;
- {$EXTERNALSYM _SID_AND_ATTRIBUTES}
- SID_AND_ATTRIBUTES = _SID_AND_ATTRIBUTES;
- {$EXTERNALSYM SID_AND_ATTRIBUTES}
- TSidAndAttributes = SID_AND_ATTRIBUTES;
- PSidAndAttributes = PSID_AND_ATTRIBUTES;
-
- SID_AND_ATTRIBUTES_ARRAY = array [0..ANYSIZE_ARRAY - 1] of SID_AND_ATTRIBUTES;
- {$EXTERNALSYM SID_AND_ATTRIBUTES_ARRAY}
- PSID_AND_ATTRIBUTES_ARRAY = ^SID_AND_ATTRIBUTES_ARRAY;
- {$EXTERNALSYM PSID_AND_ATTRIBUTES_ARRAY}
- PSidAndAttributesArray = ^TSidAndAttributesArray;
- TSidAndAttributesArray = SID_AND_ATTRIBUTES_ARRAY;
-
-/////////////////////////////////////////////////////////////////////////////
-// //
-// Universal well-known SIDs //
-// //
-// Null SID S-1-0-0 //
-// World S-1-1-0 //
-// Local S-1-2-0 //
-// Creator Owner ID S-1-3-0 //
-// Creator Group ID S-1-3-1 //
-// Creator Owner Server ID S-1-3-2 //
-// Creator Group Server ID S-1-3-3 //
-// //
-// (Non-unique IDs) S-1-4 //
-// //
-/////////////////////////////////////////////////////////////////////////////
-
-const
- SECURITY_NULL_SID_AUTHORITY: TSidIdentifierAuthority = (Value: (0, 0, 0, 0, 0, 0));
- {$EXTERNALSYM SECURITY_NULL_SID_AUTHORITY}
- SECURITY_WORLD_SID_AUTHORITY: TSidIdentifierAuthority = (Value: (0, 0, 0, 0, 0, 1));
- {$EXTERNALSYM SECURITY_WORLD_SID_AUTHORITY}
- SECURITY_LOCAL_SID_AUTHORITY: TSidIdentifierAuthority = (Value: (0, 0, 0, 0, 0, 2));
- {$EXTERNALSYM SECURITY_LOCAL_SID_AUTHORITY}
- SECURITY_CREATOR_SID_AUTHORITY: TSidIdentifierAuthority = (Value: (0, 0, 0, 0, 0, 3));
- {$EXTERNALSYM SECURITY_CREATOR_SID_AUTHORITY}
- SECURITY_NON_UNIQUE_AUTHORITY: TSidIdentifierAuthority = (Value: (0, 0, 0, 0, 0, 4));
- {$EXTERNALSYM SECURITY_NON_UNIQUE_AUTHORITY}
- SECURITY_RESOURCE_MANAGER_AUTHORITY: TSidIdentifierAuthority = (Value: (0, 0, 0, 0, 0, 9));
- {$EXTERNALSYM SECURITY_RESOURCE_MANAGER_AUTHORITY}
-
- SECURITY_NULL_RID = $00000000;
- {$EXTERNALSYM SECURITY_NULL_RID}
- SECURITY_WORLD_RID = $00000000;
- {$EXTERNALSYM SECURITY_WORLD_RID}
- SECURITY_LOCAL_RID = $00000000;
- {$EXTERNALSYM SECURITY_LOCAL_RID}
-
- SECURITY_CREATOR_OWNER_RID = $00000000;
- {$EXTERNALSYM SECURITY_CREATOR_OWNER_RID}
- SECURITY_CREATOR_GROUP_RID = $00000001;
- {$EXTERNALSYM SECURITY_CREATOR_GROUP_RID}
-
- SECURITY_CREATOR_OWNER_SERVER_RID = $00000002;
- {$EXTERNALSYM SECURITY_CREATOR_OWNER_SERVER_RID}
- SECURITY_CREATOR_GROUP_SERVER_RID = $00000003;
- {$EXTERNALSYM SECURITY_CREATOR_GROUP_SERVER_RID}
-
-/////////////////////////////////////////////////////////////////////////////
-// //
-// NT well-known SIDs //
-// //
-// NT Authority S-1-5 //
-// Dialup S-1-5-1 //
-// //
-// Network S-1-5-2 //
-// Batch S-1-5-3 //
-// Interactive S-1-5-4 //
-// (Logon IDs) S-1-5-5-X-Y //
-// Service S-1-5-6 //
-// AnonymousLogon S-1-5-7 (aka null logon session) //
-// Proxy S-1-5-8 //
-// Enterprise DC (EDC) S-1-5-9 (aka domain controller account) //
-// Self S-1-5-10 (self RID) //
-// Authenticated User S-1-5-11 (Authenticated user somewhere) //
-// Restricted Code S-1-5-12 (Running restricted code) //
-// Terminal Server S-1-5-13 (Running on Terminal Server) //
-// Remote Logon S-1-5-14 (Remote Interactive Logon) //
-// This Organization S-1-5-15 //
-// //
-// Local System S-1-5-18 //
-// Local Service S-1-5-19 //
-// Network Service S-1-5-20 //
-// //
-// (NT non-unique IDs) S-1-5-0x15-... (NT Domain Sids) //
-// //
-// (Built-in domain) S-1-5-0x20 //
-// //
-// (Security Package IDs) S-1-5-0x40 //
-// NTLM Authentication S-1-5-0x40-10 //
-// SChannel Authentication S-1-5-0x40-14 //
-// Digest Authentication S-1-5-0x40-21 //
-// //
-// Other Organization S-1-5-1000 (>=1000 can not be filtered) //
-// //
-// //
-// NOTE: the relative identifier values (RIDs) determine which security //
-// boundaries the SID is allowed to cross. Before adding new RIDs, //
-// a determination needs to be made regarding which range they should //
-// be added to in order to ensure proper "SID filtering" //
-// //
-///////////////////////////////////////////////////////////////////////////////
-
-const
- SECURITY_NT_AUTHORITY: TSidIdentifierAuthority = (Value: (0, 0, 0, 0, 0, 5));
- {$EXTERNALSYM SECURITY_NT_AUTHORITY}
-
- SECURITY_DIALUP_RID = $00000001;
- {$EXTERNALSYM SECURITY_DIALUP_RID}
- SECURITY_NETWORK_RID = $00000002;
- {$EXTERNALSYM SECURITY_NETWORK_RID}
- SECURITY_BATCH_RID = $00000003;
- {$EXTERNALSYM SECURITY_BATCH_RID}
- SECURITY_INTERACTIVE_RID = $00000004;
- {$EXTERNALSYM SECURITY_INTERACTIVE_RID}
- SECURITY_LOGON_IDS_RID = $00000005;
- {$EXTERNALSYM SECURITY_LOGON_IDS_RID}
- SECURITY_LOGON_IDS_RID_COUNT = 3;
- {$EXTERNALSYM SECURITY_LOGON_IDS_RID_COUNT}
- SECURITY_SERVICE_RID = $00000006;
- {$EXTERNALSYM SECURITY_SERVICE_RID}
- SECURITY_ANONYMOUS_LOGON_RID = $00000007;
- {$EXTERNALSYM SECURITY_ANONYMOUS_LOGON_RID}
- SECURITY_PROXY_RID = $00000008;
- {$EXTERNALSYM SECURITY_PROXY_RID}
- SECURITY_ENTERPRISE_CONTROLLERS_RID = $00000009;
- {$EXTERNALSYM SECURITY_ENTERPRISE_CONTROLLERS_RID}
- SECURITY_SERVER_LOGON_RID = SECURITY_ENTERPRISE_CONTROLLERS_RID;
- {$EXTERNALSYM SECURITY_SERVER_LOGON_RID}
- SECURITY_PRINCIPAL_SELF_RID = $0000000A;
- {$EXTERNALSYM SECURITY_PRINCIPAL_SELF_RID}
- SECURITY_AUTHENTICATED_USER_RID = $0000000B;
- {$EXTERNALSYM SECURITY_AUTHENTICATED_USER_RID}
- SECURITY_RESTRICTED_CODE_RID = $0000000C;
- {$EXTERNALSYM SECURITY_RESTRICTED_CODE_RID}
- SECURITY_TERMINAL_SERVER_RID = $0000000D;
- {$EXTERNALSYM SECURITY_TERMINAL_SERVER_RID}
- SECURITY_REMOTE_LOGON_RID = $0000000E;
- {$EXTERNALSYM SECURITY_REMOTE_LOGON_RID}
- SECURITY_THIS_ORGANIZATION_RID = $0000000F;
- {$EXTERNALSYM SECURITY_THIS_ORGANIZATION_RID}
-
- SECURITY_LOCAL_SYSTEM_RID = $00000012;
- {$EXTERNALSYM SECURITY_LOCAL_SYSTEM_RID}
- SECURITY_LOCAL_SERVICE_RID = $00000013;
- {$EXTERNALSYM SECURITY_LOCAL_SERVICE_RID}
- SECURITY_NETWORK_SERVICE_RID = $00000014;
- {$EXTERNALSYM SECURITY_NETWORK_SERVICE_RID}
-
- SECURITY_NT_NON_UNIQUE = $00000015;
- {$EXTERNALSYM SECURITY_NT_NON_UNIQUE}
- SECURITY_NT_NON_UNIQUE_SUB_AUTH_COUNT = 3;
- {$EXTERNALSYM SECURITY_NT_NON_UNIQUE_SUB_AUTH_COUNT}
-
- SECURITY_BUILTIN_DOMAIN_RID = $00000020;
- {$EXTERNALSYM SECURITY_BUILTIN_DOMAIN_RID}
-
- SECURITY_PACKAGE_BASE_RID = $00000040;
- {$EXTERNALSYM SECURITY_PACKAGE_BASE_RID}
- SECURITY_PACKAGE_RID_COUNT = 2;
- {$EXTERNALSYM SECURITY_PACKAGE_RID_COUNT}
- SECURITY_PACKAGE_NTLM_RID = $0000000A;
- {$EXTERNALSYM SECURITY_PACKAGE_NTLM_RID}
- SECURITY_PACKAGE_SCHANNEL_RID = $0000000E;
- {$EXTERNALSYM SECURITY_PACKAGE_SCHANNEL_RID}
- SECURITY_PACKAGE_DIGEST_RID = $00000015;
- {$EXTERNALSYM SECURITY_PACKAGE_DIGEST_RID}
-
- SECURITY_MAX_ALWAYS_FILTERED = $000003E7;
- {$EXTERNALSYM SECURITY_MAX_ALWAYS_FILTERED}
- SECURITY_MIN_NEVER_FILTERED = $000003E8;
- {$EXTERNALSYM SECURITY_MIN_NEVER_FILTERED}
-
- SECURITY_OTHER_ORGANIZATION_RID = $000003E8;
- {$EXTERNALSYM SECURITY_OTHER_ORGANIZATION_RID}
-
-/////////////////////////////////////////////////////////////////////////////
-// //
-// well-known domain relative sub-authority values (RIDs)... //
-// //
-/////////////////////////////////////////////////////////////////////////////
-
-// Well-known users ...
-
- FOREST_USER_RID_MAX = $000001F3;
- {$EXTERNALSYM FOREST_USER_RID_MAX}
-
- DOMAIN_USER_RID_ADMIN = $000001F4;
- {$EXTERNALSYM DOMAIN_USER_RID_ADMIN}
- DOMAIN_USER_RID_GUEST = $000001F5;
- {$EXTERNALSYM DOMAIN_USER_RID_GUEST}
- DOMAIN_USER_RID_KRBTGT = $000001F6;
- {$EXTERNALSYM DOMAIN_USER_RID_KRBTGT}
-
- DOMAIN_USER_RID_MAX = $000003E7;
- {$EXTERNALSYM DOMAIN_USER_RID_MAX}
-
-// well-known groups ...
-
- DOMAIN_GROUP_RID_ADMINS = $00000200;
- {$EXTERNALSYM DOMAIN_GROUP_RID_ADMINS}
- DOMAIN_GROUP_RID_USERS = $00000201;
- {$EXTERNALSYM DOMAIN_GROUP_RID_USERS}
- DOMAIN_GROUP_RID_GUESTS = $00000202;
- {$EXTERNALSYM DOMAIN_GROUP_RID_GUESTS}
- DOMAIN_GROUP_RID_COMPUTERS = $00000203;
- {$EXTERNALSYM DOMAIN_GROUP_RID_COMPUTERS}
- DOMAIN_GROUP_RID_CONTROLLERS = $00000204;
- {$EXTERNALSYM DOMAIN_GROUP_RID_CONTROLLERS}
- DOMAIN_GROUP_RID_CERT_ADMINS = $00000205;
- {$EXTERNALSYM DOMAIN_GROUP_RID_CERT_ADMINS}
- DOMAIN_GROUP_RID_SCHEMA_ADMINS = $00000206;
- {$EXTERNALSYM DOMAIN_GROUP_RID_SCHEMA_ADMINS}
- DOMAIN_GROUP_RID_ENTERPRISE_ADMINS = $00000207;
- {$EXTERNALSYM DOMAIN_GROUP_RID_ENTERPRISE_ADMINS}
- DOMAIN_GROUP_RID_POLICY_ADMINS = $00000208;
- {$EXTERNALSYM DOMAIN_GROUP_RID_POLICY_ADMINS}
-
-// well-known aliases ...
-
- DOMAIN_ALIAS_RID_ADMINS = $00000220;
- {$EXTERNALSYM DOMAIN_ALIAS_RID_ADMINS}
- DOMAIN_ALIAS_RID_USERS = $00000221;
- {$EXTERNALSYM DOMAIN_ALIAS_RID_USERS}
- DOMAIN_ALIAS_RID_GUESTS = $00000222;
- {$EXTERNALSYM DOMAIN_ALIAS_RID_GUESTS}
- DOMAIN_ALIAS_RID_POWER_USERS = $00000223;
- {$EXTERNALSYM DOMAIN_ALIAS_RID_POWER_USERS}
-
- DOMAIN_ALIAS_RID_ACCOUNT_OPS = $00000224;
- {$EXTERNALSYM DOMAIN_ALIAS_RID_ACCOUNT_OPS}
- DOMAIN_ALIAS_RID_SYSTEM_OPS = $00000225;
- {$EXTERNALSYM DOMAIN_ALIAS_RID_SYSTEM_OPS}
- DOMAIN_ALIAS_RID_PRINT_OPS = $00000226;
- {$EXTERNALSYM DOMAIN_ALIAS_RID_PRINT_OPS}
- DOMAIN_ALIAS_RID_BACKUP_OPS = $00000227;
- {$EXTERNALSYM DOMAIN_ALIAS_RID_BACKUP_OPS}
-
- DOMAIN_ALIAS_RID_REPLICATOR = $00000228;
- {$EXTERNALSYM DOMAIN_ALIAS_RID_REPLICATOR}
- DOMAIN_ALIAS_RID_RAS_SERVERS = $00000229;
- {$EXTERNALSYM DOMAIN_ALIAS_RID_RAS_SERVERS}
- DOMAIN_ALIAS_RID_PREW2KCOMPACCESS = $0000022A;
- {$EXTERNALSYM DOMAIN_ALIAS_RID_PREW2KCOMPACCESS}
- DOMAIN_ALIAS_RID_REMOTE_DESKTOP_USERS = $0000022B;
- {$EXTERNALSYM DOMAIN_ALIAS_RID_REMOTE_DESKTOP_USERS}
- DOMAIN_ALIAS_RID_NETWORK_CONFIGURATION_OPS = $0000022C;
- {$EXTERNALSYM DOMAIN_ALIAS_RID_NETWORK_CONFIGURATION_OPS}
- DOMAIN_ALIAS_RID_INCOMING_FOREST_TRUST_BUILDERS = $0000022D;
- {$EXTERNALSYM DOMAIN_ALIAS_RID_INCOMING_FOREST_TRUST_BUILDERS}
-
- DOMAIN_ALIAS_RID_MONITORING_USERS = $0000022E;
- {$EXTERNALSYM DOMAIN_ALIAS_RID_MONITORING_USERS}
- DOMAIN_ALIAS_RID_LOGGING_USERS = $0000022F;
- {$EXTERNALSYM DOMAIN_ALIAS_RID_LOGGING_USERS}
- DOMAIN_ALIAS_RID_AUTHORIZATIONACCESS = $00000230;
- {$EXTERNALSYM DOMAIN_ALIAS_RID_AUTHORIZATIONACCESS}
- DOMAIN_ALIAS_RID_TS_LICENSE_SERVERS = $00000231;
- {$EXTERNALSYM DOMAIN_ALIAS_RID_TS_LICENSE_SERVERS}
-
-type
- WELL_KNOWN_SID_TYPE = (
- WinNullSid,
- WinWorldSid,
- WinLocalSid,
- WinCreatorOwnerSid,
- WinCreatorGroupSid,
- WinCreatorOwnerServerSid,
- WinCreatorGroupServerSid,
- WinNtAuthoritySid,
- WinDialupSid,
- WinNetworkSid,
- WinBatchSid,
- WinInteractiveSid,
- WinServiceSid,
- WinAnonymousSid,
- WinProxySid,
- WinEnterpriseControllersSid,
- WinSelfSid,
- WinAuthenticatedUserSid,
- WinRestrictedCodeSid,
- WinTerminalServerSid,
- WinRemoteLogonIdSid,
- WinLogonIdsSid,
- WinLocalSystemSid,
- WinLocalServiceSid,
- WinNetworkServiceSid,
- WinBuiltinDomainSid,
- WinBuiltinAdministratorsSid,
- WinBuiltinUsersSid,
- WinBuiltinGuestsSid,
- WinBuiltinPowerUsersSid,
- WinBuiltinAccountOperatorsSid,
- WinBuiltinSystemOperatorsSid,
- WinBuiltinPrintOperatorsSid,
- WinBuiltinBackupOperatorsSid,
- WinBuiltinReplicatorSid,
- WinBuiltinPreWindows2000CompatibleAccessSid,
- WinBuiltinRemoteDesktopUsersSid,
- WinBuiltinNetworkConfigurationOperatorsSid,
- WinAccountAdministratorSid,
- WinAccountGuestSid,
- WinAccountKrbtgtSid,
- WinAccountDomainAdminsSid,
- WinAccountDomainUsersSid,
- WinAccountDomainGuestsSid,
- WinAccountComputersSid,
- WinAccountControllersSid,
- WinAccountCertAdminsSid,
- WinAccountSchemaAdminsSid,
- WinAccountEnterpriseAdminsSid,
- WinAccountPolicyAdminsSid,
- WinAccountRasAndIasServersSid,
- WinNTLMAuthenticationSid,
- WinDigestAuthenticationSid,
- WinSChannelAuthenticationSid,
- WinThisOrganizationSid,
- WinOtherOrganizationSid,
- WinBuiltinIncomingForestTrustBuildersSid,
- WinBuiltinPerfMonitoringUsersSid,
- WinBuiltinPerfLoggingUsersSid,
- WinBuiltinAuthorizationAccessSid,
- WinBuiltinTerminalServerLicenseServersSid);
- {$EXTERNALSYM WELL_KNOWN_SID_TYPE}
- TWellKnownSidType = WELL_KNOWN_SID_TYPE;
-
-//
-// Allocate the System Luid. The first 1000 LUIDs are reserved.
-// Use #999 here (0x3E7 = 999)
-//
-
-const
- SYSTEM_LUID: LUID = (LowPart: $3E7; HighPart: $0);
- {$EXTERNALSYM SYSTEM_LUID}
- ANONYMOUS_LOGON_LUID: LUID = (LowPart: $3E6; HighPart: $0);
- {$EXTERNALSYM ANONYMOUS_LOGON_LUID}
- LOCALSERVICE_LUID: LUID = (LowPart: $3E5; HighPart: $0);
- {$EXTERNALSYM LOCALSERVICE_LUID}
- NETWORKSERVICE_LUID: LUID = (LowPart: $3E4; HighPart: $0);
- {$EXTERNALSYM NETWORKSERVICE_LUID}
-
-////////////////////////////////////////////////////////////////////////
-// //
-// User and Group related SID attributes //
-// //
-////////////////////////////////////////////////////////////////////////
-
-//
-// Group attributes
-//
-
- SE_GROUP_MANDATORY = $00000001;
- {$EXTERNALSYM SE_GROUP_MANDATORY}
- SE_GROUP_ENABLED_BY_DEFAULT = $00000002;
- {$EXTERNALSYM SE_GROUP_ENABLED_BY_DEFAULT}
- SE_GROUP_ENABLED = $00000004;
- {$EXTERNALSYM SE_GROUP_ENABLED}
- SE_GROUP_OWNER = $00000008;
- {$EXTERNALSYM SE_GROUP_OWNER}
- SE_GROUP_USE_FOR_DENY_ONLY = $00000010;
- {$EXTERNALSYM SE_GROUP_USE_FOR_DENY_ONLY}
- SE_GROUP_LOGON_ID = $C0000000;
- {$EXTERNALSYM SE_GROUP_LOGON_ID}
- SE_GROUP_RESOURCE = $20000000;
- {$EXTERNALSYM SE_GROUP_RESOURCE}
-
-//
-// User attributes
-//
-
-// (None yet defined.)
-
-////////////////////////////////////////////////////////////////////////
-// //
-// ACL and ACE //
-// //
-////////////////////////////////////////////////////////////////////////
-
-//
-// Define an ACL and the ACE format. The structure of an ACL header
-// followed by one or more ACEs. Pictorally the structure of an ACL header
-// is as follows:
-//
-// 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1
-// 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
-// +-------------------------------+---------------+---------------+
-// | AclSize | Sbz1 | AclRevision |
-// +-------------------------------+---------------+---------------+
-// | Sbz2 | AceCount |
-// +-------------------------------+-------------------------------+
-//
-// The current AclRevision is defined to be ACL_REVISION.
-//
-// AclSize is the size, in bytes, allocated for the ACL. This includes
-// the ACL header, ACES, and remaining free space in the buffer.
-//
-// AceCount is the number of ACES in the ACL.
-//
-
-// This is the *current* ACL revision
-
- ACL_REVISION = 2;
- {$EXTERNALSYM ACL_REVISION}
- ACL_REVISION_DS = 4;
- {$EXTERNALSYM ACL_REVISION_DS}
-
-// This is the history of ACL revisions. Add a new one whenever
-// ACL_REVISION is updated
-
- ACL_REVISION1 = 1;
- {$EXTERNALSYM ACL_REVISION1}
- ACL_REVISION2 = 2;
- {$EXTERNALSYM ACL_REVISION2}
- MIN_ACL_REVISION = ACL_REVISION2;
- {$EXTERNALSYM MIN_ACL_REVISION}
- ACL_REVISION3 = 3;
- {$EXTERNALSYM ACL_REVISION3}
- ACL_REVISION4 = 4;
- {$EXTERNALSYM ACL_REVISION4}
- MAX_ACL_REVISION = ACL_REVISION4;
- {$EXTERNALSYM MAX_ACL_REVISION}
-
-type
- PACL = ^ACL;
- {$EXTERNALSYM PACL}
- _ACL = record
- AclRevision: Byte;
- Sbz1: Byte;
- AclSize: Word;
- AceCount: Word;
- Sbz2: Word;
- end;
- {$EXTERNALSYM _ACL}
- ACL = _ACL;
- {$EXTERNALSYM ACL}
- TAcl = ACL;
-
- PPACL = ^PAcl;
- {$NODEFINE PPACL}
-
-//
-// The structure of an ACE is a common ace header followed by ace type
-// specific data. Pictorally the structure of the common ace header is
-// as follows:
-//
-// 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1
-// 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
-// +---------------+-------+-------+---------------+---------------+
-// | AceSize | AceFlags | AceType |
-// +---------------+-------+-------+---------------+---------------+
-//
-// AceType denotes the type of the ace, there are some predefined ace
-// types
-//
-// AceSize is the size, in bytes, of ace.
-//
-// AceFlags are the Ace flags for audit and inheritance, defined shortly.
-
-type
- PACE_HEADER = ^ACE_HEADER;
- {$EXTERNALSYM PACE_HEADER}
- _ACE_HEADER = record
- AceType: Byte;
- AceFlags: Byte;
- AceSize: Word;
- end;
- {$EXTERNALSYM _ACE_HEADER}
- ACE_HEADER = _ACE_HEADER;
- {$EXTERNALSYM ACE_HEADER}
- TAceHeader = ACE_HEADER;
- PAceHeader = PACE_HEADER;
-
-//
-// The following are the predefined ace types that go into the AceType
-// field of an Ace header.
-//
-
-const
- ACCESS_MIN_MS_ACE_TYPE = $0;
- {$EXTERNALSYM ACCESS_MIN_MS_ACE_TYPE}
- ACCESS_ALLOWED_ACE_TYPE = $0;
- {$EXTERNALSYM ACCESS_ALLOWED_ACE_TYPE}
- ACCESS_DENIED_ACE_TYPE = $1;
- {$EXTERNALSYM ACCESS_DENIED_ACE_TYPE}
- SYSTEM_AUDIT_ACE_TYPE = $2;
- {$EXTERNALSYM SYSTEM_AUDIT_ACE_TYPE}
- SYSTEM_ALARM_ACE_TYPE = $3;
- {$EXTERNALSYM SYSTEM_ALARM_ACE_TYPE}
- ACCESS_MAX_MS_V2_ACE_TYPE = $3;
- {$EXTERNALSYM ACCESS_MAX_MS_V2_ACE_TYPE}
-
- ACCESS_ALLOWED_COMPOUND_ACE_TYPE = $4;
- {$EXTERNALSYM ACCESS_ALLOWED_COMPOUND_ACE_TYPE}
- ACCESS_MAX_MS_V3_ACE_TYPE = $4;
- {$EXTERNALSYM ACCESS_MAX_MS_V3_ACE_TYPE}
-
- ACCESS_MIN_MS_OBJECT_ACE_TYPE = $5;
- {$EXTERNALSYM ACCESS_MIN_MS_OBJECT_ACE_TYPE}
- ACCESS_ALLOWED_OBJECT_ACE_TYPE = $5;
- {$EXTERNALSYM ACCESS_ALLOWED_OBJECT_ACE_TYPE}
- ACCESS_DENIED_OBJECT_ACE_TYPE = $6;
- {$EXTERNALSYM ACCESS_DENIED_OBJECT_ACE_TYPE}
- SYSTEM_AUDIT_OBJECT_ACE_TYPE = $7;
- {$EXTERNALSYM SYSTEM_AUDIT_OBJECT_ACE_TYPE}
- SYSTEM_ALARM_OBJECT_ACE_TYPE = $8;
- {$EXTERNALSYM SYSTEM_ALARM_OBJECT_ACE_TYPE}
- ACCESS_MAX_MS_OBJECT_ACE_TYPE = $8;
- {$EXTERNALSYM ACCESS_MAX_MS_OBJECT_ACE_TYPE}
-
- ACCESS_MAX_MS_V4_ACE_TYPE = $8;
- {$EXTERNALSYM ACCESS_MAX_MS_V4_ACE_TYPE}
- ACCESS_MAX_MS_ACE_TYPE = $8;
- {$EXTERNALSYM ACCESS_MAX_MS_ACE_TYPE}
-
- ACCESS_ALLOWED_CALLBACK_ACE_TYPE = $9;
- {$EXTERNALSYM ACCESS_ALLOWED_CALLBACK_ACE_TYPE}
- ACCESS_DENIED_CALLBACK_ACE_TYPE = $A;
- {$EXTERNALSYM ACCESS_DENIED_CALLBACK_ACE_TYPE}
- ACCESS_ALLOWED_CALLBACK_OBJECT_ACE_TYPE = $B;
- {$EXTERNALSYM ACCESS_ALLOWED_CALLBACK_OBJECT_ACE_TYPE}
- ACCESS_DENIED_CALLBACK_OBJECT_ACE_TYPE = $C;
- {$EXTERNALSYM ACCESS_DENIED_CALLBACK_OBJECT_ACE_TYPE}
- SYSTEM_AUDIT_CALLBACK_ACE_TYPE = $D;
- {$EXTERNALSYM SYSTEM_AUDIT_CALLBACK_ACE_TYPE}
- SYSTEM_ALARM_CALLBACK_ACE_TYPE = $E;
- {$EXTERNALSYM SYSTEM_ALARM_CALLBACK_ACE_TYPE}
- SYSTEM_AUDIT_CALLBACK_OBJECT_ACE_TYPE = $F;
- {$EXTERNALSYM SYSTEM_AUDIT_CALLBACK_OBJECT_ACE_TYPE}
- SYSTEM_ALARM_CALLBACK_OBJECT_ACE_TYPE = $10;
- {$EXTERNALSYM SYSTEM_ALARM_CALLBACK_OBJECT_ACE_TYPE}
-
- ACCESS_MAX_MS_V5_ACE_TYPE = $10;
- {$EXTERNALSYM ACCESS_MAX_MS_V5_ACE_TYPE}
-
-//
-// The following are the inherit flags that go into the AceFlags field
-// of an Ace header.
-//
-
- OBJECT_INHERIT_ACE = $1;
- {$EXTERNALSYM OBJECT_INHERIT_ACE}
- CONTAINER_INHERIT_ACE = $2;
- {$EXTERNALSYM CONTAINER_INHERIT_ACE}
- NO_PROPAGATE_INHERIT_ACE = $4;
- {$EXTERNALSYM NO_PROPAGATE_INHERIT_ACE}
- INHERIT_ONLY_ACE = $8;
- {$EXTERNALSYM INHERIT_ONLY_ACE}
- INHERITED_ACE = $10;
- {$EXTERNALSYM INHERITED_ACE}
- VALID_INHERIT_FLAGS = $1F;
- {$EXTERNALSYM VALID_INHERIT_FLAGS}
-
-// The following are the currently defined ACE flags that go into the
-// AceFlags field of an ACE header. Each ACE type has its own set of
-// AceFlags.
-//
-// SUCCESSFUL_ACCESS_ACE_FLAG - used only with system audit and alarm ACE
-// types to indicate that a message is generated for successful accesses.
-//
-// FAILED_ACCESS_ACE_FLAG - used only with system audit and alarm ACE types
-// to indicate that a message is generated for failed accesses.
-//
-
-//
-// SYSTEM_AUDIT and SYSTEM_ALARM AceFlags
-//
-// These control the signaling of audit and alarms for success or failure.
-//
-
- SUCCESSFUL_ACCESS_ACE_FLAG = $40;
- {$EXTERNALSYM SUCCESSFUL_ACCESS_ACE_FLAG}
- FAILED_ACCESS_ACE_FLAG = $80;
- {$EXTERNALSYM FAILED_ACCESS_ACE_FLAG}
-
-//
-// We'll define the structure of the predefined ACE types. Pictorally
-// the structure of the predefined ACE's is as follows:
-//
-// 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1
-// 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
-// +---------------+-------+-------+---------------+---------------+
-// | AceFlags | Resd |Inherit| AceSize | AceType |
-// +---------------+-------+-------+---------------+---------------+
-// | Mask |
-// +---------------------------------------------------------------+
-// | |
-// + +
-// | |
-// + Sid +
-// | |
-// + +
-// | |
-// +---------------------------------------------------------------+
-//
-// Mask is the access mask associated with the ACE. This is either the
-// access allowed, access denied, audit, or alarm mask.
-//
-// Sid is the Sid associated with the ACE.
-//
-
-// The following are the four predefined ACE types.
-
-// Examine the AceType field in the Header to determine
-// which structure is appropriate to use for casting.
-
-type
- PACCESS_ALLOWED_ACE = ^ACCESS_ALLOWED_ACE;
- {$EXTERNALSYM PACCESS_ALLOWED_ACE}
- _ACCESS_ALLOWED_ACE = record
- Header: ACE_HEADER;
- Mask: ACCESS_MASK;
- SidStart: DWORD;
- end;
- {$EXTERNALSYM _ACCESS_ALLOWED_ACE}
- ACCESS_ALLOWED_ACE = _ACCESS_ALLOWED_ACE;
- {$EXTERNALSYM ACCESS_ALLOWED_ACE}
- TAccessAllowedAce = ACCESS_ALLOWED_ACE;
- PAccessAllowedAce = PACCESS_ALLOWED_ACE;
-
- PACCESS_DENIED_ACE = ^ACCESS_DENIED_ACE;
- {$EXTERNALSYM PACCESS_DENIED_ACE}
- _ACCESS_DENIED_ACE = record
- Header: ACE_HEADER;
- Mask: ACCESS_MASK;
- SidStart: DWORD;
- end;
- {$EXTERNALSYM _ACCESS_DENIED_ACE}
- ACCESS_DENIED_ACE = _ACCESS_DENIED_ACE;
- {$EXTERNALSYM ACCESS_DENIED_ACE}
- TAccessDeniedAce = ACCESS_DENIED_ACE;
- PAccessDeniedAce = PACCESS_DENIED_ACE;
-
- PSYSTEM_AUDIT_ACE = ^SYSTEM_AUDIT_ACE;
- {$EXTERNALSYM PSYSTEM_AUDIT_ACE}
- _SYSTEM_AUDIT_ACE = record
- Header: ACE_HEADER;
- Mask: ACCESS_MASK;
- SidStart: DWORD;
- end;
- {$EXTERNALSYM _SYSTEM_AUDIT_ACE}
- SYSTEM_AUDIT_ACE = _SYSTEM_AUDIT_ACE;
- {$EXTERNALSYM SYSTEM_AUDIT_ACE}
- TSystemAuditAce = SYSTEM_AUDIT_ACE;
- PSystemAuditAce = PSYSTEM_AUDIT_ACE;
-
- PSYSTEM_ALARM_ACE = ^SYSTEM_ALARM_ACE;
- {$EXTERNALSYM PSYSTEM_ALARM_ACE}
- _SYSTEM_ALARM_ACE = record
- Header: ACE_HEADER;
- Mask: ACCESS_MASK;
- SidStart: DWORD;
- end;
- {$EXTERNALSYM _SYSTEM_ALARM_ACE}
- SYSTEM_ALARM_ACE = _SYSTEM_ALARM_ACE;
- {$EXTERNALSYM SYSTEM_ALARM_ACE}
- TSystemAlarmAce = SYSTEM_ALARM_ACE;
- PSystemAlarmAce = PSYSTEM_ALARM_ACE;
-
- PACCESS_ALLOWED_OBJECT_ACE = ^ACCESS_ALLOWED_OBJECT_ACE;
- {$EXTERNALSYM PACCESS_ALLOWED_OBJECT_ACE}
- _ACCESS_ALLOWED_OBJECT_ACE = record
- Header: ACE_HEADER;
- Mask: ACCESS_MASK;
- Flags: DWORD;
- ObjectType: GUID;
- InheritedObjectType: GUID;
- SidStart: DWORD;
- end;
- {$EXTERNALSYM _ACCESS_ALLOWED_OBJECT_ACE}
- ACCESS_ALLOWED_OBJECT_ACE = _ACCESS_ALLOWED_OBJECT_ACE;
- {$EXTERNALSYM ACCESS_ALLOWED_OBJECT_ACE}
- TAccessAllowedObjectAce = ACCESS_ALLOWED_OBJECT_ACE;
- PAccessAllowedObjectAce = PACCESS_ALLOWED_OBJECT_ACE;
-
- PACCESS_DENIED_OBJECT_ACE = ^ACCESS_DENIED_OBJECT_ACE;
- {$EXTERNALSYM PACCESS_DENIED_OBJECT_ACE}
- _ACCESS_DENIED_OBJECT_ACE = record
- Header: ACE_HEADER;
- Mask: ACCESS_MASK;
- Flags: DWORD;
- ObjectType: GUID;
- InheritedObjectType: GUID;
- SidStart: DWORD;
- end;
- {$EXTERNALSYM _ACCESS_DENIED_OBJECT_ACE}
- ACCESS_DENIED_OBJECT_ACE = _ACCESS_DENIED_OBJECT_ACE;
- {$EXTERNALSYM ACCESS_DENIED_OBJECT_ACE}
- TAccessDeniedObjectAce = ACCESS_DENIED_OBJECT_ACE;
- PAccessDeniedObjectAce = PACCESS_DENIED_OBJECT_ACE;
-
- PSYSTEM_AUDIT_OBJECT_ACE = ^SYSTEM_AUDIT_OBJECT_ACE;
- {$EXTERNALSYM PSYSTEM_AUDIT_OBJECT_ACE}
- _SYSTEM_AUDIT_OBJECT_ACE = record
- Header: ACE_HEADER;
- Mask: ACCESS_MASK;
- Flags: DWORD;
- ObjectType: GUID;
- InheritedObjectType: GUID;
- SidStart: DWORD;
- end;
- {$EXTERNALSYM _SYSTEM_AUDIT_OBJECT_ACE}
- SYSTEM_AUDIT_OBJECT_ACE = _SYSTEM_AUDIT_OBJECT_ACE;
- {$EXTERNALSYM SYSTEM_AUDIT_OBJECT_ACE}
- TSystemAuditObjectAce = SYSTEM_AUDIT_OBJECT_ACE;
- PSystemAuditObjectAce = PSYSTEM_AUDIT_OBJECT_ACE;
-
- PSYSTEM_ALARM_OBJECT_ACE = ^SYSTEM_ALARM_OBJECT_ACE;
- {$EXTERNALSYM PSYSTEM_ALARM_OBJECT_ACE}
- _SYSTEM_ALARM_OBJECT_ACE = record
- Header: ACE_HEADER;
- Mask: ACCESS_MASK;
- Flags: DWORD;
- ObjectType: GUID;
- InheritedObjectType: GUID;
- SidStart: DWORD;
- end;
- {$EXTERNALSYM _SYSTEM_ALARM_OBJECT_ACE}
- SYSTEM_ALARM_OBJECT_ACE = _SYSTEM_ALARM_OBJECT_ACE;
- {$EXTERNALSYM SYSTEM_ALARM_OBJECT_ACE}
- TSystemAlarmObjectAce = SYSTEM_ALARM_OBJECT_ACE;
- PSystemAlarmObjectAce = PSYSTEM_ALARM_OBJECT_ACE;
-
-//
-// Callback ace support in post Win2000.
-// Resource managers can put their own data after Sidstart + Length of the sid
-//
-
- _ACCESS_ALLOWED_CALLBACK_ACE = record
- Header: ACE_HEADER;
- Mask: ACCESS_MASK;
- SidStart: DWORD;
- // Opaque resouce manager specific data
- end;
- {$EXTERNALSYM _ACCESS_ALLOWED_CALLBACK_ACE}
- ACCESS_ALLOWED_CALLBACK_ACE = _ACCESS_ALLOWED_CALLBACK_ACE;
- {$EXTERNALSYM ACCESS_ALLOWED_CALLBACK_ACE}
- PACCESS_ALLOWED_CALLBACK_ACE = ^ACCESS_ALLOWED_CALLBACK_ACE;
- {$EXTERNALSYM PACCESS_ALLOWED_CALLBACK_ACE}
- TAccessAllowedCallBackAce = ACCESS_ALLOWED_CALLBACK_ACE;
- PAccessAllowedCallBackAce = PACCESS_ALLOWED_CALLBACK_ACE;
-
- _ACCESS_DENIED_CALLBACK_ACE = record
- Header: ACE_HEADER;
- Mask: ACCESS_MASK;
- SidStart: DWORD;
- // Opaque resouce manager specific data
- end;
- {$EXTERNALSYM _ACCESS_DENIED_CALLBACK_ACE}
- ACCESS_DENIED_CALLBACK_ACE = _ACCESS_DENIED_CALLBACK_ACE;
- {$EXTERNALSYM ACCESS_DENIED_CALLBACK_ACE}
- PACCESS_DENIED_CALLBACK_ACE = ^ACCESS_DENIED_CALLBACK_ACE;
- {$EXTERNALSYM PACCESS_DENIED_CALLBACK_ACE}
- TAccessDeniedCallBackAce = ACCESS_DENIED_CALLBACK_ACE;
- PAccessDeniedCallBackAce = PACCESS_DENIED_CALLBACK_ACE;
-
- _SYSTEM_AUDIT_CALLBACK_ACE = record
- Header: ACE_HEADER;
- Mask: ACCESS_MASK;
- SidStart: DWORD;
- // Opaque resouce manager specific data
- end;
- {$EXTERNALSYM _SYSTEM_AUDIT_CALLBACK_ACE}
- SYSTEM_AUDIT_CALLBACK_ACE = _SYSTEM_AUDIT_CALLBACK_ACE;
- {$EXTERNALSYM SYSTEM_AUDIT_CALLBACK_ACE}
- PSYSTEM_AUDIT_CALLBACK_ACE = ^SYSTEM_AUDIT_CALLBACK_ACE;
- {$EXTERNALSYM PSYSTEM_AUDIT_CALLBACK_ACE}
- TSystemAuditCallBackAce = SYSTEM_AUDIT_CALLBACK_ACE;
- PSystemAuditCallBackAce = PSYSTEM_AUDIT_CALLBACK_ACE;
-
- _SYSTEM_ALARM_CALLBACK_ACE = record
- Header: ACE_HEADER;
- Mask: ACCESS_MASK;
- SidStart: DWORD;
- // Opaque resouce manager specific data
- end;
- {$EXTERNALSYM _SYSTEM_ALARM_CALLBACK_ACE}
- SYSTEM_ALARM_CALLBACK_ACE = _SYSTEM_ALARM_CALLBACK_ACE;
- {$EXTERNALSYM SYSTEM_ALARM_CALLBACK_ACE}
- PSYSTEM_ALARM_CALLBACK_ACE = ^SYSTEM_ALARM_CALLBACK_ACE;
- {$EXTERNALSYM PSYSTEM_ALARM_CALLBACK_ACE}
- TSystemAlarmCallBackAce = SYSTEM_ALARM_CALLBACK_ACE;
- PSystemAlarmCallBackAce = PSYSTEM_ALARM_CALLBACK_ACE;
-
- _ACCESS_ALLOWED_CALLBACK_OBJECT_ACE = record
- Header: ACE_HEADER;
- Mask: ACCESS_MASK;
- Flags: DWORD;
- ObjectType: GUID;
- InheritedObjectType: GUID;
- SidStart: DWORD;
- // Opaque resouce manager specific data
- end;
- {$EXTERNALSYM _ACCESS_ALLOWED_CALLBACK_OBJECT_ACE}
- ACCESS_ALLOWED_CALLBACK_OBJECT_ACE = _ACCESS_ALLOWED_CALLBACK_OBJECT_ACE;
- {$EXTERNALSYM ACCESS_ALLOWED_CALLBACK_OBJECT_ACE}
- PACCESS_ALLOWED_CALLBACK_OBJECT_ACE = ^ACCESS_ALLOWED_CALLBACK_OBJECT_ACE;
- {$EXTERNALSYM PACCESS_ALLOWED_CALLBACK_OBJECT_ACE}
- TAccessAllowedCallBackObjectAce = ACCESS_ALLOWED_CALLBACK_OBJECT_ACE;
- PAccessAllowedCallBackObjectAce = PACCESS_ALLOWED_CALLBACK_OBJECT_ACE;
-
- _ACCESS_DENIED_CALLBACK_OBJECT_ACE = record
- Header: ACE_HEADER;
- Mask: ACCESS_MASK;
- Flags: DWORD;
- ObjectType: GUID;
- InheritedObjectType: GUID;
- SidStart: DWORD;
- // Opaque resouce manager specific data
- end;
- {$EXTERNALSYM _ACCESS_DENIED_CALLBACK_OBJECT_ACE}
- ACCESS_DENIED_CALLBACK_OBJECT_ACE = _ACCESS_DENIED_CALLBACK_OBJECT_ACE;
- {$EXTERNALSYM ACCESS_DENIED_CALLBACK_OBJECT_ACE}
- PACCESS_DENIED_CALLBACK_OBJECT_ACE = ^ACCESS_DENIED_CALLBACK_OBJECT_ACE;
- {$EXTERNALSYM PACCESS_DENIED_CALLBACK_OBJECT_ACE}
- TAccessDeniedCallBackObjectAce = ACCESS_DENIED_CALLBACK_OBJECT_ACE;
- PAccessDeniedCallBackObjectAce = PACCESS_DENIED_CALLBACK_OBJECT_ACE;
-
- _SYSTEM_AUDIT_CALLBACK_OBJECT_ACE = record
- Header: ACE_HEADER;
- Mask: ACCESS_MASK;
- Flags: DWORD;
- ObjectType: GUID;
- InheritedObjectType: GUID;
- SidStart: DWORD;
- // Opaque resouce manager specific data
- end;
- {$EXTERNALSYM _SYSTEM_AUDIT_CALLBACK_OBJECT_ACE}
- SYSTEM_AUDIT_CALLBACK_OBJECT_ACE = _SYSTEM_AUDIT_CALLBACK_OBJECT_ACE;
- {$EXTERNALSYM SYSTEM_AUDIT_CALLBACK_OBJECT_ACE}
- PSYSTEM_AUDIT_CALLBACK_OBJECT_ACE = ^SYSTEM_AUDIT_CALLBACK_OBJECT_ACE;
- {$EXTERNALSYM PSYSTEM_AUDIT_CALLBACK_OBJECT_ACE}
- TSystemAuditCallBackObjectAce = SYSTEM_AUDIT_CALLBACK_OBJECT_ACE;
- PSystemAuditCallBackObjectAce = PSYSTEM_AUDIT_CALLBACK_OBJECT_ACE;
-
- _SYSTEM_ALARM_CALLBACK_OBJECT_ACE = record
- Header: ACE_HEADER;
- Mask: ACCESS_MASK;
- Flags: DWORD;
- ObjectType: GUID;
- InheritedObjectType: GUID;
- SidStart: DWORD;
- // Opaque resouce manager specific data
- end;
- {$EXTERNALSYM _SYSTEM_ALARM_CALLBACK_OBJECT_ACE}
- SYSTEM_ALARM_CALLBACK_OBJECT_ACE = _SYSTEM_ALARM_CALLBACK_OBJECT_ACE;
- {$EXTERNALSYM SYSTEM_ALARM_CALLBACK_OBJECT_ACE}
- PSYSTEM_ALARM_CALLBACK_OBJECT_ACE = ^SYSTEM_ALARM_CALLBACK_OBJECT_ACE;
- {$EXTERNALSYM PSYSTEM_ALARM_CALLBACK_OBJECT_ACE}
- TSystemAlarmCallBackObjectAce = SYSTEM_ALARM_CALLBACK_OBJECT_ACE;
- PSystemAlarmCallBackObjectAce = PSYSTEM_ALARM_CALLBACK_OBJECT_ACE;
-
-//
-// Currently define Flags for "OBJECT" ACE types.
-//
-
-const
- ACE_OBJECT_TYPE_PRESENT = $1;
- {$EXTERNALSYM ACE_OBJECT_TYPE_PRESENT}
- ACE_INHERITED_OBJECT_TYPE_PRESENT = $2;
- {$EXTERNALSYM ACE_INHERITED_OBJECT_TYPE_PRESENT}
-
-//
-// The following declarations are used for setting and querying information
-// about and ACL. First are the various information classes available to
-// the user.
-//
-
- AclRevisionInformation = 1;
- {$EXTERNALSYM AclRevisionInformation}
- AclSizeInformation = 2;
- {$EXTERNALSYM AclSizeInformation}
-
-type
- _ACL_INFORMATION_CLASS = DWORD;
- {$EXTERNALSYM _ACL_INFORMATION_CLASS}
- ACL_INFORMATION_CLASS = _ACL_INFORMATION_CLASS;
- {$EXTERNALSYM ACL_INFORMATION_CLASS}
- TAclInformationClass = ACL_INFORMATION_CLASS;
-
-//
-// This record is returned/sent if the user is requesting/setting the
-// AclRevisionInformation
-//
-
- PACL_REVISION_INFORMATION = ^ACL_REVISION_INFORMATION;
- {$EXTERNALSYM PACL_REVISION_INFORMATION}
- _ACL_REVISION_INFORMATION = record
- AclRevision: DWORD;
- end;
- {$EXTERNALSYM _ACL_REVISION_INFORMATION}
- ACL_REVISION_INFORMATION = _ACL_REVISION_INFORMATION;
- {$EXTERNALSYM ACL_REVISION_INFORMATION}
- TAclRevisionInformation = ACL_REVISION_INFORMATION;
- PAclRevisionInformation = PACL_REVISION_INFORMATION;
-
-//
-// This record is returned if the user is requesting AclSizeInformation
-//
-
- PACL_SIZE_INFORMATION = ^ACL_SIZE_INFORMATION;
- {$EXTERNALSYM PACL_SIZE_INFORMATION}
- _ACL_SIZE_INFORMATION = record
- AceCount: DWORD;
- AclBytesInUse: DWORD;
- AclBytesFree: DWORD;
- end;
- {$EXTERNALSYM _ACL_SIZE_INFORMATION}
- ACL_SIZE_INFORMATION = _ACL_SIZE_INFORMATION;
- {$EXTERNALSYM ACL_SIZE_INFORMATION}
- TAclSizeInformation = ACL_SIZE_INFORMATION;
- PAclSizeInformation = PACL_SIZE_INFORMATION;
-
-////////////////////////////////////////////////////////////////////////
-// //
-// SECURITY_DESCRIPTOR //
-// //
-////////////////////////////////////////////////////////////////////////
-//
-// Define the Security Descriptor and related data types.
-// This is an opaque data structure.
-//
-
-//
-// Current security descriptor revision value
-//
-
-const
- SECURITY_DESCRIPTOR_REVISION = 1;
- {$EXTERNALSYM SECURITY_DESCRIPTOR_REVISION}
- SECURITY_DESCRIPTOR_REVISION1 = 1;
- {$EXTERNALSYM SECURITY_DESCRIPTOR_REVISION1}
-
-type
- SECURITY_DESCRIPTOR_CONTROL = WORD;
- {$EXTERNALSYM SECURITY_DESCRIPTOR_CONTROL}
- PSECURITY_DESCRIPTOR_CONTROL = ^SECURITY_DESCRIPTOR_CONTROL;
- {$EXTERNALSYM PSECURITY_DESCRIPTOR_CONTROL}
- TSecurityDescriptorControl = SECURITY_DESCRIPTOR_CONTROL;
- PSecurityDescriptorControl = PSECURITY_DESCRIPTOR_CONTROL;
-
-const
- SE_OWNER_DEFAULTED = $0001;
- {$EXTERNALSYM SE_OWNER_DEFAULTED}
- SE_GROUP_DEFAULTED = $0002;
- {$EXTERNALSYM SE_GROUP_DEFAULTED}
- SE_DACL_PRESENT = $0004;
- {$EXTERNALSYM SE_DACL_PRESENT}
- SE_DACL_DEFAULTED = $0008;
- {$EXTERNALSYM SE_DACL_DEFAULTED}
- SE_SACL_PRESENT = $0010;
- {$EXTERNALSYM SE_SACL_PRESENT}
- SE_SACL_DEFAULTED = $0020;
- {$EXTERNALSYM SE_SACL_DEFAULTED}
- SE_DACL_AUTO_INHERIT_REQ = $0100;
- {$EXTERNALSYM SE_DACL_AUTO_INHERIT_REQ}
- SE_SACL_AUTO_INHERIT_REQ = $0200;
- {$EXTERNALSYM SE_SACL_AUTO_INHERIT_REQ}
- SE_DACL_AUTO_INHERITED = $0400;
- {$EXTERNALSYM SE_DACL_AUTO_INHERITED}
- SE_SACL_AUTO_INHERITED = $0800;
- {$EXTERNALSYM SE_SACL_AUTO_INHERITED}
- SE_DACL_PROTECTED = $1000;
- {$EXTERNALSYM SE_DACL_PROTECTED}
- SE_SACL_PROTECTED = $2000;
- {$EXTERNALSYM SE_SACL_PROTECTED}
- SE_RM_CONTROL_VALID = $4000;
- {$EXTERNALSYM SE_RM_CONTROL_VALID}
- SE_SELF_RELATIVE = $8000;
- {$EXTERNALSYM SE_SELF_RELATIVE}
-
-//
-// Where:
-//
-// SE_OWNER_DEFAULTED - This boolean flag, when set, indicates that the
-// SID pointed to by the Owner field was provided by a
-// defaulting mechanism rather than explicitly provided by the
-// original provider of the security descriptor. This may
-// affect the treatment of the SID with respect to inheritence
-// of an owner.
-//
-// SE_GROUP_DEFAULTED - This boolean flag, when set, indicates that the
-// SID in the Group field was provided by a defaulting mechanism
-// rather than explicitly provided by the original provider of
-// the security descriptor. This may affect the treatment of
-// the SID with respect to inheritence of a primary group.
-//
-// SE_DACL_PRESENT - This boolean flag, when set, indicates that the
-// security descriptor contains a discretionary ACL. If this
-// flag is set and the Dacl field of the SECURITY_DESCRIPTOR is
-// null, then a null ACL is explicitly being specified.
-//
-// SE_DACL_DEFAULTED - This boolean flag, when set, indicates that the
-// ACL pointed to by the Dacl field was provided by a defaulting
-// mechanism rather than explicitly provided by the original
-// provider of the security descriptor. This may affect the
-// treatment of the ACL with respect to inheritence of an ACL.
-// This flag is ignored if the DaclPresent flag is not set.
-//
-// SE_SACL_PRESENT - This boolean flag, when set, indicates that the
-// security descriptor contains a system ACL pointed to by the
-// Sacl field. If this flag is set and the Sacl field of the
-// SECURITY_DESCRIPTOR is null, then an empty (but present)
-// ACL is being specified.
-//
-// SE_SACL_DEFAULTED - This boolean flag, when set, indicates that the
-// ACL pointed to by the Sacl field was provided by a defaulting
-// mechanism rather than explicitly provided by the original
-// provider of the security descriptor. This may affect the
-// treatment of the ACL with respect to inheritence of an ACL.
-// This flag is ignored if the SaclPresent flag is not set.
-//
-// SE_SELF_RELATIVE - This boolean flag, when set, indicates that the
-// security descriptor is in self-relative form. In this form,
-// all fields of the security descriptor are contiguous in memory
-// and all pointer fields are expressed as offsets from the
-// beginning of the security descriptor. This form is useful
-// for treating security descriptors as opaque data structures
-// for transmission in communication protocol or for storage on
-// secondary media.
-//
-//
-//
-// Pictorially the structure of a security descriptor is as follows:
-//
-// 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1
-// 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
-// +---------------------------------------------------------------+
-// | Control |Reserved1 (SBZ)| Revision |
-// +---------------------------------------------------------------+
-// | Owner |
-// +---------------------------------------------------------------+
-// | Group |
-// +---------------------------------------------------------------+
-// | Sacl |
-// +---------------------------------------------------------------+
-// | Dacl |
-// +---------------------------------------------------------------+
-//
-// In general, this data structure should be treated opaquely to ensure future
-// compatibility.
-//
-//
-
-type
- PSECURITY_DESCRIPTOR_RELATIVE = ^SECURITY_DESCRIPTOR_RELATIVE;
- {$EXTERNALSYM PSECURITY_DESCRIPTOR_RELATIVE}
- _SECURITY_DESCRIPTOR_RELATIVE = record
- Revision: Byte;
- Sbz1: Byte;
- Control: SECURITY_DESCRIPTOR_CONTROL;
- Owner: DWORD;
- Group: DWORD;
- Sacl: DWORD;
- Dacl: DWORD;
- end;
- {$EXTERNALSYM _SECURITY_DESCRIPTOR_RELATIVE}
- SECURITY_DESCRIPTOR_RELATIVE = _SECURITY_DESCRIPTOR_RELATIVE;
- {$EXTERNALSYM SECURITY_DESCRIPTOR_RELATIVE}
- TSecurityDescriptorRelative = SECURITY_DESCRIPTOR_RELATIVE;
- PSecurityDescriptorRelative = PSECURITY_DESCRIPTOR_RELATIVE;
-
- PSECURITY_DESCRIPTOR = ^SECURITY_DESCRIPTOR;
- {$EXTERNALSYM PSECURITY_DESCRIPTOR}
- _SECURITY_DESCRIPTOR = record
- Revision: Byte;
- Sbz1: Byte;
- Control: SECURITY_DESCRIPTOR_CONTROL;
- Owner: PSID;
- Group: PSID;
- Sacl: PACL;
- Dacl: PACL;
- end;
- {$EXTERNALSYM _SECURITY_DESCRIPTOR}
- SECURITY_DESCRIPTOR = _SECURITY_DESCRIPTOR;
- {$EXTERNALSYM SECURITY_DESCRIPTOR}
- TSecurityDescriptor = SECURITY_DESCRIPTOR;
- PSecurityDescriptor = PSECURITY_DESCRIPTOR;
-
- PPSECURITY_DESCRIPTOR = ^PSECURITY_DESCRIPTOR;
- {$NODEFINE PPSECURITY_DESCRIPTOR}
-
-const
- SECURITY_DESCRIPTOR_MIN_LENGTH = SizeOf(SECURITY_DESCRIPTOR);
- {$EXTERNALSYM SECURITY_DESCRIPTOR_MIN_LENGTH}
-
-// Where:
-//
-// Revision - Contains the revision level of the security
-// descriptor. This allows this structure to be passed between
-// systems or stored on disk even though it is expected to
-// change in the future.
-//
-// Control - A set of flags which qualify the meaning of the
-// security descriptor or individual fields of the security
-// descriptor.
-//
-// Owner - is a pointer to an SID representing an object's owner.
-// If this field is null, then no owner SID is present in the
-// security descriptor. If the security descriptor is in
-// self-relative form, then this field contains an offset to
-// the SID, rather than a pointer.
-//
-// Group - is a pointer to an SID representing an object's primary
-// group. If this field is null, then no primary group SID is
-// present in the security descriptor. If the security descriptor
-// is in self-relative form, then this field contains an offset to
-// the SID, rather than a pointer.
-//
-// Sacl - is a pointer to a system ACL. This field value is only
-// valid if the DaclPresent control flag is set. If the
-// SaclPresent flag is set and this field is null, then a null
-// ACL is specified. If the security descriptor is in
-// self-relative form, then this field contains an offset to
-// the ACL, rather than a pointer.
-//
-// Dacl - is a pointer to a discretionary ACL. This field value is
-// only valid if the DaclPresent control flag is set. If the
-// DaclPresent flag is set and this field is null, then a null
-// ACL (unconditionally granting access) is specified. If the
-// security descriptor is in self-relative form, then this field
-// contains an offset to the ACL, rather than a pointer.
-//
-
-////////////////////////////////////////////////////////////////////////
-// //
-// Object Type list for AccessCheckByType //
-// //
-////////////////////////////////////////////////////////////////////////
-
-type
- POBJECT_TYPE_LIST = ^OBJECT_TYPE_LIST;
- {$EXTERNALSYM POBJECT_TYPE_LIST}
- _OBJECT_TYPE_LIST = record
- Level: Word;
- Sbz: Word;
- ObjectType: PGUID;
- end;
- {$EXTERNALSYM _OBJECT_TYPE_LIST}
- OBJECT_TYPE_LIST = _OBJECT_TYPE_LIST;
- {$EXTERNALSYM OBJECT_TYPE_LIST}
- TObjectTypeList = OBJECT_TYPE_LIST;
- PObjectTypeList = POBJECT_TYPE_LIST;
-
-//
-// DS values for Level
-//
-
-const
- ACCESS_OBJECT_GUID = 0;
- {$EXTERNALSYM ACCESS_OBJECT_GUID}
- ACCESS_PROPERTY_SET_GUID = 1;
- {$EXTERNALSYM ACCESS_PROPERTY_SET_GUID}
- ACCESS_PROPERTY_GUID = 2;
- {$EXTERNALSYM ACCESS_PROPERTY_GUID}
-
- ACCESS_MAX_LEVEL = 4;
- {$EXTERNALSYM ACCESS_MAX_LEVEL}
-
-//
-// Parameters to NtAccessCheckByTypeAndAditAlarm
-//
-
-type
- _AUDIT_EVENT_TYPE = (AuditEventObjectAccess, AuditEventDirectoryServiceAccess);
- {$EXTERNALSYM _AUDIT_EVENT_TYPE}
- AUDIT_EVENT_TYPE = _AUDIT_EVENT_TYPE;
- {$EXTERNALSYM AUDIT_EVENT_TYPE}
- PAUDIT_EVENT_TYPE = ^AUDIT_EVENT_TYPE;
- {$EXTERNALSYM PAUDIT_EVENT_TYPE}
- TAuditEventType = AUDIT_EVENT_TYPE;
- PAuditEventType = PAUDIT_EVENT_TYPE;
-
-const
- AUDIT_ALLOW_NO_PRIVILEGE = $1;
- {$EXTERNALSYM AUDIT_ALLOW_NO_PRIVILEGE}
-
-//
-// DS values for Source and ObjectTypeName
-//
-
- ACCESS_DS_SOURCE_A = 'DS';
- {$EXTERNALSYM ACCESS_DS_SOURCE_A}
- ACCESS_DS_SOURCE_W = WideString('DS');
- {$EXTERNALSYM ACCESS_DS_SOURCE_W}
- ACCESS_DS_OBJECT_TYPE_NAME_A = 'Directory Service Object';
- {$EXTERNALSYM ACCESS_DS_OBJECT_TYPE_NAME_A}
- ACCESS_DS_OBJECT_TYPE_NAME_W = WideString('Directory Service Object');
- {$EXTERNALSYM ACCESS_DS_OBJECT_TYPE_NAME_W}
-
-////////////////////////////////////////////////////////////////////////
-// //
-// Privilege Related Data Structures //
-// //
-////////////////////////////////////////////////////////////////////////
-
-//
-// Privilege attributes
-//
-
-const
- SE_PRIVILEGE_ENABLED_BY_DEFAULT = $00000001;
- {$EXTERNALSYM SE_PRIVILEGE_ENABLED_BY_DEFAULT}
- SE_PRIVILEGE_ENABLED = $00000002;
- {$EXTERNALSYM SE_PRIVILEGE_ENABLED}
- SE_PRIVILEGE_REMOVED = $00000004;
- {$EXTERNALSYM SE_PRIVILEGE_REMOVED}
- SE_PRIVILEGE_USED_FOR_ACCESS = DWORD($80000000);
- {$EXTERNALSYM SE_PRIVILEGE_USED_FOR_ACCESS}
-
-//
-// Privilege Set Control flags
-//
-
- PRIVILEGE_SET_ALL_NECESSARY = 1;
- {$EXTERNALSYM PRIVILEGE_SET_ALL_NECESSARY}
-
-//
-// Privilege Set - This is defined for a privilege set of one.
-// If more than one privilege is needed, then this structure
-// will need to be allocated with more space.
-//
-// Note: don't change this structure without fixing the INITIAL_PRIVILEGE_SET
-// structure (defined in se.h)
-//
-
-type
- PPRIVILEGE_SET = ^PRIVILEGE_SET;
- {$EXTERNALSYM PPRIVILEGE_SET}
- _PRIVILEGE_SET = record
- PrivilegeCount: DWORD;
- Control: DWORD;
- Privilege: array [0..ANYSIZE_ARRAY - 1] of LUID_AND_ATTRIBUTES;
- //Privilege: LUID_AND_ATTRIBUTES;
- end;
- {$EXTERNALSYM _PRIVILEGE_SET}
- PRIVILEGE_SET = _PRIVILEGE_SET;
- {$EXTERNALSYM PRIVILEGE_SET}
- TPrivilegeSet = PRIVILEGE_SET;
- PPrivilegeSet = PPRIVILEGE_SET;
-
-////////////////////////////////////////////////////////////////////////
-// //
-// NT Defined Privileges //
-// //
-////////////////////////////////////////////////////////////////////////
-
-const
- SE_CREATE_TOKEN_NAME = 'SeCreateTokenPrivilege';
- {$EXTERNALSYM SE_CREATE_TOKEN_NAME}
- SE_ASSIGNPRIMARYTOKEN_NAME = 'SeAssignPrimaryTokenPrivilege';
- {$EXTERNALSYM SE_ASSIGNPRIMARYTOKEN_NAME}
- SE_LOCK_MEMORY_NAME = 'SeLockMemoryPrivilege';
- {$EXTERNALSYM SE_LOCK_MEMORY_NAME}
- SE_INCREASE_QUOTA_NAME = 'SeIncreaseQuotaPrivilege';
- {$EXTERNALSYM SE_INCREASE_QUOTA_NAME}
- SE_UNSOLICITED_INPUT_NAME = 'SeUnsolicitedInputPrivilege';
- {$EXTERNALSYM SE_UNSOLICITED_INPUT_NAME}
- SE_MACHINE_ACCOUNT_NAME = 'SeMachineAccountPrivilege';
- {$EXTERNALSYM SE_MACHINE_ACCOUNT_NAME}
- SE_TCB_NAME = 'SeTcbPrivilege';
- {$EXTERNALSYM SE_TCB_NAME}
- SE_SECURITY_NAME = 'SeSecurityPrivilege';
- {$EXTERNALSYM SE_SECURITY_NAME}
- SE_TAKE_OWNERSHIP_NAME = 'SeTakeOwnershipPrivilege';
- {$EXTERNALSYM SE_TAKE_OWNERSHIP_NAME}
- SE_LOAD_DRIVER_NAME = 'SeLoadDriverPrivilege';
- {$EXTERNALSYM SE_LOAD_DRIVER_NAME}
- SE_SYSTEM_PROFILE_NAME = 'SeSystemProfilePrivilege';
- {$EXTERNALSYM SE_SYSTEM_PROFILE_NAME}
- SE_SYSTEMTIME_NAME = 'SeSystemtimePrivilege';
- {$EXTERNALSYM SE_SYSTEMTIME_NAME}
- SE_PROF_SINGLE_PROCESS_NAME = 'SeProfileSingleProcessPrivilege';
- {$EXTERNALSYM SE_PROF_SINGLE_PROCESS_NAME}
- SE_INC_BASE_PRIORITY_NAME = 'SeIncreaseBasePriorityPrivilege';
- {$EXTERNALSYM SE_INC_BASE_PRIORITY_NAME}
- SE_CREATE_PAGEFILE_NAME = 'SeCreatePagefilePrivilege';
- {$EXTERNALSYM SE_CREATE_PAGEFILE_NAME}
- SE_CREATE_PERMANENT_NAME = 'SeCreatePermanentPrivilege';
- {$EXTERNALSYM SE_CREATE_PERMANENT_NAME}
- SE_BACKUP_NAME = 'SeBackupPrivilege';
- {$EXTERNALSYM SE_BACKUP_NAME}
- SE_RESTORE_NAME = 'SeRestorePrivilege';
- {$EXTERNALSYM SE_RESTORE_NAME}
- SE_SHUTDOWN_NAME = 'SeShutdownPrivilege';
- {$EXTERNALSYM SE_SHUTDOWN_NAME}
- SE_DEBUG_NAME = 'SeDebugPrivilege';
- {$EXTERNALSYM SE_DEBUG_NAME}
- SE_AUDIT_NAME = 'SeAuditPrivilege';
- {$EXTERNALSYM SE_AUDIT_NAME}
- SE_SYSTEM_ENVIRONMENT_NAME = 'SeSystemEnvironmentPrivilege';
- {$EXTERNALSYM SE_SYSTEM_ENVIRONMENT_NAME}
- SE_CHANGE_NOTIFY_NAME = 'SeChangeNotifyPrivilege';
- {$EXTERNALSYM SE_CHANGE_NOTIFY_NAME}
- SE_REMOTE_SHUTDOWN_NAME = 'SeRemoteShutdownPrivilege';
- {$EXTERNALSYM SE_REMOTE_SHUTDOWN_NAME}
- SE_UNDOCK_NAME = 'SeUndockPrivilege';
- {$EXTERNALSYM SE_UNDOCK_NAME}
- SE_SYNC_AGENT_NAME = 'SeSyncAgentPrivilege';
- {$EXTERNALSYM SE_SYNC_AGENT_NAME}
- SE_ENABLE_DELEGATION_NAME = 'SeEnableDelegationPrivilege';
- {$EXTERNALSYM SE_ENABLE_DELEGATION_NAME}
- SE_MANAGE_VOLUME_NAME = 'SeManageVolumePrivilege';
- {$EXTERNALSYM SE_MANAGE_VOLUME_NAME}
- SE_IMPERSONATE_NAME = 'SeImpersonatePrivilege';
- {$EXTERNALSYM SE_IMPERSONATE_NAME}
- SE_CREATE_GLOBAL_NAME = 'SeCreateGlobalPrivilege';
- {$EXTERNALSYM SE_CREATE_GLOBAL_NAME}
-
-////////////////////////////////////////////////////////////////////
-// //
-// Security Quality Of Service //
-// //
-// //
-////////////////////////////////////////////////////////////////////
-
-//
-// Impersonation Level
-//
-// Impersonation level is represented by a pair of bits in Windows.
-// If a new impersonation level is added or lowest value is changed from
-// 0 to something else, fix the Windows CreateFile call.
-//
-
-type
- _SECURITY_IMPERSONATION_LEVEL = (SecurityAnonymous, SecurityIdentification,
- SecurityImpersonation, SecurityDelegation);
- {$EXTERNALSYM _SECURITY_IMPERSONATION_LEVEL}
- SECURITY_IMPERSONATION_LEVEL = _SECURITY_IMPERSONATION_LEVEL;
- {$EXTERNALSYM SECURITY_IMPERSONATION_LEVEL}
- PSECURITY_IMPERSONATION_LEVEL = ^SECURITY_IMPERSONATION_LEVEL;
- {$EXTERNALSYM PSECURITY_IMPERSONATION_LEVEL}
- TSecurityImpersonationLevel = SECURITY_IMPERSONATION_LEVEL;
- PSecurityImpersonationLevel = PSECURITY_IMPERSONATION_LEVEL;
-
-const
- SECURITY_MAX_IMPERSONATION_LEVEL = SecurityDelegation;
- {$EXTERNALSYM SECURITY_MAX_IMPERSONATION_LEVEL}
- SECURITY_MIN_IMPERSONATION_LEVEL = SecurityAnonymous;
- {$EXTERNALSYM SECURITY_MIN_IMPERSONATION_LEVEL}
- DEFAULT_IMPERSONATION_LEVEL = SecurityImpersonation;
- {$EXTERNALSYM DEFAULT_IMPERSONATION_LEVEL}
-
-function VALID_IMPERSONATION_LEVEL(L: TSecurityImpersonationLevel): BOOL;
-{$EXTERNALSYM VALID_IMPERSONATION_LEVEL}
-
-////////////////////////////////////////////////////////////////////
-// //
-// Token Object Definitions //
-// //
-// //
-////////////////////////////////////////////////////////////////////
-
-//
-// Token Specific Access Rights.
-//
-
-const
- TOKEN_ASSIGN_PRIMARY = $0001;
- {$EXTERNALSYM TOKEN_ASSIGN_PRIMARY}
- TOKEN_DUPLICATE = $0002;
- {$EXTERNALSYM TOKEN_DUPLICATE}
- TOKEN_IMPERSONATE = $0004;
- {$EXTERNALSYM TOKEN_IMPERSONATE}
- TOKEN_QUERY = $0008;
- {$EXTERNALSYM TOKEN_QUERY}
- TOKEN_QUERY_SOURCE = $0010;
- {$EXTERNALSYM TOKEN_QUERY_SOURCE}
- TOKEN_ADJUST_PRIVILEGES = $0020;
- {$EXTERNALSYM TOKEN_ADJUST_PRIVILEGES}
- TOKEN_ADJUST_GROUPS = $0040;
- {$EXTERNALSYM TOKEN_ADJUST_GROUPS}
- TOKEN_ADJUST_DEFAULT = $0080;
- {$EXTERNALSYM TOKEN_ADJUST_DEFAULT}
- TOKEN_ADJUST_SESSIONID = $0100;
- {$EXTERNALSYM TOKEN_ADJUST_SESSIONID}
-
- TOKEN_ALL_ACCESS_P = STANDARD_RIGHTS_REQUIRED or TOKEN_ASSIGN_PRIMARY or
- TOKEN_DUPLICATE or TOKEN_IMPERSONATE or TOKEN_QUERY or TOKEN_QUERY_SOURCE or
- TOKEN_ADJUST_PRIVILEGES or TOKEN_ADJUST_GROUPS or TOKEN_ADJUST_DEFAULT;
- {$EXTERNALSYM TOKEN_ALL_ACCESS_P}
-
- TOKEN_ALL_ACCESS = TOKEN_ALL_ACCESS_P or TOKEN_ADJUST_SESSIONID;
- {$EXTERNALSYM TOKEN_ALL_ACCESS}
-
- TOKEN_READ = STANDARD_RIGHTS_READ or TOKEN_QUERY;
- {$EXTERNALSYM TOKEN_READ}
-
- TOKEN_WRITE = (STANDARD_RIGHTS_WRITE or TOKEN_ADJUST_PRIVILEGES or
- TOKEN_ADJUST_GROUPS or TOKEN_ADJUST_DEFAULT);
- {$EXTERNALSYM TOKEN_WRITE}
-
- TOKEN_EXECUTE = STANDARD_RIGHTS_EXECUTE;
- {$EXTERNALSYM TOKEN_EXECUTE}
-
-//
-// Token Types
-//
-
-type
- _TOKEN_TYPE = (TokenTypePad0, TokenPrimary, TokenImpersonation);
- {$EXTERNALSYM _TOKEN_TYPE}
- TOKEN_TYPE = _TOKEN_TYPE;
- {$EXTERNALSYM TOKEN_TYPE}
- PTOKEN_TYPE = ^TOKEN_TYPE;
- {$EXTERNALSYM PTOKEN_TYPE}
-
- TTokenType = TOKEN_TYPE;
- PTokenType = PTOKEN_TYPE;
-
-//
-// Token Information Classes.
-//
-
-type
- _TOKEN_INFORMATION_CLASS = (TokenInfoClassPad0, TokenUser, TokenGroups,
- TokenPrivileges, TokenOwner, TokenPrimaryGroup, TokenDefaultDacl, TokenSource,
- TokenType, TokenImpersonationLevel, TokenStatistics, TokenRestrictedSids,
- TokenSessionId, TokenGroupsAndPrivileges, TokenSessionReference,
- TokenSandBoxInert, TokenAuditPolicy, TokenOrigin,
- MaxTokenInfoClass); {MaxTokenInfoClass should always be the last enum}
- {$EXTERNALSYM _TOKEN_INFORMATION_CLASS}
- TOKEN_INFORMATION_CLASS = _TOKEN_INFORMATION_CLASS;
- {$EXTERNALSYM TOKEN_INFORMATION_CLASS}
- PTOKEN_INFORMATION_CLASS = ^TOKEN_INFORMATION_CLASS;
- {$EXTERNALSYM PTOKEN_INFORMATION_CLASS}
-
- TTokenInformationClass = TOKEN_INFORMATION_CLASS;
- PTokenInformationClass = PTOKEN_INFORMATION_CLASS;
-
-//
-// Token information class structures
-//
-
-type
- PTOKEN_USER = ^TOKEN_USER;
- {$EXTERNALSYM PTOKEN_USER}
- _TOKEN_USER = record
- User: SID_AND_ATTRIBUTES;
- end;
- {$EXTERNALSYM _TOKEN_USER}
- TOKEN_USER = _TOKEN_USER;
- {$EXTERNALSYM TOKEN_USER}
- TTokenUser = TOKEN_USER;
- PTokenUser = PTOKEN_USER;
-
- PTOKEN_GROUPS = ^TOKEN_GROUPS;
- {$EXTERNALSYM PTOKEN_GROUPS}
- _TOKEN_GROUPS = record
- GroupCount: DWORD;
- Groups: array [0..ANYSIZE_ARRAY - 1] of SID_AND_ATTRIBUTES;
- end;
- {$EXTERNALSYM _TOKEN_GROUPS}
- TOKEN_GROUPS = _TOKEN_GROUPS;
- {$EXTERNALSYM TOKEN_GROUPS}
- TTokenGroups = TOKEN_GROUPS;
- PTokenGroups = PTOKEN_GROUPS;
-
- PTOKEN_PRIVILEGES = ^TOKEN_PRIVILEGES;
- {$EXTERNALSYM PTOKEN_PRIVILEGES}
- _TOKEN_PRIVILEGES = record
- PrivilegeCount: DWORD;
- Privileges: array [0..ANYSIZE_ARRAY - 1] of LUID_AND_ATTRIBUTES;
- end;
- {$EXTERNALSYM _TOKEN_PRIVILEGES}
- TOKEN_PRIVILEGES = _TOKEN_PRIVILEGES;
- {$EXTERNALSYM TOKEN_PRIVILEGES}
- TTokenPrivileges = TOKEN_PRIVILEGES;
- PTokenPrivileges = PTOKEN_PRIVILEGES;
-
- PTOKEN_OWNER = ^TOKEN_OWNER;
- {$EXTERNALSYM PTOKEN_OWNER}
- _TOKEN_OWNER = record
- Owner: PSID;
- end;
- {$EXTERNALSYM _TOKEN_OWNER}
- TOKEN_OWNER = _TOKEN_OWNER;
- {$EXTERNALSYM TOKEN_OWNER}
- TTokenOwner = TOKEN_OWNER;
- PTokenOwner = PTOKEN_OWNER;
-
- PTOKEN_PRIMARY_GROUP = ^TOKEN_PRIMARY_GROUP;
- {$EXTERNALSYM PTOKEN_PRIMARY_GROUP}
- _TOKEN_PRIMARY_GROUP = record
- PrimaryGroup: PSID;
- end;
- {$EXTERNALSYM _TOKEN_PRIMARY_GROUP}
- TOKEN_PRIMARY_GROUP = _TOKEN_PRIMARY_GROUP;
- {$EXTERNALSYM TOKEN_PRIMARY_GROUP}
- TTokenPrimaryGroup = TOKEN_PRIMARY_GROUP;
- PTokenPrimaryGroup = PTOKEN_PRIMARY_GROUP;
-
- PTOKEN_DEFAULT_DACL = ^TOKEN_DEFAULT_DACL;
- {$EXTERNALSYM PTOKEN_DEFAULT_DACL}
- _TOKEN_DEFAULT_DACL = record
- DefaultDacl: PACL;
- end;
- {$EXTERNALSYM _TOKEN_DEFAULT_DACL}
- TOKEN_DEFAULT_DACL = _TOKEN_DEFAULT_DACL;
- {$EXTERNALSYM TOKEN_DEFAULT_DACL}
- TTokenDefaultDacl = TOKEN_DEFAULT_DACL;
- PTokenDefaultDacl = PTOKEN_DEFAULT_DACL;
-
- _TOKEN_GROUPS_AND_PRIVILEGES = record
- SidCount: DWORD;
- SidLength: DWORD;
- Sids: PSID_AND_ATTRIBUTES;
- RestrictedSidCount: DWORD;
- RestrictedSidLength: DWORD;
- RestrictedSids: PSID_AND_ATTRIBUTES;
- PrivilegeCount: DWORD;
- PrivilegeLength: DWORD;
- Privileges: PLUID_AND_ATTRIBUTES;
- AuthenticationId: LUID;
- end;
- {$EXTERNALSYM _TOKEN_GROUPS_AND_PRIVILEGES}
- TOKEN_GROUPS_AND_PRIVILEGES = _TOKEN_GROUPS_AND_PRIVILEGES;
- {$EXTERNALSYM TOKEN_GROUPS_AND_PRIVILEGES}
- PTOKEN_GROUPS_AND_PRIVILEGES = ^TOKEN_GROUPS_AND_PRIVILEGES;
- {$EXTERNALSYM PTOKEN_GROUPS_AND_PRIVILEGES}
- TTokenGroupsAndPrivileges = TOKEN_GROUPS_AND_PRIVILEGES;
- PTokenGroupsAndPrivileges = PTOKEN_GROUPS_AND_PRIVILEGES;
-
-//
-// Valid bits for each TOKEN_AUDIT_POLICY policy mask field.
-//
-
-const
- TOKEN_AUDIT_SUCCESS_INCLUDE = $1;
- {$EXTERNALSYM TOKEN_AUDIT_SUCCESS_INCLUDE}
- TOKEN_AUDIT_SUCCESS_EXCLUDE = $2;
- {$EXTERNALSYM TOKEN_AUDIT_SUCCESS_EXCLUDE}
- TOKEN_AUDIT_FAILURE_INCLUDE = $4;
- {$EXTERNALSYM TOKEN_AUDIT_FAILURE_INCLUDE}
- TOKEN_AUDIT_FAILURE_EXCLUDE = $8;
- {$EXTERNALSYM TOKEN_AUDIT_FAILURE_EXCLUDE}
-
- VALID_AUDIT_POLICY_BITS = (TOKEN_AUDIT_SUCCESS_INCLUDE or
- TOKEN_AUDIT_SUCCESS_EXCLUDE or
- TOKEN_AUDIT_FAILURE_INCLUDE or
- TOKEN_AUDIT_FAILURE_EXCLUDE);
- {$EXTERNALSYM VALID_AUDIT_POLICY_BITS}
-
-type
- _TOKEN_AUDIT_POLICY_ELEMENT = record
- Category: DWORD;
- PolicyMask: DWORD;
- end;
- {$EXTERNALSYM _TOKEN_AUDIT_POLICY_ELEMENT}
- TOKEN_AUDIT_POLICY_ELEMENT = _TOKEN_AUDIT_POLICY_ELEMENT;
- {$EXTERNALSYM TOKEN_AUDIT_POLICY_ELEMENT}
- PTOKEN_AUDIT_POLICY_ELEMENT = ^TOKEN_AUDIT_POLICY_ELEMENT;
- {$EXTERNALSYM PTOKEN_AUDIT_POLICY_ELEMENT}
- TTokenAuditPolicyElement = TOKEN_AUDIT_POLICY_ELEMENT;
- PTokenAuditPolicyElement = PTOKEN_AUDIT_POLICY_ELEMENT;
-
-// TODO Implementation references AuditEventMaxType, which isn't defined anywhere
-//function VALID_TOKEN_AUDIT_POLICY_ELEMENT(P: TOKEN_AUDIT_POLICY_ELEMENT): BOOL;
-//{$EXTERNALSYM VALID_TOKEN_AUDIT_POLICY_ELEMENT}
-
-type
- _TOKEN_AUDIT_POLICY = record
- PolicyCount: DWORD;
- Policy: array [0..ANYSIZE_ARRAY - 1] of TOKEN_AUDIT_POLICY_ELEMENT;
- end;
- {$EXTERNALSYM _TOKEN_AUDIT_POLICY}
- TOKEN_AUDIT_POLICY = _TOKEN_AUDIT_POLICY;
- {$EXTERNALSYM TOKEN_AUDIT_POLICY}
- PTOKEN_AUDIT_POLICY = ^TOKEN_AUDIT_POLICY;
- {$EXTERNALSYM PTOKEN_AUDIT_POLICY}
- TTokenAuditPolicy = TOKEN_AUDIT_POLICY;
- PTokenAuditPolicy = PTOKEN_AUDIT_POLICY;
-
-function PER_USER_AUDITING_POLICY_SIZE(p: PTOKEN_AUDIT_POLICY): DWORD;
-{$EXTERNALSYM PER_USER_AUDITING_POLICY_SIZE}
-
-function PER_USER_AUDITING_POLICY_SIZE_BY_COUNT(C: DWORD): DWORD;
-{$EXTERNALSYM PER_USER_AUDITING_POLICY_SIZE_BY_COUNT}
-
-const
- TOKEN_SOURCE_LENGTH = 8;
- {$EXTERNALSYM TOKEN_SOURCE_LENGTH}
-
-type
- PTOKEN_SOURCE = ^TOKEN_SOURCE;
- {$EXTERNALSYM PTOKEN_SOURCE}
- _TOKEN_SOURCE = record
- SourceName: array [0..TOKEN_SOURCE_LENGTH - 1] of CHAR;
- SourceIdentifier: LUID;
- end;
- {$EXTERNALSYM _TOKEN_SOURCE}
- TOKEN_SOURCE = _TOKEN_SOURCE;
- {$EXTERNALSYM TOKEN_SOURCE}
- TTokenSource = TOKEN_SOURCE;
- PTokenSource = PTOKEN_SOURCE;
-
- PTOKEN_STATISTICS = ^TOKEN_STATISTICS;
- {$EXTERNALSYM PTOKEN_STATISTICS}
- _TOKEN_STATISTICS = record
- TokenId: LUID;
- AuthenticationId: LUID;
- ExpirationTime: LARGE_INTEGER;
- TokenType: TOKEN_TYPE;
- ImpersonationLevel: SECURITY_IMPERSONATION_LEVEL;
- DynamicCharged: DWORD;
- DynamicAvailable: DWORD;
- GroupCount: DWORD;
- PrivilegeCount: DWORD;
- ModifiedId: LUID;
- end;
- {$EXTERNALSYM _TOKEN_STATISTICS}
- TOKEN_STATISTICS = _TOKEN_STATISTICS;
- {$EXTERNALSYM TOKEN_STATISTICS}
- TTokenStatistics = TOKEN_STATISTICS;
- PTokenStatistics = PTOKEN_STATISTICS;
-
- PTOKEN_CONTROL = ^TOKEN_CONTROL;
- {$EXTERNALSYM PTOKEN_CONTROL}
- _TOKEN_CONTROL = record
- TokenId: LUID;
- AuthenticationId: LUID;
- ModifiedId: LUID;
- TokenSource: TOKEN_SOURCE;
- end;
- {$EXTERNALSYM _TOKEN_CONTROL}
- TOKEN_CONTROL = _TOKEN_CONTROL;
- {$EXTERNALSYM TOKEN_CONTROL}
- TTokenControl = TOKEN_CONTROL;
- PTokenControl = PTOKEN_CONTROL;
-
- _TOKEN_ORIGIN = record
- OriginatingLogonSession: LUID;
- end;
- {$EXTERNALSYM _TOKEN_ORIGIN}
- TOKEN_ORIGIN = _TOKEN_ORIGIN;
- {$EXTERNALSYM TOKEN_ORIGIN}
- PTOKEN_ORIGIN = ^TOKEN_ORIGIN;
- {$EXTERNALSYM PTOKEN_ORIGIN}
- TTokenOrigin = TOKEN_ORIGIN;
- PTokenOrigin = PTOKEN_ORIGIN;
-
-//
-// Security Tracking Mode
-//
-
-const
- SECURITY_DYNAMIC_TRACKING = True;
- {$EXTERNALSYM SECURITY_DYNAMIC_TRACKING}
- SECURITY_STATIC_TRACKING = False;
- {$EXTERNALSYM SECURITY_STATIC_TRACKING}
-
-type
- SECURITY_CONTEXT_TRACKING_MODE = ByteBool;
- {$EXTERNALSYM SECURITY_CONTEXT_TRACKING_MODE}
- PSECURITY_CONTEXT_TRACKING_MODE = ^SECURITY_CONTEXT_TRACKING_MODE;
- {$EXTERNALSYM PSECURITY_CONTEXT_TRACKING_MODE}
-
-//
-// Quality Of Service
-//
-
- PSECURITY_QUALITY_OF_SERVICE = ^SECURITY_QUALITY_OF_SERVICE;
- {$EXTERNALSYM PSECURITY_QUALITY_OF_SERVICE}
- _SECURITY_QUALITY_OF_SERVICE = record
- Length: DWORD;
- ImpersonationLevel: SECURITY_IMPERSONATION_LEVEL;
- ContextTrackingMode: SECURITY_CONTEXT_TRACKING_MODE;
- EffectiveOnly: ByteBool;
- end;
- {$EXTERNALSYM _SECURITY_QUALITY_OF_SERVICE}
- SECURITY_QUALITY_OF_SERVICE = _SECURITY_QUALITY_OF_SERVICE;
- {$EXTERNALSYM SECURITY_QUALITY_OF_SERVICE}
- TSecurityQualityOfService = SECURITY_QUALITY_OF_SERVICE;
- PSecurityQualityOfService = PSECURITY_QUALITY_OF_SERVICE;
-
-//
-// Used to represent information related to a thread impersonation
-//
-
- PSE_IMPERSONATION_STATE = ^SE_IMPERSONATION_STATE;
- {$EXTERNALSYM PSE_IMPERSONATION_STATE}
- _SE_IMPERSONATION_STATE = record
- Token: PACCESS_TOKEN;
- CopyOnOpen: ByteBool;
- EffectiveOnly: ByteBool;
- Level: SECURITY_IMPERSONATION_LEVEL;
- end;
- {$EXTERNALSYM _SE_IMPERSONATION_STATE}
- SE_IMPERSONATION_STATE = _SE_IMPERSONATION_STATE;
- {$EXTERNALSYM SE_IMPERSONATION_STATE}
- TSeImpersonationState = SE_IMPERSONATION_STATE;
- PSeImpersonationState = PSE_IMPERSONATION_STATE;
-
-const
- DISABLE_MAX_PRIVILEGE = $1;
- {$EXTERNALSYM DISABLE_MAX_PRIVILEGE}
- SANDBOX_INERT = $2;
- {$EXTERNALSYM SANDBOX_INERT}
-
-type
- SECURITY_INFORMATION = DWORD;
- {$EXTERNALSYM SECURITY_INFORMATION}
- PSECURITY_INFORMATION = ^SECURITY_INFORMATION;
- {$EXTERNALSYM PSECURITY_INFORMATION}
- TSecurityInformation = SECURITY_INFORMATION;
- PSecurityInformation = PSECURITY_INFORMATION;
-
-const
- OWNER_SECURITY_INFORMATION = $00000001;
- {$EXTERNALSYM OWNER_SECURITY_INFORMATION}
- GROUP_SECURITY_INFORMATION = $00000002;
- {$EXTERNALSYM GROUP_SECURITY_INFORMATION}
- DACL_SECURITY_INFORMATION = $00000004;
- {$EXTERNALSYM DACL_SECURITY_INFORMATION}
- SACL_SECURITY_INFORMATION = $00000008;
- {$EXTERNALSYM SACL_SECURITY_INFORMATION}
-
- PROTECTED_DACL_SECURITY_INFORMATION = $80000000;
- {$EXTERNALSYM PROTECTED_DACL_SECURITY_INFORMATION}
- PROTECTED_SACL_SECURITY_INFORMATION = $40000000;
- {$EXTERNALSYM PROTECTED_SACL_SECURITY_INFORMATION}
- UNPROTECTED_DACL_SECURITY_INFORMATION = $20000000;
- {$EXTERNALSYM UNPROTECTED_DACL_SECURITY_INFORMATION}
- UNPROTECTED_SACL_SECURITY_INFORMATION = $10000000;
- {$EXTERNALSYM UNPROTECTED_SACL_SECURITY_INFORMATION}
-
- PROCESS_TERMINATE = $0001;
- {$EXTERNALSYM PROCESS_TERMINATE}
- PROCESS_CREATE_THREAD = $0002;
- {$EXTERNALSYM PROCESS_CREATE_THREAD}
- PROCESS_SET_SESSIONID = $0004;
- {$EXTERNALSYM PROCESS_SET_SESSIONID}
- PROCESS_VM_OPERATION = $0008;
- {$EXTERNALSYM PROCESS_VM_OPERATION}
- PROCESS_VM_READ = $0010;
- {$EXTERNALSYM PROCESS_VM_READ}
- PROCESS_VM_WRITE = $0020;
- {$EXTERNALSYM PROCESS_VM_WRITE}
- PROCESS_DUP_HANDLE = $0040;
- {$EXTERNALSYM PROCESS_DUP_HANDLE}
- PROCESS_CREATE_PROCESS = $0080;
- {$EXTERNALSYM PROCESS_CREATE_PROCESS}
- PROCESS_SET_QUOTA = $0100;
- {$EXTERNALSYM PROCESS_SET_QUOTA}
- PROCESS_SET_INFORMATION = $0200;
- {$EXTERNALSYM PROCESS_SET_INFORMATION}
- PROCESS_QUERY_INFORMATION = $0400;
- {$EXTERNALSYM PROCESS_QUERY_INFORMATION}
- PROCESS_SUSPEND_RESUME = $0800;
- {$EXTERNALSYM PROCESS_SUSPEND_RESUME}
- PROCESS_ALL_ACCESS = STANDARD_RIGHTS_REQUIRED or SYNCHRONIZE or $FFF;
- {$EXTERNALSYM PROCESS_ALL_ACCESS}
-
- MAXIMUM_PROCESSORS = 32;
- {$EXTERNALSYM MAXIMUM_PROCESSORS}
-
- THREAD_TERMINATE = $0001;
- {$EXTERNALSYM THREAD_TERMINATE}
- THREAD_SUSPEND_RESUME = $0002;
- {$EXTERNALSYM THREAD_SUSPEND_RESUME}
- THREAD_GET_CONTEXT = $0008;
- {$EXTERNALSYM THREAD_GET_CONTEXT}
- THREAD_SET_CONTEXT = $0010;
- {$EXTERNALSYM THREAD_SET_CONTEXT}
- THREAD_SET_INFORMATION = $0020;
- {$EXTERNALSYM THREAD_SET_INFORMATION}
- THREAD_QUERY_INFORMATION = $0040;
- {$EXTERNALSYM THREAD_QUERY_INFORMATION}
- THREAD_SET_THREAD_TOKEN = $0080;
- {$EXTERNALSYM THREAD_SET_THREAD_TOKEN}
- THREAD_IMPERSONATE = $0100;
- {$EXTERNALSYM THREAD_IMPERSONATE}
- THREAD_DIRECT_IMPERSONATION = $0200;
- {$EXTERNALSYM THREAD_DIRECT_IMPERSONATION}
-
- THREAD_ALL_ACCESS = STANDARD_RIGHTS_REQUIRED or SYNCHRONIZE or $3FF;
- {$EXTERNALSYM THREAD_ALL_ACCESS}
-
- JOB_OBJECT_ASSIGN_PROCESS = $0001;
- {$EXTERNALSYM JOB_OBJECT_ASSIGN_PROCESS}
- JOB_OBJECT_SET_ATTRIBUTES = $0002;
- {$EXTERNALSYM JOB_OBJECT_SET_ATTRIBUTES}
- JOB_OBJECT_QUERY = $0004;
- {$EXTERNALSYM JOB_OBJECT_QUERY}
- JOB_OBJECT_TERMINATE = $0008;
- {$EXTERNALSYM JOB_OBJECT_TERMINATE}
- JOB_OBJECT_SET_SECURITY_ATTRIBUTES = $0010;
- {$EXTERNALSYM JOB_OBJECT_SET_SECURITY_ATTRIBUTES}
- JOB_OBJECT_ALL_ACCESS = STANDARD_RIGHTS_REQUIRED or SYNCHRONIZE or $1F ;
- {$EXTERNALSYM JOB_OBJECT_ALL_ACCESS}
-
-type
- _JOB_SET_ARRAY = record
- JobHandle: HANDLE; // Handle to job object to insert
- MemberLevel: DWORD; // Level of this job in the set. Must be > 0. Can be sparse.
- Flags: DWORD; // Unused. Must be zero
- end;
- {$EXTERNALSYM _JOB_SET_ARRAY}
- JOB_SET_ARRAY = _JOB_SET_ARRAY;
- {$EXTERNALSYM JOB_SET_ARRAY}
- PJOB_SET_ARRAY = ^JOB_SET_ARRAY;
- {$EXTERNALSYM PJOB_SET_ARRAY}
- TJobSetArray = JOB_SET_ARRAY;
- PJobSetArray = PJOB_SET_ARRAY;
-
-const
- FLS_MAXIMUM_AVAILABLE = 128;
- {$EXTERNALSYM FLS_MAXIMUM_AVAILABLE}
- TLS_MINIMUM_AVAILABLE = 64;
- {$EXTERNALSYM TLS_MINIMUM_AVAILABLE}
-
-type
- PEXCEPTION_REGISTRATION_RECORD = ^EXCEPTION_REGISTRATION_RECORD;
- _EXCEPTION_REGISTRATION_RECORD = packed record
- pNext: PEXCEPTION_REGISTRATION_RECORD;
- pfnHandler: FARPROC;
- end;
- EXCEPTION_REGISTRATION_RECORD = _EXCEPTION_REGISTRATION_RECORD;
- TExceptionRegistrationRecord = EXCEPTION_REGISTRATION_RECORD;
- PExceptionRegistrationRecord = PEXCEPTION_REGISTRATION_RECORD;
-
- PNT_TIB = ^NT_TIB;
- {$EXTERNALSYM PNT_TIB}
- _NT_TIB = record
- ExceptionList: PEXCEPTION_REGISTRATION_RECORD; // 00h Head of exception record list
- StackBase: PVOID; // 04h Top of user stack
- StackLimit: PVOID; // 08h Base of user stack
-
- //union // 0Ch (NT/Win95 differences)
- //{
- // struct // Win95 fields
- // {
- // WORD pvTDB; // 0Ch TDB
- // WORD pvThunkSS; // 0Eh SS selector used for thunking to 16 bits
- // DWORD unknown1; // 10h
- // } WIN95;
- //
- // struct // WinNT fields
- // {
-
- SubSystemTib: PVOID; // 0Ch
-
- Union: record // 10H
- case Integer of
- 0: (FiberData: PVOID);
- 1: (Version: DWORD);
- end;
-
- // } WINNT;
- //} TIB_UNION1;
-
- ArbitraryUserPointer: PVOID; // 14h Available for application use
- Self: PNT_TIB; // 18h Linear address of TIB structure
-
- //union // 1Ch (NT/Win95 differences)
- //{
- // struct // Win95 fields
- // {
- // WORD TIBFlags; // 1Ch
- // WORD Win16MutexCount; // 1Eh
- // DWORD DebugContext; // 20h
- // DWORD pCurrentPriority; // 24h
- // DWORD pvQueue; // 28h Message Queue selector
- // } WIN95;
- //
- // struct // WinNT fields
- // {
-
- unknown1: DWORD; // 1Ch
- processID: DWORD; // 20h
- threadID: DWORD; // 24h
- unknown2: DWORD; // 28h
-
- // } WINNT;
- //} TIB_UNION2;
-
- pvTLSArray: PVOID; // (PPVOID!) 2Ch Thread Local Storage array
-
- //union // 30h (NT/Win95 differences)
- //{
- // struct // Win95 fields
- // {
- // PVOID* pProcess; // 30h Pointer to owning process database
- // } WIN95;
- //} TIB_UNION3;
- end;
- {$EXTERNALSYM _NT_TIB}
- NT_TIB = _NT_TIB;
- {$EXTERNALSYM NT_TIB}
- TNtTib = NT_TIB;
- PNtTib = ^TNtTib;
-
-//
-// 32 and 64 bit specific version for wow64 and the debugger
-//
-
- PNT_TIB32 = ^NT_TIB32;
- {$EXTERNALSYM PNT_TIB32}
- _NT_TIB32 = record
- ExceptionList: DWORD;
- StackBase: DWORD;
- StackLimit: DWORD;
- SubSystemTib: DWORD;
- Union: record
- case Integer of
- 0: (FiberData: DWORD);
- 1: (Version: DWORD);
- end;
- ArbitraryUserPointer: DWORD;
- Self: DWORD;
- end;
- {$EXTERNALSYM _NT_TIB32}
- NT_TIB32 = _NT_TIB32;
- {$EXTERNALSYM NT_TIB32}
- TNtTib32 = NT_TIB32;
- PNtTib32 = ^TNtTib32;
-
- PNT_TIB64 = ^NT_TIB64;
- {$EXTERNALSYM PNT_TIB64}
- _NT_TIB64 = record
- ExceptionList: DWORD64;
- StackBase: DWORD64;
- StackLimit: DWORD64;
- SubSystemTib: DWORD64;
- Union: record
- case Integer of
- 0: (FiberData: DWORD64);
- 1: (Version: DWORD);
- end;
- ArbitraryUserPointer: DWORD64;
- Self: DWORD64;
- end;
- {$EXTERNALSYM _NT_TIB64}
- NT_TIB64 = _NT_TIB64;
- {$EXTERNALSYM NT_TIB64}
- TNtTib64 = NT_TIB64;
- PNtTib64 = ^TNtTib64;
-
-//
-// Define function to return the current Thread Environment Block
-//
-
-function NtCurrentTeb: PNT_TIB;
-{$EXTERNALSYM NtCurrentTeb}
-
-const
- THREAD_BASE_PRIORITY_LOWRT = 15; // value that gets a thread to LowRealtime-1
- {$EXTERNALSYM THREAD_BASE_PRIORITY_LOWRT}
- THREAD_BASE_PRIORITY_MAX = 2; // maximum thread base priority boost
- {$EXTERNALSYM THREAD_BASE_PRIORITY_MAX}
- THREAD_BASE_PRIORITY_MIN = DWORD(-2); // minimum thread base priority boost
- {$EXTERNALSYM THREAD_BASE_PRIORITY_MIN}
- THREAD_BASE_PRIORITY_IDLE = DWORD(-15); // value that gets a thread to idle
- {$EXTERNALSYM THREAD_BASE_PRIORITY_IDLE}
-
-type
- PQUOTA_LIMITS = ^QUOTA_LIMITS;
- {$EXTERNALSYM PQUOTA_LIMITS}
- _QUOTA_LIMITS = record
- PagedPoolLimit: SIZE_T;
- NonPagedPoolLimit: SIZE_T;
- MinimumWorkingSetSize: SIZE_T;
- MaximumWorkingSetSize: SIZE_T;
- PagefileLimit: SIZE_T;
- TimeLimit: LARGE_INTEGER;
- end;
- {$EXTERNALSYM _QUOTA_LIMITS}
- QUOTA_LIMITS = _QUOTA_LIMITS;
- {$EXTERNALSYM QUOTA_LIMITS}
- TQuotaLimits = QUOTA_LIMITS;
- PQuotaLimits = PQUOTA_LIMITS;
-
-const
- QUOTA_LIMITS_HARDWS_MIN_ENABLE = $00000001;
- {$EXTERNALSYM QUOTA_LIMITS_HARDWS_MIN_ENABLE}
- QUOTA_LIMITS_HARDWS_MIN_DISABLE = $00000002;
- {$EXTERNALSYM QUOTA_LIMITS_HARDWS_MIN_DISABLE}
- QUOTA_LIMITS_HARDWS_MAX_ENABLE = $00000004;
- {$EXTERNALSYM QUOTA_LIMITS_HARDWS_MAX_ENABLE}
- QUOTA_LIMITS_HARDWS_MAX_DISABLE = $00000008;
- {$EXTERNALSYM QUOTA_LIMITS_HARDWS_MAX_DISABLE}
-
-type
- _QUOTA_LIMITS_EX = record
- PagedPoolLimit: SIZE_T;
- NonPagedPoolLimit: SIZE_T;
- MinimumWorkingSetSize: SIZE_T;
- MaximumWorkingSetSize: SIZE_T;
- PagefileLimit: SIZE_T;
- TimeLimit: LARGE_INTEGER;
- Reserved1: SIZE_T;
- Reserved2: SIZE_T;
- Reserved3: SIZE_T;
- Reserved4: SIZE_T;
- Flags: DWORD;
- Reserved5: DWORD;
- end;
- {$EXTERNALSYM _QUOTA_LIMITS_EX}
- QUOTA_LIMITS_EX = _QUOTA_LIMITS_EX;
- {$EXTERNALSYM QUOTA_LIMITS_EX}
- PQUOTA_LIMITS_EX = ^QUOTA_LIMITS_EX;
- {$EXTERNALSYM PQUOTA_LIMITS_EX}
- TQuotaLimitsEx = QUOTA_LIMITS_EX;
- PQuotaLimitsEx = PQUOTA_LIMITS_EX;
-
- PIO_COUNTERS = ^IO_COUNTERS;
- {$EXTERNALSYM PIO_COUNTERS}
- _IO_COUNTERS = record
- ReadOperationCount: Int64;
- WriteOperationCount: Int64;
- OtherOperationCount: Int64;
- ReadTransferCount: Int64;
- WriteTransferCount: Int64;
- OtherTransferCount: Int64;
- end;
- {$EXTERNALSYM _IO_COUNTERS}
- IO_COUNTERS = _IO_COUNTERS;
- {$EXTERNALSYM IO_COUNTERS}
- TIoCounters = IO_COUNTERS;
- PIoCounters = PIO_COUNTERS;
-
- PJOBOBJECT_BASIC_ACCOUNTING_INFORMATION = ^JOBOBJECT_BASIC_ACCOUNTING_INFORMATION;
- {$EXTERNALSYM PJOBOBJECT_BASIC_ACCOUNTING_INFORMATION}
- _JOBOBJECT_BASIC_ACCOUNTING_INFORMATION = record
- TotalUserTime: LARGE_INTEGER;
- TotalKernelTime: LARGE_INTEGER;
- ThisPeriodTotalUserTime: LARGE_INTEGER;
- ThisPeriodTotalKernelTime: LARGE_INTEGER;
- TotalPageFaultCount: DWORD;
- TotalProcesses: DWORD;
- ActiveProcesses: DWORD;
- TotalTerminatedProcesses: DWORD;
- end;
- {$EXTERNALSYM _JOBOBJECT_BASIC_ACCOUNTING_INFORMATION}
- JOBOBJECT_BASIC_ACCOUNTING_INFORMATION = _JOBOBJECT_BASIC_ACCOUNTING_INFORMATION;
- {$EXTERNALSYM JOBOBJECT_BASIC_ACCOUNTING_INFORMATION}
- TJobObjectBasicAccountingInformation = JOBOBJECT_BASIC_ACCOUNTING_INFORMATION;
- PJobObjectBasicAccountingInformation = PJOBOBJECT_BASIC_ACCOUNTING_INFORMATION;
-
- PJOBOBJECT_BASIC_LIMIT_INFORMATION = ^JOBOBJECT_BASIC_LIMIT_INFORMATION;
- {$EXTERNALSYM PJOBOBJECT_BASIC_LIMIT_INFORMATION}
- _JOBOBJECT_BASIC_LIMIT_INFORMATION = record
- PerProcessUserTimeLimit: LARGE_INTEGER;
- PerJobUserTimeLimit: LARGE_INTEGER;
- LimitFlags: DWORD;
- MinimumWorkingSetSize: SIZE_T;
- MaximumWorkingSetSize: SIZE_T;
- ActiveProcessLimit: DWORD;
- Affinity: ULONG_PTR;
- PriorityClass: DWORD;
- SchedulingClass: DWORD;
- end;
- {$EXTERNALSYM _JOBOBJECT_BASIC_LIMIT_INFORMATION}
- JOBOBJECT_BASIC_LIMIT_INFORMATION = _JOBOBJECT_BASIC_LIMIT_INFORMATION;
- {$EXTERNALSYM JOBOBJECT_BASIC_LIMIT_INFORMATION}
- TJobObjectBasicLimitInformation = JOBOBJECT_BASIC_LIMIT_INFORMATION;
- PJobObjectBasicLimitInformation = PJOBOBJECT_BASIC_LIMIT_INFORMATION;
-
- PJOBOBJECT_EXTENDED_LIMIT_INFORMATION = ^JOBOBJECT_EXTENDED_LIMIT_INFORMATION;
- {$EXTERNALSYM PJOBOBJECT_EXTENDED_LIMIT_INFORMATION}
- _JOBOBJECT_EXTENDED_LIMIT_INFORMATION = record
- BasicLimitInformation: JOBOBJECT_BASIC_LIMIT_INFORMATION;
- IoInfo: IO_COUNTERS;
- ProcessMemoryLimit: SIZE_T;
- JobMemoryLimit: SIZE_T;
- PeakProcessMemoryUsed: SIZE_T;
- PeakJobMemoryUsed: SIZE_T;
- end;
- {$EXTERNALSYM _JOBOBJECT_EXTENDED_LIMIT_INFORMATION}
- JOBOBJECT_EXTENDED_LIMIT_INFORMATION = _JOBOBJECT_EXTENDED_LIMIT_INFORMATION;
- {$EXTERNALSYM JOBOBJECT_EXTENDED_LIMIT_INFORMATION}
- TJobObjectExtendedLimitInformation = JOBOBJECT_EXTENDED_LIMIT_INFORMATION;
- PJobObjectExtendedLimitInformation = PJOBOBJECT_EXTENDED_LIMIT_INFORMATION;
-
- PJOBOBJECT_BASIC_PROCESS_ID_LIST = ^JOBOBJECT_BASIC_PROCESS_ID_LIST;
- {$EXTERNALSYM PJOBOBJECT_BASIC_PROCESS_ID_LIST}
- _JOBOBJECT_BASIC_PROCESS_ID_LIST = record
- NumberOfAssignedProcesses: DWORD;
- NumberOfProcessIdsInList: DWORD;
- ProcessIdList: array [0..0] of ULONG_PTR;
- end;
- {$EXTERNALSYM _JOBOBJECT_BASIC_PROCESS_ID_LIST}
- JOBOBJECT_BASIC_PROCESS_ID_LIST = _JOBOBJECT_BASIC_PROCESS_ID_LIST;
- {$EXTERNALSYM JOBOBJECT_BASIC_PROCESS_ID_LIST}
- TJobObjectBasicProcessIdList = JOBOBJECT_BASIC_PROCESS_ID_LIST;
- PJobObjectBasicProcessIdList = PJOBOBJECT_BASIC_PROCESS_ID_LIST;
-
- PJOBOBJECT_BASIC_UI_RESTRICTIONS = ^JOBOBJECT_BASIC_UI_RESTRICTIONS;
- {$EXTERNALSYM PJOBOBJECT_BASIC_UI_RESTRICTIONS}
- _JOBOBJECT_BASIC_UI_RESTRICTIONS = record
- UIRestrictionsClass: DWORD;
- end;
- {$EXTERNALSYM _JOBOBJECT_BASIC_UI_RESTRICTIONS}
- JOBOBJECT_BASIC_UI_RESTRICTIONS = _JOBOBJECT_BASIC_UI_RESTRICTIONS;
- {$EXTERNALSYM JOBOBJECT_BASIC_UI_RESTRICTIONS}
- TJobObjectBasicUiRestrictions = JOBOBJECT_BASIC_UI_RESTRICTIONS;
- PJobObjectBasicUiRestrictions = PJOBOBJECT_BASIC_UI_RESTRICTIONS;
-
- PJOBOBJECT_SECURITY_LIMIT_INFORMATION = ^JOBOBJECT_SECURITY_LIMIT_INFORMATION;
- {$EXTERNALSYM PJOBOBJECT_SECURITY_LIMIT_INFORMATION}
- _JOBOBJECT_SECURITY_LIMIT_INFORMATION = record
- SecurityLimitFlags : DWORD;
- JobToken : THandle;
- SidsToDisable : PTOKEN_GROUPS;
- PrivilegesToDelete : PTOKEN_PRIVILEGES;
- RestrictedSids : PTOKEN_GROUPS;
- end;
- {$EXTERNALSYM _JOBOBJECT_SECURITY_LIMIT_INFORMATION}
- JOBOBJECT_SECURITY_LIMIT_INFORMATION = _JOBOBJECT_SECURITY_LIMIT_INFORMATION;
- {$EXTERNALSYM JOBOBJECT_SECURITY_LIMIT_INFORMATION}
- TJobObjectSecurityLimitInformation = JOBOBJECT_SECURITY_LIMIT_INFORMATION;
- PJobObjectSecurityLimitInformation = PJOBOBJECT_SECURITY_LIMIT_INFORMATION;
-
- PJOBOBJECT_END_OF_JOB_TIME_INFORMATION = ^JOBOBJECT_END_OF_JOB_TIME_INFORMATION;
- {$EXTERNALSYM PJOBOBJECT_END_OF_JOB_TIME_INFORMATION}
- _JOBOBJECT_END_OF_JOB_TIME_INFORMATION = record
- EndOfJobTimeAction: DWORD;
- end;
- {$EXTERNALSYM _JOBOBJECT_END_OF_JOB_TIME_INFORMATION}
- JOBOBJECT_END_OF_JOB_TIME_INFORMATION = _JOBOBJECT_END_OF_JOB_TIME_INFORMATION;
- {$EXTERNALSYM JOBOBJECT_END_OF_JOB_TIME_INFORMATION}
- TJobObjectEndOfJobTimeInformation = JOBOBJECT_END_OF_JOB_TIME_INFORMATION;
- PJobObjectEndOfJobTimeInformation = PJOBOBJECT_END_OF_JOB_TIME_INFORMATION;
-
- PJOBOBJECT_ASSOCIATE_COMPLETION_PORT = ^JOBOBJECT_ASSOCIATE_COMPLETION_PORT;
- {$EXTERNALSYM PJOBOBJECT_ASSOCIATE_COMPLETION_PORT}
- _JOBOBJECT_ASSOCIATE_COMPLETION_PORT = record
- CompletionKey: Pointer;
- CompletionPort: THandle;
- end;
- {$EXTERNALSYM _JOBOBJECT_ASSOCIATE_COMPLETION_PORT}
- JOBOBJECT_ASSOCIATE_COMPLETION_PORT = _JOBOBJECT_ASSOCIATE_COMPLETION_PORT;
- {$EXTERNALSYM JOBOBJECT_ASSOCIATE_COMPLETION_PORT}
- TJobObjectAssociateCompletionPort = JOBOBJECT_ASSOCIATE_COMPLETION_PORT;
- PJobObjectAssociateCompletionPort = PJOBOBJECT_ASSOCIATE_COMPLETION_PORT;
-
- PJOBOBJECT_BASIC_AND_IO_ACCOUNTING_INFORMATION = ^JOBOBJECT_BASIC_AND_IO_ACCOUNTING_INFORMATION;
- {$EXTERNALSYM PJOBOBJECT_BASIC_AND_IO_ACCOUNTING_INFORMATION}
- _JOBOBJECT_BASIC_AND_IO_ACCOUNTING_INFORMATION = record
- BasicInfo: JOBOBJECT_BASIC_ACCOUNTING_INFORMATION;
- IoInfo: IO_COUNTERS;
- end;
- {$EXTERNALSYM _JOBOBJECT_BASIC_AND_IO_ACCOUNTING_INFORMATION}
- JOBOBJECT_BASIC_AND_IO_ACCOUNTING_INFORMATION = _JOBOBJECT_BASIC_AND_IO_ACCOUNTING_INFORMATION;
- {$EXTERNALSYM JOBOBJECT_BASIC_AND_IO_ACCOUNTING_INFORMATION}
- TJobObjectBasicAndIoAccountingInformation = JOBOBJECT_BASIC_AND_IO_ACCOUNTING_INFORMATION;
- PJobObjectBasicAndIoAccountingInformation = PJOBOBJECT_BASIC_AND_IO_ACCOUNTING_INFORMATION;
-
- _JOBOBJECT_JOBSET_INFORMATION = record
- MemberLevel: DWORD;
- end;
- {$EXTERNALSYM _JOBOBJECT_JOBSET_INFORMATION}
- JOBOBJECT_JOBSET_INFORMATION = _JOBOBJECT_JOBSET_INFORMATION;
- {$EXTERNALSYM JOBOBJECT_JOBSET_INFORMATION}
- PJOBOBJECT_JOBSET_INFORMATION = ^JOBOBJECT_JOBSET_INFORMATION;
- {$EXTERNALSYM PJOBOBJECT_JOBSET_INFORMATION}
- TJobObjectSetInformation = JOBOBJECT_JOBSET_INFORMATION;
- PJobObjectSetInformation = PJOBOBJECT_JOBSET_INFORMATION;
-
-const
- JOB_OBJECT_TERMINATE_AT_END_OF_JOB = 0;
- {$EXTERNALSYM JOB_OBJECT_TERMINATE_AT_END_OF_JOB}
- JOB_OBJECT_POST_AT_END_OF_JOB = 1;
- {$EXTERNALSYM JOB_OBJECT_POST_AT_END_OF_JOB}
-
-//
-// Completion Port Messages for job objects
-//
-// These values are returned via the lpNumberOfBytesTransferred parameter
-//
-
- JOB_OBJECT_MSG_END_OF_JOB_TIME = 1;
- {$EXTERNALSYM JOB_OBJECT_MSG_END_OF_JOB_TIME}
- JOB_OBJECT_MSG_END_OF_PROCESS_TIME = 2;
- {$EXTERNALSYM JOB_OBJECT_MSG_END_OF_PROCESS_TIME}
- JOB_OBJECT_MSG_ACTIVE_PROCESS_LIMIT = 3;
- {$EXTERNALSYM JOB_OBJECT_MSG_ACTIVE_PROCESS_LIMIT}
- JOB_OBJECT_MSG_ACTIVE_PROCESS_ZERO = 4;
- {$EXTERNALSYM JOB_OBJECT_MSG_ACTIVE_PROCESS_ZERO}
- JOB_OBJECT_MSG_NEW_PROCESS = 6;
- {$EXTERNALSYM JOB_OBJECT_MSG_NEW_PROCESS}
- JOB_OBJECT_MSG_EXIT_PROCESS = 7;
- {$EXTERNALSYM JOB_OBJECT_MSG_EXIT_PROCESS}
- JOB_OBJECT_MSG_ABNORMAL_EXIT_PROCESS = 8;
- {$EXTERNALSYM JOB_OBJECT_MSG_ABNORMAL_EXIT_PROCESS}
- JOB_OBJECT_MSG_PROCESS_MEMORY_LIMIT = 9;
- {$EXTERNALSYM JOB_OBJECT_MSG_PROCESS_MEMORY_LIMIT}
- JOB_OBJECT_MSG_JOB_MEMORY_LIMIT = 10;
- {$EXTERNALSYM JOB_OBJECT_MSG_JOB_MEMORY_LIMIT}
-
-//
-// Basic Limits
-//
-
- JOB_OBJECT_LIMIT_WORKINGSET = $00000001;
- {$EXTERNALSYM JOB_OBJECT_LIMIT_WORKINGSET}
- JOB_OBJECT_LIMIT_PROCESS_TIME = $00000002;
- {$EXTERNALSYM JOB_OBJECT_LIMIT_PROCESS_TIME}
- JOB_OBJECT_LIMIT_JOB_TIME = $00000004;
- {$EXTERNALSYM JOB_OBJECT_LIMIT_JOB_TIME}
- JOB_OBJECT_LIMIT_ACTIVE_PROCESS = $00000008;
- {$EXTERNALSYM JOB_OBJECT_LIMIT_ACTIVE_PROCESS}
- JOB_OBJECT_LIMIT_AFFINITY = $00000010;
- {$EXTERNALSYM JOB_OBJECT_LIMIT_AFFINITY}
- JOB_OBJECT_LIMIT_PRIORITY_CLASS = $00000020;
- {$EXTERNALSYM JOB_OBJECT_LIMIT_PRIORITY_CLASS}
- JOB_OBJECT_LIMIT_PRESERVE_JOB_TIME = $00000040;
- {$EXTERNALSYM JOB_OBJECT_LIMIT_PRESERVE_JOB_TIME}
- JOB_OBJECT_LIMIT_SCHEDULING_CLASS = $00000080;
- {$EXTERNALSYM JOB_OBJECT_LIMIT_SCHEDULING_CLASS}
-
-//
-// Extended Limits
-//
-
- JOB_OBJECT_LIMIT_PROCESS_MEMORY = $00000100;
- {$EXTERNALSYM JOB_OBJECT_LIMIT_PROCESS_MEMORY}
- JOB_OBJECT_LIMIT_JOB_MEMORY = $00000200;
- {$EXTERNALSYM JOB_OBJECT_LIMIT_JOB_MEMORY}
- JOB_OBJECT_LIMIT_DIE_ON_UNHANDLED_EXCEPTION = $00000400;
- {$EXTERNALSYM JOB_OBJECT_LIMIT_DIE_ON_UNHANDLED_EXCEPTION}
- JOB_OBJECT_LIMIT_BREAKAWAY_OK = $00000800;
- {$EXTERNALSYM JOB_OBJECT_LIMIT_BREAKAWAY_OK}
- JOB_OBJECT_LIMIT_SILENT_BREAKAWAY_OK = $00001000;
- {$EXTERNALSYM JOB_OBJECT_LIMIT_SILENT_BREAKAWAY_OK}
- JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE = $00002000;
- {$EXTERNALSYM JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE}
-
- JOB_OBJECT_LIMIT_RESERVED2 = $00004000;
- {$EXTERNALSYM JOB_OBJECT_LIMIT_RESERVED2}
- JOB_OBJECT_LIMIT_RESERVED3 = $00008000;
- {$EXTERNALSYM JOB_OBJECT_LIMIT_RESERVED3}
- JOB_OBJECT_LIMIT_RESERVED4 = $00010000;
- {$EXTERNALSYM JOB_OBJECT_LIMIT_RESERVED4}
- JOB_OBJECT_LIMIT_RESERVED5 = $00020000;
- {$EXTERNALSYM JOB_OBJECT_LIMIT_RESERVED5}
- JOB_OBJECT_LIMIT_RESERVED6 = $00040000;
- {$EXTERNALSYM JOB_OBJECT_LIMIT_RESERVED6}
-
- JOB_OBJECT_LIMIT_VALID_FLAGS = $0007ffff;
- {$EXTERNALSYM JOB_OBJECT_LIMIT_VALID_FLAGS}
-
- JOB_OBJECT_BASIC_LIMIT_VALID_FLAGS = $000000ff;
- {$EXTERNALSYM JOB_OBJECT_BASIC_LIMIT_VALID_FLAGS}
- JOB_OBJECT_EXTENDED_LIMIT_VALID_FLAGS = $00003fff;
- {$EXTERNALSYM JOB_OBJECT_EXTENDED_LIMIT_VALID_FLAGS}
- JOB_OBJECT_RESERVED_LIMIT_VALID_FLAGS = $0007ffff;
- {$EXTERNALSYM JOB_OBJECT_RESERVED_LIMIT_VALID_FLAGS}
-
-//
-// UI restrictions for jobs
-//
-
- JOB_OBJECT_UILIMIT_NONE = $00000000;
- {$EXTERNALSYM JOB_OBJECT_UILIMIT_NONE}
-
- JOB_OBJECT_UILIMIT_HANDLES = $00000001;
- {$EXTERNALSYM JOB_OBJECT_UILIMIT_HANDLES}
- JOB_OBJECT_UILIMIT_READCLIPBOARD = $00000002;
- {$EXTERNALSYM JOB_OBJECT_UILIMIT_READCLIPBOARD}
- JOB_OBJECT_UILIMIT_WRITECLIPBOARD = $00000004;
- {$EXTERNALSYM JOB_OBJECT_UILIMIT_WRITECLIPBOARD}
- JOB_OBJECT_UILIMIT_SYSTEMPARAMETERS = $00000008;
- {$EXTERNALSYM JOB_OBJECT_UILIMIT_SYSTEMPARAMETERS}
- JOB_OBJECT_UILIMIT_DISPLAYSETTINGS = $00000010;
- {$EXTERNALSYM JOB_OBJECT_UILIMIT_DISPLAYSETTINGS}
- JOB_OBJECT_UILIMIT_GLOBALATOMS = $00000020;
- {$EXTERNALSYM JOB_OBJECT_UILIMIT_GLOBALATOMS}
- JOB_OBJECT_UILIMIT_DESKTOP = $00000040;
- {$EXTERNALSYM JOB_OBJECT_UILIMIT_DESKTOP}
- JOB_OBJECT_UILIMIT_EXITWINDOWS = $00000080;
- {$EXTERNALSYM JOB_OBJECT_UILIMIT_EXITWINDOWS}
-
- JOB_OBJECT_UILIMIT_ALL = $000000FF;
- {$EXTERNALSYM JOB_OBJECT_UILIMIT_ALL}
-
- JOB_OBJECT_UI_VALID_FLAGS = $000000FF;
- {$EXTERNALSYM JOB_OBJECT_UI_VALID_FLAGS}
-
- JOB_OBJECT_SECURITY_NO_ADMIN = $00000001;
- {$EXTERNALSYM JOB_OBJECT_SECURITY_NO_ADMIN}
- JOB_OBJECT_SECURITY_RESTRICTED_TOKEN = $00000002;
- {$EXTERNALSYM JOB_OBJECT_SECURITY_RESTRICTED_TOKEN}
- JOB_OBJECT_SECURITY_ONLY_TOKEN = $00000004;
- {$EXTERNALSYM JOB_OBJECT_SECURITY_ONLY_TOKEN}
- JOB_OBJECT_SECURITY_FILTER_TOKENS = $00000008;
- {$EXTERNALSYM JOB_OBJECT_SECURITY_FILTER_TOKENS}
-
- JOB_OBJECT_SECURITY_VALID_FLAGS = $0000000f;
- {$EXTERNALSYM JOB_OBJECT_SECURITY_VALID_FLAGS}
-
-type
- _JOBOBJECTINFOCLASS = (
- JobObjectInfoClassPadding0,
- JobObjectBasicAccountingInformation,
- JobObjectBasicLimitInformation,
- JobObjectBasicProcessIdList,
- JobObjectBasicUIRestrictions,
- JobObjectSecurityLimitInformation,
- JobObjectEndOfJobTimeInformation,
- JobObjectAssociateCompletionPortInformation,
- JobObjectBasicAndIoAccountingInformation,
- JobObjectExtendedLimitInformation,
- JobObjectJobSetInformation,
- MaxJobObjectInfoClass);
- {$EXTERNALSYM _JOBOBJECTINFOCLASS}
- JOBOBJECTINFOCLASS = _JOBOBJECTINFOCLASS;
- {$EXTERNALSYM JOBOBJECTINFOCLASS}
- TJobObjectInfoClass = JOBOBJECTINFOCLASS;
-
-const
- EVENT_MODIFY_STATE = $0002;
- {$EXTERNALSYM EVENT_MODIFY_STATE}
- EVENT_ALL_ACCESS = STANDARD_RIGHTS_REQUIRED or SYNCHRONIZE or $3;
- {$EXTERNALSYM EVENT_ALL_ACCESS}
- MUTANT_QUERY_STATE = $0001;
- {$EXTERNALSYM MUTANT_QUERY_STATE}
-
- MUTANT_ALL_ACCESS = STANDARD_RIGHTS_REQUIRED or SYNCHRONIZE or MUTANT_QUERY_STATE;
- {$EXTERNALSYM MUTANT_ALL_ACCESS}
- SEMAPHORE_MODIFY_STATE = $0002;
- {$EXTERNALSYM SEMAPHORE_MODIFY_STATE}
- SEMAPHORE_ALL_ACCESS = STANDARD_RIGHTS_REQUIRED or SYNCHRONIZE or $3;
- {$EXTERNALSYM SEMAPHORE_ALL_ACCESS}
-
-//
-// Timer Specific Access Rights.
-//
-
- TIMER_QUERY_STATE = $0001;
- {$EXTERNALSYM TIMER_QUERY_STATE}
- TIMER_MODIFY_STATE = $0002;
- {$EXTERNALSYM TIMER_MODIFY_STATE}
-
- TIMER_ALL_ACCESS = STANDARD_RIGHTS_REQUIRED or SYNCHRONIZE or TIMER_QUERY_STATE or TIMER_MODIFY_STATE;
- {$EXTERNALSYM TIMER_ALL_ACCESS}
-
- TIME_ZONE_ID_UNKNOWN = 0;
- {$EXTERNALSYM TIME_ZONE_ID_UNKNOWN}
- TIME_ZONE_ID_STANDARD = 1;
- {$EXTERNALSYM TIME_ZONE_ID_STANDARD}
- TIME_ZONE_ID_DAYLIGHT = 2;
- {$EXTERNALSYM TIME_ZONE_ID_DAYLIGHT}
-
-type
- _LOGICAL_PROCESSOR_RELATIONSHIP = (RelationProcessorCore, RelationNumaNode);
- {$EXTERNALSYM _LOGICAL_PROCESSOR_RELATIONSHIP}
- LOGICAL_PROCESSOR_RELATIONSHIP = _LOGICAL_PROCESSOR_RELATIONSHIP;
- {$EXTERNALSYM LOGICAL_PROCESSOR_RELATIONSHIP}
- TLogicalProcessorRelationship = LOGICAL_PROCESSOR_RELATIONSHIP;
-
-const
- LTP_PC_SMT = $1;
- {$EXTERNALSYM LTP_PC_SMT}
-
-type
- _SYSTEM_LOGICAL_PROCESSOR_INFORMATION = record
- ProcessorMask: ULONG_PTR;
- Relationship: LOGICAL_PROCESSOR_RELATIONSHIP;
- case Integer of
- 0: (Flags: BYTE); // ProcessorCore
- 1: (NodeNumber: DWORD); // NumaNode
- 2: (Reserved: array [0..1] of ULONGLONG);
- end;
- {$EXTERNALSYM _SYSTEM_LOGICAL_PROCESSOR_INFORMATION}
- SYSTEM_LOGICAL_PROCESSOR_INFORMATION = _SYSTEM_LOGICAL_PROCESSOR_INFORMATION;
- {$EXTERNALSYM SYSTEM_LOGICAL_PROCESSOR_INFORMATION}
- PSYSTEM_LOGICAL_PROCESSOR_INFORMATION = ^SYSTEM_LOGICAL_PROCESSOR_INFORMATION;
- TSystemLogicalProcessorInformation = SYSTEM_LOGICAL_PROCESSOR_INFORMATION;
- PSystemLogicalProcessorInformation = PSYSTEM_LOGICAL_PROCESSOR_INFORMATION;
-
-const
- PROCESSOR_INTEL_386 = 386;
- {$EXTERNALSYM PROCESSOR_INTEL_386}
- PROCESSOR_INTEL_486 = 486;
- {$EXTERNALSYM PROCESSOR_INTEL_486}
- PROCESSOR_INTEL_PENTIUM = 586;
- {$EXTERNALSYM PROCESSOR_INTEL_PENTIUM}
- PROCESSOR_INTEL_IA64 = 2200;
- {$EXTERNALSYM PROCESSOR_INTEL_IA64}
- PROCESSOR_AMD_X8664 = 8664;
- {$EXTERNALSYM PROCESSOR_AMD_X8664}
- PROCESSOR_MIPS_R4000 = 4000; // incl R4101 & R3910 for Windows CE
- {$EXTERNALSYM PROCESSOR_MIPS_R4000}
- PROCESSOR_ALPHA_21064 = 21064;
- {$EXTERNALSYM PROCESSOR_ALPHA_21064}
- PROCESSOR_PPC_601 = 601;
- {$EXTERNALSYM PROCESSOR_PPC_601}
- PROCESSOR_PPC_603 = 603;
- {$EXTERNALSYM PROCESSOR_PPC_603}
- PROCESSOR_PPC_604 = 604;
- {$EXTERNALSYM PROCESSOR_PPC_604}
- PROCESSOR_PPC_620 = 620;
- {$EXTERNALSYM PROCESSOR_PPC_620}
- PROCESSOR_HITACHI_SH3 = 10003; // Windows CE
- {$EXTERNALSYM PROCESSOR_HITACHI_SH3}
- PROCESSOR_HITACHI_SH3E = 10004; // Windows CE
- {$EXTERNALSYM PROCESSOR_HITACHI_SH3E}
- PROCESSOR_HITACHI_SH4 = 10005; // Windows CE
- {$EXTERNALSYM PROCESSOR_HITACHI_SH4}
- PROCESSOR_MOTOROLA_821 = 821; // Windows CE
- {$EXTERNALSYM PROCESSOR_MOTOROLA_821}
- PROCESSOR_SHx_SH3 = 103; // Windows CE
- {$EXTERNALSYM PROCESSOR_SHx_SH3}
- PROCESSOR_SHx_SH4 = 104; // Windows CE
- {$EXTERNALSYM PROCESSOR_SHx_SH4}
- PROCESSOR_STRONGARM = 2577; // Windows CE - 0xA11
- {$EXTERNALSYM PROCESSOR_STRONGARM}
- PROCESSOR_ARM720 = 1824; // Windows CE - 0x720
- {$EXTERNALSYM PROCESSOR_ARM720}
- PROCESSOR_ARM820 = 2080; // Windows CE - 0x820
- {$EXTERNALSYM PROCESSOR_ARM820}
- PROCESSOR_ARM920 = 2336; // Windows CE - 0x920
- {$EXTERNALSYM PROCESSOR_ARM920}
- PROCESSOR_ARM_7TDMI = 70001; // Windows CE
- {$EXTERNALSYM PROCESSOR_ARM_7TDMI}
- PROCESSOR_OPTIL = $494f; // MSIL
- {$EXTERNALSYM PROCESSOR_OPTIL}
-
- PROCESSOR_ARCHITECTURE_INTEL = 0;
- {$EXTERNALSYM PROCESSOR_ARCHITECTURE_INTEL}
- PROCESSOR_ARCHITECTURE_MIPS = 1;
- {$EXTERNALSYM PROCESSOR_ARCHITECTURE_MIPS}
- PROCESSOR_ARCHITECTURE_ALPHA = 2;
- {$EXTERNALSYM PROCESSOR_ARCHITECTURE_ALPHA}
- PROCESSOR_ARCHITECTURE_PPC = 3;
- {$EXTERNALSYM PROCESSOR_ARCHITECTURE_PPC}
- PROCESSOR_ARCHITECTURE_SHX = 4;
- {$EXTERNALSYM PROCESSOR_ARCHITECTURE_SHX}
- PROCESSOR_ARCHITECTURE_ARM = 5;
- {$EXTERNALSYM PROCESSOR_ARCHITECTURE_ARM}
- PROCESSOR_ARCHITECTURE_IA64 = 6;
- {$EXTERNALSYM PROCESSOR_ARCHITECTURE_IA64}
- PROCESSOR_ARCHITECTURE_ALPHA64 = 7;
- {$EXTERNALSYM PROCESSOR_ARCHITECTURE_ALPHA64}
- PROCESSOR_ARCHITECTURE_MSIL = 8;
- {$EXTERNALSYM PROCESSOR_ARCHITECTURE_MSIL}
- PROCESSOR_ARCHITECTURE_AMD64 = 9;
- {$EXTERNALSYM PROCESSOR_ARCHITECTURE_AMD64}
- PROCESSOR_ARCHITECTURE_IA32_ON_WIN64 = 10;
- {$EXTERNALSYM PROCESSOR_ARCHITECTURE_IA32_ON_WIN64}
-
- PROCESSOR_ARCHITECTURE_UNKNOWN = $FFFF;
- {$EXTERNALSYM PROCESSOR_ARCHITECTURE_UNKNOWN}
-
- PF_FLOATING_POINT_PRECISION_ERRATA = 0;
- {$EXTERNALSYM PF_FLOATING_POINT_PRECISION_ERRATA}
- PF_FLOATING_POINT_EMULATED = 1;
- {$EXTERNALSYM PF_FLOATING_POINT_EMULATED}
- PF_COMPARE_EXCHANGE_DOUBLE = 2;
- {$EXTERNALSYM PF_COMPARE_EXCHANGE_DOUBLE}
- PF_MMX_INSTRUCTIONS_AVAILABLE = 3;
- {$EXTERNALSYM PF_MMX_INSTRUCTIONS_AVAILABLE}
- PF_PPC_MOVEMEM_64BIT_OK = 4;
- {$EXTERNALSYM PF_PPC_MOVEMEM_64BIT_OK}
- PF_ALPHA_BYTE_INSTRUCTIONS = 5;
- {$EXTERNALSYM PF_ALPHA_BYTE_INSTRUCTIONS}
- PF_XMMI_INSTRUCTIONS_AVAILABLE = 6;
- {$EXTERNALSYM PF_XMMI_INSTRUCTIONS_AVAILABLE}
- PF_3DNOW_INSTRUCTIONS_AVAILABLE = 7;
- {$EXTERNALSYM PF_3DNOW_INSTRUCTIONS_AVAILABLE}
- PF_RDTSC_INSTRUCTION_AVAILABLE = 8;
- {$EXTERNALSYM PF_RDTSC_INSTRUCTION_AVAILABLE}
- PF_PAE_ENABLED = 9;
- {$EXTERNALSYM PF_PAE_ENABLED}
- PF_XMMI64_INSTRUCTIONS_AVAILABLE = 10;
- {$EXTERNALSYM PF_XMMI64_INSTRUCTIONS_AVAILABLE}
-
-type
- PMEMORY_BASIC_INFORMATION = ^MEMORY_BASIC_INFORMATION;
- {$EXTERNALSYM PMEMORY_BASIC_INFORMATION}
- _MEMORY_BASIC_INFORMATION = record
- BaseAddress: Pointer;
- AllocationBase: Pointer;
- AllocationProtect: DWORD;
- RegionSize: SIZE_T;
- State: DWORD;
- Protect: DWORD;
- Type_: DWORD;
- end;
- {$EXTERNALSYM _MEMORY_BASIC_INFORMATION}
- MEMORY_BASIC_INFORMATION = _MEMORY_BASIC_INFORMATION;
- {$EXTERNALSYM MEMORY_BASIC_INFORMATION}
- TMemoryBasicInformation = MEMORY_BASIC_INFORMATION;
- PMemoryBasicInformation = PMEMORY_BASIC_INFORMATION;
-
- PMEMORY_BASIC_INFORMATION32 = ^MEMORY_BASIC_INFORMATION32;
- {$EXTERNALSYM PMEMORY_BASIC_INFORMATION32}
- _MEMORY_BASIC_INFORMATION32 = record
- BaseAddress: DWORD;
- AllocationBase: DWORD;
- AllocationProtect: DWORD;
- RegionSize: DWORD;
- State: DWORD;
- Protect: DWORD;
- Type_: DWORD;
- end;
- {$EXTERNALSYM _MEMORY_BASIC_INFORMATION32}
- MEMORY_BASIC_INFORMATION32 = _MEMORY_BASIC_INFORMATION32;
- {$EXTERNALSYM MEMORY_BASIC_INFORMATION32}
- TMemoryBasicInformation32 = MEMORY_BASIC_INFORMATION32;
- PMemoryBasicInformation32 = PMEMORY_BASIC_INFORMATION32;
-
- PMEMORY_BASIC_INFORMATION64 = ^MEMORY_BASIC_INFORMATION64;
- {$EXTERNALSYM PMEMORY_BASIC_INFORMATION64}
- _MEMORY_BASIC_INFORMATION64 = record
- BaseAddress: ULONGLONG;
- AllocationBase: ULONGLONG;
- AllocationProtect: DWORD;
- __alignment1: DWORD;
- RegionSize: ULONGLONG;
- State: DWORD;
- Protect: DWORD;
- Type_: DWORD;
- __alignment2: DWORD;
- end;
- {$EXTERNALSYM _MEMORY_BASIC_INFORMATION64}
- MEMORY_BASIC_INFORMATION64 = _MEMORY_BASIC_INFORMATION64;
- {$EXTERNALSYM MEMORY_BASIC_INFORMATION64}
- TMemoryBasicInformation64 = MEMORY_BASIC_INFORMATION64;
- PMemoryBasicInformation64 = PMEMORY_BASIC_INFORMATION64;
-
-const
- SECTION_QUERY = $0001;
- {$EXTERNALSYM SECTION_QUERY}
- SECTION_MAP_WRITE = $0002;
- {$EXTERNALSYM SECTION_MAP_WRITE}
- SECTION_MAP_READ = $0004;
- {$EXTERNALSYM SECTION_MAP_READ}
- SECTION_MAP_EXECUTE = $0008;
- {$EXTERNALSYM SECTION_MAP_EXECUTE}
- SECTION_EXTEND_SIZE = $0010;
- {$EXTERNALSYM SECTION_EXTEND_SIZE}
-
- SECTION_ALL_ACCESS = (STANDARD_RIGHTS_REQUIRED or SECTION_QUERY or
- SECTION_MAP_WRITE or SECTION_MAP_READ or SECTION_MAP_EXECUTE or
- SECTION_EXTEND_SIZE);
- {$EXTERNALSYM SECTION_ALL_ACCESS}
-
- PAGE_NOACCESS = $01;
- {$EXTERNALSYM PAGE_NOACCESS}
- PAGE_READONLY = $02;
- {$EXTERNALSYM PAGE_READONLY}
- PAGE_READWRITE = $04;
- {$EXTERNALSYM PAGE_READWRITE}
- PAGE_WRITECOPY = $08;
- {$EXTERNALSYM PAGE_WRITECOPY}
- PAGE_EXECUTE = $10;
- {$EXTERNALSYM PAGE_EXECUTE}
- PAGE_EXECUTE_READ = $20;
- {$EXTERNALSYM PAGE_EXECUTE_READ}
- PAGE_EXECUTE_READWRITE = $40;
- {$EXTERNALSYM PAGE_EXECUTE_READWRITE}
- PAGE_EXECUTE_WRITECOPY = $80;
- {$EXTERNALSYM PAGE_EXECUTE_WRITECOPY}
- PAGE_GUARD = $100;
- {$EXTERNALSYM PAGE_GUARD}
- PAGE_NOCACHE = $200;
- {$EXTERNALSYM PAGE_NOCACHE}
- PAGE_WRITECOMBINE = $400;
- {$EXTERNALSYM PAGE_WRITECOMBINE}
- MEM_COMMIT = $1000;
- {$EXTERNALSYM MEM_COMMIT}
- MEM_RESERVE = $2000;
- {$EXTERNALSYM MEM_RESERVE}
- MEM_DECOMMIT = $4000;
- {$EXTERNALSYM MEM_DECOMMIT}
- MEM_RELEASE = $8000;
- {$EXTERNALSYM MEM_RELEASE}
- MEM_FREE = $10000;
- {$EXTERNALSYM MEM_FREE}
- MEM_PRIVATE = $20000;
- {$EXTERNALSYM MEM_PRIVATE}
- MEM_MAPPED = $40000;
- {$EXTERNALSYM MEM_MAPPED}
- MEM_RESET = $80000;
- {$EXTERNALSYM MEM_RESET}
- MEM_TOP_DOWN = $100000;
- {$EXTERNALSYM MEM_TOP_DOWN}
- MEM_WRITE_WATCH = $200000;
- {$EXTERNALSYM MEM_WRITE_WATCH}
- MEM_PHYSICAL = $400000;
- {$EXTERNALSYM MEM_PHYSICAL}
- MEM_LARGE_PAGES = $20000000;
- {$EXTERNALSYM MEM_LARGE_PAGES}
- MEM_4MB_PAGES = DWORD($80000000);
- {$EXTERNALSYM MEM_4MB_PAGES}
- SEC_FILE = $800000;
- {$EXTERNALSYM SEC_FILE}
- SEC_IMAGE = $1000000;
- {$EXTERNALSYM SEC_IMAGE}
- SEC_RESERVE = $4000000;
- {$EXTERNALSYM SEC_RESERVE}
- SEC_COMMIT = DWORD($8000000);
- {$EXTERNALSYM SEC_COMMIT}
- SEC_NOCACHE = $10000000;
- {$EXTERNALSYM SEC_NOCACHE}
- MEM_IMAGE = SEC_IMAGE;
- {$EXTERNALSYM MEM_IMAGE}
- WRITE_WATCH_FLAG_RESET = $01;
- {$EXTERNALSYM WRITE_WATCH_FLAG_RESET}
-
-//
-// Define access rights to files and directories
-//
-
-//
-// The FILE_READ_DATA and FILE_WRITE_DATA constants are also defined in
-// devioctl.h as FILE_READ_ACCESS and FILE_WRITE_ACCESS. The values for these
-// constants *MUST* always be in sync.
-// The values are redefined in devioctl.h because they must be available to
-// both DOS and NT.
-//
-
- FILE_READ_DATA = $0001; // file & pipe
- {$EXTERNALSYM FILE_READ_DATA}
- FILE_LIST_DIRECTORY = $0001; // directory
- {$EXTERNALSYM FILE_LIST_DIRECTORY}
-
- FILE_WRITE_DATA = $0002; // file & pipe
- {$EXTERNALSYM FILE_WRITE_DATA}
- FILE_ADD_FILE = $0002; // directory
- {$EXTERNALSYM FILE_ADD_FILE}
-
- FILE_APPEND_DATA = $0004; // file
- {$EXTERNALSYM FILE_APPEND_DATA}
- FILE_ADD_SUBDIRECTORY = $0004; // directory
- {$EXTERNALSYM FILE_ADD_SUBDIRECTORY}
- FILE_CREATE_PIPE_INSTANCE = $0004; // named pipe
- {$EXTERNALSYM FILE_CREATE_PIPE_INSTANCE}
-
- FILE_READ_EA = $0008; // file & directory
- {$EXTERNALSYM FILE_READ_EA}
-
- FILE_WRITE_EA = $0010; // file & directory
- {$EXTERNALSYM FILE_WRITE_EA}
-
- FILE_EXECUTE = $0020; // file
- {$EXTERNALSYM FILE_EXECUTE}
- FILE_TRAVERSE = $0020; // directory
- {$EXTERNALSYM FILE_TRAVERSE}
-
- FILE_DELETE_CHILD = $0040; // directory
- {$EXTERNALSYM FILE_DELETE_CHILD}
-
- FILE_READ_ATTRIBUTES = $0080; // all
- {$EXTERNALSYM FILE_READ_ATTRIBUTES}
-
- FILE_WRITE_ATTRIBUTES = $0100; // all
- {$EXTERNALSYM FILE_WRITE_ATTRIBUTES}
-
- FILE_ALL_ACCESS = STANDARD_RIGHTS_REQUIRED or SYNCHRONIZE or $1FF;
- {$EXTERNALSYM FILE_ALL_ACCESS}
-
- FILE_GENERIC_READ = (STANDARD_RIGHTS_READ or FILE_READ_DATA or
- FILE_READ_ATTRIBUTES or FILE_READ_EA or SYNCHRONIZE);
- {$EXTERNALSYM FILE_GENERIC_READ}
-
- FILE_GENERIC_WRITE = (STANDARD_RIGHTS_WRITE or FILE_WRITE_DATA or
- FILE_WRITE_ATTRIBUTES or FILE_WRITE_EA or FILE_APPEND_DATA or SYNCHRONIZE);
- {$EXTERNALSYM FILE_GENERIC_WRITE}
-
- FILE_GENERIC_EXECUTE = (STANDARD_RIGHTS_EXECUTE or FILE_READ_ATTRIBUTES or
- FILE_EXECUTE or SYNCHRONIZE);
- {$EXTERNALSYM FILE_GENERIC_EXECUTE}
-
- FILE_SHARE_READ = $00000001;
- {$EXTERNALSYM FILE_SHARE_READ}
- FILE_SHARE_WRITE = $00000002;
- {$EXTERNALSYM FILE_SHARE_WRITE}
- FILE_SHARE_DELETE = $00000004;
- {$EXTERNALSYM FILE_SHARE_DELETE}
- FILE_ATTRIBUTE_READONLY = $00000001;
- {$EXTERNALSYM FILE_ATTRIBUTE_READONLY}
- FILE_ATTRIBUTE_HIDDEN = $00000002;
- {$EXTERNALSYM FILE_ATTRIBUTE_HIDDEN}
- FILE_ATTRIBUTE_SYSTEM = $00000004;
- {$EXTERNALSYM FILE_ATTRIBUTE_SYSTEM}
- FILE_ATTRIBUTE_DIRECTORY = $00000010;
- {$EXTERNALSYM FILE_ATTRIBUTE_DIRECTORY}
- FILE_ATTRIBUTE_ARCHIVE = $00000020;
- {$EXTERNALSYM FILE_ATTRIBUTE_ARCHIVE}
- FILE_ATTRIBUTE_DEVICE = $00000040;
- {$EXTERNALSYM FILE_ATTRIBUTE_DEVICE}
- FILE_ATTRIBUTE_NORMAL = $00000080;
- {$EXTERNALSYM FILE_ATTRIBUTE_NORMAL}
- FILE_ATTRIBUTE_TEMPORARY = $00000100;
- {$EXTERNALSYM FILE_ATTRIBUTE_TEMPORARY}
- FILE_ATTRIBUTE_SPARSE_FILE = $00000200;
- {$EXTERNALSYM FILE_ATTRIBUTE_SPARSE_FILE}
- FILE_ATTRIBUTE_REPARSE_POINT = $00000400;
- {$EXTERNALSYM FILE_ATTRIBUTE_REPARSE_POINT}
- FILE_ATTRIBUTE_COMPRESSED = $00000800;
- {$EXTERNALSYM FILE_ATTRIBUTE_COMPRESSED}
- FILE_ATTRIBUTE_OFFLINE = $00001000;
- {$EXTERNALSYM FILE_ATTRIBUTE_OFFLINE}
- FILE_ATTRIBUTE_NOT_CONTENT_INDEXED = $00002000;
- {$EXTERNALSYM FILE_ATTRIBUTE_NOT_CONTENT_INDEXED}
- FILE_ATTRIBUTE_ENCRYPTED = $00004000;
- {$EXTERNALSYM FILE_ATTRIBUTE_ENCRYPTED}
- FILE_NOTIFY_CHANGE_FILE_NAME = $00000001;
- {$EXTERNALSYM FILE_NOTIFY_CHANGE_FILE_NAME}
- FILE_NOTIFY_CHANGE_DIR_NAME = $00000002;
- {$EXTERNALSYM FILE_NOTIFY_CHANGE_DIR_NAME}
- FILE_NOTIFY_CHANGE_ATTRIBUTES = $00000004;
- {$EXTERNALSYM FILE_NOTIFY_CHANGE_ATTRIBUTES}
- FILE_NOTIFY_CHANGE_SIZE = $00000008;
- {$EXTERNALSYM FILE_NOTIFY_CHANGE_SIZE}
- FILE_NOTIFY_CHANGE_LAST_WRITE = $00000010;
- {$EXTERNALSYM FILE_NOTIFY_CHANGE_LAST_WRITE}
- FILE_NOTIFY_CHANGE_LAST_ACCESS = $00000020;
- {$EXTERNALSYM FILE_NOTIFY_CHANGE_LAST_ACCESS}
- FILE_NOTIFY_CHANGE_CREATION = $00000040;
- {$EXTERNALSYM FILE_NOTIFY_CHANGE_CREATION}
- FILE_NOTIFY_CHANGE_SECURITY = $00000100;
- {$EXTERNALSYM FILE_NOTIFY_CHANGE_SECURITY}
- FILE_ACTION_ADDED = $00000001;
- {$EXTERNALSYM FILE_ACTION_ADDED}
- FILE_ACTION_REMOVED = $00000002;
- {$EXTERNALSYM FILE_ACTION_REMOVED}
- FILE_ACTION_MODIFIED = $00000003;
- {$EXTERNALSYM FILE_ACTION_MODIFIED}
- FILE_ACTION_RENAMED_OLD_NAME = $00000004;
- {$EXTERNALSYM FILE_ACTION_RENAMED_OLD_NAME}
- FILE_ACTION_RENAMED_NEW_NAME = $00000005;
- {$EXTERNALSYM FILE_ACTION_RENAMED_NEW_NAME}
- MAILSLOT_NO_MESSAGE = DWORD(-1);
- {$EXTERNALSYM MAILSLOT_NO_MESSAGE}
- MAILSLOT_WAIT_FOREVER = DWORD(-1);
- {$EXTERNALSYM MAILSLOT_WAIT_FOREVER}
- FILE_CASE_SENSITIVE_SEARCH = $00000001;
- {$EXTERNALSYM FILE_CASE_SENSITIVE_SEARCH}
- FILE_CASE_PRESERVED_NAMES = $00000002;
- {$EXTERNALSYM FILE_CASE_PRESERVED_NAMES}
- FILE_UNICODE_ON_DISK = $00000004;
- {$EXTERNALSYM FILE_UNICODE_ON_DISK}
- FILE_PERSISTENT_ACLS = $00000008;
- {$EXTERNALSYM FILE_PERSISTENT_ACLS}
- FILE_FILE_COMPRESSION = $00000010;
- {$EXTERNALSYM FILE_FILE_COMPRESSION}
- FILE_VOLUME_QUOTAS = $00000020;
- {$EXTERNALSYM FILE_VOLUME_QUOTAS}
- FILE_SUPPORTS_SPARSE_FILES = $00000040;
- {$EXTERNALSYM FILE_SUPPORTS_SPARSE_FILES}
- FILE_SUPPORTS_REPARSE_POINTS = $00000080;
- {$EXTERNALSYM FILE_SUPPORTS_REPARSE_POINTS}
- FILE_SUPPORTS_REMOTE_STORAGE = $00000100;
- {$EXTERNALSYM FILE_SUPPORTS_REMOTE_STORAGE}
- FILE_VOLUME_IS_COMPRESSED = $00008000;
- {$EXTERNALSYM FILE_VOLUME_IS_COMPRESSED}
- FILE_SUPPORTS_OBJECT_IDS = $00010000;
- {$EXTERNALSYM FILE_SUPPORTS_OBJECT_IDS}
- FILE_SUPPORTS_ENCRYPTION = $00020000;
- {$EXTERNALSYM FILE_SUPPORTS_ENCRYPTION}
- FILE_NAMED_STREAMS = $00040000;
- {$EXTERNALSYM FILE_NAMED_STREAMS}
- FILE_READ_ONLY_VOLUME = $00080000;
- {$EXTERNALSYM FILE_READ_ONLY_VOLUME}
-
-//
-// Define the file notification information structure
-//
-
-type
- PFILE_NOTIFY_INFORMATION = ^FILE_NOTIFY_INFORMATION;
- {$EXTERNALSYM PFILE_NOTIFY_INFORMATION}
- _FILE_NOTIFY_INFORMATION = record
- NextEntryOffset: DWORD;
- Action: DWORD;
- FileNameLength: DWORD;
- FileName: array [0..0] of WCHAR;
- end;
- {$EXTERNALSYM _FILE_NOTIFY_INFORMATION}
- FILE_NOTIFY_INFORMATION = _FILE_NOTIFY_INFORMATION;
- {$EXTERNALSYM FILE_NOTIFY_INFORMATION}
- TFileNotifyInformation = FILE_NOTIFY_INFORMATION;
- PFileNotifyInformation = PFILE_NOTIFY_INFORMATION;
-
-//
-// Define segement buffer structure for scatter/gather read/write.
-//
-
-type
- PFILE_SEGMENT_ELEMENT = ^FILE_SEGMENT_ELEMENT;
- {$EXTERNALSYM PFILE_SEGMENT_ELEMENT}
- _FILE_SEGMENT_ELEMENT = record
- case Integer of
- 0: (Buffer: PVOID64);
- 1: (Alignment: ULONGLONG);
- end;
- {$EXTERNALSYM _FILE_SEGMENT_ELEMENT}
- FILE_SEGMENT_ELEMENT = _FILE_SEGMENT_ELEMENT;
- {$EXTERNALSYM FILE_SEGMENT_ELEMENT}
- TFileSegmentElement = FILE_SEGMENT_ELEMENT;
- PFileSegmentElement = PFILE_SEGMENT_ELEMENT;
-
-//
-// The reparse GUID structure is used by all 3rd party layered drivers to
-// store data in a reparse point. For non-Microsoft tags, The GUID field
-// cannot be GUID_NULL.
-// The constraints on reparse tags are defined below.
-// Microsoft tags can also be used with this format of the reparse point buffer.
-//
- TGenericReparseBuffer = record
- DataBuffer: array [0..0] of BYTE;
- end;
-
- PREPARSE_GUID_DATA_BUFFER = ^REPARSE_GUID_DATA_BUFFER;
- {$EXTERNALSYM PREPARSE_GUID_DATA_BUFFER}
- _REPARSE_GUID_DATA_BUFFER = record
- ReparseTag: DWORD;
- ReparseDataLength: WORD;
- Reserved: WORD;
- ReparseGuid: GUID;
- GenericReparseBuffer: TGenericReparseBuffer;
- end;
- {$EXTERNALSYM _REPARSE_GUID_DATA_BUFFER}
- REPARSE_GUID_DATA_BUFFER = _REPARSE_GUID_DATA_BUFFER;
- {$EXTERNALSYM REPARSE_GUID_DATA_BUFFER}
- TReparseGuidDataBuffer = REPARSE_GUID_DATA_BUFFER;
- PReparseGuidDataBuffer = PREPARSE_GUID_DATA_BUFFER;
-
-const
- REPARSE_GUID_DATA_BUFFER_HEADER_SIZE = 24;
- {$EXTERNALSYM REPARSE_GUID_DATA_BUFFER_HEADER_SIZE}
-//
-// Maximum allowed size of the reparse data.
-//
-
-const
- MAXIMUM_REPARSE_DATA_BUFFER_SIZE = 16 * 1024;
- {$EXTERNALSYM MAXIMUM_REPARSE_DATA_BUFFER_SIZE}
-
-//
-// Predefined reparse tags.
-// These tags need to avoid conflicting with IO_REMOUNT defined in ntos\inc\io.h
-//
-
- IO_REPARSE_TAG_RESERVED_ZERO = 0;
- {$EXTERNALSYM IO_REPARSE_TAG_RESERVED_ZERO}
- IO_REPARSE_TAG_RESERVED_ONE = 1;
- {$EXTERNALSYM IO_REPARSE_TAG_RESERVED_ONE}
-
-//
-// The value of the following constant needs to satisfy the following conditions:
-// (1) Be at least as large as the largest of the reserved tags.
-// (2) Be strictly smaller than all the tags in use.
-//
-
- IO_REPARSE_TAG_RESERVED_RANGE = IO_REPARSE_TAG_RESERVED_ONE;
- {$EXTERNALSYM IO_REPARSE_TAG_RESERVED_RANGE}
-
-//
-// The reparse tags are a DWORD. The 32 bits are laid out as follows:
-//
-// 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1
-// 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
-// +-+-+-+-+-----------------------+-------------------------------+
-// |M|R|N|R| Reserved bits | Reparse Tag Value |
-// +-+-+-+-+-----------------------+-------------------------------+
-//
-// M is the Microsoft bit. When set to 1, it denotes a tag owned by Microsoft.
-// All ISVs must use a tag with a 0 in this position.
-// Note: If a Microsoft tag is used by non-Microsoft software, the
-// behavior is not defined.
-//
-// R is reserved. Must be zero for non-Microsoft tags.
-//
-// N is name surrogate. When set to 1, the file represents another named
-// entity in the system.
-//
-// The M and N bits are OR-able.
-// The following macros check for the M and N bit values:
-//
-
-//
-// Macro to determine whether a reparse point tag corresponds to a tag
-// owned by Microsoft.
-//
-
-function IsReparseTagMicrosoft(Tag: ULONG): Boolean;
-{$EXTERNALSYM IsReparseTagMicrosoft}
-
-//
-// Macro to determine whether a reparse point tag corresponds to a file
-// that is to be displayed with the slow icon overlay.
-//
-
-function IsReparseTagHighLatency(Tag: ULONG): Boolean;
-{$EXTERNALSYM IsReparseTagHighLatency}
-
-//
-// Macro to determine whether a reparse point tag is a name surrogate
-//
-
-function IsReparseTagNameSurrogate(Tag: ULONG): Boolean;
-{$EXTERNALSYM IsReparseTagNameSurrogate}
-
-const
- IO_REPARSE_TAG_MOUNT_POINT = DWORD($A0000003);
- {$EXTERNALSYM IO_REPARSE_TAG_MOUNT_POINT}
- IO_REPARSE_TAG_HSM = DWORD($C0000004);
- {$EXTERNALSYM IO_REPARSE_TAG_HSM}
- IO_REPARSE_TAG_SIS = DWORD($80000007);
- {$EXTERNALSYM IO_REPARSE_TAG_SIS}
- IO_REPARSE_TAG_DFS = DWORD($8000000A);
- {$EXTERNALSYM IO_REPARSE_TAG_DFS}
- IO_REPARSE_TAG_FILTER_MANAGER = DWORD($8000000B);
- {$EXTERNALSYM IO_REPARSE_TAG_FILTER_MANAGER}
- IO_COMPLETION_MODIFY_STATE = $0002;
- {$EXTERNALSYM IO_COMPLETION_MODIFY_STATE}
- IO_COMPLETION_ALL_ACCESS = DWORD(STANDARD_RIGHTS_REQUIRED or SYNCHRONIZE or $3);
- {$EXTERNALSYM IO_COMPLETION_ALL_ACCESS}
- DUPLICATE_CLOSE_SOURCE = $00000001;
- {$EXTERNALSYM DUPLICATE_CLOSE_SOURCE}
- DUPLICATE_SAME_ACCESS = $00000002;
- {$EXTERNALSYM DUPLICATE_SAME_ACCESS}
-
-type
- _SYSTEM_POWER_STATE = (
- PowerSystemUnspecified,
- PowerSystemWorking,
- PowerSystemSleeping1,
- PowerSystemSleeping2,
- PowerSystemSleeping3,
- PowerSystemHibernate,
- PowerSystemShutdown,
- PowerSystemMaximum);
- {$EXTERNALSYM _SYSTEM_POWER_STATE}
- SYSTEM_POWER_STATE = _SYSTEM_POWER_STATE;
- {$EXTERNALSYM SYSTEM_POWER_STATE}
- PSYSTEM_POWER_STATE = ^SYSTEM_POWER_STATE;
- {$EXTERNALSYM PSYSTEM_POWER_STATE}
- TSystemPowerState = SYSTEM_POWER_STATE;
- PSystemPowerState = PSYSTEM_POWER_STATE;
-
-const
- POWER_SYSTEM_MAXIMUM = 7;
- {$EXTERNALSYM POWER_SYSTEM_MAXIMUM}
-
-type
- POWER_ACTION = (
- PowerActionNone,
- PowerActionReserved,
- PowerActionSleep,
- PowerActionHibernate,
- PowerActionShutdown,
- PowerActionShutdownReset,
- PowerActionShutdownOff,
- PowerActionWarmEject);
- {$EXTERNALSYM POWER_ACTION}
- PPOWER_ACTION = ^POWER_ACTION;
- {$EXTERNALSYM PPOWER_ACTION}
- TPowerAction = POWER_ACTION;
- PPowerAction = PPOWER_ACTION;
-
- _DEVICE_POWER_STATE = (
- PowerDeviceUnspecified,
- PowerDeviceD0,
- PowerDeviceD1,
- PowerDeviceD2,
- PowerDeviceD3,
- PowerDeviceMaximum);
- {$EXTERNALSYM _DEVICE_POWER_STATE}
- DEVICE_POWER_STATE = _DEVICE_POWER_STATE;
- {$EXTERNALSYM DEVICE_POWER_STATE}
- PDEVICE_POWER_STATE = ^DEVICE_POWER_STATE;
- {$EXTERNALSYM PDEVICE_POWER_STATE}
- TDevicePowerState = DEVICE_POWER_STATE;
- PDevicePowerState = PDEVICE_POWER_STATE;
-
-const
- ES_SYSTEM_REQUIRED = DWORD($00000001);
- {$EXTERNALSYM ES_SYSTEM_REQUIRED}
- ES_DISPLAY_REQUIRED = DWORD($00000002);
- {$EXTERNALSYM ES_DISPLAY_REQUIRED}
- ES_USER_PRESENT = DWORD($00000004);
- {$EXTERNALSYM ES_USER_PRESENT}
- ES_CONTINUOUS = DWORD($80000000);
- {$EXTERNALSYM ES_CONTINUOUS}
-
-type
- EXECUTION_STATE = DWORD;
- {$EXTERNALSYM EXECUTION_STATE}
-
- LATENCY_TIME = (LT_DONT_CARE, LT_LOWEST_LATENCY);
- {$EXTERNALSYM LATENCY_TIME}
- TLatencyTime = LATENCY_TIME;
-
-//-----------------------------------------------------------------------------
-// Device Power Information
-// Accessable via CM_Get_DevInst_Registry_Property_Ex(CM_DRP_DEVICE_POWER_DATA)
-//-----------------------------------------------------------------------------
-
-const
- PDCAP_D0_SUPPORTED = $00000001;
- {$EXTERNALSYM PDCAP_D0_SUPPORTED}
- PDCAP_D1_SUPPORTED = $00000002;
- {$EXTERNALSYM PDCAP_D1_SUPPORTED}
- PDCAP_D2_SUPPORTED = $00000004;
- {$EXTERNALSYM PDCAP_D2_SUPPORTED}
- PDCAP_D3_SUPPORTED = $00000008;
- {$EXTERNALSYM PDCAP_D3_SUPPORTED}
- PDCAP_WAKE_FROM_D0_SUPPORTED = $00000010;
- {$EXTERNALSYM PDCAP_WAKE_FROM_D0_SUPPORTED}
- PDCAP_WAKE_FROM_D1_SUPPORTED = $00000020;
- {$EXTERNALSYM PDCAP_WAKE_FROM_D1_SUPPORTED}
- PDCAP_WAKE_FROM_D2_SUPPORTED = $00000040;
- {$EXTERNALSYM PDCAP_WAKE_FROM_D2_SUPPORTED}
- PDCAP_WAKE_FROM_D3_SUPPORTED = $00000080;
- {$EXTERNALSYM PDCAP_WAKE_FROM_D3_SUPPORTED}
- PDCAP_WARM_EJECT_SUPPORTED = $00000100;
- {$EXTERNALSYM PDCAP_WARM_EJECT_SUPPORTED}
-
-type
- CM_Power_Data_s = record
- PD_Size: DWORD;
- PD_MostRecentPowerState: DEVICE_POWER_STATE;
- PD_Capabilities: DWORD;
- PD_D1Latency: DWORD;
- PD_D2Latency: DWORD;
- PD_D3Latency: DWORD;
- PD_PowerStateMapping: array [0..POWER_SYSTEM_MAXIMUM - 1] of DEVICE_POWER_STATE;
- PD_DeepestSystemWake: SYSTEM_POWER_STATE;
- end;
- {$EXTERNALSYM CM_Power_Data_s}
- CM_POWER_DATA = CM_Power_Data_s;
- {$EXTERNALSYM CM_POWER_DATA}
- PCM_POWER_DATA = ^CM_POWER_DATA;
- {$EXTERNALSYM PCM_POWER_DATA}
- TCmPowerData = CM_POWER_DATA;
- PCmPowerData = PCM_POWER_DATA;
-
- POWER_INFORMATION_LEVEL = (
- SystemPowerPolicyAc,
- SystemPowerPolicyDc,
- VerifySystemPolicyAc,
- VerifySystemPolicyDc,
- SystemPowerCapabilities,
- SystemBatteryState,
- SystemPowerStateHandler,
- ProcessorStateHandler,
- SystemPowerPolicyCurrent,
- AdministratorPowerPolicy,
- SystemReserveHiberFile,
- ProcessorInformation,
- SystemPowerInformation,
- ProcessorStateHandler2,
- LastWakeTime, // Compare with KeQueryInterruptTime()
- LastSleepTime, // Compare with KeQueryInterruptTime()
- SystemExecutionState,
- SystemPowerStateNotifyHandler,
- ProcessorPowerPolicyAc,
- ProcessorPowerPolicyDc,
- VerifyProcessorPowerPolicyAc,
- VerifyProcessorPowerPolicyDc,
- ProcessorPowerPolicyCurrent,
- SystemPowerStateLogging,
- SystemPowerLoggingEntry);
- {$EXTERNALSYM POWER_INFORMATION_LEVEL}
- TPowerInformationLevel = POWER_INFORMATION_LEVEL;
-
-//
-// System power manager capabilities
-//
-
- BATTERY_REPORTING_SCALE = record
- Granularity: DWORD;
- Capacity: DWORD;
- end;
- {$EXTERNALSYM BATTERY_REPORTING_SCALE}
- PBATTERY_REPORTING_SCALE = ^BATTERY_REPORTING_SCALE;
- {$EXTERNALSYM PBATTERY_REPORTING_SCALE}
- TBatteryReportingScale = BATTERY_REPORTING_SCALE;
- PBatteryReportingScale = PBATTERY_REPORTING_SCALE;
-
-// Power Policy Management interfaces
-//
-
- PPOWER_ACTION_POLICY = ^POWER_ACTION_POLICY;
- {$EXTERNALSYM PPOWER_ACTION_POLICY}
- POWER_ACTION_POLICY = record
- Action: POWER_ACTION;
- Flags: DWORD;
- EventCode: DWORD;
- end;
- {$EXTERNALSYM POWER_ACTION_POLICY}
- TPowerActionPolicy = POWER_ACTION_POLICY;
- PPowerActionPolicy = PPOWER_ACTION_POLICY;
-
-// POWER_ACTION_POLICY->Flags:
-
-const
- POWER_ACTION_QUERY_ALLOWED = $00000001;
- {$EXTERNALSYM POWER_ACTION_QUERY_ALLOWED}
- POWER_ACTION_UI_ALLOWED = $00000002;
- {$EXTERNALSYM POWER_ACTION_UI_ALLOWED}
- POWER_ACTION_OVERRIDE_APPS = $00000004;
- {$EXTERNALSYM POWER_ACTION_OVERRIDE_APPS}
- POWER_ACTION_LIGHTEST_FIRST = $10000000;
- {$EXTERNALSYM POWER_ACTION_LIGHTEST_FIRST}
- POWER_ACTION_LOCK_CONSOLE = $20000000;
- {$EXTERNALSYM POWER_ACTION_LOCK_CONSOLE}
- POWER_ACTION_DISABLE_WAKES = $40000000;
- {$EXTERNALSYM POWER_ACTION_DISABLE_WAKES}
- POWER_ACTION_CRITICAL = DWORD($80000000);
- {$EXTERNALSYM POWER_ACTION_CRITICAL}
-
-// POWER_ACTION_POLICY->EventCode flags
-
- POWER_LEVEL_USER_NOTIFY_TEXT = $00000001;
- {$EXTERNALSYM POWER_LEVEL_USER_NOTIFY_TEXT}
- POWER_LEVEL_USER_NOTIFY_SOUND = $00000002;
- {$EXTERNALSYM POWER_LEVEL_USER_NOTIFY_SOUND}
- POWER_LEVEL_USER_NOTIFY_EXEC = $00000004;
- {$EXTERNALSYM POWER_LEVEL_USER_NOTIFY_EXEC}
- POWER_USER_NOTIFY_BUTTON = $00000008;
- {$EXTERNALSYM POWER_USER_NOTIFY_BUTTON}
- POWER_USER_NOTIFY_SHUTDOWN = $00000010;
- {$EXTERNALSYM POWER_USER_NOTIFY_SHUTDOWN}
- POWER_FORCE_TRIGGER_RESET = DWORD($80000000);
- {$EXTERNALSYM POWER_FORCE_TRIGGER_RESET}
-
-// system battery drain policies
-
-type
- PSYSTEM_POWER_LEVEL = ^SYSTEM_POWER_LEVEL;
- {$EXTERNALSYM PSYSTEM_POWER_LEVEL}
- SYSTEM_POWER_LEVEL = record
- Enable: BOOLEAN;
- Spare: array [0..3 - 1] of BYTE;
- BatteryLevel: DWORD;
- PowerPolicy: POWER_ACTION_POLICY;
- MinSystemState: SYSTEM_POWER_STATE;
- end;
- {$EXTERNALSYM SYSTEM_POWER_LEVEL}
- TSystemPowerLevel = SYSTEM_POWER_LEVEL;
- PSystemPowerLevel = PSYSTEM_POWER_LEVEL;
-
-// Discharge policy constants
-
-const
- NUM_DISCHARGE_POLICIES = 4;
- {$EXTERNALSYM NUM_DISCHARGE_POLICIES}
- DISCHARGE_POLICY_CRITICAL = 0;
- {$EXTERNALSYM DISCHARGE_POLICY_CRITICAL}
- DISCHARGE_POLICY_LOW = 1;
- {$EXTERNALSYM DISCHARGE_POLICY_LOW}
-
-//
-// Throttling policies
-//
-
- PO_THROTTLE_NONE = 0;
- {$EXTERNALSYM PO_THROTTLE_NONE}
- PO_THROTTLE_CONSTANT = 1;
- {$EXTERNALSYM PO_THROTTLE_CONSTANT}
- PO_THROTTLE_DEGRADE = 2;
- {$EXTERNALSYM PO_THROTTLE_DEGRADE}
- PO_THROTTLE_ADAPTIVE = 3;
- {$EXTERNALSYM PO_THROTTLE_ADAPTIVE}
- PO_THROTTLE_MAXIMUM = 4; // not a policy, just a limit
- {$EXTERNALSYM PO_THROTTLE_MAXIMUM}
-
-// system power policies
-
-type
- PSYSTEM_POWER_POLICY = ^SYSTEM_POWER_POLICY;
- {$EXTERNALSYM PSYSTEM_POWER_POLICY}
- _SYSTEM_POWER_POLICY = record
- Revision: DWORD; // 1
- // events
- PowerButton: POWER_ACTION_POLICY;
- SleepButton: POWER_ACTION_POLICY;
- LidClose: POWER_ACTION_POLICY;
- LidOpenWake: SYSTEM_POWER_STATE;
- Reserved: DWORD;
- // "system idle" detection
- Idle: POWER_ACTION_POLICY;
- IdleTimeout: DWORD;
- IdleSensitivity: BYTE;
- // dynamic throttling policy
- // PO_THROTTLE_NONE, PO_THROTTLE_CONSTANT, PO_THROTTLE_DEGRADE, or PO_THROTTLE_ADAPTIVE
- DynamicThrottle: BYTE;
- Spare2: array [0..1] of BYTE;
- // meaning of power action "sleep"
- MinSleep: SYSTEM_POWER_STATE;
- MaxSleep: SYSTEM_POWER_STATE;
- ReducedLatencySleep: SYSTEM_POWER_STATE;
- WinLogonFlags: DWORD;
- // parameters for dozing
- Spare3: DWORD;
- DozeS4Timeout: DWORD;
- // battery policies
- BroadcastCapacityResolution: DWORD;
- DischargePolicy: array [0..NUM_DISCHARGE_POLICIES - 1] of SYSTEM_POWER_LEVEL;
- // video policies
- VideoTimeout: DWORD;
- VideoDimDisplay: BOOLEAN;
- VideoReserved: array [0..2] of DWORD;
- // hard disk policies
- SpindownTimeout: DWORD;
- // processor policies
- OptimizeForPower: LongBool;
- FanThrottleTolerance: BYTE;
- ForcedThrottle: BYTE;
- MinThrottle: BYTE;
- OverThrottled: POWER_ACTION_POLICY;
- end;
- {$EXTERNALSYM _SYSTEM_POWER_POLICY}
- SYSTEM_POWER_POLICY = _SYSTEM_POWER_POLICY;
- {$EXTERNALSYM SYSTEM_POWER_POLICY}
- TSystemPowerPolicy = SYSTEM_POWER_POLICY;
- PSystemPowerPolicy = PSYSTEM_POWER_POLICY;
-
-// processor power policy state
-
- PPROCESSOR_POWER_POLICY_INFO = ^PROCESSOR_POWER_POLICY_INFO;
- {$EXTERNALSYM PPROCESSOR_POWER_POLICY_INFO}
- _PROCESSOR_POWER_POLICY_INFO = record
- // Time based information (will be converted to kernel units)
- TimeCheck: DWORD; // in US
- DemoteLimit: DWORD; // in US
- PromoteLimit: DWORD; // in US
- // Percentage based information
- DemotePercent: BYTE;
- PromotePercent: BYTE;
- Spare: array [0..1] of BYTE;
- // Flags
- Flags: DWORD;
- //DWORD AllowDemotion:1;
- //DWORD AllowPromotion:1;
- //DWORD Reserved:30;
- end;
- {$EXTERNALSYM _PROCESSOR_POWER_POLICY_INFO}
- PROCESSOR_POWER_POLICY_INFO = _PROCESSOR_POWER_POLICY_INFO;
- {$EXTERNALSYM PROCESSOR_POWER_POLICY_INFO}
- TProcessorPowerPolicyInfo = PROCESSOR_POWER_POLICY_INFO;
- PProcessorPowerPolicyInfo = PPROCESSOR_POWER_POLICY_INFO;
-
-// processor power policy
-
- PPROCESSOR_POWER_POLICY = ^PROCESSOR_POWER_POLICY;
- {$EXTERNALSYM PPROCESSOR_POWER_POLICY}
- _PROCESSOR_POWER_POLICY = record
- Revision: DWORD; // 1
- // Dynamic Throttling Policy
- DynamicThrottle: BYTE;
- Spare: array [0..2] of BYTE;
- // Flags
- Reserved: DWORD;
- //DWORD DisableCStates:1;
- //DWORD Reserved:31;
-
- // System policy information
- // The Array is last, in case it needs to be grown and the structure
- // revision incremented.
- PolicyCount: DWORD;
- Policy: array [0..2] of PROCESSOR_POWER_POLICY_INFO;
- end;
- {$EXTERNALSYM _PROCESSOR_POWER_POLICY}
- PROCESSOR_POWER_POLICY = _PROCESSOR_POWER_POLICY;
- {$EXTERNALSYM PROCESSOR_POWER_POLICY}
- TProcessorPowerPolicy = PROCESSOR_POWER_POLICY;
- PProcessorPowerPolicy = PPROCESSOR_POWER_POLICY;
-
-// administrator power policy overrides
-
- PADMINISTRATOR_POWER_POLICY = ^ADMINISTRATOR_POWER_POLICY;
- {$EXTERNALSYM PADMINISTRATOR_POWER_POLICY}
- _ADMINISTRATOR_POWER_POLICY = record
- // meaning of power action "sleep"
- MinSleep: SYSTEM_POWER_STATE;
- MaxSleep: SYSTEM_POWER_STATE;
- // video policies
- MinVideoTimeout: DWORD;
- MaxVideoTimeout: DWORD;
- // disk policies
- MinSpindownTimeout: DWORD;
- MaxSpindownTimeout: DWORD;
- end;
- {$EXTERNALSYM _ADMINISTRATOR_POWER_POLICY}
- ADMINISTRATOR_POWER_POLICY = _ADMINISTRATOR_POWER_POLICY;
- {$EXTERNALSYM ADMINISTRATOR_POWER_POLICY}
- TAdministratorPowerPolicy = ADMINISTRATOR_POWER_POLICY;
- PAdministratorPowerPolicy = PADMINISTRATOR_POWER_POLICY;
-
- PSYSTEM_POWER_CAPABILITIES = ^SYSTEM_POWER_CAPABILITIES;
- {$EXTERNALSYM PSYSTEM_POWER_CAPABILITIES}
- SYSTEM_POWER_CAPABILITIES = record
- // Misc supported system features
- PowerButtonPresent: BOOLEAN;
- SleepButtonPresent: BOOLEAN;
- LidPresent: BOOLEAN;
- SystemS1: BOOLEAN;
- SystemS2: BOOLEAN;
- SystemS3: BOOLEAN;
- SystemS4: BOOLEAN; // hibernate
- SystemS5: BOOLEAN; // off
- HiberFilePresent: BOOLEAN;
- FullWake: BOOLEAN;
- VideoDimPresent: BOOLEAN;
- ApmPresent: BOOLEAN;
- UpsPresent: BOOLEAN;
- // Processors
- ThermalControl: BOOLEAN;
- ProcessorThrottle: BOOLEAN;
- ProcessorMinThrottle: BYTE;
- ProcessorMaxThrottle: BYTE;
- spare2: array [0..4 - 1] of BYTE;
- // Disk
- DiskSpinDown: BOOLEAN;
- spare3: array [0..8 - 1] of BYTE;
- // System Battery
- SystemBatteriesPresent: BOOLEAN;
- BatteriesAreShortTerm: BOOLEAN;
- BatteryScale: array [0..3 - 1] of BATTERY_REPORTING_SCALE;
- // Wake
- AcOnLineWake: SYSTEM_POWER_STATE;
- SoftLidWake: SYSTEM_POWER_STATE;
- RtcWake: SYSTEM_POWER_STATE;
- MinDeviceWakeState: SYSTEM_POWER_STATE; // note this may change on driver load
- DefaultLowLatencyWake: SYSTEM_POWER_STATE;
- end;
- {$EXTERNALSYM SYSTEM_POWER_CAPABILITIES}
- TSystemPowerCapabilities = SYSTEM_POWER_CAPABILITIES;
- PSystemPowerCapabilities = PSYSTEM_POWER_CAPABILITIES;
-
- PSYSTEM_BATTERY_STATE = ^SYSTEM_BATTERY_STATE;
- {$EXTERNALSYM PSYSTEM_BATTERY_STATE}
- SYSTEM_BATTERY_STATE = record
- AcOnLine: BOOLEAN;
- BatteryPresent: BOOLEAN;
- Charging: BOOLEAN;
- Discharging: BOOLEAN;
- Spare1: array [0..3] of BOOLEAN;
- MaxCapacity: DWORD;
- RemainingCapacity: DWORD;
- Rate: DWORD;
- EstimatedTime: DWORD;
- DefaultAlert1: DWORD;
- DefaultAlert2: DWORD;
- end;
- {$EXTERNALSYM SYSTEM_BATTERY_STATE}
- TSystemBatteryState = SYSTEM_BATTERY_STATE;
- PSystemBatteryState = PSYSTEM_BATTERY_STATE;
-
-//
-// Image Format
-//
-
-// #include "pshpack4.h" // 4 byte packing is the default
-
-const
- IMAGE_DOS_SIGNATURE = $5A4D; // MZ
- {$EXTERNALSYM IMAGE_DOS_SIGNATURE}
- IMAGE_OS2_SIGNATURE = $454E; // NE
- {$EXTERNALSYM IMAGE_OS2_SIGNATURE}
- IMAGE_OS2_SIGNATURE_LE = $454C; // LE
- {$EXTERNALSYM IMAGE_OS2_SIGNATURE_LE}
- IMAGE_VXD_SIGNATURE = $454C; // LE
- {$EXTERNALSYM IMAGE_VXD_SIGNATURE}
- IMAGE_NT_SIGNATURE = $00004550; // PE00
- {$EXTERNALSYM IMAGE_NT_SIGNATURE}
-
-// #include "pshpack2.h" // 16 bit headers are 2 byte packed
-
-type
-
- // DOS .EXE header
-
- PIMAGE_DOS_HEADER = ^IMAGE_DOS_HEADER;
- {$EXTERNALSYM PIMAGE_DOS_HEADER}
- _IMAGE_DOS_HEADER = record
- e_magic: Word; // Magic number
- e_cblp: Word; // Bytes on last page of file
- e_cp: Word; // Pages in file
- e_crlc: Word; // Relocations
- e_cparhdr: Word; // Size of header in paragraphs
- e_minalloc: Word; // Minimum extra paragraphs needed
- e_maxalloc: Word; // Maximum extra paragraphs needed
- e_ss: Word; // Initial (relative) SS value
- e_sp: Word; // Initial SP value
- e_csum: Word; // Checksum
- e_ip: Word; // Initial IP value
- e_cs: Word; // Initial (relative) CS value
- e_lfarlc: Word; // File address of relocation table
- e_ovno: Word; // Overlay number
- e_res: array [0..3] of Word; // Reserved words
- e_oemid: Word; // OEM identifier (for e_oeminfo)
- e_oeminfo: Word; // OEM information; e_oemid specific
- e_res2: array [0..9] of Word; // Reserved words
- e_lfanew: Longint; // File address of new exe header
- end;
- {$EXTERNALSYM _IMAGE_DOS_HEADER}
- IMAGE_DOS_HEADER = _IMAGE_DOS_HEADER;
- {$EXTERNALSYM IMAGE_DOS_HEADER}
- TImageDosHeader = IMAGE_DOS_HEADER;
- PImageDosHeader = PIMAGE_DOS_HEADER;
-
- // OS/2 .EXE header
-
- PIMAGE_OS2_HEADER = ^IMAGE_OS2_HEADER;
- {$EXTERNALSYM PIMAGE_OS2_HEADER}
- _IMAGE_OS2_HEADER = record
- ne_magic: Word; // Magic number
- ne_ver: CHAR; // Version number
- ne_rev: CHAR; // Revision number
- ne_enttab: Word; // Offset of Entry Table
- ne_cbenttab: Word; // Number of bytes in Entry Table
- ne_crc: Longint; // Checksum of whole file
- ne_flags: Word; // Flag word
- ne_autodata: Word; // Automatic data segment number
- ne_heap: Word; // Initial heap allocation
- ne_stack: Word; // Initial stack allocation
- ne_csip: Longint; // Initial CS:IP setting
- ne_sssp: Longint; // Initial SS:SP setting
- ne_cseg: Word; // Count of file segments
- ne_cmod: Word; // Entries in Module Reference Table
- ne_cbnrestab: Word; // Size of non-resident name table
- ne_segtab: Word; // Offset of Segment Table
- ne_rsrctab: Word; // Offset of Resource Table
- ne_restab: Word; // Offset of resident name table
- ne_modtab: Word; // Offset of Module Reference Table
- ne_imptab: Word; // Offset of Imported Names Table
- ne_nrestab: Longint; // Offset of Non-resident Names Table
- ne_cmovent: Word; // Count of movable entries
- ne_align: Word; // Segment alignment shift count
- ne_cres: Word; // Count of resource segments
- ne_exetyp: Byte; // Target Operating system
- ne_flagsothers: Byte; // Other .EXE flags
- ne_pretthunks: Word; // offset to return thunks
- ne_psegrefbytes: Word; // offset to segment ref. bytes
- ne_swaparea: Word; // Minimum code swap area size
- ne_expver: Word; // Expected Windows version number
- end;
- {$EXTERNALSYM _IMAGE_OS2_HEADER}
- IMAGE_OS2_HEADER = _IMAGE_OS2_HEADER;
- {$EXTERNALSYM IMAGE_OS2_HEADER}
- TImageOs2Header = IMAGE_OS2_HEADER;
- PImageOs2Header = PIMAGE_OS2_HEADER;
-
- // Windows VXD header
-
- PIMAGE_VXD_HEADER = ^IMAGE_VXD_HEADER;
- {$EXTERNALSYM PIMAGE_VXD_HEADER}
- _IMAGE_VXD_HEADER = record
- e32_magic: Word; // Magic number
- e32_border: Byte; // The byte ordering for the VXD
- e32_worder: Byte; // The word ordering for the VXD
- e32_level: DWORD; // The EXE format level for now = 0
- e32_cpu: Word; // The CPU type
- e32_os: Word; // The OS type
- e32_ver: DWORD; // Module version
- e32_mflags: DWORD; // Module flags
- e32_mpages: DWORD; // Module # pages
- e32_startobj: DWORD; // Object # for instruction pointer
- e32_eip: DWORD; // Extended instruction pointer
- e32_stackobj: DWORD; // Object # for stack pointer
- e32_esp: DWORD; // Extended stack pointer
- e32_pagesize: DWORD; // VXD page size
- e32_lastpagesize: DWORD; // Last page size in VXD
- e32_fixupsize: DWORD; // Fixup section size
- e32_fixupsum: DWORD; // Fixup section checksum
- e32_ldrsize: DWORD; // Loader section size
- e32_ldrsum: DWORD; // Loader section checksum
- e32_objtab: DWORD; // Object table offset
- e32_objcnt: DWORD; // Number of objects in module
- e32_objmap: DWORD; // Object page map offset
- e32_itermap: DWORD; // Object iterated data map offset
- e32_rsrctab: DWORD; // Offset of Resource Table
- e32_rsrccnt: DWORD; // Number of resource entries
- e32_restab: DWORD; // Offset of resident name table
- e32_enttab: DWORD; // Offset of Entry Table
- e32_dirtab: DWORD; // Offset of Module Directive Table
- e32_dircnt: DWORD; // Number of module directives
- e32_fpagetab: DWORD; // Offset of Fixup Page Table
- e32_frectab: DWORD; // Offset of Fixup Record Table
- e32_impmod: DWORD; // Offset of Import Module Name Table
- e32_impmodcnt: DWORD; // Number of entries in Import Module Name Table
- e32_impproc: DWORD; // Offset of Import Procedure Name Table
- e32_pagesum: DWORD; // Offset of Per-Page Checksum Table
- e32_datapage: DWORD; // Offset of Enumerated Data Pages
- e32_preload: DWORD; // Number of preload pages
- e32_nrestab: DWORD; // Offset of Non-resident Names Table
- e32_cbnrestab: DWORD; // Size of Non-resident Name Table
- e32_nressum: DWORD; // Non-resident Name Table Checksum
- e32_autodata: DWORD; // Object # for automatic data object
- e32_debuginfo: DWORD; // Offset of the debugging information
- e32_debuglen: DWORD; // The length of the debugging info. in bytes
- e32_instpreload: DWORD; // Number of instance pages in preload section of VXD file
- e32_instdemand: DWORD; // Number of instance pages in demand load section of VXD file
- e32_heapsize: DWORD; // Size of heap - for 16-bit apps
- e32_res3: array [0..11] of Byte; // Reserved words
- e32_winresoff: DWORD;
- e32_winreslen: DWORD;
- e32_devid: Word; // Device ID for VxD
- e32_ddkver: Word; // DDK version for VxD
- end;
- {$EXTERNALSYM _IMAGE_VXD_HEADER}
- IMAGE_VXD_HEADER = _IMAGE_VXD_HEADER;
- {$EXTERNALSYM IMAGE_VXD_HEADER}
- TImageVxdHeader = IMAGE_VXD_HEADER;
- PImageVxdHeader = PIMAGE_VXD_HEADER;
-
-// #include "poppack.h" // Back to 4 byte packing
-
-//
-// File header format.
-//
-
- PIMAGE_FILE_HEADER = ^IMAGE_FILE_HEADER;
- {$EXTERNALSYM PIMAGE_FILE_HEADER}
- _IMAGE_FILE_HEADER = record
- Machine: WORD;
- NumberOfSections: WORD;
- TimeDateStamp: DWORD;
- PointerToSymbolTable: DWORD;
- NumberOfSymbols: DWORD;
- SizeOfOptionalHeader: WORD;
- Characteristics: WORD;
- end;
- {$EXTERNALSYM _IMAGE_FILE_HEADER}
- IMAGE_FILE_HEADER = _IMAGE_FILE_HEADER;
- {$EXTERNALSYM IMAGE_FILE_HEADER}
- TImageFileHeader = IMAGE_FILE_HEADER;
- PImageFileHeader = PIMAGE_FILE_HEADER;
-
-const
- IMAGE_SIZEOF_FILE_HEADER = 20;
- {$EXTERNALSYM IMAGE_SIZEOF_FILE_HEADER}
-
- IMAGE_FILE_RELOCS_STRIPPED = $0001; // Relocation info stripped from file.
- {$EXTERNALSYM IMAGE_FILE_RELOCS_STRIPPED}
- IMAGE_FILE_EXECUTABLE_IMAGE = $0002; // File is executable (i.e. no unresolved externel references).
- {$EXTERNALSYM IMAGE_FILE_EXECUTABLE_IMAGE}
- IMAGE_FILE_LINE_NUMS_STRIPPED = $0004; // Line nunbers stripped from file.
- {$EXTERNALSYM IMAGE_FILE_LINE_NUMS_STRIPPED}
- IMAGE_FILE_LOCAL_SYMS_STRIPPED = $0008; // Local symbols stripped from file.
- {$EXTERNALSYM IMAGE_FILE_LOCAL_SYMS_STRIPPED}
- IMAGE_FILE_AGGRESIVE_WS_TRIM = $0010; // Agressively trim working set
- {$EXTERNALSYM IMAGE_FILE_AGGRESIVE_WS_TRIM}
- IMAGE_FILE_LARGE_ADDRESS_AWARE = $0020; // App can handle >2gb addresses
- {$EXTERNALSYM IMAGE_FILE_LARGE_ADDRESS_AWARE}
- IMAGE_FILE_BYTES_REVERSED_LO = $0080; // Bytes of machine word are reversed.
- {$EXTERNALSYM IMAGE_FILE_BYTES_REVERSED_LO}
- IMAGE_FILE_32BIT_MACHINE = $0100; // 32 bit word machine.
- {$EXTERNALSYM IMAGE_FILE_32BIT_MACHINE}
- IMAGE_FILE_DEBUG_STRIPPED = $0200; // Debugging info stripped from file in .DBG file
- {$EXTERNALSYM IMAGE_FILE_DEBUG_STRIPPED}
- IMAGE_FILE_REMOVABLE_RUN_FROM_SWAP = $0400; // If Image is on removable media, copy and run from the swap file.
- {$EXTERNALSYM IMAGE_FILE_REMOVABLE_RUN_FROM_SWAP}
- IMAGE_FILE_NET_RUN_FROM_SWAP = $0800; // If Image is on Net, copy and run from the swap file.
- {$EXTERNALSYM IMAGE_FILE_NET_RUN_FROM_SWAP}
- IMAGE_FILE_SYSTEM = $1000; // System File.
- {$EXTERNALSYM IMAGE_FILE_SYSTEM}
- IMAGE_FILE_DLL = $2000; // File is a DLL.
- {$EXTERNALSYM IMAGE_FILE_DLL}
- IMAGE_FILE_UP_SYSTEM_ONLY = $4000; // File should only be run on a UP machine
- {$EXTERNALSYM IMAGE_FILE_UP_SYSTEM_ONLY}
- IMAGE_FILE_BYTES_REVERSED_HI = $8000; // Bytes of machine word are reversed.
- {$EXTERNALSYM IMAGE_FILE_BYTES_REVERSED_HI}
-
- IMAGE_FILE_MACHINE_UNKNOWN = 0;
- {$EXTERNALSYM IMAGE_FILE_MACHINE_UNKNOWN}
- IMAGE_FILE_MACHINE_I386 = $014c; // Intel 386.
- {$EXTERNALSYM IMAGE_FILE_MACHINE_I386}
- IMAGE_FILE_MACHINE_R3000 = $0162; // MIPS little-endian, 0x160 big-endian
- {$EXTERNALSYM IMAGE_FILE_MACHINE_R3000}
- IMAGE_FILE_MACHINE_R4000 = $0166; // MIPS little-endian
- {$EXTERNALSYM IMAGE_FILE_MACHINE_R4000}
- IMAGE_FILE_MACHINE_R10000 = $0168; // MIPS little-endian
- {$EXTERNALSYM IMAGE_FILE_MACHINE_R10000}
- IMAGE_FILE_MACHINE_WCEMIPSV2 = $0169; // MIPS little-endian WCE v2
- {$EXTERNALSYM IMAGE_FILE_MACHINE_WCEMIPSV2}
- IMAGE_FILE_MACHINE_ALPHA = $0184; // Alpha_AXP
- {$EXTERNALSYM IMAGE_FILE_MACHINE_ALPHA}
- IMAGE_FILE_MACHINE_SH3 = $01a2; // SH3 little-endian
- {$EXTERNALSYM IMAGE_FILE_MACHINE_SH3}
- IMAGE_FILE_MACHINE_SH3DSP = $01a3;
- {$EXTERNALSYM IMAGE_FILE_MACHINE_SH3DSP}
- IMAGE_FILE_MACHINE_SH3E = $01a4; // SH3E little-endian
- {$EXTERNALSYM IMAGE_FILE_MACHINE_SH3E}
- IMAGE_FILE_MACHINE_SH4 = $01a6; // SH4 little-endian
- {$EXTERNALSYM IMAGE_FILE_MACHINE_SH4}
- IMAGE_FILE_MACHINE_SH5 = $01a8; // SH5
- {$EXTERNALSYM IMAGE_FILE_MACHINE_SH5}
- IMAGE_FILE_MACHINE_ARM = $01c0; // ARM Little-Endian
- {$EXTERNALSYM IMAGE_FILE_MACHINE_ARM}
- IMAGE_FILE_MACHINE_THUMB = $01c2;
- {$EXTERNALSYM IMAGE_FILE_MACHINE_THUMB}
- IMAGE_FILE_MACHINE_AM33 = $01d3;
- {$EXTERNALSYM IMAGE_FILE_MACHINE_AM33}
- IMAGE_FILE_MACHINE_POWERPC = $01F0; // IBM PowerPC Little-Endian
- {$EXTERNALSYM IMAGE_FILE_MACHINE_POWERPC}
- IMAGE_FILE_MACHINE_POWERPCFP = $01f1;
- {$EXTERNALSYM IMAGE_FILE_MACHINE_POWERPCFP}
- IMAGE_FILE_MACHINE_IA64 = $0200; // Intel 64
- {$EXTERNALSYM IMAGE_FILE_MACHINE_IA64}
- IMAGE_FILE_MACHINE_MIPS16 = $0266; // MIPS
- {$EXTERNALSYM IMAGE_FILE_MACHINE_MIPS16}
- IMAGE_FILE_MACHINE_ALPHA64 = $0284; // ALPHA64
- {$EXTERNALSYM IMAGE_FILE_MACHINE_ALPHA64}
- IMAGE_FILE_MACHINE_MIPSFPU = $0366; // MIPS
- {$EXTERNALSYM IMAGE_FILE_MACHINE_MIPSFPU}
- IMAGE_FILE_MACHINE_MIPSFPU16 = $0466; // MIPS
- {$EXTERNALSYM IMAGE_FILE_MACHINE_MIPSFPU16}
- IMAGE_FILE_MACHINE_AXP64 = IMAGE_FILE_MACHINE_ALPHA64;
- {$EXTERNALSYM IMAGE_FILE_MACHINE_AXP64}
- IMAGE_FILE_MACHINE_TRICORE = $0520; // Infineon
- {$EXTERNALSYM IMAGE_FILE_MACHINE_TRICORE}
- IMAGE_FILE_MACHINE_CEF = $0CEF;
- {$EXTERNALSYM IMAGE_FILE_MACHINE_CEF}
- IMAGE_FILE_MACHINE_EBC = $0EBC; // EFI Byte Code
- {$EXTERNALSYM IMAGE_FILE_MACHINE_EBC}
- IMAGE_FILE_MACHINE_AMD64 = $8664; // AMD64 (K8)
- {$EXTERNALSYM IMAGE_FILE_MACHINE_AMD64}
- IMAGE_FILE_MACHINE_M32R = $9041; // M32R little-endian
- {$EXTERNALSYM IMAGE_FILE_MACHINE_M32R}
- IMAGE_FILE_MACHINE_CEE = $C0EE;
- {$EXTERNALSYM IMAGE_FILE_MACHINE_CEE}
-
-//
-// Directory format.
-//
-
-type
- PIMAGE_DATA_DIRECTORY = ^IMAGE_DATA_DIRECTORY;
- {$EXTERNALSYM PIMAGE_DATA_DIRECTORY}
- _IMAGE_DATA_DIRECTORY = record
- VirtualAddress: DWORD;
- Size: DWORD;
- end;
- {$EXTERNALSYM _IMAGE_DATA_DIRECTORY}
- IMAGE_DATA_DIRECTORY = _IMAGE_DATA_DIRECTORY;
- {$EXTERNALSYM IMAGE_DATA_DIRECTORY}
- TImageDataDirectory = IMAGE_DATA_DIRECTORY;
- PImageDataDirectory = PIMAGE_DATA_DIRECTORY;
-
-const
- IMAGE_NUMBEROF_DIRECTORY_ENTRIES = 16;
- {$EXTERNALSYM IMAGE_NUMBEROF_DIRECTORY_ENTRIES}
-
-//
-// Optional header format.
-//
-
-type
- PIMAGE_OPTIONAL_HEADER32 = ^IMAGE_OPTIONAL_HEADER32;
- {$EXTERNALSYM PIMAGE_OPTIONAL_HEADER32}
- _IMAGE_OPTIONAL_HEADER = record
- //
- // Standard fields.
- //
- Magic: Word;
- MajorLinkerVersion: Byte;
- MinorLinkerVersion: Byte;
- SizeOfCode: DWORD;
- SizeOfInitializedData: DWORD;
- SizeOfUninitializedData: DWORD;
- AddressOfEntryPoint: DWORD;
- BaseOfCode: DWORD;
- BaseOfData: DWORD;
- //
- // NT additional fields.
- //
- ImageBase: DWORD;
- SectionAlignment: DWORD;
- FileAlignment: DWORD;
- MajorOperatingSystemVersion: Word;
- MinorOperatingSystemVersion: Word;
- MajorImageVersion: Word;
- MinorImageVersion: Word;
- MajorSubsystemVersion: Word;
- MinorSubsystemVersion: Word;
- Win32VersionValue: DWORD;
- SizeOfImage: DWORD;
- SizeOfHeaders: DWORD;
- CheckSum: DWORD;
- Subsystem: Word;
- DllCharacteristics: Word;
- SizeOfStackReserve: DWORD;
- SizeOfStackCommit: DWORD;
- SizeOfHeapReserve: DWORD;
- SizeOfHeapCommit: DWORD;
- LoaderFlags: DWORD;
- NumberOfRvaAndSizes: DWORD;
- DataDirectory: array [0..IMAGE_NUMBEROF_DIRECTORY_ENTRIES - 1] of IMAGE_DATA_DIRECTORY;
- end;
- {$EXTERNALSYM _IMAGE_OPTIONAL_HEADER}
- IMAGE_OPTIONAL_HEADER32 = _IMAGE_OPTIONAL_HEADER;
- {$EXTERNALSYM IMAGE_OPTIONAL_HEADER32}
- TImageOptionalHeader32 = IMAGE_OPTIONAL_HEADER32;
- PImageOptionalHeader32 = PIMAGE_OPTIONAL_HEADER32;
-
- PIMAGE_ROM_OPTIONAL_HEADER = ^IMAGE_ROM_OPTIONAL_HEADER;
- {$EXTERNALSYM PIMAGE_ROM_OPTIONAL_HEADER}
- _IMAGE_ROM_OPTIONAL_HEADER = record
- Magic: Word;
- MajorLinkerVersion: Byte;
- MinorLinkerVersion: Byte;
- SizeOfCode: DWORD;
- SizeOfInitializedData: DWORD;
- SizeOfUninitializedData: DWORD;
- AddressOfEntryPoint: DWORD;
- BaseOfCode: DWORD;
- BaseOfData: DWORD;
- BaseOfBss: DWORD;
- GprMask: DWORD;
- CprMask: array [0..3] of DWORD;
- GpValue: DWORD;
- end;
- {$EXTERNALSYM _IMAGE_ROM_OPTIONAL_HEADER}
- IMAGE_ROM_OPTIONAL_HEADER = _IMAGE_ROM_OPTIONAL_HEADER;
- {$EXTERNALSYM IMAGE_ROM_OPTIONAL_HEADER}
- TImageRomOptionalHeader = IMAGE_ROM_OPTIONAL_HEADER;
- PImageRomOptionalHeader = PIMAGE_ROM_OPTIONAL_HEADER;
-
- PIMAGE_OPTIONAL_HEADER64 = ^IMAGE_OPTIONAL_HEADER64;
- {$EXTERNALSYM PIMAGE_OPTIONAL_HEADER64}
- _IMAGE_OPTIONAL_HEADER64 = record
- Magic: Word;
- MajorLinkerVersion: Byte;
- MinorLinkerVersion: Byte;
- SizeOfCode: DWORD;
- SizeOfInitializedData: DWORD;
- SizeOfUninitializedData: DWORD;
- AddressOfEntryPoint: DWORD;
- BaseOfCode: DWORD;
- ImageBase: Int64;
- SectionAlignment: DWORD;
- FileAlignment: DWORD;
- MajorOperatingSystemVersion: Word;
- MinorOperatingSystemVersion: Word;
- MajorImageVersion: Word;
- MinorImageVersion: Word;
- MajorSubsystemVersion: Word;
- MinorSubsystemVersion: Word;
- Win32VersionValue: DWORD;
- SizeOfImage: DWORD;
- SizeOfHeaders: DWORD;
- CheckSum: DWORD;
- Subsystem: Word;
- DllCharacteristics: Word;
- SizeOfStackReserve: Int64;
- SizeOfStackCommit: Int64;
- SizeOfHeapReserve: Int64;
- SizeOfHeapCommit: Int64;
- LoaderFlags: DWORD;
- NumberOfRvaAndSizes: DWORD;
- DataDirectory: array [0..IMAGE_NUMBEROF_DIRECTORY_ENTRIES - 1] of IMAGE_DATA_DIRECTORY;
- end;
- {$EXTERNALSYM _IMAGE_OPTIONAL_HEADER64}
- IMAGE_OPTIONAL_HEADER64 = _IMAGE_OPTIONAL_HEADER64;
- {$EXTERNALSYM IMAGE_OPTIONAL_HEADER64}
- TImageOptionalHeader64 = IMAGE_OPTIONAL_HEADER64;
- PImageOptionalHeader64 = PIMAGE_OPTIONAL_HEADER64;
-
-const
- IMAGE_SIZEOF_ROM_OPTIONAL_HEADER = 56;
- {$EXTERNALSYM IMAGE_SIZEOF_ROM_OPTIONAL_HEADER}
- IMAGE_SIZEOF_STD_OPTIONAL_HEADER = 28;
- {$EXTERNALSYM IMAGE_SIZEOF_STD_OPTIONAL_HEADER}
- IMAGE_SIZEOF_NT_OPTIONAL32_HEADER = 224;
- {$EXTERNALSYM IMAGE_SIZEOF_NT_OPTIONAL32_HEADER}
- IMAGE_SIZEOF_NT_OPTIONAL64_HEADER = 240;
- {$EXTERNALSYM IMAGE_SIZEOF_NT_OPTIONAL64_HEADER}
-
- IMAGE_NT_OPTIONAL_HDR32_MAGIC = $10b;
- {$EXTERNALSYM IMAGE_NT_OPTIONAL_HDR32_MAGIC}
- IMAGE_NT_OPTIONAL_HDR64_MAGIC = $20b;
- {$EXTERNALSYM IMAGE_NT_OPTIONAL_HDR64_MAGIC}
- IMAGE_ROM_OPTIONAL_HDR_MAGIC = $107;
- {$EXTERNALSYM IMAGE_ROM_OPTIONAL_HDR_MAGIC}
-
-type
- IMAGE_OPTIONAL_HEADER = IMAGE_OPTIONAL_HEADER32;
- {$EXTERNALSYM IMAGE_OPTIONAL_HEADER}
- PIMAGE_OPTIONAL_HEADER = PIMAGE_OPTIONAL_HEADER32;
- {$EXTERNALSYM PIMAGE_OPTIONAL_HEADER}
-
-const
- IMAGE_SIZEOF_NT_OPTIONAL_HEADER = IMAGE_SIZEOF_NT_OPTIONAL32_HEADER;
- {$EXTERNALSYM IMAGE_SIZEOF_NT_OPTIONAL_HEADER}
- IMAGE_NT_OPTIONAL_HDR_MAGIC = IMAGE_NT_OPTIONAL_HDR32_MAGIC;
- {$EXTERNALSYM IMAGE_NT_OPTIONAL_HDR_MAGIC}
-
-type
- PIMAGE_NT_HEADERS64 = ^IMAGE_NT_HEADERS64;
- {$EXTERNALSYM PIMAGE_NT_HEADERS64}
- _IMAGE_NT_HEADERS64 = record
- Signature: DWORD;
- FileHeader: IMAGE_FILE_HEADER;
- OptionalHeader: IMAGE_OPTIONAL_HEADER64;
- end;
- {$EXTERNALSYM _IMAGE_NT_HEADERS64}
- IMAGE_NT_HEADERS64 = _IMAGE_NT_HEADERS64;
- {$EXTERNALSYM IMAGE_NT_HEADERS64}
- TImageNtHeaders64 = IMAGE_NT_HEADERS64;
- PImageNtHeaders64 = PIMAGE_NT_HEADERS64;
-
- PIMAGE_NT_HEADERS32 = ^IMAGE_NT_HEADERS32;
- {$EXTERNALSYM PIMAGE_NT_HEADERS32}
- _IMAGE_NT_HEADERS = record
- Signature: DWORD;
- FileHeader: IMAGE_FILE_HEADER;
- OptionalHeader: IMAGE_OPTIONAL_HEADER32;
- end;
- {$EXTERNALSYM _IMAGE_NT_HEADERS}
- IMAGE_NT_HEADERS32 = _IMAGE_NT_HEADERS;
- {$EXTERNALSYM IMAGE_NT_HEADERS32}
- TImageNtHeaders32 = IMAGE_NT_HEADERS32;
- PImageNtHeaders32 = PIMAGE_NT_HEADERS32;
-
- PIMAGE_ROM_HEADERS = ^IMAGE_ROM_HEADERS;
- {$EXTERNALSYM PIMAGE_ROM_HEADERS}
- _IMAGE_ROM_HEADERS = record
- FileHeader: IMAGE_FILE_HEADER;
- OptionalHeader: IMAGE_ROM_OPTIONAL_HEADER;
- end;
- {$EXTERNALSYM _IMAGE_ROM_HEADERS}
- IMAGE_ROM_HEADERS = _IMAGE_ROM_HEADERS;
- {$EXTERNALSYM IMAGE_ROM_HEADERS}
- TImageRomHeaders = IMAGE_ROM_HEADERS;
- PImageRomHeaders = PIMAGE_ROM_HEADERS;
-
- IMAGE_NT_HEADERS = IMAGE_NT_HEADERS32;
- {$EXTERNALSYM IMAGE_NT_HEADERS}
- PIMAGE_NT_HEADERS = PIMAGE_NT_HEADERS32;
- {$EXTERNALSYM PIMAGE_NT_HEADERS}
-
- PImageNtHeaders = PIMAGE_NT_HEADERS;
-
-// Subsystem Values
-
-const
- IMAGE_SUBSYSTEM_UNKNOWN = 0; // Unknown subsystem.
- {$EXTERNALSYM IMAGE_SUBSYSTEM_UNKNOWN}
- IMAGE_SUBSYSTEM_NATIVE = 1; // Image doesn't require a subsystem.
- {$EXTERNALSYM IMAGE_SUBSYSTEM_NATIVE}
- IMAGE_SUBSYSTEM_WINDOWS_GUI = 2; // Image runs in the Windows GUI subsystem.
- {$EXTERNALSYM IMAGE_SUBSYSTEM_WINDOWS_GUI}
- IMAGE_SUBSYSTEM_WINDOWS_CUI = 3; // Image runs in the Windows character subsystem.
- {$EXTERNALSYM IMAGE_SUBSYSTEM_WINDOWS_CUI}
- IMAGE_SUBSYSTEM_OS2_CUI = 5; // image runs in the OS/2 character subsystem.
- {$EXTERNALSYM IMAGE_SUBSYSTEM_OS2_CUI}
- IMAGE_SUBSYSTEM_POSIX_CUI = 7; // image runs in the Posix character subsystem.
- {$EXTERNALSYM IMAGE_SUBSYSTEM_POSIX_CUI}
- IMAGE_SUBSYSTEM_NATIVE_WINDOWS = 8; // image is a native Win9x driver.
- {$EXTERNALSYM IMAGE_SUBSYSTEM_NATIVE_WINDOWS}
- IMAGE_SUBSYSTEM_WINDOWS_CE_GUI = 9; // Image runs in the Windows CE subsystem.
- {$EXTERNALSYM IMAGE_SUBSYSTEM_WINDOWS_CE_GUI}
- IMAGE_SUBSYSTEM_EFI_APPLICATION = 10;
- {$EXTERNALSYM IMAGE_SUBSYSTEM_EFI_APPLICATION}
- IMAGE_SUBSYSTEM_EFI_BOOT_SERVICE_DRIVER = 11;
- {$EXTERNALSYM IMAGE_SUBSYSTEM_EFI_BOOT_SERVICE_DRIVER}
- IMAGE_SUBSYSTEM_EFI_RUNTIME_DRIVER = 12;
- {$EXTERNALSYM IMAGE_SUBSYSTEM_EFI_RUNTIME_DRIVER}
- IMAGE_SUBSYSTEM_EFI_ROM = 13;
- {$EXTERNALSYM IMAGE_SUBSYSTEM_EFI_ROM}
- IMAGE_SUBSYSTEM_XBOX = 14;
- {$EXTERNALSYM IMAGE_SUBSYSTEM_XBOX}
-
-// DllCharacteristics Entries
-
-// IMAGE_LIBRARY_PROCESS_INIT 0x0001 // Reserved.
-// IMAGE_LIBRARY_PROCESS_TERM 0x0002 // Reserved.
-// IMAGE_LIBRARY_THREAD_INIT 0x0004 // Reserved.
-// IMAGE_LIBRARY_THREAD_TERM 0x0008 // Reserved.
- IMAGE_DLLCHARACTERISTICS_NO_ISOLATION = $0200; // Image understands isolation and doesn't want it
- {$EXTERNALSYM IMAGE_DLLCHARACTERISTICS_NO_ISOLATION}
- IMAGE_DLLCHARACTERISTICS_NO_SEH = $0400; // Image does not use SEH. No SE handler may reside in this image
- {$EXTERNALSYM IMAGE_DLLCHARACTERISTICS_NO_SEH}
- IMAGE_DLLCHARACTERISTICS_NO_BIND = $0800; // Do not bind this image.
- {$EXTERNALSYM IMAGE_DLLCHARACTERISTICS_NO_BIND}
-
-// 0x1000 // Reserved.
-
- IMAGE_DLLCHARACTERISTICS_WDM_DRIVER = $2000; // Driver uses WDM model
- {$EXTERNALSYM IMAGE_DLLCHARACTERISTICS_WDM_DRIVER}
-
-// 0x4000 // Reserved.
-
- IMAGE_DLLCHARACTERISTICS_TERMINAL_SERVER_AWARE = $8000;
- {$EXTERNALSYM IMAGE_DLLCHARACTERISTICS_TERMINAL_SERVER_AWARE}
-
-// Directory Entries
-
- IMAGE_DIRECTORY_ENTRY_EXPORT = 0; // Export Directory
- {$EXTERNALSYM IMAGE_DIRECTORY_ENTRY_EXPORT}
- IMAGE_DIRECTORY_ENTRY_IMPORT = 1; // Import Directory
- {$EXTERNALSYM IMAGE_DIRECTORY_ENTRY_IMPORT}
- IMAGE_DIRECTORY_ENTRY_RESOURCE = 2; // Resource Directory
- {$EXTERNALSYM IMAGE_DIRECTORY_ENTRY_RESOURCE}
- IMAGE_DIRECTORY_ENTRY_EXCEPTION = 3; // Exception Directory
- {$EXTERNALSYM IMAGE_DIRECTORY_ENTRY_EXCEPTION}
- IMAGE_DIRECTORY_ENTRY_SECURITY = 4; // Security Directory
- {$EXTERNALSYM IMAGE_DIRECTORY_ENTRY_SECURITY}
- IMAGE_DIRECTORY_ENTRY_BASERELOC = 5; // Base Relocation Table
- {$EXTERNALSYM IMAGE_DIRECTORY_ENTRY_BASERELOC}
- IMAGE_DIRECTORY_ENTRY_DEBUG = 6; // Debug Directory
- {$EXTERNALSYM IMAGE_DIRECTORY_ENTRY_DEBUG}
-
-// IMAGE_DIRECTORY_ENTRY_COPYRIGHT 7 // (X86 usage)
-
- IMAGE_DIRECTORY_ENTRY_ARCHITECTURE = 7; // Architecture Specific Data
- {$EXTERNALSYM IMAGE_DIRECTORY_ENTRY_ARCHITECTURE}
- IMAGE_DIRECTORY_ENTRY_GLOBALPTR = 8; // RVA of GP
- {$EXTERNALSYM IMAGE_DIRECTORY_ENTRY_GLOBALPTR}
- IMAGE_DIRECTORY_ENTRY_TLS = 9; // TLS Directory
- {$EXTERNALSYM IMAGE_DIRECTORY_ENTRY_TLS}
- IMAGE_DIRECTORY_ENTRY_LOAD_CONFIG = 10; // Load Configuration Directory
- {$EXTERNALSYM IMAGE_DIRECTORY_ENTRY_LOAD_CONFIG}
- IMAGE_DIRECTORY_ENTRY_BOUND_IMPORT = 11; // Bound Import Directory in headers
- {$EXTERNALSYM IMAGE_DIRECTORY_ENTRY_BOUND_IMPORT}
- IMAGE_DIRECTORY_ENTRY_IAT = 12; // Import Address Table
- {$EXTERNALSYM IMAGE_DIRECTORY_ENTRY_IAT}
- IMAGE_DIRECTORY_ENTRY_DELAY_IMPORT = 13; // Delay Load Import Descriptors
- {$EXTERNALSYM IMAGE_DIRECTORY_ENTRY_DELAY_IMPORT}
- IMAGE_DIRECTORY_ENTRY_COM_DESCRIPTOR = 14; // COM Runtime descriptor
- {$EXTERNALSYM IMAGE_DIRECTORY_ENTRY_COM_DESCRIPTOR}
-
-//
-// Non-COFF Object file header
-//
-
-type
- PAnonObjectHeader = ^ANON_OBJECT_HEADER;
- ANON_OBJECT_HEADER = record
- Sig1: Word; // Must be IMAGE_FILE_MACHINE_UNKNOWN
- Sig2: Word; // Must be 0xffff
- Version: Word; // >= 1 (implies the CLSID field is present)
- Machine: Word;
- TimeDateStamp: DWORD;
- ClassID: CLSID; // Used to invoke CoCreateInstance
- SizeOfData: DWORD; // Size of data that follows the header
- end;
- {$EXTERNALSYM ANON_OBJECT_HEADER}
- TAnonObjectHeader = ANON_OBJECT_HEADER;
-
-//
-// Section header format.
-//
-
-const
- IMAGE_SIZEOF_SHORT_NAME = 8;
- {$EXTERNALSYM IMAGE_SIZEOF_SHORT_NAME}
-
-type
- TImgSecHdrMisc = record
- case Integer of
- 0: (PhysicalAddress: DWORD);
- 1: (VirtualSize: DWORD);
- end;
-
- PIMAGE_SECTION_HEADER = ^IMAGE_SECTION_HEADER;
- {$EXTERNALSYM PIMAGE_SECTION_HEADER}
- _IMAGE_SECTION_HEADER = record
- Name: array [0..IMAGE_SIZEOF_SHORT_NAME - 1] of BYTE;
- Misc: TImgSecHdrMisc;
- VirtualAddress: DWORD;
- SizeOfRawData: DWORD;
- PointerToRawData: DWORD;
- PointerToRelocations: DWORD;
- PointerToLinenumbers: DWORD;
- NumberOfRelocations: WORD;
- NumberOfLinenumbers: WORD;
- Characteristics: DWORD;
- end;
- {$EXTERNALSYM _IMAGE_SECTION_HEADER}
- IMAGE_SECTION_HEADER = _IMAGE_SECTION_HEADER;
- {$EXTERNALSYM IMAGE_SECTION_HEADER}
- TImageSectionHeader = IMAGE_SECTION_HEADER;
- PImageSectionHeader = PIMAGE_SECTION_HEADER;
-
-// IMAGE_FIRST_SECTION doesn't need 32/64 versions since the file header is the same either way.
-
-function IMAGE_FIRST_SECTION(NtHeader: PImageNtHeaders): PImageSectionHeader;
-{$EXTERNALSYM IMAGE_FIRST_SECTION}
-
-const
- IMAGE_SIZEOF_SECTION_HEADER = 40;
- {$EXTERNALSYM IMAGE_SIZEOF_SECTION_HEADER}
-
-//
-// Section characteristics.
-//
-// IMAGE_SCN_TYPE_REG 0x00000000 // Reserved.
-// IMAGE_SCN_TYPE_DSECT 0x00000001 // Reserved.
-// IMAGE_SCN_TYPE_NOLOAD 0x00000002 // Reserved.
-// IMAGE_SCN_TYPE_GROUP 0x00000004 // Reserved.
-
- IMAGE_SCN_TYPE_NO_PAD = $00000008; // Reserved.
- {$EXTERNALSYM IMAGE_SCN_TYPE_NO_PAD}
-
-// IMAGE_SCN_TYPE_COPY 0x00000010 // Reserved.
-
- IMAGE_SCN_CNT_CODE = $00000020; // Section contains code.
- {$EXTERNALSYM IMAGE_SCN_CNT_CODE}
- IMAGE_SCN_CNT_INITIALIZED_DATA = $00000040; // Section contains initialized data.
- {$EXTERNALSYM IMAGE_SCN_CNT_INITIALIZED_DATA}
- IMAGE_SCN_CNT_UNINITIALIZED_DATA = $00000080; // Section contains uninitialized data.
- {$EXTERNALSYM IMAGE_SCN_CNT_UNINITIALIZED_DATA}
-
- IMAGE_SCN_LNK_OTHER = $00000100; // Reserved.
- {$EXTERNALSYM IMAGE_SCN_LNK_OTHER}
- IMAGE_SCN_LNK_INFO = $00000200; // Section contains comments or some other type of information.
- {$EXTERNALSYM IMAGE_SCN_LNK_INFO}
-
-// IMAGE_SCN_TYPE_OVER 0x00000400 // Reserved.
-
- IMAGE_SCN_LNK_REMOVE = $00000800; // Section contents will not become part of image.
- {$EXTERNALSYM IMAGE_SCN_LNK_REMOVE}
- IMAGE_SCN_LNK_COMDAT = $00001000; // Section contents comdat.
- {$EXTERNALSYM IMAGE_SCN_LNK_COMDAT}
-
-// 0x00002000 // Reserved.
-// IMAGE_SCN_MEM_PROTECTED - Obsolete 0x00004000
-
- IMAGE_SCN_NO_DEFER_SPEC_EXC = $00004000; // Reset speculative exceptions handling bits in the TLB entries for this section.
- {$EXTERNALSYM IMAGE_SCN_NO_DEFER_SPEC_EXC}
- IMAGE_SCN_GPREL = $00008000; // Section content can be accessed relative to GP
- {$EXTERNALSYM IMAGE_SCN_GPREL}
- IMAGE_SCN_MEM_FARDATA = $00008000;
- {$EXTERNALSYM IMAGE_SCN_MEM_FARDATA}
-
-// IMAGE_SCN_MEM_SYSHEAP - Obsolete 0x00010000
-
- IMAGE_SCN_MEM_PURGEABLE = $00020000;
- {$EXTERNALSYM IMAGE_SCN_MEM_PURGEABLE}
- IMAGE_SCN_MEM_16BIT = $00020000;
- {$EXTERNALSYM IMAGE_SCN_MEM_16BIT}
- IMAGE_SCN_MEM_LOCKED = $00040000;
- {$EXTERNALSYM IMAGE_SCN_MEM_LOCKED}
- IMAGE_SCN_MEM_PRELOAD = $00080000;
- {$EXTERNALSYM IMAGE_SCN_MEM_PRELOAD}
-
- IMAGE_SCN_ALIGN_1BYTES = $00100000;
- {$EXTERNALSYM IMAGE_SCN_ALIGN_1BYTES}
- IMAGE_SCN_ALIGN_2BYTES = $00200000;
- {$EXTERNALSYM IMAGE_SCN_ALIGN_2BYTES}
- IMAGE_SCN_ALIGN_4BYTES = $00300000;
- {$EXTERNALSYM IMAGE_SCN_ALIGN_4BYTES}
- IMAGE_SCN_ALIGN_8BYTES = $00400000;
- {$EXTERNALSYM IMAGE_SCN_ALIGN_8BYTES}
- IMAGE_SCN_ALIGN_16BYTES = $00500000; // Default alignment if no others are specified.
- {$EXTERNALSYM IMAGE_SCN_ALIGN_16BYTES}
- IMAGE_SCN_ALIGN_32BYTES = $00600000;
- {$EXTERNALSYM IMAGE_SCN_ALIGN_32BYTES}
- IMAGE_SCN_ALIGN_64BYTES = $00700000;
- {$EXTERNALSYM IMAGE_SCN_ALIGN_64BYTES}
- IMAGE_SCN_ALIGN_128BYTES = $00800000;
- {$EXTERNALSYM IMAGE_SCN_ALIGN_128BYTES}
- IMAGE_SCN_ALIGN_256BYTES = $00900000;
- {$EXTERNALSYM IMAGE_SCN_ALIGN_256BYTES}
- IMAGE_SCN_ALIGN_512BYTES = $00A00000;
- {$EXTERNALSYM IMAGE_SCN_ALIGN_512BYTES}
- IMAGE_SCN_ALIGN_1024BYTES = $00B00000;
- {$EXTERNALSYM IMAGE_SCN_ALIGN_1024BYTES}
- IMAGE_SCN_ALIGN_2048BYTES = $00C00000;
- {$EXTERNALSYM IMAGE_SCN_ALIGN_2048BYTES}
- IMAGE_SCN_ALIGN_4096BYTES = $00D00000;
- {$EXTERNALSYM IMAGE_SCN_ALIGN_4096BYTES}
- IMAGE_SCN_ALIGN_8192BYTES = $00E00000;
- {$EXTERNALSYM IMAGE_SCN_ALIGN_8192BYTES}
-
-// Unused 0x00F00000
-
- IMAGE_SCN_ALIGN_MASK = $00F00000;
- {$EXTERNALSYM IMAGE_SCN_ALIGN_MASK}
-
- IMAGE_SCN_LNK_NRELOC_OVFL = $01000000; // Section contains extended relocations.
- {$EXTERNALSYM IMAGE_SCN_LNK_NRELOC_OVFL}
- IMAGE_SCN_MEM_DISCARDABLE = $02000000; // Section can be discarded.
- {$EXTERNALSYM IMAGE_SCN_MEM_DISCARDABLE}
- IMAGE_SCN_MEM_NOT_CACHED = $04000000; // Section is not cachable.
- {$EXTERNALSYM IMAGE_SCN_MEM_NOT_CACHED}
- IMAGE_SCN_MEM_NOT_PAGED = $08000000; // Section is not pageable.
- {$EXTERNALSYM IMAGE_SCN_MEM_NOT_PAGED}
- IMAGE_SCN_MEM_SHARED = $10000000; // Section is shareable.
- {$EXTERNALSYM IMAGE_SCN_MEM_SHARED}
- IMAGE_SCN_MEM_EXECUTE = $20000000; // Section is executable.
- {$EXTERNALSYM IMAGE_SCN_MEM_EXECUTE}
- IMAGE_SCN_MEM_READ = $40000000; // Section is readable.
- {$EXTERNALSYM IMAGE_SCN_MEM_READ}
- IMAGE_SCN_MEM_WRITE = DWORD($80000000); // Section is writeable.
- {$EXTERNALSYM IMAGE_SCN_MEM_WRITE}
-
-//
-// TLS Chaacteristic Flags
-//
-
- IMAGE_SCN_SCALE_INDEX = $00000001; // Tls index is scaled
- {$EXTERNALSYM IMAGE_SCN_SCALE_INDEX}
-
-// #include "pshpack2.h" // Symbols, relocs, and linenumbers are 2 byte packed
-
-//
-// Symbol format.
-//
-
-type
- TImageSymbolN = record
- case Integer of
- 0: (
- ShortName: array [0..7] of BYTE);
- 1: (
- Short: DWORD; // if 0, use LongName
- Long: DWORD); // offset into string table
- 2: (
- LongName: array [0..1] of DWORD);
- end;
-
- PIMAGE_SYMBOL = ^IMAGE_SYMBOL;
- {$EXTERNALSYM PIMAGE_SYMBOL}
- _IMAGE_SYMBOL = record
- N: TImageSymbolN;
- Value: DWORD;
- SectionNumber: SHORT;
- Type_: WORD;
- StorageClass: BYTE;
- NumberOfAuxSymbols: BYTE;
- end;
- {$EXTERNALSYM _IMAGE_SYMBOL}
- IMAGE_SYMBOL = _IMAGE_SYMBOL;
- {$EXTERNALSYM IMAGE_SYMBOL}
- TImageSymbol = IMAGE_SYMBOL;
- PImageSymbol = PIMAGE_SYMBOL;
-
-const
- IMAGE_SIZEOF_SYMBOL = 18;
- {$EXTERNALSYM IMAGE_SIZEOF_SYMBOL}
-
-//
-// Section values.
-//
-// Symbols have a section number of the section in which they are
-// defined. Otherwise, section numbers have the following meanings:
-//
-
- IMAGE_SYM_UNDEFINED = SHORT(0); // Symbol is undefined or is common.
- {$EXTERNALSYM IMAGE_SYM_UNDEFINED}
- IMAGE_SYM_ABSOLUTE = SHORT(-1); // Symbol is an absolute value.
- {$EXTERNALSYM IMAGE_SYM_ABSOLUTE}
- IMAGE_SYM_DEBUG = SHORT(-2); // Symbol is a special debug item.
- {$EXTERNALSYM IMAGE_SYM_DEBUG}
- IMAGE_SYM_SECTION_MAX = SHORT($FEFF ); // Values 0xFF00-0xFFFF are special
- {$EXTERNALSYM IMAGE_SYM_SECTION_MAX}
-
-//
-// Type (fundamental) values.
-//
-
- IMAGE_SYM_TYPE_NULL = $0000; // no type.
- {$EXTERNALSYM IMAGE_SYM_TYPE_NULL}
- IMAGE_SYM_TYPE_VOID = $0001;
- {$EXTERNALSYM IMAGE_SYM_TYPE_VOID}
- IMAGE_SYM_TYPE_CHAR = $0002; // type character.
- {$EXTERNALSYM IMAGE_SYM_TYPE_CHAR}
- IMAGE_SYM_TYPE_SHORT = $0003; // type short integer.
- {$EXTERNALSYM IMAGE_SYM_TYPE_SHORT}
- IMAGE_SYM_TYPE_INT = $0004;
- {$EXTERNALSYM IMAGE_SYM_TYPE_INT}
- IMAGE_SYM_TYPE_LONG = $0005;
- {$EXTERNALSYM IMAGE_SYM_TYPE_LONG}
- IMAGE_SYM_TYPE_FLOAT = $0006;
- {$EXTERNALSYM IMAGE_SYM_TYPE_FLOAT}
- IMAGE_SYM_TYPE_DOUBLE = $0007;
- {$EXTERNALSYM IMAGE_SYM_TYPE_DOUBLE}
- IMAGE_SYM_TYPE_STRUCT = $0008;
- {$EXTERNALSYM IMAGE_SYM_TYPE_STRUCT}
- IMAGE_SYM_TYPE_UNION = $0009;
- {$EXTERNALSYM IMAGE_SYM_TYPE_UNION}
- IMAGE_SYM_TYPE_ENUM = $000A; // enumeration.
- {$EXTERNALSYM IMAGE_SYM_TYPE_ENUM}
- IMAGE_SYM_TYPE_MOE = $000B; // member of enumeration.
- {$EXTERNALSYM IMAGE_SYM_TYPE_MOE}
- IMAGE_SYM_TYPE_BYTE = $000C;
- {$EXTERNALSYM IMAGE_SYM_TYPE_BYTE}
- IMAGE_SYM_TYPE_WORD = $000D;
- {$EXTERNALSYM IMAGE_SYM_TYPE_WORD}
- IMAGE_SYM_TYPE_UINT = $000E;
- {$EXTERNALSYM IMAGE_SYM_TYPE_UINT}
- IMAGE_SYM_TYPE_DWORD = $000F;
- {$EXTERNALSYM IMAGE_SYM_TYPE_DWORD}
- IMAGE_SYM_TYPE_PCODE = $8000;
- {$EXTERNALSYM IMAGE_SYM_TYPE_PCODE}
-
-//
-// Type (derived) values.
-//
-
- IMAGE_SYM_DTYPE_NULL = 0; // no derived type.
- {$EXTERNALSYM IMAGE_SYM_DTYPE_NULL}
- IMAGE_SYM_DTYPE_POINTER = 1; // pointer.
- {$EXTERNALSYM IMAGE_SYM_DTYPE_POINTER}
- IMAGE_SYM_DTYPE_FUNCTION = 2; // function.
- {$EXTERNALSYM IMAGE_SYM_DTYPE_FUNCTION}
- IMAGE_SYM_DTYPE_ARRAY = 3; // array.
- {$EXTERNALSYM IMAGE_SYM_DTYPE_ARRAY}
-
-//
-// Storage classes.
-//
-
- IMAGE_SYM_CLASS_END_OF_FUNCTION = BYTE(-1);
- {$EXTERNALSYM IMAGE_SYM_CLASS_END_OF_FUNCTION}
- IMAGE_SYM_CLASS_NULL = $0000;
- {$EXTERNALSYM IMAGE_SYM_CLASS_NULL}
- IMAGE_SYM_CLASS_AUTOMATIC = $0001;
- {$EXTERNALSYM IMAGE_SYM_CLASS_AUTOMATIC}
- IMAGE_SYM_CLASS_EXTERNAL = $0002;
- {$EXTERNALSYM IMAGE_SYM_CLASS_EXTERNAL}
- IMAGE_SYM_CLASS_STATIC = $0003;
- {$EXTERNALSYM IMAGE_SYM_CLASS_STATIC}
- IMAGE_SYM_CLASS_REGISTER = $0004;
- {$EXTERNALSYM IMAGE_SYM_CLASS_REGISTER}
- IMAGE_SYM_CLASS_EXTERNAL_DEF = $0005;
- {$EXTERNALSYM IMAGE_SYM_CLASS_EXTERNAL_DEF}
- IMAGE_SYM_CLASS_LABEL = $0006;
- {$EXTERNALSYM IMAGE_SYM_CLASS_LABEL}
- IMAGE_SYM_CLASS_UNDEFINED_LABEL = $0007;
- {$EXTERNALSYM IMAGE_SYM_CLASS_UNDEFINED_LABEL}
- IMAGE_SYM_CLASS_MEMBER_OF_STRUCT = $0008;
- {$EXTERNALSYM IMAGE_SYM_CLASS_MEMBER_OF_STRUCT}
- IMAGE_SYM_CLASS_ARGUMENT = $0009;
- {$EXTERNALSYM IMAGE_SYM_CLASS_ARGUMENT}
- IMAGE_SYM_CLASS_STRUCT_TAG = $000A;
- {$EXTERNALSYM IMAGE_SYM_CLASS_STRUCT_TAG}
- IMAGE_SYM_CLASS_MEMBER_OF_UNION = $000B;
- {$EXTERNALSYM IMAGE_SYM_CLASS_MEMBER_OF_UNION}
- IMAGE_SYM_CLASS_UNION_TAG = $000C;
- {$EXTERNALSYM IMAGE_SYM_CLASS_UNION_TAG}
- IMAGE_SYM_CLASS_TYPE_DEFINITION = $000D;
- {$EXTERNALSYM IMAGE_SYM_CLASS_TYPE_DEFINITION}
- IMAGE_SYM_CLASS_UNDEFINED_STATIC = $000E;
- {$EXTERNALSYM IMAGE_SYM_CLASS_UNDEFINED_STATIC}
- IMAGE_SYM_CLASS_ENUM_TAG = $000F;
- {$EXTERNALSYM IMAGE_SYM_CLASS_ENUM_TAG}
- IMAGE_SYM_CLASS_MEMBER_OF_ENUM = $0010;
- {$EXTERNALSYM IMAGE_SYM_CLASS_MEMBER_OF_ENUM}
- IMAGE_SYM_CLASS_REGISTER_PARAM = $0011;
- {$EXTERNALSYM IMAGE_SYM_CLASS_REGISTER_PARAM}
- IMAGE_SYM_CLASS_BIT_FIELD = $0012;
- {$EXTERNALSYM IMAGE_SYM_CLASS_BIT_FIELD}
-
- IMAGE_SYM_CLASS_FAR_EXTERNAL = $0044;
- {$EXTERNALSYM IMAGE_SYM_CLASS_FAR_EXTERNAL}
-
- IMAGE_SYM_CLASS_BLOCK = $0064;
- {$EXTERNALSYM IMAGE_SYM_CLASS_BLOCK}
- IMAGE_SYM_CLASS_FUNCTION = $0065;
- {$EXTERNALSYM IMAGE_SYM_CLASS_FUNCTION}
- IMAGE_SYM_CLASS_END_OF_STRUCT = $0066;
- {$EXTERNALSYM IMAGE_SYM_CLASS_END_OF_STRUCT}
- IMAGE_SYM_CLASS_FILE = $0067;
- {$EXTERNALSYM IMAGE_SYM_CLASS_FILE}
-
-// new
-
- IMAGE_SYM_CLASS_SECTION = $0068;
- {$EXTERNALSYM IMAGE_SYM_CLASS_SECTION}
- IMAGE_SYM_CLASS_WEAK_EXTERNAL = $0069;
- {$EXTERNALSYM IMAGE_SYM_CLASS_WEAK_EXTERNAL}
-
- IMAGE_SYM_CLASS_CLR_TOKEN = $006B;
- {$EXTERNALSYM IMAGE_SYM_CLASS_CLR_TOKEN}
-
-// type packing constants
-
- N_BTMASK = $000F;
- {$EXTERNALSYM N_BTMASK}
- N_TMASK = $0030;
- {$EXTERNALSYM N_TMASK}
- N_TMASK1 = $00C0;
- {$EXTERNALSYM N_TMASK1}
- N_TMASK2 = $00F0;
- {$EXTERNALSYM N_TMASK2}
- N_BTSHFT = 4;
- {$EXTERNALSYM N_BTSHFT}
- N_TSHIFT = 2;
- {$EXTERNALSYM N_TSHIFT}
-
-// MACROS
-
-// Basic Type of x
-
-function BTYPE(x: DWORD): DWORD;
-{$EXTERNALSYM BTYPE}
-
-// Is x a pointer?
-
-function ISPTR(x: DWORD): Boolean;
-{$EXTERNALSYM ISPTR}
-
-// Is x a function?
-
-function ISFCN(x: DWORD): Boolean;
-{$EXTERNALSYM ISFCN}
-
-// Is x an array?
-
-function ISARY(x: DWORD): Boolean;
-{$EXTERNALSYM ISARY}
-
-// Is x a structure, union, or enumeration TAG?
-
-function ISTAG(x: DWORD): Boolean;
-{$EXTERNALSYM ISTAG}
-
-//
-// Auxiliary entry format.
-//
-
-type
- TImgAuzSymSymMisc = record
- case Integer of
- 0: (
- Linenumber: WORD; // declaration line number
- Size: WORD); // size of struct, union, or enum
- 1: (
- TotalSize: DWORD);
- end;
-
- TImgAuzSymSymFcnAry = record
- case Integer of
- 0: ( // if ISFCN, tag, or .bb
- PointerToLinenumber: DWORD;
- PointerToNextFunction: DWORD);
- 1: ( // if ISARY, up to 4 dimen.
- Dimension: array [0..3] of WORD);
- end;
-
- TImgAuxSymSym = record
- TagIndex: DWORD; // struct, union, or enum tag index
- Misc: TImgAuzSymSymMisc;
- FcnAry: TImgAuzSymSymFcnAry;
- TvIndex: WORD; // tv index
- end;
-
- TImgAuxSymFile = record
- Name: array [0..IMAGE_SIZEOF_SYMBOL - 1] of BYTE;
- end;
-
- TImgAuxSymSection = record
- Length: DWORD; // section length
- NumberOfRelocations: WORD; // number of relocation entries
- NumberOfLinenumbers: WORD; // number of line numbers
- CheckSum: DWORD; // checksum for communal
- Number: SHORT; // section number to associate with
- Selection: BYTE; // communal selection type
- end;
-
- PIMAGE_AUX_SYMBOL = ^IMAGE_AUX_SYMBOL;
- {$EXTERNALSYM PIMAGE_AUX_SYMBOL}
- _IMAGE_AUX_SYMBOL = record
- case Integer of
- 0: (Sym: TImgAuxSymSym);
- 1: (File_: TImgAuxSymFile);
- 2: (Section: TImgAuxSymSection);
- end;
- {$EXTERNALSYM _IMAGE_AUX_SYMBOL}
- IMAGE_AUX_SYMBOL = _IMAGE_AUX_SYMBOL;
- {$EXTERNALSYM IMAGE_AUX_SYMBOL}
- TImageAuxSymbol = IMAGE_AUX_SYMBOL;
- PImageAuxSymbol = PIMAGE_AUX_SYMBOL;
-
-const
- IMAGE_SIZEOF_AUX_SYMBOL = 18;
- {$EXTERNALSYM IMAGE_SIZEOF_AUX_SYMBOL}
-
- IMAGE_AUX_SYMBOL_TYPE_TOKEN_DEF = 1;
- {$EXTERNALSYM IMAGE_AUX_SYMBOL_TYPE_TOKEN_DEF}
-
-type
- IMAGE_AUX_SYMBOL_TYPE = DWORD;
- {$EXTERNALSYM IMAGE_AUX_SYMBOL_TYPE}
- TImageAuxSymbolType = IMAGE_AUX_SYMBOL_TYPE;
-
- IMAGE_AUX_SYMBOL_TOKEN_DEF = packed record
- bAuxType: BYTE; // IMAGE_AUX_SYMBOL_TYPE
- bReserved: BYTE; // Must be 0
- SymbolTableIndex: DWORD;
- rgbReserved: array [0..11] of BYTE; // Must be 0
- end;
- {$EXTERNALSYM IMAGE_AUX_SYMBOL_TOKEN_DEF}
- PIMAGE_AUX_SYMBOL_TOKEN_DEF = ^IMAGE_AUX_SYMBOL_TOKEN_DEF;
- {$EXTERNALSYM PIMAGE_AUX_SYMBOL_TOKEN_DEF}
- TImageAuxSymbolTokenDef = IMAGE_AUX_SYMBOL_TOKEN_DEF;
- PImageAuxSymbolTokenDef = PIMAGE_AUX_SYMBOL_TOKEN_DEF;
-
-//
-// Communal selection types.
-//
-
-const
- IMAGE_COMDAT_SELECT_NODUPLICATES = 1;
- {$EXTERNALSYM IMAGE_COMDAT_SELECT_NODUPLICATES}
- IMAGE_COMDAT_SELECT_ANY = 2;
- {$EXTERNALSYM IMAGE_COMDAT_SELECT_ANY}
- IMAGE_COMDAT_SELECT_SAME_SIZE = 3;
- {$EXTERNALSYM IMAGE_COMDAT_SELECT_SAME_SIZE}
- IMAGE_COMDAT_SELECT_EXACT_MATCH = 4;
- {$EXTERNALSYM IMAGE_COMDAT_SELECT_EXACT_MATCH}
- IMAGE_COMDAT_SELECT_ASSOCIATIVE = 5;
- {$EXTERNALSYM IMAGE_COMDAT_SELECT_ASSOCIATIVE}
- IMAGE_COMDAT_SELECT_LARGEST = 6;
- {$EXTERNALSYM IMAGE_COMDAT_SELECT_LARGEST}
- IMAGE_COMDAT_SELECT_NEWEST = 7;
- {$EXTERNALSYM IMAGE_COMDAT_SELECT_NEWEST}
-
- IMAGE_WEAK_EXTERN_SEARCH_NOLIBRARY = 1;
- {$EXTERNALSYM IMAGE_WEAK_EXTERN_SEARCH_NOLIBRARY}
- IMAGE_WEAK_EXTERN_SEARCH_LIBRARY = 2;
- {$EXTERNALSYM IMAGE_WEAK_EXTERN_SEARCH_LIBRARY}
- IMAGE_WEAK_EXTERN_SEARCH_ALIAS = 3;
- {$EXTERNALSYM IMAGE_WEAK_EXTERN_SEARCH_ALIAS}
-
-//
-// Relocation format.
-//
-
-type
- TImgRelocUnion = record
- case Integer of
- 0: (VirtualAddress: DWORD);
- 1: (RelocCount: DWORD); // Set to the real count when IMAGE_SCN_LNK_NRELOC_OVFL is set
- end;
-
- PIMAGE_RELOCATION = ^IMAGE_RELOCATION;
- {$EXTERNALSYM PIMAGE_RELOCATION}
- _IMAGE_RELOCATION = record
- Union: TImgRelocUnion;
- SymbolTableIndex: DWORD;
- Type_: WORD;
- end;
- {$EXTERNALSYM _IMAGE_RELOCATION}
- IMAGE_RELOCATION = _IMAGE_RELOCATION;
- {$EXTERNALSYM IMAGE_RELOCATION}
- TImageRelocation = IMAGE_RELOCATION;
- PImageRelocation = PIMAGE_RELOCATION;
-
-const
- IMAGE_SIZEOF_RELOCATION = 10;
- {$EXTERNALSYM IMAGE_SIZEOF_RELOCATION}
-
-//
-// I386 relocation types.
-//
-
- IMAGE_REL_I386_ABSOLUTE = $0000; // Reference is absolute, no relocation is necessary
- {$EXTERNALSYM IMAGE_REL_I386_ABSOLUTE}
- IMAGE_REL_I386_DIR16 = $0001; // Direct 16-bit reference to the symbols virtual address
- {$EXTERNALSYM IMAGE_REL_I386_DIR16}
- IMAGE_REL_I386_REL16 = $0002; // PC-relative 16-bit reference to the symbols virtual address
- {$EXTERNALSYM IMAGE_REL_I386_REL16}
- IMAGE_REL_I386_DIR32 = $0006; // Direct 32-bit reference to the symbols virtual address
- {$EXTERNALSYM IMAGE_REL_I386_DIR32}
- IMAGE_REL_I386_DIR32NB = $0007; // Direct 32-bit reference to the symbols virtual address, base not included
- {$EXTERNALSYM IMAGE_REL_I386_DIR32NB}
- IMAGE_REL_I386_SEG12 = $0009; // Direct 16-bit reference to the segment-selector bits of a 32-bit virtual address
- {$EXTERNALSYM IMAGE_REL_I386_SEG12}
- IMAGE_REL_I386_SECTION = $000A;
- {$EXTERNALSYM IMAGE_REL_I386_SECTION}
- IMAGE_REL_I386_SECREL = $000B;
- {$EXTERNALSYM IMAGE_REL_I386_SECREL}
- IMAGE_REL_MIPS_SECRELLO = $000C; // Low 16-bit section relative referemce (used for >32k TLS)
- {$EXTERNALSYM IMAGE_REL_MIPS_SECRELLO}
- IMAGE_REL_MIPS_SECRELHI = $000D; // High 16-bit section relative reference (used for >32k TLS)
- {$EXTERNALSYM IMAGE_REL_MIPS_SECRELHI}
- IMAGE_REL_I386_REL32 = $0014; // PC-relative 32-bit reference to the symbols virtual address
- {$EXTERNALSYM IMAGE_REL_I386_REL32}
-
-//
-// MIPS relocation types.
-//
-
- IMAGE_REL_MIPS_ABSOLUTE = $0000; // Reference is absolute, no relocation is necessary
- {$EXTERNALSYM IMAGE_REL_MIPS_ABSOLUTE}
- IMAGE_REL_MIPS_REFHALF = $0001;
- {$EXTERNALSYM IMAGE_REL_MIPS_REFHALF}
- IMAGE_REL_MIPS_REFWORD = $0002;
- {$EXTERNALSYM IMAGE_REL_MIPS_REFWORD}
- IMAGE_REL_MIPS_JMPADDR = $0003;
- {$EXTERNALSYM IMAGE_REL_MIPS_JMPADDR}
- IMAGE_REL_MIPS_REFHI = $0004;
- {$EXTERNALSYM IMAGE_REL_MIPS_REFHI}
- IMAGE_REL_MIPS_REFLO = $0005;
- {$EXTERNALSYM IMAGE_REL_MIPS_REFLO}
- IMAGE_REL_MIPS_GPREL = $0006;
- {$EXTERNALSYM IMAGE_REL_MIPS_GPREL}
- IMAGE_REL_MIPS_LITERAL = $0007;
- {$EXTERNALSYM IMAGE_REL_MIPS_LITERAL}
- IMAGE_REL_MIPS_SECTION = $000A;
- {$EXTERNALSYM IMAGE_REL_MIPS_SECTION}
- IMAGE_REL_MIPS_SECREL = $000B;
- {$EXTERNALSYM IMAGE_REL_MIPS_SECREL}
- //IMAGE_REL_MIPS_SECRELLO = $000C; // Low 16-bit section relative referemce (used for >32k TLS)
- //{$EXTERNALSYM IMAGE_REL_MIPS_SECRELLO}
- //IMAGE_REL_MIPS_SECRELHI = $000D; // High 16-bit section relative reference (used for >32k TLS)
- //{$EXTERNALSYM IMAGE_REL_MIPS_SECRELHI}
- IMAGE_REL_MIPS_TOKEN = $000E; // clr token
- {$EXTERNALSYM IMAGE_REL_MIPS_TOKEN}
- IMAGE_REL_MIPS_JMPADDR16 = $0010;
- {$EXTERNALSYM IMAGE_REL_MIPS_JMPADDR16}
- IMAGE_REL_MIPS_REFWORDNB = $0022;
- {$EXTERNALSYM IMAGE_REL_MIPS_REFWORDNB}
- IMAGE_REL_MIPS_PAIR = $0025;
- {$EXTERNALSYM IMAGE_REL_MIPS_PAIR}
-
-//
-// Alpha Relocation types.
-//
-
- IMAGE_REL_ALPHA_ABSOLUTE = $0000;
- {$EXTERNALSYM IMAGE_REL_ALPHA_ABSOLUTE}
- IMAGE_REL_ALPHA_REFLONG = $0001;
- {$EXTERNALSYM IMAGE_REL_ALPHA_REFLONG}
- IMAGE_REL_ALPHA_REFQUAD = $0002;
- {$EXTERNALSYM IMAGE_REL_ALPHA_REFQUAD}
- IMAGE_REL_ALPHA_GPREL32 = $0003;
- {$EXTERNALSYM IMAGE_REL_ALPHA_GPREL32}
- IMAGE_REL_ALPHA_LITERAL = $0004;
- {$EXTERNALSYM IMAGE_REL_ALPHA_LITERAL}
- IMAGE_REL_ALPHA_LITUSE = $0005;
- {$EXTERNALSYM IMAGE_REL_ALPHA_LITUSE}
- IMAGE_REL_ALPHA_GPDISP = $0006;
- {$EXTERNALSYM IMAGE_REL_ALPHA_GPDISP}
- IMAGE_REL_ALPHA_BRADDR = $0007;
- {$EXTERNALSYM IMAGE_REL_ALPHA_BRADDR}
- IMAGE_REL_ALPHA_HINT = $0008;
- {$EXTERNALSYM IMAGE_REL_ALPHA_HINT}
- IMAGE_REL_ALPHA_INLINE_REFLONG = $0009;
- {$EXTERNALSYM IMAGE_REL_ALPHA_INLINE_REFLONG}
- IMAGE_REL_ALPHA_REFHI = $000A;
- {$EXTERNALSYM IMAGE_REL_ALPHA_REFHI}
- IMAGE_REL_ALPHA_REFLO = $000B;
- {$EXTERNALSYM IMAGE_REL_ALPHA_REFLO}
- IMAGE_REL_ALPHA_PAIR = $000C;
- {$EXTERNALSYM IMAGE_REL_ALPHA_PAIR}
- IMAGE_REL_ALPHA_MATCH = $000D;
- {$EXTERNALSYM IMAGE_REL_ALPHA_MATCH}
- IMAGE_REL_ALPHA_SECTION = $000E;
- {$EXTERNALSYM IMAGE_REL_ALPHA_SECTION}
- IMAGE_REL_ALPHA_SECREL = $000F;
- {$EXTERNALSYM IMAGE_REL_ALPHA_SECREL}
- IMAGE_REL_ALPHA_REFLONGNB = $0010;
- {$EXTERNALSYM IMAGE_REL_ALPHA_REFLONGNB}
- IMAGE_REL_ALPHA_SECRELLO = $0011; // Low 16-bit section relative reference
- {$EXTERNALSYM IMAGE_REL_ALPHA_SECRELLO}
- IMAGE_REL_ALPHA_SECRELHI = $0012; // High 16-bit section relative reference
- {$EXTERNALSYM IMAGE_REL_ALPHA_SECRELHI}
- IMAGE_REL_ALPHA_REFQ3 = $0013; // High 16 bits of 48 bit reference
- {$EXTERNALSYM IMAGE_REL_ALPHA_REFQ3}
- IMAGE_REL_ALPHA_REFQ2 = $0014; // Middle 16 bits of 48 bit reference
- {$EXTERNALSYM IMAGE_REL_ALPHA_REFQ2}
- IMAGE_REL_ALPHA_REFQ1 = $0015; // Low 16 bits of 48 bit reference
- {$EXTERNALSYM IMAGE_REL_ALPHA_REFQ1}
- IMAGE_REL_ALPHA_GPRELLO = $0016; // Low 16-bit GP relative reference
- {$EXTERNALSYM IMAGE_REL_ALPHA_GPRELLO}
- IMAGE_REL_ALPHA_GPRELHI = $0017; // High 16-bit GP relative reference
- {$EXTERNALSYM IMAGE_REL_ALPHA_GPRELHI}
-
-//
-// IBM PowerPC relocation types.
-//
-
- IMAGE_REL_PPC_ABSOLUTE = $0000; // NOP
- {$EXTERNALSYM IMAGE_REL_PPC_ABSOLUTE}
- IMAGE_REL_PPC_ADDR64 = $0001; // 64-bit address
- {$EXTERNALSYM IMAGE_REL_PPC_ADDR64}
- IMAGE_REL_PPC_ADDR32 = $0002; // 32-bit address
- {$EXTERNALSYM IMAGE_REL_PPC_ADDR32}
- IMAGE_REL_PPC_ADDR24 = $0003; // 26-bit address, shifted left 2 (branch absolute)
- {$EXTERNALSYM IMAGE_REL_PPC_ADDR24}
- IMAGE_REL_PPC_ADDR16 = $0004; // 16-bit address
- {$EXTERNALSYM IMAGE_REL_PPC_ADDR16}
- IMAGE_REL_PPC_ADDR14 = $0005; // 16-bit address, shifted left 2 (load doubleword)
- {$EXTERNALSYM IMAGE_REL_PPC_ADDR14}
- IMAGE_REL_PPC_REL24 = $0006; // 26-bit PC-relative offset, shifted left 2 (branch relative)
- {$EXTERNALSYM IMAGE_REL_PPC_REL24}
- IMAGE_REL_PPC_REL14 = $0007; // 16-bit PC-relative offset, shifted left 2 (br cond relative)
- {$EXTERNALSYM IMAGE_REL_PPC_REL14}
- IMAGE_REL_PPC_TOCREL16 = $0008; // 16-bit offset from TOC base
- {$EXTERNALSYM IMAGE_REL_PPC_TOCREL16}
- IMAGE_REL_PPC_TOCREL14 = $0009; // 16-bit offset from TOC base, shifted left 2 (load doubleword)
- {$EXTERNALSYM IMAGE_REL_PPC_TOCREL14}
-
- IMAGE_REL_PPC_ADDR32NB = $000A; // 32-bit addr w/o image base
- {$EXTERNALSYM IMAGE_REL_PPC_ADDR32NB}
- IMAGE_REL_PPC_SECREL = $000B; // va of containing section (as in an image sectionhdr)
- {$EXTERNALSYM IMAGE_REL_PPC_SECREL}
- IMAGE_REL_PPC_SECTION = $000C; // sectionheader number
- {$EXTERNALSYM IMAGE_REL_PPC_SECTION}
- IMAGE_REL_PPC_IFGLUE = $000D; // substitute TOC restore instruction iff symbol is glue code
- {$EXTERNALSYM IMAGE_REL_PPC_IFGLUE}
- IMAGE_REL_PPC_IMGLUE = $000E; // symbol is glue code; virtual address is TOC restore instruction
- {$EXTERNALSYM IMAGE_REL_PPC_IMGLUE}
- IMAGE_REL_PPC_SECREL16 = $000F; // va of containing section (limited to 16 bits)
- {$EXTERNALSYM IMAGE_REL_PPC_SECREL16}
- IMAGE_REL_PPC_REFHI = $0010;
- {$EXTERNALSYM IMAGE_REL_PPC_REFHI}
- IMAGE_REL_PPC_REFLO = $0011;
- {$EXTERNALSYM IMAGE_REL_PPC_REFLO}
- IMAGE_REL_PPC_PAIR = $0012;
- {$EXTERNALSYM IMAGE_REL_PPC_PAIR}
- IMAGE_REL_PPC_SECRELLO = $0013; // Low 16-bit section relative reference (used for >32k TLS)
- {$EXTERNALSYM IMAGE_REL_PPC_SECRELLO}
- IMAGE_REL_PPC_SECRELHI = $0014; // High 16-bit section relative reference (used for >32k TLS)
- {$EXTERNALSYM IMAGE_REL_PPC_SECRELHI}
- IMAGE_REL_PPC_GPREL = $0015;
- {$EXTERNALSYM IMAGE_REL_PPC_GPREL}
- IMAGE_REL_PPC_TOKEN = $0016; // clr token
- {$EXTERNALSYM IMAGE_REL_PPC_TOKEN}
-
- IMAGE_REL_PPC_TYPEMASK = $00FF; // mask to isolate above values in IMAGE_RELOCATION.Type
- {$EXTERNALSYM IMAGE_REL_PPC_TYPEMASK}
-
-// Flag bits in IMAGE_RELOCATION.TYPE
-
- IMAGE_REL_PPC_NEG = $0100; // subtract reloc value rather than adding it
- {$EXTERNALSYM IMAGE_REL_PPC_NEG}
- IMAGE_REL_PPC_BRTAKEN = $0200; // fix branch prediction bit to predict branch taken
- {$EXTERNALSYM IMAGE_REL_PPC_BRTAKEN}
- IMAGE_REL_PPC_BRNTAKEN = $0400; // fix branch prediction bit to predict branch not taken
- {$EXTERNALSYM IMAGE_REL_PPC_BRNTAKEN}
- IMAGE_REL_PPC_TOCDEFN = $0800; // toc slot defined in file (or, data in toc)
- {$EXTERNALSYM IMAGE_REL_PPC_TOCDEFN}
-
-//
-// Hitachi SH3 relocation types.
-//
-
- IMAGE_REL_SH3_ABSOLUTE = $0000; // No relocation
- {$EXTERNALSYM IMAGE_REL_SH3_ABSOLUTE}
- IMAGE_REL_SH3_DIRECT16 = $0001; // 16 bit direct
- {$EXTERNALSYM IMAGE_REL_SH3_DIRECT16}
- IMAGE_REL_SH3_DIRECT32 = $0002; // 32 bit direct
- {$EXTERNALSYM IMAGE_REL_SH3_DIRECT32}
- IMAGE_REL_SH3_DIRECT8 = $0003; // 8 bit direct, -128..255
- {$EXTERNALSYM IMAGE_REL_SH3_DIRECT8}
- IMAGE_REL_SH3_DIRECT8_WORD = $0004; // 8 bit direct .W (0 ext.)
- {$EXTERNALSYM IMAGE_REL_SH3_DIRECT8_WORD}
- IMAGE_REL_SH3_DIRECT8_LONG = $0005; // 8 bit direct .L (0 ext.)
- {$EXTERNALSYM IMAGE_REL_SH3_DIRECT8_LONG}
- IMAGE_REL_SH3_DIRECT4 = $0006; // 4 bit direct (0 ext.)
- {$EXTERNALSYM IMAGE_REL_SH3_DIRECT4}
- IMAGE_REL_SH3_DIRECT4_WORD = $0007; // 4 bit direct .W (0 ext.)
- {$EXTERNALSYM IMAGE_REL_SH3_DIRECT4_WORD}
- IMAGE_REL_SH3_DIRECT4_LONG = $0008; // 4 bit direct .L (0 ext.)
- {$EXTERNALSYM IMAGE_REL_SH3_DIRECT4_LONG}
- IMAGE_REL_SH3_PCREL8_WORD = $0009; // 8 bit PC relative .W
- {$EXTERNALSYM IMAGE_REL_SH3_PCREL8_WORD}
- IMAGE_REL_SH3_PCREL8_LONG = $000A; // 8 bit PC relative .L
- {$EXTERNALSYM IMAGE_REL_SH3_PCREL8_LONG}
- IMAGE_REL_SH3_PCREL12_WORD = $000B; // 12 LSB PC relative .W
- {$EXTERNALSYM IMAGE_REL_SH3_PCREL12_WORD}
- IMAGE_REL_SH3_STARTOF_SECTION = $000C; // Start of EXE section
- {$EXTERNALSYM IMAGE_REL_SH3_STARTOF_SECTION}
- IMAGE_REL_SH3_SIZEOF_SECTION = $000D; // Size of EXE section
- {$EXTERNALSYM IMAGE_REL_SH3_SIZEOF_SECTION}
- IMAGE_REL_SH3_SECTION = $000E; // Section table index
- {$EXTERNALSYM IMAGE_REL_SH3_SECTION}
- IMAGE_REL_SH3_SECREL = $000F; // Offset within section
- {$EXTERNALSYM IMAGE_REL_SH3_SECREL}
- IMAGE_REL_SH3_DIRECT32_NB = $0010; // 32 bit direct not based
- {$EXTERNALSYM IMAGE_REL_SH3_DIRECT32_NB}
- IMAGE_REL_SH3_GPREL4_LONG = $0011; // GP-relative addressing
- {$EXTERNALSYM IMAGE_REL_SH3_GPREL4_LONG}
- IMAGE_REL_SH3_TOKEN = $0012; // clr token
- {$EXTERNALSYM IMAGE_REL_SH3_TOKEN}
-
- IMAGE_REL_ARM_ABSOLUTE = $0000; // No relocation required
- {$EXTERNALSYM IMAGE_REL_ARM_ABSOLUTE}
- IMAGE_REL_ARM_ADDR32 = $0001; // 32 bit address
- {$EXTERNALSYM IMAGE_REL_ARM_ADDR32}
- IMAGE_REL_ARM_ADDR32NB = $0002; // 32 bit address w/o image base
- {$EXTERNALSYM IMAGE_REL_ARM_ADDR32NB}
- IMAGE_REL_ARM_BRANCH24 = $0003; // 24 bit offset << 2 & sign ext.
- {$EXTERNALSYM IMAGE_REL_ARM_BRANCH24}
- IMAGE_REL_ARM_BRANCH11 = $0004; // Thumb: 2 11 bit offsets
- {$EXTERNALSYM IMAGE_REL_ARM_BRANCH11}
- IMAGE_REL_ARM_TOKEN = $0005; // clr token
- {$EXTERNALSYM IMAGE_REL_ARM_TOKEN}
- IMAGE_REL_ARM_GPREL12 = $0006; // GP-relative addressing (ARM)
- {$EXTERNALSYM IMAGE_REL_ARM_GPREL12}
- IMAGE_REL_ARM_GPREL7 = $0007; // GP-relative addressing (Thumb)
- {$EXTERNALSYM IMAGE_REL_ARM_GPREL7}
- IMAGE_REL_ARM_BLX24 = $0008;
- {$EXTERNALSYM IMAGE_REL_ARM_BLX24}
- IMAGE_REL_ARM_BLX11 = $0009;
- {$EXTERNALSYM IMAGE_REL_ARM_BLX11}
- IMAGE_REL_ARM_SECTION = $000E; // Section table index
- {$EXTERNALSYM IMAGE_REL_ARM_SECTION}
- IMAGE_REL_ARM_SECREL = $000F; // Offset within section
- {$EXTERNALSYM IMAGE_REL_ARM_SECREL}
-
- IMAGE_REL_AM_ABSOLUTE = $0000;
- {$EXTERNALSYM IMAGE_REL_AM_ABSOLUTE}
- IMAGE_REL_AM_ADDR32 = $0001;
- {$EXTERNALSYM IMAGE_REL_AM_ADDR32}
- IMAGE_REL_AM_ADDR32NB = $0002;
- {$EXTERNALSYM IMAGE_REL_AM_ADDR32NB}
- IMAGE_REL_AM_CALL32 = $0003;
- {$EXTERNALSYM IMAGE_REL_AM_CALL32}
- IMAGE_REL_AM_FUNCINFO = $0004;
- {$EXTERNALSYM IMAGE_REL_AM_FUNCINFO}
- IMAGE_REL_AM_REL32_1 = $0005;
- {$EXTERNALSYM IMAGE_REL_AM_REL32_1}
- IMAGE_REL_AM_REL32_2 = $0006;
- {$EXTERNALSYM IMAGE_REL_AM_REL32_2}
- IMAGE_REL_AM_SECREL = $0007;
- {$EXTERNALSYM IMAGE_REL_AM_SECREL}
- IMAGE_REL_AM_SECTION = $0008;
- {$EXTERNALSYM IMAGE_REL_AM_SECTION}
- IMAGE_REL_AM_TOKEN = $0009;
- {$EXTERNALSYM IMAGE_REL_AM_TOKEN}
-
-//
-// X86-64 relocations
-//
-
- IMAGE_REL_AMD64_ABSOLUTE = $0000; // Reference is absolute, no relocation is necessary
- {$EXTERNALSYM IMAGE_REL_AMD64_ABSOLUTE}
- IMAGE_REL_AMD64_ADDR64 = $0001; // 64-bit address (VA).
- {$EXTERNALSYM IMAGE_REL_AMD64_ADDR64}
- IMAGE_REL_AMD64_ADDR32 = $0002; // 32-bit address (VA).
- {$EXTERNALSYM IMAGE_REL_AMD64_ADDR32}
- IMAGE_REL_AMD64_ADDR32NB = $0003; // 32-bit address w/o image base (RVA).
- {$EXTERNALSYM IMAGE_REL_AMD64_ADDR32NB}
- IMAGE_REL_AMD64_REL32 = $0004; // 32-bit relative address from byte following reloc
- {$EXTERNALSYM IMAGE_REL_AMD64_REL32}
- IMAGE_REL_AMD64_REL32_1 = $0005; // 32-bit relative address from byte distance 1 from reloc
- {$EXTERNALSYM IMAGE_REL_AMD64_REL32_1}
- IMAGE_REL_AMD64_REL32_2 = $0006; // 32-bit relative address from byte distance 2 from reloc
- {$EXTERNALSYM IMAGE_REL_AMD64_REL32_2}
- IMAGE_REL_AMD64_REL32_3 = $0007; // 32-bit relative address from byte distance 3 from reloc
- {$EXTERNALSYM IMAGE_REL_AMD64_REL32_3}
- IMAGE_REL_AMD64_REL32_4 = $0008; // 32-bit relative address from byte distance 4 from reloc
- {$EXTERNALSYM IMAGE_REL_AMD64_REL32_4}
- IMAGE_REL_AMD64_REL32_5 = $0009; // 32-bit relative address from byte distance 5 from reloc
- {$EXTERNALSYM IMAGE_REL_AMD64_REL32_5}
- IMAGE_REL_AMD64_SECTION = $000A; // Section index
- {$EXTERNALSYM IMAGE_REL_AMD64_SECTION}
- IMAGE_REL_AMD64_SECREL = $000B; // 32 bit offset from base of section containing target
- {$EXTERNALSYM IMAGE_REL_AMD64_SECREL}
- IMAGE_REL_AMD64_SECREL7 = $000C; // 7 bit unsigned offset from base of section containing target
- {$EXTERNALSYM IMAGE_REL_AMD64_SECREL7}
- IMAGE_REL_AMD64_TOKEN = $000D; // 32 bit metadata token
- {$EXTERNALSYM IMAGE_REL_AMD64_TOKEN}
- IMAGE_REL_AMD64_SREL32 = $000E; // 32 bit signed span-dependent value emitted into object
- {$EXTERNALSYM IMAGE_REL_AMD64_SREL32}
- IMAGE_REL_AMD64_PAIR = $000F;
- {$EXTERNALSYM IMAGE_REL_AMD64_PAIR}
- IMAGE_REL_AMD64_SSPAN32 = $0010; // 32 bit signed span-dependent value applied at link time
- {$EXTERNALSYM IMAGE_REL_AMD64_SSPAN32}
-
-//
-// IA64 relocation types.
-//
-
- IMAGE_REL_IA64_ABSOLUTE = $0000;
- {$EXTERNALSYM IMAGE_REL_IA64_ABSOLUTE}
- IMAGE_REL_IA64_IMM14 = $0001;
- {$EXTERNALSYM IMAGE_REL_IA64_IMM14}
- IMAGE_REL_IA64_IMM22 = $0002;
- {$EXTERNALSYM IMAGE_REL_IA64_IMM22}
- IMAGE_REL_IA64_IMM64 = $0003;
- {$EXTERNALSYM IMAGE_REL_IA64_IMM64}
- IMAGE_REL_IA64_DIR32 = $0004;
- {$EXTERNALSYM IMAGE_REL_IA64_DIR32}
- IMAGE_REL_IA64_DIR64 = $0005;
- {$EXTERNALSYM IMAGE_REL_IA64_DIR64}
- IMAGE_REL_IA64_PCREL21B = $0006;
- {$EXTERNALSYM IMAGE_REL_IA64_PCREL21B}
- IMAGE_REL_IA64_PCREL21M = $0007;
- {$EXTERNALSYM IMAGE_REL_IA64_PCREL21M}
- IMAGE_REL_IA64_PCREL21F = $0008;
- {$EXTERNALSYM IMAGE_REL_IA64_PCREL21F}
- IMAGE_REL_IA64_GPREL22 = $0009;
- {$EXTERNALSYM IMAGE_REL_IA64_GPREL22}
- IMAGE_REL_IA64_LTOFF22 = $000A;
- {$EXTERNALSYM IMAGE_REL_IA64_LTOFF22}
- IMAGE_REL_IA64_SECTION = $000B;
- {$EXTERNALSYM IMAGE_REL_IA64_SECTION}
- IMAGE_REL_IA64_SECREL22 = $000C;
- {$EXTERNALSYM IMAGE_REL_IA64_SECREL22}
- IMAGE_REL_IA64_SECREL64I = $000D;
- {$EXTERNALSYM IMAGE_REL_IA64_SECREL64I}
- IMAGE_REL_IA64_SECREL32 = $000E;
- {$EXTERNALSYM IMAGE_REL_IA64_SECREL32}
-
-//
-
- IMAGE_REL_IA64_DIR32NB = $0010;
- {$EXTERNALSYM IMAGE_REL_IA64_DIR32NB}
- IMAGE_REL_IA64_SREL14 = $0011;
- {$EXTERNALSYM IMAGE_REL_IA64_SREL14}
- IMAGE_REL_IA64_SREL22 = $0012;
- {$EXTERNALSYM IMAGE_REL_IA64_SREL22}
- IMAGE_REL_IA64_SREL32 = $0013;
- {$EXTERNALSYM IMAGE_REL_IA64_SREL32}
- IMAGE_REL_IA64_UREL32 = $0014;
- {$EXTERNALSYM IMAGE_REL_IA64_UREL32}
- IMAGE_REL_IA64_PCREL60X = $0015; // This is always a BRL and never converted
- {$EXTERNALSYM IMAGE_REL_IA64_PCREL60X}
- IMAGE_REL_IA64_PCREL60B = $0016; // If possible, convert to MBB bundle with NOP.B in slot 1
- {$EXTERNALSYM IMAGE_REL_IA64_PCREL60B}
- IMAGE_REL_IA64_PCREL60F = $0017; // If possible, convert to MFB bundle with NOP.F in slot 1
- {$EXTERNALSYM IMAGE_REL_IA64_PCREL60F}
- IMAGE_REL_IA64_PCREL60I = $0018; // If possible, convert to MIB bundle with NOP.I in slot 1
- {$EXTERNALSYM IMAGE_REL_IA64_PCREL60I}
- IMAGE_REL_IA64_PCREL60M = $0019; // If possible, convert to MMB bundle with NOP.M in slot 1
- {$EXTERNALSYM IMAGE_REL_IA64_PCREL60M}
- IMAGE_REL_IA64_IMMGPREL64 = $001A;
- {$EXTERNALSYM IMAGE_REL_IA64_IMMGPREL64}
- IMAGE_REL_IA64_TOKEN = $001B; // clr token
- {$EXTERNALSYM IMAGE_REL_IA64_TOKEN}
- IMAGE_REL_IA64_GPREL32 = $001C;
- {$EXTERNALSYM IMAGE_REL_IA64_GPREL32}
- IMAGE_REL_IA64_ADDEND = $001F;
- {$EXTERNALSYM IMAGE_REL_IA64_ADDEND}
-
-//
-// CEF relocation types.
-//
-
- IMAGE_REL_CEF_ABSOLUTE = $0000; // Reference is absolute, no relocation is necessary
- {$EXTERNALSYM IMAGE_REL_CEF_ABSOLUTE}
- IMAGE_REL_CEF_ADDR32 = $0001; // 32-bit address (VA).
- {$EXTERNALSYM IMAGE_REL_CEF_ADDR32}
- IMAGE_REL_CEF_ADDR64 = $0002; // 64-bit address (VA).
- {$EXTERNALSYM IMAGE_REL_CEF_ADDR64}
- IMAGE_REL_CEF_ADDR32NB = $0003; // 32-bit address w/o image base (RVA).
- {$EXTERNALSYM IMAGE_REL_CEF_ADDR32NB}
- IMAGE_REL_CEF_SECTION = $0004; // Section index
- {$EXTERNALSYM IMAGE_REL_CEF_SECTION}
- IMAGE_REL_CEF_SECREL = $0005; // 32 bit offset from base of section containing target
- {$EXTERNALSYM IMAGE_REL_CEF_SECREL}
- IMAGE_REL_CEF_TOKEN = $0006; // 32 bit metadata token
- {$EXTERNALSYM IMAGE_REL_CEF_TOKEN}
-
-//
-// clr relocation types.
-//
-
- IMAGE_REL_CEE_ABSOLUTE = $0000; // Reference is absolute, no relocation is necessary
- {$EXTERNALSYM IMAGE_REL_CEE_ABSOLUTE}
- IMAGE_REL_CEE_ADDR32 = $0001; // 32-bit address (VA).
- {$EXTERNALSYM IMAGE_REL_CEE_ADDR32}
- IMAGE_REL_CEE_ADDR64 = $0002; // 64-bit address (VA).
- {$EXTERNALSYM IMAGE_REL_CEE_ADDR64}
- IMAGE_REL_CEE_ADDR32NB = $0003; // 32-bit address w/o image base (RVA).
- {$EXTERNALSYM IMAGE_REL_CEE_ADDR32NB}
- IMAGE_REL_CEE_SECTION = $0004; // Section index
- {$EXTERNALSYM IMAGE_REL_CEE_SECTION}
- IMAGE_REL_CEE_SECREL = $0005; // 32 bit offset from base of section containing target
- {$EXTERNALSYM IMAGE_REL_CEE_SECREL}
- IMAGE_REL_CEE_TOKEN = $0006; // 32 bit metadata token
- {$EXTERNALSYM IMAGE_REL_CEE_TOKEN}
-
- IMAGE_REL_M32R_ABSOLUTE = $0000; // No relocation required
- {$EXTERNALSYM IMAGE_REL_M32R_ABSOLUTE}
- IMAGE_REL_M32R_ADDR32 = $0001; // 32 bit address
- {$EXTERNALSYM IMAGE_REL_M32R_ADDR32}
- IMAGE_REL_M32R_ADDR32NB = $0002; // 32 bit address w/o image base
- {$EXTERNALSYM IMAGE_REL_M32R_ADDR32NB}
- IMAGE_REL_M32R_ADDR24 = $0003; // 24 bit address
- {$EXTERNALSYM IMAGE_REL_M32R_ADDR24}
- IMAGE_REL_M32R_GPREL16 = $0004; // GP relative addressing
- {$EXTERNALSYM IMAGE_REL_M32R_GPREL16}
- IMAGE_REL_M32R_PCREL24 = $0005; // 24 bit offset << 2 & sign ext.
- {$EXTERNALSYM IMAGE_REL_M32R_PCREL24}
- IMAGE_REL_M32R_PCREL16 = $0006; // 16 bit offset << 2 & sign ext.
- {$EXTERNALSYM IMAGE_REL_M32R_PCREL16}
- IMAGE_REL_M32R_PCREL8 = $0007; // 8 bit offset << 2 & sign ext.
- {$EXTERNALSYM IMAGE_REL_M32R_PCREL8}
- IMAGE_REL_M32R_REFHALF = $0008; // 16 MSBs
- {$EXTERNALSYM IMAGE_REL_M32R_REFHALF}
- IMAGE_REL_M32R_REFHI = $0009; // 16 MSBs; adj for LSB sign ext.
- {$EXTERNALSYM IMAGE_REL_M32R_REFHI}
- IMAGE_REL_M32R_REFLO = $000A; // 16 LSBs
- {$EXTERNALSYM IMAGE_REL_M32R_REFLO}
- IMAGE_REL_M32R_PAIR = $000B; // Link HI and LO
- {$EXTERNALSYM IMAGE_REL_M32R_PAIR}
- IMAGE_REL_M32R_SECTION = $000C; // Section table index
- {$EXTERNALSYM IMAGE_REL_M32R_SECTION}
- IMAGE_REL_M32R_SECREL32 = $000D; // 32 bit section relative reference
- {$EXTERNALSYM IMAGE_REL_M32R_SECREL32}
- IMAGE_REL_M32R_TOKEN = $000E; // clr token
- {$EXTERNALSYM IMAGE_REL_M32R_TOKEN}
-
-// Please contact INTEL to get IA64-specific information
-
-(* TODO
-#define EXT_IMM64(Value, Address, Size, InstPos, ValPos)
- Value |= (((ULONGLONG)((*(Address) >> InstPos) & (((ULONGLONG)1 << Size) - 1))) << ValPos) // Intel-IA64-Filler
-
-#define INS_IMM64(Value, Address, Size, InstPos, ValPos) /* Intel-IA64-Filler */\
- *(PDWORD)Address = (*(PDWORD)Address & ~(((1 << Size) - 1) << InstPos)) | /* Intel-IA64-Filler */\
- ((DWORD)((((ULONGLONG)Value >> ValPos) & (((ULONGLONG)1 << Size) - 1))) << InstPos) // Intel-IA64-Filler
-*)
-
-const
- EMARCH_ENC_I17_IMM7B_INST_WORD_X = 3; // Intel-IA64-Filler
- {$EXTERNALSYM EMARCH_ENC_I17_IMM7B_INST_WORD_X}
- EMARCH_ENC_I17_IMM7B_SIZE_X = 7; // Intel-IA64-Filler
- {$EXTERNALSYM EMARCH_ENC_I17_IMM7B_SIZE_X}
- EMARCH_ENC_I17_IMM7B_INST_WORD_POS_X = 4; // Intel-IA64-Filler
- {$EXTERNALSYM EMARCH_ENC_I17_IMM7B_INST_WORD_POS_X}
- EMARCH_ENC_I17_IMM7B_VAL_POS_X = 0; // Intel-IA64-Filler
- {$EXTERNALSYM EMARCH_ENC_I17_IMM7B_VAL_POS_X}
-
- EMARCH_ENC_I17_IMM9D_INST_WORD_X = 3; // Intel-IA64-Filler
- {$EXTERNALSYM EMARCH_ENC_I17_IMM9D_INST_WORD_X}
- EMARCH_ENC_I17_IMM9D_SIZE_X = 9; // Intel-IA64-Filler
- {$EXTERNALSYM EMARCH_ENC_I17_IMM9D_SIZE_X}
- EMARCH_ENC_I17_IMM9D_INST_WORD_POS_X = 18; // Intel-IA64-Filler
- {$EXTERNALSYM EMARCH_ENC_I17_IMM9D_INST_WORD_POS_X}
- EMARCH_ENC_I17_IMM9D_VAL_POS_X = 7; // Intel-IA64-Filler
- {$EXTERNALSYM EMARCH_ENC_I17_IMM9D_VAL_POS_X}
-
- EMARCH_ENC_I17_IMM5C_INST_WORD_X = 3; // Intel-IA64-Filler
- {$EXTERNALSYM EMARCH_ENC_I17_IMM5C_INST_WORD_X}
- EMARCH_ENC_I17_IMM5C_SIZE_X = 5; // Intel-IA64-Filler
- {$EXTERNALSYM EMARCH_ENC_I17_IMM5C_SIZE_X}
- EMARCH_ENC_I17_IMM5C_INST_WORD_POS_X = 13; // Intel-IA64-Filler
- {$EXTERNALSYM EMARCH_ENC_I17_IMM5C_INST_WORD_POS_X}
- EMARCH_ENC_I17_IMM5C_VAL_POS_X = 16; // Intel-IA64-Filler
- {$EXTERNALSYM EMARCH_ENC_I17_IMM5C_VAL_POS_X}
-
- EMARCH_ENC_I17_IC_INST_WORD_X = 3; // Intel-IA64-Filler
- {$EXTERNALSYM EMARCH_ENC_I17_IC_INST_WORD_X}
- EMARCH_ENC_I17_IC_SIZE_X = 1; // Intel-IA64-Filler
- {$EXTERNALSYM EMARCH_ENC_I17_IC_SIZE_X}
- EMARCH_ENC_I17_IC_INST_WORD_POS_X = 12; // Intel-IA64-Filler
- {$EXTERNALSYM EMARCH_ENC_I17_IC_INST_WORD_POS_X}
- EMARCH_ENC_I17_IC_VAL_POS_X = 21; // Intel-IA64-Filler
- {$EXTERNALSYM EMARCH_ENC_I17_IC_VAL_POS_X}
-
- EMARCH_ENC_I17_IMM41a_INST_WORD_X = 1; // Intel-IA64-Filler
- {$EXTERNALSYM EMARCH_ENC_I17_IMM41a_INST_WORD_X}
- EMARCH_ENC_I17_IMM41a_SIZE_X = 10; // Intel-IA64-Filler
- {$EXTERNALSYM EMARCH_ENC_I17_IMM41a_SIZE_X}
- EMARCH_ENC_I17_IMM41a_INST_WORD_POS_X = 14; // Intel-IA64-Filler
- {$EXTERNALSYM EMARCH_ENC_I17_IMM41a_INST_WORD_POS_X}
- EMARCH_ENC_I17_IMM41a_VAL_POS_X = 22; // Intel-IA64-Filler
- {$EXTERNALSYM EMARCH_ENC_I17_IMM41a_VAL_POS_X}
-
- EMARCH_ENC_I17_IMM41b_INST_WORD_X = 1; // Intel-IA64-Filler
- {$EXTERNALSYM EMARCH_ENC_I17_IMM41b_INST_WORD_X}
- EMARCH_ENC_I17_IMM41b_SIZE_X = 8; // Intel-IA64-Filler
- {$EXTERNALSYM EMARCH_ENC_I17_IMM41b_SIZE_X}
- EMARCH_ENC_I17_IMM41b_INST_WORD_POS_X = 24; // Intel-IA64-Filler
- {$EXTERNALSYM EMARCH_ENC_I17_IMM41b_INST_WORD_POS_X}
- EMARCH_ENC_I17_IMM41b_VAL_POS_X = 32; // Intel-IA64-Filler
- {$EXTERNALSYM EMARCH_ENC_I17_IMM41b_VAL_POS_X}
-
- EMARCH_ENC_I17_IMM41c_INST_WORD_X = 2; // Intel-IA64-Filler
- {$EXTERNALSYM EMARCH_ENC_I17_IMM41c_INST_WORD_X}
- EMARCH_ENC_I17_IMM41c_SIZE_X = 23; // Intel-IA64-Filler
- {$EXTERNALSYM EMARCH_ENC_I17_IMM41c_SIZE_X}
- EMARCH_ENC_I17_IMM41c_INST_WORD_POS_X = 0; // Intel-IA64-Filler
- {$EXTERNALSYM EMARCH_ENC_I17_IMM41c_INST_WORD_POS_X}
- EMARCH_ENC_I17_IMM41c_VAL_POS_X = 40; // Intel-IA64-Filler
- {$EXTERNALSYM EMARCH_ENC_I17_IMM41c_VAL_POS_X}
-
- EMARCH_ENC_I17_SIGN_INST_WORD_X = 3; // Intel-IA64-Filler
- {$EXTERNALSYM EMARCH_ENC_I17_SIGN_INST_WORD_X}
- EMARCH_ENC_I17_SIGN_SIZE_X = 1; // Intel-IA64-Filler
- {$EXTERNALSYM EMARCH_ENC_I17_SIGN_SIZE_X}
- EMARCH_ENC_I17_SIGN_INST_WORD_POS_X = 27; // Intel-IA64-Filler
- {$EXTERNALSYM EMARCH_ENC_I17_SIGN_INST_WORD_POS_X}
- EMARCH_ENC_I17_SIGN_VAL_POS_X = 63; // Intel-IA64-Filler
- {$EXTERNALSYM EMARCH_ENC_I17_SIGN_VAL_POS_X}
-
-//
-// Line number format.
-//
-
-type
- TImgLineNoType = record
- case Integer of
- 0: (SymbolTableIndex: DWORD); // Symbol table index of function name if Linenumber is 0.
- 1: (VirtualAddress: DWORD); // Virtual address of line number.
- end;
-
- PIMAGE_LINENUMBER = ^IMAGE_LINENUMBER;
- {$EXTERNALSYM PIMAGE_LINENUMBER}
- _IMAGE_LINENUMBER = record
- Type_: TImgLineNoType;
- Linenumber: WORD; // Line number.
- end;
- {$EXTERNALSYM _IMAGE_LINENUMBER}
- IMAGE_LINENUMBER = _IMAGE_LINENUMBER;
- {$EXTERNALSYM IMAGE_LINENUMBER}
- TImageLineNumber = IMAGE_LINENUMBER;
- PImageLineNumber = PIMAGE_LINENUMBER;
-
-const
- IMAGE_SIZEOF_LINENUMBER = 6;
- {$EXTERNALSYM IMAGE_SIZEOF_LINENUMBER}
-
-// #include "poppack.h" // Back to 4 byte packing
-
-//
-// Based relocation format.
-//
-
-type
- PIMAGE_BASE_RELOCATION = ^IMAGE_BASE_RELOCATION;
- {$EXTERNALSYM PIMAGE_BASE_RELOCATION}
- _IMAGE_BASE_RELOCATION = record
- VirtualAddress: DWORD;
- SizeOfBlock: DWORD;
- // WORD TypeOffset[1];
- end;
- {$EXTERNALSYM _IMAGE_BASE_RELOCATION}
- IMAGE_BASE_RELOCATION = _IMAGE_BASE_RELOCATION;
- {$EXTERNALSYM IMAGE_BASE_RELOCATION}
- TImageBaseRelocation = IMAGE_BASE_RELOCATION;
- PImageBaseRelocation = PIMAGE_BASE_RELOCATION;
-
-const
- IMAGE_SIZEOF_BASE_RELOCATION = 8;
- {$EXTERNALSYM IMAGE_SIZEOF_BASE_RELOCATION}
-
-//
-// Based relocation types.
-//
-
- IMAGE_REL_BASED_ABSOLUTE = 0;
- {$EXTERNALSYM IMAGE_REL_BASED_ABSOLUTE}
- IMAGE_REL_BASED_HIGH = 1;
- {$EXTERNALSYM IMAGE_REL_BASED_HIGH}
- IMAGE_REL_BASED_LOW = 2;
- {$EXTERNALSYM IMAGE_REL_BASED_LOW}
- IMAGE_REL_BASED_HIGHLOW = 3;
- {$EXTERNALSYM IMAGE_REL_BASED_HIGHLOW}
- IMAGE_REL_BASED_HIGHADJ = 4;
- {$EXTERNALSYM IMAGE_REL_BASED_HIGHADJ}
- IMAGE_REL_BASED_MIPS_JMPADDR = 5;
- {$EXTERNALSYM IMAGE_REL_BASED_MIPS_JMPADDR}
-
- IMAGE_REL_BASED_MIPS_JMPADDR16 = 9;
- {$EXTERNALSYM IMAGE_REL_BASED_MIPS_JMPADDR16}
- IMAGE_REL_BASED_IA64_IMM64 = 9;
- {$EXTERNALSYM IMAGE_REL_BASED_IA64_IMM64}
- IMAGE_REL_BASED_DIR64 = 10;
- {$EXTERNALSYM IMAGE_REL_BASED_DIR64}
-
-//
-// Archive format.
-//
-
- IMAGE_ARCHIVE_START_SIZE = 8;
- {$EXTERNALSYM IMAGE_ARCHIVE_START_SIZE}
- IMAGE_ARCHIVE_START = '!<arch>'#10;
- {$EXTERNALSYM IMAGE_ARCHIVE_START}
- IMAGE_ARCHIVE_END = '`'#10;
- {$EXTERNALSYM IMAGE_ARCHIVE_END}
- IMAGE_ARCHIVE_PAD = #10;
- {$EXTERNALSYM IMAGE_ARCHIVE_PAD}
- IMAGE_ARCHIVE_LINKER_MEMBER = '/ ';
- {$EXTERNALSYM IMAGE_ARCHIVE_LINKER_MEMBER}
- IMAGE_ARCHIVE_LONGNAMES_MEMBER = '// ';
- {$EXTERNALSYM IMAGE_ARCHIVE_LONGNAMES_MEMBER}
-
-type
- PIMAGE_ARCHIVE_MEMBER_HEADER = ^IMAGE_ARCHIVE_MEMBER_HEADER;
- {$EXTERNALSYM PIMAGE_ARCHIVE_MEMBER_HEADER}
- _IMAGE_ARCHIVE_MEMBER_HEADER = record
- Name: array [0..15] of Byte; // File member name - `/' terminated.
- Date: array [0..11] of Byte; // File member date - decimal.
- UserID: array [0..5] of Byte; // File member user id - decimal.
- GroupID: array [0..5] of Byte; // File member group id - decimal.
- Mode: array [0..7] of Byte; // File member mode - octal.
- Size: array [0..9] of Byte; // File member size - decimal.
- EndHeader: array [0..1] of Byte; // String to end header.
- end;
- {$EXTERNALSYM _IMAGE_ARCHIVE_MEMBER_HEADER}
- IMAGE_ARCHIVE_MEMBER_HEADER = _IMAGE_ARCHIVE_MEMBER_HEADER;
- {$EXTERNALSYM IMAGE_ARCHIVE_MEMBER_HEADER}
- TImageArchiveMemberHeader = IMAGE_ARCHIVE_MEMBER_HEADER;
- PImageArchiveMemberHeader = PIMAGE_ARCHIVE_MEMBER_HEADER;
-
-const
- IMAGE_SIZEOF_ARCHIVE_MEMBER_HDR = 60;
- {$EXTERNALSYM IMAGE_SIZEOF_ARCHIVE_MEMBER_HDR}
-
-//
-// DLL support.
-//
-
-//
-// Export Format
-//
-
-type
- PIMAGE_EXPORT_DIRECTORY = ^IMAGE_EXPORT_DIRECTORY;
- {$EXTERNALSYM PIMAGE_EXPORT_DIRECTORY}
- _IMAGE_EXPORT_DIRECTORY = record
- Characteristics: DWORD;
- TimeDateStamp: DWORD;
- MajorVersion: Word;
- MinorVersion: Word;
- Name: DWORD;
- Base: DWORD;
- NumberOfFunctions: DWORD;
- NumberOfNames: DWORD;
- AddressOfFunctions: DWORD; // RVA from base of image
- AddressOfNames: DWORD; // RVA from base of image
- AddressOfNameOrdinals: DWORD; // RVA from base of image
- end;
- {$EXTERNALSYM _IMAGE_EXPORT_DIRECTORY}
- IMAGE_EXPORT_DIRECTORY = _IMAGE_EXPORT_DIRECTORY;
- {$EXTERNALSYM IMAGE_EXPORT_DIRECTORY}
- TImageExportDirectory = IMAGE_EXPORT_DIRECTORY;
- PImageExportDirectory = PIMAGE_EXPORT_DIRECTORY;
-
-//
-// Import Format
-//
-
- PIMAGE_IMPORT_BY_NAME = ^IMAGE_IMPORT_BY_NAME;
- {$EXTERNALSYM PIMAGE_IMPORT_BY_NAME}
- _IMAGE_IMPORT_BY_NAME = record
- Hint: Word;
- Name: array [0..0] of Byte;
- end;
- {$EXTERNALSYM _IMAGE_IMPORT_BY_NAME}
- IMAGE_IMPORT_BY_NAME = _IMAGE_IMPORT_BY_NAME;
- {$EXTERNALSYM IMAGE_IMPORT_BY_NAME}
- TImageImportByName = IMAGE_IMPORT_BY_NAME;
- PImageImportByName = PIMAGE_IMPORT_BY_NAME;
-
-// #include "pshpack8.h" // Use align 8 for the 64-bit IAT.
-
- PIMAGE_THUNK_DATA64 = ^IMAGE_THUNK_DATA64;
- {$EXTERNALSYM PIMAGE_THUNK_DATA64}
- _IMAGE_THUNK_DATA64 = record
- case Integer of
- 0: (ForwarderString: ULONGLONG); // PBYTE
- 1: (Function_: ULONGLONG); // PDWORD
- 2: (Ordinal: ULONGLONG);
- 3: (AddressOfData: ULONGLONG); // PIMAGE_IMPORT_BY_NAME
- end;
- {$EXTERNALSYM _IMAGE_THUNK_DATA64}
- IMAGE_THUNK_DATA64 = _IMAGE_THUNK_DATA64;
- {$EXTERNALSYM IMAGE_THUNK_DATA64}
- TImageThunkData64 = IMAGE_THUNK_DATA64;
- PImageThunkData64 = PIMAGE_THUNK_DATA64;
-
-// #include "poppack.h" // Back to 4 byte packing
-
- PIMAGE_THUNK_DATA32 = ^IMAGE_THUNK_DATA32;
- {$EXTERNALSYM PIMAGE_THUNK_DATA32}
- _IMAGE_THUNK_DATA32 = record
- case Integer of
- 0: (ForwarderString: DWORD); // PBYTE
- 1: (Function_: DWORD); // PDWORD
- 2: (Ordinal: DWORD);
- 3: (AddressOfData: DWORD); // PIMAGE_IMPORT_BY_NAME
- end;
- {$EXTERNALSYM _IMAGE_THUNK_DATA32}
- IMAGE_THUNK_DATA32 = _IMAGE_THUNK_DATA32;
- {$EXTERNALSYM IMAGE_THUNK_DATA32}
- TImageThunkData32 = IMAGE_THUNK_DATA32;
- PImageThunkData32 = PIMAGE_THUNK_DATA32;
-
-const
- IMAGE_ORDINAL_FLAG64 = ULONGLONG($8000000000000000);
- {$EXTERNALSYM IMAGE_ORDINAL_FLAG64}
- IMAGE_ORDINAL_FLAG32 = DWORD($80000000);
- {$EXTERNALSYM IMAGE_ORDINAL_FLAG32}
-
-function IMAGE_ORDINAL64(Ordinal: ULONGLONG): ULONGLONG;
-{$EXTERNALSYM IMAGE_ORDINAL64}
-function IMAGE_ORDINAL32(Ordinal: DWORD): DWORD;
-{$EXTERNALSYM IMAGE_ORDINAL32}
-function IMAGE_SNAP_BY_ORDINAL64(Ordinal: ULONGLONG): Boolean;
-{$EXTERNALSYM IMAGE_SNAP_BY_ORDINAL64}
-function IMAGE_SNAP_BY_ORDINAL32(Ordinal: DWORD): Boolean;
-{$EXTERNALSYM IMAGE_SNAP_BY_ORDINAL32}
-
-//
-// Thread Local Storage
-//
-
-type
- PIMAGE_TLS_CALLBACK = procedure(DllHandle: Pointer; Reason: DWORD; Reserved: Pointer); stdcall;
- {$EXTERNALSYM PIMAGE_TLS_CALLBACK}
- TImageTlsCallback = PIMAGE_TLS_CALLBACK;
-
- PIMAGE_TLS_DIRECTORY64 = ^IMAGE_TLS_DIRECTORY64;
- {$EXTERNALSYM PIMAGE_TLS_DIRECTORY64}
- _IMAGE_TLS_DIRECTORY64 = record
- StartAddressOfRawData: ULONGLONG;
- EndAddressOfRawData: ULONGLONG;
- AddressOfIndex: ULONGLONG; // PDWORD
- AddressOfCallBacks: ULONGLONG; // PIMAGE_TLS_CALLBACK *;
- SizeOfZeroFill: DWORD;
- Characteristics: DWORD;
- end;
- {$EXTERNALSYM _IMAGE_TLS_DIRECTORY64}
- IMAGE_TLS_DIRECTORY64 = _IMAGE_TLS_DIRECTORY64;
- {$EXTERNALSYM IMAGE_TLS_DIRECTORY64}
- TImageTlsDirectory64 = IMAGE_TLS_DIRECTORY64;
- PImageTlsDirectory64 = PIMAGE_TLS_DIRECTORY64;
-
- PIMAGE_TLS_DIRECTORY32 = ^IMAGE_TLS_DIRECTORY32;
- {$EXTERNALSYM PIMAGE_TLS_DIRECTORY32}
- _IMAGE_TLS_DIRECTORY32 = record
- StartAddressOfRawData: DWORD;
- EndAddressOfRawData: DWORD;
- AddressOfIndex: DWORD; // PDWORD
- AddressOfCallBacks: DWORD; // PIMAGE_TLS_CALLBACK *
- SizeOfZeroFill: DWORD;
- Characteristics: DWORD;
- end;
- {$EXTERNALSYM _IMAGE_TLS_DIRECTORY32}
- IMAGE_TLS_DIRECTORY32 = _IMAGE_TLS_DIRECTORY32;
- {$EXTERNALSYM IMAGE_TLS_DIRECTORY32}
- TImageTlsDirectory32 = IMAGE_TLS_DIRECTORY32;
- PImageTlsDirectory32 = PIMAGE_TLS_DIRECTORY32;
-
-const
- IMAGE_ORDINAL_FLAG = IMAGE_ORDINAL_FLAG32;
- {$EXTERNALSYM IMAGE_ORDINAL_FLAG}
-
-function IMAGE_ORDINAL(Ordinal: DWORD): DWORD;
-
-type
- IMAGE_THUNK_DATA = IMAGE_THUNK_DATA32;
- {$EXTERNALSYM IMAGE_THUNK_DATA}
- PIMAGE_THUNK_DATA = PIMAGE_THUNK_DATA32;
- {$EXTERNALSYM PIMAGE_THUNK_DATA}
- TImageThunkData = TImageThunkData32;
- PImageThunkData = PImageThunkData32;
-
-function IMAGE_SNAP_BY_ORDINAL(Ordinal: DWORD): Boolean;
-{$EXTERNALSYM IMAGE_SNAP_BY_ORDINAL}
-
-type
- IMAGE_TLS_DIRECTORY = IMAGE_TLS_DIRECTORY32;
- {$EXTERNALSYM IMAGE_TLS_DIRECTORY}
- PIMAGE_TLS_DIRECTORY = PIMAGE_TLS_DIRECTORY32;
- {$EXTERNALSYM PIMAGE_TLS_DIRECTORY}
- TImageTlsDirectory = TImageTlsDirectory32;
- PImageTlsDirectory = PImageTlsDirectory32;
-
- TIIDUnion = record
- case Integer of
- 0: (Characteristics: DWORD); // 0 for terminating null import descriptor
- 1: (OriginalFirstThunk: DWORD); // RVA to original unbound IAT (PIMAGE_THUNK_DATA)
- end;
-
- PIMAGE_IMPORT_DESCRIPTOR = ^IMAGE_IMPORT_DESCRIPTOR;
- {$EXTERNALSYM PIMAGE_IMPORT_DESCRIPTOR}
- _IMAGE_IMPORT_DESCRIPTOR = record
- Union: TIIDUnion;
- TimeDateStamp: DWORD; // 0 if not bound,
- // -1 if bound, and real date\time stamp
- // in IMAGE_DIRECTORY_ENTRY_BOUND_IMPORT (new BIND)
- // O.W. date/time stamp of DLL bound to (Old BIND)
-
- ForwarderChain: DWORD; // -1 if no forwarders
- Name: DWORD;
- FirstThunk: DWORD; // RVA to IAT (if bound this IAT has actual addresses)
- end;
- {$EXTERNALSYM _IMAGE_IMPORT_DESCRIPTOR}
- IMAGE_IMPORT_DESCRIPTOR = _IMAGE_IMPORT_DESCRIPTOR;
- {$EXTERNALSYM IMAGE_IMPORT_DESCRIPTOR}
- TImageImportDecriptor = IMAGE_IMPORT_DESCRIPTOR;
- PImageImportDecriptor = PIMAGE_IMPORT_DESCRIPTOR;
-
-//
-// New format import descriptors pointed to by DataDirectory[ IMAGE_DIRECTORY_ENTRY_BOUND_IMPORT ]
-//
-
-type
- PIMAGE_BOUND_IMPORT_DESCRIPTOR = ^IMAGE_BOUND_IMPORT_DESCRIPTOR;
- {$EXTERNALSYM PIMAGE_BOUND_IMPORT_DESCRIPTOR}
- _IMAGE_BOUND_IMPORT_DESCRIPTOR = record
- TimeDateStamp: DWORD;
- OffsetModuleName: Word;
- NumberOfModuleForwarderRefs: Word;
- // Array of zero or more IMAGE_BOUND_FORWARDER_REF follows
- end;
- {$EXTERNALSYM _IMAGE_BOUND_IMPORT_DESCRIPTOR}
- IMAGE_BOUND_IMPORT_DESCRIPTOR = _IMAGE_BOUND_IMPORT_DESCRIPTOR;
- {$EXTERNALSYM IMAGE_BOUND_IMPORT_DESCRIPTOR}
- TImageBoundImportDescriptor = IMAGE_BOUND_IMPORT_DESCRIPTOR;
- PImageBoundImportDescriptor = PIMAGE_BOUND_IMPORT_DESCRIPTOR;
-
- PIMAGE_BOUND_FORWARDER_REF = ^IMAGE_BOUND_FORWARDER_REF;
- {$EXTERNALSYM PIMAGE_BOUND_FORWARDER_REF}
- _IMAGE_BOUND_FORWARDER_REF = record
- TimeDateStamp: DWORD;
- OffsetModuleName: Word;
- Reserved: Word;
- end;
- {$EXTERNALSYM _IMAGE_BOUND_FORWARDER_REF}
- IMAGE_BOUND_FORWARDER_REF = _IMAGE_BOUND_FORWARDER_REF;
- {$EXTERNALSYM IMAGE_BOUND_FORWARDER_REF}
- TImageBoundForwarderRef = IMAGE_BOUND_FORWARDER_REF;
- PImageBoundForwarderRef = PIMAGE_BOUND_FORWARDER_REF;
-
-//
-// Resource Format.
-//
-
-//
-// Resource directory consists of two counts, following by a variable length
-// array of directory entries. The first count is the number of entries at
-// beginning of the array that have actual names associated with each entry.
-// The entries are in ascending order, case insensitive strings. The second
-// count is the number of entries that immediately follow the named entries.
-// This second count identifies the number of entries that have 16-bit integer
-// Ids as their name. These entries are also sorted in ascending order.
-//
-// This structure allows fast lookup by either name or number, but for any
-// given resource entry only one form of lookup is supported, not both.
-// This is consistant with the syntax of the .RC file and the .RES file.
-//
-
- PIMAGE_RESOURCE_DIRECTORY = ^IMAGE_RESOURCE_DIRECTORY;
- {$EXTERNALSYM PIMAGE_RESOURCE_DIRECTORY}
- _IMAGE_RESOURCE_DIRECTORY = record
- Characteristics: DWORD;
- TimeDateStamp: DWORD;
- MajorVersion: Word;
- MinorVersion: Word;
- NumberOfNamedEntries: Word;
- NumberOfIdEntries: Word;
- // IMAGE_RESOURCE_DIRECTORY_ENTRY DirectoryEntries[];
- end;
- {$EXTERNALSYM _IMAGE_RESOURCE_DIRECTORY}
- IMAGE_RESOURCE_DIRECTORY = _IMAGE_RESOURCE_DIRECTORY;
- {$EXTERNALSYM IMAGE_RESOURCE_DIRECTORY}
- TImageResourceDirectory = IMAGE_RESOURCE_DIRECTORY;
- PImageResourceDirectory = PIMAGE_RESOURCE_DIRECTORY;
-
-const
- IMAGE_RESOURCE_NAME_IS_STRING = DWORD($80000000);
- {$EXTERNALSYM IMAGE_RESOURCE_NAME_IS_STRING}
- IMAGE_RESOURCE_DATA_IS_DIRECTORY = DWORD($80000000);
- {$EXTERNALSYM IMAGE_RESOURCE_DATA_IS_DIRECTORY}
-
-//
-// Each directory contains the 32-bit Name of the entry and an offset,
-// relative to the beginning of the resource directory of the data associated
-// with this directory entry. If the name of the entry is an actual text
-// string instead of an integer Id, then the high order bit of the name field
-// is set to one and the low order 31-bits are an offset, relative to the
-// beginning of the resource directory of the string, which is of type
-// IMAGE_RESOURCE_DIRECTORY_STRING. Otherwise the high bit is clear and the
-// low-order 16-bits are the integer Id that identify this resource directory
-// entry. If the directory entry is yet another resource directory (i.e. a
-// subdirectory), then the high order bit of the offset field will be
-// set to indicate this. Otherwise the high bit is clear and the offset
-// field points to a resource data entry.
-//
-
-type
- TIRDEName = record
- case Integer of
- 0: (
- NameOffset: DWORD); // 0..30: NameOffset; 31: NameIsString
- 1: (
- Name: DWORD);
- 2: (
- Id: WORD);
- end;
-
- TIRDEDirectory = record
- case Integer of
- 0: (
- OffsetToData: DWORD);
- 1: (
- OffsetToDirectory: DWORD); // 0..30: OffsetToDirectory; 31: DataIsDirectory
- end;
-
- PIMAGE_RESOURCE_DIRECTORY_ENTRY = ^IMAGE_RESOURCE_DIRECTORY_ENTRY;
- {$EXTERNALSYM PIMAGE_RESOURCE_DIRECTORY_ENTRY}
- _IMAGE_RESOURCE_DIRECTORY_ENTRY = record
- Name: TIRDEName;
- Directory: TIRDEDirectory;
- end;
- {$EXTERNALSYM _IMAGE_RESOURCE_DIRECTORY_ENTRY}
- IMAGE_RESOURCE_DIRECTORY_ENTRY = _IMAGE_RESOURCE_DIRECTORY_ENTRY;
- {$EXTERNALSYM IMAGE_RESOURCE_DIRECTORY_ENTRY}
- TImageResourceDirectoryEntry = IMAGE_RESOURCE_DIRECTORY_ENTRY;
- PImageResourceDirectoryEntry = PIMAGE_RESOURCE_DIRECTORY_ENTRY;
-
-//
-// For resource directory entries that have actual string names, the Name
-// field of the directory entry points to an object of the following type.
-// All of these string objects are stored together after the last resource
-// directory entry and before the first resource data object. This minimizes
-// the impact of these variable length objects on the alignment of the fixed
-// size directory entry objects.
-//
-
-type
- PIMAGE_RESOURCE_DIRECTORY_STRING = ^IMAGE_RESOURCE_DIRECTORY_STRING;
- {$EXTERNALSYM PIMAGE_RESOURCE_DIRECTORY_STRING}
- _IMAGE_RESOURCE_DIRECTORY_STRING = record
- Length: Word;
- NameString: array [0..0] of CHAR;
- end;
- {$EXTERNALSYM _IMAGE_RESOURCE_DIRECTORY_STRING}
- IMAGE_RESOURCE_DIRECTORY_STRING = _IMAGE_RESOURCE_DIRECTORY_STRING;
- {$EXTERNALSYM IMAGE_RESOURCE_DIRECTORY_STRING}
- TImageResourceDirectoryString = IMAGE_RESOURCE_DIRECTORY_STRING;
- PImageResourceDirectoryString = PIMAGE_RESOURCE_DIRECTORY_STRING;
-
- PIMAGE_RESOURCE_DIR_STRING_U = ^IMAGE_RESOURCE_DIR_STRING_U;
- {$EXTERNALSYM PIMAGE_RESOURCE_DIR_STRING_U}
- _IMAGE_RESOURCE_DIR_STRING_U = record
- Length: Word;
- NameString: array [0..0] of WCHAR;
- end;
- {$EXTERNALSYM _IMAGE_RESOURCE_DIR_STRING_U}
- IMAGE_RESOURCE_DIR_STRING_U = _IMAGE_RESOURCE_DIR_STRING_U;
- {$EXTERNALSYM IMAGE_RESOURCE_DIR_STRING_U}
- TImageResourceDirStringU = IMAGE_RESOURCE_DIR_STRING_U;
- PImageResourceDirStringU = PIMAGE_RESOURCE_DIR_STRING_U;
-
-//
-// Each resource data entry describes a leaf node in the resource directory
-// tree. It contains an offset, relative to the beginning of the resource
-// directory of the data for the resource, a size field that gives the number
-// of bytes of data at that offset, a CodePage that should be used when
-// decoding code point values within the resource data. Typically for new
-// applications the code page would be the unicode code page.
-//
-
- PIMAGE_RESOURCE_DATA_ENTRY = ^IMAGE_RESOURCE_DATA_ENTRY;
- {$EXTERNALSYM PIMAGE_RESOURCE_DATA_ENTRY}
- _IMAGE_RESOURCE_DATA_ENTRY = record
- OffsetToData: DWORD;
- Size: DWORD;
- CodePage: DWORD;
- Reserved: DWORD;
- end;
- {$EXTERNALSYM _IMAGE_RESOURCE_DATA_ENTRY}
- IMAGE_RESOURCE_DATA_ENTRY = _IMAGE_RESOURCE_DATA_ENTRY;
- {$EXTERNALSYM IMAGE_RESOURCE_DATA_ENTRY}
- TImageResourceDataEntry = IMAGE_RESOURCE_DATA_ENTRY;
- PImageResourceDataEntry = PIMAGE_RESOURCE_DATA_ENTRY;
-
-//
-// Load Configuration Directory Entry
-//
-
-type
- PIMAGE_LOAD_CONFIG_DIRECTORY32 = ^IMAGE_LOAD_CONFIG_DIRECTORY32;
- {$EXTERNALSYM PIMAGE_LOAD_CONFIG_DIRECTORY32}
- IMAGE_LOAD_CONFIG_DIRECTORY32 = record
- Size: DWORD;
- TimeDateStamp: DWORD;
- MajorVersion: WORD;
- MinorVersion: WORD;
- GlobalFlagsClear: DWORD;
- GlobalFlagsSet: DWORD;
- CriticalSectionDefaultTimeout: DWORD;
- DeCommitFreeBlockThreshold: DWORD;
- DeCommitTotalFreeThreshold: DWORD;
- LockPrefixTable: DWORD; // VA
- MaximumAllocationSize: DWORD;
- VirtualMemoryThreshold: DWORD;
- ProcessHeapFlags: DWORD;
- ProcessAffinityMask: DWORD;
- CSDVersion: WORD;
- Reserved1: WORD;
- EditList: DWORD; // VA
- SecurityCookie: DWORD; // VA
- SEHandlerTable: DWORD; // VA
- SEHandlerCount: DWORD;
- end;
- {$EXTERNALSYM IMAGE_LOAD_CONFIG_DIRECTORY32}
- TImageLoadConfigDirectory32 = IMAGE_LOAD_CONFIG_DIRECTORY32;
- PImageLoadConfigDirectory32 = PIMAGE_LOAD_CONFIG_DIRECTORY32;
-
- PIMAGE_LOAD_CONFIG_DIRECTORY64 = ^IMAGE_LOAD_CONFIG_DIRECTORY64;
- {$EXTERNALSYM PIMAGE_LOAD_CONFIG_DIRECTORY64}
- IMAGE_LOAD_CONFIG_DIRECTORY64 = record
- Size: DWORD;
- TimeDateStamp: DWORD;
- MajorVersion: WORD;
- MinorVersion: WORD;
- GlobalFlagsClear: DWORD;
- GlobalFlagsSet: DWORD;
- CriticalSectionDefaultTimeout: DWORD;
- DeCommitFreeBlockThreshold: ULONGLONG;
- DeCommitTotalFreeThreshold: ULONGLONG;
- LockPrefixTable: ULONGLONG; // VA
- MaximumAllocationSize: ULONGLONG;
- VirtualMemoryThreshold: ULONGLONG;
- ProcessAffinityMask: ULONGLONG;
- ProcessHeapFlags: DWORD;
- CSDVersion: WORD;
- Reserved1: WORD;
- EditList: ULONGLONG; // VA
- SecurityCookie: ULONGLONG; // VA
- SEHandlerTable: ULONGLONG; // VA
- SEHandlerCount: ULONGLONG;
- end;
- {$EXTERNALSYM IMAGE_LOAD_CONFIG_DIRECTORY64}
- TImageLoadConfigDirectory64 = IMAGE_LOAD_CONFIG_DIRECTORY64;
- PImageLoadConfigDirectory64 = PIMAGE_LOAD_CONFIG_DIRECTORY64;
-
- IMAGE_LOAD_CONFIG_DIRECTORY = IMAGE_LOAD_CONFIG_DIRECTORY32;
- {$EXTERNALSYM IMAGE_LOAD_CONFIG_DIRECTORY}
- PIMAGE_LOAD_CONFIG_DIRECTORY = PIMAGE_LOAD_CONFIG_DIRECTORY32;
- {$EXTERNALSYM PIMAGE_LOAD_CONFIG_DIRECTORY}
- TImageLoadConfigDirectory = TImageLoadConfigDirectory32;
- PImageLoadConfigDirectory = PImageLoadConfigDirectory32;
-
-//
-// WIN CE Exception table format
-//
-
-//
-// Function table entry format. Function table is pointed to by the
-// IMAGE_DIRECTORY_ENTRY_EXCEPTION directory entry.
-//
-
-type
- PIMAGE_CE_RUNTIME_FUNCTION_ENTRY = ^IMAGE_CE_RUNTIME_FUNCTION_ENTRY;
- {$EXTERNALSYM PIMAGE_CE_RUNTIME_FUNCTION_ENTRY}
- _IMAGE_CE_RUNTIME_FUNCTION_ENTRY = record
- FuncStart: DWORD;
- Flags: DWORD;
- //DWORD PrologLen : 8;
- //DWORD FuncLen : 22;
- //DWORD ThirtyTwoBit : 1;
- //DWORD ExceptionFlag : 1;
- end;
- {$EXTERNALSYM _IMAGE_CE_RUNTIME_FUNCTION_ENTRY}
- IMAGE_CE_RUNTIME_FUNCTION_ENTRY = _IMAGE_CE_RUNTIME_FUNCTION_ENTRY;
- {$EXTERNALSYM IMAGE_CE_RUNTIME_FUNCTION_ENTRY}
- TImageCERuntimeFunctionEntry = IMAGE_CE_RUNTIME_FUNCTION_ENTRY;
- PImageCERuntimeFunctionEntry = PIMAGE_CE_RUNTIME_FUNCTION_ENTRY;
-
-//
-// Debug Format
-//
-
-type
- PIMAGE_DEBUG_DIRECTORY = ^IMAGE_DEBUG_DIRECTORY;
- {$EXTERNALSYM PIMAGE_DEBUG_DIRECTORY}
- _IMAGE_DEBUG_DIRECTORY = record
- Characteristics: DWORD;
- TimeDateStamp: DWORD;
- MajorVersion: Word;
- MinorVersion: Word;
- Type_: DWORD;
- SizeOfData: DWORD;
- AddressOfRawData: DWORD;
- PointerToRawData: DWORD;
- end;
- {$EXTERNALSYM _IMAGE_DEBUG_DIRECTORY}
- IMAGE_DEBUG_DIRECTORY = _IMAGE_DEBUG_DIRECTORY;
- {$EXTERNALSYM IMAGE_DEBUG_DIRECTORY}
- TImageDebugDirectory = IMAGE_DEBUG_DIRECTORY;
- PImageDebugDirectory = PIMAGE_DEBUG_DIRECTORY;
-
-const
- IMAGE_DEBUG_TYPE_UNKNOWN = 0;
- {$EXTERNALSYM IMAGE_DEBUG_TYPE_UNKNOWN}
- IMAGE_DEBUG_TYPE_COFF = 1;
- {$EXTERNALSYM IMAGE_DEBUG_TYPE_COFF}
- IMAGE_DEBUG_TYPE_CODEVIEW = 2;
- {$EXTERNALSYM IMAGE_DEBUG_TYPE_CODEVIEW}
- IMAGE_DEBUG_TYPE_FPO = 3;
- {$EXTERNALSYM IMAGE_DEBUG_TYPE_FPO}
- IMAGE_DEBUG_TYPE_MISC = 4;
- {$EXTERNALSYM IMAGE_DEBUG_TYPE_MISC}
- IMAGE_DEBUG_TYPE_EXCEPTION = 5;
- {$EXTERNALSYM IMAGE_DEBUG_TYPE_EXCEPTION}
- IMAGE_DEBUG_TYPE_FIXUP = 6;
- {$EXTERNALSYM IMAGE_DEBUG_TYPE_FIXUP}
- IMAGE_DEBUG_TYPE_OMAP_TO_SRC = 7;
- {$EXTERNALSYM IMAGE_DEBUG_TYPE_OMAP_TO_SRC}
- IMAGE_DEBUG_TYPE_OMAP_FROM_SRC = 8;
- {$EXTERNALSYM IMAGE_DEBUG_TYPE_OMAP_FROM_SRC}
- IMAGE_DEBUG_TYPE_BORLAND = 9;
- {$EXTERNALSYM IMAGE_DEBUG_TYPE_BORLAND}
- IMAGE_DEBUG_TYPE_RESERVED10 = 10;
- {$EXTERNALSYM IMAGE_DEBUG_TYPE_RESERVED10}
- IMAGE_DEBUG_TYPE_CLSID = 11;
- {$EXTERNALSYM IMAGE_DEBUG_TYPE_CLSID}
-
-type
- PIMAGE_COFF_SYMBOLS_HEADER = ^IMAGE_COFF_SYMBOLS_HEADER;
- {$EXTERNALSYM PIMAGE_COFF_SYMBOLS_HEADER}
- _IMAGE_COFF_SYMBOLS_HEADER = record
- NumberOfSymbols: DWORD;
- LvaToFirstSymbol: DWORD;
- NumberOfLinenumbers: DWORD;
- LvaToFirstLinenumber: DWORD;
- RvaToFirstByteOfCode: DWORD;
- RvaToLastByteOfCode: DWORD;
- RvaToFirstByteOfData: DWORD;
- RvaToLastByteOfData: DWORD;
- end;
- {$EXTERNALSYM _IMAGE_COFF_SYMBOLS_HEADER}
- IMAGE_COFF_SYMBOLS_HEADER = _IMAGE_COFF_SYMBOLS_HEADER;
- {$EXTERNALSYM IMAGE_COFF_SYMBOLS_HEADER}
- TImageCoffSymbolsHeader = IMAGE_COFF_SYMBOLS_HEADER;
- PImageCoffSymbolsHeader = PIMAGE_COFF_SYMBOLS_HEADER;
-
-const
- FRAME_FPO = 0;
- {$EXTERNALSYM FRAME_FPO}
- FRAME_TRAP = 1;
- {$EXTERNALSYM FRAME_TRAP}
- FRAME_TSS = 2;
- {$EXTERNALSYM FRAME_TSS}
- FRAME_NONFPO = 3;
- {$EXTERNALSYM FRAME_NONFPO}
-
- FPOFLAGS_PROLOG = $00FF; // # bytes in prolog
- FPOFLAGS_REGS = $0700; // # regs saved
- FPOFLAGS_HAS_SEH = $0800; // TRUE if SEH in func
- FPOFLAGS_USE_BP = $1000; // TRUE if EBP has been allocated
- FPOFLAGS_RESERVED = $2000; // reserved for future use
- FPOFLAGS_FRAME = $C000; // frame type
-
-type
- PFPO_DATA = ^FPO_DATA;
- {$EXTERNALSYM PFPO_DATA}
- _FPO_DATA = record
- ulOffStart: DWORD; // offset 1st byte of function code
- cbProcSize: DWORD; // # bytes in function
- cdwLocals: DWORD; // # bytes in locals/4
- cdwParams: WORD; // # bytes in params/4
- Flags: WORD;
- end;
- {$EXTERNALSYM _FPO_DATA}
- FPO_DATA = _FPO_DATA;
- {$EXTERNALSYM FPO_DATA}
- TFpoData = FPO_DATA;
- PFpoData = PFPO_DATA;
-
-const
- SIZEOF_RFPO_DATA = 16;
- {$EXTERNALSYM SIZEOF_RFPO_DATA}
-
- IMAGE_DEBUG_MISC_EXENAME = 1;
- {$EXTERNALSYM IMAGE_DEBUG_MISC_EXENAME}
-
-type
- PIMAGE_DEBUG_MISC = ^IMAGE_DEBUG_MISC;
- {$EXTERNALSYM PIMAGE_DEBUG_MISC}
- _IMAGE_DEBUG_MISC = record
- DataType: DWORD; // type of misc data, see defines
- Length: DWORD; // total length of record, rounded to four byte multiple.
- Unicode: ByteBool; // TRUE if data is unicode string
- Reserved: array [0..2] of Byte;
- Data: array [0..0] of Byte; // Actual data
- end;
- {$EXTERNALSYM _IMAGE_DEBUG_MISC}
- IMAGE_DEBUG_MISC = _IMAGE_DEBUG_MISC;
- {$EXTERNALSYM IMAGE_DEBUG_MISC}
- TImageDebugMisc = IMAGE_DEBUG_MISC;
- PImageDebugMisc = PIMAGE_DEBUG_MISC;
-
-//
-// Function table extracted from MIPS/ALPHA/IA64 images. Does not contain
-// information needed only for runtime support. Just those fields for
-// each entry needed by a debugger.
-//
-
- PIMAGE_FUNCTION_ENTRY = ^IMAGE_FUNCTION_ENTRY;
- {$EXTERNALSYM PIMAGE_FUNCTION_ENTRY}
- _IMAGE_FUNCTION_ENTRY = record
- StartingAddress: DWORD;
- EndingAddress: DWORD;
- EndOfPrologue: DWORD;
- end;
- {$EXTERNALSYM _IMAGE_FUNCTION_ENTRY}
- IMAGE_FUNCTION_ENTRY = _IMAGE_FUNCTION_ENTRY;
- {$EXTERNALSYM IMAGE_FUNCTION_ENTRY}
- TImageFunctionEntry = IMAGE_FUNCTION_ENTRY;
- PImageFunctionEntry = PIMAGE_FUNCTION_ENTRY;
-
- PIMAGE_FUNCTION_ENTRY64 = ^IMAGE_FUNCTION_ENTRY64;
- {$EXTERNALSYM PIMAGE_FUNCTION_ENTRY64}
- _IMAGE_FUNCTION_ENTRY64 = record
- StartingAddress: ULONGLONG;
- EndingAddress: ULONGLONG;
- case Integer of
- 0: (EndOfPrologue: ULONGLONG);
- 1: (UnwindInfoAddress: ULONGLONG);
- end;
- {$EXTERNALSYM _IMAGE_FUNCTION_ENTRY64}
- IMAGE_FUNCTION_ENTRY64 = _IMAGE_FUNCTION_ENTRY64;
- {$EXTERNALSYM IMAGE_FUNCTION_ENTRY64}
- TImageFunctionEntry64 = IMAGE_FUNCTION_ENTRY64;
- PImageFunctionEntry64 = PIMAGE_FUNCTION_ENTRY64;
-
-//
-// Debugging information can be stripped from an image file and placed
-// in a separate .DBG file, whose file name part is the same as the
-// image file name part (e.g. symbols for CMD.EXE could be stripped
-// and placed in CMD.DBG). This is indicated by the IMAGE_FILE_DEBUG_STRIPPED
-// flag in the Characteristics field of the file header. The beginning of
-// the .DBG file contains the following structure which captures certain
-// information from the image file. This allows a debug to proceed even if
-// the original image file is not accessable. This header is followed by
-// zero of more IMAGE_SECTION_HEADER structures, followed by zero or more
-// IMAGE_DEBUG_DIRECTORY structures. The latter structures and those in
-// the image file contain file offsets relative to the beginning of the
-// .DBG file.
-//
-// If symbols have been stripped from an image, the IMAGE_DEBUG_MISC structure
-// is left in the image file, but not mapped. This allows a debugger to
-// compute the name of the .DBG file, from the name of the image in the
-// IMAGE_DEBUG_MISC structure.
-//
-
- PIMAGE_SEPARATE_DEBUG_HEADER = ^IMAGE_SEPARATE_DEBUG_HEADER;
- {$EXTERNALSYM PIMAGE_SEPARATE_DEBUG_HEADER}
- _IMAGE_SEPARATE_DEBUG_HEADER = record
- Signature: Word;
- Flags: Word;
- Machine: Word;
- Characteristics: Word;
- TimeDateStamp: DWORD;
- CheckSum: DWORD;
- ImageBase: DWORD;
- SizeOfImage: DWORD;
- NumberOfSections: DWORD;
- ExportedNamesSize: DWORD;
- DebugDirectorySize: DWORD;
- SectionAlignment: DWORD;
- Reserved: array [0..1] of DWORD;
- end;
- {$EXTERNALSYM _IMAGE_SEPARATE_DEBUG_HEADER}
- IMAGE_SEPARATE_DEBUG_HEADER = _IMAGE_SEPARATE_DEBUG_HEADER;
- {$EXTERNALSYM IMAGE_SEPARATE_DEBUG_HEADER}
- TImageSeparateDebugHeader = IMAGE_SEPARATE_DEBUG_HEADER;
- PImageSeparateDebugHeader = PIMAGE_SEPARATE_DEBUG_HEADER;
-
- _NON_PAGED_DEBUG_INFO = record
- Signature: WORD;
- Flags: WORD;
- Size: DWORD;
- Machine: WORD;
- Characteristics: WORD;
- TimeDateStamp: DWORD;
- CheckSum: DWORD;
- SizeOfImage: DWORD;
- ImageBase: ULONGLONG;
- //DebugDirectorySize
- //IMAGE_DEBUG_DIRECTORY
- end;
- {$EXTERNALSYM _NON_PAGED_DEBUG_INFO}
- NON_PAGED_DEBUG_INFO = _NON_PAGED_DEBUG_INFO;
- {$EXTERNALSYM NON_PAGED_DEBUG_INFO}
- PNON_PAGED_DEBUG_INFO = ^NON_PAGED_DEBUG_INFO;
- {$EXTERNALSYM PNON_PAGED_DEBUG_INFO}
-
-const
- IMAGE_SEPARATE_DEBUG_SIGNATURE = $4944;
- {$EXTERNALSYM IMAGE_SEPARATE_DEBUG_SIGNATURE}
- NON_PAGED_DEBUG_SIGNATURE = $494E;
- {$EXTERNALSYM NON_PAGED_DEBUG_SIGNATURE}
-
- IMAGE_SEPARATE_DEBUG_FLAGS_MASK = $8000;
- {$EXTERNALSYM IMAGE_SEPARATE_DEBUG_FLAGS_MASK}
- IMAGE_SEPARATE_DEBUG_MISMATCH = $8000; // when DBG was updated, the old checksum didn't match.
- {$EXTERNALSYM IMAGE_SEPARATE_DEBUG_MISMATCH}
-
-//
-// The .arch section is made up of headers, each describing an amask position/value
-// pointing to an array of IMAGE_ARCHITECTURE_ENTRY's. Each "array" (both the header
-// and entry arrays) are terminiated by a quadword of 0xffffffffL.
-//
-// NOTE: There may be quadwords of 0 sprinkled around and must be skipped.
-//
-
-const
- IAHMASK_VALUE = $00000001; // 1 -> code section depends on mask bit
- // 0 -> new instruction depends on mask bit
- IAHMASK_MBZ7 = $000000FE; // MBZ
- IAHMASK_SHIFT = $0000FF00; // Amask bit in question for this fixup
- IAHMASK_MBZ16 = DWORD($FFFF0000); // MBZ
-
-type
- PIMAGE_ARCHITECTURE_HEADER = ^IMAGE_ARCHITECTURE_HEADER;
- {$EXTERNALSYM PIMAGE_ARCHITECTURE_HEADER}
- _ImageArchitectureHeader = record
- Mask: DWORD;
- FirstEntryRVA: DWORD; // RVA into .arch section to array of ARCHITECTURE_ENTRY's
- end;
- {$EXTERNALSYM _ImageArchitectureHeader}
- IMAGE_ARCHITECTURE_HEADER = _ImageArchitectureHeader;
- {$EXTERNALSYM IMAGE_ARCHITECTURE_HEADER}
- TImageArchitectureHeader = IMAGE_ARCHITECTURE_HEADER;
- PImageArchitectureHeader = PIMAGE_ARCHITECTURE_HEADER;
-
- PIMAGE_ARCHITECTURE_ENTRY = ^IMAGE_ARCHITECTURE_ENTRY;
- {$EXTERNALSYM PIMAGE_ARCHITECTURE_ENTRY}
- _ImageArchitectureEntry = record
- FixupInstRVA: DWORD; // RVA of instruction to fixup
- NewInst: DWORD; // fixup instruction (see alphaops.h)
- end;
- {$EXTERNALSYM _ImageArchitectureEntry}
- IMAGE_ARCHITECTURE_ENTRY = _ImageArchitectureEntry;
- {$EXTERNALSYM IMAGE_ARCHITECTURE_ENTRY}
- TImageArchitectureEntry = IMAGE_ARCHITECTURE_ENTRY;
- PImageArchitectureEntry = PIMAGE_ARCHITECTURE_ENTRY;
-
-// #include "poppack.h" // Back to the initial value
-
-// The following structure defines the new import object. Note the values of the first two fields,
-// which must be set as stated in order to differentiate old and new import members.
-// Following this structure, the linker emits two null-terminated strings used to recreate the
-// import at the time of use. The first string is the import's name, the second is the dll's name.
-
-const
- IMPORT_OBJECT_HDR_SIG2 = $ffff;
- {$EXTERNALSYM IMPORT_OBJECT_HDR_SIG2}
-
-const
- IOHFLAGS_TYPE = $0003; // IMPORT_TYPE
- IAHFLAGS_NAMETYPE = $001C; // IMPORT_NAME_TYPE
- IAHFLAGS_RESERVED = $FFE0; // Reserved. Must be zero.
-
-type
- PImportObjectHeader = ^IMPORT_OBJECT_HEADER;
- IMPORT_OBJECT_HEADER = record
- Sig1: WORD; // Must be IMAGE_FILE_MACHINE_UNKNOWN
- Sig2: WORD; // Must be IMPORT_OBJECT_HDR_SIG2.
- Version: WORD;
- Machine: WORD;
- TimeDateStamp: DWORD; // Time/date stamp
- SizeOfData: DWORD; // particularly useful for incremental links
- OrdinalOrHint: record
- case Integer of
- 0: (Ordinal: WORD); // if grf & IMPORT_OBJECT_ORDINAL
- 1: (Flags: DWORD);
- end;
- Flags: WORD;
- //WORD Type : 2; // IMPORT_TYPE
- //WORD NameType : 3; // IMPORT_NAME_TYPE
- //WORD Reserved : 11; // Reserved. Must be zero.
- end;
- {$EXTERNALSYM IMPORT_OBJECT_HEADER}
- TImportObjectHeader = IMPORT_OBJECT_HEADER;
-
- IMPORT_OBJECT_TYPE = (IMPORT_OBJECT_CODE, IMPORT_OBJECT_DATA, IMPORT_OBJECT_CONST);
- {$EXTERNALSYM IMPORT_OBJECT_TYPE}
- TImportObjectType = IMPORT_OBJECT_TYPE;
-
- IMPORT_OBJECT_NAME_TYPE = (
- IMPORT_OBJECT_ORDINAL, // Import by ordinal
- IMPORT_OBJECT_NAME, // Import name == public symbol name.
- IMPORT_OBJECT_NAME_NO_PREFIX, // Import name == public symbol name skipping leading ?, @, or optionally _.
- IMPORT_OBJECT_NAME_UNDECORATE); // Import name == public symbol name skipping leading ?, @, or optionally _
- // and truncating at first @
- {$EXTERNALSYM IMPORT_OBJECT_NAME_TYPE}
- TImportObjectNameType = IMPORT_OBJECT_NAME_TYPE;
-
- ReplacesCorHdrNumericDefines = DWORD;
- {$EXTERNALSYM ReplacesCorHdrNumericDefines}
-
-const
-
-// COM+ Header entry point flags.
-
- COMIMAGE_FLAGS_ILONLY = $00000001;
- {$EXTERNALSYM COMIMAGE_FLAGS_ILONLY}
- COMIMAGE_FLAGS_32BITREQUIRED = $00000002;
- {$EXTERNALSYM COMIMAGE_FLAGS_32BITREQUIRED}
- COMIMAGE_FLAGS_IL_LIBRARY = $00000004;
- {$EXTERNALSYM COMIMAGE_FLAGS_IL_LIBRARY}
- COMIMAGE_FLAGS_STRONGNAMESIGNED = $00000008;
- {$EXTERNALSYM COMIMAGE_FLAGS_STRONGNAMESIGNED}
- COMIMAGE_FLAGS_TRACKDEBUGDATA = $00010000;
- {$EXTERNALSYM COMIMAGE_FLAGS_TRACKDEBUGDATA}
-
-// Version flags for image.
-
- COR_VERSION_MAJOR_V2 = 2;
- {$EXTERNALSYM COR_VERSION_MAJOR_V2}
- COR_VERSION_MAJOR = COR_VERSION_MAJOR_V2;
- {$EXTERNALSYM COR_VERSION_MAJOR}
- COR_VERSION_MINOR = 0;
- {$EXTERNALSYM COR_VERSION_MINOR}
- COR_DELETED_NAME_LENGTH = 8;
- {$EXTERNALSYM COR_DELETED_NAME_LENGTH}
- COR_VTABLEGAP_NAME_LENGTH = 8;
- {$EXTERNALSYM COR_VTABLEGAP_NAME_LENGTH}
-
-// Maximum size of a NativeType descriptor.
-
- NATIVE_TYPE_MAX_CB = 1;
- {$EXTERNALSYM NATIVE_TYPE_MAX_CB}
- COR_ILMETHOD_SECT_SMALL_MAX_DATASIZE= $FF;
- {$EXTERNALSYM COR_ILMETHOD_SECT_SMALL_MAX_DATASIZE}
-
-// #defines for the MIH FLAGS
-
- IMAGE_COR_MIH_METHODRVA = $01;
- {$EXTERNALSYM IMAGE_COR_MIH_METHODRVA}
- IMAGE_COR_MIH_EHRVA = $02;
- {$EXTERNALSYM IMAGE_COR_MIH_EHRVA}
- IMAGE_COR_MIH_BASICBLOCK = $08;
- {$EXTERNALSYM IMAGE_COR_MIH_BASICBLOCK}
-
-// V-table constants
-
- COR_VTABLE_32BIT = $01; // V-table slots are 32-bits in size.
- {$EXTERNALSYM COR_VTABLE_32BIT}
- COR_VTABLE_64BIT = $02; // V-table slots are 64-bits in size.
- {$EXTERNALSYM COR_VTABLE_64BIT}
- COR_VTABLE_FROM_UNMANAGED = $04; // If set, transition from unmanaged.
- {$EXTERNALSYM COR_VTABLE_FROM_UNMANAGED}
- COR_VTABLE_CALL_MOST_DERIVED = $10; // Call most derived method described by
- {$EXTERNALSYM COR_VTABLE_CALL_MOST_DERIVED}
-
-// EATJ constants
-
- IMAGE_COR_EATJ_THUNK_SIZE = 32; // Size of a jump thunk reserved range.
- {$EXTERNALSYM IMAGE_COR_EATJ_THUNK_SIZE}
-
-// Max name lengths
-// Change to unlimited name lengths.
-
- MAX_CLASS_NAME = 1024;
- {$EXTERNALSYM MAX_CLASS_NAME}
- MAX_PACKAGE_NAME = 1024;
- {$EXTERNALSYM MAX_PACKAGE_NAME}
-
-// COM+ 2.0 header structure.
-
-type
- IMAGE_COR20_HEADER = record
-
- // Header versioning
-
- cb: DWORD;
- MajorRuntimeVersion: WORD;
- MinorRuntimeVersion: WORD;
-
- // Symbol table and startup information
-
- MetaData: IMAGE_DATA_DIRECTORY;
- Flags: DWORD;
- EntryPointToken: DWORD;
-
- // Binding information
-
- Resources: IMAGE_DATA_DIRECTORY;
- StrongNameSignature: IMAGE_DATA_DIRECTORY;
-
- // Regular fixup and binding information
-
- CodeManagerTable: IMAGE_DATA_DIRECTORY;
- VTableFixups: IMAGE_DATA_DIRECTORY;
- ExportAddressTableJumps: IMAGE_DATA_DIRECTORY;
-
- // Precompiled image info (internal use only - set to zero)
-
- ManagedNativeHeader: IMAGE_DATA_DIRECTORY;
- end;
- {$EXTERNALSYM IMAGE_COR20_HEADER}
- PIMAGE_COR20_HEADER = ^IMAGE_COR20_HEADER;
- {$EXTERNALSYM PIMAGE_COR20_HEADER}
- TImageCor20Header = IMAGE_COR20_HEADER;
- PImageCor20Header = PIMAGE_COR20_HEADER;
-
-//
-// End Image Format
-//
-
-type
- SLIST_ENTRY = SINGLE_LIST_ENTRY;
- {$EXTERNALSYM SLIST_ENTRY}
- _SLIST_ENTRY = _SINGLE_LIST_ENTRY;
- {$EXTERNALSYM _SLIST_ENTRY}
- PSLIST_ENTRY = PSINGLE_LIST_ENTRY;
- {$EXTERNALSYM PSLIST_ENTRY}
- TSListEntry = SLIST_ENTRY;
- PSListEntry = PSLIST_ENTRY;
-
-type
- _SLIST_HEADER = record
- case Integer of
- 0: (
- Alignment: ULONGLONG);
- 1: (
- Next: SLIST_ENTRY;
- Depth: WORD;
- Sequence: WORD);
- end;
- {$EXTERNALSYM _SLIST_HEADER}
- SLIST_HEADER = _SLIST_HEADER;
- {$EXTERNALSYM SLIST_HEADER}
- PSLIST_HEADER = ^SLIST_HEADER;
- {$EXTERNALSYM PSLIST_HEADER}
- TSListHeader = SLIST_HEADER;
- PSListHeader = PSLIST_HEADER;
-
-procedure RtlInitializeSListHead(ListHead: PSLIST_HEADER); stdcall;
-{$EXTERNALSYM RtlInitializeSListHead}
-function RtlFirstEntrySList(ListHead: PSLIST_HEADER): PSLIST_ENTRY; stdcall;
-{$EXTERNALSYM RtlFirstEntrySList}
-function RtlInterlockedPopEntrySList(ListHead: PSLIST_HEADER): PSLIST_ENTRY; stdcall;
-{$EXTERNALSYM RtlInterlockedPopEntrySList}
-function RtlInterlockedPushEntrySList(ListHead, ListEntry: PSLIST_HEADER): PSLIST_ENTRY; stdcall;
-{$EXTERNALSYM RtlInterlockedPushEntrySList}
-function RtlInterlockedFlushSList(ListHead: PSLIST_HEADER): PSLIST_ENTRY; stdcall;
-{$EXTERNALSYM RtlInterlockedFlushSList}
-function RtlQueryDepthSList(ListHead: PSLIST_HEADER): WORD; stdcall;
-{$EXTERNALSYM RtlQueryDepthSList}
-
-const
- HEAP_NO_SERIALIZE = $00000001;
- {$EXTERNALSYM HEAP_NO_SERIALIZE}
- HEAP_GROWABLE = $00000002;
- {$EXTERNALSYM HEAP_GROWABLE}
- HEAP_GENERATE_EXCEPTIONS = $00000004;
- {$EXTERNALSYM HEAP_GENERATE_EXCEPTIONS}
- HEAP_ZERO_MEMORY = $00000008;
- {$EXTERNALSYM HEAP_ZERO_MEMORY}
- HEAP_REALLOC_IN_PLACE_ONLY = $00000010;
- {$EXTERNALSYM HEAP_REALLOC_IN_PLACE_ONLY}
- HEAP_TAIL_CHECKING_ENABLED = $00000020;
- {$EXTERNALSYM HEAP_TAIL_CHECKING_ENABLED}
- HEAP_FREE_CHECKING_ENABLED = $00000040;
- {$EXTERNALSYM HEAP_FREE_CHECKING_ENABLED}
- HEAP_DISABLE_COALESCE_ON_FREE = $00000080;
- {$EXTERNALSYM HEAP_DISABLE_COALESCE_ON_FREE}
- HEAP_CREATE_ALIGN_16 = $00010000;
- {$EXTERNALSYM HEAP_CREATE_ALIGN_16}
- HEAP_CREATE_ENABLE_TRACING = $00020000;
- {$EXTERNALSYM HEAP_CREATE_ENABLE_TRACING}
- HEAP_MAXIMUM_TAG = $0FFF;
- {$EXTERNALSYM HEAP_MAXIMUM_TAG}
- HEAP_PSEUDO_TAG_FLAG = $8000;
- {$EXTERNALSYM HEAP_PSEUDO_TAG_FLAG}
- HEAP_TAG_SHIFT = 18;
- {$EXTERNALSYM HEAP_TAG_SHIFT}
-
-function HEAP_MAKE_TAG_FLAGS(b, o: DWORD): DWORD;
-{$EXTERNALSYM HEAP_MAKE_TAG_FLAGS}
-
-procedure RtlCaptureContext(ContextRecord: PCONTEXT); stdcall;
-{$EXTERNALSYM RtlCaptureContext}
-
-const
- IS_TEXT_UNICODE_ASCII16 = $0001;
- {$EXTERNALSYM IS_TEXT_UNICODE_ASCII16}
- IS_TEXT_UNICODE_REVERSE_ASCII16 = $0010;
- {$EXTERNALSYM IS_TEXT_UNICODE_REVERSE_ASCII16}
-
- IS_TEXT_UNICODE_STATISTICS = $0002;
- {$EXTERNALSYM IS_TEXT_UNICODE_STATISTICS}
- IS_TEXT_UNICODE_REVERSE_STATISTICS = $0020;
- {$EXTERNALSYM IS_TEXT_UNICODE_REVERSE_STATISTICS}
-
- IS_TEXT_UNICODE_CONTROLS = $0004;
- {$EXTERNALSYM IS_TEXT_UNICODE_CONTROLS}
- IS_TEXT_UNICODE_REVERSE_CONTROLS = $0040;
- {$EXTERNALSYM IS_TEXT_UNICODE_REVERSE_CONTROLS}
-
- IS_TEXT_UNICODE_SIGNATURE = $0008;
- {$EXTERNALSYM IS_TEXT_UNICODE_SIGNATURE}
- IS_TEXT_UNICODE_REVERSE_SIGNATURE = $0080;
- {$EXTERNALSYM IS_TEXT_UNICODE_REVERSE_SIGNATURE}
-
- IS_TEXT_UNICODE_ILLEGAL_CHARS = $0100;
- {$EXTERNALSYM IS_TEXT_UNICODE_ILLEGAL_CHARS}
- IS_TEXT_UNICODE_ODD_LENGTH = $0200;
- {$EXTERNALSYM IS_TEXT_UNICODE_ODD_LENGTH}
- IS_TEXT_UNICODE_DBCS_LEADBYTE = $0400;
- {$EXTERNALSYM IS_TEXT_UNICODE_DBCS_LEADBYTE}
- IS_TEXT_UNICODE_NULL_BYTES = $1000;
- {$EXTERNALSYM IS_TEXT_UNICODE_NULL_BYTES}
-
- IS_TEXT_UNICODE_UNICODE_MASK = $000F;
- {$EXTERNALSYM IS_TEXT_UNICODE_UNICODE_MASK}
- IS_TEXT_UNICODE_REVERSE_MASK = $00F0;
- {$EXTERNALSYM IS_TEXT_UNICODE_REVERSE_MASK}
- IS_TEXT_UNICODE_NOT_UNICODE_MASK = $0F00;
- {$EXTERNALSYM IS_TEXT_UNICODE_NOT_UNICODE_MASK}
- IS_TEXT_UNICODE_NOT_ASCII_MASK = $F000;
- {$EXTERNALSYM IS_TEXT_UNICODE_NOT_ASCII_MASK}
-
- COMPRESSION_FORMAT_NONE = $0000;
- {$EXTERNALSYM COMPRESSION_FORMAT_NONE}
- COMPRESSION_FORMAT_DEFAULT = $0001;
- {$EXTERNALSYM COMPRESSION_FORMAT_DEFAULT}
- COMPRESSION_FORMAT_LZNT1 = $0002;
- {$EXTERNALSYM COMPRESSION_FORMAT_LZNT1}
- COMPRESSION_ENGINE_STANDARD = $0000;
- {$EXTERNALSYM COMPRESSION_ENGINE_STANDARD}
- COMPRESSION_ENGINE_MAXIMUM = $0100;
- {$EXTERNALSYM COMPRESSION_ENGINE_MAXIMUM}
- COMPRESSION_ENGINE_HIBER = $0200;
- {$EXTERNALSYM COMPRESSION_ENGINE_HIBER}
-
-function RtlCompareMemory(const Source1, Source2: Pointer; Length: SIZE_T): SIZE_T; stdcall;
-{$EXTERNALSYM RtlCompareMemory}
-
-type
- PMESSAGE_RESOURCE_ENTRY = ^MESSAGE_RESOURCE_ENTRY;
- {$EXTERNALSYM PMESSAGE_RESOURCE_ENTRY}
- _MESSAGE_RESOURCE_ENTRY = record
- Length: Word;
- Flags: Word;
- Text: array [0..0] of Byte;
- end;
- {$EXTERNALSYM _MESSAGE_RESOURCE_ENTRY}
- MESSAGE_RESOURCE_ENTRY = _MESSAGE_RESOURCE_ENTRY;
- {$EXTERNALSYM MESSAGE_RESOURCE_ENTRY}
- TMessageResourceEntry = MESSAGE_RESOURCE_ENTRY;
- PMessageResourceEntry = PMESSAGE_RESOURCE_ENTRY;
-
-const
- MESSAGE_RESOURCE_UNICODE = $0001;
- {$EXTERNALSYM MESSAGE_RESOURCE_UNICODE}
-
-type
- PMESSAGE_RESOURCE_BLOCK = ^MESSAGE_RESOURCE_BLOCK;
- {$EXTERNALSYM PMESSAGE_RESOURCE_BLOCK}
- _MESSAGE_RESOURCE_BLOCK = record
- LowId: DWORD;
- HighId: DWORD;
- OffsetToEntries: DWORD;
- end;
- {$EXTERNALSYM _MESSAGE_RESOURCE_BLOCK}
- MESSAGE_RESOURCE_BLOCK = _MESSAGE_RESOURCE_BLOCK;
- {$EXTERNALSYM MESSAGE_RESOURCE_BLOCK}
- TMessageResourceBlock = MESSAGE_RESOURCE_BLOCK;
- PMessageResourceBlock = PMESSAGE_RESOURCE_BLOCK;
-
- PMESSAGE_RESOURCE_DATA = ^MESSAGE_RESOURCE_DATA;
- {$EXTERNALSYM PMESSAGE_RESOURCE_DATA}
- _MESSAGE_RESOURCE_DATA = record
- NumberOfBlocks: DWORD;
- Blocks: array [0..0] of MESSAGE_RESOURCE_BLOCK;
- end;
- {$EXTERNALSYM _MESSAGE_RESOURCE_DATA}
- MESSAGE_RESOURCE_DATA = _MESSAGE_RESOURCE_DATA;
- {$EXTERNALSYM MESSAGE_RESOURCE_DATA}
- TMessageResourceData = MESSAGE_RESOURCE_DATA;
- PMessageResourceData = PMESSAGE_RESOURCE_DATA;
-
- LPOSVERSIONINFOA = ^OSVERSIONINFOA;
- {$EXTERNALSYM LPOSVERSIONINFOA}
- _OSVERSIONINFOA = record
- dwOSVersionInfoSize: DWORD;
- dwMajorVersion: DWORD;
- dwMinorVersion: DWORD;
- dwBuildNumber: DWORD;
- dwPlatformId: DWORD;
- szCSDVersion: array [0..127] of CHAR; // Maintenance string for PSS usage
- end;
- {$EXTERNALSYM _OSVERSIONINFOA}
- OSVERSIONINFOA = _OSVERSIONINFOA;
- {$EXTERNALSYM OSVERSIONINFOA}
- TOsVersionInfoA = OSVERSIONINFOA;
- POsVersionInfoA = LPOSVERSIONINFOA;
-
- LPOSVERSIONINFOW = ^OSVERSIONINFOW;
- {$EXTERNALSYM LPOSVERSIONINFOW}
- _OSVERSIONINFOW = record
- dwOSVersionInfoSize: DWORD;
- dwMajorVersion: DWORD;
- dwMinorVersion: DWORD;
- dwBuildNumber: DWORD;
- dwPlatformId: DWORD;
- szCSDVersion: array [0..127] of WCHAR; // Maintenance string for PSS usage
- end;
- {$EXTERNALSYM _OSVERSIONINFOW}
- OSVERSIONINFOW = _OSVERSIONINFOW;
- {$EXTERNALSYM OSVERSIONINFOW}
- TOsVersionInfoW = OSVERSIONINFOW;
- POsVersionInfoW = LPOSVERSIONINFOW;
-
- {$IFDEF UNICODE}
- OSVERSIONINFO = OSVERSIONINFOW;
- {$EXTERNALSYM OSVERSIONINFO}
- POSVERSIONINFO = POSVERSIONINFOW;
- {$EXTERNALSYM POSVERSIONINFO}
- LPOSVERSIONINFO = LPOSVERSIONINFOW;
- {$EXTERNALSYM LPOSVERSIONINFO}
- TOSVersionInfo = TOSVersionInfoW;
- {$ELSE}
- OSVERSIONINFO = OSVERSIONINFOA;
- {$EXTERNALSYM OSVERSIONINFO}
- POSVERSIONINFO = POSVERSIONINFOA;
- {$EXTERNALSYM POSVERSIONINFO}
- LPOSVERSIONINFO = LPOSVERSIONINFOA;
- {$EXTERNALSYM LPOSVERSIONINFO}
- TOSVersionInfo = TOSVersionInfoA;
- {$ENDIF UNICODE}
-
-type
- POSVERSIONINFOEXA = ^OSVERSIONINFOEXA;
- {$EXTERNALSYM POSVERSIONINFOEXA}
- _OSVERSIONINFOEXA = record
- dwOSVersionInfoSize: DWORD;
- dwMajorVersion: DWORD;
- dwMinorVersion: DWORD;
- dwBuildNumber: DWORD;
- dwPlatformId: DWORD;
- szCSDVersion: array [0..127] of CHAR; // Maintenance string for PSS usage
- wServicePackMajor: WORD;
- wServicePackMinor: WORD;
- wSuiteMask: WORD;
- wProductType: BYTE;
- wReserved: BYTE;
- end;
- {$EXTERNALSYM _OSVERSIONINFOEXA}
- OSVERSIONINFOEXA = _OSVERSIONINFOEXA;
- {$EXTERNALSYM OSVERSIONINFOEXA}
- LPOSVERSIONINFOEXA = ^OSVERSIONINFOEXA;
- {$EXTERNALSYM LPOSVERSIONINFOEXA}
- TOSVersionInfoExA = _OSVERSIONINFOEXA;
-
- POSVERSIONINFOEXW = ^OSVERSIONINFOEXW;
- {$EXTERNALSYM POSVERSIONINFOEXW}
- _OSVERSIONINFOEXW = record
- dwOSVersionInfoSize: DWORD;
- dwMajorVersion: DWORD;
- dwMinorVersion: DWORD;
- dwBuildNumber: DWORD;
- dwPlatformId: DWORD;
- szCSDVersion: array [0..127] of WCHAR; // Maintenance string for PSS usage
- wServicePackMajor: WORD;
- wServicePackMinor: WORD;
- wSuiteMask: WORD;
- wProductType: BYTE;
- wReserved: BYTE;
- end;
- {$EXTERNALSYM _OSVERSIONINFOEXW}
- OSVERSIONINFOEXW = _OSVERSIONINFOEXW;
- {$EXTERNALSYM OSVERSIONINFOEXW}
- LPOSVERSIONINFOEXW = ^OSVERSIONINFOEXW;
- {$EXTERNALSYM LPOSVERSIONINFOEXW}
- RTL_OSVERSIONINFOEXW = _OSVERSIONINFOEXW;
- {$EXTERNALSYM RTL_OSVERSIONINFOEXW}
- PRTL_OSVERSIONINFOEXW = ^RTL_OSVERSIONINFOEXW;
- {$EXTERNALSYM PRTL_OSVERSIONINFOEXW}
- TOSVersionInfoExW = _OSVERSIONINFOEXW;
-
- {$IFDEF UNICODE}
- OSVERSIONINFOEX = OSVERSIONINFOEXW;
- {$EXTERNALSYM OSVERSIONINFOEX}
- POSVERSIONINFOEX = POSVERSIONINFOEXW;
- {$EXTERNALSYM POSVERSIONINFOEX}
- LPOSVERSIONINFOEX = LPOSVERSIONINFOEXW;
- {$EXTERNALSYM LPOSVERSIONINFOEX}
- TOSVersionInfoEx = TOSVersionInfoExW;
- {$ELSE}
- OSVERSIONINFOEX = OSVERSIONINFOEXA;
- {$EXTERNALSYM OSVERSIONINFOEX}
- POSVERSIONINFOEX = POSVERSIONINFOEXA;
- {$EXTERNALSYM POSVERSIONINFOEX}
- LPOSVERSIONINFOEX = LPOSVERSIONINFOEXA;
- {$EXTERNALSYM LPOSVERSIONINFOEX}
- TOSVersionInfoEx = TOSVersionInfoExA;
- {$ENDIF UNICODE}
-
-//
-// RtlVerifyVersionInfo() conditions
-//
-
-const
- VER_EQUAL = 1;
- {$EXTERNALSYM VER_EQUAL}
- VER_GREATER = 2;
- {$EXTERNALSYM VER_GREATER}
- VER_GREATER_EQUAL = 3;
- {$EXTERNALSYM VER_GREATER_EQUAL}
- VER_LESS = 4;
- {$EXTERNALSYM VER_LESS}
- VER_LESS_EQUAL = 5;
- {$EXTERNALSYM VER_LESS_EQUAL}
- VER_AND = 6;
- {$EXTERNALSYM VER_AND}
- VER_OR = 7;
- {$EXTERNALSYM VER_OR}
-
- VER_CONDITION_MASK = 7;
- {$EXTERNALSYM VER_CONDITION_MASK}
- VER_NUM_BITS_PER_CONDITION_MASK = 3;
- {$EXTERNALSYM VER_NUM_BITS_PER_CONDITION_MASK}
-
-//
-// RtlVerifyVersionInfo() type mask bits
-//
-
- VER_MINORVERSION = $0000001;
- {$EXTERNALSYM VER_MINORVERSION}
- VER_MAJORVERSION = $0000002;
- {$EXTERNALSYM VER_MAJORVERSION}
- VER_BUILDNUMBER = $0000004;
- {$EXTERNALSYM VER_BUILDNUMBER}
- VER_PLATFORMID = $0000008;
- {$EXTERNALSYM VER_PLATFORMID}
- VER_SERVICEPACKMINOR = $0000010;
- {$EXTERNALSYM VER_SERVICEPACKMINOR}
- VER_SERVICEPACKMAJOR = $0000020;
- {$EXTERNALSYM VER_SERVICEPACKMAJOR}
- VER_SUITENAME = $0000040;
- {$EXTERNALSYM VER_SUITENAME}
- VER_PRODUCT_TYPE = $0000080;
- {$EXTERNALSYM VER_PRODUCT_TYPE}
-
-//
-// RtlVerifyVersionInfo() os product type values
-//
-
- VER_NT_WORKSTATION = $0000001;
- {$EXTERNALSYM VER_NT_WORKSTATION}
- VER_NT_DOMAIN_CONTROLLER = $0000002;
- {$EXTERNALSYM VER_NT_DOMAIN_CONTROLLER}
- VER_NT_SERVER = $0000003;
- {$EXTERNALSYM VER_NT_SERVER}
-
-//
-// dwPlatformId defines:
-//
-
- VER_PLATFORM_WIN32s = 0;
- {$EXTERNALSYM VER_PLATFORM_WIN32s}
- VER_PLATFORM_WIN32_WINDOWS = 1;
- {$EXTERNALSYM VER_PLATFORM_WIN32_WINDOWS}
- VER_PLATFORM_WIN32_NT = 2;
- {$EXTERNALSYM VER_PLATFORM_WIN32_NT}
-
-//
-//
-// VerifyVersionInfo() macro to set the condition mask
-//
-// For documentation sakes here's the old version of the macro that got
-// changed to call an API
-// #define VER_SET_CONDITION(_m_,_t_,_c_) _m_=(_m_|(_c_<<(1<<_t_)))
-//
-
-procedure VER_SET_CONDITION(var Mask: DWORDLONG; TypeBitmask, ConditionMask: ULONG);
-{$EXTERNALSYM VER_SET_CONDITION}
-
-function VerSetConditionMask(ConditionMask: ULONGLONG; TypeMask: DWORD;
- Condition: BYTE): ULONGLONG; stdcall;
-{$EXTERNALSYM VerSetConditionMask}
-
-type
- PRTL_CRITICAL_SECTION_DEBUG = ^RTL_CRITICAL_SECTION_DEBUG;
- {$EXTERNALSYM PRTL_CRITICAL_SECTION_DEBUG}
- _RTL_CRITICAL_SECTION_DEBUG = record
- _Type: WORD;
- CreatorBackTraceIndex: WORD;
- CriticalSection: PRTL_CRITICAL_SECTION_DEBUG;
- ProcessLocksList: LIST_ENTRY;
- EntryCount: DWORD;
- ContentionCount: DWORD;
- Spare: array [0..1] of DWORD;
- end;
- {$EXTERNALSYM _RTL_CRITICAL_SECTION_DEBUG}
- RTL_CRITICAL_SECTION_DEBUG = _RTL_CRITICAL_SECTION_DEBUG;
- {$EXTERNALSYM RTL_CRITICAL_SECTION_DEBUG}
- TRtlCriticalSectionDebug = RTL_CRITICAL_SECTION_DEBUG;
- PRtlCriticalSectionDebug = PRTL_CRITICAL_SECTION_DEBUG;
- RTL_RESOURCE_DEBUG = _RTL_CRITICAL_SECTION_DEBUG;
- {$EXTERNALSYM RTL_RESOURCE_DEBUG}
- PRTL_RESOURCE_DEBUG = RTL_RESOURCE_DEBUG;
- {$EXTERNALSYM PRTL_RESOURCE_DEBUG}
- TRtlResourceDebug = RTL_CRITICAL_SECTION_DEBUG;
- PRtlResourceDebug = PRTL_CRITICAL_SECTION_DEBUG;
-
-const
- RTL_CRITSECT_TYPE = 0;
- {$EXTERNALSYM RTL_CRITSECT_TYPE}
- RTL_RESOURCE_TYPE = 1;
- {$EXTERNALSYM RTL_RESOURCE_TYPE}
-
-type
- PRTL_CRITICAL_SECTION = ^RTL_CRITICAL_SECTION;
- {$EXTERNALSYM PRTL_CRITICAL_SECTION}
- _RTL_CRITICAL_SECTION = record
- DebugInfo: PRTL_CRITICAL_SECTION_DEBUG;
-
- //
- // The following three fields control entering and exiting the critical
- // section for the resource
- //
-
- LockCount: LONG;
- RecursionCount: LONG;
- OwningThread: HANDLE; // from the thread's ClientId->UniqueThread
- LockSemaphore: HANDLE;
- SpinCount: ULONG_PTR; // force size on 64-bit systems when packed
- end;
- {$EXTERNALSYM _RTL_CRITICAL_SECTION}
- RTL_CRITICAL_SECTION = _RTL_CRITICAL_SECTION;
- {$EXTERNALSYM RTL_CRITICAL_SECTION}
- TRtlCriticalSection = RTL_CRITICAL_SECTION;
- PRtlCriticalSection = PRTL_CRITICAL_SECTION;
-
- RTL_VERIFIER_DLL_LOAD_CALLBACK = procedure(DllName: PWSTR; DllBase: PVOID; DllSize: SIZE_T;
- Reserved: PVOID); stdcall;
- {$EXTERNALSYM RTL_VERIFIER_DLL_LOAD_CALLBACK}
-
- RTL_VERIFIER_DLL_UNLOAD_CALLBACK = procedure(DllName: PWSTR; DllBase: PVOID; DllSize: SIZE_T;
- Reserved: PVOID); stdcall;
- {$EXTERNALSYM RTL_VERIFIER_DLL_UNLOAD_CALLBACK}
-
- RTL_VERIFIER_NTDLLHEAPFREE_CALLBACK = procedure(AllocationBase: PVOID; AllocationSize: SIZE_T); stdcall;
- {$EXTERNALSYM RTL_VERIFIER_NTDLLHEAPFREE_CALLBACK}
-
- PRTL_VERIFIER_THUNK_DESCRIPTOR = ^RTL_VERIFIER_THUNK_DESCRIPTOR;
- {$EXTERNALSYM PRTL_VERIFIER_THUNK_DESCRIPTOR}
- _RTL_VERIFIER_THUNK_DESCRIPTOR = record
- ThunkName: PCHAR;
- ThunkOldAddress: PVOID;
- ThunkNewAddress: PVOID;
- end;
- {$EXTERNALSYM _RTL_VERIFIER_THUNK_DESCRIPTOR}
- RTL_VERIFIER_THUNK_DESCRIPTOR = _RTL_VERIFIER_THUNK_DESCRIPTOR;
- {$EXTERNALSYM RTL_VERIFIER_THUNK_DESCRIPTOR}
- TRtlVerifierThunkDescriptor = RTL_VERIFIER_THUNK_DESCRIPTOR;
- PRtlVerifierThunkDescriptor = PRTL_VERIFIER_THUNK_DESCRIPTOR;
-
- PRTL_VERIFIER_DLL_DESCRIPTOR = ^RTL_VERIFIER_DLL_DESCRIPTOR;
- {$EXTERNALSYM PRTL_VERIFIER_DLL_DESCRIPTOR}
- _RTL_VERIFIER_DLL_DESCRIPTOR = record
- DllName: PWCHAR;
- DllFlags: DWORD;
- DllAddress: PVOID;
- DllThunks: PRTL_VERIFIER_THUNK_DESCRIPTOR;
- end;
- {$EXTERNALSYM _RTL_VERIFIER_DLL_DESCRIPTOR}
- RTL_VERIFIER_DLL_DESCRIPTOR = _RTL_VERIFIER_DLL_DESCRIPTOR;
- {$EXTERNALSYM RTL_VERIFIER_DLL_DESCRIPTOR}
- TRtlVerifierDllDescriptor = RTL_VERIFIER_DLL_DESCRIPTOR;
- PRtlVerifierDllDescriptor = PRTL_VERIFIER_DLL_DESCRIPTOR;
-
- PRTL_VERIFIER_PROVIDER_DESCRIPTOR = ^RTL_VERIFIER_PROVIDER_DESCRIPTOR;
- {$EXTERNALSYM PRTL_VERIFIER_PROVIDER_DESCRIPTOR}
- _RTL_VERIFIER_PROVIDER_DESCRIPTOR = record
- //
- // Filled by verifier provider DLL
- //
- Length: DWORD;
- ProviderDlls: PRTL_VERIFIER_DLL_DESCRIPTOR;
- ProviderDllLoadCallback: RTL_VERIFIER_DLL_LOAD_CALLBACK;
- ProviderDllUnloadCallback: RTL_VERIFIER_DLL_UNLOAD_CALLBACK;
- //
- // Filled by verifier engine
- //
- VerifierImage: PWSTR;
- VerifierFlags: DWORD;
- VerifierDebug: DWORD;
-
- RtlpGetStackTraceAddress: PVOID;
- RtlpDebugPageHeapCreate: PVOID;
- RtlpDebugPageHeapDestroy: PVOID;
-
- //
- // Filled by verifier provider DLL
- //
-
- ProviderNtdllHeapFreeCallback: RTL_VERIFIER_NTDLLHEAPFREE_CALLBACK;
- end;
- {$EXTERNALSYM _RTL_VERIFIER_PROVIDER_DESCRIPTOR}
- RTL_VERIFIER_PROVIDER_DESCRIPTOR = _RTL_VERIFIER_PROVIDER_DESCRIPTOR;
- {$EXTERNALSYM RTL_VERIFIER_PROVIDER_DESCRIPTOR}
- TRtlVerifierProviderDescriptor = RTL_VERIFIER_PROVIDER_DESCRIPTOR;
- PRtlVerifierProviderDescriptor = PRTL_VERIFIER_PROVIDER_DESCRIPTOR;
-
-//
-// Application verifier standard flags
-//
-
-const
- RTL_VRF_FLG_FULL_PAGE_HEAP = $00000001;
- {$EXTERNALSYM RTL_VRF_FLG_FULL_PAGE_HEAP}
- RTL_VRF_FLG_RESERVED_DONOTUSE = $00000002; // old RTL_VRF_FLG_LOCK_CHECKS
- {$EXTERNALSYM RTL_VRF_FLG_RESERVED_DONOTUSE}
- RTL_VRF_FLG_HANDLE_CHECKS = $00000004;
- {$EXTERNALSYM RTL_VRF_FLG_HANDLE_CHECKS}
- RTL_VRF_FLG_STACK_CHECKS = $00000008;
- {$EXTERNALSYM RTL_VRF_FLG_STACK_CHECKS}
- RTL_VRF_FLG_APPCOMPAT_CHECKS = $00000010;
- {$EXTERNALSYM RTL_VRF_FLG_APPCOMPAT_CHECKS}
- RTL_VRF_FLG_TLS_CHECKS = $00000020;
- {$EXTERNALSYM RTL_VRF_FLG_TLS_CHECKS}
- RTL_VRF_FLG_DIRTY_STACKS = $00000040;
- {$EXTERNALSYM RTL_VRF_FLG_DIRTY_STACKS}
- RTL_VRF_FLG_RPC_CHECKS = $00000080;
- {$EXTERNALSYM RTL_VRF_FLG_RPC_CHECKS}
- RTL_VRF_FLG_COM_CHECKS = $00000100;
- {$EXTERNALSYM RTL_VRF_FLG_COM_CHECKS}
- RTL_VRF_FLG_DANGEROUS_APIS = $00000200;
- {$EXTERNALSYM RTL_VRF_FLG_DANGEROUS_APIS}
- RTL_VRF_FLG_RACE_CHECKS = $00000400;
- {$EXTERNALSYM RTL_VRF_FLG_RACE_CHECKS}
- RTL_VRF_FLG_DEADLOCK_CHECKS = $00000800;
- {$EXTERNALSYM RTL_VRF_FLG_DEADLOCK_CHECKS}
- RTL_VRF_FLG_FIRST_CHANCE_EXCEPTION_CHECKS = $00001000;
- {$EXTERNALSYM RTL_VRF_FLG_FIRST_CHANCE_EXCEPTION_CHECKS}
- RTL_VRF_FLG_VIRTUAL_MEM_CHECKS = $00002000;
- {$EXTERNALSYM RTL_VRF_FLG_VIRTUAL_MEM_CHECKS}
- RTL_VRF_FLG_ENABLE_LOGGING = $00004000;
- {$EXTERNALSYM RTL_VRF_FLG_ENABLE_LOGGING}
- RTL_VRF_FLG_FAST_FILL_HEAP = $00008000;
- {$EXTERNALSYM RTL_VRF_FLG_FAST_FILL_HEAP}
- RTL_VRF_FLG_VIRTUAL_SPACE_TRACKING = $00010000;
- {$EXTERNALSYM RTL_VRF_FLG_VIRTUAL_SPACE_TRACKING}
- RTL_VRF_FLG_ENABLED_SYSTEM_WIDE = $00020000;
- {$EXTERNALSYM RTL_VRF_FLG_ENABLED_SYSTEM_WIDE}
- RTL_VRF_FLG_MISCELLANEOUS_CHECKS = $00020000;
- {$EXTERNALSYM RTL_VRF_FLG_MISCELLANEOUS_CHECKS}
- RTL_VRF_FLG_LOCK_CHECKS = $00040000;
- {$EXTERNALSYM RTL_VRF_FLG_LOCK_CHECKS}
-
-//
-// Application verifier standard stop codes
-//
-
- APPLICATION_VERIFIER_INTERNAL_ERROR = DWORD($80000000);
- {$EXTERNALSYM APPLICATION_VERIFIER_INTERNAL_ERROR}
- APPLICATION_VERIFIER_INTERNAL_WARNING = $40000000;
- {$EXTERNALSYM APPLICATION_VERIFIER_INTERNAL_WARNING}
- APPLICATION_VERIFIER_NO_BREAK = $20000000;
- {$EXTERNALSYM APPLICATION_VERIFIER_NO_BREAK}
- APPLICATION_VERIFIER_CONTINUABLE_BREAK = $10000000;
- {$EXTERNALSYM APPLICATION_VERIFIER_CONTINUABLE_BREAK}
-
- APPLICATION_VERIFIER_UNKNOWN_ERROR = $0001;
- {$EXTERNALSYM APPLICATION_VERIFIER_UNKNOWN_ERROR}
- APPLICATION_VERIFIER_ACCESS_VIOLATION = $0002;
- {$EXTERNALSYM APPLICATION_VERIFIER_ACCESS_VIOLATION}
- APPLICATION_VERIFIER_UNSYNCHRONIZED_ACCESS = $0003;
- {$EXTERNALSYM APPLICATION_VERIFIER_UNSYNCHRONIZED_ACCESS}
- APPLICATION_VERIFIER_EXTREME_SIZE_REQUEST = $0004;
- {$EXTERNALSYM APPLICATION_VERIFIER_EXTREME_SIZE_REQUEST}
- APPLICATION_VERIFIER_BAD_HEAP_HANDLE = $0005;
- {$EXTERNALSYM APPLICATION_VERIFIER_BAD_HEAP_HANDLE}
- APPLICATION_VERIFIER_SWITCHED_HEAP_HANDLE = $0006;
- {$EXTERNALSYM APPLICATION_VERIFIER_SWITCHED_HEAP_HANDLE}
- APPLICATION_VERIFIER_DOUBLE_FREE = $0007;
- {$EXTERNALSYM APPLICATION_VERIFIER_DOUBLE_FREE}
- APPLICATION_VERIFIER_CORRUPTED_HEAP_BLOCK = $0008;
- {$EXTERNALSYM APPLICATION_VERIFIER_CORRUPTED_HEAP_BLOCK}
- APPLICATION_VERIFIER_DESTROY_PROCESS_HEAP = $0009;
- {$EXTERNALSYM APPLICATION_VERIFIER_DESTROY_PROCESS_HEAP}
- APPLICATION_VERIFIER_UNEXPECTED_EXCEPTION = $000A;
- {$EXTERNALSYM APPLICATION_VERIFIER_UNEXPECTED_EXCEPTION}
- APPLICATION_VERIFIER_STACK_OVERFLOW = $000B;
- {$EXTERNALSYM APPLICATION_VERIFIER_STACK_OVERFLOW}
-
- APPLICATION_VERIFIER_TERMINATE_THREAD_CALL = $0100;
- {$EXTERNALSYM APPLICATION_VERIFIER_TERMINATE_THREAD_CALL}
- APPLICATION_VERIFIER_INVALID_EXIT_PROCESS_CALL = $0101;
- {$EXTERNALSYM APPLICATION_VERIFIER_INVALID_EXIT_PROCESS_CALL}
-
- APPLICATION_VERIFIER_EXIT_THREAD_OWNS_LOCK = $0200;
- {$EXTERNALSYM APPLICATION_VERIFIER_EXIT_THREAD_OWNS_LOCK}
- APPLICATION_VERIFIER_LOCK_IN_UNLOADED_DLL = $0201;
- {$EXTERNALSYM APPLICATION_VERIFIER_LOCK_IN_UNLOADED_DLL}
- APPLICATION_VERIFIER_LOCK_IN_FREED_HEAP = $0202;
- {$EXTERNALSYM APPLICATION_VERIFIER_LOCK_IN_FREED_HEAP}
- APPLICATION_VERIFIER_LOCK_DOUBLE_INITIALIZE = $0203;
- {$EXTERNALSYM APPLICATION_VERIFIER_LOCK_DOUBLE_INITIALIZE}
- APPLICATION_VERIFIER_LOCK_IN_FREED_MEMORY = $0204;
- {$EXTERNALSYM APPLICATION_VERIFIER_LOCK_IN_FREED_MEMORY}
- APPLICATION_VERIFIER_LOCK_CORRUPTED = $0205;
- {$EXTERNALSYM APPLICATION_VERIFIER_LOCK_CORRUPTED}
- APPLICATION_VERIFIER_LOCK_INVALID_OWNER = $0206;
- {$EXTERNALSYM APPLICATION_VERIFIER_LOCK_INVALID_OWNER}
- APPLICATION_VERIFIER_LOCK_INVALID_RECURSION_COUNT = $0207;
- {$EXTERNALSYM APPLICATION_VERIFIER_LOCK_INVALID_RECURSION_COUNT}
- APPLICATION_VERIFIER_LOCK_INVALID_LOCK_COUNT = $0208;
- {$EXTERNALSYM APPLICATION_VERIFIER_LOCK_INVALID_LOCK_COUNT}
- APPLICATION_VERIFIER_LOCK_OVER_RELEASED = $0209;
- {$EXTERNALSYM APPLICATION_VERIFIER_LOCK_OVER_RELEASED}
- APPLICATION_VERIFIER_LOCK_NOT_INITIALIZED = $0210;
- {$EXTERNALSYM APPLICATION_VERIFIER_LOCK_NOT_INITIALIZED}
- APPLICATION_VERIFIER_LOCK_ALREADY_INITIALIZED = $0211;
- {$EXTERNALSYM APPLICATION_VERIFIER_LOCK_ALREADY_INITIALIZED}
-
- APPLICATION_VERIFIER_INVALID_HANDLE = $0300;
- {$EXTERNALSYM APPLICATION_VERIFIER_INVALID_HANDLE}
- APPLICATION_VERIFIER_INVALID_TLS_VALUE = $0301;
- {$EXTERNALSYM APPLICATION_VERIFIER_INVALID_TLS_VALUE}
- APPLICATION_VERIFIER_INCORRECT_WAIT_CALL = $0302;
- {$EXTERNALSYM APPLICATION_VERIFIER_INCORRECT_WAIT_CALL}
- APPLICATION_VERIFIER_NULL_HANDLE = $0303;
- {$EXTERNALSYM APPLICATION_VERIFIER_NULL_HANDLE}
- APPLICATION_VERIFIER_WAIT_IN_DLLMAIN = $0304;
- {$EXTERNALSYM APPLICATION_VERIFIER_WAIT_IN_DLLMAIN}
-
- APPLICATION_VERIFIER_COM_ERROR = $0400;
- {$EXTERNALSYM APPLICATION_VERIFIER_COM_ERROR}
- APPLICATION_VERIFIER_COM_API_IN_DLLMAIN = $0401;
- {$EXTERNALSYM APPLICATION_VERIFIER_COM_API_IN_DLLMAIN}
- APPLICATION_VERIFIER_COM_UNHANDLED_EXCEPTION = $0402;
- {$EXTERNALSYM APPLICATION_VERIFIER_COM_UNHANDLED_EXCEPTION}
- APPLICATION_VERIFIER_COM_UNBALANCED_COINIT = $0403;
- {$EXTERNALSYM APPLICATION_VERIFIER_COM_UNBALANCED_COINIT}
- APPLICATION_VERIFIER_COM_UNBALANCED_OLEINIT = $0404;
- {$EXTERNALSYM APPLICATION_VERIFIER_COM_UNBALANCED_OLEINIT}
- APPLICATION_VERIFIER_COM_UNBALANCED_SWC = $0405;
- {$EXTERNALSYM APPLICATION_VERIFIER_COM_UNBALANCED_SWC}
- APPLICATION_VERIFIER_COM_NULL_DACL = $0406;
- {$EXTERNALSYM APPLICATION_VERIFIER_COM_NULL_DACL}
- APPLICATION_VERIFIER_COM_UNSAFE_IMPERSONATION = $0407;
- {$EXTERNALSYM APPLICATION_VERIFIER_COM_UNSAFE_IMPERSONATION}
- APPLICATION_VERIFIER_COM_SMUGGLED_WRAPPER = $0408;
- {$EXTERNALSYM APPLICATION_VERIFIER_COM_SMUGGLED_WRAPPER}
- APPLICATION_VERIFIER_COM_SMUGGLED_PROXY = $0409;
- {$EXTERNALSYM APPLICATION_VERIFIER_COM_SMUGGLED_PROXY}
- APPLICATION_VERIFIER_COM_CF_SUCCESS_WITH_NULL = $040A;
- {$EXTERNALSYM APPLICATION_VERIFIER_COM_CF_SUCCESS_WITH_NULL}
- APPLICATION_VERIFIER_COM_GCO_SUCCESS_WITH_NULL = $040B;
- {$EXTERNALSYM APPLICATION_VERIFIER_COM_GCO_SUCCESS_WITH_NULL}
- APPLICATION_VERIFIER_COM_OBJECT_IN_FREED_MEMORY = $040C;
- {$EXTERNALSYM APPLICATION_VERIFIER_COM_OBJECT_IN_FREED_MEMORY}
- APPLICATION_VERIFIER_COM_OBJECT_IN_UNLOADED_DLL = $040D;
- {$EXTERNALSYM APPLICATION_VERIFIER_COM_OBJECT_IN_UNLOADED_DLL}
- APPLICATION_VERIFIER_COM_VTBL_IN_FREED_MEMORY = $040E;
- {$EXTERNALSYM APPLICATION_VERIFIER_COM_VTBL_IN_FREED_MEMORY}
- APPLICATION_VERIFIER_COM_VTBL_IN_UNLOADED_DLL = $040F;
- {$EXTERNALSYM APPLICATION_VERIFIER_COM_VTBL_IN_UNLOADED_DLL}
- APPLICATION_VERIFIER_COM_HOLDING_LOCKS_ON_CALL = $0410;
- {$EXTERNALSYM APPLICATION_VERIFIER_COM_HOLDING_LOCKS_ON_CALL}
-
- APPLICATION_VERIFIER_RPC_ERROR = $0500;
- {$EXTERNALSYM APPLICATION_VERIFIER_RPC_ERROR}
-
- APPLICATION_VERIFIER_INVALID_FREEMEM = $0600;
- {$EXTERNALSYM APPLICATION_VERIFIER_INVALID_FREEMEM}
- APPLICATION_VERIFIER_INVALID_ALLOCMEM = $0601;
- {$EXTERNALSYM APPLICATION_VERIFIER_INVALID_ALLOCMEM}
- APPLICATION_VERIFIER_INVALID_MAPVIEW = $0602;
- {$EXTERNALSYM APPLICATION_VERIFIER_INVALID_MAPVIEW}
- APPLICATION_VERIFIER_PROBE_INVALID_ADDRESS = $0603;
- {$EXTERNALSYM APPLICATION_VERIFIER_PROBE_INVALID_ADDRESS}
- APPLICATION_VERIFIER_PROBE_FREE_MEM = $0604;
- {$EXTERNALSYM APPLICATION_VERIFIER_PROBE_FREE_MEM}
- APPLICATION_VERIFIER_PROBE_GUARD_PAGE = $0605;
- {$EXTERNALSYM APPLICATION_VERIFIER_PROBE_GUARD_PAGE}
- APPLICATION_VERIFIER_PROBE_NULL = $0606;
- {$EXTERNALSYM APPLICATION_VERIFIER_PROBE_NULL}
- APPLICATION_VERIFIER_PROBE_INVALID_START_OR_SIZE = $0607;
- {$EXTERNALSYM APPLICATION_VERIFIER_PROBE_INVALID_START_OR_SIZE}
-
-(* TODO
-#define VERIFIER_STOP(Code, Msg, P1, S1, P2, S2, P3, S3, P4, S4) { \
- RtlApplicationVerifierStop ((Code), \
- (Msg), \
- (ULONG_PTR)(P1),(S1), \
- (ULONG_PTR)(P2),(S2), \
- (ULONG_PTR)(P3),(S3), \
- (ULONG_PTR)(P4),(S4)); \
- }
-
-VOID NTAPI
-RtlApplicationVerifierStop (
- ULONG_PTR Code,
- PCHAR Message,
- ULONG_PTR Param1, PCHAR Description1,
- ULONG_PTR Param2, PCHAR Description2,
- ULONG_PTR Param3, PCHAR Description3,
- ULONG_PTR Param4, PCHAR Description4
- );
-*)
-
-type
- PVECTORED_EXCEPTION_HANDLER = function(ExceptionInfo: PEXCEPTION_POINTERS): LONG; stdcall;
- {$EXTERNALSYM PVECTORED_EXCEPTION_HANDLER}
- PVectoredExceptionHandler = PVECTORED_EXCEPTION_HANDLER;
-
-const
- SEF_DACL_AUTO_INHERIT = $01;
- {$EXTERNALSYM SEF_DACL_AUTO_INHERIT}
- SEF_SACL_AUTO_INHERIT = $02;
- {$EXTERNALSYM SEF_SACL_AUTO_INHERIT}
- SEF_DEFAULT_DESCRIPTOR_FOR_OBJECT = $04;
- {$EXTERNALSYM SEF_DEFAULT_DESCRIPTOR_FOR_OBJECT}
- SEF_AVOID_PRIVILEGE_CHECK = $08;
- {$EXTERNALSYM SEF_AVOID_PRIVILEGE_CHECK}
- SEF_AVOID_OWNER_CHECK = $10;
- {$EXTERNALSYM SEF_AVOID_OWNER_CHECK}
- SEF_DEFAULT_OWNER_FROM_PARENT = $20;
- {$EXTERNALSYM SEF_DEFAULT_OWNER_FROM_PARENT}
- SEF_DEFAULT_GROUP_FROM_PARENT = $40;
- {$EXTERNALSYM SEF_DEFAULT_GROUP_FROM_PARENT}
-
-type
- _HEAP_INFORMATION_CLASS = (HeapCompatibilityInformation);
- {$EXTERNALSYM _HEAP_INFORMATION_CLASS}
- HEAP_INFORMATION_CLASS = _HEAP_INFORMATION_CLASS;
- {$EXTERNALSYM HEAP_INFORMATION_CLASS}
- THeapInformationClass = HEAP_INFORMATION_CLASS;
-
-{ TODO
-DWORD NTAPI
-RtlSetHeapInformation (
- IN PVOID HeapHandle,
- IN HEAP_INFORMATION_CLASS HeapInformationClass,
- IN PVOID HeapInformation OPTIONAL,
- IN SIZE_T HeapInformationLength OPTIONAL
- );
-
-DWORD NTAPI
-RtlQueryHeapInformation (
- IN PVOID HeapHandle,
- IN HEAP_INFORMATION_CLASS HeapInformationClass,
- OUT PVOID HeapInformation OPTIONAL,
- IN SIZE_T HeapInformationLength OPTIONAL,
- OUT PSIZE_T ReturnLength OPTIONAL
- );
-
-//
-// Multiple alloc-free APIS
-//
-
-DWORD
-NTAPI
-RtlMultipleAllocateHeap (
- IN PVOID HeapHandle,
- IN DWORD Flags,
- IN SIZE_T Size,
- IN DWORD Count,
- OUT PVOID * Array
- );
-
-DWORD
-NTAPI
-RtlMultipleFreeHeap (
- IN PVOID HeapHandle,
- IN DWORD Flags,
- IN DWORD Count,
- OUT PVOID * Array
- );
-}
-
-const
- WT_EXECUTEDEFAULT = $00000000;
- {$EXTERNALSYM WT_EXECUTEDEFAULT}
- WT_EXECUTEINIOTHREAD = $00000001;
- {$EXTERNALSYM WT_EXECUTEINIOTHREAD}
- WT_EXECUTEINUITHREAD = $00000002;
- {$EXTERNALSYM WT_EXECUTEINUITHREAD}
- WT_EXECUTEINWAITTHREAD = $00000004;
- {$EXTERNALSYM WT_EXECUTEINWAITTHREAD}
- WT_EXECUTEONLYONCE = $00000008;
- {$EXTERNALSYM WT_EXECUTEONLYONCE}
- WT_EXECUTEINTIMERTHREAD = $00000020;
- {$EXTERNALSYM WT_EXECUTEINTIMERTHREAD}
- WT_EXECUTELONGFUNCTION = $00000010;
- {$EXTERNALSYM WT_EXECUTELONGFUNCTION}
- WT_EXECUTEINPERSISTENTIOTHREAD = $00000040;
- {$EXTERNALSYM WT_EXECUTEINPERSISTENTIOTHREAD}
- WT_EXECUTEINPERSISTENTTHREAD = $00000080;
- {$EXTERNALSYM WT_EXECUTEINPERSISTENTTHREAD}
- WT_TRANSFER_IMPERSONATION = $00000100;
- {$EXTERNALSYM WT_TRANSFER_IMPERSONATION}
-
-function WT_SET_MAX_THREADPOOL_THREADS(var Flags: DWORD; Limit: DWORD): DWORD;
-{$EXTERNALSYM WT_SET_MAX_THREADPOOL_THREADS}
-
-type
- WAITORTIMERCALLBACKFUNC = procedure(P: PVOID; B: ByteBool); stdcall;
- {$EXTERNALSYM WAITORTIMERCALLBACKFUNC}
- WORKERCALLBACKFUNC = procedure(P: PVOID); stdcall;
- {$EXTERNALSYM WORKERCALLBACKFUNC}
- APC_CALLBACK_FUNCTION = procedure(D: DWORD; P1, P2: PVOID); stdcall;
- {$EXTERNALSYM APC_CALLBACK_FUNCTION}
-
-const
- WT_EXECUTEINLONGTHREAD = $00000010;
- {$EXTERNALSYM WT_EXECUTEINLONGTHREAD}
- WT_EXECUTEDELETEWAIT = $00000008;
- {$EXTERNALSYM WT_EXECUTEDELETEWAIT}
-
-type
- _ACTIVATION_CONTEXT_INFO_CLASS = DWORD;
- {$EXTERNALSYM _ACTIVATION_CONTEXT_INFO_CLASS}
- ACTIVATION_CONTEXT_INFO_CLASS = _ACTIVATION_CONTEXT_INFO_CLASS;
- {$EXTERNALSYM ACTIVATION_CONTEXT_INFO_CLASS}
- TActivationContextInfoClass = ACTIVATION_CONTEXT_INFO_CLASS;
-
-const
- ActivationContextBasicInformation = 1;
- {$EXTERNALSYM ActivationContextBasicInformation}
- ActivationContextDetailedInformation = 2;
- {$EXTERNALSYM ActivationContextDetailedInformation}
- AssemblyDetailedInformationInActivationContxt = 3;
- {$EXTERNALSYM AssemblyDetailedInformationInActivationContxt}
- FileInformationInAssemblyOfAssemblyInActivationContxt = 4;
- {$EXTERNALSYM FileInformationInAssemblyOfAssemblyInActivationContxt}
- MaxActivationContextInfoClass = 5;
- {$EXTERNALSYM MaxActivationContextInfoClass}
-
-type
- PACTIVATION_CONTEXT_QUERY_INDEX = ^ACTIVATION_CONTEXT_QUERY_INDEX;
- {$EXTERNALSYM PACTIVATION_CONTEXT_QUERY_INDEX}
- _ACTIVATION_CONTEXT_QUERY_INDEX = record
- ulAssemblyIndex: DWORD;
- ulFileIndexInAssembly: DWORD;
- end;
- {$EXTERNALSYM _ACTIVATION_CONTEXT_QUERY_INDEX}
- ACTIVATION_CONTEXT_QUERY_INDEX = _ACTIVATION_CONTEXT_QUERY_INDEX;
- {$EXTERNALSYM ACTIVATION_CONTEXT_QUERY_INDEX}
- TActivationContextQueryIndex = ACTIVATION_CONTEXT_QUERY_INDEX;
- PActivationContextQueryIndex = PACTIVATION_CONTEXT_QUERY_INDEX;
-
-const
- ACTIVATION_CONTEXT_PATH_TYPE_NONE = 1;
- {$EXTERNALSYM ACTIVATION_CONTEXT_PATH_TYPE_NONE}
- ACTIVATION_CONTEXT_PATH_TYPE_WIN32_FILE = 2;
- {$EXTERNALSYM ACTIVATION_CONTEXT_PATH_TYPE_WIN32_FILE}
- ACTIVATION_CONTEXT_PATH_TYPE_URL = 3;
- {$EXTERNALSYM ACTIVATION_CONTEXT_PATH_TYPE_URL}
- ACTIVATION_CONTEXT_PATH_TYPE_ASSEMBLYREF = 4;
- {$EXTERNALSYM ACTIVATION_CONTEXT_PATH_TYPE_ASSEMBLYREF}
-
-type
- PASSEMBLY_FILE_DETAILED_INFORMATION = ^ASSEMBLY_DLL_REDIRECTION_DETAILED_INFORMATION;
- {$EXTERNALSYM PASSEMBLY_FILE_DETAILED_INFORMATION}
- _ASSEMBLY_FILE_DETAILED_INFORMATION = record
- ulFlags: DWORD;
- ulFilenameLength: DWORD;
- ulPathLength: DWORD;
- lpFileName: LPCWSTR;
- lpFilePath: LPCWSTR;
- end;
- {$EXTERNALSYM _ASSEMBLY_FILE_DETAILED_INFORMATION}
- ASSEMBLY_FILE_DETAILED_INFORMATION = _ASSEMBLY_FILE_DETAILED_INFORMATION;
- {$EXTERNALSYM ASSEMBLY_DLL_REDIRECTION_DETAILED_INFORMATION}
- PCASSEMBLY_FILE_DETAILED_INFORMATION = PASSEMBLY_FILE_DETAILED_INFORMATION;
- {$EXTERNALSYM PCASSEMBLY_FILE_DETAILED_INFORMATION}
- TAssemblyFileDetailedInformation = ASSEMBLY_FILE_DETAILED_INFORMATION;
- PAssemblyFileDetailedInformation = PASSEMBLY_FILE_DETAILED_INFORMATION;
-
-//
-// compatibility with old names
-// The new names use "file" consistently.
-//
-
- _ASSEMBLY_DLL_REDIRECTION_DETAILED_INFORMATION = _ASSEMBLY_FILE_DETAILED_INFORMATION;
- {$EXTERNALSYM _ASSEMBLY_DLL_REDIRECTION_DETAILED_INFORMATION}
- ASSEMBLY_DLL_REDIRECTION_DETAILED_INFORMATION = ASSEMBLY_FILE_DETAILED_INFORMATION;
- {$EXTERNALSYM ASSEMBLY_DLL_REDIRECTION_DETAILED_INFORMATION}
- PASSEMBLY_DLL_REDIRECTION_DETAILED_INFORMATION = PASSEMBLY_FILE_DETAILED_INFORMATION;
- {$EXTERNALSYM PASSEMBLY_DLL_REDIRECTION_DETAILED_INFORMATION}
- PCASSEMBLY_DLL_REDIRECTION_DETAILED_INFORMATION = PCASSEMBLY_FILE_DETAILED_INFORMATION;
- {$EXTERNALSYM PCASSEMBLY_DLL_REDIRECTION_DETAILED_INFORMATION}
- TAssemblyDllRedirectionDetailedInformation = TAssemblyFileDetailedInformation;
- PAssemblyDllRedirectionDetailedInformation = PAssemblyFileDetailedInformation;
-
- PACTIVATION_CONTEXT_ASSEMBLY_DETAILED_INFORMATION = ^ACTIVATION_CONTEXT_ASSEMBLY_DETAILED_INFORMATION;
- {$EXTERNALSYM PACTIVATION_CONTEXT_ASSEMBLY_DETAILED_INFORMATION}
- _ACTIVATION_CONTEXT_ASSEMBLY_DETAILED_INFORMATION = record
- ulFlags: DWORD;
- ulEncodedAssemblyIdentityLength: DWORD; // in bytes
- ulManifestPathType: DWORD; // ACTIVATION_CONTEXT_PATH_TYPE_*
- ulManifestPathLength: DWORD; // in bytes
- liManifestLastWriteTime: LARGE_INTEGER; // FILETIME
- ulPolicyPathType: DWORD; // ACTIVATION_CONTEXT_PATH_TYPE_*
- ulPolicyPathLength: DWORD; // in bytes
- liPolicyLastWriteTime: LARGE_INTEGER; // FILETIME
- ulMetadataSatelliteRosterIndex: DWORD;
- ulManifestVersionMajor: DWORD; // 1
- ulManifestVersionMinor: DWORD; // 0
- ulPolicyVersionMajor: DWORD; // 0
- ulPolicyVersionMinor: DWORD; // 0
- ulAssemblyDirectoryNameLength: DWORD; // in bytes
- lpAssemblyEncodedAssemblyIdentity: LPCWSTR;
- lpAssemblyManifestPath: LPCWSTR;
- lpAssemblyPolicyPath: LPCWSTR;
- lpAssemblyDirectoryName: LPCWSTR;
- ulFileCount: DWORD;
- end;
- {$EXTERNALSYM _ACTIVATION_CONTEXT_ASSEMBLY_DETAILED_INFORMATION}
- ACTIVATION_CONTEXT_ASSEMBLY_DETAILED_INFORMATION = _ACTIVATION_CONTEXT_ASSEMBLY_DETAILED_INFORMATION;
- {$EXTERNALSYM ACTIVATION_CONTEXT_ASSEMBLY_DETAILED_INFORMATION}
- TActivationContextAssemblyDetailedInformation = ACTIVATION_CONTEXT_ASSEMBLY_DETAILED_INFORMATION;
- PActivationContextAssemblyDetailedInformation = PACTIVATION_CONTEXT_ASSEMBLY_DETAILED_INFORMATION;
-
- PACTIVATION_CONTEXT_DETAILED_INFORMATION = ^ACTIVATION_CONTEXT_DETAILED_INFORMATION;
- {$EXTERNALSYM PACTIVATION_CONTEXT_DETAILED_INFORMATION}
- _ACTIVATION_CONTEXT_DETAILED_INFORMATION = record
- dwFlags: DWORD;
- ulFormatVersion: DWORD;
- ulAssemblyCount: DWORD;
- ulRootManifestPathType: DWORD;
- ulRootManifestPathChars: DWORD;
- ulRootConfigurationPathType: DWORD;
- ulRootConfigurationPathChars: DWORD;
- ulAppDirPathType: DWORD;
- ulAppDirPathChars: DWORD;
- lpRootManifestPath: LPCWSTR;
- lpRootConfigurationPath: LPCWSTR;
- lpAppDirPath: LPCWSTR;
- end;
- {$EXTERNALSYM _ACTIVATION_CONTEXT_DETAILED_INFORMATION}
- ACTIVATION_CONTEXT_DETAILED_INFORMATION = _ACTIVATION_CONTEXT_DETAILED_INFORMATION;
- {$EXTERNALSYM ACTIVATION_CONTEXT_DETAILED_INFORMATION}
- TActivationContextDetailedInformation = ACTIVATION_CONTEXT_DETAILED_INFORMATION;
- PActivationContextDetailedInformation = PACTIVATION_CONTEXT_DETAILED_INFORMATION;
-
-const
- DLL_PROCESS_ATTACH = 1;
- {$EXTERNALSYM DLL_PROCESS_ATTACH}
- DLL_THREAD_ATTACH = 2;
- {$EXTERNALSYM DLL_THREAD_ATTACH}
- DLL_THREAD_DETACH = 3;
- {$EXTERNALSYM DLL_THREAD_DETACH}
- DLL_PROCESS_DETACH = 0;
- {$EXTERNALSYM DLL_PROCESS_DETACH}
- DLL_PROCESS_VERIFIER = 4;
- {$EXTERNALSYM DLL_PROCESS_VERIFIER}
-
-//
-// Defines for the READ flags for Eventlogging
-//
-
- EVENTLOG_SEQUENTIAL_READ = $0001;
- {$EXTERNALSYM EVENTLOG_SEQUENTIAL_READ}
- EVENTLOG_SEEK_READ = $0002;
- {$EXTERNALSYM EVENTLOG_SEEK_READ}
- EVENTLOG_FORWARDS_READ = $0004;
- {$EXTERNALSYM EVENTLOG_FORWARDS_READ}
- EVENTLOG_BACKWARDS_READ = $0008;
- {$EXTERNALSYM EVENTLOG_BACKWARDS_READ}
-
-//
-// The types of events that can be logged.
-//
-
- EVENTLOG_SUCCESS = $0000;
- {$EXTERNALSYM EVENTLOG_SUCCESS}
- EVENTLOG_ERROR_TYPE = $0001;
- {$EXTERNALSYM EVENTLOG_ERROR_TYPE}
- EVENTLOG_WARNING_TYPE = $0002;
- {$EXTERNALSYM EVENTLOG_WARNING_TYPE}
- EVENTLOG_INFORMATION_TYPE = $0004;
- {$EXTERNALSYM EVENTLOG_INFORMATION_TYPE}
- EVENTLOG_AUDIT_SUCCESS = $0008;
- {$EXTERNALSYM EVENTLOG_AUDIT_SUCCESS}
- EVENTLOG_AUDIT_FAILURE = $0010;
- {$EXTERNALSYM EVENTLOG_AUDIT_FAILURE}
-
-//
-// Defines for the WRITE flags used by Auditing for paired events
-// These are not implemented in Product 1
-//
-
- EVENTLOG_START_PAIRED_EVENT = $0001;
- {$EXTERNALSYM EVENTLOG_START_PAIRED_EVENT}
- EVENTLOG_END_PAIRED_EVENT = $0002;
- {$EXTERNALSYM EVENTLOG_END_PAIRED_EVENT}
- EVENTLOG_END_ALL_PAIRED_EVENTS = $0004;
- {$EXTERNALSYM EVENTLOG_END_ALL_PAIRED_EVENTS}
- EVENTLOG_PAIRED_EVENT_ACTIVE = $0008;
- {$EXTERNALSYM EVENTLOG_PAIRED_EVENT_ACTIVE}
- EVENTLOG_PAIRED_EVENT_INACTIVE = $0010;
- {$EXTERNALSYM EVENTLOG_PAIRED_EVENT_INACTIVE}
-
-//
-// Structure that defines the header of the Eventlog record. This is the
-// fixed-sized portion before all the variable-length strings, binary
-// data and pad bytes.
-//
-// TimeGenerated is the time it was generated at the client.
-// TimeWritten is the time it was put into the log at the server end.
-//
-
-type
- PEventlogrecord = ^EVENTLOGRECORD;
- _EVENTLOGRECORD = record
- Length: DWORD; // Length of full record
- Reserved: DWORD; // Used by the service
- RecordNumber: DWORD; // Absolute record number
- TimeGenerated: DWORD; // Seconds since 1-1-1970
- TimeWritten: DWORD; // Seconds since 1-1-1970
- EventID: DWORD;
- EventType: Word;
- NumStrings: Word;
- EventCategory: Word;
- ReservedFlags: Word; // For use with paired events (auditing)
- ClosingRecordNumber: DWORD; // For use with paired events (auditing)
- StringOffset: DWORD; // Offset from beginning of record
- UserSidLength: DWORD;
- UserSidOffset: DWORD;
- DataLength: DWORD;
- DataOffset: DWORD; // Offset from beginning of record
- //
- // Then follow:
- //
- // WCHAR SourceName[]
- // WCHAR Computername[]
- // SID UserSid
- // WCHAR Strings[]
- // BYTE Data[]
- // CHAR Pad[]
- // DWORD Length;
- //
- end;
- {$EXTERNALSYM _EVENTLOGRECORD}
- EVENTLOGRECORD = _EVENTLOGRECORD;
- {$EXTERNALSYM EVENTLOGRECORD}
- TEventlogrecord = EVENTLOGRECORD;
-
-const
- MAXLOGICALLOGNAMESIZE = 256;
- {$EXTERNALSYM MAXLOGICALLOGNAMESIZE}
-
-type
- PEventsForLogFile = ^EVENTSFORLOGFILE;
- _EVENTSFORLOGFILE = record
- ulSize: DWORD;
- szLogicalLogFile: array [0..MAXLOGICALLOGNAMESIZE - 1] of WCHAR; // name of the logical file-security/application/system
- ulNumRecords: DWORD;
- pEventLogRecords: array [0..0] of EVENTLOGRECORD;
- end;
- {$EXTERNALSYM _EVENTSFORLOGFILE}
- EVENTSFORLOGFILE = _EVENTSFORLOGFILE;
- {$EXTERNALSYM EVENTSFORLOGFILE}
- TEventsForLogFile = EVENTSFORLOGFILE;
-
- PPackedEventInfo = ^PACKEDEVENTINFO;
- _PACKEDEVENTINFO = record
- ulSize: DWORD; // total size of the structure
- ulNumEventsForLogFile: DWORD; // number of EventsForLogFile structure that follow
- ulOffsets: array [0..0] of DWORD; // the offsets from the start of this structure to the EVENTSFORLOGFILE structure
- end;
- {$EXTERNALSYM _PACKEDEVENTINFO}
- PACKEDEVENTINFO = _PACKEDEVENTINFO;
- {$EXTERNALSYM PACKEDEVENTINFO}
- TPackedEventInfo = PACKEDEVENTINFO;
-
-//
-// Registry Specific Access Rights.
-//
-
-const
- KEY_QUERY_VALUE = $0001;
- {$EXTERNALSYM KEY_QUERY_VALUE}
- KEY_SET_VALUE = $0002;
- {$EXTERNALSYM KEY_SET_VALUE}
- KEY_CREATE_SUB_KEY = $0004;
- {$EXTERNALSYM KEY_CREATE_SUB_KEY}
- KEY_ENUMERATE_SUB_KEYS = $0008;
- {$EXTERNALSYM KEY_ENUMERATE_SUB_KEYS}
- KEY_NOTIFY = $0010;
- {$EXTERNALSYM KEY_NOTIFY}
- KEY_CREATE_LINK = $0020;
- {$EXTERNALSYM KEY_CREATE_LINK}
- KEY_WOW64_32KEY = $0200;
- {$EXTERNALSYM KEY_WOW64_32KEY}
- KEY_WOW64_64KEY = $0100;
- {$EXTERNALSYM KEY_WOW64_64KEY}
- KEY_WOW64_RES = $0300;
- {$EXTERNALSYM KEY_WOW64_RES}
-
- KEY_READ = STANDARD_RIGHTS_READ or KEY_QUERY_VALUE or KEY_ENUMERATE_SUB_KEYS or
- KEY_NOTIFY and (not SYNCHRONIZE);
- {$EXTERNALSYM KEY_READ}
-
- KEY_WRITE = STANDARD_RIGHTS_WRITE or KEY_SET_VALUE or KEY_CREATE_SUB_KEY and
- (not SYNCHRONIZE);
- {$EXTERNALSYM KEY_WRITE}
-
- KEY_EXECUTE = KEY_READ and (not SYNCHRONIZE);
- {$EXTERNALSYM KEY_EXECUTE}
-
- KEY_ALL_ACCESS = STANDARD_RIGHTS_ALL or KEY_QUERY_VALUE or KEY_SET_VALUE or
- KEY_CREATE_SUB_KEY or KEY_ENUMERATE_SUB_KEYS or KEY_NOTIFY or
- KEY_CREATE_LINK and (not SYNCHRONIZE);
- {$EXTERNALSYM KEY_ALL_ACCESS}
-
-//
-// Open/Create Options
-//
-
- REG_OPTION_RESERVED = $00000000; // Parameter is reserved
- {$EXTERNALSYM REG_OPTION_RESERVED}
-
- REG_OPTION_NON_VOLATILE = $00000000; // Key is preserved when system is rebooted
- {$EXTERNALSYM REG_OPTION_NON_VOLATILE}
-
- REG_OPTION_VOLATILE = $00000001; // Key is not preserved when system is rebooted
- {$EXTERNALSYM REG_OPTION_VOLATILE}
-
- REG_OPTION_CREATE_LINK = $00000002; // Created key is a symbolic link
- {$EXTERNALSYM REG_OPTION_CREATE_LINK}
-
- REG_OPTION_BACKUP_RESTORE = $00000004; // open for backup or restore
- {$EXTERNALSYM REG_OPTION_BACKUP_RESTORE}
- // special access rules
- // privilege required
-
- REG_OPTION_OPEN_LINK = $00000008; // Open symbolic link
- {$EXTERNALSYM REG_OPTION_OPEN_LINK}
-
- REG_LEGAL_OPTION = REG_OPTION_RESERVED or REG_OPTION_NON_VOLATILE or
- REG_OPTION_VOLATILE or REG_OPTION_CREATE_LINK or REG_OPTION_BACKUP_RESTORE or
- REG_OPTION_OPEN_LINK;
- {$EXTERNALSYM REG_LEGAL_OPTION}
-
-//
-// Key creation/open disposition
-//
-
- REG_CREATED_NEW_KEY = $00000001; // New Registry Key created
- {$EXTERNALSYM REG_CREATED_NEW_KEY}
- REG_OPENED_EXISTING_KEY = $00000002; // Existing Key opened
- {$EXTERNALSYM REG_OPENED_EXISTING_KEY}
-
-//
-// hive format to be used by Reg(Nt)SaveKeyEx
-//
-
- REG_STANDARD_FORMAT = 1;
- {$EXTERNALSYM REG_STANDARD_FORMAT}
- REG_LATEST_FORMAT = 2;
- {$EXTERNALSYM REG_LATEST_FORMAT}
- REG_NO_COMPRESSION = 4;
- {$EXTERNALSYM REG_NO_COMPRESSION}
-
-//
-// Key restore flags
-//
-
- REG_WHOLE_HIVE_VOLATILE = $00000001; // Restore whole hive volatile
- {$EXTERNALSYM REG_WHOLE_HIVE_VOLATILE}
- REG_REFRESH_HIVE = $00000002; // Unwind changes to last flush
- {$EXTERNALSYM REG_REFRESH_HIVE}
- REG_NO_LAZY_FLUSH = $00000004; // Never lazy flush this hive
- {$EXTERNALSYM REG_NO_LAZY_FLUSH}
- REG_FORCE_RESTORE = $00000008; // Force the restore process even when we have open handles on subkeys
- {$EXTERNALSYM REG_FORCE_RESTORE}
-
-//
-// Unload Flags
-//
-
- REG_FORCE_UNLOAD = 1;
- {$EXTERNALSYM REG_FORCE_UNLOAD}
-
-// end_ntddk end_wdm end_nthal
-
-//
-// Notify filter values
-//
-
- REG_NOTIFY_CHANGE_NAME = $00000001; // Create or delete (child)
- {$EXTERNALSYM REG_NOTIFY_CHANGE_NAME}
- REG_NOTIFY_CHANGE_ATTRIBUTES = $00000002;
- {$EXTERNALSYM REG_NOTIFY_CHANGE_ATTRIBUTES}
- REG_NOTIFY_CHANGE_LAST_SET = $00000004; // time stamp
- {$EXTERNALSYM REG_NOTIFY_CHANGE_LAST_SET}
- REG_NOTIFY_CHANGE_SECURITY = $00000008;
- {$EXTERNALSYM REG_NOTIFY_CHANGE_SECURITY}
-
- REG_LEGAL_CHANGE_FILTER = REG_NOTIFY_CHANGE_NAME or REG_NOTIFY_CHANGE_ATTRIBUTES or
- REG_NOTIFY_CHANGE_LAST_SET or REG_NOTIFY_CHANGE_SECURITY;
- {$EXTERNALSYM REG_LEGAL_CHANGE_FILTER}
-
-//
-//
-// Predefined Value Types.
-//
-
- REG_NONE = 0; // No value type
- {$EXTERNALSYM REG_NONE}
- REG_SZ = 1; // Unicode nul terminated string
- {$EXTERNALSYM REG_SZ}
- REG_EXPAND_SZ = 2; // Unicode nul terminated string
- {$EXTERNALSYM REG_EXPAND_SZ}
- // (with environment variable references)
- REG_BINARY = 3; // Free form binary
- {$EXTERNALSYM REG_BINARY}
- REG_DWORD = 4; // 32-bit number
- {$EXTERNALSYM REG_DWORD}
- REG_DWORD_LITTLE_ENDIAN = 4; // 32-bit number (same as REG_DWORD)
- {$EXTERNALSYM REG_DWORD_LITTLE_ENDIAN}
- REG_DWORD_BIG_ENDIAN = 5; // 32-bit number
- {$EXTERNALSYM REG_DWORD_BIG_ENDIAN}
- REG_LINK = 6; // Symbolic Link (unicode)
- {$EXTERNALSYM REG_LINK}
- REG_MULTI_SZ = 7; // Multiple Unicode strings
- {$EXTERNALSYM REG_MULTI_SZ}
- REG_RESOURCE_LIST = 8; // Resource list in the resource map
- {$EXTERNALSYM REG_RESOURCE_LIST}
- REG_FULL_RESOURCE_DESCRIPTOR = 9; // Resource list in the hardware description
- {$EXTERNALSYM REG_FULL_RESOURCE_DESCRIPTOR}
- REG_RESOURCE_REQUIREMENTS_LIST = 10;
- {$EXTERNALSYM REG_RESOURCE_REQUIREMENTS_LIST}
- REG_QWORD = 11; // 64-bit number
- {$EXTERNALSYM REG_QWORD}
- REG_QWORD_LITTLE_ENDIAN = 11; // 64-bit number (same as REG_QWORD)
- {$EXTERNALSYM REG_QWORD_LITTLE_ENDIAN}
-
-//
-// Service Types (Bit Mask)
-//
-
- SERVICE_KERNEL_DRIVER = $00000001;
- {$EXTERNALSYM SERVICE_KERNEL_DRIVER}
- SERVICE_FILE_SYSTEM_DRIVER = $00000002;
- {$EXTERNALSYM SERVICE_FILE_SYSTEM_DRIVER}
- SERVICE_ADAPTER = $00000004;
- {$EXTERNALSYM SERVICE_ADAPTER}
- SERVICE_RECOGNIZER_DRIVER = $00000008;
- {$EXTERNALSYM SERVICE_RECOGNIZER_DRIVER}
-
- SERVICE_DRIVER = SERVICE_KERNEL_DRIVER or SERVICE_FILE_SYSTEM_DRIVER or
- SERVICE_RECOGNIZER_DRIVER;
- {$EXTERNALSYM SERVICE_DRIVER}
-
- SERVICE_WIN32_OWN_PROCESS = $00000010;
- {$EXTERNALSYM SERVICE_WIN32_OWN_PROCESS}
- SERVICE_WIN32_SHARE_PROCESS = $00000020;
- {$EXTERNALSYM SERVICE_WIN32_SHARE_PROCESS}
-
- SERVICE_WIN32 = SERVICE_WIN32_OWN_PROCESS or SERVICE_WIN32_SHARE_PROCESS;
- {$EXTERNALSYM SERVICE_WIN32}
-
- SERVICE_INTERACTIVE_PROCESS = $00000100;
- {$EXTERNALSYM SERVICE_INTERACTIVE_PROCESS}
-
- SERVICE_TYPE_ALL = SERVICE_WIN32 or SERVICE_ADAPTER or SERVICE_DRIVER or
- SERVICE_INTERACTIVE_PROCESS;
- {$EXTERNALSYM SERVICE_TYPE_ALL}
-
-//
-// Start Type
-//
-
- SERVICE_BOOT_START = $00000000;
- {$EXTERNALSYM SERVICE_BOOT_START}
- SERVICE_SYSTEM_START = $00000001;
- {$EXTERNALSYM SERVICE_SYSTEM_START}
- SERVICE_AUTO_START = $00000002;
- {$EXTERNALSYM SERVICE_AUTO_START}
- SERVICE_DEMAND_START = $00000003;
- {$EXTERNALSYM SERVICE_DEMAND_START}
- SERVICE_DISABLED = $00000004;
- {$EXTERNALSYM SERVICE_DISABLED}
-
-//
-// Error control type
-//
-
- SERVICE_ERROR_IGNORE = $00000000;
- {$EXTERNALSYM SERVICE_ERROR_IGNORE}
- SERVICE_ERROR_NORMAL = $00000001;
- {$EXTERNALSYM SERVICE_ERROR_NORMAL}
- SERVICE_ERROR_SEVERE = $00000002;
- {$EXTERNALSYM SERVICE_ERROR_SEVERE}
- SERVICE_ERROR_CRITICAL = $00000003;
- {$EXTERNALSYM SERVICE_ERROR_CRITICAL}
-
-//
-// Define the registry driver node enumerations
-//
-
-const
-
-//SERVICE_NODE_TYPE
-
- DriverType = SERVICE_KERNEL_DRIVER;
- FileSystemType = SERVICE_FILE_SYSTEM_DRIVER;
- Win32ServiceOwnProcess = SERVICE_WIN32_OWN_PROCESS;
- Win32ServiceShareProcess = SERVICE_WIN32_SHARE_PROCESS;
- AdapterType = SERVICE_ADAPTER;
- RecognizerType = SERVICE_RECOGNIZER_DRIVER;
-
-//SERVICE_LOAD_TYPE
-
- BootLoad = SERVICE_BOOT_START;
- SystemLoad = SERVICE_SYSTEM_START;
- AutoLoad = SERVICE_AUTO_START;
- DemandLoad = SERVICE_DEMAND_START;
- DisableLoad = SERVICE_DISABLED;
-
-//SERVICE_ERROR_TYPE
-
- IgnoreError = SERVICE_ERROR_IGNORE;
- NormalError = SERVICE_ERROR_NORMAL;
- SevereError = SERVICE_ERROR_SEVERE;
- CriticalError = SERVICE_ERROR_CRITICAL;
-
-//
-// IOCTL_TAPE_ERASE definitions
-//
-
-type
- SERVICE_NODE_TYPE = DWORD;
- {$EXTERNALSYM SERVICE_NODE_TYPE}
- TServiceNodeType = SERVICE_NODE_TYPE;
- SERVICE_LOAD_TYPE = DWORD;
- {$EXTERNALSYM SERVICE_LOAD_TYPE}
- TServiceLoadType = SERVICE_LOAD_TYPE;
- SERVICE_ERROR_TYPE = DWORD;
- {$EXTERNALSYM SERVICE_ERROR_TYPE}
- TServiceErrorType = SERVICE_ERROR_TYPE;
-
-const
- TAPE_ERASE_SHORT = 0;
- {$EXTERNALSYM TAPE_ERASE_SHORT}
- TAPE_ERASE_LONG = 1;
- {$EXTERNALSYM TAPE_ERASE_LONG}
-
-type
- PTAPE_ERASE = ^TAPE_ERASE;
- {$EXTERNALSYM PTAPE_ERASE}
- _TAPE_ERASE = record
- Type_: DWORD;
- Immediate: ByteBool;
- end;
- {$EXTERNALSYM _TAPE_ERASE}
- TAPE_ERASE = _TAPE_ERASE;
- {$EXTERNALSYM TAPE_ERASE}
- TTapeErase = TAPE_ERASE;
- PTapeErase = PTAPE_ERASE;
-
-//
-// IOCTL_TAPE_PREPARE definitions
-//
-
-const
- TAPE_LOAD = 0;
- {$EXTERNALSYM TAPE_LOAD}
- TAPE_UNLOAD = 1;
- {$EXTERNALSYM TAPE_UNLOAD}
- TAPE_TENSION = 2;
- {$EXTERNALSYM TAPE_TENSION}
- TAPE_LOCK = 3;
- {$EXTERNALSYM TAPE_LOCK}
- TAPE_UNLOCK = 4;
- {$EXTERNALSYM TAPE_UNLOCK}
- TAPE_FORMAT = 5;
- {$EXTERNALSYM TAPE_FORMAT}
-
-type
- PTAPE_PREPARE = ^TAPE_PREPARE;
- {$EXTERNALSYM PTAPE_PREPARE}
- _TAPE_PREPARE = record
- Operation: DWORD;
- Immediate: ByteBool;
- end;
- {$EXTERNALSYM _TAPE_PREPARE}
- TAPE_PREPARE = _TAPE_PREPARE;
- {$EXTERNALSYM TAPE_PREPARE}
- TTapePrepare = TAPE_PREPARE;
- PTapePrepare = PTAPE_PREPARE;
-
-//
-// IOCTL_TAPE_WRITE_MARKS definitions
-//
-
-const
- TAPE_SETMARKS = 0;
- {$EXTERNALSYM TAPE_SETMARKS}
- TAPE_FILEMARKS = 1;
- {$EXTERNALSYM TAPE_FILEMARKS}
- TAPE_SHORT_FILEMARKS = 2;
- {$EXTERNALSYM TAPE_SHORT_FILEMARKS}
- TAPE_LONG_FILEMARKS = 3;
- {$EXTERNALSYM TAPE_LONG_FILEMARKS}
-
-type
- PTAPE_WRITE_MARKS = ^TAPE_WRITE_MARKS;
- {$EXTERNALSYM PTAPE_WRITE_MARKS}
- _TAPE_WRITE_MARKS = record
- Type_: DWORD;
- Count: DWORD;
- Immediate: ByteBool;
- end;
- {$EXTERNALSYM _TAPE_WRITE_MARKS}
- TAPE_WRITE_MARKS = _TAPE_WRITE_MARKS;
- {$EXTERNALSYM TAPE_WRITE_MARKS}
- TTapeWriteMarks = TAPE_WRITE_MARKS;
- PTapeWriteMarks = PTAPE_WRITE_MARKS;
-
-//
-// IOCTL_TAPE_GET_POSITION definitions
-//
-
-const
- TAPE_ABSOLUTE_POSITION = 0;
- {$EXTERNALSYM TAPE_ABSOLUTE_POSITION}
- TAPE_LOGICAL_POSITION = 1;
- {$EXTERNALSYM TAPE_LOGICAL_POSITION}
- TAPE_PSEUDO_LOGICAL_POSITION = 2;
- {$EXTERNALSYM TAPE_PSEUDO_LOGICAL_POSITION}
-
-type
- PTAPE_GET_POSITION = ^TAPE_GET_POSITION;
- {$EXTERNALSYM PTAPE_GET_POSITION}
- _TAPE_GET_POSITION = record
- Type_: DWORD;
- Partition: DWORD;
- Offset: LARGE_INTEGER;
- end;
- {$EXTERNALSYM _TAPE_GET_POSITION}
- TAPE_GET_POSITION = _TAPE_GET_POSITION;
- {$EXTERNALSYM TAPE_GET_POSITION}
- TTapeGetPosition = TAPE_GET_POSITION;
- PTapeGetPosition = PTAPE_GET_POSITION;
-
-//
-// IOCTL_TAPE_SET_POSITION definitions
-//
-
-const
- TAPE_REWIND = 0;
- {$EXTERNALSYM TAPE_REWIND}
- TAPE_ABSOLUTE_BLOCK = 1;
- {$EXTERNALSYM TAPE_ABSOLUTE_BLOCK}
- TAPE_LOGICAL_BLOCK = 2;
- {$EXTERNALSYM TAPE_LOGICAL_BLOCK}
- TAPE_PSEUDO_LOGICAL_BLOCK = 3;
- {$EXTERNALSYM TAPE_PSEUDO_LOGICAL_BLOCK}
- TAPE_SPACE_END_OF_DATA = 4;
- {$EXTERNALSYM TAPE_SPACE_END_OF_DATA}
- TAPE_SPACE_RELATIVE_BLOCKS = 5;
- {$EXTERNALSYM TAPE_SPACE_RELATIVE_BLOCKS}
- TAPE_SPACE_FILEMARKS = 6;
- {$EXTERNALSYM TAPE_SPACE_FILEMARKS}
- TAPE_SPACE_SEQUENTIAL_FMKS = 7;
- {$EXTERNALSYM TAPE_SPACE_SEQUENTIAL_FMKS}
- TAPE_SPACE_SETMARKS = 8;
- {$EXTERNALSYM TAPE_SPACE_SETMARKS}
- TAPE_SPACE_SEQUENTIAL_SMKS = 9;
- {$EXTERNALSYM TAPE_SPACE_SEQUENTIAL_SMKS}
-
-type
- PTAPE_SET_POSITION = ^TAPE_SET_POSITION;
- {$EXTERNALSYM PTAPE_SET_POSITION}
- _TAPE_SET_POSITION = record
- Method: DWORD;
- Partition: DWORD;
- Offset: LARGE_INTEGER;
- Immediate: ByteBool;
- end;
- {$EXTERNALSYM _TAPE_SET_POSITION}
- TAPE_SET_POSITION = _TAPE_SET_POSITION;
- {$EXTERNALSYM TAPE_SET_POSITION}
- TTapeSetPosition = TAPE_SET_POSITION;
- PTapeSetPosition = PTAPE_SET_POSITION;
-
-//
-// IOCTL_TAPE_GET_DRIVE_PARAMS definitions
-//
-
-//
-// Definitions for FeaturesLow parameter
-//
-
-const
- TAPE_DRIVE_FIXED = $00000001;
- {$EXTERNALSYM TAPE_DRIVE_FIXED}
- TAPE_DRIVE_SELECT = $00000002;
- {$EXTERNALSYM TAPE_DRIVE_SELECT}
- TAPE_DRIVE_INITIATOR = $00000004;
- {$EXTERNALSYM TAPE_DRIVE_INITIATOR}
-
- TAPE_DRIVE_ERASE_SHORT = $00000010;
- {$EXTERNALSYM TAPE_DRIVE_ERASE_SHORT}
- TAPE_DRIVE_ERASE_LONG = $00000020;
- {$EXTERNALSYM TAPE_DRIVE_ERASE_LONG}
- TAPE_DRIVE_ERASE_BOP_ONLY = $00000040;
- {$EXTERNALSYM TAPE_DRIVE_ERASE_BOP_ONLY}
- TAPE_DRIVE_ERASE_IMMEDIATE = $00000080;
- {$EXTERNALSYM TAPE_DRIVE_ERASE_IMMEDIATE}
-
- TAPE_DRIVE_TAPE_CAPACITY = $00000100;
- {$EXTERNALSYM TAPE_DRIVE_TAPE_CAPACITY}
- TAPE_DRIVE_TAPE_REMAINING = $00000200;
- {$EXTERNALSYM TAPE_DRIVE_TAPE_REMAINING}
- TAPE_DRIVE_FIXED_BLOCK = $00000400;
- {$EXTERNALSYM TAPE_DRIVE_FIXED_BLOCK}
- TAPE_DRIVE_VARIABLE_BLOCK = $00000800;
- {$EXTERNALSYM TAPE_DRIVE_VARIABLE_BLOCK}
-
- TAPE_DRIVE_WRITE_PROTECT = $00001000;
- {$EXTERNALSYM TAPE_DRIVE_WRITE_PROTECT}
- TAPE_DRIVE_EOT_WZ_SIZE = $00002000;
- {$EXTERNALSYM TAPE_DRIVE_EOT_WZ_SIZE}
-
- TAPE_DRIVE_ECC = $00010000;
- {$EXTERNALSYM TAPE_DRIVE_ECC}
- TAPE_DRIVE_COMPRESSION = $00020000;
- {$EXTERNALSYM TAPE_DRIVE_COMPRESSION}
- TAPE_DRIVE_PADDING = $00040000;
- {$EXTERNALSYM TAPE_DRIVE_PADDING}
- TAPE_DRIVE_REPORT_SMKS = $00080000;
- {$EXTERNALSYM TAPE_DRIVE_REPORT_SMKS}
-
- TAPE_DRIVE_GET_ABSOLUTE_BLK = $00100000;
- {$EXTERNALSYM TAPE_DRIVE_GET_ABSOLUTE_BLK}
- TAPE_DRIVE_GET_LOGICAL_BLK = $00200000;
- {$EXTERNALSYM TAPE_DRIVE_GET_LOGICAL_BLK}
- TAPE_DRIVE_SET_EOT_WZ_SIZE = $00400000;
- {$EXTERNALSYM TAPE_DRIVE_SET_EOT_WZ_SIZE}
-
- TAPE_DRIVE_EJECT_MEDIA = $01000000;
- {$EXTERNALSYM TAPE_DRIVE_EJECT_MEDIA}
- TAPE_DRIVE_CLEAN_REQUESTS = $02000000;
- {$EXTERNALSYM TAPE_DRIVE_CLEAN_REQUESTS}
- TAPE_DRIVE_SET_CMP_BOP_ONLY = $04000000;
- {$EXTERNALSYM TAPE_DRIVE_SET_CMP_BOP_ONLY}
-
- TAPE_DRIVE_RESERVED_BIT = DWORD($80000000); // don't use this bit!
- {$EXTERNALSYM TAPE_DRIVE_RESERVED_BIT}
- // //can't be a low features bit!
-// //reserved; high features only
-
-//
-// Definitions for FeaturesHigh parameter
-//
-
- TAPE_DRIVE_LOAD_UNLOAD = DWORD($80000001);
- {$EXTERNALSYM TAPE_DRIVE_LOAD_UNLOAD}
- TAPE_DRIVE_TENSION = DWORD($80000002);
- {$EXTERNALSYM TAPE_DRIVE_TENSION}
- TAPE_DRIVE_LOCK_UNLOCK = DWORD($80000004);
- {$EXTERNALSYM TAPE_DRIVE_LOCK_UNLOCK}
- TAPE_DRIVE_REWIND_IMMEDIATE = DWORD($80000008);
- {$EXTERNALSYM TAPE_DRIVE_REWIND_IMMEDIATE}
-
- TAPE_DRIVE_SET_BLOCK_SIZE = DWORD($80000010);
- {$EXTERNALSYM TAPE_DRIVE_SET_BLOCK_SIZE}
- TAPE_DRIVE_LOAD_UNLD_IMMED = DWORD($80000020);
- {$EXTERNALSYM TAPE_DRIVE_LOAD_UNLD_IMMED}
- TAPE_DRIVE_TENSION_IMMED = DWORD($80000040);
- {$EXTERNALSYM TAPE_DRIVE_TENSION_IMMED}
- TAPE_DRIVE_LOCK_UNLK_IMMED = DWORD($80000080);
- {$EXTERNALSYM TAPE_DRIVE_LOCK_UNLK_IMMED}
-
- TAPE_DRIVE_SET_ECC = DWORD($80000100);
- {$EXTERNALSYM TAPE_DRIVE_SET_ECC}
- TAPE_DRIVE_SET_COMPRESSION = DWORD($80000200);
- {$EXTERNALSYM TAPE_DRIVE_SET_COMPRESSION}
- TAPE_DRIVE_SET_PADDING = DWORD($80000400);
- {$EXTERNALSYM TAPE_DRIVE_SET_PADDING}
- TAPE_DRIVE_SET_REPORT_SMKS = DWORD($80000800);
- {$EXTERNALSYM TAPE_DRIVE_SET_REPORT_SMKS}
-
- TAPE_DRIVE_ABSOLUTE_BLK = DWORD($80001000);
- {$EXTERNALSYM TAPE_DRIVE_ABSOLUTE_BLK}
- TAPE_DRIVE_ABS_BLK_IMMED = DWORD($80002000);
- {$EXTERNALSYM TAPE_DRIVE_ABS_BLK_IMMED}
- TAPE_DRIVE_LOGICAL_BLK = DWORD($80004000);
- {$EXTERNALSYM TAPE_DRIVE_LOGICAL_BLK}
- TAPE_DRIVE_LOG_BLK_IMMED = DWORD($80008000);
- {$EXTERNALSYM TAPE_DRIVE_LOG_BLK_IMMED}
-
- TAPE_DRIVE_END_OF_DATA = DWORD($80010000);
- {$EXTERNALSYM TAPE_DRIVE_END_OF_DATA}
- TAPE_DRIVE_RELATIVE_BLKS = DWORD($80020000);
- {$EXTERNALSYM TAPE_DRIVE_RELATIVE_BLKS}
- TAPE_DRIVE_FILEMARKS = DWORD($80040000);
- {$EXTERNALSYM TAPE_DRIVE_FILEMARKS}
- TAPE_DRIVE_SEQUENTIAL_FMKS = DWORD($80080000);
- {$EXTERNALSYM TAPE_DRIVE_SEQUENTIAL_FMKS}
-
- TAPE_DRIVE_SETMARKS = DWORD($80100000);
- {$EXTERNALSYM TAPE_DRIVE_SETMARKS}
- TAPE_DRIVE_SEQUENTIAL_SMKS = DWORD($80200000);
- {$EXTERNALSYM TAPE_DRIVE_SEQUENTIAL_SMKS}
- TAPE_DRIVE_REVERSE_POSITION = DWORD($80400000);
- {$EXTERNALSYM TAPE_DRIVE_REVERSE_POSITION}
- TAPE_DRIVE_SPACE_IMMEDIATE = DWORD($80800000);
- {$EXTERNALSYM TAPE_DRIVE_SPACE_IMMEDIATE}
-
- TAPE_DRIVE_WRITE_SETMARKS = DWORD($81000000);
- {$EXTERNALSYM TAPE_DRIVE_WRITE_SETMARKS}
- TAPE_DRIVE_WRITE_FILEMARKS = DWORD($82000000);
- {$EXTERNALSYM TAPE_DRIVE_WRITE_FILEMARKS}
- TAPE_DRIVE_WRITE_SHORT_FMKS = DWORD($84000000);
- {$EXTERNALSYM TAPE_DRIVE_WRITE_SHORT_FMKS}
- TAPE_DRIVE_WRITE_LONG_FMKS = DWORD($88000000);
- {$EXTERNALSYM TAPE_DRIVE_WRITE_LONG_FMKS}
-
- TAPE_DRIVE_WRITE_MARK_IMMED = DWORD($90000000);
- {$EXTERNALSYM TAPE_DRIVE_WRITE_MARK_IMMED}
- TAPE_DRIVE_FORMAT = DWORD($A0000000);
- {$EXTERNALSYM TAPE_DRIVE_FORMAT}
- TAPE_DRIVE_FORMAT_IMMEDIATE = DWORD($C0000000);
- {$EXTERNALSYM TAPE_DRIVE_FORMAT_IMMEDIATE}
- TAPE_DRIVE_HIGH_FEATURES = DWORD($80000000); // mask for high features flag
- {$EXTERNALSYM TAPE_DRIVE_HIGH_FEATURES}
-
-type
- PTAPE_GET_DRIVE_PARAMETERS = ^TAPE_GET_DRIVE_PARAMETERS;
- {$EXTERNALSYM PTAPE_GET_DRIVE_PARAMETERS}
- _TAPE_GET_DRIVE_PARAMETERS = record
- ECC: ByteBool;
- Compression: ByteBool;
- DataPadding: ByteBool;
- ReportSetmarks: ByteBool;
- DefaultBlockSize: DWORD;
- MaximumBlockSize: DWORD;
- MinimumBlockSize: DWORD;
- MaximumPartitionCount: DWORD;
- FeaturesLow: DWORD;
- FeaturesHigh: DWORD;
- EOTWarningZoneSize: DWORD;
- end;
- {$EXTERNALSYM _TAPE_GET_DRIVE_PARAMETERS}
- TAPE_GET_DRIVE_PARAMETERS = _TAPE_GET_DRIVE_PARAMETERS;
- {$EXTERNALSYM TAPE_GET_DRIVE_PARAMETERS}
- TTapeGetDriveParameters = TAPE_GET_DRIVE_PARAMETERS;
- PTapeGetDriveParameters = PTAPE_GET_DRIVE_PARAMETERS;
-
-//
-// IOCTL_TAPE_SET_DRIVE_PARAMETERS definitions
-//
-
- PTAPE_SET_DRIVE_PARAMETERS = ^TAPE_SET_DRIVE_PARAMETERS;
- {$EXTERNALSYM PTAPE_SET_DRIVE_PARAMETERS}
- _TAPE_SET_DRIVE_PARAMETERS = record
- ECC: ByteBool;
- Compression: ByteBool;
- DataPadding: ByteBool;
- ReportSetmarks: ByteBool;
- EOTWarningZoneSize: DWORD;
- end;
- {$EXTERNALSYM _TAPE_SET_DRIVE_PARAMETERS}
- TAPE_SET_DRIVE_PARAMETERS = _TAPE_SET_DRIVE_PARAMETERS;
- {$EXTERNALSYM TAPE_SET_DRIVE_PARAMETERS}
- TTapeSetDriveParameters = TAPE_SET_DRIVE_PARAMETERS;
- PTapeSetDriveParameters = PTAPE_SET_DRIVE_PARAMETERS;
-
-//
-// IOCTL_TAPE_GET_MEDIA_PARAMETERS definitions
-//
-
- PTAPE_GET_MEDIA_PARAMETERS = ^TAPE_GET_MEDIA_PARAMETERS;
- {$EXTERNALSYM PTAPE_GET_MEDIA_PARAMETERS}
- _TAPE_GET_MEDIA_PARAMETERS = record
- Capacity: LARGE_INTEGER;
- Remaining: LARGE_INTEGER;
- BlockSize: DWORD;
- PartitionCount: DWORD;
- WriteProtected: ByteBool;
- end;
- {$EXTERNALSYM _TAPE_GET_MEDIA_PARAMETERS}
- TAPE_GET_MEDIA_PARAMETERS = _TAPE_GET_MEDIA_PARAMETERS;
- {$EXTERNALSYM TAPE_GET_MEDIA_PARAMETERS}
- TTapeGetMediaParameters = TAPE_GET_MEDIA_PARAMETERS;
- PTapeGetMediaParameters = PTAPE_GET_MEDIA_PARAMETERS;
-
-//
-// IOCTL_TAPE_SET_MEDIA_PARAMETERS definitions
-//
-
- PTAPE_SET_MEDIA_PARAMETERS = ^TAPE_SET_MEDIA_PARAMETERS;
- {$EXTERNALSYM PTAPE_SET_MEDIA_PARAMETERS}
- _TAPE_SET_MEDIA_PARAMETERS = record
- BlockSize: DWORD;
- end;
- {$EXTERNALSYM _TAPE_SET_MEDIA_PARAMETERS}
- TAPE_SET_MEDIA_PARAMETERS = _TAPE_SET_MEDIA_PARAMETERS;
- {$EXTERNALSYM TAPE_SET_MEDIA_PARAMETERS}
- TTapeSetMediaParameters = TAPE_SET_MEDIA_PARAMETERS;
- PTapeSetMediaParameters = PTAPE_SET_MEDIA_PARAMETERS;
-
-//
-// IOCTL_TAPE_CREATE_PARTITION definitions
-//
-
-const
- TAPE_FIXED_PARTITIONS = 0;
- {$EXTERNALSYM TAPE_FIXED_PARTITIONS}
- TAPE_SELECT_PARTITIONS = 1;
- {$EXTERNALSYM TAPE_SELECT_PARTITIONS}
- TAPE_INITIATOR_PARTITIONS = 2;
- {$EXTERNALSYM TAPE_INITIATOR_PARTITIONS}
-
-type
- PTAPE_CREATE_PARTITION = ^TAPE_CREATE_PARTITION;
- {$EXTERNALSYM PTAPE_CREATE_PARTITION}
- _TAPE_CREATE_PARTITION = record
- Method: DWORD;
- Count: DWORD;
- Size: DWORD;
- end;
- {$EXTERNALSYM _TAPE_CREATE_PARTITION}
- TAPE_CREATE_PARTITION = _TAPE_CREATE_PARTITION;
- {$EXTERNALSYM TAPE_CREATE_PARTITION}
- TTapeCreatePartition = TAPE_CREATE_PARTITION;
- PTapeCreatePartition = PTAPE_CREATE_PARTITION;
-
-//
-// WMI Methods
-//
-
-const
- TAPE_QUERY_DRIVE_PARAMETERS = 0;
- {$EXTERNALSYM TAPE_QUERY_DRIVE_PARAMETERS}
- TAPE_QUERY_MEDIA_CAPACITY = 1;
- {$EXTERNALSYM TAPE_QUERY_MEDIA_CAPACITY}
- TAPE_CHECK_FOR_DRIVE_PROBLEM = 2;
- {$EXTERNALSYM TAPE_CHECK_FOR_DRIVE_PROBLEM}
- TAPE_QUERY_IO_ERROR_DATA = 3;
- {$EXTERNALSYM TAPE_QUERY_IO_ERROR_DATA}
- TAPE_QUERY_DEVICE_ERROR_DATA = 4;
- {$EXTERNALSYM TAPE_QUERY_DEVICE_ERROR_DATA}
-
-type
- _TAPE_WMI_OPERATIONS = record
- Method: DWORD;
- DataBufferSize: DWORD;
- DataBuffer: PVOID;
- end;
- {$EXTERNALSYM _TAPE_WMI_OPERATIONS}
- TAPE_WMI_OPERATIONS = _TAPE_WMI_OPERATIONS;
- {$EXTERNALSYM TAPE_WMI_OPERATIONS}
- PTAPE_WMI_OPERATIONS = ^TAPE_WMI_OPERATIONS;
- {$EXTERNALSYM PTAPE_WMI_OPERATIONS}
- TTapeWMIOperations = TAPE_WMI_OPERATIONS;
- PTapeWMIOperations = PTAPE_WMI_OPERATIONS;
-
-//
-// Type of drive errors
-//
-
- _TAPE_DRIVE_PROBLEM_TYPE = (
- TapeDriveProblemNone, TapeDriveReadWriteWarning,
- TapeDriveReadWriteError, TapeDriveReadWarning,
- TapeDriveWriteWarning, TapeDriveReadError,
- TapeDriveWriteError, TapeDriveHardwareError,
- TapeDriveUnsupportedMedia, TapeDriveScsiConnectionError,
- TapeDriveTimetoClean, TapeDriveCleanDriveNow,
- TapeDriveMediaLifeExpired, TapeDriveSnappedTape);
- {$EXTERNALSYM _TAPE_DRIVE_PROBLEM_TYPE}
- TAPE_DRIVE_PROBLEM_TYPE = _TAPE_DRIVE_PROBLEM_TYPE;
- TTapeDriveProblemType = TAPE_DRIVE_PROBLEM_TYPE;
-
-const
- ACTIVATION_CONTEXT_SECTION_ASSEMBLY_INFORMATION = 1;
- {$EXTERNALSYM ACTIVATION_CONTEXT_SECTION_ASSEMBLY_INFORMATION}
- ACTIVATION_CONTEXT_SECTION_DLL_REDIRECTION = 2;
- {$EXTERNALSYM ACTIVATION_CONTEXT_SECTION_DLL_REDIRECTION}
- ACTIVATION_CONTEXT_SECTION_WINDOW_CLASS_REDIRECTION = 3;
- {$EXTERNALSYM ACTIVATION_CONTEXT_SECTION_WINDOW_CLASS_REDIRECTION}
- ACTIVATION_CONTEXT_SECTION_COM_SERVER_REDIRECTION = 4;
- {$EXTERNALSYM ACTIVATION_CONTEXT_SECTION_COM_SERVER_REDIRECTION}
- ACTIVATION_CONTEXT_SECTION_COM_INTERFACE_REDIRECTION = 5;
- {$EXTERNALSYM ACTIVATION_CONTEXT_SECTION_COM_INTERFACE_REDIRECTION}
- ACTIVATION_CONTEXT_SECTION_COM_TYPE_LIBRARY_REDIRECTION = 6;
- {$EXTERNALSYM ACTIVATION_CONTEXT_SECTION_COM_TYPE_LIBRARY_REDIRECTION}
- ACTIVATION_CONTEXT_SECTION_COM_PROGID_REDIRECTION = 7;
- {$EXTERNALSYM ACTIVATION_CONTEXT_SECTION_COM_PROGID_REDIRECTION}
- ACTIVATION_CONTEXT_SECTION_GLOBAL_OBJECT_RENAME_TABLE = 8;
- {$EXTERNALSYM ACTIVATION_CONTEXT_SECTION_GLOBAL_OBJECT_RENAME_TABLE}
- ACTIVATION_CONTEXT_SECTION_CLR_SURROGATES = 9;
- {$EXTERNALSYM ACTIVATION_CONTEXT_SECTION_CLR_SURROGATES}
-
-implementation
-
-const
- ntdll = 'ntdll.dll';
- kernel32 = 'kernel32.dll';
-
-function WT_SET_MAX_THREADPOOL_THREADS(var Flags: DWORD; Limit: DWORD): DWORD;
-begin
- Flags := Flags or (Limit shl 16);
- Result := Flags;
-end;
-
-function VALID_IMPERSONATION_LEVEL(L: TSecurityImpersonationLevel): BOOL;
-begin
- Result := (L >= SECURITY_MIN_IMPERSONATION_LEVEL) and (L <= SECURITY_MAX_IMPERSONATION_LEVEL);
-end;
-
-{
-function VALID_TOKEN_AUDIT_POLICY_ELEMENT(P: TOKEN_AUDIT_POLICY_ELEMENT): BOOL;
-begin
- Result := ((P.PolicyMask and (not VALID_AUDIT_POLICY_BITS) = 0) and (P.Category <= AuditEventMaxType);
-// ((((P).PolicyMask & ~VALID_AUDIT_POLICY_BITS) == 0) && \
-// ((P).Category <= AuditEventMaxType))
-end;
-}
-
-function PER_USER_AUDITING_POLICY_SIZE(p: PTOKEN_AUDIT_POLICY): DWORD;
-begin
- Result := SizeOf(TOKEN_AUDIT_POLICY);
- if p^.PolicyCount > ANYSIZE_ARRAY then
- Result := Result + SizeOf(TOKEN_AUDIT_POLICY_ELEMENT) * (P^.PolicyCount - ANYSIZE_ARRAY);
-// ( sizeof(TOKEN_AUDIT_POLICY) + (((p)->PolicyCount > ANYSIZE_ARRAY) ? (sizeof(TOKEN_AUDIT_POLICY_ELEMENT) * ((p)->PolicyCount - ANYSIZE_ARRAY)) : 0) )
-end;
-
-function PER_USER_AUDITING_POLICY_SIZE_BY_COUNT(C: DWORD): DWORD;
-begin
- Result := SizeOf(TOKEN_AUDIT_POLICY);
- if C > ANYSIZE_ARRAY then
- Result := Result + SizeOf(TOKEN_AUDIT_POLICY_ELEMENT) * (C - ANYSIZE_ARRAY);
-// ( sizeof(TOKEN_AUDIT_POLICY) + (((C) > ANYSIZE_ARRAY) ? (sizeof(TOKEN_AUDIT_POLICY_ELEMENT) * ((C) - ANYSIZE_ARRAY)) : 0) )
-end;
-
-function NtCurrentTeb: PNT_TIB;
-asm
- MOV EAX, FS:[0]
-end;
-
-function GetFiberData: PVOID;
-asm
- MOV EAX, FS:[$10]
- MOV EAX, [EAX]
-end;
-
-function GetCurrentFiber: PVOID;
-asm
- MOV EAX, FS:[$10]
-end;
-
-function Int32x32To64(a, b: LONG): LONGLONG;
-begin
- Result := a * b;
-end;
-
-function UInt32x32To64(a, b: DWORD): ULONGLONG;
-begin
- Result := a * b;
-end;
-
-function MAKELANGID(PrimaryLang, SubLang: USHORT): WORD;
-begin
- Result := (SubLang shl 10) or PrimaryLang;
-end;
-
-function PRIMARYLANGID(LangId: WORD): WORD;
-begin
- Result := LangId and $3FF;
-end;
-
-function SUBLANGID(LangId: WORD): WORD;
-begin
- Result := LangId shr 10;
-end;
-
-function MAKELCID(LangId, SortId: WORD): DWORD;
-begin
- Result := (DWORD(SortId) shl 16) or DWORD(LangId);
-end;
-
-function MAKESORTLCID(LangId, SortId, SortVersion: WORD): DWORD;
-begin
- Result := MAKELCID(LangId, SortId) or (SortVersion shl 20);
-end;
-
-function LANGIDFROMLCID(LocaleId: LCID): WORD;
-begin
- Result := WORD(LocaleId);
-end;
-
-function SORTIDFROMLCID(LocaleId: LCID): WORD;
-begin
- Result := WORD((DWORD(LocaleId) shr 16) and $F);
-end;
-
-function SORTVERSIONFROMLCID(LocaleId: LCID): WORD;
-begin
- Result := WORD((DWORD(LocaleId) shr 20) and $F);
-end;
-
-function LANG_SYSTEM_DEFAULT: WORD;
-begin
- Result := MAKELANGID(LANG_NEUTRAL, SUBLANG_SYS_DEFAULT);
-end;
-
-function LANG_USER_DEFAULT: WORD;
-begin
- Result := MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT);
-end;
-
-function LOCALE_SYSTEM_DEFAULT: DWORD;
-begin
- Result := MAKELCID(LANG_SYSTEM_DEFAULT, SORT_DEFAULT);
-end;
-
-function LOCALE_USER_DEFAULT: DWORD;
-begin
- Result := MAKELCID(LANG_USER_DEFAULT, SORT_DEFAULT);
-end;
-
-function LOCALE_NEUTRAL: DWORD;
-begin
- Result := MAKELCID(MAKELANGID(LANG_NEUTRAL, SUBLANG_NEUTRAL), SORT_DEFAULT);
-end;
-
-function LOCALE_INVARIANT: DWORD;
-begin
- Result := MAKELCID(MAKELANGID(LANG_INVARIANT, SUBLANG_NEUTRAL), SORT_DEFAULT);
-end;
-
-function IsReparseTagMicrosoft(Tag: ULONG): Boolean;
-begin
- Result := (Tag and ULONG($80000000)) <> 0;
-end;
-
-function IsReparseTagHighLatency(Tag: ULONG): Boolean;
-begin
- Result := (Tag and ULONG($40000000)) <> 0;
-end;
-
-function IsReparseTagNameSurrogate(Tag: ULONG): Boolean;
-begin
- Result := (Tag and ULONG($20000000)) <> 0;
-end;
-
-// IMAGE_FIRST_SECTION by Nico Bendlin - supplied by Markus Fuchs
-
-function FieldOffset(const Struc; const Field): Cardinal;
-begin
- Result := Cardinal(@Field) - Cardinal(@Struc);
-end;
-
-function IMAGE_FIRST_SECTION(NtHeader: PImageNtHeaders): PImageSectionHeader;
-begin
- Result := PImageSectionHeader(Cardinal(NtHeader) +
- FieldOffset(NtHeader^, NtHeader^.OptionalHeader) +
- NtHeader^.FileHeader.SizeOfOptionalHeader);
-end;
-
-function BTYPE(x: DWORD): DWORD;
-begin
- Result := x and N_BTMASK;
-end;
-
-function ISPTR(x: DWORD): Boolean;
-begin
- Result := (x and N_TMASK) = (IMAGE_SYM_DTYPE_POINTER shl N_BTSHFT);
-end;
-
-function ISFCN(x: DWORD): Boolean;
-begin
- Result := (x and N_TMASK) = (IMAGE_SYM_DTYPE_FUNCTION shl N_BTSHFT);
-end;
-
-function ISARY(x: DWORD): Boolean;
-begin
- Result := (x and N_TMASK) = (IMAGE_SYM_DTYPE_ARRAY shl N_BTSHFT);
-end;
-
-function ISTAG(x: DWORD): Boolean;
-begin
- Result := (x = IMAGE_SYM_CLASS_STRUCT_TAG) or (x = IMAGE_SYM_CLASS_UNION_TAG) or
- (x = IMAGE_SYM_CLASS_ENUM_TAG);
-end;
-
-function IMAGE_ORDINAL64(Ordinal: ULONGLONG): ULONGLONG;
-begin
- Result := (Ordinal and $ffff);
-end;
-
-function IMAGE_ORDINAL32(Ordinal: DWORD): DWORD;
-begin
- Result := (Ordinal and $ffff);
-end;
-
-function IMAGE_ORDINAL(Ordinal: DWORD): DWORD;
-begin
- Result := (Ordinal and $ffff);
-end;
-
-function IMAGE_SNAP_BY_ORDINAL64(Ordinal: ULONGLONG): Boolean;
-begin
- Result := ((Ordinal and IMAGE_ORDINAL_FLAG64) <> 0);
-end;
-
-function IMAGE_SNAP_BY_ORDINAL32(Ordinal: DWORD): Boolean;
-begin
- Result := ((Ordinal and IMAGE_ORDINAL_FLAG32) <> 0);
-end;
-
-function IMAGE_SNAP_BY_ORDINAL(Ordinal: DWORD): Boolean;
-begin
- Result := ((Ordinal and IMAGE_ORDINAL_FLAG32) <> 0);
-end;
-
-function HEAP_MAKE_TAG_FLAGS(b, o: DWORD): DWORD;
-begin
- Result := b + (o shl 18);
-end;
-
-procedure VER_SET_CONDITION(var Mask: DWORDLONG; TypeBitmask, ConditionMask: ULONG);
-begin
- Mask := VerSetConditionMask(Mask, TypeBitmask, ConditionMask);
-end;
-
-{$IFDEF DYNAMIC_LINK}
-
-var
- _RtlCaptureContext: Pointer;
-
-procedure RtlCaptureContext;
-begin
- GetProcedureAddress(_RtlCaptureContext, ntdll, 'RtlCaptureContext');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RtlCaptureContext]
- end;
-end;
-
-var
- _RtlCompareMemory: Pointer;
-
-function RtlCompareMemory;
-begin
- GetProcedureAddress(_RtlCompareMemory, ntdll, 'RtlCompareMemory');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RtlCompareMemory]
- end;
-end;
-
-var
- _VerSetConditionMask: Pointer;
-
-function VerSetConditionMask;
-begin
- GetProcedureAddress(_VerSetConditionMask, kernel32, 'VerSetConditionMask');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_VerSetConditionMask]
- end;
-end;
-
-var
- _RtlInitializeSListHead: Pointer;
-
-procedure RtlInitializeSListHead;
-begin
- GetProcedureAddress(_RtlInitializeSListHead, 'ntdll.dll', 'RtlInitializeSListHead');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RtlInitializeSListHead]
- end;
-end;
-
-var
- _RtlFirstEntrySList: Pointer;
-
-function RtlFirstEntrySList;
-begin
- GetProcedureAddress(_RtlFirstEntrySList, 'ntdll.dll', 'RtlFirstEntrySList');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RtlFirstEntrySList]
- end;
-end;
-
-var
- _RtlInterlockedPopEntrySList: Pointer;
-
-function RtlInterlockedPopEntrySList;
-begin
- GetProcedureAddress(_RtlInterlockedPopEntrySList, 'ntdll.dll', 'RtlInterlockedPopEntrySList');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RtlInterlockedPopEntrySList]
- end;
-end;
-
-var
- _RtlInterlockedPushEntrySList: Pointer;
-
-function RtlInterlockedPushEntrySList;
-begin
- GetProcedureAddress(_RtlInterlockedPushEntrySList, 'ntdll.dll', 'RtlInterlockedPushEntrySList');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RtlInterlockedPushEntrySList]
- end;
-end;
-
-var
- _RtlInterlockedFlushSList: Pointer;
-
-function RtlInterlockedFlushSList;
-begin
- GetProcedureAddress(_RtlInterlockedFlushSList, 'ntdll.dll', 'RtlInterlockedFlushSList');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RtlInterlockedFlushSList]
- end;
-end;
-
-var
- _RtlQueryDepthSList: Pointer;
-
-function RtlQueryDepthSList;
-begin
- GetProcedureAddress(_RtlQueryDepthSList, 'ntdll.dll', 'RtlQueryDepthSList');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RtlQueryDepthSList]
- end;
-end;
-
-{$ELSE}
-
-procedure RtlCaptureContext; external ntdll name 'RtlCaptureContext';
-function RtlCompareMemory; external ntdll name 'RtlCompareMemory';
-function VerSetConditionMask; external kernel32 name 'VerSetConditionMask';
-procedure RtlInitializeSListHead; external 'ntdll.dll' name 'RtlInitializeSListHead';
-function RtlFirstEntrySList; external 'ntdll.dll' name 'RtlFirstEntrySList';
-function RtlInterlockedPopEntrySList; external 'ntdll.dll' name 'RtlInterlockedPopEntrySList';
-function RtlInterlockedPushEntrySList; external 'ntdll.dll' name 'RtlInterlockedPushEntrySList';
-function RtlInterlockedFlushSList; external 'ntdll.dll' name 'RtlInterlockedFlushSList';
-function RtlQueryDepthSList; external 'ntdll.dll' name 'RtlQueryDepthSList';
-
-{$ENDIF DYNAMIC_LINK}
-
-end.
+{******************************************************************************}
+{ }
+{ Windows Types API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: winnt.h, released August 2001. The original Pascal }
+{ code is: WinNT.pas, released December 2000. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwawinnt.pas,v 1.1 2005/04/04 07:56:11 marco Exp $
+
+unit JwaWinNT;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "winnt.h"'}
+{$HPPEMIT ''}
+{$HPPEMIT 'typedef PACL *PPACL'}
+{$HPPEMIT 'typedef PSID *PPSID'}
+{$HPPEMIT 'typedef PSECURITY_DESCRIPTOR *PPSECURITY_DESCRIPTOR'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaWinType;
+
+const
+ MAXBYTE = BYTE($ff);
+ {$EXTERNALSYM MAXBYTE}
+ MAXWORD = WORD($ffff);
+ {$EXTERNALSYM MAXWORD}
+ MAXDWORD = DWORD($ffffffff);
+ {$EXTERNALSYM MAXDWORD}
+
+const
+ VER_SERVER_NT = DWORD($80000000);
+ {$EXTERNALSYM VER_SERVER_NT}
+ VER_WORKSTATION_NT = $40000000;
+ {$EXTERNALSYM VER_WORKSTATION_NT}
+ VER_SUITE_SMALLBUSINESS = $00000001;
+ {$EXTERNALSYM VER_SUITE_SMALLBUSINESS}
+ VER_SUITE_ENTERPRISE = $00000002;
+ {$EXTERNALSYM VER_SUITE_ENTERPRISE}
+ VER_SUITE_BACKOFFICE = $00000004;
+ {$EXTERNALSYM VER_SUITE_BACKOFFICE}
+ VER_SUITE_COMMUNICATIONS = $00000008;
+ {$EXTERNALSYM VER_SUITE_COMMUNICATIONS}
+ VER_SUITE_TERMINAL = $00000010;
+ {$EXTERNALSYM VER_SUITE_TERMINAL}
+ VER_SUITE_SMALLBUSINESS_RESTRICTED = $00000020;
+ {$EXTERNALSYM VER_SUITE_SMALLBUSINESS_RESTRICTED}
+ VER_SUITE_EMBEDDEDNT = $00000040;
+ {$EXTERNALSYM VER_SUITE_EMBEDDEDNT}
+ VER_SUITE_DATACENTER = $00000080;
+ {$EXTERNALSYM VER_SUITE_DATACENTER}
+ VER_SUITE_SINGLEUSERTS = $00000100;
+ {$EXTERNALSYM VER_SUITE_SINGLEUSERTS}
+ VER_SUITE_PERSONAL = $00000200;
+ {$EXTERNALSYM VER_SUITE_PERSONAL}
+ VER_SUITE_BLADE = $00000400;
+ {$EXTERNALSYM VER_SUITE_BLADE}
+ VER_SUITE_EMBEDDED_RESTRICTED = $00000800;
+ {$EXTERNALSYM VER_SUITE_EMBEDDED_RESTRICTED}
+ VER_SUITE_SECURITY_APPLIANCE = $00001000;
+ {$EXTERNALSYM VER_SUITE_SECURITY_APPLIANCE}
+
+//
+// Language IDs.
+//
+// The following two combinations of primary language ID and
+// sublanguage ID have special semantics:
+//
+// Primary Language ID Sublanguage ID Result
+// ------------------- --------------- ------------------------
+// LANG_NEUTRAL SUBLANG_NEUTRAL Language neutral
+// LANG_NEUTRAL SUBLANG_DEFAULT User default language
+// LANG_NEUTRAL SUBLANG_SYS_DEFAULT System default language
+// LANG_INVARIANT SUBLANG_NEUTRAL Invariant locale
+//
+
+//
+// Primary language IDs.
+//
+
+const
+ LANG_NEUTRAL = $00;
+ {$EXTERNALSYM LANG_NEUTRAL}
+ LANG_INVARIANT = $7f;
+ {$EXTERNALSYM LANG_INVARIANT}
+
+ LANG_AFRIKAANS = $36;
+ {$EXTERNALSYM LANG_AFRIKAANS}
+ LANG_ALBANIAN = $1c;
+ {$EXTERNALSYM LANG_ALBANIAN}
+ LANG_ARABIC = $01;
+ {$EXTERNALSYM LANG_ARABIC}
+ LANG_ARMENIAN = $2b;
+ {$EXTERNALSYM LANG_ARMENIAN}
+ LANG_ASSAMESE = $4d;
+ {$EXTERNALSYM LANG_ASSAMESE}
+ LANG_AZERI = $2c;
+ {$EXTERNALSYM LANG_AZERI}
+ LANG_BASQUE = $2d;
+ {$EXTERNALSYM LANG_BASQUE}
+ LANG_BELARUSIAN = $23;
+ {$EXTERNALSYM LANG_BELARUSIAN}
+ LANG_BENGALI = $45;
+ {$EXTERNALSYM LANG_BENGALI}
+ LANG_BULGARIAN = $02;
+ {$EXTERNALSYM LANG_BULGARIAN}
+ LANG_CATALAN = $03;
+ {$EXTERNALSYM LANG_CATALAN}
+ LANG_CHINESE = $04;
+ {$EXTERNALSYM LANG_CHINESE}
+ LANG_CROATIAN = $1a;
+ {$EXTERNALSYM LANG_CROATIAN}
+ LANG_CZECH = $05;
+ {$EXTERNALSYM LANG_CZECH}
+ LANG_DANISH = $06;
+ {$EXTERNALSYM LANG_DANISH}
+ LANG_DIVEHI = $65;
+ {$EXTERNALSYM LANG_DIVEHI}
+ LANG_DUTCH = $13;
+ {$EXTERNALSYM LANG_DUTCH}
+ LANG_ENGLISH = $09;
+ {$EXTERNALSYM LANG_ENGLISH}
+ LANG_ESTONIAN = $25;
+ {$EXTERNALSYM LANG_ESTONIAN}
+ LANG_FAEROESE = $38;
+ {$EXTERNALSYM LANG_FAEROESE}
+ LANG_FARSI = $29;
+ {$EXTERNALSYM LANG_FARSI}
+ LANG_FINNISH = $0b;
+ {$EXTERNALSYM LANG_FINNISH}
+ LANG_FRENCH = $0c;
+ {$EXTERNALSYM LANG_FRENCH}
+ LANG_GALICIAN = $56;
+ {$EXTERNALSYM LANG_GALICIAN}
+ LANG_GEORGIAN = $37;
+ {$EXTERNALSYM LANG_GEORGIAN}
+ LANG_GERMAN = $07;
+ {$EXTERNALSYM LANG_GERMAN}
+ LANG_GREEK = $08;
+ {$EXTERNALSYM LANG_GREEK}
+ LANG_GUJARATI = $47;
+ {$EXTERNALSYM LANG_GUJARATI}
+ LANG_HEBREW = $0d;
+ {$EXTERNALSYM LANG_HEBREW}
+ LANG_HINDI = $39;
+ {$EXTERNALSYM LANG_HINDI}
+ LANG_HUNGARIAN = $0e;
+ {$EXTERNALSYM LANG_HUNGARIAN}
+ LANG_ICELANDIC = $0f;
+ {$EXTERNALSYM LANG_ICELANDIC}
+ LANG_INDONESIAN = $21;
+ {$EXTERNALSYM LANG_INDONESIAN}
+ LANG_ITALIAN = $10;
+ {$EXTERNALSYM LANG_ITALIAN}
+ LANG_JAPANESE = $11;
+ {$EXTERNALSYM LANG_JAPANESE}
+ LANG_KANNADA = $4b;
+ {$EXTERNALSYM LANG_KANNADA}
+ LANG_KASHMIRI = $60;
+ {$EXTERNALSYM LANG_KASHMIRI}
+ LANG_KAZAK = $3f;
+ {$EXTERNALSYM LANG_KAZAK}
+ LANG_KONKANI = $57;
+ {$EXTERNALSYM LANG_KONKANI}
+ LANG_KOREAN = $12;
+ {$EXTERNALSYM LANG_KOREAN}
+ LANG_KYRGYZ = $40;
+ {$EXTERNALSYM LANG_KYRGYZ}
+ LANG_LATVIAN = $26;
+ {$EXTERNALSYM LANG_LATVIAN}
+ LANG_LITHUANIAN = $27;
+ {$EXTERNALSYM LANG_LITHUANIAN}
+ LANG_MACEDONIAN = $2f; // the Former Yugoslav Republic of Macedonia
+ {$EXTERNALSYM LANG_MACEDONIAN}
+ LANG_MALAY = $3e;
+ {$EXTERNALSYM LANG_MALAY}
+ LANG_MALAYALAM = $4c;
+ {$EXTERNALSYM LANG_MALAYALAM}
+ LANG_MANIPURI = $58;
+ {$EXTERNALSYM LANG_MANIPURI}
+ LANG_MARATHI = $4e;
+ {$EXTERNALSYM LANG_MARATHI}
+ LANG_MONGOLIAN = $50;
+ {$EXTERNALSYM LANG_MONGOLIAN}
+ LANG_NEPALI = $61;
+ {$EXTERNALSYM LANG_NEPALI}
+ LANG_NORWEGIAN = $14;
+ {$EXTERNALSYM LANG_NORWEGIAN}
+ LANG_ORIYA = $48;
+ {$EXTERNALSYM LANG_ORIYA}
+ LANG_POLISH = $15;
+ {$EXTERNALSYM LANG_POLISH}
+ LANG_PORTUGUESE = $16;
+ {$EXTERNALSYM LANG_PORTUGUESE}
+ LANG_PUNJABI = $46;
+ {$EXTERNALSYM LANG_PUNJABI}
+ LANG_ROMANIAN = $18;
+ {$EXTERNALSYM LANG_ROMANIAN}
+ LANG_RUSSIAN = $19;
+ {$EXTERNALSYM LANG_RUSSIAN}
+ LANG_SANSKRIT = $4f;
+ {$EXTERNALSYM LANG_SANSKRIT}
+ LANG_SERBIAN = $1a;
+ {$EXTERNALSYM LANG_SERBIAN}
+ LANG_SINDHI = $59;
+ {$EXTERNALSYM LANG_SINDHI}
+ LANG_SLOVAK = $1b;
+ {$EXTERNALSYM LANG_SLOVAK}
+ LANG_SLOVENIAN = $24;
+ {$EXTERNALSYM LANG_SLOVENIAN}
+ LANG_SPANISH = $0a;
+ {$EXTERNALSYM LANG_SPANISH}
+ LANG_SWAHILI = $41;
+ {$EXTERNALSYM LANG_SWAHILI}
+ LANG_SWEDISH = $1d;
+ {$EXTERNALSYM LANG_SWEDISH}
+ LANG_SYRIAC = $5a;
+ {$EXTERNALSYM LANG_SYRIAC}
+ LANG_TAMIL = $49;
+ {$EXTERNALSYM LANG_TAMIL}
+ LANG_TATAR = $44;
+ {$EXTERNALSYM LANG_TATAR}
+ LANG_TELUGU = $4a;
+ {$EXTERNALSYM LANG_TELUGU}
+ LANG_THAI = $1e;
+ {$EXTERNALSYM LANG_THAI}
+ LANG_TURKISH = $1f;
+ {$EXTERNALSYM LANG_TURKISH}
+ LANG_UKRAINIAN = $22;
+ {$EXTERNALSYM LANG_UKRAINIAN}
+ LANG_URDU = $20;
+ {$EXTERNALSYM LANG_URDU}
+ LANG_UZBEK = $43;
+ {$EXTERNALSYM LANG_UZBEK}
+ LANG_VIETNAMESE = $2a;
+ {$EXTERNALSYM LANG_VIETNAMESE}
+
+//
+// Sublanguage IDs.
+//
+// The name immediately following SUBLANG_ dictates which primary
+// language ID that sublanguage ID can be combined with to form a
+// valid language ID.
+//
+
+ SUBLANG_NEUTRAL = $00; // language neutral
+ {$EXTERNALSYM SUBLANG_NEUTRAL}
+ SUBLANG_DEFAULT = $01; // user default
+ {$EXTERNALSYM SUBLANG_DEFAULT}
+ SUBLANG_SYS_DEFAULT = $02; // system default
+ {$EXTERNALSYM SUBLANG_SYS_DEFAULT}
+
+ SUBLANG_ARABIC_SAUDI_ARABIA = $01; // Arabic (Saudi Arabia)
+ {$EXTERNALSYM SUBLANG_ARABIC_SAUDI_ARABIA}
+ SUBLANG_ARABIC_IRAQ = $02; // Arabic (Iraq)
+ {$EXTERNALSYM SUBLANG_ARABIC_IRAQ}
+ SUBLANG_ARABIC_EGYPT = $03; // Arabic (Egypt)
+ {$EXTERNALSYM SUBLANG_ARABIC_EGYPT}
+ SUBLANG_ARABIC_LIBYA = $04; // Arabic (Libya)
+ {$EXTERNALSYM SUBLANG_ARABIC_LIBYA}
+ SUBLANG_ARABIC_ALGERIA = $05; // Arabic (Algeria)
+ {$EXTERNALSYM SUBLANG_ARABIC_ALGERIA}
+ SUBLANG_ARABIC_MOROCCO = $06; // Arabic (Morocco)
+ {$EXTERNALSYM SUBLANG_ARABIC_MOROCCO}
+ SUBLANG_ARABIC_TUNISIA = $07; // Arabic (Tunisia)
+ {$EXTERNALSYM SUBLANG_ARABIC_TUNISIA}
+ SUBLANG_ARABIC_OMAN = $08; // Arabic (Oman)
+ {$EXTERNALSYM SUBLANG_ARABIC_OMAN}
+ SUBLANG_ARABIC_YEMEN = $09; // Arabic (Yemen)
+ {$EXTERNALSYM SUBLANG_ARABIC_YEMEN}
+ SUBLANG_ARABIC_SYRIA = $0a; // Arabic (Syria)
+ {$EXTERNALSYM SUBLANG_ARABIC_SYRIA}
+ SUBLANG_ARABIC_JORDAN = $0b; // Arabic (Jordan)
+ {$EXTERNALSYM SUBLANG_ARABIC_JORDAN}
+ SUBLANG_ARABIC_LEBANON = $0c; // Arabic (Lebanon)
+ {$EXTERNALSYM SUBLANG_ARABIC_LEBANON}
+ SUBLANG_ARABIC_KUWAIT = $0d; // Arabic (Kuwait)
+ {$EXTERNALSYM SUBLANG_ARABIC_KUWAIT}
+ SUBLANG_ARABIC_UAE = $0e; // Arabic (U.A.E)
+ {$EXTERNALSYM SUBLANG_ARABIC_UAE}
+ SUBLANG_ARABIC_BAHRAIN = $0f; // Arabic (Bahrain)
+ {$EXTERNALSYM SUBLANG_ARABIC_BAHRAIN}
+ SUBLANG_ARABIC_QATAR = $10; // Arabic (Qatar)
+ {$EXTERNALSYM SUBLANG_ARABIC_QATAR}
+ SUBLANG_AZERI_LATIN = $01; // Azeri (Latin)
+ {$EXTERNALSYM SUBLANG_AZERI_LATIN}
+ SUBLANG_AZERI_CYRILLIC = $02; // Azeri (Cyrillic)
+ {$EXTERNALSYM SUBLANG_AZERI_CYRILLIC}
+ SUBLANG_CHINESE_TRADITIONAL = $01; // Chinese (Taiwan)
+ {$EXTERNALSYM SUBLANG_CHINESE_TRADITIONAL}
+ SUBLANG_CHINESE_SIMPLIFIED = $02; // Chinese (PR China)
+ {$EXTERNALSYM SUBLANG_CHINESE_SIMPLIFIED}
+ SUBLANG_CHINESE_HONGKONG = $03; // Chinese (Hong Kong S.A.R., P.R.C.)
+ {$EXTERNALSYM SUBLANG_CHINESE_HONGKONG}
+ SUBLANG_CHINESE_SINGAPORE = $04; // Chinese (Singapore)
+ {$EXTERNALSYM SUBLANG_CHINESE_SINGAPORE}
+ SUBLANG_CHINESE_MACAU = $05; // Chinese (Macau S.A.R.)
+ {$EXTERNALSYM SUBLANG_CHINESE_MACAU}
+ SUBLANG_DUTCH = $01; // Dutch
+ {$EXTERNALSYM SUBLANG_DUTCH}
+ SUBLANG_DUTCH_BELGIAN = $02; // Dutch (Belgian)
+ {$EXTERNALSYM SUBLANG_DUTCH_BELGIAN}
+ SUBLANG_ENGLISH_US = $01; // English (USA)
+ {$EXTERNALSYM SUBLANG_ENGLISH_US}
+ SUBLANG_ENGLISH_UK = $02; // English (UK)
+ {$EXTERNALSYM SUBLANG_ENGLISH_UK}
+ SUBLANG_ENGLISH_AUS = $03; // English (Australian)
+ {$EXTERNALSYM SUBLANG_ENGLISH_AUS}
+ SUBLANG_ENGLISH_CAN = $04; // English (Canadian)
+ {$EXTERNALSYM SUBLANG_ENGLISH_CAN}
+ SUBLANG_ENGLISH_NZ = $05; // English (New Zealand)
+ {$EXTERNALSYM SUBLANG_ENGLISH_NZ}
+ SUBLANG_ENGLISH_EIRE = $06; // English (Irish)
+ {$EXTERNALSYM SUBLANG_ENGLISH_EIRE}
+ SUBLANG_ENGLISH_SOUTH_AFRICA = $07; // English (South Africa)
+ {$EXTERNALSYM SUBLANG_ENGLISH_SOUTH_AFRICA}
+ SUBLANG_ENGLISH_JAMAICA = $08; // English (Jamaica)
+ {$EXTERNALSYM SUBLANG_ENGLISH_JAMAICA}
+ SUBLANG_ENGLISH_CARIBBEAN = $09; // English (Caribbean)
+ {$EXTERNALSYM SUBLANG_ENGLISH_CARIBBEAN}
+ SUBLANG_ENGLISH_BELIZE = $0a; // English (Belize)
+ {$EXTERNALSYM SUBLANG_ENGLISH_BELIZE}
+ SUBLANG_ENGLISH_TRINIDAD = $0b; // English (Trinidad)
+ {$EXTERNALSYM SUBLANG_ENGLISH_TRINIDAD}
+ SUBLANG_ENGLISH_ZIMBABWE = $0c; // English (Zimbabwe)
+ {$EXTERNALSYM SUBLANG_ENGLISH_ZIMBABWE}
+ SUBLANG_ENGLISH_PHILIPPINES = $0d; // English (Philippines)
+ {$EXTERNALSYM SUBLANG_ENGLISH_PHILIPPINES}
+ SUBLANG_FRENCH = $01; // French
+ {$EXTERNALSYM SUBLANG_FRENCH}
+ SUBLANG_FRENCH_BELGIAN = $02; // French (Belgian)
+ {$EXTERNALSYM SUBLANG_FRENCH_BELGIAN}
+ SUBLANG_FRENCH_CANADIAN = $03; // French (Canadian)
+ {$EXTERNALSYM SUBLANG_FRENCH_CANADIAN}
+ SUBLANG_FRENCH_SWISS = $04; // French (Swiss)
+ {$EXTERNALSYM SUBLANG_FRENCH_SWISS}
+ SUBLANG_FRENCH_LUXEMBOURG = $05; // French (Luxembourg)
+ {$EXTERNALSYM SUBLANG_FRENCH_LUXEMBOURG}
+ SUBLANG_FRENCH_MONACO = $06; // French (Monaco)
+ {$EXTERNALSYM SUBLANG_FRENCH_MONACO}
+ SUBLANG_GERMAN = $01; // German
+ {$EXTERNALSYM SUBLANG_GERMAN}
+ SUBLANG_GERMAN_SWISS = $02; // German (Swiss)
+ {$EXTERNALSYM SUBLANG_GERMAN_SWISS}
+ SUBLANG_GERMAN_AUSTRIAN = $03; // German (Austrian)
+ {$EXTERNALSYM SUBLANG_GERMAN_AUSTRIAN}
+ SUBLANG_GERMAN_LUXEMBOURG = $04; // German (Luxembourg)
+ {$EXTERNALSYM SUBLANG_GERMAN_LUXEMBOURG}
+ SUBLANG_GERMAN_LIECHTENSTEIN = $05; // German (Liechtenstein)
+ {$EXTERNALSYM SUBLANG_GERMAN_LIECHTENSTEIN}
+ SUBLANG_ITALIAN = $01; // Italian
+ {$EXTERNALSYM SUBLANG_ITALIAN}
+ SUBLANG_ITALIAN_SWISS = $02; // Italian (Swiss)
+ {$EXTERNALSYM SUBLANG_ITALIAN_SWISS}
+ SUBLANG_KASHMIRI_SASIA = $02; // Kashmiri (South Asia)
+ {$EXTERNALSYM SUBLANG_KASHMIRI_SASIA}
+ SUBLANG_KASHMIRI_INDIA = $02; // For app compatibility only
+ {$EXTERNALSYM SUBLANG_KASHMIRI_INDIA}
+ SUBLANG_KOREAN = $01; // Korean (Extended Wansung)
+ {$EXTERNALSYM SUBLANG_KOREAN}
+ SUBLANG_LITHUANIAN = $01; // Lithuanian
+ {$EXTERNALSYM SUBLANG_LITHUANIAN}
+ SUBLANG_MALAY_MALAYSIA = $01; // Malay (Malaysia)
+ {$EXTERNALSYM SUBLANG_MALAY_MALAYSIA}
+ SUBLANG_MALAY_BRUNEI_DARUSSALAM = $02; // Malay (Brunei Darussalam)
+ {$EXTERNALSYM SUBLANG_MALAY_BRUNEI_DARUSSALAM}
+ SUBLANG_NEPALI_INDIA = $02; // Nepali (India)
+ {$EXTERNALSYM SUBLANG_NEPALI_INDIA}
+ SUBLANG_NORWEGIAN_BOKMAL = $01; // Norwegian (Bokmal)
+ {$EXTERNALSYM SUBLANG_NORWEGIAN_BOKMAL}
+ SUBLANG_NORWEGIAN_NYNORSK = $02; // Norwegian (Nynorsk)
+ {$EXTERNALSYM SUBLANG_NORWEGIAN_NYNORSK}
+ SUBLANG_PORTUGUESE = $02; // Portuguese
+ {$EXTERNALSYM SUBLANG_PORTUGUESE}
+ SUBLANG_PORTUGUESE_BRAZILIAN = $01; // Portuguese (Brazilian)
+ {$EXTERNALSYM SUBLANG_PORTUGUESE_BRAZILIAN}
+ SUBLANG_SERBIAN_LATIN = $02; // Serbian (Latin)
+ {$EXTERNALSYM SUBLANG_SERBIAN_LATIN}
+ SUBLANG_SERBIAN_CYRILLIC = $03; // Serbian (Cyrillic)
+ {$EXTERNALSYM SUBLANG_SERBIAN_CYRILLIC}
+ SUBLANG_SPANISH = $01; // Spanish (Castilian)
+ {$EXTERNALSYM SUBLANG_SPANISH}
+ SUBLANG_SPANISH_MEXICAN = $02; // Spanish (Mexican)
+ {$EXTERNALSYM SUBLANG_SPANISH_MEXICAN}
+ SUBLANG_SPANISH_MODERN = $03; // Spanish (Spain)
+ {$EXTERNALSYM SUBLANG_SPANISH_MODERN}
+ SUBLANG_SPANISH_GUATEMALA = $04; // Spanish (Guatemala)
+ {$EXTERNALSYM SUBLANG_SPANISH_GUATEMALA}
+ SUBLANG_SPANISH_COSTA_RICA = $05; // Spanish (Costa Rica)
+ {$EXTERNALSYM SUBLANG_SPANISH_COSTA_RICA}
+ SUBLANG_SPANISH_PANAMA = $06; // Spanish (Panama)
+ {$EXTERNALSYM SUBLANG_SPANISH_PANAMA}
+ SUBLANG_SPANISH_DOMINICAN_REPUBLIC = $07; // Spanish (Dominican Republic)
+ {$EXTERNALSYM SUBLANG_SPANISH_DOMINICAN_REPUBLIC}
+ SUBLANG_SPANISH_VENEZUELA = $08; // Spanish (Venezuela)
+ {$EXTERNALSYM SUBLANG_SPANISH_VENEZUELA}
+ SUBLANG_SPANISH_COLOMBIA = $09; // Spanish (Colombia)
+ {$EXTERNALSYM SUBLANG_SPANISH_COLOMBIA}
+ SUBLANG_SPANISH_PERU = $0a; // Spanish (Peru)
+ {$EXTERNALSYM SUBLANG_SPANISH_PERU}
+ SUBLANG_SPANISH_ARGENTINA = $0b; // Spanish (Argentina)
+ {$EXTERNALSYM SUBLANG_SPANISH_ARGENTINA}
+ SUBLANG_SPANISH_ECUADOR = $0c; // Spanish (Ecuador)
+ {$EXTERNALSYM SUBLANG_SPANISH_ECUADOR}
+ SUBLANG_SPANISH_CHILE = $0d; // Spanish (Chile)
+ {$EXTERNALSYM SUBLANG_SPANISH_CHILE}
+ SUBLANG_SPANISH_URUGUAY = $0e; // Spanish (Uruguay)
+ {$EXTERNALSYM SUBLANG_SPANISH_URUGUAY}
+ SUBLANG_SPANISH_PARAGUAY = $0f; // Spanish (Paraguay)
+ {$EXTERNALSYM SUBLANG_SPANISH_PARAGUAY}
+ SUBLANG_SPANISH_BOLIVIA = $10; // Spanish (Bolivia)
+ {$EXTERNALSYM SUBLANG_SPANISH_BOLIVIA}
+ SUBLANG_SPANISH_EL_SALVADOR = $11; // Spanish (El Salvador)
+ {$EXTERNALSYM SUBLANG_SPANISH_EL_SALVADOR}
+ SUBLANG_SPANISH_HONDURAS = $12; // Spanish (Honduras)
+ {$EXTERNALSYM SUBLANG_SPANISH_HONDURAS}
+ SUBLANG_SPANISH_NICARAGUA = $13; // Spanish (Nicaragua)
+ {$EXTERNALSYM SUBLANG_SPANISH_NICARAGUA}
+ SUBLANG_SPANISH_PUERTO_RICO = $14; // Spanish (Puerto Rico)
+ {$EXTERNALSYM SUBLANG_SPANISH_PUERTO_RICO}
+ SUBLANG_SWEDISH = $01; // Swedish
+ {$EXTERNALSYM SUBLANG_SWEDISH}
+ SUBLANG_SWEDISH_FINLAND = $02; // Swedish (Finland)
+ {$EXTERNALSYM SUBLANG_SWEDISH_FINLAND}
+ SUBLANG_URDU_PAKISTAN = $01; // Urdu (Pakistan)
+ {$EXTERNALSYM SUBLANG_URDU_PAKISTAN}
+ SUBLANG_URDU_INDIA = $02; // Urdu (India)
+ {$EXTERNALSYM SUBLANG_URDU_INDIA}
+ SUBLANG_UZBEK_LATIN = $01; // Uzbek (Latin)
+ {$EXTERNALSYM SUBLANG_UZBEK_LATIN}
+ SUBLANG_UZBEK_CYRILLIC = $02; // Uzbek (Cyrillic)
+ {$EXTERNALSYM SUBLANG_UZBEK_CYRILLIC}
+
+//
+// Sorting IDs.
+//
+
+ SORT_DEFAULT = $0; // sorting default
+ {$EXTERNALSYM SORT_DEFAULT}
+
+ SORT_JAPANESE_XJIS = $0; // Japanese XJIS order
+ {$EXTERNALSYM SORT_JAPANESE_XJIS}
+ SORT_JAPANESE_UNICODE = $1; // Japanese Unicode order
+ {$EXTERNALSYM SORT_JAPANESE_UNICODE}
+
+ SORT_CHINESE_BIG5 = $0; // Chinese BIG5 order
+ {$EXTERNALSYM SORT_CHINESE_BIG5}
+ SORT_CHINESE_PRCP = $0; // PRC Chinese Phonetic order
+ {$EXTERNALSYM SORT_CHINESE_PRCP}
+ SORT_CHINESE_UNICODE = $1; // Chinese Unicode order
+ {$EXTERNALSYM SORT_CHINESE_UNICODE}
+ SORT_CHINESE_PRC = $2; // PRC Chinese Stroke Count order
+ {$EXTERNALSYM SORT_CHINESE_PRC}
+ SORT_CHINESE_BOPOMOFO = $3; // Traditional Chinese Bopomofo order
+ {$EXTERNALSYM SORT_CHINESE_BOPOMOFO}
+
+ SORT_KOREAN_KSC = $0; // Korean KSC order
+ {$EXTERNALSYM SORT_KOREAN_KSC}
+ SORT_KOREAN_UNICODE = $1; // Korean Unicode order
+ {$EXTERNALSYM SORT_KOREAN_UNICODE}
+
+ SORT_GERMAN_PHONE_BOOK = $1; // German Phone Book order
+ {$EXTERNALSYM SORT_GERMAN_PHONE_BOOK}
+
+ SORT_HUNGARIAN_DEFAULT = $0; // Hungarian Default order
+ {$EXTERNALSYM SORT_HUNGARIAN_DEFAULT}
+ SORT_HUNGARIAN_TECHNICAL = $1; // Hungarian Technical order
+ {$EXTERNALSYM SORT_HUNGARIAN_TECHNICAL}
+
+ SORT_GEORGIAN_TRADITIONAL = $0; // Georgian Traditional order
+ {$EXTERNALSYM SORT_GEORGIAN_TRADITIONAL}
+ SORT_GEORGIAN_MODERN = $1; // Georgian Modern order
+ {$EXTERNALSYM SORT_GEORGIAN_MODERN}
+
+//
+// A language ID is a 16 bit value which is the combination of a
+// primary language ID and a secondary language ID. The bits are
+// allocated as follows:
+//
+// +-----------------------+-------------------------+
+// | Sublanguage ID | Primary Language ID |
+// +-----------------------+-------------------------+
+// 15 10 9 0 bit
+//
+//
+// Language ID creation/extraction macros:
+//
+// MAKELANGID - construct language id from a primary language id and
+// a sublanguage id.
+// PRIMARYLANGID - extract primary language id from a language id.
+// SUBLANGID - extract sublanguage id from a language id.
+//
+
+function MAKELANGID(PrimaryLang, SubLang: USHORT): WORD;
+{$EXTERNALSYM MAKELANGID}
+function PRIMARYLANGID(LangId: WORD): WORD;
+{$EXTERNALSYM PRIMARYLANGID}
+function SUBLANGID(LangId: WORD): WORD;
+{$EXTERNALSYM SUBLANGID}
+
+//
+// A locale ID is a 32 bit value which is the combination of a
+// language ID, a sort ID, and a reserved area. The bits are
+// allocated as follows:
+//
+// +-------------+---------+-------------------------+
+// | Reserved | Sort ID | Language ID |
+// +-------------+---------+-------------------------+
+// 31 20 19 16 15 0 bit
+//
+//
+// Locale ID creation/extraction macros:
+//
+// MAKELCID - construct the locale id from a language id and a sort id.
+// MAKESORTLCID - construct the locale id from a language id, sort id, and sort version.
+// LANGIDFROMLCID - extract the language id from a locale id.
+// SORTIDFROMLCID - extract the sort id from a locale id.
+// SORTVERSIONFROMLCID - extract the sort version from a locale id.
+//
+
+const
+ NLS_VALID_LOCALE_MASK = $000fffff;
+ {$EXTERNALSYM NLS_VALID_LOCALE_MASK}
+
+function MAKELCID(LangId, SortId: WORD): DWORD;
+{$EXTERNALSYM MAKELCID}
+function MAKESORTLCID(LangId, SortId, SortVersion: WORD): DWORD;
+{$EXTERNALSYM MAKESORTLCID}
+function LANGIDFROMLCID(LocaleId: LCID): WORD;
+{$EXTERNALSYM LANGIDFROMLCID}
+function SORTIDFROMLCID(LocaleId: LCID): WORD;
+{$EXTERNALSYM SORTIDFROMLCID}
+function SORTVERSIONFROMLCID(LocaleId: LCID): WORD;
+{$EXTERNALSYM SORTVERSIONFROMLCID}
+
+//
+// Default System and User IDs for language and locale.
+//
+
+function LANG_SYSTEM_DEFAULT: WORD;
+{$EXTERNALSYM LANG_SYSTEM_DEFAULT}
+function LANG_USER_DEFAULT: WORD;
+{$EXTERNALSYM LANG_USER_DEFAULT}
+function LOCALE_SYSTEM_DEFAULT: DWORD;
+{$EXTERNALSYM LOCALE_SYSTEM_DEFAULT}
+function LOCALE_USER_DEFAULT: DWORD;
+{$EXTERNALSYM LOCALE_USER_DEFAULT}
+function LOCALE_NEUTRAL: DWORD;
+{$EXTERNALSYM LOCALE_NEUTRAL}
+function LOCALE_INVARIANT: DWORD;
+{$EXTERNALSYM LOCALE_NEUTRAL}
+
+const
+ // (rom) deleted status codes already in JwaWinStatus.pas
+ DBG_COMMAND_EXCEPTION = DWORD($40010009);
+ {$EXTERNALSYM DBG_COMMAND_EXCEPTION}
+ STATUS_SXS_EARLY_DEACTIVATION = DWORD($C015000F);
+ {$EXTERNALSYM STATUS_SXS_EARLY_DEACTIVATION}
+ STATUS_SXS_INVALID_DEACTIVATION = DWORD($C0150010);
+ {$EXTERNALSYM STATUS_SXS_INVALID_DEACTIVATION}
+
+const
+ MAXIMUM_WAIT_OBJECTS = 64; // Maximum number of wait objects
+ {$EXTERNALSYM MAXIMUM_WAIT_OBJECTS}
+
+ MAXIMUM_SUSPEND_COUNT = MAXCHAR; // Maximum times thread can be suspended
+ {$EXTERNALSYM MAXIMUM_SUSPEND_COUNT}
+
+type
+ KSPIN_LOCK = ULONG_PTR;
+ {$EXTERNALSYM KSPIN_LOCK}
+ PKSPIN_LOCK = ^KSPIN_LOCK;
+ {$EXTERNALSYM PKSPIN_LOCK}
+
+//
+// Define functions to get the address of the current fiber and the
+// current fiber data.
+//
+
+//
+// Disable these two pramas that evaluate to "sti" "cli" on x86 so that driver
+// writers to not leave them inadvertantly in their code.
+//
+
+function GetFiberData: PVOID;
+{$EXTERNALSYM GetFiberData}
+
+function GetCurrentFiber: PVOID;
+{$EXTERNALSYM GetCurrentFiber}
+
+//
+// Define the size of the 80387 save area, which is in the context frame.
+//
+
+const
+ SIZE_OF_80387_REGISTERS = 80;
+ {$EXTERNALSYM SIZE_OF_80387_REGISTERS}
+
+//
+// The following flags control the contents of the CONTEXT structure.
+//
+
+const
+ CONTEXT_i386 = $00010000; // this assumes that i386 and
+ {$EXTERNALSYM CONTEXT_i386}
+ CONTEXT_i486 = $00010000; // i486 have identical context records
+ {$EXTERNALSYM CONTEXT_i486}
+
+const
+ CONTEXT_CONTROL = CONTEXT_i386 or $00000001; // SS:SP, CS:IP, FLAGS, BP
+ {$EXTERNALSYM CONTEXT_CONTROL}
+ CONTEXT_INTEGER = CONTEXT_i386 or $00000002; // AX, BX, CX, DX, SI, DI
+ {$EXTERNALSYM CONTEXT_INTEGER}
+ CONTEXT_SEGMENTS = CONTEXT_i386 or $00000004; // DS, ES, FS, GS
+ {$EXTERNALSYM CONTEXT_SEGMENTS}
+ CONTEXT_FLOATING_POINT = CONTEXT_i386 or $00000008; // 387 state
+ {$EXTERNALSYM CONTEXT_FLOATING_POINT}
+ CONTEXT_DEBUG_REGISTERS = CONTEXT_i386 or $00000010; // DB 0-3,6,7
+ {$EXTERNALSYM CONTEXT_DEBUG_REGISTERS}
+ CONTEXT_EXTENDED_REGISTERS = CONTEXT_i386 or $00000020; // cpu specific extensions
+ {$EXTERNALSYM CONTEXT_EXTENDED_REGISTERS}
+
+ CONTEXT_FULL = CONTEXT_CONTROL or CONTEXT_INTEGER or CONTEXT_SEGMENTS;
+ {$EXTERNALSYM CONTEXT_FULL}
+
+ CONTEXT_ALL = CONTEXT_CONTROL or CONTEXT_INTEGER or CONTEXT_SEGMENTS or CONTEXT_FLOATING_POINT or CONTEXT_DEBUG_REGISTERS;
+ {$EXTERNALSYM CONTEXT_ALL}
+
+//
+// Define initial MxCsr control.
+//
+
+ INITIAL_MXCSR = $1f80; // initial MXCSR value
+ {$EXTERNALSYM INITIAL_MXCSR}
+
+ MAXIMUM_SUPPORTED_EXTENSION = 512;
+ {$EXTERNALSYM MAXIMUM_SUPPORTED_EXTENSION}
+
+type
+ PFLOATING_SAVE_AREA = ^FLOATING_SAVE_AREA;
+ {$EXTERNALSYM PFLOATING_SAVE_AREA}
+ _FLOATING_SAVE_AREA = record
+ ControlWord: DWORD;
+ StatusWord: DWORD;
+ TagWord: DWORD;
+ ErrorOffset: DWORD;
+ ErrorSelector: DWORD;
+ DataOffset: DWORD;
+ DataSelector: DWORD;
+ RegisterArea: array [0..SIZE_OF_80387_REGISTERS - 1] of BYTE;
+ Cr0NpxState: DWORD;
+ end;
+ {$EXTERNALSYM _FLOATING_SAVE_AREA}
+ FLOATING_SAVE_AREA = _FLOATING_SAVE_AREA;
+ {$EXTERNALSYM FLOATING_SAVE_AREA}
+ TFloatingSaveArea = FLOATING_SAVE_AREA;
+ PFloatingSaveArea = PFLOATING_SAVE_AREA;
+
+//
+// Context Frame
+//
+// This frame has a several purposes: 1) it is used as an argument to
+// NtContinue, 2) is is used to constuct a call frame for APC delivery,
+// and 3) it is used in the user level thread creation routines.
+//
+// The layout of the record conforms to a standard call frame.
+//
+
+type
+ PContext = ^CONTEXT;
+ _CONTEXT = record
+
+ //
+ // The flags values within this flag control the contents of
+ // a CONTEXT record.
+ //
+ // If the context record is used as an input parameter, then
+ // for each portion of the context record controlled by a flag
+ // whose value is set, it is assumed that that portion of the
+ // context record contains valid context. If the context record
+ // is being used to modify a threads context, then only that
+ // portion of the threads context will be modified.
+ //
+ // If the context record is used as an IN OUT parameter to capture
+ // the context of a thread, then only those portions of the thread's
+ // context corresponding to set flags will be returned.
+ //
+ // The context record is never used as an OUT only parameter.
+ //
+
+ ContextFlags: DWORD;
+
+ //
+ // This section is specified/returned if CONTEXT_DEBUG_REGISTERS is
+ // set in ContextFlags. Note that CONTEXT_DEBUG_REGISTERS is NOT
+ // included in CONTEXT_FULL.
+ //
+
+ Dr0: DWORD;
+ Dr1: DWORD;
+ Dr2: DWORD;
+ Dr3: DWORD;
+ Dr6: DWORD;
+ Dr7: DWORD;
+
+ //
+ // This section is specified/returned if the
+ // ContextFlags word contians the flag CONTEXT_FLOATING_POINT.
+ //
+
+ FloatSave: FLOATING_SAVE_AREA;
+
+ //
+ // This section is specified/returned if the
+ // ContextFlags word contians the flag CONTEXT_SEGMENTS.
+ //
+
+ SegGs: DWORD;
+ SegFs: DWORD;
+ SegEs: DWORD;
+ SegDs: DWORD;
+
+ //
+ // This section is specified/returned if the
+ // ContextFlags word contians the flag CONTEXT_INTEGER.
+ //
+
+ Edi: DWORD;
+ Esi: DWORD;
+ Ebx: DWORD;
+ Edx: DWORD;
+ Ecx: DWORD;
+ Eax: DWORD;
+
+ //
+ // This section is specified/returned if the
+ // ContextFlags word contians the flag CONTEXT_CONTROL.
+ //
+
+ Ebp: DWORD;
+ Eip: DWORD;
+ SegCs: DWORD; // MUST BE SANITIZED
+ EFlags: DWORD; // MUST BE SANITIZED
+ Esp: DWORD;
+ SegSs: DWORD;
+
+ //
+ // This section is specified/returned if the ContextFlags word
+ // contains the flag CONTEXT_EXTENDED_REGISTERS.
+ // The format and contexts are processor specific
+ //
+
+ ExtendedRegisters: array [0..MAXIMUM_SUPPORTED_EXTENSION - 1] of BYTE;
+ end;
+ {$EXTERNALSYM _CONTEXT}
+ CONTEXT = _CONTEXT;
+ {$EXTERNALSYM CONTEXT}
+ TContext = CONTEXT;
+
+const
+ LDTENTRY_FLAGS1_TYPE = $1F;
+ LDTENTRY_FLAGS1_DPL = $60;
+ LDTENTRY_FLAGS1_PRES = $80;
+
+ LDTENTRY_FLAGS2_LIMITHI = $0F;
+ LDTENTRY_FLAGS2_SYS = $10;
+ LDTENTRY_FLAGS2_RESERVED_0 = $20;
+ LDTENTRY_FLAGS2_DEFAULT_BIG = $40;
+ LDTENTRY_FLAGS2_GRANULARITY = $80;
+
+type
+ PLDT_ENTRY = ^LDT_ENTRY;
+ {$EXTERNALSYM PLDT_ENTRY}
+ _LDT_ENTRY = record
+ LimitLow: WORD;
+ BaseLow: WORD;
+ BaseMid: BYTE;
+ Flags1: BYTE; // Declare as bytes to avoid alignment
+ Flags2: BYTE; // Problems.
+ BaseHi: BYTE;
+ end;
+ {$EXTERNALSYM _LDT_ENTRY}
+ LDT_ENTRY = _LDT_ENTRY;
+ {$EXTERNALSYM LDT_ENTRY}
+ TLdtEntry = LDT_ENTRY;
+ PLdtEntry = PLDT_ENTRY;
+
+// Please contact INTEL to get IA64-specific information
+
+const
+ EXCEPTION_NONCONTINUABLE = $1; // Noncontinuable exception
+ {$EXTERNALSYM EXCEPTION_NONCONTINUABLE}
+ EXCEPTION_MAXIMUM_PARAMETERS = 15; // maximum number of exception parameters
+ {$EXTERNALSYM EXCEPTION_MAXIMUM_PARAMETERS}
+
+//
+// Exception record definition.
+//
+
+type
+ PEXCEPTION_RECORD = ^EXCEPTION_RECORD;
+ {$EXTERNALSYM PEXCEPTION_RECORD}
+ _EXCEPTION_RECORD = record
+ ExceptionCode: DWORD;
+ ExceptionFlags: DWORD;
+ ExceptionRecord: PEXCEPTION_RECORD;
+ ExceptionAddress: Pointer;
+ NumberParameters: DWORD;
+ ExceptionInformation: array [0..EXCEPTION_MAXIMUM_PARAMETERS - 1] of ULONG_PTR;
+ end;
+ {$EXTERNALSYM _EXCEPTION_RECORD}
+ EXCEPTION_RECORD = _EXCEPTION_RECORD;
+ {$EXTERNALSYM EXCEPTION_RECORD}
+ TExceptionRecord = EXCEPTION_RECORD;
+ PExceptionRecord = PEXCEPTION_RECORD;
+
+ PEXCEPTION_RECORD32 = ^EXCEPTION_RECORD32;
+ {$EXTERNALSYM PEXCEPTION_RECORD32}
+ _EXCEPTION_RECORD32 = record
+ ExceptionCode: DWORD;
+ ExceptionFlags: DWORD;
+ ExceptionRecord: DWORD;
+ ExceptionAddress: DWORD;
+ NumberParameters: DWORD;
+ ExceptionInformation: array [0..EXCEPTION_MAXIMUM_PARAMETERS - 1] of DWORD;
+ end;
+ {$EXTERNALSYM _EXCEPTION_RECORD32}
+ EXCEPTION_RECORD32 = _EXCEPTION_RECORD32;
+ {$EXTERNALSYM EXCEPTION_RECORD32}
+ TExceptionRecord32 = EXCEPTION_RECORD32;
+ PExceptionRecord32 = PEXCEPTION_RECORD32;
+
+ PEXCEPTION_RECORD64 = ^EXCEPTION_RECORD64;
+ {$EXTERNALSYM PEXCEPTION_RECORD64}
+ _EXCEPTION_RECORD64 = record
+ ExceptionCode: DWORD;
+ ExceptionFlags: DWORD;
+ ExceptionRecord: DWORD64;
+ ExceptionAddress: DWORD64;
+ NumberParameters: DWORD;
+ __unusedAlignment: DWORD;
+ ExceptionInformation: array [0..EXCEPTION_MAXIMUM_PARAMETERS - 1] of DWORD64;
+ end;
+ {$EXTERNALSYM _EXCEPTION_RECORD64}
+ EXCEPTION_RECORD64 = _EXCEPTION_RECORD64;
+ {$EXTERNALSYM EXCEPTION_RECORD64}
+ TExceptionRecord64 = EXCEPTION_RECORD64;
+ PExceptionRecord64 = PEXCEPTION_RECORD64;
+
+//
+// Typedef for pointer returned by exception_info()
+//
+
+ PEXCEPTION_POINTERS = ^EXCEPTION_POINTERS;
+ {$EXTERNALSYM PEXCEPTION_POINTERS}
+ _EXCEPTION_POINTERS = record
+ ExceptionRecord: PEXCEPTION_RECORD;
+ ContextRecord: PCONTEXT;
+ end;
+ {$EXTERNALSYM _EXCEPTION_POINTERS}
+ EXCEPTION_POINTERS = _EXCEPTION_POINTERS;
+ {$EXTERNALSYM EXCEPTION_POINTERS}
+ TExceptionPointers = EXCEPTION_POINTERS;
+ PExceptionPointers = ^TExceptionPointers;
+
+ PACCESS_TOKEN = Pointer;
+ {$EXTERNALSYM PACCESS_TOKEN}
+
+////////////////////////////////////////////////////////////////////////
+// //
+// ACCESS MASK //
+// //
+////////////////////////////////////////////////////////////////////////
+
+//
+// Define the access mask as a longword sized structure divided up as
+// follows:
+//
+// 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1
+// 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
+// +---------------+---------------+-------------------------------+
+// |G|G|G|G|Res'd|A| StandardRights| SpecificRights |
+// |R|W|E|A| |S| | |
+// +-+-------------+---------------+-------------------------------+
+//
+// typedef struct _ACCESS_MASK {
+// WORD SpecificRights;
+// BYTE StandardRights;
+// BYTE AccessSystemAcl : 1;
+// BYTE Reserved : 3;
+// BYTE GenericAll : 1;
+// BYTE GenericExecute : 1;
+// BYTE GenericWrite : 1;
+// BYTE GenericRead : 1;
+// } ACCESS_MASK;
+// typedef ACCESS_MASK *PACCESS_MASK;
+//
+// but to make life simple for programmer's we'll allow them to specify
+// a desired access mask by simply OR'ing together mulitple single rights
+// and treat an access mask as a DWORD. For example
+//
+// DesiredAccess = DELETE | READ_CONTROL
+//
+// So we'll declare ACCESS_MASK as DWORD
+//
+
+type
+ ACCESS_MASK = DWORD;
+ {$EXTERNALSYM ACCESS_MASK}
+ PACCESS_MASK = ^ACCESS_MASK;
+ {$EXTERNALSYM PACCESS_MASK}
+ TAccessMask = ACCESS_MASK;
+ PAccessMask = PACCESS_MASK;
+
+////////////////////////////////////////////////////////////////////////
+// //
+// ACCESS TYPES //
+// //
+////////////////////////////////////////////////////////////////////////
+
+//
+// The following are masks for the predefined standard access types
+//
+
+const
+ DELETE = $00010000;
+ {$EXTERNALSYM DELETE}
+ READ_CONTROL = $00020000;
+ {$EXTERNALSYM READ_CONTROL}
+ WRITE_DAC = $00040000;
+ {$EXTERNALSYM WRITE_DAC}
+ WRITE_OWNER = $00080000;
+ {$EXTERNALSYM WRITE_OWNER}
+ SYNCHRONIZE = $00100000;
+ {$EXTERNALSYM SYNCHRONIZE}
+
+ STANDARD_RIGHTS_REQUIRED = $000F0000;
+ {$EXTERNALSYM STANDARD_RIGHTS_REQUIRED}
+
+ STANDARD_RIGHTS_READ = READ_CONTROL;
+ {$EXTERNALSYM STANDARD_RIGHTS_READ}
+ STANDARD_RIGHTS_WRITE = READ_CONTROL;
+ {$EXTERNALSYM STANDARD_RIGHTS_WRITE}
+ STANDARD_RIGHTS_EXECUTE = READ_CONTROL;
+ {$EXTERNALSYM STANDARD_RIGHTS_EXECUTE}
+
+ STANDARD_RIGHTS_ALL = $001F0000;
+ {$EXTERNALSYM STANDARD_RIGHTS_ALL}
+ SPECIFIC_RIGHTS_ALL = $0000FFFF;
+ {$EXTERNALSYM SPECIFIC_RIGHTS_ALL}
+
+//
+// AccessSystemAcl access type
+//
+
+ ACCESS_SYSTEM_SECURITY = $01000000;
+ {$EXTERNALSYM ACCESS_SYSTEM_SECURITY}
+
+//
+// MaximumAllowed access type
+//
+
+ MAXIMUM_ALLOWED = $02000000;
+ {$EXTERNALSYM MAXIMUM_ALLOWED}
+
+//
+// These are the generic rights.
+//
+
+ GENERIC_READ = DWORD($80000000);
+ {$EXTERNALSYM GENERIC_READ}
+ GENERIC_WRITE = $40000000;
+ {$EXTERNALSYM GENERIC_WRITE}
+ GENERIC_EXECUTE = $20000000;
+ {$EXTERNALSYM GENERIC_EXECUTE}
+ GENERIC_ALL = $10000000;
+ {$EXTERNALSYM GENERIC_ALL}
+
+//
+// Define the generic mapping array. This is used to denote the
+// mapping of each generic access right to a specific access mask.
+//
+
+type
+ PGENERIC_MAPPING = ^GENERIC_MAPPING;
+ {$EXTERNALSYM PGENERIC_MAPPING}
+ _GENERIC_MAPPING = record
+ GenericRead: ACCESS_MASK;
+ GenericWrite: ACCESS_MASK;
+ GenericExecute: ACCESS_MASK;
+ GenericAll: ACCESS_MASK;
+ end;
+ {$EXTERNALSYM _GENERIC_MAPPING}
+ GENERIC_MAPPING = _GENERIC_MAPPING;
+ {$EXTERNALSYM GENERIC_MAPPING}
+ TGenericMapping = GENERIC_MAPPING;
+ PGenericMapping = PGENERIC_MAPPING;
+
+////////////////////////////////////////////////////////////////////////
+// //
+// LUID_AND_ATTRIBUTES //
+// //
+////////////////////////////////////////////////////////////////////////
+//
+//
+
+//#include <pshpack4.h>
+
+ PLUID_AND_ATTRIBUTES = ^LUID_AND_ATTRIBUTES;
+ {$EXTERNALSYM PLUID_AND_ATTRIBUTES}
+ _LUID_AND_ATTRIBUTES = record
+ Luid: LUID;
+ Attributes: DWORD;
+ end;
+ {$EXTERNALSYM _LUID_AND_ATTRIBUTES}
+ LUID_AND_ATTRIBUTES = _LUID_AND_ATTRIBUTES;
+ {$EXTERNALSYM LUID_AND_ATTRIBUTES}
+ TLuidAndAttributes = LUID_AND_ATTRIBUTES;
+ PLuidAndAttributes = PLUID_AND_ATTRIBUTES;
+
+ LUID_AND_ATTRIBUTES_ARRAY = array [0..ANYSIZE_ARRAY - 1] of LUID_AND_ATTRIBUTES;
+ {$EXTERNALSYM LUID_AND_ATTRIBUTES_ARRAY}
+ PLUID_AND_ATTRIBUTES_ARRAY = ^LUID_AND_ATTRIBUTES_ARRAY;
+ {$EXTERNALSYM PLUID_AND_ATTRIBUTES_ARRAY}
+ TLuidAndAttributesArray = LUID_AND_ATTRIBUTES_ARRAY;
+ PLuidAndAttributesArray = ^TLuidAndAttributesArray;
+
+//#include <poppack.h>
+
+////////////////////////////////////////////////////////////////////////
+// //
+// Security Id (SID) //
+// //
+////////////////////////////////////////////////////////////////////////
+//
+//
+// Pictorially the structure of an SID is as follows:
+//
+// 1 1 1 1 1 1
+// 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
+// +---------------------------------------------------------------+
+// | SubAuthorityCount |Reserved1 (SBZ)| Revision |
+// +---------------------------------------------------------------+
+// | IdentifierAuthority[0] |
+// +---------------------------------------------------------------+
+// | IdentifierAuthority[1] |
+// +---------------------------------------------------------------+
+// | IdentifierAuthority[2] |
+// +---------------------------------------------------------------+
+// | |
+// +- - - - - - - - SubAuthority[] - - - - - - - - -+
+// | |
+// +---------------------------------------------------------------+
+//
+//
+
+type
+ PSID_IDENTIFIER_AUTHORITY = ^SID_IDENTIFIER_AUTHORITY;
+ {$EXTERNALSYM PSID_IDENTIFIER_AUTHORITY}
+ _SID_IDENTIFIER_AUTHORITY = record
+ Value: array [0..5] of Byte;
+ end;
+ {$EXTERNALSYM _SID_IDENTIFIER_AUTHORITY}
+ SID_IDENTIFIER_AUTHORITY = _SID_IDENTIFIER_AUTHORITY;
+ {$EXTERNALSYM SID_IDENTIFIER_AUTHORITY}
+ TSidIdentifierAuthority = SID_IDENTIFIER_AUTHORITY;
+ PSidIdentifierAuthority = PSID_IDENTIFIER_AUTHORITY;
+
+ PSid = ^SID;
+ _SID = record
+ Revision: Byte;
+ SubAuthorityCount: Byte;
+ IdentifierAuthority: SID_IDENTIFIER_AUTHORITY;
+ SubAuthority: array [0..ANYSIZE_ARRAY - 1] of DWORD;
+ end;
+ {$EXTERNALSYM _SID}
+ SID = _SID;
+ {$EXTERNALSYM SID}
+ PPSID = ^PSID;
+ {$NODEFINE PPSID}
+ TSid = SID;
+
+const
+ SID_REVISION = 1; // Current revision level
+ {$EXTERNALSYM SID_REVISION}
+ SID_MAX_SUB_AUTHORITIES = 15;
+ {$EXTERNALSYM SID_MAX_SUB_AUTHORITIES}
+ SID_RECOMMENDED_SUB_AUTHORITIES = 1; // Will change to around 6 in a future release.
+ {$EXTERNALSYM SID_RECOMMENDED_SUB_AUTHORITIES}
+
+ SECURITY_MAX_SID_SIZE = SizeOf(SID) - SizeOf(DWORD) + (SID_MAX_SUB_AUTHORITIES * SizeOf(DWORD));
+ {$EXTERNALSYM SECURITY_MAX_SID_SIZE}
+
+ SidTypeUser = 1;
+ {$EXTERNALSYM SidTypeUser}
+ SidTypeGroup = 2;
+ {$EXTERNALSYM SidTypeGroup}
+ SidTypeDomain = 3;
+ {$EXTERNALSYM SidTypeDomain}
+ SidTypeAlias = 4;
+ {$EXTERNALSYM SidTypeAlias}
+ SidTypeWellKnownGroup = 5;
+ {$EXTERNALSYM SidTypeWellKnownGroup}
+ SidTypeDeletedAccount = 6;
+ {$EXTERNALSYM SidTypeDeletedAccount}
+ SidTypeInvalid = 7;
+ {$EXTERNALSYM SidTypeInvalid}
+ SidTypeUnknown = 8;
+ {$EXTERNALSYM SidTypeUnknown}
+ SidTypeComputer = 9;
+ {$EXTERNALSYM SidTypeComputer}
+
+type
+ _SID_NAME_USE = DWORD;
+ {$EXTERNALSYM _SID_NAME_USE}
+ SID_NAME_USE = _SID_NAME_USE;
+ {$EXTERNALSYM SID_NAME_USE}
+ PSID_NAME_USE = ^SID_NAME_USE;
+ {$EXTERNALSYM PSID_NAME_USE}
+ TSidNameUse = SID_NAME_USE;
+ PSidNameUSe = PSID_NAME_USE;
+
+ PSID_AND_ATTRIBUTES = ^SID_AND_ATTRIBUTES;
+ {$EXTERNALSYM PSID_AND_ATTRIBUTES}
+ _SID_AND_ATTRIBUTES = record
+ Sid: PSID;
+ Attributes: DWORD;
+ end;
+ {$EXTERNALSYM _SID_AND_ATTRIBUTES}
+ SID_AND_ATTRIBUTES = _SID_AND_ATTRIBUTES;
+ {$EXTERNALSYM SID_AND_ATTRIBUTES}
+ TSidAndAttributes = SID_AND_ATTRIBUTES;
+ PSidAndAttributes = PSID_AND_ATTRIBUTES;
+
+ SID_AND_ATTRIBUTES_ARRAY = array [0..ANYSIZE_ARRAY - 1] of SID_AND_ATTRIBUTES;
+ {$EXTERNALSYM SID_AND_ATTRIBUTES_ARRAY}
+ PSID_AND_ATTRIBUTES_ARRAY = ^SID_AND_ATTRIBUTES_ARRAY;
+ {$EXTERNALSYM PSID_AND_ATTRIBUTES_ARRAY}
+ PSidAndAttributesArray = ^TSidAndAttributesArray;
+ TSidAndAttributesArray = SID_AND_ATTRIBUTES_ARRAY;
+
+/////////////////////////////////////////////////////////////////////////////
+// //
+// Universal well-known SIDs //
+// //
+// Null SID S-1-0-0 //
+// World S-1-1-0 //
+// Local S-1-2-0 //
+// Creator Owner ID S-1-3-0 //
+// Creator Group ID S-1-3-1 //
+// Creator Owner Server ID S-1-3-2 //
+// Creator Group Server ID S-1-3-3 //
+// //
+// (Non-unique IDs) S-1-4 //
+// //
+/////////////////////////////////////////////////////////////////////////////
+
+const
+ SECURITY_NULL_SID_AUTHORITY: TSidIdentifierAuthority = (Value: (0, 0, 0, 0, 0, 0));
+ {$EXTERNALSYM SECURITY_NULL_SID_AUTHORITY}
+ SECURITY_WORLD_SID_AUTHORITY: TSidIdentifierAuthority = (Value: (0, 0, 0, 0, 0, 1));
+ {$EXTERNALSYM SECURITY_WORLD_SID_AUTHORITY}
+ SECURITY_LOCAL_SID_AUTHORITY: TSidIdentifierAuthority = (Value: (0, 0, 0, 0, 0, 2));
+ {$EXTERNALSYM SECURITY_LOCAL_SID_AUTHORITY}
+ SECURITY_CREATOR_SID_AUTHORITY: TSidIdentifierAuthority = (Value: (0, 0, 0, 0, 0, 3));
+ {$EXTERNALSYM SECURITY_CREATOR_SID_AUTHORITY}
+ SECURITY_NON_UNIQUE_AUTHORITY: TSidIdentifierAuthority = (Value: (0, 0, 0, 0, 0, 4));
+ {$EXTERNALSYM SECURITY_NON_UNIQUE_AUTHORITY}
+ SECURITY_RESOURCE_MANAGER_AUTHORITY: TSidIdentifierAuthority = (Value: (0, 0, 0, 0, 0, 9));
+ {$EXTERNALSYM SECURITY_RESOURCE_MANAGER_AUTHORITY}
+
+ SECURITY_NULL_RID = $00000000;
+ {$EXTERNALSYM SECURITY_NULL_RID}
+ SECURITY_WORLD_RID = $00000000;
+ {$EXTERNALSYM SECURITY_WORLD_RID}
+ SECURITY_LOCAL_RID = $00000000;
+ {$EXTERNALSYM SECURITY_LOCAL_RID}
+
+ SECURITY_CREATOR_OWNER_RID = $00000000;
+ {$EXTERNALSYM SECURITY_CREATOR_OWNER_RID}
+ SECURITY_CREATOR_GROUP_RID = $00000001;
+ {$EXTERNALSYM SECURITY_CREATOR_GROUP_RID}
+
+ SECURITY_CREATOR_OWNER_SERVER_RID = $00000002;
+ {$EXTERNALSYM SECURITY_CREATOR_OWNER_SERVER_RID}
+ SECURITY_CREATOR_GROUP_SERVER_RID = $00000003;
+ {$EXTERNALSYM SECURITY_CREATOR_GROUP_SERVER_RID}
+
+/////////////////////////////////////////////////////////////////////////////
+// //
+// NT well-known SIDs //
+// //
+// NT Authority S-1-5 //
+// Dialup S-1-5-1 //
+// //
+// Network S-1-5-2 //
+// Batch S-1-5-3 //
+// Interactive S-1-5-4 //
+// (Logon IDs) S-1-5-5-X-Y //
+// Service S-1-5-6 //
+// AnonymousLogon S-1-5-7 (aka null logon session) //
+// Proxy S-1-5-8 //
+// Enterprise DC (EDC) S-1-5-9 (aka domain controller account) //
+// Self S-1-5-10 (self RID) //
+// Authenticated User S-1-5-11 (Authenticated user somewhere) //
+// Restricted Code S-1-5-12 (Running restricted code) //
+// Terminal Server S-1-5-13 (Running on Terminal Server) //
+// Remote Logon S-1-5-14 (Remote Interactive Logon) //
+// This Organization S-1-5-15 //
+// //
+// Local System S-1-5-18 //
+// Local Service S-1-5-19 //
+// Network Service S-1-5-20 //
+// //
+// (NT non-unique IDs) S-1-5-0x15-... (NT Domain Sids) //
+// //
+// (Built-in domain) S-1-5-0x20 //
+// //
+// (Security Package IDs) S-1-5-0x40 //
+// NTLM Authentication S-1-5-0x40-10 //
+// SChannel Authentication S-1-5-0x40-14 //
+// Digest Authentication S-1-5-0x40-21 //
+// //
+// Other Organization S-1-5-1000 (>=1000 can not be filtered) //
+// //
+// //
+// NOTE: the relative identifier values (RIDs) determine which security //
+// boundaries the SID is allowed to cross. Before adding new RIDs, //
+// a determination needs to be made regarding which range they should //
+// be added to in order to ensure proper "SID filtering" //
+// //
+///////////////////////////////////////////////////////////////////////////////
+
+const
+ SECURITY_NT_AUTHORITY: TSidIdentifierAuthority = (Value: (0, 0, 0, 0, 0, 5));
+ {$EXTERNALSYM SECURITY_NT_AUTHORITY}
+
+ SECURITY_DIALUP_RID = $00000001;
+ {$EXTERNALSYM SECURITY_DIALUP_RID}
+ SECURITY_NETWORK_RID = $00000002;
+ {$EXTERNALSYM SECURITY_NETWORK_RID}
+ SECURITY_BATCH_RID = $00000003;
+ {$EXTERNALSYM SECURITY_BATCH_RID}
+ SECURITY_INTERACTIVE_RID = $00000004;
+ {$EXTERNALSYM SECURITY_INTERACTIVE_RID}
+ SECURITY_LOGON_IDS_RID = $00000005;
+ {$EXTERNALSYM SECURITY_LOGON_IDS_RID}
+ SECURITY_LOGON_IDS_RID_COUNT = 3;
+ {$EXTERNALSYM SECURITY_LOGON_IDS_RID_COUNT}
+ SECURITY_SERVICE_RID = $00000006;
+ {$EXTERNALSYM SECURITY_SERVICE_RID}
+ SECURITY_ANONYMOUS_LOGON_RID = $00000007;
+ {$EXTERNALSYM SECURITY_ANONYMOUS_LOGON_RID}
+ SECURITY_PROXY_RID = $00000008;
+ {$EXTERNALSYM SECURITY_PROXY_RID}
+ SECURITY_ENTERPRISE_CONTROLLERS_RID = $00000009;
+ {$EXTERNALSYM SECURITY_ENTERPRISE_CONTROLLERS_RID}
+ SECURITY_SERVER_LOGON_RID = SECURITY_ENTERPRISE_CONTROLLERS_RID;
+ {$EXTERNALSYM SECURITY_SERVER_LOGON_RID}
+ SECURITY_PRINCIPAL_SELF_RID = $0000000A;
+ {$EXTERNALSYM SECURITY_PRINCIPAL_SELF_RID}
+ SECURITY_AUTHENTICATED_USER_RID = $0000000B;
+ {$EXTERNALSYM SECURITY_AUTHENTICATED_USER_RID}
+ SECURITY_RESTRICTED_CODE_RID = $0000000C;
+ {$EXTERNALSYM SECURITY_RESTRICTED_CODE_RID}
+ SECURITY_TERMINAL_SERVER_RID = $0000000D;
+ {$EXTERNALSYM SECURITY_TERMINAL_SERVER_RID}
+ SECURITY_REMOTE_LOGON_RID = $0000000E;
+ {$EXTERNALSYM SECURITY_REMOTE_LOGON_RID}
+ SECURITY_THIS_ORGANIZATION_RID = $0000000F;
+ {$EXTERNALSYM SECURITY_THIS_ORGANIZATION_RID}
+
+ SECURITY_LOCAL_SYSTEM_RID = $00000012;
+ {$EXTERNALSYM SECURITY_LOCAL_SYSTEM_RID}
+ SECURITY_LOCAL_SERVICE_RID = $00000013;
+ {$EXTERNALSYM SECURITY_LOCAL_SERVICE_RID}
+ SECURITY_NETWORK_SERVICE_RID = $00000014;
+ {$EXTERNALSYM SECURITY_NETWORK_SERVICE_RID}
+
+ SECURITY_NT_NON_UNIQUE = $00000015;
+ {$EXTERNALSYM SECURITY_NT_NON_UNIQUE}
+ SECURITY_NT_NON_UNIQUE_SUB_AUTH_COUNT = 3;
+ {$EXTERNALSYM SECURITY_NT_NON_UNIQUE_SUB_AUTH_COUNT}
+
+ SECURITY_BUILTIN_DOMAIN_RID = $00000020;
+ {$EXTERNALSYM SECURITY_BUILTIN_DOMAIN_RID}
+
+ SECURITY_PACKAGE_BASE_RID = $00000040;
+ {$EXTERNALSYM SECURITY_PACKAGE_BASE_RID}
+ SECURITY_PACKAGE_RID_COUNT = 2;
+ {$EXTERNALSYM SECURITY_PACKAGE_RID_COUNT}
+ SECURITY_PACKAGE_NTLM_RID = $0000000A;
+ {$EXTERNALSYM SECURITY_PACKAGE_NTLM_RID}
+ SECURITY_PACKAGE_SCHANNEL_RID = $0000000E;
+ {$EXTERNALSYM SECURITY_PACKAGE_SCHANNEL_RID}
+ SECURITY_PACKAGE_DIGEST_RID = $00000015;
+ {$EXTERNALSYM SECURITY_PACKAGE_DIGEST_RID}
+
+ SECURITY_MAX_ALWAYS_FILTERED = $000003E7;
+ {$EXTERNALSYM SECURITY_MAX_ALWAYS_FILTERED}
+ SECURITY_MIN_NEVER_FILTERED = $000003E8;
+ {$EXTERNALSYM SECURITY_MIN_NEVER_FILTERED}
+
+ SECURITY_OTHER_ORGANIZATION_RID = $000003E8;
+ {$EXTERNALSYM SECURITY_OTHER_ORGANIZATION_RID}
+
+/////////////////////////////////////////////////////////////////////////////
+// //
+// well-known domain relative sub-authority values (RIDs)... //
+// //
+/////////////////////////////////////////////////////////////////////////////
+
+// Well-known users ...
+
+ FOREST_USER_RID_MAX = $000001F3;
+ {$EXTERNALSYM FOREST_USER_RID_MAX}
+
+ DOMAIN_USER_RID_ADMIN = $000001F4;
+ {$EXTERNALSYM DOMAIN_USER_RID_ADMIN}
+ DOMAIN_USER_RID_GUEST = $000001F5;
+ {$EXTERNALSYM DOMAIN_USER_RID_GUEST}
+ DOMAIN_USER_RID_KRBTGT = $000001F6;
+ {$EXTERNALSYM DOMAIN_USER_RID_KRBTGT}
+
+ DOMAIN_USER_RID_MAX = $000003E7;
+ {$EXTERNALSYM DOMAIN_USER_RID_MAX}
+
+// well-known groups ...
+
+ DOMAIN_GROUP_RID_ADMINS = $00000200;
+ {$EXTERNALSYM DOMAIN_GROUP_RID_ADMINS}
+ DOMAIN_GROUP_RID_USERS = $00000201;
+ {$EXTERNALSYM DOMAIN_GROUP_RID_USERS}
+ DOMAIN_GROUP_RID_GUESTS = $00000202;
+ {$EXTERNALSYM DOMAIN_GROUP_RID_GUESTS}
+ DOMAIN_GROUP_RID_COMPUTERS = $00000203;
+ {$EXTERNALSYM DOMAIN_GROUP_RID_COMPUTERS}
+ DOMAIN_GROUP_RID_CONTROLLERS = $00000204;
+ {$EXTERNALSYM DOMAIN_GROUP_RID_CONTROLLERS}
+ DOMAIN_GROUP_RID_CERT_ADMINS = $00000205;
+ {$EXTERNALSYM DOMAIN_GROUP_RID_CERT_ADMINS}
+ DOMAIN_GROUP_RID_SCHEMA_ADMINS = $00000206;
+ {$EXTERNALSYM DOMAIN_GROUP_RID_SCHEMA_ADMINS}
+ DOMAIN_GROUP_RID_ENTERPRISE_ADMINS = $00000207;
+ {$EXTERNALSYM DOMAIN_GROUP_RID_ENTERPRISE_ADMINS}
+ DOMAIN_GROUP_RID_POLICY_ADMINS = $00000208;
+ {$EXTERNALSYM DOMAIN_GROUP_RID_POLICY_ADMINS}
+
+// well-known aliases ...
+
+ DOMAIN_ALIAS_RID_ADMINS = $00000220;
+ {$EXTERNALSYM DOMAIN_ALIAS_RID_ADMINS}
+ DOMAIN_ALIAS_RID_USERS = $00000221;
+ {$EXTERNALSYM DOMAIN_ALIAS_RID_USERS}
+ DOMAIN_ALIAS_RID_GUESTS = $00000222;
+ {$EXTERNALSYM DOMAIN_ALIAS_RID_GUESTS}
+ DOMAIN_ALIAS_RID_POWER_USERS = $00000223;
+ {$EXTERNALSYM DOMAIN_ALIAS_RID_POWER_USERS}
+
+ DOMAIN_ALIAS_RID_ACCOUNT_OPS = $00000224;
+ {$EXTERNALSYM DOMAIN_ALIAS_RID_ACCOUNT_OPS}
+ DOMAIN_ALIAS_RID_SYSTEM_OPS = $00000225;
+ {$EXTERNALSYM DOMAIN_ALIAS_RID_SYSTEM_OPS}
+ DOMAIN_ALIAS_RID_PRINT_OPS = $00000226;
+ {$EXTERNALSYM DOMAIN_ALIAS_RID_PRINT_OPS}
+ DOMAIN_ALIAS_RID_BACKUP_OPS = $00000227;
+ {$EXTERNALSYM DOMAIN_ALIAS_RID_BACKUP_OPS}
+
+ DOMAIN_ALIAS_RID_REPLICATOR = $00000228;
+ {$EXTERNALSYM DOMAIN_ALIAS_RID_REPLICATOR}
+ DOMAIN_ALIAS_RID_RAS_SERVERS = $00000229;
+ {$EXTERNALSYM DOMAIN_ALIAS_RID_RAS_SERVERS}
+ DOMAIN_ALIAS_RID_PREW2KCOMPACCESS = $0000022A;
+ {$EXTERNALSYM DOMAIN_ALIAS_RID_PREW2KCOMPACCESS}
+ DOMAIN_ALIAS_RID_REMOTE_DESKTOP_USERS = $0000022B;
+ {$EXTERNALSYM DOMAIN_ALIAS_RID_REMOTE_DESKTOP_USERS}
+ DOMAIN_ALIAS_RID_NETWORK_CONFIGURATION_OPS = $0000022C;
+ {$EXTERNALSYM DOMAIN_ALIAS_RID_NETWORK_CONFIGURATION_OPS}
+ DOMAIN_ALIAS_RID_INCOMING_FOREST_TRUST_BUILDERS = $0000022D;
+ {$EXTERNALSYM DOMAIN_ALIAS_RID_INCOMING_FOREST_TRUST_BUILDERS}
+
+ DOMAIN_ALIAS_RID_MONITORING_USERS = $0000022E;
+ {$EXTERNALSYM DOMAIN_ALIAS_RID_MONITORING_USERS}
+ DOMAIN_ALIAS_RID_LOGGING_USERS = $0000022F;
+ {$EXTERNALSYM DOMAIN_ALIAS_RID_LOGGING_USERS}
+ DOMAIN_ALIAS_RID_AUTHORIZATIONACCESS = $00000230;
+ {$EXTERNALSYM DOMAIN_ALIAS_RID_AUTHORIZATIONACCESS}
+ DOMAIN_ALIAS_RID_TS_LICENSE_SERVERS = $00000231;
+ {$EXTERNALSYM DOMAIN_ALIAS_RID_TS_LICENSE_SERVERS}
+
+type
+ WELL_KNOWN_SID_TYPE = (
+ WinNullSid,
+ WinWorldSid,
+ WinLocalSid,
+ WinCreatorOwnerSid,
+ WinCreatorGroupSid,
+ WinCreatorOwnerServerSid,
+ WinCreatorGroupServerSid,
+ WinNtAuthoritySid,
+ WinDialupSid,
+ WinNetworkSid,
+ WinBatchSid,
+ WinInteractiveSid,
+ WinServiceSid,
+ WinAnonymousSid,
+ WinProxySid,
+ WinEnterpriseControllersSid,
+ WinSelfSid,
+ WinAuthenticatedUserSid,
+ WinRestrictedCodeSid,
+ WinTerminalServerSid,
+ WinRemoteLogonIdSid,
+ WinLogonIdsSid,
+ WinLocalSystemSid,
+ WinLocalServiceSid,
+ WinNetworkServiceSid,
+ WinBuiltinDomainSid,
+ WinBuiltinAdministratorsSid,
+ WinBuiltinUsersSid,
+ WinBuiltinGuestsSid,
+ WinBuiltinPowerUsersSid,
+ WinBuiltinAccountOperatorsSid,
+ WinBuiltinSystemOperatorsSid,
+ WinBuiltinPrintOperatorsSid,
+ WinBuiltinBackupOperatorsSid,
+ WinBuiltinReplicatorSid,
+ WinBuiltinPreWindows2000CompatibleAccessSid,
+ WinBuiltinRemoteDesktopUsersSid,
+ WinBuiltinNetworkConfigurationOperatorsSid,
+ WinAccountAdministratorSid,
+ WinAccountGuestSid,
+ WinAccountKrbtgtSid,
+ WinAccountDomainAdminsSid,
+ WinAccountDomainUsersSid,
+ WinAccountDomainGuestsSid,
+ WinAccountComputersSid,
+ WinAccountControllersSid,
+ WinAccountCertAdminsSid,
+ WinAccountSchemaAdminsSid,
+ WinAccountEnterpriseAdminsSid,
+ WinAccountPolicyAdminsSid,
+ WinAccountRasAndIasServersSid,
+ WinNTLMAuthenticationSid,
+ WinDigestAuthenticationSid,
+ WinSChannelAuthenticationSid,
+ WinThisOrganizationSid,
+ WinOtherOrganizationSid,
+ WinBuiltinIncomingForestTrustBuildersSid,
+ WinBuiltinPerfMonitoringUsersSid,
+ WinBuiltinPerfLoggingUsersSid,
+ WinBuiltinAuthorizationAccessSid,
+ WinBuiltinTerminalServerLicenseServersSid);
+ {$EXTERNALSYM WELL_KNOWN_SID_TYPE}
+ TWellKnownSidType = WELL_KNOWN_SID_TYPE;
+
+//
+// Allocate the System Luid. The first 1000 LUIDs are reserved.
+// Use #999 here (0x3E7 = 999)
+//
+
+const
+ SYSTEM_LUID: LUID = (LowPart: $3E7; HighPart: $0);
+ {$EXTERNALSYM SYSTEM_LUID}
+ ANONYMOUS_LOGON_LUID: LUID = (LowPart: $3E6; HighPart: $0);
+ {$EXTERNALSYM ANONYMOUS_LOGON_LUID}
+ LOCALSERVICE_LUID: LUID = (LowPart: $3E5; HighPart: $0);
+ {$EXTERNALSYM LOCALSERVICE_LUID}
+ NETWORKSERVICE_LUID: LUID = (LowPart: $3E4; HighPart: $0);
+ {$EXTERNALSYM NETWORKSERVICE_LUID}
+
+////////////////////////////////////////////////////////////////////////
+// //
+// User and Group related SID attributes //
+// //
+////////////////////////////////////////////////////////////////////////
+
+//
+// Group attributes
+//
+
+ SE_GROUP_MANDATORY = $00000001;
+ {$EXTERNALSYM SE_GROUP_MANDATORY}
+ SE_GROUP_ENABLED_BY_DEFAULT = $00000002;
+ {$EXTERNALSYM SE_GROUP_ENABLED_BY_DEFAULT}
+ SE_GROUP_ENABLED = $00000004;
+ {$EXTERNALSYM SE_GROUP_ENABLED}
+ SE_GROUP_OWNER = $00000008;
+ {$EXTERNALSYM SE_GROUP_OWNER}
+ SE_GROUP_USE_FOR_DENY_ONLY = $00000010;
+ {$EXTERNALSYM SE_GROUP_USE_FOR_DENY_ONLY}
+ SE_GROUP_LOGON_ID = $C0000000;
+ {$EXTERNALSYM SE_GROUP_LOGON_ID}
+ SE_GROUP_RESOURCE = $20000000;
+ {$EXTERNALSYM SE_GROUP_RESOURCE}
+
+//
+// User attributes
+//
+
+// (None yet defined.)
+
+////////////////////////////////////////////////////////////////////////
+// //
+// ACL and ACE //
+// //
+////////////////////////////////////////////////////////////////////////
+
+//
+// Define an ACL and the ACE format. The structure of an ACL header
+// followed by one or more ACEs. Pictorally the structure of an ACL header
+// is as follows:
+//
+// 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1
+// 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
+// +-------------------------------+---------------+---------------+
+// | AclSize | Sbz1 | AclRevision |
+// +-------------------------------+---------------+---------------+
+// | Sbz2 | AceCount |
+// +-------------------------------+-------------------------------+
+//
+// The current AclRevision is defined to be ACL_REVISION.
+//
+// AclSize is the size, in bytes, allocated for the ACL. This includes
+// the ACL header, ACES, and remaining free space in the buffer.
+//
+// AceCount is the number of ACES in the ACL.
+//
+
+// This is the *current* ACL revision
+
+ ACL_REVISION = 2;
+ {$EXTERNALSYM ACL_REVISION}
+ ACL_REVISION_DS = 4;
+ {$EXTERNALSYM ACL_REVISION_DS}
+
+// This is the history of ACL revisions. Add a new one whenever
+// ACL_REVISION is updated
+
+ ACL_REVISION1 = 1;
+ {$EXTERNALSYM ACL_REVISION1}
+ ACL_REVISION2 = 2;
+ {$EXTERNALSYM ACL_REVISION2}
+ MIN_ACL_REVISION = ACL_REVISION2;
+ {$EXTERNALSYM MIN_ACL_REVISION}
+ ACL_REVISION3 = 3;
+ {$EXTERNALSYM ACL_REVISION3}
+ ACL_REVISION4 = 4;
+ {$EXTERNALSYM ACL_REVISION4}
+ MAX_ACL_REVISION = ACL_REVISION4;
+ {$EXTERNALSYM MAX_ACL_REVISION}
+
+type
+ PACL = ^ACL;
+ {$EXTERNALSYM PACL}
+ _ACL = record
+ AclRevision: Byte;
+ Sbz1: Byte;
+ AclSize: Word;
+ AceCount: Word;
+ Sbz2: Word;
+ end;
+ {$EXTERNALSYM _ACL}
+ ACL = _ACL;
+ {$EXTERNALSYM ACL}
+ TAcl = ACL;
+
+ PPACL = ^PAcl;
+ {$NODEFINE PPACL}
+
+//
+// The structure of an ACE is a common ace header followed by ace type
+// specific data. Pictorally the structure of the common ace header is
+// as follows:
+//
+// 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1
+// 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
+// +---------------+-------+-------+---------------+---------------+
+// | AceSize | AceFlags | AceType |
+// +---------------+-------+-------+---------------+---------------+
+//
+// AceType denotes the type of the ace, there are some predefined ace
+// types
+//
+// AceSize is the size, in bytes, of ace.
+//
+// AceFlags are the Ace flags for audit and inheritance, defined shortly.
+
+type
+ PACE_HEADER = ^ACE_HEADER;
+ {$EXTERNALSYM PACE_HEADER}
+ _ACE_HEADER = record
+ AceType: Byte;
+ AceFlags: Byte;
+ AceSize: Word;
+ end;
+ {$EXTERNALSYM _ACE_HEADER}
+ ACE_HEADER = _ACE_HEADER;
+ {$EXTERNALSYM ACE_HEADER}
+ TAceHeader = ACE_HEADER;
+ PAceHeader = PACE_HEADER;
+
+//
+// The following are the predefined ace types that go into the AceType
+// field of an Ace header.
+//
+
+const
+ ACCESS_MIN_MS_ACE_TYPE = $0;
+ {$EXTERNALSYM ACCESS_MIN_MS_ACE_TYPE}
+ ACCESS_ALLOWED_ACE_TYPE = $0;
+ {$EXTERNALSYM ACCESS_ALLOWED_ACE_TYPE}
+ ACCESS_DENIED_ACE_TYPE = $1;
+ {$EXTERNALSYM ACCESS_DENIED_ACE_TYPE}
+ SYSTEM_AUDIT_ACE_TYPE = $2;
+ {$EXTERNALSYM SYSTEM_AUDIT_ACE_TYPE}
+ SYSTEM_ALARM_ACE_TYPE = $3;
+ {$EXTERNALSYM SYSTEM_ALARM_ACE_TYPE}
+ ACCESS_MAX_MS_V2_ACE_TYPE = $3;
+ {$EXTERNALSYM ACCESS_MAX_MS_V2_ACE_TYPE}
+
+ ACCESS_ALLOWED_COMPOUND_ACE_TYPE = $4;
+ {$EXTERNALSYM ACCESS_ALLOWED_COMPOUND_ACE_TYPE}
+ ACCESS_MAX_MS_V3_ACE_TYPE = $4;
+ {$EXTERNALSYM ACCESS_MAX_MS_V3_ACE_TYPE}
+
+ ACCESS_MIN_MS_OBJECT_ACE_TYPE = $5;
+ {$EXTERNALSYM ACCESS_MIN_MS_OBJECT_ACE_TYPE}
+ ACCESS_ALLOWED_OBJECT_ACE_TYPE = $5;
+ {$EXTERNALSYM ACCESS_ALLOWED_OBJECT_ACE_TYPE}
+ ACCESS_DENIED_OBJECT_ACE_TYPE = $6;
+ {$EXTERNALSYM ACCESS_DENIED_OBJECT_ACE_TYPE}
+ SYSTEM_AUDIT_OBJECT_ACE_TYPE = $7;
+ {$EXTERNALSYM SYSTEM_AUDIT_OBJECT_ACE_TYPE}
+ SYSTEM_ALARM_OBJECT_ACE_TYPE = $8;
+ {$EXTERNALSYM SYSTEM_ALARM_OBJECT_ACE_TYPE}
+ ACCESS_MAX_MS_OBJECT_ACE_TYPE = $8;
+ {$EXTERNALSYM ACCESS_MAX_MS_OBJECT_ACE_TYPE}
+
+ ACCESS_MAX_MS_V4_ACE_TYPE = $8;
+ {$EXTERNALSYM ACCESS_MAX_MS_V4_ACE_TYPE}
+ ACCESS_MAX_MS_ACE_TYPE = $8;
+ {$EXTERNALSYM ACCESS_MAX_MS_ACE_TYPE}
+
+ ACCESS_ALLOWED_CALLBACK_ACE_TYPE = $9;
+ {$EXTERNALSYM ACCESS_ALLOWED_CALLBACK_ACE_TYPE}
+ ACCESS_DENIED_CALLBACK_ACE_TYPE = $A;
+ {$EXTERNALSYM ACCESS_DENIED_CALLBACK_ACE_TYPE}
+ ACCESS_ALLOWED_CALLBACK_OBJECT_ACE_TYPE = $B;
+ {$EXTERNALSYM ACCESS_ALLOWED_CALLBACK_OBJECT_ACE_TYPE}
+ ACCESS_DENIED_CALLBACK_OBJECT_ACE_TYPE = $C;
+ {$EXTERNALSYM ACCESS_DENIED_CALLBACK_OBJECT_ACE_TYPE}
+ SYSTEM_AUDIT_CALLBACK_ACE_TYPE = $D;
+ {$EXTERNALSYM SYSTEM_AUDIT_CALLBACK_ACE_TYPE}
+ SYSTEM_ALARM_CALLBACK_ACE_TYPE = $E;
+ {$EXTERNALSYM SYSTEM_ALARM_CALLBACK_ACE_TYPE}
+ SYSTEM_AUDIT_CALLBACK_OBJECT_ACE_TYPE = $F;
+ {$EXTERNALSYM SYSTEM_AUDIT_CALLBACK_OBJECT_ACE_TYPE}
+ SYSTEM_ALARM_CALLBACK_OBJECT_ACE_TYPE = $10;
+ {$EXTERNALSYM SYSTEM_ALARM_CALLBACK_OBJECT_ACE_TYPE}
+
+ ACCESS_MAX_MS_V5_ACE_TYPE = $10;
+ {$EXTERNALSYM ACCESS_MAX_MS_V5_ACE_TYPE}
+
+//
+// The following are the inherit flags that go into the AceFlags field
+// of an Ace header.
+//
+
+ OBJECT_INHERIT_ACE = $1;
+ {$EXTERNALSYM OBJECT_INHERIT_ACE}
+ CONTAINER_INHERIT_ACE = $2;
+ {$EXTERNALSYM CONTAINER_INHERIT_ACE}
+ NO_PROPAGATE_INHERIT_ACE = $4;
+ {$EXTERNALSYM NO_PROPAGATE_INHERIT_ACE}
+ INHERIT_ONLY_ACE = $8;
+ {$EXTERNALSYM INHERIT_ONLY_ACE}
+ INHERITED_ACE = $10;
+ {$EXTERNALSYM INHERITED_ACE}
+ VALID_INHERIT_FLAGS = $1F;
+ {$EXTERNALSYM VALID_INHERIT_FLAGS}
+
+// The following are the currently defined ACE flags that go into the
+// AceFlags field of an ACE header. Each ACE type has its own set of
+// AceFlags.
+//
+// SUCCESSFUL_ACCESS_ACE_FLAG - used only with system audit and alarm ACE
+// types to indicate that a message is generated for successful accesses.
+//
+// FAILED_ACCESS_ACE_FLAG - used only with system audit and alarm ACE types
+// to indicate that a message is generated for failed accesses.
+//
+
+//
+// SYSTEM_AUDIT and SYSTEM_ALARM AceFlags
+//
+// These control the signaling of audit and alarms for success or failure.
+//
+
+ SUCCESSFUL_ACCESS_ACE_FLAG = $40;
+ {$EXTERNALSYM SUCCESSFUL_ACCESS_ACE_FLAG}
+ FAILED_ACCESS_ACE_FLAG = $80;
+ {$EXTERNALSYM FAILED_ACCESS_ACE_FLAG}
+
+//
+// We'll define the structure of the predefined ACE types. Pictorally
+// the structure of the predefined ACE's is as follows:
+//
+// 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1
+// 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
+// +---------------+-------+-------+---------------+---------------+
+// | AceFlags | Resd |Inherit| AceSize | AceType |
+// +---------------+-------+-------+---------------+---------------+
+// | Mask |
+// +---------------------------------------------------------------+
+// | |
+// + +
+// | |
+// + Sid +
+// | |
+// + +
+// | |
+// +---------------------------------------------------------------+
+//
+// Mask is the access mask associated with the ACE. This is either the
+// access allowed, access denied, audit, or alarm mask.
+//
+// Sid is the Sid associated with the ACE.
+//
+
+// The following are the four predefined ACE types.
+
+// Examine the AceType field in the Header to determine
+// which structure is appropriate to use for casting.
+
+type
+ PACCESS_ALLOWED_ACE = ^ACCESS_ALLOWED_ACE;
+ {$EXTERNALSYM PACCESS_ALLOWED_ACE}
+ _ACCESS_ALLOWED_ACE = record
+ Header: ACE_HEADER;
+ Mask: ACCESS_MASK;
+ SidStart: DWORD;
+ end;
+ {$EXTERNALSYM _ACCESS_ALLOWED_ACE}
+ ACCESS_ALLOWED_ACE = _ACCESS_ALLOWED_ACE;
+ {$EXTERNALSYM ACCESS_ALLOWED_ACE}
+ TAccessAllowedAce = ACCESS_ALLOWED_ACE;
+ PAccessAllowedAce = PACCESS_ALLOWED_ACE;
+
+ PACCESS_DENIED_ACE = ^ACCESS_DENIED_ACE;
+ {$EXTERNALSYM PACCESS_DENIED_ACE}
+ _ACCESS_DENIED_ACE = record
+ Header: ACE_HEADER;
+ Mask: ACCESS_MASK;
+ SidStart: DWORD;
+ end;
+ {$EXTERNALSYM _ACCESS_DENIED_ACE}
+ ACCESS_DENIED_ACE = _ACCESS_DENIED_ACE;
+ {$EXTERNALSYM ACCESS_DENIED_ACE}
+ TAccessDeniedAce = ACCESS_DENIED_ACE;
+ PAccessDeniedAce = PACCESS_DENIED_ACE;
+
+ PSYSTEM_AUDIT_ACE = ^SYSTEM_AUDIT_ACE;
+ {$EXTERNALSYM PSYSTEM_AUDIT_ACE}
+ _SYSTEM_AUDIT_ACE = record
+ Header: ACE_HEADER;
+ Mask: ACCESS_MASK;
+ SidStart: DWORD;
+ end;
+ {$EXTERNALSYM _SYSTEM_AUDIT_ACE}
+ SYSTEM_AUDIT_ACE = _SYSTEM_AUDIT_ACE;
+ {$EXTERNALSYM SYSTEM_AUDIT_ACE}
+ TSystemAuditAce = SYSTEM_AUDIT_ACE;
+ PSystemAuditAce = PSYSTEM_AUDIT_ACE;
+
+ PSYSTEM_ALARM_ACE = ^SYSTEM_ALARM_ACE;
+ {$EXTERNALSYM PSYSTEM_ALARM_ACE}
+ _SYSTEM_ALARM_ACE = record
+ Header: ACE_HEADER;
+ Mask: ACCESS_MASK;
+ SidStart: DWORD;
+ end;
+ {$EXTERNALSYM _SYSTEM_ALARM_ACE}
+ SYSTEM_ALARM_ACE = _SYSTEM_ALARM_ACE;
+ {$EXTERNALSYM SYSTEM_ALARM_ACE}
+ TSystemAlarmAce = SYSTEM_ALARM_ACE;
+ PSystemAlarmAce = PSYSTEM_ALARM_ACE;
+
+ PACCESS_ALLOWED_OBJECT_ACE = ^ACCESS_ALLOWED_OBJECT_ACE;
+ {$EXTERNALSYM PACCESS_ALLOWED_OBJECT_ACE}
+ _ACCESS_ALLOWED_OBJECT_ACE = record
+ Header: ACE_HEADER;
+ Mask: ACCESS_MASK;
+ Flags: DWORD;
+ ObjectType: GUID;
+ InheritedObjectType: GUID;
+ SidStart: DWORD;
+ end;
+ {$EXTERNALSYM _ACCESS_ALLOWED_OBJECT_ACE}
+ ACCESS_ALLOWED_OBJECT_ACE = _ACCESS_ALLOWED_OBJECT_ACE;
+ {$EXTERNALSYM ACCESS_ALLOWED_OBJECT_ACE}
+ TAccessAllowedObjectAce = ACCESS_ALLOWED_OBJECT_ACE;
+ PAccessAllowedObjectAce = PACCESS_ALLOWED_OBJECT_ACE;
+
+ PACCESS_DENIED_OBJECT_ACE = ^ACCESS_DENIED_OBJECT_ACE;
+ {$EXTERNALSYM PACCESS_DENIED_OBJECT_ACE}
+ _ACCESS_DENIED_OBJECT_ACE = record
+ Header: ACE_HEADER;
+ Mask: ACCESS_MASK;
+ Flags: DWORD;
+ ObjectType: GUID;
+ InheritedObjectType: GUID;
+ SidStart: DWORD;
+ end;
+ {$EXTERNALSYM _ACCESS_DENIED_OBJECT_ACE}
+ ACCESS_DENIED_OBJECT_ACE = _ACCESS_DENIED_OBJECT_ACE;
+ {$EXTERNALSYM ACCESS_DENIED_OBJECT_ACE}
+ TAccessDeniedObjectAce = ACCESS_DENIED_OBJECT_ACE;
+ PAccessDeniedObjectAce = PACCESS_DENIED_OBJECT_ACE;
+
+ PSYSTEM_AUDIT_OBJECT_ACE = ^SYSTEM_AUDIT_OBJECT_ACE;
+ {$EXTERNALSYM PSYSTEM_AUDIT_OBJECT_ACE}
+ _SYSTEM_AUDIT_OBJECT_ACE = record
+ Header: ACE_HEADER;
+ Mask: ACCESS_MASK;
+ Flags: DWORD;
+ ObjectType: GUID;
+ InheritedObjectType: GUID;
+ SidStart: DWORD;
+ end;
+ {$EXTERNALSYM _SYSTEM_AUDIT_OBJECT_ACE}
+ SYSTEM_AUDIT_OBJECT_ACE = _SYSTEM_AUDIT_OBJECT_ACE;
+ {$EXTERNALSYM SYSTEM_AUDIT_OBJECT_ACE}
+ TSystemAuditObjectAce = SYSTEM_AUDIT_OBJECT_ACE;
+ PSystemAuditObjectAce = PSYSTEM_AUDIT_OBJECT_ACE;
+
+ PSYSTEM_ALARM_OBJECT_ACE = ^SYSTEM_ALARM_OBJECT_ACE;
+ {$EXTERNALSYM PSYSTEM_ALARM_OBJECT_ACE}
+ _SYSTEM_ALARM_OBJECT_ACE = record
+ Header: ACE_HEADER;
+ Mask: ACCESS_MASK;
+ Flags: DWORD;
+ ObjectType: GUID;
+ InheritedObjectType: GUID;
+ SidStart: DWORD;
+ end;
+ {$EXTERNALSYM _SYSTEM_ALARM_OBJECT_ACE}
+ SYSTEM_ALARM_OBJECT_ACE = _SYSTEM_ALARM_OBJECT_ACE;
+ {$EXTERNALSYM SYSTEM_ALARM_OBJECT_ACE}
+ TSystemAlarmObjectAce = SYSTEM_ALARM_OBJECT_ACE;
+ PSystemAlarmObjectAce = PSYSTEM_ALARM_OBJECT_ACE;
+
+//
+// Callback ace support in post Win2000.
+// Resource managers can put their own data after Sidstart + Length of the sid
+//
+
+ _ACCESS_ALLOWED_CALLBACK_ACE = record
+ Header: ACE_HEADER;
+ Mask: ACCESS_MASK;
+ SidStart: DWORD;
+ // Opaque resouce manager specific data
+ end;
+ {$EXTERNALSYM _ACCESS_ALLOWED_CALLBACK_ACE}
+ ACCESS_ALLOWED_CALLBACK_ACE = _ACCESS_ALLOWED_CALLBACK_ACE;
+ {$EXTERNALSYM ACCESS_ALLOWED_CALLBACK_ACE}
+ PACCESS_ALLOWED_CALLBACK_ACE = ^ACCESS_ALLOWED_CALLBACK_ACE;
+ {$EXTERNALSYM PACCESS_ALLOWED_CALLBACK_ACE}
+ TAccessAllowedCallBackAce = ACCESS_ALLOWED_CALLBACK_ACE;
+ PAccessAllowedCallBackAce = PACCESS_ALLOWED_CALLBACK_ACE;
+
+ _ACCESS_DENIED_CALLBACK_ACE = record
+ Header: ACE_HEADER;
+ Mask: ACCESS_MASK;
+ SidStart: DWORD;
+ // Opaque resouce manager specific data
+ end;
+ {$EXTERNALSYM _ACCESS_DENIED_CALLBACK_ACE}
+ ACCESS_DENIED_CALLBACK_ACE = _ACCESS_DENIED_CALLBACK_ACE;
+ {$EXTERNALSYM ACCESS_DENIED_CALLBACK_ACE}
+ PACCESS_DENIED_CALLBACK_ACE = ^ACCESS_DENIED_CALLBACK_ACE;
+ {$EXTERNALSYM PACCESS_DENIED_CALLBACK_ACE}
+ TAccessDeniedCallBackAce = ACCESS_DENIED_CALLBACK_ACE;
+ PAccessDeniedCallBackAce = PACCESS_DENIED_CALLBACK_ACE;
+
+ _SYSTEM_AUDIT_CALLBACK_ACE = record
+ Header: ACE_HEADER;
+ Mask: ACCESS_MASK;
+ SidStart: DWORD;
+ // Opaque resouce manager specific data
+ end;
+ {$EXTERNALSYM _SYSTEM_AUDIT_CALLBACK_ACE}
+ SYSTEM_AUDIT_CALLBACK_ACE = _SYSTEM_AUDIT_CALLBACK_ACE;
+ {$EXTERNALSYM SYSTEM_AUDIT_CALLBACK_ACE}
+ PSYSTEM_AUDIT_CALLBACK_ACE = ^SYSTEM_AUDIT_CALLBACK_ACE;
+ {$EXTERNALSYM PSYSTEM_AUDIT_CALLBACK_ACE}
+ TSystemAuditCallBackAce = SYSTEM_AUDIT_CALLBACK_ACE;
+ PSystemAuditCallBackAce = PSYSTEM_AUDIT_CALLBACK_ACE;
+
+ _SYSTEM_ALARM_CALLBACK_ACE = record
+ Header: ACE_HEADER;
+ Mask: ACCESS_MASK;
+ SidStart: DWORD;
+ // Opaque resouce manager specific data
+ end;
+ {$EXTERNALSYM _SYSTEM_ALARM_CALLBACK_ACE}
+ SYSTEM_ALARM_CALLBACK_ACE = _SYSTEM_ALARM_CALLBACK_ACE;
+ {$EXTERNALSYM SYSTEM_ALARM_CALLBACK_ACE}
+ PSYSTEM_ALARM_CALLBACK_ACE = ^SYSTEM_ALARM_CALLBACK_ACE;
+ {$EXTERNALSYM PSYSTEM_ALARM_CALLBACK_ACE}
+ TSystemAlarmCallBackAce = SYSTEM_ALARM_CALLBACK_ACE;
+ PSystemAlarmCallBackAce = PSYSTEM_ALARM_CALLBACK_ACE;
+
+ _ACCESS_ALLOWED_CALLBACK_OBJECT_ACE = record
+ Header: ACE_HEADER;
+ Mask: ACCESS_MASK;
+ Flags: DWORD;
+ ObjectType: GUID;
+ InheritedObjectType: GUID;
+ SidStart: DWORD;
+ // Opaque resouce manager specific data
+ end;
+ {$EXTERNALSYM _ACCESS_ALLOWED_CALLBACK_OBJECT_ACE}
+ ACCESS_ALLOWED_CALLBACK_OBJECT_ACE = _ACCESS_ALLOWED_CALLBACK_OBJECT_ACE;
+ {$EXTERNALSYM ACCESS_ALLOWED_CALLBACK_OBJECT_ACE}
+ PACCESS_ALLOWED_CALLBACK_OBJECT_ACE = ^ACCESS_ALLOWED_CALLBACK_OBJECT_ACE;
+ {$EXTERNALSYM PACCESS_ALLOWED_CALLBACK_OBJECT_ACE}
+ TAccessAllowedCallBackObjectAce = ACCESS_ALLOWED_CALLBACK_OBJECT_ACE;
+ PAccessAllowedCallBackObjectAce = PACCESS_ALLOWED_CALLBACK_OBJECT_ACE;
+
+ _ACCESS_DENIED_CALLBACK_OBJECT_ACE = record
+ Header: ACE_HEADER;
+ Mask: ACCESS_MASK;
+ Flags: DWORD;
+ ObjectType: GUID;
+ InheritedObjectType: GUID;
+ SidStart: DWORD;
+ // Opaque resouce manager specific data
+ end;
+ {$EXTERNALSYM _ACCESS_DENIED_CALLBACK_OBJECT_ACE}
+ ACCESS_DENIED_CALLBACK_OBJECT_ACE = _ACCESS_DENIED_CALLBACK_OBJECT_ACE;
+ {$EXTERNALSYM ACCESS_DENIED_CALLBACK_OBJECT_ACE}
+ PACCESS_DENIED_CALLBACK_OBJECT_ACE = ^ACCESS_DENIED_CALLBACK_OBJECT_ACE;
+ {$EXTERNALSYM PACCESS_DENIED_CALLBACK_OBJECT_ACE}
+ TAccessDeniedCallBackObjectAce = ACCESS_DENIED_CALLBACK_OBJECT_ACE;
+ PAccessDeniedCallBackObjectAce = PACCESS_DENIED_CALLBACK_OBJECT_ACE;
+
+ _SYSTEM_AUDIT_CALLBACK_OBJECT_ACE = record
+ Header: ACE_HEADER;
+ Mask: ACCESS_MASK;
+ Flags: DWORD;
+ ObjectType: GUID;
+ InheritedObjectType: GUID;
+ SidStart: DWORD;
+ // Opaque resouce manager specific data
+ end;
+ {$EXTERNALSYM _SYSTEM_AUDIT_CALLBACK_OBJECT_ACE}
+ SYSTEM_AUDIT_CALLBACK_OBJECT_ACE = _SYSTEM_AUDIT_CALLBACK_OBJECT_ACE;
+ {$EXTERNALSYM SYSTEM_AUDIT_CALLBACK_OBJECT_ACE}
+ PSYSTEM_AUDIT_CALLBACK_OBJECT_ACE = ^SYSTEM_AUDIT_CALLBACK_OBJECT_ACE;
+ {$EXTERNALSYM PSYSTEM_AUDIT_CALLBACK_OBJECT_ACE}
+ TSystemAuditCallBackObjectAce = SYSTEM_AUDIT_CALLBACK_OBJECT_ACE;
+ PSystemAuditCallBackObjectAce = PSYSTEM_AUDIT_CALLBACK_OBJECT_ACE;
+
+ _SYSTEM_ALARM_CALLBACK_OBJECT_ACE = record
+ Header: ACE_HEADER;
+ Mask: ACCESS_MASK;
+ Flags: DWORD;
+ ObjectType: GUID;
+ InheritedObjectType: GUID;
+ SidStart: DWORD;
+ // Opaque resouce manager specific data
+ end;
+ {$EXTERNALSYM _SYSTEM_ALARM_CALLBACK_OBJECT_ACE}
+ SYSTEM_ALARM_CALLBACK_OBJECT_ACE = _SYSTEM_ALARM_CALLBACK_OBJECT_ACE;
+ {$EXTERNALSYM SYSTEM_ALARM_CALLBACK_OBJECT_ACE}
+ PSYSTEM_ALARM_CALLBACK_OBJECT_ACE = ^SYSTEM_ALARM_CALLBACK_OBJECT_ACE;
+ {$EXTERNALSYM PSYSTEM_ALARM_CALLBACK_OBJECT_ACE}
+ TSystemAlarmCallBackObjectAce = SYSTEM_ALARM_CALLBACK_OBJECT_ACE;
+ PSystemAlarmCallBackObjectAce = PSYSTEM_ALARM_CALLBACK_OBJECT_ACE;
+
+//
+// Currently define Flags for "OBJECT" ACE types.
+//
+
+const
+ ACE_OBJECT_TYPE_PRESENT = $1;
+ {$EXTERNALSYM ACE_OBJECT_TYPE_PRESENT}
+ ACE_INHERITED_OBJECT_TYPE_PRESENT = $2;
+ {$EXTERNALSYM ACE_INHERITED_OBJECT_TYPE_PRESENT}
+
+//
+// The following declarations are used for setting and querying information
+// about and ACL. First are the various information classes available to
+// the user.
+//
+
+ AclRevisionInformation = 1;
+ {$EXTERNALSYM AclRevisionInformation}
+ AclSizeInformation = 2;
+ {$EXTERNALSYM AclSizeInformation}
+
+type
+ _ACL_INFORMATION_CLASS = DWORD;
+ {$EXTERNALSYM _ACL_INFORMATION_CLASS}
+ ACL_INFORMATION_CLASS = _ACL_INFORMATION_CLASS;
+ {$EXTERNALSYM ACL_INFORMATION_CLASS}
+ TAclInformationClass = ACL_INFORMATION_CLASS;
+
+//
+// This record is returned/sent if the user is requesting/setting the
+// AclRevisionInformation
+//
+
+ PACL_REVISION_INFORMATION = ^ACL_REVISION_INFORMATION;
+ {$EXTERNALSYM PACL_REVISION_INFORMATION}
+ _ACL_REVISION_INFORMATION = record
+ AclRevision: DWORD;
+ end;
+ {$EXTERNALSYM _ACL_REVISION_INFORMATION}
+ ACL_REVISION_INFORMATION = _ACL_REVISION_INFORMATION;
+ {$EXTERNALSYM ACL_REVISION_INFORMATION}
+ TAclRevisionInformation = ACL_REVISION_INFORMATION;
+ PAclRevisionInformation = PACL_REVISION_INFORMATION;
+
+//
+// This record is returned if the user is requesting AclSizeInformation
+//
+
+ PACL_SIZE_INFORMATION = ^ACL_SIZE_INFORMATION;
+ {$EXTERNALSYM PACL_SIZE_INFORMATION}
+ _ACL_SIZE_INFORMATION = record
+ AceCount: DWORD;
+ AclBytesInUse: DWORD;
+ AclBytesFree: DWORD;
+ end;
+ {$EXTERNALSYM _ACL_SIZE_INFORMATION}
+ ACL_SIZE_INFORMATION = _ACL_SIZE_INFORMATION;
+ {$EXTERNALSYM ACL_SIZE_INFORMATION}
+ TAclSizeInformation = ACL_SIZE_INFORMATION;
+ PAclSizeInformation = PACL_SIZE_INFORMATION;
+
+////////////////////////////////////////////////////////////////////////
+// //
+// SECURITY_DESCRIPTOR //
+// //
+////////////////////////////////////////////////////////////////////////
+//
+// Define the Security Descriptor and related data types.
+// This is an opaque data structure.
+//
+
+//
+// Current security descriptor revision value
+//
+
+const
+ SECURITY_DESCRIPTOR_REVISION = 1;
+ {$EXTERNALSYM SECURITY_DESCRIPTOR_REVISION}
+ SECURITY_DESCRIPTOR_REVISION1 = 1;
+ {$EXTERNALSYM SECURITY_DESCRIPTOR_REVISION1}
+
+type
+ SECURITY_DESCRIPTOR_CONTROL = WORD;
+ {$EXTERNALSYM SECURITY_DESCRIPTOR_CONTROL}
+ PSECURITY_DESCRIPTOR_CONTROL = ^SECURITY_DESCRIPTOR_CONTROL;
+ {$EXTERNALSYM PSECURITY_DESCRIPTOR_CONTROL}
+ TSecurityDescriptorControl = SECURITY_DESCRIPTOR_CONTROL;
+ PSecurityDescriptorControl = PSECURITY_DESCRIPTOR_CONTROL;
+
+const
+ SE_OWNER_DEFAULTED = $0001;
+ {$EXTERNALSYM SE_OWNER_DEFAULTED}
+ SE_GROUP_DEFAULTED = $0002;
+ {$EXTERNALSYM SE_GROUP_DEFAULTED}
+ SE_DACL_PRESENT = $0004;
+ {$EXTERNALSYM SE_DACL_PRESENT}
+ SE_DACL_DEFAULTED = $0008;
+ {$EXTERNALSYM SE_DACL_DEFAULTED}
+ SE_SACL_PRESENT = $0010;
+ {$EXTERNALSYM SE_SACL_PRESENT}
+ SE_SACL_DEFAULTED = $0020;
+ {$EXTERNALSYM SE_SACL_DEFAULTED}
+ SE_DACL_AUTO_INHERIT_REQ = $0100;
+ {$EXTERNALSYM SE_DACL_AUTO_INHERIT_REQ}
+ SE_SACL_AUTO_INHERIT_REQ = $0200;
+ {$EXTERNALSYM SE_SACL_AUTO_INHERIT_REQ}
+ SE_DACL_AUTO_INHERITED = $0400;
+ {$EXTERNALSYM SE_DACL_AUTO_INHERITED}
+ SE_SACL_AUTO_INHERITED = $0800;
+ {$EXTERNALSYM SE_SACL_AUTO_INHERITED}
+ SE_DACL_PROTECTED = $1000;
+ {$EXTERNALSYM SE_DACL_PROTECTED}
+ SE_SACL_PROTECTED = $2000;
+ {$EXTERNALSYM SE_SACL_PROTECTED}
+ SE_RM_CONTROL_VALID = $4000;
+ {$EXTERNALSYM SE_RM_CONTROL_VALID}
+ SE_SELF_RELATIVE = $8000;
+ {$EXTERNALSYM SE_SELF_RELATIVE}
+
+//
+// Where:
+//
+// SE_OWNER_DEFAULTED - This boolean flag, when set, indicates that the
+// SID pointed to by the Owner field was provided by a
+// defaulting mechanism rather than explicitly provided by the
+// original provider of the security descriptor. This may
+// affect the treatment of the SID with respect to inheritence
+// of an owner.
+//
+// SE_GROUP_DEFAULTED - This boolean flag, when set, indicates that the
+// SID in the Group field was provided by a defaulting mechanism
+// rather than explicitly provided by the original provider of
+// the security descriptor. This may affect the treatment of
+// the SID with respect to inheritence of a primary group.
+//
+// SE_DACL_PRESENT - This boolean flag, when set, indicates that the
+// security descriptor contains a discretionary ACL. If this
+// flag is set and the Dacl field of the SECURITY_DESCRIPTOR is
+// null, then a null ACL is explicitly being specified.
+//
+// SE_DACL_DEFAULTED - This boolean flag, when set, indicates that the
+// ACL pointed to by the Dacl field was provided by a defaulting
+// mechanism rather than explicitly provided by the original
+// provider of the security descriptor. This may affect the
+// treatment of the ACL with respect to inheritence of an ACL.
+// This flag is ignored if the DaclPresent flag is not set.
+//
+// SE_SACL_PRESENT - This boolean flag, when set, indicates that the
+// security descriptor contains a system ACL pointed to by the
+// Sacl field. If this flag is set and the Sacl field of the
+// SECURITY_DESCRIPTOR is null, then an empty (but present)
+// ACL is being specified.
+//
+// SE_SACL_DEFAULTED - This boolean flag, when set, indicates that the
+// ACL pointed to by the Sacl field was provided by a defaulting
+// mechanism rather than explicitly provided by the original
+// provider of the security descriptor. This may affect the
+// treatment of the ACL with respect to inheritence of an ACL.
+// This flag is ignored if the SaclPresent flag is not set.
+//
+// SE_SELF_RELATIVE - This boolean flag, when set, indicates that the
+// security descriptor is in self-relative form. In this form,
+// all fields of the security descriptor are contiguous in memory
+// and all pointer fields are expressed as offsets from the
+// beginning of the security descriptor. This form is useful
+// for treating security descriptors as opaque data structures
+// for transmission in communication protocol or for storage on
+// secondary media.
+//
+//
+//
+// Pictorially the structure of a security descriptor is as follows:
+//
+// 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1
+// 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
+// +---------------------------------------------------------------+
+// | Control |Reserved1 (SBZ)| Revision |
+// +---------------------------------------------------------------+
+// | Owner |
+// +---------------------------------------------------------------+
+// | Group |
+// +---------------------------------------------------------------+
+// | Sacl |
+// +---------------------------------------------------------------+
+// | Dacl |
+// +---------------------------------------------------------------+
+//
+// In general, this data structure should be treated opaquely to ensure future
+// compatibility.
+//
+//
+
+type
+ PSECURITY_DESCRIPTOR_RELATIVE = ^SECURITY_DESCRIPTOR_RELATIVE;
+ {$EXTERNALSYM PSECURITY_DESCRIPTOR_RELATIVE}
+ _SECURITY_DESCRIPTOR_RELATIVE = record
+ Revision: Byte;
+ Sbz1: Byte;
+ Control: SECURITY_DESCRIPTOR_CONTROL;
+ Owner: DWORD;
+ Group: DWORD;
+ Sacl: DWORD;
+ Dacl: DWORD;
+ end;
+ {$EXTERNALSYM _SECURITY_DESCRIPTOR_RELATIVE}
+ SECURITY_DESCRIPTOR_RELATIVE = _SECURITY_DESCRIPTOR_RELATIVE;
+ {$EXTERNALSYM SECURITY_DESCRIPTOR_RELATIVE}
+ TSecurityDescriptorRelative = SECURITY_DESCRIPTOR_RELATIVE;
+ PSecurityDescriptorRelative = PSECURITY_DESCRIPTOR_RELATIVE;
+
+ PSECURITY_DESCRIPTOR = ^SECURITY_DESCRIPTOR;
+ {$EXTERNALSYM PSECURITY_DESCRIPTOR}
+ _SECURITY_DESCRIPTOR = record
+ Revision: Byte;
+ Sbz1: Byte;
+ Control: SECURITY_DESCRIPTOR_CONTROL;
+ Owner: PSID;
+ Group: PSID;
+ Sacl: PACL;
+ Dacl: PACL;
+ end;
+ {$EXTERNALSYM _SECURITY_DESCRIPTOR}
+ SECURITY_DESCRIPTOR = _SECURITY_DESCRIPTOR;
+ {$EXTERNALSYM SECURITY_DESCRIPTOR}
+ TSecurityDescriptor = SECURITY_DESCRIPTOR;
+ PSecurityDescriptor = PSECURITY_DESCRIPTOR;
+
+ PPSECURITY_DESCRIPTOR = ^PSECURITY_DESCRIPTOR;
+ {$NODEFINE PPSECURITY_DESCRIPTOR}
+
+const
+ SECURITY_DESCRIPTOR_MIN_LENGTH = SizeOf(SECURITY_DESCRIPTOR);
+ {$EXTERNALSYM SECURITY_DESCRIPTOR_MIN_LENGTH}
+
+// Where:
+//
+// Revision - Contains the revision level of the security
+// descriptor. This allows this structure to be passed between
+// systems or stored on disk even though it is expected to
+// change in the future.
+//
+// Control - A set of flags which qualify the meaning of the
+// security descriptor or individual fields of the security
+// descriptor.
+//
+// Owner - is a pointer to an SID representing an object's owner.
+// If this field is null, then no owner SID is present in the
+// security descriptor. If the security descriptor is in
+// self-relative form, then this field contains an offset to
+// the SID, rather than a pointer.
+//
+// Group - is a pointer to an SID representing an object's primary
+// group. If this field is null, then no primary group SID is
+// present in the security descriptor. If the security descriptor
+// is in self-relative form, then this field contains an offset to
+// the SID, rather than a pointer.
+//
+// Sacl - is a pointer to a system ACL. This field value is only
+// valid if the DaclPresent control flag is set. If the
+// SaclPresent flag is set and this field is null, then a null
+// ACL is specified. If the security descriptor is in
+// self-relative form, then this field contains an offset to
+// the ACL, rather than a pointer.
+//
+// Dacl - is a pointer to a discretionary ACL. This field value is
+// only valid if the DaclPresent control flag is set. If the
+// DaclPresent flag is set and this field is null, then a null
+// ACL (unconditionally granting access) is specified. If the
+// security descriptor is in self-relative form, then this field
+// contains an offset to the ACL, rather than a pointer.
+//
+
+////////////////////////////////////////////////////////////////////////
+// //
+// Object Type list for AccessCheckByType //
+// //
+////////////////////////////////////////////////////////////////////////
+
+type
+ POBJECT_TYPE_LIST = ^OBJECT_TYPE_LIST;
+ {$EXTERNALSYM POBJECT_TYPE_LIST}
+ _OBJECT_TYPE_LIST = record
+ Level: Word;
+ Sbz: Word;
+ ObjectType: PGUID;
+ end;
+ {$EXTERNALSYM _OBJECT_TYPE_LIST}
+ OBJECT_TYPE_LIST = _OBJECT_TYPE_LIST;
+ {$EXTERNALSYM OBJECT_TYPE_LIST}
+ TObjectTypeList = OBJECT_TYPE_LIST;
+ PObjectTypeList = POBJECT_TYPE_LIST;
+
+//
+// DS values for Level
+//
+
+const
+ ACCESS_OBJECT_GUID = 0;
+ {$EXTERNALSYM ACCESS_OBJECT_GUID}
+ ACCESS_PROPERTY_SET_GUID = 1;
+ {$EXTERNALSYM ACCESS_PROPERTY_SET_GUID}
+ ACCESS_PROPERTY_GUID = 2;
+ {$EXTERNALSYM ACCESS_PROPERTY_GUID}
+
+ ACCESS_MAX_LEVEL = 4;
+ {$EXTERNALSYM ACCESS_MAX_LEVEL}
+
+//
+// Parameters to NtAccessCheckByTypeAndAditAlarm
+//
+
+type
+ _AUDIT_EVENT_TYPE = (AuditEventObjectAccess, AuditEventDirectoryServiceAccess);
+ {$EXTERNALSYM _AUDIT_EVENT_TYPE}
+ AUDIT_EVENT_TYPE = _AUDIT_EVENT_TYPE;
+ {$EXTERNALSYM AUDIT_EVENT_TYPE}
+ PAUDIT_EVENT_TYPE = ^AUDIT_EVENT_TYPE;
+ {$EXTERNALSYM PAUDIT_EVENT_TYPE}
+ TAuditEventType = AUDIT_EVENT_TYPE;
+ PAuditEventType = PAUDIT_EVENT_TYPE;
+
+const
+ AUDIT_ALLOW_NO_PRIVILEGE = $1;
+ {$EXTERNALSYM AUDIT_ALLOW_NO_PRIVILEGE}
+
+//
+// DS values for Source and ObjectTypeName
+//
+
+ ACCESS_DS_SOURCE_A = 'DS';
+ {$EXTERNALSYM ACCESS_DS_SOURCE_A}
+ ACCESS_DS_SOURCE_W = WideString('DS');
+ {$EXTERNALSYM ACCESS_DS_SOURCE_W}
+ ACCESS_DS_OBJECT_TYPE_NAME_A = 'Directory Service Object';
+ {$EXTERNALSYM ACCESS_DS_OBJECT_TYPE_NAME_A}
+ ACCESS_DS_OBJECT_TYPE_NAME_W = WideString('Directory Service Object');
+ {$EXTERNALSYM ACCESS_DS_OBJECT_TYPE_NAME_W}
+
+////////////////////////////////////////////////////////////////////////
+// //
+// Privilege Related Data Structures //
+// //
+////////////////////////////////////////////////////////////////////////
+
+//
+// Privilege attributes
+//
+
+const
+ SE_PRIVILEGE_ENABLED_BY_DEFAULT = $00000001;
+ {$EXTERNALSYM SE_PRIVILEGE_ENABLED_BY_DEFAULT}
+ SE_PRIVILEGE_ENABLED = $00000002;
+ {$EXTERNALSYM SE_PRIVILEGE_ENABLED}
+ SE_PRIVILEGE_REMOVED = $00000004;
+ {$EXTERNALSYM SE_PRIVILEGE_REMOVED}
+ SE_PRIVILEGE_USED_FOR_ACCESS = DWORD($80000000);
+ {$EXTERNALSYM SE_PRIVILEGE_USED_FOR_ACCESS}
+
+//
+// Privilege Set Control flags
+//
+
+ PRIVILEGE_SET_ALL_NECESSARY = 1;
+ {$EXTERNALSYM PRIVILEGE_SET_ALL_NECESSARY}
+
+//
+// Privilege Set - This is defined for a privilege set of one.
+// If more than one privilege is needed, then this structure
+// will need to be allocated with more space.
+//
+// Note: don't change this structure without fixing the INITIAL_PRIVILEGE_SET
+// structure (defined in se.h)
+//
+
+type
+ PPRIVILEGE_SET = ^PRIVILEGE_SET;
+ {$EXTERNALSYM PPRIVILEGE_SET}
+ _PRIVILEGE_SET = record
+ PrivilegeCount: DWORD;
+ Control: DWORD;
+ Privilege: array [0..ANYSIZE_ARRAY - 1] of LUID_AND_ATTRIBUTES;
+ //Privilege: LUID_AND_ATTRIBUTES;
+ end;
+ {$EXTERNALSYM _PRIVILEGE_SET}
+ PRIVILEGE_SET = _PRIVILEGE_SET;
+ {$EXTERNALSYM PRIVILEGE_SET}
+ TPrivilegeSet = PRIVILEGE_SET;
+ PPrivilegeSet = PPRIVILEGE_SET;
+
+////////////////////////////////////////////////////////////////////////
+// //
+// NT Defined Privileges //
+// //
+////////////////////////////////////////////////////////////////////////
+
+const
+ SE_CREATE_TOKEN_NAME = 'SeCreateTokenPrivilege';
+ {$EXTERNALSYM SE_CREATE_TOKEN_NAME}
+ SE_ASSIGNPRIMARYTOKEN_NAME = 'SeAssignPrimaryTokenPrivilege';
+ {$EXTERNALSYM SE_ASSIGNPRIMARYTOKEN_NAME}
+ SE_LOCK_MEMORY_NAME = 'SeLockMemoryPrivilege';
+ {$EXTERNALSYM SE_LOCK_MEMORY_NAME}
+ SE_INCREASE_QUOTA_NAME = 'SeIncreaseQuotaPrivilege';
+ {$EXTERNALSYM SE_INCREASE_QUOTA_NAME}
+ SE_UNSOLICITED_INPUT_NAME = 'SeUnsolicitedInputPrivilege';
+ {$EXTERNALSYM SE_UNSOLICITED_INPUT_NAME}
+ SE_MACHINE_ACCOUNT_NAME = 'SeMachineAccountPrivilege';
+ {$EXTERNALSYM SE_MACHINE_ACCOUNT_NAME}
+ SE_TCB_NAME = 'SeTcbPrivilege';
+ {$EXTERNALSYM SE_TCB_NAME}
+ SE_SECURITY_NAME = 'SeSecurityPrivilege';
+ {$EXTERNALSYM SE_SECURITY_NAME}
+ SE_TAKE_OWNERSHIP_NAME = 'SeTakeOwnershipPrivilege';
+ {$EXTERNALSYM SE_TAKE_OWNERSHIP_NAME}
+ SE_LOAD_DRIVER_NAME = 'SeLoadDriverPrivilege';
+ {$EXTERNALSYM SE_LOAD_DRIVER_NAME}
+ SE_SYSTEM_PROFILE_NAME = 'SeSystemProfilePrivilege';
+ {$EXTERNALSYM SE_SYSTEM_PROFILE_NAME}
+ SE_SYSTEMTIME_NAME = 'SeSystemtimePrivilege';
+ {$EXTERNALSYM SE_SYSTEMTIME_NAME}
+ SE_PROF_SINGLE_PROCESS_NAME = 'SeProfileSingleProcessPrivilege';
+ {$EXTERNALSYM SE_PROF_SINGLE_PROCESS_NAME}
+ SE_INC_BASE_PRIORITY_NAME = 'SeIncreaseBasePriorityPrivilege';
+ {$EXTERNALSYM SE_INC_BASE_PRIORITY_NAME}
+ SE_CREATE_PAGEFILE_NAME = 'SeCreatePagefilePrivilege';
+ {$EXTERNALSYM SE_CREATE_PAGEFILE_NAME}
+ SE_CREATE_PERMANENT_NAME = 'SeCreatePermanentPrivilege';
+ {$EXTERNALSYM SE_CREATE_PERMANENT_NAME}
+ SE_BACKUP_NAME = 'SeBackupPrivilege';
+ {$EXTERNALSYM SE_BACKUP_NAME}
+ SE_RESTORE_NAME = 'SeRestorePrivilege';
+ {$EXTERNALSYM SE_RESTORE_NAME}
+ SE_SHUTDOWN_NAME = 'SeShutdownPrivilege';
+ {$EXTERNALSYM SE_SHUTDOWN_NAME}
+ SE_DEBUG_NAME = 'SeDebugPrivilege';
+ {$EXTERNALSYM SE_DEBUG_NAME}
+ SE_AUDIT_NAME = 'SeAuditPrivilege';
+ {$EXTERNALSYM SE_AUDIT_NAME}
+ SE_SYSTEM_ENVIRONMENT_NAME = 'SeSystemEnvironmentPrivilege';
+ {$EXTERNALSYM SE_SYSTEM_ENVIRONMENT_NAME}
+ SE_CHANGE_NOTIFY_NAME = 'SeChangeNotifyPrivilege';
+ {$EXTERNALSYM SE_CHANGE_NOTIFY_NAME}
+ SE_REMOTE_SHUTDOWN_NAME = 'SeRemoteShutdownPrivilege';
+ {$EXTERNALSYM SE_REMOTE_SHUTDOWN_NAME}
+ SE_UNDOCK_NAME = 'SeUndockPrivilege';
+ {$EXTERNALSYM SE_UNDOCK_NAME}
+ SE_SYNC_AGENT_NAME = 'SeSyncAgentPrivilege';
+ {$EXTERNALSYM SE_SYNC_AGENT_NAME}
+ SE_ENABLE_DELEGATION_NAME = 'SeEnableDelegationPrivilege';
+ {$EXTERNALSYM SE_ENABLE_DELEGATION_NAME}
+ SE_MANAGE_VOLUME_NAME = 'SeManageVolumePrivilege';
+ {$EXTERNALSYM SE_MANAGE_VOLUME_NAME}
+ SE_IMPERSONATE_NAME = 'SeImpersonatePrivilege';
+ {$EXTERNALSYM SE_IMPERSONATE_NAME}
+ SE_CREATE_GLOBAL_NAME = 'SeCreateGlobalPrivilege';
+ {$EXTERNALSYM SE_CREATE_GLOBAL_NAME}
+
+////////////////////////////////////////////////////////////////////
+// //
+// Security Quality Of Service //
+// //
+// //
+////////////////////////////////////////////////////////////////////
+
+//
+// Impersonation Level
+//
+// Impersonation level is represented by a pair of bits in Windows.
+// If a new impersonation level is added or lowest value is changed from
+// 0 to something else, fix the Windows CreateFile call.
+//
+
+type
+ _SECURITY_IMPERSONATION_LEVEL = (SecurityAnonymous, SecurityIdentification,
+ SecurityImpersonation, SecurityDelegation);
+ {$EXTERNALSYM _SECURITY_IMPERSONATION_LEVEL}
+ SECURITY_IMPERSONATION_LEVEL = _SECURITY_IMPERSONATION_LEVEL;
+ {$EXTERNALSYM SECURITY_IMPERSONATION_LEVEL}
+ PSECURITY_IMPERSONATION_LEVEL = ^SECURITY_IMPERSONATION_LEVEL;
+ {$EXTERNALSYM PSECURITY_IMPERSONATION_LEVEL}
+ TSecurityImpersonationLevel = SECURITY_IMPERSONATION_LEVEL;
+ PSecurityImpersonationLevel = PSECURITY_IMPERSONATION_LEVEL;
+
+const
+ SECURITY_MAX_IMPERSONATION_LEVEL = SecurityDelegation;
+ {$EXTERNALSYM SECURITY_MAX_IMPERSONATION_LEVEL}
+ SECURITY_MIN_IMPERSONATION_LEVEL = SecurityAnonymous;
+ {$EXTERNALSYM SECURITY_MIN_IMPERSONATION_LEVEL}
+ DEFAULT_IMPERSONATION_LEVEL = SecurityImpersonation;
+ {$EXTERNALSYM DEFAULT_IMPERSONATION_LEVEL}
+
+function VALID_IMPERSONATION_LEVEL(L: TSecurityImpersonationLevel): BOOL;
+{$EXTERNALSYM VALID_IMPERSONATION_LEVEL}
+
+////////////////////////////////////////////////////////////////////
+// //
+// Token Object Definitions //
+// //
+// //
+////////////////////////////////////////////////////////////////////
+
+//
+// Token Specific Access Rights.
+//
+
+const
+ TOKEN_ASSIGN_PRIMARY = $0001;
+ {$EXTERNALSYM TOKEN_ASSIGN_PRIMARY}
+ TOKEN_DUPLICATE = $0002;
+ {$EXTERNALSYM TOKEN_DUPLICATE}
+ TOKEN_IMPERSONATE = $0004;
+ {$EXTERNALSYM TOKEN_IMPERSONATE}
+ TOKEN_QUERY = $0008;
+ {$EXTERNALSYM TOKEN_QUERY}
+ TOKEN_QUERY_SOURCE = $0010;
+ {$EXTERNALSYM TOKEN_QUERY_SOURCE}
+ TOKEN_ADJUST_PRIVILEGES = $0020;
+ {$EXTERNALSYM TOKEN_ADJUST_PRIVILEGES}
+ TOKEN_ADJUST_GROUPS = $0040;
+ {$EXTERNALSYM TOKEN_ADJUST_GROUPS}
+ TOKEN_ADJUST_DEFAULT = $0080;
+ {$EXTERNALSYM TOKEN_ADJUST_DEFAULT}
+ TOKEN_ADJUST_SESSIONID = $0100;
+ {$EXTERNALSYM TOKEN_ADJUST_SESSIONID}
+
+ TOKEN_ALL_ACCESS_P = STANDARD_RIGHTS_REQUIRED or TOKEN_ASSIGN_PRIMARY or
+ TOKEN_DUPLICATE or TOKEN_IMPERSONATE or TOKEN_QUERY or TOKEN_QUERY_SOURCE or
+ TOKEN_ADJUST_PRIVILEGES or TOKEN_ADJUST_GROUPS or TOKEN_ADJUST_DEFAULT;
+ {$EXTERNALSYM TOKEN_ALL_ACCESS_P}
+
+ TOKEN_ALL_ACCESS = TOKEN_ALL_ACCESS_P or TOKEN_ADJUST_SESSIONID;
+ {$EXTERNALSYM TOKEN_ALL_ACCESS}
+
+ TOKEN_READ = STANDARD_RIGHTS_READ or TOKEN_QUERY;
+ {$EXTERNALSYM TOKEN_READ}
+
+ TOKEN_WRITE = (STANDARD_RIGHTS_WRITE or TOKEN_ADJUST_PRIVILEGES or
+ TOKEN_ADJUST_GROUPS or TOKEN_ADJUST_DEFAULT);
+ {$EXTERNALSYM TOKEN_WRITE}
+
+ TOKEN_EXECUTE = STANDARD_RIGHTS_EXECUTE;
+ {$EXTERNALSYM TOKEN_EXECUTE}
+
+//
+// Token Types
+//
+
+type
+ _TOKEN_TYPE = (TokenTypePad0, TokenPrimary, TokenImpersonation);
+ {$EXTERNALSYM _TOKEN_TYPE}
+ TOKEN_TYPE = _TOKEN_TYPE;
+ {$EXTERNALSYM TOKEN_TYPE}
+ PTOKEN_TYPE = ^TOKEN_TYPE;
+ {$EXTERNALSYM PTOKEN_TYPE}
+
+ TTokenType = TOKEN_TYPE;
+ PTokenType = PTOKEN_TYPE;
+
+//
+// Token Information Classes.
+//
+
+type
+ _TOKEN_INFORMATION_CLASS = (TokenInfoClassPad0, TokenUser, TokenGroups,
+ TokenPrivileges, TokenOwner, TokenPrimaryGroup, TokenDefaultDacl, TokenSource,
+ TokenType, TokenImpersonationLevel, TokenStatistics, TokenRestrictedSids,
+ TokenSessionId, TokenGroupsAndPrivileges, TokenSessionReference,
+ TokenSandBoxInert, TokenAuditPolicy, TokenOrigin,
+ MaxTokenInfoClass); {MaxTokenInfoClass should always be the last enum}
+ {$EXTERNALSYM _TOKEN_INFORMATION_CLASS}
+ TOKEN_INFORMATION_CLASS = _TOKEN_INFORMATION_CLASS;
+ {$EXTERNALSYM TOKEN_INFORMATION_CLASS}
+ PTOKEN_INFORMATION_CLASS = ^TOKEN_INFORMATION_CLASS;
+ {$EXTERNALSYM PTOKEN_INFORMATION_CLASS}
+
+ TTokenInformationClass = TOKEN_INFORMATION_CLASS;
+ PTokenInformationClass = PTOKEN_INFORMATION_CLASS;
+
+//
+// Token information class structures
+//
+
+type
+ PTOKEN_USER = ^TOKEN_USER;
+ {$EXTERNALSYM PTOKEN_USER}
+ _TOKEN_USER = record
+ User: SID_AND_ATTRIBUTES;
+ end;
+ {$EXTERNALSYM _TOKEN_USER}
+ TOKEN_USER = _TOKEN_USER;
+ {$EXTERNALSYM TOKEN_USER}
+ TTokenUser = TOKEN_USER;
+ PTokenUser = PTOKEN_USER;
+
+ PTOKEN_GROUPS = ^TOKEN_GROUPS;
+ {$EXTERNALSYM PTOKEN_GROUPS}
+ _TOKEN_GROUPS = record
+ GroupCount: DWORD;
+ Groups: array [0..ANYSIZE_ARRAY - 1] of SID_AND_ATTRIBUTES;
+ end;
+ {$EXTERNALSYM _TOKEN_GROUPS}
+ TOKEN_GROUPS = _TOKEN_GROUPS;
+ {$EXTERNALSYM TOKEN_GROUPS}
+ TTokenGroups = TOKEN_GROUPS;
+ PTokenGroups = PTOKEN_GROUPS;
+
+ PTOKEN_PRIVILEGES = ^TOKEN_PRIVILEGES;
+ {$EXTERNALSYM PTOKEN_PRIVILEGES}
+ _TOKEN_PRIVILEGES = record
+ PrivilegeCount: DWORD;
+ Privileges: array [0..ANYSIZE_ARRAY - 1] of LUID_AND_ATTRIBUTES;
+ end;
+ {$EXTERNALSYM _TOKEN_PRIVILEGES}
+ TOKEN_PRIVILEGES = _TOKEN_PRIVILEGES;
+ {$EXTERNALSYM TOKEN_PRIVILEGES}
+ TTokenPrivileges = TOKEN_PRIVILEGES;
+ PTokenPrivileges = PTOKEN_PRIVILEGES;
+
+ PTOKEN_OWNER = ^TOKEN_OWNER;
+ {$EXTERNALSYM PTOKEN_OWNER}
+ _TOKEN_OWNER = record
+ Owner: PSID;
+ end;
+ {$EXTERNALSYM _TOKEN_OWNER}
+ TOKEN_OWNER = _TOKEN_OWNER;
+ {$EXTERNALSYM TOKEN_OWNER}
+ TTokenOwner = TOKEN_OWNER;
+ PTokenOwner = PTOKEN_OWNER;
+
+ PTOKEN_PRIMARY_GROUP = ^TOKEN_PRIMARY_GROUP;
+ {$EXTERNALSYM PTOKEN_PRIMARY_GROUP}
+ _TOKEN_PRIMARY_GROUP = record
+ PrimaryGroup: PSID;
+ end;
+ {$EXTERNALSYM _TOKEN_PRIMARY_GROUP}
+ TOKEN_PRIMARY_GROUP = _TOKEN_PRIMARY_GROUP;
+ {$EXTERNALSYM TOKEN_PRIMARY_GROUP}
+ TTokenPrimaryGroup = TOKEN_PRIMARY_GROUP;
+ PTokenPrimaryGroup = PTOKEN_PRIMARY_GROUP;
+
+ PTOKEN_DEFAULT_DACL = ^TOKEN_DEFAULT_DACL;
+ {$EXTERNALSYM PTOKEN_DEFAULT_DACL}
+ _TOKEN_DEFAULT_DACL = record
+ DefaultDacl: PACL;
+ end;
+ {$EXTERNALSYM _TOKEN_DEFAULT_DACL}
+ TOKEN_DEFAULT_DACL = _TOKEN_DEFAULT_DACL;
+ {$EXTERNALSYM TOKEN_DEFAULT_DACL}
+ TTokenDefaultDacl = TOKEN_DEFAULT_DACL;
+ PTokenDefaultDacl = PTOKEN_DEFAULT_DACL;
+
+ _TOKEN_GROUPS_AND_PRIVILEGES = record
+ SidCount: DWORD;
+ SidLength: DWORD;
+ Sids: PSID_AND_ATTRIBUTES;
+ RestrictedSidCount: DWORD;
+ RestrictedSidLength: DWORD;
+ RestrictedSids: PSID_AND_ATTRIBUTES;
+ PrivilegeCount: DWORD;
+ PrivilegeLength: DWORD;
+ Privileges: PLUID_AND_ATTRIBUTES;
+ AuthenticationId: LUID;
+ end;
+ {$EXTERNALSYM _TOKEN_GROUPS_AND_PRIVILEGES}
+ TOKEN_GROUPS_AND_PRIVILEGES = _TOKEN_GROUPS_AND_PRIVILEGES;
+ {$EXTERNALSYM TOKEN_GROUPS_AND_PRIVILEGES}
+ PTOKEN_GROUPS_AND_PRIVILEGES = ^TOKEN_GROUPS_AND_PRIVILEGES;
+ {$EXTERNALSYM PTOKEN_GROUPS_AND_PRIVILEGES}
+ TTokenGroupsAndPrivileges = TOKEN_GROUPS_AND_PRIVILEGES;
+ PTokenGroupsAndPrivileges = PTOKEN_GROUPS_AND_PRIVILEGES;
+
+//
+// Valid bits for each TOKEN_AUDIT_POLICY policy mask field.
+//
+
+const
+ TOKEN_AUDIT_SUCCESS_INCLUDE = $1;
+ {$EXTERNALSYM TOKEN_AUDIT_SUCCESS_INCLUDE}
+ TOKEN_AUDIT_SUCCESS_EXCLUDE = $2;
+ {$EXTERNALSYM TOKEN_AUDIT_SUCCESS_EXCLUDE}
+ TOKEN_AUDIT_FAILURE_INCLUDE = $4;
+ {$EXTERNALSYM TOKEN_AUDIT_FAILURE_INCLUDE}
+ TOKEN_AUDIT_FAILURE_EXCLUDE = $8;
+ {$EXTERNALSYM TOKEN_AUDIT_FAILURE_EXCLUDE}
+
+ VALID_AUDIT_POLICY_BITS = (TOKEN_AUDIT_SUCCESS_INCLUDE or
+ TOKEN_AUDIT_SUCCESS_EXCLUDE or
+ TOKEN_AUDIT_FAILURE_INCLUDE or
+ TOKEN_AUDIT_FAILURE_EXCLUDE);
+ {$EXTERNALSYM VALID_AUDIT_POLICY_BITS}
+
+type
+ _TOKEN_AUDIT_POLICY_ELEMENT = record
+ Category: DWORD;
+ PolicyMask: DWORD;
+ end;
+ {$EXTERNALSYM _TOKEN_AUDIT_POLICY_ELEMENT}
+ TOKEN_AUDIT_POLICY_ELEMENT = _TOKEN_AUDIT_POLICY_ELEMENT;
+ {$EXTERNALSYM TOKEN_AUDIT_POLICY_ELEMENT}
+ PTOKEN_AUDIT_POLICY_ELEMENT = ^TOKEN_AUDIT_POLICY_ELEMENT;
+ {$EXTERNALSYM PTOKEN_AUDIT_POLICY_ELEMENT}
+ TTokenAuditPolicyElement = TOKEN_AUDIT_POLICY_ELEMENT;
+ PTokenAuditPolicyElement = PTOKEN_AUDIT_POLICY_ELEMENT;
+
+// TODO Implementation references AuditEventMaxType, which isn't defined anywhere
+//function VALID_TOKEN_AUDIT_POLICY_ELEMENT(P: TOKEN_AUDIT_POLICY_ELEMENT): BOOL;
+//{$EXTERNALSYM VALID_TOKEN_AUDIT_POLICY_ELEMENT}
+
+type
+ _TOKEN_AUDIT_POLICY = record
+ PolicyCount: DWORD;
+ Policy: array [0..ANYSIZE_ARRAY - 1] of TOKEN_AUDIT_POLICY_ELEMENT;
+ end;
+ {$EXTERNALSYM _TOKEN_AUDIT_POLICY}
+ TOKEN_AUDIT_POLICY = _TOKEN_AUDIT_POLICY;
+ {$EXTERNALSYM TOKEN_AUDIT_POLICY}
+ PTOKEN_AUDIT_POLICY = ^TOKEN_AUDIT_POLICY;
+ {$EXTERNALSYM PTOKEN_AUDIT_POLICY}
+ TTokenAuditPolicy = TOKEN_AUDIT_POLICY;
+ PTokenAuditPolicy = PTOKEN_AUDIT_POLICY;
+
+function PER_USER_AUDITING_POLICY_SIZE(p: PTOKEN_AUDIT_POLICY): DWORD;
+{$EXTERNALSYM PER_USER_AUDITING_POLICY_SIZE}
+
+function PER_USER_AUDITING_POLICY_SIZE_BY_COUNT(C: DWORD): DWORD;
+{$EXTERNALSYM PER_USER_AUDITING_POLICY_SIZE_BY_COUNT}
+
+const
+ TOKEN_SOURCE_LENGTH = 8;
+ {$EXTERNALSYM TOKEN_SOURCE_LENGTH}
+
+type
+ PTOKEN_SOURCE = ^TOKEN_SOURCE;
+ {$EXTERNALSYM PTOKEN_SOURCE}
+ _TOKEN_SOURCE = record
+ SourceName: array [0..TOKEN_SOURCE_LENGTH - 1] of CHAR;
+ SourceIdentifier: LUID;
+ end;
+ {$EXTERNALSYM _TOKEN_SOURCE}
+ TOKEN_SOURCE = _TOKEN_SOURCE;
+ {$EXTERNALSYM TOKEN_SOURCE}
+ TTokenSource = TOKEN_SOURCE;
+ PTokenSource = PTOKEN_SOURCE;
+
+ PTOKEN_STATISTICS = ^TOKEN_STATISTICS;
+ {$EXTERNALSYM PTOKEN_STATISTICS}
+ _TOKEN_STATISTICS = record
+ TokenId: LUID;
+ AuthenticationId: LUID;
+ ExpirationTime: LARGE_INTEGER;
+ TokenType: TOKEN_TYPE;
+ ImpersonationLevel: SECURITY_IMPERSONATION_LEVEL;
+ DynamicCharged: DWORD;
+ DynamicAvailable: DWORD;
+ GroupCount: DWORD;
+ PrivilegeCount: DWORD;
+ ModifiedId: LUID;
+ end;
+ {$EXTERNALSYM _TOKEN_STATISTICS}
+ TOKEN_STATISTICS = _TOKEN_STATISTICS;
+ {$EXTERNALSYM TOKEN_STATISTICS}
+ TTokenStatistics = TOKEN_STATISTICS;
+ PTokenStatistics = PTOKEN_STATISTICS;
+
+ PTOKEN_CONTROL = ^TOKEN_CONTROL;
+ {$EXTERNALSYM PTOKEN_CONTROL}
+ _TOKEN_CONTROL = record
+ TokenId: LUID;
+ AuthenticationId: LUID;
+ ModifiedId: LUID;
+ TokenSource: TOKEN_SOURCE;
+ end;
+ {$EXTERNALSYM _TOKEN_CONTROL}
+ TOKEN_CONTROL = _TOKEN_CONTROL;
+ {$EXTERNALSYM TOKEN_CONTROL}
+ TTokenControl = TOKEN_CONTROL;
+ PTokenControl = PTOKEN_CONTROL;
+
+ _TOKEN_ORIGIN = record
+ OriginatingLogonSession: LUID;
+ end;
+ {$EXTERNALSYM _TOKEN_ORIGIN}
+ TOKEN_ORIGIN = _TOKEN_ORIGIN;
+ {$EXTERNALSYM TOKEN_ORIGIN}
+ PTOKEN_ORIGIN = ^TOKEN_ORIGIN;
+ {$EXTERNALSYM PTOKEN_ORIGIN}
+ TTokenOrigin = TOKEN_ORIGIN;
+ PTokenOrigin = PTOKEN_ORIGIN;
+
+//
+// Security Tracking Mode
+//
+
+const
+ SECURITY_DYNAMIC_TRACKING = True;
+ {$EXTERNALSYM SECURITY_DYNAMIC_TRACKING}
+ SECURITY_STATIC_TRACKING = False;
+ {$EXTERNALSYM SECURITY_STATIC_TRACKING}
+
+type
+ SECURITY_CONTEXT_TRACKING_MODE = ByteBool;
+ {$EXTERNALSYM SECURITY_CONTEXT_TRACKING_MODE}
+ PSECURITY_CONTEXT_TRACKING_MODE = ^SECURITY_CONTEXT_TRACKING_MODE;
+ {$EXTERNALSYM PSECURITY_CONTEXT_TRACKING_MODE}
+
+//
+// Quality Of Service
+//
+
+ PSECURITY_QUALITY_OF_SERVICE = ^SECURITY_QUALITY_OF_SERVICE;
+ {$EXTERNALSYM PSECURITY_QUALITY_OF_SERVICE}
+ _SECURITY_QUALITY_OF_SERVICE = record
+ Length: DWORD;
+ ImpersonationLevel: SECURITY_IMPERSONATION_LEVEL;
+ ContextTrackingMode: SECURITY_CONTEXT_TRACKING_MODE;
+ EffectiveOnly: ByteBool;
+ end;
+ {$EXTERNALSYM _SECURITY_QUALITY_OF_SERVICE}
+ SECURITY_QUALITY_OF_SERVICE = _SECURITY_QUALITY_OF_SERVICE;
+ {$EXTERNALSYM SECURITY_QUALITY_OF_SERVICE}
+ TSecurityQualityOfService = SECURITY_QUALITY_OF_SERVICE;
+ PSecurityQualityOfService = PSECURITY_QUALITY_OF_SERVICE;
+
+//
+// Used to represent information related to a thread impersonation
+//
+
+ PSE_IMPERSONATION_STATE = ^SE_IMPERSONATION_STATE;
+ {$EXTERNALSYM PSE_IMPERSONATION_STATE}
+ _SE_IMPERSONATION_STATE = record
+ Token: PACCESS_TOKEN;
+ CopyOnOpen: ByteBool;
+ EffectiveOnly: ByteBool;
+ Level: SECURITY_IMPERSONATION_LEVEL;
+ end;
+ {$EXTERNALSYM _SE_IMPERSONATION_STATE}
+ SE_IMPERSONATION_STATE = _SE_IMPERSONATION_STATE;
+ {$EXTERNALSYM SE_IMPERSONATION_STATE}
+ TSeImpersonationState = SE_IMPERSONATION_STATE;
+ PSeImpersonationState = PSE_IMPERSONATION_STATE;
+
+const
+ DISABLE_MAX_PRIVILEGE = $1;
+ {$EXTERNALSYM DISABLE_MAX_PRIVILEGE}
+ SANDBOX_INERT = $2;
+ {$EXTERNALSYM SANDBOX_INERT}
+
+type
+ SECURITY_INFORMATION = DWORD;
+ {$EXTERNALSYM SECURITY_INFORMATION}
+ PSECURITY_INFORMATION = ^SECURITY_INFORMATION;
+ {$EXTERNALSYM PSECURITY_INFORMATION}
+ TSecurityInformation = SECURITY_INFORMATION;
+ PSecurityInformation = PSECURITY_INFORMATION;
+
+const
+ OWNER_SECURITY_INFORMATION = $00000001;
+ {$EXTERNALSYM OWNER_SECURITY_INFORMATION}
+ GROUP_SECURITY_INFORMATION = $00000002;
+ {$EXTERNALSYM GROUP_SECURITY_INFORMATION}
+ DACL_SECURITY_INFORMATION = $00000004;
+ {$EXTERNALSYM DACL_SECURITY_INFORMATION}
+ SACL_SECURITY_INFORMATION = $00000008;
+ {$EXTERNALSYM SACL_SECURITY_INFORMATION}
+
+ PROTECTED_DACL_SECURITY_INFORMATION = $80000000;
+ {$EXTERNALSYM PROTECTED_DACL_SECURITY_INFORMATION}
+ PROTECTED_SACL_SECURITY_INFORMATION = $40000000;
+ {$EXTERNALSYM PROTECTED_SACL_SECURITY_INFORMATION}
+ UNPROTECTED_DACL_SECURITY_INFORMATION = $20000000;
+ {$EXTERNALSYM UNPROTECTED_DACL_SECURITY_INFORMATION}
+ UNPROTECTED_SACL_SECURITY_INFORMATION = $10000000;
+ {$EXTERNALSYM UNPROTECTED_SACL_SECURITY_INFORMATION}
+
+ PROCESS_TERMINATE = $0001;
+ {$EXTERNALSYM PROCESS_TERMINATE}
+ PROCESS_CREATE_THREAD = $0002;
+ {$EXTERNALSYM PROCESS_CREATE_THREAD}
+ PROCESS_SET_SESSIONID = $0004;
+ {$EXTERNALSYM PROCESS_SET_SESSIONID}
+ PROCESS_VM_OPERATION = $0008;
+ {$EXTERNALSYM PROCESS_VM_OPERATION}
+ PROCESS_VM_READ = $0010;
+ {$EXTERNALSYM PROCESS_VM_READ}
+ PROCESS_VM_WRITE = $0020;
+ {$EXTERNALSYM PROCESS_VM_WRITE}
+ PROCESS_DUP_HANDLE = $0040;
+ {$EXTERNALSYM PROCESS_DUP_HANDLE}
+ PROCESS_CREATE_PROCESS = $0080;
+ {$EXTERNALSYM PROCESS_CREATE_PROCESS}
+ PROCESS_SET_QUOTA = $0100;
+ {$EXTERNALSYM PROCESS_SET_QUOTA}
+ PROCESS_SET_INFORMATION = $0200;
+ {$EXTERNALSYM PROCESS_SET_INFORMATION}
+ PROCESS_QUERY_INFORMATION = $0400;
+ {$EXTERNALSYM PROCESS_QUERY_INFORMATION}
+ PROCESS_SUSPEND_RESUME = $0800;
+ {$EXTERNALSYM PROCESS_SUSPEND_RESUME}
+ PROCESS_ALL_ACCESS = STANDARD_RIGHTS_REQUIRED or SYNCHRONIZE or $FFF;
+ {$EXTERNALSYM PROCESS_ALL_ACCESS}
+
+ MAXIMUM_PROCESSORS = 32;
+ {$EXTERNALSYM MAXIMUM_PROCESSORS}
+
+ THREAD_TERMINATE = $0001;
+ {$EXTERNALSYM THREAD_TERMINATE}
+ THREAD_SUSPEND_RESUME = $0002;
+ {$EXTERNALSYM THREAD_SUSPEND_RESUME}
+ THREAD_GET_CONTEXT = $0008;
+ {$EXTERNALSYM THREAD_GET_CONTEXT}
+ THREAD_SET_CONTEXT = $0010;
+ {$EXTERNALSYM THREAD_SET_CONTEXT}
+ THREAD_SET_INFORMATION = $0020;
+ {$EXTERNALSYM THREAD_SET_INFORMATION}
+ THREAD_QUERY_INFORMATION = $0040;
+ {$EXTERNALSYM THREAD_QUERY_INFORMATION}
+ THREAD_SET_THREAD_TOKEN = $0080;
+ {$EXTERNALSYM THREAD_SET_THREAD_TOKEN}
+ THREAD_IMPERSONATE = $0100;
+ {$EXTERNALSYM THREAD_IMPERSONATE}
+ THREAD_DIRECT_IMPERSONATION = $0200;
+ {$EXTERNALSYM THREAD_DIRECT_IMPERSONATION}
+
+ THREAD_ALL_ACCESS = STANDARD_RIGHTS_REQUIRED or SYNCHRONIZE or $3FF;
+ {$EXTERNALSYM THREAD_ALL_ACCESS}
+
+ JOB_OBJECT_ASSIGN_PROCESS = $0001;
+ {$EXTERNALSYM JOB_OBJECT_ASSIGN_PROCESS}
+ JOB_OBJECT_SET_ATTRIBUTES = $0002;
+ {$EXTERNALSYM JOB_OBJECT_SET_ATTRIBUTES}
+ JOB_OBJECT_QUERY = $0004;
+ {$EXTERNALSYM JOB_OBJECT_QUERY}
+ JOB_OBJECT_TERMINATE = $0008;
+ {$EXTERNALSYM JOB_OBJECT_TERMINATE}
+ JOB_OBJECT_SET_SECURITY_ATTRIBUTES = $0010;
+ {$EXTERNALSYM JOB_OBJECT_SET_SECURITY_ATTRIBUTES}
+ JOB_OBJECT_ALL_ACCESS = STANDARD_RIGHTS_REQUIRED or SYNCHRONIZE or $1F ;
+ {$EXTERNALSYM JOB_OBJECT_ALL_ACCESS}
+
+type
+ _JOB_SET_ARRAY = record
+ JobHandle: HANDLE; // Handle to job object to insert
+ MemberLevel: DWORD; // Level of this job in the set. Must be > 0. Can be sparse.
+ Flags: DWORD; // Unused. Must be zero
+ end;
+ {$EXTERNALSYM _JOB_SET_ARRAY}
+ JOB_SET_ARRAY = _JOB_SET_ARRAY;
+ {$EXTERNALSYM JOB_SET_ARRAY}
+ PJOB_SET_ARRAY = ^JOB_SET_ARRAY;
+ {$EXTERNALSYM PJOB_SET_ARRAY}
+ TJobSetArray = JOB_SET_ARRAY;
+ PJobSetArray = PJOB_SET_ARRAY;
+
+const
+ FLS_MAXIMUM_AVAILABLE = 128;
+ {$EXTERNALSYM FLS_MAXIMUM_AVAILABLE}
+ TLS_MINIMUM_AVAILABLE = 64;
+ {$EXTERNALSYM TLS_MINIMUM_AVAILABLE}
+
+type
+ PEXCEPTION_REGISTRATION_RECORD = ^EXCEPTION_REGISTRATION_RECORD;
+ _EXCEPTION_REGISTRATION_RECORD = packed record
+ pNext: PEXCEPTION_REGISTRATION_RECORD;
+ pfnHandler: FARPROC;
+ end;
+ EXCEPTION_REGISTRATION_RECORD = _EXCEPTION_REGISTRATION_RECORD;
+ TExceptionRegistrationRecord = EXCEPTION_REGISTRATION_RECORD;
+ PExceptionRegistrationRecord = PEXCEPTION_REGISTRATION_RECORD;
+
+ PNT_TIB = ^NT_TIB;
+ {$EXTERNALSYM PNT_TIB}
+ _NT_TIB = record
+ ExceptionList: PEXCEPTION_REGISTRATION_RECORD; // 00h Head of exception record list
+ StackBase: PVOID; // 04h Top of user stack
+ StackLimit: PVOID; // 08h Base of user stack
+
+ //union // 0Ch (NT/Win95 differences)
+ //{
+ // struct // Win95 fields
+ // {
+ // WORD pvTDB; // 0Ch TDB
+ // WORD pvThunkSS; // 0Eh SS selector used for thunking to 16 bits
+ // DWORD unknown1; // 10h
+ // } WIN95;
+ //
+ // struct // WinNT fields
+ // {
+
+ SubSystemTib: PVOID; // 0Ch
+
+ Union: record // 10H
+ case Integer of
+ 0: (FiberData: PVOID);
+ 1: (Version: DWORD);
+ end;
+
+ // } WINNT;
+ //} TIB_UNION1;
+
+ ArbitraryUserPointer: PVOID; // 14h Available for application use
+ Self: PNT_TIB; // 18h Linear address of TIB structure
+
+ //union // 1Ch (NT/Win95 differences)
+ //{
+ // struct // Win95 fields
+ // {
+ // WORD TIBFlags; // 1Ch
+ // WORD Win16MutexCount; // 1Eh
+ // DWORD DebugContext; // 20h
+ // DWORD pCurrentPriority; // 24h
+ // DWORD pvQueue; // 28h Message Queue selector
+ // } WIN95;
+ //
+ // struct // WinNT fields
+ // {
+
+ unknown1: DWORD; // 1Ch
+ processID: DWORD; // 20h
+ threadID: DWORD; // 24h
+ unknown2: DWORD; // 28h
+
+ // } WINNT;
+ //} TIB_UNION2;
+
+ pvTLSArray: PVOID; // (PPVOID!) 2Ch Thread Local Storage array
+
+ //union // 30h (NT/Win95 differences)
+ //{
+ // struct // Win95 fields
+ // {
+ // PVOID* pProcess; // 30h Pointer to owning process database
+ // } WIN95;
+ //} TIB_UNION3;
+ end;
+ {$EXTERNALSYM _NT_TIB}
+ NT_TIB = _NT_TIB;
+ {$EXTERNALSYM NT_TIB}
+ TNtTib = NT_TIB;
+ PNtTib = ^TNtTib;
+
+//
+// 32 and 64 bit specific version for wow64 and the debugger
+//
+
+ PNT_TIB32 = ^NT_TIB32;
+ {$EXTERNALSYM PNT_TIB32}
+ _NT_TIB32 = record
+ ExceptionList: DWORD;
+ StackBase: DWORD;
+ StackLimit: DWORD;
+ SubSystemTib: DWORD;
+ Union: record
+ case Integer of
+ 0: (FiberData: DWORD);
+ 1: (Version: DWORD);
+ end;
+ ArbitraryUserPointer: DWORD;
+ Self: DWORD;
+ end;
+ {$EXTERNALSYM _NT_TIB32}
+ NT_TIB32 = _NT_TIB32;
+ {$EXTERNALSYM NT_TIB32}
+ TNtTib32 = NT_TIB32;
+ PNtTib32 = ^TNtTib32;
+
+ PNT_TIB64 = ^NT_TIB64;
+ {$EXTERNALSYM PNT_TIB64}
+ _NT_TIB64 = record
+ ExceptionList: DWORD64;
+ StackBase: DWORD64;
+ StackLimit: DWORD64;
+ SubSystemTib: DWORD64;
+ Union: record
+ case Integer of
+ 0: (FiberData: DWORD64);
+ 1: (Version: DWORD);
+ end;
+ ArbitraryUserPointer: DWORD64;
+ Self: DWORD64;
+ end;
+ {$EXTERNALSYM _NT_TIB64}
+ NT_TIB64 = _NT_TIB64;
+ {$EXTERNALSYM NT_TIB64}
+ TNtTib64 = NT_TIB64;
+ PNtTib64 = ^TNtTib64;
+
+//
+// Define function to return the current Thread Environment Block
+//
+
+function NtCurrentTeb: PNT_TIB;
+{$EXTERNALSYM NtCurrentTeb}
+
+const
+ THREAD_BASE_PRIORITY_LOWRT = 15; // value that gets a thread to LowRealtime-1
+ {$EXTERNALSYM THREAD_BASE_PRIORITY_LOWRT}
+ THREAD_BASE_PRIORITY_MAX = 2; // maximum thread base priority boost
+ {$EXTERNALSYM THREAD_BASE_PRIORITY_MAX}
+ THREAD_BASE_PRIORITY_MIN = DWORD(-2); // minimum thread base priority boost
+ {$EXTERNALSYM THREAD_BASE_PRIORITY_MIN}
+ THREAD_BASE_PRIORITY_IDLE = DWORD(-15); // value that gets a thread to idle
+ {$EXTERNALSYM THREAD_BASE_PRIORITY_IDLE}
+
+type
+ PQUOTA_LIMITS = ^QUOTA_LIMITS;
+ {$EXTERNALSYM PQUOTA_LIMITS}
+ _QUOTA_LIMITS = record
+ PagedPoolLimit: SIZE_T;
+ NonPagedPoolLimit: SIZE_T;
+ MinimumWorkingSetSize: SIZE_T;
+ MaximumWorkingSetSize: SIZE_T;
+ PagefileLimit: SIZE_T;
+ TimeLimit: LARGE_INTEGER;
+ end;
+ {$EXTERNALSYM _QUOTA_LIMITS}
+ QUOTA_LIMITS = _QUOTA_LIMITS;
+ {$EXTERNALSYM QUOTA_LIMITS}
+ TQuotaLimits = QUOTA_LIMITS;
+ PQuotaLimits = PQUOTA_LIMITS;
+
+const
+ QUOTA_LIMITS_HARDWS_MIN_ENABLE = $00000001;
+ {$EXTERNALSYM QUOTA_LIMITS_HARDWS_MIN_ENABLE}
+ QUOTA_LIMITS_HARDWS_MIN_DISABLE = $00000002;
+ {$EXTERNALSYM QUOTA_LIMITS_HARDWS_MIN_DISABLE}
+ QUOTA_LIMITS_HARDWS_MAX_ENABLE = $00000004;
+ {$EXTERNALSYM QUOTA_LIMITS_HARDWS_MAX_ENABLE}
+ QUOTA_LIMITS_HARDWS_MAX_DISABLE = $00000008;
+ {$EXTERNALSYM QUOTA_LIMITS_HARDWS_MAX_DISABLE}
+
+type
+ _QUOTA_LIMITS_EX = record
+ PagedPoolLimit: SIZE_T;
+ NonPagedPoolLimit: SIZE_T;
+ MinimumWorkingSetSize: SIZE_T;
+ MaximumWorkingSetSize: SIZE_T;
+ PagefileLimit: SIZE_T;
+ TimeLimit: LARGE_INTEGER;
+ Reserved1: SIZE_T;
+ Reserved2: SIZE_T;
+ Reserved3: SIZE_T;
+ Reserved4: SIZE_T;
+ Flags: DWORD;
+ Reserved5: DWORD;
+ end;
+ {$EXTERNALSYM _QUOTA_LIMITS_EX}
+ QUOTA_LIMITS_EX = _QUOTA_LIMITS_EX;
+ {$EXTERNALSYM QUOTA_LIMITS_EX}
+ PQUOTA_LIMITS_EX = ^QUOTA_LIMITS_EX;
+ {$EXTERNALSYM PQUOTA_LIMITS_EX}
+ TQuotaLimitsEx = QUOTA_LIMITS_EX;
+ PQuotaLimitsEx = PQUOTA_LIMITS_EX;
+
+ PIO_COUNTERS = ^IO_COUNTERS;
+ {$EXTERNALSYM PIO_COUNTERS}
+ _IO_COUNTERS = record
+ ReadOperationCount: Int64;
+ WriteOperationCount: Int64;
+ OtherOperationCount: Int64;
+ ReadTransferCount: Int64;
+ WriteTransferCount: Int64;
+ OtherTransferCount: Int64;
+ end;
+ {$EXTERNALSYM _IO_COUNTERS}
+ IO_COUNTERS = _IO_COUNTERS;
+ {$EXTERNALSYM IO_COUNTERS}
+ TIoCounters = IO_COUNTERS;
+ PIoCounters = PIO_COUNTERS;
+
+ PJOBOBJECT_BASIC_ACCOUNTING_INFORMATION = ^JOBOBJECT_BASIC_ACCOUNTING_INFORMATION;
+ {$EXTERNALSYM PJOBOBJECT_BASIC_ACCOUNTING_INFORMATION}
+ _JOBOBJECT_BASIC_ACCOUNTING_INFORMATION = record
+ TotalUserTime: LARGE_INTEGER;
+ TotalKernelTime: LARGE_INTEGER;
+ ThisPeriodTotalUserTime: LARGE_INTEGER;
+ ThisPeriodTotalKernelTime: LARGE_INTEGER;
+ TotalPageFaultCount: DWORD;
+ TotalProcesses: DWORD;
+ ActiveProcesses: DWORD;
+ TotalTerminatedProcesses: DWORD;
+ end;
+ {$EXTERNALSYM _JOBOBJECT_BASIC_ACCOUNTING_INFORMATION}
+ JOBOBJECT_BASIC_ACCOUNTING_INFORMATION = _JOBOBJECT_BASIC_ACCOUNTING_INFORMATION;
+ {$EXTERNALSYM JOBOBJECT_BASIC_ACCOUNTING_INFORMATION}
+ TJobObjectBasicAccountingInformation = JOBOBJECT_BASIC_ACCOUNTING_INFORMATION;
+ PJobObjectBasicAccountingInformation = PJOBOBJECT_BASIC_ACCOUNTING_INFORMATION;
+
+ PJOBOBJECT_BASIC_LIMIT_INFORMATION = ^JOBOBJECT_BASIC_LIMIT_INFORMATION;
+ {$EXTERNALSYM PJOBOBJECT_BASIC_LIMIT_INFORMATION}
+ _JOBOBJECT_BASIC_LIMIT_INFORMATION = record
+ PerProcessUserTimeLimit: LARGE_INTEGER;
+ PerJobUserTimeLimit: LARGE_INTEGER;
+ LimitFlags: DWORD;
+ MinimumWorkingSetSize: SIZE_T;
+ MaximumWorkingSetSize: SIZE_T;
+ ActiveProcessLimit: DWORD;
+ Affinity: ULONG_PTR;
+ PriorityClass: DWORD;
+ SchedulingClass: DWORD;
+ end;
+ {$EXTERNALSYM _JOBOBJECT_BASIC_LIMIT_INFORMATION}
+ JOBOBJECT_BASIC_LIMIT_INFORMATION = _JOBOBJECT_BASIC_LIMIT_INFORMATION;
+ {$EXTERNALSYM JOBOBJECT_BASIC_LIMIT_INFORMATION}
+ TJobObjectBasicLimitInformation = JOBOBJECT_BASIC_LIMIT_INFORMATION;
+ PJobObjectBasicLimitInformation = PJOBOBJECT_BASIC_LIMIT_INFORMATION;
+
+ PJOBOBJECT_EXTENDED_LIMIT_INFORMATION = ^JOBOBJECT_EXTENDED_LIMIT_INFORMATION;
+ {$EXTERNALSYM PJOBOBJECT_EXTENDED_LIMIT_INFORMATION}
+ _JOBOBJECT_EXTENDED_LIMIT_INFORMATION = record
+ BasicLimitInformation: JOBOBJECT_BASIC_LIMIT_INFORMATION;
+ IoInfo: IO_COUNTERS;
+ ProcessMemoryLimit: SIZE_T;
+ JobMemoryLimit: SIZE_T;
+ PeakProcessMemoryUsed: SIZE_T;
+ PeakJobMemoryUsed: SIZE_T;
+ end;
+ {$EXTERNALSYM _JOBOBJECT_EXTENDED_LIMIT_INFORMATION}
+ JOBOBJECT_EXTENDED_LIMIT_INFORMATION = _JOBOBJECT_EXTENDED_LIMIT_INFORMATION;
+ {$EXTERNALSYM JOBOBJECT_EXTENDED_LIMIT_INFORMATION}
+ TJobObjectExtendedLimitInformation = JOBOBJECT_EXTENDED_LIMIT_INFORMATION;
+ PJobObjectExtendedLimitInformation = PJOBOBJECT_EXTENDED_LIMIT_INFORMATION;
+
+ PJOBOBJECT_BASIC_PROCESS_ID_LIST = ^JOBOBJECT_BASIC_PROCESS_ID_LIST;
+ {$EXTERNALSYM PJOBOBJECT_BASIC_PROCESS_ID_LIST}
+ _JOBOBJECT_BASIC_PROCESS_ID_LIST = record
+ NumberOfAssignedProcesses: DWORD;
+ NumberOfProcessIdsInList: DWORD;
+ ProcessIdList: array [0..0] of ULONG_PTR;
+ end;
+ {$EXTERNALSYM _JOBOBJECT_BASIC_PROCESS_ID_LIST}
+ JOBOBJECT_BASIC_PROCESS_ID_LIST = _JOBOBJECT_BASIC_PROCESS_ID_LIST;
+ {$EXTERNALSYM JOBOBJECT_BASIC_PROCESS_ID_LIST}
+ TJobObjectBasicProcessIdList = JOBOBJECT_BASIC_PROCESS_ID_LIST;
+ PJobObjectBasicProcessIdList = PJOBOBJECT_BASIC_PROCESS_ID_LIST;
+
+ PJOBOBJECT_BASIC_UI_RESTRICTIONS = ^JOBOBJECT_BASIC_UI_RESTRICTIONS;
+ {$EXTERNALSYM PJOBOBJECT_BASIC_UI_RESTRICTIONS}
+ _JOBOBJECT_BASIC_UI_RESTRICTIONS = record
+ UIRestrictionsClass: DWORD;
+ end;
+ {$EXTERNALSYM _JOBOBJECT_BASIC_UI_RESTRICTIONS}
+ JOBOBJECT_BASIC_UI_RESTRICTIONS = _JOBOBJECT_BASIC_UI_RESTRICTIONS;
+ {$EXTERNALSYM JOBOBJECT_BASIC_UI_RESTRICTIONS}
+ TJobObjectBasicUiRestrictions = JOBOBJECT_BASIC_UI_RESTRICTIONS;
+ PJobObjectBasicUiRestrictions = PJOBOBJECT_BASIC_UI_RESTRICTIONS;
+
+ PJOBOBJECT_SECURITY_LIMIT_INFORMATION = ^JOBOBJECT_SECURITY_LIMIT_INFORMATION;
+ {$EXTERNALSYM PJOBOBJECT_SECURITY_LIMIT_INFORMATION}
+ _JOBOBJECT_SECURITY_LIMIT_INFORMATION = record
+ SecurityLimitFlags : DWORD;
+ JobToken : THandle;
+ SidsToDisable : PTOKEN_GROUPS;
+ PrivilegesToDelete : PTOKEN_PRIVILEGES;
+ RestrictedSids : PTOKEN_GROUPS;
+ end;
+ {$EXTERNALSYM _JOBOBJECT_SECURITY_LIMIT_INFORMATION}
+ JOBOBJECT_SECURITY_LIMIT_INFORMATION = _JOBOBJECT_SECURITY_LIMIT_INFORMATION;
+ {$EXTERNALSYM JOBOBJECT_SECURITY_LIMIT_INFORMATION}
+ TJobObjectSecurityLimitInformation = JOBOBJECT_SECURITY_LIMIT_INFORMATION;
+ PJobObjectSecurityLimitInformation = PJOBOBJECT_SECURITY_LIMIT_INFORMATION;
+
+ PJOBOBJECT_END_OF_JOB_TIME_INFORMATION = ^JOBOBJECT_END_OF_JOB_TIME_INFORMATION;
+ {$EXTERNALSYM PJOBOBJECT_END_OF_JOB_TIME_INFORMATION}
+ _JOBOBJECT_END_OF_JOB_TIME_INFORMATION = record
+ EndOfJobTimeAction: DWORD;
+ end;
+ {$EXTERNALSYM _JOBOBJECT_END_OF_JOB_TIME_INFORMATION}
+ JOBOBJECT_END_OF_JOB_TIME_INFORMATION = _JOBOBJECT_END_OF_JOB_TIME_INFORMATION;
+ {$EXTERNALSYM JOBOBJECT_END_OF_JOB_TIME_INFORMATION}
+ TJobObjectEndOfJobTimeInformation = JOBOBJECT_END_OF_JOB_TIME_INFORMATION;
+ PJobObjectEndOfJobTimeInformation = PJOBOBJECT_END_OF_JOB_TIME_INFORMATION;
+
+ PJOBOBJECT_ASSOCIATE_COMPLETION_PORT = ^JOBOBJECT_ASSOCIATE_COMPLETION_PORT;
+ {$EXTERNALSYM PJOBOBJECT_ASSOCIATE_COMPLETION_PORT}
+ _JOBOBJECT_ASSOCIATE_COMPLETION_PORT = record
+ CompletionKey: Pointer;
+ CompletionPort: THandle;
+ end;
+ {$EXTERNALSYM _JOBOBJECT_ASSOCIATE_COMPLETION_PORT}
+ JOBOBJECT_ASSOCIATE_COMPLETION_PORT = _JOBOBJECT_ASSOCIATE_COMPLETION_PORT;
+ {$EXTERNALSYM JOBOBJECT_ASSOCIATE_COMPLETION_PORT}
+ TJobObjectAssociateCompletionPort = JOBOBJECT_ASSOCIATE_COMPLETION_PORT;
+ PJobObjectAssociateCompletionPort = PJOBOBJECT_ASSOCIATE_COMPLETION_PORT;
+
+ PJOBOBJECT_BASIC_AND_IO_ACCOUNTING_INFORMATION = ^JOBOBJECT_BASIC_AND_IO_ACCOUNTING_INFORMATION;
+ {$EXTERNALSYM PJOBOBJECT_BASIC_AND_IO_ACCOUNTING_INFORMATION}
+ _JOBOBJECT_BASIC_AND_IO_ACCOUNTING_INFORMATION = record
+ BasicInfo: JOBOBJECT_BASIC_ACCOUNTING_INFORMATION;
+ IoInfo: IO_COUNTERS;
+ end;
+ {$EXTERNALSYM _JOBOBJECT_BASIC_AND_IO_ACCOUNTING_INFORMATION}
+ JOBOBJECT_BASIC_AND_IO_ACCOUNTING_INFORMATION = _JOBOBJECT_BASIC_AND_IO_ACCOUNTING_INFORMATION;
+ {$EXTERNALSYM JOBOBJECT_BASIC_AND_IO_ACCOUNTING_INFORMATION}
+ TJobObjectBasicAndIoAccountingInformation = JOBOBJECT_BASIC_AND_IO_ACCOUNTING_INFORMATION;
+ PJobObjectBasicAndIoAccountingInformation = PJOBOBJECT_BASIC_AND_IO_ACCOUNTING_INFORMATION;
+
+ _JOBOBJECT_JOBSET_INFORMATION = record
+ MemberLevel: DWORD;
+ end;
+ {$EXTERNALSYM _JOBOBJECT_JOBSET_INFORMATION}
+ JOBOBJECT_JOBSET_INFORMATION = _JOBOBJECT_JOBSET_INFORMATION;
+ {$EXTERNALSYM JOBOBJECT_JOBSET_INFORMATION}
+ PJOBOBJECT_JOBSET_INFORMATION = ^JOBOBJECT_JOBSET_INFORMATION;
+ {$EXTERNALSYM PJOBOBJECT_JOBSET_INFORMATION}
+ TJobObjectSetInformation = JOBOBJECT_JOBSET_INFORMATION;
+ PJobObjectSetInformation = PJOBOBJECT_JOBSET_INFORMATION;
+
+const
+ JOB_OBJECT_TERMINATE_AT_END_OF_JOB = 0;
+ {$EXTERNALSYM JOB_OBJECT_TERMINATE_AT_END_OF_JOB}
+ JOB_OBJECT_POST_AT_END_OF_JOB = 1;
+ {$EXTERNALSYM JOB_OBJECT_POST_AT_END_OF_JOB}
+
+//
+// Completion Port Messages for job objects
+//
+// These values are returned via the lpNumberOfBytesTransferred parameter
+//
+
+ JOB_OBJECT_MSG_END_OF_JOB_TIME = 1;
+ {$EXTERNALSYM JOB_OBJECT_MSG_END_OF_JOB_TIME}
+ JOB_OBJECT_MSG_END_OF_PROCESS_TIME = 2;
+ {$EXTERNALSYM JOB_OBJECT_MSG_END_OF_PROCESS_TIME}
+ JOB_OBJECT_MSG_ACTIVE_PROCESS_LIMIT = 3;
+ {$EXTERNALSYM JOB_OBJECT_MSG_ACTIVE_PROCESS_LIMIT}
+ JOB_OBJECT_MSG_ACTIVE_PROCESS_ZERO = 4;
+ {$EXTERNALSYM JOB_OBJECT_MSG_ACTIVE_PROCESS_ZERO}
+ JOB_OBJECT_MSG_NEW_PROCESS = 6;
+ {$EXTERNALSYM JOB_OBJECT_MSG_NEW_PROCESS}
+ JOB_OBJECT_MSG_EXIT_PROCESS = 7;
+ {$EXTERNALSYM JOB_OBJECT_MSG_EXIT_PROCESS}
+ JOB_OBJECT_MSG_ABNORMAL_EXIT_PROCESS = 8;
+ {$EXTERNALSYM JOB_OBJECT_MSG_ABNORMAL_EXIT_PROCESS}
+ JOB_OBJECT_MSG_PROCESS_MEMORY_LIMIT = 9;
+ {$EXTERNALSYM JOB_OBJECT_MSG_PROCESS_MEMORY_LIMIT}
+ JOB_OBJECT_MSG_JOB_MEMORY_LIMIT = 10;
+ {$EXTERNALSYM JOB_OBJECT_MSG_JOB_MEMORY_LIMIT}
+
+//
+// Basic Limits
+//
+
+ JOB_OBJECT_LIMIT_WORKINGSET = $00000001;
+ {$EXTERNALSYM JOB_OBJECT_LIMIT_WORKINGSET}
+ JOB_OBJECT_LIMIT_PROCESS_TIME = $00000002;
+ {$EXTERNALSYM JOB_OBJECT_LIMIT_PROCESS_TIME}
+ JOB_OBJECT_LIMIT_JOB_TIME = $00000004;
+ {$EXTERNALSYM JOB_OBJECT_LIMIT_JOB_TIME}
+ JOB_OBJECT_LIMIT_ACTIVE_PROCESS = $00000008;
+ {$EXTERNALSYM JOB_OBJECT_LIMIT_ACTIVE_PROCESS}
+ JOB_OBJECT_LIMIT_AFFINITY = $00000010;
+ {$EXTERNALSYM JOB_OBJECT_LIMIT_AFFINITY}
+ JOB_OBJECT_LIMIT_PRIORITY_CLASS = $00000020;
+ {$EXTERNALSYM JOB_OBJECT_LIMIT_PRIORITY_CLASS}
+ JOB_OBJECT_LIMIT_PRESERVE_JOB_TIME = $00000040;
+ {$EXTERNALSYM JOB_OBJECT_LIMIT_PRESERVE_JOB_TIME}
+ JOB_OBJECT_LIMIT_SCHEDULING_CLASS = $00000080;
+ {$EXTERNALSYM JOB_OBJECT_LIMIT_SCHEDULING_CLASS}
+
+//
+// Extended Limits
+//
+
+ JOB_OBJECT_LIMIT_PROCESS_MEMORY = $00000100;
+ {$EXTERNALSYM JOB_OBJECT_LIMIT_PROCESS_MEMORY}
+ JOB_OBJECT_LIMIT_JOB_MEMORY = $00000200;
+ {$EXTERNALSYM JOB_OBJECT_LIMIT_JOB_MEMORY}
+ JOB_OBJECT_LIMIT_DIE_ON_UNHANDLED_EXCEPTION = $00000400;
+ {$EXTERNALSYM JOB_OBJECT_LIMIT_DIE_ON_UNHANDLED_EXCEPTION}
+ JOB_OBJECT_LIMIT_BREAKAWAY_OK = $00000800;
+ {$EXTERNALSYM JOB_OBJECT_LIMIT_BREAKAWAY_OK}
+ JOB_OBJECT_LIMIT_SILENT_BREAKAWAY_OK = $00001000;
+ {$EXTERNALSYM JOB_OBJECT_LIMIT_SILENT_BREAKAWAY_OK}
+ JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE = $00002000;
+ {$EXTERNALSYM JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE}
+
+ JOB_OBJECT_LIMIT_RESERVED2 = $00004000;
+ {$EXTERNALSYM JOB_OBJECT_LIMIT_RESERVED2}
+ JOB_OBJECT_LIMIT_RESERVED3 = $00008000;
+ {$EXTERNALSYM JOB_OBJECT_LIMIT_RESERVED3}
+ JOB_OBJECT_LIMIT_RESERVED4 = $00010000;
+ {$EXTERNALSYM JOB_OBJECT_LIMIT_RESERVED4}
+ JOB_OBJECT_LIMIT_RESERVED5 = $00020000;
+ {$EXTERNALSYM JOB_OBJECT_LIMIT_RESERVED5}
+ JOB_OBJECT_LIMIT_RESERVED6 = $00040000;
+ {$EXTERNALSYM JOB_OBJECT_LIMIT_RESERVED6}
+
+ JOB_OBJECT_LIMIT_VALID_FLAGS = $0007ffff;
+ {$EXTERNALSYM JOB_OBJECT_LIMIT_VALID_FLAGS}
+
+ JOB_OBJECT_BASIC_LIMIT_VALID_FLAGS = $000000ff;
+ {$EXTERNALSYM JOB_OBJECT_BASIC_LIMIT_VALID_FLAGS}
+ JOB_OBJECT_EXTENDED_LIMIT_VALID_FLAGS = $00003fff;
+ {$EXTERNALSYM JOB_OBJECT_EXTENDED_LIMIT_VALID_FLAGS}
+ JOB_OBJECT_RESERVED_LIMIT_VALID_FLAGS = $0007ffff;
+ {$EXTERNALSYM JOB_OBJECT_RESERVED_LIMIT_VALID_FLAGS}
+
+//
+// UI restrictions for jobs
+//
+
+ JOB_OBJECT_UILIMIT_NONE = $00000000;
+ {$EXTERNALSYM JOB_OBJECT_UILIMIT_NONE}
+
+ JOB_OBJECT_UILIMIT_HANDLES = $00000001;
+ {$EXTERNALSYM JOB_OBJECT_UILIMIT_HANDLES}
+ JOB_OBJECT_UILIMIT_READCLIPBOARD = $00000002;
+ {$EXTERNALSYM JOB_OBJECT_UILIMIT_READCLIPBOARD}
+ JOB_OBJECT_UILIMIT_WRITECLIPBOARD = $00000004;
+ {$EXTERNALSYM JOB_OBJECT_UILIMIT_WRITECLIPBOARD}
+ JOB_OBJECT_UILIMIT_SYSTEMPARAMETERS = $00000008;
+ {$EXTERNALSYM JOB_OBJECT_UILIMIT_SYSTEMPARAMETERS}
+ JOB_OBJECT_UILIMIT_DISPLAYSETTINGS = $00000010;
+ {$EXTERNALSYM JOB_OBJECT_UILIMIT_DISPLAYSETTINGS}
+ JOB_OBJECT_UILIMIT_GLOBALATOMS = $00000020;
+ {$EXTERNALSYM JOB_OBJECT_UILIMIT_GLOBALATOMS}
+ JOB_OBJECT_UILIMIT_DESKTOP = $00000040;
+ {$EXTERNALSYM JOB_OBJECT_UILIMIT_DESKTOP}
+ JOB_OBJECT_UILIMIT_EXITWINDOWS = $00000080;
+ {$EXTERNALSYM JOB_OBJECT_UILIMIT_EXITWINDOWS}
+
+ JOB_OBJECT_UILIMIT_ALL = $000000FF;
+ {$EXTERNALSYM JOB_OBJECT_UILIMIT_ALL}
+
+ JOB_OBJECT_UI_VALID_FLAGS = $000000FF;
+ {$EXTERNALSYM JOB_OBJECT_UI_VALID_FLAGS}
+
+ JOB_OBJECT_SECURITY_NO_ADMIN = $00000001;
+ {$EXTERNALSYM JOB_OBJECT_SECURITY_NO_ADMIN}
+ JOB_OBJECT_SECURITY_RESTRICTED_TOKEN = $00000002;
+ {$EXTERNALSYM JOB_OBJECT_SECURITY_RESTRICTED_TOKEN}
+ JOB_OBJECT_SECURITY_ONLY_TOKEN = $00000004;
+ {$EXTERNALSYM JOB_OBJECT_SECURITY_ONLY_TOKEN}
+ JOB_OBJECT_SECURITY_FILTER_TOKENS = $00000008;
+ {$EXTERNALSYM JOB_OBJECT_SECURITY_FILTER_TOKENS}
+
+ JOB_OBJECT_SECURITY_VALID_FLAGS = $0000000f;
+ {$EXTERNALSYM JOB_OBJECT_SECURITY_VALID_FLAGS}
+
+type
+ _JOBOBJECTINFOCLASS = (
+ JobObjectInfoClassPadding0,
+ JobObjectBasicAccountingInformation,
+ JobObjectBasicLimitInformation,
+ JobObjectBasicProcessIdList,
+ JobObjectBasicUIRestrictions,
+ JobObjectSecurityLimitInformation,
+ JobObjectEndOfJobTimeInformation,
+ JobObjectAssociateCompletionPortInformation,
+ JobObjectBasicAndIoAccountingInformation,
+ JobObjectExtendedLimitInformation,
+ JobObjectJobSetInformation,
+ MaxJobObjectInfoClass);
+ {$EXTERNALSYM _JOBOBJECTINFOCLASS}
+ JOBOBJECTINFOCLASS = _JOBOBJECTINFOCLASS;
+ {$EXTERNALSYM JOBOBJECTINFOCLASS}
+ TJobObjectInfoClass = JOBOBJECTINFOCLASS;
+
+const
+ EVENT_MODIFY_STATE = $0002;
+ {$EXTERNALSYM EVENT_MODIFY_STATE}
+ EVENT_ALL_ACCESS = STANDARD_RIGHTS_REQUIRED or SYNCHRONIZE or $3;
+ {$EXTERNALSYM EVENT_ALL_ACCESS}
+ MUTANT_QUERY_STATE = $0001;
+ {$EXTERNALSYM MUTANT_QUERY_STATE}
+
+ MUTANT_ALL_ACCESS = STANDARD_RIGHTS_REQUIRED or SYNCHRONIZE or MUTANT_QUERY_STATE;
+ {$EXTERNALSYM MUTANT_ALL_ACCESS}
+ SEMAPHORE_MODIFY_STATE = $0002;
+ {$EXTERNALSYM SEMAPHORE_MODIFY_STATE}
+ SEMAPHORE_ALL_ACCESS = STANDARD_RIGHTS_REQUIRED or SYNCHRONIZE or $3;
+ {$EXTERNALSYM SEMAPHORE_ALL_ACCESS}
+
+//
+// Timer Specific Access Rights.
+//
+
+ TIMER_QUERY_STATE = $0001;
+ {$EXTERNALSYM TIMER_QUERY_STATE}
+ TIMER_MODIFY_STATE = $0002;
+ {$EXTERNALSYM TIMER_MODIFY_STATE}
+
+ TIMER_ALL_ACCESS = STANDARD_RIGHTS_REQUIRED or SYNCHRONIZE or TIMER_QUERY_STATE or TIMER_MODIFY_STATE;
+ {$EXTERNALSYM TIMER_ALL_ACCESS}
+
+ TIME_ZONE_ID_UNKNOWN = 0;
+ {$EXTERNALSYM TIME_ZONE_ID_UNKNOWN}
+ TIME_ZONE_ID_STANDARD = 1;
+ {$EXTERNALSYM TIME_ZONE_ID_STANDARD}
+ TIME_ZONE_ID_DAYLIGHT = 2;
+ {$EXTERNALSYM TIME_ZONE_ID_DAYLIGHT}
+
+type
+ _LOGICAL_PROCESSOR_RELATIONSHIP = (RelationProcessorCore, RelationNumaNode);
+ {$EXTERNALSYM _LOGICAL_PROCESSOR_RELATIONSHIP}
+ LOGICAL_PROCESSOR_RELATIONSHIP = _LOGICAL_PROCESSOR_RELATIONSHIP;
+ {$EXTERNALSYM LOGICAL_PROCESSOR_RELATIONSHIP}
+ TLogicalProcessorRelationship = LOGICAL_PROCESSOR_RELATIONSHIP;
+
+const
+ LTP_PC_SMT = $1;
+ {$EXTERNALSYM LTP_PC_SMT}
+
+type
+ _SYSTEM_LOGICAL_PROCESSOR_INFORMATION = record
+ ProcessorMask: ULONG_PTR;
+ Relationship: LOGICAL_PROCESSOR_RELATIONSHIP;
+ case Integer of
+ 0: (Flags: BYTE); // ProcessorCore
+ 1: (NodeNumber: DWORD); // NumaNode
+ 2: (Reserved: array [0..1] of ULONGLONG);
+ end;
+ {$EXTERNALSYM _SYSTEM_LOGICAL_PROCESSOR_INFORMATION}
+ SYSTEM_LOGICAL_PROCESSOR_INFORMATION = _SYSTEM_LOGICAL_PROCESSOR_INFORMATION;
+ {$EXTERNALSYM SYSTEM_LOGICAL_PROCESSOR_INFORMATION}
+ PSYSTEM_LOGICAL_PROCESSOR_INFORMATION = ^SYSTEM_LOGICAL_PROCESSOR_INFORMATION;
+ TSystemLogicalProcessorInformation = SYSTEM_LOGICAL_PROCESSOR_INFORMATION;
+ PSystemLogicalProcessorInformation = PSYSTEM_LOGICAL_PROCESSOR_INFORMATION;
+
+const
+ PROCESSOR_INTEL_386 = 386;
+ {$EXTERNALSYM PROCESSOR_INTEL_386}
+ PROCESSOR_INTEL_486 = 486;
+ {$EXTERNALSYM PROCESSOR_INTEL_486}
+ PROCESSOR_INTEL_PENTIUM = 586;
+ {$EXTERNALSYM PROCESSOR_INTEL_PENTIUM}
+ PROCESSOR_INTEL_IA64 = 2200;
+ {$EXTERNALSYM PROCESSOR_INTEL_IA64}
+ PROCESSOR_AMD_X8664 = 8664;
+ {$EXTERNALSYM PROCESSOR_AMD_X8664}
+ PROCESSOR_MIPS_R4000 = 4000; // incl R4101 & R3910 for Windows CE
+ {$EXTERNALSYM PROCESSOR_MIPS_R4000}
+ PROCESSOR_ALPHA_21064 = 21064;
+ {$EXTERNALSYM PROCESSOR_ALPHA_21064}
+ PROCESSOR_PPC_601 = 601;
+ {$EXTERNALSYM PROCESSOR_PPC_601}
+ PROCESSOR_PPC_603 = 603;
+ {$EXTERNALSYM PROCESSOR_PPC_603}
+ PROCESSOR_PPC_604 = 604;
+ {$EXTERNALSYM PROCESSOR_PPC_604}
+ PROCESSOR_PPC_620 = 620;
+ {$EXTERNALSYM PROCESSOR_PPC_620}
+ PROCESSOR_HITACHI_SH3 = 10003; // Windows CE
+ {$EXTERNALSYM PROCESSOR_HITACHI_SH3}
+ PROCESSOR_HITACHI_SH3E = 10004; // Windows CE
+ {$EXTERNALSYM PROCESSOR_HITACHI_SH3E}
+ PROCESSOR_HITACHI_SH4 = 10005; // Windows CE
+ {$EXTERNALSYM PROCESSOR_HITACHI_SH4}
+ PROCESSOR_MOTOROLA_821 = 821; // Windows CE
+ {$EXTERNALSYM PROCESSOR_MOTOROLA_821}
+ PROCESSOR_SHx_SH3 = 103; // Windows CE
+ {$EXTERNALSYM PROCESSOR_SHx_SH3}
+ PROCESSOR_SHx_SH4 = 104; // Windows CE
+ {$EXTERNALSYM PROCESSOR_SHx_SH4}
+ PROCESSOR_STRONGARM = 2577; // Windows CE - 0xA11
+ {$EXTERNALSYM PROCESSOR_STRONGARM}
+ PROCESSOR_ARM720 = 1824; // Windows CE - 0x720
+ {$EXTERNALSYM PROCESSOR_ARM720}
+ PROCESSOR_ARM820 = 2080; // Windows CE - 0x820
+ {$EXTERNALSYM PROCESSOR_ARM820}
+ PROCESSOR_ARM920 = 2336; // Windows CE - 0x920
+ {$EXTERNALSYM PROCESSOR_ARM920}
+ PROCESSOR_ARM_7TDMI = 70001; // Windows CE
+ {$EXTERNALSYM PROCESSOR_ARM_7TDMI}
+ PROCESSOR_OPTIL = $494f; // MSIL
+ {$EXTERNALSYM PROCESSOR_OPTIL}
+
+ PROCESSOR_ARCHITECTURE_INTEL = 0;
+ {$EXTERNALSYM PROCESSOR_ARCHITECTURE_INTEL}
+ PROCESSOR_ARCHITECTURE_MIPS = 1;
+ {$EXTERNALSYM PROCESSOR_ARCHITECTURE_MIPS}
+ PROCESSOR_ARCHITECTURE_ALPHA = 2;
+ {$EXTERNALSYM PROCESSOR_ARCHITECTURE_ALPHA}
+ PROCESSOR_ARCHITECTURE_PPC = 3;
+ {$EXTERNALSYM PROCESSOR_ARCHITECTURE_PPC}
+ PROCESSOR_ARCHITECTURE_SHX = 4;
+ {$EXTERNALSYM PROCESSOR_ARCHITECTURE_SHX}
+ PROCESSOR_ARCHITECTURE_ARM = 5;
+ {$EXTERNALSYM PROCESSOR_ARCHITECTURE_ARM}
+ PROCESSOR_ARCHITECTURE_IA64 = 6;
+ {$EXTERNALSYM PROCESSOR_ARCHITECTURE_IA64}
+ PROCESSOR_ARCHITECTURE_ALPHA64 = 7;
+ {$EXTERNALSYM PROCESSOR_ARCHITECTURE_ALPHA64}
+ PROCESSOR_ARCHITECTURE_MSIL = 8;
+ {$EXTERNALSYM PROCESSOR_ARCHITECTURE_MSIL}
+ PROCESSOR_ARCHITECTURE_AMD64 = 9;
+ {$EXTERNALSYM PROCESSOR_ARCHITECTURE_AMD64}
+ PROCESSOR_ARCHITECTURE_IA32_ON_WIN64 = 10;
+ {$EXTERNALSYM PROCESSOR_ARCHITECTURE_IA32_ON_WIN64}
+
+ PROCESSOR_ARCHITECTURE_UNKNOWN = $FFFF;
+ {$EXTERNALSYM PROCESSOR_ARCHITECTURE_UNKNOWN}
+
+ PF_FLOATING_POINT_PRECISION_ERRATA = 0;
+ {$EXTERNALSYM PF_FLOATING_POINT_PRECISION_ERRATA}
+ PF_FLOATING_POINT_EMULATED = 1;
+ {$EXTERNALSYM PF_FLOATING_POINT_EMULATED}
+ PF_COMPARE_EXCHANGE_DOUBLE = 2;
+ {$EXTERNALSYM PF_COMPARE_EXCHANGE_DOUBLE}
+ PF_MMX_INSTRUCTIONS_AVAILABLE = 3;
+ {$EXTERNALSYM PF_MMX_INSTRUCTIONS_AVAILABLE}
+ PF_PPC_MOVEMEM_64BIT_OK = 4;
+ {$EXTERNALSYM PF_PPC_MOVEMEM_64BIT_OK}
+ PF_ALPHA_BYTE_INSTRUCTIONS = 5;
+ {$EXTERNALSYM PF_ALPHA_BYTE_INSTRUCTIONS}
+ PF_XMMI_INSTRUCTIONS_AVAILABLE = 6;
+ {$EXTERNALSYM PF_XMMI_INSTRUCTIONS_AVAILABLE}
+ PF_3DNOW_INSTRUCTIONS_AVAILABLE = 7;
+ {$EXTERNALSYM PF_3DNOW_INSTRUCTIONS_AVAILABLE}
+ PF_RDTSC_INSTRUCTION_AVAILABLE = 8;
+ {$EXTERNALSYM PF_RDTSC_INSTRUCTION_AVAILABLE}
+ PF_PAE_ENABLED = 9;
+ {$EXTERNALSYM PF_PAE_ENABLED}
+ PF_XMMI64_INSTRUCTIONS_AVAILABLE = 10;
+ {$EXTERNALSYM PF_XMMI64_INSTRUCTIONS_AVAILABLE}
+
+type
+ PMEMORY_BASIC_INFORMATION = ^MEMORY_BASIC_INFORMATION;
+ {$EXTERNALSYM PMEMORY_BASIC_INFORMATION}
+ _MEMORY_BASIC_INFORMATION = record
+ BaseAddress: Pointer;
+ AllocationBase: Pointer;
+ AllocationProtect: DWORD;
+ RegionSize: SIZE_T;
+ State: DWORD;
+ Protect: DWORD;
+ Type_: DWORD;
+ end;
+ {$EXTERNALSYM _MEMORY_BASIC_INFORMATION}
+ MEMORY_BASIC_INFORMATION = _MEMORY_BASIC_INFORMATION;
+ {$EXTERNALSYM MEMORY_BASIC_INFORMATION}
+ TMemoryBasicInformation = MEMORY_BASIC_INFORMATION;
+ PMemoryBasicInformation = PMEMORY_BASIC_INFORMATION;
+
+ PMEMORY_BASIC_INFORMATION32 = ^MEMORY_BASIC_INFORMATION32;
+ {$EXTERNALSYM PMEMORY_BASIC_INFORMATION32}
+ _MEMORY_BASIC_INFORMATION32 = record
+ BaseAddress: DWORD;
+ AllocationBase: DWORD;
+ AllocationProtect: DWORD;
+ RegionSize: DWORD;
+ State: DWORD;
+ Protect: DWORD;
+ Type_: DWORD;
+ end;
+ {$EXTERNALSYM _MEMORY_BASIC_INFORMATION32}
+ MEMORY_BASIC_INFORMATION32 = _MEMORY_BASIC_INFORMATION32;
+ {$EXTERNALSYM MEMORY_BASIC_INFORMATION32}
+ TMemoryBasicInformation32 = MEMORY_BASIC_INFORMATION32;
+ PMemoryBasicInformation32 = PMEMORY_BASIC_INFORMATION32;
+
+ PMEMORY_BASIC_INFORMATION64 = ^MEMORY_BASIC_INFORMATION64;
+ {$EXTERNALSYM PMEMORY_BASIC_INFORMATION64}
+ _MEMORY_BASIC_INFORMATION64 = record
+ BaseAddress: ULONGLONG;
+ AllocationBase: ULONGLONG;
+ AllocationProtect: DWORD;
+ __alignment1: DWORD;
+ RegionSize: ULONGLONG;
+ State: DWORD;
+ Protect: DWORD;
+ Type_: DWORD;
+ __alignment2: DWORD;
+ end;
+ {$EXTERNALSYM _MEMORY_BASIC_INFORMATION64}
+ MEMORY_BASIC_INFORMATION64 = _MEMORY_BASIC_INFORMATION64;
+ {$EXTERNALSYM MEMORY_BASIC_INFORMATION64}
+ TMemoryBasicInformation64 = MEMORY_BASIC_INFORMATION64;
+ PMemoryBasicInformation64 = PMEMORY_BASIC_INFORMATION64;
+
+const
+ SECTION_QUERY = $0001;
+ {$EXTERNALSYM SECTION_QUERY}
+ SECTION_MAP_WRITE = $0002;
+ {$EXTERNALSYM SECTION_MAP_WRITE}
+ SECTION_MAP_READ = $0004;
+ {$EXTERNALSYM SECTION_MAP_READ}
+ SECTION_MAP_EXECUTE = $0008;
+ {$EXTERNALSYM SECTION_MAP_EXECUTE}
+ SECTION_EXTEND_SIZE = $0010;
+ {$EXTERNALSYM SECTION_EXTEND_SIZE}
+
+ SECTION_ALL_ACCESS = (STANDARD_RIGHTS_REQUIRED or SECTION_QUERY or
+ SECTION_MAP_WRITE or SECTION_MAP_READ or SECTION_MAP_EXECUTE or
+ SECTION_EXTEND_SIZE);
+ {$EXTERNALSYM SECTION_ALL_ACCESS}
+
+ PAGE_NOACCESS = $01;
+ {$EXTERNALSYM PAGE_NOACCESS}
+ PAGE_READONLY = $02;
+ {$EXTERNALSYM PAGE_READONLY}
+ PAGE_READWRITE = $04;
+ {$EXTERNALSYM PAGE_READWRITE}
+ PAGE_WRITECOPY = $08;
+ {$EXTERNALSYM PAGE_WRITECOPY}
+ PAGE_EXECUTE = $10;
+ {$EXTERNALSYM PAGE_EXECUTE}
+ PAGE_EXECUTE_READ = $20;
+ {$EXTERNALSYM PAGE_EXECUTE_READ}
+ PAGE_EXECUTE_READWRITE = $40;
+ {$EXTERNALSYM PAGE_EXECUTE_READWRITE}
+ PAGE_EXECUTE_WRITECOPY = $80;
+ {$EXTERNALSYM PAGE_EXECUTE_WRITECOPY}
+ PAGE_GUARD = $100;
+ {$EXTERNALSYM PAGE_GUARD}
+ PAGE_NOCACHE = $200;
+ {$EXTERNALSYM PAGE_NOCACHE}
+ PAGE_WRITECOMBINE = $400;
+ {$EXTERNALSYM PAGE_WRITECOMBINE}
+ MEM_COMMIT = $1000;
+ {$EXTERNALSYM MEM_COMMIT}
+ MEM_RESERVE = $2000;
+ {$EXTERNALSYM MEM_RESERVE}
+ MEM_DECOMMIT = $4000;
+ {$EXTERNALSYM MEM_DECOMMIT}
+ MEM_RELEASE = $8000;
+ {$EXTERNALSYM MEM_RELEASE}
+ MEM_FREE = $10000;
+ {$EXTERNALSYM MEM_FREE}
+ MEM_PRIVATE = $20000;
+ {$EXTERNALSYM MEM_PRIVATE}
+ MEM_MAPPED = $40000;
+ {$EXTERNALSYM MEM_MAPPED}
+ MEM_RESET = $80000;
+ {$EXTERNALSYM MEM_RESET}
+ MEM_TOP_DOWN = $100000;
+ {$EXTERNALSYM MEM_TOP_DOWN}
+ MEM_WRITE_WATCH = $200000;
+ {$EXTERNALSYM MEM_WRITE_WATCH}
+ MEM_PHYSICAL = $400000;
+ {$EXTERNALSYM MEM_PHYSICAL}
+ MEM_LARGE_PAGES = $20000000;
+ {$EXTERNALSYM MEM_LARGE_PAGES}
+ MEM_4MB_PAGES = DWORD($80000000);
+ {$EXTERNALSYM MEM_4MB_PAGES}
+ SEC_FILE = $800000;
+ {$EXTERNALSYM SEC_FILE}
+ SEC_IMAGE = $1000000;
+ {$EXTERNALSYM SEC_IMAGE}
+ SEC_RESERVE = $4000000;
+ {$EXTERNALSYM SEC_RESERVE}
+ SEC_COMMIT = DWORD($8000000);
+ {$EXTERNALSYM SEC_COMMIT}
+ SEC_NOCACHE = $10000000;
+ {$EXTERNALSYM SEC_NOCACHE}
+ MEM_IMAGE = SEC_IMAGE;
+ {$EXTERNALSYM MEM_IMAGE}
+ WRITE_WATCH_FLAG_RESET = $01;
+ {$EXTERNALSYM WRITE_WATCH_FLAG_RESET}
+
+//
+// Define access rights to files and directories
+//
+
+//
+// The FILE_READ_DATA and FILE_WRITE_DATA constants are also defined in
+// devioctl.h as FILE_READ_ACCESS and FILE_WRITE_ACCESS. The values for these
+// constants *MUST* always be in sync.
+// The values are redefined in devioctl.h because they must be available to
+// both DOS and NT.
+//
+
+ FILE_READ_DATA = $0001; // file & pipe
+ {$EXTERNALSYM FILE_READ_DATA}
+ FILE_LIST_DIRECTORY = $0001; // directory
+ {$EXTERNALSYM FILE_LIST_DIRECTORY}
+
+ FILE_WRITE_DATA = $0002; // file & pipe
+ {$EXTERNALSYM FILE_WRITE_DATA}
+ FILE_ADD_FILE = $0002; // directory
+ {$EXTERNALSYM FILE_ADD_FILE}
+
+ FILE_APPEND_DATA = $0004; // file
+ {$EXTERNALSYM FILE_APPEND_DATA}
+ FILE_ADD_SUBDIRECTORY = $0004; // directory
+ {$EXTERNALSYM FILE_ADD_SUBDIRECTORY}
+ FILE_CREATE_PIPE_INSTANCE = $0004; // named pipe
+ {$EXTERNALSYM FILE_CREATE_PIPE_INSTANCE}
+
+ FILE_READ_EA = $0008; // file & directory
+ {$EXTERNALSYM FILE_READ_EA}
+
+ FILE_WRITE_EA = $0010; // file & directory
+ {$EXTERNALSYM FILE_WRITE_EA}
+
+ FILE_EXECUTE = $0020; // file
+ {$EXTERNALSYM FILE_EXECUTE}
+ FILE_TRAVERSE = $0020; // directory
+ {$EXTERNALSYM FILE_TRAVERSE}
+
+ FILE_DELETE_CHILD = $0040; // directory
+ {$EXTERNALSYM FILE_DELETE_CHILD}
+
+ FILE_READ_ATTRIBUTES = $0080; // all
+ {$EXTERNALSYM FILE_READ_ATTRIBUTES}
+
+ FILE_WRITE_ATTRIBUTES = $0100; // all
+ {$EXTERNALSYM FILE_WRITE_ATTRIBUTES}
+
+ FILE_ALL_ACCESS = STANDARD_RIGHTS_REQUIRED or SYNCHRONIZE or $1FF;
+ {$EXTERNALSYM FILE_ALL_ACCESS}
+
+ FILE_GENERIC_READ = (STANDARD_RIGHTS_READ or FILE_READ_DATA or
+ FILE_READ_ATTRIBUTES or FILE_READ_EA or SYNCHRONIZE);
+ {$EXTERNALSYM FILE_GENERIC_READ}
+
+ FILE_GENERIC_WRITE = (STANDARD_RIGHTS_WRITE or FILE_WRITE_DATA or
+ FILE_WRITE_ATTRIBUTES or FILE_WRITE_EA or FILE_APPEND_DATA or SYNCHRONIZE);
+ {$EXTERNALSYM FILE_GENERIC_WRITE}
+
+ FILE_GENERIC_EXECUTE = (STANDARD_RIGHTS_EXECUTE or FILE_READ_ATTRIBUTES or
+ FILE_EXECUTE or SYNCHRONIZE);
+ {$EXTERNALSYM FILE_GENERIC_EXECUTE}
+
+ FILE_SHARE_READ = $00000001;
+ {$EXTERNALSYM FILE_SHARE_READ}
+ FILE_SHARE_WRITE = $00000002;
+ {$EXTERNALSYM FILE_SHARE_WRITE}
+ FILE_SHARE_DELETE = $00000004;
+ {$EXTERNALSYM FILE_SHARE_DELETE}
+ FILE_ATTRIBUTE_READONLY = $00000001;
+ {$EXTERNALSYM FILE_ATTRIBUTE_READONLY}
+ FILE_ATTRIBUTE_HIDDEN = $00000002;
+ {$EXTERNALSYM FILE_ATTRIBUTE_HIDDEN}
+ FILE_ATTRIBUTE_SYSTEM = $00000004;
+ {$EXTERNALSYM FILE_ATTRIBUTE_SYSTEM}
+ FILE_ATTRIBUTE_DIRECTORY = $00000010;
+ {$EXTERNALSYM FILE_ATTRIBUTE_DIRECTORY}
+ FILE_ATTRIBUTE_ARCHIVE = $00000020;
+ {$EXTERNALSYM FILE_ATTRIBUTE_ARCHIVE}
+ FILE_ATTRIBUTE_DEVICE = $00000040;
+ {$EXTERNALSYM FILE_ATTRIBUTE_DEVICE}
+ FILE_ATTRIBUTE_NORMAL = $00000080;
+ {$EXTERNALSYM FILE_ATTRIBUTE_NORMAL}
+ FILE_ATTRIBUTE_TEMPORARY = $00000100;
+ {$EXTERNALSYM FILE_ATTRIBUTE_TEMPORARY}
+ FILE_ATTRIBUTE_SPARSE_FILE = $00000200;
+ {$EXTERNALSYM FILE_ATTRIBUTE_SPARSE_FILE}
+ FILE_ATTRIBUTE_REPARSE_POINT = $00000400;
+ {$EXTERNALSYM FILE_ATTRIBUTE_REPARSE_POINT}
+ FILE_ATTRIBUTE_COMPRESSED = $00000800;
+ {$EXTERNALSYM FILE_ATTRIBUTE_COMPRESSED}
+ FILE_ATTRIBUTE_OFFLINE = $00001000;
+ {$EXTERNALSYM FILE_ATTRIBUTE_OFFLINE}
+ FILE_ATTRIBUTE_NOT_CONTENT_INDEXED = $00002000;
+ {$EXTERNALSYM FILE_ATTRIBUTE_NOT_CONTENT_INDEXED}
+ FILE_ATTRIBUTE_ENCRYPTED = $00004000;
+ {$EXTERNALSYM FILE_ATTRIBUTE_ENCRYPTED}
+ FILE_NOTIFY_CHANGE_FILE_NAME = $00000001;
+ {$EXTERNALSYM FILE_NOTIFY_CHANGE_FILE_NAME}
+ FILE_NOTIFY_CHANGE_DIR_NAME = $00000002;
+ {$EXTERNALSYM FILE_NOTIFY_CHANGE_DIR_NAME}
+ FILE_NOTIFY_CHANGE_ATTRIBUTES = $00000004;
+ {$EXTERNALSYM FILE_NOTIFY_CHANGE_ATTRIBUTES}
+ FILE_NOTIFY_CHANGE_SIZE = $00000008;
+ {$EXTERNALSYM FILE_NOTIFY_CHANGE_SIZE}
+ FILE_NOTIFY_CHANGE_LAST_WRITE = $00000010;
+ {$EXTERNALSYM FILE_NOTIFY_CHANGE_LAST_WRITE}
+ FILE_NOTIFY_CHANGE_LAST_ACCESS = $00000020;
+ {$EXTERNALSYM FILE_NOTIFY_CHANGE_LAST_ACCESS}
+ FILE_NOTIFY_CHANGE_CREATION = $00000040;
+ {$EXTERNALSYM FILE_NOTIFY_CHANGE_CREATION}
+ FILE_NOTIFY_CHANGE_SECURITY = $00000100;
+ {$EXTERNALSYM FILE_NOTIFY_CHANGE_SECURITY}
+ FILE_ACTION_ADDED = $00000001;
+ {$EXTERNALSYM FILE_ACTION_ADDED}
+ FILE_ACTION_REMOVED = $00000002;
+ {$EXTERNALSYM FILE_ACTION_REMOVED}
+ FILE_ACTION_MODIFIED = $00000003;
+ {$EXTERNALSYM FILE_ACTION_MODIFIED}
+ FILE_ACTION_RENAMED_OLD_NAME = $00000004;
+ {$EXTERNALSYM FILE_ACTION_RENAMED_OLD_NAME}
+ FILE_ACTION_RENAMED_NEW_NAME = $00000005;
+ {$EXTERNALSYM FILE_ACTION_RENAMED_NEW_NAME}
+ MAILSLOT_NO_MESSAGE = DWORD(-1);
+ {$EXTERNALSYM MAILSLOT_NO_MESSAGE}
+ MAILSLOT_WAIT_FOREVER = DWORD(-1);
+ {$EXTERNALSYM MAILSLOT_WAIT_FOREVER}
+ FILE_CASE_SENSITIVE_SEARCH = $00000001;
+ {$EXTERNALSYM FILE_CASE_SENSITIVE_SEARCH}
+ FILE_CASE_PRESERVED_NAMES = $00000002;
+ {$EXTERNALSYM FILE_CASE_PRESERVED_NAMES}
+ FILE_UNICODE_ON_DISK = $00000004;
+ {$EXTERNALSYM FILE_UNICODE_ON_DISK}
+ FILE_PERSISTENT_ACLS = $00000008;
+ {$EXTERNALSYM FILE_PERSISTENT_ACLS}
+ FILE_FILE_COMPRESSION = $00000010;
+ {$EXTERNALSYM FILE_FILE_COMPRESSION}
+ FILE_VOLUME_QUOTAS = $00000020;
+ {$EXTERNALSYM FILE_VOLUME_QUOTAS}
+ FILE_SUPPORTS_SPARSE_FILES = $00000040;
+ {$EXTERNALSYM FILE_SUPPORTS_SPARSE_FILES}
+ FILE_SUPPORTS_REPARSE_POINTS = $00000080;
+ {$EXTERNALSYM FILE_SUPPORTS_REPARSE_POINTS}
+ FILE_SUPPORTS_REMOTE_STORAGE = $00000100;
+ {$EXTERNALSYM FILE_SUPPORTS_REMOTE_STORAGE}
+ FILE_VOLUME_IS_COMPRESSED = $00008000;
+ {$EXTERNALSYM FILE_VOLUME_IS_COMPRESSED}
+ FILE_SUPPORTS_OBJECT_IDS = $00010000;
+ {$EXTERNALSYM FILE_SUPPORTS_OBJECT_IDS}
+ FILE_SUPPORTS_ENCRYPTION = $00020000;
+ {$EXTERNALSYM FILE_SUPPORTS_ENCRYPTION}
+ FILE_NAMED_STREAMS = $00040000;
+ {$EXTERNALSYM FILE_NAMED_STREAMS}
+ FILE_READ_ONLY_VOLUME = $00080000;
+ {$EXTERNALSYM FILE_READ_ONLY_VOLUME}
+
+//
+// Define the file notification information structure
+//
+
+type
+ PFILE_NOTIFY_INFORMATION = ^FILE_NOTIFY_INFORMATION;
+ {$EXTERNALSYM PFILE_NOTIFY_INFORMATION}
+ _FILE_NOTIFY_INFORMATION = record
+ NextEntryOffset: DWORD;
+ Action: DWORD;
+ FileNameLength: DWORD;
+ FileName: array [0..0] of WCHAR;
+ end;
+ {$EXTERNALSYM _FILE_NOTIFY_INFORMATION}
+ FILE_NOTIFY_INFORMATION = _FILE_NOTIFY_INFORMATION;
+ {$EXTERNALSYM FILE_NOTIFY_INFORMATION}
+ TFileNotifyInformation = FILE_NOTIFY_INFORMATION;
+ PFileNotifyInformation = PFILE_NOTIFY_INFORMATION;
+
+//
+// Define segement buffer structure for scatter/gather read/write.
+//
+
+type
+ PFILE_SEGMENT_ELEMENT = ^FILE_SEGMENT_ELEMENT;
+ {$EXTERNALSYM PFILE_SEGMENT_ELEMENT}
+ _FILE_SEGMENT_ELEMENT = record
+ case Integer of
+ 0: (Buffer: PVOID64);
+ 1: (Alignment: ULONGLONG);
+ end;
+ {$EXTERNALSYM _FILE_SEGMENT_ELEMENT}
+ FILE_SEGMENT_ELEMENT = _FILE_SEGMENT_ELEMENT;
+ {$EXTERNALSYM FILE_SEGMENT_ELEMENT}
+ TFileSegmentElement = FILE_SEGMENT_ELEMENT;
+ PFileSegmentElement = PFILE_SEGMENT_ELEMENT;
+
+//
+// The reparse GUID structure is used by all 3rd party layered drivers to
+// store data in a reparse point. For non-Microsoft tags, The GUID field
+// cannot be GUID_NULL.
+// The constraints on reparse tags are defined below.
+// Microsoft tags can also be used with this format of the reparse point buffer.
+//
+ TGenericReparseBuffer = record
+ DataBuffer: array [0..0] of BYTE;
+ end;
+
+ PREPARSE_GUID_DATA_BUFFER = ^REPARSE_GUID_DATA_BUFFER;
+ {$EXTERNALSYM PREPARSE_GUID_DATA_BUFFER}
+ _REPARSE_GUID_DATA_BUFFER = record
+ ReparseTag: DWORD;
+ ReparseDataLength: WORD;
+ Reserved: WORD;
+ ReparseGuid: GUID;
+ GenericReparseBuffer: TGenericReparseBuffer;
+ end;
+ {$EXTERNALSYM _REPARSE_GUID_DATA_BUFFER}
+ REPARSE_GUID_DATA_BUFFER = _REPARSE_GUID_DATA_BUFFER;
+ {$EXTERNALSYM REPARSE_GUID_DATA_BUFFER}
+ TReparseGuidDataBuffer = REPARSE_GUID_DATA_BUFFER;
+ PReparseGuidDataBuffer = PREPARSE_GUID_DATA_BUFFER;
+
+const
+ REPARSE_GUID_DATA_BUFFER_HEADER_SIZE = 24;
+ {$EXTERNALSYM REPARSE_GUID_DATA_BUFFER_HEADER_SIZE}
+//
+// Maximum allowed size of the reparse data.
+//
+
+const
+ MAXIMUM_REPARSE_DATA_BUFFER_SIZE = 16 * 1024;
+ {$EXTERNALSYM MAXIMUM_REPARSE_DATA_BUFFER_SIZE}
+
+//
+// Predefined reparse tags.
+// These tags need to avoid conflicting with IO_REMOUNT defined in ntos\inc\io.h
+//
+
+ IO_REPARSE_TAG_RESERVED_ZERO = 0;
+ {$EXTERNALSYM IO_REPARSE_TAG_RESERVED_ZERO}
+ IO_REPARSE_TAG_RESERVED_ONE = 1;
+ {$EXTERNALSYM IO_REPARSE_TAG_RESERVED_ONE}
+
+//
+// The value of the following constant needs to satisfy the following conditions:
+// (1) Be at least as large as the largest of the reserved tags.
+// (2) Be strictly smaller than all the tags in use.
+//
+
+ IO_REPARSE_TAG_RESERVED_RANGE = IO_REPARSE_TAG_RESERVED_ONE;
+ {$EXTERNALSYM IO_REPARSE_TAG_RESERVED_RANGE}
+
+//
+// The reparse tags are a DWORD. The 32 bits are laid out as follows:
+//
+// 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1
+// 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
+// +-+-+-+-+-----------------------+-------------------------------+
+// |M|R|N|R| Reserved bits | Reparse Tag Value |
+// +-+-+-+-+-----------------------+-------------------------------+
+//
+// M is the Microsoft bit. When set to 1, it denotes a tag owned by Microsoft.
+// All ISVs must use a tag with a 0 in this position.
+// Note: If a Microsoft tag is used by non-Microsoft software, the
+// behavior is not defined.
+//
+// R is reserved. Must be zero for non-Microsoft tags.
+//
+// N is name surrogate. When set to 1, the file represents another named
+// entity in the system.
+//
+// The M and N bits are OR-able.
+// The following macros check for the M and N bit values:
+//
+
+//
+// Macro to determine whether a reparse point tag corresponds to a tag
+// owned by Microsoft.
+//
+
+function IsReparseTagMicrosoft(Tag: ULONG): Boolean;
+{$EXTERNALSYM IsReparseTagMicrosoft}
+
+//
+// Macro to determine whether a reparse point tag corresponds to a file
+// that is to be displayed with the slow icon overlay.
+//
+
+function IsReparseTagHighLatency(Tag: ULONG): Boolean;
+{$EXTERNALSYM IsReparseTagHighLatency}
+
+//
+// Macro to determine whether a reparse point tag is a name surrogate
+//
+
+function IsReparseTagNameSurrogate(Tag: ULONG): Boolean;
+{$EXTERNALSYM IsReparseTagNameSurrogate}
+
+const
+ IO_REPARSE_TAG_MOUNT_POINT = DWORD($A0000003);
+ {$EXTERNALSYM IO_REPARSE_TAG_MOUNT_POINT}
+ IO_REPARSE_TAG_HSM = DWORD($C0000004);
+ {$EXTERNALSYM IO_REPARSE_TAG_HSM}
+ IO_REPARSE_TAG_SIS = DWORD($80000007);
+ {$EXTERNALSYM IO_REPARSE_TAG_SIS}
+ IO_REPARSE_TAG_DFS = DWORD($8000000A);
+ {$EXTERNALSYM IO_REPARSE_TAG_DFS}
+ IO_REPARSE_TAG_FILTER_MANAGER = DWORD($8000000B);
+ {$EXTERNALSYM IO_REPARSE_TAG_FILTER_MANAGER}
+ IO_COMPLETION_MODIFY_STATE = $0002;
+ {$EXTERNALSYM IO_COMPLETION_MODIFY_STATE}
+ IO_COMPLETION_ALL_ACCESS = DWORD(STANDARD_RIGHTS_REQUIRED or SYNCHRONIZE or $3);
+ {$EXTERNALSYM IO_COMPLETION_ALL_ACCESS}
+ DUPLICATE_CLOSE_SOURCE = $00000001;
+ {$EXTERNALSYM DUPLICATE_CLOSE_SOURCE}
+ DUPLICATE_SAME_ACCESS = $00000002;
+ {$EXTERNALSYM DUPLICATE_SAME_ACCESS}
+
+type
+ _SYSTEM_POWER_STATE = (
+ PowerSystemUnspecified,
+ PowerSystemWorking,
+ PowerSystemSleeping1,
+ PowerSystemSleeping2,
+ PowerSystemSleeping3,
+ PowerSystemHibernate,
+ PowerSystemShutdown,
+ PowerSystemMaximum);
+ {$EXTERNALSYM _SYSTEM_POWER_STATE}
+ SYSTEM_POWER_STATE = _SYSTEM_POWER_STATE;
+ {$EXTERNALSYM SYSTEM_POWER_STATE}
+ PSYSTEM_POWER_STATE = ^SYSTEM_POWER_STATE;
+ {$EXTERNALSYM PSYSTEM_POWER_STATE}
+ TSystemPowerState = SYSTEM_POWER_STATE;
+ PSystemPowerState = PSYSTEM_POWER_STATE;
+
+const
+ POWER_SYSTEM_MAXIMUM = 7;
+ {$EXTERNALSYM POWER_SYSTEM_MAXIMUM}
+
+type
+ POWER_ACTION = (
+ PowerActionNone,
+ PowerActionReserved,
+ PowerActionSleep,
+ PowerActionHibernate,
+ PowerActionShutdown,
+ PowerActionShutdownReset,
+ PowerActionShutdownOff,
+ PowerActionWarmEject);
+ {$EXTERNALSYM POWER_ACTION}
+ PPOWER_ACTION = ^POWER_ACTION;
+ {$EXTERNALSYM PPOWER_ACTION}
+ TPowerAction = POWER_ACTION;
+ PPowerAction = PPOWER_ACTION;
+
+ _DEVICE_POWER_STATE = (
+ PowerDeviceUnspecified,
+ PowerDeviceD0,
+ PowerDeviceD1,
+ PowerDeviceD2,
+ PowerDeviceD3,
+ PowerDeviceMaximum);
+ {$EXTERNALSYM _DEVICE_POWER_STATE}
+ DEVICE_POWER_STATE = _DEVICE_POWER_STATE;
+ {$EXTERNALSYM DEVICE_POWER_STATE}
+ PDEVICE_POWER_STATE = ^DEVICE_POWER_STATE;
+ {$EXTERNALSYM PDEVICE_POWER_STATE}
+ TDevicePowerState = DEVICE_POWER_STATE;
+ PDevicePowerState = PDEVICE_POWER_STATE;
+
+const
+ ES_SYSTEM_REQUIRED = DWORD($00000001);
+ {$EXTERNALSYM ES_SYSTEM_REQUIRED}
+ ES_DISPLAY_REQUIRED = DWORD($00000002);
+ {$EXTERNALSYM ES_DISPLAY_REQUIRED}
+ ES_USER_PRESENT = DWORD($00000004);
+ {$EXTERNALSYM ES_USER_PRESENT}
+ ES_CONTINUOUS = DWORD($80000000);
+ {$EXTERNALSYM ES_CONTINUOUS}
+
+type
+ EXECUTION_STATE = DWORD;
+ {$EXTERNALSYM EXECUTION_STATE}
+
+ LATENCY_TIME = (LT_DONT_CARE, LT_LOWEST_LATENCY);
+ {$EXTERNALSYM LATENCY_TIME}
+ TLatencyTime = LATENCY_TIME;
+
+//-----------------------------------------------------------------------------
+// Device Power Information
+// Accessable via CM_Get_DevInst_Registry_Property_Ex(CM_DRP_DEVICE_POWER_DATA)
+//-----------------------------------------------------------------------------
+
+const
+ PDCAP_D0_SUPPORTED = $00000001;
+ {$EXTERNALSYM PDCAP_D0_SUPPORTED}
+ PDCAP_D1_SUPPORTED = $00000002;
+ {$EXTERNALSYM PDCAP_D1_SUPPORTED}
+ PDCAP_D2_SUPPORTED = $00000004;
+ {$EXTERNALSYM PDCAP_D2_SUPPORTED}
+ PDCAP_D3_SUPPORTED = $00000008;
+ {$EXTERNALSYM PDCAP_D3_SUPPORTED}
+ PDCAP_WAKE_FROM_D0_SUPPORTED = $00000010;
+ {$EXTERNALSYM PDCAP_WAKE_FROM_D0_SUPPORTED}
+ PDCAP_WAKE_FROM_D1_SUPPORTED = $00000020;
+ {$EXTERNALSYM PDCAP_WAKE_FROM_D1_SUPPORTED}
+ PDCAP_WAKE_FROM_D2_SUPPORTED = $00000040;
+ {$EXTERNALSYM PDCAP_WAKE_FROM_D2_SUPPORTED}
+ PDCAP_WAKE_FROM_D3_SUPPORTED = $00000080;
+ {$EXTERNALSYM PDCAP_WAKE_FROM_D3_SUPPORTED}
+ PDCAP_WARM_EJECT_SUPPORTED = $00000100;
+ {$EXTERNALSYM PDCAP_WARM_EJECT_SUPPORTED}
+
+type
+ CM_Power_Data_s = record
+ PD_Size: DWORD;
+ PD_MostRecentPowerState: DEVICE_POWER_STATE;
+ PD_Capabilities: DWORD;
+ PD_D1Latency: DWORD;
+ PD_D2Latency: DWORD;
+ PD_D3Latency: DWORD;
+ PD_PowerStateMapping: array [0..POWER_SYSTEM_MAXIMUM - 1] of DEVICE_POWER_STATE;
+ PD_DeepestSystemWake: SYSTEM_POWER_STATE;
+ end;
+ {$EXTERNALSYM CM_Power_Data_s}
+ CM_POWER_DATA = CM_Power_Data_s;
+ {$EXTERNALSYM CM_POWER_DATA}
+ PCM_POWER_DATA = ^CM_POWER_DATA;
+ {$EXTERNALSYM PCM_POWER_DATA}
+ TCmPowerData = CM_POWER_DATA;
+ PCmPowerData = PCM_POWER_DATA;
+
+ POWER_INFORMATION_LEVEL = (
+ SystemPowerPolicyAc,
+ SystemPowerPolicyDc,
+ VerifySystemPolicyAc,
+ VerifySystemPolicyDc,
+ SystemPowerCapabilities,
+ SystemBatteryState,
+ SystemPowerStateHandler,
+ ProcessorStateHandler,
+ SystemPowerPolicyCurrent,
+ AdministratorPowerPolicy,
+ SystemReserveHiberFile,
+ ProcessorInformation,
+ SystemPowerInformation,
+ ProcessorStateHandler2,
+ LastWakeTime, // Compare with KeQueryInterruptTime()
+ LastSleepTime, // Compare with KeQueryInterruptTime()
+ SystemExecutionState,
+ SystemPowerStateNotifyHandler,
+ ProcessorPowerPolicyAc,
+ ProcessorPowerPolicyDc,
+ VerifyProcessorPowerPolicyAc,
+ VerifyProcessorPowerPolicyDc,
+ ProcessorPowerPolicyCurrent,
+ SystemPowerStateLogging,
+ SystemPowerLoggingEntry);
+ {$EXTERNALSYM POWER_INFORMATION_LEVEL}
+ TPowerInformationLevel = POWER_INFORMATION_LEVEL;
+
+//
+// System power manager capabilities
+//
+
+ BATTERY_REPORTING_SCALE = record
+ Granularity: DWORD;
+ Capacity: DWORD;
+ end;
+ {$EXTERNALSYM BATTERY_REPORTING_SCALE}
+ PBATTERY_REPORTING_SCALE = ^BATTERY_REPORTING_SCALE;
+ {$EXTERNALSYM PBATTERY_REPORTING_SCALE}
+ TBatteryReportingScale = BATTERY_REPORTING_SCALE;
+ PBatteryReportingScale = PBATTERY_REPORTING_SCALE;
+
+// Power Policy Management interfaces
+//
+
+ PPOWER_ACTION_POLICY = ^POWER_ACTION_POLICY;
+ {$EXTERNALSYM PPOWER_ACTION_POLICY}
+ POWER_ACTION_POLICY = record
+ Action: POWER_ACTION;
+ Flags: DWORD;
+ EventCode: DWORD;
+ end;
+ {$EXTERNALSYM POWER_ACTION_POLICY}
+ TPowerActionPolicy = POWER_ACTION_POLICY;
+ PPowerActionPolicy = PPOWER_ACTION_POLICY;
+
+// POWER_ACTION_POLICY->Flags:
+
+const
+ POWER_ACTION_QUERY_ALLOWED = $00000001;
+ {$EXTERNALSYM POWER_ACTION_QUERY_ALLOWED}
+ POWER_ACTION_UI_ALLOWED = $00000002;
+ {$EXTERNALSYM POWER_ACTION_UI_ALLOWED}
+ POWER_ACTION_OVERRIDE_APPS = $00000004;
+ {$EXTERNALSYM POWER_ACTION_OVERRIDE_APPS}
+ POWER_ACTION_LIGHTEST_FIRST = $10000000;
+ {$EXTERNALSYM POWER_ACTION_LIGHTEST_FIRST}
+ POWER_ACTION_LOCK_CONSOLE = $20000000;
+ {$EXTERNALSYM POWER_ACTION_LOCK_CONSOLE}
+ POWER_ACTION_DISABLE_WAKES = $40000000;
+ {$EXTERNALSYM POWER_ACTION_DISABLE_WAKES}
+ POWER_ACTION_CRITICAL = DWORD($80000000);
+ {$EXTERNALSYM POWER_ACTION_CRITICAL}
+
+// POWER_ACTION_POLICY->EventCode flags
+
+ POWER_LEVEL_USER_NOTIFY_TEXT = $00000001;
+ {$EXTERNALSYM POWER_LEVEL_USER_NOTIFY_TEXT}
+ POWER_LEVEL_USER_NOTIFY_SOUND = $00000002;
+ {$EXTERNALSYM POWER_LEVEL_USER_NOTIFY_SOUND}
+ POWER_LEVEL_USER_NOTIFY_EXEC = $00000004;
+ {$EXTERNALSYM POWER_LEVEL_USER_NOTIFY_EXEC}
+ POWER_USER_NOTIFY_BUTTON = $00000008;
+ {$EXTERNALSYM POWER_USER_NOTIFY_BUTTON}
+ POWER_USER_NOTIFY_SHUTDOWN = $00000010;
+ {$EXTERNALSYM POWER_USER_NOTIFY_SHUTDOWN}
+ POWER_FORCE_TRIGGER_RESET = DWORD($80000000);
+ {$EXTERNALSYM POWER_FORCE_TRIGGER_RESET}
+
+// system battery drain policies
+
+type
+ PSYSTEM_POWER_LEVEL = ^SYSTEM_POWER_LEVEL;
+ {$EXTERNALSYM PSYSTEM_POWER_LEVEL}
+ SYSTEM_POWER_LEVEL = record
+ Enable: BOOLEAN;
+ Spare: array [0..3 - 1] of BYTE;
+ BatteryLevel: DWORD;
+ PowerPolicy: POWER_ACTION_POLICY;
+ MinSystemState: SYSTEM_POWER_STATE;
+ end;
+ {$EXTERNALSYM SYSTEM_POWER_LEVEL}
+ TSystemPowerLevel = SYSTEM_POWER_LEVEL;
+ PSystemPowerLevel = PSYSTEM_POWER_LEVEL;
+
+// Discharge policy constants
+
+const
+ NUM_DISCHARGE_POLICIES = 4;
+ {$EXTERNALSYM NUM_DISCHARGE_POLICIES}
+ DISCHARGE_POLICY_CRITICAL = 0;
+ {$EXTERNALSYM DISCHARGE_POLICY_CRITICAL}
+ DISCHARGE_POLICY_LOW = 1;
+ {$EXTERNALSYM DISCHARGE_POLICY_LOW}
+
+//
+// Throttling policies
+//
+
+ PO_THROTTLE_NONE = 0;
+ {$EXTERNALSYM PO_THROTTLE_NONE}
+ PO_THROTTLE_CONSTANT = 1;
+ {$EXTERNALSYM PO_THROTTLE_CONSTANT}
+ PO_THROTTLE_DEGRADE = 2;
+ {$EXTERNALSYM PO_THROTTLE_DEGRADE}
+ PO_THROTTLE_ADAPTIVE = 3;
+ {$EXTERNALSYM PO_THROTTLE_ADAPTIVE}
+ PO_THROTTLE_MAXIMUM = 4; // not a policy, just a limit
+ {$EXTERNALSYM PO_THROTTLE_MAXIMUM}
+
+// system power policies
+
+type
+ PSYSTEM_POWER_POLICY = ^SYSTEM_POWER_POLICY;
+ {$EXTERNALSYM PSYSTEM_POWER_POLICY}
+ _SYSTEM_POWER_POLICY = record
+ Revision: DWORD; // 1
+ // events
+ PowerButton: POWER_ACTION_POLICY;
+ SleepButton: POWER_ACTION_POLICY;
+ LidClose: POWER_ACTION_POLICY;
+ LidOpenWake: SYSTEM_POWER_STATE;
+ Reserved: DWORD;
+ // "system idle" detection
+ Idle: POWER_ACTION_POLICY;
+ IdleTimeout: DWORD;
+ IdleSensitivity: BYTE;
+ // dynamic throttling policy
+ // PO_THROTTLE_NONE, PO_THROTTLE_CONSTANT, PO_THROTTLE_DEGRADE, or PO_THROTTLE_ADAPTIVE
+ DynamicThrottle: BYTE;
+ Spare2: array [0..1] of BYTE;
+ // meaning of power action "sleep"
+ MinSleep: SYSTEM_POWER_STATE;
+ MaxSleep: SYSTEM_POWER_STATE;
+ ReducedLatencySleep: SYSTEM_POWER_STATE;
+ WinLogonFlags: DWORD;
+ // parameters for dozing
+ Spare3: DWORD;
+ DozeS4Timeout: DWORD;
+ // battery policies
+ BroadcastCapacityResolution: DWORD;
+ DischargePolicy: array [0..NUM_DISCHARGE_POLICIES - 1] of SYSTEM_POWER_LEVEL;
+ // video policies
+ VideoTimeout: DWORD;
+ VideoDimDisplay: BOOLEAN;
+ VideoReserved: array [0..2] of DWORD;
+ // hard disk policies
+ SpindownTimeout: DWORD;
+ // processor policies
+ OptimizeForPower: LongBool;
+ FanThrottleTolerance: BYTE;
+ ForcedThrottle: BYTE;
+ MinThrottle: BYTE;
+ OverThrottled: POWER_ACTION_POLICY;
+ end;
+ {$EXTERNALSYM _SYSTEM_POWER_POLICY}
+ SYSTEM_POWER_POLICY = _SYSTEM_POWER_POLICY;
+ {$EXTERNALSYM SYSTEM_POWER_POLICY}
+ TSystemPowerPolicy = SYSTEM_POWER_POLICY;
+ PSystemPowerPolicy = PSYSTEM_POWER_POLICY;
+
+// processor power policy state
+
+ PPROCESSOR_POWER_POLICY_INFO = ^PROCESSOR_POWER_POLICY_INFO;
+ {$EXTERNALSYM PPROCESSOR_POWER_POLICY_INFO}
+ _PROCESSOR_POWER_POLICY_INFO = record
+ // Time based information (will be converted to kernel units)
+ TimeCheck: DWORD; // in US
+ DemoteLimit: DWORD; // in US
+ PromoteLimit: DWORD; // in US
+ // Percentage based information
+ DemotePercent: BYTE;
+ PromotePercent: BYTE;
+ Spare: array [0..1] of BYTE;
+ // Flags
+ Flags: DWORD;
+ //DWORD AllowDemotion:1;
+ //DWORD AllowPromotion:1;
+ //DWORD Reserved:30;
+ end;
+ {$EXTERNALSYM _PROCESSOR_POWER_POLICY_INFO}
+ PROCESSOR_POWER_POLICY_INFO = _PROCESSOR_POWER_POLICY_INFO;
+ {$EXTERNALSYM PROCESSOR_POWER_POLICY_INFO}
+ TProcessorPowerPolicyInfo = PROCESSOR_POWER_POLICY_INFO;
+ PProcessorPowerPolicyInfo = PPROCESSOR_POWER_POLICY_INFO;
+
+// processor power policy
+
+ PPROCESSOR_POWER_POLICY = ^PROCESSOR_POWER_POLICY;
+ {$EXTERNALSYM PPROCESSOR_POWER_POLICY}
+ _PROCESSOR_POWER_POLICY = record
+ Revision: DWORD; // 1
+ // Dynamic Throttling Policy
+ DynamicThrottle: BYTE;
+ Spare: array [0..2] of BYTE;
+ // Flags
+ Reserved: DWORD;
+ //DWORD DisableCStates:1;
+ //DWORD Reserved:31;
+
+ // System policy information
+ // The Array is last, in case it needs to be grown and the structure
+ // revision incremented.
+ PolicyCount: DWORD;
+ Policy: array [0..2] of PROCESSOR_POWER_POLICY_INFO;
+ end;
+ {$EXTERNALSYM _PROCESSOR_POWER_POLICY}
+ PROCESSOR_POWER_POLICY = _PROCESSOR_POWER_POLICY;
+ {$EXTERNALSYM PROCESSOR_POWER_POLICY}
+ TProcessorPowerPolicy = PROCESSOR_POWER_POLICY;
+ PProcessorPowerPolicy = PPROCESSOR_POWER_POLICY;
+
+// administrator power policy overrides
+
+ PADMINISTRATOR_POWER_POLICY = ^ADMINISTRATOR_POWER_POLICY;
+ {$EXTERNALSYM PADMINISTRATOR_POWER_POLICY}
+ _ADMINISTRATOR_POWER_POLICY = record
+ // meaning of power action "sleep"
+ MinSleep: SYSTEM_POWER_STATE;
+ MaxSleep: SYSTEM_POWER_STATE;
+ // video policies
+ MinVideoTimeout: DWORD;
+ MaxVideoTimeout: DWORD;
+ // disk policies
+ MinSpindownTimeout: DWORD;
+ MaxSpindownTimeout: DWORD;
+ end;
+ {$EXTERNALSYM _ADMINISTRATOR_POWER_POLICY}
+ ADMINISTRATOR_POWER_POLICY = _ADMINISTRATOR_POWER_POLICY;
+ {$EXTERNALSYM ADMINISTRATOR_POWER_POLICY}
+ TAdministratorPowerPolicy = ADMINISTRATOR_POWER_POLICY;
+ PAdministratorPowerPolicy = PADMINISTRATOR_POWER_POLICY;
+
+ PSYSTEM_POWER_CAPABILITIES = ^SYSTEM_POWER_CAPABILITIES;
+ {$EXTERNALSYM PSYSTEM_POWER_CAPABILITIES}
+ SYSTEM_POWER_CAPABILITIES = record
+ // Misc supported system features
+ PowerButtonPresent: BOOLEAN;
+ SleepButtonPresent: BOOLEAN;
+ LidPresent: BOOLEAN;
+ SystemS1: BOOLEAN;
+ SystemS2: BOOLEAN;
+ SystemS3: BOOLEAN;
+ SystemS4: BOOLEAN; // hibernate
+ SystemS5: BOOLEAN; // off
+ HiberFilePresent: BOOLEAN;
+ FullWake: BOOLEAN;
+ VideoDimPresent: BOOLEAN;
+ ApmPresent: BOOLEAN;
+ UpsPresent: BOOLEAN;
+ // Processors
+ ThermalControl: BOOLEAN;
+ ProcessorThrottle: BOOLEAN;
+ ProcessorMinThrottle: BYTE;
+ ProcessorMaxThrottle: BYTE;
+ spare2: array [0..4 - 1] of BYTE;
+ // Disk
+ DiskSpinDown: BOOLEAN;
+ spare3: array [0..8 - 1] of BYTE;
+ // System Battery
+ SystemBatteriesPresent: BOOLEAN;
+ BatteriesAreShortTerm: BOOLEAN;
+ BatteryScale: array [0..3 - 1] of BATTERY_REPORTING_SCALE;
+ // Wake
+ AcOnLineWake: SYSTEM_POWER_STATE;
+ SoftLidWake: SYSTEM_POWER_STATE;
+ RtcWake: SYSTEM_POWER_STATE;
+ MinDeviceWakeState: SYSTEM_POWER_STATE; // note this may change on driver load
+ DefaultLowLatencyWake: SYSTEM_POWER_STATE;
+ end;
+ {$EXTERNALSYM SYSTEM_POWER_CAPABILITIES}
+ TSystemPowerCapabilities = SYSTEM_POWER_CAPABILITIES;
+ PSystemPowerCapabilities = PSYSTEM_POWER_CAPABILITIES;
+
+ PSYSTEM_BATTERY_STATE = ^SYSTEM_BATTERY_STATE;
+ {$EXTERNALSYM PSYSTEM_BATTERY_STATE}
+ SYSTEM_BATTERY_STATE = record
+ AcOnLine: BOOLEAN;
+ BatteryPresent: BOOLEAN;
+ Charging: BOOLEAN;
+ Discharging: BOOLEAN;
+ Spare1: array [0..3] of BOOLEAN;
+ MaxCapacity: DWORD;
+ RemainingCapacity: DWORD;
+ Rate: DWORD;
+ EstimatedTime: DWORD;
+ DefaultAlert1: DWORD;
+ DefaultAlert2: DWORD;
+ end;
+ {$EXTERNALSYM SYSTEM_BATTERY_STATE}
+ TSystemBatteryState = SYSTEM_BATTERY_STATE;
+ PSystemBatteryState = PSYSTEM_BATTERY_STATE;
+
+//
+// Image Format
+//
+
+// #include "pshpack4.h" // 4 byte packing is the default
+
+const
+ IMAGE_DOS_SIGNATURE = $5A4D; // MZ
+ {$EXTERNALSYM IMAGE_DOS_SIGNATURE}
+ IMAGE_OS2_SIGNATURE = $454E; // NE
+ {$EXTERNALSYM IMAGE_OS2_SIGNATURE}
+ IMAGE_OS2_SIGNATURE_LE = $454C; // LE
+ {$EXTERNALSYM IMAGE_OS2_SIGNATURE_LE}
+ IMAGE_VXD_SIGNATURE = $454C; // LE
+ {$EXTERNALSYM IMAGE_VXD_SIGNATURE}
+ IMAGE_NT_SIGNATURE = $00004550; // PE00
+ {$EXTERNALSYM IMAGE_NT_SIGNATURE}
+
+// #include "pshpack2.h" // 16 bit headers are 2 byte packed
+
+type
+
+ // DOS .EXE header
+
+ PIMAGE_DOS_HEADER = ^IMAGE_DOS_HEADER;
+ {$EXTERNALSYM PIMAGE_DOS_HEADER}
+ _IMAGE_DOS_HEADER = record
+ e_magic: Word; // Magic number
+ e_cblp: Word; // Bytes on last page of file
+ e_cp: Word; // Pages in file
+ e_crlc: Word; // Relocations
+ e_cparhdr: Word; // Size of header in paragraphs
+ e_minalloc: Word; // Minimum extra paragraphs needed
+ e_maxalloc: Word; // Maximum extra paragraphs needed
+ e_ss: Word; // Initial (relative) SS value
+ e_sp: Word; // Initial SP value
+ e_csum: Word; // Checksum
+ e_ip: Word; // Initial IP value
+ e_cs: Word; // Initial (relative) CS value
+ e_lfarlc: Word; // File address of relocation table
+ e_ovno: Word; // Overlay number
+ e_res: array [0..3] of Word; // Reserved words
+ e_oemid: Word; // OEM identifier (for e_oeminfo)
+ e_oeminfo: Word; // OEM information; e_oemid specific
+ e_res2: array [0..9] of Word; // Reserved words
+ e_lfanew: Longint; // File address of new exe header
+ end;
+ {$EXTERNALSYM _IMAGE_DOS_HEADER}
+ IMAGE_DOS_HEADER = _IMAGE_DOS_HEADER;
+ {$EXTERNALSYM IMAGE_DOS_HEADER}
+ TImageDosHeader = IMAGE_DOS_HEADER;
+ PImageDosHeader = PIMAGE_DOS_HEADER;
+
+ // OS/2 .EXE header
+
+ PIMAGE_OS2_HEADER = ^IMAGE_OS2_HEADER;
+ {$EXTERNALSYM PIMAGE_OS2_HEADER}
+ _IMAGE_OS2_HEADER = record
+ ne_magic: Word; // Magic number
+ ne_ver: CHAR; // Version number
+ ne_rev: CHAR; // Revision number
+ ne_enttab: Word; // Offset of Entry Table
+ ne_cbenttab: Word; // Number of bytes in Entry Table
+ ne_crc: Longint; // Checksum of whole file
+ ne_flags: Word; // Flag word
+ ne_autodata: Word; // Automatic data segment number
+ ne_heap: Word; // Initial heap allocation
+ ne_stack: Word; // Initial stack allocation
+ ne_csip: Longint; // Initial CS:IP setting
+ ne_sssp: Longint; // Initial SS:SP setting
+ ne_cseg: Word; // Count of file segments
+ ne_cmod: Word; // Entries in Module Reference Table
+ ne_cbnrestab: Word; // Size of non-resident name table
+ ne_segtab: Word; // Offset of Segment Table
+ ne_rsrctab: Word; // Offset of Resource Table
+ ne_restab: Word; // Offset of resident name table
+ ne_modtab: Word; // Offset of Module Reference Table
+ ne_imptab: Word; // Offset of Imported Names Table
+ ne_nrestab: Longint; // Offset of Non-resident Names Table
+ ne_cmovent: Word; // Count of movable entries
+ ne_align: Word; // Segment alignment shift count
+ ne_cres: Word; // Count of resource segments
+ ne_exetyp: Byte; // Target Operating system
+ ne_flagsothers: Byte; // Other .EXE flags
+ ne_pretthunks: Word; // offset to return thunks
+ ne_psegrefbytes: Word; // offset to segment ref. bytes
+ ne_swaparea: Word; // Minimum code swap area size
+ ne_expver: Word; // Expected Windows version number
+ end;
+ {$EXTERNALSYM _IMAGE_OS2_HEADER}
+ IMAGE_OS2_HEADER = _IMAGE_OS2_HEADER;
+ {$EXTERNALSYM IMAGE_OS2_HEADER}
+ TImageOs2Header = IMAGE_OS2_HEADER;
+ PImageOs2Header = PIMAGE_OS2_HEADER;
+
+ // Windows VXD header
+
+ PIMAGE_VXD_HEADER = ^IMAGE_VXD_HEADER;
+ {$EXTERNALSYM PIMAGE_VXD_HEADER}
+ _IMAGE_VXD_HEADER = record
+ e32_magic: Word; // Magic number
+ e32_border: Byte; // The byte ordering for the VXD
+ e32_worder: Byte; // The word ordering for the VXD
+ e32_level: DWORD; // The EXE format level for now = 0
+ e32_cpu: Word; // The CPU type
+ e32_os: Word; // The OS type
+ e32_ver: DWORD; // Module version
+ e32_mflags: DWORD; // Module flags
+ e32_mpages: DWORD; // Module # pages
+ e32_startobj: DWORD; // Object # for instruction pointer
+ e32_eip: DWORD; // Extended instruction pointer
+ e32_stackobj: DWORD; // Object # for stack pointer
+ e32_esp: DWORD; // Extended stack pointer
+ e32_pagesize: DWORD; // VXD page size
+ e32_lastpagesize: DWORD; // Last page size in VXD
+ e32_fixupsize: DWORD; // Fixup section size
+ e32_fixupsum: DWORD; // Fixup section checksum
+ e32_ldrsize: DWORD; // Loader section size
+ e32_ldrsum: DWORD; // Loader section checksum
+ e32_objtab: DWORD; // Object table offset
+ e32_objcnt: DWORD; // Number of objects in module
+ e32_objmap: DWORD; // Object page map offset
+ e32_itermap: DWORD; // Object iterated data map offset
+ e32_rsrctab: DWORD; // Offset of Resource Table
+ e32_rsrccnt: DWORD; // Number of resource entries
+ e32_restab: DWORD; // Offset of resident name table
+ e32_enttab: DWORD; // Offset of Entry Table
+ e32_dirtab: DWORD; // Offset of Module Directive Table
+ e32_dircnt: DWORD; // Number of module directives
+ e32_fpagetab: DWORD; // Offset of Fixup Page Table
+ e32_frectab: DWORD; // Offset of Fixup Record Table
+ e32_impmod: DWORD; // Offset of Import Module Name Table
+ e32_impmodcnt: DWORD; // Number of entries in Import Module Name Table
+ e32_impproc: DWORD; // Offset of Import Procedure Name Table
+ e32_pagesum: DWORD; // Offset of Per-Page Checksum Table
+ e32_datapage: DWORD; // Offset of Enumerated Data Pages
+ e32_preload: DWORD; // Number of preload pages
+ e32_nrestab: DWORD; // Offset of Non-resident Names Table
+ e32_cbnrestab: DWORD; // Size of Non-resident Name Table
+ e32_nressum: DWORD; // Non-resident Name Table Checksum
+ e32_autodata: DWORD; // Object # for automatic data object
+ e32_debuginfo: DWORD; // Offset of the debugging information
+ e32_debuglen: DWORD; // The length of the debugging info. in bytes
+ e32_instpreload: DWORD; // Number of instance pages in preload section of VXD file
+ e32_instdemand: DWORD; // Number of instance pages in demand load section of VXD file
+ e32_heapsize: DWORD; // Size of heap - for 16-bit apps
+ e32_res3: array [0..11] of Byte; // Reserved words
+ e32_winresoff: DWORD;
+ e32_winreslen: DWORD;
+ e32_devid: Word; // Device ID for VxD
+ e32_ddkver: Word; // DDK version for VxD
+ end;
+ {$EXTERNALSYM _IMAGE_VXD_HEADER}
+ IMAGE_VXD_HEADER = _IMAGE_VXD_HEADER;
+ {$EXTERNALSYM IMAGE_VXD_HEADER}
+ TImageVxdHeader = IMAGE_VXD_HEADER;
+ PImageVxdHeader = PIMAGE_VXD_HEADER;
+
+// #include "poppack.h" // Back to 4 byte packing
+
+//
+// File header format.
+//
+
+ PIMAGE_FILE_HEADER = ^IMAGE_FILE_HEADER;
+ {$EXTERNALSYM PIMAGE_FILE_HEADER}
+ _IMAGE_FILE_HEADER = record
+ Machine: WORD;
+ NumberOfSections: WORD;
+ TimeDateStamp: DWORD;
+ PointerToSymbolTable: DWORD;
+ NumberOfSymbols: DWORD;
+ SizeOfOptionalHeader: WORD;
+ Characteristics: WORD;
+ end;
+ {$EXTERNALSYM _IMAGE_FILE_HEADER}
+ IMAGE_FILE_HEADER = _IMAGE_FILE_HEADER;
+ {$EXTERNALSYM IMAGE_FILE_HEADER}
+ TImageFileHeader = IMAGE_FILE_HEADER;
+ PImageFileHeader = PIMAGE_FILE_HEADER;
+
+const
+ IMAGE_SIZEOF_FILE_HEADER = 20;
+ {$EXTERNALSYM IMAGE_SIZEOF_FILE_HEADER}
+
+ IMAGE_FILE_RELOCS_STRIPPED = $0001; // Relocation info stripped from file.
+ {$EXTERNALSYM IMAGE_FILE_RELOCS_STRIPPED}
+ IMAGE_FILE_EXECUTABLE_IMAGE = $0002; // File is executable (i.e. no unresolved externel references).
+ {$EXTERNALSYM IMAGE_FILE_EXECUTABLE_IMAGE}
+ IMAGE_FILE_LINE_NUMS_STRIPPED = $0004; // Line nunbers stripped from file.
+ {$EXTERNALSYM IMAGE_FILE_LINE_NUMS_STRIPPED}
+ IMAGE_FILE_LOCAL_SYMS_STRIPPED = $0008; // Local symbols stripped from file.
+ {$EXTERNALSYM IMAGE_FILE_LOCAL_SYMS_STRIPPED}
+ IMAGE_FILE_AGGRESIVE_WS_TRIM = $0010; // Agressively trim working set
+ {$EXTERNALSYM IMAGE_FILE_AGGRESIVE_WS_TRIM}
+ IMAGE_FILE_LARGE_ADDRESS_AWARE = $0020; // App can handle >2gb addresses
+ {$EXTERNALSYM IMAGE_FILE_LARGE_ADDRESS_AWARE}
+ IMAGE_FILE_BYTES_REVERSED_LO = $0080; // Bytes of machine word are reversed.
+ {$EXTERNALSYM IMAGE_FILE_BYTES_REVERSED_LO}
+ IMAGE_FILE_32BIT_MACHINE = $0100; // 32 bit word machine.
+ {$EXTERNALSYM IMAGE_FILE_32BIT_MACHINE}
+ IMAGE_FILE_DEBUG_STRIPPED = $0200; // Debugging info stripped from file in .DBG file
+ {$EXTERNALSYM IMAGE_FILE_DEBUG_STRIPPED}
+ IMAGE_FILE_REMOVABLE_RUN_FROM_SWAP = $0400; // If Image is on removable media, copy and run from the swap file.
+ {$EXTERNALSYM IMAGE_FILE_REMOVABLE_RUN_FROM_SWAP}
+ IMAGE_FILE_NET_RUN_FROM_SWAP = $0800; // If Image is on Net, copy and run from the swap file.
+ {$EXTERNALSYM IMAGE_FILE_NET_RUN_FROM_SWAP}
+ IMAGE_FILE_SYSTEM = $1000; // System File.
+ {$EXTERNALSYM IMAGE_FILE_SYSTEM}
+ IMAGE_FILE_DLL = $2000; // File is a DLL.
+ {$EXTERNALSYM IMAGE_FILE_DLL}
+ IMAGE_FILE_UP_SYSTEM_ONLY = $4000; // File should only be run on a UP machine
+ {$EXTERNALSYM IMAGE_FILE_UP_SYSTEM_ONLY}
+ IMAGE_FILE_BYTES_REVERSED_HI = $8000; // Bytes of machine word are reversed.
+ {$EXTERNALSYM IMAGE_FILE_BYTES_REVERSED_HI}
+
+ IMAGE_FILE_MACHINE_UNKNOWN = 0;
+ {$EXTERNALSYM IMAGE_FILE_MACHINE_UNKNOWN}
+ IMAGE_FILE_MACHINE_I386 = $014c; // Intel 386.
+ {$EXTERNALSYM IMAGE_FILE_MACHINE_I386}
+ IMAGE_FILE_MACHINE_R3000 = $0162; // MIPS little-endian, 0x160 big-endian
+ {$EXTERNALSYM IMAGE_FILE_MACHINE_R3000}
+ IMAGE_FILE_MACHINE_R4000 = $0166; // MIPS little-endian
+ {$EXTERNALSYM IMAGE_FILE_MACHINE_R4000}
+ IMAGE_FILE_MACHINE_R10000 = $0168; // MIPS little-endian
+ {$EXTERNALSYM IMAGE_FILE_MACHINE_R10000}
+ IMAGE_FILE_MACHINE_WCEMIPSV2 = $0169; // MIPS little-endian WCE v2
+ {$EXTERNALSYM IMAGE_FILE_MACHINE_WCEMIPSV2}
+ IMAGE_FILE_MACHINE_ALPHA = $0184; // Alpha_AXP
+ {$EXTERNALSYM IMAGE_FILE_MACHINE_ALPHA}
+ IMAGE_FILE_MACHINE_SH3 = $01a2; // SH3 little-endian
+ {$EXTERNALSYM IMAGE_FILE_MACHINE_SH3}
+ IMAGE_FILE_MACHINE_SH3DSP = $01a3;
+ {$EXTERNALSYM IMAGE_FILE_MACHINE_SH3DSP}
+ IMAGE_FILE_MACHINE_SH3E = $01a4; // SH3E little-endian
+ {$EXTERNALSYM IMAGE_FILE_MACHINE_SH3E}
+ IMAGE_FILE_MACHINE_SH4 = $01a6; // SH4 little-endian
+ {$EXTERNALSYM IMAGE_FILE_MACHINE_SH4}
+ IMAGE_FILE_MACHINE_SH5 = $01a8; // SH5
+ {$EXTERNALSYM IMAGE_FILE_MACHINE_SH5}
+ IMAGE_FILE_MACHINE_ARM = $01c0; // ARM Little-Endian
+ {$EXTERNALSYM IMAGE_FILE_MACHINE_ARM}
+ IMAGE_FILE_MACHINE_THUMB = $01c2;
+ {$EXTERNALSYM IMAGE_FILE_MACHINE_THUMB}
+ IMAGE_FILE_MACHINE_AM33 = $01d3;
+ {$EXTERNALSYM IMAGE_FILE_MACHINE_AM33}
+ IMAGE_FILE_MACHINE_POWERPC = $01F0; // IBM PowerPC Little-Endian
+ {$EXTERNALSYM IMAGE_FILE_MACHINE_POWERPC}
+ IMAGE_FILE_MACHINE_POWERPCFP = $01f1;
+ {$EXTERNALSYM IMAGE_FILE_MACHINE_POWERPCFP}
+ IMAGE_FILE_MACHINE_IA64 = $0200; // Intel 64
+ {$EXTERNALSYM IMAGE_FILE_MACHINE_IA64}
+ IMAGE_FILE_MACHINE_MIPS16 = $0266; // MIPS
+ {$EXTERNALSYM IMAGE_FILE_MACHINE_MIPS16}
+ IMAGE_FILE_MACHINE_ALPHA64 = $0284; // ALPHA64
+ {$EXTERNALSYM IMAGE_FILE_MACHINE_ALPHA64}
+ IMAGE_FILE_MACHINE_MIPSFPU = $0366; // MIPS
+ {$EXTERNALSYM IMAGE_FILE_MACHINE_MIPSFPU}
+ IMAGE_FILE_MACHINE_MIPSFPU16 = $0466; // MIPS
+ {$EXTERNALSYM IMAGE_FILE_MACHINE_MIPSFPU16}
+ IMAGE_FILE_MACHINE_AXP64 = IMAGE_FILE_MACHINE_ALPHA64;
+ {$EXTERNALSYM IMAGE_FILE_MACHINE_AXP64}
+ IMAGE_FILE_MACHINE_TRICORE = $0520; // Infineon
+ {$EXTERNALSYM IMAGE_FILE_MACHINE_TRICORE}
+ IMAGE_FILE_MACHINE_CEF = $0CEF;
+ {$EXTERNALSYM IMAGE_FILE_MACHINE_CEF}
+ IMAGE_FILE_MACHINE_EBC = $0EBC; // EFI Byte Code
+ {$EXTERNALSYM IMAGE_FILE_MACHINE_EBC}
+ IMAGE_FILE_MACHINE_AMD64 = $8664; // AMD64 (K8)
+ {$EXTERNALSYM IMAGE_FILE_MACHINE_AMD64}
+ IMAGE_FILE_MACHINE_M32R = $9041; // M32R little-endian
+ {$EXTERNALSYM IMAGE_FILE_MACHINE_M32R}
+ IMAGE_FILE_MACHINE_CEE = $C0EE;
+ {$EXTERNALSYM IMAGE_FILE_MACHINE_CEE}
+
+//
+// Directory format.
+//
+
+type
+ PIMAGE_DATA_DIRECTORY = ^IMAGE_DATA_DIRECTORY;
+ {$EXTERNALSYM PIMAGE_DATA_DIRECTORY}
+ _IMAGE_DATA_DIRECTORY = record
+ VirtualAddress: DWORD;
+ Size: DWORD;
+ end;
+ {$EXTERNALSYM _IMAGE_DATA_DIRECTORY}
+ IMAGE_DATA_DIRECTORY = _IMAGE_DATA_DIRECTORY;
+ {$EXTERNALSYM IMAGE_DATA_DIRECTORY}
+ TImageDataDirectory = IMAGE_DATA_DIRECTORY;
+ PImageDataDirectory = PIMAGE_DATA_DIRECTORY;
+
+const
+ IMAGE_NUMBEROF_DIRECTORY_ENTRIES = 16;
+ {$EXTERNALSYM IMAGE_NUMBEROF_DIRECTORY_ENTRIES}
+
+//
+// Optional header format.
+//
+
+type
+ PIMAGE_OPTIONAL_HEADER32 = ^IMAGE_OPTIONAL_HEADER32;
+ {$EXTERNALSYM PIMAGE_OPTIONAL_HEADER32}
+ _IMAGE_OPTIONAL_HEADER = record
+ //
+ // Standard fields.
+ //
+ Magic: Word;
+ MajorLinkerVersion: Byte;
+ MinorLinkerVersion: Byte;
+ SizeOfCode: DWORD;
+ SizeOfInitializedData: DWORD;
+ SizeOfUninitializedData: DWORD;
+ AddressOfEntryPoint: DWORD;
+ BaseOfCode: DWORD;
+ BaseOfData: DWORD;
+ //
+ // NT additional fields.
+ //
+ ImageBase: DWORD;
+ SectionAlignment: DWORD;
+ FileAlignment: DWORD;
+ MajorOperatingSystemVersion: Word;
+ MinorOperatingSystemVersion: Word;
+ MajorImageVersion: Word;
+ MinorImageVersion: Word;
+ MajorSubsystemVersion: Word;
+ MinorSubsystemVersion: Word;
+ Win32VersionValue: DWORD;
+ SizeOfImage: DWORD;
+ SizeOfHeaders: DWORD;
+ CheckSum: DWORD;
+ Subsystem: Word;
+ DllCharacteristics: Word;
+ SizeOfStackReserve: DWORD;
+ SizeOfStackCommit: DWORD;
+ SizeOfHeapReserve: DWORD;
+ SizeOfHeapCommit: DWORD;
+ LoaderFlags: DWORD;
+ NumberOfRvaAndSizes: DWORD;
+ DataDirectory: array [0..IMAGE_NUMBEROF_DIRECTORY_ENTRIES - 1] of IMAGE_DATA_DIRECTORY;
+ end;
+ {$EXTERNALSYM _IMAGE_OPTIONAL_HEADER}
+ IMAGE_OPTIONAL_HEADER32 = _IMAGE_OPTIONAL_HEADER;
+ {$EXTERNALSYM IMAGE_OPTIONAL_HEADER32}
+ TImageOptionalHeader32 = IMAGE_OPTIONAL_HEADER32;
+ PImageOptionalHeader32 = PIMAGE_OPTIONAL_HEADER32;
+
+ PIMAGE_ROM_OPTIONAL_HEADER = ^IMAGE_ROM_OPTIONAL_HEADER;
+ {$EXTERNALSYM PIMAGE_ROM_OPTIONAL_HEADER}
+ _IMAGE_ROM_OPTIONAL_HEADER = record
+ Magic: Word;
+ MajorLinkerVersion: Byte;
+ MinorLinkerVersion: Byte;
+ SizeOfCode: DWORD;
+ SizeOfInitializedData: DWORD;
+ SizeOfUninitializedData: DWORD;
+ AddressOfEntryPoint: DWORD;
+ BaseOfCode: DWORD;
+ BaseOfData: DWORD;
+ BaseOfBss: DWORD;
+ GprMask: DWORD;
+ CprMask: array [0..3] of DWORD;
+ GpValue: DWORD;
+ end;
+ {$EXTERNALSYM _IMAGE_ROM_OPTIONAL_HEADER}
+ IMAGE_ROM_OPTIONAL_HEADER = _IMAGE_ROM_OPTIONAL_HEADER;
+ {$EXTERNALSYM IMAGE_ROM_OPTIONAL_HEADER}
+ TImageRomOptionalHeader = IMAGE_ROM_OPTIONAL_HEADER;
+ PImageRomOptionalHeader = PIMAGE_ROM_OPTIONAL_HEADER;
+
+ PIMAGE_OPTIONAL_HEADER64 = ^IMAGE_OPTIONAL_HEADER64;
+ {$EXTERNALSYM PIMAGE_OPTIONAL_HEADER64}
+ _IMAGE_OPTIONAL_HEADER64 = record
+ Magic: Word;
+ MajorLinkerVersion: Byte;
+ MinorLinkerVersion: Byte;
+ SizeOfCode: DWORD;
+ SizeOfInitializedData: DWORD;
+ SizeOfUninitializedData: DWORD;
+ AddressOfEntryPoint: DWORD;
+ BaseOfCode: DWORD;
+ ImageBase: Int64;
+ SectionAlignment: DWORD;
+ FileAlignment: DWORD;
+ MajorOperatingSystemVersion: Word;
+ MinorOperatingSystemVersion: Word;
+ MajorImageVersion: Word;
+ MinorImageVersion: Word;
+ MajorSubsystemVersion: Word;
+ MinorSubsystemVersion: Word;
+ Win32VersionValue: DWORD;
+ SizeOfImage: DWORD;
+ SizeOfHeaders: DWORD;
+ CheckSum: DWORD;
+ Subsystem: Word;
+ DllCharacteristics: Word;
+ SizeOfStackReserve: Int64;
+ SizeOfStackCommit: Int64;
+ SizeOfHeapReserve: Int64;
+ SizeOfHeapCommit: Int64;
+ LoaderFlags: DWORD;
+ NumberOfRvaAndSizes: DWORD;
+ DataDirectory: array [0..IMAGE_NUMBEROF_DIRECTORY_ENTRIES - 1] of IMAGE_DATA_DIRECTORY;
+ end;
+ {$EXTERNALSYM _IMAGE_OPTIONAL_HEADER64}
+ IMAGE_OPTIONAL_HEADER64 = _IMAGE_OPTIONAL_HEADER64;
+ {$EXTERNALSYM IMAGE_OPTIONAL_HEADER64}
+ TImageOptionalHeader64 = IMAGE_OPTIONAL_HEADER64;
+ PImageOptionalHeader64 = PIMAGE_OPTIONAL_HEADER64;
+
+const
+ IMAGE_SIZEOF_ROM_OPTIONAL_HEADER = 56;
+ {$EXTERNALSYM IMAGE_SIZEOF_ROM_OPTIONAL_HEADER}
+ IMAGE_SIZEOF_STD_OPTIONAL_HEADER = 28;
+ {$EXTERNALSYM IMAGE_SIZEOF_STD_OPTIONAL_HEADER}
+ IMAGE_SIZEOF_NT_OPTIONAL32_HEADER = 224;
+ {$EXTERNALSYM IMAGE_SIZEOF_NT_OPTIONAL32_HEADER}
+ IMAGE_SIZEOF_NT_OPTIONAL64_HEADER = 240;
+ {$EXTERNALSYM IMAGE_SIZEOF_NT_OPTIONAL64_HEADER}
+
+ IMAGE_NT_OPTIONAL_HDR32_MAGIC = $10b;
+ {$EXTERNALSYM IMAGE_NT_OPTIONAL_HDR32_MAGIC}
+ IMAGE_NT_OPTIONAL_HDR64_MAGIC = $20b;
+ {$EXTERNALSYM IMAGE_NT_OPTIONAL_HDR64_MAGIC}
+ IMAGE_ROM_OPTIONAL_HDR_MAGIC = $107;
+ {$EXTERNALSYM IMAGE_ROM_OPTIONAL_HDR_MAGIC}
+
+type
+ IMAGE_OPTIONAL_HEADER = IMAGE_OPTIONAL_HEADER32;
+ {$EXTERNALSYM IMAGE_OPTIONAL_HEADER}
+ PIMAGE_OPTIONAL_HEADER = PIMAGE_OPTIONAL_HEADER32;
+ {$EXTERNALSYM PIMAGE_OPTIONAL_HEADER}
+
+const
+ IMAGE_SIZEOF_NT_OPTIONAL_HEADER = IMAGE_SIZEOF_NT_OPTIONAL32_HEADER;
+ {$EXTERNALSYM IMAGE_SIZEOF_NT_OPTIONAL_HEADER}
+ IMAGE_NT_OPTIONAL_HDR_MAGIC = IMAGE_NT_OPTIONAL_HDR32_MAGIC;
+ {$EXTERNALSYM IMAGE_NT_OPTIONAL_HDR_MAGIC}
+
+type
+ PIMAGE_NT_HEADERS64 = ^IMAGE_NT_HEADERS64;
+ {$EXTERNALSYM PIMAGE_NT_HEADERS64}
+ _IMAGE_NT_HEADERS64 = record
+ Signature: DWORD;
+ FileHeader: IMAGE_FILE_HEADER;
+ OptionalHeader: IMAGE_OPTIONAL_HEADER64;
+ end;
+ {$EXTERNALSYM _IMAGE_NT_HEADERS64}
+ IMAGE_NT_HEADERS64 = _IMAGE_NT_HEADERS64;
+ {$EXTERNALSYM IMAGE_NT_HEADERS64}
+ TImageNtHeaders64 = IMAGE_NT_HEADERS64;
+ PImageNtHeaders64 = PIMAGE_NT_HEADERS64;
+
+ PIMAGE_NT_HEADERS32 = ^IMAGE_NT_HEADERS32;
+ {$EXTERNALSYM PIMAGE_NT_HEADERS32}
+ _IMAGE_NT_HEADERS = record
+ Signature: DWORD;
+ FileHeader: IMAGE_FILE_HEADER;
+ OptionalHeader: IMAGE_OPTIONAL_HEADER32;
+ end;
+ {$EXTERNALSYM _IMAGE_NT_HEADERS}
+ IMAGE_NT_HEADERS32 = _IMAGE_NT_HEADERS;
+ {$EXTERNALSYM IMAGE_NT_HEADERS32}
+ TImageNtHeaders32 = IMAGE_NT_HEADERS32;
+ PImageNtHeaders32 = PIMAGE_NT_HEADERS32;
+
+ PIMAGE_ROM_HEADERS = ^IMAGE_ROM_HEADERS;
+ {$EXTERNALSYM PIMAGE_ROM_HEADERS}
+ _IMAGE_ROM_HEADERS = record
+ FileHeader: IMAGE_FILE_HEADER;
+ OptionalHeader: IMAGE_ROM_OPTIONAL_HEADER;
+ end;
+ {$EXTERNALSYM _IMAGE_ROM_HEADERS}
+ IMAGE_ROM_HEADERS = _IMAGE_ROM_HEADERS;
+ {$EXTERNALSYM IMAGE_ROM_HEADERS}
+ TImageRomHeaders = IMAGE_ROM_HEADERS;
+ PImageRomHeaders = PIMAGE_ROM_HEADERS;
+
+ IMAGE_NT_HEADERS = IMAGE_NT_HEADERS32;
+ {$EXTERNALSYM IMAGE_NT_HEADERS}
+ PIMAGE_NT_HEADERS = PIMAGE_NT_HEADERS32;
+ {$EXTERNALSYM PIMAGE_NT_HEADERS}
+
+ PImageNtHeaders = PIMAGE_NT_HEADERS;
+
+// Subsystem Values
+
+const
+ IMAGE_SUBSYSTEM_UNKNOWN = 0; // Unknown subsystem.
+ {$EXTERNALSYM IMAGE_SUBSYSTEM_UNKNOWN}
+ IMAGE_SUBSYSTEM_NATIVE = 1; // Image doesn't require a subsystem.
+ {$EXTERNALSYM IMAGE_SUBSYSTEM_NATIVE}
+ IMAGE_SUBSYSTEM_WINDOWS_GUI = 2; // Image runs in the Windows GUI subsystem.
+ {$EXTERNALSYM IMAGE_SUBSYSTEM_WINDOWS_GUI}
+ IMAGE_SUBSYSTEM_WINDOWS_CUI = 3; // Image runs in the Windows character subsystem.
+ {$EXTERNALSYM IMAGE_SUBSYSTEM_WINDOWS_CUI}
+ IMAGE_SUBSYSTEM_OS2_CUI = 5; // image runs in the OS/2 character subsystem.
+ {$EXTERNALSYM IMAGE_SUBSYSTEM_OS2_CUI}
+ IMAGE_SUBSYSTEM_POSIX_CUI = 7; // image runs in the Posix character subsystem.
+ {$EXTERNALSYM IMAGE_SUBSYSTEM_POSIX_CUI}
+ IMAGE_SUBSYSTEM_NATIVE_WINDOWS = 8; // image is a native Win9x driver.
+ {$EXTERNALSYM IMAGE_SUBSYSTEM_NATIVE_WINDOWS}
+ IMAGE_SUBSYSTEM_WINDOWS_CE_GUI = 9; // Image runs in the Windows CE subsystem.
+ {$EXTERNALSYM IMAGE_SUBSYSTEM_WINDOWS_CE_GUI}
+ IMAGE_SUBSYSTEM_EFI_APPLICATION = 10;
+ {$EXTERNALSYM IMAGE_SUBSYSTEM_EFI_APPLICATION}
+ IMAGE_SUBSYSTEM_EFI_BOOT_SERVICE_DRIVER = 11;
+ {$EXTERNALSYM IMAGE_SUBSYSTEM_EFI_BOOT_SERVICE_DRIVER}
+ IMAGE_SUBSYSTEM_EFI_RUNTIME_DRIVER = 12;
+ {$EXTERNALSYM IMAGE_SUBSYSTEM_EFI_RUNTIME_DRIVER}
+ IMAGE_SUBSYSTEM_EFI_ROM = 13;
+ {$EXTERNALSYM IMAGE_SUBSYSTEM_EFI_ROM}
+ IMAGE_SUBSYSTEM_XBOX = 14;
+ {$EXTERNALSYM IMAGE_SUBSYSTEM_XBOX}
+
+// DllCharacteristics Entries
+
+// IMAGE_LIBRARY_PROCESS_INIT 0x0001 // Reserved.
+// IMAGE_LIBRARY_PROCESS_TERM 0x0002 // Reserved.
+// IMAGE_LIBRARY_THREAD_INIT 0x0004 // Reserved.
+// IMAGE_LIBRARY_THREAD_TERM 0x0008 // Reserved.
+ IMAGE_DLLCHARACTERISTICS_NO_ISOLATION = $0200; // Image understands isolation and doesn't want it
+ {$EXTERNALSYM IMAGE_DLLCHARACTERISTICS_NO_ISOLATION}
+ IMAGE_DLLCHARACTERISTICS_NO_SEH = $0400; // Image does not use SEH. No SE handler may reside in this image
+ {$EXTERNALSYM IMAGE_DLLCHARACTERISTICS_NO_SEH}
+ IMAGE_DLLCHARACTERISTICS_NO_BIND = $0800; // Do not bind this image.
+ {$EXTERNALSYM IMAGE_DLLCHARACTERISTICS_NO_BIND}
+
+// 0x1000 // Reserved.
+
+ IMAGE_DLLCHARACTERISTICS_WDM_DRIVER = $2000; // Driver uses WDM model
+ {$EXTERNALSYM IMAGE_DLLCHARACTERISTICS_WDM_DRIVER}
+
+// 0x4000 // Reserved.
+
+ IMAGE_DLLCHARACTERISTICS_TERMINAL_SERVER_AWARE = $8000;
+ {$EXTERNALSYM IMAGE_DLLCHARACTERISTICS_TERMINAL_SERVER_AWARE}
+
+// Directory Entries
+
+ IMAGE_DIRECTORY_ENTRY_EXPORT = 0; // Export Directory
+ {$EXTERNALSYM IMAGE_DIRECTORY_ENTRY_EXPORT}
+ IMAGE_DIRECTORY_ENTRY_IMPORT = 1; // Import Directory
+ {$EXTERNALSYM IMAGE_DIRECTORY_ENTRY_IMPORT}
+ IMAGE_DIRECTORY_ENTRY_RESOURCE = 2; // Resource Directory
+ {$EXTERNALSYM IMAGE_DIRECTORY_ENTRY_RESOURCE}
+ IMAGE_DIRECTORY_ENTRY_EXCEPTION = 3; // Exception Directory
+ {$EXTERNALSYM IMAGE_DIRECTORY_ENTRY_EXCEPTION}
+ IMAGE_DIRECTORY_ENTRY_SECURITY = 4; // Security Directory
+ {$EXTERNALSYM IMAGE_DIRECTORY_ENTRY_SECURITY}
+ IMAGE_DIRECTORY_ENTRY_BASERELOC = 5; // Base Relocation Table
+ {$EXTERNALSYM IMAGE_DIRECTORY_ENTRY_BASERELOC}
+ IMAGE_DIRECTORY_ENTRY_DEBUG = 6; // Debug Directory
+ {$EXTERNALSYM IMAGE_DIRECTORY_ENTRY_DEBUG}
+
+// IMAGE_DIRECTORY_ENTRY_COPYRIGHT 7 // (X86 usage)
+
+ IMAGE_DIRECTORY_ENTRY_ARCHITECTURE = 7; // Architecture Specific Data
+ {$EXTERNALSYM IMAGE_DIRECTORY_ENTRY_ARCHITECTURE}
+ IMAGE_DIRECTORY_ENTRY_GLOBALPTR = 8; // RVA of GP
+ {$EXTERNALSYM IMAGE_DIRECTORY_ENTRY_GLOBALPTR}
+ IMAGE_DIRECTORY_ENTRY_TLS = 9; // TLS Directory
+ {$EXTERNALSYM IMAGE_DIRECTORY_ENTRY_TLS}
+ IMAGE_DIRECTORY_ENTRY_LOAD_CONFIG = 10; // Load Configuration Directory
+ {$EXTERNALSYM IMAGE_DIRECTORY_ENTRY_LOAD_CONFIG}
+ IMAGE_DIRECTORY_ENTRY_BOUND_IMPORT = 11; // Bound Import Directory in headers
+ {$EXTERNALSYM IMAGE_DIRECTORY_ENTRY_BOUND_IMPORT}
+ IMAGE_DIRECTORY_ENTRY_IAT = 12; // Import Address Table
+ {$EXTERNALSYM IMAGE_DIRECTORY_ENTRY_IAT}
+ IMAGE_DIRECTORY_ENTRY_DELAY_IMPORT = 13; // Delay Load Import Descriptors
+ {$EXTERNALSYM IMAGE_DIRECTORY_ENTRY_DELAY_IMPORT}
+ IMAGE_DIRECTORY_ENTRY_COM_DESCRIPTOR = 14; // COM Runtime descriptor
+ {$EXTERNALSYM IMAGE_DIRECTORY_ENTRY_COM_DESCRIPTOR}
+
+//
+// Non-COFF Object file header
+//
+
+type
+ PAnonObjectHeader = ^ANON_OBJECT_HEADER;
+ ANON_OBJECT_HEADER = record
+ Sig1: Word; // Must be IMAGE_FILE_MACHINE_UNKNOWN
+ Sig2: Word; // Must be 0xffff
+ Version: Word; // >= 1 (implies the CLSID field is present)
+ Machine: Word;
+ TimeDateStamp: DWORD;
+ ClassID: CLSID; // Used to invoke CoCreateInstance
+ SizeOfData: DWORD; // Size of data that follows the header
+ end;
+ {$EXTERNALSYM ANON_OBJECT_HEADER}
+ TAnonObjectHeader = ANON_OBJECT_HEADER;
+
+//
+// Section header format.
+//
+
+const
+ IMAGE_SIZEOF_SHORT_NAME = 8;
+ {$EXTERNALSYM IMAGE_SIZEOF_SHORT_NAME}
+
+type
+ TImgSecHdrMisc = record
+ case Integer of
+ 0: (PhysicalAddress: DWORD);
+ 1: (VirtualSize: DWORD);
+ end;
+
+ PIMAGE_SECTION_HEADER = ^IMAGE_SECTION_HEADER;
+ {$EXTERNALSYM PIMAGE_SECTION_HEADER}
+ _IMAGE_SECTION_HEADER = record
+ Name: array [0..IMAGE_SIZEOF_SHORT_NAME - 1] of BYTE;
+ Misc: TImgSecHdrMisc;
+ VirtualAddress: DWORD;
+ SizeOfRawData: DWORD;
+ PointerToRawData: DWORD;
+ PointerToRelocations: DWORD;
+ PointerToLinenumbers: DWORD;
+ NumberOfRelocations: WORD;
+ NumberOfLinenumbers: WORD;
+ Characteristics: DWORD;
+ end;
+ {$EXTERNALSYM _IMAGE_SECTION_HEADER}
+ IMAGE_SECTION_HEADER = _IMAGE_SECTION_HEADER;
+ {$EXTERNALSYM IMAGE_SECTION_HEADER}
+ TImageSectionHeader = IMAGE_SECTION_HEADER;
+ PImageSectionHeader = PIMAGE_SECTION_HEADER;
+
+// IMAGE_FIRST_SECTION doesn't need 32/64 versions since the file header is the same either way.
+
+function IMAGE_FIRST_SECTION(NtHeader: PImageNtHeaders): PImageSectionHeader;
+{$EXTERNALSYM IMAGE_FIRST_SECTION}
+
+const
+ IMAGE_SIZEOF_SECTION_HEADER = 40;
+ {$EXTERNALSYM IMAGE_SIZEOF_SECTION_HEADER}
+
+//
+// Section characteristics.
+//
+// IMAGE_SCN_TYPE_REG 0x00000000 // Reserved.
+// IMAGE_SCN_TYPE_DSECT 0x00000001 // Reserved.
+// IMAGE_SCN_TYPE_NOLOAD 0x00000002 // Reserved.
+// IMAGE_SCN_TYPE_GROUP 0x00000004 // Reserved.
+
+ IMAGE_SCN_TYPE_NO_PAD = $00000008; // Reserved.
+ {$EXTERNALSYM IMAGE_SCN_TYPE_NO_PAD}
+
+// IMAGE_SCN_TYPE_COPY 0x00000010 // Reserved.
+
+ IMAGE_SCN_CNT_CODE = $00000020; // Section contains code.
+ {$EXTERNALSYM IMAGE_SCN_CNT_CODE}
+ IMAGE_SCN_CNT_INITIALIZED_DATA = $00000040; // Section contains initialized data.
+ {$EXTERNALSYM IMAGE_SCN_CNT_INITIALIZED_DATA}
+ IMAGE_SCN_CNT_UNINITIALIZED_DATA = $00000080; // Section contains uninitialized data.
+ {$EXTERNALSYM IMAGE_SCN_CNT_UNINITIALIZED_DATA}
+
+ IMAGE_SCN_LNK_OTHER = $00000100; // Reserved.
+ {$EXTERNALSYM IMAGE_SCN_LNK_OTHER}
+ IMAGE_SCN_LNK_INFO = $00000200; // Section contains comments or some other type of information.
+ {$EXTERNALSYM IMAGE_SCN_LNK_INFO}
+
+// IMAGE_SCN_TYPE_OVER 0x00000400 // Reserved.
+
+ IMAGE_SCN_LNK_REMOVE = $00000800; // Section contents will not become part of image.
+ {$EXTERNALSYM IMAGE_SCN_LNK_REMOVE}
+ IMAGE_SCN_LNK_COMDAT = $00001000; // Section contents comdat.
+ {$EXTERNALSYM IMAGE_SCN_LNK_COMDAT}
+
+// 0x00002000 // Reserved.
+// IMAGE_SCN_MEM_PROTECTED - Obsolete 0x00004000
+
+ IMAGE_SCN_NO_DEFER_SPEC_EXC = $00004000; // Reset speculative exceptions handling bits in the TLB entries for this section.
+ {$EXTERNALSYM IMAGE_SCN_NO_DEFER_SPEC_EXC}
+ IMAGE_SCN_GPREL = $00008000; // Section content can be accessed relative to GP
+ {$EXTERNALSYM IMAGE_SCN_GPREL}
+ IMAGE_SCN_MEM_FARDATA = $00008000;
+ {$EXTERNALSYM IMAGE_SCN_MEM_FARDATA}
+
+// IMAGE_SCN_MEM_SYSHEAP - Obsolete 0x00010000
+
+ IMAGE_SCN_MEM_PURGEABLE = $00020000;
+ {$EXTERNALSYM IMAGE_SCN_MEM_PURGEABLE}
+ IMAGE_SCN_MEM_16BIT = $00020000;
+ {$EXTERNALSYM IMAGE_SCN_MEM_16BIT}
+ IMAGE_SCN_MEM_LOCKED = $00040000;
+ {$EXTERNALSYM IMAGE_SCN_MEM_LOCKED}
+ IMAGE_SCN_MEM_PRELOAD = $00080000;
+ {$EXTERNALSYM IMAGE_SCN_MEM_PRELOAD}
+
+ IMAGE_SCN_ALIGN_1BYTES = $00100000;
+ {$EXTERNALSYM IMAGE_SCN_ALIGN_1BYTES}
+ IMAGE_SCN_ALIGN_2BYTES = $00200000;
+ {$EXTERNALSYM IMAGE_SCN_ALIGN_2BYTES}
+ IMAGE_SCN_ALIGN_4BYTES = $00300000;
+ {$EXTERNALSYM IMAGE_SCN_ALIGN_4BYTES}
+ IMAGE_SCN_ALIGN_8BYTES = $00400000;
+ {$EXTERNALSYM IMAGE_SCN_ALIGN_8BYTES}
+ IMAGE_SCN_ALIGN_16BYTES = $00500000; // Default alignment if no others are specified.
+ {$EXTERNALSYM IMAGE_SCN_ALIGN_16BYTES}
+ IMAGE_SCN_ALIGN_32BYTES = $00600000;
+ {$EXTERNALSYM IMAGE_SCN_ALIGN_32BYTES}
+ IMAGE_SCN_ALIGN_64BYTES = $00700000;
+ {$EXTERNALSYM IMAGE_SCN_ALIGN_64BYTES}
+ IMAGE_SCN_ALIGN_128BYTES = $00800000;
+ {$EXTERNALSYM IMAGE_SCN_ALIGN_128BYTES}
+ IMAGE_SCN_ALIGN_256BYTES = $00900000;
+ {$EXTERNALSYM IMAGE_SCN_ALIGN_256BYTES}
+ IMAGE_SCN_ALIGN_512BYTES = $00A00000;
+ {$EXTERNALSYM IMAGE_SCN_ALIGN_512BYTES}
+ IMAGE_SCN_ALIGN_1024BYTES = $00B00000;
+ {$EXTERNALSYM IMAGE_SCN_ALIGN_1024BYTES}
+ IMAGE_SCN_ALIGN_2048BYTES = $00C00000;
+ {$EXTERNALSYM IMAGE_SCN_ALIGN_2048BYTES}
+ IMAGE_SCN_ALIGN_4096BYTES = $00D00000;
+ {$EXTERNALSYM IMAGE_SCN_ALIGN_4096BYTES}
+ IMAGE_SCN_ALIGN_8192BYTES = $00E00000;
+ {$EXTERNALSYM IMAGE_SCN_ALIGN_8192BYTES}
+
+// Unused 0x00F00000
+
+ IMAGE_SCN_ALIGN_MASK = $00F00000;
+ {$EXTERNALSYM IMAGE_SCN_ALIGN_MASK}
+
+ IMAGE_SCN_LNK_NRELOC_OVFL = $01000000; // Section contains extended relocations.
+ {$EXTERNALSYM IMAGE_SCN_LNK_NRELOC_OVFL}
+ IMAGE_SCN_MEM_DISCARDABLE = $02000000; // Section can be discarded.
+ {$EXTERNALSYM IMAGE_SCN_MEM_DISCARDABLE}
+ IMAGE_SCN_MEM_NOT_CACHED = $04000000; // Section is not cachable.
+ {$EXTERNALSYM IMAGE_SCN_MEM_NOT_CACHED}
+ IMAGE_SCN_MEM_NOT_PAGED = $08000000; // Section is not pageable.
+ {$EXTERNALSYM IMAGE_SCN_MEM_NOT_PAGED}
+ IMAGE_SCN_MEM_SHARED = $10000000; // Section is shareable.
+ {$EXTERNALSYM IMAGE_SCN_MEM_SHARED}
+ IMAGE_SCN_MEM_EXECUTE = $20000000; // Section is executable.
+ {$EXTERNALSYM IMAGE_SCN_MEM_EXECUTE}
+ IMAGE_SCN_MEM_READ = $40000000; // Section is readable.
+ {$EXTERNALSYM IMAGE_SCN_MEM_READ}
+ IMAGE_SCN_MEM_WRITE = DWORD($80000000); // Section is writeable.
+ {$EXTERNALSYM IMAGE_SCN_MEM_WRITE}
+
+//
+// TLS Chaacteristic Flags
+//
+
+ IMAGE_SCN_SCALE_INDEX = $00000001; // Tls index is scaled
+ {$EXTERNALSYM IMAGE_SCN_SCALE_INDEX}
+
+// #include "pshpack2.h" // Symbols, relocs, and linenumbers are 2 byte packed
+
+//
+// Symbol format.
+//
+
+type
+ TImageSymbolN = record
+ case Integer of
+ 0: (
+ ShortName: array [0..7] of BYTE);
+ 1: (
+ Short: DWORD; // if 0, use LongName
+ Long: DWORD); // offset into string table
+ 2: (
+ LongName: array [0..1] of DWORD);
+ end;
+
+ PIMAGE_SYMBOL = ^IMAGE_SYMBOL;
+ {$EXTERNALSYM PIMAGE_SYMBOL}
+ _IMAGE_SYMBOL = record
+ N: TImageSymbolN;
+ Value: DWORD;
+ SectionNumber: SHORT;
+ Type_: WORD;
+ StorageClass: BYTE;
+ NumberOfAuxSymbols: BYTE;
+ end;
+ {$EXTERNALSYM _IMAGE_SYMBOL}
+ IMAGE_SYMBOL = _IMAGE_SYMBOL;
+ {$EXTERNALSYM IMAGE_SYMBOL}
+ TImageSymbol = IMAGE_SYMBOL;
+ PImageSymbol = PIMAGE_SYMBOL;
+
+const
+ IMAGE_SIZEOF_SYMBOL = 18;
+ {$EXTERNALSYM IMAGE_SIZEOF_SYMBOL}
+
+//
+// Section values.
+//
+// Symbols have a section number of the section in which they are
+// defined. Otherwise, section numbers have the following meanings:
+//
+
+ IMAGE_SYM_UNDEFINED = SHORT(0); // Symbol is undefined or is common.
+ {$EXTERNALSYM IMAGE_SYM_UNDEFINED}
+ IMAGE_SYM_ABSOLUTE = SHORT(-1); // Symbol is an absolute value.
+ {$EXTERNALSYM IMAGE_SYM_ABSOLUTE}
+ IMAGE_SYM_DEBUG = SHORT(-2); // Symbol is a special debug item.
+ {$EXTERNALSYM IMAGE_SYM_DEBUG}
+ IMAGE_SYM_SECTION_MAX = SHORT($FEFF ); // Values 0xFF00-0xFFFF are special
+ {$EXTERNALSYM IMAGE_SYM_SECTION_MAX}
+
+//
+// Type (fundamental) values.
+//
+
+ IMAGE_SYM_TYPE_NULL = $0000; // no type.
+ {$EXTERNALSYM IMAGE_SYM_TYPE_NULL}
+ IMAGE_SYM_TYPE_VOID = $0001;
+ {$EXTERNALSYM IMAGE_SYM_TYPE_VOID}
+ IMAGE_SYM_TYPE_CHAR = $0002; // type character.
+ {$EXTERNALSYM IMAGE_SYM_TYPE_CHAR}
+ IMAGE_SYM_TYPE_SHORT = $0003; // type short integer.
+ {$EXTERNALSYM IMAGE_SYM_TYPE_SHORT}
+ IMAGE_SYM_TYPE_INT = $0004;
+ {$EXTERNALSYM IMAGE_SYM_TYPE_INT}
+ IMAGE_SYM_TYPE_LONG = $0005;
+ {$EXTERNALSYM IMAGE_SYM_TYPE_LONG}
+ IMAGE_SYM_TYPE_FLOAT = $0006;
+ {$EXTERNALSYM IMAGE_SYM_TYPE_FLOAT}
+ IMAGE_SYM_TYPE_DOUBLE = $0007;
+ {$EXTERNALSYM IMAGE_SYM_TYPE_DOUBLE}
+ IMAGE_SYM_TYPE_STRUCT = $0008;
+ {$EXTERNALSYM IMAGE_SYM_TYPE_STRUCT}
+ IMAGE_SYM_TYPE_UNION = $0009;
+ {$EXTERNALSYM IMAGE_SYM_TYPE_UNION}
+ IMAGE_SYM_TYPE_ENUM = $000A; // enumeration.
+ {$EXTERNALSYM IMAGE_SYM_TYPE_ENUM}
+ IMAGE_SYM_TYPE_MOE = $000B; // member of enumeration.
+ {$EXTERNALSYM IMAGE_SYM_TYPE_MOE}
+ IMAGE_SYM_TYPE_BYTE = $000C;
+ {$EXTERNALSYM IMAGE_SYM_TYPE_BYTE}
+ IMAGE_SYM_TYPE_WORD = $000D;
+ {$EXTERNALSYM IMAGE_SYM_TYPE_WORD}
+ IMAGE_SYM_TYPE_UINT = $000E;
+ {$EXTERNALSYM IMAGE_SYM_TYPE_UINT}
+ IMAGE_SYM_TYPE_DWORD = $000F;
+ {$EXTERNALSYM IMAGE_SYM_TYPE_DWORD}
+ IMAGE_SYM_TYPE_PCODE = $8000;
+ {$EXTERNALSYM IMAGE_SYM_TYPE_PCODE}
+
+//
+// Type (derived) values.
+//
+
+ IMAGE_SYM_DTYPE_NULL = 0; // no derived type.
+ {$EXTERNALSYM IMAGE_SYM_DTYPE_NULL}
+ IMAGE_SYM_DTYPE_POINTER = 1; // pointer.
+ {$EXTERNALSYM IMAGE_SYM_DTYPE_POINTER}
+ IMAGE_SYM_DTYPE_FUNCTION = 2; // function.
+ {$EXTERNALSYM IMAGE_SYM_DTYPE_FUNCTION}
+ IMAGE_SYM_DTYPE_ARRAY = 3; // array.
+ {$EXTERNALSYM IMAGE_SYM_DTYPE_ARRAY}
+
+//
+// Storage classes.
+//
+
+ IMAGE_SYM_CLASS_END_OF_FUNCTION = BYTE(-1);
+ {$EXTERNALSYM IMAGE_SYM_CLASS_END_OF_FUNCTION}
+ IMAGE_SYM_CLASS_NULL = $0000;
+ {$EXTERNALSYM IMAGE_SYM_CLASS_NULL}
+ IMAGE_SYM_CLASS_AUTOMATIC = $0001;
+ {$EXTERNALSYM IMAGE_SYM_CLASS_AUTOMATIC}
+ IMAGE_SYM_CLASS_EXTERNAL = $0002;
+ {$EXTERNALSYM IMAGE_SYM_CLASS_EXTERNAL}
+ IMAGE_SYM_CLASS_STATIC = $0003;
+ {$EXTERNALSYM IMAGE_SYM_CLASS_STATIC}
+ IMAGE_SYM_CLASS_REGISTER = $0004;
+ {$EXTERNALSYM IMAGE_SYM_CLASS_REGISTER}
+ IMAGE_SYM_CLASS_EXTERNAL_DEF = $0005;
+ {$EXTERNALSYM IMAGE_SYM_CLASS_EXTERNAL_DEF}
+ IMAGE_SYM_CLASS_LABEL = $0006;
+ {$EXTERNALSYM IMAGE_SYM_CLASS_LABEL}
+ IMAGE_SYM_CLASS_UNDEFINED_LABEL = $0007;
+ {$EXTERNALSYM IMAGE_SYM_CLASS_UNDEFINED_LABEL}
+ IMAGE_SYM_CLASS_MEMBER_OF_STRUCT = $0008;
+ {$EXTERNALSYM IMAGE_SYM_CLASS_MEMBER_OF_STRUCT}
+ IMAGE_SYM_CLASS_ARGUMENT = $0009;
+ {$EXTERNALSYM IMAGE_SYM_CLASS_ARGUMENT}
+ IMAGE_SYM_CLASS_STRUCT_TAG = $000A;
+ {$EXTERNALSYM IMAGE_SYM_CLASS_STRUCT_TAG}
+ IMAGE_SYM_CLASS_MEMBER_OF_UNION = $000B;
+ {$EXTERNALSYM IMAGE_SYM_CLASS_MEMBER_OF_UNION}
+ IMAGE_SYM_CLASS_UNION_TAG = $000C;
+ {$EXTERNALSYM IMAGE_SYM_CLASS_UNION_TAG}
+ IMAGE_SYM_CLASS_TYPE_DEFINITION = $000D;
+ {$EXTERNALSYM IMAGE_SYM_CLASS_TYPE_DEFINITION}
+ IMAGE_SYM_CLASS_UNDEFINED_STATIC = $000E;
+ {$EXTERNALSYM IMAGE_SYM_CLASS_UNDEFINED_STATIC}
+ IMAGE_SYM_CLASS_ENUM_TAG = $000F;
+ {$EXTERNALSYM IMAGE_SYM_CLASS_ENUM_TAG}
+ IMAGE_SYM_CLASS_MEMBER_OF_ENUM = $0010;
+ {$EXTERNALSYM IMAGE_SYM_CLASS_MEMBER_OF_ENUM}
+ IMAGE_SYM_CLASS_REGISTER_PARAM = $0011;
+ {$EXTERNALSYM IMAGE_SYM_CLASS_REGISTER_PARAM}
+ IMAGE_SYM_CLASS_BIT_FIELD = $0012;
+ {$EXTERNALSYM IMAGE_SYM_CLASS_BIT_FIELD}
+
+ IMAGE_SYM_CLASS_FAR_EXTERNAL = $0044;
+ {$EXTERNALSYM IMAGE_SYM_CLASS_FAR_EXTERNAL}
+
+ IMAGE_SYM_CLASS_BLOCK = $0064;
+ {$EXTERNALSYM IMAGE_SYM_CLASS_BLOCK}
+ IMAGE_SYM_CLASS_FUNCTION = $0065;
+ {$EXTERNALSYM IMAGE_SYM_CLASS_FUNCTION}
+ IMAGE_SYM_CLASS_END_OF_STRUCT = $0066;
+ {$EXTERNALSYM IMAGE_SYM_CLASS_END_OF_STRUCT}
+ IMAGE_SYM_CLASS_FILE = $0067;
+ {$EXTERNALSYM IMAGE_SYM_CLASS_FILE}
+
+// new
+
+ IMAGE_SYM_CLASS_SECTION = $0068;
+ {$EXTERNALSYM IMAGE_SYM_CLASS_SECTION}
+ IMAGE_SYM_CLASS_WEAK_EXTERNAL = $0069;
+ {$EXTERNALSYM IMAGE_SYM_CLASS_WEAK_EXTERNAL}
+
+ IMAGE_SYM_CLASS_CLR_TOKEN = $006B;
+ {$EXTERNALSYM IMAGE_SYM_CLASS_CLR_TOKEN}
+
+// type packing constants
+
+ N_BTMASK = $000F;
+ {$EXTERNALSYM N_BTMASK}
+ N_TMASK = $0030;
+ {$EXTERNALSYM N_TMASK}
+ N_TMASK1 = $00C0;
+ {$EXTERNALSYM N_TMASK1}
+ N_TMASK2 = $00F0;
+ {$EXTERNALSYM N_TMASK2}
+ N_BTSHFT = 4;
+ {$EXTERNALSYM N_BTSHFT}
+ N_TSHIFT = 2;
+ {$EXTERNALSYM N_TSHIFT}
+
+// MACROS
+
+// Basic Type of x
+
+function BTYPE(x: DWORD): DWORD;
+{$EXTERNALSYM BTYPE}
+
+// Is x a pointer?
+
+function ISPTR(x: DWORD): Boolean;
+{$EXTERNALSYM ISPTR}
+
+// Is x a function?
+
+function ISFCN(x: DWORD): Boolean;
+{$EXTERNALSYM ISFCN}
+
+// Is x an array?
+
+function ISARY(x: DWORD): Boolean;
+{$EXTERNALSYM ISARY}
+
+// Is x a structure, union, or enumeration TAG?
+
+function ISTAG(x: DWORD): Boolean;
+{$EXTERNALSYM ISTAG}
+
+//
+// Auxiliary entry format.
+//
+
+type
+ TImgAuzSymSymMisc = record
+ case Integer of
+ 0: (
+ Linenumber: WORD; // declaration line number
+ Size: WORD); // size of struct, union, or enum
+ 1: (
+ TotalSize: DWORD);
+ end;
+
+ TImgAuzSymSymFcnAry = record
+ case Integer of
+ 0: ( // if ISFCN, tag, or .bb
+ PointerToLinenumber: DWORD;
+ PointerToNextFunction: DWORD);
+ 1: ( // if ISARY, up to 4 dimen.
+ Dimension: array [0..3] of WORD);
+ end;
+
+ TImgAuxSymSym = record
+ TagIndex: DWORD; // struct, union, or enum tag index
+ Misc: TImgAuzSymSymMisc;
+ FcnAry: TImgAuzSymSymFcnAry;
+ TvIndex: WORD; // tv index
+ end;
+
+ TImgAuxSymFile = record
+ Name: array [0..IMAGE_SIZEOF_SYMBOL - 1] of BYTE;
+ end;
+
+ TImgAuxSymSection = record
+ Length: DWORD; // section length
+ NumberOfRelocations: WORD; // number of relocation entries
+ NumberOfLinenumbers: WORD; // number of line numbers
+ CheckSum: DWORD; // checksum for communal
+ Number: SHORT; // section number to associate with
+ Selection: BYTE; // communal selection type
+ end;
+
+ PIMAGE_AUX_SYMBOL = ^IMAGE_AUX_SYMBOL;
+ {$EXTERNALSYM PIMAGE_AUX_SYMBOL}
+ _IMAGE_AUX_SYMBOL = record
+ case Integer of
+ 0: (Sym: TImgAuxSymSym);
+ 1: (File_: TImgAuxSymFile);
+ 2: (Section: TImgAuxSymSection);
+ end;
+ {$EXTERNALSYM _IMAGE_AUX_SYMBOL}
+ IMAGE_AUX_SYMBOL = _IMAGE_AUX_SYMBOL;
+ {$EXTERNALSYM IMAGE_AUX_SYMBOL}
+ TImageAuxSymbol = IMAGE_AUX_SYMBOL;
+ PImageAuxSymbol = PIMAGE_AUX_SYMBOL;
+
+const
+ IMAGE_SIZEOF_AUX_SYMBOL = 18;
+ {$EXTERNALSYM IMAGE_SIZEOF_AUX_SYMBOL}
+
+ IMAGE_AUX_SYMBOL_TYPE_TOKEN_DEF = 1;
+ {$EXTERNALSYM IMAGE_AUX_SYMBOL_TYPE_TOKEN_DEF}
+
+type
+ IMAGE_AUX_SYMBOL_TYPE = DWORD;
+ {$EXTERNALSYM IMAGE_AUX_SYMBOL_TYPE}
+ TImageAuxSymbolType = IMAGE_AUX_SYMBOL_TYPE;
+
+ IMAGE_AUX_SYMBOL_TOKEN_DEF = packed record
+ bAuxType: BYTE; // IMAGE_AUX_SYMBOL_TYPE
+ bReserved: BYTE; // Must be 0
+ SymbolTableIndex: DWORD;
+ rgbReserved: array [0..11] of BYTE; // Must be 0
+ end;
+ {$EXTERNALSYM IMAGE_AUX_SYMBOL_TOKEN_DEF}
+ PIMAGE_AUX_SYMBOL_TOKEN_DEF = ^IMAGE_AUX_SYMBOL_TOKEN_DEF;
+ {$EXTERNALSYM PIMAGE_AUX_SYMBOL_TOKEN_DEF}
+ TImageAuxSymbolTokenDef = IMAGE_AUX_SYMBOL_TOKEN_DEF;
+ PImageAuxSymbolTokenDef = PIMAGE_AUX_SYMBOL_TOKEN_DEF;
+
+//
+// Communal selection types.
+//
+
+const
+ IMAGE_COMDAT_SELECT_NODUPLICATES = 1;
+ {$EXTERNALSYM IMAGE_COMDAT_SELECT_NODUPLICATES}
+ IMAGE_COMDAT_SELECT_ANY = 2;
+ {$EXTERNALSYM IMAGE_COMDAT_SELECT_ANY}
+ IMAGE_COMDAT_SELECT_SAME_SIZE = 3;
+ {$EXTERNALSYM IMAGE_COMDAT_SELECT_SAME_SIZE}
+ IMAGE_COMDAT_SELECT_EXACT_MATCH = 4;
+ {$EXTERNALSYM IMAGE_COMDAT_SELECT_EXACT_MATCH}
+ IMAGE_COMDAT_SELECT_ASSOCIATIVE = 5;
+ {$EXTERNALSYM IMAGE_COMDAT_SELECT_ASSOCIATIVE}
+ IMAGE_COMDAT_SELECT_LARGEST = 6;
+ {$EXTERNALSYM IMAGE_COMDAT_SELECT_LARGEST}
+ IMAGE_COMDAT_SELECT_NEWEST = 7;
+ {$EXTERNALSYM IMAGE_COMDAT_SELECT_NEWEST}
+
+ IMAGE_WEAK_EXTERN_SEARCH_NOLIBRARY = 1;
+ {$EXTERNALSYM IMAGE_WEAK_EXTERN_SEARCH_NOLIBRARY}
+ IMAGE_WEAK_EXTERN_SEARCH_LIBRARY = 2;
+ {$EXTERNALSYM IMAGE_WEAK_EXTERN_SEARCH_LIBRARY}
+ IMAGE_WEAK_EXTERN_SEARCH_ALIAS = 3;
+ {$EXTERNALSYM IMAGE_WEAK_EXTERN_SEARCH_ALIAS}
+
+//
+// Relocation format.
+//
+
+type
+ TImgRelocUnion = record
+ case Integer of
+ 0: (VirtualAddress: DWORD);
+ 1: (RelocCount: DWORD); // Set to the real count when IMAGE_SCN_LNK_NRELOC_OVFL is set
+ end;
+
+ PIMAGE_RELOCATION = ^IMAGE_RELOCATION;
+ {$EXTERNALSYM PIMAGE_RELOCATION}
+ _IMAGE_RELOCATION = record
+ Union: TImgRelocUnion;
+ SymbolTableIndex: DWORD;
+ Type_: WORD;
+ end;
+ {$EXTERNALSYM _IMAGE_RELOCATION}
+ IMAGE_RELOCATION = _IMAGE_RELOCATION;
+ {$EXTERNALSYM IMAGE_RELOCATION}
+ TImageRelocation = IMAGE_RELOCATION;
+ PImageRelocation = PIMAGE_RELOCATION;
+
+const
+ IMAGE_SIZEOF_RELOCATION = 10;
+ {$EXTERNALSYM IMAGE_SIZEOF_RELOCATION}
+
+//
+// I386 relocation types.
+//
+
+ IMAGE_REL_I386_ABSOLUTE = $0000; // Reference is absolute, no relocation is necessary
+ {$EXTERNALSYM IMAGE_REL_I386_ABSOLUTE}
+ IMAGE_REL_I386_DIR16 = $0001; // Direct 16-bit reference to the symbols virtual address
+ {$EXTERNALSYM IMAGE_REL_I386_DIR16}
+ IMAGE_REL_I386_REL16 = $0002; // PC-relative 16-bit reference to the symbols virtual address
+ {$EXTERNALSYM IMAGE_REL_I386_REL16}
+ IMAGE_REL_I386_DIR32 = $0006; // Direct 32-bit reference to the symbols virtual address
+ {$EXTERNALSYM IMAGE_REL_I386_DIR32}
+ IMAGE_REL_I386_DIR32NB = $0007; // Direct 32-bit reference to the symbols virtual address, base not included
+ {$EXTERNALSYM IMAGE_REL_I386_DIR32NB}
+ IMAGE_REL_I386_SEG12 = $0009; // Direct 16-bit reference to the segment-selector bits of a 32-bit virtual address
+ {$EXTERNALSYM IMAGE_REL_I386_SEG12}
+ IMAGE_REL_I386_SECTION = $000A;
+ {$EXTERNALSYM IMAGE_REL_I386_SECTION}
+ IMAGE_REL_I386_SECREL = $000B;
+ {$EXTERNALSYM IMAGE_REL_I386_SECREL}
+ IMAGE_REL_MIPS_SECRELLO = $000C; // Low 16-bit section relative referemce (used for >32k TLS)
+ {$EXTERNALSYM IMAGE_REL_MIPS_SECRELLO}
+ IMAGE_REL_MIPS_SECRELHI = $000D; // High 16-bit section relative reference (used for >32k TLS)
+ {$EXTERNALSYM IMAGE_REL_MIPS_SECRELHI}
+ IMAGE_REL_I386_REL32 = $0014; // PC-relative 32-bit reference to the symbols virtual address
+ {$EXTERNALSYM IMAGE_REL_I386_REL32}
+
+//
+// MIPS relocation types.
+//
+
+ IMAGE_REL_MIPS_ABSOLUTE = $0000; // Reference is absolute, no relocation is necessary
+ {$EXTERNALSYM IMAGE_REL_MIPS_ABSOLUTE}
+ IMAGE_REL_MIPS_REFHALF = $0001;
+ {$EXTERNALSYM IMAGE_REL_MIPS_REFHALF}
+ IMAGE_REL_MIPS_REFWORD = $0002;
+ {$EXTERNALSYM IMAGE_REL_MIPS_REFWORD}
+ IMAGE_REL_MIPS_JMPADDR = $0003;
+ {$EXTERNALSYM IMAGE_REL_MIPS_JMPADDR}
+ IMAGE_REL_MIPS_REFHI = $0004;
+ {$EXTERNALSYM IMAGE_REL_MIPS_REFHI}
+ IMAGE_REL_MIPS_REFLO = $0005;
+ {$EXTERNALSYM IMAGE_REL_MIPS_REFLO}
+ IMAGE_REL_MIPS_GPREL = $0006;
+ {$EXTERNALSYM IMAGE_REL_MIPS_GPREL}
+ IMAGE_REL_MIPS_LITERAL = $0007;
+ {$EXTERNALSYM IMAGE_REL_MIPS_LITERAL}
+ IMAGE_REL_MIPS_SECTION = $000A;
+ {$EXTERNALSYM IMAGE_REL_MIPS_SECTION}
+ IMAGE_REL_MIPS_SECREL = $000B;
+ {$EXTERNALSYM IMAGE_REL_MIPS_SECREL}
+ //IMAGE_REL_MIPS_SECRELLO = $000C; // Low 16-bit section relative referemce (used for >32k TLS)
+ //{$EXTERNALSYM IMAGE_REL_MIPS_SECRELLO}
+ //IMAGE_REL_MIPS_SECRELHI = $000D; // High 16-bit section relative reference (used for >32k TLS)
+ //{$EXTERNALSYM IMAGE_REL_MIPS_SECRELHI}
+ IMAGE_REL_MIPS_TOKEN = $000E; // clr token
+ {$EXTERNALSYM IMAGE_REL_MIPS_TOKEN}
+ IMAGE_REL_MIPS_JMPADDR16 = $0010;
+ {$EXTERNALSYM IMAGE_REL_MIPS_JMPADDR16}
+ IMAGE_REL_MIPS_REFWORDNB = $0022;
+ {$EXTERNALSYM IMAGE_REL_MIPS_REFWORDNB}
+ IMAGE_REL_MIPS_PAIR = $0025;
+ {$EXTERNALSYM IMAGE_REL_MIPS_PAIR}
+
+//
+// Alpha Relocation types.
+//
+
+ IMAGE_REL_ALPHA_ABSOLUTE = $0000;
+ {$EXTERNALSYM IMAGE_REL_ALPHA_ABSOLUTE}
+ IMAGE_REL_ALPHA_REFLONG = $0001;
+ {$EXTERNALSYM IMAGE_REL_ALPHA_REFLONG}
+ IMAGE_REL_ALPHA_REFQUAD = $0002;
+ {$EXTERNALSYM IMAGE_REL_ALPHA_REFQUAD}
+ IMAGE_REL_ALPHA_GPREL32 = $0003;
+ {$EXTERNALSYM IMAGE_REL_ALPHA_GPREL32}
+ IMAGE_REL_ALPHA_LITERAL = $0004;
+ {$EXTERNALSYM IMAGE_REL_ALPHA_LITERAL}
+ IMAGE_REL_ALPHA_LITUSE = $0005;
+ {$EXTERNALSYM IMAGE_REL_ALPHA_LITUSE}
+ IMAGE_REL_ALPHA_GPDISP = $0006;
+ {$EXTERNALSYM IMAGE_REL_ALPHA_GPDISP}
+ IMAGE_REL_ALPHA_BRADDR = $0007;
+ {$EXTERNALSYM IMAGE_REL_ALPHA_BRADDR}
+ IMAGE_REL_ALPHA_HINT = $0008;
+ {$EXTERNALSYM IMAGE_REL_ALPHA_HINT}
+ IMAGE_REL_ALPHA_INLINE_REFLONG = $0009;
+ {$EXTERNALSYM IMAGE_REL_ALPHA_INLINE_REFLONG}
+ IMAGE_REL_ALPHA_REFHI = $000A;
+ {$EXTERNALSYM IMAGE_REL_ALPHA_REFHI}
+ IMAGE_REL_ALPHA_REFLO = $000B;
+ {$EXTERNALSYM IMAGE_REL_ALPHA_REFLO}
+ IMAGE_REL_ALPHA_PAIR = $000C;
+ {$EXTERNALSYM IMAGE_REL_ALPHA_PAIR}
+ IMAGE_REL_ALPHA_MATCH = $000D;
+ {$EXTERNALSYM IMAGE_REL_ALPHA_MATCH}
+ IMAGE_REL_ALPHA_SECTION = $000E;
+ {$EXTERNALSYM IMAGE_REL_ALPHA_SECTION}
+ IMAGE_REL_ALPHA_SECREL = $000F;
+ {$EXTERNALSYM IMAGE_REL_ALPHA_SECREL}
+ IMAGE_REL_ALPHA_REFLONGNB = $0010;
+ {$EXTERNALSYM IMAGE_REL_ALPHA_REFLONGNB}
+ IMAGE_REL_ALPHA_SECRELLO = $0011; // Low 16-bit section relative reference
+ {$EXTERNALSYM IMAGE_REL_ALPHA_SECRELLO}
+ IMAGE_REL_ALPHA_SECRELHI = $0012; // High 16-bit section relative reference
+ {$EXTERNALSYM IMAGE_REL_ALPHA_SECRELHI}
+ IMAGE_REL_ALPHA_REFQ3 = $0013; // High 16 bits of 48 bit reference
+ {$EXTERNALSYM IMAGE_REL_ALPHA_REFQ3}
+ IMAGE_REL_ALPHA_REFQ2 = $0014; // Middle 16 bits of 48 bit reference
+ {$EXTERNALSYM IMAGE_REL_ALPHA_REFQ2}
+ IMAGE_REL_ALPHA_REFQ1 = $0015; // Low 16 bits of 48 bit reference
+ {$EXTERNALSYM IMAGE_REL_ALPHA_REFQ1}
+ IMAGE_REL_ALPHA_GPRELLO = $0016; // Low 16-bit GP relative reference
+ {$EXTERNALSYM IMAGE_REL_ALPHA_GPRELLO}
+ IMAGE_REL_ALPHA_GPRELHI = $0017; // High 16-bit GP relative reference
+ {$EXTERNALSYM IMAGE_REL_ALPHA_GPRELHI}
+
+//
+// IBM PowerPC relocation types.
+//
+
+ IMAGE_REL_PPC_ABSOLUTE = $0000; // NOP
+ {$EXTERNALSYM IMAGE_REL_PPC_ABSOLUTE}
+ IMAGE_REL_PPC_ADDR64 = $0001; // 64-bit address
+ {$EXTERNALSYM IMAGE_REL_PPC_ADDR64}
+ IMAGE_REL_PPC_ADDR32 = $0002; // 32-bit address
+ {$EXTERNALSYM IMAGE_REL_PPC_ADDR32}
+ IMAGE_REL_PPC_ADDR24 = $0003; // 26-bit address, shifted left 2 (branch absolute)
+ {$EXTERNALSYM IMAGE_REL_PPC_ADDR24}
+ IMAGE_REL_PPC_ADDR16 = $0004; // 16-bit address
+ {$EXTERNALSYM IMAGE_REL_PPC_ADDR16}
+ IMAGE_REL_PPC_ADDR14 = $0005; // 16-bit address, shifted left 2 (load doubleword)
+ {$EXTERNALSYM IMAGE_REL_PPC_ADDR14}
+ IMAGE_REL_PPC_REL24 = $0006; // 26-bit PC-relative offset, shifted left 2 (branch relative)
+ {$EXTERNALSYM IMAGE_REL_PPC_REL24}
+ IMAGE_REL_PPC_REL14 = $0007; // 16-bit PC-relative offset, shifted left 2 (br cond relative)
+ {$EXTERNALSYM IMAGE_REL_PPC_REL14}
+ IMAGE_REL_PPC_TOCREL16 = $0008; // 16-bit offset from TOC base
+ {$EXTERNALSYM IMAGE_REL_PPC_TOCREL16}
+ IMAGE_REL_PPC_TOCREL14 = $0009; // 16-bit offset from TOC base, shifted left 2 (load doubleword)
+ {$EXTERNALSYM IMAGE_REL_PPC_TOCREL14}
+
+ IMAGE_REL_PPC_ADDR32NB = $000A; // 32-bit addr w/o image base
+ {$EXTERNALSYM IMAGE_REL_PPC_ADDR32NB}
+ IMAGE_REL_PPC_SECREL = $000B; // va of containing section (as in an image sectionhdr)
+ {$EXTERNALSYM IMAGE_REL_PPC_SECREL}
+ IMAGE_REL_PPC_SECTION = $000C; // sectionheader number
+ {$EXTERNALSYM IMAGE_REL_PPC_SECTION}
+ IMAGE_REL_PPC_IFGLUE = $000D; // substitute TOC restore instruction iff symbol is glue code
+ {$EXTERNALSYM IMAGE_REL_PPC_IFGLUE}
+ IMAGE_REL_PPC_IMGLUE = $000E; // symbol is glue code; virtual address is TOC restore instruction
+ {$EXTERNALSYM IMAGE_REL_PPC_IMGLUE}
+ IMAGE_REL_PPC_SECREL16 = $000F; // va of containing section (limited to 16 bits)
+ {$EXTERNALSYM IMAGE_REL_PPC_SECREL16}
+ IMAGE_REL_PPC_REFHI = $0010;
+ {$EXTERNALSYM IMAGE_REL_PPC_REFHI}
+ IMAGE_REL_PPC_REFLO = $0011;
+ {$EXTERNALSYM IMAGE_REL_PPC_REFLO}
+ IMAGE_REL_PPC_PAIR = $0012;
+ {$EXTERNALSYM IMAGE_REL_PPC_PAIR}
+ IMAGE_REL_PPC_SECRELLO = $0013; // Low 16-bit section relative reference (used for >32k TLS)
+ {$EXTERNALSYM IMAGE_REL_PPC_SECRELLO}
+ IMAGE_REL_PPC_SECRELHI = $0014; // High 16-bit section relative reference (used for >32k TLS)
+ {$EXTERNALSYM IMAGE_REL_PPC_SECRELHI}
+ IMAGE_REL_PPC_GPREL = $0015;
+ {$EXTERNALSYM IMAGE_REL_PPC_GPREL}
+ IMAGE_REL_PPC_TOKEN = $0016; // clr token
+ {$EXTERNALSYM IMAGE_REL_PPC_TOKEN}
+
+ IMAGE_REL_PPC_TYPEMASK = $00FF; // mask to isolate above values in IMAGE_RELOCATION.Type
+ {$EXTERNALSYM IMAGE_REL_PPC_TYPEMASK}
+
+// Flag bits in IMAGE_RELOCATION.TYPE
+
+ IMAGE_REL_PPC_NEG = $0100; // subtract reloc value rather than adding it
+ {$EXTERNALSYM IMAGE_REL_PPC_NEG}
+ IMAGE_REL_PPC_BRTAKEN = $0200; // fix branch prediction bit to predict branch taken
+ {$EXTERNALSYM IMAGE_REL_PPC_BRTAKEN}
+ IMAGE_REL_PPC_BRNTAKEN = $0400; // fix branch prediction bit to predict branch not taken
+ {$EXTERNALSYM IMAGE_REL_PPC_BRNTAKEN}
+ IMAGE_REL_PPC_TOCDEFN = $0800; // toc slot defined in file (or, data in toc)
+ {$EXTERNALSYM IMAGE_REL_PPC_TOCDEFN}
+
+//
+// Hitachi SH3 relocation types.
+//
+
+ IMAGE_REL_SH3_ABSOLUTE = $0000; // No relocation
+ {$EXTERNALSYM IMAGE_REL_SH3_ABSOLUTE}
+ IMAGE_REL_SH3_DIRECT16 = $0001; // 16 bit direct
+ {$EXTERNALSYM IMAGE_REL_SH3_DIRECT16}
+ IMAGE_REL_SH3_DIRECT32 = $0002; // 32 bit direct
+ {$EXTERNALSYM IMAGE_REL_SH3_DIRECT32}
+ IMAGE_REL_SH3_DIRECT8 = $0003; // 8 bit direct, -128..255
+ {$EXTERNALSYM IMAGE_REL_SH3_DIRECT8}
+ IMAGE_REL_SH3_DIRECT8_WORD = $0004; // 8 bit direct .W (0 ext.)
+ {$EXTERNALSYM IMAGE_REL_SH3_DIRECT8_WORD}
+ IMAGE_REL_SH3_DIRECT8_LONG = $0005; // 8 bit direct .L (0 ext.)
+ {$EXTERNALSYM IMAGE_REL_SH3_DIRECT8_LONG}
+ IMAGE_REL_SH3_DIRECT4 = $0006; // 4 bit direct (0 ext.)
+ {$EXTERNALSYM IMAGE_REL_SH3_DIRECT4}
+ IMAGE_REL_SH3_DIRECT4_WORD = $0007; // 4 bit direct .W (0 ext.)
+ {$EXTERNALSYM IMAGE_REL_SH3_DIRECT4_WORD}
+ IMAGE_REL_SH3_DIRECT4_LONG = $0008; // 4 bit direct .L (0 ext.)
+ {$EXTERNALSYM IMAGE_REL_SH3_DIRECT4_LONG}
+ IMAGE_REL_SH3_PCREL8_WORD = $0009; // 8 bit PC relative .W
+ {$EXTERNALSYM IMAGE_REL_SH3_PCREL8_WORD}
+ IMAGE_REL_SH3_PCREL8_LONG = $000A; // 8 bit PC relative .L
+ {$EXTERNALSYM IMAGE_REL_SH3_PCREL8_LONG}
+ IMAGE_REL_SH3_PCREL12_WORD = $000B; // 12 LSB PC relative .W
+ {$EXTERNALSYM IMAGE_REL_SH3_PCREL12_WORD}
+ IMAGE_REL_SH3_STARTOF_SECTION = $000C; // Start of EXE section
+ {$EXTERNALSYM IMAGE_REL_SH3_STARTOF_SECTION}
+ IMAGE_REL_SH3_SIZEOF_SECTION = $000D; // Size of EXE section
+ {$EXTERNALSYM IMAGE_REL_SH3_SIZEOF_SECTION}
+ IMAGE_REL_SH3_SECTION = $000E; // Section table index
+ {$EXTERNALSYM IMAGE_REL_SH3_SECTION}
+ IMAGE_REL_SH3_SECREL = $000F; // Offset within section
+ {$EXTERNALSYM IMAGE_REL_SH3_SECREL}
+ IMAGE_REL_SH3_DIRECT32_NB = $0010; // 32 bit direct not based
+ {$EXTERNALSYM IMAGE_REL_SH3_DIRECT32_NB}
+ IMAGE_REL_SH3_GPREL4_LONG = $0011; // GP-relative addressing
+ {$EXTERNALSYM IMAGE_REL_SH3_GPREL4_LONG}
+ IMAGE_REL_SH3_TOKEN = $0012; // clr token
+ {$EXTERNALSYM IMAGE_REL_SH3_TOKEN}
+
+ IMAGE_REL_ARM_ABSOLUTE = $0000; // No relocation required
+ {$EXTERNALSYM IMAGE_REL_ARM_ABSOLUTE}
+ IMAGE_REL_ARM_ADDR32 = $0001; // 32 bit address
+ {$EXTERNALSYM IMAGE_REL_ARM_ADDR32}
+ IMAGE_REL_ARM_ADDR32NB = $0002; // 32 bit address w/o image base
+ {$EXTERNALSYM IMAGE_REL_ARM_ADDR32NB}
+ IMAGE_REL_ARM_BRANCH24 = $0003; // 24 bit offset << 2 & sign ext.
+ {$EXTERNALSYM IMAGE_REL_ARM_BRANCH24}
+ IMAGE_REL_ARM_BRANCH11 = $0004; // Thumb: 2 11 bit offsets
+ {$EXTERNALSYM IMAGE_REL_ARM_BRANCH11}
+ IMAGE_REL_ARM_TOKEN = $0005; // clr token
+ {$EXTERNALSYM IMAGE_REL_ARM_TOKEN}
+ IMAGE_REL_ARM_GPREL12 = $0006; // GP-relative addressing (ARM)
+ {$EXTERNALSYM IMAGE_REL_ARM_GPREL12}
+ IMAGE_REL_ARM_GPREL7 = $0007; // GP-relative addressing (Thumb)
+ {$EXTERNALSYM IMAGE_REL_ARM_GPREL7}
+ IMAGE_REL_ARM_BLX24 = $0008;
+ {$EXTERNALSYM IMAGE_REL_ARM_BLX24}
+ IMAGE_REL_ARM_BLX11 = $0009;
+ {$EXTERNALSYM IMAGE_REL_ARM_BLX11}
+ IMAGE_REL_ARM_SECTION = $000E; // Section table index
+ {$EXTERNALSYM IMAGE_REL_ARM_SECTION}
+ IMAGE_REL_ARM_SECREL = $000F; // Offset within section
+ {$EXTERNALSYM IMAGE_REL_ARM_SECREL}
+
+ IMAGE_REL_AM_ABSOLUTE = $0000;
+ {$EXTERNALSYM IMAGE_REL_AM_ABSOLUTE}
+ IMAGE_REL_AM_ADDR32 = $0001;
+ {$EXTERNALSYM IMAGE_REL_AM_ADDR32}
+ IMAGE_REL_AM_ADDR32NB = $0002;
+ {$EXTERNALSYM IMAGE_REL_AM_ADDR32NB}
+ IMAGE_REL_AM_CALL32 = $0003;
+ {$EXTERNALSYM IMAGE_REL_AM_CALL32}
+ IMAGE_REL_AM_FUNCINFO = $0004;
+ {$EXTERNALSYM IMAGE_REL_AM_FUNCINFO}
+ IMAGE_REL_AM_REL32_1 = $0005;
+ {$EXTERNALSYM IMAGE_REL_AM_REL32_1}
+ IMAGE_REL_AM_REL32_2 = $0006;
+ {$EXTERNALSYM IMAGE_REL_AM_REL32_2}
+ IMAGE_REL_AM_SECREL = $0007;
+ {$EXTERNALSYM IMAGE_REL_AM_SECREL}
+ IMAGE_REL_AM_SECTION = $0008;
+ {$EXTERNALSYM IMAGE_REL_AM_SECTION}
+ IMAGE_REL_AM_TOKEN = $0009;
+ {$EXTERNALSYM IMAGE_REL_AM_TOKEN}
+
+//
+// X86-64 relocations
+//
+
+ IMAGE_REL_AMD64_ABSOLUTE = $0000; // Reference is absolute, no relocation is necessary
+ {$EXTERNALSYM IMAGE_REL_AMD64_ABSOLUTE}
+ IMAGE_REL_AMD64_ADDR64 = $0001; // 64-bit address (VA).
+ {$EXTERNALSYM IMAGE_REL_AMD64_ADDR64}
+ IMAGE_REL_AMD64_ADDR32 = $0002; // 32-bit address (VA).
+ {$EXTERNALSYM IMAGE_REL_AMD64_ADDR32}
+ IMAGE_REL_AMD64_ADDR32NB = $0003; // 32-bit address w/o image base (RVA).
+ {$EXTERNALSYM IMAGE_REL_AMD64_ADDR32NB}
+ IMAGE_REL_AMD64_REL32 = $0004; // 32-bit relative address from byte following reloc
+ {$EXTERNALSYM IMAGE_REL_AMD64_REL32}
+ IMAGE_REL_AMD64_REL32_1 = $0005; // 32-bit relative address from byte distance 1 from reloc
+ {$EXTERNALSYM IMAGE_REL_AMD64_REL32_1}
+ IMAGE_REL_AMD64_REL32_2 = $0006; // 32-bit relative address from byte distance 2 from reloc
+ {$EXTERNALSYM IMAGE_REL_AMD64_REL32_2}
+ IMAGE_REL_AMD64_REL32_3 = $0007; // 32-bit relative address from byte distance 3 from reloc
+ {$EXTERNALSYM IMAGE_REL_AMD64_REL32_3}
+ IMAGE_REL_AMD64_REL32_4 = $0008; // 32-bit relative address from byte distance 4 from reloc
+ {$EXTERNALSYM IMAGE_REL_AMD64_REL32_4}
+ IMAGE_REL_AMD64_REL32_5 = $0009; // 32-bit relative address from byte distance 5 from reloc
+ {$EXTERNALSYM IMAGE_REL_AMD64_REL32_5}
+ IMAGE_REL_AMD64_SECTION = $000A; // Section index
+ {$EXTERNALSYM IMAGE_REL_AMD64_SECTION}
+ IMAGE_REL_AMD64_SECREL = $000B; // 32 bit offset from base of section containing target
+ {$EXTERNALSYM IMAGE_REL_AMD64_SECREL}
+ IMAGE_REL_AMD64_SECREL7 = $000C; // 7 bit unsigned offset from base of section containing target
+ {$EXTERNALSYM IMAGE_REL_AMD64_SECREL7}
+ IMAGE_REL_AMD64_TOKEN = $000D; // 32 bit metadata token
+ {$EXTERNALSYM IMAGE_REL_AMD64_TOKEN}
+ IMAGE_REL_AMD64_SREL32 = $000E; // 32 bit signed span-dependent value emitted into object
+ {$EXTERNALSYM IMAGE_REL_AMD64_SREL32}
+ IMAGE_REL_AMD64_PAIR = $000F;
+ {$EXTERNALSYM IMAGE_REL_AMD64_PAIR}
+ IMAGE_REL_AMD64_SSPAN32 = $0010; // 32 bit signed span-dependent value applied at link time
+ {$EXTERNALSYM IMAGE_REL_AMD64_SSPAN32}
+
+//
+// IA64 relocation types.
+//
+
+ IMAGE_REL_IA64_ABSOLUTE = $0000;
+ {$EXTERNALSYM IMAGE_REL_IA64_ABSOLUTE}
+ IMAGE_REL_IA64_IMM14 = $0001;
+ {$EXTERNALSYM IMAGE_REL_IA64_IMM14}
+ IMAGE_REL_IA64_IMM22 = $0002;
+ {$EXTERNALSYM IMAGE_REL_IA64_IMM22}
+ IMAGE_REL_IA64_IMM64 = $0003;
+ {$EXTERNALSYM IMAGE_REL_IA64_IMM64}
+ IMAGE_REL_IA64_DIR32 = $0004;
+ {$EXTERNALSYM IMAGE_REL_IA64_DIR32}
+ IMAGE_REL_IA64_DIR64 = $0005;
+ {$EXTERNALSYM IMAGE_REL_IA64_DIR64}
+ IMAGE_REL_IA64_PCREL21B = $0006;
+ {$EXTERNALSYM IMAGE_REL_IA64_PCREL21B}
+ IMAGE_REL_IA64_PCREL21M = $0007;
+ {$EXTERNALSYM IMAGE_REL_IA64_PCREL21M}
+ IMAGE_REL_IA64_PCREL21F = $0008;
+ {$EXTERNALSYM IMAGE_REL_IA64_PCREL21F}
+ IMAGE_REL_IA64_GPREL22 = $0009;
+ {$EXTERNALSYM IMAGE_REL_IA64_GPREL22}
+ IMAGE_REL_IA64_LTOFF22 = $000A;
+ {$EXTERNALSYM IMAGE_REL_IA64_LTOFF22}
+ IMAGE_REL_IA64_SECTION = $000B;
+ {$EXTERNALSYM IMAGE_REL_IA64_SECTION}
+ IMAGE_REL_IA64_SECREL22 = $000C;
+ {$EXTERNALSYM IMAGE_REL_IA64_SECREL22}
+ IMAGE_REL_IA64_SECREL64I = $000D;
+ {$EXTERNALSYM IMAGE_REL_IA64_SECREL64I}
+ IMAGE_REL_IA64_SECREL32 = $000E;
+ {$EXTERNALSYM IMAGE_REL_IA64_SECREL32}
+
+//
+
+ IMAGE_REL_IA64_DIR32NB = $0010;
+ {$EXTERNALSYM IMAGE_REL_IA64_DIR32NB}
+ IMAGE_REL_IA64_SREL14 = $0011;
+ {$EXTERNALSYM IMAGE_REL_IA64_SREL14}
+ IMAGE_REL_IA64_SREL22 = $0012;
+ {$EXTERNALSYM IMAGE_REL_IA64_SREL22}
+ IMAGE_REL_IA64_SREL32 = $0013;
+ {$EXTERNALSYM IMAGE_REL_IA64_SREL32}
+ IMAGE_REL_IA64_UREL32 = $0014;
+ {$EXTERNALSYM IMAGE_REL_IA64_UREL32}
+ IMAGE_REL_IA64_PCREL60X = $0015; // This is always a BRL and never converted
+ {$EXTERNALSYM IMAGE_REL_IA64_PCREL60X}
+ IMAGE_REL_IA64_PCREL60B = $0016; // If possible, convert to MBB bundle with NOP.B in slot 1
+ {$EXTERNALSYM IMAGE_REL_IA64_PCREL60B}
+ IMAGE_REL_IA64_PCREL60F = $0017; // If possible, convert to MFB bundle with NOP.F in slot 1
+ {$EXTERNALSYM IMAGE_REL_IA64_PCREL60F}
+ IMAGE_REL_IA64_PCREL60I = $0018; // If possible, convert to MIB bundle with NOP.I in slot 1
+ {$EXTERNALSYM IMAGE_REL_IA64_PCREL60I}
+ IMAGE_REL_IA64_PCREL60M = $0019; // If possible, convert to MMB bundle with NOP.M in slot 1
+ {$EXTERNALSYM IMAGE_REL_IA64_PCREL60M}
+ IMAGE_REL_IA64_IMMGPREL64 = $001A;
+ {$EXTERNALSYM IMAGE_REL_IA64_IMMGPREL64}
+ IMAGE_REL_IA64_TOKEN = $001B; // clr token
+ {$EXTERNALSYM IMAGE_REL_IA64_TOKEN}
+ IMAGE_REL_IA64_GPREL32 = $001C;
+ {$EXTERNALSYM IMAGE_REL_IA64_GPREL32}
+ IMAGE_REL_IA64_ADDEND = $001F;
+ {$EXTERNALSYM IMAGE_REL_IA64_ADDEND}
+
+//
+// CEF relocation types.
+//
+
+ IMAGE_REL_CEF_ABSOLUTE = $0000; // Reference is absolute, no relocation is necessary
+ {$EXTERNALSYM IMAGE_REL_CEF_ABSOLUTE}
+ IMAGE_REL_CEF_ADDR32 = $0001; // 32-bit address (VA).
+ {$EXTERNALSYM IMAGE_REL_CEF_ADDR32}
+ IMAGE_REL_CEF_ADDR64 = $0002; // 64-bit address (VA).
+ {$EXTERNALSYM IMAGE_REL_CEF_ADDR64}
+ IMAGE_REL_CEF_ADDR32NB = $0003; // 32-bit address w/o image base (RVA).
+ {$EXTERNALSYM IMAGE_REL_CEF_ADDR32NB}
+ IMAGE_REL_CEF_SECTION = $0004; // Section index
+ {$EXTERNALSYM IMAGE_REL_CEF_SECTION}
+ IMAGE_REL_CEF_SECREL = $0005; // 32 bit offset from base of section containing target
+ {$EXTERNALSYM IMAGE_REL_CEF_SECREL}
+ IMAGE_REL_CEF_TOKEN = $0006; // 32 bit metadata token
+ {$EXTERNALSYM IMAGE_REL_CEF_TOKEN}
+
+//
+// clr relocation types.
+//
+
+ IMAGE_REL_CEE_ABSOLUTE = $0000; // Reference is absolute, no relocation is necessary
+ {$EXTERNALSYM IMAGE_REL_CEE_ABSOLUTE}
+ IMAGE_REL_CEE_ADDR32 = $0001; // 32-bit address (VA).
+ {$EXTERNALSYM IMAGE_REL_CEE_ADDR32}
+ IMAGE_REL_CEE_ADDR64 = $0002; // 64-bit address (VA).
+ {$EXTERNALSYM IMAGE_REL_CEE_ADDR64}
+ IMAGE_REL_CEE_ADDR32NB = $0003; // 32-bit address w/o image base (RVA).
+ {$EXTERNALSYM IMAGE_REL_CEE_ADDR32NB}
+ IMAGE_REL_CEE_SECTION = $0004; // Section index
+ {$EXTERNALSYM IMAGE_REL_CEE_SECTION}
+ IMAGE_REL_CEE_SECREL = $0005; // 32 bit offset from base of section containing target
+ {$EXTERNALSYM IMAGE_REL_CEE_SECREL}
+ IMAGE_REL_CEE_TOKEN = $0006; // 32 bit metadata token
+ {$EXTERNALSYM IMAGE_REL_CEE_TOKEN}
+
+ IMAGE_REL_M32R_ABSOLUTE = $0000; // No relocation required
+ {$EXTERNALSYM IMAGE_REL_M32R_ABSOLUTE}
+ IMAGE_REL_M32R_ADDR32 = $0001; // 32 bit address
+ {$EXTERNALSYM IMAGE_REL_M32R_ADDR32}
+ IMAGE_REL_M32R_ADDR32NB = $0002; // 32 bit address w/o image base
+ {$EXTERNALSYM IMAGE_REL_M32R_ADDR32NB}
+ IMAGE_REL_M32R_ADDR24 = $0003; // 24 bit address
+ {$EXTERNALSYM IMAGE_REL_M32R_ADDR24}
+ IMAGE_REL_M32R_GPREL16 = $0004; // GP relative addressing
+ {$EXTERNALSYM IMAGE_REL_M32R_GPREL16}
+ IMAGE_REL_M32R_PCREL24 = $0005; // 24 bit offset << 2 & sign ext.
+ {$EXTERNALSYM IMAGE_REL_M32R_PCREL24}
+ IMAGE_REL_M32R_PCREL16 = $0006; // 16 bit offset << 2 & sign ext.
+ {$EXTERNALSYM IMAGE_REL_M32R_PCREL16}
+ IMAGE_REL_M32R_PCREL8 = $0007; // 8 bit offset << 2 & sign ext.
+ {$EXTERNALSYM IMAGE_REL_M32R_PCREL8}
+ IMAGE_REL_M32R_REFHALF = $0008; // 16 MSBs
+ {$EXTERNALSYM IMAGE_REL_M32R_REFHALF}
+ IMAGE_REL_M32R_REFHI = $0009; // 16 MSBs; adj for LSB sign ext.
+ {$EXTERNALSYM IMAGE_REL_M32R_REFHI}
+ IMAGE_REL_M32R_REFLO = $000A; // 16 LSBs
+ {$EXTERNALSYM IMAGE_REL_M32R_REFLO}
+ IMAGE_REL_M32R_PAIR = $000B; // Link HI and LO
+ {$EXTERNALSYM IMAGE_REL_M32R_PAIR}
+ IMAGE_REL_M32R_SECTION = $000C; // Section table index
+ {$EXTERNALSYM IMAGE_REL_M32R_SECTION}
+ IMAGE_REL_M32R_SECREL32 = $000D; // 32 bit section relative reference
+ {$EXTERNALSYM IMAGE_REL_M32R_SECREL32}
+ IMAGE_REL_M32R_TOKEN = $000E; // clr token
+ {$EXTERNALSYM IMAGE_REL_M32R_TOKEN}
+
+// Please contact INTEL to get IA64-specific information
+
+(* TODO
+#define EXT_IMM64(Value, Address, Size, InstPos, ValPos)
+ Value |= (((ULONGLONG)((*(Address) >> InstPos) & (((ULONGLONG)1 << Size) - 1))) << ValPos) // Intel-IA64-Filler
+
+#define INS_IMM64(Value, Address, Size, InstPos, ValPos) /* Intel-IA64-Filler */\
+ *(PDWORD)Address = (*(PDWORD)Address & ~(((1 << Size) - 1) << InstPos)) | /* Intel-IA64-Filler */\
+ ((DWORD)((((ULONGLONG)Value >> ValPos) & (((ULONGLONG)1 << Size) - 1))) << InstPos) // Intel-IA64-Filler
+*)
+
+const
+ EMARCH_ENC_I17_IMM7B_INST_WORD_X = 3; // Intel-IA64-Filler
+ {$EXTERNALSYM EMARCH_ENC_I17_IMM7B_INST_WORD_X}
+ EMARCH_ENC_I17_IMM7B_SIZE_X = 7; // Intel-IA64-Filler
+ {$EXTERNALSYM EMARCH_ENC_I17_IMM7B_SIZE_X}
+ EMARCH_ENC_I17_IMM7B_INST_WORD_POS_X = 4; // Intel-IA64-Filler
+ {$EXTERNALSYM EMARCH_ENC_I17_IMM7B_INST_WORD_POS_X}
+ EMARCH_ENC_I17_IMM7B_VAL_POS_X = 0; // Intel-IA64-Filler
+ {$EXTERNALSYM EMARCH_ENC_I17_IMM7B_VAL_POS_X}
+
+ EMARCH_ENC_I17_IMM9D_INST_WORD_X = 3; // Intel-IA64-Filler
+ {$EXTERNALSYM EMARCH_ENC_I17_IMM9D_INST_WORD_X}
+ EMARCH_ENC_I17_IMM9D_SIZE_X = 9; // Intel-IA64-Filler
+ {$EXTERNALSYM EMARCH_ENC_I17_IMM9D_SIZE_X}
+ EMARCH_ENC_I17_IMM9D_INST_WORD_POS_X = 18; // Intel-IA64-Filler
+ {$EXTERNALSYM EMARCH_ENC_I17_IMM9D_INST_WORD_POS_X}
+ EMARCH_ENC_I17_IMM9D_VAL_POS_X = 7; // Intel-IA64-Filler
+ {$EXTERNALSYM EMARCH_ENC_I17_IMM9D_VAL_POS_X}
+
+ EMARCH_ENC_I17_IMM5C_INST_WORD_X = 3; // Intel-IA64-Filler
+ {$EXTERNALSYM EMARCH_ENC_I17_IMM5C_INST_WORD_X}
+ EMARCH_ENC_I17_IMM5C_SIZE_X = 5; // Intel-IA64-Filler
+ {$EXTERNALSYM EMARCH_ENC_I17_IMM5C_SIZE_X}
+ EMARCH_ENC_I17_IMM5C_INST_WORD_POS_X = 13; // Intel-IA64-Filler
+ {$EXTERNALSYM EMARCH_ENC_I17_IMM5C_INST_WORD_POS_X}
+ EMARCH_ENC_I17_IMM5C_VAL_POS_X = 16; // Intel-IA64-Filler
+ {$EXTERNALSYM EMARCH_ENC_I17_IMM5C_VAL_POS_X}
+
+ EMARCH_ENC_I17_IC_INST_WORD_X = 3; // Intel-IA64-Filler
+ {$EXTERNALSYM EMARCH_ENC_I17_IC_INST_WORD_X}
+ EMARCH_ENC_I17_IC_SIZE_X = 1; // Intel-IA64-Filler
+ {$EXTERNALSYM EMARCH_ENC_I17_IC_SIZE_X}
+ EMARCH_ENC_I17_IC_INST_WORD_POS_X = 12; // Intel-IA64-Filler
+ {$EXTERNALSYM EMARCH_ENC_I17_IC_INST_WORD_POS_X}
+ EMARCH_ENC_I17_IC_VAL_POS_X = 21; // Intel-IA64-Filler
+ {$EXTERNALSYM EMARCH_ENC_I17_IC_VAL_POS_X}
+
+ EMARCH_ENC_I17_IMM41a_INST_WORD_X = 1; // Intel-IA64-Filler
+ {$EXTERNALSYM EMARCH_ENC_I17_IMM41a_INST_WORD_X}
+ EMARCH_ENC_I17_IMM41a_SIZE_X = 10; // Intel-IA64-Filler
+ {$EXTERNALSYM EMARCH_ENC_I17_IMM41a_SIZE_X}
+ EMARCH_ENC_I17_IMM41a_INST_WORD_POS_X = 14; // Intel-IA64-Filler
+ {$EXTERNALSYM EMARCH_ENC_I17_IMM41a_INST_WORD_POS_X}
+ EMARCH_ENC_I17_IMM41a_VAL_POS_X = 22; // Intel-IA64-Filler
+ {$EXTERNALSYM EMARCH_ENC_I17_IMM41a_VAL_POS_X}
+
+ EMARCH_ENC_I17_IMM41b_INST_WORD_X = 1; // Intel-IA64-Filler
+ {$EXTERNALSYM EMARCH_ENC_I17_IMM41b_INST_WORD_X}
+ EMARCH_ENC_I17_IMM41b_SIZE_X = 8; // Intel-IA64-Filler
+ {$EXTERNALSYM EMARCH_ENC_I17_IMM41b_SIZE_X}
+ EMARCH_ENC_I17_IMM41b_INST_WORD_POS_X = 24; // Intel-IA64-Filler
+ {$EXTERNALSYM EMARCH_ENC_I17_IMM41b_INST_WORD_POS_X}
+ EMARCH_ENC_I17_IMM41b_VAL_POS_X = 32; // Intel-IA64-Filler
+ {$EXTERNALSYM EMARCH_ENC_I17_IMM41b_VAL_POS_X}
+
+ EMARCH_ENC_I17_IMM41c_INST_WORD_X = 2; // Intel-IA64-Filler
+ {$EXTERNALSYM EMARCH_ENC_I17_IMM41c_INST_WORD_X}
+ EMARCH_ENC_I17_IMM41c_SIZE_X = 23; // Intel-IA64-Filler
+ {$EXTERNALSYM EMARCH_ENC_I17_IMM41c_SIZE_X}
+ EMARCH_ENC_I17_IMM41c_INST_WORD_POS_X = 0; // Intel-IA64-Filler
+ {$EXTERNALSYM EMARCH_ENC_I17_IMM41c_INST_WORD_POS_X}
+ EMARCH_ENC_I17_IMM41c_VAL_POS_X = 40; // Intel-IA64-Filler
+ {$EXTERNALSYM EMARCH_ENC_I17_IMM41c_VAL_POS_X}
+
+ EMARCH_ENC_I17_SIGN_INST_WORD_X = 3; // Intel-IA64-Filler
+ {$EXTERNALSYM EMARCH_ENC_I17_SIGN_INST_WORD_X}
+ EMARCH_ENC_I17_SIGN_SIZE_X = 1; // Intel-IA64-Filler
+ {$EXTERNALSYM EMARCH_ENC_I17_SIGN_SIZE_X}
+ EMARCH_ENC_I17_SIGN_INST_WORD_POS_X = 27; // Intel-IA64-Filler
+ {$EXTERNALSYM EMARCH_ENC_I17_SIGN_INST_WORD_POS_X}
+ EMARCH_ENC_I17_SIGN_VAL_POS_X = 63; // Intel-IA64-Filler
+ {$EXTERNALSYM EMARCH_ENC_I17_SIGN_VAL_POS_X}
+
+//
+// Line number format.
+//
+
+type
+ TImgLineNoType = record
+ case Integer of
+ 0: (SymbolTableIndex: DWORD); // Symbol table index of function name if Linenumber is 0.
+ 1: (VirtualAddress: DWORD); // Virtual address of line number.
+ end;
+
+ PIMAGE_LINENUMBER = ^IMAGE_LINENUMBER;
+ {$EXTERNALSYM PIMAGE_LINENUMBER}
+ _IMAGE_LINENUMBER = record
+ Type_: TImgLineNoType;
+ Linenumber: WORD; // Line number.
+ end;
+ {$EXTERNALSYM _IMAGE_LINENUMBER}
+ IMAGE_LINENUMBER = _IMAGE_LINENUMBER;
+ {$EXTERNALSYM IMAGE_LINENUMBER}
+ TImageLineNumber = IMAGE_LINENUMBER;
+ PImageLineNumber = PIMAGE_LINENUMBER;
+
+const
+ IMAGE_SIZEOF_LINENUMBER = 6;
+ {$EXTERNALSYM IMAGE_SIZEOF_LINENUMBER}
+
+// #include "poppack.h" // Back to 4 byte packing
+
+//
+// Based relocation format.
+//
+
+type
+ PIMAGE_BASE_RELOCATION = ^IMAGE_BASE_RELOCATION;
+ {$EXTERNALSYM PIMAGE_BASE_RELOCATION}
+ _IMAGE_BASE_RELOCATION = record
+ VirtualAddress: DWORD;
+ SizeOfBlock: DWORD;
+ // WORD TypeOffset[1];
+ end;
+ {$EXTERNALSYM _IMAGE_BASE_RELOCATION}
+ IMAGE_BASE_RELOCATION = _IMAGE_BASE_RELOCATION;
+ {$EXTERNALSYM IMAGE_BASE_RELOCATION}
+ TImageBaseRelocation = IMAGE_BASE_RELOCATION;
+ PImageBaseRelocation = PIMAGE_BASE_RELOCATION;
+
+const
+ IMAGE_SIZEOF_BASE_RELOCATION = 8;
+ {$EXTERNALSYM IMAGE_SIZEOF_BASE_RELOCATION}
+
+//
+// Based relocation types.
+//
+
+ IMAGE_REL_BASED_ABSOLUTE = 0;
+ {$EXTERNALSYM IMAGE_REL_BASED_ABSOLUTE}
+ IMAGE_REL_BASED_HIGH = 1;
+ {$EXTERNALSYM IMAGE_REL_BASED_HIGH}
+ IMAGE_REL_BASED_LOW = 2;
+ {$EXTERNALSYM IMAGE_REL_BASED_LOW}
+ IMAGE_REL_BASED_HIGHLOW = 3;
+ {$EXTERNALSYM IMAGE_REL_BASED_HIGHLOW}
+ IMAGE_REL_BASED_HIGHADJ = 4;
+ {$EXTERNALSYM IMAGE_REL_BASED_HIGHADJ}
+ IMAGE_REL_BASED_MIPS_JMPADDR = 5;
+ {$EXTERNALSYM IMAGE_REL_BASED_MIPS_JMPADDR}
+
+ IMAGE_REL_BASED_MIPS_JMPADDR16 = 9;
+ {$EXTERNALSYM IMAGE_REL_BASED_MIPS_JMPADDR16}
+ IMAGE_REL_BASED_IA64_IMM64 = 9;
+ {$EXTERNALSYM IMAGE_REL_BASED_IA64_IMM64}
+ IMAGE_REL_BASED_DIR64 = 10;
+ {$EXTERNALSYM IMAGE_REL_BASED_DIR64}
+
+//
+// Archive format.
+//
+
+ IMAGE_ARCHIVE_START_SIZE = 8;
+ {$EXTERNALSYM IMAGE_ARCHIVE_START_SIZE}
+ IMAGE_ARCHIVE_START = '!<arch>'#10;
+ {$EXTERNALSYM IMAGE_ARCHIVE_START}
+ IMAGE_ARCHIVE_END = '`'#10;
+ {$EXTERNALSYM IMAGE_ARCHIVE_END}
+ IMAGE_ARCHIVE_PAD = #10;
+ {$EXTERNALSYM IMAGE_ARCHIVE_PAD}
+ IMAGE_ARCHIVE_LINKER_MEMBER = '/ ';
+ {$EXTERNALSYM IMAGE_ARCHIVE_LINKER_MEMBER}
+ IMAGE_ARCHIVE_LONGNAMES_MEMBER = '// ';
+ {$EXTERNALSYM IMAGE_ARCHIVE_LONGNAMES_MEMBER}
+
+type
+ PIMAGE_ARCHIVE_MEMBER_HEADER = ^IMAGE_ARCHIVE_MEMBER_HEADER;
+ {$EXTERNALSYM PIMAGE_ARCHIVE_MEMBER_HEADER}
+ _IMAGE_ARCHIVE_MEMBER_HEADER = record
+ Name: array [0..15] of Byte; // File member name - `/' terminated.
+ Date: array [0..11] of Byte; // File member date - decimal.
+ UserID: array [0..5] of Byte; // File member user id - decimal.
+ GroupID: array [0..5] of Byte; // File member group id - decimal.
+ Mode: array [0..7] of Byte; // File member mode - octal.
+ Size: array [0..9] of Byte; // File member size - decimal.
+ EndHeader: array [0..1] of Byte; // String to end header.
+ end;
+ {$EXTERNALSYM _IMAGE_ARCHIVE_MEMBER_HEADER}
+ IMAGE_ARCHIVE_MEMBER_HEADER = _IMAGE_ARCHIVE_MEMBER_HEADER;
+ {$EXTERNALSYM IMAGE_ARCHIVE_MEMBER_HEADER}
+ TImageArchiveMemberHeader = IMAGE_ARCHIVE_MEMBER_HEADER;
+ PImageArchiveMemberHeader = PIMAGE_ARCHIVE_MEMBER_HEADER;
+
+const
+ IMAGE_SIZEOF_ARCHIVE_MEMBER_HDR = 60;
+ {$EXTERNALSYM IMAGE_SIZEOF_ARCHIVE_MEMBER_HDR}
+
+//
+// DLL support.
+//
+
+//
+// Export Format
+//
+
+type
+ PIMAGE_EXPORT_DIRECTORY = ^IMAGE_EXPORT_DIRECTORY;
+ {$EXTERNALSYM PIMAGE_EXPORT_DIRECTORY}
+ _IMAGE_EXPORT_DIRECTORY = record
+ Characteristics: DWORD;
+ TimeDateStamp: DWORD;
+ MajorVersion: Word;
+ MinorVersion: Word;
+ Name: DWORD;
+ Base: DWORD;
+ NumberOfFunctions: DWORD;
+ NumberOfNames: DWORD;
+ AddressOfFunctions: DWORD; // RVA from base of image
+ AddressOfNames: DWORD; // RVA from base of image
+ AddressOfNameOrdinals: DWORD; // RVA from base of image
+ end;
+ {$EXTERNALSYM _IMAGE_EXPORT_DIRECTORY}
+ IMAGE_EXPORT_DIRECTORY = _IMAGE_EXPORT_DIRECTORY;
+ {$EXTERNALSYM IMAGE_EXPORT_DIRECTORY}
+ TImageExportDirectory = IMAGE_EXPORT_DIRECTORY;
+ PImageExportDirectory = PIMAGE_EXPORT_DIRECTORY;
+
+//
+// Import Format
+//
+
+ PIMAGE_IMPORT_BY_NAME = ^IMAGE_IMPORT_BY_NAME;
+ {$EXTERNALSYM PIMAGE_IMPORT_BY_NAME}
+ _IMAGE_IMPORT_BY_NAME = record
+ Hint: Word;
+ Name: array [0..0] of Byte;
+ end;
+ {$EXTERNALSYM _IMAGE_IMPORT_BY_NAME}
+ IMAGE_IMPORT_BY_NAME = _IMAGE_IMPORT_BY_NAME;
+ {$EXTERNALSYM IMAGE_IMPORT_BY_NAME}
+ TImageImportByName = IMAGE_IMPORT_BY_NAME;
+ PImageImportByName = PIMAGE_IMPORT_BY_NAME;
+
+// #include "pshpack8.h" // Use align 8 for the 64-bit IAT.
+
+ PIMAGE_THUNK_DATA64 = ^IMAGE_THUNK_DATA64;
+ {$EXTERNALSYM PIMAGE_THUNK_DATA64}
+ _IMAGE_THUNK_DATA64 = record
+ case Integer of
+ 0: (ForwarderString: ULONGLONG); // PBYTE
+ 1: (Function_: ULONGLONG); // PDWORD
+ 2: (Ordinal: ULONGLONG);
+ 3: (AddressOfData: ULONGLONG); // PIMAGE_IMPORT_BY_NAME
+ end;
+ {$EXTERNALSYM _IMAGE_THUNK_DATA64}
+ IMAGE_THUNK_DATA64 = _IMAGE_THUNK_DATA64;
+ {$EXTERNALSYM IMAGE_THUNK_DATA64}
+ TImageThunkData64 = IMAGE_THUNK_DATA64;
+ PImageThunkData64 = PIMAGE_THUNK_DATA64;
+
+// #include "poppack.h" // Back to 4 byte packing
+
+ PIMAGE_THUNK_DATA32 = ^IMAGE_THUNK_DATA32;
+ {$EXTERNALSYM PIMAGE_THUNK_DATA32}
+ _IMAGE_THUNK_DATA32 = record
+ case Integer of
+ 0: (ForwarderString: DWORD); // PBYTE
+ 1: (Function_: DWORD); // PDWORD
+ 2: (Ordinal: DWORD);
+ 3: (AddressOfData: DWORD); // PIMAGE_IMPORT_BY_NAME
+ end;
+ {$EXTERNALSYM _IMAGE_THUNK_DATA32}
+ IMAGE_THUNK_DATA32 = _IMAGE_THUNK_DATA32;
+ {$EXTERNALSYM IMAGE_THUNK_DATA32}
+ TImageThunkData32 = IMAGE_THUNK_DATA32;
+ PImageThunkData32 = PIMAGE_THUNK_DATA32;
+
+const
+ IMAGE_ORDINAL_FLAG64 = ULONGLONG($8000000000000000);
+ {$EXTERNALSYM IMAGE_ORDINAL_FLAG64}
+ IMAGE_ORDINAL_FLAG32 = DWORD($80000000);
+ {$EXTERNALSYM IMAGE_ORDINAL_FLAG32}
+
+function IMAGE_ORDINAL64(Ordinal: ULONGLONG): ULONGLONG;
+{$EXTERNALSYM IMAGE_ORDINAL64}
+function IMAGE_ORDINAL32(Ordinal: DWORD): DWORD;
+{$EXTERNALSYM IMAGE_ORDINAL32}
+function IMAGE_SNAP_BY_ORDINAL64(Ordinal: ULONGLONG): Boolean;
+{$EXTERNALSYM IMAGE_SNAP_BY_ORDINAL64}
+function IMAGE_SNAP_BY_ORDINAL32(Ordinal: DWORD): Boolean;
+{$EXTERNALSYM IMAGE_SNAP_BY_ORDINAL32}
+
+//
+// Thread Local Storage
+//
+
+type
+ PIMAGE_TLS_CALLBACK = procedure(DllHandle: Pointer; Reason: DWORD; Reserved: Pointer); stdcall;
+ {$EXTERNALSYM PIMAGE_TLS_CALLBACK}
+ TImageTlsCallback = PIMAGE_TLS_CALLBACK;
+
+ PIMAGE_TLS_DIRECTORY64 = ^IMAGE_TLS_DIRECTORY64;
+ {$EXTERNALSYM PIMAGE_TLS_DIRECTORY64}
+ _IMAGE_TLS_DIRECTORY64 = record
+ StartAddressOfRawData: ULONGLONG;
+ EndAddressOfRawData: ULONGLONG;
+ AddressOfIndex: ULONGLONG; // PDWORD
+ AddressOfCallBacks: ULONGLONG; // PIMAGE_TLS_CALLBACK *;
+ SizeOfZeroFill: DWORD;
+ Characteristics: DWORD;
+ end;
+ {$EXTERNALSYM _IMAGE_TLS_DIRECTORY64}
+ IMAGE_TLS_DIRECTORY64 = _IMAGE_TLS_DIRECTORY64;
+ {$EXTERNALSYM IMAGE_TLS_DIRECTORY64}
+ TImageTlsDirectory64 = IMAGE_TLS_DIRECTORY64;
+ PImageTlsDirectory64 = PIMAGE_TLS_DIRECTORY64;
+
+ PIMAGE_TLS_DIRECTORY32 = ^IMAGE_TLS_DIRECTORY32;
+ {$EXTERNALSYM PIMAGE_TLS_DIRECTORY32}
+ _IMAGE_TLS_DIRECTORY32 = record
+ StartAddressOfRawData: DWORD;
+ EndAddressOfRawData: DWORD;
+ AddressOfIndex: DWORD; // PDWORD
+ AddressOfCallBacks: DWORD; // PIMAGE_TLS_CALLBACK *
+ SizeOfZeroFill: DWORD;
+ Characteristics: DWORD;
+ end;
+ {$EXTERNALSYM _IMAGE_TLS_DIRECTORY32}
+ IMAGE_TLS_DIRECTORY32 = _IMAGE_TLS_DIRECTORY32;
+ {$EXTERNALSYM IMAGE_TLS_DIRECTORY32}
+ TImageTlsDirectory32 = IMAGE_TLS_DIRECTORY32;
+ PImageTlsDirectory32 = PIMAGE_TLS_DIRECTORY32;
+
+const
+ IMAGE_ORDINAL_FLAG = IMAGE_ORDINAL_FLAG32;
+ {$EXTERNALSYM IMAGE_ORDINAL_FLAG}
+
+function IMAGE_ORDINAL(Ordinal: DWORD): DWORD;
+
+type
+ IMAGE_THUNK_DATA = IMAGE_THUNK_DATA32;
+ {$EXTERNALSYM IMAGE_THUNK_DATA}
+ PIMAGE_THUNK_DATA = PIMAGE_THUNK_DATA32;
+ {$EXTERNALSYM PIMAGE_THUNK_DATA}
+ TImageThunkData = TImageThunkData32;
+ PImageThunkData = PImageThunkData32;
+
+function IMAGE_SNAP_BY_ORDINAL(Ordinal: DWORD): Boolean;
+{$EXTERNALSYM IMAGE_SNAP_BY_ORDINAL}
+
+type
+ IMAGE_TLS_DIRECTORY = IMAGE_TLS_DIRECTORY32;
+ {$EXTERNALSYM IMAGE_TLS_DIRECTORY}
+ PIMAGE_TLS_DIRECTORY = PIMAGE_TLS_DIRECTORY32;
+ {$EXTERNALSYM PIMAGE_TLS_DIRECTORY}
+ TImageTlsDirectory = TImageTlsDirectory32;
+ PImageTlsDirectory = PImageTlsDirectory32;
+
+ TIIDUnion = record
+ case Integer of
+ 0: (Characteristics: DWORD); // 0 for terminating null import descriptor
+ 1: (OriginalFirstThunk: DWORD); // RVA to original unbound IAT (PIMAGE_THUNK_DATA)
+ end;
+
+ PIMAGE_IMPORT_DESCRIPTOR = ^IMAGE_IMPORT_DESCRIPTOR;
+ {$EXTERNALSYM PIMAGE_IMPORT_DESCRIPTOR}
+ _IMAGE_IMPORT_DESCRIPTOR = record
+ Union: TIIDUnion;
+ TimeDateStamp: DWORD; // 0 if not bound,
+ // -1 if bound, and real date\time stamp
+ // in IMAGE_DIRECTORY_ENTRY_BOUND_IMPORT (new BIND)
+ // O.W. date/time stamp of DLL bound to (Old BIND)
+
+ ForwarderChain: DWORD; // -1 if no forwarders
+ Name: DWORD;
+ FirstThunk: DWORD; // RVA to IAT (if bound this IAT has actual addresses)
+ end;
+ {$EXTERNALSYM _IMAGE_IMPORT_DESCRIPTOR}
+ IMAGE_IMPORT_DESCRIPTOR = _IMAGE_IMPORT_DESCRIPTOR;
+ {$EXTERNALSYM IMAGE_IMPORT_DESCRIPTOR}
+ TImageImportDecriptor = IMAGE_IMPORT_DESCRIPTOR;
+ PImageImportDecriptor = PIMAGE_IMPORT_DESCRIPTOR;
+
+//
+// New format import descriptors pointed to by DataDirectory[ IMAGE_DIRECTORY_ENTRY_BOUND_IMPORT ]
+//
+
+type
+ PIMAGE_BOUND_IMPORT_DESCRIPTOR = ^IMAGE_BOUND_IMPORT_DESCRIPTOR;
+ {$EXTERNALSYM PIMAGE_BOUND_IMPORT_DESCRIPTOR}
+ _IMAGE_BOUND_IMPORT_DESCRIPTOR = record
+ TimeDateStamp: DWORD;
+ OffsetModuleName: Word;
+ NumberOfModuleForwarderRefs: Word;
+ // Array of zero or more IMAGE_BOUND_FORWARDER_REF follows
+ end;
+ {$EXTERNALSYM _IMAGE_BOUND_IMPORT_DESCRIPTOR}
+ IMAGE_BOUND_IMPORT_DESCRIPTOR = _IMAGE_BOUND_IMPORT_DESCRIPTOR;
+ {$EXTERNALSYM IMAGE_BOUND_IMPORT_DESCRIPTOR}
+ TImageBoundImportDescriptor = IMAGE_BOUND_IMPORT_DESCRIPTOR;
+ PImageBoundImportDescriptor = PIMAGE_BOUND_IMPORT_DESCRIPTOR;
+
+ PIMAGE_BOUND_FORWARDER_REF = ^IMAGE_BOUND_FORWARDER_REF;
+ {$EXTERNALSYM PIMAGE_BOUND_FORWARDER_REF}
+ _IMAGE_BOUND_FORWARDER_REF = record
+ TimeDateStamp: DWORD;
+ OffsetModuleName: Word;
+ Reserved: Word;
+ end;
+ {$EXTERNALSYM _IMAGE_BOUND_FORWARDER_REF}
+ IMAGE_BOUND_FORWARDER_REF = _IMAGE_BOUND_FORWARDER_REF;
+ {$EXTERNALSYM IMAGE_BOUND_FORWARDER_REF}
+ TImageBoundForwarderRef = IMAGE_BOUND_FORWARDER_REF;
+ PImageBoundForwarderRef = PIMAGE_BOUND_FORWARDER_REF;
+
+//
+// Resource Format.
+//
+
+//
+// Resource directory consists of two counts, following by a variable length
+// array of directory entries. The first count is the number of entries at
+// beginning of the array that have actual names associated with each entry.
+// The entries are in ascending order, case insensitive strings. The second
+// count is the number of entries that immediately follow the named entries.
+// This second count identifies the number of entries that have 16-bit integer
+// Ids as their name. These entries are also sorted in ascending order.
+//
+// This structure allows fast lookup by either name or number, but for any
+// given resource entry only one form of lookup is supported, not both.
+// This is consistant with the syntax of the .RC file and the .RES file.
+//
+
+ PIMAGE_RESOURCE_DIRECTORY = ^IMAGE_RESOURCE_DIRECTORY;
+ {$EXTERNALSYM PIMAGE_RESOURCE_DIRECTORY}
+ _IMAGE_RESOURCE_DIRECTORY = record
+ Characteristics: DWORD;
+ TimeDateStamp: DWORD;
+ MajorVersion: Word;
+ MinorVersion: Word;
+ NumberOfNamedEntries: Word;
+ NumberOfIdEntries: Word;
+ // IMAGE_RESOURCE_DIRECTORY_ENTRY DirectoryEntries[];
+ end;
+ {$EXTERNALSYM _IMAGE_RESOURCE_DIRECTORY}
+ IMAGE_RESOURCE_DIRECTORY = _IMAGE_RESOURCE_DIRECTORY;
+ {$EXTERNALSYM IMAGE_RESOURCE_DIRECTORY}
+ TImageResourceDirectory = IMAGE_RESOURCE_DIRECTORY;
+ PImageResourceDirectory = PIMAGE_RESOURCE_DIRECTORY;
+
+const
+ IMAGE_RESOURCE_NAME_IS_STRING = DWORD($80000000);
+ {$EXTERNALSYM IMAGE_RESOURCE_NAME_IS_STRING}
+ IMAGE_RESOURCE_DATA_IS_DIRECTORY = DWORD($80000000);
+ {$EXTERNALSYM IMAGE_RESOURCE_DATA_IS_DIRECTORY}
+
+//
+// Each directory contains the 32-bit Name of the entry and an offset,
+// relative to the beginning of the resource directory of the data associated
+// with this directory entry. If the name of the entry is an actual text
+// string instead of an integer Id, then the high order bit of the name field
+// is set to one and the low order 31-bits are an offset, relative to the
+// beginning of the resource directory of the string, which is of type
+// IMAGE_RESOURCE_DIRECTORY_STRING. Otherwise the high bit is clear and the
+// low-order 16-bits are the integer Id that identify this resource directory
+// entry. If the directory entry is yet another resource directory (i.e. a
+// subdirectory), then the high order bit of the offset field will be
+// set to indicate this. Otherwise the high bit is clear and the offset
+// field points to a resource data entry.
+//
+
+type
+ TIRDEName = record
+ case Integer of
+ 0: (
+ NameOffset: DWORD); // 0..30: NameOffset; 31: NameIsString
+ 1: (
+ Name: DWORD);
+ 2: (
+ Id: WORD);
+ end;
+
+ TIRDEDirectory = record
+ case Integer of
+ 0: (
+ OffsetToData: DWORD);
+ 1: (
+ OffsetToDirectory: DWORD); // 0..30: OffsetToDirectory; 31: DataIsDirectory
+ end;
+
+ PIMAGE_RESOURCE_DIRECTORY_ENTRY = ^IMAGE_RESOURCE_DIRECTORY_ENTRY;
+ {$EXTERNALSYM PIMAGE_RESOURCE_DIRECTORY_ENTRY}
+ _IMAGE_RESOURCE_DIRECTORY_ENTRY = record
+ Name: TIRDEName;
+ Directory: TIRDEDirectory;
+ end;
+ {$EXTERNALSYM _IMAGE_RESOURCE_DIRECTORY_ENTRY}
+ IMAGE_RESOURCE_DIRECTORY_ENTRY = _IMAGE_RESOURCE_DIRECTORY_ENTRY;
+ {$EXTERNALSYM IMAGE_RESOURCE_DIRECTORY_ENTRY}
+ TImageResourceDirectoryEntry = IMAGE_RESOURCE_DIRECTORY_ENTRY;
+ PImageResourceDirectoryEntry = PIMAGE_RESOURCE_DIRECTORY_ENTRY;
+
+//
+// For resource directory entries that have actual string names, the Name
+// field of the directory entry points to an object of the following type.
+// All of these string objects are stored together after the last resource
+// directory entry and before the first resource data object. This minimizes
+// the impact of these variable length objects on the alignment of the fixed
+// size directory entry objects.
+//
+
+type
+ PIMAGE_RESOURCE_DIRECTORY_STRING = ^IMAGE_RESOURCE_DIRECTORY_STRING;
+ {$EXTERNALSYM PIMAGE_RESOURCE_DIRECTORY_STRING}
+ _IMAGE_RESOURCE_DIRECTORY_STRING = record
+ Length: Word;
+ NameString: array [0..0] of CHAR;
+ end;
+ {$EXTERNALSYM _IMAGE_RESOURCE_DIRECTORY_STRING}
+ IMAGE_RESOURCE_DIRECTORY_STRING = _IMAGE_RESOURCE_DIRECTORY_STRING;
+ {$EXTERNALSYM IMAGE_RESOURCE_DIRECTORY_STRING}
+ TImageResourceDirectoryString = IMAGE_RESOURCE_DIRECTORY_STRING;
+ PImageResourceDirectoryString = PIMAGE_RESOURCE_DIRECTORY_STRING;
+
+ PIMAGE_RESOURCE_DIR_STRING_U = ^IMAGE_RESOURCE_DIR_STRING_U;
+ {$EXTERNALSYM PIMAGE_RESOURCE_DIR_STRING_U}
+ _IMAGE_RESOURCE_DIR_STRING_U = record
+ Length: Word;
+ NameString: array [0..0] of WCHAR;
+ end;
+ {$EXTERNALSYM _IMAGE_RESOURCE_DIR_STRING_U}
+ IMAGE_RESOURCE_DIR_STRING_U = _IMAGE_RESOURCE_DIR_STRING_U;
+ {$EXTERNALSYM IMAGE_RESOURCE_DIR_STRING_U}
+ TImageResourceDirStringU = IMAGE_RESOURCE_DIR_STRING_U;
+ PImageResourceDirStringU = PIMAGE_RESOURCE_DIR_STRING_U;
+
+//
+// Each resource data entry describes a leaf node in the resource directory
+// tree. It contains an offset, relative to the beginning of the resource
+// directory of the data for the resource, a size field that gives the number
+// of bytes of data at that offset, a CodePage that should be used when
+// decoding code point values within the resource data. Typically for new
+// applications the code page would be the unicode code page.
+//
+
+ PIMAGE_RESOURCE_DATA_ENTRY = ^IMAGE_RESOURCE_DATA_ENTRY;
+ {$EXTERNALSYM PIMAGE_RESOURCE_DATA_ENTRY}
+ _IMAGE_RESOURCE_DATA_ENTRY = record
+ OffsetToData: DWORD;
+ Size: DWORD;
+ CodePage: DWORD;
+ Reserved: DWORD;
+ end;
+ {$EXTERNALSYM _IMAGE_RESOURCE_DATA_ENTRY}
+ IMAGE_RESOURCE_DATA_ENTRY = _IMAGE_RESOURCE_DATA_ENTRY;
+ {$EXTERNALSYM IMAGE_RESOURCE_DATA_ENTRY}
+ TImageResourceDataEntry = IMAGE_RESOURCE_DATA_ENTRY;
+ PImageResourceDataEntry = PIMAGE_RESOURCE_DATA_ENTRY;
+
+//
+// Load Configuration Directory Entry
+//
+
+type
+ PIMAGE_LOAD_CONFIG_DIRECTORY32 = ^IMAGE_LOAD_CONFIG_DIRECTORY32;
+ {$EXTERNALSYM PIMAGE_LOAD_CONFIG_DIRECTORY32}
+ IMAGE_LOAD_CONFIG_DIRECTORY32 = record
+ Size: DWORD;
+ TimeDateStamp: DWORD;
+ MajorVersion: WORD;
+ MinorVersion: WORD;
+ GlobalFlagsClear: DWORD;
+ GlobalFlagsSet: DWORD;
+ CriticalSectionDefaultTimeout: DWORD;
+ DeCommitFreeBlockThreshold: DWORD;
+ DeCommitTotalFreeThreshold: DWORD;
+ LockPrefixTable: DWORD; // VA
+ MaximumAllocationSize: DWORD;
+ VirtualMemoryThreshold: DWORD;
+ ProcessHeapFlags: DWORD;
+ ProcessAffinityMask: DWORD;
+ CSDVersion: WORD;
+ Reserved1: WORD;
+ EditList: DWORD; // VA
+ SecurityCookie: DWORD; // VA
+ SEHandlerTable: DWORD; // VA
+ SEHandlerCount: DWORD;
+ end;
+ {$EXTERNALSYM IMAGE_LOAD_CONFIG_DIRECTORY32}
+ TImageLoadConfigDirectory32 = IMAGE_LOAD_CONFIG_DIRECTORY32;
+ PImageLoadConfigDirectory32 = PIMAGE_LOAD_CONFIG_DIRECTORY32;
+
+ PIMAGE_LOAD_CONFIG_DIRECTORY64 = ^IMAGE_LOAD_CONFIG_DIRECTORY64;
+ {$EXTERNALSYM PIMAGE_LOAD_CONFIG_DIRECTORY64}
+ IMAGE_LOAD_CONFIG_DIRECTORY64 = record
+ Size: DWORD;
+ TimeDateStamp: DWORD;
+ MajorVersion: WORD;
+ MinorVersion: WORD;
+ GlobalFlagsClear: DWORD;
+ GlobalFlagsSet: DWORD;
+ CriticalSectionDefaultTimeout: DWORD;
+ DeCommitFreeBlockThreshold: ULONGLONG;
+ DeCommitTotalFreeThreshold: ULONGLONG;
+ LockPrefixTable: ULONGLONG; // VA
+ MaximumAllocationSize: ULONGLONG;
+ VirtualMemoryThreshold: ULONGLONG;
+ ProcessAffinityMask: ULONGLONG;
+ ProcessHeapFlags: DWORD;
+ CSDVersion: WORD;
+ Reserved1: WORD;
+ EditList: ULONGLONG; // VA
+ SecurityCookie: ULONGLONG; // VA
+ SEHandlerTable: ULONGLONG; // VA
+ SEHandlerCount: ULONGLONG;
+ end;
+ {$EXTERNALSYM IMAGE_LOAD_CONFIG_DIRECTORY64}
+ TImageLoadConfigDirectory64 = IMAGE_LOAD_CONFIG_DIRECTORY64;
+ PImageLoadConfigDirectory64 = PIMAGE_LOAD_CONFIG_DIRECTORY64;
+
+ IMAGE_LOAD_CONFIG_DIRECTORY = IMAGE_LOAD_CONFIG_DIRECTORY32;
+ {$EXTERNALSYM IMAGE_LOAD_CONFIG_DIRECTORY}
+ PIMAGE_LOAD_CONFIG_DIRECTORY = PIMAGE_LOAD_CONFIG_DIRECTORY32;
+ {$EXTERNALSYM PIMAGE_LOAD_CONFIG_DIRECTORY}
+ TImageLoadConfigDirectory = TImageLoadConfigDirectory32;
+ PImageLoadConfigDirectory = PImageLoadConfigDirectory32;
+
+//
+// WIN CE Exception table format
+//
+
+//
+// Function table entry format. Function table is pointed to by the
+// IMAGE_DIRECTORY_ENTRY_EXCEPTION directory entry.
+//
+
+type
+ PIMAGE_CE_RUNTIME_FUNCTION_ENTRY = ^IMAGE_CE_RUNTIME_FUNCTION_ENTRY;
+ {$EXTERNALSYM PIMAGE_CE_RUNTIME_FUNCTION_ENTRY}
+ _IMAGE_CE_RUNTIME_FUNCTION_ENTRY = record
+ FuncStart: DWORD;
+ Flags: DWORD;
+ //DWORD PrologLen : 8;
+ //DWORD FuncLen : 22;
+ //DWORD ThirtyTwoBit : 1;
+ //DWORD ExceptionFlag : 1;
+ end;
+ {$EXTERNALSYM _IMAGE_CE_RUNTIME_FUNCTION_ENTRY}
+ IMAGE_CE_RUNTIME_FUNCTION_ENTRY = _IMAGE_CE_RUNTIME_FUNCTION_ENTRY;
+ {$EXTERNALSYM IMAGE_CE_RUNTIME_FUNCTION_ENTRY}
+ TImageCERuntimeFunctionEntry = IMAGE_CE_RUNTIME_FUNCTION_ENTRY;
+ PImageCERuntimeFunctionEntry = PIMAGE_CE_RUNTIME_FUNCTION_ENTRY;
+
+//
+// Debug Format
+//
+
+type
+ PIMAGE_DEBUG_DIRECTORY = ^IMAGE_DEBUG_DIRECTORY;
+ {$EXTERNALSYM PIMAGE_DEBUG_DIRECTORY}
+ _IMAGE_DEBUG_DIRECTORY = record
+ Characteristics: DWORD;
+ TimeDateStamp: DWORD;
+ MajorVersion: Word;
+ MinorVersion: Word;
+ Type_: DWORD;
+ SizeOfData: DWORD;
+ AddressOfRawData: DWORD;
+ PointerToRawData: DWORD;
+ end;
+ {$EXTERNALSYM _IMAGE_DEBUG_DIRECTORY}
+ IMAGE_DEBUG_DIRECTORY = _IMAGE_DEBUG_DIRECTORY;
+ {$EXTERNALSYM IMAGE_DEBUG_DIRECTORY}
+ TImageDebugDirectory = IMAGE_DEBUG_DIRECTORY;
+ PImageDebugDirectory = PIMAGE_DEBUG_DIRECTORY;
+
+const
+ IMAGE_DEBUG_TYPE_UNKNOWN = 0;
+ {$EXTERNALSYM IMAGE_DEBUG_TYPE_UNKNOWN}
+ IMAGE_DEBUG_TYPE_COFF = 1;
+ {$EXTERNALSYM IMAGE_DEBUG_TYPE_COFF}
+ IMAGE_DEBUG_TYPE_CODEVIEW = 2;
+ {$EXTERNALSYM IMAGE_DEBUG_TYPE_CODEVIEW}
+ IMAGE_DEBUG_TYPE_FPO = 3;
+ {$EXTERNALSYM IMAGE_DEBUG_TYPE_FPO}
+ IMAGE_DEBUG_TYPE_MISC = 4;
+ {$EXTERNALSYM IMAGE_DEBUG_TYPE_MISC}
+ IMAGE_DEBUG_TYPE_EXCEPTION = 5;
+ {$EXTERNALSYM IMAGE_DEBUG_TYPE_EXCEPTION}
+ IMAGE_DEBUG_TYPE_FIXUP = 6;
+ {$EXTERNALSYM IMAGE_DEBUG_TYPE_FIXUP}
+ IMAGE_DEBUG_TYPE_OMAP_TO_SRC = 7;
+ {$EXTERNALSYM IMAGE_DEBUG_TYPE_OMAP_TO_SRC}
+ IMAGE_DEBUG_TYPE_OMAP_FROM_SRC = 8;
+ {$EXTERNALSYM IMAGE_DEBUG_TYPE_OMAP_FROM_SRC}
+ IMAGE_DEBUG_TYPE_BORLAND = 9;
+ {$EXTERNALSYM IMAGE_DEBUG_TYPE_BORLAND}
+ IMAGE_DEBUG_TYPE_RESERVED10 = 10;
+ {$EXTERNALSYM IMAGE_DEBUG_TYPE_RESERVED10}
+ IMAGE_DEBUG_TYPE_CLSID = 11;
+ {$EXTERNALSYM IMAGE_DEBUG_TYPE_CLSID}
+
+type
+ PIMAGE_COFF_SYMBOLS_HEADER = ^IMAGE_COFF_SYMBOLS_HEADER;
+ {$EXTERNALSYM PIMAGE_COFF_SYMBOLS_HEADER}
+ _IMAGE_COFF_SYMBOLS_HEADER = record
+ NumberOfSymbols: DWORD;
+ LvaToFirstSymbol: DWORD;
+ NumberOfLinenumbers: DWORD;
+ LvaToFirstLinenumber: DWORD;
+ RvaToFirstByteOfCode: DWORD;
+ RvaToLastByteOfCode: DWORD;
+ RvaToFirstByteOfData: DWORD;
+ RvaToLastByteOfData: DWORD;
+ end;
+ {$EXTERNALSYM _IMAGE_COFF_SYMBOLS_HEADER}
+ IMAGE_COFF_SYMBOLS_HEADER = _IMAGE_COFF_SYMBOLS_HEADER;
+ {$EXTERNALSYM IMAGE_COFF_SYMBOLS_HEADER}
+ TImageCoffSymbolsHeader = IMAGE_COFF_SYMBOLS_HEADER;
+ PImageCoffSymbolsHeader = PIMAGE_COFF_SYMBOLS_HEADER;
+
+const
+ FRAME_FPO = 0;
+ {$EXTERNALSYM FRAME_FPO}
+ FRAME_TRAP = 1;
+ {$EXTERNALSYM FRAME_TRAP}
+ FRAME_TSS = 2;
+ {$EXTERNALSYM FRAME_TSS}
+ FRAME_NONFPO = 3;
+ {$EXTERNALSYM FRAME_NONFPO}
+
+ FPOFLAGS_PROLOG = $00FF; // # bytes in prolog
+ FPOFLAGS_REGS = $0700; // # regs saved
+ FPOFLAGS_HAS_SEH = $0800; // TRUE if SEH in func
+ FPOFLAGS_USE_BP = $1000; // TRUE if EBP has been allocated
+ FPOFLAGS_RESERVED = $2000; // reserved for future use
+ FPOFLAGS_FRAME = $C000; // frame type
+
+type
+ PFPO_DATA = ^FPO_DATA;
+ {$EXTERNALSYM PFPO_DATA}
+ _FPO_DATA = record
+ ulOffStart: DWORD; // offset 1st byte of function code
+ cbProcSize: DWORD; // # bytes in function
+ cdwLocals: DWORD; // # bytes in locals/4
+ cdwParams: WORD; // # bytes in params/4
+ Flags: WORD;
+ end;
+ {$EXTERNALSYM _FPO_DATA}
+ FPO_DATA = _FPO_DATA;
+ {$EXTERNALSYM FPO_DATA}
+ TFpoData = FPO_DATA;
+ PFpoData = PFPO_DATA;
+
+const
+ SIZEOF_RFPO_DATA = 16;
+ {$EXTERNALSYM SIZEOF_RFPO_DATA}
+
+ IMAGE_DEBUG_MISC_EXENAME = 1;
+ {$EXTERNALSYM IMAGE_DEBUG_MISC_EXENAME}
+
+type
+ PIMAGE_DEBUG_MISC = ^IMAGE_DEBUG_MISC;
+ {$EXTERNALSYM PIMAGE_DEBUG_MISC}
+ _IMAGE_DEBUG_MISC = record
+ DataType: DWORD; // type of misc data, see defines
+ Length: DWORD; // total length of record, rounded to four byte multiple.
+ Unicode: ByteBool; // TRUE if data is unicode string
+ Reserved: array [0..2] of Byte;
+ Data: array [0..0] of Byte; // Actual data
+ end;
+ {$EXTERNALSYM _IMAGE_DEBUG_MISC}
+ IMAGE_DEBUG_MISC = _IMAGE_DEBUG_MISC;
+ {$EXTERNALSYM IMAGE_DEBUG_MISC}
+ TImageDebugMisc = IMAGE_DEBUG_MISC;
+ PImageDebugMisc = PIMAGE_DEBUG_MISC;
+
+//
+// Function table extracted from MIPS/ALPHA/IA64 images. Does not contain
+// information needed only for runtime support. Just those fields for
+// each entry needed by a debugger.
+//
+
+ PIMAGE_FUNCTION_ENTRY = ^IMAGE_FUNCTION_ENTRY;
+ {$EXTERNALSYM PIMAGE_FUNCTION_ENTRY}
+ _IMAGE_FUNCTION_ENTRY = record
+ StartingAddress: DWORD;
+ EndingAddress: DWORD;
+ EndOfPrologue: DWORD;
+ end;
+ {$EXTERNALSYM _IMAGE_FUNCTION_ENTRY}
+ IMAGE_FUNCTION_ENTRY = _IMAGE_FUNCTION_ENTRY;
+ {$EXTERNALSYM IMAGE_FUNCTION_ENTRY}
+ TImageFunctionEntry = IMAGE_FUNCTION_ENTRY;
+ PImageFunctionEntry = PIMAGE_FUNCTION_ENTRY;
+
+ PIMAGE_FUNCTION_ENTRY64 = ^IMAGE_FUNCTION_ENTRY64;
+ {$EXTERNALSYM PIMAGE_FUNCTION_ENTRY64}
+ _IMAGE_FUNCTION_ENTRY64 = record
+ StartingAddress: ULONGLONG;
+ EndingAddress: ULONGLONG;
+ case Integer of
+ 0: (EndOfPrologue: ULONGLONG);
+ 1: (UnwindInfoAddress: ULONGLONG);
+ end;
+ {$EXTERNALSYM _IMAGE_FUNCTION_ENTRY64}
+ IMAGE_FUNCTION_ENTRY64 = _IMAGE_FUNCTION_ENTRY64;
+ {$EXTERNALSYM IMAGE_FUNCTION_ENTRY64}
+ TImageFunctionEntry64 = IMAGE_FUNCTION_ENTRY64;
+ PImageFunctionEntry64 = PIMAGE_FUNCTION_ENTRY64;
+
+//
+// Debugging information can be stripped from an image file and placed
+// in a separate .DBG file, whose file name part is the same as the
+// image file name part (e.g. symbols for CMD.EXE could be stripped
+// and placed in CMD.DBG). This is indicated by the IMAGE_FILE_DEBUG_STRIPPED
+// flag in the Characteristics field of the file header. The beginning of
+// the .DBG file contains the following structure which captures certain
+// information from the image file. This allows a debug to proceed even if
+// the original image file is not accessable. This header is followed by
+// zero of more IMAGE_SECTION_HEADER structures, followed by zero or more
+// IMAGE_DEBUG_DIRECTORY structures. The latter structures and those in
+// the image file contain file offsets relative to the beginning of the
+// .DBG file.
+//
+// If symbols have been stripped from an image, the IMAGE_DEBUG_MISC structure
+// is left in the image file, but not mapped. This allows a debugger to
+// compute the name of the .DBG file, from the name of the image in the
+// IMAGE_DEBUG_MISC structure.
+//
+
+ PIMAGE_SEPARATE_DEBUG_HEADER = ^IMAGE_SEPARATE_DEBUG_HEADER;
+ {$EXTERNALSYM PIMAGE_SEPARATE_DEBUG_HEADER}
+ _IMAGE_SEPARATE_DEBUG_HEADER = record
+ Signature: Word;
+ Flags: Word;
+ Machine: Word;
+ Characteristics: Word;
+ TimeDateStamp: DWORD;
+ CheckSum: DWORD;
+ ImageBase: DWORD;
+ SizeOfImage: DWORD;
+ NumberOfSections: DWORD;
+ ExportedNamesSize: DWORD;
+ DebugDirectorySize: DWORD;
+ SectionAlignment: DWORD;
+ Reserved: array [0..1] of DWORD;
+ end;
+ {$EXTERNALSYM _IMAGE_SEPARATE_DEBUG_HEADER}
+ IMAGE_SEPARATE_DEBUG_HEADER = _IMAGE_SEPARATE_DEBUG_HEADER;
+ {$EXTERNALSYM IMAGE_SEPARATE_DEBUG_HEADER}
+ TImageSeparateDebugHeader = IMAGE_SEPARATE_DEBUG_HEADER;
+ PImageSeparateDebugHeader = PIMAGE_SEPARATE_DEBUG_HEADER;
+
+ _NON_PAGED_DEBUG_INFO = record
+ Signature: WORD;
+ Flags: WORD;
+ Size: DWORD;
+ Machine: WORD;
+ Characteristics: WORD;
+ TimeDateStamp: DWORD;
+ CheckSum: DWORD;
+ SizeOfImage: DWORD;
+ ImageBase: ULONGLONG;
+ //DebugDirectorySize
+ //IMAGE_DEBUG_DIRECTORY
+ end;
+ {$EXTERNALSYM _NON_PAGED_DEBUG_INFO}
+ NON_PAGED_DEBUG_INFO = _NON_PAGED_DEBUG_INFO;
+ {$EXTERNALSYM NON_PAGED_DEBUG_INFO}
+ PNON_PAGED_DEBUG_INFO = ^NON_PAGED_DEBUG_INFO;
+ {$EXTERNALSYM PNON_PAGED_DEBUG_INFO}
+
+const
+ IMAGE_SEPARATE_DEBUG_SIGNATURE = $4944;
+ {$EXTERNALSYM IMAGE_SEPARATE_DEBUG_SIGNATURE}
+ NON_PAGED_DEBUG_SIGNATURE = $494E;
+ {$EXTERNALSYM NON_PAGED_DEBUG_SIGNATURE}
+
+ IMAGE_SEPARATE_DEBUG_FLAGS_MASK = $8000;
+ {$EXTERNALSYM IMAGE_SEPARATE_DEBUG_FLAGS_MASK}
+ IMAGE_SEPARATE_DEBUG_MISMATCH = $8000; // when DBG was updated, the old checksum didn't match.
+ {$EXTERNALSYM IMAGE_SEPARATE_DEBUG_MISMATCH}
+
+//
+// The .arch section is made up of headers, each describing an amask position/value
+// pointing to an array of IMAGE_ARCHITECTURE_ENTRY's. Each "array" (both the header
+// and entry arrays) are terminiated by a quadword of 0xffffffffL.
+//
+// NOTE: There may be quadwords of 0 sprinkled around and must be skipped.
+//
+
+const
+ IAHMASK_VALUE = $00000001; // 1 -> code section depends on mask bit
+ // 0 -> new instruction depends on mask bit
+ IAHMASK_MBZ7 = $000000FE; // MBZ
+ IAHMASK_SHIFT = $0000FF00; // Amask bit in question for this fixup
+ IAHMASK_MBZ16 = DWORD($FFFF0000); // MBZ
+
+type
+ PIMAGE_ARCHITECTURE_HEADER = ^IMAGE_ARCHITECTURE_HEADER;
+ {$EXTERNALSYM PIMAGE_ARCHITECTURE_HEADER}
+ _ImageArchitectureHeader = record
+ Mask: DWORD;
+ FirstEntryRVA: DWORD; // RVA into .arch section to array of ARCHITECTURE_ENTRY's
+ end;
+ {$EXTERNALSYM _ImageArchitectureHeader}
+ IMAGE_ARCHITECTURE_HEADER = _ImageArchitectureHeader;
+ {$EXTERNALSYM IMAGE_ARCHITECTURE_HEADER}
+ TImageArchitectureHeader = IMAGE_ARCHITECTURE_HEADER;
+ PImageArchitectureHeader = PIMAGE_ARCHITECTURE_HEADER;
+
+ PIMAGE_ARCHITECTURE_ENTRY = ^IMAGE_ARCHITECTURE_ENTRY;
+ {$EXTERNALSYM PIMAGE_ARCHITECTURE_ENTRY}
+ _ImageArchitectureEntry = record
+ FixupInstRVA: DWORD; // RVA of instruction to fixup
+ NewInst: DWORD; // fixup instruction (see alphaops.h)
+ end;
+ {$EXTERNALSYM _ImageArchitectureEntry}
+ IMAGE_ARCHITECTURE_ENTRY = _ImageArchitectureEntry;
+ {$EXTERNALSYM IMAGE_ARCHITECTURE_ENTRY}
+ TImageArchitectureEntry = IMAGE_ARCHITECTURE_ENTRY;
+ PImageArchitectureEntry = PIMAGE_ARCHITECTURE_ENTRY;
+
+// #include "poppack.h" // Back to the initial value
+
+// The following structure defines the new import object. Note the values of the first two fields,
+// which must be set as stated in order to differentiate old and new import members.
+// Following this structure, the linker emits two null-terminated strings used to recreate the
+// import at the time of use. The first string is the import's name, the second is the dll's name.
+
+const
+ IMPORT_OBJECT_HDR_SIG2 = $ffff;
+ {$EXTERNALSYM IMPORT_OBJECT_HDR_SIG2}
+
+const
+ IOHFLAGS_TYPE = $0003; // IMPORT_TYPE
+ IAHFLAGS_NAMETYPE = $001C; // IMPORT_NAME_TYPE
+ IAHFLAGS_RESERVED = $FFE0; // Reserved. Must be zero.
+
+type
+ PImportObjectHeader = ^IMPORT_OBJECT_HEADER;
+ IMPORT_OBJECT_HEADER = record
+ Sig1: WORD; // Must be IMAGE_FILE_MACHINE_UNKNOWN
+ Sig2: WORD; // Must be IMPORT_OBJECT_HDR_SIG2.
+ Version: WORD;
+ Machine: WORD;
+ TimeDateStamp: DWORD; // Time/date stamp
+ SizeOfData: DWORD; // particularly useful for incremental links
+ OrdinalOrHint: record
+ case Integer of
+ 0: (Ordinal: WORD); // if grf & IMPORT_OBJECT_ORDINAL
+ 1: (Flags: DWORD);
+ end;
+ Flags: WORD;
+ //WORD Type : 2; // IMPORT_TYPE
+ //WORD NameType : 3; // IMPORT_NAME_TYPE
+ //WORD Reserved : 11; // Reserved. Must be zero.
+ end;
+ {$EXTERNALSYM IMPORT_OBJECT_HEADER}
+ TImportObjectHeader = IMPORT_OBJECT_HEADER;
+
+ IMPORT_OBJECT_TYPE = (IMPORT_OBJECT_CODE, IMPORT_OBJECT_DATA, IMPORT_OBJECT_CONST);
+ {$EXTERNALSYM IMPORT_OBJECT_TYPE}
+ TImportObjectType = IMPORT_OBJECT_TYPE;
+
+ IMPORT_OBJECT_NAME_TYPE = (
+ IMPORT_OBJECT_ORDINAL, // Import by ordinal
+ IMPORT_OBJECT_NAME, // Import name == public symbol name.
+ IMPORT_OBJECT_NAME_NO_PREFIX, // Import name == public symbol name skipping leading ?, @, or optionally _.
+ IMPORT_OBJECT_NAME_UNDECORATE); // Import name == public symbol name skipping leading ?, @, or optionally _
+ // and truncating at first @
+ {$EXTERNALSYM IMPORT_OBJECT_NAME_TYPE}
+ TImportObjectNameType = IMPORT_OBJECT_NAME_TYPE;
+
+ ReplacesCorHdrNumericDefines = DWORD;
+ {$EXTERNALSYM ReplacesCorHdrNumericDefines}
+
+const
+
+// COM+ Header entry point flags.
+
+ COMIMAGE_FLAGS_ILONLY = $00000001;
+ {$EXTERNALSYM COMIMAGE_FLAGS_ILONLY}
+ COMIMAGE_FLAGS_32BITREQUIRED = $00000002;
+ {$EXTERNALSYM COMIMAGE_FLAGS_32BITREQUIRED}
+ COMIMAGE_FLAGS_IL_LIBRARY = $00000004;
+ {$EXTERNALSYM COMIMAGE_FLAGS_IL_LIBRARY}
+ COMIMAGE_FLAGS_STRONGNAMESIGNED = $00000008;
+ {$EXTERNALSYM COMIMAGE_FLAGS_STRONGNAMESIGNED}
+ COMIMAGE_FLAGS_TRACKDEBUGDATA = $00010000;
+ {$EXTERNALSYM COMIMAGE_FLAGS_TRACKDEBUGDATA}
+
+// Version flags for image.
+
+ COR_VERSION_MAJOR_V2 = 2;
+ {$EXTERNALSYM COR_VERSION_MAJOR_V2}
+ COR_VERSION_MAJOR = COR_VERSION_MAJOR_V2;
+ {$EXTERNALSYM COR_VERSION_MAJOR}
+ COR_VERSION_MINOR = 0;
+ {$EXTERNALSYM COR_VERSION_MINOR}
+ COR_DELETED_NAME_LENGTH = 8;
+ {$EXTERNALSYM COR_DELETED_NAME_LENGTH}
+ COR_VTABLEGAP_NAME_LENGTH = 8;
+ {$EXTERNALSYM COR_VTABLEGAP_NAME_LENGTH}
+
+// Maximum size of a NativeType descriptor.
+
+ NATIVE_TYPE_MAX_CB = 1;
+ {$EXTERNALSYM NATIVE_TYPE_MAX_CB}
+ COR_ILMETHOD_SECT_SMALL_MAX_DATASIZE= $FF;
+ {$EXTERNALSYM COR_ILMETHOD_SECT_SMALL_MAX_DATASIZE}
+
+// #defines for the MIH FLAGS
+
+ IMAGE_COR_MIH_METHODRVA = $01;
+ {$EXTERNALSYM IMAGE_COR_MIH_METHODRVA}
+ IMAGE_COR_MIH_EHRVA = $02;
+ {$EXTERNALSYM IMAGE_COR_MIH_EHRVA}
+ IMAGE_COR_MIH_BASICBLOCK = $08;
+ {$EXTERNALSYM IMAGE_COR_MIH_BASICBLOCK}
+
+// V-table constants
+
+ COR_VTABLE_32BIT = $01; // V-table slots are 32-bits in size.
+ {$EXTERNALSYM COR_VTABLE_32BIT}
+ COR_VTABLE_64BIT = $02; // V-table slots are 64-bits in size.
+ {$EXTERNALSYM COR_VTABLE_64BIT}
+ COR_VTABLE_FROM_UNMANAGED = $04; // If set, transition from unmanaged.
+ {$EXTERNALSYM COR_VTABLE_FROM_UNMANAGED}
+ COR_VTABLE_CALL_MOST_DERIVED = $10; // Call most derived method described by
+ {$EXTERNALSYM COR_VTABLE_CALL_MOST_DERIVED}
+
+// EATJ constants
+
+ IMAGE_COR_EATJ_THUNK_SIZE = 32; // Size of a jump thunk reserved range.
+ {$EXTERNALSYM IMAGE_COR_EATJ_THUNK_SIZE}
+
+// Max name lengths
+// Change to unlimited name lengths.
+
+ MAX_CLASS_NAME = 1024;
+ {$EXTERNALSYM MAX_CLASS_NAME}
+ MAX_PACKAGE_NAME = 1024;
+ {$EXTERNALSYM MAX_PACKAGE_NAME}
+
+// COM+ 2.0 header structure.
+
+type
+ IMAGE_COR20_HEADER = record
+
+ // Header versioning
+
+ cb: DWORD;
+ MajorRuntimeVersion: WORD;
+ MinorRuntimeVersion: WORD;
+
+ // Symbol table and startup information
+
+ MetaData: IMAGE_DATA_DIRECTORY;
+ Flags: DWORD;
+ EntryPointToken: DWORD;
+
+ // Binding information
+
+ Resources: IMAGE_DATA_DIRECTORY;
+ StrongNameSignature: IMAGE_DATA_DIRECTORY;
+
+ // Regular fixup and binding information
+
+ CodeManagerTable: IMAGE_DATA_DIRECTORY;
+ VTableFixups: IMAGE_DATA_DIRECTORY;
+ ExportAddressTableJumps: IMAGE_DATA_DIRECTORY;
+
+ // Precompiled image info (internal use only - set to zero)
+
+ ManagedNativeHeader: IMAGE_DATA_DIRECTORY;
+ end;
+ {$EXTERNALSYM IMAGE_COR20_HEADER}
+ PIMAGE_COR20_HEADER = ^IMAGE_COR20_HEADER;
+ {$EXTERNALSYM PIMAGE_COR20_HEADER}
+ TImageCor20Header = IMAGE_COR20_HEADER;
+ PImageCor20Header = PIMAGE_COR20_HEADER;
+
+//
+// End Image Format
+//
+
+type
+ SLIST_ENTRY = SINGLE_LIST_ENTRY;
+ {$EXTERNALSYM SLIST_ENTRY}
+ _SLIST_ENTRY = _SINGLE_LIST_ENTRY;
+ {$EXTERNALSYM _SLIST_ENTRY}
+ PSLIST_ENTRY = PSINGLE_LIST_ENTRY;
+ {$EXTERNALSYM PSLIST_ENTRY}
+ TSListEntry = SLIST_ENTRY;
+ PSListEntry = PSLIST_ENTRY;
+
+type
+ _SLIST_HEADER = record
+ case Integer of
+ 0: (
+ Alignment: ULONGLONG);
+ 1: (
+ Next: SLIST_ENTRY;
+ Depth: WORD;
+ Sequence: WORD);
+ end;
+ {$EXTERNALSYM _SLIST_HEADER}
+ SLIST_HEADER = _SLIST_HEADER;
+ {$EXTERNALSYM SLIST_HEADER}
+ PSLIST_HEADER = ^SLIST_HEADER;
+ {$EXTERNALSYM PSLIST_HEADER}
+ TSListHeader = SLIST_HEADER;
+ PSListHeader = PSLIST_HEADER;
+
+procedure RtlInitializeSListHead(ListHead: PSLIST_HEADER); stdcall;
+{$EXTERNALSYM RtlInitializeSListHead}
+function RtlFirstEntrySList(ListHead: PSLIST_HEADER): PSLIST_ENTRY; stdcall;
+{$EXTERNALSYM RtlFirstEntrySList}
+function RtlInterlockedPopEntrySList(ListHead: PSLIST_HEADER): PSLIST_ENTRY; stdcall;
+{$EXTERNALSYM RtlInterlockedPopEntrySList}
+function RtlInterlockedPushEntrySList(ListHead, ListEntry: PSLIST_HEADER): PSLIST_ENTRY; stdcall;
+{$EXTERNALSYM RtlInterlockedPushEntrySList}
+function RtlInterlockedFlushSList(ListHead: PSLIST_HEADER): PSLIST_ENTRY; stdcall;
+{$EXTERNALSYM RtlInterlockedFlushSList}
+function RtlQueryDepthSList(ListHead: PSLIST_HEADER): WORD; stdcall;
+{$EXTERNALSYM RtlQueryDepthSList}
+
+const
+ HEAP_NO_SERIALIZE = $00000001;
+ {$EXTERNALSYM HEAP_NO_SERIALIZE}
+ HEAP_GROWABLE = $00000002;
+ {$EXTERNALSYM HEAP_GROWABLE}
+ HEAP_GENERATE_EXCEPTIONS = $00000004;
+ {$EXTERNALSYM HEAP_GENERATE_EXCEPTIONS}
+ HEAP_ZERO_MEMORY = $00000008;
+ {$EXTERNALSYM HEAP_ZERO_MEMORY}
+ HEAP_REALLOC_IN_PLACE_ONLY = $00000010;
+ {$EXTERNALSYM HEAP_REALLOC_IN_PLACE_ONLY}
+ HEAP_TAIL_CHECKING_ENABLED = $00000020;
+ {$EXTERNALSYM HEAP_TAIL_CHECKING_ENABLED}
+ HEAP_FREE_CHECKING_ENABLED = $00000040;
+ {$EXTERNALSYM HEAP_FREE_CHECKING_ENABLED}
+ HEAP_DISABLE_COALESCE_ON_FREE = $00000080;
+ {$EXTERNALSYM HEAP_DISABLE_COALESCE_ON_FREE}
+ HEAP_CREATE_ALIGN_16 = $00010000;
+ {$EXTERNALSYM HEAP_CREATE_ALIGN_16}
+ HEAP_CREATE_ENABLE_TRACING = $00020000;
+ {$EXTERNALSYM HEAP_CREATE_ENABLE_TRACING}
+ HEAP_MAXIMUM_TAG = $0FFF;
+ {$EXTERNALSYM HEAP_MAXIMUM_TAG}
+ HEAP_PSEUDO_TAG_FLAG = $8000;
+ {$EXTERNALSYM HEAP_PSEUDO_TAG_FLAG}
+ HEAP_TAG_SHIFT = 18;
+ {$EXTERNALSYM HEAP_TAG_SHIFT}
+
+function HEAP_MAKE_TAG_FLAGS(b, o: DWORD): DWORD;
+{$EXTERNALSYM HEAP_MAKE_TAG_FLAGS}
+
+procedure RtlCaptureContext(ContextRecord: PCONTEXT); stdcall;
+{$EXTERNALSYM RtlCaptureContext}
+
+const
+ IS_TEXT_UNICODE_ASCII16 = $0001;
+ {$EXTERNALSYM IS_TEXT_UNICODE_ASCII16}
+ IS_TEXT_UNICODE_REVERSE_ASCII16 = $0010;
+ {$EXTERNALSYM IS_TEXT_UNICODE_REVERSE_ASCII16}
+
+ IS_TEXT_UNICODE_STATISTICS = $0002;
+ {$EXTERNALSYM IS_TEXT_UNICODE_STATISTICS}
+ IS_TEXT_UNICODE_REVERSE_STATISTICS = $0020;
+ {$EXTERNALSYM IS_TEXT_UNICODE_REVERSE_STATISTICS}
+
+ IS_TEXT_UNICODE_CONTROLS = $0004;
+ {$EXTERNALSYM IS_TEXT_UNICODE_CONTROLS}
+ IS_TEXT_UNICODE_REVERSE_CONTROLS = $0040;
+ {$EXTERNALSYM IS_TEXT_UNICODE_REVERSE_CONTROLS}
+
+ IS_TEXT_UNICODE_SIGNATURE = $0008;
+ {$EXTERNALSYM IS_TEXT_UNICODE_SIGNATURE}
+ IS_TEXT_UNICODE_REVERSE_SIGNATURE = $0080;
+ {$EXTERNALSYM IS_TEXT_UNICODE_REVERSE_SIGNATURE}
+
+ IS_TEXT_UNICODE_ILLEGAL_CHARS = $0100;
+ {$EXTERNALSYM IS_TEXT_UNICODE_ILLEGAL_CHARS}
+ IS_TEXT_UNICODE_ODD_LENGTH = $0200;
+ {$EXTERNALSYM IS_TEXT_UNICODE_ODD_LENGTH}
+ IS_TEXT_UNICODE_DBCS_LEADBYTE = $0400;
+ {$EXTERNALSYM IS_TEXT_UNICODE_DBCS_LEADBYTE}
+ IS_TEXT_UNICODE_NULL_BYTES = $1000;
+ {$EXTERNALSYM IS_TEXT_UNICODE_NULL_BYTES}
+
+ IS_TEXT_UNICODE_UNICODE_MASK = $000F;
+ {$EXTERNALSYM IS_TEXT_UNICODE_UNICODE_MASK}
+ IS_TEXT_UNICODE_REVERSE_MASK = $00F0;
+ {$EXTERNALSYM IS_TEXT_UNICODE_REVERSE_MASK}
+ IS_TEXT_UNICODE_NOT_UNICODE_MASK = $0F00;
+ {$EXTERNALSYM IS_TEXT_UNICODE_NOT_UNICODE_MASK}
+ IS_TEXT_UNICODE_NOT_ASCII_MASK = $F000;
+ {$EXTERNALSYM IS_TEXT_UNICODE_NOT_ASCII_MASK}
+
+ COMPRESSION_FORMAT_NONE = $0000;
+ {$EXTERNALSYM COMPRESSION_FORMAT_NONE}
+ COMPRESSION_FORMAT_DEFAULT = $0001;
+ {$EXTERNALSYM COMPRESSION_FORMAT_DEFAULT}
+ COMPRESSION_FORMAT_LZNT1 = $0002;
+ {$EXTERNALSYM COMPRESSION_FORMAT_LZNT1}
+ COMPRESSION_ENGINE_STANDARD = $0000;
+ {$EXTERNALSYM COMPRESSION_ENGINE_STANDARD}
+ COMPRESSION_ENGINE_MAXIMUM = $0100;
+ {$EXTERNALSYM COMPRESSION_ENGINE_MAXIMUM}
+ COMPRESSION_ENGINE_HIBER = $0200;
+ {$EXTERNALSYM COMPRESSION_ENGINE_HIBER}
+
+function RtlCompareMemory(const Source1, Source2: Pointer; Length: SIZE_T): SIZE_T; stdcall;
+{$EXTERNALSYM RtlCompareMemory}
+
+type
+ PMESSAGE_RESOURCE_ENTRY = ^MESSAGE_RESOURCE_ENTRY;
+ {$EXTERNALSYM PMESSAGE_RESOURCE_ENTRY}
+ _MESSAGE_RESOURCE_ENTRY = record
+ Length: Word;
+ Flags: Word;
+ Text: array [0..0] of Byte;
+ end;
+ {$EXTERNALSYM _MESSAGE_RESOURCE_ENTRY}
+ MESSAGE_RESOURCE_ENTRY = _MESSAGE_RESOURCE_ENTRY;
+ {$EXTERNALSYM MESSAGE_RESOURCE_ENTRY}
+ TMessageResourceEntry = MESSAGE_RESOURCE_ENTRY;
+ PMessageResourceEntry = PMESSAGE_RESOURCE_ENTRY;
+
+const
+ MESSAGE_RESOURCE_UNICODE = $0001;
+ {$EXTERNALSYM MESSAGE_RESOURCE_UNICODE}
+
+type
+ PMESSAGE_RESOURCE_BLOCK = ^MESSAGE_RESOURCE_BLOCK;
+ {$EXTERNALSYM PMESSAGE_RESOURCE_BLOCK}
+ _MESSAGE_RESOURCE_BLOCK = record
+ LowId: DWORD;
+ HighId: DWORD;
+ OffsetToEntries: DWORD;
+ end;
+ {$EXTERNALSYM _MESSAGE_RESOURCE_BLOCK}
+ MESSAGE_RESOURCE_BLOCK = _MESSAGE_RESOURCE_BLOCK;
+ {$EXTERNALSYM MESSAGE_RESOURCE_BLOCK}
+ TMessageResourceBlock = MESSAGE_RESOURCE_BLOCK;
+ PMessageResourceBlock = PMESSAGE_RESOURCE_BLOCK;
+
+ PMESSAGE_RESOURCE_DATA = ^MESSAGE_RESOURCE_DATA;
+ {$EXTERNALSYM PMESSAGE_RESOURCE_DATA}
+ _MESSAGE_RESOURCE_DATA = record
+ NumberOfBlocks: DWORD;
+ Blocks: array [0..0] of MESSAGE_RESOURCE_BLOCK;
+ end;
+ {$EXTERNALSYM _MESSAGE_RESOURCE_DATA}
+ MESSAGE_RESOURCE_DATA = _MESSAGE_RESOURCE_DATA;
+ {$EXTERNALSYM MESSAGE_RESOURCE_DATA}
+ TMessageResourceData = MESSAGE_RESOURCE_DATA;
+ PMessageResourceData = PMESSAGE_RESOURCE_DATA;
+
+ LPOSVERSIONINFOA = ^OSVERSIONINFOA;
+ {$EXTERNALSYM LPOSVERSIONINFOA}
+ _OSVERSIONINFOA = record
+ dwOSVersionInfoSize: DWORD;
+ dwMajorVersion: DWORD;
+ dwMinorVersion: DWORD;
+ dwBuildNumber: DWORD;
+ dwPlatformId: DWORD;
+ szCSDVersion: array [0..127] of CHAR; // Maintenance string for PSS usage
+ end;
+ {$EXTERNALSYM _OSVERSIONINFOA}
+ OSVERSIONINFOA = _OSVERSIONINFOA;
+ {$EXTERNALSYM OSVERSIONINFOA}
+ TOsVersionInfoA = OSVERSIONINFOA;
+ POsVersionInfoA = LPOSVERSIONINFOA;
+
+ LPOSVERSIONINFOW = ^OSVERSIONINFOW;
+ {$EXTERNALSYM LPOSVERSIONINFOW}
+ _OSVERSIONINFOW = record
+ dwOSVersionInfoSize: DWORD;
+ dwMajorVersion: DWORD;
+ dwMinorVersion: DWORD;
+ dwBuildNumber: DWORD;
+ dwPlatformId: DWORD;
+ szCSDVersion: array [0..127] of WCHAR; // Maintenance string for PSS usage
+ end;
+ {$EXTERNALSYM _OSVERSIONINFOW}
+ OSVERSIONINFOW = _OSVERSIONINFOW;
+ {$EXTERNALSYM OSVERSIONINFOW}
+ TOsVersionInfoW = OSVERSIONINFOW;
+ POsVersionInfoW = LPOSVERSIONINFOW;
+
+ {$IFDEF UNICODE}
+ OSVERSIONINFO = OSVERSIONINFOW;
+ {$EXTERNALSYM OSVERSIONINFO}
+ POSVERSIONINFO = POSVERSIONINFOW;
+ {$EXTERNALSYM POSVERSIONINFO}
+ LPOSVERSIONINFO = LPOSVERSIONINFOW;
+ {$EXTERNALSYM LPOSVERSIONINFO}
+ TOSVersionInfo = TOSVersionInfoW;
+ {$ELSE}
+ OSVERSIONINFO = OSVERSIONINFOA;
+ {$EXTERNALSYM OSVERSIONINFO}
+ POSVERSIONINFO = POSVERSIONINFOA;
+ {$EXTERNALSYM POSVERSIONINFO}
+ LPOSVERSIONINFO = LPOSVERSIONINFOA;
+ {$EXTERNALSYM LPOSVERSIONINFO}
+ TOSVersionInfo = TOSVersionInfoA;
+ {$ENDIF UNICODE}
+
+type
+ POSVERSIONINFOEXA = ^OSVERSIONINFOEXA;
+ {$EXTERNALSYM POSVERSIONINFOEXA}
+ _OSVERSIONINFOEXA = record
+ dwOSVersionInfoSize: DWORD;
+ dwMajorVersion: DWORD;
+ dwMinorVersion: DWORD;
+ dwBuildNumber: DWORD;
+ dwPlatformId: DWORD;
+ szCSDVersion: array [0..127] of CHAR; // Maintenance string for PSS usage
+ wServicePackMajor: WORD;
+ wServicePackMinor: WORD;
+ wSuiteMask: WORD;
+ wProductType: BYTE;
+ wReserved: BYTE;
+ end;
+ {$EXTERNALSYM _OSVERSIONINFOEXA}
+ OSVERSIONINFOEXA = _OSVERSIONINFOEXA;
+ {$EXTERNALSYM OSVERSIONINFOEXA}
+ LPOSVERSIONINFOEXA = ^OSVERSIONINFOEXA;
+ {$EXTERNALSYM LPOSVERSIONINFOEXA}
+ TOSVersionInfoExA = _OSVERSIONINFOEXA;
+
+ POSVERSIONINFOEXW = ^OSVERSIONINFOEXW;
+ {$EXTERNALSYM POSVERSIONINFOEXW}
+ _OSVERSIONINFOEXW = record
+ dwOSVersionInfoSize: DWORD;
+ dwMajorVersion: DWORD;
+ dwMinorVersion: DWORD;
+ dwBuildNumber: DWORD;
+ dwPlatformId: DWORD;
+ szCSDVersion: array [0..127] of WCHAR; // Maintenance string for PSS usage
+ wServicePackMajor: WORD;
+ wServicePackMinor: WORD;
+ wSuiteMask: WORD;
+ wProductType: BYTE;
+ wReserved: BYTE;
+ end;
+ {$EXTERNALSYM _OSVERSIONINFOEXW}
+ OSVERSIONINFOEXW = _OSVERSIONINFOEXW;
+ {$EXTERNALSYM OSVERSIONINFOEXW}
+ LPOSVERSIONINFOEXW = ^OSVERSIONINFOEXW;
+ {$EXTERNALSYM LPOSVERSIONINFOEXW}
+ RTL_OSVERSIONINFOEXW = _OSVERSIONINFOEXW;
+ {$EXTERNALSYM RTL_OSVERSIONINFOEXW}
+ PRTL_OSVERSIONINFOEXW = ^RTL_OSVERSIONINFOEXW;
+ {$EXTERNALSYM PRTL_OSVERSIONINFOEXW}
+ TOSVersionInfoExW = _OSVERSIONINFOEXW;
+
+ {$IFDEF UNICODE}
+ OSVERSIONINFOEX = OSVERSIONINFOEXW;
+ {$EXTERNALSYM OSVERSIONINFOEX}
+ POSVERSIONINFOEX = POSVERSIONINFOEXW;
+ {$EXTERNALSYM POSVERSIONINFOEX}
+ LPOSVERSIONINFOEX = LPOSVERSIONINFOEXW;
+ {$EXTERNALSYM LPOSVERSIONINFOEX}
+ TOSVersionInfoEx = TOSVersionInfoExW;
+ {$ELSE}
+ OSVERSIONINFOEX = OSVERSIONINFOEXA;
+ {$EXTERNALSYM OSVERSIONINFOEX}
+ POSVERSIONINFOEX = POSVERSIONINFOEXA;
+ {$EXTERNALSYM POSVERSIONINFOEX}
+ LPOSVERSIONINFOEX = LPOSVERSIONINFOEXA;
+ {$EXTERNALSYM LPOSVERSIONINFOEX}
+ TOSVersionInfoEx = TOSVersionInfoExA;
+ {$ENDIF UNICODE}
+
+//
+// RtlVerifyVersionInfo() conditions
+//
+
+const
+ VER_EQUAL = 1;
+ {$EXTERNALSYM VER_EQUAL}
+ VER_GREATER = 2;
+ {$EXTERNALSYM VER_GREATER}
+ VER_GREATER_EQUAL = 3;
+ {$EXTERNALSYM VER_GREATER_EQUAL}
+ VER_LESS = 4;
+ {$EXTERNALSYM VER_LESS}
+ VER_LESS_EQUAL = 5;
+ {$EXTERNALSYM VER_LESS_EQUAL}
+ VER_AND = 6;
+ {$EXTERNALSYM VER_AND}
+ VER_OR = 7;
+ {$EXTERNALSYM VER_OR}
+
+ VER_CONDITION_MASK = 7;
+ {$EXTERNALSYM VER_CONDITION_MASK}
+ VER_NUM_BITS_PER_CONDITION_MASK = 3;
+ {$EXTERNALSYM VER_NUM_BITS_PER_CONDITION_MASK}
+
+//
+// RtlVerifyVersionInfo() type mask bits
+//
+
+ VER_MINORVERSION = $0000001;
+ {$EXTERNALSYM VER_MINORVERSION}
+ VER_MAJORVERSION = $0000002;
+ {$EXTERNALSYM VER_MAJORVERSION}
+ VER_BUILDNUMBER = $0000004;
+ {$EXTERNALSYM VER_BUILDNUMBER}
+ VER_PLATFORMID = $0000008;
+ {$EXTERNALSYM VER_PLATFORMID}
+ VER_SERVICEPACKMINOR = $0000010;
+ {$EXTERNALSYM VER_SERVICEPACKMINOR}
+ VER_SERVICEPACKMAJOR = $0000020;
+ {$EXTERNALSYM VER_SERVICEPACKMAJOR}
+ VER_SUITENAME = $0000040;
+ {$EXTERNALSYM VER_SUITENAME}
+ VER_PRODUCT_TYPE = $0000080;
+ {$EXTERNALSYM VER_PRODUCT_TYPE}
+
+//
+// RtlVerifyVersionInfo() os product type values
+//
+
+ VER_NT_WORKSTATION = $0000001;
+ {$EXTERNALSYM VER_NT_WORKSTATION}
+ VER_NT_DOMAIN_CONTROLLER = $0000002;
+ {$EXTERNALSYM VER_NT_DOMAIN_CONTROLLER}
+ VER_NT_SERVER = $0000003;
+ {$EXTERNALSYM VER_NT_SERVER}
+
+//
+// dwPlatformId defines:
+//
+
+ VER_PLATFORM_WIN32s = 0;
+ {$EXTERNALSYM VER_PLATFORM_WIN32s}
+ VER_PLATFORM_WIN32_WINDOWS = 1;
+ {$EXTERNALSYM VER_PLATFORM_WIN32_WINDOWS}
+ VER_PLATFORM_WIN32_NT = 2;
+ {$EXTERNALSYM VER_PLATFORM_WIN32_NT}
+
+//
+//
+// VerifyVersionInfo() macro to set the condition mask
+//
+// For documentation sakes here's the old version of the macro that got
+// changed to call an API
+// #define VER_SET_CONDITION(_m_,_t_,_c_) _m_=(_m_|(_c_<<(1<<_t_)))
+//
+
+procedure VER_SET_CONDITION(var Mask: DWORDLONG; TypeBitmask, ConditionMask: ULONG);
+{$EXTERNALSYM VER_SET_CONDITION}
+
+function VerSetConditionMask(ConditionMask: ULONGLONG; TypeMask: DWORD;
+ Condition: BYTE): ULONGLONG; stdcall;
+{$EXTERNALSYM VerSetConditionMask}
+
+type
+ PRTL_CRITICAL_SECTION_DEBUG = ^RTL_CRITICAL_SECTION_DEBUG;
+ {$EXTERNALSYM PRTL_CRITICAL_SECTION_DEBUG}
+ _RTL_CRITICAL_SECTION_DEBUG = record
+ _Type: WORD;
+ CreatorBackTraceIndex: WORD;
+ CriticalSection: PRTL_CRITICAL_SECTION_DEBUG;
+ ProcessLocksList: LIST_ENTRY;
+ EntryCount: DWORD;
+ ContentionCount: DWORD;
+ Spare: array [0..1] of DWORD;
+ end;
+ {$EXTERNALSYM _RTL_CRITICAL_SECTION_DEBUG}
+ RTL_CRITICAL_SECTION_DEBUG = _RTL_CRITICAL_SECTION_DEBUG;
+ {$EXTERNALSYM RTL_CRITICAL_SECTION_DEBUG}
+ TRtlCriticalSectionDebug = RTL_CRITICAL_SECTION_DEBUG;
+ PRtlCriticalSectionDebug = PRTL_CRITICAL_SECTION_DEBUG;
+ RTL_RESOURCE_DEBUG = _RTL_CRITICAL_SECTION_DEBUG;
+ {$EXTERNALSYM RTL_RESOURCE_DEBUG}
+ PRTL_RESOURCE_DEBUG = RTL_RESOURCE_DEBUG;
+ {$EXTERNALSYM PRTL_RESOURCE_DEBUG}
+ TRtlResourceDebug = RTL_CRITICAL_SECTION_DEBUG;
+ PRtlResourceDebug = PRTL_CRITICAL_SECTION_DEBUG;
+
+const
+ RTL_CRITSECT_TYPE = 0;
+ {$EXTERNALSYM RTL_CRITSECT_TYPE}
+ RTL_RESOURCE_TYPE = 1;
+ {$EXTERNALSYM RTL_RESOURCE_TYPE}
+
+type
+ PRTL_CRITICAL_SECTION = ^RTL_CRITICAL_SECTION;
+ {$EXTERNALSYM PRTL_CRITICAL_SECTION}
+ _RTL_CRITICAL_SECTION = record
+ DebugInfo: PRTL_CRITICAL_SECTION_DEBUG;
+
+ //
+ // The following three fields control entering and exiting the critical
+ // section for the resource
+ //
+
+ LockCount: LONG;
+ RecursionCount: LONG;
+ OwningThread: HANDLE; // from the thread's ClientId->UniqueThread
+ LockSemaphore: HANDLE;
+ SpinCount: ULONG_PTR; // force size on 64-bit systems when packed
+ end;
+ {$EXTERNALSYM _RTL_CRITICAL_SECTION}
+ RTL_CRITICAL_SECTION = _RTL_CRITICAL_SECTION;
+ {$EXTERNALSYM RTL_CRITICAL_SECTION}
+ TRtlCriticalSection = RTL_CRITICAL_SECTION;
+ PRtlCriticalSection = PRTL_CRITICAL_SECTION;
+
+ RTL_VERIFIER_DLL_LOAD_CALLBACK = procedure(DllName: PWSTR; DllBase: PVOID; DllSize: SIZE_T;
+ Reserved: PVOID); stdcall;
+ {$EXTERNALSYM RTL_VERIFIER_DLL_LOAD_CALLBACK}
+
+ RTL_VERIFIER_DLL_UNLOAD_CALLBACK = procedure(DllName: PWSTR; DllBase: PVOID; DllSize: SIZE_T;
+ Reserved: PVOID); stdcall;
+ {$EXTERNALSYM RTL_VERIFIER_DLL_UNLOAD_CALLBACK}
+
+ RTL_VERIFIER_NTDLLHEAPFREE_CALLBACK = procedure(AllocationBase: PVOID; AllocationSize: SIZE_T); stdcall;
+ {$EXTERNALSYM RTL_VERIFIER_NTDLLHEAPFREE_CALLBACK}
+
+ PRTL_VERIFIER_THUNK_DESCRIPTOR = ^RTL_VERIFIER_THUNK_DESCRIPTOR;
+ {$EXTERNALSYM PRTL_VERIFIER_THUNK_DESCRIPTOR}
+ _RTL_VERIFIER_THUNK_DESCRIPTOR = record
+ ThunkName: PCHAR;
+ ThunkOldAddress: PVOID;
+ ThunkNewAddress: PVOID;
+ end;
+ {$EXTERNALSYM _RTL_VERIFIER_THUNK_DESCRIPTOR}
+ RTL_VERIFIER_THUNK_DESCRIPTOR = _RTL_VERIFIER_THUNK_DESCRIPTOR;
+ {$EXTERNALSYM RTL_VERIFIER_THUNK_DESCRIPTOR}
+ TRtlVerifierThunkDescriptor = RTL_VERIFIER_THUNK_DESCRIPTOR;
+ PRtlVerifierThunkDescriptor = PRTL_VERIFIER_THUNK_DESCRIPTOR;
+
+ PRTL_VERIFIER_DLL_DESCRIPTOR = ^RTL_VERIFIER_DLL_DESCRIPTOR;
+ {$EXTERNALSYM PRTL_VERIFIER_DLL_DESCRIPTOR}
+ _RTL_VERIFIER_DLL_DESCRIPTOR = record
+ DllName: PWCHAR;
+ DllFlags: DWORD;
+ DllAddress: PVOID;
+ DllThunks: PRTL_VERIFIER_THUNK_DESCRIPTOR;
+ end;
+ {$EXTERNALSYM _RTL_VERIFIER_DLL_DESCRIPTOR}
+ RTL_VERIFIER_DLL_DESCRIPTOR = _RTL_VERIFIER_DLL_DESCRIPTOR;
+ {$EXTERNALSYM RTL_VERIFIER_DLL_DESCRIPTOR}
+ TRtlVerifierDllDescriptor = RTL_VERIFIER_DLL_DESCRIPTOR;
+ PRtlVerifierDllDescriptor = PRTL_VERIFIER_DLL_DESCRIPTOR;
+
+ PRTL_VERIFIER_PROVIDER_DESCRIPTOR = ^RTL_VERIFIER_PROVIDER_DESCRIPTOR;
+ {$EXTERNALSYM PRTL_VERIFIER_PROVIDER_DESCRIPTOR}
+ _RTL_VERIFIER_PROVIDER_DESCRIPTOR = record
+ //
+ // Filled by verifier provider DLL
+ //
+ Length: DWORD;
+ ProviderDlls: PRTL_VERIFIER_DLL_DESCRIPTOR;
+ ProviderDllLoadCallback: RTL_VERIFIER_DLL_LOAD_CALLBACK;
+ ProviderDllUnloadCallback: RTL_VERIFIER_DLL_UNLOAD_CALLBACK;
+ //
+ // Filled by verifier engine
+ //
+ VerifierImage: PWSTR;
+ VerifierFlags: DWORD;
+ VerifierDebug: DWORD;
+
+ RtlpGetStackTraceAddress: PVOID;
+ RtlpDebugPageHeapCreate: PVOID;
+ RtlpDebugPageHeapDestroy: PVOID;
+
+ //
+ // Filled by verifier provider DLL
+ //
+
+ ProviderNtdllHeapFreeCallback: RTL_VERIFIER_NTDLLHEAPFREE_CALLBACK;
+ end;
+ {$EXTERNALSYM _RTL_VERIFIER_PROVIDER_DESCRIPTOR}
+ RTL_VERIFIER_PROVIDER_DESCRIPTOR = _RTL_VERIFIER_PROVIDER_DESCRIPTOR;
+ {$EXTERNALSYM RTL_VERIFIER_PROVIDER_DESCRIPTOR}
+ TRtlVerifierProviderDescriptor = RTL_VERIFIER_PROVIDER_DESCRIPTOR;
+ PRtlVerifierProviderDescriptor = PRTL_VERIFIER_PROVIDER_DESCRIPTOR;
+
+//
+// Application verifier standard flags
+//
+
+const
+ RTL_VRF_FLG_FULL_PAGE_HEAP = $00000001;
+ {$EXTERNALSYM RTL_VRF_FLG_FULL_PAGE_HEAP}
+ RTL_VRF_FLG_RESERVED_DONOTUSE = $00000002; // old RTL_VRF_FLG_LOCK_CHECKS
+ {$EXTERNALSYM RTL_VRF_FLG_RESERVED_DONOTUSE}
+ RTL_VRF_FLG_HANDLE_CHECKS = $00000004;
+ {$EXTERNALSYM RTL_VRF_FLG_HANDLE_CHECKS}
+ RTL_VRF_FLG_STACK_CHECKS = $00000008;
+ {$EXTERNALSYM RTL_VRF_FLG_STACK_CHECKS}
+ RTL_VRF_FLG_APPCOMPAT_CHECKS = $00000010;
+ {$EXTERNALSYM RTL_VRF_FLG_APPCOMPAT_CHECKS}
+ RTL_VRF_FLG_TLS_CHECKS = $00000020;
+ {$EXTERNALSYM RTL_VRF_FLG_TLS_CHECKS}
+ RTL_VRF_FLG_DIRTY_STACKS = $00000040;
+ {$EXTERNALSYM RTL_VRF_FLG_DIRTY_STACKS}
+ RTL_VRF_FLG_RPC_CHECKS = $00000080;
+ {$EXTERNALSYM RTL_VRF_FLG_RPC_CHECKS}
+ RTL_VRF_FLG_COM_CHECKS = $00000100;
+ {$EXTERNALSYM RTL_VRF_FLG_COM_CHECKS}
+ RTL_VRF_FLG_DANGEROUS_APIS = $00000200;
+ {$EXTERNALSYM RTL_VRF_FLG_DANGEROUS_APIS}
+ RTL_VRF_FLG_RACE_CHECKS = $00000400;
+ {$EXTERNALSYM RTL_VRF_FLG_RACE_CHECKS}
+ RTL_VRF_FLG_DEADLOCK_CHECKS = $00000800;
+ {$EXTERNALSYM RTL_VRF_FLG_DEADLOCK_CHECKS}
+ RTL_VRF_FLG_FIRST_CHANCE_EXCEPTION_CHECKS = $00001000;
+ {$EXTERNALSYM RTL_VRF_FLG_FIRST_CHANCE_EXCEPTION_CHECKS}
+ RTL_VRF_FLG_VIRTUAL_MEM_CHECKS = $00002000;
+ {$EXTERNALSYM RTL_VRF_FLG_VIRTUAL_MEM_CHECKS}
+ RTL_VRF_FLG_ENABLE_LOGGING = $00004000;
+ {$EXTERNALSYM RTL_VRF_FLG_ENABLE_LOGGING}
+ RTL_VRF_FLG_FAST_FILL_HEAP = $00008000;
+ {$EXTERNALSYM RTL_VRF_FLG_FAST_FILL_HEAP}
+ RTL_VRF_FLG_VIRTUAL_SPACE_TRACKING = $00010000;
+ {$EXTERNALSYM RTL_VRF_FLG_VIRTUAL_SPACE_TRACKING}
+ RTL_VRF_FLG_ENABLED_SYSTEM_WIDE = $00020000;
+ {$EXTERNALSYM RTL_VRF_FLG_ENABLED_SYSTEM_WIDE}
+ RTL_VRF_FLG_MISCELLANEOUS_CHECKS = $00020000;
+ {$EXTERNALSYM RTL_VRF_FLG_MISCELLANEOUS_CHECKS}
+ RTL_VRF_FLG_LOCK_CHECKS = $00040000;
+ {$EXTERNALSYM RTL_VRF_FLG_LOCK_CHECKS}
+
+//
+// Application verifier standard stop codes
+//
+
+ APPLICATION_VERIFIER_INTERNAL_ERROR = DWORD($80000000);
+ {$EXTERNALSYM APPLICATION_VERIFIER_INTERNAL_ERROR}
+ APPLICATION_VERIFIER_INTERNAL_WARNING = $40000000;
+ {$EXTERNALSYM APPLICATION_VERIFIER_INTERNAL_WARNING}
+ APPLICATION_VERIFIER_NO_BREAK = $20000000;
+ {$EXTERNALSYM APPLICATION_VERIFIER_NO_BREAK}
+ APPLICATION_VERIFIER_CONTINUABLE_BREAK = $10000000;
+ {$EXTERNALSYM APPLICATION_VERIFIER_CONTINUABLE_BREAK}
+
+ APPLICATION_VERIFIER_UNKNOWN_ERROR = $0001;
+ {$EXTERNALSYM APPLICATION_VERIFIER_UNKNOWN_ERROR}
+ APPLICATION_VERIFIER_ACCESS_VIOLATION = $0002;
+ {$EXTERNALSYM APPLICATION_VERIFIER_ACCESS_VIOLATION}
+ APPLICATION_VERIFIER_UNSYNCHRONIZED_ACCESS = $0003;
+ {$EXTERNALSYM APPLICATION_VERIFIER_UNSYNCHRONIZED_ACCESS}
+ APPLICATION_VERIFIER_EXTREME_SIZE_REQUEST = $0004;
+ {$EXTERNALSYM APPLICATION_VERIFIER_EXTREME_SIZE_REQUEST}
+ APPLICATION_VERIFIER_BAD_HEAP_HANDLE = $0005;
+ {$EXTERNALSYM APPLICATION_VERIFIER_BAD_HEAP_HANDLE}
+ APPLICATION_VERIFIER_SWITCHED_HEAP_HANDLE = $0006;
+ {$EXTERNALSYM APPLICATION_VERIFIER_SWITCHED_HEAP_HANDLE}
+ APPLICATION_VERIFIER_DOUBLE_FREE = $0007;
+ {$EXTERNALSYM APPLICATION_VERIFIER_DOUBLE_FREE}
+ APPLICATION_VERIFIER_CORRUPTED_HEAP_BLOCK = $0008;
+ {$EXTERNALSYM APPLICATION_VERIFIER_CORRUPTED_HEAP_BLOCK}
+ APPLICATION_VERIFIER_DESTROY_PROCESS_HEAP = $0009;
+ {$EXTERNALSYM APPLICATION_VERIFIER_DESTROY_PROCESS_HEAP}
+ APPLICATION_VERIFIER_UNEXPECTED_EXCEPTION = $000A;
+ {$EXTERNALSYM APPLICATION_VERIFIER_UNEXPECTED_EXCEPTION}
+ APPLICATION_VERIFIER_STACK_OVERFLOW = $000B;
+ {$EXTERNALSYM APPLICATION_VERIFIER_STACK_OVERFLOW}
+
+ APPLICATION_VERIFIER_TERMINATE_THREAD_CALL = $0100;
+ {$EXTERNALSYM APPLICATION_VERIFIER_TERMINATE_THREAD_CALL}
+ APPLICATION_VERIFIER_INVALID_EXIT_PROCESS_CALL = $0101;
+ {$EXTERNALSYM APPLICATION_VERIFIER_INVALID_EXIT_PROCESS_CALL}
+
+ APPLICATION_VERIFIER_EXIT_THREAD_OWNS_LOCK = $0200;
+ {$EXTERNALSYM APPLICATION_VERIFIER_EXIT_THREAD_OWNS_LOCK}
+ APPLICATION_VERIFIER_LOCK_IN_UNLOADED_DLL = $0201;
+ {$EXTERNALSYM APPLICATION_VERIFIER_LOCK_IN_UNLOADED_DLL}
+ APPLICATION_VERIFIER_LOCK_IN_FREED_HEAP = $0202;
+ {$EXTERNALSYM APPLICATION_VERIFIER_LOCK_IN_FREED_HEAP}
+ APPLICATION_VERIFIER_LOCK_DOUBLE_INITIALIZE = $0203;
+ {$EXTERNALSYM APPLICATION_VERIFIER_LOCK_DOUBLE_INITIALIZE}
+ APPLICATION_VERIFIER_LOCK_IN_FREED_MEMORY = $0204;
+ {$EXTERNALSYM APPLICATION_VERIFIER_LOCK_IN_FREED_MEMORY}
+ APPLICATION_VERIFIER_LOCK_CORRUPTED = $0205;
+ {$EXTERNALSYM APPLICATION_VERIFIER_LOCK_CORRUPTED}
+ APPLICATION_VERIFIER_LOCK_INVALID_OWNER = $0206;
+ {$EXTERNALSYM APPLICATION_VERIFIER_LOCK_INVALID_OWNER}
+ APPLICATION_VERIFIER_LOCK_INVALID_RECURSION_COUNT = $0207;
+ {$EXTERNALSYM APPLICATION_VERIFIER_LOCK_INVALID_RECURSION_COUNT}
+ APPLICATION_VERIFIER_LOCK_INVALID_LOCK_COUNT = $0208;
+ {$EXTERNALSYM APPLICATION_VERIFIER_LOCK_INVALID_LOCK_COUNT}
+ APPLICATION_VERIFIER_LOCK_OVER_RELEASED = $0209;
+ {$EXTERNALSYM APPLICATION_VERIFIER_LOCK_OVER_RELEASED}
+ APPLICATION_VERIFIER_LOCK_NOT_INITIALIZED = $0210;
+ {$EXTERNALSYM APPLICATION_VERIFIER_LOCK_NOT_INITIALIZED}
+ APPLICATION_VERIFIER_LOCK_ALREADY_INITIALIZED = $0211;
+ {$EXTERNALSYM APPLICATION_VERIFIER_LOCK_ALREADY_INITIALIZED}
+
+ APPLICATION_VERIFIER_INVALID_HANDLE = $0300;
+ {$EXTERNALSYM APPLICATION_VERIFIER_INVALID_HANDLE}
+ APPLICATION_VERIFIER_INVALID_TLS_VALUE = $0301;
+ {$EXTERNALSYM APPLICATION_VERIFIER_INVALID_TLS_VALUE}
+ APPLICATION_VERIFIER_INCORRECT_WAIT_CALL = $0302;
+ {$EXTERNALSYM APPLICATION_VERIFIER_INCORRECT_WAIT_CALL}
+ APPLICATION_VERIFIER_NULL_HANDLE = $0303;
+ {$EXTERNALSYM APPLICATION_VERIFIER_NULL_HANDLE}
+ APPLICATION_VERIFIER_WAIT_IN_DLLMAIN = $0304;
+ {$EXTERNALSYM APPLICATION_VERIFIER_WAIT_IN_DLLMAIN}
+
+ APPLICATION_VERIFIER_COM_ERROR = $0400;
+ {$EXTERNALSYM APPLICATION_VERIFIER_COM_ERROR}
+ APPLICATION_VERIFIER_COM_API_IN_DLLMAIN = $0401;
+ {$EXTERNALSYM APPLICATION_VERIFIER_COM_API_IN_DLLMAIN}
+ APPLICATION_VERIFIER_COM_UNHANDLED_EXCEPTION = $0402;
+ {$EXTERNALSYM APPLICATION_VERIFIER_COM_UNHANDLED_EXCEPTION}
+ APPLICATION_VERIFIER_COM_UNBALANCED_COINIT = $0403;
+ {$EXTERNALSYM APPLICATION_VERIFIER_COM_UNBALANCED_COINIT}
+ APPLICATION_VERIFIER_COM_UNBALANCED_OLEINIT = $0404;
+ {$EXTERNALSYM APPLICATION_VERIFIER_COM_UNBALANCED_OLEINIT}
+ APPLICATION_VERIFIER_COM_UNBALANCED_SWC = $0405;
+ {$EXTERNALSYM APPLICATION_VERIFIER_COM_UNBALANCED_SWC}
+ APPLICATION_VERIFIER_COM_NULL_DACL = $0406;
+ {$EXTERNALSYM APPLICATION_VERIFIER_COM_NULL_DACL}
+ APPLICATION_VERIFIER_COM_UNSAFE_IMPERSONATION = $0407;
+ {$EXTERNALSYM APPLICATION_VERIFIER_COM_UNSAFE_IMPERSONATION}
+ APPLICATION_VERIFIER_COM_SMUGGLED_WRAPPER = $0408;
+ {$EXTERNALSYM APPLICATION_VERIFIER_COM_SMUGGLED_WRAPPER}
+ APPLICATION_VERIFIER_COM_SMUGGLED_PROXY = $0409;
+ {$EXTERNALSYM APPLICATION_VERIFIER_COM_SMUGGLED_PROXY}
+ APPLICATION_VERIFIER_COM_CF_SUCCESS_WITH_NULL = $040A;
+ {$EXTERNALSYM APPLICATION_VERIFIER_COM_CF_SUCCESS_WITH_NULL}
+ APPLICATION_VERIFIER_COM_GCO_SUCCESS_WITH_NULL = $040B;
+ {$EXTERNALSYM APPLICATION_VERIFIER_COM_GCO_SUCCESS_WITH_NULL}
+ APPLICATION_VERIFIER_COM_OBJECT_IN_FREED_MEMORY = $040C;
+ {$EXTERNALSYM APPLICATION_VERIFIER_COM_OBJECT_IN_FREED_MEMORY}
+ APPLICATION_VERIFIER_COM_OBJECT_IN_UNLOADED_DLL = $040D;
+ {$EXTERNALSYM APPLICATION_VERIFIER_COM_OBJECT_IN_UNLOADED_DLL}
+ APPLICATION_VERIFIER_COM_VTBL_IN_FREED_MEMORY = $040E;
+ {$EXTERNALSYM APPLICATION_VERIFIER_COM_VTBL_IN_FREED_MEMORY}
+ APPLICATION_VERIFIER_COM_VTBL_IN_UNLOADED_DLL = $040F;
+ {$EXTERNALSYM APPLICATION_VERIFIER_COM_VTBL_IN_UNLOADED_DLL}
+ APPLICATION_VERIFIER_COM_HOLDING_LOCKS_ON_CALL = $0410;
+ {$EXTERNALSYM APPLICATION_VERIFIER_COM_HOLDING_LOCKS_ON_CALL}
+
+ APPLICATION_VERIFIER_RPC_ERROR = $0500;
+ {$EXTERNALSYM APPLICATION_VERIFIER_RPC_ERROR}
+
+ APPLICATION_VERIFIER_INVALID_FREEMEM = $0600;
+ {$EXTERNALSYM APPLICATION_VERIFIER_INVALID_FREEMEM}
+ APPLICATION_VERIFIER_INVALID_ALLOCMEM = $0601;
+ {$EXTERNALSYM APPLICATION_VERIFIER_INVALID_ALLOCMEM}
+ APPLICATION_VERIFIER_INVALID_MAPVIEW = $0602;
+ {$EXTERNALSYM APPLICATION_VERIFIER_INVALID_MAPVIEW}
+ APPLICATION_VERIFIER_PROBE_INVALID_ADDRESS = $0603;
+ {$EXTERNALSYM APPLICATION_VERIFIER_PROBE_INVALID_ADDRESS}
+ APPLICATION_VERIFIER_PROBE_FREE_MEM = $0604;
+ {$EXTERNALSYM APPLICATION_VERIFIER_PROBE_FREE_MEM}
+ APPLICATION_VERIFIER_PROBE_GUARD_PAGE = $0605;
+ {$EXTERNALSYM APPLICATION_VERIFIER_PROBE_GUARD_PAGE}
+ APPLICATION_VERIFIER_PROBE_NULL = $0606;
+ {$EXTERNALSYM APPLICATION_VERIFIER_PROBE_NULL}
+ APPLICATION_VERIFIER_PROBE_INVALID_START_OR_SIZE = $0607;
+ {$EXTERNALSYM APPLICATION_VERIFIER_PROBE_INVALID_START_OR_SIZE}
+
+(* TODO
+#define VERIFIER_STOP(Code, Msg, P1, S1, P2, S2, P3, S3, P4, S4) { \
+ RtlApplicationVerifierStop ((Code), \
+ (Msg), \
+ (ULONG_PTR)(P1),(S1), \
+ (ULONG_PTR)(P2),(S2), \
+ (ULONG_PTR)(P3),(S3), \
+ (ULONG_PTR)(P4),(S4)); \
+ }
+
+VOID NTAPI
+RtlApplicationVerifierStop (
+ ULONG_PTR Code,
+ PCHAR Message,
+ ULONG_PTR Param1, PCHAR Description1,
+ ULONG_PTR Param2, PCHAR Description2,
+ ULONG_PTR Param3, PCHAR Description3,
+ ULONG_PTR Param4, PCHAR Description4
+ );
+*)
+
+type
+ PVECTORED_EXCEPTION_HANDLER = function(ExceptionInfo: PEXCEPTION_POINTERS): LONG; stdcall;
+ {$EXTERNALSYM PVECTORED_EXCEPTION_HANDLER}
+ PVectoredExceptionHandler = PVECTORED_EXCEPTION_HANDLER;
+
+const
+ SEF_DACL_AUTO_INHERIT = $01;
+ {$EXTERNALSYM SEF_DACL_AUTO_INHERIT}
+ SEF_SACL_AUTO_INHERIT = $02;
+ {$EXTERNALSYM SEF_SACL_AUTO_INHERIT}
+ SEF_DEFAULT_DESCRIPTOR_FOR_OBJECT = $04;
+ {$EXTERNALSYM SEF_DEFAULT_DESCRIPTOR_FOR_OBJECT}
+ SEF_AVOID_PRIVILEGE_CHECK = $08;
+ {$EXTERNALSYM SEF_AVOID_PRIVILEGE_CHECK}
+ SEF_AVOID_OWNER_CHECK = $10;
+ {$EXTERNALSYM SEF_AVOID_OWNER_CHECK}
+ SEF_DEFAULT_OWNER_FROM_PARENT = $20;
+ {$EXTERNALSYM SEF_DEFAULT_OWNER_FROM_PARENT}
+ SEF_DEFAULT_GROUP_FROM_PARENT = $40;
+ {$EXTERNALSYM SEF_DEFAULT_GROUP_FROM_PARENT}
+
+type
+ _HEAP_INFORMATION_CLASS = (HeapCompatibilityInformation);
+ {$EXTERNALSYM _HEAP_INFORMATION_CLASS}
+ HEAP_INFORMATION_CLASS = _HEAP_INFORMATION_CLASS;
+ {$EXTERNALSYM HEAP_INFORMATION_CLASS}
+ THeapInformationClass = HEAP_INFORMATION_CLASS;
+
+{ TODO
+DWORD NTAPI
+RtlSetHeapInformation (
+ IN PVOID HeapHandle,
+ IN HEAP_INFORMATION_CLASS HeapInformationClass,
+ IN PVOID HeapInformation OPTIONAL,
+ IN SIZE_T HeapInformationLength OPTIONAL
+ );
+
+DWORD NTAPI
+RtlQueryHeapInformation (
+ IN PVOID HeapHandle,
+ IN HEAP_INFORMATION_CLASS HeapInformationClass,
+ OUT PVOID HeapInformation OPTIONAL,
+ IN SIZE_T HeapInformationLength OPTIONAL,
+ OUT PSIZE_T ReturnLength OPTIONAL
+ );
+
+//
+// Multiple alloc-free APIS
+//
+
+DWORD
+NTAPI
+RtlMultipleAllocateHeap (
+ IN PVOID HeapHandle,
+ IN DWORD Flags,
+ IN SIZE_T Size,
+ IN DWORD Count,
+ OUT PVOID * Array
+ );
+
+DWORD
+NTAPI
+RtlMultipleFreeHeap (
+ IN PVOID HeapHandle,
+ IN DWORD Flags,
+ IN DWORD Count,
+ OUT PVOID * Array
+ );
+}
+
+const
+ WT_EXECUTEDEFAULT = $00000000;
+ {$EXTERNALSYM WT_EXECUTEDEFAULT}
+ WT_EXECUTEINIOTHREAD = $00000001;
+ {$EXTERNALSYM WT_EXECUTEINIOTHREAD}
+ WT_EXECUTEINUITHREAD = $00000002;
+ {$EXTERNALSYM WT_EXECUTEINUITHREAD}
+ WT_EXECUTEINWAITTHREAD = $00000004;
+ {$EXTERNALSYM WT_EXECUTEINWAITTHREAD}
+ WT_EXECUTEONLYONCE = $00000008;
+ {$EXTERNALSYM WT_EXECUTEONLYONCE}
+ WT_EXECUTEINTIMERTHREAD = $00000020;
+ {$EXTERNALSYM WT_EXECUTEINTIMERTHREAD}
+ WT_EXECUTELONGFUNCTION = $00000010;
+ {$EXTERNALSYM WT_EXECUTELONGFUNCTION}
+ WT_EXECUTEINPERSISTENTIOTHREAD = $00000040;
+ {$EXTERNALSYM WT_EXECUTEINPERSISTENTIOTHREAD}
+ WT_EXECUTEINPERSISTENTTHREAD = $00000080;
+ {$EXTERNALSYM WT_EXECUTEINPERSISTENTTHREAD}
+ WT_TRANSFER_IMPERSONATION = $00000100;
+ {$EXTERNALSYM WT_TRANSFER_IMPERSONATION}
+
+function WT_SET_MAX_THREADPOOL_THREADS(var Flags: DWORD; Limit: DWORD): DWORD;
+{$EXTERNALSYM WT_SET_MAX_THREADPOOL_THREADS}
+
+type
+ WAITORTIMERCALLBACKFUNC = procedure(P: PVOID; B: ByteBool); stdcall;
+ {$EXTERNALSYM WAITORTIMERCALLBACKFUNC}
+ WORKERCALLBACKFUNC = procedure(P: PVOID); stdcall;
+ {$EXTERNALSYM WORKERCALLBACKFUNC}
+ APC_CALLBACK_FUNCTION = procedure(D: DWORD; P1, P2: PVOID); stdcall;
+ {$EXTERNALSYM APC_CALLBACK_FUNCTION}
+
+const
+ WT_EXECUTEINLONGTHREAD = $00000010;
+ {$EXTERNALSYM WT_EXECUTEINLONGTHREAD}
+ WT_EXECUTEDELETEWAIT = $00000008;
+ {$EXTERNALSYM WT_EXECUTEDELETEWAIT}
+
+type
+ _ACTIVATION_CONTEXT_INFO_CLASS = DWORD;
+ {$EXTERNALSYM _ACTIVATION_CONTEXT_INFO_CLASS}
+ ACTIVATION_CONTEXT_INFO_CLASS = _ACTIVATION_CONTEXT_INFO_CLASS;
+ {$EXTERNALSYM ACTIVATION_CONTEXT_INFO_CLASS}
+ TActivationContextInfoClass = ACTIVATION_CONTEXT_INFO_CLASS;
+
+const
+ ActivationContextBasicInformation = 1;
+ {$EXTERNALSYM ActivationContextBasicInformation}
+ ActivationContextDetailedInformation = 2;
+ {$EXTERNALSYM ActivationContextDetailedInformation}
+ AssemblyDetailedInformationInActivationContxt = 3;
+ {$EXTERNALSYM AssemblyDetailedInformationInActivationContxt}
+ FileInformationInAssemblyOfAssemblyInActivationContxt = 4;
+ {$EXTERNALSYM FileInformationInAssemblyOfAssemblyInActivationContxt}
+ MaxActivationContextInfoClass = 5;
+ {$EXTERNALSYM MaxActivationContextInfoClass}
+
+type
+ PACTIVATION_CONTEXT_QUERY_INDEX = ^ACTIVATION_CONTEXT_QUERY_INDEX;
+ {$EXTERNALSYM PACTIVATION_CONTEXT_QUERY_INDEX}
+ _ACTIVATION_CONTEXT_QUERY_INDEX = record
+ ulAssemblyIndex: DWORD;
+ ulFileIndexInAssembly: DWORD;
+ end;
+ {$EXTERNALSYM _ACTIVATION_CONTEXT_QUERY_INDEX}
+ ACTIVATION_CONTEXT_QUERY_INDEX = _ACTIVATION_CONTEXT_QUERY_INDEX;
+ {$EXTERNALSYM ACTIVATION_CONTEXT_QUERY_INDEX}
+ TActivationContextQueryIndex = ACTIVATION_CONTEXT_QUERY_INDEX;
+ PActivationContextQueryIndex = PACTIVATION_CONTEXT_QUERY_INDEX;
+
+const
+ ACTIVATION_CONTEXT_PATH_TYPE_NONE = 1;
+ {$EXTERNALSYM ACTIVATION_CONTEXT_PATH_TYPE_NONE}
+ ACTIVATION_CONTEXT_PATH_TYPE_WIN32_FILE = 2;
+ {$EXTERNALSYM ACTIVATION_CONTEXT_PATH_TYPE_WIN32_FILE}
+ ACTIVATION_CONTEXT_PATH_TYPE_URL = 3;
+ {$EXTERNALSYM ACTIVATION_CONTEXT_PATH_TYPE_URL}
+ ACTIVATION_CONTEXT_PATH_TYPE_ASSEMBLYREF = 4;
+ {$EXTERNALSYM ACTIVATION_CONTEXT_PATH_TYPE_ASSEMBLYREF}
+
+type
+ PASSEMBLY_FILE_DETAILED_INFORMATION = ^ASSEMBLY_DLL_REDIRECTION_DETAILED_INFORMATION;
+ {$EXTERNALSYM PASSEMBLY_FILE_DETAILED_INFORMATION}
+ _ASSEMBLY_FILE_DETAILED_INFORMATION = record
+ ulFlags: DWORD;
+ ulFilenameLength: DWORD;
+ ulPathLength: DWORD;
+ lpFileName: LPCWSTR;
+ lpFilePath: LPCWSTR;
+ end;
+ {$EXTERNALSYM _ASSEMBLY_FILE_DETAILED_INFORMATION}
+ ASSEMBLY_FILE_DETAILED_INFORMATION = _ASSEMBLY_FILE_DETAILED_INFORMATION;
+ {$EXTERNALSYM ASSEMBLY_DLL_REDIRECTION_DETAILED_INFORMATION}
+ PCASSEMBLY_FILE_DETAILED_INFORMATION = PASSEMBLY_FILE_DETAILED_INFORMATION;
+ {$EXTERNALSYM PCASSEMBLY_FILE_DETAILED_INFORMATION}
+ TAssemblyFileDetailedInformation = ASSEMBLY_FILE_DETAILED_INFORMATION;
+ PAssemblyFileDetailedInformation = PASSEMBLY_FILE_DETAILED_INFORMATION;
+
+//
+// compatibility with old names
+// The new names use "file" consistently.
+//
+
+ _ASSEMBLY_DLL_REDIRECTION_DETAILED_INFORMATION = _ASSEMBLY_FILE_DETAILED_INFORMATION;
+ {$EXTERNALSYM _ASSEMBLY_DLL_REDIRECTION_DETAILED_INFORMATION}
+ ASSEMBLY_DLL_REDIRECTION_DETAILED_INFORMATION = ASSEMBLY_FILE_DETAILED_INFORMATION;
+ {$EXTERNALSYM ASSEMBLY_DLL_REDIRECTION_DETAILED_INFORMATION}
+ PASSEMBLY_DLL_REDIRECTION_DETAILED_INFORMATION = PASSEMBLY_FILE_DETAILED_INFORMATION;
+ {$EXTERNALSYM PASSEMBLY_DLL_REDIRECTION_DETAILED_INFORMATION}
+ PCASSEMBLY_DLL_REDIRECTION_DETAILED_INFORMATION = PCASSEMBLY_FILE_DETAILED_INFORMATION;
+ {$EXTERNALSYM PCASSEMBLY_DLL_REDIRECTION_DETAILED_INFORMATION}
+ TAssemblyDllRedirectionDetailedInformation = TAssemblyFileDetailedInformation;
+ PAssemblyDllRedirectionDetailedInformation = PAssemblyFileDetailedInformation;
+
+ PACTIVATION_CONTEXT_ASSEMBLY_DETAILED_INFORMATION = ^ACTIVATION_CONTEXT_ASSEMBLY_DETAILED_INFORMATION;
+ {$EXTERNALSYM PACTIVATION_CONTEXT_ASSEMBLY_DETAILED_INFORMATION}
+ _ACTIVATION_CONTEXT_ASSEMBLY_DETAILED_INFORMATION = record
+ ulFlags: DWORD;
+ ulEncodedAssemblyIdentityLength: DWORD; // in bytes
+ ulManifestPathType: DWORD; // ACTIVATION_CONTEXT_PATH_TYPE_*
+ ulManifestPathLength: DWORD; // in bytes
+ liManifestLastWriteTime: LARGE_INTEGER; // FILETIME
+ ulPolicyPathType: DWORD; // ACTIVATION_CONTEXT_PATH_TYPE_*
+ ulPolicyPathLength: DWORD; // in bytes
+ liPolicyLastWriteTime: LARGE_INTEGER; // FILETIME
+ ulMetadataSatelliteRosterIndex: DWORD;
+ ulManifestVersionMajor: DWORD; // 1
+ ulManifestVersionMinor: DWORD; // 0
+ ulPolicyVersionMajor: DWORD; // 0
+ ulPolicyVersionMinor: DWORD; // 0
+ ulAssemblyDirectoryNameLength: DWORD; // in bytes
+ lpAssemblyEncodedAssemblyIdentity: LPCWSTR;
+ lpAssemblyManifestPath: LPCWSTR;
+ lpAssemblyPolicyPath: LPCWSTR;
+ lpAssemblyDirectoryName: LPCWSTR;
+ ulFileCount: DWORD;
+ end;
+ {$EXTERNALSYM _ACTIVATION_CONTEXT_ASSEMBLY_DETAILED_INFORMATION}
+ ACTIVATION_CONTEXT_ASSEMBLY_DETAILED_INFORMATION = _ACTIVATION_CONTEXT_ASSEMBLY_DETAILED_INFORMATION;
+ {$EXTERNALSYM ACTIVATION_CONTEXT_ASSEMBLY_DETAILED_INFORMATION}
+ TActivationContextAssemblyDetailedInformation = ACTIVATION_CONTEXT_ASSEMBLY_DETAILED_INFORMATION;
+ PActivationContextAssemblyDetailedInformation = PACTIVATION_CONTEXT_ASSEMBLY_DETAILED_INFORMATION;
+
+ PACTIVATION_CONTEXT_DETAILED_INFORMATION = ^ACTIVATION_CONTEXT_DETAILED_INFORMATION;
+ {$EXTERNALSYM PACTIVATION_CONTEXT_DETAILED_INFORMATION}
+ _ACTIVATION_CONTEXT_DETAILED_INFORMATION = record
+ dwFlags: DWORD;
+ ulFormatVersion: DWORD;
+ ulAssemblyCount: DWORD;
+ ulRootManifestPathType: DWORD;
+ ulRootManifestPathChars: DWORD;
+ ulRootConfigurationPathType: DWORD;
+ ulRootConfigurationPathChars: DWORD;
+ ulAppDirPathType: DWORD;
+ ulAppDirPathChars: DWORD;
+ lpRootManifestPath: LPCWSTR;
+ lpRootConfigurationPath: LPCWSTR;
+ lpAppDirPath: LPCWSTR;
+ end;
+ {$EXTERNALSYM _ACTIVATION_CONTEXT_DETAILED_INFORMATION}
+ ACTIVATION_CONTEXT_DETAILED_INFORMATION = _ACTIVATION_CONTEXT_DETAILED_INFORMATION;
+ {$EXTERNALSYM ACTIVATION_CONTEXT_DETAILED_INFORMATION}
+ TActivationContextDetailedInformation = ACTIVATION_CONTEXT_DETAILED_INFORMATION;
+ PActivationContextDetailedInformation = PACTIVATION_CONTEXT_DETAILED_INFORMATION;
+
+const
+ DLL_PROCESS_ATTACH = 1;
+ {$EXTERNALSYM DLL_PROCESS_ATTACH}
+ DLL_THREAD_ATTACH = 2;
+ {$EXTERNALSYM DLL_THREAD_ATTACH}
+ DLL_THREAD_DETACH = 3;
+ {$EXTERNALSYM DLL_THREAD_DETACH}
+ DLL_PROCESS_DETACH = 0;
+ {$EXTERNALSYM DLL_PROCESS_DETACH}
+ DLL_PROCESS_VERIFIER = 4;
+ {$EXTERNALSYM DLL_PROCESS_VERIFIER}
+
+//
+// Defines for the READ flags for Eventlogging
+//
+
+ EVENTLOG_SEQUENTIAL_READ = $0001;
+ {$EXTERNALSYM EVENTLOG_SEQUENTIAL_READ}
+ EVENTLOG_SEEK_READ = $0002;
+ {$EXTERNALSYM EVENTLOG_SEEK_READ}
+ EVENTLOG_FORWARDS_READ = $0004;
+ {$EXTERNALSYM EVENTLOG_FORWARDS_READ}
+ EVENTLOG_BACKWARDS_READ = $0008;
+ {$EXTERNALSYM EVENTLOG_BACKWARDS_READ}
+
+//
+// The types of events that can be logged.
+//
+
+ EVENTLOG_SUCCESS = $0000;
+ {$EXTERNALSYM EVENTLOG_SUCCESS}
+ EVENTLOG_ERROR_TYPE = $0001;
+ {$EXTERNALSYM EVENTLOG_ERROR_TYPE}
+ EVENTLOG_WARNING_TYPE = $0002;
+ {$EXTERNALSYM EVENTLOG_WARNING_TYPE}
+ EVENTLOG_INFORMATION_TYPE = $0004;
+ {$EXTERNALSYM EVENTLOG_INFORMATION_TYPE}
+ EVENTLOG_AUDIT_SUCCESS = $0008;
+ {$EXTERNALSYM EVENTLOG_AUDIT_SUCCESS}
+ EVENTLOG_AUDIT_FAILURE = $0010;
+ {$EXTERNALSYM EVENTLOG_AUDIT_FAILURE}
+
+//
+// Defines for the WRITE flags used by Auditing for paired events
+// These are not implemented in Product 1
+//
+
+ EVENTLOG_START_PAIRED_EVENT = $0001;
+ {$EXTERNALSYM EVENTLOG_START_PAIRED_EVENT}
+ EVENTLOG_END_PAIRED_EVENT = $0002;
+ {$EXTERNALSYM EVENTLOG_END_PAIRED_EVENT}
+ EVENTLOG_END_ALL_PAIRED_EVENTS = $0004;
+ {$EXTERNALSYM EVENTLOG_END_ALL_PAIRED_EVENTS}
+ EVENTLOG_PAIRED_EVENT_ACTIVE = $0008;
+ {$EXTERNALSYM EVENTLOG_PAIRED_EVENT_ACTIVE}
+ EVENTLOG_PAIRED_EVENT_INACTIVE = $0010;
+ {$EXTERNALSYM EVENTLOG_PAIRED_EVENT_INACTIVE}
+
+//
+// Structure that defines the header of the Eventlog record. This is the
+// fixed-sized portion before all the variable-length strings, binary
+// data and pad bytes.
+//
+// TimeGenerated is the time it was generated at the client.
+// TimeWritten is the time it was put into the log at the server end.
+//
+
+type
+ PEventlogrecord = ^EVENTLOGRECORD;
+ _EVENTLOGRECORD = record
+ Length: DWORD; // Length of full record
+ Reserved: DWORD; // Used by the service
+ RecordNumber: DWORD; // Absolute record number
+ TimeGenerated: DWORD; // Seconds since 1-1-1970
+ TimeWritten: DWORD; // Seconds since 1-1-1970
+ EventID: DWORD;
+ EventType: Word;
+ NumStrings: Word;
+ EventCategory: Word;
+ ReservedFlags: Word; // For use with paired events (auditing)
+ ClosingRecordNumber: DWORD; // For use with paired events (auditing)
+ StringOffset: DWORD; // Offset from beginning of record
+ UserSidLength: DWORD;
+ UserSidOffset: DWORD;
+ DataLength: DWORD;
+ DataOffset: DWORD; // Offset from beginning of record
+ //
+ // Then follow:
+ //
+ // WCHAR SourceName[]
+ // WCHAR Computername[]
+ // SID UserSid
+ // WCHAR Strings[]
+ // BYTE Data[]
+ // CHAR Pad[]
+ // DWORD Length;
+ //
+ end;
+ {$EXTERNALSYM _EVENTLOGRECORD}
+ EVENTLOGRECORD = _EVENTLOGRECORD;
+ {$EXTERNALSYM EVENTLOGRECORD}
+ TEventlogrecord = EVENTLOGRECORD;
+
+const
+ MAXLOGICALLOGNAMESIZE = 256;
+ {$EXTERNALSYM MAXLOGICALLOGNAMESIZE}
+
+type
+ PEventsForLogFile = ^EVENTSFORLOGFILE;
+ _EVENTSFORLOGFILE = record
+ ulSize: DWORD;
+ szLogicalLogFile: array [0..MAXLOGICALLOGNAMESIZE - 1] of WCHAR; // name of the logical file-security/application/system
+ ulNumRecords: DWORD;
+ pEventLogRecords: array [0..0] of EVENTLOGRECORD;
+ end;
+ {$EXTERNALSYM _EVENTSFORLOGFILE}
+ EVENTSFORLOGFILE = _EVENTSFORLOGFILE;
+ {$EXTERNALSYM EVENTSFORLOGFILE}
+ TEventsForLogFile = EVENTSFORLOGFILE;
+
+ PPackedEventInfo = ^PACKEDEVENTINFO;
+ _PACKEDEVENTINFO = record
+ ulSize: DWORD; // total size of the structure
+ ulNumEventsForLogFile: DWORD; // number of EventsForLogFile structure that follow
+ ulOffsets: array [0..0] of DWORD; // the offsets from the start of this structure to the EVENTSFORLOGFILE structure
+ end;
+ {$EXTERNALSYM _PACKEDEVENTINFO}
+ PACKEDEVENTINFO = _PACKEDEVENTINFO;
+ {$EXTERNALSYM PACKEDEVENTINFO}
+ TPackedEventInfo = PACKEDEVENTINFO;
+
+//
+// Registry Specific Access Rights.
+//
+
+const
+ KEY_QUERY_VALUE = $0001;
+ {$EXTERNALSYM KEY_QUERY_VALUE}
+ KEY_SET_VALUE = $0002;
+ {$EXTERNALSYM KEY_SET_VALUE}
+ KEY_CREATE_SUB_KEY = $0004;
+ {$EXTERNALSYM KEY_CREATE_SUB_KEY}
+ KEY_ENUMERATE_SUB_KEYS = $0008;
+ {$EXTERNALSYM KEY_ENUMERATE_SUB_KEYS}
+ KEY_NOTIFY = $0010;
+ {$EXTERNALSYM KEY_NOTIFY}
+ KEY_CREATE_LINK = $0020;
+ {$EXTERNALSYM KEY_CREATE_LINK}
+ KEY_WOW64_32KEY = $0200;
+ {$EXTERNALSYM KEY_WOW64_32KEY}
+ KEY_WOW64_64KEY = $0100;
+ {$EXTERNALSYM KEY_WOW64_64KEY}
+ KEY_WOW64_RES = $0300;
+ {$EXTERNALSYM KEY_WOW64_RES}
+
+ KEY_READ = STANDARD_RIGHTS_READ or KEY_QUERY_VALUE or KEY_ENUMERATE_SUB_KEYS or
+ KEY_NOTIFY and (not SYNCHRONIZE);
+ {$EXTERNALSYM KEY_READ}
+
+ KEY_WRITE = STANDARD_RIGHTS_WRITE or KEY_SET_VALUE or KEY_CREATE_SUB_KEY and
+ (not SYNCHRONIZE);
+ {$EXTERNALSYM KEY_WRITE}
+
+ KEY_EXECUTE = KEY_READ and (not SYNCHRONIZE);
+ {$EXTERNALSYM KEY_EXECUTE}
+
+ KEY_ALL_ACCESS = STANDARD_RIGHTS_ALL or KEY_QUERY_VALUE or KEY_SET_VALUE or
+ KEY_CREATE_SUB_KEY or KEY_ENUMERATE_SUB_KEYS or KEY_NOTIFY or
+ KEY_CREATE_LINK and (not SYNCHRONIZE);
+ {$EXTERNALSYM KEY_ALL_ACCESS}
+
+//
+// Open/Create Options
+//
+
+ REG_OPTION_RESERVED = $00000000; // Parameter is reserved
+ {$EXTERNALSYM REG_OPTION_RESERVED}
+
+ REG_OPTION_NON_VOLATILE = $00000000; // Key is preserved when system is rebooted
+ {$EXTERNALSYM REG_OPTION_NON_VOLATILE}
+
+ REG_OPTION_VOLATILE = $00000001; // Key is not preserved when system is rebooted
+ {$EXTERNALSYM REG_OPTION_VOLATILE}
+
+ REG_OPTION_CREATE_LINK = $00000002; // Created key is a symbolic link
+ {$EXTERNALSYM REG_OPTION_CREATE_LINK}
+
+ REG_OPTION_BACKUP_RESTORE = $00000004; // open for backup or restore
+ {$EXTERNALSYM REG_OPTION_BACKUP_RESTORE}
+ // special access rules
+ // privilege required
+
+ REG_OPTION_OPEN_LINK = $00000008; // Open symbolic link
+ {$EXTERNALSYM REG_OPTION_OPEN_LINK}
+
+ REG_LEGAL_OPTION = REG_OPTION_RESERVED or REG_OPTION_NON_VOLATILE or
+ REG_OPTION_VOLATILE or REG_OPTION_CREATE_LINK or REG_OPTION_BACKUP_RESTORE or
+ REG_OPTION_OPEN_LINK;
+ {$EXTERNALSYM REG_LEGAL_OPTION}
+
+//
+// Key creation/open disposition
+//
+
+ REG_CREATED_NEW_KEY = $00000001; // New Registry Key created
+ {$EXTERNALSYM REG_CREATED_NEW_KEY}
+ REG_OPENED_EXISTING_KEY = $00000002; // Existing Key opened
+ {$EXTERNALSYM REG_OPENED_EXISTING_KEY}
+
+//
+// hive format to be used by Reg(Nt)SaveKeyEx
+//
+
+ REG_STANDARD_FORMAT = 1;
+ {$EXTERNALSYM REG_STANDARD_FORMAT}
+ REG_LATEST_FORMAT = 2;
+ {$EXTERNALSYM REG_LATEST_FORMAT}
+ REG_NO_COMPRESSION = 4;
+ {$EXTERNALSYM REG_NO_COMPRESSION}
+
+//
+// Key restore flags
+//
+
+ REG_WHOLE_HIVE_VOLATILE = $00000001; // Restore whole hive volatile
+ {$EXTERNALSYM REG_WHOLE_HIVE_VOLATILE}
+ REG_REFRESH_HIVE = $00000002; // Unwind changes to last flush
+ {$EXTERNALSYM REG_REFRESH_HIVE}
+ REG_NO_LAZY_FLUSH = $00000004; // Never lazy flush this hive
+ {$EXTERNALSYM REG_NO_LAZY_FLUSH}
+ REG_FORCE_RESTORE = $00000008; // Force the restore process even when we have open handles on subkeys
+ {$EXTERNALSYM REG_FORCE_RESTORE}
+
+//
+// Unload Flags
+//
+
+ REG_FORCE_UNLOAD = 1;
+ {$EXTERNALSYM REG_FORCE_UNLOAD}
+
+// end_ntddk end_wdm end_nthal
+
+//
+// Notify filter values
+//
+
+ REG_NOTIFY_CHANGE_NAME = $00000001; // Create or delete (child)
+ {$EXTERNALSYM REG_NOTIFY_CHANGE_NAME}
+ REG_NOTIFY_CHANGE_ATTRIBUTES = $00000002;
+ {$EXTERNALSYM REG_NOTIFY_CHANGE_ATTRIBUTES}
+ REG_NOTIFY_CHANGE_LAST_SET = $00000004; // time stamp
+ {$EXTERNALSYM REG_NOTIFY_CHANGE_LAST_SET}
+ REG_NOTIFY_CHANGE_SECURITY = $00000008;
+ {$EXTERNALSYM REG_NOTIFY_CHANGE_SECURITY}
+
+ REG_LEGAL_CHANGE_FILTER = REG_NOTIFY_CHANGE_NAME or REG_NOTIFY_CHANGE_ATTRIBUTES or
+ REG_NOTIFY_CHANGE_LAST_SET or REG_NOTIFY_CHANGE_SECURITY;
+ {$EXTERNALSYM REG_LEGAL_CHANGE_FILTER}
+
+//
+//
+// Predefined Value Types.
+//
+
+ REG_NONE = 0; // No value type
+ {$EXTERNALSYM REG_NONE}
+ REG_SZ = 1; // Unicode nul terminated string
+ {$EXTERNALSYM REG_SZ}
+ REG_EXPAND_SZ = 2; // Unicode nul terminated string
+ {$EXTERNALSYM REG_EXPAND_SZ}
+ // (with environment variable references)
+ REG_BINARY = 3; // Free form binary
+ {$EXTERNALSYM REG_BINARY}
+ REG_DWORD = 4; // 32-bit number
+ {$EXTERNALSYM REG_DWORD}
+ REG_DWORD_LITTLE_ENDIAN = 4; // 32-bit number (same as REG_DWORD)
+ {$EXTERNALSYM REG_DWORD_LITTLE_ENDIAN}
+ REG_DWORD_BIG_ENDIAN = 5; // 32-bit number
+ {$EXTERNALSYM REG_DWORD_BIG_ENDIAN}
+ REG_LINK = 6; // Symbolic Link (unicode)
+ {$EXTERNALSYM REG_LINK}
+ REG_MULTI_SZ = 7; // Multiple Unicode strings
+ {$EXTERNALSYM REG_MULTI_SZ}
+ REG_RESOURCE_LIST = 8; // Resource list in the resource map
+ {$EXTERNALSYM REG_RESOURCE_LIST}
+ REG_FULL_RESOURCE_DESCRIPTOR = 9; // Resource list in the hardware description
+ {$EXTERNALSYM REG_FULL_RESOURCE_DESCRIPTOR}
+ REG_RESOURCE_REQUIREMENTS_LIST = 10;
+ {$EXTERNALSYM REG_RESOURCE_REQUIREMENTS_LIST}
+ REG_QWORD = 11; // 64-bit number
+ {$EXTERNALSYM REG_QWORD}
+ REG_QWORD_LITTLE_ENDIAN = 11; // 64-bit number (same as REG_QWORD)
+ {$EXTERNALSYM REG_QWORD_LITTLE_ENDIAN}
+
+//
+// Service Types (Bit Mask)
+//
+
+ SERVICE_KERNEL_DRIVER = $00000001;
+ {$EXTERNALSYM SERVICE_KERNEL_DRIVER}
+ SERVICE_FILE_SYSTEM_DRIVER = $00000002;
+ {$EXTERNALSYM SERVICE_FILE_SYSTEM_DRIVER}
+ SERVICE_ADAPTER = $00000004;
+ {$EXTERNALSYM SERVICE_ADAPTER}
+ SERVICE_RECOGNIZER_DRIVER = $00000008;
+ {$EXTERNALSYM SERVICE_RECOGNIZER_DRIVER}
+
+ SERVICE_DRIVER = SERVICE_KERNEL_DRIVER or SERVICE_FILE_SYSTEM_DRIVER or
+ SERVICE_RECOGNIZER_DRIVER;
+ {$EXTERNALSYM SERVICE_DRIVER}
+
+ SERVICE_WIN32_OWN_PROCESS = $00000010;
+ {$EXTERNALSYM SERVICE_WIN32_OWN_PROCESS}
+ SERVICE_WIN32_SHARE_PROCESS = $00000020;
+ {$EXTERNALSYM SERVICE_WIN32_SHARE_PROCESS}
+
+ SERVICE_WIN32 = SERVICE_WIN32_OWN_PROCESS or SERVICE_WIN32_SHARE_PROCESS;
+ {$EXTERNALSYM SERVICE_WIN32}
+
+ SERVICE_INTERACTIVE_PROCESS = $00000100;
+ {$EXTERNALSYM SERVICE_INTERACTIVE_PROCESS}
+
+ SERVICE_TYPE_ALL = SERVICE_WIN32 or SERVICE_ADAPTER or SERVICE_DRIVER or
+ SERVICE_INTERACTIVE_PROCESS;
+ {$EXTERNALSYM SERVICE_TYPE_ALL}
+
+//
+// Start Type
+//
+
+ SERVICE_BOOT_START = $00000000;
+ {$EXTERNALSYM SERVICE_BOOT_START}
+ SERVICE_SYSTEM_START = $00000001;
+ {$EXTERNALSYM SERVICE_SYSTEM_START}
+ SERVICE_AUTO_START = $00000002;
+ {$EXTERNALSYM SERVICE_AUTO_START}
+ SERVICE_DEMAND_START = $00000003;
+ {$EXTERNALSYM SERVICE_DEMAND_START}
+ SERVICE_DISABLED = $00000004;
+ {$EXTERNALSYM SERVICE_DISABLED}
+
+//
+// Error control type
+//
+
+ SERVICE_ERROR_IGNORE = $00000000;
+ {$EXTERNALSYM SERVICE_ERROR_IGNORE}
+ SERVICE_ERROR_NORMAL = $00000001;
+ {$EXTERNALSYM SERVICE_ERROR_NORMAL}
+ SERVICE_ERROR_SEVERE = $00000002;
+ {$EXTERNALSYM SERVICE_ERROR_SEVERE}
+ SERVICE_ERROR_CRITICAL = $00000003;
+ {$EXTERNALSYM SERVICE_ERROR_CRITICAL}
+
+//
+// Define the registry driver node enumerations
+//
+
+const
+
+//SERVICE_NODE_TYPE
+
+ DriverType = SERVICE_KERNEL_DRIVER;
+ FileSystemType = SERVICE_FILE_SYSTEM_DRIVER;
+ Win32ServiceOwnProcess = SERVICE_WIN32_OWN_PROCESS;
+ Win32ServiceShareProcess = SERVICE_WIN32_SHARE_PROCESS;
+ AdapterType = SERVICE_ADAPTER;
+ RecognizerType = SERVICE_RECOGNIZER_DRIVER;
+
+//SERVICE_LOAD_TYPE
+
+ BootLoad = SERVICE_BOOT_START;
+ SystemLoad = SERVICE_SYSTEM_START;
+ AutoLoad = SERVICE_AUTO_START;
+ DemandLoad = SERVICE_DEMAND_START;
+ DisableLoad = SERVICE_DISABLED;
+
+//SERVICE_ERROR_TYPE
+
+ IgnoreError = SERVICE_ERROR_IGNORE;
+ NormalError = SERVICE_ERROR_NORMAL;
+ SevereError = SERVICE_ERROR_SEVERE;
+ CriticalError = SERVICE_ERROR_CRITICAL;
+
+//
+// IOCTL_TAPE_ERASE definitions
+//
+
+type
+ SERVICE_NODE_TYPE = DWORD;
+ {$EXTERNALSYM SERVICE_NODE_TYPE}
+ TServiceNodeType = SERVICE_NODE_TYPE;
+ SERVICE_LOAD_TYPE = DWORD;
+ {$EXTERNALSYM SERVICE_LOAD_TYPE}
+ TServiceLoadType = SERVICE_LOAD_TYPE;
+ SERVICE_ERROR_TYPE = DWORD;
+ {$EXTERNALSYM SERVICE_ERROR_TYPE}
+ TServiceErrorType = SERVICE_ERROR_TYPE;
+
+const
+ TAPE_ERASE_SHORT = 0;
+ {$EXTERNALSYM TAPE_ERASE_SHORT}
+ TAPE_ERASE_LONG = 1;
+ {$EXTERNALSYM TAPE_ERASE_LONG}
+
+type
+ PTAPE_ERASE = ^TAPE_ERASE;
+ {$EXTERNALSYM PTAPE_ERASE}
+ _TAPE_ERASE = record
+ Type_: DWORD;
+ Immediate: ByteBool;
+ end;
+ {$EXTERNALSYM _TAPE_ERASE}
+ TAPE_ERASE = _TAPE_ERASE;
+ {$EXTERNALSYM TAPE_ERASE}
+ TTapeErase = TAPE_ERASE;
+ PTapeErase = PTAPE_ERASE;
+
+//
+// IOCTL_TAPE_PREPARE definitions
+//
+
+const
+ TAPE_LOAD = 0;
+ {$EXTERNALSYM TAPE_LOAD}
+ TAPE_UNLOAD = 1;
+ {$EXTERNALSYM TAPE_UNLOAD}
+ TAPE_TENSION = 2;
+ {$EXTERNALSYM TAPE_TENSION}
+ TAPE_LOCK = 3;
+ {$EXTERNALSYM TAPE_LOCK}
+ TAPE_UNLOCK = 4;
+ {$EXTERNALSYM TAPE_UNLOCK}
+ TAPE_FORMAT = 5;
+ {$EXTERNALSYM TAPE_FORMAT}
+
+type
+ PTAPE_PREPARE = ^TAPE_PREPARE;
+ {$EXTERNALSYM PTAPE_PREPARE}
+ _TAPE_PREPARE = record
+ Operation: DWORD;
+ Immediate: ByteBool;
+ end;
+ {$EXTERNALSYM _TAPE_PREPARE}
+ TAPE_PREPARE = _TAPE_PREPARE;
+ {$EXTERNALSYM TAPE_PREPARE}
+ TTapePrepare = TAPE_PREPARE;
+ PTapePrepare = PTAPE_PREPARE;
+
+//
+// IOCTL_TAPE_WRITE_MARKS definitions
+//
+
+const
+ TAPE_SETMARKS = 0;
+ {$EXTERNALSYM TAPE_SETMARKS}
+ TAPE_FILEMARKS = 1;
+ {$EXTERNALSYM TAPE_FILEMARKS}
+ TAPE_SHORT_FILEMARKS = 2;
+ {$EXTERNALSYM TAPE_SHORT_FILEMARKS}
+ TAPE_LONG_FILEMARKS = 3;
+ {$EXTERNALSYM TAPE_LONG_FILEMARKS}
+
+type
+ PTAPE_WRITE_MARKS = ^TAPE_WRITE_MARKS;
+ {$EXTERNALSYM PTAPE_WRITE_MARKS}
+ _TAPE_WRITE_MARKS = record
+ Type_: DWORD;
+ Count: DWORD;
+ Immediate: ByteBool;
+ end;
+ {$EXTERNALSYM _TAPE_WRITE_MARKS}
+ TAPE_WRITE_MARKS = _TAPE_WRITE_MARKS;
+ {$EXTERNALSYM TAPE_WRITE_MARKS}
+ TTapeWriteMarks = TAPE_WRITE_MARKS;
+ PTapeWriteMarks = PTAPE_WRITE_MARKS;
+
+//
+// IOCTL_TAPE_GET_POSITION definitions
+//
+
+const
+ TAPE_ABSOLUTE_POSITION = 0;
+ {$EXTERNALSYM TAPE_ABSOLUTE_POSITION}
+ TAPE_LOGICAL_POSITION = 1;
+ {$EXTERNALSYM TAPE_LOGICAL_POSITION}
+ TAPE_PSEUDO_LOGICAL_POSITION = 2;
+ {$EXTERNALSYM TAPE_PSEUDO_LOGICAL_POSITION}
+
+type
+ PTAPE_GET_POSITION = ^TAPE_GET_POSITION;
+ {$EXTERNALSYM PTAPE_GET_POSITION}
+ _TAPE_GET_POSITION = record
+ Type_: DWORD;
+ Partition: DWORD;
+ Offset: LARGE_INTEGER;
+ end;
+ {$EXTERNALSYM _TAPE_GET_POSITION}
+ TAPE_GET_POSITION = _TAPE_GET_POSITION;
+ {$EXTERNALSYM TAPE_GET_POSITION}
+ TTapeGetPosition = TAPE_GET_POSITION;
+ PTapeGetPosition = PTAPE_GET_POSITION;
+
+//
+// IOCTL_TAPE_SET_POSITION definitions
+//
+
+const
+ TAPE_REWIND = 0;
+ {$EXTERNALSYM TAPE_REWIND}
+ TAPE_ABSOLUTE_BLOCK = 1;
+ {$EXTERNALSYM TAPE_ABSOLUTE_BLOCK}
+ TAPE_LOGICAL_BLOCK = 2;
+ {$EXTERNALSYM TAPE_LOGICAL_BLOCK}
+ TAPE_PSEUDO_LOGICAL_BLOCK = 3;
+ {$EXTERNALSYM TAPE_PSEUDO_LOGICAL_BLOCK}
+ TAPE_SPACE_END_OF_DATA = 4;
+ {$EXTERNALSYM TAPE_SPACE_END_OF_DATA}
+ TAPE_SPACE_RELATIVE_BLOCKS = 5;
+ {$EXTERNALSYM TAPE_SPACE_RELATIVE_BLOCKS}
+ TAPE_SPACE_FILEMARKS = 6;
+ {$EXTERNALSYM TAPE_SPACE_FILEMARKS}
+ TAPE_SPACE_SEQUENTIAL_FMKS = 7;
+ {$EXTERNALSYM TAPE_SPACE_SEQUENTIAL_FMKS}
+ TAPE_SPACE_SETMARKS = 8;
+ {$EXTERNALSYM TAPE_SPACE_SETMARKS}
+ TAPE_SPACE_SEQUENTIAL_SMKS = 9;
+ {$EXTERNALSYM TAPE_SPACE_SEQUENTIAL_SMKS}
+
+type
+ PTAPE_SET_POSITION = ^TAPE_SET_POSITION;
+ {$EXTERNALSYM PTAPE_SET_POSITION}
+ _TAPE_SET_POSITION = record
+ Method: DWORD;
+ Partition: DWORD;
+ Offset: LARGE_INTEGER;
+ Immediate: ByteBool;
+ end;
+ {$EXTERNALSYM _TAPE_SET_POSITION}
+ TAPE_SET_POSITION = _TAPE_SET_POSITION;
+ {$EXTERNALSYM TAPE_SET_POSITION}
+ TTapeSetPosition = TAPE_SET_POSITION;
+ PTapeSetPosition = PTAPE_SET_POSITION;
+
+//
+// IOCTL_TAPE_GET_DRIVE_PARAMS definitions
+//
+
+//
+// Definitions for FeaturesLow parameter
+//
+
+const
+ TAPE_DRIVE_FIXED = $00000001;
+ {$EXTERNALSYM TAPE_DRIVE_FIXED}
+ TAPE_DRIVE_SELECT = $00000002;
+ {$EXTERNALSYM TAPE_DRIVE_SELECT}
+ TAPE_DRIVE_INITIATOR = $00000004;
+ {$EXTERNALSYM TAPE_DRIVE_INITIATOR}
+
+ TAPE_DRIVE_ERASE_SHORT = $00000010;
+ {$EXTERNALSYM TAPE_DRIVE_ERASE_SHORT}
+ TAPE_DRIVE_ERASE_LONG = $00000020;
+ {$EXTERNALSYM TAPE_DRIVE_ERASE_LONG}
+ TAPE_DRIVE_ERASE_BOP_ONLY = $00000040;
+ {$EXTERNALSYM TAPE_DRIVE_ERASE_BOP_ONLY}
+ TAPE_DRIVE_ERASE_IMMEDIATE = $00000080;
+ {$EXTERNALSYM TAPE_DRIVE_ERASE_IMMEDIATE}
+
+ TAPE_DRIVE_TAPE_CAPACITY = $00000100;
+ {$EXTERNALSYM TAPE_DRIVE_TAPE_CAPACITY}
+ TAPE_DRIVE_TAPE_REMAINING = $00000200;
+ {$EXTERNALSYM TAPE_DRIVE_TAPE_REMAINING}
+ TAPE_DRIVE_FIXED_BLOCK = $00000400;
+ {$EXTERNALSYM TAPE_DRIVE_FIXED_BLOCK}
+ TAPE_DRIVE_VARIABLE_BLOCK = $00000800;
+ {$EXTERNALSYM TAPE_DRIVE_VARIABLE_BLOCK}
+
+ TAPE_DRIVE_WRITE_PROTECT = $00001000;
+ {$EXTERNALSYM TAPE_DRIVE_WRITE_PROTECT}
+ TAPE_DRIVE_EOT_WZ_SIZE = $00002000;
+ {$EXTERNALSYM TAPE_DRIVE_EOT_WZ_SIZE}
+
+ TAPE_DRIVE_ECC = $00010000;
+ {$EXTERNALSYM TAPE_DRIVE_ECC}
+ TAPE_DRIVE_COMPRESSION = $00020000;
+ {$EXTERNALSYM TAPE_DRIVE_COMPRESSION}
+ TAPE_DRIVE_PADDING = $00040000;
+ {$EXTERNALSYM TAPE_DRIVE_PADDING}
+ TAPE_DRIVE_REPORT_SMKS = $00080000;
+ {$EXTERNALSYM TAPE_DRIVE_REPORT_SMKS}
+
+ TAPE_DRIVE_GET_ABSOLUTE_BLK = $00100000;
+ {$EXTERNALSYM TAPE_DRIVE_GET_ABSOLUTE_BLK}
+ TAPE_DRIVE_GET_LOGICAL_BLK = $00200000;
+ {$EXTERNALSYM TAPE_DRIVE_GET_LOGICAL_BLK}
+ TAPE_DRIVE_SET_EOT_WZ_SIZE = $00400000;
+ {$EXTERNALSYM TAPE_DRIVE_SET_EOT_WZ_SIZE}
+
+ TAPE_DRIVE_EJECT_MEDIA = $01000000;
+ {$EXTERNALSYM TAPE_DRIVE_EJECT_MEDIA}
+ TAPE_DRIVE_CLEAN_REQUESTS = $02000000;
+ {$EXTERNALSYM TAPE_DRIVE_CLEAN_REQUESTS}
+ TAPE_DRIVE_SET_CMP_BOP_ONLY = $04000000;
+ {$EXTERNALSYM TAPE_DRIVE_SET_CMP_BOP_ONLY}
+
+ TAPE_DRIVE_RESERVED_BIT = DWORD($80000000); // don't use this bit!
+ {$EXTERNALSYM TAPE_DRIVE_RESERVED_BIT}
+ // //can't be a low features bit!
+// //reserved; high features only
+
+//
+// Definitions for FeaturesHigh parameter
+//
+
+ TAPE_DRIVE_LOAD_UNLOAD = DWORD($80000001);
+ {$EXTERNALSYM TAPE_DRIVE_LOAD_UNLOAD}
+ TAPE_DRIVE_TENSION = DWORD($80000002);
+ {$EXTERNALSYM TAPE_DRIVE_TENSION}
+ TAPE_DRIVE_LOCK_UNLOCK = DWORD($80000004);
+ {$EXTERNALSYM TAPE_DRIVE_LOCK_UNLOCK}
+ TAPE_DRIVE_REWIND_IMMEDIATE = DWORD($80000008);
+ {$EXTERNALSYM TAPE_DRIVE_REWIND_IMMEDIATE}
+
+ TAPE_DRIVE_SET_BLOCK_SIZE = DWORD($80000010);
+ {$EXTERNALSYM TAPE_DRIVE_SET_BLOCK_SIZE}
+ TAPE_DRIVE_LOAD_UNLD_IMMED = DWORD($80000020);
+ {$EXTERNALSYM TAPE_DRIVE_LOAD_UNLD_IMMED}
+ TAPE_DRIVE_TENSION_IMMED = DWORD($80000040);
+ {$EXTERNALSYM TAPE_DRIVE_TENSION_IMMED}
+ TAPE_DRIVE_LOCK_UNLK_IMMED = DWORD($80000080);
+ {$EXTERNALSYM TAPE_DRIVE_LOCK_UNLK_IMMED}
+
+ TAPE_DRIVE_SET_ECC = DWORD($80000100);
+ {$EXTERNALSYM TAPE_DRIVE_SET_ECC}
+ TAPE_DRIVE_SET_COMPRESSION = DWORD($80000200);
+ {$EXTERNALSYM TAPE_DRIVE_SET_COMPRESSION}
+ TAPE_DRIVE_SET_PADDING = DWORD($80000400);
+ {$EXTERNALSYM TAPE_DRIVE_SET_PADDING}
+ TAPE_DRIVE_SET_REPORT_SMKS = DWORD($80000800);
+ {$EXTERNALSYM TAPE_DRIVE_SET_REPORT_SMKS}
+
+ TAPE_DRIVE_ABSOLUTE_BLK = DWORD($80001000);
+ {$EXTERNALSYM TAPE_DRIVE_ABSOLUTE_BLK}
+ TAPE_DRIVE_ABS_BLK_IMMED = DWORD($80002000);
+ {$EXTERNALSYM TAPE_DRIVE_ABS_BLK_IMMED}
+ TAPE_DRIVE_LOGICAL_BLK = DWORD($80004000);
+ {$EXTERNALSYM TAPE_DRIVE_LOGICAL_BLK}
+ TAPE_DRIVE_LOG_BLK_IMMED = DWORD($80008000);
+ {$EXTERNALSYM TAPE_DRIVE_LOG_BLK_IMMED}
+
+ TAPE_DRIVE_END_OF_DATA = DWORD($80010000);
+ {$EXTERNALSYM TAPE_DRIVE_END_OF_DATA}
+ TAPE_DRIVE_RELATIVE_BLKS = DWORD($80020000);
+ {$EXTERNALSYM TAPE_DRIVE_RELATIVE_BLKS}
+ TAPE_DRIVE_FILEMARKS = DWORD($80040000);
+ {$EXTERNALSYM TAPE_DRIVE_FILEMARKS}
+ TAPE_DRIVE_SEQUENTIAL_FMKS = DWORD($80080000);
+ {$EXTERNALSYM TAPE_DRIVE_SEQUENTIAL_FMKS}
+
+ TAPE_DRIVE_SETMARKS = DWORD($80100000);
+ {$EXTERNALSYM TAPE_DRIVE_SETMARKS}
+ TAPE_DRIVE_SEQUENTIAL_SMKS = DWORD($80200000);
+ {$EXTERNALSYM TAPE_DRIVE_SEQUENTIAL_SMKS}
+ TAPE_DRIVE_REVERSE_POSITION = DWORD($80400000);
+ {$EXTERNALSYM TAPE_DRIVE_REVERSE_POSITION}
+ TAPE_DRIVE_SPACE_IMMEDIATE = DWORD($80800000);
+ {$EXTERNALSYM TAPE_DRIVE_SPACE_IMMEDIATE}
+
+ TAPE_DRIVE_WRITE_SETMARKS = DWORD($81000000);
+ {$EXTERNALSYM TAPE_DRIVE_WRITE_SETMARKS}
+ TAPE_DRIVE_WRITE_FILEMARKS = DWORD($82000000);
+ {$EXTERNALSYM TAPE_DRIVE_WRITE_FILEMARKS}
+ TAPE_DRIVE_WRITE_SHORT_FMKS = DWORD($84000000);
+ {$EXTERNALSYM TAPE_DRIVE_WRITE_SHORT_FMKS}
+ TAPE_DRIVE_WRITE_LONG_FMKS = DWORD($88000000);
+ {$EXTERNALSYM TAPE_DRIVE_WRITE_LONG_FMKS}
+
+ TAPE_DRIVE_WRITE_MARK_IMMED = DWORD($90000000);
+ {$EXTERNALSYM TAPE_DRIVE_WRITE_MARK_IMMED}
+ TAPE_DRIVE_FORMAT = DWORD($A0000000);
+ {$EXTERNALSYM TAPE_DRIVE_FORMAT}
+ TAPE_DRIVE_FORMAT_IMMEDIATE = DWORD($C0000000);
+ {$EXTERNALSYM TAPE_DRIVE_FORMAT_IMMEDIATE}
+ TAPE_DRIVE_HIGH_FEATURES = DWORD($80000000); // mask for high features flag
+ {$EXTERNALSYM TAPE_DRIVE_HIGH_FEATURES}
+
+type
+ PTAPE_GET_DRIVE_PARAMETERS = ^TAPE_GET_DRIVE_PARAMETERS;
+ {$EXTERNALSYM PTAPE_GET_DRIVE_PARAMETERS}
+ _TAPE_GET_DRIVE_PARAMETERS = record
+ ECC: ByteBool;
+ Compression: ByteBool;
+ DataPadding: ByteBool;
+ ReportSetmarks: ByteBool;
+ DefaultBlockSize: DWORD;
+ MaximumBlockSize: DWORD;
+ MinimumBlockSize: DWORD;
+ MaximumPartitionCount: DWORD;
+ FeaturesLow: DWORD;
+ FeaturesHigh: DWORD;
+ EOTWarningZoneSize: DWORD;
+ end;
+ {$EXTERNALSYM _TAPE_GET_DRIVE_PARAMETERS}
+ TAPE_GET_DRIVE_PARAMETERS = _TAPE_GET_DRIVE_PARAMETERS;
+ {$EXTERNALSYM TAPE_GET_DRIVE_PARAMETERS}
+ TTapeGetDriveParameters = TAPE_GET_DRIVE_PARAMETERS;
+ PTapeGetDriveParameters = PTAPE_GET_DRIVE_PARAMETERS;
+
+//
+// IOCTL_TAPE_SET_DRIVE_PARAMETERS definitions
+//
+
+ PTAPE_SET_DRIVE_PARAMETERS = ^TAPE_SET_DRIVE_PARAMETERS;
+ {$EXTERNALSYM PTAPE_SET_DRIVE_PARAMETERS}
+ _TAPE_SET_DRIVE_PARAMETERS = record
+ ECC: ByteBool;
+ Compression: ByteBool;
+ DataPadding: ByteBool;
+ ReportSetmarks: ByteBool;
+ EOTWarningZoneSize: DWORD;
+ end;
+ {$EXTERNALSYM _TAPE_SET_DRIVE_PARAMETERS}
+ TAPE_SET_DRIVE_PARAMETERS = _TAPE_SET_DRIVE_PARAMETERS;
+ {$EXTERNALSYM TAPE_SET_DRIVE_PARAMETERS}
+ TTapeSetDriveParameters = TAPE_SET_DRIVE_PARAMETERS;
+ PTapeSetDriveParameters = PTAPE_SET_DRIVE_PARAMETERS;
+
+//
+// IOCTL_TAPE_GET_MEDIA_PARAMETERS definitions
+//
+
+ PTAPE_GET_MEDIA_PARAMETERS = ^TAPE_GET_MEDIA_PARAMETERS;
+ {$EXTERNALSYM PTAPE_GET_MEDIA_PARAMETERS}
+ _TAPE_GET_MEDIA_PARAMETERS = record
+ Capacity: LARGE_INTEGER;
+ Remaining: LARGE_INTEGER;
+ BlockSize: DWORD;
+ PartitionCount: DWORD;
+ WriteProtected: ByteBool;
+ end;
+ {$EXTERNALSYM _TAPE_GET_MEDIA_PARAMETERS}
+ TAPE_GET_MEDIA_PARAMETERS = _TAPE_GET_MEDIA_PARAMETERS;
+ {$EXTERNALSYM TAPE_GET_MEDIA_PARAMETERS}
+ TTapeGetMediaParameters = TAPE_GET_MEDIA_PARAMETERS;
+ PTapeGetMediaParameters = PTAPE_GET_MEDIA_PARAMETERS;
+
+//
+// IOCTL_TAPE_SET_MEDIA_PARAMETERS definitions
+//
+
+ PTAPE_SET_MEDIA_PARAMETERS = ^TAPE_SET_MEDIA_PARAMETERS;
+ {$EXTERNALSYM PTAPE_SET_MEDIA_PARAMETERS}
+ _TAPE_SET_MEDIA_PARAMETERS = record
+ BlockSize: DWORD;
+ end;
+ {$EXTERNALSYM _TAPE_SET_MEDIA_PARAMETERS}
+ TAPE_SET_MEDIA_PARAMETERS = _TAPE_SET_MEDIA_PARAMETERS;
+ {$EXTERNALSYM TAPE_SET_MEDIA_PARAMETERS}
+ TTapeSetMediaParameters = TAPE_SET_MEDIA_PARAMETERS;
+ PTapeSetMediaParameters = PTAPE_SET_MEDIA_PARAMETERS;
+
+//
+// IOCTL_TAPE_CREATE_PARTITION definitions
+//
+
+const
+ TAPE_FIXED_PARTITIONS = 0;
+ {$EXTERNALSYM TAPE_FIXED_PARTITIONS}
+ TAPE_SELECT_PARTITIONS = 1;
+ {$EXTERNALSYM TAPE_SELECT_PARTITIONS}
+ TAPE_INITIATOR_PARTITIONS = 2;
+ {$EXTERNALSYM TAPE_INITIATOR_PARTITIONS}
+
+type
+ PTAPE_CREATE_PARTITION = ^TAPE_CREATE_PARTITION;
+ {$EXTERNALSYM PTAPE_CREATE_PARTITION}
+ _TAPE_CREATE_PARTITION = record
+ Method: DWORD;
+ Count: DWORD;
+ Size: DWORD;
+ end;
+ {$EXTERNALSYM _TAPE_CREATE_PARTITION}
+ TAPE_CREATE_PARTITION = _TAPE_CREATE_PARTITION;
+ {$EXTERNALSYM TAPE_CREATE_PARTITION}
+ TTapeCreatePartition = TAPE_CREATE_PARTITION;
+ PTapeCreatePartition = PTAPE_CREATE_PARTITION;
+
+//
+// WMI Methods
+//
+
+const
+ TAPE_QUERY_DRIVE_PARAMETERS = 0;
+ {$EXTERNALSYM TAPE_QUERY_DRIVE_PARAMETERS}
+ TAPE_QUERY_MEDIA_CAPACITY = 1;
+ {$EXTERNALSYM TAPE_QUERY_MEDIA_CAPACITY}
+ TAPE_CHECK_FOR_DRIVE_PROBLEM = 2;
+ {$EXTERNALSYM TAPE_CHECK_FOR_DRIVE_PROBLEM}
+ TAPE_QUERY_IO_ERROR_DATA = 3;
+ {$EXTERNALSYM TAPE_QUERY_IO_ERROR_DATA}
+ TAPE_QUERY_DEVICE_ERROR_DATA = 4;
+ {$EXTERNALSYM TAPE_QUERY_DEVICE_ERROR_DATA}
+
+type
+ _TAPE_WMI_OPERATIONS = record
+ Method: DWORD;
+ DataBufferSize: DWORD;
+ DataBuffer: PVOID;
+ end;
+ {$EXTERNALSYM _TAPE_WMI_OPERATIONS}
+ TAPE_WMI_OPERATIONS = _TAPE_WMI_OPERATIONS;
+ {$EXTERNALSYM TAPE_WMI_OPERATIONS}
+ PTAPE_WMI_OPERATIONS = ^TAPE_WMI_OPERATIONS;
+ {$EXTERNALSYM PTAPE_WMI_OPERATIONS}
+ TTapeWMIOperations = TAPE_WMI_OPERATIONS;
+ PTapeWMIOperations = PTAPE_WMI_OPERATIONS;
+
+//
+// Type of drive errors
+//
+
+ _TAPE_DRIVE_PROBLEM_TYPE = (
+ TapeDriveProblemNone, TapeDriveReadWriteWarning,
+ TapeDriveReadWriteError, TapeDriveReadWarning,
+ TapeDriveWriteWarning, TapeDriveReadError,
+ TapeDriveWriteError, TapeDriveHardwareError,
+ TapeDriveUnsupportedMedia, TapeDriveScsiConnectionError,
+ TapeDriveTimetoClean, TapeDriveCleanDriveNow,
+ TapeDriveMediaLifeExpired, TapeDriveSnappedTape);
+ {$EXTERNALSYM _TAPE_DRIVE_PROBLEM_TYPE}
+ TAPE_DRIVE_PROBLEM_TYPE = _TAPE_DRIVE_PROBLEM_TYPE;
+ TTapeDriveProblemType = TAPE_DRIVE_PROBLEM_TYPE;
+
+const
+ ACTIVATION_CONTEXT_SECTION_ASSEMBLY_INFORMATION = 1;
+ {$EXTERNALSYM ACTIVATION_CONTEXT_SECTION_ASSEMBLY_INFORMATION}
+ ACTIVATION_CONTEXT_SECTION_DLL_REDIRECTION = 2;
+ {$EXTERNALSYM ACTIVATION_CONTEXT_SECTION_DLL_REDIRECTION}
+ ACTIVATION_CONTEXT_SECTION_WINDOW_CLASS_REDIRECTION = 3;
+ {$EXTERNALSYM ACTIVATION_CONTEXT_SECTION_WINDOW_CLASS_REDIRECTION}
+ ACTIVATION_CONTEXT_SECTION_COM_SERVER_REDIRECTION = 4;
+ {$EXTERNALSYM ACTIVATION_CONTEXT_SECTION_COM_SERVER_REDIRECTION}
+ ACTIVATION_CONTEXT_SECTION_COM_INTERFACE_REDIRECTION = 5;
+ {$EXTERNALSYM ACTIVATION_CONTEXT_SECTION_COM_INTERFACE_REDIRECTION}
+ ACTIVATION_CONTEXT_SECTION_COM_TYPE_LIBRARY_REDIRECTION = 6;
+ {$EXTERNALSYM ACTIVATION_CONTEXT_SECTION_COM_TYPE_LIBRARY_REDIRECTION}
+ ACTIVATION_CONTEXT_SECTION_COM_PROGID_REDIRECTION = 7;
+ {$EXTERNALSYM ACTIVATION_CONTEXT_SECTION_COM_PROGID_REDIRECTION}
+ ACTIVATION_CONTEXT_SECTION_GLOBAL_OBJECT_RENAME_TABLE = 8;
+ {$EXTERNALSYM ACTIVATION_CONTEXT_SECTION_GLOBAL_OBJECT_RENAME_TABLE}
+ ACTIVATION_CONTEXT_SECTION_CLR_SURROGATES = 9;
+ {$EXTERNALSYM ACTIVATION_CONTEXT_SECTION_CLR_SURROGATES}
+
+implementation
+
+const
+ ntdll = 'ntdll.dll';
+ kernel32 = 'kernel32.dll';
+
+function WT_SET_MAX_THREADPOOL_THREADS(var Flags: DWORD; Limit: DWORD): DWORD;
+begin
+ Flags := Flags or (Limit shl 16);
+ Result := Flags;
+end;
+
+function VALID_IMPERSONATION_LEVEL(L: TSecurityImpersonationLevel): BOOL;
+begin
+ Result := (L >= SECURITY_MIN_IMPERSONATION_LEVEL) and (L <= SECURITY_MAX_IMPERSONATION_LEVEL);
+end;
+
+{
+function VALID_TOKEN_AUDIT_POLICY_ELEMENT(P: TOKEN_AUDIT_POLICY_ELEMENT): BOOL;
+begin
+ Result := ((P.PolicyMask and (not VALID_AUDIT_POLICY_BITS) = 0) and (P.Category <= AuditEventMaxType);
+// ((((P).PolicyMask & ~VALID_AUDIT_POLICY_BITS) == 0) && \
+// ((P).Category <= AuditEventMaxType))
+end;
+}
+
+function PER_USER_AUDITING_POLICY_SIZE(p: PTOKEN_AUDIT_POLICY): DWORD;
+begin
+ Result := SizeOf(TOKEN_AUDIT_POLICY);
+ if p^.PolicyCount > ANYSIZE_ARRAY then
+ Result := Result + SizeOf(TOKEN_AUDIT_POLICY_ELEMENT) * (P^.PolicyCount - ANYSIZE_ARRAY);
+// ( sizeof(TOKEN_AUDIT_POLICY) + (((p)->PolicyCount > ANYSIZE_ARRAY) ? (sizeof(TOKEN_AUDIT_POLICY_ELEMENT) * ((p)->PolicyCount - ANYSIZE_ARRAY)) : 0) )
+end;
+
+function PER_USER_AUDITING_POLICY_SIZE_BY_COUNT(C: DWORD): DWORD;
+begin
+ Result := SizeOf(TOKEN_AUDIT_POLICY);
+ if C > ANYSIZE_ARRAY then
+ Result := Result + SizeOf(TOKEN_AUDIT_POLICY_ELEMENT) * (C - ANYSIZE_ARRAY);
+// ( sizeof(TOKEN_AUDIT_POLICY) + (((C) > ANYSIZE_ARRAY) ? (sizeof(TOKEN_AUDIT_POLICY_ELEMENT) * ((C) - ANYSIZE_ARRAY)) : 0) )
+end;
+
+function NtCurrentTeb: PNT_TIB;
+asm
+ MOV EAX, FS:[0]
+end;
+
+function GetFiberData: PVOID;
+asm
+ MOV EAX, FS:[$10]
+ MOV EAX, [EAX]
+end;
+
+function GetCurrentFiber: PVOID;
+asm
+ MOV EAX, FS:[$10]
+end;
+
+function Int32x32To64(a, b: LONG): LONGLONG;
+begin
+ Result := a * b;
+end;
+
+function UInt32x32To64(a, b: DWORD): ULONGLONG;
+begin
+ Result := a * b;
+end;
+
+function MAKELANGID(PrimaryLang, SubLang: USHORT): WORD;
+begin
+ Result := (SubLang shl 10) or PrimaryLang;
+end;
+
+function PRIMARYLANGID(LangId: WORD): WORD;
+begin
+ Result := LangId and $3FF;
+end;
+
+function SUBLANGID(LangId: WORD): WORD;
+begin
+ Result := LangId shr 10;
+end;
+
+function MAKELCID(LangId, SortId: WORD): DWORD;
+begin
+ Result := (DWORD(SortId) shl 16) or DWORD(LangId);
+end;
+
+function MAKESORTLCID(LangId, SortId, SortVersion: WORD): DWORD;
+begin
+ Result := MAKELCID(LangId, SortId) or (SortVersion shl 20);
+end;
+
+function LANGIDFROMLCID(LocaleId: LCID): WORD;
+begin
+ Result := WORD(LocaleId);
+end;
+
+function SORTIDFROMLCID(LocaleId: LCID): WORD;
+begin
+ Result := WORD((DWORD(LocaleId) shr 16) and $F);
+end;
+
+function SORTVERSIONFROMLCID(LocaleId: LCID): WORD;
+begin
+ Result := WORD((DWORD(LocaleId) shr 20) and $F);
+end;
+
+function LANG_SYSTEM_DEFAULT: WORD;
+begin
+ Result := MAKELANGID(LANG_NEUTRAL, SUBLANG_SYS_DEFAULT);
+end;
+
+function LANG_USER_DEFAULT: WORD;
+begin
+ Result := MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT);
+end;
+
+function LOCALE_SYSTEM_DEFAULT: DWORD;
+begin
+ Result := MAKELCID(LANG_SYSTEM_DEFAULT, SORT_DEFAULT);
+end;
+
+function LOCALE_USER_DEFAULT: DWORD;
+begin
+ Result := MAKELCID(LANG_USER_DEFAULT, SORT_DEFAULT);
+end;
+
+function LOCALE_NEUTRAL: DWORD;
+begin
+ Result := MAKELCID(MAKELANGID(LANG_NEUTRAL, SUBLANG_NEUTRAL), SORT_DEFAULT);
+end;
+
+function LOCALE_INVARIANT: DWORD;
+begin
+ Result := MAKELCID(MAKELANGID(LANG_INVARIANT, SUBLANG_NEUTRAL), SORT_DEFAULT);
+end;
+
+function IsReparseTagMicrosoft(Tag: ULONG): Boolean;
+begin
+ Result := (Tag and ULONG($80000000)) <> 0;
+end;
+
+function IsReparseTagHighLatency(Tag: ULONG): Boolean;
+begin
+ Result := (Tag and ULONG($40000000)) <> 0;
+end;
+
+function IsReparseTagNameSurrogate(Tag: ULONG): Boolean;
+begin
+ Result := (Tag and ULONG($20000000)) <> 0;
+end;
+
+// IMAGE_FIRST_SECTION by Nico Bendlin - supplied by Markus Fuchs
+
+function FieldOffset(const Struc; const Field): Cardinal;
+begin
+ Result := Cardinal(@Field) - Cardinal(@Struc);
+end;
+
+function IMAGE_FIRST_SECTION(NtHeader: PImageNtHeaders): PImageSectionHeader;
+begin
+ Result := PImageSectionHeader(Cardinal(NtHeader) +
+ FieldOffset(NtHeader^, NtHeader^.OptionalHeader) +
+ NtHeader^.FileHeader.SizeOfOptionalHeader);
+end;
+
+function BTYPE(x: DWORD): DWORD;
+begin
+ Result := x and N_BTMASK;
+end;
+
+function ISPTR(x: DWORD): Boolean;
+begin
+ Result := (x and N_TMASK) = (IMAGE_SYM_DTYPE_POINTER shl N_BTSHFT);
+end;
+
+function ISFCN(x: DWORD): Boolean;
+begin
+ Result := (x and N_TMASK) = (IMAGE_SYM_DTYPE_FUNCTION shl N_BTSHFT);
+end;
+
+function ISARY(x: DWORD): Boolean;
+begin
+ Result := (x and N_TMASK) = (IMAGE_SYM_DTYPE_ARRAY shl N_BTSHFT);
+end;
+
+function ISTAG(x: DWORD): Boolean;
+begin
+ Result := (x = IMAGE_SYM_CLASS_STRUCT_TAG) or (x = IMAGE_SYM_CLASS_UNION_TAG) or
+ (x = IMAGE_SYM_CLASS_ENUM_TAG);
+end;
+
+function IMAGE_ORDINAL64(Ordinal: ULONGLONG): ULONGLONG;
+begin
+ Result := (Ordinal and $ffff);
+end;
+
+function IMAGE_ORDINAL32(Ordinal: DWORD): DWORD;
+begin
+ Result := (Ordinal and $ffff);
+end;
+
+function IMAGE_ORDINAL(Ordinal: DWORD): DWORD;
+begin
+ Result := (Ordinal and $ffff);
+end;
+
+function IMAGE_SNAP_BY_ORDINAL64(Ordinal: ULONGLONG): Boolean;
+begin
+ Result := ((Ordinal and IMAGE_ORDINAL_FLAG64) <> 0);
+end;
+
+function IMAGE_SNAP_BY_ORDINAL32(Ordinal: DWORD): Boolean;
+begin
+ Result := ((Ordinal and IMAGE_ORDINAL_FLAG32) <> 0);
+end;
+
+function IMAGE_SNAP_BY_ORDINAL(Ordinal: DWORD): Boolean;
+begin
+ Result := ((Ordinal and IMAGE_ORDINAL_FLAG32) <> 0);
+end;
+
+function HEAP_MAKE_TAG_FLAGS(b, o: DWORD): DWORD;
+begin
+ Result := b + (o shl 18);
+end;
+
+procedure VER_SET_CONDITION(var Mask: DWORDLONG; TypeBitmask, ConditionMask: ULONG);
+begin
+ Mask := VerSetConditionMask(Mask, TypeBitmask, ConditionMask);
+end;
+
+{$IFDEF DYNAMIC_LINK}
+
+var
+ _RtlCaptureContext: Pointer;
+
+procedure RtlCaptureContext;
+begin
+ GetProcedureAddress(_RtlCaptureContext, ntdll, 'RtlCaptureContext');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RtlCaptureContext]
+ end;
+end;
+
+var
+ _RtlCompareMemory: Pointer;
+
+function RtlCompareMemory;
+begin
+ GetProcedureAddress(_RtlCompareMemory, ntdll, 'RtlCompareMemory');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RtlCompareMemory]
+ end;
+end;
+
+var
+ _VerSetConditionMask: Pointer;
+
+function VerSetConditionMask;
+begin
+ GetProcedureAddress(_VerSetConditionMask, kernel32, 'VerSetConditionMask');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_VerSetConditionMask]
+ end;
+end;
+
+var
+ _RtlInitializeSListHead: Pointer;
+
+procedure RtlInitializeSListHead;
+begin
+ GetProcedureAddress(_RtlInitializeSListHead, 'ntdll.dll', 'RtlInitializeSListHead');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RtlInitializeSListHead]
+ end;
+end;
+
+var
+ _RtlFirstEntrySList: Pointer;
+
+function RtlFirstEntrySList;
+begin
+ GetProcedureAddress(_RtlFirstEntrySList, 'ntdll.dll', 'RtlFirstEntrySList');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RtlFirstEntrySList]
+ end;
+end;
+
+var
+ _RtlInterlockedPopEntrySList: Pointer;
+
+function RtlInterlockedPopEntrySList;
+begin
+ GetProcedureAddress(_RtlInterlockedPopEntrySList, 'ntdll.dll', 'RtlInterlockedPopEntrySList');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RtlInterlockedPopEntrySList]
+ end;
+end;
+
+var
+ _RtlInterlockedPushEntrySList: Pointer;
+
+function RtlInterlockedPushEntrySList;
+begin
+ GetProcedureAddress(_RtlInterlockedPushEntrySList, 'ntdll.dll', 'RtlInterlockedPushEntrySList');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RtlInterlockedPushEntrySList]
+ end;
+end;
+
+var
+ _RtlInterlockedFlushSList: Pointer;
+
+function RtlInterlockedFlushSList;
+begin
+ GetProcedureAddress(_RtlInterlockedFlushSList, 'ntdll.dll', 'RtlInterlockedFlushSList');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RtlInterlockedFlushSList]
+ end;
+end;
+
+var
+ _RtlQueryDepthSList: Pointer;
+
+function RtlQueryDepthSList;
+begin
+ GetProcedureAddress(_RtlQueryDepthSList, 'ntdll.dll', 'RtlQueryDepthSList');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RtlQueryDepthSList]
+ end;
+end;
+
+{$ELSE}
+
+procedure RtlCaptureContext; external ntdll name 'RtlCaptureContext';
+function RtlCompareMemory; external ntdll name 'RtlCompareMemory';
+function VerSetConditionMask; external kernel32 name 'VerSetConditionMask';
+procedure RtlInitializeSListHead; external 'ntdll.dll' name 'RtlInitializeSListHead';
+function RtlFirstEntrySList; external 'ntdll.dll' name 'RtlFirstEntrySList';
+function RtlInterlockedPopEntrySList; external 'ntdll.dll' name 'RtlInterlockedPopEntrySList';
+function RtlInterlockedPushEntrySList; external 'ntdll.dll' name 'RtlInterlockedPushEntrySList';
+function RtlInterlockedFlushSList; external 'ntdll.dll' name 'RtlInterlockedFlushSList';
+function RtlQueryDepthSList; external 'ntdll.dll' name 'RtlQueryDepthSList';
+
+{$ENDIF DYNAMIC_LINK}
+
+end.
diff --git a/packages/extra/winunits/jwawinperf.pas b/packages/extra/winunits/jwawinperf.pas
index 8d010f403b..579d4d3328 100644
--- a/packages/extra/winunits/jwawinperf.pas
+++ b/packages/extra/winunits/jwawinperf.pas
@@ -1,883 +1,883 @@
-{******************************************************************************}
-{ }
-{ Performance Monitoring API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: winperf.h, released June 2000. The original Pascal }
-{ code is: WinPerf.pas, released December 2000. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwawinperf.pas,v 1.1 2005/04/04 07:56:11 marco Exp $
-
-unit JwaWinPerf;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "WinPerf.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-
-interface
-
-uses
- JwaWinBase, JwaWinType;
-
-// Header file for the Performance Monitor data.
-//
-// This file contains the definitions of the data structures returned
-// by the Configuration Registry in response to a request for
-// performance data. This file is used by both the Configuration
-// Registry and the Performance Monitor to define their interface.
-// The complete interface is described here, except for the name
-// of the node to query in the registry. It is
-//
-// HKEY_PERFORMANCE_DATA.
-//
-// By querying that node with a subkey of "Global" the caller will
-// retrieve the structures described here.
-//
-// There is no need to RegOpenKey() the reserved handle HKEY_PERFORMANCE_DATA,
-// but the caller should RegCloseKey() the handle so that network transports
-// and drivers can be removed or installed (which cannot happen while
-// they are open for monitoring.) Remote requests must first
-// RegConnectRegistry().
-
-// Data structure definitions.
-
-// In order for data to be returned through the Configuration Registry
-// in a system-independent fashion, it must be self-describing.
-
-// In the following, all offsets are in bytes.
-
-//
-// Data is returned through the Configuration Registry in a
-// a data block which begins with a _PERF_DATA_BLOCK structure.
-//
-
-const
- PERF_DATA_VERSION = 1;
- {$EXTERNALSYM PERF_DATA_VERSION}
- PERF_DATA_REVISION = 1;
- {$EXTERNALSYM PERF_DATA_REVISION}
-
-type
- PPERF_DATA_BLOCK = ^PERF_DATA_BLOCK;
- {$EXTERNALSYM PPERF_DATA_BLOCK}
- _PERF_DATA_BLOCK = record
- Signature: array [0..3] of WCHAR; // Signature: Unicode "PERF"
- LittleEndian: DWORD; // 0 = Big Endian, 1 = Little Endian
- Version: DWORD; // Version of these data structures
- // starting at 1
- Revision: DWORD; // Revision of these data structures
- // starting at 0 for each Version
- TotalByteLength: DWORD; // Total length of data block
- HeaderLength: DWORD; // Length of this structure
- NumObjectTypes: DWORD; // Number of types of objects
- // being reported
- DefaultObject: LONG; // Object Title Index of default
- // object to display when data from
- // this system is retrieved (-1 =
- // none, but this is not expected to
- // be used)
- SystemTime: SYSTEMTIME; // Time at the system under
- // measurement
- PerfTime: LARGE_INTEGER; // Performance counter value
- // at the system under measurement
- PerfFreq: LARGE_INTEGER; // Performance counter frequency
- // at the system under measurement
- PerfTime100nSec: LARGE_INTEGER; // Performance counter time in 100 nsec
- // units at the system under measurement
- SystemNameLength: DWORD; // Length of the system name
- SystemNameOffset: DWORD; // Offset, from beginning of this
- // structure, to name of system
- // being measured
- end;
- {$EXTERNALSYM _PERF_DATA_BLOCK}
- PERF_DATA_BLOCK = _PERF_DATA_BLOCK;
- {$EXTERNALSYM PERF_DATA_BLOCK}
- TPerfDataBlock = PERF_DATA_BLOCK;
- PPerfDataBlock = PPERF_DATA_BLOCK;
-
-//
-// The _PERF_DATA_BLOCK structure is followed by NumObjectTypes of
-// data sections, one for each type of object measured. Each object
-// type section begins with a _PERF_OBJECT_TYPE structure.
-//
-
- PPERF_OBJECT_TYPE = ^PERF_OBJECT_TYPE;
- {$EXTERNALSYM PPERF_OBJECT_TYPE}
- _PERF_OBJECT_TYPE = record
- TotalByteLength: DWORD; // Length of this object definition
- // including this structure, the
- // counter definitions, and the
- // instance definitions and the
- // counter blocks for each instance:
- // This is the offset from this
- // structure to the next object, if
- // any
- DefinitionLength: DWORD; // Length of object definition,
- // which includes this structure
- // and the counter definition
- // structures for this object: this
- // is the offset of the first
- // instance or of the counters
- // for this object if there is
- // no instance
- HeaderLength: DWORD; // Length of this structure: this
- // is the offset to the first
- // counter definition for this
- // object
- ObjectNameTitleIndex: DWORD; // Index to name in Title Database
- ObjectNameTitle: LPWSTR; // Initially NULL, for use by
- // analysis program to point to
- // retrieved title string
- ObjectHelpTitleIndex: DWORD; // Index to Help in Title Database
- ObjectHelpTitle: LPWSTR; // Initially NULL, for use by
- // analysis program to point to
- // retrieved title string
- DetailLevel: DWORD; // Object level of detail (for
- // controlling display complexity);
- // will be min of detail levels
- // for all this object's counters
- NumCounters: DWORD; // Number of counters in each
- // counter block (one counter
- // block per instance)
- DefaultCounter: LONG; // Default counter to display when
- // this object is selected, index
- // starting at 0 (-1 = none, but
- // this is not expected to be used)
- NumInstances: LONG; // Number of object instances
- // for which counters are being
- // returned from the system under
- // measurement. If the object defined
- // will never have any instance data
- // structures (PERF_INSTANCE_DEFINITION)
- // then this value should be -1, if the
- // object can have 0 or more instances,
- // but has none present, then this
- // should be 0, otherwise this field
- // contains the number of instances of
- // this counter.
- CodePage: DWORD; // 0 if instance strings are in
- // UNICODE, else the Code Page of
- // the instance names
- PerfTime: LARGE_INTEGER; // Sample Time in "Object" units
- PerfFreq: LARGE_INTEGER; // Frequency of "Object" units in
- // counts per second.
- end;
- {$EXTERNALSYM _PERF_OBJECT_TYPE}
- PERF_OBJECT_TYPE = _PERF_OBJECT_TYPE;
- {$EXTERNALSYM PERF_OBJECT_TYPE}
- TPerfObjectType = PERF_OBJECT_TYPE;
- PPerfObjectType = PPERF_OBJECT_TYPE;
-
-const
- PERF_NO_INSTANCES = -1; // no instances (see NumInstances above)
- {$EXTERNALSYM PERF_NO_INSTANCES}
-
-//
-// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-//
-// PERF_COUNTER_DEFINITION.CounterType field values
-//
-//
-// Counter ID Field Definition:
-//
-// 3 2 2 2 2 1 1 1
-// 1 8 4 2 0 6 2 0 8 0
-// +--------+--------+----+----+--------+--------+----+----+----------------+
-// |Display |Calculation |Time|Counter | |Ctr |Size| |
-// |Flags |Modifiers |Base|SubType |Reserved|Type|Fld | Reserved |
-// +--------+--------+----+----+--------+--------+----+----+----------------+
-//
-//
-// The counter type is the "or" of the following values as described below
-//
-// select one of the following to indicate the counter's data size
-//
-
- PERF_SIZE_DWORD = $00000000;
- {$EXTERNALSYM PERF_SIZE_DWORD}
- PERF_SIZE_LARGE = $00000100;
- {$EXTERNALSYM PERF_SIZE_LARGE}
- PERF_SIZE_ZERO = $00000200; // for Zero Length Fields
- {$EXTERNALSYM PERF_SIZE_ZERO}
- PERF_SIZE_VARIABLE_LEN = $00000300; // length is in CounterLength Fields
- // of Counter Definition struct
- {$EXTERNALSYM PERF_SIZE_VARIABLE_LEN}
-
-//
-// select one of the following values to indicate the counter field usage
-//
-
- PERF_TYPE_NUMBER = $00000000; // a number (not a counter)
- {$EXTERNALSYM PERF_TYPE_NUMBER}
- PERF_TYPE_COUNTER = $00000400; // an increasing numeric Value
- {$EXTERNALSYM PERF_TYPE_COUNTER}
- PERF_TYPE_TEXT = $00000800; // a text Fields
- {$EXTERNALSYM PERF_TYPE_TEXT}
- PERF_TYPE_ZERO = $00000C00; // displays a zero
- {$EXTERNALSYM PERF_TYPE_ZERO}
-
-//
-// If the PERF_TYPE_NUMBER field was selected, then select one of the
-// following to describe the Number
-//
-
- PERF_NUMBER_HEX = $00000000; // display as HEX Value
- {$EXTERNALSYM PERF_NUMBER_HEX}
- PERF_NUMBER_DECIMAL = $00010000; // display as a decimal integer
- {$EXTERNALSYM PERF_NUMBER_DECIMAL}
- PERF_NUMBER_DEC_1000 = $00020000; // display as a decimal/1000
- {$EXTERNALSYM PERF_NUMBER_DEC_1000}
-
-//
-// If the PERF_TYPE_COUNTER value was selected then select one of the
-// following to indicate the type of counter
-//
-
- PERF_COUNTER_VALUE = $00000000; // display counter Value
- {$EXTERNALSYM PERF_COUNTER_VALUE}
- PERF_COUNTER_RATE = $00010000; // divide ctr / delta time
- {$EXTERNALSYM PERF_COUNTER_RATE}
- PERF_COUNTER_FRACTION = $00020000; // divide ctr / base
- {$EXTERNALSYM PERF_COUNTER_FRACTION}
- PERF_COUNTER_BASE = $00030000; // base value used in fractions
- {$EXTERNALSYM PERF_COUNTER_BASE}
- PERF_COUNTER_ELAPSED = $00040000; // subtract counter from current time
- {$EXTERNALSYM PERF_COUNTER_ELAPSED}
- PERF_COUNTER_QUEUELEN = $00050000; // Use Queuelen processing func.
- {$EXTERNALSYM PERF_COUNTER_QUEUELEN}
- PERF_COUNTER_HISTOGRAM = $00060000; // Counter begins or ends a histogram
- {$EXTERNALSYM PERF_COUNTER_HISTOGRAM}
- PERF_COUNTER_PRECISION = $00070000; // divide ctr / private clock
- {$EXTERNALSYM PERF_COUNTER_PRECISION}
-
-//
-// If the PERF_TYPE_TEXT value was selected, then select one of the
-// following to indicate the type of TEXT data.
-//
-
- PERF_TEXT_UNICODE = $00000000; // type of text in text Fields
- {$EXTERNALSYM PERF_TEXT_UNICODE}
- PERF_TEXT_ASCII = $00010000; // ASCII using the CodePage Fields
- {$EXTERNALSYM PERF_TEXT_ASCII}
-
-//
-// Timer SubTypes
-//
-
- PERF_TIMER_TICK = $00000000; // use system perf. freq for base
- {$EXTERNALSYM PERF_TIMER_TICK}
- PERF_TIMER_100NS = $00100000; // use 100 NS timer time base units
- {$EXTERNALSYM PERF_TIMER_100NS}
- PERF_OBJECT_TIMER = $00200000; // use the object timer freq
- {$EXTERNALSYM PERF_OBJECT_TIMER}
-
-//
-// Any types that have calculations performed can use one or more of
-// the following calculation modification flags listed here
-//
-
- PERF_DELTA_COUNTER = $00400000; // compute difference First
- {$EXTERNALSYM PERF_DELTA_COUNTER}
- PERF_DELTA_BASE = $00800000; // compute base diff as well
- {$EXTERNALSYM PERF_DELTA_BASE}
- PERF_INVERSE_COUNTER = $01000000; // show as 1.00-value (assumes:
- {$EXTERNALSYM PERF_INVERSE_COUNTER}
- PERF_MULTI_COUNTER = $02000000; // sum of multiple instances
- {$EXTERNALSYM PERF_MULTI_COUNTER}
-
-//
-// Select one of the following values to indicate the display suffix (if any)
-//
-
- PERF_DISPLAY_NO_SUFFIX = $00000000; // no suffix
- {$EXTERNALSYM PERF_DISPLAY_NO_SUFFIX}
- PERF_DISPLAY_PER_SEC = $10000000; // "/sec"
- {$EXTERNALSYM PERF_DISPLAY_PER_SEC}
- PERF_DISPLAY_PERCENT = $20000000; // "%"
- {$EXTERNALSYM PERF_DISPLAY_PERCENT}
- PERF_DISPLAY_SECONDS = $30000000; // "secs"
- {$EXTERNALSYM PERF_DISPLAY_SECONDS}
- PERF_DISPLAY_NOSHOW = $40000000; // value is not displayed
- {$EXTERNALSYM PERF_DISPLAY_NOSHOW}
-
-//
-// Predefined counter types
-//
-
-// 32-bit Counter. Divide delta by delta time. Display suffix: "/sec"
-
- PERF_COUNTER_COUNTER =
- PERF_SIZE_DWORD or PERF_TYPE_COUNTER or PERF_COUNTER_RATE or
- PERF_TIMER_TICK or PERF_DELTA_COUNTER or PERF_DISPLAY_PER_SEC;
- {$EXTERNALSYM PERF_COUNTER_COUNTER}
-
-// 64-bit Timer. Divide delta by delta time. Display suffix: "%"
-
- PERF_COUNTER_TIMER =
- PERF_SIZE_LARGE or PERF_TYPE_COUNTER or PERF_COUNTER_RATE or
- PERF_TIMER_TICK or PERF_DELTA_COUNTER or PERF_DISPLAY_PERCENT;
- {$EXTERNALSYM PERF_COUNTER_TIMER}
-
-// Queue Length Space-Time Product. Divide delta by delta time. No Display Suffix.
-
- PERF_COUNTER_QUEUELEN_TYPE =
- PERF_SIZE_DWORD or PERF_TYPE_COUNTER or PERF_COUNTER_QUEUELEN or
- PERF_TIMER_TICK or PERF_DELTA_COUNTER or PERF_DISPLAY_NO_SUFFIX;
- {$EXTERNALSYM PERF_COUNTER_QUEUELEN_TYPE}
-
-// Queue Length Space-Time Product. Divide delta by delta time. No Display Suffix.
-
- PERF_COUNTER_LARGE_QUEUELEN_TYPE =
- PERF_SIZE_LARGE or PERF_TYPE_COUNTER or PERF_COUNTER_QUEUELEN or
- PERF_TIMER_TICK or PERF_DELTA_COUNTER or PERF_DISPLAY_NO_SUFFIX;
- {$EXTERNALSYM PERF_COUNTER_LARGE_QUEUELEN_TYPE}
-
-// Queue Length Space-Time Product using 100 Ns timebase.
-// Divide delta by delta time. No Display Suffix.
-
- PERF_COUNTER_100NS_QUEUELEN_TYPE =
- PERF_SIZE_LARGE or PERF_TYPE_COUNTER or PERF_COUNTER_QUEUELEN or
- PERF_TIMER_100NS or PERF_DELTA_COUNTER or PERF_DISPLAY_NO_SUFFIX;
- {$EXTERNALSYM PERF_COUNTER_100NS_QUEUELEN_TYPE}
-
-// Queue Length Space-Time Product using Object specific timebase.
-// Divide delta by delta time. No Display Suffix.
-
- PERF_COUNTER_OBJ_TIME_QUEUELEN_TYPE =
- PERF_SIZE_LARGE or PERF_TYPE_COUNTER or PERF_COUNTER_QUEUELEN or
- PERF_OBJECT_TIMER or PERF_DELTA_COUNTER or PERF_DISPLAY_NO_SUFFIX;
- {$EXTERNALSYM PERF_COUNTER_OBJ_TIME_QUEUELEN_TYPE}
-
-// 64-bit Counter. Divide delta by delta time. Display Suffix: "/sec"
-
- PERF_COUNTER_BULK_COUNT =
- PERF_SIZE_LARGE or PERF_TYPE_COUNTER or PERF_COUNTER_RATE or
- PERF_TIMER_TICK or PERF_DELTA_COUNTER or PERF_DISPLAY_PER_SEC;
- {$EXTERNALSYM PERF_COUNTER_BULK_COUNT}
-
-// Indicates the counter is not a counter but rather Unicode text Display as text.
-
- PERF_COUNTER_TEXT =
- PERF_SIZE_VARIABLE_LEN or PERF_TYPE_TEXT or PERF_TEXT_UNICODE or
- PERF_DISPLAY_NO_SUFFIX;
- {$EXTERNALSYM PERF_COUNTER_TEXT}
-
-// Indicates the data is a counter which should not be
-// time averaged on display (such as an error counter on a serial line)
-// Display as is. No Display Suffix.
-
- PERF_COUNTER_RAWCOUNT =
- PERF_SIZE_DWORD or PERF_TYPE_NUMBER or PERF_NUMBER_DECIMAL or
- PERF_DISPLAY_NO_SUFFIX;
- {$EXTERNALSYM PERF_COUNTER_RAWCOUNT}
-
-// Same as PERF_COUNTER_RAWCOUNT except its size is a large integer
-
- PERF_COUNTER_LARGE_RAWCOUNT =
- PERF_SIZE_LARGE or PERF_TYPE_NUMBER or PERF_NUMBER_DECIMAL or
- PERF_DISPLAY_NO_SUFFIX;
- {$EXTERNALSYM PERF_COUNTER_LARGE_RAWCOUNT}
-
-// Special case for RAWCOUNT that want to be displayed in hex
-// Indicates the data is a counter which should not be
-// time averaged on display (such as an error counter on a serial line)
-// Display as is. No Display Suffix.
-
- PERF_COUNTER_RAWCOUNT_HEX =
- PERF_SIZE_DWORD or PERF_TYPE_NUMBER or PERF_NUMBER_HEX or
- PERF_DISPLAY_NO_SUFFIX;
- {$EXTERNALSYM PERF_COUNTER_RAWCOUNT_HEX}
-
-// Same as PERF_COUNTER_RAWCOUNT_HEX except its size is a large integer
-
- PERF_COUNTER_LARGE_RAWCOUNT_HEX =
- PERF_SIZE_LARGE or PERF_TYPE_NUMBER or PERF_NUMBER_HEX or
- PERF_DISPLAY_NO_SUFFIX;
- {$EXTERNALSYM PERF_COUNTER_LARGE_RAWCOUNT_HEX}
-
-// A count which is either 1 or 0 on each sampling interrupt (% busy)
-// Divide delta by delta base. Display Suffix: "%"
-
- PERF_SAMPLE_FRACTION =
- PERF_SIZE_DWORD or PERF_TYPE_COUNTER or PERF_COUNTER_FRACTION or
- PERF_DELTA_COUNTER or PERF_DELTA_BASE or PERF_DISPLAY_PERCENT;
- {$EXTERNALSYM PERF_SAMPLE_FRACTION}
-
-// A count which is sampled on each sampling interrupt (queue length)
-// Divide delta by delta time. No Display Suffix.
-
- PERF_SAMPLE_COUNTER =
- PERF_SIZE_DWORD or PERF_TYPE_COUNTER or PERF_COUNTER_RATE or
- PERF_TIMER_TICK or PERF_DELTA_COUNTER or PERF_DISPLAY_NO_SUFFIX;
- {$EXTERNALSYM PERF_SAMPLE_COUNTER}
-
-// A label: no data is associated with this counter (it has 0 length)
-// Do not display.
-
- PERF_COUNTER_NODATA =
- PERF_SIZE_ZERO or PERF_DISPLAY_NOSHOW;
- {$EXTERNALSYM PERF_COUNTER_NODATA}
-
-// 64-bit Timer inverse (e.g., idle is measured, but display busy %)
-// Display 100 - delta divided by delta time. Display suffix: "%"
-
- PERF_COUNTER_TIMER_INV =
- PERF_SIZE_LARGE or PERF_TYPE_COUNTER or PERF_COUNTER_RATE or
- PERF_TIMER_TICK or PERF_DELTA_COUNTER or PERF_INVERSE_COUNTER or
- PERF_DISPLAY_PERCENT;
- {$EXTERNALSYM PERF_COUNTER_TIMER_INV}
-
-// The divisor for a sample, used with the previous counter to form a
-// sampled %. You must check for >0 before dividing by this! This
-// counter will directly follow the numerator counter. It should not
-// be displayed to the user.
-
- PERF_SAMPLE_BASE =
- PERF_SIZE_DWORD or PERF_TYPE_COUNTER or PERF_COUNTER_BASE or
- PERF_DISPLAY_NOSHOW or
- $00000001; // for compatibility with pre-beta versions
- {$EXTERNALSYM PERF_SAMPLE_BASE}
-
-// A timer which, when divided by an average base, produces a time
-// in seconds which is the average time of some operation. This
-// timer times total operations, and the base is the number of opera-
-// tions. Display Suffix: "sec"
-
- PERF_AVERAGE_TIMER =
- PERF_SIZE_DWORD or PERF_TYPE_COUNTER or PERF_COUNTER_FRACTION or
- PERF_DISPLAY_SECONDS;
- {$EXTERNALSYM PERF_AVERAGE_TIMER}
-
-// Used as the denominator in the computation of time or count
-// averages. Must directly follow the numerator counter. Not dis-
-// played to the user.
-
- PERF_AVERAGE_BASE =
- PERF_SIZE_DWORD or PERF_TYPE_COUNTER or PERF_COUNTER_BASE or
- PERF_DISPLAY_NOSHOW or
- $00000002; // for compatibility with pre-beta versions
- {$EXTERNALSYM PERF_AVERAGE_BASE}
-
-// A bulk count which, when divided (typically) by the number of
-// operations, gives (typically) the number of bytes per operation.
-// No Display Suffix.
-
- PERF_AVERAGE_BULK =
- PERF_SIZE_LARGE or PERF_TYPE_COUNTER or PERF_COUNTER_FRACTION or
- PERF_DISPLAY_NOSHOW;
- {$EXTERNALSYM PERF_AVERAGE_BULK}
-
-// 64-bit Timer in object specific units. Display delta divided by
-// delta time as returned in the object type header structure. Display suffix: "%"
-
- PERF_OBJ_TIME_TIMER =
- PERF_SIZE_LARGE or PERF_TYPE_COUNTER or PERF_COUNTER_RATE or
- PERF_OBJECT_TIMER or PERF_DELTA_COUNTER or PERF_DISPLAY_PERCENT;
- {$EXTERNALSYM PERF_OBJ_TIME_TIMER}
-
-// 64-bit Timer in 100 nsec units. Display delta divided by
-// delta time. Display suffix: "%"
-
- PERF_100NSEC_TIMER =
- PERF_SIZE_LARGE or PERF_TYPE_COUNTER or PERF_COUNTER_RATE or
- PERF_TIMER_100NS or PERF_DELTA_COUNTER or PERF_DISPLAY_PERCENT;
- {$EXTERNALSYM PERF_100NSEC_TIMER}
-
-// 64-bit Timer inverse (e.g., idle is measured, but display busy %)
-// Display 100 - delta divided by delta time. Display suffix: "%"
-
- PERF_100NSEC_TIMER_INV =
- PERF_SIZE_LARGE or PERF_TYPE_COUNTER or PERF_COUNTER_RATE or
- PERF_TIMER_100NS or PERF_DELTA_COUNTER or PERF_INVERSE_COUNTER or
- PERF_DISPLAY_PERCENT;
- {$EXTERNALSYM PERF_100NSEC_TIMER_INV}
-
-// 64-bit Timer. Divide delta by delta time. Display suffix: "%"
-// Timer for multiple instances, so result can exceed 100%.
-
- PERF_COUNTER_MULTI_TIMER =
- PERF_SIZE_LARGE or PERF_TYPE_COUNTER or PERF_COUNTER_RATE or
- PERF_DELTA_COUNTER or PERF_TIMER_TICK or PERF_MULTI_COUNTER or
- PERF_DISPLAY_PERCENT;
- {$EXTERNALSYM PERF_COUNTER_MULTI_TIMER}
-
-// 64-bit Timer inverse (e.g., idle is measured, but display busy %)
-// Display 100 * _MULTI_BASE - delta divided by delta time.
-// Display suffix: "%" Timer for multiple instances, so result
-// can exceed 100%. Followed by a counter of type _MULTI_BASE.
-
- PERF_COUNTER_MULTI_TIMER_INV =
- PERF_SIZE_LARGE or PERF_TYPE_COUNTER or PERF_COUNTER_RATE or
- PERF_DELTA_COUNTER or PERF_MULTI_COUNTER or PERF_TIMER_TICK or
- PERF_INVERSE_COUNTER or PERF_DISPLAY_PERCENT;
- {$EXTERNALSYM PERF_COUNTER_MULTI_TIMER_INV}
-
-// Number of instances to which the preceding _MULTI_..._INV counter
-// applies. Used as a factor to get the percentage.
-
- PERF_COUNTER_MULTI_BASE =
- PERF_SIZE_LARGE or PERF_TYPE_COUNTER or PERF_COUNTER_BASE or
- PERF_MULTI_COUNTER or PERF_DISPLAY_NOSHOW;
- {$EXTERNALSYM PERF_COUNTER_MULTI_BASE}
-
-// 64-bit Timer in 100 nsec units. Display delta divided by delta time.
-// Display suffix: "%" Timer for multiple instances, so result can exceed 100%.
-
- PERF_100NSEC_MULTI_TIMER =
- PERF_SIZE_LARGE or PERF_TYPE_COUNTER or PERF_DELTA_COUNTER or
- PERF_COUNTER_RATE or PERF_TIMER_100NS or PERF_MULTI_COUNTER or
- PERF_DISPLAY_PERCENT;
- {$EXTERNALSYM PERF_100NSEC_MULTI_TIMER}
-
-// 64-bit Timer inverse (e.g., idle is measured, but display busy %)
-// Display 100 * _MULTI_BASE - delta divided by delta time.
-// Display suffix: "%" Timer for multiple instances, so result
-// can exceed 100%. Followed by a counter of type _MULTI_BASE.
-
- PERF_100NSEC_MULTI_TIMER_INV =
- PERF_SIZE_LARGE or PERF_TYPE_COUNTER or PERF_DELTA_COUNTER or
- PERF_COUNTER_RATE or PERF_TIMER_100NS or PERF_MULTI_COUNTER or
- PERF_INVERSE_COUNTER or PERF_DISPLAY_PERCENT;
- {$EXTERNALSYM PERF_100NSEC_MULTI_TIMER_INV}
-
-// Indicates the data is a fraction of the following counter which
-// should not be time averaged on display (such as free space over
-// total space.) Display as is. Display the quotient as "%".
-
- PERF_RAW_FRACTION =
- PERF_SIZE_DWORD or PERF_TYPE_COUNTER or PERF_COUNTER_FRACTION or
- PERF_DISPLAY_PERCENT;
- {$EXTERNALSYM PERF_RAW_FRACTION}
-
- PERF_LARGE_RAW_FRACTION =
- PERF_SIZE_LARGE or PERF_TYPE_COUNTER or PERF_COUNTER_FRACTION or
- PERF_DISPLAY_PERCENT;
- {$EXTERNALSYM PERF_LARGE_RAW_FRACTION}
-
-// Indicates the data is a base for the preceding counter which should
-// not be time averaged on display (such as free space over total space.)
-
- PERF_RAW_BASE =
- PERF_SIZE_DWORD or PERF_TYPE_COUNTER or PERF_COUNTER_BASE or
- PERF_DISPLAY_NOSHOW or
- $00000003; // for compatibility with pre-beta versions
- {$EXTERNALSYM PERF_RAW_BASE}
-
- PERF_LARGE_RAW_BASE =
- PERF_SIZE_LARGE or PERF_TYPE_COUNTER or PERF_COUNTER_BASE or
- PERF_DISPLAY_NOSHOW;
- {$EXTERNALSYM PERF_LARGE_RAW_BASE}
-
-// The data collected in this counter is actually the start time of the
-// item being measured. For display, this data is subtracted from the
-// sample time to yield the elapsed time as the difference between the two.
-// In the definition below, the PerfTime field of the Object contains
-// the sample time as indicated by the PERF_OBJECT_TIMER bit and the
-// difference is scaled by the PerfFreq of the Object to convert the time
-// units into seconds.
-
- PERF_ELAPSED_TIME =
- PERF_SIZE_LARGE or PERF_TYPE_COUNTER or PERF_COUNTER_ELAPSED or
- PERF_OBJECT_TIMER or PERF_DISPLAY_SECONDS;
- {$EXTERNALSYM PERF_ELAPSED_TIME}
-
-//
-// The following counter type can be used with the preceding types to
-// define a range of values to be displayed in a histogram.
-//
-
- PERF_COUNTER_HISTOGRAM_TYPE = $80000000; // Counter begins or ends a histogram
- {$EXTERNALSYM PERF_COUNTER_HISTOGRAM_TYPE}
-
-//
-// This counter is used to display the difference from one sample
-// to the next. The counter value is a constantly increasing number
-// and the value displayed is the difference between the current
-// value and the previous value. Negative numbers are not allowed
-// which shouldn't be a problem as long as the counter value is
-// increasing or unchanged.
-//
-
- PERF_COUNTER_DELTA =
- PERF_SIZE_DWORD or PERF_TYPE_COUNTER or PERF_COUNTER_VALUE or
- PERF_DELTA_COUNTER or PERF_DISPLAY_NO_SUFFIX;
- {$EXTERNALSYM PERF_COUNTER_DELTA}
-
- PERF_COUNTER_LARGE_DELTA =
- PERF_SIZE_LARGE or PERF_TYPE_COUNTER or PERF_COUNTER_VALUE or
- PERF_DELTA_COUNTER or PERF_DISPLAY_NO_SUFFIX;
- {$EXTERNALSYM PERF_COUNTER_LARGE_DELTA}
-
-//
-// The precision counters are timers that consist of two counter values:
-// 1) the count of elapsed time of the event being monitored
-// 2) the "clock" time in the same units
-//
-// the precition timers are used where the standard system timers are not
-// precise enough for accurate readings. It's assumed that the service
-// providing the data is also providing a timestamp at the same time which
-// will eliminate any error that may occur since some small and variable
-// time elapses between the time the system timestamp is captured and when
-// the data is collected from the performance DLL. Only in extreme cases
-// has this been observed to be problematic.
-//
-// when using this type of timer, the definition of the
-// PERF_PRECISION_TIMESTAMP counter must immediately follow the
-// definition of the PERF_PRECISION_*_TIMER in the Object header
-//
-// The timer used has the same frequency as the System Performance Timer
-
- PERF_PRECISION_SYSTEM_TIMER =
- PERF_SIZE_LARGE or PERF_TYPE_COUNTER or PERF_COUNTER_PRECISION or
- PERF_TIMER_TICK or PERF_DELTA_COUNTER or PERF_DISPLAY_PERCENT;
- {$EXTERNALSYM PERF_PRECISION_SYSTEM_TIMER}
-
-//
-// The timer used has the same frequency as the 100 NanoSecond Timer
-
- PERF_PRECISION_100NS_TIMER =
- PERF_SIZE_LARGE or PERF_TYPE_COUNTER or PERF_COUNTER_PRECISION or
- PERF_TIMER_100NS or PERF_DELTA_COUNTER or PERF_DISPLAY_PERCENT;
- {$EXTERNALSYM PERF_PRECISION_100NS_TIMER}
-
-//
-// The timer used is of the frequency specified in the Object header's
-// PerfFreq field (PerfTime is ignored)
-
- PERF_PRECISION_OBJECT_TIMER =
- PERF_SIZE_LARGE or PERF_TYPE_COUNTER or PERF_COUNTER_PRECISION or
- PERF_OBJECT_TIMER or PERF_DELTA_COUNTER or PERF_DISPLAY_PERCENT;
- {$EXTERNALSYM PERF_PRECISION_OBJECT_TIMER}
-
-//
-// This is the timestamp to use in the computation of the timer specified
-// in the previous description block
-
- PERF_PRECISION_TIMESTAMP = PERF_LARGE_RAW_BASE;
- {$EXTERNALSYM PERF_PRECISION_TIMESTAMP}
-
-//
-// The following are used to determine the level of detail associated
-// with the counter. The user will be setting the level of detail
-// that should be displayed at any given time.
-//
-//
-
- PERF_DETAIL_NOVICE = 100; // The uninformed can understand it
- {$EXTERNALSYM PERF_DETAIL_NOVICE}
- PERF_DETAIL_ADVANCED = 200; // For the advanced user
- {$EXTERNALSYM PERF_DETAIL_ADVANCED}
- PERF_DETAIL_EXPERT = 300; // For the expert user
- {$EXTERNALSYM PERF_DETAIL_EXPERT}
- PERF_DETAIL_WIZARD = 400; // For the system designer
- {$EXTERNALSYM PERF_DETAIL_WIZARD}
-
-//
-//
-// There is one of the following for each of the
-// PERF_OBJECT_TYPE.NumCounters. The Unicode names in this structure MUST
-// come from a message file.
-//
-//
-
-type
- PPERF_COUNTER_DEFINITION = ^PERF_COUNTER_DEFINITION;
- {$EXTERNALSYM PPERF_COUNTER_DEFINITION}
- _PERF_COUNTER_DEFINITION = record
- ByteLength: DWORD; // Length in bytes of this structure
- CounterNameTitleIndex: DWORD; // Index of Counter name into
- // Title Database
- CounterNameTitle: LPWSTR; // Initially NULL, for use by
- // analysis program to point to
- // retrieved title string
- CounterHelpTitleIndex: DWORD; // Index of Counter Help into
- // Title Database
- CounterHelpTitle: LPWSTR; // Initially NULL, for use by
- // analysis program to point to
- // retrieved title string
- DefaultScale: LONG; // Power of 10 by which to scale
- // chart line if vertical axis is 100
- // 0 ==> 1, 1 ==> 10, -1 ==>1/10, etc.
- DetailLevel: DWORD; // Counter level of detail (for
- // controlling display complexity)
- CounterType: DWORD; // Type of counter
- CounterSize: DWORD; // Size of counter in bytes
- CounterOffset: DWORD; // Offset from the start of the
- // PERF_COUNTER_BLOCK to the first
- // byte of this counter
- end;
- {$EXTERNALSYM _PERF_COUNTER_DEFINITION}
- PERF_COUNTER_DEFINITION = _PERF_COUNTER_DEFINITION;
- {$EXTERNALSYM PERF_COUNTER_DEFINITION}
- TPerfCounterDefinition = PERF_COUNTER_DEFINITION;
- PPerfCounterDefinition = PPERF_COUNTER_DEFINITION;
-
-//
-//
-// If (PERF_DATA_BLOCK.NumInstances >= 0) then there will be
-// PERF_DATA_BLOCK.NumInstances of a (PERF_INSTANCE_DEFINITION
-// followed by a PERF_COUNTER_BLOCK followed by the counter data fields)
-// for each instance.
-//
-// If (PERF_DATA_BLOCK.NumInstances < 0) then the counter definition
-// strucutre above will be followed by only a PERF_COUNTER_BLOCK and the
-// counter data for that COUNTER.
-//
-
-const
- PERF_NO_UNIQUE_ID = -1;
- {$EXTERNALSYM PERF_NO_UNIQUE_ID}
-
-type
- PPERF_INSTANCE_DEFINITION = ^PERF_INSTANCE_DEFINITION;
- {$EXTERNALSYM PPERF_INSTANCE_DEFINITION}
- _PERF_INSTANCE_DEFINITION = record
- ByteLength: DWORD; // Length in bytes of this structure,
- // including the subsequent name
- ParentObjectTitleIndex: DWORD; // Title Index to name of "parent"
- // object (e.g., if thread, then
- // process is parent object type);
- // if logical drive, the physical
- // drive is parent object type
- ParentObjectInstance: DWORD; // Index to instance of parent object
- // type which is the parent of this
- // instance.
- UniqueID: LONG; // A unique ID used instead of
- // matching the name to identify
- // this instance, -1 = none
- NameOffset: DWORD; // Offset from beginning of
- // this struct to the Unicode name
- // of this instance
- NameLength: DWORD; // Length in bytes of name; 0 = none
- // this length includes the characters
- // in the string plus the size of the
- // terminating NULL char. It does not
- // include any additional pad bytes to
- // correct structure alignment
- end;
- {$EXTERNALSYM _PERF_INSTANCE_DEFINITION}
- PERF_INSTANCE_DEFINITION = _PERF_INSTANCE_DEFINITION;
- {$EXTERNALSYM PERF_INSTANCE_DEFINITION}
- TPerfInstanceDefinition = PERF_INSTANCE_DEFINITION;
- PPerfInstanceDefinition = PPERF_INSTANCE_DEFINITION;
-
-//
-// If .ParentObjectName is 0, there
-// is no parent-child hierarchy for this object type. Otherwise,
-// the .ParentObjectInstance is an index, starting at 0, into the
-// instances reported for the parent object type. It is only
-// meaningful if .ParentObjectName is not 0. The purpose of all this
-// is to permit reporting/summation of object instances like threads
-// within processes, and logical drives within physical drives.
-//
-//
-// The PERF_INSTANCE_DEFINITION will be followed by a PERF_COUNTER_BLOCK.
-//
-
- PPERF_COUNTER_BLOCK = ^PERF_COUNTER_BLOCK;
- {$EXTERNALSYM PPERF_COUNTER_BLOCK}
- _PERF_COUNTER_BLOCK = record
- ByteLength: DWORD; // Length in bytes of this structure,
- // including the following counters
- end;
- {$EXTERNALSYM _PERF_COUNTER_BLOCK}
- PERF_COUNTER_BLOCK = _PERF_COUNTER_BLOCK;
- {$EXTERNALSYM PERF_COUNTER_BLOCK}
- TPerfCounterBlock = PERF_COUNTER_BLOCK;
- PPerfCounterBlock = PPERF_COUNTER_BLOCK;
-
-//
-// The PERF_COUNTER_BLOCK is followed by PERF_OBJECT_TYPE.NumCounters
-// number of counters.
-//
-
-//
-// Support for New Extensible API starting with NT 5.0
-//
-
-const
- PERF_QUERY_OBJECTS = DWORD($80000000);
- {$EXTERNALSYM PERF_QUERY_OBJECTS}
- PERF_QUERY_GLOBAL = DWORD($80000001);
- {$EXTERNALSYM PERF_QUERY_GLOBAL}
- PERF_QUERY_COSTLY = DWORD($80000002);
- {$EXTERNALSYM PERF_QUERY_COSTLY}
-
-//
-// function typedefs for extensible counter function prototypes
-//
-
-type
- PM_OPEN_PROC = function(Arg1: LPWSTR): DWORD; stdcall;
- {$EXTERNALSYM PM_OPEN_PROC}
- PM_COLLECT_PROC = function(Arg1: LPWSTR; Arg2: Pointer; Arg3, Arg4: LPDWORD): DWORD; stdcall;
- {$EXTERNALSYM PM_COLLECT_PROC}
- PM_CLOSE_PROC = function: DWORD; stdcall;
- {$EXTERNALSYM PM_CLOSE_PROC}
- PM_QUERY_PROC = function(Arg1: LPDWORD; Arg2: Pointer; Arg3, Arg4: LPDWORD): DWORD; stdcall;
- {$EXTERNALSYM PM_QUERY_PROC}
-
-const
- MAX_PERF_OBJECTS_IN_QUERY_FUNCTION = LONG(64);
- {$EXTERNALSYM MAX_PERF_OBJECTS_IN_QUERY_FUNCTION}
-
-//
-// The following are the possible values for
-// HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Perflib\EventLogLevel
-// The default is WINPERF_LOG_NONE if the registry value is not defined.
-// This should be adopted by all perfdlls to avoid flooding the application
-// event log.
-//
-
-const
- WINPERF_LOG_NONE = 0; // No event reported
- {$EXTERNALSYM WINPERF_LOG_NONE}
- WINPERF_LOG_USER = 1; // Report only errors
- {$EXTERNALSYM WINPERF_LOG_USER}
- WINPERF_LOG_DEBUG = 2; // Report debug errors as well
- {$EXTERNALSYM WINPERF_LOG_DEBUG}
- WINPERF_LOG_VERBOSE = 3; // Report everything
- {$EXTERNALSYM WINPERF_LOG_VERBOSE}
-
-implementation
-
-end.
+{******************************************************************************}
+{ }
+{ Performance Monitoring API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: winperf.h, released June 2000. The original Pascal }
+{ code is: WinPerf.pas, released December 2000. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwawinperf.pas,v 1.1 2005/04/04 07:56:11 marco Exp $
+
+unit JwaWinPerf;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "WinPerf.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+
+interface
+
+uses
+ JwaWinBase, JwaWinType;
+
+// Header file for the Performance Monitor data.
+//
+// This file contains the definitions of the data structures returned
+// by the Configuration Registry in response to a request for
+// performance data. This file is used by both the Configuration
+// Registry and the Performance Monitor to define their interface.
+// The complete interface is described here, except for the name
+// of the node to query in the registry. It is
+//
+// HKEY_PERFORMANCE_DATA.
+//
+// By querying that node with a subkey of "Global" the caller will
+// retrieve the structures described here.
+//
+// There is no need to RegOpenKey() the reserved handle HKEY_PERFORMANCE_DATA,
+// but the caller should RegCloseKey() the handle so that network transports
+// and drivers can be removed or installed (which cannot happen while
+// they are open for monitoring.) Remote requests must first
+// RegConnectRegistry().
+
+// Data structure definitions.
+
+// In order for data to be returned through the Configuration Registry
+// in a system-independent fashion, it must be self-describing.
+
+// In the following, all offsets are in bytes.
+
+//
+// Data is returned through the Configuration Registry in a
+// a data block which begins with a _PERF_DATA_BLOCK structure.
+//
+
+const
+ PERF_DATA_VERSION = 1;
+ {$EXTERNALSYM PERF_DATA_VERSION}
+ PERF_DATA_REVISION = 1;
+ {$EXTERNALSYM PERF_DATA_REVISION}
+
+type
+ PPERF_DATA_BLOCK = ^PERF_DATA_BLOCK;
+ {$EXTERNALSYM PPERF_DATA_BLOCK}
+ _PERF_DATA_BLOCK = record
+ Signature: array [0..3] of WCHAR; // Signature: Unicode "PERF"
+ LittleEndian: DWORD; // 0 = Big Endian, 1 = Little Endian
+ Version: DWORD; // Version of these data structures
+ // starting at 1
+ Revision: DWORD; // Revision of these data structures
+ // starting at 0 for each Version
+ TotalByteLength: DWORD; // Total length of data block
+ HeaderLength: DWORD; // Length of this structure
+ NumObjectTypes: DWORD; // Number of types of objects
+ // being reported
+ DefaultObject: LONG; // Object Title Index of default
+ // object to display when data from
+ // this system is retrieved (-1 =
+ // none, but this is not expected to
+ // be used)
+ SystemTime: SYSTEMTIME; // Time at the system under
+ // measurement
+ PerfTime: LARGE_INTEGER; // Performance counter value
+ // at the system under measurement
+ PerfFreq: LARGE_INTEGER; // Performance counter frequency
+ // at the system under measurement
+ PerfTime100nSec: LARGE_INTEGER; // Performance counter time in 100 nsec
+ // units at the system under measurement
+ SystemNameLength: DWORD; // Length of the system name
+ SystemNameOffset: DWORD; // Offset, from beginning of this
+ // structure, to name of system
+ // being measured
+ end;
+ {$EXTERNALSYM _PERF_DATA_BLOCK}
+ PERF_DATA_BLOCK = _PERF_DATA_BLOCK;
+ {$EXTERNALSYM PERF_DATA_BLOCK}
+ TPerfDataBlock = PERF_DATA_BLOCK;
+ PPerfDataBlock = PPERF_DATA_BLOCK;
+
+//
+// The _PERF_DATA_BLOCK structure is followed by NumObjectTypes of
+// data sections, one for each type of object measured. Each object
+// type section begins with a _PERF_OBJECT_TYPE structure.
+//
+
+ PPERF_OBJECT_TYPE = ^PERF_OBJECT_TYPE;
+ {$EXTERNALSYM PPERF_OBJECT_TYPE}
+ _PERF_OBJECT_TYPE = record
+ TotalByteLength: DWORD; // Length of this object definition
+ // including this structure, the
+ // counter definitions, and the
+ // instance definitions and the
+ // counter blocks for each instance:
+ // This is the offset from this
+ // structure to the next object, if
+ // any
+ DefinitionLength: DWORD; // Length of object definition,
+ // which includes this structure
+ // and the counter definition
+ // structures for this object: this
+ // is the offset of the first
+ // instance or of the counters
+ // for this object if there is
+ // no instance
+ HeaderLength: DWORD; // Length of this structure: this
+ // is the offset to the first
+ // counter definition for this
+ // object
+ ObjectNameTitleIndex: DWORD; // Index to name in Title Database
+ ObjectNameTitle: LPWSTR; // Initially NULL, for use by
+ // analysis program to point to
+ // retrieved title string
+ ObjectHelpTitleIndex: DWORD; // Index to Help in Title Database
+ ObjectHelpTitle: LPWSTR; // Initially NULL, for use by
+ // analysis program to point to
+ // retrieved title string
+ DetailLevel: DWORD; // Object level of detail (for
+ // controlling display complexity);
+ // will be min of detail levels
+ // for all this object's counters
+ NumCounters: DWORD; // Number of counters in each
+ // counter block (one counter
+ // block per instance)
+ DefaultCounter: LONG; // Default counter to display when
+ // this object is selected, index
+ // starting at 0 (-1 = none, but
+ // this is not expected to be used)
+ NumInstances: LONG; // Number of object instances
+ // for which counters are being
+ // returned from the system under
+ // measurement. If the object defined
+ // will never have any instance data
+ // structures (PERF_INSTANCE_DEFINITION)
+ // then this value should be -1, if the
+ // object can have 0 or more instances,
+ // but has none present, then this
+ // should be 0, otherwise this field
+ // contains the number of instances of
+ // this counter.
+ CodePage: DWORD; // 0 if instance strings are in
+ // UNICODE, else the Code Page of
+ // the instance names
+ PerfTime: LARGE_INTEGER; // Sample Time in "Object" units
+ PerfFreq: LARGE_INTEGER; // Frequency of "Object" units in
+ // counts per second.
+ end;
+ {$EXTERNALSYM _PERF_OBJECT_TYPE}
+ PERF_OBJECT_TYPE = _PERF_OBJECT_TYPE;
+ {$EXTERNALSYM PERF_OBJECT_TYPE}
+ TPerfObjectType = PERF_OBJECT_TYPE;
+ PPerfObjectType = PPERF_OBJECT_TYPE;
+
+const
+ PERF_NO_INSTANCES = -1; // no instances (see NumInstances above)
+ {$EXTERNALSYM PERF_NO_INSTANCES}
+
+//
+// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+//
+// PERF_COUNTER_DEFINITION.CounterType field values
+//
+//
+// Counter ID Field Definition:
+//
+// 3 2 2 2 2 1 1 1
+// 1 8 4 2 0 6 2 0 8 0
+// +--------+--------+----+----+--------+--------+----+----+----------------+
+// |Display |Calculation |Time|Counter | |Ctr |Size| |
+// |Flags |Modifiers |Base|SubType |Reserved|Type|Fld | Reserved |
+// +--------+--------+----+----+--------+--------+----+----+----------------+
+//
+//
+// The counter type is the "or" of the following values as described below
+//
+// select one of the following to indicate the counter's data size
+//
+
+ PERF_SIZE_DWORD = $00000000;
+ {$EXTERNALSYM PERF_SIZE_DWORD}
+ PERF_SIZE_LARGE = $00000100;
+ {$EXTERNALSYM PERF_SIZE_LARGE}
+ PERF_SIZE_ZERO = $00000200; // for Zero Length Fields
+ {$EXTERNALSYM PERF_SIZE_ZERO}
+ PERF_SIZE_VARIABLE_LEN = $00000300; // length is in CounterLength Fields
+ // of Counter Definition struct
+ {$EXTERNALSYM PERF_SIZE_VARIABLE_LEN}
+
+//
+// select one of the following values to indicate the counter field usage
+//
+
+ PERF_TYPE_NUMBER = $00000000; // a number (not a counter)
+ {$EXTERNALSYM PERF_TYPE_NUMBER}
+ PERF_TYPE_COUNTER = $00000400; // an increasing numeric Value
+ {$EXTERNALSYM PERF_TYPE_COUNTER}
+ PERF_TYPE_TEXT = $00000800; // a text Fields
+ {$EXTERNALSYM PERF_TYPE_TEXT}
+ PERF_TYPE_ZERO = $00000C00; // displays a zero
+ {$EXTERNALSYM PERF_TYPE_ZERO}
+
+//
+// If the PERF_TYPE_NUMBER field was selected, then select one of the
+// following to describe the Number
+//
+
+ PERF_NUMBER_HEX = $00000000; // display as HEX Value
+ {$EXTERNALSYM PERF_NUMBER_HEX}
+ PERF_NUMBER_DECIMAL = $00010000; // display as a decimal integer
+ {$EXTERNALSYM PERF_NUMBER_DECIMAL}
+ PERF_NUMBER_DEC_1000 = $00020000; // display as a decimal/1000
+ {$EXTERNALSYM PERF_NUMBER_DEC_1000}
+
+//
+// If the PERF_TYPE_COUNTER value was selected then select one of the
+// following to indicate the type of counter
+//
+
+ PERF_COUNTER_VALUE = $00000000; // display counter Value
+ {$EXTERNALSYM PERF_COUNTER_VALUE}
+ PERF_COUNTER_RATE = $00010000; // divide ctr / delta time
+ {$EXTERNALSYM PERF_COUNTER_RATE}
+ PERF_COUNTER_FRACTION = $00020000; // divide ctr / base
+ {$EXTERNALSYM PERF_COUNTER_FRACTION}
+ PERF_COUNTER_BASE = $00030000; // base value used in fractions
+ {$EXTERNALSYM PERF_COUNTER_BASE}
+ PERF_COUNTER_ELAPSED = $00040000; // subtract counter from current time
+ {$EXTERNALSYM PERF_COUNTER_ELAPSED}
+ PERF_COUNTER_QUEUELEN = $00050000; // Use Queuelen processing func.
+ {$EXTERNALSYM PERF_COUNTER_QUEUELEN}
+ PERF_COUNTER_HISTOGRAM = $00060000; // Counter begins or ends a histogram
+ {$EXTERNALSYM PERF_COUNTER_HISTOGRAM}
+ PERF_COUNTER_PRECISION = $00070000; // divide ctr / private clock
+ {$EXTERNALSYM PERF_COUNTER_PRECISION}
+
+//
+// If the PERF_TYPE_TEXT value was selected, then select one of the
+// following to indicate the type of TEXT data.
+//
+
+ PERF_TEXT_UNICODE = $00000000; // type of text in text Fields
+ {$EXTERNALSYM PERF_TEXT_UNICODE}
+ PERF_TEXT_ASCII = $00010000; // ASCII using the CodePage Fields
+ {$EXTERNALSYM PERF_TEXT_ASCII}
+
+//
+// Timer SubTypes
+//
+
+ PERF_TIMER_TICK = $00000000; // use system perf. freq for base
+ {$EXTERNALSYM PERF_TIMER_TICK}
+ PERF_TIMER_100NS = $00100000; // use 100 NS timer time base units
+ {$EXTERNALSYM PERF_TIMER_100NS}
+ PERF_OBJECT_TIMER = $00200000; // use the object timer freq
+ {$EXTERNALSYM PERF_OBJECT_TIMER}
+
+//
+// Any types that have calculations performed can use one or more of
+// the following calculation modification flags listed here
+//
+
+ PERF_DELTA_COUNTER = $00400000; // compute difference First
+ {$EXTERNALSYM PERF_DELTA_COUNTER}
+ PERF_DELTA_BASE = $00800000; // compute base diff as well
+ {$EXTERNALSYM PERF_DELTA_BASE}
+ PERF_INVERSE_COUNTER = $01000000; // show as 1.00-value (assumes:
+ {$EXTERNALSYM PERF_INVERSE_COUNTER}
+ PERF_MULTI_COUNTER = $02000000; // sum of multiple instances
+ {$EXTERNALSYM PERF_MULTI_COUNTER}
+
+//
+// Select one of the following values to indicate the display suffix (if any)
+//
+
+ PERF_DISPLAY_NO_SUFFIX = $00000000; // no suffix
+ {$EXTERNALSYM PERF_DISPLAY_NO_SUFFIX}
+ PERF_DISPLAY_PER_SEC = $10000000; // "/sec"
+ {$EXTERNALSYM PERF_DISPLAY_PER_SEC}
+ PERF_DISPLAY_PERCENT = $20000000; // "%"
+ {$EXTERNALSYM PERF_DISPLAY_PERCENT}
+ PERF_DISPLAY_SECONDS = $30000000; // "secs"
+ {$EXTERNALSYM PERF_DISPLAY_SECONDS}
+ PERF_DISPLAY_NOSHOW = $40000000; // value is not displayed
+ {$EXTERNALSYM PERF_DISPLAY_NOSHOW}
+
+//
+// Predefined counter types
+//
+
+// 32-bit Counter. Divide delta by delta time. Display suffix: "/sec"
+
+ PERF_COUNTER_COUNTER =
+ PERF_SIZE_DWORD or PERF_TYPE_COUNTER or PERF_COUNTER_RATE or
+ PERF_TIMER_TICK or PERF_DELTA_COUNTER or PERF_DISPLAY_PER_SEC;
+ {$EXTERNALSYM PERF_COUNTER_COUNTER}
+
+// 64-bit Timer. Divide delta by delta time. Display suffix: "%"
+
+ PERF_COUNTER_TIMER =
+ PERF_SIZE_LARGE or PERF_TYPE_COUNTER or PERF_COUNTER_RATE or
+ PERF_TIMER_TICK or PERF_DELTA_COUNTER or PERF_DISPLAY_PERCENT;
+ {$EXTERNALSYM PERF_COUNTER_TIMER}
+
+// Queue Length Space-Time Product. Divide delta by delta time. No Display Suffix.
+
+ PERF_COUNTER_QUEUELEN_TYPE =
+ PERF_SIZE_DWORD or PERF_TYPE_COUNTER or PERF_COUNTER_QUEUELEN or
+ PERF_TIMER_TICK or PERF_DELTA_COUNTER or PERF_DISPLAY_NO_SUFFIX;
+ {$EXTERNALSYM PERF_COUNTER_QUEUELEN_TYPE}
+
+// Queue Length Space-Time Product. Divide delta by delta time. No Display Suffix.
+
+ PERF_COUNTER_LARGE_QUEUELEN_TYPE =
+ PERF_SIZE_LARGE or PERF_TYPE_COUNTER or PERF_COUNTER_QUEUELEN or
+ PERF_TIMER_TICK or PERF_DELTA_COUNTER or PERF_DISPLAY_NO_SUFFIX;
+ {$EXTERNALSYM PERF_COUNTER_LARGE_QUEUELEN_TYPE}
+
+// Queue Length Space-Time Product using 100 Ns timebase.
+// Divide delta by delta time. No Display Suffix.
+
+ PERF_COUNTER_100NS_QUEUELEN_TYPE =
+ PERF_SIZE_LARGE or PERF_TYPE_COUNTER or PERF_COUNTER_QUEUELEN or
+ PERF_TIMER_100NS or PERF_DELTA_COUNTER or PERF_DISPLAY_NO_SUFFIX;
+ {$EXTERNALSYM PERF_COUNTER_100NS_QUEUELEN_TYPE}
+
+// Queue Length Space-Time Product using Object specific timebase.
+// Divide delta by delta time. No Display Suffix.
+
+ PERF_COUNTER_OBJ_TIME_QUEUELEN_TYPE =
+ PERF_SIZE_LARGE or PERF_TYPE_COUNTER or PERF_COUNTER_QUEUELEN or
+ PERF_OBJECT_TIMER or PERF_DELTA_COUNTER or PERF_DISPLAY_NO_SUFFIX;
+ {$EXTERNALSYM PERF_COUNTER_OBJ_TIME_QUEUELEN_TYPE}
+
+// 64-bit Counter. Divide delta by delta time. Display Suffix: "/sec"
+
+ PERF_COUNTER_BULK_COUNT =
+ PERF_SIZE_LARGE or PERF_TYPE_COUNTER or PERF_COUNTER_RATE or
+ PERF_TIMER_TICK or PERF_DELTA_COUNTER or PERF_DISPLAY_PER_SEC;
+ {$EXTERNALSYM PERF_COUNTER_BULK_COUNT}
+
+// Indicates the counter is not a counter but rather Unicode text Display as text.
+
+ PERF_COUNTER_TEXT =
+ PERF_SIZE_VARIABLE_LEN or PERF_TYPE_TEXT or PERF_TEXT_UNICODE or
+ PERF_DISPLAY_NO_SUFFIX;
+ {$EXTERNALSYM PERF_COUNTER_TEXT}
+
+// Indicates the data is a counter which should not be
+// time averaged on display (such as an error counter on a serial line)
+// Display as is. No Display Suffix.
+
+ PERF_COUNTER_RAWCOUNT =
+ PERF_SIZE_DWORD or PERF_TYPE_NUMBER or PERF_NUMBER_DECIMAL or
+ PERF_DISPLAY_NO_SUFFIX;
+ {$EXTERNALSYM PERF_COUNTER_RAWCOUNT}
+
+// Same as PERF_COUNTER_RAWCOUNT except its size is a large integer
+
+ PERF_COUNTER_LARGE_RAWCOUNT =
+ PERF_SIZE_LARGE or PERF_TYPE_NUMBER or PERF_NUMBER_DECIMAL or
+ PERF_DISPLAY_NO_SUFFIX;
+ {$EXTERNALSYM PERF_COUNTER_LARGE_RAWCOUNT}
+
+// Special case for RAWCOUNT that want to be displayed in hex
+// Indicates the data is a counter which should not be
+// time averaged on display (such as an error counter on a serial line)
+// Display as is. No Display Suffix.
+
+ PERF_COUNTER_RAWCOUNT_HEX =
+ PERF_SIZE_DWORD or PERF_TYPE_NUMBER or PERF_NUMBER_HEX or
+ PERF_DISPLAY_NO_SUFFIX;
+ {$EXTERNALSYM PERF_COUNTER_RAWCOUNT_HEX}
+
+// Same as PERF_COUNTER_RAWCOUNT_HEX except its size is a large integer
+
+ PERF_COUNTER_LARGE_RAWCOUNT_HEX =
+ PERF_SIZE_LARGE or PERF_TYPE_NUMBER or PERF_NUMBER_HEX or
+ PERF_DISPLAY_NO_SUFFIX;
+ {$EXTERNALSYM PERF_COUNTER_LARGE_RAWCOUNT_HEX}
+
+// A count which is either 1 or 0 on each sampling interrupt (% busy)
+// Divide delta by delta base. Display Suffix: "%"
+
+ PERF_SAMPLE_FRACTION =
+ PERF_SIZE_DWORD or PERF_TYPE_COUNTER or PERF_COUNTER_FRACTION or
+ PERF_DELTA_COUNTER or PERF_DELTA_BASE or PERF_DISPLAY_PERCENT;
+ {$EXTERNALSYM PERF_SAMPLE_FRACTION}
+
+// A count which is sampled on each sampling interrupt (queue length)
+// Divide delta by delta time. No Display Suffix.
+
+ PERF_SAMPLE_COUNTER =
+ PERF_SIZE_DWORD or PERF_TYPE_COUNTER or PERF_COUNTER_RATE or
+ PERF_TIMER_TICK or PERF_DELTA_COUNTER or PERF_DISPLAY_NO_SUFFIX;
+ {$EXTERNALSYM PERF_SAMPLE_COUNTER}
+
+// A label: no data is associated with this counter (it has 0 length)
+// Do not display.
+
+ PERF_COUNTER_NODATA =
+ PERF_SIZE_ZERO or PERF_DISPLAY_NOSHOW;
+ {$EXTERNALSYM PERF_COUNTER_NODATA}
+
+// 64-bit Timer inverse (e.g., idle is measured, but display busy %)
+// Display 100 - delta divided by delta time. Display suffix: "%"
+
+ PERF_COUNTER_TIMER_INV =
+ PERF_SIZE_LARGE or PERF_TYPE_COUNTER or PERF_COUNTER_RATE or
+ PERF_TIMER_TICK or PERF_DELTA_COUNTER or PERF_INVERSE_COUNTER or
+ PERF_DISPLAY_PERCENT;
+ {$EXTERNALSYM PERF_COUNTER_TIMER_INV}
+
+// The divisor for a sample, used with the previous counter to form a
+// sampled %. You must check for >0 before dividing by this! This
+// counter will directly follow the numerator counter. It should not
+// be displayed to the user.
+
+ PERF_SAMPLE_BASE =
+ PERF_SIZE_DWORD or PERF_TYPE_COUNTER or PERF_COUNTER_BASE or
+ PERF_DISPLAY_NOSHOW or
+ $00000001; // for compatibility with pre-beta versions
+ {$EXTERNALSYM PERF_SAMPLE_BASE}
+
+// A timer which, when divided by an average base, produces a time
+// in seconds which is the average time of some operation. This
+// timer times total operations, and the base is the number of opera-
+// tions. Display Suffix: "sec"
+
+ PERF_AVERAGE_TIMER =
+ PERF_SIZE_DWORD or PERF_TYPE_COUNTER or PERF_COUNTER_FRACTION or
+ PERF_DISPLAY_SECONDS;
+ {$EXTERNALSYM PERF_AVERAGE_TIMER}
+
+// Used as the denominator in the computation of time or count
+// averages. Must directly follow the numerator counter. Not dis-
+// played to the user.
+
+ PERF_AVERAGE_BASE =
+ PERF_SIZE_DWORD or PERF_TYPE_COUNTER or PERF_COUNTER_BASE or
+ PERF_DISPLAY_NOSHOW or
+ $00000002; // for compatibility with pre-beta versions
+ {$EXTERNALSYM PERF_AVERAGE_BASE}
+
+// A bulk count which, when divided (typically) by the number of
+// operations, gives (typically) the number of bytes per operation.
+// No Display Suffix.
+
+ PERF_AVERAGE_BULK =
+ PERF_SIZE_LARGE or PERF_TYPE_COUNTER or PERF_COUNTER_FRACTION or
+ PERF_DISPLAY_NOSHOW;
+ {$EXTERNALSYM PERF_AVERAGE_BULK}
+
+// 64-bit Timer in object specific units. Display delta divided by
+// delta time as returned in the object type header structure. Display suffix: "%"
+
+ PERF_OBJ_TIME_TIMER =
+ PERF_SIZE_LARGE or PERF_TYPE_COUNTER or PERF_COUNTER_RATE or
+ PERF_OBJECT_TIMER or PERF_DELTA_COUNTER or PERF_DISPLAY_PERCENT;
+ {$EXTERNALSYM PERF_OBJ_TIME_TIMER}
+
+// 64-bit Timer in 100 nsec units. Display delta divided by
+// delta time. Display suffix: "%"
+
+ PERF_100NSEC_TIMER =
+ PERF_SIZE_LARGE or PERF_TYPE_COUNTER or PERF_COUNTER_RATE or
+ PERF_TIMER_100NS or PERF_DELTA_COUNTER or PERF_DISPLAY_PERCENT;
+ {$EXTERNALSYM PERF_100NSEC_TIMER}
+
+// 64-bit Timer inverse (e.g., idle is measured, but display busy %)
+// Display 100 - delta divided by delta time. Display suffix: "%"
+
+ PERF_100NSEC_TIMER_INV =
+ PERF_SIZE_LARGE or PERF_TYPE_COUNTER or PERF_COUNTER_RATE or
+ PERF_TIMER_100NS or PERF_DELTA_COUNTER or PERF_INVERSE_COUNTER or
+ PERF_DISPLAY_PERCENT;
+ {$EXTERNALSYM PERF_100NSEC_TIMER_INV}
+
+// 64-bit Timer. Divide delta by delta time. Display suffix: "%"
+// Timer for multiple instances, so result can exceed 100%.
+
+ PERF_COUNTER_MULTI_TIMER =
+ PERF_SIZE_LARGE or PERF_TYPE_COUNTER or PERF_COUNTER_RATE or
+ PERF_DELTA_COUNTER or PERF_TIMER_TICK or PERF_MULTI_COUNTER or
+ PERF_DISPLAY_PERCENT;
+ {$EXTERNALSYM PERF_COUNTER_MULTI_TIMER}
+
+// 64-bit Timer inverse (e.g., idle is measured, but display busy %)
+// Display 100 * _MULTI_BASE - delta divided by delta time.
+// Display suffix: "%" Timer for multiple instances, so result
+// can exceed 100%. Followed by a counter of type _MULTI_BASE.
+
+ PERF_COUNTER_MULTI_TIMER_INV =
+ PERF_SIZE_LARGE or PERF_TYPE_COUNTER or PERF_COUNTER_RATE or
+ PERF_DELTA_COUNTER or PERF_MULTI_COUNTER or PERF_TIMER_TICK or
+ PERF_INVERSE_COUNTER or PERF_DISPLAY_PERCENT;
+ {$EXTERNALSYM PERF_COUNTER_MULTI_TIMER_INV}
+
+// Number of instances to which the preceding _MULTI_..._INV counter
+// applies. Used as a factor to get the percentage.
+
+ PERF_COUNTER_MULTI_BASE =
+ PERF_SIZE_LARGE or PERF_TYPE_COUNTER or PERF_COUNTER_BASE or
+ PERF_MULTI_COUNTER or PERF_DISPLAY_NOSHOW;
+ {$EXTERNALSYM PERF_COUNTER_MULTI_BASE}
+
+// 64-bit Timer in 100 nsec units. Display delta divided by delta time.
+// Display suffix: "%" Timer for multiple instances, so result can exceed 100%.
+
+ PERF_100NSEC_MULTI_TIMER =
+ PERF_SIZE_LARGE or PERF_TYPE_COUNTER or PERF_DELTA_COUNTER or
+ PERF_COUNTER_RATE or PERF_TIMER_100NS or PERF_MULTI_COUNTER or
+ PERF_DISPLAY_PERCENT;
+ {$EXTERNALSYM PERF_100NSEC_MULTI_TIMER}
+
+// 64-bit Timer inverse (e.g., idle is measured, but display busy %)
+// Display 100 * _MULTI_BASE - delta divided by delta time.
+// Display suffix: "%" Timer for multiple instances, so result
+// can exceed 100%. Followed by a counter of type _MULTI_BASE.
+
+ PERF_100NSEC_MULTI_TIMER_INV =
+ PERF_SIZE_LARGE or PERF_TYPE_COUNTER or PERF_DELTA_COUNTER or
+ PERF_COUNTER_RATE or PERF_TIMER_100NS or PERF_MULTI_COUNTER or
+ PERF_INVERSE_COUNTER or PERF_DISPLAY_PERCENT;
+ {$EXTERNALSYM PERF_100NSEC_MULTI_TIMER_INV}
+
+// Indicates the data is a fraction of the following counter which
+// should not be time averaged on display (such as free space over
+// total space.) Display as is. Display the quotient as "%".
+
+ PERF_RAW_FRACTION =
+ PERF_SIZE_DWORD or PERF_TYPE_COUNTER or PERF_COUNTER_FRACTION or
+ PERF_DISPLAY_PERCENT;
+ {$EXTERNALSYM PERF_RAW_FRACTION}
+
+ PERF_LARGE_RAW_FRACTION =
+ PERF_SIZE_LARGE or PERF_TYPE_COUNTER or PERF_COUNTER_FRACTION or
+ PERF_DISPLAY_PERCENT;
+ {$EXTERNALSYM PERF_LARGE_RAW_FRACTION}
+
+// Indicates the data is a base for the preceding counter which should
+// not be time averaged on display (such as free space over total space.)
+
+ PERF_RAW_BASE =
+ PERF_SIZE_DWORD or PERF_TYPE_COUNTER or PERF_COUNTER_BASE or
+ PERF_DISPLAY_NOSHOW or
+ $00000003; // for compatibility with pre-beta versions
+ {$EXTERNALSYM PERF_RAW_BASE}
+
+ PERF_LARGE_RAW_BASE =
+ PERF_SIZE_LARGE or PERF_TYPE_COUNTER or PERF_COUNTER_BASE or
+ PERF_DISPLAY_NOSHOW;
+ {$EXTERNALSYM PERF_LARGE_RAW_BASE}
+
+// The data collected in this counter is actually the start time of the
+// item being measured. For display, this data is subtracted from the
+// sample time to yield the elapsed time as the difference between the two.
+// In the definition below, the PerfTime field of the Object contains
+// the sample time as indicated by the PERF_OBJECT_TIMER bit and the
+// difference is scaled by the PerfFreq of the Object to convert the time
+// units into seconds.
+
+ PERF_ELAPSED_TIME =
+ PERF_SIZE_LARGE or PERF_TYPE_COUNTER or PERF_COUNTER_ELAPSED or
+ PERF_OBJECT_TIMER or PERF_DISPLAY_SECONDS;
+ {$EXTERNALSYM PERF_ELAPSED_TIME}
+
+//
+// The following counter type can be used with the preceding types to
+// define a range of values to be displayed in a histogram.
+//
+
+ PERF_COUNTER_HISTOGRAM_TYPE = $80000000; // Counter begins or ends a histogram
+ {$EXTERNALSYM PERF_COUNTER_HISTOGRAM_TYPE}
+
+//
+// This counter is used to display the difference from one sample
+// to the next. The counter value is a constantly increasing number
+// and the value displayed is the difference between the current
+// value and the previous value. Negative numbers are not allowed
+// which shouldn't be a problem as long as the counter value is
+// increasing or unchanged.
+//
+
+ PERF_COUNTER_DELTA =
+ PERF_SIZE_DWORD or PERF_TYPE_COUNTER or PERF_COUNTER_VALUE or
+ PERF_DELTA_COUNTER or PERF_DISPLAY_NO_SUFFIX;
+ {$EXTERNALSYM PERF_COUNTER_DELTA}
+
+ PERF_COUNTER_LARGE_DELTA =
+ PERF_SIZE_LARGE or PERF_TYPE_COUNTER or PERF_COUNTER_VALUE or
+ PERF_DELTA_COUNTER or PERF_DISPLAY_NO_SUFFIX;
+ {$EXTERNALSYM PERF_COUNTER_LARGE_DELTA}
+
+//
+// The precision counters are timers that consist of two counter values:
+// 1) the count of elapsed time of the event being monitored
+// 2) the "clock" time in the same units
+//
+// the precition timers are used where the standard system timers are not
+// precise enough for accurate readings. It's assumed that the service
+// providing the data is also providing a timestamp at the same time which
+// will eliminate any error that may occur since some small and variable
+// time elapses between the time the system timestamp is captured and when
+// the data is collected from the performance DLL. Only in extreme cases
+// has this been observed to be problematic.
+//
+// when using this type of timer, the definition of the
+// PERF_PRECISION_TIMESTAMP counter must immediately follow the
+// definition of the PERF_PRECISION_*_TIMER in the Object header
+//
+// The timer used has the same frequency as the System Performance Timer
+
+ PERF_PRECISION_SYSTEM_TIMER =
+ PERF_SIZE_LARGE or PERF_TYPE_COUNTER or PERF_COUNTER_PRECISION or
+ PERF_TIMER_TICK or PERF_DELTA_COUNTER or PERF_DISPLAY_PERCENT;
+ {$EXTERNALSYM PERF_PRECISION_SYSTEM_TIMER}
+
+//
+// The timer used has the same frequency as the 100 NanoSecond Timer
+
+ PERF_PRECISION_100NS_TIMER =
+ PERF_SIZE_LARGE or PERF_TYPE_COUNTER or PERF_COUNTER_PRECISION or
+ PERF_TIMER_100NS or PERF_DELTA_COUNTER or PERF_DISPLAY_PERCENT;
+ {$EXTERNALSYM PERF_PRECISION_100NS_TIMER}
+
+//
+// The timer used is of the frequency specified in the Object header's
+// PerfFreq field (PerfTime is ignored)
+
+ PERF_PRECISION_OBJECT_TIMER =
+ PERF_SIZE_LARGE or PERF_TYPE_COUNTER or PERF_COUNTER_PRECISION or
+ PERF_OBJECT_TIMER or PERF_DELTA_COUNTER or PERF_DISPLAY_PERCENT;
+ {$EXTERNALSYM PERF_PRECISION_OBJECT_TIMER}
+
+//
+// This is the timestamp to use in the computation of the timer specified
+// in the previous description block
+
+ PERF_PRECISION_TIMESTAMP = PERF_LARGE_RAW_BASE;
+ {$EXTERNALSYM PERF_PRECISION_TIMESTAMP}
+
+//
+// The following are used to determine the level of detail associated
+// with the counter. The user will be setting the level of detail
+// that should be displayed at any given time.
+//
+//
+
+ PERF_DETAIL_NOVICE = 100; // The uninformed can understand it
+ {$EXTERNALSYM PERF_DETAIL_NOVICE}
+ PERF_DETAIL_ADVANCED = 200; // For the advanced user
+ {$EXTERNALSYM PERF_DETAIL_ADVANCED}
+ PERF_DETAIL_EXPERT = 300; // For the expert user
+ {$EXTERNALSYM PERF_DETAIL_EXPERT}
+ PERF_DETAIL_WIZARD = 400; // For the system designer
+ {$EXTERNALSYM PERF_DETAIL_WIZARD}
+
+//
+//
+// There is one of the following for each of the
+// PERF_OBJECT_TYPE.NumCounters. The Unicode names in this structure MUST
+// come from a message file.
+//
+//
+
+type
+ PPERF_COUNTER_DEFINITION = ^PERF_COUNTER_DEFINITION;
+ {$EXTERNALSYM PPERF_COUNTER_DEFINITION}
+ _PERF_COUNTER_DEFINITION = record
+ ByteLength: DWORD; // Length in bytes of this structure
+ CounterNameTitleIndex: DWORD; // Index of Counter name into
+ // Title Database
+ CounterNameTitle: LPWSTR; // Initially NULL, for use by
+ // analysis program to point to
+ // retrieved title string
+ CounterHelpTitleIndex: DWORD; // Index of Counter Help into
+ // Title Database
+ CounterHelpTitle: LPWSTR; // Initially NULL, for use by
+ // analysis program to point to
+ // retrieved title string
+ DefaultScale: LONG; // Power of 10 by which to scale
+ // chart line if vertical axis is 100
+ // 0 ==> 1, 1 ==> 10, -1 ==>1/10, etc.
+ DetailLevel: DWORD; // Counter level of detail (for
+ // controlling display complexity)
+ CounterType: DWORD; // Type of counter
+ CounterSize: DWORD; // Size of counter in bytes
+ CounterOffset: DWORD; // Offset from the start of the
+ // PERF_COUNTER_BLOCK to the first
+ // byte of this counter
+ end;
+ {$EXTERNALSYM _PERF_COUNTER_DEFINITION}
+ PERF_COUNTER_DEFINITION = _PERF_COUNTER_DEFINITION;
+ {$EXTERNALSYM PERF_COUNTER_DEFINITION}
+ TPerfCounterDefinition = PERF_COUNTER_DEFINITION;
+ PPerfCounterDefinition = PPERF_COUNTER_DEFINITION;
+
+//
+//
+// If (PERF_DATA_BLOCK.NumInstances >= 0) then there will be
+// PERF_DATA_BLOCK.NumInstances of a (PERF_INSTANCE_DEFINITION
+// followed by a PERF_COUNTER_BLOCK followed by the counter data fields)
+// for each instance.
+//
+// If (PERF_DATA_BLOCK.NumInstances < 0) then the counter definition
+// strucutre above will be followed by only a PERF_COUNTER_BLOCK and the
+// counter data for that COUNTER.
+//
+
+const
+ PERF_NO_UNIQUE_ID = -1;
+ {$EXTERNALSYM PERF_NO_UNIQUE_ID}
+
+type
+ PPERF_INSTANCE_DEFINITION = ^PERF_INSTANCE_DEFINITION;
+ {$EXTERNALSYM PPERF_INSTANCE_DEFINITION}
+ _PERF_INSTANCE_DEFINITION = record
+ ByteLength: DWORD; // Length in bytes of this structure,
+ // including the subsequent name
+ ParentObjectTitleIndex: DWORD; // Title Index to name of "parent"
+ // object (e.g., if thread, then
+ // process is parent object type);
+ // if logical drive, the physical
+ // drive is parent object type
+ ParentObjectInstance: DWORD; // Index to instance of parent object
+ // type which is the parent of this
+ // instance.
+ UniqueID: LONG; // A unique ID used instead of
+ // matching the name to identify
+ // this instance, -1 = none
+ NameOffset: DWORD; // Offset from beginning of
+ // this struct to the Unicode name
+ // of this instance
+ NameLength: DWORD; // Length in bytes of name; 0 = none
+ // this length includes the characters
+ // in the string plus the size of the
+ // terminating NULL char. It does not
+ // include any additional pad bytes to
+ // correct structure alignment
+ end;
+ {$EXTERNALSYM _PERF_INSTANCE_DEFINITION}
+ PERF_INSTANCE_DEFINITION = _PERF_INSTANCE_DEFINITION;
+ {$EXTERNALSYM PERF_INSTANCE_DEFINITION}
+ TPerfInstanceDefinition = PERF_INSTANCE_DEFINITION;
+ PPerfInstanceDefinition = PPERF_INSTANCE_DEFINITION;
+
+//
+// If .ParentObjectName is 0, there
+// is no parent-child hierarchy for this object type. Otherwise,
+// the .ParentObjectInstance is an index, starting at 0, into the
+// instances reported for the parent object type. It is only
+// meaningful if .ParentObjectName is not 0. The purpose of all this
+// is to permit reporting/summation of object instances like threads
+// within processes, and logical drives within physical drives.
+//
+//
+// The PERF_INSTANCE_DEFINITION will be followed by a PERF_COUNTER_BLOCK.
+//
+
+ PPERF_COUNTER_BLOCK = ^PERF_COUNTER_BLOCK;
+ {$EXTERNALSYM PPERF_COUNTER_BLOCK}
+ _PERF_COUNTER_BLOCK = record
+ ByteLength: DWORD; // Length in bytes of this structure,
+ // including the following counters
+ end;
+ {$EXTERNALSYM _PERF_COUNTER_BLOCK}
+ PERF_COUNTER_BLOCK = _PERF_COUNTER_BLOCK;
+ {$EXTERNALSYM PERF_COUNTER_BLOCK}
+ TPerfCounterBlock = PERF_COUNTER_BLOCK;
+ PPerfCounterBlock = PPERF_COUNTER_BLOCK;
+
+//
+// The PERF_COUNTER_BLOCK is followed by PERF_OBJECT_TYPE.NumCounters
+// number of counters.
+//
+
+//
+// Support for New Extensible API starting with NT 5.0
+//
+
+const
+ PERF_QUERY_OBJECTS = DWORD($80000000);
+ {$EXTERNALSYM PERF_QUERY_OBJECTS}
+ PERF_QUERY_GLOBAL = DWORD($80000001);
+ {$EXTERNALSYM PERF_QUERY_GLOBAL}
+ PERF_QUERY_COSTLY = DWORD($80000002);
+ {$EXTERNALSYM PERF_QUERY_COSTLY}
+
+//
+// function typedefs for extensible counter function prototypes
+//
+
+type
+ PM_OPEN_PROC = function(Arg1: LPWSTR): DWORD; stdcall;
+ {$EXTERNALSYM PM_OPEN_PROC}
+ PM_COLLECT_PROC = function(Arg1: LPWSTR; Arg2: Pointer; Arg3, Arg4: LPDWORD): DWORD; stdcall;
+ {$EXTERNALSYM PM_COLLECT_PROC}
+ PM_CLOSE_PROC = function: DWORD; stdcall;
+ {$EXTERNALSYM PM_CLOSE_PROC}
+ PM_QUERY_PROC = function(Arg1: LPDWORD; Arg2: Pointer; Arg3, Arg4: LPDWORD): DWORD; stdcall;
+ {$EXTERNALSYM PM_QUERY_PROC}
+
+const
+ MAX_PERF_OBJECTS_IN_QUERY_FUNCTION = LONG(64);
+ {$EXTERNALSYM MAX_PERF_OBJECTS_IN_QUERY_FUNCTION}
+
+//
+// The following are the possible values for
+// HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Perflib\EventLogLevel
+// The default is WINPERF_LOG_NONE if the registry value is not defined.
+// This should be adopted by all perfdlls to avoid flooding the application
+// event log.
+//
+
+const
+ WINPERF_LOG_NONE = 0; // No event reported
+ {$EXTERNALSYM WINPERF_LOG_NONE}
+ WINPERF_LOG_USER = 1; // Report only errors
+ {$EXTERNALSYM WINPERF_LOG_USER}
+ WINPERF_LOG_DEBUG = 2; // Report debug errors as well
+ {$EXTERNALSYM WINPERF_LOG_DEBUG}
+ WINPERF_LOG_VERBOSE = 3; // Report everything
+ {$EXTERNALSYM WINPERF_LOG_VERBOSE}
+
+implementation
+
+end.
diff --git a/packages/extra/winunits/jwawinreg.pas b/packages/extra/winunits/jwawinreg.pas
index b6f785d460..c545c10e82 100644
--- a/packages/extra/winunits/jwawinreg.pas
+++ b/packages/extra/winunits/jwawinreg.pas
@@ -1,1738 +1,1738 @@
-{******************************************************************************}
-{ }
-{ Windows Registry API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: winreg.h, released June 2000. The original Pascal }
-{ code is: WinReg.pas, released December 2000. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwawinreg.pas,v 1.1 2005/04/04 07:56:11 marco Exp $
-
-unit JwaWinReg;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "WinReg.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaReason, JwaWinBase, JwaWinNT, JwaWinType;
-
-//
-// Requested Key access mask type.
-//
-
-type
- REGSAM = ACCESS_MASK;
- {$EXTERNALSYM REGSAM}
-
-//
-// Reserved Key Handles.
-//
-
-const
- HKEY_CLASSES_ROOT = HKEY(ULONG_PTR(LONG($80000000)));
- {$EXTERNALSYM HKEY_CLASSES_ROOT}
- HKEY_CURRENT_USER = HKEY(ULONG_PTR(LONG($80000001)));
- {$EXTERNALSYM HKEY_CURRENT_USER}
- HKEY_LOCAL_MACHINE = HKEY(ULONG_PTR(LONG($80000002)));
- {$EXTERNALSYM HKEY_LOCAL_MACHINE}
- HKEY_USERS = HKEY(ULONG_PTR(LONG($80000003)));
- {$EXTERNALSYM HKEY_USERS}
- HKEY_PERFORMANCE_DATA = HKEY(ULONG_PTR(LONG($80000004)));
- {$EXTERNALSYM HKEY_PERFORMANCE_DATA}
- HKEY_PERFORMANCE_TEXT = HKEY(ULONG_PTR(LONG($80000050)));
- {$EXTERNALSYM HKEY_PERFORMANCE_TEXT}
- HKEY_PERFORMANCE_NLSTEXT = HKEY(ULONG_PTR(LONG($80000060)));
- {$EXTERNALSYM HKEY_PERFORMANCE_NLSTEXT}
- HKEY_CURRENT_CONFIG = HKEY(ULONG_PTR(LONG($80000005)));
- {$EXTERNALSYM HKEY_CURRENT_CONFIG}
- HKEY_DYN_DATA = HKEY(ULONG_PTR(LONG($80000006)));
- {$EXTERNALSYM HKEY_DYN_DATA}
-
- PROVIDER_KEEPS_VALUE_LENGTH = $1;
- {$EXTERNALSYM PROVIDER_KEEPS_VALUE_LENGTH}
-
-type
- val_context = record
- valuelen: Integer; // the total length of this value
- value_context: LPVOID; // provider's context
- val_buff_ptr: LPVOID; // where in the ouput buffer the value is.
- end;
- {$EXTERNALSYM val_context}
- PVALCONTEXT = ^val_context;
- {$EXTERNALSYM PVALCONTEXT}
- TValContext = val_context;
-
- PVALUEA = record // Provider supplied value/context.
- pv_valuename: LPSTR; // The value name pointer
- pv_valuelen: Integer;
- pv_value_context: LPVOID;
- pv_type: DWORD;
- end;
- {$EXTERNALSYM PVALUEA}
- PPVALUEA = ^PVALUEA;
- {$EXTERNALSYM PPVALUEA}
- TPValueA = PVALUEA;
-
- PVALUEW = record // Provider supplied value/context.
- pv_valuename: LPWSTR; // The value name pointer
- pv_valuelen: Integer;
- pv_value_context: LPVOID;
- pv_type: DWORD;
- end;
- {$EXTERNALSYM PVALUEW}
- PPVALUEW = ^PVALUEW;
- {$EXTERNALSYM PPVALUEW}
- TPValueW = PVALUEW;
-
- {$IFDEF UNICODE}
- PVALUE = PVALUEW;
- {$EXTERNALSYM PVALUE}
- PPVALUE = PPVALUEW;
- {$EXTERNALSYM PPVALUE}
- TPValue = TPValueW;
- {$ELSE}
- PVALUE = PVALUEA;
- {$EXTERNALSYM PVALUE}
- PPVALUE = PPVALUEA;
- {$EXTERNALSYM PPVALUE}
- TPValue = TPValueA;
- {$ENDIF UNICODE}
-
- QUERYHANDLER = function(keycontext: LPVOID; val_list: PVALCONTEXT;
- num_vals: DWORD; outputbuffer: LPVOID; total_outlen: LPDWORD;
- input_blen: DWORD): DWORD; cdecl;
- {$EXTERNALSYM QUERYHANDLER}
- PQUERYHANDLER = ^QUERYHANDLER;
- {$EXTERNALSYM PQUERYHANDLER}
- TQueryHandler = QUERYHANDLER;
-
- provider_info = record
- pi_R0_1val: PQUERYHANDLER;
- pi_R0_allvals: PQUERYHANDLER;
- pi_R3_1val: PQUERYHANDLER;
- pi_R3_allvals: PQUERYHANDLER;
- pi_flags: DWORD; // capability flags (none defined yet).
- pi_key_context: LPVOID;
- end;
- {$EXTERNALSYM provider_info}
- REG_PROVIDER = provider_info;
- {$EXTERNALSYM REG_PROVIDER}
- PPROVIDER = ^provider_info;
- {$EXTERNALSYM PPROVIDER}
- TProviderInfo = provider_info;
- PProviderInfo = ^provider_info;
-
- value_entA = record
- ve_valuename: LPSTR;
- ve_valuelen: DWORD;
- ve_valueptr: DWORD_PTR;
- ve_type: DWORD;
- end;
- {$EXTERNALSYM value_entA}
- VALENTA = value_entA;
- {$EXTERNALSYM VALENTA}
- PVALENTA = ^VALENTA;
- {$EXTERNALSYM PVALENTA}
- TValueEntA = value_entA;
- PValueEntA = ^value_entA;
-
- value_entW = record
- ve_valuename: LPWSTR;
- ve_valuelen: DWORD;
- ve_valueptr: DWORD_PTR;
- ve_type: DWORD;
- end;
- {$EXTERNALSYM value_entW}
- VALENTW = value_entW;
- {$EXTERNALSYM VALENTW}
- PVALENTW = ^VALENTW;
- {$EXTERNALSYM PVALENTW}
- TValueEntW = value_entW;
- PValueEntW = ^value_entW;
-
- {$IFDEF UNICODE}
- VALENT = VALENTW;
- {$EXTERNALSYM VALENT}
- PVALENT = PVALENTW;
- {$EXTERNALSYM PVALENT}
- TValueEnt = TValueEntW;
- PValueEnt = PValueEntW;
- {$ELSE}
- VALENT = VALENTA;
- {$EXTERNALSYM VALENT}
- PVALENT = PVALENTA;
- {$EXTERNALSYM PVALENT}
- TValueEnt = TValueEntA;
- PValueEnt = PValueEntA;
- {$ENDIF UNICODE}
-
-//
-// Default values for parameters that do not exist in the Win 3.1
-// compatible APIs.
-//
-
-const
- WIN31_CLASS = nil;
- {$EXTERNALSYM WIN31_CLASS}
-
-//
-// API Prototypes.
-//
-
-function RegCloseKey(hKey: HKEY): LONG; stdcall;
-{$EXTERNALSYM RegCloseKey}
-
-function RegOverridePredefKey(hKey: HKEY; hNewHKey: HKEY): LONG; stdcall;
-{$EXTERNALSYM RegOverridePredefKey}
-
-function RegOpenUserClassesRoot(hToken: HANDLE; dwOptions: DWORD;
- samDesired: REGSAM; var phkResult: HKEY): LONG; stdcall;
-{$EXTERNALSYM RegOpenUserClassesRoot}
-
-function RegOpenCurrentUser(samDesired: REGSAM; var phkResult: HKEY): LONG; stdcall;
-{$EXTERNALSYM RegOpenCurrentUser}
-
-function RegDisablePredefinedCache: LONG; stdcall;
-{$EXTERNALSYM RegDisablePredefinedCache}
-
-function RegConnectRegistryA(lpMachineName: LPCSTR; hKey: HKEY;
- var phkResult: HKEY): LONG; stdcall;
-{$EXTERNALSYM RegConnectRegistryA}
-function RegConnectRegistryW(lpMachineName: LPCWSTR; hKey: HKEY;
- var phkResult: HKEY): LONG; stdcall;
-{$EXTERNALSYM RegConnectRegistryW}
-function RegConnectRegistry(lpMachineName: LPCTSTR; hKey: HKEY;
- var phkResult: HKEY): LONG; stdcall;
-{$EXTERNALSYM RegConnectRegistry}
-
-function RegCreateKeyA(hKey: HKEY; lpSubKey: LPCSTR; var phkResult: HKEY): LONG; stdcall;
-{$EXTERNALSYM RegCreateKeyA}
-function RegCreateKeyW(hKey: HKEY; lpSubKey: LPCWSTR; var phkResult: HKEY): LONG; stdcall;
-{$EXTERNALSYM RegCreateKeyW}
-function RegCreateKey(hKey: HKEY; lpSubKey: LPCTSTR; var phkResult: HKEY): LONG; stdcall;
-{$EXTERNALSYM RegCreateKey}
-
-function RegCreateKeyExA(hKey: HKEY; lpSubKey: LPCSTR; Reserved: DWORD;
- lpClass: LPSTR; dwOptions: DWORD; samDesired: REGSAM;
- lpSecurityAttributes: LPSECURITY_ATTRIBUTES; var phkResult: HKEY;
- lpdwDisposition: LPDWORD): LONG; stdcall;
-{$EXTERNALSYM RegCreateKeyExA}
-function RegCreateKeyExW(hKey: HKEY; lpSubKey: LPCWSTR; Reserved: DWORD;
- lpClass: LPWSTR; dwOptions: DWORD; samDesired: REGSAM;
- lpSecurityAttributes: LPSECURITY_ATTRIBUTES; var phkResult: HKEY;
- lpdwDisposition: LPDWORD): LONG; stdcall;
-{$EXTERNALSYM RegCreateKeyExW}
-function RegCreateKeyEx(hKey: HKEY; lpSubKey: LPCTSTR; Reserved: DWORD;
- lpClass: LPTSTR; dwOptions: DWORD; samDesired: REGSAM;
- lpSecurityAttributes: LPSECURITY_ATTRIBUTES; var phkResult: HKEY;
- lpdwDisposition: LPDWORD): LONG; stdcall;
-{$EXTERNALSYM RegCreateKeyEx}
-
-function RegDeleteKeyA(hKey: HKEY; lpSubKey: LPCSTR): LONG; stdcall;
-{$EXTERNALSYM RegDeleteKeyA}
-function RegDeleteKeyW(hKey: HKEY; lpSubKey: LPCWSTR): LONG; stdcall;
-{$EXTERNALSYM RegDeleteKeyW}
-function RegDeleteKey(hKey: HKEY; lpSubKey: LPCTSTR): LONG; stdcall;
-{$EXTERNALSYM RegDeleteKey}
-
-function RegDeleteValueA(hKey: HKEY; lpValueName: LPCSTR): LONG; stdcall;
-{$EXTERNALSYM RegDeleteValueA}
-function RegDeleteValueW(hKey: HKEY; lpValueName: LPCWSTR): LONG; stdcall;
-{$EXTERNALSYM RegDeleteValueW}
-function RegDeleteValue(hKey: HKEY; lpValueName: LPCTSTR): LONG; stdcall;
-{$EXTERNALSYM RegDeleteValue}
-
-function RegEnumKeyA(hKey: HKEY; dwIndex: DWORD; lpName: LPSTR; cbName: DWORD): LONG; stdcall;
-{$EXTERNALSYM RegEnumKeyA}
-function RegEnumKeyW(hKey: HKEY; dwIndex: DWORD; lpName: LPWSTR; cbName: DWORD): LONG; stdcall;
-{$EXTERNALSYM RegEnumKeyW}
-function RegEnumKey(hKey: HKEY; dwIndex: DWORD; lpName: LPTSTR; cbName: DWORD): LONG; stdcall;
-{$EXTERNALSYM RegEnumKey}
-
-function RegEnumKeyExA(hKey: HKEY; dwIndex: DWORD; lpName: LPSTR;
- var lpcbName: DWORD; lpReserved: LPDWORD; lpClass: LPSTR; lpcbClass: LPDWORD;
- lpftLastWriteTime: PFILETIME): LONG; stdcall;
-{$EXTERNALSYM RegEnumKeyExA}
-function RegEnumKeyExW(hKey: HKEY; dwIndex: DWORD; lpName: LPWSTR;
- var lpcbName: DWORD; lpReserved: LPDWORD; lpClass: LPWSTR; lpcbClass: LPDWORD;
- lpftLastWriteTime: PFILETIME): LONG; stdcall;
-{$EXTERNALSYM RegEnumKeyExW}
-function RegEnumKeyEx(hKey: HKEY; dwIndex: DWORD; lpName: LPTSTR;
- var lpcbName: LPDWORD; lpReserved: LPDWORD; lpClass: LPTSTR; lpcbClass: LPDWORD;
- lpftLastWriteTime: PFILETIME): LONG; stdcall;
-{$EXTERNALSYM RegEnumKeyEx}
-
-function RegEnumValueA(hKey: HKEY; dwIndex: DWORD; lpValueName: LPSTR;
- var lpcbValueName: DWORD; lpReserved, lpType: LPDWORD; lpData: LPBYTE;
- lpcbData: LPDWORD): LONG; stdcall;
-{$EXTERNALSYM RegEnumValueA}
-function RegEnumValueW(hKey: HKEY; dwIndex: DWORD; lpValueName: LPWSTR;
- var lpcbValueName: DWORD; lpReserved, lpType: LPDWORD; lpData: LPBYTE;
- lpcbData: LPDWORD): LONG; stdcall;
-{$EXTERNALSYM RegEnumValueW}
-function RegEnumValue(hKey: HKEY; dwIndex: DWORD; lpValueName: LPTSTR;
- var lpcbValueName: DWORD; lpReserved, lpType: LPDWORD; lpData: LPBYTE;
- lpcbData: LPDWORD): LONG; stdcall;
-{$EXTERNALSYM RegEnumValue}
-
-function RegFlushKey(hKey: HKEY): LONG; stdcall;
-{$EXTERNALSYM RegFlushKey}
-
-function RegGetKeySecurity(hKey: HKEY; SecurityInformation: SECURITY_INFORMATION;
- pSecurityDescriptor: PSECURITY_DESCRIPTOR; var lpcbSecurityDescriptor: DWORD): LONG; stdcall;
-{$EXTERNALSYM RegGetKeySecurity}
-
-function RegLoadKeyA(hKey: HKEY; lpSubKey: LPCSTR; lpFile: LPCSTR): LONG; stdcall;
-{$EXTERNALSYM RegLoadKeyA}
-function RegLoadKeyW(hKey: HKEY; lpSubKey: LPCWSTR; lpFile: LPCWSTR): LONG; stdcall;
-{$EXTERNALSYM RegLoadKeyW}
-function RegLoadKey(hKey: HKEY; lpSubKey: LPCTSTR; lpFile: LPCTSTR): LONG; stdcall;
-{$EXTERNALSYM RegLoadKey}
-
-function RegNotifyChangeKeyValue(hKey: HKEY; bWatchSubtree: BOOL;
- dwNotifyFilter: DWORD; hEvent: HANDLE; fAsynchronus: BOOL): LONG;
-{$EXTERNALSYM RegNotifyChangeKeyValue}
-
-function RegOpenKeyA(hKey: HKEY; lpSubKey: LPCSTR; var phkResult: HKEY): LONG; stdcall;
-{$EXTERNALSYM RegOpenKeyA}
-function RegOpenKeyW(hKey: HKEY; lpSubKey: LPCWSTR; var phkResult: HKEY): LONG; stdcall;
-{$EXTERNALSYM RegOpenKeyW}
-function RegOpenKey(hKey: HKEY; lpSubKey: LPCTSTR; var phkResult: HKEY): LONG; stdcall;
-{$EXTERNALSYM RegOpenKey}
-
-function RegOpenKeyExA(hKey: HKEY; lpSubKey: LPCSTR; ulOptions: DWORD;
- samDesired: REGSAM; var phkResult: HKEY): LONG; stdcall;
-{$EXTERNALSYM RegOpenKeyExA}
-function RegOpenKeyExW(hKey: HKEY; lpSubKey: LPCWSTR; ulOptions: DWORD;
- samDesired: REGSAM; var phkResult: HKEY): LONG; stdcall;
-{$EXTERNALSYM RegOpenKeyExW}
-function RegOpenKeyEx(hKey: HKEY; lpSubKey: LPCTSTR; ulOptions: DWORD;
- samDesired: REGSAM; var phkResult: HKEY): LONG; stdcall;
-{$EXTERNALSYM RegOpenKeyEx}
-
-function RegQueryInfoKeyA(hKey: HKEY; lpClass: LPSTR; lpcbClass, lpReserved,
- lpcSubKeys, lpcbMaxSubKeyLen, lpcbMaxClassLen, lpcValues, lpcbMaxValueNameLen,
- lpcbMaxValueLen, lpcbSecurityDescriptor: LPDWORD; lpftLastWriteTime: PFILETIME): LONG; stdcall;
-{$EXTERNALSYM RegQueryInfoKeyA}
-function RegQueryInfoKeyW(hKey: HKEY; lpClass: LPWSTR; lpcbClass, lpReserved,
- lpcSubKeys, lpcbMaxSubKeyLen, lpcbMaxClassLen, lpcValues, lpcbMaxValueNameLen,
- lpcbMaxValueLen, lpcbSecurityDescriptor: LPDWORD; lpftLastWriteTime: PFILETIME): LONG; stdcall;
-{$EXTERNALSYM RegQueryInfoKeyW}
-function RegQueryInfoKey(hKey: HKEY; lpClass: LPTSTR; lpcbClass, lpReserved,
- lpcSubKeys, lpcbMaxSubKeyLen, lpcbMaxClassLen, lpcValues, lpcbMaxValueNameLen,
- lpcbMaxValueLen, lpcbSecurityDescriptor: LPDWORD; lpftLastWriteTime: PFILETIME): LONG; stdcall;
-{$EXTERNALSYM RegQueryInfoKey}
-
-function RegQueryValueA(hKey: HKEY; lpSubKey: LPCSTR; lpValue: LPSTR;
- var lpcbValue: LONG): LONG; stdcall;
-{$EXTERNALSYM RegQueryValueA}
-function RegQueryValueW(hKey: HKEY; lpSubKey: LPCWSTR; lpValue: LPWSTR;
- var lpcbValue: LONG): LONG; stdcall;
-{$EXTERNALSYM RegQueryValueW}
-function RegQueryValue(hKey: HKEY; lpSubKey: LPCTSTR; lpValue: LPTSTR;
- var lpcbValue: LONG): LONG; stdcall;
-{$EXTERNALSYM RegQueryValue}
-
-function RegQueryMultipleValuesA(hKey: HKEY; val_list: PVALENTA; num_vals: DWORD;
- lpValueBuf: LPSTR; var ldwTotsize: DWORD): LONG; stdcall;
-{$EXTERNALSYM RegQueryMultipleValuesA}
-function RegQueryMultipleValuesW(hKey: HKEY; val_list: PVALENTW; num_vals: DWORD;
- lpValueBuf: LPWSTR; var ldwTotsize: DWORD): LONG; stdcall;
-{$EXTERNALSYM RegQueryMultipleValuesW}
-function RegQueryMultipleValues(hKey: HKEY; val_list: PVALENT; num_vals: DWORD;
- lpValueBuf: LPTSTR; var ldwTotsize: DWORD): LONG; stdcall;
-{$EXTERNALSYM RegQueryMultipleValues}
-
-function RegQueryValueExA(hKey: HKEY; lpValueName: LPCSTR; lpReserved: LPDWORD;
- lpType: LPDWORD; lpData: LPBYTE; lpcbData: LPDWORD): LONG; stdcall;
-{$EXTERNALSYM RegQueryValueExA}
-function RegQueryValueExW(hKey: HKEY; lpValueName: LPCWSTR; lpReserved: LPDWORD;
- lpType: LPDWORD; lpData: LPBYTE; lpcbData: LPDWORD): LONG; stdcall;
-{$EXTERNALSYM RegQueryValueExW}
-function RegQueryValueEx(hKey: HKEY; lpValueName: LPCTSTR; lpReserved: LPDWORD;
- lpType: LPDWORD; lpData: LPBYTE; lpcbData: LPDWORD): LONG; stdcall;
-{$EXTERNALSYM RegQueryValueEx}
-
-function RegReplaceKeyA(hKey: HKEY; lpSubKey: LPCSTR; lpNewFile: LPCSTR;
- lpOldFile: LPCSTR): LONG; stdcall;
-{$EXTERNALSYM RegReplaceKeyA}
-function RegReplaceKeyW(hKey: HKEY; lpSubKey: LPCWSTR; lpNewFile: LPCWSTR;
- lpOldFile: LPCWSTR): LONG; stdcall;
-{$EXTERNALSYM RegReplaceKeyW}
-function RegReplaceKey(hKey: HKEY; lpSubKey: LPCTSTR; lpNewFile: LPCTSTR;
- lpOldFile: LPCTSTR): LONG; stdcall;
-{$EXTERNALSYM RegReplaceKey}
-
-function RegRestoreKeyA(hKey: HKEY; lpFile: LPCSTR; dwFlags: DWORD): LONG; stdcall;
-{$EXTERNALSYM RegRestoreKeyA}
-function RegRestoreKeyW(hKey: HKEY; lpFile: LPCWSTR; dwFlags: DWORD): LONG; stdcall;
-{$EXTERNALSYM RegRestoreKeyW}
-function RegRestoreKey(hKey: HKEY; lpFile: LPCTSTR; dwFlags: DWORD): LONG; stdcall;
-{$EXTERNALSYM RegRestoreKey}
-
-function RegSaveKeyA(hKey: HKEY; lpFile: LPCSTR;
- lpSecurityAttributes: LPSECURITY_ATTRIBUTES): LONG; stdcall;
-{$EXTERNALSYM RegSaveKeyA}
-function RegSaveKeyW(hKey: HKEY; lpFile: LPCWSTR;
- lpSecurityAttributes: LPSECURITY_ATTRIBUTES): LONG; stdcall;
-{$EXTERNALSYM RegSaveKeyW}
-function RegSaveKey(hKey: HKEY; lpFile: LPCTSTR;
- lpSecurityAttributes: LPSECURITY_ATTRIBUTES): LONG; stdcall;
-{$EXTERNALSYM RegSaveKey}
-
-function RegSetKeySecurity(hKey: HKEY; SecurityInformation: SECURITY_INFORMATION;
- pSecurityDescriptor: PSECURITY_DESCRIPTOR): LONG; stdcall;
-{$EXTERNALSYM RegSetKeySecurity}
-
-function RegSetValueA(hKey: HKEY; lpSubKey: LPCSTR; dwType: DWORD;
- lpData: LPCSTR; cbData: DWORD): LONG; stdcall;
-{$EXTERNALSYM RegSetValueA}
-function RegSetValueW(hKey: HKEY; lpSubKey: LPCWSTR; dwType: DWORD;
- lpData: LPCWSTR; cbData: DWORD): LONG; stdcall;
-{$EXTERNALSYM RegSetValueW}
-function RegSetValue(hKey: HKEY; lpSubKey: LPCTSTR; dwType: DWORD;
- lpData: LPCTSTR; cbData: DWORD): LONG; stdcall;
-{$EXTERNALSYM RegSetValue}
-
-function RegSetValueExA(hKey: HKEY; lpValueName: LPCSTR; Reserved: DWORD;
- dwType: DWORD; lpData: LPBYTE; cbData: DWORD): LONG; stdcall;
-{$EXTERNALSYM RegSetValueExA}
-function RegSetValueExW(hKey: HKEY; lpValueName: LPCWSTR; Reserved: DWORD;
- dwType: DWORD; lpData: LPBYTE; cbData: DWORD): LONG; stdcall;
-{$EXTERNALSYM RegSetValueExW}
-function RegSetValueEx(hKey: HKEY; lpValueName: LPCTSTR; Reserved: DWORD;
- dwType: DWORD; lpData: LPBYTE; cbData: DWORD): LONG; stdcall;
-{$EXTERNALSYM RegSetValueEx}
-
-function RegUnLoadKeyA(hKey: HKEY; lpSubKey: LPCSTR): LONG; stdcall;
-{$EXTERNALSYM RegUnLoadKeyA}
-function RegUnLoadKeyW(hKey: HKEY; lpSubKey: LPCWSTR): LONG; stdcall;
-{$EXTERNALSYM RegUnLoadKeyW}
-function RegUnLoadKey(hKey: HKEY; lpSubKey: LPCTSTR): LONG; stdcall;
-{$EXTERNALSYM RegUnLoadKey}
-
-//
-// Remoteable System Shutdown APIs
-//
-
-function InitiateSystemShutdownA(lpMachineName: LPSTR; lpMessage: LPSTR;
- dwTimeout: DWORD; bForceAppsClosed, bRebootAfterShutdown: BOOL): BOOL; stdcall;
-{$EXTERNALSYM InitiateSystemShutdownA}
-function InitiateSystemShutdownW(lpMachineName: LPWSTR; lpMessage: LPWSTR;
- dwTimeout: DWORD; bForceAppsClosed, bRebootAfterShutdown: BOOL): BOOL; stdcall;
-{$EXTERNALSYM InitiateSystemShutdownW}
-function InitiateSystemShutdown(lpMachineName: LPTSTR; lpMessage: LPTSTR;
- dwTimeout: DWORD; bForceAppsClosed, bRebootAfterShutdown: BOOL): BOOL; stdcall;
-{$EXTERNALSYM InitiateSystemShutdown}
-
-function AbortSystemShutdownA(lpMachineName: LPSTR): BOOL; stdcall;
-{$EXTERNALSYM AbortSystemShutdownA}
-function AbortSystemShutdownW(lpMachineName: LPWSTR): BOOL; stdcall;
-{$EXTERNALSYM AbortSystemShutdownW}
-function AbortSystemShutdown(lpMachineName: LPTSTR): BOOL; stdcall;
-{$EXTERNALSYM AbortSystemShutdown}
-
-//
-// defines for InitiateSystemShutdownEx reason codes
-//
-
-const
- REASON_SWINSTALL = SHTDN_REASON_MAJOR_SOFTWARE or SHTDN_REASON_MINOR_INSTALLATION;
- {$EXTERNALSYM REASON_SWINSTALL}
- REASON_HWINSTALL = SHTDN_REASON_MAJOR_HARDWARE or SHTDN_REASON_MINOR_INSTALLATION;
- {$EXTERNALSYM REASON_HWINSTALL}
- REASON_SERVICEHANG = SHTDN_REASON_MAJOR_SOFTWARE or SHTDN_REASON_MINOR_HUNG;
- {$EXTERNALSYM REASON_SERVICEHANG}
- REASON_UNSTABLE = SHTDN_REASON_MAJOR_SYSTEM or SHTDN_REASON_MINOR_UNSTABLE;
- {$EXTERNALSYM REASON_UNSTABLE}
- REASON_SWHWRECONF = SHTDN_REASON_MAJOR_SOFTWARE or SHTDN_REASON_MINOR_RECONFIG;
- {$EXTERNALSYM REASON_SWHWRECONF}
- REASON_OTHER = SHTDN_REASON_MAJOR_OTHER or SHTDN_REASON_MINOR_OTHER;
- {$EXTERNALSYM REASON_OTHER}
- REASON_UNKNOWN = SHTDN_REASON_UNKNOWN;
- {$EXTERNALSYM REASON_UNKNOWN}
- REASON_LEGACY_API = SHTDN_REASON_LEGACY_API;
- {$EXTERNALSYM REASON_LEGACY_API}
- REASON_PLANNED_FLAG = SHTDN_REASON_FLAG_PLANNED;
- {$EXTERNALSYM REASON_PLANNED_FLAG}
-
-//
-// MAX Shutdown TimeOut == 10 Years in seconds
-//
-
- MAX_SHUTDOWN_TIMEOUT = 10 * 365 * 24 * 60 * 60;
- {$EXTERNALSYM MAX_SHUTDOWN_TIMEOUT}
-
-function InitiateSystemShutdownExA(lpMachineName: LPSTR; lpMessage: LPSTR;
- dwTimeout: DWORD; bForceAppsClosed, bRebootAfterShutdown: BOOL; dwReason: DWORD): BOOL; stdcall;
-{$EXTERNALSYM InitiateSystemShutdownExA}
-function InitiateSystemShutdownExW(lpMachineName: LPWSTR; lpMessage: LPWSTR;
- dwTimeout: DWORD; bForceAppsClosed, bRebootAfterShutdown: BOOL; dwReason: DWORD): BOOL; stdcall;
-{$EXTERNALSYM InitiateSystemShutdownExW}
-function InitiateSystemShutdownEx(lpMachineName: LPTSTR; lpMessage: LPTSTR;
- dwTimeout: DWORD; bForceAppsClosed, bRebootAfterShutdown: BOOL; dwReason: DWORD): BOOL; stdcall;
-{$EXTERNALSYM InitiateSystemShutdownEx}
-
-function RegSaveKeyExA(hKey: HKEY; lpFile: LPCSTR;
- lpSecurityAttributes: LPSECURITY_ATTRIBUTES; Flags: DWORD): LONG; stdcall;
-{$EXTERNALSYM RegSaveKeyExA}
-function RegSaveKeyExW(hKey: HKEY; lpFile: LPCWSTR;
- lpSecurityAttributes: LPSECURITY_ATTRIBUTES; Flags: DWORD): LONG; stdcall;
-{$EXTERNALSYM RegSaveKeyExW}
-function RegSaveKeyEx(hKey: HKEY; lpFile: LPCTSTR;
- lpSecurityAttributes: LPSECURITY_ATTRIBUTES; Flags: DWORD): LONG; stdcall;
-{$EXTERNALSYM RegSaveKeyEx}
-
-function Wow64Win32ApiEntry(dwFuncNumber, dwFlag, dwRes: DWORD): LONG; stdcall;
-{$EXTERNALSYM Wow64Win32ApiEntry}
-
-implementation
-
-const
- advapi32 = 'advapi32.dll';
- {$IFDEF UNICODE}
- AWSuffix = 'W';
- {$ELSE}
- AWSuffix = 'A';
- {$ENDIF UNICODE}
-
-type
- TRegNotifyChangeKeyValue = function(hKey: HKEY; bWatchSubtree: LongBool; dwNotifyFilter: DWORD; hEvent: HANDLE; fAsynchronus: LongBool): LONG; stdcall;
-
-var
- _RegNotifyChangeKeyValue: Pointer;
-
-function RegNotifyChangeKeyValue(hKey: HKEY; bWatchSubtree: LongBool; dwNotifyFilter: DWORD; hEvent: HANDLE; fAsynchronus: LongBool): LONG;
-begin
- GetProcedureAddress(_RegNotifyChangeKeyValue, advapi32, 'RegNotifyChangeKeyValue');
- if bWatchSubTree then
- Result := TRegNotifyChangeKeyValue(_RegNotifyChangeKeyValue)(hKey, LongBool(1), dwNotifyFilter, hEvent, fAsynchronus)
- else
- Result := TRegNotifyChangeKeyValue(_RegNotifyChangeKeyValue)(hKey, LongBool(0), dwNotifyFilter, hEvent, fAsynchronus);
-end;
-
-{$IFDEF DYNAMIC_LINK}
-
-var
- _RegCloseKey: Pointer;
-
-function RegCloseKey;
-begin
- GetProcedureAddress(_RegCloseKey, advapi32, 'RegCloseKey');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RegCloseKey]
- end;
-end;
-
-var
- _RegOverridePredefKey: Pointer;
-
-function RegOverridePredefKey;
-begin
- GetProcedureAddress(_RegOverridePredefKey, advapi32, 'RegOverridePredefKey');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RegOverridePredefKey]
- end;
-end;
-
-var
- _RegOpenUserClassesRoot: Pointer;
-
-function RegOpenUserClassesRoot;
-begin
- GetProcedureAddress(_RegOpenUserClassesRoot, advapi32, 'RegOpenUserClassesRoot');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RegOpenUserClassesRoot]
- end;
-end;
-
-var
- _RegOpenCurrentUser: Pointer;
-
-function RegOpenCurrentUser;
-begin
- GetProcedureAddress(_RegOpenCurrentUser, advapi32, 'RegOpenCurrentUser');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RegOpenCurrentUser]
- end;
-end;
-
-var
- _RegDisablePredefinedCache: Pointer;
-
-function RegDisablePredefinedCache;
-begin
- GetProcedureAddress(_RegDisablePredefinedCache, advapi32, 'RegDisablePredefinedCache');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RegDisablePredefinedCache]
- end;
-end;
-
-var
- _RegConnectRegistryA: Pointer;
-
-function RegConnectRegistryA;
-begin
- GetProcedureAddress(_RegConnectRegistryA, advapi32, 'RegConnectRegistryA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RegConnectRegistryA]
- end;
-end;
-
-var
- _RegConnectRegistryW: Pointer;
-
-function RegConnectRegistryW;
-begin
- GetProcedureAddress(_RegConnectRegistryW, advapi32, 'RegConnectRegistryW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RegConnectRegistryW]
- end;
-end;
-
-var
- _RegConnectRegistry: Pointer;
-
-function RegConnectRegistry;
-begin
- GetProcedureAddress(_RegConnectRegistry, advapi32, 'RegConnectRegistry' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RegConnectRegistry]
- end;
-end;
-
-var
- _RegCreateKeyA: Pointer;
-
-function RegCreateKeyA;
-begin
- GetProcedureAddress(_RegCreateKeyA, advapi32, 'RegCreateKeyA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RegCreateKeyA]
- end;
-end;
-
-var
- _RegCreateKeyW: Pointer;
-
-function RegCreateKeyW;
-begin
- GetProcedureAddress(_RegCreateKeyW, advapi32, 'RegCreateKeyW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RegCreateKeyW]
- end;
-end;
-
-var
- _RegCreateKey: Pointer;
-
-function RegCreateKey;
-begin
- GetProcedureAddress(_RegCreateKey, advapi32, 'RegCreateKey' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RegCreateKey]
- end;
-end;
-
-var
- _RegCreateKeyExA: Pointer;
-
-function RegCreateKeyExA;
-begin
- GetProcedureAddress(_RegCreateKeyExA, advapi32, 'RegCreateKeyExA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RegCreateKeyExA]
- end;
-end;
-
-var
- _RegCreateKeyExW: Pointer;
-
-function RegCreateKeyExW;
-begin
- GetProcedureAddress(_RegCreateKeyExW, advapi32, 'RegCreateKeyExW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RegCreateKeyExW]
- end;
-end;
-
-var
- _RegCreateKeyEx: Pointer;
-
-function RegCreateKeyEx;
-begin
- GetProcedureAddress(_RegCreateKeyEx, advapi32, 'RegCreateKeyEx' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RegCreateKeyEx]
- end;
-end;
-
-var
- _RegDeleteKeyA: Pointer;
-
-function RegDeleteKeyA;
-begin
- GetProcedureAddress(_RegDeleteKeyA, advapi32, 'RegDeleteKeyA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RegDeleteKeyA]
- end;
-end;
-
-var
- _RegDeleteKeyW: Pointer;
-
-function RegDeleteKeyW;
-begin
- GetProcedureAddress(_RegDeleteKeyW, advapi32, 'RegDeleteKeyW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RegDeleteKeyW]
- end;
-end;
-
-var
- _RegDeleteKey: Pointer;
-
-function RegDeleteKey;
-begin
- GetProcedureAddress(_RegDeleteKey, advapi32, 'RegDeleteKey' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RegDeleteKey]
- end;
-end;
-
-var
- _RegDeleteValueA: Pointer;
-
-function RegDeleteValueA;
-begin
- GetProcedureAddress(_RegDeleteValueA, advapi32, 'RegDeleteValueA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RegDeleteValueA]
- end;
-end;
-
-var
- _RegDeleteValueW: Pointer;
-
-function RegDeleteValueW;
-begin
- GetProcedureAddress(_RegDeleteValueW, advapi32, 'RegDeleteValueW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RegDeleteValueW]
- end;
-end;
-
-var
- _RegDeleteValue: Pointer;
-
-function RegDeleteValue;
-begin
- GetProcedureAddress(_RegDeleteValue, advapi32, 'RegDeleteValue' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RegDeleteValue]
- end;
-end;
-
-var
- _RegEnumKeyA: Pointer;
-
-function RegEnumKeyA;
-begin
- GetProcedureAddress(_RegEnumKeyA, advapi32, 'RegEnumKeyA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RegEnumKeyA]
- end;
-end;
-
-var
- _RegEnumKeyW: Pointer;
-
-function RegEnumKeyW;
-begin
- GetProcedureAddress(_RegEnumKeyW, advapi32, 'RegEnumKeyW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RegEnumKeyW]
- end;
-end;
-
-var
- _RegEnumKey: Pointer;
-
-function RegEnumKey;
-begin
- GetProcedureAddress(_RegEnumKey, advapi32, 'RegEnumKey' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RegEnumKey]
- end;
-end;
-
-var
- _RegEnumKeyExA: Pointer;
-
-function RegEnumKeyExA;
-begin
- GetProcedureAddress(_RegEnumKeyExA, advapi32, 'RegEnumKeyExA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RegEnumKeyExA]
- end;
-end;
-
-var
- _RegEnumKeyExW: Pointer;
-
-function RegEnumKeyExW;
-begin
- GetProcedureAddress(_RegEnumKeyExW, advapi32, 'RegEnumKeyExW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RegEnumKeyExW]
- end;
-end;
-
-var
- _RegEnumKeyEx: Pointer;
-
-function RegEnumKeyEx;
-begin
- GetProcedureAddress(_RegEnumKeyEx, advapi32, 'RegEnumKeyEx' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RegEnumKeyEx]
- end;
-end;
-
-var
- _RegEnumValueA: Pointer;
-
-function RegEnumValueA;
-begin
- GetProcedureAddress(_RegEnumValueA, advapi32, 'RegEnumValueA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RegEnumValueA]
- end;
-end;
-
-var
- _RegEnumValueW: Pointer;
-
-function RegEnumValueW;
-begin
- GetProcedureAddress(_RegEnumValueW, advapi32, 'RegEnumValueW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RegEnumValueW]
- end;
-end;
-
-var
- _RegEnumValue: Pointer;
-
-function RegEnumValue;
-begin
- GetProcedureAddress(_RegEnumValue, advapi32, 'RegEnumValue' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RegEnumValue]
- end;
-end;
-
-var
- _RegFlushKey: Pointer;
-
-function RegFlushKey;
-begin
- GetProcedureAddress(_RegFlushKey, advapi32, 'RegFlushKey');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RegFlushKey]
- end;
-end;
-
-var
- _RegGetKeySecurity: Pointer;
-
-function RegGetKeySecurity;
-begin
- GetProcedureAddress(_RegGetKeySecurity, advapi32, 'RegGetKeySecurity');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RegGetKeySecurity]
- end;
-end;
-
-var
- _RegLoadKeyA: Pointer;
-
-function RegLoadKeyA;
-begin
- GetProcedureAddress(_RegLoadKeyA, advapi32, 'RegLoadKeyA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RegLoadKeyA]
- end;
-end;
-
-var
- _RegLoadKeyW: Pointer;
-
-function RegLoadKeyW;
-begin
- GetProcedureAddress(_RegLoadKeyW, advapi32, 'RegLoadKeyW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RegLoadKeyW]
- end;
-end;
-
-var
- _RegLoadKey: Pointer;
-
-function RegLoadKey;
-begin
- GetProcedureAddress(_RegLoadKey, advapi32, 'RegLoadKey' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RegLoadKey]
- end;
-end;
-
-var
- _RegOpenKeyA: Pointer;
-
-function RegOpenKeyA;
-begin
- GetProcedureAddress(_RegOpenKeyA, advapi32, 'RegOpenKeyA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RegOpenKeyA]
- end;
-end;
-
-var
- _RegOpenKeyW: Pointer;
-
-function RegOpenKeyW;
-begin
- GetProcedureAddress(_RegOpenKeyW, advapi32, 'RegOpenKeyW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RegOpenKeyW]
- end;
-end;
-
-var
- _RegOpenKey: Pointer;
-
-function RegOpenKey;
-begin
- GetProcedureAddress(_RegOpenKey, advapi32, 'RegOpenKey' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RegOpenKey]
- end;
-end;
-
-var
- _RegOpenKeyExA: Pointer;
-
-function RegOpenKeyExA;
-begin
- GetProcedureAddress(_RegOpenKeyExA, advapi32, 'RegOpenKeyExA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RegOpenKeyExA]
- end;
-end;
-
-var
- _RegOpenKeyExW: Pointer;
-
-function RegOpenKeyExW;
-begin
- GetProcedureAddress(_RegOpenKeyExW, advapi32, 'RegOpenKeyExW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RegOpenKeyExW]
- end;
-end;
-
-var
- _RegOpenKeyEx: Pointer;
-
-function RegOpenKeyEx;
-begin
- GetProcedureAddress(_RegOpenKeyEx, advapi32, 'RegOpenKeyEx' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RegOpenKeyEx]
- end;
-end;
-
-var
- _RegQueryInfoKeyA: Pointer;
-
-function RegQueryInfoKeyA;
-begin
- GetProcedureAddress(_RegQueryInfoKeyA, advapi32, 'RegQueryInfoKeyA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RegQueryInfoKeyA]
- end;
-end;
-
-var
- _RegQueryInfoKeyW: Pointer;
-
-function RegQueryInfoKeyW;
-begin
- GetProcedureAddress(_RegQueryInfoKeyW, advapi32, 'RegQueryInfoKeyW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RegQueryInfoKeyW]
- end;
-end;
-
-var
- _RegQueryInfoKey: Pointer;
-
-function RegQueryInfoKey;
-begin
- GetProcedureAddress(_RegQueryInfoKey, advapi32, 'RegQueryInfoKey' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RegQueryInfoKey]
- end;
-end;
-
-var
- _RegQueryValueA: Pointer;
-
-function RegQueryValueA;
-begin
- GetProcedureAddress(_RegQueryValueA, advapi32, 'RegQueryValueA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RegQueryValueA]
- end;
-end;
-
-var
- _RegQueryValueW: Pointer;
-
-function RegQueryValueW;
-begin
- GetProcedureAddress(_RegQueryValueW, advapi32, 'RegQueryValueW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RegQueryValueW]
- end;
-end;
-
-var
- _RegQueryValue: Pointer;
-
-function RegQueryValue;
-begin
- GetProcedureAddress(_RegQueryValue, advapi32, 'RegQueryValue' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RegQueryValue]
- end;
-end;
-
-var
- _RegQueryMultipleValuesA: Pointer;
-
-function RegQueryMultipleValuesA;
-begin
- GetProcedureAddress(_RegQueryMultipleValuesA, advapi32, 'RegQueryMultipleValuesA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RegQueryMultipleValuesA]
- end;
-end;
-
-var
- _RegQueryMultipleValuesW: Pointer;
-
-function RegQueryMultipleValuesW;
-begin
- GetProcedureAddress(_RegQueryMultipleValuesW, advapi32, 'RegQueryMultipleValuesW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RegQueryMultipleValuesW]
- end;
-end;
-
-var
- _RegQueryMultipleValues: Pointer;
-
-function RegQueryMultipleValues;
-begin
- GetProcedureAddress(_RegQueryMultipleValues, advapi32, 'RegQueryMultipleValues' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RegQueryMultipleValues]
- end;
-end;
-
-var
- _RegQueryValueExA: Pointer;
-
-function RegQueryValueExA;
-begin
- GetProcedureAddress(_RegQueryValueExA, advapi32, 'RegQueryValueExA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RegQueryValueExA]
- end;
-end;
-
-var
- _RegQueryValueExW: Pointer;
-
-function RegQueryValueExW;
-begin
- GetProcedureAddress(_RegQueryValueExW, advapi32, 'RegQueryValueExW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RegQueryValueExW]
- end;
-end;
-
-var
- _RegQueryValueEx: Pointer;
-
-function RegQueryValueEx;
-begin
- GetProcedureAddress(_RegQueryValueEx, advapi32, 'RegQueryValueEx' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RegQueryValueEx]
- end;
-end;
-
-var
- _RegReplaceKeyA: Pointer;
-
-function RegReplaceKeyA;
-begin
- GetProcedureAddress(_RegReplaceKeyA, advapi32, 'RegReplaceKeyA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RegReplaceKeyA]
- end;
-end;
-
-var
- _RegReplaceKeyW: Pointer;
-
-function RegReplaceKeyW;
-begin
- GetProcedureAddress(_RegReplaceKeyW, advapi32, 'RegReplaceKeyW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RegReplaceKeyW]
- end;
-end;
-
-var
- _RegReplaceKey: Pointer;
-
-function RegReplaceKey;
-begin
- GetProcedureAddress(_RegReplaceKey, advapi32, 'RegReplaceKey' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RegReplaceKey]
- end;
-end;
-
-var
- _RegRestoreKeyA: Pointer;
-
-function RegRestoreKeyA;
-begin
- GetProcedureAddress(_RegRestoreKeyA, advapi32, 'RegRestoreKeyA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RegRestoreKeyA]
- end;
-end;
-
-var
- _RegRestoreKeyW: Pointer;
-
-function RegRestoreKeyW;
-begin
- GetProcedureAddress(_RegRestoreKeyW, advapi32, 'RegRestoreKeyW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RegRestoreKeyW]
- end;
-end;
-
-var
- _RegRestoreKey: Pointer;
-
-function RegRestoreKey;
-begin
- GetProcedureAddress(_RegRestoreKey, advapi32, 'RegRestoreKey' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RegRestoreKey]
- end;
-end;
-
-var
- _RegSaveKeyA: Pointer;
-
-function RegSaveKeyA;
-begin
- GetProcedureAddress(_RegSaveKeyA, advapi32, 'RegSaveKeyA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RegSaveKeyA]
- end;
-end;
-
-var
- _RegSaveKeyW: Pointer;
-
-function RegSaveKeyW;
-begin
- GetProcedureAddress(_RegSaveKeyW, advapi32, 'RegSaveKeyW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RegSaveKeyW]
- end;
-end;
-
-var
- _RegSaveKey: Pointer;
-
-function RegSaveKey;
-begin
- GetProcedureAddress(_RegSaveKey, advapi32, 'RegSaveKey' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RegSaveKey]
- end;
-end;
-
-var
- _RegSetKeySecurity: Pointer;
-
-function RegSetKeySecurity;
-begin
- GetProcedureAddress(_RegSetKeySecurity, advapi32, 'RegSetKeySecurity');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RegSetKeySecurity]
- end;
-end;
-
-var
- _RegSetValueA: Pointer;
-
-function RegSetValueA;
-begin
- GetProcedureAddress(_RegSetValueA, advapi32, 'RegSetValueA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RegSetValueA]
- end;
-end;
-
-var
- _RegSetValueW: Pointer;
-
-function RegSetValueW;
-begin
- GetProcedureAddress(_RegSetValueW, advapi32, 'RegSetValueW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RegSetValueW]
- end;
-end;
-
-var
- _RegSetValue: Pointer;
-
-function RegSetValue;
-begin
- GetProcedureAddress(_RegSetValue, advapi32, 'RegSetValue' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RegSetValue]
- end;
-end;
-
-var
- _RegSetValueExA: Pointer;
-
-function RegSetValueExA;
-begin
- GetProcedureAddress(_RegSetValueExA, advapi32, 'RegSetValueExA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RegSetValueExA]
- end;
-end;
-
-var
- _RegSetValueExW: Pointer;
-
-function RegSetValueExW;
-begin
- GetProcedureAddress(_RegSetValueExW, advapi32, 'RegSetValueExW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RegSetValueExW]
- end;
-end;
-
-var
- _RegSetValueEx: Pointer;
-
-function RegSetValueEx;
-begin
- GetProcedureAddress(_RegSetValueEx, advapi32, 'RegSetValueEx' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RegSetValueEx]
- end;
-end;
-
-var
- _RegUnLoadKeyA: Pointer;
-
-function RegUnLoadKeyA;
-begin
- GetProcedureAddress(_RegUnLoadKeyA, advapi32, 'RegUnLoadKeyA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RegUnLoadKeyA]
- end;
-end;
-
-var
- _RegUnLoadKeyW: Pointer;
-
-function RegUnLoadKeyW;
-begin
- GetProcedureAddress(_RegUnLoadKeyW, advapi32, 'RegUnLoadKeyW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RegUnLoadKeyW]
- end;
-end;
-
-var
- _RegUnLoadKey: Pointer;
-
-function RegUnLoadKey;
-begin
- GetProcedureAddress(_RegUnLoadKey, advapi32, 'RegUnLoadKey' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RegUnLoadKey]
- end;
-end;
-
-var
- _InitiateSystemShutdownA: Pointer;
-
-function InitiateSystemShutdownA;
-begin
- GetProcedureAddress(_InitiateSystemShutdownA, advapi32, 'InitiateSystemShutdownA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_InitiateSystemShutdownA]
- end;
-end;
-
-var
- _InitiateSystemShutdownW: Pointer;
-
-function InitiateSystemShutdownW;
-begin
- GetProcedureAddress(_InitiateSystemShutdownW, advapi32, 'InitiateSystemShutdownW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_InitiateSystemShutdownW]
- end;
-end;
-
-var
- _InitiateSystemShutdown: Pointer;
-
-function InitiateSystemShutdown;
-begin
- GetProcedureAddress(_InitiateSystemShutdown, advapi32, 'InitiateSystemShutdown' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_InitiateSystemShutdown]
- end;
-end;
-
-var
- _AbortSystemShutdownA: Pointer;
-
-function AbortSystemShutdownA;
-begin
- GetProcedureAddress(_AbortSystemShutdownA, advapi32, 'AbortSystemShutdownA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_AbortSystemShutdownA]
- end;
-end;
-
-var
- _AbortSystemShutdownW: Pointer;
-
-function AbortSystemShutdownW;
-begin
- GetProcedureAddress(_AbortSystemShutdownW, advapi32, 'AbortSystemShutdownW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_AbortSystemShutdownW]
- end;
-end;
-
-var
- _AbortSystemShutdown: Pointer;
-
-function AbortSystemShutdown;
-begin
- GetProcedureAddress(_AbortSystemShutdown, advapi32, 'AbortSystemShutdown' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_AbortSystemShutdown]
- end;
-end;
-
-var
- _InitiateSystemShutdownExA: Pointer;
-
-function InitiateSystemShutdownExA;
-begin
- GetProcedureAddress(_InitiateSystemShutdownExA, advapi32, 'InitiateSystemShutdownExA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_InitiateSystemShutdownExA]
- end;
-end;
-
-var
- _InitiateSystemShutdownExW: Pointer;
-
-function InitiateSystemShutdownExW;
-begin
- GetProcedureAddress(_InitiateSystemShutdownExW, advapi32, 'InitiateSystemShutdownExW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_InitiateSystemShutdownExW]
- end;
-end;
-
-var
- _InitiateSystemShutdownEx: Pointer;
-
-function InitiateSystemShutdownEx;
-begin
- GetProcedureAddress(_InitiateSystemShutdownEx, advapi32, 'InitiateSystemShutdownEx' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_InitiateSystemShutdownEx]
- end;
-end;
-
-var
- _RegSaveKeyExA: Pointer;
-
-function RegSaveKeyExA;
-begin
- GetProcedureAddress(_RegSaveKeyExA, advapi32, 'RegSaveKeyExA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RegSaveKeyExA]
- end;
-end;
-
-var
- _RegSaveKeyExW: Pointer;
-
-function RegSaveKeyExW;
-begin
- GetProcedureAddress(_RegSaveKeyExW, advapi32, 'RegSaveKeyExW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RegSaveKeyExW]
- end;
-end;
-
-var
- _RegSaveKeyEx: Pointer;
-
-function RegSaveKeyEx;
-begin
- GetProcedureAddress(_RegSaveKeyEx, advapi32, 'RegSaveKeyEx' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RegSaveKeyEx]
- end;
-end;
-
-var
- _Wow64Win32ApiEntry: Pointer;
-
-function Wow64Win32ApiEntry;
-begin
- GetProcedureAddress(_Wow64Win32ApiEntry, advapi32, 'Wow64Win32ApiEntry');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_Wow64Win32ApiEntry]
- end;
-end;
-
-{$ELSE}
-
-function RegCloseKey; external advapi32 name 'RegCloseKey';
-function RegOverridePredefKey; external advapi32 name 'RegOverridePredefKey';
-function RegOpenUserClassesRoot; external advapi32 name 'RegOpenUserClassesRoot';
-function RegOpenCurrentUser; external advapi32 name 'RegOpenCurrentUser';
-function RegDisablePredefinedCache; external advapi32 name 'RegDisablePredefinedCache';
-function RegConnectRegistryA; external advapi32 name 'RegConnectRegistryA';
-function RegConnectRegistryW; external advapi32 name 'RegConnectRegistryW';
-function RegConnectRegistry; external advapi32 name 'RegConnectRegistry' + AWSuffix;
-function RegCreateKeyA; external advapi32 name 'RegCreateKeyA';
-function RegCreateKeyW; external advapi32 name 'RegCreateKeyW';
-function RegCreateKey; external advapi32 name 'RegCreateKey' + AWSuffix;
-function RegCreateKeyExA; external advapi32 name 'RegCreateKeyExA';
-function RegCreateKeyExW; external advapi32 name 'RegCreateKeyExW';
-function RegCreateKeyEx; external advapi32 name 'RegCreateKeyEx' + AWSuffix;
-function RegDeleteKeyA; external advapi32 name 'RegDeleteKeyA';
-function RegDeleteKeyW; external advapi32 name 'RegDeleteKeyW';
-function RegDeleteKey; external advapi32 name 'RegDeleteKey' + AWSuffix;
-function RegDeleteValueA; external advapi32 name 'RegDeleteValueA';
-function RegDeleteValueW; external advapi32 name 'RegDeleteValueW';
-function RegDeleteValue; external advapi32 name 'RegDeleteValue' + AWSuffix;
-function RegEnumKeyA; external advapi32 name 'RegEnumKeyA';
-function RegEnumKeyW; external advapi32 name 'RegEnumKeyW';
-function RegEnumKey; external advapi32 name 'RegEnumKey' + AWSuffix;
-function RegEnumKeyExA; external advapi32 name 'RegEnumKeyExA';
-function RegEnumKeyExW; external advapi32 name 'RegEnumKeyExW';
-function RegEnumKeyEx; external advapi32 name 'RegEnumKeyEx' + AWSuffix;
-function RegEnumValueA; external advapi32 name 'RegEnumValueA';
-function RegEnumValueW; external advapi32 name 'RegEnumValueW';
-function RegEnumValue; external advapi32 name 'RegEnumValue' + AWSuffix;
-function RegFlushKey; external advapi32 name 'RegFlushKey';
-function RegGetKeySecurity; external advapi32 name 'RegGetKeySecurity';
-function RegLoadKeyA; external advapi32 name 'RegLoadKeyA';
-function RegLoadKeyW; external advapi32 name 'RegLoadKeyW';
-function RegLoadKey; external advapi32 name 'RegLoadKey' + AWSuffix;
-function RegOpenKeyA; external advapi32 name 'RegOpenKeyA';
-function RegOpenKeyW; external advapi32 name 'RegOpenKeyW';
-function RegOpenKey; external advapi32 name 'RegOpenKey' + AWSuffix;
-function RegOpenKeyExA; external advapi32 name 'RegOpenKeyExA';
-function RegOpenKeyExW; external advapi32 name 'RegOpenKeyExW';
-function RegOpenKeyEx; external advapi32 name 'RegOpenKeyEx' + AWSuffix;
-function RegQueryInfoKeyA; external advapi32 name 'RegQueryInfoKeyA';
-function RegQueryInfoKeyW; external advapi32 name 'RegQueryInfoKeyW';
-function RegQueryInfoKey; external advapi32 name 'RegQueryInfoKey' + AWSuffix;
-function RegQueryValueA; external advapi32 name 'RegQueryValueA';
-function RegQueryValueW; external advapi32 name 'RegQueryValueW';
-function RegQueryValue; external advapi32 name 'RegQueryValue' + AWSuffix;
-function RegQueryMultipleValuesA; external advapi32 name 'RegQueryMultipleValuesA';
-function RegQueryMultipleValuesW; external advapi32 name 'RegQueryMultipleValuesW';
-function RegQueryMultipleValues; external advapi32 name 'RegQueryMultipleValues' + AWSuffix;
-function RegQueryValueExA; external advapi32 name 'RegQueryValueExA';
-function RegQueryValueExW; external advapi32 name 'RegQueryValueExW';
-function RegQueryValueEx; external advapi32 name 'RegQueryValueEx' + AWSuffix;
-function RegReplaceKeyA; external advapi32 name 'RegReplaceKeyA';
-function RegReplaceKeyW; external advapi32 name 'RegReplaceKeyW';
-function RegReplaceKey; external advapi32 name 'RegReplaceKey' + AWSuffix;
-function RegRestoreKeyA; external advapi32 name 'RegRestoreKeyA';
-function RegRestoreKeyW; external advapi32 name 'RegRestoreKeyW';
-function RegRestoreKey; external advapi32 name 'RegRestoreKey' + AWSuffix;
-function RegSaveKeyA; external advapi32 name 'RegSaveKeyA';
-function RegSaveKeyW; external advapi32 name 'RegSaveKeyW';
-function RegSaveKey; external advapi32 name 'RegSaveKey' + AWSuffix;
-function RegSetKeySecurity; external advapi32 name 'RegSetKeySecurity';
-function RegSetValueA; external advapi32 name 'RegSetValueA';
-function RegSetValueW; external advapi32 name 'RegSetValueW';
-function RegSetValue; external advapi32 name 'RegSetValue' + AWSuffix;
-function RegSetValueExA; external advapi32 name 'RegSetValueExA';
-function RegSetValueExW; external advapi32 name 'RegSetValueExW';
-function RegSetValueEx; external advapi32 name 'RegSetValueEx' + AWSuffix;
-function RegUnLoadKeyA; external advapi32 name 'RegUnLoadKeyA';
-function RegUnLoadKeyW; external advapi32 name 'RegUnLoadKeyW';
-function RegUnLoadKey; external advapi32 name 'RegUnLoadKey' + AWSuffix;
-function InitiateSystemShutdownA; external advapi32 name 'InitiateSystemShutdownA';
-function InitiateSystemShutdownW; external advapi32 name 'InitiateSystemShutdownW';
-function InitiateSystemShutdown; external advapi32 name 'InitiateSystemShutdown' + AWSuffix;
-function AbortSystemShutdownA; external advapi32 name 'AbortSystemShutdownA';
-function AbortSystemShutdownW; external advapi32 name 'AbortSystemShutdownW';
-function AbortSystemShutdown; external advapi32 name 'AbortSystemShutdown' + AWSuffix;
-function InitiateSystemShutdownExA; external advapi32 name 'InitiateSystemShutdownExA';
-function InitiateSystemShutdownExW; external advapi32 name 'InitiateSystemShutdownExW';
-function InitiateSystemShutdownEx; external advapi32 name 'InitiateSystemShutdownEx' + AWSuffix;
-function RegSaveKeyExA; external advapi32 name 'RegSaveKeyExA';
-function RegSaveKeyExW; external advapi32 name 'RegSaveKeyExW';
-function RegSaveKeyEx; external advapi32 name 'RegSaveKeyEx' + AWSuffix;
-function Wow64Win32ApiEntry; external advapi32 name 'Wow64Win32ApiEntry';
-
-{$ENDIF DYNAMIC_LINK}
-
-end.
+{******************************************************************************}
+{ }
+{ Windows Registry API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: winreg.h, released June 2000. The original Pascal }
+{ code is: WinReg.pas, released December 2000. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwawinreg.pas,v 1.1 2005/04/04 07:56:11 marco Exp $
+
+unit JwaWinReg;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "WinReg.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaReason, JwaWinBase, JwaWinNT, JwaWinType;
+
+//
+// Requested Key access mask type.
+//
+
+type
+ REGSAM = ACCESS_MASK;
+ {$EXTERNALSYM REGSAM}
+
+//
+// Reserved Key Handles.
+//
+
+const
+ HKEY_CLASSES_ROOT = HKEY(ULONG_PTR(LONG($80000000)));
+ {$EXTERNALSYM HKEY_CLASSES_ROOT}
+ HKEY_CURRENT_USER = HKEY(ULONG_PTR(LONG($80000001)));
+ {$EXTERNALSYM HKEY_CURRENT_USER}
+ HKEY_LOCAL_MACHINE = HKEY(ULONG_PTR(LONG($80000002)));
+ {$EXTERNALSYM HKEY_LOCAL_MACHINE}
+ HKEY_USERS = HKEY(ULONG_PTR(LONG($80000003)));
+ {$EXTERNALSYM HKEY_USERS}
+ HKEY_PERFORMANCE_DATA = HKEY(ULONG_PTR(LONG($80000004)));
+ {$EXTERNALSYM HKEY_PERFORMANCE_DATA}
+ HKEY_PERFORMANCE_TEXT = HKEY(ULONG_PTR(LONG($80000050)));
+ {$EXTERNALSYM HKEY_PERFORMANCE_TEXT}
+ HKEY_PERFORMANCE_NLSTEXT = HKEY(ULONG_PTR(LONG($80000060)));
+ {$EXTERNALSYM HKEY_PERFORMANCE_NLSTEXT}
+ HKEY_CURRENT_CONFIG = HKEY(ULONG_PTR(LONG($80000005)));
+ {$EXTERNALSYM HKEY_CURRENT_CONFIG}
+ HKEY_DYN_DATA = HKEY(ULONG_PTR(LONG($80000006)));
+ {$EXTERNALSYM HKEY_DYN_DATA}
+
+ PROVIDER_KEEPS_VALUE_LENGTH = $1;
+ {$EXTERNALSYM PROVIDER_KEEPS_VALUE_LENGTH}
+
+type
+ val_context = record
+ valuelen: Integer; // the total length of this value
+ value_context: LPVOID; // provider's context
+ val_buff_ptr: LPVOID; // where in the ouput buffer the value is.
+ end;
+ {$EXTERNALSYM val_context}
+ PVALCONTEXT = ^val_context;
+ {$EXTERNALSYM PVALCONTEXT}
+ TValContext = val_context;
+
+ PVALUEA = record // Provider supplied value/context.
+ pv_valuename: LPSTR; // The value name pointer
+ pv_valuelen: Integer;
+ pv_value_context: LPVOID;
+ pv_type: DWORD;
+ end;
+ {$EXTERNALSYM PVALUEA}
+ PPVALUEA = ^PVALUEA;
+ {$EXTERNALSYM PPVALUEA}
+ TPValueA = PVALUEA;
+
+ PVALUEW = record // Provider supplied value/context.
+ pv_valuename: LPWSTR; // The value name pointer
+ pv_valuelen: Integer;
+ pv_value_context: LPVOID;
+ pv_type: DWORD;
+ end;
+ {$EXTERNALSYM PVALUEW}
+ PPVALUEW = ^PVALUEW;
+ {$EXTERNALSYM PPVALUEW}
+ TPValueW = PVALUEW;
+
+ {$IFDEF UNICODE}
+ PVALUE = PVALUEW;
+ {$EXTERNALSYM PVALUE}
+ PPVALUE = PPVALUEW;
+ {$EXTERNALSYM PPVALUE}
+ TPValue = TPValueW;
+ {$ELSE}
+ PVALUE = PVALUEA;
+ {$EXTERNALSYM PVALUE}
+ PPVALUE = PPVALUEA;
+ {$EXTERNALSYM PPVALUE}
+ TPValue = TPValueA;
+ {$ENDIF UNICODE}
+
+ QUERYHANDLER = function(keycontext: LPVOID; val_list: PVALCONTEXT;
+ num_vals: DWORD; outputbuffer: LPVOID; total_outlen: LPDWORD;
+ input_blen: DWORD): DWORD; cdecl;
+ {$EXTERNALSYM QUERYHANDLER}
+ PQUERYHANDLER = ^QUERYHANDLER;
+ {$EXTERNALSYM PQUERYHANDLER}
+ TQueryHandler = QUERYHANDLER;
+
+ provider_info = record
+ pi_R0_1val: PQUERYHANDLER;
+ pi_R0_allvals: PQUERYHANDLER;
+ pi_R3_1val: PQUERYHANDLER;
+ pi_R3_allvals: PQUERYHANDLER;
+ pi_flags: DWORD; // capability flags (none defined yet).
+ pi_key_context: LPVOID;
+ end;
+ {$EXTERNALSYM provider_info}
+ REG_PROVIDER = provider_info;
+ {$EXTERNALSYM REG_PROVIDER}
+ PPROVIDER = ^provider_info;
+ {$EXTERNALSYM PPROVIDER}
+ TProviderInfo = provider_info;
+ PProviderInfo = ^provider_info;
+
+ value_entA = record
+ ve_valuename: LPSTR;
+ ve_valuelen: DWORD;
+ ve_valueptr: DWORD_PTR;
+ ve_type: DWORD;
+ end;
+ {$EXTERNALSYM value_entA}
+ VALENTA = value_entA;
+ {$EXTERNALSYM VALENTA}
+ PVALENTA = ^VALENTA;
+ {$EXTERNALSYM PVALENTA}
+ TValueEntA = value_entA;
+ PValueEntA = ^value_entA;
+
+ value_entW = record
+ ve_valuename: LPWSTR;
+ ve_valuelen: DWORD;
+ ve_valueptr: DWORD_PTR;
+ ve_type: DWORD;
+ end;
+ {$EXTERNALSYM value_entW}
+ VALENTW = value_entW;
+ {$EXTERNALSYM VALENTW}
+ PVALENTW = ^VALENTW;
+ {$EXTERNALSYM PVALENTW}
+ TValueEntW = value_entW;
+ PValueEntW = ^value_entW;
+
+ {$IFDEF UNICODE}
+ VALENT = VALENTW;
+ {$EXTERNALSYM VALENT}
+ PVALENT = PVALENTW;
+ {$EXTERNALSYM PVALENT}
+ TValueEnt = TValueEntW;
+ PValueEnt = PValueEntW;
+ {$ELSE}
+ VALENT = VALENTA;
+ {$EXTERNALSYM VALENT}
+ PVALENT = PVALENTA;
+ {$EXTERNALSYM PVALENT}
+ TValueEnt = TValueEntA;
+ PValueEnt = PValueEntA;
+ {$ENDIF UNICODE}
+
+//
+// Default values for parameters that do not exist in the Win 3.1
+// compatible APIs.
+//
+
+const
+ WIN31_CLASS = nil;
+ {$EXTERNALSYM WIN31_CLASS}
+
+//
+// API Prototypes.
+//
+
+function RegCloseKey(hKey: HKEY): LONG; stdcall;
+{$EXTERNALSYM RegCloseKey}
+
+function RegOverridePredefKey(hKey: HKEY; hNewHKey: HKEY): LONG; stdcall;
+{$EXTERNALSYM RegOverridePredefKey}
+
+function RegOpenUserClassesRoot(hToken: HANDLE; dwOptions: DWORD;
+ samDesired: REGSAM; var phkResult: HKEY): LONG; stdcall;
+{$EXTERNALSYM RegOpenUserClassesRoot}
+
+function RegOpenCurrentUser(samDesired: REGSAM; var phkResult: HKEY): LONG; stdcall;
+{$EXTERNALSYM RegOpenCurrentUser}
+
+function RegDisablePredefinedCache: LONG; stdcall;
+{$EXTERNALSYM RegDisablePredefinedCache}
+
+function RegConnectRegistryA(lpMachineName: LPCSTR; hKey: HKEY;
+ var phkResult: HKEY): LONG; stdcall;
+{$EXTERNALSYM RegConnectRegistryA}
+function RegConnectRegistryW(lpMachineName: LPCWSTR; hKey: HKEY;
+ var phkResult: HKEY): LONG; stdcall;
+{$EXTERNALSYM RegConnectRegistryW}
+function RegConnectRegistry(lpMachineName: LPCTSTR; hKey: HKEY;
+ var phkResult: HKEY): LONG; stdcall;
+{$EXTERNALSYM RegConnectRegistry}
+
+function RegCreateKeyA(hKey: HKEY; lpSubKey: LPCSTR; var phkResult: HKEY): LONG; stdcall;
+{$EXTERNALSYM RegCreateKeyA}
+function RegCreateKeyW(hKey: HKEY; lpSubKey: LPCWSTR; var phkResult: HKEY): LONG; stdcall;
+{$EXTERNALSYM RegCreateKeyW}
+function RegCreateKey(hKey: HKEY; lpSubKey: LPCTSTR; var phkResult: HKEY): LONG; stdcall;
+{$EXTERNALSYM RegCreateKey}
+
+function RegCreateKeyExA(hKey: HKEY; lpSubKey: LPCSTR; Reserved: DWORD;
+ lpClass: LPSTR; dwOptions: DWORD; samDesired: REGSAM;
+ lpSecurityAttributes: LPSECURITY_ATTRIBUTES; var phkResult: HKEY;
+ lpdwDisposition: LPDWORD): LONG; stdcall;
+{$EXTERNALSYM RegCreateKeyExA}
+function RegCreateKeyExW(hKey: HKEY; lpSubKey: LPCWSTR; Reserved: DWORD;
+ lpClass: LPWSTR; dwOptions: DWORD; samDesired: REGSAM;
+ lpSecurityAttributes: LPSECURITY_ATTRIBUTES; var phkResult: HKEY;
+ lpdwDisposition: LPDWORD): LONG; stdcall;
+{$EXTERNALSYM RegCreateKeyExW}
+function RegCreateKeyEx(hKey: HKEY; lpSubKey: LPCTSTR; Reserved: DWORD;
+ lpClass: LPTSTR; dwOptions: DWORD; samDesired: REGSAM;
+ lpSecurityAttributes: LPSECURITY_ATTRIBUTES; var phkResult: HKEY;
+ lpdwDisposition: LPDWORD): LONG; stdcall;
+{$EXTERNALSYM RegCreateKeyEx}
+
+function RegDeleteKeyA(hKey: HKEY; lpSubKey: LPCSTR): LONG; stdcall;
+{$EXTERNALSYM RegDeleteKeyA}
+function RegDeleteKeyW(hKey: HKEY; lpSubKey: LPCWSTR): LONG; stdcall;
+{$EXTERNALSYM RegDeleteKeyW}
+function RegDeleteKey(hKey: HKEY; lpSubKey: LPCTSTR): LONG; stdcall;
+{$EXTERNALSYM RegDeleteKey}
+
+function RegDeleteValueA(hKey: HKEY; lpValueName: LPCSTR): LONG; stdcall;
+{$EXTERNALSYM RegDeleteValueA}
+function RegDeleteValueW(hKey: HKEY; lpValueName: LPCWSTR): LONG; stdcall;
+{$EXTERNALSYM RegDeleteValueW}
+function RegDeleteValue(hKey: HKEY; lpValueName: LPCTSTR): LONG; stdcall;
+{$EXTERNALSYM RegDeleteValue}
+
+function RegEnumKeyA(hKey: HKEY; dwIndex: DWORD; lpName: LPSTR; cbName: DWORD): LONG; stdcall;
+{$EXTERNALSYM RegEnumKeyA}
+function RegEnumKeyW(hKey: HKEY; dwIndex: DWORD; lpName: LPWSTR; cbName: DWORD): LONG; stdcall;
+{$EXTERNALSYM RegEnumKeyW}
+function RegEnumKey(hKey: HKEY; dwIndex: DWORD; lpName: LPTSTR; cbName: DWORD): LONG; stdcall;
+{$EXTERNALSYM RegEnumKey}
+
+function RegEnumKeyExA(hKey: HKEY; dwIndex: DWORD; lpName: LPSTR;
+ var lpcbName: DWORD; lpReserved: LPDWORD; lpClass: LPSTR; lpcbClass: LPDWORD;
+ lpftLastWriteTime: PFILETIME): LONG; stdcall;
+{$EXTERNALSYM RegEnumKeyExA}
+function RegEnumKeyExW(hKey: HKEY; dwIndex: DWORD; lpName: LPWSTR;
+ var lpcbName: DWORD; lpReserved: LPDWORD; lpClass: LPWSTR; lpcbClass: LPDWORD;
+ lpftLastWriteTime: PFILETIME): LONG; stdcall;
+{$EXTERNALSYM RegEnumKeyExW}
+function RegEnumKeyEx(hKey: HKEY; dwIndex: DWORD; lpName: LPTSTR;
+ var lpcbName: LPDWORD; lpReserved: LPDWORD; lpClass: LPTSTR; lpcbClass: LPDWORD;
+ lpftLastWriteTime: PFILETIME): LONG; stdcall;
+{$EXTERNALSYM RegEnumKeyEx}
+
+function RegEnumValueA(hKey: HKEY; dwIndex: DWORD; lpValueName: LPSTR;
+ var lpcbValueName: DWORD; lpReserved, lpType: LPDWORD; lpData: LPBYTE;
+ lpcbData: LPDWORD): LONG; stdcall;
+{$EXTERNALSYM RegEnumValueA}
+function RegEnumValueW(hKey: HKEY; dwIndex: DWORD; lpValueName: LPWSTR;
+ var lpcbValueName: DWORD; lpReserved, lpType: LPDWORD; lpData: LPBYTE;
+ lpcbData: LPDWORD): LONG; stdcall;
+{$EXTERNALSYM RegEnumValueW}
+function RegEnumValue(hKey: HKEY; dwIndex: DWORD; lpValueName: LPTSTR;
+ var lpcbValueName: DWORD; lpReserved, lpType: LPDWORD; lpData: LPBYTE;
+ lpcbData: LPDWORD): LONG; stdcall;
+{$EXTERNALSYM RegEnumValue}
+
+function RegFlushKey(hKey: HKEY): LONG; stdcall;
+{$EXTERNALSYM RegFlushKey}
+
+function RegGetKeySecurity(hKey: HKEY; SecurityInformation: SECURITY_INFORMATION;
+ pSecurityDescriptor: PSECURITY_DESCRIPTOR; var lpcbSecurityDescriptor: DWORD): LONG; stdcall;
+{$EXTERNALSYM RegGetKeySecurity}
+
+function RegLoadKeyA(hKey: HKEY; lpSubKey: LPCSTR; lpFile: LPCSTR): LONG; stdcall;
+{$EXTERNALSYM RegLoadKeyA}
+function RegLoadKeyW(hKey: HKEY; lpSubKey: LPCWSTR; lpFile: LPCWSTR): LONG; stdcall;
+{$EXTERNALSYM RegLoadKeyW}
+function RegLoadKey(hKey: HKEY; lpSubKey: LPCTSTR; lpFile: LPCTSTR): LONG; stdcall;
+{$EXTERNALSYM RegLoadKey}
+
+function RegNotifyChangeKeyValue(hKey: HKEY; bWatchSubtree: BOOL;
+ dwNotifyFilter: DWORD; hEvent: HANDLE; fAsynchronus: BOOL): LONG;
+{$EXTERNALSYM RegNotifyChangeKeyValue}
+
+function RegOpenKeyA(hKey: HKEY; lpSubKey: LPCSTR; var phkResult: HKEY): LONG; stdcall;
+{$EXTERNALSYM RegOpenKeyA}
+function RegOpenKeyW(hKey: HKEY; lpSubKey: LPCWSTR; var phkResult: HKEY): LONG; stdcall;
+{$EXTERNALSYM RegOpenKeyW}
+function RegOpenKey(hKey: HKEY; lpSubKey: LPCTSTR; var phkResult: HKEY): LONG; stdcall;
+{$EXTERNALSYM RegOpenKey}
+
+function RegOpenKeyExA(hKey: HKEY; lpSubKey: LPCSTR; ulOptions: DWORD;
+ samDesired: REGSAM; var phkResult: HKEY): LONG; stdcall;
+{$EXTERNALSYM RegOpenKeyExA}
+function RegOpenKeyExW(hKey: HKEY; lpSubKey: LPCWSTR; ulOptions: DWORD;
+ samDesired: REGSAM; var phkResult: HKEY): LONG; stdcall;
+{$EXTERNALSYM RegOpenKeyExW}
+function RegOpenKeyEx(hKey: HKEY; lpSubKey: LPCTSTR; ulOptions: DWORD;
+ samDesired: REGSAM; var phkResult: HKEY): LONG; stdcall;
+{$EXTERNALSYM RegOpenKeyEx}
+
+function RegQueryInfoKeyA(hKey: HKEY; lpClass: LPSTR; lpcbClass, lpReserved,
+ lpcSubKeys, lpcbMaxSubKeyLen, lpcbMaxClassLen, lpcValues, lpcbMaxValueNameLen,
+ lpcbMaxValueLen, lpcbSecurityDescriptor: LPDWORD; lpftLastWriteTime: PFILETIME): LONG; stdcall;
+{$EXTERNALSYM RegQueryInfoKeyA}
+function RegQueryInfoKeyW(hKey: HKEY; lpClass: LPWSTR; lpcbClass, lpReserved,
+ lpcSubKeys, lpcbMaxSubKeyLen, lpcbMaxClassLen, lpcValues, lpcbMaxValueNameLen,
+ lpcbMaxValueLen, lpcbSecurityDescriptor: LPDWORD; lpftLastWriteTime: PFILETIME): LONG; stdcall;
+{$EXTERNALSYM RegQueryInfoKeyW}
+function RegQueryInfoKey(hKey: HKEY; lpClass: LPTSTR; lpcbClass, lpReserved,
+ lpcSubKeys, lpcbMaxSubKeyLen, lpcbMaxClassLen, lpcValues, lpcbMaxValueNameLen,
+ lpcbMaxValueLen, lpcbSecurityDescriptor: LPDWORD; lpftLastWriteTime: PFILETIME): LONG; stdcall;
+{$EXTERNALSYM RegQueryInfoKey}
+
+function RegQueryValueA(hKey: HKEY; lpSubKey: LPCSTR; lpValue: LPSTR;
+ var lpcbValue: LONG): LONG; stdcall;
+{$EXTERNALSYM RegQueryValueA}
+function RegQueryValueW(hKey: HKEY; lpSubKey: LPCWSTR; lpValue: LPWSTR;
+ var lpcbValue: LONG): LONG; stdcall;
+{$EXTERNALSYM RegQueryValueW}
+function RegQueryValue(hKey: HKEY; lpSubKey: LPCTSTR; lpValue: LPTSTR;
+ var lpcbValue: LONG): LONG; stdcall;
+{$EXTERNALSYM RegQueryValue}
+
+function RegQueryMultipleValuesA(hKey: HKEY; val_list: PVALENTA; num_vals: DWORD;
+ lpValueBuf: LPSTR; var ldwTotsize: DWORD): LONG; stdcall;
+{$EXTERNALSYM RegQueryMultipleValuesA}
+function RegQueryMultipleValuesW(hKey: HKEY; val_list: PVALENTW; num_vals: DWORD;
+ lpValueBuf: LPWSTR; var ldwTotsize: DWORD): LONG; stdcall;
+{$EXTERNALSYM RegQueryMultipleValuesW}
+function RegQueryMultipleValues(hKey: HKEY; val_list: PVALENT; num_vals: DWORD;
+ lpValueBuf: LPTSTR; var ldwTotsize: DWORD): LONG; stdcall;
+{$EXTERNALSYM RegQueryMultipleValues}
+
+function RegQueryValueExA(hKey: HKEY; lpValueName: LPCSTR; lpReserved: LPDWORD;
+ lpType: LPDWORD; lpData: LPBYTE; lpcbData: LPDWORD): LONG; stdcall;
+{$EXTERNALSYM RegQueryValueExA}
+function RegQueryValueExW(hKey: HKEY; lpValueName: LPCWSTR; lpReserved: LPDWORD;
+ lpType: LPDWORD; lpData: LPBYTE; lpcbData: LPDWORD): LONG; stdcall;
+{$EXTERNALSYM RegQueryValueExW}
+function RegQueryValueEx(hKey: HKEY; lpValueName: LPCTSTR; lpReserved: LPDWORD;
+ lpType: LPDWORD; lpData: LPBYTE; lpcbData: LPDWORD): LONG; stdcall;
+{$EXTERNALSYM RegQueryValueEx}
+
+function RegReplaceKeyA(hKey: HKEY; lpSubKey: LPCSTR; lpNewFile: LPCSTR;
+ lpOldFile: LPCSTR): LONG; stdcall;
+{$EXTERNALSYM RegReplaceKeyA}
+function RegReplaceKeyW(hKey: HKEY; lpSubKey: LPCWSTR; lpNewFile: LPCWSTR;
+ lpOldFile: LPCWSTR): LONG; stdcall;
+{$EXTERNALSYM RegReplaceKeyW}
+function RegReplaceKey(hKey: HKEY; lpSubKey: LPCTSTR; lpNewFile: LPCTSTR;
+ lpOldFile: LPCTSTR): LONG; stdcall;
+{$EXTERNALSYM RegReplaceKey}
+
+function RegRestoreKeyA(hKey: HKEY; lpFile: LPCSTR; dwFlags: DWORD): LONG; stdcall;
+{$EXTERNALSYM RegRestoreKeyA}
+function RegRestoreKeyW(hKey: HKEY; lpFile: LPCWSTR; dwFlags: DWORD): LONG; stdcall;
+{$EXTERNALSYM RegRestoreKeyW}
+function RegRestoreKey(hKey: HKEY; lpFile: LPCTSTR; dwFlags: DWORD): LONG; stdcall;
+{$EXTERNALSYM RegRestoreKey}
+
+function RegSaveKeyA(hKey: HKEY; lpFile: LPCSTR;
+ lpSecurityAttributes: LPSECURITY_ATTRIBUTES): LONG; stdcall;
+{$EXTERNALSYM RegSaveKeyA}
+function RegSaveKeyW(hKey: HKEY; lpFile: LPCWSTR;
+ lpSecurityAttributes: LPSECURITY_ATTRIBUTES): LONG; stdcall;
+{$EXTERNALSYM RegSaveKeyW}
+function RegSaveKey(hKey: HKEY; lpFile: LPCTSTR;
+ lpSecurityAttributes: LPSECURITY_ATTRIBUTES): LONG; stdcall;
+{$EXTERNALSYM RegSaveKey}
+
+function RegSetKeySecurity(hKey: HKEY; SecurityInformation: SECURITY_INFORMATION;
+ pSecurityDescriptor: PSECURITY_DESCRIPTOR): LONG; stdcall;
+{$EXTERNALSYM RegSetKeySecurity}
+
+function RegSetValueA(hKey: HKEY; lpSubKey: LPCSTR; dwType: DWORD;
+ lpData: LPCSTR; cbData: DWORD): LONG; stdcall;
+{$EXTERNALSYM RegSetValueA}
+function RegSetValueW(hKey: HKEY; lpSubKey: LPCWSTR; dwType: DWORD;
+ lpData: LPCWSTR; cbData: DWORD): LONG; stdcall;
+{$EXTERNALSYM RegSetValueW}
+function RegSetValue(hKey: HKEY; lpSubKey: LPCTSTR; dwType: DWORD;
+ lpData: LPCTSTR; cbData: DWORD): LONG; stdcall;
+{$EXTERNALSYM RegSetValue}
+
+function RegSetValueExA(hKey: HKEY; lpValueName: LPCSTR; Reserved: DWORD;
+ dwType: DWORD; lpData: LPBYTE; cbData: DWORD): LONG; stdcall;
+{$EXTERNALSYM RegSetValueExA}
+function RegSetValueExW(hKey: HKEY; lpValueName: LPCWSTR; Reserved: DWORD;
+ dwType: DWORD; lpData: LPBYTE; cbData: DWORD): LONG; stdcall;
+{$EXTERNALSYM RegSetValueExW}
+function RegSetValueEx(hKey: HKEY; lpValueName: LPCTSTR; Reserved: DWORD;
+ dwType: DWORD; lpData: LPBYTE; cbData: DWORD): LONG; stdcall;
+{$EXTERNALSYM RegSetValueEx}
+
+function RegUnLoadKeyA(hKey: HKEY; lpSubKey: LPCSTR): LONG; stdcall;
+{$EXTERNALSYM RegUnLoadKeyA}
+function RegUnLoadKeyW(hKey: HKEY; lpSubKey: LPCWSTR): LONG; stdcall;
+{$EXTERNALSYM RegUnLoadKeyW}
+function RegUnLoadKey(hKey: HKEY; lpSubKey: LPCTSTR): LONG; stdcall;
+{$EXTERNALSYM RegUnLoadKey}
+
+//
+// Remoteable System Shutdown APIs
+//
+
+function InitiateSystemShutdownA(lpMachineName: LPSTR; lpMessage: LPSTR;
+ dwTimeout: DWORD; bForceAppsClosed, bRebootAfterShutdown: BOOL): BOOL; stdcall;
+{$EXTERNALSYM InitiateSystemShutdownA}
+function InitiateSystemShutdownW(lpMachineName: LPWSTR; lpMessage: LPWSTR;
+ dwTimeout: DWORD; bForceAppsClosed, bRebootAfterShutdown: BOOL): BOOL; stdcall;
+{$EXTERNALSYM InitiateSystemShutdownW}
+function InitiateSystemShutdown(lpMachineName: LPTSTR; lpMessage: LPTSTR;
+ dwTimeout: DWORD; bForceAppsClosed, bRebootAfterShutdown: BOOL): BOOL; stdcall;
+{$EXTERNALSYM InitiateSystemShutdown}
+
+function AbortSystemShutdownA(lpMachineName: LPSTR): BOOL; stdcall;
+{$EXTERNALSYM AbortSystemShutdownA}
+function AbortSystemShutdownW(lpMachineName: LPWSTR): BOOL; stdcall;
+{$EXTERNALSYM AbortSystemShutdownW}
+function AbortSystemShutdown(lpMachineName: LPTSTR): BOOL; stdcall;
+{$EXTERNALSYM AbortSystemShutdown}
+
+//
+// defines for InitiateSystemShutdownEx reason codes
+//
+
+const
+ REASON_SWINSTALL = SHTDN_REASON_MAJOR_SOFTWARE or SHTDN_REASON_MINOR_INSTALLATION;
+ {$EXTERNALSYM REASON_SWINSTALL}
+ REASON_HWINSTALL = SHTDN_REASON_MAJOR_HARDWARE or SHTDN_REASON_MINOR_INSTALLATION;
+ {$EXTERNALSYM REASON_HWINSTALL}
+ REASON_SERVICEHANG = SHTDN_REASON_MAJOR_SOFTWARE or SHTDN_REASON_MINOR_HUNG;
+ {$EXTERNALSYM REASON_SERVICEHANG}
+ REASON_UNSTABLE = SHTDN_REASON_MAJOR_SYSTEM or SHTDN_REASON_MINOR_UNSTABLE;
+ {$EXTERNALSYM REASON_UNSTABLE}
+ REASON_SWHWRECONF = SHTDN_REASON_MAJOR_SOFTWARE or SHTDN_REASON_MINOR_RECONFIG;
+ {$EXTERNALSYM REASON_SWHWRECONF}
+ REASON_OTHER = SHTDN_REASON_MAJOR_OTHER or SHTDN_REASON_MINOR_OTHER;
+ {$EXTERNALSYM REASON_OTHER}
+ REASON_UNKNOWN = SHTDN_REASON_UNKNOWN;
+ {$EXTERNALSYM REASON_UNKNOWN}
+ REASON_LEGACY_API = SHTDN_REASON_LEGACY_API;
+ {$EXTERNALSYM REASON_LEGACY_API}
+ REASON_PLANNED_FLAG = SHTDN_REASON_FLAG_PLANNED;
+ {$EXTERNALSYM REASON_PLANNED_FLAG}
+
+//
+// MAX Shutdown TimeOut == 10 Years in seconds
+//
+
+ MAX_SHUTDOWN_TIMEOUT = 10 * 365 * 24 * 60 * 60;
+ {$EXTERNALSYM MAX_SHUTDOWN_TIMEOUT}
+
+function InitiateSystemShutdownExA(lpMachineName: LPSTR; lpMessage: LPSTR;
+ dwTimeout: DWORD; bForceAppsClosed, bRebootAfterShutdown: BOOL; dwReason: DWORD): BOOL; stdcall;
+{$EXTERNALSYM InitiateSystemShutdownExA}
+function InitiateSystemShutdownExW(lpMachineName: LPWSTR; lpMessage: LPWSTR;
+ dwTimeout: DWORD; bForceAppsClosed, bRebootAfterShutdown: BOOL; dwReason: DWORD): BOOL; stdcall;
+{$EXTERNALSYM InitiateSystemShutdownExW}
+function InitiateSystemShutdownEx(lpMachineName: LPTSTR; lpMessage: LPTSTR;
+ dwTimeout: DWORD; bForceAppsClosed, bRebootAfterShutdown: BOOL; dwReason: DWORD): BOOL; stdcall;
+{$EXTERNALSYM InitiateSystemShutdownEx}
+
+function RegSaveKeyExA(hKey: HKEY; lpFile: LPCSTR;
+ lpSecurityAttributes: LPSECURITY_ATTRIBUTES; Flags: DWORD): LONG; stdcall;
+{$EXTERNALSYM RegSaveKeyExA}
+function RegSaveKeyExW(hKey: HKEY; lpFile: LPCWSTR;
+ lpSecurityAttributes: LPSECURITY_ATTRIBUTES; Flags: DWORD): LONG; stdcall;
+{$EXTERNALSYM RegSaveKeyExW}
+function RegSaveKeyEx(hKey: HKEY; lpFile: LPCTSTR;
+ lpSecurityAttributes: LPSECURITY_ATTRIBUTES; Flags: DWORD): LONG; stdcall;
+{$EXTERNALSYM RegSaveKeyEx}
+
+function Wow64Win32ApiEntry(dwFuncNumber, dwFlag, dwRes: DWORD): LONG; stdcall;
+{$EXTERNALSYM Wow64Win32ApiEntry}
+
+implementation
+
+const
+ advapi32 = 'advapi32.dll';
+ {$IFDEF UNICODE}
+ AWSuffix = 'W';
+ {$ELSE}
+ AWSuffix = 'A';
+ {$ENDIF UNICODE}
+
+type
+ TRegNotifyChangeKeyValue = function(hKey: HKEY; bWatchSubtree: LongBool; dwNotifyFilter: DWORD; hEvent: HANDLE; fAsynchronus: LongBool): LONG; stdcall;
+
+var
+ _RegNotifyChangeKeyValue: Pointer;
+
+function RegNotifyChangeKeyValue(hKey: HKEY; bWatchSubtree: LongBool; dwNotifyFilter: DWORD; hEvent: HANDLE; fAsynchronus: LongBool): LONG;
+begin
+ GetProcedureAddress(_RegNotifyChangeKeyValue, advapi32, 'RegNotifyChangeKeyValue');
+ if bWatchSubTree then
+ Result := TRegNotifyChangeKeyValue(_RegNotifyChangeKeyValue)(hKey, LongBool(1), dwNotifyFilter, hEvent, fAsynchronus)
+ else
+ Result := TRegNotifyChangeKeyValue(_RegNotifyChangeKeyValue)(hKey, LongBool(0), dwNotifyFilter, hEvent, fAsynchronus);
+end;
+
+{$IFDEF DYNAMIC_LINK}
+
+var
+ _RegCloseKey: Pointer;
+
+function RegCloseKey;
+begin
+ GetProcedureAddress(_RegCloseKey, advapi32, 'RegCloseKey');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RegCloseKey]
+ end;
+end;
+
+var
+ _RegOverridePredefKey: Pointer;
+
+function RegOverridePredefKey;
+begin
+ GetProcedureAddress(_RegOverridePredefKey, advapi32, 'RegOverridePredefKey');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RegOverridePredefKey]
+ end;
+end;
+
+var
+ _RegOpenUserClassesRoot: Pointer;
+
+function RegOpenUserClassesRoot;
+begin
+ GetProcedureAddress(_RegOpenUserClassesRoot, advapi32, 'RegOpenUserClassesRoot');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RegOpenUserClassesRoot]
+ end;
+end;
+
+var
+ _RegOpenCurrentUser: Pointer;
+
+function RegOpenCurrentUser;
+begin
+ GetProcedureAddress(_RegOpenCurrentUser, advapi32, 'RegOpenCurrentUser');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RegOpenCurrentUser]
+ end;
+end;
+
+var
+ _RegDisablePredefinedCache: Pointer;
+
+function RegDisablePredefinedCache;
+begin
+ GetProcedureAddress(_RegDisablePredefinedCache, advapi32, 'RegDisablePredefinedCache');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RegDisablePredefinedCache]
+ end;
+end;
+
+var
+ _RegConnectRegistryA: Pointer;
+
+function RegConnectRegistryA;
+begin
+ GetProcedureAddress(_RegConnectRegistryA, advapi32, 'RegConnectRegistryA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RegConnectRegistryA]
+ end;
+end;
+
+var
+ _RegConnectRegistryW: Pointer;
+
+function RegConnectRegistryW;
+begin
+ GetProcedureAddress(_RegConnectRegistryW, advapi32, 'RegConnectRegistryW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RegConnectRegistryW]
+ end;
+end;
+
+var
+ _RegConnectRegistry: Pointer;
+
+function RegConnectRegistry;
+begin
+ GetProcedureAddress(_RegConnectRegistry, advapi32, 'RegConnectRegistry' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RegConnectRegistry]
+ end;
+end;
+
+var
+ _RegCreateKeyA: Pointer;
+
+function RegCreateKeyA;
+begin
+ GetProcedureAddress(_RegCreateKeyA, advapi32, 'RegCreateKeyA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RegCreateKeyA]
+ end;
+end;
+
+var
+ _RegCreateKeyW: Pointer;
+
+function RegCreateKeyW;
+begin
+ GetProcedureAddress(_RegCreateKeyW, advapi32, 'RegCreateKeyW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RegCreateKeyW]
+ end;
+end;
+
+var
+ _RegCreateKey: Pointer;
+
+function RegCreateKey;
+begin
+ GetProcedureAddress(_RegCreateKey, advapi32, 'RegCreateKey' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RegCreateKey]
+ end;
+end;
+
+var
+ _RegCreateKeyExA: Pointer;
+
+function RegCreateKeyExA;
+begin
+ GetProcedureAddress(_RegCreateKeyExA, advapi32, 'RegCreateKeyExA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RegCreateKeyExA]
+ end;
+end;
+
+var
+ _RegCreateKeyExW: Pointer;
+
+function RegCreateKeyExW;
+begin
+ GetProcedureAddress(_RegCreateKeyExW, advapi32, 'RegCreateKeyExW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RegCreateKeyExW]
+ end;
+end;
+
+var
+ _RegCreateKeyEx: Pointer;
+
+function RegCreateKeyEx;
+begin
+ GetProcedureAddress(_RegCreateKeyEx, advapi32, 'RegCreateKeyEx' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RegCreateKeyEx]
+ end;
+end;
+
+var
+ _RegDeleteKeyA: Pointer;
+
+function RegDeleteKeyA;
+begin
+ GetProcedureAddress(_RegDeleteKeyA, advapi32, 'RegDeleteKeyA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RegDeleteKeyA]
+ end;
+end;
+
+var
+ _RegDeleteKeyW: Pointer;
+
+function RegDeleteKeyW;
+begin
+ GetProcedureAddress(_RegDeleteKeyW, advapi32, 'RegDeleteKeyW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RegDeleteKeyW]
+ end;
+end;
+
+var
+ _RegDeleteKey: Pointer;
+
+function RegDeleteKey;
+begin
+ GetProcedureAddress(_RegDeleteKey, advapi32, 'RegDeleteKey' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RegDeleteKey]
+ end;
+end;
+
+var
+ _RegDeleteValueA: Pointer;
+
+function RegDeleteValueA;
+begin
+ GetProcedureAddress(_RegDeleteValueA, advapi32, 'RegDeleteValueA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RegDeleteValueA]
+ end;
+end;
+
+var
+ _RegDeleteValueW: Pointer;
+
+function RegDeleteValueW;
+begin
+ GetProcedureAddress(_RegDeleteValueW, advapi32, 'RegDeleteValueW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RegDeleteValueW]
+ end;
+end;
+
+var
+ _RegDeleteValue: Pointer;
+
+function RegDeleteValue;
+begin
+ GetProcedureAddress(_RegDeleteValue, advapi32, 'RegDeleteValue' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RegDeleteValue]
+ end;
+end;
+
+var
+ _RegEnumKeyA: Pointer;
+
+function RegEnumKeyA;
+begin
+ GetProcedureAddress(_RegEnumKeyA, advapi32, 'RegEnumKeyA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RegEnumKeyA]
+ end;
+end;
+
+var
+ _RegEnumKeyW: Pointer;
+
+function RegEnumKeyW;
+begin
+ GetProcedureAddress(_RegEnumKeyW, advapi32, 'RegEnumKeyW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RegEnumKeyW]
+ end;
+end;
+
+var
+ _RegEnumKey: Pointer;
+
+function RegEnumKey;
+begin
+ GetProcedureAddress(_RegEnumKey, advapi32, 'RegEnumKey' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RegEnumKey]
+ end;
+end;
+
+var
+ _RegEnumKeyExA: Pointer;
+
+function RegEnumKeyExA;
+begin
+ GetProcedureAddress(_RegEnumKeyExA, advapi32, 'RegEnumKeyExA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RegEnumKeyExA]
+ end;
+end;
+
+var
+ _RegEnumKeyExW: Pointer;
+
+function RegEnumKeyExW;
+begin
+ GetProcedureAddress(_RegEnumKeyExW, advapi32, 'RegEnumKeyExW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RegEnumKeyExW]
+ end;
+end;
+
+var
+ _RegEnumKeyEx: Pointer;
+
+function RegEnumKeyEx;
+begin
+ GetProcedureAddress(_RegEnumKeyEx, advapi32, 'RegEnumKeyEx' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RegEnumKeyEx]
+ end;
+end;
+
+var
+ _RegEnumValueA: Pointer;
+
+function RegEnumValueA;
+begin
+ GetProcedureAddress(_RegEnumValueA, advapi32, 'RegEnumValueA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RegEnumValueA]
+ end;
+end;
+
+var
+ _RegEnumValueW: Pointer;
+
+function RegEnumValueW;
+begin
+ GetProcedureAddress(_RegEnumValueW, advapi32, 'RegEnumValueW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RegEnumValueW]
+ end;
+end;
+
+var
+ _RegEnumValue: Pointer;
+
+function RegEnumValue;
+begin
+ GetProcedureAddress(_RegEnumValue, advapi32, 'RegEnumValue' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RegEnumValue]
+ end;
+end;
+
+var
+ _RegFlushKey: Pointer;
+
+function RegFlushKey;
+begin
+ GetProcedureAddress(_RegFlushKey, advapi32, 'RegFlushKey');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RegFlushKey]
+ end;
+end;
+
+var
+ _RegGetKeySecurity: Pointer;
+
+function RegGetKeySecurity;
+begin
+ GetProcedureAddress(_RegGetKeySecurity, advapi32, 'RegGetKeySecurity');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RegGetKeySecurity]
+ end;
+end;
+
+var
+ _RegLoadKeyA: Pointer;
+
+function RegLoadKeyA;
+begin
+ GetProcedureAddress(_RegLoadKeyA, advapi32, 'RegLoadKeyA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RegLoadKeyA]
+ end;
+end;
+
+var
+ _RegLoadKeyW: Pointer;
+
+function RegLoadKeyW;
+begin
+ GetProcedureAddress(_RegLoadKeyW, advapi32, 'RegLoadKeyW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RegLoadKeyW]
+ end;
+end;
+
+var
+ _RegLoadKey: Pointer;
+
+function RegLoadKey;
+begin
+ GetProcedureAddress(_RegLoadKey, advapi32, 'RegLoadKey' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RegLoadKey]
+ end;
+end;
+
+var
+ _RegOpenKeyA: Pointer;
+
+function RegOpenKeyA;
+begin
+ GetProcedureAddress(_RegOpenKeyA, advapi32, 'RegOpenKeyA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RegOpenKeyA]
+ end;
+end;
+
+var
+ _RegOpenKeyW: Pointer;
+
+function RegOpenKeyW;
+begin
+ GetProcedureAddress(_RegOpenKeyW, advapi32, 'RegOpenKeyW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RegOpenKeyW]
+ end;
+end;
+
+var
+ _RegOpenKey: Pointer;
+
+function RegOpenKey;
+begin
+ GetProcedureAddress(_RegOpenKey, advapi32, 'RegOpenKey' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RegOpenKey]
+ end;
+end;
+
+var
+ _RegOpenKeyExA: Pointer;
+
+function RegOpenKeyExA;
+begin
+ GetProcedureAddress(_RegOpenKeyExA, advapi32, 'RegOpenKeyExA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RegOpenKeyExA]
+ end;
+end;
+
+var
+ _RegOpenKeyExW: Pointer;
+
+function RegOpenKeyExW;
+begin
+ GetProcedureAddress(_RegOpenKeyExW, advapi32, 'RegOpenKeyExW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RegOpenKeyExW]
+ end;
+end;
+
+var
+ _RegOpenKeyEx: Pointer;
+
+function RegOpenKeyEx;
+begin
+ GetProcedureAddress(_RegOpenKeyEx, advapi32, 'RegOpenKeyEx' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RegOpenKeyEx]
+ end;
+end;
+
+var
+ _RegQueryInfoKeyA: Pointer;
+
+function RegQueryInfoKeyA;
+begin
+ GetProcedureAddress(_RegQueryInfoKeyA, advapi32, 'RegQueryInfoKeyA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RegQueryInfoKeyA]
+ end;
+end;
+
+var
+ _RegQueryInfoKeyW: Pointer;
+
+function RegQueryInfoKeyW;
+begin
+ GetProcedureAddress(_RegQueryInfoKeyW, advapi32, 'RegQueryInfoKeyW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RegQueryInfoKeyW]
+ end;
+end;
+
+var
+ _RegQueryInfoKey: Pointer;
+
+function RegQueryInfoKey;
+begin
+ GetProcedureAddress(_RegQueryInfoKey, advapi32, 'RegQueryInfoKey' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RegQueryInfoKey]
+ end;
+end;
+
+var
+ _RegQueryValueA: Pointer;
+
+function RegQueryValueA;
+begin
+ GetProcedureAddress(_RegQueryValueA, advapi32, 'RegQueryValueA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RegQueryValueA]
+ end;
+end;
+
+var
+ _RegQueryValueW: Pointer;
+
+function RegQueryValueW;
+begin
+ GetProcedureAddress(_RegQueryValueW, advapi32, 'RegQueryValueW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RegQueryValueW]
+ end;
+end;
+
+var
+ _RegQueryValue: Pointer;
+
+function RegQueryValue;
+begin
+ GetProcedureAddress(_RegQueryValue, advapi32, 'RegQueryValue' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RegQueryValue]
+ end;
+end;
+
+var
+ _RegQueryMultipleValuesA: Pointer;
+
+function RegQueryMultipleValuesA;
+begin
+ GetProcedureAddress(_RegQueryMultipleValuesA, advapi32, 'RegQueryMultipleValuesA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RegQueryMultipleValuesA]
+ end;
+end;
+
+var
+ _RegQueryMultipleValuesW: Pointer;
+
+function RegQueryMultipleValuesW;
+begin
+ GetProcedureAddress(_RegQueryMultipleValuesW, advapi32, 'RegQueryMultipleValuesW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RegQueryMultipleValuesW]
+ end;
+end;
+
+var
+ _RegQueryMultipleValues: Pointer;
+
+function RegQueryMultipleValues;
+begin
+ GetProcedureAddress(_RegQueryMultipleValues, advapi32, 'RegQueryMultipleValues' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RegQueryMultipleValues]
+ end;
+end;
+
+var
+ _RegQueryValueExA: Pointer;
+
+function RegQueryValueExA;
+begin
+ GetProcedureAddress(_RegQueryValueExA, advapi32, 'RegQueryValueExA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RegQueryValueExA]
+ end;
+end;
+
+var
+ _RegQueryValueExW: Pointer;
+
+function RegQueryValueExW;
+begin
+ GetProcedureAddress(_RegQueryValueExW, advapi32, 'RegQueryValueExW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RegQueryValueExW]
+ end;
+end;
+
+var
+ _RegQueryValueEx: Pointer;
+
+function RegQueryValueEx;
+begin
+ GetProcedureAddress(_RegQueryValueEx, advapi32, 'RegQueryValueEx' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RegQueryValueEx]
+ end;
+end;
+
+var
+ _RegReplaceKeyA: Pointer;
+
+function RegReplaceKeyA;
+begin
+ GetProcedureAddress(_RegReplaceKeyA, advapi32, 'RegReplaceKeyA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RegReplaceKeyA]
+ end;
+end;
+
+var
+ _RegReplaceKeyW: Pointer;
+
+function RegReplaceKeyW;
+begin
+ GetProcedureAddress(_RegReplaceKeyW, advapi32, 'RegReplaceKeyW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RegReplaceKeyW]
+ end;
+end;
+
+var
+ _RegReplaceKey: Pointer;
+
+function RegReplaceKey;
+begin
+ GetProcedureAddress(_RegReplaceKey, advapi32, 'RegReplaceKey' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RegReplaceKey]
+ end;
+end;
+
+var
+ _RegRestoreKeyA: Pointer;
+
+function RegRestoreKeyA;
+begin
+ GetProcedureAddress(_RegRestoreKeyA, advapi32, 'RegRestoreKeyA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RegRestoreKeyA]
+ end;
+end;
+
+var
+ _RegRestoreKeyW: Pointer;
+
+function RegRestoreKeyW;
+begin
+ GetProcedureAddress(_RegRestoreKeyW, advapi32, 'RegRestoreKeyW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RegRestoreKeyW]
+ end;
+end;
+
+var
+ _RegRestoreKey: Pointer;
+
+function RegRestoreKey;
+begin
+ GetProcedureAddress(_RegRestoreKey, advapi32, 'RegRestoreKey' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RegRestoreKey]
+ end;
+end;
+
+var
+ _RegSaveKeyA: Pointer;
+
+function RegSaveKeyA;
+begin
+ GetProcedureAddress(_RegSaveKeyA, advapi32, 'RegSaveKeyA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RegSaveKeyA]
+ end;
+end;
+
+var
+ _RegSaveKeyW: Pointer;
+
+function RegSaveKeyW;
+begin
+ GetProcedureAddress(_RegSaveKeyW, advapi32, 'RegSaveKeyW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RegSaveKeyW]
+ end;
+end;
+
+var
+ _RegSaveKey: Pointer;
+
+function RegSaveKey;
+begin
+ GetProcedureAddress(_RegSaveKey, advapi32, 'RegSaveKey' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RegSaveKey]
+ end;
+end;
+
+var
+ _RegSetKeySecurity: Pointer;
+
+function RegSetKeySecurity;
+begin
+ GetProcedureAddress(_RegSetKeySecurity, advapi32, 'RegSetKeySecurity');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RegSetKeySecurity]
+ end;
+end;
+
+var
+ _RegSetValueA: Pointer;
+
+function RegSetValueA;
+begin
+ GetProcedureAddress(_RegSetValueA, advapi32, 'RegSetValueA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RegSetValueA]
+ end;
+end;
+
+var
+ _RegSetValueW: Pointer;
+
+function RegSetValueW;
+begin
+ GetProcedureAddress(_RegSetValueW, advapi32, 'RegSetValueW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RegSetValueW]
+ end;
+end;
+
+var
+ _RegSetValue: Pointer;
+
+function RegSetValue;
+begin
+ GetProcedureAddress(_RegSetValue, advapi32, 'RegSetValue' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RegSetValue]
+ end;
+end;
+
+var
+ _RegSetValueExA: Pointer;
+
+function RegSetValueExA;
+begin
+ GetProcedureAddress(_RegSetValueExA, advapi32, 'RegSetValueExA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RegSetValueExA]
+ end;
+end;
+
+var
+ _RegSetValueExW: Pointer;
+
+function RegSetValueExW;
+begin
+ GetProcedureAddress(_RegSetValueExW, advapi32, 'RegSetValueExW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RegSetValueExW]
+ end;
+end;
+
+var
+ _RegSetValueEx: Pointer;
+
+function RegSetValueEx;
+begin
+ GetProcedureAddress(_RegSetValueEx, advapi32, 'RegSetValueEx' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RegSetValueEx]
+ end;
+end;
+
+var
+ _RegUnLoadKeyA: Pointer;
+
+function RegUnLoadKeyA;
+begin
+ GetProcedureAddress(_RegUnLoadKeyA, advapi32, 'RegUnLoadKeyA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RegUnLoadKeyA]
+ end;
+end;
+
+var
+ _RegUnLoadKeyW: Pointer;
+
+function RegUnLoadKeyW;
+begin
+ GetProcedureAddress(_RegUnLoadKeyW, advapi32, 'RegUnLoadKeyW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RegUnLoadKeyW]
+ end;
+end;
+
+var
+ _RegUnLoadKey: Pointer;
+
+function RegUnLoadKey;
+begin
+ GetProcedureAddress(_RegUnLoadKey, advapi32, 'RegUnLoadKey' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RegUnLoadKey]
+ end;
+end;
+
+var
+ _InitiateSystemShutdownA: Pointer;
+
+function InitiateSystemShutdownA;
+begin
+ GetProcedureAddress(_InitiateSystemShutdownA, advapi32, 'InitiateSystemShutdownA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_InitiateSystemShutdownA]
+ end;
+end;
+
+var
+ _InitiateSystemShutdownW: Pointer;
+
+function InitiateSystemShutdownW;
+begin
+ GetProcedureAddress(_InitiateSystemShutdownW, advapi32, 'InitiateSystemShutdownW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_InitiateSystemShutdownW]
+ end;
+end;
+
+var
+ _InitiateSystemShutdown: Pointer;
+
+function InitiateSystemShutdown;
+begin
+ GetProcedureAddress(_InitiateSystemShutdown, advapi32, 'InitiateSystemShutdown' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_InitiateSystemShutdown]
+ end;
+end;
+
+var
+ _AbortSystemShutdownA: Pointer;
+
+function AbortSystemShutdownA;
+begin
+ GetProcedureAddress(_AbortSystemShutdownA, advapi32, 'AbortSystemShutdownA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_AbortSystemShutdownA]
+ end;
+end;
+
+var
+ _AbortSystemShutdownW: Pointer;
+
+function AbortSystemShutdownW;
+begin
+ GetProcedureAddress(_AbortSystemShutdownW, advapi32, 'AbortSystemShutdownW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_AbortSystemShutdownW]
+ end;
+end;
+
+var
+ _AbortSystemShutdown: Pointer;
+
+function AbortSystemShutdown;
+begin
+ GetProcedureAddress(_AbortSystemShutdown, advapi32, 'AbortSystemShutdown' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_AbortSystemShutdown]
+ end;
+end;
+
+var
+ _InitiateSystemShutdownExA: Pointer;
+
+function InitiateSystemShutdownExA;
+begin
+ GetProcedureAddress(_InitiateSystemShutdownExA, advapi32, 'InitiateSystemShutdownExA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_InitiateSystemShutdownExA]
+ end;
+end;
+
+var
+ _InitiateSystemShutdownExW: Pointer;
+
+function InitiateSystemShutdownExW;
+begin
+ GetProcedureAddress(_InitiateSystemShutdownExW, advapi32, 'InitiateSystemShutdownExW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_InitiateSystemShutdownExW]
+ end;
+end;
+
+var
+ _InitiateSystemShutdownEx: Pointer;
+
+function InitiateSystemShutdownEx;
+begin
+ GetProcedureAddress(_InitiateSystemShutdownEx, advapi32, 'InitiateSystemShutdownEx' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_InitiateSystemShutdownEx]
+ end;
+end;
+
+var
+ _RegSaveKeyExA: Pointer;
+
+function RegSaveKeyExA;
+begin
+ GetProcedureAddress(_RegSaveKeyExA, advapi32, 'RegSaveKeyExA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RegSaveKeyExA]
+ end;
+end;
+
+var
+ _RegSaveKeyExW: Pointer;
+
+function RegSaveKeyExW;
+begin
+ GetProcedureAddress(_RegSaveKeyExW, advapi32, 'RegSaveKeyExW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RegSaveKeyExW]
+ end;
+end;
+
+var
+ _RegSaveKeyEx: Pointer;
+
+function RegSaveKeyEx;
+begin
+ GetProcedureAddress(_RegSaveKeyEx, advapi32, 'RegSaveKeyEx' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RegSaveKeyEx]
+ end;
+end;
+
+var
+ _Wow64Win32ApiEntry: Pointer;
+
+function Wow64Win32ApiEntry;
+begin
+ GetProcedureAddress(_Wow64Win32ApiEntry, advapi32, 'Wow64Win32ApiEntry');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_Wow64Win32ApiEntry]
+ end;
+end;
+
+{$ELSE}
+
+function RegCloseKey; external advapi32 name 'RegCloseKey';
+function RegOverridePredefKey; external advapi32 name 'RegOverridePredefKey';
+function RegOpenUserClassesRoot; external advapi32 name 'RegOpenUserClassesRoot';
+function RegOpenCurrentUser; external advapi32 name 'RegOpenCurrentUser';
+function RegDisablePredefinedCache; external advapi32 name 'RegDisablePredefinedCache';
+function RegConnectRegistryA; external advapi32 name 'RegConnectRegistryA';
+function RegConnectRegistryW; external advapi32 name 'RegConnectRegistryW';
+function RegConnectRegistry; external advapi32 name 'RegConnectRegistry' + AWSuffix;
+function RegCreateKeyA; external advapi32 name 'RegCreateKeyA';
+function RegCreateKeyW; external advapi32 name 'RegCreateKeyW';
+function RegCreateKey; external advapi32 name 'RegCreateKey' + AWSuffix;
+function RegCreateKeyExA; external advapi32 name 'RegCreateKeyExA';
+function RegCreateKeyExW; external advapi32 name 'RegCreateKeyExW';
+function RegCreateKeyEx; external advapi32 name 'RegCreateKeyEx' + AWSuffix;
+function RegDeleteKeyA; external advapi32 name 'RegDeleteKeyA';
+function RegDeleteKeyW; external advapi32 name 'RegDeleteKeyW';
+function RegDeleteKey; external advapi32 name 'RegDeleteKey' + AWSuffix;
+function RegDeleteValueA; external advapi32 name 'RegDeleteValueA';
+function RegDeleteValueW; external advapi32 name 'RegDeleteValueW';
+function RegDeleteValue; external advapi32 name 'RegDeleteValue' + AWSuffix;
+function RegEnumKeyA; external advapi32 name 'RegEnumKeyA';
+function RegEnumKeyW; external advapi32 name 'RegEnumKeyW';
+function RegEnumKey; external advapi32 name 'RegEnumKey' + AWSuffix;
+function RegEnumKeyExA; external advapi32 name 'RegEnumKeyExA';
+function RegEnumKeyExW; external advapi32 name 'RegEnumKeyExW';
+function RegEnumKeyEx; external advapi32 name 'RegEnumKeyEx' + AWSuffix;
+function RegEnumValueA; external advapi32 name 'RegEnumValueA';
+function RegEnumValueW; external advapi32 name 'RegEnumValueW';
+function RegEnumValue; external advapi32 name 'RegEnumValue' + AWSuffix;
+function RegFlushKey; external advapi32 name 'RegFlushKey';
+function RegGetKeySecurity; external advapi32 name 'RegGetKeySecurity';
+function RegLoadKeyA; external advapi32 name 'RegLoadKeyA';
+function RegLoadKeyW; external advapi32 name 'RegLoadKeyW';
+function RegLoadKey; external advapi32 name 'RegLoadKey' + AWSuffix;
+function RegOpenKeyA; external advapi32 name 'RegOpenKeyA';
+function RegOpenKeyW; external advapi32 name 'RegOpenKeyW';
+function RegOpenKey; external advapi32 name 'RegOpenKey' + AWSuffix;
+function RegOpenKeyExA; external advapi32 name 'RegOpenKeyExA';
+function RegOpenKeyExW; external advapi32 name 'RegOpenKeyExW';
+function RegOpenKeyEx; external advapi32 name 'RegOpenKeyEx' + AWSuffix;
+function RegQueryInfoKeyA; external advapi32 name 'RegQueryInfoKeyA';
+function RegQueryInfoKeyW; external advapi32 name 'RegQueryInfoKeyW';
+function RegQueryInfoKey; external advapi32 name 'RegQueryInfoKey' + AWSuffix;
+function RegQueryValueA; external advapi32 name 'RegQueryValueA';
+function RegQueryValueW; external advapi32 name 'RegQueryValueW';
+function RegQueryValue; external advapi32 name 'RegQueryValue' + AWSuffix;
+function RegQueryMultipleValuesA; external advapi32 name 'RegQueryMultipleValuesA';
+function RegQueryMultipleValuesW; external advapi32 name 'RegQueryMultipleValuesW';
+function RegQueryMultipleValues; external advapi32 name 'RegQueryMultipleValues' + AWSuffix;
+function RegQueryValueExA; external advapi32 name 'RegQueryValueExA';
+function RegQueryValueExW; external advapi32 name 'RegQueryValueExW';
+function RegQueryValueEx; external advapi32 name 'RegQueryValueEx' + AWSuffix;
+function RegReplaceKeyA; external advapi32 name 'RegReplaceKeyA';
+function RegReplaceKeyW; external advapi32 name 'RegReplaceKeyW';
+function RegReplaceKey; external advapi32 name 'RegReplaceKey' + AWSuffix;
+function RegRestoreKeyA; external advapi32 name 'RegRestoreKeyA';
+function RegRestoreKeyW; external advapi32 name 'RegRestoreKeyW';
+function RegRestoreKey; external advapi32 name 'RegRestoreKey' + AWSuffix;
+function RegSaveKeyA; external advapi32 name 'RegSaveKeyA';
+function RegSaveKeyW; external advapi32 name 'RegSaveKeyW';
+function RegSaveKey; external advapi32 name 'RegSaveKey' + AWSuffix;
+function RegSetKeySecurity; external advapi32 name 'RegSetKeySecurity';
+function RegSetValueA; external advapi32 name 'RegSetValueA';
+function RegSetValueW; external advapi32 name 'RegSetValueW';
+function RegSetValue; external advapi32 name 'RegSetValue' + AWSuffix;
+function RegSetValueExA; external advapi32 name 'RegSetValueExA';
+function RegSetValueExW; external advapi32 name 'RegSetValueExW';
+function RegSetValueEx; external advapi32 name 'RegSetValueEx' + AWSuffix;
+function RegUnLoadKeyA; external advapi32 name 'RegUnLoadKeyA';
+function RegUnLoadKeyW; external advapi32 name 'RegUnLoadKeyW';
+function RegUnLoadKey; external advapi32 name 'RegUnLoadKey' + AWSuffix;
+function InitiateSystemShutdownA; external advapi32 name 'InitiateSystemShutdownA';
+function InitiateSystemShutdownW; external advapi32 name 'InitiateSystemShutdownW';
+function InitiateSystemShutdown; external advapi32 name 'InitiateSystemShutdown' + AWSuffix;
+function AbortSystemShutdownA; external advapi32 name 'AbortSystemShutdownA';
+function AbortSystemShutdownW; external advapi32 name 'AbortSystemShutdownW';
+function AbortSystemShutdown; external advapi32 name 'AbortSystemShutdown' + AWSuffix;
+function InitiateSystemShutdownExA; external advapi32 name 'InitiateSystemShutdownExA';
+function InitiateSystemShutdownExW; external advapi32 name 'InitiateSystemShutdownExW';
+function InitiateSystemShutdownEx; external advapi32 name 'InitiateSystemShutdownEx' + AWSuffix;
+function RegSaveKeyExA; external advapi32 name 'RegSaveKeyExA';
+function RegSaveKeyExW; external advapi32 name 'RegSaveKeyExW';
+function RegSaveKeyEx; external advapi32 name 'RegSaveKeyEx' + AWSuffix;
+function Wow64Win32ApiEntry; external advapi32 name 'Wow64Win32ApiEntry';
+
+{$ENDIF DYNAMIC_LINK}
+
+end.
diff --git a/packages/extra/winunits/jwawinresrc.pas b/packages/extra/winunits/jwawinresrc.pas
index 16778aa6a6..f5bff11f96 100644
--- a/packages/extra/winunits/jwawinresrc.pas
+++ b/packages/extra/winunits/jwawinresrc.pas
@@ -1,74 +1,74 @@
-{******************************************************************************}
-{ }
-{ API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwawinresrc.pas,v 1.1 2005/04/04 07:56:11 marco Exp $
-
-unit JwaWinResrc;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "winresrc.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-const
- WINVER = $0500;
- {$EXTERNALSYM WINVER}
- _WIN32_IE = $0501;
- {$EXTERNALSYM _WIN32_IE}
- _WIN32_WINDOWS = $0410;
- {$EXTERNALSYM _WIN32_WINDOWS}
- _WIN32_WINNT = $0500;
- {$EXTERNALSYM _WIN32_WINNT}
-
-{
-#include <winuser.rh>
-#include <commctrl.rh>
-#include <dde.rh>
-#include <winnt.rh>
-#include <dlgs.h>
-#include <winver.h>
-}
-
-implementation
-
-end.
+{******************************************************************************}
+{ }
+{ API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwawinresrc.pas,v 1.1 2005/04/04 07:56:11 marco Exp $
+
+unit JwaWinResrc;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "winresrc.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+const
+ WINVER = $0500;
+ {$EXTERNALSYM WINVER}
+ _WIN32_IE = $0501;
+ {$EXTERNALSYM _WIN32_IE}
+ _WIN32_WINDOWS = $0410;
+ {$EXTERNALSYM _WIN32_WINDOWS}
+ _WIN32_WINNT = $0500;
+ {$EXTERNALSYM _WIN32_WINNT}
+
+{
+#include <winuser.rh>
+#include <commctrl.rh>
+#include <dde.rh>
+#include <winnt.rh>
+#include <dlgs.h>
+#include <winver.h>
+}
+
+implementation
+
+end.
diff --git a/packages/extra/winunits/jwawinsafer.pas b/packages/extra/winunits/jwawinsafer.pas
index 769a55015e..d1563e588f 100644
--- a/packages/extra/winunits/jwawinsafer.pas
+++ b/packages/extra/winunits/jwawinsafer.pas
@@ -1,703 +1,703 @@
-{******************************************************************************}
-{ }
-{ Windows Safer API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: winsafer.h, released Nov 2001. The original Pascal }
-{ code is: WinSafer.pas, released Februari 2002. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwawinsafer.pas,v 1.1 2005/04/04 07:56:11 marco Exp $
-
-unit JwaWinSafer;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "winsafer.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaWinCrypt, JwaWinType;
-
-//
-// Opaque datatype for representing handles to Safer objects.
-//
-
-type
- SAFER_LEVEL_HANDLE = HANDLE;
- {$EXTERNALSYM SAFER_LEVEL_HANDLE}
- PSAFER_LEVEL_HANDLE = ^SAFER_LEVEL_HANDLE;
- {$EXTERNALSYM PSAFER_LEVEL_HANDLE}
- TSaferLevelHandle = SAFER_LEVEL_HANDLE;
- PSaferLevelHandle = PSAFER_LEVEL_HANDLE;
-
-//
-// Constants to represent scope with SaferCreateLevel and others.
-//
-
-const
- SAFER_SCOPEID_MACHINE = 1;
- {$EXTERNALSYM SAFER_SCOPEID_MACHINE}
- SAFER_SCOPEID_USER = 2;
- {$EXTERNALSYM SAFER_SCOPEID_USER}
-
-//
-// Pre-defined levels that can be used with SaferCreateLevel
-//
-
- SAFER_LEVELID_FULLYTRUSTED = $40000;
- {$EXTERNALSYM SAFER_LEVELID_FULLYTRUSTED}
- SAFER_LEVELID_NORMALUSER = $20000;
- {$EXTERNALSYM SAFER_LEVELID_NORMALUSER}
- SAFER_LEVELID_CONSTRAINED = $10000;
- {$EXTERNALSYM SAFER_LEVELID_CONSTRAINED}
- SAFER_LEVELID_UNTRUSTED = $01000;
- {$EXTERNALSYM SAFER_LEVELID_UNTRUSTED}
- SAFER_LEVELID_DISALLOWED = $00000;
- {$EXTERNALSYM SAFER_LEVELID_DISALLOWED}
-
-//
-// Flags to use when creating/opening a Level with SaferCreateLevel
-//
-
- SAFER_LEVEL_OPEN = 1;
- {$EXTERNALSYM SAFER_LEVEL_OPEN}
-
-//
-// Maximum string size.
-//
-
- SAFER_MAX_FRIENDLYNAME_SIZE = 256;
- {$EXTERNALSYM SAFER_MAX_FRIENDLYNAME_SIZE}
- SAFER_MAX_DESCRIPTION_SIZE = 256;
- {$EXTERNALSYM SAFER_MAX_DESCRIPTION_SIZE}
- SAFER_MAX_HASH_SIZE = 64;
- {$EXTERNALSYM SAFER_MAX_HASH_SIZE}
-
-//
-// Flags to use with SaferComputeTokenFromLevel.
-//
-
- SAFER_TOKEN_NULL_IF_EQUAL = $00000001;
- {$EXTERNALSYM SAFER_TOKEN_NULL_IF_EQUAL}
- SAFER_TOKEN_COMPARE_ONLY = $00000002;
- {$EXTERNALSYM SAFER_TOKEN_COMPARE_ONLY}
- SAFER_TOKEN_MAKE_INERT = $00000004;
- {$EXTERNALSYM SAFER_TOKEN_MAKE_INERT}
- SAFER_TOKEN_WANT_FLAGS = $00000008;
- {$EXTERNALSYM SAFER_TOKEN_WANT_FLAGS}
-
-//
-// Flags for specifying what criteria within SAFER_CODE_PROPERTIES to evaluate
-// when finding code identity with SaferIdentifyLevel.
-//
-
- SAFER_CRITERIA_IMAGEPATH = $00001;
- {$EXTERNALSYM SAFER_CRITERIA_IMAGEPATH}
- SAFER_CRITERIA_NOSIGNEDHASH = $00002;
- {$EXTERNALSYM SAFER_CRITERIA_NOSIGNEDHASH}
- SAFER_CRITERIA_IMAGEHASH = $00004;
- {$EXTERNALSYM SAFER_CRITERIA_IMAGEHASH}
- SAFER_CRITERIA_AUTHENTICODE = $00008;
- {$EXTERNALSYM SAFER_CRITERIA_AUTHENTICODE}
- SAFER_CRITERIA_URLZONE = $00010;
- {$EXTERNALSYM SAFER_CRITERIA_URLZONE}
- SAFER_CRITERIA_IMAGEPATH_NT = $01000;
- {$EXTERNALSYM SAFER_CRITERIA_IMAGEPATH_NT}
-
-//
-// Code image information structure passed to SaferIdentifyLevel.
-//
-
-// #include <pshpack8.h> todo
-
-type
- _SAFER_CODE_PROPERTIES = record
- //
- // Must be initialized to be the size of this structure,
- // for the purposes of future/backwards compatibility.
- //
- cbSize: DWORD;
- //
- // Must be initialized to the types of criteria that should
- // be considered when evaluating this structure. This can be
- // a combination of the SAFER_CRITERIA_xxxx flags. If not enough
- // of the structure elements needed to evaluate the criteria
- // types indicated were supplied, then some of those criteria
- // flags may be silently ignored. Specifying 0 for this value
- // will cause the entire structure's contents to be ignored.
- //
- dwCheckFlags: DWORD;
- //
- // Optionally specifies the fully-qualified path and filename
- // to be used for discrimination checks based on the path.
- // The ImagePath will additionally be used to open and read the
- // file to identify any other discrimination criteria that was
- // unsupplied in this structure.
- //
- ImagePath: LPCWSTR;
- //
- // Optionally specifies a file handle that has been opened to
- // code image with at least GENERIC_READ access. The handle will
- // be used instead of explicitly opening the file again to compute
- // other discrimination criteria that was unsupplied in this structure.
- //
- hImageFileHandle: HANDLE;
- //
- // Optionally specifies the pre-determined Internet Explorer
- // security zone. These enums are defined within urlmon.h
- // For example: URLZONE_LOCAL_MACHINE, URLZONE_INTRANET,
- // URLZONE_TRUSTED, URLZONE_INTERNET, or URLZONE_UNTRUSTED.
- //
- UrlZoneId: DWORD;
- //
- // Optionally specifies the pre-computed hash of the image.
- // The supplied hash is interpreted as being valid if ImageSize
- // is non-zero and dwImageHashSize is non-zero and HashAlgorithm
- // represents a valid hashing algorithm from wincrypt.h
- //
- // If the supplied hash fails to meet the conditions above, then
- // the hash will be automatically computed against:
- // 1) by using ImageSize and pByteBlock if both are non-zero.
- // 2) by using hImageFileHandle if it is non-null.
- // 3) by attempting to open ImagePath if it is non-null.
- //
- ImageHash: array [0..SAFER_MAX_HASH_SIZE - 1] of BYTE;
- dwImageHashSize: DWORD;
- ImageSize: LARGE_INTEGER;
- HashAlgorithm: ALG_ID;
- //
- // Optionally specifies a memory block of memory representing
- // the image for which the trust is being requested for. When
- // this member is specified, ImageSize must also be supplied.
- //
- pByteBlock: LPBYTE;
- //
- // Optionally gives the arguments used for Authenticode signer
- // certificate verification. These arguments are supplied to the
- // WinVerifyTrust() API and control the user-interface prompting
- // to accept untrusted certificates.
- //
- hWndParent: HWND;
- dwWVTUIChoice: DWORD;
- end;
- {$EXTERNALSYM _SAFER_CODE_PROPERTIES}
- SAFER_CODE_PROPERTIES = _SAFER_CODE_PROPERTIES;
- {$EXTERNALSYM SAFER_CODE_PROPERTIES}
- PSAFER_CODE_PROPERTIES = ^SAFER_CODE_PROPERTIES;
- {$EXTERNALSYM PSAFER_CODE_PROPERTIES}
- TSaferCodeProperties = SAFER_CODE_PROPERTIES;
- PSaferCodeProperties = PSAFER_CODE_PROPERTIES;
-
-// #include <poppack.h>
-
-//
-// Masks for the per-identity WinSafer flags
-//
-
-const
- SAFER_POLICY_JOBID_MASK = DWORD($FF000000);
- {$EXTERNALSYM SAFER_POLICY_JOBID_MASK}
- SAFER_POLICY_JOBID_CONSTRAINED = $04000000;
- {$EXTERNALSYM SAFER_POLICY_JOBID_CONSTRAINED}
- SAFER_POLICY_JOBID_UNTRUSTED = $03000000;
- {$EXTERNALSYM SAFER_POLICY_JOBID_UNTRUSTED}
- SAFER_POLICY_ONLY_EXES = $00010000;
- {$EXTERNALSYM SAFER_POLICY_ONLY_EXES}
- SAFER_POLICY_SANDBOX_INERT = $00020000;
- {$EXTERNALSYM SAFER_POLICY_SANDBOX_INERT}
- SAFER_POLICY_UIFLAGS_MASK = $000000FF;
- {$EXTERNALSYM SAFER_POLICY_UIFLAGS_MASK}
- SAFER_POLICY_UIFLAGS_INFORMATION_PROMPT = $00000001;
- {$EXTERNALSYM SAFER_POLICY_UIFLAGS_INFORMATION_PROMPT}
- SAFER_POLICY_UIFLAGS_OPTION_PROMPT = $00000002;
- {$EXTERNALSYM SAFER_POLICY_UIFLAGS_OPTION_PROMPT}
-
-//
-// Information classes on the overall policy that can be queried
-// with SaferSet/GetPolicyInformation and set at different
-// policy scopes based on access of the caller.
-//
-
-type
- _SAFER_POLICY_INFO_CLASS = (
-
- spicFiller0,
-
- //
- // Accesses the list of all Levels defined in a policy.
- // The corresponding data element is a buffer that is filled
- // with multiple DWORDs, each representing the LevelIds that
- // are defined within this scope.
- //
-
- SaferPolicyLevelList,
-
- //
- // for transparent enforcement of policy in the execution
- // framework -- will be used by native code execution but can
- // be used by any policy enforcement environment.
- // Corresponding data element is a DWORD holding a Boolean value.
- //
-
- SaferPolicyEnableTransparentEnforcement,
-
- //
- // Returns the name of the Level that has been designed
- // as the default level within the specified scope.
- // The corresponding data element is a single DWORD buffer
- // representing the LevelId of the default Level. If no
- // level has been configured to be the default, then the
- // GetInfo API will return FALSE and GetLastError will
- // return ERROR_NOT_FOUND.
- //
-
- SaferPolicyDefaultLevel,
-
- //
- // Returns whether Code Identities or Default Level within the
- // user scope can be considered during identification.
- //
-
- SaferPolicyEvaluateUserScope,
-
- //
- // Control Flags for for safer policy scope.
- //
-
- SaferPolicyScopeFlags);
- {$EXTERNALSYM _SAFER_POLICY_INFO_CLASS}
- SAFER_POLICY_INFO_CLASS = _SAFER_POLICY_INFO_CLASS;
- {$EXTERNALSYM SAFER_POLICY_INFO_CLASS}
- TSaferPolicyInfoClass = SAFER_POLICY_INFO_CLASS;
-
-//
-// Enumerations used for retrieving specific information about a
-// single authorization Level via SaferGet/SetInformationFromLevel.
-//
-
- _SAFER_OBJECT_INFO_CLASS = (
- soicFillter0,
- SaferObjectLevelId, // get: DWORD
- SaferObjectScopeId, // get: DWORD
- SaferObjectFriendlyName, // get/set: LPCWSTR
- SaferObjectDescription, // get/set: LPCWSTR
- SaferObjectBuiltin, // get: DWORD boolean
- SaferObjectDisallowed, // get: DWORD boolean
- SaferObjectDisableMaxPrivilege, // get: DWORD boolean
- SaferObjectInvertDeletedPrivileges, // get: DWORD boolean
- SaferObjectDeletedPrivileges, // get: TOKEN_PRIVILEGES
- SaferObjectDefaultOwner, // get: TOKEN_OWNER
- SaferObjectSidsToDisable, // get: TOKEN_GROUPS
- SaferObjectRestrictedSidsInverted, // get: TOKEN_GROUPS
- SaferObjectRestrictedSidsAdded, // get: TOKEN_GROUPS
-
- //
- // To enumerate all identities, call GetInfo with
- // SaferObjectAllIdentificationGuids.
- //
-
- SaferObjectAllIdentificationGuids, // get: SAFER_IDENTIFICATION_GUIDS
-
- //
- // To create a new identity, call SetInfo with
- // SaferObjectSingleIdentification with a new
- // unique GUID that you have generated.
- // To get details on a single identity, call GetInfo with
- // SaferObjectSingleIdentification with desired GUID.
- // To modify details of a single identity, call SetInfo with
- // SaferObjectSingleIdentification with desired info and GUID.
- // To delete an identity, call SetInfo with
- // SaferObjectSingleIdentification with the
- // header.dwIdentificationType set to 0.
- //
-
- SaferObjectSingleIdentification, // get/set: SAFER_IDENTIFICATION_*
-
- SaferObjectExtendedError); // get: DWORD dwError
- {$EXTERNALSYM _SAFER_OBJECT_INFO_CLASS}
- SAFER_OBJECT_INFO_CLASS = _SAFER_OBJECT_INFO_CLASS;
- {$EXTERNALSYM SAFER_OBJECT_INFO_CLASS}
- TSaferObjectInfoClass = SAFER_OBJECT_INFO_CLASS;
-
-//
-// Structures and enums used by the SaferGet/SetLevelInformation APIs.
-//
-
-// #include <pshpack8.h> todo
-
- _SAFER_IDENTIFICATION_TYPES = (
- SaferIdentityDefault,
- SaferIdentityTypeImageName,
- SaferIdentityTypeImageHash,
- SaferIdentityTypeUrlZone,
- SaferIdentityTypeCertificate);
- {$EXTERNALSYM _SAFER_IDENTIFICATION_TYPES}
- SAFER_IDENTIFICATION_TYPES = _SAFER_IDENTIFICATION_TYPES;
- {$EXTERNALSYM SAFER_IDENTIFICATION_TYPES}
- TSaferIdentificationTypes = SAFER_IDENTIFICATION_TYPES;
-
- _SAFER_IDENTIFICATION_HEADER = record
- //
- // indicates the type of the structure, one of SaferIdentityType*
- //
- dwIdentificationType: SAFER_IDENTIFICATION_TYPES;
- //
- // size of the whole structure, not just the common header.
- //
- cbStructSize: DWORD;
- //
- // the unique GUID of the Identity in question.
- //
- IdentificationGuid: GUID;
- //
- // last change of this identification.
- //
- lastModified: FILETIME;
- end;
- {$EXTERNALSYM _SAFER_IDENTIFICATION_HEADER}
- SAFER_IDENTIFICATION_HEADER = _SAFER_IDENTIFICATION_HEADER;
- {$EXTERNALSYM SAFER_IDENTIFICATION_HEADER}
- PSAFER_IDENTIFICATION_HEADER = ^SAFER_IDENTIFICATION_HEADER;
- {$EXTERNALSYM PSAFER_IDENTIFICATION_HEADER}
- TSaferIdentificationHeader = SAFER_IDENTIFICATION_HEADER;
- PSaferIdentificationHeader = PSAFER_IDENTIFICATION_HEADER;
-
- _SAFER_PATHNAME_IDENTIFICATION = record
- //
- // header.dwIdentificationType must be SaferIdentityTypeImageName
- // header.cbStructSize must be sizeof(SAFER_PATHNAME_IDENTIFICATION)
- //
- header: SAFER_IDENTIFICATION_HEADER;
- //
- // user-entered description
- //
- Description: array [0..SAFER_MAX_DESCRIPTION_SIZE - 1] of WCHAR;
- //
- // filepath or name, possibly with vars
- //
- ImageName: PWCHAR;
- //
- // any combo of SAFER_POL_SAFERFLAGS_*
- //
- dwSaferFlags: DWORD;
- end;
- {$EXTERNALSYM _SAFER_PATHNAME_IDENTIFICATION}
- SAFER_PATHNAME_IDENTIFICATION = _SAFER_PATHNAME_IDENTIFICATION;
- {$EXTERNALSYM SAFER_PATHNAME_IDENTIFICATION}
- PSAFER_PATHNAME_IDENTIFICATION = ^SAFER_PATHNAME_IDENTIFICATION;
- {$EXTERNALSYM PSAFER_PATHNAME_IDENTIFICATION}
- TSaferPathNameIdentification = SAFER_PATHNAME_IDENTIFICATION;
- PSaferPathNameIdentification = PSAFER_PATHNAME_IDENTIFICATION;
-
- _SAFER_HASH_IDENTIFICATION = record
- //
- // header.dwIdentificationType must be SaferIdentityTypeImageHash
- // header.cbStructSize must be sizeof(SAFER_HASH_IDENTIFICATION)
- //
- header: SAFER_IDENTIFICATION_HEADER;
- //
- // user-entered friendly name, initially from file's resources.
- //
- Description: array [0..SAFER_MAX_DESCRIPTION_SIZE - 1] of WCHAR;
- //
- // user-entered description.
- //
- FriendlyName: array [0..SAFER_MAX_FRIENDLYNAME_SIZE - 1] of WCHAR;
- //
- // amount of ImageHash actually used, in bytes (MD5 is 16 bytes).
- //
- HashSize: DWORD;
- //
- // computed hash data itself.
- //
- ImageHash: array [0..SAFER_MAX_HASH_SIZE - 1] of BYTE;
- //
- // algorithm in which the hash was computed (CALG_MD5, etc).
- //
- HashAlgorithm: ALG_ID;
- //
- // size of the original file in bytes.
- //
- ImageSize: LARGE_INTEGER;
- //
- // any combo of SAFER_POL_SAFERFLAGS_*
- //
- dwSaferFlags: DWORD;
- end;
- {$EXTERNALSYM _SAFER_HASH_IDENTIFICATION}
- SAFER_HASH_IDENTIFICATION = _SAFER_HASH_IDENTIFICATION;
- {$EXTERNALSYM SAFER_HASH_IDENTIFICATION}
- PSAFER_HASH_IDENTIFICATION = ^SAFER_HASH_IDENTIFICATION;
- {$EXTERNALSYM PSAFER_HASH_IDENTIFICATION}
- TSaferHashIdentification = SAFER_HASH_IDENTIFICATION;
- PSaferHashIdentification = PSAFER_HASH_IDENTIFICATION;
-
- _SAFER_URLZONE_IDENTIFICATION = record
- //
- // header.dwIdentificationType must be SaferIdentityTypeUrlZone
- // header.cbStructSize must be sizeof(SAFER_URLZONE_IDENTIFICATION)
- //
- header: SAFER_IDENTIFICATION_HEADER;
- //
- // any single URLZONE_* from urlmon.h
- //
- UrlZoneId: DWORD;
- //
- // any combo of SAFER_POLICY_*
- //
- dwSaferFlags: DWORD;
- end;
- {$EXTERNALSYM _SAFER_URLZONE_IDENTIFICATION}
- SAFER_URLZONE_IDENTIFICATION = _SAFER_URLZONE_IDENTIFICATION;
- {$EXTERNALSYM SAFER_URLZONE_IDENTIFICATION}
- PSAFER_URLZONE_IDENTIFICATION = ^SAFER_URLZONE_IDENTIFICATION;
- {$EXTERNALSYM PSAFER_URLZONE_IDENTIFICATION}
- TSaferUrlZoneIdentification = SAFER_URLZONE_IDENTIFICATION;
- PSaferUrlZoneIdentification = PSAFER_URLZONE_IDENTIFICATION;
-
-// #include <poppack.h>
-
-//
-// Functions related to querying and setting the global policy
-// controls to disable transparent enforcement, and perform level
-// enumeration operations.
-//
-
-function SaferGetPolicyInformation(dwScopeId: DWORD; SaferPolicyInfoClass: SAFER_POLICY_INFO_CLASS;
- InfoBufferSize: DWORD; InfoBuffer: PVOID; var InfoBufferRetSize: DWORD; lpReserved: LPVOID): BOOL; stdcall;
-{$EXTERNALSYM SaferGetPolicyInformation}
-
-function SaferSetPolicyInformation(dwScopeId: DWORD; SaferPolicyInfoClass: SAFER_POLICY_INFO_CLASS;
- InfoBufferSize: DWORD; InfoBuffer: PVOID; lpReserved: LPVOID): BOOL; stdcall;
-{$EXTERNALSYM SaferSetPolicyInformation}
-
-//
-// Functions to open or close a handle to a Safer Level.
-//
-
-function SaferCreateLevel(dwScopeId, dwLevelId, OpenFlags: DWORD; pLevelHandle: PSAFER_LEVEL_HANDLE; lpReserved: LPVOID): BOOL; stdcall;
-{$EXTERNALSYM SaferCreateLevel}
-
-function SaferCloseLevel(hLevelHandle: SAFER_LEVEL_HANDLE): BOOL; stdcall;
-{$EXTERNALSYM SaferCloseLevel}
-
-function SaferIdentifyLevel(dwNumProperties: DWORD; pCodeProperties: PSAFER_CODE_PROPERTIES;
- var pLevelHandle: SAFER_LEVEL_HANDLE; lpReserved: LPVOID): BOOL; stdcall;
-{$EXTERNALSYM SaferIdentifyLevel}
-
-function SaferComputeTokenFromLevel(LevelHandle: SAFER_LEVEL_HANDLE; InAccessToken: HANDLE; OutAccessToken: PHANDLE;
- dwFlags: DWORD; lpReserved: LPVOID): BOOL; stdcall;
-{$EXTERNALSYM SaferComputeTokenFromLevel}
-
-function SaferGetLevelInformation(LevelHandle: SAFER_LEVEL_HANDLE; dwInfoType: SAFER_OBJECT_INFO_CLASS;
- lpQueryBuffer: LPVOID; dwInBufferSize: DWORD; var lpdwOutBufferSize: DWORD): BOOL; stdcall;
-{$EXTERNALSYM SaferGetLevelInformation}
-
-function SaferSetLevelInformation(LevelHandle: SAFER_LEVEL_HANDLE; dwInfoType: SAFER_OBJECT_INFO_CLASS;
- lpQueryBuffer: LPVOID; dwInBufferSize: DWORD): BOOL; stdcall;
-{$EXTERNALSYM SaferSetLevelInformation}
-
-//
-// This function performs logging of messages to the Application
-// event log. This is called by the hooks within CreateProcess,
-// ShellExecute and cmd when a lower trust evaluation result occurs.
-//
-
-function SaferRecordEventLogEntry(hLevel: SAFER_LEVEL_HANDLE; szTargetPath: LPCWSTR; lpReserved: LPVOID): BOOL; stdcall;
-{$EXTERNALSYM SaferRecordEventLogEntry}
-
-function SaferiIsExecutableFileType(szFullPathname: LPCWSTR; bFromShellExecute: BOOL): BOOL; stdcall;
-{$EXTERNALSYM SaferiIsExecutableFileType}
-
-implementation
-
-const
- advapi32 = 'advapi32.dll';
-
-{$IFDEF DYNAMIC_LINK}
-
-var
- _SaferGetPolicyInformation: Pointer;
-
-function SaferGetPolicyInformation;
-begin
- GetProcedureAddress(_SaferGetPolicyInformation, advapi32, 'SaferGetPolicyInformation');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SaferGetPolicyInformation]
- end;
-end;
-
-var
- _SaferSetPolicyInformation: Pointer;
-
-function SaferSetPolicyInformation;
-begin
- GetProcedureAddress(_SaferSetPolicyInformation, advapi32, 'SaferSetPolicyInformation');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SaferSetPolicyInformation]
- end;
-end;
-
-var
- _SaferCreateLevel: Pointer;
-
-function SaferCreateLevel;
-begin
- GetProcedureAddress(_SaferCreateLevel, advapi32, 'SaferCreateLevel');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SaferCreateLevel]
- end;
-end;
-
-var
- _SaferCloseLevel: Pointer;
-
-function SaferCloseLevel;
-begin
- GetProcedureAddress(_SaferCloseLevel, advapi32, 'SaferCloseLevel');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SaferCloseLevel]
- end;
-end;
-
-var
- _SaferIdentifyLevel: Pointer;
-
-function SaferIdentifyLevel;
-begin
- GetProcedureAddress(_SaferIdentifyLevel, advapi32, 'SaferIdentifyLevel');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SaferIdentifyLevel]
- end;
-end;
-
-var
- _SaferComputeTokenFromLevel: Pointer;
-
-function SaferComputeTokenFromLevel;
-begin
- GetProcedureAddress(_SaferComputeTokenFromLevel, advapi32, 'SaferComputeTokenFromLevel');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SaferComputeTokenFromLevel]
- end;
-end;
-
-var
- _SaferGetLevelInformation: Pointer;
-
-function SaferGetLevelInformation;
-begin
- GetProcedureAddress(_SaferGetLevelInformation, advapi32, 'SaferGetLevelInformation');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SaferGetLevelInformation]
- end;
-end;
-
-var
- _SaferSetLevelInformation: Pointer;
-
-function SaferSetLevelInformation;
-begin
- GetProcedureAddress(_SaferSetLevelInformation, advapi32, 'SaferSetLevelInformation');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SaferSetLevelInformation]
- end;
-end;
-
-var
- _SaferRecordEventLogEntry: Pointer;
-
-function SaferRecordEventLogEntry;
-begin
- GetProcedureAddress(_SaferRecordEventLogEntry, advapi32, 'SaferRecordEventLogEntry');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SaferRecordEventLogEntry]
- end;
-end;
-
-var
- _SaferiIsExecutableFileType: Pointer;
-
-function SaferiIsExecutableFileType;
-begin
- GetProcedureAddress(_SaferiIsExecutableFileType, advapi32, 'SaferiIsExecutableFileType');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SaferiIsExecutableFileType]
- end;
-end;
-
-{$ELSE}
-
-function SaferGetPolicyInformation; external advapi32 name 'SaferGetPolicyInformation';
-function SaferSetPolicyInformation; external advapi32 name 'SaferSetPolicyInformation';
-function SaferCreateLevel; external advapi32 name 'SaferCreateLevel';
-function SaferCloseLevel; external advapi32 name 'SaferCloseLevel';
-function SaferIdentifyLevel; external advapi32 name 'SaferIdentifyLevel';
-function SaferComputeTokenFromLevel; external advapi32 name 'SaferComputeTokenFromLevel';
-function SaferGetLevelInformation; external advapi32 name 'SaferGetLevelInformation';
-function SaferSetLevelInformation; external advapi32 name 'SaferSetLevelInformation';
-function SaferRecordEventLogEntry; external advapi32 name 'SaferRecordEventLogEntry';
-function SaferiIsExecutableFileType; external advapi32 name 'SaferiIsExecutableFileType';
-
-{$ENDIF DYNAMIC_LINK}
-
-end.
+{******************************************************************************}
+{ }
+{ Windows Safer API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: winsafer.h, released Nov 2001. The original Pascal }
+{ code is: WinSafer.pas, released Februari 2002. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwawinsafer.pas,v 1.1 2005/04/04 07:56:11 marco Exp $
+
+unit JwaWinSafer;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "winsafer.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaWinCrypt, JwaWinType;
+
+//
+// Opaque datatype for representing handles to Safer objects.
+//
+
+type
+ SAFER_LEVEL_HANDLE = HANDLE;
+ {$EXTERNALSYM SAFER_LEVEL_HANDLE}
+ PSAFER_LEVEL_HANDLE = ^SAFER_LEVEL_HANDLE;
+ {$EXTERNALSYM PSAFER_LEVEL_HANDLE}
+ TSaferLevelHandle = SAFER_LEVEL_HANDLE;
+ PSaferLevelHandle = PSAFER_LEVEL_HANDLE;
+
+//
+// Constants to represent scope with SaferCreateLevel and others.
+//
+
+const
+ SAFER_SCOPEID_MACHINE = 1;
+ {$EXTERNALSYM SAFER_SCOPEID_MACHINE}
+ SAFER_SCOPEID_USER = 2;
+ {$EXTERNALSYM SAFER_SCOPEID_USER}
+
+//
+// Pre-defined levels that can be used with SaferCreateLevel
+//
+
+ SAFER_LEVELID_FULLYTRUSTED = $40000;
+ {$EXTERNALSYM SAFER_LEVELID_FULLYTRUSTED}
+ SAFER_LEVELID_NORMALUSER = $20000;
+ {$EXTERNALSYM SAFER_LEVELID_NORMALUSER}
+ SAFER_LEVELID_CONSTRAINED = $10000;
+ {$EXTERNALSYM SAFER_LEVELID_CONSTRAINED}
+ SAFER_LEVELID_UNTRUSTED = $01000;
+ {$EXTERNALSYM SAFER_LEVELID_UNTRUSTED}
+ SAFER_LEVELID_DISALLOWED = $00000;
+ {$EXTERNALSYM SAFER_LEVELID_DISALLOWED}
+
+//
+// Flags to use when creating/opening a Level with SaferCreateLevel
+//
+
+ SAFER_LEVEL_OPEN = 1;
+ {$EXTERNALSYM SAFER_LEVEL_OPEN}
+
+//
+// Maximum string size.
+//
+
+ SAFER_MAX_FRIENDLYNAME_SIZE = 256;
+ {$EXTERNALSYM SAFER_MAX_FRIENDLYNAME_SIZE}
+ SAFER_MAX_DESCRIPTION_SIZE = 256;
+ {$EXTERNALSYM SAFER_MAX_DESCRIPTION_SIZE}
+ SAFER_MAX_HASH_SIZE = 64;
+ {$EXTERNALSYM SAFER_MAX_HASH_SIZE}
+
+//
+// Flags to use with SaferComputeTokenFromLevel.
+//
+
+ SAFER_TOKEN_NULL_IF_EQUAL = $00000001;
+ {$EXTERNALSYM SAFER_TOKEN_NULL_IF_EQUAL}
+ SAFER_TOKEN_COMPARE_ONLY = $00000002;
+ {$EXTERNALSYM SAFER_TOKEN_COMPARE_ONLY}
+ SAFER_TOKEN_MAKE_INERT = $00000004;
+ {$EXTERNALSYM SAFER_TOKEN_MAKE_INERT}
+ SAFER_TOKEN_WANT_FLAGS = $00000008;
+ {$EXTERNALSYM SAFER_TOKEN_WANT_FLAGS}
+
+//
+// Flags for specifying what criteria within SAFER_CODE_PROPERTIES to evaluate
+// when finding code identity with SaferIdentifyLevel.
+//
+
+ SAFER_CRITERIA_IMAGEPATH = $00001;
+ {$EXTERNALSYM SAFER_CRITERIA_IMAGEPATH}
+ SAFER_CRITERIA_NOSIGNEDHASH = $00002;
+ {$EXTERNALSYM SAFER_CRITERIA_NOSIGNEDHASH}
+ SAFER_CRITERIA_IMAGEHASH = $00004;
+ {$EXTERNALSYM SAFER_CRITERIA_IMAGEHASH}
+ SAFER_CRITERIA_AUTHENTICODE = $00008;
+ {$EXTERNALSYM SAFER_CRITERIA_AUTHENTICODE}
+ SAFER_CRITERIA_URLZONE = $00010;
+ {$EXTERNALSYM SAFER_CRITERIA_URLZONE}
+ SAFER_CRITERIA_IMAGEPATH_NT = $01000;
+ {$EXTERNALSYM SAFER_CRITERIA_IMAGEPATH_NT}
+
+//
+// Code image information structure passed to SaferIdentifyLevel.
+//
+
+// #include <pshpack8.h> todo
+
+type
+ _SAFER_CODE_PROPERTIES = record
+ //
+ // Must be initialized to be the size of this structure,
+ // for the purposes of future/backwards compatibility.
+ //
+ cbSize: DWORD;
+ //
+ // Must be initialized to the types of criteria that should
+ // be considered when evaluating this structure. This can be
+ // a combination of the SAFER_CRITERIA_xxxx flags. If not enough
+ // of the structure elements needed to evaluate the criteria
+ // types indicated were supplied, then some of those criteria
+ // flags may be silently ignored. Specifying 0 for this value
+ // will cause the entire structure's contents to be ignored.
+ //
+ dwCheckFlags: DWORD;
+ //
+ // Optionally specifies the fully-qualified path and filename
+ // to be used for discrimination checks based on the path.
+ // The ImagePath will additionally be used to open and read the
+ // file to identify any other discrimination criteria that was
+ // unsupplied in this structure.
+ //
+ ImagePath: LPCWSTR;
+ //
+ // Optionally specifies a file handle that has been opened to
+ // code image with at least GENERIC_READ access. The handle will
+ // be used instead of explicitly opening the file again to compute
+ // other discrimination criteria that was unsupplied in this structure.
+ //
+ hImageFileHandle: HANDLE;
+ //
+ // Optionally specifies the pre-determined Internet Explorer
+ // security zone. These enums are defined within urlmon.h
+ // For example: URLZONE_LOCAL_MACHINE, URLZONE_INTRANET,
+ // URLZONE_TRUSTED, URLZONE_INTERNET, or URLZONE_UNTRUSTED.
+ //
+ UrlZoneId: DWORD;
+ //
+ // Optionally specifies the pre-computed hash of the image.
+ // The supplied hash is interpreted as being valid if ImageSize
+ // is non-zero and dwImageHashSize is non-zero and HashAlgorithm
+ // represents a valid hashing algorithm from wincrypt.h
+ //
+ // If the supplied hash fails to meet the conditions above, then
+ // the hash will be automatically computed against:
+ // 1) by using ImageSize and pByteBlock if both are non-zero.
+ // 2) by using hImageFileHandle if it is non-null.
+ // 3) by attempting to open ImagePath if it is non-null.
+ //
+ ImageHash: array [0..SAFER_MAX_HASH_SIZE - 1] of BYTE;
+ dwImageHashSize: DWORD;
+ ImageSize: LARGE_INTEGER;
+ HashAlgorithm: ALG_ID;
+ //
+ // Optionally specifies a memory block of memory representing
+ // the image for which the trust is being requested for. When
+ // this member is specified, ImageSize must also be supplied.
+ //
+ pByteBlock: LPBYTE;
+ //
+ // Optionally gives the arguments used for Authenticode signer
+ // certificate verification. These arguments are supplied to the
+ // WinVerifyTrust() API and control the user-interface prompting
+ // to accept untrusted certificates.
+ //
+ hWndParent: HWND;
+ dwWVTUIChoice: DWORD;
+ end;
+ {$EXTERNALSYM _SAFER_CODE_PROPERTIES}
+ SAFER_CODE_PROPERTIES = _SAFER_CODE_PROPERTIES;
+ {$EXTERNALSYM SAFER_CODE_PROPERTIES}
+ PSAFER_CODE_PROPERTIES = ^SAFER_CODE_PROPERTIES;
+ {$EXTERNALSYM PSAFER_CODE_PROPERTIES}
+ TSaferCodeProperties = SAFER_CODE_PROPERTIES;
+ PSaferCodeProperties = PSAFER_CODE_PROPERTIES;
+
+// #include <poppack.h>
+
+//
+// Masks for the per-identity WinSafer flags
+//
+
+const
+ SAFER_POLICY_JOBID_MASK = DWORD($FF000000);
+ {$EXTERNALSYM SAFER_POLICY_JOBID_MASK}
+ SAFER_POLICY_JOBID_CONSTRAINED = $04000000;
+ {$EXTERNALSYM SAFER_POLICY_JOBID_CONSTRAINED}
+ SAFER_POLICY_JOBID_UNTRUSTED = $03000000;
+ {$EXTERNALSYM SAFER_POLICY_JOBID_UNTRUSTED}
+ SAFER_POLICY_ONLY_EXES = $00010000;
+ {$EXTERNALSYM SAFER_POLICY_ONLY_EXES}
+ SAFER_POLICY_SANDBOX_INERT = $00020000;
+ {$EXTERNALSYM SAFER_POLICY_SANDBOX_INERT}
+ SAFER_POLICY_UIFLAGS_MASK = $000000FF;
+ {$EXTERNALSYM SAFER_POLICY_UIFLAGS_MASK}
+ SAFER_POLICY_UIFLAGS_INFORMATION_PROMPT = $00000001;
+ {$EXTERNALSYM SAFER_POLICY_UIFLAGS_INFORMATION_PROMPT}
+ SAFER_POLICY_UIFLAGS_OPTION_PROMPT = $00000002;
+ {$EXTERNALSYM SAFER_POLICY_UIFLAGS_OPTION_PROMPT}
+
+//
+// Information classes on the overall policy that can be queried
+// with SaferSet/GetPolicyInformation and set at different
+// policy scopes based on access of the caller.
+//
+
+type
+ _SAFER_POLICY_INFO_CLASS = (
+
+ spicFiller0,
+
+ //
+ // Accesses the list of all Levels defined in a policy.
+ // The corresponding data element is a buffer that is filled
+ // with multiple DWORDs, each representing the LevelIds that
+ // are defined within this scope.
+ //
+
+ SaferPolicyLevelList,
+
+ //
+ // for transparent enforcement of policy in the execution
+ // framework -- will be used by native code execution but can
+ // be used by any policy enforcement environment.
+ // Corresponding data element is a DWORD holding a Boolean value.
+ //
+
+ SaferPolicyEnableTransparentEnforcement,
+
+ //
+ // Returns the name of the Level that has been designed
+ // as the default level within the specified scope.
+ // The corresponding data element is a single DWORD buffer
+ // representing the LevelId of the default Level. If no
+ // level has been configured to be the default, then the
+ // GetInfo API will return FALSE and GetLastError will
+ // return ERROR_NOT_FOUND.
+ //
+
+ SaferPolicyDefaultLevel,
+
+ //
+ // Returns whether Code Identities or Default Level within the
+ // user scope can be considered during identification.
+ //
+
+ SaferPolicyEvaluateUserScope,
+
+ //
+ // Control Flags for for safer policy scope.
+ //
+
+ SaferPolicyScopeFlags);
+ {$EXTERNALSYM _SAFER_POLICY_INFO_CLASS}
+ SAFER_POLICY_INFO_CLASS = _SAFER_POLICY_INFO_CLASS;
+ {$EXTERNALSYM SAFER_POLICY_INFO_CLASS}
+ TSaferPolicyInfoClass = SAFER_POLICY_INFO_CLASS;
+
+//
+// Enumerations used for retrieving specific information about a
+// single authorization Level via SaferGet/SetInformationFromLevel.
+//
+
+ _SAFER_OBJECT_INFO_CLASS = (
+ soicFillter0,
+ SaferObjectLevelId, // get: DWORD
+ SaferObjectScopeId, // get: DWORD
+ SaferObjectFriendlyName, // get/set: LPCWSTR
+ SaferObjectDescription, // get/set: LPCWSTR
+ SaferObjectBuiltin, // get: DWORD boolean
+ SaferObjectDisallowed, // get: DWORD boolean
+ SaferObjectDisableMaxPrivilege, // get: DWORD boolean
+ SaferObjectInvertDeletedPrivileges, // get: DWORD boolean
+ SaferObjectDeletedPrivileges, // get: TOKEN_PRIVILEGES
+ SaferObjectDefaultOwner, // get: TOKEN_OWNER
+ SaferObjectSidsToDisable, // get: TOKEN_GROUPS
+ SaferObjectRestrictedSidsInverted, // get: TOKEN_GROUPS
+ SaferObjectRestrictedSidsAdded, // get: TOKEN_GROUPS
+
+ //
+ // To enumerate all identities, call GetInfo with
+ // SaferObjectAllIdentificationGuids.
+ //
+
+ SaferObjectAllIdentificationGuids, // get: SAFER_IDENTIFICATION_GUIDS
+
+ //
+ // To create a new identity, call SetInfo with
+ // SaferObjectSingleIdentification with a new
+ // unique GUID that you have generated.
+ // To get details on a single identity, call GetInfo with
+ // SaferObjectSingleIdentification with desired GUID.
+ // To modify details of a single identity, call SetInfo with
+ // SaferObjectSingleIdentification with desired info and GUID.
+ // To delete an identity, call SetInfo with
+ // SaferObjectSingleIdentification with the
+ // header.dwIdentificationType set to 0.
+ //
+
+ SaferObjectSingleIdentification, // get/set: SAFER_IDENTIFICATION_*
+
+ SaferObjectExtendedError); // get: DWORD dwError
+ {$EXTERNALSYM _SAFER_OBJECT_INFO_CLASS}
+ SAFER_OBJECT_INFO_CLASS = _SAFER_OBJECT_INFO_CLASS;
+ {$EXTERNALSYM SAFER_OBJECT_INFO_CLASS}
+ TSaferObjectInfoClass = SAFER_OBJECT_INFO_CLASS;
+
+//
+// Structures and enums used by the SaferGet/SetLevelInformation APIs.
+//
+
+// #include <pshpack8.h> todo
+
+ _SAFER_IDENTIFICATION_TYPES = (
+ SaferIdentityDefault,
+ SaferIdentityTypeImageName,
+ SaferIdentityTypeImageHash,
+ SaferIdentityTypeUrlZone,
+ SaferIdentityTypeCertificate);
+ {$EXTERNALSYM _SAFER_IDENTIFICATION_TYPES}
+ SAFER_IDENTIFICATION_TYPES = _SAFER_IDENTIFICATION_TYPES;
+ {$EXTERNALSYM SAFER_IDENTIFICATION_TYPES}
+ TSaferIdentificationTypes = SAFER_IDENTIFICATION_TYPES;
+
+ _SAFER_IDENTIFICATION_HEADER = record
+ //
+ // indicates the type of the structure, one of SaferIdentityType*
+ //
+ dwIdentificationType: SAFER_IDENTIFICATION_TYPES;
+ //
+ // size of the whole structure, not just the common header.
+ //
+ cbStructSize: DWORD;
+ //
+ // the unique GUID of the Identity in question.
+ //
+ IdentificationGuid: GUID;
+ //
+ // last change of this identification.
+ //
+ lastModified: FILETIME;
+ end;
+ {$EXTERNALSYM _SAFER_IDENTIFICATION_HEADER}
+ SAFER_IDENTIFICATION_HEADER = _SAFER_IDENTIFICATION_HEADER;
+ {$EXTERNALSYM SAFER_IDENTIFICATION_HEADER}
+ PSAFER_IDENTIFICATION_HEADER = ^SAFER_IDENTIFICATION_HEADER;
+ {$EXTERNALSYM PSAFER_IDENTIFICATION_HEADER}
+ TSaferIdentificationHeader = SAFER_IDENTIFICATION_HEADER;
+ PSaferIdentificationHeader = PSAFER_IDENTIFICATION_HEADER;
+
+ _SAFER_PATHNAME_IDENTIFICATION = record
+ //
+ // header.dwIdentificationType must be SaferIdentityTypeImageName
+ // header.cbStructSize must be sizeof(SAFER_PATHNAME_IDENTIFICATION)
+ //
+ header: SAFER_IDENTIFICATION_HEADER;
+ //
+ // user-entered description
+ //
+ Description: array [0..SAFER_MAX_DESCRIPTION_SIZE - 1] of WCHAR;
+ //
+ // filepath or name, possibly with vars
+ //
+ ImageName: PWCHAR;
+ //
+ // any combo of SAFER_POL_SAFERFLAGS_*
+ //
+ dwSaferFlags: DWORD;
+ end;
+ {$EXTERNALSYM _SAFER_PATHNAME_IDENTIFICATION}
+ SAFER_PATHNAME_IDENTIFICATION = _SAFER_PATHNAME_IDENTIFICATION;
+ {$EXTERNALSYM SAFER_PATHNAME_IDENTIFICATION}
+ PSAFER_PATHNAME_IDENTIFICATION = ^SAFER_PATHNAME_IDENTIFICATION;
+ {$EXTERNALSYM PSAFER_PATHNAME_IDENTIFICATION}
+ TSaferPathNameIdentification = SAFER_PATHNAME_IDENTIFICATION;
+ PSaferPathNameIdentification = PSAFER_PATHNAME_IDENTIFICATION;
+
+ _SAFER_HASH_IDENTIFICATION = record
+ //
+ // header.dwIdentificationType must be SaferIdentityTypeImageHash
+ // header.cbStructSize must be sizeof(SAFER_HASH_IDENTIFICATION)
+ //
+ header: SAFER_IDENTIFICATION_HEADER;
+ //
+ // user-entered friendly name, initially from file's resources.
+ //
+ Description: array [0..SAFER_MAX_DESCRIPTION_SIZE - 1] of WCHAR;
+ //
+ // user-entered description.
+ //
+ FriendlyName: array [0..SAFER_MAX_FRIENDLYNAME_SIZE - 1] of WCHAR;
+ //
+ // amount of ImageHash actually used, in bytes (MD5 is 16 bytes).
+ //
+ HashSize: DWORD;
+ //
+ // computed hash data itself.
+ //
+ ImageHash: array [0..SAFER_MAX_HASH_SIZE - 1] of BYTE;
+ //
+ // algorithm in which the hash was computed (CALG_MD5, etc).
+ //
+ HashAlgorithm: ALG_ID;
+ //
+ // size of the original file in bytes.
+ //
+ ImageSize: LARGE_INTEGER;
+ //
+ // any combo of SAFER_POL_SAFERFLAGS_*
+ //
+ dwSaferFlags: DWORD;
+ end;
+ {$EXTERNALSYM _SAFER_HASH_IDENTIFICATION}
+ SAFER_HASH_IDENTIFICATION = _SAFER_HASH_IDENTIFICATION;
+ {$EXTERNALSYM SAFER_HASH_IDENTIFICATION}
+ PSAFER_HASH_IDENTIFICATION = ^SAFER_HASH_IDENTIFICATION;
+ {$EXTERNALSYM PSAFER_HASH_IDENTIFICATION}
+ TSaferHashIdentification = SAFER_HASH_IDENTIFICATION;
+ PSaferHashIdentification = PSAFER_HASH_IDENTIFICATION;
+
+ _SAFER_URLZONE_IDENTIFICATION = record
+ //
+ // header.dwIdentificationType must be SaferIdentityTypeUrlZone
+ // header.cbStructSize must be sizeof(SAFER_URLZONE_IDENTIFICATION)
+ //
+ header: SAFER_IDENTIFICATION_HEADER;
+ //
+ // any single URLZONE_* from urlmon.h
+ //
+ UrlZoneId: DWORD;
+ //
+ // any combo of SAFER_POLICY_*
+ //
+ dwSaferFlags: DWORD;
+ end;
+ {$EXTERNALSYM _SAFER_URLZONE_IDENTIFICATION}
+ SAFER_URLZONE_IDENTIFICATION = _SAFER_URLZONE_IDENTIFICATION;
+ {$EXTERNALSYM SAFER_URLZONE_IDENTIFICATION}
+ PSAFER_URLZONE_IDENTIFICATION = ^SAFER_URLZONE_IDENTIFICATION;
+ {$EXTERNALSYM PSAFER_URLZONE_IDENTIFICATION}
+ TSaferUrlZoneIdentification = SAFER_URLZONE_IDENTIFICATION;
+ PSaferUrlZoneIdentification = PSAFER_URLZONE_IDENTIFICATION;
+
+// #include <poppack.h>
+
+//
+// Functions related to querying and setting the global policy
+// controls to disable transparent enforcement, and perform level
+// enumeration operations.
+//
+
+function SaferGetPolicyInformation(dwScopeId: DWORD; SaferPolicyInfoClass: SAFER_POLICY_INFO_CLASS;
+ InfoBufferSize: DWORD; InfoBuffer: PVOID; var InfoBufferRetSize: DWORD; lpReserved: LPVOID): BOOL; stdcall;
+{$EXTERNALSYM SaferGetPolicyInformation}
+
+function SaferSetPolicyInformation(dwScopeId: DWORD; SaferPolicyInfoClass: SAFER_POLICY_INFO_CLASS;
+ InfoBufferSize: DWORD; InfoBuffer: PVOID; lpReserved: LPVOID): BOOL; stdcall;
+{$EXTERNALSYM SaferSetPolicyInformation}
+
+//
+// Functions to open or close a handle to a Safer Level.
+//
+
+function SaferCreateLevel(dwScopeId, dwLevelId, OpenFlags: DWORD; pLevelHandle: PSAFER_LEVEL_HANDLE; lpReserved: LPVOID): BOOL; stdcall;
+{$EXTERNALSYM SaferCreateLevel}
+
+function SaferCloseLevel(hLevelHandle: SAFER_LEVEL_HANDLE): BOOL; stdcall;
+{$EXTERNALSYM SaferCloseLevel}
+
+function SaferIdentifyLevel(dwNumProperties: DWORD; pCodeProperties: PSAFER_CODE_PROPERTIES;
+ var pLevelHandle: SAFER_LEVEL_HANDLE; lpReserved: LPVOID): BOOL; stdcall;
+{$EXTERNALSYM SaferIdentifyLevel}
+
+function SaferComputeTokenFromLevel(LevelHandle: SAFER_LEVEL_HANDLE; InAccessToken: HANDLE; OutAccessToken: PHANDLE;
+ dwFlags: DWORD; lpReserved: LPVOID): BOOL; stdcall;
+{$EXTERNALSYM SaferComputeTokenFromLevel}
+
+function SaferGetLevelInformation(LevelHandle: SAFER_LEVEL_HANDLE; dwInfoType: SAFER_OBJECT_INFO_CLASS;
+ lpQueryBuffer: LPVOID; dwInBufferSize: DWORD; var lpdwOutBufferSize: DWORD): BOOL; stdcall;
+{$EXTERNALSYM SaferGetLevelInformation}
+
+function SaferSetLevelInformation(LevelHandle: SAFER_LEVEL_HANDLE; dwInfoType: SAFER_OBJECT_INFO_CLASS;
+ lpQueryBuffer: LPVOID; dwInBufferSize: DWORD): BOOL; stdcall;
+{$EXTERNALSYM SaferSetLevelInformation}
+
+//
+// This function performs logging of messages to the Application
+// event log. This is called by the hooks within CreateProcess,
+// ShellExecute and cmd when a lower trust evaluation result occurs.
+//
+
+function SaferRecordEventLogEntry(hLevel: SAFER_LEVEL_HANDLE; szTargetPath: LPCWSTR; lpReserved: LPVOID): BOOL; stdcall;
+{$EXTERNALSYM SaferRecordEventLogEntry}
+
+function SaferiIsExecutableFileType(szFullPathname: LPCWSTR; bFromShellExecute: BOOL): BOOL; stdcall;
+{$EXTERNALSYM SaferiIsExecutableFileType}
+
+implementation
+
+const
+ advapi32 = 'advapi32.dll';
+
+{$IFDEF DYNAMIC_LINK}
+
+var
+ _SaferGetPolicyInformation: Pointer;
+
+function SaferGetPolicyInformation;
+begin
+ GetProcedureAddress(_SaferGetPolicyInformation, advapi32, 'SaferGetPolicyInformation');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SaferGetPolicyInformation]
+ end;
+end;
+
+var
+ _SaferSetPolicyInformation: Pointer;
+
+function SaferSetPolicyInformation;
+begin
+ GetProcedureAddress(_SaferSetPolicyInformation, advapi32, 'SaferSetPolicyInformation');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SaferSetPolicyInformation]
+ end;
+end;
+
+var
+ _SaferCreateLevel: Pointer;
+
+function SaferCreateLevel;
+begin
+ GetProcedureAddress(_SaferCreateLevel, advapi32, 'SaferCreateLevel');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SaferCreateLevel]
+ end;
+end;
+
+var
+ _SaferCloseLevel: Pointer;
+
+function SaferCloseLevel;
+begin
+ GetProcedureAddress(_SaferCloseLevel, advapi32, 'SaferCloseLevel');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SaferCloseLevel]
+ end;
+end;
+
+var
+ _SaferIdentifyLevel: Pointer;
+
+function SaferIdentifyLevel;
+begin
+ GetProcedureAddress(_SaferIdentifyLevel, advapi32, 'SaferIdentifyLevel');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SaferIdentifyLevel]
+ end;
+end;
+
+var
+ _SaferComputeTokenFromLevel: Pointer;
+
+function SaferComputeTokenFromLevel;
+begin
+ GetProcedureAddress(_SaferComputeTokenFromLevel, advapi32, 'SaferComputeTokenFromLevel');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SaferComputeTokenFromLevel]
+ end;
+end;
+
+var
+ _SaferGetLevelInformation: Pointer;
+
+function SaferGetLevelInformation;
+begin
+ GetProcedureAddress(_SaferGetLevelInformation, advapi32, 'SaferGetLevelInformation');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SaferGetLevelInformation]
+ end;
+end;
+
+var
+ _SaferSetLevelInformation: Pointer;
+
+function SaferSetLevelInformation;
+begin
+ GetProcedureAddress(_SaferSetLevelInformation, advapi32, 'SaferSetLevelInformation');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SaferSetLevelInformation]
+ end;
+end;
+
+var
+ _SaferRecordEventLogEntry: Pointer;
+
+function SaferRecordEventLogEntry;
+begin
+ GetProcedureAddress(_SaferRecordEventLogEntry, advapi32, 'SaferRecordEventLogEntry');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SaferRecordEventLogEntry]
+ end;
+end;
+
+var
+ _SaferiIsExecutableFileType: Pointer;
+
+function SaferiIsExecutableFileType;
+begin
+ GetProcedureAddress(_SaferiIsExecutableFileType, advapi32, 'SaferiIsExecutableFileType');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SaferiIsExecutableFileType]
+ end;
+end;
+
+{$ELSE}
+
+function SaferGetPolicyInformation; external advapi32 name 'SaferGetPolicyInformation';
+function SaferSetPolicyInformation; external advapi32 name 'SaferSetPolicyInformation';
+function SaferCreateLevel; external advapi32 name 'SaferCreateLevel';
+function SaferCloseLevel; external advapi32 name 'SaferCloseLevel';
+function SaferIdentifyLevel; external advapi32 name 'SaferIdentifyLevel';
+function SaferComputeTokenFromLevel; external advapi32 name 'SaferComputeTokenFromLevel';
+function SaferGetLevelInformation; external advapi32 name 'SaferGetLevelInformation';
+function SaferSetLevelInformation; external advapi32 name 'SaferSetLevelInformation';
+function SaferRecordEventLogEntry; external advapi32 name 'SaferRecordEventLogEntry';
+function SaferiIsExecutableFileType; external advapi32 name 'SaferiIsExecutableFileType';
+
+{$ENDIF DYNAMIC_LINK}
+
+end.
diff --git a/packages/extra/winunits/jwawinsock.pas b/packages/extra/winunits/jwawinsock.pas
index cc47d16654..457235a5f3 100644
--- a/packages/extra/winunits/jwawinsock.pas
+++ b/packages/extra/winunits/jwawinsock.pas
@@ -1,2226 +1,2226 @@
-{******************************************************************************}
-{ }
-{ Winsock API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: winsock.h, released June 2000. The original Pascal }
-{ code is: WinSock.pas, released December 2000. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwawinsock.pas,v 1.1 2005/04/04 07:56:11 marco Exp $
-
-unit JwaWinSock;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "winsock.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaWinType, JwaWinBase;
-
-(*
- * Basic system type definitions, taken from the BSD file sys/types.h.
- *)
-
-type
- u_char = Byte;
- {$EXTERNALSYM u_char}
- u_short = Word;
- {$EXTERNALSYM u_short}
- u_int = Cardinal;
- {$EXTERNALSYM u_int}
- u_long = Cardinal;
- {$EXTERNALSYM u_long}
-
-(*
- * The new type to be used in all
- * instances which refer to sockets.
- *)
-
-type
- TSocket = UINT_PTR;
-
-(*
- * Select uses arrays of SOCKETs. These macros manipulate such
- * arrays. FD_SETSIZE may be defined by the user before including
- * this file, but the default here should be >= 64.
- *
- * CAVEAT IMPLEMENTOR and USER: THESE MACROS AND TYPES MUST BE
- * INCLUDED IN WINSOCK.H EXACTLY AS SHOWN HERE.
- *)
-
-const
- FD_SETSIZE = 64;
- {$EXTERNALSYM FD_SETSIZE}
-
-type
- fd_set = record
- fd_count: u_int; // how many are SET?
- fd_array: array [0..FD_SETSIZE - 1] of TSocket; // an array of SOCKETs
- end;
- {$EXTERNALSYM fd_set}
- TFdSet = fd_set;
- PFdSet = ^fd_set;
-
-function __WSAFDIsSet(s: TSocket; var FDSet: TFDSet): Integer; stdcall;
-{$EXTERNALSYM __WSAFDIsSet}
-
-procedure FD_CLR(fd: TSocket; var fdset: TFdSet);
-{$EXTERNALSYM FD_CLR}
-
-procedure _FD_SET(fd: TSocket; var fdset: TFDSet);
-//{$EXTERNALSYM FD_SET}
-
-procedure FD_ZERO(var fdset: TFdSet);
-{$EXTERNALSYM FD_ZERO}
-
-function FD_ISSET(fd: TSocket; var fdset: TFdSet): Boolean;
-{$EXTERNALSYM FD_ISSET}
-
-(*
- * Structure used in select() call, taken from the BSD file sys/time.h.
- *)
-
-type
- timeval = record
- tv_sec: Longint; // seconds
- tv_usec: Longint; // and microseconds
- end;
- {$EXTERNALSYM timeval}
- TTimeVal = timeval;
- PTimeVal = ^timeval;
-
-(*
- * Operations on timevals.
- *
- * NB: timercmp does not work for >= or <=.
- *)
-
-function timerisset(const tvp: TTimeVal): Boolean;
-{$EXTERNALSYM timerisset}
-
-//function timercmp(const tvp, uvp: TTimeVal; cmp): Boolean;
-//{$EXTERNALSYM timercmp}
-
-procedure timerclear(var tvp: TTimeVal);
-{$EXTERNALSYM timerclear}
-
-(*
- * Commands for ioctlsocket(), taken from the BSD file fcntl.h.
- *
- *
- * Ioctl's have the command encoded in the lower word,
- * and the size of any in or out parameters in the upper
- * word. The high 2 bits of the upper word are used
- * to encode the in/out status of the parameter; for now
- * we restrict parameters to at most 128 bytes.
- *)
-
-const
- IOCPARM_MASK = $7f; // parameters must be < 128 bytes
- {$EXTERNALSYM IOCPARM_MASK}
- IOC_VOID = $20000000; // no parameters
- {$EXTERNALSYM IOC_VOID}
- IOC_OUT = $40000000; // copy out parameters
- {$EXTERNALSYM IOC_OUT}
- IOC_IN = DWORD($80000000); // copy in parameters
- {$EXTERNALSYM IOC_IN}
- IOC_INOUT = DWORD(IOC_IN or IOC_OUT);
- {$EXTERNALSYM IOC_INOUT}
-
- // 0x20000000 distinguishes new & old ioctl's
-
-function _IO(x, y: DWORD): DWORD;
-{$EXTERNALSYM _IO}
-
-function _IOR(x, y, t: DWORD): DWORD;
-{$EXTERNALSYM _IOR}
-
-function _IOW(x, y, t: DWORD): DWORD;
-{$EXTERNALSYM _IOW}
-
-const
- FIONREAD = IOC_OUT or ((SizeOf(u_long) and IOCPARM_MASK) shl 16) or (Ord('f') shl 8) or 127; // get # bytes to read
- {$EXTERNALSYM FIONREAD}
- FIONBIO = IOC_OUT or ((SizeOf(u_long) and IOCPARM_MASK) shl 16) or (Ord('f') shl 8) or 126; // set/clear non-blocking i/o
- {$EXTERNALSYM FIONBIO}
- FIOASYNC = IOC_OUT or ((SizeOf(u_long) and IOCPARM_MASK) shl 16) or (Ord('f') shl 8) or 125; // set/clear async i/o
- {$EXTERNALSYM FIOASYNC}
-
-(* Socket I/O Controls *)
-
- SIOCSHIWAT = DWORD(IOC_IN or ((SizeOf(u_long) and IOCPARM_MASK) shl 16) or (Ord('s') shl 8) or 0); // set high watermark
- {$EXTERNALSYM SIOCSHIWAT}
- SIOCGHIWAT = IOC_OUT or ((SizeOf(u_long) and IOCPARM_MASK) shl 16) or (Ord('s') shl 8) or 1; // get high watermark
- {$EXTERNALSYM SIOCGHIWAT}
- SIOCSLOWAT = DWORD(IOC_IN or ((SizeOf(u_long) and IOCPARM_MASK) shl 16) or (Ord('s') shl 8) or 2); // set low watermark
- {$EXTERNALSYM SIOCSLOWAT}
- SIOCGLOWAT = IOC_OUT or ((SizeOf(u_long) and IOCPARM_MASK) shl 16) or (Ord('s') shl 8) or 3; // get low watermark
- {$EXTERNALSYM SIOCGLOWAT}
- SIOCATMARK = IOC_OUT or ((SizeOf(u_long) and IOCPARM_MASK) shl 16) or (Ord('s') shl 8) or 7; // at oob mark?
- {$EXTERNALSYM SIOCATMARK}
-
-(*
- * Structures returned by network data base library, taken from the
- * BSD file netdb.h. All addresses are supplied in host order, and
- * returned in network order (suitable for use in system calls).
- *)
-
-type
- hostent = record
- h_name: PChar; // official name of host
- h_aliases: PPChar; // alias list
- h_addrtype: Smallint; // host address type
- h_length: Smallint; // length of address
- case Integer of
- 0: (h_addr_list: PPChar); // list of addresses
- 1: (h_addr: PPChar); // address, for backward compat
- end;
- {$EXTERNALSYM hostent}
- THostEnt = hostent;
- PHostEnt = ^hostent;
-
-(*
- * It is assumed here that a network number
- * fits in 32 bits.
- *)
-
-type
- netent = record
- n_name: PChar; // official name of net
- n_aliases: PPChar; // alias list
- n_addrtype: Smallint; // net address type
- n_net: u_long; // network #
- end;
- {$EXTERNALSYM netent}
- TNetEnt = netent;
- PNetEnt = ^netent;
-
- servent = record
- s_name: PChar; // official service name
- s_aliases: PPChar; // alias list
- s_port: Smallint; // port #
- s_proto: PChar; // protocol to use
- end;
- {$EXTERNALSYM servent}
- TServEnt = servent;
- PServEnt = ^servent;
-
- protoent = record
- p_name: PChar; // official protocol name
- p_aliases: PPChar; // alias list
- p_proto: Smallint; // protocol #
- end;
- {$EXTERNALSYM protoent}
- TProtoEnt = protoent;
- PProtoEnt = ^protoent;
-
-(*
- * Constants and structures defined by the internet system,
- * Per RFC 790, September 1981, taken from the BSD file netinet/in.h.
- *)
-
-(*
- * Protocols
- *)
-
-const
- IPPROTO_IP = 0; // dummy for IP
- {$EXTERNALSYM IPPROTO_IP}
- IPPROTO_ICMP = 1; // control message protocol
- {$EXTERNALSYM IPPROTO_ICMP}
- IPPROTO_IGMP = 2; // internet group management protocol
- {$EXTERNALSYM IPPROTO_IGMP}
- IPPROTO_GGP = 3; // gateway^2 (deprecated)
- {$EXTERNALSYM IPPROTO_GGP}
- IPPROTO_TCP = 6; // tcp
- {$EXTERNALSYM IPPROTO_TCP}
- IPPROTO_PUP = 12; // pup
- {$EXTERNALSYM IPPROTO_PUP}
- IPPROTO_UDP = 17; // user datagram protocol
- {$EXTERNALSYM IPPROTO_UDP}
- IPPROTO_IDP = 22; // xns idp
- {$EXTERNALSYM IPPROTO_IDP}
- IPPROTO_ND = 77; // UNOFFICIAL net disk proto
- {$EXTERNALSYM IPPROTO_ND}
-
- IPPROTO_RAW = 255; // raw IP packet
- {$EXTERNALSYM IPPROTO_RAW}
- IPPROTO_MAX = 256;
- {$EXTERNALSYM IPPROTO_MAX}
-
-(*
- * Port/socket numbers: network standard functions
- *)
-
- IPPORT_ECHO = 7;
- {$EXTERNALSYM IPPORT_ECHO}
- IPPORT_DISCARD = 9;
- {$EXTERNALSYM IPPORT_DISCARD}
- IPPORT_SYSTAT = 11;
- {$EXTERNALSYM IPPORT_SYSTAT}
- IPPORT_DAYTIME = 13;
- {$EXTERNALSYM IPPORT_DAYTIME}
- IPPORT_NETSTAT = 15;
- {$EXTERNALSYM IPPORT_NETSTAT}
- IPPORT_FTP = 21;
- {$EXTERNALSYM IPPORT_FTP}
- IPPORT_TELNET = 23;
- {$EXTERNALSYM IPPORT_TELNET}
- IPPORT_SMTP = 25;
- {$EXTERNALSYM IPPORT_SMTP}
- IPPORT_TIMESERVER = 37;
- {$EXTERNALSYM IPPORT_TIMESERVER}
- IPPORT_NAMESERVER = 42;
- {$EXTERNALSYM IPPORT_NAMESERVER}
- IPPORT_WHOIS = 43;
- {$EXTERNALSYM IPPORT_WHOIS}
- IPPORT_MTP = 57;
- {$EXTERNALSYM IPPORT_MTP}
-
-(*
- * Port/socket numbers: host specific functions
- *)
-
- IPPORT_TFTP = 69;
- {$EXTERNALSYM IPPORT_TFTP}
- IPPORT_RJE = 77;
- {$EXTERNALSYM IPPORT_RJE}
- IPPORT_FINGER = 79;
- {$EXTERNALSYM IPPORT_FINGER}
- IPPORT_TTYLINK = 87;
- {$EXTERNALSYM IPPORT_TTYLINK}
- IPPORT_SUPDUP = 95;
- {$EXTERNALSYM IPPORT_SUPDUP}
-
-(*
- * UNIX TCP sockets
- *)
-
- IPPORT_EXECSERVER = 512;
- {$EXTERNALSYM IPPORT_EXECSERVER}
- IPPORT_LOGINSERVER = 513;
- {$EXTERNALSYM IPPORT_LOGINSERVER}
- IPPORT_CMDSERVER = 514;
- {$EXTERNALSYM IPPORT_CMDSERVER}
- IPPORT_EFSSERVER = 520;
- {$EXTERNALSYM IPPORT_EFSSERVER}
-
-(*
- * UNIX UDP sockets
- *)
-
- IPPORT_BIFFUDP = 512;
- {$EXTERNALSYM IPPORT_BIFFUDP}
- IPPORT_WHOSERVER = 513;
- {$EXTERNALSYM IPPORT_WHOSERVER}
- IPPORT_ROUTESERVER = 520;
- {$EXTERNALSYM IPPORT_ROUTESERVER}
-
- (* 520+1 also used *)
-
-(*
- * Ports < IPPORT_RESERVED are reserved for
- * privileged processes (e.g. root).
- *)
-
- IPPORT_RESERVED = 1024;
- {$EXTERNALSYM IPPORT_RESERVED}
-
-(*
- * Link numbers
- *)
-
- IMPLINK_IP = 155;
- {$EXTERNALSYM IMPLINK_IP}
- IMPLINK_LOWEXPER = 156;
- {$EXTERNALSYM IMPLINK_LOWEXPER}
- IMPLINK_HIGHEXPER = 158;
- {$EXTERNALSYM IMPLINK_HIGHEXPER}
-
-(*
- * Internet address (old style... should be updated)
- *)
-
-type
- SunB = packed record
- s_b1, s_b2, s_b3, s_b4: u_char;
- end;
- {$EXTERNALSYM SunB}
-
- SunW = packed record
- s_w1, s_w2: u_short;
- end;
- {$EXTERNALSYM SunW}
-
- in_addr = record
- case Integer of
- 0: (S_un_b: SunB);
- 1: (S_un_w: SunW);
- 2: (S_addr: u_long);
- // #define s_addr S_un.S_addr // can be used for most tcp & ip code
- // #define s_host S_un.S_un_b.s_b2 // host on imp
- // #define s_net S_un.S_un_b.s_b1 // netword
- // #define s_imp S_un.S_un_w.s_w2 // imp
- // #define s_impno S_un.S_un_b.s_b4 // imp #
- // #define s_lh S_un.S_un_b.s_b3 // logical host
- end;
- {$EXTERNALSYM in_addr}
- TInAddr = in_addr;
- PInAddr = ^in_addr;
-
-(*
- * Definitions of bits in internet address integers.
- * On subnets, the decomposition of addresses to host and net parts
- * is done according to subnet mask, not the masks here.
- *)
-
-function IN_CLASSA(i: DWORD): Boolean;
-{$EXTERNALSYM IN_CLASSA}
-
-const
- IN_CLASSA_NET = DWORD($ff000000);
- {$EXTERNALSYM IN_CLASSA_NET}
- IN_CLASSA_NSHIFT = 24;
- {$EXTERNALSYM IN_CLASSA_NSHIFT}
- IN_CLASSA_HOST = $00ffffff;
- {$EXTERNALSYM IN_CLASSA_HOST}
- IN_CLASSA_MAX = 128;
- {$EXTERNALSYM IN_CLASSA_MAX}
-
-function IN_CLASSB(i: DWORD): Boolean;
-{$EXTERNALSYM IN_CLASSB}
-
-const
- IN_CLASSB_NET = DWORD($ffff0000);
- {$EXTERNALSYM IN_CLASSB_NET}
- IN_CLASSB_NSHIFT = 16;
- {$EXTERNALSYM IN_CLASSB_NSHIFT}
- IN_CLASSB_HOST = $0000ffff;
- {$EXTERNALSYM IN_CLASSB_HOST}
- IN_CLASSB_MAX = 65536;
- {$EXTERNALSYM IN_CLASSB_MAX}
-
-function IN_CLASSC(i: DWORD): Boolean;
-{$EXTERNALSYM IN_CLASSC}
-
-const
- IN_CLASSC_NET = DWORD($ffffff00);
- {$EXTERNALSYM IN_CLASSC_NET}
- IN_CLASSC_NSHIFT = 8;
- {$EXTERNALSYM IN_CLASSC_NSHIFT}
- IN_CLASSC_HOST = $000000ff;
- {$EXTERNALSYM IN_CLASSC_HOST}
-
-const
- INADDR_ANY = u_long($00000000);
- {$EXTERNALSYM INADDR_ANY}
- INADDR_LOOPBACK = $7f000001;
- {$EXTERNALSYM INADDR_LOOPBACK}
- INADDR_BROADCAST = u_long($ffffffff);
- {$EXTERNALSYM INADDR_BROADCAST}
- INADDR_NONE = DWORD($ffffffff);
- {$EXTERNALSYM INADDR_NONE}
-
-(*
- * Socket address, internet style.
- *)
-
-type
- sockaddr_in = record
- sin_family: Smallint;
- sin_port: u_short;
- sin_addr: in_addr;
- sin_zero: array [0..7] of Char;
- end;
- {$EXTERNALSYM sockaddr_in}
- TSockAddrIn = sockaddr_in;
- PSockAddrIn = ^sockaddr_in;
-
-const
- WSADESCRIPTION_LEN = 256;
- {$EXTERNALSYM WSADESCRIPTION_LEN}
- WSASYS_STATUS_LEN = 128;
- {$EXTERNALSYM WSASYS_STATUS_LEN}
-
-type
- WSAData = record
- wVersion: WORD;
- wHighVersion: WORD;
- szDescription: array [0..WSADESCRIPTION_LEN] of Char;
- szSystemStatus: array [0..WSASYS_STATUS_LEN] of Char;
- iMaxSockets: Word;
- iMaxUdpDg: Word;
- lpVendorInfo: PChar;
- end;
- {$EXTERNALSYM WSAData}
- LPWSADATA = ^WSAData;
- {$EXTERNALSYM LPWSADATA}
- TWsaData = WSAData;
- PWsaData = LPWSADATA;
-
-(*
- * Options for use with [gs]etsockopt at the IP level.
- *)
-
-const
- IP_OPTIONS = 1; (* set/get IP per-packet options *)
- {$EXTERNALSYM IP_OPTIONS}
- IP_MULTICAST_IF = 2; (* set/get IP multicast interface *)
- {$EXTERNALSYM IP_MULTICAST_IF}
- IP_MULTICAST_TTL = 3; (* set/get IP multicast timetolive *)
- {$EXTERNALSYM IP_MULTICAST_TTL}
- IP_MULTICAST_LOOP = 4; (* set/get IP multicast loopback *)
- {$EXTERNALSYM IP_MULTICAST_LOOP}
- IP_ADD_MEMBERSHIP = 5; (* add an IP group membership *)
- {$EXTERNALSYM IP_ADD_MEMBERSHIP}
- IP_DROP_MEMBERSHIP = 6; (* drop an IP group membership *)
- {$EXTERNALSYM IP_DROP_MEMBERSHIP}
- IP_TTL = 7; (* set/get IP Time To Live *)
- {$EXTERNALSYM IP_TTL}
- IP_TOS = 8; (* set/get IP Type Of Service *)
- {$EXTERNALSYM IP_TOS}
- IP_DONTFRAGMENT = 9; (* set/get IP Don't Fragment flag *)
- {$EXTERNALSYM IP_DONTFRAGMENT}
-
- IP_DEFAULT_MULTICAST_TTL = 1; (* normally limit m'casts to 1 hop *)
- {$EXTERNALSYM IP_DEFAULT_MULTICAST_TTL}
- IP_DEFAULT_MULTICAST_LOOP = 1; (* normally hear sends if a member *)
- {$EXTERNALSYM IP_DEFAULT_MULTICAST_LOOP}
- IP_MAX_MEMBERSHIPS = 20; (* per socket; must fit in one mbuf *)
- {$EXTERNALSYM IP_MAX_MEMBERSHIPS}
-
-(*
- * Argument structure for IP_ADD_MEMBERSHIP and IP_DROP_MEMBERSHIP.
- *)
-
-type
- ip_mreq = record
- imr_multiaddr: in_addr; (* IP multicast address of group *)
- mr_interface: in_addr; (* local IP address of interface *)
- end;
- {$EXTERNALSYM ip_mreq}
- TIpMReq = ip_mreq;
- PIpMReq = ^ip_mreq;
-
-(*
- * Definitions related to sockets: types, address families, options,
- * taken from the BSD file sys/socket.h.
- *)
-
-(*
- * This is used instead of -1, since the
- * SOCKET type is unsigned.
- *)
-
-const
- INVALID_SOCKET = TSocket(not 0);
- {$EXTERNALSYM INVALID_SOCKET}
- SOCKET_ERROR = -1;
- {$EXTERNALSYM SOCKET_ERROR}
-
-(*
- * Types
- *)
-
- SOCK_STREAM = 1; // stream socket
- {$EXTERNALSYM SOCK_STREAM}
- SOCK_DGRAM = 2; // datagram socket
- {$EXTERNALSYM SOCK_DGRAM}
- SOCK_RAW = 3; // raw-protocol interface
- {$EXTERNALSYM SOCK_RAW}
- SOCK_RDM = 4; // reliably-delivered message
- {$EXTERNALSYM SOCK_RDM}
- SOCK_SEQPACKET = 5; // sequenced packet stream
- {$EXTERNALSYM SOCK_SEQPACKET}
-
-(*
- * Option flags per-socket.
- *)
-
- SO_DEBUG = $0001; // turn on debugging info recording
- {$EXTERNALSYM SO_DEBUG}
- SO_ACCEPTCONN = $0002; // socket has had listen()
- {$EXTERNALSYM SO_ACCEPTCONN}
- SO_REUSEADDR = $0004; // allow local address reuse
- {$EXTERNALSYM SO_REUSEADDR}
- SO_KEEPALIVE = $0008; // keep connections alive
- {$EXTERNALSYM SO_KEEPALIVE}
- SO_DONTROUTE = $0010; // just use interface addresses
- {$EXTERNALSYM SO_DONTROUTE}
- SO_BROADCAST = $0020; // permit sending of broadcast msgs
- {$EXTERNALSYM SO_BROADCAST}
- SO_USELOOPBACK = $0040; // bypass hardware when possible
- {$EXTERNALSYM SO_USELOOPBACK}
- SO_LINGER = $0080; // linger on close if data present
- {$EXTERNALSYM SO_LINGER}
- SO_OOBINLINE = $0100; // leave received OOB data in line
- {$EXTERNALSYM SO_OOBINLINE}
-
- SO_DONTLINGER = DWORD(not SO_LINGER);
- {$EXTERNALSYM SO_DONTLINGER}
-
-(*
- * Additional options.
- *)
-
- SO_SNDBUF = $1001; // send buffer size
- {$EXTERNALSYM SO_SNDBUF}
- SO_RCVBUF = $1002; // receive buffer size
- {$EXTERNALSYM SO_RCVBUF}
- SO_SNDLOWAT = $1003; // send low-water mark
- {$EXTERNALSYM SO_SNDLOWAT}
- SO_RCVLOWAT = $1004; // receive low-water mark
- {$EXTERNALSYM SO_RCVLOWAT}
- SO_SNDTIMEO = $1005; // send timeout
- {$EXTERNALSYM SO_SNDTIMEO}
- SO_RCVTIMEO = $1006; // receive timeout
- {$EXTERNALSYM SO_RCVTIMEO}
- SO_ERROR = $1007; // get error status and clear
- {$EXTERNALSYM SO_ERROR}
- SO_TYPE = $1008; // get socket type
- {$EXTERNALSYM SO_TYPE}
-
-(*
- * Options for connect and disconnect data and options. Used only by
- * non-TCP/IP transports such as DECNet, OSI TP4, etc.
- *)
-
- SO_CONNDATA = $7000;
- {$EXTERNALSYM SO_CONNDATA}
- SO_CONNOPT = $7001;
- {$EXTERNALSYM SO_CONNOPT}
- SO_DISCDATA = $7002;
- {$EXTERNALSYM SO_DISCDATA}
- SO_DISCOPT = $7003;
- {$EXTERNALSYM SO_DISCOPT}
- SO_CONNDATALEN = $7004;
- {$EXTERNALSYM SO_CONNDATALEN}
- SO_CONNOPTLEN = $7005;
- {$EXTERNALSYM SO_CONNOPTLEN}
- SO_DISCDATALEN = $7006;
- {$EXTERNALSYM SO_DISCDATALEN}
- SO_DISCOPTLEN = $7007;
- {$EXTERNALSYM SO_DISCOPTLEN}
-
-(*
- * Option for opening sockets for synchronous access.
- *)
-
- SO_OPENTYPE = $7008;
- {$EXTERNALSYM SO_OPENTYPE}
-
- SO_SYNCHRONOUS_ALERT = $10;
- {$EXTERNALSYM SO_SYNCHRONOUS_ALERT}
- SO_SYNCHRONOUS_NONALERT = $20;
- {$EXTERNALSYM SO_SYNCHRONOUS_NONALERT}
-
-(*
- * Other NT-specific options.
- *)
-
- SO_MAXDG = $7009;
- {$EXTERNALSYM SO_MAXDG}
- SO_MAXPATHDG = $700A;
- {$EXTERNALSYM SO_MAXPATHDG}
- SO_UPDATE_ACCEPT_CONTEXT = $700B;
- {$EXTERNALSYM SO_UPDATE_ACCEPT_CONTEXT}
- SO_CONNECT_TIME = $700C;
- {$EXTERNALSYM SO_CONNECT_TIME}
-
-(*
- * TCP options.
- *)
-
- TCP_NODELAY = $0001;
- {$EXTERNALSYM TCP_NODELAY}
- TCP_BSDURGENT = $7000;
- {$EXTERNALSYM TCP_BSDURGENT}
-
-(*
- * Address families.
- *)
-
- AF_UNSPEC = 0; // unspecified
- {$EXTERNALSYM AF_UNSPEC}
- AF_UNIX = 1; // local to host (pipes, portals
- {$EXTERNALSYM AF_UNIX}
- AF_INET = 2; // internetwork: UDP, TCP, etc.
- {$EXTERNALSYM AF_INET}
- AF_IMPLINK = 3; // arpanet imp addresses
- {$EXTERNALSYM AF_IMPLINK}
- AF_PUP = 4; // pup protocols: e.g. BSP
- {$EXTERNALSYM AF_PUP}
- AF_CHAOS = 5; // mit CHAOS protocols
- {$EXTERNALSYM AF_CHAOS}
- AF_NS = 6; // XEROX NS protocols
- {$EXTERNALSYM AF_NS}
- AF_IPX = AF_NS; // IPX protocols: IPX, SPX, etc.
- {$EXTERNALSYM AF_IPX}
- AF_ISO = 7; // ISO protocols
- {$EXTERNALSYM AF_ISO}
- AF_OSI = AF_ISO; // OSI is ISO
- {$EXTERNALSYM AF_OSI}
- AF_ECMA = 8; // european computer manufacturers
- {$EXTERNALSYM AF_ECMA}
- AF_DATAKIT = 9; // datakit protocols
- {$EXTERNALSYM AF_DATAKIT}
- AF_CCITT = 10; // CCITT protocols, X.25 etc
- {$EXTERNALSYM AF_CCITT}
- AF_SNA = 11; // IBM SNA
- {$EXTERNALSYM AF_SNA}
- AF_DECnet = 12; // DECnet
- {$EXTERNALSYM AF_DECnet}
- AF_DLI = 13; // Direct data link interface
- {$EXTERNALSYM AF_DLI}
- AF_LAT = 14; // LAT
- {$EXTERNALSYM AF_LAT}
- AF_HYLINK = 15; // NSC Hyperchannel
- {$EXTERNALSYM AF_HYLINK}
- AF_APPLETALK = 16; // AppleTalk
- {$EXTERNALSYM AF_APPLETALK}
- AF_NETBIOS = 17; // NetBios-style addresses
- {$EXTERNALSYM AF_NETBIOS}
- AF_VOICEVIEW = 18; // VoiceView
- {$EXTERNALSYM AF_VOICEVIEW}
- AF_FIREFOX = 19; // Protocols from Firefox
- {$EXTERNALSYM AF_FIREFOX}
- AF_UNKNOWN1 = 20; // Somebody is using this!
- {$EXTERNALSYM AF_UNKNOWN1}
- AF_BAN = 21; // Banyan
- {$EXTERNALSYM AF_BAN}
-
- AF_MAX = 22;
- {$EXTERNALSYM AF_MAX}
-
-(*
- * Structure used by kernel to store most
- * addresses.
- *)
-
-type
- sockaddr = record
- sa_family: u_short; // address family
- sa_data: array [0..13] of Char; // up to 14 bytes of direct address
- end;
- {$EXTERNALSYM sockaddr}
- TSockAddr = sockaddr;
- PSockAddr = ^sockaddr;
-
-(*
- * Structure used by kernel to pass protocol
- * information in raw sockets.
- *)
-
- sockproto = record
- sp_family: u_short; // address family
- sp_protocol: u_short; // protocol
- end;
- {$EXTERNALSYM sockproto}
- TSockProto = sockproto;
- PSockProto = ^sockproto;
-
-(*
- * Protocol families, same as address families for now.
- *)
-
-const
- PF_UNSPEC = AF_UNSPEC;
- {$EXTERNALSYM PF_UNSPEC}
- PF_UNIX = AF_UNIX;
- {$EXTERNALSYM PF_UNIX}
- PF_INET = AF_INET;
- {$EXTERNALSYM PF_INET}
- PF_IMPLINK = AF_IMPLINK;
- {$EXTERNALSYM PF_IMPLINK}
- PF_PUP = AF_PUP;
- {$EXTERNALSYM PF_PUP}
- PF_CHAOS = AF_CHAOS;
- {$EXTERNALSYM PF_CHAOS}
- PF_NS = AF_NS;
- {$EXTERNALSYM PF_NS}
- PF_IPX = AF_IPX;
- {$EXTERNALSYM PF_IPX}
- PF_ISO = AF_ISO;
- {$EXTERNALSYM PF_ISO}
- PF_OSI = AF_OSI;
- {$EXTERNALSYM PF_OSI}
- PF_ECMA = AF_ECMA;
- {$EXTERNALSYM PF_ECMA}
- PF_DATAKIT = AF_DATAKIT;
- {$EXTERNALSYM PF_DATAKIT}
- PF_CCITT = AF_CCITT;
- {$EXTERNALSYM PF_CCITT}
- PF_SNA = AF_SNA;
- {$EXTERNALSYM PF_SNA}
- PF_DECnet = AF_DECnet;
- {$EXTERNALSYM PF_DECnet}
- PF_DLI = AF_DLI;
- {$EXTERNALSYM PF_DLI}
- PF_LAT = AF_LAT;
- {$EXTERNALSYM PF_LAT}
- PF_HYLINK = AF_HYLINK;
- {$EXTERNALSYM PF_HYLINK}
- PF_APPLETALK = AF_APPLETALK;
- {$EXTERNALSYM PF_APPLETALK}
- PF_VOICEVIEW = AF_VOICEVIEW;
- {$EXTERNALSYM PF_VOICEVIEW}
- PF_FIREFOX = AF_FIREFOX;
- {$EXTERNALSYM PF_FIREFOX}
- PF_UNKNOWN1 = AF_UNKNOWN1;
- {$EXTERNALSYM PF_UNKNOWN1}
- PF_BAN = AF_BAN;
- {$EXTERNALSYM PF_BAN}
-
- PF_MAX = AF_MAX;
- {$EXTERNALSYM PF_MAX}
-
-(*
- * Structure used for manipulating linger option.
- *)
-
-type
- linger = record
- l_onoff: u_short; // option on/off
- l_linger: u_short; // linger time
- end;
- {$EXTERNALSYM linger}
- TLinger = linger;
- PLinger = ^linger;
-
-(*
- * Level number for (get/set)sockopt() to apply to socket itself.
- *)
-
-const
- SOL_SOCKET = $ffff; // options for socket level
- {$EXTERNALSYM SOL_SOCKET}
-
-(*
- * Maximum queue length specifiable by listen.
- *)
-
- SOMAXCONN = $7fffffff;
- {$EXTERNALSYM SOMAXCONN}
-
- MSG_OOB = $1; // process out-of-band data
- {$EXTERNALSYM MSG_OOB}
- MSG_PEEK = $2; // peek at incoming message
- {$EXTERNALSYM MSG_PEEK}
- MSG_DONTROUTE = $4; // send without using routing tables
- {$EXTERNALSYM MSG_DONTROUTE}
-
- MSG_MAXIOVLEN = 16;
- {$EXTERNALSYM MSG_MAXIOVLEN}
-
- MSG_PARTIAL = $8000; // partial send or recv for message xport
- {$EXTERNALSYM MSG_PARTIAL}
-
-(*
- * Define constant based on rfc883, used by gethostbyxxxx() calls.
- *)
-
- MAXGETHOSTSTRUCT = 1024;
- {$EXTERNALSYM MAXGETHOSTSTRUCT}
-
-(*
- * Define flags to be used with the WSAAsyncSelect() call.
- *)
-
- FD_READ = $01;
- {$EXTERNALSYM FD_READ}
- FD_WRITE = $02;
- {$EXTERNALSYM FD_WRITE}
- FD_OOB = $04;
- {$EXTERNALSYM FD_OOB}
- FD_ACCEPT = $08;
- {$EXTERNALSYM FD_ACCEPT}
- FD_CONNECT = $10;
- {$EXTERNALSYM FD_CONNECT}
- FD_CLOSE = $20;
- {$EXTERNALSYM FD_CLOSE}
-
-(*
- * All Windows Sockets error constants are biased by WSABASEERR from
- * the "normal"
- *)
-
- WSABASEERR = 10000;
- {$EXTERNALSYM WSABASEERR}
-
-(*
- * Windows Sockets definitions of regular Microsoft C error constants
- *)
-
- WSAEINTR = WSABASEERR + 4;
- {$EXTERNALSYM WSAEINTR}
- WSAEBADF = WSABASEERR + 9;
- {$EXTERNALSYM WSAEBADF}
- WSAEACCES = WSABASEERR + 13;
- {$EXTERNALSYM WSAEACCES}
- WSAEFAULT = WSABASEERR + 14;
- {$EXTERNALSYM WSAEFAULT}
- WSAEINVAL = WSABASEERR + 22;
- {$EXTERNALSYM WSAEINVAL}
- WSAEMFILE = WSABASEERR + 24;
- {$EXTERNALSYM WSAEMFILE}
-
-(*
- * Windows Sockets definitions of regular Berkeley error constants
- *)
-
- WSAEWOULDBLOCK = WSABASEERR + 35;
- {$EXTERNALSYM WSAEWOULDBLOCK}
- WSAEINPROGRESS = WSABASEERR + 36;
- {$EXTERNALSYM WSAEINPROGRESS}
- WSAEALREADY = WSABASEERR + 37;
- {$EXTERNALSYM WSAEALREADY}
- WSAENOTSOCK = WSABASEERR + 38;
- {$EXTERNALSYM WSAENOTSOCK}
- WSAEDESTADDRREQ = WSABASEERR + 39;
- {$EXTERNALSYM WSAEDESTADDRREQ}
- WSAEMSGSIZE = WSABASEERR + 40;
- {$EXTERNALSYM WSAEMSGSIZE}
- WSAEPROTOTYPE = WSABASEERR + 41;
- {$EXTERNALSYM WSAEPROTOTYPE}
- WSAENOPROTOOPT = WSABASEERR + 42;
- {$EXTERNALSYM WSAENOPROTOOPT}
- WSAEPROTONOSUPPORT = WSABASEERR + 43;
- {$EXTERNALSYM WSAEPROTONOSUPPORT}
- WSAESOCKTNOSUPPORT = WSABASEERR + 44;
- {$EXTERNALSYM WSAESOCKTNOSUPPORT}
- WSAEOPNOTSUPP = WSABASEERR + 45;
- {$EXTERNALSYM WSAEOPNOTSUPP}
- WSAEPFNOSUPPORT = WSABASEERR + 46;
- {$EXTERNALSYM WSAEPFNOSUPPORT}
- WSAEAFNOSUPPORT = WSABASEERR + 47;
- {$EXTERNALSYM WSAEAFNOSUPPORT}
- WSAEADDRINUSE = WSABASEERR + 48;
- {$EXTERNALSYM WSAEADDRINUSE}
- WSAEADDRNOTAVAIL = WSABASEERR + 49;
- {$EXTERNALSYM WSAEADDRNOTAVAIL}
- WSAENETDOWN = WSABASEERR + 50;
- {$EXTERNALSYM WSAENETDOWN}
- WSAENETUNREACH = WSABASEERR + 51;
- {$EXTERNALSYM WSAENETUNREACH}
- WSAENETRESET = WSABASEERR + 52;
- {$EXTERNALSYM WSAENETRESET}
- WSAECONNABORTED = WSABASEERR + 53;
- {$EXTERNALSYM WSAECONNABORTED}
- WSAECONNRESET = WSABASEERR + 54;
- {$EXTERNALSYM WSAECONNRESET}
- WSAENOBUFS = WSABASEERR + 55;
- {$EXTERNALSYM WSAENOBUFS}
- WSAEISCONN = WSABASEERR + 56;
- {$EXTERNALSYM WSAEISCONN}
- WSAENOTCONN = WSABASEERR + 57;
- {$EXTERNALSYM WSAENOTCONN}
- WSAESHUTDOWN = WSABASEERR + 58;
- {$EXTERNALSYM WSAESHUTDOWN}
- WSAETOOMANYREFS = WSABASEERR + 59;
- {$EXTERNALSYM WSAETOOMANYREFS}
- WSAETIMEDOUT = WSABASEERR + 60;
- {$EXTERNALSYM WSAETIMEDOUT}
- WSAECONNREFUSED = WSABASEERR + 61;
- {$EXTERNALSYM WSAECONNREFUSED}
- WSAELOOP = WSABASEERR + 62;
- {$EXTERNALSYM WSAELOOP}
- WSAENAMETOOLONG = WSABASEERR + 63;
- {$EXTERNALSYM WSAENAMETOOLONG}
- WSAEHOSTDOWN = WSABASEERR + 64;
- {$EXTERNALSYM WSAEHOSTDOWN}
- WSAEHOSTUNREACH = WSABASEERR + 65;
- {$EXTERNALSYM WSAEHOSTUNREACH}
- WSAENOTEMPTY = WSABASEERR + 66;
- {$EXTERNALSYM WSAENOTEMPTY}
- WSAEPROCLIM = WSABASEERR + 67;
- {$EXTERNALSYM WSAEPROCLIM}
- WSAEUSERS = WSABASEERR + 68;
- {$EXTERNALSYM WSAEUSERS}
- WSAEDQUOT = WSABASEERR + 69;
- {$EXTERNALSYM WSAEDQUOT}
- WSAESTALE = WSABASEERR + 70;
- {$EXTERNALSYM WSAESTALE}
- WSAEREMOTE = WSABASEERR + 71;
- {$EXTERNALSYM WSAEREMOTE}
-
- WSAEDISCON = WSABASEERR + 101;
- {$EXTERNALSYM WSAEDISCON}
-
-(*
- * Extended Windows Sockets error constant definitions
- *)
-
- WSASYSNOTREADY = WSABASEERR + 91;
- {$EXTERNALSYM WSASYSNOTREADY}
- WSAVERNOTSUPPORTED = WSABASEERR + 92;
- {$EXTERNALSYM WSAVERNOTSUPPORTED}
- WSANOTINITIALISED = WSABASEERR + 93;
- {$EXTERNALSYM WSANOTINITIALISED}
-
-(*
- * Error return codes from gethostbyname() and gethostbyaddr()
- * (when using the resolver). Note that these errors are
- * retrieved via WSAGetLastError() and must therefore follow
- * the rules for avoiding clashes with error numbers from
- * specific implementations or language run-time systems.
- * For this reason the codes are based at WSABASEERR+1001.
- * Note also that [WSA]NO_ADDRESS is defined only for
- * compatibility purposes.
- *)
-
-// Authoritative Answer: Host not found
-
- WSAHOST_NOT_FOUND = WSABASEERR + 1001;
- {$EXTERNALSYM WSAHOST_NOT_FOUND}
-
-// Non-Authoritative: Host not found, or SERVERFAIL
-
- WSATRY_AGAIN = WSABASEERR + 1002;
- {$EXTERNALSYM WSATRY_AGAIN}
-
-// Non-recoverable errors, FORMERR, REFUSED, NOTIMP
-
- WSANO_RECOVERY = WSABASEERR + 1003;
- {$EXTERNALSYM WSANO_RECOVERY}
-
-// Valid name, no data record of requested type
-
- WSANO_DATA = WSABASEERR + 1004;
- {$EXTERNALSYM WSANO_DATA}
-
-(*
- * Compatibility macros.
- *)
-
-function h_errno: Integer;
-{$EXTERNALSYM h_errno}
-
-const
- HOST_NOT_FOUND = WSAHOST_NOT_FOUND;
- {$EXTERNALSYM HOST_NOT_FOUND}
- TRY_AGAIN = WSATRY_AGAIN;
- {$EXTERNALSYM TRY_AGAIN}
- NO_RECOVERY = WSANO_RECOVERY;
- {$EXTERNALSYM NO_RECOVERY}
- NO_DATA = WSANO_DATA;
- {$EXTERNALSYM NO_DATA}
-
-// no address, look for MX record
-
- WSANO_ADDRESS = WSANO_DATA;
- {$EXTERNALSYM WSANO_ADDRESS}
- NO_ADDRESS = WSANO_ADDRESS;
- {$EXTERNALSYM NO_ADDRESS}
-
-(*
- * Windows Sockets errors redefined as regular Berkeley error constants.
- * These are commented out in Windows NT to avoid conflicts with errno.h.
- * Use the WSA constants instead.
- *)
-
-{$IFDEF FALSE}
-
-const
- EWOULDBLOCK = WSAEWOULDBLOCK;
- {$EXTERNALSYM EWOULDBLOCK}
- EINPROGRESS = WSAEINPROGRESS;
- {$EXTERNALSYM EINPROGRESS}
- EALREADY = WSAEALREADY;
- {$EXTERNALSYM EALREADY}
- ENOTSOCK = WSAENOTSOCK;
- {$EXTERNALSYM ENOTSOCK}
- EDESTADDRREQ = WSAEDESTADDRREQ;
- {$EXTERNALSYM EDESTADDRREQ}
- EMSGSIZE = WSAEMSGSIZE;
- {$EXTERNALSYM EMSGSIZE}
- EPROTOTYPE = WSAEPROTOTYPE;
- {$EXTERNALSYM EPROTOTYPE}
- ENOPROTOOPT = WSAENOPROTOOPT;
- {$EXTERNALSYM ENOPROTOOPT}
- EPROTONOSUPPORT = WSAEPROTONOSUPPORT;
- {$EXTERNALSYM EPROTONOSUPPORT}
- ESOCKTNOSUPPORT = WSAESOCKTNOSUPPORT;
- {$EXTERNALSYM ESOCKTNOSUPPORT}
- EOPNOTSUPP = WSAEOPNOTSUPP;
- {$EXTERNALSYM EOPNOTSUPP}
- EPFNOSUPPORT = WSAEPFNOSUPPORT;
- {$EXTERNALSYM EPFNOSUPPORT}
- EAFNOSUPPORT = WSAEAFNOSUPPORT;
- {$EXTERNALSYM EAFNOSUPPORT}
- EADDRINUSE = WSAEADDRINUSE;
- {$EXTERNALSYM EADDRINUSE}
- EADDRNOTAVAIL = WSAEADDRNOTAVAIL;
- {$EXTERNALSYM EADDRNOTAVAIL}
- ENETDOWN = WSAENETDOWN;
- {$EXTERNALSYM ENETDOWN}
- ENETUNREACH = WSAENETUNREACH;
- {$EXTERNALSYM ENETUNREACH}
- ENETRESET = WSAENETRESET;
- {$EXTERNALSYM ENETRESET}
- ECONNABORTED = WSAECONNABORTED;
- {$EXTERNALSYM ECONNABORTED}
- ECONNRESET = WSAECONNRESET;
- {$EXTERNALSYM ECONNRESET}
- ENOBUFS = WSAENOBUFS;
- {$EXTERNALSYM ENOBUFS}
- EISCONN = WSAEISCONN;
- {$EXTERNALSYM EISCONN}
- ENOTCONN = WSAENOTCONN;
- {$EXTERNALSYM ENOTCONN}
- ESHUTDOWN = WSAESHUTDOWN;
- {$EXTERNALSYM ESHUTDOWN}
- ETOOMANYREFS = WSAETOOMANYREFS;
- {$EXTERNALSYM ETOOMANYREFS}
- ETIMEDOUT = WSAETIMEDOUT;
- {$EXTERNALSYM ETIMEDOUT}
- ECONNREFUSED = WSAECONNREFUSED;
- {$EXTERNALSYM ECONNREFUSED}
- ELOOP = WSAELOOP;
- {$EXTERNALSYM ELOOP}
- ENAMETOOLONG = WSAENAMETOOLONG;
- {$EXTERNALSYM ENAMETOOLONG}
- EHOSTDOWN = WSAEHOSTDOWN;
- {$EXTERNALSYM EHOSTDOWN}
- EHOSTUNREACH = WSAEHOSTUNREACH;
- {$EXTERNALSYM EHOSTUNREACH}
- ENOTEMPTY = WSAENOTEMPTY;
- {$EXTERNALSYM ENOTEMPTY}
- EPROCLIM = WSAEPROCLIM;
- {$EXTERNALSYM EPROCLIM}
- EUSERS = WSAEUSERS;
- {$EXTERNALSYM EUSERS}
- EDQUOT = WSAEDQUOT;
- {$EXTERNALSYM EDQUOT}
- ESTALE = WSAESTALE;
- {$EXTERNALSYM ESTALE}
- EREMOTE = WSAEREMOTE;
- {$EXTERNALSYM EREMOTE}
-
-{$ENDIF FALSE}
-
-(* Socket function prototypes *)
-
-function accept(s: TSocket; addr: PSockAddr; addrlen: PINT): TSocket; stdcall;
-{$EXTERNALSYM accept}
-function bind(s: TSocket; name: PSockAddr; namelen: Integer): Integer; stdcall;
-{$EXTERNALSYM bind}
-function closesocket(s: TSocket): Integer; stdcall;
-{$EXTERNALSYM closesocket}
-function connect(s: TSocket; name: PSockAddr; namelen: Integer): Integer; stdcall;
-{$EXTERNALSYM connect}
-function ioctlsocket(s: TSocket; cmd: Longint; var argp: u_long): Integer; stdcall;
-{$EXTERNALSYM ioctlsocket}
-function getpeername(s: TSocket; name: PSockAddr; var namelen: Integer): Integer; stdcall;
-{$EXTERNALSYM getpeername}
-function getsockname(s: TSocket; name: PSockAddr; var namelen: Integer): Integer; stdcall;
-{$EXTERNALSYM getsockname}
-function getsockopt(s: TSocket; level, optname: Integer; optval: PChar; var optlen: Integer): Integer; stdcall;
-{$EXTERNALSYM getsockopt}
-function htonl(hostlong: u_long): u_long; stdcall;
-{$EXTERNALSYM htonl}
-function htons(hostshort: u_short): u_short; stdcall;
-{$EXTERNALSYM htons}
-function inet_addr(cp: PChar): u_long; stdcall;
-{$EXTERNALSYM inet_addr}
-function inet_ntoa(inaddr: in_addr): PChar; stdcall;
-{$EXTERNALSYM inet_ntoa}
-function listen(s: TSocket; backlog: Integer): Integer; stdcall;
-{$EXTERNALSYM listen}
-function ntohl(netlong: u_long): u_long; stdcall;
-{$EXTERNALSYM ntohl}
-function ntohs(netshort: u_short): u_short; stdcall;
-{$EXTERNALSYM ntohs}
-function recv(s: TSocket; var buf; len, flags: Integer): Integer; stdcall;
-{$EXTERNALSYM recv}
-function recvfrom(s: TSocket; var buf; len, flags: Integer; from: PSockAddr; var fromlen: Integer): Integer; stdcall;
-{$EXTERNALSYM recvfrom}
-function select(nfds: Integer; readfds, writefds, exceptfds: PFdSet; timeout: PTimeVal): Integer; stdcall;
-{$EXTERNALSYM select}
-function send(s: TSocket; var buf; len, flags: Integer): Integer; stdcall;
-{$EXTERNALSYM send}
-function sendto(s: TSocket; var buf; len, flags: Integer; toaddr: PSockAddr; tolen: Integer): Integer; stdcall;
-{$EXTERNALSYM sendto}
-function setsockopt(s: TSocket; level, optname: Integer; optval: PChar; optlen: Integer): Integer; stdcall;
-{$EXTERNALSYM setsockopt}
-function shutdown(s: TSocket; how: Integer): Integer; stdcall;
-{$EXTERNALSYM shutdown}
-function socket(af, type_, protocol: Integer): TSocket; stdcall;
-{$EXTERNALSYM socket}
-
-(* Database function prototypes *)
-
-function gethostbyaddr(addr: PChar; len, type_: Integer): PHostEnt; stdcall;
-{$EXTERNALSYM gethostbyaddr}
-function gethostbyname(name: PChar): PHostEnt; stdcall;
-{$EXTERNALSYM gethostbyname}
-function gethostname(name: PChar; namelen: Integer): Integer; stdcall;
-{$EXTERNALSYM gethostname}
-function getservbyport(port: Integer; proto: PChar): PServEnt; stdcall;
-{$EXTERNALSYM getservbyport}
-function getservbyname(name, proto: PChar): PServEnt; stdcall;
-{$EXTERNALSYM getservbyname}
-function getprotobynumber(number: Integer): PProtoEnt; stdcall;
-{$EXTERNALSYM getprotobynumber}
-function getprotobyname(name: PChar): PProtoEnt; stdcall;
-{$EXTERNALSYM getprotobyname}
-
-(* Microsoft Windows Extension function prototypes *)
-
-function WSAStartup(wVersionRequired: WORD; var lpWSAData: TWSAData): Integer; stdcall;
-{$EXTERNALSYM WSAStartup}
-function WSACleanup: Integer; stdcall;
-{$EXTERNALSYM WSACleanup}
-procedure WSASetLastError(iError: Integer); stdcall;
-{$EXTERNALSYM WSASetLastError}
-function WSAGetLastError: Integer; stdcall;
-{$EXTERNALSYM WSAGetLastError}
-function WSAIsBlocking: BOOL; stdcall;
-{$EXTERNALSYM WSAIsBlocking}
-function WSAUnhookBlockingHook: Integer; stdcall;
-{$EXTERNALSYM WSAUnhookBlockingHook}
-function WSASetBlockingHook(lpBlockFunc: FARPROC): FARPROC; stdcall;
-{$EXTERNALSYM WSASetBlockingHook}
-function WSACancelBlockingCall: Integer; stdcall;
-{$EXTERNALSYM WSACancelBlockingCall}
-function WSAAsyncGetServByName(hWnd: HWND; wMsg: u_int; name, proto, buf: PChar;
- buflen: Integer): HANDLE; stdcall;
-{$EXTERNALSYM WSAAsyncGetServByName}
-function WSAAsyncGetServByPort(hWnd: HWND; wMsg: u_int; port: Integer;
- proto, buf: PChar; buflen: Integer): HANDLE; stdcall;
-{$EXTERNALSYM WSAAsyncGetServByPort}
-function WSAAsyncGetProtoByName(hWnd: HWND; wMsg: u_int; name, buf: PChar;
- buflen: Integer): HANDLE; stdcall;
-{$EXTERNALSYM WSAAsyncGetProtoByName}
-function WSAAsyncGetProtoByNumber(hWnd: HWND; wMsg: u_int; number: Integer;
- buf: PChar; buflen: Integer): HANDLE; stdcall;
-{$EXTERNALSYM WSAAsyncGetProtoByNumber}
-function WSAAsyncGetHostByName(hWnd: HWND; wMsg: u_int; name, buf: PChar;
- buflen: Integer): HANDLE; stdcall;
-{$EXTERNALSYM WSAAsyncGetHostByName}
-function WSAAsyncGetHostByAddr(hWnd: HWND; wMsg: u_int; addr: PChar;
- len, type_: Integer; buf: PChar; buflen: Integer): HANDLE; stdcall;
-{$EXTERNALSYM WSAAsyncGetHostByAddr}
-function WSACancelAsyncRequest(hAsyncTaskHandle: HANDLE): Integer; stdcall;
-{$EXTERNALSYM WSACancelAsyncRequest}
-function WSAAsyncSelect(s: TSocket; hWnd: HWND; wMsg: u_int; lEvent: Longint): Integer; stdcall;
-{$EXTERNALSYM WSAAsyncSelect}
-
-function WSARecvEx(s: TSocket; var buf; len: Integer; var flags: Integer): Integer; stdcall;
-{$EXTERNALSYM WSARecvEx}
-
-type
- _TRANSMIT_FILE_BUFFERS = record
- Head: LPVOID;
- HeadLength: DWORD;
- Tail: LPVOID;
- TailLength: DWORD;
- end;
- {$EXTERNALSYM _TRANSMIT_FILE_BUFFERS}
- TRANSMIT_FILE_BUFFERS = _TRANSMIT_FILE_BUFFERS;
- {$EXTERNALSYM TRANSMIT_FILE_BUFFERS}
- PTRANSMIT_FILE_BUFFERS = ^TRANSMIT_FILE_BUFFERS;
- {$EXTERNALSYM PTRANSMIT_FILE_BUFFERS}
- LPTRANSMIT_FILE_BUFFERS = ^TRANSMIT_FILE_BUFFERS;
- {$EXTERNALSYM LPTRANSMIT_FILE_BUFFERS}
- TTransmitFileBuffers = TRANSMIT_FILE_BUFFERS;
- PTransmitFileBuffers = LPTRANSMIT_FILE_BUFFERS;
-
-const
- TF_DISCONNECT = $01;
- {$EXTERNALSYM TF_DISCONNECT}
- TF_REUSE_SOCKET = $02;
- {$EXTERNALSYM TF_REUSE_SOCKET}
- TF_WRITE_BEHIND = $04;
- {$EXTERNALSYM TF_WRITE_BEHIND}
-
-function TransmitFile(hSocket: TSocket; hFile: HANDLE; nNumberOfBytesToWrite: DWORD;
- nNumberOfBytesPerSend: DWORD; lpOverlapped: LPOVERLAPPED;
- lpTransmitBuffers: LPTRANSMIT_FILE_BUFFERS; dwReserved: DWORD): BOOL; stdcall;
-{$EXTERNALSYM TransmitFile}
-function AcceptEx(sListenSocket, sAcceptSocket: TSocket;
- lpOutputBuffer: LPVOID; dwReceiveDataLength, dwLocalAddressLength,
- dwRemoteAddressLength: DWORD; var lpdwBytesReceived: DWORD;
- lpOverlapped: LPOVERLAPPED): BOOL; stdcall;
-{$EXTERNALSYM AcceptEx}
-procedure GetAcceptExSockaddrs(lpOutputBuffer: Pointer;
- dwReceiveDataLength, dwLocalAddressLength, dwRemoteAddressLength: DWORD;
- out LocalSockaddr: PSockAddr; var LocalSockaddrLength: Integer;
- out RemoteSockaddr: PSockAddr; var RemoteSockaddrLength: Integer); stdcall;
-{$EXTERNALSYM GetAcceptExSockaddrs}
-
-(* Microsoft Windows Extended data types *)
-
-type
- PSOCKADDR_IN = ^sockaddr_in;
- {$EXTERNALSYM PSOCKADDR_IN}
- LPSOCKADDR_IN = ^sockaddr_in;
- {$EXTERNALSYM LPSOCKADDR_IN}
- LPLINGER = PLINGER;
- {$EXTERNALSYM LPLINGER}
- PIN_ADDR = ^in_addr;
- {$EXTERNALSYM PIN_ADDR}
- LPIN_ADDR = ^in_addr;
- {$EXTERNALSYM LPIN_ADDR}
- PFD_SET = ^fd_set;
- {$EXTERNALSYM PFD_SET}
- LPFD_SET = ^fd_set;
- {$EXTERNALSYM LPFD_SET}
- LPHOSTENT = PHOSTENT;
- {$EXTERNALSYM LPHOSTENT}
- LPSERVENT = PSERVENT;
- {$EXTERNALSYM LPSERVENT}
- LPPROTOENT = PPROTOENT;
- {$EXTERNALSYM LPPROTOENT}
- LPTIMEVAL = PTIMEVAL;
- {$EXTERNALSYM LPTIMEVAL}
-
-(*
- * Windows message parameter composition and decomposition
- * macros.
- *
- * WSAMAKEASYNCREPLY is intended for use by the Windows Sockets implementation
- * when constructing the response to a WSAAsyncGetXByY() routine.
- *)
-
-function WSAMAKEASYNCREPLY(buflen, error: WORD): DWORD;
-{$EXTERNALSYM WSAMAKEASYNCREPLY}
-
-(*
- * WSAMAKESELECTREPLY is intended for use by the Windows Sockets implementation
- * when constructing the response to WSAAsyncSelect().
- *)
-
-function WSAMAKESELECTREPLY(event, error: WORD): DWORD;
-{$EXTERNALSYM WSAMAKESELECTREPLY}
-
-(*
- * WSAGETASYNCBUFLEN is intended for use by the Windows Sockets application
- * to extract the buffer length from the lParam in the response
- * to a WSAGetXByY().
- *)
-
-function WSAGETASYNCBUFLEN(lParam: DWORD): WORD;
-{$EXTERNALSYM WSAGETASYNCBUFLEN}
-
-(*
- * WSAGETASYNCERROR is intended for use by the Windows Sockets application
- * to extract the error code from the lParam in the response
- * to a WSAGetXByY().
- *)
-
-function WSAGETASYNCERROR(lParam: DWORD): WORD;
-{$EXTERNALSYM WSAGETASYNCERROR}
-
-(*
- * WSAGETSELECTEVENT is intended for use by the Windows Sockets application
- * to extract the event code from the lParam in the response
- * to a WSAAsyncSelect().
- *)
-
-function WSAGETSELECTEVENT(lParam: DWORD): WORD;
-{$EXTERNALSYM WSAGETSELECTEVENT}
-
-(*
- * WSAGETSELECTERROR is intended for use by the Windows Sockets application
- * to extract the error code from the lParam in the response
- * to a WSAAsyncSelect().
- *)
-
-function WSAGETSELECTERROR(lParam: DWORD): WORD;
-{$EXTERNALSYM WSAGETSELECTERROR}
-
-implementation
-
-const
- wsock32 = 'wsock32.dll';
-
-procedure FD_CLR(fd: TSocket; var fdset: TFdSet);
-var
- I: Cardinal;
-begin
- I := 0;
- while I < fdset.fd_count do
- begin
- if fdset.fd_array[I] = fd then
- begin
- while I < fdset.fd_count - 1 do
- begin
- fdset.fd_array[I] := fdset.fd_array[I + 1];
- Inc(I);
- end;
- fdset.fd_count := fdset.fd_count - 1;
- Break;
- end;
- Inc(I);
- end;
-end;
-
-procedure _FD_SET(fd: TSocket; var fdset: TFDSet);
-var
- I: Cardinal;
-begin
- I := 0;
- while I < fdset.fd_count do
- begin
- if fdset.fd_array[I] = fd then
- Break;
- Inc(I);
- end;
- if I = fdset.fd_count then
- begin
- if fdset.fd_count < FD_SETSIZE then
- begin
- fdset.fd_array[I] := fd;
- fdset.fd_count := fdset.fd_count + 1;
- end;
- end;
-end;
-
-procedure FD_ZERO(var fdset: TFdSet);
-begin
- fdset.fd_count := 0;
-end;
-
-function FD_ISSET(fd: TSocket; var fdset: TFdSet): Boolean;
-begin
- Result := __WSAFDIsSet(fd, fdset) <> 0;
-end;
-
-function timerisset(const tvp: TTimeVal): Boolean;
-begin
- Result := (tvp.tv_sec <> 0) or (tvp.tv_usec <> 0);
-end;
-
-procedure timerclear(var tvp: TTimeVal);
-begin
- tvp.tv_sec := 0;
- tvp.tv_usec := 0;
-end;
-
-function _IO(x, y: DWORD): DWORD;
-begin
- Result := IOC_VOID or (x shl 8) or y;
-end;
-
-function _IOR(x, y, t: DWORD): DWORD;
-begin
- Result := IOC_OUT or ((T and IOCPARM_MASK) shl 16) or (x shl 8) or y;
-end;
-
-function _IOW(x, y, t: DWORD): DWORD;
-begin
- Result := DWORD(IOC_IN or ((T and IOCPARM_MASK) shl 16) or (x shl 8) or y);
-end;
-
-function IN_CLASSA(i: DWORD): Boolean;
-begin
- Result := i and DWORD($80000000) = 0;
-end;
-
-function IN_CLASSB(i: DWORD): Boolean;
-begin
- Result := i and DWORD($C0000000) = DWORD($80000000);
-end;
-
-function IN_CLASSC(i: DWORD): Boolean;
-begin
- Result := (i and DWORD($e0000000)) = DWORD($C0000000);
-end;
-
-function h_errno: Integer;
-begin
- Result := WSAGetLastError;
-end;
-
-function WSAMAKEASYNCREPLY(buflen, error: WORD): DWORD;
-begin
- Result := MAKELONG(buflen, error);
-end;
-
-function WSAMAKESELECTREPLY(event, error: WORD): DWORD;
-begin
- Result := MAKELONG(event, error);
-end;
-
-function WSAGETASYNCBUFLEN(lParam: DWORD): WORD;
-begin
- Result := LOWORD(lParam);
-end;
-
-function WSAGETASYNCERROR(lParam: DWORD): WORD;
-begin
- Result := HIWORD(lParam);
-end;
-
-function WSAGETSELECTEVENT(lParam: DWORD): WORD;
-begin
- Result := LOWORD(lParam);
-end;
-
-function WSAGETSELECTERROR(lParam: DWORD): WORD;
-begin
- Result := HIWORD(lParam);
-end;
-
-{$IFDEF DYNAMIC_LINK}
-
-var
- ___WSAFDIsSet: Pointer;
-
-function __WSAFDIsSet;
-begin
- GetProcedureAddress(___WSAFDIsSet, wsock32, '__WSAFDIsSet');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [___WSAFDIsSet]
- end;
-end;
-
-var
- _accept: Pointer;
-
-function accept;
-begin
- GetProcedureAddress(_accept, wsock32, 'accept');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_accept]
- end;
-end;
-
-var
- _bind: Pointer;
-
-function bind;
-begin
- GetProcedureAddress(_bind, wsock32, 'bind');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_bind]
- end;
-end;
-
-var
- _closesocket: Pointer;
-
-function closesocket;
-begin
- GetProcedureAddress(_closesocket, wsock32, 'closesocket');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_closesocket]
- end;
-end;
-
-var
- _connect: Pointer;
-
-function connect;
-begin
- GetProcedureAddress(_connect, wsock32, 'connect');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_connect]
- end;
-end;
-
-var
- _ioctlsocket: Pointer;
-
-function ioctlsocket;
-begin
- GetProcedureAddress(_ioctlsocket, wsock32, 'ioctlsocket');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ioctlsocket]
- end;
-end;
-
-var
- _getpeername: Pointer;
-
-function getpeername;
-begin
- GetProcedureAddress(_getpeername, wsock32, 'getpeername');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_getpeername]
- end;
-end;
-
-var
- _getsockname: Pointer;
-
-function getsockname;
-begin
- GetProcedureAddress(_getsockname, wsock32, 'getsockname');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_getsockname]
- end;
-end;
-
-var
- _getsockopt: Pointer;
-
-function getsockopt;
-begin
- GetProcedureAddress(_getsockopt, wsock32, 'getsockopt');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_getsockopt]
- end;
-end;
-
-var
- _htonl: Pointer;
-
-function htonl;
-begin
- GetProcedureAddress(_htonl, wsock32, 'htonl');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_htonl]
- end;
-end;
-
-var
- _htons: Pointer;
-
-function htons;
-begin
- GetProcedureAddress(_htons, wsock32, 'htons');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_htons]
- end;
-end;
-
-var
- _inet_addr: Pointer;
-
-function inet_addr;
-begin
- GetProcedureAddress(_inet_addr, wsock32, 'inet_addr');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_inet_addr]
- end;
-end;
-
-var
- _inet_ntoa: Pointer;
-
-function inet_ntoa;
-begin
- GetProcedureAddress(_inet_ntoa, wsock32, 'inet_ntoa');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_inet_ntoa]
- end;
-end;
-
-var
- _listen: Pointer;
-
-function listen;
-begin
- GetProcedureAddress(_listen, wsock32, 'listen');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_listen]
- end;
-end;
-
-var
- _ntohl: Pointer;
-
-function ntohl;
-begin
- GetProcedureAddress(_ntohl, wsock32, 'ntohl');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ntohl]
- end;
-end;
-
-var
- _ntohs: Pointer;
-
-function ntohs;
-begin
- GetProcedureAddress(_ntohs, wsock32, 'ntohs');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ntohs]
- end;
-end;
-
-var
- _recv: Pointer;
-
-function recv;
-begin
- GetProcedureAddress(_recv, wsock32, 'recv');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_recv]
- end;
-end;
-
-var
- _recvfrom: Pointer;
-
-function recvfrom;
-begin
- GetProcedureAddress(_recvfrom, wsock32, 'recvfrom');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_recvfrom]
- end;
-end;
-
-var
- _select: Pointer;
-
-function select;
-begin
- GetProcedureAddress(_select, wsock32, 'select');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_select]
- end;
-end;
-
-var
- _send: Pointer;
-
-function send;
-begin
- GetProcedureAddress(_send, wsock32, 'send');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_send]
- end;
-end;
-
-var
- _sendto: Pointer;
-
-function sendto;
-begin
- GetProcedureAddress(_sendto, wsock32, 'sendto');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_sendto]
- end;
-end;
-
-var
- _setsockopt: Pointer;
-
-function setsockopt;
-begin
- GetProcedureAddress(_setsockopt, wsock32, 'setsockopt');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_setsockopt]
- end;
-end;
-
-var
- _shutdown: Pointer;
-
-function shutdown;
-begin
- GetProcedureAddress(_shutdown, wsock32, 'shutdown');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_shutdown]
- end;
-end;
-
-var
- _socket: Pointer;
-
-function socket;
-begin
- GetProcedureAddress(_socket, wsock32, 'socket');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_socket]
- end;
-end;
-
-var
- _gethostbyaddr: Pointer;
-
-function gethostbyaddr;
-begin
- GetProcedureAddress(_gethostbyaddr, wsock32, 'gethostbyaddr');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_gethostbyaddr]
- end;
-end;
-
-var
- _gethostbyname: Pointer;
-
-function gethostbyname;
-begin
- GetProcedureAddress(_gethostbyname, wsock32, 'gethostbyname');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_gethostbyname]
- end;
-end;
-
-var
- _gethostname: Pointer;
-
-function gethostname;
-begin
- GetProcedureAddress(_gethostname, wsock32, 'gethostname');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_gethostname]
- end;
-end;
-
-var
- _getservbyport: Pointer;
-
-function getservbyport;
-begin
- GetProcedureAddress(_getservbyport, wsock32, 'getservbyport');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_getservbyport]
- end;
-end;
-
-var
- _getservbyname: Pointer;
-
-function getservbyname;
-begin
- GetProcedureAddress(_getservbyname, wsock32, 'getservbyname');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_getservbyname]
- end;
-end;
-
-var
- _getprotobynumber: Pointer;
-
-function getprotobynumber;
-begin
- GetProcedureAddress(_getprotobynumber, wsock32, 'getprotobynumber');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_getprotobynumber]
- end;
-end;
-
-var
- _getprotobyname: Pointer;
-
-function getprotobyname;
-begin
- GetProcedureAddress(_getprotobyname, wsock32, 'getprotobyname');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_getprotobyname]
- end;
-end;
-
-var
- _WSAStartup: Pointer;
-
-function WSAStartup;
-begin
- GetProcedureAddress(_WSAStartup, wsock32, 'WSAStartup');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WSAStartup]
- end;
-end;
-
-var
- _WSACleanup: Pointer;
-
-function WSACleanup;
-begin
- GetProcedureAddress(_WSACleanup, wsock32, 'WSACleanup');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WSACleanup]
- end;
-end;
-
-var
- _WSASetLastError: Pointer;
-
-procedure WSASetLastError;
-begin
- GetProcedureAddress(_WSASetLastError, wsock32, 'WSASetLastError');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WSASetLastError]
- end;
-end;
-
-var
- _WSAGetLastError: Pointer;
-
-function WSAGetLastError;
-begin
- GetProcedureAddress(_WSAGetLastError, wsock32, 'WSAGetLastError');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WSAGetLastError]
- end;
-end;
-
-var
- _WSAIsBlocking: Pointer;
-
-function WSAIsBlocking;
-begin
- GetProcedureAddress(_WSAIsBlocking, wsock32, 'WSAIsBlocking');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WSAIsBlocking]
- end;
-end;
-
-var
- _WSAUnhookBlockingHook: Pointer;
-
-function WSAUnhookBlockingHook;
-begin
- GetProcedureAddress(_WSAUnhookBlockingHook, wsock32, 'WSAUnhookBlockingHook');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WSAUnhookBlockingHook]
- end;
-end;
-
-var
- _WSASetBlockingHook: Pointer;
-
-function WSASetBlockingHook;
-begin
- GetProcedureAddress(_WSASetBlockingHook, wsock32, 'WSASetBlockingHook');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WSASetBlockingHook]
- end;
-end;
-
-var
- _WSACancelBlockingCall: Pointer;
-
-function WSACancelBlockingCall;
-begin
- GetProcedureAddress(_WSACancelBlockingCall, wsock32, 'WSACancelBlockingCall');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WSACancelBlockingCall]
- end;
-end;
-
-var
- _WSAAsyncGetServByName: Pointer;
-
-function WSAAsyncGetServByName;
-begin
- GetProcedureAddress(_WSAAsyncGetServByName, wsock32, 'WSAAsyncGetServByName');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WSAAsyncGetServByName]
- end;
-end;
-
-var
- _WSAAsyncGetServByPort: Pointer;
-
-function WSAAsyncGetServByPort;
-begin
- GetProcedureAddress(_WSAAsyncGetServByPort, wsock32, 'WSAAsyncGetServByPort');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WSAAsyncGetServByPort]
- end;
-end;
-
-var
- _WSAAsyncGetProtoByName: Pointer;
-
-function WSAAsyncGetProtoByName;
-begin
- GetProcedureAddress(_WSAAsyncGetProtoByName, wsock32, 'WSAAsyncGetProtoByName');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WSAAsyncGetProtoByName]
- end;
-end;
-
-var
- _WSAAsyncGetProtoByNumber: Pointer;
-
-function WSAAsyncGetProtoByNumber;
-begin
- GetProcedureAddress(_WSAAsyncGetProtoByNumber, wsock32, 'WSAAsyncGetProtoByNumber');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WSAAsyncGetProtoByNumber]
- end;
-end;
-
-var
- _WSAAsyncGetHostByName: Pointer;
-
-function WSAAsyncGetHostByName;
-begin
- GetProcedureAddress(_WSAAsyncGetHostByName, wsock32, 'WSAAsyncGetHostByName');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WSAAsyncGetHostByName]
- end;
-end;
-
-var
- _WSAAsyncGetHostByAddr: Pointer;
-
-function WSAAsyncGetHostByAddr;
-begin
- GetProcedureAddress(_WSAAsyncGetHostByAddr, wsock32, 'WSAAsyncGetHostByAddr');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WSAAsyncGetHostByAddr]
- end;
-end;
-
-var
- _WSACancelAsyncRequest: Pointer;
-
-function WSACancelAsyncRequest;
-begin
- GetProcedureAddress(_WSACancelAsyncRequest, wsock32, 'WSACancelAsyncRequest');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WSACancelAsyncRequest]
- end;
-end;
-
-var
- _WSAAsyncSelect: Pointer;
-
-function WSAAsyncSelect;
-begin
- GetProcedureAddress(_WSAAsyncSelect, wsock32, 'WSAAsyncSelect');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WSAAsyncSelect]
- end;
-end;
-
-var
- _WSARecvEx: Pointer;
-
-function WSARecvEx;
-begin
- GetProcedureAddress(_WSARecvEx, wsock32, 'WSARecvEx');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WSARecvEx]
- end;
-end;
-
-var
- _TransmitFile: Pointer;
-
-function TransmitFile;
-begin
- GetProcedureAddress(_TransmitFile, wsock32, 'TransmitFile');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_TransmitFile]
- end;
-end;
-
-var
- _AcceptEx: Pointer;
-
-function AcceptEx;
-begin
- GetProcedureAddress(_AcceptEx, wsock32, 'AcceptEx');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_AcceptEx]
- end;
-end;
-
-var
- _GetAcceptExSockaddrs: Pointer;
-
-procedure GetAcceptExSockaddrs;
-begin
- GetProcedureAddress(_GetAcceptExSockaddrs, wsock32, 'GetAcceptExSockaddrs');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetAcceptExSockaddrs]
- end;
-end;
-
-{$ELSE}
-
-function __WSAFDIsSet; external wsock32 name '__WSAFDIsSet';
-function accept; external wsock32 name 'accept';
-function bind; external wsock32 name 'bind';
-function closesocket; external wsock32 name 'closesocket';
-function connect; external wsock32 name 'connect';
-function ioctlsocket; external wsock32 name 'ioctlsocket';
-function getpeername; external wsock32 name 'getpeername';
-function getsockname; external wsock32 name 'getsockname';
-function getsockopt; external wsock32 name 'getsockopt';
-function htonl; external wsock32 name 'htonl';
-function htons; external wsock32 name 'htons';
-function inet_addr; external wsock32 name 'inet_addr';
-function inet_ntoa; external wsock32 name 'inet_ntoa';
-function listen; external wsock32 name 'listen';
-function ntohl; external wsock32 name 'ntohl';
-function ntohs; external wsock32 name 'ntohs';
-function recv; external wsock32 name 'recv';
-function recvfrom; external wsock32 name 'recvfrom';
-function select; external wsock32 name 'select';
-function send; external wsock32 name 'send';
-function sendto; external wsock32 name 'sendto';
-function setsockopt; external wsock32 name 'setsockopt';
-function shutdown; external wsock32 name 'shutdown';
-function socket; external wsock32 name 'socket';
-function gethostbyaddr; external wsock32 name 'gethostbyaddr';
-function gethostbyname; external wsock32 name 'gethostbyname';
-function gethostname; external wsock32 name 'gethostname';
-function getservbyport; external wsock32 name 'getservbyport';
-function getservbyname; external wsock32 name 'getservbyname';
-function getprotobynumber; external wsock32 name 'getprotobynumber';
-function getprotobyname; external wsock32 name 'getprotobyname';
-function WSAStartup; external wsock32 name 'WSAStartup';
-function WSACleanup; external wsock32 name 'WSACleanup';
-procedure WSASetLastError; external wsock32 name 'WSASetLastError';
-function WSAGetLastError; external wsock32 name 'WSAGetLastError';
-function WSAIsBlocking; external wsock32 name 'WSAIsBlocking';
-function WSAUnhookBlockingHook; external wsock32 name 'WSAUnhookBlockingHook';
-function WSASetBlockingHook; external wsock32 name 'WSASetBlockingHook';
-function WSACancelBlockingCall; external wsock32 name 'WSACancelBlockingCall';
-function WSAAsyncGetServByName; external wsock32 name 'WSAAsyncGetServByName';
-function WSAAsyncGetServByPort; external wsock32 name 'WSAAsyncGetServByPort';
-function WSAAsyncGetProtoByName; external wsock32 name 'WSAAsyncGetProtoByName';
-function WSAAsyncGetProtoByNumber; external wsock32 name 'WSAAsyncGetProtoByNumber';
-function WSAAsyncGetHostByName; external wsock32 name 'WSAAsyncGetHostByName';
-function WSAAsyncGetHostByAddr; external wsock32 name 'WSAAsyncGetHostByAddr';
-function WSACancelAsyncRequest; external wsock32 name 'WSACancelAsyncRequest';
-function WSAAsyncSelect; external wsock32 name 'WSAAsyncSelect';
-function WSARecvEx; external wsock32 name 'WSARecvEx';
-function TransmitFile; external wsock32 name 'TransmitFile';
-function AcceptEx; external wsock32 name 'AcceptEx';
-procedure GetAcceptExSockaddrs; external wsock32 name 'GetAcceptExSockaddrs';
-
-{$ENDIF DYNAMIC_LINK}
-
-end.
+{******************************************************************************}
+{ }
+{ Winsock API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: winsock.h, released June 2000. The original Pascal }
+{ code is: WinSock.pas, released December 2000. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwawinsock.pas,v 1.1 2005/04/04 07:56:11 marco Exp $
+
+unit JwaWinSock;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "winsock.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaWinType, JwaWinBase;
+
+(*
+ * Basic system type definitions, taken from the BSD file sys/types.h.
+ *)
+
+type
+ u_char = Byte;
+ {$EXTERNALSYM u_char}
+ u_short = Word;
+ {$EXTERNALSYM u_short}
+ u_int = Cardinal;
+ {$EXTERNALSYM u_int}
+ u_long = Cardinal;
+ {$EXTERNALSYM u_long}
+
+(*
+ * The new type to be used in all
+ * instances which refer to sockets.
+ *)
+
+type
+ TSocket = UINT_PTR;
+
+(*
+ * Select uses arrays of SOCKETs. These macros manipulate such
+ * arrays. FD_SETSIZE may be defined by the user before including
+ * this file, but the default here should be >= 64.
+ *
+ * CAVEAT IMPLEMENTOR and USER: THESE MACROS AND TYPES MUST BE
+ * INCLUDED IN WINSOCK.H EXACTLY AS SHOWN HERE.
+ *)
+
+const
+ FD_SETSIZE = 64;
+ {$EXTERNALSYM FD_SETSIZE}
+
+type
+ fd_set = record
+ fd_count: u_int; // how many are SET?
+ fd_array: array [0..FD_SETSIZE - 1] of TSocket; // an array of SOCKETs
+ end;
+ {$EXTERNALSYM fd_set}
+ TFdSet = fd_set;
+ PFdSet = ^fd_set;
+
+function __WSAFDIsSet(s: TSocket; var FDSet: TFDSet): Integer; stdcall;
+{$EXTERNALSYM __WSAFDIsSet}
+
+procedure FD_CLR(fd: TSocket; var fdset: TFdSet);
+{$EXTERNALSYM FD_CLR}
+
+procedure _FD_SET(fd: TSocket; var fdset: TFDSet);
+//{$EXTERNALSYM FD_SET}
+
+procedure FD_ZERO(var fdset: TFdSet);
+{$EXTERNALSYM FD_ZERO}
+
+function FD_ISSET(fd: TSocket; var fdset: TFdSet): Boolean;
+{$EXTERNALSYM FD_ISSET}
+
+(*
+ * Structure used in select() call, taken from the BSD file sys/time.h.
+ *)
+
+type
+ timeval = record
+ tv_sec: Longint; // seconds
+ tv_usec: Longint; // and microseconds
+ end;
+ {$EXTERNALSYM timeval}
+ TTimeVal = timeval;
+ PTimeVal = ^timeval;
+
+(*
+ * Operations on timevals.
+ *
+ * NB: timercmp does not work for >= or <=.
+ *)
+
+function timerisset(const tvp: TTimeVal): Boolean;
+{$EXTERNALSYM timerisset}
+
+//function timercmp(const tvp, uvp: TTimeVal; cmp): Boolean;
+//{$EXTERNALSYM timercmp}
+
+procedure timerclear(var tvp: TTimeVal);
+{$EXTERNALSYM timerclear}
+
+(*
+ * Commands for ioctlsocket(), taken from the BSD file fcntl.h.
+ *
+ *
+ * Ioctl's have the command encoded in the lower word,
+ * and the size of any in or out parameters in the upper
+ * word. The high 2 bits of the upper word are used
+ * to encode the in/out status of the parameter; for now
+ * we restrict parameters to at most 128 bytes.
+ *)
+
+const
+ IOCPARM_MASK = $7f; // parameters must be < 128 bytes
+ {$EXTERNALSYM IOCPARM_MASK}
+ IOC_VOID = $20000000; // no parameters
+ {$EXTERNALSYM IOC_VOID}
+ IOC_OUT = $40000000; // copy out parameters
+ {$EXTERNALSYM IOC_OUT}
+ IOC_IN = DWORD($80000000); // copy in parameters
+ {$EXTERNALSYM IOC_IN}
+ IOC_INOUT = DWORD(IOC_IN or IOC_OUT);
+ {$EXTERNALSYM IOC_INOUT}
+
+ // 0x20000000 distinguishes new & old ioctl's
+
+function _IO(x, y: DWORD): DWORD;
+{$EXTERNALSYM _IO}
+
+function _IOR(x, y, t: DWORD): DWORD;
+{$EXTERNALSYM _IOR}
+
+function _IOW(x, y, t: DWORD): DWORD;
+{$EXTERNALSYM _IOW}
+
+const
+ FIONREAD = IOC_OUT or ((SizeOf(u_long) and IOCPARM_MASK) shl 16) or (Ord('f') shl 8) or 127; // get # bytes to read
+ {$EXTERNALSYM FIONREAD}
+ FIONBIO = IOC_OUT or ((SizeOf(u_long) and IOCPARM_MASK) shl 16) or (Ord('f') shl 8) or 126; // set/clear non-blocking i/o
+ {$EXTERNALSYM FIONBIO}
+ FIOASYNC = IOC_OUT or ((SizeOf(u_long) and IOCPARM_MASK) shl 16) or (Ord('f') shl 8) or 125; // set/clear async i/o
+ {$EXTERNALSYM FIOASYNC}
+
+(* Socket I/O Controls *)
+
+ SIOCSHIWAT = DWORD(IOC_IN or ((SizeOf(u_long) and IOCPARM_MASK) shl 16) or (Ord('s') shl 8) or 0); // set high watermark
+ {$EXTERNALSYM SIOCSHIWAT}
+ SIOCGHIWAT = IOC_OUT or ((SizeOf(u_long) and IOCPARM_MASK) shl 16) or (Ord('s') shl 8) or 1; // get high watermark
+ {$EXTERNALSYM SIOCGHIWAT}
+ SIOCSLOWAT = DWORD(IOC_IN or ((SizeOf(u_long) and IOCPARM_MASK) shl 16) or (Ord('s') shl 8) or 2); // set low watermark
+ {$EXTERNALSYM SIOCSLOWAT}
+ SIOCGLOWAT = IOC_OUT or ((SizeOf(u_long) and IOCPARM_MASK) shl 16) or (Ord('s') shl 8) or 3; // get low watermark
+ {$EXTERNALSYM SIOCGLOWAT}
+ SIOCATMARK = IOC_OUT or ((SizeOf(u_long) and IOCPARM_MASK) shl 16) or (Ord('s') shl 8) or 7; // at oob mark?
+ {$EXTERNALSYM SIOCATMARK}
+
+(*
+ * Structures returned by network data base library, taken from the
+ * BSD file netdb.h. All addresses are supplied in host order, and
+ * returned in network order (suitable for use in system calls).
+ *)
+
+type
+ hostent = record
+ h_name: PChar; // official name of host
+ h_aliases: PPChar; // alias list
+ h_addrtype: Smallint; // host address type
+ h_length: Smallint; // length of address
+ case Integer of
+ 0: (h_addr_list: PPChar); // list of addresses
+ 1: (h_addr: PPChar); // address, for backward compat
+ end;
+ {$EXTERNALSYM hostent}
+ THostEnt = hostent;
+ PHostEnt = ^hostent;
+
+(*
+ * It is assumed here that a network number
+ * fits in 32 bits.
+ *)
+
+type
+ netent = record
+ n_name: PChar; // official name of net
+ n_aliases: PPChar; // alias list
+ n_addrtype: Smallint; // net address type
+ n_net: u_long; // network #
+ end;
+ {$EXTERNALSYM netent}
+ TNetEnt = netent;
+ PNetEnt = ^netent;
+
+ servent = record
+ s_name: PChar; // official service name
+ s_aliases: PPChar; // alias list
+ s_port: Smallint; // port #
+ s_proto: PChar; // protocol to use
+ end;
+ {$EXTERNALSYM servent}
+ TServEnt = servent;
+ PServEnt = ^servent;
+
+ protoent = record
+ p_name: PChar; // official protocol name
+ p_aliases: PPChar; // alias list
+ p_proto: Smallint; // protocol #
+ end;
+ {$EXTERNALSYM protoent}
+ TProtoEnt = protoent;
+ PProtoEnt = ^protoent;
+
+(*
+ * Constants and structures defined by the internet system,
+ * Per RFC 790, September 1981, taken from the BSD file netinet/in.h.
+ *)
+
+(*
+ * Protocols
+ *)
+
+const
+ IPPROTO_IP = 0; // dummy for IP
+ {$EXTERNALSYM IPPROTO_IP}
+ IPPROTO_ICMP = 1; // control message protocol
+ {$EXTERNALSYM IPPROTO_ICMP}
+ IPPROTO_IGMP = 2; // internet group management protocol
+ {$EXTERNALSYM IPPROTO_IGMP}
+ IPPROTO_GGP = 3; // gateway^2 (deprecated)
+ {$EXTERNALSYM IPPROTO_GGP}
+ IPPROTO_TCP = 6; // tcp
+ {$EXTERNALSYM IPPROTO_TCP}
+ IPPROTO_PUP = 12; // pup
+ {$EXTERNALSYM IPPROTO_PUP}
+ IPPROTO_UDP = 17; // user datagram protocol
+ {$EXTERNALSYM IPPROTO_UDP}
+ IPPROTO_IDP = 22; // xns idp
+ {$EXTERNALSYM IPPROTO_IDP}
+ IPPROTO_ND = 77; // UNOFFICIAL net disk proto
+ {$EXTERNALSYM IPPROTO_ND}
+
+ IPPROTO_RAW = 255; // raw IP packet
+ {$EXTERNALSYM IPPROTO_RAW}
+ IPPROTO_MAX = 256;
+ {$EXTERNALSYM IPPROTO_MAX}
+
+(*
+ * Port/socket numbers: network standard functions
+ *)
+
+ IPPORT_ECHO = 7;
+ {$EXTERNALSYM IPPORT_ECHO}
+ IPPORT_DISCARD = 9;
+ {$EXTERNALSYM IPPORT_DISCARD}
+ IPPORT_SYSTAT = 11;
+ {$EXTERNALSYM IPPORT_SYSTAT}
+ IPPORT_DAYTIME = 13;
+ {$EXTERNALSYM IPPORT_DAYTIME}
+ IPPORT_NETSTAT = 15;
+ {$EXTERNALSYM IPPORT_NETSTAT}
+ IPPORT_FTP = 21;
+ {$EXTERNALSYM IPPORT_FTP}
+ IPPORT_TELNET = 23;
+ {$EXTERNALSYM IPPORT_TELNET}
+ IPPORT_SMTP = 25;
+ {$EXTERNALSYM IPPORT_SMTP}
+ IPPORT_TIMESERVER = 37;
+ {$EXTERNALSYM IPPORT_TIMESERVER}
+ IPPORT_NAMESERVER = 42;
+ {$EXTERNALSYM IPPORT_NAMESERVER}
+ IPPORT_WHOIS = 43;
+ {$EXTERNALSYM IPPORT_WHOIS}
+ IPPORT_MTP = 57;
+ {$EXTERNALSYM IPPORT_MTP}
+
+(*
+ * Port/socket numbers: host specific functions
+ *)
+
+ IPPORT_TFTP = 69;
+ {$EXTERNALSYM IPPORT_TFTP}
+ IPPORT_RJE = 77;
+ {$EXTERNALSYM IPPORT_RJE}
+ IPPORT_FINGER = 79;
+ {$EXTERNALSYM IPPORT_FINGER}
+ IPPORT_TTYLINK = 87;
+ {$EXTERNALSYM IPPORT_TTYLINK}
+ IPPORT_SUPDUP = 95;
+ {$EXTERNALSYM IPPORT_SUPDUP}
+
+(*
+ * UNIX TCP sockets
+ *)
+
+ IPPORT_EXECSERVER = 512;
+ {$EXTERNALSYM IPPORT_EXECSERVER}
+ IPPORT_LOGINSERVER = 513;
+ {$EXTERNALSYM IPPORT_LOGINSERVER}
+ IPPORT_CMDSERVER = 514;
+ {$EXTERNALSYM IPPORT_CMDSERVER}
+ IPPORT_EFSSERVER = 520;
+ {$EXTERNALSYM IPPORT_EFSSERVER}
+
+(*
+ * UNIX UDP sockets
+ *)
+
+ IPPORT_BIFFUDP = 512;
+ {$EXTERNALSYM IPPORT_BIFFUDP}
+ IPPORT_WHOSERVER = 513;
+ {$EXTERNALSYM IPPORT_WHOSERVER}
+ IPPORT_ROUTESERVER = 520;
+ {$EXTERNALSYM IPPORT_ROUTESERVER}
+
+ (* 520+1 also used *)
+
+(*
+ * Ports < IPPORT_RESERVED are reserved for
+ * privileged processes (e.g. root).
+ *)
+
+ IPPORT_RESERVED = 1024;
+ {$EXTERNALSYM IPPORT_RESERVED}
+
+(*
+ * Link numbers
+ *)
+
+ IMPLINK_IP = 155;
+ {$EXTERNALSYM IMPLINK_IP}
+ IMPLINK_LOWEXPER = 156;
+ {$EXTERNALSYM IMPLINK_LOWEXPER}
+ IMPLINK_HIGHEXPER = 158;
+ {$EXTERNALSYM IMPLINK_HIGHEXPER}
+
+(*
+ * Internet address (old style... should be updated)
+ *)
+
+type
+ SunB = packed record
+ s_b1, s_b2, s_b3, s_b4: u_char;
+ end;
+ {$EXTERNALSYM SunB}
+
+ SunW = packed record
+ s_w1, s_w2: u_short;
+ end;
+ {$EXTERNALSYM SunW}
+
+ in_addr = record
+ case Integer of
+ 0: (S_un_b: SunB);
+ 1: (S_un_w: SunW);
+ 2: (S_addr: u_long);
+ // #define s_addr S_un.S_addr // can be used for most tcp & ip code
+ // #define s_host S_un.S_un_b.s_b2 // host on imp
+ // #define s_net S_un.S_un_b.s_b1 // netword
+ // #define s_imp S_un.S_un_w.s_w2 // imp
+ // #define s_impno S_un.S_un_b.s_b4 // imp #
+ // #define s_lh S_un.S_un_b.s_b3 // logical host
+ end;
+ {$EXTERNALSYM in_addr}
+ TInAddr = in_addr;
+ PInAddr = ^in_addr;
+
+(*
+ * Definitions of bits in internet address integers.
+ * On subnets, the decomposition of addresses to host and net parts
+ * is done according to subnet mask, not the masks here.
+ *)
+
+function IN_CLASSA(i: DWORD): Boolean;
+{$EXTERNALSYM IN_CLASSA}
+
+const
+ IN_CLASSA_NET = DWORD($ff000000);
+ {$EXTERNALSYM IN_CLASSA_NET}
+ IN_CLASSA_NSHIFT = 24;
+ {$EXTERNALSYM IN_CLASSA_NSHIFT}
+ IN_CLASSA_HOST = $00ffffff;
+ {$EXTERNALSYM IN_CLASSA_HOST}
+ IN_CLASSA_MAX = 128;
+ {$EXTERNALSYM IN_CLASSA_MAX}
+
+function IN_CLASSB(i: DWORD): Boolean;
+{$EXTERNALSYM IN_CLASSB}
+
+const
+ IN_CLASSB_NET = DWORD($ffff0000);
+ {$EXTERNALSYM IN_CLASSB_NET}
+ IN_CLASSB_NSHIFT = 16;
+ {$EXTERNALSYM IN_CLASSB_NSHIFT}
+ IN_CLASSB_HOST = $0000ffff;
+ {$EXTERNALSYM IN_CLASSB_HOST}
+ IN_CLASSB_MAX = 65536;
+ {$EXTERNALSYM IN_CLASSB_MAX}
+
+function IN_CLASSC(i: DWORD): Boolean;
+{$EXTERNALSYM IN_CLASSC}
+
+const
+ IN_CLASSC_NET = DWORD($ffffff00);
+ {$EXTERNALSYM IN_CLASSC_NET}
+ IN_CLASSC_NSHIFT = 8;
+ {$EXTERNALSYM IN_CLASSC_NSHIFT}
+ IN_CLASSC_HOST = $000000ff;
+ {$EXTERNALSYM IN_CLASSC_HOST}
+
+const
+ INADDR_ANY = u_long($00000000);
+ {$EXTERNALSYM INADDR_ANY}
+ INADDR_LOOPBACK = $7f000001;
+ {$EXTERNALSYM INADDR_LOOPBACK}
+ INADDR_BROADCAST = u_long($ffffffff);
+ {$EXTERNALSYM INADDR_BROADCAST}
+ INADDR_NONE = DWORD($ffffffff);
+ {$EXTERNALSYM INADDR_NONE}
+
+(*
+ * Socket address, internet style.
+ *)
+
+type
+ sockaddr_in = record
+ sin_family: Smallint;
+ sin_port: u_short;
+ sin_addr: in_addr;
+ sin_zero: array [0..7] of Char;
+ end;
+ {$EXTERNALSYM sockaddr_in}
+ TSockAddrIn = sockaddr_in;
+ PSockAddrIn = ^sockaddr_in;
+
+const
+ WSADESCRIPTION_LEN = 256;
+ {$EXTERNALSYM WSADESCRIPTION_LEN}
+ WSASYS_STATUS_LEN = 128;
+ {$EXTERNALSYM WSASYS_STATUS_LEN}
+
+type
+ WSAData = record
+ wVersion: WORD;
+ wHighVersion: WORD;
+ szDescription: array [0..WSADESCRIPTION_LEN] of Char;
+ szSystemStatus: array [0..WSASYS_STATUS_LEN] of Char;
+ iMaxSockets: Word;
+ iMaxUdpDg: Word;
+ lpVendorInfo: PChar;
+ end;
+ {$EXTERNALSYM WSAData}
+ LPWSADATA = ^WSAData;
+ {$EXTERNALSYM LPWSADATA}
+ TWsaData = WSAData;
+ PWsaData = LPWSADATA;
+
+(*
+ * Options for use with [gs]etsockopt at the IP level.
+ *)
+
+const
+ IP_OPTIONS = 1; (* set/get IP per-packet options *)
+ {$EXTERNALSYM IP_OPTIONS}
+ IP_MULTICAST_IF = 2; (* set/get IP multicast interface *)
+ {$EXTERNALSYM IP_MULTICAST_IF}
+ IP_MULTICAST_TTL = 3; (* set/get IP multicast timetolive *)
+ {$EXTERNALSYM IP_MULTICAST_TTL}
+ IP_MULTICAST_LOOP = 4; (* set/get IP multicast loopback *)
+ {$EXTERNALSYM IP_MULTICAST_LOOP}
+ IP_ADD_MEMBERSHIP = 5; (* add an IP group membership *)
+ {$EXTERNALSYM IP_ADD_MEMBERSHIP}
+ IP_DROP_MEMBERSHIP = 6; (* drop an IP group membership *)
+ {$EXTERNALSYM IP_DROP_MEMBERSHIP}
+ IP_TTL = 7; (* set/get IP Time To Live *)
+ {$EXTERNALSYM IP_TTL}
+ IP_TOS = 8; (* set/get IP Type Of Service *)
+ {$EXTERNALSYM IP_TOS}
+ IP_DONTFRAGMENT = 9; (* set/get IP Don't Fragment flag *)
+ {$EXTERNALSYM IP_DONTFRAGMENT}
+
+ IP_DEFAULT_MULTICAST_TTL = 1; (* normally limit m'casts to 1 hop *)
+ {$EXTERNALSYM IP_DEFAULT_MULTICAST_TTL}
+ IP_DEFAULT_MULTICAST_LOOP = 1; (* normally hear sends if a member *)
+ {$EXTERNALSYM IP_DEFAULT_MULTICAST_LOOP}
+ IP_MAX_MEMBERSHIPS = 20; (* per socket; must fit in one mbuf *)
+ {$EXTERNALSYM IP_MAX_MEMBERSHIPS}
+
+(*
+ * Argument structure for IP_ADD_MEMBERSHIP and IP_DROP_MEMBERSHIP.
+ *)
+
+type
+ ip_mreq = record
+ imr_multiaddr: in_addr; (* IP multicast address of group *)
+ mr_interface: in_addr; (* local IP address of interface *)
+ end;
+ {$EXTERNALSYM ip_mreq}
+ TIpMReq = ip_mreq;
+ PIpMReq = ^ip_mreq;
+
+(*
+ * Definitions related to sockets: types, address families, options,
+ * taken from the BSD file sys/socket.h.
+ *)
+
+(*
+ * This is used instead of -1, since the
+ * SOCKET type is unsigned.
+ *)
+
+const
+ INVALID_SOCKET = TSocket(not 0);
+ {$EXTERNALSYM INVALID_SOCKET}
+ SOCKET_ERROR = -1;
+ {$EXTERNALSYM SOCKET_ERROR}
+
+(*
+ * Types
+ *)
+
+ SOCK_STREAM = 1; // stream socket
+ {$EXTERNALSYM SOCK_STREAM}
+ SOCK_DGRAM = 2; // datagram socket
+ {$EXTERNALSYM SOCK_DGRAM}
+ SOCK_RAW = 3; // raw-protocol interface
+ {$EXTERNALSYM SOCK_RAW}
+ SOCK_RDM = 4; // reliably-delivered message
+ {$EXTERNALSYM SOCK_RDM}
+ SOCK_SEQPACKET = 5; // sequenced packet stream
+ {$EXTERNALSYM SOCK_SEQPACKET}
+
+(*
+ * Option flags per-socket.
+ *)
+
+ SO_DEBUG = $0001; // turn on debugging info recording
+ {$EXTERNALSYM SO_DEBUG}
+ SO_ACCEPTCONN = $0002; // socket has had listen()
+ {$EXTERNALSYM SO_ACCEPTCONN}
+ SO_REUSEADDR = $0004; // allow local address reuse
+ {$EXTERNALSYM SO_REUSEADDR}
+ SO_KEEPALIVE = $0008; // keep connections alive
+ {$EXTERNALSYM SO_KEEPALIVE}
+ SO_DONTROUTE = $0010; // just use interface addresses
+ {$EXTERNALSYM SO_DONTROUTE}
+ SO_BROADCAST = $0020; // permit sending of broadcast msgs
+ {$EXTERNALSYM SO_BROADCAST}
+ SO_USELOOPBACK = $0040; // bypass hardware when possible
+ {$EXTERNALSYM SO_USELOOPBACK}
+ SO_LINGER = $0080; // linger on close if data present
+ {$EXTERNALSYM SO_LINGER}
+ SO_OOBINLINE = $0100; // leave received OOB data in line
+ {$EXTERNALSYM SO_OOBINLINE}
+
+ SO_DONTLINGER = DWORD(not SO_LINGER);
+ {$EXTERNALSYM SO_DONTLINGER}
+
+(*
+ * Additional options.
+ *)
+
+ SO_SNDBUF = $1001; // send buffer size
+ {$EXTERNALSYM SO_SNDBUF}
+ SO_RCVBUF = $1002; // receive buffer size
+ {$EXTERNALSYM SO_RCVBUF}
+ SO_SNDLOWAT = $1003; // send low-water mark
+ {$EXTERNALSYM SO_SNDLOWAT}
+ SO_RCVLOWAT = $1004; // receive low-water mark
+ {$EXTERNALSYM SO_RCVLOWAT}
+ SO_SNDTIMEO = $1005; // send timeout
+ {$EXTERNALSYM SO_SNDTIMEO}
+ SO_RCVTIMEO = $1006; // receive timeout
+ {$EXTERNALSYM SO_RCVTIMEO}
+ SO_ERROR = $1007; // get error status and clear
+ {$EXTERNALSYM SO_ERROR}
+ SO_TYPE = $1008; // get socket type
+ {$EXTERNALSYM SO_TYPE}
+
+(*
+ * Options for connect and disconnect data and options. Used only by
+ * non-TCP/IP transports such as DECNet, OSI TP4, etc.
+ *)
+
+ SO_CONNDATA = $7000;
+ {$EXTERNALSYM SO_CONNDATA}
+ SO_CONNOPT = $7001;
+ {$EXTERNALSYM SO_CONNOPT}
+ SO_DISCDATA = $7002;
+ {$EXTERNALSYM SO_DISCDATA}
+ SO_DISCOPT = $7003;
+ {$EXTERNALSYM SO_DISCOPT}
+ SO_CONNDATALEN = $7004;
+ {$EXTERNALSYM SO_CONNDATALEN}
+ SO_CONNOPTLEN = $7005;
+ {$EXTERNALSYM SO_CONNOPTLEN}
+ SO_DISCDATALEN = $7006;
+ {$EXTERNALSYM SO_DISCDATALEN}
+ SO_DISCOPTLEN = $7007;
+ {$EXTERNALSYM SO_DISCOPTLEN}
+
+(*
+ * Option for opening sockets for synchronous access.
+ *)
+
+ SO_OPENTYPE = $7008;
+ {$EXTERNALSYM SO_OPENTYPE}
+
+ SO_SYNCHRONOUS_ALERT = $10;
+ {$EXTERNALSYM SO_SYNCHRONOUS_ALERT}
+ SO_SYNCHRONOUS_NONALERT = $20;
+ {$EXTERNALSYM SO_SYNCHRONOUS_NONALERT}
+
+(*
+ * Other NT-specific options.
+ *)
+
+ SO_MAXDG = $7009;
+ {$EXTERNALSYM SO_MAXDG}
+ SO_MAXPATHDG = $700A;
+ {$EXTERNALSYM SO_MAXPATHDG}
+ SO_UPDATE_ACCEPT_CONTEXT = $700B;
+ {$EXTERNALSYM SO_UPDATE_ACCEPT_CONTEXT}
+ SO_CONNECT_TIME = $700C;
+ {$EXTERNALSYM SO_CONNECT_TIME}
+
+(*
+ * TCP options.
+ *)
+
+ TCP_NODELAY = $0001;
+ {$EXTERNALSYM TCP_NODELAY}
+ TCP_BSDURGENT = $7000;
+ {$EXTERNALSYM TCP_BSDURGENT}
+
+(*
+ * Address families.
+ *)
+
+ AF_UNSPEC = 0; // unspecified
+ {$EXTERNALSYM AF_UNSPEC}
+ AF_UNIX = 1; // local to host (pipes, portals
+ {$EXTERNALSYM AF_UNIX}
+ AF_INET = 2; // internetwork: UDP, TCP, etc.
+ {$EXTERNALSYM AF_INET}
+ AF_IMPLINK = 3; // arpanet imp addresses
+ {$EXTERNALSYM AF_IMPLINK}
+ AF_PUP = 4; // pup protocols: e.g. BSP
+ {$EXTERNALSYM AF_PUP}
+ AF_CHAOS = 5; // mit CHAOS protocols
+ {$EXTERNALSYM AF_CHAOS}
+ AF_NS = 6; // XEROX NS protocols
+ {$EXTERNALSYM AF_NS}
+ AF_IPX = AF_NS; // IPX protocols: IPX, SPX, etc.
+ {$EXTERNALSYM AF_IPX}
+ AF_ISO = 7; // ISO protocols
+ {$EXTERNALSYM AF_ISO}
+ AF_OSI = AF_ISO; // OSI is ISO
+ {$EXTERNALSYM AF_OSI}
+ AF_ECMA = 8; // european computer manufacturers
+ {$EXTERNALSYM AF_ECMA}
+ AF_DATAKIT = 9; // datakit protocols
+ {$EXTERNALSYM AF_DATAKIT}
+ AF_CCITT = 10; // CCITT protocols, X.25 etc
+ {$EXTERNALSYM AF_CCITT}
+ AF_SNA = 11; // IBM SNA
+ {$EXTERNALSYM AF_SNA}
+ AF_DECnet = 12; // DECnet
+ {$EXTERNALSYM AF_DECnet}
+ AF_DLI = 13; // Direct data link interface
+ {$EXTERNALSYM AF_DLI}
+ AF_LAT = 14; // LAT
+ {$EXTERNALSYM AF_LAT}
+ AF_HYLINK = 15; // NSC Hyperchannel
+ {$EXTERNALSYM AF_HYLINK}
+ AF_APPLETALK = 16; // AppleTalk
+ {$EXTERNALSYM AF_APPLETALK}
+ AF_NETBIOS = 17; // NetBios-style addresses
+ {$EXTERNALSYM AF_NETBIOS}
+ AF_VOICEVIEW = 18; // VoiceView
+ {$EXTERNALSYM AF_VOICEVIEW}
+ AF_FIREFOX = 19; // Protocols from Firefox
+ {$EXTERNALSYM AF_FIREFOX}
+ AF_UNKNOWN1 = 20; // Somebody is using this!
+ {$EXTERNALSYM AF_UNKNOWN1}
+ AF_BAN = 21; // Banyan
+ {$EXTERNALSYM AF_BAN}
+
+ AF_MAX = 22;
+ {$EXTERNALSYM AF_MAX}
+
+(*
+ * Structure used by kernel to store most
+ * addresses.
+ *)
+
+type
+ sockaddr = record
+ sa_family: u_short; // address family
+ sa_data: array [0..13] of Char; // up to 14 bytes of direct address
+ end;
+ {$EXTERNALSYM sockaddr}
+ TSockAddr = sockaddr;
+ PSockAddr = ^sockaddr;
+
+(*
+ * Structure used by kernel to pass protocol
+ * information in raw sockets.
+ *)
+
+ sockproto = record
+ sp_family: u_short; // address family
+ sp_protocol: u_short; // protocol
+ end;
+ {$EXTERNALSYM sockproto}
+ TSockProto = sockproto;
+ PSockProto = ^sockproto;
+
+(*
+ * Protocol families, same as address families for now.
+ *)
+
+const
+ PF_UNSPEC = AF_UNSPEC;
+ {$EXTERNALSYM PF_UNSPEC}
+ PF_UNIX = AF_UNIX;
+ {$EXTERNALSYM PF_UNIX}
+ PF_INET = AF_INET;
+ {$EXTERNALSYM PF_INET}
+ PF_IMPLINK = AF_IMPLINK;
+ {$EXTERNALSYM PF_IMPLINK}
+ PF_PUP = AF_PUP;
+ {$EXTERNALSYM PF_PUP}
+ PF_CHAOS = AF_CHAOS;
+ {$EXTERNALSYM PF_CHAOS}
+ PF_NS = AF_NS;
+ {$EXTERNALSYM PF_NS}
+ PF_IPX = AF_IPX;
+ {$EXTERNALSYM PF_IPX}
+ PF_ISO = AF_ISO;
+ {$EXTERNALSYM PF_ISO}
+ PF_OSI = AF_OSI;
+ {$EXTERNALSYM PF_OSI}
+ PF_ECMA = AF_ECMA;
+ {$EXTERNALSYM PF_ECMA}
+ PF_DATAKIT = AF_DATAKIT;
+ {$EXTERNALSYM PF_DATAKIT}
+ PF_CCITT = AF_CCITT;
+ {$EXTERNALSYM PF_CCITT}
+ PF_SNA = AF_SNA;
+ {$EXTERNALSYM PF_SNA}
+ PF_DECnet = AF_DECnet;
+ {$EXTERNALSYM PF_DECnet}
+ PF_DLI = AF_DLI;
+ {$EXTERNALSYM PF_DLI}
+ PF_LAT = AF_LAT;
+ {$EXTERNALSYM PF_LAT}
+ PF_HYLINK = AF_HYLINK;
+ {$EXTERNALSYM PF_HYLINK}
+ PF_APPLETALK = AF_APPLETALK;
+ {$EXTERNALSYM PF_APPLETALK}
+ PF_VOICEVIEW = AF_VOICEVIEW;
+ {$EXTERNALSYM PF_VOICEVIEW}
+ PF_FIREFOX = AF_FIREFOX;
+ {$EXTERNALSYM PF_FIREFOX}
+ PF_UNKNOWN1 = AF_UNKNOWN1;
+ {$EXTERNALSYM PF_UNKNOWN1}
+ PF_BAN = AF_BAN;
+ {$EXTERNALSYM PF_BAN}
+
+ PF_MAX = AF_MAX;
+ {$EXTERNALSYM PF_MAX}
+
+(*
+ * Structure used for manipulating linger option.
+ *)
+
+type
+ linger = record
+ l_onoff: u_short; // option on/off
+ l_linger: u_short; // linger time
+ end;
+ {$EXTERNALSYM linger}
+ TLinger = linger;
+ PLinger = ^linger;
+
+(*
+ * Level number for (get/set)sockopt() to apply to socket itself.
+ *)
+
+const
+ SOL_SOCKET = $ffff; // options for socket level
+ {$EXTERNALSYM SOL_SOCKET}
+
+(*
+ * Maximum queue length specifiable by listen.
+ *)
+
+ SOMAXCONN = $7fffffff;
+ {$EXTERNALSYM SOMAXCONN}
+
+ MSG_OOB = $1; // process out-of-band data
+ {$EXTERNALSYM MSG_OOB}
+ MSG_PEEK = $2; // peek at incoming message
+ {$EXTERNALSYM MSG_PEEK}
+ MSG_DONTROUTE = $4; // send without using routing tables
+ {$EXTERNALSYM MSG_DONTROUTE}
+
+ MSG_MAXIOVLEN = 16;
+ {$EXTERNALSYM MSG_MAXIOVLEN}
+
+ MSG_PARTIAL = $8000; // partial send or recv for message xport
+ {$EXTERNALSYM MSG_PARTIAL}
+
+(*
+ * Define constant based on rfc883, used by gethostbyxxxx() calls.
+ *)
+
+ MAXGETHOSTSTRUCT = 1024;
+ {$EXTERNALSYM MAXGETHOSTSTRUCT}
+
+(*
+ * Define flags to be used with the WSAAsyncSelect() call.
+ *)
+
+ FD_READ = $01;
+ {$EXTERNALSYM FD_READ}
+ FD_WRITE = $02;
+ {$EXTERNALSYM FD_WRITE}
+ FD_OOB = $04;
+ {$EXTERNALSYM FD_OOB}
+ FD_ACCEPT = $08;
+ {$EXTERNALSYM FD_ACCEPT}
+ FD_CONNECT = $10;
+ {$EXTERNALSYM FD_CONNECT}
+ FD_CLOSE = $20;
+ {$EXTERNALSYM FD_CLOSE}
+
+(*
+ * All Windows Sockets error constants are biased by WSABASEERR from
+ * the "normal"
+ *)
+
+ WSABASEERR = 10000;
+ {$EXTERNALSYM WSABASEERR}
+
+(*
+ * Windows Sockets definitions of regular Microsoft C error constants
+ *)
+
+ WSAEINTR = WSABASEERR + 4;
+ {$EXTERNALSYM WSAEINTR}
+ WSAEBADF = WSABASEERR + 9;
+ {$EXTERNALSYM WSAEBADF}
+ WSAEACCES = WSABASEERR + 13;
+ {$EXTERNALSYM WSAEACCES}
+ WSAEFAULT = WSABASEERR + 14;
+ {$EXTERNALSYM WSAEFAULT}
+ WSAEINVAL = WSABASEERR + 22;
+ {$EXTERNALSYM WSAEINVAL}
+ WSAEMFILE = WSABASEERR + 24;
+ {$EXTERNALSYM WSAEMFILE}
+
+(*
+ * Windows Sockets definitions of regular Berkeley error constants
+ *)
+
+ WSAEWOULDBLOCK = WSABASEERR + 35;
+ {$EXTERNALSYM WSAEWOULDBLOCK}
+ WSAEINPROGRESS = WSABASEERR + 36;
+ {$EXTERNALSYM WSAEINPROGRESS}
+ WSAEALREADY = WSABASEERR + 37;
+ {$EXTERNALSYM WSAEALREADY}
+ WSAENOTSOCK = WSABASEERR + 38;
+ {$EXTERNALSYM WSAENOTSOCK}
+ WSAEDESTADDRREQ = WSABASEERR + 39;
+ {$EXTERNALSYM WSAEDESTADDRREQ}
+ WSAEMSGSIZE = WSABASEERR + 40;
+ {$EXTERNALSYM WSAEMSGSIZE}
+ WSAEPROTOTYPE = WSABASEERR + 41;
+ {$EXTERNALSYM WSAEPROTOTYPE}
+ WSAENOPROTOOPT = WSABASEERR + 42;
+ {$EXTERNALSYM WSAENOPROTOOPT}
+ WSAEPROTONOSUPPORT = WSABASEERR + 43;
+ {$EXTERNALSYM WSAEPROTONOSUPPORT}
+ WSAESOCKTNOSUPPORT = WSABASEERR + 44;
+ {$EXTERNALSYM WSAESOCKTNOSUPPORT}
+ WSAEOPNOTSUPP = WSABASEERR + 45;
+ {$EXTERNALSYM WSAEOPNOTSUPP}
+ WSAEPFNOSUPPORT = WSABASEERR + 46;
+ {$EXTERNALSYM WSAEPFNOSUPPORT}
+ WSAEAFNOSUPPORT = WSABASEERR + 47;
+ {$EXTERNALSYM WSAEAFNOSUPPORT}
+ WSAEADDRINUSE = WSABASEERR + 48;
+ {$EXTERNALSYM WSAEADDRINUSE}
+ WSAEADDRNOTAVAIL = WSABASEERR + 49;
+ {$EXTERNALSYM WSAEADDRNOTAVAIL}
+ WSAENETDOWN = WSABASEERR + 50;
+ {$EXTERNALSYM WSAENETDOWN}
+ WSAENETUNREACH = WSABASEERR + 51;
+ {$EXTERNALSYM WSAENETUNREACH}
+ WSAENETRESET = WSABASEERR + 52;
+ {$EXTERNALSYM WSAENETRESET}
+ WSAECONNABORTED = WSABASEERR + 53;
+ {$EXTERNALSYM WSAECONNABORTED}
+ WSAECONNRESET = WSABASEERR + 54;
+ {$EXTERNALSYM WSAECONNRESET}
+ WSAENOBUFS = WSABASEERR + 55;
+ {$EXTERNALSYM WSAENOBUFS}
+ WSAEISCONN = WSABASEERR + 56;
+ {$EXTERNALSYM WSAEISCONN}
+ WSAENOTCONN = WSABASEERR + 57;
+ {$EXTERNALSYM WSAENOTCONN}
+ WSAESHUTDOWN = WSABASEERR + 58;
+ {$EXTERNALSYM WSAESHUTDOWN}
+ WSAETOOMANYREFS = WSABASEERR + 59;
+ {$EXTERNALSYM WSAETOOMANYREFS}
+ WSAETIMEDOUT = WSABASEERR + 60;
+ {$EXTERNALSYM WSAETIMEDOUT}
+ WSAECONNREFUSED = WSABASEERR + 61;
+ {$EXTERNALSYM WSAECONNREFUSED}
+ WSAELOOP = WSABASEERR + 62;
+ {$EXTERNALSYM WSAELOOP}
+ WSAENAMETOOLONG = WSABASEERR + 63;
+ {$EXTERNALSYM WSAENAMETOOLONG}
+ WSAEHOSTDOWN = WSABASEERR + 64;
+ {$EXTERNALSYM WSAEHOSTDOWN}
+ WSAEHOSTUNREACH = WSABASEERR + 65;
+ {$EXTERNALSYM WSAEHOSTUNREACH}
+ WSAENOTEMPTY = WSABASEERR + 66;
+ {$EXTERNALSYM WSAENOTEMPTY}
+ WSAEPROCLIM = WSABASEERR + 67;
+ {$EXTERNALSYM WSAEPROCLIM}
+ WSAEUSERS = WSABASEERR + 68;
+ {$EXTERNALSYM WSAEUSERS}
+ WSAEDQUOT = WSABASEERR + 69;
+ {$EXTERNALSYM WSAEDQUOT}
+ WSAESTALE = WSABASEERR + 70;
+ {$EXTERNALSYM WSAESTALE}
+ WSAEREMOTE = WSABASEERR + 71;
+ {$EXTERNALSYM WSAEREMOTE}
+
+ WSAEDISCON = WSABASEERR + 101;
+ {$EXTERNALSYM WSAEDISCON}
+
+(*
+ * Extended Windows Sockets error constant definitions
+ *)
+
+ WSASYSNOTREADY = WSABASEERR + 91;
+ {$EXTERNALSYM WSASYSNOTREADY}
+ WSAVERNOTSUPPORTED = WSABASEERR + 92;
+ {$EXTERNALSYM WSAVERNOTSUPPORTED}
+ WSANOTINITIALISED = WSABASEERR + 93;
+ {$EXTERNALSYM WSANOTINITIALISED}
+
+(*
+ * Error return codes from gethostbyname() and gethostbyaddr()
+ * (when using the resolver). Note that these errors are
+ * retrieved via WSAGetLastError() and must therefore follow
+ * the rules for avoiding clashes with error numbers from
+ * specific implementations or language run-time systems.
+ * For this reason the codes are based at WSABASEERR+1001.
+ * Note also that [WSA]NO_ADDRESS is defined only for
+ * compatibility purposes.
+ *)
+
+// Authoritative Answer: Host not found
+
+ WSAHOST_NOT_FOUND = WSABASEERR + 1001;
+ {$EXTERNALSYM WSAHOST_NOT_FOUND}
+
+// Non-Authoritative: Host not found, or SERVERFAIL
+
+ WSATRY_AGAIN = WSABASEERR + 1002;
+ {$EXTERNALSYM WSATRY_AGAIN}
+
+// Non-recoverable errors, FORMERR, REFUSED, NOTIMP
+
+ WSANO_RECOVERY = WSABASEERR + 1003;
+ {$EXTERNALSYM WSANO_RECOVERY}
+
+// Valid name, no data record of requested type
+
+ WSANO_DATA = WSABASEERR + 1004;
+ {$EXTERNALSYM WSANO_DATA}
+
+(*
+ * Compatibility macros.
+ *)
+
+function h_errno: Integer;
+{$EXTERNALSYM h_errno}
+
+const
+ HOST_NOT_FOUND = WSAHOST_NOT_FOUND;
+ {$EXTERNALSYM HOST_NOT_FOUND}
+ TRY_AGAIN = WSATRY_AGAIN;
+ {$EXTERNALSYM TRY_AGAIN}
+ NO_RECOVERY = WSANO_RECOVERY;
+ {$EXTERNALSYM NO_RECOVERY}
+ NO_DATA = WSANO_DATA;
+ {$EXTERNALSYM NO_DATA}
+
+// no address, look for MX record
+
+ WSANO_ADDRESS = WSANO_DATA;
+ {$EXTERNALSYM WSANO_ADDRESS}
+ NO_ADDRESS = WSANO_ADDRESS;
+ {$EXTERNALSYM NO_ADDRESS}
+
+(*
+ * Windows Sockets errors redefined as regular Berkeley error constants.
+ * These are commented out in Windows NT to avoid conflicts with errno.h.
+ * Use the WSA constants instead.
+ *)
+
+{$IFDEF FALSE}
+
+const
+ EWOULDBLOCK = WSAEWOULDBLOCK;
+ {$EXTERNALSYM EWOULDBLOCK}
+ EINPROGRESS = WSAEINPROGRESS;
+ {$EXTERNALSYM EINPROGRESS}
+ EALREADY = WSAEALREADY;
+ {$EXTERNALSYM EALREADY}
+ ENOTSOCK = WSAENOTSOCK;
+ {$EXTERNALSYM ENOTSOCK}
+ EDESTADDRREQ = WSAEDESTADDRREQ;
+ {$EXTERNALSYM EDESTADDRREQ}
+ EMSGSIZE = WSAEMSGSIZE;
+ {$EXTERNALSYM EMSGSIZE}
+ EPROTOTYPE = WSAEPROTOTYPE;
+ {$EXTERNALSYM EPROTOTYPE}
+ ENOPROTOOPT = WSAENOPROTOOPT;
+ {$EXTERNALSYM ENOPROTOOPT}
+ EPROTONOSUPPORT = WSAEPROTONOSUPPORT;
+ {$EXTERNALSYM EPROTONOSUPPORT}
+ ESOCKTNOSUPPORT = WSAESOCKTNOSUPPORT;
+ {$EXTERNALSYM ESOCKTNOSUPPORT}
+ EOPNOTSUPP = WSAEOPNOTSUPP;
+ {$EXTERNALSYM EOPNOTSUPP}
+ EPFNOSUPPORT = WSAEPFNOSUPPORT;
+ {$EXTERNALSYM EPFNOSUPPORT}
+ EAFNOSUPPORT = WSAEAFNOSUPPORT;
+ {$EXTERNALSYM EAFNOSUPPORT}
+ EADDRINUSE = WSAEADDRINUSE;
+ {$EXTERNALSYM EADDRINUSE}
+ EADDRNOTAVAIL = WSAEADDRNOTAVAIL;
+ {$EXTERNALSYM EADDRNOTAVAIL}
+ ENETDOWN = WSAENETDOWN;
+ {$EXTERNALSYM ENETDOWN}
+ ENETUNREACH = WSAENETUNREACH;
+ {$EXTERNALSYM ENETUNREACH}
+ ENETRESET = WSAENETRESET;
+ {$EXTERNALSYM ENETRESET}
+ ECONNABORTED = WSAECONNABORTED;
+ {$EXTERNALSYM ECONNABORTED}
+ ECONNRESET = WSAECONNRESET;
+ {$EXTERNALSYM ECONNRESET}
+ ENOBUFS = WSAENOBUFS;
+ {$EXTERNALSYM ENOBUFS}
+ EISCONN = WSAEISCONN;
+ {$EXTERNALSYM EISCONN}
+ ENOTCONN = WSAENOTCONN;
+ {$EXTERNALSYM ENOTCONN}
+ ESHUTDOWN = WSAESHUTDOWN;
+ {$EXTERNALSYM ESHUTDOWN}
+ ETOOMANYREFS = WSAETOOMANYREFS;
+ {$EXTERNALSYM ETOOMANYREFS}
+ ETIMEDOUT = WSAETIMEDOUT;
+ {$EXTERNALSYM ETIMEDOUT}
+ ECONNREFUSED = WSAECONNREFUSED;
+ {$EXTERNALSYM ECONNREFUSED}
+ ELOOP = WSAELOOP;
+ {$EXTERNALSYM ELOOP}
+ ENAMETOOLONG = WSAENAMETOOLONG;
+ {$EXTERNALSYM ENAMETOOLONG}
+ EHOSTDOWN = WSAEHOSTDOWN;
+ {$EXTERNALSYM EHOSTDOWN}
+ EHOSTUNREACH = WSAEHOSTUNREACH;
+ {$EXTERNALSYM EHOSTUNREACH}
+ ENOTEMPTY = WSAENOTEMPTY;
+ {$EXTERNALSYM ENOTEMPTY}
+ EPROCLIM = WSAEPROCLIM;
+ {$EXTERNALSYM EPROCLIM}
+ EUSERS = WSAEUSERS;
+ {$EXTERNALSYM EUSERS}
+ EDQUOT = WSAEDQUOT;
+ {$EXTERNALSYM EDQUOT}
+ ESTALE = WSAESTALE;
+ {$EXTERNALSYM ESTALE}
+ EREMOTE = WSAEREMOTE;
+ {$EXTERNALSYM EREMOTE}
+
+{$ENDIF FALSE}
+
+(* Socket function prototypes *)
+
+function accept(s: TSocket; addr: PSockAddr; addrlen: PINT): TSocket; stdcall;
+{$EXTERNALSYM accept}
+function bind(s: TSocket; name: PSockAddr; namelen: Integer): Integer; stdcall;
+{$EXTERNALSYM bind}
+function closesocket(s: TSocket): Integer; stdcall;
+{$EXTERNALSYM closesocket}
+function connect(s: TSocket; name: PSockAddr; namelen: Integer): Integer; stdcall;
+{$EXTERNALSYM connect}
+function ioctlsocket(s: TSocket; cmd: Longint; var argp: u_long): Integer; stdcall;
+{$EXTERNALSYM ioctlsocket}
+function getpeername(s: TSocket; name: PSockAddr; var namelen: Integer): Integer; stdcall;
+{$EXTERNALSYM getpeername}
+function getsockname(s: TSocket; name: PSockAddr; var namelen: Integer): Integer; stdcall;
+{$EXTERNALSYM getsockname}
+function getsockopt(s: TSocket; level, optname: Integer; optval: PChar; var optlen: Integer): Integer; stdcall;
+{$EXTERNALSYM getsockopt}
+function htonl(hostlong: u_long): u_long; stdcall;
+{$EXTERNALSYM htonl}
+function htons(hostshort: u_short): u_short; stdcall;
+{$EXTERNALSYM htons}
+function inet_addr(cp: PChar): u_long; stdcall;
+{$EXTERNALSYM inet_addr}
+function inet_ntoa(inaddr: in_addr): PChar; stdcall;
+{$EXTERNALSYM inet_ntoa}
+function listen(s: TSocket; backlog: Integer): Integer; stdcall;
+{$EXTERNALSYM listen}
+function ntohl(netlong: u_long): u_long; stdcall;
+{$EXTERNALSYM ntohl}
+function ntohs(netshort: u_short): u_short; stdcall;
+{$EXTERNALSYM ntohs}
+function recv(s: TSocket; var buf; len, flags: Integer): Integer; stdcall;
+{$EXTERNALSYM recv}
+function recvfrom(s: TSocket; var buf; len, flags: Integer; from: PSockAddr; var fromlen: Integer): Integer; stdcall;
+{$EXTERNALSYM recvfrom}
+function select(nfds: Integer; readfds, writefds, exceptfds: PFdSet; timeout: PTimeVal): Integer; stdcall;
+{$EXTERNALSYM select}
+function send(s: TSocket; var buf; len, flags: Integer): Integer; stdcall;
+{$EXTERNALSYM send}
+function sendto(s: TSocket; var buf; len, flags: Integer; toaddr: PSockAddr; tolen: Integer): Integer; stdcall;
+{$EXTERNALSYM sendto}
+function setsockopt(s: TSocket; level, optname: Integer; optval: PChar; optlen: Integer): Integer; stdcall;
+{$EXTERNALSYM setsockopt}
+function shutdown(s: TSocket; how: Integer): Integer; stdcall;
+{$EXTERNALSYM shutdown}
+function socket(af, type_, protocol: Integer): TSocket; stdcall;
+{$EXTERNALSYM socket}
+
+(* Database function prototypes *)
+
+function gethostbyaddr(addr: PChar; len, type_: Integer): PHostEnt; stdcall;
+{$EXTERNALSYM gethostbyaddr}
+function gethostbyname(name: PChar): PHostEnt; stdcall;
+{$EXTERNALSYM gethostbyname}
+function gethostname(name: PChar; namelen: Integer): Integer; stdcall;
+{$EXTERNALSYM gethostname}
+function getservbyport(port: Integer; proto: PChar): PServEnt; stdcall;
+{$EXTERNALSYM getservbyport}
+function getservbyname(name, proto: PChar): PServEnt; stdcall;
+{$EXTERNALSYM getservbyname}
+function getprotobynumber(number: Integer): PProtoEnt; stdcall;
+{$EXTERNALSYM getprotobynumber}
+function getprotobyname(name: PChar): PProtoEnt; stdcall;
+{$EXTERNALSYM getprotobyname}
+
+(* Microsoft Windows Extension function prototypes *)
+
+function WSAStartup(wVersionRequired: WORD; var lpWSAData: TWSAData): Integer; stdcall;
+{$EXTERNALSYM WSAStartup}
+function WSACleanup: Integer; stdcall;
+{$EXTERNALSYM WSACleanup}
+procedure WSASetLastError(iError: Integer); stdcall;
+{$EXTERNALSYM WSASetLastError}
+function WSAGetLastError: Integer; stdcall;
+{$EXTERNALSYM WSAGetLastError}
+function WSAIsBlocking: BOOL; stdcall;
+{$EXTERNALSYM WSAIsBlocking}
+function WSAUnhookBlockingHook: Integer; stdcall;
+{$EXTERNALSYM WSAUnhookBlockingHook}
+function WSASetBlockingHook(lpBlockFunc: FARPROC): FARPROC; stdcall;
+{$EXTERNALSYM WSASetBlockingHook}
+function WSACancelBlockingCall: Integer; stdcall;
+{$EXTERNALSYM WSACancelBlockingCall}
+function WSAAsyncGetServByName(hWnd: HWND; wMsg: u_int; name, proto, buf: PChar;
+ buflen: Integer): HANDLE; stdcall;
+{$EXTERNALSYM WSAAsyncGetServByName}
+function WSAAsyncGetServByPort(hWnd: HWND; wMsg: u_int; port: Integer;
+ proto, buf: PChar; buflen: Integer): HANDLE; stdcall;
+{$EXTERNALSYM WSAAsyncGetServByPort}
+function WSAAsyncGetProtoByName(hWnd: HWND; wMsg: u_int; name, buf: PChar;
+ buflen: Integer): HANDLE; stdcall;
+{$EXTERNALSYM WSAAsyncGetProtoByName}
+function WSAAsyncGetProtoByNumber(hWnd: HWND; wMsg: u_int; number: Integer;
+ buf: PChar; buflen: Integer): HANDLE; stdcall;
+{$EXTERNALSYM WSAAsyncGetProtoByNumber}
+function WSAAsyncGetHostByName(hWnd: HWND; wMsg: u_int; name, buf: PChar;
+ buflen: Integer): HANDLE; stdcall;
+{$EXTERNALSYM WSAAsyncGetHostByName}
+function WSAAsyncGetHostByAddr(hWnd: HWND; wMsg: u_int; addr: PChar;
+ len, type_: Integer; buf: PChar; buflen: Integer): HANDLE; stdcall;
+{$EXTERNALSYM WSAAsyncGetHostByAddr}
+function WSACancelAsyncRequest(hAsyncTaskHandle: HANDLE): Integer; stdcall;
+{$EXTERNALSYM WSACancelAsyncRequest}
+function WSAAsyncSelect(s: TSocket; hWnd: HWND; wMsg: u_int; lEvent: Longint): Integer; stdcall;
+{$EXTERNALSYM WSAAsyncSelect}
+
+function WSARecvEx(s: TSocket; var buf; len: Integer; var flags: Integer): Integer; stdcall;
+{$EXTERNALSYM WSARecvEx}
+
+type
+ _TRANSMIT_FILE_BUFFERS = record
+ Head: LPVOID;
+ HeadLength: DWORD;
+ Tail: LPVOID;
+ TailLength: DWORD;
+ end;
+ {$EXTERNALSYM _TRANSMIT_FILE_BUFFERS}
+ TRANSMIT_FILE_BUFFERS = _TRANSMIT_FILE_BUFFERS;
+ {$EXTERNALSYM TRANSMIT_FILE_BUFFERS}
+ PTRANSMIT_FILE_BUFFERS = ^TRANSMIT_FILE_BUFFERS;
+ {$EXTERNALSYM PTRANSMIT_FILE_BUFFERS}
+ LPTRANSMIT_FILE_BUFFERS = ^TRANSMIT_FILE_BUFFERS;
+ {$EXTERNALSYM LPTRANSMIT_FILE_BUFFERS}
+ TTransmitFileBuffers = TRANSMIT_FILE_BUFFERS;
+ PTransmitFileBuffers = LPTRANSMIT_FILE_BUFFERS;
+
+const
+ TF_DISCONNECT = $01;
+ {$EXTERNALSYM TF_DISCONNECT}
+ TF_REUSE_SOCKET = $02;
+ {$EXTERNALSYM TF_REUSE_SOCKET}
+ TF_WRITE_BEHIND = $04;
+ {$EXTERNALSYM TF_WRITE_BEHIND}
+
+function TransmitFile(hSocket: TSocket; hFile: HANDLE; nNumberOfBytesToWrite: DWORD;
+ nNumberOfBytesPerSend: DWORD; lpOverlapped: LPOVERLAPPED;
+ lpTransmitBuffers: LPTRANSMIT_FILE_BUFFERS; dwReserved: DWORD): BOOL; stdcall;
+{$EXTERNALSYM TransmitFile}
+function AcceptEx(sListenSocket, sAcceptSocket: TSocket;
+ lpOutputBuffer: LPVOID; dwReceiveDataLength, dwLocalAddressLength,
+ dwRemoteAddressLength: DWORD; var lpdwBytesReceived: DWORD;
+ lpOverlapped: LPOVERLAPPED): BOOL; stdcall;
+{$EXTERNALSYM AcceptEx}
+procedure GetAcceptExSockaddrs(lpOutputBuffer: Pointer;
+ dwReceiveDataLength, dwLocalAddressLength, dwRemoteAddressLength: DWORD;
+ out LocalSockaddr: PSockAddr; var LocalSockaddrLength: Integer;
+ out RemoteSockaddr: PSockAddr; var RemoteSockaddrLength: Integer); stdcall;
+{$EXTERNALSYM GetAcceptExSockaddrs}
+
+(* Microsoft Windows Extended data types *)
+
+type
+ PSOCKADDR_IN = ^sockaddr_in;
+ {$EXTERNALSYM PSOCKADDR_IN}
+ LPSOCKADDR_IN = ^sockaddr_in;
+ {$EXTERNALSYM LPSOCKADDR_IN}
+ LPLINGER = PLINGER;
+ {$EXTERNALSYM LPLINGER}
+ PIN_ADDR = ^in_addr;
+ {$EXTERNALSYM PIN_ADDR}
+ LPIN_ADDR = ^in_addr;
+ {$EXTERNALSYM LPIN_ADDR}
+ PFD_SET = ^fd_set;
+ {$EXTERNALSYM PFD_SET}
+ LPFD_SET = ^fd_set;
+ {$EXTERNALSYM LPFD_SET}
+ LPHOSTENT = PHOSTENT;
+ {$EXTERNALSYM LPHOSTENT}
+ LPSERVENT = PSERVENT;
+ {$EXTERNALSYM LPSERVENT}
+ LPPROTOENT = PPROTOENT;
+ {$EXTERNALSYM LPPROTOENT}
+ LPTIMEVAL = PTIMEVAL;
+ {$EXTERNALSYM LPTIMEVAL}
+
+(*
+ * Windows message parameter composition and decomposition
+ * macros.
+ *
+ * WSAMAKEASYNCREPLY is intended for use by the Windows Sockets implementation
+ * when constructing the response to a WSAAsyncGetXByY() routine.
+ *)
+
+function WSAMAKEASYNCREPLY(buflen, error: WORD): DWORD;
+{$EXTERNALSYM WSAMAKEASYNCREPLY}
+
+(*
+ * WSAMAKESELECTREPLY is intended for use by the Windows Sockets implementation
+ * when constructing the response to WSAAsyncSelect().
+ *)
+
+function WSAMAKESELECTREPLY(event, error: WORD): DWORD;
+{$EXTERNALSYM WSAMAKESELECTREPLY}
+
+(*
+ * WSAGETASYNCBUFLEN is intended for use by the Windows Sockets application
+ * to extract the buffer length from the lParam in the response
+ * to a WSAGetXByY().
+ *)
+
+function WSAGETASYNCBUFLEN(lParam: DWORD): WORD;
+{$EXTERNALSYM WSAGETASYNCBUFLEN}
+
+(*
+ * WSAGETASYNCERROR is intended for use by the Windows Sockets application
+ * to extract the error code from the lParam in the response
+ * to a WSAGetXByY().
+ *)
+
+function WSAGETASYNCERROR(lParam: DWORD): WORD;
+{$EXTERNALSYM WSAGETASYNCERROR}
+
+(*
+ * WSAGETSELECTEVENT is intended for use by the Windows Sockets application
+ * to extract the event code from the lParam in the response
+ * to a WSAAsyncSelect().
+ *)
+
+function WSAGETSELECTEVENT(lParam: DWORD): WORD;
+{$EXTERNALSYM WSAGETSELECTEVENT}
+
+(*
+ * WSAGETSELECTERROR is intended for use by the Windows Sockets application
+ * to extract the error code from the lParam in the response
+ * to a WSAAsyncSelect().
+ *)
+
+function WSAGETSELECTERROR(lParam: DWORD): WORD;
+{$EXTERNALSYM WSAGETSELECTERROR}
+
+implementation
+
+const
+ wsock32 = 'wsock32.dll';
+
+procedure FD_CLR(fd: TSocket; var fdset: TFdSet);
+var
+ I: Cardinal;
+begin
+ I := 0;
+ while I < fdset.fd_count do
+ begin
+ if fdset.fd_array[I] = fd then
+ begin
+ while I < fdset.fd_count - 1 do
+ begin
+ fdset.fd_array[I] := fdset.fd_array[I + 1];
+ Inc(I);
+ end;
+ fdset.fd_count := fdset.fd_count - 1;
+ Break;
+ end;
+ Inc(I);
+ end;
+end;
+
+procedure _FD_SET(fd: TSocket; var fdset: TFDSet);
+var
+ I: Cardinal;
+begin
+ I := 0;
+ while I < fdset.fd_count do
+ begin
+ if fdset.fd_array[I] = fd then
+ Break;
+ Inc(I);
+ end;
+ if I = fdset.fd_count then
+ begin
+ if fdset.fd_count < FD_SETSIZE then
+ begin
+ fdset.fd_array[I] := fd;
+ fdset.fd_count := fdset.fd_count + 1;
+ end;
+ end;
+end;
+
+procedure FD_ZERO(var fdset: TFdSet);
+begin
+ fdset.fd_count := 0;
+end;
+
+function FD_ISSET(fd: TSocket; var fdset: TFdSet): Boolean;
+begin
+ Result := __WSAFDIsSet(fd, fdset) <> 0;
+end;
+
+function timerisset(const tvp: TTimeVal): Boolean;
+begin
+ Result := (tvp.tv_sec <> 0) or (tvp.tv_usec <> 0);
+end;
+
+procedure timerclear(var tvp: TTimeVal);
+begin
+ tvp.tv_sec := 0;
+ tvp.tv_usec := 0;
+end;
+
+function _IO(x, y: DWORD): DWORD;
+begin
+ Result := IOC_VOID or (x shl 8) or y;
+end;
+
+function _IOR(x, y, t: DWORD): DWORD;
+begin
+ Result := IOC_OUT or ((T and IOCPARM_MASK) shl 16) or (x shl 8) or y;
+end;
+
+function _IOW(x, y, t: DWORD): DWORD;
+begin
+ Result := DWORD(IOC_IN or ((T and IOCPARM_MASK) shl 16) or (x shl 8) or y);
+end;
+
+function IN_CLASSA(i: DWORD): Boolean;
+begin
+ Result := i and DWORD($80000000) = 0;
+end;
+
+function IN_CLASSB(i: DWORD): Boolean;
+begin
+ Result := i and DWORD($C0000000) = DWORD($80000000);
+end;
+
+function IN_CLASSC(i: DWORD): Boolean;
+begin
+ Result := (i and DWORD($e0000000)) = DWORD($C0000000);
+end;
+
+function h_errno: Integer;
+begin
+ Result := WSAGetLastError;
+end;
+
+function WSAMAKEASYNCREPLY(buflen, error: WORD): DWORD;
+begin
+ Result := MAKELONG(buflen, error);
+end;
+
+function WSAMAKESELECTREPLY(event, error: WORD): DWORD;
+begin
+ Result := MAKELONG(event, error);
+end;
+
+function WSAGETASYNCBUFLEN(lParam: DWORD): WORD;
+begin
+ Result := LOWORD(lParam);
+end;
+
+function WSAGETASYNCERROR(lParam: DWORD): WORD;
+begin
+ Result := HIWORD(lParam);
+end;
+
+function WSAGETSELECTEVENT(lParam: DWORD): WORD;
+begin
+ Result := LOWORD(lParam);
+end;
+
+function WSAGETSELECTERROR(lParam: DWORD): WORD;
+begin
+ Result := HIWORD(lParam);
+end;
+
+{$IFDEF DYNAMIC_LINK}
+
+var
+ ___WSAFDIsSet: Pointer;
+
+function __WSAFDIsSet;
+begin
+ GetProcedureAddress(___WSAFDIsSet, wsock32, '__WSAFDIsSet');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [___WSAFDIsSet]
+ end;
+end;
+
+var
+ _accept: Pointer;
+
+function accept;
+begin
+ GetProcedureAddress(_accept, wsock32, 'accept');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_accept]
+ end;
+end;
+
+var
+ _bind: Pointer;
+
+function bind;
+begin
+ GetProcedureAddress(_bind, wsock32, 'bind');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_bind]
+ end;
+end;
+
+var
+ _closesocket: Pointer;
+
+function closesocket;
+begin
+ GetProcedureAddress(_closesocket, wsock32, 'closesocket');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_closesocket]
+ end;
+end;
+
+var
+ _connect: Pointer;
+
+function connect;
+begin
+ GetProcedureAddress(_connect, wsock32, 'connect');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_connect]
+ end;
+end;
+
+var
+ _ioctlsocket: Pointer;
+
+function ioctlsocket;
+begin
+ GetProcedureAddress(_ioctlsocket, wsock32, 'ioctlsocket');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ioctlsocket]
+ end;
+end;
+
+var
+ _getpeername: Pointer;
+
+function getpeername;
+begin
+ GetProcedureAddress(_getpeername, wsock32, 'getpeername');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_getpeername]
+ end;
+end;
+
+var
+ _getsockname: Pointer;
+
+function getsockname;
+begin
+ GetProcedureAddress(_getsockname, wsock32, 'getsockname');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_getsockname]
+ end;
+end;
+
+var
+ _getsockopt: Pointer;
+
+function getsockopt;
+begin
+ GetProcedureAddress(_getsockopt, wsock32, 'getsockopt');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_getsockopt]
+ end;
+end;
+
+var
+ _htonl: Pointer;
+
+function htonl;
+begin
+ GetProcedureAddress(_htonl, wsock32, 'htonl');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_htonl]
+ end;
+end;
+
+var
+ _htons: Pointer;
+
+function htons;
+begin
+ GetProcedureAddress(_htons, wsock32, 'htons');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_htons]
+ end;
+end;
+
+var
+ _inet_addr: Pointer;
+
+function inet_addr;
+begin
+ GetProcedureAddress(_inet_addr, wsock32, 'inet_addr');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_inet_addr]
+ end;
+end;
+
+var
+ _inet_ntoa: Pointer;
+
+function inet_ntoa;
+begin
+ GetProcedureAddress(_inet_ntoa, wsock32, 'inet_ntoa');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_inet_ntoa]
+ end;
+end;
+
+var
+ _listen: Pointer;
+
+function listen;
+begin
+ GetProcedureAddress(_listen, wsock32, 'listen');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_listen]
+ end;
+end;
+
+var
+ _ntohl: Pointer;
+
+function ntohl;
+begin
+ GetProcedureAddress(_ntohl, wsock32, 'ntohl');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ntohl]
+ end;
+end;
+
+var
+ _ntohs: Pointer;
+
+function ntohs;
+begin
+ GetProcedureAddress(_ntohs, wsock32, 'ntohs');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ntohs]
+ end;
+end;
+
+var
+ _recv: Pointer;
+
+function recv;
+begin
+ GetProcedureAddress(_recv, wsock32, 'recv');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_recv]
+ end;
+end;
+
+var
+ _recvfrom: Pointer;
+
+function recvfrom;
+begin
+ GetProcedureAddress(_recvfrom, wsock32, 'recvfrom');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_recvfrom]
+ end;
+end;
+
+var
+ _select: Pointer;
+
+function select;
+begin
+ GetProcedureAddress(_select, wsock32, 'select');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_select]
+ end;
+end;
+
+var
+ _send: Pointer;
+
+function send;
+begin
+ GetProcedureAddress(_send, wsock32, 'send');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_send]
+ end;
+end;
+
+var
+ _sendto: Pointer;
+
+function sendto;
+begin
+ GetProcedureAddress(_sendto, wsock32, 'sendto');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_sendto]
+ end;
+end;
+
+var
+ _setsockopt: Pointer;
+
+function setsockopt;
+begin
+ GetProcedureAddress(_setsockopt, wsock32, 'setsockopt');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_setsockopt]
+ end;
+end;
+
+var
+ _shutdown: Pointer;
+
+function shutdown;
+begin
+ GetProcedureAddress(_shutdown, wsock32, 'shutdown');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_shutdown]
+ end;
+end;
+
+var
+ _socket: Pointer;
+
+function socket;
+begin
+ GetProcedureAddress(_socket, wsock32, 'socket');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_socket]
+ end;
+end;
+
+var
+ _gethostbyaddr: Pointer;
+
+function gethostbyaddr;
+begin
+ GetProcedureAddress(_gethostbyaddr, wsock32, 'gethostbyaddr');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_gethostbyaddr]
+ end;
+end;
+
+var
+ _gethostbyname: Pointer;
+
+function gethostbyname;
+begin
+ GetProcedureAddress(_gethostbyname, wsock32, 'gethostbyname');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_gethostbyname]
+ end;
+end;
+
+var
+ _gethostname: Pointer;
+
+function gethostname;
+begin
+ GetProcedureAddress(_gethostname, wsock32, 'gethostname');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_gethostname]
+ end;
+end;
+
+var
+ _getservbyport: Pointer;
+
+function getservbyport;
+begin
+ GetProcedureAddress(_getservbyport, wsock32, 'getservbyport');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_getservbyport]
+ end;
+end;
+
+var
+ _getservbyname: Pointer;
+
+function getservbyname;
+begin
+ GetProcedureAddress(_getservbyname, wsock32, 'getservbyname');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_getservbyname]
+ end;
+end;
+
+var
+ _getprotobynumber: Pointer;
+
+function getprotobynumber;
+begin
+ GetProcedureAddress(_getprotobynumber, wsock32, 'getprotobynumber');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_getprotobynumber]
+ end;
+end;
+
+var
+ _getprotobyname: Pointer;
+
+function getprotobyname;
+begin
+ GetProcedureAddress(_getprotobyname, wsock32, 'getprotobyname');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_getprotobyname]
+ end;
+end;
+
+var
+ _WSAStartup: Pointer;
+
+function WSAStartup;
+begin
+ GetProcedureAddress(_WSAStartup, wsock32, 'WSAStartup');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WSAStartup]
+ end;
+end;
+
+var
+ _WSACleanup: Pointer;
+
+function WSACleanup;
+begin
+ GetProcedureAddress(_WSACleanup, wsock32, 'WSACleanup');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WSACleanup]
+ end;
+end;
+
+var
+ _WSASetLastError: Pointer;
+
+procedure WSASetLastError;
+begin
+ GetProcedureAddress(_WSASetLastError, wsock32, 'WSASetLastError');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WSASetLastError]
+ end;
+end;
+
+var
+ _WSAGetLastError: Pointer;
+
+function WSAGetLastError;
+begin
+ GetProcedureAddress(_WSAGetLastError, wsock32, 'WSAGetLastError');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WSAGetLastError]
+ end;
+end;
+
+var
+ _WSAIsBlocking: Pointer;
+
+function WSAIsBlocking;
+begin
+ GetProcedureAddress(_WSAIsBlocking, wsock32, 'WSAIsBlocking');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WSAIsBlocking]
+ end;
+end;
+
+var
+ _WSAUnhookBlockingHook: Pointer;
+
+function WSAUnhookBlockingHook;
+begin
+ GetProcedureAddress(_WSAUnhookBlockingHook, wsock32, 'WSAUnhookBlockingHook');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WSAUnhookBlockingHook]
+ end;
+end;
+
+var
+ _WSASetBlockingHook: Pointer;
+
+function WSASetBlockingHook;
+begin
+ GetProcedureAddress(_WSASetBlockingHook, wsock32, 'WSASetBlockingHook');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WSASetBlockingHook]
+ end;
+end;
+
+var
+ _WSACancelBlockingCall: Pointer;
+
+function WSACancelBlockingCall;
+begin
+ GetProcedureAddress(_WSACancelBlockingCall, wsock32, 'WSACancelBlockingCall');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WSACancelBlockingCall]
+ end;
+end;
+
+var
+ _WSAAsyncGetServByName: Pointer;
+
+function WSAAsyncGetServByName;
+begin
+ GetProcedureAddress(_WSAAsyncGetServByName, wsock32, 'WSAAsyncGetServByName');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WSAAsyncGetServByName]
+ end;
+end;
+
+var
+ _WSAAsyncGetServByPort: Pointer;
+
+function WSAAsyncGetServByPort;
+begin
+ GetProcedureAddress(_WSAAsyncGetServByPort, wsock32, 'WSAAsyncGetServByPort');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WSAAsyncGetServByPort]
+ end;
+end;
+
+var
+ _WSAAsyncGetProtoByName: Pointer;
+
+function WSAAsyncGetProtoByName;
+begin
+ GetProcedureAddress(_WSAAsyncGetProtoByName, wsock32, 'WSAAsyncGetProtoByName');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WSAAsyncGetProtoByName]
+ end;
+end;
+
+var
+ _WSAAsyncGetProtoByNumber: Pointer;
+
+function WSAAsyncGetProtoByNumber;
+begin
+ GetProcedureAddress(_WSAAsyncGetProtoByNumber, wsock32, 'WSAAsyncGetProtoByNumber');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WSAAsyncGetProtoByNumber]
+ end;
+end;
+
+var
+ _WSAAsyncGetHostByName: Pointer;
+
+function WSAAsyncGetHostByName;
+begin
+ GetProcedureAddress(_WSAAsyncGetHostByName, wsock32, 'WSAAsyncGetHostByName');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WSAAsyncGetHostByName]
+ end;
+end;
+
+var
+ _WSAAsyncGetHostByAddr: Pointer;
+
+function WSAAsyncGetHostByAddr;
+begin
+ GetProcedureAddress(_WSAAsyncGetHostByAddr, wsock32, 'WSAAsyncGetHostByAddr');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WSAAsyncGetHostByAddr]
+ end;
+end;
+
+var
+ _WSACancelAsyncRequest: Pointer;
+
+function WSACancelAsyncRequest;
+begin
+ GetProcedureAddress(_WSACancelAsyncRequest, wsock32, 'WSACancelAsyncRequest');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WSACancelAsyncRequest]
+ end;
+end;
+
+var
+ _WSAAsyncSelect: Pointer;
+
+function WSAAsyncSelect;
+begin
+ GetProcedureAddress(_WSAAsyncSelect, wsock32, 'WSAAsyncSelect');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WSAAsyncSelect]
+ end;
+end;
+
+var
+ _WSARecvEx: Pointer;
+
+function WSARecvEx;
+begin
+ GetProcedureAddress(_WSARecvEx, wsock32, 'WSARecvEx');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WSARecvEx]
+ end;
+end;
+
+var
+ _TransmitFile: Pointer;
+
+function TransmitFile;
+begin
+ GetProcedureAddress(_TransmitFile, wsock32, 'TransmitFile');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_TransmitFile]
+ end;
+end;
+
+var
+ _AcceptEx: Pointer;
+
+function AcceptEx;
+begin
+ GetProcedureAddress(_AcceptEx, wsock32, 'AcceptEx');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_AcceptEx]
+ end;
+end;
+
+var
+ _GetAcceptExSockaddrs: Pointer;
+
+procedure GetAcceptExSockaddrs;
+begin
+ GetProcedureAddress(_GetAcceptExSockaddrs, wsock32, 'GetAcceptExSockaddrs');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetAcceptExSockaddrs]
+ end;
+end;
+
+{$ELSE}
+
+function __WSAFDIsSet; external wsock32 name '__WSAFDIsSet';
+function accept; external wsock32 name 'accept';
+function bind; external wsock32 name 'bind';
+function closesocket; external wsock32 name 'closesocket';
+function connect; external wsock32 name 'connect';
+function ioctlsocket; external wsock32 name 'ioctlsocket';
+function getpeername; external wsock32 name 'getpeername';
+function getsockname; external wsock32 name 'getsockname';
+function getsockopt; external wsock32 name 'getsockopt';
+function htonl; external wsock32 name 'htonl';
+function htons; external wsock32 name 'htons';
+function inet_addr; external wsock32 name 'inet_addr';
+function inet_ntoa; external wsock32 name 'inet_ntoa';
+function listen; external wsock32 name 'listen';
+function ntohl; external wsock32 name 'ntohl';
+function ntohs; external wsock32 name 'ntohs';
+function recv; external wsock32 name 'recv';
+function recvfrom; external wsock32 name 'recvfrom';
+function select; external wsock32 name 'select';
+function send; external wsock32 name 'send';
+function sendto; external wsock32 name 'sendto';
+function setsockopt; external wsock32 name 'setsockopt';
+function shutdown; external wsock32 name 'shutdown';
+function socket; external wsock32 name 'socket';
+function gethostbyaddr; external wsock32 name 'gethostbyaddr';
+function gethostbyname; external wsock32 name 'gethostbyname';
+function gethostname; external wsock32 name 'gethostname';
+function getservbyport; external wsock32 name 'getservbyport';
+function getservbyname; external wsock32 name 'getservbyname';
+function getprotobynumber; external wsock32 name 'getprotobynumber';
+function getprotobyname; external wsock32 name 'getprotobyname';
+function WSAStartup; external wsock32 name 'WSAStartup';
+function WSACleanup; external wsock32 name 'WSACleanup';
+procedure WSASetLastError; external wsock32 name 'WSASetLastError';
+function WSAGetLastError; external wsock32 name 'WSAGetLastError';
+function WSAIsBlocking; external wsock32 name 'WSAIsBlocking';
+function WSAUnhookBlockingHook; external wsock32 name 'WSAUnhookBlockingHook';
+function WSASetBlockingHook; external wsock32 name 'WSASetBlockingHook';
+function WSACancelBlockingCall; external wsock32 name 'WSACancelBlockingCall';
+function WSAAsyncGetServByName; external wsock32 name 'WSAAsyncGetServByName';
+function WSAAsyncGetServByPort; external wsock32 name 'WSAAsyncGetServByPort';
+function WSAAsyncGetProtoByName; external wsock32 name 'WSAAsyncGetProtoByName';
+function WSAAsyncGetProtoByNumber; external wsock32 name 'WSAAsyncGetProtoByNumber';
+function WSAAsyncGetHostByName; external wsock32 name 'WSAAsyncGetHostByName';
+function WSAAsyncGetHostByAddr; external wsock32 name 'WSAAsyncGetHostByAddr';
+function WSACancelAsyncRequest; external wsock32 name 'WSACancelAsyncRequest';
+function WSAAsyncSelect; external wsock32 name 'WSAAsyncSelect';
+function WSARecvEx; external wsock32 name 'WSARecvEx';
+function TransmitFile; external wsock32 name 'TransmitFile';
+function AcceptEx; external wsock32 name 'AcceptEx';
+procedure GetAcceptExSockaddrs; external wsock32 name 'GetAcceptExSockaddrs';
+
+{$ENDIF DYNAMIC_LINK}
+
+end.
diff --git a/packages/extra/winunits/jwawinsock2.pas b/packages/extra/winunits/jwawinsock2.pas
index d5d1c0de72..32ad159785 100644
--- a/packages/extra/winunits/jwawinsock2.pas
+++ b/packages/extra/winunits/jwawinsock2.pas
@@ -1,4491 +1,4491 @@
-{******************************************************************************}
-{ }
-{ Winsock2 API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: winsock2.h, released June 2000. The original Pascal }
-{ code is: WinSock2.pas, released December 2000. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwawinsock2.pas,v 1.1 2005/04/04 07:56:11 marco Exp $
-
-unit JwaWinsock2;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "winsock2.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaQos, JwaWinType, JwaWinBase, JwaWinError, JwaWinNT;
-
-type // TODO
- ULONG_PTR = ULONG;
- DWORD_PTR = DWORD;
- PPChar = ^PChar;
- {$NODEFINE PPChar}
- HANDLE = THandle;
- {$NODEFINE HANDLE}
- LPHANDLE = ^THandle;
- {$NODEFINE LPHANDLE}
- LPBYTE = ^BYTE;
- {$NODEFINE LPBYTE}
- LPVOID = Pointer;
- {$NODEFINE LPVOID}
- USHORT = Word;
- {$NODEFINE USHORT}
- UCHAR = Byte;
- {$NODEFINE UCHAR}
- ULONG = Cardinal;
- {$NODEFINE ULONG}
-
-//#include <pshpack4.h>
-{$ALIGN ON}
-
-// Winsock2.h -- definitions to be used with the WinSock 2 DLL and
-// WinSock 2 applications.
-//
-// This header file corresponds to version 2.2.x of the WinSock API
-// specification.
-//
-// This file includes parts which are Copyright (c) 1982-1986 Regents
-// of the University of California. All rights reserved. The
-// Berkeley Software License Agreement specifies the terms and
-// conditions for redistribution.
-//
-
-(*
- * Default: include function prototypes, don't include function typedefs.
- *)
-
-// (rom) INCL_WINSOCK_API_PROTOTYPES and INCL_WINSOCK_API_TYPEDEFS IFDEFs
-// removed because they are without meaning for Delphi.
-
-const
- WINSOCK_VERSION = $0202;
- {$EXTERNALSYM WINSOCK_VERSION}
-
-//
-// Basic system type definitions, taken from the BSD file sys/types.h.
-//
-
-type
- u_char = Byte;
- {$EXTERNALSYM u_char}
- u_short = Word;
- {$EXTERNALSYM u_short}
- u_int = Cardinal;
- {$EXTERNALSYM u_int}
- u_long = Cardinal;
- {$EXTERNALSYM u_long}
- u_int64 = Int64; // unsigned __int64 !! TODO For Delphi 7 ??
- {$EXTERNALSYM u_int64}
-
-//
-// The new type to be used in all
-// instances which refer to sockets.
-//
-
-type
- TSocket = Cardinal;
-
-//
-// Select uses arrays of SOCKETs. These macros manipulate such
-// arrays. FD_SETSIZE may be defined by the user before including
-// this file, but the default here should be >= 64.
-//
-// CAVEAT IMPLEMENTOR and USER: THESE MACROS AND TYPES MUST BE
-// INCLUDED IN WINSOCK2.H EXACTLY AS SHOWN HERE.
-//
-
-const
- FD_SETSIZE = 64;
- {$EXTERNALSYM FD_SETSIZE}
-
-type
- fd_set = record
- fd_count: u_int; // how many are SET?
- fd_array: array [0..FD_SETSIZE - 1] of TSocket; // an array of SOCKETs
- end;
- {$EXTERNALSYM fd_set}
- TFdSet = fd_set;
- PFdSet = ^fd_set;
-
-function __WSAFDIsSet(s: TSocket; var FDSet: TFDSet): Integer; stdcall;
-{$EXTERNALSYM __WSAFDIsSet}
-
-procedure FD_CLR(fd: TSocket; var fdset: TFdSet);
-{$EXTERNALSYM FD_CLR}
-
-procedure _FD_SET(fd: TSocket; var fdset: TFDSet);
-//{$EXTERNALSYM FD_SET}
-
-procedure FD_ZERO(var fdset: TFdSet);
-{$EXTERNALSYM FD_ZERO}
-
-function FD_ISSET(fd: TSocket; var fdset: TFdSet): Boolean;
-{$EXTERNALSYM FD_ISSET}
-
-//
-// Structure used in select() call, taken from the BSD file sys/time.h.
-//
-
-type
- timeval = record
- tv_sec: Longint; // seconds
- tv_usec: Longint; // and microseconds
- end;
- {$EXTERNALSYM timeval}
- TTimeVal = timeval;
- PTimeVal = ^timeval;
-
-//
-// Operations on timevals.
-//
-// NB: timercmp does not work for >= or <=.
-//
-
-function timerisset(const tvp: TTimeVal): Boolean;
-{$EXTERNALSYM timerisset}
-
-//function timercmp(const tvp, uvp: TTimeVal; cmp): Boolean;
-//{$EXTERNALSYM timercmp}
-
-procedure timerclear(var tvp: TTimeVal);
-{$EXTERNALSYM timerclear}
-
-//
-// Commands for ioctlsocket(), taken from the BSD file fcntl.h.
-//
-//
-// Ioctl's have the command encoded in the lower word,
-// and the size of any in or out parameters in the upper
-// word. The high 2 bits of the upper word are used
-// to encode the in/out status of the parameter; for now
-// we restrict parameters to at most 128 bytes.
-//
-
-const
- IOCPARM_MASK = $7f; // parameters must be < 128 bytes
- {$EXTERNALSYM IOCPARM_MASK}
- IOC_VOID = $20000000; // no parameters
- {$EXTERNALSYM IOC_VOID}
- IOC_OUT = $40000000; // copy out parameters
- {$EXTERNALSYM IOC_OUT}
- IOC_IN = DWORD($80000000); // copy in parameters
- {$EXTERNALSYM IOC_IN}
- IOC_INOUT = DWORD(IOC_IN or IOC_OUT);
- {$EXTERNALSYM IOC_INOUT}
-
- // 0x20000000 distinguishes new & old ioctl's
-
-function _IO(x, y: DWORD): DWORD;
-{$EXTERNALSYM _IO}
-
-function _IOR(x, y, t: DWORD): DWORD;
-{$EXTERNALSYM _IOR}
-
-function _IOW(x, y, t: DWORD): DWORD;
-{$EXTERNALSYM _IOW}
-
-const
- FIONREAD = IOC_OUT or ((SizeOf(u_long) and IOCPARM_MASK) shl 16) or (Ord('f') shl 8) or 127; // get # bytes to read
- {$EXTERNALSYM FIONREAD}
- FIONBIO = IOC_IN or ((SizeOf(u_long) and IOCPARM_MASK) shl 16) or (Ord('f') shl 8) or 126; // set/clear non-blocking i/o
- {$EXTERNALSYM FIONBIO}
- FIOASYNC = IOC_IN or ((SizeOf(u_long) and IOCPARM_MASK) shl 16) or (Ord('f') shl 8) or 125; // set/clear async i/o
- {$EXTERNALSYM FIOASYNC}
-
-// Socket I/O Controls
-
- SIOCSHIWAT = DWORD(IOC_IN or ((SizeOf(u_long) and IOCPARM_MASK) shl 16) or (Ord('s') shl 8) or 0); // set high watermark
- {$EXTERNALSYM SIOCSHIWAT}
- SIOCGHIWAT = IOC_OUT or ((SizeOf(u_long) and IOCPARM_MASK) shl 16) or (Ord('s') shl 8) or 1; // get high watermark
- {$EXTERNALSYM SIOCGHIWAT}
- SIOCSLOWAT = DWORD(IOC_IN or ((SizeOf(u_long) and IOCPARM_MASK) shl 16) or (Ord('s') shl 8) or 2); // set low watermark
- {$EXTERNALSYM SIOCSLOWAT}
- SIOCGLOWAT = IOC_OUT or ((SizeOf(u_long) and IOCPARM_MASK) shl 16) or (Ord('s') shl 8) or 3; // get low watermark
- {$EXTERNALSYM SIOCGLOWAT}
- SIOCATMARK = IOC_OUT or ((SizeOf(u_long) and IOCPARM_MASK) shl 16) or (Ord('s') shl 8) or 7; // at oob mark?
- {$EXTERNALSYM SIOCATMARK}
-
-//
-// Structures returned by network data base library, taken from the
-// BSD file netdb.h. All addresses are supplied in host order, and
-// returned in network order (suitable for use in system calls).
-//
-
-type
- hostent = record
- h_name: PChar; // official name of host
- h_aliases: PPChar; // alias list
- h_addrtype: Smallint; // host address type
- h_length: Smallint; // length of address
- case Integer of
- 0: (h_addr_list: PPChar); // list of addresses
- 1: (h_addr: PPChar); // address, for backward compat
- end;
- {$EXTERNALSYM hostent}
- THostEnt = hostent;
- PHostEnt = ^hostent;
-
-//
-// It is assumed here that a network number
-// fits in 32 bits.
-//
-
-type
- netent = record
- n_name: PChar; // official name of net
- n_aliases: PPChar; // alias list
- n_addrtype: Smallint; // net address type
- n_net: u_long; // network #
- end;
- {$EXTERNALSYM netent}
- TNetEnt = netent;
- PNetEnt = ^netent;
-
- servent = record
- s_name: PChar; // official service name
- s_aliases: PPChar; // alias list
- s_port: Smallint; // port #
- s_proto: PChar; // protocol to use
- end;
- {$EXTERNALSYM servent}
- TServEnt = servent;
- PServEnt = ^servent;
-
- protoent = record
- p_name: PChar; // official protocol name
- p_aliases: PPChar; // alias list
- p_proto: Smallint; // protocol #
- end;
- {$EXTERNALSYM protoent}
- TProtoEnt = protoent;
- PProtoEnt = ^protoent;
-
-//
-// Constants and structures defined by the internet system,
-// Per RFC 790, September 1981, taken from the BSD file netinet/in.h.
-//
-
-//
-// Protocols
-//
-
-const
- IPPROTO_IP = 0; // dummy for IP
- {$EXTERNALSYM IPPROTO_IP}
- IPPROTO_HOPOPTS = 0; // IPv6 hop-by-hop options
- {$EXTERNALSYM IPPROTO_HOPOPTS}
- IPPROTO_ICMP = 1; // control message protocol
- {$EXTERNALSYM IPPROTO_ICMP}
- IPPROTO_IGMP = 2; // internet group management protocol
- {$EXTERNALSYM IPPROTO_IGMP}
- IPPROTO_GGP = 3; // gateway^2 (deprecated)
- {$EXTERNALSYM IPPROTO_GGP}
- IPPROTO_IPV4 = 4; // IPv4
- {$EXTERNALSYM IPPROTO_IPV4}
- IPPROTO_TCP = 6; // tcp
- {$EXTERNALSYM IPPROTO_TCP}
- IPPROTO_PUP = 12; // pup
- {$EXTERNALSYM IPPROTO_PUP}
- IPPROTO_UDP = 17; // user datagram protocol
- {$EXTERNALSYM IPPROTO_UDP}
- IPPROTO_IDP = 22; // xns idp
- {$EXTERNALSYM IPPROTO_IDP}
- IPPROTO_IPV6 = 41; // IPv6
- {$EXTERNALSYM IPPROTO_IPV6}
- IPPROTO_ROUTING = 43; // IPv6 routing header
- {$EXTERNALSYM IPPROTO_ROUTING}
- IPPROTO_FRAGMENT = 44; // IPv6 fragmentation header
- {$EXTERNALSYM IPPROTO_FRAGMENT}
- IPPROTO_ESP = 50; // IPsec ESP header
- {$EXTERNALSYM IPPROTO_ESP}
- IPPROTO_AH = 51; // IPsec AH
- {$EXTERNALSYM IPPROTO_AH}
- IPPROTO_ICMPV6 = 58; // ICMPv6
- {$EXTERNALSYM IPPROTO_ICMPV6}
- IPPROTO_NONE = 59; // IPv6 no next header
- {$EXTERNALSYM IPPROTO_NONE}
- IPPROTO_DSTOPTS = 60; // IPv6 destination options
- {$EXTERNALSYM IPPROTO_DSTOPTS}
- IPPROTO_ND = 77; // UNOFFICIAL net disk proto
- {$EXTERNALSYM IPPROTO_ND}
- IPPROTO_ICLFXBM = 78;
- {$EXTERNALSYM IPPROTO_ICLFXBM}
-
- IPPROTO_RAW = 255; // raw IP packet
- {$EXTERNALSYM IPPROTO_RAW}
- IPPROTO_MAX = 256;
- {$EXTERNALSYM IPPROTO_MAX}
-
-//
-// Port/socket numbers: network standard functions
-//
-
- IPPORT_ECHO = 7;
- {$EXTERNALSYM IPPORT_ECHO}
- IPPORT_DISCARD = 9;
- {$EXTERNALSYM IPPORT_DISCARD}
- IPPORT_SYSTAT = 11;
- {$EXTERNALSYM IPPORT_SYSTAT}
- IPPORT_DAYTIME = 13;
- {$EXTERNALSYM IPPORT_DAYTIME}
- IPPORT_NETSTAT = 15;
- {$EXTERNALSYM IPPORT_NETSTAT}
- IPPORT_FTP = 21;
- {$EXTERNALSYM IPPORT_FTP}
- IPPORT_TELNET = 23;
- {$EXTERNALSYM IPPORT_TELNET}
- IPPORT_SMTP = 25;
- {$EXTERNALSYM IPPORT_SMTP}
- IPPORT_TIMESERVER = 37;
- {$EXTERNALSYM IPPORT_TIMESERVER}
- IPPORT_NAMESERVER = 42;
- {$EXTERNALSYM IPPORT_NAMESERVER}
- IPPORT_WHOIS = 43;
- {$EXTERNALSYM IPPORT_WHOIS}
- IPPORT_MTP = 57;
- {$EXTERNALSYM IPPORT_MTP}
-
-//
-// Port/socket numbers: host specific functions
-//
-
- IPPORT_TFTP = 69;
- {$EXTERNALSYM IPPORT_TFTP}
- IPPORT_RJE = 77;
- {$EXTERNALSYM IPPORT_RJE}
- IPPORT_FINGER = 79;
- {$EXTERNALSYM IPPORT_FINGER}
- IPPORT_TTYLINK = 87;
- {$EXTERNALSYM IPPORT_TTYLINK}
- IPPORT_SUPDUP = 95;
- {$EXTERNALSYM IPPORT_SUPDUP}
-
-//
-// UNIX TCP sockets
-//
-
- IPPORT_EXECSERVER = 512;
- {$EXTERNALSYM IPPORT_EXECSERVER}
- IPPORT_LOGINSERVER = 513;
- {$EXTERNALSYM IPPORT_LOGINSERVER}
- IPPORT_CMDSERVER = 514;
- {$EXTERNALSYM IPPORT_CMDSERVER}
- IPPORT_EFSSERVER = 520;
- {$EXTERNALSYM IPPORT_EFSSERVER}
-
-//
-// UNIX UDP sockets
-//
-
- IPPORT_BIFFUDP = 512;
- {$EXTERNALSYM IPPORT_BIFFUDP}
- IPPORT_WHOSERVER = 513;
- {$EXTERNALSYM IPPORT_WHOSERVER}
- IPPORT_ROUTESERVER = 520;
- {$EXTERNALSYM IPPORT_ROUTESERVER}
-
- // 520+1 also used
-
-//
-// Ports < IPPORT_RESERVED are reserved for
-// privileged processes (e.g. root).
-//
-
- IPPORT_RESERVED = 1024;
- {$EXTERNALSYM IPPORT_RESERVED}
-
-//
-// Link numbers
-//
-
- IMPLINK_IP = 155;
- {$EXTERNALSYM IMPLINK_IP}
- IMPLINK_LOWEXPER = 156;
- {$EXTERNALSYM IMPLINK_LOWEXPER}
- IMPLINK_HIGHEXPER = 158;
- {$EXTERNALSYM IMPLINK_HIGHEXPER}
-
-//
-// Internet address (old style... should be updated)
-//
-
-type
- SunB = packed record
- s_b1, s_b2, s_b3, s_b4: u_char;
- end;
- {$EXTERNALSYM SunB}
-
- SunC = packed record
- s_c1, s_c2, s_c3, s_c4: Char;
- end;
- {$NODEFINE SunC}
-
- SunW = packed record
- s_w1, s_w2: u_short;
- end;
- {$EXTERNALSYM SunW}
-
- in_addr = record
- case Integer of
- 0: (S_un_b: SunB);
- 1: (S_un_c: SunC);
- 2: (S_un_w: SunW);
- 3: (S_addr: u_long);
- // #define s_addr S_un.S_addr // can be used for most tcp & ip code
- // #define s_host S_un.S_un_b.s_b2 // host on imp
- // #define s_net S_un.S_un_b.s_b1 // netword
- // #define s_imp S_un.S_un_w.s_w2 // imp
- // #define s_impno S_un.S_un_b.s_b4 // imp #
- // #define s_lh S_un.S_un_b.s_b3 // logical host
- end;
- {$EXTERNALSYM in_addr}
- TInAddr = in_addr;
- PInAddr = ^in_addr;
-
-//
-// Definitions of bits in internet address integers.
-// On subnets, the decomposition of addresses to host and net parts
-// is done according to subnet mask, not the masks here.
-//
-
-function IN_CLASSA(i: DWORD): Boolean;
-{$EXTERNALSYM IN_CLASSA}
-
-const
- IN_CLASSA_NET = DWORD($ff000000);
- {$EXTERNALSYM IN_CLASSA_NET}
- IN_CLASSA_NSHIFT = 24;
- {$EXTERNALSYM IN_CLASSA_NSHIFT}
- IN_CLASSA_HOST = $00ffffff;
- {$EXTERNALSYM IN_CLASSA_HOST}
- IN_CLASSA_MAX = 128;
- {$EXTERNALSYM IN_CLASSA_MAX}
-
-function IN_CLASSB(i: DWORD): Boolean;
-{$EXTERNALSYM IN_CLASSB}
-
-const
- IN_CLASSB_NET = DWORD($ffff0000);
- {$EXTERNALSYM IN_CLASSB_NET}
- IN_CLASSB_NSHIFT = 16;
- {$EXTERNALSYM IN_CLASSB_NSHIFT}
- IN_CLASSB_HOST = $0000ffff;
- {$EXTERNALSYM IN_CLASSB_HOST}
- IN_CLASSB_MAX = 65536;
- {$EXTERNALSYM IN_CLASSB_MAX}
-
-function IN_CLASSC(i: DWORD): Boolean;
-{$EXTERNALSYM IN_CLASSC}
-
-const
- IN_CLASSC_NET = DWORD($ffffff00);
- {$EXTERNALSYM IN_CLASSC_NET}
- IN_CLASSC_NSHIFT = 8;
- {$EXTERNALSYM IN_CLASSC_NSHIFT}
- IN_CLASSC_HOST = $000000ff;
- {$EXTERNALSYM IN_CLASSC_HOST}
-
-function IN_CLASSD(i: DWORD): Boolean;
-{$EXTERNALSYM IN_CLASSD}
-
-const
- IN_CLASSD_NET = DWORD($f0000000); // These ones aren't really
- {$EXTERNALSYM IN_CLASSD_NET}
- IN_CLASSD_NSHIFT = 28; // net and host fields, but
- {$EXTERNALSYM IN_CLASSD_NSHIFT}
- IN_CLASSD_HOST = $0fffffff; // routing needn't know.
- {$EXTERNALSYM IN_CLASSD_HOST}
-
-function IN_MULTICAST(i: DWORD): Boolean;
-{$EXTERNALSYM IN_MULTICAST}
-
-const
- INADDR_ANY = u_long($00000000);
- {$EXTERNALSYM INADDR_ANY}
- INADDR_LOOPBACK = $7f000001;
- {$EXTERNALSYM INADDR_LOOPBACK}
- INADDR_BROADCAST = u_long($ffffffff);
- {$EXTERNALSYM INADDR_BROADCAST}
- INADDR_NONE = DWORD($ffffffff);
- {$EXTERNALSYM INADDR_NONE}
-
- ADDR_ANY = INADDR_ANY;
- {$EXTERNALSYM ADDR_ANY}
-
-//
-// Socket address, internet style.
-//
-
-type
- sockaddr_in = record
- sin_family: Smallint;
- sin_port: u_short;
- sin_addr: in_addr;
- sin_zero: array [0..7] of Char;
- end;
- {$EXTERNALSYM sockaddr_in}
- TSockAddrIn = sockaddr_in;
- PSockAddrIn = ^sockaddr_in;
-
-const
- WSADESCRIPTION_LEN = 256;
- {$EXTERNALSYM WSADESCRIPTION_LEN}
- WSASYS_STATUS_LEN = 128;
- {$EXTERNALSYM WSASYS_STATUS_LEN}
-
-type
- WSAData = record
- wVersion: WORD;
- wHighVersion: WORD;
- szDescription: array [0..WSADESCRIPTION_LEN] of Char;
- szSystemStatus: array [0..WSASYS_STATUS_LEN] of Char;
- iMaxSockets: Word;
- iMaxUdpDg: Word;
- lpVendorInfo: PChar;
- end;
- {$EXTERNALSYM WSAData}
- LPWSADATA = ^WSAData;
- {$EXTERNALSYM LPWSADATA}
- TWsaData = WSAData;
- PWsaData = LPWSADATA;
-
-//
-// Definitions related to sockets: types, address families, options,
-// taken from the BSD file sys/socket.h.
-//
-
-//
-// This is used instead of -1, since the
-// SOCKET type is unsigned.
-//
-
-const
- INVALID_SOCKET = TSocket(not 0);
- {$EXTERNALSYM INVALID_SOCKET}
- SOCKET_ERROR = -1;
- {$EXTERNALSYM SOCKET_ERROR}
-
-//
-// The following may be used in place of the address family, socket type, or
-// protocol in a call to WSASocket to indicate that the corresponding value
-// should be taken from the supplied WSAPROTOCOL_INFO structure instead of the
-// parameter itself.
-//
-
- FROM_PROTOCOL_INFO = -1;
- {$EXTERNALSYM FROM_PROTOCOL_INFO}
-
-//
-// Types
-//
-
- SOCK_STREAM = 1; // stream socket
- {$EXTERNALSYM SOCK_STREAM}
- SOCK_DGRAM = 2; // datagram socket
- {$EXTERNALSYM SOCK_DGRAM}
- SOCK_RAW = 3; // raw-protocol interface
- {$EXTERNALSYM SOCK_RAW}
- SOCK_RDM = 4; // reliably-delivered message
- {$EXTERNALSYM SOCK_RDM}
- SOCK_SEQPACKET = 5; // sequenced packet stream
- {$EXTERNALSYM SOCK_SEQPACKET}
-
-//
-// Option flags per-socket.
-//
-
- SO_DEBUG = $0001; // turn on debugging info recording
- {$EXTERNALSYM SO_DEBUG}
- SO_ACCEPTCONN = $0002; // socket has had listen()
- {$EXTERNALSYM SO_ACCEPTCONN}
- SO_REUSEADDR = $0004; // allow local address reuse
- {$EXTERNALSYM SO_REUSEADDR}
- SO_KEEPALIVE = $0008; // keep connections alive
- {$EXTERNALSYM SO_KEEPALIVE}
- SO_DONTROUTE = $0010; // just use interface addresses
- {$EXTERNALSYM SO_DONTROUTE}
- SO_BROADCAST = $0020; // permit sending of broadcast msgs
- {$EXTERNALSYM SO_BROADCAST}
- SO_USELOOPBACK = $0040; // bypass hardware when possible
- {$EXTERNALSYM SO_USELOOPBACK}
- SO_LINGER = $0080; // linger on close if data present
- {$EXTERNALSYM SO_LINGER}
- SO_OOBINLINE = $0100; // leave received OOB data in line
- {$EXTERNALSYM SO_OOBINLINE}
-
- SO_DONTLINGER = DWORD(not SO_LINGER);
- {$EXTERNALSYM SO_DONTLINGER}
- SO_EXCLUSIVEADDRUSE = DWORD(not SO_REUSEADDR); // disallow local address reuse
- {$EXTERNALSYM SO_EXCLUSIVEADDRUSE}
-
-//
-// Additional options.
-//
-
- SO_SNDBUF = $1001; // send buffer size
- {$EXTERNALSYM SO_SNDBUF}
- SO_RCVBUF = $1002; // receive buffer size
- {$EXTERNALSYM SO_RCVBUF}
- SO_SNDLOWAT = $1003; // send low-water mark
- {$EXTERNALSYM SO_SNDLOWAT}
- SO_RCVLOWAT = $1004; // receive low-water mark
- {$EXTERNALSYM SO_RCVLOWAT}
- SO_SNDTIMEO = $1005; // send timeout
- {$EXTERNALSYM SO_SNDTIMEO}
- SO_RCVTIMEO = $1006; // receive timeout
- {$EXTERNALSYM SO_RCVTIMEO}
- SO_ERROR = $1007; // get error status and clear
- {$EXTERNALSYM SO_ERROR}
- SO_TYPE = $1008; // get socket type
- {$EXTERNALSYM SO_TYPE}
-
-//
-// WinSock 2 extension -- new options
-//
-
- SO_GROUP_ID = $2001; // ID of a socket group
- {$EXTERNALSYM SO_GROUP_ID}
- SO_GROUP_PRIORITY = $2002; // the relative priority within a group
- {$EXTERNALSYM SO_GROUP_PRIORITY}
- SO_MAX_MSG_SIZE = $2003; // maximum message size
- {$EXTERNALSYM SO_MAX_MSG_SIZE}
- SO_PROTOCOL_INFOA = $2004; // WSAPROTOCOL_INFOA structure
- {$EXTERNALSYM SO_PROTOCOL_INFOA}
- SO_PROTOCOL_INFOW = $2005; // WSAPROTOCOL_INFOW structure
- {$EXTERNALSYM SO_PROTOCOL_INFOW}
-
- {$IFDEF UNICODE}
- SO_PROTOCOL_INFO = SO_PROTOCOL_INFOW;
- {$EXTERNALSYM SO_PROTOCOL_INFO}
- {$ELSE}
- SO_PROTOCOL_INFO = SO_PROTOCOL_INFOA;
- {$EXTERNALSYM SO_PROTOCOL_INFO}
- {$ENDIF UNICODE}
-
- PVD_CONFIG = $3001; // configuration info for service provider
- {$EXTERNALSYM PVD_CONFIG}
- SO_CONDITIONAL_ACCEPT = $3002; // enable true conditional accept:
- // connection is not ack-ed to the
- // other side until conditional
- // function returns CF_ACCEPT
- {$EXTERNALSYM SO_CONDITIONAL_ACCEPT}
-
-//
-// TCP options.
-//
-
- TCP_NODELAY = $0001;
- {$EXTERNALSYM TCP_NODELAY}
-
-//
-// Address families.
-//
-
- AF_UNSPEC = 0; // unspecified
- {$EXTERNALSYM AF_UNSPEC}
-
-//
-// Although AF_UNSPEC is defined for backwards compatibility, using
-// AF_UNSPEC for the "af" parameter when creating a socket is STRONGLY
-// DISCOURAGED. The interpretation of the "protocol" parameter
-// depends on the actual address family chosen. As environments grow
-// to include more and more address families that use overlapping
-// protocol values there is more and more chance of choosing an
-// undesired address family when AF_UNSPEC is used.
-//
-
- AF_UNIX = 1; // local to host (pipes, portals
- {$EXTERNALSYM AF_UNIX}
- AF_INET = 2; // internetwork: UDP, TCP, etc.
- {$EXTERNALSYM AF_INET}
- AF_IMPLINK = 3; // arpanet imp addresses
- {$EXTERNALSYM AF_IMPLINK}
- AF_PUP = 4; // pup protocols: e.g. BSP
- {$EXTERNALSYM AF_PUP}
- AF_CHAOS = 5; // mit CHAOS protocols
- {$EXTERNALSYM AF_CHAOS}
- AF_NS = 6; // XEROX NS protocols
- {$EXTERNALSYM AF_NS}
- AF_IPX = AF_NS; // IPX protocols: IPX, SPX, etc.
- {$EXTERNALSYM AF_IPX}
- AF_ISO = 7; // ISO protocols
- {$EXTERNALSYM AF_ISO}
- AF_OSI = AF_ISO; // OSI is ISO
- {$EXTERNALSYM AF_OSI}
- AF_ECMA = 8; // european computer manufacturers
- {$EXTERNALSYM AF_ECMA}
- AF_DATAKIT = 9; // datakit protocols
- {$EXTERNALSYM AF_DATAKIT}
- AF_CCITT = 10; // CCITT protocols, X.25 etc
- {$EXTERNALSYM AF_CCITT}
- AF_SNA = 11; // IBM SNA
- {$EXTERNALSYM AF_SNA}
- AF_DECnet = 12; // DECnet
- {$EXTERNALSYM AF_DECnet}
- AF_DLI = 13; // Direct data link interface
- {$EXTERNALSYM AF_DLI}
- AF_LAT = 14; // LAT
- {$EXTERNALSYM AF_LAT}
- AF_HYLINK = 15; // NSC Hyperchannel
- {$EXTERNALSYM AF_HYLINK}
- AF_APPLETALK = 16; // AppleTalk
- {$EXTERNALSYM AF_APPLETALK}
- AF_NETBIOS = 17; // NetBios-style addresses
- {$EXTERNALSYM AF_NETBIOS}
- AF_VOICEVIEW = 18; // VoiceView
- {$EXTERNALSYM AF_VOICEVIEW}
- AF_FIREFOX = 19; // Protocols from Firefox
- {$EXTERNALSYM AF_FIREFOX}
- AF_UNKNOWN1 = 20; // Somebody is using this!
- {$EXTERNALSYM AF_UNKNOWN1}
- AF_BAN = 21; // Banyan
- {$EXTERNALSYM AF_BAN}
- AF_ATM = 22; // Native ATM Services
- {$EXTERNALSYM AF_ATM}
- AF_INET6 = 23; // Internetwork Version 6
- {$EXTERNALSYM AF_INET6}
- AF_CLUSTER = 24; // Microsoft Wolfpack
- {$EXTERNALSYM AF_CLUSTER}
- AF_12844 = 25; // IEEE 1284.4 WG AF
- {$EXTERNALSYM AF_12844}
- AF_IRDA = 26; // IrDA
- {$EXTERNALSYM AF_IRDA}
- AF_NETDES = 28; // Network Designers OSI & gateway enabled protocols
- {$EXTERNALSYM AF_NETDES}
-
- AF_TCNPROCESS = 29;
- {$EXTERNALSYM AF_TCNPROCESS}
- AF_TCNMESSAGE = 30;
- {$EXTERNALSYM AF_TCNMESSAGE}
- AF_ICLFXBM = 31;
- {$EXTERNALSYM AF_ICLFXBM}
-
- AF_MAX = 32;
- {$EXTERNALSYM AF_MAX}
-
-//
-// Structure used by kernel to store most
-// addresses.
-//
-
-type
- sockaddr = record
- sa_family: u_short; // address family
- sa_data: array [0..13] of Char; // up to 14 bytes of direct address
- end;
- {$EXTERNALSYM sockaddr}
- TSockAddr = sockaddr;
- PSockAddr = ^sockaddr;
-
-//
-// Portable socket structure (RFC 2553).
-//
-
-//
-// Desired design of maximum size and alignment.
-// These are implementation specific.
-//
-
-const
- _SS_MAXSIZE = 128; // Maximum size.
- {$EXTERNALSYM _SS_MAXSIZE}
- _SS_ALIGNSIZE = SizeOf(Int64); // Desired alignment.
- {$EXTERNALSYM _SS_ALIGNSIZE}
-
-//
-// Definitions used for sockaddr_storage structure paddings design.
-//
-
- _SS_PAD1SIZE = _SS_ALIGNSIZE - SizeOf(short);
- {$EXTERNALSYM _SS_PAD1SIZE}
- _SS_PAD2SIZE = _SS_MAXSIZE - (SizeOf(short) + _SS_PAD1SIZE + _SS_ALIGNSIZE);
- {$EXTERNALSYM _SS_PAD2SIZE}
-
-type
- sockaddr_storage = record
- ss_family: short; // Address family.
- __ss_pad1: array [0.._SS_PAD1SIZE - 1] of char; // 6 byte pad, this is to make
- // implementation specific pad up to
- // alignment field that follows explicit
- // in the data structure.
- __ss_align: Int64; // Field to force desired structure.
- __ss_pad2: array [0.._SS_PAD2SIZE - 1] of char; // 112 byte pad to achieve desired size;
- // _SS_MAXSIZE value minus size of
- // ss_family, __ss_pad1, and
- // __ss_align fields is 112.
- end;
- {$EXTERNALSYM sockaddr_storage}
- TSockAddrStorage = sockaddr_storage;
- PSockAddrStorage = ^sockaddr_storage;
-
-//
-// Structure used by kernel to pass protocol
-// information in raw sockets.
-//
-
- sockproto = record
- sp_family: u_short; // address family
- sp_protocol: u_short; // protocol
- end;
- {$EXTERNALSYM sockproto}
- TSockProto = sockproto;
- PSockProto = ^sockproto;
-
-//
-// Protocol families, same as address families for now.
-//
-
-const
- PF_UNSPEC = AF_UNSPEC;
- {$EXTERNALSYM PF_UNSPEC}
- PF_UNIX = AF_UNIX;
- {$EXTERNALSYM PF_UNIX}
- PF_INET = AF_INET;
- {$EXTERNALSYM PF_INET}
- PF_IMPLINK = AF_IMPLINK;
- {$EXTERNALSYM PF_IMPLINK}
- PF_PUP = AF_PUP;
- {$EXTERNALSYM PF_PUP}
- PF_CHAOS = AF_CHAOS;
- {$EXTERNALSYM PF_CHAOS}
- PF_NS = AF_NS;
- {$EXTERNALSYM PF_NS}
- PF_IPX = AF_IPX;
- {$EXTERNALSYM PF_IPX}
- PF_ISO = AF_ISO;
- {$EXTERNALSYM PF_ISO}
- PF_OSI = AF_OSI;
- {$EXTERNALSYM PF_OSI}
- PF_ECMA = AF_ECMA;
- {$EXTERNALSYM PF_ECMA}
- PF_DATAKIT = AF_DATAKIT;
- {$EXTERNALSYM PF_DATAKIT}
- PF_CCITT = AF_CCITT;
- {$EXTERNALSYM PF_CCITT}
- PF_SNA = AF_SNA;
- {$EXTERNALSYM PF_SNA}
- PF_DECnet = AF_DECnet;
- {$EXTERNALSYM PF_DECnet}
- PF_DLI = AF_DLI;
- {$EXTERNALSYM PF_DLI}
- PF_LAT = AF_LAT;
- {$EXTERNALSYM PF_LAT}
- PF_HYLINK = AF_HYLINK;
- {$EXTERNALSYM PF_HYLINK}
- PF_APPLETALK = AF_APPLETALK;
- {$EXTERNALSYM PF_APPLETALK}
- PF_VOICEVIEW = AF_VOICEVIEW;
- {$EXTERNALSYM PF_VOICEVIEW}
- PF_FIREFOX = AF_FIREFOX;
- {$EXTERNALSYM PF_FIREFOX}
- PF_UNKNOWN1 = AF_UNKNOWN1;
- {$EXTERNALSYM PF_UNKNOWN1}
- PF_BAN = AF_BAN;
- {$EXTERNALSYM PF_BAN}
- PF_ATM = AF_ATM;
- {$EXTERNALSYM PF_ATM}
- PF_INET6 = AF_INET6;
- {$EXTERNALSYM PF_INET6}
-
- PF_MAX = AF_MAX;
- {$EXTERNALSYM PF_MAX}
-
-//
-// Structure used for manipulating linger option.
-//
-
-type
- linger = record
- l_onoff: u_short; // option on/off
- l_linger: u_short; // linger time
- end;
- {$EXTERNALSYM linger}
- TLinger = linger;
- PLinger = ^linger;
-
-//
-// Level number for (get/set)sockopt() to apply to socket itself.
-//
-
-const
- SOL_SOCKET = $ffff; // options for socket level
- {$EXTERNALSYM SOL_SOCKET}
-
-//
-// Maximum queue length specifiable by listen.
-//
-
- SOMAXCONN = $7fffffff;
- {$EXTERNALSYM SOMAXCONN}
-
- MSG_OOB = $1; // process out-of-band data
- {$EXTERNALSYM MSG_OOB}
- MSG_PEEK = $2; // peek at incoming message
- {$EXTERNALSYM MSG_PEEK}
- MSG_DONTROUTE = $4; // send without using routing tables
- {$EXTERNALSYM MSG_DONTROUTE}
-
- MSG_PARTIAL = $8000; // partial send or recv for message xport
- {$EXTERNALSYM MSG_PARTIAL}
-
-//
-// WinSock 2 extension -- new flags for WSASend(), WSASendTo(), WSARecv() and
-// WSARecvFrom()
-//
-
- MSG_INTERRUPT = $10; // send/recv in the interrupt context
- {$EXTERNALSYM MSG_INTERRUPT}
-
- MSG_MAXIOVLEN = 16;
- {$EXTERNALSYM MSG_MAXIOVLEN}
-
-//
-// Define constant based on rfc883, used by gethostbyxxxx() calls.
-//
-
- MAXGETHOSTSTRUCT = 1024;
- {$EXTERNALSYM MAXGETHOSTSTRUCT}
-
-//
-// WinSock 2 extension -- bit values and indices for FD_XXX network events
-//
-
- FD_READ_BIT = 0;
- {$EXTERNALSYM FD_READ_BIT}
- FD_READ = 1 shl FD_READ_BIT;
- {$EXTERNALSYM FD_READ}
-
- FD_WRITE_BIT = 1;
- {$EXTERNALSYM FD_WRITE_BIT}
- FD_WRITE = 1 shl FD_WRITE_BIT;
- {$EXTERNALSYM FD_WRITE}
-
- FD_OOB_BIT = 2;
- {$EXTERNALSYM FD_OOB_BIT}
- FD_OOB = 1 shl FD_OOB_BIT;
- {$EXTERNALSYM FD_OOB}
-
- FD_ACCEPT_BIT = 3;
- {$EXTERNALSYM FD_ACCEPT_BIT}
- FD_ACCEPT = 1 shl FD_ACCEPT_BIT;
- {$EXTERNALSYM FD_ACCEPT}
-
- FD_CONNECT_BIT = 4;
- {$EXTERNALSYM FD_CONNECT_BIT}
- FD_CONNECT = 1 shl FD_CONNECT_BIT;
- {$EXTERNALSYM FD_CONNECT}
-
- FD_CLOSE_BIT = 5;
- {$EXTERNALSYM FD_CLOSE_BIT}
- FD_CLOSE = 1 shl FD_CLOSE_BIT;
- {$EXTERNALSYM FD_CLOSE}
-
- FD_QOS_BIT = 6;
- {$EXTERNALSYM FD_QOS_BIT}
- FD_QOS = 1 shl FD_QOS_BIT;
- {$EXTERNALSYM FD_QOS}
-
- FD_GROUP_QOS_BIT = 7;
- {$EXTERNALSYM FD_GROUP_QOS_BIT}
- FD_GROUP_QOS = 1 shl FD_GROUP_QOS_BIT;
- {$EXTERNALSYM FD_GROUP_QOS}
-
- FD_ROUTING_INTERFACE_CHANGE_BIT = 8;
- {$EXTERNALSYM FD_ROUTING_INTERFACE_CHANGE_BIT}
- FD_ROUTING_INTERFACE_CHANGE = 1 shl FD_ROUTING_INTERFACE_CHANGE_BIT;
- {$EXTERNALSYM FD_ROUTING_INTERFACE_CHANGE}
-
- FD_ADDRESS_LIST_CHANGE_BIT = 9;
- {$EXTERNALSYM FD_ADDRESS_LIST_CHANGE_BIT}
- FD_ADDRESS_LIST_CHANGE = 1 shl FD_ADDRESS_LIST_CHANGE_BIT;
- {$EXTERNALSYM FD_ADDRESS_LIST_CHANGE}
-
- FD_MAX_EVENTS = 10;
- {$EXTERNALSYM FD_MAX_EVENTS}
- FD_ALL_EVENTS = (1 shl FD_MAX_EVENTS) - 1;
- {$EXTERNALSYM FD_ALL_EVENTS}
-
-//
-// All Windows Sockets error constants are biased by WSABASEERR from
-// the "normal"
-//
-
- WSABASEERR = 10000;
- {$EXTERNALSYM WSABASEERR}
-
-//
-// Windows Sockets definitions of regular Microsoft C error constants
-//
-
- WSAEINTR = WSABASEERR + 4;
- {$EXTERNALSYM WSAEINTR}
- WSAEBADF = WSABASEERR + 9;
- {$EXTERNALSYM WSAEBADF}
- WSAEACCES = WSABASEERR + 13;
- {$EXTERNALSYM WSAEACCES}
- WSAEFAULT = WSABASEERR + 14;
- {$EXTERNALSYM WSAEFAULT}
- WSAEINVAL = WSABASEERR + 22;
- {$EXTERNALSYM WSAEINVAL}
- WSAEMFILE = WSABASEERR + 24;
- {$EXTERNALSYM WSAEMFILE}
-
-//
-// Windows Sockets definitions of regular Berkeley error constants
-//
-
- WSAEWOULDBLOCK = WSABASEERR + 35;
- {$EXTERNALSYM WSAEWOULDBLOCK}
- WSAEINPROGRESS = WSABASEERR + 36;
- {$EXTERNALSYM WSAEINPROGRESS}
- WSAEALREADY = WSABASEERR + 37;
- {$EXTERNALSYM WSAEALREADY}
- WSAENOTSOCK = WSABASEERR + 38;
- {$EXTERNALSYM WSAENOTSOCK}
- WSAEDESTADDRREQ = WSABASEERR + 39;
- {$EXTERNALSYM WSAEDESTADDRREQ}
- WSAEMSGSIZE = WSABASEERR + 40;
- {$EXTERNALSYM WSAEMSGSIZE}
- WSAEPROTOTYPE = WSABASEERR + 41;
- {$EXTERNALSYM WSAEPROTOTYPE}
- WSAENOPROTOOPT = WSABASEERR + 42;
- {$EXTERNALSYM WSAENOPROTOOPT}
- WSAEPROTONOSUPPORT = WSABASEERR + 43;
- {$EXTERNALSYM WSAEPROTONOSUPPORT}
- WSAESOCKTNOSUPPORT = WSABASEERR + 44;
- {$EXTERNALSYM WSAESOCKTNOSUPPORT}
- WSAEOPNOTSUPP = WSABASEERR + 45;
- {$EXTERNALSYM WSAEOPNOTSUPP}
- WSAEPFNOSUPPORT = WSABASEERR + 46;
- {$EXTERNALSYM WSAEPFNOSUPPORT}
- WSAEAFNOSUPPORT = WSABASEERR + 47;
- {$EXTERNALSYM WSAEAFNOSUPPORT}
- WSAEADDRINUSE = WSABASEERR + 48;
- {$EXTERNALSYM WSAEADDRINUSE}
- WSAEADDRNOTAVAIL = WSABASEERR + 49;
- {$EXTERNALSYM WSAEADDRNOTAVAIL}
- WSAENETDOWN = WSABASEERR + 50;
- {$EXTERNALSYM WSAENETDOWN}
- WSAENETUNREACH = WSABASEERR + 51;
- {$EXTERNALSYM WSAENETUNREACH}
- WSAENETRESET = WSABASEERR + 52;
- {$EXTERNALSYM WSAENETRESET}
- WSAECONNABORTED = WSABASEERR + 53;
- {$EXTERNALSYM WSAECONNABORTED}
- WSAECONNRESET = WSABASEERR + 54;
- {$EXTERNALSYM WSAECONNRESET}
- WSAENOBUFS = WSABASEERR + 55;
- {$EXTERNALSYM WSAENOBUFS}
- WSAEISCONN = WSABASEERR + 56;
- {$EXTERNALSYM WSAEISCONN}
- WSAENOTCONN = WSABASEERR + 57;
- {$EXTERNALSYM WSAENOTCONN}
- WSAESHUTDOWN = WSABASEERR + 58;
- {$EXTERNALSYM WSAESHUTDOWN}
- WSAETOOMANYREFS = WSABASEERR + 59;
- {$EXTERNALSYM WSAETOOMANYREFS}
- WSAETIMEDOUT = WSABASEERR + 60;
- {$EXTERNALSYM WSAETIMEDOUT}
- WSAECONNREFUSED = WSABASEERR + 61;
- {$EXTERNALSYM WSAECONNREFUSED}
- WSAELOOP = WSABASEERR + 62;
- {$EXTERNALSYM WSAELOOP}
- WSAENAMETOOLONG = WSABASEERR + 63;
- {$EXTERNALSYM WSAENAMETOOLONG}
- WSAEHOSTDOWN = WSABASEERR + 64;
- {$EXTERNALSYM WSAEHOSTDOWN}
- WSAEHOSTUNREACH = WSABASEERR + 65;
- {$EXTERNALSYM WSAEHOSTUNREACH}
- WSAENOTEMPTY = WSABASEERR + 66;
- {$EXTERNALSYM WSAENOTEMPTY}
- WSAEPROCLIM = WSABASEERR + 67;
- {$EXTERNALSYM WSAEPROCLIM}
- WSAEUSERS = WSABASEERR + 68;
- {$EXTERNALSYM WSAEUSERS}
- WSAEDQUOT = WSABASEERR + 69;
- {$EXTERNALSYM WSAEDQUOT}
- WSAESTALE = WSABASEERR + 70;
- {$EXTERNALSYM WSAESTALE}
- WSAEREMOTE = WSABASEERR + 71;
- {$EXTERNALSYM WSAEREMOTE}
-
-//
-// Extended Windows Sockets error constant definitions
-//
-
- WSASYSNOTREADY = WSABASEERR + 91;
- {$EXTERNALSYM WSASYSNOTREADY}
- WSAVERNOTSUPPORTED = WSABASEERR + 92;
- {$EXTERNALSYM WSAVERNOTSUPPORTED}
- WSANOTINITIALISED = WSABASEERR + 93;
- {$EXTERNALSYM WSANOTINITIALISED}
- WSAEDISCON = WSABASEERR + 101;
- {$EXTERNALSYM WSAEDISCON}
- WSAENOMORE = WSABASEERR + 102;
- {$EXTERNALSYM WSAENOMORE}
- WSAECANCELLED = WSABASEERR + 103;
- {$EXTERNALSYM WSAECANCELLED}
- WSAEINVALIDPROCTABLE = WSABASEERR + 104;
- {$EXTERNALSYM WSAEINVALIDPROCTABLE}
- WSAEINVALIDPROVIDER = WSABASEERR + 105;
- {$EXTERNALSYM WSAEINVALIDPROVIDER}
- WSAEPROVIDERFAILEDINIT = WSABASEERR + 106;
- {$EXTERNALSYM WSAEPROVIDERFAILEDINIT}
- WSASYSCALLFAILURE = WSABASEERR + 107;
- {$EXTERNALSYM WSASYSCALLFAILURE}
- WSASERVICE_NOT_FOUND = WSABASEERR + 108;
- {$EXTERNALSYM WSASERVICE_NOT_FOUND}
- WSATYPE_NOT_FOUND = WSABASEERR + 109;
- {$EXTERNALSYM WSATYPE_NOT_FOUND}
- WSA_E_NO_MORE = WSABASEERR + 110;
- {$EXTERNALSYM WSA_E_NO_MORE}
- WSA_E_CANCELLED = WSABASEERR + 111;
- {$EXTERNALSYM WSA_E_CANCELLED}
- WSAEREFUSED = WSABASEERR + 112;
- {$EXTERNALSYM WSAEREFUSED}
-
-//
-// Error return codes from gethostbyname() and gethostbyaddr()
-// (when using the resolver). Note that these errors are
-// retrieved via WSAGetLastError() and must therefore follow
-// the rules for avoiding clashes with error numbers from
-// specific implementations or language run-time systems.
-// For this reason the codes are based at WSABASEERR+1001.
-// Note also that [WSA]NO_ADDRESS is defined only for
-// compatibility purposes.
-//
-
-// Authoritative Answer: Host not found
-
- WSAHOST_NOT_FOUND = WSABASEERR + 1001;
- {$EXTERNALSYM WSAHOST_NOT_FOUND}
-
-// Non-Authoritative: Host not found, or SERVERFAIL
-
- WSATRY_AGAIN = WSABASEERR + 1002;
- {$EXTERNALSYM WSATRY_AGAIN}
-
-// Non-recoverable errors, FORMERR, REFUSED, NOTIMP
-
- WSANO_RECOVERY = WSABASEERR + 1003;
- {$EXTERNALSYM WSANO_RECOVERY}
-
-// Valid name, no data record of requested type
-
- WSANO_DATA = WSABASEERR + 1004;
- {$EXTERNALSYM WSANO_DATA}
-
-//
-// Define QOS related error return codes
-//
-//
-
- WSA_QOS_RECEIVERS = WSABASEERR + 1005; // at least one Reserve has arrived
- {$EXTERNALSYM WSA_QOS_RECEIVERS}
- WSA_QOS_SENDERS = WSABASEERR + 1006; // at least one Path has arrived
- {$EXTERNALSYM WSA_QOS_SENDERS}
- WSA_QOS_NO_SENDERS = WSABASEERR + 1007; // there are no senders
- {$EXTERNALSYM WSA_QOS_NO_SENDERS}
- WSA_QOS_NO_RECEIVERS = WSABASEERR + 1008; // there are no receivers
- {$EXTERNALSYM WSA_QOS_NO_RECEIVERS}
- WSA_QOS_REQUEST_CONFIRMED = WSABASEERR + 1009; // Reserve has been confirmed
- {$EXTERNALSYM WSA_QOS_REQUEST_CONFIRMED}
- WSA_QOS_ADMISSION_FAILURE = WSABASEERR + 1010; // error due to lack of resources
- {$EXTERNALSYM WSA_QOS_ADMISSION_FAILURE}
- WSA_QOS_POLICY_FAILURE = WSABASEERR + 1011; // rejected for administrative reasons - bad credentials
- {$EXTERNALSYM WSA_QOS_POLICY_FAILURE}
- WSA_QOS_BAD_STYLE = WSABASEERR + 1012; // unknown or conflicting style
- {$EXTERNALSYM WSA_QOS_BAD_STYLE}
- WSA_QOS_BAD_OBJECT = WSABASEERR + 1013; // problem with some part of the filterspec or providerspecific buffer in general
- {$EXTERNALSYM WSA_QOS_BAD_OBJECT}
- WSA_QOS_TRAFFIC_CTRL_ERROR = WSABASEERR + 1014; // problem with some part of the flowspec
- {$EXTERNALSYM WSA_QOS_TRAFFIC_CTRL_ERROR}
- WSA_QOS_GENERIC_ERROR = WSABASEERR + 1015; // general error
- {$EXTERNALSYM WSA_QOS_GENERIC_ERROR}
- WSA_QOS_ESERVICETYPE = WSABASEERR + 1016; // invalid service type in flowspec
- {$EXTERNALSYM WSA_QOS_ESERVICETYPE}
- WSA_QOS_EFLOWSPEC = WSABASEERR + 1017; // invalid flowspec
- {$EXTERNALSYM WSA_QOS_EFLOWSPEC}
- WSA_QOS_EPROVSPECBUF = WSABASEERR + 1018; // invalid provider specific buffer
- {$EXTERNALSYM WSA_QOS_EPROVSPECBUF}
- WSA_QOS_EFILTERSTYLE = WSABASEERR + 1019; // invalid filter style
- {$EXTERNALSYM WSA_QOS_EFILTERSTYLE}
- WSA_QOS_EFILTERTYPE = WSABASEERR + 1020; // invalid filter type
- {$EXTERNALSYM WSA_QOS_EFILTERTYPE}
- WSA_QOS_EFILTERCOUNT = WSABASEERR + 1021; // incorrect number of filters
- {$EXTERNALSYM WSA_QOS_EFILTERCOUNT}
- WSA_QOS_EOBJLENGTH = WSABASEERR + 1022; // invalid object length
- {$EXTERNALSYM WSA_QOS_EOBJLENGTH}
- WSA_QOS_EFLOWCOUNT = WSABASEERR + 1023; // incorrect number of flows
- {$EXTERNALSYM WSA_QOS_EFLOWCOUNT}
- WSA_QOS_EUNKOWNPSOBJ = WSABASEERR + 1024; // unknown object in provider specific buffer
- {$EXTERNALSYM WSA_QOS_EUNKOWNPSOBJ}
- WSA_QOS_EPOLICYOBJ = WSABASEERR + 1025; // invalid policy object in provider specific buffer
- {$EXTERNALSYM WSA_QOS_EPOLICYOBJ}
- WSA_QOS_EFLOWDESC = WSABASEERR + 1026; // invalid flow descriptor in the list
- {$EXTERNALSYM WSA_QOS_EFLOWDESC}
- WSA_QOS_EPSFLOWSPEC = WSABASEERR + 1027; // inconsistent flow spec in provider specific buffer
- {$EXTERNALSYM WSA_QOS_EPSFLOWSPEC}
- WSA_QOS_EPSFILTERSPEC = WSABASEERR + 1028; // invalid filter spec in provider specific buffer
- {$EXTERNALSYM WSA_QOS_EPSFILTERSPEC}
- WSA_QOS_ESDMODEOBJ = WSABASEERR + 1029; // invalid shape discard mode object in provider specific buffer
- {$EXTERNALSYM WSA_QOS_ESDMODEOBJ}
- WSA_QOS_ESHAPERATEOBJ = WSABASEERR + 1030; // invalid shaping rate object in provider specific buffer
- {$EXTERNALSYM WSA_QOS_ESHAPERATEOBJ}
- WSA_QOS_RESERVED_PETYPE = WSABASEERR + 1031; // reserved policy element in provider specific buffer
- {$EXTERNALSYM WSA_QOS_RESERVED_PETYPE}
-
-//
-// Compatibility macros.
-//
-
-function h_errno: Integer;
-{$EXTERNALSYM h_errno}
-
-const
- HOST_NOT_FOUND = WSAHOST_NOT_FOUND;
- {$EXTERNALSYM HOST_NOT_FOUND}
- TRY_AGAIN = WSATRY_AGAIN;
- {$EXTERNALSYM TRY_AGAIN}
- NO_RECOVERY = WSANO_RECOVERY;
- {$EXTERNALSYM NO_RECOVERY}
- NO_DATA = WSANO_DATA;
- {$EXTERNALSYM NO_DATA}
-
-// no address, look for MX record
-
- WSANO_ADDRESS = WSANO_DATA;
- {$EXTERNALSYM WSANO_ADDRESS}
- NO_ADDRESS = WSANO_ADDRESS;
- {$EXTERNALSYM NO_ADDRESS}
-
-//
-// Windows Sockets errors redefined as regular Berkeley error constants.
-// These are commented out in Windows NT to avoid conflicts with errno.h.
-// Use the WSA constants instead.
-//
-
-{$IFDEF FALSE}
-
-const
- EWOULDBLOCK = WSAEWOULDBLOCK;
- {$EXTERNALSYM EWOULDBLOCK}
- EINPROGRESS = WSAEINPROGRESS;
- {$EXTERNALSYM EINPROGRESS}
- EALREADY = WSAEALREADY;
- {$EXTERNALSYM EALREADY}
- ENOTSOCK = WSAENOTSOCK;
- {$EXTERNALSYM ENOTSOCK}
- EDESTADDRREQ = WSAEDESTADDRREQ;
- {$EXTERNALSYM EDESTADDRREQ}
- EMSGSIZE = WSAEMSGSIZE;
- {$EXTERNALSYM EMSGSIZE}
- EPROTOTYPE = WSAEPROTOTYPE;
- {$EXTERNALSYM EPROTOTYPE}
- ENOPROTOOPT = WSAENOPROTOOPT;
- {$EXTERNALSYM ENOPROTOOPT}
- EPROTONOSUPPORT = WSAEPROTONOSUPPORT;
- {$EXTERNALSYM EPROTONOSUPPORT}
- ESOCKTNOSUPPORT = WSAESOCKTNOSUPPORT;
- {$EXTERNALSYM ESOCKTNOSUPPORT}
- EOPNOTSUPP = WSAEOPNOTSUPP;
- {$EXTERNALSYM EOPNOTSUPP}
- EPFNOSUPPORT = WSAEPFNOSUPPORT;
- {$EXTERNALSYM EPFNOSUPPORT}
- EAFNOSUPPORT = WSAEAFNOSUPPORT;
- {$EXTERNALSYM EAFNOSUPPORT}
- EADDRINUSE = WSAEADDRINUSE;
- {$EXTERNALSYM EADDRINUSE}
- EADDRNOTAVAIL = WSAEADDRNOTAVAIL;
- {$EXTERNALSYM EADDRNOTAVAIL}
- ENETDOWN = WSAENETDOWN;
- {$EXTERNALSYM ENETDOWN}
- ENETUNREACH = WSAENETUNREACH;
- {$EXTERNALSYM ENETUNREACH}
- ENETRESET = WSAENETRESET;
- {$EXTERNALSYM ENETRESET}
- ECONNABORTED = WSAECONNABORTED;
- {$EXTERNALSYM ECONNABORTED}
- ECONNRESET = WSAECONNRESET;
- {$EXTERNALSYM ECONNRESET}
- ENOBUFS = WSAENOBUFS;
- {$EXTERNALSYM ENOBUFS}
- EISCONN = WSAEISCONN;
- {$EXTERNALSYM EISCONN}
- ENOTCONN = WSAENOTCONN;
- {$EXTERNALSYM ENOTCONN}
- ESHUTDOWN = WSAESHUTDOWN;
- {$EXTERNALSYM ESHUTDOWN}
- ETOOMANYREFS = WSAETOOMANYREFS;
- {$EXTERNALSYM ETOOMANYREFS}
- ETIMEDOUT = WSAETIMEDOUT;
- {$EXTERNALSYM ETIMEDOUT}
- ECONNREFUSED = WSAECONNREFUSED;
- {$EXTERNALSYM ECONNREFUSED}
- ELOOP = WSAELOOP;
- {$EXTERNALSYM ELOOP}
- ENAMETOOLONG = WSAENAMETOOLONG;
- {$EXTERNALSYM ENAMETOOLONG}
- EHOSTDOWN = WSAEHOSTDOWN;
- {$EXTERNALSYM EHOSTDOWN}
- EHOSTUNREACH = WSAEHOSTUNREACH;
- {$EXTERNALSYM EHOSTUNREACH}
- ENOTEMPTY = WSAENOTEMPTY;
- {$EXTERNALSYM ENOTEMPTY}
- EPROCLIM = WSAEPROCLIM;
- {$EXTERNALSYM EPROCLIM}
- EUSERS = WSAEUSERS;
- {$EXTERNALSYM EUSERS}
- EDQUOT = WSAEDQUOT;
- {$EXTERNALSYM EDQUOT}
- ESTALE = WSAESTALE;
- {$EXTERNALSYM ESTALE}
- EREMOTE = WSAEREMOTE;
- {$EXTERNALSYM EREMOTE}
-
-{$ENDIF FALSE}
-
-//
-// WinSock 2 extension -- new error codes and type definition
-//
-
-type
- WSAEVENT = HANDLE;
- {$EXTERNALSYM WSAEVENT}
- LPWSAEVENT = LPHANDLE;
- {$EXTERNALSYM LPWSAEVENT}
- WSAOVERLAPPED = OVERLAPPED;
- {$EXTERNALSYM WSAOVERLAPPED}
- LPWSAOVERLAPPED = ^OVERLAPPED;
- {$EXTERNALSYM LPWSAOVERLAPPED}
- TWsaEvent = WSAEVENT;
- PWsaEvent = LPWSAEVENT;
- TWsaOverlapped = WSAOVERLAPPED;
- PWsaOverlapped = LPWSAOVERLAPPED;
-
-const
- WSA_IO_PENDING = ERROR_IO_PENDING;
- {$EXTERNALSYM WSA_IO_PENDING}
- WSA_IO_INCOMPLETE = ERROR_IO_INCOMPLETE;
- {$EXTERNALSYM WSA_IO_INCOMPLETE}
- WSA_INVALID_HANDLE = ERROR_INVALID_HANDLE;
- {$EXTERNALSYM WSA_INVALID_HANDLE}
- WSA_INVALID_PARAMETER = ERROR_INVALID_PARAMETER;
- {$EXTERNALSYM WSA_INVALID_PARAMETER}
- WSA_NOT_ENOUGH_MEMORY = ERROR_NOT_ENOUGH_MEMORY;
- {$EXTERNALSYM WSA_NOT_ENOUGH_MEMORY}
- WSA_OPERATION_ABORTED = ERROR_OPERATION_ABORTED;
- {$EXTERNALSYM WSA_OPERATION_ABORTED}
-
- WSA_INVALID_EVENT = WSAEVENT(nil);
- {$EXTERNALSYM WSA_INVALID_EVENT}
- WSA_MAXIMUM_WAIT_EVENTS = MAXIMUM_WAIT_OBJECTS;
- {$EXTERNALSYM WSA_MAXIMUM_WAIT_EVENTS}
- WSA_WAIT_FAILED = WAIT_FAILED;
- {$EXTERNALSYM WSA_WAIT_FAILED}
- WSA_WAIT_EVENT_0 = WAIT_OBJECT_0;
- {$EXTERNALSYM WSA_WAIT_EVENT_0}
- WSA_WAIT_IO_COMPLETION = WAIT_IO_COMPLETION;
- {$EXTERNALSYM WSA_WAIT_IO_COMPLETION}
- WSA_WAIT_TIMEOUT = WAIT_TIMEOUT;
- {$EXTERNALSYM WSA_WAIT_TIMEOUT}
- WSA_INFINITE = INFINITE;
- {$EXTERNALSYM WSA_INFINITE}
-
-//
-// WinSock 2 extension -- WSABUF and QOS struct, include qos.h
-// to pull in FLOWSPEC and related definitions
-//
-
-type
- _WSABUF = record
- len: u_long; // the length of the buffer
- buf: PChar; // the pointer to the buffer
- end;
- {$EXTERNALSYM _WSABUF}
- WSABUF = _WSABUF;
- {$EXTERNALSYM WSABUF}
- LPWSABUF = ^_WSABUF;
- {$EXTERNALSYM LPWSABUF}
- TWsaBuf = WSABUF;
- PWsaBuf = LPWSABUF;
-
- _QualityOfService = record
- SendingFlowspec: FLOWSPEC; // the flow spec for data sending
- ReceivingFlowspec: FLOWSPEC; // the flow spec for data receiving
- ProviderSpecific: WSABUF; // additional provider specific stuff
- end;
- {$EXTERNALSYM _QualityOfService}
- QOS = _QualityOfService;
- {$EXTERNALSYM QOS}
- LPQOS = ^_QualityOfService;
- {$EXTERNALSYM LPQOS}
- TQOS = QOS;
- PQOS = LPQOS;
-
-//
-// WinSock 2 extension -- manifest constants for return values of the condition function
-//
-
-const
- CF_ACCEPT = $0000;
- {$EXTERNALSYM CF_ACCEPT}
- CF_REJECT = $0001;
- {$EXTERNALSYM CF_REJECT}
- CF_DEFER = $0002;
- {$EXTERNALSYM CF_DEFER}
-
-//
-// WinSock 2 extension -- manifest constants for shutdown()
-//
-
- SD_RECEIVE = $00;
- {$EXTERNALSYM SD_RECEIVE}
- SD_SEND = $01;
- {$EXTERNALSYM SD_SEND}
- SD_BOTH = $02;
- {$EXTERNALSYM SD_BOTH}
-
-//
-// WinSock 2 extension -- data type and manifest constants for socket groups
-//
-
-type
- GROUP = Cardinal;
- {$EXTERNALSYM GROUP}
- TGroup = GROUP;
- PGroup = ^GROUP;
-
-const
- SG_UNCONSTRAINED_GROUP = $01;
- {$EXTERNALSYM SG_UNCONSTRAINED_GROUP}
- SG_CONSTRAINED_GROUP = $02;
- {$EXTERNALSYM SG_CONSTRAINED_GROUP}
-
-//
-// WinSock 2 extension -- data type for WSAEnumNetworkEvents()
-//
-
-type
- _WSANETWORKEVENTS = record
- lNetworkEvents: Longint;
- iErrorCode: array [0..FD_MAX_EVENTS - 1] of Integer;
- end;
- {$EXTERNALSYM _WSANETWORKEVENTS}
- WSANETWORKEVENTS = _WSANETWORKEVENTS;
- {$EXTERNALSYM WSANETWORKEVENTS}
- LPWSANETWORKEVENTS = ^WSANETWORKEVENTS;
- {$EXTERNALSYM LPWSANETWORKEVENTS}
- TWsaNetworkEvents = WSANETWORKEVENTS;
- PWsaNetworkEvents = LPWSANETWORKEVENTS;
-
-//
-// WinSock 2 extension -- WSAPROTOCOL_INFO structure and associated
-// manifest constants
-//
-
-const
- MAX_PROTOCOL_CHAIN = 7;
- {$EXTERNALSYM MAX_PROTOCOL_CHAIN}
-
- BASE_PROTOCOL = 1;
- {$EXTERNALSYM BASE_PROTOCOL}
- LAYERED_PROTOCOL = 0;
- {$EXTERNALSYM LAYERED_PROTOCOL}
-
-type
- _WSAPROTOCOLCHAIN = record
- ChainLen: Integer; // the length of the chain,
- // length = 0 means layered protocol,
- // length = 1 means base protocol,
- // length > 1 means protocol chain
- ChainEntries: array [0..MAX_PROTOCOL_CHAIN - 1] of DWORD; // a list of dwCatalogEntryIds
- end;
- {$EXTERNALSYM _WSAPROTOCOLCHAIN}
- WSAPROTOCOLCHAIN = _WSAPROTOCOLCHAIN;
- {$EXTERNALSYM WSAPROTOCOLCHAIN}
- LPWSAPROTOCOLCHAIN = ^WSAPROTOCOLCHAIN;
- {$EXTERNALSYM LPWSAPROTOCOLCHAIN}
- TWsaProtocolChain = WSAPROTOCOLCHAIN;
- PWsaProtocolChain = LPWSAPROTOCOLCHAIN;
-
-const
- WSAPROTOCOL_LEN = 255;
- {$EXTERNALSYM WSAPROTOCOL_LEN}
-
-type
- _WSAPROTOCOL_INFOA = record
- dwServiceFlags1: DWORD;
- dwServiceFlags2: DWORD;
- dwServiceFlags3: DWORD;
- dwServiceFlags4: DWORD;
- dwProviderFlags: DWORD;
- ProviderId: TGUID;
- dwCatalogEntryId: DWORD;
- ProtocolChain: WSAPROTOCOLCHAIN;
- iVersion: Integer;
- iAddressFamily: Integer;
- iMaxSockAddr: Integer;
- iMinSockAddr: Integer;
- iSocketType: Integer;
- iProtocol: Integer;
- iProtocolMaxOffset: Integer;
- iNetworkByteOrder: Integer;
- iSecurityScheme: Integer;
- dwMessageSize: DWORD;
- dwProviderReserved: DWORD;
- szProtocol: array [0..WSAPROTOCOL_LEN] of Char;
- end;
- {$EXTERNALSYM _WSAPROTOCOL_INFOA}
- WSAPROTOCOL_INFOA = _WSAPROTOCOL_INFOA;
- {$EXTERNALSYM WSAPROTOCOL_INFOA}
- LPWSAPROTOCOL_INFOA = ^WSAPROTOCOL_INFOA;
- {$EXTERNALSYM LPWSAPROTOCOL_INFOA}
- TWsaProtocolInfoA = WSAPROTOCOL_INFOA;
- PWsaProtocolInfoA = LPWSAPROTOCOL_INFOA;
-
- _WSAPROTOCOL_INFOW = record
- dwServiceFlags1: DWORD;
- dwServiceFlags2: DWORD;
- dwServiceFlags3: DWORD;
- dwServiceFlags4: DWORD;
- dwProviderFlags: DWORD;
- ProviderId: TGUID;
- dwCatalogEntryId: DWORD;
- ProtocolChain: WSAPROTOCOLCHAIN;
- iVersion: Integer;
- iAddressFamily: Integer;
- iMaxSockAddr: Integer;
- iMinSockAddr: Integer;
- iSocketType: Integer;
- iProtocol: Integer;
- iProtocolMaxOffset: Integer;
- iNetworkByteOrder: Integer;
- iSecurityScheme: Integer;
- dwMessageSize: DWORD;
- dwProviderReserved: DWORD;
- szProtocol: array [0..WSAPROTOCOL_LEN] of WideChar;
- end;
- {$EXTERNALSYM _WSAPROTOCOL_INFOW}
- WSAPROTOCOL_INFOW = _WSAPROTOCOL_INFOW;
- {$EXTERNALSYM WSAPROTOCOL_INFOW}
- LPWSAPROTOCOL_INFOW = ^WSAPROTOCOL_INFOW;
- {$EXTERNALSYM LPWSAPROTOCOL_INFOW}
- TWsaProtocolInfoW = WSAPROTOCOL_INFOW;
- PWsaProtocolInfoW = LPWSAPROTOCOL_INFOW;
-
- {$IFDEF UNICODE}
- WSAPROTOCOL_INFO = WSAPROTOCOL_INFOW;
- {$EXTERNALSYM WSAPROTOCOL_INFO}
- LPWSAPROTOCOL_INFO = LPWSAPROTOCOL_INFOW;
- {$EXTERNALSYM LPWSAPROTOCOL_INFO}
- TWsaProtocolInfo = TWsaProtocolInfoW;
- PWsaProtocolInfo = PWsaProtocolInfoW;
- {$ELSE}
- WSAPROTOCOL_INFO = WSAPROTOCOL_INFOA;
- {$EXTERNALSYM WSAPROTOCOL_INFO}
- LPWSAPROTOCOL_INFO = LPWSAPROTOCOL_INFOA;
- {$EXTERNALSYM LPWSAPROTOCOL_INFO}
- TWsaProtocolInfo = TWsaProtocolInfoA;
- PWsaProtocolInfo = PWsaProtocolInfoA;
- {$ENDIF UNICODE}
-
-// Flag bit definitions for dwProviderFlags
-
-const
- PFL_MULTIPLE_PROTO_ENTRIES = $00000001;
- {$EXTERNALSYM PFL_MULTIPLE_PROTO_ENTRIES}
- PFL_RECOMMENDED_PROTO_ENTRY = $00000002;
- {$EXTERNALSYM PFL_RECOMMENDED_PROTO_ENTRY}
- PFL_HIDDEN = $00000004;
- {$EXTERNALSYM PFL_HIDDEN}
- PFL_MATCHES_PROTOCOL_ZERO = $00000008;
- {$EXTERNALSYM PFL_MATCHES_PROTOCOL_ZERO}
-
-// Flag bit definitions for dwServiceFlags1
-
- XP1_CONNECTIONLESS = $00000001;
- {$EXTERNALSYM XP1_CONNECTIONLESS}
- XP1_GUARANTEED_DELIVERY = $00000002;
- {$EXTERNALSYM XP1_GUARANTEED_DELIVERY}
- XP1_GUARANTEED_ORDER = $00000004;
- {$EXTERNALSYM XP1_GUARANTEED_ORDER}
- XP1_MESSAGE_ORIENTED = $00000008;
- {$EXTERNALSYM XP1_MESSAGE_ORIENTED}
- XP1_PSEUDO_STREAM = $00000010;
- {$EXTERNALSYM XP1_PSEUDO_STREAM}
- XP1_GRACEFUL_CLOSE = $00000020;
- {$EXTERNALSYM XP1_GRACEFUL_CLOSE}
- XP1_EXPEDITED_DATA = $00000040;
- {$EXTERNALSYM XP1_EXPEDITED_DATA}
- XP1_CONNECT_DATA = $00000080;
- {$EXTERNALSYM XP1_CONNECT_DATA}
- XP1_DISCONNECT_DATA = $00000100;
- {$EXTERNALSYM XP1_DISCONNECT_DATA}
- XP1_SUPPORT_BROADCAST = $00000200;
- {$EXTERNALSYM XP1_SUPPORT_BROADCAST}
- XP1_SUPPORT_MULTIPOINT = $00000400;
- {$EXTERNALSYM XP1_SUPPORT_MULTIPOINT}
- XP1_MULTIPOINT_CONTROL_PLANE = $00000800;
- {$EXTERNALSYM XP1_MULTIPOINT_CONTROL_PLANE}
- XP1_MULTIPOINT_DATA_PLANE = $00001000;
- {$EXTERNALSYM XP1_MULTIPOINT_DATA_PLANE}
- XP1_QOS_SUPPORTED = $00002000;
- {$EXTERNALSYM XP1_QOS_SUPPORTED}
- XP1_INTERRUPT = $00004000;
- {$EXTERNALSYM XP1_INTERRUPT}
- XP1_UNI_SEND = $00008000;
- {$EXTERNALSYM XP1_UNI_SEND}
- XP1_UNI_RECV = $00010000;
- {$EXTERNALSYM XP1_UNI_RECV}
- XP1_IFS_HANDLES = $00020000;
- {$EXTERNALSYM XP1_IFS_HANDLES}
- XP1_PARTIAL_MESSAGE = $00040000;
- {$EXTERNALSYM XP1_PARTIAL_MESSAGE}
-
- BIGENDIAN = $0000;
- {$EXTERNALSYM BIGENDIAN}
- LITTLEENDIAN = $0001;
- {$EXTERNALSYM LITTLEENDIAN}
-
- SECURITY_PROTOCOL_NONE = $0000;
- {$EXTERNALSYM SECURITY_PROTOCOL_NONE}
-
-//
-// WinSock 2 extension -- manifest constants for WSAJoinLeaf()
-//
-
- JL_SENDER_ONLY = $01;
- {$EXTERNALSYM JL_SENDER_ONLY}
- JL_RECEIVER_ONLY = $02;
- {$EXTERNALSYM JL_RECEIVER_ONLY}
- JL_BOTH = $04;
- {$EXTERNALSYM JL_BOTH}
-
-//
-// WinSock 2 extension -- manifest constants for WSASocket()
-//
-
- WSA_FLAG_OVERLAPPED = $01;
- {$EXTERNALSYM WSA_FLAG_OVERLAPPED}
- WSA_FLAG_MULTIPOINT_C_ROOT = $02;
- {$EXTERNALSYM WSA_FLAG_MULTIPOINT_C_ROOT}
- WSA_FLAG_MULTIPOINT_C_LEAF = $04;
- {$EXTERNALSYM WSA_FLAG_MULTIPOINT_C_LEAF}
- WSA_FLAG_MULTIPOINT_D_ROOT = $08;
- {$EXTERNALSYM WSA_FLAG_MULTIPOINT_D_ROOT}
- WSA_FLAG_MULTIPOINT_D_LEAF = $10;
- {$EXTERNALSYM WSA_FLAG_MULTIPOINT_D_LEAF}
-
-//
-// WinSock 2 extension -- manifest constants for WSAIoctl()
-//
-
- IOC_UNIX = $00000000;
- {$EXTERNALSYM IOC_UNIX}
- IOC_WS2 = $08000000;
- {$EXTERNALSYM IOC_WS2}
- IOC_PROTOCOL = $10000000;
- {$EXTERNALSYM IOC_PROTOCOL}
- IOC_VENDOR = $18000000;
- {$EXTERNALSYM IOC_VENDOR}
-
-function _WSAIO(x, y: DWORD): DWORD;
-{$EXTERNALSYM _WSAIO}
-
-function _WSAIOR(x, y: DWORD): DWORD;
-{$EXTERNALSYM _WSAIOR}
-
-function _WSAIOW(x, y: DWORD): DWORD;
-{$EXTERNALSYM _WSAIOW}
-
-function _WSAIORW(x, y: DWORD): DWORD;
-{$EXTERNALSYM _WSAIORW}
-
-const
- SIO_ASSOCIATE_HANDLE = IOC_INOUT or IOC_WS2 or 1;
- {$EXTERNALSYM SIO_ASSOCIATE_HANDLE}
- SIO_ENABLE_CIRCULAR_QUEUEING = IOC_VOID or IOC_WS2 or 2;
- {$EXTERNALSYM SIO_ENABLE_CIRCULAR_QUEUEING}
- SIO_FIND_ROUTE = IOC_OUT or IOC_WS2 or 3;
- {$EXTERNALSYM SIO_FIND_ROUTE}
- SIO_FLUSH = IOC_VOID or IOC_WS2 or 4;
- {$EXTERNALSYM SIO_FLUSH}
- SIO_GET_BROADCAST_ADDRESS = IOC_OUT or IOC_WS2 or 5;
- {$EXTERNALSYM SIO_GET_BROADCAST_ADDRESS}
- SIO_GET_EXTENSION_FUNCTION_POINTER = IOC_INOUT or IOC_WS2 or 6;
- {$EXTERNALSYM SIO_GET_EXTENSION_FUNCTION_POINTER}
- SIO_GET_QOS = IOC_INOUT or IOC_WS2 or 7;
- {$EXTERNALSYM SIO_GET_QOS}
- SIO_GET_GROUP_QOS = IOC_INOUT or IOC_WS2 or 8;
- {$EXTERNALSYM SIO_GET_GROUP_QOS}
- SIO_MULTIPOINT_LOOPBACK = IOC_INOUT or IOC_WS2 or 9;
- {$EXTERNALSYM SIO_MULTIPOINT_LOOPBACK}
- SIO_MULTICAST_SCOPE = IOC_INOUT or IOC_WS2 or 10;
- {$EXTERNALSYM SIO_MULTICAST_SCOPE}
- SIO_SET_QOS = IOC_INOUT or IOC_WS2 or 11;
- {$EXTERNALSYM SIO_SET_QOS}
- SIO_SET_GROUP_QOS = IOC_INOUT or IOC_WS2 or 12;
- {$EXTERNALSYM SIO_SET_GROUP_QOS}
- SIO_TRANSLATE_HANDLE = IOC_INOUT or IOC_WS2 or 13;
- {$EXTERNALSYM SIO_TRANSLATE_HANDLE}
- SIO_ROUTING_INTERFACE_QUERY = IOC_INOUT or IOC_WS2 or 20;
- {$EXTERNALSYM SIO_ROUTING_INTERFACE_QUERY}
- SIO_ROUTING_INTERFACE_CHANGE = IOC_INOUT or IOC_WS2 or 21;
- {$EXTERNALSYM SIO_ROUTING_INTERFACE_CHANGE}
- SIO_ADDRESS_LIST_QUERY = IOC_OUT or IOC_WS2 or 22;
- {$EXTERNALSYM SIO_ADDRESS_LIST_QUERY}
- SIO_ADDRESS_LIST_CHANGE = IOC_VOID or IOC_WS2 or 23;
- {$EXTERNALSYM SIO_ADDRESS_LIST_CHANGE}
- SIO_QUERY_TARGET_PNP_HANDLE = IOC_OUT or IOC_WS2 or 24;
- {$EXTERNALSYM SIO_QUERY_TARGET_PNP_HANDLE}
-
- SIO_ADDRESS_LIST_SORT = IOC_INOUT or IOC_WS2 or 25;
- {$EXTERNALSYM SIO_ADDRESS_LIST_SORT}
-
-//
-// WinSock 2 extensions -- data types for the condition function in
-// WSAAccept() and overlapped I/O completion routine.
-//
-
-type
- LPCONDITIONPROC = function(lpCallerId, lpCallerData: LPWSABUF; lpSQOS, lpGQOS: LPQOS; lpCalleeId, lpCalleeData: LPWSABUF;
- g: PGROUP; dwCallbackData: DWORD_PTR): Integer; stdcall;
- {$EXTERNALSYM LPCONDITIONPROC}
-
- LPWSAOVERLAPPED_COMPLETION_ROUTINE = procedure(dwError, cbTransferred: DWORD; lpOverlapped: LPWSAOVERLAPPED; dwFlags: DWORD); stdcall;
- {$EXTERNALSYM LPWSAOVERLAPPED_COMPLETION_ROUTINE}
-
-//
-// WinSock 2 extension -- manifest constants and associated structures
-// for WSANSPIoctl()
-//
-
-const
- SIO_NSP_NOTIFY_CHANGE = IOC_IN or IOC_WS2 or 25;
- {$EXTERNALSYM SIO_NSP_NOTIFY_CHANGE}
-
-type
- _WSACOMPLETIONTYPE = (
- NSP_NOTIFY_IMMEDIATELY,
- NSP_NOTIFY_HWND,
- NSP_NOTIFY_EVENT,
- NSP_NOTIFY_PORT,
- NSP_NOTIFY_APC);
- {$EXTERNALSYM _WSACOMPLETIONTYPE}
- WSACOMPLETIONTYPE = _WSACOMPLETIONTYPE;
- {$EXTERNALSYM WSACOMPLETIONTYPE}
- PWSACOMPLETIONTYPE = ^WSACOMPLETIONTYPE;
- {$EXTERNALSYM PWSACOMPLETIONTYPE}
- LPWSACOMPLETIONTYPE = ^WSACOMPLETIONTYPE;
- {$EXTERNALSYM LPWSACOMPLETIONTYPE}
- TWsaCompletionType = WSACOMPLETIONTYPE;
-
- _WSACOMPLETION = record
- Type_: WSACOMPLETIONTYPE;
- case Integer of // Parameters
- 0: ( // WindowMessage
- hWnd: HWND;
- uMsg: UINT;
- context: WPARAM);
- (* TODO
- 1: ( // Event
- lpOverlapped: LPWSAOVERLAPPED);
- 2: ( // Apc
- lpOverlapped: LPWSAOVERLAPPED;
- lpfnCompletionProc: LPWSAOVERLAPPED_COMPLETION_ROUTINE);
- *)
- 3: ( // Port
- lpOverlapped: LPWSAOVERLAPPED;
- hPort: HANDLE;
- Key: ULONG_PTR);
- end;
- {$EXTERNALSYM _WSACOMPLETION}
- WSACOMPLETION = _WSACOMPLETION;
- {$EXTERNALSYM WSACOMPLETION}
- PWSACOMPLETION = ^WSACOMPLETION;
- {$EXTERNALSYM PWSACOMPLETION}
- LPWSACOMPLETION = ^WSACOMPLETION;
- {$EXTERNALSYM LPWSACOMPLETION}
- TWsaCompletion = WSACOMPLETION;
-
-//
-// WinSock 2 extension -- manifest constants for SIO_TRANSLATE_HANDLE ioctl
-//
-
-const
- TH_NETDEV = $00000001;
- {$EXTERNALSYM TH_NETDEV}
- TH_TAPI = $00000002;
- {$EXTERNALSYM TH_TAPI}
-
-//
-// Microsoft Windows Extended data types required for the functions to
-// convert back and forth between binary and string forms of
-// addresses.
-//
-
-type
- LPSOCKADDR = ^sockaddr;
- {$EXTERNALSYM LPSOCKADDR}
-
- PSOCKADDR_STORAGE = ^sockaddr_storage;
- {$EXTERNALSYM PSOCKADDR_STORAGE}
- LPSOCKADDR_STORAGE = ^sockaddr_storage;
- {$EXTERNALSYM LPSOCKADDR_STORAGE}
-
-//
-// Manifest constants and type definitions related to name resolution and
-// registration (RNR) API
-//
-
- _BLOB = record
- cbSize: ULONG;
- pBlobData: LPBYTE;
- end;
- {$EXTERNALSYM _BLOB}
- BLOB = _BLOB;
- {$EXTERNALSYM BLOB}
- LPBLOB = ^BLOB;
- {$EXTERNALSYM LPBLOB}
- TBlob = BLOB;
- PBlob = LPBLOB;
-
-//
-// Service Install Flags
-//
-
-const
- SERVICE_MULTIPLE = $00000001;
- {$EXTERNALSYM SERVICE_MULTIPLE}
-
-//
-//& Name Spaces
-//
-
- NS_ALL = 0;
- {$EXTERNALSYM NS_ALL}
-
- NS_SAP = 1;
- {$EXTERNALSYM NS_SAP}
- NS_NDS = 2;
- {$EXTERNALSYM NS_NDS}
- NS_PEER_BROWSE = 3;
- {$EXTERNALSYM NS_PEER_BROWSE}
- NS_SLP = 5;
- {$EXTERNALSYM NS_SLP}
- NS_DHCP = 6;
- {$EXTERNALSYM NS_DHCP}
-
- NS_TCPIP_LOCAL = 10;
- {$EXTERNALSYM NS_TCPIP_LOCAL}
- NS_TCPIP_HOSTS = 11;
- {$EXTERNALSYM NS_TCPIP_HOSTS}
- NS_DNS = 12;
- {$EXTERNALSYM NS_DNS}
- NS_NETBT = 13;
- {$EXTERNALSYM NS_NETBT}
- NS_WINS = 14;
- {$EXTERNALSYM NS_WINS}
- NS_NLA = 15; // Network Location Awareness
- {$EXTERNALSYM NS_NLA}
-
- NS_NBP = 20;
- {$EXTERNALSYM NS_NBP}
-
- NS_MS = 30;
- {$EXTERNALSYM NS_MS}
- NS_STDA = 31;
- {$EXTERNALSYM NS_STDA}
- NS_NTDS = 32;
- {$EXTERNALSYM NS_NTDS}
-
- NS_X500 = 40;
- {$EXTERNALSYM NS_X500}
- NS_NIS = 41;
- {$EXTERNALSYM NS_NIS}
- NS_NISPLUS = 42;
- {$EXTERNALSYM NS_NISPLUS}
-
- NS_WRQ = 50;
- {$EXTERNALSYM NS_WRQ}
-
- NS_NETDES = 60; // Network Designers Limited
- {$EXTERNALSYM NS_NETDES}
-
-//
-// Resolution flags for WSAGetAddressByName().
-// Note these are also used by the 1.1 API GetAddressByName, so
-// leave them around.
-//
-
- RES_UNUSED_1 = $00000001;
- {$EXTERNALSYM RES_UNUSED_1}
- RES_FLUSH_CACHE = $00000002;
- {$EXTERNALSYM RES_FLUSH_CACHE}
- RES_SERVICE = $00000004;
- {$EXTERNALSYM RES_SERVICE}
-
-//
-// Well known value names for Service Types
-//
-
- SERVICE_TYPE_VALUE_IPXPORTA = 'IpxSocket';
- {$EXTERNALSYM SERVICE_TYPE_VALUE_IPXPORTA}
- SERVICE_TYPE_VALUE_IPXPORTW = WideString('IpxSocket');
- {$EXTERNALSYM SERVICE_TYPE_VALUE_IPXPORTW}
- SERVICE_TYPE_VALUE_SAPIDA = 'SapId';
- {$EXTERNALSYM SERVICE_TYPE_VALUE_SAPIDA}
- SERVICE_TYPE_VALUE_SAPIDW = WideString('SapId');
- {$EXTERNALSYM SERVICE_TYPE_VALUE_SAPIDW}
- SERVICE_TYPE_VALUE_TCPPORTA = 'TcpPort';
- {$EXTERNALSYM SERVICE_TYPE_VALUE_TCPPORTA}
- SERVICE_TYPE_VALUE_TCPPORTW = WideString('TcpPort');
- {$EXTERNALSYM SERVICE_TYPE_VALUE_TCPPORTW}
- SERVICE_TYPE_VALUE_UDPPORTA = 'UdpPort';
- {$EXTERNALSYM SERVICE_TYPE_VALUE_UDPPORTA}
- SERVICE_TYPE_VALUE_UDPPORTW = WideString('UdpPort');
- {$EXTERNALSYM SERVICE_TYPE_VALUE_UDPPORTW}
- SERVICE_TYPE_VALUE_OBJECTIDA = 'ObjectId';
- {$EXTERNALSYM SERVICE_TYPE_VALUE_OBJECTIDA}
- SERVICE_TYPE_VALUE_OBJECTIDW = WideString('ObjectId');
- {$EXTERNALSYM SERVICE_TYPE_VALUE_OBJECTIDW}
-
- {$IFDEF UNICODE}
- SERVICE_TYPE_VALUE_SAPID = SERVICE_TYPE_VALUE_SAPIDW;
- {$EXTERNALSYM SERVICE_TYPE_VALUE_SAPID}
- SERVICE_TYPE_VALUE_TCPPORT = SERVICE_TYPE_VALUE_TCPPORTW;
- {$EXTERNALSYM SERVICE_TYPE_VALUE_TCPPORT}
- SERVICE_TYPE_VALUE_UDPPORT = SERVICE_TYPE_VALUE_UDPPORTW;
- {$EXTERNALSYM SERVICE_TYPE_VALUE_UDPPORT}
- SERVICE_TYPE_VALUE_OBJECTID = SERVICE_TYPE_VALUE_OBJECTIDW;
- {$EXTERNALSYM SERVICE_TYPE_VALUE_OBJECTID}
- {$ELSE}
- SERVICE_TYPE_VALUE_SAPID = SERVICE_TYPE_VALUE_SAPIDA;
- {$EXTERNALSYM SERVICE_TYPE_VALUE_SAPID}
- SERVICE_TYPE_VALUE_TCPPORT = SERVICE_TYPE_VALUE_TCPPORTA;
- {$EXTERNALSYM SERVICE_TYPE_VALUE_TCPPORT}
- SERVICE_TYPE_VALUE_UDPPORT = SERVICE_TYPE_VALUE_UDPPORTA;
- {$EXTERNALSYM SERVICE_TYPE_VALUE_UDPPORT}
- SERVICE_TYPE_VALUE_OBJECTID = SERVICE_TYPE_VALUE_OBJECTIDA;
- {$EXTERNALSYM SERVICE_TYPE_VALUE_OBJECTID}
- {$ENDIF UNICODE}
-
-//
-// SockAddr Information
-//
-
-type
- LPSOCKET_ADDRESS = ^SOCKET_ADDRESS;
- {$EXTERNALSYM LPSOCKET_ADDRESS}
- PSOCKET_ADDRESS = ^SOCKET_ADDRESS;
- {$EXTERNALSYM PSOCKET_ADDRESS}
- _SOCKET_ADDRESS = record
- lpSockaddr: LPSOCKADDR;
- iSockaddrLength: Integer;
- end;
- {$EXTERNALSYM _SOCKET_ADDRESS}
- SOCKET_ADDRESS = _SOCKET_ADDRESS;
- {$EXTERNALSYM SOCKET_ADDRESS}
- TSocketAddress = SOCKET_ADDRESS;
- PSocketAddress = PSOCKET_ADDRESS;
-
-//
-// CSAddr Information
-//
-
- LPCSADDR_INFO = ^CSADDR_INFO;
- {$EXTERNALSYM LPCSADDR_INFO}
- PCSADDR_INFO = ^CSADDR_INFO;
- {$EXTERNALSYM PCSADDR_INFO}
- _CSADDR_INFO = record
- LocalAddr: SOCKET_ADDRESS;
- RemoteAddr: SOCKET_ADDRESS;
- iSocketType: Integer;
- iProtocol: Integer;
- end;
- {$EXTERNALSYM _CSADDR_INFO}
- CSADDR_INFO = _CSADDR_INFO;
- {$EXTERNALSYM CSADDR_INFO}
- TCsAddrInfo = CSADDR_INFO;
- PCsAddrInfo = PCSADDR_INFO;
-
-//
-// Address list returned via SIO_ADDRESS_LIST_QUERY
-//
-
- LPSOCKET_ADDRESS_LIST = ^SOCKET_ADDRESS_LIST;
- {$EXTERNALSYM LPSOCKET_ADDRESS_LIST}
- _SOCKET_ADDRESS_LIST = record
- iAddressCount: Integer;
- Address: array [0..0] of SOCKET_ADDRESS;
- end;
- {$EXTERNALSYM _SOCKET_ADDRESS_LIST}
- SOCKET_ADDRESS_LIST = _SOCKET_ADDRESS_LIST;
- {$EXTERNALSYM SOCKET_ADDRESS_LIST}
- TSocketAddressList = SOCKET_ADDRESS_LIST;
- PSocketAddressList = LPSOCKET_ADDRESS_LIST;
-
-//
-// Address Family/Protocol Tuples
-//
-
- LPAFPROTOCOLS = ^AFPROTOCOLS;
- {$EXTERNALSYM LPAFPROTOCOLS}
- PAFPROTOCOLS = ^AFPROTOCOLS;
- {$EXTERNALSYM PAFPROTOCOLS}
- _AFPROTOCOLS = record
- iAddressFamily: Integer;
- iProtocol: Integer;
- end;
- {$EXTERNALSYM _AFPROTOCOLS}
- AFPROTOCOLS = _AFPROTOCOLS;
- {$EXTERNALSYM AFPROTOCOLS}
- TAfProtocols = AFPROTOCOLS;
-
-//
-// Client Query API Typedefs
-//
-
-//
-// The comparators
-//
-
- _WSAEcomparator = (COMP_EQUAL, COMP_NOTLESS);
- {$EXTERNALSYM _WSAEcomparator}
- WSAECOMPARATOR = _WSAEcomparator;
- {$EXTERNALSYM WSAECOMPARATOR}
- PWSAECOMPARATOR = ^WSAECOMPARATOR;
- {$EXTERNALSYM PWSAECOMPARATOR}
- LPWSAECOMPARATOR = ^WSAECOMPARATOR;
- {$EXTERNALSYM LPWSAECOMPARATOR}
-
- LPWSAVERSION = ^WSAVERSION;
- {$EXTERNALSYM LPWSAVersion}
- PWSAVERSION = ^WSAVERSION;
- {$EXTERNALSYM PWSAVersion}
- _WSAVersion = record
- dwVersion: DWORD;
- ecHow: WSAECOMPARATOR;
- end;
- {$EXTERNALSYM _WSAVersion}
- WSAVERSION = _WSAVersion;
- {$EXTERNALSYM WSAVERSION}
- TWsaVersion = WSAVERSION;
-
- _WSAQuerySetA = record
- dwSize: DWORD;
- lpszServiceInstanceName: LPSTR;
- lpServiceClassId: PGUID;
- lpVersion: LPWSAVERSION;
- lpszComment: LPSTR;
- dwNameSpace: DWORD;
- lpNSProviderId: PGUID;
- lpszContext: LPSTR;
- dwNumberOfProtocols: DWORD;
- lpafpProtocols: LPAFPROTOCOLS;
- lpszQueryString: LPSTR;
- dwNumberOfCsAddrs: DWORD;
- lpcsaBuffer: LPCSADDR_INFO;
- dwOutputFlags: DWORD;
- lpBlob: LPBLOB;
- end;
- {$EXTERNALSYM _WSAQuerySetA}
- WSAQUERYSETA = _WSAQuerySetA;
- {$EXTERNALSYM WSAQUERYSETA}
- PWSAQUERYSETA = ^WSAQUERYSETA;
- {$EXTERNALSYM PWSAQUERYSETA}
- LPWSAQUERYSETA = ^WSAQUERYSETA;
- {$EXTERNALSYM LPWSAQUERYSETA}
- TWsaQuerySetA = WSAQUERYSETA;
-
- _WSAQuerySetW = record
- dwSize: DWORD;
- lpszServiceInstanceName: LPWSTR;
- lpServiceClassId: PGUID;
- lpVersion: LPWSAVERSION;
- lpszComment: LPWSTR;
- dwNameSpace: DWORD;
- lpNSProviderId: PGUID;
- lpszContext: LPWSTR;
- dwNumberOfProtocols: DWORD;
- lpafpProtocols: LPAFPROTOCOLS;
- lpszQueryString: LPWSTR;
- dwNumberOfCsAddrs: DWORD;
- lpcsaBuffer: LPCSADDR_INFO;
- dwOutputFlags: DWORD;
- lpBlob: LPBLOB;
- end;
- {$EXTERNALSYM _WSAQuerySetW}
- WSAQUERYSETW = _WSAQuerySetW;
- {$EXTERNALSYM WSAQUERYSETW}
- PWSAQUERYSETW = ^WSAQUERYSETW;
- {$EXTERNALSYM PWSAQUERYSETW}
- LPWSAQUERYSETW = ^WSAQUERYSETW;
- {$EXTERNALSYM LPWSAQUERYSETW}
- TWsaQuerySetW = WSAQUERYSETW;
-
- {$IFDEF UNICODE}
- WSAQUERYSET = WSAQUERYSETW;
- {$EXTERNALSYM WSAQUERYSET}
- PWSAQUERYSET = PWSAQUERYSETW;
- {$EXTERNALSYM PWSAQUERYSET}
- LPWSAQUERYSET = LPWSAQUERYSETW;
- {$EXTERNALSYM LPWSAQUERYSET}
- TWsaQuerySet = TWsaQuerySetW;
- {$ELSE}
- WSAQUERYSET = WSAQUERYSETA;
- {$EXTERNALSYM WSAQUERYSET}
- PWSAQUERYSET = PWSAQUERYSETA;
- {$EXTERNALSYM PWSAQUERYSET}
- LPWSAQUERYSET = LPWSAQUERYSETA;
- {$EXTERNALSYM LPWSAQUERYSET}
- TWsaQuerySet = TWsaQuerySetA;
- {$ENDIF UNICODE}
-
-const
- LUP_DEEP = $0001;
- {$EXTERNALSYM LUP_DEEP}
- LUP_CONTAINERS = $0002;
- {$EXTERNALSYM LUP_CONTAINERS}
- LUP_NOCONTAINERS = $0004;
- {$EXTERNALSYM LUP_NOCONTAINERS}
- LUP_NEAREST = $0008;
- {$EXTERNALSYM LUP_NEAREST}
- LUP_RETURN_NAME = $0010;
- {$EXTERNALSYM LUP_RETURN_NAME}
- LUP_RETURN_TYPE = $0020;
- {$EXTERNALSYM LUP_RETURN_TYPE}
- LUP_RETURN_VERSION = $0040;
- {$EXTERNALSYM LUP_RETURN_VERSION}
- LUP_RETURN_COMMENT = $0080;
- {$EXTERNALSYM LUP_RETURN_COMMENT}
- LUP_RETURN_ADDR = $0100;
- {$EXTERNALSYM LUP_RETURN_ADDR}
- LUP_RETURN_BLOB = $0200;
- {$EXTERNALSYM LUP_RETURN_BLOB}
- LUP_RETURN_ALIASES = $0400;
- {$EXTERNALSYM LUP_RETURN_ALIASES}
- LUP_RETURN_QUERY_STRING = $0800;
- {$EXTERNALSYM LUP_RETURN_QUERY_STRING}
- LUP_RETURN_ALL = $0FF0;
- {$EXTERNALSYM LUP_RETURN_ALL}
- LUP_RES_SERVICE = $8000;
- {$EXTERNALSYM LUP_RES_SERVICE}
-
- LUP_FLUSHCACHE = $1000;
- {$EXTERNALSYM LUP_FLUSHCACHE}
- LUP_FLUSHPREVIOUS = $2000;
- {$EXTERNALSYM LUP_FLUSHPREVIOUS}
-
-//
-// Return flags
-//
-
- RESULT_IS_ALIAS = $0001;
- {$EXTERNALSYM RESULT_IS_ALIAS}
- RESULT_IS_ADDED = $0010;
- {$EXTERNALSYM RESULT_IS_ADDED}
- RESULT_IS_CHANGED = $0020;
- {$EXTERNALSYM RESULT_IS_CHANGED}
- RESULT_IS_DELETED = $0040;
- {$EXTERNALSYM RESULT_IS_DELETED}
-
-//
-// Service Address Registration and Deregistration Data Types.
-//
-
-type
- _WSAESETSERVICEOP = (RNRSERVICE_REGISTER, RNRSERVICE_DEREGISTER, RNRSERVICE_DELETE);
- {$EXTERNALSYM _WSAESETSERVICEOP}
- WSAESETSERVICEOP = _WSAESETSERVICEOP;
- {$EXTERNALSYM WSAESETSERVICEOP}
- PWSAESETSERVICEOP = ^WSAESETSERVICEOP;
- {$EXTERNALSYM PWSAESETSERVICEOP}
- LPWSAESETSERVICEOP = ^WSAESETSERVICEOP;
- {$EXTERNALSYM LPWSAESETSERVICEOP}
-
-//
-// Service Installation/Removal Data Types.
-//
-
- _WSANSClassInfoA = record
- lpszName: LPSTR;
- dwNameSpace: DWORD;
- dwValueType: DWORD;
- dwValueSize: DWORD;
- lpValue: LPVOID;
- end;
- {$EXTERNALSYM _WSANSClassInfoA}
- WSANSCLASSINFOA = _WSANSClassInfoA;
- {$EXTERNALSYM WSANSCLASSINFOA}
- PWSANSCLASSINFOA = ^WSANSCLASSINFOA;
- {$EXTERNALSYM PWSANSCLASSINFOA}
- LPWSANSCLASSINFOA = ^WSANSCLASSINFOA;
- {$EXTERNALSYM LPWSANSCLASSINFOA}
- TWsaNsClassInfoA = WSANSCLASSINFOA;
-
- _WSANSClassInfoW = record
- lpszName: LPWSTR;
- dwNameSpace: DWORD;
- dwValueType: DWORD;
- dwValueSize: DWORD;
- lpValue: LPVOID;
- end;
- {$EXTERNALSYM _WSANSClassInfoW}
- WSANSCLASSINFOW = _WSANSClassInfoW;
- {$EXTERNALSYM WSANSCLASSINFOW}
- PWSANSCLASSINFOW = ^WSANSCLASSINFOW;
- {$EXTERNALSYM PWSANSCLASSINFOW}
- LPWSANSCLASSINFOW = ^WSANSCLASSINFOW;
- {$EXTERNALSYM LPWSANSCLASSINFOW}
- TWsaNsClassInfoW = WSANSCLASSINFOW;
-
- {$IFDEF UNICODE}
- WSANSCLASSINFO = WSANSCLASSINFOW;
- {$EXTERNALSYM WSANSCLASSINFO}
- PWSANSCLASSINFO = PWSANSCLASSINFOW;
- {$EXTERNALSYM PWSANSCLASSINFO}
- LPWSANSCLASSINFO = LPWSANSCLASSINFOW;
- {$EXTERNALSYM LPWSANSCLASSINFO}
- TWsaNsClassInfo = TWsaNsClassInfoW;
- {$ELSE}
- WSANSCLASSINFO = WSANSCLASSINFOA;
- {$EXTERNALSYM WSANSCLASSINFO}
- PWSANSCLASSINFO = PWSANSCLASSINFOA;
- {$EXTERNALSYM PWSANSCLASSINFO}
- LPWSANSCLASSINFO = LPWSANSCLASSINFOA;
- {$EXTERNALSYM LPWSANSCLASSINFO}
- TWsaNsClassInfo = TWsaNsClassInfoA;
- {$ENDIF UNICODE}
-
- _WSAServiceClassInfoA = record
- lpServiceClassId: PGUID;
- lpszServiceClassName: LPSTR;
- dwCount: DWORD;
- lpClassInfos: LPWSANSCLASSINFOA;
- end;
- {$EXTERNALSYM _WSAServiceClassInfoA}
- WSASERVICECLASSINFOA = _WSAServiceClassInfoA;
- {$EXTERNALSYM WSASERVICECLASSINFOA}
- PWSASERVICECLASSINFOA = ^WSASERVICECLASSINFOA;
- {$EXTERNALSYM PWSASERVICECLASSINFOA}
- LPWSASERVICECLASSINFOA = ^WSASERVICECLASSINFOA;
- {$EXTERNALSYM LPWSASERVICECLASSINFOA}
- TWsaServiceClassInfoA = WSASERVICECLASSINFOA;
-
- _WSAServiceClassInfoW = record
- lpServiceClassId: PGUID;
- lpszServiceClassName: LPWSTR;
- dwCount: DWORD;
- lpClassInfos: LPWSANSCLASSINFOW;
- end;
- {$EXTERNALSYM _WSAServiceClassInfoW}
- WSASERVICECLASSINFOW = _WSAServiceClassInfoW;
- {$EXTERNALSYM WSASERVICECLASSINFOW}
- PWSASERVICECLASSINFOW = ^WSASERVICECLASSINFOW;
- {$EXTERNALSYM PWSASERVICECLASSINFOW}
- LPWSASERVICECLASSINFOW = ^WSASERVICECLASSINFOW;
- {$EXTERNALSYM LPWSASERVICECLASSINFOW}
- TWsaServiceClassInfoW = WSASERVICECLASSINFOW;
-
- {$IFDEF UNICODE}
- WSASERVICECLASSINFO = WSASERVICECLASSINFOW;
- {$EXTERNALSYM WSASERVICECLASSINFO}
- PWSASERVICECLASSINFO = PWSASERVICECLASSINFOW;
- {$EXTERNALSYM PWSASERVICECLASSINFO}
- LPWSASERVICECLASSINFO = LPWSASERVICECLASSINFOW;
- {$EXTERNALSYM LPWSASERVICECLASSINFO}
- TWsaServiceClassInfo = TWsaServiceClassInfoW;
- {$ELSE}
- WSASERVICECLASSINFO = WSASERVICECLASSINFOA;
- {$EXTERNALSYM WSASERVICECLASSINFO}
- PWSASERVICECLASSINFO = PWSASERVICECLASSINFOA;
- {$EXTERNALSYM PWSASERVICECLASSINFO}
- LPWSASERVICECLASSINFO = LPWSASERVICECLASSINFOA;
- {$EXTERNALSYM LPWSASERVICECLASSINFO}
- TWsaServiceClassInfo = TWsaServiceClassInfoA;
- {$ENDIF UNICODE}
-
- LPWSANAMESPACE_INFOA = ^WSANAMESPACE_INFOA;
- {$EXTERNALSYM LPWSANAMESPACE_INFOA}
- PWSANAMESPACE_INFOA = ^WSANAMESPACE_INFOA;
- {$EXTERNALSYM PWSANAMESPACE_INFOA}
- _WSANAMESPACE_INFOA = record
- NSProviderId: TGUID;
- dwNameSpace: DWORD;
- fActive: BOOL;
- dwVersion: DWORD;
- lpszIdentifier: LPSTR;
- end;
- {$EXTERNALSYM _WSANAMESPACE_INFOA}
- WSANAMESPACE_INFOA = _WSANAMESPACE_INFOA;
- {$EXTERNALSYM WSANAMESPACE_INFOA}
- TWsaNameSpaceInfoA = WSANAMESPACE_INFOA;
- PWsaNameSpaceInfoA = LPWSANAMESPACE_INFOA;
-
- LPWSANAMESPACE_INFOW = ^WSANAMESPACE_INFOW;
- {$EXTERNALSYM LPWSANAMESPACE_INFOW}
- PWSANAMESPACE_INFOW = ^WSANAMESPACE_INFOW;
- {$EXTERNALSYM PWSANAMESPACE_INFOW}
- _WSANAMESPACE_INFOW = record
- NSProviderId: TGUID;
- dwNameSpace: DWORD;
- fActive: BOOL;
- dwVersion: DWORD;
- lpszIdentifier: LPWSTR;
- end;
- {$EXTERNALSYM _WSANAMESPACE_INFOW}
- WSANAMESPACE_INFOW = _WSANAMESPACE_INFOW;
- {$EXTERNALSYM WSANAMESPACE_INFOW}
- TWsaNameSpaceInfoW = WSANAMESPACE_INFOW;
- PWsaNameSpaceInfoW = PWSANAMESPACE_INFOW;
-
- {$IFDEF UNICODE}
- WSANAMESPACE_INFO = WSANAMESPACE_INFOW;
- {$EXTERNALSYM WSANAMESPACE_INFO}
- PWSANAMESPACE_INFO = PWSANAMESPACE_INFOW;
- {$EXTERNALSYM PWSANAMESPACE_INFO}
- LPWSANAMESPACE_INFO = LPWSANAMESPACE_INFOW;
- {$EXTERNALSYM LPWSANAMESPACE_INFO}
- TWsaNameSpaceInfo = TWsaNameSpaceInfoW;
- PWsaNameSpaceInfo = PWsaNameSpaceInfoW;
- {$ELSE}
- WSANAMESPACE_INFO = WSANAMESPACE_INFOA;
- {$EXTERNALSYM WSANAMESPACE_INFO}
- PWSANAMESPACE_INFO = PWSANAMESPACE_INFOA;
- {$EXTERNALSYM PWSANAMESPACE_INFO}
- LPWSANAMESPACE_INFO = LPWSANAMESPACE_INFOA;
- {$EXTERNALSYM LPWSANAMESPACE_INFO}
- TWsaNameSpaceInfo = TWsaNameSpaceInfoA;
- PWsaNameSpaceInfo = PWsaNameSpaceInfoA;
- {$ENDIF UNICODE}
-
-// Socket function prototypes
-
-function accept(s: TSocket; addr: PSockAddr; addrlen: PINT): TSocket; stdcall;
-{$EXTERNALSYM accept}
-function bind(s: TSocket; name: PSockAddr; namelen: Integer): Integer; stdcall;
-{$EXTERNALSYM bind}
-function closesocket(s: TSocket): Integer; stdcall;
-{$EXTERNALSYM closesocket}
-function connect(s: TSocket; name: PSockAddr; namelen: Integer): Integer; stdcall;
-{$EXTERNALSYM connect}
-function ioctlsocket(s: TSocket; cmd: Longint; var argp: u_long): Integer; stdcall;
-{$EXTERNALSYM ioctlsocket}
-function getpeername(s: TSocket; name: PSockAddr; var namelen: Integer): Integer; stdcall;
-{$EXTERNALSYM getpeername}
-function getsockname(s: TSocket; name: PSockAddr; var namelen: Integer): Integer; stdcall;
-{$EXTERNALSYM getsockname}
-function getsockopt(s: TSocket; level, optname: Integer; optval: PChar; var optlen: Integer): Integer; stdcall;
-{$EXTERNALSYM getsockopt}
-function htonl(hostlong: u_long): u_long; stdcall;
-{$EXTERNALSYM htonl}
-function htons(hostshort: u_short): u_short; stdcall;
-{$EXTERNALSYM htons}
-function inet_addr(cp: PChar): u_long; stdcall;
-{$EXTERNALSYM inet_addr}
-function inet_ntoa(inaddr: in_addr): PChar; stdcall;
-{$EXTERNALSYM inet_ntoa}
-function listen(s: TSocket; backlog: Integer): Integer; stdcall;
-{$EXTERNALSYM listen}
-function ntohl(netlong: u_long): u_long; stdcall;
-{$EXTERNALSYM ntohl}
-function ntohs(netshort: u_short): u_short; stdcall;
-{$EXTERNALSYM ntohs}
-function recv(s: TSocket; var buf; len, flags: Integer): Integer; stdcall;
-{$EXTERNALSYM recv}
-function recvfrom(s: TSocket; var buf; len, flags: Integer; from: PSockAddr; var fromlen: Integer): Integer; stdcall;
-{$EXTERNALSYM recvfrom}
-function select(nfds: Integer; readfds, writefds, exceptfds: PFdSet; timeout: PTimeVal): Integer; stdcall;
-{$EXTERNALSYM select}
-function send(s: TSocket; var buf; len, flags: Integer): Integer; stdcall;
-{$EXTERNALSYM send}
-function sendto(s: TSocket; var buf; len, flags: Integer; toaddr: PSockAddr; tolen: Integer): Integer; stdcall;
-{$EXTERNALSYM sendto}
-function setsockopt(s: TSocket; level, optname: Integer; optval: PChar; optlen: Integer): Integer; stdcall;
-{$EXTERNALSYM setsockopt}
-function shutdown(s: TSocket; how: Integer): Integer; stdcall;
-{$EXTERNALSYM shutdown}
-function socket(af, type_, protocol: Integer): TSocket; stdcall;
-{$EXTERNALSYM socket}
-
-// Database function prototypes
-
-function gethostbyaddr(addr: PChar; len, type_: Integer): PHostEnt; stdcall;
-{$EXTERNALSYM gethostbyaddr}
-function gethostbyname(name: PChar): PHostEnt; stdcall;
-{$EXTERNALSYM gethostbyname}
-function gethostname(name: PChar; namelen: Integer): Integer; stdcall;
-{$EXTERNALSYM gethostname}
-function getservbyport(port: Integer; proto: PChar): PServEnt; stdcall;
-{$EXTERNALSYM getservbyport}
-function getservbyname(name, proto: PChar): PServEnt; stdcall;
-{$EXTERNALSYM getservbyname}
-function getprotobynumber(number: Integer): PProtoEnt; stdcall;
-{$EXTERNALSYM getprotobynumber}
-function getprotobyname(name: PChar): PProtoEnt; stdcall;
-{$EXTERNALSYM getprotobyname}
-
-// Microsoft Windows Extension function prototypes
-
-function WSAStartup(wVersionRequired: WORD; var lpWSAData: TWSAData): Integer; stdcall;
-{$EXTERNALSYM WSAStartup}
-function WSACleanup: Integer; stdcall;
-{$EXTERNALSYM WSACleanup}
-procedure WSASetLastError(iError: Integer); stdcall;
-{$EXTERNALSYM WSASetLastError}
-function WSAGetLastError: Integer; stdcall;
-{$EXTERNALSYM WSAGetLastError}
-function WSAIsBlocking: BOOL; stdcall;
-{$EXTERNALSYM WSAIsBlocking}
-function WSAUnhookBlockingHook: Integer; stdcall;
-{$EXTERNALSYM WSAUnhookBlockingHook}
-function WSASetBlockingHook(lpBlockFunc: FARPROC): FARPROC; stdcall;
-{$EXTERNALSYM WSASetBlockingHook}
-function WSACancelBlockingCall: Integer; stdcall;
-{$EXTERNALSYM WSACancelBlockingCall}
-function WSAAsyncGetServByName(hWnd: HWND; wMsg: u_int; name, proto, buf: PChar;
- buflen: Integer): HANDLE; stdcall;
-{$EXTERNALSYM WSAAsyncGetServByName}
-function WSAAsyncGetServByPort(hWnd: HWND; wMsg: u_int; port: Integer;
- proto, buf: PChar; buflen: Integer): HANDLE; stdcall;
-{$EXTERNALSYM WSAAsyncGetServByPort}
-function WSAAsyncGetProtoByName(hWnd: HWND; wMsg: u_int; name, buf: PChar;
- buflen: Integer): HANDLE; stdcall;
-{$EXTERNALSYM WSAAsyncGetProtoByName}
-function WSAAsyncGetProtoByNumber(hWnd: HWND; wMsg: u_int; number: Integer;
- buf: PChar; buflen: Integer): HANDLE; stdcall;
-{$EXTERNALSYM WSAAsyncGetProtoByNumber}
-function WSAAsyncGetHostByName(hWnd: HWND; wMsg: u_int; name, buf: PChar;
- buflen: Integer): HANDLE; stdcall;
-{$EXTERNALSYM WSAAsyncGetHostByName}
-function WSAAsyncGetHostByAddr(hWnd: HWND; wMsg: u_int; addr: PChar;
- len, type_: Integer; buf: PChar; buflen: Integer): HANDLE; stdcall;
-{$EXTERNALSYM WSAAsyncGetHostByAddr}
-function WSACancelAsyncRequest(hAsyncTaskHandle: HANDLE): Integer; stdcall;
-{$EXTERNALSYM WSACancelAsyncRequest}
-function WSAAsyncSelect(s: TSocket; hWnd: HWND; wMsg: u_int; lEvent: Longint): Integer; stdcall;
-{$EXTERNALSYM WSAAsyncSelect}
-
-// WinSock 2 API new function prototypes
-
-function WSAAccept(s: TSocket; addr: PSockAddr; addrlen: PINT;
- lpfnCondition: LPCONDITIONPROC; dwCallbackData: DWORD): TSocket; stdcall;
-{$EXTERNALSYM WSAAccept}
-function WSACloseEvent(hEvent: WSAEVENT): BOOL; stdcall;
-{$EXTERNALSYM WSACloseEvent}
-function WSAConnect(s: TSocket; name: PSockAddr; namelen: Integer; lpCallerData: LPWSABUF;
- lpCalleeData: LPWSABUF; lpSQOS: LPQOS; lpGQOS: LPQOS): Integer; stdcall;
-{$EXTERNALSYM WSAConnect}
-function WSACreateEvent: WSAEVENT; stdcall;
-{$EXTERNALSYM WSACreateEvent}
-function WSADuplicateSocketA(s: TSocket; dwProcessId: DWORD; lpProtocolInfo: LPWSAPROTOCOL_INFOA): Integer; stdcall;
-{$EXTERNALSYM WSADuplicateSocketA}
-function WSADuplicateSocketW(s: TSocket; dwProcessId: DWORD; lpProtocolInfo: LPWSAPROTOCOL_INFOW): Integer; stdcall;
-{$EXTERNALSYM WSADuplicateSocketW}
-function WSADuplicateSocket(s: TSocket; dwProcessId: DWORD; lpProtocolInfo: LPWSAPROTOCOL_INFO): Integer; stdcall;
-{$EXTERNALSYM WSADuplicateSocket}
-function WSAEnumNetworkEvents(s: TSocket; hEventObject: WSAEVENT; lpNetworkEvents: LPWSANETWORKEVENTS): Integer; stdcall;
-{$EXTERNALSYM WSAEnumNetworkEvents}
-function WSAEnumProtocolsA(lpiProtocols: PINT; lpProtocolBuffer: LPWSAPROTOCOL_INFOA;
- var lpdwBufferLength: DWORD): Integer; stdcall;
-{$EXTERNALSYM WSAEnumProtocolsA}
-function WSAEnumProtocolsW(lpiProtocols: PINT; lpProtocolBuffer: LPWSAPROTOCOL_INFOW;
- var lpdwBufferLength: DWORD): Integer; stdcall;
-{$EXTERNALSYM WSAEnumProtocolsW}
-function WSAEnumProtocols(lpiProtocols: PINT; lpProtocolBuffer: LPWSAPROTOCOL_INFO;
- var lpdwBufferLength: DWORD): Integer; stdcall;
-{$EXTERNALSYM WSAEnumProtocols}
-function WSAEventSelect(s: TSocket; hEventObject: WSAEVENT; lNetworkEvents: Longint): Integer; stdcall;
-{$EXTERNALSYM WSAEventSelect}
-function WSAGetOverlappedResult(s: TSocket; lpOverlapped: LPWSAOVERLAPPED;
- var lpcbTransfer: DWORD; fWait: BOOL; var lpdwFlags: DWORD): BOOL; stdcall; // Thanks Kai Henningsen for var on lpdwFlags
-{$EXTERNALSYM WSAGetOverlappedResult}
-function WSAGetQOSByName(s: TSocket; var lpQOSName: WSABUF; lpQOS: LPQOS): BOOL; stdcall;
-{$EXTERNALSYM WSAGetQOSByName}
-function WSAHtonl(s: TSocket; hostlong: u_long; var lpnetlong: u_long): Integer; stdcall;
-{$EXTERNALSYM WSAHtonl}
-function WSAHtons(s: TSocket; hostshort: u_short; var lpnetshort: u_short): Integer; stdcall;
-{$EXTERNALSYM WSAHtons}
-function WSAIoctl(s: TSocket; dwIoControlCode: DWORD; lpvInBuffer: LPVOID; cbInBuffer: DWORD;
- lpvOutBuffer: LPVOID; cbOutBuffer: DWORD; var lpcbBytesReturned: DWORD;
- lpOverlapped: LPWSAOVERLAPPED; lpCompletionRoutine: LPWSAOVERLAPPED_COMPLETION_ROUTINE): Integer; stdcall;
-{$EXTERNALSYM WSAIoctl}
-function WSAJoinLeaf(s: TSocket; name: PSockAddr; namelen: Integer; lpCallerData: LPWSABUF;
- lpCalleeData: LPWSABUF; lpSQOS, lpGQOS: LPQOS; dwFlags: DWORD): TSocket; stdcall;
-{$EXTERNALSYM WSAJoinLeaf}
-function WSANtohl(s: TSocket; netlong: u_long; var lphostlong: u_long): Integer; stdcall;
-{$EXTERNALSYM WSANtohl}
-function WSANtohs(s: TSocket; netshort: u_short; var lphostshort: u_short): Integer; stdcall;
-{$EXTERNALSYM WSANtohs}
-function WSARecv(s: TSocket; lpBuffers: LPWSABUF; dwBufferCount: DWORD;
- var lpNumberOfBytesRecvd, lpFlags: DWORD; lpOverlapped: LPWSAOVERLAPPED;
- lpCompletionRoutine: LPWSAOVERLAPPED_COMPLETION_ROUTINE): Integer; stdcall;
-{$EXTERNALSYM WSARecv}
-function WSARecvDisconnect(s: TSocket; lpInboundDisconnectData: LPWSABUF): Integer; stdcall;
-{$EXTERNALSYM WSARecvDisconnect}
-function WSARecvFrom(s: TSocket; lpBuffers: LPWSABUF; dwBufferCount: DWORD;
- var lpNumberOfBytesRecvd, lpFlags: DWORD; lpFrom: PSockAddr; lpFromlen: PINT;
- lpOverlapped: LPWSAOVERLAPPED; lpCompletionRoutine: LPWSAOVERLAPPED_COMPLETION_ROUTINE): Integer; stdcall;
-{$EXTERNALSYM WSARecvFrom}
-function WSAResetEvent(hEvent: WSAEVENT): BOOL; stdcall;
-{$EXTERNALSYM WSAResetEvent}
-function WSASend(s: TSocket; lpBuffers: LPWSABUF; dwBufferCount: DWORD;
- var lpNumberOfBytesSent: DWORD; dwFlags: DWORD; lpOverlapped: LPWSAOVERLAPPED;
- lpCompletionRoutine: LPWSAOVERLAPPED_COMPLETION_ROUTINE): Integer; stdcall;
-{$EXTERNALSYM WSASend}
-function WSASendDisconnect(s: TSocket; lpOutboundDisconnectData: LPWSABUF): Integer; stdcall;
-{$EXTERNALSYM WSASendDisconnect}
-function WSASendTo(s: TSocket; lpBuffers: LPWSABUF; dwBufferCount: DWORD;
- var lpNumberOfBytesSent: DWORD; dwFlags: DWORD; lpTo: PSockAddr; iTolen: Integer;
- lpOverlapped: LPWSAOVERLAPPED; lpCompletionRoutine: LPWSAOVERLAPPED_COMPLETION_ROUTINE): Integer; stdcall;
-{$EXTERNALSYM WSASendTo}
-function WSASetEvent(hEvent: WSAEVENT): BOOL; stdcall;
-{$EXTERNALSYM WSASetEvent}
-function WSASocketA(af, type_, protocol: Integer; lpProtocolInfo: LPWSAPROTOCOL_INFOA;
- g: GROUP; dwFlags: DWORD): TSocket; stdcall;
-{$EXTERNALSYM WSASocketA}
-function WSASocketW(af, type_, protocol: Integer; lpProtocolInfo: LPWSAPROTOCOL_INFOW;
- g: GROUP; dwFlags: DWORD): TSocket; stdcall;
-{$EXTERNALSYM WSASocketW}
-function WSASocket(af, type_, protocol: Integer; lpProtocolInfo: LPWSAPROTOCOL_INFO;
- g: GROUP; dwFlags: DWORD): TSocket; stdcall;
-{$EXTERNALSYM WSASocket}
-function WSAWaitForMultipleEvents(cEvents: DWORD; lphEvents: PWSAEVENT;
- fWaitAll: BOOL; dwTimeout: DWORD; fAlertable: BOOL): DWORD; stdcall;
-{$EXTERNALSYM WSAWaitForMultipleEvents}
-function WSAAddressToStringA(lpsaAddress: LPSOCKADDR; dwAddressLength: DWORD;
- lpProtocolInfo: LPWSAPROTOCOL_INFOA; lpszAddressString: LPSTR;
- var lpdwAddressStringLength: DWORD): Integer; stdcall;
-{$EXTERNALSYM WSAAddressToStringA}
-function WSAAddressToStringW(lpsaAddress: LPSOCKADDR; dwAddressLength: DWORD;
- lpProtocolInfo: LPWSAPROTOCOL_INFOW; lpszAddressString: LPWSTR;
- var lpdwAddressStringLength: DWORD): Integer; stdcall;
-{$EXTERNALSYM WSAAddressToStringW}
-function WSAAddressToString(lpsaAddress: LPSOCKADDR; dwAddressLength: DWORD;
- lpProtocolInfo: LPWSAPROTOCOL_INFO; lpszAddressString: LPTSTR;
- var lpdwAddressStringLength: DWORD): Integer; stdcall;
-{$EXTERNALSYM WSAAddressToString}
-function WSAStringToAddressA(AddressString: LPSTR; AddressFamily: Integer;
- lpProtocolInfo: LPWSAPROTOCOL_INFOA; lpAddress: LPSOCKADDR;
- var lpAddressLength: Integer): Integer; stdcall;
-{$EXTERNALSYM WSAStringToAddressA}
-function WSAStringToAddressW(AddressString: LPWSTR; AddressFamily: Integer;
- lpProtocolInfo: LPWSAPROTOCOL_INFOW; lpAddress: LPSOCKADDR;
- var lpAddressLength: Integer): Integer; stdcall;
-{$EXTERNALSYM WSAStringToAddressW}
-function WSAStringToAddress(AddressString: LPTSTR; AddressFamily: Integer;
- lpProtocolInfo: LPWSAPROTOCOL_INFO; lpAddress: LPSOCKADDR;
- var lpAddressLength: Integer): Integer; stdcall;
-{$EXTERNALSYM WSAStringToAddress}
-
-// Registration and Name Resolution API functions
-
-function WSALookupServiceBeginA(lpqsRestrictions: LPWSAQUERYSETA;
- dwControlFlags: DWORD; var lphLookup: HANDLE): Integer; stdcall;
-{$EXTERNALSYM WSALookupServiceBeginA}
-function WSALookupServiceBeginW(lpqsRestrictions: LPWSAQUERYSETW;
- dwControlFlags: DWORD; var lphLookup: HANDLE): Integer; stdcall;
-{$EXTERNALSYM WSALookupServiceBeginW}
-function WSALookupServiceBegin(lpqsRestrictions: LPWSAQUERYSET;
- dwControlFlags: DWORD; var lphLookup: HANDLE): Integer; stdcall;
-{$EXTERNALSYM WSALookupServiceBegin}
-function WSALookupServiceNextA(hLookup: HANDLE; dwControlFlags: DWORD;
- var lpdwBufferLength: DWORD; lpqsResults: LPWSAQUERYSETA): Integer; stdcall;
-{$EXTERNALSYM WSALookupServiceNextA}
-function WSALookupServiceNextW(hLookup: HANDLE; dwControlFlags: DWORD;
- var lpdwBufferLength: DWORD; lpqsResults: LPWSAQUERYSETW): Integer; stdcall;
-{$EXTERNALSYM WSALookupServiceNextW}
-function WSALookupServiceNext(hLookup: HANDLE; dwControlFlags: DWORD;
- var lpdwBufferLength: DWORD; lpqsResults: LPWSAQUERYSET): Integer; stdcall;
-{$EXTERNALSYM WSALookupServiceNext}
-function WSANSPIoctl(hLookup: HANDLE; dwControlCode: DWORD; lpvInBuffer: LPVOID; cbInBuffer: DWORD;
- lpvOutBuffer: LPVOID; cbOutBuffer: DWORD; lpcbBytesReturned: LPDWORD; lpCompletion: LPWSACOMPLETION): Integer; stdcall;
-{$EXTERNALSYM WSANSPIoctl}
-function WSALookupServiceEnd(hLookup: HANDLE): Integer; stdcall;
-{$EXTERNALSYM WSALookupServiceEnd}
-function WSAInstallServiceClassA(lpServiceClassInfo: LPWSASERVICECLASSINFOA): Integer; stdcall;
-{$EXTERNALSYM WSAInstallServiceClassA}
-function WSAInstallServiceClassW(lpServiceClassInfo: LPWSASERVICECLASSINFOW): Integer; stdcall;
-{$EXTERNALSYM WSAInstallServiceClassW}
-function WSAInstallServiceClass(lpServiceClassInfo: LPWSASERVICECLASSINFO): Integer; stdcall;
-{$EXTERNALSYM WSAInstallServiceClass}
-function WSARemoveServiceClass(const lpServiceClassId: TGUID): Integer; stdcall;
-{$EXTERNALSYM WSARemoveServiceClass}
-function WSAGetServiceClassInfoA(const lpProviderId, lpServiceClassId: TGUID;
- var lpdwBufSize: DWORD; lpServiceClassInfo: LPWSASERVICECLASSINFOA): Integer; stdcall;
-{$EXTERNALSYM WSAGetServiceClassInfoA}
-function WSAGetServiceClassInfoW(const lpProviderId, lpServiceClassId: TGUID;
- var lpdwBufSize: DWORD; lpServiceClassInfo: LPWSASERVICECLASSINFOW): Integer; stdcall;
-{$EXTERNALSYM WSAGetServiceClassInfoW}
-function WSAGetServiceClassInfo(const lpProviderId, lpServiceClassId: TGUID;
- var lpdwBufSize: DWORD; lpServiceClassInfo: LPWSASERVICECLASSINFO): Integer; stdcall;
-{$EXTERNALSYM WSAGetServiceClassInfo}
-function WSAEnumNameSpaceProvidersA(var lpdwBufferLength: DWORD; lpnspBuffer: LPWSANAMESPACE_INFOA): Integer; stdcall;
-{$EXTERNALSYM WSAEnumNameSpaceProvidersA}
-function WSAEnumNameSpaceProvidersW(var lpdwBufferLength: DWORD; lpnspBuffer: LPWSANAMESPACE_INFOW): Integer; stdcall;
-{$EXTERNALSYM WSAEnumNameSpaceProvidersW}
-function WSAEnumNameSpaceProviders(var lpdwBufferLength: DWORD; lpnspBuffer: LPWSANAMESPACE_INFO): Integer; stdcall;
-{$EXTERNALSYM WSAEnumNameSpaceProviders}
-function WSAGetServiceClassNameByClassIdA(const lpServiceClassId: TGUID;
- lpszServiceClassName: LPSTR; var lpdwBufferLength: DWORD): Integer; stdcall;
-{$EXTERNALSYM WSAGetServiceClassNameByClassIdA}
-function WSAGetServiceClassNameByClassIdW(const lpServiceClassId: TGUID;
- lpszServiceClassName: LPWSTR; var lpdwBufferLength: DWORD): Integer; stdcall;
-{$EXTERNALSYM WSAGetServiceClassNameByClassIdW}
-function WSAGetServiceClassNameByClassId(const lpServiceClassId: TGUID;
- lpszServiceClassName: LPTSTR; var lpdwBufferLength: DWORD): Integer; stdcall;
-{$EXTERNALSYM WSAGetServiceClassNameByClassId}
-function WSASetServiceA(lpqsRegInfo: LPWSAQUERYSETA; essoperation: WSAESETSERVICEOP;
- dwControlFlags: DWORD): Integer; stdcall;
-{$EXTERNALSYM WSASetServiceA}
-function WSASetServiceW(lpqsRegInfo: LPWSAQUERYSETW; essoperation: WSAESETSERVICEOP;
- dwControlFlags: DWORD): Integer; stdcall;
-{$EXTERNALSYM WSASetServiceW}
-function WSASetService(lpqsRegInfo: LPWSAQUERYSET; essoperation: WSAESETSERVICEOP;
- dwControlFlags: DWORD): Integer; stdcall;
-{$EXTERNALSYM WSASetService}
-function WSAProviderConfigChange(var lpNotificationHandle: HANDLE;
- lpOverlapped: LPWSAOVERLAPPED; lpCompletionRoutine: LPWSAOVERLAPPED_COMPLETION_ROUTINE): Integer; stdcall;
-{$EXTERNALSYM WSAProviderConfigChange}
-
-// Microsoft Windows Extended data types
-
-type
- PSOCKADDR_IN = ^sockaddr_in;
- {$EXTERNALSYM PSOCKADDR_IN}
- LPSOCKADDR_IN = ^sockaddr_in;
- {$EXTERNALSYM LPSOCKADDR_IN}
- LPLINGER = PLINGER;
- {$EXTERNALSYM LPLINGER}
- PIN_ADDR = ^in_addr;
- {$EXTERNALSYM PIN_ADDR}
- LPIN_ADDR = ^in_addr;
- {$EXTERNALSYM LPIN_ADDR}
- PFD_SET = ^fd_set;
- {$EXTERNALSYM PFD_SET}
- LPFD_SET = ^fd_set;
- {$EXTERNALSYM LPFD_SET}
- LPHOSTENT = PHOSTENT;
- {$EXTERNALSYM LPHOSTENT}
- LPSERVENT = PSERVENT;
- {$EXTERNALSYM LPSERVENT}
- LPPROTOENT = PPROTOENT;
- {$EXTERNALSYM LPPROTOENT}
- LPTIMEVAL = PTIMEVAL;
- {$EXTERNALSYM LPTIMEVAL}
-
-//
-// Windows message parameter composition and decomposition
-// macros.
-//
-// WSAMAKEASYNCREPLY is intended for use by the Windows Sockets implementation
-// when constructing the response to a WSAAsyncGetXByY() routine.
-//
-
-function WSAMAKEASYNCREPLY(buflen, error: WORD): DWORD;
-{$EXTERNALSYM WSAMAKEASYNCREPLY}
-
-//
-// WSAMAKESELECTREPLY is intended for use by the Windows Sockets implementation
-// when constructing the response to WSAAsyncSelect().
-//
-
-function WSAMAKESELECTREPLY(event, error: WORD): DWORD;
-{$EXTERNALSYM WSAMAKESELECTREPLY}
-
-//
-// WSAGETASYNCBUFLEN is intended for use by the Windows Sockets application
-// to extract the buffer length from the lParam in the response
-// to a WSAAsyncGetXByY().
-//
-
-function WSAGETASYNCBUFLEN(lParam: DWORD): WORD;
-{$EXTERNALSYM WSAGETASYNCBUFLEN}
-
-//
-// WSAGETASYNCERROR is intended for use by the Windows Sockets application
-// to extract the error code from the lParam in the response
-// to a WSAGetXByY().
-//
-
-function WSAGETASYNCERROR(lParam: DWORD): WORD;
-{$EXTERNALSYM WSAGETASYNCERROR}
-
-//
-// WSAGETSELECTEVENT is intended for use by the Windows Sockets application
-// to extract the event code from the lParam in the response
-// to a WSAAsyncSelect().
-//
-
-function WSAGETSELECTEVENT(lParam: DWORD): WORD;
-{$EXTERNALSYM WSAGETSELECTEVENT}
-
-//
-// WSAGETSELECTERROR is intended for use by the Windows Sockets application
-// to extract the error code from the lParam in the response
-// to a WSAAsyncSelect().
-//
-
-function WSAGETSELECTERROR(lParam: DWORD): WORD;
-{$EXTERNALSYM WSAGETSELECTERROR}
-
-implementation
-
-const
- ws2_32 = 'ws2_32.dll';
- {$IFDEF UNICODE}
- AWSuffix = 'W';
- {$ELSE}
- AWSuffix = 'A';
- {$ENDIF UNICODE}
-
-procedure FD_CLR(fd: TSocket; var fdset: TFdSet);
-var
- I: Cardinal;
-begin
- I := 0;
- while I < fdset.fd_count do
- begin
- if fdset.fd_array[I] = fd then
- begin
- while I < fdset.fd_count - 1 do
- begin
- fdset.fd_array[I] := fdset.fd_array[I + 1];
- Inc(I);
- end;
- fdset.fd_count := fdset.fd_count - 1;
- Break;
- end;
- Inc(I);
- end;
-end;
-
-procedure _FD_SET(fd: TSocket; var fdset: TFDSet);
-var
- I: Cardinal;
-begin
- I := 0;
- while I < fdset.fd_count do
- begin
- if fdset.fd_array[I] = fd then
- Break;
- Inc(I);
- end;
- if I = fdset.fd_count then
- begin
- if fdset.fd_count < FD_SETSIZE then
- begin
- fdset.fd_array[I] := fd;
- fdset.fd_count := fdset.fd_count + 1;
- end;
- end;
-end;
-
-procedure FD_ZERO(var fdset: TFdSet);
-begin
- fdset.fd_count := 0;
-end;
-
-function FD_ISSET(fd: TSocket; var fdset: TFdSet): Boolean;
-begin
- Result := __WSAFDIsSet(fd, fdset) <> 0;
-end;
-
-function timerisset(const tvp: TTimeVal): Boolean;
-begin
- Result := (tvp.tv_sec <> 0) or (tvp.tv_usec <> 0);
-end;
-
-procedure timerclear(var tvp: TTimeVal);
-begin
- tvp.tv_sec := 0;
- tvp.tv_usec := 0;
-end;
-
-function _IO(x, y: DWORD): DWORD;
-begin
- Result := IOC_VOID or (x shl 8) or y;
-end;
-
-function _IOR(x, y, t: DWORD): DWORD;
-begin
- Result := IOC_OUT or ((T and IOCPARM_MASK) shl 16) or (x shl 8) or y;
-end;
-
-function _IOW(x, y, t: DWORD): DWORD;
-begin
- Result := DWORD(IOC_IN or ((T and IOCPARM_MASK) shl 16) or (x shl 8) or y);
-end;
-
-function IN_CLASSA(i: DWORD): Boolean;
-begin
- Result := i and DWORD($80000000) = 0;
-end;
-
-function IN_CLASSB(i: DWORD): Boolean;
-begin
- Result := i and DWORD($C0000000) = DWORD($80000000);
-end;
-
-function IN_CLASSC(i: DWORD): Boolean;
-begin
- Result := (i and DWORD($e0000000)) = DWORD($C0000000);
-end;
-
-function IN_CLASSD(i: DWORD): Boolean;
-begin
- Result := (i and DWORD($f0000000)) = DWORD($e0000000);
-end;
-
-function IN_MULTICAST(i: DWORD): Boolean;
-begin
- Result := IN_CLASSD(i);
-end;
-
-function h_errno: Integer;
-begin
- Result := WSAGetLastError;
-end;
-
-function _WSAIO(x, y: DWORD): DWORD;
-begin
- Result := IOC_VOID or x or y;
-end;
-
-function _WSAIOR(x, y: DWORD): DWORD;
-begin
- Result := IOC_OUT or x or y;
-end;
-
-function _WSAIOW(x, y: DWORD): DWORD;
-begin
- Result := IOC_IN or x or y;
-end;
-
-function _WSAIORW(x, y: DWORD): DWORD;
-begin
- Result := IOC_INOUT or x or y;
-end;
-
-function WSAMAKEASYNCREPLY(buflen, error: WORD): DWORD;
-begin
- Result := MAKELONG(buflen, error);
-end;
-
-function WSAMAKESELECTREPLY(event, error: WORD): DWORD;
-begin
- Result := MAKELONG(event, error);
-end;
-
-function WSAGETASYNCBUFLEN(lParam: DWORD): WORD;
-begin
- Result := LOWORD(lParam);
-end;
-
-function WSAGETASYNCERROR(lParam: DWORD): WORD;
-begin
- Result := HIWORD(lParam);
-end;
-
-function WSAGETSELECTEVENT(lParam: DWORD): WORD;
-begin
- Result := LOWORD(lParam);
-end;
-
-function WSAGETSELECTERROR(lParam: DWORD): WORD;
-begin
- Result := HIWORD(lParam);
-end;
-
-{$IFDEF DYNAMIC_LINK}
-
-var
- ___WSAFDIsSet: Pointer;
-
-function __WSAFDIsSet;
-begin
- GetProcedureAddress(___WSAFDIsSet, ws2_32, '__WSAFDIsSet');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [___WSAFDIsSet]
- end;
-end;
-
-var
- _accept: Pointer;
-
-function accept;
-begin
- GetProcedureAddress(_accept, ws2_32, 'accept');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_accept]
- end;
-end;
-
-var
- _bind: Pointer;
-
-function bind;
-begin
- GetProcedureAddress(_bind, ws2_32, 'bind');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_bind]
- end;
-end;
-
-var
- _closesocket: Pointer;
-
-function closesocket;
-begin
- GetProcedureAddress(_closesocket, ws2_32, 'closesocket');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_closesocket]
- end;
-end;
-
-var
- _connect: Pointer;
-
-function connect;
-begin
- GetProcedureAddress(_connect, ws2_32, 'connect');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_connect]
- end;
-end;
-
-var
- _ioctlsocket: Pointer;
-
-function ioctlsocket;
-begin
- GetProcedureAddress(_ioctlsocket, ws2_32, 'ioctlsocket');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ioctlsocket]
- end;
-end;
-
-var
- _getpeername: Pointer;
-
-function getpeername;
-begin
- GetProcedureAddress(_getpeername, ws2_32, 'getpeername');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_getpeername]
- end;
-end;
-
-var
- _getsockname: Pointer;
-
-function getsockname;
-begin
- GetProcedureAddress(_getsockname, ws2_32, 'getsockname');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_getsockname]
- end;
-end;
-
-var
- _getsockopt: Pointer;
-
-function getsockopt;
-begin
- GetProcedureAddress(_getsockopt, ws2_32, 'getsockopt');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_getsockopt]
- end;
-end;
-
-var
- _htonl: Pointer;
-
-function htonl;
-begin
- GetProcedureAddress(_htonl, ws2_32, 'htonl');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_htonl]
- end;
-end;
-
-var
- _htons: Pointer;
-
-function htons;
-begin
- GetProcedureAddress(_htons, ws2_32, 'htons');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_htons]
- end;
-end;
-
-var
- _inet_addr: Pointer;
-
-function inet_addr;
-begin
- GetProcedureAddress(_inet_addr, ws2_32, 'inet_addr');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_inet_addr]
- end;
-end;
-
-var
- _inet_ntoa: Pointer;
-
-function inet_ntoa;
-begin
- GetProcedureAddress(_inet_ntoa, ws2_32, 'inet_ntoa');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_inet_ntoa]
- end;
-end;
-
-var
- _listen: Pointer;
-
-function listen;
-begin
- GetProcedureAddress(_listen, ws2_32, 'listen');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_listen]
- end;
-end;
-
-var
- _ntohl: Pointer;
-
-function ntohl;
-begin
- GetProcedureAddress(_ntohl, ws2_32, 'ntohl');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ntohl]
- end;
-end;
-
-var
- _ntohs: Pointer;
-
-function ntohs;
-begin
- GetProcedureAddress(_ntohs, ws2_32, 'ntohs');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ntohs]
- end;
-end;
-
-var
- _recv: Pointer;
-
-function recv;
-begin
- GetProcedureAddress(_recv, ws2_32, 'recv');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_recv]
- end;
-end;
-
-var
- _recvfrom: Pointer;
-
-function recvfrom;
-begin
- GetProcedureAddress(_recvfrom, ws2_32, 'recvfrom');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_recvfrom]
- end;
-end;
-
-var
- _select: Pointer;
-
-function select;
-begin
- GetProcedureAddress(_select, ws2_32, 'select');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_select]
- end;
-end;
-
-var
- _send: Pointer;
-
-function send;
-begin
- GetProcedureAddress(_send, ws2_32, 'send');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_send]
- end;
-end;
-
-var
- _sendto: Pointer;
-
-function sendto;
-begin
- GetProcedureAddress(_sendto, ws2_32, 'sendto');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_sendto]
- end;
-end;
-
-var
- _setsockopt: Pointer;
-
-function setsockopt;
-begin
- GetProcedureAddress(_setsockopt, ws2_32, 'setsockopt');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_setsockopt]
- end;
-end;
-
-var
- _shutdown: Pointer;
-
-function shutdown;
-begin
- GetProcedureAddress(_shutdown, ws2_32, 'shutdown');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_shutdown]
- end;
-end;
-
-var
- _socket: Pointer;
-
-function socket;
-begin
- GetProcedureAddress(_socket, ws2_32, 'socket');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_socket]
- end;
-end;
-
-var
- _gethostbyaddr: Pointer;
-
-function gethostbyaddr;
-begin
- GetProcedureAddress(_gethostbyaddr, ws2_32, 'gethostbyaddr');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_gethostbyaddr]
- end;
-end;
-
-var
- _gethostbyname: Pointer;
-
-function gethostbyname;
-begin
- GetProcedureAddress(_gethostbyname, ws2_32, 'gethostbyname');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_gethostbyname]
- end;
-end;
-
-var
- _gethostname: Pointer;
-
-function gethostname;
-begin
- GetProcedureAddress(_gethostname, ws2_32, 'gethostname');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_gethostname]
- end;
-end;
-
-var
- _getservbyport: Pointer;
-
-function getservbyport;
-begin
- GetProcedureAddress(_getservbyport, ws2_32, 'getservbyport');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_getservbyport]
- end;
-end;
-
-var
- _getservbyname: Pointer;
-
-function getservbyname;
-begin
- GetProcedureAddress(_getservbyname, ws2_32, 'getservbyname');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_getservbyname]
- end;
-end;
-
-var
- _getprotobynumber: Pointer;
-
-function getprotobynumber;
-begin
- GetProcedureAddress(_getprotobynumber, ws2_32, 'getprotobynumber');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_getprotobynumber]
- end;
-end;
-
-var
- _getprotobyname: Pointer;
-
-function getprotobyname;
-begin
- GetProcedureAddress(_getprotobyname, ws2_32, 'getprotobyname');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_getprotobyname]
- end;
-end;
-
-var
- _WSAStartup: Pointer;
-
-function WSAStartup;
-begin
- GetProcedureAddress(_WSAStartup, ws2_32, 'WSAStartup');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WSAStartup]
- end;
-end;
-
-var
- _WSACleanup: Pointer;
-
-function WSACleanup;
-begin
- GetProcedureAddress(_WSACleanup, ws2_32, 'WSACleanup');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WSACleanup]
- end;
-end;
-
-var
- _WSASetLastError: Pointer;
-
-procedure WSASetLastError;
-begin
- GetProcedureAddress(_WSASetLastError, ws2_32, 'WSASetLastError');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WSASetLastError]
- end;
-end;
-
-var
- _WSAGetLastError: Pointer;
-
-function WSAGetLastError;
-begin
- GetProcedureAddress(_WSAGetLastError, ws2_32, 'WSAGetLastError');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WSAGetLastError]
- end;
-end;
-
-var
- _WSAIsBlocking: Pointer;
-
-function WSAIsBlocking;
-begin
- GetProcedureAddress(_WSAIsBlocking, ws2_32, 'WSAIsBlocking');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WSAIsBlocking]
- end;
-end;
-
-var
- _WSAUnhookBlockingHook: Pointer;
-
-function WSAUnhookBlockingHook;
-begin
- GetProcedureAddress(_WSAUnhookBlockingHook, ws2_32, 'WSAUnhookBlockingHook');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WSAUnhookBlockingHook]
- end;
-end;
-
-var
- _WSASetBlockingHook: Pointer;
-
-function WSASetBlockingHook;
-begin
- GetProcedureAddress(_WSASetBlockingHook, ws2_32, 'WSASetBlockingHook');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WSASetBlockingHook]
- end;
-end;
-
-var
- _WSACancelBlockingCall: Pointer;
-
-function WSACancelBlockingCall;
-begin
- GetProcedureAddress(_WSACancelBlockingCall, ws2_32, 'WSACancelBlockingCall');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WSACancelBlockingCall]
- end;
-end;
-
-var
- _WSAAsyncGetServByName: Pointer;
-
-function WSAAsyncGetServByName;
-begin
- GetProcedureAddress(_WSAAsyncGetServByName, ws2_32, 'WSAAsyncGetServByName');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WSAAsyncGetServByName]
- end;
-end;
-
-var
- _WSAAsyncGetServByPort: Pointer;
-
-function WSAAsyncGetServByPort;
-begin
- GetProcedureAddress(_WSAAsyncGetServByPort, ws2_32, 'WSAAsyncGetServByPort');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WSAAsyncGetServByPort]
- end;
-end;
-
-var
- _WSAAsyncGetProtoByName: Pointer;
-
-function WSAAsyncGetProtoByName;
-begin
- GetProcedureAddress(_WSAAsyncGetProtoByName, ws2_32, 'WSAAsyncGetProtoByName');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WSAAsyncGetProtoByName]
- end;
-end;
-
-var
- _WSAAsyncGetProtoByNumber: Pointer;
-
-function WSAAsyncGetProtoByNumber;
-begin
- GetProcedureAddress(_WSAAsyncGetProtoByNumber, ws2_32, 'WSAAsyncGetProtoByNumber');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WSAAsyncGetProtoByNumber]
- end;
-end;
-
-var
- _WSAAsyncGetHostByName: Pointer;
-
-function WSAAsyncGetHostByName;
-begin
- GetProcedureAddress(_WSAAsyncGetHostByName, ws2_32, 'WSAAsyncGetHostByName');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WSAAsyncGetHostByName]
- end;
-end;
-
-var
- _WSAAsyncGetHostByAddr: Pointer;
-
-function WSAAsyncGetHostByAddr;
-begin
- GetProcedureAddress(_WSAAsyncGetHostByAddr, ws2_32, 'WSAAsyncGetHostByAddr');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WSAAsyncGetHostByAddr]
- end;
-end;
-
-var
- _WSACancelAsyncRequest: Pointer;
-
-function WSACancelAsyncRequest;
-begin
- GetProcedureAddress(_WSACancelAsyncRequest, ws2_32, 'WSACancelAsyncRequest');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WSACancelAsyncRequest]
- end;
-end;
-
-var
- _WSAAsyncSelect: Pointer;
-
-function WSAAsyncSelect;
-begin
- GetProcedureAddress(_WSAAsyncSelect, ws2_32, 'WSAAsyncSelect');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WSAAsyncSelect]
- end;
-end;
-
-var
- _WSAAccept: Pointer;
-
-function WSAAccept;
-begin
- GetProcedureAddress(_WSAAccept, ws2_32, 'WSAAccept');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WSAAccept]
- end;
-end;
-
-var
- _WSACloseEvent: Pointer;
-
-function WSACloseEvent;
-begin
- GetProcedureAddress(_WSACloseEvent, ws2_32, 'WSACloseEvent');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WSACloseEvent]
- end;
-end;
-
-var
- _WSAConnect: Pointer;
-
-function WSAConnect;
-begin
- GetProcedureAddress(_WSAConnect, ws2_32, 'WSAConnect');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WSAConnect]
- end;
-end;
-
-var
- _WSACreateEvent: Pointer;
-
-function WSACreateEvent;
-begin
- GetProcedureAddress(_WSACreateEvent, ws2_32, 'WSACreateEvent');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WSACreateEvent]
- end;
-end;
-
-var
- _WSADuplicateSocketA: Pointer;
-
-function WSADuplicateSocketA;
-begin
- GetProcedureAddress(_WSADuplicateSocketA, ws2_32, 'WSADuplicateSocketA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WSADuplicateSocketA]
- end;
-end;
-
-var
- _WSADuplicateSocketW: Pointer;
-
-function WSADuplicateSocketW;
-begin
- GetProcedureAddress(_WSADuplicateSocketW, ws2_32, 'WSADuplicateSocketW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WSADuplicateSocketW]
- end;
-end;
-
-var
- _WSADuplicateSocket: Pointer;
-
-function WSADuplicateSocket;
-begin
- GetProcedureAddress(_WSADuplicateSocket, ws2_32, 'WSADuplicateSocket' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WSADuplicateSocket]
- end;
-end;
-
-var
- _WSAEnumNetworkEvents: Pointer;
-
-function WSAEnumNetworkEvents;
-begin
- GetProcedureAddress(_WSAEnumNetworkEvents, ws2_32, 'WSAEnumNetworkEvents');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WSAEnumNetworkEvents]
- end;
-end;
-
-var
- _WSAEnumProtocolsA: Pointer;
-
-function WSAEnumProtocolsA;
-begin
- GetProcedureAddress(_WSAEnumProtocolsA, ws2_32, 'WSAEnumProtocolsA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WSAEnumProtocolsA]
- end;
-end;
-
-var
- _WSAEnumProtocolsW: Pointer;
-
-function WSAEnumProtocolsW;
-begin
- GetProcedureAddress(_WSAEnumProtocolsW, ws2_32, 'WSAEnumProtocolsW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WSAEnumProtocolsW]
- end;
-end;
-
-var
- _WSAEnumProtocols: Pointer;
-
-function WSAEnumProtocols;
-begin
- GetProcedureAddress(_WSAEnumProtocols, ws2_32, 'WSAEnumProtocols' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WSAEnumProtocols]
- end;
-end;
-
-var
- _WSAEventSelect: Pointer;
-
-function WSAEventSelect;
-begin
- GetProcedureAddress(_WSAEventSelect, ws2_32, 'WSAEventSelect');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WSAEventSelect]
- end;
-end;
-
-var
- _WSAGetOverlappedResult: Pointer;
-
-function WSAGetOverlappedResult;
-begin
- GetProcedureAddress(_WSAGetOverlappedResult, ws2_32, 'WSAGetOverlappedResult');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WSAGetOverlappedResult]
- end;
-end;
-
-var
- _WSAGetQOSByName: Pointer;
-
-function WSAGetQOSByName;
-begin
- GetProcedureAddress(_WSAGetQOSByName, ws2_32, 'WSAGetQOSByName');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WSAGetQOSByName]
- end;
-end;
-
-var
- _WSAHtonl: Pointer;
-
-function WSAHtonl;
-begin
- GetProcedureAddress(_WSAHtonl, ws2_32, 'WSAHtonl');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WSAHtonl]
- end;
-end;
-
-var
- _WSAHtons: Pointer;
-
-function WSAHtons;
-begin
- GetProcedureAddress(_WSAHtons, ws2_32, 'WSAHtons');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WSAHtons]
- end;
-end;
-
-var
- _WSAIoctl: Pointer;
-
-function WSAIoctl;
-begin
- GetProcedureAddress(_WSAIoctl, ws2_32, 'WSAIoctl');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WSAIoctl]
- end;
-end;
-
-var
- _WSAJoinLeaf: Pointer;
-
-function WSAJoinLeaf;
-begin
- GetProcedureAddress(_WSAJoinLeaf, ws2_32, 'WSAJoinLeaf');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WSAJoinLeaf]
- end;
-end;
-
-var
- _WSANtohl: Pointer;
-
-function WSANtohl;
-begin
- GetProcedureAddress(_WSANtohl, ws2_32, 'WSANtohl');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WSANtohl]
- end;
-end;
-
-var
- _WSANtohs: Pointer;
-
-function WSANtohs;
-begin
- GetProcedureAddress(_WSANtohs, ws2_32, 'WSANtohs');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WSANtohs]
- end;
-end;
-
-var
- _WSARecv: Pointer;
-
-function WSARecv;
-begin
- GetProcedureAddress(_WSARecv, ws2_32, 'WSARecv');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WSARecv]
- end;
-end;
-
-var
- _WSARecvDisconnect: Pointer;
-
-function WSARecvDisconnect;
-begin
- GetProcedureAddress(_WSARecvDisconnect, ws2_32, 'WSARecvDisconnect');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WSARecvDisconnect]
- end;
-end;
-
-var
- _WSARecvFrom: Pointer;
-
-function WSARecvFrom;
-begin
- GetProcedureAddress(_WSARecvFrom, ws2_32, 'WSARecvFrom');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WSARecvFrom]
- end;
-end;
-
-var
- _WSAResetEvent: Pointer;
-
-function WSAResetEvent;
-begin
- GetProcedureAddress(_WSAResetEvent, ws2_32, 'WSAResetEvent');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WSAResetEvent]
- end;
-end;
-
-var
- _WSASend: Pointer;
-
-function WSASend;
-begin
- GetProcedureAddress(_WSASend, ws2_32, 'WSASend');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WSASend]
- end;
-end;
-
-var
- _WSASendDisconnect: Pointer;
-
-function WSASendDisconnect;
-begin
- GetProcedureAddress(_WSASendDisconnect, ws2_32, 'WSASendDisconnect');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WSASendDisconnect]
- end;
-end;
-
-var
- _WSASendTo: Pointer;
-
-function WSASendTo;
-begin
- GetProcedureAddress(_WSASendTo, ws2_32, 'WSASendTo');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WSASendTo]
- end;
-end;
-
-var
- _WSASetEvent: Pointer;
-
-function WSASetEvent;
-begin
- GetProcedureAddress(_WSASetEvent, ws2_32, 'WSASetEvent');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WSASetEvent]
- end;
-end;
-
-var
- _WSASocketA: Pointer;
-
-function WSASocketA;
-begin
- GetProcedureAddress(_WSASocketA, ws2_32, 'WSASocketA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WSASocketA]
- end;
-end;
-
-var
- _WSASocketW: Pointer;
-
-function WSASocketW;
-begin
- GetProcedureAddress(_WSASocketW, ws2_32, 'WSASocketW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WSASocketW]
- end;
-end;
-
-var
- _WSASocket: Pointer;
-
-function WSASocket;
-begin
- GetProcedureAddress(_WSASocket, ws2_32, 'WSASocket' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WSASocket]
- end;
-end;
-
-var
- _WSAWaitForMultipleEvents: Pointer;
-
-function WSAWaitForMultipleEvents;
-begin
- GetProcedureAddress(_WSAWaitForMultipleEvents, ws2_32, 'WSAWaitForMultipleEvents');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WSAWaitForMultipleEvents]
- end;
-end;
-
-var
- _WSAAddressToStringA: Pointer;
-
-function WSAAddressToStringA;
-begin
- GetProcedureAddress(_WSAAddressToStringA, ws2_32, 'WSAAddressToStringA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WSAAddressToStringA]
- end;
-end;
-
-var
- _WSAAddressToStringW: Pointer;
-
-function WSAAddressToStringW;
-begin
- GetProcedureAddress(_WSAAddressToStringW, ws2_32, 'WSAAddressToStringW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WSAAddressToStringW]
- end;
-end;
-
-var
- _WSAAddressToString: Pointer;
-
-function WSAAddressToString;
-begin
- GetProcedureAddress(_WSAAddressToString, ws2_32, 'WSAAddressToString' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WSAAddressToString]
- end;
-end;
-
-var
- _WSAStringToAddressA: Pointer;
-
-function WSAStringToAddressA;
-begin
- GetProcedureAddress(_WSAStringToAddressA, ws2_32, 'WSAStringToAddressA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WSAStringToAddressA]
- end;
-end;
-
-var
- _WSAStringToAddressW: Pointer;
-
-function WSAStringToAddressW;
-begin
- GetProcedureAddress(_WSAStringToAddressW, ws2_32, 'WSAStringToAddressW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WSAStringToAddressW]
- end;
-end;
-
-var
- _WSAStringToAddress: Pointer;
-
-function WSAStringToAddress;
-begin
- GetProcedureAddress(_WSAStringToAddress, ws2_32, 'WSAStringToAddress' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WSAStringToAddress]
- end;
-end;
-
-var
- _WSALookupServiceBeginA: Pointer;
-
-function WSALookupServiceBeginA;
-begin
- GetProcedureAddress(_WSALookupServiceBeginA, ws2_32, 'WSALookupServiceBeginA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WSALookupServiceBeginA]
- end;
-end;
-
-var
- _WSALookupServiceBeginW: Pointer;
-
-function WSALookupServiceBeginW;
-begin
- GetProcedureAddress(_WSALookupServiceBeginW, ws2_32, 'WSALookupServiceBeginW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WSALookupServiceBeginW]
- end;
-end;
-
-var
- _WSALookupServiceBegin: Pointer;
-
-function WSALookupServiceBegin;
-begin
- GetProcedureAddress(_WSALookupServiceBegin, ws2_32, 'WSALookupServiceBegin' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WSALookupServiceBegin]
- end;
-end;
-
-var
- _WSALookupServiceNextA: Pointer;
-
-function WSALookupServiceNextA;
-begin
- GetProcedureAddress(_WSALookupServiceNextA, ws2_32, 'WSALookupServiceNextA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WSALookupServiceNextA]
- end;
-end;
-
-var
- _WSALookupServiceNextW: Pointer;
-
-function WSALookupServiceNextW;
-begin
- GetProcedureAddress(_WSALookupServiceNextW, ws2_32, 'WSALookupServiceNextW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WSALookupServiceNextW]
- end;
-end;
-
-var
- _WSALookupServiceNext: Pointer;
-
-function WSALookupServiceNext;
-begin
- GetProcedureAddress(_WSALookupServiceNext, ws2_32, 'WSALookupServiceNext' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WSALookupServiceNext]
- end;
-end;
-
-var
- _WSANSPIoctl: Pointer;
-
-function WSANSPIoctl;
-begin
- GetProcedureAddress(_WSANSPIoctl, ws2_32, 'WSANSPIoctl');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WSANSPIoctl]
- end;
-end;
-
-var
- _WSALookupServiceEnd: Pointer;
-
-function WSALookupServiceEnd;
-begin
- GetProcedureAddress(_WSALookupServiceEnd, ws2_32, 'WSALookupServiceEnd');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WSALookupServiceEnd]
- end;
-end;
-
-var
- _WSAInstallServiceClassA: Pointer;
-
-function WSAInstallServiceClassA;
-begin
- GetProcedureAddress(_WSAInstallServiceClassA, ws2_32, 'WSAInstallServiceClassA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WSAInstallServiceClassA]
- end;
-end;
-
-var
- _WSAInstallServiceClassW: Pointer;
-
-function WSAInstallServiceClassW;
-begin
- GetProcedureAddress(_WSAInstallServiceClassW, ws2_32, 'WSAInstallServiceClassW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WSAInstallServiceClassW]
- end;
-end;
-
-var
- _WSAInstallServiceClass: Pointer;
-
-function WSAInstallServiceClass;
-begin
- GetProcedureAddress(_WSAInstallServiceClass, ws2_32, 'WSAInstallServiceClass' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WSAInstallServiceClass]
- end;
-end;
-
-var
- _WSARemoveServiceClass: Pointer;
-
-function WSARemoveServiceClass;
-begin
- GetProcedureAddress(_WSARemoveServiceClass, ws2_32, 'WSARemoveServiceClass');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WSARemoveServiceClass]
- end;
-end;
-
-var
- _WSAGetServiceClassInfoA: Pointer;
-
-function WSAGetServiceClassInfoA;
-begin
- GetProcedureAddress(_WSAGetServiceClassInfoA, ws2_32, 'WSAGetServiceClassInfoA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WSAGetServiceClassInfoA]
- end;
-end;
-
-var
- _WSAGetServiceClassInfoW: Pointer;
-
-function WSAGetServiceClassInfoW;
-begin
- GetProcedureAddress(_WSAGetServiceClassInfoW, ws2_32, 'WSAGetServiceClassInfoW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WSAGetServiceClassInfoW]
- end;
-end;
-
-var
- _WSAGetServiceClassInfo: Pointer;
-
-function WSAGetServiceClassInfo;
-begin
- GetProcedureAddress(_WSAGetServiceClassInfo, ws2_32, 'WSAGetServiceClassInfo' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WSAGetServiceClassInfo]
- end;
-end;
-
-var
- _WSAEnumNameSpaceProvidersA: Pointer;
-
-function WSAEnumNameSpaceProvidersA;
-begin
- GetProcedureAddress(_WSAEnumNameSpaceProvidersA, ws2_32, 'WSAEnumNameSpaceProvidersA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WSAEnumNameSpaceProvidersA]
- end;
-end;
-
-var
- _WSAEnumNameSpaceProvidersW: Pointer;
-
-function WSAEnumNameSpaceProvidersW;
-begin
- GetProcedureAddress(_WSAEnumNameSpaceProvidersW, ws2_32, 'WSAEnumNameSpaceProvidersW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WSAEnumNameSpaceProvidersW]
- end;
-end;
-
-var
- _WSAEnumNameSpaceProviders: Pointer;
-
-function WSAEnumNameSpaceProviders;
-begin
- GetProcedureAddress(_WSAEnumNameSpaceProviders, ws2_32, 'WSAEnumNameSpaceProviders' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WSAEnumNameSpaceProviders]
- end;
-end;
-
-var
- _WSAGetServClassNameByClassIdA: Pointer;
-
-function WSAGetServiceClassNameByClassIdA;
-begin
- GetProcedureAddress(_WSAGetServClassNameByClassIdA, ws2_32, 'WSAGetServiceClassNameByClassIdA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WSAGetServClassNameByClassIdA]
- end;
-end;
-
-var
- _WSAGetServClassNameByClassIdW: Pointer;
-
-function WSAGetServiceClassNameByClassIdW;
-begin
- GetProcedureAddress(_WSAGetServClassNameByClassIdW, ws2_32, 'WSAGetServiceClassNameByClassIdW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WSAGetServClassNameByClassIdW]
- end;
-end;
-
-var
- _WSAGetServClassNameByClassId: Pointer;
-
-function WSAGetServiceClassNameByClassId;
-begin
- GetProcedureAddress(_WSAGetServClassNameByClassId, ws2_32, 'WSAGetServiceClassNameByClassId' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WSAGetServClassNameByClassId]
- end;
-end;
-
-var
- _WSASetServiceA: Pointer;
-
-function WSASetServiceA;
-begin
- GetProcedureAddress(_WSASetServiceA, ws2_32, 'WSASetServiceA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WSASetServiceA]
- end;
-end;
-
-var
- _WSASetServiceW: Pointer;
-
-function WSASetServiceW;
-begin
- GetProcedureAddress(_WSASetServiceW, ws2_32, 'WSASetServiceW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WSASetServiceW]
- end;
-end;
-
-var
- _WSASetService: Pointer;
-
-function WSASetService;
-begin
- GetProcedureAddress(_WSASetService, ws2_32, 'WSASetService' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WSASetService]
- end;
-end;
-
-var
- _WSAProviderConfigChange: Pointer;
-
-function WSAProviderConfigChange;
-begin
- GetProcedureAddress(_WSAProviderConfigChange, ws2_32, 'WSAProviderConfigChange');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WSAProviderConfigChange]
- end;
-end;
-
-{$ELSE}
-
-function __WSAFDIsSet; external ws2_32 name '__WSAFDIsSet';
-function accept; external ws2_32 name 'accept';
-function bind; external ws2_32 name 'bind';
-function closesocket; external ws2_32 name 'closesocket';
-function connect; external ws2_32 name 'connect';
-function ioctlsocket; external ws2_32 name 'ioctlsocket';
-function getpeername; external ws2_32 name 'getpeername';
-function getsockname; external ws2_32 name 'getsockname';
-function getsockopt; external ws2_32 name 'getsockopt';
-function htonl; external ws2_32 name 'htonl';
-function htons; external ws2_32 name 'htons';
-function inet_addr; external ws2_32 name 'inet_addr';
-function inet_ntoa; external ws2_32 name 'inet_ntoa';
-function listen; external ws2_32 name 'listen';
-function ntohl; external ws2_32 name 'ntohl';
-function ntohs; external ws2_32 name 'ntohs';
-function recv; external ws2_32 name 'recv';
-function recvfrom; external ws2_32 name 'recvfrom';
-function select; external ws2_32 name 'select';
-function send; external ws2_32 name 'send';
-function sendto; external ws2_32 name 'sendto';
-function setsockopt; external ws2_32 name 'setsockopt';
-function shutdown; external ws2_32 name 'shutdown';
-function socket; external ws2_32 name 'socket';
-function gethostbyaddr; external ws2_32 name 'gethostbyaddr';
-function gethostbyname; external ws2_32 name 'gethostbyname';
-function gethostname; external ws2_32 name 'gethostname';
-function getservbyport; external ws2_32 name 'getservbyport';
-function getservbyname; external ws2_32 name 'getservbyname';
-function getprotobynumber; external ws2_32 name 'getprotobynumber';
-function getprotobyname; external ws2_32 name 'getprotobyname';
-function WSAStartup; external ws2_32 name 'WSAStartup';
-function WSACleanup; external ws2_32 name 'WSACleanup';
-procedure WSASetLastError; external ws2_32 name 'WSASetLastError';
-function WSAGetLastError; external ws2_32 name 'WSAGetLastError';
-function WSAIsBlocking; external ws2_32 name 'WSAIsBlocking';
-function WSAUnhookBlockingHook; external ws2_32 name 'WSAUnhookBlockingHook';
-function WSASetBlockingHook; external ws2_32 name 'WSASetBlockingHook';
-function WSACancelBlockingCall; external ws2_32 name 'WSACancelBlockingCall';
-function WSAAsyncGetServByName; external ws2_32 name 'WSAAsyncGetServByName';
-function WSAAsyncGetServByPort; external ws2_32 name 'WSAAsyncGetServByPort';
-function WSAAsyncGetProtoByName; external ws2_32 name 'WSAAsyncGetProtoByName';
-function WSAAsyncGetProtoByNumber; external ws2_32 name 'WSAAsyncGetProtoByNumber';
-function WSAAsyncGetHostByName; external ws2_32 name 'WSAAsyncGetHostByName';
-function WSAAsyncGetHostByAddr; external ws2_32 name 'WSAAsyncGetHostByAddr';
-function WSACancelAsyncRequest; external ws2_32 name 'WSACancelAsyncRequest';
-function WSAAsyncSelect; external ws2_32 name 'WSAAsyncSelect';
-function WSAAccept; external ws2_32 name 'WSAAccept';
-function WSACloseEvent; external ws2_32 name 'WSACloseEvent';
-function WSAConnect; external ws2_32 name 'WSAConnect';
-function WSACreateEvent; external ws2_32 name 'WSACreateEvent';
-function WSADuplicateSocketA; external ws2_32 name 'WSADuplicateSocketA';
-function WSADuplicateSocketW; external ws2_32 name 'WSADuplicateSocketW';
-function WSADuplicateSocket; external ws2_32 name 'WSADuplicateSocket' + AWSuffix;
-function WSAEnumNetworkEvents; external ws2_32 name 'WSAEnumNetworkEvents';
-function WSAEnumProtocolsA; external ws2_32 name 'WSAEnumProtocolsA';
-function WSAEnumProtocolsW; external ws2_32 name 'WSAEnumProtocolsW';
-function WSAEnumProtocols; external ws2_32 name 'WSAEnumProtocols' + AWSuffix;
-function WSAEventSelect; external ws2_32 name 'WSAEventSelect';
-function WSAGetOverlappedResult; external ws2_32 name 'WSAGetOverlappedResult';
-function WSAGetQOSByName; external ws2_32 name 'WSAGetQOSByName';
-function WSAHtonl; external ws2_32 name 'WSAHtonl';
-function WSAHtons; external ws2_32 name 'WSAHtons';
-function WSAIoctl; external ws2_32 name 'WSAIoctl';
-function WSAJoinLeaf; external ws2_32 name 'WSAJoinLeaf';
-function WSANtohl; external ws2_32 name 'WSANtohl';
-function WSANtohs; external ws2_32 name 'WSANtohs';
-function WSARecv; external ws2_32 name 'WSARecv';
-function WSARecvDisconnect; external ws2_32 name 'WSARecvDisconnect';
-function WSARecvFrom; external ws2_32 name 'WSARecvFrom';
-function WSAResetEvent; external ws2_32 name 'WSAResetEvent';
-function WSASend; external ws2_32 name 'WSASend';
-function WSASendDisconnect; external ws2_32 name 'WSASendDisconnect';
-function WSASendTo; external ws2_32 name 'WSASendTo';
-function WSASetEvent; external ws2_32 name 'WSASetEvent';
-function WSASocketA; external ws2_32 name 'WSASocketA';
-function WSASocketW; external ws2_32 name 'WSASocketW';
-function WSASocket; external ws2_32 name 'WSASocket' + AWSuffix;
-function WSAWaitForMultipleEvents; external ws2_32 name 'WSAWaitForMultipleEvents';
-function WSAAddressToStringA; external ws2_32 name 'WSAAddressToStringA';
-function WSAAddressToStringW; external ws2_32 name 'WSAAddressToStringW';
-function WSAAddressToString; external ws2_32 name 'WSAAddressToString' + AWSuffix;
-function WSAStringToAddressA; external ws2_32 name 'WSAStringToAddressA';
-function WSAStringToAddressW; external ws2_32 name 'WSAStringToAddressW';
-function WSAStringToAddress; external ws2_32 name 'WSAStringToAddress' + AWSuffix;
-function WSALookupServiceBeginA; external ws2_32 name 'WSALookupServiceBeginA';
-function WSALookupServiceBeginW; external ws2_32 name 'WSALookupServiceBeginW';
-function WSALookupServiceBegin; external ws2_32 name 'WSALookupServiceBegin' + AWSuffix;
-function WSALookupServiceNextA; external ws2_32 name 'WSALookupServiceNextA';
-function WSALookupServiceNextW; external ws2_32 name 'WSALookupServiceNextW';
-function WSALookupServiceNext; external ws2_32 name 'WSALookupServiceNext' + AWSuffix;
-function WSANSPIoctl; external ws2_32 name 'WSANSPIoctl';
-function WSALookupServiceEnd; external ws2_32 name 'WSALookupServiceEnd';
-function WSAInstallServiceClassA; external ws2_32 name 'WSAInstallServiceClassA';
-function WSAInstallServiceClassW; external ws2_32 name 'WSAInstallServiceClassW';
-function WSAInstallServiceClass; external ws2_32 name 'WSAInstallServiceClass' + AWSuffix;
-function WSARemoveServiceClass; external ws2_32 name 'WSARemoveServiceClass';
-function WSAGetServiceClassInfoA; external ws2_32 name 'WSAGetServiceClassInfoA';
-function WSAGetServiceClassInfoW; external ws2_32 name 'WSAGetServiceClassInfoW';
-function WSAGetServiceClassInfo; external ws2_32 name 'WSAGetServiceClassInfo' + AWSuffix;
-function WSAEnumNameSpaceProvidersA; external ws2_32 name 'WSAEnumNameSpaceProvidersA';
-function WSAEnumNameSpaceProvidersW; external ws2_32 name 'WSAEnumNameSpaceProvidersW';
-function WSAEnumNameSpaceProviders; external ws2_32 name 'WSAEnumNameSpaceProviders' + AWSuffix;
-function WSAGetServiceClassNameByClassIdA; external ws2_32 name 'WSAGetServiceClassNameByClassIdA';
-function WSAGetServiceClassNameByClassIdW; external ws2_32 name 'WSAGetServiceClassNameByClassIdW';
-function WSAGetServiceClassNameByClassId; external ws2_32 name 'WSAGetServiceClassNameByClassId' + AWSuffix;
-function WSASetServiceA; external ws2_32 name 'WSASetServiceA';
-function WSASetServiceW; external ws2_32 name 'WSASetServiceW';
-function WSASetService; external ws2_32 name 'WSASetService' + AWSuffix;
-function WSAProviderConfigChange; external ws2_32 name 'WSAProviderConfigChange';
-
-{$ENDIF DYNAMIC_LINK}
-
-end.
+{******************************************************************************}
+{ }
+{ Winsock2 API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: winsock2.h, released June 2000. The original Pascal }
+{ code is: WinSock2.pas, released December 2000. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwawinsock2.pas,v 1.1 2005/04/04 07:56:11 marco Exp $
+
+unit JwaWinsock2;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "winsock2.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaQos, JwaWinType, JwaWinBase, JwaWinError, JwaWinNT;
+
+type // TODO
+ ULONG_PTR = ULONG;
+ DWORD_PTR = DWORD;
+ PPChar = ^PChar;
+ {$NODEFINE PPChar}
+ HANDLE = THandle;
+ {$NODEFINE HANDLE}
+ LPHANDLE = ^THandle;
+ {$NODEFINE LPHANDLE}
+ LPBYTE = ^BYTE;
+ {$NODEFINE LPBYTE}
+ LPVOID = Pointer;
+ {$NODEFINE LPVOID}
+ USHORT = Word;
+ {$NODEFINE USHORT}
+ UCHAR = Byte;
+ {$NODEFINE UCHAR}
+ ULONG = Cardinal;
+ {$NODEFINE ULONG}
+
+//#include <pshpack4.h>
+{$ALIGN ON}
+
+// Winsock2.h -- definitions to be used with the WinSock 2 DLL and
+// WinSock 2 applications.
+//
+// This header file corresponds to version 2.2.x of the WinSock API
+// specification.
+//
+// This file includes parts which are Copyright (c) 1982-1986 Regents
+// of the University of California. All rights reserved. The
+// Berkeley Software License Agreement specifies the terms and
+// conditions for redistribution.
+//
+
+(*
+ * Default: include function prototypes, don't include function typedefs.
+ *)
+
+// (rom) INCL_WINSOCK_API_PROTOTYPES and INCL_WINSOCK_API_TYPEDEFS IFDEFs
+// removed because they are without meaning for Delphi.
+
+const
+ WINSOCK_VERSION = $0202;
+ {$EXTERNALSYM WINSOCK_VERSION}
+
+//
+// Basic system type definitions, taken from the BSD file sys/types.h.
+//
+
+type
+ u_char = Byte;
+ {$EXTERNALSYM u_char}
+ u_short = Word;
+ {$EXTERNALSYM u_short}
+ u_int = Cardinal;
+ {$EXTERNALSYM u_int}
+ u_long = Cardinal;
+ {$EXTERNALSYM u_long}
+ u_int64 = Int64; // unsigned __int64 !! TODO For Delphi 7 ??
+ {$EXTERNALSYM u_int64}
+
+//
+// The new type to be used in all
+// instances which refer to sockets.
+//
+
+type
+ TSocket = Cardinal;
+
+//
+// Select uses arrays of SOCKETs. These macros manipulate such
+// arrays. FD_SETSIZE may be defined by the user before including
+// this file, but the default here should be >= 64.
+//
+// CAVEAT IMPLEMENTOR and USER: THESE MACROS AND TYPES MUST BE
+// INCLUDED IN WINSOCK2.H EXACTLY AS SHOWN HERE.
+//
+
+const
+ FD_SETSIZE = 64;
+ {$EXTERNALSYM FD_SETSIZE}
+
+type
+ fd_set = record
+ fd_count: u_int; // how many are SET?
+ fd_array: array [0..FD_SETSIZE - 1] of TSocket; // an array of SOCKETs
+ end;
+ {$EXTERNALSYM fd_set}
+ TFdSet = fd_set;
+ PFdSet = ^fd_set;
+
+function __WSAFDIsSet(s: TSocket; var FDSet: TFDSet): Integer; stdcall;
+{$EXTERNALSYM __WSAFDIsSet}
+
+procedure FD_CLR(fd: TSocket; var fdset: TFdSet);
+{$EXTERNALSYM FD_CLR}
+
+procedure _FD_SET(fd: TSocket; var fdset: TFDSet);
+//{$EXTERNALSYM FD_SET}
+
+procedure FD_ZERO(var fdset: TFdSet);
+{$EXTERNALSYM FD_ZERO}
+
+function FD_ISSET(fd: TSocket; var fdset: TFdSet): Boolean;
+{$EXTERNALSYM FD_ISSET}
+
+//
+// Structure used in select() call, taken from the BSD file sys/time.h.
+//
+
+type
+ timeval = record
+ tv_sec: Longint; // seconds
+ tv_usec: Longint; // and microseconds
+ end;
+ {$EXTERNALSYM timeval}
+ TTimeVal = timeval;
+ PTimeVal = ^timeval;
+
+//
+// Operations on timevals.
+//
+// NB: timercmp does not work for >= or <=.
+//
+
+function timerisset(const tvp: TTimeVal): Boolean;
+{$EXTERNALSYM timerisset}
+
+//function timercmp(const tvp, uvp: TTimeVal; cmp): Boolean;
+//{$EXTERNALSYM timercmp}
+
+procedure timerclear(var tvp: TTimeVal);
+{$EXTERNALSYM timerclear}
+
+//
+// Commands for ioctlsocket(), taken from the BSD file fcntl.h.
+//
+//
+// Ioctl's have the command encoded in the lower word,
+// and the size of any in or out parameters in the upper
+// word. The high 2 bits of the upper word are used
+// to encode the in/out status of the parameter; for now
+// we restrict parameters to at most 128 bytes.
+//
+
+const
+ IOCPARM_MASK = $7f; // parameters must be < 128 bytes
+ {$EXTERNALSYM IOCPARM_MASK}
+ IOC_VOID = $20000000; // no parameters
+ {$EXTERNALSYM IOC_VOID}
+ IOC_OUT = $40000000; // copy out parameters
+ {$EXTERNALSYM IOC_OUT}
+ IOC_IN = DWORD($80000000); // copy in parameters
+ {$EXTERNALSYM IOC_IN}
+ IOC_INOUT = DWORD(IOC_IN or IOC_OUT);
+ {$EXTERNALSYM IOC_INOUT}
+
+ // 0x20000000 distinguishes new & old ioctl's
+
+function _IO(x, y: DWORD): DWORD;
+{$EXTERNALSYM _IO}
+
+function _IOR(x, y, t: DWORD): DWORD;
+{$EXTERNALSYM _IOR}
+
+function _IOW(x, y, t: DWORD): DWORD;
+{$EXTERNALSYM _IOW}
+
+const
+ FIONREAD = IOC_OUT or ((SizeOf(u_long) and IOCPARM_MASK) shl 16) or (Ord('f') shl 8) or 127; // get # bytes to read
+ {$EXTERNALSYM FIONREAD}
+ FIONBIO = IOC_IN or ((SizeOf(u_long) and IOCPARM_MASK) shl 16) or (Ord('f') shl 8) or 126; // set/clear non-blocking i/o
+ {$EXTERNALSYM FIONBIO}
+ FIOASYNC = IOC_IN or ((SizeOf(u_long) and IOCPARM_MASK) shl 16) or (Ord('f') shl 8) or 125; // set/clear async i/o
+ {$EXTERNALSYM FIOASYNC}
+
+// Socket I/O Controls
+
+ SIOCSHIWAT = DWORD(IOC_IN or ((SizeOf(u_long) and IOCPARM_MASK) shl 16) or (Ord('s') shl 8) or 0); // set high watermark
+ {$EXTERNALSYM SIOCSHIWAT}
+ SIOCGHIWAT = IOC_OUT or ((SizeOf(u_long) and IOCPARM_MASK) shl 16) or (Ord('s') shl 8) or 1; // get high watermark
+ {$EXTERNALSYM SIOCGHIWAT}
+ SIOCSLOWAT = DWORD(IOC_IN or ((SizeOf(u_long) and IOCPARM_MASK) shl 16) or (Ord('s') shl 8) or 2); // set low watermark
+ {$EXTERNALSYM SIOCSLOWAT}
+ SIOCGLOWAT = IOC_OUT or ((SizeOf(u_long) and IOCPARM_MASK) shl 16) or (Ord('s') shl 8) or 3; // get low watermark
+ {$EXTERNALSYM SIOCGLOWAT}
+ SIOCATMARK = IOC_OUT or ((SizeOf(u_long) and IOCPARM_MASK) shl 16) or (Ord('s') shl 8) or 7; // at oob mark?
+ {$EXTERNALSYM SIOCATMARK}
+
+//
+// Structures returned by network data base library, taken from the
+// BSD file netdb.h. All addresses are supplied in host order, and
+// returned in network order (suitable for use in system calls).
+//
+
+type
+ hostent = record
+ h_name: PChar; // official name of host
+ h_aliases: PPChar; // alias list
+ h_addrtype: Smallint; // host address type
+ h_length: Smallint; // length of address
+ case Integer of
+ 0: (h_addr_list: PPChar); // list of addresses
+ 1: (h_addr: PPChar); // address, for backward compat
+ end;
+ {$EXTERNALSYM hostent}
+ THostEnt = hostent;
+ PHostEnt = ^hostent;
+
+//
+// It is assumed here that a network number
+// fits in 32 bits.
+//
+
+type
+ netent = record
+ n_name: PChar; // official name of net
+ n_aliases: PPChar; // alias list
+ n_addrtype: Smallint; // net address type
+ n_net: u_long; // network #
+ end;
+ {$EXTERNALSYM netent}
+ TNetEnt = netent;
+ PNetEnt = ^netent;
+
+ servent = record
+ s_name: PChar; // official service name
+ s_aliases: PPChar; // alias list
+ s_port: Smallint; // port #
+ s_proto: PChar; // protocol to use
+ end;
+ {$EXTERNALSYM servent}
+ TServEnt = servent;
+ PServEnt = ^servent;
+
+ protoent = record
+ p_name: PChar; // official protocol name
+ p_aliases: PPChar; // alias list
+ p_proto: Smallint; // protocol #
+ end;
+ {$EXTERNALSYM protoent}
+ TProtoEnt = protoent;
+ PProtoEnt = ^protoent;
+
+//
+// Constants and structures defined by the internet system,
+// Per RFC 790, September 1981, taken from the BSD file netinet/in.h.
+//
+
+//
+// Protocols
+//
+
+const
+ IPPROTO_IP = 0; // dummy for IP
+ {$EXTERNALSYM IPPROTO_IP}
+ IPPROTO_HOPOPTS = 0; // IPv6 hop-by-hop options
+ {$EXTERNALSYM IPPROTO_HOPOPTS}
+ IPPROTO_ICMP = 1; // control message protocol
+ {$EXTERNALSYM IPPROTO_ICMP}
+ IPPROTO_IGMP = 2; // internet group management protocol
+ {$EXTERNALSYM IPPROTO_IGMP}
+ IPPROTO_GGP = 3; // gateway^2 (deprecated)
+ {$EXTERNALSYM IPPROTO_GGP}
+ IPPROTO_IPV4 = 4; // IPv4
+ {$EXTERNALSYM IPPROTO_IPV4}
+ IPPROTO_TCP = 6; // tcp
+ {$EXTERNALSYM IPPROTO_TCP}
+ IPPROTO_PUP = 12; // pup
+ {$EXTERNALSYM IPPROTO_PUP}
+ IPPROTO_UDP = 17; // user datagram protocol
+ {$EXTERNALSYM IPPROTO_UDP}
+ IPPROTO_IDP = 22; // xns idp
+ {$EXTERNALSYM IPPROTO_IDP}
+ IPPROTO_IPV6 = 41; // IPv6
+ {$EXTERNALSYM IPPROTO_IPV6}
+ IPPROTO_ROUTING = 43; // IPv6 routing header
+ {$EXTERNALSYM IPPROTO_ROUTING}
+ IPPROTO_FRAGMENT = 44; // IPv6 fragmentation header
+ {$EXTERNALSYM IPPROTO_FRAGMENT}
+ IPPROTO_ESP = 50; // IPsec ESP header
+ {$EXTERNALSYM IPPROTO_ESP}
+ IPPROTO_AH = 51; // IPsec AH
+ {$EXTERNALSYM IPPROTO_AH}
+ IPPROTO_ICMPV6 = 58; // ICMPv6
+ {$EXTERNALSYM IPPROTO_ICMPV6}
+ IPPROTO_NONE = 59; // IPv6 no next header
+ {$EXTERNALSYM IPPROTO_NONE}
+ IPPROTO_DSTOPTS = 60; // IPv6 destination options
+ {$EXTERNALSYM IPPROTO_DSTOPTS}
+ IPPROTO_ND = 77; // UNOFFICIAL net disk proto
+ {$EXTERNALSYM IPPROTO_ND}
+ IPPROTO_ICLFXBM = 78;
+ {$EXTERNALSYM IPPROTO_ICLFXBM}
+
+ IPPROTO_RAW = 255; // raw IP packet
+ {$EXTERNALSYM IPPROTO_RAW}
+ IPPROTO_MAX = 256;
+ {$EXTERNALSYM IPPROTO_MAX}
+
+//
+// Port/socket numbers: network standard functions
+//
+
+ IPPORT_ECHO = 7;
+ {$EXTERNALSYM IPPORT_ECHO}
+ IPPORT_DISCARD = 9;
+ {$EXTERNALSYM IPPORT_DISCARD}
+ IPPORT_SYSTAT = 11;
+ {$EXTERNALSYM IPPORT_SYSTAT}
+ IPPORT_DAYTIME = 13;
+ {$EXTERNALSYM IPPORT_DAYTIME}
+ IPPORT_NETSTAT = 15;
+ {$EXTERNALSYM IPPORT_NETSTAT}
+ IPPORT_FTP = 21;
+ {$EXTERNALSYM IPPORT_FTP}
+ IPPORT_TELNET = 23;
+ {$EXTERNALSYM IPPORT_TELNET}
+ IPPORT_SMTP = 25;
+ {$EXTERNALSYM IPPORT_SMTP}
+ IPPORT_TIMESERVER = 37;
+ {$EXTERNALSYM IPPORT_TIMESERVER}
+ IPPORT_NAMESERVER = 42;
+ {$EXTERNALSYM IPPORT_NAMESERVER}
+ IPPORT_WHOIS = 43;
+ {$EXTERNALSYM IPPORT_WHOIS}
+ IPPORT_MTP = 57;
+ {$EXTERNALSYM IPPORT_MTP}
+
+//
+// Port/socket numbers: host specific functions
+//
+
+ IPPORT_TFTP = 69;
+ {$EXTERNALSYM IPPORT_TFTP}
+ IPPORT_RJE = 77;
+ {$EXTERNALSYM IPPORT_RJE}
+ IPPORT_FINGER = 79;
+ {$EXTERNALSYM IPPORT_FINGER}
+ IPPORT_TTYLINK = 87;
+ {$EXTERNALSYM IPPORT_TTYLINK}
+ IPPORT_SUPDUP = 95;
+ {$EXTERNALSYM IPPORT_SUPDUP}
+
+//
+// UNIX TCP sockets
+//
+
+ IPPORT_EXECSERVER = 512;
+ {$EXTERNALSYM IPPORT_EXECSERVER}
+ IPPORT_LOGINSERVER = 513;
+ {$EXTERNALSYM IPPORT_LOGINSERVER}
+ IPPORT_CMDSERVER = 514;
+ {$EXTERNALSYM IPPORT_CMDSERVER}
+ IPPORT_EFSSERVER = 520;
+ {$EXTERNALSYM IPPORT_EFSSERVER}
+
+//
+// UNIX UDP sockets
+//
+
+ IPPORT_BIFFUDP = 512;
+ {$EXTERNALSYM IPPORT_BIFFUDP}
+ IPPORT_WHOSERVER = 513;
+ {$EXTERNALSYM IPPORT_WHOSERVER}
+ IPPORT_ROUTESERVER = 520;
+ {$EXTERNALSYM IPPORT_ROUTESERVER}
+
+ // 520+1 also used
+
+//
+// Ports < IPPORT_RESERVED are reserved for
+// privileged processes (e.g. root).
+//
+
+ IPPORT_RESERVED = 1024;
+ {$EXTERNALSYM IPPORT_RESERVED}
+
+//
+// Link numbers
+//
+
+ IMPLINK_IP = 155;
+ {$EXTERNALSYM IMPLINK_IP}
+ IMPLINK_LOWEXPER = 156;
+ {$EXTERNALSYM IMPLINK_LOWEXPER}
+ IMPLINK_HIGHEXPER = 158;
+ {$EXTERNALSYM IMPLINK_HIGHEXPER}
+
+//
+// Internet address (old style... should be updated)
+//
+
+type
+ SunB = packed record
+ s_b1, s_b2, s_b3, s_b4: u_char;
+ end;
+ {$EXTERNALSYM SunB}
+
+ SunC = packed record
+ s_c1, s_c2, s_c3, s_c4: Char;
+ end;
+ {$NODEFINE SunC}
+
+ SunW = packed record
+ s_w1, s_w2: u_short;
+ end;
+ {$EXTERNALSYM SunW}
+
+ in_addr = record
+ case Integer of
+ 0: (S_un_b: SunB);
+ 1: (S_un_c: SunC);
+ 2: (S_un_w: SunW);
+ 3: (S_addr: u_long);
+ // #define s_addr S_un.S_addr // can be used for most tcp & ip code
+ // #define s_host S_un.S_un_b.s_b2 // host on imp
+ // #define s_net S_un.S_un_b.s_b1 // netword
+ // #define s_imp S_un.S_un_w.s_w2 // imp
+ // #define s_impno S_un.S_un_b.s_b4 // imp #
+ // #define s_lh S_un.S_un_b.s_b3 // logical host
+ end;
+ {$EXTERNALSYM in_addr}
+ TInAddr = in_addr;
+ PInAddr = ^in_addr;
+
+//
+// Definitions of bits in internet address integers.
+// On subnets, the decomposition of addresses to host and net parts
+// is done according to subnet mask, not the masks here.
+//
+
+function IN_CLASSA(i: DWORD): Boolean;
+{$EXTERNALSYM IN_CLASSA}
+
+const
+ IN_CLASSA_NET = DWORD($ff000000);
+ {$EXTERNALSYM IN_CLASSA_NET}
+ IN_CLASSA_NSHIFT = 24;
+ {$EXTERNALSYM IN_CLASSA_NSHIFT}
+ IN_CLASSA_HOST = $00ffffff;
+ {$EXTERNALSYM IN_CLASSA_HOST}
+ IN_CLASSA_MAX = 128;
+ {$EXTERNALSYM IN_CLASSA_MAX}
+
+function IN_CLASSB(i: DWORD): Boolean;
+{$EXTERNALSYM IN_CLASSB}
+
+const
+ IN_CLASSB_NET = DWORD($ffff0000);
+ {$EXTERNALSYM IN_CLASSB_NET}
+ IN_CLASSB_NSHIFT = 16;
+ {$EXTERNALSYM IN_CLASSB_NSHIFT}
+ IN_CLASSB_HOST = $0000ffff;
+ {$EXTERNALSYM IN_CLASSB_HOST}
+ IN_CLASSB_MAX = 65536;
+ {$EXTERNALSYM IN_CLASSB_MAX}
+
+function IN_CLASSC(i: DWORD): Boolean;
+{$EXTERNALSYM IN_CLASSC}
+
+const
+ IN_CLASSC_NET = DWORD($ffffff00);
+ {$EXTERNALSYM IN_CLASSC_NET}
+ IN_CLASSC_NSHIFT = 8;
+ {$EXTERNALSYM IN_CLASSC_NSHIFT}
+ IN_CLASSC_HOST = $000000ff;
+ {$EXTERNALSYM IN_CLASSC_HOST}
+
+function IN_CLASSD(i: DWORD): Boolean;
+{$EXTERNALSYM IN_CLASSD}
+
+const
+ IN_CLASSD_NET = DWORD($f0000000); // These ones aren't really
+ {$EXTERNALSYM IN_CLASSD_NET}
+ IN_CLASSD_NSHIFT = 28; // net and host fields, but
+ {$EXTERNALSYM IN_CLASSD_NSHIFT}
+ IN_CLASSD_HOST = $0fffffff; // routing needn't know.
+ {$EXTERNALSYM IN_CLASSD_HOST}
+
+function IN_MULTICAST(i: DWORD): Boolean;
+{$EXTERNALSYM IN_MULTICAST}
+
+const
+ INADDR_ANY = u_long($00000000);
+ {$EXTERNALSYM INADDR_ANY}
+ INADDR_LOOPBACK = $7f000001;
+ {$EXTERNALSYM INADDR_LOOPBACK}
+ INADDR_BROADCAST = u_long($ffffffff);
+ {$EXTERNALSYM INADDR_BROADCAST}
+ INADDR_NONE = DWORD($ffffffff);
+ {$EXTERNALSYM INADDR_NONE}
+
+ ADDR_ANY = INADDR_ANY;
+ {$EXTERNALSYM ADDR_ANY}
+
+//
+// Socket address, internet style.
+//
+
+type
+ sockaddr_in = record
+ sin_family: Smallint;
+ sin_port: u_short;
+ sin_addr: in_addr;
+ sin_zero: array [0..7] of Char;
+ end;
+ {$EXTERNALSYM sockaddr_in}
+ TSockAddrIn = sockaddr_in;
+ PSockAddrIn = ^sockaddr_in;
+
+const
+ WSADESCRIPTION_LEN = 256;
+ {$EXTERNALSYM WSADESCRIPTION_LEN}
+ WSASYS_STATUS_LEN = 128;
+ {$EXTERNALSYM WSASYS_STATUS_LEN}
+
+type
+ WSAData = record
+ wVersion: WORD;
+ wHighVersion: WORD;
+ szDescription: array [0..WSADESCRIPTION_LEN] of Char;
+ szSystemStatus: array [0..WSASYS_STATUS_LEN] of Char;
+ iMaxSockets: Word;
+ iMaxUdpDg: Word;
+ lpVendorInfo: PChar;
+ end;
+ {$EXTERNALSYM WSAData}
+ LPWSADATA = ^WSAData;
+ {$EXTERNALSYM LPWSADATA}
+ TWsaData = WSAData;
+ PWsaData = LPWSADATA;
+
+//
+// Definitions related to sockets: types, address families, options,
+// taken from the BSD file sys/socket.h.
+//
+
+//
+// This is used instead of -1, since the
+// SOCKET type is unsigned.
+//
+
+const
+ INVALID_SOCKET = TSocket(not 0);
+ {$EXTERNALSYM INVALID_SOCKET}
+ SOCKET_ERROR = -1;
+ {$EXTERNALSYM SOCKET_ERROR}
+
+//
+// The following may be used in place of the address family, socket type, or
+// protocol in a call to WSASocket to indicate that the corresponding value
+// should be taken from the supplied WSAPROTOCOL_INFO structure instead of the
+// parameter itself.
+//
+
+ FROM_PROTOCOL_INFO = -1;
+ {$EXTERNALSYM FROM_PROTOCOL_INFO}
+
+//
+// Types
+//
+
+ SOCK_STREAM = 1; // stream socket
+ {$EXTERNALSYM SOCK_STREAM}
+ SOCK_DGRAM = 2; // datagram socket
+ {$EXTERNALSYM SOCK_DGRAM}
+ SOCK_RAW = 3; // raw-protocol interface
+ {$EXTERNALSYM SOCK_RAW}
+ SOCK_RDM = 4; // reliably-delivered message
+ {$EXTERNALSYM SOCK_RDM}
+ SOCK_SEQPACKET = 5; // sequenced packet stream
+ {$EXTERNALSYM SOCK_SEQPACKET}
+
+//
+// Option flags per-socket.
+//
+
+ SO_DEBUG = $0001; // turn on debugging info recording
+ {$EXTERNALSYM SO_DEBUG}
+ SO_ACCEPTCONN = $0002; // socket has had listen()
+ {$EXTERNALSYM SO_ACCEPTCONN}
+ SO_REUSEADDR = $0004; // allow local address reuse
+ {$EXTERNALSYM SO_REUSEADDR}
+ SO_KEEPALIVE = $0008; // keep connections alive
+ {$EXTERNALSYM SO_KEEPALIVE}
+ SO_DONTROUTE = $0010; // just use interface addresses
+ {$EXTERNALSYM SO_DONTROUTE}
+ SO_BROADCAST = $0020; // permit sending of broadcast msgs
+ {$EXTERNALSYM SO_BROADCAST}
+ SO_USELOOPBACK = $0040; // bypass hardware when possible
+ {$EXTERNALSYM SO_USELOOPBACK}
+ SO_LINGER = $0080; // linger on close if data present
+ {$EXTERNALSYM SO_LINGER}
+ SO_OOBINLINE = $0100; // leave received OOB data in line
+ {$EXTERNALSYM SO_OOBINLINE}
+
+ SO_DONTLINGER = DWORD(not SO_LINGER);
+ {$EXTERNALSYM SO_DONTLINGER}
+ SO_EXCLUSIVEADDRUSE = DWORD(not SO_REUSEADDR); // disallow local address reuse
+ {$EXTERNALSYM SO_EXCLUSIVEADDRUSE}
+
+//
+// Additional options.
+//
+
+ SO_SNDBUF = $1001; // send buffer size
+ {$EXTERNALSYM SO_SNDBUF}
+ SO_RCVBUF = $1002; // receive buffer size
+ {$EXTERNALSYM SO_RCVBUF}
+ SO_SNDLOWAT = $1003; // send low-water mark
+ {$EXTERNALSYM SO_SNDLOWAT}
+ SO_RCVLOWAT = $1004; // receive low-water mark
+ {$EXTERNALSYM SO_RCVLOWAT}
+ SO_SNDTIMEO = $1005; // send timeout
+ {$EXTERNALSYM SO_SNDTIMEO}
+ SO_RCVTIMEO = $1006; // receive timeout
+ {$EXTERNALSYM SO_RCVTIMEO}
+ SO_ERROR = $1007; // get error status and clear
+ {$EXTERNALSYM SO_ERROR}
+ SO_TYPE = $1008; // get socket type
+ {$EXTERNALSYM SO_TYPE}
+
+//
+// WinSock 2 extension -- new options
+//
+
+ SO_GROUP_ID = $2001; // ID of a socket group
+ {$EXTERNALSYM SO_GROUP_ID}
+ SO_GROUP_PRIORITY = $2002; // the relative priority within a group
+ {$EXTERNALSYM SO_GROUP_PRIORITY}
+ SO_MAX_MSG_SIZE = $2003; // maximum message size
+ {$EXTERNALSYM SO_MAX_MSG_SIZE}
+ SO_PROTOCOL_INFOA = $2004; // WSAPROTOCOL_INFOA structure
+ {$EXTERNALSYM SO_PROTOCOL_INFOA}
+ SO_PROTOCOL_INFOW = $2005; // WSAPROTOCOL_INFOW structure
+ {$EXTERNALSYM SO_PROTOCOL_INFOW}
+
+ {$IFDEF UNICODE}
+ SO_PROTOCOL_INFO = SO_PROTOCOL_INFOW;
+ {$EXTERNALSYM SO_PROTOCOL_INFO}
+ {$ELSE}
+ SO_PROTOCOL_INFO = SO_PROTOCOL_INFOA;
+ {$EXTERNALSYM SO_PROTOCOL_INFO}
+ {$ENDIF UNICODE}
+
+ PVD_CONFIG = $3001; // configuration info for service provider
+ {$EXTERNALSYM PVD_CONFIG}
+ SO_CONDITIONAL_ACCEPT = $3002; // enable true conditional accept:
+ // connection is not ack-ed to the
+ // other side until conditional
+ // function returns CF_ACCEPT
+ {$EXTERNALSYM SO_CONDITIONAL_ACCEPT}
+
+//
+// TCP options.
+//
+
+ TCP_NODELAY = $0001;
+ {$EXTERNALSYM TCP_NODELAY}
+
+//
+// Address families.
+//
+
+ AF_UNSPEC = 0; // unspecified
+ {$EXTERNALSYM AF_UNSPEC}
+
+//
+// Although AF_UNSPEC is defined for backwards compatibility, using
+// AF_UNSPEC for the "af" parameter when creating a socket is STRONGLY
+// DISCOURAGED. The interpretation of the "protocol" parameter
+// depends on the actual address family chosen. As environments grow
+// to include more and more address families that use overlapping
+// protocol values there is more and more chance of choosing an
+// undesired address family when AF_UNSPEC is used.
+//
+
+ AF_UNIX = 1; // local to host (pipes, portals
+ {$EXTERNALSYM AF_UNIX}
+ AF_INET = 2; // internetwork: UDP, TCP, etc.
+ {$EXTERNALSYM AF_INET}
+ AF_IMPLINK = 3; // arpanet imp addresses
+ {$EXTERNALSYM AF_IMPLINK}
+ AF_PUP = 4; // pup protocols: e.g. BSP
+ {$EXTERNALSYM AF_PUP}
+ AF_CHAOS = 5; // mit CHAOS protocols
+ {$EXTERNALSYM AF_CHAOS}
+ AF_NS = 6; // XEROX NS protocols
+ {$EXTERNALSYM AF_NS}
+ AF_IPX = AF_NS; // IPX protocols: IPX, SPX, etc.
+ {$EXTERNALSYM AF_IPX}
+ AF_ISO = 7; // ISO protocols
+ {$EXTERNALSYM AF_ISO}
+ AF_OSI = AF_ISO; // OSI is ISO
+ {$EXTERNALSYM AF_OSI}
+ AF_ECMA = 8; // european computer manufacturers
+ {$EXTERNALSYM AF_ECMA}
+ AF_DATAKIT = 9; // datakit protocols
+ {$EXTERNALSYM AF_DATAKIT}
+ AF_CCITT = 10; // CCITT protocols, X.25 etc
+ {$EXTERNALSYM AF_CCITT}
+ AF_SNA = 11; // IBM SNA
+ {$EXTERNALSYM AF_SNA}
+ AF_DECnet = 12; // DECnet
+ {$EXTERNALSYM AF_DECnet}
+ AF_DLI = 13; // Direct data link interface
+ {$EXTERNALSYM AF_DLI}
+ AF_LAT = 14; // LAT
+ {$EXTERNALSYM AF_LAT}
+ AF_HYLINK = 15; // NSC Hyperchannel
+ {$EXTERNALSYM AF_HYLINK}
+ AF_APPLETALK = 16; // AppleTalk
+ {$EXTERNALSYM AF_APPLETALK}
+ AF_NETBIOS = 17; // NetBios-style addresses
+ {$EXTERNALSYM AF_NETBIOS}
+ AF_VOICEVIEW = 18; // VoiceView
+ {$EXTERNALSYM AF_VOICEVIEW}
+ AF_FIREFOX = 19; // Protocols from Firefox
+ {$EXTERNALSYM AF_FIREFOX}
+ AF_UNKNOWN1 = 20; // Somebody is using this!
+ {$EXTERNALSYM AF_UNKNOWN1}
+ AF_BAN = 21; // Banyan
+ {$EXTERNALSYM AF_BAN}
+ AF_ATM = 22; // Native ATM Services
+ {$EXTERNALSYM AF_ATM}
+ AF_INET6 = 23; // Internetwork Version 6
+ {$EXTERNALSYM AF_INET6}
+ AF_CLUSTER = 24; // Microsoft Wolfpack
+ {$EXTERNALSYM AF_CLUSTER}
+ AF_12844 = 25; // IEEE 1284.4 WG AF
+ {$EXTERNALSYM AF_12844}
+ AF_IRDA = 26; // IrDA
+ {$EXTERNALSYM AF_IRDA}
+ AF_NETDES = 28; // Network Designers OSI & gateway enabled protocols
+ {$EXTERNALSYM AF_NETDES}
+
+ AF_TCNPROCESS = 29;
+ {$EXTERNALSYM AF_TCNPROCESS}
+ AF_TCNMESSAGE = 30;
+ {$EXTERNALSYM AF_TCNMESSAGE}
+ AF_ICLFXBM = 31;
+ {$EXTERNALSYM AF_ICLFXBM}
+
+ AF_MAX = 32;
+ {$EXTERNALSYM AF_MAX}
+
+//
+// Structure used by kernel to store most
+// addresses.
+//
+
+type
+ sockaddr = record
+ sa_family: u_short; // address family
+ sa_data: array [0..13] of Char; // up to 14 bytes of direct address
+ end;
+ {$EXTERNALSYM sockaddr}
+ TSockAddr = sockaddr;
+ PSockAddr = ^sockaddr;
+
+//
+// Portable socket structure (RFC 2553).
+//
+
+//
+// Desired design of maximum size and alignment.
+// These are implementation specific.
+//
+
+const
+ _SS_MAXSIZE = 128; // Maximum size.
+ {$EXTERNALSYM _SS_MAXSIZE}
+ _SS_ALIGNSIZE = SizeOf(Int64); // Desired alignment.
+ {$EXTERNALSYM _SS_ALIGNSIZE}
+
+//
+// Definitions used for sockaddr_storage structure paddings design.
+//
+
+ _SS_PAD1SIZE = _SS_ALIGNSIZE - SizeOf(short);
+ {$EXTERNALSYM _SS_PAD1SIZE}
+ _SS_PAD2SIZE = _SS_MAXSIZE - (SizeOf(short) + _SS_PAD1SIZE + _SS_ALIGNSIZE);
+ {$EXTERNALSYM _SS_PAD2SIZE}
+
+type
+ sockaddr_storage = record
+ ss_family: short; // Address family.
+ __ss_pad1: array [0.._SS_PAD1SIZE - 1] of char; // 6 byte pad, this is to make
+ // implementation specific pad up to
+ // alignment field that follows explicit
+ // in the data structure.
+ __ss_align: Int64; // Field to force desired structure.
+ __ss_pad2: array [0.._SS_PAD2SIZE - 1] of char; // 112 byte pad to achieve desired size;
+ // _SS_MAXSIZE value minus size of
+ // ss_family, __ss_pad1, and
+ // __ss_align fields is 112.
+ end;
+ {$EXTERNALSYM sockaddr_storage}
+ TSockAddrStorage = sockaddr_storage;
+ PSockAddrStorage = ^sockaddr_storage;
+
+//
+// Structure used by kernel to pass protocol
+// information in raw sockets.
+//
+
+ sockproto = record
+ sp_family: u_short; // address family
+ sp_protocol: u_short; // protocol
+ end;
+ {$EXTERNALSYM sockproto}
+ TSockProto = sockproto;
+ PSockProto = ^sockproto;
+
+//
+// Protocol families, same as address families for now.
+//
+
+const
+ PF_UNSPEC = AF_UNSPEC;
+ {$EXTERNALSYM PF_UNSPEC}
+ PF_UNIX = AF_UNIX;
+ {$EXTERNALSYM PF_UNIX}
+ PF_INET = AF_INET;
+ {$EXTERNALSYM PF_INET}
+ PF_IMPLINK = AF_IMPLINK;
+ {$EXTERNALSYM PF_IMPLINK}
+ PF_PUP = AF_PUP;
+ {$EXTERNALSYM PF_PUP}
+ PF_CHAOS = AF_CHAOS;
+ {$EXTERNALSYM PF_CHAOS}
+ PF_NS = AF_NS;
+ {$EXTERNALSYM PF_NS}
+ PF_IPX = AF_IPX;
+ {$EXTERNALSYM PF_IPX}
+ PF_ISO = AF_ISO;
+ {$EXTERNALSYM PF_ISO}
+ PF_OSI = AF_OSI;
+ {$EXTERNALSYM PF_OSI}
+ PF_ECMA = AF_ECMA;
+ {$EXTERNALSYM PF_ECMA}
+ PF_DATAKIT = AF_DATAKIT;
+ {$EXTERNALSYM PF_DATAKIT}
+ PF_CCITT = AF_CCITT;
+ {$EXTERNALSYM PF_CCITT}
+ PF_SNA = AF_SNA;
+ {$EXTERNALSYM PF_SNA}
+ PF_DECnet = AF_DECnet;
+ {$EXTERNALSYM PF_DECnet}
+ PF_DLI = AF_DLI;
+ {$EXTERNALSYM PF_DLI}
+ PF_LAT = AF_LAT;
+ {$EXTERNALSYM PF_LAT}
+ PF_HYLINK = AF_HYLINK;
+ {$EXTERNALSYM PF_HYLINK}
+ PF_APPLETALK = AF_APPLETALK;
+ {$EXTERNALSYM PF_APPLETALK}
+ PF_VOICEVIEW = AF_VOICEVIEW;
+ {$EXTERNALSYM PF_VOICEVIEW}
+ PF_FIREFOX = AF_FIREFOX;
+ {$EXTERNALSYM PF_FIREFOX}
+ PF_UNKNOWN1 = AF_UNKNOWN1;
+ {$EXTERNALSYM PF_UNKNOWN1}
+ PF_BAN = AF_BAN;
+ {$EXTERNALSYM PF_BAN}
+ PF_ATM = AF_ATM;
+ {$EXTERNALSYM PF_ATM}
+ PF_INET6 = AF_INET6;
+ {$EXTERNALSYM PF_INET6}
+
+ PF_MAX = AF_MAX;
+ {$EXTERNALSYM PF_MAX}
+
+//
+// Structure used for manipulating linger option.
+//
+
+type
+ linger = record
+ l_onoff: u_short; // option on/off
+ l_linger: u_short; // linger time
+ end;
+ {$EXTERNALSYM linger}
+ TLinger = linger;
+ PLinger = ^linger;
+
+//
+// Level number for (get/set)sockopt() to apply to socket itself.
+//
+
+const
+ SOL_SOCKET = $ffff; // options for socket level
+ {$EXTERNALSYM SOL_SOCKET}
+
+//
+// Maximum queue length specifiable by listen.
+//
+
+ SOMAXCONN = $7fffffff;
+ {$EXTERNALSYM SOMAXCONN}
+
+ MSG_OOB = $1; // process out-of-band data
+ {$EXTERNALSYM MSG_OOB}
+ MSG_PEEK = $2; // peek at incoming message
+ {$EXTERNALSYM MSG_PEEK}
+ MSG_DONTROUTE = $4; // send without using routing tables
+ {$EXTERNALSYM MSG_DONTROUTE}
+
+ MSG_PARTIAL = $8000; // partial send or recv for message xport
+ {$EXTERNALSYM MSG_PARTIAL}
+
+//
+// WinSock 2 extension -- new flags for WSASend(), WSASendTo(), WSARecv() and
+// WSARecvFrom()
+//
+
+ MSG_INTERRUPT = $10; // send/recv in the interrupt context
+ {$EXTERNALSYM MSG_INTERRUPT}
+
+ MSG_MAXIOVLEN = 16;
+ {$EXTERNALSYM MSG_MAXIOVLEN}
+
+//
+// Define constant based on rfc883, used by gethostbyxxxx() calls.
+//
+
+ MAXGETHOSTSTRUCT = 1024;
+ {$EXTERNALSYM MAXGETHOSTSTRUCT}
+
+//
+// WinSock 2 extension -- bit values and indices for FD_XXX network events
+//
+
+ FD_READ_BIT = 0;
+ {$EXTERNALSYM FD_READ_BIT}
+ FD_READ = 1 shl FD_READ_BIT;
+ {$EXTERNALSYM FD_READ}
+
+ FD_WRITE_BIT = 1;
+ {$EXTERNALSYM FD_WRITE_BIT}
+ FD_WRITE = 1 shl FD_WRITE_BIT;
+ {$EXTERNALSYM FD_WRITE}
+
+ FD_OOB_BIT = 2;
+ {$EXTERNALSYM FD_OOB_BIT}
+ FD_OOB = 1 shl FD_OOB_BIT;
+ {$EXTERNALSYM FD_OOB}
+
+ FD_ACCEPT_BIT = 3;
+ {$EXTERNALSYM FD_ACCEPT_BIT}
+ FD_ACCEPT = 1 shl FD_ACCEPT_BIT;
+ {$EXTERNALSYM FD_ACCEPT}
+
+ FD_CONNECT_BIT = 4;
+ {$EXTERNALSYM FD_CONNECT_BIT}
+ FD_CONNECT = 1 shl FD_CONNECT_BIT;
+ {$EXTERNALSYM FD_CONNECT}
+
+ FD_CLOSE_BIT = 5;
+ {$EXTERNALSYM FD_CLOSE_BIT}
+ FD_CLOSE = 1 shl FD_CLOSE_BIT;
+ {$EXTERNALSYM FD_CLOSE}
+
+ FD_QOS_BIT = 6;
+ {$EXTERNALSYM FD_QOS_BIT}
+ FD_QOS = 1 shl FD_QOS_BIT;
+ {$EXTERNALSYM FD_QOS}
+
+ FD_GROUP_QOS_BIT = 7;
+ {$EXTERNALSYM FD_GROUP_QOS_BIT}
+ FD_GROUP_QOS = 1 shl FD_GROUP_QOS_BIT;
+ {$EXTERNALSYM FD_GROUP_QOS}
+
+ FD_ROUTING_INTERFACE_CHANGE_BIT = 8;
+ {$EXTERNALSYM FD_ROUTING_INTERFACE_CHANGE_BIT}
+ FD_ROUTING_INTERFACE_CHANGE = 1 shl FD_ROUTING_INTERFACE_CHANGE_BIT;
+ {$EXTERNALSYM FD_ROUTING_INTERFACE_CHANGE}
+
+ FD_ADDRESS_LIST_CHANGE_BIT = 9;
+ {$EXTERNALSYM FD_ADDRESS_LIST_CHANGE_BIT}
+ FD_ADDRESS_LIST_CHANGE = 1 shl FD_ADDRESS_LIST_CHANGE_BIT;
+ {$EXTERNALSYM FD_ADDRESS_LIST_CHANGE}
+
+ FD_MAX_EVENTS = 10;
+ {$EXTERNALSYM FD_MAX_EVENTS}
+ FD_ALL_EVENTS = (1 shl FD_MAX_EVENTS) - 1;
+ {$EXTERNALSYM FD_ALL_EVENTS}
+
+//
+// All Windows Sockets error constants are biased by WSABASEERR from
+// the "normal"
+//
+
+ WSABASEERR = 10000;
+ {$EXTERNALSYM WSABASEERR}
+
+//
+// Windows Sockets definitions of regular Microsoft C error constants
+//
+
+ WSAEINTR = WSABASEERR + 4;
+ {$EXTERNALSYM WSAEINTR}
+ WSAEBADF = WSABASEERR + 9;
+ {$EXTERNALSYM WSAEBADF}
+ WSAEACCES = WSABASEERR + 13;
+ {$EXTERNALSYM WSAEACCES}
+ WSAEFAULT = WSABASEERR + 14;
+ {$EXTERNALSYM WSAEFAULT}
+ WSAEINVAL = WSABASEERR + 22;
+ {$EXTERNALSYM WSAEINVAL}
+ WSAEMFILE = WSABASEERR + 24;
+ {$EXTERNALSYM WSAEMFILE}
+
+//
+// Windows Sockets definitions of regular Berkeley error constants
+//
+
+ WSAEWOULDBLOCK = WSABASEERR + 35;
+ {$EXTERNALSYM WSAEWOULDBLOCK}
+ WSAEINPROGRESS = WSABASEERR + 36;
+ {$EXTERNALSYM WSAEINPROGRESS}
+ WSAEALREADY = WSABASEERR + 37;
+ {$EXTERNALSYM WSAEALREADY}
+ WSAENOTSOCK = WSABASEERR + 38;
+ {$EXTERNALSYM WSAENOTSOCK}
+ WSAEDESTADDRREQ = WSABASEERR + 39;
+ {$EXTERNALSYM WSAEDESTADDRREQ}
+ WSAEMSGSIZE = WSABASEERR + 40;
+ {$EXTERNALSYM WSAEMSGSIZE}
+ WSAEPROTOTYPE = WSABASEERR + 41;
+ {$EXTERNALSYM WSAEPROTOTYPE}
+ WSAENOPROTOOPT = WSABASEERR + 42;
+ {$EXTERNALSYM WSAENOPROTOOPT}
+ WSAEPROTONOSUPPORT = WSABASEERR + 43;
+ {$EXTERNALSYM WSAEPROTONOSUPPORT}
+ WSAESOCKTNOSUPPORT = WSABASEERR + 44;
+ {$EXTERNALSYM WSAESOCKTNOSUPPORT}
+ WSAEOPNOTSUPP = WSABASEERR + 45;
+ {$EXTERNALSYM WSAEOPNOTSUPP}
+ WSAEPFNOSUPPORT = WSABASEERR + 46;
+ {$EXTERNALSYM WSAEPFNOSUPPORT}
+ WSAEAFNOSUPPORT = WSABASEERR + 47;
+ {$EXTERNALSYM WSAEAFNOSUPPORT}
+ WSAEADDRINUSE = WSABASEERR + 48;
+ {$EXTERNALSYM WSAEADDRINUSE}
+ WSAEADDRNOTAVAIL = WSABASEERR + 49;
+ {$EXTERNALSYM WSAEADDRNOTAVAIL}
+ WSAENETDOWN = WSABASEERR + 50;
+ {$EXTERNALSYM WSAENETDOWN}
+ WSAENETUNREACH = WSABASEERR + 51;
+ {$EXTERNALSYM WSAENETUNREACH}
+ WSAENETRESET = WSABASEERR + 52;
+ {$EXTERNALSYM WSAENETRESET}
+ WSAECONNABORTED = WSABASEERR + 53;
+ {$EXTERNALSYM WSAECONNABORTED}
+ WSAECONNRESET = WSABASEERR + 54;
+ {$EXTERNALSYM WSAECONNRESET}
+ WSAENOBUFS = WSABASEERR + 55;
+ {$EXTERNALSYM WSAENOBUFS}
+ WSAEISCONN = WSABASEERR + 56;
+ {$EXTERNALSYM WSAEISCONN}
+ WSAENOTCONN = WSABASEERR + 57;
+ {$EXTERNALSYM WSAENOTCONN}
+ WSAESHUTDOWN = WSABASEERR + 58;
+ {$EXTERNALSYM WSAESHUTDOWN}
+ WSAETOOMANYREFS = WSABASEERR + 59;
+ {$EXTERNALSYM WSAETOOMANYREFS}
+ WSAETIMEDOUT = WSABASEERR + 60;
+ {$EXTERNALSYM WSAETIMEDOUT}
+ WSAECONNREFUSED = WSABASEERR + 61;
+ {$EXTERNALSYM WSAECONNREFUSED}
+ WSAELOOP = WSABASEERR + 62;
+ {$EXTERNALSYM WSAELOOP}
+ WSAENAMETOOLONG = WSABASEERR + 63;
+ {$EXTERNALSYM WSAENAMETOOLONG}
+ WSAEHOSTDOWN = WSABASEERR + 64;
+ {$EXTERNALSYM WSAEHOSTDOWN}
+ WSAEHOSTUNREACH = WSABASEERR + 65;
+ {$EXTERNALSYM WSAEHOSTUNREACH}
+ WSAENOTEMPTY = WSABASEERR + 66;
+ {$EXTERNALSYM WSAENOTEMPTY}
+ WSAEPROCLIM = WSABASEERR + 67;
+ {$EXTERNALSYM WSAEPROCLIM}
+ WSAEUSERS = WSABASEERR + 68;
+ {$EXTERNALSYM WSAEUSERS}
+ WSAEDQUOT = WSABASEERR + 69;
+ {$EXTERNALSYM WSAEDQUOT}
+ WSAESTALE = WSABASEERR + 70;
+ {$EXTERNALSYM WSAESTALE}
+ WSAEREMOTE = WSABASEERR + 71;
+ {$EXTERNALSYM WSAEREMOTE}
+
+//
+// Extended Windows Sockets error constant definitions
+//
+
+ WSASYSNOTREADY = WSABASEERR + 91;
+ {$EXTERNALSYM WSASYSNOTREADY}
+ WSAVERNOTSUPPORTED = WSABASEERR + 92;
+ {$EXTERNALSYM WSAVERNOTSUPPORTED}
+ WSANOTINITIALISED = WSABASEERR + 93;
+ {$EXTERNALSYM WSANOTINITIALISED}
+ WSAEDISCON = WSABASEERR + 101;
+ {$EXTERNALSYM WSAEDISCON}
+ WSAENOMORE = WSABASEERR + 102;
+ {$EXTERNALSYM WSAENOMORE}
+ WSAECANCELLED = WSABASEERR + 103;
+ {$EXTERNALSYM WSAECANCELLED}
+ WSAEINVALIDPROCTABLE = WSABASEERR + 104;
+ {$EXTERNALSYM WSAEINVALIDPROCTABLE}
+ WSAEINVALIDPROVIDER = WSABASEERR + 105;
+ {$EXTERNALSYM WSAEINVALIDPROVIDER}
+ WSAEPROVIDERFAILEDINIT = WSABASEERR + 106;
+ {$EXTERNALSYM WSAEPROVIDERFAILEDINIT}
+ WSASYSCALLFAILURE = WSABASEERR + 107;
+ {$EXTERNALSYM WSASYSCALLFAILURE}
+ WSASERVICE_NOT_FOUND = WSABASEERR + 108;
+ {$EXTERNALSYM WSASERVICE_NOT_FOUND}
+ WSATYPE_NOT_FOUND = WSABASEERR + 109;
+ {$EXTERNALSYM WSATYPE_NOT_FOUND}
+ WSA_E_NO_MORE = WSABASEERR + 110;
+ {$EXTERNALSYM WSA_E_NO_MORE}
+ WSA_E_CANCELLED = WSABASEERR + 111;
+ {$EXTERNALSYM WSA_E_CANCELLED}
+ WSAEREFUSED = WSABASEERR + 112;
+ {$EXTERNALSYM WSAEREFUSED}
+
+//
+// Error return codes from gethostbyname() and gethostbyaddr()
+// (when using the resolver). Note that these errors are
+// retrieved via WSAGetLastError() and must therefore follow
+// the rules for avoiding clashes with error numbers from
+// specific implementations or language run-time systems.
+// For this reason the codes are based at WSABASEERR+1001.
+// Note also that [WSA]NO_ADDRESS is defined only for
+// compatibility purposes.
+//
+
+// Authoritative Answer: Host not found
+
+ WSAHOST_NOT_FOUND = WSABASEERR + 1001;
+ {$EXTERNALSYM WSAHOST_NOT_FOUND}
+
+// Non-Authoritative: Host not found, or SERVERFAIL
+
+ WSATRY_AGAIN = WSABASEERR + 1002;
+ {$EXTERNALSYM WSATRY_AGAIN}
+
+// Non-recoverable errors, FORMERR, REFUSED, NOTIMP
+
+ WSANO_RECOVERY = WSABASEERR + 1003;
+ {$EXTERNALSYM WSANO_RECOVERY}
+
+// Valid name, no data record of requested type
+
+ WSANO_DATA = WSABASEERR + 1004;
+ {$EXTERNALSYM WSANO_DATA}
+
+//
+// Define QOS related error return codes
+//
+//
+
+ WSA_QOS_RECEIVERS = WSABASEERR + 1005; // at least one Reserve has arrived
+ {$EXTERNALSYM WSA_QOS_RECEIVERS}
+ WSA_QOS_SENDERS = WSABASEERR + 1006; // at least one Path has arrived
+ {$EXTERNALSYM WSA_QOS_SENDERS}
+ WSA_QOS_NO_SENDERS = WSABASEERR + 1007; // there are no senders
+ {$EXTERNALSYM WSA_QOS_NO_SENDERS}
+ WSA_QOS_NO_RECEIVERS = WSABASEERR + 1008; // there are no receivers
+ {$EXTERNALSYM WSA_QOS_NO_RECEIVERS}
+ WSA_QOS_REQUEST_CONFIRMED = WSABASEERR + 1009; // Reserve has been confirmed
+ {$EXTERNALSYM WSA_QOS_REQUEST_CONFIRMED}
+ WSA_QOS_ADMISSION_FAILURE = WSABASEERR + 1010; // error due to lack of resources
+ {$EXTERNALSYM WSA_QOS_ADMISSION_FAILURE}
+ WSA_QOS_POLICY_FAILURE = WSABASEERR + 1011; // rejected for administrative reasons - bad credentials
+ {$EXTERNALSYM WSA_QOS_POLICY_FAILURE}
+ WSA_QOS_BAD_STYLE = WSABASEERR + 1012; // unknown or conflicting style
+ {$EXTERNALSYM WSA_QOS_BAD_STYLE}
+ WSA_QOS_BAD_OBJECT = WSABASEERR + 1013; // problem with some part of the filterspec or providerspecific buffer in general
+ {$EXTERNALSYM WSA_QOS_BAD_OBJECT}
+ WSA_QOS_TRAFFIC_CTRL_ERROR = WSABASEERR + 1014; // problem with some part of the flowspec
+ {$EXTERNALSYM WSA_QOS_TRAFFIC_CTRL_ERROR}
+ WSA_QOS_GENERIC_ERROR = WSABASEERR + 1015; // general error
+ {$EXTERNALSYM WSA_QOS_GENERIC_ERROR}
+ WSA_QOS_ESERVICETYPE = WSABASEERR + 1016; // invalid service type in flowspec
+ {$EXTERNALSYM WSA_QOS_ESERVICETYPE}
+ WSA_QOS_EFLOWSPEC = WSABASEERR + 1017; // invalid flowspec
+ {$EXTERNALSYM WSA_QOS_EFLOWSPEC}
+ WSA_QOS_EPROVSPECBUF = WSABASEERR + 1018; // invalid provider specific buffer
+ {$EXTERNALSYM WSA_QOS_EPROVSPECBUF}
+ WSA_QOS_EFILTERSTYLE = WSABASEERR + 1019; // invalid filter style
+ {$EXTERNALSYM WSA_QOS_EFILTERSTYLE}
+ WSA_QOS_EFILTERTYPE = WSABASEERR + 1020; // invalid filter type
+ {$EXTERNALSYM WSA_QOS_EFILTERTYPE}
+ WSA_QOS_EFILTERCOUNT = WSABASEERR + 1021; // incorrect number of filters
+ {$EXTERNALSYM WSA_QOS_EFILTERCOUNT}
+ WSA_QOS_EOBJLENGTH = WSABASEERR + 1022; // invalid object length
+ {$EXTERNALSYM WSA_QOS_EOBJLENGTH}
+ WSA_QOS_EFLOWCOUNT = WSABASEERR + 1023; // incorrect number of flows
+ {$EXTERNALSYM WSA_QOS_EFLOWCOUNT}
+ WSA_QOS_EUNKOWNPSOBJ = WSABASEERR + 1024; // unknown object in provider specific buffer
+ {$EXTERNALSYM WSA_QOS_EUNKOWNPSOBJ}
+ WSA_QOS_EPOLICYOBJ = WSABASEERR + 1025; // invalid policy object in provider specific buffer
+ {$EXTERNALSYM WSA_QOS_EPOLICYOBJ}
+ WSA_QOS_EFLOWDESC = WSABASEERR + 1026; // invalid flow descriptor in the list
+ {$EXTERNALSYM WSA_QOS_EFLOWDESC}
+ WSA_QOS_EPSFLOWSPEC = WSABASEERR + 1027; // inconsistent flow spec in provider specific buffer
+ {$EXTERNALSYM WSA_QOS_EPSFLOWSPEC}
+ WSA_QOS_EPSFILTERSPEC = WSABASEERR + 1028; // invalid filter spec in provider specific buffer
+ {$EXTERNALSYM WSA_QOS_EPSFILTERSPEC}
+ WSA_QOS_ESDMODEOBJ = WSABASEERR + 1029; // invalid shape discard mode object in provider specific buffer
+ {$EXTERNALSYM WSA_QOS_ESDMODEOBJ}
+ WSA_QOS_ESHAPERATEOBJ = WSABASEERR + 1030; // invalid shaping rate object in provider specific buffer
+ {$EXTERNALSYM WSA_QOS_ESHAPERATEOBJ}
+ WSA_QOS_RESERVED_PETYPE = WSABASEERR + 1031; // reserved policy element in provider specific buffer
+ {$EXTERNALSYM WSA_QOS_RESERVED_PETYPE}
+
+//
+// Compatibility macros.
+//
+
+function h_errno: Integer;
+{$EXTERNALSYM h_errno}
+
+const
+ HOST_NOT_FOUND = WSAHOST_NOT_FOUND;
+ {$EXTERNALSYM HOST_NOT_FOUND}
+ TRY_AGAIN = WSATRY_AGAIN;
+ {$EXTERNALSYM TRY_AGAIN}
+ NO_RECOVERY = WSANO_RECOVERY;
+ {$EXTERNALSYM NO_RECOVERY}
+ NO_DATA = WSANO_DATA;
+ {$EXTERNALSYM NO_DATA}
+
+// no address, look for MX record
+
+ WSANO_ADDRESS = WSANO_DATA;
+ {$EXTERNALSYM WSANO_ADDRESS}
+ NO_ADDRESS = WSANO_ADDRESS;
+ {$EXTERNALSYM NO_ADDRESS}
+
+//
+// Windows Sockets errors redefined as regular Berkeley error constants.
+// These are commented out in Windows NT to avoid conflicts with errno.h.
+// Use the WSA constants instead.
+//
+
+{$IFDEF FALSE}
+
+const
+ EWOULDBLOCK = WSAEWOULDBLOCK;
+ {$EXTERNALSYM EWOULDBLOCK}
+ EINPROGRESS = WSAEINPROGRESS;
+ {$EXTERNALSYM EINPROGRESS}
+ EALREADY = WSAEALREADY;
+ {$EXTERNALSYM EALREADY}
+ ENOTSOCK = WSAENOTSOCK;
+ {$EXTERNALSYM ENOTSOCK}
+ EDESTADDRREQ = WSAEDESTADDRREQ;
+ {$EXTERNALSYM EDESTADDRREQ}
+ EMSGSIZE = WSAEMSGSIZE;
+ {$EXTERNALSYM EMSGSIZE}
+ EPROTOTYPE = WSAEPROTOTYPE;
+ {$EXTERNALSYM EPROTOTYPE}
+ ENOPROTOOPT = WSAENOPROTOOPT;
+ {$EXTERNALSYM ENOPROTOOPT}
+ EPROTONOSUPPORT = WSAEPROTONOSUPPORT;
+ {$EXTERNALSYM EPROTONOSUPPORT}
+ ESOCKTNOSUPPORT = WSAESOCKTNOSUPPORT;
+ {$EXTERNALSYM ESOCKTNOSUPPORT}
+ EOPNOTSUPP = WSAEOPNOTSUPP;
+ {$EXTERNALSYM EOPNOTSUPP}
+ EPFNOSUPPORT = WSAEPFNOSUPPORT;
+ {$EXTERNALSYM EPFNOSUPPORT}
+ EAFNOSUPPORT = WSAEAFNOSUPPORT;
+ {$EXTERNALSYM EAFNOSUPPORT}
+ EADDRINUSE = WSAEADDRINUSE;
+ {$EXTERNALSYM EADDRINUSE}
+ EADDRNOTAVAIL = WSAEADDRNOTAVAIL;
+ {$EXTERNALSYM EADDRNOTAVAIL}
+ ENETDOWN = WSAENETDOWN;
+ {$EXTERNALSYM ENETDOWN}
+ ENETUNREACH = WSAENETUNREACH;
+ {$EXTERNALSYM ENETUNREACH}
+ ENETRESET = WSAENETRESET;
+ {$EXTERNALSYM ENETRESET}
+ ECONNABORTED = WSAECONNABORTED;
+ {$EXTERNALSYM ECONNABORTED}
+ ECONNRESET = WSAECONNRESET;
+ {$EXTERNALSYM ECONNRESET}
+ ENOBUFS = WSAENOBUFS;
+ {$EXTERNALSYM ENOBUFS}
+ EISCONN = WSAEISCONN;
+ {$EXTERNALSYM EISCONN}
+ ENOTCONN = WSAENOTCONN;
+ {$EXTERNALSYM ENOTCONN}
+ ESHUTDOWN = WSAESHUTDOWN;
+ {$EXTERNALSYM ESHUTDOWN}
+ ETOOMANYREFS = WSAETOOMANYREFS;
+ {$EXTERNALSYM ETOOMANYREFS}
+ ETIMEDOUT = WSAETIMEDOUT;
+ {$EXTERNALSYM ETIMEDOUT}
+ ECONNREFUSED = WSAECONNREFUSED;
+ {$EXTERNALSYM ECONNREFUSED}
+ ELOOP = WSAELOOP;
+ {$EXTERNALSYM ELOOP}
+ ENAMETOOLONG = WSAENAMETOOLONG;
+ {$EXTERNALSYM ENAMETOOLONG}
+ EHOSTDOWN = WSAEHOSTDOWN;
+ {$EXTERNALSYM EHOSTDOWN}
+ EHOSTUNREACH = WSAEHOSTUNREACH;
+ {$EXTERNALSYM EHOSTUNREACH}
+ ENOTEMPTY = WSAENOTEMPTY;
+ {$EXTERNALSYM ENOTEMPTY}
+ EPROCLIM = WSAEPROCLIM;
+ {$EXTERNALSYM EPROCLIM}
+ EUSERS = WSAEUSERS;
+ {$EXTERNALSYM EUSERS}
+ EDQUOT = WSAEDQUOT;
+ {$EXTERNALSYM EDQUOT}
+ ESTALE = WSAESTALE;
+ {$EXTERNALSYM ESTALE}
+ EREMOTE = WSAEREMOTE;
+ {$EXTERNALSYM EREMOTE}
+
+{$ENDIF FALSE}
+
+//
+// WinSock 2 extension -- new error codes and type definition
+//
+
+type
+ WSAEVENT = HANDLE;
+ {$EXTERNALSYM WSAEVENT}
+ LPWSAEVENT = LPHANDLE;
+ {$EXTERNALSYM LPWSAEVENT}
+ WSAOVERLAPPED = OVERLAPPED;
+ {$EXTERNALSYM WSAOVERLAPPED}
+ LPWSAOVERLAPPED = ^OVERLAPPED;
+ {$EXTERNALSYM LPWSAOVERLAPPED}
+ TWsaEvent = WSAEVENT;
+ PWsaEvent = LPWSAEVENT;
+ TWsaOverlapped = WSAOVERLAPPED;
+ PWsaOverlapped = LPWSAOVERLAPPED;
+
+const
+ WSA_IO_PENDING = ERROR_IO_PENDING;
+ {$EXTERNALSYM WSA_IO_PENDING}
+ WSA_IO_INCOMPLETE = ERROR_IO_INCOMPLETE;
+ {$EXTERNALSYM WSA_IO_INCOMPLETE}
+ WSA_INVALID_HANDLE = ERROR_INVALID_HANDLE;
+ {$EXTERNALSYM WSA_INVALID_HANDLE}
+ WSA_INVALID_PARAMETER = ERROR_INVALID_PARAMETER;
+ {$EXTERNALSYM WSA_INVALID_PARAMETER}
+ WSA_NOT_ENOUGH_MEMORY = ERROR_NOT_ENOUGH_MEMORY;
+ {$EXTERNALSYM WSA_NOT_ENOUGH_MEMORY}
+ WSA_OPERATION_ABORTED = ERROR_OPERATION_ABORTED;
+ {$EXTERNALSYM WSA_OPERATION_ABORTED}
+
+ WSA_INVALID_EVENT = WSAEVENT(nil);
+ {$EXTERNALSYM WSA_INVALID_EVENT}
+ WSA_MAXIMUM_WAIT_EVENTS = MAXIMUM_WAIT_OBJECTS;
+ {$EXTERNALSYM WSA_MAXIMUM_WAIT_EVENTS}
+ WSA_WAIT_FAILED = WAIT_FAILED;
+ {$EXTERNALSYM WSA_WAIT_FAILED}
+ WSA_WAIT_EVENT_0 = WAIT_OBJECT_0;
+ {$EXTERNALSYM WSA_WAIT_EVENT_0}
+ WSA_WAIT_IO_COMPLETION = WAIT_IO_COMPLETION;
+ {$EXTERNALSYM WSA_WAIT_IO_COMPLETION}
+ WSA_WAIT_TIMEOUT = WAIT_TIMEOUT;
+ {$EXTERNALSYM WSA_WAIT_TIMEOUT}
+ WSA_INFINITE = INFINITE;
+ {$EXTERNALSYM WSA_INFINITE}
+
+//
+// WinSock 2 extension -- WSABUF and QOS struct, include qos.h
+// to pull in FLOWSPEC and related definitions
+//
+
+type
+ _WSABUF = record
+ len: u_long; // the length of the buffer
+ buf: PChar; // the pointer to the buffer
+ end;
+ {$EXTERNALSYM _WSABUF}
+ WSABUF = _WSABUF;
+ {$EXTERNALSYM WSABUF}
+ LPWSABUF = ^_WSABUF;
+ {$EXTERNALSYM LPWSABUF}
+ TWsaBuf = WSABUF;
+ PWsaBuf = LPWSABUF;
+
+ _QualityOfService = record
+ SendingFlowspec: FLOWSPEC; // the flow spec for data sending
+ ReceivingFlowspec: FLOWSPEC; // the flow spec for data receiving
+ ProviderSpecific: WSABUF; // additional provider specific stuff
+ end;
+ {$EXTERNALSYM _QualityOfService}
+ QOS = _QualityOfService;
+ {$EXTERNALSYM QOS}
+ LPQOS = ^_QualityOfService;
+ {$EXTERNALSYM LPQOS}
+ TQOS = QOS;
+ PQOS = LPQOS;
+
+//
+// WinSock 2 extension -- manifest constants for return values of the condition function
+//
+
+const
+ CF_ACCEPT = $0000;
+ {$EXTERNALSYM CF_ACCEPT}
+ CF_REJECT = $0001;
+ {$EXTERNALSYM CF_REJECT}
+ CF_DEFER = $0002;
+ {$EXTERNALSYM CF_DEFER}
+
+//
+// WinSock 2 extension -- manifest constants for shutdown()
+//
+
+ SD_RECEIVE = $00;
+ {$EXTERNALSYM SD_RECEIVE}
+ SD_SEND = $01;
+ {$EXTERNALSYM SD_SEND}
+ SD_BOTH = $02;
+ {$EXTERNALSYM SD_BOTH}
+
+//
+// WinSock 2 extension -- data type and manifest constants for socket groups
+//
+
+type
+ GROUP = Cardinal;
+ {$EXTERNALSYM GROUP}
+ TGroup = GROUP;
+ PGroup = ^GROUP;
+
+const
+ SG_UNCONSTRAINED_GROUP = $01;
+ {$EXTERNALSYM SG_UNCONSTRAINED_GROUP}
+ SG_CONSTRAINED_GROUP = $02;
+ {$EXTERNALSYM SG_CONSTRAINED_GROUP}
+
+//
+// WinSock 2 extension -- data type for WSAEnumNetworkEvents()
+//
+
+type
+ _WSANETWORKEVENTS = record
+ lNetworkEvents: Longint;
+ iErrorCode: array [0..FD_MAX_EVENTS - 1] of Integer;
+ end;
+ {$EXTERNALSYM _WSANETWORKEVENTS}
+ WSANETWORKEVENTS = _WSANETWORKEVENTS;
+ {$EXTERNALSYM WSANETWORKEVENTS}
+ LPWSANETWORKEVENTS = ^WSANETWORKEVENTS;
+ {$EXTERNALSYM LPWSANETWORKEVENTS}
+ TWsaNetworkEvents = WSANETWORKEVENTS;
+ PWsaNetworkEvents = LPWSANETWORKEVENTS;
+
+//
+// WinSock 2 extension -- WSAPROTOCOL_INFO structure and associated
+// manifest constants
+//
+
+const
+ MAX_PROTOCOL_CHAIN = 7;
+ {$EXTERNALSYM MAX_PROTOCOL_CHAIN}
+
+ BASE_PROTOCOL = 1;
+ {$EXTERNALSYM BASE_PROTOCOL}
+ LAYERED_PROTOCOL = 0;
+ {$EXTERNALSYM LAYERED_PROTOCOL}
+
+type
+ _WSAPROTOCOLCHAIN = record
+ ChainLen: Integer; // the length of the chain,
+ // length = 0 means layered protocol,
+ // length = 1 means base protocol,
+ // length > 1 means protocol chain
+ ChainEntries: array [0..MAX_PROTOCOL_CHAIN - 1] of DWORD; // a list of dwCatalogEntryIds
+ end;
+ {$EXTERNALSYM _WSAPROTOCOLCHAIN}
+ WSAPROTOCOLCHAIN = _WSAPROTOCOLCHAIN;
+ {$EXTERNALSYM WSAPROTOCOLCHAIN}
+ LPWSAPROTOCOLCHAIN = ^WSAPROTOCOLCHAIN;
+ {$EXTERNALSYM LPWSAPROTOCOLCHAIN}
+ TWsaProtocolChain = WSAPROTOCOLCHAIN;
+ PWsaProtocolChain = LPWSAPROTOCOLCHAIN;
+
+const
+ WSAPROTOCOL_LEN = 255;
+ {$EXTERNALSYM WSAPROTOCOL_LEN}
+
+type
+ _WSAPROTOCOL_INFOA = record
+ dwServiceFlags1: DWORD;
+ dwServiceFlags2: DWORD;
+ dwServiceFlags3: DWORD;
+ dwServiceFlags4: DWORD;
+ dwProviderFlags: DWORD;
+ ProviderId: TGUID;
+ dwCatalogEntryId: DWORD;
+ ProtocolChain: WSAPROTOCOLCHAIN;
+ iVersion: Integer;
+ iAddressFamily: Integer;
+ iMaxSockAddr: Integer;
+ iMinSockAddr: Integer;
+ iSocketType: Integer;
+ iProtocol: Integer;
+ iProtocolMaxOffset: Integer;
+ iNetworkByteOrder: Integer;
+ iSecurityScheme: Integer;
+ dwMessageSize: DWORD;
+ dwProviderReserved: DWORD;
+ szProtocol: array [0..WSAPROTOCOL_LEN] of Char;
+ end;
+ {$EXTERNALSYM _WSAPROTOCOL_INFOA}
+ WSAPROTOCOL_INFOA = _WSAPROTOCOL_INFOA;
+ {$EXTERNALSYM WSAPROTOCOL_INFOA}
+ LPWSAPROTOCOL_INFOA = ^WSAPROTOCOL_INFOA;
+ {$EXTERNALSYM LPWSAPROTOCOL_INFOA}
+ TWsaProtocolInfoA = WSAPROTOCOL_INFOA;
+ PWsaProtocolInfoA = LPWSAPROTOCOL_INFOA;
+
+ _WSAPROTOCOL_INFOW = record
+ dwServiceFlags1: DWORD;
+ dwServiceFlags2: DWORD;
+ dwServiceFlags3: DWORD;
+ dwServiceFlags4: DWORD;
+ dwProviderFlags: DWORD;
+ ProviderId: TGUID;
+ dwCatalogEntryId: DWORD;
+ ProtocolChain: WSAPROTOCOLCHAIN;
+ iVersion: Integer;
+ iAddressFamily: Integer;
+ iMaxSockAddr: Integer;
+ iMinSockAddr: Integer;
+ iSocketType: Integer;
+ iProtocol: Integer;
+ iProtocolMaxOffset: Integer;
+ iNetworkByteOrder: Integer;
+ iSecurityScheme: Integer;
+ dwMessageSize: DWORD;
+ dwProviderReserved: DWORD;
+ szProtocol: array [0..WSAPROTOCOL_LEN] of WideChar;
+ end;
+ {$EXTERNALSYM _WSAPROTOCOL_INFOW}
+ WSAPROTOCOL_INFOW = _WSAPROTOCOL_INFOW;
+ {$EXTERNALSYM WSAPROTOCOL_INFOW}
+ LPWSAPROTOCOL_INFOW = ^WSAPROTOCOL_INFOW;
+ {$EXTERNALSYM LPWSAPROTOCOL_INFOW}
+ TWsaProtocolInfoW = WSAPROTOCOL_INFOW;
+ PWsaProtocolInfoW = LPWSAPROTOCOL_INFOW;
+
+ {$IFDEF UNICODE}
+ WSAPROTOCOL_INFO = WSAPROTOCOL_INFOW;
+ {$EXTERNALSYM WSAPROTOCOL_INFO}
+ LPWSAPROTOCOL_INFO = LPWSAPROTOCOL_INFOW;
+ {$EXTERNALSYM LPWSAPROTOCOL_INFO}
+ TWsaProtocolInfo = TWsaProtocolInfoW;
+ PWsaProtocolInfo = PWsaProtocolInfoW;
+ {$ELSE}
+ WSAPROTOCOL_INFO = WSAPROTOCOL_INFOA;
+ {$EXTERNALSYM WSAPROTOCOL_INFO}
+ LPWSAPROTOCOL_INFO = LPWSAPROTOCOL_INFOA;
+ {$EXTERNALSYM LPWSAPROTOCOL_INFO}
+ TWsaProtocolInfo = TWsaProtocolInfoA;
+ PWsaProtocolInfo = PWsaProtocolInfoA;
+ {$ENDIF UNICODE}
+
+// Flag bit definitions for dwProviderFlags
+
+const
+ PFL_MULTIPLE_PROTO_ENTRIES = $00000001;
+ {$EXTERNALSYM PFL_MULTIPLE_PROTO_ENTRIES}
+ PFL_RECOMMENDED_PROTO_ENTRY = $00000002;
+ {$EXTERNALSYM PFL_RECOMMENDED_PROTO_ENTRY}
+ PFL_HIDDEN = $00000004;
+ {$EXTERNALSYM PFL_HIDDEN}
+ PFL_MATCHES_PROTOCOL_ZERO = $00000008;
+ {$EXTERNALSYM PFL_MATCHES_PROTOCOL_ZERO}
+
+// Flag bit definitions for dwServiceFlags1
+
+ XP1_CONNECTIONLESS = $00000001;
+ {$EXTERNALSYM XP1_CONNECTIONLESS}
+ XP1_GUARANTEED_DELIVERY = $00000002;
+ {$EXTERNALSYM XP1_GUARANTEED_DELIVERY}
+ XP1_GUARANTEED_ORDER = $00000004;
+ {$EXTERNALSYM XP1_GUARANTEED_ORDER}
+ XP1_MESSAGE_ORIENTED = $00000008;
+ {$EXTERNALSYM XP1_MESSAGE_ORIENTED}
+ XP1_PSEUDO_STREAM = $00000010;
+ {$EXTERNALSYM XP1_PSEUDO_STREAM}
+ XP1_GRACEFUL_CLOSE = $00000020;
+ {$EXTERNALSYM XP1_GRACEFUL_CLOSE}
+ XP1_EXPEDITED_DATA = $00000040;
+ {$EXTERNALSYM XP1_EXPEDITED_DATA}
+ XP1_CONNECT_DATA = $00000080;
+ {$EXTERNALSYM XP1_CONNECT_DATA}
+ XP1_DISCONNECT_DATA = $00000100;
+ {$EXTERNALSYM XP1_DISCONNECT_DATA}
+ XP1_SUPPORT_BROADCAST = $00000200;
+ {$EXTERNALSYM XP1_SUPPORT_BROADCAST}
+ XP1_SUPPORT_MULTIPOINT = $00000400;
+ {$EXTERNALSYM XP1_SUPPORT_MULTIPOINT}
+ XP1_MULTIPOINT_CONTROL_PLANE = $00000800;
+ {$EXTERNALSYM XP1_MULTIPOINT_CONTROL_PLANE}
+ XP1_MULTIPOINT_DATA_PLANE = $00001000;
+ {$EXTERNALSYM XP1_MULTIPOINT_DATA_PLANE}
+ XP1_QOS_SUPPORTED = $00002000;
+ {$EXTERNALSYM XP1_QOS_SUPPORTED}
+ XP1_INTERRUPT = $00004000;
+ {$EXTERNALSYM XP1_INTERRUPT}
+ XP1_UNI_SEND = $00008000;
+ {$EXTERNALSYM XP1_UNI_SEND}
+ XP1_UNI_RECV = $00010000;
+ {$EXTERNALSYM XP1_UNI_RECV}
+ XP1_IFS_HANDLES = $00020000;
+ {$EXTERNALSYM XP1_IFS_HANDLES}
+ XP1_PARTIAL_MESSAGE = $00040000;
+ {$EXTERNALSYM XP1_PARTIAL_MESSAGE}
+
+ BIGENDIAN = $0000;
+ {$EXTERNALSYM BIGENDIAN}
+ LITTLEENDIAN = $0001;
+ {$EXTERNALSYM LITTLEENDIAN}
+
+ SECURITY_PROTOCOL_NONE = $0000;
+ {$EXTERNALSYM SECURITY_PROTOCOL_NONE}
+
+//
+// WinSock 2 extension -- manifest constants for WSAJoinLeaf()
+//
+
+ JL_SENDER_ONLY = $01;
+ {$EXTERNALSYM JL_SENDER_ONLY}
+ JL_RECEIVER_ONLY = $02;
+ {$EXTERNALSYM JL_RECEIVER_ONLY}
+ JL_BOTH = $04;
+ {$EXTERNALSYM JL_BOTH}
+
+//
+// WinSock 2 extension -- manifest constants for WSASocket()
+//
+
+ WSA_FLAG_OVERLAPPED = $01;
+ {$EXTERNALSYM WSA_FLAG_OVERLAPPED}
+ WSA_FLAG_MULTIPOINT_C_ROOT = $02;
+ {$EXTERNALSYM WSA_FLAG_MULTIPOINT_C_ROOT}
+ WSA_FLAG_MULTIPOINT_C_LEAF = $04;
+ {$EXTERNALSYM WSA_FLAG_MULTIPOINT_C_LEAF}
+ WSA_FLAG_MULTIPOINT_D_ROOT = $08;
+ {$EXTERNALSYM WSA_FLAG_MULTIPOINT_D_ROOT}
+ WSA_FLAG_MULTIPOINT_D_LEAF = $10;
+ {$EXTERNALSYM WSA_FLAG_MULTIPOINT_D_LEAF}
+
+//
+// WinSock 2 extension -- manifest constants for WSAIoctl()
+//
+
+ IOC_UNIX = $00000000;
+ {$EXTERNALSYM IOC_UNIX}
+ IOC_WS2 = $08000000;
+ {$EXTERNALSYM IOC_WS2}
+ IOC_PROTOCOL = $10000000;
+ {$EXTERNALSYM IOC_PROTOCOL}
+ IOC_VENDOR = $18000000;
+ {$EXTERNALSYM IOC_VENDOR}
+
+function _WSAIO(x, y: DWORD): DWORD;
+{$EXTERNALSYM _WSAIO}
+
+function _WSAIOR(x, y: DWORD): DWORD;
+{$EXTERNALSYM _WSAIOR}
+
+function _WSAIOW(x, y: DWORD): DWORD;
+{$EXTERNALSYM _WSAIOW}
+
+function _WSAIORW(x, y: DWORD): DWORD;
+{$EXTERNALSYM _WSAIORW}
+
+const
+ SIO_ASSOCIATE_HANDLE = IOC_INOUT or IOC_WS2 or 1;
+ {$EXTERNALSYM SIO_ASSOCIATE_HANDLE}
+ SIO_ENABLE_CIRCULAR_QUEUEING = IOC_VOID or IOC_WS2 or 2;
+ {$EXTERNALSYM SIO_ENABLE_CIRCULAR_QUEUEING}
+ SIO_FIND_ROUTE = IOC_OUT or IOC_WS2 or 3;
+ {$EXTERNALSYM SIO_FIND_ROUTE}
+ SIO_FLUSH = IOC_VOID or IOC_WS2 or 4;
+ {$EXTERNALSYM SIO_FLUSH}
+ SIO_GET_BROADCAST_ADDRESS = IOC_OUT or IOC_WS2 or 5;
+ {$EXTERNALSYM SIO_GET_BROADCAST_ADDRESS}
+ SIO_GET_EXTENSION_FUNCTION_POINTER = IOC_INOUT or IOC_WS2 or 6;
+ {$EXTERNALSYM SIO_GET_EXTENSION_FUNCTION_POINTER}
+ SIO_GET_QOS = IOC_INOUT or IOC_WS2 or 7;
+ {$EXTERNALSYM SIO_GET_QOS}
+ SIO_GET_GROUP_QOS = IOC_INOUT or IOC_WS2 or 8;
+ {$EXTERNALSYM SIO_GET_GROUP_QOS}
+ SIO_MULTIPOINT_LOOPBACK = IOC_INOUT or IOC_WS2 or 9;
+ {$EXTERNALSYM SIO_MULTIPOINT_LOOPBACK}
+ SIO_MULTICAST_SCOPE = IOC_INOUT or IOC_WS2 or 10;
+ {$EXTERNALSYM SIO_MULTICAST_SCOPE}
+ SIO_SET_QOS = IOC_INOUT or IOC_WS2 or 11;
+ {$EXTERNALSYM SIO_SET_QOS}
+ SIO_SET_GROUP_QOS = IOC_INOUT or IOC_WS2 or 12;
+ {$EXTERNALSYM SIO_SET_GROUP_QOS}
+ SIO_TRANSLATE_HANDLE = IOC_INOUT or IOC_WS2 or 13;
+ {$EXTERNALSYM SIO_TRANSLATE_HANDLE}
+ SIO_ROUTING_INTERFACE_QUERY = IOC_INOUT or IOC_WS2 or 20;
+ {$EXTERNALSYM SIO_ROUTING_INTERFACE_QUERY}
+ SIO_ROUTING_INTERFACE_CHANGE = IOC_INOUT or IOC_WS2 or 21;
+ {$EXTERNALSYM SIO_ROUTING_INTERFACE_CHANGE}
+ SIO_ADDRESS_LIST_QUERY = IOC_OUT or IOC_WS2 or 22;
+ {$EXTERNALSYM SIO_ADDRESS_LIST_QUERY}
+ SIO_ADDRESS_LIST_CHANGE = IOC_VOID or IOC_WS2 or 23;
+ {$EXTERNALSYM SIO_ADDRESS_LIST_CHANGE}
+ SIO_QUERY_TARGET_PNP_HANDLE = IOC_OUT or IOC_WS2 or 24;
+ {$EXTERNALSYM SIO_QUERY_TARGET_PNP_HANDLE}
+
+ SIO_ADDRESS_LIST_SORT = IOC_INOUT or IOC_WS2 or 25;
+ {$EXTERNALSYM SIO_ADDRESS_LIST_SORT}
+
+//
+// WinSock 2 extensions -- data types for the condition function in
+// WSAAccept() and overlapped I/O completion routine.
+//
+
+type
+ LPCONDITIONPROC = function(lpCallerId, lpCallerData: LPWSABUF; lpSQOS, lpGQOS: LPQOS; lpCalleeId, lpCalleeData: LPWSABUF;
+ g: PGROUP; dwCallbackData: DWORD_PTR): Integer; stdcall;
+ {$EXTERNALSYM LPCONDITIONPROC}
+
+ LPWSAOVERLAPPED_COMPLETION_ROUTINE = procedure(dwError, cbTransferred: DWORD; lpOverlapped: LPWSAOVERLAPPED; dwFlags: DWORD); stdcall;
+ {$EXTERNALSYM LPWSAOVERLAPPED_COMPLETION_ROUTINE}
+
+//
+// WinSock 2 extension -- manifest constants and associated structures
+// for WSANSPIoctl()
+//
+
+const
+ SIO_NSP_NOTIFY_CHANGE = IOC_IN or IOC_WS2 or 25;
+ {$EXTERNALSYM SIO_NSP_NOTIFY_CHANGE}
+
+type
+ _WSACOMPLETIONTYPE = (
+ NSP_NOTIFY_IMMEDIATELY,
+ NSP_NOTIFY_HWND,
+ NSP_NOTIFY_EVENT,
+ NSP_NOTIFY_PORT,
+ NSP_NOTIFY_APC);
+ {$EXTERNALSYM _WSACOMPLETIONTYPE}
+ WSACOMPLETIONTYPE = _WSACOMPLETIONTYPE;
+ {$EXTERNALSYM WSACOMPLETIONTYPE}
+ PWSACOMPLETIONTYPE = ^WSACOMPLETIONTYPE;
+ {$EXTERNALSYM PWSACOMPLETIONTYPE}
+ LPWSACOMPLETIONTYPE = ^WSACOMPLETIONTYPE;
+ {$EXTERNALSYM LPWSACOMPLETIONTYPE}
+ TWsaCompletionType = WSACOMPLETIONTYPE;
+
+ _WSACOMPLETION = record
+ Type_: WSACOMPLETIONTYPE;
+ case Integer of // Parameters
+ 0: ( // WindowMessage
+ hWnd: HWND;
+ uMsg: UINT;
+ context: WPARAM);
+ (* TODO
+ 1: ( // Event
+ lpOverlapped: LPWSAOVERLAPPED);
+ 2: ( // Apc
+ lpOverlapped: LPWSAOVERLAPPED;
+ lpfnCompletionProc: LPWSAOVERLAPPED_COMPLETION_ROUTINE);
+ *)
+ 3: ( // Port
+ lpOverlapped: LPWSAOVERLAPPED;
+ hPort: HANDLE;
+ Key: ULONG_PTR);
+ end;
+ {$EXTERNALSYM _WSACOMPLETION}
+ WSACOMPLETION = _WSACOMPLETION;
+ {$EXTERNALSYM WSACOMPLETION}
+ PWSACOMPLETION = ^WSACOMPLETION;
+ {$EXTERNALSYM PWSACOMPLETION}
+ LPWSACOMPLETION = ^WSACOMPLETION;
+ {$EXTERNALSYM LPWSACOMPLETION}
+ TWsaCompletion = WSACOMPLETION;
+
+//
+// WinSock 2 extension -- manifest constants for SIO_TRANSLATE_HANDLE ioctl
+//
+
+const
+ TH_NETDEV = $00000001;
+ {$EXTERNALSYM TH_NETDEV}
+ TH_TAPI = $00000002;
+ {$EXTERNALSYM TH_TAPI}
+
+//
+// Microsoft Windows Extended data types required for the functions to
+// convert back and forth between binary and string forms of
+// addresses.
+//
+
+type
+ LPSOCKADDR = ^sockaddr;
+ {$EXTERNALSYM LPSOCKADDR}
+
+ PSOCKADDR_STORAGE = ^sockaddr_storage;
+ {$EXTERNALSYM PSOCKADDR_STORAGE}
+ LPSOCKADDR_STORAGE = ^sockaddr_storage;
+ {$EXTERNALSYM LPSOCKADDR_STORAGE}
+
+//
+// Manifest constants and type definitions related to name resolution and
+// registration (RNR) API
+//
+
+ _BLOB = record
+ cbSize: ULONG;
+ pBlobData: LPBYTE;
+ end;
+ {$EXTERNALSYM _BLOB}
+ BLOB = _BLOB;
+ {$EXTERNALSYM BLOB}
+ LPBLOB = ^BLOB;
+ {$EXTERNALSYM LPBLOB}
+ TBlob = BLOB;
+ PBlob = LPBLOB;
+
+//
+// Service Install Flags
+//
+
+const
+ SERVICE_MULTIPLE = $00000001;
+ {$EXTERNALSYM SERVICE_MULTIPLE}
+
+//
+//& Name Spaces
+//
+
+ NS_ALL = 0;
+ {$EXTERNALSYM NS_ALL}
+
+ NS_SAP = 1;
+ {$EXTERNALSYM NS_SAP}
+ NS_NDS = 2;
+ {$EXTERNALSYM NS_NDS}
+ NS_PEER_BROWSE = 3;
+ {$EXTERNALSYM NS_PEER_BROWSE}
+ NS_SLP = 5;
+ {$EXTERNALSYM NS_SLP}
+ NS_DHCP = 6;
+ {$EXTERNALSYM NS_DHCP}
+
+ NS_TCPIP_LOCAL = 10;
+ {$EXTERNALSYM NS_TCPIP_LOCAL}
+ NS_TCPIP_HOSTS = 11;
+ {$EXTERNALSYM NS_TCPIP_HOSTS}
+ NS_DNS = 12;
+ {$EXTERNALSYM NS_DNS}
+ NS_NETBT = 13;
+ {$EXTERNALSYM NS_NETBT}
+ NS_WINS = 14;
+ {$EXTERNALSYM NS_WINS}
+ NS_NLA = 15; // Network Location Awareness
+ {$EXTERNALSYM NS_NLA}
+
+ NS_NBP = 20;
+ {$EXTERNALSYM NS_NBP}
+
+ NS_MS = 30;
+ {$EXTERNALSYM NS_MS}
+ NS_STDA = 31;
+ {$EXTERNALSYM NS_STDA}
+ NS_NTDS = 32;
+ {$EXTERNALSYM NS_NTDS}
+
+ NS_X500 = 40;
+ {$EXTERNALSYM NS_X500}
+ NS_NIS = 41;
+ {$EXTERNALSYM NS_NIS}
+ NS_NISPLUS = 42;
+ {$EXTERNALSYM NS_NISPLUS}
+
+ NS_WRQ = 50;
+ {$EXTERNALSYM NS_WRQ}
+
+ NS_NETDES = 60; // Network Designers Limited
+ {$EXTERNALSYM NS_NETDES}
+
+//
+// Resolution flags for WSAGetAddressByName().
+// Note these are also used by the 1.1 API GetAddressByName, so
+// leave them around.
+//
+
+ RES_UNUSED_1 = $00000001;
+ {$EXTERNALSYM RES_UNUSED_1}
+ RES_FLUSH_CACHE = $00000002;
+ {$EXTERNALSYM RES_FLUSH_CACHE}
+ RES_SERVICE = $00000004;
+ {$EXTERNALSYM RES_SERVICE}
+
+//
+// Well known value names for Service Types
+//
+
+ SERVICE_TYPE_VALUE_IPXPORTA = 'IpxSocket';
+ {$EXTERNALSYM SERVICE_TYPE_VALUE_IPXPORTA}
+ SERVICE_TYPE_VALUE_IPXPORTW = WideString('IpxSocket');
+ {$EXTERNALSYM SERVICE_TYPE_VALUE_IPXPORTW}
+ SERVICE_TYPE_VALUE_SAPIDA = 'SapId';
+ {$EXTERNALSYM SERVICE_TYPE_VALUE_SAPIDA}
+ SERVICE_TYPE_VALUE_SAPIDW = WideString('SapId');
+ {$EXTERNALSYM SERVICE_TYPE_VALUE_SAPIDW}
+ SERVICE_TYPE_VALUE_TCPPORTA = 'TcpPort';
+ {$EXTERNALSYM SERVICE_TYPE_VALUE_TCPPORTA}
+ SERVICE_TYPE_VALUE_TCPPORTW = WideString('TcpPort');
+ {$EXTERNALSYM SERVICE_TYPE_VALUE_TCPPORTW}
+ SERVICE_TYPE_VALUE_UDPPORTA = 'UdpPort';
+ {$EXTERNALSYM SERVICE_TYPE_VALUE_UDPPORTA}
+ SERVICE_TYPE_VALUE_UDPPORTW = WideString('UdpPort');
+ {$EXTERNALSYM SERVICE_TYPE_VALUE_UDPPORTW}
+ SERVICE_TYPE_VALUE_OBJECTIDA = 'ObjectId';
+ {$EXTERNALSYM SERVICE_TYPE_VALUE_OBJECTIDA}
+ SERVICE_TYPE_VALUE_OBJECTIDW = WideString('ObjectId');
+ {$EXTERNALSYM SERVICE_TYPE_VALUE_OBJECTIDW}
+
+ {$IFDEF UNICODE}
+ SERVICE_TYPE_VALUE_SAPID = SERVICE_TYPE_VALUE_SAPIDW;
+ {$EXTERNALSYM SERVICE_TYPE_VALUE_SAPID}
+ SERVICE_TYPE_VALUE_TCPPORT = SERVICE_TYPE_VALUE_TCPPORTW;
+ {$EXTERNALSYM SERVICE_TYPE_VALUE_TCPPORT}
+ SERVICE_TYPE_VALUE_UDPPORT = SERVICE_TYPE_VALUE_UDPPORTW;
+ {$EXTERNALSYM SERVICE_TYPE_VALUE_UDPPORT}
+ SERVICE_TYPE_VALUE_OBJECTID = SERVICE_TYPE_VALUE_OBJECTIDW;
+ {$EXTERNALSYM SERVICE_TYPE_VALUE_OBJECTID}
+ {$ELSE}
+ SERVICE_TYPE_VALUE_SAPID = SERVICE_TYPE_VALUE_SAPIDA;
+ {$EXTERNALSYM SERVICE_TYPE_VALUE_SAPID}
+ SERVICE_TYPE_VALUE_TCPPORT = SERVICE_TYPE_VALUE_TCPPORTA;
+ {$EXTERNALSYM SERVICE_TYPE_VALUE_TCPPORT}
+ SERVICE_TYPE_VALUE_UDPPORT = SERVICE_TYPE_VALUE_UDPPORTA;
+ {$EXTERNALSYM SERVICE_TYPE_VALUE_UDPPORT}
+ SERVICE_TYPE_VALUE_OBJECTID = SERVICE_TYPE_VALUE_OBJECTIDA;
+ {$EXTERNALSYM SERVICE_TYPE_VALUE_OBJECTID}
+ {$ENDIF UNICODE}
+
+//
+// SockAddr Information
+//
+
+type
+ LPSOCKET_ADDRESS = ^SOCKET_ADDRESS;
+ {$EXTERNALSYM LPSOCKET_ADDRESS}
+ PSOCKET_ADDRESS = ^SOCKET_ADDRESS;
+ {$EXTERNALSYM PSOCKET_ADDRESS}
+ _SOCKET_ADDRESS = record
+ lpSockaddr: LPSOCKADDR;
+ iSockaddrLength: Integer;
+ end;
+ {$EXTERNALSYM _SOCKET_ADDRESS}
+ SOCKET_ADDRESS = _SOCKET_ADDRESS;
+ {$EXTERNALSYM SOCKET_ADDRESS}
+ TSocketAddress = SOCKET_ADDRESS;
+ PSocketAddress = PSOCKET_ADDRESS;
+
+//
+// CSAddr Information
+//
+
+ LPCSADDR_INFO = ^CSADDR_INFO;
+ {$EXTERNALSYM LPCSADDR_INFO}
+ PCSADDR_INFO = ^CSADDR_INFO;
+ {$EXTERNALSYM PCSADDR_INFO}
+ _CSADDR_INFO = record
+ LocalAddr: SOCKET_ADDRESS;
+ RemoteAddr: SOCKET_ADDRESS;
+ iSocketType: Integer;
+ iProtocol: Integer;
+ end;
+ {$EXTERNALSYM _CSADDR_INFO}
+ CSADDR_INFO = _CSADDR_INFO;
+ {$EXTERNALSYM CSADDR_INFO}
+ TCsAddrInfo = CSADDR_INFO;
+ PCsAddrInfo = PCSADDR_INFO;
+
+//
+// Address list returned via SIO_ADDRESS_LIST_QUERY
+//
+
+ LPSOCKET_ADDRESS_LIST = ^SOCKET_ADDRESS_LIST;
+ {$EXTERNALSYM LPSOCKET_ADDRESS_LIST}
+ _SOCKET_ADDRESS_LIST = record
+ iAddressCount: Integer;
+ Address: array [0..0] of SOCKET_ADDRESS;
+ end;
+ {$EXTERNALSYM _SOCKET_ADDRESS_LIST}
+ SOCKET_ADDRESS_LIST = _SOCKET_ADDRESS_LIST;
+ {$EXTERNALSYM SOCKET_ADDRESS_LIST}
+ TSocketAddressList = SOCKET_ADDRESS_LIST;
+ PSocketAddressList = LPSOCKET_ADDRESS_LIST;
+
+//
+// Address Family/Protocol Tuples
+//
+
+ LPAFPROTOCOLS = ^AFPROTOCOLS;
+ {$EXTERNALSYM LPAFPROTOCOLS}
+ PAFPROTOCOLS = ^AFPROTOCOLS;
+ {$EXTERNALSYM PAFPROTOCOLS}
+ _AFPROTOCOLS = record
+ iAddressFamily: Integer;
+ iProtocol: Integer;
+ end;
+ {$EXTERNALSYM _AFPROTOCOLS}
+ AFPROTOCOLS = _AFPROTOCOLS;
+ {$EXTERNALSYM AFPROTOCOLS}
+ TAfProtocols = AFPROTOCOLS;
+
+//
+// Client Query API Typedefs
+//
+
+//
+// The comparators
+//
+
+ _WSAEcomparator = (COMP_EQUAL, COMP_NOTLESS);
+ {$EXTERNALSYM _WSAEcomparator}
+ WSAECOMPARATOR = _WSAEcomparator;
+ {$EXTERNALSYM WSAECOMPARATOR}
+ PWSAECOMPARATOR = ^WSAECOMPARATOR;
+ {$EXTERNALSYM PWSAECOMPARATOR}
+ LPWSAECOMPARATOR = ^WSAECOMPARATOR;
+ {$EXTERNALSYM LPWSAECOMPARATOR}
+
+ LPWSAVERSION = ^WSAVERSION;
+ {$EXTERNALSYM LPWSAVersion}
+ PWSAVERSION = ^WSAVERSION;
+ {$EXTERNALSYM PWSAVersion}
+ _WSAVersion = record
+ dwVersion: DWORD;
+ ecHow: WSAECOMPARATOR;
+ end;
+ {$EXTERNALSYM _WSAVersion}
+ WSAVERSION = _WSAVersion;
+ {$EXTERNALSYM WSAVERSION}
+ TWsaVersion = WSAVERSION;
+
+ _WSAQuerySetA = record
+ dwSize: DWORD;
+ lpszServiceInstanceName: LPSTR;
+ lpServiceClassId: PGUID;
+ lpVersion: LPWSAVERSION;
+ lpszComment: LPSTR;
+ dwNameSpace: DWORD;
+ lpNSProviderId: PGUID;
+ lpszContext: LPSTR;
+ dwNumberOfProtocols: DWORD;
+ lpafpProtocols: LPAFPROTOCOLS;
+ lpszQueryString: LPSTR;
+ dwNumberOfCsAddrs: DWORD;
+ lpcsaBuffer: LPCSADDR_INFO;
+ dwOutputFlags: DWORD;
+ lpBlob: LPBLOB;
+ end;
+ {$EXTERNALSYM _WSAQuerySetA}
+ WSAQUERYSETA = _WSAQuerySetA;
+ {$EXTERNALSYM WSAQUERYSETA}
+ PWSAQUERYSETA = ^WSAQUERYSETA;
+ {$EXTERNALSYM PWSAQUERYSETA}
+ LPWSAQUERYSETA = ^WSAQUERYSETA;
+ {$EXTERNALSYM LPWSAQUERYSETA}
+ TWsaQuerySetA = WSAQUERYSETA;
+
+ _WSAQuerySetW = record
+ dwSize: DWORD;
+ lpszServiceInstanceName: LPWSTR;
+ lpServiceClassId: PGUID;
+ lpVersion: LPWSAVERSION;
+ lpszComment: LPWSTR;
+ dwNameSpace: DWORD;
+ lpNSProviderId: PGUID;
+ lpszContext: LPWSTR;
+ dwNumberOfProtocols: DWORD;
+ lpafpProtocols: LPAFPROTOCOLS;
+ lpszQueryString: LPWSTR;
+ dwNumberOfCsAddrs: DWORD;
+ lpcsaBuffer: LPCSADDR_INFO;
+ dwOutputFlags: DWORD;
+ lpBlob: LPBLOB;
+ end;
+ {$EXTERNALSYM _WSAQuerySetW}
+ WSAQUERYSETW = _WSAQuerySetW;
+ {$EXTERNALSYM WSAQUERYSETW}
+ PWSAQUERYSETW = ^WSAQUERYSETW;
+ {$EXTERNALSYM PWSAQUERYSETW}
+ LPWSAQUERYSETW = ^WSAQUERYSETW;
+ {$EXTERNALSYM LPWSAQUERYSETW}
+ TWsaQuerySetW = WSAQUERYSETW;
+
+ {$IFDEF UNICODE}
+ WSAQUERYSET = WSAQUERYSETW;
+ {$EXTERNALSYM WSAQUERYSET}
+ PWSAQUERYSET = PWSAQUERYSETW;
+ {$EXTERNALSYM PWSAQUERYSET}
+ LPWSAQUERYSET = LPWSAQUERYSETW;
+ {$EXTERNALSYM LPWSAQUERYSET}
+ TWsaQuerySet = TWsaQuerySetW;
+ {$ELSE}
+ WSAQUERYSET = WSAQUERYSETA;
+ {$EXTERNALSYM WSAQUERYSET}
+ PWSAQUERYSET = PWSAQUERYSETA;
+ {$EXTERNALSYM PWSAQUERYSET}
+ LPWSAQUERYSET = LPWSAQUERYSETA;
+ {$EXTERNALSYM LPWSAQUERYSET}
+ TWsaQuerySet = TWsaQuerySetA;
+ {$ENDIF UNICODE}
+
+const
+ LUP_DEEP = $0001;
+ {$EXTERNALSYM LUP_DEEP}
+ LUP_CONTAINERS = $0002;
+ {$EXTERNALSYM LUP_CONTAINERS}
+ LUP_NOCONTAINERS = $0004;
+ {$EXTERNALSYM LUP_NOCONTAINERS}
+ LUP_NEAREST = $0008;
+ {$EXTERNALSYM LUP_NEAREST}
+ LUP_RETURN_NAME = $0010;
+ {$EXTERNALSYM LUP_RETURN_NAME}
+ LUP_RETURN_TYPE = $0020;
+ {$EXTERNALSYM LUP_RETURN_TYPE}
+ LUP_RETURN_VERSION = $0040;
+ {$EXTERNALSYM LUP_RETURN_VERSION}
+ LUP_RETURN_COMMENT = $0080;
+ {$EXTERNALSYM LUP_RETURN_COMMENT}
+ LUP_RETURN_ADDR = $0100;
+ {$EXTERNALSYM LUP_RETURN_ADDR}
+ LUP_RETURN_BLOB = $0200;
+ {$EXTERNALSYM LUP_RETURN_BLOB}
+ LUP_RETURN_ALIASES = $0400;
+ {$EXTERNALSYM LUP_RETURN_ALIASES}
+ LUP_RETURN_QUERY_STRING = $0800;
+ {$EXTERNALSYM LUP_RETURN_QUERY_STRING}
+ LUP_RETURN_ALL = $0FF0;
+ {$EXTERNALSYM LUP_RETURN_ALL}
+ LUP_RES_SERVICE = $8000;
+ {$EXTERNALSYM LUP_RES_SERVICE}
+
+ LUP_FLUSHCACHE = $1000;
+ {$EXTERNALSYM LUP_FLUSHCACHE}
+ LUP_FLUSHPREVIOUS = $2000;
+ {$EXTERNALSYM LUP_FLUSHPREVIOUS}
+
+//
+// Return flags
+//
+
+ RESULT_IS_ALIAS = $0001;
+ {$EXTERNALSYM RESULT_IS_ALIAS}
+ RESULT_IS_ADDED = $0010;
+ {$EXTERNALSYM RESULT_IS_ADDED}
+ RESULT_IS_CHANGED = $0020;
+ {$EXTERNALSYM RESULT_IS_CHANGED}
+ RESULT_IS_DELETED = $0040;
+ {$EXTERNALSYM RESULT_IS_DELETED}
+
+//
+// Service Address Registration and Deregistration Data Types.
+//
+
+type
+ _WSAESETSERVICEOP = (RNRSERVICE_REGISTER, RNRSERVICE_DEREGISTER, RNRSERVICE_DELETE);
+ {$EXTERNALSYM _WSAESETSERVICEOP}
+ WSAESETSERVICEOP = _WSAESETSERVICEOP;
+ {$EXTERNALSYM WSAESETSERVICEOP}
+ PWSAESETSERVICEOP = ^WSAESETSERVICEOP;
+ {$EXTERNALSYM PWSAESETSERVICEOP}
+ LPWSAESETSERVICEOP = ^WSAESETSERVICEOP;
+ {$EXTERNALSYM LPWSAESETSERVICEOP}
+
+//
+// Service Installation/Removal Data Types.
+//
+
+ _WSANSClassInfoA = record
+ lpszName: LPSTR;
+ dwNameSpace: DWORD;
+ dwValueType: DWORD;
+ dwValueSize: DWORD;
+ lpValue: LPVOID;
+ end;
+ {$EXTERNALSYM _WSANSClassInfoA}
+ WSANSCLASSINFOA = _WSANSClassInfoA;
+ {$EXTERNALSYM WSANSCLASSINFOA}
+ PWSANSCLASSINFOA = ^WSANSCLASSINFOA;
+ {$EXTERNALSYM PWSANSCLASSINFOA}
+ LPWSANSCLASSINFOA = ^WSANSCLASSINFOA;
+ {$EXTERNALSYM LPWSANSCLASSINFOA}
+ TWsaNsClassInfoA = WSANSCLASSINFOA;
+
+ _WSANSClassInfoW = record
+ lpszName: LPWSTR;
+ dwNameSpace: DWORD;
+ dwValueType: DWORD;
+ dwValueSize: DWORD;
+ lpValue: LPVOID;
+ end;
+ {$EXTERNALSYM _WSANSClassInfoW}
+ WSANSCLASSINFOW = _WSANSClassInfoW;
+ {$EXTERNALSYM WSANSCLASSINFOW}
+ PWSANSCLASSINFOW = ^WSANSCLASSINFOW;
+ {$EXTERNALSYM PWSANSCLASSINFOW}
+ LPWSANSCLASSINFOW = ^WSANSCLASSINFOW;
+ {$EXTERNALSYM LPWSANSCLASSINFOW}
+ TWsaNsClassInfoW = WSANSCLASSINFOW;
+
+ {$IFDEF UNICODE}
+ WSANSCLASSINFO = WSANSCLASSINFOW;
+ {$EXTERNALSYM WSANSCLASSINFO}
+ PWSANSCLASSINFO = PWSANSCLASSINFOW;
+ {$EXTERNALSYM PWSANSCLASSINFO}
+ LPWSANSCLASSINFO = LPWSANSCLASSINFOW;
+ {$EXTERNALSYM LPWSANSCLASSINFO}
+ TWsaNsClassInfo = TWsaNsClassInfoW;
+ {$ELSE}
+ WSANSCLASSINFO = WSANSCLASSINFOA;
+ {$EXTERNALSYM WSANSCLASSINFO}
+ PWSANSCLASSINFO = PWSANSCLASSINFOA;
+ {$EXTERNALSYM PWSANSCLASSINFO}
+ LPWSANSCLASSINFO = LPWSANSCLASSINFOA;
+ {$EXTERNALSYM LPWSANSCLASSINFO}
+ TWsaNsClassInfo = TWsaNsClassInfoA;
+ {$ENDIF UNICODE}
+
+ _WSAServiceClassInfoA = record
+ lpServiceClassId: PGUID;
+ lpszServiceClassName: LPSTR;
+ dwCount: DWORD;
+ lpClassInfos: LPWSANSCLASSINFOA;
+ end;
+ {$EXTERNALSYM _WSAServiceClassInfoA}
+ WSASERVICECLASSINFOA = _WSAServiceClassInfoA;
+ {$EXTERNALSYM WSASERVICECLASSINFOA}
+ PWSASERVICECLASSINFOA = ^WSASERVICECLASSINFOA;
+ {$EXTERNALSYM PWSASERVICECLASSINFOA}
+ LPWSASERVICECLASSINFOA = ^WSASERVICECLASSINFOA;
+ {$EXTERNALSYM LPWSASERVICECLASSINFOA}
+ TWsaServiceClassInfoA = WSASERVICECLASSINFOA;
+
+ _WSAServiceClassInfoW = record
+ lpServiceClassId: PGUID;
+ lpszServiceClassName: LPWSTR;
+ dwCount: DWORD;
+ lpClassInfos: LPWSANSCLASSINFOW;
+ end;
+ {$EXTERNALSYM _WSAServiceClassInfoW}
+ WSASERVICECLASSINFOW = _WSAServiceClassInfoW;
+ {$EXTERNALSYM WSASERVICECLASSINFOW}
+ PWSASERVICECLASSINFOW = ^WSASERVICECLASSINFOW;
+ {$EXTERNALSYM PWSASERVICECLASSINFOW}
+ LPWSASERVICECLASSINFOW = ^WSASERVICECLASSINFOW;
+ {$EXTERNALSYM LPWSASERVICECLASSINFOW}
+ TWsaServiceClassInfoW = WSASERVICECLASSINFOW;
+
+ {$IFDEF UNICODE}
+ WSASERVICECLASSINFO = WSASERVICECLASSINFOW;
+ {$EXTERNALSYM WSASERVICECLASSINFO}
+ PWSASERVICECLASSINFO = PWSASERVICECLASSINFOW;
+ {$EXTERNALSYM PWSASERVICECLASSINFO}
+ LPWSASERVICECLASSINFO = LPWSASERVICECLASSINFOW;
+ {$EXTERNALSYM LPWSASERVICECLASSINFO}
+ TWsaServiceClassInfo = TWsaServiceClassInfoW;
+ {$ELSE}
+ WSASERVICECLASSINFO = WSASERVICECLASSINFOA;
+ {$EXTERNALSYM WSASERVICECLASSINFO}
+ PWSASERVICECLASSINFO = PWSASERVICECLASSINFOA;
+ {$EXTERNALSYM PWSASERVICECLASSINFO}
+ LPWSASERVICECLASSINFO = LPWSASERVICECLASSINFOA;
+ {$EXTERNALSYM LPWSASERVICECLASSINFO}
+ TWsaServiceClassInfo = TWsaServiceClassInfoA;
+ {$ENDIF UNICODE}
+
+ LPWSANAMESPACE_INFOA = ^WSANAMESPACE_INFOA;
+ {$EXTERNALSYM LPWSANAMESPACE_INFOA}
+ PWSANAMESPACE_INFOA = ^WSANAMESPACE_INFOA;
+ {$EXTERNALSYM PWSANAMESPACE_INFOA}
+ _WSANAMESPACE_INFOA = record
+ NSProviderId: TGUID;
+ dwNameSpace: DWORD;
+ fActive: BOOL;
+ dwVersion: DWORD;
+ lpszIdentifier: LPSTR;
+ end;
+ {$EXTERNALSYM _WSANAMESPACE_INFOA}
+ WSANAMESPACE_INFOA = _WSANAMESPACE_INFOA;
+ {$EXTERNALSYM WSANAMESPACE_INFOA}
+ TWsaNameSpaceInfoA = WSANAMESPACE_INFOA;
+ PWsaNameSpaceInfoA = LPWSANAMESPACE_INFOA;
+
+ LPWSANAMESPACE_INFOW = ^WSANAMESPACE_INFOW;
+ {$EXTERNALSYM LPWSANAMESPACE_INFOW}
+ PWSANAMESPACE_INFOW = ^WSANAMESPACE_INFOW;
+ {$EXTERNALSYM PWSANAMESPACE_INFOW}
+ _WSANAMESPACE_INFOW = record
+ NSProviderId: TGUID;
+ dwNameSpace: DWORD;
+ fActive: BOOL;
+ dwVersion: DWORD;
+ lpszIdentifier: LPWSTR;
+ end;
+ {$EXTERNALSYM _WSANAMESPACE_INFOW}
+ WSANAMESPACE_INFOW = _WSANAMESPACE_INFOW;
+ {$EXTERNALSYM WSANAMESPACE_INFOW}
+ TWsaNameSpaceInfoW = WSANAMESPACE_INFOW;
+ PWsaNameSpaceInfoW = PWSANAMESPACE_INFOW;
+
+ {$IFDEF UNICODE}
+ WSANAMESPACE_INFO = WSANAMESPACE_INFOW;
+ {$EXTERNALSYM WSANAMESPACE_INFO}
+ PWSANAMESPACE_INFO = PWSANAMESPACE_INFOW;
+ {$EXTERNALSYM PWSANAMESPACE_INFO}
+ LPWSANAMESPACE_INFO = LPWSANAMESPACE_INFOW;
+ {$EXTERNALSYM LPWSANAMESPACE_INFO}
+ TWsaNameSpaceInfo = TWsaNameSpaceInfoW;
+ PWsaNameSpaceInfo = PWsaNameSpaceInfoW;
+ {$ELSE}
+ WSANAMESPACE_INFO = WSANAMESPACE_INFOA;
+ {$EXTERNALSYM WSANAMESPACE_INFO}
+ PWSANAMESPACE_INFO = PWSANAMESPACE_INFOA;
+ {$EXTERNALSYM PWSANAMESPACE_INFO}
+ LPWSANAMESPACE_INFO = LPWSANAMESPACE_INFOA;
+ {$EXTERNALSYM LPWSANAMESPACE_INFO}
+ TWsaNameSpaceInfo = TWsaNameSpaceInfoA;
+ PWsaNameSpaceInfo = PWsaNameSpaceInfoA;
+ {$ENDIF UNICODE}
+
+// Socket function prototypes
+
+function accept(s: TSocket; addr: PSockAddr; addrlen: PINT): TSocket; stdcall;
+{$EXTERNALSYM accept}
+function bind(s: TSocket; name: PSockAddr; namelen: Integer): Integer; stdcall;
+{$EXTERNALSYM bind}
+function closesocket(s: TSocket): Integer; stdcall;
+{$EXTERNALSYM closesocket}
+function connect(s: TSocket; name: PSockAddr; namelen: Integer): Integer; stdcall;
+{$EXTERNALSYM connect}
+function ioctlsocket(s: TSocket; cmd: Longint; var argp: u_long): Integer; stdcall;
+{$EXTERNALSYM ioctlsocket}
+function getpeername(s: TSocket; name: PSockAddr; var namelen: Integer): Integer; stdcall;
+{$EXTERNALSYM getpeername}
+function getsockname(s: TSocket; name: PSockAddr; var namelen: Integer): Integer; stdcall;
+{$EXTERNALSYM getsockname}
+function getsockopt(s: TSocket; level, optname: Integer; optval: PChar; var optlen: Integer): Integer; stdcall;
+{$EXTERNALSYM getsockopt}
+function htonl(hostlong: u_long): u_long; stdcall;
+{$EXTERNALSYM htonl}
+function htons(hostshort: u_short): u_short; stdcall;
+{$EXTERNALSYM htons}
+function inet_addr(cp: PChar): u_long; stdcall;
+{$EXTERNALSYM inet_addr}
+function inet_ntoa(inaddr: in_addr): PChar; stdcall;
+{$EXTERNALSYM inet_ntoa}
+function listen(s: TSocket; backlog: Integer): Integer; stdcall;
+{$EXTERNALSYM listen}
+function ntohl(netlong: u_long): u_long; stdcall;
+{$EXTERNALSYM ntohl}
+function ntohs(netshort: u_short): u_short; stdcall;
+{$EXTERNALSYM ntohs}
+function recv(s: TSocket; var buf; len, flags: Integer): Integer; stdcall;
+{$EXTERNALSYM recv}
+function recvfrom(s: TSocket; var buf; len, flags: Integer; from: PSockAddr; var fromlen: Integer): Integer; stdcall;
+{$EXTERNALSYM recvfrom}
+function select(nfds: Integer; readfds, writefds, exceptfds: PFdSet; timeout: PTimeVal): Integer; stdcall;
+{$EXTERNALSYM select}
+function send(s: TSocket; var buf; len, flags: Integer): Integer; stdcall;
+{$EXTERNALSYM send}
+function sendto(s: TSocket; var buf; len, flags: Integer; toaddr: PSockAddr; tolen: Integer): Integer; stdcall;
+{$EXTERNALSYM sendto}
+function setsockopt(s: TSocket; level, optname: Integer; optval: PChar; optlen: Integer): Integer; stdcall;
+{$EXTERNALSYM setsockopt}
+function shutdown(s: TSocket; how: Integer): Integer; stdcall;
+{$EXTERNALSYM shutdown}
+function socket(af, type_, protocol: Integer): TSocket; stdcall;
+{$EXTERNALSYM socket}
+
+// Database function prototypes
+
+function gethostbyaddr(addr: PChar; len, type_: Integer): PHostEnt; stdcall;
+{$EXTERNALSYM gethostbyaddr}
+function gethostbyname(name: PChar): PHostEnt; stdcall;
+{$EXTERNALSYM gethostbyname}
+function gethostname(name: PChar; namelen: Integer): Integer; stdcall;
+{$EXTERNALSYM gethostname}
+function getservbyport(port: Integer; proto: PChar): PServEnt; stdcall;
+{$EXTERNALSYM getservbyport}
+function getservbyname(name, proto: PChar): PServEnt; stdcall;
+{$EXTERNALSYM getservbyname}
+function getprotobynumber(number: Integer): PProtoEnt; stdcall;
+{$EXTERNALSYM getprotobynumber}
+function getprotobyname(name: PChar): PProtoEnt; stdcall;
+{$EXTERNALSYM getprotobyname}
+
+// Microsoft Windows Extension function prototypes
+
+function WSAStartup(wVersionRequired: WORD; var lpWSAData: TWSAData): Integer; stdcall;
+{$EXTERNALSYM WSAStartup}
+function WSACleanup: Integer; stdcall;
+{$EXTERNALSYM WSACleanup}
+procedure WSASetLastError(iError: Integer); stdcall;
+{$EXTERNALSYM WSASetLastError}
+function WSAGetLastError: Integer; stdcall;
+{$EXTERNALSYM WSAGetLastError}
+function WSAIsBlocking: BOOL; stdcall;
+{$EXTERNALSYM WSAIsBlocking}
+function WSAUnhookBlockingHook: Integer; stdcall;
+{$EXTERNALSYM WSAUnhookBlockingHook}
+function WSASetBlockingHook(lpBlockFunc: FARPROC): FARPROC; stdcall;
+{$EXTERNALSYM WSASetBlockingHook}
+function WSACancelBlockingCall: Integer; stdcall;
+{$EXTERNALSYM WSACancelBlockingCall}
+function WSAAsyncGetServByName(hWnd: HWND; wMsg: u_int; name, proto, buf: PChar;
+ buflen: Integer): HANDLE; stdcall;
+{$EXTERNALSYM WSAAsyncGetServByName}
+function WSAAsyncGetServByPort(hWnd: HWND; wMsg: u_int; port: Integer;
+ proto, buf: PChar; buflen: Integer): HANDLE; stdcall;
+{$EXTERNALSYM WSAAsyncGetServByPort}
+function WSAAsyncGetProtoByName(hWnd: HWND; wMsg: u_int; name, buf: PChar;
+ buflen: Integer): HANDLE; stdcall;
+{$EXTERNALSYM WSAAsyncGetProtoByName}
+function WSAAsyncGetProtoByNumber(hWnd: HWND; wMsg: u_int; number: Integer;
+ buf: PChar; buflen: Integer): HANDLE; stdcall;
+{$EXTERNALSYM WSAAsyncGetProtoByNumber}
+function WSAAsyncGetHostByName(hWnd: HWND; wMsg: u_int; name, buf: PChar;
+ buflen: Integer): HANDLE; stdcall;
+{$EXTERNALSYM WSAAsyncGetHostByName}
+function WSAAsyncGetHostByAddr(hWnd: HWND; wMsg: u_int; addr: PChar;
+ len, type_: Integer; buf: PChar; buflen: Integer): HANDLE; stdcall;
+{$EXTERNALSYM WSAAsyncGetHostByAddr}
+function WSACancelAsyncRequest(hAsyncTaskHandle: HANDLE): Integer; stdcall;
+{$EXTERNALSYM WSACancelAsyncRequest}
+function WSAAsyncSelect(s: TSocket; hWnd: HWND; wMsg: u_int; lEvent: Longint): Integer; stdcall;
+{$EXTERNALSYM WSAAsyncSelect}
+
+// WinSock 2 API new function prototypes
+
+function WSAAccept(s: TSocket; addr: PSockAddr; addrlen: PINT;
+ lpfnCondition: LPCONDITIONPROC; dwCallbackData: DWORD): TSocket; stdcall;
+{$EXTERNALSYM WSAAccept}
+function WSACloseEvent(hEvent: WSAEVENT): BOOL; stdcall;
+{$EXTERNALSYM WSACloseEvent}
+function WSAConnect(s: TSocket; name: PSockAddr; namelen: Integer; lpCallerData: LPWSABUF;
+ lpCalleeData: LPWSABUF; lpSQOS: LPQOS; lpGQOS: LPQOS): Integer; stdcall;
+{$EXTERNALSYM WSAConnect}
+function WSACreateEvent: WSAEVENT; stdcall;
+{$EXTERNALSYM WSACreateEvent}
+function WSADuplicateSocketA(s: TSocket; dwProcessId: DWORD; lpProtocolInfo: LPWSAPROTOCOL_INFOA): Integer; stdcall;
+{$EXTERNALSYM WSADuplicateSocketA}
+function WSADuplicateSocketW(s: TSocket; dwProcessId: DWORD; lpProtocolInfo: LPWSAPROTOCOL_INFOW): Integer; stdcall;
+{$EXTERNALSYM WSADuplicateSocketW}
+function WSADuplicateSocket(s: TSocket; dwProcessId: DWORD; lpProtocolInfo: LPWSAPROTOCOL_INFO): Integer; stdcall;
+{$EXTERNALSYM WSADuplicateSocket}
+function WSAEnumNetworkEvents(s: TSocket; hEventObject: WSAEVENT; lpNetworkEvents: LPWSANETWORKEVENTS): Integer; stdcall;
+{$EXTERNALSYM WSAEnumNetworkEvents}
+function WSAEnumProtocolsA(lpiProtocols: PINT; lpProtocolBuffer: LPWSAPROTOCOL_INFOA;
+ var lpdwBufferLength: DWORD): Integer; stdcall;
+{$EXTERNALSYM WSAEnumProtocolsA}
+function WSAEnumProtocolsW(lpiProtocols: PINT; lpProtocolBuffer: LPWSAPROTOCOL_INFOW;
+ var lpdwBufferLength: DWORD): Integer; stdcall;
+{$EXTERNALSYM WSAEnumProtocolsW}
+function WSAEnumProtocols(lpiProtocols: PINT; lpProtocolBuffer: LPWSAPROTOCOL_INFO;
+ var lpdwBufferLength: DWORD): Integer; stdcall;
+{$EXTERNALSYM WSAEnumProtocols}
+function WSAEventSelect(s: TSocket; hEventObject: WSAEVENT; lNetworkEvents: Longint): Integer; stdcall;
+{$EXTERNALSYM WSAEventSelect}
+function WSAGetOverlappedResult(s: TSocket; lpOverlapped: LPWSAOVERLAPPED;
+ var lpcbTransfer: DWORD; fWait: BOOL; var lpdwFlags: DWORD): BOOL; stdcall; // Thanks Kai Henningsen for var on lpdwFlags
+{$EXTERNALSYM WSAGetOverlappedResult}
+function WSAGetQOSByName(s: TSocket; var lpQOSName: WSABUF; lpQOS: LPQOS): BOOL; stdcall;
+{$EXTERNALSYM WSAGetQOSByName}
+function WSAHtonl(s: TSocket; hostlong: u_long; var lpnetlong: u_long): Integer; stdcall;
+{$EXTERNALSYM WSAHtonl}
+function WSAHtons(s: TSocket; hostshort: u_short; var lpnetshort: u_short): Integer; stdcall;
+{$EXTERNALSYM WSAHtons}
+function WSAIoctl(s: TSocket; dwIoControlCode: DWORD; lpvInBuffer: LPVOID; cbInBuffer: DWORD;
+ lpvOutBuffer: LPVOID; cbOutBuffer: DWORD; var lpcbBytesReturned: DWORD;
+ lpOverlapped: LPWSAOVERLAPPED; lpCompletionRoutine: LPWSAOVERLAPPED_COMPLETION_ROUTINE): Integer; stdcall;
+{$EXTERNALSYM WSAIoctl}
+function WSAJoinLeaf(s: TSocket; name: PSockAddr; namelen: Integer; lpCallerData: LPWSABUF;
+ lpCalleeData: LPWSABUF; lpSQOS, lpGQOS: LPQOS; dwFlags: DWORD): TSocket; stdcall;
+{$EXTERNALSYM WSAJoinLeaf}
+function WSANtohl(s: TSocket; netlong: u_long; var lphostlong: u_long): Integer; stdcall;
+{$EXTERNALSYM WSANtohl}
+function WSANtohs(s: TSocket; netshort: u_short; var lphostshort: u_short): Integer; stdcall;
+{$EXTERNALSYM WSANtohs}
+function WSARecv(s: TSocket; lpBuffers: LPWSABUF; dwBufferCount: DWORD;
+ var lpNumberOfBytesRecvd, lpFlags: DWORD; lpOverlapped: LPWSAOVERLAPPED;
+ lpCompletionRoutine: LPWSAOVERLAPPED_COMPLETION_ROUTINE): Integer; stdcall;
+{$EXTERNALSYM WSARecv}
+function WSARecvDisconnect(s: TSocket; lpInboundDisconnectData: LPWSABUF): Integer; stdcall;
+{$EXTERNALSYM WSARecvDisconnect}
+function WSARecvFrom(s: TSocket; lpBuffers: LPWSABUF; dwBufferCount: DWORD;
+ var lpNumberOfBytesRecvd, lpFlags: DWORD; lpFrom: PSockAddr; lpFromlen: PINT;
+ lpOverlapped: LPWSAOVERLAPPED; lpCompletionRoutine: LPWSAOVERLAPPED_COMPLETION_ROUTINE): Integer; stdcall;
+{$EXTERNALSYM WSARecvFrom}
+function WSAResetEvent(hEvent: WSAEVENT): BOOL; stdcall;
+{$EXTERNALSYM WSAResetEvent}
+function WSASend(s: TSocket; lpBuffers: LPWSABUF; dwBufferCount: DWORD;
+ var lpNumberOfBytesSent: DWORD; dwFlags: DWORD; lpOverlapped: LPWSAOVERLAPPED;
+ lpCompletionRoutine: LPWSAOVERLAPPED_COMPLETION_ROUTINE): Integer; stdcall;
+{$EXTERNALSYM WSASend}
+function WSASendDisconnect(s: TSocket; lpOutboundDisconnectData: LPWSABUF): Integer; stdcall;
+{$EXTERNALSYM WSASendDisconnect}
+function WSASendTo(s: TSocket; lpBuffers: LPWSABUF; dwBufferCount: DWORD;
+ var lpNumberOfBytesSent: DWORD; dwFlags: DWORD; lpTo: PSockAddr; iTolen: Integer;
+ lpOverlapped: LPWSAOVERLAPPED; lpCompletionRoutine: LPWSAOVERLAPPED_COMPLETION_ROUTINE): Integer; stdcall;
+{$EXTERNALSYM WSASendTo}
+function WSASetEvent(hEvent: WSAEVENT): BOOL; stdcall;
+{$EXTERNALSYM WSASetEvent}
+function WSASocketA(af, type_, protocol: Integer; lpProtocolInfo: LPWSAPROTOCOL_INFOA;
+ g: GROUP; dwFlags: DWORD): TSocket; stdcall;
+{$EXTERNALSYM WSASocketA}
+function WSASocketW(af, type_, protocol: Integer; lpProtocolInfo: LPWSAPROTOCOL_INFOW;
+ g: GROUP; dwFlags: DWORD): TSocket; stdcall;
+{$EXTERNALSYM WSASocketW}
+function WSASocket(af, type_, protocol: Integer; lpProtocolInfo: LPWSAPROTOCOL_INFO;
+ g: GROUP; dwFlags: DWORD): TSocket; stdcall;
+{$EXTERNALSYM WSASocket}
+function WSAWaitForMultipleEvents(cEvents: DWORD; lphEvents: PWSAEVENT;
+ fWaitAll: BOOL; dwTimeout: DWORD; fAlertable: BOOL): DWORD; stdcall;
+{$EXTERNALSYM WSAWaitForMultipleEvents}
+function WSAAddressToStringA(lpsaAddress: LPSOCKADDR; dwAddressLength: DWORD;
+ lpProtocolInfo: LPWSAPROTOCOL_INFOA; lpszAddressString: LPSTR;
+ var lpdwAddressStringLength: DWORD): Integer; stdcall;
+{$EXTERNALSYM WSAAddressToStringA}
+function WSAAddressToStringW(lpsaAddress: LPSOCKADDR; dwAddressLength: DWORD;
+ lpProtocolInfo: LPWSAPROTOCOL_INFOW; lpszAddressString: LPWSTR;
+ var lpdwAddressStringLength: DWORD): Integer; stdcall;
+{$EXTERNALSYM WSAAddressToStringW}
+function WSAAddressToString(lpsaAddress: LPSOCKADDR; dwAddressLength: DWORD;
+ lpProtocolInfo: LPWSAPROTOCOL_INFO; lpszAddressString: LPTSTR;
+ var lpdwAddressStringLength: DWORD): Integer; stdcall;
+{$EXTERNALSYM WSAAddressToString}
+function WSAStringToAddressA(AddressString: LPSTR; AddressFamily: Integer;
+ lpProtocolInfo: LPWSAPROTOCOL_INFOA; lpAddress: LPSOCKADDR;
+ var lpAddressLength: Integer): Integer; stdcall;
+{$EXTERNALSYM WSAStringToAddressA}
+function WSAStringToAddressW(AddressString: LPWSTR; AddressFamily: Integer;
+ lpProtocolInfo: LPWSAPROTOCOL_INFOW; lpAddress: LPSOCKADDR;
+ var lpAddressLength: Integer): Integer; stdcall;
+{$EXTERNALSYM WSAStringToAddressW}
+function WSAStringToAddress(AddressString: LPTSTR; AddressFamily: Integer;
+ lpProtocolInfo: LPWSAPROTOCOL_INFO; lpAddress: LPSOCKADDR;
+ var lpAddressLength: Integer): Integer; stdcall;
+{$EXTERNALSYM WSAStringToAddress}
+
+// Registration and Name Resolution API functions
+
+function WSALookupServiceBeginA(lpqsRestrictions: LPWSAQUERYSETA;
+ dwControlFlags: DWORD; var lphLookup: HANDLE): Integer; stdcall;
+{$EXTERNALSYM WSALookupServiceBeginA}
+function WSALookupServiceBeginW(lpqsRestrictions: LPWSAQUERYSETW;
+ dwControlFlags: DWORD; var lphLookup: HANDLE): Integer; stdcall;
+{$EXTERNALSYM WSALookupServiceBeginW}
+function WSALookupServiceBegin(lpqsRestrictions: LPWSAQUERYSET;
+ dwControlFlags: DWORD; var lphLookup: HANDLE): Integer; stdcall;
+{$EXTERNALSYM WSALookupServiceBegin}
+function WSALookupServiceNextA(hLookup: HANDLE; dwControlFlags: DWORD;
+ var lpdwBufferLength: DWORD; lpqsResults: LPWSAQUERYSETA): Integer; stdcall;
+{$EXTERNALSYM WSALookupServiceNextA}
+function WSALookupServiceNextW(hLookup: HANDLE; dwControlFlags: DWORD;
+ var lpdwBufferLength: DWORD; lpqsResults: LPWSAQUERYSETW): Integer; stdcall;
+{$EXTERNALSYM WSALookupServiceNextW}
+function WSALookupServiceNext(hLookup: HANDLE; dwControlFlags: DWORD;
+ var lpdwBufferLength: DWORD; lpqsResults: LPWSAQUERYSET): Integer; stdcall;
+{$EXTERNALSYM WSALookupServiceNext}
+function WSANSPIoctl(hLookup: HANDLE; dwControlCode: DWORD; lpvInBuffer: LPVOID; cbInBuffer: DWORD;
+ lpvOutBuffer: LPVOID; cbOutBuffer: DWORD; lpcbBytesReturned: LPDWORD; lpCompletion: LPWSACOMPLETION): Integer; stdcall;
+{$EXTERNALSYM WSANSPIoctl}
+function WSALookupServiceEnd(hLookup: HANDLE): Integer; stdcall;
+{$EXTERNALSYM WSALookupServiceEnd}
+function WSAInstallServiceClassA(lpServiceClassInfo: LPWSASERVICECLASSINFOA): Integer; stdcall;
+{$EXTERNALSYM WSAInstallServiceClassA}
+function WSAInstallServiceClassW(lpServiceClassInfo: LPWSASERVICECLASSINFOW): Integer; stdcall;
+{$EXTERNALSYM WSAInstallServiceClassW}
+function WSAInstallServiceClass(lpServiceClassInfo: LPWSASERVICECLASSINFO): Integer; stdcall;
+{$EXTERNALSYM WSAInstallServiceClass}
+function WSARemoveServiceClass(const lpServiceClassId: TGUID): Integer; stdcall;
+{$EXTERNALSYM WSARemoveServiceClass}
+function WSAGetServiceClassInfoA(const lpProviderId, lpServiceClassId: TGUID;
+ var lpdwBufSize: DWORD; lpServiceClassInfo: LPWSASERVICECLASSINFOA): Integer; stdcall;
+{$EXTERNALSYM WSAGetServiceClassInfoA}
+function WSAGetServiceClassInfoW(const lpProviderId, lpServiceClassId: TGUID;
+ var lpdwBufSize: DWORD; lpServiceClassInfo: LPWSASERVICECLASSINFOW): Integer; stdcall;
+{$EXTERNALSYM WSAGetServiceClassInfoW}
+function WSAGetServiceClassInfo(const lpProviderId, lpServiceClassId: TGUID;
+ var lpdwBufSize: DWORD; lpServiceClassInfo: LPWSASERVICECLASSINFO): Integer; stdcall;
+{$EXTERNALSYM WSAGetServiceClassInfo}
+function WSAEnumNameSpaceProvidersA(var lpdwBufferLength: DWORD; lpnspBuffer: LPWSANAMESPACE_INFOA): Integer; stdcall;
+{$EXTERNALSYM WSAEnumNameSpaceProvidersA}
+function WSAEnumNameSpaceProvidersW(var lpdwBufferLength: DWORD; lpnspBuffer: LPWSANAMESPACE_INFOW): Integer; stdcall;
+{$EXTERNALSYM WSAEnumNameSpaceProvidersW}
+function WSAEnumNameSpaceProviders(var lpdwBufferLength: DWORD; lpnspBuffer: LPWSANAMESPACE_INFO): Integer; stdcall;
+{$EXTERNALSYM WSAEnumNameSpaceProviders}
+function WSAGetServiceClassNameByClassIdA(const lpServiceClassId: TGUID;
+ lpszServiceClassName: LPSTR; var lpdwBufferLength: DWORD): Integer; stdcall;
+{$EXTERNALSYM WSAGetServiceClassNameByClassIdA}
+function WSAGetServiceClassNameByClassIdW(const lpServiceClassId: TGUID;
+ lpszServiceClassName: LPWSTR; var lpdwBufferLength: DWORD): Integer; stdcall;
+{$EXTERNALSYM WSAGetServiceClassNameByClassIdW}
+function WSAGetServiceClassNameByClassId(const lpServiceClassId: TGUID;
+ lpszServiceClassName: LPTSTR; var lpdwBufferLength: DWORD): Integer; stdcall;
+{$EXTERNALSYM WSAGetServiceClassNameByClassId}
+function WSASetServiceA(lpqsRegInfo: LPWSAQUERYSETA; essoperation: WSAESETSERVICEOP;
+ dwControlFlags: DWORD): Integer; stdcall;
+{$EXTERNALSYM WSASetServiceA}
+function WSASetServiceW(lpqsRegInfo: LPWSAQUERYSETW; essoperation: WSAESETSERVICEOP;
+ dwControlFlags: DWORD): Integer; stdcall;
+{$EXTERNALSYM WSASetServiceW}
+function WSASetService(lpqsRegInfo: LPWSAQUERYSET; essoperation: WSAESETSERVICEOP;
+ dwControlFlags: DWORD): Integer; stdcall;
+{$EXTERNALSYM WSASetService}
+function WSAProviderConfigChange(var lpNotificationHandle: HANDLE;
+ lpOverlapped: LPWSAOVERLAPPED; lpCompletionRoutine: LPWSAOVERLAPPED_COMPLETION_ROUTINE): Integer; stdcall;
+{$EXTERNALSYM WSAProviderConfigChange}
+
+// Microsoft Windows Extended data types
+
+type
+ PSOCKADDR_IN = ^sockaddr_in;
+ {$EXTERNALSYM PSOCKADDR_IN}
+ LPSOCKADDR_IN = ^sockaddr_in;
+ {$EXTERNALSYM LPSOCKADDR_IN}
+ LPLINGER = PLINGER;
+ {$EXTERNALSYM LPLINGER}
+ PIN_ADDR = ^in_addr;
+ {$EXTERNALSYM PIN_ADDR}
+ LPIN_ADDR = ^in_addr;
+ {$EXTERNALSYM LPIN_ADDR}
+ PFD_SET = ^fd_set;
+ {$EXTERNALSYM PFD_SET}
+ LPFD_SET = ^fd_set;
+ {$EXTERNALSYM LPFD_SET}
+ LPHOSTENT = PHOSTENT;
+ {$EXTERNALSYM LPHOSTENT}
+ LPSERVENT = PSERVENT;
+ {$EXTERNALSYM LPSERVENT}
+ LPPROTOENT = PPROTOENT;
+ {$EXTERNALSYM LPPROTOENT}
+ LPTIMEVAL = PTIMEVAL;
+ {$EXTERNALSYM LPTIMEVAL}
+
+//
+// Windows message parameter composition and decomposition
+// macros.
+//
+// WSAMAKEASYNCREPLY is intended for use by the Windows Sockets implementation
+// when constructing the response to a WSAAsyncGetXByY() routine.
+//
+
+function WSAMAKEASYNCREPLY(buflen, error: WORD): DWORD;
+{$EXTERNALSYM WSAMAKEASYNCREPLY}
+
+//
+// WSAMAKESELECTREPLY is intended for use by the Windows Sockets implementation
+// when constructing the response to WSAAsyncSelect().
+//
+
+function WSAMAKESELECTREPLY(event, error: WORD): DWORD;
+{$EXTERNALSYM WSAMAKESELECTREPLY}
+
+//
+// WSAGETASYNCBUFLEN is intended for use by the Windows Sockets application
+// to extract the buffer length from the lParam in the response
+// to a WSAAsyncGetXByY().
+//
+
+function WSAGETASYNCBUFLEN(lParam: DWORD): WORD;
+{$EXTERNALSYM WSAGETASYNCBUFLEN}
+
+//
+// WSAGETASYNCERROR is intended for use by the Windows Sockets application
+// to extract the error code from the lParam in the response
+// to a WSAGetXByY().
+//
+
+function WSAGETASYNCERROR(lParam: DWORD): WORD;
+{$EXTERNALSYM WSAGETASYNCERROR}
+
+//
+// WSAGETSELECTEVENT is intended for use by the Windows Sockets application
+// to extract the event code from the lParam in the response
+// to a WSAAsyncSelect().
+//
+
+function WSAGETSELECTEVENT(lParam: DWORD): WORD;
+{$EXTERNALSYM WSAGETSELECTEVENT}
+
+//
+// WSAGETSELECTERROR is intended for use by the Windows Sockets application
+// to extract the error code from the lParam in the response
+// to a WSAAsyncSelect().
+//
+
+function WSAGETSELECTERROR(lParam: DWORD): WORD;
+{$EXTERNALSYM WSAGETSELECTERROR}
+
+implementation
+
+const
+ ws2_32 = 'ws2_32.dll';
+ {$IFDEF UNICODE}
+ AWSuffix = 'W';
+ {$ELSE}
+ AWSuffix = 'A';
+ {$ENDIF UNICODE}
+
+procedure FD_CLR(fd: TSocket; var fdset: TFdSet);
+var
+ I: Cardinal;
+begin
+ I := 0;
+ while I < fdset.fd_count do
+ begin
+ if fdset.fd_array[I] = fd then
+ begin
+ while I < fdset.fd_count - 1 do
+ begin
+ fdset.fd_array[I] := fdset.fd_array[I + 1];
+ Inc(I);
+ end;
+ fdset.fd_count := fdset.fd_count - 1;
+ Break;
+ end;
+ Inc(I);
+ end;
+end;
+
+procedure _FD_SET(fd: TSocket; var fdset: TFDSet);
+var
+ I: Cardinal;
+begin
+ I := 0;
+ while I < fdset.fd_count do
+ begin
+ if fdset.fd_array[I] = fd then
+ Break;
+ Inc(I);
+ end;
+ if I = fdset.fd_count then
+ begin
+ if fdset.fd_count < FD_SETSIZE then
+ begin
+ fdset.fd_array[I] := fd;
+ fdset.fd_count := fdset.fd_count + 1;
+ end;
+ end;
+end;
+
+procedure FD_ZERO(var fdset: TFdSet);
+begin
+ fdset.fd_count := 0;
+end;
+
+function FD_ISSET(fd: TSocket; var fdset: TFdSet): Boolean;
+begin
+ Result := __WSAFDIsSet(fd, fdset) <> 0;
+end;
+
+function timerisset(const tvp: TTimeVal): Boolean;
+begin
+ Result := (tvp.tv_sec <> 0) or (tvp.tv_usec <> 0);
+end;
+
+procedure timerclear(var tvp: TTimeVal);
+begin
+ tvp.tv_sec := 0;
+ tvp.tv_usec := 0;
+end;
+
+function _IO(x, y: DWORD): DWORD;
+begin
+ Result := IOC_VOID or (x shl 8) or y;
+end;
+
+function _IOR(x, y, t: DWORD): DWORD;
+begin
+ Result := IOC_OUT or ((T and IOCPARM_MASK) shl 16) or (x shl 8) or y;
+end;
+
+function _IOW(x, y, t: DWORD): DWORD;
+begin
+ Result := DWORD(IOC_IN or ((T and IOCPARM_MASK) shl 16) or (x shl 8) or y);
+end;
+
+function IN_CLASSA(i: DWORD): Boolean;
+begin
+ Result := i and DWORD($80000000) = 0;
+end;
+
+function IN_CLASSB(i: DWORD): Boolean;
+begin
+ Result := i and DWORD($C0000000) = DWORD($80000000);
+end;
+
+function IN_CLASSC(i: DWORD): Boolean;
+begin
+ Result := (i and DWORD($e0000000)) = DWORD($C0000000);
+end;
+
+function IN_CLASSD(i: DWORD): Boolean;
+begin
+ Result := (i and DWORD($f0000000)) = DWORD($e0000000);
+end;
+
+function IN_MULTICAST(i: DWORD): Boolean;
+begin
+ Result := IN_CLASSD(i);
+end;
+
+function h_errno: Integer;
+begin
+ Result := WSAGetLastError;
+end;
+
+function _WSAIO(x, y: DWORD): DWORD;
+begin
+ Result := IOC_VOID or x or y;
+end;
+
+function _WSAIOR(x, y: DWORD): DWORD;
+begin
+ Result := IOC_OUT or x or y;
+end;
+
+function _WSAIOW(x, y: DWORD): DWORD;
+begin
+ Result := IOC_IN or x or y;
+end;
+
+function _WSAIORW(x, y: DWORD): DWORD;
+begin
+ Result := IOC_INOUT or x or y;
+end;
+
+function WSAMAKEASYNCREPLY(buflen, error: WORD): DWORD;
+begin
+ Result := MAKELONG(buflen, error);
+end;
+
+function WSAMAKESELECTREPLY(event, error: WORD): DWORD;
+begin
+ Result := MAKELONG(event, error);
+end;
+
+function WSAGETASYNCBUFLEN(lParam: DWORD): WORD;
+begin
+ Result := LOWORD(lParam);
+end;
+
+function WSAGETASYNCERROR(lParam: DWORD): WORD;
+begin
+ Result := HIWORD(lParam);
+end;
+
+function WSAGETSELECTEVENT(lParam: DWORD): WORD;
+begin
+ Result := LOWORD(lParam);
+end;
+
+function WSAGETSELECTERROR(lParam: DWORD): WORD;
+begin
+ Result := HIWORD(lParam);
+end;
+
+{$IFDEF DYNAMIC_LINK}
+
+var
+ ___WSAFDIsSet: Pointer;
+
+function __WSAFDIsSet;
+begin
+ GetProcedureAddress(___WSAFDIsSet, ws2_32, '__WSAFDIsSet');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [___WSAFDIsSet]
+ end;
+end;
+
+var
+ _accept: Pointer;
+
+function accept;
+begin
+ GetProcedureAddress(_accept, ws2_32, 'accept');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_accept]
+ end;
+end;
+
+var
+ _bind: Pointer;
+
+function bind;
+begin
+ GetProcedureAddress(_bind, ws2_32, 'bind');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_bind]
+ end;
+end;
+
+var
+ _closesocket: Pointer;
+
+function closesocket;
+begin
+ GetProcedureAddress(_closesocket, ws2_32, 'closesocket');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_closesocket]
+ end;
+end;
+
+var
+ _connect: Pointer;
+
+function connect;
+begin
+ GetProcedureAddress(_connect, ws2_32, 'connect');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_connect]
+ end;
+end;
+
+var
+ _ioctlsocket: Pointer;
+
+function ioctlsocket;
+begin
+ GetProcedureAddress(_ioctlsocket, ws2_32, 'ioctlsocket');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ioctlsocket]
+ end;
+end;
+
+var
+ _getpeername: Pointer;
+
+function getpeername;
+begin
+ GetProcedureAddress(_getpeername, ws2_32, 'getpeername');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_getpeername]
+ end;
+end;
+
+var
+ _getsockname: Pointer;
+
+function getsockname;
+begin
+ GetProcedureAddress(_getsockname, ws2_32, 'getsockname');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_getsockname]
+ end;
+end;
+
+var
+ _getsockopt: Pointer;
+
+function getsockopt;
+begin
+ GetProcedureAddress(_getsockopt, ws2_32, 'getsockopt');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_getsockopt]
+ end;
+end;
+
+var
+ _htonl: Pointer;
+
+function htonl;
+begin
+ GetProcedureAddress(_htonl, ws2_32, 'htonl');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_htonl]
+ end;
+end;
+
+var
+ _htons: Pointer;
+
+function htons;
+begin
+ GetProcedureAddress(_htons, ws2_32, 'htons');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_htons]
+ end;
+end;
+
+var
+ _inet_addr: Pointer;
+
+function inet_addr;
+begin
+ GetProcedureAddress(_inet_addr, ws2_32, 'inet_addr');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_inet_addr]
+ end;
+end;
+
+var
+ _inet_ntoa: Pointer;
+
+function inet_ntoa;
+begin
+ GetProcedureAddress(_inet_ntoa, ws2_32, 'inet_ntoa');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_inet_ntoa]
+ end;
+end;
+
+var
+ _listen: Pointer;
+
+function listen;
+begin
+ GetProcedureAddress(_listen, ws2_32, 'listen');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_listen]
+ end;
+end;
+
+var
+ _ntohl: Pointer;
+
+function ntohl;
+begin
+ GetProcedureAddress(_ntohl, ws2_32, 'ntohl');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ntohl]
+ end;
+end;
+
+var
+ _ntohs: Pointer;
+
+function ntohs;
+begin
+ GetProcedureAddress(_ntohs, ws2_32, 'ntohs');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ntohs]
+ end;
+end;
+
+var
+ _recv: Pointer;
+
+function recv;
+begin
+ GetProcedureAddress(_recv, ws2_32, 'recv');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_recv]
+ end;
+end;
+
+var
+ _recvfrom: Pointer;
+
+function recvfrom;
+begin
+ GetProcedureAddress(_recvfrom, ws2_32, 'recvfrom');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_recvfrom]
+ end;
+end;
+
+var
+ _select: Pointer;
+
+function select;
+begin
+ GetProcedureAddress(_select, ws2_32, 'select');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_select]
+ end;
+end;
+
+var
+ _send: Pointer;
+
+function send;
+begin
+ GetProcedureAddress(_send, ws2_32, 'send');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_send]
+ end;
+end;
+
+var
+ _sendto: Pointer;
+
+function sendto;
+begin
+ GetProcedureAddress(_sendto, ws2_32, 'sendto');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_sendto]
+ end;
+end;
+
+var
+ _setsockopt: Pointer;
+
+function setsockopt;
+begin
+ GetProcedureAddress(_setsockopt, ws2_32, 'setsockopt');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_setsockopt]
+ end;
+end;
+
+var
+ _shutdown: Pointer;
+
+function shutdown;
+begin
+ GetProcedureAddress(_shutdown, ws2_32, 'shutdown');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_shutdown]
+ end;
+end;
+
+var
+ _socket: Pointer;
+
+function socket;
+begin
+ GetProcedureAddress(_socket, ws2_32, 'socket');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_socket]
+ end;
+end;
+
+var
+ _gethostbyaddr: Pointer;
+
+function gethostbyaddr;
+begin
+ GetProcedureAddress(_gethostbyaddr, ws2_32, 'gethostbyaddr');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_gethostbyaddr]
+ end;
+end;
+
+var
+ _gethostbyname: Pointer;
+
+function gethostbyname;
+begin
+ GetProcedureAddress(_gethostbyname, ws2_32, 'gethostbyname');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_gethostbyname]
+ end;
+end;
+
+var
+ _gethostname: Pointer;
+
+function gethostname;
+begin
+ GetProcedureAddress(_gethostname, ws2_32, 'gethostname');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_gethostname]
+ end;
+end;
+
+var
+ _getservbyport: Pointer;
+
+function getservbyport;
+begin
+ GetProcedureAddress(_getservbyport, ws2_32, 'getservbyport');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_getservbyport]
+ end;
+end;
+
+var
+ _getservbyname: Pointer;
+
+function getservbyname;
+begin
+ GetProcedureAddress(_getservbyname, ws2_32, 'getservbyname');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_getservbyname]
+ end;
+end;
+
+var
+ _getprotobynumber: Pointer;
+
+function getprotobynumber;
+begin
+ GetProcedureAddress(_getprotobynumber, ws2_32, 'getprotobynumber');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_getprotobynumber]
+ end;
+end;
+
+var
+ _getprotobyname: Pointer;
+
+function getprotobyname;
+begin
+ GetProcedureAddress(_getprotobyname, ws2_32, 'getprotobyname');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_getprotobyname]
+ end;
+end;
+
+var
+ _WSAStartup: Pointer;
+
+function WSAStartup;
+begin
+ GetProcedureAddress(_WSAStartup, ws2_32, 'WSAStartup');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WSAStartup]
+ end;
+end;
+
+var
+ _WSACleanup: Pointer;
+
+function WSACleanup;
+begin
+ GetProcedureAddress(_WSACleanup, ws2_32, 'WSACleanup');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WSACleanup]
+ end;
+end;
+
+var
+ _WSASetLastError: Pointer;
+
+procedure WSASetLastError;
+begin
+ GetProcedureAddress(_WSASetLastError, ws2_32, 'WSASetLastError');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WSASetLastError]
+ end;
+end;
+
+var
+ _WSAGetLastError: Pointer;
+
+function WSAGetLastError;
+begin
+ GetProcedureAddress(_WSAGetLastError, ws2_32, 'WSAGetLastError');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WSAGetLastError]
+ end;
+end;
+
+var
+ _WSAIsBlocking: Pointer;
+
+function WSAIsBlocking;
+begin
+ GetProcedureAddress(_WSAIsBlocking, ws2_32, 'WSAIsBlocking');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WSAIsBlocking]
+ end;
+end;
+
+var
+ _WSAUnhookBlockingHook: Pointer;
+
+function WSAUnhookBlockingHook;
+begin
+ GetProcedureAddress(_WSAUnhookBlockingHook, ws2_32, 'WSAUnhookBlockingHook');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WSAUnhookBlockingHook]
+ end;
+end;
+
+var
+ _WSASetBlockingHook: Pointer;
+
+function WSASetBlockingHook;
+begin
+ GetProcedureAddress(_WSASetBlockingHook, ws2_32, 'WSASetBlockingHook');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WSASetBlockingHook]
+ end;
+end;
+
+var
+ _WSACancelBlockingCall: Pointer;
+
+function WSACancelBlockingCall;
+begin
+ GetProcedureAddress(_WSACancelBlockingCall, ws2_32, 'WSACancelBlockingCall');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WSACancelBlockingCall]
+ end;
+end;
+
+var
+ _WSAAsyncGetServByName: Pointer;
+
+function WSAAsyncGetServByName;
+begin
+ GetProcedureAddress(_WSAAsyncGetServByName, ws2_32, 'WSAAsyncGetServByName');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WSAAsyncGetServByName]
+ end;
+end;
+
+var
+ _WSAAsyncGetServByPort: Pointer;
+
+function WSAAsyncGetServByPort;
+begin
+ GetProcedureAddress(_WSAAsyncGetServByPort, ws2_32, 'WSAAsyncGetServByPort');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WSAAsyncGetServByPort]
+ end;
+end;
+
+var
+ _WSAAsyncGetProtoByName: Pointer;
+
+function WSAAsyncGetProtoByName;
+begin
+ GetProcedureAddress(_WSAAsyncGetProtoByName, ws2_32, 'WSAAsyncGetProtoByName');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WSAAsyncGetProtoByName]
+ end;
+end;
+
+var
+ _WSAAsyncGetProtoByNumber: Pointer;
+
+function WSAAsyncGetProtoByNumber;
+begin
+ GetProcedureAddress(_WSAAsyncGetProtoByNumber, ws2_32, 'WSAAsyncGetProtoByNumber');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WSAAsyncGetProtoByNumber]
+ end;
+end;
+
+var
+ _WSAAsyncGetHostByName: Pointer;
+
+function WSAAsyncGetHostByName;
+begin
+ GetProcedureAddress(_WSAAsyncGetHostByName, ws2_32, 'WSAAsyncGetHostByName');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WSAAsyncGetHostByName]
+ end;
+end;
+
+var
+ _WSAAsyncGetHostByAddr: Pointer;
+
+function WSAAsyncGetHostByAddr;
+begin
+ GetProcedureAddress(_WSAAsyncGetHostByAddr, ws2_32, 'WSAAsyncGetHostByAddr');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WSAAsyncGetHostByAddr]
+ end;
+end;
+
+var
+ _WSACancelAsyncRequest: Pointer;
+
+function WSACancelAsyncRequest;
+begin
+ GetProcedureAddress(_WSACancelAsyncRequest, ws2_32, 'WSACancelAsyncRequest');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WSACancelAsyncRequest]
+ end;
+end;
+
+var
+ _WSAAsyncSelect: Pointer;
+
+function WSAAsyncSelect;
+begin
+ GetProcedureAddress(_WSAAsyncSelect, ws2_32, 'WSAAsyncSelect');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WSAAsyncSelect]
+ end;
+end;
+
+var
+ _WSAAccept: Pointer;
+
+function WSAAccept;
+begin
+ GetProcedureAddress(_WSAAccept, ws2_32, 'WSAAccept');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WSAAccept]
+ end;
+end;
+
+var
+ _WSACloseEvent: Pointer;
+
+function WSACloseEvent;
+begin
+ GetProcedureAddress(_WSACloseEvent, ws2_32, 'WSACloseEvent');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WSACloseEvent]
+ end;
+end;
+
+var
+ _WSAConnect: Pointer;
+
+function WSAConnect;
+begin
+ GetProcedureAddress(_WSAConnect, ws2_32, 'WSAConnect');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WSAConnect]
+ end;
+end;
+
+var
+ _WSACreateEvent: Pointer;
+
+function WSACreateEvent;
+begin
+ GetProcedureAddress(_WSACreateEvent, ws2_32, 'WSACreateEvent');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WSACreateEvent]
+ end;
+end;
+
+var
+ _WSADuplicateSocketA: Pointer;
+
+function WSADuplicateSocketA;
+begin
+ GetProcedureAddress(_WSADuplicateSocketA, ws2_32, 'WSADuplicateSocketA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WSADuplicateSocketA]
+ end;
+end;
+
+var
+ _WSADuplicateSocketW: Pointer;
+
+function WSADuplicateSocketW;
+begin
+ GetProcedureAddress(_WSADuplicateSocketW, ws2_32, 'WSADuplicateSocketW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WSADuplicateSocketW]
+ end;
+end;
+
+var
+ _WSADuplicateSocket: Pointer;
+
+function WSADuplicateSocket;
+begin
+ GetProcedureAddress(_WSADuplicateSocket, ws2_32, 'WSADuplicateSocket' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WSADuplicateSocket]
+ end;
+end;
+
+var
+ _WSAEnumNetworkEvents: Pointer;
+
+function WSAEnumNetworkEvents;
+begin
+ GetProcedureAddress(_WSAEnumNetworkEvents, ws2_32, 'WSAEnumNetworkEvents');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WSAEnumNetworkEvents]
+ end;
+end;
+
+var
+ _WSAEnumProtocolsA: Pointer;
+
+function WSAEnumProtocolsA;
+begin
+ GetProcedureAddress(_WSAEnumProtocolsA, ws2_32, 'WSAEnumProtocolsA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WSAEnumProtocolsA]
+ end;
+end;
+
+var
+ _WSAEnumProtocolsW: Pointer;
+
+function WSAEnumProtocolsW;
+begin
+ GetProcedureAddress(_WSAEnumProtocolsW, ws2_32, 'WSAEnumProtocolsW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WSAEnumProtocolsW]
+ end;
+end;
+
+var
+ _WSAEnumProtocols: Pointer;
+
+function WSAEnumProtocols;
+begin
+ GetProcedureAddress(_WSAEnumProtocols, ws2_32, 'WSAEnumProtocols' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WSAEnumProtocols]
+ end;
+end;
+
+var
+ _WSAEventSelect: Pointer;
+
+function WSAEventSelect;
+begin
+ GetProcedureAddress(_WSAEventSelect, ws2_32, 'WSAEventSelect');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WSAEventSelect]
+ end;
+end;
+
+var
+ _WSAGetOverlappedResult: Pointer;
+
+function WSAGetOverlappedResult;
+begin
+ GetProcedureAddress(_WSAGetOverlappedResult, ws2_32, 'WSAGetOverlappedResult');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WSAGetOverlappedResult]
+ end;
+end;
+
+var
+ _WSAGetQOSByName: Pointer;
+
+function WSAGetQOSByName;
+begin
+ GetProcedureAddress(_WSAGetQOSByName, ws2_32, 'WSAGetQOSByName');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WSAGetQOSByName]
+ end;
+end;
+
+var
+ _WSAHtonl: Pointer;
+
+function WSAHtonl;
+begin
+ GetProcedureAddress(_WSAHtonl, ws2_32, 'WSAHtonl');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WSAHtonl]
+ end;
+end;
+
+var
+ _WSAHtons: Pointer;
+
+function WSAHtons;
+begin
+ GetProcedureAddress(_WSAHtons, ws2_32, 'WSAHtons');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WSAHtons]
+ end;
+end;
+
+var
+ _WSAIoctl: Pointer;
+
+function WSAIoctl;
+begin
+ GetProcedureAddress(_WSAIoctl, ws2_32, 'WSAIoctl');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WSAIoctl]
+ end;
+end;
+
+var
+ _WSAJoinLeaf: Pointer;
+
+function WSAJoinLeaf;
+begin
+ GetProcedureAddress(_WSAJoinLeaf, ws2_32, 'WSAJoinLeaf');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WSAJoinLeaf]
+ end;
+end;
+
+var
+ _WSANtohl: Pointer;
+
+function WSANtohl;
+begin
+ GetProcedureAddress(_WSANtohl, ws2_32, 'WSANtohl');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WSANtohl]
+ end;
+end;
+
+var
+ _WSANtohs: Pointer;
+
+function WSANtohs;
+begin
+ GetProcedureAddress(_WSANtohs, ws2_32, 'WSANtohs');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WSANtohs]
+ end;
+end;
+
+var
+ _WSARecv: Pointer;
+
+function WSARecv;
+begin
+ GetProcedureAddress(_WSARecv, ws2_32, 'WSARecv');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WSARecv]
+ end;
+end;
+
+var
+ _WSARecvDisconnect: Pointer;
+
+function WSARecvDisconnect;
+begin
+ GetProcedureAddress(_WSARecvDisconnect, ws2_32, 'WSARecvDisconnect');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WSARecvDisconnect]
+ end;
+end;
+
+var
+ _WSARecvFrom: Pointer;
+
+function WSARecvFrom;
+begin
+ GetProcedureAddress(_WSARecvFrom, ws2_32, 'WSARecvFrom');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WSARecvFrom]
+ end;
+end;
+
+var
+ _WSAResetEvent: Pointer;
+
+function WSAResetEvent;
+begin
+ GetProcedureAddress(_WSAResetEvent, ws2_32, 'WSAResetEvent');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WSAResetEvent]
+ end;
+end;
+
+var
+ _WSASend: Pointer;
+
+function WSASend;
+begin
+ GetProcedureAddress(_WSASend, ws2_32, 'WSASend');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WSASend]
+ end;
+end;
+
+var
+ _WSASendDisconnect: Pointer;
+
+function WSASendDisconnect;
+begin
+ GetProcedureAddress(_WSASendDisconnect, ws2_32, 'WSASendDisconnect');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WSASendDisconnect]
+ end;
+end;
+
+var
+ _WSASendTo: Pointer;
+
+function WSASendTo;
+begin
+ GetProcedureAddress(_WSASendTo, ws2_32, 'WSASendTo');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WSASendTo]
+ end;
+end;
+
+var
+ _WSASetEvent: Pointer;
+
+function WSASetEvent;
+begin
+ GetProcedureAddress(_WSASetEvent, ws2_32, 'WSASetEvent');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WSASetEvent]
+ end;
+end;
+
+var
+ _WSASocketA: Pointer;
+
+function WSASocketA;
+begin
+ GetProcedureAddress(_WSASocketA, ws2_32, 'WSASocketA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WSASocketA]
+ end;
+end;
+
+var
+ _WSASocketW: Pointer;
+
+function WSASocketW;
+begin
+ GetProcedureAddress(_WSASocketW, ws2_32, 'WSASocketW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WSASocketW]
+ end;
+end;
+
+var
+ _WSASocket: Pointer;
+
+function WSASocket;
+begin
+ GetProcedureAddress(_WSASocket, ws2_32, 'WSASocket' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WSASocket]
+ end;
+end;
+
+var
+ _WSAWaitForMultipleEvents: Pointer;
+
+function WSAWaitForMultipleEvents;
+begin
+ GetProcedureAddress(_WSAWaitForMultipleEvents, ws2_32, 'WSAWaitForMultipleEvents');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WSAWaitForMultipleEvents]
+ end;
+end;
+
+var
+ _WSAAddressToStringA: Pointer;
+
+function WSAAddressToStringA;
+begin
+ GetProcedureAddress(_WSAAddressToStringA, ws2_32, 'WSAAddressToStringA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WSAAddressToStringA]
+ end;
+end;
+
+var
+ _WSAAddressToStringW: Pointer;
+
+function WSAAddressToStringW;
+begin
+ GetProcedureAddress(_WSAAddressToStringW, ws2_32, 'WSAAddressToStringW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WSAAddressToStringW]
+ end;
+end;
+
+var
+ _WSAAddressToString: Pointer;
+
+function WSAAddressToString;
+begin
+ GetProcedureAddress(_WSAAddressToString, ws2_32, 'WSAAddressToString' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WSAAddressToString]
+ end;
+end;
+
+var
+ _WSAStringToAddressA: Pointer;
+
+function WSAStringToAddressA;
+begin
+ GetProcedureAddress(_WSAStringToAddressA, ws2_32, 'WSAStringToAddressA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WSAStringToAddressA]
+ end;
+end;
+
+var
+ _WSAStringToAddressW: Pointer;
+
+function WSAStringToAddressW;
+begin
+ GetProcedureAddress(_WSAStringToAddressW, ws2_32, 'WSAStringToAddressW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WSAStringToAddressW]
+ end;
+end;
+
+var
+ _WSAStringToAddress: Pointer;
+
+function WSAStringToAddress;
+begin
+ GetProcedureAddress(_WSAStringToAddress, ws2_32, 'WSAStringToAddress' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WSAStringToAddress]
+ end;
+end;
+
+var
+ _WSALookupServiceBeginA: Pointer;
+
+function WSALookupServiceBeginA;
+begin
+ GetProcedureAddress(_WSALookupServiceBeginA, ws2_32, 'WSALookupServiceBeginA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WSALookupServiceBeginA]
+ end;
+end;
+
+var
+ _WSALookupServiceBeginW: Pointer;
+
+function WSALookupServiceBeginW;
+begin
+ GetProcedureAddress(_WSALookupServiceBeginW, ws2_32, 'WSALookupServiceBeginW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WSALookupServiceBeginW]
+ end;
+end;
+
+var
+ _WSALookupServiceBegin: Pointer;
+
+function WSALookupServiceBegin;
+begin
+ GetProcedureAddress(_WSALookupServiceBegin, ws2_32, 'WSALookupServiceBegin' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WSALookupServiceBegin]
+ end;
+end;
+
+var
+ _WSALookupServiceNextA: Pointer;
+
+function WSALookupServiceNextA;
+begin
+ GetProcedureAddress(_WSALookupServiceNextA, ws2_32, 'WSALookupServiceNextA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WSALookupServiceNextA]
+ end;
+end;
+
+var
+ _WSALookupServiceNextW: Pointer;
+
+function WSALookupServiceNextW;
+begin
+ GetProcedureAddress(_WSALookupServiceNextW, ws2_32, 'WSALookupServiceNextW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WSALookupServiceNextW]
+ end;
+end;
+
+var
+ _WSALookupServiceNext: Pointer;
+
+function WSALookupServiceNext;
+begin
+ GetProcedureAddress(_WSALookupServiceNext, ws2_32, 'WSALookupServiceNext' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WSALookupServiceNext]
+ end;
+end;
+
+var
+ _WSANSPIoctl: Pointer;
+
+function WSANSPIoctl;
+begin
+ GetProcedureAddress(_WSANSPIoctl, ws2_32, 'WSANSPIoctl');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WSANSPIoctl]
+ end;
+end;
+
+var
+ _WSALookupServiceEnd: Pointer;
+
+function WSALookupServiceEnd;
+begin
+ GetProcedureAddress(_WSALookupServiceEnd, ws2_32, 'WSALookupServiceEnd');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WSALookupServiceEnd]
+ end;
+end;
+
+var
+ _WSAInstallServiceClassA: Pointer;
+
+function WSAInstallServiceClassA;
+begin
+ GetProcedureAddress(_WSAInstallServiceClassA, ws2_32, 'WSAInstallServiceClassA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WSAInstallServiceClassA]
+ end;
+end;
+
+var
+ _WSAInstallServiceClassW: Pointer;
+
+function WSAInstallServiceClassW;
+begin
+ GetProcedureAddress(_WSAInstallServiceClassW, ws2_32, 'WSAInstallServiceClassW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WSAInstallServiceClassW]
+ end;
+end;
+
+var
+ _WSAInstallServiceClass: Pointer;
+
+function WSAInstallServiceClass;
+begin
+ GetProcedureAddress(_WSAInstallServiceClass, ws2_32, 'WSAInstallServiceClass' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WSAInstallServiceClass]
+ end;
+end;
+
+var
+ _WSARemoveServiceClass: Pointer;
+
+function WSARemoveServiceClass;
+begin
+ GetProcedureAddress(_WSARemoveServiceClass, ws2_32, 'WSARemoveServiceClass');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WSARemoveServiceClass]
+ end;
+end;
+
+var
+ _WSAGetServiceClassInfoA: Pointer;
+
+function WSAGetServiceClassInfoA;
+begin
+ GetProcedureAddress(_WSAGetServiceClassInfoA, ws2_32, 'WSAGetServiceClassInfoA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WSAGetServiceClassInfoA]
+ end;
+end;
+
+var
+ _WSAGetServiceClassInfoW: Pointer;
+
+function WSAGetServiceClassInfoW;
+begin
+ GetProcedureAddress(_WSAGetServiceClassInfoW, ws2_32, 'WSAGetServiceClassInfoW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WSAGetServiceClassInfoW]
+ end;
+end;
+
+var
+ _WSAGetServiceClassInfo: Pointer;
+
+function WSAGetServiceClassInfo;
+begin
+ GetProcedureAddress(_WSAGetServiceClassInfo, ws2_32, 'WSAGetServiceClassInfo' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WSAGetServiceClassInfo]
+ end;
+end;
+
+var
+ _WSAEnumNameSpaceProvidersA: Pointer;
+
+function WSAEnumNameSpaceProvidersA;
+begin
+ GetProcedureAddress(_WSAEnumNameSpaceProvidersA, ws2_32, 'WSAEnumNameSpaceProvidersA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WSAEnumNameSpaceProvidersA]
+ end;
+end;
+
+var
+ _WSAEnumNameSpaceProvidersW: Pointer;
+
+function WSAEnumNameSpaceProvidersW;
+begin
+ GetProcedureAddress(_WSAEnumNameSpaceProvidersW, ws2_32, 'WSAEnumNameSpaceProvidersW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WSAEnumNameSpaceProvidersW]
+ end;
+end;
+
+var
+ _WSAEnumNameSpaceProviders: Pointer;
+
+function WSAEnumNameSpaceProviders;
+begin
+ GetProcedureAddress(_WSAEnumNameSpaceProviders, ws2_32, 'WSAEnumNameSpaceProviders' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WSAEnumNameSpaceProviders]
+ end;
+end;
+
+var
+ _WSAGetServClassNameByClassIdA: Pointer;
+
+function WSAGetServiceClassNameByClassIdA;
+begin
+ GetProcedureAddress(_WSAGetServClassNameByClassIdA, ws2_32, 'WSAGetServiceClassNameByClassIdA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WSAGetServClassNameByClassIdA]
+ end;
+end;
+
+var
+ _WSAGetServClassNameByClassIdW: Pointer;
+
+function WSAGetServiceClassNameByClassIdW;
+begin
+ GetProcedureAddress(_WSAGetServClassNameByClassIdW, ws2_32, 'WSAGetServiceClassNameByClassIdW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WSAGetServClassNameByClassIdW]
+ end;
+end;
+
+var
+ _WSAGetServClassNameByClassId: Pointer;
+
+function WSAGetServiceClassNameByClassId;
+begin
+ GetProcedureAddress(_WSAGetServClassNameByClassId, ws2_32, 'WSAGetServiceClassNameByClassId' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WSAGetServClassNameByClassId]
+ end;
+end;
+
+var
+ _WSASetServiceA: Pointer;
+
+function WSASetServiceA;
+begin
+ GetProcedureAddress(_WSASetServiceA, ws2_32, 'WSASetServiceA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WSASetServiceA]
+ end;
+end;
+
+var
+ _WSASetServiceW: Pointer;
+
+function WSASetServiceW;
+begin
+ GetProcedureAddress(_WSASetServiceW, ws2_32, 'WSASetServiceW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WSASetServiceW]
+ end;
+end;
+
+var
+ _WSASetService: Pointer;
+
+function WSASetService;
+begin
+ GetProcedureAddress(_WSASetService, ws2_32, 'WSASetService' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WSASetService]
+ end;
+end;
+
+var
+ _WSAProviderConfigChange: Pointer;
+
+function WSAProviderConfigChange;
+begin
+ GetProcedureAddress(_WSAProviderConfigChange, ws2_32, 'WSAProviderConfigChange');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WSAProviderConfigChange]
+ end;
+end;
+
+{$ELSE}
+
+function __WSAFDIsSet; external ws2_32 name '__WSAFDIsSet';
+function accept; external ws2_32 name 'accept';
+function bind; external ws2_32 name 'bind';
+function closesocket; external ws2_32 name 'closesocket';
+function connect; external ws2_32 name 'connect';
+function ioctlsocket; external ws2_32 name 'ioctlsocket';
+function getpeername; external ws2_32 name 'getpeername';
+function getsockname; external ws2_32 name 'getsockname';
+function getsockopt; external ws2_32 name 'getsockopt';
+function htonl; external ws2_32 name 'htonl';
+function htons; external ws2_32 name 'htons';
+function inet_addr; external ws2_32 name 'inet_addr';
+function inet_ntoa; external ws2_32 name 'inet_ntoa';
+function listen; external ws2_32 name 'listen';
+function ntohl; external ws2_32 name 'ntohl';
+function ntohs; external ws2_32 name 'ntohs';
+function recv; external ws2_32 name 'recv';
+function recvfrom; external ws2_32 name 'recvfrom';
+function select; external ws2_32 name 'select';
+function send; external ws2_32 name 'send';
+function sendto; external ws2_32 name 'sendto';
+function setsockopt; external ws2_32 name 'setsockopt';
+function shutdown; external ws2_32 name 'shutdown';
+function socket; external ws2_32 name 'socket';
+function gethostbyaddr; external ws2_32 name 'gethostbyaddr';
+function gethostbyname; external ws2_32 name 'gethostbyname';
+function gethostname; external ws2_32 name 'gethostname';
+function getservbyport; external ws2_32 name 'getservbyport';
+function getservbyname; external ws2_32 name 'getservbyname';
+function getprotobynumber; external ws2_32 name 'getprotobynumber';
+function getprotobyname; external ws2_32 name 'getprotobyname';
+function WSAStartup; external ws2_32 name 'WSAStartup';
+function WSACleanup; external ws2_32 name 'WSACleanup';
+procedure WSASetLastError; external ws2_32 name 'WSASetLastError';
+function WSAGetLastError; external ws2_32 name 'WSAGetLastError';
+function WSAIsBlocking; external ws2_32 name 'WSAIsBlocking';
+function WSAUnhookBlockingHook; external ws2_32 name 'WSAUnhookBlockingHook';
+function WSASetBlockingHook; external ws2_32 name 'WSASetBlockingHook';
+function WSACancelBlockingCall; external ws2_32 name 'WSACancelBlockingCall';
+function WSAAsyncGetServByName; external ws2_32 name 'WSAAsyncGetServByName';
+function WSAAsyncGetServByPort; external ws2_32 name 'WSAAsyncGetServByPort';
+function WSAAsyncGetProtoByName; external ws2_32 name 'WSAAsyncGetProtoByName';
+function WSAAsyncGetProtoByNumber; external ws2_32 name 'WSAAsyncGetProtoByNumber';
+function WSAAsyncGetHostByName; external ws2_32 name 'WSAAsyncGetHostByName';
+function WSAAsyncGetHostByAddr; external ws2_32 name 'WSAAsyncGetHostByAddr';
+function WSACancelAsyncRequest; external ws2_32 name 'WSACancelAsyncRequest';
+function WSAAsyncSelect; external ws2_32 name 'WSAAsyncSelect';
+function WSAAccept; external ws2_32 name 'WSAAccept';
+function WSACloseEvent; external ws2_32 name 'WSACloseEvent';
+function WSAConnect; external ws2_32 name 'WSAConnect';
+function WSACreateEvent; external ws2_32 name 'WSACreateEvent';
+function WSADuplicateSocketA; external ws2_32 name 'WSADuplicateSocketA';
+function WSADuplicateSocketW; external ws2_32 name 'WSADuplicateSocketW';
+function WSADuplicateSocket; external ws2_32 name 'WSADuplicateSocket' + AWSuffix;
+function WSAEnumNetworkEvents; external ws2_32 name 'WSAEnumNetworkEvents';
+function WSAEnumProtocolsA; external ws2_32 name 'WSAEnumProtocolsA';
+function WSAEnumProtocolsW; external ws2_32 name 'WSAEnumProtocolsW';
+function WSAEnumProtocols; external ws2_32 name 'WSAEnumProtocols' + AWSuffix;
+function WSAEventSelect; external ws2_32 name 'WSAEventSelect';
+function WSAGetOverlappedResult; external ws2_32 name 'WSAGetOverlappedResult';
+function WSAGetQOSByName; external ws2_32 name 'WSAGetQOSByName';
+function WSAHtonl; external ws2_32 name 'WSAHtonl';
+function WSAHtons; external ws2_32 name 'WSAHtons';
+function WSAIoctl; external ws2_32 name 'WSAIoctl';
+function WSAJoinLeaf; external ws2_32 name 'WSAJoinLeaf';
+function WSANtohl; external ws2_32 name 'WSANtohl';
+function WSANtohs; external ws2_32 name 'WSANtohs';
+function WSARecv; external ws2_32 name 'WSARecv';
+function WSARecvDisconnect; external ws2_32 name 'WSARecvDisconnect';
+function WSARecvFrom; external ws2_32 name 'WSARecvFrom';
+function WSAResetEvent; external ws2_32 name 'WSAResetEvent';
+function WSASend; external ws2_32 name 'WSASend';
+function WSASendDisconnect; external ws2_32 name 'WSASendDisconnect';
+function WSASendTo; external ws2_32 name 'WSASendTo';
+function WSASetEvent; external ws2_32 name 'WSASetEvent';
+function WSASocketA; external ws2_32 name 'WSASocketA';
+function WSASocketW; external ws2_32 name 'WSASocketW';
+function WSASocket; external ws2_32 name 'WSASocket' + AWSuffix;
+function WSAWaitForMultipleEvents; external ws2_32 name 'WSAWaitForMultipleEvents';
+function WSAAddressToStringA; external ws2_32 name 'WSAAddressToStringA';
+function WSAAddressToStringW; external ws2_32 name 'WSAAddressToStringW';
+function WSAAddressToString; external ws2_32 name 'WSAAddressToString' + AWSuffix;
+function WSAStringToAddressA; external ws2_32 name 'WSAStringToAddressA';
+function WSAStringToAddressW; external ws2_32 name 'WSAStringToAddressW';
+function WSAStringToAddress; external ws2_32 name 'WSAStringToAddress' + AWSuffix;
+function WSALookupServiceBeginA; external ws2_32 name 'WSALookupServiceBeginA';
+function WSALookupServiceBeginW; external ws2_32 name 'WSALookupServiceBeginW';
+function WSALookupServiceBegin; external ws2_32 name 'WSALookupServiceBegin' + AWSuffix;
+function WSALookupServiceNextA; external ws2_32 name 'WSALookupServiceNextA';
+function WSALookupServiceNextW; external ws2_32 name 'WSALookupServiceNextW';
+function WSALookupServiceNext; external ws2_32 name 'WSALookupServiceNext' + AWSuffix;
+function WSANSPIoctl; external ws2_32 name 'WSANSPIoctl';
+function WSALookupServiceEnd; external ws2_32 name 'WSALookupServiceEnd';
+function WSAInstallServiceClassA; external ws2_32 name 'WSAInstallServiceClassA';
+function WSAInstallServiceClassW; external ws2_32 name 'WSAInstallServiceClassW';
+function WSAInstallServiceClass; external ws2_32 name 'WSAInstallServiceClass' + AWSuffix;
+function WSARemoveServiceClass; external ws2_32 name 'WSARemoveServiceClass';
+function WSAGetServiceClassInfoA; external ws2_32 name 'WSAGetServiceClassInfoA';
+function WSAGetServiceClassInfoW; external ws2_32 name 'WSAGetServiceClassInfoW';
+function WSAGetServiceClassInfo; external ws2_32 name 'WSAGetServiceClassInfo' + AWSuffix;
+function WSAEnumNameSpaceProvidersA; external ws2_32 name 'WSAEnumNameSpaceProvidersA';
+function WSAEnumNameSpaceProvidersW; external ws2_32 name 'WSAEnumNameSpaceProvidersW';
+function WSAEnumNameSpaceProviders; external ws2_32 name 'WSAEnumNameSpaceProviders' + AWSuffix;
+function WSAGetServiceClassNameByClassIdA; external ws2_32 name 'WSAGetServiceClassNameByClassIdA';
+function WSAGetServiceClassNameByClassIdW; external ws2_32 name 'WSAGetServiceClassNameByClassIdW';
+function WSAGetServiceClassNameByClassId; external ws2_32 name 'WSAGetServiceClassNameByClassId' + AWSuffix;
+function WSASetServiceA; external ws2_32 name 'WSASetServiceA';
+function WSASetServiceW; external ws2_32 name 'WSASetServiceW';
+function WSASetService; external ws2_32 name 'WSASetService' + AWSuffix;
+function WSAProviderConfigChange; external ws2_32 name 'WSAProviderConfigChange';
+
+{$ENDIF DYNAMIC_LINK}
+
+end.
diff --git a/packages/extra/winunits/jwawinsvc.pas b/packages/extra/winunits/jwawinsvc.pas
index 050e1779e3..5957fcbec1 100644
--- a/packages/extra/winunits/jwawinsvc.pas
+++ b/packages/extra/winunits/jwawinsvc.pas
@@ -1,1863 +1,1863 @@
-{******************************************************************************}
-{ }
-{ Services API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: winsvc.h, released June 2000. The original Pascal }
-{ code is: WinSvc.pas, released December 2000. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwawinsvc.pas,v 1.1 2005/04/04 07:56:11 marco Exp $
-
-unit JwaWinSvc;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "WinSvc.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaWinNT, JwaWinType;
-
-//
-// Service database names
-//
-
-const
- SERVICES_ACTIVE_DATABASEW = 'ServicesActive';
- {$EXTERNALSYM SERVICES_ACTIVE_DATABASEW}
- SERVICES_FAILED_DATABASEW = 'ServicesFailed';
- {$EXTERNALSYM SERVICES_FAILED_DATABASEW}
-
- SERVICES_ACTIVE_DATABASEA = 'ServicesActive';
- {$EXTERNALSYM SERVICES_ACTIVE_DATABASEA}
- SERVICES_FAILED_DATABASEA = 'ServicesFailed';
- {$EXTERNALSYM SERVICES_FAILED_DATABASEA}
-
-//
-// Character to designate that a name is a group
-//
-
- SC_GROUP_IDENTIFIERW = '+';
- {$EXTERNALSYM SC_GROUP_IDENTIFIERW}
- SC_GROUP_IDENTIFIERA = '+';
- {$EXTERNALSYM SC_GROUP_IDENTIFIERA}
-
- {$IFDEF UNICODE}
-
- SERVICES_ACTIVE_DATABASE = SERVICES_ACTIVE_DATABASEW;
- {$EXTERNALSYM SERVICES_ACTIVE_DATABASE}
- SERVICES_FAILED_DATABASE = SERVICES_FAILED_DATABASEW;
- {$EXTERNALSYM SERVICES_FAILED_DATABASE}
-
- SC_GROUP_IDENTIFIER = SC_GROUP_IDENTIFIERW;
- {$EXTERNALSYM SC_GROUP_IDENTIFIER}
-
- {$ELSE}
-
- SERVICES_ACTIVE_DATABASE = SERVICES_ACTIVE_DATABASEA;
- {$EXTERNALSYM SERVICES_ACTIVE_DATABASE}
- SERVICES_FAILED_DATABASE = SERVICES_FAILED_DATABASEA;
- {$EXTERNALSYM SERVICES_FAILED_DATABASE}
-
- SC_GROUP_IDENTIFIER = SC_GROUP_IDENTIFIERA;
- {$EXTERNALSYM SC_GROUP_IDENTIFIER}
-
- {$ENDIF UNICODE}
-
-//
-// Value to indicate no change to an optional parameter
-//
-
- SERVICE_NO_CHANGE = $ffffffff;
- {$EXTERNALSYM SERVICE_NO_CHANGE}
-
-//
-// Service State -- for Enum Requests (Bit Mask)
-//
-
- SERVICE_ACTIVE = $00000001;
- {$EXTERNALSYM SERVICE_ACTIVE}
- SERVICE_INACTIVE = $00000002;
- {$EXTERNALSYM SERVICE_INACTIVE}
- SERVICE_STATE_ALL = SERVICE_ACTIVE or SERVICE_INACTIVE;
- {$EXTERNALSYM SERVICE_STATE_ALL}
-
-//
-// Controls
-//
-
- SERVICE_CONTROL_STOP = $00000001;
- {$EXTERNALSYM SERVICE_CONTROL_STOP}
- SERVICE_CONTROL_PAUSE = $00000002;
- {$EXTERNALSYM SERVICE_CONTROL_PAUSE}
- SERVICE_CONTROL_CONTINUE = $00000003;
- {$EXTERNALSYM SERVICE_CONTROL_CONTINUE}
- SERVICE_CONTROL_INTERROGATE = $00000004;
- {$EXTERNALSYM SERVICE_CONTROL_INTERROGATE}
- SERVICE_CONTROL_SHUTDOWN = $00000005;
- {$EXTERNALSYM SERVICE_CONTROL_SHUTDOWN}
- SERVICE_CONTROL_PARAMCHANGE = $00000006;
- {$EXTERNALSYM SERVICE_CONTROL_PARAMCHANGE}
- SERVICE_CONTROL_NETBINDADD = $00000007;
- {$EXTERNALSYM SERVICE_CONTROL_NETBINDADD}
- SERVICE_CONTROL_NETBINDREMOVE = $00000008;
- {$EXTERNALSYM SERVICE_CONTROL_NETBINDREMOVE}
- SERVICE_CONTROL_NETBINDENABLE = $00000009;
- {$EXTERNALSYM SERVICE_CONTROL_NETBINDENABLE}
- SERVICE_CONTROL_NETBINDDISABLE = $0000000A;
- {$EXTERNALSYM SERVICE_CONTROL_NETBINDDISABLE}
- SERVICE_CONTROL_DEVICEEVENT = $0000000B;
- {$EXTERNALSYM SERVICE_CONTROL_DEVICEEVENT}
- SERVICE_CONTROL_HARDWAREPROFILECHANGE = $0000000C;
- {$EXTERNALSYM SERVICE_CONTROL_HARDWAREPROFILECHANGE}
- SERVICE_CONTROL_POWEREVENT = $0000000D;
- {$EXTERNALSYM SERVICE_CONTROL_POWEREVENT}
- SERVICE_CONTROL_SESSIONCHANGE = $0000000E;
- {$EXTERNALSYM SERVICE_CONTROL_SESSIONCHANGE}
-
-//
-// Service State -- for CurrentState
-//
-
- SERVICE_STOPPED = $00000001;
- {$EXTERNALSYM SERVICE_STOPPED}
- SERVICE_START_PENDING = $00000002;
- {$EXTERNALSYM SERVICE_START_PENDING}
- SERVICE_STOP_PENDING = $00000003;
- {$EXTERNALSYM SERVICE_STOP_PENDING}
- SERVICE_RUNNING = $00000004;
- {$EXTERNALSYM SERVICE_RUNNING}
- SERVICE_CONTINUE_PENDING = $00000005;
- {$EXTERNALSYM SERVICE_CONTINUE_PENDING}
- SERVICE_PAUSE_PENDING = $00000006;
- {$EXTERNALSYM SERVICE_PAUSE_PENDING}
- SERVICE_PAUSED = $00000007;
- {$EXTERNALSYM SERVICE_PAUSED}
-
-//
-// Controls Accepted (Bit Mask)
-//
-
- SERVICE_ACCEPT_STOP = $00000001;
- {$EXTERNALSYM SERVICE_ACCEPT_STOP}
- SERVICE_ACCEPT_PAUSE_CONTINUE = $00000002;
- {$EXTERNALSYM SERVICE_ACCEPT_PAUSE_CONTINUE}
- SERVICE_ACCEPT_SHUTDOWN = $00000004;
- {$EXTERNALSYM SERVICE_ACCEPT_SHUTDOWN}
- SERVICE_ACCEPT_PARAMCHANGE = $00000008;
- {$EXTERNALSYM SERVICE_ACCEPT_PARAMCHANGE}
- SERVICE_ACCEPT_NETBINDCHANGE = $00000010;
- {$EXTERNALSYM SERVICE_ACCEPT_NETBINDCHANGE}
- SERVICE_ACCEPT_HARDWAREPROFILECHANGE = $00000020;
- {$EXTERNALSYM SERVICE_ACCEPT_HARDWAREPROFILECHANGE}
- SERVICE_ACCEPT_POWEREVENT = $00000040;
- {$EXTERNALSYM SERVICE_ACCEPT_POWEREVENT}
- SERVICE_ACCEPT_SESSIONCHANGE = $00000080;
- {$EXTERNALSYM SERVICE_ACCEPT_SESSIONCHANGE}
-
-//
-// Service Control Manager object specific access types
-//
-
- SC_MANAGER_CONNECT = $0001;
- {$EXTERNALSYM SC_MANAGER_CONNECT}
- SC_MANAGER_CREATE_SERVICE = $0002;
- {$EXTERNALSYM SC_MANAGER_CREATE_SERVICE}
- SC_MANAGER_ENUMERATE_SERVICE = $0004;
- {$EXTERNALSYM SC_MANAGER_ENUMERATE_SERVICE}
- SC_MANAGER_LOCK = $0008;
- {$EXTERNALSYM SC_MANAGER_LOCK}
- SC_MANAGER_QUERY_LOCK_STATUS = $0010;
- {$EXTERNALSYM SC_MANAGER_QUERY_LOCK_STATUS}
- SC_MANAGER_MODIFY_BOOT_CONFIG = $0020;
- {$EXTERNALSYM SC_MANAGER_MODIFY_BOOT_CONFIG}
-
- SC_MANAGER_ALL_ACCESS = STANDARD_RIGHTS_REQUIRED or
- SC_MANAGER_CONNECT or
- SC_MANAGER_CREATE_SERVICE or
- SC_MANAGER_ENUMERATE_SERVICE or
- SC_MANAGER_LOCK or
- SC_MANAGER_QUERY_LOCK_STATUS or
- SC_MANAGER_MODIFY_BOOT_CONFIG;
- {$EXTERNALSYM SC_MANAGER_ALL_ACCESS}
-
-//
-// Service object specific access type
-//
-
- SERVICE_QUERY_CONFIG = $0001;
- {$EXTERNALSYM SERVICE_QUERY_CONFIG}
- SERVICE_CHANGE_CONFIG = $0002;
- {$EXTERNALSYM SERVICE_CHANGE_CONFIG}
- SERVICE_QUERY_STATUS = $0004;
- {$EXTERNALSYM SERVICE_QUERY_STATUS}
- SERVICE_ENUMERATE_DEPENDENTS = $0008;
- {$EXTERNALSYM SERVICE_ENUMERATE_DEPENDENTS}
- SERVICE_START = $0010;
- {$EXTERNALSYM SERVICE_START}
- SERVICE_STOP = $0020;
- {$EXTERNALSYM SERVICE_STOP}
- SERVICE_PAUSE_CONTINUE = $0040;
- {$EXTERNALSYM SERVICE_PAUSE_CONTINUE}
- SERVICE_INTERROGATE = $0080;
- {$EXTERNALSYM SERVICE_INTERROGATE}
- SERVICE_USER_DEFINED_CONTROL = $0100;
- {$EXTERNALSYM SERVICE_USER_DEFINED_CONTROL}
-
- SERVICE_ALL_ACCESS = STANDARD_RIGHTS_REQUIRED or
- SERVICE_QUERY_CONFIG or
- SERVICE_CHANGE_CONFIG or
- SERVICE_QUERY_STATUS or
- SERVICE_ENUMERATE_DEPENDENTS or
- SERVICE_START or
- SERVICE_STOP or
- SERVICE_PAUSE_CONTINUE or
- SERVICE_INTERROGATE or
- SERVICE_USER_DEFINED_CONTROL;
- {$EXTERNALSYM SERVICE_ALL_ACCESS}
-
-//
-// Service flags for QueryServiceStatusEx
-//
-
- SERVICE_RUNS_IN_SYSTEM_PROCESS = $00000001;
- {$EXTERNALSYM SERVICE_RUNS_IN_SYSTEM_PROCESS}
-
-//
-// Info levels for ChangeServiceConfig2 and QueryServiceConfig2
-//
-
- SERVICE_CONFIG_DESCRIPTION = 1;
- {$EXTERNALSYM SERVICE_CONFIG_DESCRIPTION}
- SERVICE_CONFIG_FAILURE_ACTIONS = 2;
- {$EXTERNALSYM SERVICE_CONFIG_FAILURE_ACTIONS}
-
-//
-// Service description string
-//
-
-type
- LPSERVICE_DESCRIPTIONA = ^SERVICE_DESCRIPTIONA;
- {$EXTERNALSYM LPSERVICE_DESCRIPTIONA}
- _SERVICE_DESCRIPTIONA = record
- lpDescription: LPSTR;
- end;
- {$EXTERNALSYM _SERVICE_DESCRIPTIONA}
- SERVICE_DESCRIPTIONA = _SERVICE_DESCRIPTIONA;
- {$EXTERNALSYM SERVICE_DESCRIPTIONA}
- TServiceDescriptionA = SERVICE_DESCRIPTIONA;
- PServiceDescriptionA = LPSERVICE_DESCRIPTIONA;
-
-//
-// Service description string
-//
-
- LPSERVICE_DESCRIPTIONW = ^SERVICE_DESCRIPTIONW;
- {$EXTERNALSYM LPSERVICE_DESCRIPTIONW}
- _SERVICE_DESCRIPTIONW = record
- lpDescription: LPWSTR;
- end;
- {$EXTERNALSYM _SERVICE_DESCRIPTIONW}
- SERVICE_DESCRIPTIONW = _SERVICE_DESCRIPTIONW;
- {$EXTERNALSYM SERVICE_DESCRIPTIONW}
- TServiceDescriptionW = SERVICE_DESCRIPTIONW;
- PServiceDescriptionW = LPSERVICE_DESCRIPTIONW;
-
- {$IFDEF UNICODE}
- SERVICE_DESCRIPTION = SERVICE_DESCRIPTIONW;
- {$EXTERNALSYM SERVICE_DESCRIPTION}
- LPSERVICE_DESCRIPTION = LPSERVICE_DESCRIPTIONW;
- {$EXTERNALSYM LPSERVICE_DESCRIPTION}
- TServiceDescription = TServiceDescriptionW;
- PServiceDescription = PServiceDescriptionW;
- {$ELSE}
- SERVICE_DESCRIPTION = SERVICE_DESCRIPTIONA;
- {$EXTERNALSYM SERVICE_DESCRIPTION}
- LPSERVICE_DESCRIPTION = LPSERVICE_DESCRIPTIONA;
- {$EXTERNALSYM LPSERVICE_DESCRIPTION}
- TServiceDescription = TServiceDescriptionA;
- PServiceDescription = PServiceDescriptionA;
- {$ENDIF UNICODE}
-
-//
-// Actions to take on service failure
-//
-
- _SC_ACTION_TYPE = (SC_ACTION_NONE, SC_ACTION_RESTART, SC_ACTION_REBOOT,
- SC_ACTION_RUN_COMMAND);
- {$EXTERNALSYM _SC_ACTION_TYPE}
- SC_ACTION_TYPE = _SC_ACTION_TYPE;
- {$EXTERNALSYM SC_ACTION_TYPE}
- TScActionType = _SC_ACTION_TYPE;
-
- LPSC_ACTION = ^SC_ACTION;
- {$EXTERNALSYM LPSC_ACTION}
- _SC_ACTION = record
- Type_: SC_ACTION_TYPE;
- Delay: DWORD;
- end;
- {$EXTERNALSYM _SC_ACTION}
- SC_ACTION = _SC_ACTION;
- {$EXTERNALSYM SC_ACTION}
- TScAction = SC_ACTION;
- PScAction = LPSC_ACTION;
-
- LPSERVICE_FAILURE_ACTIONSA = ^SERVICE_FAILURE_ACTIONSA;
- {$EXTERNALSYM LPSERVICE_FAILURE_ACTIONSA}
- _SERVICE_FAILURE_ACTIONSA = record
- dwResetPeriod: DWORD;
- lpRebootMsg: LPSTR;
- lpCommand: LPSTR;
- cActions: DWORD;
- lpsaActions: LPSC_ACTION;
- end;
- {$EXTERNALSYM _SERVICE_FAILURE_ACTIONSA}
- SERVICE_FAILURE_ACTIONSA = _SERVICE_FAILURE_ACTIONSA;
- {$EXTERNALSYM SERVICE_FAILURE_ACTIONSA}
- TServiceFailureActionsA = SERVICE_FAILURE_ACTIONSA;
- PServiceFailureActionsA = LPSERVICE_FAILURE_ACTIONSA;
-
- LPSERVICE_FAILURE_ACTIONSW = ^SERVICE_FAILURE_ACTIONSW;
- {$EXTERNALSYM LPSERVICE_FAILURE_ACTIONSW}
- _SERVICE_FAILURE_ACTIONSW = record
- dwResetPeriod: DWORD;
- lpRebootMsg: LPWSTR;
- lpCommand: LPWSTR;
- cActions: DWORD;
- lpsaActions: LPSC_ACTION;
- end;
- {$EXTERNALSYM _SERVICE_FAILURE_ACTIONSW}
- SERVICE_FAILURE_ACTIONSW = _SERVICE_FAILURE_ACTIONSW;
- {$EXTERNALSYM SERVICE_FAILURE_ACTIONSW}
- TServiceFailureActionsW = SERVICE_FAILURE_ACTIONSW;
- PServiceFailureActionsW = LPSERVICE_FAILURE_ACTIONSW;
-
- {$IFDEF UNICODE}
- SERVICE_FAILURE_ACTIONS = SERVICE_FAILURE_ACTIONSW;
- {$EXTERNALSYM SERVICE_FAILURE_ACTIONS}
- LPSERVICE_FAILURE_ACTIONS = LPSERVICE_FAILURE_ACTIONSW;
- {$EXTERNALSYM LPSERVICE_FAILURE_ACTIONS}
- TServiceFailureActions = TServiceFailureActionsW;
- PServiceFailureActions = PServiceFailureActionsW;
- {$ELSE}
- SERVICE_FAILURE_ACTIONS = SERVICE_FAILURE_ACTIONSA;
- {$EXTERNALSYM SERVICE_FAILURE_ACTIONS}
- LPSERVICE_FAILURE_ACTIONS = LPSERVICE_FAILURE_ACTIONSA;
- {$EXTERNALSYM LPSERVICE_FAILURE_ACTIONS}
- TServiceFailureActions = TServiceFailureActionsA;
- PServiceFailureActions = PServiceFailureActionsA;
- {$ENDIF UNICODE}
-
-//
-// Handle Types
-//
-
- SC_HANDLE = HANDLE;
- {$EXTERNALSYM SC_HANDLE}
- LPSC_HANDLE = ^SC_HANDLE;
- {$EXTERNALSYM LPSC_HANDLE}
-
- SERVICE_STATUS_HANDLE = HANDLE;
- {$EXTERNALSYM SERVICE_STATUS_HANDLE}
-
-//
-// Info levels for QueryServiceStatusEx
-//
-
- _SC_STATUS_TYPE = (SC_STATUS_PROCESS_INFO);
- {$EXTERNALSYM _SC_STATUS_TYPE}
- SC_STATUS_TYPE = _SC_STATUS_TYPE;
- {$EXTERNALSYM SC_STATUS_TYPE}
-
-//
-// Info levels for EnumServicesStatusEx
-//
-
- _SC_ENUM_TYPE = (SC_ENUM_PROCESS_INFO);
- {$EXTERNALSYM _SC_ENUM_TYPE}
- SC_ENUM_TYPE = _SC_ENUM_TYPE;
- {$EXTERNALSYM SC_ENUM_TYPE}
-
-//
-// Service Status Structures
-//
-
- LPSERVICE_STATUS = ^SERVICE_STATUS;
- {$EXTERNALSYM LPSERVICE_STATUS}
- _SERVICE_STATUS = record
- dwServiceType: DWORD;
- dwCurrentState: DWORD;
- dwControlsAccepted: DWORD;
- dwWin32ExitCode: DWORD;
- dwServiceSpecificExitCode: DWORD;
- dwCheckPoint: DWORD;
- dwWaitHint: DWORD;
- end;
- {$EXTERNALSYM _SERVICE_STATUS}
- SERVICE_STATUS = _SERVICE_STATUS;
- {$EXTERNALSYM SERVICE_STATUS}
- TServiceStatus = SERVICE_STATUS;
- PServiceStatus = LPSERVICE_STATUS;
-
- LPSERVICE_STATUS_PROCESS = ^SERVICE_STATUS_PROCESS;
- {$EXTERNALSYM LPSERVICE_STATUS_PROCESS}
- _SERVICE_STATUS_PROCESS = record
- dwServiceType: DWORD;
- dwCurrentState: DWORD;
- dwControlsAccepted: DWORD;
- dwWin32ExitCode: DWORD;
- dwServiceSpecificExitCode: DWORD;
- dwCheckPoint: DWORD;
- dwWaitHint: DWORD;
- dwProcessId: DWORD;
- dwServiceFlags: DWORD;
- end;
- {$EXTERNALSYM _SERVICE_STATUS_PROCESS}
- SERVICE_STATUS_PROCESS = _SERVICE_STATUS_PROCESS;
- {$EXTERNALSYM SERVICE_STATUS_PROCESS}
- TServiceStatusProcess = SERVICE_STATUS_PROCESS;
- PServiceStatusProcess = LPSERVICE_STATUS_PROCESS;
-
-//
-// Service Status Enumeration Structure
-//
-
- LPENUM_SERVICE_STATUSA = ^ENUM_SERVICE_STATUSA;
- {$EXTERNALSYM LPENUM_SERVICE_STATUSA}
- _ENUM_SERVICE_STATUSA = record
- lpServiceName: LPSTR;
- lpDisplayName: LPSTR;
- ServiceStatus: SERVICE_STATUS;
- end;
- {$EXTERNALSYM _ENUM_SERVICE_STATUSA}
- ENUM_SERVICE_STATUSA = _ENUM_SERVICE_STATUSA;
- {$EXTERNALSYM ENUM_SERVICE_STATUSA}
- TEnumServiceStatusA = ENUM_SERVICE_STATUSA;
- PEnumServiceStatusA = LPENUM_SERVICE_STATUSA;
-
- LPENUM_SERVICE_STATUSW = ^ENUM_SERVICE_STATUSW;
- {$EXTERNALSYM LPENUM_SERVICE_STATUSW}
- _ENUM_SERVICE_STATUSW = record
- lpServiceName: LPWSTR;
- lpDisplayName: LPWSTR;
- ServiceStatus: SERVICE_STATUS;
- end;
- {$EXTERNALSYM _ENUM_SERVICE_STATUSW}
- ENUM_SERVICE_STATUSW = _ENUM_SERVICE_STATUSW;
- {$EXTERNALSYM ENUM_SERVICE_STATUSW}
- TEnumServiceStatusW = ENUM_SERVICE_STATUSW;
- PEnumServiceStatusW = LPENUM_SERVICE_STATUSW;
-
- {$IFDEF UNICODE}
- ENUM_SERVICE_STATUS = ENUM_SERVICE_STATUSW;
- {$EXTERNALSYM ENUM_SERVICE_STATUS}
- LPENUM_SERVICE_STATUS = LPENUM_SERVICE_STATUSW;
- {$EXTERNALSYM LPENUM_SERVICE_STATUS}
- TEnumServiceStatus = TEnumServiceStatusW;
- PEnumServiceStatus = PEnumServiceStatusW;
- {$ELSE}
- ENUM_SERVICE_STATUS = ENUM_SERVICE_STATUSA;
- {$EXTERNALSYM ENUM_SERVICE_STATUS}
- LPENUM_SERVICE_STATUS = LPENUM_SERVICE_STATUSA;
- {$EXTERNALSYM LPENUM_SERVICE_STATUS}
- TEnumServiceStatus = TEnumServiceStatusA;
- PEnumServiceStatus = PEnumServiceStatusA;
- {$ENDIF UNICODE}
-
- LPENUM_SERVICE_STATUS_PROCESSA = ^ENUM_SERVICE_STATUS_PROCESSA;
- {$EXTERNALSYM LPENUM_SERVICE_STATUS_PROCESSA}
- _ENUM_SERVICE_STATUS_PROCESSA = record
- lpServiceName: LPSTR;
- lpDisplayName: LPSTR;
- ServiceStatusProcess: SERVICE_STATUS_PROCESS;
- end;
- {$EXTERNALSYM _ENUM_SERVICE_STATUS_PROCESSA}
- ENUM_SERVICE_STATUS_PROCESSA = _ENUM_SERVICE_STATUS_PROCESSA;
- {$EXTERNALSYM ENUM_SERVICE_STATUS_PROCESSA}
- TEnumServiceStatusProcessA = ENUM_SERVICE_STATUS_PROCESSA;
- PEnumServiceStatusProcessA = LPENUM_SERVICE_STATUS_PROCESSA;
-
- LPENUM_SERVICE_STATUS_PROCESSW = ^ENUM_SERVICE_STATUS_PROCESSW;
- {$EXTERNALSYM LPENUM_SERVICE_STATUS_PROCESSW}
- _ENUM_SERVICE_STATUS_PROCESSW = record
- lpServiceName: LPWSTR;
- lpDisplayName: LPWSTR;
- ServiceStatusProcess: SERVICE_STATUS_PROCESS;
- end;
- {$EXTERNALSYM _ENUM_SERVICE_STATUS_PROCESSW}
- ENUM_SERVICE_STATUS_PROCESSW = _ENUM_SERVICE_STATUS_PROCESSW;
- {$EXTERNALSYM ENUM_SERVICE_STATUS_PROCESSW}
- TEnumServiceStatusProcessW = ENUM_SERVICE_STATUS_PROCESSW;
- PEnumServiceStatusProcessW = LPENUM_SERVICE_STATUS_PROCESSW;
-
- {$IFDEF UNICODE}
- ENUM_SERVICE_STATUS_PROCESS = ENUM_SERVICE_STATUS_PROCESSW;
- {$EXTERNALSYM ENUM_SERVICE_STATUS_PROCESS}
- LPENUM_SERVICE_STATUS_PROCESS = LPENUM_SERVICE_STATUS_PROCESSW;
- {$EXTERNALSYM LPENUM_SERVICE_STATUS_PROCESS}
- TEnumServiceStatusProcess = TEnumServiceStatusProcessW;
- PEnumServiceStatusProcess = PEnumServiceStatusProcessW;
- {$ELSE}
- ENUM_SERVICE_STATUS_PROCESS = ENUM_SERVICE_STATUS_PROCESSA;
- {$EXTERNALSYM ENUM_SERVICE_STATUS_PROCESS}
- LPENUM_SERVICE_STATUS_PROCESS = LPENUM_SERVICE_STATUS_PROCESSA;
- {$EXTERNALSYM LPENUM_SERVICE_STATUS_PROCESS}
- TEnumServiceStatusProcess = TEnumServiceStatusProcessA;
- PEnumServiceStatusProcess = PEnumServiceStatusProcessA;
- {$ENDIF UNICODE}
-
-//
-// Structures for the Lock API functions
-//
-
- SC_LOCK = LPVOID;
- {$EXTERNALSYM SC_LOCK}
-
- LPQUERY_SERVICE_LOCK_STATUSA = ^QUERY_SERVICE_LOCK_STATUSA;
- {$EXTERNALSYM LPQUERY_SERVICE_LOCK_STATUSA}
- _QUERY_SERVICE_LOCK_STATUSA = record
- fIsLocked: DWORD;
- lpLockOwner: LPSTR;
- dwLockDuration: DWORD;
- end;
- {$EXTERNALSYM _QUERY_SERVICE_LOCK_STATUSA}
- QUERY_SERVICE_LOCK_STATUSA = _QUERY_SERVICE_LOCK_STATUSA;
- {$EXTERNALSYM QUERY_SERVICE_LOCK_STATUSA}
- TQueryServiceLockStatusA = QUERY_SERVICE_LOCK_STATUSA;
- PQueryServiceLockStatusA = LPQUERY_SERVICE_LOCK_STATUSA;
-
- LPQUERY_SERVICE_LOCK_STATUSW = ^QUERY_SERVICE_LOCK_STATUSW;
- {$EXTERNALSYM LPQUERY_SERVICE_LOCK_STATUSW}
- _QUERY_SERVICE_LOCK_STATUSW = record
- fIsLocked: DWORD;
- lpLockOwner: LPWSTR;
- dwLockDuration: DWORD;
- end;
- {$EXTERNALSYM _QUERY_SERVICE_LOCK_STATUSW}
- QUERY_SERVICE_LOCK_STATUSW = _QUERY_SERVICE_LOCK_STATUSW;
- {$EXTERNALSYM QUERY_SERVICE_LOCK_STATUSW}
- TQueryServiceLockStatusW = QUERY_SERVICE_LOCK_STATUSW;
- PQueryServiceLockStatusW = LPQUERY_SERVICE_LOCK_STATUSW;
-
- {$IFDEF UNICODE}
- QUERY_SERVICE_LOCK_STATUS = QUERY_SERVICE_LOCK_STATUSW;
- {$EXTERNALSYM QUERY_SERVICE_LOCK_STATUS}
- LPQUERY_SERVICE_LOCK_STATUS = LPQUERY_SERVICE_LOCK_STATUSW;
- {$EXTERNALSYM LPQUERY_SERVICE_LOCK_STATUS}
- TQueryServiceLockStatus = TQueryServiceLockStatusW;
- PQueryServiceLockStatus = PQueryServiceLockStatusW;
- {$ELSE}
- QUERY_SERVICE_LOCK_STATUS = QUERY_SERVICE_LOCK_STATUSA;
- {$EXTERNALSYM QUERY_SERVICE_LOCK_STATUS}
- LPQUERY_SERVICE_LOCK_STATUS = LPQUERY_SERVICE_LOCK_STATUSA;
- {$EXTERNALSYM LPQUERY_SERVICE_LOCK_STATUS}
- TQueryServiceLockStatus = TQueryServiceLockStatusA;
- PQueryServiceLockStatus = PQueryServiceLockStatusA;
- {$ENDIF UNICODE}
-
-//
-// Query Service Configuration Structure
-//
-
- LPQUERY_SERVICE_CONFIGA = ^QUERY_SERVICE_CONFIGA;
- {$EXTERNALSYM LPQUERY_SERVICE_CONFIGA}
- _QUERY_SERVICE_CONFIGA = record
- dwServiceType: DWORD;
- dwStartType: DWORD;
- dwErrorControl: DWORD;
- lpBinaryPathName: LPSTR;
- lpLoadOrderGroup: LPSTR;
- dwTagId: DWORD;
- lpDependencies: LPSTR;
- lpServiceStartName: LPSTR;
- lpDisplayName: LPSTR;
- end;
- {$EXTERNALSYM _QUERY_SERVICE_CONFIGA}
- QUERY_SERVICE_CONFIGA = _QUERY_SERVICE_CONFIGA;
- {$EXTERNALSYM QUERY_SERVICE_CONFIGA}
- TQueryServiceConfigA = QUERY_SERVICE_CONFIGA;
- PQueryServiceConfigA = LPQUERY_SERVICE_CONFIGA;
-
- LPQUERY_SERVICE_CONFIGW = ^QUERY_SERVICE_CONFIGW;
- {$EXTERNALSYM LPQUERY_SERVICE_CONFIGW}
- _QUERY_SERVICE_CONFIGW = record
- dwServiceType: DWORD;
- dwStartType: DWORD;
- dwErrorControl: DWORD;
- lpBinaryPathName: LPWSTR;
- lpLoadOrderGroup: LPWSTR;
- dwTagId: DWORD;
- lpDependencies: LPWSTR;
- lpServiceStartName: LPWSTR;
- lpDisplayName: LPWSTR;
- end;
- {$EXTERNALSYM _QUERY_SERVICE_CONFIGW}
- QUERY_SERVICE_CONFIGW = _QUERY_SERVICE_CONFIGW;
- {$EXTERNALSYM QUERY_SERVICE_CONFIGW}
- TQueryServiceConfigW = QUERY_SERVICE_CONFIGW;
- PQueryServiceConfigW = LPQUERY_SERVICE_CONFIGW;
-
- {$IFDEF UNICODE}
- QUERY_SERVICE_CONFIG = QUERY_SERVICE_CONFIGW;
- {$EXTERNALSYM QUERY_SERVICE_CONFIG}
- LPQUERY_SERVICE_CONFIG = LPQUERY_SERVICE_CONFIGW;
- {$EXTERNALSYM LPQUERY_SERVICE_CONFIG}
- TQueryServiceConfig = TQueryServiceConfigW;
- PQueryServiceConfig = PQueryServiceConfigW;
- {$ELSE}
- QUERY_SERVICE_CONFIG = QUERY_SERVICE_CONFIGA;
- {$EXTERNALSYM QUERY_SERVICE_CONFIG}
- LPQUERY_SERVICE_CONFIG = LPQUERY_SERVICE_CONFIGA;
- {$EXTERNALSYM LPQUERY_SERVICE_CONFIG}
- TQueryServiceConfig = TQueryServiceConfigA;
- PQueryServiceConfig = PQueryServiceConfigA;
- {$ENDIF UNICODE}
-
-//
-// Function Prototype for the Service Main Function
-//
-
-type
- LPSERVICE_MAIN_FUNCTIONW = procedure(dwNumServicesArgs: DWORD;
- lpServiceArgVectors: LPWSTR); stdcall;
- {$EXTERNALSYM LPSERVICE_MAIN_FUNCTIONW}
- LPSERVICE_MAIN_FUNCTIONA = procedure(dwNumServicesArgs: DWORD;
- lpServiceArgVectors: LPSTR); stdcall;
- {$EXTERNALSYM LPSERVICE_MAIN_FUNCTIONA}
-
- TServiceMainFunctionA = LPSERVICE_MAIN_FUNCTIONA;
- TServiceMainFunctionW = LPSERVICE_MAIN_FUNCTIONW;
-
- {$IFDEF UNICODE}
- LPSERVICE_MAIN_FUNCTION = LPSERVICE_MAIN_FUNCTIONW;
- {$EXTERNALSYM LPSERVICE_MAIN_FUNCTION}
- TServiceMainFunction = LPSERVICE_MAIN_FUNCTIONW;
- {$ELSE}
- LPSERVICE_MAIN_FUNCTION = LPSERVICE_MAIN_FUNCTIONA;
- {$EXTERNALSYM LPSERVICE_MAIN_FUNCTION}
- TServiceMainFunction = LPSERVICE_MAIN_FUNCTIONA;
- {$ENDIF UNICODE}
-
-//
-// Service Start Table
-//
-
- LPSERVICE_TABLE_ENTRYA = ^SERVICE_TABLE_ENTRYA;
- {$EXTERNALSYM LPSERVICE_TABLE_ENTRYA}
- _SERVICE_TABLE_ENTRYA = record
- lpServiceName: LPSTR;
- lpServiceProc: LPSERVICE_MAIN_FUNCTIONA;
- end;
- {$EXTERNALSYM _SERVICE_TABLE_ENTRYA}
- SERVICE_TABLE_ENTRYA = _SERVICE_TABLE_ENTRYA;
- {$EXTERNALSYM SERVICE_TABLE_ENTRYA}
- TServiceTableEntryA = SERVICE_TABLE_ENTRYA;
- PServiceTableEntryA = LPSERVICE_TABLE_ENTRYA;
-
- LPSERVICE_TABLE_ENTRYW = ^SERVICE_TABLE_ENTRYW;
- {$EXTERNALSYM LPSERVICE_TABLE_ENTRYW}
- _SERVICE_TABLE_ENTRYW = record
- lpServiceName: LPWSTR;
- lpServiceProc: LPSERVICE_MAIN_FUNCTIONW;
- end;
- {$EXTERNALSYM _SERVICE_TABLE_ENTRYW}
- SERVICE_TABLE_ENTRYW = _SERVICE_TABLE_ENTRYW;
- {$EXTERNALSYM SERVICE_TABLE_ENTRYW}
- TServiceTableEntryW = SERVICE_TABLE_ENTRYW;
- PServiceTableEntryW = LPSERVICE_TABLE_ENTRYW;
-
- {$IFDEF UNICODE}
- SERVICE_TABLE_ENTRY = SERVICE_TABLE_ENTRYW;
- LPSERVICE_TABLE_ENTRY = LPSERVICE_TABLE_ENTRYW;
- TServiceTableEntry = TServiceTableEntryW;
- PServiceTableEntry = PServiceTableEntryW;
- {$ELSE}
- SERVICE_TABLE_ENTRY = SERVICE_TABLE_ENTRYA;
- LPSERVICE_TABLE_ENTRY = LPSERVICE_TABLE_ENTRYA;
- TServiceTableEntry = TServiceTableEntryA;
- PServiceTableEntry = PServiceTableEntryA;
- {$ENDIF UNICODE}
-
-//
-// Prototype for the Service Control Handler Function
-//
-
- LPHANDLER_FUNCTION = procedure(dwControl: DWORD); stdcall;
- {$EXTERNALSYM LPHANDLER_FUNCTION}
- THandlerFunction = LPHANDLER_FUNCTION;
-
- LPHANDLER_FUNCTION_EX = function(dwControl, dwEventType: DWORD;
- lpEventData, lpContext: LPVOID): DWORD; stdcall;
- {$EXTERNALSYM LPHANDLER_FUNCTION_EX}
- THandlerFunctionEx = LPHANDLER_FUNCTION_EX;
-
-///////////////////////////////////////////////////////////////////////////
-// API Function Prototypes
-///////////////////////////////////////////////////////////////////////////
-
-function ChangeServiceConfigA(hService: SC_HANDLE; dwServiceType, dwStartType,
- dwErrorControl: DWORD; lpBinaryPathName, lpLoadOrderGroup: LPCSTR;
- lpdwTagId: LPDWORD; lpDependencies, lpServiceStartName, lpPassword,
- lpDisplayName: LPCSTR): BOOL; stdcall;
-{$EXTERNALSYM ChangeServiceConfigA}
-function ChangeServiceConfigW(hService: SC_HANDLE; dwServiceType, dwStartType,
- dwErrorControl: DWORD; lpBinaryPathName, lpLoadOrderGroup: LPCWSTR;
- lpdwTagId: LPDWORD; lpDependencies, lpServiceStartName, lpPassword,
- lpDisplayName: LPCWSTR): BOOL; stdcall;
-{$EXTERNALSYM ChangeServiceConfigW}
-function ChangeServiceConfig(hService: SC_HANDLE; dwServiceType, dwStartType,
- dwErrorControl: DWORD; lpBinaryPathName, lpLoadOrderGroup: LPCTSTR;
- lpdwTagId: LPDWORD; lpDependencies, lpServiceStartName, lpPassword,
- lpDisplayName: LPCTSTR): BOOL; stdcall;
-{$EXTERNALSYM ChangeServiceConfig}
-
-function ChangeServiceConfig2A(hService: SC_HANDLE; dwInfoLevel: DWORD;
- lpInfo: LPVOID): BOOL; stdcall;
-{$EXTERNALSYM ChangeServiceConfig2A}
-function ChangeServiceConfig2W(hService: SC_HANDLE; dwInfoLevel: DWORD;
- lpInfo: LPVOID): BOOL; stdcall;
-{$EXTERNALSYM ChangeServiceConfig2W}
-function ChangeServiceConfig2(hService: SC_HANDLE; dwInfoLevel: DWORD;
- lpInfo: LPVOID): BOOL; stdcall;
-{$EXTERNALSYM ChangeServiceConfig2}
-
-function CloseServiceHandle(hSCObject: SC_HANDLE): BOOL; stdcall;
-{$EXTERNALSYM CloseServiceHandle}
-
-function ControlService(hService: SC_HANDLE; dwControl: DWORD;
- var lpServiceStatus: SERVICE_STATUS): BOOL; stdcall;
-{$EXTERNALSYM ControlService}
-
-function CreateServiceA(hSCManager: SC_HANDLE; lpServiceName, lpDisplayName: LPCSTR;
- dwDesiredAccess, dwServiceType, dwStartType, dwErrorControl: DWORD;
- lpBinaryPathName, lpLoadOrderGroup: LPCSTR; lpdwTagId: LPDWORD;
- lpDependencies, lpServiceStartName, lpPassword: LPCSTR): SC_HANDLE; stdcall;
-{$EXTERNALSYM CreateServiceA}
-function CreateServiceW(hSCManager: SC_HANDLE; lpServiceName, lpDisplayName: LPCWSTR;
- dwDesiredAccess, dwServiceType, dwStartType, dwErrorControl: DWORD;
- lpBinaryPathName, lpLoadOrderGroup: LPCWSTR; lpdwTagId: LPDWORD;
- lpDependencies, lpServiceStartName, lpPassword: LPCWSTR): SC_HANDLE; stdcall;
-{$EXTERNALSYM CreateServiceW}
-function CreateService(hSCManager: SC_HANDLE; lpServiceName, lpDisplayName: LPCTSTR;
- dwDesiredAccess, dwServiceType, dwStartType, dwErrorControl: DWORD;
- lpBinaryPathName, lpLoadOrderGroup: LPCTSTR; lpdwTagId: LPDWORD;
- lpDependencies, lpServiceStartName, lpPassword: LPCTSTR): SC_HANDLE; stdcall;
-{$EXTERNALSYM CreateService}
-
-function DeleteService(hService: SC_HANDLE): BOOL; stdcall;
-{$EXTERNALSYM DeleteService}
-
-function EnumDependentServicesA(hService: SC_HANDLE; dwServiceState: DWORD;
- lpServices: LPENUM_SERVICE_STATUSA; cbBufSize: DWORD; var pcbBytesNeeded,
- lpServicesReturned: DWORD): BOOL; stdcall;
-{$EXTERNALSYM EnumDependentServicesA}
-function EnumDependentServicesW(hService: SC_HANDLE; dwServiceState: DWORD;
- lpServices: LPENUM_SERVICE_STATUSW; cbBufSize: DWORD; var pcbBytesNeeded,
- lpServicesReturned: DWORD): BOOL; stdcall;
-{$EXTERNALSYM EnumDependentServicesW}
-function EnumDependentServices(hService: SC_HANDLE; dwServiceState: DWORD;
- lpServices: LPENUM_SERVICE_STATUS; cbBufSize: DWORD; var pcbBytesNeeded,
- lpServicesReturned: DWORD): BOOL; stdcall;
-{$EXTERNALSYM EnumDependentServices}
-
-function EnumServicesStatusA(hSCManager: SC_HANDLE; dwServiceType: DWORD;
- dwServiceState: DWORD; lpServices: LPENUM_SERVICE_STATUSA; cbBufSize: DWORD;
- var pcbBytesNeeded, lpServicesReturned, lpResumeHandle: DWORD): BOOL; stdcall;
-{$EXTERNALSYM EnumServicesStatusA}
-function EnumServicesStatusW(hSCManager: SC_HANDLE; dwServiceType: DWORD;
- dwServiceState: DWORD; lpServices: LPENUM_SERVICE_STATUSW; cbBufSize: DWORD;
- var pcbBytesNeeded, lpServicesReturned, lpResumeHandle: DWORD): BOOL; stdcall;
-{$EXTERNALSYM EnumServicesStatusW}
-function EnumServicesStatus(hSCManager: SC_HANDLE; dwServiceType: DWORD;
- dwServiceState: DWORD; lpServices: LPENUM_SERVICE_STATUS; cbBufSize: DWORD;
- var pcbBytesNeeded, lpServicesReturned, lpResumeHandle: DWORD): BOOL; stdcall;
-{$EXTERNALSYM EnumServicesStatus}
-
-function EnumServicesStatusExA(hSCManager: SC_HANDLE; InfoLevel: SC_ENUM_TYPE;
- dwServiceType: DWORD; dwServiceState: DWORD; lpServices: LPBYTE;
- cbBufSize: DWORD; var pcbBytesNeeded, lpServicesReturned, lpResumeHandle: DWORD;
- pszGroupName: LPCSTR): BOOL; stdcall;
-{$EXTERNALSYM EnumServicesStatusExA}
-function EnumServicesStatusExW(hSCManager: SC_HANDLE; InfoLevel: SC_ENUM_TYPE;
- dwServiceType: DWORD; dwServiceState: DWORD; lpServices: LPBYTE;
- cbBufSize: DWORD; var pcbBytesNeeded, lpServicesReturned, lpResumeHandle: DWORD;
- pszGroupName: LPCWSTR): BOOL; stdcall;
-{$EXTERNALSYM EnumServicesStatusExW}
-function EnumServicesStatusEx(hSCManager: SC_HANDLE; InfoLevel: SC_ENUM_TYPE;
- dwServiceType: DWORD; dwServiceState: DWORD; lpServices: LPBYTE;
- cbBufSize: DWORD; var pcbBytesNeeded, lpServicesReturned, lpResumeHandle: DWORD;
- pszGroupName: LPCTSTR): BOOL; stdcall;
-{$EXTERNALSYM EnumServicesStatusEx}
-
-function GetServiceKeyNameA(hSCManager: SC_HANDLE; lpDisplayName: LPCSTR;
- lpServiceName: LPSTR; var lpcchBuffer: DWORD): BOOL; stdcall;
-{$EXTERNALSYM GetServiceKeyNameA}
-function GetServiceKeyNameW(hSCManager: SC_HANDLE; lpDisplayName: LPCWSTR;
- lpServiceName: LPWSTR; var lpcchBuffer: DWORD): BOOL; stdcall;
-{$EXTERNALSYM GetServiceKeyNameW}
-function GetServiceKeyName(hSCManager: SC_HANDLE; lpDisplayName: LPCTSTR;
- lpServiceName: LPTSTR; var lpcchBuffer: DWORD): BOOL; stdcall;
-{$EXTERNALSYM GetServiceKeyName}
-
-function GetServiceDisplayNameA(hSCManager: SC_HANDLE; lpServiceName: LPCSTR;
- lpDisplayName: LPSTR; var lpcchBuffer: DWORD): BOOL; stdcall;
-{$EXTERNALSYM GetServiceDisplayNameA}
-function GetServiceDisplayNameW(hSCManager: SC_HANDLE; lpServiceName: LPCWSTR;
- lpDisplayName: LPWSTR; var lpcchBuffer: DWORD): BOOL; stdcall;
-{$EXTERNALSYM GetServiceDisplayNameW}
-function GetServiceDisplayName(hSCManager: SC_HANDLE; lpServiceName: LPCTSTR;
- lpDisplayName: LPTSTR; var lpcchBuffer: DWORD): BOOL; stdcall;
-{$EXTERNALSYM GetServiceDisplayName}
-
-function LockServiceDatabase(hSCManager: SC_HANDLE): SC_LOCK; stdcall;
-{$EXTERNALSYM LockServiceDatabase}
-
-function NotifyBootConfigStatus(BootAcceptable: BOOL): BOOL; stdcall;
-{$EXTERNALSYM NotifyBootConfigStatus}
-
-function OpenSCManagerA(lpMachineName: LPCSTR; lpDatabaseName: LPCSTR;
- dwDesiredAccess: DWORD): SC_HANDLE; stdcall;
-{$EXTERNALSYM OpenSCManagerA}
-function OpenSCManagerW(lpMachineName: LPCWSTR; lpDatabaseName: LPCWSTR;
- dwDesiredAccess: DWORD): SC_HANDLE; stdcall;
-{$EXTERNALSYM OpenSCManagerW}
-function OpenSCManager(lpMachineName: LPCTSTR; lpDatabaseName: LPCTSTR;
- dwDesiredAccess: DWORD): SC_HANDLE; stdcall;
-{$EXTERNALSYM OpenSCManager}
-
-function OpenServiceA(hSCManager: SC_HANDLE; lpServiceName: LPCSTR;
- dwDesiredAccess: DWORD): SC_HANDLE; stdcall;
-{$EXTERNALSYM OpenServiceA}
-function OpenServiceW(hSCManager: SC_HANDLE; lpServiceName: LPCWSTR;
- dwDesiredAccess: DWORD): SC_HANDLE; stdcall;
-{$EXTERNALSYM OpenServiceW}
-function OpenService(hSCManager: SC_HANDLE; lpServiceName: LPCTSTR;
- dwDesiredAccess: DWORD): SC_HANDLE; stdcall;
-{$EXTERNALSYM OpenService}
-
-function QueryServiceConfigA(hService: SC_HANDLE;
- lpServiceConfig: LPQUERY_SERVICE_CONFIGA; cbBufSize: DWORD;
- var pcbBytesNeeded: DWORD): BOOL; stdcall;
-{$EXTERNALSYM QueryServiceConfigA}
-function QueryServiceConfigW(hService: SC_HANDLE;
- lpServiceConfig: LPQUERY_SERVICE_CONFIGW; cbBufSize: DWORD;
- var pcbBytesNeeded: DWORD): BOOL; stdcall;
-{$EXTERNALSYM QueryServiceConfigW}
-function QueryServiceConfig(hService: SC_HANDLE;
- lpServiceConfig: LPQUERY_SERVICE_CONFIG; cbBufSize: DWORD;
- var pcbBytesNeeded: DWORD): BOOL; stdcall;
-{$EXTERNALSYM QueryServiceConfig}
-
-function QueryServiceConfig2A(hService: SC_HANDLE; dwInfoLevel: DWORD;
- lpBuffer: LPBYTE; cbBufSize: DWORD; var pcbBytesNeeded: DWORD): BOOL; stdcall;
-{$EXTERNALSYM QueryServiceConfig2A}
-function QueryServiceConfig2W(hService: SC_HANDLE; dwInfoLevel: DWORD;
- lpBuffer: LPBYTE; cbBufSize: DWORD; var pcbBytesNeeded: DWORD): BOOL; stdcall;
-{$EXTERNALSYM QueryServiceConfig2W}
-function QueryServiceConfig2(hService: SC_HANDLE; dwInfoLevel: DWORD;
- lpBuffer: LPBYTE; cbBufSize: DWORD; var pcbBytesNeeded: DWORD): BOOL; stdcall;
-{$EXTERNALSYM QueryServiceConfig2}
-
-function QueryServiceLockStatusA(hSCManager: SC_HANDLE;
- lpLockStatus: LPQUERY_SERVICE_LOCK_STATUSA; cbBufSize: DWORD;
- var pcbBytesNeeded: DWORD): BOOL; stdcall;
-{$EXTERNALSYM QueryServiceLockStatusA}
-function QueryServiceLockStatusW(hSCManager: SC_HANDLE;
- lpLockStatus: LPQUERY_SERVICE_LOCK_STATUSW; cbBufSize: DWORD;
- var pcbBytesNeeded: DWORD): BOOL; stdcall;
-{$EXTERNALSYM QueryServiceLockStatusW}
-function QueryServiceLockStatus(hSCManager: SC_HANDLE;
- lpLockStatus: LPQUERY_SERVICE_LOCK_STATUS; cbBufSize: DWORD;
- var pcbBytesNeeded: DWORD): BOOL; stdcall;
-{$EXTERNALSYM QueryServiceLockStatus}
-
-function QueryServiceObjectSecurity(hService: SC_HANDLE;
- dwSecurityInformation: SECURITY_INFORMATION;
- var lpSecurityDescriptor: SECURITY_DESCRIPTOR; cbBufSize: DWORD;
- var pcbBytesNeeded: DWORD): BOOL; stdcall;
-{$EXTERNALSYM QueryServiceObjectSecurity}
-
-function QueryServiceStatus(hService: SC_HANDLE;
- var lpServiceStatus: SERVICE_STATUS): BOOL; stdcall;
-{$EXTERNALSYM QueryServiceStatus}
-
-function QueryServiceStatusEx(hService: SC_HANDLE; InfoLevel: SC_STATUS_TYPE;
- lpBuffer: LPBYTE; cbBufSize: DWORD; var pcbBytesNeeded: DWORD): BOOL; stdcall;
-{$EXTERNALSYM QueryServiceStatusEx}
-
-function RegisterServiceCtrlHandlerA(lpServiceName: LPCSTR;
- lpHandlerProc: LPHANDLER_FUNCTION): SERVICE_STATUS_HANDLE; stdcall;
-{$EXTERNALSYM RegisterServiceCtrlHandlerA}
-function RegisterServiceCtrlHandlerW(lpServiceName: LPCWSTR;
- lpHandlerProc: LPHANDLER_FUNCTION): SERVICE_STATUS_HANDLE; stdcall;
-{$EXTERNALSYM RegisterServiceCtrlHandlerW}
-function RegisterServiceCtrlHandler(lpServiceName: LPCTSTR;
- lpHandlerProc: LPHANDLER_FUNCTION): SERVICE_STATUS_HANDLE; stdcall;
-{$EXTERNALSYM RegisterServiceCtrlHandler}
-
-function RegisterServiceCtrlHandlerExA(lpServiceName: LPCSTR;
- lpHandlerProc: LPHANDLER_FUNCTION_EX; lpContext: LPVOID): SERVICE_STATUS_HANDLE; stdcall;
-{$EXTERNALSYM RegisterServiceCtrlHandlerExA}
-function RegisterServiceCtrlHandlerExW(lpServiceName: LPCWSTR;
- lpHandlerProc: LPHANDLER_FUNCTION_EX; lpContext: LPVOID): SERVICE_STATUS_HANDLE; stdcall;
-{$EXTERNALSYM RegisterServiceCtrlHandlerExW}
-function RegisterServiceCtrlHandlerEx(lpServiceName: LPCTSTR;
- lpHandlerProc: LPHANDLER_FUNCTION_EX; lpContext: LPVOID): SERVICE_STATUS_HANDLE; stdcall;
-{$EXTERNALSYM RegisterServiceCtrlHandlerEx}
-
-// 9/4/2002 Changed last parameter from const to pointer - reported by James Ots.
-
-function SetServiceObjectSecurity(hService: SC_HANDLE;
- dwSecurityInformation: SECURITY_INFORMATION;
- lpSecurityDescriptor: PSECURITY_DESCRIPTOR): BOOL; stdcall;
-{$EXTERNALSYM SetServiceObjectSecurity}
-
-function SetServiceStatus(hServiceStatus: SERVICE_STATUS_HANDLE;
- const lpServiceStatus: SERVICE_STATUS): BOOL; stdcall;
-{$EXTERNALSYM SetServiceStatus}
-
-function StartServiceCtrlDispatcherA(lpServiceStartTable: LPSERVICE_TABLE_ENTRYA): BOOL; stdcall;
-{$EXTERNALSYM StartServiceCtrlDispatcherA}
-function StartServiceCtrlDispatcherW(lpServiceStartTable: LPSERVICE_TABLE_ENTRYW): BOOL; stdcall;
-{$EXTERNALSYM StartServiceCtrlDispatcherW}
-function StartServiceCtrlDispatcher(lpServiceStartTable: LPSERVICE_TABLE_ENTRY): BOOL; stdcall;
-{$EXTERNALSYM StartServiceCtrlDispatcher}
-
-function StartServiceA(hService: SC_HANDLE; dwNumServiceArgs: DWORD;
- lpServiceArgVectors: LPCSTR): BOOL; stdcall;
-{$EXTERNALSYM StartServiceA}
-function StartServiceW(hService: SC_HANDLE; dwNumServiceArgs: DWORD;
- lpServiceArgVectors: LPCWSTR): BOOL; stdcall;
-{$EXTERNALSYM StartServiceW}
-function StartService(hService: SC_HANDLE; dwNumServiceArgs: DWORD;
- lpServiceArgVectors: LPCTSTR): BOOL; stdcall;
-{$EXTERNALSYM StartService}
-
-function UnlockServiceDatabase(ScLock: SC_LOCK): BOOL; stdcall;
-{$EXTERNALSYM UnlockServiceDatabase}
-
-implementation
-
-const
- advapi32 = 'advapi32.dll';
- {$IFDEF UNICODE}
- AWSuffix = 'W';
- {$ELSE}
- AWSuffix = 'A';
- {$ENDIF UNICODE}
-
-{$IFDEF DYNAMIC_LINK}
-
-var
- _ChangeServiceConfigA: Pointer;
-
-function ChangeServiceConfigA;
-begin
- GetProcedureAddress(_ChangeServiceConfigA, advapi32, 'ChangeServiceConfigA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ChangeServiceConfigA]
- end;
-end;
-
-var
- _ChangeServiceConfigW: Pointer;
-
-function ChangeServiceConfigW;
-begin
- GetProcedureAddress(_ChangeServiceConfigW, advapi32, 'ChangeServiceConfigW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ChangeServiceConfigW]
- end;
-end;
-
-var
- _ChangeServiceConfig: Pointer;
-
-function ChangeServiceConfig;
-begin
- GetProcedureAddress(_ChangeServiceConfig, advapi32, 'ChangeServiceConfig' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ChangeServiceConfig]
- end;
-end;
-
-var
- _ChangeServiceConfig2A: Pointer;
-
-function ChangeServiceConfig2A;
-begin
- GetProcedureAddress(_ChangeServiceConfig2A, advapi32, 'ChangeServiceConfig2A');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ChangeServiceConfig2A]
- end;
-end;
-
-var
- _ChangeServiceConfig2W: Pointer;
-
-function ChangeServiceConfig2W;
-begin
- GetProcedureAddress(_ChangeServiceConfig2W, advapi32, 'ChangeServiceConfig2W');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ChangeServiceConfig2W]
- end;
-end;
-
-var
- _ChangeServiceConfig2: Pointer;
-
-function ChangeServiceConfig2;
-begin
- GetProcedureAddress(_ChangeServiceConfig2, advapi32, 'ChangeServiceConfig2' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ChangeServiceConfig2]
- end;
-end;
-
-var
- _CloseServiceHandle: Pointer;
-
-function CloseServiceHandle;
-begin
- GetProcedureAddress(_CloseServiceHandle, advapi32, 'CloseServiceHandle');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CloseServiceHandle]
- end;
-end;
-
-var
- _ControlService: Pointer;
-
-function ControlService;
-begin
- GetProcedureAddress(_ControlService, advapi32, 'ControlService');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ControlService]
- end;
-end;
-
-var
- _CreateServiceA: Pointer;
-
-function CreateServiceA;
-begin
- GetProcedureAddress(_CreateServiceA, advapi32, 'CreateServiceA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreateServiceA]
- end;
-end;
-
-var
- _CreateServiceW: Pointer;
-
-function CreateServiceW;
-begin
- GetProcedureAddress(_CreateServiceW, advapi32, 'CreateServiceW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreateServiceW]
- end;
-end;
-
-var
- _CreateService: Pointer;
-
-function CreateService;
-begin
- GetProcedureAddress(_CreateService, advapi32, 'CreateService' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreateService]
- end;
-end;
-
-var
- _DeleteService: Pointer;
-
-function DeleteService;
-begin
- GetProcedureAddress(_DeleteService, advapi32, 'DeleteService');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DeleteService]
- end;
-end;
-
-var
- _EnumDependentServicesA: Pointer;
-
-function EnumDependentServicesA;
-begin
- GetProcedureAddress(_EnumDependentServicesA, advapi32, 'EnumDependentServicesA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_EnumDependentServicesA]
- end;
-end;
-
-var
- _EnumDependentServicesW: Pointer;
-
-function EnumDependentServicesW;
-begin
- GetProcedureAddress(_EnumDependentServicesW, advapi32, 'EnumDependentServicesW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_EnumDependentServicesW]
- end;
-end;
-
-var
- _EnumDependentServices: Pointer;
-
-function EnumDependentServices;
-begin
- GetProcedureAddress(_EnumDependentServices, advapi32, 'EnumDependentServices' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_EnumDependentServices]
- end;
-end;
-
-var
- _EnumServicesStatusA: Pointer;
-
-function EnumServicesStatusA;
-begin
- GetProcedureAddress(_EnumServicesStatusA, advapi32, 'EnumServicesStatusA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_EnumServicesStatusA]
- end;
-end;
-
-var
- _EnumServicesStatusW: Pointer;
-
-function EnumServicesStatusW;
-begin
- GetProcedureAddress(_EnumServicesStatusW, advapi32, 'EnumServicesStatusW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_EnumServicesStatusW]
- end;
-end;
-
-var
- _EnumServicesStatus: Pointer;
-
-function EnumServicesStatus;
-begin
- GetProcedureAddress(_EnumServicesStatus, advapi32, 'EnumServicesStatus' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_EnumServicesStatus]
- end;
-end;
-
-var
- _EnumServicesStatusExA: Pointer;
-
-function EnumServicesStatusExA;
-begin
- GetProcedureAddress(_EnumServicesStatusExA, advapi32, 'EnumServicesStatusExA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_EnumServicesStatusExA]
- end;
-end;
-
-var
- _EnumServicesStatusExW: Pointer;
-
-function EnumServicesStatusExW;
-begin
- GetProcedureAddress(_EnumServicesStatusExW, advapi32, 'EnumServicesStatusExW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_EnumServicesStatusExW]
- end;
-end;
-
-var
- _EnumServicesStatusEx: Pointer;
-
-function EnumServicesStatusEx;
-begin
- GetProcedureAddress(_EnumServicesStatusEx, advapi32, 'EnumServicesStatusEx' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_EnumServicesStatusEx]
- end;
-end;
-
-var
- _GetServiceKeyNameA: Pointer;
-
-function GetServiceKeyNameA;
-begin
- GetProcedureAddress(_GetServiceKeyNameA, advapi32, 'GetServiceKeyNameA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetServiceKeyNameA]
- end;
-end;
-
-var
- _GetServiceKeyNameW: Pointer;
-
-function GetServiceKeyNameW;
-begin
- GetProcedureAddress(_GetServiceKeyNameW, advapi32, 'GetServiceKeyNameW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetServiceKeyNameW]
- end;
-end;
-
-var
- _GetServiceKeyName: Pointer;
-
-function GetServiceKeyName;
-begin
- GetProcedureAddress(_GetServiceKeyName, advapi32, 'GetServiceKeyName' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetServiceKeyName]
- end;
-end;
-
-var
- _GetServiceDisplayNameA: Pointer;
-
-function GetServiceDisplayNameA;
-begin
- GetProcedureAddress(_GetServiceDisplayNameA, advapi32, 'GetServiceDisplayNameA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetServiceDisplayNameA]
- end;
-end;
-
-var
- _GetServiceDisplayNameW: Pointer;
-
-function GetServiceDisplayNameW;
-begin
- GetProcedureAddress(_GetServiceDisplayNameW, advapi32, 'GetServiceDisplayNameW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetServiceDisplayNameW]
- end;
-end;
-
-var
- _GetServiceDisplayName: Pointer;
-
-function GetServiceDisplayName;
-begin
- GetProcedureAddress(_GetServiceDisplayName, advapi32, 'GetServiceDisplayName' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetServiceDisplayName]
- end;
-end;
-
-var
- _LockServiceDatabase: Pointer;
-
-function LockServiceDatabase;
-begin
- GetProcedureAddress(_LockServiceDatabase, advapi32, 'LockServiceDatabase');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_LockServiceDatabase]
- end;
-end;
-
-var
- _NotifyBootConfigStatus: Pointer;
-
-function NotifyBootConfigStatus;
-begin
- GetProcedureAddress(_NotifyBootConfigStatus, advapi32, 'NotifyBootConfigStatus');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NotifyBootConfigStatus]
- end;
-end;
-
-var
- _OpenSCManagerA: Pointer;
-
-function OpenSCManagerA;
-begin
- GetProcedureAddress(_OpenSCManagerA, advapi32, 'OpenSCManagerA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_OpenSCManagerA]
- end;
-end;
-
-var
- _OpenSCManagerW: Pointer;
-
-function OpenSCManagerW;
-begin
- GetProcedureAddress(_OpenSCManagerW, advapi32, 'OpenSCManagerW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_OpenSCManagerW]
- end;
-end;
-
-var
- _OpenSCManager: Pointer;
-
-function OpenSCManager;
-begin
- GetProcedureAddress(_OpenSCManager, advapi32, 'OpenSCManager' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_OpenSCManager]
- end;
-end;
-
-var
- _OpenServiceA: Pointer;
-
-function OpenServiceA;
-begin
- GetProcedureAddress(_OpenServiceA, advapi32, 'OpenServiceA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_OpenServiceA]
- end;
-end;
-
-var
- _OpenServiceW: Pointer;
-
-function OpenServiceW;
-begin
- GetProcedureAddress(_OpenServiceW, advapi32, 'OpenServiceW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_OpenServiceW]
- end;
-end;
-
-var
- _OpenService: Pointer;
-
-function OpenService;
-begin
- GetProcedureAddress(_OpenService, advapi32, 'OpenService' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_OpenService]
- end;
-end;
-
-var
- _QueryServiceConfigA: Pointer;
-
-function QueryServiceConfigA;
-begin
- GetProcedureAddress(_QueryServiceConfigA, advapi32, 'QueryServiceConfigA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_QueryServiceConfigA]
- end;
-end;
-
-var
- _QueryServiceConfigW: Pointer;
-
-function QueryServiceConfigW;
-begin
- GetProcedureAddress(_QueryServiceConfigW, advapi32, 'QueryServiceConfigW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_QueryServiceConfigW]
- end;
-end;
-
-var
- _QueryServiceConfig: Pointer;
-
-function QueryServiceConfig;
-begin
- GetProcedureAddress(_QueryServiceConfig, advapi32, 'QueryServiceConfig' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_QueryServiceConfig]
- end;
-end;
-
-var
- _QueryServiceConfig2A: Pointer;
-
-function QueryServiceConfig2A;
-begin
- GetProcedureAddress(_QueryServiceConfig2A, advapi32, 'QueryServiceConfig2A');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_QueryServiceConfig2A]
- end;
-end;
-
-var
- _QueryServiceConfig2W: Pointer;
-
-function QueryServiceConfig2W;
-begin
- GetProcedureAddress(_QueryServiceConfig2W, advapi32, 'QueryServiceConfig2W');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_QueryServiceConfig2W]
- end;
-end;
-
-var
- _QueryServiceConfig2: Pointer;
-
-function QueryServiceConfig2;
-begin
- GetProcedureAddress(_QueryServiceConfig2, advapi32, 'QueryServiceConfig2' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_QueryServiceConfig2]
- end;
-end;
-
-var
- _QueryServiceLockStatusA: Pointer;
-
-function QueryServiceLockStatusA;
-begin
- GetProcedureAddress(_QueryServiceLockStatusA, advapi32, 'QueryServiceLockStatusA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_QueryServiceLockStatusA]
- end;
-end;
-
-var
- _QueryServiceLockStatusW: Pointer;
-
-function QueryServiceLockStatusW;
-begin
- GetProcedureAddress(_QueryServiceLockStatusW, advapi32, 'QueryServiceLockStatusW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_QueryServiceLockStatusW]
- end;
-end;
-
-var
- _QueryServiceLockStatus: Pointer;
-
-function QueryServiceLockStatus;
-begin
- GetProcedureAddress(_QueryServiceLockStatus, advapi32, 'QueryServiceLockStatus' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_QueryServiceLockStatus]
- end;
-end;
-
-var
- _QueryServiceObjectSecurity: Pointer;
-
-function QueryServiceObjectSecurity;
-begin
- GetProcedureAddress(_QueryServiceObjectSecurity, advapi32, 'QueryServiceObjectSecurity');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_QueryServiceObjectSecurity]
- end;
-end;
-
-var
- _QueryServiceStatus: Pointer;
-
-function QueryServiceStatus;
-begin
- GetProcedureAddress(_QueryServiceStatus, advapi32, 'QueryServiceStatus');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_QueryServiceStatus]
- end;
-end;
-
-var
- _QueryServiceStatusEx: Pointer;
-
-function QueryServiceStatusEx;
-begin
- GetProcedureAddress(_QueryServiceStatusEx, advapi32, 'QueryServiceStatusEx');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_QueryServiceStatusEx]
- end;
-end;
-
-var
- _RegisterServiceCtrlHandlerA: Pointer;
-
-function RegisterServiceCtrlHandlerA;
-begin
- GetProcedureAddress(_RegisterServiceCtrlHandlerA, advapi32, 'RegisterServiceCtrlHandlerA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RegisterServiceCtrlHandlerA]
- end;
-end;
-
-var
- _RegisterServiceCtrlHandlerW: Pointer;
-
-function RegisterServiceCtrlHandlerW;
-begin
- GetProcedureAddress(_RegisterServiceCtrlHandlerW, advapi32, 'RegisterServiceCtrlHandlerW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RegisterServiceCtrlHandlerW]
- end;
-end;
-
-var
- _RegisterServiceCtrlHandler: Pointer;
-
-function RegisterServiceCtrlHandler;
-begin
- GetProcedureAddress(_RegisterServiceCtrlHandler, advapi32, 'RegisterServiceCtrlHandler' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RegisterServiceCtrlHandler]
- end;
-end;
-
-var
- _RegisterServiceCtrlHandlerExA: Pointer;
-
-function RegisterServiceCtrlHandlerExA;
-begin
- GetProcedureAddress(_RegisterServiceCtrlHandlerExA, advapi32, 'RegisterServiceCtrlHandlerExA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RegisterServiceCtrlHandlerExA]
- end;
-end;
-
-var
- _RegisterServiceCtrlHandlerExW: Pointer;
-
-function RegisterServiceCtrlHandlerExW;
-begin
- GetProcedureAddress(_RegisterServiceCtrlHandlerExW, advapi32, 'RegisterServiceCtrlHandlerExW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RegisterServiceCtrlHandlerExW]
- end;
-end;
-
-var
- _RegisterServiceCtrlHandlerEx: Pointer;
-
-function RegisterServiceCtrlHandlerEx;
-begin
- GetProcedureAddress(_RegisterServiceCtrlHandlerEx, advapi32, 'RegisterServiceCtrlHandlerEx' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RegisterServiceCtrlHandlerEx]
- end;
-end;
-
-var
- _SetServiceObjectSecurity: Pointer;
-
-function SetServiceObjectSecurity;
-begin
- GetProcedureAddress(_SetServiceObjectSecurity, advapi32, 'SetServiceObjectSecurity');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetServiceObjectSecurity]
- end;
-end;
-
-var
- _SetServiceStatus: Pointer;
-
-function SetServiceStatus;
-begin
- GetProcedureAddress(_SetServiceStatus, advapi32, 'SetServiceStatus');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetServiceStatus]
- end;
-end;
-
-var
- _StartServiceCtrlDispatcherA: Pointer;
-
-function StartServiceCtrlDispatcherA;
-begin
- GetProcedureAddress(_StartServiceCtrlDispatcherA, advapi32, 'StartServiceCtrlDispatcherA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_StartServiceCtrlDispatcherA]
- end;
-end;
-
-var
- _StartServiceCtrlDispatcherW: Pointer;
-
-function StartServiceCtrlDispatcherW;
-begin
- GetProcedureAddress(_StartServiceCtrlDispatcherW, advapi32, 'StartServiceCtrlDispatcherW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_StartServiceCtrlDispatcherW]
- end;
-end;
-
-var
- _StartServiceCtrlDispatcher: Pointer;
-
-function StartServiceCtrlDispatcher;
-begin
- GetProcedureAddress(_StartServiceCtrlDispatcher, advapi32, 'StartServiceCtrlDispatcher' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_StartServiceCtrlDispatcher]
- end;
-end;
-
-var
- _StartServiceA: Pointer;
-
-function StartServiceA;
-begin
- GetProcedureAddress(_StartServiceA, advapi32, 'StartServiceA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_StartServiceA]
- end;
-end;
-
-var
- _StartServiceW: Pointer;
-
-function StartServiceW;
-begin
- GetProcedureAddress(_StartServiceW, advapi32, 'StartServiceW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_StartServiceW]
- end;
-end;
-
-var
- _StartService: Pointer;
-
-function StartService;
-begin
- GetProcedureAddress(_StartService, advapi32, 'StartService' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_StartService]
- end;
-end;
-
-var
- _UnlockServiceDatabase: Pointer;
-
-function UnlockServiceDatabase;
-begin
- GetProcedureAddress(_UnlockServiceDatabase, advapi32, 'UnlockServiceDatabase');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_UnlockServiceDatabase]
- end;
-end;
-
-{$ELSE}
-
-function ChangeServiceConfigA; external advapi32 name 'ChangeServiceConfigA';
-function ChangeServiceConfigW; external advapi32 name 'ChangeServiceConfigW';
-function ChangeServiceConfig; external advapi32 name 'ChangeServiceConfig' + AWSuffix;
-function ChangeServiceConfig2A; external advapi32 name 'ChangeServiceConfig2A';
-function ChangeServiceConfig2W; external advapi32 name 'ChangeServiceConfig2W';
-function ChangeServiceConfig2; external advapi32 name 'ChangeServiceConfig2' + AWSuffix;
-function CloseServiceHandle; external advapi32 name 'CloseServiceHandle';
-function ControlService; external advapi32 name 'ControlService';
-function CreateServiceA; external advapi32 name 'CreateServiceA';
-function CreateServiceW; external advapi32 name 'CreateServiceW';
-function CreateService; external advapi32 name 'CreateService' + AWSuffix;
-function DeleteService; external advapi32 name 'DeleteService';
-function EnumDependentServicesA; external advapi32 name 'EnumDependentServicesA';
-function EnumDependentServicesW; external advapi32 name 'EnumDependentServicesW';
-function EnumDependentServices; external advapi32 name 'EnumDependentServices' + AWSuffix;
-function EnumServicesStatusA; external advapi32 name 'EnumServicesStatusA';
-function EnumServicesStatusW; external advapi32 name 'EnumServicesStatusW';
-function EnumServicesStatus; external advapi32 name 'EnumServicesStatus' + AWSuffix;
-function EnumServicesStatusExA; external advapi32 name 'EnumServicesStatusExA';
-function EnumServicesStatusExW; external advapi32 name 'EnumServicesStatusExW';
-function EnumServicesStatusEx; external advapi32 name 'EnumServicesStatusEx' + AWSuffix;
-function GetServiceKeyNameA; external advapi32 name 'GetServiceKeyNameA';
-function GetServiceKeyNameW; external advapi32 name 'GetServiceKeyNameW';
-function GetServiceKeyName; external advapi32 name 'GetServiceKeyName' + AWSuffix;
-function GetServiceDisplayNameA; external advapi32 name 'GetServiceDisplayNameA';
-function GetServiceDisplayNameW; external advapi32 name 'GetServiceDisplayNameW';
-function GetServiceDisplayName; external advapi32 name 'GetServiceDisplayName' + AWSuffix;
-function LockServiceDatabase; external advapi32 name 'LockServiceDatabase';
-function NotifyBootConfigStatus; external advapi32 name 'NotifyBootConfigStatus';
-function OpenSCManagerA; external advapi32 name 'OpenSCManagerA';
-function OpenSCManagerW; external advapi32 name 'OpenSCManagerW';
-function OpenSCManager; external advapi32 name 'OpenSCManager' + AWSuffix;
-function OpenServiceA; external advapi32 name 'OpenServiceA';
-function OpenServiceW; external advapi32 name 'OpenServiceW';
-function OpenService; external advapi32 name 'OpenService' + AWSuffix;
-function QueryServiceConfigA; external advapi32 name 'QueryServiceConfigA';
-function QueryServiceConfigW; external advapi32 name 'QueryServiceConfigW';
-function QueryServiceConfig; external advapi32 name 'QueryServiceConfig' + AWSuffix;
-function QueryServiceConfig2A; external advapi32 name 'QueryServiceConfig2A';
-function QueryServiceConfig2W; external advapi32 name 'QueryServiceConfig2W';
-function QueryServiceConfig2; external advapi32 name 'QueryServiceConfig2' + AWSuffix;
-function QueryServiceLockStatusA; external advapi32 name 'QueryServiceLockStatusA';
-function QueryServiceLockStatusW; external advapi32 name 'QueryServiceLockStatusW';
-function QueryServiceLockStatus; external advapi32 name 'QueryServiceLockStatus' + AWSuffix;
-function QueryServiceObjectSecurity; external advapi32 name 'QueryServiceObjectSecurity';
-function QueryServiceStatus; external advapi32 name 'QueryServiceStatus';
-function QueryServiceStatusEx; external advapi32 name 'QueryServiceStatusEx';
-function RegisterServiceCtrlHandlerA; external advapi32 name 'RegisterServiceCtrlHandlerA';
-function RegisterServiceCtrlHandlerW; external advapi32 name 'RegisterServiceCtrlHandlerW';
-function RegisterServiceCtrlHandler; external advapi32 name 'RegisterServiceCtrlHandler' + AWSuffix;
-function RegisterServiceCtrlHandlerExA; external advapi32 name 'RegisterServiceCtrlHandlerExA';
-function RegisterServiceCtrlHandlerExW; external advapi32 name 'RegisterServiceCtrlHandlerExW';
-function RegisterServiceCtrlHandlerEx; external advapi32 name 'RegisterServiceCtrlHandlerEx' + AWSuffix;
-function SetServiceObjectSecurity; external advapi32 name 'SetServiceObjectSecurity';
-function SetServiceStatus; external advapi32 name 'SetServiceStatus';
-function StartServiceCtrlDispatcherA; external advapi32 name 'StartServiceCtrlDispatcherA';
-function StartServiceCtrlDispatcherW; external advapi32 name 'StartServiceCtrlDispatcherW';
-function StartServiceCtrlDispatcher; external advapi32 name 'StartServiceCtrlDispatcher' + AWSuffix;
-function StartServiceA; external advapi32 name 'StartServiceA';
-function StartServiceW; external advapi32 name 'StartServiceW';
-function StartService; external advapi32 name 'StartService' + AWSuffix;
-function UnlockServiceDatabase; external advapi32 name 'UnlockServiceDatabase';
-
-{$ENDIF DYNAMIC_LINK}
-
-end.
+{******************************************************************************}
+{ }
+{ Services API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: winsvc.h, released June 2000. The original Pascal }
+{ code is: WinSvc.pas, released December 2000. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwawinsvc.pas,v 1.1 2005/04/04 07:56:11 marco Exp $
+
+unit JwaWinSvc;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "WinSvc.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaWinNT, JwaWinType;
+
+//
+// Service database names
+//
+
+const
+ SERVICES_ACTIVE_DATABASEW = 'ServicesActive';
+ {$EXTERNALSYM SERVICES_ACTIVE_DATABASEW}
+ SERVICES_FAILED_DATABASEW = 'ServicesFailed';
+ {$EXTERNALSYM SERVICES_FAILED_DATABASEW}
+
+ SERVICES_ACTIVE_DATABASEA = 'ServicesActive';
+ {$EXTERNALSYM SERVICES_ACTIVE_DATABASEA}
+ SERVICES_FAILED_DATABASEA = 'ServicesFailed';
+ {$EXTERNALSYM SERVICES_FAILED_DATABASEA}
+
+//
+// Character to designate that a name is a group
+//
+
+ SC_GROUP_IDENTIFIERW = '+';
+ {$EXTERNALSYM SC_GROUP_IDENTIFIERW}
+ SC_GROUP_IDENTIFIERA = '+';
+ {$EXTERNALSYM SC_GROUP_IDENTIFIERA}
+
+ {$IFDEF UNICODE}
+
+ SERVICES_ACTIVE_DATABASE = SERVICES_ACTIVE_DATABASEW;
+ {$EXTERNALSYM SERVICES_ACTIVE_DATABASE}
+ SERVICES_FAILED_DATABASE = SERVICES_FAILED_DATABASEW;
+ {$EXTERNALSYM SERVICES_FAILED_DATABASE}
+
+ SC_GROUP_IDENTIFIER = SC_GROUP_IDENTIFIERW;
+ {$EXTERNALSYM SC_GROUP_IDENTIFIER}
+
+ {$ELSE}
+
+ SERVICES_ACTIVE_DATABASE = SERVICES_ACTIVE_DATABASEA;
+ {$EXTERNALSYM SERVICES_ACTIVE_DATABASE}
+ SERVICES_FAILED_DATABASE = SERVICES_FAILED_DATABASEA;
+ {$EXTERNALSYM SERVICES_FAILED_DATABASE}
+
+ SC_GROUP_IDENTIFIER = SC_GROUP_IDENTIFIERA;
+ {$EXTERNALSYM SC_GROUP_IDENTIFIER}
+
+ {$ENDIF UNICODE}
+
+//
+// Value to indicate no change to an optional parameter
+//
+
+ SERVICE_NO_CHANGE = $ffffffff;
+ {$EXTERNALSYM SERVICE_NO_CHANGE}
+
+//
+// Service State -- for Enum Requests (Bit Mask)
+//
+
+ SERVICE_ACTIVE = $00000001;
+ {$EXTERNALSYM SERVICE_ACTIVE}
+ SERVICE_INACTIVE = $00000002;
+ {$EXTERNALSYM SERVICE_INACTIVE}
+ SERVICE_STATE_ALL = SERVICE_ACTIVE or SERVICE_INACTIVE;
+ {$EXTERNALSYM SERVICE_STATE_ALL}
+
+//
+// Controls
+//
+
+ SERVICE_CONTROL_STOP = $00000001;
+ {$EXTERNALSYM SERVICE_CONTROL_STOP}
+ SERVICE_CONTROL_PAUSE = $00000002;
+ {$EXTERNALSYM SERVICE_CONTROL_PAUSE}
+ SERVICE_CONTROL_CONTINUE = $00000003;
+ {$EXTERNALSYM SERVICE_CONTROL_CONTINUE}
+ SERVICE_CONTROL_INTERROGATE = $00000004;
+ {$EXTERNALSYM SERVICE_CONTROL_INTERROGATE}
+ SERVICE_CONTROL_SHUTDOWN = $00000005;
+ {$EXTERNALSYM SERVICE_CONTROL_SHUTDOWN}
+ SERVICE_CONTROL_PARAMCHANGE = $00000006;
+ {$EXTERNALSYM SERVICE_CONTROL_PARAMCHANGE}
+ SERVICE_CONTROL_NETBINDADD = $00000007;
+ {$EXTERNALSYM SERVICE_CONTROL_NETBINDADD}
+ SERVICE_CONTROL_NETBINDREMOVE = $00000008;
+ {$EXTERNALSYM SERVICE_CONTROL_NETBINDREMOVE}
+ SERVICE_CONTROL_NETBINDENABLE = $00000009;
+ {$EXTERNALSYM SERVICE_CONTROL_NETBINDENABLE}
+ SERVICE_CONTROL_NETBINDDISABLE = $0000000A;
+ {$EXTERNALSYM SERVICE_CONTROL_NETBINDDISABLE}
+ SERVICE_CONTROL_DEVICEEVENT = $0000000B;
+ {$EXTERNALSYM SERVICE_CONTROL_DEVICEEVENT}
+ SERVICE_CONTROL_HARDWAREPROFILECHANGE = $0000000C;
+ {$EXTERNALSYM SERVICE_CONTROL_HARDWAREPROFILECHANGE}
+ SERVICE_CONTROL_POWEREVENT = $0000000D;
+ {$EXTERNALSYM SERVICE_CONTROL_POWEREVENT}
+ SERVICE_CONTROL_SESSIONCHANGE = $0000000E;
+ {$EXTERNALSYM SERVICE_CONTROL_SESSIONCHANGE}
+
+//
+// Service State -- for CurrentState
+//
+
+ SERVICE_STOPPED = $00000001;
+ {$EXTERNALSYM SERVICE_STOPPED}
+ SERVICE_START_PENDING = $00000002;
+ {$EXTERNALSYM SERVICE_START_PENDING}
+ SERVICE_STOP_PENDING = $00000003;
+ {$EXTERNALSYM SERVICE_STOP_PENDING}
+ SERVICE_RUNNING = $00000004;
+ {$EXTERNALSYM SERVICE_RUNNING}
+ SERVICE_CONTINUE_PENDING = $00000005;
+ {$EXTERNALSYM SERVICE_CONTINUE_PENDING}
+ SERVICE_PAUSE_PENDING = $00000006;
+ {$EXTERNALSYM SERVICE_PAUSE_PENDING}
+ SERVICE_PAUSED = $00000007;
+ {$EXTERNALSYM SERVICE_PAUSED}
+
+//
+// Controls Accepted (Bit Mask)
+//
+
+ SERVICE_ACCEPT_STOP = $00000001;
+ {$EXTERNALSYM SERVICE_ACCEPT_STOP}
+ SERVICE_ACCEPT_PAUSE_CONTINUE = $00000002;
+ {$EXTERNALSYM SERVICE_ACCEPT_PAUSE_CONTINUE}
+ SERVICE_ACCEPT_SHUTDOWN = $00000004;
+ {$EXTERNALSYM SERVICE_ACCEPT_SHUTDOWN}
+ SERVICE_ACCEPT_PARAMCHANGE = $00000008;
+ {$EXTERNALSYM SERVICE_ACCEPT_PARAMCHANGE}
+ SERVICE_ACCEPT_NETBINDCHANGE = $00000010;
+ {$EXTERNALSYM SERVICE_ACCEPT_NETBINDCHANGE}
+ SERVICE_ACCEPT_HARDWAREPROFILECHANGE = $00000020;
+ {$EXTERNALSYM SERVICE_ACCEPT_HARDWAREPROFILECHANGE}
+ SERVICE_ACCEPT_POWEREVENT = $00000040;
+ {$EXTERNALSYM SERVICE_ACCEPT_POWEREVENT}
+ SERVICE_ACCEPT_SESSIONCHANGE = $00000080;
+ {$EXTERNALSYM SERVICE_ACCEPT_SESSIONCHANGE}
+
+//
+// Service Control Manager object specific access types
+//
+
+ SC_MANAGER_CONNECT = $0001;
+ {$EXTERNALSYM SC_MANAGER_CONNECT}
+ SC_MANAGER_CREATE_SERVICE = $0002;
+ {$EXTERNALSYM SC_MANAGER_CREATE_SERVICE}
+ SC_MANAGER_ENUMERATE_SERVICE = $0004;
+ {$EXTERNALSYM SC_MANAGER_ENUMERATE_SERVICE}
+ SC_MANAGER_LOCK = $0008;
+ {$EXTERNALSYM SC_MANAGER_LOCK}
+ SC_MANAGER_QUERY_LOCK_STATUS = $0010;
+ {$EXTERNALSYM SC_MANAGER_QUERY_LOCK_STATUS}
+ SC_MANAGER_MODIFY_BOOT_CONFIG = $0020;
+ {$EXTERNALSYM SC_MANAGER_MODIFY_BOOT_CONFIG}
+
+ SC_MANAGER_ALL_ACCESS = STANDARD_RIGHTS_REQUIRED or
+ SC_MANAGER_CONNECT or
+ SC_MANAGER_CREATE_SERVICE or
+ SC_MANAGER_ENUMERATE_SERVICE or
+ SC_MANAGER_LOCK or
+ SC_MANAGER_QUERY_LOCK_STATUS or
+ SC_MANAGER_MODIFY_BOOT_CONFIG;
+ {$EXTERNALSYM SC_MANAGER_ALL_ACCESS}
+
+//
+// Service object specific access type
+//
+
+ SERVICE_QUERY_CONFIG = $0001;
+ {$EXTERNALSYM SERVICE_QUERY_CONFIG}
+ SERVICE_CHANGE_CONFIG = $0002;
+ {$EXTERNALSYM SERVICE_CHANGE_CONFIG}
+ SERVICE_QUERY_STATUS = $0004;
+ {$EXTERNALSYM SERVICE_QUERY_STATUS}
+ SERVICE_ENUMERATE_DEPENDENTS = $0008;
+ {$EXTERNALSYM SERVICE_ENUMERATE_DEPENDENTS}
+ SERVICE_START = $0010;
+ {$EXTERNALSYM SERVICE_START}
+ SERVICE_STOP = $0020;
+ {$EXTERNALSYM SERVICE_STOP}
+ SERVICE_PAUSE_CONTINUE = $0040;
+ {$EXTERNALSYM SERVICE_PAUSE_CONTINUE}
+ SERVICE_INTERROGATE = $0080;
+ {$EXTERNALSYM SERVICE_INTERROGATE}
+ SERVICE_USER_DEFINED_CONTROL = $0100;
+ {$EXTERNALSYM SERVICE_USER_DEFINED_CONTROL}
+
+ SERVICE_ALL_ACCESS = STANDARD_RIGHTS_REQUIRED or
+ SERVICE_QUERY_CONFIG or
+ SERVICE_CHANGE_CONFIG or
+ SERVICE_QUERY_STATUS or
+ SERVICE_ENUMERATE_DEPENDENTS or
+ SERVICE_START or
+ SERVICE_STOP or
+ SERVICE_PAUSE_CONTINUE or
+ SERVICE_INTERROGATE or
+ SERVICE_USER_DEFINED_CONTROL;
+ {$EXTERNALSYM SERVICE_ALL_ACCESS}
+
+//
+// Service flags for QueryServiceStatusEx
+//
+
+ SERVICE_RUNS_IN_SYSTEM_PROCESS = $00000001;
+ {$EXTERNALSYM SERVICE_RUNS_IN_SYSTEM_PROCESS}
+
+//
+// Info levels for ChangeServiceConfig2 and QueryServiceConfig2
+//
+
+ SERVICE_CONFIG_DESCRIPTION = 1;
+ {$EXTERNALSYM SERVICE_CONFIG_DESCRIPTION}
+ SERVICE_CONFIG_FAILURE_ACTIONS = 2;
+ {$EXTERNALSYM SERVICE_CONFIG_FAILURE_ACTIONS}
+
+//
+// Service description string
+//
+
+type
+ LPSERVICE_DESCRIPTIONA = ^SERVICE_DESCRIPTIONA;
+ {$EXTERNALSYM LPSERVICE_DESCRIPTIONA}
+ _SERVICE_DESCRIPTIONA = record
+ lpDescription: LPSTR;
+ end;
+ {$EXTERNALSYM _SERVICE_DESCRIPTIONA}
+ SERVICE_DESCRIPTIONA = _SERVICE_DESCRIPTIONA;
+ {$EXTERNALSYM SERVICE_DESCRIPTIONA}
+ TServiceDescriptionA = SERVICE_DESCRIPTIONA;
+ PServiceDescriptionA = LPSERVICE_DESCRIPTIONA;
+
+//
+// Service description string
+//
+
+ LPSERVICE_DESCRIPTIONW = ^SERVICE_DESCRIPTIONW;
+ {$EXTERNALSYM LPSERVICE_DESCRIPTIONW}
+ _SERVICE_DESCRIPTIONW = record
+ lpDescription: LPWSTR;
+ end;
+ {$EXTERNALSYM _SERVICE_DESCRIPTIONW}
+ SERVICE_DESCRIPTIONW = _SERVICE_DESCRIPTIONW;
+ {$EXTERNALSYM SERVICE_DESCRIPTIONW}
+ TServiceDescriptionW = SERVICE_DESCRIPTIONW;
+ PServiceDescriptionW = LPSERVICE_DESCRIPTIONW;
+
+ {$IFDEF UNICODE}
+ SERVICE_DESCRIPTION = SERVICE_DESCRIPTIONW;
+ {$EXTERNALSYM SERVICE_DESCRIPTION}
+ LPSERVICE_DESCRIPTION = LPSERVICE_DESCRIPTIONW;
+ {$EXTERNALSYM LPSERVICE_DESCRIPTION}
+ TServiceDescription = TServiceDescriptionW;
+ PServiceDescription = PServiceDescriptionW;
+ {$ELSE}
+ SERVICE_DESCRIPTION = SERVICE_DESCRIPTIONA;
+ {$EXTERNALSYM SERVICE_DESCRIPTION}
+ LPSERVICE_DESCRIPTION = LPSERVICE_DESCRIPTIONA;
+ {$EXTERNALSYM LPSERVICE_DESCRIPTION}
+ TServiceDescription = TServiceDescriptionA;
+ PServiceDescription = PServiceDescriptionA;
+ {$ENDIF UNICODE}
+
+//
+// Actions to take on service failure
+//
+
+ _SC_ACTION_TYPE = (SC_ACTION_NONE, SC_ACTION_RESTART, SC_ACTION_REBOOT,
+ SC_ACTION_RUN_COMMAND);
+ {$EXTERNALSYM _SC_ACTION_TYPE}
+ SC_ACTION_TYPE = _SC_ACTION_TYPE;
+ {$EXTERNALSYM SC_ACTION_TYPE}
+ TScActionType = _SC_ACTION_TYPE;
+
+ LPSC_ACTION = ^SC_ACTION;
+ {$EXTERNALSYM LPSC_ACTION}
+ _SC_ACTION = record
+ Type_: SC_ACTION_TYPE;
+ Delay: DWORD;
+ end;
+ {$EXTERNALSYM _SC_ACTION}
+ SC_ACTION = _SC_ACTION;
+ {$EXTERNALSYM SC_ACTION}
+ TScAction = SC_ACTION;
+ PScAction = LPSC_ACTION;
+
+ LPSERVICE_FAILURE_ACTIONSA = ^SERVICE_FAILURE_ACTIONSA;
+ {$EXTERNALSYM LPSERVICE_FAILURE_ACTIONSA}
+ _SERVICE_FAILURE_ACTIONSA = record
+ dwResetPeriod: DWORD;
+ lpRebootMsg: LPSTR;
+ lpCommand: LPSTR;
+ cActions: DWORD;
+ lpsaActions: LPSC_ACTION;
+ end;
+ {$EXTERNALSYM _SERVICE_FAILURE_ACTIONSA}
+ SERVICE_FAILURE_ACTIONSA = _SERVICE_FAILURE_ACTIONSA;
+ {$EXTERNALSYM SERVICE_FAILURE_ACTIONSA}
+ TServiceFailureActionsA = SERVICE_FAILURE_ACTIONSA;
+ PServiceFailureActionsA = LPSERVICE_FAILURE_ACTIONSA;
+
+ LPSERVICE_FAILURE_ACTIONSW = ^SERVICE_FAILURE_ACTIONSW;
+ {$EXTERNALSYM LPSERVICE_FAILURE_ACTIONSW}
+ _SERVICE_FAILURE_ACTIONSW = record
+ dwResetPeriod: DWORD;
+ lpRebootMsg: LPWSTR;
+ lpCommand: LPWSTR;
+ cActions: DWORD;
+ lpsaActions: LPSC_ACTION;
+ end;
+ {$EXTERNALSYM _SERVICE_FAILURE_ACTIONSW}
+ SERVICE_FAILURE_ACTIONSW = _SERVICE_FAILURE_ACTIONSW;
+ {$EXTERNALSYM SERVICE_FAILURE_ACTIONSW}
+ TServiceFailureActionsW = SERVICE_FAILURE_ACTIONSW;
+ PServiceFailureActionsW = LPSERVICE_FAILURE_ACTIONSW;
+
+ {$IFDEF UNICODE}
+ SERVICE_FAILURE_ACTIONS = SERVICE_FAILURE_ACTIONSW;
+ {$EXTERNALSYM SERVICE_FAILURE_ACTIONS}
+ LPSERVICE_FAILURE_ACTIONS = LPSERVICE_FAILURE_ACTIONSW;
+ {$EXTERNALSYM LPSERVICE_FAILURE_ACTIONS}
+ TServiceFailureActions = TServiceFailureActionsW;
+ PServiceFailureActions = PServiceFailureActionsW;
+ {$ELSE}
+ SERVICE_FAILURE_ACTIONS = SERVICE_FAILURE_ACTIONSA;
+ {$EXTERNALSYM SERVICE_FAILURE_ACTIONS}
+ LPSERVICE_FAILURE_ACTIONS = LPSERVICE_FAILURE_ACTIONSA;
+ {$EXTERNALSYM LPSERVICE_FAILURE_ACTIONS}
+ TServiceFailureActions = TServiceFailureActionsA;
+ PServiceFailureActions = PServiceFailureActionsA;
+ {$ENDIF UNICODE}
+
+//
+// Handle Types
+//
+
+ SC_HANDLE = HANDLE;
+ {$EXTERNALSYM SC_HANDLE}
+ LPSC_HANDLE = ^SC_HANDLE;
+ {$EXTERNALSYM LPSC_HANDLE}
+
+ SERVICE_STATUS_HANDLE = HANDLE;
+ {$EXTERNALSYM SERVICE_STATUS_HANDLE}
+
+//
+// Info levels for QueryServiceStatusEx
+//
+
+ _SC_STATUS_TYPE = (SC_STATUS_PROCESS_INFO);
+ {$EXTERNALSYM _SC_STATUS_TYPE}
+ SC_STATUS_TYPE = _SC_STATUS_TYPE;
+ {$EXTERNALSYM SC_STATUS_TYPE}
+
+//
+// Info levels for EnumServicesStatusEx
+//
+
+ _SC_ENUM_TYPE = (SC_ENUM_PROCESS_INFO);
+ {$EXTERNALSYM _SC_ENUM_TYPE}
+ SC_ENUM_TYPE = _SC_ENUM_TYPE;
+ {$EXTERNALSYM SC_ENUM_TYPE}
+
+//
+// Service Status Structures
+//
+
+ LPSERVICE_STATUS = ^SERVICE_STATUS;
+ {$EXTERNALSYM LPSERVICE_STATUS}
+ _SERVICE_STATUS = record
+ dwServiceType: DWORD;
+ dwCurrentState: DWORD;
+ dwControlsAccepted: DWORD;
+ dwWin32ExitCode: DWORD;
+ dwServiceSpecificExitCode: DWORD;
+ dwCheckPoint: DWORD;
+ dwWaitHint: DWORD;
+ end;
+ {$EXTERNALSYM _SERVICE_STATUS}
+ SERVICE_STATUS = _SERVICE_STATUS;
+ {$EXTERNALSYM SERVICE_STATUS}
+ TServiceStatus = SERVICE_STATUS;
+ PServiceStatus = LPSERVICE_STATUS;
+
+ LPSERVICE_STATUS_PROCESS = ^SERVICE_STATUS_PROCESS;
+ {$EXTERNALSYM LPSERVICE_STATUS_PROCESS}
+ _SERVICE_STATUS_PROCESS = record
+ dwServiceType: DWORD;
+ dwCurrentState: DWORD;
+ dwControlsAccepted: DWORD;
+ dwWin32ExitCode: DWORD;
+ dwServiceSpecificExitCode: DWORD;
+ dwCheckPoint: DWORD;
+ dwWaitHint: DWORD;
+ dwProcessId: DWORD;
+ dwServiceFlags: DWORD;
+ end;
+ {$EXTERNALSYM _SERVICE_STATUS_PROCESS}
+ SERVICE_STATUS_PROCESS = _SERVICE_STATUS_PROCESS;
+ {$EXTERNALSYM SERVICE_STATUS_PROCESS}
+ TServiceStatusProcess = SERVICE_STATUS_PROCESS;
+ PServiceStatusProcess = LPSERVICE_STATUS_PROCESS;
+
+//
+// Service Status Enumeration Structure
+//
+
+ LPENUM_SERVICE_STATUSA = ^ENUM_SERVICE_STATUSA;
+ {$EXTERNALSYM LPENUM_SERVICE_STATUSA}
+ _ENUM_SERVICE_STATUSA = record
+ lpServiceName: LPSTR;
+ lpDisplayName: LPSTR;
+ ServiceStatus: SERVICE_STATUS;
+ end;
+ {$EXTERNALSYM _ENUM_SERVICE_STATUSA}
+ ENUM_SERVICE_STATUSA = _ENUM_SERVICE_STATUSA;
+ {$EXTERNALSYM ENUM_SERVICE_STATUSA}
+ TEnumServiceStatusA = ENUM_SERVICE_STATUSA;
+ PEnumServiceStatusA = LPENUM_SERVICE_STATUSA;
+
+ LPENUM_SERVICE_STATUSW = ^ENUM_SERVICE_STATUSW;
+ {$EXTERNALSYM LPENUM_SERVICE_STATUSW}
+ _ENUM_SERVICE_STATUSW = record
+ lpServiceName: LPWSTR;
+ lpDisplayName: LPWSTR;
+ ServiceStatus: SERVICE_STATUS;
+ end;
+ {$EXTERNALSYM _ENUM_SERVICE_STATUSW}
+ ENUM_SERVICE_STATUSW = _ENUM_SERVICE_STATUSW;
+ {$EXTERNALSYM ENUM_SERVICE_STATUSW}
+ TEnumServiceStatusW = ENUM_SERVICE_STATUSW;
+ PEnumServiceStatusW = LPENUM_SERVICE_STATUSW;
+
+ {$IFDEF UNICODE}
+ ENUM_SERVICE_STATUS = ENUM_SERVICE_STATUSW;
+ {$EXTERNALSYM ENUM_SERVICE_STATUS}
+ LPENUM_SERVICE_STATUS = LPENUM_SERVICE_STATUSW;
+ {$EXTERNALSYM LPENUM_SERVICE_STATUS}
+ TEnumServiceStatus = TEnumServiceStatusW;
+ PEnumServiceStatus = PEnumServiceStatusW;
+ {$ELSE}
+ ENUM_SERVICE_STATUS = ENUM_SERVICE_STATUSA;
+ {$EXTERNALSYM ENUM_SERVICE_STATUS}
+ LPENUM_SERVICE_STATUS = LPENUM_SERVICE_STATUSA;
+ {$EXTERNALSYM LPENUM_SERVICE_STATUS}
+ TEnumServiceStatus = TEnumServiceStatusA;
+ PEnumServiceStatus = PEnumServiceStatusA;
+ {$ENDIF UNICODE}
+
+ LPENUM_SERVICE_STATUS_PROCESSA = ^ENUM_SERVICE_STATUS_PROCESSA;
+ {$EXTERNALSYM LPENUM_SERVICE_STATUS_PROCESSA}
+ _ENUM_SERVICE_STATUS_PROCESSA = record
+ lpServiceName: LPSTR;
+ lpDisplayName: LPSTR;
+ ServiceStatusProcess: SERVICE_STATUS_PROCESS;
+ end;
+ {$EXTERNALSYM _ENUM_SERVICE_STATUS_PROCESSA}
+ ENUM_SERVICE_STATUS_PROCESSA = _ENUM_SERVICE_STATUS_PROCESSA;
+ {$EXTERNALSYM ENUM_SERVICE_STATUS_PROCESSA}
+ TEnumServiceStatusProcessA = ENUM_SERVICE_STATUS_PROCESSA;
+ PEnumServiceStatusProcessA = LPENUM_SERVICE_STATUS_PROCESSA;
+
+ LPENUM_SERVICE_STATUS_PROCESSW = ^ENUM_SERVICE_STATUS_PROCESSW;
+ {$EXTERNALSYM LPENUM_SERVICE_STATUS_PROCESSW}
+ _ENUM_SERVICE_STATUS_PROCESSW = record
+ lpServiceName: LPWSTR;
+ lpDisplayName: LPWSTR;
+ ServiceStatusProcess: SERVICE_STATUS_PROCESS;
+ end;
+ {$EXTERNALSYM _ENUM_SERVICE_STATUS_PROCESSW}
+ ENUM_SERVICE_STATUS_PROCESSW = _ENUM_SERVICE_STATUS_PROCESSW;
+ {$EXTERNALSYM ENUM_SERVICE_STATUS_PROCESSW}
+ TEnumServiceStatusProcessW = ENUM_SERVICE_STATUS_PROCESSW;
+ PEnumServiceStatusProcessW = LPENUM_SERVICE_STATUS_PROCESSW;
+
+ {$IFDEF UNICODE}
+ ENUM_SERVICE_STATUS_PROCESS = ENUM_SERVICE_STATUS_PROCESSW;
+ {$EXTERNALSYM ENUM_SERVICE_STATUS_PROCESS}
+ LPENUM_SERVICE_STATUS_PROCESS = LPENUM_SERVICE_STATUS_PROCESSW;
+ {$EXTERNALSYM LPENUM_SERVICE_STATUS_PROCESS}
+ TEnumServiceStatusProcess = TEnumServiceStatusProcessW;
+ PEnumServiceStatusProcess = PEnumServiceStatusProcessW;
+ {$ELSE}
+ ENUM_SERVICE_STATUS_PROCESS = ENUM_SERVICE_STATUS_PROCESSA;
+ {$EXTERNALSYM ENUM_SERVICE_STATUS_PROCESS}
+ LPENUM_SERVICE_STATUS_PROCESS = LPENUM_SERVICE_STATUS_PROCESSA;
+ {$EXTERNALSYM LPENUM_SERVICE_STATUS_PROCESS}
+ TEnumServiceStatusProcess = TEnumServiceStatusProcessA;
+ PEnumServiceStatusProcess = PEnumServiceStatusProcessA;
+ {$ENDIF UNICODE}
+
+//
+// Structures for the Lock API functions
+//
+
+ SC_LOCK = LPVOID;
+ {$EXTERNALSYM SC_LOCK}
+
+ LPQUERY_SERVICE_LOCK_STATUSA = ^QUERY_SERVICE_LOCK_STATUSA;
+ {$EXTERNALSYM LPQUERY_SERVICE_LOCK_STATUSA}
+ _QUERY_SERVICE_LOCK_STATUSA = record
+ fIsLocked: DWORD;
+ lpLockOwner: LPSTR;
+ dwLockDuration: DWORD;
+ end;
+ {$EXTERNALSYM _QUERY_SERVICE_LOCK_STATUSA}
+ QUERY_SERVICE_LOCK_STATUSA = _QUERY_SERVICE_LOCK_STATUSA;
+ {$EXTERNALSYM QUERY_SERVICE_LOCK_STATUSA}
+ TQueryServiceLockStatusA = QUERY_SERVICE_LOCK_STATUSA;
+ PQueryServiceLockStatusA = LPQUERY_SERVICE_LOCK_STATUSA;
+
+ LPQUERY_SERVICE_LOCK_STATUSW = ^QUERY_SERVICE_LOCK_STATUSW;
+ {$EXTERNALSYM LPQUERY_SERVICE_LOCK_STATUSW}
+ _QUERY_SERVICE_LOCK_STATUSW = record
+ fIsLocked: DWORD;
+ lpLockOwner: LPWSTR;
+ dwLockDuration: DWORD;
+ end;
+ {$EXTERNALSYM _QUERY_SERVICE_LOCK_STATUSW}
+ QUERY_SERVICE_LOCK_STATUSW = _QUERY_SERVICE_LOCK_STATUSW;
+ {$EXTERNALSYM QUERY_SERVICE_LOCK_STATUSW}
+ TQueryServiceLockStatusW = QUERY_SERVICE_LOCK_STATUSW;
+ PQueryServiceLockStatusW = LPQUERY_SERVICE_LOCK_STATUSW;
+
+ {$IFDEF UNICODE}
+ QUERY_SERVICE_LOCK_STATUS = QUERY_SERVICE_LOCK_STATUSW;
+ {$EXTERNALSYM QUERY_SERVICE_LOCK_STATUS}
+ LPQUERY_SERVICE_LOCK_STATUS = LPQUERY_SERVICE_LOCK_STATUSW;
+ {$EXTERNALSYM LPQUERY_SERVICE_LOCK_STATUS}
+ TQueryServiceLockStatus = TQueryServiceLockStatusW;
+ PQueryServiceLockStatus = PQueryServiceLockStatusW;
+ {$ELSE}
+ QUERY_SERVICE_LOCK_STATUS = QUERY_SERVICE_LOCK_STATUSA;
+ {$EXTERNALSYM QUERY_SERVICE_LOCK_STATUS}
+ LPQUERY_SERVICE_LOCK_STATUS = LPQUERY_SERVICE_LOCK_STATUSA;
+ {$EXTERNALSYM LPQUERY_SERVICE_LOCK_STATUS}
+ TQueryServiceLockStatus = TQueryServiceLockStatusA;
+ PQueryServiceLockStatus = PQueryServiceLockStatusA;
+ {$ENDIF UNICODE}
+
+//
+// Query Service Configuration Structure
+//
+
+ LPQUERY_SERVICE_CONFIGA = ^QUERY_SERVICE_CONFIGA;
+ {$EXTERNALSYM LPQUERY_SERVICE_CONFIGA}
+ _QUERY_SERVICE_CONFIGA = record
+ dwServiceType: DWORD;
+ dwStartType: DWORD;
+ dwErrorControl: DWORD;
+ lpBinaryPathName: LPSTR;
+ lpLoadOrderGroup: LPSTR;
+ dwTagId: DWORD;
+ lpDependencies: LPSTR;
+ lpServiceStartName: LPSTR;
+ lpDisplayName: LPSTR;
+ end;
+ {$EXTERNALSYM _QUERY_SERVICE_CONFIGA}
+ QUERY_SERVICE_CONFIGA = _QUERY_SERVICE_CONFIGA;
+ {$EXTERNALSYM QUERY_SERVICE_CONFIGA}
+ TQueryServiceConfigA = QUERY_SERVICE_CONFIGA;
+ PQueryServiceConfigA = LPQUERY_SERVICE_CONFIGA;
+
+ LPQUERY_SERVICE_CONFIGW = ^QUERY_SERVICE_CONFIGW;
+ {$EXTERNALSYM LPQUERY_SERVICE_CONFIGW}
+ _QUERY_SERVICE_CONFIGW = record
+ dwServiceType: DWORD;
+ dwStartType: DWORD;
+ dwErrorControl: DWORD;
+ lpBinaryPathName: LPWSTR;
+ lpLoadOrderGroup: LPWSTR;
+ dwTagId: DWORD;
+ lpDependencies: LPWSTR;
+ lpServiceStartName: LPWSTR;
+ lpDisplayName: LPWSTR;
+ end;
+ {$EXTERNALSYM _QUERY_SERVICE_CONFIGW}
+ QUERY_SERVICE_CONFIGW = _QUERY_SERVICE_CONFIGW;
+ {$EXTERNALSYM QUERY_SERVICE_CONFIGW}
+ TQueryServiceConfigW = QUERY_SERVICE_CONFIGW;
+ PQueryServiceConfigW = LPQUERY_SERVICE_CONFIGW;
+
+ {$IFDEF UNICODE}
+ QUERY_SERVICE_CONFIG = QUERY_SERVICE_CONFIGW;
+ {$EXTERNALSYM QUERY_SERVICE_CONFIG}
+ LPQUERY_SERVICE_CONFIG = LPQUERY_SERVICE_CONFIGW;
+ {$EXTERNALSYM LPQUERY_SERVICE_CONFIG}
+ TQueryServiceConfig = TQueryServiceConfigW;
+ PQueryServiceConfig = PQueryServiceConfigW;
+ {$ELSE}
+ QUERY_SERVICE_CONFIG = QUERY_SERVICE_CONFIGA;
+ {$EXTERNALSYM QUERY_SERVICE_CONFIG}
+ LPQUERY_SERVICE_CONFIG = LPQUERY_SERVICE_CONFIGA;
+ {$EXTERNALSYM LPQUERY_SERVICE_CONFIG}
+ TQueryServiceConfig = TQueryServiceConfigA;
+ PQueryServiceConfig = PQueryServiceConfigA;
+ {$ENDIF UNICODE}
+
+//
+// Function Prototype for the Service Main Function
+//
+
+type
+ LPSERVICE_MAIN_FUNCTIONW = procedure(dwNumServicesArgs: DWORD;
+ lpServiceArgVectors: LPWSTR); stdcall;
+ {$EXTERNALSYM LPSERVICE_MAIN_FUNCTIONW}
+ LPSERVICE_MAIN_FUNCTIONA = procedure(dwNumServicesArgs: DWORD;
+ lpServiceArgVectors: LPSTR); stdcall;
+ {$EXTERNALSYM LPSERVICE_MAIN_FUNCTIONA}
+
+ TServiceMainFunctionA = LPSERVICE_MAIN_FUNCTIONA;
+ TServiceMainFunctionW = LPSERVICE_MAIN_FUNCTIONW;
+
+ {$IFDEF UNICODE}
+ LPSERVICE_MAIN_FUNCTION = LPSERVICE_MAIN_FUNCTIONW;
+ {$EXTERNALSYM LPSERVICE_MAIN_FUNCTION}
+ TServiceMainFunction = LPSERVICE_MAIN_FUNCTIONW;
+ {$ELSE}
+ LPSERVICE_MAIN_FUNCTION = LPSERVICE_MAIN_FUNCTIONA;
+ {$EXTERNALSYM LPSERVICE_MAIN_FUNCTION}
+ TServiceMainFunction = LPSERVICE_MAIN_FUNCTIONA;
+ {$ENDIF UNICODE}
+
+//
+// Service Start Table
+//
+
+ LPSERVICE_TABLE_ENTRYA = ^SERVICE_TABLE_ENTRYA;
+ {$EXTERNALSYM LPSERVICE_TABLE_ENTRYA}
+ _SERVICE_TABLE_ENTRYA = record
+ lpServiceName: LPSTR;
+ lpServiceProc: LPSERVICE_MAIN_FUNCTIONA;
+ end;
+ {$EXTERNALSYM _SERVICE_TABLE_ENTRYA}
+ SERVICE_TABLE_ENTRYA = _SERVICE_TABLE_ENTRYA;
+ {$EXTERNALSYM SERVICE_TABLE_ENTRYA}
+ TServiceTableEntryA = SERVICE_TABLE_ENTRYA;
+ PServiceTableEntryA = LPSERVICE_TABLE_ENTRYA;
+
+ LPSERVICE_TABLE_ENTRYW = ^SERVICE_TABLE_ENTRYW;
+ {$EXTERNALSYM LPSERVICE_TABLE_ENTRYW}
+ _SERVICE_TABLE_ENTRYW = record
+ lpServiceName: LPWSTR;
+ lpServiceProc: LPSERVICE_MAIN_FUNCTIONW;
+ end;
+ {$EXTERNALSYM _SERVICE_TABLE_ENTRYW}
+ SERVICE_TABLE_ENTRYW = _SERVICE_TABLE_ENTRYW;
+ {$EXTERNALSYM SERVICE_TABLE_ENTRYW}
+ TServiceTableEntryW = SERVICE_TABLE_ENTRYW;
+ PServiceTableEntryW = LPSERVICE_TABLE_ENTRYW;
+
+ {$IFDEF UNICODE}
+ SERVICE_TABLE_ENTRY = SERVICE_TABLE_ENTRYW;
+ LPSERVICE_TABLE_ENTRY = LPSERVICE_TABLE_ENTRYW;
+ TServiceTableEntry = TServiceTableEntryW;
+ PServiceTableEntry = PServiceTableEntryW;
+ {$ELSE}
+ SERVICE_TABLE_ENTRY = SERVICE_TABLE_ENTRYA;
+ LPSERVICE_TABLE_ENTRY = LPSERVICE_TABLE_ENTRYA;
+ TServiceTableEntry = TServiceTableEntryA;
+ PServiceTableEntry = PServiceTableEntryA;
+ {$ENDIF UNICODE}
+
+//
+// Prototype for the Service Control Handler Function
+//
+
+ LPHANDLER_FUNCTION = procedure(dwControl: DWORD); stdcall;
+ {$EXTERNALSYM LPHANDLER_FUNCTION}
+ THandlerFunction = LPHANDLER_FUNCTION;
+
+ LPHANDLER_FUNCTION_EX = function(dwControl, dwEventType: DWORD;
+ lpEventData, lpContext: LPVOID): DWORD; stdcall;
+ {$EXTERNALSYM LPHANDLER_FUNCTION_EX}
+ THandlerFunctionEx = LPHANDLER_FUNCTION_EX;
+
+///////////////////////////////////////////////////////////////////////////
+// API Function Prototypes
+///////////////////////////////////////////////////////////////////////////
+
+function ChangeServiceConfigA(hService: SC_HANDLE; dwServiceType, dwStartType,
+ dwErrorControl: DWORD; lpBinaryPathName, lpLoadOrderGroup: LPCSTR;
+ lpdwTagId: LPDWORD; lpDependencies, lpServiceStartName, lpPassword,
+ lpDisplayName: LPCSTR): BOOL; stdcall;
+{$EXTERNALSYM ChangeServiceConfigA}
+function ChangeServiceConfigW(hService: SC_HANDLE; dwServiceType, dwStartType,
+ dwErrorControl: DWORD; lpBinaryPathName, lpLoadOrderGroup: LPCWSTR;
+ lpdwTagId: LPDWORD; lpDependencies, lpServiceStartName, lpPassword,
+ lpDisplayName: LPCWSTR): BOOL; stdcall;
+{$EXTERNALSYM ChangeServiceConfigW}
+function ChangeServiceConfig(hService: SC_HANDLE; dwServiceType, dwStartType,
+ dwErrorControl: DWORD; lpBinaryPathName, lpLoadOrderGroup: LPCTSTR;
+ lpdwTagId: LPDWORD; lpDependencies, lpServiceStartName, lpPassword,
+ lpDisplayName: LPCTSTR): BOOL; stdcall;
+{$EXTERNALSYM ChangeServiceConfig}
+
+function ChangeServiceConfig2A(hService: SC_HANDLE; dwInfoLevel: DWORD;
+ lpInfo: LPVOID): BOOL; stdcall;
+{$EXTERNALSYM ChangeServiceConfig2A}
+function ChangeServiceConfig2W(hService: SC_HANDLE; dwInfoLevel: DWORD;
+ lpInfo: LPVOID): BOOL; stdcall;
+{$EXTERNALSYM ChangeServiceConfig2W}
+function ChangeServiceConfig2(hService: SC_HANDLE; dwInfoLevel: DWORD;
+ lpInfo: LPVOID): BOOL; stdcall;
+{$EXTERNALSYM ChangeServiceConfig2}
+
+function CloseServiceHandle(hSCObject: SC_HANDLE): BOOL; stdcall;
+{$EXTERNALSYM CloseServiceHandle}
+
+function ControlService(hService: SC_HANDLE; dwControl: DWORD;
+ var lpServiceStatus: SERVICE_STATUS): BOOL; stdcall;
+{$EXTERNALSYM ControlService}
+
+function CreateServiceA(hSCManager: SC_HANDLE; lpServiceName, lpDisplayName: LPCSTR;
+ dwDesiredAccess, dwServiceType, dwStartType, dwErrorControl: DWORD;
+ lpBinaryPathName, lpLoadOrderGroup: LPCSTR; lpdwTagId: LPDWORD;
+ lpDependencies, lpServiceStartName, lpPassword: LPCSTR): SC_HANDLE; stdcall;
+{$EXTERNALSYM CreateServiceA}
+function CreateServiceW(hSCManager: SC_HANDLE; lpServiceName, lpDisplayName: LPCWSTR;
+ dwDesiredAccess, dwServiceType, dwStartType, dwErrorControl: DWORD;
+ lpBinaryPathName, lpLoadOrderGroup: LPCWSTR; lpdwTagId: LPDWORD;
+ lpDependencies, lpServiceStartName, lpPassword: LPCWSTR): SC_HANDLE; stdcall;
+{$EXTERNALSYM CreateServiceW}
+function CreateService(hSCManager: SC_HANDLE; lpServiceName, lpDisplayName: LPCTSTR;
+ dwDesiredAccess, dwServiceType, dwStartType, dwErrorControl: DWORD;
+ lpBinaryPathName, lpLoadOrderGroup: LPCTSTR; lpdwTagId: LPDWORD;
+ lpDependencies, lpServiceStartName, lpPassword: LPCTSTR): SC_HANDLE; stdcall;
+{$EXTERNALSYM CreateService}
+
+function DeleteService(hService: SC_HANDLE): BOOL; stdcall;
+{$EXTERNALSYM DeleteService}
+
+function EnumDependentServicesA(hService: SC_HANDLE; dwServiceState: DWORD;
+ lpServices: LPENUM_SERVICE_STATUSA; cbBufSize: DWORD; var pcbBytesNeeded,
+ lpServicesReturned: DWORD): BOOL; stdcall;
+{$EXTERNALSYM EnumDependentServicesA}
+function EnumDependentServicesW(hService: SC_HANDLE; dwServiceState: DWORD;
+ lpServices: LPENUM_SERVICE_STATUSW; cbBufSize: DWORD; var pcbBytesNeeded,
+ lpServicesReturned: DWORD): BOOL; stdcall;
+{$EXTERNALSYM EnumDependentServicesW}
+function EnumDependentServices(hService: SC_HANDLE; dwServiceState: DWORD;
+ lpServices: LPENUM_SERVICE_STATUS; cbBufSize: DWORD; var pcbBytesNeeded,
+ lpServicesReturned: DWORD): BOOL; stdcall;
+{$EXTERNALSYM EnumDependentServices}
+
+function EnumServicesStatusA(hSCManager: SC_HANDLE; dwServiceType: DWORD;
+ dwServiceState: DWORD; lpServices: LPENUM_SERVICE_STATUSA; cbBufSize: DWORD;
+ var pcbBytesNeeded, lpServicesReturned, lpResumeHandle: DWORD): BOOL; stdcall;
+{$EXTERNALSYM EnumServicesStatusA}
+function EnumServicesStatusW(hSCManager: SC_HANDLE; dwServiceType: DWORD;
+ dwServiceState: DWORD; lpServices: LPENUM_SERVICE_STATUSW; cbBufSize: DWORD;
+ var pcbBytesNeeded, lpServicesReturned, lpResumeHandle: DWORD): BOOL; stdcall;
+{$EXTERNALSYM EnumServicesStatusW}
+function EnumServicesStatus(hSCManager: SC_HANDLE; dwServiceType: DWORD;
+ dwServiceState: DWORD; lpServices: LPENUM_SERVICE_STATUS; cbBufSize: DWORD;
+ var pcbBytesNeeded, lpServicesReturned, lpResumeHandle: DWORD): BOOL; stdcall;
+{$EXTERNALSYM EnumServicesStatus}
+
+function EnumServicesStatusExA(hSCManager: SC_HANDLE; InfoLevel: SC_ENUM_TYPE;
+ dwServiceType: DWORD; dwServiceState: DWORD; lpServices: LPBYTE;
+ cbBufSize: DWORD; var pcbBytesNeeded, lpServicesReturned, lpResumeHandle: DWORD;
+ pszGroupName: LPCSTR): BOOL; stdcall;
+{$EXTERNALSYM EnumServicesStatusExA}
+function EnumServicesStatusExW(hSCManager: SC_HANDLE; InfoLevel: SC_ENUM_TYPE;
+ dwServiceType: DWORD; dwServiceState: DWORD; lpServices: LPBYTE;
+ cbBufSize: DWORD; var pcbBytesNeeded, lpServicesReturned, lpResumeHandle: DWORD;
+ pszGroupName: LPCWSTR): BOOL; stdcall;
+{$EXTERNALSYM EnumServicesStatusExW}
+function EnumServicesStatusEx(hSCManager: SC_HANDLE; InfoLevel: SC_ENUM_TYPE;
+ dwServiceType: DWORD; dwServiceState: DWORD; lpServices: LPBYTE;
+ cbBufSize: DWORD; var pcbBytesNeeded, lpServicesReturned, lpResumeHandle: DWORD;
+ pszGroupName: LPCTSTR): BOOL; stdcall;
+{$EXTERNALSYM EnumServicesStatusEx}
+
+function GetServiceKeyNameA(hSCManager: SC_HANDLE; lpDisplayName: LPCSTR;
+ lpServiceName: LPSTR; var lpcchBuffer: DWORD): BOOL; stdcall;
+{$EXTERNALSYM GetServiceKeyNameA}
+function GetServiceKeyNameW(hSCManager: SC_HANDLE; lpDisplayName: LPCWSTR;
+ lpServiceName: LPWSTR; var lpcchBuffer: DWORD): BOOL; stdcall;
+{$EXTERNALSYM GetServiceKeyNameW}
+function GetServiceKeyName(hSCManager: SC_HANDLE; lpDisplayName: LPCTSTR;
+ lpServiceName: LPTSTR; var lpcchBuffer: DWORD): BOOL; stdcall;
+{$EXTERNALSYM GetServiceKeyName}
+
+function GetServiceDisplayNameA(hSCManager: SC_HANDLE; lpServiceName: LPCSTR;
+ lpDisplayName: LPSTR; var lpcchBuffer: DWORD): BOOL; stdcall;
+{$EXTERNALSYM GetServiceDisplayNameA}
+function GetServiceDisplayNameW(hSCManager: SC_HANDLE; lpServiceName: LPCWSTR;
+ lpDisplayName: LPWSTR; var lpcchBuffer: DWORD): BOOL; stdcall;
+{$EXTERNALSYM GetServiceDisplayNameW}
+function GetServiceDisplayName(hSCManager: SC_HANDLE; lpServiceName: LPCTSTR;
+ lpDisplayName: LPTSTR; var lpcchBuffer: DWORD): BOOL; stdcall;
+{$EXTERNALSYM GetServiceDisplayName}
+
+function LockServiceDatabase(hSCManager: SC_HANDLE): SC_LOCK; stdcall;
+{$EXTERNALSYM LockServiceDatabase}
+
+function NotifyBootConfigStatus(BootAcceptable: BOOL): BOOL; stdcall;
+{$EXTERNALSYM NotifyBootConfigStatus}
+
+function OpenSCManagerA(lpMachineName: LPCSTR; lpDatabaseName: LPCSTR;
+ dwDesiredAccess: DWORD): SC_HANDLE; stdcall;
+{$EXTERNALSYM OpenSCManagerA}
+function OpenSCManagerW(lpMachineName: LPCWSTR; lpDatabaseName: LPCWSTR;
+ dwDesiredAccess: DWORD): SC_HANDLE; stdcall;
+{$EXTERNALSYM OpenSCManagerW}
+function OpenSCManager(lpMachineName: LPCTSTR; lpDatabaseName: LPCTSTR;
+ dwDesiredAccess: DWORD): SC_HANDLE; stdcall;
+{$EXTERNALSYM OpenSCManager}
+
+function OpenServiceA(hSCManager: SC_HANDLE; lpServiceName: LPCSTR;
+ dwDesiredAccess: DWORD): SC_HANDLE; stdcall;
+{$EXTERNALSYM OpenServiceA}
+function OpenServiceW(hSCManager: SC_HANDLE; lpServiceName: LPCWSTR;
+ dwDesiredAccess: DWORD): SC_HANDLE; stdcall;
+{$EXTERNALSYM OpenServiceW}
+function OpenService(hSCManager: SC_HANDLE; lpServiceName: LPCTSTR;
+ dwDesiredAccess: DWORD): SC_HANDLE; stdcall;
+{$EXTERNALSYM OpenService}
+
+function QueryServiceConfigA(hService: SC_HANDLE;
+ lpServiceConfig: LPQUERY_SERVICE_CONFIGA; cbBufSize: DWORD;
+ var pcbBytesNeeded: DWORD): BOOL; stdcall;
+{$EXTERNALSYM QueryServiceConfigA}
+function QueryServiceConfigW(hService: SC_HANDLE;
+ lpServiceConfig: LPQUERY_SERVICE_CONFIGW; cbBufSize: DWORD;
+ var pcbBytesNeeded: DWORD): BOOL; stdcall;
+{$EXTERNALSYM QueryServiceConfigW}
+function QueryServiceConfig(hService: SC_HANDLE;
+ lpServiceConfig: LPQUERY_SERVICE_CONFIG; cbBufSize: DWORD;
+ var pcbBytesNeeded: DWORD): BOOL; stdcall;
+{$EXTERNALSYM QueryServiceConfig}
+
+function QueryServiceConfig2A(hService: SC_HANDLE; dwInfoLevel: DWORD;
+ lpBuffer: LPBYTE; cbBufSize: DWORD; var pcbBytesNeeded: DWORD): BOOL; stdcall;
+{$EXTERNALSYM QueryServiceConfig2A}
+function QueryServiceConfig2W(hService: SC_HANDLE; dwInfoLevel: DWORD;
+ lpBuffer: LPBYTE; cbBufSize: DWORD; var pcbBytesNeeded: DWORD): BOOL; stdcall;
+{$EXTERNALSYM QueryServiceConfig2W}
+function QueryServiceConfig2(hService: SC_HANDLE; dwInfoLevel: DWORD;
+ lpBuffer: LPBYTE; cbBufSize: DWORD; var pcbBytesNeeded: DWORD): BOOL; stdcall;
+{$EXTERNALSYM QueryServiceConfig2}
+
+function QueryServiceLockStatusA(hSCManager: SC_HANDLE;
+ lpLockStatus: LPQUERY_SERVICE_LOCK_STATUSA; cbBufSize: DWORD;
+ var pcbBytesNeeded: DWORD): BOOL; stdcall;
+{$EXTERNALSYM QueryServiceLockStatusA}
+function QueryServiceLockStatusW(hSCManager: SC_HANDLE;
+ lpLockStatus: LPQUERY_SERVICE_LOCK_STATUSW; cbBufSize: DWORD;
+ var pcbBytesNeeded: DWORD): BOOL; stdcall;
+{$EXTERNALSYM QueryServiceLockStatusW}
+function QueryServiceLockStatus(hSCManager: SC_HANDLE;
+ lpLockStatus: LPQUERY_SERVICE_LOCK_STATUS; cbBufSize: DWORD;
+ var pcbBytesNeeded: DWORD): BOOL; stdcall;
+{$EXTERNALSYM QueryServiceLockStatus}
+
+function QueryServiceObjectSecurity(hService: SC_HANDLE;
+ dwSecurityInformation: SECURITY_INFORMATION;
+ var lpSecurityDescriptor: SECURITY_DESCRIPTOR; cbBufSize: DWORD;
+ var pcbBytesNeeded: DWORD): BOOL; stdcall;
+{$EXTERNALSYM QueryServiceObjectSecurity}
+
+function QueryServiceStatus(hService: SC_HANDLE;
+ var lpServiceStatus: SERVICE_STATUS): BOOL; stdcall;
+{$EXTERNALSYM QueryServiceStatus}
+
+function QueryServiceStatusEx(hService: SC_HANDLE; InfoLevel: SC_STATUS_TYPE;
+ lpBuffer: LPBYTE; cbBufSize: DWORD; var pcbBytesNeeded: DWORD): BOOL; stdcall;
+{$EXTERNALSYM QueryServiceStatusEx}
+
+function RegisterServiceCtrlHandlerA(lpServiceName: LPCSTR;
+ lpHandlerProc: LPHANDLER_FUNCTION): SERVICE_STATUS_HANDLE; stdcall;
+{$EXTERNALSYM RegisterServiceCtrlHandlerA}
+function RegisterServiceCtrlHandlerW(lpServiceName: LPCWSTR;
+ lpHandlerProc: LPHANDLER_FUNCTION): SERVICE_STATUS_HANDLE; stdcall;
+{$EXTERNALSYM RegisterServiceCtrlHandlerW}
+function RegisterServiceCtrlHandler(lpServiceName: LPCTSTR;
+ lpHandlerProc: LPHANDLER_FUNCTION): SERVICE_STATUS_HANDLE; stdcall;
+{$EXTERNALSYM RegisterServiceCtrlHandler}
+
+function RegisterServiceCtrlHandlerExA(lpServiceName: LPCSTR;
+ lpHandlerProc: LPHANDLER_FUNCTION_EX; lpContext: LPVOID): SERVICE_STATUS_HANDLE; stdcall;
+{$EXTERNALSYM RegisterServiceCtrlHandlerExA}
+function RegisterServiceCtrlHandlerExW(lpServiceName: LPCWSTR;
+ lpHandlerProc: LPHANDLER_FUNCTION_EX; lpContext: LPVOID): SERVICE_STATUS_HANDLE; stdcall;
+{$EXTERNALSYM RegisterServiceCtrlHandlerExW}
+function RegisterServiceCtrlHandlerEx(lpServiceName: LPCTSTR;
+ lpHandlerProc: LPHANDLER_FUNCTION_EX; lpContext: LPVOID): SERVICE_STATUS_HANDLE; stdcall;
+{$EXTERNALSYM RegisterServiceCtrlHandlerEx}
+
+// 9/4/2002 Changed last parameter from const to pointer - reported by James Ots.
+
+function SetServiceObjectSecurity(hService: SC_HANDLE;
+ dwSecurityInformation: SECURITY_INFORMATION;
+ lpSecurityDescriptor: PSECURITY_DESCRIPTOR): BOOL; stdcall;
+{$EXTERNALSYM SetServiceObjectSecurity}
+
+function SetServiceStatus(hServiceStatus: SERVICE_STATUS_HANDLE;
+ const lpServiceStatus: SERVICE_STATUS): BOOL; stdcall;
+{$EXTERNALSYM SetServiceStatus}
+
+function StartServiceCtrlDispatcherA(lpServiceStartTable: LPSERVICE_TABLE_ENTRYA): BOOL; stdcall;
+{$EXTERNALSYM StartServiceCtrlDispatcherA}
+function StartServiceCtrlDispatcherW(lpServiceStartTable: LPSERVICE_TABLE_ENTRYW): BOOL; stdcall;
+{$EXTERNALSYM StartServiceCtrlDispatcherW}
+function StartServiceCtrlDispatcher(lpServiceStartTable: LPSERVICE_TABLE_ENTRY): BOOL; stdcall;
+{$EXTERNALSYM StartServiceCtrlDispatcher}
+
+function StartServiceA(hService: SC_HANDLE; dwNumServiceArgs: DWORD;
+ lpServiceArgVectors: LPCSTR): BOOL; stdcall;
+{$EXTERNALSYM StartServiceA}
+function StartServiceW(hService: SC_HANDLE; dwNumServiceArgs: DWORD;
+ lpServiceArgVectors: LPCWSTR): BOOL; stdcall;
+{$EXTERNALSYM StartServiceW}
+function StartService(hService: SC_HANDLE; dwNumServiceArgs: DWORD;
+ lpServiceArgVectors: LPCTSTR): BOOL; stdcall;
+{$EXTERNALSYM StartService}
+
+function UnlockServiceDatabase(ScLock: SC_LOCK): BOOL; stdcall;
+{$EXTERNALSYM UnlockServiceDatabase}
+
+implementation
+
+const
+ advapi32 = 'advapi32.dll';
+ {$IFDEF UNICODE}
+ AWSuffix = 'W';
+ {$ELSE}
+ AWSuffix = 'A';
+ {$ENDIF UNICODE}
+
+{$IFDEF DYNAMIC_LINK}
+
+var
+ _ChangeServiceConfigA: Pointer;
+
+function ChangeServiceConfigA;
+begin
+ GetProcedureAddress(_ChangeServiceConfigA, advapi32, 'ChangeServiceConfigA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ChangeServiceConfigA]
+ end;
+end;
+
+var
+ _ChangeServiceConfigW: Pointer;
+
+function ChangeServiceConfigW;
+begin
+ GetProcedureAddress(_ChangeServiceConfigW, advapi32, 'ChangeServiceConfigW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ChangeServiceConfigW]
+ end;
+end;
+
+var
+ _ChangeServiceConfig: Pointer;
+
+function ChangeServiceConfig;
+begin
+ GetProcedureAddress(_ChangeServiceConfig, advapi32, 'ChangeServiceConfig' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ChangeServiceConfig]
+ end;
+end;
+
+var
+ _ChangeServiceConfig2A: Pointer;
+
+function ChangeServiceConfig2A;
+begin
+ GetProcedureAddress(_ChangeServiceConfig2A, advapi32, 'ChangeServiceConfig2A');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ChangeServiceConfig2A]
+ end;
+end;
+
+var
+ _ChangeServiceConfig2W: Pointer;
+
+function ChangeServiceConfig2W;
+begin
+ GetProcedureAddress(_ChangeServiceConfig2W, advapi32, 'ChangeServiceConfig2W');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ChangeServiceConfig2W]
+ end;
+end;
+
+var
+ _ChangeServiceConfig2: Pointer;
+
+function ChangeServiceConfig2;
+begin
+ GetProcedureAddress(_ChangeServiceConfig2, advapi32, 'ChangeServiceConfig2' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ChangeServiceConfig2]
+ end;
+end;
+
+var
+ _CloseServiceHandle: Pointer;
+
+function CloseServiceHandle;
+begin
+ GetProcedureAddress(_CloseServiceHandle, advapi32, 'CloseServiceHandle');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CloseServiceHandle]
+ end;
+end;
+
+var
+ _ControlService: Pointer;
+
+function ControlService;
+begin
+ GetProcedureAddress(_ControlService, advapi32, 'ControlService');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ControlService]
+ end;
+end;
+
+var
+ _CreateServiceA: Pointer;
+
+function CreateServiceA;
+begin
+ GetProcedureAddress(_CreateServiceA, advapi32, 'CreateServiceA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreateServiceA]
+ end;
+end;
+
+var
+ _CreateServiceW: Pointer;
+
+function CreateServiceW;
+begin
+ GetProcedureAddress(_CreateServiceW, advapi32, 'CreateServiceW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreateServiceW]
+ end;
+end;
+
+var
+ _CreateService: Pointer;
+
+function CreateService;
+begin
+ GetProcedureAddress(_CreateService, advapi32, 'CreateService' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreateService]
+ end;
+end;
+
+var
+ _DeleteService: Pointer;
+
+function DeleteService;
+begin
+ GetProcedureAddress(_DeleteService, advapi32, 'DeleteService');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DeleteService]
+ end;
+end;
+
+var
+ _EnumDependentServicesA: Pointer;
+
+function EnumDependentServicesA;
+begin
+ GetProcedureAddress(_EnumDependentServicesA, advapi32, 'EnumDependentServicesA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_EnumDependentServicesA]
+ end;
+end;
+
+var
+ _EnumDependentServicesW: Pointer;
+
+function EnumDependentServicesW;
+begin
+ GetProcedureAddress(_EnumDependentServicesW, advapi32, 'EnumDependentServicesW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_EnumDependentServicesW]
+ end;
+end;
+
+var
+ _EnumDependentServices: Pointer;
+
+function EnumDependentServices;
+begin
+ GetProcedureAddress(_EnumDependentServices, advapi32, 'EnumDependentServices' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_EnumDependentServices]
+ end;
+end;
+
+var
+ _EnumServicesStatusA: Pointer;
+
+function EnumServicesStatusA;
+begin
+ GetProcedureAddress(_EnumServicesStatusA, advapi32, 'EnumServicesStatusA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_EnumServicesStatusA]
+ end;
+end;
+
+var
+ _EnumServicesStatusW: Pointer;
+
+function EnumServicesStatusW;
+begin
+ GetProcedureAddress(_EnumServicesStatusW, advapi32, 'EnumServicesStatusW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_EnumServicesStatusW]
+ end;
+end;
+
+var
+ _EnumServicesStatus: Pointer;
+
+function EnumServicesStatus;
+begin
+ GetProcedureAddress(_EnumServicesStatus, advapi32, 'EnumServicesStatus' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_EnumServicesStatus]
+ end;
+end;
+
+var
+ _EnumServicesStatusExA: Pointer;
+
+function EnumServicesStatusExA;
+begin
+ GetProcedureAddress(_EnumServicesStatusExA, advapi32, 'EnumServicesStatusExA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_EnumServicesStatusExA]
+ end;
+end;
+
+var
+ _EnumServicesStatusExW: Pointer;
+
+function EnumServicesStatusExW;
+begin
+ GetProcedureAddress(_EnumServicesStatusExW, advapi32, 'EnumServicesStatusExW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_EnumServicesStatusExW]
+ end;
+end;
+
+var
+ _EnumServicesStatusEx: Pointer;
+
+function EnumServicesStatusEx;
+begin
+ GetProcedureAddress(_EnumServicesStatusEx, advapi32, 'EnumServicesStatusEx' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_EnumServicesStatusEx]
+ end;
+end;
+
+var
+ _GetServiceKeyNameA: Pointer;
+
+function GetServiceKeyNameA;
+begin
+ GetProcedureAddress(_GetServiceKeyNameA, advapi32, 'GetServiceKeyNameA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetServiceKeyNameA]
+ end;
+end;
+
+var
+ _GetServiceKeyNameW: Pointer;
+
+function GetServiceKeyNameW;
+begin
+ GetProcedureAddress(_GetServiceKeyNameW, advapi32, 'GetServiceKeyNameW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetServiceKeyNameW]
+ end;
+end;
+
+var
+ _GetServiceKeyName: Pointer;
+
+function GetServiceKeyName;
+begin
+ GetProcedureAddress(_GetServiceKeyName, advapi32, 'GetServiceKeyName' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetServiceKeyName]
+ end;
+end;
+
+var
+ _GetServiceDisplayNameA: Pointer;
+
+function GetServiceDisplayNameA;
+begin
+ GetProcedureAddress(_GetServiceDisplayNameA, advapi32, 'GetServiceDisplayNameA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetServiceDisplayNameA]
+ end;
+end;
+
+var
+ _GetServiceDisplayNameW: Pointer;
+
+function GetServiceDisplayNameW;
+begin
+ GetProcedureAddress(_GetServiceDisplayNameW, advapi32, 'GetServiceDisplayNameW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetServiceDisplayNameW]
+ end;
+end;
+
+var
+ _GetServiceDisplayName: Pointer;
+
+function GetServiceDisplayName;
+begin
+ GetProcedureAddress(_GetServiceDisplayName, advapi32, 'GetServiceDisplayName' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetServiceDisplayName]
+ end;
+end;
+
+var
+ _LockServiceDatabase: Pointer;
+
+function LockServiceDatabase;
+begin
+ GetProcedureAddress(_LockServiceDatabase, advapi32, 'LockServiceDatabase');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_LockServiceDatabase]
+ end;
+end;
+
+var
+ _NotifyBootConfigStatus: Pointer;
+
+function NotifyBootConfigStatus;
+begin
+ GetProcedureAddress(_NotifyBootConfigStatus, advapi32, 'NotifyBootConfigStatus');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NotifyBootConfigStatus]
+ end;
+end;
+
+var
+ _OpenSCManagerA: Pointer;
+
+function OpenSCManagerA;
+begin
+ GetProcedureAddress(_OpenSCManagerA, advapi32, 'OpenSCManagerA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_OpenSCManagerA]
+ end;
+end;
+
+var
+ _OpenSCManagerW: Pointer;
+
+function OpenSCManagerW;
+begin
+ GetProcedureAddress(_OpenSCManagerW, advapi32, 'OpenSCManagerW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_OpenSCManagerW]
+ end;
+end;
+
+var
+ _OpenSCManager: Pointer;
+
+function OpenSCManager;
+begin
+ GetProcedureAddress(_OpenSCManager, advapi32, 'OpenSCManager' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_OpenSCManager]
+ end;
+end;
+
+var
+ _OpenServiceA: Pointer;
+
+function OpenServiceA;
+begin
+ GetProcedureAddress(_OpenServiceA, advapi32, 'OpenServiceA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_OpenServiceA]
+ end;
+end;
+
+var
+ _OpenServiceW: Pointer;
+
+function OpenServiceW;
+begin
+ GetProcedureAddress(_OpenServiceW, advapi32, 'OpenServiceW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_OpenServiceW]
+ end;
+end;
+
+var
+ _OpenService: Pointer;
+
+function OpenService;
+begin
+ GetProcedureAddress(_OpenService, advapi32, 'OpenService' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_OpenService]
+ end;
+end;
+
+var
+ _QueryServiceConfigA: Pointer;
+
+function QueryServiceConfigA;
+begin
+ GetProcedureAddress(_QueryServiceConfigA, advapi32, 'QueryServiceConfigA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_QueryServiceConfigA]
+ end;
+end;
+
+var
+ _QueryServiceConfigW: Pointer;
+
+function QueryServiceConfigW;
+begin
+ GetProcedureAddress(_QueryServiceConfigW, advapi32, 'QueryServiceConfigW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_QueryServiceConfigW]
+ end;
+end;
+
+var
+ _QueryServiceConfig: Pointer;
+
+function QueryServiceConfig;
+begin
+ GetProcedureAddress(_QueryServiceConfig, advapi32, 'QueryServiceConfig' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_QueryServiceConfig]
+ end;
+end;
+
+var
+ _QueryServiceConfig2A: Pointer;
+
+function QueryServiceConfig2A;
+begin
+ GetProcedureAddress(_QueryServiceConfig2A, advapi32, 'QueryServiceConfig2A');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_QueryServiceConfig2A]
+ end;
+end;
+
+var
+ _QueryServiceConfig2W: Pointer;
+
+function QueryServiceConfig2W;
+begin
+ GetProcedureAddress(_QueryServiceConfig2W, advapi32, 'QueryServiceConfig2W');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_QueryServiceConfig2W]
+ end;
+end;
+
+var
+ _QueryServiceConfig2: Pointer;
+
+function QueryServiceConfig2;
+begin
+ GetProcedureAddress(_QueryServiceConfig2, advapi32, 'QueryServiceConfig2' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_QueryServiceConfig2]
+ end;
+end;
+
+var
+ _QueryServiceLockStatusA: Pointer;
+
+function QueryServiceLockStatusA;
+begin
+ GetProcedureAddress(_QueryServiceLockStatusA, advapi32, 'QueryServiceLockStatusA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_QueryServiceLockStatusA]
+ end;
+end;
+
+var
+ _QueryServiceLockStatusW: Pointer;
+
+function QueryServiceLockStatusW;
+begin
+ GetProcedureAddress(_QueryServiceLockStatusW, advapi32, 'QueryServiceLockStatusW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_QueryServiceLockStatusW]
+ end;
+end;
+
+var
+ _QueryServiceLockStatus: Pointer;
+
+function QueryServiceLockStatus;
+begin
+ GetProcedureAddress(_QueryServiceLockStatus, advapi32, 'QueryServiceLockStatus' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_QueryServiceLockStatus]
+ end;
+end;
+
+var
+ _QueryServiceObjectSecurity: Pointer;
+
+function QueryServiceObjectSecurity;
+begin
+ GetProcedureAddress(_QueryServiceObjectSecurity, advapi32, 'QueryServiceObjectSecurity');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_QueryServiceObjectSecurity]
+ end;
+end;
+
+var
+ _QueryServiceStatus: Pointer;
+
+function QueryServiceStatus;
+begin
+ GetProcedureAddress(_QueryServiceStatus, advapi32, 'QueryServiceStatus');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_QueryServiceStatus]
+ end;
+end;
+
+var
+ _QueryServiceStatusEx: Pointer;
+
+function QueryServiceStatusEx;
+begin
+ GetProcedureAddress(_QueryServiceStatusEx, advapi32, 'QueryServiceStatusEx');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_QueryServiceStatusEx]
+ end;
+end;
+
+var
+ _RegisterServiceCtrlHandlerA: Pointer;
+
+function RegisterServiceCtrlHandlerA;
+begin
+ GetProcedureAddress(_RegisterServiceCtrlHandlerA, advapi32, 'RegisterServiceCtrlHandlerA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RegisterServiceCtrlHandlerA]
+ end;
+end;
+
+var
+ _RegisterServiceCtrlHandlerW: Pointer;
+
+function RegisterServiceCtrlHandlerW;
+begin
+ GetProcedureAddress(_RegisterServiceCtrlHandlerW, advapi32, 'RegisterServiceCtrlHandlerW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RegisterServiceCtrlHandlerW]
+ end;
+end;
+
+var
+ _RegisterServiceCtrlHandler: Pointer;
+
+function RegisterServiceCtrlHandler;
+begin
+ GetProcedureAddress(_RegisterServiceCtrlHandler, advapi32, 'RegisterServiceCtrlHandler' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RegisterServiceCtrlHandler]
+ end;
+end;
+
+var
+ _RegisterServiceCtrlHandlerExA: Pointer;
+
+function RegisterServiceCtrlHandlerExA;
+begin
+ GetProcedureAddress(_RegisterServiceCtrlHandlerExA, advapi32, 'RegisterServiceCtrlHandlerExA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RegisterServiceCtrlHandlerExA]
+ end;
+end;
+
+var
+ _RegisterServiceCtrlHandlerExW: Pointer;
+
+function RegisterServiceCtrlHandlerExW;
+begin
+ GetProcedureAddress(_RegisterServiceCtrlHandlerExW, advapi32, 'RegisterServiceCtrlHandlerExW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RegisterServiceCtrlHandlerExW]
+ end;
+end;
+
+var
+ _RegisterServiceCtrlHandlerEx: Pointer;
+
+function RegisterServiceCtrlHandlerEx;
+begin
+ GetProcedureAddress(_RegisterServiceCtrlHandlerEx, advapi32, 'RegisterServiceCtrlHandlerEx' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RegisterServiceCtrlHandlerEx]
+ end;
+end;
+
+var
+ _SetServiceObjectSecurity: Pointer;
+
+function SetServiceObjectSecurity;
+begin
+ GetProcedureAddress(_SetServiceObjectSecurity, advapi32, 'SetServiceObjectSecurity');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetServiceObjectSecurity]
+ end;
+end;
+
+var
+ _SetServiceStatus: Pointer;
+
+function SetServiceStatus;
+begin
+ GetProcedureAddress(_SetServiceStatus, advapi32, 'SetServiceStatus');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetServiceStatus]
+ end;
+end;
+
+var
+ _StartServiceCtrlDispatcherA: Pointer;
+
+function StartServiceCtrlDispatcherA;
+begin
+ GetProcedureAddress(_StartServiceCtrlDispatcherA, advapi32, 'StartServiceCtrlDispatcherA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_StartServiceCtrlDispatcherA]
+ end;
+end;
+
+var
+ _StartServiceCtrlDispatcherW: Pointer;
+
+function StartServiceCtrlDispatcherW;
+begin
+ GetProcedureAddress(_StartServiceCtrlDispatcherW, advapi32, 'StartServiceCtrlDispatcherW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_StartServiceCtrlDispatcherW]
+ end;
+end;
+
+var
+ _StartServiceCtrlDispatcher: Pointer;
+
+function StartServiceCtrlDispatcher;
+begin
+ GetProcedureAddress(_StartServiceCtrlDispatcher, advapi32, 'StartServiceCtrlDispatcher' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_StartServiceCtrlDispatcher]
+ end;
+end;
+
+var
+ _StartServiceA: Pointer;
+
+function StartServiceA;
+begin
+ GetProcedureAddress(_StartServiceA, advapi32, 'StartServiceA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_StartServiceA]
+ end;
+end;
+
+var
+ _StartServiceW: Pointer;
+
+function StartServiceW;
+begin
+ GetProcedureAddress(_StartServiceW, advapi32, 'StartServiceW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_StartServiceW]
+ end;
+end;
+
+var
+ _StartService: Pointer;
+
+function StartService;
+begin
+ GetProcedureAddress(_StartService, advapi32, 'StartService' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_StartService]
+ end;
+end;
+
+var
+ _UnlockServiceDatabase: Pointer;
+
+function UnlockServiceDatabase;
+begin
+ GetProcedureAddress(_UnlockServiceDatabase, advapi32, 'UnlockServiceDatabase');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_UnlockServiceDatabase]
+ end;
+end;
+
+{$ELSE}
+
+function ChangeServiceConfigA; external advapi32 name 'ChangeServiceConfigA';
+function ChangeServiceConfigW; external advapi32 name 'ChangeServiceConfigW';
+function ChangeServiceConfig; external advapi32 name 'ChangeServiceConfig' + AWSuffix;
+function ChangeServiceConfig2A; external advapi32 name 'ChangeServiceConfig2A';
+function ChangeServiceConfig2W; external advapi32 name 'ChangeServiceConfig2W';
+function ChangeServiceConfig2; external advapi32 name 'ChangeServiceConfig2' + AWSuffix;
+function CloseServiceHandle; external advapi32 name 'CloseServiceHandle';
+function ControlService; external advapi32 name 'ControlService';
+function CreateServiceA; external advapi32 name 'CreateServiceA';
+function CreateServiceW; external advapi32 name 'CreateServiceW';
+function CreateService; external advapi32 name 'CreateService' + AWSuffix;
+function DeleteService; external advapi32 name 'DeleteService';
+function EnumDependentServicesA; external advapi32 name 'EnumDependentServicesA';
+function EnumDependentServicesW; external advapi32 name 'EnumDependentServicesW';
+function EnumDependentServices; external advapi32 name 'EnumDependentServices' + AWSuffix;
+function EnumServicesStatusA; external advapi32 name 'EnumServicesStatusA';
+function EnumServicesStatusW; external advapi32 name 'EnumServicesStatusW';
+function EnumServicesStatus; external advapi32 name 'EnumServicesStatus' + AWSuffix;
+function EnumServicesStatusExA; external advapi32 name 'EnumServicesStatusExA';
+function EnumServicesStatusExW; external advapi32 name 'EnumServicesStatusExW';
+function EnumServicesStatusEx; external advapi32 name 'EnumServicesStatusEx' + AWSuffix;
+function GetServiceKeyNameA; external advapi32 name 'GetServiceKeyNameA';
+function GetServiceKeyNameW; external advapi32 name 'GetServiceKeyNameW';
+function GetServiceKeyName; external advapi32 name 'GetServiceKeyName' + AWSuffix;
+function GetServiceDisplayNameA; external advapi32 name 'GetServiceDisplayNameA';
+function GetServiceDisplayNameW; external advapi32 name 'GetServiceDisplayNameW';
+function GetServiceDisplayName; external advapi32 name 'GetServiceDisplayName' + AWSuffix;
+function LockServiceDatabase; external advapi32 name 'LockServiceDatabase';
+function NotifyBootConfigStatus; external advapi32 name 'NotifyBootConfigStatus';
+function OpenSCManagerA; external advapi32 name 'OpenSCManagerA';
+function OpenSCManagerW; external advapi32 name 'OpenSCManagerW';
+function OpenSCManager; external advapi32 name 'OpenSCManager' + AWSuffix;
+function OpenServiceA; external advapi32 name 'OpenServiceA';
+function OpenServiceW; external advapi32 name 'OpenServiceW';
+function OpenService; external advapi32 name 'OpenService' + AWSuffix;
+function QueryServiceConfigA; external advapi32 name 'QueryServiceConfigA';
+function QueryServiceConfigW; external advapi32 name 'QueryServiceConfigW';
+function QueryServiceConfig; external advapi32 name 'QueryServiceConfig' + AWSuffix;
+function QueryServiceConfig2A; external advapi32 name 'QueryServiceConfig2A';
+function QueryServiceConfig2W; external advapi32 name 'QueryServiceConfig2W';
+function QueryServiceConfig2; external advapi32 name 'QueryServiceConfig2' + AWSuffix;
+function QueryServiceLockStatusA; external advapi32 name 'QueryServiceLockStatusA';
+function QueryServiceLockStatusW; external advapi32 name 'QueryServiceLockStatusW';
+function QueryServiceLockStatus; external advapi32 name 'QueryServiceLockStatus' + AWSuffix;
+function QueryServiceObjectSecurity; external advapi32 name 'QueryServiceObjectSecurity';
+function QueryServiceStatus; external advapi32 name 'QueryServiceStatus';
+function QueryServiceStatusEx; external advapi32 name 'QueryServiceStatusEx';
+function RegisterServiceCtrlHandlerA; external advapi32 name 'RegisterServiceCtrlHandlerA';
+function RegisterServiceCtrlHandlerW; external advapi32 name 'RegisterServiceCtrlHandlerW';
+function RegisterServiceCtrlHandler; external advapi32 name 'RegisterServiceCtrlHandler' + AWSuffix;
+function RegisterServiceCtrlHandlerExA; external advapi32 name 'RegisterServiceCtrlHandlerExA';
+function RegisterServiceCtrlHandlerExW; external advapi32 name 'RegisterServiceCtrlHandlerExW';
+function RegisterServiceCtrlHandlerEx; external advapi32 name 'RegisterServiceCtrlHandlerEx' + AWSuffix;
+function SetServiceObjectSecurity; external advapi32 name 'SetServiceObjectSecurity';
+function SetServiceStatus; external advapi32 name 'SetServiceStatus';
+function StartServiceCtrlDispatcherA; external advapi32 name 'StartServiceCtrlDispatcherA';
+function StartServiceCtrlDispatcherW; external advapi32 name 'StartServiceCtrlDispatcherW';
+function StartServiceCtrlDispatcher; external advapi32 name 'StartServiceCtrlDispatcher' + AWSuffix;
+function StartServiceA; external advapi32 name 'StartServiceA';
+function StartServiceW; external advapi32 name 'StartServiceW';
+function StartService; external advapi32 name 'StartService' + AWSuffix;
+function UnlockServiceDatabase; external advapi32 name 'UnlockServiceDatabase';
+
+{$ENDIF DYNAMIC_LINK}
+
+end.
diff --git a/packages/extra/winunits/jwawintype.pas b/packages/extra/winunits/jwawintype.pas
index 0adf595dc6..36ba5775c3 100644
--- a/packages/extra/winunits/jwawintype.pas
+++ b/packages/extra/winunits/jwawintype.pas
@@ -1,1814 +1,1814 @@
-{******************************************************************************}
-{ }
-{ Windows Base Types API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: basetsd.h, released August 2001. The original Pascal }
-{ code is: WinType.pas, released December 2000. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwawintype.pas,v 1.1 2005/04/04 07:56:11 marco Exp $
-
-unit JwaWinType;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "BaseTsd.h"'}
-{$HPPEMIT '#include "BaseTyps.h"'}
-{$HPPEMIT '#include "NtDef.h"'}
-{$HPPEMIT '#include "WinDef.h"'}
-{$HPPEMIT ''}
-{$HPPEMIT 'typedef LPVOID *LPLPVOID'}
-{$HPPEMIT 'typedef GUID TGUID'}
-{$HPPEMIT 'typedef GUID *LPGUID'}
-{$HPPEMIT 'typedef GUID CLSID'}
-{$HPPEMIT 'typedef HMODULE *PHMODULE'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- {$IFDEF USE_DELPHI_TYPES}
- Windows,
- {$ENDIF USE_DELPHI_TYPES}
- SysUtils; // TODO
-
-type
- EJwaError = class(Exception);
- EJwaLoadLibraryError = class(EJwaError);
- EJwaGetProcAddressError = class(EJwaError);
-
-procedure GetProcedureAddress(var P: Pointer; const ModuleName, ProcName: string);
-
-// ntdef.h
-
-type
-//typedef double DOUBLE;
-
- PQuad = ^TQuad;
- _QUAD = record // QUAD is for those times we want
- DoNotUseThisField: Double; // an 8 byte aligned 8 byte long structure
- end; // which is NOT really a floating point
- {$EXTERNALSYM _QUAD} // number. Use DOUBLE if you want an FP number.
- QUAD = _QUAD;
- {$EXTERNALSYM QUAD}
- TQuad = _QUAD;
-
-//
-// Unsigned Basics
-//
-
- UCHAR = {$IFDEF USE_DELPHI_TYPES} Windows.UCHAR {$ELSE} Byte {$ENDIF};
- {$EXTERNALSYM UCHAR}
- USHORT = Word;
- {$EXTERNALSYM USHORT}
- ULONG = {$IFDEF USE_DELPHI_TYPES} Windows.ULONG {$ELSE} Cardinal {$ENDIF};
- {$EXTERNALSYM ULONG}
- UQUAD = QUAD;
- {$EXTERNALSYM UQUAD}
-
-//
-// __int64 is only supported by 2.0 and later midl.
-// __midl is set by the 2.0 midl and not by 1.0 midl.
-//
-
-type
- LONGLONG = {$IFDEF USE_DELPHI_TYPES} Windows.LONGLONG {$ELSE} Int64 {$ENDIF};
- {$EXTERNALSYM LONGLONG}
- ULONGLONG = Int64;
- {$EXTERNALSYM ULONGLONG}
-
-const
- MAXLONGLONG = $7fffffffffffffff;
- {$EXTERNALSYM MAXLONGLONG}
-
-type
- PLONGLONG = ^LONGLONG;
- {$EXTERNALSYM PLONGLONG}
- PULONGLONG = ^ULONGLONG;
- {$EXTERNALSYM PULONGLONG}
-
- BOOL = {$IFDEF USE_DELPHI_TYPES} Windows.BOOL {$ELSE} LongBool {$ENDIF};
- {$EXTERNALSYM BOOL}
-
- DWORD = {$IFDEF USE_DELPHI_TYPES} Windows.DWORD {$ELSE} Longword {$ENDIF};
- {$EXTERNALSYM DWORD}
-
-const
- ANYSIZE_ARRAY = 1;
- {$EXTERNALSYM ANYSIZE_ARRAY}
-
- MAX_NATURAL_ALIGNMENT = SizeOf(ULONG);
- {$EXTERNALSYM MAX_NATURAL_ALIGNMENT}
-
-//
-// Void
-//
-
-type
- PVOID = Pointer;
- {$EXTERNALSYM PVOID}
- PPVOID = ^PVOID;
- {$EXTERNALSYM PPVOID}
- PVOID64 = Pointer;
- {$EXTERNALSYM PVOID64}
-
-//
-// Basics
-//
-
- SHORT = {$IFDEF USE_DELPHI_TYPES} Windows.SHORT {$ELSE} Smallint {$ENDIF};
- {$EXTERNALSYM SHORT}
- LONG = Longint;
- {$EXTERNALSYM LONG}
-
-//
-// UNICODE (Wide Character) types
-//
-
- WCHAR = {$IFDEF USE_DELPHI_TYPES} Windows.WCHAR {$ELSE} WideChar {$ENDIF};
- {$EXTERNALSYM WCHAR}
-
- PWCHAR = {$IFDEF USE_DELPHI_TYPES} Windows.PWChar {$ELSE} PWideChar {$ENDIF};
- {$EXTERNALSYM PWCHAR}
- LPWCH = ^WCHAR;
- {$EXTERNALSYM LPWCH}
- PWCH = ^WCHAR;
- {$EXTERNALSYM PWCH}
- LPCWCH = ^WCHAR;
- {$EXTERNALSYM LPCWCH}
- PCWCH = ^WCHAR;
- {$EXTERNALSYM PCWCH}
- NWPSTR = ^WCHAR;
- {$EXTERNALSYM NWPSTR}
- LPWSTR = {$IFDEF USE_DELPHI_TYPES} Windows.LPWSTR {$ELSE} PWideChar {$ENDIF};
- {$EXTERNALSYM LPWSTR}
- LPCWSTR = {$IFDEF USE_DELPHI_TYPES} Windows.LPCWSTR {$ELSE} PWideChar {$ENDIF};
- {$EXTERNALSYM LPCWSTR}
- PWSTR = {$IFDEF USE_DELPHI_TYPES} Windows.LPWSTR {$ELSE} PWideChar {$ENDIF};
- {$EXTERNALSYM PWSTR}
- LPUWSTR = {$IFDEF USE_DELPHI_TYPES} Windows.LPWSTR {$ELSE} PWideChar {$ENDIF};
- {$EXTERNALSYM LPUWSTR}
- PUWSTR = {$IFDEF USE_DELPHI_TYPES} Windows.LPWSTR {$ELSE} PWideChar {$ENDIF};
- {$EXTERNALSYM PUWSTR}
- LCPUWSTR = {$IFDEF USE_DELPHI_TYPES} Windows.LPWSTR {$ELSE} PWideChar {$ENDIF};
- {$EXTERNALSYM LCPUWSTR}
- PCUWSTR = {$IFDEF USE_DELPHI_TYPES} Windows.LPWSTR {$ELSE} PWideChar {$ENDIF};
- {$EXTERNALSYM PCUWSTR}
-
-//
-// ANSI (Multi-byte Character) types
-//
-
- LPCH = ^Char;
- {$EXTERNALSYM LPCH}
- PCH = ^Char;
- {$EXTERNALSYM PCH}
-
- LPCCH = ^Char;
- {$EXTERNALSYM LPCCH}
- PCCH = ^Char;
- {$EXTERNALSYM PCCH}
- NPSTR = ^Char;
- {$EXTERNALSYM NPSTR}
- LPSTR = {$IFDEF USE_DELPHI_TYPES} Windows.LPSTR {$ELSE} PAnsiChar {$ENDIF};
- {$EXTERNALSYM LPSTR}
- PSTR = PChar;
- {$EXTERNALSYM PSTR}
- LPCSTR = {$IFDEF USE_DELPHI_TYPES} Windows.LPCSTR {$ELSE} PAnsiChar {$ENDIF};
- {$EXTERNALSYM LPCSTR}
- PCSTR = PChar;
- {$EXTERNALSYM PCSTR}
-
-// (rom) moved down to have LPSTR etc always declared
-type
- LPLPSTR = ^LPSTR;
- {$NODEFINE LPLPSTR}
- LPLPCSTR = ^LPCSTR;
- {$NODEFINE LPLPCSTR}
- LPLPCWSTR = ^LPCWSTR;
- {$NODEFINE LPLPCWSTR}
- LPLPWSTR = ^LPWSTR;
- {$NODEFINE LPLPWSTR}
-
- PPTSTR = ^PTSTR;
- PPChar = ^PChar;
- PPWideChar = ^PWideChar;
- PPointer = ^Pointer;
-
- GUID = TGUID;
- {$NODEFINE GUID}
- LPGUID = ^GUID;
- {$NODEFINE LPGUID}
- CLSID = TGUID;
- {$NODEFINE CLSID}
-
-//
-// Neutral ANSI/UNICODE types and macros
-//
-
-{$IFDEF UNICODE}
-
- TCHAR = WCHAR;
- {$EXTERNALSYM TCHAR}
- PTCHAR = PWideChar;
- {$EXTERNALSYM PTCHAR}
- TUCHAR = WCHAR;
- {$EXTERNALSYM TUCHAR}
- PTUCHAR = ^TUCHAR;
- {$EXTERNALSYM PTUCHAR}
-
- LPCTCH = LPWSTR;
- LPTCH = LPWSTR;
- {$EXTERNALSYM LPTCH}
- PTCH = LPWSTR;
- {$EXTERNALSYM PTCH}
- PTSTR = LPWSTR;
- {$EXTERNALSYM PTSTR}
- LPTSTR = {$IFDEF USE_DELPHI_TYPES} Windows.LPWSTR {$ELSE} LPWSTR {$ENDIF};
- {$EXTERNALSYM LPTSTR}
- PCTSTR = LPTSTR;
- {$EXTERNALSYM PCTSTR}
- LPCTSTR = LPTSTR;
- {$EXTERNALSYM LPCTSTR}
-
- PCUTSTR = PTUCHAR;
- {$EXTERNALSYM PCUTSTR}
- LPCUTSTR = PTUCHAR;
- {$EXTERNALSYM LPCUTSTR}
- PUTSTR = PTUCHAR;
- {$EXTERNALSYM PUTSTR}
- LPUTSTR = PTUCHAR;
- {$EXTERNALSYM LPUTSTR}
-
- __TEXT = WideString;
- {$EXTERNALSYM __TEXT}
-
- {$ELSE}
-
- TCHAR = Char;
- {$EXTERNALSYM TCHAR}
- PTCHAR = PChar;
- {$EXTERNALSYM PTCHAR}
- TUCHAR = Byte;
- {$EXTERNALSYM TUCHAR}
- PTUCHAR = ^TUCHAR;
- {$EXTERNALSYM PTUCHAR}
-
- LPCTCH = LPSTR;
- LPTCH = LPSTR;
- {$EXTERNALSYM LPTCH}
- PTCH = LPSTR;
- {$EXTERNALSYM PTCH}
- PTSTR = LPSTR;
- {$EXTERNALSYM PTSTR}
- LPTSTR = LPSTR;
- {$EXTERNALSYM LPTSTR}
- PCTSTR = LPCSTR;
- {$EXTERNALSYM PCTSTR}
- LPCTSTR = LPCSTR;
- {$EXTERNALSYM LPCTSTR}
-
- PCUTSTR = PTUCHAR;
- {$EXTERNALSYM PCUTSTR}
- LPCUTSTR = PTUCHAR;
- {$EXTERNALSYM LPCUTSTR}
- PUTSTR = PTUCHAR;
- {$EXTERNALSYM PUTSTR}
- LPUTSTR = PTUCHAR;
- {$EXTERNALSYM LPUTSTR}
-
- __TEXT = AnsiString;
- {$EXTERNALSYM __TEXT}
-
-{$ENDIF UNICODE}
-
- TEXT = __TEXT;
- {$EXTERNALSYM TEXT}
-
-//
-// Pointer to Basics
-//
-
- PSHORT = ^SHORT;
- {$EXTERNALSYM PSHORT}
- PLONG = ^LONG;
- {$EXTERNALSYM PLONG}
-
-//
-// Pointer to Unsigned Basics
-//
-
- PUCHAR = {$IFDEF USE_DELPHI_TYPES} Windows.PUCHAR {$ELSE} ^Byte {$ENDIF};
- {$EXTERNALSYM PUCHAR}
- PUSHORT = ^USHORT;
- {$EXTERNALSYM PUSHORT}
- PULONG = {$IFDEF USE_DELPHI_TYPES} Windows.PULONG {$ELSE} ^ULONG {$ENDIF};
- {$EXTERNALSYM PULONG}
- PUQUAD = ^UQUAD;
- {$EXTERNALSYM PUQUAD}
-
-//
-// Signed characters
-//
-
- SCHAR = Shortint;
- {$EXTERNALSYM SCHAR}
- PSCHAR = ^SCHAR;
- {$EXTERNALSYM PSCHAR}
-
-//
-// Handle to an Object
-//
-
- HANDLE = {$IFDEF USE_DELPHI_TYPES} Windows.THandle {$ELSE} Longword {$ENDIF};
- {$EXTERNALSYM HANDLE}
- PHANDLE = {$IFDEF USE_DELPHI_TYPES} Windows.PHandle {$ELSE} ^HANDLE {$ENDIF};
- {$EXTERNALSYM PHANDLE}
- THandle = {$IFDEF USE_DELPHI_TYPES} Windows.THandle {$ELSE} HANDLE {$ENDIF};
-
-//
-// Flag (bit) fields
-//
-
- FCHAR = UCHAR;
- {$EXTERNALSYM FCHAR}
- FSHORT = USHORT;
- {$EXTERNALSYM FSHORT}
- FLONG = ULONG;
- {$EXTERNALSYM FLONG}
-
-// Component Object Model defines, and macros
-
- HRESULT = System.HRESULT; // LONG;
- {$EXTERNALSYM HRESULT}
-
-//
-// Low order two bits of a handle are ignored by the system and available
-// for use by application code as tag bits. The remaining bits are opaque
-// and used to store a serial number and table index.
-//
-
-const
- OBJ_HANDLE_TAGBITS = $00000003;
- {$EXTERNALSYM OBJ_HANDLE_TAGBITS}
-
-//
-// Cardinal Data Types [0 - 2**N-2)
-//
-
-type
- CCHAR = Char;
- {$EXTERNALSYM CCHAR}
- CSHORT = Shortint;
- {$EXTERNALSYM CSHORT}
- CLONG = ULONG;
- {$EXTERNALSYM CLONG}
-
- PCCHAR = ^CCHAR;
- {$EXTERNALSYM PCCHAR}
- PCSHORT = ^CSHORT;
- {$EXTERNALSYM PCSHORT}
- PCLONG = ^CLONG;
- {$EXTERNALSYM PCLONG}
-
-//
-// NLS basics (Locale and Language Ids)
-//
-
- LCID = {$IFDEF USE_DELPHI_TYPES} Windows.LCID {$ELSE} DWORD {$ENDIF};
- {$EXTERNALSYM LCID}
- PLCID = ^LCID;
- {$EXTERNALSYM PLCID}
- LANGID = {$IFDEF USE_DELPHI_TYPES} Windows.LANGID {$ELSE} Word {$ENDIF};
- {$EXTERNALSYM LANGID}
- PLANGID = ^LANGID; // TODO Not in original header (used in MSI)
-
-//
-// Logical Data Type - These are 32-bit logical values.
-//
-
- LOGICAL = ULONG;
- {$EXTERNALSYM LOGICAL}
- PLOGICAL = ^ULONG;
- {$EXTERNALSYM PLOGICAL}
-
-//
-// NTSTATUS
-//
-
- NTSTATUS = LONG;
- {$EXTERNALSYM NTSTATUS}
- PNTSTATUS = ^NTSTATUS;
- {$EXTERNALSYM PNTSTATUS}
- TNTStatus = NTSTATUS;
-
-//
-// Status values are 32 bit values layed out as follows:
-//
-// 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1
-// 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
-// +---+-+-------------------------+-------------------------------+
-// |Sev|C| Facility | Code |
-// +---+-+-------------------------+-------------------------------+
-//
-// where
-//
-// Sev - is the severity code
-//
-// 00 - Success
-// 01 - Informational
-// 10 - Warning
-// 11 - Error
-//
-// C - is the Customer code flag
-//
-// Facility - is the facility code
-//
-// Code - is the facility's status code
-//
-
-//
-// Generic test for success on any status value (non-negative numbers
-// indicate success).
-//
-
-function NT_SUCCESS(Status: NTSTATUS): BOOL;
-{$EXTERNALSYM NT_SUCCESS}
-
-//
-// Generic test for information on any status value.
-//
-
-function NT_INFORMATION(Status: NTSTATUS): BOOL;
-{$EXTERNALSYM NT_INFORMATION}
-
-//
-// Generic test for warning on any status value.
-//
-
-function NT_WARNING(Status: NTSTATUS): BOOL;
-{$EXTERNALSYM NT_WARNING}
-
-//
-// Generic test for error on any status value.
-//
-
-function NT_ERROR(Status: NTSTATUS): BOOL;
-{$EXTERNALSYM NT_ERROR}
-
-const
- APPLICATION_ERROR_MASK = $20000000;
- {$EXTERNALSYM APPLICATION_ERROR_MASK}
- ERROR_SEVERITY_SUCCESS = $00000000;
- {$EXTERNALSYM ERROR_SEVERITY_SUCCESS}
- ERROR_SEVERITY_INFORMATIONAL = $40000000;
- {$EXTERNALSYM ERROR_SEVERITY_INFORMATIONAL}
- ERROR_SEVERITY_WARNING = DWORD($80000000);
- {$EXTERNALSYM ERROR_SEVERITY_WARNING}
- ERROR_SEVERITY_ERROR = DWORD($C0000000);
- {$EXTERNALSYM ERROR_SEVERITY_ERROR}
-
-//
-// Large (64-bit) integer types and operations
-//
-
-type
- LPLARGE_INTEGER = ^LARGE_INTEGER;
- {$EXTERNALSYM LPLARGE_INTEGER}
-
- {$IFDEF USE_DELPHI_TYPES}
- _LARGE_INTEGER = Windows._LARGE_INTEGER;
- LARGE_INTEGER = Windows.LARGE_INTEGER;
- TLargeInteger = Windows.TLargeInteger;
- {$ELSE}
- _LARGE_INTEGER = record
- case Integer of
- 0: (
- LowPart: DWORD;
- HighPart: LONG);
- 1: (
- QuadPart: LONGLONG);
- end;
- {$EXTERNALSYM _LARGE_INTEGER}
- LARGE_INTEGER = _LARGE_INTEGER;
- {$EXTERNALSYM LARGE_INTEGER}
- TLargeInteger = LARGE_INTEGER;
- {$ENDIF USE_DELPHI_TYPES}
-
- PLARGE_INTEGER = ^LARGE_INTEGER;
- {$EXTERNALSYM PLARGE_INTEGER}
- PLargeInteger = LPLARGE_INTEGER;
-
- LPULARGE_INTEGER = ^ULARGE_INTEGER;
- {$EXTERNALSYM LPULARGE_INTEGER}
-
- {$IFDEF USE_DELPHI_TYPES}
- ULARGE_INTEGER = Windows.ULARGE_INTEGER;
- TULargeInteger = Windows.TULargeInteger;
- PULargeInteger = Windows.PULargeInteger;
- {$ELSE}
- ULARGE_INTEGER = record
- case Integer of
- 0: (
- LowPart: DWORD;
- HighPart: DWORD);
- 1: (
- QuadPart: LONGLONG);
- end;
- {$EXTERNALSYM ULARGE_INTEGER}
- TULargeInteger = ULARGE_INTEGER;
- PULargeInteger = LPULARGE_INTEGER;
- {$ENDIF USE_DELPHI_TYPES}
-
- PULARGE_INTEGER = ^ULARGE_INTEGER;
- {$EXTERNALSYM PULARGE_INTEGER}
-
- TIME = LARGE_INTEGER;
- {$EXTERNALSYM TIME}
- _TIME = _LARGE_INTEGER;
- {$EXTERNALSYM _TIME}
- PTIME = PLARGE_INTEGER;
- {$EXTERNALSYM PTIME}
-
-//
-// _M_IX86 included so that EM CONTEXT structure compiles with
-// x86 programs. *** TBD should this be for all architectures?
-//
-
-//
-// 16 byte aligned type for 128 bit floats
-//
-
-//
-// For we define a 128 bit structure and use __declspec(align(16)) pragma to
-// align to 128 bits.
-//
-
-type
- PFloat128 = ^TFloat128;
- _FLOAT128 = record
- LowPart: Int64;
- HighPart: Int64;
- end;
- {$EXTERNALSYM _FLOAT128}
- FLOAT128 = _FLOAT128;
- {$EXTERNALSYM FLOAT128}
- TFloat128 = FLOAT128;
-
-// Update Sequence Number
-
- USN = LONGLONG;
- {$EXTERNALSYM USN}
-
-//
-// Locally Unique Identifier
-//
-
-type
- PLuid = ^LUID;
- _LUID = record
- LowPart: DWORD;
- HighPart: LONG;
- end;
- {$EXTERNALSYM _LUID}
- LUID = _LUID;
- {$EXTERNALSYM LUID}
- TLuid = LUID;
-
- DWORDLONG = ULONGLONG;
- {$EXTERNALSYM DWORDLONG}
- PDWORDLONG = ^DWORDLONG;
- {$EXTERNALSYM PDWORDLONG}
-
-//
-// Physical address.
-//
-
- PHYSICAL_ADDRESS = LARGE_INTEGER;
- {$EXTERNALSYM PHYSICAL_ADDRESS}
- PPHYSICAL_ADDRESS = ^LARGE_INTEGER;
- {$EXTERNALSYM PPHYSICAL_ADDRESS}
-
-//
-// Define operations to logically shift an int64 by 0..31 bits and to multiply
-// 32-bits by 32-bits to form a 64-bit product.
-//
-
-//
-// The x86 C compiler understands inline assembler. Therefore, inline functions
-// that employ inline assembler are used for shifts of 0..31. The multiplies
-// rely on the compiler recognizing the cast of the multiplicand to int64 to
-// generate the optimal code inline.
-//
-
-function Int32x32To64(a, b: LONG): LONGLONG;
-{$EXTERNALSYM Int32x32To64}
-function UInt32x32To64(a, b: DWORD): ULONGLONG;
-{$EXTERNALSYM UInt32x32To64}
-
-function Int64ShllMod32(Value: ULONGLONG; ShiftCount: DWORD): ULONGLONG;
-
-{$EXTERNALSYM Int64ShllMod32}
-function Int64ShraMod32(Value: LONGLONG; ShiftCount: DWORD): LONGLONG;
-{$EXTERNALSYM Int64ShraMod32}
-function Int64ShrlMod32(Value: ULONGLONG; ShiftCount: DWORD): ULONGLONG;
-{$EXTERNALSYM Int64ShrlMod32}
-
-//
-// Event type
-//
-
-type
- _EVENT_TYPE = (NotificationEvent, SynchronizationEvent);
- {$EXTERNALSYM _EVENT_TYPE}
- EVENT_TYPE = _EVENT_TYPE;
- {$EXTERNALSYM EVENT_TYPE}
- TEventType = _EVENT_TYPE;
-
-//
-// Timer type
-//
-
- _TIMER_TYPE = (NotificationTimer, SynchronizationTimer);
- {$EXTERNALSYM _TIMER_TYPE}
- TIMER_TYPE = _TIMER_TYPE;
- {$EXTERNALSYM TIMER_TYPE}
-
-//
-// Wait type
-//
-
- _WAIT_TYPE = (WaitAll, WaitAny);
- {$EXTERNALSYM _WAIT_TYPE}
- WAIT_TYPE = _WAIT_TYPE;
- {$EXTERNALSYM WAIT_TYPE}
-
-//
-// Pointer to an Asciiz string
-//
-
- PSZ = ^CHAR;
- {$EXTERNALSYM PSZ}
- PCSZ = ^CHAR;
- {$EXTERNALSYM PCSZ}
-
-//
-// Counted String
-//
-
- PString = ^TString;
- _STRING = record
- Length: USHORT;
- MaximumLength: USHORT;
- Buffer: PCHAR;
- end;
- {$EXTERNALSYM _STRING}
- TString = _STRING;
-
- ANSI_STRING = _STRING;
- {$EXTERNALSYM ANSI_STRING}
- PANSI_STRING = PSTRING;
- {$EXTERNALSYM PANSI_STRING}
-
- OEM_STRING = _STRING;
- {$EXTERNALSYM OEM_STRING}
- POEM_STRING = PSTRING;
- {$EXTERNALSYM POEM_STRING}
-
-//
-// CONSTCounted String
-//
-
- PCString = ^CSTRING;
- _CSTRING = record
- Length: USHORT;
- MaximumLength: USHORT;
- Buffer: PCHAR;
- end;
- {$EXTERNALSYM _CSTRING}
- CSTRING = _CSTRING;
- {$EXTERNALSYM CSTRING}
- TCString = CSTRING;
-
-const
- ANSI_NULL = CHAR(0);
- {$EXTERNALSYM ANSI_NULL}
- UNICODE_NULL = WCHAR(0);
- {$EXTERNALSYM UNICODE_NULL}
- UNICODE_STRING_MAX_BYTES = WORD(65534);
- {$EXTERNALSYM UNICODE_STRING_MAX_BYTES}
- UNICODE_STRING_MAX_CHARS = 32767;
- {$EXTERNALSYM UNICODE_STRING_MAX_CHARS}
-
-type
- CANSI_STRING = _STRING;
- {$EXTERNALSYM CANSI_STRING}
- PCANSI_STRING = PSTRING;
- {$EXTERNALSYM PCANSI_STRING}
-
-//
-// Unicode strings are counted 16-bit character strings. If they are
-// NULL terminated, Length does not include trailing NULL.
-//
-
-type
- PUNICODE_STRING = ^UNICODE_STRING;
- {$EXTERNALSYM PUNICODE_STRING}
- _UNICODE_STRING = record
- Length: USHORT;
- MaximumLength: USHORT;
- Buffer: PWSTR;
- end;
- {$EXTERNALSYM _UNICODE_STRING}
- UNICODE_STRING = _UNICODE_STRING;
- {$EXTERNALSYM UNICODE_STRING}
- PCUNICODE_STRING = ^UNICODE_STRING;
- {$EXTERNALSYM PCUNICODE_STRING}
- TUnicodeString = UNICODE_STRING;
- PUnicodeString = PUNICODE_STRING;
-
-//
-// Boolean
-//
-
-type
-//typedef UCHAR BOOLEAN;
- PBOOLEAN = ^ByteBool;
- {$EXTERNALSYM PBOOLEAN}
-
-//
-// Doubly linked list structure. Can be used as either a list head, or
-// as link words.
-//
-
-type
- PLIST_ENTRY = ^LIST_ENTRY;
- {$EXTERNALSYM PLIST_ENTRY}
-
- {$IFDEF USE_DELPHI_TYPES}
- _LIST_ENTRY = Windows._LIST_ENTRY;
- LIST_ENTRY = Windows.LIST_ENTRY;
- TListEntry = Windows.TListEntry;
- PListEntry = Windows.PListEntry;
- {$ELSE}
- _LIST_ENTRY = record
- Flink: PLIST_ENTRY;
- Blink: PLIST_ENTRY;
- end;
- {$EXTERNALSYM _LIST_ENTRY}
- LIST_ENTRY = _LIST_ENTRY;
- {$EXTERNALSYM LIST_ENTRY}
- TListEntry = LIST_ENTRY;
- PListEntry = PLIST_ENTRY;
- {$ENDIF USE_DELPHI_TYPES}
-
- PRLIST_ENTRY = ^LIST_ENTRY;
- {$EXTERNALSYM PLIST_ENTRY}
-
-//
-// Singly linked list structure. Can be used as either a list head, or
-// as link words.
-//
-
- PSINGLE_LIST_ENTRY = ^SINGLE_LIST_ENTRY;
- {$EXTERNALSYM PSINGLE_LIST_ENTRY}
- _SINGLE_LIST_ENTRY = record
- Next: PSINGLE_LIST_ENTRY;
- end;
- {$EXTERNALSYM _SINGLE_LIST_ENTRY}
- SINGLE_LIST_ENTRY = _SINGLE_LIST_ENTRY;
- {$EXTERNALSYM SINGLE_LIST_ENTRY}
- TSingleListEntry = SINGLE_LIST_ENTRY;
- PSingleListEntry = PSINGLE_LIST_ENTRY;
-
-//
-// These are needed for portable debugger support.
-//
-
- PLIST_ENTRY32 = ^LIST_ENTRY32;
- {$EXTERNALSYM PLIST_ENTRY32}
- {$EXTERNALSYM PLIST_ENTRY32}
- LIST_ENTRY32 = record
- Flink: DWORD;
- Blink: DWORD;
- end;
- {$EXTERNALSYM LIST_ENTRY32}
- TListEntry32 = LIST_ENTRY32;
- PListEntry32 = PLIST_ENTRY32;
-
- PLIST_ENTRY64 = ^LIST_ENTRY64;
- {$EXTERNALSYM PLIST_ENTRY64}
- LIST_ENTRY64 = record
- Flink: ULONGLONG;
- Blink: ULONGLONG;
- end;
- {$EXTERNALSYM LIST_ENTRY64}
- TListEntry64 = LIST_ENTRY64;
- PListEntry64 = PLIST_ENTRY64;
-
-procedure ListEntry32To64(l32: PLIST_ENTRY32; l64: PLIST_ENTRY64);
-{$EXTERNALSYM ListEntry32To64}
-
-procedure ListEntry64To32(l64: PLIST_ENTRY64; l32: PLIST_ENTRY32);
-{$EXTERNALSYM ListEntry64To32}
-
-//
-// These macros are used to walk lists on a target system
-//
-
-{
-#define CONTAINING_RECORD32(address, type, field) ( \
- (ULONG_PTR)(address) - \
- (ULONG_PTR)(&((type *)0)->field))
-
-#define CONTAINING_RECORD64(address, type, field) ( \
- (ULONGLONG)(address) - \
- (ULONGLONG)(&((type *)0)->field))
-}
-
-type
- PString32 = ^STRING32;
- _STRING32 = record
- Length: USHORT;
- MaximumLength: USHORT;
- Buffer: ULONG;
- end;
- {$EXTERNALSYM _STRING32}
- STRING32 = _STRING32;
- {$EXTERNALSYM STRING32}
- TString32 = STRING32;
-
- UNICODE_STRING32 = STRING32;
- {$EXTERNALSYM UNICODE_STRING32}
- PUNICODE_STRING32 = ^UNICODE_STRING32;
- {$EXTERNALSYM PUNICODE_STRING32}
-
- ANSI_STRING32 = STRING32;
- {$EXTERNALSYM ANSI_STRING32}
- PANSI_STRING32 = ^ANSI_STRING32;
- {$EXTERNALSYM PANSI_STRING32}
-
- PString64 = ^STRING64;
- _STRING64 = record
- Length: USHORT;
- MaximumLength: USHORT;
- Buffer: ULONGLONG;
- end;
- {$EXTERNALSYM _STRING64}
- STRING64 = _STRING64;
- {$EXTERNALSYM STRING64}
- TString64 = STRING64;
-
- UNICODE_STRING64 = STRING64;
- {$EXTERNALSYM UNICODE_STRING64}
- PUNICODE_STRING64 = ^UNICODE_STRING64;
- {$EXTERNALSYM PUNICODE_STRING64}
-
- ANSI_STRING64 = STRING64;
- {$EXTERNALSYM ANSI_STRING64}
- PANSI_STRING64 = ^ANSI_STRING64;
- {$EXTERNALSYM PANSI_STRING64}
-
-//
-// Valid values for the Attributes field
-//
-
-const
- OBJ_INHERIT = $00000002;
- {$EXTERNALSYM OBJ_INHERIT}
- OBJ_PERMANENT = $00000010;
- {$EXTERNALSYM OBJ_PERMANENT}
- OBJ_EXCLUSIVE = $00000020;
- {$EXTERNALSYM OBJ_EXCLUSIVE}
- OBJ_CASE_INSENSITIVE = $00000040;
- {$EXTERNALSYM OBJ_CASE_INSENSITIVE}
- OBJ_OPENIF = $00000080;
- {$EXTERNALSYM OBJ_OPENIF}
- OBJ_OPENLINK = $00000100;
- {$EXTERNALSYM OBJ_OPENLINK}
- OBJ_KERNEL_HANDLE = $00000200;
- {$EXTERNALSYM OBJ_KERNEL_HANDLE}
- OBJ_VALID_ATTRIBUTES = $000003F2;
- {$EXTERNALSYM OBJ_VALID_ATTRIBUTES}
-
-//
-// Object Attributes structure
-//
-
-type
- POBJECT_ATTRIBUTES = ^OBJECT_ATTRIBUTES;
- {$EXTERNALSYM POBJECT_ATTRIBUTES}
- _OBJECT_ATTRIBUTES = record
- Length: ULONG;
- RootDirectory: HANDLE;
- ObjectName: PUNICODE_STRING;
- Attributes: ULONG;
- SecurityDescriptor: PVOID; // Points to type SECURITY_DESCRIPTOR
- SecurityQualityOfService: PVOID; // Points to type SECURITY_QUALITY_OF_SERVICE
- end;
- {$EXTERNALSYM _OBJECT_ATTRIBUTES}
- OBJECT_ATTRIBUTES = _OBJECT_ATTRIBUTES;
- {$EXTERNALSYM OBJECT_ATTRIBUTES}
- TObjectAttributes = OBJECT_ATTRIBUTES;
- PObjectAttributes = POBJECT_ATTRIBUTES;
-
-procedure InitializeObjectAttributes(p: POBJECT_ATTRIBUTES; n: PUNICODE_STRING;
- a: ULONG; r: HANDLE; s: PVOID{PSECURITY_DESCRIPTOR});
-{$EXTERNALSYM InitializeObjectAttributes}
-
-//
-// Constants
-//
-
-const
-
-//#define FALSE 0
-//#define TRUE 1
-
- NULL = 0;
- {$EXTERNALSYM NULL}
- NULL64 = 0;
- {$EXTERNALSYM NULL64}
-
-//#include <guiddef.h>
-
-type
- PObjectId = ^OBJECTID;
- _OBJECTID = record // size is 20
- Lineage: GUID;
- Uniquifier: ULONG;
- end;
- {$EXTERNALSYM _OBJECTID}
- OBJECTID = _OBJECTID;
- {$EXTERNALSYM OBJECTID}
- TObjectId = OBJECTID;
-
-const
- MINCHAR = $80;
- {$EXTERNALSYM MINCHAR}
- MAXCHAR = $7f;
- {$EXTERNALSYM MAXCHAR}
- MINSHORT = $8000;
- {$EXTERNALSYM MINSHORT}
- MAXSHORT = $7fff;
- {$EXTERNALSYM MAXSHORT}
- MINLONG = DWORD($80000000);
- {$EXTERNALSYM MINLONG}
- MAXLONG = $7fffffff;
- {$EXTERNALSYM MAXLONG}
- MAXUCHAR = $ff;
- {$EXTERNALSYM MAXUCHAR}
- MAXUSHORT = $ffff;
- {$EXTERNALSYM MAXUSHORT}
- MAXULONG = DWORD($ffffffff);
- {$EXTERNALSYM MAXULONG}
-
-//
-// Useful Helper Macros
-//
-
-//
-// Determine if an argument is present by testing the value of the pointer
-// to the argument value.
-//
-
-function ARGUMENT_PRESENT(ArgumentPointer: Pointer): BOOL;
-{$EXTERNALSYM ARGUMENT_PRESENT}
-
-//
-// Exception handler routine definition.
-//
-
-// struct _CONTEXT;
-// struct _EXCEPTION_RECORD;
-
-//type
-// PEXCEPTION_ROUTINE = function(ExceptionRecord: LP_EXCEPTION_RECORD;
-// EstablisherFrame: PVOID; ContextRecord: LPCONTEXT;
-// DispatcherContext: PVOID): EXCEPTION_DISPOSITION; stdcall;
-// {$EXTERNALSYM PEXCEPTION_ROUTINE}
-
-//
-// Interrupt Request Level (IRQL)
-//
-
-type
- KIRQL = UCHAR;
- {$EXTERNALSYM KIRQL}
- PKIRQL = ^KIRQL;
- {$EXTERNALSYM PKIRQL}
-
-//
-// Product types
-//
-
- _NT_PRODUCT_TYPE = (Filler0, NtProductWinNt, NtProductLanManNt, NtProductServer);
- {$EXTERNALSYM _NT_PRODUCT_TYPE}
- NT_PRODUCT_TYPE = _NT_PRODUCT_TYPE;
- {$EXTERNALSYM NT_PRODUCT_TYPE}
- PNT_PRODUCT_TYPE = ^NT_PRODUCT_TYPE;
- TNtProductType = _NT_PRODUCT_TYPE;
-
-//
-// the bit mask, SharedUserData->SuiteMask, is a ULONG
-// so there can be a maximum of 32 entries
-// in this enum.
-//
-
-type
- _SUITE_TYPE = (
- SmallBusiness,
- Enterprise,
- BackOffice,
- CommunicationServer,
- TerminalServer,
- SmallBusinessRestricted,
- EmbeddedNT,
- DataCenter,
- SingleUserTS,
- MaxSuiteType);
- {$EXTERNALSYM _SUITE_TYPE}
- SUITE_TYPE = _SUITE_TYPE;
- {$EXTERNALSYM SUITE_TYPE}
- TSuiteType = SUITE_TYPE;
-
-const
- VER_SERVER_NT = DWORD($80000000);
- {$EXTERNALSYM VER_SERVER_NT}
- VER_WORKSTATION_NT = $40000000;
- {$EXTERNALSYM VER_WORKSTATION_NT}
- VER_SUITE_SMALLBUSINESS = $00000001;
- {$EXTERNALSYM VER_SUITE_SMALLBUSINESS}
- VER_SUITE_ENTERPRISE = $00000002;
- {$EXTERNALSYM VER_SUITE_ENTERPRISE}
- VER_SUITE_BACKOFFICE = $00000004;
- {$EXTERNALSYM VER_SUITE_BACKOFFICE}
- VER_SUITE_COMMUNICATIONS = $00000008;
- {$EXTERNALSYM VER_SUITE_COMMUNICATIONS}
- VER_SUITE_TERMINAL = $00000010;
- {$EXTERNALSYM VER_SUITE_TERMINAL}
- VER_SUITE_SMALLBUSINESS_RESTRICTED = $00000020;
- {$EXTERNALSYM VER_SUITE_SMALLBUSINESS_RESTRICTED}
- VER_SUITE_EMBEDDEDNT = $00000040;
- {$EXTERNALSYM VER_SUITE_EMBEDDEDNT}
- VER_SUITE_DATACENTER = $00000080;
- {$EXTERNALSYM VER_SUITE_DATACENTER}
- VER_SUITE_SINGLEUSERTS = $00000100;
- {$EXTERNALSYM VER_SUITE_SINGLEUSERTS}
- VER_SUITE_PERSONAL = $00000200;
- {$EXTERNALSYM VER_SUITE_PERSONAL}
- VER_SUITE_BLADE = $00000400;
- {$EXTERNALSYM VER_SUITE_BLADE}
-
-// ntdef.h
-
-type
- error_status_t = Longword;
- {$EXTERNALSYM error_status_t}
- wchar_t = Word;
- {$EXTERNALSYM wchar_t}
-
-//
-// The following types are guaranteed to be signed and 32 bits wide.
-//
-
-type
- INT_PTR = Integer;
- {$EXTERNALSYM INT_PTR}
- PINT_PTR = ^INT_PTR;
- {$EXTERNALSYM PINT_PTR}
- UINT_PTR = Longword;
- {$EXTERNALSYM UINT_PTR}
- PUINT_PTR = ^UINT_PTR;
- {$EXTERNALSYM PUINT_PTR}
- LONG_PTR = Longint;
- {$EXTERNALSYM LONG_PTR}
- PLONG_PTR = ^LONG_PTR;
- {$EXTERNALSYM PLONG_PTR}
- ULONG_PTR = Longword;
- {$EXTERNALSYM ULONG_PTR}
- PULONG_PTR = ^ULONG_PTR;
- {$EXTERNALSYM PULONG_PTR}
-
- LONG32 = Integer;
- {$EXTERNALSYM LONG32}
- PLONG32 = ^LONG32;
- {$EXTERNALSYM PLONG32}
- INT32 = Integer;
- {$EXTERNALSYM INT32}
- PINT32 = ^INT32;
- {$EXTERNALSYM PINT32}
-
-//
-// The following types are guaranteed to be unsigned and 32 bits wide.
-//
-
- ULONG32 = Longword;
- {$EXTERNALSYM ULONG32}
- PULONG32 = ^ULONG32;
- {$EXTERNALSYM PULONG32}
- DWORD32 = Longword;
- {$EXTERNALSYM DWORD32}
- PDWORD32 = ^DWORD32;
- {$EXTERNALSYM PDWORD32}
- UINT32 = Longword;
- {$EXTERNALSYM UINT32}
- PUINT32 = ^UINT32;
- {$EXTERNALSYM PUINT32}
-
-const
- MAX_PATH = 260;
- {$EXTERNALSYM MAX_PATH}
-
-type
-
-//unsigned char BYTE;
-//unsigned short WORD;
-
- FLOAT = Single;
- {$EXTERNALSYM FLOAT}
- PFLOAT = ^FLOAT;
- {$EXTERNALSYM PFLOAT}
- PBOOL = {$IFDEF USE_DELPHI_TYPES} Windows.PBOOL {$ELSE} ^BOOL {$ENDIF};
- {$EXTERNALSYM PBOOL}
- LPBOOL = {$IFDEF USE_DELPHI_TYPES} Windows.PBOOL {$ELSE} ^BOOL {$ENDIF};
- {$EXTERNALSYM LPBOOL}
- PBYTE = {$IFDEF USE_DELPHI_TYPES} Windows.PBYTE {$ELSE} ^Byte {$ENDIF};
- {$EXTERNALSYM PBYTE}
- LPBYTE = {$IFDEF USE_DELPHI_TYPES} Windows.PBYTE {$ELSE} ^Byte {$ENDIF};
- {$EXTERNALSYM LPBYTE}
- PINT = {$IFDEF USE_DELPHI_TYPES} Windows.PINT {$ELSE} ^INT {$ENDIF};
- {$EXTERNALSYM PINT}
- PUINT = {$IFDEF USE_DELPHI_TYPES} Windows.PUINT {$ELSE} ^UINT {$ENDIF};
- {$EXTERNALSYM PUINT}
- LPUINT = {$IFDEF USE_DELPHI_TYPES} Windows.PUINT {$ELSE} ^UINT {$ENDIF};
- {$EXTERNALSYM LPUINT}
- LPINT = {$IFDEF USE_DELPHI_TYPES} Windows.PINT {$ELSE} ^INT {$ENDIF};
- {$EXTERNALSYM LPINT}
- PWORD = {$IFDEF USE_DELPHI_TYPES} Windows.PWORD {$ELSE} ^WORD {$ENDIF};
- {$EXTERNALSYM PWORD}
- LPWORD = {$IFDEF USE_DELPHI_TYPES} Windows.PWORD {$ELSE} ^WORD {$ENDIF};
- {$EXTERNALSYM LPWORD}
- LPLONG = ^LONG;
- {$EXTERNALSYM LPLONG}
- PDWORD = {$IFDEF USE_DELPHI_TYPES} Windows.PDWORD {$ELSE} ^DWORD {$ENDIF};
- {$EXTERNALSYM PDWORD}
- LPDWORD = {$IFDEF USE_DELPHI_TYPES} Windows.LPDWORD {$ELSE} ^DWORD {$ENDIF};
- {$EXTERNALSYM LPDWORD}
- LPVOID = Pointer;
- {$EXTERNALSYM LPVOID}
- LPCVOID = Pointer;
- {$EXTERNALSYM LPCVOID}
- LPLPVOID = ^LPVOID;
- {$NODEFINE LPVOID}
-
- INT = Integer;
- {$EXTERNALSYM INT}
- UINT = {$IFDEF USE_DELPHI_TYPES} Windows.UINT {$ELSE} Longword {$ENDIF};
- {$EXTERNALSYM UINT}
-
-// Types use for passing & returning polymorphic values
-
- WPARAM = {$IFDEF USE_DELPHI_TYPES} Windows.WPARAM {$ELSE} UINT_PTR {$ENDIF};
- {$EXTERNALSYM WPARAM}
- LPARAM = {$IFDEF USE_DELPHI_TYPES} Windows.LPARAM {$ELSE} LONG_PTR {$ENDIF};
- {$EXTERNALSYM LPARAM}
- LRESULT = {$IFDEF USE_DELPHI_TYPES} Windows.LRESULT {$ELSE} LONG_PTR {$ENDIF};
- {$EXTERNALSYM LRESULT}
-
-function MAKEWORD(a, b: BYTE): WORD;
-{$EXTERNALSYM MAKEWORD}
-function MAKELONG(a, b: WORD): DWORD;
-{$EXTERNALSYM MAKELONG}
-
-function LOWORD(L: DWORD): WORD;
-{$EXTERNALSYM LOWORD}
-function HIWORD(L: DWORD): WORD;
-{$EXTERNALSYM HIWORD}
-function LOBYTE(W: WORD): BYTE;
-{$EXTERNALSYM LOBYTE}
-function HIBYTE(W: WORD): BYTE;
-{$EXTERNALSYM HIBYTE}
-
-type
- HWND = {$IFDEF USE_DELPHI_TYPES} Windows.HWND {$ELSE} HANDLE {$ENDIF};
- {$EXTERNALSYM HWND}
- LPHWND = ^HWND;
- {$EXTERNALSYM LPHWND}
- HHOOK = {$IFDEF USE_DELPHI_TYPES} Windows.HHOOK {$ELSE} HANDLE {$ENDIF};
- {$EXTERNALSYM HHOOK}
- LPHHOOK = ^HHOOK;
- {$EXTERNALSYM LPHHOOK}
- HEVENT = HANDLE;
- {$EXTERNALSYM HEVENT}
-
- ATOM = {$IFDEF USE_DELPHI_TYPES} Windows.ATOM {$ELSE} WORD {$ENDIF};
- {$EXTERNALSYM ATOM}
-
- SPHANDLE = ^HANDLE;
- {$EXTERNALSYM SPHANDLE}
- LPHANDLE = ^HANDLE;
- {$EXTERNALSYM LPHANDLE}
- HGLOBAL = {$IFDEF USE_DELPHI_TYPES} Windows.HGLOBAL {$ELSE} HANDLE {$ENDIF};
- {$EXTERNALSYM HGLOBAL}
- HLOCAL = {$IFDEF USE_DELPHI_TYPES} Windows.HLOCAL {$ELSE} HANDLE {$ENDIF};
- {$EXTERNALSYM HLOCAL}
- GLOBALHANDLE = HANDLE;
- {$EXTERNALSYM GLOBALHANDLE}
- //LOCALHANDLE = HANDLE; // todo clashes with WinBase.LocalHandle function
- //{$EXTERNALSYM LOCALHANDLE}
- FARPROC = {$IFDEF USE_DELPHI_TYPES} Windows.FARPROC {$ELSE} function: Integer; stdcall {$ENDIF};
- {$EXTERNALSYM FARPROC}
- NEARPROC = function: Integer; stdcall;
- {$EXTERNALSYM NEARPROC}
- PROC = function: Integer; stdcall;
- {$EXTERNALSYM PROC}
-
- HGDIOBJ = {$IFDEF USE_DELPHI_TYPES} Windows.HGDIOBJ {$ELSE} HANDLE {$ENDIF};
- {$EXTERNALSYM HGDIOBJ}
-
- HKEY = {$IFDEF USE_DELPHI_TYPES} Windows.HKEY {$ELSE} HANDLE {$ENDIF};
- {$EXTERNALSYM HKEY}
- PHKEY = {$IFDEF USE_DELPHI_TYPES} Windows.PHKEY {$ELSE} ^HKEY {$ENDIF};
- {$EXTERNALSYM PHKEY}
-
- HACCEL = {$IFDEF USE_DELPHI_TYPES} Windows.HACCEL {$ELSE} HANDLE {$ENDIF};
- {$EXTERNALSYM HACCEL}
-
- HBITMAP = {$IFDEF USE_DELPHI_TYPES} Windows.HBITMAP {$ELSE} HANDLE {$ENDIF};
- {$EXTERNALSYM HBITMAP}
- HBRUSH = {$IFDEF USE_DELPHI_TYPES} Windows.HBRUSH {$ELSE} HANDLE {$ENDIF};
- {$EXTERNALSYM HBRUSH}
-
- HCOLORSPACE = {$IFDEF USE_DELPHI_TYPES} Windows.HCOLORSPACE {$ELSE} HANDLE {$ENDIF};
- {$EXTERNALSYM HCOLORSPACE}
-
- HDC = {$IFDEF USE_DELPHI_TYPES} Windows.HDC {$ELSE} HANDLE {$ENDIF};
- {$EXTERNALSYM HDC}
- HGLRC = {$IFDEF USE_DELPHI_TYPES} Windows.HGLRC {$ELSE} HANDLE {$ENDIF};
- {$EXTERNALSYM HGLRC}
- HDESK = {$IFDEF USE_DELPHI_TYPES} Windows.HDESK {$ELSE} HANDLE {$ENDIF};
- {$EXTERNALSYM HDESK}
- HENHMETAFILE = {$IFDEF USE_DELPHI_TYPES} Windows.HENHMETAFILE {$ELSE} HANDLE {$ENDIF};
- {$EXTERNALSYM HENHMETAFILE}
- HFONT = {$IFDEF USE_DELPHI_TYPES} Windows.HFONT {$ELSE} HANDLE {$ENDIF};
- {$EXTERNALSYM HFONT}
- HICON = {$IFDEF USE_DELPHI_TYPES} Windows.HICON {$ELSE} HANDLE {$ENDIF};
- {$EXTERNALSYM HICON}
- HMENU = {$IFDEF USE_DELPHI_TYPES} Windows.HMENU {$ELSE} HANDLE {$ENDIF};
- {$EXTERNALSYM HMENU}
- HMETAFILE = {$IFDEF USE_DELPHI_TYPES} Windows.HMETAFILE {$ELSE} HANDLE {$ENDIF};
- {$EXTERNALSYM HMETAFILE}
- HINSTANCE = {$IFDEF USE_DELPHI_TYPES} Windows.HINST {$ELSE} HANDLE {$ENDIF};
- {$EXTERNALSYM HINSTANCE}
- HMODULE = {$IFDEF USE_DELPHI_TYPES} Windows.HMODULE {$ELSE} HINSTANCE {$ENDIF};
- {$EXTERNALSYM HMODULE}
- HPALETTE = {$IFDEF USE_DELPHI_TYPES} Windows.HPALETTE {$ELSE} HANDLE {$ENDIF};
- {$EXTERNALSYM HPALETTE}
- HPEN = {$IFDEF USE_DELPHI_TYPES} Windows.HPEN {$ELSE} HANDLE {$ENDIF};
- {$EXTERNALSYM HPEN}
- HRGN = {$IFDEF USE_DELPHI_TYPES} Windows.HRGN {$ELSE} HANDLE {$ENDIF};
- {$EXTERNALSYM HRGN}
- HRSRC = {$IFDEF USE_DELPHI_TYPES} Windows.HRSRC {$ELSE} HANDLE {$ENDIF};
- {$EXTERNALSYM HRSRC}
- HSTR = {$IFDEF USE_DELPHI_TYPES} Windows.HSTR {$ELSE} HANDLE {$ENDIF};
- {$EXTERNALSYM HSTR}
- HTASK = {$IFDEF USE_DELPHI_TYPES} Windows.HTASK {$ELSE} HANDLE {$ENDIF};
- {$EXTERNALSYM HTASK}
- HWINSTA = {$IFDEF USE_DELPHI_TYPES} Windows.HWINSTA {$ELSE} HANDLE {$ENDIF};
- {$EXTERNALSYM HWINSTA}
- HKL = {$IFDEF USE_DELPHI_TYPES} Windows.HKL {$ELSE} HANDLE {$ENDIF};
- {$EXTERNALSYM HKL}
- PHKL = {$IFDEF USE_DELPHI_TYPES} ^HKL {$ELSE} ^HANDLE {$ENDIF};
- {$EXTERNALSYM PHKL}
-
- HMONITOR = HANDLE;
- {$EXTERNALSYM HMONITOR}
- HWINEVENTHOOK = HANDLE;
- {$EXTERNALSYM HWINEVENTHOOK}
- HUMPD = HANDLE;
- {$EXTERNALSYM HUMPD}
-
- HFILE = {$IFDEF USE_DELPHI_TYPES} Windows.HFILE {$ELSE} Longword {$ENDIF};
- {$EXTERNALSYM HFILE}
- HCURSOR = {$IFDEF USE_DELPHI_TYPES} Windows.HCURSOR {$ELSE} HICON {$ENDIF};
- {$EXTERNALSYM HCURSOR}
-
- COLORREF = {$IFDEF USE_DELPHI_TYPES} Windows.COLORREF {$ELSE} DWORD {$ENDIF};
- {$EXTERNALSYM COLORREF}
- LPCOLORREF = ^COLORREF;
- {$EXTERNALSYM LPCOLORREF}
-
- PHMODULE = ^HMODULE;
- {$NODEFINE PHMODULE}
-
-const
- HFILE_ERROR = HFILE(-1);
- {$EXTERNALSYM HFILE_ERROR}
-
-type
- LPRECT = ^RECT;
- {$EXTERNALSYM LPRECT}
- tagRECT = record
- left: LONG;
- top: LONG;
- right: LONG;
- bottom: LONG;
- end;
- {$EXTERNALSYM tagRECT}
- RECT = {$IFDEF USE_DELPHI_TYPES} Windows.TRect {$ELSE} tagRECT {$ENDIF};
- {$EXTERNALSYM RECT}
- NPRECT = ^RECT;
- {$EXTERNALSYM NPRECT}
- LPCRECT = ^RECT;
- {$EXTERNALSYM LPCRECT}
- TRect = {$IFDEF USE_DELPHI_TYPES} Windows.TRect {$ELSE} RECT {$ENDIF};
- PRect = {$IFDEF USE_DELPHI_TYPES} Windows.PRect {$ELSE} LPRECT {$ENDIF};
-
- LPRECTL = ^RECTL;
- {$EXTERNALSYM LPRECTL}
- _RECTL = record
- left: LONG;
- top: LONG;
- right: LONG;
- bottom: LONG;
- end;
- {$EXTERNALSYM _RECTL}
- RECTL = _RECTL;
- {$EXTERNALSYM RECTL}
- LPCRECTL = ^_RECTL;
- {$EXTERNALSYM LPCRECTL}
- TRectl = RECTL;
- PRectl = LPRECTL;
-
- LPPOINT = ^POINT;
- {$EXTERNALSYM LPPOINT}
- tagPOINT = record
- x: LONG;
- y: LONG;
- end;
- {$EXTERNALSYM tagPOINT}
- NPPOINT = ^tagPoint;
- {$EXTERNALSYM NPPOINT}
- POINT = tagPOINT;
- {$EXTERNALSYM tagPOINT}
- TPoint = {$IFDEF USE_DELPHI_TYPES} Windows.TPoint {$ELSE} POINT {$ENDIF};
- PPoint = {$IFDEF USE_DELPHI_TYPES} Windows.PPoint {$ELSE} LPPOINT {$ENDIF};
-
- PPointl = ^POINTL;
- _POINTL = record
- x: LONG;
- y: LONG;
- end;
- {$EXTERNALSYM _POINTL}
- POINTL = _POINTL;
- {$EXTERNALSYM POINTL}
- TPointl = POINTL;
-
- LPSIZE = ^TSize;
- {$EXTERNALSYM LPSIZE}
-
- {$IFDEF USE_DELPHI_TYPES}
- TSize = Windows.TSize;
- PSize = Windows.PSize;
- {$ELSE}
- tagSIZE = record
- cx: LONG;
- cy: LONG;
- end;
- {$EXTERNALSYM tagSIZE}
- TSize = tagSIZE;
- PSize = LPSIZE;
- {$ENDIF USE_DELPHI_TYPES}
-
- SIZE = TSize;
- {$EXTERNALSYM SIZE}
- SIZEL = TSize;
- {$EXTERNALSYM SIZEL}
- PSIZEL = PSize;
- {$EXTERNALSYM PSIZEL}
- LPSIZEL = PSize;
- {$EXTERNALSYM LPSIZEL}
-
- LPPOINTS = ^POINTS;
- {$EXTERNALSYM LPPOINTS}
- tagPOINTS = record
- x: SHORT;
- y: SHORT;
- end;
- {$EXTERNALSYM tagPOINTS}
- POINTS = tagPOINTS;
- {$EXTERNALSYM POINTS}
- TPoints = POINTS;
- PPoints = LPPOINTS;
-
-//
-// File System time stamps are represented with the following structure:
-//
-
- _FILETIME = record
- dwLowDateTime: DWORD;
- dwHighDateTime: DWORD;
- end;
- {$EXTERNALSYM _FILETIME}
- FILETIME = _FILETIME;
- {$EXTERNALSYM FILETIME}
- PFILETIME = ^FILETIME;
- {$EXTERNALSYM PFILETIME}
- LPFILETIME = PFILETIME;
- {$EXTERNALSYM LPFILETIME}
- TFileTime = FILETIME;
-
-// mode selections for the device mode function
-
-const
- DM_UPDATE = 1;
- {$EXTERNALSYM DM_UPDATE}
- DM_COPY = 2;
- {$EXTERNALSYM DM_COPY}
- DM_PROMPT = 4;
- {$EXTERNALSYM DM_PROMPT}
- DM_MODIFY = 8;
- {$EXTERNALSYM DM_MODIFY}
-
- DM_IN_BUFFER = DM_MODIFY;
- {$EXTERNALSYM DM_IN_BUFFER}
- DM_IN_PROMPT = DM_PROMPT;
- {$EXTERNALSYM DM_IN_PROMPT}
- DM_OUT_BUFFER = DM_COPY;
- {$EXTERNALSYM DM_OUT_BUFFER}
- DM_OUT_DEFAULT = DM_UPDATE;
- {$EXTERNALSYM DM_OUT_DEFAULT}
-
-// device capabilities indices
-
- DC_FIELDS = 1;
- {$EXTERNALSYM DC_FIELDS}
- DC_PAPERS = 2;
- {$EXTERNALSYM DC_PAPERS}
- DC_PAPERSIZE = 3;
- {$EXTERNALSYM DC_PAPERSIZE}
- DC_MINEXTENT = 4;
- {$EXTERNALSYM DC_MINEXTENT}
- DC_MAXEXTENT = 5;
- {$EXTERNALSYM DC_MAXEXTENT}
- DC_BINS = 6;
- {$EXTERNALSYM DC_BINS}
- DC_DUPLEX = 7;
- {$EXTERNALSYM DC_DUPLEX}
- DC_SIZE = 8;
- {$EXTERNALSYM DC_SIZE}
- DC_EXTRA = 9;
- {$EXTERNALSYM DC_EXTRA}
- DC_VERSION = 10;
- {$EXTERNALSYM DC_VERSION}
- DC_DRIVER = 11;
- {$EXTERNALSYM DC_DRIVER}
- DC_BINNAMES = 12;
- {$EXTERNALSYM DC_BINNAMES}
- DC_ENUMRESOLUTIONS = 13;
- {$EXTERNALSYM DC_ENUMRESOLUTIONS}
- DC_FILEDEPENDENCIES = 14;
- {$EXTERNALSYM DC_FILEDEPENDENCIES}
- DC_TRUETYPE = 15;
- {$EXTERNALSYM DC_TRUETYPE}
- DC_PAPERNAMES = 16;
- {$EXTERNALSYM DC_PAPERNAMES}
- DC_ORIENTATION = 17;
- {$EXTERNALSYM DC_ORIENTATION}
- DC_COPIES = 18;
- {$EXTERNALSYM DC_COPIES}
-
-//
-// HALF_PTR is half the size of a pointer it intended for use with
-// within strcuture which contain a pointer and two small fields.
-// UHALF_PTR is the unsigned variation.
-//
-
-const
- ADDRESS_TAG_BIT = DWORD($80000000);
- {$EXTERNALSYM ADDRESS_TAG_BIT}
-
-type
- UHALF_PTR = Byte;
- {$EXTERNALSYM UHALF_PTR}
- PUHALF_PTR = ^UHALF_PTR;
- {$EXTERNALSYM PUHALF_PTR}
- HALF_PTR = Shortint;
- {$EXTERNALSYM HALF_PTR}
- PHALF_PTR = ^HALF_PTR;
- {$EXTERNALSYM PHALF_PTR}
-
- SHANDLE_PTR = Longint;
- {$EXTERNALSYM SHANDLE_PTR}
- HANDLE_PTR = Longint;
- {$EXTERNALSYM HANDLE_PTR}
-
-//
-// SIZE_T used for counts or ranges which need to span the range of
-// of a pointer. SSIZE_T is the signed variation.
-//
-
- SIZE_T = ULONG_PTR;
- {$EXTERNALSYM SIZE_T}
- PSIZE_T = ^SIZE_T;
- {$EXTERNALSYM PSIZE_T}
- SSIZE_T = LONG_PTR;
- {$EXTERNALSYM SSIZE_T}
- PSSIZE_T = ^SSIZE_T;
- {$EXTERNALSYM PSSIZE_T}
-
-//
-// Add Windows flavor DWORD_PTR types
-//
-
- DWORD_PTR = ULONG_PTR;
- {$EXTERNALSYM DWORD_PTR}
- PDWORD_PTR = ^DWORD_PTR;
- {$EXTERNALSYM PDWORD_PTR}
-
-//
-// The following types are guaranteed to be signed and 64 bits wide.
-//
-
- LONG64 = Int64;
- {$EXTERNALSYM LONG64}
- PLONG64 = ^LONG64;
- {$EXTERNALSYM PLONG64}
-
- PINT64 = ^Int64;
- {$EXTERNALSYM PINT64}
-
-//
-// The following types are guaranteed to be unsigned and 64 bits wide.
-//
-
- ULONG64 = Int64;
- {$EXTERNALSYM ULONG64}
- PULONG64 = ^ULONG64;
- {$EXTERNALSYM PULONG64}
- DWORD64 = Int64;
- {$EXTERNALSYM DWORD64}
- PDWORD64 = ^DWORD64;
- {$EXTERNALSYM PDWORD64}
- UINT64 = Int64;
- {$EXTERNALSYM UINT64}
- PUINT64 = ^UINT64;
- {$EXTERNALSYM PUINT64}
-
-const
- MAXUINT_PTR = not UINT_PTR(0);
- {$EXTERNALSYM MAXUINT_PTR}
- MAXINT_PTR = INT_PTR((MAXUINT_PTR shr 1));
- {$EXTERNALSYM MAXINT_PTR}
- MININT_PTR = not MAXINT_PTR;
- {$EXTERNALSYM MININT_PTR}
-
- MAXULONG_PTR = not ULONG_PTR(0);
- {$EXTERNALSYM MAXULONG_PTR}
- MAXLONG_PTR = LONG_PTR(MAXULONG_PTR shr 1);
- {$EXTERNALSYM MAXLONG_PTR}
- MINLONG_PTR = not MAXLONG_PTR;
- {$EXTERNALSYM MINLONG_PTR}
-
- MAXUHALF_PTR = UHALF_PTR( not 0);
- {$EXTERNALSYM MAXUHALF_PTR}
- MAXHALF_PTR = HALF_PTR(MAXUHALF_PTR shr 1);
- {$EXTERNALSYM MAXHALF_PTR}
- MINHALF_PTR = not MAXHALF_PTR;
- {$EXTERNALSYM MINHALF_PTR}
-
-// basetsd
-
-type
- INT8 = Shortint;
- {$EXTERNALSYM INT8}
- PINT8 = ^INT8;
- {$EXTERNALSYM PINT8}
- INT16 = Smallint;
- {$EXTERNALSYM INT16}
- PINT16 = ^INT16;
- {$EXTERNALSYM PINT16}
- UINT8 = Byte;
- {$EXTERNALSYM UINT8}
- PUINT8 = ^UINT8;
- {$EXTERNALSYM PUINT8}
- UINT16 = Word;
- {$EXTERNALSYM UINT16}
- PUINT16 = ^UINT16;
- {$EXTERNALSYM PUINT16}
-
-//
-// Thread affinity.
-//
-
- KAFFINITY = ULONG_PTR;
- {$EXTERNALSYM KAFFINITY}
- PKAFFINITY = ^KAFFINITY;
- {$EXTERNALSYM PKAFFINITY}
-
- // (rom) missing types
- LPCASTR = ^AnsiChar;
- LPASTR = ^AnsiChar;
- PCASTR = ^AnsiChar;
- PASTR = ^AnsiChar;
-
- PPCWSTR = ^LPCWSTR;
- PPCASTR = ^LPCASTR;
- PPCSTR = ^LPCTSTR;
- PPWSTR = ^LPWSTR;
- PPASTR = ^LPASTR;
- PPSTR = ^LPTSTR;
- PPTCHAR = ^PTCHAR;
- LPLPCTSTR = ^LPCTSTR;
-
-implementation
-
-uses
- JwaWinNT;
-
-{$IFNDEF USE_DELPHI_TYPES}
-const
- kernel32 = 'kernel32.dll';
-{$ENDIF !USE_DELPHI_TYPES}
-
-function Int32x32To64(a, b: LONG): LONGLONG;
-begin
- Result := a * b;
-end;
-
-function UInt32x32To64(a, b: DWORD): ULONGLONG;
-begin
- Result := a * b;
-end;
-
-function Int64ShllMod32(Value: ULONGLONG; ShiftCount: DWORD): ULONGLONG;
-asm
- MOV ECX, ShiftCount
- MOV EAX, DWORD PTR [Value]
- MOV EDX, DWORD PTR [Value + 4]
- SHLD EDX, EAX, CL
- SHL EAX, CL
-end;
-
-function Int64ShraMod32(Value: LONGLONG; ShiftCount: DWORD): LONGLONG;
-asm
- MOV ECX, ShiftCount
- MOV EAX, DWORD PTR [Value]
- MOV EDX, DWORD PTR [Value + 4]
- SHRD EAX, EDX, CL
- SAR EDX, CL
-end;
-
-function Int64ShrlMod32(Value: ULONGLONG; ShiftCount: DWORD): ULONGLONG;
-asm
- MOV ECX, ShiftCount
- MOV EAX, DWORD PTR [Value]
- MOV EDX, DWORD PTR [Value + 4]
- SHRD EAX, EDX, CL
- SHR EDX, CL
-end;
-
-procedure ListEntry32To64(l32: PLIST_ENTRY32; l64: PLIST_ENTRY64);
-begin
- l64^.Flink := l32^.Flink;
- l64^.Blink := l32^.Blink;
-end;
-
-procedure ListEntry64To32(l64: PLIST_ENTRY64; l32: PLIST_ENTRY32);
-begin
- l32^.Flink := ULONG(l64^.Flink);
- l32^.Blink := ULONG(l64^.Blink);
-end;
-
-function NT_SUCCESS(Status: NTSTATUS): BOOL;
-begin
- Result := Status >= 0;
-end;
-
-function NT_INFORMATION(Status: NTSTATUS): BOOL;
-begin
- Result := (ULONG(Status) shr 30) = 1;
-end;
-
-function NT_WARNING(Status: NTSTATUS): BOOL;
-begin
- Result := (ULONG(Status) shr 30) = 2;
-end;
-
-function NT_ERROR(Status: NTSTATUS): BOOL;
-begin
- Result := (ULONG(Status) shr 30) = 3;
-end;
-
-procedure InitializeObjectAttributes(p: POBJECT_ATTRIBUTES; n: PUNICODE_STRING;
- a: ULONG; r: HANDLE; s: PVOID{PSECURITY_DESCRIPTOR});
-begin
- p^.Length := SizeOf(OBJECT_ATTRIBUTES);
- p^.RootDirectory := r;
- p^.Attributes := a;
- p^.ObjectName := n;
- p^.SecurityDescriptor := s;
- p^.SecurityQualityOfService := nil;
-end;
-
-function ARGUMENT_PRESENT(ArgumentPointer: Pointer): BOOL;
-begin
- Result := ArgumentPointer <> nil;
-end;
-
-function MAKEWORD(a, b: BYTE): WORD;
-begin
- Result := (b shl 8) or a;
-end;
-
-function MAKELONG(a, b: WORD): DWORD;
-begin
- Result := (b shl 16) or a;
-end;
-
-function LOWORD(L: DWORD): WORD;
-begin
- Result := L and $0000FFFF;
-end;
-
-function HIWORD(L: DWORD): WORD;
-begin
- Result := L shr 16;
-end;
-
-function LOBYTE(W: WORD): BYTE;
-begin
- Result := W and $FF;
-end;
-
-function HIBYTE(W: WORD): BYTE;
-begin
- Result := W shr 8;
-end;
-
-function GetModuleHandle(lpModuleName: LPCSTR): HMODULE; stdcall; external kernel32 name 'GetModuleHandleA';
-function LoadLibrary(lpLibFileName: LPCSTR): HMODULE; stdcall; external kernel32 name 'LoadLibraryA';
-function GetProcAddress(hModule: HMODULE; lpProcName: LPCSTR): FARPROC; stdcall; external kernel32 name 'GetProcAddress';
-
-resourcestring
- RsELibraryNotFound = 'Library not found: %s';
- RsEFunctionNotFound = 'Function not found: %s.%s';
-
-procedure GetProcedureAddress(var P: Pointer; const ModuleName, ProcName: string);
-var
- ModuleHandle: HMODULE;
-begin
- if not Assigned(P) then
- begin
- ModuleHandle := GetModuleHandle(PChar(ModuleName));
- if ModuleHandle = 0 then
- begin
- ModuleHandle := LoadLibrary(PChar(ModuleName));
- if ModuleHandle = 0 then
- raise EJwaLoadLibraryError.CreateResFmt(@RsELibraryNotFound, [ModuleName]);
- end;
- P := Pointer(GetProcAddress(ModuleHandle, PChar(ProcName)));
- if not Assigned(P) then
- raise EJwaGetProcAddressError.CreateResFmt(@RsEFunctionNotFound, [ModuleName, ProcName]);
- end;
-end;
-
-end.
+{******************************************************************************}
+{ }
+{ Windows Base Types API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: basetsd.h, released August 2001. The original Pascal }
+{ code is: WinType.pas, released December 2000. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwawintype.pas,v 1.1 2005/04/04 07:56:11 marco Exp $
+
+unit JwaWinType;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "BaseTsd.h"'}
+{$HPPEMIT '#include "BaseTyps.h"'}
+{$HPPEMIT '#include "NtDef.h"'}
+{$HPPEMIT '#include "WinDef.h"'}
+{$HPPEMIT ''}
+{$HPPEMIT 'typedef LPVOID *LPLPVOID'}
+{$HPPEMIT 'typedef GUID TGUID'}
+{$HPPEMIT 'typedef GUID *LPGUID'}
+{$HPPEMIT 'typedef GUID CLSID'}
+{$HPPEMIT 'typedef HMODULE *PHMODULE'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ {$IFDEF USE_DELPHI_TYPES}
+ Windows,
+ {$ENDIF USE_DELPHI_TYPES}
+ SysUtils; // TODO
+
+type
+ EJwaError = class(Exception);
+ EJwaLoadLibraryError = class(EJwaError);
+ EJwaGetProcAddressError = class(EJwaError);
+
+procedure GetProcedureAddress(var P: Pointer; const ModuleName, ProcName: string);
+
+// ntdef.h
+
+type
+//typedef double DOUBLE;
+
+ PQuad = ^TQuad;
+ _QUAD = record // QUAD is for those times we want
+ DoNotUseThisField: Double; // an 8 byte aligned 8 byte long structure
+ end; // which is NOT really a floating point
+ {$EXTERNALSYM _QUAD} // number. Use DOUBLE if you want an FP number.
+ QUAD = _QUAD;
+ {$EXTERNALSYM QUAD}
+ TQuad = _QUAD;
+
+//
+// Unsigned Basics
+//
+
+ UCHAR = {$IFDEF USE_DELPHI_TYPES} Windows.UCHAR {$ELSE} Byte {$ENDIF};
+ {$EXTERNALSYM UCHAR}
+ USHORT = Word;
+ {$EXTERNALSYM USHORT}
+ ULONG = {$IFDEF USE_DELPHI_TYPES} Windows.ULONG {$ELSE} Cardinal {$ENDIF};
+ {$EXTERNALSYM ULONG}
+ UQUAD = QUAD;
+ {$EXTERNALSYM UQUAD}
+
+//
+// __int64 is only supported by 2.0 and later midl.
+// __midl is set by the 2.0 midl and not by 1.0 midl.
+//
+
+type
+ LONGLONG = {$IFDEF USE_DELPHI_TYPES} Windows.LONGLONG {$ELSE} Int64 {$ENDIF};
+ {$EXTERNALSYM LONGLONG}
+ ULONGLONG = Int64;
+ {$EXTERNALSYM ULONGLONG}
+
+const
+ MAXLONGLONG = $7fffffffffffffff;
+ {$EXTERNALSYM MAXLONGLONG}
+
+type
+ PLONGLONG = ^LONGLONG;
+ {$EXTERNALSYM PLONGLONG}
+ PULONGLONG = ^ULONGLONG;
+ {$EXTERNALSYM PULONGLONG}
+
+ BOOL = {$IFDEF USE_DELPHI_TYPES} Windows.BOOL {$ELSE} LongBool {$ENDIF};
+ {$EXTERNALSYM BOOL}
+
+ DWORD = {$IFDEF USE_DELPHI_TYPES} Windows.DWORD {$ELSE} Longword {$ENDIF};
+ {$EXTERNALSYM DWORD}
+
+const
+ ANYSIZE_ARRAY = 1;
+ {$EXTERNALSYM ANYSIZE_ARRAY}
+
+ MAX_NATURAL_ALIGNMENT = SizeOf(ULONG);
+ {$EXTERNALSYM MAX_NATURAL_ALIGNMENT}
+
+//
+// Void
+//
+
+type
+ PVOID = Pointer;
+ {$EXTERNALSYM PVOID}
+ PPVOID = ^PVOID;
+ {$EXTERNALSYM PPVOID}
+ PVOID64 = Pointer;
+ {$EXTERNALSYM PVOID64}
+
+//
+// Basics
+//
+
+ SHORT = {$IFDEF USE_DELPHI_TYPES} Windows.SHORT {$ELSE} Smallint {$ENDIF};
+ {$EXTERNALSYM SHORT}
+ LONG = Longint;
+ {$EXTERNALSYM LONG}
+
+//
+// UNICODE (Wide Character) types
+//
+
+ WCHAR = {$IFDEF USE_DELPHI_TYPES} Windows.WCHAR {$ELSE} WideChar {$ENDIF};
+ {$EXTERNALSYM WCHAR}
+
+ PWCHAR = {$IFDEF USE_DELPHI_TYPES} Windows.PWChar {$ELSE} PWideChar {$ENDIF};
+ {$EXTERNALSYM PWCHAR}
+ LPWCH = ^WCHAR;
+ {$EXTERNALSYM LPWCH}
+ PWCH = ^WCHAR;
+ {$EXTERNALSYM PWCH}
+ LPCWCH = ^WCHAR;
+ {$EXTERNALSYM LPCWCH}
+ PCWCH = ^WCHAR;
+ {$EXTERNALSYM PCWCH}
+ NWPSTR = ^WCHAR;
+ {$EXTERNALSYM NWPSTR}
+ LPWSTR = {$IFDEF USE_DELPHI_TYPES} Windows.LPWSTR {$ELSE} PWideChar {$ENDIF};
+ {$EXTERNALSYM LPWSTR}
+ LPCWSTR = {$IFDEF USE_DELPHI_TYPES} Windows.LPCWSTR {$ELSE} PWideChar {$ENDIF};
+ {$EXTERNALSYM LPCWSTR}
+ PWSTR = {$IFDEF USE_DELPHI_TYPES} Windows.LPWSTR {$ELSE} PWideChar {$ENDIF};
+ {$EXTERNALSYM PWSTR}
+ LPUWSTR = {$IFDEF USE_DELPHI_TYPES} Windows.LPWSTR {$ELSE} PWideChar {$ENDIF};
+ {$EXTERNALSYM LPUWSTR}
+ PUWSTR = {$IFDEF USE_DELPHI_TYPES} Windows.LPWSTR {$ELSE} PWideChar {$ENDIF};
+ {$EXTERNALSYM PUWSTR}
+ LCPUWSTR = {$IFDEF USE_DELPHI_TYPES} Windows.LPWSTR {$ELSE} PWideChar {$ENDIF};
+ {$EXTERNALSYM LCPUWSTR}
+ PCUWSTR = {$IFDEF USE_DELPHI_TYPES} Windows.LPWSTR {$ELSE} PWideChar {$ENDIF};
+ {$EXTERNALSYM PCUWSTR}
+
+//
+// ANSI (Multi-byte Character) types
+//
+
+ LPCH = ^Char;
+ {$EXTERNALSYM LPCH}
+ PCH = ^Char;
+ {$EXTERNALSYM PCH}
+
+ LPCCH = ^Char;
+ {$EXTERNALSYM LPCCH}
+ PCCH = ^Char;
+ {$EXTERNALSYM PCCH}
+ NPSTR = ^Char;
+ {$EXTERNALSYM NPSTR}
+ LPSTR = {$IFDEF USE_DELPHI_TYPES} Windows.LPSTR {$ELSE} PAnsiChar {$ENDIF};
+ {$EXTERNALSYM LPSTR}
+ PSTR = PChar;
+ {$EXTERNALSYM PSTR}
+ LPCSTR = {$IFDEF USE_DELPHI_TYPES} Windows.LPCSTR {$ELSE} PAnsiChar {$ENDIF};
+ {$EXTERNALSYM LPCSTR}
+ PCSTR = PChar;
+ {$EXTERNALSYM PCSTR}
+
+// (rom) moved down to have LPSTR etc always declared
+type
+ LPLPSTR = ^LPSTR;
+ {$NODEFINE LPLPSTR}
+ LPLPCSTR = ^LPCSTR;
+ {$NODEFINE LPLPCSTR}
+ LPLPCWSTR = ^LPCWSTR;
+ {$NODEFINE LPLPCWSTR}
+ LPLPWSTR = ^LPWSTR;
+ {$NODEFINE LPLPWSTR}
+
+ PPTSTR = ^PTSTR;
+ PPChar = ^PChar;
+ PPWideChar = ^PWideChar;
+ PPointer = ^Pointer;
+
+ GUID = TGUID;
+ {$NODEFINE GUID}
+ LPGUID = ^GUID;
+ {$NODEFINE LPGUID}
+ CLSID = TGUID;
+ {$NODEFINE CLSID}
+
+//
+// Neutral ANSI/UNICODE types and macros
+//
+
+{$IFDEF UNICODE}
+
+ TCHAR = WCHAR;
+ {$EXTERNALSYM TCHAR}
+ PTCHAR = PWideChar;
+ {$EXTERNALSYM PTCHAR}
+ TUCHAR = WCHAR;
+ {$EXTERNALSYM TUCHAR}
+ PTUCHAR = ^TUCHAR;
+ {$EXTERNALSYM PTUCHAR}
+
+ LPCTCH = LPWSTR;
+ LPTCH = LPWSTR;
+ {$EXTERNALSYM LPTCH}
+ PTCH = LPWSTR;
+ {$EXTERNALSYM PTCH}
+ PTSTR = LPWSTR;
+ {$EXTERNALSYM PTSTR}
+ LPTSTR = {$IFDEF USE_DELPHI_TYPES} Windows.LPWSTR {$ELSE} LPWSTR {$ENDIF};
+ {$EXTERNALSYM LPTSTR}
+ PCTSTR = LPTSTR;
+ {$EXTERNALSYM PCTSTR}
+ LPCTSTR = LPTSTR;
+ {$EXTERNALSYM LPCTSTR}
+
+ PCUTSTR = PTUCHAR;
+ {$EXTERNALSYM PCUTSTR}
+ LPCUTSTR = PTUCHAR;
+ {$EXTERNALSYM LPCUTSTR}
+ PUTSTR = PTUCHAR;
+ {$EXTERNALSYM PUTSTR}
+ LPUTSTR = PTUCHAR;
+ {$EXTERNALSYM LPUTSTR}
+
+ __TEXT = WideString;
+ {$EXTERNALSYM __TEXT}
+
+ {$ELSE}
+
+ TCHAR = Char;
+ {$EXTERNALSYM TCHAR}
+ PTCHAR = PChar;
+ {$EXTERNALSYM PTCHAR}
+ TUCHAR = Byte;
+ {$EXTERNALSYM TUCHAR}
+ PTUCHAR = ^TUCHAR;
+ {$EXTERNALSYM PTUCHAR}
+
+ LPCTCH = LPSTR;
+ LPTCH = LPSTR;
+ {$EXTERNALSYM LPTCH}
+ PTCH = LPSTR;
+ {$EXTERNALSYM PTCH}
+ PTSTR = LPSTR;
+ {$EXTERNALSYM PTSTR}
+ LPTSTR = LPSTR;
+ {$EXTERNALSYM LPTSTR}
+ PCTSTR = LPCSTR;
+ {$EXTERNALSYM PCTSTR}
+ LPCTSTR = LPCSTR;
+ {$EXTERNALSYM LPCTSTR}
+
+ PCUTSTR = PTUCHAR;
+ {$EXTERNALSYM PCUTSTR}
+ LPCUTSTR = PTUCHAR;
+ {$EXTERNALSYM LPCUTSTR}
+ PUTSTR = PTUCHAR;
+ {$EXTERNALSYM PUTSTR}
+ LPUTSTR = PTUCHAR;
+ {$EXTERNALSYM LPUTSTR}
+
+ __TEXT = AnsiString;
+ {$EXTERNALSYM __TEXT}
+
+{$ENDIF UNICODE}
+
+ TEXT = __TEXT;
+ {$EXTERNALSYM TEXT}
+
+//
+// Pointer to Basics
+//
+
+ PSHORT = ^SHORT;
+ {$EXTERNALSYM PSHORT}
+ PLONG = ^LONG;
+ {$EXTERNALSYM PLONG}
+
+//
+// Pointer to Unsigned Basics
+//
+
+ PUCHAR = {$IFDEF USE_DELPHI_TYPES} Windows.PUCHAR {$ELSE} ^Byte {$ENDIF};
+ {$EXTERNALSYM PUCHAR}
+ PUSHORT = ^USHORT;
+ {$EXTERNALSYM PUSHORT}
+ PULONG = {$IFDEF USE_DELPHI_TYPES} Windows.PULONG {$ELSE} ^ULONG {$ENDIF};
+ {$EXTERNALSYM PULONG}
+ PUQUAD = ^UQUAD;
+ {$EXTERNALSYM PUQUAD}
+
+//
+// Signed characters
+//
+
+ SCHAR = Shortint;
+ {$EXTERNALSYM SCHAR}
+ PSCHAR = ^SCHAR;
+ {$EXTERNALSYM PSCHAR}
+
+//
+// Handle to an Object
+//
+
+ HANDLE = {$IFDEF USE_DELPHI_TYPES} Windows.THandle {$ELSE} Longword {$ENDIF};
+ {$EXTERNALSYM HANDLE}
+ PHANDLE = {$IFDEF USE_DELPHI_TYPES} Windows.PHandle {$ELSE} ^HANDLE {$ENDIF};
+ {$EXTERNALSYM PHANDLE}
+ THandle = {$IFDEF USE_DELPHI_TYPES} Windows.THandle {$ELSE} HANDLE {$ENDIF};
+
+//
+// Flag (bit) fields
+//
+
+ FCHAR = UCHAR;
+ {$EXTERNALSYM FCHAR}
+ FSHORT = USHORT;
+ {$EXTERNALSYM FSHORT}
+ FLONG = ULONG;
+ {$EXTERNALSYM FLONG}
+
+// Component Object Model defines, and macros
+
+ HRESULT = System.HRESULT; // LONG;
+ {$EXTERNALSYM HRESULT}
+
+//
+// Low order two bits of a handle are ignored by the system and available
+// for use by application code as tag bits. The remaining bits are opaque
+// and used to store a serial number and table index.
+//
+
+const
+ OBJ_HANDLE_TAGBITS = $00000003;
+ {$EXTERNALSYM OBJ_HANDLE_TAGBITS}
+
+//
+// Cardinal Data Types [0 - 2**N-2)
+//
+
+type
+ CCHAR = Char;
+ {$EXTERNALSYM CCHAR}
+ CSHORT = Shortint;
+ {$EXTERNALSYM CSHORT}
+ CLONG = ULONG;
+ {$EXTERNALSYM CLONG}
+
+ PCCHAR = ^CCHAR;
+ {$EXTERNALSYM PCCHAR}
+ PCSHORT = ^CSHORT;
+ {$EXTERNALSYM PCSHORT}
+ PCLONG = ^CLONG;
+ {$EXTERNALSYM PCLONG}
+
+//
+// NLS basics (Locale and Language Ids)
+//
+
+ LCID = {$IFDEF USE_DELPHI_TYPES} Windows.LCID {$ELSE} DWORD {$ENDIF};
+ {$EXTERNALSYM LCID}
+ PLCID = ^LCID;
+ {$EXTERNALSYM PLCID}
+ LANGID = {$IFDEF USE_DELPHI_TYPES} Windows.LANGID {$ELSE} Word {$ENDIF};
+ {$EXTERNALSYM LANGID}
+ PLANGID = ^LANGID; // TODO Not in original header (used in MSI)
+
+//
+// Logical Data Type - These are 32-bit logical values.
+//
+
+ LOGICAL = ULONG;
+ {$EXTERNALSYM LOGICAL}
+ PLOGICAL = ^ULONG;
+ {$EXTERNALSYM PLOGICAL}
+
+//
+// NTSTATUS
+//
+
+ NTSTATUS = LONG;
+ {$EXTERNALSYM NTSTATUS}
+ PNTSTATUS = ^NTSTATUS;
+ {$EXTERNALSYM PNTSTATUS}
+ TNTStatus = NTSTATUS;
+
+//
+// Status values are 32 bit values layed out as follows:
+//
+// 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1
+// 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
+// +---+-+-------------------------+-------------------------------+
+// |Sev|C| Facility | Code |
+// +---+-+-------------------------+-------------------------------+
+//
+// where
+//
+// Sev - is the severity code
+//
+// 00 - Success
+// 01 - Informational
+// 10 - Warning
+// 11 - Error
+//
+// C - is the Customer code flag
+//
+// Facility - is the facility code
+//
+// Code - is the facility's status code
+//
+
+//
+// Generic test for success on any status value (non-negative numbers
+// indicate success).
+//
+
+function NT_SUCCESS(Status: NTSTATUS): BOOL;
+{$EXTERNALSYM NT_SUCCESS}
+
+//
+// Generic test for information on any status value.
+//
+
+function NT_INFORMATION(Status: NTSTATUS): BOOL;
+{$EXTERNALSYM NT_INFORMATION}
+
+//
+// Generic test for warning on any status value.
+//
+
+function NT_WARNING(Status: NTSTATUS): BOOL;
+{$EXTERNALSYM NT_WARNING}
+
+//
+// Generic test for error on any status value.
+//
+
+function NT_ERROR(Status: NTSTATUS): BOOL;
+{$EXTERNALSYM NT_ERROR}
+
+const
+ APPLICATION_ERROR_MASK = $20000000;
+ {$EXTERNALSYM APPLICATION_ERROR_MASK}
+ ERROR_SEVERITY_SUCCESS = $00000000;
+ {$EXTERNALSYM ERROR_SEVERITY_SUCCESS}
+ ERROR_SEVERITY_INFORMATIONAL = $40000000;
+ {$EXTERNALSYM ERROR_SEVERITY_INFORMATIONAL}
+ ERROR_SEVERITY_WARNING = DWORD($80000000);
+ {$EXTERNALSYM ERROR_SEVERITY_WARNING}
+ ERROR_SEVERITY_ERROR = DWORD($C0000000);
+ {$EXTERNALSYM ERROR_SEVERITY_ERROR}
+
+//
+// Large (64-bit) integer types and operations
+//
+
+type
+ LPLARGE_INTEGER = ^LARGE_INTEGER;
+ {$EXTERNALSYM LPLARGE_INTEGER}
+
+ {$IFDEF USE_DELPHI_TYPES}
+ _LARGE_INTEGER = Windows._LARGE_INTEGER;
+ LARGE_INTEGER = Windows.LARGE_INTEGER;
+ TLargeInteger = Windows.TLargeInteger;
+ {$ELSE}
+ _LARGE_INTEGER = record
+ case Integer of
+ 0: (
+ LowPart: DWORD;
+ HighPart: LONG);
+ 1: (
+ QuadPart: LONGLONG);
+ end;
+ {$EXTERNALSYM _LARGE_INTEGER}
+ LARGE_INTEGER = _LARGE_INTEGER;
+ {$EXTERNALSYM LARGE_INTEGER}
+ TLargeInteger = LARGE_INTEGER;
+ {$ENDIF USE_DELPHI_TYPES}
+
+ PLARGE_INTEGER = ^LARGE_INTEGER;
+ {$EXTERNALSYM PLARGE_INTEGER}
+ PLargeInteger = LPLARGE_INTEGER;
+
+ LPULARGE_INTEGER = ^ULARGE_INTEGER;
+ {$EXTERNALSYM LPULARGE_INTEGER}
+
+ {$IFDEF USE_DELPHI_TYPES}
+ ULARGE_INTEGER = Windows.ULARGE_INTEGER;
+ TULargeInteger = Windows.TULargeInteger;
+ PULargeInteger = Windows.PULargeInteger;
+ {$ELSE}
+ ULARGE_INTEGER = record
+ case Integer of
+ 0: (
+ LowPart: DWORD;
+ HighPart: DWORD);
+ 1: (
+ QuadPart: LONGLONG);
+ end;
+ {$EXTERNALSYM ULARGE_INTEGER}
+ TULargeInteger = ULARGE_INTEGER;
+ PULargeInteger = LPULARGE_INTEGER;
+ {$ENDIF USE_DELPHI_TYPES}
+
+ PULARGE_INTEGER = ^ULARGE_INTEGER;
+ {$EXTERNALSYM PULARGE_INTEGER}
+
+ TIME = LARGE_INTEGER;
+ {$EXTERNALSYM TIME}
+ _TIME = _LARGE_INTEGER;
+ {$EXTERNALSYM _TIME}
+ PTIME = PLARGE_INTEGER;
+ {$EXTERNALSYM PTIME}
+
+//
+// _M_IX86 included so that EM CONTEXT structure compiles with
+// x86 programs. *** TBD should this be for all architectures?
+//
+
+//
+// 16 byte aligned type for 128 bit floats
+//
+
+//
+// For we define a 128 bit structure and use __declspec(align(16)) pragma to
+// align to 128 bits.
+//
+
+type
+ PFloat128 = ^TFloat128;
+ _FLOAT128 = record
+ LowPart: Int64;
+ HighPart: Int64;
+ end;
+ {$EXTERNALSYM _FLOAT128}
+ FLOAT128 = _FLOAT128;
+ {$EXTERNALSYM FLOAT128}
+ TFloat128 = FLOAT128;
+
+// Update Sequence Number
+
+ USN = LONGLONG;
+ {$EXTERNALSYM USN}
+
+//
+// Locally Unique Identifier
+//
+
+type
+ PLuid = ^LUID;
+ _LUID = record
+ LowPart: DWORD;
+ HighPart: LONG;
+ end;
+ {$EXTERNALSYM _LUID}
+ LUID = _LUID;
+ {$EXTERNALSYM LUID}
+ TLuid = LUID;
+
+ DWORDLONG = ULONGLONG;
+ {$EXTERNALSYM DWORDLONG}
+ PDWORDLONG = ^DWORDLONG;
+ {$EXTERNALSYM PDWORDLONG}
+
+//
+// Physical address.
+//
+
+ PHYSICAL_ADDRESS = LARGE_INTEGER;
+ {$EXTERNALSYM PHYSICAL_ADDRESS}
+ PPHYSICAL_ADDRESS = ^LARGE_INTEGER;
+ {$EXTERNALSYM PPHYSICAL_ADDRESS}
+
+//
+// Define operations to logically shift an int64 by 0..31 bits and to multiply
+// 32-bits by 32-bits to form a 64-bit product.
+//
+
+//
+// The x86 C compiler understands inline assembler. Therefore, inline functions
+// that employ inline assembler are used for shifts of 0..31. The multiplies
+// rely on the compiler recognizing the cast of the multiplicand to int64 to
+// generate the optimal code inline.
+//
+
+function Int32x32To64(a, b: LONG): LONGLONG;
+{$EXTERNALSYM Int32x32To64}
+function UInt32x32To64(a, b: DWORD): ULONGLONG;
+{$EXTERNALSYM UInt32x32To64}
+
+function Int64ShllMod32(Value: ULONGLONG; ShiftCount: DWORD): ULONGLONG;
+
+{$EXTERNALSYM Int64ShllMod32}
+function Int64ShraMod32(Value: LONGLONG; ShiftCount: DWORD): LONGLONG;
+{$EXTERNALSYM Int64ShraMod32}
+function Int64ShrlMod32(Value: ULONGLONG; ShiftCount: DWORD): ULONGLONG;
+{$EXTERNALSYM Int64ShrlMod32}
+
+//
+// Event type
+//
+
+type
+ _EVENT_TYPE = (NotificationEvent, SynchronizationEvent);
+ {$EXTERNALSYM _EVENT_TYPE}
+ EVENT_TYPE = _EVENT_TYPE;
+ {$EXTERNALSYM EVENT_TYPE}
+ TEventType = _EVENT_TYPE;
+
+//
+// Timer type
+//
+
+ _TIMER_TYPE = (NotificationTimer, SynchronizationTimer);
+ {$EXTERNALSYM _TIMER_TYPE}
+ TIMER_TYPE = _TIMER_TYPE;
+ {$EXTERNALSYM TIMER_TYPE}
+
+//
+// Wait type
+//
+
+ _WAIT_TYPE = (WaitAll, WaitAny);
+ {$EXTERNALSYM _WAIT_TYPE}
+ WAIT_TYPE = _WAIT_TYPE;
+ {$EXTERNALSYM WAIT_TYPE}
+
+//
+// Pointer to an Asciiz string
+//
+
+ PSZ = ^CHAR;
+ {$EXTERNALSYM PSZ}
+ PCSZ = ^CHAR;
+ {$EXTERNALSYM PCSZ}
+
+//
+// Counted String
+//
+
+ PString = ^TString;
+ _STRING = record
+ Length: USHORT;
+ MaximumLength: USHORT;
+ Buffer: PCHAR;
+ end;
+ {$EXTERNALSYM _STRING}
+ TString = _STRING;
+
+ ANSI_STRING = _STRING;
+ {$EXTERNALSYM ANSI_STRING}
+ PANSI_STRING = PSTRING;
+ {$EXTERNALSYM PANSI_STRING}
+
+ OEM_STRING = _STRING;
+ {$EXTERNALSYM OEM_STRING}
+ POEM_STRING = PSTRING;
+ {$EXTERNALSYM POEM_STRING}
+
+//
+// CONSTCounted String
+//
+
+ PCString = ^CSTRING;
+ _CSTRING = record
+ Length: USHORT;
+ MaximumLength: USHORT;
+ Buffer: PCHAR;
+ end;
+ {$EXTERNALSYM _CSTRING}
+ CSTRING = _CSTRING;
+ {$EXTERNALSYM CSTRING}
+ TCString = CSTRING;
+
+const
+ ANSI_NULL = CHAR(0);
+ {$EXTERNALSYM ANSI_NULL}
+ UNICODE_NULL = WCHAR(0);
+ {$EXTERNALSYM UNICODE_NULL}
+ UNICODE_STRING_MAX_BYTES = WORD(65534);
+ {$EXTERNALSYM UNICODE_STRING_MAX_BYTES}
+ UNICODE_STRING_MAX_CHARS = 32767;
+ {$EXTERNALSYM UNICODE_STRING_MAX_CHARS}
+
+type
+ CANSI_STRING = _STRING;
+ {$EXTERNALSYM CANSI_STRING}
+ PCANSI_STRING = PSTRING;
+ {$EXTERNALSYM PCANSI_STRING}
+
+//
+// Unicode strings are counted 16-bit character strings. If they are
+// NULL terminated, Length does not include trailing NULL.
+//
+
+type
+ PUNICODE_STRING = ^UNICODE_STRING;
+ {$EXTERNALSYM PUNICODE_STRING}
+ _UNICODE_STRING = record
+ Length: USHORT;
+ MaximumLength: USHORT;
+ Buffer: PWSTR;
+ end;
+ {$EXTERNALSYM _UNICODE_STRING}
+ UNICODE_STRING = _UNICODE_STRING;
+ {$EXTERNALSYM UNICODE_STRING}
+ PCUNICODE_STRING = ^UNICODE_STRING;
+ {$EXTERNALSYM PCUNICODE_STRING}
+ TUnicodeString = UNICODE_STRING;
+ PUnicodeString = PUNICODE_STRING;
+
+//
+// Boolean
+//
+
+type
+//typedef UCHAR BOOLEAN;
+ PBOOLEAN = ^ByteBool;
+ {$EXTERNALSYM PBOOLEAN}
+
+//
+// Doubly linked list structure. Can be used as either a list head, or
+// as link words.
+//
+
+type
+ PLIST_ENTRY = ^LIST_ENTRY;
+ {$EXTERNALSYM PLIST_ENTRY}
+
+ {$IFDEF USE_DELPHI_TYPES}
+ _LIST_ENTRY = Windows._LIST_ENTRY;
+ LIST_ENTRY = Windows.LIST_ENTRY;
+ TListEntry = Windows.TListEntry;
+ PListEntry = Windows.PListEntry;
+ {$ELSE}
+ _LIST_ENTRY = record
+ Flink: PLIST_ENTRY;
+ Blink: PLIST_ENTRY;
+ end;
+ {$EXTERNALSYM _LIST_ENTRY}
+ LIST_ENTRY = _LIST_ENTRY;
+ {$EXTERNALSYM LIST_ENTRY}
+ TListEntry = LIST_ENTRY;
+ PListEntry = PLIST_ENTRY;
+ {$ENDIF USE_DELPHI_TYPES}
+
+ PRLIST_ENTRY = ^LIST_ENTRY;
+ {$EXTERNALSYM PLIST_ENTRY}
+
+//
+// Singly linked list structure. Can be used as either a list head, or
+// as link words.
+//
+
+ PSINGLE_LIST_ENTRY = ^SINGLE_LIST_ENTRY;
+ {$EXTERNALSYM PSINGLE_LIST_ENTRY}
+ _SINGLE_LIST_ENTRY = record
+ Next: PSINGLE_LIST_ENTRY;
+ end;
+ {$EXTERNALSYM _SINGLE_LIST_ENTRY}
+ SINGLE_LIST_ENTRY = _SINGLE_LIST_ENTRY;
+ {$EXTERNALSYM SINGLE_LIST_ENTRY}
+ TSingleListEntry = SINGLE_LIST_ENTRY;
+ PSingleListEntry = PSINGLE_LIST_ENTRY;
+
+//
+// These are needed for portable debugger support.
+//
+
+ PLIST_ENTRY32 = ^LIST_ENTRY32;
+ {$EXTERNALSYM PLIST_ENTRY32}
+ {$EXTERNALSYM PLIST_ENTRY32}
+ LIST_ENTRY32 = record
+ Flink: DWORD;
+ Blink: DWORD;
+ end;
+ {$EXTERNALSYM LIST_ENTRY32}
+ TListEntry32 = LIST_ENTRY32;
+ PListEntry32 = PLIST_ENTRY32;
+
+ PLIST_ENTRY64 = ^LIST_ENTRY64;
+ {$EXTERNALSYM PLIST_ENTRY64}
+ LIST_ENTRY64 = record
+ Flink: ULONGLONG;
+ Blink: ULONGLONG;
+ end;
+ {$EXTERNALSYM LIST_ENTRY64}
+ TListEntry64 = LIST_ENTRY64;
+ PListEntry64 = PLIST_ENTRY64;
+
+procedure ListEntry32To64(l32: PLIST_ENTRY32; l64: PLIST_ENTRY64);
+{$EXTERNALSYM ListEntry32To64}
+
+procedure ListEntry64To32(l64: PLIST_ENTRY64; l32: PLIST_ENTRY32);
+{$EXTERNALSYM ListEntry64To32}
+
+//
+// These macros are used to walk lists on a target system
+//
+
+{
+#define CONTAINING_RECORD32(address, type, field) ( \
+ (ULONG_PTR)(address) - \
+ (ULONG_PTR)(&((type *)0)->field))
+
+#define CONTAINING_RECORD64(address, type, field) ( \
+ (ULONGLONG)(address) - \
+ (ULONGLONG)(&((type *)0)->field))
+}
+
+type
+ PString32 = ^STRING32;
+ _STRING32 = record
+ Length: USHORT;
+ MaximumLength: USHORT;
+ Buffer: ULONG;
+ end;
+ {$EXTERNALSYM _STRING32}
+ STRING32 = _STRING32;
+ {$EXTERNALSYM STRING32}
+ TString32 = STRING32;
+
+ UNICODE_STRING32 = STRING32;
+ {$EXTERNALSYM UNICODE_STRING32}
+ PUNICODE_STRING32 = ^UNICODE_STRING32;
+ {$EXTERNALSYM PUNICODE_STRING32}
+
+ ANSI_STRING32 = STRING32;
+ {$EXTERNALSYM ANSI_STRING32}
+ PANSI_STRING32 = ^ANSI_STRING32;
+ {$EXTERNALSYM PANSI_STRING32}
+
+ PString64 = ^STRING64;
+ _STRING64 = record
+ Length: USHORT;
+ MaximumLength: USHORT;
+ Buffer: ULONGLONG;
+ end;
+ {$EXTERNALSYM _STRING64}
+ STRING64 = _STRING64;
+ {$EXTERNALSYM STRING64}
+ TString64 = STRING64;
+
+ UNICODE_STRING64 = STRING64;
+ {$EXTERNALSYM UNICODE_STRING64}
+ PUNICODE_STRING64 = ^UNICODE_STRING64;
+ {$EXTERNALSYM PUNICODE_STRING64}
+
+ ANSI_STRING64 = STRING64;
+ {$EXTERNALSYM ANSI_STRING64}
+ PANSI_STRING64 = ^ANSI_STRING64;
+ {$EXTERNALSYM PANSI_STRING64}
+
+//
+// Valid values for the Attributes field
+//
+
+const
+ OBJ_INHERIT = $00000002;
+ {$EXTERNALSYM OBJ_INHERIT}
+ OBJ_PERMANENT = $00000010;
+ {$EXTERNALSYM OBJ_PERMANENT}
+ OBJ_EXCLUSIVE = $00000020;
+ {$EXTERNALSYM OBJ_EXCLUSIVE}
+ OBJ_CASE_INSENSITIVE = $00000040;
+ {$EXTERNALSYM OBJ_CASE_INSENSITIVE}
+ OBJ_OPENIF = $00000080;
+ {$EXTERNALSYM OBJ_OPENIF}
+ OBJ_OPENLINK = $00000100;
+ {$EXTERNALSYM OBJ_OPENLINK}
+ OBJ_KERNEL_HANDLE = $00000200;
+ {$EXTERNALSYM OBJ_KERNEL_HANDLE}
+ OBJ_VALID_ATTRIBUTES = $000003F2;
+ {$EXTERNALSYM OBJ_VALID_ATTRIBUTES}
+
+//
+// Object Attributes structure
+//
+
+type
+ POBJECT_ATTRIBUTES = ^OBJECT_ATTRIBUTES;
+ {$EXTERNALSYM POBJECT_ATTRIBUTES}
+ _OBJECT_ATTRIBUTES = record
+ Length: ULONG;
+ RootDirectory: HANDLE;
+ ObjectName: PUNICODE_STRING;
+ Attributes: ULONG;
+ SecurityDescriptor: PVOID; // Points to type SECURITY_DESCRIPTOR
+ SecurityQualityOfService: PVOID; // Points to type SECURITY_QUALITY_OF_SERVICE
+ end;
+ {$EXTERNALSYM _OBJECT_ATTRIBUTES}
+ OBJECT_ATTRIBUTES = _OBJECT_ATTRIBUTES;
+ {$EXTERNALSYM OBJECT_ATTRIBUTES}
+ TObjectAttributes = OBJECT_ATTRIBUTES;
+ PObjectAttributes = POBJECT_ATTRIBUTES;
+
+procedure InitializeObjectAttributes(p: POBJECT_ATTRIBUTES; n: PUNICODE_STRING;
+ a: ULONG; r: HANDLE; s: PVOID{PSECURITY_DESCRIPTOR});
+{$EXTERNALSYM InitializeObjectAttributes}
+
+//
+// Constants
+//
+
+const
+
+//#define FALSE 0
+//#define TRUE 1
+
+ NULL = 0;
+ {$EXTERNALSYM NULL}
+ NULL64 = 0;
+ {$EXTERNALSYM NULL64}
+
+//#include <guiddef.h>
+
+type
+ PObjectId = ^OBJECTID;
+ _OBJECTID = record // size is 20
+ Lineage: GUID;
+ Uniquifier: ULONG;
+ end;
+ {$EXTERNALSYM _OBJECTID}
+ OBJECTID = _OBJECTID;
+ {$EXTERNALSYM OBJECTID}
+ TObjectId = OBJECTID;
+
+const
+ MINCHAR = $80;
+ {$EXTERNALSYM MINCHAR}
+ MAXCHAR = $7f;
+ {$EXTERNALSYM MAXCHAR}
+ MINSHORT = $8000;
+ {$EXTERNALSYM MINSHORT}
+ MAXSHORT = $7fff;
+ {$EXTERNALSYM MAXSHORT}
+ MINLONG = DWORD($80000000);
+ {$EXTERNALSYM MINLONG}
+ MAXLONG = $7fffffff;
+ {$EXTERNALSYM MAXLONG}
+ MAXUCHAR = $ff;
+ {$EXTERNALSYM MAXUCHAR}
+ MAXUSHORT = $ffff;
+ {$EXTERNALSYM MAXUSHORT}
+ MAXULONG = DWORD($ffffffff);
+ {$EXTERNALSYM MAXULONG}
+
+//
+// Useful Helper Macros
+//
+
+//
+// Determine if an argument is present by testing the value of the pointer
+// to the argument value.
+//
+
+function ARGUMENT_PRESENT(ArgumentPointer: Pointer): BOOL;
+{$EXTERNALSYM ARGUMENT_PRESENT}
+
+//
+// Exception handler routine definition.
+//
+
+// struct _CONTEXT;
+// struct _EXCEPTION_RECORD;
+
+//type
+// PEXCEPTION_ROUTINE = function(ExceptionRecord: LP_EXCEPTION_RECORD;
+// EstablisherFrame: PVOID; ContextRecord: LPCONTEXT;
+// DispatcherContext: PVOID): EXCEPTION_DISPOSITION; stdcall;
+// {$EXTERNALSYM PEXCEPTION_ROUTINE}
+
+//
+// Interrupt Request Level (IRQL)
+//
+
+type
+ KIRQL = UCHAR;
+ {$EXTERNALSYM KIRQL}
+ PKIRQL = ^KIRQL;
+ {$EXTERNALSYM PKIRQL}
+
+//
+// Product types
+//
+
+ _NT_PRODUCT_TYPE = (Filler0, NtProductWinNt, NtProductLanManNt, NtProductServer);
+ {$EXTERNALSYM _NT_PRODUCT_TYPE}
+ NT_PRODUCT_TYPE = _NT_PRODUCT_TYPE;
+ {$EXTERNALSYM NT_PRODUCT_TYPE}
+ PNT_PRODUCT_TYPE = ^NT_PRODUCT_TYPE;
+ TNtProductType = _NT_PRODUCT_TYPE;
+
+//
+// the bit mask, SharedUserData->SuiteMask, is a ULONG
+// so there can be a maximum of 32 entries
+// in this enum.
+//
+
+type
+ _SUITE_TYPE = (
+ SmallBusiness,
+ Enterprise,
+ BackOffice,
+ CommunicationServer,
+ TerminalServer,
+ SmallBusinessRestricted,
+ EmbeddedNT,
+ DataCenter,
+ SingleUserTS,
+ MaxSuiteType);
+ {$EXTERNALSYM _SUITE_TYPE}
+ SUITE_TYPE = _SUITE_TYPE;
+ {$EXTERNALSYM SUITE_TYPE}
+ TSuiteType = SUITE_TYPE;
+
+const
+ VER_SERVER_NT = DWORD($80000000);
+ {$EXTERNALSYM VER_SERVER_NT}
+ VER_WORKSTATION_NT = $40000000;
+ {$EXTERNALSYM VER_WORKSTATION_NT}
+ VER_SUITE_SMALLBUSINESS = $00000001;
+ {$EXTERNALSYM VER_SUITE_SMALLBUSINESS}
+ VER_SUITE_ENTERPRISE = $00000002;
+ {$EXTERNALSYM VER_SUITE_ENTERPRISE}
+ VER_SUITE_BACKOFFICE = $00000004;
+ {$EXTERNALSYM VER_SUITE_BACKOFFICE}
+ VER_SUITE_COMMUNICATIONS = $00000008;
+ {$EXTERNALSYM VER_SUITE_COMMUNICATIONS}
+ VER_SUITE_TERMINAL = $00000010;
+ {$EXTERNALSYM VER_SUITE_TERMINAL}
+ VER_SUITE_SMALLBUSINESS_RESTRICTED = $00000020;
+ {$EXTERNALSYM VER_SUITE_SMALLBUSINESS_RESTRICTED}
+ VER_SUITE_EMBEDDEDNT = $00000040;
+ {$EXTERNALSYM VER_SUITE_EMBEDDEDNT}
+ VER_SUITE_DATACENTER = $00000080;
+ {$EXTERNALSYM VER_SUITE_DATACENTER}
+ VER_SUITE_SINGLEUSERTS = $00000100;
+ {$EXTERNALSYM VER_SUITE_SINGLEUSERTS}
+ VER_SUITE_PERSONAL = $00000200;
+ {$EXTERNALSYM VER_SUITE_PERSONAL}
+ VER_SUITE_BLADE = $00000400;
+ {$EXTERNALSYM VER_SUITE_BLADE}
+
+// ntdef.h
+
+type
+ error_status_t = Longword;
+ {$EXTERNALSYM error_status_t}
+ wchar_t = Word;
+ {$EXTERNALSYM wchar_t}
+
+//
+// The following types are guaranteed to be signed and 32 bits wide.
+//
+
+type
+ INT_PTR = Integer;
+ {$EXTERNALSYM INT_PTR}
+ PINT_PTR = ^INT_PTR;
+ {$EXTERNALSYM PINT_PTR}
+ UINT_PTR = Longword;
+ {$EXTERNALSYM UINT_PTR}
+ PUINT_PTR = ^UINT_PTR;
+ {$EXTERNALSYM PUINT_PTR}
+ LONG_PTR = Longint;
+ {$EXTERNALSYM LONG_PTR}
+ PLONG_PTR = ^LONG_PTR;
+ {$EXTERNALSYM PLONG_PTR}
+ ULONG_PTR = Longword;
+ {$EXTERNALSYM ULONG_PTR}
+ PULONG_PTR = ^ULONG_PTR;
+ {$EXTERNALSYM PULONG_PTR}
+
+ LONG32 = Integer;
+ {$EXTERNALSYM LONG32}
+ PLONG32 = ^LONG32;
+ {$EXTERNALSYM PLONG32}
+ INT32 = Integer;
+ {$EXTERNALSYM INT32}
+ PINT32 = ^INT32;
+ {$EXTERNALSYM PINT32}
+
+//
+// The following types are guaranteed to be unsigned and 32 bits wide.
+//
+
+ ULONG32 = Longword;
+ {$EXTERNALSYM ULONG32}
+ PULONG32 = ^ULONG32;
+ {$EXTERNALSYM PULONG32}
+ DWORD32 = Longword;
+ {$EXTERNALSYM DWORD32}
+ PDWORD32 = ^DWORD32;
+ {$EXTERNALSYM PDWORD32}
+ UINT32 = Longword;
+ {$EXTERNALSYM UINT32}
+ PUINT32 = ^UINT32;
+ {$EXTERNALSYM PUINT32}
+
+const
+ MAX_PATH = 260;
+ {$EXTERNALSYM MAX_PATH}
+
+type
+
+//unsigned char BYTE;
+//unsigned short WORD;
+
+ FLOAT = Single;
+ {$EXTERNALSYM FLOAT}
+ PFLOAT = ^FLOAT;
+ {$EXTERNALSYM PFLOAT}
+ PBOOL = {$IFDEF USE_DELPHI_TYPES} Windows.PBOOL {$ELSE} ^BOOL {$ENDIF};
+ {$EXTERNALSYM PBOOL}
+ LPBOOL = {$IFDEF USE_DELPHI_TYPES} Windows.PBOOL {$ELSE} ^BOOL {$ENDIF};
+ {$EXTERNALSYM LPBOOL}
+ PBYTE = {$IFDEF USE_DELPHI_TYPES} Windows.PBYTE {$ELSE} ^Byte {$ENDIF};
+ {$EXTERNALSYM PBYTE}
+ LPBYTE = {$IFDEF USE_DELPHI_TYPES} Windows.PBYTE {$ELSE} ^Byte {$ENDIF};
+ {$EXTERNALSYM LPBYTE}
+ PINT = {$IFDEF USE_DELPHI_TYPES} Windows.PINT {$ELSE} ^INT {$ENDIF};
+ {$EXTERNALSYM PINT}
+ PUINT = {$IFDEF USE_DELPHI_TYPES} Windows.PUINT {$ELSE} ^UINT {$ENDIF};
+ {$EXTERNALSYM PUINT}
+ LPUINT = {$IFDEF USE_DELPHI_TYPES} Windows.PUINT {$ELSE} ^UINT {$ENDIF};
+ {$EXTERNALSYM LPUINT}
+ LPINT = {$IFDEF USE_DELPHI_TYPES} Windows.PINT {$ELSE} ^INT {$ENDIF};
+ {$EXTERNALSYM LPINT}
+ PWORD = {$IFDEF USE_DELPHI_TYPES} Windows.PWORD {$ELSE} ^WORD {$ENDIF};
+ {$EXTERNALSYM PWORD}
+ LPWORD = {$IFDEF USE_DELPHI_TYPES} Windows.PWORD {$ELSE} ^WORD {$ENDIF};
+ {$EXTERNALSYM LPWORD}
+ LPLONG = ^LONG;
+ {$EXTERNALSYM LPLONG}
+ PDWORD = {$IFDEF USE_DELPHI_TYPES} Windows.PDWORD {$ELSE} ^DWORD {$ENDIF};
+ {$EXTERNALSYM PDWORD}
+ LPDWORD = {$IFDEF USE_DELPHI_TYPES} Windows.LPDWORD {$ELSE} ^DWORD {$ENDIF};
+ {$EXTERNALSYM LPDWORD}
+ LPVOID = Pointer;
+ {$EXTERNALSYM LPVOID}
+ LPCVOID = Pointer;
+ {$EXTERNALSYM LPCVOID}
+ LPLPVOID = ^LPVOID;
+ {$NODEFINE LPVOID}
+
+ INT = Integer;
+ {$EXTERNALSYM INT}
+ UINT = {$IFDEF USE_DELPHI_TYPES} Windows.UINT {$ELSE} Longword {$ENDIF};
+ {$EXTERNALSYM UINT}
+
+// Types use for passing & returning polymorphic values
+
+ WPARAM = {$IFDEF USE_DELPHI_TYPES} Windows.WPARAM {$ELSE} UINT_PTR {$ENDIF};
+ {$EXTERNALSYM WPARAM}
+ LPARAM = {$IFDEF USE_DELPHI_TYPES} Windows.LPARAM {$ELSE} LONG_PTR {$ENDIF};
+ {$EXTERNALSYM LPARAM}
+ LRESULT = {$IFDEF USE_DELPHI_TYPES} Windows.LRESULT {$ELSE} LONG_PTR {$ENDIF};
+ {$EXTERNALSYM LRESULT}
+
+function MAKEWORD(a, b: BYTE): WORD;
+{$EXTERNALSYM MAKEWORD}
+function MAKELONG(a, b: WORD): DWORD;
+{$EXTERNALSYM MAKELONG}
+
+function LOWORD(L: DWORD): WORD;
+{$EXTERNALSYM LOWORD}
+function HIWORD(L: DWORD): WORD;
+{$EXTERNALSYM HIWORD}
+function LOBYTE(W: WORD): BYTE;
+{$EXTERNALSYM LOBYTE}
+function HIBYTE(W: WORD): BYTE;
+{$EXTERNALSYM HIBYTE}
+
+type
+ HWND = {$IFDEF USE_DELPHI_TYPES} Windows.HWND {$ELSE} HANDLE {$ENDIF};
+ {$EXTERNALSYM HWND}
+ LPHWND = ^HWND;
+ {$EXTERNALSYM LPHWND}
+ HHOOK = {$IFDEF USE_DELPHI_TYPES} Windows.HHOOK {$ELSE} HANDLE {$ENDIF};
+ {$EXTERNALSYM HHOOK}
+ LPHHOOK = ^HHOOK;
+ {$EXTERNALSYM LPHHOOK}
+ HEVENT = HANDLE;
+ {$EXTERNALSYM HEVENT}
+
+ ATOM = {$IFDEF USE_DELPHI_TYPES} Windows.ATOM {$ELSE} WORD {$ENDIF};
+ {$EXTERNALSYM ATOM}
+
+ SPHANDLE = ^HANDLE;
+ {$EXTERNALSYM SPHANDLE}
+ LPHANDLE = ^HANDLE;
+ {$EXTERNALSYM LPHANDLE}
+ HGLOBAL = {$IFDEF USE_DELPHI_TYPES} Windows.HGLOBAL {$ELSE} HANDLE {$ENDIF};
+ {$EXTERNALSYM HGLOBAL}
+ HLOCAL = {$IFDEF USE_DELPHI_TYPES} Windows.HLOCAL {$ELSE} HANDLE {$ENDIF};
+ {$EXTERNALSYM HLOCAL}
+ GLOBALHANDLE = HANDLE;
+ {$EXTERNALSYM GLOBALHANDLE}
+ //LOCALHANDLE = HANDLE; // todo clashes with WinBase.LocalHandle function
+ //{$EXTERNALSYM LOCALHANDLE}
+ FARPROC = {$IFDEF USE_DELPHI_TYPES} Windows.FARPROC {$ELSE} function: Integer; stdcall {$ENDIF};
+ {$EXTERNALSYM FARPROC}
+ NEARPROC = function: Integer; stdcall;
+ {$EXTERNALSYM NEARPROC}
+ PROC = function: Integer; stdcall;
+ {$EXTERNALSYM PROC}
+
+ HGDIOBJ = {$IFDEF USE_DELPHI_TYPES} Windows.HGDIOBJ {$ELSE} HANDLE {$ENDIF};
+ {$EXTERNALSYM HGDIOBJ}
+
+ HKEY = {$IFDEF USE_DELPHI_TYPES} Windows.HKEY {$ELSE} HANDLE {$ENDIF};
+ {$EXTERNALSYM HKEY}
+ PHKEY = {$IFDEF USE_DELPHI_TYPES} Windows.PHKEY {$ELSE} ^HKEY {$ENDIF};
+ {$EXTERNALSYM PHKEY}
+
+ HACCEL = {$IFDEF USE_DELPHI_TYPES} Windows.HACCEL {$ELSE} HANDLE {$ENDIF};
+ {$EXTERNALSYM HACCEL}
+
+ HBITMAP = {$IFDEF USE_DELPHI_TYPES} Windows.HBITMAP {$ELSE} HANDLE {$ENDIF};
+ {$EXTERNALSYM HBITMAP}
+ HBRUSH = {$IFDEF USE_DELPHI_TYPES} Windows.HBRUSH {$ELSE} HANDLE {$ENDIF};
+ {$EXTERNALSYM HBRUSH}
+
+ HCOLORSPACE = {$IFDEF USE_DELPHI_TYPES} Windows.HCOLORSPACE {$ELSE} HANDLE {$ENDIF};
+ {$EXTERNALSYM HCOLORSPACE}
+
+ HDC = {$IFDEF USE_DELPHI_TYPES} Windows.HDC {$ELSE} HANDLE {$ENDIF};
+ {$EXTERNALSYM HDC}
+ HGLRC = {$IFDEF USE_DELPHI_TYPES} Windows.HGLRC {$ELSE} HANDLE {$ENDIF};
+ {$EXTERNALSYM HGLRC}
+ HDESK = {$IFDEF USE_DELPHI_TYPES} Windows.HDESK {$ELSE} HANDLE {$ENDIF};
+ {$EXTERNALSYM HDESK}
+ HENHMETAFILE = {$IFDEF USE_DELPHI_TYPES} Windows.HENHMETAFILE {$ELSE} HANDLE {$ENDIF};
+ {$EXTERNALSYM HENHMETAFILE}
+ HFONT = {$IFDEF USE_DELPHI_TYPES} Windows.HFONT {$ELSE} HANDLE {$ENDIF};
+ {$EXTERNALSYM HFONT}
+ HICON = {$IFDEF USE_DELPHI_TYPES} Windows.HICON {$ELSE} HANDLE {$ENDIF};
+ {$EXTERNALSYM HICON}
+ HMENU = {$IFDEF USE_DELPHI_TYPES} Windows.HMENU {$ELSE} HANDLE {$ENDIF};
+ {$EXTERNALSYM HMENU}
+ HMETAFILE = {$IFDEF USE_DELPHI_TYPES} Windows.HMETAFILE {$ELSE} HANDLE {$ENDIF};
+ {$EXTERNALSYM HMETAFILE}
+ HINSTANCE = {$IFDEF USE_DELPHI_TYPES} Windows.HINST {$ELSE} HANDLE {$ENDIF};
+ {$EXTERNALSYM HINSTANCE}
+ HMODULE = {$IFDEF USE_DELPHI_TYPES} Windows.HMODULE {$ELSE} HINSTANCE {$ENDIF};
+ {$EXTERNALSYM HMODULE}
+ HPALETTE = {$IFDEF USE_DELPHI_TYPES} Windows.HPALETTE {$ELSE} HANDLE {$ENDIF};
+ {$EXTERNALSYM HPALETTE}
+ HPEN = {$IFDEF USE_DELPHI_TYPES} Windows.HPEN {$ELSE} HANDLE {$ENDIF};
+ {$EXTERNALSYM HPEN}
+ HRGN = {$IFDEF USE_DELPHI_TYPES} Windows.HRGN {$ELSE} HANDLE {$ENDIF};
+ {$EXTERNALSYM HRGN}
+ HRSRC = {$IFDEF USE_DELPHI_TYPES} Windows.HRSRC {$ELSE} HANDLE {$ENDIF};
+ {$EXTERNALSYM HRSRC}
+ HSTR = {$IFDEF USE_DELPHI_TYPES} Windows.HSTR {$ELSE} HANDLE {$ENDIF};
+ {$EXTERNALSYM HSTR}
+ HTASK = {$IFDEF USE_DELPHI_TYPES} Windows.HTASK {$ELSE} HANDLE {$ENDIF};
+ {$EXTERNALSYM HTASK}
+ HWINSTA = {$IFDEF USE_DELPHI_TYPES} Windows.HWINSTA {$ELSE} HANDLE {$ENDIF};
+ {$EXTERNALSYM HWINSTA}
+ HKL = {$IFDEF USE_DELPHI_TYPES} Windows.HKL {$ELSE} HANDLE {$ENDIF};
+ {$EXTERNALSYM HKL}
+ PHKL = {$IFDEF USE_DELPHI_TYPES} ^HKL {$ELSE} ^HANDLE {$ENDIF};
+ {$EXTERNALSYM PHKL}
+
+ HMONITOR = HANDLE;
+ {$EXTERNALSYM HMONITOR}
+ HWINEVENTHOOK = HANDLE;
+ {$EXTERNALSYM HWINEVENTHOOK}
+ HUMPD = HANDLE;
+ {$EXTERNALSYM HUMPD}
+
+ HFILE = {$IFDEF USE_DELPHI_TYPES} Windows.HFILE {$ELSE} Longword {$ENDIF};
+ {$EXTERNALSYM HFILE}
+ HCURSOR = {$IFDEF USE_DELPHI_TYPES} Windows.HCURSOR {$ELSE} HICON {$ENDIF};
+ {$EXTERNALSYM HCURSOR}
+
+ COLORREF = {$IFDEF USE_DELPHI_TYPES} Windows.COLORREF {$ELSE} DWORD {$ENDIF};
+ {$EXTERNALSYM COLORREF}
+ LPCOLORREF = ^COLORREF;
+ {$EXTERNALSYM LPCOLORREF}
+
+ PHMODULE = ^HMODULE;
+ {$NODEFINE PHMODULE}
+
+const
+ HFILE_ERROR = HFILE(-1);
+ {$EXTERNALSYM HFILE_ERROR}
+
+type
+ LPRECT = ^RECT;
+ {$EXTERNALSYM LPRECT}
+ tagRECT = record
+ left: LONG;
+ top: LONG;
+ right: LONG;
+ bottom: LONG;
+ end;
+ {$EXTERNALSYM tagRECT}
+ RECT = {$IFDEF USE_DELPHI_TYPES} Windows.TRect {$ELSE} tagRECT {$ENDIF};
+ {$EXTERNALSYM RECT}
+ NPRECT = ^RECT;
+ {$EXTERNALSYM NPRECT}
+ LPCRECT = ^RECT;
+ {$EXTERNALSYM LPCRECT}
+ TRect = {$IFDEF USE_DELPHI_TYPES} Windows.TRect {$ELSE} RECT {$ENDIF};
+ PRect = {$IFDEF USE_DELPHI_TYPES} Windows.PRect {$ELSE} LPRECT {$ENDIF};
+
+ LPRECTL = ^RECTL;
+ {$EXTERNALSYM LPRECTL}
+ _RECTL = record
+ left: LONG;
+ top: LONG;
+ right: LONG;
+ bottom: LONG;
+ end;
+ {$EXTERNALSYM _RECTL}
+ RECTL = _RECTL;
+ {$EXTERNALSYM RECTL}
+ LPCRECTL = ^_RECTL;
+ {$EXTERNALSYM LPCRECTL}
+ TRectl = RECTL;
+ PRectl = LPRECTL;
+
+ LPPOINT = ^POINT;
+ {$EXTERNALSYM LPPOINT}
+ tagPOINT = record
+ x: LONG;
+ y: LONG;
+ end;
+ {$EXTERNALSYM tagPOINT}
+ NPPOINT = ^tagPoint;
+ {$EXTERNALSYM NPPOINT}
+ POINT = tagPOINT;
+ {$EXTERNALSYM tagPOINT}
+ TPoint = {$IFDEF USE_DELPHI_TYPES} Windows.TPoint {$ELSE} POINT {$ENDIF};
+ PPoint = {$IFDEF USE_DELPHI_TYPES} Windows.PPoint {$ELSE} LPPOINT {$ENDIF};
+
+ PPointl = ^POINTL;
+ _POINTL = record
+ x: LONG;
+ y: LONG;
+ end;
+ {$EXTERNALSYM _POINTL}
+ POINTL = _POINTL;
+ {$EXTERNALSYM POINTL}
+ TPointl = POINTL;
+
+ LPSIZE = ^TSize;
+ {$EXTERNALSYM LPSIZE}
+
+ {$IFDEF USE_DELPHI_TYPES}
+ TSize = Windows.TSize;
+ PSize = Windows.PSize;
+ {$ELSE}
+ tagSIZE = record
+ cx: LONG;
+ cy: LONG;
+ end;
+ {$EXTERNALSYM tagSIZE}
+ TSize = tagSIZE;
+ PSize = LPSIZE;
+ {$ENDIF USE_DELPHI_TYPES}
+
+ SIZE = TSize;
+ {$EXTERNALSYM SIZE}
+ SIZEL = TSize;
+ {$EXTERNALSYM SIZEL}
+ PSIZEL = PSize;
+ {$EXTERNALSYM PSIZEL}
+ LPSIZEL = PSize;
+ {$EXTERNALSYM LPSIZEL}
+
+ LPPOINTS = ^POINTS;
+ {$EXTERNALSYM LPPOINTS}
+ tagPOINTS = record
+ x: SHORT;
+ y: SHORT;
+ end;
+ {$EXTERNALSYM tagPOINTS}
+ POINTS = tagPOINTS;
+ {$EXTERNALSYM POINTS}
+ TPoints = POINTS;
+ PPoints = LPPOINTS;
+
+//
+// File System time stamps are represented with the following structure:
+//
+
+ _FILETIME = record
+ dwLowDateTime: DWORD;
+ dwHighDateTime: DWORD;
+ end;
+ {$EXTERNALSYM _FILETIME}
+ FILETIME = _FILETIME;
+ {$EXTERNALSYM FILETIME}
+ PFILETIME = ^FILETIME;
+ {$EXTERNALSYM PFILETIME}
+ LPFILETIME = PFILETIME;
+ {$EXTERNALSYM LPFILETIME}
+ TFileTime = FILETIME;
+
+// mode selections for the device mode function
+
+const
+ DM_UPDATE = 1;
+ {$EXTERNALSYM DM_UPDATE}
+ DM_COPY = 2;
+ {$EXTERNALSYM DM_COPY}
+ DM_PROMPT = 4;
+ {$EXTERNALSYM DM_PROMPT}
+ DM_MODIFY = 8;
+ {$EXTERNALSYM DM_MODIFY}
+
+ DM_IN_BUFFER = DM_MODIFY;
+ {$EXTERNALSYM DM_IN_BUFFER}
+ DM_IN_PROMPT = DM_PROMPT;
+ {$EXTERNALSYM DM_IN_PROMPT}
+ DM_OUT_BUFFER = DM_COPY;
+ {$EXTERNALSYM DM_OUT_BUFFER}
+ DM_OUT_DEFAULT = DM_UPDATE;
+ {$EXTERNALSYM DM_OUT_DEFAULT}
+
+// device capabilities indices
+
+ DC_FIELDS = 1;
+ {$EXTERNALSYM DC_FIELDS}
+ DC_PAPERS = 2;
+ {$EXTERNALSYM DC_PAPERS}
+ DC_PAPERSIZE = 3;
+ {$EXTERNALSYM DC_PAPERSIZE}
+ DC_MINEXTENT = 4;
+ {$EXTERNALSYM DC_MINEXTENT}
+ DC_MAXEXTENT = 5;
+ {$EXTERNALSYM DC_MAXEXTENT}
+ DC_BINS = 6;
+ {$EXTERNALSYM DC_BINS}
+ DC_DUPLEX = 7;
+ {$EXTERNALSYM DC_DUPLEX}
+ DC_SIZE = 8;
+ {$EXTERNALSYM DC_SIZE}
+ DC_EXTRA = 9;
+ {$EXTERNALSYM DC_EXTRA}
+ DC_VERSION = 10;
+ {$EXTERNALSYM DC_VERSION}
+ DC_DRIVER = 11;
+ {$EXTERNALSYM DC_DRIVER}
+ DC_BINNAMES = 12;
+ {$EXTERNALSYM DC_BINNAMES}
+ DC_ENUMRESOLUTIONS = 13;
+ {$EXTERNALSYM DC_ENUMRESOLUTIONS}
+ DC_FILEDEPENDENCIES = 14;
+ {$EXTERNALSYM DC_FILEDEPENDENCIES}
+ DC_TRUETYPE = 15;
+ {$EXTERNALSYM DC_TRUETYPE}
+ DC_PAPERNAMES = 16;
+ {$EXTERNALSYM DC_PAPERNAMES}
+ DC_ORIENTATION = 17;
+ {$EXTERNALSYM DC_ORIENTATION}
+ DC_COPIES = 18;
+ {$EXTERNALSYM DC_COPIES}
+
+//
+// HALF_PTR is half the size of a pointer it intended for use with
+// within strcuture which contain a pointer and two small fields.
+// UHALF_PTR is the unsigned variation.
+//
+
+const
+ ADDRESS_TAG_BIT = DWORD($80000000);
+ {$EXTERNALSYM ADDRESS_TAG_BIT}
+
+type
+ UHALF_PTR = Byte;
+ {$EXTERNALSYM UHALF_PTR}
+ PUHALF_PTR = ^UHALF_PTR;
+ {$EXTERNALSYM PUHALF_PTR}
+ HALF_PTR = Shortint;
+ {$EXTERNALSYM HALF_PTR}
+ PHALF_PTR = ^HALF_PTR;
+ {$EXTERNALSYM PHALF_PTR}
+
+ SHANDLE_PTR = Longint;
+ {$EXTERNALSYM SHANDLE_PTR}
+ HANDLE_PTR = Longint;
+ {$EXTERNALSYM HANDLE_PTR}
+
+//
+// SIZE_T used for counts or ranges which need to span the range of
+// of a pointer. SSIZE_T is the signed variation.
+//
+
+ SIZE_T = ULONG_PTR;
+ {$EXTERNALSYM SIZE_T}
+ PSIZE_T = ^SIZE_T;
+ {$EXTERNALSYM PSIZE_T}
+ SSIZE_T = LONG_PTR;
+ {$EXTERNALSYM SSIZE_T}
+ PSSIZE_T = ^SSIZE_T;
+ {$EXTERNALSYM PSSIZE_T}
+
+//
+// Add Windows flavor DWORD_PTR types
+//
+
+ DWORD_PTR = ULONG_PTR;
+ {$EXTERNALSYM DWORD_PTR}
+ PDWORD_PTR = ^DWORD_PTR;
+ {$EXTERNALSYM PDWORD_PTR}
+
+//
+// The following types are guaranteed to be signed and 64 bits wide.
+//
+
+ LONG64 = Int64;
+ {$EXTERNALSYM LONG64}
+ PLONG64 = ^LONG64;
+ {$EXTERNALSYM PLONG64}
+
+ PINT64 = ^Int64;
+ {$EXTERNALSYM PINT64}
+
+//
+// The following types are guaranteed to be unsigned and 64 bits wide.
+//
+
+ ULONG64 = Int64;
+ {$EXTERNALSYM ULONG64}
+ PULONG64 = ^ULONG64;
+ {$EXTERNALSYM PULONG64}
+ DWORD64 = Int64;
+ {$EXTERNALSYM DWORD64}
+ PDWORD64 = ^DWORD64;
+ {$EXTERNALSYM PDWORD64}
+ UINT64 = Int64;
+ {$EXTERNALSYM UINT64}
+ PUINT64 = ^UINT64;
+ {$EXTERNALSYM PUINT64}
+
+const
+ MAXUINT_PTR = not UINT_PTR(0);
+ {$EXTERNALSYM MAXUINT_PTR}
+ MAXINT_PTR = INT_PTR((MAXUINT_PTR shr 1));
+ {$EXTERNALSYM MAXINT_PTR}
+ MININT_PTR = not MAXINT_PTR;
+ {$EXTERNALSYM MININT_PTR}
+
+ MAXULONG_PTR = not ULONG_PTR(0);
+ {$EXTERNALSYM MAXULONG_PTR}
+ MAXLONG_PTR = LONG_PTR(MAXULONG_PTR shr 1);
+ {$EXTERNALSYM MAXLONG_PTR}
+ MINLONG_PTR = not MAXLONG_PTR;
+ {$EXTERNALSYM MINLONG_PTR}
+
+ MAXUHALF_PTR = UHALF_PTR( not 0);
+ {$EXTERNALSYM MAXUHALF_PTR}
+ MAXHALF_PTR = HALF_PTR(MAXUHALF_PTR shr 1);
+ {$EXTERNALSYM MAXHALF_PTR}
+ MINHALF_PTR = not MAXHALF_PTR;
+ {$EXTERNALSYM MINHALF_PTR}
+
+// basetsd
+
+type
+ INT8 = Shortint;
+ {$EXTERNALSYM INT8}
+ PINT8 = ^INT8;
+ {$EXTERNALSYM PINT8}
+ INT16 = Smallint;
+ {$EXTERNALSYM INT16}
+ PINT16 = ^INT16;
+ {$EXTERNALSYM PINT16}
+ UINT8 = Byte;
+ {$EXTERNALSYM UINT8}
+ PUINT8 = ^UINT8;
+ {$EXTERNALSYM PUINT8}
+ UINT16 = Word;
+ {$EXTERNALSYM UINT16}
+ PUINT16 = ^UINT16;
+ {$EXTERNALSYM PUINT16}
+
+//
+// Thread affinity.
+//
+
+ KAFFINITY = ULONG_PTR;
+ {$EXTERNALSYM KAFFINITY}
+ PKAFFINITY = ^KAFFINITY;
+ {$EXTERNALSYM PKAFFINITY}
+
+ // (rom) missing types
+ LPCASTR = ^AnsiChar;
+ LPASTR = ^AnsiChar;
+ PCASTR = ^AnsiChar;
+ PASTR = ^AnsiChar;
+
+ PPCWSTR = ^LPCWSTR;
+ PPCASTR = ^LPCASTR;
+ PPCSTR = ^LPCTSTR;
+ PPWSTR = ^LPWSTR;
+ PPASTR = ^LPASTR;
+ PPSTR = ^LPTSTR;
+ PPTCHAR = ^PTCHAR;
+ LPLPCTSTR = ^LPCTSTR;
+
+implementation
+
+uses
+ JwaWinNT;
+
+{$IFNDEF USE_DELPHI_TYPES}
+const
+ kernel32 = 'kernel32.dll';
+{$ENDIF !USE_DELPHI_TYPES}
+
+function Int32x32To64(a, b: LONG): LONGLONG;
+begin
+ Result := a * b;
+end;
+
+function UInt32x32To64(a, b: DWORD): ULONGLONG;
+begin
+ Result := a * b;
+end;
+
+function Int64ShllMod32(Value: ULONGLONG; ShiftCount: DWORD): ULONGLONG;
+asm
+ MOV ECX, ShiftCount
+ MOV EAX, DWORD PTR [Value]
+ MOV EDX, DWORD PTR [Value + 4]
+ SHLD EDX, EAX, CL
+ SHL EAX, CL
+end;
+
+function Int64ShraMod32(Value: LONGLONG; ShiftCount: DWORD): LONGLONG;
+asm
+ MOV ECX, ShiftCount
+ MOV EAX, DWORD PTR [Value]
+ MOV EDX, DWORD PTR [Value + 4]
+ SHRD EAX, EDX, CL
+ SAR EDX, CL
+end;
+
+function Int64ShrlMod32(Value: ULONGLONG; ShiftCount: DWORD): ULONGLONG;
+asm
+ MOV ECX, ShiftCount
+ MOV EAX, DWORD PTR [Value]
+ MOV EDX, DWORD PTR [Value + 4]
+ SHRD EAX, EDX, CL
+ SHR EDX, CL
+end;
+
+procedure ListEntry32To64(l32: PLIST_ENTRY32; l64: PLIST_ENTRY64);
+begin
+ l64^.Flink := l32^.Flink;
+ l64^.Blink := l32^.Blink;
+end;
+
+procedure ListEntry64To32(l64: PLIST_ENTRY64; l32: PLIST_ENTRY32);
+begin
+ l32^.Flink := ULONG(l64^.Flink);
+ l32^.Blink := ULONG(l64^.Blink);
+end;
+
+function NT_SUCCESS(Status: NTSTATUS): BOOL;
+begin
+ Result := Status >= 0;
+end;
+
+function NT_INFORMATION(Status: NTSTATUS): BOOL;
+begin
+ Result := (ULONG(Status) shr 30) = 1;
+end;
+
+function NT_WARNING(Status: NTSTATUS): BOOL;
+begin
+ Result := (ULONG(Status) shr 30) = 2;
+end;
+
+function NT_ERROR(Status: NTSTATUS): BOOL;
+begin
+ Result := (ULONG(Status) shr 30) = 3;
+end;
+
+procedure InitializeObjectAttributes(p: POBJECT_ATTRIBUTES; n: PUNICODE_STRING;
+ a: ULONG; r: HANDLE; s: PVOID{PSECURITY_DESCRIPTOR});
+begin
+ p^.Length := SizeOf(OBJECT_ATTRIBUTES);
+ p^.RootDirectory := r;
+ p^.Attributes := a;
+ p^.ObjectName := n;
+ p^.SecurityDescriptor := s;
+ p^.SecurityQualityOfService := nil;
+end;
+
+function ARGUMENT_PRESENT(ArgumentPointer: Pointer): BOOL;
+begin
+ Result := ArgumentPointer <> nil;
+end;
+
+function MAKEWORD(a, b: BYTE): WORD;
+begin
+ Result := (b shl 8) or a;
+end;
+
+function MAKELONG(a, b: WORD): DWORD;
+begin
+ Result := (b shl 16) or a;
+end;
+
+function LOWORD(L: DWORD): WORD;
+begin
+ Result := L and $0000FFFF;
+end;
+
+function HIWORD(L: DWORD): WORD;
+begin
+ Result := L shr 16;
+end;
+
+function LOBYTE(W: WORD): BYTE;
+begin
+ Result := W and $FF;
+end;
+
+function HIBYTE(W: WORD): BYTE;
+begin
+ Result := W shr 8;
+end;
+
+function GetModuleHandle(lpModuleName: LPCSTR): HMODULE; stdcall; external kernel32 name 'GetModuleHandleA';
+function LoadLibrary(lpLibFileName: LPCSTR): HMODULE; stdcall; external kernel32 name 'LoadLibraryA';
+function GetProcAddress(hModule: HMODULE; lpProcName: LPCSTR): FARPROC; stdcall; external kernel32 name 'GetProcAddress';
+
+resourcestring
+ RsELibraryNotFound = 'Library not found: %s';
+ RsEFunctionNotFound = 'Function not found: %s.%s';
+
+procedure GetProcedureAddress(var P: Pointer; const ModuleName, ProcName: string);
+var
+ ModuleHandle: HMODULE;
+begin
+ if not Assigned(P) then
+ begin
+ ModuleHandle := GetModuleHandle(PChar(ModuleName));
+ if ModuleHandle = 0 then
+ begin
+ ModuleHandle := LoadLibrary(PChar(ModuleName));
+ if ModuleHandle = 0 then
+ raise EJwaLoadLibraryError.CreateResFmt(@RsELibraryNotFound, [ModuleName]);
+ end;
+ P := Pointer(GetProcAddress(ModuleHandle, PChar(ProcName)));
+ if not Assigned(P) then
+ raise EJwaGetProcAddressError.CreateResFmt(@RsEFunctionNotFound, [ModuleName, ProcName]);
+ end;
+end;
+
+end.
diff --git a/packages/extra/winunits/jwawinuser.pas b/packages/extra/winunits/jwawinuser.pas
index 80c53d26b0..e48c9a79c1 100644
--- a/packages/extra/winunits/jwawinuser.pas
+++ b/packages/extra/winunits/jwawinuser.pas
@@ -1,21895 +1,21895 @@
-{******************************************************************************}
-{ }
-{ Windows User API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: winuser.h, released June 2000. The original Pascal }
-{ code is: WinUser.pas, released December 2000. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwawinuser.pas,v 1.1 2005/04/04 07:56:11 marco Exp $
-
-unit JwaWinUser;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "WinUser.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaWinBase, JwaWinGDI, JwaWinNT, JwaWinType;
-
-const
- UINT_MAX = UINT($FFFFFFFF); // from limits.h TODO
- {$EXTERNALSYM UINT_MAX}
-
-type
- HDWP = HANDLE;
- {$EXTERNALSYM HDWP}
-
- MENUTEMPLATEA = Pointer;
- {$EXTERNALSYM MENUTEMPLATEA}
- MENUTEMPLATEW = Pointer;
- {$EXTERNALSYM MENUTEMPLATEW}
-
- {$IFDEF UNICODE}
- MENUTEMPLATE = MENUTEMPLATEW;
- {$EXTERNALSYM MENUTEMPLATE}
- {$ELSE}
- MENUTEMPLATE = MENUTEMPLATEA;
- {$EXTERNALSYM MENUTEMPLATE}
- {$ENDIF UNICODE}
-
- LPMENUTEMPLATEA = PVOID;
- {$EXTERNALSYM LPMENUTEMPLATEA}
- LPMENUTEMPLATEW = PVOID;
- {$EXTERNALSYM LPMENUTEMPLATEW}
- {$IFDEF UNICODE}
- LPMENUTEMPLATE = LPMENUTEMPLATEW;
- {$EXTERNALSYM LPMENUTEMPLATE}
- {$ELSE}
- LPMENUTEMPLATE = LPMENUTEMPLATEA;
- {$EXTERNALSYM LPMENUTEMPLATE}
- {$ENDIF UNICODE}
-
- WNDPROC = function(hWnd: HWND; uMsg: UINT; lParam: WPARAM; wParam: LPARAM): LRESULT;
- {$EXTERNALSYM WNDPROC}
-
- DLGPROC = function(hwndDlg: HWND; wMsg: UINT; wParam: WPARAM; lParam: LPARAM): INT_PTR; stdcall;
- {$EXTERNALSYM DLGPROC}
- TIMERPROC = procedure(hwnd: HWND; uMsg: UINT; idEvent: UINT_PTR; dwTime: DWORD); stdcall;
- {$EXTERNALSYM TIMERPROC}
- GRAYSTRINGPROC = function(hdc: HDC; lpData: LPARAM; cchData: Integer): BOOL; stdcall;
- {$EXTERNALSYM GRAYSTRINGPROC}
- WNDENUMPROC = function(hwnd: HWND; lParam: LPARAM): BOOL; stdcall;
- {$EXTERNALSYM WNDENUMPROC}
- HOOKPROC = function(nCode: Integer; wParam: WPARAM; lParam: LPARAM): LRESULT; stdcall;
- {$EXTERNALSYM HOOKPROC}
- SENDASYNCPROC = procedure(hwnd: HWND; uMsg: UINT; dwData: ULONG_PTR; lResult: LRESULT); stdcall;
- {$EXTERNALSYM SENDASYNCPROC}
-
- PROPENUMPROCA = function(hwnd: HWND; lpszString: LPCSTR; hData: HANDLE): BOOL; stdcall;
- {$EXTERNALSYM PROPENUMPROCA}
- PROPENUMPROCW = function(hwnd: HWND; lpszString: LPCWSTR; hData: HANDLE): BOOL; stdcall;
- {$EXTERNALSYM PROPENUMPROCW}
-
- PROPENUMPROCEXA = function(hwnd: HWND; lpszString: LPSTR; hData: HANDLE; dwData: ULONG_PTR): BOOL; stdcall;
- {$EXTERNALSYM PROPENUMPROCEXA}
- PROPENUMPROCEXW = function(hwnd: HWND; lpszString: LPWSTR; hData: HANDLE; dwData: ULONG_PTR): BOOL; stdcall;
- {$EXTERNALSYM PROPENUMPROCEXW}
-
- EDITWORDBREAKPROCA = function(lpch: LPSTR; ichCurrent: Integer; cch, code: Integer): Integer; stdcall;
- {$EXTERNALSYM EDITWORDBREAKPROCA}
- EDITWORDBREAKPROCW = function(lpch: LPWSTR; ichCurrent: Integer; cch, code: Integer): Integer; stdcall;
- {$EXTERNALSYM EDITWORDBREAKPROCW}
-
- DRAWSTATEPROC = function(hdc: HDC; lData: LPARAM; wData: WPARAM; cx, cy: Integer): BOOL; stdcall;
- {$EXTERNALSYM DRAWSTATEPROC}
-
- {$IFDEF UNICODE}
- PROPENUMPROC = PROPENUMPROCW;
- {$EXTERNALSYM PROPENUMPROC}
- PROPENUMPROCEX = PROPENUMPROCEXW;
- {$EXTERNALSYM PROPENUMPROCEX}
- EDITWORDBREAKPROC = EDITWORDBREAKPROCW;
- {$EXTERNALSYM EDITWORDBREAKPROC}
- {$ELSE}
- PROPENUMPROC = PROPENUMPROCA;
- {$EXTERNALSYM PROPENUMPROC}
- PROPENUMPROCEX = PROPENUMPROCEXA;
- {$EXTERNALSYM PROPENUMPROCEX}
- EDITWORDBREAKPROC = EDITWORDBREAKPROCA;
- {$EXTERNALSYM EDITWORDBREAKPROC}
- {$ENDIF UNICODE}
-
- NAMEENUMPROCA = function(lpstr: LPSTR; lParam: LPARAM): BOOL; stdcall;
- {$EXTERNALSYM NAMEENUMPROCA}
- NAMEENUMPROCW = function(lpstr: LPWSTR; lParam: LPARAM): BOOL; stdcall;
- {$EXTERNALSYM NAMEENUMPROCW}
-
- WINSTAENUMPROCA = NAMEENUMPROCA;
- {$EXTERNALSYM WINSTAENUMPROCA}
- DESKTOPENUMPROCA = NAMEENUMPROCA;
- {$EXTERNALSYM DESKTOPENUMPROCA}
- WINSTAENUMPROCW = NAMEENUMPROCW;
- {$EXTERNALSYM WINSTAENUMPROCW}
- DESKTOPENUMPROCW = NAMEENUMPROCW;
- {$EXTERNALSYM DESKTOPENUMPROCW}
-
- {$IFDEF UNICODE}
- WINSTAENUMPROC = WINSTAENUMPROCW;
- {$EXTERNALSYM WINSTAENUMPROC}
- DESKTOPENUMPROC = DESKTOPENUMPROCW;
- {$EXTERNALSYM DESKTOPENUMPROC}
- {$ELSE}
- WINSTAENUMPROC = WINSTAENUMPROCA;
- {$EXTERNALSYM WINSTAENUMPROC}
- DESKTOPENUMPROC = DESKTOPENUMPROCA;
- {$EXTERNALSYM DESKTOPENUMPROC}
- {$ENDIF UNICODE}
-
-function IS_INTRESOURCE(wInteger: WORD): BOOL;
-{$EXTERNALSYM IS_INTRESOURCE}
-
-type
- MAKEINTRESOURCEA = LPSTR;
- {$EXTERNALSYM MAKEINTRESOURCEA}
- MAKEINTRESOURCEW = LPWSTR;
- {$EXTERNALSYM MAKEINTRESOURCEW}
- {$IFDEF UNICODE}
- MAKEINTRESOURCE = MAKEINTRESOURCEW;
- {$EXTERNALSYM MAKEINTRESOURCE}
- {$ELSE}
- MAKEINTRESOURCE = MAKEINTRESOURCEA;
- {$EXTERNALSYM MAKEINTRESOURCE}
- {$ENDIF UNICODE}
-
-//
-// Predefined Resource Types
-//
-
-const
- RT_CURSOR = MAKEINTRESOURCE(1);
- {$EXTERNALSYM RT_CURSOR}
- RT_BITMAP = MAKEINTRESOURCE(2);
- {$EXTERNALSYM RT_BITMAP}
- RT_ICON = MAKEINTRESOURCE(3);
- {$EXTERNALSYM RT_ICON}
- RT_MENU = MAKEINTRESOURCE(4);
- {$EXTERNALSYM RT_MENU}
- RT_DIALOG = MAKEINTRESOURCE(5);
- {$EXTERNALSYM RT_DIALOG}
- RT_STRING = MAKEINTRESOURCE(6);
- {$EXTERNALSYM RT_STRING}
- RT_FONTDIR = MAKEINTRESOURCE(7);
- {$EXTERNALSYM RT_FONTDIR}
- RT_FONT = MAKEINTRESOURCE(8);
- {$EXTERNALSYM RT_FONT}
- RT_ACCELERATOR = MAKEINTRESOURCE(9);
- {$EXTERNALSYM RT_ACCELERATOR}
- RT_RCDATA = MAKEINTRESOURCE(10);
- {$EXTERNALSYM RT_RCDATA}
- RT_MESSAGETABLE = MAKEINTRESOURCE(11);
- {$EXTERNALSYM RT_MESSAGETABLE}
-
- DIFFERENCE = 11;
- {$EXTERNALSYM DIFFERENCE}
-
- RT_GROUP_CURSOR = MAKEINTRESOURCE(ULONG_PTR(RT_CURSOR) + DIFFERENCE);
- {$EXTERNALSYM RT_GROUP_CURSOR}
- RT_GROUP_ICON = MAKEINTRESOURCE(ULONG_PTR(RT_ICON) + DIFFERENCE);
- {$EXTERNALSYM RT_GROUP_ICON}
- RT_VERSION = MAKEINTRESOURCE(16);
- {$EXTERNALSYM RT_VERSION}
- RT_DLGINCLUDE = MAKEINTRESOURCE(17);
- {$EXTERNALSYM RT_DLGINCLUDE}
- RT_PLUGPLAY = MAKEINTRESOURCE(19);
- {$EXTERNALSYM RT_PLUGPLAY}
- RT_VXD = MAKEINTRESOURCE(20);
- {$EXTERNALSYM RT_VXD}
- RT_ANICURSOR = MAKEINTRESOURCE(21);
- {$EXTERNALSYM RT_ANICURSOR}
- RT_ANIICON = MAKEINTRESOURCE(22);
- {$EXTERNALSYM RT_ANIICON}
- RT_HTML = MAKEINTRESOURCE(23);
- {$EXTERNALSYM RT_HTML}
- RT_MANIFEST = MAKEINTRESOURCE(24);
- CREATEPROCESS_MANIFEST_RESOURCE_ID = MAKEINTRESOURCE(1);
- {$EXTERNALSYM CREATEPROCESS_MANIFEST_RESOURCE_ID}
- ISOLATIONAWARE_MANIFEST_RESOURCE_ID = MAKEINTRESOURCE(2);
- {$EXTERNALSYM ISOLATIONAWARE_MANIFEST_RESOURCE_ID}
- ISOLATIONAWARE_NOSTATICIMPORT_MANIFEST_RESOURCE_ID = MAKEINTRESOURCE(3);
- {$EXTERNALSYM ISOLATIONAWARE_NOSTATICIMPORT_MANIFEST_RESOURCE_ID}
- MINIMUM_RESERVED_MANIFEST_RESOURCE_ID = MAKEINTRESOURCE(1{inclusive});
- {$EXTERNALSYM MINIMUM_RESERVED_MANIFEST_RESOURCE_ID}
- MAXIMUM_RESERVED_MANIFEST_RESOURCE_ID = MAKEINTRESOURCE(16{inclusive});
- {$EXTERNALSYM MAXIMUM_RESERVED_MANIFEST_RESOURCE_ID}
-
-type
- va_list = PChar;
- {$EXTERNALSYM va_list}
-
-function wvsprintfA(Output: LPSTR; Format: LPCSTR; arglist: va_list): Integer; stdcall;
-{$EXTERNALSYM wvsprintfA}
-function wvsprintfW(Output: LPWSTR; Format: LPCWSTR; arglist: va_list): Integer; stdcall;
-{$EXTERNALSYM wvsprintfW}
-function wvsprintf(Output: LPTSTR; Format: LPCTSTR; arglist: va_list): Integer; stdcall;
-{$EXTERNALSYM wvsprintf}
-
-function wsprintfA(Output: LPSTR; Format: LPCSTR): Integer; stdcall;
-{$EXTERNALSYM wsprintfA}
-function wsprintfW(Output: LPWSTR; Format: LPCWSTR): Integer; stdcall;
-{$EXTERNALSYM wsprintfW}
-function wsprintf(Output: LPTSTR; Format: LPCTSTR): Integer; stdcall;
-{$EXTERNALSYM wsprintf}
-
-//
-// SPI_SETDESKWALLPAPER defined constants
-//
-
-const
- SETWALLPAPER_DEFAULT = LPWSTR(-1);
- {$EXTERNALSYM SETWALLPAPER_DEFAULT}
-
-//
-// Scroll Bar Constants
-//
-
- SB_HORZ = 0;
- {$EXTERNALSYM SB_HORZ}
- SB_VERT = 1;
- {$EXTERNALSYM SB_VERT}
- SB_CTL = 2;
- {$EXTERNALSYM SB_CTL}
- SB_BOTH = 3;
- {$EXTERNALSYM SB_BOTH}
-
-//
-// Scroll Bar Commands
-//
-
- SB_LINEUP = 0;
- {$EXTERNALSYM SB_LINEUP}
- SB_LINELEFT = 0;
- {$EXTERNALSYM SB_LINELEFT}
- SB_LINEDOWN = 1;
- {$EXTERNALSYM SB_LINEDOWN}
- SB_LINERIGHT = 1;
- {$EXTERNALSYM SB_LINERIGHT}
- SB_PAGEUP = 2;
- {$EXTERNALSYM SB_PAGEUP}
- SB_PAGELEFT = 2;
- {$EXTERNALSYM SB_PAGELEFT}
- SB_PAGEDOWN = 3;
- {$EXTERNALSYM SB_PAGEDOWN}
- SB_PAGERIGHT = 3;
- {$EXTERNALSYM SB_PAGERIGHT}
- SB_THUMBPOSITION = 4;
- {$EXTERNALSYM SB_THUMBPOSITION}
- SB_THUMBTRACK = 5;
- {$EXTERNALSYM SB_THUMBTRACK}
- SB_TOP = 6;
- {$EXTERNALSYM SB_TOP}
- SB_LEFT = 6;
- {$EXTERNALSYM SB_LEFT}
- SB_BOTTOM = 7;
- {$EXTERNALSYM SB_BOTTOM}
- SB_RIGHT = 7;
- {$EXTERNALSYM SB_RIGHT}
- SB_ENDSCROLL = 8;
- {$EXTERNALSYM SB_ENDSCROLL}
-
-//
-// ShowWindow() Commands
-//
-
- SW_HIDE = 0;
- {$EXTERNALSYM SW_HIDE}
- SW_SHOWNORMAL = 1;
- {$EXTERNALSYM SW_SHOWNORMAL}
- SW_NORMAL = 1;
- {$EXTERNALSYM SW_NORMAL}
- SW_SHOWMINIMIZED = 2;
- {$EXTERNALSYM SW_SHOWMINIMIZED}
- SW_SHOWMAXIMIZED = 3;
- {$EXTERNALSYM SW_SHOWMAXIMIZED}
- SW_MAXIMIZE = 3;
- {$EXTERNALSYM SW_MAXIMIZE}
- SW_SHOWNOACTIVATE = 4;
- {$EXTERNALSYM SW_SHOWNOACTIVATE}
- SW_SHOW = 5;
- {$EXTERNALSYM SW_SHOW}
- SW_MINIMIZE = 6;
- {$EXTERNALSYM SW_MINIMIZE}
- SW_SHOWMINNOACTIVE = 7;
- {$EXTERNALSYM SW_SHOWMINNOACTIVE}
- SW_SHOWNA = 8;
- {$EXTERNALSYM SW_SHOWNA}
- SW_RESTORE = 9;
- {$EXTERNALSYM SW_RESTORE}
- SW_SHOWDEFAULT = 10;
- {$EXTERNALSYM SW_SHOWDEFAULT}
- SW_FORCEMINIMIZE = 11;
- {$EXTERNALSYM SW_FORCEMINIMIZE}
- SW_MAX = 11;
- {$EXTERNALSYM SW_MAX}
-
-//
-// Old ShowWindow() Commands
-//
-
- HIDE_WINDOW = 0;
- {$EXTERNALSYM HIDE_WINDOW}
- SHOW_OPENWINDOW = 1;
- {$EXTERNALSYM SHOW_OPENWINDOW}
- SHOW_ICONWINDOW = 2;
- {$EXTERNALSYM SHOW_ICONWINDOW}
- SHOW_FULLSCREEN = 3;
- {$EXTERNALSYM SHOW_FULLSCREEN}
- SHOW_OPENNOACTIVATE = 4;
- {$EXTERNALSYM SHOW_OPENNOACTIVATE}
-
-//
-// Identifiers for the WM_SHOWWINDOW message
-//
-
- SW_PARENTCLOSING = 1;
- {$EXTERNALSYM SW_PARENTCLOSING}
- SW_OTHERZOOM = 2;
- {$EXTERNALSYM SW_OTHERZOOM}
- SW_PARENTOPENING = 3;
- {$EXTERNALSYM SW_PARENTOPENING}
- SW_OTHERUNZOOM = 4;
- {$EXTERNALSYM SW_OTHERUNZOOM}
-
-//
-// AnimateWindow() Commands
-//
-
- AW_HOR_POSITIVE = $00000001;
- {$EXTERNALSYM AW_HOR_POSITIVE}
- AW_HOR_NEGATIVE = $00000002;
- {$EXTERNALSYM AW_HOR_NEGATIVE}
- AW_VER_POSITIVE = $00000004;
- {$EXTERNALSYM AW_VER_POSITIVE}
- AW_VER_NEGATIVE = $00000008;
- {$EXTERNALSYM AW_VER_NEGATIVE}
- AW_CENTER = $00000010;
- {$EXTERNALSYM AW_CENTER}
- AW_HIDE = $00010000;
- {$EXTERNALSYM AW_HIDE}
- AW_ACTIVATE = $00020000;
- {$EXTERNALSYM AW_ACTIVATE}
- AW_SLIDE = $00040000;
- {$EXTERNALSYM AW_SLIDE}
- AW_BLEND = $00080000;
- {$EXTERNALSYM AW_BLEND}
-
-//
-// WM_KEYUP/DOWN/CHAR HIWORD(lParam) flags
-//
-
- KF_EXTENDED = $0100;
- {$EXTERNALSYM KF_EXTENDED}
- KF_DLGMODE = $0800;
- {$EXTERNALSYM KF_DLGMODE}
- KF_MENUMODE = $1000;
- {$EXTERNALSYM KF_MENUMODE}
- KF_ALTDOWN = $2000;
- {$EXTERNALSYM KF_ALTDOWN}
- KF_REPEAT = $4000;
- {$EXTERNALSYM KF_REPEAT}
- KF_UP = $8000;
- {$EXTERNALSYM KF_UP}
-
-//
-// Virtual Keys, Standard Set
-//
-
- VK_LBUTTON = $01;
- {$EXTERNALSYM VK_LBUTTON}
- VK_RBUTTON = $02;
- {$EXTERNALSYM VK_RBUTTON}
- VK_CANCEL = $03;
- {$EXTERNALSYM VK_CANCEL}
- VK_MBUTTON = $04; // NOT contiguous with L & RBUTTON
- {$EXTERNALSYM VK_MBUTTON}
-
- {$IFDEF WIN98ME_UP}
- VK_XBUTTON1 = $05; // NOT contiguous with L & RBUTTON
- {$EXTERNALSYM VK_XBUTTON1}
- VK_XBUTTON2 = $06; // NOT contiguous with L & RBUTTON
- {$EXTERNALSYM VK_XBUTTON2}
- {$ENDIF WIN98ME_UP}
-
-//
-// 0x07 : unassigned
-//
-
- VK_BACK = $08;
- {$EXTERNALSYM VK_BACK}
- VK_TAB = $09;
- {$EXTERNALSYM VK_TAB}
-
-//
-// 0x0A - 0x0B : reserved
-//
-
- VK_CLEAR = $0C;
- {$EXTERNALSYM VK_CLEAR}
- VK_RETURN = $0D;
- {$EXTERNALSYM VK_RETURN}
-
- VK_SHIFT = $10;
- {$EXTERNALSYM VK_SHIFT}
- VK_CONTROL = $11;
- {$EXTERNALSYM VK_CONTROL}
- VK_MENU = $12;
- {$EXTERNALSYM VK_MENU}
- VK_PAUSE = $13;
- {$EXTERNALSYM VK_PAUSE}
- VK_CAPITAL = $14;
- {$EXTERNALSYM VK_CAPITAL}
-
- VK_KANA = $15;
- {$EXTERNALSYM VK_KANA}
- VK_HANGEUL = $15; // old name - should be here for compatibility
- {$EXTERNALSYM VK_HANGEUL}
- VK_HANGUL = $15;
- {$EXTERNALSYM VK_HANGUL}
- VK_JUNJA = $17;
- {$EXTERNALSYM VK_JUNJA}
- VK_FINAL = $18;
- {$EXTERNALSYM VK_FINAL}
- VK_HANJA = $19;
- {$EXTERNALSYM VK_HANJA}
- VK_KANJI = $19;
- {$EXTERNALSYM VK_KANJI}
-
- VK_ESCAPE = $1B;
- {$EXTERNALSYM VK_ESCAPE}
-
- VK_CONVERT = $1C;
- {$EXTERNALSYM VK_CONVERT}
- VK_NONCONVERT = $1D;
- {$EXTERNALSYM VK_NONCONVERT}
- VK_ACCEPT = $1E;
- {$EXTERNALSYM VK_ACCEPT}
- VK_MODECHANGE = $1F;
- {$EXTERNALSYM VK_MODECHANGE}
-
- VK_SPACE = $20;
- {$EXTERNALSYM VK_SPACE}
- VK_PRIOR = $21;
- {$EXTERNALSYM VK_PRIOR}
- VK_NEXT = $22;
- {$EXTERNALSYM VK_NEXT}
- VK_END = $23;
- {$EXTERNALSYM VK_END}
- VK_HOME = $24;
- {$EXTERNALSYM VK_HOME}
- VK_LEFT = $25;
- {$EXTERNALSYM VK_LEFT}
- VK_UP = $26;
- {$EXTERNALSYM VK_UP}
- VK_RIGHT = $27;
- {$EXTERNALSYM VK_RIGHT}
- VK_DOWN = $28;
- {$EXTERNALSYM VK_DOWN}
- VK_SELECT = $29;
- {$EXTERNALSYM VK_SELECT}
- VK_PRINT = $2A;
- {$EXTERNALSYM VK_PRINT}
- VK_EXECUTE = $2B;
- {$EXTERNALSYM VK_EXECUTE}
- VK_SNAPSHOT = $2C;
- {$EXTERNALSYM VK_SNAPSHOT}
- VK_INSERT = $2D;
- {$EXTERNALSYM VK_INSERT}
- VK_DELETE = $2E;
- {$EXTERNALSYM VK_DELETE}
- VK_HELP = $2F;
- {$EXTERNALSYM VK_HELP}
-
-//
-// VK_0 - VK_9 are the same as ASCII '0' - '9' (0x30 - 0x39)
-// 0x40 : unassigned
-// VK_A - VK_Z are the same as ASCII 'A' - 'Z' (0x41 - 0x5A)
-//
-
- VK_LWIN = $5B;
- {$EXTERNALSYM VK_LWIN}
- VK_RWIN = $5C;
- {$EXTERNALSYM VK_RWIN}
- VK_APPS = $5D;
- {$EXTERNALSYM VK_APPS}
-
-//
-// 0x5E : reserved
-//
-
- VK_SLEEP = $5F;
- {$EXTERNALSYM VK_SLEEP}
-
- VK_NUMPAD0 = $60;
- {$EXTERNALSYM VK_NUMPAD0}
- VK_NUMPAD1 = $61;
- {$EXTERNALSYM VK_NUMPAD1}
- VK_NUMPAD2 = $62;
- {$EXTERNALSYM VK_NUMPAD2}
- VK_NUMPAD3 = $63;
- {$EXTERNALSYM VK_NUMPAD3}
- VK_NUMPAD4 = $64;
- {$EXTERNALSYM VK_NUMPAD4}
- VK_NUMPAD5 = $65;
- {$EXTERNALSYM VK_NUMPAD5}
- VK_NUMPAD6 = $66;
- {$EXTERNALSYM VK_NUMPAD6}
- VK_NUMPAD7 = $67;
- {$EXTERNALSYM VK_NUMPAD7}
- VK_NUMPAD8 = $68;
- {$EXTERNALSYM VK_NUMPAD8}
- VK_NUMPAD9 = $69;
- {$EXTERNALSYM VK_NUMPAD9}
- VK_MULTIPLY = $6A;
- {$EXTERNALSYM VK_MULTIPLY}
- VK_ADD = $6B;
- {$EXTERNALSYM VK_ADD}
- VK_SEPARATOR = $6C;
- {$EXTERNALSYM VK_SEPARATOR}
- VK_SUBTRACT = $6D;
- {$EXTERNALSYM VK_SUBTRACT}
- VK_DECIMAL = $6E;
- {$EXTERNALSYM VK_DECIMAL}
- VK_DIVIDE = $6F;
- {$EXTERNALSYM VK_DIVIDE}
- VK_F1 = $70;
- {$EXTERNALSYM VK_F1}
- VK_F2 = $71;
- {$EXTERNALSYM VK_F2}
- VK_F3 = $72;
- {$EXTERNALSYM VK_F3}
- VK_F4 = $73;
- {$EXTERNALSYM VK_F4}
- VK_F5 = $74;
- {$EXTERNALSYM VK_F5}
- VK_F6 = $75;
- {$EXTERNALSYM VK_F6}
- VK_F7 = $76;
- {$EXTERNALSYM VK_F7}
- VK_F8 = $77;
- {$EXTERNALSYM VK_F8}
- VK_F9 = $78;
- {$EXTERNALSYM VK_F9}
- VK_F10 = $79;
- {$EXTERNALSYM VK_F10}
- VK_F11 = $7A;
- {$EXTERNALSYM VK_F11}
- VK_F12 = $7B;
- {$EXTERNALSYM VK_F12}
- VK_F13 = $7C;
- {$EXTERNALSYM VK_F13}
- VK_F14 = $7D;
- {$EXTERNALSYM VK_F14}
- VK_F15 = $7E;
- {$EXTERNALSYM VK_F15}
- VK_F16 = $7F;
- {$EXTERNALSYM VK_F16}
- VK_F17 = $80;
- {$EXTERNALSYM VK_F17}
- VK_F18 = $81;
- {$EXTERNALSYM VK_F18}
- VK_F19 = $82;
- {$EXTERNALSYM VK_F19}
- VK_F20 = $83;
- {$EXTERNALSYM VK_F20}
- VK_F21 = $84;
- {$EXTERNALSYM VK_F21}
- VK_F22 = $85;
- {$EXTERNALSYM VK_F22}
- VK_F23 = $86;
- {$EXTERNALSYM VK_F23}
- VK_F24 = $87;
- {$EXTERNALSYM VK_F24}
-
-//
-// 0x88 - 0x8F : unassigned
-//
-
- VK_NUMLOCK = $90;
- {$EXTERNALSYM VK_NUMLOCK}
- VK_SCROLL = $91;
- {$EXTERNALSYM VK_SCROLL}
-
-//
-// NEC PC-9800 kbd definitions
-//
-
- VK_OEM_NEC_EQUAL = $92; // '=' key on numpad
- {$EXTERNALSYM VK_OEM_NEC_EQUAL}
-
-//
-// Fujitsu/OASYS kbd definitions
-//
-
- VK_OEM_FJ_JISHO = $92; // 'Dictionary' key
- {$EXTERNALSYM VK_OEM_FJ_JISHO}
- VK_OEM_FJ_MASSHOU = $93; // 'Unregister word' key
- {$EXTERNALSYM VK_OEM_FJ_MASSHOU}
- VK_OEM_FJ_TOUROKU = $94; // 'Register word' key
- {$EXTERNALSYM VK_OEM_FJ_TOUROKU}
- VK_OEM_FJ_LOYA = $95; // 'Left OYAYUBI' key
- {$EXTERNALSYM VK_OEM_FJ_LOYA}
- VK_OEM_FJ_ROYA = $96; // 'Right OYAYUBI' key
- {$EXTERNALSYM VK_OEM_FJ_ROYA}
-
-//
-// 0x97 - 0x9F : unassigned
-//
-
-//
-// VK_L* & VK_R* - left and right Alt, Ctrl and Shift virtual keys.
-// Used only as parameters to GetAsyncKeyState() and GetKeyState().
-// No other API or message will distinguish left and right keys in this way.
-//
-
- VK_LSHIFT = $A0;
- {$EXTERNALSYM VK_LSHIFT}
- VK_RSHIFT = $A1;
- {$EXTERNALSYM VK_RSHIFT}
- VK_LCONTROL = $A2;
- {$EXTERNALSYM VK_LCONTROL}
- VK_RCONTROL = $A3;
- {$EXTERNALSYM VK_RCONTROL}
- VK_LMENU = $A4;
- {$EXTERNALSYM VK_LMENU}
- VK_RMENU = $A5;
- {$EXTERNALSYM VK_RMENU}
-
- {$IFDEF WIN98ME_UP}
-
- VK_BROWSER_BACK = $A6;
- {$EXTERNALSYM VK_BROWSER_BACK}
- VK_BROWSER_FORWARD = $A7;
- {$EXTERNALSYM VK_BROWSER_FORWARD}
- VK_BROWSER_REFRESH = $A8;
- {$EXTERNALSYM VK_BROWSER_REFRESH}
- VK_BROWSER_STOP = $A9;
- {$EXTERNALSYM VK_BROWSER_STOP}
- VK_BROWSER_SEARCH = $AA;
- {$EXTERNALSYM VK_BROWSER_SEARCH}
- VK_BROWSER_FAVORITES = $AB;
- {$EXTERNALSYM VK_BROWSER_FAVORITES}
- VK_BROWSER_HOME = $AC;
- {$EXTERNALSYM VK_BROWSER_HOME}
-
- VK_VOLUME_MUTE = $AD;
- {$EXTERNALSYM VK_VOLUME_MUTE}
- VK_VOLUME_DOWN = $AE;
- {$EXTERNALSYM VK_VOLUME_DOWN}
- VK_VOLUME_UP = $AF;
- {$EXTERNALSYM VK_VOLUME_UP}
- VK_MEDIA_NEXT_TRACK = $B0;
- {$EXTERNALSYM VK_MEDIA_NEXT_TRACK}
- VK_MEDIA_PREV_TRACK = $B1;
- {$EXTERNALSYM VK_MEDIA_PREV_TRACK}
- VK_MEDIA_STOP = $B2;
- {$EXTERNALSYM VK_MEDIA_STOP}
- VK_MEDIA_PLAY_PAUSE = $B3;
- {$EXTERNALSYM VK_MEDIA_PLAY_PAUSE}
- VK_LAUNCH_MAIL = $B4;
- {$EXTERNALSYM VK_LAUNCH_MAIL}
- VK_LAUNCH_MEDIA_SELECT = $B5;
- {$EXTERNALSYM VK_LAUNCH_MEDIA_SELECT}
- VK_LAUNCH_APP1 = $B6;
- {$EXTERNALSYM VK_LAUNCH_APP1}
- VK_LAUNCH_APP2 = $B7;
- {$EXTERNALSYM VK_LAUNCH_APP2}
-
- {$ENDIF WIN98ME_UP}
-
-//
-// 0xB8 - 0xB9 : reserved
-//
-
- VK_OEM_1 = $BA; // ';:' for US
- {$EXTERNALSYM VK_OEM_1}
- VK_OEM_PLUS = $BB; // '+' any country
- {$EXTERNALSYM VK_OEM_PLUS}
- VK_OEM_COMMA = $BC; // ',' any country
- {$EXTERNALSYM VK_OEM_COMMA}
- VK_OEM_MINUS = $BD; // '-' any country
- {$EXTERNALSYM VK_OEM_MINUS}
- VK_OEM_PERIOD = $BE; // '.' any country
- {$EXTERNALSYM VK_OEM_PERIOD}
- VK_OEM_2 = $BF; // '/?' for US
- {$EXTERNALSYM VK_OEM_2}
- VK_OEM_3 = $C0; // '`~' for US
- {$EXTERNALSYM VK_OEM_3}
-
-//
-// 0xC1 - 0xD7 : reserved
-//
-
-//
-// 0xD8 - 0xDA : unassigned
-//
-
- VK_OEM_4 = $DB; // '[{' for US
- {$EXTERNALSYM VK_OEM_4}
- VK_OEM_5 = $DC; // '\|' for US
- {$EXTERNALSYM VK_OEM_5}
- VK_OEM_6 = $DD; // ']}' for US
- {$EXTERNALSYM VK_OEM_6}
- VK_OEM_7 = $DE; // ''"' for US
- {$EXTERNALSYM VK_OEM_7}
- VK_OEM_8 = $DF;
- {$EXTERNALSYM VK_OEM_8}
-
-//
-// 0xE0 : reserved
-//
-
-//
-// Various extended or enhanced keyboards
-//
-
- VK_OEM_AX = $E1; // 'AX' key on Japanese AX kbd
- {$EXTERNALSYM VK_OEM_AX}
- VK_OEM_102 = $E2; // "<>" or "\|" on RT 102-key kbd.
- {$EXTERNALSYM VK_OEM_102}
- VK_ICO_HELP = $E3; // Help key on ICO
- {$EXTERNALSYM VK_ICO_HELP}
- VK_ICO_00 = $E4; // 00 key on ICO
- {$EXTERNALSYM VK_ICO_00}
-
- VK_PROCESSKEY = $E5;
- {$EXTERNALSYM VK_PROCESSKEY}
-
- VK_ICO_CLEAR = $E6;
- {$EXTERNALSYM VK_ICO_CLEAR}
-
- {$IFDEF WIN98ME_UP}
- VK_PACKET = $E7;
- {$EXTERNALSYM VK_PACKET}
- {$ENDIF WIN98ME_UP}
-
-//
-// 0xE8 : unassigned
-//
-
-//
-// Nokia/Ericsson definitions
-//
-
- VK_OEM_RESET = $E9;
- {$EXTERNALSYM VK_OEM_RESET}
- VK_OEM_JUMP = $EA;
- {$EXTERNALSYM VK_OEM_JUMP}
- VK_OEM_PA1 = $EB;
- {$EXTERNALSYM VK_OEM_PA1}
- VK_OEM_PA2 = $EC;
- {$EXTERNALSYM VK_OEM_PA2}
- VK_OEM_PA3 = $ED;
- {$EXTERNALSYM VK_OEM_PA3}
- VK_OEM_WSCTRL = $EE;
- {$EXTERNALSYM VK_OEM_WSCTRL}
- VK_OEM_CUSEL = $EF;
- {$EXTERNALSYM VK_OEM_CUSEL}
- VK_OEM_ATTN = $F0;
- {$EXTERNALSYM VK_OEM_ATTN}
- VK_OEM_FINISH = $F1;
- {$EXTERNALSYM VK_OEM_FINISH}
- VK_OEM_COPY = $F2;
- {$EXTERNALSYM VK_OEM_COPY}
- VK_OEM_AUTO = $F3;
- {$EXTERNALSYM VK_OEM_AUTO}
- VK_OEM_ENLW = $F4;
- {$EXTERNALSYM VK_OEM_ENLW}
- VK_OEM_BACKTAB = $F5;
- {$EXTERNALSYM VK_OEM_BACKTAB}
-
- VK_ATTN = $F6;
- {$EXTERNALSYM VK_ATTN}
- VK_CRSEL = $F7;
- {$EXTERNALSYM VK_CRSEL}
- VK_EXSEL = $F8;
- {$EXTERNALSYM VK_EXSEL}
- VK_EREOF = $F9;
- {$EXTERNALSYM VK_EREOF}
- VK_PLAY = $FA;
- {$EXTERNALSYM VK_PLAY}
- VK_ZOOM = $FB;
- {$EXTERNALSYM VK_ZOOM}
- VK_NONAME = $FC;
- {$EXTERNALSYM VK_NONAME}
- VK_PA1 = $FD;
- {$EXTERNALSYM VK_PA1}
- VK_OEM_CLEAR = $FE;
- {$EXTERNALSYM VK_OEM_CLEAR}
-
-//
-// 0xFF : reserved
-//
-
-//
-// SetWindowsHook() codes
-//
-
- WH_MIN = DWORD(-1);
- {$EXTERNALSYM WH_MIN}
- WH_MSGFILTER = DWORD(-1);
- {$EXTERNALSYM WH_MSGFILTER}
- WH_JOURNALRECORD = 0;
- {$EXTERNALSYM WH_JOURNALRECORD}
- WH_JOURNALPLAYBACK = 1;
- {$EXTERNALSYM WH_JOURNALPLAYBACK}
- WH_KEYBOARD = 2;
- {$EXTERNALSYM WH_KEYBOARD}
- WH_GETMESSAGE = 3;
- {$EXTERNALSYM WH_GETMESSAGE}
- WH_CALLWNDPROC = 4;
- {$EXTERNALSYM WH_CALLWNDPROC}
- WH_CBT = 5;
- {$EXTERNALSYM WH_CBT}
- WH_SYSMSGFILTER = 6;
- {$EXTERNALSYM WH_SYSMSGFILTER}
- WH_MOUSE = 7;
- {$EXTERNALSYM WH_MOUSE}
- WH_HARDWARE = 8;
- {$EXTERNALSYM WH_HARDWARE}
- WH_DEBUG = 9;
- {$EXTERNALSYM WH_DEBUG}
- WH_SHELL = 10;
- {$EXTERNALSYM WH_SHELL}
- WH_FOREGROUNDIDLE = 11;
- {$EXTERNALSYM WH_FOREGROUNDIDLE}
- WH_CALLWNDPROCRET = 12;
- {$EXTERNALSYM WH_CALLWNDPROCRET}
-
- {$IFDEF WINNT4_UP}
- WH_KEYBOARD_LL = 13;
- {$EXTERNALSYM WH_KEYBOARD_LL}
- WH_MOUSE_LL = 14;
- {$EXTERNALSYM WH_MOUSE_LL}
- {$ENDIF WINNT4_UP}
-
- {$IFDEF WINNT4_UP}
- WH_MAX = 14;
- {$EXTERNALSYM WH_MAX}
- {$ELSE}
- WH_MAX = 12;
- {$EXTERNALSYM WH_MAX}
- {$ENDIF WINNT4_UP}
-
- WH_MINHOOK = WH_MIN;
- {$EXTERNALSYM WH_MINHOOK}
- WH_MAXHOOK = WH_MAX;
- {$EXTERNALSYM WH_MAXHOOK}
-
-//
-// Hook Codes
-//
-
- HC_ACTION = 0;
- {$EXTERNALSYM HC_ACTION}
- HC_GETNEXT = 1;
- {$EXTERNALSYM HC_GETNEXT}
- HC_SKIP = 2;
- {$EXTERNALSYM HC_SKIP}
- HC_NOREMOVE = 3;
- {$EXTERNALSYM HC_NOREMOVE}
- HC_NOREM = HC_NOREMOVE;
- {$EXTERNALSYM HC_NOREM}
- HC_SYSMODALON = 4;
- {$EXTERNALSYM HC_SYSMODALON}
- HC_SYSMODALOFF = 5;
- {$EXTERNALSYM HC_SYSMODALOFF}
-
-//
-// CBT Hook Codes
-//
-
- HCBT_MOVESIZE = 0;
- {$EXTERNALSYM HCBT_MOVESIZE}
- HCBT_MINMAX = 1;
- {$EXTERNALSYM HCBT_MINMAX}
- HCBT_QS = 2;
- {$EXTERNALSYM HCBT_QS}
- HCBT_CREATEWND = 3;
- {$EXTERNALSYM HCBT_CREATEWND}
- HCBT_DESTROYWND = 4;
- {$EXTERNALSYM HCBT_DESTROYWND}
- HCBT_ACTIVATE = 5;
- {$EXTERNALSYM HCBT_ACTIVATE}
- HCBT_CLICKSKIPPED = 6;
- {$EXTERNALSYM HCBT_CLICKSKIPPED}
- HCBT_KEYSKIPPED = 7;
- {$EXTERNALSYM HCBT_KEYSKIPPED}
- HCBT_SYSCOMMAND = 8;
- {$EXTERNALSYM HCBT_SYSCOMMAND}
- HCBT_SETFOCUS = 9;
- {$EXTERNALSYM HCBT_SETFOCUS}
-
-//
-// HCBT_ACTIVATE structure pointed to by lParam
-//
-
-type
- LPCBTACTIVATESTRUCT = ^CBTACTIVATESTRUCT;
- {$EXTERNALSYM LPCBTACTIVATESTRUCT}
- tagCBTACTIVATESTRUCT = record
- fMouse: BOOL;
- hWndActive: HWND;
- end;
- {$EXTERNALSYM tagCBTACTIVATESTRUCT}
- CBTACTIVATESTRUCT = tagCBTACTIVATESTRUCT;
- {$EXTERNALSYM CBTACTIVATESTRUCT}
- TCbtActivateStruct = CBTACTIVATESTRUCT;
- PCbtActivateStruct = LPCBTACTIVATESTRUCT;
-
-{$IFDEF WINXP_UP}
-
-//
-// WTSSESSION_NOTIFICATION struct pointed by lParam, for WM_WTSSESSION_CHANGE
-//
-
- tagWTSSESSION_NOTIFICATION = record
- cbSize: DWORD;
- dwSessionId: DWORD;
- end;
- {$EXTERNALSYM tagWTSSESSION_NOTIFICATION}
- WTSSESSION_NOTIFICATION = tagWTSSESSION_NOTIFICATION;
- {$EXTERNALSYM WTSSESSION_NOTIFICATION}
- PWTSSESSION_NOTIFICATION = ^WTSSESSION_NOTIFICATION;
- {$EXTERNALSYM PWTSSESSION_NOTIFICATION}
- TWtsSessionNotification = WTSSESSION_NOTIFICATION;
- PWtsSessionNotification = PWTSSESSION_NOTIFICATION;
-
-//
-// codes passed in WPARAM for WM_WTSSESSION_CHANGE
-//
-
-const
- WTS_CONSOLE_CONNECT = $1;
- {$EXTERNALSYM WTS_CONSOLE_CONNECT}
- WTS_CONSOLE_DISCONNECT = $2;
- {$EXTERNALSYM WTS_CONSOLE_DISCONNECT}
- WTS_REMOTE_CONNECT = $3;
- {$EXTERNALSYM WTS_REMOTE_CONNECT}
- WTS_REMOTE_DISCONNECT = $4;
- {$EXTERNALSYM WTS_REMOTE_DISCONNECT}
- WTS_SESSION_LOGON = $5;
- {$EXTERNALSYM WTS_SESSION_LOGON}
- WTS_SESSION_LOGOFF = $6;
- {$EXTERNALSYM WTS_SESSION_LOGOFF}
- WTS_SESSION_LOCK = $7;
- {$EXTERNALSYM WTS_SESSION_LOCK}
- WTS_SESSION_UNLOCK = $8;
- {$EXTERNALSYM WTS_SESSION_UNLOCK}
- WTS_SESSION_REMOTE_CONTROL = $9;
- {$EXTERNALSYM WTS_SESSION_REMOTE_CONTROL}
-
-{$ENDIF WINXP_UP}
-
-//
-// WH_MSGFILTER Filter Proc Codes
-//
-
-const
- MSGF_DIALOGBOX = 0;
- {$EXTERNALSYM MSGF_DIALOGBOX}
- MSGF_MESSAGEBOX = 1;
- {$EXTERNALSYM MSGF_MESSAGEBOX}
- MSGF_MENU = 2;
- {$EXTERNALSYM MSGF_MENU}
- MSGF_SCROLLBAR = 5;
- {$EXTERNALSYM MSGF_SCROLLBAR}
- MSGF_NEXTWINDOW = 6;
- {$EXTERNALSYM MSGF_NEXTWINDOW}
- MSGF_MAX = 8; // unused
- {$EXTERNALSYM MSGF_MAX}
- MSGF_USER = 4096;
- {$EXTERNALSYM MSGF_USER}
-
-//
-// Shell support
-//
-
- HSHELL_WINDOWCREATED = 1;
- {$EXTERNALSYM HSHELL_WINDOWCREATED}
- HSHELL_WINDOWDESTROYED = 2;
- {$EXTERNALSYM HSHELL_WINDOWDESTROYED}
- HSHELL_ACTIVATESHELLWINDOW = 3;
- {$EXTERNALSYM HSHELL_ACTIVATESHELLWINDOW}
-
- HSHELL_WINDOWACTIVATED = 4;
- {$EXTERNALSYM HSHELL_WINDOWACTIVATED}
- HSHELL_GETMINRECT = 5;
- {$EXTERNALSYM HSHELL_GETMINRECT}
- HSHELL_REDRAW = 6;
- {$EXTERNALSYM HSHELL_REDRAW}
- HSHELL_TASKMAN = 7;
- {$EXTERNALSYM HSHELL_TASKMAN}
- HSHELL_LANGUAGE = 8;
- {$EXTERNALSYM HSHELL_LANGUAGE}
- HSHELL_SYSMENU = 9;
- {$EXTERNALSYM HSHELL_SYSMENU}
- HSHELL_ENDTASK = 10;
- {$EXTERNALSYM HSHELL_ENDTASK}
- {$IFDEF WIN2000_UP}
- HSHELL_ACCESSIBILITYSTATE = 11;
- {$EXTERNALSYM HSHELL_ACCESSIBILITYSTATE}
- HSHELL_APPCOMMAND = 12;
- {$EXTERNALSYM HSHELL_APPCOMMAND}
- {$ENDIF WIN2000_UP}
-
- {$IFDEF WINXP_UP}
- HSHELL_WINDOWREPLACED = 13;
- {$EXTERNALSYM HSHELL_WINDOWREPLACED}
- {$ENDIF WINXP_UP}
- HSHELL_WINDOWREPLACING = 14;
- {$EXTERNALSYM HSHELL_WINDOWREPLACING}
-
- HSHELL_HIGHBIT = $8000;
- {$EXTERNALSYM HSHELL_HIGHBIT}
- HSHELL_FLASH = HSHELL_REDRAW or HSHELL_HIGHBIT;
- {$EXTERNALSYM HSHELL_FLASH}
- HSHELL_RUDEAPPACTIVATED = HSHELL_WINDOWACTIVATED or HSHELL_HIGHBIT;
- {$EXTERNALSYM HSHELL_RUDEAPPACTIVATED}
-
-{$IFDEF WIN2000_UP}
-
-// wparam for HSHELL_ACCESSIBILITYSTATE//
-
- ACCESS_STICKYKEYS = $0001;
- {$EXTERNALSYM ACCESS_STICKYKEYS}
- ACCESS_FILTERKEYS = $0002;
- {$EXTERNALSYM ACCESS_FILTERKEYS}
- ACCESS_MOUSEKEYS = $0003;
- {$EXTERNALSYM ACCESS_MOUSEKEYS}
-
-// cmd for HSHELL_APPCOMMAND and WM_APPCOMMAND//
-
- APPCOMMAND_BROWSER_BACKWARD = 1;
- {$EXTERNALSYM APPCOMMAND_BROWSER_BACKWARD}
- APPCOMMAND_BROWSER_FORWARD = 2;
- {$EXTERNALSYM APPCOMMAND_BROWSER_FORWARD}
- APPCOMMAND_BROWSER_REFRESH = 3;
- {$EXTERNALSYM APPCOMMAND_BROWSER_REFRESH}
- APPCOMMAND_BROWSER_STOP = 4;
- {$EXTERNALSYM APPCOMMAND_BROWSER_STOP}
- APPCOMMAND_BROWSER_SEARCH = 5;
- {$EXTERNALSYM APPCOMMAND_BROWSER_SEARCH}
- APPCOMMAND_BROWSER_FAVORITES = 6;
- {$EXTERNALSYM APPCOMMAND_BROWSER_FAVORITES}
- APPCOMMAND_BROWSER_HOME = 7;
- {$EXTERNALSYM APPCOMMAND_BROWSER_HOME}
- APPCOMMAND_VOLUME_MUTE = 8;
- {$EXTERNALSYM APPCOMMAND_VOLUME_MUTE}
- APPCOMMAND_VOLUME_DOWN = 9;
- {$EXTERNALSYM APPCOMMAND_VOLUME_DOWN}
- APPCOMMAND_VOLUME_UP = 10;
- {$EXTERNALSYM APPCOMMAND_VOLUME_UP}
- APPCOMMAND_MEDIA_NEXTTRACK = 11;
- {$EXTERNALSYM APPCOMMAND_MEDIA_NEXTTRACK}
- APPCOMMAND_MEDIA_PREVIOUSTRACK = 12;
- {$EXTERNALSYM APPCOMMAND_MEDIA_PREVIOUSTRACK}
- APPCOMMAND_MEDIA_STOP = 13;
- {$EXTERNALSYM APPCOMMAND_MEDIA_STOP}
- APPCOMMAND_MEDIA_PLAY_PAUSE = 14;
- {$EXTERNALSYM APPCOMMAND_MEDIA_PLAY_PAUSE}
- APPCOMMAND_LAUNCH_MAIL = 15;
- {$EXTERNALSYM APPCOMMAND_LAUNCH_MAIL}
- APPCOMMAND_LAUNCH_MEDIA_SELECT = 16;
- {$EXTERNALSYM APPCOMMAND_LAUNCH_MEDIA_SELECT}
- APPCOMMAND_LAUNCH_APP1 = 17;
- {$EXTERNALSYM APPCOMMAND_LAUNCH_APP1}
- APPCOMMAND_LAUNCH_APP2 = 18;
- {$EXTERNALSYM APPCOMMAND_LAUNCH_APP2}
- APPCOMMAND_BASS_DOWN = 19;
- {$EXTERNALSYM APPCOMMAND_BASS_DOWN}
- APPCOMMAND_BASS_BOOST = 20;
- {$EXTERNALSYM APPCOMMAND_BASS_BOOST}
- APPCOMMAND_BASS_UP = 21;
- {$EXTERNALSYM APPCOMMAND_BASS_UP}
- APPCOMMAND_TREBLE_DOWN = 22;
- {$EXTERNALSYM APPCOMMAND_TREBLE_DOWN}
- APPCOMMAND_TREBLE_UP = 23;
- {$EXTERNALSYM APPCOMMAND_TREBLE_UP}
- {$IFDEF WINXP_UP}
- APPCOMMAND_MICROPHONE_VOLUME_MUTE = 24;
- {$EXTERNALSYM APPCOMMAND_MICROPHONE_VOLUME_MUTE}
- APPCOMMAND_MICROPHONE_VOLUME_DOWN = 25;
- {$EXTERNALSYM APPCOMMAND_MICROPHONE_VOLUME_DOWN}
- APPCOMMAND_MICROPHONE_VOLUME_UP = 26;
- {$EXTERNALSYM APPCOMMAND_MICROPHONE_VOLUME_UP}
- APPCOMMAND_HELP = 27;
- {$EXTERNALSYM APPCOMMAND_HELP}
- APPCOMMAND_FIND = 28;
- {$EXTERNALSYM APPCOMMAND_FIND}
- APPCOMMAND_NEW = 29;
- {$EXTERNALSYM APPCOMMAND_NEW}
- APPCOMMAND_OPEN = 30;
- {$EXTERNALSYM APPCOMMAND_OPEN}
- APPCOMMAND_CLOSE = 31;
- {$EXTERNALSYM APPCOMMAND_CLOSE}
- APPCOMMAND_SAVE = 32;
- {$EXTERNALSYM APPCOMMAND_SAVE}
- APPCOMMAND_PRINT = 33;
- {$EXTERNALSYM APPCOMMAND_PRINT}
- APPCOMMAND_UNDO = 34;
- {$EXTERNALSYM APPCOMMAND_UNDO}
- APPCOMMAND_REDO = 35;
- {$EXTERNALSYM APPCOMMAND_REDO}
- APPCOMMAND_COPY = 36;
- {$EXTERNALSYM APPCOMMAND_COPY}
- APPCOMMAND_CUT = 37;
- {$EXTERNALSYM APPCOMMAND_CUT}
- APPCOMMAND_PASTE = 38;
- {$EXTERNALSYM APPCOMMAND_PASTE}
- APPCOMMAND_REPLY_TO_MAIL = 39;
- {$EXTERNALSYM APPCOMMAND_REPLY_TO_MAIL}
- APPCOMMAND_FORWARD_MAIL = 40;
- {$EXTERNALSYM APPCOMMAND_FORWARD_MAIL}
- APPCOMMAND_SEND_MAIL = 41;
- {$EXTERNALSYM APPCOMMAND_SEND_MAIL}
- APPCOMMAND_SPELL_CHECK = 42;
- {$EXTERNALSYM APPCOMMAND_SPELL_CHECK}
- APPCOMMAND_DICTATE_OR_COMMAND_CONTROL_TOGGLE = 43;
- {$EXTERNALSYM APPCOMMAND_DICTATE_OR_COMMAND_CONTROL_TOGGLE}
- APPCOMMAND_MIC_ON_OFF_TOGGLE = 44;
- {$EXTERNALSYM APPCOMMAND_MIC_ON_OFF_TOGGLE}
- APPCOMMAND_CORRECTION_LIST = 45;
- {$EXTERNALSYM APPCOMMAND_CORRECTION_LIST}
- {$ENDIF WINXP_UP}
- APPCOMMAND_MEDIA_PLAY = 46;
- {$EXTERNALSYM APPCOMMAND_MEDIA_PLAY}
- APPCOMMAND_MEDIA_PAUSE = 47;
- {$EXTERNALSYM APPCOMMAND_MEDIA_PAUSE}
- APPCOMMAND_MEDIA_RECORD = 48;
- {$EXTERNALSYM APPCOMMAND_MEDIA_RECORD}
- APPCOMMAND_MEDIA_FAST_FORWARD = 49;
- {$EXTERNALSYM APPCOMMAND_MEDIA_FAST_FORWARD}
- APPCOMMAND_MEDIA_REWIND = 50;
- {$EXTERNALSYM APPCOMMAND_MEDIA_REWIND}
- APPCOMMAND_MEDIA_CHANNEL_UP = 51;
- {$EXTERNALSYM APPCOMMAND_MEDIA_CHANNEL_UP}
- APPCOMMAND_MEDIA_CHANNEL_DOWN = 52;
- {$EXTERNALSYM APPCOMMAND_MEDIA_CHANNEL_DOWN}
-
- FAPPCOMMAND_MOUSE = $8000;
- {$EXTERNALSYM FAPPCOMMAND_MOUSE}
- FAPPCOMMAND_KEY = 0;
- {$EXTERNALSYM FAPPCOMMAND_KEY}
- FAPPCOMMAND_OEM = $1000;
- {$EXTERNALSYM FAPPCOMMAND_OEM}
- FAPPCOMMAND_MASK = $F000;
- {$EXTERNALSYM FAPPCOMMAND_MASK}
-
-function GET_APPCOMMAND_LPARAM(lParam: LPARAM): Shortint;
-{$EXTERNALSYM GET_APPCOMMAND_LPARAM}
-
-function GET_DEVICE_LPARAM(lParam: LPARAM): WORD;
-{$EXTERNALSYM GET_DEVICE_LPARAM}
-
-function GET_MOUSEORKEY_LPARAM(lParam: LPARAM): WORD;
-{$EXTERNALSYM GET_MOUSEORKEY_LPARAM}
-
-function GET_FLAGS_LPARAM(lParam: LPARAM): Integer;
-{$EXTERNALSYM GET_FLAGS_LPARAM}
-
-function GET_KEYSTATE_LPARAM(lParam: LPARAM): Integer;
-{$EXTERNALSYM GET_KEYSTATE_LPARAM}
-
-{$ENDIF WIN2000_UP}
-
-type
- SHELLHOOKINFO = record
- hwnd: HWND;
- rc: RECT;
- end;
- {$EXTERNALSYM SHELLHOOKINFO}
- LPSHELLHOOKINFO = ^SHELLHOOKINFO;
- {$EXTERNALSYM LPSHELLHOOKINFO}
- TShellHookInfo = SHELLHOOKINFO;
- PShellHookInfo = LPSHELLHOOKINFO;
-
-//
-// Message Structure used in Journaling
-//
-
-type
- LPEVENTMSG = ^EVENTMSG;
- {$EXTERNALSYM LPEVENTMSG}
- tagEVENTMSG = record
- message_: UINT;
- paramL: UINT;
- paramH: UINT;
- time: DWORD;
- hwnd: HWND;
- end;
- {$EXTERNALSYM tagEVENTMSG}
- EVENTMSG = tagEVENTMSG;
- {$EXTERNALSYM EVENTMSG}
- LPEVENTMSGMSG = ^EVENTMSG;
- {$EXTERNALSYM LPEVENTMSGMSG}
- PEVENTMSGMSG = ^EVENTMSG;
- {$EXTERNALSYM PEVENTMSGMSG}
- NPEVENTMSG = ^EVENTMSG;
- {$EXTERNALSYM NPEVENTMSG}
- NPEVENTMSGMSG = ^EVENTMSG;
- {$EXTERNALSYM NPEVENTMSGMSG}
- TEventMsg = EVENTMSG;
- PEventMsg = LPEVENTMSG;
-
-//
-// Message structure used by WH_CALLWNDPROC
-//
-
- LPCWPSTRUCT = ^CWPSTRUCT;
- {$EXTERNALSYM LPCWPSTRUCT}
- tagCWPSTRUCT = record
- lParam: LPARAM;
- wParam: WPARAM;
- message: UINT;
- hwnd: HWND;
- end;
- {$EXTERNALSYM tagCWPSTRUCT}
- CWPSTRUCT = tagCWPSTRUCT;
- {$EXTERNALSYM CWPSTRUCT}
- NPCWPSTRUCT = ^CWPSTRUCT;
- {$EXTERNALSYM NPCWPSTRUCT}
- TCwpStruct = CWPSTRUCT;
- PCwpStruct = LPCWPSTRUCT;
-
-//
-// Message structure used by WH_CALLWNDPROCRET
-//
-
- LPCWPRETSTRUCT = ^CWPRETSTRUCT;
- {$EXTERNALSYM LPCWPRETSTRUCT}
- tagCWPRETSTRUCT = record
- lResult: LRESULT;
- lParam: LPARAM;
- wParam: WPARAM;
- message: UINT;
- hwnd: HWND;
- end;
- {$EXTERNALSYM tagCWPRETSTRUCT}
- CWPRETSTRUCT = tagCWPRETSTRUCT;
- {$EXTERNALSYM CWPRETSTRUCT}
- NPCWPRETSTRUCT = ^CWPRETSTRUCT;
- {$EXTERNALSYM NPCWPRETSTRUCT}
- TCwpRetStruct = CWPRETSTRUCT;
- PCwpRetStruct = LPCWPRETSTRUCT;
-
-//
-// Low level hook flags
-//
-
-const
- LLKHF_EXTENDED = KF_EXTENDED shr 8;
- {$EXTERNALSYM LLKHF_EXTENDED}
- LLKHF_INJECTED = $00000010;
- {$EXTERNALSYM LLKHF_INJECTED}
- LLKHF_ALTDOWN = KF_ALTDOWN shr 8;
- {$EXTERNALSYM LLKHF_ALTDOWN}
- LLKHF_UP = KF_UP shr 8;
- {$EXTERNALSYM LLKHF_UP}
-
- LLMHF_INJECTED = $00000001;
- {$EXTERNALSYM LLMHF_INJECTED}
-
-//
-// Structure used by WH_KEYBOARD_LL
-//
-
-type
- LPKBDLLHOOKSTRUCT = ^KBDLLHOOKSTRUCT;
- {$EXTERNALSYM LPKBDLLHOOKSTRUCT}
- tagKBDLLHOOKSTRUCT = record
- vkCode: DWORD;
- scanCode: DWORD;
- flags: DWORD;
- time: DWORD;
- dwExtraInfo: ULONG_PTR;
- end;
- {$EXTERNALSYM tagKBDLLHOOKSTRUCT}
- KBDLLHOOKSTRUCT = tagKBDLLHOOKSTRUCT;
- {$EXTERNALSYM KBDLLHOOKSTRUCT}
- TKbDllHookStruct = KBDLLHOOKSTRUCT;
- PKbDllHookStruct = LPKBDLLHOOKSTRUCT;
-
-//
-// Structure used by WH_MOUSE_LL
-//
-
- LPMSLLHOOKSTRUCT = ^MSLLHOOKSTRUCT;
- {$EXTERNALSYM LPMSLLHOOKSTRUCT}
- tagMSLLHOOKSTRUCT = record
- pt: POINT;
- mouseData: DWORD;
- flags: DWORD;
- time: DWORD;
- dwExtraInfo: ULONG_PTR;
- end;
- {$EXTERNALSYM tagMSLLHOOKSTRUCT}
- MSLLHOOKSTRUCT = tagMSLLHOOKSTRUCT;
- {$EXTERNALSYM MSLLHOOKSTRUCT}
- TMsllHookStruct = MSLLHOOKSTRUCT;
- PMsllHookStruct = LPMSLLHOOKSTRUCT;
-
-//
-// Structure used by WH_DEBUG
-//
-
- LPDEBUGHOOKINFO = ^DEBUGHOOKINFO;
- {$EXTERNALSYM LPDEBUGHOOKINFO}
- tagDEBUGHOOKINFO = record
- idThread: DWORD;
- idThreadInstaller: DWORD;
- lParam: LPARAM;
- wParam: WPARAM;
- code: Integer;
- end;
- {$EXTERNALSYM tagDEBUGHOOKINFO}
- DEBUGHOOKINFO = tagDEBUGHOOKINFO;
- {$EXTERNALSYM DEBUGHOOKINFO}
- NPDEBUGHOOKINFO = ^DEBUGHOOKINFO;
- {$EXTERNALSYM NPDEBUGHOOKINFO}
- TDebugHookInfo = DEBUGHOOKINFO;
- PDebugHookInfo = LPDEBUGHOOKINFO;
-
-//
-// Structure used by WH_MOUSE
-//
-
- LPMOUSEHOOKSTRUCT = ^MOUSEHOOKSTRUCT;
- {$EXTERNALSYM LPMOUSEHOOKSTRUCT}
- tagMOUSEHOOKSTRUCT = record
- pt: POINT;
- hwnd: HWND;
- wHitTestCode: UINT;
- dwExtraInfo: ULONG_PTR;
- end;
- {$EXTERNALSYM tagMOUSEHOOKSTRUCT}
- MOUSEHOOKSTRUCT = tagMOUSEHOOKSTRUCT;
- {$EXTERNALSYM MOUSEHOOKSTRUCT}
- TMouseHookStruct = MOUSEHOOKSTRUCT;
- PMouseHookStruct = LPMOUSEHOOKSTRUCT;
-
- LPMOUSEHOOKSTRUCTEX = ^MOUSEHOOKSTRUCTEX;
- {$EXTERNALSYM LPMOUSEHOOKSTRUCTEX}
- tagMOUSEHOOKSTRUCTEX = record
- mhs: MOUSEHOOKSTRUCT;
- mouseData: DWORD;
- end;
- {$EXTERNALSYM tagMOUSEHOOKSTRUCTEX}
- MOUSEHOOKSTRUCTEX = tagMOUSEHOOKSTRUCTEX;
- {$EXTERNALSYM MOUSEHOOKSTRUCTEX}
- TMouseHookStructEx = MOUSEHOOKSTRUCTEX;
- PMouseHookStructEx = LPMOUSEHOOKSTRUCTEX;
-
-//
-// Structure used by WH_HARDWARE
-//
-
- LPHARDWAREHOOKSTRUCT = ^HARDWAREHOOKSTRUCT;
- {$EXTERNALSYM LPHARDWAREHOOKSTRUCT}
- tagHARDWAREHOOKSTRUCT = record
- hwnd: HWND;
- message: UINT;
- wParam: WPARAM;
- lParam: LPARAM;
- end;
- {$EXTERNALSYM tagHARDWAREHOOKSTRUCT}
- HARDWAREHOOKSTRUCT = tagHARDWAREHOOKSTRUCT;
- {$EXTERNALSYM HARDWAREHOOKSTRUCT}
- THardwareHookStruct = HARDWAREHOOKSTRUCT;
- PHardwareHookStruct = LPHARDWAREHOOKSTRUCT;
-
-//
-// Keyboard Layout API
-//
-
-const
- HKL_PREV = 0;
- {$EXTERNALSYM HKL_PREV}
- HKL_NEXT = 1;
- {$EXTERNALSYM HKL_NEXT}
-
- KLF_ACTIVATE = $00000001;
- {$EXTERNALSYM KLF_ACTIVATE}
- KLF_SUBSTITUTE_OK = $00000002;
- {$EXTERNALSYM KLF_SUBSTITUTE_OK}
- KLF_REORDER = $00000008;
- {$EXTERNALSYM KLF_REORDER}
- KLF_REPLACELANG = $00000010;
- {$EXTERNALSYM KLF_REPLACELANG}
- KLF_NOTELLSHELL = $00000080;
- {$EXTERNALSYM KLF_NOTELLSHELL}
- KLF_SETFORPROCESS = $00000100;
- {$EXTERNALSYM KLF_SETFORPROCESS}
- KLF_SHIFTLOCK = $00010000;
- {$EXTERNALSYM KLF_SHIFTLOCK}
- KLF_RESET = $40000000;
- {$EXTERNALSYM KLF_RESET}
-
-//
-// Bits in wParam of WM_INPUTLANGCHANGEREQUEST message
-//
-
- INPUTLANGCHANGE_SYSCHARSET = $0001;
- {$EXTERNALSYM INPUTLANGCHANGE_SYSCHARSET}
- INPUTLANGCHANGE_FORWARD = $0002;
- {$EXTERNALSYM INPUTLANGCHANGE_FORWARD}
- INPUTLANGCHANGE_BACKWARD = $0004;
- {$EXTERNALSYM INPUTLANGCHANGE_BACKWARD}
-
-//
-// Size of KeyboardLayoutName (number of characters), including nul terminator
-//
-
- KL_NAMELENGTH = 9;
- {$EXTERNALSYM KL_NAMELENGTH}
-
-function LoadKeyboardLayoutA(pwszKLID: LPCSTR; Flags: UINT): HKL; stdcall;
-{$EXTERNALSYM LoadKeyboardLayoutA}
-function LoadKeyboardLayoutW(pwszKLID: LPCWSTR; Flags: UINT): HKL; stdcall;
-{$EXTERNALSYM LoadKeyboardLayoutW}
-function LoadKeyboardLayout(pwszKLID: LPCTSTR; Flags: UINT): HKL; stdcall;
-{$EXTERNALSYM LoadKeyboardLayout}
-
-function ActivateKeyboardLayout(hkl: HKL; Flags: UINT): HKL; stdcall;
-{$EXTERNALSYM ActivateKeyboardLayout}
-
-function ToUnicodeEx(wVirtKey, wScanCode: UINT; lpKeyState: PBYTE;
- pwszBuff: LPWSTR; cchBuff: Integer; wFlags: UINT; dwhkl: HKL): Integer; stdcall;
-{$EXTERNALSYM ToUnicodeEx}
-
-function UnloadKeyboardLayout(hkl: HKL): BOOL; stdcall;
-{$EXTERNALSYM UnloadKeyboardLayout}
-
-function GetKeyboardLayoutNameA(pwszKLID: LPSTR): BOOL; stdcall;
-{$EXTERNALSYM GetKeyboardLayoutNameA}
-function GetKeyboardLayoutNameW(pwszKLID: LPWSTR): BOOL; stdcall;
-{$EXTERNALSYM GetKeyboardLayoutNameW}
-function GetKeyboardLayoutName(pwszKLID: LPTSTR): BOOL; stdcall;
-{$EXTERNALSYM GetKeyboardLayoutName}
-
-function GetKeyboardLayoutList(nBuff: Integer; lpList: PHKL): Integer; stdcall;
-{$EXTERNALSYM GetKeyboardLayoutList}
-
-function GetKeyboardLayout(idThread: DWORD): HKL; stdcall;
-{$EXTERNALSYM GetKeyboardLayout}
-
-type
- LPMOUSEMOVEPOINT = ^MOUSEMOVEPOINT;
- {$EXTERNALSYM LPMOUSEMOVEPOINT}
- tagMOUSEMOVEPOINT = record
- x: Integer;
- y: Integer;
- time: DWORD;
- dwExtraInfo: ULONG_PTR;
- end;
- {$EXTERNALSYM tagMOUSEMOVEPOINT}
- MOUSEMOVEPOINT = tagMOUSEMOVEPOINT;
- {$EXTERNALSYM MOUSEMOVEPOINT}
- TMouseMovePoint = MOUSEMOVEPOINT;
- PMouseMovePoint = LPMOUSEMOVEPOINT;
-
-//
-// Values for resolution parameter of GetMouseMovePointsEx
-//
-
-const
- GMMP_USE_DISPLAY_POINTS = 1;
- {$EXTERNALSYM GMMP_USE_DISPLAY_POINTS}
- GMMP_USE_HIGH_RESOLUTION_POINTS = 2;
- {$EXTERNALSYM GMMP_USE_HIGH_RESOLUTION_POINTS}
-
-function GetMouseMovePointsEx(cbSize: UINT; lppt, lpptBuf: LPMOUSEMOVEPOINT;
- nBufPoints: Integer; resolution: DWORD): Integer; stdcall;
-{$EXTERNALSYM GetMouseMovePointsEx}
-
-//
-// Desktop-specific access flags
-//
-
-const
- DESKTOP_READOBJECTS = $0001;
- {$EXTERNALSYM DESKTOP_READOBJECTS}
- DESKTOP_CREATEWINDOW = $0002;
- {$EXTERNALSYM DESKTOP_CREATEWINDOW}
- DESKTOP_CREATEMENU = $0004;
- {$EXTERNALSYM DESKTOP_CREATEMENU}
- DESKTOP_HOOKCONTROL = $0008;
- {$EXTERNALSYM DESKTOP_HOOKCONTROL}
- DESKTOP_JOURNALRECORD = $0010;
- {$EXTERNALSYM DESKTOP_JOURNALRECORD}
- DESKTOP_JOURNALPLAYBACK = $0020;
- {$EXTERNALSYM DESKTOP_JOURNALPLAYBACK}
- DESKTOP_ENUMERATE = $0040;
- {$EXTERNALSYM DESKTOP_ENUMERATE}
- DESKTOP_WRITEOBJECTS = $0080;
- {$EXTERNALSYM DESKTOP_WRITEOBJECTS}
- DESKTOP_SWITCHDESKTOP = $0100;
- {$EXTERNALSYM DESKTOP_SWITCHDESKTOP}
-
-//
-// Desktop-specific control flags
-//
-
- DF_ALLOWOTHERACCOUNTHOOK = $0001;
- {$EXTERNALSYM DF_ALLOWOTHERACCOUNTHOOK}
-
-function CreateDesktopA(lpszDesktop, lpszDevice: LPCSTR; pDevmode: LPDEVMODEA;
- dwFlags: DWORD; dwDesiredAccess: ACCESS_MASK; lpsa: LPSECURITY_ATTRIBUTES): HDESK; stdcall;
-{$EXTERNALSYM CreateDesktopA}
-function CreateDesktopW(lpszDesktop, lpszDevice: LPCWSTR; pDevmode: LPDEVMODEW;
- dwFlags: DWORD; dwDesiredAccess: ACCESS_MASK; lpsa: LPSECURITY_ATTRIBUTES): HDESK; stdcall;
-{$EXTERNALSYM CreateDesktopW}
-function CreateDesktop(lpszDesktop, lpszDevice: LPCTSTR; pDevmode: LPDEVMODE;
- dwFlags: DWORD; dwDesiredAccess: ACCESS_MASK; lpsa: LPSECURITY_ATTRIBUTES): HDESK; stdcall;
-{$EXTERNALSYM CreateDesktop}
-
-function OpenDesktopA(lpszDesktop: LPCSTR; dwFlags: DWORD; fInherit: BOOL;
- dwDesiredAccess: ACCESS_MASK): HDESK; stdcall;
-{$EXTERNALSYM OpenDesktopA}
-function OpenDesktopW(lpszDesktop: LPCWSTR; dwFlags: DWORD; fInherit: BOOL;
- dwDesiredAccess: ACCESS_MASK): HDESK; stdcall;
-{$EXTERNALSYM OpenDesktopW}
-function OpenDesktop(lpszDesktop: LPCTSTR; dwFlags: DWORD; fInherit: BOOL;
- dwDesiredAccess: ACCESS_MASK): HDESK; stdcall;
-{$EXTERNALSYM OpenDesktop}
-
-function OpenInputDesktop(dwFlags: DWORD; fInherit: BOOL;
- dwDesiredAccess: ACCESS_MASK): HDESK; stdcall;
-{$EXTERNALSYM OpenInputDesktop}
-
-function EnumDesktopsA(hwinsta: HWINSTA; lpEnumFunc: DESKTOPENUMPROCA;
- lParam: LPARAM): BOOL; stdcall;
-{$EXTERNALSYM EnumDesktopsA}
-function EnumDesktopsW(hwinsta: HWINSTA; lpEnumFunc: DESKTOPENUMPROCW;
- lParam: LPARAM): BOOL; stdcall;
-{$EXTERNALSYM EnumDesktopsW}
-function EnumDesktops(hwinsta: HWINSTA; lpEnumFunc: DESKTOPENUMPROC;
- lParam: LPARAM): BOOL; stdcall;
-{$EXTERNALSYM EnumDesktops}
-
-function EnumDesktopWindows(hDesktop: HDESK; lpfn: WNDENUMPROC; lParam: LPARAM): BOOL; stdcall;
-{$EXTERNALSYM EnumDesktopWindows}
-
-function SwitchDesktop(hDesktop: HDESK): BOOL; stdcall;
-{$EXTERNALSYM SwitchDesktop}
-
-function SetThreadDesktop(hDesktop: HDESK): BOOL; stdcall;
-{$EXTERNALSYM SetThreadDesktop}
-
-function CloseDesktop(hDesktop: HDESK): BOOL; stdcall;
-{$EXTERNALSYM CloseDesktop}
-
-function GetThreadDesktop(dwThreadId: DWORD): HDESK; stdcall;
-{$EXTERNALSYM GetThreadDesktop}
-
-//
-// Windowstation-specific access flags
-//
-
-const
- WINSTA_ENUMDESKTOPS = $0001;
- {$EXTERNALSYM WINSTA_ENUMDESKTOPS}
- WINSTA_READATTRIBUTES = $0002;
- {$EXTERNALSYM WINSTA_READATTRIBUTES}
- WINSTA_ACCESSCLIPBOARD = $0004;
- {$EXTERNALSYM WINSTA_ACCESSCLIPBOARD}
- WINSTA_CREATEDESKTOP = $0008;
- {$EXTERNALSYM WINSTA_CREATEDESKTOP}
- WINSTA_WRITEATTRIBUTES = $0010;
- {$EXTERNALSYM WINSTA_WRITEATTRIBUTES}
- WINSTA_ACCESSGLOBALATOMS = $0020;
- {$EXTERNALSYM WINSTA_ACCESSGLOBALATOMS}
- WINSTA_EXITWINDOWS = $0040;
- {$EXTERNALSYM WINSTA_EXITWINDOWS}
- WINSTA_ENUMERATE = $0100;
- {$EXTERNALSYM WINSTA_ENUMERATE}
- WINSTA_READSCREEN = $0200;
- {$EXTERNALSYM WINSTA_READSCREEN}
-
- WINSTA_ALL_ACCESS = (WINSTA_ENUMDESKTOPS or WINSTA_READATTRIBUTES or WINSTA_ACCESSCLIPBOARD or
- WINSTA_CREATEDESKTOP or WINSTA_WRITEATTRIBUTES or WINSTA_ACCESSGLOBALATOMS or
- WINSTA_EXITWINDOWS or WINSTA_ENUMERATE or WINSTA_READSCREEN);
- {$EXTERNALSYM WINSTA_ALL_ACCESS}
-
-//
-// Windowstation creation flags.
-//
-
- CWF_CREATE_ONLY = $0001;
- {$EXTERNALSYM CWF_CREATE_ONLY}
-
-//
-// Windowstation-specific attribute flags
-//
-
- WSF_VISIBLE = $0001;
- {$EXTERNALSYM WSF_VISIBLE}
-
-function CreateWindowStationA(lpwinsta: LPCSTR; dwFlags: DWORD;
- dwDesiredAccess: ACCESS_MASK; lpsa: LPSECURITY_ATTRIBUTES): HWINSTA; stdcall;
-{$EXTERNALSYM CreateWindowStationA}
-function CreateWindowStationW(lpwinsta: LPCWSTR; dwFlags: DWORD;
- dwDesiredAccess: ACCESS_MASK; lpsa: LPSECURITY_ATTRIBUTES): HWINSTA; stdcall;
-{$EXTERNALSYM CreateWindowStationW}
-function CreateWindowStation(lpwinsta: LPCTSTR; dwFlags: DWORD;
- dwDesiredAccess: ACCESS_MASK; lpsa: LPSECURITY_ATTRIBUTES): HWINSTA; stdcall;
-{$EXTERNALSYM CreateWindowStation}
-
-function OpenWindowStationA(lpszWinSta: LPCSTR; fInherit: BOOL;
- dwDesiredAccess: ACCESS_MASK): HWINSTA; stdcall;
-{$EXTERNALSYM OpenWindowStationA}
-function OpenWindowStationW(lpszWinSta: LPCWSTR; fInherit: BOOL;
- dwDesiredAccess: ACCESS_MASK): HWINSTA; stdcall;
-{$EXTERNALSYM OpenWindowStationW}
-function OpenWindowStation(lpszWinSta: LPCTSTR; fInherit: BOOL;
- dwDesiredAccess: ACCESS_MASK): HWINSTA; stdcall;
-{$EXTERNALSYM OpenWindowStation}
-
-function EnumWindowStationsA(lpEnumFunc: WINSTAENUMPROCA; lParam: LPARAM): BOOL; stdcall;
-{$EXTERNALSYM EnumWindowStationsA}
-function EnumWindowStationsW(lpEnumFunc: WINSTAENUMPROCW; lParam: LPARAM): BOOL; stdcall;
-{$EXTERNALSYM EnumWindowStationsW}
-function EnumWindowStations(lpEnumFunc: WINSTAENUMPROC; lParam: LPARAM): BOOL; stdcall;
-{$EXTERNALSYM EnumWindowStations}
-
-function CloseWindowStation(hWinSta: HWINSTA): BOOL; stdcall;
-{$EXTERNALSYM CloseWindowStation}
-
-function SetProcessWindowStation(hWinSta: HWINSTA): BOOL; stdcall;
-{$EXTERNALSYM SetProcessWindowStation}
-
-function GetProcessWindowStation: HWINSTA; stdcall;
-{$EXTERNALSYM GetProcessWindowStation}
-
-function SetUserObjectSecurity(hObj: HANDLE; var pSIRequested: SECURITY_INFORMATION;
- pSID: PSECURITY_DESCRIPTOR): BOOL; stdcall;
-{$EXTERNALSYM SetUserObjectSecurity}
-
-function GetUserObjectSecurity(hObj: HANDLE; var pSIRequested: SECURITY_INFORMATION;
- pSID: PSECURITY_DESCRIPTOR; nLength: DWORD; var lpnLengthNeeded: DWORD): BOOL; stdcall;
-{$EXTERNALSYM GetUserObjectSecurity}
-
-const
- UOI_FLAGS = 1;
- {$EXTERNALSYM UOI_FLAGS}
- UOI_NAME = 2;
- {$EXTERNALSYM UOI_NAME}
- UOI_TYPE = 3;
- {$EXTERNALSYM UOI_TYPE}
- UOI_USER_SID = 4;
- {$EXTERNALSYM UOI_USER_SID}
-
-type
- PUSEROBJECTFLAGS = ^USEROBJECTFLAGS;
- tagUSEROBJECTFLAGS = record
- fInherit: BOOL;
- fReserved: BOOL;
- dwFlags: DWORD;
- end;
- {$EXTERNALSYM tagUSEROBJECTFLAGS}
- USEROBJECTFLAGS = tagUSEROBJECTFLAGS;
- {$EXTERNALSYM USEROBJECTFLAGS}
- TUserObjectFlags = USEROBJECTFLAGS;
-
-function GetUserObjectInformationA(hObj: HANDLE; nIndex: Integer; pvInfo: PVOID;
- nLength: DWORD; var lpnLengthNeeded: DWORD): BOOL; stdcall;
-{$EXTERNALSYM GetUserObjectInformationA}
-function GetUserObjectInformationW(hObj: HANDLE; nIndex: Integer; pvInfo: PVOID;
- nLength: DWORD; var lpnLengthNeeded: DWORD): BOOL; stdcall;
-{$EXTERNALSYM GetUserObjectInformationW}
-function GetUserObjectInformation(hObj: HANDLE; nIndex: Integer; pvInfo: PVOID;
- nLength: DWORD; var lpnLengthNeeded: DWORD): BOOL; stdcall;
-{$EXTERNALSYM GetUserObjectInformation}
-
-function SetUserObjectInformationA(hObj: HANDLE; nIndex: Integer; pvInfo: PVOID;
- nLength: DWORD): BOOL; stdcall;
-{$EXTERNALSYM SetUserObjectInformationA}
-function SetUserObjectInformationW(hObj: HANDLE; nIndex: Integer; pvInfo: PVOID;
- nLength: DWORD): BOOL; stdcall;
-{$EXTERNALSYM SetUserObjectInformationW}
-function SetUserObjectInformation(hObj: HANDLE; nIndex: Integer; pvInfo: PVOID;
- nLength: DWORD): BOOL; stdcall;
-{$EXTERNALSYM SetUserObjectInformation}
-
-type
- LPWNDCLASSEXA = ^WNDCLASSEXA;
- {$EXTERNALSYM LPWNDCLASSEXA}
- tagWNDCLASSEXA = record
- cbSize: UINT;
- // Win 3.x
- style: UINT;
- lpfnWndProc: WNDPROC;
- cbClsExtra: Integer;
- cbWndExtra: Integer;
- hInstance: HINSTANCE;
- hIcon: HICON;
- hCursor: HCURSOR;
- hbrBackground: HBRUSH;
- lpszMenuName: LPCSTR;
- lpszClassName: LPCSTR;
- // Win 4.0
- hIconSm: HICON;
- end;
- {$EXTERNALSYM tagWNDCLASSEXA}
- WNDCLASSEXA = tagWNDCLASSEXA;
- {$EXTERNALSYM WNDCLASSEXA}
- NPWNDCLASSEXA = ^WNDCLASSEXA;
- {$EXTERNALSYM NPWNDCLASSEXA}
- TWndClassExA = WNDCLASSEXA;
- PWndClassExA = LPWNDCLASSEXA;
-
- LPWNDCLASSEXW = ^WNDCLASSEXW;
- {$EXTERNALSYM LPWNDCLASSEXW}
- tagWNDCLASSEXW = record
- cbSize: UINT;
- // Win 3.x
- style: UINT;
- lpfnWndProc: WNDPROC;
- cbClsExtra: Integer;
- cbWndExtra: Integer;
- hInstance: HINSTANCE;
- hIcon: HICON;
- hCursor: HCURSOR;
- hbrBackground: HBRUSH;
- lpszMenuName: LPCWSTR;
- lpszClassName: LPCWSTR;
- // Win 4.0
- hIconSm: HICON;
- end;
- {$EXTERNALSYM tagWNDCLASSEXW}
- WNDCLASSEXW = tagWNDCLASSEXW;
- {$EXTERNALSYM WNDCLASSEXW}
- NPWNDCLASSEXW = ^WNDCLASSEXW;
- {$EXTERNALSYM NPWNDCLASSEXW}
- TWndClassExW = WNDCLASSEXW;
- PWndClassExW = LPWNDCLASSEXW;
-
- {$IFDEF UNICODE}
- WNDCLASSEX = WNDCLASSEXW;
- {$EXTERNALSYM WNDCLASSEX}
- NPWNDCLASSEX = NPWNDCLASSEXW;
- {$EXTERNALSYM NPWNDCLASSEX}
- LPWNDCLASSEX = LPWNDCLASSEXW;
- {$EXTERNALSYM LPWNDCLASSEX}
- TWndClassEx = TWndClassExW;
- PWndClassEx = PWndClassExW;
- {$ELSE}
- WNDCLASSEX = WNDCLASSEXA;
- {$EXTERNALSYM WNDCLASSEX}
- NPWNDCLASSEX = NPWNDCLASSEXA;
- {$EXTERNALSYM NPWNDCLASSEX}
- LPWNDCLASSEX = LPWNDCLASSEXA;
- {$EXTERNALSYM LPWNDCLASSEX}
- TWndClassEx = TWndClassExA;
- PWndClassEx = PWndClassExA;
- {$ENDIF UNICODE}
-
- LPWNDCLASSA = ^WNDCLASSA;
- {$EXTERNALSYM LPWNDCLASSA}
- tagWNDCLASSA = record
- style: UINT;
- lpfnWndProc: WNDPROC;
- cbClsExtra: Integer;
- cbWndExtra: Integer;
- hInstance: HINSTANCE;
- hIcon: HICON;
- hCursor: HCURSOR;
- hbrBackground: HBRUSH;
- lpszMenuName: LPCSTR;
- lpszClassName: LPCSTR;
- end;
- {$EXTERNALSYM tagWNDCLASSA}
- WNDCLASSA = tagWNDCLASSA;
- {$EXTERNALSYM WNDCLASSA}
- NPWNDCLASSA = ^WNDCLASSA;
- {$EXTERNALSYM NPWNDCLASSA}
- TWndClassA = WNDCLASSA;
- PWndClassA = LPWNDCLASSA;
-
- LPWNDCLASSW = ^WNDCLASSW;
- {$EXTERNALSYM LPWNDCLASSW}
- tagWNDCLASSW = record
- style: UINT;
- lpfnWndProc: WNDPROC;
- cbClsExtra: Integer;
- cbWndExtra: Integer;
- hInstance: HINSTANCE;
- hIcon: HICON;
- hCursor: HCURSOR;
- hbrBackground: HBRUSH;
- lpszMenuName: LPCWSTR;
- lpszClassName: LPCWSTR;
- end;
- {$EXTERNALSYM tagWNDCLASSW}
- WNDCLASSW = tagWNDCLASSW;
- {$EXTERNALSYM WNDCLASSW}
- NPWNDCLASSW = ^WNDCLASSW;
- {$EXTERNALSYM NPWNDCLASSW}
- TWndClassW = WNDCLASSW;
- PWndClassW = LPWNDCLASSW;
-
- {$IFDEF UNICODE}
- WNDCLASS = WNDCLASSW;
- {$EXTERNALSYM WNDCLASS}
- NPWNDCLASS = NPWNDCLASSW;
- {$EXTERNALSYM NPWNDCLASS}
- LPWNDCLASS = LPWNDCLASSW;
- {$EXTERNALSYM LPWNDCLASS}
- TWndClass = TWndClassW;
- PWndClass = PWndClassW;
- {$ELSE}
- WNDCLASS = WNDCLASSA;
- {$EXTERNALSYM WNDCLASS}
- NPWNDCLASS = NPWNDCLASSA;
- {$EXTERNALSYM NPWNDCLASS}
- LPWNDCLASS = LPWNDCLASSA;
- {$EXTERNALSYM LPWNDCLASS}
- TWndClass = TWndClassA;
- PWndClass = PWndClassA;
- {$ENDIF UNICODE}
-
-function IsHungAppWindow(hwnd: HWND): BOOL; stdcall;
-{$EXTERNALSYM IsHungAppWindow}
-
-procedure DisableProcessWindowsGhosting; stdcall;
-{$EXTERNALSYM DisableProcessWindowsGhosting}
-
-//
-// Message structure
-//
-
-type
- LPMSG = ^MSG;
- {$EXTERNALSYM LPMSG}
- tagMSG = record
- hwnd: HWND;
- message: UINT;
- wParam: WPARAM;
- lParam: LPARAM;
- time: DWORD;
- pt: POINT;
- end;
- {$EXTERNALSYM tagMSG}
- MSG = tagMSG;
- {$EXTERNALSYM MSG}
- NPMSG = ^MSG;
- {$EXTERNALSYM NPMSG}
- TMsg = MSG;
- PMsg = LPMSG;
-
-function MAKEWPARAM(wLow, wHigh: WORD): WPARAM;
-{$EXTERNALSYM MAKEWPARAM}
-
-function MAKELPARAM(wLow, wHigh: WORD): LPARAM;
-{$EXTERNALSYM MAKELPARAM}
-
-function MAKELRESULT(wLow, wHigh: WORD): LRESULT;
-{$EXTERNALSYM MAKELRESULT}
-
-//
-// Window field offsets for GetWindowLong()
-//
-
-const
- GWL_WNDPROC = -4;
- {$EXTERNALSYM GWL_WNDPROC}
- GWL_HINSTANCE = -6;
- {$EXTERNALSYM GWL_HINSTANCE}
- GWL_HWNDPARENT = -8;
- {$EXTERNALSYM GWL_HWNDPARENT}
- GWL_STYLE = -16;
- {$EXTERNALSYM GWL_STYLE}
- GWL_EXSTYLE = -20;
- {$EXTERNALSYM GWL_EXSTYLE}
- GWL_USERDATA = -21;
- {$EXTERNALSYM GWL_USERDATA}
- GWL_ID = -12;
- {$EXTERNALSYM GWL_ID}
-
- GWLP_WNDPROC = -4;
- {$EXTERNALSYM GWLP_WNDPROC}
- GWLP_HINSTANCE = -6;
- {$EXTERNALSYM GWLP_HINSTANCE}
- GWLP_HWNDPARENT = -8;
- {$EXTERNALSYM GWLP_HWNDPARENT}
- GWLP_USERDATA = -21;
- {$EXTERNALSYM GWLP_USERDATA}
- GWLP_ID = -12;
- {$EXTERNALSYM GWLP_ID}
-
-//
-// Class field offsets for GetClassLong()
-//
-
- GCL_MENUNAME = DWORD(-8);
- {$EXTERNALSYM GCL_MENUNAME}
- GCL_HBRBACKGROUND = DWORD(-10);
- {$EXTERNALSYM GCL_HBRBACKGROUND}
- GCL_HCURSOR = DWORD(-12);
- {$EXTERNALSYM GCL_HCURSOR}
- GCL_HICON = DWORD(-14);
- {$EXTERNALSYM GCL_HICON}
- GCL_HMODULE = DWORD(-16);
- {$EXTERNALSYM GCL_HMODULE}
- GCL_CBWNDEXTRA = DWORD(-18);
- {$EXTERNALSYM GCL_CBWNDEXTRA}
- GCL_CBCLSEXTRA = DWORD(-20);
- {$EXTERNALSYM GCL_CBCLSEXTRA}
- GCL_WNDPROC = DWORD(-24);
- {$EXTERNALSYM GCL_WNDPROC}
- GCL_STYLE = DWORD(-26);
- {$EXTERNALSYM GCL_STYLE}
- GCW_ATOM = DWORD(-32);
- {$EXTERNALSYM GCW_ATOM}
-
- GCL_HICONSM = DWORD(-34);
- {$EXTERNALSYM GCL_HICONSM}
-
- GCLP_MENUNAME = DWORD(-8);
- {$EXTERNALSYM GCLP_MENUNAME}
- GCLP_HBRBACKGROUND = DWORD(-10);
- {$EXTERNALSYM GCLP_HBRBACKGROUND}
- GCLP_HCURSOR = DWORD(-12);
- {$EXTERNALSYM GCLP_HCURSOR}
- GCLP_HICON = DWORD(-14);
- {$EXTERNALSYM GCLP_HICON}
- GCLP_HMODULE = DWORD(-16);
- {$EXTERNALSYM GCLP_HMODULE}
- GCLP_WNDPROC = DWORD(-24);
- {$EXTERNALSYM GCLP_WNDPROC}
- GCLP_HICONSM = DWORD(-34);
- {$EXTERNALSYM GCLP_HICONSM}
-
-//
-// Window Messages
-//
-
- WM_NULL = $0000;
- {$EXTERNALSYM WM_NULL}
- WM_CREATE = $0001;
- {$EXTERNALSYM WM_CREATE}
- WM_DESTROY = $0002;
- {$EXTERNALSYM WM_DESTROY}
- WM_MOVE = $0003;
- {$EXTERNALSYM WM_MOVE}
- WM_SIZE = $0005;
- {$EXTERNALSYM WM_SIZE}
-
- WM_ACTIVATE = $0006;
- {$EXTERNALSYM WM_ACTIVATE}
-
-//
-// WM_ACTIVATE state values
-//
-
- WA_INACTIVE = 0;
- {$EXTERNALSYM WA_INACTIVE}
- WA_ACTIVE = 1;
- {$EXTERNALSYM WA_ACTIVE}
- WA_CLICKACTIVE = 2;
- {$EXTERNALSYM WA_CLICKACTIVE}
-
- WM_SETFOCUS = $0007;
- {$EXTERNALSYM WM_SETFOCUS}
- WM_KILLFOCUS = $0008;
- {$EXTERNALSYM WM_KILLFOCUS}
- WM_ENABLE = $000A;
- {$EXTERNALSYM WM_ENABLE}
- WM_SETREDRAW = $000B;
- {$EXTERNALSYM WM_SETREDRAW}
- WM_SETTEXT = $000C;
- {$EXTERNALSYM WM_SETTEXT}
- WM_GETTEXT = $000D;
- {$EXTERNALSYM WM_GETTEXT}
- WM_GETTEXTLENGTH = $000E;
- {$EXTERNALSYM WM_GETTEXTLENGTH}
- WM_PAINT = $000F;
- {$EXTERNALSYM WM_PAINT}
- WM_CLOSE = $0010;
- {$EXTERNALSYM WM_CLOSE}
- WM_QUERYENDSESSION = $0011;
- {$EXTERNALSYM WM_QUERYENDSESSION}
- WM_QUERYOPEN = $0013;
- {$EXTERNALSYM WM_QUERYOPEN}
- WM_ENDSESSION = $0016;
- {$EXTERNALSYM WM_ENDSESSION}
- WM_QUIT = $0012;
- {$EXTERNALSYM WM_QUIT}
- WM_ERASEBKGND = $0014;
- {$EXTERNALSYM WM_ERASEBKGND}
- WM_SYSCOLORCHANGE = $0015;
- {$EXTERNALSYM WM_SYSCOLORCHANGE}
- WM_SHOWWINDOW = $0018;
- {$EXTERNALSYM WM_SHOWWINDOW}
- WM_WININICHANGE = $001A;
- {$EXTERNALSYM WM_WININICHANGE}
- WM_SETTINGCHANGE = WM_WININICHANGE;
- {$EXTERNALSYM WM_SETTINGCHANGE}
-
- WM_DEVMODECHANGE = $001B;
- {$EXTERNALSYM WM_DEVMODECHANGE}
- WM_ACTIVATEAPP = $001C;
- {$EXTERNALSYM WM_ACTIVATEAPP}
- WM_FONTCHANGE = $001D;
- {$EXTERNALSYM WM_FONTCHANGE}
- WM_TIMECHANGE = $001E;
- {$EXTERNALSYM WM_TIMECHANGE}
- WM_CANCELMODE = $001F;
- {$EXTERNALSYM WM_CANCELMODE}
- WM_SETCURSOR = $0020;
- {$EXTERNALSYM WM_SETCURSOR}
- WM_MOUSEACTIVATE = $0021;
- {$EXTERNALSYM WM_MOUSEACTIVATE}
- WM_CHILDACTIVATE = $0022;
- {$EXTERNALSYM WM_CHILDACTIVATE}
- WM_QUEUESYNC = $0023;
- {$EXTERNALSYM WM_QUEUESYNC}
-
- WM_GETMINMAXINFO = $0024;
- {$EXTERNALSYM WM_GETMINMAXINFO}
-
-//
-// Struct pointed to by WM_GETMINMAXINFO lParam
-//
-
-type
- LPMINMAXINFO = ^MINMAXINFO;
- {$EXTERNALSYM LPMINMAXINFO}
- tagMINMAXINFO = record
- ptReserved: POINT;
- ptMaxSize: POINT;
- ptMaxPosition: POINT;
- ptMinTrackSize: POINT;
- ptMaxTrackSize: POINT;
- end;
- {$EXTERNALSYM tagMINMAXINFO}
- MINMAXINFO = tagMINMAXINFO;
- {$EXTERNALSYM MINMAXINFO}
- TMinMaxInfo = MINMAXINFO;
- PMinMaxInfo = LPMINMAXINFO;
-
-const
- WM_PAINTICON = $0026;
- {$EXTERNALSYM WM_PAINTICON}
- WM_ICONERASEBKGND = $0027;
- {$EXTERNALSYM WM_ICONERASEBKGND}
- WM_NEXTDLGCTL = $0028;
- {$EXTERNALSYM WM_NEXTDLGCTL}
- WM_SPOOLERSTATUS = $002A;
- {$EXTERNALSYM WM_SPOOLERSTATUS}
- WM_DRAWITEM = $002B;
- {$EXTERNALSYM WM_DRAWITEM}
- WM_MEASUREITEM = $002C;
- {$EXTERNALSYM WM_MEASUREITEM}
- WM_DELETEITEM = $002D;
- {$EXTERNALSYM WM_DELETEITEM}
- WM_VKEYTOITEM = $002E;
- {$EXTERNALSYM WM_VKEYTOITEM}
- WM_CHARTOITEM = $002F;
- {$EXTERNALSYM WM_CHARTOITEM}
- WM_SETFONT = $0030;
- {$EXTERNALSYM WM_SETFONT}
- WM_GETFONT = $0031;
- {$EXTERNALSYM WM_GETFONT}
- WM_SETHOTKEY = $0032;
- {$EXTERNALSYM WM_SETHOTKEY}
- WM_GETHOTKEY = $0033;
- {$EXTERNALSYM WM_GETHOTKEY}
- WM_QUERYDRAGICON = $0037;
- {$EXTERNALSYM WM_QUERYDRAGICON}
- WM_COMPAREITEM = $0039;
- {$EXTERNALSYM WM_COMPAREITEM}
- WM_GETOBJECT = $003D;
- {$EXTERNALSYM WM_GETOBJECT}
- WM_COMPACTING = $0041;
- {$EXTERNALSYM WM_COMPACTING}
- WM_COMMNOTIFY = $0044; // no longer suported
- {$EXTERNALSYM WM_COMMNOTIFY}
- WM_WINDOWPOSCHANGING = $0046;
- {$EXTERNALSYM WM_WINDOWPOSCHANGING}
- WM_WINDOWPOSCHANGED = $0047;
- {$EXTERNALSYM WM_WINDOWPOSCHANGED}
-
- WM_POWER = $0048;
- {$EXTERNALSYM WM_POWER}
-
-//
-// wParam for WM_POWER window message and DRV_POWER driver notification
-//
-
- PWR_OK = 1;
- {$EXTERNALSYM PWR_OK}
- PWR_FAIL = DWORD(-1);
- {$EXTERNALSYM PWR_FAIL}
- PWR_SUSPENDREQUEST = 1;
- {$EXTERNALSYM PWR_SUSPENDREQUEST}
- PWR_SUSPENDRESUME = 2;
- {$EXTERNALSYM PWR_SUSPENDRESUME}
- PWR_CRITICALRESUME = 3;
- {$EXTERNALSYM PWR_CRITICALRESUME}
-
- WM_COPYDATA = $004A;
- {$EXTERNALSYM WM_COPYDATA}
- WM_CANCELJOURNAL = $004B;
- {$EXTERNALSYM WM_CANCELJOURNAL}
-
-//
-// lParam of WM_COPYDATA message points to...
-//
-
-type
- PCOPYDATASTRUCT = ^COPYDATASTRUCT;
- tagCOPYDATASTRUCT = record
- dwData: ULONG_PTR;
- cbData: DWORD;
- lpData: PVOID;
- end;
- {$EXTERNALSYM tagCOPYDATASTRUCT}
- COPYDATASTRUCT = tagCOPYDATASTRUCT;
- {$EXTERNALSYM COPYDATASTRUCT}
- TCopyDataStruct = COPYDATASTRUCT;
-
- LPMDINEXTMENU = ^MDINEXTMENU;
- {$EXTERNALSYM LPMDINEXTMENU}
- tagMDINEXTMENU = record
- hmenuIn: HMENU;
- hmenuNext: HMENU;
- hwndNext: HWND;
- end;
- {$EXTERNALSYM tagMDINEXTMENU}
- MDINEXTMENU = tagMDINEXTMENU;
- {$EXTERNALSYM MDINEXTMENU}
- TMdiNextMenu = MDINEXTMENU;
- PMdiNextMenu = LPMDINEXTMENU;
-
-const
- WM_NOTIFY = $004E;
- {$EXTERNALSYM WM_NOTIFY}
- WM_INPUTLANGCHANGEREQUEST = $0050;
- {$EXTERNALSYM WM_INPUTLANGCHANGEREQUEST}
- WM_INPUTLANGCHANGE = $0051;
- {$EXTERNALSYM WM_INPUTLANGCHANGE}
- WM_TCARD = $0052;
- {$EXTERNALSYM WM_TCARD}
- WM_HELP = $0053;
- {$EXTERNALSYM WM_HELP}
- WM_USERCHANGED = $0054;
- {$EXTERNALSYM WM_USERCHANGED}
- WM_NOTIFYFORMAT = $0055;
- {$EXTERNALSYM WM_NOTIFYFORMAT}
-
- NFR_ANSI = 1;
- {$EXTERNALSYM NFR_ANSI}
- NFR_UNICODE = 2;
- {$EXTERNALSYM NFR_UNICODE}
- NF_QUERY = 3;
- {$EXTERNALSYM NF_QUERY}
- NF_REQUERY = 4;
- {$EXTERNALSYM NF_REQUERY}
-
- WM_CONTEXTMENU = $007B;
- {$EXTERNALSYM WM_CONTEXTMENU}
- WM_STYLECHANGING = $007C;
- {$EXTERNALSYM WM_STYLECHANGING}
- WM_STYLECHANGED = $007D;
- {$EXTERNALSYM WM_STYLECHANGED}
- WM_DISPLAYCHANGE = $007E;
- {$EXTERNALSYM WM_DISPLAYCHANGE}
- WM_GETICON = $007F;
- {$EXTERNALSYM WM_GETICON}
- WM_SETICON = $0080;
- {$EXTERNALSYM WM_SETICON}
-
- WM_NCCREATE = $0081;
- {$EXTERNALSYM WM_NCCREATE}
- WM_NCDESTROY = $0082;
- {$EXTERNALSYM WM_NCDESTROY}
- WM_NCCALCSIZE = $0083;
- {$EXTERNALSYM WM_NCCALCSIZE}
- WM_NCHITTEST = $0084;
- {$EXTERNALSYM WM_NCHITTEST}
- WM_NCPAINT = $0085;
- {$EXTERNALSYM WM_NCPAINT}
- WM_NCACTIVATE = $0086;
- {$EXTERNALSYM WM_NCACTIVATE}
- WM_GETDLGCODE = $0087;
- {$EXTERNALSYM WM_GETDLGCODE}
- WM_SYNCPAINT = $0088;
- {$EXTERNALSYM WM_SYNCPAINT}
- WM_NCMOUSEMOVE = $00A0;
- {$EXTERNALSYM WM_NCMOUSEMOVE}
- WM_NCLBUTTONDOWN = $00A1;
- {$EXTERNALSYM WM_NCLBUTTONDOWN}
- WM_NCLBUTTONUP = $00A2;
- {$EXTERNALSYM WM_NCLBUTTONUP}
- WM_NCLBUTTONDBLCLK = $00A3;
- {$EXTERNALSYM WM_NCLBUTTONDBLCLK}
- WM_NCRBUTTONDOWN = $00A4;
- {$EXTERNALSYM WM_NCRBUTTONDOWN}
- WM_NCRBUTTONUP = $00A5;
- {$EXTERNALSYM WM_NCRBUTTONUP}
- WM_NCRBUTTONDBLCLK = $00A6;
- {$EXTERNALSYM WM_NCRBUTTONDBLCLK}
- WM_NCMBUTTONDOWN = $00A7;
- {$EXTERNALSYM WM_NCMBUTTONDOWN}
- WM_NCMBUTTONUP = $00A8;
- {$EXTERNALSYM WM_NCMBUTTONUP}
- WM_NCMBUTTONDBLCLK = $00A9;
- {$EXTERNALSYM WM_NCMBUTTONDBLCLK}
-
- WM_NCXBUTTONDOWN = $00AB;
- {$EXTERNALSYM WM_NCXBUTTONDOWN}
- WM_NCXBUTTONUP = $00AC;
- {$EXTERNALSYM WM_NCXBUTTONUP}
- WM_NCXBUTTONDBLCLK = $00AD;
- {$EXTERNALSYM WM_NCXBUTTONDBLCLK}
-
- WM_INPUT = $00FF;
- {$EXTERNALSYM WM_INPUT}
-
- WM_KEYFIRST = $0100;
- {$EXTERNALSYM WM_KEYFIRST}
- WM_KEYDOWN = $0100;
- {$EXTERNALSYM WM_KEYDOWN}
- WM_KEYUP = $0101;
- {$EXTERNALSYM WM_KEYUP}
- WM_CHAR = $0102;
- {$EXTERNALSYM WM_CHAR}
- WM_DEADCHAR = $0103;
- {$EXTERNALSYM WM_DEADCHAR}
- WM_SYSKEYDOWN = $0104;
- {$EXTERNALSYM WM_SYSKEYDOWN}
- WM_SYSKEYUP = $0105;
- {$EXTERNALSYM WM_SYSKEYUP}
- WM_SYSCHAR = $0106;
- {$EXTERNALSYM WM_SYSCHAR}
- WM_SYSDEADCHAR = $0107;
- {$EXTERNALSYM WM_SYSDEADCHAR}
- {$IFDEF WINXP_UP}
- WM_UNICHAR = $0109;
- {$EXTERNALSYM WM_UNICHAR}
- WM_KEYLAST = $0109;
- {$EXTERNALSYM WM_KEYLAST}
- UNICODE_NOCHAR = $FFFF;
- {$EXTERNALSYM UNICODE_NOCHAR}
- {$ELSE}
- WM_KEYLAST = $0108;
- {$EXTERNALSYM WM_KEYLAST}
- {$ENDIF WINXP_UP}
-
- WM_IME_STARTCOMPOSITION = $010D;
- {$EXTERNALSYM WM_IME_STARTCOMPOSITION}
- WM_IME_ENDCOMPOSITION = $010E;
- {$EXTERNALSYM WM_IME_ENDCOMPOSITION}
- WM_IME_COMPOSITION = $010F;
- {$EXTERNALSYM WM_IME_COMPOSITION}
- WM_IME_KEYLAST = $010F;
- {$EXTERNALSYM WM_IME_KEYLAST}
-
- WM_INITDIALOG = $0110;
- {$EXTERNALSYM WM_INITDIALOG}
- WM_COMMAND = $0111;
- {$EXTERNALSYM WM_COMMAND}
- WM_SYSCOMMAND = $0112;
- {$EXTERNALSYM WM_SYSCOMMAND}
- WM_TIMER = $0113;
- {$EXTERNALSYM WM_TIMER}
- WM_HSCROLL = $0114;
- {$EXTERNALSYM WM_HSCROLL}
- WM_VSCROLL = $0115;
- {$EXTERNALSYM WM_VSCROLL}
- WM_INITMENU = $0116;
- {$EXTERNALSYM WM_INITMENU}
- WM_INITMENUPOPUP = $0117;
- {$EXTERNALSYM WM_INITMENUPOPUP}
- WM_MENUSELECT = $011F;
- {$EXTERNALSYM WM_MENUSELECT}
- WM_MENUCHAR = $0120;
- {$EXTERNALSYM WM_MENUCHAR}
- WM_ENTERIDLE = $0121;
- {$EXTERNALSYM WM_ENTERIDLE}
- WM_MENURBUTTONUP = $0122;
- {$EXTERNALSYM WM_MENURBUTTONUP}
- WM_MENUDRAG = $0123;
- {$EXTERNALSYM WM_MENUDRAG}
- WM_MENUGETOBJECT = $0124;
- {$EXTERNALSYM WM_MENUGETOBJECT}
- WM_UNINITMENUPOPUP = $0125;
- {$EXTERNALSYM WM_UNINITMENUPOPUP}
- WM_MENUCOMMAND = $0126;
- {$EXTERNALSYM WM_MENUCOMMAND}
-
- WM_CHANGEUISTATE = $0127;
- {$EXTERNALSYM WM_CHANGEUISTATE}
- WM_UPDATEUISTATE = $0128;
- {$EXTERNALSYM WM_UPDATEUISTATE}
- WM_QUERYUISTATE = $0129;
- {$EXTERNALSYM WM_QUERYUISTATE}
-
-//
-// LOWORD(wParam) values in WM_*UISTATE*
-//
-
- UIS_SET = 1;
- {$EXTERNALSYM UIS_SET}
- UIS_CLEAR = 2;
- {$EXTERNALSYM UIS_CLEAR}
- UIS_INITIALIZE = 3;
- {$EXTERNALSYM UIS_INITIALIZE}
-
-//
-// HIWORD(wParam) values in WM_*UISTATE*
-//
-
- UISF_HIDEFOCUS = $1;
- {$EXTERNALSYM UISF_HIDEFOCUS}
- UISF_HIDEACCEL = $2;
- {$EXTERNALSYM UISF_HIDEACCEL}
- UISF_ACTIVE = $4;
- {$EXTERNALSYM UISF_ACTIVE}
-
- WM_CTLCOLORMSGBOX = $0132;
- {$EXTERNALSYM WM_CTLCOLORMSGBOX}
- WM_CTLCOLOREDIT = $0133;
- {$EXTERNALSYM WM_CTLCOLOREDIT}
- WM_CTLCOLORLISTBOX = $0134;
- {$EXTERNALSYM WM_CTLCOLORLISTBOX}
- WM_CTLCOLORBTN = $0135;
- {$EXTERNALSYM WM_CTLCOLORBTN}
- WM_CTLCOLORDLG = $0136;
- {$EXTERNALSYM WM_CTLCOLORDLG}
- WM_CTLCOLORSCROLLBAR = $0137;
- {$EXTERNALSYM WM_CTLCOLORSCROLLBAR}
- WM_CTLCOLORSTATIC = $0138;
- {$EXTERNALSYM WM_CTLCOLORSTATIC}
- MN_GETHMENU = $01E1;
- {$EXTERNALSYM MN_GETHMENU}
-
- WM_MOUSEFIRST = $0200;
- {$EXTERNALSYM WM_MOUSEFIRST}
- WM_MOUSEMOVE = $0200;
- {$EXTERNALSYM WM_MOUSEMOVE}
- WM_LBUTTONDOWN = $0201;
- {$EXTERNALSYM WM_LBUTTONDOWN}
- WM_LBUTTONUP = $0202;
- {$EXTERNALSYM WM_LBUTTONUP}
- WM_LBUTTONDBLCLK = $0203;
- {$EXTERNALSYM WM_LBUTTONDBLCLK}
- WM_RBUTTONDOWN = $0204;
- {$EXTERNALSYM WM_RBUTTONDOWN}
- WM_RBUTTONUP = $0205;
- {$EXTERNALSYM WM_RBUTTONUP}
- WM_RBUTTONDBLCLK = $0206;
- {$EXTERNALSYM WM_RBUTTONDBLCLK}
- WM_MBUTTONDOWN = $0207;
- {$EXTERNALSYM WM_MBUTTONDOWN}
- WM_MBUTTONUP = $0208;
- {$EXTERNALSYM WM_MBUTTONUP}
- WM_MBUTTONDBLCLK = $0209;
- {$EXTERNALSYM WM_MBUTTONDBLCLK}
- WM_MOUSEWHEEL = $020A;
- {$EXTERNALSYM WM_MOUSEWHEEL}
- WM_XBUTTONDOWN = $020B;
- {$EXTERNALSYM WM_XBUTTONDOWN}
- WM_XBUTTONUP = $020C;
- {$EXTERNALSYM WM_XBUTTONUP}
- WM_XBUTTONDBLCLK = $020D;
- {$EXTERNALSYM WM_XBUTTONDBLCLK}
-
- {$IFDEF WIN2000_UP}
- WM_MOUSELAST = $020D;
- {$EXTERNALSYM WM_MOUSELAST}
- {$ELSE}
- {$IFDEF WINNT4}
- WM_MOUSELAST = $020A;
- {$EXTERNALSYM WM_MOUSELAST}
- {$ELSE}
- {$IFDEF WIN95_UP}
- WM_MOUSELAST = $020A;
- {$EXTERNALSYM WM_MOUSELAST}
- {$ELSE}
- WM_MOUSELAST = $0209;
- {$EXTERNALSYM WM_MOUSELAST}
- {$ENDIF WIN95_UP}
- {$ENDIF WINNT4}
- {$ENDIF WIN2000_UP}
-
-// Value for rolling one detent//
-
- WHEEL_DELTA = 120;
- {$EXTERNALSYM WHEEL_DELTA}
-
-function GET_WHEEL_DELTA_WPARAM(wParam: WPARAM): SHORT;
-{$EXTERNALSYM GET_WHEEL_DELTA_WPARAM(wParam)}
-
-// Setting to scroll one page for SPI_GET/SETWHEELSCROLLLINES//
-
-const
- WHEEL_PAGESCROLL = UINT_MAX;
- {$EXTERNALSYM WHEEL_PAGESCROLL}
-
-function GET_KEYSTATE_WPARAM(wParam: WPARAM): Integer;
-{$EXTERNALSYM GET_KEYSTATE_WPARAM}
-function GET_NCHITTEST_WPARAM(wParam: WPARAM): Shortint;
-{$EXTERNALSYM GET_NCHITTEST_WPARAM}
-function GET_XBUTTON_WPARAM(wParam: WPARAM): Integer;
-{$EXTERNALSYM GET_XBUTTON_WPARAM}
-
-// XButton values are WORD flags//
-
-const
- XBUTTON1 = $0001;
- {$EXTERNALSYM XBUTTON1}
- XBUTTON2 = $0002;
- {$EXTERNALSYM XBUTTON2}
-
-// Were there to be an XBUTTON3, it's value would be 0x0004//
-
- WM_PARENTNOTIFY = $0210;
- {$EXTERNALSYM WM_PARENTNOTIFY}
- WM_ENTERMENULOOP = $0211;
- {$EXTERNALSYM WM_ENTERMENULOOP}
- WM_EXITMENULOOP = $0212;
- {$EXTERNALSYM WM_EXITMENULOOP}
-
- WM_NEXTMENU = $0213;
- {$EXTERNALSYM WM_NEXTMENU}
- WM_SIZING = $0214;
- {$EXTERNALSYM WM_SIZING}
- WM_CAPTURECHANGED = $0215;
- {$EXTERNALSYM WM_CAPTURECHANGED}
- WM_MOVING = $0216;
- {$EXTERNALSYM WM_MOVING}
-
- WM_POWERBROADCAST = $0218;
- {$EXTERNALSYM WM_POWERBROADCAST}
-
- PBT_APMQUERYSUSPEND = $0000;
- {$EXTERNALSYM PBT_APMQUERYSUSPEND}
- PBT_APMQUERYSTANDBY = $0001;
- {$EXTERNALSYM PBT_APMQUERYSTANDBY}
-
- PBT_APMQUERYSUSPENDFAILED = $0002;
- {$EXTERNALSYM PBT_APMQUERYSUSPENDFAILED}
- PBT_APMQUERYSTANDBYFAILED = $0003;
- {$EXTERNALSYM PBT_APMQUERYSTANDBYFAILED}
-
- PBT_APMSUSPEND = $0004;
- {$EXTERNALSYM PBT_APMSUSPEND}
- PBT_APMSTANDBY = $0005;
- {$EXTERNALSYM PBT_APMSTANDBY}
-
- PBT_APMRESUMECRITICAL = $0006;
- {$EXTERNALSYM PBT_APMRESUMECRITICAL}
- PBT_APMRESUMESUSPEND = $0007;
- {$EXTERNALSYM PBT_APMRESUMESUSPEND}
- PBT_APMRESUMESTANDBY = $0008;
- {$EXTERNALSYM PBT_APMRESUMESTANDBY}
-
- PBTF_APMRESUMEFROMFAILURE = $00000001;
- {$EXTERNALSYM PBTF_APMRESUMEFROMFAILURE}
-
- PBT_APMBATTERYLOW = $0009;
- {$EXTERNALSYM PBT_APMBATTERYLOW}
- PBT_APMPOWERSTATUSCHANGE = $000A;
- {$EXTERNALSYM PBT_APMPOWERSTATUSCHANGE}
-
- PBT_APMOEMEVENT = $000B;
- {$EXTERNALSYM PBT_APMOEMEVENT}
- PBT_APMRESUMEAUTOMATIC = $0012;
- {$EXTERNALSYM PBT_APMRESUMEAUTOMATIC}
-
- WM_DEVICECHANGE = $0219;
- {$EXTERNALSYM WM_DEVICECHANGE}
-
- WM_MDICREATE = $0220;
- {$EXTERNALSYM WM_MDICREATE}
- WM_MDIDESTROY = $0221;
- {$EXTERNALSYM WM_MDIDESTROY}
- WM_MDIACTIVATE = $0222;
- {$EXTERNALSYM WM_MDIACTIVATE}
- WM_MDIRESTORE = $0223;
- {$EXTERNALSYM WM_MDIRESTORE}
- WM_MDINEXT = $0224;
- {$EXTERNALSYM WM_MDINEXT}
- WM_MDIMAXIMIZE = $0225;
- {$EXTERNALSYM WM_MDIMAXIMIZE}
- WM_MDITILE = $0226;
- {$EXTERNALSYM WM_MDITILE}
- WM_MDICASCADE = $0227;
- {$EXTERNALSYM WM_MDICASCADE}
- WM_MDIICONARRANGE = $0228;
- {$EXTERNALSYM WM_MDIICONARRANGE}
- WM_MDIGETACTIVE = $0229;
- {$EXTERNALSYM WM_MDIGETACTIVE}
-
- WM_MDISETMENU = $0230;
- {$EXTERNALSYM WM_MDISETMENU}
- WM_ENTERSIZEMOVE = $0231;
- {$EXTERNALSYM WM_ENTERSIZEMOVE}
- WM_EXITSIZEMOVE = $0232;
- {$EXTERNALSYM WM_EXITSIZEMOVE}
- WM_DROPFILES = $0233;
- {$EXTERNALSYM WM_DROPFILES}
- WM_MDIREFRESHMENU = $0234;
- {$EXTERNALSYM WM_MDIREFRESHMENU}
-
- WM_IME_SETCONTEXT = $0281;
- {$EXTERNALSYM WM_IME_SETCONTEXT}
- WM_IME_NOTIFY = $0282;
- {$EXTERNALSYM WM_IME_NOTIFY}
- WM_IME_CONTROL = $0283;
- {$EXTERNALSYM WM_IME_CONTROL}
- WM_IME_COMPOSITIONFULL = $0284;
- {$EXTERNALSYM WM_IME_COMPOSITIONFULL}
- WM_IME_SELECT = $0285;
- {$EXTERNALSYM WM_IME_SELECT}
- WM_IME_CHAR = $0286;
- {$EXTERNALSYM WM_IME_CHAR}
- WM_IME_REQUEST = $0288;
- {$EXTERNALSYM WM_IME_REQUEST}
- WM_IME_KEYDOWN = $0290;
- {$EXTERNALSYM WM_IME_KEYDOWN}
- WM_IME_KEYUP = $0291;
- {$EXTERNALSYM WM_IME_KEYUP}
-
- WM_MOUSEHOVER = $02A1;
- {$EXTERNALSYM WM_MOUSEHOVER}
- WM_MOUSELEAVE = $02A3;
- {$EXTERNALSYM WM_MOUSELEAVE}
- WM_NCMOUSEHOVER = $02A0;
- {$EXTERNALSYM WM_NCMOUSEHOVER}
- WM_NCMOUSELEAVE = $02A2;
- {$EXTERNALSYM WM_NCMOUSELEAVE}
-
- WM_WTSSESSION_CHANGE = $02B1;
- {$EXTERNALSYM WM_WTSSESSION_CHANGE}
-
- WM_TABLET_FIRST = $02c0;
- {$EXTERNALSYM WM_TABLET_FIRST}
- WM_TABLET_LAST = $02df;
- {$EXTERNALSYM WM_TABLET_LAST}
-
- WM_CUT = $0300;
- {$EXTERNALSYM WM_CUT}
- WM_COPY = $0301;
- {$EXTERNALSYM WM_COPY}
- WM_PASTE = $0302;
- {$EXTERNALSYM WM_PASTE}
- WM_CLEAR = $0303;
- {$EXTERNALSYM WM_CLEAR}
- WM_UNDO = $0304;
- {$EXTERNALSYM WM_UNDO}
- WM_RENDERFORMAT = $0305;
- {$EXTERNALSYM WM_RENDERFORMAT}
- WM_RENDERALLFORMATS = $0306;
- {$EXTERNALSYM WM_RENDERALLFORMATS}
- WM_DESTROYCLIPBOARD = $0307;
- {$EXTERNALSYM WM_DESTROYCLIPBOARD}
- WM_DRAWCLIPBOARD = $0308;
- {$EXTERNALSYM WM_DRAWCLIPBOARD}
- WM_PAINTCLIPBOARD = $0309;
- {$EXTERNALSYM WM_PAINTCLIPBOARD}
- WM_VSCROLLCLIPBOARD = $030A;
- {$EXTERNALSYM WM_VSCROLLCLIPBOARD}
- WM_SIZECLIPBOARD = $030B;
- {$EXTERNALSYM WM_SIZECLIPBOARD}
- WM_ASKCBFORMATNAME = $030C;
- {$EXTERNALSYM WM_ASKCBFORMATNAME}
- WM_CHANGECBCHAIN = $030D;
- {$EXTERNALSYM WM_CHANGECBCHAIN}
- WM_HSCROLLCLIPBOARD = $030E;
- {$EXTERNALSYM WM_HSCROLLCLIPBOARD}
- WM_QUERYNEWPALETTE = $030F;
- {$EXTERNALSYM WM_QUERYNEWPALETTE}
- WM_PALETTEISCHANGING = $0310;
- {$EXTERNALSYM WM_PALETTEISCHANGING}
- WM_PALETTECHANGED = $0311;
- {$EXTERNALSYM WM_PALETTECHANGED}
- WM_HOTKEY = $0312;
- {$EXTERNALSYM WM_HOTKEY}
-
- WM_PRINT = $0317;
- {$EXTERNALSYM WM_PRINT}
- WM_PRINTCLIENT = $0318;
- {$EXTERNALSYM WM_PRINTCLIENT}
-
- WM_APPCOMMAND = $0319;
- {$EXTERNALSYM WM_APPCOMMAND}
-
- WM_THEMECHANGED = $031A;
- {$EXTERNALSYM WM_THEMECHANGED}
-
- WM_HANDHELDFIRST = $0358;
- {$EXTERNALSYM WM_HANDHELDFIRST}
- WM_HANDHELDLAST = $035F;
- {$EXTERNALSYM WM_HANDHELDLAST}
-
- WM_AFXFIRST = $0360;
- {$EXTERNALSYM WM_AFXFIRST}
- WM_AFXLAST = $037F;
- {$EXTERNALSYM WM_AFXLAST}
-
- WM_PENWINFIRST = $0380;
- {$EXTERNALSYM WM_PENWINFIRST}
- WM_PENWINLAST = $038F;
- {$EXTERNALSYM WM_PENWINLAST}
-
- WM_APP = $8000;
- {$EXTERNALSYM WM_APP}
-
-//
-// NOTE: All Message Numbers below 0x0400 are RESERVED.
-//
-// Private Window Messages Start Here:
-//
-
- WM_USER = $0400;
- {$EXTERNALSYM WM_USER}
-
-// wParam for WM_SIZING message
-
- WMSZ_LEFT = 1;
- {$EXTERNALSYM WMSZ_LEFT}
- WMSZ_RIGHT = 2;
- {$EXTERNALSYM WMSZ_RIGHT}
- WMSZ_TOP = 3;
- {$EXTERNALSYM WMSZ_TOP}
- WMSZ_TOPLEFT = 4;
- {$EXTERNALSYM WMSZ_TOPLEFT}
- WMSZ_TOPRIGHT = 5;
- {$EXTERNALSYM WMSZ_TOPRIGHT}
- WMSZ_BOTTOM = 6;
- {$EXTERNALSYM WMSZ_BOTTOM}
- WMSZ_BOTTOMLEFT = 7;
- {$EXTERNALSYM WMSZ_BOTTOMLEFT}
- WMSZ_BOTTOMRIGHT = 8;
- {$EXTERNALSYM WMSZ_BOTTOMRIGHT}
-
-//
-// WM_NCHITTEST and MOUSEHOOKSTRUCT Mouse Position Codes
-//
-
- HTERROR = DWORD(-2);
- {$EXTERNALSYM HTERROR}
- HTTRANSPARENT = DWORD(-1);
- {$EXTERNALSYM HTTRANSPARENT}
- HTNOWHERE = 0;
- {$EXTERNALSYM HTNOWHERE}
- HTCLIENT = 1;
- {$EXTERNALSYM HTCLIENT}
- HTCAPTION = 2;
- {$EXTERNALSYM HTCAPTION}
- HTSYSMENU = 3;
- {$EXTERNALSYM HTSYSMENU}
- HTGROWBOX = 4;
- {$EXTERNALSYM HTGROWBOX}
- HTSIZE = HTGROWBOX;
- {$EXTERNALSYM HTSIZE}
- HTMENU = 5;
- {$EXTERNALSYM HTMENU}
- HTHSCROLL = 6;
- {$EXTERNALSYM HTHSCROLL}
- HTVSCROLL = 7;
- {$EXTERNALSYM HTVSCROLL}
- HTMINBUTTON = 8;
- {$EXTERNALSYM HTMINBUTTON}
- HTMAXBUTTON = 9;
- {$EXTERNALSYM HTMAXBUTTON}
- HTLEFT = 10;
- {$EXTERNALSYM HTLEFT}
- HTRIGHT = 11;
- {$EXTERNALSYM HTRIGHT}
- HTTOP = 12;
- {$EXTERNALSYM HTTOP}
- HTTOPLEFT = 13;
- {$EXTERNALSYM HTTOPLEFT}
- HTTOPRIGHT = 14;
- {$EXTERNALSYM HTTOPRIGHT}
- HTBOTTOM = 15;
- {$EXTERNALSYM HTBOTTOM}
- HTBOTTOMLEFT = 16;
- {$EXTERNALSYM HTBOTTOMLEFT}
- HTBOTTOMRIGHT = 17;
- {$EXTERNALSYM HTBOTTOMRIGHT}
- HTBORDER = 18;
- {$EXTERNALSYM HTBORDER}
- HTREDUCE = HTMINBUTTON;
- {$EXTERNALSYM HTREDUCE}
- HTZOOM = HTMAXBUTTON;
- {$EXTERNALSYM HTZOOM}
- HTSIZEFIRST = HTLEFT;
- {$EXTERNALSYM HTSIZEFIRST}
- HTSIZELAST = HTBOTTOMRIGHT;
- {$EXTERNALSYM HTSIZELAST}
- HTOBJECT = 19;
- {$EXTERNALSYM HTOBJECT}
- HTCLOSE = 20;
- {$EXTERNALSYM HTCLOSE}
- HTHELP = 21;
- {$EXTERNALSYM HTHELP}
-
-//
-// SendMessageTimeout values
-//
-
- SMTO_NORMAL = $0000;
- {$EXTERNALSYM SMTO_NORMAL}
- SMTO_BLOCK = $0001;
- {$EXTERNALSYM SMTO_BLOCK}
- SMTO_ABORTIFHUNG = $0002;
- {$EXTERNALSYM SMTO_ABORTIFHUNG}
- SMTO_NOTIMEOUTIFNOTHUNG = $0008;
- {$EXTERNALSYM SMTO_NOTIMEOUTIFNOTHUNG}
-
-//
-// WM_MOUSEACTIVATE Return Codes
-//
-
- MA_ACTIVATE = 1;
- {$EXTERNALSYM MA_ACTIVATE}
- MA_ACTIVATEANDEAT = 2;
- {$EXTERNALSYM MA_ACTIVATEANDEAT}
- MA_NOACTIVATE = 3;
- {$EXTERNALSYM MA_NOACTIVATE}
- MA_NOACTIVATEANDEAT = 4;
- {$EXTERNALSYM MA_NOACTIVATEANDEAT}
-
-//
-// WM_SETICON / WM_GETICON Type Codes
-//
-
- ICON_SMALL = 0;
- {$EXTERNALSYM ICON_SMALL}
- ICON_BIG = 1;
- {$EXTERNALSYM ICON_BIG}
- ICON_SMALL2 = 2;
- {$EXTERNALSYM ICON_SMALL2}
-
-function RegisterWindowMessageA(lpString: LPCSTR): UINT; stdcall;
-{$EXTERNALSYM RegisterWindowMessageA}
-function RegisterWindowMessageW(lpString: LPCWSTR): UINT; stdcall;
-{$EXTERNALSYM RegisterWindowMessageW}
-function RegisterWindowMessage(lpString: LPCTSTR): UINT; stdcall;
-{$EXTERNALSYM RegisterWindowMessage}
-
-//
-// WM_SIZE message wParam values
-//
-
-const
- SIZE_RESTORED = 0;
- {$EXTERNALSYM SIZE_RESTORED}
- SIZE_MINIMIZED = 1;
- {$EXTERNALSYM SIZE_MINIMIZED}
- SIZE_MAXIMIZED = 2;
- {$EXTERNALSYM SIZE_MAXIMIZED}
- SIZE_MAXSHOW = 3;
- {$EXTERNALSYM SIZE_MAXSHOW}
- SIZE_MAXHIDE = 4;
- {$EXTERNALSYM SIZE_MAXHIDE}
-
-//
-// Obsolete constant names
-//
-
- SIZENORMAL = SIZE_RESTORED;
- {$EXTERNALSYM SIZENORMAL}
- SIZEICONIC = SIZE_MINIMIZED;
- {$EXTERNALSYM SIZEICONIC}
- SIZEFULLSCREEN = SIZE_MAXIMIZED;
- {$EXTERNALSYM SIZEFULLSCREEN}
- SIZEZOOMSHOW = SIZE_MAXSHOW;
- {$EXTERNALSYM SIZEZOOMSHOW}
- SIZEZOOMHIDE = SIZE_MAXHIDE;
- {$EXTERNALSYM SIZEZOOMHIDE}
-
-//
-// WM_WINDOWPOSCHANGING/CHANGED struct pointed to by lParam
-//
-
-type
- LPWINDOWPOS = ^WINDOWPOS;
- {$EXTERNALSYM LPWINDOWPOS}
- tagWINDOWPOS = record
- hwnd: HWND;
- hwndInsertAfter: HWND;
- x: Integer;
- y: Integer;
- cx: Integer;
- cy: Integer;
- flags: UINT;
- end;
- {$EXTERNALSYM tagWINDOWPOS}
- WINDOWPOS = tagWINDOWPOS;
- {$EXTERNALSYM WINDOWPOS}
- TWindowPos = WINDOWPOS;
- PWindowPos = LPWINDOWPOS;
-
-//
-// WM_NCCALCSIZE parameter structure
-//
-
- LPNCCALCSIZE_PARAMS = ^NCCALCSIZE_PARAMS;
- {$EXTERNALSYM LPNCCALCSIZE_PARAMS}
- NCCALCSIZE_PARAMS = record
- rgrc: array [0..2] of RECT;
- lppos: PWINDOWPOS;
- end;
- {$EXTERNALSYM NCCALCSIZE_PARAMS}
- TNcCalcSizeParams = NCCALCSIZE_PARAMS;
- PNcCalcSizeParams = LPNCCALCSIZE_PARAMS;
-
-//
-// WM_NCCALCSIZE "window valid rect" return values
-//
-
-const
- WVR_ALIGNTOP = $0010;
- {$EXTERNALSYM WVR_ALIGNTOP}
- WVR_ALIGNLEFT = $0020;
- {$EXTERNALSYM WVR_ALIGNLEFT}
- WVR_ALIGNBOTTOM = $0040;
- {$EXTERNALSYM WVR_ALIGNBOTTOM}
- WVR_ALIGNRIGHT = $0080;
- {$EXTERNALSYM WVR_ALIGNRIGHT}
- WVR_HREDRAW = $0100;
- {$EXTERNALSYM WVR_HREDRAW}
- WVR_VREDRAW = $0200;
- {$EXTERNALSYM WVR_VREDRAW}
- WVR_REDRAW = WVR_HREDRAW or WVR_VREDRAW;
- {$EXTERNALSYM WVR_REDRAW}
- WVR_VALIDRECTS = $0400;
- {$EXTERNALSYM WVR_VALIDRECTS}
-
-//
-// Key State Masks for Mouse Messages
-//
-
- MK_LBUTTON = $0001;
- {$EXTERNALSYM MK_LBUTTON}
- MK_RBUTTON = $0002;
- {$EXTERNALSYM MK_RBUTTON}
- MK_SHIFT = $0004;
- {$EXTERNALSYM MK_SHIFT}
- MK_CONTROL = $0008;
- {$EXTERNALSYM MK_CONTROL}
- MK_MBUTTON = $0010;
- {$EXTERNALSYM MK_MBUTTON}
- MK_XBUTTON1 = $0020;
- {$EXTERNALSYM MK_XBUTTON1}
- MK_XBUTTON2 = $0040;
- {$EXTERNALSYM MK_XBUTTON2}
-
- TME_HOVER = $00000001;
- {$EXTERNALSYM TME_HOVER}
- TME_LEAVE = $00000002;
- {$EXTERNALSYM TME_LEAVE}
- TME_NONCLIENT = $00000010;
- {$EXTERNALSYM TME_NONCLIENT}
- TME_QUERY = $40000000;
- {$EXTERNALSYM TME_QUERY}
- TME_CANCEL = $80000000;
- {$EXTERNALSYM TME_CANCEL}
-
- HOVER_DEFAULT = $FFFFFFFF;
- {$EXTERNALSYM HOVER_DEFAULT}
-
-type
- LPTRACKMOUSEEVENT = ^_TRACKMOUSEEVENT;
- {$EXTERNALSYM LPTRACKMOUSEEVENT}
- _TRACKMOUSEEVENT = record
- cbSize: DWORD;
- dwFlags: DWORD;
- hwndTrack: HWND;
- dwHoverTime: DWORD;
- end;
- //TRACKMOUSEEVENT = _TRACKMOUSEEVENT;
- //{$EXTERNALSYM TRACKMOUSEEVENT}
- TTrackMouseEvent = _TRACKMOUSEEVENT;
- PTrackMouseEvent = LPTRACKMOUSEEVENT;
-
-function TrackMouseEvent(var lpEventTrack: TTrackMouseEvent): BOOL; stdcall;
-{$EXTERNALSYM TrackMouseEvent}
-
-//
-// Window Styles
-//
-
-const
- WS_OVERLAPPED = $00000000;
- {$EXTERNALSYM WS_OVERLAPPED}
- WS_POPUP = $80000000;
- {$EXTERNALSYM WS_POPUP}
- WS_CHILD = $40000000;
- {$EXTERNALSYM WS_CHILD}
- WS_MINIMIZE = $20000000;
- {$EXTERNALSYM WS_MINIMIZE}
- WS_VISIBLE = $10000000;
- {$EXTERNALSYM WS_VISIBLE}
- WS_DISABLED = $08000000;
- {$EXTERNALSYM WS_DISABLED}
- WS_CLIPSIBLINGS = $04000000;
- {$EXTERNALSYM WS_CLIPSIBLINGS}
- WS_CLIPCHILDREN = $02000000;
- {$EXTERNALSYM WS_CLIPCHILDREN}
- WS_MAXIMIZE = $01000000;
- {$EXTERNALSYM WS_MAXIMIZE}
- WS_CAPTION = $00C00000; // WS_BORDER | WS_DLGFRAME
- {$EXTERNALSYM WS_CAPTION}
- WS_BORDER = $00800000;
- {$EXTERNALSYM WS_BORDER}
- WS_DLGFRAME = $00400000;
- {$EXTERNALSYM WS_DLGFRAME}
- WS_VSCROLL = $00200000;
- {$EXTERNALSYM WS_VSCROLL}
- WS_HSCROLL = $00100000;
- {$EXTERNALSYM WS_HSCROLL}
- WS_SYSMENU = $00080000;
- {$EXTERNALSYM WS_SYSMENU}
- WS_THICKFRAME = $00040000;
- {$EXTERNALSYM WS_THICKFRAME}
- WS_GROUP = $00020000;
- {$EXTERNALSYM WS_GROUP}
- WS_TABSTOP = $00010000;
- {$EXTERNALSYM WS_TABSTOP}
-
- WS_MINIMIZEBOX = $00020000;
- {$EXTERNALSYM WS_MINIMIZEBOX}
- WS_MAXIMIZEBOX = $00010000;
- {$EXTERNALSYM WS_MAXIMIZEBOX}
-
- WS_TILED = WS_OVERLAPPED;
- {$EXTERNALSYM WS_TILED}
- WS_ICONIC = WS_MINIMIZE;
- {$EXTERNALSYM WS_ICONIC}
- WS_SIZEBOX = WS_THICKFRAME;
- {$EXTERNALSYM WS_SIZEBOX}
-
-//
-// Common Window Styles
-//
-
- WS_OVERLAPPEDWINDOW = (WS_OVERLAPPED or WS_CAPTION or WS_SYSMENU or
- WS_THICKFRAME or WS_MINIMIZEBOX or WS_MAXIMIZEBOX);
- {$EXTERNALSYM WS_OVERLAPPEDWINDOW}
-
- WS_POPUPWINDOW = WS_POPUP or WS_BORDER or WS_SYSMENU;
- {$EXTERNALSYM WS_POPUPWINDOW}
-
- WS_CHILDWINDOW = WS_CHILD;
- {$EXTERNALSYM WS_CHILDWINDOW}
-
- WS_TILEDWINDOW = WS_OVERLAPPEDWINDOW;
- {$EXTERNALSYM WS_TILEDWINDOW}
-
-//
-// Extended Window Styles
-//
-
- WS_EX_DLGMODALFRAME = $00000001;
- {$EXTERNALSYM WS_EX_DLGMODALFRAME}
- WS_EX_NOPARENTNOTIFY = $00000004;
- {$EXTERNALSYM WS_EX_NOPARENTNOTIFY}
- WS_EX_TOPMOST = $00000008;
- {$EXTERNALSYM WS_EX_TOPMOST}
- WS_EX_ACCEPTFILES = $00000010;
- {$EXTERNALSYM WS_EX_ACCEPTFILES}
- WS_EX_TRANSPARENT = $00000020;
- {$EXTERNALSYM WS_EX_TRANSPARENT}
- WS_EX_MDICHILD = $00000040;
- {$EXTERNALSYM WS_EX_MDICHILD}
- WS_EX_TOOLWINDOW = $00000080;
- {$EXTERNALSYM WS_EX_TOOLWINDOW}
- WS_EX_WINDOWEDGE = $00000100;
- {$EXTERNALSYM WS_EX_WINDOWEDGE}
- WS_EX_CLIENTEDGE = $00000200;
- {$EXTERNALSYM WS_EX_CLIENTEDGE}
- WS_EX_CONTEXTHELP = $00000400;
- {$EXTERNALSYM WS_EX_CONTEXTHELP}
-
- WS_EX_RIGHT = $00001000;
- {$EXTERNALSYM WS_EX_RIGHT}
- WS_EX_LEFT = $00000000;
- {$EXTERNALSYM WS_EX_LEFT}
- WS_EX_RTLREADING = $00002000;
- {$EXTERNALSYM WS_EX_RTLREADING}
- WS_EX_LTRREADING = $00000000;
- {$EXTERNALSYM WS_EX_LTRREADING}
- WS_EX_LEFTSCROLLBAR = $00004000;
- {$EXTERNALSYM WS_EX_LEFTSCROLLBAR}
- WS_EX_RIGHTSCROLLBAR = $00000000;
- {$EXTERNALSYM WS_EX_RIGHTSCROLLBAR}
- WS_EX_CONTROLPARENT = $00010000;
- {$EXTERNALSYM WS_EX_CONTROLPARENT}
- WS_EX_STATICEDGE = $00020000;
- {$EXTERNALSYM WS_EX_STATICEDGE}
- WS_EX_APPWINDOW = $00040000;
- {$EXTERNALSYM WS_EX_APPWINDOW}
-
- WS_EX_OVERLAPPEDWINDOW = WS_EX_WINDOWEDGE or WS_EX_CLIENTEDGE;
- {$EXTERNALSYM WS_EX_OVERLAPPEDWINDOW}
- WS_EX_PALETTEWINDOW = WS_EX_WINDOWEDGE or WS_EX_TOOLWINDOW or WS_EX_TOPMOST;
- {$EXTERNALSYM WS_EX_PALETTEWINDOW}
-
- WS_EX_LAYERED = $00080000;
- {$EXTERNALSYM WS_EX_LAYERED}
-
- WS_EX_NOINHERITLAYOUT = $00100000; // Disable inheritence of mirroring by children
- {$EXTERNALSYM WS_EX_NOINHERITLAYOUT}
- WS_EX_LAYOUTRTL = $00400000; // Right to left mirroring
- {$EXTERNALSYM WS_EX_LAYOUTRTL}
-
- WS_EX_COMPOSITED = $02000000;
- {$EXTERNALSYM WS_EX_COMPOSITED}
- WS_EX_NOACTIVATE = $08000000;
- {$EXTERNALSYM WS_EX_NOACTIVATE}
-
-//
-// Class styles
-//
-
- CS_VREDRAW = $0001;
- {$EXTERNALSYM CS_VREDRAW}
- CS_HREDRAW = $0002;
- {$EXTERNALSYM CS_HREDRAW}
- CS_DBLCLKS = $0008;
- {$EXTERNALSYM CS_DBLCLKS}
- CS_OWNDC = $0020;
- {$EXTERNALSYM CS_OWNDC}
- CS_CLASSDC = $0040;
- {$EXTERNALSYM CS_CLASSDC}
- CS_PARENTDC = $0080;
- {$EXTERNALSYM CS_PARENTDC}
- CS_NOCLOSE = $0200;
- {$EXTERNALSYM CS_NOCLOSE}
- CS_SAVEBITS = $0800;
- {$EXTERNALSYM CS_SAVEBITS}
- CS_BYTEALIGNCLIENT = $1000;
- {$EXTERNALSYM CS_BYTEALIGNCLIENT}
- CS_BYTEALIGNWINDOW = $2000;
- {$EXTERNALSYM CS_BYTEALIGNWINDOW}
- CS_GLOBALCLASS = $4000;
- {$EXTERNALSYM CS_GLOBALCLASS}
-
- CS_IME = $00010000;
- {$EXTERNALSYM CS_IME}
- CS_DROPSHADOW = $00020000;
- {$EXTERNALSYM CS_DROPSHADOW}
-
-// WM_PRINT flags//
-
- PRF_CHECKVISIBLE = $00000001;
- {$EXTERNALSYM PRF_CHECKVISIBLE}
- PRF_NONCLIENT = $00000002;
- {$EXTERNALSYM PRF_NONCLIENT}
- PRF_CLIENT = $00000004;
- {$EXTERNALSYM PRF_CLIENT}
- PRF_ERASEBKGND = $00000008;
- {$EXTERNALSYM PRF_ERASEBKGND}
- PRF_CHILDREN = $00000010;
- {$EXTERNALSYM PRF_CHILDREN}
- PRF_OWNED = $00000020;
- {$EXTERNALSYM PRF_OWNED}
-
-// 3D border styles//
-
- BDR_RAISEDOUTER = $0001;
- {$EXTERNALSYM BDR_RAISEDOUTER}
- BDR_SUNKENOUTER = $0002;
- {$EXTERNALSYM BDR_SUNKENOUTER}
- BDR_RAISEDINNER = $0004;
- {$EXTERNALSYM BDR_RAISEDINNER}
- BDR_SUNKENINNER = $0008;
- {$EXTERNALSYM BDR_SUNKENINNER}
-
- BDR_OUTER = BDR_RAISEDOUTER or BDR_SUNKENOUTER;
- {$EXTERNALSYM BDR_OUTER}
- BDR_INNER = BDR_RAISEDINNER or BDR_SUNKENINNER;
- {$EXTERNALSYM BDR_INNER}
- BDR_RAISED = BDR_RAISEDOUTER or BDR_RAISEDINNER;
- {$EXTERNALSYM BDR_RAISED}
- BDR_SUNKEN = BDR_SUNKENOUTER or BDR_SUNKENINNER;
- {$EXTERNALSYM BDR_SUNKEN}
-
- EDGE_RAISED = BDR_RAISEDOUTER or BDR_RAISEDINNER;
- {$EXTERNALSYM EDGE_RAISED}
- EDGE_SUNKEN = BDR_SUNKENOUTER or BDR_SUNKENINNER;
- {$EXTERNALSYM EDGE_SUNKEN}
- EDGE_ETCHED = BDR_SUNKENOUTER or BDR_RAISEDINNER;
- {$EXTERNALSYM EDGE_ETCHED}
- EDGE_BUMP = BDR_RAISEDOUTER or BDR_SUNKENINNER;
- {$EXTERNALSYM EDGE_BUMP}
-
-// Border flags//
-
- BF_LEFT = $0001;
- {$EXTERNALSYM BF_LEFT}
- BF_TOP = $0002;
- {$EXTERNALSYM BF_TOP}
- BF_RIGHT = $0004;
- {$EXTERNALSYM BF_RIGHT}
- BF_BOTTOM = $0008;
- {$EXTERNALSYM BF_BOTTOM}
-
- BF_TOPLEFT = BF_TOP or BF_LEFT;
- {$EXTERNALSYM BF_TOPLEFT}
- BF_TOPRIGHT = BF_TOP or BF_RIGHT;
- {$EXTERNALSYM BF_TOPRIGHT}
- BF_BOTTOMLEFT = BF_BOTTOM or BF_LEFT;
- {$EXTERNALSYM BF_BOTTOMLEFT}
- BF_BOTTOMRIGHT = BF_BOTTOM or BF_RIGHT;
- {$EXTERNALSYM BF_BOTTOMRIGHT}
- BF_RECT = BF_LEFT or BF_TOP or BF_RIGHT or BF_BOTTOM;
- {$EXTERNALSYM BF_RECT}
-
- BF_DIAGONAL = $0010;
- {$EXTERNALSYM BF_DIAGONAL}
-
-// For diagonal lines, the BF_RECT flags specify the end point of the
-// vector bounded by the rectangle parameter.
-
- BF_DIAGONAL_ENDTOPRIGHT = BF_DIAGONAL or BF_TOP or BF_RIGHT;
- {$EXTERNALSYM BF_DIAGONAL_ENDTOPRIGHT}
- BF_DIAGONAL_ENDTOPLEFT = BF_DIAGONAL or BF_TOP or BF_LEFT;
- {$EXTERNALSYM BF_DIAGONAL_ENDTOPLEFT}
- BF_DIAGONAL_ENDBOTTOMLEFT = BF_DIAGONAL or BF_BOTTOM or BF_LEFT;
- {$EXTERNALSYM BF_DIAGONAL_ENDBOTTOMLEFT}
- BF_DIAGONAL_ENDBOTTOMRIGHT = BF_DIAGONAL or BF_BOTTOM or BF_RIGHT;
- {$EXTERNALSYM BF_DIAGONAL_ENDBOTTOMRIGHT}
-
- BF_MIDDLE = $0800; // Fill in the middle
- {$EXTERNALSYM BF_MIDDLE}
- BF_SOFT = $1000; // For softer buttons
- {$EXTERNALSYM BF_SOFT}
- BF_ADJUST = $2000; // Calculate the space left over
- {$EXTERNALSYM BF_ADJUST}
- BF_FLAT = $4000; // For flat rather than 3D borders
- {$EXTERNALSYM BF_FLAT}
- BF_MONO = $8000; // For monochrome borders
- {$EXTERNALSYM BF_MONO}
-
-function DrawEdge(hdc: HDC; var qrc: RECT; edge, grfFlags: UINT): BOOL; stdcall;
-{$EXTERNALSYM DrawEdge}
-
-// flags for DrawFrameControl//
-
-const
- DFC_CAPTION = 1;
- {$EXTERNALSYM DFC_CAPTION}
- DFC_MENU = 2;
- {$EXTERNALSYM DFC_MENU}
- DFC_SCROLL = 3;
- {$EXTERNALSYM DFC_SCROLL}
- DFC_BUTTON = 4;
- {$EXTERNALSYM DFC_BUTTON}
- DFC_POPUPMENU = 5;
- {$EXTERNALSYM DFC_POPUPMENU}
-
- DFCS_CAPTIONCLOSE = $0000;
- {$EXTERNALSYM DFCS_CAPTIONCLOSE}
- DFCS_CAPTIONMIN = $0001;
- {$EXTERNALSYM DFCS_CAPTIONMIN}
- DFCS_CAPTIONMAX = $0002;
- {$EXTERNALSYM DFCS_CAPTIONMAX}
- DFCS_CAPTIONRESTORE = $0003;
- {$EXTERNALSYM DFCS_CAPTIONRESTORE}
- DFCS_CAPTIONHELP = $0004;
- {$EXTERNALSYM DFCS_CAPTIONHELP}
-
- DFCS_MENUARROW = $0000;
- {$EXTERNALSYM DFCS_MENUARROW}
- DFCS_MENUCHECK = $0001;
- {$EXTERNALSYM DFCS_MENUCHECK}
- DFCS_MENUBULLET = $0002;
- {$EXTERNALSYM DFCS_MENUBULLET}
- DFCS_MENUARROWRIGHT = $0004;
- {$EXTERNALSYM DFCS_MENUARROWRIGHT}
- DFCS_SCROLLUP = $0000;
- {$EXTERNALSYM DFCS_SCROLLUP}
- DFCS_SCROLLDOWN = $0001;
- {$EXTERNALSYM DFCS_SCROLLDOWN}
- DFCS_SCROLLLEFT = $0002;
- {$EXTERNALSYM DFCS_SCROLLLEFT}
- DFCS_SCROLLRIGHT = $0003;
- {$EXTERNALSYM DFCS_SCROLLRIGHT}
- DFCS_SCROLLCOMBOBOX = $0005;
- {$EXTERNALSYM DFCS_SCROLLCOMBOBOX}
- DFCS_SCROLLSIZEGRIP = $0008;
- {$EXTERNALSYM DFCS_SCROLLSIZEGRIP}
- DFCS_SCROLLSIZEGRIPRIGHT = $0010;
- {$EXTERNALSYM DFCS_SCROLLSIZEGRIPRIGHT}
-
- DFCS_BUTTONCHECK = $0000;
- {$EXTERNALSYM DFCS_BUTTONCHECK}
- DFCS_BUTTONRADIOIMAGE = $0001;
- {$EXTERNALSYM DFCS_BUTTONRADIOIMAGE}
- DFCS_BUTTONRADIOMASK = $0002;
- {$EXTERNALSYM DFCS_BUTTONRADIOMASK}
- DFCS_BUTTONRADIO = $0004;
- {$EXTERNALSYM DFCS_BUTTONRADIO}
- DFCS_BUTTON3STATE = $0008;
- {$EXTERNALSYM DFCS_BUTTON3STATE}
- DFCS_BUTTONPUSH = $0010;
- {$EXTERNALSYM DFCS_BUTTONPUSH}
-
- DFCS_INACTIVE = $0100;
- {$EXTERNALSYM DFCS_INACTIVE}
- DFCS_PUSHED = $0200;
- {$EXTERNALSYM DFCS_PUSHED}
- DFCS_CHECKED = $0400;
- {$EXTERNALSYM DFCS_CHECKED}
-
- DFCS_TRANSPARENT = $0800;
- {$EXTERNALSYM DFCS_TRANSPARENT}
- DFCS_HOT = $1000;
- {$EXTERNALSYM DFCS_HOT}
-
- DFCS_ADJUSTRECT = $2000;
- {$EXTERNALSYM DFCS_ADJUSTRECT}
- DFCS_FLAT = $4000;
- {$EXTERNALSYM DFCS_FLAT}
- DFCS_MONO = $8000;
- {$EXTERNALSYM DFCS_MONO}
-
-function DrawFrameControl(hdc: HDC; const lprc: RECT; uType, uState: UINT): BOOL; stdcall;
-{$EXTERNALSYM DrawFrameControl}
-
-// flags for DrawCaption//
-
-const
- DC_ACTIVE = $0001;
- {$EXTERNALSYM DC_ACTIVE}
- DC_SMALLCAP = $0002;
- {$EXTERNALSYM DC_SMALLCAP}
- DC_ICON = $0004;
- {$EXTERNALSYM DC_ICON}
- DC_TEXT = $0008;
- {$EXTERNALSYM DC_TEXT}
- DC_INBUTTON = $0010;
- {$EXTERNALSYM DC_INBUTTON}
- DC_GRADIENT = $0020;
- {$EXTERNALSYM DC_GRADIENT}
- DC_BUTTONS = $1000;
- {$EXTERNALSYM DC_BUTTONS}
-
-function DrawCaption(hwnd: HWND; hdc: HDC; const lprc: RECT; uFlags: UINT): BOOL; stdcall;
-{$EXTERNALSYM DrawCaption}
-
-const
- IDANI_OPEN = 1;
- {$EXTERNALSYM IDANI_OPEN}
- IDANI_CAPTION = 3;
- {$EXTERNALSYM IDANI_CAPTION}
-
-function DrawAnimatedRects(hwnd: HWND; idAni: Integer; const lprcFrom, lprcTo: RECT): BOOL; stdcall;
-{$EXTERNALSYM DrawAnimatedRects}
-
-//
-// Predefined Clipboard Formats
-//
-
-const
- CF_TEXT = 1;
- {$EXTERNALSYM CF_TEXT}
- CF_BITMAP = 2;
- {$EXTERNALSYM CF_BITMAP}
- CF_METAFILEPICT = 3;
- {$EXTERNALSYM CF_METAFILEPICT}
- CF_SYLK = 4;
- {$EXTERNALSYM CF_SYLK}
- CF_DIF = 5;
- {$EXTERNALSYM CF_DIF}
- CF_TIFF = 6;
- {$EXTERNALSYM CF_TIFF}
- CF_OEMTEXT = 7;
- {$EXTERNALSYM CF_OEMTEXT}
- CF_DIB = 8;
- {$EXTERNALSYM CF_DIB}
- CF_PALETTE = 9;
- {$EXTERNALSYM CF_PALETTE}
- CF_PENDATA = 10;
- {$EXTERNALSYM CF_PENDATA}
- CF_RIFF = 11;
- {$EXTERNALSYM CF_RIFF}
- CF_WAVE = 12;
- {$EXTERNALSYM CF_WAVE}
- CF_UNICODETEXT = 13;
- {$EXTERNALSYM CF_UNICODETEXT}
- CF_ENHMETAFILE = 14;
- {$EXTERNALSYM CF_ENHMETAFILE}
- CF_HDROP = 15;
- {$EXTERNALSYM CF_HDROP}
- CF_LOCALE = 16;
- {$EXTERNALSYM CF_LOCALE}
- CF_DIBV5 = 17;
- {$EXTERNALSYM CF_DIBV5}
-
- {$IFDEF WIN98ME_UP}
- CF_MAX = 18;
- {$EXTERNALSYM CF_MAX}
- {$ELSE}
- CF_MAX = 17;
- {$EXTERNALSYM CF_MAX}
- {$ENDIF WIN98ME_UP}
-
- CF_OWNERDISPLAY = $0080;
- {$EXTERNALSYM CF_OWNERDISPLAY}
- CF_DSPTEXT = $0081;
- {$EXTERNALSYM CF_DSPTEXT}
- CF_DSPBITMAP = $0082;
- {$EXTERNALSYM CF_DSPBITMAP}
- CF_DSPMETAFILEPICT = $0083;
- {$EXTERNALSYM CF_DSPMETAFILEPICT}
- CF_DSPENHMETAFILE = $008E;
- {$EXTERNALSYM CF_DSPENHMETAFILE}
-
-//
-// "Private" formats don't get GlobalFree()'d
-//
-
- CF_PRIVATEFIRST = $0200;
- {$EXTERNALSYM CF_PRIVATEFIRST}
- CF_PRIVATELAST = $02FF;
- {$EXTERNALSYM CF_PRIVATELAST}
-
-//
-// "GDIOBJ" formats do get DeleteObject()'d
-//
-
- CF_GDIOBJFIRST = $0300;
- {$EXTERNALSYM CF_GDIOBJFIRST}
- CF_GDIOBJLAST = $03FF;
- {$EXTERNALSYM CF_GDIOBJLAST}
-
-//
-// Defines for the fVirt field of the Accelerator table structure.
-//
-
- FVIRTKEY = TRUE; // Assumed to be == TRUE
- {$EXTERNALSYM FVIRTKEY}
- FNOINVERT = $02;
- {$EXTERNALSYM FNOINVERT}
- FSHIFT = $04;
- {$EXTERNALSYM FSHIFT}
- FCONTROL = $08;
- {$EXTERNALSYM FCONTROL}
- FALT = $10;
- {$EXTERNALSYM FALT}
-
-type
- LPACCEL = ^ACCEL;
- {$EXTERNALSYM LPACCEL}
- tagACCEL = record
- fVirt: BYTE; // Also called the flags field//
- key: WORD;
- cmd: WORD;
- end;
- {$EXTERNALSYM tagACCEL}
- ACCEL = tagACCEL;
- {$EXTERNALSYM ACCEL}
- TAccel = ACCEL;
- PAccel = LPACCEL;
-
- LPPAINTSTRUCT = ^PAINTSTRUCT;
- {$EXTERNALSYM LPPAINTSTRUCT}
- tagPAINTSTRUCT = record
- hdc: HDC;
- fErase: BOOL;
- rcPaint: RECT;
- fRestore: BOOL;
- fIncUpdate: BOOL;
- rgbReserved: array [0..31] of BYTE;
- end;
- {$EXTERNALSYM tagPAINTSTRUCT}
- PAINTSTRUCT = tagPAINTSTRUCT;
- {$EXTERNALSYM PAINTSTRUCT}
- NPPAINTSTRUCT = ^PAINTSTRUCT;
- {$EXTERNALSYM NPPAINTSTRUCT}
- TPaintStruct = PAINTSTRUCT;
- PPaintStruct = LPPAINTSTRUCT;
-
- LPCREATESTRUCTA = ^CREATESTRUCTA;
- {$EXTERNALSYM LPCREATESTRUCTA}
- tagCREATESTRUCTA = record
- lpCreateParams: LPVOID;
- hInstance: HINSTANCE;
- hMenu: HMENU;
- hwndParent: HWND;
- cy: Integer;
- cx: Integer;
- y: Integer;
- x: Integer;
- style: LONG;
- lpszName: LPCSTR;
- lpszClass: LPCSTR;
- dwExStyle: DWORD;
- end;
- {$EXTERNALSYM tagCREATESTRUCTA}
- CREATESTRUCTA = tagCREATESTRUCTA;
- {$EXTERNALSYM CREATESTRUCTA}
- TCreateStructA = CREATESTRUCTA;
- PCreateStructA = LPCREATESTRUCTA;
-
- LPCREATESTRUCTW = ^CREATESTRUCTW;
- {$EXTERNALSYM LPCREATESTRUCTW}
- tagCREATESTRUCTW = record
- lpCreateParams: LPVOID;
- hInstance: HINSTANCE;
- hMenu: HMENU;
- hwndParent: HWND;
- cy: Integer;
- cx: Integer;
- y: Integer;
- x: Integer;
- style: LONG;
- lpszName: LPCWSTR;
- lpszClass: LPCWSTR;
- dwExStyle: DWORD;
- end;
- {$EXTERNALSYM tagCREATESTRUCTW}
- CREATESTRUCTW = tagCREATESTRUCTW;
- {$EXTERNALSYM CREATESTRUCTW}
- TCreateStructW = CREATESTRUCTW;
- PCreateStructW = LPCREATESTRUCTW;
-
- {$IFDEF UNICODE}
- CREATESTRUCT = CREATESTRUCTW;
- {$EXTERNALSYM CREATESTRUCT}
- LPCREATESTRUCT = LPCREATESTRUCTW;
- {$EXTERNALSYM LPCREATESTRUCT}
- TCreateStruct = TCreateStructW;
- PCreateStruct = PCreateStructW;
- {$ELSE}
- CREATESTRUCT = CREATESTRUCTA;
- {$EXTERNALSYM CREATESTRUCT}
- LPCREATESTRUCT = LPCREATESTRUCTA;
- {$EXTERNALSYM LPCREATESTRUCT}
- TCreateStruct = TCreateStructA;
- PCreateStruct = PCreateStructA;
- {$ENDIF UNICODE}
-
-//
-// HCBT_CREATEWND parameters pointed to by lParam
-//
-
-type
- LPCBT_CREATEWNDA = ^CBT_CREATEWNDA;
- {$EXTERNALSYM LPCBT_CREATEWNDA}
- tagCBT_CREATEWNDA = record
- lpcs: LPCREATESTRUCTA;
- hwndInsertAfter: HWND;
- end;
- {$EXTERNALSYM tagCBT_CREATEWNDA}
- CBT_CREATEWNDA = tagCBT_CREATEWNDA;
- {$EXTERNALSYM CBT_CREATEWNDA}
- TCbtCreateWndA = CBT_CREATEWNDA;
- PCbtCreateWndA = LPCBT_CREATEWNDA;
-
-//
-// HCBT_CREATEWND parameters pointed to by lParam
-//
-
- LPCBT_CREATEWNDW = ^CBT_CREATEWNDW;
- {$EXTERNALSYM LPCBT_CREATEWNDW}
- tagCBT_CREATEWNDW = record
- lpcs: LPCREATESTRUCTW;
- hwndInsertAfter: HWND;
- end;
- {$EXTERNALSYM tagCBT_CREATEWNDW}
- CBT_CREATEWNDW = tagCBT_CREATEWNDW;
- {$EXTERNALSYM CBT_CREATEWNDW}
- TCbtCreateWndW = CBT_CREATEWNDW;
- PCbtCreateWndW = LPCBT_CREATEWNDW;
-
- {$IFDEF UNICODE}
- CBT_CREATEWND = CBT_CREATEWNDW;
- {$EXTERNALSYM CBT_CREATEWND}
- LPCBT_CREATEWND = LPCBT_CREATEWNDW;
- {$EXTERNALSYM LPCBT_CREATEWND}
- {$ELSE}
- CBT_CREATEWND = CBT_CREATEWNDA;
- {$EXTERNALSYM CBT_CREATEWND}
- LPCBT_CREATEWND = LPCBT_CREATEWNDA;
- {$EXTERNALSYM LPCBT_CREATEWND}
- {$ENDIF UNICODE}
-
- LPWINDOWPLACEMENT = ^WINDOWPLACEMENT;
- {$EXTERNALSYM LPWINDOWPLACEMENT}
- tagWINDOWPLACEMENT = record
- length: UINT;
- flags: UINT;
- showCmd: UINT;
- ptMinPosition: POINT;
- ptMaxPosition: POINT;
- rcNormalPosition: RECT;
- end;
- {$EXTERNALSYM tagWINDOWPLACEMENT}
- WINDOWPLACEMENT = tagWINDOWPLACEMENT;
- {$EXTERNALSYM WINDOWPLACEMENT}
- TWindowPlacement = WINDOWPLACEMENT;
- PWindowPlacement = LPWINDOWPLACEMENT;
-
-const
- WPF_SETMINPOSITION = $0001;
- {$EXTERNALSYM WPF_SETMINPOSITION}
- WPF_RESTORETOMAXIMIZED = $0002;
- {$EXTERNALSYM WPF_RESTORETOMAXIMIZED}
- WPF_ASYNCWINDOWPLACEMENT = $0004;
- {$EXTERNALSYM WPF_ASYNCWINDOWPLACEMENT}
-
-type
- LPNMHDR = ^NMHDR;
- {$EXTERNALSYM LPNMHDR}
- tagNMHDR = record
- hwndFrom: HWND;
- idFrom: UINT_PTR;
- code: UINT; // NM_ code
- end;
- {$EXTERNALSYM tagNMHDR}
- NMHDR = tagNMHDR;
- {$EXTERNALSYM NMHDR}
- TNmHdr = NMHDR;
- PNmHdr = LPNMHDR;
-
- LPSTYLESTRUCT = ^STYLESTRUCT;
- {$EXTERNALSYM LPSTYLESTRUCT}
- tagSTYLESTRUCT = record
- styleOld: DWORD;
- styleNew: DWORD;
- end;
- {$EXTERNALSYM tagSTYLESTRUCT}
- STYLESTRUCT = tagSTYLESTRUCT;
- {$EXTERNALSYM STYLESTRUCT}
- TStyleStruct = STYLESTRUCT;
- PStyleStruct = LPSTYLESTRUCT;
-
-//
-// Owner draw control types
-//
-
-const
- ODT_MENU = 1;
- {$EXTERNALSYM ODT_MENU}
- ODT_LISTBOX = 2;
- {$EXTERNALSYM ODT_LISTBOX}
- ODT_COMBOBOX = 3;
- {$EXTERNALSYM ODT_COMBOBOX}
- ODT_BUTTON = 4;
- {$EXTERNALSYM ODT_BUTTON}
- ODT_STATIC = 5;
- {$EXTERNALSYM ODT_STATIC}
-
-//
-// Owner draw actions
-//
-
- ODA_DRAWENTIRE = $0001;
- {$EXTERNALSYM ODA_DRAWENTIRE}
- ODA_SELECT = $0002;
- {$EXTERNALSYM ODA_SELECT}
- ODA_FOCUS = $0004;
- {$EXTERNALSYM ODA_FOCUS}
-
-//
-// Owner draw state
-//
-
- ODS_SELECTED = $0001;
- {$EXTERNALSYM ODS_SELECTED}
- ODS_GRAYED = $0002;
- {$EXTERNALSYM ODS_GRAYED}
- ODS_DISABLED = $0004;
- {$EXTERNALSYM ODS_DISABLED}
- ODS_CHECKED = $0008;
- {$EXTERNALSYM ODS_CHECKED}
- ODS_FOCUS = $0010;
- {$EXTERNALSYM ODS_FOCUS}
- ODS_DEFAULT = $0020;
- {$EXTERNALSYM ODS_DEFAULT}
- ODS_COMBOBOXEDIT = $1000;
- {$EXTERNALSYM ODS_COMBOBOXEDIT}
- ODS_HOTLIGHT = $0040;
- {$EXTERNALSYM ODS_HOTLIGHT}
- ODS_INACTIVE = $0080;
- {$EXTERNALSYM ODS_INACTIVE}
- ODS_NOACCEL = $0100;
- {$EXTERNALSYM ODS_NOACCEL}
- ODS_NOFOCUSRECT = $0200;
- {$EXTERNALSYM ODS_NOFOCUSRECT}
-
-//
-// MEASUREITEMSTRUCT for ownerdraw
-//
-
-type
- LPMEASUREITEMSTRUCT = ^MEASUREITEMSTRUCT;
- {$EXTERNALSYM LPMEASUREITEMSTRUCT}
- tagMEASUREITEMSTRUCT = record
- CtlType: UINT;
- CtlID: UINT;
- itemID: UINT;
- itemWidth: UINT;
- itemHeight: UINT;
- itemData: ULONG_PTR;
- end;
- {$EXTERNALSYM tagMEASUREITEMSTRUCT}
- MEASUREITEMSTRUCT = tagMEASUREITEMSTRUCT;
- {$EXTERNALSYM MEASUREITEMSTRUCT}
- TMeasureItemStruct = MEASUREITEMSTRUCT;
- PMeasureItemStruct = LPMEASUREITEMSTRUCT;
-
-//
-// DRAWITEMSTRUCT for ownerdraw
-//
-
- LPDRAWITEMSTRUCT = ^DRAWITEMSTRUCT;
- {$EXTERNALSYM LPDRAWITEMSTRUCT}
- tagDRAWITEMSTRUCT = record
- CtlType: UINT;
- CtlID: UINT;
- itemID: UINT;
- itemAction: UINT;
- itemState: UINT;
- hwndItem: HWND;
- hDC: HDC;
- rcItem: RECT;
- itemData: ULONG_PTR;
- end;
- {$EXTERNALSYM tagDRAWITEMSTRUCT}
- DRAWITEMSTRUCT = tagDRAWITEMSTRUCT;
- {$EXTERNALSYM DRAWITEMSTRUCT}
- TDrawItemStruct = DRAWITEMSTRUCT;
- PDrawItemStruct = LPDRAWITEMSTRUCT;
-
-//
-// DELETEITEMSTRUCT for ownerdraw
-//
-
- LPDELETEITEMSTRUCT = ^DELETEITEMSTRUCT;
- {$EXTERNALSYM LPDELETEITEMSTRUCT}
- tagDELETEITEMSTRUCT = record
- CtlType: UINT;
- CtlID: UINT;
- itemID: UINT;
- hwndItem: HWND;
- itemData: ULONG_PTR;
- end;
- {$EXTERNALSYM tagDELETEITEMSTRUCT}
- DELETEITEMSTRUCT = tagDELETEITEMSTRUCT;
- {$EXTERNALSYM DELETEITEMSTRUCT}
- TDeleteItemStruct = DELETEITEMSTRUCT;
- PDeleteItemStruct = LPDELETEITEMSTRUCT;
-
-//
-// COMPAREITEMSTUCT for ownerdraw sorting
-//
-
- LPCOMPAREITEMSTRUCT = ^COMPAREITEMSTRUCT;
- {$EXTERNALSYM LPCOMPAREITEMSTRUCT}
- tagCOMPAREITEMSTRUCT = record
- CtlType: UINT;
- CtlID: UINT;
- hwndItem: HWND;
- itemID1: UINT;
- itemData1: ULONG_PTR;
- itemID2: UINT;
- itemData2: ULONG_PTR;
- dwLocaleId: DWORD;
- end;
- {$EXTERNALSYM tagCOMPAREITEMSTRUCT}
- COMPAREITEMSTRUCT = tagCOMPAREITEMSTRUCT;
- {$EXTERNALSYM COMPAREITEMSTRUCT}
- TCompareItemStruct = COMPAREITEMSTRUCT;
- PCompareItemStruct = LPCOMPAREITEMSTRUCT;
-
-//
-// Message Function Templates
-//
-
-function GetMessageA(lpMsg: LPMSG; hWnd: HWND; wMsgFilterMin, wMsgFilterMax: UINT): BOOL; stdcall;
-{$EXTERNALSYM GetMessageA}
-function GetMessageW(lpMsg: LPMSG; hWnd: HWND; wMsgFilterMin, wMsgFilterMax: UINT): BOOL; stdcall;
-{$EXTERNALSYM GetMessageW}
-function GetMessage(lpMsg: LPMSG; hWnd: HWND; wMsgFilterMin, wMsgFilterMax: UINT): BOOL; stdcall;
-{$EXTERNALSYM GetMessage}
-
-function TranslateMessage(lpMsg: LPMSG): BOOL; stdcall;
-{$EXTERNALSYM TranslateMessage}
-
-function DispatchMessageA(lpMsg: LPMSG): LRESULT; stdcall;
-{$EXTERNALSYM DispatchMessageA}
-function DispatchMessageW(lpMsg: LPMSG): LRESULT; stdcall;
-{$EXTERNALSYM DispatchMessageW}
-function DispatchMessage(lpMsg: LPMSG): LRESULT; stdcall;
-{$EXTERNALSYM DispatchMessage}
-
-function SetMessageQueue(cMessagesMax: Integer): BOOL; stdcall;
-{$EXTERNALSYM SetMessageQueue}
-
-function PeekMessageA(var lpMsg: MSG; hWnd: HWND;
- wMsgFilterMin, wMsgFilterMax, wRemoveMsg: UINT): BOOL; stdcall;
-{$EXTERNALSYM PeekMessageA}
-function PeekMessageW(var lpMsg: MSG; hWnd: HWND;
- wMsgFilterMin, wMsgFilterMax, wRemoveMsg: UINT): BOOL; stdcall;
-{$EXTERNALSYM PeekMessageW}
-function PeekMessage(var lpMsg: MSG; hWnd: HWND;
- wMsgFilterMin, wMsgFilterMax, wRemoveMsg: UINT): BOOL; stdcall;
-{$EXTERNALSYM PeekMessage}
-
-//
-// Queue status flags for GetQueueStatus() and MsgWaitForMultipleObjects()
-//
-
-const
- QS_KEY = $0001;
- {$EXTERNALSYM QS_KEY}
- QS_MOUSEMOVE = $0002;
- {$EXTERNALSYM QS_MOUSEMOVE}
- QS_MOUSEBUTTON = $0004;
- {$EXTERNALSYM QS_MOUSEBUTTON}
- QS_POSTMESSAGE = $0008;
- {$EXTERNALSYM QS_POSTMESSAGE}
- QS_TIMER = $0010;
- {$EXTERNALSYM QS_TIMER}
- QS_PAINT = $0020;
- {$EXTERNALSYM QS_PAINT}
- QS_SENDMESSAGE = $0040;
- {$EXTERNALSYM QS_SENDMESSAGE}
- QS_HOTKEY = $0080;
- {$EXTERNALSYM QS_HOTKEY}
- QS_ALLPOSTMESSAGE = $0100;
- {$EXTERNALSYM QS_ALLPOSTMESSAGE}
- QS_RAWINPUT = $0400;
- {$EXTERNALSYM QS_RAWINPUT}
-
- QS_MOUSE = QS_MOUSEMOVE or QS_MOUSEBUTTON;
- {$EXTERNALSYM QS_MOUSE}
-
- QS_INPUT = QS_MOUSE or QS_KEY {$IFDEF WINXP_UP} or QS_RAWINPUT {$ENDIF};
- {$EXTERNALSYM QS_INPUT}
-
- QS_ALLEVENTS = QS_INPUT or QS_POSTMESSAGE or QS_TIMER or QS_PAINT or QS_HOTKEY;
- {$EXTERNALSYM QS_ALLEVENTS}
-
- QS_ALLINPUT = (QS_INPUT or QS_POSTMESSAGE or QS_TIMER or QS_PAINT or
- QS_HOTKEY or QS_SENDMESSAGE);
- {$EXTERNALSYM QS_ALLINPUT}
-
-//
-// PeekMessage() Options
-//
-
-const
- PM_NOREMOVE = $0000;
- {$EXTERNALSYM PM_NOREMOVE}
- PM_REMOVE = $0001;
- {$EXTERNALSYM PM_REMOVE}
- PM_NOYIELD = $0002;
- {$EXTERNALSYM PM_NOYIELD}
- PM_QS_INPUT = QS_INPUT shl 16;
- {$EXTERNALSYM PM_QS_INPUT}
- PM_QS_POSTMESSAGE = (QS_POSTMESSAGE or QS_HOTKEY or QS_TIMER) shl 16;
- {$EXTERNALSYM PM_QS_POSTMESSAGE}
- PM_QS_PAINT = QS_PAINT shl 16;
- {$EXTERNALSYM PM_QS_PAINT}
- PM_QS_SENDMESSAGE = QS_SENDMESSAGE shl 16;
- {$EXTERNALSYM PM_QS_SENDMESSAGE}
-
-function RegisterHotKey(hWnd: HWND; id: Integer; fsModifiers, vk: UINT): BOOL; stdcall;
-{$EXTERNALSYM RegisterHotKey}
-
-function UnregisterHotKey(hWnd: HWND; id: Integer): BOOL; stdcall;
-{$EXTERNALSYM UnregisterHotKey}
-
-const
- MOD_ALT = $0001;
- {$EXTERNALSYM MOD_ALT}
- MOD_CONTROL = $0002;
- {$EXTERNALSYM MOD_CONTROL}
- MOD_SHIFT = $0004;
- {$EXTERNALSYM MOD_SHIFT}
- MOD_WIN = $0008;
- {$EXTERNALSYM MOD_WIN}
-
- IDHOT_SNAPWINDOW = DWORD(-1); // SHIFT-PRINTSCRN
- {$EXTERNALSYM IDHOT_SNAPWINDOW}
- IDHOT_SNAPDESKTOP = DWORD(-2); // PRINTSCRN
- {$EXTERNALSYM IDHOT_SNAPDESKTOP}
-
-const
- ENDSESSION_LOGOFF = DWORD($80000000);
- {$EXTERNALSYM ENDSESSION_LOGOFF}
-
- EWX_LOGOFF = 0;
- {$EXTERNALSYM EWX_LOGOFF}
- EWX_SHUTDOWN = $00000001;
- {$EXTERNALSYM EWX_SHUTDOWN}
- EWX_REBOOT = $00000002;
- {$EXTERNALSYM EWX_REBOOT}
- EWX_FORCE = $00000004;
- {$EXTERNALSYM EWX_FORCE}
- EWX_POWEROFF = $00000008;
- {$EXTERNALSYM EWX_POWEROFF}
- EWX_FORCEIFHUNG = $00000010;
- {$EXTERNALSYM EWX_FORCEIFHUNG}
-
-function ExitWindows(dwReserved: DWORD; uREserved: UINT): BOOL;
-{$EXTERNALSYM ExitWindows}
-
-function ExitWindowsEx(uFlags: UINT; dwReserved: DWORD): BOOL; stdcall;
-{$EXTERNALSYM ExitWindowsEx}
-
-function SwapMouseButton(fSwap: BOOL): BOOL; stdcall;
-{$EXTERNALSYM SwapMouseButton}
-
-function GetMessagePos: DWORD; stdcall;
-{$EXTERNALSYM GetMessagePos}
-
-function GetMessageTime: LONG; stdcall;
-{$EXTERNALSYM GetMessageTime}
-
-function GetMessageExtraInfo: LPARAM; stdcall;
-{$EXTERNALSYM GetMessageExtraInfo}
-
-function SetMessageExtraInfo(lParam: LPARAM): LPARAM; stdcall;
-{$EXTERNALSYM SetMessageExtraInfo}
-
-function SendMessageA(hWnd: HWND; Msg: UINT; wParam: WPARAM; lParam: LPARAM): LRESULT; stdcall;
-{$EXTERNALSYM SendMessageA}
-function SendMessageW(hWnd: HWND; Msg: UINT; wParam: WPARAM; lParam: LPARAM): LRESULT; stdcall;
-{$EXTERNALSYM SendMessageW}
-function SendMessage(hWnd: HWND; Msg: UINT; wParam: WPARAM; lParam: LPARAM): LRESULT; stdcall;
-{$EXTERNALSYM SendMessage}
-
-function SendMessageTimeoutA(hWnd: HWND; Msg: UINT; wParam: WPARAM; lParam: LPARAM;
- fuFlags, uTimeout: UINT; var lpdwResult: DWORD_PTR): LRESULT; stdcall;
-{$EXTERNALSYM SendMessageTimeoutA}
-function SendMessageTimeoutW(hWnd: HWND; Msg: UINT; wParam: WPARAM; lParam: LPARAM;
- fuFlags, uTimeout: UINT; var lpdwResult: DWORD_PTR): LRESULT; stdcall;
-{$EXTERNALSYM SendMessageTimeoutW}
-function SendMessageTimeout(hWnd: HWND; Msg: UINT; wParam: WPARAM; lParam: LPARAM;
- fuFlags, uTimeout: UINT; var lpdwResult: DWORD_PTR): LRESULT; stdcall;
-{$EXTERNALSYM SendMessageTimeout}
-
-function SendNotifyMessageA(hWnd: HWND; Msg: UINT; wParam: WPARAM; lParam: LPARAM): BOOL; stdcall;
-{$EXTERNALSYM SendNotifyMessageA}
-function SendNotifyMessageW(hWnd: HWND; Msg: UINT; wParam: WPARAM; lParam: LPARAM): BOOL; stdcall;
-{$EXTERNALSYM SendNotifyMessageW}
-function SendNotifyMessage(hWnd: HWND; Msg: UINT; wParam: WPARAM; lParam: LPARAM): BOOL; stdcall;
-{$EXTERNALSYM SendNotifyMessage}
-
-function SendMessageCallbackA(hWnd: HWND; Msg: UINT; wParam: WPARAM; lParam: LPARAM;
- lpResultCallBack: SENDASYNCPROC; dwData: ULONG_PTR): BOOL; stdcall;
-{$EXTERNALSYM SendMessageCallbackA}
-function SendMessageCallbackW(hWnd: HWND; Msg: UINT; wParam: WPARAM; lParam: LPARAM;
- lpResultCallBack: SENDASYNCPROC; dwData: ULONG_PTR): BOOL; stdcall;
-{$EXTERNALSYM SendMessageCallbackW}
-function SendMessageCallback(hWnd: HWND; Msg: UINT; wParam: WPARAM; lParam: LPARAM;
- lpResultCallBack: SENDASYNCPROC; dwData: ULONG_PTR): BOOL; stdcall;
-{$EXTERNALSYM SendMessageCallback}
-
-type
- BSMINFO = record
- cbSize: UINT;
- hdesk: HDESK;
- hwnd: HWND;
- luid: LUID;
- end;
- {$EXTERNALSYM BSMINFO}
- PBSMINFO = ^BSMINFO;
- TBsmInfo = BSMINFO;
-
-function BroadcastSystemMessageExA(dwFlags: DWORD; lpwRecipients: LPDWORD; uiMessage: UINT;
- wParam: WPARAM; lParam: LPARAM; pBSMInfo: PBSMINFO): Longint; stdcall;
-{$EXTERNALSYM BroadcastSystemMessageExA}
-function BroadcastSystemMessageExW(dwFlags: DWORD; lpwRecipients: LPDWORD; uiMessage: UINT;
- wParam: WPARAM; lParam: LPARAM; pBSMInfo: PBSMINFO): Longint; stdcall;
-{$EXTERNALSYM BroadcastSystemMessageExW}
-function BroadcastSystemMessageEx(dwFlags: DWORD; lpwRecipients: LPDWORD; uiMessage: UINT;
- wParam: WPARAM; lParam: LPARAM; pBSMInfo: PBSMINFO): Longint; stdcall;
-{$EXTERNALSYM BroadcastSystemMessageEx}
-
-function BroadcastSystemMessageA(dwFlags: DWORD; lpdwRecipients: LPDWORD;
- uiMessage: UINT; wParam: WPARAM; lParam: LPARAM): Longint; stdcall;
-{$EXTERNALSYM BroadcastSystemMessageA}
-function BroadcastSystemMessageW(dwFlags: DWORD; lpdwRecipients: LPDWORD;
- uiMessage: UINT; wParam: WPARAM; lParam: LPARAM): Longint; stdcall;
-{$EXTERNALSYM BroadcastSystemMessageW}
-function BroadcastSystemMessage(dwFlags: DWORD; lpdwRecipients: LPDWORD;
- uiMessage: UINT; wParam: WPARAM; lParam: LPARAM): Longint; stdcall;
-{$EXTERNALSYM BroadcastSystemMessage}
-
-//Broadcast Special Message Recipient list
-
-const
- BSM_ALLCOMPONENTS = $00000000;
- {$EXTERNALSYM BSM_ALLCOMPONENTS}
- BSM_VXDS = $00000001;
- {$EXTERNALSYM BSM_VXDS}
- BSM_NETDRIVER = $00000002;
- {$EXTERNALSYM BSM_NETDRIVER}
- BSM_INSTALLABLEDRIVERS = $00000004;
- {$EXTERNALSYM BSM_INSTALLABLEDRIVERS}
- BSM_APPLICATIONS = $00000008;
- {$EXTERNALSYM BSM_APPLICATIONS}
- BSM_ALLDESKTOPS = $00000010;
- {$EXTERNALSYM BSM_ALLDESKTOPS}
-
-//Broadcast Special Message Flags
-
- BSF_QUERY = $00000001;
- {$EXTERNALSYM BSF_QUERY}
- BSF_IGNORECURRENTTASK = $00000002;
- {$EXTERNALSYM BSF_IGNORECURRENTTASK}
- BSF_FLUSHDISK = $00000004;
- {$EXTERNALSYM BSF_FLUSHDISK}
- BSF_NOHANG = $00000008;
- {$EXTERNALSYM BSF_NOHANG}
- BSF_POSTMESSAGE = $00000010;
- {$EXTERNALSYM BSF_POSTMESSAGE}
- BSF_FORCEIFHUNG = $00000020;
- {$EXTERNALSYM BSF_FORCEIFHUNG}
- BSF_NOTIMEOUTIFNOTHUNG = $00000040;
- {$EXTERNALSYM BSF_NOTIMEOUTIFNOTHUNG}
- BSF_ALLOWSFW = $00000080;
- {$EXTERNALSYM BSF_ALLOWSFW}
- BSF_SENDNOTIFYMESSAGE = $00000100;
- {$EXTERNALSYM BSF_SENDNOTIFYMESSAGE}
-
- BSF_RETURNHDESK = $00000200;
- {$EXTERNALSYM BSF_RETURNHDESK}
- BSF_LUID = $00000400;
- {$EXTERNALSYM BSF_LUID}
-
- BROADCAST_QUERY_DENY = $424D5144; // Return this value to deny a query.
- {$EXTERNALSYM BROADCAST_QUERY_DENY}
-
-// RegisterDeviceNotification
-
-type
- HDEVNOTIFY = PVOID;
- {$EXTERNALSYM HDEVNOTIFY}
- PHDEVNOTIFY = ^HDEVNOTIFY;
- {$EXTERNALSYM PHDEVNOTIFY}
-
-const
- DEVICE_NOTIFY_WINDOW_HANDLE = $00000000;
- {$EXTERNALSYM DEVICE_NOTIFY_WINDOW_HANDLE}
- DEVICE_NOTIFY_SERVICE_HANDLE = $00000001;
- {$EXTERNALSYM DEVICE_NOTIFY_SERVICE_HANDLE}
- DEVICE_NOTIFY_ALL_INTERFACE_CLASSES = $00000004;
- {$EXTERNALSYM DEVICE_NOTIFY_ALL_INTERFACE_CLASSES}
-
-function RegisterDeviceNotificationA(hRecipient: HANDLE; NotificationFilter: LPVOID;
- Flags: DWORD): HDEVNOTIFY; stdcall;
-{$EXTERNALSYM RegisterDeviceNotificationA}
-function RegisterDeviceNotificationW(hRecipient: HANDLE; NotificationFilter: LPVOID;
- Flags: DWORD): HDEVNOTIFY; stdcall;
-{$EXTERNALSYM RegisterDeviceNotificationW}
-function RegisterDeviceNotification(hRecipient: HANDLE; NotificationFilter: LPVOID;
- Flags: DWORD): HDEVNOTIFY; stdcall;
-{$EXTERNALSYM RegisterDeviceNotification}
-
-function UnregisterDeviceNotification(Handle: HDEVNOTIFY): BOOL; stdcall;
-{$EXTERNALSYM UnregisterDeviceNotification}
-
-function PostMessageA(hWnd: HWND; Msg: UINT; wParam: WPARAM; lParam: LPARAM): BOOL; stdcall;
-{$EXTERNALSYM PostMessageA}
-function PostMessageW(hWnd: HWND; Msg: UINT; wParam: WPARAM; lParam: LPARAM): BOOL; stdcall;
-{$EXTERNALSYM PostMessageW}
-function PostMessage(hWnd: HWND; Msg: UINT; wParam: WPARAM; lParam: LPARAM): BOOL; stdcall;
-{$EXTERNALSYM PostMessage}
-
-function PostThreadMessageA(idThread: DWORD; Msg: UINT; wParam: WPARAM; lParam: LPARAM): BOOL; stdcall;
-{$EXTERNALSYM PostThreadMessageA}
-function PostThreadMessageW(idThread: DWORD; Msg: UINT; wParam: WPARAM; lParam: LPARAM): BOOL; stdcall;
-{$EXTERNALSYM PostThreadMessageW}
-function PostThreadMessage(idThread: DWORD; Msg: UINT; wParam: WPARAM; lParam: LPARAM): BOOL; stdcall;
-{$EXTERNALSYM PostThreadMessage}
-
-function PostAppMessageA(idThread: DWORD; wMsg: UINT; wParam: WPARAM; lParam: LPARAM): BOOL;
-{$EXTERNALSYM PostAppMessageA}
-function PostAppMessageW(idThread: DWORD; wMsg: UINT; wParam: WPARAM; lParam: LPARAM): BOOL;
-{$EXTERNALSYM PostAppMessageW}
-function PostAppMessage(idThread: DWORD; wMsg: UINT; wParam: WPARAM; lParam: LPARAM): BOOL;
-{$EXTERNALSYM PostAppMessage}
-
-//
-// Special HWND value for use with PostMessage() and SendMessage()
-//
-
-const
- HWND_BROADCAST = HWND($ffff);
- {$EXTERNALSYM HWND_BROADCAST}
-
- HWND_MESSAGE = HWND(-3);
- {$EXTERNALSYM HWND_MESSAGE}
-
-function AttachThreadInput(idAttach, idAttachTo: DWORD; fAttach: BOOL): BOOL; stdcall;
-{$EXTERNALSYM AttachThreadInput}
-
-function ReplyMessage(lResult: LRESULT): BOOL; stdcall;
-{$EXTERNALSYM ReplyMessage}
-
-function WaitMessage: BOOL; stdcall;
-{$EXTERNALSYM WaitMessage}
-
-function WaitForInputIdle(hProcess: HANDLE; dwMilliseconds: DWORD): DWORD; stdcall;
-{$EXTERNALSYM WaitForInputIdle}
-
-function DefWindowProcA(hWnd: HWND; Msg: UINT; wParam: WPARAM; lParam: LPARAM): LRESULT; stdcall;
-{$EXTERNALSYM DefWindowProcA}
-function DefWindowProcW(hWnd: HWND; Msg: UINT; wParam: WPARAM; lParam: LPARAM): LRESULT; stdcall;
-{$EXTERNALSYM DefWindowProcW}
-function DefWindowProc(hWnd: HWND; Msg: UINT; wParam: WPARAM; lParam: LPARAM): LRESULT; stdcall;
-{$EXTERNALSYM DefWindowProc}
-
-procedure PostQuitMessage(nExitCode: Integer); stdcall;
-{$EXTERNALSYM PostQuitMessage}
-
-function CallWindowProcA(lpPrevWndFunc: WNDPROC; hWnd: HWND; Msg: UINT;
- wParam: WPARAM; lParam: LPARAM): LRESULT; stdcall;
-{$EXTERNALSYM CallWindowProcA}
-function CallWindowProcW(lpPrevWndFunc: WNDPROC; hWnd: HWND; Msg: UINT;
- wParam: WPARAM; lParam: LPARAM): LRESULT; stdcall;
-{$EXTERNALSYM CallWindowProcW}
-function CallWindowProc(lpPrevWndFunc: WNDPROC; hWnd: HWND; Msg: UINT;
- wParam: WPARAM; lParam: LPARAM): LRESULT; stdcall;
-{$EXTERNALSYM CallWindowProc}
-
-function InSendMessage: BOOL; stdcall;
-{$EXTERNALSYM InSendMessage}
-
-function InSendMessageEx(lpReserved: LPVOID): DWORD; stdcall;
-{$EXTERNALSYM InSendMessageEx}
-
-//
-// InSendMessageEx return value
-//
-
-const
- ISMEX_NOSEND = $00000000;
- {$EXTERNALSYM ISMEX_NOSEND}
- ISMEX_SEND = $00000001;
- {$EXTERNALSYM ISMEX_SEND}
- ISMEX_NOTIFY = $00000002;
- {$EXTERNALSYM ISMEX_NOTIFY}
- ISMEX_CALLBACK = $00000004;
- {$EXTERNALSYM ISMEX_CALLBACK}
- ISMEX_REPLIED = $00000008;
- {$EXTERNALSYM ISMEX_REPLIED}
-
-function GetDoubleClickTime: UINT; stdcall;
-{$EXTERNALSYM GetDoubleClickTime}
-
-function SetDoubleClickTime(uInterval: UINT): BOOL; stdcall;
-{$EXTERNALSYM SetDoubleClickTime}
-
-function RegisterClassA(const lpWndClass: WNDCLASSA): ATOM; stdcall;
-{$EXTERNALSYM RegisterClassA}
-function RegisterClassW(const lpWndClass: WNDCLASSW): ATOM; stdcall;
-{$EXTERNALSYM RegisterClassW}
-function RegisterClass(const lpWndClass: WNDCLASS): ATOM; stdcall;
-{$EXTERNALSYM RegisterClass}
-
-function UnregisterClassA(lpClassName: LPCSTR; hInstance: HINSTANCE): BOOL; stdcall;
-{$EXTERNALSYM UnregisterClassA}
-function UnregisterClassW(lpClassName: LPCWSTR; hInstance: HINSTANCE): BOOL; stdcall;
-{$EXTERNALSYM UnregisterClassW}
-function UnregisterClass(lpClassName: LPCTSTR; hInstance: HINSTANCE): BOOL; stdcall;
-{$EXTERNALSYM UnregisterClass}
-
-function GetClassInfoA(hInstance: HINSTANCE; lpClassName: LPCSTR;
- var lpWndClass: WNDCLASSA): BOOL; stdcall;
-{$EXTERNALSYM GetClassInfoA}
-function GetClassInfoW(hInstance: HINSTANCE; lpClassName: LPCWSTR;
- var lpWndClass: WNDCLASSW): BOOL; stdcall;
-{$EXTERNALSYM GetClassInfoW}
-function GetClassInfo(hInstance: HINSTANCE; lpClassName: LPCTSTR;
- var lpWndClass: WNDCLASS): BOOL; stdcall;
-{$EXTERNALSYM GetClassInfo}
-
-function RegisterClassExA(const lpwcx: WNDCLASSEXA): ATOM; stdcall;
-{$EXTERNALSYM RegisterClassExA}
-function RegisterClassExW(const lpwcx: WNDCLASSEXW): ATOM; stdcall;
-{$EXTERNALSYM RegisterClassExW}
-function RegisterClassEx(const lpwcx: WNDCLASSEX): ATOM; stdcall;
-{$EXTERNALSYM RegisterClassEx}
-
-function GetClassInfoExA(hinst: HINSTANCE; lpszClass: LPCSTR; var lpwcx: WNDCLASSEXA): BOOL; stdcall;
-{$EXTERNALSYM GetClassInfoExA}
-function GetClassInfoExW(hinst: HINSTANCE; lpszClass: LPCWSTR; var lpwcx: WNDCLASSEXW): BOOL; stdcall;
-{$EXTERNALSYM GetClassInfoExW}
-function GetClassInfoEx(hinst: HINSTANCE; lpszClass: LPCTSTR; var lpwcx: WNDCLASSEX): BOOL; stdcall;
-{$EXTERNALSYM GetClassInfoEx}
-
-const
- CW_USEDEFAULT = Integer($80000000);
- {$EXTERNALSYM CW_USEDEFAULT}
-
-//
-// Special value for CreateWindow, et al.
-//
-
-const
- HWND_DESKTOP = HWND(0);
- {$EXTERNALSYM HWND_DESKTOP}
-
-type
- PREGISTERCLASSNAMEW = function(p: LPCWSTR): LongBool; stdcall;
- {$EXTERNALSYM PREGISTERCLASSNAMEW}
-
-function CreateWindowExA(dwExStyle: DWORD; lpClassName, lpWindowName: LPCSTR;
- dwStyle: DWORD; X, Y, nWidth, nHeight: Integer; hWndParent: HWND;
- hMenu: HMENU; hInstance: HINSTANCE; lpParam: LPVOID): HWND; stdcall;
-{$EXTERNALSYM CreateWindowExA}
-function CreateWindowExW(dwExStyle: DWORD; lpClassName, lpWindowName: LPCWSTR;
- dwStyle: DWORD; X, Y, nWidth, nHeight: Integer; hWndParent: HWND;
- hMenu: HMENU; hInstance: HINSTANCE; lpParam: LPVOID): HWND; stdcall;
-{$EXTERNALSYM CreateWindowExW}
-function CreateWindowEx(dwExStyle: DWORD; lpClassName, lpWindowName: LPCTSTR;
- dwStyle: DWORD; X, Y, nWidth, nHeight: Integer; hWndParent: HWND;
- hMenu: HMENU; hInstance: HINSTANCE; lpParam: LPVOID): HWND; stdcall;
-{$EXTERNALSYM CreateWindowEx}
-
-function CreateWindowA(lpClassName, lpWindowName: LPCSTR; dwStyle: DWORD;
- x, y, nWidth, nHeight: Integer; hWndParent: HWND; hMenu: HMENU;
- hInstance: HINSTANCE; lpParam: LPVOID): HWND;
-{$EXTERNALSYM CreateWindowA}
-function CreateWindowW(lpClassName, lpWindowName: LPCWSTR; dwStyle: DWORD;
- x, y, nWidth, nHeight: Integer; hWndParent: HWND; hMenu: HMENU;
- hInstance: HINSTANCE; lpParam: LPVOID): HWND;
-{$EXTERNALSYM CreateWindowW}
-function CreateWindow(lpClassName, lpWindowName: LPCTSTR; dwStyle: DWORD;
- x, y, nWidth, nHeight: Integer; hWndParent: HWND; hMenu: HMENU;
- hInstance: HINSTANCE; lpParam: LPVOID): HWND;
-{$EXTERNALSYM CreateWindow}
-
-function IsWindow(hWnd: HWND): BOOL; stdcall;
-{$EXTERNALSYM IsWindow}
-
-function IsMenu(hMenu: HMENU): BOOL; stdcall;
-{$EXTERNALSYM IsMenu}
-
-function IsChild(hWndParent, hWnd: HWND): BOOL; stdcall;
-{$EXTERNALSYM IsChild}
-
-function DestroyWindow(hWnd: HWND): BOOL; stdcall;
-{$EXTERNALSYM DestroyWindow}
-
-function ShowWindow(hWnd: HWND; nCmdShow: Integer): BOOL; stdcall;
-{$EXTERNALSYM ShowWindow}
-
-function AnimateWindow(hWnd: HWND; dwTime, dwFlags: DWORD): BOOL; stdcall;
-{$EXTERNALSYM AnimateWindow}
-
-function UpdateLayeredWindow(hWnd: HWND; hdcDst: HDC; pptDst: LPPOINT;
- psize: LPSIZE; hdcSrc: HDC; pptSrc: LPPOINT; crKey: COLORREF;
- pblend: LPBLENDFUNCTION; dwFlags: DWORD): BOOL; stdcall;
-{$EXTERNALSYM UpdateLayeredWindow}
-
-function GetLayeredWindowAttributes(hwnd: HWND; pcrKey: LPCOLORREF; pbAlpha: LPBYTE;
- pdwFlags: LPWORD): BOOL; stdcall;
-{$EXTERNALSYM GetLayeredWindowAttributes}
-
-const
- PW_CLIENTONLY = $00000001;
- {$EXTERNALSYM PW_CLIENTONLY}
-
-function PrintWindow(hwnd: HWND; hdcBlt: HDC; nFlags: UINT): BOOL; stdcall;
-{$EXTERNALSYM PrintWindow}
-
-function SetLayeredWindowAttributes(hwnd: HWND; crKey: COLORREF; bAlpha: BYTE;
- dwFlags: DWORD): BOOL; stdcall;
-{$EXTERNALSYM SetLayeredWindowAttributes}
-
-const
- LWA_COLORKEY = $00000001;
- {$EXTERNALSYM LWA_COLORKEY}
- LWA_ALPHA = $00000002;
- {$EXTERNALSYM LWA_ALPHA}
-
- ULW_COLORKEY = $00000001;
- {$EXTERNALSYM ULW_COLORKEY}
- ULW_ALPHA = $00000002;
- {$EXTERNALSYM ULW_ALPHA}
- ULW_OPAQUE = $00000004;
- {$EXTERNALSYM ULW_OPAQUE}
-
-function ShowWindowAsync(hWnd: HWND; nCmdShow: Integer): BOOL; stdcall;
-{$EXTERNALSYM ShowWindowAsync}
-
-function FlashWindow(hWnd: HWND; bInvert: BOOL): BOOL; stdcall;
-{$EXTERNALSYM FlashWindow}
-
-type
- PFLASH_INFO = ^FLASH_INFO;
- {$EXTERNALSYM PFLASH_INFO}
- FLASH_INFO = record
- cbSize: UINT;
- hwnd: HWND;
- dwFlags: DWORD;
- uCount: UINT;
- dwTimeout: DWORD;
- end;
- {$EXTERNALSYM FLASH_INFO}
- TFlashInfo = FLASH_INFO;
- PFlashInfo = PFLASH_INFO;
-
-function FlashWindowEx(var pfwi: FLASH_INFO): BOOL; stdcall;
-{$EXTERNALSYM FlashWindowEx}
-
-const
- FLASHW_STOP = 0;
- {$EXTERNALSYM FLASHW_STOP}
- FLASHW_CAPTION = $00000001;
- {$EXTERNALSYM FLASHW_CAPTION}
- FLASHW_TRAY = $00000002;
- {$EXTERNALSYM FLASHW_TRAY}
- FLASHW_ALL = FLASHW_CAPTION or FLASHW_TRAY;
- {$EXTERNALSYM FLASHW_ALL}
- FLASHW_TIMER = $00000004;
- {$EXTERNALSYM FLASHW_TIMER}
- FLASHW_TIMERNOFG = $0000000C;
- {$EXTERNALSYM FLASHW_TIMERNOFG}
-
-function ShowOwnedPopups(hWnd: HWND; fShow: BOOL): BOOL; stdcall;
-{$EXTERNALSYM ShowOwnedPopups}
-
-function OpenIcon(hWnd: HWND): BOOL; stdcall;
-{$EXTERNALSYM OpenIcon}
-
-function CloseWindow(hWnd: HWND): BOOL; stdcall;
-{$EXTERNALSYM CloseWindow}
-
-function MoveWindow(hWnd: HWND; X, Y, nWidth, nHeight: Integer; bRepaint: BOOL): BOOL; stdcall;
-{$EXTERNALSYM MoveWindow}
-
-function SetWindowPos(hWnd, hWndInsertAfter: HWND; X, Y, cx, cy: Integer;
- uFlags: UINT): BOOL; stdcall;
-{$EXTERNALSYM SetWindowPos}
-
-function GetWindowPlacement(hWnd: HWND; var lpwndpl: WINDOWPLACEMENT): BOOL; stdcall;
-{$EXTERNALSYM GetWindowPlacement}
-
-function SetWindowPlacement(hWnd: HWND; const lpwndpl: WINDOWPLACEMENT): BOOL; stdcall;
-{$EXTERNALSYM SetWindowPlacement}
-
-function BeginDeferWindowPos(nNumWindows: Integer): HDWP; stdcall;
-{$EXTERNALSYM BeginDeferWindowPos}
-
-function DeferWindowPos(hWinPosInfo: HDWP; hWnd, hWndInsertAfter: HWND;
- x, y, cx, cy: Integer; uFlags: UINT): HDWP; stdcall;
-{$EXTERNALSYM DeferWindowPos}
-
-function EndDeferWindowPos(hWinPosInfo: HDWP): BOOL; stdcall;
-{$EXTERNALSYM EndDeferWindowPos}
-
-function IsWindowVisible(hWnd: HWND): BOOL; stdcall;
-{$EXTERNALSYM IsWindowVisible}
-
-function IsIconic(hWnd: HWND): BOOL; stdcall;
-{$EXTERNALSYM IsIconic}
-
-function AnyPopup: BOOL; stdcall;
-{$EXTERNALSYM AnyPopup}
-
-function BringWindowToTop(hWnd: HWND): BOOL; stdcall;
-{$EXTERNALSYM BringWindowToTop}
-
-function IsZoomed(hWnd: HWND): BOOL; stdcall;
-{$EXTERNALSYM IsZoomed}
-
-//
-// SetWindowPos Flags
-//
-
-const
- SWP_NOSIZE = $0001;
- {$EXTERNALSYM SWP_NOSIZE}
- SWP_NOMOVE = $0002;
- {$EXTERNALSYM SWP_NOMOVE}
- SWP_NOZORDER = $0004;
- {$EXTERNALSYM SWP_NOZORDER}
- SWP_NOREDRAW = $0008;
- {$EXTERNALSYM SWP_NOREDRAW}
- SWP_NOACTIVATE = $0010;
- {$EXTERNALSYM SWP_NOACTIVATE}
- SWP_FRAMECHANGED = $0020; // The frame changed: send WM_NCCALCSIZE
- {$EXTERNALSYM SWP_FRAMECHANGED}
- SWP_SHOWWINDOW = $0040;
- {$EXTERNALSYM SWP_SHOWWINDOW}
- SWP_HIDEWINDOW = $0080;
- {$EXTERNALSYM SWP_HIDEWINDOW}
- SWP_NOCOPYBITS = $0100;
- {$EXTERNALSYM SWP_NOCOPYBITS}
- SWP_NOOWNERZORDER = $0200; // Don't do owner Z ordering
- {$EXTERNALSYM SWP_NOOWNERZORDER}
- SWP_NOSENDCHANGING = $0400; // Don't send WM_WINDOWPOSCHANGING
- {$EXTERNALSYM SWP_NOSENDCHANGING}
-
- SWP_DRAWFRAME = SWP_FRAMECHANGED;
- {$EXTERNALSYM SWP_DRAWFRAME}
- SWP_NOREPOSITION = SWP_NOOWNERZORDER;
- {$EXTERNALSYM SWP_NOREPOSITION}
-
- SWP_DEFERERASE = $2000;
- {$EXTERNALSYM SWP_DEFERERASE}
- SWP_ASYNCWINDOWPOS = $4000;
- {$EXTERNALSYM SWP_ASYNCWINDOWPOS}
-
- HWND_TOP = HWND(0);
- {$EXTERNALSYM HWND_TOP}
- HWND_BOTTOM = HWND(1);
- {$EXTERNALSYM HWND_BOTTOM}
- HWND_TOPMOST = HWND(-1);
- {$EXTERNALSYM HWND_TOPMOST}
- HWND_NOTOPMOST = HWND(-2);
- {$EXTERNALSYM HWND_NOTOPMOST}
-
-//
-// WARNING:
-// The following structures must NOT be DWORD padded because they are
-// followed by strings, etc that do not have to be DWORD aligned.
-//
-
-// #include <pshpack2.h>
-
-//
-// original NT 32 bit dialog template:
-//
-
-type
- DLGTEMPLATE = packed record
- style: DWORD;
- dwExtendedStyle: DWORD;
- cdit: WORD;
- x: short;
- y: short;
- cx: short;
- cy: short;
- end;
- {$EXTERNALSYM DLGTEMPLATE}
- TDlgTemplate = DLGTEMPLATE;
-
- LPDLGTEMPLATEA = ^DLGTEMPLATE;
- {$EXTERNALSYM LPDLGTEMPLATEA}
- LPDLGTEMPLATEW = ^DLGTEMPLATE;
- {$EXTERNALSYM LPDLGTEMPLATEW}
-
- LPCDLGTEMPLATEA = ^DLGTEMPLATE;
- {$EXTERNALSYM LPCDLGTEMPLATEA}
- LPCDLGTEMPLATEW = ^DLGTEMPLATE;
- {$EXTERNALSYM LPCDLGTEMPLATEW}
-
- {$IFDEF UNICODE}
- LPDLGTEMPLATE = LPDLGTEMPLATEW;
- {$EXTERNALSYM LPDLGTEMPLATE}
- LPCDLGTEMPLATE = LPCDLGTEMPLATEW;
- {$EXTERNALSYM LPCDLGTEMPLATE}
- {$ELSE}
- LPDLGTEMPLATE = LPDLGTEMPLATEA;
- {$EXTERNALSYM LPDLGTEMPLATE}
- LPCDLGTEMPLATE = LPCDLGTEMPLATEA;
- {$EXTERNALSYM LPCDLGTEMPLATE}
- {$ENDIF UNICODE}
-
-//
-// 32 bit Dialog item template.
-//
-
- DLGITEMTEMPLATE = packed record
- style: DWORD;
- dwExtendedStyle: DWORD;
- x: short;
- y: short;
- cx: short;
- cy: short;
- id: WORD;
- end;
- {$EXTERNALSYM DLGITEMTEMPLATE}
- TDlgItemTemplate = DLGITEMTEMPLATE;
-
- PDLGITEMTEMPLATEA = ^DLGITEMTEMPLATE;
- {$EXTERNALSYM PDLGITEMTEMPLATE}
- PDLGITEMTEMPLATEW = ^DLGITEMTEMPLATE;
- {$EXTERNALSYM PDLGITEMTEMPLATE}
-
- LPDLGITEMTEMPLATEA = ^DLGITEMTEMPLATE;
- {$EXTERNALSYM LPDLGITEMTEMPLATE}
- LPDLGITEMTEMPLATEW = ^DLGITEMTEMPLATE;
- {$EXTERNALSYM LPDLGITEMTEMPLATE}
-
- {$IFDEF UNICODE}
- PDLGITEMTEMPLATE = PDLGITEMTEMPLATEW;
- {$EXTERNALSYM PDLGITEMTEMPLATE}
- LPDLGITEMTEMPLATE = PDLGITEMTEMPLATEW;
- {$EXTERNALSYM LPDLGITEMTEMPLATE}
- {$ELSE}
- PDLGITEMTEMPLATE = PDLGITEMTEMPLATEA;
- {$EXTERNALSYM PDLGITEMTEMPLATE}
- LPDLGITEMTEMPLATE = PDLGITEMTEMPLATEA;
- {$EXTERNALSYM LPDLGITEMTEMPLATE}
- {$ENDIF UNICODE}
-
-// #include <poppack.h> // Resume normal packing//
-
-function CreateDialogParamA(hInstance: HINSTANCE; lpTemplateName: LPCSTR;
- hWndParent: HWND; lpDialogFunc: DLGPROC; dwInitParam: LPARAM): HWND; stdcall;
-{$EXTERNALSYM CreateDialogParamA}
-function CreateDialogParamW(hInstance: HINSTANCE; lpTemplateName: LPCWSTR;
- hWndParent: HWND; lpDialogFunc: DLGPROC; dwInitParam: LPARAM): HWND; stdcall;
-{$EXTERNALSYM CreateDialogParamW}
-function CreateDialogParam(hInstance: HINSTANCE; lpTemplateName: LPCTSTR;
- hWndParent: HWND; lpDialogFunc: DLGPROC; dwInitParam: LPARAM): HWND; stdcall;
-{$EXTERNALSYM CreateDialogParam}
-
-function CreateDialogIndirectParamA(hInstance: HINSTANCE; const lpTemplate: DLGTEMPLATE;
- hWndParent: HWND; lpDialogFunc: DLGPROC; dwInitParam: LPARAM): HWND; stdcall;
-{$EXTERNALSYM CreateDialogIndirectParamA}
-function CreateDialogIndirectParamW(hInstance: HINSTANCE; const lpTemplate: DLGTEMPLATE;
- hWndParent: HWND; lpDialogFunc: DLGPROC; dwInitParam: LPARAM): HWND; stdcall;
-{$EXTERNALSYM CreateDialogIndirectParamW}
-function CreateDialogIndirectParam(hInstance: HINSTANCE; const lpTemplate: DLGTEMPLATE;
- hWndParent: HWND; lpDialogFunc: DLGPROC; dwInitParam: LPARAM): HWND; stdcall;
-{$EXTERNALSYM CreateDialogIndirectParam}
-
-function CreateDialogA(hInstance: HINSTANCE; lpName: LPCSTR; hWndParent: HWND;
- lpDialogFunc: DLGPROC): HWND;
-{$EXTERNALSYM CreateDialogA}
-function CreateDialogW(hInstance: HINSTANCE; lpName: LPCWSTR; hWndParent: HWND;
- lpDialogFunc: DLGPROC): HWND;
-{$EXTERNALSYM CreateDialogW}
-function CreateDialog(hInstance: HINSTANCE; lpName: LPCTSTR; hWndParent: HWND;
- lpDialogFunc: DLGPROC): HWND;
-{$EXTERNALSYM CreateDialog}
-
-function CreateDialogIndirectA(hInstance: HINSTANCE; const lpTemplate: DLGTEMPLATE;
- hWndParent: HWND; lpDialogFunc: DLGPROC): HWND;
-{$EXTERNALSYM CreateDialogIndirectA}
-function CreateDialogIndirectW(hInstance: HINSTANCE; const lpTemplate: DLGTEMPLATE;
- hWndParent: HWND; lpDialogFunc: DLGPROC): HWND;
-{$EXTERNALSYM CreateDialogIndirectW}
-function CreateDialogIndirect(hInstance: HINSTANCE; const lpTemplate: DLGTEMPLATE;
- hWndParent: HWND; lpDialogFunc: DLGPROC): HWND;
-{$EXTERNALSYM CreateDialogIndirect}
-
-function DialogBoxParamA(hInstance: HINSTANCE; lpTemplateName: LPCSTR;
- hWndParent: HWND; lpDialogFunc: DLGPROC; dwInitParam: LPARAM): INT_PTR; stdcall;
-{$EXTERNALSYM DialogBoxParamA}
-function DialogBoxParamW(hInstance: HINSTANCE; lpTemplateName: LPCWSTR;
- hWndParent: HWND; lpDialogFunc: DLGPROC; dwInitParam: LPARAM): INT_PTR; stdcall;
-{$EXTERNALSYM DialogBoxParamW}
-function DialogBoxParam(hInstance: HINSTANCE; lpTemplateName: LPCTSTR;
- hWndParent: HWND; lpDialogFunc: DLGPROC; dwInitParam: LPARAM): INT_PTR; stdcall;
-{$EXTERNALSYM DialogBoxParam}
-
-function DialogBoxIndirectParamA(hInstance: HINSTANCE;
- const hDialogTemplate: DLGTEMPLATE; hWndParent: HWND; lpDialogFunc: DLGPROC;
- dwInitParam: LPARAM): INT_PTR; stdcall;
-{$EXTERNALSYM DialogBoxIndirectParamA}
-function DialogBoxIndirectParamW(hInstance: HINSTANCE;
- const hDialogTemplate: DLGTEMPLATE; hWndParent: HWND; lpDialogFunc: DLGPROC;
- dwInitParam: LPARAM): INT_PTR; stdcall;
-{$EXTERNALSYM DialogBoxIndirectParamW}
-function DialogBoxIndirectParam(hInstance: HINSTANCE;
- const hDialogTemplate: DLGTEMPLATE; hWndParent: HWND; lpDialogFunc: DLGPROC;
- dwInitParam: LPARAM): INT_PTR; stdcall;
-{$EXTERNALSYM DialogBoxIndirectParam}
-
-function DialogBoxA(hInstance: HINSTANCE; lpTemplate: LPCSTR; hWndParent: HWND;
- lpDialogFunc: DLGPROC): INT_PTR;
-{$EXTERNALSYM DialogBoxA}
-function DialogBoxW(hInstance: HINSTANCE; lpTemplate: LPCWSTR; hWndParent: HWND;
- lpDialogFunc: DLGPROC): INT_PTR;
-{$EXTERNALSYM DialogBoxW}
-function DialogBox(hInstance: HINSTANCE; lpTemplate: LPCTSTR; hWndParent: HWND;
- lpDialogFunc: DLGPROC): INT_PTR;
-{$EXTERNALSYM DialogBox}
-
-function DialogBoxIndirectA(hInstance: HINSTANCE; const lpTemplate: DLGTEMPLATE;
- hWndParent: HWND; lpDialogFunc: DLGPROC): INT_PTR;
-{$EXTERNALSYM DialogBoxIndirectA}
-function DialogBoxIndirectW(hInstance: HINSTANCE; const lpTemplate: DLGTEMPLATE;
- hWndParent: HWND; lpDialogFunc: DLGPROC): INT_PTR;
-{$EXTERNALSYM DialogBoxIndirectW}
-function DialogBoxIndirect(hInstance: HINSTANCE; const lpTemplate: DLGTEMPLATE;
- hWndParent: HWND; lpDialogFunc: DLGPROC): INT_PTR;
-{$EXTERNALSYM DialogBoxIndirect}
-
-function EndDialog(hDlg: HWND; nResult: INT_PTR): BOOL; stdcall;
-{$EXTERNALSYM EndDialog}
-
-function GetDlgItem(hDlg: HWND; nIDDlgItem: Integer): HWND; stdcall;
-{$EXTERNALSYM GetDlgItem}
-
-function SetDlgItemInt(hDlg: HWND; nIDDlgItem: Integer; uValue: UINT; bSigned: BOOL): BOOL; stdcall;
-{$EXTERNALSYM SetDlgItemInt}
-
-function GetDlgItemInt(hDlg: HWND; nIDDlgItem: Integer; lpTranslated: LPBOOL;
- bSigned: BOOL): UINT; stdcall;
-{$EXTERNALSYM GetDlgItemInt}
-
-function SetDlgItemTextA(hDlg: HWND; nIDDlgItem: Integer; lpString: LPCSTR): BOOL; stdcall;
-{$EXTERNALSYM SetDlgItemTextA}
-function SetDlgItemTextW(hDlg: HWND; nIDDlgItem: Integer; lpString: LPCWSTR): BOOL; stdcall;
-{$EXTERNALSYM SetDlgItemTextW}
-function SetDlgItemText(hDlg: HWND; nIDDlgItem: Integer; lpString: LPCTSTR): BOOL; stdcall;
-{$EXTERNALSYM SetDlgItemText}
-
-function GetDlgItemTextA(hDlg: HWND; nIDDlgItem: Integer; lpString: LPSTR;
- nMaxCount: Integer): UINT; stdcall;
-{$EXTERNALSYM GetDlgItemTextA}
-function GetDlgItemTextW(hDlg: HWND; nIDDlgItem: Integer; lpString: LPWSTR;
- nMaxCount: Integer): UINT; stdcall;
-{$EXTERNALSYM GetDlgItemTextW}
-function GetDlgItemText(hDlg: HWND; nIDDlgItem: Integer; lpString: LPTSTR;
- nMaxCount: Integer): UINT; stdcall;
-{$EXTERNALSYM GetDlgItemText}
-
-function CheckDlgButton(hDlg: HWND; nIDButton: Integer; uCheck: UINT): BOOL; stdcall;
-{$EXTERNALSYM CheckDlgButton}
-
-function CheckRadioButton(hDlg: HWND; nIDFirstButton, nIDLastButton: Integer;
- nIDCheckButton: Integer): BOOL; stdcall;
-{$EXTERNALSYM CheckRadioButton}
-
-function IsDlgButtonChecked(hDlg: HWND; nIDButton: Integer): UINT; stdcall;
-{$EXTERNALSYM IsDlgButtonChecked}
-
-function SendDlgItemMessageA(hDlg: HWND; nIDDlgItem: Integer; Msg: UINT;
- wParam: WPARAM; lParam: LPARAM): LRESULT; stdcall;
-{$EXTERNALSYM SendDlgItemMessageA}
-function SendDlgItemMessageW(hDlg: HWND; nIDDlgItem: Integer; Msg: UINT;
- wParam: WPARAM; lParam: LPARAM): LRESULT; stdcall;
-{$EXTERNALSYM SendDlgItemMessageW}
-function SendDlgItemMessage(hDlg: HWND; nIDDlgItem: Integer; Msg: UINT;
- wParam: WPARAM; lParam: LPARAM): LRESULT; stdcall;
-{$EXTERNALSYM SendDlgItemMessage}
-
-function GetNextDlgGroupItem(hDlg: HWND; hCtl: HWND; bPrevious: BOOL): HWND; stdcall;
-{$EXTERNALSYM GetNextDlgGroupItem}
-
-function GetNextDlgTabItem(hDlg: HWND; hCtl: HWND; bPrevious: BOOL): HWND; stdcall;
-{$EXTERNALSYM GetNextDlgTabItem}
-
-function GetDlgCtrlID(hWnd: HWND): Integer; stdcall;
-{$EXTERNALSYM GetDlgCtrlID}
-
-function GetDialogBaseUnits: Longint; stdcall;
-{$EXTERNALSYM GetDialogBaseUnits(VOID v)}
-
-function DefDlgProcA(hDlg: HWND; Msg: UINT; wParam: WPARAM; lParam: LPARAM): LRESULT; stdcall;
-{$EXTERNALSYM DefDlgProcA}
-function DefDlgProcW(hDlg: HWND; Msg: UINT; wParam: WPARAM; lParam: LPARAM): LRESULT; stdcall;
-{$EXTERNALSYM DefDlgProcW}
-function DefDlgProc(hDlg: HWND; Msg: UINT; wParam: WPARAM; lParam: LPARAM): LRESULT; stdcall;
-{$EXTERNALSYM DefDlgProc}
-
-//
-// Window extra byted needed for private dialog classes.
-//
-
-const
- DLGWINDOWEXTRA = 30;
- {$EXTERNALSYM DLGWINDOWEXTRA}
-
-function CallMsgFilterA(lpMsg: LPMSG; nCode: Integer): BOOL; stdcall;
-{$EXTERNALSYM CallMsgFilterA}
-function CallMsgFilterW(lpMsg: LPMSG; nCode: Integer): BOOL; stdcall;
-{$EXTERNALSYM CallMsgFilterW}
-function CallMsgFilter(lpMsg: LPMSG; nCode: Integer): BOOL; stdcall;
-{$EXTERNALSYM CallMsgFilter}
-
-//
-// Clipboard Manager Functions
-//
-
-function OpenClipboard(hWndNewOwner: HWND): BOOL; stdcall;
-{$EXTERNALSYM OpenClipboard}
-
-function CloseClipboard: BOOL; stdcall;
-{$EXTERNALSYM CloseClipboard}
-
-function GetClipboardSequenceNumber: DWORD; stdcall;
-{$EXTERNALSYM GetClipboardSequenceNumber}
-
-function GetClipboardOwner: HWND; stdcall;
-{$EXTERNALSYM GetClipboardOwner}
-
-function SetClipboardViewer(hWndNewViewer: HWND): HWND; stdcall;
-{$EXTERNALSYM SetClipboardViewer}
-
-function GetClipboardViewer: HWND; stdcall;
-{$EXTERNALSYM GetClipboardViewer}
-
-function ChangeClipboardChain(hWndRemove, hWndNewNext: HWND): BOOL; stdcall;
-{$EXTERNALSYM ChangeClipboardChain}
-
-function SetClipboardData(uFormat: UINT; hMem: HANDLE): HANDLE; stdcall;
-{$EXTERNALSYM SetClipboardData}
-
-function GetClipboardData(uFormat: UINT): HANDLE; stdcall;
-{$EXTERNALSYM GetClipboardData}
-
-function RegisterClipboardFormatA(lpszFormat: LPCSTR): UINT; stdcall;
-{$EXTERNALSYM RegisterClipboardFormatA}
-function RegisterClipboardFormatW(lpszFormat: LPCWSTR): UINT; stdcall;
-{$EXTERNALSYM RegisterClipboardFormatW}
-function RegisterClipboardFormat(lpszFormat: LPCTSTR): UINT; stdcall;
-{$EXTERNALSYM RegisterClipboardFormat}
-
-function CountClipboardFormats: Integer; stdcall;
-{$EXTERNALSYM CountClipboardFormats}
-
-function EnumClipboardFormats(format: UINT): UINT; stdcall;
-{$EXTERNALSYM EnumClipboardFormats}
-
-function GetClipboardFormatNameA(format: UINT; lpszFormatName: LPSTR;
- cchMaxCount: Integer): Integer; stdcall;
-{$EXTERNALSYM GetClipboardFormatNameA}
-function GetClipboardFormatNameW(format: UINT; lpszFormatName: LPWSTR;
- cchMaxCount: Integer): Integer; stdcall;
-{$EXTERNALSYM GetClipboardFormatNameW}
-function GetClipboardFormatName(format: UINT; lpszFormatName: LPTSTR;
- cchMaxCount: Integer): Integer; stdcall;
-{$EXTERNALSYM GetClipboardFormatName}
-
-function EmptyClipboard: BOOL; stdcall;
-{$EXTERNALSYM EmptyClipboard}
-
-function IsClipboardFormatAvailable(format: UINT): BOOL; stdcall;
-{$EXTERNALSYM IsClipboardFormatAvailable}
-
-function GetPriorityClipboardFormat(paFormatPriorityList: PUINT; cFormats: Integer): Integer; stdcall;
-{$EXTERNALSYM GetPriorityClipboardFormat}
-
-function GetOpenClipboardWindow: HWND; stdcall;
-{$EXTERNALSYM GetOpenClipboardWindow}
-
-//
-// Character Translation Routines
-//
-
-function CharToOemA(lpszSrc: LPCSTR; lpszDst: LPSTR): BOOL; stdcall;
-{$EXTERNALSYM CharToOemA}
-function CharToOemW(lpszSrc: LPCWSTR; lpszDst: LPSTR): BOOL; stdcall;
-{$EXTERNALSYM CharToOemW}
-function CharToOem(lpszSrc: LPCTSTR; lpszDst: LPSTR): BOOL; stdcall;
-{$EXTERNALSYM CharToOem}
-
-function OemToCharA(lpszSrc: LPCSTR; lpszDst: LPSTR): BOOL; stdcall;
-{$EXTERNALSYM OemToCharA}
-function OemToCharW(lpszSrc: LPCSTR; lpszDst: LPWSTR): BOOL; stdcall;
-{$EXTERNALSYM OemToCharW}
-function OemToChar(lpszSrc: LPCSTR; lpszDst: LPTSTR): BOOL; stdcall;
-{$EXTERNALSYM OemToChar}
-
-function CharToOemBuffA(lpszSrc: LPCSTR; lpszDst: LPSTR; cchDstLength: DWORD): BOOL; stdcall;
-{$EXTERNALSYM CharToOemBuffA}
-function CharToOemBuffW(lpszSrc: LPCWSTR; lpszDst: LPSTR; cchDstLength: DWORD): BOOL; stdcall;
-{$EXTERNALSYM CharToOemBuffW}
-function CharToOemBuff(lpszSrc: LPCTSTR; lpszDst: LPSTR; cchDstLength: DWORD): BOOL; stdcall;
-{$EXTERNALSYM CharToOemBuff}
-
-function OemToCharBuffA(lpszSrc: LPCSTR; lpszDst: LPSTR; cchDstLength: DWORD): BOOL; stdcall;
-{$EXTERNALSYM OemToCharBuffA}
-function OemToCharBuffW(lpszSrc: LPCSTR; lpszDst: LPWSTR; cchDstLength: DWORD): BOOL; stdcall;
-{$EXTERNALSYM OemToCharBuffW}
-function OemToCharBuff(lpszSrc: LPCSTR; lpszDst: LPTSTR; cchDstLength: DWORD): BOOL; stdcall;
-{$EXTERNALSYM OemToCharBuff}
-
-function CharUpperA(lpsz: LPSTR): LPSTR; stdcall;
-{$EXTERNALSYM CharUpperA}
-function CharUpperW(lpsz: LPWSTR): LPWSTR; stdcall;
-{$EXTERNALSYM CharUpperW}
-function CharUpper(lpsz: LPTSTR): LPTSTR; stdcall;
-{$EXTERNALSYM CharUpper}
-
-function CharUpperBuffA(lpsz: LPSTR; cchLength: DWORD): DWORD; stdcall;
-{$EXTERNALSYM CharUpperBuffA}
-function CharUpperBuffW(lpsz: LPWSTR; cchLength: DWORD): DWORD; stdcall;
-{$EXTERNALSYM CharUpperBuffW}
-function CharUpperBuff(lpsz: LPTSTR; cchLength: DWORD): DWORD; stdcall;
-{$EXTERNALSYM CharUpperBuff}
-
-function CharLowerA(lpsz: LPSTR): LPSTR; stdcall;
-{$EXTERNALSYM CharLowerA}
-function CharLowerW(lpsz: LPWSTR): LPWSTR; stdcall;
-{$EXTERNALSYM CharLowerW}
-function CharLower(lpsz: LPTSTR): LPTSTR; stdcall;
-{$EXTERNALSYM CharLower}
-
-function CharLowerBuffA(lpsz: LPSTR; cchLength: DWORD): DWORD; stdcall;
-{$EXTERNALSYM CharLowerBuffA}
-function CharLowerBuffW(lpsz: LPWSTR; cchLength: DWORD): DWORD; stdcall;
-{$EXTERNALSYM CharLowerBuffW}
-function CharLowerBuff(lpsz: LPTSTR; cchLength: DWORD): DWORD; stdcall;
-{$EXTERNALSYM CharLowerBuff}
-
-function CharNextA(lpsz: LPCSTR): LPSTR; stdcall;
-{$EXTERNALSYM CharNextA}
-function CharNextW(lpsz: LPCWSTR): LPWSTR; stdcall;
-{$EXTERNALSYM CharNextW}
-function CharNext(lpsz: LPCTSTR): LPTSTR; stdcall;
-{$EXTERNALSYM CharNext}
-
-function CharPrevA(lpszStart: LPCSTR; lpszCurrent: LPCSTR): LPSTR; stdcall;
-{$EXTERNALSYM CharPrevA}
-function CharPrevW(lpszStart: LPCWSTR; lpszCurrent: LPCWSTR): LPWSTR; stdcall;
-{$EXTERNALSYM CharPrevW}
-function CharPrev(lpszStart: LPCTSTR; lpszCurrent: LPCTSTR): LPTSTR; stdcall;
-{$EXTERNALSYM CharPrev}
-
-function CharNextExA(CodePage: WORD; lpCurrentChar: LPCSTR; dwFlags: DWORD): LPSTR; stdcall;
-{$EXTERNALSYM CharNextExA}
-
-function CharPrevExA(CodePage: WORD; lpStart, lpCurrentChar: LPCSTR; dwFlags: DWORD): LPSTR; stdcall;
-{$EXTERNALSYM CharPrevExA}
-
-//
-// Compatibility defines for character translation routines
-//
-
-function AnsiToOem(lpszSrc: LPCSTR; lpszDst: LPSTR): BOOL;
-{$EXTERNALSYM AnsiToOem}
-
-function OemToAnsi(lpszSrc: LPCSTR; lpszDst: LPSTR): BOOL;
-{$EXTERNALSYM OemToAnsi}
-
-function AnsiToOemBuff(lpszSrc: LPCSTR; lpszDst: LPSTR; cchDstLength: DWORD): BOOL;
-{$EXTERNALSYM AnsiToOemBuff}
-
-function OemToAnsiBuff(lpszSrc: LPCSTR; lpszDst: LPSTR; cchDstLength: DWORD): BOOL;
-{$EXTERNALSYM OemToAnsiBuff}
-
-function AnsiUpper(lpsz: LPSTR): LPSTR;
-{$EXTERNALSYM AnsiUpper}
-
-function AnsiUpperBuff(lpsz: LPSTR; cchLength: DWORD): DWORD;
-{$EXTERNALSYM AnsiUpperBuff}
-
-function AnsiLower(lpsz: LPSTR): LPSTR;
-{$EXTERNALSYM AnsiLower}
-
-function AnsiLowerBuff(lpsz: LPSTR; cchLength: DWORD): DWORD;
-{$EXTERNALSYM AnsiLowerBuff}
-
-function AnsiNext(lpsz: LPCSTR): LPSTR;
-{$EXTERNALSYM AnsiNext}
-
-function AnsiPrev(lpszStart: LPCSTR; lpszCurrent: LPCSTR): LPSTR;
-{$EXTERNALSYM AnsiPrev}
-
-//
-// Language dependent Routines
-//
-
-function IsCharAlphaA(ch: CHAR): BOOL; stdcall;
-{$EXTERNALSYM IsCharAlphaA}
-function IsCharAlphaW(ch: WCHAR): BOOL; stdcall;
-{$EXTERNALSYM IsCharAlphaW}
-function IsCharAlpha(ch: TCHAR): BOOL; stdcall;
-{$EXTERNALSYM IsCharAlpha}
-
-function IsCharAlphaNumericA(ch: CHAR): BOOL; stdcall;
-{$EXTERNALSYM IsCharAlphaNumericA}
-function IsCharAlphaNumericW(ch: WCHAR): BOOL; stdcall;
-{$EXTERNALSYM IsCharAlphaNumericW}
-function IsCharAlphaNumeric(ch: TCHAR): BOOL; stdcall;
-{$EXTERNALSYM IsCharAlphaNumeric}
-
-function IsCharUpperA(ch: CHAR): BOOL; stdcall;
-{$EXTERNALSYM IsCharUpperA}
-function IsCharUpperW(ch: WCHAR): BOOL; stdcall;
-{$EXTERNALSYM IsCharUpperW}
-function IsCharUpper(ch: TCHAR): BOOL; stdcall;
-{$EXTERNALSYM IsCharUpper}
-
-function IsCharLowerA(ch: CHAR): BOOL; stdcall;
-{$EXTERNALSYM IsCharLowerA}
-function IsCharLowerW(ch: WCHAR): BOOL; stdcall;
-{$EXTERNALSYM IsCharLowerW}
-function IsCharLower(ch: TCHAR): BOOL; stdcall;
-{$EXTERNALSYM IsCharLower}
-
-function SetFocus(hWnd: HWND): HWND; stdcall;
-{$EXTERNALSYM SetFocus}
-
-function GetActiveWindow: HWND; stdcall;
-{$EXTERNALSYM GetActiveWindow}
-
-function GetFocus: HWND; stdcall;
-{$EXTERNALSYM GetFocus}
-
-function GetKBCodePage: UINT; stdcall;
-{$EXTERNALSYM GetKBCodePage}
-
-function GetKeyState(nVirtKey: Integer): SHORT; stdcall;
-{$EXTERNALSYM GetKeyState}
-
-function GetAsyncKeyState(vKey: Integer): SHORT; stdcall;
-{$EXTERNALSYM GetAsyncKeyState}
-
-function GetKeyboardState(lpKeyState: LPBYTE): BOOL; stdcall;
-{$EXTERNALSYM GetKeyboardState}
-
-function SetKeyboardState(lpKeyState: LPBYTE): BOOL; stdcall;
-{$EXTERNALSYM SetKeyboardState}
-
-function GetKeyNameTextA(lParam: LONG; lpString: LPSTR; nSize: Integer): Integer; stdcall;
-{$EXTERNALSYM GetKeyNameTextA}
-function GetKeyNameTextW(lParam: LONG; lpString: LPWSTR; nSize: Integer): Integer; stdcall;
-{$EXTERNALSYM GetKeyNameTextW}
-function GetKeyNameText(lParam: LONG; lpString: LPTSTR; nSize: Integer): Integer; stdcall;
-{$EXTERNALSYM GetKeyNameText}
-
-function GetKeyboardType(nTypeFlag: Integer): Integer; stdcall;
-{$EXTERNALSYM GetKeyboardType}
-
-function ToAscii(uVirtKey, uScanCode: UINT; lpKeyState: PBYTE; lpChar: LPWORD;
- uFlags: UINT): Integer; stdcall;
-{$EXTERNALSYM ToAscii}
-
-function ToAsciiEx(uVirtKey, uScanCode: UINT; lpKeyState: PBYTE; lpChar: LPWORD;
- uFlags: UINT; dwhkl: HKL): Integer; stdcall;
-{$EXTERNALSYM ToAsciiEx}
-
-function ToUnicode(wVirtKey, wScanCode: UINT; lpKeyState: PBYTE; pwszBuff: LPWSTR;
- cchBuff: Integer; wFlags: UINT): Integer; stdcall;
-{$EXTERNALSYM ToUnicode}
-
-function OemKeyScan(wOemChar: WORD): DWORD; stdcall;
-{$EXTERNALSYM OemKeyScan}
-
-function VkKeyScanA(ch: CHAR): SHORT; stdcall;
-{$EXTERNALSYM VkKeyScanA}
-function VkKeyScanW(ch: WCHAR): SHORT; stdcall;
-{$EXTERNALSYM VkKeyScanW}
-function VkKeyScan(ch: TCHAR): SHORT; stdcall;
-{$EXTERNALSYM VkKeyScan}
-
-function VkKeyScanExA(ch: CHAR; dwhkl: HKL): SHORT; stdcall;
-{$EXTERNALSYM VkKeyScanExA}
-function VkKeyScanExW(ch: WCHAR; dwhkl: HKL): SHORT; stdcall;
-{$EXTERNALSYM VkKeyScanExW}
-function VkKeyScanEx(ch: TCHAR; dwhkl: HKL): SHORT; stdcall;
-{$EXTERNALSYM VkKeyScanEx}
-
-const
- KEYEVENTF_EXTENDEDKEY = $0001;
- {$EXTERNALSYM KEYEVENTF_EXTENDEDKEY}
- KEYEVENTF_KEYUP = $0002;
- {$EXTERNALSYM KEYEVENTF_KEYUP}
-
- KEYEVENTF_UNICODE = $0004;
- {$EXTERNALSYM KEYEVENTF_UNICODE}
- KEYEVENTF_SCANCODE = $0008;
- {$EXTERNALSYM KEYEVENTF_SCANCODE}
-
-procedure keybd_event(bVk, bScan: BYTE; dwFlags: DWORD; dwExtraInfo: ULONG_PTR); stdcall;
-{$EXTERNALSYM keybd_event}
-
-const
- MOUSEEVENTF_MOVE = $0001; // mouse move
- {$EXTERNALSYM MOUSEEVENTF_MOVE}
- MOUSEEVENTF_LEFTDOWN = $0002; // left button down
- {$EXTERNALSYM MOUSEEVENTF_LEFTDOWN}
- MOUSEEVENTF_LEFTUP = $0004; // left button up
- {$EXTERNALSYM MOUSEEVENTF_LEFTUP}
- MOUSEEVENTF_RIGHTDOWN = $0008; // right button down
- {$EXTERNALSYM MOUSEEVENTF_RIGHTDOWN}
- MOUSEEVENTF_RIGHTUP = $0010; // right button up
- {$EXTERNALSYM MOUSEEVENTF_RIGHTUP}
- MOUSEEVENTF_MIDDLEDOWN = $0020; // middle button down
- {$EXTERNALSYM MOUSEEVENTF_MIDDLEDOWN}
- MOUSEEVENTF_MIDDLEUP = $0040; // middle button up
- {$EXTERNALSYM MOUSEEVENTF_MIDDLEUP}
- MOUSEEVENTF_XDOWN = $0080; // x button down
- {$EXTERNALSYM MOUSEEVENTF_XDOWN}
- MOUSEEVENTF_XUP = $0100; // x button down
- {$EXTERNALSYM MOUSEEVENTF_XUP}
- MOUSEEVENTF_WHEEL = $0800; // wheel button rolled
- {$EXTERNALSYM MOUSEEVENTF_WHEEL}
- MOUSEEVENTF_VIRTUALDESK = $4000; // map to entire virtual desktop
- {$EXTERNALSYM MOUSEEVENTF_VIRTUALDESK}
- MOUSEEVENTF_ABSOLUTE = $8000; // absolute move
- {$EXTERNALSYM MOUSEEVENTF_ABSOLUTE}
-
-procedure mouse_event(dwFlags, dx, dy, dwData: DWORD; dwExtraInfo: ULONG_PTR); stdcall;
-{$EXTERNALSYM mouse_event}
-
-type
- LPMOUSEINPUT = ^MOUSEINPUT;
- {$EXTERNALSYM LPMOUSEINPUT}
- tagMOUSEINPUT = record
- dx: LONG;
- dy: LONG;
- mouseData: DWORD;
- dwFlags: DWORD;
- time: DWORD;
- dwExtraInfo: ULONG_PTR;
- end;
- {$EXTERNALSYM MOUSEINPUT}
- MOUSEINPUT = tagMOUSEINPUT;
- {$EXTERNALSYM MOUSEINPUT}
- TMouseInput = MOUSEINPUT;
- PMouseInput = LPMOUSEINPUT;
-
- LPKEYBDINPUT = ^KEYBDINPUT;
- {$EXTERNALSYM LPKEYBDINPUT}
- tagKEYBDINPUT = record
- wVk: WORD;
- wScan: WORD;
- dwFlags: DWORD;
- time: DWORD;
- dwExtraInfo: ULONG_PTR;
- end;
- {$EXTERNALSYM tagKEYBDINPUT}
- KEYBDINPUT = tagKEYBDINPUT;
- {$EXTERNALSYM KEYBDINPUT}
- TKeybdinput = KEYBDINPUT;
- PKeybdInput = LPKEYBDINPUT;
-
- LPHARDWAREINPUT = ^HARDWAREINPUT;
- {$EXTERNALSYM LPHARDWAREINPUT}
- tagHARDWAREINPUT = record
- uMsg: DWORD;
- wParamL: WORD;
- wParamH: WORD;
- end;
- {$EXTERNALSYM tagHARDWAREINPUT}
- HARDWAREINPUT = tagHARDWAREINPUT;
- {$EXTERNALSYM HARDWAREINPUT}
- THardwareInput = HARDWAREINPUT;
- PHardwareInput = LPHARDWAREINPUT;
-
-const
- INPUT_MOUSE = 0;
- {$EXTERNALSYM INPUT_MOUSE}
- INPUT_KEYBOARD = 1;
- {$EXTERNALSYM INPUT_KEYBOARD}
- INPUT_HARDWARE = 2;
- {$EXTERNALSYM INPUT_HARDWARE}
-
-type
- LPINPUT = ^INPUT;
- {$EXTERNALSYM LPINPUT}
- tagINPUT = record
- type_: DWORD;
- case Integer of
- 0: (mi: MOUSEINPUT);
- 1: (ki: KEYBDINPUT);
- 2: (hi: HARDWAREINPUT);
- end;
- {$EXTERNALSYM tagINPUT}
- INPUT = tagINPUT;
- {$EXTERNALSYM INPUT}
- TInput = INPUT;
- PInput = LPINPUT;
-
-function SendInput(cInputs: UINT; pInputs: LPINPUT; cbSize: Integer): UINT; stdcall;
-{$EXTERNALSYM SendInput}
-
-type
- PLASTINPUTINFO = ^LASTINPUTINFO;
- tagLASTINPUTINFO = record
- cbSize: UINT;
- dwTime: DWORD;
- end;
- {$EXTERNALSYM tagLASTINPUTINFO}
- LASTINPUTINFO = tagLASTINPUTINFO;
- {$EXTERNALSYM LASTINPUTINFO}
- TLastInputInfo = LASTINPUTINFO;
-
-function GetLastInputInfo(var plii: LASTINPUTINFO): BOOL; stdcall;
-{$EXTERNALSYM GetLastInputInfo}
-
-function MapVirtualKeyA(uCode, uMapType: UINT): UINT; stdcall;
-{$EXTERNALSYM MapVirtualKeyA}
-function MapVirtualKeyW(uCode, uMapType: UINT): UINT; stdcall;
-{$EXTERNALSYM MapVirtualKeyW}
-function MapVirtualKey(uCode, uMapType: UINT): UINT; stdcall;
-{$EXTERNALSYM MapVirtualKey}
-
-function MapVirtualKeyExA(uCode, uMapType: UINT; dwhkl: HKL): UINT; stdcall;
-{$EXTERNALSYM MapVirtualKeyExA}
-function MapVirtualKeyExW(uCode, uMapType: UINT; dwhkl: HKL): UINT; stdcall;
-{$EXTERNALSYM MapVirtualKeyExW}
-function MapVirtualKeyEx(uCode, uMapType: UINT; dwhkl: HKL): UINT; stdcall;
-{$EXTERNALSYM MapVirtualKeyEx}
-
-function GetInputState: BOOL; stdcall;
-{$EXTERNALSYM GetInputState}
-
-function GetQueueStatus(flags: UINT): DWORD; stdcall;
-{$EXTERNALSYM GetQueueStatus}
-
-function GetCapture: HWND; stdcall;
-{$EXTERNALSYM GetCapture}
-
-function SetCapture(hWnd: HWND): HWND; stdcall;
-{$EXTERNALSYM SetCapture}
-
-function ReleaseCapture: BOOL; stdcall;
-{$EXTERNALSYM ReleaseCapture}
-
-function MsgWaitForMultipleObjects(nCount: DWORD; pHandles: PHANDLE;
- fWaitAll: BOOL; dwMilliseconds: DWORD; dwWakeMask: DWORD): DWORD; stdcall;
-{$EXTERNALSYM MsgWaitForMultipleObjects}
-
-function MsgWaitForMultipleObjectsEx(nCount: DWORD; pHandles: PHANDLE;
- dwMilliseconds: DWORD; dwWakeMask: DWORD; dwFlags: DWORD): DWORD; stdcall;
-{$EXTERNALSYM MsgWaitForMultipleObjectsEx}
-
-const
- MWMO_WAITALL = $0001;
- {$EXTERNALSYM MWMO_WAITALL}
- MWMO_ALERTABLE = $0002;
- {$EXTERNALSYM MWMO_ALERTABLE}
- MWMO_INPUTAVAILABLE = $0004;
- {$EXTERNALSYM MWMO_INPUTAVAILABLE}
-
-//
-// Windows Functions
-//
-
-function SetTimer(hWnd: HWND; nIDEvent: UINT_PTR; uElapse: UINT;
- lpTimerFunc: TIMERPROC): UINT_PTR; stdcall;
-{$EXTERNALSYM SetTimer}
-
-function KillTimer(hWnd: HWND; uIDEvent: UINT_PTR): BOOL; stdcall;
-{$EXTERNALSYM KillTimer}
-
-function IsWindowUnicode(hWnd: HWND): BOOL; stdcall;
-{$EXTERNALSYM IsWindowUnicode}
-
-function EnableWindow(hWnd: HWND; bEnable: BOOL): BOOL; stdcall;
-{$EXTERNALSYM EnableWindow}
-
-function IsWindowEnabled(hWnd: HWND): BOOL; stdcall;
-{$EXTERNALSYM IsWindowEnabled}
-
-function LoadAcceleratorsA(hInstance: HINSTANCE; lpTableName: LPCSTR): HACCEL; stdcall;
-{$EXTERNALSYM LoadAcceleratorsA}
-function LoadAcceleratorsW(hInstance: HINSTANCE; lpTableName: LPCWSTR): HACCEL; stdcall;
-{$EXTERNALSYM LoadAcceleratorsW}
-function LoadAccelerators(hInstance: HINSTANCE; lpTableName: LPCTSTR): HACCEL; stdcall;
-{$EXTERNALSYM LoadAccelerators}
-
-function CreateAcceleratorTableA(lpaccl: LPACCEL; cEntries: Integer): HACCEL; stdcall;
-{$EXTERNALSYM CreateAcceleratorTableA}
-function CreateAcceleratorTableW(lpaccl: LPACCEL; cEntries: Integer): HACCEL; stdcall;
-{$EXTERNALSYM CreateAcceleratorTableW}
-function CreateAcceleratorTable(lpaccl: LPACCEL; cEntries: Integer): HACCEL; stdcall;
-{$EXTERNALSYM CreateAcceleratorTable}
-
-function DestroyAcceleratorTable(hAccel: HACCEL): BOOL; stdcall;
-{$EXTERNALSYM DestroyAcceleratorTable}
-
-function CopyAcceleratorTableA(hAccelSrc: HACCEL; lpAccelDst: LPACCEL;
- cAccelEntries: Integer): Integer; stdcall;
-{$EXTERNALSYM CopyAcceleratorTableA}
-function CopyAcceleratorTableW(hAccelSrc: HACCEL; lpAccelDst: LPACCEL;
- cAccelEntries: Integer): Integer; stdcall;
-{$EXTERNALSYM CopyAcceleratorTableW}
-function CopyAcceleratorTable(hAccelSrc: HACCEL; lpAccelDst: LPACCEL;
- cAccelEntries: Integer): Integer; stdcall;
-{$EXTERNALSYM CopyAcceleratorTable}
-
-function TranslateAcceleratorA(hWnd: HWND; hAccTable: HACCEL; lpMsg: LPMSG): Integer; stdcall;
-{$EXTERNALSYM TranslateAcceleratorA}
-function TranslateAcceleratorW(hWnd: HWND; hAccTable: HACCEL; lpMsg: LPMSG): Integer; stdcall;
-{$EXTERNALSYM TranslateAcceleratorW}
-function TranslateAccelerator(hWnd: HWND; hAccTable: HACCEL; lpMsg: LPMSG): Integer; stdcall;
-{$EXTERNALSYM TranslateAccelerator}
-
-//
-// GetSystemMetrics() codes
-//
-
-const
- SM_CXSCREEN = 0;
- {$EXTERNALSYM SM_CXSCREEN}
- SM_CYSCREEN = 1;
- {$EXTERNALSYM SM_CYSCREEN}
- SM_CXVSCROLL = 2;
- {$EXTERNALSYM SM_CXVSCROLL}
- SM_CYHSCROLL = 3;
- {$EXTERNALSYM SM_CYHSCROLL}
- SM_CYCAPTION = 4;
- {$EXTERNALSYM SM_CYCAPTION}
- SM_CXBORDER = 5;
- {$EXTERNALSYM SM_CXBORDER}
- SM_CYBORDER = 6;
- {$EXTERNALSYM SM_CYBORDER}
- SM_CXDLGFRAME = 7;
- {$EXTERNALSYM SM_CXDLGFRAME}
- SM_CYDLGFRAME = 8;
- {$EXTERNALSYM SM_CYDLGFRAME}
- SM_CYVTHUMB = 9;
- {$EXTERNALSYM SM_CYVTHUMB}
- SM_CXHTHUMB = 10;
- {$EXTERNALSYM SM_CXHTHUMB}
- SM_CXICON = 11;
- {$EXTERNALSYM SM_CXICON}
- SM_CYICON = 12;
- {$EXTERNALSYM SM_CYICON}
- SM_CXCURSOR = 13;
- {$EXTERNALSYM SM_CXCURSOR}
- SM_CYCURSOR = 14;
- {$EXTERNALSYM SM_CYCURSOR}
- SM_CYMENU = 15;
- {$EXTERNALSYM SM_CYMENU}
- SM_CXFULLSCREEN = 16;
- {$EXTERNALSYM SM_CXFULLSCREEN}
- SM_CYFULLSCREEN = 17;
- {$EXTERNALSYM SM_CYFULLSCREEN}
- SM_CYKANJIWINDOW = 18;
- {$EXTERNALSYM SM_CYKANJIWINDOW}
- SM_MOUSEPRESENT = 19;
- {$EXTERNALSYM SM_MOUSEPRESENT}
- SM_CYVSCROLL = 20;
- {$EXTERNALSYM SM_CYVSCROLL}
- SM_CXHSCROLL = 21;
- {$EXTERNALSYM SM_CXHSCROLL}
- SM_DEBUG = 22;
- {$EXTERNALSYM SM_DEBUG}
- SM_SWAPBUTTON = 23;
- {$EXTERNALSYM SM_SWAPBUTTON}
- SM_RESERVED1 = 24;
- {$EXTERNALSYM SM_RESERVED1}
- SM_RESERVED2 = 25;
- {$EXTERNALSYM SM_RESERVED2}
- SM_RESERVED3 = 26;
- {$EXTERNALSYM SM_RESERVED3}
- SM_RESERVED4 = 27;
- {$EXTERNALSYM SM_RESERVED4}
- SM_CXMIN = 28;
- {$EXTERNALSYM SM_CXMIN}
- SM_CYMIN = 29;
- {$EXTERNALSYM SM_CYMIN}
- SM_CXSIZE = 30;
- {$EXTERNALSYM SM_CXSIZE}
- SM_CYSIZE = 31;
- {$EXTERNALSYM SM_CYSIZE}
- SM_CXFRAME = 32;
- {$EXTERNALSYM SM_CXFRAME}
- SM_CYFRAME = 33;
- {$EXTERNALSYM SM_CYFRAME}
- SM_CXMINTRACK = 34;
- {$EXTERNALSYM SM_CXMINTRACK}
- SM_CYMINTRACK = 35;
- {$EXTERNALSYM SM_CYMINTRACK}
- SM_CXDOUBLECLK = 36;
- {$EXTERNALSYM SM_CXDOUBLECLK}
- SM_CYDOUBLECLK = 37;
- {$EXTERNALSYM SM_CYDOUBLECLK}
- SM_CXICONSPACING = 38;
- {$EXTERNALSYM SM_CXICONSPACING}
- SM_CYICONSPACING = 39;
- {$EXTERNALSYM SM_CYICONSPACING}
- SM_MENUDROPALIGNMENT = 40;
- {$EXTERNALSYM SM_MENUDROPALIGNMENT}
- SM_PENWINDOWS = 41;
- {$EXTERNALSYM SM_PENWINDOWS}
- SM_DBCSENABLED = 42;
- {$EXTERNALSYM SM_DBCSENABLED}
- SM_CMOUSEBUTTONS = 43;
- {$EXTERNALSYM SM_CMOUSEBUTTONS}
-
- SM_CXFIXEDFRAME = SM_CXDLGFRAME; // ;win40 name change
- {$EXTERNALSYM SM_CXFIXEDFRAME}
- SM_CYFIXEDFRAME = SM_CYDLGFRAME; // ;win40 name change
- {$EXTERNALSYM SM_CYFIXEDFRAME}
- SM_CXSIZEFRAME = SM_CXFRAME; // ;win40 name change
- {$EXTERNALSYM SM_CXSIZEFRAME}
- SM_CYSIZEFRAME = SM_CYFRAME; // ;win40 name change
- {$EXTERNALSYM SM_CYSIZEFRAME}
-
- SM_SECURE = 44;
- {$EXTERNALSYM SM_SECURE}
- SM_CXEDGE = 45;
- {$EXTERNALSYM SM_CXEDGE}
- SM_CYEDGE = 46;
- {$EXTERNALSYM SM_CYEDGE}
- SM_CXMINSPACING = 47;
- {$EXTERNALSYM SM_CXMINSPACING}
- SM_CYMINSPACING = 48;
- {$EXTERNALSYM SM_CYMINSPACING}
- SM_CXSMICON = 49;
- {$EXTERNALSYM SM_CXSMICON}
- SM_CYSMICON = 50;
- {$EXTERNALSYM SM_CYSMICON}
- SM_CYSMCAPTION = 51;
- {$EXTERNALSYM SM_CYSMCAPTION}
- SM_CXSMSIZE = 52;
- {$EXTERNALSYM SM_CXSMSIZE}
- SM_CYSMSIZE = 53;
- {$EXTERNALSYM SM_CYSMSIZE}
- SM_CXMENUSIZE = 54;
- {$EXTERNALSYM SM_CXMENUSIZE}
- SM_CYMENUSIZE = 55;
- {$EXTERNALSYM SM_CYMENUSIZE}
- SM_ARRANGE = 56;
- {$EXTERNALSYM SM_ARRANGE}
- SM_CXMINIMIZED = 57;
- {$EXTERNALSYM SM_CXMINIMIZED}
- SM_CYMINIMIZED = 58;
- {$EXTERNALSYM SM_CYMINIMIZED}
- SM_CXMAXTRACK = 59;
- {$EXTERNALSYM SM_CXMAXTRACK}
- SM_CYMAXTRACK = 60;
- {$EXTERNALSYM SM_CYMAXTRACK}
- SM_CXMAXIMIZED = 61;
- {$EXTERNALSYM SM_CXMAXIMIZED}
- SM_CYMAXIMIZED = 62;
- {$EXTERNALSYM SM_CYMAXIMIZED}
- SM_NETWORK = 63;
- {$EXTERNALSYM SM_NETWORK}
- SM_CLEANBOOT = 67;
- {$EXTERNALSYM SM_CLEANBOOT}
- SM_CXDRAG = 68;
- {$EXTERNALSYM SM_CXDRAG}
- SM_CYDRAG = 69;
- {$EXTERNALSYM SM_CYDRAG}
- SM_SHOWSOUNDS = 70;
- {$EXTERNALSYM SM_SHOWSOUNDS}
- SM_CXMENUCHECK = 71; // Use instead of GetMenuCheckMarkDimensions()!
- {$EXTERNALSYM SM_CXMENUCHECK}
- SM_CYMENUCHECK = 72;
- {$EXTERNALSYM SM_CYMENUCHECK}
- SM_SLOWMACHINE = 73;
- {$EXTERNALSYM SM_SLOWMACHINE}
- SM_MIDEASTENABLED = 74;
- {$EXTERNALSYM SM_MIDEASTENABLED}
-
- SM_MOUSEWHEELPRESENT = 75;
- {$EXTERNALSYM SM_MOUSEWHEELPRESENT}
- SM_XVIRTUALSCREEN = 76;
- {$EXTERNALSYM SM_XVIRTUALSCREEN}
- SM_YVIRTUALSCREEN = 77;
- {$EXTERNALSYM SM_YVIRTUALSCREEN}
- SM_CXVIRTUALSCREEN = 78;
- {$EXTERNALSYM SM_CXVIRTUALSCREEN}
- SM_CYVIRTUALSCREEN = 79;
- {$EXTERNALSYM SM_CYVIRTUALSCREEN}
- SM_CMONITORS = 80;
- {$EXTERNALSYM SM_CMONITORS}
- SM_SAMEDISPLAYFORMAT = 81;
- {$EXTERNALSYM SM_SAMEDISPLAYFORMAT}
- SM_IMMENABLED = 82;
- {$EXTERNALSYM SM_IMMENABLED}
- SM_CXFOCUSBORDER = 83;
- {$EXTERNALSYM SM_CXFOCUSBORDER}
- SM_CYFOCUSBORDER = 84;
- {$EXTERNALSYM SM_CYFOCUSBORDER}
-
-//#if(_WIN32_WINNT >= 0x0501)
-
- SM_TABLETPC = 86;
- {$EXTERNALSYM SM_TABLETPC}
- SM_MEDIACENTER = 87;
- {$EXTERNALSYM SM_MEDIACENTER}
-
-//#endif /* _WIN32_WINNT >= 0x0501 */
-
-const
- {$IFNDEF WIN98ME_UP}
- SM_CMETRICS = 76;
- {$ELSE}
- {$IFDEF WIN98ME}
- SM_CMETRICS = 83;
- {$ELSE}
- SM_CMETRICS = 88;
- {$ENDIF WIN98ME}
- {$ENDIF !WIN98ME_UP}
- {$EXTERNALSYM SM_CMETRICS}
-
- SM_REMOTESESSION = $1000;
- {$EXTERNALSYM SM_REMOTESESSION}
- SM_SHUTTINGDOWN = $2000;
- {$EXTERNALSYM SM_SHUTTINGDOWN}
-//#if(WINVER >= 0x0501)
- SM_REMOTECONTROL = $2001;
- {$EXTERNALSYM SM_REMOTECONTROL}
-//#endif /* WINVER >= 0x0501 */
-
-function GetSystemMetrics(nIndex: Integer): Integer; stdcall;
-{$EXTERNALSYM GetSystemMetrics}
-
-function LoadMenuA(hInstance: HINSTANCE; lpMenuName: LPCSTR): HMENU; stdcall;
-{$EXTERNALSYM LoadMenuA}
-function LoadMenuW(hInstance: HINSTANCE; lpMenuName: LPCWSTR): HMENU; stdcall;
-{$EXTERNALSYM LoadMenuW}
-function LoadMenu(hInstance: HINSTANCE; lpMenuName: LPCTSTR): HMENU; stdcall;
-{$EXTERNALSYM LoadMenu}
-
-function LoadMenuIndirectA(lpMenuTemplate: LPMENUTEMPLATEA): HMENU; stdcall;
-{$EXTERNALSYM LoadMenuIndirectA}
-function LoadMenuIndirectW(lpMenuTemplate: LPMENUTEMPLATEW): HMENU; stdcall;
-{$EXTERNALSYM LoadMenuIndirectW}
-function LoadMenuIndirect(lpMenuTemplate: LPMENUTEMPLATE): HMENU; stdcall;
-{$EXTERNALSYM LoadMenuIndirect}
-
-function GetMenu(hWnd: HWND): HMENU; stdcall;
-{$EXTERNALSYM GetMenu}
-
-function SetMenu(hWnd: HWND; hMenu: HMENU): BOOL; stdcall;
-{$EXTERNALSYM SetMenu}
-
-function ChangeMenuA(hMenu: HMENU; cmd: UINT; lpszNewItem: LPCSTR;
- cmdInsert: UINT; flags: UINT): BOOL; stdcall;
-{$EXTERNALSYM ChangeMenuA}
-function ChangeMenuW(hMenu: HMENU; cmd: UINT; lpszNewItem: LPCWSTR;
- cmdInsert: UINT; flags: UINT): BOOL; stdcall;
-{$EXTERNALSYM ChangeMenuW}
-function ChangeMenu(hMenu: HMENU; cmd: UINT; lpszNewItem: LPCTSTR;
- cmdInsert: UINT; flags: UINT): BOOL; stdcall;
-{$EXTERNALSYM ChangeMenu}
-
-function HiliteMenuItem(hWnd: HWND; hMenu: HMENU; uIDHiliteItem: UINT; uHilite: UINT): BOOL; stdcall;
-{$EXTERNALSYM HiliteMenuItem}
-
-function GetMenuStringA(hMenu: HMENU; uIDItem: UINT; lpString: LPSTR;
- nMaxCount: Integer; uFlag: UINT): Integer; stdcall;
-{$EXTERNALSYM GetMenuStringA}
-function GetMenuStringW(hMenu: HMENU; uIDItem: UINT; lpString: LPWSTR;
- nMaxCount: Integer; uFlag: UINT): Integer; stdcall;
-{$EXTERNALSYM GetMenuStringW}
-function GetMenuString(hMenu: HMENU; uIDItem: UINT; lpString: LPTSTR;
- nMaxCount: Integer; uFlag: UINT): Integer; stdcall;
-{$EXTERNALSYM GetMenuString}
-
-function GetMenuState(hMenu: HMENU; uId, uFlags: UINT): UINT; stdcall;
-{$EXTERNALSYM GetMenuState}
-
-function DrawMenuBar(hWnd: HWND): BOOL; stdcall;
-{$EXTERNALSYM DrawMenuBar}
-
-const
- PMB_ACTIVE = $00000001;
- {$EXTERNALSYM PMB_ACTIVE}
-
-function GetSystemMenu(hWnd: HWND; bRevert: BOOL): HMENU; stdcall;
-{$EXTERNALSYM GetSystemMenu}
-
-function CreateMenu: HMENU; stdcall;
-{$EXTERNALSYM CreateMenu}
-
-function CreatePopupMenu: HMENU; stdcall;
-{$EXTERNALSYM CreatePopupMenu}
-
-function DestroyMenu(hMenu: HMENU): BOOL; stdcall;
-{$EXTERNALSYM DestroyMenu}
-
-function CheckMenuItem(hMenu: HMENU; uIDCheckItem, uCheck: UINT): DWORD; stdcall;
-{$EXTERNALSYM CheckMenuItem}
-
-function EnableMenuItem(hMenu: HMENU; uIDEnableItem, uEnable: UINT): BOOL; stdcall;
-{$EXTERNALSYM EnableMenuItem}
-
-function GetSubMenu(hMenu: HMENU; nPos: Integer): HMENU; stdcall;
-{$EXTERNALSYM GetSubMenu}
-
-function GetMenuItemID(hMenu: HMENU; nPos: Integer): UINT; stdcall;
-{$EXTERNALSYM GetMenuItemID}
-
-function GetMenuItemCount(hMenu: HMENU): Integer; stdcall;
-{$EXTERNALSYM GetMenuItemCount}
-
-function InsertMenuA(hMenu: HMENU; uPosition, uFlags: UINT; uIDNewItem: UINT_PTR;
- lpNewItem: LPCSTR): BOOL; stdcall;
-{$EXTERNALSYM InsertMenuA}
-function InsertMenuW(hMenu: HMENU; uPosition, uFlags: UINT; uIDNewItem: UINT_PTR;
- lpNewItem: LPCWSTR): BOOL; stdcall;
-{$EXTERNALSYM InsertMenuW}
-function InsertMenu(hMenu: HMENU; uPosition, uFlags: UINT; uIDNewItem: UINT_PTR;
- lpNewItem: LPCTSTR): BOOL; stdcall;
-{$EXTERNALSYM InsertMenu}
-
-function AppendMenuA(hMenu: HMENU; uFlags: UINT; uIDNewItem: UINT_PTR;
- lpNewItem: LPCSTR): BOOL; stdcall;
-{$EXTERNALSYM AppendMenuA}
-function AppendMenuW(hMenu: HMENU; uFlags: UINT; uIDNewItem: UINT_PTR;
- lpNewItem: LPCWSTR): BOOL; stdcall;
-{$EXTERNALSYM AppendMenuW}
-function AppendMenu(hMenu: HMENU; uFlags: UINT; uIDNewItem: UINT_PTR;
- lpNewItem: LPCTSTR): BOOL; stdcall;
-{$EXTERNALSYM AppendMenu}
-
-function ModifyMenuA(hMnu: HMENU; uPosition: UINT; uFlags: UINT;
- uIDNewItem: UINT_PTR; lpNewItem: LPCSTR): BOOL; stdcall;
-{$EXTERNALSYM ModifyMenuA}
-function ModifyMenuW(hMnu: HMENU; uPosition: UINT; uFlags: UINT;
- uIDNewItem: UINT_PTR; lpNewItem: LPCWSTR): BOOL; stdcall;
-{$EXTERNALSYM ModifyMenuW}
-function ModifyMenu(hMnu: HMENU; uPosition: UINT; uFlags: UINT;
- uIDNewItem: UINT_PTR; lpNewItem: LPCTSTR): BOOL; stdcall;
-{$EXTERNALSYM ModifyMenu}
-
-function RemoveMenu(hMenu: HMENU; uPosition: UINT; uFlags: UINT): BOOL; stdcall;
-{$EXTERNALSYM RemoveMenu}
-
-function DeleteMenu(hMenu: HMENU; uPosition: UINT; uFlags: UINT): BOOL; stdcall;
-{$EXTERNALSYM DeleteMenu}
-
-function SetMenuItemBitmaps(hMenu: HMENU; uPosition: UINT; uFlags: UINT;
- hBitmapUnchecked: HBITMAP; hBitmapChecked: HBITMAP): BOOL; stdcall;
-{$EXTERNALSYM SetMenuItemBitmaps}
-
-function GetMenuCheckMarkDimensions: LONG; stdcall;
-{$EXTERNALSYM GetMenuCheckMarkDimensions}
-
-function TrackPopupMenu(hMenu: HMENU; uFlags: UINT; x: Integer; y: Integer;
- nReserved: Integer; hWnd: HWND; prcRect: LPRECT): BOOL; stdcall;
-{$EXTERNALSYM TrackPopupMenu}
-
-// return codes for WM_MENUCHAR//
-
-const
- MNC_IGNORE = 0;
- {$EXTERNALSYM MNC_IGNORE}
- MNC_CLOSE = 1;
- {$EXTERNALSYM MNC_CLOSE}
- MNC_EXECUTE = 2;
- {$EXTERNALSYM MNC_EXECUTE}
- MNC_SELECT = 3;
- {$EXTERNALSYM MNC_SELECT}
-
-type
- LPTPMPARAMS = ^TPMPARAMS;
- {$EXTERNALSYM LPTPMPARAMS}
- tagTPMPARAMS = record
- cbSize: UINT; // Size of structure
- rcExclude: RECT; // Screen coordinates of rectangle to exclude when positioning
- end;
- {$EXTERNALSYM tagTPMPARAMS}
- TPMPARAMS = tagTPMPARAMS;
- {$EXTERNALSYM TPMPARAMS}
- TTPMParams = TPMPARAMS;
- PTPMParams = LPTPMPARAMS;
-
-function TrackPopupMenuEx(hmenu: HMENU; fuflags: UINT; x, y: Integer;
- hwnd: HWND; lptpm: LPTPMPARAMS): BOOL; stdcall;
-{$EXTERNALSYM TrackPopupMenuEx}
-
-const
- MNS_NOCHECK = $80000000;
- {$EXTERNALSYM MNS_NOCHECK}
- MNS_MODELESS = $40000000;
- {$EXTERNALSYM MNS_MODELESS}
- MNS_DRAGDROP = $20000000;
- {$EXTERNALSYM MNS_DRAGDROP}
- MNS_AUTODISMISS = $10000000;
- {$EXTERNALSYM MNS_AUTODISMISS}
- MNS_NOTIFYBYPOS = $08000000;
- {$EXTERNALSYM MNS_NOTIFYBYPOS}
- MNS_CHECKORBMP = $04000000;
- {$EXTERNALSYM MNS_CHECKORBMP}
-
- MIM_MAXHEIGHT = $00000001;
- {$EXTERNALSYM MIM_MAXHEIGHT}
- MIM_BACKGROUND = $00000002;
- {$EXTERNALSYM MIM_BACKGROUND}
- MIM_HELPID = $00000004;
- {$EXTERNALSYM MIM_HELPID}
- MIM_MENUDATA = $00000008;
- {$EXTERNALSYM MIM_MENUDATA}
- MIM_STYLE = $00000010;
- {$EXTERNALSYM MIM_STYLE}
- MIM_APPLYTOSUBMENUS = $80000000;
- {$EXTERNALSYM MIM_APPLYTOSUBMENUS}
-
-type
- LPMENUINFO = ^MENUINFO;
- {$EXTERNALSYM LPMENUINFO}
- tagMENUINFO = record
- cbSize: DWORD;
- fMask: DWORD;
- dwStyle: DWORD;
- cyMax: UINT;
- hbrBack: HBRUSH;
- dwContextHelpID: DWORD;
- dwMenuData: ULONG_PTR;
- end;
- {$EXTERNALSYM tagMENUINFO}
- MENUINFO = tagMENUINFO;
- {$EXTERNALSYM MENUINFO}
- TMenuinfo = MENUINFO;
- PMenuinfo = LPMENUINFO;
-
- LPCMENUINFO = ^MENUINFO;
- {$EXTERNALSYM LPCMENUINFO}
-
-function GetMenuInfo(hmenu: HMENU; var lpcmi: MENUINFO): BOOL; stdcall;
-{$EXTERNALSYM GetMenuInfo}
-
-function SetMenuInfo(hemnu: HMENU; const lpcmi: MENUINFO): BOOL; stdcall;
-{$EXTERNALSYM SetMenuInfo}
-
-function EndMenu: BOOL; stdcall;
-{$EXTERNALSYM EndMenu}
-
-//
-// WM_MENUDRAG return values.
-//
-
-const
- MND_CONTINUE = 0;
- {$EXTERNALSYM MND_CONTINUE}
- MND_ENDMENU = 1;
- {$EXTERNALSYM MND_ENDMENU}
-
-type
- PMENUGETOBJECTINFO = ^MENUGETOBJECTINFO;
- tagMENUGETOBJECTINFO = record
- dwFlags: DWORD;
- uPos: UINT;
- hmenu: HMENU;
- riid: PVOID;
- pvObj: PVOID;
- end;
- {$EXTERNALSYM tagMENUGETOBJECTINFO}
- MENUGETOBJECTINFO = tagMENUGETOBJECTINFO;
- {$EXTERNALSYM MENUGETOBJECTINFO}
- TMenuGetObjectInfo = MENUGETOBJECTINFO;
-
-//
-// MENUGETOBJECTINFO dwFlags values
-//
-
-const
- MNGOF_TOPGAP = $00000001;
- {$EXTERNALSYM MNGOF_TOPGAP}
- MNGOF_BOTTOMGAP = $00000002;
- {$EXTERNALSYM MNGOF_BOTTOMGAP}
-
-//
-// WM_MENUGETOBJECT return values
-//
-
- MNGO_NOINTERFACE = $00000000;
- {$EXTERNALSYM MNGO_NOINTERFACE}
- MNGO_NOERROR = $00000001;
- {$EXTERNALSYM MNGO_NOERROR}
-
- MIIM_STATE = $00000001;
- {$EXTERNALSYM MIIM_STATE}
- MIIM_ID = $00000002;
- {$EXTERNALSYM MIIM_ID}
- MIIM_SUBMENU = $00000004;
- {$EXTERNALSYM MIIM_SUBMENU}
- MIIM_CHECKMARKS = $00000008;
- {$EXTERNALSYM MIIM_CHECKMARKS}
- MIIM_TYPE = $00000010;
- {$EXTERNALSYM MIIM_TYPE}
- MIIM_DATA = $00000020;
- {$EXTERNALSYM MIIM_DATA}
-
- MIIM_STRING = $00000040;
- {$EXTERNALSYM MIIM_STRING}
- MIIM_BITMAP = $00000080;
- {$EXTERNALSYM MIIM_BITMAP}
- MIIM_FTYPE = $00000100;
- {$EXTERNALSYM MIIM_FTYPE}
-
- HBMMENU_CALLBACK = HBITMAP(-1);
- {$EXTERNALSYM HBMMENU_CALLBACK}
- HBMMENU_SYSTEM = HBITMAP(1);
- {$EXTERNALSYM HBMMENU_SYSTEM}
- HBMMENU_MBAR_RESTORE = HBITMAP(2);
- {$EXTERNALSYM HBMMENU_MBAR_RESTORE}
- HBMMENU_MBAR_MINIMIZE = HBITMAP(3);
- {$EXTERNALSYM HBMMENU_MBAR_MINIMIZE}
- HBMMENU_MBAR_CLOSE = HBITMAP(5);
- {$EXTERNALSYM HBMMENU_MBAR_CLOSE}
- HBMMENU_MBAR_CLOSE_D = HBITMAP(6);
- {$EXTERNALSYM HBMMENU_MBAR_CLOSE_D}
- HBMMENU_MBAR_MINIMIZE_D = HBITMAP(7);
- {$EXTERNALSYM HBMMENU_MBAR_MINIMIZE_D}
- HBMMENU_POPUP_CLOSE = HBITMAP(8);
- {$EXTERNALSYM HBMMENU_POPUP_CLOSE}
- HBMMENU_POPUP_RESTORE = HBITMAP(9);
- {$EXTERNALSYM HBMMENU_POPUP_RESTORE}
- HBMMENU_POPUP_MAXIMIZE = HBITMAP(10);
- {$EXTERNALSYM HBMMENU_POPUP_MAXIMIZE}
- HBMMENU_POPUP_MINIMIZE = HBITMAP(11);
- {$EXTERNALSYM HBMMENU_POPUP_MINIMIZE}
-
-type
- LPMENUITEMINFOA = ^MENUITEMINFOA;
- {$EXTERNALSYM LPMENUITEMINFOA}
- tagMENUITEMINFOA = record
- cbSize: UINT;
- fMask: UINT;
- fType: UINT; // used if MIIM_TYPE (4.0) or MIIM_FTYPE (>4.0)
- fState: UINT; // used if MIIM_STATE
- wID: UINT; // used if MIIM_ID
- hSubMenu: HMENU; // used if MIIM_SUBMENU
- hbmpChecked: HBITMAP; // used if MIIM_CHECKMARKS
- hbmpUnchecked: HBITMAP; // used if MIIM_CHECKMARKS
- dwItemData: ULONG_PTR; // used if MIIM_DATA
- dwTypeData: LPSTR; // used if MIIM_TYPE (4.0) or MIIM_STRING (>4.0)
- cch: UINT; // used if MIIM_TYPE (4.0) or MIIM_STRING (>4.0)
- {$IFDEF WIN98ME_UP}
- hbmpItem: HBITMAP; // used if MIIM_BITMAP
- {$ENDIF WIN98ME_UP}
- end;
- {$EXTERNALSYM tagMENUITEMINFOA}
- MENUITEMINFOA = tagMENUITEMINFOA;
- {$EXTERNALSYM MENUITEMINFOA}
- TMenuItemInfoA = MENUITEMINFOA;
- PMenuItemInfoA = LPMENUITEMINFOA;
-
- LPMENUITEMINFOW = ^MENUITEMINFOW;
- {$EXTERNALSYM LPMENUITEMINFOW}
- tagMENUITEMINFOW = record
- cbSize: UINT;
- fMask: UINT;
- fType: UINT; // used if MIIM_TYPE (4.0) or MIIM_FTYPE (>4.0)
- fState: UINT; // used if MIIM_STATE
- wID: UINT; // used if MIIM_ID
- hSubMenu: HMENU; // used if MIIM_SUBMENU
- hbmpChecked: HBITMAP; // used if MIIM_CHECKMARKS
- hbmpUnchecked: HBITMAP; // used if MIIM_CHECKMARKS
- dwItemData: ULONG_PTR; // used if MIIM_DATA
- dwTypeData: LPWSTR; // used if MIIM_TYPE (4.0) or MIIM_STRING (>4.0)
- cch: UINT; // used if MIIM_TYPE (4.0) or MIIM_STRING (>4.0)
- {$IFDEF WIN98ME_UP}
- hbmpItem: HBITMAP; // used if MIIM_BITMAP
- {$ENDIF WIN98ME_UP}
- end;
- {$EXTERNALSYM tagMENUITEMINFOW}
- MENUITEMINFOW = tagMENUITEMINFOW;
- {$EXTERNALSYM MENUITEMINFOW}
- TMenuItemInfoW = MENUITEMINFOW;
- PMenuItemInfoW = LPMENUITEMINFOW;
-
- LPCMENUITEMINFOA = ^MENUITEMINFOA;
- {$EXTERNALSYM LPCMENUITEMINFOA}
- LPCMENUITEMINFOW = ^MENUITEMINFOW;
- {$EXTERNALSYM LPCMENUITEMINFOW}
-
- {$IFDEF UNICODE}
- MENUITEMINFO = MENUITEMINFOW;
- {$EXTERNALSYM MENUITEMINFO}
- LPMENUITEMINFO = LPMENUITEMINFOW;
- {$EXTERNALSYM LPMENUITEMINFO}
- TMenuItemInfo = TMenuItemInfoW;
- PMenuItemInfo = PMenuItemInfoW;
- LPCMENUITEMINFO = LPCMENUITEMINFOW;
- {$EXTERNALSYM LPCMENUITEMINFO}
- {$ELSE}
- MENUITEMINFO = MENUITEMINFOA;
- {$EXTERNALSYM MENUITEMINFO}
- LPMENUITEMINFO = LPMENUITEMINFOA;
- {$EXTERNALSYM LPMENUITEMINFO}
- TMenuItemInfo = TMenuItemInfoA;
- PMenuItemInfo = PMenuItemInfoA;
- LPCMENUITEMINFO = LPCMENUITEMINFOA;
- {$EXTERNALSYM LPCMENUITEMINFO}
- {$ENDIF UNICODE}
-
-function InsertMenuItemA(hMenu: HMENU; uItem: UINT; fByPosition: BOOL;
- const lpmii: MENUITEMINFOA): BOOL; stdcall;
-{$EXTERNALSYM InsertMenuItemA}
-function InsertMenuItemW(hMenu: HMENU; uItem: UINT; fByPosition: BOOL;
- const lpmii: MENUITEMINFOW): BOOL; stdcall;
-{$EXTERNALSYM InsertMenuItemW}
-function InsertMenuItem(hMenu: HMENU; uItem: UINT; fByPosition: BOOL;
- const lpmii: MENUITEMINFO): BOOL; stdcall;
-{$EXTERNALSYM InsertMenuItem}
-
-function GetMenuItemInfoA(hMenu: HMENU; uItem: UINT; fByPosition: BOOL;
- var lpmii: MENUITEMINFOA): BOOL; stdcall;
-{$EXTERNALSYM GetMenuItemInfoA}
-function GetMenuItemInfoW(hMenu: HMENU; uItem: UINT; fByPosition: BOOL;
- var lpmii: MENUITEMINFOW): BOOL; stdcall;
-{$EXTERNALSYM GetMenuItemInfoW}
-function GetMenuItemInfo(hMenu: HMENU; uItem: UINT; fByPosition: BOOL;
- var lpmii: MENUITEMINFO): BOOL; stdcall;
-{$EXTERNALSYM GetMenuItemInfo}
-
-function SetMenuItemInfoA(hMenu: HMENU; uItem: UINT; fByPosition: BOOL;
- const lpmii: MENUITEMINFOA): BOOL; stdcall;
-{$EXTERNALSYM SetMenuItemInfoA}
-function SetMenuItemInfoW(hMenu: HMENU; uItem: UINT; fByPosition: BOOL;
- const lpmii: MENUITEMINFOW): BOOL; stdcall;
-{$EXTERNALSYM SetMenuItemInfoW}
-function SetMenuItemInfo(hMenu: HMENU; uItem: UINT; fByPosition: BOOL;
- const lpmii: MENUITEMINFO): BOOL; stdcall;
-{$EXTERNALSYM SetMenuItemInfo}
-
-const
- GMDI_USEDISABLED = $0001;
- {$EXTERNALSYM GMDI_USEDISABLED}
- GMDI_GOINTOPOPUPS = $0002;
- {$EXTERNALSYM GMDI_GOINTOPOPUPS}
-
-function GetMenuDefaultItem(hMenu: HMENU; fByPos, gmdiFlags: UINT): UINT; stdcall;
-{$EXTERNALSYM GetMenuDefaultItem}
-
-function SetMenuDefaultItem(hMenu: HMENU; uItem, fByPos: UINT): BOOL; stdcall;
-{$EXTERNALSYM SetMenuDefaultItem}
-
-function GetMenuItemRect(hWnd: HWND; hMenu: HMENU; uItem: UINT; var lprcItem: RECT): BOOL; stdcall;
-{$EXTERNALSYM GetMenuItemRect}
-
-function MenuItemFromPoint(hWnd: HWND; hMenu: HMENU; ptScreen: POINT): Integer; stdcall;
-{$EXTERNALSYM MenuItemFromPoint}
-
-//
-// Flags for TrackPopupMenu
-//
-
-const
- TPM_LEFTBUTTON = $0000;
- {$EXTERNALSYM TPM_LEFTBUTTON}
- TPM_RIGHTBUTTON = $0002;
- {$EXTERNALSYM TPM_RIGHTBUTTON}
- TPM_LEFTALIGN = $0000;
- {$EXTERNALSYM TPM_LEFTALIGN}
- TPM_CENTERALIGN = $0004;
- {$EXTERNALSYM TPM_CENTERALIGN}
- TPM_RIGHTALIGN = $0008;
- {$EXTERNALSYM TPM_RIGHTALIGN}
- TPM_TOPALIGN = $0000;
- {$EXTERNALSYM TPM_TOPALIGN}
- TPM_VCENTERALIGN = $0010;
- {$EXTERNALSYM TPM_VCENTERALIGN}
- TPM_BOTTOMALIGN = $0020;
- {$EXTERNALSYM TPM_BOTTOMALIGN}
-
- TPM_HORIZONTAL = $0000; // Horz alignment matters more
- {$EXTERNALSYM TPM_HORIZONTAL}
- TPM_VERTICAL = $0040; // Vert alignment matters more
- {$EXTERNALSYM TPM_VERTICAL}
- TPM_NONOTIFY = $0080; // Don't send any notification msgs
- {$EXTERNALSYM TPM_NONOTIFY}
- TPM_RETURNCMD = $0100;
- {$EXTERNALSYM TPM_RETURNCMD}
- TPM_RECURSE = $0001;
- {$EXTERNALSYM TPM_RECURSE}
- TPM_HORPOSANIMATION = $0400;
- {$EXTERNALSYM TPM_HORPOSANIMATION}
- TPM_HORNEGANIMATION = $0800;
- {$EXTERNALSYM TPM_HORNEGANIMATION}
- TPM_VERPOSANIMATION = $1000;
- {$EXTERNALSYM TPM_VERPOSANIMATION}
- TPM_VERNEGANIMATION = $2000;
- {$EXTERNALSYM TPM_VERNEGANIMATION}
- TPM_NOANIMATION = $4000;
- {$EXTERNALSYM TPM_NOANIMATION}
- TPM_LAYOUTRTL = $8000;
- {$EXTERNALSYM TPM_LAYOUTRTL}
-
-//
-// Drag-and-drop support
-// Obsolete - use OLE instead
-//
-
-type
- LPDROPSTRUCT = ^DROPSTRUCT;
- {$EXTERNALSYM LPDROPSTRUCT}
- tagDROPSTRUCT = record
- hwndSource: HWND;
- hwndSink: HWND;
- wFmt: DWORD;
- dwData: ULONG_PTR;
- ptDrop: POINT;
- dwControlData: DWORD;
- end;
- {$EXTERNALSYM tagDROPSTRUCT}
- DROPSTRUCT = tagDROPSTRUCT;
- {$EXTERNALSYM DROPSTRUCT}
- TDropStruct = DROPSTRUCT;
- PDropStruct = LPDROPSTRUCT;
-
-const
- DOF_EXECUTABLE = $8001; // wFmt flags
- {$EXTERNALSYM DOF_EXECUTABLE}
- DOF_DOCUMENT = $8002;
- {$EXTERNALSYM DOF_DOCUMENT}
- DOF_DIRECTORY = $8003;
- {$EXTERNALSYM DOF_DIRECTORY}
- DOF_MULTIPLE = $8004;
- {$EXTERNALSYM DOF_MULTIPLE}
- DOF_PROGMAN = $0001;
- {$EXTERNALSYM DOF_PROGMAN}
- DOF_SHELLDATA = $0002;
- {$EXTERNALSYM DOF_SHELLDATA}
-
- DO_DROPFILE = $454C4946;
- {$EXTERNALSYM DO_DROPFILE}
- DO_PRINTFILE = $544E5250;
- {$EXTERNALSYM DO_PRINTFILE}
-
-function DragObject(hwnd1, hwnd2: HWND; i: UINT; u: ULONG_PTR; hcursor: HCURSOR): DWORD; stdcall;
-{$EXTERNALSYM DragObject}
-
-function DragDetect(hwnd: HWND; pt: POINT): BOOL; stdcall;
-{$EXTERNALSYM DragDetect}
-
-function DrawIcon(hDC: HDC; X, Y: Integer; hIcon: HICON): BOOL; stdcall;
-{$EXTERNALSYM DrawIcon}
-
-//
-// DrawText() Format Flags
-//
-
-const
- DT_TOP = $00000000;
- {$EXTERNALSYM DT_TOP}
- DT_LEFT = $00000000;
- {$EXTERNALSYM DT_LEFT}
- DT_CENTER = $00000001;
- {$EXTERNALSYM DT_CENTER}
- DT_RIGHT = $00000002;
- {$EXTERNALSYM DT_RIGHT}
- DT_VCENTER = $00000004;
- {$EXTERNALSYM DT_VCENTER}
- DT_BOTTOM = $00000008;
- {$EXTERNALSYM DT_BOTTOM}
- DT_WORDBREAK = $00000010;
- {$EXTERNALSYM DT_WORDBREAK}
- DT_SINGLELINE = $00000020;
- {$EXTERNALSYM DT_SINGLELINE}
- DT_EXPANDTABS = $00000040;
- {$EXTERNALSYM DT_EXPANDTABS}
- DT_TABSTOP = $00000080;
- {$EXTERNALSYM DT_TABSTOP}
- DT_NOCLIP = $00000100;
- {$EXTERNALSYM DT_NOCLIP}
- DT_EXTERNALLEADING = $00000200;
- {$EXTERNALSYM DT_EXTERNALLEADING}
- DT_CALCRECT = $00000400;
- {$EXTERNALSYM DT_CALCRECT}
- DT_NOPREFIX = $00000800;
- {$EXTERNALSYM DT_NOPREFIX}
- DT_INTERNAL = $00001000;
- {$EXTERNALSYM DT_INTERNAL}
-
- DT_EDITCONTROL = $00002000;
- {$EXTERNALSYM DT_EDITCONTROL}
- DT_PATH_ELLIPSIS = $00004000;
- {$EXTERNALSYM DT_PATH_ELLIPSIS}
- DT_END_ELLIPSIS = $00008000;
- {$EXTERNALSYM DT_END_ELLIPSIS}
- DT_MODIFYSTRING = $00010000;
- {$EXTERNALSYM DT_MODIFYSTRING}
- DT_RTLREADING = $00020000;
- {$EXTERNALSYM DT_RTLREADING}
- DT_WORD_ELLIPSIS = $00040000;
- {$EXTERNALSYM DT_WORD_ELLIPSIS}
- DT_NOFULLWIDTHCHARBREAK = $00080000;
- {$EXTERNALSYM DT_NOFULLWIDTHCHARBREAK}
- DT_HIDEPREFIX = $00100000;
- {$EXTERNALSYM DT_HIDEPREFIX}
- DT_PREFIXONLY = $00200000;
- {$EXTERNALSYM DT_PREFIXONLY}
-
-type
- LPDRAWTEXTPARAMS = ^DRAWTEXTPARAMS;
- {$EXTERNALSYM LPDRAWTEXTPARAMS}
- tagDRAWTEXTPARAMS = record
- cbSize: UINT;
- iTabLength: Integer;
- iLeftMargin: Integer;
- iRightMargin: Integer;
- uiLengthDrawn: UINT;
- end;
- {$EXTERNALSYM tagDRAWTEXTPARAMS}
- DRAWTEXTPARAMS = tagDRAWTEXTPARAMS;
- {$EXTERNALSYM DRAWTEXTPARAMS}
- TDrawTextParams = DRAWTEXTPARAMS;
- PDrawTextParams = LPDRAWTEXTPARAMS;
-
-function DrawTextA(hDC: HDC; lpString: LPCSTR; nCount: Integer;
- var lpRect: RECT; uFormat: UINT): Integer; stdcall;
-{$EXTERNALSYM DrawTextA}
-function DrawTextW(hDC: HDC; lpString: LPCWSTR; nCount: Integer;
- var lpRect: RECT; uFormat: UINT): Integer; stdcall;
-{$EXTERNALSYM DrawTextW}
-function DrawText(hDC: HDC; lpString: LPCTSTR; nCount: Integer;
- var lpRect: RECT; uFormat: UINT): Integer; stdcall;
-{$EXTERNALSYM DrawText}
-
-function DrawTextExA(hDc: HDC; lpchText: LPSTR; cchText: Integer;
- var lprc: RECT; dwDTFormat: UINT; lpDTParams: LPDRAWTEXTPARAMS): Integer; stdcall;
-{$EXTERNALSYM DrawTextExA}
-function DrawTextExW(hDc: HDC; lpchText: LPWSTR; cchText: Integer;
- var lprc: RECT; dwDTFormat: UINT; lpDTParams: LPDRAWTEXTPARAMS): Integer; stdcall;
-{$EXTERNALSYM DrawTextExW}
-function DrawTextEx(hDc: HDC; lpchText: LPTSTR; cchText: Integer;
- var lprc: RECT; dwDTFormat: UINT; lpDTParams: LPDRAWTEXTPARAMS): Integer; stdcall;
-{$EXTERNALSYM DrawTextEx}
-
-function GrayStringA(hDC: HDC; hBrush: HBRUSH; lpOutputFunc: GRAYSTRINGPROC;
- lpData: LPARAM; nCount, X, Y, nWidth, nHeight: Integer): BOOL; stdcall;
-{$EXTERNALSYM GrayStringA}
-function GrayStringW(hDC: HDC; hBrush: HBRUSH; lpOutputFunc: GRAYSTRINGPROC;
- lpData: LPARAM; nCount, X, Y, nWidth, nHeight: Integer): BOOL; stdcall;
-{$EXTERNALSYM GrayStringW}
-function GrayString(hDC: HDC; hBrush: HBRUSH; lpOutputFunc: GRAYSTRINGPROC;
- lpData: LPARAM; nCount, X, Y, nWidth, nHeight: Integer): BOOL; stdcall;
-{$EXTERNALSYM GrayString}
-
-// Monolithic state-drawing routine//
-// Image type//
-
-const
- DST_COMPLEX = $0000;
- {$EXTERNALSYM DST_COMPLEX}
- DST_TEXT = $0001;
- {$EXTERNALSYM DST_TEXT}
- DST_PREFIXTEXT = $0002;
- {$EXTERNALSYM DST_PREFIXTEXT}
- DST_ICON = $0003;
- {$EXTERNALSYM DST_ICON}
- DST_BITMAP = $0004;
- {$EXTERNALSYM DST_BITMAP}
-
-// State type//
-
- DSS_NORMAL = $0000;
- {$EXTERNALSYM DSS_NORMAL}
- DSS_UNION = $0010; // Gray string appearance
- {$EXTERNALSYM DSS_UNION}
- DSS_DISABLED = $0020;
- {$EXTERNALSYM DSS_DISABLED}
- DSS_MONO = $0080;
- {$EXTERNALSYM DSS_MONO}
- DSS_HIDEPREFIX = $0200;
- {$EXTERNALSYM DSS_HIDEPREFIX}
- DSS_PREFIXONLY = $0400;
- {$EXTERNALSYM DSS_PREFIXONLY}
- DSS_RIGHT = $8000;
- {$EXTERNALSYM DSS_RIGHT}
-
-function DrawStateA(hdc: HDC; hbr: HBRUSH; lputputFunc: DRAWSTATEPROC;
- lData: LPARAM; wData: WPARAM; x, y, cx, cy: Integer; fuFlags: UINT): BOOL; stdcall;
-{$EXTERNALSYM DrawStateA}
-function DrawStateW(hdc: HDC; hbr: HBRUSH; lputputFunc: DRAWSTATEPROC;
- lData: LPARAM; wData: WPARAM; x, y, cx, cy: Integer; fuFlags: UINT): BOOL; stdcall;
-{$EXTERNALSYM DrawStateW}
-function DrawState(hdc: HDC; hbr: HBRUSH; lputputFunc: DRAWSTATEPROC;
- lData: LPARAM; wData: WPARAM; x, y, cx, cy: Integer; fuFlags: UINT): BOOL; stdcall;
-{$EXTERNALSYM DrawState}
-
-function TabbedTextOutA(hDC: HDC; X, Y: Integer; lpString: LPCSTR; nCount,
- nTabPositions: Integer; lpnTabStopPositions: LPINT; nTabOrigin: Integer): LONG; stdcall;
-{$EXTERNALSYM TabbedTextOutA}
-function TabbedTextOutW(hDC: HDC; X, Y: Integer; lpString: LPCWSTR; nCount,
- nTabPositions: Integer; lpnTabStopPositions: LPINT; nTabOrigin: Integer): LONG; stdcall;
-{$EXTERNALSYM TabbedTextOutW}
-function TabbedTextOut(hDC: HDC; X, Y: Integer; lpString: LPCTSTR; nCount,
- nTabPositions: Integer; lpnTabStopPositions: LPINT; nTabOrigin: Integer): LONG; stdcall;
-{$EXTERNALSYM TabbedTextOut}
-
-function GetTabbedTextExtentA(hDC: HDC; lpString: LPCSTR; nCount,
- nTabPositions: Integer; lpnTabStopPositions: LPINT): DWORD; stdcall;
-{$EXTERNALSYM GetTabbedTextExtentA}
-function GetTabbedTextExtentW(hDC: HDC; lpString: LPCWSTR; nCount,
- nTabPositions: Integer; lpnTabStopPositions: LPINT): DWORD; stdcall;
-{$EXTERNALSYM GetTabbedTextExtentW}
-function GetTabbedTextExtent(hDC: HDC; lpString: LPCTSTR; nCount,
- nTabPositions: Integer; lpnTabStopPositions: LPINT): DWORD; stdcall;
-{$EXTERNALSYM GetTabbedTextExtent}
-
-function UpdateWindow(hWnd: HWND): BOOL; stdcall;
-{$EXTERNALSYM UpdateWindow}
-
-function SetActiveWindow(hWnd: HWND): HWND; stdcall;
-{$EXTERNALSYM SetActiveWindow}
-
-function GetForegroundWindow: HWND; stdcall;
-{$EXTERNALSYM GetForegroundWindow}
-
-function PaintDesktop(hdc: HDC): BOOL; stdcall;
-{$EXTERNALSYM PaintDesktop}
-
-procedure SwitchToThisWindow(hwnd: HWND; fUnknown: BOOL); stdcall;
-{$EXTERNALSYM SwitchToThisWindow}
-
-function SetForegroundWindow(hWnd: HWND): BOOL; stdcall;
-{$EXTERNALSYM SetForegroundWindow}
-
-function AllowSetForegroundWindow(dwProcessId: DWORD): BOOL; stdcall;
-{$EXTERNALSYM AllowSetForegroundWindow}
-
-const
- ASFW_ANY = DWORD(-1);
- {$EXTERNALSYM ASFW_ANY}
-
-function LockSetForegroundWindow(uLockCode: UINT): BOOL; stdcall;
-{$EXTERNALSYM LockSetForegroundWindow}
-
-const
- LSFW_LOCK = 1;
- {$EXTERNALSYM LSFW_LOCK}
- LSFW_UNLOCK = 2;
- {$EXTERNALSYM LSFW_UNLOCK}
-
-function WindowFromDC(hDC: HDC): HWND; stdcall;
-{$EXTERNALSYM WindowFromDC}
-
-function GetDC(hWnd: HWND): HDC; stdcall;
-{$EXTERNALSYM GetDC}
-
-function GetDCEx(hWnd: HWND; hrgnClip: HRGN; flags: DWORD): HDC; stdcall;
-{$EXTERNALSYM GetDCEx}
-
-//
-// GetDCEx() flags
-//
-
-const
- DCX_WINDOW = $00000001;
- {$EXTERNALSYM DCX_WINDOW}
- DCX_CACHE = $00000002;
- {$EXTERNALSYM DCX_CACHE}
- DCX_NORESETATTRS = $00000004;
- {$EXTERNALSYM DCX_NORESETATTRS}
- DCX_CLIPCHILDREN = $00000008;
- {$EXTERNALSYM DCX_CLIPCHILDREN}
- DCX_CLIPSIBLINGS = $00000010;
- {$EXTERNALSYM DCX_CLIPSIBLINGS}
- DCX_PARENTCLIP = $00000020;
- {$EXTERNALSYM DCX_PARENTCLIP}
- DCX_EXCLUDERGN = $00000040;
- {$EXTERNALSYM DCX_EXCLUDERGN}
- DCX_INTERSECTRGN = $00000080;
- {$EXTERNALSYM DCX_INTERSECTRGN}
- DCX_EXCLUDEUPDATE = $00000100;
- {$EXTERNALSYM DCX_EXCLUDEUPDATE}
- DCX_INTERSECTUPDATE = $00000200;
- {$EXTERNALSYM DCX_INTERSECTUPDATE}
- DCX_LOCKWINDOWUPDATE = $00000400;
- {$EXTERNALSYM DCX_LOCKWINDOWUPDATE}
-
- DCX_VALIDATE = $00200000;
- {$EXTERNALSYM DCX_VALIDATE}
-
-function GetWindowDC(hWnd: HWND): HDC; stdcall;
-{$EXTERNALSYM GetWindowDC}
-
-function ReleaseDC(hWnd: HWND; hDC: HDC): Integer; stdcall;
-{$EXTERNALSYM ReleaseDC}
-
-function BeginPaint(hWnd: HWND; var lpPaint: PAINTSTRUCT): HDC; stdcall;
-{$EXTERNALSYM BeginPaint}
-
-function EndPaint(hWnd: HWND; const lpPaint: PAINTSTRUCT): BOOL; stdcall;
-{$EXTERNALSYM EndPaint}
-
-function GetUpdateRect(hWnd: HWND; var lpRect: RECT; bErase: BOOL): BOOL; stdcall;
-{$EXTERNALSYM GetUpdateRect}
-
-function GetUpdateRgn(hWnd: HWND; hRgn: HRGN; bErase: BOOL): Integer; stdcall;
-{$EXTERNALSYM GetUpdateRgn}
-
-function SetWindowRgn(hWnd: HWND; hRgn: HRGN; bRedraw: BOOL): Integer; stdcall;
-{$EXTERNALSYM SetWindowRgn}
-
-function GetWindowRgn(hWnd: HWND; hRgn: HRGN): Integer; stdcall;
-{$EXTERNALSYM GetWindowRgn}
-
-function GetWindowRgnBox(hWnd: HWND; var lprc: RECT): Integer; stdcall;
-{$EXTERNALSYM GetWindowRgnBox}
-
-function ExcludeUpdateRgn(hDC: HDC; hWnd: HWND): Integer; stdcall;
-{$EXTERNALSYM ExcludeUpdateRgn}
-
-function InvalidateRect(hWnd: HWND; lpRect: LPRECT; bErase: BOOL): BOOL; stdcall;
-{$EXTERNALSYM InvalidateRect}
-
-function ValidateRect(hWnd: HWND; lpRect: LPRECT): BOOL; stdcall;
-{$EXTERNALSYM ValidateRect}
-
-function InvalidateRgn(hWnd: HWND; hRgn: HRGN; bErase: BOOL): BOOL; stdcall;
-{$EXTERNALSYM InvalidateRgn}
-
-function ValidateRgn(hWnd: HWND; hRgn: HRGN): BOOL; stdcall;
-{$EXTERNALSYM ValidateRgn}
-
-function RedrawWindow(hWnd: HWND; lprcUpdate: LPRECT; hrgnUpdate: HRGN; flags: UINT): BOOL; stdcall;
-{$EXTERNALSYM RedrawWindow}
-
-//
-// RedrawWindow() flags
-//
-
-const
- RDW_INVALIDATE = $0001;
- {$EXTERNALSYM RDW_INVALIDATE}
- RDW_INTERNALPAINT = $0002;
- {$EXTERNALSYM RDW_INTERNALPAINT}
- RDW_ERASE = $0004;
- {$EXTERNALSYM RDW_ERASE}
-
- RDW_VALIDATE = $0008;
- {$EXTERNALSYM RDW_VALIDATE}
- RDW_NOINTERNALPAINT = $0010;
- {$EXTERNALSYM RDW_NOINTERNALPAINT}
- RDW_NOERASE = $0020;
- {$EXTERNALSYM RDW_NOERASE}
-
- RDW_NOCHILDREN = $0040;
- {$EXTERNALSYM RDW_NOCHILDREN}
- RDW_ALLCHILDREN = $0080;
- {$EXTERNALSYM RDW_ALLCHILDREN}
-
- RDW_UPDATENOW = $0100;
- {$EXTERNALSYM RDW_UPDATENOW}
- RDW_ERASENOW = $0200;
- {$EXTERNALSYM RDW_ERASENOW}
-
- RDW_FRAME = $0400;
- {$EXTERNALSYM RDW_FRAME}
- RDW_NOFRAME = $0800;
- {$EXTERNALSYM RDW_NOFRAME}
-
-//
-// LockWindowUpdate API
-//
-
-function LockWindowUpdate(hWndLock: HWND): BOOL; stdcall;
-{$EXTERNALSYM LockWindowUpdate}
-
-function ScrollWindow(hWnd: HWND; XAmount, YAmount: Integer; lpRect, lpClipRect: LPRECT): BOOL; stdcall;
-{$EXTERNALSYM ScrollWindow}
-
-function ScrollDC(hDC: HDC; dx, dy: Integer; lprcScroll, lprcClip: LPRECT;
- hrgnUpdate: HRGN; lprcUpdate: LPRECT): BOOL; stdcall;
-{$EXTERNALSYM ScrollDC}
-
-function ScrollWindowEx(hWnd: HWND; dx, dy: Integer; prcScroll, prcClip: LPRECT;
- hrgnUpdate: HRGN; prcUpdate: LPRECT; flags: UINT): Integer; stdcall;
-{$EXTERNALSYM ScrollWindowEx}
-
-const
- SW_SCROLLCHILDREN = $0001; // Scroll children within *lprcScroll.
- {$EXTERNALSYM SW_SCROLLCHILDREN}
- SW_INVALIDATE = $0002; // Invalidate after scrolling
- {$EXTERNALSYM SW_INVALIDATE}
- SW_ERASE = $0004; // If SW_INVALIDATE, don't send WM_ERASEBACKGROUND
- {$EXTERNALSYM SW_ERASE}
- SW_SMOOTHSCROLL = $0010; // Use smooth scrolling
- {$EXTERNALSYM SW_SMOOTHSCROLL}
-
-function SetScrollPos(hWnd: HWND; nBar, nPos: Integer; bRedraw: BOOL): Integer; stdcall;
-{$EXTERNALSYM SetScrollPos}
-
-function GetScrollPos(hWnd: HWND; nBar: Integer): Integer; stdcall;
-{$EXTERNALSYM GetScrollPos}
-
-function SetScrollRange(hWnd: HWND; nBar, nMinPos, nMaxPos: Integer; bRedraw: BOOL): BOOL; stdcall;
-{$EXTERNALSYM SetScrollRange}
-
-function GetScrollRange(hWnd: HWND; nBar: Integer; var lpMinPos, lpMaxPos: Integer): BOOL; stdcall;
-{$EXTERNALSYM GetScrollRange}
-
-function ShowScrollBar(hWnd: HWND; wBar: Integer; bShow: BOOL): BOOL; stdcall;
-{$EXTERNALSYM ShowScrollBar}
-
-function EnableScrollBar(hWnd: HWND; wSBflags, wArrows: UINT): BOOL; stdcall;
-{$EXTERNALSYM EnableScrollBar}
-
-//
-// EnableScrollBar() flags
-//
-
-const
- ESB_ENABLE_BOTH = $0000;
- {$EXTERNALSYM ESB_ENABLE_BOTH}
- ESB_DISABLE_BOTH = $0003;
- {$EXTERNALSYM ESB_DISABLE_BOTH}
-
- ESB_DISABLE_LEFT = $0001;
- {$EXTERNALSYM ESB_DISABLE_LEFT}
- ESB_DISABLE_RIGHT = $0002;
- {$EXTERNALSYM ESB_DISABLE_RIGHT}
-
- ESB_DISABLE_UP = $0001;
- {$EXTERNALSYM ESB_DISABLE_UP}
- ESB_DISABLE_DOWN = $0002;
- {$EXTERNALSYM ESB_DISABLE_DOWN}
-
- ESB_DISABLE_LTUP = ESB_DISABLE_LEFT;
- {$EXTERNALSYM ESB_DISABLE_LTUP}
- ESB_DISABLE_RTDN = ESB_DISABLE_RIGHT;
- {$EXTERNALSYM ESB_DISABLE_RTDN}
-
-function SetPropA(hWnd: HWND; lpString: LPCSTR; hData: HANDLE): BOOL; stdcall;
-{$EXTERNALSYM SetPropA}
-function SetPropW(hWnd: HWND; lpString: LPCWSTR; hData: HANDLE): BOOL; stdcall;
-{$EXTERNALSYM SetPropW}
-function SetProp(hWnd: HWND; lpString: LPCTSTR; hData: HANDLE): BOOL; stdcall;
-{$EXTERNALSYM SetProp}
-
-function GetPropA(hWnd: HWND; lpString: LPCSTR): HANDLE; stdcall;
-{$EXTERNALSYM GetPropA}
-function GetPropW(hWnd: HWND; lpString: LPCWSTR): HANDLE; stdcall;
-{$EXTERNALSYM GetPropW}
-function GetProp(hWnd: HWND; lpString: LPCTSTR): HANDLE; stdcall;
-{$EXTERNALSYM GetProp}
-
-function RemovePropA(hWnd: HWND; lpString: LPCSTR): HANDLE; stdcall;
-{$EXTERNALSYM RemovePropA}
-function RemovePropW(hWnd: HWND; lpString: LPCWSTR): HANDLE; stdcall;
-{$EXTERNALSYM RemovePropW}
-function RemoveProp(hWnd: HWND; lpString: LPCTSTR): HANDLE; stdcall;
-{$EXTERNALSYM RemoveProp}
-
-function EnumPropsExA(hWnd: HWND; lpEnumFunc: PROPENUMPROCEXA; lParam: LPARAM): Integer; stdcall;
-{$EXTERNALSYM EnumPropsExA}
-function EnumPropsExW(hWnd: HWND; lpEnumFunc: PROPENUMPROCEXW; lParam: LPARAM): Integer; stdcall;
-{$EXTERNALSYM EnumPropsExW}
-function EnumPropsEx(hWnd: HWND; lpEnumFunc: PROPENUMPROCEX; lParam: LPARAM): Integer; stdcall;
-{$EXTERNALSYM EnumPropsEx}
-
-function EnumPropsA(hWnd: HWND; lpEnumFunc: PROPENUMPROCA): Integer; stdcall;
-{$EXTERNALSYM EnumPropsA}
-function EnumPropsW(hWnd: HWND; lpEnumFunc: PROPENUMPROCW): Integer; stdcall;
-{$EXTERNALSYM EnumPropsW}
-function EnumProps(hWnd: HWND; lpEnumFunc: PROPENUMPROC): Integer; stdcall;
-{$EXTERNALSYM EnumProps}
-
-function SetWindowTextA(hWnd: HWND; lpString: LPCSTR): BOOL; stdcall;
-{$EXTERNALSYM SetWindowTextA}
-function SetWindowTextW(hWnd: HWND; lpString: LPCWSTR): BOOL; stdcall;
-{$EXTERNALSYM SetWindowTextW}
-function SetWindowText(hWnd: HWND; lpString: LPCTSTR): BOOL; stdcall;
-{$EXTERNALSYM SetWindowText}
-
-function GetWindowTextA(hWnd: HWND; lpString: LPSTR; nMaxCount: Integer): Integer; stdcall;
-{$EXTERNALSYM GetWindowTextA}
-function GetWindowTextW(hWnd: HWND; lpString: LPWSTR; nMaxCount: Integer): Integer; stdcall;
-{$EXTERNALSYM GetWindowTextW}
-function GetWindowText(hWnd: HWND; lpString: LPTSTR; nMaxCount: Integer): Integer; stdcall;
-{$EXTERNALSYM GetWindowText}
-
-function GetWindowTextLengthA(hWnd: HWND): Integer; stdcall;
-{$EXTERNALSYM GetWindowTextLengthA}
-function GetWindowTextLengthW(hWnd: HWND): Integer; stdcall;
-{$EXTERNALSYM GetWindowTextLengthW}
-function GetWindowTextLength(hWnd: HWND): Integer; stdcall;
-{$EXTERNALSYM GetWindowTextLength}
-
-function GetClientRect(hWnd: HWND; var lpRect: RECT): BOOL; stdcall;
-{$EXTERNALSYM GetClientRect}
-
-function GetWindowRect(hWnd: HWND; var lpRect: RECT): BOOL; stdcall;
-{$EXTERNALSYM GetWindowRect}
-
-function AdjustWindowRect(var lpRect: RECT; dwStyle: DWORD; bMenu: BOOL): BOOL; stdcall;
-{$EXTERNALSYM AdjustWindowRect}
-
-function AdjustWindowRectEx(var lpRect: RECT; dwStyle: DWORD;
- bMenu: BOOL; dwExStyle: DWORD): BOOL; stdcall;
-{$EXTERNALSYM AdjustWindowRectEx}
-
-const
- HELPINFO_WINDOW = $0001;
- {$EXTERNALSYM HELPINFO_WINDOW}
- HELPINFO_MENUITEM = $0002;
- {$EXTERNALSYM HELPINFO_MENUITEM}
-
-type
- LPHELPINFO = ^HELPINFO;
- {$EXTERNALSYM LPHELPINFO}
- tagHELPINFO = record // Structure pointed to by lParam of WM_HELP//
- cbSize: UINT; // Size in bytes of this struct //
- iContextType: Integer; // Either HELPINFO_WINDOW or HELPINFO_MENUITEM//
- iCtrlId: Integer; // Control Id or a Menu item Id.//
- hItemHandle: HANDLE; // hWnd of control or hMenu. //
- dwContextId: DWORD_PTR; // Context Id associated with this item//
- MousePos: POINT; // Mouse Position in screen co-ordinates//
- end;
- {$EXTERNALSYM tagHELPINFO}
- HELPINFO = tagHELPINFO;
- {$EXTERNALSYM HELPINFO}
- THelpInfo = HELPINFO;
- PHelpInfo = LPHELPINFO;
-
-function SetWindowContextHelpId(hwnd: HWND; dwContextHelpId: DWORD): BOOL; stdcall;
-{$EXTERNALSYM SetWindowContextHelpId}
-
-function GetWindowContextHelpId(hwnd: HWND): DWORD; stdcall;
-{$EXTERNALSYM GetWindowContextHelpId}
-
-function SetMenuContextHelpId(hmenu: HMENU; dwContextHelpId: DWORD): BOOL; stdcall;
-{$EXTERNALSYM SetMenuContextHelpId}
-
-function GetMenuContextHelpId(hmenu: HMENU): DWORD; stdcall;
-{$EXTERNALSYM GetMenuContextHelpId}
-
-//
-// MessageBox() Flags
-//
-
-const
- MB_OK = $00000000;
- {$EXTERNALSYM MB_OK}
- MB_OKCANCEL = $00000001;
- {$EXTERNALSYM MB_OKCANCEL}
- MB_ABORTRETRYIGNORE = $00000002;
- {$EXTERNALSYM MB_ABORTRETRYIGNORE}
- MB_YESNOCANCEL = $00000003;
- {$EXTERNALSYM MB_YESNOCANCEL}
- MB_YESNO = $00000004;
- {$EXTERNALSYM MB_YESNO}
- MB_RETRYCANCEL = $00000005;
- {$EXTERNALSYM MB_RETRYCANCEL}
- MB_CANCELTRYCONTINUE = $00000006;
- {$EXTERNALSYM MB_CANCELTRYCONTINUE}
-
- MB_ICONHAND = $00000010;
- {$EXTERNALSYM MB_ICONHAND}
- MB_ICONQUESTION = $00000020;
- {$EXTERNALSYM MB_ICONQUESTION}
- MB_ICONEXCLAMATION = $00000030;
- {$EXTERNALSYM MB_ICONEXCLAMATION}
- MB_ICONASTERISK = $00000040;
- {$EXTERNALSYM MB_ICONASTERISK}
-
- MB_USERICON = $00000080;
- {$EXTERNALSYM MB_USERICON}
- MB_ICONWARNING = MB_ICONEXCLAMATION;
- {$EXTERNALSYM MB_ICONWARNING}
- MB_ICONERROR = MB_ICONHAND;
- {$EXTERNALSYM MB_ICONERROR}
-
- MB_ICONINFORMATION = MB_ICONASTERISK;
- {$EXTERNALSYM MB_ICONINFORMATION}
- MB_ICONSTOP = MB_ICONHAND;
- {$EXTERNALSYM MB_ICONSTOP}
-
- MB_DEFBUTTON1 = $00000000;
- {$EXTERNALSYM MB_DEFBUTTON1}
- MB_DEFBUTTON2 = $00000100;
- {$EXTERNALSYM MB_DEFBUTTON2}
- MB_DEFBUTTON3 = $00000200;
- {$EXTERNALSYM MB_DEFBUTTON3}
- MB_DEFBUTTON4 = $00000300;
- {$EXTERNALSYM MB_DEFBUTTON4}
-
- MB_APPLMODAL = $00000000;
- {$EXTERNALSYM MB_APPLMODAL}
- MB_SYSTEMMODAL = $00001000;
- {$EXTERNALSYM MB_SYSTEMMODAL}
- MB_TASKMODAL = $00002000;
- {$EXTERNALSYM MB_TASKMODAL}
- MB_HELP = $00004000; // Help Button
- {$EXTERNALSYM MB_HELP}
-
- MB_NOFOCUS = $00008000;
- {$EXTERNALSYM MB_NOFOCUS}
- MB_SETFOREGROUND = $00010000;
- {$EXTERNALSYM MB_SETFOREGROUND}
- MB_DEFAULT_DESKTOP_ONLY = $00020000;
- {$EXTERNALSYM MB_DEFAULT_DESKTOP_ONLY}
-
- MB_TOPMOST = $00040000;
- {$EXTERNALSYM MB_TOPMOST}
- MB_RIGHT = $00080000;
- {$EXTERNALSYM MB_RIGHT}
- MB_RTLREADING = $00100000;
- {$EXTERNALSYM MB_RTLREADING}
-
-const
- {$IFDEF WINNT4_UP}
- MB_SERVICE_NOTIFICATION = $00200000;
- {$EXTERNALSYM MB_SERVICE_NOTIFICATION}
- {$ELSE}
- MB_SERVICE_NOTIFICATION = $00040000;
- {$EXTERNALSYM MB_SERVICE_NOTIFICATION}
- {$ENDIF WINNT4_UP}
-
- MB_TYPEMASK = $0000000F;
- {$EXTERNALSYM MB_TYPEMASK}
- MB_ICONMASK = $000000F0;
- {$EXTERNALSYM MB_ICONMASK}
- MB_DEFMASK = $00000F00;
- {$EXTERNALSYM MB_DEFMASK}
- MB_MODEMASK = $00003000;
- {$EXTERNALSYM MB_MODEMASK}
- MB_MISCMASK = $0000C000;
- {$EXTERNALSYM MB_MISCMASK}
-
-function MessageBoxA(hWnd: HWND; lpText, lpCaption: LPCSTR; uType: UINT): Integer; stdcall;
-{$EXTERNALSYM MessageBoxA}
-function MessageBoxW(hWnd: HWND; lpText, lpCaption: LPCWSTR; uType: UINT): Integer; stdcall;
-{$EXTERNALSYM MessageBoxW}
-function MessageBox(hWnd: HWND; lpText, lpCaption: LPCTSTR; uType: UINT): Integer; stdcall;
-{$EXTERNALSYM MessageBox}
-
-function MessageBoxExA(hWnd: HWND; lpText, lpCaption: LPCSTR; uType: UINT;
- wLanguageId: WORD): Integer; stdcall;
-{$EXTERNALSYM MessageBoxExA}
-function MessageBoxExW(hWnd: HWND; lpText, lpCaption: LPCWSTR; uType: UINT;
- wLanguageId: WORD): Integer; stdcall;
-{$EXTERNALSYM MessageBoxExW}
-function MessageBoxEx(hWnd: HWND; lpText, lpCaption: LPCTSTR; uType: UINT;
- wLanguageId: WORD): Integer; stdcall;
-{$EXTERNALSYM MessageBoxEx}
-
-type
- MSGBOXCALLBACK = procedure(var lpHelpInfo: HELPINFO); stdcall;
- {$EXTERNALSYM MSGBOXCALLBACK}
- TMsgBoxCallback = MSGBOXCALLBACK;
-
- LPMSGBOXPARAMSA = ^MSGBOXPARAMSA;
- {$EXTERNALSYM LPMSGBOXPARAMSA}
- tagMSGBOXPARAMSA = record
- cbSize: UINT;
- hwndOwner: HWND;
- hInstance: HINSTANCE;
- lpszText: LPCSTR;
- lpszCaption: LPCSTR;
- dwStyle: DWORD;
- lpszIcon: LPCSTR;
- dwContextHelpId: DWORD_PTR;
- lpfnMsgBoxCallback: MSGBOXCALLBACK;
- dwLanguageId: DWORD;
- end;
- {$EXTERNALSYM tagMSGBOXPARAMSA}
- MSGBOXPARAMSA = tagMSGBOXPARAMSA;
- {$EXTERNALSYM MSGBOXPARAMSA}
- TMsgBoxParamsA = MSGBOXPARAMSA;
- PMsgBoxParamsA = LPMSGBOXPARAMSA;
-
- LPMSGBOXPARAMSW = ^MSGBOXPARAMSW;
- {$EXTERNALSYM LPMSGBOXPARAMSW}
- tagMSGBOXPARAMSW = record
- cbSize: UINT;
- hwndOwner: HWND;
- hInstance: HINSTANCE;
- lpszText: LPCWSTR;
- lpszCaption: LPCWSTR;
- dwStyle: DWORD;
- lpszIcon: LPCWSTR;
- dwContextHelpId: DWORD_PTR;
- lpfnMsgBoxCallback: MSGBOXCALLBACK;
- dwLanguageId: DWORD;
- end;
- {$EXTERNALSYM tagMSGBOXPARAMSW}
- MSGBOXPARAMSW = tagMSGBOXPARAMSW;
- {$EXTERNALSYM MSGBOXPARAMSW}
- TMsgBoxParamsW = MSGBOXPARAMSW;
- PMsgBoxParamsW = LPMSGBOXPARAMSW;
-
- {$IFDEF UNICODE}
- MSGBOXPARAMS = MSGBOXPARAMSW;
- {$EXTERNALSYM MSGBOXPARAMS}
- LPMSGBOXPARAMS = LPMSGBOXPARAMSW;
- {$EXTERNALSYM LPMSGBOXPARAMS}
- TMsgBoxParams = TMsgBoxParamsW;
- PMsgBoxParams = PMsgBoxParamsW;
- {$ELSE}
- MSGBOXPARAMS = MSGBOXPARAMSA;
- {$EXTERNALSYM MSGBOXPARAMS}
- LPMSGBOXPARAMS = LPMSGBOXPARAMSA;
- {$EXTERNALSYM LPMSGBOXPARAMS}
- TMsgBoxParams = TMsgBoxParamsA;
- PMsgBoxParams = PMsgBoxParamsA;
- {$ENDIF UNICODE}
-
-function MessageBoxIndirectA(const lpMsgBoxParams: MSGBOXPARAMSA): Integer; stdcall;
-{$EXTERNALSYM MessageBoxIndirectA}
-function MessageBoxIndirectW(const lpMsgBoxParams: MSGBOXPARAMSW): Integer; stdcall;
-{$EXTERNALSYM MessageBoxIndirectW}
-function MessageBoxIndirect(const lpMsgBoxParams: MSGBOXPARAMS): Integer; stdcall;
-{$EXTERNALSYM MessageBoxIndirect}
-
-function MessageBeep(uType: UINT): BOOL; stdcall;
-{$EXTERNALSYM MessageBeep}
-
-function ShowCursor(bShow: BOOL): Integer; stdcall;
-{$EXTERNALSYM ShowCursor}
-
-function SetCursorPos(X, Y: Integer): BOOL; stdcall;
-{$EXTERNALSYM SetCursorPos}
-
-function SetCursor(hCursor: HCURSOR): HCURSOR; stdcall;
-{$EXTERNALSYM SetCursor}
-
-function GetCursorPos(var lpPoint: POINT): BOOL; stdcall;
-{$EXTERNALSYM GetCursorPos}
-
-function ClipCursor(lpRect: LPRECT): BOOL; stdcall;
-{$EXTERNALSYM ClipCursor}
-
-function GetClipCursor(var lpRect: RECT): BOOL; stdcall;
-{$EXTERNALSYM GetClipCursor}
-
-function GetCursor: HCURSOR; stdcall;
-{$EXTERNALSYM GetCursor}
-
-function CreateCaret(hWnd: HWND; hBitmap: HBITMAP; nWidth, nHeight: Integer): BOOL; stdcall;
-{$EXTERNALSYM CreateCaret}
-
-function GetCaretBlinkTime: UINT; stdcall;
-{$EXTERNALSYM GetCaretBlinkTime}
-
-function SetCaretBlinkTime(uMSeconds: UINT): BOOL; stdcall;
-{$EXTERNALSYM SetCaretBlinkTime}
-
-function DestroyCaret: BOOL; stdcall;
-{$EXTERNALSYM DestroyCaret}
-
-function HideCaret(hWnd: HWND): BOOL; stdcall;
-{$EXTERNALSYM HideCaret}
-
-function ShowCaret(hWnd: HWND): BOOL; stdcall;
-{$EXTERNALSYM ShowCaret}
-
-function SetCaretPos(X, Y: Integer): BOOL; stdcall;
-{$EXTERNALSYM SetCaretPos}
-
-function GetCaretPos(var lpPoint: POINT): BOOL; stdcall;
-{$EXTERNALSYM GetCaretPos}
-
-function ClientToScreen(hWnd: HWND; var lpPoint: POINT): BOOL; stdcall;
-{$EXTERNALSYM ClientToScreen}
-
-function ScreenToClient(hWnd: HWND; var lpPoint: POINT): BOOL; stdcall;
-{$EXTERNALSYM ScreenToClient}
-
-function MapWindowPoints(hWndFrom, hWndTo: HWND; lpPoints: LPPOINT; cPoints: UINT): Integer; stdcall;
-{$EXTERNALSYM MapWindowPoints}
-
-function WindowFromPoint(Point: POINT): HWND; stdcall;
-{$EXTERNALSYM WindowFromPoint}
-
-function ChildWindowFromPoint(hWndParent: HWND; Point: POINT): HWND; stdcall;
-{$EXTERNALSYM ChildWindowFromPoint}
-
-const
- CWP_ALL = $0000;
- {$EXTERNALSYM CWP_ALL}
- CWP_SKIPINVISIBLE = $0001;
- {$EXTERNALSYM CWP_SKIPINVISIBLE}
- CWP_SKIPDISABLED = $0002;
- {$EXTERNALSYM CWP_SKIPDISABLED}
- CWP_SKIPTRANSPARENT = $0004;
- {$EXTERNALSYM CWP_SKIPTRANSPARENT}
-
-function ChildWindowFromPointEx(hwndParent: HWND; pt: POINT; uFlags: UINT): HWND; stdcall;
-{$EXTERNALSYM ChildWindowFromPointEx}
-
-//
-// Color Types
-//
-
-const
- CTLCOLOR_MSGBOX = 0;
- {$EXTERNALSYM CTLCOLOR_MSGBOX}
- CTLCOLOR_EDIT = 1;
- {$EXTERNALSYM CTLCOLOR_EDIT}
- CTLCOLOR_LISTBOX = 2;
- {$EXTERNALSYM CTLCOLOR_LISTBOX}
- CTLCOLOR_BTN = 3;
- {$EXTERNALSYM CTLCOLOR_BTN}
- CTLCOLOR_DLG = 4;
- {$EXTERNALSYM CTLCOLOR_DLG}
- CTLCOLOR_SCROLLBAR = 5;
- {$EXTERNALSYM CTLCOLOR_SCROLLBAR}
- CTLCOLOR_STATIC = 6;
- {$EXTERNALSYM CTLCOLOR_STATIC}
- CTLCOLOR_MAX = 7;
- {$EXTERNALSYM CTLCOLOR_MAX}
-
- COLOR_SCROLLBAR = 0;
- {$EXTERNALSYM COLOR_SCROLLBAR}
- COLOR_BACKGROUND = 1;
- {$EXTERNALSYM COLOR_BACKGROUND}
- COLOR_ACTIVECAPTION = 2;
- {$EXTERNALSYM COLOR_ACTIVECAPTION}
- COLOR_INACTIVECAPTION = 3;
- {$EXTERNALSYM COLOR_INACTIVECAPTION}
- COLOR_MENU = 4;
- {$EXTERNALSYM COLOR_MENU}
- COLOR_WINDOW = 5;
- {$EXTERNALSYM COLOR_WINDOW}
- COLOR_WINDOWFRAME = 6;
- {$EXTERNALSYM COLOR_WINDOWFRAME}
- COLOR_MENUTEXT = 7;
- {$EXTERNALSYM COLOR_MENUTEXT}
- COLOR_WINDOWTEXT = 8;
- {$EXTERNALSYM COLOR_WINDOWTEXT}
- COLOR_CAPTIONTEXT = 9;
- {$EXTERNALSYM COLOR_CAPTIONTEXT}
- COLOR_ACTIVEBORDER = 10;
- {$EXTERNALSYM COLOR_ACTIVEBORDER}
- COLOR_INACTIVEBORDER = 11;
- {$EXTERNALSYM COLOR_INACTIVEBORDER}
- COLOR_APPWORKSPACE = 12;
- {$EXTERNALSYM COLOR_APPWORKSPACE}
- COLOR_HIGHLIGHT = 13;
- {$EXTERNALSYM COLOR_HIGHLIGHT}
- COLOR_HIGHLIGHTTEXT = 14;
- {$EXTERNALSYM COLOR_HIGHLIGHTTEXT}
- COLOR_BTNFACE = 15;
- {$EXTERNALSYM COLOR_BTNFACE}
- COLOR_BTNSHADOW = 16;
- {$EXTERNALSYM COLOR_BTNSHADOW}
- COLOR_GRAYTEXT = 17;
- {$EXTERNALSYM COLOR_GRAYTEXT}
- COLOR_BTNTEXT = 18;
- {$EXTERNALSYM COLOR_BTNTEXT}
- COLOR_INACTIVECAPTIONTEXT = 19;
- {$EXTERNALSYM COLOR_INACTIVECAPTIONTEXT}
- COLOR_BTNHIGHLIGHT = 20;
- {$EXTERNALSYM COLOR_BTNHIGHLIGHT}
-
- COLOR_3DDKSHADOW = 21;
- {$EXTERNALSYM COLOR_3DDKSHADOW}
- COLOR_3DLIGHT = 22;
- {$EXTERNALSYM COLOR_3DLIGHT}
- COLOR_INFOTEXT = 23;
- {$EXTERNALSYM COLOR_INFOTEXT}
- COLOR_INFOBK = 24;
- {$EXTERNALSYM COLOR_INFOBK}
-
- COLOR_HOTLIGHT = 26;
- {$EXTERNALSYM COLOR_HOTLIGHT}
- COLOR_GRADIENTACTIVECAPTION = 27;
- {$EXTERNALSYM COLOR_GRADIENTACTIVECAPTION}
- COLOR_GRADIENTINACTIVECAPTION = 28;
- {$EXTERNALSYM COLOR_GRADIENTINACTIVECAPTION}
- COLOR_MENUHILIGHT = 29;
- {$EXTERNALSYM COLOR_MENUHILIGHT}
- COLOR_MENUBAR = 30;
- {$EXTERNALSYM COLOR_MENUBAR}
-
- COLOR_DESKTOP = COLOR_BACKGROUND;
- {$EXTERNALSYM COLOR_DESKTOP}
- COLOR_3DFACE = COLOR_BTNFACE;
- {$EXTERNALSYM COLOR_3DFACE}
- COLOR_3DSHADOW = COLOR_BTNSHADOW;
- {$EXTERNALSYM COLOR_3DSHADOW}
- COLOR_3DHIGHLIGHT = COLOR_BTNHIGHLIGHT;
- {$EXTERNALSYM COLOR_3DHIGHLIGHT}
- COLOR_3DHILIGHT = COLOR_BTNHIGHLIGHT;
- {$EXTERNALSYM COLOR_3DHILIGHT}
- COLOR_BTNHILIGHT = COLOR_BTNHIGHLIGHT;
- {$EXTERNALSYM COLOR_BTNHILIGHT}
-
-function GetSysColor(nIndex: Integer): DWORD; stdcall;
-{$EXTERNALSYM GetSysColor}
-
-function GetSysColorBrush(nIndex: Integer): HBRUSH; stdcall;
-{$EXTERNALSYM GetSysColorBrush}
-
-function SetSysColors(cElements: Integer; lpaElements: LPINT;
- lpaRgbValues: LPCOLORREF): BOOL; stdcall;
-{$EXTERNALSYM SetSysColors}
-
-function DrawFocusRect(hDC: HDC; const lprc: RECT): BOOL; stdcall;
-{$EXTERNALSYM DrawFocusRect}
-
-function FillRect(hDC: HDC; const lprc: RECT; hbr: HBRUSH): Integer; stdcall;
-{$EXTERNALSYM FillRect}
-
-function FrameRect(hDC: HDC; const lprc: RECT; hbr: HBRUSH): Integer; stdcall;
-{$EXTERNALSYM FrameRect}
-
-function InvertRect(hDC: HDC; const lprc: RECT): BOOL; stdcall;
-{$EXTERNALSYM InvertRect}
-
-function SetRect(var lprc: RECT; xLeft, yTop, xRight, yBottom: Integer): BOOL; stdcall;
-{$EXTERNALSYM SetRect}
-
-function SetRectEmpty(var lprc: RECT): BOOL; stdcall;
-{$EXTERNALSYM SetRectEmpty}
-
-function CopyRect(var lprcDst: RECT; const lprcSrc: RECT): BOOL; stdcall;
-{$EXTERNALSYM CopyRect}
-
-function InflateRect(var lprc: RECT; dx, dy: Integer): BOOL; stdcall;
-{$EXTERNALSYM InflateRect}
-
-function IntersectRect(var lprcDst: RECT; const lprcSrc1, lprcSrc2: RECT): BOOL; stdcall;
-{$EXTERNALSYM IntersectRect}
-
-function UnionRect(var lprcDst: RECT; const lprcSrc1, lprcSrc2: RECT): BOOL; stdcall;
-{$EXTERNALSYM UnionRect}
-
-function SubtractRect(var lprcDst: RECT; const lprcSrc1, lprcSrc2: RECT): BOOL; stdcall;
-{$EXTERNALSYM SubtractRect}
-
-function OffsetRect(var lprc: RECT; dx, dy: Integer): BOOL; stdcall;
-{$EXTERNALSYM OffsetRect}
-
-function IsRectEmpty(const lprc: RECT): BOOL; stdcall;
-{$EXTERNALSYM IsRectEmpty}
-
-function EqualRect(const lprc1, lprc2: RECT): BOOL; stdcall;
-{$EXTERNALSYM EqualRect}
-
-function PtInRect(const lprc: RECT; pt: POINT): BOOL; stdcall;
-{$EXTERNALSYM PtInRect}
-
-function GetWindowWord(hWnd: HWND; nIndex: Integer): WORD; stdcall;
-{$EXTERNALSYM GetWindowWord}
-
-function SetWindowWord(hWnd: HWND; nIndex: Integer; wNewWord: WORD): WORD; stdcall;
-{$EXTERNALSYM SetWindowWord}
-
-function GetWindowLongA(hWnd: HWND; nIndex: Integer): LONG; stdcall;
-{$EXTERNALSYM GetWindowLongA}
-function GetWindowLongW(hWnd: HWND; nIndex: Integer): LONG; stdcall;
-{$EXTERNALSYM GetWindowLongW}
-function GetWindowLong(hWnd: HWND; nIndex: Integer): LONG; stdcall;
-{$EXTERNALSYM GetWindowLong}
-
-function SetWindowLongA(hWnd: HWND; nIndex: Integer; dwNewLong: LONG): LONG; stdcall;
-{$EXTERNALSYM SetWindowLongA}
-function SetWindowLongW(hWnd: HWND; nIndex: Integer; dwNewLong: LONG): LONG; stdcall;
-{$EXTERNALSYM SetWindowLongW}
-function SetWindowLong(hWnd: HWND; nIndex: Integer; dwNewLong: LONG): LONG; stdcall;
-{$EXTERNALSYM SetWindowLong}
-
-function GetWindowLongPtrA(hWnd: HWND; nIndex: Integer): LONG_PTR;
-{$EXTERNALSYM GetWindowLongPtrA}
-function GetWindowLongPtrW(hWnd: HWND; nIndex: Integer): LONG_PTR;
-{$EXTERNALSYM GetWindowLongPtrW}
-function GetWindowLongPtr(hWnd: HWND; nIndex: Integer): LONG_PTR;
-{$EXTERNALSYM GetWindowLongPtr}
-
-function SetWindowLongPtrA(hWnd: HWND; nIndex: Integer; dwNewLong: LONG_PTR): LONG_PTR;
-{$EXTERNALSYM SetWindowLongPtrA}
-function SetWindowLongPtrW(hWnd: HWND; nIndex: Integer; dwNewLong: LONG_PTR): LONG_PTR;
-{$EXTERNALSYM SetWindowLongPtrW}
-function SetWindowLongPtr(hWnd: HWND; nIndex: Integer; dwNewLong: LONG_PTR): LONG_PTR;
-{$EXTERNALSYM SetWindowLongPtr}
-
-function GetClassWord(hWnd: HWND; nIndex: Integer): WORD; stdcall;
-{$EXTERNALSYM GetClassWord}
-
-function SetClassWord(hWnd: HWND; nIndex: Integer; wNewWord: WORD): WORD; stdcall;
-{$EXTERNALSYM SetClassWord}
-
-function GetClassLongA(hWnd: HWND; nIndex: Integer): DWORD; stdcall;
-{$EXTERNALSYM GetClassLongA}
-function GetClassLongW(hWnd: HWND; nIndex: Integer): DWORD; stdcall;
-{$EXTERNALSYM GetClassLongW}
-function GetClassLong(hWnd: HWND; nIndex: Integer): DWORD; stdcall;
-{$EXTERNALSYM GetClassLong}
-
-function SetClassLongA(hWnd: HWND; nIndex: Integer; dwNewLong: LONG): DWORD; stdcall;
-{$EXTERNALSYM SetClassLongA}
-function SetClassLongW(hWnd: HWND; nIndex: Integer; dwNewLong: LONG): DWORD; stdcall;
-{$EXTERNALSYM SetClassLongW}
-function SetClassLong(hWnd: HWND; nIndex: Integer; dwNewLong: LONG): DWORD; stdcall;
-{$EXTERNALSYM SetClassLong}
-
-function GetClassLongPtrA(hWnd: HWND; nIndex: Integer): ULONG_PTR;
-{$EXTERNALSYM GetClassLongPtrA}
-function GetClassLongPtrW(hWnd: HWND; nIndex: Integer): ULONG_PTR;
-{$EXTERNALSYM GetClassLongPtrW}
-function GetClassLongPtr(hWnd: HWND; nIndex: Integer): ULONG_PTR;
-{$EXTERNALSYM GetClassLongPtr}
-
-function SetClassLongPtrA(hWnd: HWND; nIndex: Integer; dwNewLong: ULONG_PTR): ULONG_PTR;
-{$EXTERNALSYM SetClassLongPtrA}
-function SetClassLongPtrW(hWnd: HWND; nIndex: Integer; dwNewLong: ULONG_PTR): ULONG_PTR;
-{$EXTERNALSYM SetClassLongPtrW}
-function SetClassLongPtr(hWnd: HWND; nIndex: Integer; dwNewLong: ULONG_PTR): ULONG_PTR;
-{$EXTERNALSYM SetClassLongPtr}
-
-function GetProcessDefaultLayout(var pdwDefaultLayout: DWORD): BOOL; stdcall;
-{$EXTERNALSYM GetProcessDefaultLayout}
-
-function SetProcessDefaultLayout(dwDefaultLayout: DWORD): BOOL; stdcall;
-{$EXTERNALSYM SetProcessDefaultLayout}
-
-function GetDesktopWindow: HWND; stdcall;
-{$EXTERNALSYM GetDesktopWindow}
-
-function GetParent(hWnd: HWND): HWND; stdcall;
-{$EXTERNALSYM GetParent}
-
-function SetParent(hWndChild, hWndNewParent: HWND): HWND; stdcall;
-{$EXTERNALSYM SetParent}
-
-function EnumChildWindows(hWndParent: HWND; lpEnumFunc: WNDENUMPROC; lParam: LPARAM): BOOL; stdcall;
-{$EXTERNALSYM EnumChildWindows}
-
-function FindWindowA(lpClassName, lpWindowName: LPCSTR): HWND; stdcall;
-{$EXTERNALSYM FindWindowA}
-function FindWindowW(lpClassName, lpWindowName: LPCWSTR): HWND; stdcall;
-{$EXTERNALSYM FindWindowW}
-function FindWindow(lpClassName, lpWindowName: LPCTSTR): HWND; stdcall;
-{$EXTERNALSYM FindWindow}
-
-function FindWindowExA(hwndParent, hwndChildAfter: HWND; lpszClass, lpszWindow: LPCSTR): HWND; stdcall;
-{$EXTERNALSYM FindWindowExA}
-function FindWindowExW(hwndParent, hwndChildAfter: HWND; lpszClass, lpszWindow: LPCWSTR): HWND; stdcall;
-{$EXTERNALSYM FindWindowExW}
-function FindWindowEx(hwndParent, hwndChildAfter: HWND; lpszClass, lpszWindow: LPCTSTR): HWND; stdcall;
-{$EXTERNALSYM FindWindowEx}
-
-function GetShellWindow: HWND; stdcall;
-{$EXTERNALSYM GetShellWindow}
-
-function RegisterShellHookWindow(h: HWND): BOOL; stdcall;
-{$EXTERNALSYM RegisterShellHookWindow}
-
-function DeregisterShellHookWindow(h: HWND): BOOL; stdcall;
-{$EXTERNALSYM DeregisterShellHookWindow}
-
-function EnumWindows(lpEnumFunc: WNDENUMPROC; lParam: LPARAM): BOOL; stdcall;
-{$EXTERNALSYM EnumWindows}
-
-function EnumThreadWindows(dwThreadId: DWORD; lpfn: WNDENUMPROC; lParam: LPARAM): BOOL; stdcall;
-{$EXTERNALSYM EnumThreadWindows}
-
-function EnumTaskWindows(hTask: HANDLE; lpfn: WNDENUMPROC; lParam: LPARAM): BOOL;
-{$EXTERNALSYM EnumTaskWindows}
-
-function GetClassNameA(hWnd: HWND; lpClassName: LPSTR; nMaxCount: Integer): Integer; stdcall;
-{$EXTERNALSYM GetClassNameA}
-function GetClassNameW(hWnd: HWND; lpClassName: LPWSTR; nMaxCount: Integer): Integer; stdcall;
-{$EXTERNALSYM GetClassNameW}
-function GetClassName(hWnd: HWND; lpClassName: LPTSTR; nMaxCount: Integer): Integer; stdcall;
-{$EXTERNALSYM GetClassName}
-
-function GetTopWindow(hWnd: HWND): HWND; stdcall;
-{$EXTERNALSYM GetTopWindow}
-
-function GetNextWindow(hWnd: HWND; wCmd: UINT): HWND;
-{$EXTERNALSYM GetNextWindow}
-
-function GetWindowThreadProcessId(hWnd: HWND; lpdwProcessId: LPDWORD): DWORD; stdcall;
-{$EXTERNALSYM GetWindowThreadProcessId}
-
-function IsGUIThread(bConvert: BOOL): BOOL; stdcall;
-{$EXTERNALSYM IsGUIThread}
-
-function GetWindowTask(hWnd: HWND): HANDLE;
-{$EXTERNALSYM GetWindowTask}
-
-function GetLastActivePopup(hWnd: HWND): HWND; stdcall;
-{$EXTERNALSYM GetLastActivePopup}
-
-//
-// GetWindow() Constants
-//
-
-const
- GW_HWNDFIRST = 0;
- {$EXTERNALSYM GW_HWNDFIRST}
- GW_HWNDLAST = 1;
- {$EXTERNALSYM GW_HWNDLAST}
- GW_HWNDNEXT = 2;
- {$EXTERNALSYM GW_HWNDNEXT}
- GW_HWNDPREV = 3;
- {$EXTERNALSYM GW_HWNDPREV}
- GW_OWNER = 4;
- {$EXTERNALSYM GW_OWNER}
- GW_CHILD = 5;
- {$EXTERNALSYM GW_CHILD}
- {$IFNDEF WIN98_UP} // #if(WINVER <= 0x0400)
- GW_MAX = 5;
- {$EXTERNALSYM GW_MAX}
- {$ELSE}
- GW_ENABLEDPOPUP = 6;
- {$EXTERNALSYM GW_ENABLEDPOPUP}
- GW_MAX = 6;
- {$EXTERNALSYM GW_MAX}
- {$ENDIF WIN98ME_UP}
-
-function GetWindow(hWnd: HWND; uCmd: UINT): HWND; stdcall;
-{$EXTERNALSYM GetWindow}
-
-function SetWindowsHookA(nFilterType: Integer; pfnFilterProc: HOOKPROC): HHOOK; stdcall;
-{$EXTERNALSYM SetWindowsHookA}
-function SetWindowsHookW(nFilterType: Integer; pfnFilterProc: HOOKPROC): HHOOK; stdcall;
-{$EXTERNALSYM SetWindowsHookW}
-function SetWindowsHook(nFilterType: Integer; pfnFilterProc: HOOKPROC): HHOOK; stdcall;
-{$EXTERNALSYM SetWindowsHook}
-
-function UnhookWindowsHook(nCode: Integer; pfnFilterProc: HOOKPROC): BOOL; stdcall;
-{$EXTERNALSYM UnhookWindowsHook}
-
-function SetWindowsHookExA(idHook: Integer; lpfn: HOOKPROC; hmod: HINSTANCE;
- dwThreadId: DWORD): HHOOK; stdcall;
-{$EXTERNALSYM SetWindowsHookExA}
-function SetWindowsHookExW(idHook: Integer; lpfn: HOOKPROC; hmod: HINSTANCE;
- dwThreadId: DWORD): HHOOK; stdcall;
-{$EXTERNALSYM SetWindowsHookExW}
-function SetWindowsHookEx(idHook: Integer; lpfn: HOOKPROC; hmod: HINSTANCE;
- dwThreadId: DWORD): HHOOK; stdcall;
-{$EXTERNALSYM SetWindowsHookEx}
-
-function UnhookWindowsHookEx(hhk: HHOOK): BOOL; stdcall;
-{$EXTERNALSYM UnhookWindowsHookEx}
-
-function CallNextHookEx(hhk: HHOOK; nCode: Integer; wParam: WPARAM; lParam: LPARAM): LRESULT; stdcall;
-{$EXTERNALSYM CallNextHookEx}
-
-//
-// Macros for source-level compatibility with old functions.
-//
-
-function DefHookProc(nCode: Integer; wParam: WPARAM; lParam: LPARAM; phhk: LPHHOOK): LRESULT;
-{$EXTERNALSYM DefHookProc}
-
-// ;win40 -- A lot of MF_* flags have been renamed as MFT_* and MFS_* flags//
-//
-// Menu flags for Add/Check/EnableMenuItem()
-///)
-
-const
- MF_INSERT = $00000000;
- {$EXTERNALSYM MF_INSERT}
- MF_CHANGE = $00000080;
- {$EXTERNALSYM MF_CHANGE}
- MF_APPEND = $00000100;
- {$EXTERNALSYM MF_APPEND}
- MF_DELETE = $00000200;
- {$EXTERNALSYM MF_DELETE}
- MF_REMOVE = $00001000;
- {$EXTERNALSYM MF_REMOVE}
-
- MF_BYCOMMAND = $00000000;
- {$EXTERNALSYM MF_BYCOMMAND}
- MF_BYPOSITION = $00000400;
- {$EXTERNALSYM MF_BYPOSITION}
-
- MF_SEPARATOR = $00000800;
- {$EXTERNALSYM MF_SEPARATOR}
-
- MF_ENABLED = $00000000;
- {$EXTERNALSYM MF_ENABLED}
- MF_GRAYED = $00000001;
- {$EXTERNALSYM MF_GRAYED}
- MF_DISABLED = $00000002;
- {$EXTERNALSYM MF_DISABLED}
-
- MF_UNCHECKED = $00000000;
- {$EXTERNALSYM MF_UNCHECKED}
- MF_CHECKED = $00000008;
- {$EXTERNALSYM MF_CHECKED}
- MF_USECHECKBITMAPS = $00000200;
- {$EXTERNALSYM MF_USECHECKBITMAPS}
-
- MF_STRING = $00000000;
- {$EXTERNALSYM MF_STRING}
- MF_BITMAP = $00000004;
- {$EXTERNALSYM MF_BITMAP}
- MF_OWNERDRAW = $00000100;
- {$EXTERNALSYM MF_OWNERDRAW}
-
- MF_POPUP = $00000010;
- {$EXTERNALSYM MF_POPUP}
- MF_MENUBARBREAK = $00000020;
- {$EXTERNALSYM MF_MENUBARBREAK}
- MF_MENUBREAK = $00000040;
- {$EXTERNALSYM MF_MENUBREAK}
-
- MF_UNHILITE = $00000000;
- {$EXTERNALSYM MF_UNHILITE}
- MF_HILITE = $00000080;
- {$EXTERNALSYM MF_HILITE}
-
- MF_DEFAULT = $00001000;
- {$EXTERNALSYM MF_DEFAULT}
- MF_SYSMENU = $00002000;
- {$EXTERNALSYM MF_SYSMENU}
- MF_HELP = $00004000;
- {$EXTERNALSYM MF_HELP}
- MF_RIGHTJUSTIFY = $00004000;
- {$EXTERNALSYM MF_RIGHTJUSTIFY}
-
- MF_MOUSESELECT = $00008000;
- {$EXTERNALSYM MF_MOUSESELECT}
- MF_END = $00000080; // Obsolete -- only used by old RES files
- {$EXTERNALSYM MF_END}
-
- MFT_STRING = MF_STRING;
- {$EXTERNALSYM MFT_STRING}
- MFT_BITMAP = MF_BITMAP;
- {$EXTERNALSYM MFT_BITMAP}
- MFT_MENUBARBREAK = MF_MENUBARBREAK;
- {$EXTERNALSYM MFT_MENUBARBREAK}
- MFT_MENUBREAK = MF_MENUBREAK;
- {$EXTERNALSYM MFT_MENUBREAK}
- MFT_OWNERDRAW = MF_OWNERDRAW;
- {$EXTERNALSYM MFT_OWNERDRAW}
- MFT_RADIOCHECK = $00000200;
- {$EXTERNALSYM MFT_RADIOCHECK}
- MFT_SEPARATOR = MF_SEPARATOR;
- {$EXTERNALSYM MFT_SEPARATOR}
- MFT_RIGHTORDER = $00002000;
- {$EXTERNALSYM MFT_RIGHTORDER}
- MFT_RIGHTJUSTIFY = MF_RIGHTJUSTIFY;
- {$EXTERNALSYM MFT_RIGHTJUSTIFY}
-
-// Menu flags for Add/Check/EnableMenuItem()
-
- MFS_GRAYED = $00000003;
- {$EXTERNALSYM MFS_GRAYED}
- MFS_DISABLED = MFS_GRAYED;
- {$EXTERNALSYM MFS_DISABLED}
- MFS_CHECKED = MF_CHECKED;
- {$EXTERNALSYM MFS_CHECKED}
- MFS_HILITE = MF_HILITE;
- {$EXTERNALSYM MFS_HILITE}
- MFS_ENABLED = MF_ENABLED;
- {$EXTERNALSYM MFS_ENABLED}
- MFS_UNCHECKED = MF_UNCHECKED;
- {$EXTERNALSYM MFS_UNCHECKED}
- MFS_UNHILITE = MF_UNHILITE;
- {$EXTERNALSYM MFS_UNHILITE}
- MFS_DEFAULT = MF_DEFAULT;
- {$EXTERNALSYM MFS_DEFAULT}
-
-function CheckMenuRadioItem(hmenu: HMENU; idFirst, idLast, idCheck, uFlags: UINT): BOOL; stdcall;
-{$EXTERNALSYM CheckMenuRadioItem}
-
-//
-// Menu item resource format
-//
-
-type
- PMENUITEMTEMPLATEHEADER = ^MENUITEMTEMPLATEHEADER;
- MENUITEMTEMPLATEHEADER = record
- versionNumber: WORD;
- offset: WORD;
- end;
- {$EXTERNALSYM MENUITEMTEMPLATEHEADER}
- TMenuItemTemplateHeader = MENUITEMTEMPLATEHEADER;
-
- PMENUITEMTEMPLATE = ^MENUITEMTEMPLATE; // version 0
- MENUITEMTEMPLATE = record
- mtOption: WORD;
- mtID: WORD;
- mtString: array [0..0] of WCHAR;
- end;
- {$EXTERNALSYM MENUITEMTEMPLATE}
- TMenuItemTemplate = MENUITEMTEMPLATE;
-
-//
-// System Menu Command Values
-//
-
-const
- SC_SIZE = $F000;
- {$EXTERNALSYM SC_SIZE}
- SC_MOVE = $F010;
- {$EXTERNALSYM SC_MOVE}
- SC_MINIMIZE = $F020;
- {$EXTERNALSYM SC_MINIMIZE}
- SC_MAXIMIZE = $F030;
- {$EXTERNALSYM SC_MAXIMIZE}
- SC_NEXTWINDOW = $F040;
- {$EXTERNALSYM SC_NEXTWINDOW}
- SC_PREVWINDOW = $F050;
- {$EXTERNALSYM SC_PREVWINDOW}
- SC_CLOSE = $F060;
- {$EXTERNALSYM SC_CLOSE}
- SC_VSCROLL = $F070;
- {$EXTERNALSYM SC_VSCROLL}
- SC_HSCROLL = $F080;
- {$EXTERNALSYM SC_HSCROLL}
- SC_MOUSEMENU = $F090;
- {$EXTERNALSYM SC_MOUSEMENU}
- SC_KEYMENU = $F100;
- {$EXTERNALSYM SC_KEYMENU}
- SC_ARRANGE = $F110;
- {$EXTERNALSYM SC_ARRANGE}
- SC_RESTORE = $F120;
- {$EXTERNALSYM SC_RESTORE}
- SC_TASKLIST = $F130;
- {$EXTERNALSYM SC_TASKLIST}
- SC_SCREENSAVE = $F140;
- {$EXTERNALSYM SC_SCREENSAVE}
- SC_HOTKEY = $F150;
- {$EXTERNALSYM SC_HOTKEY}
- SC_DEFAULT = $F160;
- {$EXTERNALSYM SC_DEFAULT}
- SC_MONITORPOWER = $F170;
- {$EXTERNALSYM SC_MONITORPOWER}
- SC_CONTEXTHELP = $F180;
- {$EXTERNALSYM SC_CONTEXTHELP}
- SC_SEPARATOR = $F00F;
- {$EXTERNALSYM SC_SEPARATOR}
-
-//
-// Obsolete names
-//
-
-const
- SC_ICON = SC_MINIMIZE;
- {$EXTERNALSYM SC_ICON}
- SC_ZOOM = SC_MAXIMIZE;
- {$EXTERNALSYM SC_ZOOM}
-
-//
-// Resource Loading Routines
-//
-
-function LoadBitmapA(hInstance: HINSTANCE; lpBitmapName: LPCSTR): HBITMAP; stdcall;
-{$EXTERNALSYM LoadBitmapA}
-function LoadBitmapW(hInstance: HINSTANCE; lpBitmapName: LPCWSTR): HBITMAP; stdcall;
-{$EXTERNALSYM LoadBitmapW}
-function LoadBitmap(hInstance: HINSTANCE; lpBitmapName: LPCTSTR): HBITMAP; stdcall;
-{$EXTERNALSYM LoadBitmap}
-
-function LoadCursorA(hInstance: HINSTANCE; lpCursorName: LPCSTR): HCURSOR; stdcall;
-{$EXTERNALSYM LoadCursorA}
-function LoadCursorW(hInstance: HINSTANCE; lpCursorName: LPCWSTR): HCURSOR; stdcall;
-{$EXTERNALSYM LoadCursorW}
-function LoadCursor(hInstance: HINSTANCE; lpCursorName: LPCTSTR): HCURSOR; stdcall;
-{$EXTERNALSYM LoadCursor}
-
-function LoadCursorFromFileA(lpFileName: LPCSTR): HCURSOR; stdcall;
-{$EXTERNALSYM LoadCursorFromFileA}
-function LoadCursorFromFileW(lpFileName: LPCWSTR): HCURSOR; stdcall;
-{$EXTERNALSYM LoadCursorFromFileW}
-function LoadCursorFromFile(lpFileName: LPCTSTR): HCURSOR; stdcall;
-{$EXTERNALSYM LoadCursorFromFile}
-
-function CreateCursor(hInst: HINSTANCE; xHotSpot, yHotSpot, nWidth, nHeight: Integer;
- pvANDPlane: PVOID; pvXORPlane: PVOID): HCURSOR; stdcall;
-{$EXTERNALSYM CreateCursor}
-
-function DestroyCursor(hCursor: HCURSOR): BOOL; stdcall;
-{$EXTERNALSYM DestroyCursor}
-
-function CopyCursor(pcur: HCURSOR): HCURSOR;
-{$EXTERNALSYM CopyCursor}
-
-//
-// Standard Cursor IDs
-//
-
-const
- IDC_ARROW = MAKEINTRESOURCE(32512);
- {$EXTERNALSYM IDC_ARROW}
- IDC_IBEAM = MAKEINTRESOURCE(32513);
- {$EXTERNALSYM IDC_IBEAM}
- IDC_WAIT = MAKEINTRESOURCE(32514);
- {$EXTERNALSYM IDC_WAIT}
- IDC_CROSS = MAKEINTRESOURCE(32515);
- {$EXTERNALSYM IDC_CROSS}
- IDC_UPARROW = MAKEINTRESOURCE(32516);
- {$EXTERNALSYM IDC_UPARROW}
- IDC_SIZE = MAKEINTRESOURCE(32640); // OBSOLETE: use IDC_SIZEALL
- {$EXTERNALSYM IDC_SIZE}
- IDC_ICON = MAKEINTRESOURCE(32641); // OBSOLETE: use IDC_ARROW
- {$EXTERNALSYM IDC_ICON}
- IDC_SIZENWSE = MAKEINTRESOURCE(32642);
- {$EXTERNALSYM IDC_SIZENWSE}
- IDC_SIZENESW = MAKEINTRESOURCE(32643);
- {$EXTERNALSYM IDC_SIZENESW}
- IDC_SIZEWE = MAKEINTRESOURCE(32644);
- {$EXTERNALSYM IDC_SIZEWE}
- IDC_SIZENS = MAKEINTRESOURCE(32645);
- {$EXTERNALSYM IDC_SIZENS}
- IDC_SIZEALL = MAKEINTRESOURCE(32646);
- {$EXTERNALSYM IDC_SIZEALL}
- IDC_NO = MAKEINTRESOURCE(32648); // not in win3.1
- {$EXTERNALSYM IDC_NO}
- IDC_HAND = MAKEINTRESOURCE(32649);
- {$EXTERNALSYM IDC_HAND}
- IDC_APPSTARTING = MAKEINTRESOURCE(32650); // not in win3.1
- {$EXTERNALSYM IDC_APPSTARTING}
- IDC_HELP = MAKEINTRESOURCE(32651);
- {$EXTERNALSYM IDC_HELP}
-
-function SetSystemCursor(hcur: HCURSOR; id: DWORD): BOOL; stdcall;
-{$EXTERNALSYM SetSystemCursor}
-
-type
- PICONINFO = ^ICONINFO;
- _ICONINFO = record
- fIcon: BOOL;
- xHotspot: DWORD;
- yHotspot: DWORD;
- hbmMask: HBITMAP;
- hbmColor: HBITMAP;
- end;
- {$EXTERNALSYM _ICONINFO}
- ICONINFO = _ICONINFO;
- {$EXTERNALSYM ICONINFO}
- TIconInfo = ICONINFO;
-
-function LoadIconA(hInstance: HINSTANCE; lpIconName: LPCSTR): HICON; stdcall;
-{$EXTERNALSYM LoadIconA}
-function LoadIconW(hInstance: HINSTANCE; lpIconName: LPCWSTR): HICON; stdcall;
-{$EXTERNALSYM LoadIconW}
-function LoadIcon(hInstance: HINSTANCE; lpIconName: LPCTSTR): HICON; stdcall;
-{$EXTERNALSYM LoadIcon}
-
-function PrivateExtractIconsA(szFileName: LPCSTR; nIconIndex, cxIcon, cyIcon: Integer; var phicon: HICON;
- var piconid: UINT; nIcons, flags: UINT): UINT; stdcall;
-{$EXTERNALSYM PrivateExtractIconsA}
-function PrivateExtractIconsW(szFileName: LPCWSTR; nIconIndex, cxIcon, cyIcon: Integer; var phicon: HICON;
- var piconid: UINT; nIcons, flags: UINT): UINT; stdcall;
-{$EXTERNALSYM PrivateExtractIconsW}
-function PrivateExtractIcons(szFileName: LPCTSTR; nIconIndex, cxIcon, cyIcon: Integer; var phicon: HICON;
- var piconid: UINT; nIcons, flags: UINT): UINT; stdcall;
-{$EXTERNALSYM PrivateExtractIcons}
-
-function CreateIcon(hInstance: HINSTANCE; nWidth, nHeight: Integer; cPlanes,
- cBitsPixel: BYTE; lpbANDbits: LPBYTE; lpbXORbits: LPBYTE): HICON; stdcall;
-{$EXTERNALSYM CreateIcon}
-
-function DestroyIcon(hIcon: HICON): BOOL; stdcall;
-{$EXTERNALSYM DestroyIcon}
-
-function LookupIconIdFromDirectory(presbits: PBYTE; fIcon: BOOL): Integer; stdcall;
-{$EXTERNALSYM LookupIconIdFromDirectory}
-
-function LookupIconIdFromDirectoryEx(presbits: PBYTE; fIcon: BOOL;
- cxDesired, cyDesired: Integer; Flags: UINT): Integer; stdcall;
-{$EXTERNALSYM LookupIconIdFromDirectoryEx}
-
-function CreateIconFromResource(presbits: PBYTE; dwResSize: DWORD;
- fIcon: BOOL; dwVer: DWORD): HICON; stdcall;
-{$EXTERNALSYM CreateIconFromResource}
-
-function CreateIconFromResourceEx(presbits: PBYTE; dwResSize: DWORD; fIcon: BOOL;
- dwVer: DWORD; cxDesired, cyDesired: Integer; Flags: UINT): HICON; stdcall;
-{$EXTERNALSYM CreateIconFromResourceEx}
-
-// Icon/Cursor header//
-
-type
- LPCURSORSHAPE = ^CURSORSHAPE;
- {$EXTERNALSYM LPCURSORSHAPE}
- tagCURSORSHAPE = record
- xHotSpot: Integer;
- yHotSpot: Integer;
- cx: Integer;
- cy: Integer;
- cbWidth: Integer;
- Planes: BYTE;
- BitsPixel: BYTE;
- end;
- {$EXTERNALSYM tagCURSORSHAPE}
- CURSORSHAPE = tagCURSORSHAPE;
- {$EXTERNALSYM CURSORSHAPE}
- TCursorShape = CURSORSHAPE;
- PCursorShape = LPCURSORSHAPE;
-
-const
- IMAGE_BITMAP = 0;
- {$EXTERNALSYM IMAGE_BITMAP}
- IMAGE_ICON = 1;
- {$EXTERNALSYM IMAGE_ICON}
- IMAGE_CURSOR = 2;
- {$EXTERNALSYM IMAGE_CURSOR}
- IMAGE_ENHMETAFILE = 3;
- {$EXTERNALSYM IMAGE_ENHMETAFILE}
-
- LR_DEFAULTCOLOR = $0000;
- {$EXTERNALSYM LR_DEFAULTCOLOR}
- LR_MONOCHROME = $0001;
- {$EXTERNALSYM LR_MONOCHROME}
- LR_COLOR = $0002;
- {$EXTERNALSYM LR_COLOR}
- LR_COPYRETURNORG = $0004;
- {$EXTERNALSYM LR_COPYRETURNORG}
- LR_COPYDELETEORG = $0008;
- {$EXTERNALSYM LR_COPYDELETEORG}
- LR_LOADFROMFILE = $0010;
- {$EXTERNALSYM LR_LOADFROMFILE}
- LR_LOADTRANSPARENT = $0020;
- {$EXTERNALSYM LR_LOADTRANSPARENT}
- LR_DEFAULTSIZE = $0040;
- {$EXTERNALSYM LR_DEFAULTSIZE}
- LR_VGACOLOR = $0080;
- {$EXTERNALSYM LR_VGACOLOR}
- LR_LOADMAP3DCOLORS = $1000;
- {$EXTERNALSYM LR_LOADMAP3DCOLORS}
- LR_CREATEDIBSECTION = $2000;
- {$EXTERNALSYM LR_CREATEDIBSECTION}
- LR_COPYFROMRESOURCE = $4000;
- {$EXTERNALSYM LR_COPYFROMRESOURCE}
- LR_SHARED = $8000;
- {$EXTERNALSYM LR_SHARED}
-
-function LoadImageA(hinst: HINSTANCE; lpszName: LPCSTR; uType: UINT;
- cxDesired, cyDesired: Integer; fuLoad: UINT): HANDLE; stdcall;
-{$EXTERNALSYM LoadImageA}
-function LoadImageW(hinst: HINSTANCE; lpszName: LPCWSTR; uType: UINT;
- cxDesired, cyDesired: Integer; fuLoad: UINT): HANDLE; stdcall;
-{$EXTERNALSYM LoadImageW}
-function LoadImage(hinst: HINSTANCE; lpszName: LPCTSTR; uType: UINT;
- cxDesired, cyDesired: Integer; fuLoad: UINT): HANDLE; stdcall;
-{$EXTERNALSYM LoadImage}
-
-function CopyImage(hinst: HANDLE; lpszName: UINT; cxDesired, cyDesired: Integer;
- fuFlags: UINT): HANDLE; stdcall;
-{$EXTERNALSYM CopyImage}
-
-const
- DI_MASK = $0001;
- {$EXTERNALSYM DI_MASK}
- DI_IMAGE = $0002;
- {$EXTERNALSYM DI_IMAGE}
- DI_NORMAL = $0003;
- {$EXTERNALSYM DI_NORMAL}
- DI_COMPAT = $0004;
- {$EXTERNALSYM DI_COMPAT}
- DI_DEFAULTSIZE = $0008;
- {$EXTERNALSYM DI_DEFAULTSIZE}
- DI_NOMIRROR = $0010;
- {$EXTERNALSYM DI_NOMIRROR}
-
-function DrawIconEx(hdc: HDC; xLeft, yTop: Integer; hIcon: HICON;
- cxWidth, cyWidth: Integer; istepIfAniCur: UINT; hbrFlickerFreeDraw: HBRUSH;
- diFlags: UINT): BOOL; stdcall;
-{$EXTERNALSYM DrawIconEx}
-
-function CreateIconIndirect(const piconinfo: ICONINFO): HICON; stdcall;
-{$EXTERNALSYM CreateIconIndirect}
-
-function CopyIcon(hIcon: HICON): HICON; stdcall;
-{$EXTERNALSYM CopyIcon}
-
-function GetIconInfo(hIcon: HICON; var piconinfo: ICONINFO): BOOL; stdcall;
-{$EXTERNALSYM GetIconInfo}
-
-const
- RES_ICON = 1;
- {$EXTERNALSYM RES_ICON}
- RES_CURSOR = 2;
- {$EXTERNALSYM RES_CURSOR}
-
-//
-// OEM Resource Ordinal Numbers
-//
-
- OBM_CLOSE = 32754;
- {$EXTERNALSYM OBM_CLOSE}
- OBM_UPARROW = 32753;
- {$EXTERNALSYM OBM_UPARROW}
- OBM_DNARROW = 32752;
- {$EXTERNALSYM OBM_DNARROW}
- OBM_RGARROW = 32751;
- {$EXTERNALSYM OBM_RGARROW}
- OBM_LFARROW = 32750;
- {$EXTERNALSYM OBM_LFARROW}
- OBM_REDUCE = 32749;
- {$EXTERNALSYM OBM_REDUCE}
- OBM_ZOOM = 32748;
- {$EXTERNALSYM OBM_ZOOM}
- OBM_RESTORE = 32747;
- {$EXTERNALSYM OBM_RESTORE}
- OBM_REDUCED = 32746;
- {$EXTERNALSYM OBM_REDUCED}
- OBM_ZOOMD = 32745;
- {$EXTERNALSYM OBM_ZOOMD}
- OBM_RESTORED = 32744;
- {$EXTERNALSYM OBM_RESTORED}
- OBM_UPARROWD = 32743;
- {$EXTERNALSYM OBM_UPARROWD}
- OBM_DNARROWD = 32742;
- {$EXTERNALSYM OBM_DNARROWD}
- OBM_RGARROWD = 32741;
- {$EXTERNALSYM OBM_RGARROWD}
- OBM_LFARROWD = 32740;
- {$EXTERNALSYM OBM_LFARROWD}
- OBM_MNARROW = 32739;
- {$EXTERNALSYM OBM_MNARROW}
- OBM_COMBO = 32738;
- {$EXTERNALSYM OBM_COMBO}
- OBM_UPARROWI = 32737;
- {$EXTERNALSYM OBM_UPARROWI}
- OBM_DNARROWI = 32736;
- {$EXTERNALSYM OBM_DNARROWI}
- OBM_RGARROWI = 32735;
- {$EXTERNALSYM OBM_RGARROWI}
- OBM_LFARROWI = 32734;
- {$EXTERNALSYM OBM_LFARROWI}
-
- OBM_OLD_CLOSE = 32767;
- {$EXTERNALSYM OBM_OLD_CLOSE}
- OBM_SIZE = 32766;
- {$EXTERNALSYM OBM_SIZE}
- OBM_OLD_UPARROW = 32765;
- {$EXTERNALSYM OBM_OLD_UPARROW}
- OBM_OLD_DNARROW = 32764;
- {$EXTERNALSYM OBM_OLD_DNARROW}
- OBM_OLD_RGARROW = 32763;
- {$EXTERNALSYM OBM_OLD_RGARROW}
- OBM_OLD_LFARROW = 32762;
- {$EXTERNALSYM OBM_OLD_LFARROW}
- OBM_BTSIZE = 32761;
- {$EXTERNALSYM OBM_BTSIZE}
- OBM_CHECK = 32760;
- {$EXTERNALSYM OBM_CHECK}
- OBM_CHECKBOXES = 32759;
- {$EXTERNALSYM OBM_CHECKBOXES}
- OBM_BTNCORNERS = 32758;
- {$EXTERNALSYM OBM_BTNCORNERS}
- OBM_OLD_REDUCE = 32757;
- {$EXTERNALSYM OBM_OLD_REDUCE}
- OBM_OLD_ZOOM = 32756;
- {$EXTERNALSYM OBM_OLD_ZOOM}
- OBM_OLD_RESTORE = 32755;
- {$EXTERNALSYM OBM_OLD_RESTORE}
-
- OCR_NORMAL = 32512;
- {$EXTERNALSYM OCR_NORMAL}
- OCR_IBEAM = 32513;
- {$EXTERNALSYM OCR_IBEAM}
- OCR_WAIT = 32514;
- {$EXTERNALSYM OCR_WAIT}
- OCR_CROSS = 32515;
- {$EXTERNALSYM OCR_CROSS}
- OCR_UP = 32516;
- {$EXTERNALSYM OCR_UP}
- OCR_SIZE = 32640; // OBSOLETE: use OCR_SIZEALL
- {$EXTERNALSYM OCR_SIZE}
- OCR_ICON = 32641; // OBSOLETE: use OCR_NORMAL
- {$EXTERNALSYM OCR_ICON}
- OCR_SIZENWSE = 32642;
- {$EXTERNALSYM OCR_SIZENWSE}
- OCR_SIZENESW = 32643;
- {$EXTERNALSYM OCR_SIZENESW}
- OCR_SIZEWE = 32644;
- {$EXTERNALSYM OCR_SIZEWE}
- OCR_SIZENS = 32645;
- {$EXTERNALSYM OCR_SIZENS}
- OCR_SIZEALL = 32646;
- {$EXTERNALSYM OCR_SIZEALL}
- OCR_ICOCUR = 32647; // OBSOLETE: use OIC_WINLOGO
- {$EXTERNALSYM OCR_ICOCUR}
- OCR_NO = 32648;
- {$EXTERNALSYM OCR_NO}
- OCR_HAND = 32649;
- {$EXTERNALSYM OCR_HAND}
- OCR_APPSTARTING = 32650;
- {$EXTERNALSYM OCR_APPSTARTING}
-
- OIC_SAMPLE = 32512;
- {$EXTERNALSYM OIC_SAMPLE}
- OIC_HAND = 32513;
- {$EXTERNALSYM OIC_HAND}
- OIC_QUES = 32514;
- {$EXTERNALSYM OIC_QUES}
- OIC_BANG = 32515;
- {$EXTERNALSYM OIC_BANG}
- OIC_NOTE = 32516;
- {$EXTERNALSYM OIC_NOTE}
- OIC_WINLOGO = 32517;
- {$EXTERNALSYM OIC_WINLOGO}
- OIC_WARNING = OIC_BANG;
- {$EXTERNALSYM OIC_WARNING}
- OIC_ERROR = OIC_HAND;
- {$EXTERNALSYM OIC_ERROR}
- OIC_INFORMATION = OIC_NOTE;
- {$EXTERNALSYM OIC_INFORMATION}
-
- ORD_LANGDRIVER = 1; // The ordinal number for the entry point of language drivers.
- {$EXTERNALSYM ORD_LANGDRIVER}
-
-//
-// Standard Icon IDs
-//
-
- IDI_APPLICATION = MAKEINTRESOURCE(32512);
- {$EXTERNALSYM IDI_APPLICATION}
- IDI_HAND = MAKEINTRESOURCE(32513);
- {$EXTERNALSYM IDI_HAND}
- IDI_QUESTION = MAKEINTRESOURCE(32514);
- {$EXTERNALSYM IDI_QUESTION}
- IDI_EXCLAMATION = MAKEINTRESOURCE(32515);
- {$EXTERNALSYM IDI_EXCLAMATION}
- IDI_ASTERISK = MAKEINTRESOURCE(32516);
- {$EXTERNALSYM IDI_ASTERISK}
- IDI_WINLOGO = MAKEINTRESOURCE(32517);
- {$EXTERNALSYM IDI_WINLOGO}
-
- IDI_WARNING = IDI_EXCLAMATION;
- {$EXTERNALSYM IDI_WARNING}
- IDI_ERROR = IDI_HAND;
- {$EXTERNALSYM IDI_ERROR}
- IDI_INFORMATION = IDI_ASTERISK;
- {$EXTERNALSYM IDI_INFORMATION}
-
-function LoadStringA(hInstance: HINSTANCE; uID: UINT; lpBuffer: LPSTR;
- nBufferMax: Integer): Integer; stdcall;
-{$EXTERNALSYM LoadStringA}
-function LoadStringW(hInstance: HINSTANCE; uID: UINT; lpBuffer: LPWSTR;
- nBufferMax: Integer): Integer; stdcall;
-{$EXTERNALSYM LoadStringW}
-function LoadString(hInstance: HINSTANCE; uID: UINT; lpBuffer: LPTSTR;
- nBufferMax: Integer): Integer; stdcall;
-{$EXTERNALSYM LoadString}
-
-//
-// Dialog Box Command IDs
-//
-
-const
- IDOK = 1;
- {$EXTERNALSYM IDOK}
- IDCANCEL = 2;
- {$EXTERNALSYM IDCANCEL}
- IDABORT = 3;
- {$EXTERNALSYM IDABORT}
- IDRETRY = 4;
- {$EXTERNALSYM IDRETRY}
- IDIGNORE = 5;
- {$EXTERNALSYM IDIGNORE}
- IDYES = 6;
- {$EXTERNALSYM IDYES}
- IDNO = 7;
- {$EXTERNALSYM IDNO}
- IDCLOSE = 8;
- {$EXTERNALSYM IDCLOSE}
- IDHELP = 9;
- {$EXTERNALSYM IDHELP}
-
- IDTRYAGAIN = 10;
- {$EXTERNALSYM IDTRYAGAIN}
- IDCONTINUE = 11;
- {$EXTERNALSYM IDCONTINUE}
-
- IDTIMEOUT = 32000;
- {$EXTERNALSYM IDTIMEOUT}
-
-//
-// Control Manager Structures and Definitions
-//
-
-//
-// Edit Control Styles
-//
-
- ES_LEFT = $0000;
- {$EXTERNALSYM ES_LEFT}
- ES_CENTER = $0001;
- {$EXTERNALSYM ES_CENTER}
- ES_RIGHT = $0002;
- {$EXTERNALSYM ES_RIGHT}
- ES_MULTILINE = $0004;
- {$EXTERNALSYM ES_MULTILINE}
- ES_UPPERCASE = $0008;
- {$EXTERNALSYM ES_UPPERCASE}
- ES_LOWERCASE = $0010;
- {$EXTERNALSYM ES_LOWERCASE}
- ES_PASSWORD = $0020;
- {$EXTERNALSYM ES_PASSWORD}
- ES_AUTOVSCROLL = $0040;
- {$EXTERNALSYM ES_AUTOVSCROLL}
- ES_AUTOHSCROLL = $0080;
- {$EXTERNALSYM ES_AUTOHSCROLL}
- ES_NOHIDESEL = $0100;
- {$EXTERNALSYM ES_NOHIDESEL}
- ES_OEMCONVERT = $0400;
- {$EXTERNALSYM ES_OEMCONVERT}
- ES_READONLY = $0800;
- {$EXTERNALSYM ES_READONLY}
- ES_WANTRETURN = $1000;
- {$EXTERNALSYM ES_WANTRETURN}
- ES_NUMBER = $2000;
- {$EXTERNALSYM ES_NUMBER}
-
-//
-// Edit Control Notification Codes
-//
-
- EN_SETFOCUS = $0100;
- {$EXTERNALSYM EN_SETFOCUS}
- EN_KILLFOCUS = $0200;
- {$EXTERNALSYM EN_KILLFOCUS}
- EN_CHANGE = $0300;
- {$EXTERNALSYM EN_CHANGE}
- EN_UPDATE = $0400;
- {$EXTERNALSYM EN_UPDATE}
- EN_ERRSPACE = $0500;
- {$EXTERNALSYM EN_ERRSPACE}
- EN_MAXTEXT = $0501;
- {$EXTERNALSYM EN_MAXTEXT}
- EN_HSCROLL = $0601;
- {$EXTERNALSYM EN_HSCROLL}
- EN_VSCROLL = $0602;
- {$EXTERNALSYM EN_VSCROLL}
-
- EN_ALIGN_LTR_EC = $0700;
- {$EXTERNALSYM EN_ALIGN_LTR_EC}
- EN_ALIGN_RTL_EC = $0701;
- {$EXTERNALSYM EN_ALIGN_RTL_EC}
-
-// Edit control EM_SETMARGIN parameters//
-
- EC_LEFTMARGIN = $0001;
- {$EXTERNALSYM EC_LEFTMARGIN}
- EC_RIGHTMARGIN = $0002;
- {$EXTERNALSYM EC_RIGHTMARGIN}
- EC_USEFONTINFO = $ffff;
- {$EXTERNALSYM EC_USEFONTINFO}
-
-// wParam of EM_GET/SETIMESTATUS //
-
- EMSIS_COMPOSITIONSTRING = $0001;
- {$EXTERNALSYM EMSIS_COMPOSITIONSTRING}
-
-// lParam for EMSIS_COMPOSITIONSTRING //
-
- EIMES_GETCOMPSTRATONCE = $0001;
- {$EXTERNALSYM EIMES_GETCOMPSTRATONCE}
- EIMES_CANCELCOMPSTRINFOCUS = $0002;
- {$EXTERNALSYM EIMES_CANCELCOMPSTRINFOCUS}
- EIMES_COMPLETECOMPSTRKILLFOCUS = $0004;
- {$EXTERNALSYM EIMES_COMPLETECOMPSTRKILLFOCUS}
-
-//
-// Edit Control Messages
-//
-
- EM_GETSEL = $00B0;
- {$EXTERNALSYM EM_GETSEL}
- EM_SETSEL = $00B1;
- {$EXTERNALSYM EM_SETSEL}
- EM_GETRECT = $00B2;
- {$EXTERNALSYM EM_GETRECT}
- EM_SETRECT = $00B3;
- {$EXTERNALSYM EM_SETRECT}
- EM_SETRECTNP = $00B4;
- {$EXTERNALSYM EM_SETRECTNP}
- EM_SCROLL = $00B5;
- {$EXTERNALSYM EM_SCROLL}
- EM_LINESCROLL = $00B6;
- {$EXTERNALSYM EM_LINESCROLL}
- EM_SCROLLCARET = $00B7;
- {$EXTERNALSYM EM_SCROLLCARET}
- EM_GETMODIFY = $00B8;
- {$EXTERNALSYM EM_GETMODIFY}
- EM_SETMODIFY = $00B9;
- {$EXTERNALSYM EM_SETMODIFY}
- EM_GETLINECOUNT = $00BA;
- {$EXTERNALSYM EM_GETLINECOUNT}
- EM_LINEINDEX = $00BB;
- {$EXTERNALSYM EM_LINEINDEX}
- EM_SETHANDLE = $00BC;
- {$EXTERNALSYM EM_SETHANDLE}
- EM_GETHANDLE = $00BD;
- {$EXTERNALSYM EM_GETHANDLE}
- EM_GETTHUMB = $00BE;
- {$EXTERNALSYM EM_GETTHUMB}
- EM_LINELENGTH = $00C1;
- {$EXTERNALSYM EM_LINELENGTH}
- EM_REPLACESEL = $00C2;
- {$EXTERNALSYM EM_REPLACESEL}
- EM_GETLINE = $00C4;
- {$EXTERNALSYM EM_GETLINE}
- EM_LIMITTEXT = $00C5;
- {$EXTERNALSYM EM_LIMITTEXT}
- EM_CANUNDO = $00C6;
- {$EXTERNALSYM EM_CANUNDO}
- EM_UNDO = $00C7;
- {$EXTERNALSYM EM_UNDO}
- EM_FMTLINES = $00C8;
- {$EXTERNALSYM EM_FMTLINES}
- EM_LINEFROMCHAR = $00C9;
- {$EXTERNALSYM EM_LINEFROMCHAR}
- EM_SETTABSTOPS = $00CB;
- {$EXTERNALSYM EM_SETTABSTOPS}
- EM_SETPASSWORDCHAR = $00CC;
- {$EXTERNALSYM EM_SETPASSWORDCHAR}
- EM_EMPTYUNDOBUFFER = $00CD;
- {$EXTERNALSYM EM_EMPTYUNDOBUFFER}
- EM_GETFIRSTVISIBLELINE = $00CE;
- {$EXTERNALSYM EM_GETFIRSTVISIBLELINE}
- EM_SETREADONLY = $00CF;
- {$EXTERNALSYM EM_SETREADONLY}
- EM_SETWORDBREAKPROC = $00D0;
- {$EXTERNALSYM EM_SETWORDBREAKPROC}
- EM_GETWORDBREAKPROC = $00D1;
- {$EXTERNALSYM EM_GETWORDBREAKPROC}
- EM_GETPASSWORDCHAR = $00D2;
- {$EXTERNALSYM EM_GETPASSWORDCHAR}
- EM_SETMARGINS = $00D3;
- {$EXTERNALSYM EM_SETMARGINS}
- EM_GETMARGINS = $00D4;
- {$EXTERNALSYM EM_GETMARGINS}
- EM_SETLIMITTEXT = EM_LIMITTEXT; // ;win40 Name change
- {$EXTERNALSYM EM_SETLIMITTEXT}
- EM_GETLIMITTEXT = $00D5;
- {$EXTERNALSYM EM_GETLIMITTEXT}
- EM_POSFROMCHAR = $00D6;
- {$EXTERNALSYM EM_POSFROMCHAR}
- EM_CHARFROMPOS = $00D7;
- {$EXTERNALSYM EM_CHARFROMPOS}
-
- EM_SETIMESTATUS = $00D8;
- {$EXTERNALSYM EM_SETIMESTATUS}
- EM_GETIMESTATUS = $00D9;
- {$EXTERNALSYM EM_GETIMESTATUS}
-
-//
-// EDITWORDBREAKPROC code values
-//
-
- WB_LEFT = 0;
- {$EXTERNALSYM WB_LEFT}
- WB_RIGHT = 1;
- {$EXTERNALSYM WB_RIGHT}
- WB_ISDELIMITER = 2;
- {$EXTERNALSYM WB_ISDELIMITER}
-
-//
-// Button Control Styles
-//
-
- BS_PUSHBUTTON = $00000000;
- {$EXTERNALSYM BS_PUSHBUTTON}
- BS_DEFPUSHBUTTON = $00000001;
- {$EXTERNALSYM BS_DEFPUSHBUTTON}
- BS_CHECKBOX = $00000002;
- {$EXTERNALSYM BS_CHECKBOX}
- BS_AUTOCHECKBOX = $00000003;
- {$EXTERNALSYM BS_AUTOCHECKBOX}
- BS_RADIOBUTTON = $00000004;
- {$EXTERNALSYM BS_RADIOBUTTON}
- BS_3STATE = $00000005;
- {$EXTERNALSYM BS_3STATE}
- BS_AUTO3STATE = $00000006;
- {$EXTERNALSYM BS_AUTO3STATE}
- BS_GROUPBOX = $00000007;
- {$EXTERNALSYM BS_GROUPBOX}
- BS_USERBUTTON = $00000008;
- {$EXTERNALSYM BS_USERBUTTON}
- BS_AUTORADIOBUTTON = $00000009;
- {$EXTERNALSYM BS_AUTORADIOBUTTON}
- BS_PUSHBOX = $0000000A;
- {$EXTERNALSYM BS_PUSHBOX}
- BS_OWNERDRAW = $0000000B;
- {$EXTERNALSYM BS_OWNERDRAW}
- BS_TYPEMASK = $0000000F;
- {$EXTERNALSYM BS_TYPEMASK}
- BS_LEFTTEXT = $00000020;
- {$EXTERNALSYM BS_LEFTTEXT}
- BS_TEXT = $00000000;
- {$EXTERNALSYM BS_TEXT}
- BS_ICON = $00000040;
- {$EXTERNALSYM BS_ICON}
- BS_BITMAP = $00000080;
- {$EXTERNALSYM BS_BITMAP}
- BS_LEFT = $00000100;
- {$EXTERNALSYM BS_LEFT}
- BS_RIGHT = $00000200;
- {$EXTERNALSYM BS_RIGHT}
- BS_CENTER = $00000300;
- {$EXTERNALSYM BS_CENTER}
- BS_TOP = $00000400;
- {$EXTERNALSYM BS_TOP}
- BS_BOTTOM = $00000800;
- {$EXTERNALSYM BS_BOTTOM}
- BS_VCENTER = $00000C00;
- {$EXTERNALSYM BS_VCENTER}
- BS_PUSHLIKE = $00001000;
- {$EXTERNALSYM BS_PUSHLIKE}
- BS_MULTILINE = $00002000;
- {$EXTERNALSYM BS_MULTILINE}
- BS_NOTIFY = $00004000;
- {$EXTERNALSYM BS_NOTIFY}
- BS_FLAT = $00008000;
- {$EXTERNALSYM BS_FLAT}
- BS_RIGHTBUTTON = BS_LEFTTEXT;
- {$EXTERNALSYM BS_RIGHTBUTTON}
-
-//
-// User Button Notification Codes
-//
-
- BN_CLICKED = 0;
- {$EXTERNALSYM BN_CLICKED}
- BN_PAINT = 1;
- {$EXTERNALSYM BN_PAINT}
- BN_HILITE = 2;
- {$EXTERNALSYM BN_HILITE}
- BN_UNHILITE = 3;
- {$EXTERNALSYM BN_UNHILITE}
- BN_DISABLE = 4;
- {$EXTERNALSYM BN_DISABLE}
- BN_DOUBLECLICKED = 5;
- {$EXTERNALSYM BN_DOUBLECLICKED}
- BN_PUSHED = BN_HILITE;
- {$EXTERNALSYM BN_PUSHED}
- BN_UNPUSHED = BN_UNHILITE;
- {$EXTERNALSYM BN_UNPUSHED}
- BN_DBLCLK = BN_DOUBLECLICKED;
- {$EXTERNALSYM BN_DBLCLK}
- BN_SETFOCUS = 6;
- {$EXTERNALSYM BN_SETFOCUS}
- BN_KILLFOCUS = 7;
- {$EXTERNALSYM BN_KILLFOCUS}
-
-//
-// Button Control Messages
-//
-
- BM_GETCHECK = $00F0;
- {$EXTERNALSYM BM_GETCHECK}
- BM_SETCHECK = $00F1;
- {$EXTERNALSYM BM_SETCHECK}
- BM_GETSTATE = $00F2;
- {$EXTERNALSYM BM_GETSTATE}
- BM_SETSTATE = $00F3;
- {$EXTERNALSYM BM_SETSTATE}
- BM_SETSTYLE = $00F4;
- {$EXTERNALSYM BM_SETSTYLE}
- BM_CLICK = $00F5;
- {$EXTERNALSYM BM_CLICK}
- BM_GETIMAGE = $00F6;
- {$EXTERNALSYM BM_GETIMAGE}
- BM_SETIMAGE = $00F7;
- {$EXTERNALSYM BM_SETIMAGE}
-
- BST_UNCHECKED = $0000;
- {$EXTERNALSYM BST_UNCHECKED}
- BST_CHECKED = $0001;
- {$EXTERNALSYM BST_CHECKED}
- BST_INDETERMINATE = $0002;
- {$EXTERNALSYM BST_INDETERMINATE}
- BST_PUSHED = $0004;
- {$EXTERNALSYM BST_PUSHED}
- BST_FOCUS = $0008;
- {$EXTERNALSYM BST_FOCUS}
-
-//
-// Static Control Constants
-//
-
- SS_LEFT = $00000000;
- {$EXTERNALSYM SS_LEFT}
- SS_CENTER = $00000001;
- {$EXTERNALSYM SS_CENTER}
- SS_RIGHT = $00000002;
- {$EXTERNALSYM SS_RIGHT}
- SS_ICON = $00000003;
- {$EXTERNALSYM SS_ICON}
- SS_BLACKRECT = $00000004;
- {$EXTERNALSYM SS_BLACKRECT}
- SS_GRAYRECT = $00000005;
- {$EXTERNALSYM SS_GRAYRECT}
- SS_WHITERECT = $00000006;
- {$EXTERNALSYM SS_WHITERECT}
- SS_BLACKFRAME = $00000007;
- {$EXTERNALSYM SS_BLACKFRAME}
- SS_GRAYFRAME = $00000008;
- {$EXTERNALSYM SS_GRAYFRAME}
- SS_WHITEFRAME = $00000009;
- {$EXTERNALSYM SS_WHITEFRAME}
- SS_USERITEM = $0000000A;
- {$EXTERNALSYM SS_USERITEM}
- SS_SIMPLE = $0000000B;
- {$EXTERNALSYM SS_SIMPLE}
- SS_LEFTNOWORDWRAP = $0000000C;
- {$EXTERNALSYM SS_LEFTNOWORDWRAP}
- SS_OWNERDRAW = $0000000D;
- {$EXTERNALSYM SS_OWNERDRAW}
- SS_BITMAP = $0000000E;
- {$EXTERNALSYM SS_BITMAP}
- SS_ENHMETAFILE = $0000000F;
- {$EXTERNALSYM SS_ENHMETAFILE}
- SS_ETCHEDHORZ = $00000010;
- {$EXTERNALSYM SS_ETCHEDHORZ}
- SS_ETCHEDVERT = $00000011;
- {$EXTERNALSYM SS_ETCHEDVERT}
- SS_ETCHEDFRAME = $00000012;
- {$EXTERNALSYM SS_ETCHEDFRAME}
- SS_TYPEMASK = $0000001F;
- {$EXTERNALSYM SS_TYPEMASK}
- SS_REALSIZECONTROL = $00000040;
- {$EXTERNALSYM SS_REALSIZECONTROL}
- SS_NOPREFIX = $00000080; // Don't do "&" character translation
- {$EXTERNALSYM SS_NOPREFIX}
- SS_NOTIFY = $00000100;
- {$EXTERNALSYM SS_NOTIFY}
- SS_CENTERIMAGE = $00000200;
- {$EXTERNALSYM SS_CENTERIMAGE}
- SS_RIGHTJUST = $00000400;
- {$EXTERNALSYM SS_RIGHTJUST}
- SS_REALSIZEIMAGE = $00000800;
- {$EXTERNALSYM SS_REALSIZEIMAGE}
- SS_SUNKEN = $00001000;
- {$EXTERNALSYM SS_SUNKEN}
- SS_EDITCONTROL = $00002000;
- {$EXTERNALSYM SS_EDITCONTROL}
- SS_ENDELLIPSIS = $00004000;
- {$EXTERNALSYM SS_ENDELLIPSIS}
- SS_PATHELLIPSIS = $00008000;
- {$EXTERNALSYM SS_PATHELLIPSIS}
- SS_WORDELLIPSIS = $0000C000;
- {$EXTERNALSYM SS_WORDELLIPSIS}
- SS_ELLIPSISMASK = $0000C000;
- {$EXTERNALSYM SS_ELLIPSISMASK}
-
-//
-// Static Control Mesages
-//
-
- STM_SETICON = $0170;
- {$EXTERNALSYM STM_SETICON}
- STM_GETICON = $0171;
- {$EXTERNALSYM STM_GETICON}
- STM_SETIMAGE = $0172;
- {$EXTERNALSYM STM_SETIMAGE}
- STM_GETIMAGE = $0173;
- {$EXTERNALSYM STM_GETIMAGE}
- STN_CLICKED = 0;
- {$EXTERNALSYM STN_CLICKED}
- STN_DBLCLK = 1;
- {$EXTERNALSYM STN_DBLCLK}
- STN_ENABLE = 2;
- {$EXTERNALSYM STN_ENABLE}
- STN_DISABLE = 3;
- {$EXTERNALSYM STN_DISABLE}
- STM_MSGMAX = $0174;
- {$EXTERNALSYM STM_MSGMAX}
-
-//
-// Dialog window class
-//
-
- WC_DIALOG = MAKEINTATOM($8002);
- {$EXTERNALSYM WC_DIALOG}
-
-//
-// Get/SetWindowWord/Long offsets for use with WC_DIALOG windows
-//
-
- DWL_MSGRESULT = 0;
- {$EXTERNALSYM DWL_MSGRESULT}
- DWL_DLGPROC = 4;
- {$EXTERNALSYM DWL_DLGPROC}
- DWL_USER = 8;
- {$EXTERNALSYM DWL_USER}
-
- DWLP_MSGRESULT = 0;
- {$EXTERNALSYM DWLP_MSGRESULT}
- DWLP_DLGPROC = DWLP_MSGRESULT + SizeOf(LRESULT);
- {$EXTERNALSYM DWLP_DLGPROC}
- DWLP_USER = DWLP_DLGPROC + SizeOf(DLGPROC);
- {$EXTERNALSYM DWLP_USER}
-
-//
-// Dialog Manager Routines
-//
-
-function IsDialogMessageA(hDlg: HWND; const lpMsg: MSG): BOOL; stdcall;
-{$EXTERNALSYM IsDialogMessageA}
-function IsDialogMessageW(hDlg: HWND; const lpMsg: MSG): BOOL; stdcall;
-{$EXTERNALSYM IsDialogMessageW}
-function IsDialogMessage(hDlg: HWND; const lpMsg: MSG): BOOL; stdcall;
-{$EXTERNALSYM IsDialogMessage}
-
-function MapDialogRect(hDlg: HWND; var lpRect: RECT): BOOL; stdcall;
-{$EXTERNALSYM MapDialogRect}
-
-function DlgDirListA(hDlg: HWND; lpPathSpec: LPSTR; nIDListBox: Integer;
- nIDStaticPath: Integer; uFileType: UINT): Integer; stdcall;
-{$EXTERNALSYM DlgDirListA}
-function DlgDirListW(hDlg: HWND; lpPathSpec: LPWSTR; nIDListBox: Integer;
- nIDStaticPath: Integer; uFileType: UINT): Integer; stdcall;
-{$EXTERNALSYM DlgDirListW}
-function DlgDirList(hDlg: HWND; lpPathSpec: LPTSTR; nIDListBox: Integer;
- nIDStaticPath: Integer; uFileType: UINT): Integer; stdcall;
-{$EXTERNALSYM DlgDirList}
-
-//
-// DlgDirList, DlgDirListComboBox flags values
-//
-
-const
- DDL_READWRITE = $0000;
- {$EXTERNALSYM DDL_READWRITE}
- DDL_READONLY = $0001;
- {$EXTERNALSYM DDL_READONLY}
- DDL_HIDDEN = $0002;
- {$EXTERNALSYM DDL_HIDDEN}
- DDL_SYSTEM = $0004;
- {$EXTERNALSYM DDL_SYSTEM}
- DDL_DIRECTORY = $0010;
- {$EXTERNALSYM DDL_DIRECTORY}
- DDL_ARCHIVE = $0020;
- {$EXTERNALSYM DDL_ARCHIVE}
-
- DDL_POSTMSGS = $2000;
- {$EXTERNALSYM DDL_POSTMSGS}
- DDL_DRIVES = $4000;
- {$EXTERNALSYM DDL_DRIVES}
- DDL_EXCLUSIVE = $8000;
- {$EXTERNALSYM DDL_EXCLUSIVE}
-
-function DlgDirSelectExA(hDlg: HWND; lpString: LPSTR; nCount, nIDListBox: Integer): BOOL; stdcall;
-{$EXTERNALSYM DlgDirSelectExA}
-function DlgDirSelectExW(hDlg: HWND; lpString: LPWSTR; nCount, nIDListBox: Integer): BOOL; stdcall;
-{$EXTERNALSYM DlgDirSelectExW}
-function DlgDirSelectEx(hDlg: HWND; lpString: LPTSTR; nCount, nIDListBox: Integer): BOOL; stdcall;
-{$EXTERNALSYM DlgDirSelectEx}
-
-function DlgDirListComboBoxA(hDlg: HWND; lpPathSpec: LPSTR; nIDComboBox: Integer;
- nIDStaticPath: Integer; uFiletype: UINT): Integer; stdcall;
-{$EXTERNALSYM DlgDirListComboBoxA}
-function DlgDirListComboBoxW(hDlg: HWND; lpPathSpec: LPWSTR; nIDComboBox: Integer;
- nIDStaticPath: Integer; uFiletype: UINT): Integer; stdcall;
-{$EXTERNALSYM DlgDirListComboBoxW}
-function DlgDirListComboBox(hDlg: HWND; lpPathSpec: LPTSTR; nIDComboBox: Integer;
- nIDStaticPath: Integer; uFiletype: UINT): Integer; stdcall;
-{$EXTERNALSYM DlgDirListComboBox}
-
-function DlgDirSelectComboBoxExA(hDlg: HWND; lpString: LPSTR; nCount: Integer;
- nIDComboBox: Integer): BOOL; stdcall;
-{$EXTERNALSYM DlgDirSelectComboBoxExA}
-function DlgDirSelectComboBoxExW(hDlg: HWND; lpString: LPWSTR; nCount: Integer;
- nIDComboBox: Integer): BOOL; stdcall;
-{$EXTERNALSYM DlgDirSelectComboBoxExW}
-function DlgDirSelectComboBoxEx(hDlg: HWND; lpString: LPTSTR; nCount: Integer;
- nIDComboBox: Integer): BOOL; stdcall;
-{$EXTERNALSYM DlgDirSelectComboBoxEx}
-
-//
-// Dialog Styles
-//
-
-const
- DS_ABSALIGN = $01;
- {$EXTERNALSYM DS_ABSALIGN}
- DS_SYSMODAL = $02;
- {$EXTERNALSYM DS_SYSMODAL}
- DS_LOCALEDIT = $20; // Edit items get Local storage.
- {$EXTERNALSYM DS_LOCALEDIT}
- DS_SETFONT = $40; // User specified font for Dlg controls
- {$EXTERNALSYM DS_SETFONT}
- DS_MODALFRAME = $80; // Can be combined with WS_CAPTION
- {$EXTERNALSYM DS_MODALFRAME}
- DS_NOIDLEMSG = $100; // WM_ENTERIDLE message will not be sent
- {$EXTERNALSYM DS_NOIDLEMSG}
- DS_SETFOREGROUND = $200; // not in win3.1
- {$EXTERNALSYM DS_SETFOREGROUND}
-
- DS_3DLOOK = $0004;
- {$EXTERNALSYM DS_3DLOOK}
- DS_FIXEDSYS = $0008;
- {$EXTERNALSYM DS_FIXEDSYS}
- DS_NOFAILCREATE = $0010;
- {$EXTERNALSYM DS_NOFAILCREATE}
- DS_CONTROL = $0400;
- {$EXTERNALSYM DS_CONTROL}
- DS_CENTER = $0800;
- {$EXTERNALSYM DS_CENTER}
- DS_CENTERMOUSE = $1000;
- {$EXTERNALSYM DS_CENTERMOUSE}
- DS_CONTEXTHELP = $2000;
- {$EXTERNALSYM DS_CONTEXTHELP}
-
- DS_SHELLFONT = DS_SETFONT or DS_FIXEDSYS;
- {$EXTERNALSYM DS_SHELLFONT}
-
-//#if(_WIN32_WCE >= 0x0500)
- DS_USEPIXELS = $8000;
- {$EXTERNALSYM DS_USEPIXELS}
-//#endif
-
- DM_GETDEFID = WM_USER + 0;
- {$EXTERNALSYM DM_GETDEFID}
- DM_SETDEFID = WM_USER + 1;
- {$EXTERNALSYM DM_SETDEFID}
-
- DM_REPOSITION = WM_USER + 2;
- {$EXTERNALSYM DM_REPOSITION}
-
-//
-// Returned in HIWORD() of DM_GETDEFID result if msg is supported
-//
-
- DC_HASDEFID = $534B;
- {$EXTERNALSYM DC_HASDEFID}
-
-//
-// Dialog Codes
-//
-
- DLGC_WANTARROWS = $0001; // Control wants arrow keys
- {$EXTERNALSYM DLGC_WANTARROWS}
- DLGC_WANTTAB = $0002; // Control wants tab keys
- {$EXTERNALSYM DLGC_WANTTAB}
- DLGC_WANTALLKEYS = $0004; // Control wants all keys
- {$EXTERNALSYM DLGC_WANTALLKEYS}
- DLGC_WANTMESSAGE = $0004; // Pass message to control
- {$EXTERNALSYM DLGC_WANTMESSAGE}
- DLGC_HASSETSEL = $0008; // Understands EM_SETSEL message
- {$EXTERNALSYM DLGC_HASSETSEL}
- DLGC_DEFPUSHBUTTON = $0010; // Default pushbutton
- {$EXTERNALSYM DLGC_DEFPUSHBUTTON}
- DLGC_UNDEFPUSHBUTTON = $0020; // Non-default pushbutton
- {$EXTERNALSYM DLGC_UNDEFPUSHBUTTON}
- DLGC_RADIOBUTTON = $0040; // Radio button
- {$EXTERNALSYM DLGC_RADIOBUTTON}
- DLGC_WANTCHARS = $0080; // Want WM_CHAR messages
- {$EXTERNALSYM DLGC_WANTCHARS}
- DLGC_STATIC = $0100; // Static item: don't include
- {$EXTERNALSYM DLGC_STATIC}
- DLGC_BUTTON = $2000; // Button item: can be checked
- {$EXTERNALSYM DLGC_BUTTON}
-
- LB_CTLCODE = 0;
- {$EXTERNALSYM LB_CTLCODE}
-
-//
-// Listbox Return Values
-//
-
- LB_OKAY = 0;
- {$EXTERNALSYM LB_OKAY}
- LB_ERR = DWORD(-1);
- {$EXTERNALSYM LB_ERR}
- LB_ERRSPACE = DWORD(-2);
- {$EXTERNALSYM LB_ERRSPACE}
-
-//
-// The idStaticPath parameter to DlgDirList can have the following values
-// ORed if the list box should show other details of the files along with
-// the name of the files;
-//
-// all other details also will be returned
-
-//
-// Listbox Notification Codes
-//
-
- LBN_ERRSPACE = DWORD(-2);
- {$EXTERNALSYM LBN_ERRSPACE}
- LBN_SELCHANGE = 1;
- {$EXTERNALSYM LBN_SELCHANGE}
- LBN_DBLCLK = 2;
- {$EXTERNALSYM LBN_DBLCLK}
- LBN_SELCANCEL = 3;
- {$EXTERNALSYM LBN_SELCANCEL}
- LBN_SETFOCUS = 4;
- {$EXTERNALSYM LBN_SETFOCUS}
- LBN_KILLFOCUS = 5;
- {$EXTERNALSYM LBN_KILLFOCUS}
-
-//
-// Listbox messages
-//
-
- LB_ADDSTRING = $0180;
- {$EXTERNALSYM LB_ADDSTRING}
- LB_INSERTSTRING = $0181;
- {$EXTERNALSYM LB_INSERTSTRING}
- LB_DELETESTRING = $0182;
- {$EXTERNALSYM LB_DELETESTRING}
- LB_SELITEMRANGEEX = $0183;
- {$EXTERNALSYM LB_SELITEMRANGEEX}
- LB_RESETCONTENT = $0184;
- {$EXTERNALSYM LB_RESETCONTENT}
- LB_SETSEL = $0185;
- {$EXTERNALSYM LB_SETSEL}
- LB_SETCURSEL = $0186;
- {$EXTERNALSYM LB_SETCURSEL}
- LB_GETSEL = $0187;
- {$EXTERNALSYM LB_GETSEL}
- LB_GETCURSEL = $0188;
- {$EXTERNALSYM LB_GETCURSEL}
- LB_GETTEXT = $0189;
- {$EXTERNALSYM LB_GETTEXT}
- LB_GETTEXTLEN = $018A;
- {$EXTERNALSYM LB_GETTEXTLEN}
- LB_GETCOUNT = $018B;
- {$EXTERNALSYM LB_GETCOUNT}
- LB_SELECTSTRING = $018C;
- {$EXTERNALSYM LB_SELECTSTRING}
- LB_DIR = $018D;
- {$EXTERNALSYM LB_DIR}
- LB_GETTOPINDEX = $018E;
- {$EXTERNALSYM LB_GETTOPINDEX}
- LB_FINDSTRING = $018F;
- {$EXTERNALSYM LB_FINDSTRING}
- LB_GETSELCOUNT = $0190;
- {$EXTERNALSYM LB_GETSELCOUNT}
- LB_GETSELITEMS = $0191;
- {$EXTERNALSYM LB_GETSELITEMS}
- LB_SETTABSTOPS = $0192;
- {$EXTERNALSYM LB_SETTABSTOPS}
- LB_GETHORIZONTALEXTENT = $0193;
- {$EXTERNALSYM LB_GETHORIZONTALEXTENT}
- LB_SETHORIZONTALEXTENT = $0194;
- {$EXTERNALSYM LB_SETHORIZONTALEXTENT}
- LB_SETCOLUMNWIDTH = $0195;
- {$EXTERNALSYM LB_SETCOLUMNWIDTH}
- LB_ADDFILE = $0196;
- {$EXTERNALSYM LB_ADDFILE}
- LB_SETTOPINDEX = $0197;
- {$EXTERNALSYM LB_SETTOPINDEX}
- LB_GETITEMRECT = $0198;
- {$EXTERNALSYM LB_GETITEMRECT}
- LB_GETITEMDATA = $0199;
- {$EXTERNALSYM LB_GETITEMDATA}
- LB_SETITEMDATA = $019A;
- {$EXTERNALSYM LB_SETITEMDATA}
- LB_SELITEMRANGE = $019B;
- {$EXTERNALSYM LB_SELITEMRANGE}
- LB_SETANCHORINDEX = $019C;
- {$EXTERNALSYM LB_SETANCHORINDEX}
- LB_GETANCHORINDEX = $019D;
- {$EXTERNALSYM LB_GETANCHORINDEX}
- LB_SETCARETINDEX = $019E;
- {$EXTERNALSYM LB_SETCARETINDEX}
- LB_GETCARETINDEX = $019F;
- {$EXTERNALSYM LB_GETCARETINDEX}
- LB_SETITEMHEIGHT = $01A0;
- {$EXTERNALSYM LB_SETITEMHEIGHT}
- LB_GETITEMHEIGHT = $01A1;
- {$EXTERNALSYM LB_GETITEMHEIGHT}
- LB_FINDSTRINGEXACT = $01A2;
- {$EXTERNALSYM LB_FINDSTRINGEXACT}
- LB_SETLOCALE = $01A5;
- {$EXTERNALSYM LB_SETLOCALE}
- LB_GETLOCALE = $01A6;
- {$EXTERNALSYM LB_GETLOCALE}
- LB_SETCOUNT = $01A7;
- {$EXTERNALSYM LB_SETCOUNT}
- LB_INITSTORAGE = $01A8;
- {$EXTERNALSYM LB_INITSTORAGE}
- LB_ITEMFROMPOINT = $01A9;
- {$EXTERNALSYM LB_ITEMFROMPOINT}
- LB_MULTIPLEADDSTRING = $01B1;
- {$EXTERNALSYM LB_MULTIPLEADDSTRING}
- LB_GETLISTBOXINFO = $01B2;
- {$EXTERNALSYM LB_GETLISTBOXINFO}
-
- {$IFDEF WINXP_UP}
- LB_MSGMAX = $01B3;
- {$EXTERNALSYM LB_MSGMAX}
- {$ELSE}
- LB_MSGMAX = $01B0;
- {$EXTERNALSYM LB_MSGMAX}
- {$ENDIF WINXP_UP}
-
-//
-// Listbox Styles
-//
-
- LBS_NOTIFY = $0001;
- {$EXTERNALSYM LBS_NOTIFY}
- LBS_SORT = $0002;
- {$EXTERNALSYM LBS_SORT}
- LBS_NOREDRAW = $0004;
- {$EXTERNALSYM LBS_NOREDRAW}
- LBS_MULTIPLESEL = $0008;
- {$EXTERNALSYM LBS_MULTIPLESEL}
- LBS_OWNERDRAWFIXED = $0010;
- {$EXTERNALSYM LBS_OWNERDRAWFIXED}
- LBS_OWNERDRAWVARIABLE = $0020;
- {$EXTERNALSYM LBS_OWNERDRAWVARIABLE}
- LBS_HASSTRINGS = $0040;
- {$EXTERNALSYM LBS_HASSTRINGS}
- LBS_USETABSTOPS = $0080;
- {$EXTERNALSYM LBS_USETABSTOPS}
- LBS_NOINTEGRALHEIGHT = $0100;
- {$EXTERNALSYM LBS_NOINTEGRALHEIGHT}
- LBS_MULTICOLUMN = $0200;
- {$EXTERNALSYM LBS_MULTICOLUMN}
- LBS_WANTKEYBOARDINPUT = $0400;
- {$EXTERNALSYM LBS_WANTKEYBOARDINPUT}
- LBS_EXTENDEDSEL = $0800;
- {$EXTERNALSYM LBS_EXTENDEDSEL}
- LBS_DISABLENOSCROLL = $1000;
- {$EXTERNALSYM LBS_DISABLENOSCROLL}
- LBS_NODATA = $2000;
- {$EXTERNALSYM LBS_NODATA}
- LBS_NOSEL = $4000;
- {$EXTERNALSYM LBS_NOSEL}
- LBS_COMBOBOX = $8000;
- {$EXTERNALSYM LBS_COMBOBOX}
-
- LBS_STANDARD = LBS_NOTIFY or LBS_SORT or WS_VSCROLL or WS_BORDER;
- {$EXTERNALSYM LBS_STANDARD}
-
-//
-// Combo Box return Values
-//
-
- CB_OKAY = 0;
- {$EXTERNALSYM CB_OKAY}
- CB_ERR = DWORD(-1);
- {$EXTERNALSYM CB_ERR}
- CB_ERRSPACE = DWORD(-2);
- {$EXTERNALSYM CB_ERRSPACE}
-
-//
-// Combo Box Notification Codes
-//
-
- CBN_ERRSPACE = DWORD(-1);
- {$EXTERNALSYM CBN_ERRSPACE}
- CBN_SELCHANGE = 1;
- {$EXTERNALSYM CBN_SELCHANGE}
- CBN_DBLCLK = 2;
- {$EXTERNALSYM CBN_DBLCLK}
- CBN_SETFOCUS = 3;
- {$EXTERNALSYM CBN_SETFOCUS}
- CBN_KILLFOCUS = 4;
- {$EXTERNALSYM CBN_KILLFOCUS}
- CBN_EDITCHANGE = 5;
- {$EXTERNALSYM CBN_EDITCHANGE}
- CBN_EDITUPDATE = 6;
- {$EXTERNALSYM CBN_EDITUPDATE}
- CBN_DROPDOWN = 7;
- {$EXTERNALSYM CBN_DROPDOWN}
- CBN_CLOSEUP = 8;
- {$EXTERNALSYM CBN_CLOSEUP}
- CBN_SELENDOK = 9;
- {$EXTERNALSYM CBN_SELENDOK}
- CBN_SELENDCANCEL = 10;
- {$EXTERNALSYM CBN_SELENDCANCEL}
-
-//
-// Combo Box styles
-//
-
- CBS_SIMPLE = $0001;
- {$EXTERNALSYM CBS_SIMPLE}
- CBS_DROPDOWN = $0002;
- {$EXTERNALSYM CBS_DROPDOWN}
- CBS_DROPDOWNLIST = $0003;
- {$EXTERNALSYM CBS_DROPDOWNLIST}
- CBS_OWNERDRAWFIXED = $0010;
- {$EXTERNALSYM CBS_OWNERDRAWFIXED}
- CBS_OWNERDRAWVARIABLE = $0020;
- {$EXTERNALSYM CBS_OWNERDRAWVARIABLE}
- CBS_AUTOHSCROLL = $0040;
- {$EXTERNALSYM CBS_AUTOHSCROLL}
- CBS_OEMCONVERT = $0080;
- {$EXTERNALSYM CBS_OEMCONVERT}
- CBS_SORT = $0100;
- {$EXTERNALSYM CBS_SORT}
- CBS_HASSTRINGS = $0200;
- {$EXTERNALSYM CBS_HASSTRINGS}
- CBS_NOINTEGRALHEIGHT = $0400;
- {$EXTERNALSYM CBS_NOINTEGRALHEIGHT}
- CBS_DISABLENOSCROLL = $0800;
- {$EXTERNALSYM CBS_DISABLENOSCROLL}
- CBS_UPPERCASE = $2000;
- {$EXTERNALSYM CBS_UPPERCASE}
- CBS_LOWERCASE = $4000;
- {$EXTERNALSYM CBS_LOWERCASE}
-
-//
-// Combo Box messages
-//
-
- CB_GETEDITSEL = $0140;
- {$EXTERNALSYM CB_GETEDITSEL}
- CB_LIMITTEXT = $0141;
- {$EXTERNALSYM CB_LIMITTEXT}
- CB_SETEDITSEL = $0142;
- {$EXTERNALSYM CB_SETEDITSEL}
- CB_ADDSTRING = $0143;
- {$EXTERNALSYM CB_ADDSTRING}
- CB_DELETESTRING = $0144;
- {$EXTERNALSYM CB_DELETESTRING}
- CB_DIR = $0145;
- {$EXTERNALSYM CB_DIR}
- CB_GETCOUNT = $0146;
- {$EXTERNALSYM CB_GETCOUNT}
- CB_GETCURSEL = $0147;
- {$EXTERNALSYM CB_GETCURSEL}
- CB_GETLBTEXT = $0148;
- {$EXTERNALSYM CB_GETLBTEXT}
- CB_GETLBTEXTLEN = $0149;
- {$EXTERNALSYM CB_GETLBTEXTLEN}
- CB_INSERTSTRING = $014A;
- {$EXTERNALSYM CB_INSERTSTRING}
- CB_RESETCONTENT = $014B;
- {$EXTERNALSYM CB_RESETCONTENT}
- CB_FINDSTRING = $014C;
- {$EXTERNALSYM CB_FINDSTRING}
- CB_SELECTSTRING = $014D;
- {$EXTERNALSYM CB_SELECTSTRING}
- CB_SETCURSEL = $014E;
- {$EXTERNALSYM CB_SETCURSEL}
- CB_SHOWDROPDOWN = $014F;
- {$EXTERNALSYM CB_SHOWDROPDOWN}
- CB_GETITEMDATA = $0150;
- {$EXTERNALSYM CB_GETITEMDATA}
- CB_SETITEMDATA = $0151;
- {$EXTERNALSYM CB_SETITEMDATA}
- CB_GETDROPPEDCONTROLRECT = $0152;
- {$EXTERNALSYM CB_GETDROPPEDCONTROLRECT}
- CB_SETITEMHEIGHT = $0153;
- {$EXTERNALSYM CB_SETITEMHEIGHT}
- CB_GETITEMHEIGHT = $0154;
- {$EXTERNALSYM CB_GETITEMHEIGHT}
- CB_SETEXTENDEDUI = $0155;
- {$EXTERNALSYM CB_SETEXTENDEDUI}
- CB_GETEXTENDEDUI = $0156;
- {$EXTERNALSYM CB_GETEXTENDEDUI}
- CB_GETDROPPEDSTATE = $0157;
- {$EXTERNALSYM CB_GETDROPPEDSTATE}
- CB_FINDSTRINGEXACT = $0158;
- {$EXTERNALSYM CB_FINDSTRINGEXACT}
- CB_SETLOCALE = $0159;
- {$EXTERNALSYM CB_SETLOCALE}
- CB_GETLOCALE = $015A;
- {$EXTERNALSYM CB_GETLOCALE}
- CB_GETTOPINDEX = $015b;
- {$EXTERNALSYM CB_GETTOPINDEX}
- CB_SETTOPINDEX = $015c;
- {$EXTERNALSYM CB_SETTOPINDEX}
- CB_GETHORIZONTALEXTENT = $015d;
- {$EXTERNALSYM CB_GETHORIZONTALEXTENT}
- CB_SETHORIZONTALEXTENT = $015e;
- {$EXTERNALSYM CB_SETHORIZONTALEXTENT}
- CB_GETDROPPEDWIDTH = $015f;
- {$EXTERNALSYM CB_GETDROPPEDWIDTH}
- CB_SETDROPPEDWIDTH = $0160;
- {$EXTERNALSYM CB_SETDROPPEDWIDTH}
- CB_INITSTORAGE = $0161;
- {$EXTERNALSYM CB_INITSTORAGE}
- CB_MULTIPLEADDSTRING = $0163;
- {$EXTERNALSYM CB_MULTIPLEADDSTRING}
- CB_GETCOMBOBOXINFO = $0164;
- {$EXTERNALSYM CB_GETCOMBOBOXINFO}
-
- {$IFDEF WINXP_UP}
- CB_MSGMAX = $0165;
- {$EXTERNALSYM CB_MSGMAX}
- {$ELSE}
- CB_MSGMAX = $0162;
- {$EXTERNALSYM CB_MSGMAX}
- {$ENDIF WINXP_UP}
-
-//
-// Scroll Bar Styles
-//
-
- SBS_HORZ = $0000;
- {$EXTERNALSYM SBS_HORZ}
- SBS_VERT = $0001;
- {$EXTERNALSYM SBS_VERT}
- SBS_TOPALIGN = $0002;
- {$EXTERNALSYM SBS_TOPALIGN}
- SBS_LEFTALIGN = $0002;
- {$EXTERNALSYM SBS_LEFTALIGN}
- SBS_BOTTOMALIGN = $0004;
- {$EXTERNALSYM SBS_BOTTOMALIGN}
- SBS_RIGHTALIGN = $0004;
- {$EXTERNALSYM SBS_RIGHTALIGN}
- SBS_SIZEBOXTOPLEFTALIGN = $0002;
- {$EXTERNALSYM SBS_SIZEBOXTOPLEFTALIGN}
- SBS_SIZEBOXBOTTOMRIGHTALIGN = $0004;
- {$EXTERNALSYM SBS_SIZEBOXBOTTOMRIGHTALIGN}
- SBS_SIZEBOX = $0008;
- {$EXTERNALSYM SBS_SIZEBOX}
- SBS_SIZEGRIP = $0010;
- {$EXTERNALSYM SBS_SIZEGRIP}
-
-//
-// Scroll bar messages
-//
-
- SBM_SETPOS = $00E0; // not in win3.1
- {$EXTERNALSYM SBM_SETPOS}
- SBM_GETPOS = $00E1; // not in win3.1
- {$EXTERNALSYM SBM_GETPOS}
- SBM_SETRANGE = $00E2; // not in win3.1
- {$EXTERNALSYM SBM_SETRANGE}
- SBM_SETRANGEREDRAW = $00E6; // not in win3.1
- {$EXTERNALSYM SBM_SETRANGEREDRAW}
- SBM_GETRANGE = $00E3; // not in win3.1
- {$EXTERNALSYM SBM_GETRANGE}
- SBM_ENABLE_ARROWS = $00E4; // not in win3.1
- {$EXTERNALSYM SBM_ENABLE_ARROWS}
- SBM_SETSCROLLINFO = $00E9;
- {$EXTERNALSYM SBM_SETSCROLLINFO}
- SBM_GETSCROLLINFO = $00EA;
- {$EXTERNALSYM SBM_GETSCROLLINFO}
-
- SBM_GETSCROLLBARINFO = $00EB;
- {$EXTERNALSYM SBM_GETSCROLLBARINFO}
-
- SIF_RANGE = $0001;
- {$EXTERNALSYM SIF_RANGE}
- SIF_PAGE = $0002;
- {$EXTERNALSYM SIF_PAGE}
- SIF_POS = $0004;
- {$EXTERNALSYM SIF_POS}
- SIF_DISABLENOSCROLL = $0008;
- {$EXTERNALSYM SIF_DISABLENOSCROLL}
- SIF_TRACKPOS = $0010;
- {$EXTERNALSYM SIF_TRACKPOS}
- SIF_ALL = SIF_RANGE or SIF_PAGE or SIF_POS or SIF_TRACKPOS;
- {$EXTERNALSYM SIF_ALL}
-
-type
- LPSCROLLINFO = ^SCROLLINFO;
- {$EXTERNALSYM LPSCROLLINFO}
- tagSCROLLINFO = record
- cbSize: UINT;
- fMask: UINT;
- nMin: Integer;
- nMax: Integer;
- nPage: UINT;
- nPos: Integer;
- nTrackPos: Integer;
- end;
- {$EXTERNALSYM tagSCROLLINFO}
- SCROLLINFO = tagSCROLLINFO;
- {$EXTERNALSYM SCROLLINFO}
- TScrollInfo = SCROLLINFO;
- PScrollInfo = LPSCROLLINFO;
-
-function SetScrollInfo(hwnd: HWND; fnBar: Integer; const lpsi: SCROLLINFO;
- fRedraw: BOOL): Integer; stdcall;
-{$EXTERNALSYM SetScrollInfo}
-
-function GetScrollInfo(hwnd: HWND; fnBar: Integer; var lpsi: SCROLLINFO): BOOL; stdcall;
-{$EXTERNALSYM GetScrollInfo}
-
-//
-// MDI client style bits
-//
-
-const
- MDIS_ALLCHILDSTYLES = $0001;
- {$EXTERNALSYM MDIS_ALLCHILDSTYLES}
-
-//
-// wParam Flags for WM_MDITILE and WM_MDICASCADE messages.
-//
-
-const
- MDITILE_VERTICAL = $0000; // not in win3.1
- {$EXTERNALSYM MDITILE_VERTICAL}
- MDITILE_HORIZONTAL = $0001; // not in win3.1
- {$EXTERNALSYM MDITILE_HORIZONTAL}
- MDITILE_SKIPDISABLED = $0002; // not in win3.1
- {$EXTERNALSYM MDITILE_SKIPDISABLED}
- MDITILE_ZORDER = $0004;
- {$EXTERNALSYM MDITILE_ZORDER}
-
-type
- LPMDICREATESTRUCTA = ^MDICREATESTRUCTA;
- {$EXTERNALSYM LPMDICREATESTRUCTA}
- tagMDICREATESTRUCTA = record
- szClass: LPCSTR;
- szTitle: LPCSTR;
- hOwner: HANDLE;
- x: Integer;
- y: Integer;
- cx: Integer;
- cy: Integer;
- style: DWORD;
- lParam: LPARAM; // app-defined stuff//
- end;
- {$EXTERNALSYM tagMDICREATESTRUCTA}
- MDICREATESTRUCTA = tagMDICREATESTRUCTA;
- {$EXTERNALSYM MDICREATESTRUCTA}
- TMdiCreateStructA = MDICREATESTRUCTA;
- PMdiCreateStructA = LPMDICREATESTRUCTA;
-
- LPMDICREATESTRUCTW = ^MDICREATESTRUCTW;
- {$EXTERNALSYM LPMDICREATESTRUCTW}
- tagMDICREATESTRUCTW = record
- szClass: LPCWSTR;
- szTitle: LPCWSTR;
- hOwner: HANDLE;
- x: Integer;
- y: Integer;
- cx: Integer;
- cy: Integer;
- style: DWORD;
- lParam: LPARAM; // app-defined stuff//
- end;
- {$EXTERNALSYM tagMDICREATESTRUCTW}
- MDICREATESTRUCTW = tagMDICREATESTRUCTW;
- {$EXTERNALSYM MDICREATESTRUCTW}
- TMdiCreateStructW = MDICREATESTRUCTW;
- PMdiCreateStructW = LPMDICREATESTRUCTW;
-
- {$IFDEF UNICODE}
- MDICREATESTRUCT = MDICREATESTRUCTW;
- {$EXTERNALSYM MDICREATESTRUCT}
- LPMDICREATESTRUCT = LPMDICREATESTRUCTW;
- {$EXTERNALSYM LPMDICREATESTRUCT}
- TMdiCreateStruct = TMdiCreateStructW;
- PMdiCreateStruct = PMdiCreateStructW;
- {$ELSE}
- MDICREATESTRUCT = MDICREATESTRUCTA;
- {$EXTERNALSYM MDICREATESTRUCT}
- LPMDICREATESTRUCT = LPMDICREATESTRUCTA;
- {$EXTERNALSYM LPMDICREATESTRUCT}
- TMdiCreateStruct = TMdiCreateStructA;
- PMdiCreateStruct = PMdiCreateStructA;
- {$ENDIF UNICODE}
-
- LPCLIENTCREATESTRUCT = ^CLIENTCREATESTRUCT;
- {$EXTERNALSYM LPCLIENTCREATESTRUCT}
- tagCLIENTCREATESTRUCT = record
- hWindowMenu: HANDLE;
- idFirstChild: UINT;
- end;
- {$EXTERNALSYM tagCLIENTCREATESTRUCT}
- CLIENTCREATESTRUCT = tagCLIENTCREATESTRUCT;
- {$EXTERNALSYM CLIENTCREATESTRUCT}
- TClientCreateStruct = CLIENTCREATESTRUCT;
- PClientCreateStruct = LPCLIENTCREATESTRUCT;
-
-function DefFrameProcA(hWnd: HWND; hWndMDIClient: HWND; uMsg: UINT;
- wParam: WPARAM; lParam: LPARAM): LRESULT; stdcall;
-{$EXTERNALSYM DefFrameProcA}
-function DefFrameProcW(hWnd: HWND; hWndMDIClient: HWND; uMsg: UINT;
- wParam: WPARAM; lParam: LPARAM): LRESULT; stdcall;
-{$EXTERNALSYM DefFrameProcW}
-function DefFrameProc(hWnd: HWND; hWndMDIClient: HWND; uMsg: UINT;
- wParam: WPARAM; lParam: LPARAM): LRESULT; stdcall;
-{$EXTERNALSYM DefFrameProc}
-
-function DefMDIChildProcA(hWnd: HWND; uMsg: UINT; wParam: WPARAM; lParam: LPARAM): LRESULT; stdcall;
-{$EXTERNALSYM DefMDIChildProcA}
-function DefMDIChildProcW(hWnd: HWND; uMsg: UINT; wParam: WPARAM; lParam: LPARAM): LRESULT; stdcall;
-{$EXTERNALSYM DefMDIChildProcW}
-function DefMDIChildProc(hWnd: HWND; uMsg: UINT; wParam: WPARAM; lParam: LPARAM): LRESULT; stdcall;
-{$EXTERNALSYM DefMDIChildProc}
-
-function TranslateMDISysAccel(hWndClient: HWND; const lpMsg: MSG): BOOL; stdcall;
-{$EXTERNALSYM TranslateMDISysAccel}
-
-function ArrangeIconicWindows(hWnd: HWND): UINT; stdcall;
-{$EXTERNALSYM ArrangeIconicWindows}
-
-function CreateMDIWindowA(lpClassName, lpWindowName: LPCSTR; dwStyle: DWORD;
- X, Y, nWidth, nHeight: Integer; hWndParent: HWND; hInstance: HINSTANCE;
- lParam: LPARAM): HWND; stdcall;
-{$EXTERNALSYM CreateMDIWindowA}
-function CreateMDIWindowW(lpClassName, lpWindowName: LPCWSTR; dwStyle: DWORD;
- X, Y, nWidth, nHeight: Integer; hWndParent: HWND; hInstance: HINSTANCE;
- lParam: LPARAM): HWND; stdcall;
-{$EXTERNALSYM CreateMDIWindowW}
-function CreateMDIWindow(lpClassName, lpWindowName: LPCTSTR; dwStyle: DWORD;
- X, Y, nWidth, nHeight: Integer; hWndParent: HWND; hInstance: HINSTANCE;
- lParam: LPARAM): HWND; stdcall;
-{$EXTERNALSYM CreateMDIWindow}
-
-function TileWindows(hwndParent: HWND; wHow: UINT; lpRect: LPRECT; cKids: UINT;
- hwnd: HWND; lpKids: LPHWND): WORD; stdcall;
-{$EXTERNALSYM TileWindows}
-
-function CascadeWindows(hwndParent: HWND; wHow: UINT; lpRect: LPRECT;
- cKids: UINT; lpKids: LPHWND): WORD; stdcall;
-{$EXTERNALSYM CascadeWindows}
-
-//***** Help support ********************************************************/
-
-type
- HELPPOLY = DWORD;
- {$EXTERNALSYM HELPPOLY}
-
- LPMULTIKEYHELPA = ^MULTIKEYHELPA;
- {$EXTERNALSYM LPMULTIKEYHELPA}
- tagMULTIKEYHELPA = record
- mkSize: DWORD;
- mkKeylist: CHAR;
- szKeyphrase: array [0..0] of CHAR;
- end;
- {$EXTERNALSYM tagMULTIKEYHELPA}
- MULTIKEYHELPA = tagMULTIKEYHELPA;
- {$EXTERNALSYM MULTIKEYHELPA}
- TMultiKeyHelpA = MULTIKEYHELPA;
- PMultiKeyHelpA = LPMULTIKEYHELPA;
-
- LPMULTIKEYHELPW = ^MULTIKEYHELPW;
- {$EXTERNALSYM LPMULTIKEYHELPW}
- tagMULTIKEYHELPW = record
- mkSize: DWORD;
- mkKeylist: WCHAR;
- szKeyphrase: array [0..0] of WCHAR;
- end;
- {$EXTERNALSYM tagMULTIKEYHELPW}
- MULTIKEYHELPW = tagMULTIKEYHELPW;
- {$EXTERNALSYM MULTIKEYHELPW}
- TMultiKeyHelpW = MULTIKEYHELPW;
- PMultiKeyHelpW = LPMULTIKEYHELPW;
-
- {$IFDEF UNICODE}
- MULTIKEYHELP = MULTIKEYHELPW;
- {$EXTERNALSYM MULTIKEYHELP}
- LPMULTIKEYHELP = LPMULTIKEYHELPW;
- {$EXTERNALSYM LPMULTIKEYHELP}
- TMultiKeyHelp = TMultiKeyHelpW;
- PMultiKeyHelp = PMultiKeyHelpW;
- {$ELSE}
- MULTIKEYHELP = MULTIKEYHELPA;
- {$EXTERNALSYM MULTIKEYHELP}
- LPMULTIKEYHELP = LPMULTIKEYHELPA;
- {$EXTERNALSYM LPMULTIKEYHELP}
- TMultiKeyHelp = TMultiKeyHelpA;
- PMultiKeyHelp = PMultiKeyHelpA;
- {$ENDIF UNICODE}
-
- LPHELPWININFOA = ^HELPWININFOA;
- {$EXTERNALSYM LPHELPWININFOA}
- tagHELPWININFOA = record
- wStructSize: Integer;
- x: Integer;
- y: Integer;
- dx: Integer;
- dy: Integer;
- wMax: Integer;
- rgchMember: array [0..1] of CHAR;
- end;
- {$EXTERNALSYM tagHELPWININFOA}
- HELPWININFOA = tagHELPWININFOA;
- {$EXTERNALSYM HELPWININFOA}
- THelpWinInfoA = HELPWININFOA;
- PHelpWinInfoA = LPHELPWININFOA;
-
- LPHELPWININFOW = ^HELPWININFOW;
- {$EXTERNALSYM LPHELPWININFOW}
- tagHELPWININFOW = record
- wStructSize: Integer;
- x: Integer;
- y: Integer;
- dx: Integer;
- dy: Integer;
- wMax: Integer;
- rgchMember: array [0..1] of WCHAR;
- end;
- {$EXTERNALSYM tagHELPWININFOW}
- HELPWININFOW = tagHELPWININFOW;
- {$EXTERNALSYM HELPWININFOW}
- THelpWinInfoW = HELPWININFOW;
- PHelpWinInfoW = LPHELPWININFOW;
-
- {$IFDEF UNICODE}
- HELPWININFO = HELPWININFOW;
- {$EXTERNALSYM HELPWININFO}
- LPHELPWININFO = LPHELPWININFOW;
- {$EXTERNALSYM LPHELPWININFO}
- THelpWinInfo = THelpWinInfoW;
- PHelpWinInfo = PHelpWinInfoW;
- {$ELSE}
- HELPWININFO = HELPWININFOA;
- {$EXTERNALSYM HELPWININFO}
- LPHELPWININFO = LPHELPWININFOA;
- {$EXTERNALSYM LPHELPWININFO}
- THelpWinInfo = THelpWinInfoA;
- PHelpWinInfo = PHelpWinInfoA;
- {$ENDIF UNICODE}
-
-//
-// Commands to pass to WinHelp()
-//
-
-const
- HELP_CONTEXT = $0001; // Display topic in ulTopic
- {$EXTERNALSYM HELP_CONTEXT}
- HELP_QUIT = $0002; // Terminate help
- {$EXTERNALSYM HELP_QUIT}
- HELP_INDEX = $0003; // Display index
- {$EXTERNALSYM HELP_INDEX}
- HELP_CONTENTS = $0003;
- {$EXTERNALSYM HELP_CONTENTS}
- HELP_HELPONHELP = $0004; // Display help on using help
- {$EXTERNALSYM HELP_HELPONHELP}
- HELP_SETINDEX = $0005; // Set current Index for multi index help
- {$EXTERNALSYM HELP_SETINDEX}
- HELP_SETCONTENTS = $0005;
- {$EXTERNALSYM HELP_SETCONTENTS}
- HELP_CONTEXTPOPUP = $0008;
- {$EXTERNALSYM HELP_CONTEXTPOPUP}
- HELP_FORCEFILE = $0009;
- {$EXTERNALSYM HELP_FORCEFILE}
- HELP_KEY = $0101; // Display topic for keyword in offabData
- {$EXTERNALSYM HELP_KEY}
- HELP_COMMAND = $0102;
- {$EXTERNALSYM HELP_COMMAND}
- HELP_PARTIALKEY = $0105;
- {$EXTERNALSYM HELP_PARTIALKEY}
- HELP_MULTIKEY = $0201;
- {$EXTERNALSYM HELP_MULTIKEY}
- HELP_SETWINPOS = $0203;
- {$EXTERNALSYM HELP_SETWINPOS}
-
- HELP_CONTEXTMENU = $000a;
- {$EXTERNALSYM HELP_CONTEXTMENU}
- HELP_FINDER = $000b;
- {$EXTERNALSYM HELP_FINDER}
- HELP_WM_HELP = $000c;
- {$EXTERNALSYM HELP_WM_HELP}
- HELP_SETPOPUP_POS = $000d;
- {$EXTERNALSYM HELP_SETPOPUP_POS}
-
- HELP_TCARD = $8000;
- {$EXTERNALSYM HELP_TCARD}
- HELP_TCARD_DATA = $0010;
- {$EXTERNALSYM HELP_TCARD_DATA}
- HELP_TCARD_OTHER_CALLER = $0011;
- {$EXTERNALSYM HELP_TCARD_OTHER_CALLER}
-
-// These are in winhelp.h in Win95.
-
- IDH_NO_HELP = 28440;
- {$EXTERNALSYM IDH_NO_HELP}
- IDH_MISSING_CONTEXT = 28441; // Control doesn't have matching help context
- {$EXTERNALSYM IDH_MISSING_CONTEXT}
- IDH_GENERIC_HELP_BUTTON = 28442; // Property sheet help button
- {$EXTERNALSYM IDH_GENERIC_HELP_BUTTON}
- IDH_OK = 28443;
- {$EXTERNALSYM IDH_OK}
- IDH_CANCEL = 28444;
- {$EXTERNALSYM IDH_CANCEL}
- IDH_HELP = 28445;
- {$EXTERNALSYM IDH_HELP}
-
-function WinHelpA(hWndMain: HWND; lpszHelp: LPCSTR; uCommand: UINT; dwData: ULONG_PTR): BOOL; stdcall;
-{$EXTERNALSYM WinHelpA}
-function WinHelpW(hWndMain: HWND; lpszHelp: LPCWSTR; uCommand: UINT; dwData: ULONG_PTR): BOOL; stdcall;
-{$EXTERNALSYM WinHelpW}
-function WinHelp(hWndMain: HWND; lpszHelp: LPCTSTR; uCommand: UINT; dwData: ULONG_PTR): BOOL; stdcall;
-{$EXTERNALSYM WinHelp}
-
-const
- GR_GDIOBJECTS = 0; // Count of GDI objects
- {$EXTERNALSYM GR_GDIOBJECTS}
- GR_USEROBJECTS = 1; // Count of USER objects
- {$EXTERNALSYM GR_USEROBJECTS}
-
-function GetGuiResources(hProcess: HANDLE; uiFlags: DWORD): DWORD; stdcall;
-{$EXTERNALSYM GetGuiResources}
-
-//
-// Parameter for SystemParametersInfo()
-//
-
-const
- SPI_GETBEEP = 1;
- {$EXTERNALSYM SPI_GETBEEP}
- SPI_SETBEEP = 2;
- {$EXTERNALSYM SPI_SETBEEP}
- SPI_GETMOUSE = 3;
- {$EXTERNALSYM SPI_GETMOUSE}
- SPI_SETMOUSE = 4;
- {$EXTERNALSYM SPI_SETMOUSE}
- SPI_GETBORDER = 5;
- {$EXTERNALSYM SPI_GETBORDER}
- SPI_SETBORDER = 6;
- {$EXTERNALSYM SPI_SETBORDER}
- SPI_GETKEYBOARDSPEED = 10;
- {$EXTERNALSYM SPI_GETKEYBOARDSPEED}
- SPI_SETKEYBOARDSPEED = 11;
- {$EXTERNALSYM SPI_SETKEYBOARDSPEED}
- SPI_LANGDRIVER = 12;
- {$EXTERNALSYM SPI_LANGDRIVER}
- SPI_ICONHORIZONTALSPACING = 13;
- {$EXTERNALSYM SPI_ICONHORIZONTALSPACING}
- SPI_GETSCREENSAVETIMEOUT = 14;
- {$EXTERNALSYM SPI_GETSCREENSAVETIMEOUT}
- SPI_SETSCREENSAVETIMEOUT = 15;
- {$EXTERNALSYM SPI_SETSCREENSAVETIMEOUT}
- SPI_GETSCREENSAVEACTIVE = 16;
- {$EXTERNALSYM SPI_GETSCREENSAVEACTIVE}
- SPI_SETSCREENSAVEACTIVE = 17;
- {$EXTERNALSYM SPI_SETSCREENSAVEACTIVE}
- SPI_GETGRIDGRANULARITY = 18;
- {$EXTERNALSYM SPI_GETGRIDGRANULARITY}
- SPI_SETGRIDGRANULARITY = 19;
- {$EXTERNALSYM SPI_SETGRIDGRANULARITY}
- SPI_SETDESKWALLPAPER = 20;
- {$EXTERNALSYM SPI_SETDESKWALLPAPER}
- SPI_SETDESKPATTERN = 21;
- {$EXTERNALSYM SPI_SETDESKPATTERN}
- SPI_GETKEYBOARDDELAY = 22;
- {$EXTERNALSYM SPI_GETKEYBOARDDELAY}
- SPI_SETKEYBOARDDELAY = 23;
- {$EXTERNALSYM SPI_SETKEYBOARDDELAY}
- SPI_ICONVERTICALSPACING = 24;
- {$EXTERNALSYM SPI_ICONVERTICALSPACING}
- SPI_GETICONTITLEWRAP = 25;
- {$EXTERNALSYM SPI_GETICONTITLEWRAP}
- SPI_SETICONTITLEWRAP = 26;
- {$EXTERNALSYM SPI_SETICONTITLEWRAP}
- SPI_GETMENUDROPALIGNMENT = 27;
- {$EXTERNALSYM SPI_GETMENUDROPALIGNMENT}
- SPI_SETMENUDROPALIGNMENT = 28;
- {$EXTERNALSYM SPI_SETMENUDROPALIGNMENT}
- SPI_SETDOUBLECLKWIDTH = 29;
- {$EXTERNALSYM SPI_SETDOUBLECLKWIDTH}
- SPI_SETDOUBLECLKHEIGHT = 30;
- {$EXTERNALSYM SPI_SETDOUBLECLKHEIGHT}
- SPI_GETICONTITLELOGFONT = 31;
- {$EXTERNALSYM SPI_GETICONTITLELOGFONT}
- SPI_SETDOUBLECLICKTIME = 32;
- {$EXTERNALSYM SPI_SETDOUBLECLICKTIME}
- SPI_SETMOUSEBUTTONSWAP = 33;
- {$EXTERNALSYM SPI_SETMOUSEBUTTONSWAP}
- SPI_SETICONTITLELOGFONT = 34;
- {$EXTERNALSYM SPI_SETICONTITLELOGFONT}
- SPI_GETFASTTASKSWITCH = 35;
- {$EXTERNALSYM SPI_GETFASTTASKSWITCH}
- SPI_SETFASTTASKSWITCH = 36;
- {$EXTERNALSYM SPI_SETFASTTASKSWITCH}
- SPI_SETDRAGFULLWINDOWS = 37;
- {$EXTERNALSYM SPI_SETDRAGFULLWINDOWS}
- SPI_GETDRAGFULLWINDOWS = 38;
- {$EXTERNALSYM SPI_GETDRAGFULLWINDOWS}
- SPI_GETNONCLIENTMETRICS = 41;
- {$EXTERNALSYM SPI_GETNONCLIENTMETRICS}
- SPI_SETNONCLIENTMETRICS = 42;
- {$EXTERNALSYM SPI_SETNONCLIENTMETRICS}
- SPI_GETMINIMIZEDMETRICS = 43;
- {$EXTERNALSYM SPI_GETMINIMIZEDMETRICS}
- SPI_SETMINIMIZEDMETRICS = 44;
- {$EXTERNALSYM SPI_SETMINIMIZEDMETRICS}
- SPI_GETICONMETRICS = 45;
- {$EXTERNALSYM SPI_GETICONMETRICS}
- SPI_SETICONMETRICS = 46;
- {$EXTERNALSYM SPI_SETICONMETRICS}
- SPI_SETWORKAREA = 47;
- {$EXTERNALSYM SPI_SETWORKAREA}
- SPI_GETWORKAREA = 48;
- {$EXTERNALSYM SPI_GETWORKAREA}
- SPI_SETPENWINDOWS = 49;
- {$EXTERNALSYM SPI_SETPENWINDOWS}
-
- SPI_GETHIGHCONTRAST = 66;
- {$EXTERNALSYM SPI_GETHIGHCONTRAST}
- SPI_SETHIGHCONTRAST = 67;
- {$EXTERNALSYM SPI_SETHIGHCONTRAST}
- SPI_GETKEYBOARDPREF = 68;
- {$EXTERNALSYM SPI_GETKEYBOARDPREF}
- SPI_SETKEYBOARDPREF = 69;
- {$EXTERNALSYM SPI_SETKEYBOARDPREF}
- SPI_GETSCREENREADER = 70;
- {$EXTERNALSYM SPI_GETSCREENREADER}
- SPI_SETSCREENREADER = 71;
- {$EXTERNALSYM SPI_SETSCREENREADER}
- SPI_GETANIMATION = 72;
- {$EXTERNALSYM SPI_GETANIMATION}
- SPI_SETANIMATION = 73;
- {$EXTERNALSYM SPI_SETANIMATION}
- SPI_GETFONTSMOOTHING = 74;
- {$EXTERNALSYM SPI_GETFONTSMOOTHING}
- SPI_SETFONTSMOOTHING = 75;
- {$EXTERNALSYM SPI_SETFONTSMOOTHING}
- SPI_SETDRAGWIDTH = 76;
- {$EXTERNALSYM SPI_SETDRAGWIDTH}
- SPI_SETDRAGHEIGHT = 77;
- {$EXTERNALSYM SPI_SETDRAGHEIGHT}
- SPI_SETHANDHELD = 78;
- {$EXTERNALSYM SPI_SETHANDHELD}
- SPI_GETLOWPOWERTIMEOUT = 79;
- {$EXTERNALSYM SPI_GETLOWPOWERTIMEOUT}
- SPI_GETPOWEROFFTIMEOUT = 80;
- {$EXTERNALSYM SPI_GETPOWEROFFTIMEOUT}
- SPI_SETLOWPOWERTIMEOUT = 81;
- {$EXTERNALSYM SPI_SETLOWPOWERTIMEOUT}
- SPI_SETPOWEROFFTIMEOUT = 82;
- {$EXTERNALSYM SPI_SETPOWEROFFTIMEOUT}
- SPI_GETLOWPOWERACTIVE = 83;
- {$EXTERNALSYM SPI_GETLOWPOWERACTIVE}
- SPI_GETPOWEROFFACTIVE = 84;
- {$EXTERNALSYM SPI_GETPOWEROFFACTIVE}
- SPI_SETLOWPOWERACTIVE = 85;
- {$EXTERNALSYM SPI_SETLOWPOWERACTIVE}
- SPI_SETPOWEROFFACTIVE = 86;
- {$EXTERNALSYM SPI_SETPOWEROFFACTIVE}
- SPI_SETCURSORS = 87;
- {$EXTERNALSYM SPI_SETCURSORS}
- SPI_SETICONS = 88;
- {$EXTERNALSYM SPI_SETICONS}
- SPI_GETDEFAULTINPUTLANG = 89;
- {$EXTERNALSYM SPI_GETDEFAULTINPUTLANG}
- SPI_SETDEFAULTINPUTLANG = 90;
- {$EXTERNALSYM SPI_SETDEFAULTINPUTLANG}
- SPI_SETLANGTOGGLE = 91;
- {$EXTERNALSYM SPI_SETLANGTOGGLE}
- SPI_GETWINDOWSEXTENSION = 92;
- {$EXTERNALSYM SPI_GETWINDOWSEXTENSION}
- SPI_SETMOUSETRAILS = 93;
- {$EXTERNALSYM SPI_SETMOUSETRAILS}
- SPI_GETMOUSETRAILS = 94;
- {$EXTERNALSYM SPI_GETMOUSETRAILS}
- SPI_SETSCREENSAVERRUNNING = 97;
- {$EXTERNALSYM SPI_SETSCREENSAVERRUNNING}
- SPI_SCREENSAVERRUNNING = SPI_SETSCREENSAVERRUNNING;
- {$EXTERNALSYM SPI_SCREENSAVERRUNNING}
- SPI_GETFILTERKEYS = 50;
- {$EXTERNALSYM SPI_GETFILTERKEYS}
- SPI_SETFILTERKEYS = 51;
- {$EXTERNALSYM SPI_SETFILTERKEYS}
- SPI_GETTOGGLEKEYS = 52;
- {$EXTERNALSYM SPI_GETTOGGLEKEYS}
- SPI_SETTOGGLEKEYS = 53;
- {$EXTERNALSYM SPI_SETTOGGLEKEYS}
- SPI_GETMOUSEKEYS = 54;
- {$EXTERNALSYM SPI_GETMOUSEKEYS}
- SPI_SETMOUSEKEYS = 55;
- {$EXTERNALSYM SPI_SETMOUSEKEYS}
- SPI_GETSHOWSOUNDS = 56;
- {$EXTERNALSYM SPI_GETSHOWSOUNDS}
- SPI_SETSHOWSOUNDS = 57;
- {$EXTERNALSYM SPI_SETSHOWSOUNDS}
- SPI_GETSTICKYKEYS = 58;
- {$EXTERNALSYM SPI_GETSTICKYKEYS}
- SPI_SETSTICKYKEYS = 59;
- {$EXTERNALSYM SPI_SETSTICKYKEYS}
- SPI_GETACCESSTIMEOUT = 60;
- {$EXTERNALSYM SPI_GETACCESSTIMEOUT}
- SPI_SETACCESSTIMEOUT = 61;
- {$EXTERNALSYM SPI_SETACCESSTIMEOUT}
- SPI_GETSERIALKEYS = 62;
- {$EXTERNALSYM SPI_GETSERIALKEYS}
- SPI_SETSERIALKEYS = 63;
- {$EXTERNALSYM SPI_SETSERIALKEYS}
- SPI_GETSOUNDSENTRY = 64;
- {$EXTERNALSYM SPI_GETSOUNDSENTRY}
- SPI_SETSOUNDSENTRY = 65;
- {$EXTERNALSYM SPI_SETSOUNDSENTRY}
- SPI_GETSNAPTODEFBUTTON = 95;
- {$EXTERNALSYM SPI_GETSNAPTODEFBUTTON}
- SPI_SETSNAPTODEFBUTTON = 96;
- {$EXTERNALSYM SPI_SETSNAPTODEFBUTTON}
- SPI_GETMOUSEHOVERWIDTH = 98;
- {$EXTERNALSYM SPI_GETMOUSEHOVERWIDTH}
- SPI_SETMOUSEHOVERWIDTH = 99;
- {$EXTERNALSYM SPI_SETMOUSEHOVERWIDTH}
- SPI_GETMOUSEHOVERHEIGHT = 100;
- {$EXTERNALSYM SPI_GETMOUSEHOVERHEIGHT}
- SPI_SETMOUSEHOVERHEIGHT = 101;
- {$EXTERNALSYM SPI_SETMOUSEHOVERHEIGHT}
- SPI_GETMOUSEHOVERTIME = 102;
- {$EXTERNALSYM SPI_GETMOUSEHOVERTIME}
- SPI_SETMOUSEHOVERTIME = 103;
- {$EXTERNALSYM SPI_SETMOUSEHOVERTIME}
- SPI_GETWHEELSCROLLLINES = 104;
- {$EXTERNALSYM SPI_GETWHEELSCROLLLINES}
- SPI_SETWHEELSCROLLLINES = 105;
- {$EXTERNALSYM SPI_SETWHEELSCROLLLINES}
- SPI_GETMENUSHOWDELAY = 106;
- {$EXTERNALSYM SPI_GETMENUSHOWDELAY}
- SPI_SETMENUSHOWDELAY = 107;
- {$EXTERNALSYM SPI_SETMENUSHOWDELAY}
-
- SPI_GETSHOWIMEUI = 110;
- {$EXTERNALSYM SPI_GETSHOWIMEUI}
- SPI_SETSHOWIMEUI = 111;
- {$EXTERNALSYM SPI_SETSHOWIMEUI}
-
- SPI_GETMOUSESPEED = 112;
- {$EXTERNALSYM SPI_GETMOUSESPEED}
- SPI_SETMOUSESPEED = 113;
- {$EXTERNALSYM SPI_SETMOUSESPEED}
- SPI_GETSCREENSAVERRUNNING = 114;
- {$EXTERNALSYM SPI_GETSCREENSAVERRUNNING}
- SPI_GETDESKWALLPAPER = 115;
- {$EXTERNALSYM SPI_GETDESKWALLPAPER}
-
- SPI_GETACTIVEWINDOWTRACKING = $1000;
- {$EXTERNALSYM SPI_GETACTIVEWINDOWTRACKING}
- SPI_SETACTIVEWINDOWTRACKING = $1001;
- {$EXTERNALSYM SPI_SETACTIVEWINDOWTRACKING}
- SPI_GETMENUANIMATION = $1002;
- {$EXTERNALSYM SPI_GETMENUANIMATION}
- SPI_SETMENUANIMATION = $1003;
- {$EXTERNALSYM SPI_SETMENUANIMATION}
- SPI_GETCOMBOBOXANIMATION = $1004;
- {$EXTERNALSYM SPI_GETCOMBOBOXANIMATION}
- SPI_SETCOMBOBOXANIMATION = $1005;
- {$EXTERNALSYM SPI_SETCOMBOBOXANIMATION}
- SPI_GETLISTBOXSMOOTHSCROLLING = $1006;
- {$EXTERNALSYM SPI_GETLISTBOXSMOOTHSCROLLING}
- SPI_SETLISTBOXSMOOTHSCROLLING = $1007;
- {$EXTERNALSYM SPI_SETLISTBOXSMOOTHSCROLLING}
- SPI_GETGRADIENTCAPTIONS = $1008;
- {$EXTERNALSYM SPI_GETGRADIENTCAPTIONS}
- SPI_SETGRADIENTCAPTIONS = $1009;
- {$EXTERNALSYM SPI_SETGRADIENTCAPTIONS}
- SPI_GETKEYBOARDCUES = $100A;
- {$EXTERNALSYM SPI_GETKEYBOARDCUES}
- SPI_SETKEYBOARDCUES = $100B;
- {$EXTERNALSYM SPI_SETKEYBOARDCUES}
- SPI_GETMENUUNDERLINES = SPI_GETKEYBOARDCUES;
- {$EXTERNALSYM SPI_GETMENUUNDERLINES}
- SPI_SETMENUUNDERLINES = SPI_SETKEYBOARDCUES;
- {$EXTERNALSYM SPI_SETMENUUNDERLINES}
- SPI_GETACTIVEWNDTRKZORDER = $100C;
- {$EXTERNALSYM SPI_GETACTIVEWNDTRKZORDER}
- SPI_SETACTIVEWNDTRKZORDER = $100D;
- {$EXTERNALSYM SPI_SETACTIVEWNDTRKZORDER}
- SPI_GETHOTTRACKING = $100E;
- {$EXTERNALSYM SPI_GETHOTTRACKING}
- SPI_SETHOTTRACKING = $100F;
- {$EXTERNALSYM SPI_SETHOTTRACKING}
- SPI_GETMENUFADE = $1012;
- {$EXTERNALSYM SPI_GETMENUFADE}
- SPI_SETMENUFADE = $1013;
- {$EXTERNALSYM SPI_SETMENUFADE}
- SPI_GETSELECTIONFADE = $1014;
- {$EXTERNALSYM SPI_GETSELECTIONFADE}
- SPI_SETSELECTIONFADE = $1015;
- {$EXTERNALSYM SPI_SETSELECTIONFADE}
- SPI_GETTOOLTIPANIMATION = $1016;
- {$EXTERNALSYM SPI_GETTOOLTIPANIMATION}
- SPI_SETTOOLTIPANIMATION = $1017;
- {$EXTERNALSYM SPI_SETTOOLTIPANIMATION}
- SPI_GETTOOLTIPFADE = $1018;
- {$EXTERNALSYM SPI_GETTOOLTIPFADE}
- SPI_SETTOOLTIPFADE = $1019;
- {$EXTERNALSYM SPI_SETTOOLTIPFADE}
- SPI_GETCURSORSHADOW = $101A;
- {$EXTERNALSYM SPI_GETCURSORSHADOW}
- SPI_SETCURSORSHADOW = $101B;
- {$EXTERNALSYM SPI_SETCURSORSHADOW}
-
- SPI_GETMOUSESONAR = $101C;
- {$EXTERNALSYM SPI_GETMOUSESONAR}
- SPI_SETMOUSESONAR = $101D;
- {$EXTERNALSYM SPI_SETMOUSESONAR}
- SPI_GETMOUSECLICKLOCK = $101E;
- {$EXTERNALSYM SPI_GETMOUSECLICKLOCK}
- SPI_SETMOUSECLICKLOCK = $101F;
- {$EXTERNALSYM SPI_SETMOUSECLICKLOCK}
- SPI_GETMOUSEVANISH = $1020;
- {$EXTERNALSYM SPI_GETMOUSEVANISH}
- SPI_SETMOUSEVANISH = $1021;
- {$EXTERNALSYM SPI_SETMOUSEVANISH}
- SPI_GETFLATMENU = $1022;
- {$EXTERNALSYM SPI_GETFLATMENU}
- SPI_SETFLATMENU = $1023;
- {$EXTERNALSYM SPI_SETFLATMENU}
- SPI_GETDROPSHADOW = $1024;
- {$EXTERNALSYM SPI_GETDROPSHADOW}
- SPI_SETDROPSHADOW = $1025;
- {$EXTERNALSYM SPI_SETDROPSHADOW}
- SPI_GETBLOCKSENDINPUTRESETS = $1026;
- {$EXTERNALSYM SPI_GETBLOCKSENDINPUTRESETS}
- SPI_SETBLOCKSENDINPUTRESETS = $1027;
- {$EXTERNALSYM SPI_SETBLOCKSENDINPUTRESETS}
-
- SPI_GETUIEFFECTS = $103E;
- {$EXTERNALSYM SPI_GETUIEFFECTS}
- SPI_SETUIEFFECTS = $103F;
- {$EXTERNALSYM SPI_SETUIEFFECTS}
-
- SPI_GETFOREGROUNDLOCKTIMEOUT = $2000;
- {$EXTERNALSYM SPI_GETFOREGROUNDLOCKTIMEOUT}
- SPI_SETFOREGROUNDLOCKTIMEOUT = $2001;
- {$EXTERNALSYM SPI_SETFOREGROUNDLOCKTIMEOUT}
- SPI_GETACTIVEWNDTRKTIMEOUT = $2002;
- {$EXTERNALSYM SPI_GETACTIVEWNDTRKTIMEOUT}
- SPI_SETACTIVEWNDTRKTIMEOUT = $2003;
- {$EXTERNALSYM SPI_SETACTIVEWNDTRKTIMEOUT}
- SPI_GETFOREGROUNDFLASHCOUNT = $2004;
- {$EXTERNALSYM SPI_GETFOREGROUNDFLASHCOUNT}
- SPI_SETFOREGROUNDFLASHCOUNT = $2005;
- {$EXTERNALSYM SPI_SETFOREGROUNDFLASHCOUNT}
- SPI_GETCARETWIDTH = $2006;
- {$EXTERNALSYM SPI_GETCARETWIDTH}
- SPI_SETCARETWIDTH = $2007;
- {$EXTERNALSYM SPI_SETCARETWIDTH}
-
- SPI_GETMOUSECLICKLOCKTIME = $2008;
- {$EXTERNALSYM SPI_GETMOUSECLICKLOCKTIME}
- SPI_SETMOUSECLICKLOCKTIME = $2009;
- {$EXTERNALSYM SPI_SETMOUSECLICKLOCKTIME}
- SPI_GETFONTSMOOTHINGTYPE = $200A;
- {$EXTERNALSYM SPI_GETFONTSMOOTHINGTYPE}
- SPI_SETFONTSMOOTHINGTYPE = $200B;
- {$EXTERNALSYM SPI_SETFONTSMOOTHINGTYPE}
-
-// constants for SPI_GETFONTSMOOTHINGTYPE and SPI_SETFONTSMOOTHINGTYPE
-
- FE_FONTSMOOTHINGSTANDARD = $0001;
- {$EXTERNALSYM FE_FONTSMOOTHINGSTANDARD}
- FE_FONTSMOOTHINGCLEARTYPE = $0002;
- {$EXTERNALSYM FE_FONTSMOOTHINGCLEARTYPE}
- FE_FONTSMOOTHINGDOCKING = $8000;
- {$EXTERNALSYM FE_FONTSMOOTHINGDOCKING}
-
- SPI_GETFONTSMOOTHINGCONTRAST = $200C;
- {$EXTERNALSYM SPI_GETFONTSMOOTHINGCONTRAST}
- SPI_SETFONTSMOOTHINGCONTRAST = $200D;
- {$EXTERNALSYM SPI_SETFONTSMOOTHINGCONTRAST}
-
- SPI_GETFOCUSBORDERWIDTH = $200E;
- {$EXTERNALSYM SPI_GETFOCUSBORDERWIDTH}
- SPI_SETFOCUSBORDERWIDTH = $200F;
- {$EXTERNALSYM SPI_SETFOCUSBORDERWIDTH}
- SPI_GETFOCUSBORDERHEIGHT = $2010;
- {$EXTERNALSYM SPI_GETFOCUSBORDERHEIGHT}
- SPI_SETFOCUSBORDERHEIGHT = $2011;
- {$EXTERNALSYM SPI_SETFOCUSBORDERHEIGHT}
-
- SPI_GETFONTSMOOTHINGORIENTATION = $2012;
- {$EXTERNALSYM SPI_GETFONTSMOOTHINGORIENTATION}
- SPI_SETFONTSMOOTHINGORIENTATION = $2013;
- {$EXTERNALSYM SPI_SETFONTSMOOTHINGORIENTATION}
-
-// constants for SPI_GETFONTSMOOTHINGORIENTATION and SPI_SETFONTSMOOTHINGORIENTATION:
-
- FE_FONTSMOOTHINGORIENTATIONBGR = $0000;
- {$EXTERNALSYM FE_FONTSMOOTHINGORIENTATIONBGR}
- FE_FONTSMOOTHINGORIENTATIONRGB = $0001;
- {$EXTERNALSYM FE_FONTSMOOTHINGORIENTATIONRGB}
-
-//
-// Flags
-//
-
- SPIF_UPDATEINIFILE = $0001;
- {$EXTERNALSYM SPIF_UPDATEINIFILE}
- SPIF_SENDWININICHANGE = $0002;
- {$EXTERNALSYM SPIF_SENDWININICHANGE}
- SPIF_SENDCHANGE = SPIF_SENDWININICHANGE;
- {$EXTERNALSYM SPIF_SENDCHANGE}
-
- METRICS_USEDEFAULT = DWORD(-1);
- {$EXTERNALSYM METRICS_USEDEFAULT}
-
-type
- LPNONCLIENTMETRICSA = ^NONCLIENTMETRICSA;
- {$EXTERNALSYM LPNONCLIENTMETRICSA}
- tagNONCLIENTMETRICSA = record
- cbSize: UINT;
- iBorderWidth: Integer;
- iScrollWidth: Integer;
- iScrollHeight: Integer;
- iCaptionWidth: Integer;
- iCaptionHeight: Integer;
- lfCaptionFont: LOGFONTA;
- iSmCaptionWidth: Integer;
- iSmCaptionHeight: Integer;
- lfSmCaptionFont: LOGFONTA;
- iMenuWidth: Integer;
- iMenuHeight: Integer;
- lfMenuFont: LOGFONTA;
- lfStatusFont: LOGFONTA;
- lfMessageFont: LOGFONTA;
- end;
- {$EXTERNALSYM tagNONCLIENTMETRICSA}
- NONCLIENTMETRICSA = tagNONCLIENTMETRICSA;
- {$EXTERNALSYM NONCLIENTMETRICSA}
- TNonClientMetricsA = NONCLIENTMETRICSA;
- PNonClientMetricsA = LPNONCLIENTMETRICSA;
-
- LPNONCLIENTMETRICSW = ^NONCLIENTMETRICSW;
- {$EXTERNALSYM LPNONCLIENTMETRICSW}
- tagNONCLIENTMETRICSW = record
- cbSize: UINT;
- iBorderWidth: Integer;
- iScrollWidth: Integer;
- iScrollHeight: Integer;
- iCaptionWidth: Integer;
- iCaptionHeight: Integer;
- lfCaptionFont: LOGFONTW;
- iSmCaptionWidth: Integer;
- iSmCaptionHeight: Integer;
- lfSmCaptionFont: LOGFONTW;
- iMenuWidth: Integer;
- iMenuHeight: Integer;
- lfMenuFont: LOGFONTW;
- lfStatusFont: LOGFONTW;
- lfMessageFont: LOGFONTW;
- end;
- {$EXTERNALSYM tagNONCLIENTMETRICSW}
- NONCLIENTMETRICSW = tagNONCLIENTMETRICSW;
- {$EXTERNALSYM NONCLIENTMETRICSW}
- TNonClientMetricsW = NONCLIENTMETRICSW;
- PNonClientMetricsW = LPNONCLIENTMETRICSW;
-
- {$IFDEF UNICODE}
- NONCLIENTMETRICS = NONCLIENTMETRICSW;
- {$EXTERNALSYM NONCLIENTMETRICS}
- LPNONCLIENTMETRICS = LPNONCLIENTMETRICSW;
- {$EXTERNALSYM LPNONCLIENTMETRICS}
- TNonClientMetrics = TNonClientMetricsW;
- PNonClientMetrics = PNonClientMetricsW;
- {$ELSE}
- NONCLIENTMETRICS = NONCLIENTMETRICSA;
- {$EXTERNALSYM NONCLIENTMETRICS}
- LPNONCLIENTMETRICS = LPNONCLIENTMETRICSA;
- {$EXTERNALSYM LPNONCLIENTMETRICS}
- TNonClientMetrics = TNonClientMetricsA;
- PNonClientMetrics = PNonClientMetricsA;
- {$ENDIF UNICODE}
-
-const
- ARW_BOTTOMLEFT = $0000;
- {$EXTERNALSYM ARW_BOTTOMLEFT}
- ARW_BOTTOMRIGHT = $0001;
- {$EXTERNALSYM ARW_BOTTOMRIGHT}
- ARW_TOPLEFT = $0002;
- {$EXTERNALSYM ARW_TOPLEFT}
- ARW_TOPRIGHT = $0003;
- {$EXTERNALSYM ARW_TOPRIGHT}
- ARW_STARTMASK = $0003;
- {$EXTERNALSYM ARW_STARTMASK}
- ARW_STARTRIGHT = $0001;
- {$EXTERNALSYM ARW_STARTRIGHT}
- ARW_STARTTOP = $0002;
- {$EXTERNALSYM ARW_STARTTOP}
-
- ARW_LEFT = $0000;
- {$EXTERNALSYM ARW_LEFT}
- ARW_RIGHT = $0000;
- {$EXTERNALSYM ARW_RIGHT}
- ARW_UP = $0004;
- {$EXTERNALSYM ARW_UP}
- ARW_DOWN = $0004;
- {$EXTERNALSYM ARW_DOWN}
- ARW_HIDE = $0008;
- {$EXTERNALSYM ARW_HIDE}
-
-type
- LPMINIMIZEDMETRICS = ^MINIMIZEDMETRICS;
- {$EXTERNALSYM LPMINIMIZEDMETRICS}
- tagMINIMIZEDMETRICS = record
- cbSize: UINT;
- iWidth: Integer;
- iHorzGap: Integer;
- iVertGap: Integer;
- iArrange: Integer;
- end;
- {$EXTERNALSYM tagMINIMIZEDMETRICS}
- MINIMIZEDMETRICS = tagMINIMIZEDMETRICS;
- {$EXTERNALSYM MINIMIZEDMETRICS}
- TMinimizedMetrics = MINIMIZEDMETRICS;
- PMinimizedMetrics = LPMINIMIZEDMETRICS;
-
- LPICONMETRICSA = ^ICONMETRICSA;
- {$EXTERNALSYM LPICONMETRICSA}
- tagICONMETRICSA = record
- cbSize: UINT;
- iHorzSpacing: Integer;
- iVertSpacing: Integer;
- iTitleWrap: Integer;
- lfFont: LOGFONTA;
- end;
- {$EXTERNALSYM tagICONMETRICSA}
- ICONMETRICSA = tagICONMETRICSA;
- {$EXTERNALSYM ICONMETRICSA}
- TIconMetricsA = ICONMETRICSA;
- PIconMetricsA = LPICONMETRICSA;
-
- LPICONMETRICSW = ^ICONMETRICSW;
- {$EXTERNALSYM LPICONMETRICSW}
- tagICONMETRICSW = record
- cbSize: UINT;
- iHorzSpacing: Integer;
- iVertSpacing: Integer;
- iTitleWrap: Integer;
- lfFont: LOGFONTW;
- end;
- {$EXTERNALSYM tagICONMETRICSW}
- ICONMETRICSW = tagICONMETRICSW;
- {$EXTERNALSYM ICONMETRICSW}
- TIconMetricsW = ICONMETRICSW;
- PIconMetricsW = LPICONMETRICSW;
-
- {$IFDEF UNICODE}
- ICONMETRICS = ICONMETRICSW;
- {$EXTERNALSYM ICONMETRICS}
- LPICONMETRICS = LPICONMETRICSW;
- {$EXTERNALSYM LPICONMETRICS}
- TIconMetrics = TIconMetricsW;
- PIconMetrics = PIconMetricsW;
- {$ELSE}
- ICONMETRICS = ICONMETRICSA;
- {$EXTERNALSYM ICONMETRICS}
- LPICONMETRICS = LPICONMETRICSA;
- {$EXTERNALSYM LPICONMETRICS}
- TIconMetrics = TIconMetricsA;
- PIconMetrics = PIconMetricsA;
- {$ENDIF UNICODE}
-
- LPANIMATIONINFO = ^ANIMATIONINFO;
- {$EXTERNALSYM LPANIMATIONINFO}
- tagANIMATIONINFO = record
- cbSize: UINT;
- iMinAnimate: Integer;
- end;
- {$EXTERNALSYM tagANIMATIONINFO}
- ANIMATIONINFO = tagANIMATIONINFO;
- {$EXTERNALSYM ANIMATIONINFO}
- TAnimationInfo = ANIMATIONINFO;
- PAnimationInfo = LPANIMATIONINFO;
-
- LPSERIALKEYSA = ^SERIALKEYSA;
- {$EXTERNALSYM LPSERIALKEYSA}
- tagSERIALKEYSA = record
- cbSize: UINT;
- dwFlags: DWORD;
- lpszActivePort: LPSTR;
- lpszPort: LPSTR;
- iBaudRate: UINT;
- iPortState: UINT;
- iActive: UINT;
- end;
- {$EXTERNALSYM tagSERIALKEYSA}
- SERIALKEYSA = tagSERIALKEYSA;
- {$EXTERNALSYM SERIALKEYSA}
- TSerialKeysA = SERIALKEYSA;
- PSerialKeysA = LPSERIALKEYSA;
-
- LPSERIALKEYSW = ^SERIALKEYSW;
- {$EXTERNALSYM LPSERIALKEYSW}
- tagSERIALKEYSW = record
- cbSize: UINT;
- dwFlags: DWORD;
- lpszActivePort: LPWSTR;
- lpszPort: LPWSTR;
- iBaudRate: UINT;
- iPortState: UINT;
- iActive: UINT;
- end;
- {$EXTERNALSYM tagSERIALKEYSW}
- SERIALKEYSW = tagSERIALKEYSW;
- {$EXTERNALSYM SERIALKEYSW}
- TSerialKeysW = SERIALKEYSW;
- PSerialKeysW = LPSERIALKEYSW;
-
- {$IFDEF UNICODE}
- SERIALKEYS = SERIALKEYSW;
- {$EXTERNALSYM SERIALKEYS}
- LPSERIALKEYS = LPSERIALKEYSW;
- {$EXTERNALSYM LPSERIALKEYS}
- TSerialKeys = TSerialKeysW;
- PSerialKeys = PSerialKeysW;
- {$ELSE}
- SERIALKEYS = SERIALKEYSA;
- {$EXTERNALSYM SERIALKEYS}
- LPSERIALKEYS = LPSERIALKEYSA;
- {$EXTERNALSYM LPSERIALKEYS}
- TSerialKeys = TSerialKeysA;
- PSerialKeys = PSerialKeysA;
- {$ENDIF UNICODE}
-
-// flags for SERIALKEYS dwFlags field//
-
-const
- SERKF_SERIALKEYSON = $00000001;
- {$EXTERNALSYM SERKF_SERIALKEYSON}
- SERKF_AVAILABLE = $00000002;
- {$EXTERNALSYM SERKF_AVAILABLE}
- SERKF_INDICATOR = $00000004;
- {$EXTERNALSYM SERKF_INDICATOR}
-
-type
- LPHIGHCONTRASTA = ^HIGHCONTRASTA;
- {$EXTERNALSYM LPHIGHCONTRASTA}
- tagHIGHCONTRASTA = record
- cbSize: UINT;
- dwFlags: DWORD;
- lpszDefaultScheme: LPSTR;
- end;
- {$EXTERNALSYM tagHIGHCONTRASTA}
- HIGHCONTRASTA = tagHIGHCONTRASTA;
- {$EXTERNALSYM HIGHCONTRASTA}
- THighContrastA = HIGHCONTRASTA;
- PHighContrastA = LPHIGHCONTRASTA;
-
- LPHIGHCONTRASTW = ^HIGHCONTRASTW;
- {$EXTERNALSYM LPHIGHCONTRASTW}
- tagHIGHCONTRASTW = record
- cbSize: UINT;
- dwFlags: DWORD;
- lpszDefaultScheme: LPWSTR;
- end;
- {$EXTERNALSYM tagHIGHCONTRASTW}
- HIGHCONTRASTW = tagHIGHCONTRASTW;
- {$EXTERNALSYM HIGHCONTRASTW}
- THighContrastW = HIGHCONTRASTW;
- PHighContrastW = LPHIGHCONTRASTW;
-
- {$IFDEF UNICODE}
- HIGHCONTRAST = HIGHCONTRASTW;
- {$EXTERNALSYM HIGHCONTRAST}
- LPHIGHCONTRAST = LPHIGHCONTRASTW;
- {$EXTERNALSYM LPHIGHCONTRAST}
- THighContrast = THighContrastW;
- PHighContrast = PHighContrastW;
- {$ELSE}
- HIGHCONTRAST = HIGHCONTRASTA;
- {$EXTERNALSYM HIGHCONTRAST}
- LPHIGHCONTRAST = LPHIGHCONTRASTA;
- {$EXTERNALSYM LPHIGHCONTRAST}
- THighContrast = THighContrastA;
- PHighContrast = PHighContrastA;
- {$ENDIF UNICODE}
-
-// flags for HIGHCONTRAST dwFlags field//
-
-const
- HCF_HIGHCONTRASTON = $00000001;
- {$EXTERNALSYM HCF_HIGHCONTRASTON}
- HCF_AVAILABLE = $00000002;
- {$EXTERNALSYM HCF_AVAILABLE}
- HCF_HOTKEYACTIVE = $00000004;
- {$EXTERNALSYM HCF_HOTKEYACTIVE}
- HCF_CONFIRMHOTKEY = $00000008;
- {$EXTERNALSYM HCF_CONFIRMHOTKEY}
- HCF_HOTKEYSOUND = $00000010;
- {$EXTERNALSYM HCF_HOTKEYSOUND}
- HCF_INDICATOR = $00000020;
- {$EXTERNALSYM HCF_INDICATOR}
- HCF_HOTKEYAVAILABLE = $00000040;
- {$EXTERNALSYM HCF_HOTKEYAVAILABLE}
-
-// Flags for ChangeDisplaySettings//
-
- CDS_UPDATEREGISTRY = $00000001;
- {$EXTERNALSYM CDS_UPDATEREGISTRY}
- CDS_TEST = $00000002;
- {$EXTERNALSYM CDS_TEST}
- CDS_FULLSCREEN = $00000004;
- {$EXTERNALSYM CDS_FULLSCREEN}
- CDS_GLOBAL = $00000008;
- {$EXTERNALSYM CDS_GLOBAL}
- CDS_SET_PRIMARY = $00000010;
- {$EXTERNALSYM CDS_SET_PRIMARY}
- CDS_VIDEOPARAMETERS = $00000020;
- {$EXTERNALSYM CDS_VIDEOPARAMETERS}
- CDS_RESET = $40000000;
- {$EXTERNALSYM CDS_RESET}
- CDS_NORESET = $10000000;
- {$EXTERNALSYM CDS_NORESET}
-
-// #include <tvout.h>
-
-// Return values for ChangeDisplaySettings
-
- DISP_CHANGE_SUCCESSFUL = 0;
- {$EXTERNALSYM DISP_CHANGE_SUCCESSFUL}
- DISP_CHANGE_RESTART = 1;
- {$EXTERNALSYM DISP_CHANGE_RESTART}
- DISP_CHANGE_FAILED = DWORD(-1);
- {$EXTERNALSYM DISP_CHANGE_FAILED}
- DISP_CHANGE_BADMODE = DWORD(-2);
- {$EXTERNALSYM DISP_CHANGE_BADMODE}
- DISP_CHANGE_NOTUPDATED = DWORD(-3);
- {$EXTERNALSYM DISP_CHANGE_NOTUPDATED}
- DISP_CHANGE_BADFLAGS = DWORD(-4);
- {$EXTERNALSYM DISP_CHANGE_BADFLAGS}
- DISP_CHANGE_BADPARAM = DWORD(-5);
- {$EXTERNALSYM DISP_CHANGE_BADPARAM}
- DISP_CHANGE_BADDUALVIEW = DWORD(-6);
- {$EXTERNALSYM DISP_CHANGE_BADDUALVIEW}
-
-function ChangeDisplaySettingsA(lpDevMode: LPDEVMODEA; dwFlags: DWORD): LONG; stdcall;
-{$EXTERNALSYM ChangeDisplaySettingsA}
-function ChangeDisplaySettingsW(lpDevMode: LPDEVMODEW; dwFlags: DWORD): LONG; stdcall;
-{$EXTERNALSYM ChangeDisplaySettingsW}
-function ChangeDisplaySettings(lpDevMode: LPDEVMODE; dwFlags: DWORD): LONG; stdcall;
-{$EXTERNALSYM ChangeDisplaySettings}
-
-function ChangeDisplaySettingsExA(lpszDeviceName: LPCSTR; lpDevMode: LPDEVMODEA;
- hwnd: HWND; dwflags: DWORD; lParam: LPVOID): LONG; stdcall;
-{$EXTERNALSYM ChangeDisplaySettingsExA}
-function ChangeDisplaySettingsExW(lpszDeviceName: LPCWSTR; lpDevMode: LPDEVMODEW;
- hwnd: HWND; dwflags: DWORD; lParam: LPVOID): LONG; stdcall;
-{$EXTERNALSYM ChangeDisplaySettingsExW}
-function ChangeDisplaySettingsEx(lpszDeviceName: LPCTSTR; lpDevMode: LPDEVMODE;
- hwnd: HWND; dwflags: DWORD; lParam: LPVOID): LONG; stdcall;
-{$EXTERNALSYM ChangeDisplaySettingsEx}
-
-const
- ENUM_CURRENT_SETTINGS = DWORD(-1);
- {$EXTERNALSYM ENUM_CURRENT_SETTINGS}
- ENUM_REGISTRY_SETTINGS = DWORD(-2);
- {$EXTERNALSYM ENUM_REGISTRY_SETTINGS}
-
-function EnumDisplaySettingsA(lpszDeviceName: LPCSTR; iModeNum: DWORD;
- var lpDevMode: DEVMODEA): BOOL; stdcall;
-{$EXTERNALSYM EnumDisplaySettingsA}
-function EnumDisplaySettingsW(lpszDeviceName: LPCWSTR; iModeNum: DWORD;
- var lpDevMode: DEVMODEW): BOOL; stdcall;
-{$EXTERNALSYM EnumDisplaySettingsW}
-function EnumDisplaySettings(lpszDeviceName: LPCTSTR; iModeNum: DWORD;
- var lpDevMode: DEVMODE): BOOL; stdcall;
-{$EXTERNALSYM EnumDisplaySettings}
-
-function EnumDisplaySettingsExA(lpszDeviceName: LPCSTR; iModeNum: DWORD;
- var lpDevMode: DEVMODEA; dwFlags: DWORD): BOOL; stdcall;
-{$EXTERNALSYM EnumDisplaySettingsExA}
-function EnumDisplaySettingsExW(lpszDeviceName: LPCWSTR; iModeNum: DWORD;
- var lpDevMode: DEVMODEW; dwFlags: DWORD): BOOL; stdcall;
-{$EXTERNALSYM EnumDisplaySettingsExW}
-function EnumDisplaySettingsEx(lpszDeviceName: LPCTSTR; iModeNum: DWORD;
- var lpDevMode: DEVMODE; dwFlags: DWORD): BOOL; stdcall;
-{$EXTERNALSYM EnumDisplaySettingsEx}
-
-// Flags for EnumDisplaySettingsEx//
-
-const
- EDS_RAWMODE = $00000002;
- {$EXTERNALSYM EDS_RAWMODE}
-
-function EnumDisplayDevicesA(lpDevice: LPCSTR; iDevNum: DWORD;
- var lpDisplayDevice: DISPLAY_DEVICEA; dwFlags: DWORD): BOOL; stdcall;
-{$EXTERNALSYM EnumDisplayDevicesA}
-function EnumDisplayDevicesW(lpDevice: LPCWSTR; iDevNum: DWORD;
- var lpDisplayDevice: DISPLAY_DEVICEW; dwFlags: DWORD): BOOL; stdcall;
-{$EXTERNALSYM EnumDisplayDevicesW}
-function EnumDisplayDevices(lpDevice: LPCTSTR; iDevNum: DWORD;
- var lpDisplayDevice: DISPLAY_DEVICE; dwFlags: DWORD): BOOL; stdcall;
-{$EXTERNALSYM EnumDisplayDevices}
-
-function SystemParametersInfoA(uiAction: UINT; uiParam: UINT;
- pvParam: PVOID; fWinIni: UINT): BOOL; stdcall;
-{$EXTERNALSYM SystemParametersInfoA}
-function SystemParametersInfoW(uiAction: UINT; uiParam: UINT;
- pvParam: PVOID; fWinIni: UINT): BOOL; stdcall;
-{$EXTERNALSYM SystemParametersInfoW}
-function SystemParametersInfo(uiAction: UINT; uiParam: UINT;
- pvParam: PVOID; fWinIni: UINT): BOOL; stdcall;
-{$EXTERNALSYM SystemParametersInfo}
-
-//
-// Accessibility support
-//
-
-type
- LPFILTERKEYS = ^FILTERKEYS;
- {$EXTERNALSYM LPFILTERKEYS}
- tagFILTERKEYS = record
- cbSize: UINT;
- dwFlags: DWORD;
- iWaitMSec: DWORD; // Acceptance Delay
- iDelayMSec: DWORD; // Delay Until Repeat
- iRepeatMSec: DWORD; // Repeat Rate
- iBounceMSec: DWORD; // Debounce Time
- end;
- {$EXTERNALSYM tagFILTERKEYS}
- FILTERKEYS = tagFILTERKEYS;
- {$EXTERNALSYM FILTERKEYS}
- TFilterKeys = FILTERKEYS;
- PFilterKeys = LPFILTERKEYS;
-
-//
-// FILTERKEYS dwFlags field
-//
-
-const
- FKF_FILTERKEYSON = $00000001;
- {$EXTERNALSYM FKF_FILTERKEYSON}
- FKF_AVAILABLE = $00000002;
- {$EXTERNALSYM FKF_AVAILABLE}
- FKF_HOTKEYACTIVE = $00000004;
- {$EXTERNALSYM FKF_HOTKEYACTIVE}
- FKF_CONFIRMHOTKEY = $00000008;
- {$EXTERNALSYM FKF_CONFIRMHOTKEY}
- FKF_HOTKEYSOUND = $00000010;
- {$EXTERNALSYM FKF_HOTKEYSOUND}
- FKF_INDICATOR = $00000020;
- {$EXTERNALSYM FKF_INDICATOR}
- FKF_CLICKON = $00000040;
- {$EXTERNALSYM FKF_CLICKON}
-
-type
- LPSTICKYKEYS = ^STICKYKEYS;
- {$EXTERNALSYM LPSTICKYKEYS}
- tagSTICKYKEYS = record
- cbSize: UINT;
- dwFlags: DWORD;
- end;
- {$EXTERNALSYM tagSTICKYKEYS}
- STICKYKEYS = tagSTICKYKEYS;
- {$EXTERNALSYM STICKYKEYS}
- TStickyKeys = STICKYKEYS;
- PStickyKeys = LPSTICKYKEYS;
-
-//
-// STICKYKEYS dwFlags field
-//
-
-const
- SKF_STICKYKEYSON = $00000001;
- {$EXTERNALSYM SKF_STICKYKEYSON}
- SKF_AVAILABLE = $00000002;
- {$EXTERNALSYM SKF_AVAILABLE}
- SKF_HOTKEYACTIVE = $00000004;
- {$EXTERNALSYM SKF_HOTKEYACTIVE}
- SKF_CONFIRMHOTKEY = $00000008;
- {$EXTERNALSYM SKF_CONFIRMHOTKEY}
- SKF_HOTKEYSOUND = $00000010;
- {$EXTERNALSYM SKF_HOTKEYSOUND}
- SKF_INDICATOR = $00000020;
- {$EXTERNALSYM SKF_INDICATOR}
- SKF_AUDIBLEFEEDBACK = $00000040;
- {$EXTERNALSYM SKF_AUDIBLEFEEDBACK}
- SKF_TRISTATE = $00000080;
- {$EXTERNALSYM SKF_TRISTATE}
- SKF_TWOKEYSOFF = $00000100;
- {$EXTERNALSYM SKF_TWOKEYSOFF}
- SKF_LALTLATCHED = $10000000;
- {$EXTERNALSYM SKF_LALTLATCHED}
- SKF_LCTLLATCHED = $04000000;
- {$EXTERNALSYM SKF_LCTLLATCHED}
- SKF_LSHIFTLATCHED = $01000000;
- {$EXTERNALSYM SKF_LSHIFTLATCHED}
- SKF_RALTLATCHED = $20000000;
- {$EXTERNALSYM SKF_RALTLATCHED}
- SKF_RCTLLATCHED = $08000000;
- {$EXTERNALSYM SKF_RCTLLATCHED}
- SKF_RSHIFTLATCHED = $02000000;
- {$EXTERNALSYM SKF_RSHIFTLATCHED}
- SKF_LWINLATCHED = $40000000;
- {$EXTERNALSYM SKF_LWINLATCHED}
- SKF_RWINLATCHED = $80000000;
- {$EXTERNALSYM SKF_RWINLATCHED}
- SKF_LALTLOCKED = $00100000;
- {$EXTERNALSYM SKF_LALTLOCKED}
- SKF_LCTLLOCKED = $00040000;
- {$EXTERNALSYM SKF_LCTLLOCKED}
- SKF_LSHIFTLOCKED = $00010000;
- {$EXTERNALSYM SKF_LSHIFTLOCKED}
- SKF_RALTLOCKED = $00200000;
- {$EXTERNALSYM SKF_RALTLOCKED}
- SKF_RCTLLOCKED = $00080000;
- {$EXTERNALSYM SKF_RCTLLOCKED}
- SKF_RSHIFTLOCKED = $00020000;
- {$EXTERNALSYM SKF_RSHIFTLOCKED}
- SKF_LWINLOCKED = $00400000;
- {$EXTERNALSYM SKF_LWINLOCKED}
- SKF_RWINLOCKED = $00800000;
- {$EXTERNALSYM SKF_RWINLOCKED}
-
-type
- LPMOUSEKEYS = ^MOUSEKEYS;
- {$EXTERNALSYM LPMOUSEKEYS}
- tagMOUSEKEYS = record
- cbSize: UINT;
- dwFlags: DWORD;
- iMaxSpeed: DWORD;
- iTimeToMaxSpeed: DWORD;
- iCtrlSpeed: DWORD;
- dwReserved1: DWORD;
- dwReserved2: DWORD;
- end;
- {$EXTERNALSYM tagMOUSEKEYS}
- MOUSEKEYS = tagMOUSEKEYS;
- {$EXTERNALSYM MOUSEKEYS}
- TMouseKeys = MOUSEKEYS;
- PMouseKeys = LPMOUSEKEYS;
-
-//
-// MOUSEKEYS dwFlags field
-//
-
-const
- MKF_MOUSEKEYSON = $00000001;
- {$EXTERNALSYM MKF_MOUSEKEYSON}
- MKF_AVAILABLE = $00000002;
- {$EXTERNALSYM MKF_AVAILABLE}
- MKF_HOTKEYACTIVE = $00000004;
- {$EXTERNALSYM MKF_HOTKEYACTIVE}
- MKF_CONFIRMHOTKEY = $00000008;
- {$EXTERNALSYM MKF_CONFIRMHOTKEY}
- MKF_HOTKEYSOUND = $00000010;
- {$EXTERNALSYM MKF_HOTKEYSOUND}
- MKF_INDICATOR = $00000020;
- {$EXTERNALSYM MKF_INDICATOR}
- MKF_MODIFIERS = $00000040;
- {$EXTERNALSYM MKF_MODIFIERS}
- MKF_REPLACENUMBERS = $00000080;
- {$EXTERNALSYM MKF_REPLACENUMBERS}
- MKF_LEFTBUTTONSEL = $10000000;
- {$EXTERNALSYM MKF_LEFTBUTTONSEL}
- MKF_RIGHTBUTTONSEL = $20000000;
- {$EXTERNALSYM MKF_RIGHTBUTTONSEL}
- MKF_LEFTBUTTONDOWN = $01000000;
- {$EXTERNALSYM MKF_LEFTBUTTONDOWN}
- MKF_RIGHTBUTTONDOWN = $02000000;
- {$EXTERNALSYM MKF_RIGHTBUTTONDOWN}
- MKF_MOUSEMODE = $80000000;
- {$EXTERNALSYM MKF_MOUSEMODE}
-
-type
- LPACCESSTIMEOUT = ^ACCESSTIMEOUT;
- {$EXTERNALSYM LPACCESSTIMEOUT}
- tagACCESSTIMEOUT = record
- cbSize: UINT;
- dwFlags: DWORD;
- iTimeOutMSec: DWORD;
- end;
- {$EXTERNALSYM tagACCESSTIMEOUT}
- ACCESSTIMEOUT = tagACCESSTIMEOUT;
- {$EXTERNALSYM ACCESSTIMEOUT}
- TAccessTimeout = ACCESSTIMEOUT;
- PAccessTimeout = LPACCESSTIMEOUT;
-
-//
-// ACCESSTIMEOUT dwFlags field
-//
-
-const
- ATF_TIMEOUTON = $00000001;
- {$EXTERNALSYM ATF_TIMEOUTON}
- ATF_ONOFFFEEDBACK = $00000002;
- {$EXTERNALSYM ATF_ONOFFFEEDBACK}
-
-// values for SOUNDSENTRY iFSGrafEffect field//
-
- SSGF_NONE = 0;
- {$EXTERNALSYM SSGF_NONE}
- SSGF_DISPLAY = 3;
- {$EXTERNALSYM SSGF_DISPLAY}
-
-// values for SOUNDSENTRY iFSTextEffect field//
-
- SSTF_NONE = 0;
- {$EXTERNALSYM SSTF_NONE}
- SSTF_CHARS = 1;
- {$EXTERNALSYM SSTF_CHARS}
- SSTF_BORDER = 2;
- {$EXTERNALSYM SSTF_BORDER}
- SSTF_DISPLAY = 3;
- {$EXTERNALSYM SSTF_DISPLAY}
-
-// values for SOUNDSENTRY iWindowsEffect field//
-
- SSWF_NONE = 0;
- {$EXTERNALSYM SSWF_NONE}
- SSWF_TITLE = 1;
- {$EXTERNALSYM SSWF_TITLE}
- SSWF_WINDOW = 2;
- {$EXTERNALSYM SSWF_WINDOW}
- SSWF_DISPLAY = 3;
- {$EXTERNALSYM SSWF_DISPLAY}
- SSWF_CUSTOM = 4;
- {$EXTERNALSYM SSWF_CUSTOM}
-
-type
- LPSOUNDSENTRYA = ^SOUNDSENTRYA;
- {$EXTERNALSYM LPSOUNDSENTRYA}
- tagSOUNDSENTRYA = record
- cbSize: UINT;
- dwFlags: DWORD;
- iFSTextEffect: DWORD;
- iFSTextEffectMSec: DWORD;
- iFSTextEffectColorBits: DWORD;
- iFSGrafEffect: DWORD;
- iFSGrafEffectMSec: DWORD;
- iFSGrafEffectColor: DWORD;
- iWindowsEffect: DWORD;
- iWindowsEffectMSec: DWORD;
- lpszWindowsEffectDLL: LPSTR;
- iWindowsEffectOrdinal: DWORD;
- end;
- {$EXTERNALSYM tagSOUNDSENTRYA}
- SOUNDSENTRYA = tagSOUNDSENTRYA;
- {$EXTERNALSYM SOUNDSENTRYA}
- TSoundsEntryA = SOUNDSENTRYA;
- PSoundsEntryA = LPSOUNDSENTRYA;
-
- LPSOUNDSENTRYW = ^SOUNDSENTRYW;
- {$EXTERNALSYM LPSOUNDSENTRYW}
- tagSOUNDSENTRYW = record
- cbSize: UINT;
- dwFlags: DWORD;
- iFSTextEffect: DWORD;
- iFSTextEffectMSec: DWORD;
- iFSTextEffectColorBits: DWORD;
- iFSGrafEffect: DWORD;
- iFSGrafEffectMSec: DWORD;
- iFSGrafEffectColor: DWORD;
- iWindowsEffect: DWORD;
- iWindowsEffectMSec: DWORD;
- lpszWindowsEffectDLL: LPWSTR;
- iWindowsEffectOrdinal: DWORD;
- end;
- {$EXTERNALSYM tagSOUNDSENTRYW}
- SOUNDSENTRYW = tagSOUNDSENTRYW;
- {$EXTERNALSYM SOUNDSENTRYW}
- TSoundsEntryW = SOUNDSENTRYW;
- PSoundsEntryW = LPSOUNDSENTRYW;
-
- {$IFDEF UNICODE}
- SOUNDSENTRY = SOUNDSENTRYW;
- {$EXTERNALSYM SOUNDSENTRY}
- LPSOUNDSENTRY = LPSOUNDSENTRYW;
- {$EXTERNALSYM LPSOUNDSENTRY}
- TSoundsEntry = TSoundsEntryW;
- PSoundsEntry = PSoundsEntryW;
- {$ELSE}
- SOUNDSENTRY = SOUNDSENTRYA;
- {$EXTERNALSYM SOUNDSENTRY}
- LPSOUNDSENTRY = LPSOUNDSENTRYA;
- {$EXTERNALSYM LPSOUNDSENTRY}
- TSoundsEntry = TSoundsEntryA;
- PSoundsEntry = PSoundsEntryA;
- {$ENDIF UNICODE}
-
-//
-// SOUNDSENTRY dwFlags field
-//
-
-const
- SSF_SOUNDSENTRYON = $00000001;
- {$EXTERNALSYM SSF_SOUNDSENTRYON}
- SSF_AVAILABLE = $00000002;
- {$EXTERNALSYM SSF_AVAILABLE}
- SSF_INDICATOR = $00000004;
- {$EXTERNALSYM SSF_INDICATOR}
-
-type
- LPTOGGLEKEYS = ^TOGGLEKEYS;
- {$EXTERNALSYM LPTOGGLEKEYS}
- tagTOGGLEKEYS = record
- cbSize: UINT;
- dwFlags: DWORD;
- end;
- {$EXTERNALSYM tagTOGGLEKEYS}
- TOGGLEKEYS = tagTOGGLEKEYS;
- {$EXTERNALSYM TOGGLEKEYS}
- TToggleKeys = TOGGLEKEYS;
- PToggleKeys = LPTOGGLEKEYS;
-
-//
-// TOGGLEKEYS dwFlags field
-//
-
-const
- TKF_TOGGLEKEYSON = $00000001;
- {$EXTERNALSYM TKF_TOGGLEKEYSON}
- TKF_AVAILABLE = $00000002;
- {$EXTERNALSYM TKF_AVAILABLE}
- TKF_HOTKEYACTIVE = $00000004;
- {$EXTERNALSYM TKF_HOTKEYACTIVE}
- TKF_CONFIRMHOTKEY = $00000008;
- {$EXTERNALSYM TKF_CONFIRMHOTKEY}
- TKF_HOTKEYSOUND = $00000010;
- {$EXTERNALSYM TKF_HOTKEYSOUND}
- TKF_INDICATOR = $00000020;
- {$EXTERNALSYM TKF_INDICATOR}
-
-//
-// Set debug level
-//
-
-procedure SetDebugErrorLevel(dwLevel: DWORD); stdcall;
-{$EXTERNALSYM SetDebugErrorLevel}
-
-//
-// SetLastErrorEx() types.
-//
-
-const
- SLE_ERROR = $00000001;
- {$EXTERNALSYM SLE_ERROR}
- SLE_MINORERROR = $00000002;
- {$EXTERNALSYM SLE_MINORERROR}
- SLE_WARNING = $00000003;
- {$EXTERNALSYM SLE_WARNING}
-
-procedure SetLastErrorEx(dwErrCode, dwType: DWORD); stdcall;
-{$EXTERNALSYM SetLastErrorEx}
-
-function InternalGetWindowText(hWnd: HWND; lpString: LPWSTR; nMaxCount: Integer): Integer; stdcall;
-{$EXTERNALSYM InternalGetWindowText}
-
-function EndTask(hWnd: HWND; fShutDown, fForce: BOOL): BOOL; stdcall;
-{$EXTERNALSYM EndTask}
-
-//
-// Multimonitor API.
-//
-
-const
- MONITOR_DEFAULTTONULL = $00000000;
- {$EXTERNALSYM MONITOR_DEFAULTTONULL}
- MONITOR_DEFAULTTOPRIMARY = $00000001;
- {$EXTERNALSYM MONITOR_DEFAULTTOPRIMARY}
- MONITOR_DEFAULTTONEAREST = $00000002;
- {$EXTERNALSYM MONITOR_DEFAULTTONEAREST}
-
-function MonitorFromPoint(pt: POINT; dwFlags: DWORD): HMONITOR; stdcall;
-{$EXTERNALSYM MonitorFromPoint}
-
-function MonitorFromRect(const lprc: RECT; dwFlags: DWORD): HMONITOR; stdcall;
-{$EXTERNALSYM MonitorFromRect}
-
-function MonitorFromWindow(hwnd: HWND; dwFlags: DWORD): HMONITOR; stdcall;
-{$EXTERNALSYM MonitorFromWindow}
-
-const
- MONITORINFOF_PRIMARY = $00000001;
- {$EXTERNALSYM MONITORINFOF_PRIMARY}
-
- CCHDEVICENAME = 32;
- {$EXTERNALSYM CCHDEVICENAME}
-
-type
- LPMONITORINFO = ^MONITORINFO;
- {$EXTERNALSYM LPMONITORINFO}
- tagMONITORINFO = record
- cbSize: DWORD;
- rcMonitor: RECT;
- rcWork: RECT;
- dwFlags: DWORD;
- end;
- {$EXTERNALSYM tagMONITORINFO}
- MONITORINFO = tagMONITORINFO;
- {$EXTERNALSYM MONITORINFO}
- TMonitorInfo = MONITORINFO;
- PMonitorInfo = LPMONITORINFO;
-
- LPMONITORINFOEXA = ^MONITORINFOEXA;
- {$EXTERNALSYM LPMONITORINFOEXA}
- tagMONITORINFOEXA = record
- MonitorInfo: MONITORINFO;
- szDevice: array [0..CCHDEVICENAME - 1] of CHAR;
- end;
- {$EXTERNALSYM tagMONITORINFOEXA}
- MONITORINFOEXA = tagMONITORINFOEXA;
- {$EXTERNALSYM MONITORINFOEXA}
- TMonitorinfoexa = MONITORINFOEXA;
- PMonitorInfoExA = LPMONITORINFOEXA;
-
- LPMONITORINFOEXW = ^MONITORINFOEXW;
- {$EXTERNALSYM LPMONITORINFOEXW}
- tagMONITORINFOEXW = record
- MonitorInfo: MONITORINFO;
- szDevice: array [0..CCHDEVICENAME - 1] of WCHAR;
- end;
- {$EXTERNALSYM tagMONITORINFOEXW}
- MONITORINFOEXW = tagMONITORINFOEXW;
- {$EXTERNALSYM MONITORINFOEXW}
- TMonitorInfoExW = MONITORINFOEXW;
- PMonitorInfoExW = LPMONITORINFOEXW;
-
- {$IFDEF UNICODE}
- MONITORINFOEX = MONITORINFOEXW;
- {$EXTERNALSYM MONITORINFOEX}
- LPMONITORINFOEX = LPMONITORINFOEXW;
- {$EXTERNALSYM LPMONITORINFOEX}
- TMonitorInfoEx = TMonitorInfoExW;
- PMonitorInfoEx = PMonitorInfoExW;
- {$ELSE}
- MONITORINFOEX = MONITORINFOEXA;
- {$EXTERNALSYM MONITORINFOEX}
- LPMONITORINFOEX = LPMONITORINFOEXA;
- {$EXTERNALSYM LPMONITORINFOEX}
- TMonitorInfoEx = TMonitorInfoExA;
- PMonitorInfoEx = PMonitorInfoExA;
- {$ENDIF UNICODE}
-
-function GetMonitorInfoA(hMonitor: HMONITOR; lpmi: LPMONITORINFO): BOOL; stdcall;
-{$EXTERNALSYM GetMonitorInfoA}
-function GetMonitorInfoW(hMonitor: HMONITOR; lpmi: LPMONITORINFO): BOOL; stdcall;
-{$EXTERNALSYM GetMonitorInfoW}
-function GetMonitorInfo(hMonitor: HMONITOR; lpmi: LPMONITORINFO): BOOL; stdcall;
-{$EXTERNALSYM GetMonitorInfo}
-
-type
- MONITORENUMPROC = function(hMonitor: HMONITOR; hdcMonitor: HDC;
- lprcMonitor: LPRECT; dwData: LPARAM): BOOL; stdcall;
- {$EXTERNALSYM MONITORENUMPROC}
- TMonitorEnumProc = MONITORENUMPROC;
-
-function EnumDisplayMonitors(hdc: HDC; lprcClip: LPCRECT;
- lpfnEnum: MONITORENUMPROC; dwData: LPARAM): BOOL; stdcall;
-{$EXTERNALSYM EnumDisplayMonitors}
-
-//
-// WinEvents - Active Accessibility hooks
-//
-
-procedure NotifyWinEvent(event: DWORD; hwnd: HWND; idObject: LONG; idChild: LONG); stdcall;
-{$EXTERNALSYM NotifyWinEvent}
-
-type
- WINEVENTPROC = procedure(hWinEventHook: HWINEVENTHOOK; event: DWORD; hwnd: HWND;
- idObject, idChild: LONG; idEventThread, dwmsEventTime: DWORD); stdcall;
- {$EXTERNALSYM WINEVENTPROC}
- TWinEventProc = WINEVENTPROC;
-
-function SetWinEventHook(eventMin: DWORD; eventMax: DWORD;
- hmodWinEventProc: HMODULE; pfnWinEventProc: WINEVENTPROC; idProcess: DWORD;
- idThread: DWORD; dwFlags: DWORD): HWINEVENTHOOK; stdcall;
-{$EXTERNALSYM SetWinEventHook}
-
-function IsWinEventHookInstalled(event: DWORD): BOOL; stdcall;
-{$EXTERNALSYM IsWinEventHookInstalled}
-
-//
-// dwFlags for SetWinEventHook
-//
-
-const
- WINEVENT_OUTOFCONTEXT = $0000; // Events are ASYNC
- {$EXTERNALSYM WINEVENT_OUTOFCONTEXT}
- WINEVENT_SKIPOWNTHREAD = $0001; // Don't call back for events on installer's thread
- {$EXTERNALSYM WINEVENT_SKIPOWNTHREAD}
- WINEVENT_SKIPOWNPROCESS = $0002; // Don't call back for events on installer's process
- {$EXTERNALSYM WINEVENT_SKIPOWNPROCESS}
- WINEVENT_INCONTEXT = $0004; // Events are SYNC, this causes your dll to be injected into every process
- {$EXTERNALSYM WINEVENT_INCONTEXT}
-
-function UnhookWinEvent(hWinEventHook: HWINEVENTHOOK): BOOL; stdcall;
-{$EXTERNALSYM UnhookWinEvent}
-
-//
-// idObject values for WinEventProc and NotifyWinEvent
-//
-
-//
-// hwnd + idObject can be used with OLEACC.DLL's OleGetObjectFromWindow()
-// to get an interface pointer to the container. indexChild is the item
-// within the container in question. Setup a VARIANT with vt VT_I4 and
-// lVal the indexChild and pass that in to all methods. Then you
-// are raring to go.
-//
-
-//
-// Common object IDs (cookies, only for sending WM_GETOBJECT to get at the
-// thing in question). Positive IDs are reserved for apps (app specific),
-// negative IDs are system things and are global, 0 means "just little old
-// me".
-//
-
-const
- CHILDID_SELF = 0;
- {$EXTERNALSYM CHILDID_SELF}
- INDEXID_OBJECT = 0;
- {$EXTERNALSYM INDEXID_OBJECT}
- INDEXID_CONTAINER = 0;
- {$EXTERNALSYM INDEXID_CONTAINER}
-
-//
-// Reserved IDs for system objects
-//
-
-const
- OBJID_WINDOW = DWORD($00000000);
- {$EXTERNALSYM OBJID_WINDOW}
- OBJID_SYSMENU = DWORD($FFFFFFFF);
- {$EXTERNALSYM OBJID_SYSMENU}
- OBJID_TITLEBAR = DWORD($FFFFFFFE);
- {$EXTERNALSYM OBJID_TITLEBAR}
- OBJID_MENU = DWORD($FFFFFFFD);
- {$EXTERNALSYM OBJID_MENU}
- OBJID_CLIENT = DWORD($FFFFFFFC);
- {$EXTERNALSYM OBJID_CLIENT}
- OBJID_VSCROLL = DWORD($FFFFFFFB);
- {$EXTERNALSYM OBJID_VSCROLL}
- OBJID_HSCROLL = DWORD($FFFFFFFA);
- {$EXTERNALSYM OBJID_HSCROLL}
- OBJID_SIZEGRIP = DWORD($FFFFFFF9);
- {$EXTERNALSYM OBJID_SIZEGRIP}
- OBJID_CARET = DWORD($FFFFFFF8);
- {$EXTERNALSYM OBJID_CARET}
- OBJID_CURSOR = DWORD($FFFFFFF7);
- {$EXTERNALSYM OBJID_CURSOR}
- OBJID_ALERT = DWORD($FFFFFFF6);
- {$EXTERNALSYM OBJID_ALERT}
- OBJID_SOUND = DWORD($FFFFFFF5);
- {$EXTERNALSYM OBJID_SOUND}
- OBJID_QUERYCLASSNAMEIDX = DWORD($FFFFFFF4);
- {$EXTERNALSYM OBJID_QUERYCLASSNAMEIDX}
- OBJID_NATIVEOM = DWORD($FFFFFFF0);
- {$EXTERNALSYM OBJID_NATIVEOM}
-
-//
-// EVENT DEFINITION
-//
-
- EVENT_MIN = $00000001;
- {$EXTERNALSYM EVENT_MIN}
- EVENT_MAX = $7FFFFFFF;
- {$EXTERNALSYM EVENT_MAX}
-
-//
-// EVENT_SYSTEM_SOUND
-// Sent when a sound is played. Currently nothing is generating this, we
-// this event when a system sound (for menus, etc) is played. Apps
-// generate this, if accessible, when a private sound is played. For
-// example, if Mail plays a "New Mail" sound.
-//
-// System Sounds:
-// (Generated by PlaySoundEvent in USER itself)
-// hwnd is NULL
-// idObject is OBJID_SOUND
-// idChild is sound child ID if one
-// App Sounds:
-// (PlaySoundEvent won't generate notification; up to app)
-// hwnd + idObject gets interface pointer to Sound object
-// idChild identifies the sound in question
-// are going to be cleaning up the SOUNDSENTRY feature in the control panel
-// and will use this at that time. Applications implementing WinEvents
-// are perfectly welcome to use it. Clients of IAccessible* will simply
-// turn around and get back a non-visual object that describes the sound.
-//
-
- EVENT_SYSTEM_SOUND = $0001;
- {$EXTERNALSYM EVENT_SYSTEM_SOUND}
-
-//
-// EVENT_SYSTEM_ALERT
-// System Alerts:
-// (Generated by MessageBox() calls for example)
-// hwnd is hwndMessageBox
-// idObject is OBJID_ALERT
-// App Alerts:
-// (Generated whenever)
-// hwnd+idObject gets interface pointer to Alert
-//
-
- EVENT_SYSTEM_ALERT = $0002;
- {$EXTERNALSYM EVENT_SYSTEM_ALERT}
-
-//
-// EVENT_SYSTEM_FOREGROUND
-// Sent when the foreground (active) window changes, even if it is changing
-// to another window in the same thread as the previous one.
-// hwnd is hwndNewForeground
-// idObject is OBJID_WINDOW
-// idChild is INDEXID_OBJECT
-//
-
- EVENT_SYSTEM_FOREGROUND = $0003;
- {$EXTERNALSYM EVENT_SYSTEM_FOREGROUND}
-
-//
-// Menu
-// hwnd is window (top level window or popup menu window)
-// idObject is ID of control (OBJID_MENU, OBJID_SYSMENU, OBJID_SELF for popup)
-// idChild is CHILDID_SELF
-
-// EVENT_SYSTEM_MENUSTART
-// EVENT_SYSTEM_MENUEND
-// For MENUSTART, hwnd+idObject+idChild refers to the control with the menu bar,
-// or the control bringing up the context menu.
-
-// Sent when entering into and leaving from menu mode (system, app bar, and
-// track popups).
-//
-
- EVENT_SYSTEM_MENUSTART = $0004;
- {$EXTERNALSYM EVENT_SYSTEM_MENUSTART}
- EVENT_SYSTEM_MENUEND = $0005;
- {$EXTERNALSYM EVENT_SYSTEM_MENUEND}
-
-//
-// EVENT_SYSTEM_MENUPOPUPSTART
-// EVENT_SYSTEM_MENUPOPUPEND
-// Sent when a menu popup comes up and just before it is taken down. Note
-// that for a call to TrackPopupMenu(), a client will see EVENT_SYSTEM_MENUSTART
-// followed almost immediately by EVENT_SYSTEM_MENUPOPUPSTART for the popup
-// being shown.
-
-// For MENUPOPUP, hwnd+idObject+idChild refers to the NEW popup coming up, not the
-// parent item which is hierarchical. You can get the parent menu/popup by
-// asking for the accParent object.
-//
-
- EVENT_SYSTEM_MENUPOPUPSTART = $0006;
- {$EXTERNALSYM EVENT_SYSTEM_MENUPOPUPSTART}
- EVENT_SYSTEM_MENUPOPUPEND = $0007;
- {$EXTERNALSYM EVENT_SYSTEM_MENUPOPUPEND}
-
-//
-// EVENT_SYSTEM_CAPTURESTART
-// EVENT_SYSTEM_CAPTUREEND
-// Sent when a window takes the capture and releases the capture.
-//
-
- EVENT_SYSTEM_CAPTURESTART = $0008;
- {$EXTERNALSYM EVENT_SYSTEM_CAPTURESTART}
- EVENT_SYSTEM_CAPTUREEND = $0009;
- {$EXTERNALSYM EVENT_SYSTEM_CAPTUREEND}
-
-//
-// Move Size
-// EVENT_SYSTEM_MOVESIZESTART
-// EVENT_SYSTEM_MOVESIZEEND
-// Sent when a window enters and leaves move-size dragging mode.
-//
-
- EVENT_SYSTEM_MOVESIZESTART = $000A;
- {$EXTERNALSYM EVENT_SYSTEM_MOVESIZESTART}
- EVENT_SYSTEM_MOVESIZEEND = $000B;
- {$EXTERNALSYM EVENT_SYSTEM_MOVESIZEEND}
-
-//
-// Context Help
-// EVENT_SYSTEM_CONTEXTHELPSTART
-// EVENT_SYSTEM_CONTEXTHELPEND
-// Sent when a window enters and leaves context sensitive help mode.
-//
-
- EVENT_SYSTEM_CONTEXTHELPSTART = $000C;
- {$EXTERNALSYM EVENT_SYSTEM_CONTEXTHELPSTART}
- EVENT_SYSTEM_CONTEXTHELPEND = $000D;
- {$EXTERNALSYM EVENT_SYSTEM_CONTEXTHELPEND}
-
-//
-// Drag & Drop
-// EVENT_SYSTEM_DRAGDROPSTART
-// EVENT_SYSTEM_DRAGDROPEND
-// Send the START notification just before going into drag&drop loop. Send
-// the END notification just after canceling out.
-// Note that it is up to apps and OLE to generate this, since the system
-// doesn't know. Like EVENT_SYSTEM_SOUND, it will be a while before this
-// is prevalent.
-//
-
- EVENT_SYSTEM_DRAGDROPSTART = $000E;
- {$EXTERNALSYM EVENT_SYSTEM_DRAGDROPSTART}
- EVENT_SYSTEM_DRAGDROPEND = $000F;
- {$EXTERNALSYM EVENT_SYSTEM_DRAGDROPEND}
-
-//
-// Dialog
-// Send the START notification right after the dialog is completely
-// initialized and visible. Send the END right before the dialog
-// is hidden and goes away.
-// EVENT_SYSTEM_DIALOGSTART
-// EVENT_SYSTEM_DIALOGEND
-//
-
- EVENT_SYSTEM_DIALOGSTART = $0010;
- {$EXTERNALSYM EVENT_SYSTEM_DIALOGSTART}
- EVENT_SYSTEM_DIALOGEND = $0011;
- {$EXTERNALSYM EVENT_SYSTEM_DIALOGEND}
-
-//
-// EVENT_SYSTEM_SCROLLING
-// EVENT_SYSTEM_SCROLLINGSTART
-// EVENT_SYSTEM_SCROLLINGEND
-// Sent when beginning and ending the tracking of a scrollbar in a window,
-// and also for scrollbar controls.
-//
-
- EVENT_SYSTEM_SCROLLINGSTART = $0012;
- {$EXTERNALSYM EVENT_SYSTEM_SCROLLINGSTART}
- EVENT_SYSTEM_SCROLLINGEND = $0013;
- {$EXTERNALSYM EVENT_SYSTEM_SCROLLINGEND}
-
-//
-// Alt-Tab Window
-// Send the START notification right after the switch window is initialized
-// and visible. Send the END right before it is hidden and goes away.
-// EVENT_SYSTEM_SWITCHSTART
-// EVENT_SYSTEM_SWITCHEND
-//
-
- EVENT_SYSTEM_SWITCHSTART = $0014;
- {$EXTERNALSYM EVENT_SYSTEM_SWITCHSTART}
- EVENT_SYSTEM_SWITCHEND = $0015;
- {$EXTERNALSYM EVENT_SYSTEM_SWITCHEND}
-
-//
-// EVENT_SYSTEM_MINIMIZESTART
-// EVENT_SYSTEM_MINIMIZEEND
-// Sent when a window minimizes and just before it restores.
-//
-
- EVENT_SYSTEM_MINIMIZESTART = $0016;
- {$EXTERNALSYM EVENT_SYSTEM_MINIMIZESTART}
- EVENT_SYSTEM_MINIMIZEEND = $0017;
- {$EXTERNALSYM EVENT_SYSTEM_MINIMIZEEND}
-
- EVENT_CONSOLE_CARET = $4001;
- {$EXTERNALSYM EVENT_CONSOLE_CARET}
- EVENT_CONSOLE_UPDATE_REGION = $4002;
- {$EXTERNALSYM EVENT_CONSOLE_UPDATE_REGION}
- EVENT_CONSOLE_UPDATE_SIMPLE = $4003;
- {$EXTERNALSYM EVENT_CONSOLE_UPDATE_SIMPLE}
- EVENT_CONSOLE_UPDATE_SCROLL = $4004;
- {$EXTERNALSYM EVENT_CONSOLE_UPDATE_SCROLL}
- EVENT_CONSOLE_LAYOUT = $4005;
- {$EXTERNALSYM EVENT_CONSOLE_LAYOUT}
- EVENT_CONSOLE_START_APPLICATION = $4006;
- {$EXTERNALSYM EVENT_CONSOLE_START_APPLICATION}
- EVENT_CONSOLE_END_APPLICATION = $4007;
- {$EXTERNALSYM EVENT_CONSOLE_END_APPLICATION}
-
-//
-// Flags for EVENT_CONSOLE_START/END_APPLICATION.
-//
-
- CONSOLE_APPLICATION_16BIT = $0001;
- {$EXTERNALSYM CONSOLE_APPLICATION_16BIT}
-
-//
-// Flags for EVENT_CONSOLE_CARET
-//
-
- CONSOLE_CARET_SELECTION = $0001;
- {$EXTERNALSYM CONSOLE_CARET_SELECTION}
- CONSOLE_CARET_VISIBLE = $0002;
- {$EXTERNALSYM CONSOLE_CARET_VISIBLE}
-
-//
-// Object events
-
-// The system AND apps generate these. The system generates these for
-// real windows. Apps generate these for objects within their window which
-// act like a separate control, e.g. an item in a list view.
-
-// When the system generate them, dwParam2 is always WMOBJID_SELF. When
-// apps generate them, apps put the has-meaning-to-the-app-only ID value
-// in dwParam2.
-// For all events, if you want detailed accessibility information, callers
-// should
-// * Call AccessibleObjectFromWindow() with the hwnd, idObject parameters
-// of the event, and IID_IAccessible as the REFIID, to get back an
-// IAccessible* to talk to
-// * Initialize and fill in a VARIANT as VT_I4 with lVal the idChild
-// parameter of the event.
-// * If idChild isn't zero, call get_accChild() in the container to see
-// if the child is an object in its own right. If so, you will get
-// back an IDispatch* object for the child. You should release the
-// parent, and call QueryInterface() on the child object to get its
-// IAccessible*. Then you talk directly to the child. Otherwise,
-// if get_accChild() returns you nothing, you should continue to
-// use the child VARIANT. You will ask the container for the properties
-// of the child identified by the VARIANT. In other words, the
-// child in this case is accessible but not a full-blown object.
-// Like a button on a titlebar which is 'small' and has no children.
-//
-
-//
-// For all EVENT_OBJECT events,
-// hwnd is the dude to Send the WM_GETOBJECT message to (unless NULL,
-// see above for system things)
-// idObject is the ID of the object that can resolve any queries a
-// client might have. It's a way to deal with windowless controls,
-// controls that are just drawn on the screen in some larger parent
-// window (like SDM), or standard frame elements of a window.
-// idChild is the piece inside of the object that is affected. This
-// allows clients to access things that are too small to have full
-// blown objects in their own right. Like the thumb of a scrollbar.
-// The hwnd/idObject pair gets you to the container, the dude you
-// probably want to talk to most of the time anyway. The idChild
-// can then be passed into the acc properties to get the name/value
-// of it as needed.
-
-// Example #1:
-// System propagating a listbox selection change
-// EVENT_OBJECT_SELECTION
-// hwnd == listbox hwnd
-// idObject == OBJID_WINDOW
-// idChild == new selected item, or CHILDID_SELF if
-// nothing now selected within container.
-// Word '97 propagating a listbox selection change
-// hwnd == SDM window
-// idObject == SDM ID to get at listbox 'control'
-// idChild == new selected item, or CHILDID_SELF if
-// nothing
-
-// Example #2:
-// System propagating a menu item selection on the menu bar
-// EVENT_OBJECT_SELECTION
-// hwnd == top level window
-// idObject == OBJID_MENU
-// idChild == ID of child menu bar item selected
-// *
-// Example #3:
-// System propagating a dropdown coming off of said menu bar item
-// EVENT_OBJECT_CREATE
-// hwnd == popup item
-// idObject == OBJID_WINDOW
-// idChild == CHILDID_SELF
-//
-// Example #4:
-//
-// For EVENT_OBJECT_REORDER, the object referred to by hwnd/idObject is the
-// PARENT container in which the zorder is occurring. This is because if
-// one child is zordering, all of them are changing their relative zorder.
-//
-
- EVENT_OBJECT_CREATE = $8000; // hwnd + ID + idChild is created item
- {$EXTERNALSYM EVENT_OBJECT_CREATE}
- EVENT_OBJECT_DESTROY = $8001; // hwnd + ID + idChild is destroyed item
- {$EXTERNALSYM EVENT_OBJECT_DESTROY}
- EVENT_OBJECT_SHOW = $8002; // hwnd + ID + idChild is shown item
- {$EXTERNALSYM EVENT_OBJECT_SHOW}
- EVENT_OBJECT_HIDE = $8003; // hwnd + ID + idChild is hidden item
- {$EXTERNALSYM EVENT_OBJECT_HIDE}
- EVENT_OBJECT_REORDER = $8004; // hwnd + ID + idChild is parent of zordering children
- {$EXTERNALSYM EVENT_OBJECT_REORDER}
-
-//
-// NOTE:
-// Minimize the number of notifications!
-//
-// When you are hiding a parent object, obviously all child objects are no
-// longer visible on screen. They still have the same "visible" status,
-// but are not truly visible. Hence do not send HIDE notifications for the
-// children also. One implies all. The same goes for SHOW.
-//
-
- EVENT_OBJECT_FOCUS = $8005; // hwnd + ID + idChild is focused item
- {$EXTERNALSYM EVENT_OBJECT_FOCUS}
- EVENT_OBJECT_SELECTION = $8006; // hwnd + ID + idChild is selected item (if only one), or idChild is OBJID_WINDOW if complex
- {$EXTERNALSYM EVENT_OBJECT_SELECTION}
- EVENT_OBJECT_SELECTIONADD = $8007; // hwnd + ID + idChild is item added
- {$EXTERNALSYM EVENT_OBJECT_SELECTIONADD}
- EVENT_OBJECT_SELECTIONREMOVE = $8008; // hwnd + ID + idChild is item removed
- {$EXTERNALSYM EVENT_OBJECT_SELECTIONREMOVE}
- EVENT_OBJECT_SELECTIONWITHIN = $8009; // hwnd + ID + idChild is parent of changed selected items
- {$EXTERNALSYM EVENT_OBJECT_SELECTIONWITHIN}
-
-//
-// NOTES:
-// There is only one "focused" child item in a parent. This is the place
-// keystrokes are going at a given moment. Hence only send a notification
-// about where the NEW focus is going. A NEW item getting the focus already
-// implies that the OLD item is losing it.
-//
-// SELECTION however can be multiple. Hence the different SELECTION
-// notifications. Here's when to use each:
-//
-// (1) Send a SELECTION notification in the simple single selection
-// case (like the focus) when the item with the selection is
-// merely moving to a different item within a container. hwnd + ID
-// is the container control, idChildItem is the new child with the
-// selection.
-//
-// (2) Send a SELECTIONADD notification when a new item has simply been added
-// to the selection within a container. This is appropriate when the
-// number of newly selected items is very small. hwnd + ID is the
-// container control, idChildItem is the new child added to the selection.
-//
-// (3) Send a SELECTIONREMOVE notification when a new item has simply been
-// removed from the selection within a container. This is appropriate
-// when the number of newly selected items is very small, just like
-// SELECTIONADD. hwnd + ID is the container control, idChildItem is the
-// new child removed from the selection.
-//
-// (4) Send a SELECTIONWITHIN notification when the selected items within a
-// control have changed substantially. Rather than propagate a large
-// number of changes to reflect removal for some items, addition of
-// others, just tell somebody who cares that a lot happened. It will
-// be faster an easier for somebody watching to just turn around and
-// query the container control what the new bunch of selected items
-// are.
-//
-
- EVENT_OBJECT_STATECHANGE = $800A; // hwnd + ID + idChild is item w/ state change
- {$EXTERNALSYM EVENT_OBJECT_STATECHANGE}
-
-//
-// Examples of when to send an EVENT_OBJECT_STATECHANGE include
-// * It is being enabled/disabled (USER does for windows)
-// * It is being pressed/released (USER does for buttons)
-// * It is being checked/unchecked (USER does for radio/check buttons)
-//
-
- EVENT_OBJECT_LOCATIONCHANGE = $800B; // hwnd + ID + idChild is moved/sized item
- {$EXTERNALSYM EVENT_OBJECT_LOCATIONCHANGE}
-
-//
-// Note:
-// A LOCATIONCHANGE is not sent for every child object when the parent
-// changes shape/moves. Send one notification for the topmost object
-// that is changing. For example, if the user resizes a top level window,
-// USER will generate a LOCATIONCHANGE for it, but not for the menu bar,
-// title bar, scrollbars, etc. that are also changing shape/moving.
-//
-// In other words, it only generates LOCATIONCHANGE notifications for
-// real windows that are moving/sizing. It will not generate a LOCATIONCHANGE
-// for every non-floating child window when the parent moves (the children are
-// logically moving also on screen, but not relative to the parent).
-//
-// Now, if the app itself resizes child windows as a result of being
-// sized, USER will generate LOCATIONCHANGEs for those dudes also because
-// it doesn't know better.
-//
-// Note also that USER will generate LOCATIONCHANGE notifications for two
-// non-window sys objects:
-// (1) System caret
-// (2) Cursor
-//
-
- EVENT_OBJECT_NAMECHANGE = $800C; // hwnd + ID + idChild is item w/ name change
- {$EXTERNALSYM EVENT_OBJECT_NAMECHANGE}
- EVENT_OBJECT_DESCRIPTIONCHANGE = $800D; // hwnd + ID + idChild is item w/ desc change
- {$EXTERNALSYM EVENT_OBJECT_DESCRIPTIONCHANGE}
- EVENT_OBJECT_VALUECHANGE = $800E; // hwnd + ID + idChild is item w/ value change
- {$EXTERNALSYM EVENT_OBJECT_VALUECHANGE}
- EVENT_OBJECT_PARENTCHANGE = $800F; // hwnd + ID + idChild is item w/ new parent
- {$EXTERNALSYM EVENT_OBJECT_PARENTCHANGE}
- EVENT_OBJECT_HELPCHANGE = $8010; // hwnd + ID + idChild is item w/ help change
- {$EXTERNALSYM EVENT_OBJECT_HELPCHANGE}
- EVENT_OBJECT_DEFACTIONCHANGE = $8011; // hwnd + ID + idChild is item w/ def action change
- {$EXTERNALSYM EVENT_OBJECT_DEFACTIONCHANGE}
- EVENT_OBJECT_ACCELERATORCHANGE = $8012; // hwnd + ID + idChild is item w/ keybd accel change
- {$EXTERNALSYM EVENT_OBJECT_ACCELERATORCHANGE}
-
-//
-// Child IDs
-//
-
-//
-// System Sounds (idChild of system SOUND notification)
-//
-
- SOUND_SYSTEM_STARTUP = 1;
- {$EXTERNALSYM SOUND_SYSTEM_STARTUP}
- SOUND_SYSTEM_SHUTDOWN = 2;
- {$EXTERNALSYM SOUND_SYSTEM_SHUTDOWN}
- SOUND_SYSTEM_BEEP = 3;
- {$EXTERNALSYM SOUND_SYSTEM_BEEP}
- SOUND_SYSTEM_ERROR = 4;
- {$EXTERNALSYM SOUND_SYSTEM_ERROR}
- SOUND_SYSTEM_QUESTION = 5;
- {$EXTERNALSYM SOUND_SYSTEM_QUESTION}
- SOUND_SYSTEM_WARNING = 6;
- {$EXTERNALSYM SOUND_SYSTEM_WARNING}
- SOUND_SYSTEM_INFORMATION = 7;
- {$EXTERNALSYM SOUND_SYSTEM_INFORMATION}
- SOUND_SYSTEM_MAXIMIZE = 8;
- {$EXTERNALSYM SOUND_SYSTEM_MAXIMIZE}
- SOUND_SYSTEM_MINIMIZE = 9;
- {$EXTERNALSYM SOUND_SYSTEM_MINIMIZE}
- SOUND_SYSTEM_RESTOREUP = 10;
- {$EXTERNALSYM SOUND_SYSTEM_RESTOREUP}
- SOUND_SYSTEM_RESTOREDOWN = 11;
- {$EXTERNALSYM SOUND_SYSTEM_RESTOREDOWN}
- SOUND_SYSTEM_APPSTART = 12;
- {$EXTERNALSYM SOUND_SYSTEM_APPSTART}
- SOUND_SYSTEM_FAULT = 13;
- {$EXTERNALSYM SOUND_SYSTEM_FAULT}
- SOUND_SYSTEM_APPEND = 14;
- {$EXTERNALSYM SOUND_SYSTEM_APPEND}
- SOUND_SYSTEM_MENUCOMMAND = 15;
- {$EXTERNALSYM SOUND_SYSTEM_MENUCOMMAND}
- SOUND_SYSTEM_MENUPOPUP = 16;
- {$EXTERNALSYM SOUND_SYSTEM_MENUPOPUP}
- CSOUND_SYSTEM = 16;
- {$EXTERNALSYM CSOUND_SYSTEM}
-
-//
-// System Alerts (indexChild of system ALERT notification)
-//
-
- ALERT_SYSTEM_INFORMATIONAL = 1; // MB_INFORMATION
- {$EXTERNALSYM ALERT_SYSTEM_INFORMATIONAL}
- ALERT_SYSTEM_WARNING = 2; // MB_WARNING
- {$EXTERNALSYM ALERT_SYSTEM_WARNING}
- ALERT_SYSTEM_ERROR = 3; // MB_ERROR
- {$EXTERNALSYM ALERT_SYSTEM_ERROR}
- ALERT_SYSTEM_QUERY = 4; // MB_QUESTION
- {$EXTERNALSYM ALERT_SYSTEM_QUERY}
- ALERT_SYSTEM_CRITICAL = 5; // HardSysErrBox
- {$EXTERNALSYM ALERT_SYSTEM_CRITICAL}
- CALERT_SYSTEM = 6;
- {$EXTERNALSYM CALERT_SYSTEM}
-
-type
- LPGUITHREADINFO = ^GUITHREADINFO;
- {$EXTERNALSYM LPGUITHREADINFO}
- tagGUITHREADINFO = record
- cbSize: DWORD;
- flags: DWORD;
- hwndActive: HWND;
- hwndFocus: HWND;
- hwndCapture: HWND;
- hwndMenuOwner: HWND;
- hwndMoveSize: HWND;
- hwndCaret: HWND;
- rcCaret: RECT;
- end;
- {$EXTERNALSYM tagGUITHREADINFO}
- GUITHREADINFO = tagGUITHREADINFO;
- {$EXTERNALSYM GUITHREADINFO}
- TGuiThreadInfo = GUITHREADINFO;
- PGuiThreadInfo = LPGUITHREADINFO;
-
-const
- GUI_CARETBLINKING = $00000001;
- {$EXTERNALSYM GUI_CARETBLINKING}
- GUI_INMOVESIZE = $00000002;
- {$EXTERNALSYM GUI_INMOVESIZE}
- GUI_INMENUMODE = $00000004;
- {$EXTERNALSYM GUI_INMENUMODE}
- GUI_SYSTEMMENUMODE = $00000008;
- {$EXTERNALSYM GUI_SYSTEMMENUMODE}
- GUI_POPUPMENUMODE = $00000010;
- {$EXTERNALSYM GUI_POPUPMENUMODE}
- GUI_16BITTASK = $00000020;
- {$EXTERNALSYM GUI_16BITTASK}
-
-function GetGUIThreadInfo(idThread: DWORD; var pgui: GUITHREADINFO): BOOL; stdcall;
-{$EXTERNALSYM GetGUIThreadInfo}
-
-function GetWindowModuleFileNameA(hwnd: HWND; pszFileName: LPSTR; cchFileNameMax: UINT): UINT; stdcall;
-{$EXTERNALSYM GetWindowModuleFileNameA}
-function GetWindowModuleFileNameW(hwnd: HWND; pszFileName: LPWSTR; cchFileNameMax: UINT): UINT; stdcall;
-{$EXTERNALSYM GetWindowModuleFileNameW}
-function GetWindowModuleFileName(hwnd: HWND; pszFileName: LPTSTR; cchFileNameMax: UINT): UINT; stdcall;
-{$EXTERNALSYM GetWindowModuleFileName}
-
-const
- STATE_SYSTEM_UNAVAILABLE = $00000001; // Disabled
- {$EXTERNALSYM STATE_SYSTEM_UNAVAILABLE}
- STATE_SYSTEM_SELECTED = $00000002;
- {$EXTERNALSYM STATE_SYSTEM_SELECTED}
- STATE_SYSTEM_FOCUSED = $00000004;
- {$EXTERNALSYM STATE_SYSTEM_FOCUSED}
- STATE_SYSTEM_PRESSED = $00000008;
- {$EXTERNALSYM STATE_SYSTEM_PRESSED}
- STATE_SYSTEM_CHECKED = $00000010;
- {$EXTERNALSYM STATE_SYSTEM_CHECKED}
- STATE_SYSTEM_MIXED = $00000020; // 3-state checkbox or toolbar button
- {$EXTERNALSYM STATE_SYSTEM_MIXED}
- STATE_SYSTEM_INDETERMINATE = STATE_SYSTEM_MIXED;
- {$EXTERNALSYM STATE_SYSTEM_INDETERMINATE}
- STATE_SYSTEM_READONLY = $00000040;
- {$EXTERNALSYM STATE_SYSTEM_READONLY}
- STATE_SYSTEM_HOTTRACKED = $00000080;
- {$EXTERNALSYM STATE_SYSTEM_HOTTRACKED}
- STATE_SYSTEM_DEFAULT = $00000100;
- {$EXTERNALSYM STATE_SYSTEM_DEFAULT}
- STATE_SYSTEM_EXPANDED = $00000200;
- {$EXTERNALSYM STATE_SYSTEM_EXPANDED}
- STATE_SYSTEM_COLLAPSED = $00000400;
- {$EXTERNALSYM STATE_SYSTEM_COLLAPSED}
- STATE_SYSTEM_BUSY = $00000800;
- {$EXTERNALSYM STATE_SYSTEM_BUSY}
- STATE_SYSTEM_FLOATING = $00001000; // Children "owned" not "contained" by parent
- {$EXTERNALSYM STATE_SYSTEM_FLOATING}
- STATE_SYSTEM_MARQUEED = $00002000;
- {$EXTERNALSYM STATE_SYSTEM_MARQUEED}
- STATE_SYSTEM_ANIMATED = $00004000;
- {$EXTERNALSYM STATE_SYSTEM_ANIMATED}
- STATE_SYSTEM_INVISIBLE = $00008000;
- {$EXTERNALSYM STATE_SYSTEM_INVISIBLE}
- STATE_SYSTEM_OFFSCREEN = $00010000;
- {$EXTERNALSYM STATE_SYSTEM_OFFSCREEN}
- STATE_SYSTEM_SIZEABLE = $00020000;
- {$EXTERNALSYM STATE_SYSTEM_SIZEABLE}
- STATE_SYSTEM_MOVEABLE = $00040000;
- {$EXTERNALSYM STATE_SYSTEM_MOVEABLE}
- STATE_SYSTEM_SELFVOICING = $00080000;
- {$EXTERNALSYM STATE_SYSTEM_SELFVOICING}
- STATE_SYSTEM_FOCUSABLE = $00100000;
- {$EXTERNALSYM STATE_SYSTEM_FOCUSABLE}
- STATE_SYSTEM_SELECTABLE = $00200000;
- {$EXTERNALSYM STATE_SYSTEM_SELECTABLE}
- STATE_SYSTEM_LINKED = $00400000;
- {$EXTERNALSYM STATE_SYSTEM_LINKED}
- STATE_SYSTEM_TRAVERSED = $00800000;
- {$EXTERNALSYM STATE_SYSTEM_TRAVERSED}
- STATE_SYSTEM_MULTISELECTABLE = $01000000; // Supports multiple selection
- {$EXTERNALSYM STATE_SYSTEM_MULTISELECTABLE}
- STATE_SYSTEM_EXTSELECTABLE = $02000000; // Supports extended selection
- {$EXTERNALSYM STATE_SYSTEM_EXTSELECTABLE}
- STATE_SYSTEM_ALERT_LOW = $04000000; // This information is of low priority
- {$EXTERNALSYM STATE_SYSTEM_ALERT_LOW}
- STATE_SYSTEM_ALERT_MEDIUM = $08000000; // This information is of medium priority
- {$EXTERNALSYM STATE_SYSTEM_ALERT_MEDIUM}
- STATE_SYSTEM_ALERT_HIGH = $10000000; // This information is of high priority
- {$EXTERNALSYM STATE_SYSTEM_ALERT_HIGH}
- STATE_SYSTEM_PROTECTED = $20000000; // access to this is restricted
- {$EXTERNALSYM STATE_SYSTEM_PROTECTED}
- STATE_SYSTEM_VALID = $3FFFFFFF;
- {$EXTERNALSYM STATE_SYSTEM_VALID}
-
- CCHILDREN_TITLEBAR = 5;
- {$EXTERNALSYM CCHILDREN_TITLEBAR}
- CCHILDREN_SCROLLBAR = 5;
- {$EXTERNALSYM CCHILDREN_SCROLLBAR}
-
-//
-// Information about the global cursor.
-//
-
-type
- LPCURSORINFO = ^CURSORINFO;
- {$EXTERNALSYM LPCURSORINFO}
- tagCURSORINFO = record
- cbSize: DWORD;
- flags: DWORD;
- hCursor: HCURSOR;
- ptScreenPos: POINT;
- end;
- {$EXTERNALSYM tagCURSORINFO}
- CURSORINFO = tagCURSORINFO;
- {$EXTERNALSYM CURSORINFO}
- TCursorInfo = CURSORINFO;
- PCursorInfo = LPCURSORINFO;
-
-const
- CURSOR_SHOWING = $00000001;
- {$EXTERNALSYM CURSOR_SHOWING}
-
-function GetCursorInfo(var pci: CURSORINFO): BOOL; stdcall;
-{$EXTERNALSYM GetCursorInfo}
-
-//
-// Window information snapshot
-//
-
-type
- LPWINDOWINFO = ^WINDOWINFO;
- {$EXTERNALSYM LPWINDOWINFO}
- tagWINDOWINFO = record
- cbSize: DWORD;
- rcWindow: RECT;
- rcClient: RECT;
- dwStyle: DWORD;
- dwExStyle: DWORD;
- dwWindowStatus: DWORD;
- cxWindowBorders: UINT;
- cyWindowBorders: UINT;
- atomWindowType: ATOM;
- wCreatorVersion: WORD;
- end;
- {$EXTERNALSYM tagWINDOWINFO}
- WINDOWINFO = tagWINDOWINFO;
- {$EXTERNALSYM WINDOWINFO}
- TWindowInfo = WINDOWINFO;
- PWindowInfo = LPWINDOWINFO;
-
-const
- WS_ACTIVECAPTION = $0001;
- {$EXTERNALSYM WS_ACTIVECAPTION}
-
-function GetWindowInfo(hwnd: HWND; var pwi: WINDOWINFO): BOOL; stdcall;
-{$EXTERNALSYM GetWindowInfo}
-
-//
-// Titlebar information.
-//
-
-type
- LPTITLEBARINFO = ^TITLEBARINFO;
- {$EXTERNALSYM LPTITLEBARINFO}
- tagTITLEBARINFO = record
- cbSize: DWORD;
- rcTitleBar: RECT;
- rgstate: array [0..CCHILDREN_TITLEBAR] of DWORD;
- end;
- {$EXTERNALSYM tagTITLEBARINFO}
- TITLEBARINFO = tagTITLEBARINFO;
- {$EXTERNALSYM TITLEBARINFO}
- TTitleBarInfo = TITLEBARINFO;
- PTitleBarInfo = LPTITLEBARINFO;
-
-function GetTitleBarInfo(hwnd: HWND; var pti: TITLEBARINFO): BOOL; stdcall;
-{$EXTERNALSYM GetTitleBarInfo}
-
-//
-// Menubar information
-//
-
-type
- LPMENUBARINFO = ^MENUBARINFO;
- {$EXTERNALSYM LPMENUBARINFO}
- tagMENUBARINFO = record
- cbSize: DWORD;
- rcBar: RECT; // rect of bar, popup, item
- hMenu: HMENU; // real menu handle of bar, popup
- hwndMenu: HWND; // hwnd of item submenu if one
- Flags: DWORD;
- // BOOL fBarFocused:1; // bar, popup has the focus
- // BOOL fFocused:1; // item has the focus
- end;
- {$EXTERNALSYM tagMENUBARINFO}
- MENUBARINFO = tagMENUBARINFO;
- {$EXTERNALSYM MENUBARINFO}
- TMenuBarInfo = MENUBARINFO;
- PMenuBarInfo = LPMENUBARINFO;
-
-function GetMenuBarInfo(hwnd: HWND; idObject: LONG; idItem: LONG;
- var pmbi: MENUBARINFO): BOOL; stdcall;
-{$EXTERNALSYM GetMenuBarInfo}
-
-//
-// Scrollbar information
-//
-
-type
- LPSCROLLBARINFO = ^SCROLLBARINFO;
- {$EXTERNALSYM LPSCROLLBARINFO}
- tagSCROLLBARINFO = record
- cbSize: DWORD;
- rcScrollBar: RECT;
- dxyLineButton: Integer;
- xyThumbTop: Integer;
- xyThumbBottom: Integer;
- reserved: Integer;
- rgstate: array [0..CCHILDREN_SCROLLBAR] of DWORD;
- end;
- {$EXTERNALSYM tagSCROLLBARINFO}
- SCROLLBARINFO = tagSCROLLBARINFO;
- {$EXTERNALSYM SCROLLBARINFO}
- TScrollBarInfo = SCROLLBARINFO;
- PScrollBarInfo = LPSCROLLBARINFO;
-
-function GetScrollBarInfo(hwnd: HWND; idObject: LONG; var psbi: SCROLLBARINFO): BOOL; stdcall;
-{$EXTERNALSYM GetScrollBarInfo}
-
-//
-// Combobox information
-//
-
-type
- LPCOMBOBOXINFO = ^COMBOBOXINFO;
- {$EXTERNALSYM LPCOMBOBOXINFO}
- tagCOMBOBOXINFO = record
- cbSize: DWORD;
- rcItem: RECT;
- rcButton: RECT;
- stateButton: DWORD;
- hwndCombo: HWND;
- hwndItem: HWND;
- hwndList: HWND;
- end;
- {$EXTERNALSYM tagCOMBOBOXINFO}
- COMBOBOXINFO = tagCOMBOBOXINFO;
- {$EXTERNALSYM COMBOBOXINFO}
- TComboBoxInfo = COMBOBOXINFO;
- PComboBoxInfo = LPCOMBOBOXINFO;
-
-function GetComboBoxInfo(hwndCombo: HWND; var pcbi: COMBOBOXINFO): BOOL; stdcall;
-{$EXTERNALSYM GetComboBoxInfo}
-
-//
-// The "real" ancestor window
-//
-
-const
- GA_PARENT = 1;
- {$EXTERNALSYM GA_PARENT}
- GA_ROOT = 2;
- {$EXTERNALSYM GA_ROOT}
- GA_ROOTOWNER = 3;
- {$EXTERNALSYM GA_ROOTOWNER}
-
-function GetAncestor(hwnd: HWND; gaFlags: UINT): HWND; stdcall;
-{$EXTERNALSYM GetAncestor}
-
-//
-// This gets the REAL child window at the point. If it is in the dead
-// space of a group box, it will try a sibling behind it. But static
-// fields will get returned. In other words, it is kind of a cross between
-// ChildWindowFromPointEx and WindowFromPoint.
-//
-
-function RealChildWindowFromPoint(hwndParent: HWND; ptParentClientCoords: POINT): HWND; stdcall;
-{$EXTERNALSYM RealChildWindowFromPoint}
-
-//
-// This gets the name of the window TYPE, not class. This allows us to
-// recognize ThunderButton32 et al.
-//
-
-function RealGetWindowClassA(hwnd: HWND; pszType: LPSTR; cchType: UINT): UINT; stdcall;
-{$EXTERNALSYM RealGetWindowClassA}
-
-//
-// This gets the name of the window TYPE, not class. This allows us to
-// recognize ThunderButton32 et al.
-//
-
-function RealGetWindowClassW(hwnd: HWND; pszType: LPWSTR; cchType: UINT): UINT; stdcall;
-{$EXTERNALSYM RealGetWindowClassW}
-function RealGetWindowClass(hwnd: HWND; pszType: LPTSTR; cchType: UINT): UINT; stdcall;
-{$EXTERNALSYM RealGetWindowClass}
-
-//
-// Alt-Tab Switch window information.
-//
-
-type
- LPALTTABINFO = ^ALTTABINFO;
- {$EXTERNALSYM LPALTTABINFO}
- tagALTTABINFO = record
- cbSize: DWORD;
- cItems: Integer;
- cColumns: Integer;
- cRows: Integer;
- iColFocus: Integer;
- iRowFocus: Integer;
- cxItem: Integer;
- cyItem: Integer;
- ptStart: POINT;
- end;
- {$EXTERNALSYM tagALTTABINFO}
- ALTTABINFO = tagALTTABINFO;
- {$EXTERNALSYM ALTTABINFO}
- TAltTabInfo = ALTTABINFO;
- PAltTabInfo = LPALTTABINFO;
-
-function GetAltTabInfoA(hwnd: HWND; iItem: Integer; var pati: ALTTABINFO;
- pszItemText: LPSTR; cchItemText: UINT): BOOL; stdcall;
-{$EXTERNALSYM GetAltTabInfoA}
-function GetAltTabInfoW(hwnd: HWND; iItem: Integer; var pati: ALTTABINFO;
- pszItemText: LPWSTR; cchItemText: UINT): BOOL; stdcall;
-{$EXTERNALSYM GetAltTabInfoW}
-function GetAltTabInfo(hwnd: HWND; iItem: Integer; var pati: ALTTABINFO;
- pszItemText: LPTSTR; cchItemText: UINT): BOOL; stdcall;
-{$EXTERNALSYM GetAltTabInfo}
-
-//
-// Listbox information.
-// Returns the number of items per row.
-//
-
-function GetListBoxInfo(hwnd: HWND): DWORD; stdcall;
-{$EXTERNALSYM GetListBoxInfo}
-
-function LockWorkStation: BOOL; stdcall;
-{$EXTERNALSYM LockWorkStation}
-
-function UserHandleGrantAccess(hUserHandle, hJob: HANDLE; bGrant: BOOL): BOOL; stdcall;
-{$EXTERNALSYM UserHandleGrantAccess}
-
-//
-// Raw Input Messages.
-//
-
-type
- HRAWINPUT = HANDLE;
- {$EXTERNALSYM HRAWINPUT}
-
-//
-// WM_INPUT wParam
-//
-
-//
-// Use this macro to get the input code from wParam.
-//
-
-function GET_RAWINPUT_CODE_WPARAM(wParam: WPARAM): DWORD;
-{$EXTERNALSYM GET_RAWINPUT_CODE_WPARAM}
-
-//
-// The input is in the regular message flow,
-// the app is required to call DefWindowProc
-// so that the system can perform clean ups.
-//
-
-const
- RIM_INPUT = 0;
- {$EXTERNALSYM RIM_INPUT}
-
-//
-// The input is sink only. The app is expected
-// to behave nicely.
-//
-
- RIM_INPUTSINK = 1;
- {$EXTERNALSYM RIM_INPUTSINK}
-
-//
-// Raw Input data header
-//
-
-type
- tagRAWINPUTHEADER = record
- dwType: DWORD;
- dwSize: DWORD;
- hDevice: HANDLE;
- wParam: WPARAM;
- end;
- {$EXTERNALSYM tagRAWINPUTHEADER}
- RAWINPUTHEADER = tagRAWINPUTHEADER;
- {$EXTERNALSYM RAWINPUTHEADER}
- PRAWINPUTHEADER = ^RAWINPUTHEADER;
- {$EXTERNALSYM PRAWINPUTHEADER}
- LPRAWINPUTHEADER = ^RAWINPUTHEADER;
- {$EXTERNALSYM LPRAWINPUTHEADER}
- TRawInputHeader = RAWINPUTHEADER;
-
-//
-// Type of the raw input
-//
-
-const
- RIM_TYPEMOUSE = 0;
- {$EXTERNALSYM RIM_TYPEMOUSE}
- RIM_TYPEKEYBOARD = 1;
- {$EXTERNALSYM RIM_TYPEKEYBOARD}
- RIM_TYPEHID = 2;
- {$EXTERNALSYM RIM_TYPEHID}
-
-//
-// Raw format of the mouse input
-//
-
-type
- tagRAWMOUSE = record
- //
- // Indicator flags.
- //
- usFlags: USHORT;
-
- //
- // The transition state of the mouse buttons.
- //
-
- union: record
- case Integer of
- 0: (
- ulButtons: ULONG);
- 1: (
- usButtonFlags: USHORT;
- usButtonData: USHORT);
- end;
-
- //
- // The raw state of the mouse buttons.
- //
- ulRawButtons: ULONG;
-
- //
- // The signed relative or absolute motion in the X direction.
- //
- lLastX: LONG;
-
- //
- // The signed relative or absolute motion in the Y direction.
- //
- lLastY: LONG;
-
- //
- // Device-specific additional information for the event.
- //
- ulExtraInformation: ULONG;
- end;
- {$EXTERNALSYM tagRAWMOUSE}
- RAWMOUSE = tagRAWMOUSE;
- {$EXTERNALSYM RAWMOUSE}
- PRAWMOUSE = ^RAWMOUSE;
- {$EXTERNALSYM PRAWMOUSE}
- LPRAWMOUSE = ^RAWMOUSE;
- {$EXTERNALSYM LPRAWMOUSE}
- TRawMouse = RAWMOUSE;
-
-//
-// Define the mouse button state indicators.
-//
-
-const
- RI_MOUSE_LEFT_BUTTON_DOWN = $0001; // Left Button changed to down.
- {$EXTERNALSYM RI_MOUSE_LEFT_BUTTON_DOWN}
- RI_MOUSE_LEFT_BUTTON_UP = $0002; // Left Button changed to up.
- {$EXTERNALSYM RI_MOUSE_LEFT_BUTTON_UP}
- RI_MOUSE_RIGHT_BUTTON_DOWN = $0004; // Right Button changed to down.
- {$EXTERNALSYM RI_MOUSE_RIGHT_BUTTON_DOWN}
- RI_MOUSE_RIGHT_BUTTON_UP = $0008; // Right Button changed to up.
- {$EXTERNALSYM RI_MOUSE_RIGHT_BUTTON_UP}
- RI_MOUSE_MIDDLE_BUTTON_DOWN = $0010; // Middle Button changed to down.
- {$EXTERNALSYM RI_MOUSE_MIDDLE_BUTTON_DOWN}
- RI_MOUSE_MIDDLE_BUTTON_UP = $0020; // Middle Button changed to up.
- {$EXTERNALSYM RI_MOUSE_MIDDLE_BUTTON_UP}
-
- RI_MOUSE_BUTTON_1_DOWN = RI_MOUSE_LEFT_BUTTON_DOWN;
- {$EXTERNALSYM RI_MOUSE_BUTTON_1_DOWN}
- RI_MOUSE_BUTTON_1_UP = RI_MOUSE_LEFT_BUTTON_UP;
- {$EXTERNALSYM RI_MOUSE_BUTTON_1_UP}
- RI_MOUSE_BUTTON_2_DOWN = RI_MOUSE_RIGHT_BUTTON_DOWN;
- {$EXTERNALSYM RI_MOUSE_BUTTON_2_DOWN}
- RI_MOUSE_BUTTON_2_UP = RI_MOUSE_RIGHT_BUTTON_UP;
- {$EXTERNALSYM RI_MOUSE_BUTTON_2_UP}
- RI_MOUSE_BUTTON_3_DOWN = RI_MOUSE_MIDDLE_BUTTON_DOWN;
- {$EXTERNALSYM RI_MOUSE_BUTTON_3_DOWN}
- RI_MOUSE_BUTTON_3_UP = RI_MOUSE_MIDDLE_BUTTON_UP;
- {$EXTERNALSYM RI_MOUSE_BUTTON_3_UP}
-
- RI_MOUSE_BUTTON_4_DOWN = $0040;
- {$EXTERNALSYM RI_MOUSE_BUTTON_4_DOWN}
- RI_MOUSE_BUTTON_4_UP = $0080;
- {$EXTERNALSYM RI_MOUSE_BUTTON_4_UP}
- RI_MOUSE_BUTTON_5_DOWN = $0100;
- {$EXTERNALSYM RI_MOUSE_BUTTON_5_DOWN}
- RI_MOUSE_BUTTON_5_UP = $0200;
- {$EXTERNALSYM RI_MOUSE_BUTTON_5_UP}
-
-//
-// If usButtonFlags has RI_MOUSE_WHEEL, the wheel delta is stored in usButtonData.
-// Take it as a signed value.
-//
-
- RI_MOUSE_WHEEL = $0400;
- {$EXTERNALSYM RI_MOUSE_WHEEL}
-
-//
-// Define the mouse indicator flags.
-//
-
- MOUSE_MOVE_RELATIVE = 0;
- {$EXTERNALSYM MOUSE_MOVE_RELATIVE}
- MOUSE_MOVE_ABSOLUTE = 1;
- {$EXTERNALSYM MOUSE_MOVE_ABSOLUTE}
- MOUSE_VIRTUAL_DESKTOP = $02; // the coordinates are mapped to the virtual desktop
- {$EXTERNALSYM MOUSE_VIRTUAL_DESKTOP}
- MOUSE_ATTRIBUTES_CHANGED = $04; // requery for mouse attributes
- {$EXTERNALSYM MOUSE_ATTRIBUTES_CHANGED}
-
-//
-// Raw format of the keyboard input
-//
-
-type
- tagRAWKEYBOARD = record
- //
- // The "make" scan code (key depression).
- //
- MakeCode: USHORT;
-
- //
- // The flags field indicates a "break" (key release) and other
- // miscellaneous scan code information defined in ntddkbd.h.
- //
- Flags: USHORT;
-
- Reserved: USHORT;
-
- //
- // Windows message compatible information
- //
- VKey: USHORT;
- Message: UINT;
-
- //
- // Device-specific additional information for the event.
- //
- ExtraInformation: ULONG;
- end;
- {$EXTERNALSYM tagRAWKEYBOARD}
- RAWKEYBOARD = tagRAWKEYBOARD;
- {$EXTERNALSYM RAWKEYBOARD}
- PRAWKEYBOARD = ^RAWKEYBOARD;
- {$EXTERNALSYM PRAWKEYBOARD}
- LPRAWKEYBOARD = ^RAWKEYBOARD;
- {$EXTERNALSYM LPRAWKEYBOARD}
- TRawKeyBoard = RAWKEYBOARD;
-
-//
-// Define the keyboard overrun MakeCode.
-//
-
-const
- KEYBOARD_OVERRUN_MAKE_CODE = $FF;
- {$EXTERNALSYM KEYBOARD_OVERRUN_MAKE_CODE}
-
-//
-// Define the keyboard input data Flags.
-//
-
- RI_KEY_MAKE = 0;
- {$EXTERNALSYM RI_KEY_MAKE}
- RI_KEY_BREAK = 1;
- {$EXTERNALSYM RI_KEY_BREAK}
- RI_KEY_E0 = 2;
- {$EXTERNALSYM RI_KEY_E0}
- RI_KEY_E1 = 4;
- {$EXTERNALSYM RI_KEY_E1}
- RI_KEY_TERMSRV_SET_LED = 8;
- {$EXTERNALSYM RI_KEY_TERMSRV_SET_LED}
- RI_KEY_TERMSRV_SHADOW = $10;
- {$EXTERNALSYM RI_KEY_TERMSRV_SHADOW}
-
-//
-// Raw format of the input from Human Input Devices
-//
-
-type
- tagRAWHID = record
- dwSizeHid: DWORD; // byte size of each report
- dwCount: DWORD; // number of input packed
- bRawData: array [0..0] of BYTE;
- end;
- {$EXTERNALSYM tagRAWHID}
- RAWHID = tagRAWHID;
- {$EXTERNALSYM RAWHID}
- PRAWHID = ^RAWHID;
- {$EXTERNALSYM PRAWHID}
- LPRAWHID = ^RAWHID;
- {$EXTERNALSYM LPRAWHID}
- TRawHid = RAWHID;
-
-//
-// RAWINPUT data structure.
-//
-
- tagRAWINPUT = record
- header: RAWINPUTHEADER;
- case Integer of
- 0: (mouse: RAWMOUSE);
- 1: (keyboard: RAWKEYBOARD);
- 2: (hid: RAWHID);
- end;
- {$EXTERNALSYM tagRAWINPUT}
- RAWINPUT = tagRAWINPUT;
- {$EXTERNALSYM RAWINPUT}
- PRAWINPUT = ^RAWINPUT;
- {$EXTERNALSYM PRAWINPUT}
- LPRAWINPUT = ^RAWINPUT;
- {$EXTERNALSYM LPRAWINPUT}
- TRawInput = RAWINPUT;
-
-function RAWINPUT_ALIGN(x: Pointer): Pointer;
-{$EXTERNALSYM RAWINPUT_ALIGN}
-
-function NEXTRAWINPUTBLOCK(ptr: PRawInput): PRawInput;
-{$EXTERNALSYM NEXTRAWINPUTBLOCK}
-
-//
-// Flags for GetRawInputData
-//
-
-const
- RID_INPUT = $10000003;
- {$EXTERNALSYM RID_INPUT}
- RID_HEADER = $10000005;
- {$EXTERNALSYM RID_HEADER}
-
-function GetRawInputData(hRawInput: HRAWINPUT; uiCommand: UINT; pData: LPVOID;
- var pcbSize: UINT; cbSizeHeader: UINT): UINT; stdcall;
-{$EXTERNALSYM GetRawInputData}
-
-//
-// Raw Input Device Information
-//
-
-const
- RIDI_PREPARSEDDATA = $20000005;
- {$EXTERNALSYM RIDI_PREPARSEDDATA}
- RIDI_DEVICENAME = $20000007; // the return valus is the character length, not the byte size
- {$EXTERNALSYM RIDI_DEVICENAME}
- RIDI_DEVICEINFO = $2000000b;
- {$EXTERNALSYM RIDI_DEVICEINFO}
-
-type
- PRID_DEVICE_INFO_MOUSE = ^RID_DEVICE_INFO_MOUSE;
- {$EXTERNALSYM PRID_DEVICE_INFO_MOUSE}
- tagRID_DEVICE_INFO_MOUSE = record
- dwId: DWORD;
- dwNumberOfButtons: DWORD;
- dwSampleRate: DWORD;
- end;
- {$EXTERNALSYM tagRID_DEVICE_INFO_MOUSE}
- RID_DEVICE_INFO_MOUSE = tagRID_DEVICE_INFO_MOUSE;
- {$EXTERNALSYM RID_DEVICE_INFO_MOUSE}
- TRidDeviceInfoMouse = RID_DEVICE_INFO_MOUSE;
- PRidDeviceInfoMouse = PRID_DEVICE_INFO_MOUSE;
-
- PRID_DEVICE_INFO_KEYBOARD = ^RID_DEVICE_INFO_KEYBOARD;
- {$EXTERNALSYM PRID_DEVICE_INFO_KEYBOARD}
- tagRID_DEVICE_INFO_KEYBOARD = record
- dwType: DWORD;
- dwSubType: DWORD;
- dwKeyboardMode: DWORD;
- dwNumberOfFunctionKeys: DWORD;
- dwNumberOfIndicators: DWORD;
- dwNumberOfKeysTotal: DWORD;
- end;
- {$EXTERNALSYM tagRID_DEVICE_INFO_KEYBOARD}
- RID_DEVICE_INFO_KEYBOARD = tagRID_DEVICE_INFO_KEYBOARD;
- {$EXTERNALSYM RID_DEVICE_INFO_KEYBOARD}
- TRidDeviceInfoKeyboard = RID_DEVICE_INFO_KEYBOARD;
- PRidDeviceInfoKeyboard = PRID_DEVICE_INFO_KEYBOARD;
-
- PRID_DEVICE_INFO_HID = ^RID_DEVICE_INFO_HID;
- {$EXTERNALSYM PRID_DEVICE_INFO_HID}
- tagRID_DEVICE_INFO_HID = record
- dwVendorId: DWORD;
- dwProductId: DWORD;
- dwVersionNumber: DWORD;
- //
- // Top level collection UsagePage and Usage
- //
- usUsagePage: USHORT;
- usUsage: USHORT;
- end;
- {$EXTERNALSYM tagRID_DEVICE_INFO_HID}
- RID_DEVICE_INFO_HID = tagRID_DEVICE_INFO_HID;
- {$EXTERNALSYM RID_DEVICE_INFO_HID}
- TRidDeviceInfoHid = RID_DEVICE_INFO_HID;
- PRidDeviceInfoHid = PRID_DEVICE_INFO_HID;
-
- tagRID_DEVICE_INFO = record
- cbSize: DWORD;
- dwType: DWORD;
- case Integer of
- 0: (mouse: RID_DEVICE_INFO_MOUSE);
- 1: (keyboard: RID_DEVICE_INFO_KEYBOARD);
- 2: (hid: RID_DEVICE_INFO_HID);
- end;
- {$EXTERNALSYM tagRID_DEVICE_INFO}
- RID_DEVICE_INFO = tagRID_DEVICE_INFO;
- {$EXTERNALSYM RID_DEVICE_INFO}
- PRID_DEVICE_INFO = ^RID_DEVICE_INFO;
- {$EXTERNALSYM PRID_DEVICE_INFO}
- LPRID_DEVICE_INFO = ^RID_DEVICE_INFO;
- {$EXTERNALSYM LPRID_DEVICE_INFO}
- TRidDeviceInfo = RID_DEVICE_INFO;
- PRidDeviceInfo = PRID_DEVICE_INFO;
-
-function GetRawInputDeviceInfoA(hDevice: HANDLE; uiCommand: UINT; pData: LPVOID;
- var pcbSize: UINT): UINT; stdcall;
-{$EXTERNALSYM GetRawInputDeviceInfoA}
-function GetRawInputDeviceInfoW(hDevice: HANDLE; uiCommand: UINT; pData: LPVOID;
- var pcbSize: UINT): UINT; stdcall;
-{$EXTERNALSYM GetRawInputDeviceInfoW}
-function GetRawInputDeviceInfo(hDevice: HANDLE; uiCommand: UINT; pData: LPVOID;
- var pcbSize: UINT): UINT; stdcall;
-{$EXTERNALSYM GetRawInputDeviceInfo}
-
-//
-// Raw Input Bulk Read: GetRawInputBuffer
-//
-
-function GetRawInputBuffer(pData: PRAWINPUT; var pcbSize: UINT; cbSizeHeader: UINT): UINT; stdcall;
-{$EXTERNALSYM GetRawInputBuffer}
-
-//
-// Raw Input request APIs
-//
-
-type
- LPRAWINPUTDEVICE = ^RAWINPUTDEVICE;
- {$EXTERNALSYM LPRAWINPUTDEVICE}
- PRAWINPUTDEVICE = ^RAWINPUTDEVICE;
- {$EXTERNALSYM PRAWINPUTDEVICE}
- tagRAWINPUTDEVICE = record
- usUsagePage: USHORT; // Toplevel collection UsagePage
- usUsage: USHORT; // Toplevel collection Usage
- dwFlags: DWORD;
- hwndTarget: HWND; // Target hwnd. NULL = follows keyboard focus
- end;
- {$EXTERNALSYM tagRAWINPUTDEVICE}
- RAWINPUTDEVICE = tagRAWINPUTDEVICE;
- {$EXTERNALSYM RAWINPUTDEVICE}
- TRawInputDevice = RAWINPUTDEVICE;
-
-const
- RIDEV_REMOVE = $00000001;
- {$EXTERNALSYM RIDEV_REMOVE}
- RIDEV_EXCLUDE = $00000010;
- {$EXTERNALSYM RIDEV_EXCLUDE}
- RIDEV_PAGEONLY = $00000020;
- {$EXTERNALSYM RIDEV_PAGEONLY}
- RIDEV_NOLEGACY = $00000030;
- {$EXTERNALSYM RIDEV_NOLEGACY}
- RIDEV_INPUTSINK = $00000100;
- {$EXTERNALSYM RIDEV_INPUTSINK}
- RIDEV_CAPTUREMOUSE = $00000200; // effective when mouse nolegacy is specified, otherwise it would be an error
- {$EXTERNALSYM RIDEV_CAPTUREMOUSE}
- RIDEV_NOHOTKEYS = $00000200; // effective for keyboard.
- {$EXTERNALSYM RIDEV_NOHOTKEYS}
- RIDEV_APPKEYS = $00000400; // effective for keyboard.
- {$EXTERNALSYM RIDEV_APPKEYS}
- RIDEV_EXMODEMASK = $000000F0;
- {$EXTERNALSYM RIDEV_EXMODEMASK}
-
-function RIDEV_EXMODE(mode: DWORD): DWORD;
-{$EXTERNALSYM RIDEV_EXMODE}
-
-function RegisterRawInputDevices(pRawInputDevices: PRAWINPUTDEVICE;
- uiNumDevices: UINT; cbSize: UINT): BOOL; stdcall;
-{$EXTERNALSYM RegisterRawInputDevices}
-
-function GetRegisteredRawInputDevices(pRawInputDevices: PRAWINPUTDEVICE;
- var puiNumDevices: UINT; cbSize: UINT): UINT; stdcall;
-{$EXTERNALSYM GetRegisteredRawInputDevices}
-
-type
- PRAWINPUTDEVICELIST = ^RAWINPUTDEVICELIST;
- {$EXTERNALSYM PRAWINPUTDEVICELIST}
- tagRAWINPUTDEVICELIST = record
- hDevice: HANDLE;
- dwType: DWORD;
- end;
- {$EXTERNALSYM tagRAWINPUTDEVICELIST}
- RAWINPUTDEVICELIST = tagRAWINPUTDEVICELIST;
- {$EXTERNALSYM RAWINPUTDEVICELIST}
- TRawInputDeviceList = RAWINPUTDEVICELIST;
-
-function GetRawInputDeviceList(pRawInputDeviceList: PRAWINPUTDEVICELIST; var puiNumDevices: UINT;
- cbSize: UINT): UINT; stdcall;
-{$EXTERNALSYM GetRawInputDeviceList}
-
-function DefRawInputProc(paRawInput: PRAWINPUT; nInput: Integer; cbSizeHeader: UINT): LRESULT; stdcall;
-{$EXTERNALSYM DefRawInputProc}
-
-implementation
-
-const
- user32 = 'user32.dll';
- {$IFDEF UNICODE}
- AWSuffix = 'W';
- {$ELSE}
- AWSuffix = 'A';
- {$ENDIF UNICODE}
-
-function IS_INTRESOURCE(wInteger: WORD): BOOL;
-begin
- Result := (ULONG_PTR(wInteger) shr 16) = 0;
-end;
-
-function GET_WHEEL_DELTA_WPARAM(wParam: WPARAM): SHORT;
-begin
- Result := SHORT(HIWORD(wParam));
-end;
-
-function GET_KEYSTATE_WPARAM(wParam: WPARAM): Integer;
-begin
- Result := LOWORD(wParam);
-end;
-
-function GET_NCHITTEST_WPARAM(wParam: WPARAM): Shortint;
-begin
- Result := LOWORD(wParam);
-end;
-
-function GET_XBUTTON_WPARAM(wParam: WPARAM): Integer;
-begin
- Result := HIWORD(wParam);
-end;
-
-{$IFDEF WIN2000_UP}
-
-function GET_APPCOMMAND_LPARAM(lParam: LPARAM): Shortint;
-begin
- Result := Shortint(HIWORD(lParam) and not FAPPCOMMAND_MASK);
-end;
-
-function GET_DEVICE_LPARAM(lParam: LPARAM): WORD;
-begin
- Result := WORD(HIWORD(lParam) and FAPPCOMMAND_MASK);
-end;
-
-function GET_MOUSEORKEY_LPARAM(lParam: LPARAM): WORD;
-begin
- Result := GET_DEVICE_LPARAM(lParam);
-end;
-
-function GET_FLAGS_LPARAM(lParam: LPARAM): Integer;
-begin
- Result := LOWORD(lParam);
-end;
-
-function GET_KEYSTATE_LPARAM(lParam: LPARAM): Integer;
-begin
- Result := GET_FLAGS_LPARAM(lParam);
-end;
-
-{$ENDIF WIN2000_UP}
-
-function MAKEWPARAM(wLow, wHigh: WORD): WPARAM;
-begin
- Result := WPARAM(DWORD(MAKELONG(wLow, wHigh)));
-end;
-
-function MAKELPARAM(wLow, wHigh: WORD): LPARAM;
-begin
- Result := LPARAM(DWORD(MAKELONG(wLow, wHigh)));
-end;
-
-function MAKELRESULT(wLow, wHigh: WORD): LRESULT;
-begin
- Result := LRESULT(DWORD(MAKELONG(wLow, wHigh)));
-end;
-
-function ExitWindows(dwReserved: DWORD; uREserved: UINT): BOOL;
-begin
- Result := ExitWindowsEx(EWX_LOGOFF, $FFFFFFFF);
-end;
-
-function PostAppMessageA(idThread: DWORD; wMsg: UINT; wParam: WPARAM; lParam: LPARAM): BOOL;
-begin
- Result := PostThreadMessageA(idThread, wMsg, wParam, lParam);
-end;
-
-function PostAppMessageW(idThread: DWORD; wMsg: UINT; wParam: WPARAM; lParam: LPARAM): BOOL;
-begin
- Result := PostThreadMessageW(idThread, wMsg, wParam, lParam);
-end;
-
-function PostAppMessage(idThread: DWORD; wMsg: UINT; wParam: WPARAM; lParam: LPARAM): BOOL;
-begin
- {$IFDEF UNICODE}
- Result := PostThreadMessageW(idThread, wMsg, wParam, lParam);
- {$ELSE}
- Result := PostThreadMessageA(idThread, wMsg, wParam, lParam);
- {$ENDIF UNICODE}
-end;
-
-function CreateWindowA(lpClassName: LPCSTR; lpWindowName: LPCSTR; dwStyle: DWORD;
- x, y, nWidth, nHeight: Integer; hWndParent: HWND; hMenu: HMENU;
- hInstance: HINSTANCE; lpParam: LPVOID): HWND;
-begin
- Result := CreateWindowExA(0, lpClassName, lpWindowName, dwStyle, x, y,
- nWidth, nHeight, hWndParent, hMenu, hInstance, lpParam);
-end;
-
-function CreateWindowW(lpClassName: LPCWSTR; lpWindowName: LPCWSTR; dwStyle: DWORD;
- x, y, nWidth, nHeight: Integer; hWndParent: HWND; hMenu: HMENU;
- hInstance: HINSTANCE; lpParam: LPVOID): HWND;
-begin
- Result := CreateWindowExW(0, lpClassName, lpWindowName, dwStyle, x, y,
- nWidth, nHeight, hWndParent, hMenu, hInstance, lpParam);
-end;
-
-function CreateWindow(lpClassName: LPCTSTR; lpWindowName: LPCTSTR; dwStyle: DWORD;
- x, y, nWidth, nHeight: Integer; hWndParent: HWND; hMenu: HMENU;
- hInstance: HINSTANCE; lpParam: LPVOID): HWND;
-begin
- {$IFDEF UNICODE}
- Result := CreateWindowExW(0, lpClassName, lpWindowName, dwStyle, x, y,
- nWidth, nHeight, hWndParent, hMenu, hInstance, lpParam);
- {$ELSE}
- Result := CreateWindowExA(0, lpClassName, lpWindowName, dwStyle, x, y,
- nWidth, nHeight, hWndParent, hMenu, hInstance, lpParam);
- {$ENDIF UNICODE}
-end;
-
-function CreateDialogA(hInstance: HINSTANCE; lpName: LPCSTR; hWndParent: HWND; lpDialogFunc: DLGPROC): HWND;
-begin
- Result := CreateDialogParamA(hInstance, lpName, hWndParent, lpDialogFunc, 0);
-end;
-
-function CreateDialogW(hInstance: HINSTANCE; lpName: LPCWSTR; hWndParent: HWND; lpDialogFunc: DLGPROC): HWND;
-begin
- Result := CreateDialogParamW(hInstance, lpName, hWndParent, lpDialogFunc, 0);
-end;
-
-function CreateDialog(hInstance: HINSTANCE; lpName: LPCTSTR; hWndParent: HWND; lpDialogFunc: DLGPROC): HWND;
-begin
- {$IFDEF UNICODE}
- Result := CreateDialogParamW(hInstance, lpName, hWndParent, lpDialogFunc, 0);
- {$ELSE}
- Result := CreateDialogParamA(hInstance, lpName, hWndParent, lpDialogFunc, 0);
- {$ENDIF UNICODE}
-end;
-
-function CreateDialogIndirectA(hInstance: HINSTANCE; const lpTemplate: DLGTEMPLATE;
- hWndParent: HWND; lpDialogFunc: DLGPROC): HWND;
-begin
- Result := CreateDialogIndirectParamA(hInstance, lpTemplate, hWndParent, lpDialogFunc, 0);
-end;
-
-function CreateDialogIndirectW(hInstance: HINSTANCE; const lpTemplate: DLGTEMPLATE;
- hWndParent: HWND; lpDialogFunc: DLGPROC): HWND;
-begin
- Result := CreateDialogIndirectParamW(hInstance, lpTemplate, hWndParent, lpDialogFunc, 0);
-end;
-
-function CreateDialogIndirect(hInstance: HINSTANCE; const lpTemplate: DLGTEMPLATE;
- hWndParent: HWND; lpDialogFunc: DLGPROC): HWND;
-begin
- {$IFDEF UNICODE}
- Result := CreateDialogIndirectParamW(hInstance, lpTemplate, hWndParent, lpDialogFunc, 0);
- {$ELSE}
- Result := CreateDialogIndirectParamA(hInstance, lpTemplate, hWndParent, lpDialogFunc, 0);
- {$ENDIF UNICODE}
-end;
-
-function DialogBoxA(hInstance: HINSTANCE; lpTemplate: LPCSTR; hWndParent: HWND; lpDialogFunc: DLGPROC): INT_PTR;
-begin
- Result := DialogBoxParamA(hInstance, lpTemplate, hWndParent, lpDialogFunc, 0);
-end;
-
-function DialogBoxW(hInstance: HINSTANCE; lpTemplate: LPCWSTR; hWndParent: HWND; lpDialogFunc: DLGPROC): INT_PTR;
-begin
- Result := DialogBoxParamW(hInstance, lpTemplate, hWndParent, lpDialogFunc, 0);
-end;
-
-function DialogBox(hInstance: HINSTANCE; lpTemplate: LPCTSTR; hWndParent: HWND; lpDialogFunc: DLGPROC): INT_PTR;
-begin
- {$IFDEF UNICODE}
- Result := DialogBoxParamW(hInstance, lpTemplate, hWndParent, lpDialogFunc, 0);
- {$ELSE}
- Result := DialogBoxParamA(hInstance, lpTemplate, hWndParent, lpDialogFunc, 0);
- {$ENDIF UNICODE}
-end;
-
-function DialogBoxIndirectA(hInstance: HINSTANCE; const lpTemplate: DLGTEMPLATE; hWndParent: HWND; lpDialogFunc: DLGPROC): INT_PTR;
-begin
- Result := DialogBoxIndirectParamA(hInstance, lpTemplate, hWndParent, lpDialogFunc, 0);
-end;
-
-function DialogBoxIndirectW(hInstance: HINSTANCE; const lpTemplate: DLGTEMPLATE; hWndParent: HWND; lpDialogFunc: DLGPROC): INT_PTR;
-begin
- Result := DialogBoxIndirectParamW(hInstance, lpTemplate, hWndParent, lpDialogFunc, 0);
-end;
-
-function DialogBoxIndirect(hInstance: HINSTANCE; const lpTemplate: DLGTEMPLATE; hWndParent: HWND; lpDialogFunc: DLGPROC): INT_PTR;
-begin
- {$IFDEF UNICODE}
- Result := DialogBoxIndirectParamW(hInstance, lpTemplate, hWndParent, lpDialogFunc, 0);
- {$ELSE}
- Result := DialogBoxIndirectParamA(hInstance, lpTemplate, hWndParent, lpDialogFunc, 0);
- {$ENDIF UNICODE}
-end;
-
-function AnsiToOem(lpszSrc: LPCSTR; lpszDst: LPSTR): BOOL;
-begin
- Result := CharToOemA(lpszSrc, lpszDst);
-end;
-
-function OemToAnsi(lpszSrc: LPCSTR; lpszDst: LPSTR): BOOL;
-begin
- Result := OemToCharA(lpszSrc, lpszDst);
-end;
-
-function AnsiToOemBuff(lpszSrc: LPCSTR; lpszDst: LPSTR; cchDstLength: DWORD): BOOL;
-begin
- Result := CharToOemBuffA(lpszSrc, lpszDst, cchDstLength);
-end;
-
-function OemToAnsiBuff(lpszSrc: LPCSTR; lpszDst: LPSTR; cchDstLength: DWORD): BOOL;
-begin
- Result := OemToCharBuffA(lpszSrc, lpszDst, cchDstLength);
-end;
-
-function AnsiUpper(lpsz: LPSTR): LPSTR;
-begin
- Result := CharUpperA(lpsz);
-end;
-
-function AnsiUpperBuff(lpsz: LPSTR; cchLength: DWORD): DWORD;
-begin
- Result := CharUpperBuffA(lpsz, cchLength);
-end;
-
-function AnsiLower(lpsz: LPSTR): LPSTR;
-begin
- Result := CharLowerA(lpsz);
-end;
-
-function AnsiLowerBuff(lpsz: LPSTR; cchLength: DWORD): DWORD;
-begin
- Result := CharLowerBuffA(lpsz, cchLength);
-end;
-
-function AnsiNext(lpsz: LPCSTR): LPSTR;
-begin
- Result := CharNextA(lpsz);
-end;
-
-function AnsiPrev(lpszStart: LPCSTR; lpszCurrent: LPCSTR): LPSTR;
-begin
- Result := CharPrevA(lpszStart, lpszCurrent);
-end;
-
-function GetWindowLongPtrA(hWnd: HWND; nIndex: Integer): LONG_PTR;
-begin
- Result := GetWindowLongA(hWnd, nIndex);
-end;
-
-function GetWindowLongPtrW(hWnd: HWND; nIndex: Integer): LONG_PTR;
-begin
- Result := GetWindowLongW(hWnd, nIndex);
-end;
-
-function GetWindowLongPtr(hWnd: HWND; nIndex: Integer): LONG_PTR;
-begin
- {$IFDEF UNICODE}
- Result := GetWindowLongW(hWnd, nIndex);
- {$ELSE}
- Result := GetWindowLongA(hWnd, nIndex);
- {$ENDIF UNICODE}
-end;
-
-function SetWindowLongPtrA(hWnd: HWND; nIndex: Integer; dwNewLong: LONG_PTR): LONG_PTR;
-begin
- Result := SetWindowLongA(hWnd, nIndex, dwNewLong);
-end;
-
-function SetWindowLongPtrW(hWnd: HWND; nIndex: Integer; dwNewLong: LONG_PTR): LONG_PTR;
-begin
- Result := SetWindowLongW(hWnd, nIndex, dwNewLong);
-end;
-
-function SetWindowLongPtr(hWnd: HWND; nIndex: Integer; dwNewLong: LONG_PTR): LONG_PTR;
-begin
- {$IFDEF UNICODE}
- Result := SetWindowLongW(hWnd, nIndex, dwNewLong);
- {$ELSE}
- Result := SetWindowLongA(hWnd, nIndex, dwNewLong);
- {$ENDIF UNICODE}
-end;
-
-function GetClassLongPtrA(hWnd: HWND; nIndex: Integer): ULONG_PTR;
-begin
- Result := GetClassLongA(hWnd, nIndex);
-end;
-
-function GetClassLongPtrW(hWnd: HWND; nIndex: Integer): ULONG_PTR;
-begin
- Result := GetClassLongW(hWnd, nIndex);
-end;
-
-function GetClassLongPtr(hWnd: HWND; nIndex: Integer): ULONG_PTR;
-begin
- {$IFDEF UNICODE}
- Result := GetClassLongW(hWnd, nIndex);
- {$ELSE}
- Result := GetClassLongA(hWnd, nIndex);
- {$ENDIF UNICODE}
-end;
-
-function SetClassLongPtrA(hWnd: HWND; nIndex: Integer; dwNewLong: ULONG_PTR): ULONG_PTR;
-begin
- Result := SetClassLongA(hWnd, nIndex, dwNewLong);
-end;
-
-function SetClassLongPtrW(hWnd: HWND; nIndex: Integer; dwNewLong: ULONG_PTR): ULONG_PTR;
-begin
- Result := SetClassLongW(hWnd, nIndex, dwNewLong);
-end;
-
-function SetClassLongPtr(hWnd: HWND; nIndex: Integer; dwNewLong: ULONG_PTR): ULONG_PTR;
-begin
- {$IFDEF UNICODE}
- Result := SetClassLongW(hWnd, nIndex, dwNewLong);
- {$ELSE}
- Result := SetClassLongA(hWnd, nIndex, dwNewLong);
- {$ENDIF UNICODE}
-end;
-
-function EnumTaskWindows(hTask: HANDLE; lpfn: WNDENUMPROC; lParam: LPARAM): BOOL;
-begin
- Result := EnumThreadWindows(ULONG(hTask), lpfn, lParam);
-end;
-
-function GetNextWindow(hWnd: HWND; wCmd: UINT): HWND;
-begin
- Result := GetWindow(hWnd, wCmd);
-end;
-
-function GetWindowTask(hWnd: HWND): HANDLE;
-begin
- Result := HANDLE(DWORD_PTR(GetWindowThreadProcessId(hWnd, nil)));
-end;
-
-function DefHookProc(nCode: Integer; wParam: WPARAM; lParam: LPARAM; phhk: LPHHOOK): LRESULT;
-begin
- Result := CallNextHookEx(HHOOK(phhk^), nCode, wParam, lParam);
-end;
-
-function CopyCursor(pcur: HCURSOR): HCURSOR;
-begin
- Result := HCURSOR(CopyIcon(HICON(pcur)));
-end;
-
-function GET_RAWINPUT_CODE_WPARAM(wParam: WPARAM): DWORD;
-begin
- Result := wParam and $ff;
-end;
-
-function RAWINPUT_ALIGN(x: Pointer): Pointer;
-begin
- Result := Pointer((Integer(x) + SizeOf(DWORD) - 1) and not (SizeOf(DWORD) - 1));
-end;
-
-function NEXTRAWINPUTBLOCK(ptr: PRawInput): PRawInput;
-begin
- Result := PRAWINPUT(DWORD(RAWINPUT_ALIGN(ptr)) + ptr^.header.dwSize);
-end;
-
-function RIDEV_EXMODE(mode: DWORD): DWORD;
-begin
- Result := mode and RIDEV_EXMODEMASK;
-end;
-
-{$IFDEF DYNAMIC_LINK}
-
-var
- _IsHungAppWindow: Pointer;
-
-function IsHungAppWindow;
-begin
- GetProcedureAddress(_IsHungAppWindow, user32, 'IsHungAppWindow');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_IsHungAppWindow]
- end;
-end;
-
-var
- _DisableProcessWindowsGhosting: Pointer;
-
-procedure DisableProcessWindowsGhosting;
-begin
- GetProcedureAddress(_DisableProcessWindowsGhosting, user32, 'DisableProcessWindowsGhosting');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DisableProcessWindowsGhosting]
- end;
-end;
-
-var
- _wvsprintfA: Pointer;
-
-function wvsprintfA;
-begin
- GetProcedureAddress(_wvsprintfA, user32, 'wvsprintfA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_wvsprintfA]
- end;
-end;
-
-var
- _wvsprintfW: Pointer;
-
-function wvsprintfW;
-begin
- GetProcedureAddress(_wvsprintfW, user32, 'wvsprintfW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_wvsprintfW]
- end;
-end;
-
-var
- _wvsprintf: Pointer;
-
-function wvsprintf;
-begin
- GetProcedureAddress(_wvsprintf, user32, 'wvsprintf' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_wvsprintf]
- end;
-end;
-
-var
- _wsprintfA: Pointer;
-
-function wsprintfA;
-begin
- GetProcedureAddress(_wsprintfA, user32, 'wsprintfA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_wsprintfA]
- end;
-end;
-
-var
- _wsprintfW: Pointer;
-
-function wsprintfW;
-begin
- GetProcedureAddress(_wsprintfW, user32, 'wsprintfW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_wsprintfW]
- end;
-end;
-
-var
- _wsprintf: Pointer;
-
-function wsprintf;
-begin
- GetProcedureAddress(_wsprintf, user32, 'wsprintf' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_wsprintf]
- end;
-end;
-
-var
- _LoadKeyboardLayoutA: Pointer;
-
-function LoadKeyboardLayoutA;
-begin
- GetProcedureAddress(_LoadKeyboardLayoutA, user32, 'LoadKeyboardLayoutA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_LoadKeyboardLayoutA]
- end;
-end;
-
-var
- _LoadKeyboardLayoutW: Pointer;
-
-function LoadKeyboardLayoutW;
-begin
- GetProcedureAddress(_LoadKeyboardLayoutW, user32, 'LoadKeyboardLayoutW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_LoadKeyboardLayoutW]
- end;
-end;
-
-var
- _LoadKeyboardLayout: Pointer;
-
-function LoadKeyboardLayout;
-begin
- GetProcedureAddress(_LoadKeyboardLayout, user32, 'LoadKeyboardLayout' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_LoadKeyboardLayout]
- end;
-end;
-
-var
- _ActivateKeyboardLayout: Pointer;
-
-function ActivateKeyboardLayout;
-begin
- GetProcedureAddress(_ActivateKeyboardLayout, user32, 'ActivateKeyboardLayout');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ActivateKeyboardLayout]
- end;
-end;
-
-var
- _ToUnicodeEx: Pointer;
-
-function ToUnicodeEx;
-begin
- GetProcedureAddress(_ToUnicodeEx, user32, 'ToUnicodeEx');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ToUnicodeEx]
- end;
-end;
-
-var
- _UnloadKeyboardLayout: Pointer;
-
-function UnloadKeyboardLayout;
-begin
- GetProcedureAddress(_UnloadKeyboardLayout, user32, 'UnloadKeyboardLayout');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_UnloadKeyboardLayout]
- end;
-end;
-
-var
- _GetKeyboardLayoutNameA: Pointer;
-
-function GetKeyboardLayoutNameA;
-begin
- GetProcedureAddress(_GetKeyboardLayoutNameA, user32, 'GetKeyboardLayoutNameA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetKeyboardLayoutNameA]
- end;
-end;
-
-var
- _GetKeyboardLayoutNameW: Pointer;
-
-function GetKeyboardLayoutNameW;
-begin
- GetProcedureAddress(_GetKeyboardLayoutNameW, user32, 'GetKeyboardLayoutNameW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetKeyboardLayoutNameW]
- end;
-end;
-
-var
- _GetKeyboardLayoutName: Pointer;
-
-function GetKeyboardLayoutName;
-begin
- GetProcedureAddress(_GetKeyboardLayoutName, user32, 'GetKeyboardLayoutName' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetKeyboardLayoutName]
- end;
-end;
-
-var
- _GetKeyboardLayoutList: Pointer;
-
-function GetKeyboardLayoutList;
-begin
- GetProcedureAddress(_GetKeyboardLayoutList, user32, 'GetKeyboardLayoutList');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetKeyboardLayoutList]
- end;
-end;
-
-var
- _GetKeyboardLayout: Pointer;
-
-function GetKeyboardLayout;
-begin
- GetProcedureAddress(_GetKeyboardLayout, user32, 'GetKeyboardLayout');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetKeyboardLayout]
- end;
-end;
-
-var
- _GetMouseMovePointsEx: Pointer;
-
-function GetMouseMovePointsEx;
-begin
- GetProcedureAddress(_GetMouseMovePointsEx, user32, 'GetMouseMovePointsEx');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetMouseMovePointsEx]
- end;
-end;
-
-var
- _CreateDesktopA: Pointer;
-
-function CreateDesktopA;
-begin
- GetProcedureAddress(_CreateDesktopA, user32, 'CreateDesktopA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreateDesktopA]
- end;
-end;
-
-var
- _CreateDesktopW: Pointer;
-
-function CreateDesktopW;
-begin
- GetProcedureAddress(_CreateDesktopW, user32, 'CreateDesktopW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreateDesktopW]
- end;
-end;
-
-var
- _CreateDesktop: Pointer;
-
-function CreateDesktop;
-begin
- GetProcedureAddress(_CreateDesktop, user32, 'CreateDesktop' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreateDesktop]
- end;
-end;
-
-var
- _OpenDesktopA: Pointer;
-
-function OpenDesktopA;
-begin
- GetProcedureAddress(_OpenDesktopA, user32, 'OpenDesktopA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_OpenDesktopA]
- end;
-end;
-
-var
- _OpenDesktopW: Pointer;
-
-function OpenDesktopW;
-begin
- GetProcedureAddress(_OpenDesktopW, user32, 'OpenDesktopW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_OpenDesktopW]
- end;
-end;
-
-var
- _OpenDesktop: Pointer;
-
-function OpenDesktop;
-begin
- GetProcedureAddress(_OpenDesktop, user32, 'OpenDesktop' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_OpenDesktop]
- end;
-end;
-
-var
- _OpenInputDesktop: Pointer;
-
-function OpenInputDesktop;
-begin
- GetProcedureAddress(_OpenInputDesktop, user32, 'OpenInputDesktop');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_OpenInputDesktop]
- end;
-end;
-
-var
- _EnumDesktopsA: Pointer;
-
-function EnumDesktopsA;
-begin
- GetProcedureAddress(_EnumDesktopsA, user32, 'EnumDesktopsA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_EnumDesktopsA]
- end;
-end;
-
-var
- _EnumDesktopsW: Pointer;
-
-function EnumDesktopsW;
-begin
- GetProcedureAddress(_EnumDesktopsW, user32, 'EnumDesktopsW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_EnumDesktopsW]
- end;
-end;
-
-var
- _EnumDesktops: Pointer;
-
-function EnumDesktops;
-begin
- GetProcedureAddress(_EnumDesktops, user32, 'EnumDesktops' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_EnumDesktops]
- end;
-end;
-
-var
- _EnumDesktopWindows: Pointer;
-
-function EnumDesktopWindows;
-begin
- GetProcedureAddress(_EnumDesktopWindows, user32, 'EnumDesktopWindows');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_EnumDesktopWindows]
- end;
-end;
-
-var
- _SwitchDesktop: Pointer;
-
-function SwitchDesktop;
-begin
- GetProcedureAddress(_SwitchDesktop, user32, 'SwitchDesktop');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SwitchDesktop]
- end;
-end;
-
-var
- _SetThreadDesktop: Pointer;
-
-function SetThreadDesktop;
-begin
- GetProcedureAddress(_SetThreadDesktop, user32, 'SetThreadDesktop');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetThreadDesktop]
- end;
-end;
-
-var
- _CloseDesktop: Pointer;
-
-function CloseDesktop;
-begin
- GetProcedureAddress(_CloseDesktop, user32, 'CloseDesktop');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CloseDesktop]
- end;
-end;
-
-var
- _GetThreadDesktop: Pointer;
-
-function GetThreadDesktop;
-begin
- GetProcedureAddress(_GetThreadDesktop, user32, 'GetThreadDesktop');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetThreadDesktop]
- end;
-end;
-
-var
- _CreateWindowStationA: Pointer;
-
-function CreateWindowStationA;
-begin
- GetProcedureAddress(_CreateWindowStationA, user32, 'CreateWindowStationA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreateWindowStationA]
- end;
-end;
-
-var
- _CreateWindowStationW: Pointer;
-
-function CreateWindowStationW;
-begin
- GetProcedureAddress(_CreateWindowStationW, user32, 'CreateWindowStationW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreateWindowStationW]
- end;
-end;
-
-var
- _CreateWindowStation: Pointer;
-
-function CreateWindowStation;
-begin
- GetProcedureAddress(_CreateWindowStation, user32, 'CreateWindowStation' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreateWindowStation]
- end;
-end;
-
-var
- _OpenWindowStationA: Pointer;
-
-function OpenWindowStationA;
-begin
- GetProcedureAddress(_OpenWindowStationA, user32, 'OpenWindowStationA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_OpenWindowStationA]
- end;
-end;
-
-var
- _OpenWindowStationW: Pointer;
-
-function OpenWindowStationW;
-begin
- GetProcedureAddress(_OpenWindowStationW, user32, 'OpenWindowStationW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_OpenWindowStationW]
- end;
-end;
-
-var
- _OpenWindowStation: Pointer;
-
-function OpenWindowStation;
-begin
- GetProcedureAddress(_OpenWindowStation, user32, 'OpenWindowStation' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_OpenWindowStation]
- end;
-end;
-
-var
- _EnumWindowStationsA: Pointer;
-
-function EnumWindowStationsA;
-begin
- GetProcedureAddress(_EnumWindowStationsA, user32, 'EnumWindowStationsA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_EnumWindowStationsA]
- end;
-end;
-
-var
- _EnumWindowStationsW: Pointer;
-
-function EnumWindowStationsW;
-begin
- GetProcedureAddress(_EnumWindowStationsW, user32, 'EnumWindowStationsW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_EnumWindowStationsW]
- end;
-end;
-
-var
- _EnumWindowStations: Pointer;
-
-function EnumWindowStations;
-begin
- GetProcedureAddress(_EnumWindowStations, user32, 'EnumWindowStations' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_EnumWindowStations]
- end;
-end;
-
-var
- _CloseWindowStation: Pointer;
-
-function CloseWindowStation;
-begin
- GetProcedureAddress(_CloseWindowStation, user32, 'CloseWindowStation');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CloseWindowStation]
- end;
-end;
-
-var
- _SetProcessWindowStation: Pointer;
-
-function SetProcessWindowStation;
-begin
- GetProcedureAddress(_SetProcessWindowStation, user32, 'SetProcessWindowStation');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetProcessWindowStation]
- end;
-end;
-
-var
- _GetProcessWindowStation: Pointer;
-
-function GetProcessWindowStation;
-begin
- GetProcedureAddress(_GetProcessWindowStation, user32, 'GetProcessWindowStation');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetProcessWindowStation]
- end;
-end;
-
-var
- _SetUserObjectSecurity: Pointer;
-
-function SetUserObjectSecurity;
-begin
- GetProcedureAddress(_SetUserObjectSecurity, user32, 'SetUserObjectSecurity');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetUserObjectSecurity]
- end;
-end;
-
-var
- _GetUserObjectSecurity: Pointer;
-
-function GetUserObjectSecurity;
-begin
- GetProcedureAddress(_GetUserObjectSecurity, user32, 'GetUserObjectSecurity');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetUserObjectSecurity]
- end;
-end;
-
-var
- _GetUserObjectInformationA: Pointer;
-
-function GetUserObjectInformationA;
-begin
- GetProcedureAddress(_GetUserObjectInformationA, user32, 'GetUserObjectInformationA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetUserObjectInformationA]
- end;
-end;
-
-var
- _GetUserObjectInformationW: Pointer;
-
-function GetUserObjectInformationW;
-begin
- GetProcedureAddress(_GetUserObjectInformationW, user32, 'GetUserObjectInformationW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetUserObjectInformationW]
- end;
-end;
-
-var
- _GetUserObjectInformation: Pointer;
-
-function GetUserObjectInformation;
-begin
- GetProcedureAddress(_GetUserObjectInformation, user32, 'GetUserObjectInformation' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetUserObjectInformation]
- end;
-end;
-
-var
- _SetUserObjectInformationA: Pointer;
-
-function SetUserObjectInformationA;
-begin
- GetProcedureAddress(_SetUserObjectInformationA, user32, 'SetUserObjectInformationA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetUserObjectInformationA]
- end;
-end;
-
-var
- _SetUserObjectInformationW: Pointer;
-
-function SetUserObjectInformationW;
-begin
- GetProcedureAddress(_SetUserObjectInformationW, user32, 'SetUserObjectInformationW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetUserObjectInformationW]
- end;
-end;
-
-var
- _SetUserObjectInformation: Pointer;
-
-function SetUserObjectInformation;
-begin
- GetProcedureAddress(_SetUserObjectInformation, user32, 'SetUserObjectInformation' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetUserObjectInformation]
- end;
-end;
-
-var
- _RegisterWindowMessageA: Pointer;
-
-function RegisterWindowMessageA;
-begin
- GetProcedureAddress(_RegisterWindowMessageA, user32, 'RegisterWindowMessageA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RegisterWindowMessageA]
- end;
-end;
-
-var
- _RegisterWindowMessageW: Pointer;
-
-function RegisterWindowMessageW;
-begin
- GetProcedureAddress(_RegisterWindowMessageW, user32, 'RegisterWindowMessageW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RegisterWindowMessageW]
- end;
-end;
-
-var
- _RegisterWindowMessage: Pointer;
-
-function RegisterWindowMessage;
-begin
- GetProcedureAddress(_RegisterWindowMessage, user32, 'RegisterWindowMessage' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RegisterWindowMessage]
- end;
-end;
-
-var
- __TrackMouseEvent: Pointer;
-
-function TrackMouseEvent;
-begin
- GetProcedureAddress(__TrackMouseEvent, user32, 'TrackMouseEvent');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [__TrackMouseEvent]
- end;
-end;
-
-var
- _DrawEdge: Pointer;
-
-function DrawEdge;
-begin
- GetProcedureAddress(_DrawEdge, user32, 'DrawEdge');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DrawEdge]
- end;
-end;
-
-var
- _DrawFrameControl: Pointer;
-
-function DrawFrameControl;
-begin
- GetProcedureAddress(_DrawFrameControl, user32, 'DrawFrameControl');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DrawFrameControl]
- end;
-end;
-
-var
- _DrawCaption: Pointer;
-
-function DrawCaption;
-begin
- GetProcedureAddress(_DrawCaption, user32, 'DrawCaption');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DrawCaption]
- end;
-end;
-
-var
- _DrawAnimatedRects: Pointer;
-
-function DrawAnimatedRects;
-begin
- GetProcedureAddress(_DrawAnimatedRects, user32, 'DrawAnimatedRects');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DrawAnimatedRects]
- end;
-end;
-
-var
- _GetMessageA: Pointer;
-
-function GetMessageA;
-begin
- GetProcedureAddress(_GetMessageA, user32, 'GetMessageA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetMessageA]
- end;
-end;
-
-var
- _GetMessageW: Pointer;
-
-function GetMessageW;
-begin
- GetProcedureAddress(_GetMessageW, user32, 'GetMessageW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetMessageW]
- end;
-end;
-
-var
- _GetMessage: Pointer;
-
-function GetMessage;
-begin
- GetProcedureAddress(_GetMessage, user32, 'GetMessage' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetMessage]
- end;
-end;
-
-var
- _TranslateMessage: Pointer;
-
-function TranslateMessage;
-begin
- GetProcedureAddress(_TranslateMessage, user32, 'TranslateMessage');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_TranslateMessage]
- end;
-end;
-
-var
- _DispatchMessageA: Pointer;
-
-function DispatchMessageA;
-begin
- GetProcedureAddress(_DispatchMessageA, user32, 'DispatchMessageA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DispatchMessageA]
- end;
-end;
-
-var
- _DispatchMessageW: Pointer;
-
-function DispatchMessageW;
-begin
- GetProcedureAddress(_DispatchMessageW, user32, 'DispatchMessageW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DispatchMessageW]
- end;
-end;
-
-var
- _DispatchMessage: Pointer;
-
-function DispatchMessage;
-begin
- GetProcedureAddress(_DispatchMessage, user32, 'DispatchMessage' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DispatchMessage]
- end;
-end;
-
-var
- _SetMessageQueue: Pointer;
-
-function SetMessageQueue;
-begin
- GetProcedureAddress(_SetMessageQueue, user32, 'SetMessageQueue');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetMessageQueue]
- end;
-end;
-
-var
- _PeekMessageA: Pointer;
-
-function PeekMessageA;
-begin
- GetProcedureAddress(_PeekMessageA, user32, 'PeekMessageA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PeekMessageA]
- end;
-end;
-
-var
- _PeekMessageW: Pointer;
-
-function PeekMessageW;
-begin
- GetProcedureAddress(_PeekMessageW, user32, 'PeekMessageW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PeekMessageW]
- end;
-end;
-
-var
- _PeekMessage: Pointer;
-
-function PeekMessage;
-begin
- GetProcedureAddress(_PeekMessage, user32, 'PeekMessage' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PeekMessage]
- end;
-end;
-
-var
- _RegisterHotKey: Pointer;
-
-function RegisterHotKey;
-begin
- GetProcedureAddress(_RegisterHotKey, user32, 'RegisterHotKey');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RegisterHotKey]
- end;
-end;
-
-var
- _UnregisterHotKey: Pointer;
-
-function UnregisterHotKey;
-begin
- GetProcedureAddress(_UnregisterHotKey, user32, 'UnregisterHotKey');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_UnregisterHotKey]
- end;
-end;
-
-var
- _ExitWindowsEx: Pointer;
-
-function ExitWindowsEx;
-begin
- GetProcedureAddress(_ExitWindowsEx, user32, 'ExitWindowsEx');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ExitWindowsEx]
- end;
-end;
-
-var
- _SwapMouseButton: Pointer;
-
-function SwapMouseButton;
-begin
- GetProcedureAddress(_SwapMouseButton, user32, 'SwapMouseButton');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SwapMouseButton]
- end;
-end;
-
-var
- _GetMessagePos: Pointer;
-
-function GetMessagePos;
-begin
- GetProcedureAddress(_GetMessagePos, user32, 'GetMessagePos');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetMessagePos]
- end;
-end;
-
-var
- _GetMessageTime: Pointer;
-
-function GetMessageTime;
-begin
- GetProcedureAddress(_GetMessageTime, user32, 'GetMessageTime');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetMessageTime]
- end;
-end;
-
-var
- _GetMessageExtraInfo: Pointer;
-
-function GetMessageExtraInfo;
-begin
- GetProcedureAddress(_GetMessageExtraInfo, user32, 'GetMessageExtraInfo');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetMessageExtraInfo]
- end;
-end;
-
-var
- _SetMessageExtraInfo: Pointer;
-
-function SetMessageExtraInfo;
-begin
- GetProcedureAddress(_SetMessageExtraInfo, user32, 'SetMessageExtraInfo');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetMessageExtraInfo]
- end;
-end;
-
-var
- _SendMessageA: Pointer;
-
-function SendMessageA;
-begin
- GetProcedureAddress(_SendMessageA, user32, 'SendMessageA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SendMessageA]
- end;
-end;
-
-var
- _SendMessageW: Pointer;
-
-function SendMessageW;
-begin
- GetProcedureAddress(_SendMessageW, user32, 'SendMessageW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SendMessageW]
- end;
-end;
-
-var
- _SendMessage: Pointer;
-
-function SendMessage;
-begin
- GetProcedureAddress(_SendMessage, user32, 'SendMessage' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SendMessage]
- end;
-end;
-
-var
- _SendMessageTimeoutA: Pointer;
-
-function SendMessageTimeoutA;
-begin
- GetProcedureAddress(_SendMessageTimeoutA, user32, 'SendMessageTimeoutA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SendMessageTimeoutA]
- end;
-end;
-
-var
- _SendMessageTimeoutW: Pointer;
-
-function SendMessageTimeoutW;
-begin
- GetProcedureAddress(_SendMessageTimeoutW, user32, 'SendMessageTimeoutW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SendMessageTimeoutW]
- end;
-end;
-
-var
- _SendMessageTimeout: Pointer;
-
-function SendMessageTimeout;
-begin
- GetProcedureAddress(_SendMessageTimeout, user32, 'SendMessageTimeout' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SendMessageTimeout]
- end;
-end;
-
-var
- _SendNotifyMessageA: Pointer;
-
-function SendNotifyMessageA;
-begin
- GetProcedureAddress(_SendNotifyMessageA, user32, 'SendNotifyMessageA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SendNotifyMessageA]
- end;
-end;
-
-var
- _SendNotifyMessageW: Pointer;
-
-function SendNotifyMessageW;
-begin
- GetProcedureAddress(_SendNotifyMessageW, user32, 'SendNotifyMessageW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SendNotifyMessageW]
- end;
-end;
-
-var
- _SendNotifyMessage: Pointer;
-
-function SendNotifyMessage;
-begin
- GetProcedureAddress(_SendNotifyMessage, user32, 'SendNotifyMessage' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SendNotifyMessage]
- end;
-end;
-
-var
- _SendMessageCallbackA: Pointer;
-
-function SendMessageCallbackA;
-begin
- GetProcedureAddress(_SendMessageCallbackA, user32, 'SendMessageCallbackA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SendMessageCallbackA]
- end;
-end;
-
-var
- _SendMessageCallbackW: Pointer;
-
-function SendMessageCallbackW;
-begin
- GetProcedureAddress(_SendMessageCallbackW, user32, 'SendMessageCallbackW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SendMessageCallbackW]
- end;
-end;
-
-var
- _SendMessageCallback: Pointer;
-
-function SendMessageCallback;
-begin
- GetProcedureAddress(_SendMessageCallback, user32, 'SendMessageCallback' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SendMessageCallback]
- end;
-end;
-
-var
- _BroadcastSystemMessageExA: Pointer;
-
-function BroadcastSystemMessageExA;
-begin
- GetProcedureAddress(_BroadcastSystemMessageExA, user32, 'BroadcastSystemMessageExA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_BroadcastSystemMessageExA]
- end;
-end;
-
-var
- _BroadcastSystemMessageExW: Pointer;
-
-function BroadcastSystemMessageExW;
-begin
- GetProcedureAddress(_BroadcastSystemMessageExW, user32, 'BroadcastSystemMessageExW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_BroadcastSystemMessageExW]
- end;
-end;
-
-var
- _BroadcastSystemMessageEx: Pointer;
-
-function BroadcastSystemMessageEx;
-begin
- GetProcedureAddress(_BroadcastSystemMessageEx, user32, 'BroadcastSystemMessageEx' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_BroadcastSystemMessageEx]
- end;
-end;
-
-var
- _BroadcastSystemMessageA: Pointer;
-
-function BroadcastSystemMessageA;
-begin
- GetProcedureAddress(_BroadcastSystemMessageA, user32, 'BroadcastSystemMessageA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_BroadcastSystemMessageA]
- end;
-end;
-
-var
- _BroadcastSystemMessageW: Pointer;
-
-function BroadcastSystemMessageW;
-begin
- GetProcedureAddress(_BroadcastSystemMessageW, user32, 'BroadcastSystemMessageW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_BroadcastSystemMessageW]
- end;
-end;
-
-var
- _BroadcastSystemMessage: Pointer;
-
-function BroadcastSystemMessage;
-begin
- GetProcedureAddress(_BroadcastSystemMessage, user32, 'BroadcastSystemMessage' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_BroadcastSystemMessage]
- end;
-end;
-
-var
- _RegisterDeviceNotificationA: Pointer;
-
-function RegisterDeviceNotificationA;
-begin
- GetProcedureAddress(_RegisterDeviceNotificationA, user32, 'RegisterDeviceNotificationA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RegisterDeviceNotificationA]
- end;
-end;
-
-var
- _RegisterDeviceNotificationW: Pointer;
-
-function RegisterDeviceNotificationW;
-begin
- GetProcedureAddress(_RegisterDeviceNotificationW, user32, 'RegisterDeviceNotificationW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RegisterDeviceNotificationW]
- end;
-end;
-
-var
- _RegisterDeviceNotification: Pointer;
-
-function RegisterDeviceNotification;
-begin
- GetProcedureAddress(_RegisterDeviceNotification, user32, 'RegisterDeviceNotification' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RegisterDeviceNotification]
- end;
-end;
-
-var
- _UnregisterDeviceNotification: Pointer;
-
-function UnregisterDeviceNotification;
-begin
- GetProcedureAddress(_UnregisterDeviceNotification, user32, 'UnregisterDeviceNotification');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_UnregisterDeviceNotification]
- end;
-end;
-
-var
- _PostMessageA: Pointer;
-
-function PostMessageA;
-begin
- GetProcedureAddress(_PostMessageA, user32, 'PostMessageA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PostMessageA]
- end;
-end;
-
-var
- _PostMessageW: Pointer;
-
-function PostMessageW;
-begin
- GetProcedureAddress(_PostMessageW, user32, 'PostMessageW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PostMessageW]
- end;
-end;
-
-var
- _PostMessage: Pointer;
-
-function PostMessage;
-begin
- GetProcedureAddress(_PostMessage, user32, 'PostMessage' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PostMessage]
- end;
-end;
-
-var
- _PostThreadMessageA: Pointer;
-
-function PostThreadMessageA;
-begin
- GetProcedureAddress(_PostThreadMessageA, user32, 'PostThreadMessageA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PostThreadMessageA]
- end;
-end;
-
-var
- _PostThreadMessageW: Pointer;
-
-function PostThreadMessageW;
-begin
- GetProcedureAddress(_PostThreadMessageW, user32, 'PostThreadMessageW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PostThreadMessageW]
- end;
-end;
-
-var
- _PostThreadMessage: Pointer;
-
-function PostThreadMessage;
-begin
- GetProcedureAddress(_PostThreadMessage, user32, 'PostThreadMessage' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PostThreadMessage]
- end;
-end;
-
-var
- _AttachThreadInput: Pointer;
-
-function AttachThreadInput;
-begin
- GetProcedureAddress(_AttachThreadInput, user32, 'AttachThreadInput');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_AttachThreadInput]
- end;
-end;
-
-var
- _ReplyMessage: Pointer;
-
-function ReplyMessage;
-begin
- GetProcedureAddress(_ReplyMessage, user32, 'ReplyMessage');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ReplyMessage]
- end;
-end;
-
-var
- _WaitMessage: Pointer;
-
-function WaitMessage;
-begin
- GetProcedureAddress(_WaitMessage, user32, 'WaitMessage');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WaitMessage]
- end;
-end;
-
-var
- _WaitForInputIdle: Pointer;
-
-function WaitForInputIdle;
-begin
- GetProcedureAddress(_WaitForInputIdle, user32, 'WaitForInputIdle');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WaitForInputIdle]
- end;
-end;
-
-var
- _DefWindowProcA: Pointer;
-
-function DefWindowProcA;
-begin
- GetProcedureAddress(_DefWindowProcA, user32, 'DefWindowProcA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DefWindowProcA]
- end;
-end;
-
-var
- _DefWindowProcW: Pointer;
-
-function DefWindowProcW;
-begin
- GetProcedureAddress(_DefWindowProcW, user32, 'DefWindowProcW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DefWindowProcW]
- end;
-end;
-
-var
- _DefWindowProc: Pointer;
-
-function DefWindowProc;
-begin
- GetProcedureAddress(_DefWindowProc, user32, 'DefWindowProc' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DefWindowProc]
- end;
-end;
-
-var
- _PostQuitMessage: Pointer;
-
-procedure PostQuitMessage;
-begin
- GetProcedureAddress(_PostQuitMessage, user32, 'PostQuitMessage');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PostQuitMessage]
- end;
-end;
-
-var
- _CallWindowProcA: Pointer;
-
-function CallWindowProcA;
-begin
- GetProcedureAddress(_CallWindowProcA, user32, 'CallWindowProcA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CallWindowProcA]
- end;
-end;
-
-var
- _CallWindowProcW: Pointer;
-
-function CallWindowProcW;
-begin
- GetProcedureAddress(_CallWindowProcW, user32, 'CallWindowProcW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CallWindowProcW]
- end;
-end;
-
-var
- _CallWindowProc: Pointer;
-
-function CallWindowProc;
-begin
- GetProcedureAddress(_CallWindowProc, user32, 'CallWindowProc' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CallWindowProc]
- end;
-end;
-
-var
- _InSendMessage: Pointer;
-
-function InSendMessage;
-begin
- GetProcedureAddress(_InSendMessage, user32, 'InSendMessage');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_InSendMessage]
- end;
-end;
-
-var
- _InSendMessageEx: Pointer;
-
-function InSendMessageEx;
-begin
- GetProcedureAddress(_InSendMessageEx, user32, 'InSendMessageEx');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_InSendMessageEx]
- end;
-end;
-
-var
- _GetDoubleClickTime: Pointer;
-
-function GetDoubleClickTime;
-begin
- GetProcedureAddress(_GetDoubleClickTime, user32, 'GetDoubleClickTime');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetDoubleClickTime]
- end;
-end;
-
-var
- _SetDoubleClickTime: Pointer;
-
-function SetDoubleClickTime;
-begin
- GetProcedureAddress(_SetDoubleClickTime, user32, 'SetDoubleClickTime');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetDoubleClickTime]
- end;
-end;
-
-var
- _RegisterClassA: Pointer;
-
-function RegisterClassA;
-begin
- GetProcedureAddress(_RegisterClassA, user32, 'RegisterClassA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RegisterClassA]
- end;
-end;
-
-var
- _RegisterClassW: Pointer;
-
-function RegisterClassW;
-begin
- GetProcedureAddress(_RegisterClassW, user32, 'RegisterClassW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RegisterClassW]
- end;
-end;
-
-var
- _RegisterClass: Pointer;
-
-function RegisterClass;
-begin
- GetProcedureAddress(_RegisterClass, user32, 'RegisterClass' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RegisterClass]
- end;
-end;
-
-var
- _UnregisterClassA: Pointer;
-
-function UnregisterClassA;
-begin
- GetProcedureAddress(_UnregisterClassA, user32, 'UnregisterClassA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_UnregisterClassA]
- end;
-end;
-
-var
- _UnregisterClassW: Pointer;
-
-function UnregisterClassW;
-begin
- GetProcedureAddress(_UnregisterClassW, user32, 'UnregisterClassW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_UnregisterClassW]
- end;
-end;
-
-var
- _UnregisterClass: Pointer;
-
-function UnregisterClass;
-begin
- GetProcedureAddress(_UnregisterClass, user32, 'UnregisterClass' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_UnregisterClass]
- end;
-end;
-
-var
- _GetClassInfoA: Pointer;
-
-function GetClassInfoA;
-begin
- GetProcedureAddress(_GetClassInfoA, user32, 'GetClassInfoA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetClassInfoA]
- end;
-end;
-
-var
- _GetClassInfoW: Pointer;
-
-function GetClassInfoW;
-begin
- GetProcedureAddress(_GetClassInfoW, user32, 'GetClassInfoW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetClassInfoW]
- end;
-end;
-
-var
- _GetClassInfo: Pointer;
-
-function GetClassInfo;
-begin
- GetProcedureAddress(_GetClassInfo, user32, 'GetClassInfo' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetClassInfo]
- end;
-end;
-
-var
- _RegisterClassExA: Pointer;
-
-function RegisterClassExA;
-begin
- GetProcedureAddress(_RegisterClassExA, user32, 'RegisterClassExA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RegisterClassExA]
- end;
-end;
-
-var
- _RegisterClassExW: Pointer;
-
-function RegisterClassExW;
-begin
- GetProcedureAddress(_RegisterClassExW, user32, 'RegisterClassExW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RegisterClassExW]
- end;
-end;
-
-var
- _RegisterClassEx: Pointer;
-
-function RegisterClassEx;
-begin
- GetProcedureAddress(_RegisterClassEx, user32, 'RegisterClassEx' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RegisterClassEx]
- end;
-end;
-
-var
- _GetClassInfoExA: Pointer;
-
-function GetClassInfoExA;
-begin
- GetProcedureAddress(_GetClassInfoExA, user32, 'GetClassInfoExA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetClassInfoExA]
- end;
-end;
-
-var
- _GetClassInfoExW: Pointer;
-
-function GetClassInfoExW;
-begin
- GetProcedureAddress(_GetClassInfoExW, user32, 'GetClassInfoExW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetClassInfoExW]
- end;
-end;
-
-var
- _GetClassInfoEx: Pointer;
-
-function GetClassInfoEx;
-begin
- GetProcedureAddress(_GetClassInfoEx, user32, 'GetClassInfoEx' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetClassInfoEx]
- end;
-end;
-
-var
- _CreateWindowExA: Pointer;
-
-function CreateWindowExA;
-begin
- GetProcedureAddress(_CreateWindowExA, user32, 'CreateWindowExA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreateWindowExA]
- end;
-end;
-
-var
- _CreateWindowExW: Pointer;
-
-function CreateWindowExW;
-begin
- GetProcedureAddress(_CreateWindowExW, user32, 'CreateWindowExW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreateWindowExW]
- end;
-end;
-
-var
- _CreateWindowEx: Pointer;
-
-function CreateWindowEx;
-begin
- GetProcedureAddress(_CreateWindowEx, user32, 'CreateWindowEx' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreateWindowEx]
- end;
-end;
-
-var
- _IsWindow: Pointer;
-
-function IsWindow;
-begin
- GetProcedureAddress(_IsWindow, user32, 'IsWindow');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_IsWindow]
- end;
-end;
-
-var
- _IsMenu: Pointer;
-
-function IsMenu;
-begin
- GetProcedureAddress(_IsMenu, user32, 'IsMenu');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_IsMenu]
- end;
-end;
-
-var
- _IsChild: Pointer;
-
-function IsChild;
-begin
- GetProcedureAddress(_IsChild, user32, 'IsChild');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_IsChild]
- end;
-end;
-
-var
- _DestroyWindow: Pointer;
-
-function DestroyWindow;
-begin
- GetProcedureAddress(_DestroyWindow, user32, 'DestroyWindow');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DestroyWindow]
- end;
-end;
-
-var
- _ShowWindow: Pointer;
-
-function ShowWindow;
-begin
- GetProcedureAddress(_ShowWindow, user32, 'ShowWindow');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ShowWindow]
- end;
-end;
-
-var
- _AnimateWindow: Pointer;
-
-function AnimateWindow;
-begin
- GetProcedureAddress(_AnimateWindow, user32, 'AnimateWindow');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_AnimateWindow]
- end;
-end;
-
-var
- _UpdateLayeredWindow: Pointer;
-
-function UpdateLayeredWindow;
-begin
- GetProcedureAddress(_UpdateLayeredWindow, user32, 'UpdateLayeredWindow');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_UpdateLayeredWindow]
- end;
-end;
-
-var
- _GetLayeredWindowAttributes: Pointer;
-
-function GetLayeredWindowAttributes;
-begin
- GetProcedureAddress(_GetLayeredWindowAttributes, user32, 'GetLayeredWindowAttributes');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetLayeredWindowAttributes]
- end;
-end;
-
-var
- _PrintWindow: Pointer;
-
-function PrintWindow;
-begin
- GetProcedureAddress(_PrintWindow, user32, 'PrintWindow');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PrintWindow]
- end;
-end;
-
-var
- _SetLayeredWindowAttributes: Pointer;
-
-function SetLayeredWindowAttributes;
-begin
- GetProcedureAddress(_SetLayeredWindowAttributes, user32, 'SetLayeredWindowAttributes');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetLayeredWindowAttributes]
- end;
-end;
-
-var
- _ShowWindowAsync: Pointer;
-
-function ShowWindowAsync;
-begin
- GetProcedureAddress(_ShowWindowAsync, user32, 'ShowWindowAsync');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ShowWindowAsync]
- end;
-end;
-
-var
- _FlashWindow: Pointer;
-
-function FlashWindow;
-begin
- GetProcedureAddress(_FlashWindow, user32, 'FlashWindow');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_FlashWindow]
- end;
-end;
-
-var
- _FlashWindowEx: Pointer;
-
-function FlashWindowEx;
-begin
- GetProcedureAddress(_FlashWindowEx, user32, 'FlashWindowEx');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_FlashWindowEx]
- end;
-end;
-
-var
- _ShowOwnedPopups: Pointer;
-
-function ShowOwnedPopups;
-begin
- GetProcedureAddress(_ShowOwnedPopups, user32, 'ShowOwnedPopups');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ShowOwnedPopups]
- end;
-end;
-
-var
- _OpenIcon: Pointer;
-
-function OpenIcon;
-begin
- GetProcedureAddress(_OpenIcon, user32, 'OpenIcon');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_OpenIcon]
- end;
-end;
-
-var
- _CloseWindow: Pointer;
-
-function CloseWindow;
-begin
- GetProcedureAddress(_CloseWindow, user32, 'CloseWindow');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CloseWindow]
- end;
-end;
-
-var
- _MoveWindow: Pointer;
-
-function MoveWindow;
-begin
- GetProcedureAddress(_MoveWindow, user32, 'MoveWindow');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MoveWindow]
- end;
-end;
-
-var
- _SetWindowPos: Pointer;
-
-function SetWindowPos;
-begin
- GetProcedureAddress(_SetWindowPos, user32, 'SetWindowPos');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetWindowPos]
- end;
-end;
-
-var
- _GetWindowPlacement: Pointer;
-
-function GetWindowPlacement;
-begin
- GetProcedureAddress(_GetWindowPlacement, user32, 'GetWindowPlacement');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetWindowPlacement]
- end;
-end;
-
-var
- _SetWindowPlacement: Pointer;
-
-function SetWindowPlacement;
-begin
- GetProcedureAddress(_SetWindowPlacement, user32, 'SetWindowPlacement');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetWindowPlacement]
- end;
-end;
-
-var
- _BeginDeferWindowPos: Pointer;
-
-function BeginDeferWindowPos;
-begin
- GetProcedureAddress(_BeginDeferWindowPos, user32, 'BeginDeferWindowPos');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_BeginDeferWindowPos]
- end;
-end;
-
-var
- _DeferWindowPos: Pointer;
-
-function DeferWindowPos;
-begin
- GetProcedureAddress(_DeferWindowPos, user32, 'DeferWindowPos');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DeferWindowPos]
- end;
-end;
-
-var
- _EndDeferWindowPos: Pointer;
-
-function EndDeferWindowPos;
-begin
- GetProcedureAddress(_EndDeferWindowPos, user32, 'EndDeferWindowPos');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_EndDeferWindowPos]
- end;
-end;
-
-var
- _IsWindowVisible: Pointer;
-
-function IsWindowVisible;
-begin
- GetProcedureAddress(_IsWindowVisible, user32, 'IsWindowVisible');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_IsWindowVisible]
- end;
-end;
-
-var
- _IsIconic: Pointer;
-
-function IsIconic;
-begin
- GetProcedureAddress(_IsIconic, user32, 'IsIconic');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_IsIconic]
- end;
-end;
-
-var
- _AnyPopup: Pointer;
-
-function AnyPopup;
-begin
- GetProcedureAddress(_AnyPopup, user32, 'AnyPopup');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_AnyPopup]
- end;
-end;
-
-var
- _BringWindowToTop: Pointer;
-
-function BringWindowToTop;
-begin
- GetProcedureAddress(_BringWindowToTop, user32, 'BringWindowToTop');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_BringWindowToTop]
- end;
-end;
-
-var
- _IsZoomed: Pointer;
-
-function IsZoomed;
-begin
- GetProcedureAddress(_IsZoomed, user32, 'IsZoomed');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_IsZoomed]
- end;
-end;
-
-var
- _CreateDialogParamA: Pointer;
-
-function CreateDialogParamA;
-begin
- GetProcedureAddress(_CreateDialogParamA, user32, 'CreateDialogParamA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreateDialogParamA]
- end;
-end;
-
-var
- _CreateDialogParamW: Pointer;
-
-function CreateDialogParamW;
-begin
- GetProcedureAddress(_CreateDialogParamW, user32, 'CreateDialogParamW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreateDialogParamW]
- end;
-end;
-
-var
- _CreateDialogParam: Pointer;
-
-function CreateDialogParam;
-begin
- GetProcedureAddress(_CreateDialogParam, user32, 'CreateDialogParam' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreateDialogParam]
- end;
-end;
-
-var
- _CreateDialogIndirectParamA: Pointer;
-
-function CreateDialogIndirectParamA;
-begin
- GetProcedureAddress(_CreateDialogIndirectParamA, user32, 'CreateDialogIndirectParamA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreateDialogIndirectParamA]
- end;
-end;
-
-var
- _CreateDialogIndirectParamW: Pointer;
-
-function CreateDialogIndirectParamW;
-begin
- GetProcedureAddress(_CreateDialogIndirectParamW, user32, 'CreateDialogIndirectParamW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreateDialogIndirectParamW]
- end;
-end;
-
-var
- _CreateDialogIndirectParam: Pointer;
-
-function CreateDialogIndirectParam;
-begin
- GetProcedureAddress(_CreateDialogIndirectParam, user32, 'CreateDialogIndirectParam' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreateDialogIndirectParam]
- end;
-end;
-
-var
- _DialogBoxParamA: Pointer;
-
-function DialogBoxParamA;
-begin
- GetProcedureAddress(_DialogBoxParamA, user32, 'DialogBoxParamA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DialogBoxParamA]
- end;
-end;
-
-var
- _DialogBoxParamW: Pointer;
-
-function DialogBoxParamW;
-begin
- GetProcedureAddress(_DialogBoxParamW, user32, 'DialogBoxParamW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DialogBoxParamW]
- end;
-end;
-
-var
- _DialogBoxParam: Pointer;
-
-function DialogBoxParam;
-begin
- GetProcedureAddress(_DialogBoxParam, user32, 'DialogBoxParam' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DialogBoxParam]
- end;
-end;
-
-var
- _DialogBoxIndirectParamA: Pointer;
-
-function DialogBoxIndirectParamA;
-begin
- GetProcedureAddress(_DialogBoxIndirectParamA, user32, 'DialogBoxIndirectParamA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DialogBoxIndirectParamA]
- end;
-end;
-
-var
- _DialogBoxIndirectParamW: Pointer;
-
-function DialogBoxIndirectParamW;
-begin
- GetProcedureAddress(_DialogBoxIndirectParamW, user32, 'DialogBoxIndirectParamW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DialogBoxIndirectParamW]
- end;
-end;
-
-var
- _DialogBoxIndirectParam: Pointer;
-
-function DialogBoxIndirectParam;
-begin
- GetProcedureAddress(_DialogBoxIndirectParam, user32, 'DialogBoxIndirectParam' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DialogBoxIndirectParam]
- end;
-end;
-
-var
- _EndDialog: Pointer;
-
-function EndDialog;
-begin
- GetProcedureAddress(_EndDialog, user32, 'EndDialog');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_EndDialog]
- end;
-end;
-
-var
- _GetDlgItem: Pointer;
-
-function GetDlgItem;
-begin
- GetProcedureAddress(_GetDlgItem, user32, 'GetDlgItem');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetDlgItem]
- end;
-end;
-
-var
- _SetDlgItemInt: Pointer;
-
-function SetDlgItemInt;
-begin
- GetProcedureAddress(_SetDlgItemInt, user32, 'SetDlgItemInt');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetDlgItemInt]
- end;
-end;
-
-var
- _GetDlgItemInt: Pointer;
-
-function GetDlgItemInt;
-begin
- GetProcedureAddress(_GetDlgItemInt, user32, 'GetDlgItemInt');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetDlgItemInt]
- end;
-end;
-
-var
- _SetDlgItemTextA: Pointer;
-
-function SetDlgItemTextA;
-begin
- GetProcedureAddress(_SetDlgItemTextA, user32, 'SetDlgItemTextA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetDlgItemTextA]
- end;
-end;
-
-var
- _SetDlgItemTextW: Pointer;
-
-function SetDlgItemTextW;
-begin
- GetProcedureAddress(_SetDlgItemTextW, user32, 'SetDlgItemTextW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetDlgItemTextW]
- end;
-end;
-
-var
- _SetDlgItemText: Pointer;
-
-function SetDlgItemText;
-begin
- GetProcedureAddress(_SetDlgItemText, user32, 'SetDlgItemText' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetDlgItemText]
- end;
-end;
-
-var
- _GetDlgItemTextA: Pointer;
-
-function GetDlgItemTextA;
-begin
- GetProcedureAddress(_GetDlgItemTextA, user32, 'GetDlgItemTextA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetDlgItemTextA]
- end;
-end;
-
-var
- _GetDlgItemTextW: Pointer;
-
-function GetDlgItemTextW;
-begin
- GetProcedureAddress(_GetDlgItemTextW, user32, 'GetDlgItemTextW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetDlgItemTextW]
- end;
-end;
-
-var
- _GetDlgItemText: Pointer;
-
-function GetDlgItemText;
-begin
- GetProcedureAddress(_GetDlgItemText, user32, 'GetDlgItemText' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetDlgItemText]
- end;
-end;
-
-var
- _CheckDlgButton: Pointer;
-
-function CheckDlgButton;
-begin
- GetProcedureAddress(_CheckDlgButton, user32, 'CheckDlgButton');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CheckDlgButton]
- end;
-end;
-
-var
- _CheckRadioButton: Pointer;
-
-function CheckRadioButton;
-begin
- GetProcedureAddress(_CheckRadioButton, user32, 'CheckRadioButton');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CheckRadioButton]
- end;
-end;
-
-var
- _IsDlgButtonChecked: Pointer;
-
-function IsDlgButtonChecked;
-begin
- GetProcedureAddress(_IsDlgButtonChecked, user32, 'IsDlgButtonChecked');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_IsDlgButtonChecked]
- end;
-end;
-
-var
- _SendDlgItemMessageA: Pointer;
-
-function SendDlgItemMessageA;
-begin
- GetProcedureAddress(_SendDlgItemMessageA, user32, 'SendDlgItemMessageA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SendDlgItemMessageA]
- end;
-end;
-
-var
- _SendDlgItemMessageW: Pointer;
-
-function SendDlgItemMessageW;
-begin
- GetProcedureAddress(_SendDlgItemMessageW, user32, 'SendDlgItemMessageW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SendDlgItemMessageW]
- end;
-end;
-
-var
- _SendDlgItemMessage: Pointer;
-
-function SendDlgItemMessage;
-begin
- GetProcedureAddress(_SendDlgItemMessage, user32, 'SendDlgItemMessage' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SendDlgItemMessage]
- end;
-end;
-
-var
- _GetNextDlgGroupItem: Pointer;
-
-function GetNextDlgGroupItem;
-begin
- GetProcedureAddress(_GetNextDlgGroupItem, user32, 'GetNextDlgGroupItem');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetNextDlgGroupItem]
- end;
-end;
-
-var
- _GetNextDlgTabItem: Pointer;
-
-function GetNextDlgTabItem;
-begin
- GetProcedureAddress(_GetNextDlgTabItem, user32, 'GetNextDlgTabItem');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetNextDlgTabItem]
- end;
-end;
-
-var
- _GetDlgCtrlID: Pointer;
-
-function GetDlgCtrlID;
-begin
- GetProcedureAddress(_GetDlgCtrlID, user32, 'GetDlgCtrlID');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetDlgCtrlID]
- end;
-end;
-
-var
- _GetDialogBaseUnits: Pointer;
-
-function GetDialogBaseUnits;
-begin
- GetProcedureAddress(_GetDialogBaseUnits, user32, 'GetDialogBaseUnits');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetDialogBaseUnits]
- end;
-end;
-
-var
- _DefDlgProcA: Pointer;
-
-function DefDlgProcA;
-begin
- GetProcedureAddress(_DefDlgProcA, user32, 'DefDlgProcA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DefDlgProcA]
- end;
-end;
-
-var
- _DefDlgProcW: Pointer;
-
-function DefDlgProcW;
-begin
- GetProcedureAddress(_DefDlgProcW, user32, 'DefDlgProcW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DefDlgProcW]
- end;
-end;
-
-var
- _DefDlgProc: Pointer;
-
-function DefDlgProc;
-begin
- GetProcedureAddress(_DefDlgProc, user32, 'DefDlgProc' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DefDlgProc]
- end;
-end;
-
-var
- _CallMsgFilterA: Pointer;
-
-function CallMsgFilterA;
-begin
- GetProcedureAddress(_CallMsgFilterA, user32, 'CallMsgFilterA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CallMsgFilterA]
- end;
-end;
-
-var
- _CallMsgFilterW: Pointer;
-
-function CallMsgFilterW;
-begin
- GetProcedureAddress(_CallMsgFilterW, user32, 'CallMsgFilterW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CallMsgFilterW]
- end;
-end;
-
-var
- _CallMsgFilter: Pointer;
-
-function CallMsgFilter;
-begin
- GetProcedureAddress(_CallMsgFilter, user32, 'CallMsgFilter' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CallMsgFilter]
- end;
-end;
-
-var
- _OpenClipboard: Pointer;
-
-function OpenClipboard;
-begin
- GetProcedureAddress(_OpenClipboard, user32, 'OpenClipboard');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_OpenClipboard]
- end;
-end;
-
-var
- _CloseClipboard: Pointer;
-
-function CloseClipboard;
-begin
- GetProcedureAddress(_CloseClipboard, user32, 'CloseClipboard');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CloseClipboard]
- end;
-end;
-
-var
- _GetClipboardSequenceNumber: Pointer;
-
-function GetClipboardSequenceNumber;
-begin
- GetProcedureAddress(_GetClipboardSequenceNumber, user32, 'GetClipboardSequenceNumber');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetClipboardSequenceNumber]
- end;
-end;
-
-var
- _GetClipboardOwner: Pointer;
-
-function GetClipboardOwner;
-begin
- GetProcedureAddress(_GetClipboardOwner, user32, 'GetClipboardOwner');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetClipboardOwner]
- end;
-end;
-
-var
- _SetClipboardViewer: Pointer;
-
-function SetClipboardViewer;
-begin
- GetProcedureAddress(_SetClipboardViewer, user32, 'SetClipboardViewer');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetClipboardViewer]
- end;
-end;
-
-var
- _GetClipboardViewer: Pointer;
-
-function GetClipboardViewer;
-begin
- GetProcedureAddress(_GetClipboardViewer, user32, 'GetClipboardViewer');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetClipboardViewer]
- end;
-end;
-
-var
- _ChangeClipboardChain: Pointer;
-
-function ChangeClipboardChain;
-begin
- GetProcedureAddress(_ChangeClipboardChain, user32, 'ChangeClipboardChain');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ChangeClipboardChain]
- end;
-end;
-
-var
- _SetClipboardData: Pointer;
-
-function SetClipboardData;
-begin
- GetProcedureAddress(_SetClipboardData, user32, 'SetClipboardData');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetClipboardData]
- end;
-end;
-
-var
- _GetClipboardData: Pointer;
-
-function GetClipboardData;
-begin
- GetProcedureAddress(_GetClipboardData, user32, 'GetClipboardData');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetClipboardData]
- end;
-end;
-
-var
- _RegisterClipboardFormatA: Pointer;
-
-function RegisterClipboardFormatA;
-begin
- GetProcedureAddress(_RegisterClipboardFormatA, user32, 'RegisterClipboardFormatA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RegisterClipboardFormatA]
- end;
-end;
-
-var
- _RegisterClipboardFormatW: Pointer;
-
-function RegisterClipboardFormatW;
-begin
- GetProcedureAddress(_RegisterClipboardFormatW, user32, 'RegisterClipboardFormatW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RegisterClipboardFormatW]
- end;
-end;
-
-var
- _RegisterClipboardFormat: Pointer;
-
-function RegisterClipboardFormat;
-begin
- GetProcedureAddress(_RegisterClipboardFormat, user32, 'RegisterClipboardFormat' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RegisterClipboardFormat]
- end;
-end;
-
-var
- _CountClipboardFormats: Pointer;
-
-function CountClipboardFormats;
-begin
- GetProcedureAddress(_CountClipboardFormats, user32, 'CountClipboardFormats');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CountClipboardFormats]
- end;
-end;
-
-var
- _EnumClipboardFormats: Pointer;
-
-function EnumClipboardFormats;
-begin
- GetProcedureAddress(_EnumClipboardFormats, user32, 'EnumClipboardFormats');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_EnumClipboardFormats]
- end;
-end;
-
-var
- _GetClipboardFormatNameA: Pointer;
-
-function GetClipboardFormatNameA;
-begin
- GetProcedureAddress(_GetClipboardFormatNameA, user32, 'GetClipboardFormatNameA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetClipboardFormatNameA]
- end;
-end;
-
-var
- _GetClipboardFormatNameW: Pointer;
-
-function GetClipboardFormatNameW;
-begin
- GetProcedureAddress(_GetClipboardFormatNameW, user32, 'GetClipboardFormatNameW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetClipboardFormatNameW]
- end;
-end;
-
-var
- _GetClipboardFormatName: Pointer;
-
-function GetClipboardFormatName;
-begin
- GetProcedureAddress(_GetClipboardFormatName, user32, 'GetClipboardFormatName' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetClipboardFormatName]
- end;
-end;
-
-var
- _EmptyClipboard: Pointer;
-
-function EmptyClipboard;
-begin
- GetProcedureAddress(_EmptyClipboard, user32, 'EmptyClipboard');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_EmptyClipboard]
- end;
-end;
-
-var
- _IsClipboardFormatAvailable: Pointer;
-
-function IsClipboardFormatAvailable;
-begin
- GetProcedureAddress(_IsClipboardFormatAvailable, user32, 'IsClipboardFormatAvailable');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_IsClipboardFormatAvailable]
- end;
-end;
-
-var
- _GetPriorityClipboardFormat: Pointer;
-
-function GetPriorityClipboardFormat;
-begin
- GetProcedureAddress(_GetPriorityClipboardFormat, user32, 'GetPriorityClipboardFormat');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetPriorityClipboardFormat]
- end;
-end;
-
-var
- _GetOpenClipboardWindow: Pointer;
-
-function GetOpenClipboardWindow;
-begin
- GetProcedureAddress(_GetOpenClipboardWindow, user32, 'GetOpenClipboardWindow');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetOpenClipboardWindow]
- end;
-end;
-
-var
- _CharToOemA: Pointer;
-
-function CharToOemA;
-begin
- GetProcedureAddress(_CharToOemA, user32, 'CharToOemA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CharToOemA]
- end;
-end;
-
-var
- _CharToOemW: Pointer;
-
-function CharToOemW;
-begin
- GetProcedureAddress(_CharToOemW, user32, 'CharToOemW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CharToOemW]
- end;
-end;
-
-var
- _CharToOem: Pointer;
-
-function CharToOem;
-begin
- GetProcedureAddress(_CharToOem, user32, 'CharToOem' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CharToOem]
- end;
-end;
-
-var
- _OemToCharA: Pointer;
-
-function OemToCharA;
-begin
- GetProcedureAddress(_OemToCharA, user32, 'OemToCharA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_OemToCharA]
- end;
-end;
-
-var
- _OemToCharW: Pointer;
-
-function OemToCharW;
-begin
- GetProcedureAddress(_OemToCharW, user32, 'OemToCharW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_OemToCharW]
- end;
-end;
-
-var
- _OemToChar: Pointer;
-
-function OemToChar;
-begin
- GetProcedureAddress(_OemToChar, user32, 'OemToChar' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_OemToChar]
- end;
-end;
-
-var
- _CharToOemBuffA: Pointer;
-
-function CharToOemBuffA;
-begin
- GetProcedureAddress(_CharToOemBuffA, user32, 'CharToOemBuffA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CharToOemBuffA]
- end;
-end;
-
-var
- _CharToOemBuffW: Pointer;
-
-function CharToOemBuffW;
-begin
- GetProcedureAddress(_CharToOemBuffW, user32, 'CharToOemBuffW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CharToOemBuffW]
- end;
-end;
-
-var
- _CharToOemBuff: Pointer;
-
-function CharToOemBuff;
-begin
- GetProcedureAddress(_CharToOemBuff, user32, 'CharToOemBuff' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CharToOemBuff]
- end;
-end;
-
-var
- _OemToCharBuffA: Pointer;
-
-function OemToCharBuffA;
-begin
- GetProcedureAddress(_OemToCharBuffA, user32, 'OemToCharBuffA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_OemToCharBuffA]
- end;
-end;
-
-var
- _OemToCharBuffW: Pointer;
-
-function OemToCharBuffW;
-begin
- GetProcedureAddress(_OemToCharBuffW, user32, 'OemToCharBuffW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_OemToCharBuffW]
- end;
-end;
-
-var
- _OemToCharBuff: Pointer;
-
-function OemToCharBuff;
-begin
- GetProcedureAddress(_OemToCharBuff, user32, 'OemToCharBuff' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_OemToCharBuff]
- end;
-end;
-
-var
- _CharUpperA: Pointer;
-
-function CharUpperA;
-begin
- GetProcedureAddress(_CharUpperA, user32, 'CharUpperA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CharUpperA]
- end;
-end;
-
-var
- _CharUpperW: Pointer;
-
-function CharUpperW;
-begin
- GetProcedureAddress(_CharUpperW, user32, 'CharUpperW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CharUpperW]
- end;
-end;
-
-var
- _CharUpper: Pointer;
-
-function CharUpper;
-begin
- GetProcedureAddress(_CharUpper, user32, 'CharUpper' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CharUpper]
- end;
-end;
-
-var
- _CharUpperBuffA: Pointer;
-
-function CharUpperBuffA;
-begin
- GetProcedureAddress(_CharUpperBuffA, user32, 'CharUpperBuffA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CharUpperBuffA]
- end;
-end;
-
-var
- _CharUpperBuffW: Pointer;
-
-function CharUpperBuffW;
-begin
- GetProcedureAddress(_CharUpperBuffW, user32, 'CharUpperBuffW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CharUpperBuffW]
- end;
-end;
-
-var
- _CharUpperBuff: Pointer;
-
-function CharUpperBuff;
-begin
- GetProcedureAddress(_CharUpperBuff, user32, 'CharUpperBuff' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CharUpperBuff]
- end;
-end;
-
-var
- _CharLowerA: Pointer;
-
-function CharLowerA;
-begin
- GetProcedureAddress(_CharLowerA, user32, 'CharLowerA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CharLowerA]
- end;
-end;
-
-var
- _CharLowerW: Pointer;
-
-function CharLowerW;
-begin
- GetProcedureAddress(_CharLowerW, user32, 'CharLowerW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CharLowerW]
- end;
-end;
-
-var
- _CharLower: Pointer;
-
-function CharLower;
-begin
- GetProcedureAddress(_CharLower, user32, 'CharLower' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CharLower]
- end;
-end;
-
-var
- _CharLowerBuffA: Pointer;
-
-function CharLowerBuffA;
-begin
- GetProcedureAddress(_CharLowerBuffA, user32, 'CharLowerBuffA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CharLowerBuffA]
- end;
-end;
-
-var
- _CharLowerBuffW: Pointer;
-
-function CharLowerBuffW;
-begin
- GetProcedureAddress(_CharLowerBuffW, user32, 'CharLowerBuffW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CharLowerBuffW]
- end;
-end;
-
-var
- _CharLowerBuff: Pointer;
-
-function CharLowerBuff;
-begin
- GetProcedureAddress(_CharLowerBuff, user32, 'CharLowerBuff' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CharLowerBuff]
- end;
-end;
-
-var
- _CharNextA: Pointer;
-
-function CharNextA;
-begin
- GetProcedureAddress(_CharNextA, user32, 'CharNextA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CharNextA]
- end;
-end;
-
-var
- _CharNextW: Pointer;
-
-function CharNextW;
-begin
- GetProcedureAddress(_CharNextW, user32, 'CharNextW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CharNextW]
- end;
-end;
-
-var
- _CharNext: Pointer;
-
-function CharNext;
-begin
- GetProcedureAddress(_CharNext, user32, 'CharNext' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CharNext]
- end;
-end;
-
-var
- _CharPrevA: Pointer;
-
-function CharPrevA;
-begin
- GetProcedureAddress(_CharPrevA, user32, 'CharPrevA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CharPrevA]
- end;
-end;
-
-var
- _CharPrevW: Pointer;
-
-function CharPrevW;
-begin
- GetProcedureAddress(_CharPrevW, user32, 'CharPrevW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CharPrevW]
- end;
-end;
-
-var
- _CharPrev: Pointer;
-
-function CharPrev;
-begin
- GetProcedureAddress(_CharPrev, user32, 'CharPrev' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CharPrev]
- end;
-end;
-
-var
- _CharNextExA: Pointer;
-
-function CharNextExA;
-begin
- GetProcedureAddress(_CharNextExA, user32, 'CharNextExA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CharNextExA]
- end;
-end;
-
-var
- _CharPrevExA: Pointer;
-
-function CharPrevExA;
-begin
- GetProcedureAddress(_CharPrevExA, user32, 'CharPrevExA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CharPrevExA]
- end;
-end;
-
-var
- _IsCharAlphaA: Pointer;
-
-function IsCharAlphaA;
-begin
- GetProcedureAddress(_IsCharAlphaA, user32, 'IsCharAlphaA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_IsCharAlphaA]
- end;
-end;
-
-var
- _IsCharAlphaW: Pointer;
-
-function IsCharAlphaW;
-begin
- GetProcedureAddress(_IsCharAlphaW, user32, 'IsCharAlphaW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_IsCharAlphaW]
- end;
-end;
-
-var
- _IsCharAlpha: Pointer;
-
-function IsCharAlpha;
-begin
- GetProcedureAddress(_IsCharAlpha, user32, 'IsCharAlpha' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_IsCharAlpha]
- end;
-end;
-
-var
- _IsCharAlphaNumericA: Pointer;
-
-function IsCharAlphaNumericA;
-begin
- GetProcedureAddress(_IsCharAlphaNumericA, user32, 'IsCharAlphaNumericA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_IsCharAlphaNumericA]
- end;
-end;
-
-var
- _IsCharAlphaNumericW: Pointer;
-
-function IsCharAlphaNumericW;
-begin
- GetProcedureAddress(_IsCharAlphaNumericW, user32, 'IsCharAlphaNumericW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_IsCharAlphaNumericW]
- end;
-end;
-
-var
- _IsCharAlphaNumeric: Pointer;
-
-function IsCharAlphaNumeric;
-begin
- GetProcedureAddress(_IsCharAlphaNumeric, user32, 'IsCharAlphaNumeric' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_IsCharAlphaNumeric]
- end;
-end;
-
-var
- _IsCharUpperA: Pointer;
-
-function IsCharUpperA;
-begin
- GetProcedureAddress(_IsCharUpperA, user32, 'IsCharUpperA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_IsCharUpperA]
- end;
-end;
-
-var
- _IsCharUpperW: Pointer;
-
-function IsCharUpperW;
-begin
- GetProcedureAddress(_IsCharUpperW, user32, 'IsCharUpperW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_IsCharUpperW]
- end;
-end;
-
-var
- _IsCharUpper: Pointer;
-
-function IsCharUpper;
-begin
- GetProcedureAddress(_IsCharUpper, user32, 'IsCharUpper' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_IsCharUpper]
- end;
-end;
-
-var
- _IsCharLowerA: Pointer;
-
-function IsCharLowerA;
-begin
- GetProcedureAddress(_IsCharLowerA, user32, 'IsCharLowerA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_IsCharLowerA]
- end;
-end;
-
-var
- _IsCharLowerW: Pointer;
-
-function IsCharLowerW;
-begin
- GetProcedureAddress(_IsCharLowerW, user32, 'IsCharLowerW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_IsCharLowerW]
- end;
-end;
-
-var
- _IsCharLower: Pointer;
-
-function IsCharLower;
-begin
- GetProcedureAddress(_IsCharLower, user32, 'IsCharLower' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_IsCharLower]
- end;
-end;
-
-var
- _SetFocus: Pointer;
-
-function SetFocus;
-begin
- GetProcedureAddress(_SetFocus, user32, 'SetFocus');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetFocus]
- end;
-end;
-
-var
- _GetActiveWindow: Pointer;
-
-function GetActiveWindow;
-begin
- GetProcedureAddress(_GetActiveWindow, user32, 'GetActiveWindow');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetActiveWindow]
- end;
-end;
-
-var
- _GetFocus: Pointer;
-
-function GetFocus;
-begin
- GetProcedureAddress(_GetFocus, user32, 'GetFocus');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetFocus]
- end;
-end;
-
-var
- _GetKBCodePage: Pointer;
-
-function GetKBCodePage;
-begin
- GetProcedureAddress(_GetKBCodePage, user32, 'GetKBCodePage');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetKBCodePage]
- end;
-end;
-
-var
- _GetKeyState: Pointer;
-
-function GetKeyState;
-begin
- GetProcedureAddress(_GetKeyState, user32, 'GetKeyState');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetKeyState]
- end;
-end;
-
-var
- _GetAsyncKeyState: Pointer;
-
-function GetAsyncKeyState;
-begin
- GetProcedureAddress(_GetAsyncKeyState, user32, 'GetAsyncKeyState');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetAsyncKeyState]
- end;
-end;
-
-var
- _GetKeyboardState: Pointer;
-
-function GetKeyboardState;
-begin
- GetProcedureAddress(_GetKeyboardState, user32, 'GetKeyboardState');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetKeyboardState]
- end;
-end;
-
-var
- _SetKeyboardState: Pointer;
-
-function SetKeyboardState;
-begin
- GetProcedureAddress(_SetKeyboardState, user32, 'SetKeyboardState');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetKeyboardState]
- end;
-end;
-
-var
- _GetKeyNameTextA: Pointer;
-
-function GetKeyNameTextA;
-begin
- GetProcedureAddress(_GetKeyNameTextA, user32, 'GetKeyNameTextA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetKeyNameTextA]
- end;
-end;
-
-var
- _GetKeyNameTextW: Pointer;
-
-function GetKeyNameTextW;
-begin
- GetProcedureAddress(_GetKeyNameTextW, user32, 'GetKeyNameTextW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetKeyNameTextW]
- end;
-end;
-
-var
- _GetKeyNameText: Pointer;
-
-function GetKeyNameText;
-begin
- GetProcedureAddress(_GetKeyNameText, user32, 'GetKeyNameText' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetKeyNameText]
- end;
-end;
-
-var
- _GetKeyboardType: Pointer;
-
-function GetKeyboardType;
-begin
- GetProcedureAddress(_GetKeyboardType, user32, 'GetKeyboardType');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetKeyboardType]
- end;
-end;
-
-var
- _ToAscii: Pointer;
-
-function ToAscii;
-begin
- GetProcedureAddress(_ToAscii, user32, 'ToAscii');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ToAscii]
- end;
-end;
-
-var
- _ToAsciiEx: Pointer;
-
-function ToAsciiEx;
-begin
- GetProcedureAddress(_ToAsciiEx, user32, 'ToAsciiEx');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ToAsciiEx]
- end;
-end;
-
-var
- _ToUnicode: Pointer;
-
-function ToUnicode;
-begin
- GetProcedureAddress(_ToUnicode, user32, 'ToUnicode');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ToUnicode]
- end;
-end;
-
-var
- _OemKeyScan: Pointer;
-
-function OemKeyScan;
-begin
- GetProcedureAddress(_OemKeyScan, user32, 'OemKeyScan');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_OemKeyScan]
- end;
-end;
-
-var
- _VkKeyScanA: Pointer;
-
-function VkKeyScanA;
-begin
- GetProcedureAddress(_VkKeyScanA, user32, 'VkKeyScanA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_VkKeyScanA]
- end;
-end;
-
-var
- _VkKeyScanW: Pointer;
-
-function VkKeyScanW;
-begin
- GetProcedureAddress(_VkKeyScanW, user32, 'VkKeyScanW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_VkKeyScanW]
- end;
-end;
-
-var
- _VkKeyScan: Pointer;
-
-function VkKeyScan;
-begin
- GetProcedureAddress(_VkKeyScan, user32, 'VkKeyScan' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_VkKeyScan]
- end;
-end;
-
-var
- _VkKeyScanExA: Pointer;
-
-function VkKeyScanExA;
-begin
- GetProcedureAddress(_VkKeyScanExA, user32, 'VkKeyScanExA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_VkKeyScanExA]
- end;
-end;
-
-var
- _VkKeyScanExW: Pointer;
-
-function VkKeyScanExW;
-begin
- GetProcedureAddress(_VkKeyScanExW, user32, 'VkKeyScanExW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_VkKeyScanExW]
- end;
-end;
-
-var
- _VkKeyScanEx: Pointer;
-
-function VkKeyScanEx;
-begin
- GetProcedureAddress(_VkKeyScanEx, user32, 'VkKeyScanEx' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_VkKeyScanEx]
- end;
-end;
-
-var
- _keybd_event: Pointer;
-
-procedure keybd_event;
-begin
- GetProcedureAddress(_keybd_event, user32, 'keybd_event');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_keybd_event]
- end;
-end;
-
-var
- _mouse_event: Pointer;
-
-procedure mouse_event;
-begin
- GetProcedureAddress(_mouse_event, user32, 'mouse_event');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_mouse_event]
- end;
-end;
-
-var
- _SendInput: Pointer;
-
-function SendInput;
-begin
- GetProcedureAddress(_SendInput, user32, 'SendInput');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SendInput]
- end;
-end;
-
-var
- _GetLastInputInfo: Pointer;
-
-function GetLastInputInfo;
-begin
- GetProcedureAddress(_GetLastInputInfo, user32, 'GetLastInputInfo');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetLastInputInfo]
- end;
-end;
-
-var
- _MapVirtualKeyA: Pointer;
-
-function MapVirtualKeyA;
-begin
- GetProcedureAddress(_MapVirtualKeyA, user32, 'MapVirtualKeyA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MapVirtualKeyA]
- end;
-end;
-
-var
- _MapVirtualKeyW: Pointer;
-
-function MapVirtualKeyW;
-begin
- GetProcedureAddress(_MapVirtualKeyW, user32, 'MapVirtualKeyW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MapVirtualKeyW]
- end;
-end;
-
-var
- _MapVirtualKey: Pointer;
-
-function MapVirtualKey;
-begin
- GetProcedureAddress(_MapVirtualKey, user32, 'MapVirtualKey' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MapVirtualKey]
- end;
-end;
-
-var
- _MapVirtualKeyExA: Pointer;
-
-function MapVirtualKeyExA;
-begin
- GetProcedureAddress(_MapVirtualKeyExA, user32, 'MapVirtualKeyExA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MapVirtualKeyExA]
- end;
-end;
-
-var
- _MapVirtualKeyExW: Pointer;
-
-function MapVirtualKeyExW;
-begin
- GetProcedureAddress(_MapVirtualKeyExW, user32, 'MapVirtualKeyExW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MapVirtualKeyExW]
- end;
-end;
-
-var
- _MapVirtualKeyEx: Pointer;
-
-function MapVirtualKeyEx;
-begin
- GetProcedureAddress(_MapVirtualKeyEx, user32, 'MapVirtualKeyEx' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MapVirtualKeyEx]
- end;
-end;
-
-var
- _GetInputState: Pointer;
-
-function GetInputState;
-begin
- GetProcedureAddress(_GetInputState, user32, 'GetInputState');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetInputState]
- end;
-end;
-
-var
- _GetQueueStatus: Pointer;
-
-function GetQueueStatus;
-begin
- GetProcedureAddress(_GetQueueStatus, user32, 'GetQueueStatus');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetQueueStatus]
- end;
-end;
-
-var
- _GetCapture: Pointer;
-
-function GetCapture;
-begin
- GetProcedureAddress(_GetCapture, user32, 'GetCapture');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetCapture]
- end;
-end;
-
-var
- _SetCapture: Pointer;
-
-function SetCapture;
-begin
- GetProcedureAddress(_SetCapture, user32, 'SetCapture');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetCapture]
- end;
-end;
-
-var
- _ReleaseCapture: Pointer;
-
-function ReleaseCapture;
-begin
- GetProcedureAddress(_ReleaseCapture, user32, 'ReleaseCapture');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ReleaseCapture]
- end;
-end;
-
-var
- _MsgWaitForMultipleObjects: Pointer;
-
-function MsgWaitForMultipleObjects;
-begin
- GetProcedureAddress(_MsgWaitForMultipleObjects, user32, 'MsgWaitForMultipleObjects');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsgWaitForMultipleObjects]
- end;
-end;
-
-var
- _MsgWaitForMultipleObjectsEx: Pointer;
-
-function MsgWaitForMultipleObjectsEx;
-begin
- GetProcedureAddress(_MsgWaitForMultipleObjectsEx, user32, 'MsgWaitForMultipleObjectsEx');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MsgWaitForMultipleObjectsEx]
- end;
-end;
-
-var
- _SetTimer: Pointer;
-
-function SetTimer;
-begin
- GetProcedureAddress(_SetTimer, user32, 'SetTimer');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetTimer]
- end;
-end;
-
-var
- _KillTimer: Pointer;
-
-function KillTimer;
-begin
- GetProcedureAddress(_KillTimer, user32, 'KillTimer');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_KillTimer]
- end;
-end;
-
-var
- _IsWindowUnicode: Pointer;
-
-function IsWindowUnicode;
-begin
- GetProcedureAddress(_IsWindowUnicode, user32, 'IsWindowUnicode');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_IsWindowUnicode]
- end;
-end;
-
-var
- _EnableWindow: Pointer;
-
-function EnableWindow;
-begin
- GetProcedureAddress(_EnableWindow, user32, 'EnableWindow');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_EnableWindow]
- end;
-end;
-
-var
- _IsWindowEnabled: Pointer;
-
-function IsWindowEnabled;
-begin
- GetProcedureAddress(_IsWindowEnabled, user32, 'IsWindowEnabled');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_IsWindowEnabled]
- end;
-end;
-
-var
- _LoadAcceleratorsA: Pointer;
-
-function LoadAcceleratorsA;
-begin
- GetProcedureAddress(_LoadAcceleratorsA, user32, 'LoadAcceleratorsA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_LoadAcceleratorsA]
- end;
-end;
-
-var
- _LoadAcceleratorsW: Pointer;
-
-function LoadAcceleratorsW;
-begin
- GetProcedureAddress(_LoadAcceleratorsW, user32, 'LoadAcceleratorsW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_LoadAcceleratorsW]
- end;
-end;
-
-var
- _LoadAccelerators: Pointer;
-
-function LoadAccelerators;
-begin
- GetProcedureAddress(_LoadAccelerators, user32, 'LoadAccelerators' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_LoadAccelerators]
- end;
-end;
-
-var
- _CreateAcceleratorTableA: Pointer;
-
-function CreateAcceleratorTableA;
-begin
- GetProcedureAddress(_CreateAcceleratorTableA, user32, 'CreateAcceleratorTableA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreateAcceleratorTableA]
- end;
-end;
-
-var
- _CreateAcceleratorTableW: Pointer;
-
-function CreateAcceleratorTableW;
-begin
- GetProcedureAddress(_CreateAcceleratorTableW, user32, 'CreateAcceleratorTableW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreateAcceleratorTableW]
- end;
-end;
-
-var
- _CreateAcceleratorTable: Pointer;
-
-function CreateAcceleratorTable;
-begin
- GetProcedureAddress(_CreateAcceleratorTable, user32, 'CreateAcceleratorTable' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreateAcceleratorTable]
- end;
-end;
-
-var
- _DestroyAcceleratorTable: Pointer;
-
-function DestroyAcceleratorTable;
-begin
- GetProcedureAddress(_DestroyAcceleratorTable, user32, 'DestroyAcceleratorTable');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DestroyAcceleratorTable]
- end;
-end;
-
-var
- _CopyAcceleratorTableA: Pointer;
-
-function CopyAcceleratorTableA;
-begin
- GetProcedureAddress(_CopyAcceleratorTableA, user32, 'CopyAcceleratorTableA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CopyAcceleratorTableA]
- end;
-end;
-
-var
- _CopyAcceleratorTableW: Pointer;
-
-function CopyAcceleratorTableW;
-begin
- GetProcedureAddress(_CopyAcceleratorTableW, user32, 'CopyAcceleratorTableW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CopyAcceleratorTableW]
- end;
-end;
-
-var
- _CopyAcceleratorTable: Pointer;
-
-function CopyAcceleratorTable;
-begin
- GetProcedureAddress(_CopyAcceleratorTable, user32, 'CopyAcceleratorTable' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CopyAcceleratorTable]
- end;
-end;
-
-var
- _TranslateAcceleratorA: Pointer;
-
-function TranslateAcceleratorA;
-begin
- GetProcedureAddress(_TranslateAcceleratorA, user32, 'TranslateAcceleratorA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_TranslateAcceleratorA]
- end;
-end;
-
-var
- _TranslateAcceleratorW: Pointer;
-
-function TranslateAcceleratorW;
-begin
- GetProcedureAddress(_TranslateAcceleratorW, user32, 'TranslateAcceleratorW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_TranslateAcceleratorW]
- end;
-end;
-
-var
- _TranslateAccelerator: Pointer;
-
-function TranslateAccelerator;
-begin
- GetProcedureAddress(_TranslateAccelerator, user32, 'TranslateAccelerator' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_TranslateAccelerator]
- end;
-end;
-
-var
- _GetSystemMetrics: Pointer;
-
-function GetSystemMetrics;
-begin
- GetProcedureAddress(_GetSystemMetrics, user32, 'GetSystemMetrics');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetSystemMetrics]
- end;
-end;
-
-var
- _LoadMenuA: Pointer;
-
-function LoadMenuA;
-begin
- GetProcedureAddress(_LoadMenuA, user32, 'LoadMenuAA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_LoadMenuA]
- end;
-end;
-
-var
- _LoadMenuW: Pointer;
-
-function LoadMenuW;
-begin
- GetProcedureAddress(_LoadMenuW, user32, 'LoadMenuWA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_LoadMenuW]
- end;
-end;
-
-var
- _LoadMenu: Pointer;
-
-function LoadMenu;
-begin
- GetProcedureAddress(_LoadMenu, user32, 'LoadMenu' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_LoadMenu]
- end;
-end;
-
-var
- _LoadMenuIndirectA: Pointer;
-
-function LoadMenuIndirectA;
-begin
- GetProcedureAddress(_LoadMenuIndirectA, user32, 'LoadMenuIndirectA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_LoadMenuIndirectA]
- end;
-end;
-
-var
- _LoadMenuIndirectW: Pointer;
-
-function LoadMenuIndirectW;
-begin
- GetProcedureAddress(_LoadMenuIndirectW, user32, 'LoadMenuIndirectW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_LoadMenuIndirectW]
- end;
-end;
-
-var
- _LoadMenuIndirect: Pointer;
-
-function LoadMenuIndirect;
-begin
- GetProcedureAddress(_LoadMenuIndirect, user32, 'LoadMenuIndirect' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_LoadMenuIndirect]
- end;
-end;
-
-var
- _GetMenu: Pointer;
-
-function GetMenu;
-begin
- GetProcedureAddress(_GetMenu, user32, 'GetMenu');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetMenu]
- end;
-end;
-
-var
- _SetMenu: Pointer;
-
-function SetMenu;
-begin
- GetProcedureAddress(_SetMenu, user32, 'SetMenu');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetMenu]
- end;
-end;
-
-var
- _ChangeMenuA: Pointer;
-
-function ChangeMenuA;
-begin
- GetProcedureAddress(_ChangeMenuA, user32, 'ChangeMenuA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ChangeMenuA]
- end;
-end;
-
-var
- _ChangeMenuW: Pointer;
-
-function ChangeMenuW;
-begin
- GetProcedureAddress(_ChangeMenuW, user32, 'ChangeMenuW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ChangeMenuW]
- end;
-end;
-
-var
- _ChangeMenu: Pointer;
-
-function ChangeMenu;
-begin
- GetProcedureAddress(_ChangeMenu, user32, 'ChangeMenu' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ChangeMenu]
- end;
-end;
-
-var
- _HiliteMenuItem: Pointer;
-
-function HiliteMenuItem;
-begin
- GetProcedureAddress(_HiliteMenuItem, user32, 'HiliteMenuItem');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_HiliteMenuItem]
- end;
-end;
-
-var
- _GetMenuStringA: Pointer;
-
-function GetMenuStringA;
-begin
- GetProcedureAddress(_GetMenuStringA, user32, 'GetMenuStringA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetMenuStringA]
- end;
-end;
-
-var
- _GetMenuStringW: Pointer;
-
-function GetMenuStringW;
-begin
- GetProcedureAddress(_GetMenuStringW, user32, 'GetMenuStringW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetMenuStringW]
- end;
-end;
-
-var
- _GetMenuString: Pointer;
-
-function GetMenuString;
-begin
- GetProcedureAddress(_GetMenuString, user32, 'GetMenuString' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetMenuString]
- end;
-end;
-
-var
- _GetMenuState: Pointer;
-
-function GetMenuState;
-begin
- GetProcedureAddress(_GetMenuState, user32, 'GetMenuState');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetMenuState]
- end;
-end;
-
-var
- _DrawMenuBar: Pointer;
-
-function DrawMenuBar;
-begin
- GetProcedureAddress(_DrawMenuBar, user32, 'DrawMenuBar');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DrawMenuBar]
- end;
-end;
-
-var
- _GetSystemMenu: Pointer;
-
-function GetSystemMenu;
-begin
- GetProcedureAddress(_GetSystemMenu, user32, 'GetSystemMenu');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetSystemMenu]
- end;
-end;
-
-var
- _CreateMenu: Pointer;
-
-function CreateMenu;
-begin
- GetProcedureAddress(_CreateMenu, user32, 'CreateMenu');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreateMenu]
- end;
-end;
-
-var
- _CreatePopupMenu: Pointer;
-
-function CreatePopupMenu;
-begin
- GetProcedureAddress(_CreatePopupMenu, user32, 'CreatePopupMenu');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreatePopupMenu]
- end;
-end;
-
-var
- _DestroyMenu: Pointer;
-
-function DestroyMenu;
-begin
- GetProcedureAddress(_DestroyMenu, user32, 'DestroyMenu');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DestroyMenu]
- end;
-end;
-
-var
- _CheckMenuItem: Pointer;
-
-function CheckMenuItem;
-begin
- GetProcedureAddress(_CheckMenuItem, user32, 'CheckMenuItem');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CheckMenuItem]
- end;
-end;
-
-var
- _EnableMenuItem: Pointer;
-
-function EnableMenuItem;
-begin
- GetProcedureAddress(_EnableMenuItem, user32, 'EnableMenuItem');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_EnableMenuItem]
- end;
-end;
-
-var
- _GetSubMenu: Pointer;
-
-function GetSubMenu;
-begin
- GetProcedureAddress(_GetSubMenu, user32, 'GetSubMenu');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetSubMenu]
- end;
-end;
-
-var
- _GetMenuItemID: Pointer;
-
-function GetMenuItemID;
-begin
- GetProcedureAddress(_GetMenuItemID, user32, 'GetMenuItemID');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetMenuItemID]
- end;
-end;
-
-var
- _GetMenuItemCount: Pointer;
-
-function GetMenuItemCount;
-begin
- GetProcedureAddress(_GetMenuItemCount, user32, 'GetMenuItemCount');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetMenuItemCount]
- end;
-end;
-
-var
- _InsertMenuA: Pointer;
-
-function InsertMenuA;
-begin
- GetProcedureAddress(_InsertMenuA, user32, 'InsertMenuA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_InsertMenuA]
- end;
-end;
-
-var
- _InsertMenuW: Pointer;
-
-function InsertMenuW;
-begin
- GetProcedureAddress(_InsertMenuW, user32, 'InsertMenuW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_InsertMenuW]
- end;
-end;
-
-var
- _InsertMenu: Pointer;
-
-function InsertMenu;
-begin
- GetProcedureAddress(_InsertMenu, user32, 'InsertMenu' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_InsertMenu]
- end;
-end;
-
-var
- _AppendMenuA: Pointer;
-
-function AppendMenuA;
-begin
- GetProcedureAddress(_AppendMenuA, user32, 'AppendMenuA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_AppendMenuA]
- end;
-end;
-
-var
- _AppendMenuW: Pointer;
-
-function AppendMenuW;
-begin
- GetProcedureAddress(_AppendMenuW, user32, 'AppendMenuW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_AppendMenuW]
- end;
-end;
-
-var
- _AppendMenu: Pointer;
-
-function AppendMenu;
-begin
- GetProcedureAddress(_AppendMenu, user32, 'AppendMenu' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_AppendMenu]
- end;
-end;
-
-var
- _ModifyMenuA: Pointer;
-
-function ModifyMenuA;
-begin
- GetProcedureAddress(_ModifyMenuA, user32, 'ModifyMenuA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ModifyMenuA]
- end;
-end;
-
-var
- _ModifyMenuW: Pointer;
-
-function ModifyMenuW;
-begin
- GetProcedureAddress(_ModifyMenuW, user32, 'ModifyMenuW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ModifyMenuW]
- end;
-end;
-
-var
- _ModifyMenu: Pointer;
-
-function ModifyMenu;
-begin
- GetProcedureAddress(_ModifyMenu, user32, 'ModifyMenu' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ModifyMenu]
- end;
-end;
-
-var
- _RemoveMenu: Pointer;
-
-function RemoveMenu;
-begin
- GetProcedureAddress(_RemoveMenu, user32, 'RemoveMenu');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RemoveMenu]
- end;
-end;
-
-var
- _DeleteMenu: Pointer;
-
-function DeleteMenu;
-begin
- GetProcedureAddress(_DeleteMenu, user32, 'DeleteMenu');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DeleteMenu]
- end;
-end;
-
-var
- _SetMenuItemBitmaps: Pointer;
-
-function SetMenuItemBitmaps;
-begin
- GetProcedureAddress(_SetMenuItemBitmaps, user32, 'SetMenuItemBitmaps');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetMenuItemBitmaps]
- end;
-end;
-
-var
- _GetMenuCheckMarkDimensions: Pointer;
-
-function GetMenuCheckMarkDimensions;
-begin
- GetProcedureAddress(_GetMenuCheckMarkDimensions, user32, 'GetMenuCheckMarkDimensions');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetMenuCheckMarkDimensions]
- end;
-end;
-
-var
- _TrackPopupMenu: Pointer;
-
-function TrackPopupMenu;
-begin
- GetProcedureAddress(_TrackPopupMenu, user32, 'TrackPopupMenu');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_TrackPopupMenu]
- end;
-end;
-
-var
- _TrackPopupMenuEx: Pointer;
-
-function TrackPopupMenuEx;
-begin
- GetProcedureAddress(_TrackPopupMenuEx, user32, 'TrackPopupMenuEx');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_TrackPopupMenuEx]
- end;
-end;
-
-var
- _GetMenuInfo: Pointer;
-
-function GetMenuInfo;
-begin
- GetProcedureAddress(_GetMenuInfo, user32, 'GetMenuInfo');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetMenuInfo]
- end;
-end;
-
-var
- _SetMenuInfo: Pointer;
-
-function SetMenuInfo;
-begin
- GetProcedureAddress(_SetMenuInfo, user32, 'SetMenuInfo');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetMenuInfo]
- end;
-end;
-
-var
- _EndMenu: Pointer;
-
-function EndMenu;
-begin
- GetProcedureAddress(_EndMenu, user32, 'EndMenu');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_EndMenu]
- end;
-end;
-
-var
- _InsertMenuItemA: Pointer;
-
-function InsertMenuItemA;
-begin
- GetProcedureAddress(_InsertMenuItemA, user32, 'InsertMenuItemA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_InsertMenuItemA]
- end;
-end;
-
-var
- _InsertMenuItemW: Pointer;
-
-function InsertMenuItemW;
-begin
- GetProcedureAddress(_InsertMenuItemW, user32, 'InsertMenuItemW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_InsertMenuItemW]
- end;
-end;
-
-var
- _InsertMenuItem: Pointer;
-
-function InsertMenuItem;
-begin
- GetProcedureAddress(_InsertMenuItem, user32, 'InsertMenuItem' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_InsertMenuItem]
- end;
-end;
-
-var
- _GetMenuItemInfoA: Pointer;
-
-function GetMenuItemInfoA;
-begin
- GetProcedureAddress(_GetMenuItemInfoA, user32, 'GetMenuItemInfoA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetMenuItemInfoA]
- end;
-end;
-
-var
- _GetMenuItemInfoW: Pointer;
-
-function GetMenuItemInfoW;
-begin
- GetProcedureAddress(_GetMenuItemInfoW, user32, 'GetMenuItemInfoW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetMenuItemInfoW]
- end;
-end;
-
-var
- _GetMenuItemInfo: Pointer;
-
-function GetMenuItemInfo;
-begin
- GetProcedureAddress(_GetMenuItemInfo, user32, 'GetMenuItemInfo' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetMenuItemInfo]
- end;
-end;
-
-var
- _SetMenuItemInfoA: Pointer;
-
-function SetMenuItemInfoA;
-begin
- GetProcedureAddress(_SetMenuItemInfoA, user32, 'SetMenuItemInfoA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetMenuItemInfoA]
- end;
-end;
-
-var
- _SetMenuItemInfoW: Pointer;
-
-function SetMenuItemInfoW;
-begin
- GetProcedureAddress(_SetMenuItemInfoW, user32, 'SetMenuItemInfoW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetMenuItemInfoW]
- end;
-end;
-
-var
- _SetMenuItemInfo: Pointer;
-
-function SetMenuItemInfo;
-begin
- GetProcedureAddress(_SetMenuItemInfo, user32, 'SetMenuItemInfo' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetMenuItemInfo]
- end;
-end;
-
-var
- _GetMenuDefaultItem: Pointer;
-
-function GetMenuDefaultItem;
-begin
- GetProcedureAddress(_GetMenuDefaultItem, user32, 'GetMenuDefaultItem');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetMenuDefaultItem]
- end;
-end;
-
-var
- _SetMenuDefaultItem: Pointer;
-
-function SetMenuDefaultItem;
-begin
- GetProcedureAddress(_SetMenuDefaultItem, user32, 'SetMenuDefaultItem');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetMenuDefaultItem]
- end;
-end;
-
-var
- _GetMenuItemRect: Pointer;
-
-function GetMenuItemRect;
-begin
- GetProcedureAddress(_GetMenuItemRect, user32, 'GetMenuItemRect');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetMenuItemRect]
- end;
-end;
-
-var
- _MenuItemFromPoint: Pointer;
-
-function MenuItemFromPoint;
-begin
- GetProcedureAddress(_MenuItemFromPoint, user32, 'MenuItemFromPoint');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MenuItemFromPoint]
- end;
-end;
-
-var
- _DragObject: Pointer;
-
-function DragObject;
-begin
- GetProcedureAddress(_DragObject, user32, 'DragObject');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DragObject]
- end;
-end;
-
-var
- _DragDetect: Pointer;
-
-function DragDetect;
-begin
- GetProcedureAddress(_DragDetect, user32, 'DragDetect');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DragDetect]
- end;
-end;
-
-var
- _DrawIcon: Pointer;
-
-function DrawIcon;
-begin
- GetProcedureAddress(_DrawIcon, user32, 'DrawIcon');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DrawIcon]
- end;
-end;
-
-var
- _DrawTextA: Pointer;
-
-function DrawTextA;
-begin
- GetProcedureAddress(_DrawTextA, user32, 'DrawTextA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DrawTextA]
- end;
-end;
-
-var
- _DrawTextW: Pointer;
-
-function DrawTextW;
-begin
- GetProcedureAddress(_DrawTextW, user32, 'DrawTextW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DrawTextW]
- end;
-end;
-
-var
- _DrawText: Pointer;
-
-function DrawText;
-begin
- GetProcedureAddress(_DrawText, user32, 'DrawText' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DrawText]
- end;
-end;
-
-var
- _DrawTextExA: Pointer;
-
-function DrawTextExA;
-begin
- GetProcedureAddress(_DrawTextExA, user32, 'DrawTextExA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DrawTextExA]
- end;
-end;
-
-var
- _DrawTextExW: Pointer;
-
-function DrawTextExW;
-begin
- GetProcedureAddress(_DrawTextExW, user32, 'DrawTextExW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DrawTextExW]
- end;
-end;
-
-var
- _DrawTextEx: Pointer;
-
-function DrawTextEx;
-begin
- GetProcedureAddress(_DrawTextEx, user32, 'DrawTextEx' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DrawTextEx]
- end;
-end;
-
-var
- _GrayStringA: Pointer;
-
-function GrayStringA;
-begin
- GetProcedureAddress(_GrayStringA, user32, 'GrayStringA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GrayStringA]
- end;
-end;
-
-var
- _GrayStringW: Pointer;
-
-function GrayStringW;
-begin
- GetProcedureAddress(_GrayStringW, user32, 'GrayStringW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GrayStringW]
- end;
-end;
-
-var
- _GrayString: Pointer;
-
-function GrayString;
-begin
- GetProcedureAddress(_GrayString, user32, 'GrayString' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GrayString]
- end;
-end;
-
-var
- _DrawStateA: Pointer;
-
-function DrawStateA;
-begin
- GetProcedureAddress(_DrawStateA, user32, 'DrawStateA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DrawStateA]
- end;
-end;
-
-var
- _DrawStateW: Pointer;
-
-function DrawStateW;
-begin
- GetProcedureAddress(_DrawStateW, user32, 'DrawStateW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DrawStateW]
- end;
-end;
-
-var
- _DrawState: Pointer;
-
-function DrawState;
-begin
- GetProcedureAddress(_DrawState, user32, 'DrawState' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DrawState]
- end;
-end;
-
-var
- _TabbedTextOutA: Pointer;
-
-function TabbedTextOutA;
-begin
- GetProcedureAddress(_TabbedTextOutA, user32, 'TabbedTextOutA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_TabbedTextOutA]
- end;
-end;
-
-var
- _TabbedTextOutW: Pointer;
-
-function TabbedTextOutW;
-begin
- GetProcedureAddress(_TabbedTextOutW, user32, 'TabbedTextOutW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_TabbedTextOutW]
- end;
-end;
-
-var
- _TabbedTextOut: Pointer;
-
-function TabbedTextOut;
-begin
- GetProcedureAddress(_TabbedTextOut, user32, 'TabbedTextOut' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_TabbedTextOut]
- end;
-end;
-
-var
- _GetTabbedTextExtentA: Pointer;
-
-function GetTabbedTextExtentA;
-begin
- GetProcedureAddress(_GetTabbedTextExtentA, user32, 'GetTabbedTextExtentA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetTabbedTextExtentA]
- end;
-end;
-
-var
- _GetTabbedTextExtentW: Pointer;
-
-function GetTabbedTextExtentW;
-begin
- GetProcedureAddress(_GetTabbedTextExtentW, user32, 'GetTabbedTextExtentW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetTabbedTextExtentW]
- end;
-end;
-
-var
- _GetTabbedTextExtent: Pointer;
-
-function GetTabbedTextExtent;
-begin
- GetProcedureAddress(_GetTabbedTextExtent, user32, 'GetTabbedTextExtent' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetTabbedTextExtent]
- end;
-end;
-
-var
- _UpdateWindow: Pointer;
-
-function UpdateWindow;
-begin
- GetProcedureAddress(_UpdateWindow, user32, 'UpdateWindow');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_UpdateWindow]
- end;
-end;
-
-var
- _SetActiveWindow: Pointer;
-
-function SetActiveWindow;
-begin
- GetProcedureAddress(_SetActiveWindow, user32, 'SetActiveWindow');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetActiveWindow]
- end;
-end;
-
-var
- _GetForegroundWindow: Pointer;
-
-function GetForegroundWindow;
-begin
- GetProcedureAddress(_GetForegroundWindow, user32, 'GetForegroundWindow');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetForegroundWindow]
- end;
-end;
-
-var
- _PaintDesktop: Pointer;
-
-function PaintDesktop;
-begin
- GetProcedureAddress(_PaintDesktop, user32, 'PaintDesktop');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PaintDesktop]
- end;
-end;
-
-var
- _SwitchToThisWindow: Pointer;
-
-procedure SwitchToThisWindow;
-begin
- GetProcedureAddress(_SwitchToThisWindow, user32, 'SwitchToThisWindow');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SwitchToThisWindow]
- end;
-end;
-
-var
- _SetForegroundWindow: Pointer;
-
-function SetForegroundWindow;
-begin
- GetProcedureAddress(_SetForegroundWindow, user32, 'SetForegroundWindow');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetForegroundWindow]
- end;
-end;
-
-var
- _AllowSetForegroundWindow: Pointer;
-
-function AllowSetForegroundWindow;
-begin
- GetProcedureAddress(_AllowSetForegroundWindow, user32, 'AllowSetForegroundWindow');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_AllowSetForegroundWindow]
- end;
-end;
-
-var
- _LockSetForegroundWindow: Pointer;
-
-function LockSetForegroundWindow;
-begin
- GetProcedureAddress(_LockSetForegroundWindow, user32, 'LockSetForegroundWindow');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_LockSetForegroundWindow]
- end;
-end;
-
-var
- _WindowFromDC: Pointer;
-
-function WindowFromDC;
-begin
- GetProcedureAddress(_WindowFromDC, user32, 'WindowFromDC');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WindowFromDC]
- end;
-end;
-
-var
- _GetDC: Pointer;
-
-function GetDC;
-begin
- GetProcedureAddress(_GetDC, user32, 'GetDC');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetDC]
- end;
-end;
-
-var
- _GetDCEx: Pointer;
-
-function GetDCEx;
-begin
- GetProcedureAddress(_GetDCEx, user32, 'GetDCEx');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetDCEx]
- end;
-end;
-
-var
- _GetWindowDC: Pointer;
-
-function GetWindowDC;
-begin
- GetProcedureAddress(_GetWindowDC, user32, 'GetWindowDC');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetWindowDC]
- end;
-end;
-
-var
- _ReleaseDC: Pointer;
-
-function ReleaseDC;
-begin
- GetProcedureAddress(_ReleaseDC, user32, 'ReleaseDC');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ReleaseDC]
- end;
-end;
-
-var
- _BeginPaint: Pointer;
-
-function BeginPaint;
-begin
- GetProcedureAddress(_BeginPaint, user32, 'BeginPaint');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_BeginPaint]
- end;
-end;
-
-var
- _EndPaint: Pointer;
-
-function EndPaint;
-begin
- GetProcedureAddress(_EndPaint, user32, 'EndPaint');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_EndPaint]
- end;
-end;
-
-var
- _GetUpdateRect: Pointer;
-
-function GetUpdateRect;
-begin
- GetProcedureAddress(_GetUpdateRect, user32, 'GetUpdateRect');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetUpdateRect]
- end;
-end;
-
-var
- _GetUpdateRgn: Pointer;
-
-function GetUpdateRgn;
-begin
- GetProcedureAddress(_GetUpdateRgn, user32, 'GetUpdateRgn');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetUpdateRgn]
- end;
-end;
-
-var
- _SetWindowRgn: Pointer;
-
-function SetWindowRgn;
-begin
- GetProcedureAddress(_SetWindowRgn, user32, 'SetWindowRgn');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetWindowRgn]
- end;
-end;
-
-var
- _GetWindowRgn: Pointer;
-
-function GetWindowRgn;
-begin
- GetProcedureAddress(_GetWindowRgn, user32, 'GetWindowRgn');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetWindowRgn]
- end;
-end;
-
-var
- _GetWindowRgnBox: Pointer;
-
-function GetWindowRgnBox;
-begin
- GetProcedureAddress(_GetWindowRgnBox, user32, 'GetWindowRgnBox');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetWindowRgnBox]
- end;
-end;
-
-var
- _ExcludeUpdateRgn: Pointer;
-
-function ExcludeUpdateRgn;
-begin
- GetProcedureAddress(_ExcludeUpdateRgn, user32, 'ExcludeUpdateRgn');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ExcludeUpdateRgn]
- end;
-end;
-
-var
- _InvalidateRect: Pointer;
-
-function InvalidateRect;
-begin
- GetProcedureAddress(_InvalidateRect, user32, 'InvalidateRect');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_InvalidateRect]
- end;
-end;
-
-var
- _ValidateRect: Pointer;
-
-function ValidateRect;
-begin
- GetProcedureAddress(_ValidateRect, user32, 'ValidateRect');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ValidateRect]
- end;
-end;
-
-var
- _InvalidateRgn: Pointer;
-
-function InvalidateRgn;
-begin
- GetProcedureAddress(_InvalidateRgn, user32, 'InvalidateRgn');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_InvalidateRgn]
- end;
-end;
-
-var
- _ValidateRgn: Pointer;
-
-function ValidateRgn;
-begin
- GetProcedureAddress(_ValidateRgn, user32, 'ValidateRgn');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ValidateRgn]
- end;
-end;
-
-var
- _RedrawWindow: Pointer;
-
-function RedrawWindow;
-begin
- GetProcedureAddress(_RedrawWindow, user32, 'RedrawWindow');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RedrawWindow]
- end;
-end;
-
-var
- _LockWindowUpdate: Pointer;
-
-function LockWindowUpdate;
-begin
- GetProcedureAddress(_LockWindowUpdate, user32, 'LockWindowUpdate');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_LockWindowUpdate]
- end;
-end;
-
-var
- _ScrollWindow: Pointer;
-
-function ScrollWindow;
-begin
- GetProcedureAddress(_ScrollWindow, user32, 'ScrollWindow');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ScrollWindow]
- end;
-end;
-
-var
- _ScrollDC: Pointer;
-
-function ScrollDC;
-begin
- GetProcedureAddress(_ScrollDC, user32, 'ScrollDC');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ScrollDC]
- end;
-end;
-
-var
- _ScrollWindowEx: Pointer;
-
-function ScrollWindowEx;
-begin
- GetProcedureAddress(_ScrollWindowEx, user32, 'ScrollWindowEx');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ScrollWindowEx]
- end;
-end;
-
-var
- _SetScrollPos: Pointer;
-
-function SetScrollPos;
-begin
- GetProcedureAddress(_SetScrollPos, user32, 'SetScrollPos');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetScrollPos]
- end;
-end;
-
-var
- _GetScrollPos: Pointer;
-
-function GetScrollPos;
-begin
- GetProcedureAddress(_GetScrollPos, user32, 'GetScrollPos');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetScrollPos]
- end;
-end;
-
-var
- _SetScrollRange: Pointer;
-
-function SetScrollRange;
-begin
- GetProcedureAddress(_SetScrollRange, user32, 'SetScrollRange');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetScrollRange]
- end;
-end;
-
-var
- _GetScrollRange: Pointer;
-
-function GetScrollRange;
-begin
- GetProcedureAddress(_GetScrollRange, user32, 'GetScrollRange');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetScrollRange]
- end;
-end;
-
-var
- _ShowScrollBar: Pointer;
-
-function ShowScrollBar;
-begin
- GetProcedureAddress(_ShowScrollBar, user32, 'ShowScrollBar');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ShowScrollBar]
- end;
-end;
-
-var
- _EnableScrollBar: Pointer;
-
-function EnableScrollBar;
-begin
- GetProcedureAddress(_EnableScrollBar, user32, 'EnableScrollBar');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_EnableScrollBar]
- end;
-end;
-
-var
- _SetPropA: Pointer;
-
-function SetPropA;
-begin
- GetProcedureAddress(_SetPropA, user32, 'SetPropA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetPropA]
- end;
-end;
-
-var
- _SetPropW: Pointer;
-
-function SetPropW;
-begin
- GetProcedureAddress(_SetPropW, user32, 'SetPropW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetPropW]
- end;
-end;
-
-var
- _SetProp: Pointer;
-
-function SetProp;
-begin
- GetProcedureAddress(_SetProp, user32, 'SetProp' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetProp]
- end;
-end;
-
-var
- _GetPropA: Pointer;
-
-function GetPropA;
-begin
- GetProcedureAddress(_GetPropA, user32, 'GetPropA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetPropA]
- end;
-end;
-
-var
- _GetPropW: Pointer;
-
-function GetPropW;
-begin
- GetProcedureAddress(_GetPropW, user32, 'GetPropW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetPropW]
- end;
-end;
-
-var
- _GetProp: Pointer;
-
-function GetProp;
-begin
- GetProcedureAddress(_GetProp, user32, 'GetProp' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetProp]
- end;
-end;
-
-var
- _RemovePropA: Pointer;
-
-function RemovePropA;
-begin
- GetProcedureAddress(_RemovePropA, user32, 'RemovePropA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RemovePropA]
- end;
-end;
-
-var
- _RemovePropW: Pointer;
-
-function RemovePropW;
-begin
- GetProcedureAddress(_RemovePropW, user32, 'RemovePropW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RemovePropW]
- end;
-end;
-
-var
- _RemoveProp: Pointer;
-
-function RemoveProp;
-begin
- GetProcedureAddress(_RemoveProp, user32, 'RemoveProp' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RemoveProp]
- end;
-end;
-
-var
- _EnumPropsExA: Pointer;
-
-function EnumPropsExA;
-begin
- GetProcedureAddress(_EnumPropsExA, user32, 'EnumPropsExA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_EnumPropsExA]
- end;
-end;
-
-var
- _EnumPropsExW: Pointer;
-
-function EnumPropsExW;
-begin
- GetProcedureAddress(_EnumPropsExW, user32, 'EnumPropsExW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_EnumPropsExW]
- end;
-end;
-
-var
- _EnumPropsEx: Pointer;
-
-function EnumPropsEx;
-begin
- GetProcedureAddress(_EnumPropsEx, user32, 'EnumPropsEx' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_EnumPropsEx]
- end;
-end;
-
-var
- _EnumPropsA: Pointer;
-
-function EnumPropsA;
-begin
- GetProcedureAddress(_EnumPropsA, user32, 'EnumPropsA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_EnumPropsA]
- end;
-end;
-
-var
- _EnumPropsW: Pointer;
-
-function EnumPropsW;
-begin
- GetProcedureAddress(_EnumPropsW, user32, 'EnumPropsW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_EnumPropsW]
- end;
-end;
-
-var
- _EnumProps: Pointer;
-
-function EnumProps;
-begin
- GetProcedureAddress(_EnumProps, user32, 'EnumProps' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_EnumProps]
- end;
-end;
-
-var
- _SetWindowTextA: Pointer;
-
-function SetWindowTextA;
-begin
- GetProcedureAddress(_SetWindowTextA, user32, 'SetWindowTextA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetWindowTextA]
- end;
-end;
-
-var
- _SetWindowTextW: Pointer;
-
-function SetWindowTextW;
-begin
- GetProcedureAddress(_SetWindowTextW, user32, 'SetWindowTextW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetWindowTextW]
- end;
-end;
-
-var
- _SetWindowText: Pointer;
-
-function SetWindowText;
-begin
- GetProcedureAddress(_SetWindowText, user32, 'SetWindowText' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetWindowText]
- end;
-end;
-
-var
- _GetWindowTextA: Pointer;
-
-function GetWindowTextA;
-begin
- GetProcedureAddress(_GetWindowTextA, user32, 'GetWindowTextA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetWindowTextA]
- end;
-end;
-
-var
- _GetWindowTextW: Pointer;
-
-function GetWindowTextW;
-begin
- GetProcedureAddress(_GetWindowTextW, user32, 'GetWindowTextW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetWindowTextW]
- end;
-end;
-
-var
- _GetWindowText: Pointer;
-
-function GetWindowText;
-begin
- GetProcedureAddress(_GetWindowText, user32, 'GetWindowText' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetWindowText]
- end;
-end;
-
-var
- _GetWindowTextLengthA: Pointer;
-
-function GetWindowTextLengthA;
-begin
- GetProcedureAddress(_GetWindowTextLengthA, user32, 'GetWindowTextLengthA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetWindowTextLengthA]
- end;
-end;
-
-var
- _GetWindowTextLengthW: Pointer;
-
-function GetWindowTextLengthW;
-begin
- GetProcedureAddress(_GetWindowTextLengthW, user32, 'GetWindowTextLengthW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetWindowTextLengthW]
- end;
-end;
-
-var
- _GetWindowTextLength: Pointer;
-
-function GetWindowTextLength;
-begin
- GetProcedureAddress(_GetWindowTextLength, user32, 'GetWindowTextLength' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetWindowTextLength]
- end;
-end;
-
-var
- _GetClientRect: Pointer;
-
-function GetClientRect;
-begin
- GetProcedureAddress(_GetClientRect, user32, 'GetClientRect');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetClientRect]
- end;
-end;
-
-var
- _GetWindowRect: Pointer;
-
-function GetWindowRect;
-begin
- GetProcedureAddress(_GetWindowRect, user32, 'GetWindowRect');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetWindowRect]
- end;
-end;
-
-var
- _AdjustWindowRect: Pointer;
-
-function AdjustWindowRect;
-begin
- GetProcedureAddress(_AdjustWindowRect, user32, 'AdjustWindowRect');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_AdjustWindowRect]
- end;
-end;
-
-var
- _AdjustWindowRectEx: Pointer;
-
-function AdjustWindowRectEx;
-begin
- GetProcedureAddress(_AdjustWindowRectEx, user32, 'AdjustWindowRectEx');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_AdjustWindowRectEx]
- end;
-end;
-
-var
- _SetWindowContextHelpId: Pointer;
-
-function SetWindowContextHelpId;
-begin
- GetProcedureAddress(_SetWindowContextHelpId, user32, 'SetWindowContextHelpId');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetWindowContextHelpId]
- end;
-end;
-
-var
- _GetWindowContextHelpId: Pointer;
-
-function GetWindowContextHelpId;
-begin
- GetProcedureAddress(_GetWindowContextHelpId, user32, 'GetWindowContextHelpId');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetWindowContextHelpId]
- end;
-end;
-
-var
- _SetMenuContextHelpId: Pointer;
-
-function SetMenuContextHelpId;
-begin
- GetProcedureAddress(_SetMenuContextHelpId, user32, 'SetMenuContextHelpId');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetMenuContextHelpId]
- end;
-end;
-
-var
- _GetMenuContextHelpId: Pointer;
-
-function GetMenuContextHelpId;
-begin
- GetProcedureAddress(_GetMenuContextHelpId, user32, 'GetMenuContextHelpId');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetMenuContextHelpId]
- end;
-end;
-
-var
- _MessageBoxA: Pointer;
-
-function MessageBoxA;
-begin
- GetProcedureAddress(_MessageBoxA, user32, 'MessageBoxA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MessageBoxA]
- end;
-end;
-
-var
- _MessageBoxW: Pointer;
-
-function MessageBoxW;
-begin
- GetProcedureAddress(_MessageBoxW, user32, 'MessageBoxW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MessageBoxW]
- end;
-end;
-
-var
- _MessageBox: Pointer;
-
-function MessageBox;
-begin
- GetProcedureAddress(_MessageBox, user32, 'MessageBox' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MessageBox]
- end;
-end;
-
-var
- _MessageBoxExA: Pointer;
-
-function MessageBoxExA;
-begin
- GetProcedureAddress(_MessageBoxExA, user32, 'MessageBoxExA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MessageBoxExA]
- end;
-end;
-
-var
- _MessageBoxExW: Pointer;
-
-function MessageBoxExW;
-begin
- GetProcedureAddress(_MessageBoxExW, user32, 'MessageBoxExW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MessageBoxExW]
- end;
-end;
-
-var
- _MessageBoxEx: Pointer;
-
-function MessageBoxEx;
-begin
- GetProcedureAddress(_MessageBoxEx, user32, 'MessageBoxEx' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MessageBoxEx]
- end;
-end;
-
-var
- _MessageBoxIndirectA: Pointer;
-
-function MessageBoxIndirectA;
-begin
- GetProcedureAddress(_MessageBoxIndirectA, user32, 'MessageBoxIndirectA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MessageBoxIndirectA]
- end;
-end;
-
-var
- _MessageBoxIndirectW: Pointer;
-
-function MessageBoxIndirectW;
-begin
- GetProcedureAddress(_MessageBoxIndirectW, user32, 'MessageBoxIndirectW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MessageBoxIndirectW]
- end;
-end;
-
-var
- _MessageBoxIndirect: Pointer;
-
-function MessageBoxIndirect;
-begin
- GetProcedureAddress(_MessageBoxIndirect, user32, 'MessageBoxIndirect' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MessageBoxIndirect]
- end;
-end;
-
-var
- _MessageBeep: Pointer;
-
-function MessageBeep;
-begin
- GetProcedureAddress(_MessageBeep, user32, 'MessageBeep');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MessageBeep]
- end;
-end;
-
-var
- _ShowCursor: Pointer;
-
-function ShowCursor;
-begin
- GetProcedureAddress(_ShowCursor, user32, 'ShowCursor');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ShowCursor]
- end;
-end;
-
-var
- _SetCursorPos: Pointer;
-
-function SetCursorPos;
-begin
- GetProcedureAddress(_SetCursorPos, user32, 'SetCursorPos');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetCursorPos]
- end;
-end;
-
-var
- _SetCursor: Pointer;
-
-function SetCursor;
-begin
- GetProcedureAddress(_SetCursor, user32, 'SetCursor');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetCursor]
- end;
-end;
-
-var
- _GetCursorPos: Pointer;
-
-function GetCursorPos;
-begin
- GetProcedureAddress(_GetCursorPos, user32, 'GetCursorPos');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetCursorPos]
- end;
-end;
-
-var
- _ClipCursor: Pointer;
-
-function ClipCursor;
-begin
- GetProcedureAddress(_ClipCursor, user32, 'ClipCursor');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ClipCursor]
- end;
-end;
-
-var
- _GetClipCursor: Pointer;
-
-function GetClipCursor;
-begin
- GetProcedureAddress(_GetClipCursor, user32, 'GetClipCursor');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetClipCursor]
- end;
-end;
-
-var
- _GetCursor: Pointer;
-
-function GetCursor;
-begin
- GetProcedureAddress(_GetCursor, user32, 'GetCursor');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetCursor]
- end;
-end;
-
-var
- _CreateCaret: Pointer;
-
-function CreateCaret;
-begin
- GetProcedureAddress(_CreateCaret, user32, 'CreateCaret');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreateCaret]
- end;
-end;
-
-var
- _GetCaretBlinkTime: Pointer;
-
-function GetCaretBlinkTime;
-begin
- GetProcedureAddress(_GetCaretBlinkTime, user32, 'GetCaretBlinkTime');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetCaretBlinkTime]
- end;
-end;
-
-var
- _SetCaretBlinkTime: Pointer;
-
-function SetCaretBlinkTime;
-begin
- GetProcedureAddress(_SetCaretBlinkTime, user32, 'SetCaretBlinkTime');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetCaretBlinkTime]
- end;
-end;
-
-var
- _DestroyCaret: Pointer;
-
-function DestroyCaret;
-begin
- GetProcedureAddress(_DestroyCaret, user32, 'DestroyCaret');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DestroyCaret]
- end;
-end;
-
-var
- _HideCaret: Pointer;
-
-function HideCaret;
-begin
- GetProcedureAddress(_HideCaret, user32, 'HideCaret');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_HideCaret]
- end;
-end;
-
-var
- _ShowCaret: Pointer;
-
-function ShowCaret;
-begin
- GetProcedureAddress(_ShowCaret, user32, 'ShowCaret');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ShowCaret]
- end;
-end;
-
-var
- _SetCaretPos: Pointer;
-
-function SetCaretPos;
-begin
- GetProcedureAddress(_SetCaretPos, user32, 'SetCaretPos');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetCaretPos]
- end;
-end;
-
-var
- _GetCaretPos: Pointer;
-
-function GetCaretPos;
-begin
- GetProcedureAddress(_GetCaretPos, user32, 'GetCaretPos');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetCaretPos]
- end;
-end;
-
-var
- _ClientToScreen: Pointer;
-
-function ClientToScreen;
-begin
- GetProcedureAddress(_ClientToScreen, user32, 'ClientToScreen');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ClientToScreen]
- end;
-end;
-
-var
- _ScreenToClient: Pointer;
-
-function ScreenToClient;
-begin
- GetProcedureAddress(_ScreenToClient, user32, 'ScreenToClient');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ScreenToClient]
- end;
-end;
-
-var
- _MapWindowPoints: Pointer;
-
-function MapWindowPoints;
-begin
- GetProcedureAddress(_MapWindowPoints, user32, 'MapWindowPoints');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MapWindowPoints]
- end;
-end;
-
-var
- _WindowFromPoint: Pointer;
-
-function WindowFromPoint;
-begin
- GetProcedureAddress(_WindowFromPoint, user32, 'WindowFromPoint');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WindowFromPoint]
- end;
-end;
-
-var
- _ChildWindowFromPoint: Pointer;
-
-function ChildWindowFromPoint;
-begin
- GetProcedureAddress(_ChildWindowFromPoint, user32, 'ChildWindowFromPoint');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ChildWindowFromPoint]
- end;
-end;
-
-var
- _ChildWindowFromPointEx: Pointer;
-
-function ChildWindowFromPointEx;
-begin
- GetProcedureAddress(_ChildWindowFromPointEx, user32, 'ChildWindowFromPointEx');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ChildWindowFromPointEx]
- end;
-end;
-
-var
- _GetSysColor: Pointer;
-
-function GetSysColor;
-begin
- GetProcedureAddress(_GetSysColor, user32, 'GetSysColor');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetSysColor]
- end;
-end;
-
-var
- _GetSysColorBrush: Pointer;
-
-function GetSysColorBrush;
-begin
- GetProcedureAddress(_GetSysColorBrush, user32, 'GetSysColorBrush');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetSysColorBrush]
- end;
-end;
-
-var
- _SetSysColors: Pointer;
-
-function SetSysColors;
-begin
- GetProcedureAddress(_SetSysColors, user32, 'SetSysColors');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetSysColors]
- end;
-end;
-
-var
- _DrawFocusRect: Pointer;
-
-function DrawFocusRect;
-begin
- GetProcedureAddress(_DrawFocusRect, user32, 'DrawFocusRect');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DrawFocusRect]
- end;
-end;
-
-var
- _FillRect: Pointer;
-
-function FillRect;
-begin
- GetProcedureAddress(_FillRect, user32, 'FillRect');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_FillRect]
- end;
-end;
-
-var
- _FrameRect: Pointer;
-
-function FrameRect;
-begin
- GetProcedureAddress(_FrameRect, user32, 'FrameRect');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_FrameRect]
- end;
-end;
-
-var
- _InvertRect: Pointer;
-
-function InvertRect;
-begin
- GetProcedureAddress(_InvertRect, user32, 'InvertRect');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_InvertRect]
- end;
-end;
-
-var
- _SetRect: Pointer;
-
-function SetRect;
-begin
- GetProcedureAddress(_SetRect, user32, 'SetRect');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetRect]
- end;
-end;
-
-var
- _SetRectEmpty: Pointer;
-
-function SetRectEmpty;
-begin
- GetProcedureAddress(_SetRectEmpty, user32, 'SetRectEmpty');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetRectEmpty]
- end;
-end;
-
-var
- _CopyRect: Pointer;
-
-function CopyRect;
-begin
- GetProcedureAddress(_CopyRect, user32, 'CopyRect');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CopyRect]
- end;
-end;
-
-var
- _InflateRect: Pointer;
-
-function InflateRect;
-begin
- GetProcedureAddress(_InflateRect, user32, 'InflateRect');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_InflateRect]
- end;
-end;
-
-var
- _IntersectRect: Pointer;
-
-function IntersectRect;
-begin
- GetProcedureAddress(_IntersectRect, user32, 'IntersectRect');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_IntersectRect]
- end;
-end;
-
-var
- _UnionRect: Pointer;
-
-function UnionRect;
-begin
- GetProcedureAddress(_UnionRect, user32, 'UnionRect');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_UnionRect]
- end;
-end;
-
-var
- _SubtractRect: Pointer;
-
-function SubtractRect;
-begin
- GetProcedureAddress(_SubtractRect, user32, 'SubtractRect');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SubtractRect]
- end;
-end;
-
-var
- _OffsetRect: Pointer;
-
-function OffsetRect;
-begin
- GetProcedureAddress(_OffsetRect, user32, 'OffsetRect');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_OffsetRect]
- end;
-end;
-
-var
- _IsRectEmpty: Pointer;
-
-function IsRectEmpty;
-begin
- GetProcedureAddress(_IsRectEmpty, user32, 'IsRectEmpty');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_IsRectEmpty]
- end;
-end;
-
-var
- _EqualRect: Pointer;
-
-function EqualRect;
-begin
- GetProcedureAddress(_EqualRect, user32, 'EqualRect');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_EqualRect]
- end;
-end;
-
-var
- _PtInRect: Pointer;
-
-function PtInRect;
-begin
- GetProcedureAddress(_PtInRect, user32, 'PtInRect');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PtInRect]
- end;
-end;
-
-var
- _GetWindowWord: Pointer;
-
-function GetWindowWord;
-begin
- GetProcedureAddress(_GetWindowWord, user32, 'GetWindowWord');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetWindowWord]
- end;
-end;
-
-var
- _SetWindowWord: Pointer;
-
-function SetWindowWord;
-begin
- GetProcedureAddress(_SetWindowWord, user32, 'SetWindowWord');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetWindowWord]
- end;
-end;
-
-var
- _GetWindowLongA: Pointer;
-
-function GetWindowLongA;
-begin
- GetProcedureAddress(_GetWindowLongA, user32, 'GetWindowLongA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetWindowLongA]
- end;
-end;
-
-var
- _GetWindowLongW: Pointer;
-
-function GetWindowLongW;
-begin
- GetProcedureAddress(_GetWindowLongW, user32, 'GetWindowLongW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetWindowLongW]
- end;
-end;
-
-var
- _GetWindowLong: Pointer;
-
-function GetWindowLong;
-begin
- GetProcedureAddress(_GetWindowLong, user32, 'GetWindowLong' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetWindowLong]
- end;
-end;
-
-var
- _SetWindowLongA: Pointer;
-
-function SetWindowLongA;
-begin
- GetProcedureAddress(_SetWindowLongA, user32, 'SetWindowLongA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetWindowLongA]
- end;
-end;
-
-var
- _SetWindowLongW: Pointer;
-
-function SetWindowLongW;
-begin
- GetProcedureAddress(_SetWindowLongW, user32, 'SetWindowLongW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetWindowLongW]
- end;
-end;
-
-var
- _SetWindowLong: Pointer;
-
-function SetWindowLong;
-begin
- GetProcedureAddress(_SetWindowLong, user32, 'SetWindowLong' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetWindowLong]
- end;
-end;
-
-var
- _GetClassWord: Pointer;
-
-function GetClassWord;
-begin
- GetProcedureAddress(_GetClassWord, user32, 'GetClassWord');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetClassWord]
- end;
-end;
-
-var
- _SetClassWord: Pointer;
-
-function SetClassWord;
-begin
- GetProcedureAddress(_SetClassWord, user32, 'SetClassWord');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetClassWord]
- end;
-end;
-
-var
- _GetClassLongA: Pointer;
-
-function GetClassLongA;
-begin
- GetProcedureAddress(_GetClassLongA, user32, 'GetClassLongA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetClassLongA]
- end;
-end;
-
-var
- _GetClassLongW: Pointer;
-
-function GetClassLongW;
-begin
- GetProcedureAddress(_GetClassLongW, user32, 'GetClassLongW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetClassLongW]
- end;
-end;
-
-var
- _GetClassLong: Pointer;
-
-function GetClassLong;
-begin
- GetProcedureAddress(_GetClassLong, user32, 'GetClassLong' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetClassLong]
- end;
-end;
-
-var
- _SetClassLongA: Pointer;
-
-function SetClassLongA;
-begin
- GetProcedureAddress(_SetClassLongA, user32, 'SetClassLongA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetClassLongA]
- end;
-end;
-
-var
- _SetClassLongW: Pointer;
-
-function SetClassLongW;
-begin
- GetProcedureAddress(_SetClassLongW, user32, 'SetClassLongW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetClassLongW]
- end;
-end;
-
-var
- _SetClassLong: Pointer;
-
-function SetClassLong;
-begin
- GetProcedureAddress(_SetClassLong, user32, 'SetClassLong' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetClassLong]
- end;
-end;
-
-var
- _GetProcessDefaultLayout: Pointer;
-
-function GetProcessDefaultLayout;
-begin
- GetProcedureAddress(_GetProcessDefaultLayout, user32, 'GetProcessDefaultLayout');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetProcessDefaultLayout]
- end;
-end;
-
-var
- _SetProcessDefaultLayout: Pointer;
-
-function SetProcessDefaultLayout;
-begin
- GetProcedureAddress(_SetProcessDefaultLayout, user32, 'SetProcessDefaultLayout');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetProcessDefaultLayout]
- end;
-end;
-
-var
- _GetDesktopWindow: Pointer;
-
-function GetDesktopWindow;
-begin
- GetProcedureAddress(_GetDesktopWindow, user32, 'GetDesktopWindow');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetDesktopWindow]
- end;
-end;
-
-var
- _GetParent: Pointer;
-
-function GetParent;
-begin
- GetProcedureAddress(_GetParent, user32, 'GetParent');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetParent]
- end;
-end;
-
-var
- _SetParent: Pointer;
-
-function SetParent;
-begin
- GetProcedureAddress(_SetParent, user32, 'SetParent');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetParent]
- end;
-end;
-
-var
- _EnumChildWindows: Pointer;
-
-function EnumChildWindows;
-begin
- GetProcedureAddress(_EnumChildWindows, user32, 'EnumChildWindows');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_EnumChildWindows]
- end;
-end;
-
-var
- _FindWindowA: Pointer;
-
-function FindWindowA;
-begin
- GetProcedureAddress(_FindWindowA, user32, 'FindWindowA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_FindWindowA]
- end;
-end;
-
-var
- _FindWindowW: Pointer;
-
-function FindWindowW;
-begin
- GetProcedureAddress(_FindWindowW, user32, 'FindWindowW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_FindWindowW]
- end;
-end;
-
-var
- _FindWindow: Pointer;
-
-function FindWindow;
-begin
- GetProcedureAddress(_FindWindow, user32, 'FindWindow' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_FindWindow]
- end;
-end;
-
-var
- _FindWindowExA: Pointer;
-
-function FindWindowExA;
-begin
- GetProcedureAddress(_FindWindowExA, user32, 'FindWindowExA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_FindWindowExA]
- end;
-end;
-
-var
- _FindWindowExW: Pointer;
-
-function FindWindowExW;
-begin
- GetProcedureAddress(_FindWindowExW, user32, 'FindWindowExW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_FindWindowExW]
- end;
-end;
-
-var
- _FindWindowEx: Pointer;
-
-function FindWindowEx;
-begin
- GetProcedureAddress(_FindWindowEx, user32, 'FindWindowEx' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_FindWindowEx]
- end;
-end;
-
-var
- _GetShellWindow: Pointer;
-
-function GetShellWindow;
-begin
- GetProcedureAddress(_GetShellWindow, user32, 'GetShellWindow');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetShellWindow]
- end;
-end;
-
-var
- _RegisterShellHookWindow: Pointer;
-
-function RegisterShellHookWindow;
-begin
- GetProcedureAddress(_RegisterShellHookWindow, user32, 'RegisterShellHookWindow');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RegisterShellHookWindow]
- end;
-end;
-
-var
- _DeregisterShellHookWindow: Pointer;
-
-function DeregisterShellHookWindow;
-begin
- GetProcedureAddress(_DeregisterShellHookWindow, user32, 'DeregisterShellHookWindow');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DeregisterShellHookWindow]
- end;
-end;
-
-var
- _EnumWindows: Pointer;
-
-function EnumWindows;
-begin
- GetProcedureAddress(_EnumWindows, user32, 'EnumWindows');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_EnumWindows]
- end;
-end;
-
-var
- _EnumThreadWindows: Pointer;
-
-function EnumThreadWindows;
-begin
- GetProcedureAddress(_EnumThreadWindows, user32, 'EnumThreadWindows');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_EnumThreadWindows]
- end;
-end;
-
-var
- _GetClassNameA: Pointer;
-
-function GetClassNameA;
-begin
- GetProcedureAddress(_GetClassNameA, user32, 'GetClassNameA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetClassNameA]
- end;
-end;
-
-var
- _GetClassNameW: Pointer;
-
-function GetClassNameW;
-begin
- GetProcedureAddress(_GetClassNameW, user32, 'GetClassNameW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetClassNameW]
- end;
-end;
-
-var
- _GetClassName: Pointer;
-
-function GetClassName;
-begin
- GetProcedureAddress(_GetClassName, user32, 'GetClassName' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetClassName]
- end;
-end;
-
-var
- _GetTopWindow: Pointer;
-
-function GetTopWindow;
-begin
- GetProcedureAddress(_GetTopWindow, user32, 'GetTopWindow');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetTopWindow]
- end;
-end;
-
-var
- _GetWindowThreadProcessId: Pointer;
-
-function GetWindowThreadProcessId;
-begin
- GetProcedureAddress(_GetWindowThreadProcessId, user32, 'GetWindowThreadProcessId');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetWindowThreadProcessId]
- end;
-end;
-
-var
- _IsGUIThread: Pointer;
-
-function IsGUIThread;
-begin
- GetProcedureAddress(_IsGUIThread, user32, 'IsGUIThread');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_IsGUIThread]
- end;
-end;
-
-var
- _GetLastActivePopup: Pointer;
-
-function GetLastActivePopup;
-begin
- GetProcedureAddress(_GetLastActivePopup, user32, 'GetLastActivePopup');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetLastActivePopup]
- end;
-end;
-
-var
- _GetWindow: Pointer;
-
-function GetWindow;
-begin
- GetProcedureAddress(_GetWindow, user32, 'GetWindow');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetWindow]
- end;
-end;
-
-var
- _SetWindowsHookA: Pointer;
-
-function SetWindowsHookA;
-begin
- GetProcedureAddress(_SetWindowsHookA, user32, 'SetWindowsHookA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetWindowsHookA]
- end;
-end;
-
-var
- _SetWindowsHookW: Pointer;
-
-function SetWindowsHookW;
-begin
- GetProcedureAddress(_SetWindowsHookW, user32, 'SetWindowsHookW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetWindowsHookW]
- end;
-end;
-
-var
- _SetWindowsHook: Pointer;
-
-function SetWindowsHook;
-begin
- GetProcedureAddress(_SetWindowsHook, user32, 'SetWindowsHook' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetWindowsHook]
- end;
-end;
-
-var
- _UnhookWindowsHook: Pointer;
-
-function UnhookWindowsHook;
-begin
- GetProcedureAddress(_UnhookWindowsHook, user32, 'UnhookWindowsHook');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_UnhookWindowsHook]
- end;
-end;
-
-var
- _SetWindowsHookExA: Pointer;
-
-function SetWindowsHookExA;
-begin
- GetProcedureAddress(_SetWindowsHookExA, user32, 'SetWindowsHookExA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetWindowsHookExA]
- end;
-end;
-
-var
- _SetWindowsHookExW: Pointer;
-
-function SetWindowsHookExW;
-begin
- GetProcedureAddress(_SetWindowsHookExW, user32, 'SetWindowsHookExW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetWindowsHookExW]
- end;
-end;
-
-var
- _SetWindowsHookEx: Pointer;
-
-function SetWindowsHookEx;
-begin
- GetProcedureAddress(_SetWindowsHookEx, user32, 'SetWindowsHookEx' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetWindowsHookEx]
- end;
-end;
-
-var
- _UnhookWindowsHookEx: Pointer;
-
-function UnhookWindowsHookEx;
-begin
- GetProcedureAddress(_UnhookWindowsHookEx, user32, 'UnhookWindowsHookEx');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_UnhookWindowsHookEx]
- end;
-end;
-
-var
- _CallNextHookEx: Pointer;
-
-function CallNextHookEx;
-begin
- GetProcedureAddress(_CallNextHookEx, user32, 'CallNextHookEx');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CallNextHookEx]
- end;
-end;
-
-var
- _CheckMenuRadioItem: Pointer;
-
-function CheckMenuRadioItem;
-begin
- GetProcedureAddress(_CheckMenuRadioItem, user32, 'CheckMenuRadioItem');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CheckMenuRadioItem]
- end;
-end;
-
-var
- _LoadBitmapA: Pointer;
-
-function LoadBitmapA;
-begin
- GetProcedureAddress(_LoadBitmapA, user32, 'LoadBitmapA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_LoadBitmapA]
- end;
-end;
-
-var
- _LoadBitmapW: Pointer;
-
-function LoadBitmapW;
-begin
- GetProcedureAddress(_LoadBitmapW, user32, 'LoadBitmapW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_LoadBitmapW]
- end;
-end;
-
-var
- _LoadBitmap: Pointer;
-
-function LoadBitmap;
-begin
- GetProcedureAddress(_LoadBitmap, user32, 'LoadBitmap' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_LoadBitmap]
- end;
-end;
-
-var
- _LoadCursorA: Pointer;
-
-function LoadCursorA;
-begin
- GetProcedureAddress(_LoadCursorA, user32, 'LoadCursorA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_LoadCursorA]
- end;
-end;
-
-var
- _LoadCursorW: Pointer;
-
-function LoadCursorW;
-begin
- GetProcedureAddress(_LoadCursorW, user32, 'LoadCursorW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_LoadCursorW]
- end;
-end;
-
-var
- _LoadCursor: Pointer;
-
-function LoadCursor;
-begin
- GetProcedureAddress(_LoadCursor, user32, 'LoadCursor' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_LoadCursor]
- end;
-end;
-
-var
- _LoadCursorFromFileA: Pointer;
-
-function LoadCursorFromFileA;
-begin
- GetProcedureAddress(_LoadCursorFromFileA, user32, 'LoadCursorFromFileA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_LoadCursorFromFileA]
- end;
-end;
-
-var
- _LoadCursorFromFileW: Pointer;
-
-function LoadCursorFromFileW;
-begin
- GetProcedureAddress(_LoadCursorFromFileW, user32, 'LoadCursorFromFileW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_LoadCursorFromFileW]
- end;
-end;
-
-var
- _LoadCursorFromFile: Pointer;
-
-function LoadCursorFromFile;
-begin
- GetProcedureAddress(_LoadCursorFromFile, user32, 'LoadCursorFromFile' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_LoadCursorFromFile]
- end;
-end;
-
-var
- _CreateCursor: Pointer;
-
-function CreateCursor;
-begin
- GetProcedureAddress(_CreateCursor, user32, 'CreateCursor');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreateCursor]
- end;
-end;
-
-var
- _DestroyCursor: Pointer;
-
-function DestroyCursor;
-begin
- GetProcedureAddress(_DestroyCursor, user32, 'DestroyCursor');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DestroyCursor]
- end;
-end;
-
-var
- _SetSystemCursor: Pointer;
-
-function SetSystemCursor;
-begin
- GetProcedureAddress(_SetSystemCursor, user32, 'SetSystemCursor');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetSystemCursor]
- end;
-end;
-
-var
- _LoadIconA: Pointer;
-
-function LoadIconA;
-begin
- GetProcedureAddress(_LoadIconA, user32, 'LoadIconA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_LoadIconA]
- end;
-end;
-
-var
- _LoadIconW: Pointer;
-
-function LoadIconW;
-begin
- GetProcedureAddress(_LoadIconW, user32, 'LoadIconW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_LoadIconW]
- end;
-end;
-
-var
- _LoadIcon: Pointer;
-
-function LoadIcon;
-begin
- GetProcedureAddress(_LoadIcon, user32, 'LoadIcon' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_LoadIcon]
- end;
-end;
-
-var
- _PrivateExtractIconsA: Pointer;
-
-function PrivateExtractIconsA;
-begin
- GetProcedureAddress(_PrivateExtractIconsA, user32, 'PrivateExtractIconsA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PrivateExtractIconsA]
- end;
-end;
-
-var
- _PrivateExtractIconsW: Pointer;
-
-function PrivateExtractIconsW;
-begin
- GetProcedureAddress(_PrivateExtractIconsW, user32, 'PrivateExtractIconsW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PrivateExtractIconsW]
- end;
-end;
-
-var
- _PrivateExtractIcons: Pointer;
-
-function PrivateExtractIcons;
-begin
- GetProcedureAddress(_PrivateExtractIcons, user32, 'PrivateExtractIcons' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_PrivateExtractIcons]
- end;
-end;
-
-var
- _CreateIcon: Pointer;
-
-function CreateIcon;
-begin
- GetProcedureAddress(_CreateIcon, user32, 'CreateIcon');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreateIcon]
- end;
-end;
-
-var
- _DestroyIcon: Pointer;
-
-function DestroyIcon;
-begin
- GetProcedureAddress(_DestroyIcon, user32, 'DestroyIcon');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DestroyIcon]
- end;
-end;
-
-var
- _LookupIconIdFromDirectory: Pointer;
-
-function LookupIconIdFromDirectory;
-begin
- GetProcedureAddress(_LookupIconIdFromDirectory, user32, 'LookupIconIdFromDirectory');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_LookupIconIdFromDirectory]
- end;
-end;
-
-var
- _LookupIconIdFromDirectoryEx: Pointer;
-
-function LookupIconIdFromDirectoryEx;
-begin
- GetProcedureAddress(_LookupIconIdFromDirectoryEx, user32, 'LookupIconIdFromDirectoryEx');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_LookupIconIdFromDirectoryEx]
- end;
-end;
-
-var
- _CreateIconFromResource: Pointer;
-
-function CreateIconFromResource;
-begin
- GetProcedureAddress(_CreateIconFromResource, user32, 'CreateIconFromResource');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreateIconFromResource]
- end;
-end;
-
-var
- _CreateIconFromResourceEx: Pointer;
-
-function CreateIconFromResourceEx;
-begin
- GetProcedureAddress(_CreateIconFromResourceEx, user32, 'CreateIconFromResourceEx');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreateIconFromResourceEx]
- end;
-end;
-
-var
- _LoadImageA: Pointer;
-
-function LoadImageA;
-begin
- GetProcedureAddress(_LoadImageA, user32, 'LoadImageA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_LoadImageA]
- end;
-end;
-
-var
- _LoadImageW: Pointer;
-
-function LoadImageW;
-begin
- GetProcedureAddress(_LoadImageW, user32, 'LoadImageW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_LoadImageW]
- end;
-end;
-
-var
- _LoadImage: Pointer;
-
-function LoadImage;
-begin
- GetProcedureAddress(_LoadImage, user32, 'LoadImage' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_LoadImage]
- end;
-end;
-
-var
- _CopyImage: Pointer;
-
-function CopyImage;
-begin
- GetProcedureAddress(_CopyImage, user32, 'CopyImage');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CopyImage]
- end;
-end;
-
-var
- _DrawIconEx: Pointer;
-
-function DrawIconEx;
-begin
- GetProcedureAddress(_DrawIconEx, user32, 'DrawIconEx');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DrawIconEx]
- end;
-end;
-
-var
- _CreateIconIndirect: Pointer;
-
-function CreateIconIndirect;
-begin
- GetProcedureAddress(_CreateIconIndirect, user32, 'CreateIconIndirect');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreateIconIndirect]
- end;
-end;
-
-var
- _CopyIcon: Pointer;
-
-function CopyIcon;
-begin
- GetProcedureAddress(_CopyIcon, user32, 'CopyIcon');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CopyIcon]
- end;
-end;
-
-var
- _GetIconInfo: Pointer;
-
-function GetIconInfo;
-begin
- GetProcedureAddress(_GetIconInfo, user32, 'GetIconInfo');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetIconInfo]
- end;
-end;
-
-var
- _LoadStringA: Pointer;
-
-function LoadStringA;
-begin
- GetProcedureAddress(_LoadStringA, user32, 'LoadStringA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_LoadStringA]
- end;
-end;
-
-var
- _LoadStringW: Pointer;
-
-function LoadStringW;
-begin
- GetProcedureAddress(_LoadStringW, user32, 'LoadStringW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_LoadStringW]
- end;
-end;
-
-var
- _LoadString: Pointer;
-
-function LoadString;
-begin
- GetProcedureAddress(_LoadString, user32, 'LoadString' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_LoadString]
- end;
-end;
-
-var
- _IsDialogMessageA: Pointer;
-
-function IsDialogMessageA;
-begin
- GetProcedureAddress(_IsDialogMessageA, user32, 'IsDialogMessageA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_IsDialogMessageA]
- end;
-end;
-
-var
- _IsDialogMessageW: Pointer;
-
-function IsDialogMessageW;
-begin
- GetProcedureAddress(_IsDialogMessageW, user32, 'IsDialogMessageW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_IsDialogMessageW]
- end;
-end;
-
-var
- _IsDialogMessage: Pointer;
-
-function IsDialogMessage;
-begin
- GetProcedureAddress(_IsDialogMessage, user32, 'IsDialogMessage' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_IsDialogMessage]
- end;
-end;
-
-var
- _MapDialogRect: Pointer;
-
-function MapDialogRect;
-begin
- GetProcedureAddress(_MapDialogRect, user32, 'MapDialogRect');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MapDialogRect]
- end;
-end;
-
-var
- _DlgDirListA: Pointer;
-
-function DlgDirListA;
-begin
- GetProcedureAddress(_DlgDirListA, user32, 'DlgDirListA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DlgDirListA]
- end;
-end;
-
-var
- _DlgDirListW: Pointer;
-
-function DlgDirListW;
-begin
- GetProcedureAddress(_DlgDirListW, user32, 'DlgDirListW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DlgDirListW]
- end;
-end;
-
-var
- _DlgDirList: Pointer;
-
-function DlgDirList;
-begin
- GetProcedureAddress(_DlgDirList, user32, 'DlgDirList' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DlgDirList]
- end;
-end;
-
-var
- _DlgDirSelectExA: Pointer;
-
-function DlgDirSelectExA;
-begin
- GetProcedureAddress(_DlgDirSelectExA, user32, 'DlgDirSelectExA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DlgDirSelectExA]
- end;
-end;
-
-var
- _DlgDirSelectExW: Pointer;
-
-function DlgDirSelectExW;
-begin
- GetProcedureAddress(_DlgDirSelectExW, user32, 'DlgDirSelectExW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DlgDirSelectExW]
- end;
-end;
-
-var
- _DlgDirSelectEx: Pointer;
-
-function DlgDirSelectEx;
-begin
- GetProcedureAddress(_DlgDirSelectEx, user32, 'DlgDirSelectEx' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DlgDirSelectEx]
- end;
-end;
-
-var
- _DlgDirListComboBoxA: Pointer;
-
-function DlgDirListComboBoxA;
-begin
- GetProcedureAddress(_DlgDirListComboBoxA, user32, 'DlgDirListComboBoxA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DlgDirListComboBoxA]
- end;
-end;
-
-var
- _DlgDirListComboBoxW: Pointer;
-
-function DlgDirListComboBoxW;
-begin
- GetProcedureAddress(_DlgDirListComboBoxW, user32, 'DlgDirListComboBoxW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DlgDirListComboBoxW]
- end;
-end;
-
-var
- _DlgDirListComboBox: Pointer;
-
-function DlgDirListComboBox;
-begin
- GetProcedureAddress(_DlgDirListComboBox, user32, 'DlgDirListComboBox' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DlgDirListComboBox]
- end;
-end;
-
-var
- _DlgDirSelectComboBoxExA: Pointer;
-
-function DlgDirSelectComboBoxExA;
-begin
- GetProcedureAddress(_DlgDirSelectComboBoxExA, user32, 'DlgDirSelectComboBoxExA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DlgDirSelectComboBoxExA]
- end;
-end;
-
-var
- _DlgDirSelectComboBoxExW: Pointer;
-
-function DlgDirSelectComboBoxExW;
-begin
- GetProcedureAddress(_DlgDirSelectComboBoxExW, user32, 'DlgDirSelectComboBoxExW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DlgDirSelectComboBoxExW]
- end;
-end;
-
-var
- _DlgDirSelectComboBoxEx: Pointer;
-
-function DlgDirSelectComboBoxEx;
-begin
- GetProcedureAddress(_DlgDirSelectComboBoxEx, user32, 'DlgDirSelectComboBoxEx' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DlgDirSelectComboBoxEx]
- end;
-end;
-
-var
- _SetScrollInfo: Pointer;
-
-function SetScrollInfo;
-begin
- GetProcedureAddress(_SetScrollInfo, user32, 'SetScrollInfo');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetScrollInfo]
- end;
-end;
-
-var
- _GetScrollInfo: Pointer;
-
-function GetScrollInfo;
-begin
- GetProcedureAddress(_GetScrollInfo, user32, 'GetScrollInfo');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetScrollInfo]
- end;
-end;
-
-var
- _DefFrameProcA: Pointer;
-
-function DefFrameProcA;
-begin
- GetProcedureAddress(_DefFrameProcA, user32, 'DefFrameProcA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DefFrameProcA]
- end;
-end;
-
-var
- _DefFrameProcW: Pointer;
-
-function DefFrameProcW;
-begin
- GetProcedureAddress(_DefFrameProcW, user32, 'DefFrameProcW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DefFrameProcW]
- end;
-end;
-
-var
- _DefFrameProc: Pointer;
-
-function DefFrameProc;
-begin
- GetProcedureAddress(_DefFrameProc, user32, 'DefFrameProc' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DefFrameProc]
- end;
-end;
-
-var
- _DefMDIChildProcA: Pointer;
-
-function DefMDIChildProcA;
-begin
- GetProcedureAddress(_DefMDIChildProcA, user32, 'DefMDIChildProcA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DefMDIChildProcA]
- end;
-end;
-
-var
- _DefMDIChildProcW: Pointer;
-
-function DefMDIChildProcW;
-begin
- GetProcedureAddress(_DefMDIChildProcW, user32, 'DefMDIChildProcW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DefMDIChildProcW]
- end;
-end;
-
-var
- _DefMDIChildProc: Pointer;
-
-function DefMDIChildProc;
-begin
- GetProcedureAddress(_DefMDIChildProc, user32, 'DefMDIChildProc' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DefMDIChildProc]
- end;
-end;
-
-var
- _TranslateMDISysAccel: Pointer;
-
-function TranslateMDISysAccel;
-begin
- GetProcedureAddress(_TranslateMDISysAccel, user32, 'TranslateMDISysAccel');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_TranslateMDISysAccel]
- end;
-end;
-
-var
- _ArrangeIconicWindows: Pointer;
-
-function ArrangeIconicWindows;
-begin
- GetProcedureAddress(_ArrangeIconicWindows, user32, 'ArrangeIconicWindows');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ArrangeIconicWindows]
- end;
-end;
-
-var
- _CreateMDIWindowA: Pointer;
-
-function CreateMDIWindowA;
-begin
- GetProcedureAddress(_CreateMDIWindowA, user32, 'CreateMDIWindowA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreateMDIWindowA]
- end;
-end;
-
-var
- _CreateMDIWindowW: Pointer;
-
-function CreateMDIWindowW;
-begin
- GetProcedureAddress(_CreateMDIWindowW, user32, 'CreateMDIWindowW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreateMDIWindowW]
- end;
-end;
-
-var
- _CreateMDIWindow: Pointer;
-
-function CreateMDIWindow;
-begin
- GetProcedureAddress(_CreateMDIWindow, user32, 'CreateMDIWindow' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CreateMDIWindow]
- end;
-end;
-
-var
- _TileWindows: Pointer;
-
-function TileWindows;
-begin
- GetProcedureAddress(_TileWindows, user32, 'TileWindows');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_TileWindows]
- end;
-end;
-
-var
- _CascadeWindows: Pointer;
-
-function CascadeWindows;
-begin
- GetProcedureAddress(_CascadeWindows, user32, 'CascadeWindows');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_CascadeWindows]
- end;
-end;
-
-var
- _WinHelpA: Pointer;
-
-function WinHelpA;
-begin
- GetProcedureAddress(_WinHelpA, user32, 'WinHelpA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WinHelpA]
- end;
-end;
-
-var
- _WinHelpW: Pointer;
-
-function WinHelpW;
-begin
- GetProcedureAddress(_WinHelpW, user32, 'WinHelpW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WinHelpW]
- end;
-end;
-
-var
- _WinHelp: Pointer;
-
-function WinHelp;
-begin
- GetProcedureAddress(_WinHelp, user32, 'WinHelp' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WinHelp]
- end;
-end;
-
-var
- _GetGuiResources: Pointer;
-
-function GetGuiResources;
-begin
- GetProcedureAddress(_GetGuiResources, user32, 'GetGuiResources');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetGuiResources]
- end;
-end;
-
-var
- _ChangeDisplaySettingsA: Pointer;
-
-function ChangeDisplaySettingsA;
-begin
- GetProcedureAddress(_ChangeDisplaySettingsA, user32, 'ChangeDisplaySettingsA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ChangeDisplaySettingsA]
- end;
-end;
-
-var
- _ChangeDisplaySettingsW: Pointer;
-
-function ChangeDisplaySettingsW;
-begin
- GetProcedureAddress(_ChangeDisplaySettingsW, user32, 'ChangeDisplaySettingsW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ChangeDisplaySettingsW]
- end;
-end;
-
-var
- _ChangeDisplaySettings: Pointer;
-
-function ChangeDisplaySettings;
-begin
- GetProcedureAddress(_ChangeDisplaySettings, user32, 'ChangeDisplaySettings' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ChangeDisplaySettings]
- end;
-end;
-
-var
- _ChangeDisplaySettingsExA: Pointer;
-
-function ChangeDisplaySettingsExA;
-begin
- GetProcedureAddress(_ChangeDisplaySettingsExA, user32, 'ChangeDisplaySettingsExA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ChangeDisplaySettingsExA]
- end;
-end;
-
-var
- _ChangeDisplaySettingsExW: Pointer;
-
-function ChangeDisplaySettingsExW;
-begin
- GetProcedureAddress(_ChangeDisplaySettingsExW, user32, 'ChangeDisplaySettingsExW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ChangeDisplaySettingsExW]
- end;
-end;
-
-var
- _ChangeDisplaySettingsEx: Pointer;
-
-function ChangeDisplaySettingsEx;
-begin
- GetProcedureAddress(_ChangeDisplaySettingsEx, user32, 'ChangeDisplaySettingsEx' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_ChangeDisplaySettingsEx]
- end;
-end;
-
-var
- _EnumDisplaySettingsA: Pointer;
-
-function EnumDisplaySettingsA;
-begin
- GetProcedureAddress(_EnumDisplaySettingsA, user32, 'EnumDisplaySettingsA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_EnumDisplaySettingsA]
- end;
-end;
-
-var
- _EnumDisplaySettingsW: Pointer;
-
-function EnumDisplaySettingsW;
-begin
- GetProcedureAddress(_EnumDisplaySettingsW, user32, 'EnumDisplaySettingsW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_EnumDisplaySettingsW]
- end;
-end;
-
-var
- _EnumDisplaySettings: Pointer;
-
-function EnumDisplaySettings;
-begin
- GetProcedureAddress(_EnumDisplaySettings, user32, 'EnumDisplaySettings' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_EnumDisplaySettings]
- end;
-end;
-
-var
- _EnumDisplaySettingsExA: Pointer;
-
-function EnumDisplaySettingsExA;
-begin
- GetProcedureAddress(_EnumDisplaySettingsExA, user32, 'EnumDisplaySettingsExA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_EnumDisplaySettingsExA]
- end;
-end;
-
-var
- _EnumDisplaySettingsExW: Pointer;
-
-function EnumDisplaySettingsExW;
-begin
- GetProcedureAddress(_EnumDisplaySettingsExW, user32, 'EnumDisplaySettingsExW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_EnumDisplaySettingsExW]
- end;
-end;
-
-var
- _EnumDisplaySettingsEx: Pointer;
-
-function EnumDisplaySettingsEx;
-begin
- GetProcedureAddress(_EnumDisplaySettingsEx, user32, 'EnumDisplaySettingsEx' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_EnumDisplaySettingsEx]
- end;
-end;
-
-var
- _EnumDisplayDevicesA: Pointer;
-
-function EnumDisplayDevicesA;
-begin
- GetProcedureAddress(_EnumDisplayDevicesA, user32, 'EnumDisplayDevicesA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_EnumDisplayDevicesA]
- end;
-end;
-
-var
- _EnumDisplayDevicesW: Pointer;
-
-function EnumDisplayDevicesW;
-begin
- GetProcedureAddress(_EnumDisplayDevicesW, user32, 'EnumDisplayDevicesW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_EnumDisplayDevicesW]
- end;
-end;
-
-var
- _EnumDisplayDevices: Pointer;
-
-function EnumDisplayDevices;
-begin
- GetProcedureAddress(_EnumDisplayDevices, user32, 'EnumDisplayDevices' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_EnumDisplayDevices]
- end;
-end;
-
-var
- _SystemParametersInfoA: Pointer;
-
-function SystemParametersInfoA;
-begin
- GetProcedureAddress(_SystemParametersInfoA, user32, 'SystemParametersInfoA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SystemParametersInfoA]
- end;
-end;
-
-var
- _SystemParametersInfoW: Pointer;
-
-function SystemParametersInfoW;
-begin
- GetProcedureAddress(_SystemParametersInfoW, user32, 'SystemParametersInfoW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SystemParametersInfoW]
- end;
-end;
-
-var
- _SystemParametersInfo: Pointer;
-
-function SystemParametersInfo;
-begin
- GetProcedureAddress(_SystemParametersInfo, user32, 'SystemParametersInfo' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SystemParametersInfo]
- end;
-end;
-
-var
- _SetDebugErrorLevel: Pointer;
-
-procedure SetDebugErrorLevel;
-begin
- GetProcedureAddress(_SetDebugErrorLevel, user32, 'SetDebugErrorLevel');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetDebugErrorLevel]
- end;
-end;
-
-var
- _SetLastErrorEx: Pointer;
-
-procedure SetLastErrorEx;
-begin
- GetProcedureAddress(_SetLastErrorEx, user32, 'SetLastErrorEx');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetLastErrorEx]
- end;
-end;
-
-var
- _InternalGetWindowText: Pointer;
-
-function InternalGetWindowText;
-begin
- GetProcedureAddress(_InternalGetWindowText, user32, 'InternalGetWindowText');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_InternalGetWindowText]
- end;
-end;
-
-var
- _EndTask: Pointer;
-
-function EndTask;
-begin
- GetProcedureAddress(_EndTask, user32, 'EndTask');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_EndTask]
- end;
-end;
-
-var
- _MonitorFromPoint: Pointer;
-
-function MonitorFromPoint;
-begin
- GetProcedureAddress(_MonitorFromPoint, user32, 'MonitorFromPoint');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MonitorFromPoint]
- end;
-end;
-
-var
- _MonitorFromRect: Pointer;
-
-function MonitorFromRect;
-begin
- GetProcedureAddress(_MonitorFromRect, user32, 'MonitorFromRect');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MonitorFromRect]
- end;
-end;
-
-var
- _MonitorFromWindow: Pointer;
-
-function MonitorFromWindow;
-begin
- GetProcedureAddress(_MonitorFromWindow, user32, 'MonitorFromWindow');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_MonitorFromWindow]
- end;
-end;
-
-var
- _GetMonitorInfoA: Pointer;
-
-function GetMonitorInfoA;
-begin
- GetProcedureAddress(_GetMonitorInfoA, user32, 'GetMonitorInfoA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetMonitorInfoA]
- end;
-end;
-
-var
- _GetMonitorInfoW: Pointer;
-
-function GetMonitorInfoW;
-begin
- GetProcedureAddress(_GetMonitorInfoW, user32, 'GetMonitorInfoW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetMonitorInfoW]
- end;
-end;
-
-var
- _GetMonitorInfo: Pointer;
-
-function GetMonitorInfo;
-begin
- GetProcedureAddress(_GetMonitorInfo, user32, 'GetMonitorInfo' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetMonitorInfo]
- end;
-end;
-
-var
- _EnumDisplayMonitors: Pointer;
-
-function EnumDisplayMonitors;
-begin
- GetProcedureAddress(_EnumDisplayMonitors, user32, 'EnumDisplayMonitors');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_EnumDisplayMonitors]
- end;
-end;
-
-var
- _NotifyWinEvent: Pointer;
-
-procedure NotifyWinEvent;
-begin
- GetProcedureAddress(_NotifyWinEvent, user32, 'NotifyWinEvent');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_NotifyWinEvent]
- end;
-end;
-
-var
- _SetWinEventHook: Pointer;
-
-function SetWinEventHook;
-begin
- GetProcedureAddress(_SetWinEventHook, user32, 'SetWinEventHook');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_SetWinEventHook]
- end;
-end;
-
-var
- _IsWinEventHookInstalled: Pointer;
-
-function IsWinEventHookInstalled;
-begin
- GetProcedureAddress(_IsWinEventHookInstalled, user32, 'IsWinEventHookInstalled');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_IsWinEventHookInstalled]
- end;
-end;
-
-var
- _UnhookWinEvent: Pointer;
-
-function UnhookWinEvent;
-begin
- GetProcedureAddress(_UnhookWinEvent, user32, 'UnhookWinEvent');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_UnhookWinEvent]
- end;
-end;
-
-var
- _GetGUIThreadInfo: Pointer;
-
-function GetGUIThreadInfo;
-begin
- GetProcedureAddress(_GetGUIThreadInfo, user32, 'GetGUIThreadInfo');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetGUIThreadInfo]
- end;
-end;
-
-var
- _GetWindowModuleFileNameA: Pointer;
-
-function GetWindowModuleFileNameA;
-begin
- GetProcedureAddress(_GetWindowModuleFileNameA, user32, 'GetWindowModuleFileNameA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetWindowModuleFileNameA]
- end;
-end;
-
-var
- _GetWindowModuleFileNameW: Pointer;
-
-function GetWindowModuleFileNameW;
-begin
- GetProcedureAddress(_GetWindowModuleFileNameW, user32, 'GetWindowModuleFileNameW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetWindowModuleFileNameW]
- end;
-end;
-
-var
- _GetWindowModuleFileName: Pointer;
-
-function GetWindowModuleFileName;
-begin
- GetProcedureAddress(_GetWindowModuleFileName, user32, 'GetWindowModuleFileName' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetWindowModuleFileName]
- end;
-end;
-
-var
- _GetCursorInfo: Pointer;
-
-function GetCursorInfo;
-begin
- GetProcedureAddress(_GetCursorInfo, user32, 'GetCursorInfo');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetCursorInfo]
- end;
-end;
-
-var
- _GetWindowInfo: Pointer;
-
-function GetWindowInfo;
-begin
- GetProcedureAddress(_GetWindowInfo, user32, 'GetWindowInfo');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetWindowInfo]
- end;
-end;
-
-var
- _GetTitleBarInfo: Pointer;
-
-function GetTitleBarInfo;
-begin
- GetProcedureAddress(_GetTitleBarInfo, user32, 'GetTitleBarInfo');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetTitleBarInfo]
- end;
-end;
-
-var
- _GetMenuBarInfo: Pointer;
-
-function GetMenuBarInfo;
-begin
- GetProcedureAddress(_GetMenuBarInfo, user32, 'GetMenuBarInfo');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetMenuBarInfo]
- end;
-end;
-
-var
- _GetScrollBarInfo: Pointer;
-
-function GetScrollBarInfo;
-begin
- GetProcedureAddress(_GetScrollBarInfo, user32, 'GetScrollBarInfo');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetScrollBarInfo]
- end;
-end;
-
-var
- _GetComboBoxInfo: Pointer;
-
-function GetComboBoxInfo;
-begin
- GetProcedureAddress(_GetComboBoxInfo, user32, 'GetComboBoxInfo');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetComboBoxInfo]
- end;
-end;
-
-var
- _GetAncestor: Pointer;
-
-function GetAncestor;
-begin
- GetProcedureAddress(_GetAncestor, user32, 'GetAncestor');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetAncestor]
- end;
-end;
-
-var
- _RealChildWindowFromPoint: Pointer;
-
-function RealChildWindowFromPoint;
-begin
- GetProcedureAddress(_RealChildWindowFromPoint, user32, 'RealChildWindowFromPoint');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RealChildWindowFromPoint]
- end;
-end;
-
-var
- _RealGetWindowClassA: Pointer;
-
-function RealGetWindowClassA;
-begin
- GetProcedureAddress(_RealGetWindowClassA, user32, 'RealGetWindowClassA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RealGetWindowClassA]
- end;
-end;
-
-var
- _RealGetWindowClassW: Pointer;
-
-function RealGetWindowClassW;
-begin
- GetProcedureAddress(_RealGetWindowClassW, user32, 'RealGetWindowClassW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RealGetWindowClassW]
- end;
-end;
-
-var
- _RealGetWindowClass: Pointer;
-
-function RealGetWindowClass;
-begin
- GetProcedureAddress(_RealGetWindowClass, user32, 'RealGetWindowClass' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RealGetWindowClass]
- end;
-end;
-
-var
- _GetAltTabInfoA: Pointer;
-
-function GetAltTabInfoA;
-begin
- GetProcedureAddress(_GetAltTabInfoA, user32, 'GetAltTabInfoA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetAltTabInfoA]
- end;
-end;
-
-var
- _GetAltTabInfoW: Pointer;
-
-function GetAltTabInfoW;
-begin
- GetProcedureAddress(_GetAltTabInfoW, user32, 'GetAltTabInfoW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetAltTabInfoW]
- end;
-end;
-
-var
- _GetAltTabInfo: Pointer;
-
-function GetAltTabInfo;
-begin
- GetProcedureAddress(_GetAltTabInfo, user32, 'GetAltTabInfo' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetAltTabInfo]
- end;
-end;
-
-var
- _GetListBoxInfo: Pointer;
-
-function GetListBoxInfo;
-begin
- GetProcedureAddress(_GetListBoxInfo, user32, 'GetListBoxInfo');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetListBoxInfo]
- end;
-end;
-
-var
- _LockWorkStation: Pointer;
-
-function LockWorkStation;
-begin
- GetProcedureAddress(_LockWorkStation, user32, 'LockWorkStation');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_LockWorkStation]
- end;
-end;
-
-var
- _UserHandleGrantAccess: Pointer;
-
-function UserHandleGrantAccess;
-begin
- GetProcedureAddress(_UserHandleGrantAccess, user32, 'UserHandleGrantAccess');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_UserHandleGrantAccess]
- end;
-end;
-
-var
- _GetRawInputData: Pointer;
-
-function GetRawInputData;
-begin
- GetProcedureAddress(_GetRawInputData, user32, 'GetRawInputData');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetRawInputData]
- end;
-end;
-
-var
- _GetRawInputDeviceInfoA: Pointer;
-
-function GetRawInputDeviceInfoA;
-begin
- GetProcedureAddress(_GetRawInputDeviceInfoA, user32, 'GetRawInputDeviceInfoA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetRawInputDeviceInfoA]
- end;
-end;
-
-var
- _GetRawInputDeviceInfoW: Pointer;
-
-function GetRawInputDeviceInfoW;
-begin
- GetProcedureAddress(_GetRawInputDeviceInfoW, user32, 'GetRawInputDeviceInfoW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetRawInputDeviceInfoW]
- end;
-end;
-
-var
- _GetRawInputDeviceInfo: Pointer;
-
-function GetRawInputDeviceInfo;
-begin
- GetProcedureAddress(_GetRawInputDeviceInfo, user32, 'GetRawInputDeviceInfo' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetRawInputDeviceInfo]
- end;
-end;
-
-var
- _GetRawInputBuffer: Pointer;
-
-function GetRawInputBuffer;
-begin
- GetProcedureAddress(_GetRawInputBuffer, user32, 'GetRawInputBuffer');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetRawInputBuffer]
- end;
-end;
-
-var
- _RegisterRawInputDevices: Pointer;
-
-function RegisterRawInputDevices;
-begin
- GetProcedureAddress(_RegisterRawInputDevices, user32, 'RegisterRawInputDevices');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_RegisterRawInputDevices]
- end;
-end;
-
-var
- _GetRegisteredRawInputDevices: Pointer;
-
-function GetRegisteredRawInputDevices;
-begin
- GetProcedureAddress(_GetRegisteredRawInputDevices, user32, 'GetRegisteredRawInputDevices');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetRegisteredRawInputDevices]
- end;
-end;
-
-var
- _GetRawInputDeviceList: Pointer;
-
-function GetRawInputDeviceList;
-begin
- GetProcedureAddress(_GetRawInputDeviceList, user32, 'GetRawInputDeviceList');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetRawInputDeviceList]
- end;
-end;
-
-var
- _DefRawInputProc: Pointer;
-
-function DefRawInputProc;
-begin
- GetProcedureAddress(_DefRawInputProc, user32, 'DefRawInputProc');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_DefRawInputProc]
- end;
-end;
-
-{$ELSE}
-
-function IsHungAppWindow; external user32 name 'IsHungAppWindow';
-procedure DisableProcessWindowsGhosting; external user32 name 'DisableProcessWindowsGhosting';
-function wvsprintfA; external user32 name 'wvsprintfA';
-function wvsprintfW; external user32 name 'wvsprintfW';
-function wvsprintf; external user32 name 'wvsprintf' + AWSuffix;
-function wsprintfA; external user32 name 'wsprintfA';
-function wsprintfW; external user32 name 'wsprintfW';
-function wsprintf; external user32 name 'wsprintf' + AWSuffix;
-function LoadKeyboardLayoutA; external user32 name 'LoadKeyboardLayoutA';
-function LoadKeyboardLayoutW; external user32 name 'LoadKeyboardLayoutW';
-function LoadKeyboardLayout; external user32 name 'LoadKeyboardLayout' + AWSuffix;
-function ActivateKeyboardLayout; external user32 name 'ActivateKeyboardLayout';
-function ToUnicodeEx; external user32 name 'ToUnicodeEx';
-function UnloadKeyboardLayout; external user32 name 'UnloadKeyboardLayout';
-function GetKeyboardLayoutNameA; external user32 name 'GetKeyboardLayoutNameA';
-function GetKeyboardLayoutNameW; external user32 name 'GetKeyboardLayoutNameW';
-function GetKeyboardLayoutName; external user32 name 'GetKeyboardLayoutName' + AWSuffix;
-function GetKeyboardLayoutList; external user32 name 'GetKeyboardLayoutList';
-function GetKeyboardLayout; external user32 name 'GetKeyboardLayout';
-function GetMouseMovePointsEx; external user32 name 'GetMouseMovePointsEx';
-function CreateDesktopA; external user32 name 'CreateDesktopA';
-function CreateDesktopW; external user32 name 'CreateDesktopW';
-function CreateDesktop; external user32 name 'CreateDesktop' + AWSuffix;
-function OpenDesktopA; external user32 name 'OpenDesktopA';
-function OpenDesktopW; external user32 name 'OpenDesktopW';
-function OpenDesktop; external user32 name 'OpenDesktop' + AWSuffix;
-function OpenInputDesktop; external user32 name 'OpenInputDesktop';
-function EnumDesktopsA; external user32 name 'EnumDesktopsA';
-function EnumDesktopsW; external user32 name 'EnumDesktopsW';
-function EnumDesktops; external user32 name 'EnumDesktops' + AWSuffix;
-function EnumDesktopWindows; external user32 name 'EnumDesktopWindows';
-function SwitchDesktop; external user32 name 'SwitchDesktop';
-function SetThreadDesktop; external user32 name 'SetThreadDesktop';
-function CloseDesktop; external user32 name 'CloseDesktop';
-function GetThreadDesktop; external user32 name 'GetThreadDesktop';
-function CreateWindowStationA; external user32 name 'CreateWindowStationA';
-function CreateWindowStationW; external user32 name 'CreateWindowStationW';
-function CreateWindowStation; external user32 name 'CreateWindowStation' + AWSuffix;
-function OpenWindowStationA; external user32 name 'OpenWindowStationA';
-function OpenWindowStationW; external user32 name 'OpenWindowStationW';
-function OpenWindowStation; external user32 name 'OpenWindowStation' + AWSuffix;
-function EnumWindowStationsA; external user32 name 'EnumWindowStationsA';
-function EnumWindowStationsW; external user32 name 'EnumWindowStationsW';
-function EnumWindowStations; external user32 name 'EnumWindowStations' + AWSuffix;
-function CloseWindowStation; external user32 name 'CloseWindowStation';
-function SetProcessWindowStation; external user32 name 'SetProcessWindowStation';
-function GetProcessWindowStation; external user32 name 'GetProcessWindowStation';
-function SetUserObjectSecurity; external user32 name 'SetUserObjectSecurity';
-function GetUserObjectSecurity; external user32 name 'GetUserObjectSecurity';
-function GetUserObjectInformationA; external user32 name 'GetUserObjectInformationA';
-function GetUserObjectInformationW; external user32 name 'GetUserObjectInformationW';
-function GetUserObjectInformation; external user32 name 'GetUserObjectInformation' + AWSuffix;
-function SetUserObjectInformationA; external user32 name 'SetUserObjectInformationA';
-function SetUserObjectInformationW; external user32 name 'SetUserObjectInformationW';
-function SetUserObjectInformation; external user32 name 'SetUserObjectInformation' + AWSuffix;
-function RegisterWindowMessageA; external user32 name 'RegisterWindowMessageA';
-function RegisterWindowMessageW; external user32 name 'RegisterWindowMessageW';
-function RegisterWindowMessage; external user32 name 'RegisterWindowMessage' + AWSuffix;
-function TrackMouseEvent; external user32 name 'TrackMouseEvent';
-function DrawEdge; external user32 name 'DrawEdge';
-function DrawFrameControl; external user32 name 'DrawFrameControl';
-function DrawCaption; external user32 name 'DrawCaption';
-function DrawAnimatedRects; external user32 name 'DrawAnimatedRects';
-function GetMessageA; external user32 name 'GetMessageA';
-function GetMessageW; external user32 name 'GetMessageW';
-function GetMessage; external user32 name 'GetMessage' + AWSuffix;
-function TranslateMessage; external user32 name 'TranslateMessage';
-function DispatchMessageA; external user32 name 'DispatchMessageA';
-function DispatchMessageW; external user32 name 'DispatchMessageW';
-function DispatchMessage; external user32 name 'DispatchMessage' + AWSuffix;
-function SetMessageQueue; external user32 name 'SetMessageQueue';
-function PeekMessageA; external user32 name 'PeekMessageA';
-function PeekMessageW; external user32 name 'PeekMessageW';
-function PeekMessage; external user32 name 'PeekMessage' + AWSuffix;
-function RegisterHotKey; external user32 name 'RegisterHotKey';
-function UnregisterHotKey; external user32 name 'UnregisterHotKey';
-function ExitWindowsEx; external user32 name 'ExitWindowsEx';
-function SwapMouseButton; external user32 name 'SwapMouseButton';
-function GetMessagePos; external user32 name 'GetMessagePos';
-function GetMessageTime; external user32 name 'GetMessageTime';
-function GetMessageExtraInfo; external user32 name 'GetMessageExtraInfo';
-function SetMessageExtraInfo; external user32 name 'SetMessageExtraInfo';
-function SendMessageA; external user32 name 'SendMessageA';
-function SendMessageW; external user32 name 'SendMessageW';
-function SendMessage; external user32 name 'SendMessage' + AWSuffix;
-function SendMessageTimeoutA; external user32 name 'SendMessageTimeoutA';
-function SendMessageTimeoutW; external user32 name 'SendMessageTimeoutW';
-function SendMessageTimeout; external user32 name 'SendMessageTimeout' + AWSuffix;
-function SendNotifyMessageA; external user32 name 'SendNotifyMessageA';
-function SendNotifyMessageW; external user32 name 'SendNotifyMessageW';
-function SendNotifyMessage; external user32 name 'SendNotifyMessage' + AWSuffix;
-function SendMessageCallbackA; external user32 name 'SendMessageCallbackA';
-function SendMessageCallbackW; external user32 name 'SendMessageCallbackW';
-function SendMessageCallback; external user32 name 'SendMessageCallback' + AWSuffix;
-function BroadcastSystemMessageExA; external user32 name 'BroadcastSystemMessageExA';
-function BroadcastSystemMessageExW; external user32 name 'BroadcastSystemMessageExW';
-function BroadcastSystemMessageEx; external user32 name 'BroadcastSystemMessageEx' + AWSuffix;
-function BroadcastSystemMessageA; external user32 name 'BroadcastSystemMessageA';
-function BroadcastSystemMessageW; external user32 name 'BroadcastSystemMessageW';
-function BroadcastSystemMessage; external user32 name 'BroadcastSystemMessage' + AWSuffix;
-function RegisterDeviceNotificationA; external user32 name 'RegisterDeviceNotificationA';
-function RegisterDeviceNotificationW; external user32 name 'RegisterDeviceNotificationW';
-function RegisterDeviceNotification; external user32 name 'RegisterDeviceNotification' + AWSuffix;
-function UnregisterDeviceNotification; external user32 name 'UnregisterDeviceNotification';
-function PostMessageA; external user32 name 'PostMessageA';
-function PostMessageW; external user32 name 'PostMessageW';
-function PostMessage; external user32 name 'PostMessage' + AWSuffix;
-function PostThreadMessageA; external user32 name 'PostThreadMessageA';
-function PostThreadMessageW; external user32 name 'PostThreadMessageW';
-function PostThreadMessage; external user32 name 'PostThreadMessage' + AWSuffix;
-function AttachThreadInput; external user32 name 'AttachThreadInput';
-function ReplyMessage; external user32 name 'ReplyMessage';
-function WaitMessage; external user32 name 'WaitMessage';
-function WaitForInputIdle; external user32 name 'WaitForInputIdle';
-function DefWindowProcA; external user32 name 'DefWindowProcA';
-function DefWindowProcW; external user32 name 'DefWindowProcW';
-function DefWindowProc; external user32 name 'DefWindowProc' + AWSuffix;
-procedure PostQuitMessage; external user32 name 'PostQuitMessage';
-function CallWindowProcA; external user32 name 'CallWindowProcA';
-function CallWindowProcW; external user32 name 'CallWindowProcW';
-function CallWindowProc; external user32 name 'CallWindowProc' + AWSuffix;
-function InSendMessage; external user32 name 'InSendMessage';
-function InSendMessageEx; external user32 name 'InSendMessageEx';
-function GetDoubleClickTime; external user32 name 'GetDoubleClickTime';
-function SetDoubleClickTime; external user32 name 'SetDoubleClickTime';
-function RegisterClassA; external user32 name 'RegisterClassA';
-function RegisterClassW; external user32 name 'RegisterClassW';
-function RegisterClass; external user32 name 'RegisterClass' + AWSuffix;
-function UnregisterClassA; external user32 name 'UnregisterClassA';
-function UnregisterClassW; external user32 name 'UnregisterClassW';
-function UnregisterClass; external user32 name 'UnregisterClass' + AWSuffix;
-function GetClassInfoA; external user32 name 'GetClassInfoA';
-function GetClassInfoW; external user32 name 'GetClassInfoW';
-function GetClassInfo; external user32 name 'GetClassInfo' + AWSuffix;
-function RegisterClassExA; external user32 name 'RegisterClassExA';
-function RegisterClassExW; external user32 name 'RegisterClassExW';
-function RegisterClassEx; external user32 name 'RegisterClassEx' + AWSuffix;
-function GetClassInfoExA; external user32 name 'GetClassInfoExA';
-function GetClassInfoExW; external user32 name 'GetClassInfoExW';
-function GetClassInfoEx; external user32 name 'GetClassInfoEx' + AWSuffix;
-function CreateWindowExA; external user32 name 'CreateWindowExA';
-function CreateWindowExW; external user32 name 'CreateWindowExW';
-function CreateWindowEx; external user32 name 'CreateWindowEx' + AWSuffix;
-function IsWindow; external user32 name 'IsWindow';
-function IsMenu; external user32 name 'IsMenu';
-function IsChild; external user32 name 'IsChild';
-function DestroyWindow; external user32 name 'DestroyWindow';
-function ShowWindow; external user32 name 'ShowWindow';
-function AnimateWindow; external user32 name 'AnimateWindow';
-function UpdateLayeredWindow; external user32 name 'UpdateLayeredWindow';
-function GetLayeredWindowAttributes; external user32 name 'GetLayeredWindowAttributes';
-function PrintWindow; external user32 name 'PrintWindow';
-function SetLayeredWindowAttributes; external user32 name 'SetLayeredWindowAttributes';
-function ShowWindowAsync; external user32 name 'ShowWindowAsync';
-function FlashWindow; external user32 name 'FlashWindow';
-function FlashWindowEx; external user32 name 'FlashWindowEx';
-function ShowOwnedPopups; external user32 name 'ShowOwnedPopups';
-function OpenIcon; external user32 name 'OpenIcon';
-function CloseWindow; external user32 name 'CloseWindow';
-function MoveWindow; external user32 name 'MoveWindow';
-function SetWindowPos; external user32 name 'SetWindowPos';
-function GetWindowPlacement; external user32 name 'GetWindowPlacement';
-function SetWindowPlacement; external user32 name 'SetWindowPlacement';
-function BeginDeferWindowPos; external user32 name 'BeginDeferWindowPos';
-function DeferWindowPos; external user32 name 'DeferWindowPos';
-function EndDeferWindowPos; external user32 name 'EndDeferWindowPos';
-function IsWindowVisible; external user32 name 'IsWindowVisible';
-function IsIconic; external user32 name 'IsIconic';
-function AnyPopup; external user32 name 'AnyPopup';
-function BringWindowToTop; external user32 name 'BringWindowToTop';
-function IsZoomed; external user32 name 'IsZoomed';
-function CreateDialogParamA; external user32 name 'CreateDialogParamA';
-function CreateDialogParamW; external user32 name 'CreateDialogParamW';
-function CreateDialogParam; external user32 name 'CreateDialogParam' + AWSuffix;
-function CreateDialogIndirectParamA; external user32 name 'CreateDialogIndirectParamA';
-function CreateDialogIndirectParamW; external user32 name 'CreateDialogIndirectParamW';
-function CreateDialogIndirectParam; external user32 name 'CreateDialogIndirectParam' + AWSuffix;
-function DialogBoxParamA; external user32 name 'DialogBoxParamA';
-function DialogBoxParamW; external user32 name 'DialogBoxParamW';
-function DialogBoxParam; external user32 name 'DialogBoxParam' + AWSuffix;
-function DialogBoxIndirectParamA; external user32 name 'DialogBoxIndirectParamA';
-function DialogBoxIndirectParamW; external user32 name 'DialogBoxIndirectParamW';
-function DialogBoxIndirectParam; external user32 name 'DialogBoxIndirectParam' + AWSuffix;
-function EndDialog; external user32 name 'EndDialog';
-function GetDlgItem; external user32 name 'GetDlgItem';
-function SetDlgItemInt; external user32 name 'SetDlgItemInt';
-function GetDlgItemInt; external user32 name 'GetDlgItemInt';
-function SetDlgItemTextA; external user32 name 'SetDlgItemTextA';
-function SetDlgItemTextW; external user32 name 'SetDlgItemTextW';
-function SetDlgItemText; external user32 name 'SetDlgItemText' + AWSuffix;
-function GetDlgItemTextA; external user32 name 'GetDlgItemTextA';
-function GetDlgItemTextW; external user32 name 'GetDlgItemTextW';
-function GetDlgItemText; external user32 name 'GetDlgItemText' + AWSuffix;
-function CheckDlgButton; external user32 name 'CheckDlgButton';
-function CheckRadioButton; external user32 name 'CheckRadioButton';
-function IsDlgButtonChecked; external user32 name 'IsDlgButtonChecked';
-function SendDlgItemMessageA; external user32 name 'SendDlgItemMessageA';
-function SendDlgItemMessageW; external user32 name 'SendDlgItemMessageW';
-function SendDlgItemMessage; external user32 name 'SendDlgItemMessage' + AWSuffix;
-function GetNextDlgGroupItem; external user32 name 'GetNextDlgGroupItem';
-function GetNextDlgTabItem; external user32 name 'GetNextDlgTabItem';
-function GetDlgCtrlID; external user32 name 'GetDlgCtrlID';
-function GetDialogBaseUnits; external user32 name 'GetDialogBaseUnits';
-function DefDlgProcA; external user32 name 'DefDlgProcA';
-function DefDlgProcW; external user32 name 'DefDlgProcW';
-function DefDlgProc; external user32 name 'DefDlgProc' + AWSuffix;
-function CallMsgFilterA; external user32 name 'CallMsgFilterA';
-function CallMsgFilterW; external user32 name 'CallMsgFilterW';
-function CallMsgFilter; external user32 name 'CallMsgFilter' + AWSuffix;
-function OpenClipboard; external user32 name 'OpenClipboard';
-function CloseClipboard; external user32 name 'CloseClipboard';
-function GetClipboardSequenceNumber; external user32 name 'GetClipboardSequenceNumber';
-function GetClipboardOwner; external user32 name 'GetClipboardOwner';
-function SetClipboardViewer; external user32 name 'SetClipboardViewer';
-function GetClipboardViewer; external user32 name 'GetClipboardViewer';
-function ChangeClipboardChain; external user32 name 'ChangeClipboardChain';
-function SetClipboardData; external user32 name 'SetClipboardData';
-function GetClipboardData; external user32 name 'GetClipboardData';
-function RegisterClipboardFormatA; external user32 name 'RegisterClipboardFormatA';
-function RegisterClipboardFormatW; external user32 name 'RegisterClipboardFormatW';
-function RegisterClipboardFormat; external user32 name 'RegisterClipboardFormat' + AWSuffix;
-function CountClipboardFormats; external user32 name 'CountClipboardFormats';
-function EnumClipboardFormats; external user32 name 'EnumClipboardFormats';
-function GetClipboardFormatNameA; external user32 name 'GetClipboardFormatNameA';
-function GetClipboardFormatNameW; external user32 name 'GetClipboardFormatNameW';
-function GetClipboardFormatName; external user32 name 'GetClipboardFormatName' + AWSuffix;
-function EmptyClipboard; external user32 name 'EmptyClipboard';
-function IsClipboardFormatAvailable; external user32 name 'IsClipboardFormatAvailable';
-function GetPriorityClipboardFormat; external user32 name 'GetPriorityClipboardFormat';
-function GetOpenClipboardWindow; external user32 name 'GetOpenClipboardWindow';
-function CharToOemA; external user32 name 'CharToOemA';
-function CharToOemW; external user32 name 'CharToOemW';
-function CharToOem; external user32 name 'CharToOem' + AWSuffix;
-function OemToCharA; external user32 name 'OemToCharA';
-function OemToCharW; external user32 name 'OemToCharW';
-function OemToChar; external user32 name 'OemToChar' + AWSuffix;
-function CharToOemBuffA; external user32 name 'CharToOemBuffA';
-function CharToOemBuffW; external user32 name 'CharToOemBuffW';
-function CharToOemBuff; external user32 name 'CharToOemBuff' + AWSuffix;
-function OemToCharBuffA; external user32 name 'OemToCharBuffA';
-function OemToCharBuffW; external user32 name 'OemToCharBuffW';
-function OemToCharBuff; external user32 name 'OemToCharBuff' + AWSuffix;
-function CharUpperA; external user32 name 'CharUpperA';
-function CharUpperW; external user32 name 'CharUpperW';
-function CharUpper; external user32 name 'CharUpper' + AWSuffix;
-function CharUpperBuffA; external user32 name 'CharUpperBuffA';
-function CharUpperBuffW; external user32 name 'CharUpperBuffW';
-function CharUpperBuff; external user32 name 'CharUpperBuff' + AWSuffix;
-function CharLowerA; external user32 name 'CharLowerA';
-function CharLowerW; external user32 name 'CharLowerW';
-function CharLower; external user32 name 'CharLower' + AWSuffix;
-function CharLowerBuffA; external user32 name 'CharLowerBuffA';
-function CharLowerBuffW; external user32 name 'CharLowerBuffW';
-function CharLowerBuff; external user32 name 'CharLowerBuff' + AWSuffix;
-function CharNextA; external user32 name 'CharNextA';
-function CharNextW; external user32 name 'CharNextW';
-function CharNext; external user32 name 'CharNext' + AWSuffix;
-function CharPrevA; external user32 name 'CharPrevA';
-function CharPrevW; external user32 name 'CharPrevW';
-function CharPrev; external user32 name 'CharPrev' + AWSuffix;
-function CharNextExA; external user32 name 'CharNextExA';
-function CharPrevExA; external user32 name 'CharPrevExA';
-function IsCharAlphaA; external user32 name 'IsCharAlphaA';
-function IsCharAlphaW; external user32 name 'IsCharAlphaW';
-function IsCharAlpha; external user32 name 'IsCharAlpha' + AWSuffix;
-function IsCharAlphaNumericA; external user32 name 'IsCharAlphaNumericA';
-function IsCharAlphaNumericW; external user32 name 'IsCharAlphaNumericW';
-function IsCharAlphaNumeric; external user32 name 'IsCharAlphaNumeric' + AWSuffix;
-function IsCharUpperA; external user32 name 'IsCharUpperA';
-function IsCharUpperW; external user32 name 'IsCharUpperW';
-function IsCharUpper; external user32 name 'IsCharUpper' + AWSuffix;
-function IsCharLowerA; external user32 name 'IsCharLowerA';
-function IsCharLowerW; external user32 name 'IsCharLowerW';
-function IsCharLower; external user32 name 'IsCharLower' + AWSuffix;
-function SetFocus; external user32 name 'SetFocus';
-function GetActiveWindow; external user32 name 'GetActiveWindow';
-function GetFocus; external user32 name 'GetFocus';
-function GetKBCodePage; external user32 name 'GetKBCodePage';
-function GetKeyState; external user32 name 'GetKeyState';
-function GetAsyncKeyState; external user32 name 'GetAsyncKeyState';
-function GetKeyboardState; external user32 name 'GetKeyboardState';
-function SetKeyboardState; external user32 name 'SetKeyboardState';
-function GetKeyNameTextA; external user32 name 'GetKeyNameTextA';
-function GetKeyNameTextW; external user32 name 'GetKeyNameTextW';
-function GetKeyNameText; external user32 name 'GetKeyNameText' + AWSuffix;
-function GetKeyboardType; external user32 name 'GetKeyboardType';
-function ToAscii; external user32 name 'ToAscii';
-function ToAsciiEx; external user32 name 'ToAsciiEx';
-function ToUnicode; external user32 name 'ToUnicode';
-function OemKeyScan; external user32 name 'OemKeyScan';
-function VkKeyScanA; external user32 name 'VkKeyScanA';
-function VkKeyScanW; external user32 name 'VkKeyScanW';
-function VkKeyScan; external user32 name 'VkKeyScan' + AWSuffix;
-function VkKeyScanExA; external user32 name 'VkKeyScanExA';
-function VkKeyScanExW; external user32 name 'VkKeyScanExW';
-function VkKeyScanEx; external user32 name 'VkKeyScanEx' + AWSuffix;
-procedure keybd_event; external user32 name 'keybd_event';
-procedure mouse_event; external user32 name 'mouse_event';
-function SendInput; external user32 name 'SendInput';
-function GetLastInputInfo; external user32 name 'GetLastInputInfo';
-function MapVirtualKeyA; external user32 name 'MapVirtualKeyA';
-function MapVirtualKeyW; external user32 name 'MapVirtualKeyW';
-function MapVirtualKey; external user32 name 'MapVirtualKey' + AWSuffix;
-function MapVirtualKeyExA; external user32 name 'MapVirtualKeyExA';
-function MapVirtualKeyExW; external user32 name 'MapVirtualKeyExW';
-function MapVirtualKeyEx; external user32 name 'MapVirtualKeyEx' + AWSuffix;
-function GetInputState; external user32 name 'GetInputState';
-function GetQueueStatus; external user32 name 'GetQueueStatus';
-function GetCapture; external user32 name 'GetCapture';
-function SetCapture; external user32 name 'SetCapture';
-function ReleaseCapture; external user32 name 'ReleaseCapture';
-function MsgWaitForMultipleObjects; external user32 name 'MsgWaitForMultipleObjects';
-function MsgWaitForMultipleObjectsEx; external user32 name 'MsgWaitForMultipleObjectsEx';
-function SetTimer; external user32 name 'SetTimer';
-function KillTimer; external user32 name 'KillTimer';
-function IsWindowUnicode; external user32 name 'IsWindowUnicode';
-function EnableWindow; external user32 name 'EnableWindow';
-function IsWindowEnabled; external user32 name 'IsWindowEnabled';
-function LoadAcceleratorsA; external user32 name 'LoadAcceleratorsA';
-function LoadAcceleratorsW; external user32 name 'LoadAcceleratorsW';
-function LoadAccelerators; external user32 name 'LoadAccelerators' + AWSuffix;
-function CreateAcceleratorTableA; external user32 name 'CreateAcceleratorTableA';
-function CreateAcceleratorTableW; external user32 name 'CreateAcceleratorTableW';
-function CreateAcceleratorTable; external user32 name 'CreateAcceleratorTable' + AWSuffix;
-function DestroyAcceleratorTable; external user32 name 'DestroyAcceleratorTable';
-function CopyAcceleratorTableA; external user32 name 'CopyAcceleratorTableA';
-function CopyAcceleratorTableW; external user32 name 'CopyAcceleratorTableW';
-function CopyAcceleratorTable; external user32 name 'CopyAcceleratorTable' + AWSuffix;
-function TranslateAcceleratorA; external user32 name 'TranslateAcceleratorA';
-function TranslateAcceleratorW; external user32 name 'TranslateAcceleratorW';
-function TranslateAccelerator; external user32 name 'TranslateAccelerator' + AWSuffix;
-function GetSystemMetrics; external user32 name 'GetSystemMetrics';
-function LoadMenuA; external user32 name 'LoadMenuAA';
-function LoadMenuW; external user32 name 'LoadMenuWA';
-function LoadMenu; external user32 name 'LoadMenu' + AWSuffix;
-function LoadMenuIndirectA; external user32 name 'LoadMenuIndirectA';
-function LoadMenuIndirectW; external user32 name 'LoadMenuIndirectW';
-function LoadMenuIndirect; external user32 name 'LoadMenuIndirect' + AWSuffix;
-function GetMenu; external user32 name 'GetMenu';
-function SetMenu; external user32 name 'SetMenu';
-function ChangeMenuA; external user32 name 'ChangeMenuA';
-function ChangeMenuW; external user32 name 'ChangeMenuW';
-function ChangeMenu; external user32 name 'ChangeMenu' + AWSuffix;
-function HiliteMenuItem; external user32 name 'HiliteMenuItem';
-function GetMenuStringA; external user32 name 'GetMenuStringA';
-function GetMenuStringW; external user32 name 'GetMenuStringW';
-function GetMenuString; external user32 name 'GetMenuString' + AWSuffix;
-function GetMenuState; external user32 name 'GetMenuState';
-function DrawMenuBar; external user32 name 'DrawMenuBar';
-function GetSystemMenu; external user32 name 'GetSystemMenu';
-function CreateMenu; external user32 name 'CreateMenu';
-function CreatePopupMenu; external user32 name 'CreatePopupMenu';
-function DestroyMenu; external user32 name 'DestroyMenu';
-function CheckMenuItem; external user32 name 'CheckMenuItem';
-function EnableMenuItem; external user32 name 'EnableMenuItem';
-function GetSubMenu; external user32 name 'GetSubMenu';
-function GetMenuItemID; external user32 name 'GetMenuItemID';
-function GetMenuItemCount; external user32 name 'GetMenuItemCount';
-function InsertMenuA; external user32 name 'InsertMenuA';
-function InsertMenuW; external user32 name 'InsertMenuW';
-function InsertMenu; external user32 name 'InsertMenu' + AWSuffix;
-function AppendMenuA; external user32 name 'AppendMenuA';
-function AppendMenuW; external user32 name 'AppendMenuW';
-function AppendMenu; external user32 name 'AppendMenu' + AWSuffix;
-function ModifyMenuA; external user32 name 'ModifyMenuA';
-function ModifyMenuW; external user32 name 'ModifyMenuW';
-function ModifyMenu; external user32 name 'ModifyMenu' + AWSuffix;
-function RemoveMenu; external user32 name 'RemoveMenu';
-function DeleteMenu; external user32 name 'DeleteMenu';
-function SetMenuItemBitmaps; external user32 name 'SetMenuItemBitmaps';
-function GetMenuCheckMarkDimensions; external user32 name 'GetMenuCheckMarkDimensions';
-function TrackPopupMenu; external user32 name 'TrackPopupMenu';
-function TrackPopupMenuEx; external user32 name 'TrackPopupMenuEx';
-function GetMenuInfo; external user32 name 'GetMenuInfo';
-function SetMenuInfo; external user32 name 'SetMenuInfo';
-function EndMenu; external user32 name 'EndMenu';
-function InsertMenuItemA; external user32 name 'InsertMenuItemA';
-function InsertMenuItemW; external user32 name 'InsertMenuItemW';
-function InsertMenuItem; external user32 name 'InsertMenuItem' + AWSuffix;
-function GetMenuItemInfoA; external user32 name 'GetMenuItemInfoA';
-function GetMenuItemInfoW; external user32 name 'GetMenuItemInfoW';
-function GetMenuItemInfo; external user32 name 'GetMenuItemInfo' + AWSuffix;
-function SetMenuItemInfoA; external user32 name 'SetMenuItemInfoA';
-function SetMenuItemInfoW; external user32 name 'SetMenuItemInfoW';
-function SetMenuItemInfo; external user32 name 'SetMenuItemInfo' + AWSuffix;
-function GetMenuDefaultItem; external user32 name 'GetMenuDefaultItem';
-function SetMenuDefaultItem; external user32 name 'SetMenuDefaultItem';
-function GetMenuItemRect; external user32 name 'GetMenuItemRect';
-function MenuItemFromPoint; external user32 name 'MenuItemFromPoint';
-function DragObject; external user32 name 'DragObject';
-function DragDetect; external user32 name 'DragDetect';
-function DrawIcon; external user32 name 'DrawIcon';
-function DrawTextA; external user32 name 'DrawTextA';
-function DrawTextW; external user32 name 'DrawTextW';
-function DrawText; external user32 name 'DrawText' + AWSuffix;
-function DrawTextExA; external user32 name 'DrawTextExA';
-function DrawTextExW; external user32 name 'DrawTextExW';
-function DrawTextEx; external user32 name 'DrawTextEx' + AWSuffix;
-function GrayStringA; external user32 name 'GrayStringA';
-function GrayStringW; external user32 name 'GrayStringW';
-function GrayString; external user32 name 'GrayString' + AWSuffix;
-function DrawStateA; external user32 name 'DrawStateA';
-function DrawStateW; external user32 name 'DrawStateW';
-function DrawState; external user32 name 'DrawState' + AWSuffix;
-function TabbedTextOutA; external user32 name 'TabbedTextOutA';
-function TabbedTextOutW; external user32 name 'TabbedTextOutW';
-function TabbedTextOut; external user32 name 'TabbedTextOut' + AWSuffix;
-function GetTabbedTextExtentA; external user32 name 'GetTabbedTextExtentA';
-function GetTabbedTextExtentW; external user32 name 'GetTabbedTextExtentW';
-function GetTabbedTextExtent; external user32 name 'GetTabbedTextExtent' + AWSuffix;
-function UpdateWindow; external user32 name 'UpdateWindow';
-function SetActiveWindow; external user32 name 'SetActiveWindow';
-function GetForegroundWindow; external user32 name 'GetForegroundWindow';
-function PaintDesktop; external user32 name 'PaintDesktop';
-procedure SwitchToThisWindow; external user32 name 'SwitchToThisWindow';
-function SetForegroundWindow; external user32 name 'SetForegroundWindow';
-function AllowSetForegroundWindow; external user32 name 'AllowSetForegroundWindow';
-function LockSetForegroundWindow; external user32 name 'LockSetForegroundWindow';
-function WindowFromDC; external user32 name 'WindowFromDC';
-function GetDC; external user32 name 'GetDC';
-function GetDCEx; external user32 name 'GetDCEx';
-function GetWindowDC; external user32 name 'GetWindowDC';
-function ReleaseDC; external user32 name 'ReleaseDC';
-function BeginPaint; external user32 name 'BeginPaint';
-function EndPaint; external user32 name 'EndPaint';
-function GetUpdateRect; external user32 name 'GetUpdateRect';
-function GetUpdateRgn; external user32 name 'GetUpdateRgn';
-function SetWindowRgn; external user32 name 'SetWindowRgn';
-function GetWindowRgn; external user32 name 'GetWindowRgn';
-function GetWindowRgnBox; external user32 name 'GetWindowRgnBox';
-function ExcludeUpdateRgn; external user32 name 'ExcludeUpdateRgn';
-function InvalidateRect; external user32 name 'InvalidateRect';
-function ValidateRect; external user32 name 'ValidateRect';
-function InvalidateRgn; external user32 name 'InvalidateRgn';
-function ValidateRgn; external user32 name 'ValidateRgn';
-function RedrawWindow; external user32 name 'RedrawWindow';
-function LockWindowUpdate; external user32 name 'LockWindowUpdate';
-function ScrollWindow; external user32 name 'ScrollWindow';
-function ScrollDC; external user32 name 'ScrollDC';
-function ScrollWindowEx; external user32 name 'ScrollWindowEx';
-function SetScrollPos; external user32 name 'SetScrollPos';
-function GetScrollPos; external user32 name 'GetScrollPos';
-function SetScrollRange; external user32 name 'SetScrollRange';
-function GetScrollRange; external user32 name 'GetScrollRange';
-function ShowScrollBar; external user32 name 'ShowScrollBar';
-function EnableScrollBar; external user32 name 'EnableScrollBar';
-function SetPropA; external user32 name 'SetPropA';
-function SetPropW; external user32 name 'SetPropW';
-function SetProp; external user32 name 'SetProp' + AWSuffix;
-function GetPropA; external user32 name 'GetPropA';
-function GetPropW; external user32 name 'GetPropW';
-function GetProp; external user32 name 'GetProp' + AWSuffix;
-function RemovePropA; external user32 name 'RemovePropA';
-function RemovePropW; external user32 name 'RemovePropW';
-function RemoveProp; external user32 name 'RemoveProp' + AWSuffix;
-function EnumPropsExA; external user32 name 'EnumPropsExA';
-function EnumPropsExW; external user32 name 'EnumPropsExW';
-function EnumPropsEx; external user32 name 'EnumPropsEx' + AWSuffix;
-function EnumPropsA; external user32 name 'EnumPropsA';
-function EnumPropsW; external user32 name 'EnumPropsW';
-function EnumProps; external user32 name 'EnumProps' + AWSuffix;
-function SetWindowTextA; external user32 name 'SetWindowTextA';
-function SetWindowTextW; external user32 name 'SetWindowTextW';
-function SetWindowText; external user32 name 'SetWindowText' + AWSuffix;
-function GetWindowTextA; external user32 name 'GetWindowTextA';
-function GetWindowTextW; external user32 name 'GetWindowTextW';
-function GetWindowText; external user32 name 'GetWindowText' + AWSuffix;
-function GetWindowTextLengthA; external user32 name 'GetWindowTextLengthA';
-function GetWindowTextLengthW; external user32 name 'GetWindowTextLengthW';
-function GetWindowTextLength; external user32 name 'GetWindowTextLength' + AWSuffix;
-function GetClientRect; external user32 name 'GetClientRect';
-function GetWindowRect; external user32 name 'GetWindowRect';
-function AdjustWindowRect; external user32 name 'AdjustWindowRect';
-function AdjustWindowRectEx; external user32 name 'AdjustWindowRectEx';
-function SetWindowContextHelpId; external user32 name 'SetWindowContextHelpId';
-function GetWindowContextHelpId; external user32 name 'GetWindowContextHelpId';
-function SetMenuContextHelpId; external user32 name 'SetMenuContextHelpId';
-function GetMenuContextHelpId; external user32 name 'GetMenuContextHelpId';
-function MessageBoxA; external user32 name 'MessageBoxA';
-function MessageBoxW; external user32 name 'MessageBoxW';
-function MessageBox; external user32 name 'MessageBox' + AWSuffix;
-function MessageBoxExA; external user32 name 'MessageBoxExA';
-function MessageBoxExW; external user32 name 'MessageBoxExW';
-function MessageBoxEx; external user32 name 'MessageBoxEx' + AWSuffix;
-function MessageBoxIndirectA; external user32 name 'MessageBoxIndirectA';
-function MessageBoxIndirectW; external user32 name 'MessageBoxIndirectW';
-function MessageBoxIndirect; external user32 name 'MessageBoxIndirect' + AWSuffix;
-function MessageBeep; external user32 name 'MessageBeep';
-function ShowCursor; external user32 name 'ShowCursor';
-function SetCursorPos; external user32 name 'SetCursorPos';
-function SetCursor; external user32 name 'SetCursor';
-function GetCursorPos; external user32 name 'GetCursorPos';
-function ClipCursor; external user32 name 'ClipCursor';
-function GetClipCursor; external user32 name 'GetClipCursor';
-function GetCursor; external user32 name 'GetCursor';
-function CreateCaret; external user32 name 'CreateCaret';
-function GetCaretBlinkTime; external user32 name 'GetCaretBlinkTime';
-function SetCaretBlinkTime; external user32 name 'SetCaretBlinkTime';
-function DestroyCaret; external user32 name 'DestroyCaret';
-function HideCaret; external user32 name 'HideCaret';
-function ShowCaret; external user32 name 'ShowCaret';
-function SetCaretPos; external user32 name 'SetCaretPos';
-function GetCaretPos; external user32 name 'GetCaretPos';
-function ClientToScreen; external user32 name 'ClientToScreen';
-function ScreenToClient; external user32 name 'ScreenToClient';
-function MapWindowPoints; external user32 name 'MapWindowPoints';
-function WindowFromPoint; external user32 name 'WindowFromPoint';
-function ChildWindowFromPoint; external user32 name 'ChildWindowFromPoint';
-function ChildWindowFromPointEx; external user32 name 'ChildWindowFromPointEx';
-function GetSysColor; external user32 name 'GetSysColor';
-function GetSysColorBrush; external user32 name 'GetSysColorBrush';
-function SetSysColors; external user32 name 'SetSysColors';
-function DrawFocusRect; external user32 name 'DrawFocusRect';
-function FillRect; external user32 name 'FillRect';
-function FrameRect; external user32 name 'FrameRect';
-function InvertRect; external user32 name 'InvertRect';
-function SetRect; external user32 name 'SetRect';
-function SetRectEmpty; external user32 name 'SetRectEmpty';
-function CopyRect; external user32 name 'CopyRect';
-function InflateRect; external user32 name 'InflateRect';
-function IntersectRect; external user32 name 'IntersectRect';
-function UnionRect; external user32 name 'UnionRect';
-function SubtractRect; external user32 name 'SubtractRect';
-function OffsetRect; external user32 name 'OffsetRect';
-function IsRectEmpty; external user32 name 'IsRectEmpty';
-function EqualRect; external user32 name 'EqualRect';
-function PtInRect; external user32 name 'PtInRect';
-function GetWindowWord; external user32 name 'GetWindowWord';
-function SetWindowWord; external user32 name 'SetWindowWord';
-function GetWindowLongA; external user32 name 'GetWindowLongA';
-function GetWindowLongW; external user32 name 'GetWindowLongW';
-function GetWindowLong; external user32 name 'GetWindowLong' + AWSuffix;
-function SetWindowLongA; external user32 name 'SetWindowLongA';
-function SetWindowLongW; external user32 name 'SetWindowLongW';
-function SetWindowLong; external user32 name 'SetWindowLong' + AWSuffix;
-function GetClassWord; external user32 name 'GetClassWord';
-function SetClassWord; external user32 name 'SetClassWord';
-function GetClassLongA; external user32 name 'GetClassLongA';
-function GetClassLongW; external user32 name 'GetClassLongW';
-function GetClassLong; external user32 name 'GetClassLong' + AWSuffix;
-function SetClassLongA; external user32 name 'SetClassLongA';
-function SetClassLongW; external user32 name 'SetClassLongW';
-function SetClassLong; external user32 name 'SetClassLong' + AWSuffix;
-function GetProcessDefaultLayout; external user32 name 'GetProcessDefaultLayout';
-function SetProcessDefaultLayout; external user32 name 'SetProcessDefaultLayout';
-function GetDesktopWindow; external user32 name 'GetDesktopWindow';
-function GetParent; external user32 name 'GetParent';
-function SetParent; external user32 name 'SetParent';
-function EnumChildWindows; external user32 name 'EnumChildWindows';
-function FindWindowA; external user32 name 'FindWindowA';
-function FindWindowW; external user32 name 'FindWindowW';
-function FindWindow; external user32 name 'FindWindow' + AWSuffix;
-function FindWindowExA; external user32 name 'FindWindowExA';
-function FindWindowExW; external user32 name 'FindWindowExW';
-function FindWindowEx; external user32 name 'FindWindowEx' + AWSuffix;
-function GetShellWindow; external user32 name 'GetShellWindow';
-function RegisterShellHookWindow; external user32 name 'RegisterShellHookWindow';
-function DeregisterShellHookWindow; external user32 name 'DeregisterShellHookWindow';
-function EnumWindows; external user32 name 'EnumWindows';
-function EnumThreadWindows; external user32 name 'EnumThreadWindows';
-function GetClassNameA; external user32 name 'GetClassNameA';
-function GetClassNameW; external user32 name 'GetClassNameW';
-function GetClassName; external user32 name 'GetClassName' + AWSuffix;
-function GetTopWindow; external user32 name 'GetTopWindow';
-function GetWindowThreadProcessId; external user32 name 'GetWindowThreadProcessId';
-function IsGUIThread; external user32 name 'IsGUIThread';
-function GetLastActivePopup; external user32 name 'GetLastActivePopup';
-function GetWindow; external user32 name 'GetWindow';
-function SetWindowsHookA; external user32 name 'SetWindowsHookA';
-function SetWindowsHookW; external user32 name 'SetWindowsHookW';
-function SetWindowsHook; external user32 name 'SetWindowsHook' + AWSuffix;
-function UnhookWindowsHook; external user32 name 'UnhookWindowsHook';
-function SetWindowsHookExA; external user32 name 'SetWindowsHookExA';
-function SetWindowsHookExW; external user32 name 'SetWindowsHookExW';
-function SetWindowsHookEx; external user32 name 'SetWindowsHookEx' + AWSuffix;
-function UnhookWindowsHookEx; external user32 name 'UnhookWindowsHookEx';
-function CallNextHookEx; external user32 name 'CallNextHookEx';
-function CheckMenuRadioItem; external user32 name 'CheckMenuRadioItem';
-function LoadBitmapA; external user32 name 'LoadBitmapA';
-function LoadBitmapW; external user32 name 'LoadBitmapW';
-function LoadBitmap; external user32 name 'LoadBitmap' + AWSuffix;
-function LoadCursorA; external user32 name 'LoadCursorA';
-function LoadCursorW; external user32 name 'LoadCursorW';
-function LoadCursor; external user32 name 'LoadCursor' + AWSuffix;
-function LoadCursorFromFileA; external user32 name 'LoadCursorFromFileA';
-function LoadCursorFromFileW; external user32 name 'LoadCursorFromFileW';
-function LoadCursorFromFile; external user32 name 'LoadCursorFromFile' + AWSuffix;
-function CreateCursor; external user32 name 'CreateCursor';
-function DestroyCursor; external user32 name 'DestroyCursor';
-function SetSystemCursor; external user32 name 'SetSystemCursor';
-function LoadIconA; external user32 name 'LoadIconA';
-function LoadIconW; external user32 name 'LoadIconW';
-function LoadIcon; external user32 name 'LoadIcon' + AWSuffix;
-function PrivateExtractIconsA; external user32 name 'PrivateExtractIconsA';
-function PrivateExtractIconsW; external user32 name 'PrivateExtractIconsW';
-function PrivateExtractIcons; external user32 name 'PrivateExtractIcons' + AWSuffix;
-function CreateIcon; external user32 name 'CreateIcon';
-function DestroyIcon; external user32 name 'DestroyIcon';
-function LookupIconIdFromDirectory; external user32 name 'LookupIconIdFromDirectory';
-function LookupIconIdFromDirectoryEx; external user32 name 'LookupIconIdFromDirectoryEx';
-function CreateIconFromResource; external user32 name 'CreateIconFromResource';
-function CreateIconFromResourceEx; external user32 name 'CreateIconFromResourceEx';
-function LoadImageA; external user32 name 'LoadImageA';
-function LoadImageW; external user32 name 'LoadImageW';
-function LoadImage; external user32 name 'LoadImage' + AWSuffix;
-function CopyImage; external user32 name 'CopyImage';
-function DrawIconEx; external user32 name 'DrawIconEx';
-function CreateIconIndirect; external user32 name 'CreateIconIndirect';
-function CopyIcon; external user32 name 'CopyIcon';
-function GetIconInfo; external user32 name 'GetIconInfo';
-function LoadStringA; external user32 name 'LoadStringA';
-function LoadStringW; external user32 name 'LoadStringW';
-function LoadString; external user32 name 'LoadString' + AWSuffix;
-function IsDialogMessageA; external user32 name 'IsDialogMessageA';
-function IsDialogMessageW; external user32 name 'IsDialogMessageW';
-function IsDialogMessage; external user32 name 'IsDialogMessage' + AWSuffix;
-function MapDialogRect; external user32 name 'MapDialogRect';
-function DlgDirListA; external user32 name 'DlgDirListA';
-function DlgDirListW; external user32 name 'DlgDirListW';
-function DlgDirList; external user32 name 'DlgDirList' + AWSuffix;
-function DlgDirSelectExA; external user32 name 'DlgDirSelectExA';
-function DlgDirSelectExW; external user32 name 'DlgDirSelectExW';
-function DlgDirSelectEx; external user32 name 'DlgDirSelectEx' + AWSuffix;
-function DlgDirListComboBoxA; external user32 name 'DlgDirListComboBoxA';
-function DlgDirListComboBoxW; external user32 name 'DlgDirListComboBoxW';
-function DlgDirListComboBox; external user32 name 'DlgDirListComboBox' + AWSuffix;
-function DlgDirSelectComboBoxExA; external user32 name 'DlgDirSelectComboBoxExA';
-function DlgDirSelectComboBoxExW; external user32 name 'DlgDirSelectComboBoxExW';
-function DlgDirSelectComboBoxEx; external user32 name 'DlgDirSelectComboBoxEx' + AWSuffix;
-function SetScrollInfo; external user32 name 'SetScrollInfo';
-function GetScrollInfo; external user32 name 'GetScrollInfo';
-function DefFrameProcA; external user32 name 'DefFrameProcA';
-function DefFrameProcW; external user32 name 'DefFrameProcW';
-function DefFrameProc; external user32 name 'DefFrameProc' + AWSuffix;
-function DefMDIChildProcA; external user32 name 'DefMDIChildProcA';
-function DefMDIChildProcW; external user32 name 'DefMDIChildProcW';
-function DefMDIChildProc; external user32 name 'DefMDIChildProc' + AWSuffix;
-function TranslateMDISysAccel; external user32 name 'TranslateMDISysAccel';
-function ArrangeIconicWindows; external user32 name 'ArrangeIconicWindows';
-function CreateMDIWindowA; external user32 name 'CreateMDIWindowA';
-function CreateMDIWindowW; external user32 name 'CreateMDIWindowW';
-function CreateMDIWindow; external user32 name 'CreateMDIWindow' + AWSuffix;
-function TileWindows; external user32 name 'TileWindows';
-function CascadeWindows; external user32 name 'CascadeWindows';
-function WinHelpA; external user32 name 'WinHelpA';
-function WinHelpW; external user32 name 'WinHelpW';
-function WinHelp; external user32 name 'WinHelp' + AWSuffix;
-function GetGuiResources; external user32 name 'GetGuiResources';
-function ChangeDisplaySettingsA; external user32 name 'ChangeDisplaySettingsA';
-function ChangeDisplaySettingsW; external user32 name 'ChangeDisplaySettingsW';
-function ChangeDisplaySettings; external user32 name 'ChangeDisplaySettings' + AWSuffix;
-function ChangeDisplaySettingsExA; external user32 name 'ChangeDisplaySettingsExA';
-function ChangeDisplaySettingsExW; external user32 name 'ChangeDisplaySettingsExW';
-function ChangeDisplaySettingsEx; external user32 name 'ChangeDisplaySettingsEx' + AWSuffix;
-function EnumDisplaySettingsA; external user32 name 'EnumDisplaySettingsA';
-function EnumDisplaySettingsW; external user32 name 'EnumDisplaySettingsW';
-function EnumDisplaySettings; external user32 name 'EnumDisplaySettings' + AWSuffix;
-function EnumDisplaySettingsExA; external user32 name 'EnumDisplaySettingsExA';
-function EnumDisplaySettingsExW; external user32 name 'EnumDisplaySettingsExW';
-function EnumDisplaySettingsEx; external user32 name 'EnumDisplaySettingsEx' + AWSuffix;
-function EnumDisplayDevicesA; external user32 name 'EnumDisplayDevicesA';
-function EnumDisplayDevicesW; external user32 name 'EnumDisplayDevicesW';
-function EnumDisplayDevices; external user32 name 'EnumDisplayDevices' + AWSuffix;
-function SystemParametersInfoA; external user32 name 'SystemParametersInfoA';
-function SystemParametersInfoW; external user32 name 'SystemParametersInfoW';
-function SystemParametersInfo; external user32 name 'SystemParametersInfo' + AWSuffix;
-procedure SetDebugErrorLevel; external user32 name 'SetDebugErrorLevel';
-procedure SetLastErrorEx; external user32 name 'SetLastErrorEx';
-function InternalGetWindowText; external user32 name 'InternalGetWindowText';
-function EndTask; external user32 name 'EndTask';
-function MonitorFromPoint; external user32 name 'MonitorFromPoint';
-function MonitorFromRect; external user32 name 'MonitorFromRect';
-function MonitorFromWindow; external user32 name 'MonitorFromWindow';
-function GetMonitorInfoA; external user32 name 'GetMonitorInfoA';
-function GetMonitorInfoW; external user32 name 'GetMonitorInfoW';
-function GetMonitorInfo; external user32 name 'GetMonitorInfo' + AWSuffix;
-function EnumDisplayMonitors; external user32 name 'EnumDisplayMonitors';
-procedure NotifyWinEvent; external user32 name 'NotifyWinEvent';
-function SetWinEventHook; external user32 name 'SetWinEventHook';
-function IsWinEventHookInstalled; external user32 name 'IsWinEventHookInstalled';
-function UnhookWinEvent; external user32 name 'UnhookWinEvent';
-function GetGUIThreadInfo; external user32 name 'GetGUIThreadInfo';
-function GetWindowModuleFileNameA; external user32 name 'GetWindowModuleFileNameA';
-function GetWindowModuleFileNameW; external user32 name 'GetWindowModuleFileNameW';
-function GetWindowModuleFileName; external user32 name 'GetWindowModuleFileName' + AWSuffix;
-function GetCursorInfo; external user32 name 'GetCursorInfo';
-function GetWindowInfo; external user32 name 'GetWindowInfo';
-function GetTitleBarInfo; external user32 name 'GetTitleBarInfo';
-function GetMenuBarInfo; external user32 name 'GetMenuBarInfo';
-function GetScrollBarInfo; external user32 name 'GetScrollBarInfo';
-function GetComboBoxInfo; external user32 name 'GetComboBoxInfo';
-function GetAncestor; external user32 name 'GetAncestor';
-function RealChildWindowFromPoint; external user32 name 'RealChildWindowFromPoint';
-function RealGetWindowClassA; external user32 name 'RealGetWindowClassA';
-function RealGetWindowClassW; external user32 name 'RealGetWindowClassW';
-function RealGetWindowClass; external user32 name 'RealGetWindowClass' + AWSuffix;
-function GetAltTabInfoA; external user32 name 'GetAltTabInfoA';
-function GetAltTabInfoW; external user32 name 'GetAltTabInfoW';
-function GetAltTabInfo; external user32 name 'GetAltTabInfo' + AWSuffix;
-function GetListBoxInfo; external user32 name 'GetListBoxInfo';
-function LockWorkStation; external user32 name 'LockWorkStation';
-function UserHandleGrantAccess; external user32 name 'UserHandleGrantAccess';
-function GetRawInputData; external user32 name 'GetRawInputData';
-function GetRawInputDeviceInfoA; external user32 name 'GetRawInputDeviceInfoA';
-function GetRawInputDeviceInfoW; external user32 name 'GetRawInputDeviceInfoW';
-function GetRawInputDeviceInfo; external user32 name 'GetRawInputDeviceInfo' + AWSuffix;
-function GetRawInputBuffer; external user32 name 'GetRawInputBuffer';
-function RegisterRawInputDevices; external user32 name 'RegisterRawInputDevices';
-function GetRegisteredRawInputDevices; external user32 name 'GetRegisteredRawInputDevices';
-function GetRawInputDeviceList; external user32 name 'GetRawInputDeviceList';
-function DefRawInputProc; external user32 name 'DefRawInputProc';
-
-{$ENDIF DYNAMIC_LINK}
-
-end.
+{******************************************************************************}
+{ }
+{ Windows User API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: winuser.h, released June 2000. The original Pascal }
+{ code is: WinUser.pas, released December 2000. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwawinuser.pas,v 1.1 2005/04/04 07:56:11 marco Exp $
+
+unit JwaWinUser;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "WinUser.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaWinBase, JwaWinGDI, JwaWinNT, JwaWinType;
+
+const
+ UINT_MAX = UINT($FFFFFFFF); // from limits.h TODO
+ {$EXTERNALSYM UINT_MAX}
+
+type
+ HDWP = HANDLE;
+ {$EXTERNALSYM HDWP}
+
+ MENUTEMPLATEA = Pointer;
+ {$EXTERNALSYM MENUTEMPLATEA}
+ MENUTEMPLATEW = Pointer;
+ {$EXTERNALSYM MENUTEMPLATEW}
+
+ {$IFDEF UNICODE}
+ MENUTEMPLATE = MENUTEMPLATEW;
+ {$EXTERNALSYM MENUTEMPLATE}
+ {$ELSE}
+ MENUTEMPLATE = MENUTEMPLATEA;
+ {$EXTERNALSYM MENUTEMPLATE}
+ {$ENDIF UNICODE}
+
+ LPMENUTEMPLATEA = PVOID;
+ {$EXTERNALSYM LPMENUTEMPLATEA}
+ LPMENUTEMPLATEW = PVOID;
+ {$EXTERNALSYM LPMENUTEMPLATEW}
+ {$IFDEF UNICODE}
+ LPMENUTEMPLATE = LPMENUTEMPLATEW;
+ {$EXTERNALSYM LPMENUTEMPLATE}
+ {$ELSE}
+ LPMENUTEMPLATE = LPMENUTEMPLATEA;
+ {$EXTERNALSYM LPMENUTEMPLATE}
+ {$ENDIF UNICODE}
+
+ WNDPROC = function(hWnd: HWND; uMsg: UINT; lParam: WPARAM; wParam: LPARAM): LRESULT;
+ {$EXTERNALSYM WNDPROC}
+
+ DLGPROC = function(hwndDlg: HWND; wMsg: UINT; wParam: WPARAM; lParam: LPARAM): INT_PTR; stdcall;
+ {$EXTERNALSYM DLGPROC}
+ TIMERPROC = procedure(hwnd: HWND; uMsg: UINT; idEvent: UINT_PTR; dwTime: DWORD); stdcall;
+ {$EXTERNALSYM TIMERPROC}
+ GRAYSTRINGPROC = function(hdc: HDC; lpData: LPARAM; cchData: Integer): BOOL; stdcall;
+ {$EXTERNALSYM GRAYSTRINGPROC}
+ WNDENUMPROC = function(hwnd: HWND; lParam: LPARAM): BOOL; stdcall;
+ {$EXTERNALSYM WNDENUMPROC}
+ HOOKPROC = function(nCode: Integer; wParam: WPARAM; lParam: LPARAM): LRESULT; stdcall;
+ {$EXTERNALSYM HOOKPROC}
+ SENDASYNCPROC = procedure(hwnd: HWND; uMsg: UINT; dwData: ULONG_PTR; lResult: LRESULT); stdcall;
+ {$EXTERNALSYM SENDASYNCPROC}
+
+ PROPENUMPROCA = function(hwnd: HWND; lpszString: LPCSTR; hData: HANDLE): BOOL; stdcall;
+ {$EXTERNALSYM PROPENUMPROCA}
+ PROPENUMPROCW = function(hwnd: HWND; lpszString: LPCWSTR; hData: HANDLE): BOOL; stdcall;
+ {$EXTERNALSYM PROPENUMPROCW}
+
+ PROPENUMPROCEXA = function(hwnd: HWND; lpszString: LPSTR; hData: HANDLE; dwData: ULONG_PTR): BOOL; stdcall;
+ {$EXTERNALSYM PROPENUMPROCEXA}
+ PROPENUMPROCEXW = function(hwnd: HWND; lpszString: LPWSTR; hData: HANDLE; dwData: ULONG_PTR): BOOL; stdcall;
+ {$EXTERNALSYM PROPENUMPROCEXW}
+
+ EDITWORDBREAKPROCA = function(lpch: LPSTR; ichCurrent: Integer; cch, code: Integer): Integer; stdcall;
+ {$EXTERNALSYM EDITWORDBREAKPROCA}
+ EDITWORDBREAKPROCW = function(lpch: LPWSTR; ichCurrent: Integer; cch, code: Integer): Integer; stdcall;
+ {$EXTERNALSYM EDITWORDBREAKPROCW}
+
+ DRAWSTATEPROC = function(hdc: HDC; lData: LPARAM; wData: WPARAM; cx, cy: Integer): BOOL; stdcall;
+ {$EXTERNALSYM DRAWSTATEPROC}
+
+ {$IFDEF UNICODE}
+ PROPENUMPROC = PROPENUMPROCW;
+ {$EXTERNALSYM PROPENUMPROC}
+ PROPENUMPROCEX = PROPENUMPROCEXW;
+ {$EXTERNALSYM PROPENUMPROCEX}
+ EDITWORDBREAKPROC = EDITWORDBREAKPROCW;
+ {$EXTERNALSYM EDITWORDBREAKPROC}
+ {$ELSE}
+ PROPENUMPROC = PROPENUMPROCA;
+ {$EXTERNALSYM PROPENUMPROC}
+ PROPENUMPROCEX = PROPENUMPROCEXA;
+ {$EXTERNALSYM PROPENUMPROCEX}
+ EDITWORDBREAKPROC = EDITWORDBREAKPROCA;
+ {$EXTERNALSYM EDITWORDBREAKPROC}
+ {$ENDIF UNICODE}
+
+ NAMEENUMPROCA = function(lpstr: LPSTR; lParam: LPARAM): BOOL; stdcall;
+ {$EXTERNALSYM NAMEENUMPROCA}
+ NAMEENUMPROCW = function(lpstr: LPWSTR; lParam: LPARAM): BOOL; stdcall;
+ {$EXTERNALSYM NAMEENUMPROCW}
+
+ WINSTAENUMPROCA = NAMEENUMPROCA;
+ {$EXTERNALSYM WINSTAENUMPROCA}
+ DESKTOPENUMPROCA = NAMEENUMPROCA;
+ {$EXTERNALSYM DESKTOPENUMPROCA}
+ WINSTAENUMPROCW = NAMEENUMPROCW;
+ {$EXTERNALSYM WINSTAENUMPROCW}
+ DESKTOPENUMPROCW = NAMEENUMPROCW;
+ {$EXTERNALSYM DESKTOPENUMPROCW}
+
+ {$IFDEF UNICODE}
+ WINSTAENUMPROC = WINSTAENUMPROCW;
+ {$EXTERNALSYM WINSTAENUMPROC}
+ DESKTOPENUMPROC = DESKTOPENUMPROCW;
+ {$EXTERNALSYM DESKTOPENUMPROC}
+ {$ELSE}
+ WINSTAENUMPROC = WINSTAENUMPROCA;
+ {$EXTERNALSYM WINSTAENUMPROC}
+ DESKTOPENUMPROC = DESKTOPENUMPROCA;
+ {$EXTERNALSYM DESKTOPENUMPROC}
+ {$ENDIF UNICODE}
+
+function IS_INTRESOURCE(wInteger: WORD): BOOL;
+{$EXTERNALSYM IS_INTRESOURCE}
+
+type
+ MAKEINTRESOURCEA = LPSTR;
+ {$EXTERNALSYM MAKEINTRESOURCEA}
+ MAKEINTRESOURCEW = LPWSTR;
+ {$EXTERNALSYM MAKEINTRESOURCEW}
+ {$IFDEF UNICODE}
+ MAKEINTRESOURCE = MAKEINTRESOURCEW;
+ {$EXTERNALSYM MAKEINTRESOURCE}
+ {$ELSE}
+ MAKEINTRESOURCE = MAKEINTRESOURCEA;
+ {$EXTERNALSYM MAKEINTRESOURCE}
+ {$ENDIF UNICODE}
+
+//
+// Predefined Resource Types
+//
+
+const
+ RT_CURSOR = MAKEINTRESOURCE(1);
+ {$EXTERNALSYM RT_CURSOR}
+ RT_BITMAP = MAKEINTRESOURCE(2);
+ {$EXTERNALSYM RT_BITMAP}
+ RT_ICON = MAKEINTRESOURCE(3);
+ {$EXTERNALSYM RT_ICON}
+ RT_MENU = MAKEINTRESOURCE(4);
+ {$EXTERNALSYM RT_MENU}
+ RT_DIALOG = MAKEINTRESOURCE(5);
+ {$EXTERNALSYM RT_DIALOG}
+ RT_STRING = MAKEINTRESOURCE(6);
+ {$EXTERNALSYM RT_STRING}
+ RT_FONTDIR = MAKEINTRESOURCE(7);
+ {$EXTERNALSYM RT_FONTDIR}
+ RT_FONT = MAKEINTRESOURCE(8);
+ {$EXTERNALSYM RT_FONT}
+ RT_ACCELERATOR = MAKEINTRESOURCE(9);
+ {$EXTERNALSYM RT_ACCELERATOR}
+ RT_RCDATA = MAKEINTRESOURCE(10);
+ {$EXTERNALSYM RT_RCDATA}
+ RT_MESSAGETABLE = MAKEINTRESOURCE(11);
+ {$EXTERNALSYM RT_MESSAGETABLE}
+
+ DIFFERENCE = 11;
+ {$EXTERNALSYM DIFFERENCE}
+
+ RT_GROUP_CURSOR = MAKEINTRESOURCE(ULONG_PTR(RT_CURSOR) + DIFFERENCE);
+ {$EXTERNALSYM RT_GROUP_CURSOR}
+ RT_GROUP_ICON = MAKEINTRESOURCE(ULONG_PTR(RT_ICON) + DIFFERENCE);
+ {$EXTERNALSYM RT_GROUP_ICON}
+ RT_VERSION = MAKEINTRESOURCE(16);
+ {$EXTERNALSYM RT_VERSION}
+ RT_DLGINCLUDE = MAKEINTRESOURCE(17);
+ {$EXTERNALSYM RT_DLGINCLUDE}
+ RT_PLUGPLAY = MAKEINTRESOURCE(19);
+ {$EXTERNALSYM RT_PLUGPLAY}
+ RT_VXD = MAKEINTRESOURCE(20);
+ {$EXTERNALSYM RT_VXD}
+ RT_ANICURSOR = MAKEINTRESOURCE(21);
+ {$EXTERNALSYM RT_ANICURSOR}
+ RT_ANIICON = MAKEINTRESOURCE(22);
+ {$EXTERNALSYM RT_ANIICON}
+ RT_HTML = MAKEINTRESOURCE(23);
+ {$EXTERNALSYM RT_HTML}
+ RT_MANIFEST = MAKEINTRESOURCE(24);
+ CREATEPROCESS_MANIFEST_RESOURCE_ID = MAKEINTRESOURCE(1);
+ {$EXTERNALSYM CREATEPROCESS_MANIFEST_RESOURCE_ID}
+ ISOLATIONAWARE_MANIFEST_RESOURCE_ID = MAKEINTRESOURCE(2);
+ {$EXTERNALSYM ISOLATIONAWARE_MANIFEST_RESOURCE_ID}
+ ISOLATIONAWARE_NOSTATICIMPORT_MANIFEST_RESOURCE_ID = MAKEINTRESOURCE(3);
+ {$EXTERNALSYM ISOLATIONAWARE_NOSTATICIMPORT_MANIFEST_RESOURCE_ID}
+ MINIMUM_RESERVED_MANIFEST_RESOURCE_ID = MAKEINTRESOURCE(1{inclusive});
+ {$EXTERNALSYM MINIMUM_RESERVED_MANIFEST_RESOURCE_ID}
+ MAXIMUM_RESERVED_MANIFEST_RESOURCE_ID = MAKEINTRESOURCE(16{inclusive});
+ {$EXTERNALSYM MAXIMUM_RESERVED_MANIFEST_RESOURCE_ID}
+
+type
+ va_list = PChar;
+ {$EXTERNALSYM va_list}
+
+function wvsprintfA(Output: LPSTR; Format: LPCSTR; arglist: va_list): Integer; stdcall;
+{$EXTERNALSYM wvsprintfA}
+function wvsprintfW(Output: LPWSTR; Format: LPCWSTR; arglist: va_list): Integer; stdcall;
+{$EXTERNALSYM wvsprintfW}
+function wvsprintf(Output: LPTSTR; Format: LPCTSTR; arglist: va_list): Integer; stdcall;
+{$EXTERNALSYM wvsprintf}
+
+function wsprintfA(Output: LPSTR; Format: LPCSTR): Integer; stdcall;
+{$EXTERNALSYM wsprintfA}
+function wsprintfW(Output: LPWSTR; Format: LPCWSTR): Integer; stdcall;
+{$EXTERNALSYM wsprintfW}
+function wsprintf(Output: LPTSTR; Format: LPCTSTR): Integer; stdcall;
+{$EXTERNALSYM wsprintf}
+
+//
+// SPI_SETDESKWALLPAPER defined constants
+//
+
+const
+ SETWALLPAPER_DEFAULT = LPWSTR(-1);
+ {$EXTERNALSYM SETWALLPAPER_DEFAULT}
+
+//
+// Scroll Bar Constants
+//
+
+ SB_HORZ = 0;
+ {$EXTERNALSYM SB_HORZ}
+ SB_VERT = 1;
+ {$EXTERNALSYM SB_VERT}
+ SB_CTL = 2;
+ {$EXTERNALSYM SB_CTL}
+ SB_BOTH = 3;
+ {$EXTERNALSYM SB_BOTH}
+
+//
+// Scroll Bar Commands
+//
+
+ SB_LINEUP = 0;
+ {$EXTERNALSYM SB_LINEUP}
+ SB_LINELEFT = 0;
+ {$EXTERNALSYM SB_LINELEFT}
+ SB_LINEDOWN = 1;
+ {$EXTERNALSYM SB_LINEDOWN}
+ SB_LINERIGHT = 1;
+ {$EXTERNALSYM SB_LINERIGHT}
+ SB_PAGEUP = 2;
+ {$EXTERNALSYM SB_PAGEUP}
+ SB_PAGELEFT = 2;
+ {$EXTERNALSYM SB_PAGELEFT}
+ SB_PAGEDOWN = 3;
+ {$EXTERNALSYM SB_PAGEDOWN}
+ SB_PAGERIGHT = 3;
+ {$EXTERNALSYM SB_PAGERIGHT}
+ SB_THUMBPOSITION = 4;
+ {$EXTERNALSYM SB_THUMBPOSITION}
+ SB_THUMBTRACK = 5;
+ {$EXTERNALSYM SB_THUMBTRACK}
+ SB_TOP = 6;
+ {$EXTERNALSYM SB_TOP}
+ SB_LEFT = 6;
+ {$EXTERNALSYM SB_LEFT}
+ SB_BOTTOM = 7;
+ {$EXTERNALSYM SB_BOTTOM}
+ SB_RIGHT = 7;
+ {$EXTERNALSYM SB_RIGHT}
+ SB_ENDSCROLL = 8;
+ {$EXTERNALSYM SB_ENDSCROLL}
+
+//
+// ShowWindow() Commands
+//
+
+ SW_HIDE = 0;
+ {$EXTERNALSYM SW_HIDE}
+ SW_SHOWNORMAL = 1;
+ {$EXTERNALSYM SW_SHOWNORMAL}
+ SW_NORMAL = 1;
+ {$EXTERNALSYM SW_NORMAL}
+ SW_SHOWMINIMIZED = 2;
+ {$EXTERNALSYM SW_SHOWMINIMIZED}
+ SW_SHOWMAXIMIZED = 3;
+ {$EXTERNALSYM SW_SHOWMAXIMIZED}
+ SW_MAXIMIZE = 3;
+ {$EXTERNALSYM SW_MAXIMIZE}
+ SW_SHOWNOACTIVATE = 4;
+ {$EXTERNALSYM SW_SHOWNOACTIVATE}
+ SW_SHOW = 5;
+ {$EXTERNALSYM SW_SHOW}
+ SW_MINIMIZE = 6;
+ {$EXTERNALSYM SW_MINIMIZE}
+ SW_SHOWMINNOACTIVE = 7;
+ {$EXTERNALSYM SW_SHOWMINNOACTIVE}
+ SW_SHOWNA = 8;
+ {$EXTERNALSYM SW_SHOWNA}
+ SW_RESTORE = 9;
+ {$EXTERNALSYM SW_RESTORE}
+ SW_SHOWDEFAULT = 10;
+ {$EXTERNALSYM SW_SHOWDEFAULT}
+ SW_FORCEMINIMIZE = 11;
+ {$EXTERNALSYM SW_FORCEMINIMIZE}
+ SW_MAX = 11;
+ {$EXTERNALSYM SW_MAX}
+
+//
+// Old ShowWindow() Commands
+//
+
+ HIDE_WINDOW = 0;
+ {$EXTERNALSYM HIDE_WINDOW}
+ SHOW_OPENWINDOW = 1;
+ {$EXTERNALSYM SHOW_OPENWINDOW}
+ SHOW_ICONWINDOW = 2;
+ {$EXTERNALSYM SHOW_ICONWINDOW}
+ SHOW_FULLSCREEN = 3;
+ {$EXTERNALSYM SHOW_FULLSCREEN}
+ SHOW_OPENNOACTIVATE = 4;
+ {$EXTERNALSYM SHOW_OPENNOACTIVATE}
+
+//
+// Identifiers for the WM_SHOWWINDOW message
+//
+
+ SW_PARENTCLOSING = 1;
+ {$EXTERNALSYM SW_PARENTCLOSING}
+ SW_OTHERZOOM = 2;
+ {$EXTERNALSYM SW_OTHERZOOM}
+ SW_PARENTOPENING = 3;
+ {$EXTERNALSYM SW_PARENTOPENING}
+ SW_OTHERUNZOOM = 4;
+ {$EXTERNALSYM SW_OTHERUNZOOM}
+
+//
+// AnimateWindow() Commands
+//
+
+ AW_HOR_POSITIVE = $00000001;
+ {$EXTERNALSYM AW_HOR_POSITIVE}
+ AW_HOR_NEGATIVE = $00000002;
+ {$EXTERNALSYM AW_HOR_NEGATIVE}
+ AW_VER_POSITIVE = $00000004;
+ {$EXTERNALSYM AW_VER_POSITIVE}
+ AW_VER_NEGATIVE = $00000008;
+ {$EXTERNALSYM AW_VER_NEGATIVE}
+ AW_CENTER = $00000010;
+ {$EXTERNALSYM AW_CENTER}
+ AW_HIDE = $00010000;
+ {$EXTERNALSYM AW_HIDE}
+ AW_ACTIVATE = $00020000;
+ {$EXTERNALSYM AW_ACTIVATE}
+ AW_SLIDE = $00040000;
+ {$EXTERNALSYM AW_SLIDE}
+ AW_BLEND = $00080000;
+ {$EXTERNALSYM AW_BLEND}
+
+//
+// WM_KEYUP/DOWN/CHAR HIWORD(lParam) flags
+//
+
+ KF_EXTENDED = $0100;
+ {$EXTERNALSYM KF_EXTENDED}
+ KF_DLGMODE = $0800;
+ {$EXTERNALSYM KF_DLGMODE}
+ KF_MENUMODE = $1000;
+ {$EXTERNALSYM KF_MENUMODE}
+ KF_ALTDOWN = $2000;
+ {$EXTERNALSYM KF_ALTDOWN}
+ KF_REPEAT = $4000;
+ {$EXTERNALSYM KF_REPEAT}
+ KF_UP = $8000;
+ {$EXTERNALSYM KF_UP}
+
+//
+// Virtual Keys, Standard Set
+//
+
+ VK_LBUTTON = $01;
+ {$EXTERNALSYM VK_LBUTTON}
+ VK_RBUTTON = $02;
+ {$EXTERNALSYM VK_RBUTTON}
+ VK_CANCEL = $03;
+ {$EXTERNALSYM VK_CANCEL}
+ VK_MBUTTON = $04; // NOT contiguous with L & RBUTTON
+ {$EXTERNALSYM VK_MBUTTON}
+
+ {$IFDEF WIN98ME_UP}
+ VK_XBUTTON1 = $05; // NOT contiguous with L & RBUTTON
+ {$EXTERNALSYM VK_XBUTTON1}
+ VK_XBUTTON2 = $06; // NOT contiguous with L & RBUTTON
+ {$EXTERNALSYM VK_XBUTTON2}
+ {$ENDIF WIN98ME_UP}
+
+//
+// 0x07 : unassigned
+//
+
+ VK_BACK = $08;
+ {$EXTERNALSYM VK_BACK}
+ VK_TAB = $09;
+ {$EXTERNALSYM VK_TAB}
+
+//
+// 0x0A - 0x0B : reserved
+//
+
+ VK_CLEAR = $0C;
+ {$EXTERNALSYM VK_CLEAR}
+ VK_RETURN = $0D;
+ {$EXTERNALSYM VK_RETURN}
+
+ VK_SHIFT = $10;
+ {$EXTERNALSYM VK_SHIFT}
+ VK_CONTROL = $11;
+ {$EXTERNALSYM VK_CONTROL}
+ VK_MENU = $12;
+ {$EXTERNALSYM VK_MENU}
+ VK_PAUSE = $13;
+ {$EXTERNALSYM VK_PAUSE}
+ VK_CAPITAL = $14;
+ {$EXTERNALSYM VK_CAPITAL}
+
+ VK_KANA = $15;
+ {$EXTERNALSYM VK_KANA}
+ VK_HANGEUL = $15; // old name - should be here for compatibility
+ {$EXTERNALSYM VK_HANGEUL}
+ VK_HANGUL = $15;
+ {$EXTERNALSYM VK_HANGUL}
+ VK_JUNJA = $17;
+ {$EXTERNALSYM VK_JUNJA}
+ VK_FINAL = $18;
+ {$EXTERNALSYM VK_FINAL}
+ VK_HANJA = $19;
+ {$EXTERNALSYM VK_HANJA}
+ VK_KANJI = $19;
+ {$EXTERNALSYM VK_KANJI}
+
+ VK_ESCAPE = $1B;
+ {$EXTERNALSYM VK_ESCAPE}
+
+ VK_CONVERT = $1C;
+ {$EXTERNALSYM VK_CONVERT}
+ VK_NONCONVERT = $1D;
+ {$EXTERNALSYM VK_NONCONVERT}
+ VK_ACCEPT = $1E;
+ {$EXTERNALSYM VK_ACCEPT}
+ VK_MODECHANGE = $1F;
+ {$EXTERNALSYM VK_MODECHANGE}
+
+ VK_SPACE = $20;
+ {$EXTERNALSYM VK_SPACE}
+ VK_PRIOR = $21;
+ {$EXTERNALSYM VK_PRIOR}
+ VK_NEXT = $22;
+ {$EXTERNALSYM VK_NEXT}
+ VK_END = $23;
+ {$EXTERNALSYM VK_END}
+ VK_HOME = $24;
+ {$EXTERNALSYM VK_HOME}
+ VK_LEFT = $25;
+ {$EXTERNALSYM VK_LEFT}
+ VK_UP = $26;
+ {$EXTERNALSYM VK_UP}
+ VK_RIGHT = $27;
+ {$EXTERNALSYM VK_RIGHT}
+ VK_DOWN = $28;
+ {$EXTERNALSYM VK_DOWN}
+ VK_SELECT = $29;
+ {$EXTERNALSYM VK_SELECT}
+ VK_PRINT = $2A;
+ {$EXTERNALSYM VK_PRINT}
+ VK_EXECUTE = $2B;
+ {$EXTERNALSYM VK_EXECUTE}
+ VK_SNAPSHOT = $2C;
+ {$EXTERNALSYM VK_SNAPSHOT}
+ VK_INSERT = $2D;
+ {$EXTERNALSYM VK_INSERT}
+ VK_DELETE = $2E;
+ {$EXTERNALSYM VK_DELETE}
+ VK_HELP = $2F;
+ {$EXTERNALSYM VK_HELP}
+
+//
+// VK_0 - VK_9 are the same as ASCII '0' - '9' (0x30 - 0x39)
+// 0x40 : unassigned
+// VK_A - VK_Z are the same as ASCII 'A' - 'Z' (0x41 - 0x5A)
+//
+
+ VK_LWIN = $5B;
+ {$EXTERNALSYM VK_LWIN}
+ VK_RWIN = $5C;
+ {$EXTERNALSYM VK_RWIN}
+ VK_APPS = $5D;
+ {$EXTERNALSYM VK_APPS}
+
+//
+// 0x5E : reserved
+//
+
+ VK_SLEEP = $5F;
+ {$EXTERNALSYM VK_SLEEP}
+
+ VK_NUMPAD0 = $60;
+ {$EXTERNALSYM VK_NUMPAD0}
+ VK_NUMPAD1 = $61;
+ {$EXTERNALSYM VK_NUMPAD1}
+ VK_NUMPAD2 = $62;
+ {$EXTERNALSYM VK_NUMPAD2}
+ VK_NUMPAD3 = $63;
+ {$EXTERNALSYM VK_NUMPAD3}
+ VK_NUMPAD4 = $64;
+ {$EXTERNALSYM VK_NUMPAD4}
+ VK_NUMPAD5 = $65;
+ {$EXTERNALSYM VK_NUMPAD5}
+ VK_NUMPAD6 = $66;
+ {$EXTERNALSYM VK_NUMPAD6}
+ VK_NUMPAD7 = $67;
+ {$EXTERNALSYM VK_NUMPAD7}
+ VK_NUMPAD8 = $68;
+ {$EXTERNALSYM VK_NUMPAD8}
+ VK_NUMPAD9 = $69;
+ {$EXTERNALSYM VK_NUMPAD9}
+ VK_MULTIPLY = $6A;
+ {$EXTERNALSYM VK_MULTIPLY}
+ VK_ADD = $6B;
+ {$EXTERNALSYM VK_ADD}
+ VK_SEPARATOR = $6C;
+ {$EXTERNALSYM VK_SEPARATOR}
+ VK_SUBTRACT = $6D;
+ {$EXTERNALSYM VK_SUBTRACT}
+ VK_DECIMAL = $6E;
+ {$EXTERNALSYM VK_DECIMAL}
+ VK_DIVIDE = $6F;
+ {$EXTERNALSYM VK_DIVIDE}
+ VK_F1 = $70;
+ {$EXTERNALSYM VK_F1}
+ VK_F2 = $71;
+ {$EXTERNALSYM VK_F2}
+ VK_F3 = $72;
+ {$EXTERNALSYM VK_F3}
+ VK_F4 = $73;
+ {$EXTERNALSYM VK_F4}
+ VK_F5 = $74;
+ {$EXTERNALSYM VK_F5}
+ VK_F6 = $75;
+ {$EXTERNALSYM VK_F6}
+ VK_F7 = $76;
+ {$EXTERNALSYM VK_F7}
+ VK_F8 = $77;
+ {$EXTERNALSYM VK_F8}
+ VK_F9 = $78;
+ {$EXTERNALSYM VK_F9}
+ VK_F10 = $79;
+ {$EXTERNALSYM VK_F10}
+ VK_F11 = $7A;
+ {$EXTERNALSYM VK_F11}
+ VK_F12 = $7B;
+ {$EXTERNALSYM VK_F12}
+ VK_F13 = $7C;
+ {$EXTERNALSYM VK_F13}
+ VK_F14 = $7D;
+ {$EXTERNALSYM VK_F14}
+ VK_F15 = $7E;
+ {$EXTERNALSYM VK_F15}
+ VK_F16 = $7F;
+ {$EXTERNALSYM VK_F16}
+ VK_F17 = $80;
+ {$EXTERNALSYM VK_F17}
+ VK_F18 = $81;
+ {$EXTERNALSYM VK_F18}
+ VK_F19 = $82;
+ {$EXTERNALSYM VK_F19}
+ VK_F20 = $83;
+ {$EXTERNALSYM VK_F20}
+ VK_F21 = $84;
+ {$EXTERNALSYM VK_F21}
+ VK_F22 = $85;
+ {$EXTERNALSYM VK_F22}
+ VK_F23 = $86;
+ {$EXTERNALSYM VK_F23}
+ VK_F24 = $87;
+ {$EXTERNALSYM VK_F24}
+
+//
+// 0x88 - 0x8F : unassigned
+//
+
+ VK_NUMLOCK = $90;
+ {$EXTERNALSYM VK_NUMLOCK}
+ VK_SCROLL = $91;
+ {$EXTERNALSYM VK_SCROLL}
+
+//
+// NEC PC-9800 kbd definitions
+//
+
+ VK_OEM_NEC_EQUAL = $92; // '=' key on numpad
+ {$EXTERNALSYM VK_OEM_NEC_EQUAL}
+
+//
+// Fujitsu/OASYS kbd definitions
+//
+
+ VK_OEM_FJ_JISHO = $92; // 'Dictionary' key
+ {$EXTERNALSYM VK_OEM_FJ_JISHO}
+ VK_OEM_FJ_MASSHOU = $93; // 'Unregister word' key
+ {$EXTERNALSYM VK_OEM_FJ_MASSHOU}
+ VK_OEM_FJ_TOUROKU = $94; // 'Register word' key
+ {$EXTERNALSYM VK_OEM_FJ_TOUROKU}
+ VK_OEM_FJ_LOYA = $95; // 'Left OYAYUBI' key
+ {$EXTERNALSYM VK_OEM_FJ_LOYA}
+ VK_OEM_FJ_ROYA = $96; // 'Right OYAYUBI' key
+ {$EXTERNALSYM VK_OEM_FJ_ROYA}
+
+//
+// 0x97 - 0x9F : unassigned
+//
+
+//
+// VK_L* & VK_R* - left and right Alt, Ctrl and Shift virtual keys.
+// Used only as parameters to GetAsyncKeyState() and GetKeyState().
+// No other API or message will distinguish left and right keys in this way.
+//
+
+ VK_LSHIFT = $A0;
+ {$EXTERNALSYM VK_LSHIFT}
+ VK_RSHIFT = $A1;
+ {$EXTERNALSYM VK_RSHIFT}
+ VK_LCONTROL = $A2;
+ {$EXTERNALSYM VK_LCONTROL}
+ VK_RCONTROL = $A3;
+ {$EXTERNALSYM VK_RCONTROL}
+ VK_LMENU = $A4;
+ {$EXTERNALSYM VK_LMENU}
+ VK_RMENU = $A5;
+ {$EXTERNALSYM VK_RMENU}
+
+ {$IFDEF WIN98ME_UP}
+
+ VK_BROWSER_BACK = $A6;
+ {$EXTERNALSYM VK_BROWSER_BACK}
+ VK_BROWSER_FORWARD = $A7;
+ {$EXTERNALSYM VK_BROWSER_FORWARD}
+ VK_BROWSER_REFRESH = $A8;
+ {$EXTERNALSYM VK_BROWSER_REFRESH}
+ VK_BROWSER_STOP = $A9;
+ {$EXTERNALSYM VK_BROWSER_STOP}
+ VK_BROWSER_SEARCH = $AA;
+ {$EXTERNALSYM VK_BROWSER_SEARCH}
+ VK_BROWSER_FAVORITES = $AB;
+ {$EXTERNALSYM VK_BROWSER_FAVORITES}
+ VK_BROWSER_HOME = $AC;
+ {$EXTERNALSYM VK_BROWSER_HOME}
+
+ VK_VOLUME_MUTE = $AD;
+ {$EXTERNALSYM VK_VOLUME_MUTE}
+ VK_VOLUME_DOWN = $AE;
+ {$EXTERNALSYM VK_VOLUME_DOWN}
+ VK_VOLUME_UP = $AF;
+ {$EXTERNALSYM VK_VOLUME_UP}
+ VK_MEDIA_NEXT_TRACK = $B0;
+ {$EXTERNALSYM VK_MEDIA_NEXT_TRACK}
+ VK_MEDIA_PREV_TRACK = $B1;
+ {$EXTERNALSYM VK_MEDIA_PREV_TRACK}
+ VK_MEDIA_STOP = $B2;
+ {$EXTERNALSYM VK_MEDIA_STOP}
+ VK_MEDIA_PLAY_PAUSE = $B3;
+ {$EXTERNALSYM VK_MEDIA_PLAY_PAUSE}
+ VK_LAUNCH_MAIL = $B4;
+ {$EXTERNALSYM VK_LAUNCH_MAIL}
+ VK_LAUNCH_MEDIA_SELECT = $B5;
+ {$EXTERNALSYM VK_LAUNCH_MEDIA_SELECT}
+ VK_LAUNCH_APP1 = $B6;
+ {$EXTERNALSYM VK_LAUNCH_APP1}
+ VK_LAUNCH_APP2 = $B7;
+ {$EXTERNALSYM VK_LAUNCH_APP2}
+
+ {$ENDIF WIN98ME_UP}
+
+//
+// 0xB8 - 0xB9 : reserved
+//
+
+ VK_OEM_1 = $BA; // ';:' for US
+ {$EXTERNALSYM VK_OEM_1}
+ VK_OEM_PLUS = $BB; // '+' any country
+ {$EXTERNALSYM VK_OEM_PLUS}
+ VK_OEM_COMMA = $BC; // ',' any country
+ {$EXTERNALSYM VK_OEM_COMMA}
+ VK_OEM_MINUS = $BD; // '-' any country
+ {$EXTERNALSYM VK_OEM_MINUS}
+ VK_OEM_PERIOD = $BE; // '.' any country
+ {$EXTERNALSYM VK_OEM_PERIOD}
+ VK_OEM_2 = $BF; // '/?' for US
+ {$EXTERNALSYM VK_OEM_2}
+ VK_OEM_3 = $C0; // '`~' for US
+ {$EXTERNALSYM VK_OEM_3}
+
+//
+// 0xC1 - 0xD7 : reserved
+//
+
+//
+// 0xD8 - 0xDA : unassigned
+//
+
+ VK_OEM_4 = $DB; // '[{' for US
+ {$EXTERNALSYM VK_OEM_4}
+ VK_OEM_5 = $DC; // '\|' for US
+ {$EXTERNALSYM VK_OEM_5}
+ VK_OEM_6 = $DD; // ']}' for US
+ {$EXTERNALSYM VK_OEM_6}
+ VK_OEM_7 = $DE; // ''"' for US
+ {$EXTERNALSYM VK_OEM_7}
+ VK_OEM_8 = $DF;
+ {$EXTERNALSYM VK_OEM_8}
+
+//
+// 0xE0 : reserved
+//
+
+//
+// Various extended or enhanced keyboards
+//
+
+ VK_OEM_AX = $E1; // 'AX' key on Japanese AX kbd
+ {$EXTERNALSYM VK_OEM_AX}
+ VK_OEM_102 = $E2; // "<>" or "\|" on RT 102-key kbd.
+ {$EXTERNALSYM VK_OEM_102}
+ VK_ICO_HELP = $E3; // Help key on ICO
+ {$EXTERNALSYM VK_ICO_HELP}
+ VK_ICO_00 = $E4; // 00 key on ICO
+ {$EXTERNALSYM VK_ICO_00}
+
+ VK_PROCESSKEY = $E5;
+ {$EXTERNALSYM VK_PROCESSKEY}
+
+ VK_ICO_CLEAR = $E6;
+ {$EXTERNALSYM VK_ICO_CLEAR}
+
+ {$IFDEF WIN98ME_UP}
+ VK_PACKET = $E7;
+ {$EXTERNALSYM VK_PACKET}
+ {$ENDIF WIN98ME_UP}
+
+//
+// 0xE8 : unassigned
+//
+
+//
+// Nokia/Ericsson definitions
+//
+
+ VK_OEM_RESET = $E9;
+ {$EXTERNALSYM VK_OEM_RESET}
+ VK_OEM_JUMP = $EA;
+ {$EXTERNALSYM VK_OEM_JUMP}
+ VK_OEM_PA1 = $EB;
+ {$EXTERNALSYM VK_OEM_PA1}
+ VK_OEM_PA2 = $EC;
+ {$EXTERNALSYM VK_OEM_PA2}
+ VK_OEM_PA3 = $ED;
+ {$EXTERNALSYM VK_OEM_PA3}
+ VK_OEM_WSCTRL = $EE;
+ {$EXTERNALSYM VK_OEM_WSCTRL}
+ VK_OEM_CUSEL = $EF;
+ {$EXTERNALSYM VK_OEM_CUSEL}
+ VK_OEM_ATTN = $F0;
+ {$EXTERNALSYM VK_OEM_ATTN}
+ VK_OEM_FINISH = $F1;
+ {$EXTERNALSYM VK_OEM_FINISH}
+ VK_OEM_COPY = $F2;
+ {$EXTERNALSYM VK_OEM_COPY}
+ VK_OEM_AUTO = $F3;
+ {$EXTERNALSYM VK_OEM_AUTO}
+ VK_OEM_ENLW = $F4;
+ {$EXTERNALSYM VK_OEM_ENLW}
+ VK_OEM_BACKTAB = $F5;
+ {$EXTERNALSYM VK_OEM_BACKTAB}
+
+ VK_ATTN = $F6;
+ {$EXTERNALSYM VK_ATTN}
+ VK_CRSEL = $F7;
+ {$EXTERNALSYM VK_CRSEL}
+ VK_EXSEL = $F8;
+ {$EXTERNALSYM VK_EXSEL}
+ VK_EREOF = $F9;
+ {$EXTERNALSYM VK_EREOF}
+ VK_PLAY = $FA;
+ {$EXTERNALSYM VK_PLAY}
+ VK_ZOOM = $FB;
+ {$EXTERNALSYM VK_ZOOM}
+ VK_NONAME = $FC;
+ {$EXTERNALSYM VK_NONAME}
+ VK_PA1 = $FD;
+ {$EXTERNALSYM VK_PA1}
+ VK_OEM_CLEAR = $FE;
+ {$EXTERNALSYM VK_OEM_CLEAR}
+
+//
+// 0xFF : reserved
+//
+
+//
+// SetWindowsHook() codes
+//
+
+ WH_MIN = DWORD(-1);
+ {$EXTERNALSYM WH_MIN}
+ WH_MSGFILTER = DWORD(-1);
+ {$EXTERNALSYM WH_MSGFILTER}
+ WH_JOURNALRECORD = 0;
+ {$EXTERNALSYM WH_JOURNALRECORD}
+ WH_JOURNALPLAYBACK = 1;
+ {$EXTERNALSYM WH_JOURNALPLAYBACK}
+ WH_KEYBOARD = 2;
+ {$EXTERNALSYM WH_KEYBOARD}
+ WH_GETMESSAGE = 3;
+ {$EXTERNALSYM WH_GETMESSAGE}
+ WH_CALLWNDPROC = 4;
+ {$EXTERNALSYM WH_CALLWNDPROC}
+ WH_CBT = 5;
+ {$EXTERNALSYM WH_CBT}
+ WH_SYSMSGFILTER = 6;
+ {$EXTERNALSYM WH_SYSMSGFILTER}
+ WH_MOUSE = 7;
+ {$EXTERNALSYM WH_MOUSE}
+ WH_HARDWARE = 8;
+ {$EXTERNALSYM WH_HARDWARE}
+ WH_DEBUG = 9;
+ {$EXTERNALSYM WH_DEBUG}
+ WH_SHELL = 10;
+ {$EXTERNALSYM WH_SHELL}
+ WH_FOREGROUNDIDLE = 11;
+ {$EXTERNALSYM WH_FOREGROUNDIDLE}
+ WH_CALLWNDPROCRET = 12;
+ {$EXTERNALSYM WH_CALLWNDPROCRET}
+
+ {$IFDEF WINNT4_UP}
+ WH_KEYBOARD_LL = 13;
+ {$EXTERNALSYM WH_KEYBOARD_LL}
+ WH_MOUSE_LL = 14;
+ {$EXTERNALSYM WH_MOUSE_LL}
+ {$ENDIF WINNT4_UP}
+
+ {$IFDEF WINNT4_UP}
+ WH_MAX = 14;
+ {$EXTERNALSYM WH_MAX}
+ {$ELSE}
+ WH_MAX = 12;
+ {$EXTERNALSYM WH_MAX}
+ {$ENDIF WINNT4_UP}
+
+ WH_MINHOOK = WH_MIN;
+ {$EXTERNALSYM WH_MINHOOK}
+ WH_MAXHOOK = WH_MAX;
+ {$EXTERNALSYM WH_MAXHOOK}
+
+//
+// Hook Codes
+//
+
+ HC_ACTION = 0;
+ {$EXTERNALSYM HC_ACTION}
+ HC_GETNEXT = 1;
+ {$EXTERNALSYM HC_GETNEXT}
+ HC_SKIP = 2;
+ {$EXTERNALSYM HC_SKIP}
+ HC_NOREMOVE = 3;
+ {$EXTERNALSYM HC_NOREMOVE}
+ HC_NOREM = HC_NOREMOVE;
+ {$EXTERNALSYM HC_NOREM}
+ HC_SYSMODALON = 4;
+ {$EXTERNALSYM HC_SYSMODALON}
+ HC_SYSMODALOFF = 5;
+ {$EXTERNALSYM HC_SYSMODALOFF}
+
+//
+// CBT Hook Codes
+//
+
+ HCBT_MOVESIZE = 0;
+ {$EXTERNALSYM HCBT_MOVESIZE}
+ HCBT_MINMAX = 1;
+ {$EXTERNALSYM HCBT_MINMAX}
+ HCBT_QS = 2;
+ {$EXTERNALSYM HCBT_QS}
+ HCBT_CREATEWND = 3;
+ {$EXTERNALSYM HCBT_CREATEWND}
+ HCBT_DESTROYWND = 4;
+ {$EXTERNALSYM HCBT_DESTROYWND}
+ HCBT_ACTIVATE = 5;
+ {$EXTERNALSYM HCBT_ACTIVATE}
+ HCBT_CLICKSKIPPED = 6;
+ {$EXTERNALSYM HCBT_CLICKSKIPPED}
+ HCBT_KEYSKIPPED = 7;
+ {$EXTERNALSYM HCBT_KEYSKIPPED}
+ HCBT_SYSCOMMAND = 8;
+ {$EXTERNALSYM HCBT_SYSCOMMAND}
+ HCBT_SETFOCUS = 9;
+ {$EXTERNALSYM HCBT_SETFOCUS}
+
+//
+// HCBT_ACTIVATE structure pointed to by lParam
+//
+
+type
+ LPCBTACTIVATESTRUCT = ^CBTACTIVATESTRUCT;
+ {$EXTERNALSYM LPCBTACTIVATESTRUCT}
+ tagCBTACTIVATESTRUCT = record
+ fMouse: BOOL;
+ hWndActive: HWND;
+ end;
+ {$EXTERNALSYM tagCBTACTIVATESTRUCT}
+ CBTACTIVATESTRUCT = tagCBTACTIVATESTRUCT;
+ {$EXTERNALSYM CBTACTIVATESTRUCT}
+ TCbtActivateStruct = CBTACTIVATESTRUCT;
+ PCbtActivateStruct = LPCBTACTIVATESTRUCT;
+
+{$IFDEF WINXP_UP}
+
+//
+// WTSSESSION_NOTIFICATION struct pointed by lParam, for WM_WTSSESSION_CHANGE
+//
+
+ tagWTSSESSION_NOTIFICATION = record
+ cbSize: DWORD;
+ dwSessionId: DWORD;
+ end;
+ {$EXTERNALSYM tagWTSSESSION_NOTIFICATION}
+ WTSSESSION_NOTIFICATION = tagWTSSESSION_NOTIFICATION;
+ {$EXTERNALSYM WTSSESSION_NOTIFICATION}
+ PWTSSESSION_NOTIFICATION = ^WTSSESSION_NOTIFICATION;
+ {$EXTERNALSYM PWTSSESSION_NOTIFICATION}
+ TWtsSessionNotification = WTSSESSION_NOTIFICATION;
+ PWtsSessionNotification = PWTSSESSION_NOTIFICATION;
+
+//
+// codes passed in WPARAM for WM_WTSSESSION_CHANGE
+//
+
+const
+ WTS_CONSOLE_CONNECT = $1;
+ {$EXTERNALSYM WTS_CONSOLE_CONNECT}
+ WTS_CONSOLE_DISCONNECT = $2;
+ {$EXTERNALSYM WTS_CONSOLE_DISCONNECT}
+ WTS_REMOTE_CONNECT = $3;
+ {$EXTERNALSYM WTS_REMOTE_CONNECT}
+ WTS_REMOTE_DISCONNECT = $4;
+ {$EXTERNALSYM WTS_REMOTE_DISCONNECT}
+ WTS_SESSION_LOGON = $5;
+ {$EXTERNALSYM WTS_SESSION_LOGON}
+ WTS_SESSION_LOGOFF = $6;
+ {$EXTERNALSYM WTS_SESSION_LOGOFF}
+ WTS_SESSION_LOCK = $7;
+ {$EXTERNALSYM WTS_SESSION_LOCK}
+ WTS_SESSION_UNLOCK = $8;
+ {$EXTERNALSYM WTS_SESSION_UNLOCK}
+ WTS_SESSION_REMOTE_CONTROL = $9;
+ {$EXTERNALSYM WTS_SESSION_REMOTE_CONTROL}
+
+{$ENDIF WINXP_UP}
+
+//
+// WH_MSGFILTER Filter Proc Codes
+//
+
+const
+ MSGF_DIALOGBOX = 0;
+ {$EXTERNALSYM MSGF_DIALOGBOX}
+ MSGF_MESSAGEBOX = 1;
+ {$EXTERNALSYM MSGF_MESSAGEBOX}
+ MSGF_MENU = 2;
+ {$EXTERNALSYM MSGF_MENU}
+ MSGF_SCROLLBAR = 5;
+ {$EXTERNALSYM MSGF_SCROLLBAR}
+ MSGF_NEXTWINDOW = 6;
+ {$EXTERNALSYM MSGF_NEXTWINDOW}
+ MSGF_MAX = 8; // unused
+ {$EXTERNALSYM MSGF_MAX}
+ MSGF_USER = 4096;
+ {$EXTERNALSYM MSGF_USER}
+
+//
+// Shell support
+//
+
+ HSHELL_WINDOWCREATED = 1;
+ {$EXTERNALSYM HSHELL_WINDOWCREATED}
+ HSHELL_WINDOWDESTROYED = 2;
+ {$EXTERNALSYM HSHELL_WINDOWDESTROYED}
+ HSHELL_ACTIVATESHELLWINDOW = 3;
+ {$EXTERNALSYM HSHELL_ACTIVATESHELLWINDOW}
+
+ HSHELL_WINDOWACTIVATED = 4;
+ {$EXTERNALSYM HSHELL_WINDOWACTIVATED}
+ HSHELL_GETMINRECT = 5;
+ {$EXTERNALSYM HSHELL_GETMINRECT}
+ HSHELL_REDRAW = 6;
+ {$EXTERNALSYM HSHELL_REDRAW}
+ HSHELL_TASKMAN = 7;
+ {$EXTERNALSYM HSHELL_TASKMAN}
+ HSHELL_LANGUAGE = 8;
+ {$EXTERNALSYM HSHELL_LANGUAGE}
+ HSHELL_SYSMENU = 9;
+ {$EXTERNALSYM HSHELL_SYSMENU}
+ HSHELL_ENDTASK = 10;
+ {$EXTERNALSYM HSHELL_ENDTASK}
+ {$IFDEF WIN2000_UP}
+ HSHELL_ACCESSIBILITYSTATE = 11;
+ {$EXTERNALSYM HSHELL_ACCESSIBILITYSTATE}
+ HSHELL_APPCOMMAND = 12;
+ {$EXTERNALSYM HSHELL_APPCOMMAND}
+ {$ENDIF WIN2000_UP}
+
+ {$IFDEF WINXP_UP}
+ HSHELL_WINDOWREPLACED = 13;
+ {$EXTERNALSYM HSHELL_WINDOWREPLACED}
+ {$ENDIF WINXP_UP}
+ HSHELL_WINDOWREPLACING = 14;
+ {$EXTERNALSYM HSHELL_WINDOWREPLACING}
+
+ HSHELL_HIGHBIT = $8000;
+ {$EXTERNALSYM HSHELL_HIGHBIT}
+ HSHELL_FLASH = HSHELL_REDRAW or HSHELL_HIGHBIT;
+ {$EXTERNALSYM HSHELL_FLASH}
+ HSHELL_RUDEAPPACTIVATED = HSHELL_WINDOWACTIVATED or HSHELL_HIGHBIT;
+ {$EXTERNALSYM HSHELL_RUDEAPPACTIVATED}
+
+{$IFDEF WIN2000_UP}
+
+// wparam for HSHELL_ACCESSIBILITYSTATE//
+
+ ACCESS_STICKYKEYS = $0001;
+ {$EXTERNALSYM ACCESS_STICKYKEYS}
+ ACCESS_FILTERKEYS = $0002;
+ {$EXTERNALSYM ACCESS_FILTERKEYS}
+ ACCESS_MOUSEKEYS = $0003;
+ {$EXTERNALSYM ACCESS_MOUSEKEYS}
+
+// cmd for HSHELL_APPCOMMAND and WM_APPCOMMAND//
+
+ APPCOMMAND_BROWSER_BACKWARD = 1;
+ {$EXTERNALSYM APPCOMMAND_BROWSER_BACKWARD}
+ APPCOMMAND_BROWSER_FORWARD = 2;
+ {$EXTERNALSYM APPCOMMAND_BROWSER_FORWARD}
+ APPCOMMAND_BROWSER_REFRESH = 3;
+ {$EXTERNALSYM APPCOMMAND_BROWSER_REFRESH}
+ APPCOMMAND_BROWSER_STOP = 4;
+ {$EXTERNALSYM APPCOMMAND_BROWSER_STOP}
+ APPCOMMAND_BROWSER_SEARCH = 5;
+ {$EXTERNALSYM APPCOMMAND_BROWSER_SEARCH}
+ APPCOMMAND_BROWSER_FAVORITES = 6;
+ {$EXTERNALSYM APPCOMMAND_BROWSER_FAVORITES}
+ APPCOMMAND_BROWSER_HOME = 7;
+ {$EXTERNALSYM APPCOMMAND_BROWSER_HOME}
+ APPCOMMAND_VOLUME_MUTE = 8;
+ {$EXTERNALSYM APPCOMMAND_VOLUME_MUTE}
+ APPCOMMAND_VOLUME_DOWN = 9;
+ {$EXTERNALSYM APPCOMMAND_VOLUME_DOWN}
+ APPCOMMAND_VOLUME_UP = 10;
+ {$EXTERNALSYM APPCOMMAND_VOLUME_UP}
+ APPCOMMAND_MEDIA_NEXTTRACK = 11;
+ {$EXTERNALSYM APPCOMMAND_MEDIA_NEXTTRACK}
+ APPCOMMAND_MEDIA_PREVIOUSTRACK = 12;
+ {$EXTERNALSYM APPCOMMAND_MEDIA_PREVIOUSTRACK}
+ APPCOMMAND_MEDIA_STOP = 13;
+ {$EXTERNALSYM APPCOMMAND_MEDIA_STOP}
+ APPCOMMAND_MEDIA_PLAY_PAUSE = 14;
+ {$EXTERNALSYM APPCOMMAND_MEDIA_PLAY_PAUSE}
+ APPCOMMAND_LAUNCH_MAIL = 15;
+ {$EXTERNALSYM APPCOMMAND_LAUNCH_MAIL}
+ APPCOMMAND_LAUNCH_MEDIA_SELECT = 16;
+ {$EXTERNALSYM APPCOMMAND_LAUNCH_MEDIA_SELECT}
+ APPCOMMAND_LAUNCH_APP1 = 17;
+ {$EXTERNALSYM APPCOMMAND_LAUNCH_APP1}
+ APPCOMMAND_LAUNCH_APP2 = 18;
+ {$EXTERNALSYM APPCOMMAND_LAUNCH_APP2}
+ APPCOMMAND_BASS_DOWN = 19;
+ {$EXTERNALSYM APPCOMMAND_BASS_DOWN}
+ APPCOMMAND_BASS_BOOST = 20;
+ {$EXTERNALSYM APPCOMMAND_BASS_BOOST}
+ APPCOMMAND_BASS_UP = 21;
+ {$EXTERNALSYM APPCOMMAND_BASS_UP}
+ APPCOMMAND_TREBLE_DOWN = 22;
+ {$EXTERNALSYM APPCOMMAND_TREBLE_DOWN}
+ APPCOMMAND_TREBLE_UP = 23;
+ {$EXTERNALSYM APPCOMMAND_TREBLE_UP}
+ {$IFDEF WINXP_UP}
+ APPCOMMAND_MICROPHONE_VOLUME_MUTE = 24;
+ {$EXTERNALSYM APPCOMMAND_MICROPHONE_VOLUME_MUTE}
+ APPCOMMAND_MICROPHONE_VOLUME_DOWN = 25;
+ {$EXTERNALSYM APPCOMMAND_MICROPHONE_VOLUME_DOWN}
+ APPCOMMAND_MICROPHONE_VOLUME_UP = 26;
+ {$EXTERNALSYM APPCOMMAND_MICROPHONE_VOLUME_UP}
+ APPCOMMAND_HELP = 27;
+ {$EXTERNALSYM APPCOMMAND_HELP}
+ APPCOMMAND_FIND = 28;
+ {$EXTERNALSYM APPCOMMAND_FIND}
+ APPCOMMAND_NEW = 29;
+ {$EXTERNALSYM APPCOMMAND_NEW}
+ APPCOMMAND_OPEN = 30;
+ {$EXTERNALSYM APPCOMMAND_OPEN}
+ APPCOMMAND_CLOSE = 31;
+ {$EXTERNALSYM APPCOMMAND_CLOSE}
+ APPCOMMAND_SAVE = 32;
+ {$EXTERNALSYM APPCOMMAND_SAVE}
+ APPCOMMAND_PRINT = 33;
+ {$EXTERNALSYM APPCOMMAND_PRINT}
+ APPCOMMAND_UNDO = 34;
+ {$EXTERNALSYM APPCOMMAND_UNDO}
+ APPCOMMAND_REDO = 35;
+ {$EXTERNALSYM APPCOMMAND_REDO}
+ APPCOMMAND_COPY = 36;
+ {$EXTERNALSYM APPCOMMAND_COPY}
+ APPCOMMAND_CUT = 37;
+ {$EXTERNALSYM APPCOMMAND_CUT}
+ APPCOMMAND_PASTE = 38;
+ {$EXTERNALSYM APPCOMMAND_PASTE}
+ APPCOMMAND_REPLY_TO_MAIL = 39;
+ {$EXTERNALSYM APPCOMMAND_REPLY_TO_MAIL}
+ APPCOMMAND_FORWARD_MAIL = 40;
+ {$EXTERNALSYM APPCOMMAND_FORWARD_MAIL}
+ APPCOMMAND_SEND_MAIL = 41;
+ {$EXTERNALSYM APPCOMMAND_SEND_MAIL}
+ APPCOMMAND_SPELL_CHECK = 42;
+ {$EXTERNALSYM APPCOMMAND_SPELL_CHECK}
+ APPCOMMAND_DICTATE_OR_COMMAND_CONTROL_TOGGLE = 43;
+ {$EXTERNALSYM APPCOMMAND_DICTATE_OR_COMMAND_CONTROL_TOGGLE}
+ APPCOMMAND_MIC_ON_OFF_TOGGLE = 44;
+ {$EXTERNALSYM APPCOMMAND_MIC_ON_OFF_TOGGLE}
+ APPCOMMAND_CORRECTION_LIST = 45;
+ {$EXTERNALSYM APPCOMMAND_CORRECTION_LIST}
+ {$ENDIF WINXP_UP}
+ APPCOMMAND_MEDIA_PLAY = 46;
+ {$EXTERNALSYM APPCOMMAND_MEDIA_PLAY}
+ APPCOMMAND_MEDIA_PAUSE = 47;
+ {$EXTERNALSYM APPCOMMAND_MEDIA_PAUSE}
+ APPCOMMAND_MEDIA_RECORD = 48;
+ {$EXTERNALSYM APPCOMMAND_MEDIA_RECORD}
+ APPCOMMAND_MEDIA_FAST_FORWARD = 49;
+ {$EXTERNALSYM APPCOMMAND_MEDIA_FAST_FORWARD}
+ APPCOMMAND_MEDIA_REWIND = 50;
+ {$EXTERNALSYM APPCOMMAND_MEDIA_REWIND}
+ APPCOMMAND_MEDIA_CHANNEL_UP = 51;
+ {$EXTERNALSYM APPCOMMAND_MEDIA_CHANNEL_UP}
+ APPCOMMAND_MEDIA_CHANNEL_DOWN = 52;
+ {$EXTERNALSYM APPCOMMAND_MEDIA_CHANNEL_DOWN}
+
+ FAPPCOMMAND_MOUSE = $8000;
+ {$EXTERNALSYM FAPPCOMMAND_MOUSE}
+ FAPPCOMMAND_KEY = 0;
+ {$EXTERNALSYM FAPPCOMMAND_KEY}
+ FAPPCOMMAND_OEM = $1000;
+ {$EXTERNALSYM FAPPCOMMAND_OEM}
+ FAPPCOMMAND_MASK = $F000;
+ {$EXTERNALSYM FAPPCOMMAND_MASK}
+
+function GET_APPCOMMAND_LPARAM(lParam: LPARAM): Shortint;
+{$EXTERNALSYM GET_APPCOMMAND_LPARAM}
+
+function GET_DEVICE_LPARAM(lParam: LPARAM): WORD;
+{$EXTERNALSYM GET_DEVICE_LPARAM}
+
+function GET_MOUSEORKEY_LPARAM(lParam: LPARAM): WORD;
+{$EXTERNALSYM GET_MOUSEORKEY_LPARAM}
+
+function GET_FLAGS_LPARAM(lParam: LPARAM): Integer;
+{$EXTERNALSYM GET_FLAGS_LPARAM}
+
+function GET_KEYSTATE_LPARAM(lParam: LPARAM): Integer;
+{$EXTERNALSYM GET_KEYSTATE_LPARAM}
+
+{$ENDIF WIN2000_UP}
+
+type
+ SHELLHOOKINFO = record
+ hwnd: HWND;
+ rc: RECT;
+ end;
+ {$EXTERNALSYM SHELLHOOKINFO}
+ LPSHELLHOOKINFO = ^SHELLHOOKINFO;
+ {$EXTERNALSYM LPSHELLHOOKINFO}
+ TShellHookInfo = SHELLHOOKINFO;
+ PShellHookInfo = LPSHELLHOOKINFO;
+
+//
+// Message Structure used in Journaling
+//
+
+type
+ LPEVENTMSG = ^EVENTMSG;
+ {$EXTERNALSYM LPEVENTMSG}
+ tagEVENTMSG = record
+ message_: UINT;
+ paramL: UINT;
+ paramH: UINT;
+ time: DWORD;
+ hwnd: HWND;
+ end;
+ {$EXTERNALSYM tagEVENTMSG}
+ EVENTMSG = tagEVENTMSG;
+ {$EXTERNALSYM EVENTMSG}
+ LPEVENTMSGMSG = ^EVENTMSG;
+ {$EXTERNALSYM LPEVENTMSGMSG}
+ PEVENTMSGMSG = ^EVENTMSG;
+ {$EXTERNALSYM PEVENTMSGMSG}
+ NPEVENTMSG = ^EVENTMSG;
+ {$EXTERNALSYM NPEVENTMSG}
+ NPEVENTMSGMSG = ^EVENTMSG;
+ {$EXTERNALSYM NPEVENTMSGMSG}
+ TEventMsg = EVENTMSG;
+ PEventMsg = LPEVENTMSG;
+
+//
+// Message structure used by WH_CALLWNDPROC
+//
+
+ LPCWPSTRUCT = ^CWPSTRUCT;
+ {$EXTERNALSYM LPCWPSTRUCT}
+ tagCWPSTRUCT = record
+ lParam: LPARAM;
+ wParam: WPARAM;
+ message: UINT;
+ hwnd: HWND;
+ end;
+ {$EXTERNALSYM tagCWPSTRUCT}
+ CWPSTRUCT = tagCWPSTRUCT;
+ {$EXTERNALSYM CWPSTRUCT}
+ NPCWPSTRUCT = ^CWPSTRUCT;
+ {$EXTERNALSYM NPCWPSTRUCT}
+ TCwpStruct = CWPSTRUCT;
+ PCwpStruct = LPCWPSTRUCT;
+
+//
+// Message structure used by WH_CALLWNDPROCRET
+//
+
+ LPCWPRETSTRUCT = ^CWPRETSTRUCT;
+ {$EXTERNALSYM LPCWPRETSTRUCT}
+ tagCWPRETSTRUCT = record
+ lResult: LRESULT;
+ lParam: LPARAM;
+ wParam: WPARAM;
+ message: UINT;
+ hwnd: HWND;
+ end;
+ {$EXTERNALSYM tagCWPRETSTRUCT}
+ CWPRETSTRUCT = tagCWPRETSTRUCT;
+ {$EXTERNALSYM CWPRETSTRUCT}
+ NPCWPRETSTRUCT = ^CWPRETSTRUCT;
+ {$EXTERNALSYM NPCWPRETSTRUCT}
+ TCwpRetStruct = CWPRETSTRUCT;
+ PCwpRetStruct = LPCWPRETSTRUCT;
+
+//
+// Low level hook flags
+//
+
+const
+ LLKHF_EXTENDED = KF_EXTENDED shr 8;
+ {$EXTERNALSYM LLKHF_EXTENDED}
+ LLKHF_INJECTED = $00000010;
+ {$EXTERNALSYM LLKHF_INJECTED}
+ LLKHF_ALTDOWN = KF_ALTDOWN shr 8;
+ {$EXTERNALSYM LLKHF_ALTDOWN}
+ LLKHF_UP = KF_UP shr 8;
+ {$EXTERNALSYM LLKHF_UP}
+
+ LLMHF_INJECTED = $00000001;
+ {$EXTERNALSYM LLMHF_INJECTED}
+
+//
+// Structure used by WH_KEYBOARD_LL
+//
+
+type
+ LPKBDLLHOOKSTRUCT = ^KBDLLHOOKSTRUCT;
+ {$EXTERNALSYM LPKBDLLHOOKSTRUCT}
+ tagKBDLLHOOKSTRUCT = record
+ vkCode: DWORD;
+ scanCode: DWORD;
+ flags: DWORD;
+ time: DWORD;
+ dwExtraInfo: ULONG_PTR;
+ end;
+ {$EXTERNALSYM tagKBDLLHOOKSTRUCT}
+ KBDLLHOOKSTRUCT = tagKBDLLHOOKSTRUCT;
+ {$EXTERNALSYM KBDLLHOOKSTRUCT}
+ TKbDllHookStruct = KBDLLHOOKSTRUCT;
+ PKbDllHookStruct = LPKBDLLHOOKSTRUCT;
+
+//
+// Structure used by WH_MOUSE_LL
+//
+
+ LPMSLLHOOKSTRUCT = ^MSLLHOOKSTRUCT;
+ {$EXTERNALSYM LPMSLLHOOKSTRUCT}
+ tagMSLLHOOKSTRUCT = record
+ pt: POINT;
+ mouseData: DWORD;
+ flags: DWORD;
+ time: DWORD;
+ dwExtraInfo: ULONG_PTR;
+ end;
+ {$EXTERNALSYM tagMSLLHOOKSTRUCT}
+ MSLLHOOKSTRUCT = tagMSLLHOOKSTRUCT;
+ {$EXTERNALSYM MSLLHOOKSTRUCT}
+ TMsllHookStruct = MSLLHOOKSTRUCT;
+ PMsllHookStruct = LPMSLLHOOKSTRUCT;
+
+//
+// Structure used by WH_DEBUG
+//
+
+ LPDEBUGHOOKINFO = ^DEBUGHOOKINFO;
+ {$EXTERNALSYM LPDEBUGHOOKINFO}
+ tagDEBUGHOOKINFO = record
+ idThread: DWORD;
+ idThreadInstaller: DWORD;
+ lParam: LPARAM;
+ wParam: WPARAM;
+ code: Integer;
+ end;
+ {$EXTERNALSYM tagDEBUGHOOKINFO}
+ DEBUGHOOKINFO = tagDEBUGHOOKINFO;
+ {$EXTERNALSYM DEBUGHOOKINFO}
+ NPDEBUGHOOKINFO = ^DEBUGHOOKINFO;
+ {$EXTERNALSYM NPDEBUGHOOKINFO}
+ TDebugHookInfo = DEBUGHOOKINFO;
+ PDebugHookInfo = LPDEBUGHOOKINFO;
+
+//
+// Structure used by WH_MOUSE
+//
+
+ LPMOUSEHOOKSTRUCT = ^MOUSEHOOKSTRUCT;
+ {$EXTERNALSYM LPMOUSEHOOKSTRUCT}
+ tagMOUSEHOOKSTRUCT = record
+ pt: POINT;
+ hwnd: HWND;
+ wHitTestCode: UINT;
+ dwExtraInfo: ULONG_PTR;
+ end;
+ {$EXTERNALSYM tagMOUSEHOOKSTRUCT}
+ MOUSEHOOKSTRUCT = tagMOUSEHOOKSTRUCT;
+ {$EXTERNALSYM MOUSEHOOKSTRUCT}
+ TMouseHookStruct = MOUSEHOOKSTRUCT;
+ PMouseHookStruct = LPMOUSEHOOKSTRUCT;
+
+ LPMOUSEHOOKSTRUCTEX = ^MOUSEHOOKSTRUCTEX;
+ {$EXTERNALSYM LPMOUSEHOOKSTRUCTEX}
+ tagMOUSEHOOKSTRUCTEX = record
+ mhs: MOUSEHOOKSTRUCT;
+ mouseData: DWORD;
+ end;
+ {$EXTERNALSYM tagMOUSEHOOKSTRUCTEX}
+ MOUSEHOOKSTRUCTEX = tagMOUSEHOOKSTRUCTEX;
+ {$EXTERNALSYM MOUSEHOOKSTRUCTEX}
+ TMouseHookStructEx = MOUSEHOOKSTRUCTEX;
+ PMouseHookStructEx = LPMOUSEHOOKSTRUCTEX;
+
+//
+// Structure used by WH_HARDWARE
+//
+
+ LPHARDWAREHOOKSTRUCT = ^HARDWAREHOOKSTRUCT;
+ {$EXTERNALSYM LPHARDWAREHOOKSTRUCT}
+ tagHARDWAREHOOKSTRUCT = record
+ hwnd: HWND;
+ message: UINT;
+ wParam: WPARAM;
+ lParam: LPARAM;
+ end;
+ {$EXTERNALSYM tagHARDWAREHOOKSTRUCT}
+ HARDWAREHOOKSTRUCT = tagHARDWAREHOOKSTRUCT;
+ {$EXTERNALSYM HARDWAREHOOKSTRUCT}
+ THardwareHookStruct = HARDWAREHOOKSTRUCT;
+ PHardwareHookStruct = LPHARDWAREHOOKSTRUCT;
+
+//
+// Keyboard Layout API
+//
+
+const
+ HKL_PREV = 0;
+ {$EXTERNALSYM HKL_PREV}
+ HKL_NEXT = 1;
+ {$EXTERNALSYM HKL_NEXT}
+
+ KLF_ACTIVATE = $00000001;
+ {$EXTERNALSYM KLF_ACTIVATE}
+ KLF_SUBSTITUTE_OK = $00000002;
+ {$EXTERNALSYM KLF_SUBSTITUTE_OK}
+ KLF_REORDER = $00000008;
+ {$EXTERNALSYM KLF_REORDER}
+ KLF_REPLACELANG = $00000010;
+ {$EXTERNALSYM KLF_REPLACELANG}
+ KLF_NOTELLSHELL = $00000080;
+ {$EXTERNALSYM KLF_NOTELLSHELL}
+ KLF_SETFORPROCESS = $00000100;
+ {$EXTERNALSYM KLF_SETFORPROCESS}
+ KLF_SHIFTLOCK = $00010000;
+ {$EXTERNALSYM KLF_SHIFTLOCK}
+ KLF_RESET = $40000000;
+ {$EXTERNALSYM KLF_RESET}
+
+//
+// Bits in wParam of WM_INPUTLANGCHANGEREQUEST message
+//
+
+ INPUTLANGCHANGE_SYSCHARSET = $0001;
+ {$EXTERNALSYM INPUTLANGCHANGE_SYSCHARSET}
+ INPUTLANGCHANGE_FORWARD = $0002;
+ {$EXTERNALSYM INPUTLANGCHANGE_FORWARD}
+ INPUTLANGCHANGE_BACKWARD = $0004;
+ {$EXTERNALSYM INPUTLANGCHANGE_BACKWARD}
+
+//
+// Size of KeyboardLayoutName (number of characters), including nul terminator
+//
+
+ KL_NAMELENGTH = 9;
+ {$EXTERNALSYM KL_NAMELENGTH}
+
+function LoadKeyboardLayoutA(pwszKLID: LPCSTR; Flags: UINT): HKL; stdcall;
+{$EXTERNALSYM LoadKeyboardLayoutA}
+function LoadKeyboardLayoutW(pwszKLID: LPCWSTR; Flags: UINT): HKL; stdcall;
+{$EXTERNALSYM LoadKeyboardLayoutW}
+function LoadKeyboardLayout(pwszKLID: LPCTSTR; Flags: UINT): HKL; stdcall;
+{$EXTERNALSYM LoadKeyboardLayout}
+
+function ActivateKeyboardLayout(hkl: HKL; Flags: UINT): HKL; stdcall;
+{$EXTERNALSYM ActivateKeyboardLayout}
+
+function ToUnicodeEx(wVirtKey, wScanCode: UINT; lpKeyState: PBYTE;
+ pwszBuff: LPWSTR; cchBuff: Integer; wFlags: UINT; dwhkl: HKL): Integer; stdcall;
+{$EXTERNALSYM ToUnicodeEx}
+
+function UnloadKeyboardLayout(hkl: HKL): BOOL; stdcall;
+{$EXTERNALSYM UnloadKeyboardLayout}
+
+function GetKeyboardLayoutNameA(pwszKLID: LPSTR): BOOL; stdcall;
+{$EXTERNALSYM GetKeyboardLayoutNameA}
+function GetKeyboardLayoutNameW(pwszKLID: LPWSTR): BOOL; stdcall;
+{$EXTERNALSYM GetKeyboardLayoutNameW}
+function GetKeyboardLayoutName(pwszKLID: LPTSTR): BOOL; stdcall;
+{$EXTERNALSYM GetKeyboardLayoutName}
+
+function GetKeyboardLayoutList(nBuff: Integer; lpList: PHKL): Integer; stdcall;
+{$EXTERNALSYM GetKeyboardLayoutList}
+
+function GetKeyboardLayout(idThread: DWORD): HKL; stdcall;
+{$EXTERNALSYM GetKeyboardLayout}
+
+type
+ LPMOUSEMOVEPOINT = ^MOUSEMOVEPOINT;
+ {$EXTERNALSYM LPMOUSEMOVEPOINT}
+ tagMOUSEMOVEPOINT = record
+ x: Integer;
+ y: Integer;
+ time: DWORD;
+ dwExtraInfo: ULONG_PTR;
+ end;
+ {$EXTERNALSYM tagMOUSEMOVEPOINT}
+ MOUSEMOVEPOINT = tagMOUSEMOVEPOINT;
+ {$EXTERNALSYM MOUSEMOVEPOINT}
+ TMouseMovePoint = MOUSEMOVEPOINT;
+ PMouseMovePoint = LPMOUSEMOVEPOINT;
+
+//
+// Values for resolution parameter of GetMouseMovePointsEx
+//
+
+const
+ GMMP_USE_DISPLAY_POINTS = 1;
+ {$EXTERNALSYM GMMP_USE_DISPLAY_POINTS}
+ GMMP_USE_HIGH_RESOLUTION_POINTS = 2;
+ {$EXTERNALSYM GMMP_USE_HIGH_RESOLUTION_POINTS}
+
+function GetMouseMovePointsEx(cbSize: UINT; lppt, lpptBuf: LPMOUSEMOVEPOINT;
+ nBufPoints: Integer; resolution: DWORD): Integer; stdcall;
+{$EXTERNALSYM GetMouseMovePointsEx}
+
+//
+// Desktop-specific access flags
+//
+
+const
+ DESKTOP_READOBJECTS = $0001;
+ {$EXTERNALSYM DESKTOP_READOBJECTS}
+ DESKTOP_CREATEWINDOW = $0002;
+ {$EXTERNALSYM DESKTOP_CREATEWINDOW}
+ DESKTOP_CREATEMENU = $0004;
+ {$EXTERNALSYM DESKTOP_CREATEMENU}
+ DESKTOP_HOOKCONTROL = $0008;
+ {$EXTERNALSYM DESKTOP_HOOKCONTROL}
+ DESKTOP_JOURNALRECORD = $0010;
+ {$EXTERNALSYM DESKTOP_JOURNALRECORD}
+ DESKTOP_JOURNALPLAYBACK = $0020;
+ {$EXTERNALSYM DESKTOP_JOURNALPLAYBACK}
+ DESKTOP_ENUMERATE = $0040;
+ {$EXTERNALSYM DESKTOP_ENUMERATE}
+ DESKTOP_WRITEOBJECTS = $0080;
+ {$EXTERNALSYM DESKTOP_WRITEOBJECTS}
+ DESKTOP_SWITCHDESKTOP = $0100;
+ {$EXTERNALSYM DESKTOP_SWITCHDESKTOP}
+
+//
+// Desktop-specific control flags
+//
+
+ DF_ALLOWOTHERACCOUNTHOOK = $0001;
+ {$EXTERNALSYM DF_ALLOWOTHERACCOUNTHOOK}
+
+function CreateDesktopA(lpszDesktop, lpszDevice: LPCSTR; pDevmode: LPDEVMODEA;
+ dwFlags: DWORD; dwDesiredAccess: ACCESS_MASK; lpsa: LPSECURITY_ATTRIBUTES): HDESK; stdcall;
+{$EXTERNALSYM CreateDesktopA}
+function CreateDesktopW(lpszDesktop, lpszDevice: LPCWSTR; pDevmode: LPDEVMODEW;
+ dwFlags: DWORD; dwDesiredAccess: ACCESS_MASK; lpsa: LPSECURITY_ATTRIBUTES): HDESK; stdcall;
+{$EXTERNALSYM CreateDesktopW}
+function CreateDesktop(lpszDesktop, lpszDevice: LPCTSTR; pDevmode: LPDEVMODE;
+ dwFlags: DWORD; dwDesiredAccess: ACCESS_MASK; lpsa: LPSECURITY_ATTRIBUTES): HDESK; stdcall;
+{$EXTERNALSYM CreateDesktop}
+
+function OpenDesktopA(lpszDesktop: LPCSTR; dwFlags: DWORD; fInherit: BOOL;
+ dwDesiredAccess: ACCESS_MASK): HDESK; stdcall;
+{$EXTERNALSYM OpenDesktopA}
+function OpenDesktopW(lpszDesktop: LPCWSTR; dwFlags: DWORD; fInherit: BOOL;
+ dwDesiredAccess: ACCESS_MASK): HDESK; stdcall;
+{$EXTERNALSYM OpenDesktopW}
+function OpenDesktop(lpszDesktop: LPCTSTR; dwFlags: DWORD; fInherit: BOOL;
+ dwDesiredAccess: ACCESS_MASK): HDESK; stdcall;
+{$EXTERNALSYM OpenDesktop}
+
+function OpenInputDesktop(dwFlags: DWORD; fInherit: BOOL;
+ dwDesiredAccess: ACCESS_MASK): HDESK; stdcall;
+{$EXTERNALSYM OpenInputDesktop}
+
+function EnumDesktopsA(hwinsta: HWINSTA; lpEnumFunc: DESKTOPENUMPROCA;
+ lParam: LPARAM): BOOL; stdcall;
+{$EXTERNALSYM EnumDesktopsA}
+function EnumDesktopsW(hwinsta: HWINSTA; lpEnumFunc: DESKTOPENUMPROCW;
+ lParam: LPARAM): BOOL; stdcall;
+{$EXTERNALSYM EnumDesktopsW}
+function EnumDesktops(hwinsta: HWINSTA; lpEnumFunc: DESKTOPENUMPROC;
+ lParam: LPARAM): BOOL; stdcall;
+{$EXTERNALSYM EnumDesktops}
+
+function EnumDesktopWindows(hDesktop: HDESK; lpfn: WNDENUMPROC; lParam: LPARAM): BOOL; stdcall;
+{$EXTERNALSYM EnumDesktopWindows}
+
+function SwitchDesktop(hDesktop: HDESK): BOOL; stdcall;
+{$EXTERNALSYM SwitchDesktop}
+
+function SetThreadDesktop(hDesktop: HDESK): BOOL; stdcall;
+{$EXTERNALSYM SetThreadDesktop}
+
+function CloseDesktop(hDesktop: HDESK): BOOL; stdcall;
+{$EXTERNALSYM CloseDesktop}
+
+function GetThreadDesktop(dwThreadId: DWORD): HDESK; stdcall;
+{$EXTERNALSYM GetThreadDesktop}
+
+//
+// Windowstation-specific access flags
+//
+
+const
+ WINSTA_ENUMDESKTOPS = $0001;
+ {$EXTERNALSYM WINSTA_ENUMDESKTOPS}
+ WINSTA_READATTRIBUTES = $0002;
+ {$EXTERNALSYM WINSTA_READATTRIBUTES}
+ WINSTA_ACCESSCLIPBOARD = $0004;
+ {$EXTERNALSYM WINSTA_ACCESSCLIPBOARD}
+ WINSTA_CREATEDESKTOP = $0008;
+ {$EXTERNALSYM WINSTA_CREATEDESKTOP}
+ WINSTA_WRITEATTRIBUTES = $0010;
+ {$EXTERNALSYM WINSTA_WRITEATTRIBUTES}
+ WINSTA_ACCESSGLOBALATOMS = $0020;
+ {$EXTERNALSYM WINSTA_ACCESSGLOBALATOMS}
+ WINSTA_EXITWINDOWS = $0040;
+ {$EXTERNALSYM WINSTA_EXITWINDOWS}
+ WINSTA_ENUMERATE = $0100;
+ {$EXTERNALSYM WINSTA_ENUMERATE}
+ WINSTA_READSCREEN = $0200;
+ {$EXTERNALSYM WINSTA_READSCREEN}
+
+ WINSTA_ALL_ACCESS = (WINSTA_ENUMDESKTOPS or WINSTA_READATTRIBUTES or WINSTA_ACCESSCLIPBOARD or
+ WINSTA_CREATEDESKTOP or WINSTA_WRITEATTRIBUTES or WINSTA_ACCESSGLOBALATOMS or
+ WINSTA_EXITWINDOWS or WINSTA_ENUMERATE or WINSTA_READSCREEN);
+ {$EXTERNALSYM WINSTA_ALL_ACCESS}
+
+//
+// Windowstation creation flags.
+//
+
+ CWF_CREATE_ONLY = $0001;
+ {$EXTERNALSYM CWF_CREATE_ONLY}
+
+//
+// Windowstation-specific attribute flags
+//
+
+ WSF_VISIBLE = $0001;
+ {$EXTERNALSYM WSF_VISIBLE}
+
+function CreateWindowStationA(lpwinsta: LPCSTR; dwFlags: DWORD;
+ dwDesiredAccess: ACCESS_MASK; lpsa: LPSECURITY_ATTRIBUTES): HWINSTA; stdcall;
+{$EXTERNALSYM CreateWindowStationA}
+function CreateWindowStationW(lpwinsta: LPCWSTR; dwFlags: DWORD;
+ dwDesiredAccess: ACCESS_MASK; lpsa: LPSECURITY_ATTRIBUTES): HWINSTA; stdcall;
+{$EXTERNALSYM CreateWindowStationW}
+function CreateWindowStation(lpwinsta: LPCTSTR; dwFlags: DWORD;
+ dwDesiredAccess: ACCESS_MASK; lpsa: LPSECURITY_ATTRIBUTES): HWINSTA; stdcall;
+{$EXTERNALSYM CreateWindowStation}
+
+function OpenWindowStationA(lpszWinSta: LPCSTR; fInherit: BOOL;
+ dwDesiredAccess: ACCESS_MASK): HWINSTA; stdcall;
+{$EXTERNALSYM OpenWindowStationA}
+function OpenWindowStationW(lpszWinSta: LPCWSTR; fInherit: BOOL;
+ dwDesiredAccess: ACCESS_MASK): HWINSTA; stdcall;
+{$EXTERNALSYM OpenWindowStationW}
+function OpenWindowStation(lpszWinSta: LPCTSTR; fInherit: BOOL;
+ dwDesiredAccess: ACCESS_MASK): HWINSTA; stdcall;
+{$EXTERNALSYM OpenWindowStation}
+
+function EnumWindowStationsA(lpEnumFunc: WINSTAENUMPROCA; lParam: LPARAM): BOOL; stdcall;
+{$EXTERNALSYM EnumWindowStationsA}
+function EnumWindowStationsW(lpEnumFunc: WINSTAENUMPROCW; lParam: LPARAM): BOOL; stdcall;
+{$EXTERNALSYM EnumWindowStationsW}
+function EnumWindowStations(lpEnumFunc: WINSTAENUMPROC; lParam: LPARAM): BOOL; stdcall;
+{$EXTERNALSYM EnumWindowStations}
+
+function CloseWindowStation(hWinSta: HWINSTA): BOOL; stdcall;
+{$EXTERNALSYM CloseWindowStation}
+
+function SetProcessWindowStation(hWinSta: HWINSTA): BOOL; stdcall;
+{$EXTERNALSYM SetProcessWindowStation}
+
+function GetProcessWindowStation: HWINSTA; stdcall;
+{$EXTERNALSYM GetProcessWindowStation}
+
+function SetUserObjectSecurity(hObj: HANDLE; var pSIRequested: SECURITY_INFORMATION;
+ pSID: PSECURITY_DESCRIPTOR): BOOL; stdcall;
+{$EXTERNALSYM SetUserObjectSecurity}
+
+function GetUserObjectSecurity(hObj: HANDLE; var pSIRequested: SECURITY_INFORMATION;
+ pSID: PSECURITY_DESCRIPTOR; nLength: DWORD; var lpnLengthNeeded: DWORD): BOOL; stdcall;
+{$EXTERNALSYM GetUserObjectSecurity}
+
+const
+ UOI_FLAGS = 1;
+ {$EXTERNALSYM UOI_FLAGS}
+ UOI_NAME = 2;
+ {$EXTERNALSYM UOI_NAME}
+ UOI_TYPE = 3;
+ {$EXTERNALSYM UOI_TYPE}
+ UOI_USER_SID = 4;
+ {$EXTERNALSYM UOI_USER_SID}
+
+type
+ PUSEROBJECTFLAGS = ^USEROBJECTFLAGS;
+ tagUSEROBJECTFLAGS = record
+ fInherit: BOOL;
+ fReserved: BOOL;
+ dwFlags: DWORD;
+ end;
+ {$EXTERNALSYM tagUSEROBJECTFLAGS}
+ USEROBJECTFLAGS = tagUSEROBJECTFLAGS;
+ {$EXTERNALSYM USEROBJECTFLAGS}
+ TUserObjectFlags = USEROBJECTFLAGS;
+
+function GetUserObjectInformationA(hObj: HANDLE; nIndex: Integer; pvInfo: PVOID;
+ nLength: DWORD; var lpnLengthNeeded: DWORD): BOOL; stdcall;
+{$EXTERNALSYM GetUserObjectInformationA}
+function GetUserObjectInformationW(hObj: HANDLE; nIndex: Integer; pvInfo: PVOID;
+ nLength: DWORD; var lpnLengthNeeded: DWORD): BOOL; stdcall;
+{$EXTERNALSYM GetUserObjectInformationW}
+function GetUserObjectInformation(hObj: HANDLE; nIndex: Integer; pvInfo: PVOID;
+ nLength: DWORD; var lpnLengthNeeded: DWORD): BOOL; stdcall;
+{$EXTERNALSYM GetUserObjectInformation}
+
+function SetUserObjectInformationA(hObj: HANDLE; nIndex: Integer; pvInfo: PVOID;
+ nLength: DWORD): BOOL; stdcall;
+{$EXTERNALSYM SetUserObjectInformationA}
+function SetUserObjectInformationW(hObj: HANDLE; nIndex: Integer; pvInfo: PVOID;
+ nLength: DWORD): BOOL; stdcall;
+{$EXTERNALSYM SetUserObjectInformationW}
+function SetUserObjectInformation(hObj: HANDLE; nIndex: Integer; pvInfo: PVOID;
+ nLength: DWORD): BOOL; stdcall;
+{$EXTERNALSYM SetUserObjectInformation}
+
+type
+ LPWNDCLASSEXA = ^WNDCLASSEXA;
+ {$EXTERNALSYM LPWNDCLASSEXA}
+ tagWNDCLASSEXA = record
+ cbSize: UINT;
+ // Win 3.x
+ style: UINT;
+ lpfnWndProc: WNDPROC;
+ cbClsExtra: Integer;
+ cbWndExtra: Integer;
+ hInstance: HINSTANCE;
+ hIcon: HICON;
+ hCursor: HCURSOR;
+ hbrBackground: HBRUSH;
+ lpszMenuName: LPCSTR;
+ lpszClassName: LPCSTR;
+ // Win 4.0
+ hIconSm: HICON;
+ end;
+ {$EXTERNALSYM tagWNDCLASSEXA}
+ WNDCLASSEXA = tagWNDCLASSEXA;
+ {$EXTERNALSYM WNDCLASSEXA}
+ NPWNDCLASSEXA = ^WNDCLASSEXA;
+ {$EXTERNALSYM NPWNDCLASSEXA}
+ TWndClassExA = WNDCLASSEXA;
+ PWndClassExA = LPWNDCLASSEXA;
+
+ LPWNDCLASSEXW = ^WNDCLASSEXW;
+ {$EXTERNALSYM LPWNDCLASSEXW}
+ tagWNDCLASSEXW = record
+ cbSize: UINT;
+ // Win 3.x
+ style: UINT;
+ lpfnWndProc: WNDPROC;
+ cbClsExtra: Integer;
+ cbWndExtra: Integer;
+ hInstance: HINSTANCE;
+ hIcon: HICON;
+ hCursor: HCURSOR;
+ hbrBackground: HBRUSH;
+ lpszMenuName: LPCWSTR;
+ lpszClassName: LPCWSTR;
+ // Win 4.0
+ hIconSm: HICON;
+ end;
+ {$EXTERNALSYM tagWNDCLASSEXW}
+ WNDCLASSEXW = tagWNDCLASSEXW;
+ {$EXTERNALSYM WNDCLASSEXW}
+ NPWNDCLASSEXW = ^WNDCLASSEXW;
+ {$EXTERNALSYM NPWNDCLASSEXW}
+ TWndClassExW = WNDCLASSEXW;
+ PWndClassExW = LPWNDCLASSEXW;
+
+ {$IFDEF UNICODE}
+ WNDCLASSEX = WNDCLASSEXW;
+ {$EXTERNALSYM WNDCLASSEX}
+ NPWNDCLASSEX = NPWNDCLASSEXW;
+ {$EXTERNALSYM NPWNDCLASSEX}
+ LPWNDCLASSEX = LPWNDCLASSEXW;
+ {$EXTERNALSYM LPWNDCLASSEX}
+ TWndClassEx = TWndClassExW;
+ PWndClassEx = PWndClassExW;
+ {$ELSE}
+ WNDCLASSEX = WNDCLASSEXA;
+ {$EXTERNALSYM WNDCLASSEX}
+ NPWNDCLASSEX = NPWNDCLASSEXA;
+ {$EXTERNALSYM NPWNDCLASSEX}
+ LPWNDCLASSEX = LPWNDCLASSEXA;
+ {$EXTERNALSYM LPWNDCLASSEX}
+ TWndClassEx = TWndClassExA;
+ PWndClassEx = PWndClassExA;
+ {$ENDIF UNICODE}
+
+ LPWNDCLASSA = ^WNDCLASSA;
+ {$EXTERNALSYM LPWNDCLASSA}
+ tagWNDCLASSA = record
+ style: UINT;
+ lpfnWndProc: WNDPROC;
+ cbClsExtra: Integer;
+ cbWndExtra: Integer;
+ hInstance: HINSTANCE;
+ hIcon: HICON;
+ hCursor: HCURSOR;
+ hbrBackground: HBRUSH;
+ lpszMenuName: LPCSTR;
+ lpszClassName: LPCSTR;
+ end;
+ {$EXTERNALSYM tagWNDCLASSA}
+ WNDCLASSA = tagWNDCLASSA;
+ {$EXTERNALSYM WNDCLASSA}
+ NPWNDCLASSA = ^WNDCLASSA;
+ {$EXTERNALSYM NPWNDCLASSA}
+ TWndClassA = WNDCLASSA;
+ PWndClassA = LPWNDCLASSA;
+
+ LPWNDCLASSW = ^WNDCLASSW;
+ {$EXTERNALSYM LPWNDCLASSW}
+ tagWNDCLASSW = record
+ style: UINT;
+ lpfnWndProc: WNDPROC;
+ cbClsExtra: Integer;
+ cbWndExtra: Integer;
+ hInstance: HINSTANCE;
+ hIcon: HICON;
+ hCursor: HCURSOR;
+ hbrBackground: HBRUSH;
+ lpszMenuName: LPCWSTR;
+ lpszClassName: LPCWSTR;
+ end;
+ {$EXTERNALSYM tagWNDCLASSW}
+ WNDCLASSW = tagWNDCLASSW;
+ {$EXTERNALSYM WNDCLASSW}
+ NPWNDCLASSW = ^WNDCLASSW;
+ {$EXTERNALSYM NPWNDCLASSW}
+ TWndClassW = WNDCLASSW;
+ PWndClassW = LPWNDCLASSW;
+
+ {$IFDEF UNICODE}
+ WNDCLASS = WNDCLASSW;
+ {$EXTERNALSYM WNDCLASS}
+ NPWNDCLASS = NPWNDCLASSW;
+ {$EXTERNALSYM NPWNDCLASS}
+ LPWNDCLASS = LPWNDCLASSW;
+ {$EXTERNALSYM LPWNDCLASS}
+ TWndClass = TWndClassW;
+ PWndClass = PWndClassW;
+ {$ELSE}
+ WNDCLASS = WNDCLASSA;
+ {$EXTERNALSYM WNDCLASS}
+ NPWNDCLASS = NPWNDCLASSA;
+ {$EXTERNALSYM NPWNDCLASS}
+ LPWNDCLASS = LPWNDCLASSA;
+ {$EXTERNALSYM LPWNDCLASS}
+ TWndClass = TWndClassA;
+ PWndClass = PWndClassA;
+ {$ENDIF UNICODE}
+
+function IsHungAppWindow(hwnd: HWND): BOOL; stdcall;
+{$EXTERNALSYM IsHungAppWindow}
+
+procedure DisableProcessWindowsGhosting; stdcall;
+{$EXTERNALSYM DisableProcessWindowsGhosting}
+
+//
+// Message structure
+//
+
+type
+ LPMSG = ^MSG;
+ {$EXTERNALSYM LPMSG}
+ tagMSG = record
+ hwnd: HWND;
+ message: UINT;
+ wParam: WPARAM;
+ lParam: LPARAM;
+ time: DWORD;
+ pt: POINT;
+ end;
+ {$EXTERNALSYM tagMSG}
+ MSG = tagMSG;
+ {$EXTERNALSYM MSG}
+ NPMSG = ^MSG;
+ {$EXTERNALSYM NPMSG}
+ TMsg = MSG;
+ PMsg = LPMSG;
+
+function MAKEWPARAM(wLow, wHigh: WORD): WPARAM;
+{$EXTERNALSYM MAKEWPARAM}
+
+function MAKELPARAM(wLow, wHigh: WORD): LPARAM;
+{$EXTERNALSYM MAKELPARAM}
+
+function MAKELRESULT(wLow, wHigh: WORD): LRESULT;
+{$EXTERNALSYM MAKELRESULT}
+
+//
+// Window field offsets for GetWindowLong()
+//
+
+const
+ GWL_WNDPROC = -4;
+ {$EXTERNALSYM GWL_WNDPROC}
+ GWL_HINSTANCE = -6;
+ {$EXTERNALSYM GWL_HINSTANCE}
+ GWL_HWNDPARENT = -8;
+ {$EXTERNALSYM GWL_HWNDPARENT}
+ GWL_STYLE = -16;
+ {$EXTERNALSYM GWL_STYLE}
+ GWL_EXSTYLE = -20;
+ {$EXTERNALSYM GWL_EXSTYLE}
+ GWL_USERDATA = -21;
+ {$EXTERNALSYM GWL_USERDATA}
+ GWL_ID = -12;
+ {$EXTERNALSYM GWL_ID}
+
+ GWLP_WNDPROC = -4;
+ {$EXTERNALSYM GWLP_WNDPROC}
+ GWLP_HINSTANCE = -6;
+ {$EXTERNALSYM GWLP_HINSTANCE}
+ GWLP_HWNDPARENT = -8;
+ {$EXTERNALSYM GWLP_HWNDPARENT}
+ GWLP_USERDATA = -21;
+ {$EXTERNALSYM GWLP_USERDATA}
+ GWLP_ID = -12;
+ {$EXTERNALSYM GWLP_ID}
+
+//
+// Class field offsets for GetClassLong()
+//
+
+ GCL_MENUNAME = DWORD(-8);
+ {$EXTERNALSYM GCL_MENUNAME}
+ GCL_HBRBACKGROUND = DWORD(-10);
+ {$EXTERNALSYM GCL_HBRBACKGROUND}
+ GCL_HCURSOR = DWORD(-12);
+ {$EXTERNALSYM GCL_HCURSOR}
+ GCL_HICON = DWORD(-14);
+ {$EXTERNALSYM GCL_HICON}
+ GCL_HMODULE = DWORD(-16);
+ {$EXTERNALSYM GCL_HMODULE}
+ GCL_CBWNDEXTRA = DWORD(-18);
+ {$EXTERNALSYM GCL_CBWNDEXTRA}
+ GCL_CBCLSEXTRA = DWORD(-20);
+ {$EXTERNALSYM GCL_CBCLSEXTRA}
+ GCL_WNDPROC = DWORD(-24);
+ {$EXTERNALSYM GCL_WNDPROC}
+ GCL_STYLE = DWORD(-26);
+ {$EXTERNALSYM GCL_STYLE}
+ GCW_ATOM = DWORD(-32);
+ {$EXTERNALSYM GCW_ATOM}
+
+ GCL_HICONSM = DWORD(-34);
+ {$EXTERNALSYM GCL_HICONSM}
+
+ GCLP_MENUNAME = DWORD(-8);
+ {$EXTERNALSYM GCLP_MENUNAME}
+ GCLP_HBRBACKGROUND = DWORD(-10);
+ {$EXTERNALSYM GCLP_HBRBACKGROUND}
+ GCLP_HCURSOR = DWORD(-12);
+ {$EXTERNALSYM GCLP_HCURSOR}
+ GCLP_HICON = DWORD(-14);
+ {$EXTERNALSYM GCLP_HICON}
+ GCLP_HMODULE = DWORD(-16);
+ {$EXTERNALSYM GCLP_HMODULE}
+ GCLP_WNDPROC = DWORD(-24);
+ {$EXTERNALSYM GCLP_WNDPROC}
+ GCLP_HICONSM = DWORD(-34);
+ {$EXTERNALSYM GCLP_HICONSM}
+
+//
+// Window Messages
+//
+
+ WM_NULL = $0000;
+ {$EXTERNALSYM WM_NULL}
+ WM_CREATE = $0001;
+ {$EXTERNALSYM WM_CREATE}
+ WM_DESTROY = $0002;
+ {$EXTERNALSYM WM_DESTROY}
+ WM_MOVE = $0003;
+ {$EXTERNALSYM WM_MOVE}
+ WM_SIZE = $0005;
+ {$EXTERNALSYM WM_SIZE}
+
+ WM_ACTIVATE = $0006;
+ {$EXTERNALSYM WM_ACTIVATE}
+
+//
+// WM_ACTIVATE state values
+//
+
+ WA_INACTIVE = 0;
+ {$EXTERNALSYM WA_INACTIVE}
+ WA_ACTIVE = 1;
+ {$EXTERNALSYM WA_ACTIVE}
+ WA_CLICKACTIVE = 2;
+ {$EXTERNALSYM WA_CLICKACTIVE}
+
+ WM_SETFOCUS = $0007;
+ {$EXTERNALSYM WM_SETFOCUS}
+ WM_KILLFOCUS = $0008;
+ {$EXTERNALSYM WM_KILLFOCUS}
+ WM_ENABLE = $000A;
+ {$EXTERNALSYM WM_ENABLE}
+ WM_SETREDRAW = $000B;
+ {$EXTERNALSYM WM_SETREDRAW}
+ WM_SETTEXT = $000C;
+ {$EXTERNALSYM WM_SETTEXT}
+ WM_GETTEXT = $000D;
+ {$EXTERNALSYM WM_GETTEXT}
+ WM_GETTEXTLENGTH = $000E;
+ {$EXTERNALSYM WM_GETTEXTLENGTH}
+ WM_PAINT = $000F;
+ {$EXTERNALSYM WM_PAINT}
+ WM_CLOSE = $0010;
+ {$EXTERNALSYM WM_CLOSE}
+ WM_QUERYENDSESSION = $0011;
+ {$EXTERNALSYM WM_QUERYENDSESSION}
+ WM_QUERYOPEN = $0013;
+ {$EXTERNALSYM WM_QUERYOPEN}
+ WM_ENDSESSION = $0016;
+ {$EXTERNALSYM WM_ENDSESSION}
+ WM_QUIT = $0012;
+ {$EXTERNALSYM WM_QUIT}
+ WM_ERASEBKGND = $0014;
+ {$EXTERNALSYM WM_ERASEBKGND}
+ WM_SYSCOLORCHANGE = $0015;
+ {$EXTERNALSYM WM_SYSCOLORCHANGE}
+ WM_SHOWWINDOW = $0018;
+ {$EXTERNALSYM WM_SHOWWINDOW}
+ WM_WININICHANGE = $001A;
+ {$EXTERNALSYM WM_WININICHANGE}
+ WM_SETTINGCHANGE = WM_WININICHANGE;
+ {$EXTERNALSYM WM_SETTINGCHANGE}
+
+ WM_DEVMODECHANGE = $001B;
+ {$EXTERNALSYM WM_DEVMODECHANGE}
+ WM_ACTIVATEAPP = $001C;
+ {$EXTERNALSYM WM_ACTIVATEAPP}
+ WM_FONTCHANGE = $001D;
+ {$EXTERNALSYM WM_FONTCHANGE}
+ WM_TIMECHANGE = $001E;
+ {$EXTERNALSYM WM_TIMECHANGE}
+ WM_CANCELMODE = $001F;
+ {$EXTERNALSYM WM_CANCELMODE}
+ WM_SETCURSOR = $0020;
+ {$EXTERNALSYM WM_SETCURSOR}
+ WM_MOUSEACTIVATE = $0021;
+ {$EXTERNALSYM WM_MOUSEACTIVATE}
+ WM_CHILDACTIVATE = $0022;
+ {$EXTERNALSYM WM_CHILDACTIVATE}
+ WM_QUEUESYNC = $0023;
+ {$EXTERNALSYM WM_QUEUESYNC}
+
+ WM_GETMINMAXINFO = $0024;
+ {$EXTERNALSYM WM_GETMINMAXINFO}
+
+//
+// Struct pointed to by WM_GETMINMAXINFO lParam
+//
+
+type
+ LPMINMAXINFO = ^MINMAXINFO;
+ {$EXTERNALSYM LPMINMAXINFO}
+ tagMINMAXINFO = record
+ ptReserved: POINT;
+ ptMaxSize: POINT;
+ ptMaxPosition: POINT;
+ ptMinTrackSize: POINT;
+ ptMaxTrackSize: POINT;
+ end;
+ {$EXTERNALSYM tagMINMAXINFO}
+ MINMAXINFO = tagMINMAXINFO;
+ {$EXTERNALSYM MINMAXINFO}
+ TMinMaxInfo = MINMAXINFO;
+ PMinMaxInfo = LPMINMAXINFO;
+
+const
+ WM_PAINTICON = $0026;
+ {$EXTERNALSYM WM_PAINTICON}
+ WM_ICONERASEBKGND = $0027;
+ {$EXTERNALSYM WM_ICONERASEBKGND}
+ WM_NEXTDLGCTL = $0028;
+ {$EXTERNALSYM WM_NEXTDLGCTL}
+ WM_SPOOLERSTATUS = $002A;
+ {$EXTERNALSYM WM_SPOOLERSTATUS}
+ WM_DRAWITEM = $002B;
+ {$EXTERNALSYM WM_DRAWITEM}
+ WM_MEASUREITEM = $002C;
+ {$EXTERNALSYM WM_MEASUREITEM}
+ WM_DELETEITEM = $002D;
+ {$EXTERNALSYM WM_DELETEITEM}
+ WM_VKEYTOITEM = $002E;
+ {$EXTERNALSYM WM_VKEYTOITEM}
+ WM_CHARTOITEM = $002F;
+ {$EXTERNALSYM WM_CHARTOITEM}
+ WM_SETFONT = $0030;
+ {$EXTERNALSYM WM_SETFONT}
+ WM_GETFONT = $0031;
+ {$EXTERNALSYM WM_GETFONT}
+ WM_SETHOTKEY = $0032;
+ {$EXTERNALSYM WM_SETHOTKEY}
+ WM_GETHOTKEY = $0033;
+ {$EXTERNALSYM WM_GETHOTKEY}
+ WM_QUERYDRAGICON = $0037;
+ {$EXTERNALSYM WM_QUERYDRAGICON}
+ WM_COMPAREITEM = $0039;
+ {$EXTERNALSYM WM_COMPAREITEM}
+ WM_GETOBJECT = $003D;
+ {$EXTERNALSYM WM_GETOBJECT}
+ WM_COMPACTING = $0041;
+ {$EXTERNALSYM WM_COMPACTING}
+ WM_COMMNOTIFY = $0044; // no longer suported
+ {$EXTERNALSYM WM_COMMNOTIFY}
+ WM_WINDOWPOSCHANGING = $0046;
+ {$EXTERNALSYM WM_WINDOWPOSCHANGING}
+ WM_WINDOWPOSCHANGED = $0047;
+ {$EXTERNALSYM WM_WINDOWPOSCHANGED}
+
+ WM_POWER = $0048;
+ {$EXTERNALSYM WM_POWER}
+
+//
+// wParam for WM_POWER window message and DRV_POWER driver notification
+//
+
+ PWR_OK = 1;
+ {$EXTERNALSYM PWR_OK}
+ PWR_FAIL = DWORD(-1);
+ {$EXTERNALSYM PWR_FAIL}
+ PWR_SUSPENDREQUEST = 1;
+ {$EXTERNALSYM PWR_SUSPENDREQUEST}
+ PWR_SUSPENDRESUME = 2;
+ {$EXTERNALSYM PWR_SUSPENDRESUME}
+ PWR_CRITICALRESUME = 3;
+ {$EXTERNALSYM PWR_CRITICALRESUME}
+
+ WM_COPYDATA = $004A;
+ {$EXTERNALSYM WM_COPYDATA}
+ WM_CANCELJOURNAL = $004B;
+ {$EXTERNALSYM WM_CANCELJOURNAL}
+
+//
+// lParam of WM_COPYDATA message points to...
+//
+
+type
+ PCOPYDATASTRUCT = ^COPYDATASTRUCT;
+ tagCOPYDATASTRUCT = record
+ dwData: ULONG_PTR;
+ cbData: DWORD;
+ lpData: PVOID;
+ end;
+ {$EXTERNALSYM tagCOPYDATASTRUCT}
+ COPYDATASTRUCT = tagCOPYDATASTRUCT;
+ {$EXTERNALSYM COPYDATASTRUCT}
+ TCopyDataStruct = COPYDATASTRUCT;
+
+ LPMDINEXTMENU = ^MDINEXTMENU;
+ {$EXTERNALSYM LPMDINEXTMENU}
+ tagMDINEXTMENU = record
+ hmenuIn: HMENU;
+ hmenuNext: HMENU;
+ hwndNext: HWND;
+ end;
+ {$EXTERNALSYM tagMDINEXTMENU}
+ MDINEXTMENU = tagMDINEXTMENU;
+ {$EXTERNALSYM MDINEXTMENU}
+ TMdiNextMenu = MDINEXTMENU;
+ PMdiNextMenu = LPMDINEXTMENU;
+
+const
+ WM_NOTIFY = $004E;
+ {$EXTERNALSYM WM_NOTIFY}
+ WM_INPUTLANGCHANGEREQUEST = $0050;
+ {$EXTERNALSYM WM_INPUTLANGCHANGEREQUEST}
+ WM_INPUTLANGCHANGE = $0051;
+ {$EXTERNALSYM WM_INPUTLANGCHANGE}
+ WM_TCARD = $0052;
+ {$EXTERNALSYM WM_TCARD}
+ WM_HELP = $0053;
+ {$EXTERNALSYM WM_HELP}
+ WM_USERCHANGED = $0054;
+ {$EXTERNALSYM WM_USERCHANGED}
+ WM_NOTIFYFORMAT = $0055;
+ {$EXTERNALSYM WM_NOTIFYFORMAT}
+
+ NFR_ANSI = 1;
+ {$EXTERNALSYM NFR_ANSI}
+ NFR_UNICODE = 2;
+ {$EXTERNALSYM NFR_UNICODE}
+ NF_QUERY = 3;
+ {$EXTERNALSYM NF_QUERY}
+ NF_REQUERY = 4;
+ {$EXTERNALSYM NF_REQUERY}
+
+ WM_CONTEXTMENU = $007B;
+ {$EXTERNALSYM WM_CONTEXTMENU}
+ WM_STYLECHANGING = $007C;
+ {$EXTERNALSYM WM_STYLECHANGING}
+ WM_STYLECHANGED = $007D;
+ {$EXTERNALSYM WM_STYLECHANGED}
+ WM_DISPLAYCHANGE = $007E;
+ {$EXTERNALSYM WM_DISPLAYCHANGE}
+ WM_GETICON = $007F;
+ {$EXTERNALSYM WM_GETICON}
+ WM_SETICON = $0080;
+ {$EXTERNALSYM WM_SETICON}
+
+ WM_NCCREATE = $0081;
+ {$EXTERNALSYM WM_NCCREATE}
+ WM_NCDESTROY = $0082;
+ {$EXTERNALSYM WM_NCDESTROY}
+ WM_NCCALCSIZE = $0083;
+ {$EXTERNALSYM WM_NCCALCSIZE}
+ WM_NCHITTEST = $0084;
+ {$EXTERNALSYM WM_NCHITTEST}
+ WM_NCPAINT = $0085;
+ {$EXTERNALSYM WM_NCPAINT}
+ WM_NCACTIVATE = $0086;
+ {$EXTERNALSYM WM_NCACTIVATE}
+ WM_GETDLGCODE = $0087;
+ {$EXTERNALSYM WM_GETDLGCODE}
+ WM_SYNCPAINT = $0088;
+ {$EXTERNALSYM WM_SYNCPAINT}
+ WM_NCMOUSEMOVE = $00A0;
+ {$EXTERNALSYM WM_NCMOUSEMOVE}
+ WM_NCLBUTTONDOWN = $00A1;
+ {$EXTERNALSYM WM_NCLBUTTONDOWN}
+ WM_NCLBUTTONUP = $00A2;
+ {$EXTERNALSYM WM_NCLBUTTONUP}
+ WM_NCLBUTTONDBLCLK = $00A3;
+ {$EXTERNALSYM WM_NCLBUTTONDBLCLK}
+ WM_NCRBUTTONDOWN = $00A4;
+ {$EXTERNALSYM WM_NCRBUTTONDOWN}
+ WM_NCRBUTTONUP = $00A5;
+ {$EXTERNALSYM WM_NCRBUTTONUP}
+ WM_NCRBUTTONDBLCLK = $00A6;
+ {$EXTERNALSYM WM_NCRBUTTONDBLCLK}
+ WM_NCMBUTTONDOWN = $00A7;
+ {$EXTERNALSYM WM_NCMBUTTONDOWN}
+ WM_NCMBUTTONUP = $00A8;
+ {$EXTERNALSYM WM_NCMBUTTONUP}
+ WM_NCMBUTTONDBLCLK = $00A9;
+ {$EXTERNALSYM WM_NCMBUTTONDBLCLK}
+
+ WM_NCXBUTTONDOWN = $00AB;
+ {$EXTERNALSYM WM_NCXBUTTONDOWN}
+ WM_NCXBUTTONUP = $00AC;
+ {$EXTERNALSYM WM_NCXBUTTONUP}
+ WM_NCXBUTTONDBLCLK = $00AD;
+ {$EXTERNALSYM WM_NCXBUTTONDBLCLK}
+
+ WM_INPUT = $00FF;
+ {$EXTERNALSYM WM_INPUT}
+
+ WM_KEYFIRST = $0100;
+ {$EXTERNALSYM WM_KEYFIRST}
+ WM_KEYDOWN = $0100;
+ {$EXTERNALSYM WM_KEYDOWN}
+ WM_KEYUP = $0101;
+ {$EXTERNALSYM WM_KEYUP}
+ WM_CHAR = $0102;
+ {$EXTERNALSYM WM_CHAR}
+ WM_DEADCHAR = $0103;
+ {$EXTERNALSYM WM_DEADCHAR}
+ WM_SYSKEYDOWN = $0104;
+ {$EXTERNALSYM WM_SYSKEYDOWN}
+ WM_SYSKEYUP = $0105;
+ {$EXTERNALSYM WM_SYSKEYUP}
+ WM_SYSCHAR = $0106;
+ {$EXTERNALSYM WM_SYSCHAR}
+ WM_SYSDEADCHAR = $0107;
+ {$EXTERNALSYM WM_SYSDEADCHAR}
+ {$IFDEF WINXP_UP}
+ WM_UNICHAR = $0109;
+ {$EXTERNALSYM WM_UNICHAR}
+ WM_KEYLAST = $0109;
+ {$EXTERNALSYM WM_KEYLAST}
+ UNICODE_NOCHAR = $FFFF;
+ {$EXTERNALSYM UNICODE_NOCHAR}
+ {$ELSE}
+ WM_KEYLAST = $0108;
+ {$EXTERNALSYM WM_KEYLAST}
+ {$ENDIF WINXP_UP}
+
+ WM_IME_STARTCOMPOSITION = $010D;
+ {$EXTERNALSYM WM_IME_STARTCOMPOSITION}
+ WM_IME_ENDCOMPOSITION = $010E;
+ {$EXTERNALSYM WM_IME_ENDCOMPOSITION}
+ WM_IME_COMPOSITION = $010F;
+ {$EXTERNALSYM WM_IME_COMPOSITION}
+ WM_IME_KEYLAST = $010F;
+ {$EXTERNALSYM WM_IME_KEYLAST}
+
+ WM_INITDIALOG = $0110;
+ {$EXTERNALSYM WM_INITDIALOG}
+ WM_COMMAND = $0111;
+ {$EXTERNALSYM WM_COMMAND}
+ WM_SYSCOMMAND = $0112;
+ {$EXTERNALSYM WM_SYSCOMMAND}
+ WM_TIMER = $0113;
+ {$EXTERNALSYM WM_TIMER}
+ WM_HSCROLL = $0114;
+ {$EXTERNALSYM WM_HSCROLL}
+ WM_VSCROLL = $0115;
+ {$EXTERNALSYM WM_VSCROLL}
+ WM_INITMENU = $0116;
+ {$EXTERNALSYM WM_INITMENU}
+ WM_INITMENUPOPUP = $0117;
+ {$EXTERNALSYM WM_INITMENUPOPUP}
+ WM_MENUSELECT = $011F;
+ {$EXTERNALSYM WM_MENUSELECT}
+ WM_MENUCHAR = $0120;
+ {$EXTERNALSYM WM_MENUCHAR}
+ WM_ENTERIDLE = $0121;
+ {$EXTERNALSYM WM_ENTERIDLE}
+ WM_MENURBUTTONUP = $0122;
+ {$EXTERNALSYM WM_MENURBUTTONUP}
+ WM_MENUDRAG = $0123;
+ {$EXTERNALSYM WM_MENUDRAG}
+ WM_MENUGETOBJECT = $0124;
+ {$EXTERNALSYM WM_MENUGETOBJECT}
+ WM_UNINITMENUPOPUP = $0125;
+ {$EXTERNALSYM WM_UNINITMENUPOPUP}
+ WM_MENUCOMMAND = $0126;
+ {$EXTERNALSYM WM_MENUCOMMAND}
+
+ WM_CHANGEUISTATE = $0127;
+ {$EXTERNALSYM WM_CHANGEUISTATE}
+ WM_UPDATEUISTATE = $0128;
+ {$EXTERNALSYM WM_UPDATEUISTATE}
+ WM_QUERYUISTATE = $0129;
+ {$EXTERNALSYM WM_QUERYUISTATE}
+
+//
+// LOWORD(wParam) values in WM_*UISTATE*
+//
+
+ UIS_SET = 1;
+ {$EXTERNALSYM UIS_SET}
+ UIS_CLEAR = 2;
+ {$EXTERNALSYM UIS_CLEAR}
+ UIS_INITIALIZE = 3;
+ {$EXTERNALSYM UIS_INITIALIZE}
+
+//
+// HIWORD(wParam) values in WM_*UISTATE*
+//
+
+ UISF_HIDEFOCUS = $1;
+ {$EXTERNALSYM UISF_HIDEFOCUS}
+ UISF_HIDEACCEL = $2;
+ {$EXTERNALSYM UISF_HIDEACCEL}
+ UISF_ACTIVE = $4;
+ {$EXTERNALSYM UISF_ACTIVE}
+
+ WM_CTLCOLORMSGBOX = $0132;
+ {$EXTERNALSYM WM_CTLCOLORMSGBOX}
+ WM_CTLCOLOREDIT = $0133;
+ {$EXTERNALSYM WM_CTLCOLOREDIT}
+ WM_CTLCOLORLISTBOX = $0134;
+ {$EXTERNALSYM WM_CTLCOLORLISTBOX}
+ WM_CTLCOLORBTN = $0135;
+ {$EXTERNALSYM WM_CTLCOLORBTN}
+ WM_CTLCOLORDLG = $0136;
+ {$EXTERNALSYM WM_CTLCOLORDLG}
+ WM_CTLCOLORSCROLLBAR = $0137;
+ {$EXTERNALSYM WM_CTLCOLORSCROLLBAR}
+ WM_CTLCOLORSTATIC = $0138;
+ {$EXTERNALSYM WM_CTLCOLORSTATIC}
+ MN_GETHMENU = $01E1;
+ {$EXTERNALSYM MN_GETHMENU}
+
+ WM_MOUSEFIRST = $0200;
+ {$EXTERNALSYM WM_MOUSEFIRST}
+ WM_MOUSEMOVE = $0200;
+ {$EXTERNALSYM WM_MOUSEMOVE}
+ WM_LBUTTONDOWN = $0201;
+ {$EXTERNALSYM WM_LBUTTONDOWN}
+ WM_LBUTTONUP = $0202;
+ {$EXTERNALSYM WM_LBUTTONUP}
+ WM_LBUTTONDBLCLK = $0203;
+ {$EXTERNALSYM WM_LBUTTONDBLCLK}
+ WM_RBUTTONDOWN = $0204;
+ {$EXTERNALSYM WM_RBUTTONDOWN}
+ WM_RBUTTONUP = $0205;
+ {$EXTERNALSYM WM_RBUTTONUP}
+ WM_RBUTTONDBLCLK = $0206;
+ {$EXTERNALSYM WM_RBUTTONDBLCLK}
+ WM_MBUTTONDOWN = $0207;
+ {$EXTERNALSYM WM_MBUTTONDOWN}
+ WM_MBUTTONUP = $0208;
+ {$EXTERNALSYM WM_MBUTTONUP}
+ WM_MBUTTONDBLCLK = $0209;
+ {$EXTERNALSYM WM_MBUTTONDBLCLK}
+ WM_MOUSEWHEEL = $020A;
+ {$EXTERNALSYM WM_MOUSEWHEEL}
+ WM_XBUTTONDOWN = $020B;
+ {$EXTERNALSYM WM_XBUTTONDOWN}
+ WM_XBUTTONUP = $020C;
+ {$EXTERNALSYM WM_XBUTTONUP}
+ WM_XBUTTONDBLCLK = $020D;
+ {$EXTERNALSYM WM_XBUTTONDBLCLK}
+
+ {$IFDEF WIN2000_UP}
+ WM_MOUSELAST = $020D;
+ {$EXTERNALSYM WM_MOUSELAST}
+ {$ELSE}
+ {$IFDEF WINNT4}
+ WM_MOUSELAST = $020A;
+ {$EXTERNALSYM WM_MOUSELAST}
+ {$ELSE}
+ {$IFDEF WIN95_UP}
+ WM_MOUSELAST = $020A;
+ {$EXTERNALSYM WM_MOUSELAST}
+ {$ELSE}
+ WM_MOUSELAST = $0209;
+ {$EXTERNALSYM WM_MOUSELAST}
+ {$ENDIF WIN95_UP}
+ {$ENDIF WINNT4}
+ {$ENDIF WIN2000_UP}
+
+// Value for rolling one detent//
+
+ WHEEL_DELTA = 120;
+ {$EXTERNALSYM WHEEL_DELTA}
+
+function GET_WHEEL_DELTA_WPARAM(wParam: WPARAM): SHORT;
+{$EXTERNALSYM GET_WHEEL_DELTA_WPARAM(wParam)}
+
+// Setting to scroll one page for SPI_GET/SETWHEELSCROLLLINES//
+
+const
+ WHEEL_PAGESCROLL = UINT_MAX;
+ {$EXTERNALSYM WHEEL_PAGESCROLL}
+
+function GET_KEYSTATE_WPARAM(wParam: WPARAM): Integer;
+{$EXTERNALSYM GET_KEYSTATE_WPARAM}
+function GET_NCHITTEST_WPARAM(wParam: WPARAM): Shortint;
+{$EXTERNALSYM GET_NCHITTEST_WPARAM}
+function GET_XBUTTON_WPARAM(wParam: WPARAM): Integer;
+{$EXTERNALSYM GET_XBUTTON_WPARAM}
+
+// XButton values are WORD flags//
+
+const
+ XBUTTON1 = $0001;
+ {$EXTERNALSYM XBUTTON1}
+ XBUTTON2 = $0002;
+ {$EXTERNALSYM XBUTTON2}
+
+// Were there to be an XBUTTON3, it's value would be 0x0004//
+
+ WM_PARENTNOTIFY = $0210;
+ {$EXTERNALSYM WM_PARENTNOTIFY}
+ WM_ENTERMENULOOP = $0211;
+ {$EXTERNALSYM WM_ENTERMENULOOP}
+ WM_EXITMENULOOP = $0212;
+ {$EXTERNALSYM WM_EXITMENULOOP}
+
+ WM_NEXTMENU = $0213;
+ {$EXTERNALSYM WM_NEXTMENU}
+ WM_SIZING = $0214;
+ {$EXTERNALSYM WM_SIZING}
+ WM_CAPTURECHANGED = $0215;
+ {$EXTERNALSYM WM_CAPTURECHANGED}
+ WM_MOVING = $0216;
+ {$EXTERNALSYM WM_MOVING}
+
+ WM_POWERBROADCAST = $0218;
+ {$EXTERNALSYM WM_POWERBROADCAST}
+
+ PBT_APMQUERYSUSPEND = $0000;
+ {$EXTERNALSYM PBT_APMQUERYSUSPEND}
+ PBT_APMQUERYSTANDBY = $0001;
+ {$EXTERNALSYM PBT_APMQUERYSTANDBY}
+
+ PBT_APMQUERYSUSPENDFAILED = $0002;
+ {$EXTERNALSYM PBT_APMQUERYSUSPENDFAILED}
+ PBT_APMQUERYSTANDBYFAILED = $0003;
+ {$EXTERNALSYM PBT_APMQUERYSTANDBYFAILED}
+
+ PBT_APMSUSPEND = $0004;
+ {$EXTERNALSYM PBT_APMSUSPEND}
+ PBT_APMSTANDBY = $0005;
+ {$EXTERNALSYM PBT_APMSTANDBY}
+
+ PBT_APMRESUMECRITICAL = $0006;
+ {$EXTERNALSYM PBT_APMRESUMECRITICAL}
+ PBT_APMRESUMESUSPEND = $0007;
+ {$EXTERNALSYM PBT_APMRESUMESUSPEND}
+ PBT_APMRESUMESTANDBY = $0008;
+ {$EXTERNALSYM PBT_APMRESUMESTANDBY}
+
+ PBTF_APMRESUMEFROMFAILURE = $00000001;
+ {$EXTERNALSYM PBTF_APMRESUMEFROMFAILURE}
+
+ PBT_APMBATTERYLOW = $0009;
+ {$EXTERNALSYM PBT_APMBATTERYLOW}
+ PBT_APMPOWERSTATUSCHANGE = $000A;
+ {$EXTERNALSYM PBT_APMPOWERSTATUSCHANGE}
+
+ PBT_APMOEMEVENT = $000B;
+ {$EXTERNALSYM PBT_APMOEMEVENT}
+ PBT_APMRESUMEAUTOMATIC = $0012;
+ {$EXTERNALSYM PBT_APMRESUMEAUTOMATIC}
+
+ WM_DEVICECHANGE = $0219;
+ {$EXTERNALSYM WM_DEVICECHANGE}
+
+ WM_MDICREATE = $0220;
+ {$EXTERNALSYM WM_MDICREATE}
+ WM_MDIDESTROY = $0221;
+ {$EXTERNALSYM WM_MDIDESTROY}
+ WM_MDIACTIVATE = $0222;
+ {$EXTERNALSYM WM_MDIACTIVATE}
+ WM_MDIRESTORE = $0223;
+ {$EXTERNALSYM WM_MDIRESTORE}
+ WM_MDINEXT = $0224;
+ {$EXTERNALSYM WM_MDINEXT}
+ WM_MDIMAXIMIZE = $0225;
+ {$EXTERNALSYM WM_MDIMAXIMIZE}
+ WM_MDITILE = $0226;
+ {$EXTERNALSYM WM_MDITILE}
+ WM_MDICASCADE = $0227;
+ {$EXTERNALSYM WM_MDICASCADE}
+ WM_MDIICONARRANGE = $0228;
+ {$EXTERNALSYM WM_MDIICONARRANGE}
+ WM_MDIGETACTIVE = $0229;
+ {$EXTERNALSYM WM_MDIGETACTIVE}
+
+ WM_MDISETMENU = $0230;
+ {$EXTERNALSYM WM_MDISETMENU}
+ WM_ENTERSIZEMOVE = $0231;
+ {$EXTERNALSYM WM_ENTERSIZEMOVE}
+ WM_EXITSIZEMOVE = $0232;
+ {$EXTERNALSYM WM_EXITSIZEMOVE}
+ WM_DROPFILES = $0233;
+ {$EXTERNALSYM WM_DROPFILES}
+ WM_MDIREFRESHMENU = $0234;
+ {$EXTERNALSYM WM_MDIREFRESHMENU}
+
+ WM_IME_SETCONTEXT = $0281;
+ {$EXTERNALSYM WM_IME_SETCONTEXT}
+ WM_IME_NOTIFY = $0282;
+ {$EXTERNALSYM WM_IME_NOTIFY}
+ WM_IME_CONTROL = $0283;
+ {$EXTERNALSYM WM_IME_CONTROL}
+ WM_IME_COMPOSITIONFULL = $0284;
+ {$EXTERNALSYM WM_IME_COMPOSITIONFULL}
+ WM_IME_SELECT = $0285;
+ {$EXTERNALSYM WM_IME_SELECT}
+ WM_IME_CHAR = $0286;
+ {$EXTERNALSYM WM_IME_CHAR}
+ WM_IME_REQUEST = $0288;
+ {$EXTERNALSYM WM_IME_REQUEST}
+ WM_IME_KEYDOWN = $0290;
+ {$EXTERNALSYM WM_IME_KEYDOWN}
+ WM_IME_KEYUP = $0291;
+ {$EXTERNALSYM WM_IME_KEYUP}
+
+ WM_MOUSEHOVER = $02A1;
+ {$EXTERNALSYM WM_MOUSEHOVER}
+ WM_MOUSELEAVE = $02A3;
+ {$EXTERNALSYM WM_MOUSELEAVE}
+ WM_NCMOUSEHOVER = $02A0;
+ {$EXTERNALSYM WM_NCMOUSEHOVER}
+ WM_NCMOUSELEAVE = $02A2;
+ {$EXTERNALSYM WM_NCMOUSELEAVE}
+
+ WM_WTSSESSION_CHANGE = $02B1;
+ {$EXTERNALSYM WM_WTSSESSION_CHANGE}
+
+ WM_TABLET_FIRST = $02c0;
+ {$EXTERNALSYM WM_TABLET_FIRST}
+ WM_TABLET_LAST = $02df;
+ {$EXTERNALSYM WM_TABLET_LAST}
+
+ WM_CUT = $0300;
+ {$EXTERNALSYM WM_CUT}
+ WM_COPY = $0301;
+ {$EXTERNALSYM WM_COPY}
+ WM_PASTE = $0302;
+ {$EXTERNALSYM WM_PASTE}
+ WM_CLEAR = $0303;
+ {$EXTERNALSYM WM_CLEAR}
+ WM_UNDO = $0304;
+ {$EXTERNALSYM WM_UNDO}
+ WM_RENDERFORMAT = $0305;
+ {$EXTERNALSYM WM_RENDERFORMAT}
+ WM_RENDERALLFORMATS = $0306;
+ {$EXTERNALSYM WM_RENDERALLFORMATS}
+ WM_DESTROYCLIPBOARD = $0307;
+ {$EXTERNALSYM WM_DESTROYCLIPBOARD}
+ WM_DRAWCLIPBOARD = $0308;
+ {$EXTERNALSYM WM_DRAWCLIPBOARD}
+ WM_PAINTCLIPBOARD = $0309;
+ {$EXTERNALSYM WM_PAINTCLIPBOARD}
+ WM_VSCROLLCLIPBOARD = $030A;
+ {$EXTERNALSYM WM_VSCROLLCLIPBOARD}
+ WM_SIZECLIPBOARD = $030B;
+ {$EXTERNALSYM WM_SIZECLIPBOARD}
+ WM_ASKCBFORMATNAME = $030C;
+ {$EXTERNALSYM WM_ASKCBFORMATNAME}
+ WM_CHANGECBCHAIN = $030D;
+ {$EXTERNALSYM WM_CHANGECBCHAIN}
+ WM_HSCROLLCLIPBOARD = $030E;
+ {$EXTERNALSYM WM_HSCROLLCLIPBOARD}
+ WM_QUERYNEWPALETTE = $030F;
+ {$EXTERNALSYM WM_QUERYNEWPALETTE}
+ WM_PALETTEISCHANGING = $0310;
+ {$EXTERNALSYM WM_PALETTEISCHANGING}
+ WM_PALETTECHANGED = $0311;
+ {$EXTERNALSYM WM_PALETTECHANGED}
+ WM_HOTKEY = $0312;
+ {$EXTERNALSYM WM_HOTKEY}
+
+ WM_PRINT = $0317;
+ {$EXTERNALSYM WM_PRINT}
+ WM_PRINTCLIENT = $0318;
+ {$EXTERNALSYM WM_PRINTCLIENT}
+
+ WM_APPCOMMAND = $0319;
+ {$EXTERNALSYM WM_APPCOMMAND}
+
+ WM_THEMECHANGED = $031A;
+ {$EXTERNALSYM WM_THEMECHANGED}
+
+ WM_HANDHELDFIRST = $0358;
+ {$EXTERNALSYM WM_HANDHELDFIRST}
+ WM_HANDHELDLAST = $035F;
+ {$EXTERNALSYM WM_HANDHELDLAST}
+
+ WM_AFXFIRST = $0360;
+ {$EXTERNALSYM WM_AFXFIRST}
+ WM_AFXLAST = $037F;
+ {$EXTERNALSYM WM_AFXLAST}
+
+ WM_PENWINFIRST = $0380;
+ {$EXTERNALSYM WM_PENWINFIRST}
+ WM_PENWINLAST = $038F;
+ {$EXTERNALSYM WM_PENWINLAST}
+
+ WM_APP = $8000;
+ {$EXTERNALSYM WM_APP}
+
+//
+// NOTE: All Message Numbers below 0x0400 are RESERVED.
+//
+// Private Window Messages Start Here:
+//
+
+ WM_USER = $0400;
+ {$EXTERNALSYM WM_USER}
+
+// wParam for WM_SIZING message
+
+ WMSZ_LEFT = 1;
+ {$EXTERNALSYM WMSZ_LEFT}
+ WMSZ_RIGHT = 2;
+ {$EXTERNALSYM WMSZ_RIGHT}
+ WMSZ_TOP = 3;
+ {$EXTERNALSYM WMSZ_TOP}
+ WMSZ_TOPLEFT = 4;
+ {$EXTERNALSYM WMSZ_TOPLEFT}
+ WMSZ_TOPRIGHT = 5;
+ {$EXTERNALSYM WMSZ_TOPRIGHT}
+ WMSZ_BOTTOM = 6;
+ {$EXTERNALSYM WMSZ_BOTTOM}
+ WMSZ_BOTTOMLEFT = 7;
+ {$EXTERNALSYM WMSZ_BOTTOMLEFT}
+ WMSZ_BOTTOMRIGHT = 8;
+ {$EXTERNALSYM WMSZ_BOTTOMRIGHT}
+
+//
+// WM_NCHITTEST and MOUSEHOOKSTRUCT Mouse Position Codes
+//
+
+ HTERROR = DWORD(-2);
+ {$EXTERNALSYM HTERROR}
+ HTTRANSPARENT = DWORD(-1);
+ {$EXTERNALSYM HTTRANSPARENT}
+ HTNOWHERE = 0;
+ {$EXTERNALSYM HTNOWHERE}
+ HTCLIENT = 1;
+ {$EXTERNALSYM HTCLIENT}
+ HTCAPTION = 2;
+ {$EXTERNALSYM HTCAPTION}
+ HTSYSMENU = 3;
+ {$EXTERNALSYM HTSYSMENU}
+ HTGROWBOX = 4;
+ {$EXTERNALSYM HTGROWBOX}
+ HTSIZE = HTGROWBOX;
+ {$EXTERNALSYM HTSIZE}
+ HTMENU = 5;
+ {$EXTERNALSYM HTMENU}
+ HTHSCROLL = 6;
+ {$EXTERNALSYM HTHSCROLL}
+ HTVSCROLL = 7;
+ {$EXTERNALSYM HTVSCROLL}
+ HTMINBUTTON = 8;
+ {$EXTERNALSYM HTMINBUTTON}
+ HTMAXBUTTON = 9;
+ {$EXTERNALSYM HTMAXBUTTON}
+ HTLEFT = 10;
+ {$EXTERNALSYM HTLEFT}
+ HTRIGHT = 11;
+ {$EXTERNALSYM HTRIGHT}
+ HTTOP = 12;
+ {$EXTERNALSYM HTTOP}
+ HTTOPLEFT = 13;
+ {$EXTERNALSYM HTTOPLEFT}
+ HTTOPRIGHT = 14;
+ {$EXTERNALSYM HTTOPRIGHT}
+ HTBOTTOM = 15;
+ {$EXTERNALSYM HTBOTTOM}
+ HTBOTTOMLEFT = 16;
+ {$EXTERNALSYM HTBOTTOMLEFT}
+ HTBOTTOMRIGHT = 17;
+ {$EXTERNALSYM HTBOTTOMRIGHT}
+ HTBORDER = 18;
+ {$EXTERNALSYM HTBORDER}
+ HTREDUCE = HTMINBUTTON;
+ {$EXTERNALSYM HTREDUCE}
+ HTZOOM = HTMAXBUTTON;
+ {$EXTERNALSYM HTZOOM}
+ HTSIZEFIRST = HTLEFT;
+ {$EXTERNALSYM HTSIZEFIRST}
+ HTSIZELAST = HTBOTTOMRIGHT;
+ {$EXTERNALSYM HTSIZELAST}
+ HTOBJECT = 19;
+ {$EXTERNALSYM HTOBJECT}
+ HTCLOSE = 20;
+ {$EXTERNALSYM HTCLOSE}
+ HTHELP = 21;
+ {$EXTERNALSYM HTHELP}
+
+//
+// SendMessageTimeout values
+//
+
+ SMTO_NORMAL = $0000;
+ {$EXTERNALSYM SMTO_NORMAL}
+ SMTO_BLOCK = $0001;
+ {$EXTERNALSYM SMTO_BLOCK}
+ SMTO_ABORTIFHUNG = $0002;
+ {$EXTERNALSYM SMTO_ABORTIFHUNG}
+ SMTO_NOTIMEOUTIFNOTHUNG = $0008;
+ {$EXTERNALSYM SMTO_NOTIMEOUTIFNOTHUNG}
+
+//
+// WM_MOUSEACTIVATE Return Codes
+//
+
+ MA_ACTIVATE = 1;
+ {$EXTERNALSYM MA_ACTIVATE}
+ MA_ACTIVATEANDEAT = 2;
+ {$EXTERNALSYM MA_ACTIVATEANDEAT}
+ MA_NOACTIVATE = 3;
+ {$EXTERNALSYM MA_NOACTIVATE}
+ MA_NOACTIVATEANDEAT = 4;
+ {$EXTERNALSYM MA_NOACTIVATEANDEAT}
+
+//
+// WM_SETICON / WM_GETICON Type Codes
+//
+
+ ICON_SMALL = 0;
+ {$EXTERNALSYM ICON_SMALL}
+ ICON_BIG = 1;
+ {$EXTERNALSYM ICON_BIG}
+ ICON_SMALL2 = 2;
+ {$EXTERNALSYM ICON_SMALL2}
+
+function RegisterWindowMessageA(lpString: LPCSTR): UINT; stdcall;
+{$EXTERNALSYM RegisterWindowMessageA}
+function RegisterWindowMessageW(lpString: LPCWSTR): UINT; stdcall;
+{$EXTERNALSYM RegisterWindowMessageW}
+function RegisterWindowMessage(lpString: LPCTSTR): UINT; stdcall;
+{$EXTERNALSYM RegisterWindowMessage}
+
+//
+// WM_SIZE message wParam values
+//
+
+const
+ SIZE_RESTORED = 0;
+ {$EXTERNALSYM SIZE_RESTORED}
+ SIZE_MINIMIZED = 1;
+ {$EXTERNALSYM SIZE_MINIMIZED}
+ SIZE_MAXIMIZED = 2;
+ {$EXTERNALSYM SIZE_MAXIMIZED}
+ SIZE_MAXSHOW = 3;
+ {$EXTERNALSYM SIZE_MAXSHOW}
+ SIZE_MAXHIDE = 4;
+ {$EXTERNALSYM SIZE_MAXHIDE}
+
+//
+// Obsolete constant names
+//
+
+ SIZENORMAL = SIZE_RESTORED;
+ {$EXTERNALSYM SIZENORMAL}
+ SIZEICONIC = SIZE_MINIMIZED;
+ {$EXTERNALSYM SIZEICONIC}
+ SIZEFULLSCREEN = SIZE_MAXIMIZED;
+ {$EXTERNALSYM SIZEFULLSCREEN}
+ SIZEZOOMSHOW = SIZE_MAXSHOW;
+ {$EXTERNALSYM SIZEZOOMSHOW}
+ SIZEZOOMHIDE = SIZE_MAXHIDE;
+ {$EXTERNALSYM SIZEZOOMHIDE}
+
+//
+// WM_WINDOWPOSCHANGING/CHANGED struct pointed to by lParam
+//
+
+type
+ LPWINDOWPOS = ^WINDOWPOS;
+ {$EXTERNALSYM LPWINDOWPOS}
+ tagWINDOWPOS = record
+ hwnd: HWND;
+ hwndInsertAfter: HWND;
+ x: Integer;
+ y: Integer;
+ cx: Integer;
+ cy: Integer;
+ flags: UINT;
+ end;
+ {$EXTERNALSYM tagWINDOWPOS}
+ WINDOWPOS = tagWINDOWPOS;
+ {$EXTERNALSYM WINDOWPOS}
+ TWindowPos = WINDOWPOS;
+ PWindowPos = LPWINDOWPOS;
+
+//
+// WM_NCCALCSIZE parameter structure
+//
+
+ LPNCCALCSIZE_PARAMS = ^NCCALCSIZE_PARAMS;
+ {$EXTERNALSYM LPNCCALCSIZE_PARAMS}
+ NCCALCSIZE_PARAMS = record
+ rgrc: array [0..2] of RECT;
+ lppos: PWINDOWPOS;
+ end;
+ {$EXTERNALSYM NCCALCSIZE_PARAMS}
+ TNcCalcSizeParams = NCCALCSIZE_PARAMS;
+ PNcCalcSizeParams = LPNCCALCSIZE_PARAMS;
+
+//
+// WM_NCCALCSIZE "window valid rect" return values
+//
+
+const
+ WVR_ALIGNTOP = $0010;
+ {$EXTERNALSYM WVR_ALIGNTOP}
+ WVR_ALIGNLEFT = $0020;
+ {$EXTERNALSYM WVR_ALIGNLEFT}
+ WVR_ALIGNBOTTOM = $0040;
+ {$EXTERNALSYM WVR_ALIGNBOTTOM}
+ WVR_ALIGNRIGHT = $0080;
+ {$EXTERNALSYM WVR_ALIGNRIGHT}
+ WVR_HREDRAW = $0100;
+ {$EXTERNALSYM WVR_HREDRAW}
+ WVR_VREDRAW = $0200;
+ {$EXTERNALSYM WVR_VREDRAW}
+ WVR_REDRAW = WVR_HREDRAW or WVR_VREDRAW;
+ {$EXTERNALSYM WVR_REDRAW}
+ WVR_VALIDRECTS = $0400;
+ {$EXTERNALSYM WVR_VALIDRECTS}
+
+//
+// Key State Masks for Mouse Messages
+//
+
+ MK_LBUTTON = $0001;
+ {$EXTERNALSYM MK_LBUTTON}
+ MK_RBUTTON = $0002;
+ {$EXTERNALSYM MK_RBUTTON}
+ MK_SHIFT = $0004;
+ {$EXTERNALSYM MK_SHIFT}
+ MK_CONTROL = $0008;
+ {$EXTERNALSYM MK_CONTROL}
+ MK_MBUTTON = $0010;
+ {$EXTERNALSYM MK_MBUTTON}
+ MK_XBUTTON1 = $0020;
+ {$EXTERNALSYM MK_XBUTTON1}
+ MK_XBUTTON2 = $0040;
+ {$EXTERNALSYM MK_XBUTTON2}
+
+ TME_HOVER = $00000001;
+ {$EXTERNALSYM TME_HOVER}
+ TME_LEAVE = $00000002;
+ {$EXTERNALSYM TME_LEAVE}
+ TME_NONCLIENT = $00000010;
+ {$EXTERNALSYM TME_NONCLIENT}
+ TME_QUERY = $40000000;
+ {$EXTERNALSYM TME_QUERY}
+ TME_CANCEL = $80000000;
+ {$EXTERNALSYM TME_CANCEL}
+
+ HOVER_DEFAULT = $FFFFFFFF;
+ {$EXTERNALSYM HOVER_DEFAULT}
+
+type
+ LPTRACKMOUSEEVENT = ^_TRACKMOUSEEVENT;
+ {$EXTERNALSYM LPTRACKMOUSEEVENT}
+ _TRACKMOUSEEVENT = record
+ cbSize: DWORD;
+ dwFlags: DWORD;
+ hwndTrack: HWND;
+ dwHoverTime: DWORD;
+ end;
+ //TRACKMOUSEEVENT = _TRACKMOUSEEVENT;
+ //{$EXTERNALSYM TRACKMOUSEEVENT}
+ TTrackMouseEvent = _TRACKMOUSEEVENT;
+ PTrackMouseEvent = LPTRACKMOUSEEVENT;
+
+function TrackMouseEvent(var lpEventTrack: TTrackMouseEvent): BOOL; stdcall;
+{$EXTERNALSYM TrackMouseEvent}
+
+//
+// Window Styles
+//
+
+const
+ WS_OVERLAPPED = $00000000;
+ {$EXTERNALSYM WS_OVERLAPPED}
+ WS_POPUP = $80000000;
+ {$EXTERNALSYM WS_POPUP}
+ WS_CHILD = $40000000;
+ {$EXTERNALSYM WS_CHILD}
+ WS_MINIMIZE = $20000000;
+ {$EXTERNALSYM WS_MINIMIZE}
+ WS_VISIBLE = $10000000;
+ {$EXTERNALSYM WS_VISIBLE}
+ WS_DISABLED = $08000000;
+ {$EXTERNALSYM WS_DISABLED}
+ WS_CLIPSIBLINGS = $04000000;
+ {$EXTERNALSYM WS_CLIPSIBLINGS}
+ WS_CLIPCHILDREN = $02000000;
+ {$EXTERNALSYM WS_CLIPCHILDREN}
+ WS_MAXIMIZE = $01000000;
+ {$EXTERNALSYM WS_MAXIMIZE}
+ WS_CAPTION = $00C00000; // WS_BORDER | WS_DLGFRAME
+ {$EXTERNALSYM WS_CAPTION}
+ WS_BORDER = $00800000;
+ {$EXTERNALSYM WS_BORDER}
+ WS_DLGFRAME = $00400000;
+ {$EXTERNALSYM WS_DLGFRAME}
+ WS_VSCROLL = $00200000;
+ {$EXTERNALSYM WS_VSCROLL}
+ WS_HSCROLL = $00100000;
+ {$EXTERNALSYM WS_HSCROLL}
+ WS_SYSMENU = $00080000;
+ {$EXTERNALSYM WS_SYSMENU}
+ WS_THICKFRAME = $00040000;
+ {$EXTERNALSYM WS_THICKFRAME}
+ WS_GROUP = $00020000;
+ {$EXTERNALSYM WS_GROUP}
+ WS_TABSTOP = $00010000;
+ {$EXTERNALSYM WS_TABSTOP}
+
+ WS_MINIMIZEBOX = $00020000;
+ {$EXTERNALSYM WS_MINIMIZEBOX}
+ WS_MAXIMIZEBOX = $00010000;
+ {$EXTERNALSYM WS_MAXIMIZEBOX}
+
+ WS_TILED = WS_OVERLAPPED;
+ {$EXTERNALSYM WS_TILED}
+ WS_ICONIC = WS_MINIMIZE;
+ {$EXTERNALSYM WS_ICONIC}
+ WS_SIZEBOX = WS_THICKFRAME;
+ {$EXTERNALSYM WS_SIZEBOX}
+
+//
+// Common Window Styles
+//
+
+ WS_OVERLAPPEDWINDOW = (WS_OVERLAPPED or WS_CAPTION or WS_SYSMENU or
+ WS_THICKFRAME or WS_MINIMIZEBOX or WS_MAXIMIZEBOX);
+ {$EXTERNALSYM WS_OVERLAPPEDWINDOW}
+
+ WS_POPUPWINDOW = WS_POPUP or WS_BORDER or WS_SYSMENU;
+ {$EXTERNALSYM WS_POPUPWINDOW}
+
+ WS_CHILDWINDOW = WS_CHILD;
+ {$EXTERNALSYM WS_CHILDWINDOW}
+
+ WS_TILEDWINDOW = WS_OVERLAPPEDWINDOW;
+ {$EXTERNALSYM WS_TILEDWINDOW}
+
+//
+// Extended Window Styles
+//
+
+ WS_EX_DLGMODALFRAME = $00000001;
+ {$EXTERNALSYM WS_EX_DLGMODALFRAME}
+ WS_EX_NOPARENTNOTIFY = $00000004;
+ {$EXTERNALSYM WS_EX_NOPARENTNOTIFY}
+ WS_EX_TOPMOST = $00000008;
+ {$EXTERNALSYM WS_EX_TOPMOST}
+ WS_EX_ACCEPTFILES = $00000010;
+ {$EXTERNALSYM WS_EX_ACCEPTFILES}
+ WS_EX_TRANSPARENT = $00000020;
+ {$EXTERNALSYM WS_EX_TRANSPARENT}
+ WS_EX_MDICHILD = $00000040;
+ {$EXTERNALSYM WS_EX_MDICHILD}
+ WS_EX_TOOLWINDOW = $00000080;
+ {$EXTERNALSYM WS_EX_TOOLWINDOW}
+ WS_EX_WINDOWEDGE = $00000100;
+ {$EXTERNALSYM WS_EX_WINDOWEDGE}
+ WS_EX_CLIENTEDGE = $00000200;
+ {$EXTERNALSYM WS_EX_CLIENTEDGE}
+ WS_EX_CONTEXTHELP = $00000400;
+ {$EXTERNALSYM WS_EX_CONTEXTHELP}
+
+ WS_EX_RIGHT = $00001000;
+ {$EXTERNALSYM WS_EX_RIGHT}
+ WS_EX_LEFT = $00000000;
+ {$EXTERNALSYM WS_EX_LEFT}
+ WS_EX_RTLREADING = $00002000;
+ {$EXTERNALSYM WS_EX_RTLREADING}
+ WS_EX_LTRREADING = $00000000;
+ {$EXTERNALSYM WS_EX_LTRREADING}
+ WS_EX_LEFTSCROLLBAR = $00004000;
+ {$EXTERNALSYM WS_EX_LEFTSCROLLBAR}
+ WS_EX_RIGHTSCROLLBAR = $00000000;
+ {$EXTERNALSYM WS_EX_RIGHTSCROLLBAR}
+ WS_EX_CONTROLPARENT = $00010000;
+ {$EXTERNALSYM WS_EX_CONTROLPARENT}
+ WS_EX_STATICEDGE = $00020000;
+ {$EXTERNALSYM WS_EX_STATICEDGE}
+ WS_EX_APPWINDOW = $00040000;
+ {$EXTERNALSYM WS_EX_APPWINDOW}
+
+ WS_EX_OVERLAPPEDWINDOW = WS_EX_WINDOWEDGE or WS_EX_CLIENTEDGE;
+ {$EXTERNALSYM WS_EX_OVERLAPPEDWINDOW}
+ WS_EX_PALETTEWINDOW = WS_EX_WINDOWEDGE or WS_EX_TOOLWINDOW or WS_EX_TOPMOST;
+ {$EXTERNALSYM WS_EX_PALETTEWINDOW}
+
+ WS_EX_LAYERED = $00080000;
+ {$EXTERNALSYM WS_EX_LAYERED}
+
+ WS_EX_NOINHERITLAYOUT = $00100000; // Disable inheritence of mirroring by children
+ {$EXTERNALSYM WS_EX_NOINHERITLAYOUT}
+ WS_EX_LAYOUTRTL = $00400000; // Right to left mirroring
+ {$EXTERNALSYM WS_EX_LAYOUTRTL}
+
+ WS_EX_COMPOSITED = $02000000;
+ {$EXTERNALSYM WS_EX_COMPOSITED}
+ WS_EX_NOACTIVATE = $08000000;
+ {$EXTERNALSYM WS_EX_NOACTIVATE}
+
+//
+// Class styles
+//
+
+ CS_VREDRAW = $0001;
+ {$EXTERNALSYM CS_VREDRAW}
+ CS_HREDRAW = $0002;
+ {$EXTERNALSYM CS_HREDRAW}
+ CS_DBLCLKS = $0008;
+ {$EXTERNALSYM CS_DBLCLKS}
+ CS_OWNDC = $0020;
+ {$EXTERNALSYM CS_OWNDC}
+ CS_CLASSDC = $0040;
+ {$EXTERNALSYM CS_CLASSDC}
+ CS_PARENTDC = $0080;
+ {$EXTERNALSYM CS_PARENTDC}
+ CS_NOCLOSE = $0200;
+ {$EXTERNALSYM CS_NOCLOSE}
+ CS_SAVEBITS = $0800;
+ {$EXTERNALSYM CS_SAVEBITS}
+ CS_BYTEALIGNCLIENT = $1000;
+ {$EXTERNALSYM CS_BYTEALIGNCLIENT}
+ CS_BYTEALIGNWINDOW = $2000;
+ {$EXTERNALSYM CS_BYTEALIGNWINDOW}
+ CS_GLOBALCLASS = $4000;
+ {$EXTERNALSYM CS_GLOBALCLASS}
+
+ CS_IME = $00010000;
+ {$EXTERNALSYM CS_IME}
+ CS_DROPSHADOW = $00020000;
+ {$EXTERNALSYM CS_DROPSHADOW}
+
+// WM_PRINT flags//
+
+ PRF_CHECKVISIBLE = $00000001;
+ {$EXTERNALSYM PRF_CHECKVISIBLE}
+ PRF_NONCLIENT = $00000002;
+ {$EXTERNALSYM PRF_NONCLIENT}
+ PRF_CLIENT = $00000004;
+ {$EXTERNALSYM PRF_CLIENT}
+ PRF_ERASEBKGND = $00000008;
+ {$EXTERNALSYM PRF_ERASEBKGND}
+ PRF_CHILDREN = $00000010;
+ {$EXTERNALSYM PRF_CHILDREN}
+ PRF_OWNED = $00000020;
+ {$EXTERNALSYM PRF_OWNED}
+
+// 3D border styles//
+
+ BDR_RAISEDOUTER = $0001;
+ {$EXTERNALSYM BDR_RAISEDOUTER}
+ BDR_SUNKENOUTER = $0002;
+ {$EXTERNALSYM BDR_SUNKENOUTER}
+ BDR_RAISEDINNER = $0004;
+ {$EXTERNALSYM BDR_RAISEDINNER}
+ BDR_SUNKENINNER = $0008;
+ {$EXTERNALSYM BDR_SUNKENINNER}
+
+ BDR_OUTER = BDR_RAISEDOUTER or BDR_SUNKENOUTER;
+ {$EXTERNALSYM BDR_OUTER}
+ BDR_INNER = BDR_RAISEDINNER or BDR_SUNKENINNER;
+ {$EXTERNALSYM BDR_INNER}
+ BDR_RAISED = BDR_RAISEDOUTER or BDR_RAISEDINNER;
+ {$EXTERNALSYM BDR_RAISED}
+ BDR_SUNKEN = BDR_SUNKENOUTER or BDR_SUNKENINNER;
+ {$EXTERNALSYM BDR_SUNKEN}
+
+ EDGE_RAISED = BDR_RAISEDOUTER or BDR_RAISEDINNER;
+ {$EXTERNALSYM EDGE_RAISED}
+ EDGE_SUNKEN = BDR_SUNKENOUTER or BDR_SUNKENINNER;
+ {$EXTERNALSYM EDGE_SUNKEN}
+ EDGE_ETCHED = BDR_SUNKENOUTER or BDR_RAISEDINNER;
+ {$EXTERNALSYM EDGE_ETCHED}
+ EDGE_BUMP = BDR_RAISEDOUTER or BDR_SUNKENINNER;
+ {$EXTERNALSYM EDGE_BUMP}
+
+// Border flags//
+
+ BF_LEFT = $0001;
+ {$EXTERNALSYM BF_LEFT}
+ BF_TOP = $0002;
+ {$EXTERNALSYM BF_TOP}
+ BF_RIGHT = $0004;
+ {$EXTERNALSYM BF_RIGHT}
+ BF_BOTTOM = $0008;
+ {$EXTERNALSYM BF_BOTTOM}
+
+ BF_TOPLEFT = BF_TOP or BF_LEFT;
+ {$EXTERNALSYM BF_TOPLEFT}
+ BF_TOPRIGHT = BF_TOP or BF_RIGHT;
+ {$EXTERNALSYM BF_TOPRIGHT}
+ BF_BOTTOMLEFT = BF_BOTTOM or BF_LEFT;
+ {$EXTERNALSYM BF_BOTTOMLEFT}
+ BF_BOTTOMRIGHT = BF_BOTTOM or BF_RIGHT;
+ {$EXTERNALSYM BF_BOTTOMRIGHT}
+ BF_RECT = BF_LEFT or BF_TOP or BF_RIGHT or BF_BOTTOM;
+ {$EXTERNALSYM BF_RECT}
+
+ BF_DIAGONAL = $0010;
+ {$EXTERNALSYM BF_DIAGONAL}
+
+// For diagonal lines, the BF_RECT flags specify the end point of the
+// vector bounded by the rectangle parameter.
+
+ BF_DIAGONAL_ENDTOPRIGHT = BF_DIAGONAL or BF_TOP or BF_RIGHT;
+ {$EXTERNALSYM BF_DIAGONAL_ENDTOPRIGHT}
+ BF_DIAGONAL_ENDTOPLEFT = BF_DIAGONAL or BF_TOP or BF_LEFT;
+ {$EXTERNALSYM BF_DIAGONAL_ENDTOPLEFT}
+ BF_DIAGONAL_ENDBOTTOMLEFT = BF_DIAGONAL or BF_BOTTOM or BF_LEFT;
+ {$EXTERNALSYM BF_DIAGONAL_ENDBOTTOMLEFT}
+ BF_DIAGONAL_ENDBOTTOMRIGHT = BF_DIAGONAL or BF_BOTTOM or BF_RIGHT;
+ {$EXTERNALSYM BF_DIAGONAL_ENDBOTTOMRIGHT}
+
+ BF_MIDDLE = $0800; // Fill in the middle
+ {$EXTERNALSYM BF_MIDDLE}
+ BF_SOFT = $1000; // For softer buttons
+ {$EXTERNALSYM BF_SOFT}
+ BF_ADJUST = $2000; // Calculate the space left over
+ {$EXTERNALSYM BF_ADJUST}
+ BF_FLAT = $4000; // For flat rather than 3D borders
+ {$EXTERNALSYM BF_FLAT}
+ BF_MONO = $8000; // For monochrome borders
+ {$EXTERNALSYM BF_MONO}
+
+function DrawEdge(hdc: HDC; var qrc: RECT; edge, grfFlags: UINT): BOOL; stdcall;
+{$EXTERNALSYM DrawEdge}
+
+// flags for DrawFrameControl//
+
+const
+ DFC_CAPTION = 1;
+ {$EXTERNALSYM DFC_CAPTION}
+ DFC_MENU = 2;
+ {$EXTERNALSYM DFC_MENU}
+ DFC_SCROLL = 3;
+ {$EXTERNALSYM DFC_SCROLL}
+ DFC_BUTTON = 4;
+ {$EXTERNALSYM DFC_BUTTON}
+ DFC_POPUPMENU = 5;
+ {$EXTERNALSYM DFC_POPUPMENU}
+
+ DFCS_CAPTIONCLOSE = $0000;
+ {$EXTERNALSYM DFCS_CAPTIONCLOSE}
+ DFCS_CAPTIONMIN = $0001;
+ {$EXTERNALSYM DFCS_CAPTIONMIN}
+ DFCS_CAPTIONMAX = $0002;
+ {$EXTERNALSYM DFCS_CAPTIONMAX}
+ DFCS_CAPTIONRESTORE = $0003;
+ {$EXTERNALSYM DFCS_CAPTIONRESTORE}
+ DFCS_CAPTIONHELP = $0004;
+ {$EXTERNALSYM DFCS_CAPTIONHELP}
+
+ DFCS_MENUARROW = $0000;
+ {$EXTERNALSYM DFCS_MENUARROW}
+ DFCS_MENUCHECK = $0001;
+ {$EXTERNALSYM DFCS_MENUCHECK}
+ DFCS_MENUBULLET = $0002;
+ {$EXTERNALSYM DFCS_MENUBULLET}
+ DFCS_MENUARROWRIGHT = $0004;
+ {$EXTERNALSYM DFCS_MENUARROWRIGHT}
+ DFCS_SCROLLUP = $0000;
+ {$EXTERNALSYM DFCS_SCROLLUP}
+ DFCS_SCROLLDOWN = $0001;
+ {$EXTERNALSYM DFCS_SCROLLDOWN}
+ DFCS_SCROLLLEFT = $0002;
+ {$EXTERNALSYM DFCS_SCROLLLEFT}
+ DFCS_SCROLLRIGHT = $0003;
+ {$EXTERNALSYM DFCS_SCROLLRIGHT}
+ DFCS_SCROLLCOMBOBOX = $0005;
+ {$EXTERNALSYM DFCS_SCROLLCOMBOBOX}
+ DFCS_SCROLLSIZEGRIP = $0008;
+ {$EXTERNALSYM DFCS_SCROLLSIZEGRIP}
+ DFCS_SCROLLSIZEGRIPRIGHT = $0010;
+ {$EXTERNALSYM DFCS_SCROLLSIZEGRIPRIGHT}
+
+ DFCS_BUTTONCHECK = $0000;
+ {$EXTERNALSYM DFCS_BUTTONCHECK}
+ DFCS_BUTTONRADIOIMAGE = $0001;
+ {$EXTERNALSYM DFCS_BUTTONRADIOIMAGE}
+ DFCS_BUTTONRADIOMASK = $0002;
+ {$EXTERNALSYM DFCS_BUTTONRADIOMASK}
+ DFCS_BUTTONRADIO = $0004;
+ {$EXTERNALSYM DFCS_BUTTONRADIO}
+ DFCS_BUTTON3STATE = $0008;
+ {$EXTERNALSYM DFCS_BUTTON3STATE}
+ DFCS_BUTTONPUSH = $0010;
+ {$EXTERNALSYM DFCS_BUTTONPUSH}
+
+ DFCS_INACTIVE = $0100;
+ {$EXTERNALSYM DFCS_INACTIVE}
+ DFCS_PUSHED = $0200;
+ {$EXTERNALSYM DFCS_PUSHED}
+ DFCS_CHECKED = $0400;
+ {$EXTERNALSYM DFCS_CHECKED}
+
+ DFCS_TRANSPARENT = $0800;
+ {$EXTERNALSYM DFCS_TRANSPARENT}
+ DFCS_HOT = $1000;
+ {$EXTERNALSYM DFCS_HOT}
+
+ DFCS_ADJUSTRECT = $2000;
+ {$EXTERNALSYM DFCS_ADJUSTRECT}
+ DFCS_FLAT = $4000;
+ {$EXTERNALSYM DFCS_FLAT}
+ DFCS_MONO = $8000;
+ {$EXTERNALSYM DFCS_MONO}
+
+function DrawFrameControl(hdc: HDC; const lprc: RECT; uType, uState: UINT): BOOL; stdcall;
+{$EXTERNALSYM DrawFrameControl}
+
+// flags for DrawCaption//
+
+const
+ DC_ACTIVE = $0001;
+ {$EXTERNALSYM DC_ACTIVE}
+ DC_SMALLCAP = $0002;
+ {$EXTERNALSYM DC_SMALLCAP}
+ DC_ICON = $0004;
+ {$EXTERNALSYM DC_ICON}
+ DC_TEXT = $0008;
+ {$EXTERNALSYM DC_TEXT}
+ DC_INBUTTON = $0010;
+ {$EXTERNALSYM DC_INBUTTON}
+ DC_GRADIENT = $0020;
+ {$EXTERNALSYM DC_GRADIENT}
+ DC_BUTTONS = $1000;
+ {$EXTERNALSYM DC_BUTTONS}
+
+function DrawCaption(hwnd: HWND; hdc: HDC; const lprc: RECT; uFlags: UINT): BOOL; stdcall;
+{$EXTERNALSYM DrawCaption}
+
+const
+ IDANI_OPEN = 1;
+ {$EXTERNALSYM IDANI_OPEN}
+ IDANI_CAPTION = 3;
+ {$EXTERNALSYM IDANI_CAPTION}
+
+function DrawAnimatedRects(hwnd: HWND; idAni: Integer; const lprcFrom, lprcTo: RECT): BOOL; stdcall;
+{$EXTERNALSYM DrawAnimatedRects}
+
+//
+// Predefined Clipboard Formats
+//
+
+const
+ CF_TEXT = 1;
+ {$EXTERNALSYM CF_TEXT}
+ CF_BITMAP = 2;
+ {$EXTERNALSYM CF_BITMAP}
+ CF_METAFILEPICT = 3;
+ {$EXTERNALSYM CF_METAFILEPICT}
+ CF_SYLK = 4;
+ {$EXTERNALSYM CF_SYLK}
+ CF_DIF = 5;
+ {$EXTERNALSYM CF_DIF}
+ CF_TIFF = 6;
+ {$EXTERNALSYM CF_TIFF}
+ CF_OEMTEXT = 7;
+ {$EXTERNALSYM CF_OEMTEXT}
+ CF_DIB = 8;
+ {$EXTERNALSYM CF_DIB}
+ CF_PALETTE = 9;
+ {$EXTERNALSYM CF_PALETTE}
+ CF_PENDATA = 10;
+ {$EXTERNALSYM CF_PENDATA}
+ CF_RIFF = 11;
+ {$EXTERNALSYM CF_RIFF}
+ CF_WAVE = 12;
+ {$EXTERNALSYM CF_WAVE}
+ CF_UNICODETEXT = 13;
+ {$EXTERNALSYM CF_UNICODETEXT}
+ CF_ENHMETAFILE = 14;
+ {$EXTERNALSYM CF_ENHMETAFILE}
+ CF_HDROP = 15;
+ {$EXTERNALSYM CF_HDROP}
+ CF_LOCALE = 16;
+ {$EXTERNALSYM CF_LOCALE}
+ CF_DIBV5 = 17;
+ {$EXTERNALSYM CF_DIBV5}
+
+ {$IFDEF WIN98ME_UP}
+ CF_MAX = 18;
+ {$EXTERNALSYM CF_MAX}
+ {$ELSE}
+ CF_MAX = 17;
+ {$EXTERNALSYM CF_MAX}
+ {$ENDIF WIN98ME_UP}
+
+ CF_OWNERDISPLAY = $0080;
+ {$EXTERNALSYM CF_OWNERDISPLAY}
+ CF_DSPTEXT = $0081;
+ {$EXTERNALSYM CF_DSPTEXT}
+ CF_DSPBITMAP = $0082;
+ {$EXTERNALSYM CF_DSPBITMAP}
+ CF_DSPMETAFILEPICT = $0083;
+ {$EXTERNALSYM CF_DSPMETAFILEPICT}
+ CF_DSPENHMETAFILE = $008E;
+ {$EXTERNALSYM CF_DSPENHMETAFILE}
+
+//
+// "Private" formats don't get GlobalFree()'d
+//
+
+ CF_PRIVATEFIRST = $0200;
+ {$EXTERNALSYM CF_PRIVATEFIRST}
+ CF_PRIVATELAST = $02FF;
+ {$EXTERNALSYM CF_PRIVATELAST}
+
+//
+// "GDIOBJ" formats do get DeleteObject()'d
+//
+
+ CF_GDIOBJFIRST = $0300;
+ {$EXTERNALSYM CF_GDIOBJFIRST}
+ CF_GDIOBJLAST = $03FF;
+ {$EXTERNALSYM CF_GDIOBJLAST}
+
+//
+// Defines for the fVirt field of the Accelerator table structure.
+//
+
+ FVIRTKEY = TRUE; // Assumed to be == TRUE
+ {$EXTERNALSYM FVIRTKEY}
+ FNOINVERT = $02;
+ {$EXTERNALSYM FNOINVERT}
+ FSHIFT = $04;
+ {$EXTERNALSYM FSHIFT}
+ FCONTROL = $08;
+ {$EXTERNALSYM FCONTROL}
+ FALT = $10;
+ {$EXTERNALSYM FALT}
+
+type
+ LPACCEL = ^ACCEL;
+ {$EXTERNALSYM LPACCEL}
+ tagACCEL = record
+ fVirt: BYTE; // Also called the flags field//
+ key: WORD;
+ cmd: WORD;
+ end;
+ {$EXTERNALSYM tagACCEL}
+ ACCEL = tagACCEL;
+ {$EXTERNALSYM ACCEL}
+ TAccel = ACCEL;
+ PAccel = LPACCEL;
+
+ LPPAINTSTRUCT = ^PAINTSTRUCT;
+ {$EXTERNALSYM LPPAINTSTRUCT}
+ tagPAINTSTRUCT = record
+ hdc: HDC;
+ fErase: BOOL;
+ rcPaint: RECT;
+ fRestore: BOOL;
+ fIncUpdate: BOOL;
+ rgbReserved: array [0..31] of BYTE;
+ end;
+ {$EXTERNALSYM tagPAINTSTRUCT}
+ PAINTSTRUCT = tagPAINTSTRUCT;
+ {$EXTERNALSYM PAINTSTRUCT}
+ NPPAINTSTRUCT = ^PAINTSTRUCT;
+ {$EXTERNALSYM NPPAINTSTRUCT}
+ TPaintStruct = PAINTSTRUCT;
+ PPaintStruct = LPPAINTSTRUCT;
+
+ LPCREATESTRUCTA = ^CREATESTRUCTA;
+ {$EXTERNALSYM LPCREATESTRUCTA}
+ tagCREATESTRUCTA = record
+ lpCreateParams: LPVOID;
+ hInstance: HINSTANCE;
+ hMenu: HMENU;
+ hwndParent: HWND;
+ cy: Integer;
+ cx: Integer;
+ y: Integer;
+ x: Integer;
+ style: LONG;
+ lpszName: LPCSTR;
+ lpszClass: LPCSTR;
+ dwExStyle: DWORD;
+ end;
+ {$EXTERNALSYM tagCREATESTRUCTA}
+ CREATESTRUCTA = tagCREATESTRUCTA;
+ {$EXTERNALSYM CREATESTRUCTA}
+ TCreateStructA = CREATESTRUCTA;
+ PCreateStructA = LPCREATESTRUCTA;
+
+ LPCREATESTRUCTW = ^CREATESTRUCTW;
+ {$EXTERNALSYM LPCREATESTRUCTW}
+ tagCREATESTRUCTW = record
+ lpCreateParams: LPVOID;
+ hInstance: HINSTANCE;
+ hMenu: HMENU;
+ hwndParent: HWND;
+ cy: Integer;
+ cx: Integer;
+ y: Integer;
+ x: Integer;
+ style: LONG;
+ lpszName: LPCWSTR;
+ lpszClass: LPCWSTR;
+ dwExStyle: DWORD;
+ end;
+ {$EXTERNALSYM tagCREATESTRUCTW}
+ CREATESTRUCTW = tagCREATESTRUCTW;
+ {$EXTERNALSYM CREATESTRUCTW}
+ TCreateStructW = CREATESTRUCTW;
+ PCreateStructW = LPCREATESTRUCTW;
+
+ {$IFDEF UNICODE}
+ CREATESTRUCT = CREATESTRUCTW;
+ {$EXTERNALSYM CREATESTRUCT}
+ LPCREATESTRUCT = LPCREATESTRUCTW;
+ {$EXTERNALSYM LPCREATESTRUCT}
+ TCreateStruct = TCreateStructW;
+ PCreateStruct = PCreateStructW;
+ {$ELSE}
+ CREATESTRUCT = CREATESTRUCTA;
+ {$EXTERNALSYM CREATESTRUCT}
+ LPCREATESTRUCT = LPCREATESTRUCTA;
+ {$EXTERNALSYM LPCREATESTRUCT}
+ TCreateStruct = TCreateStructA;
+ PCreateStruct = PCreateStructA;
+ {$ENDIF UNICODE}
+
+//
+// HCBT_CREATEWND parameters pointed to by lParam
+//
+
+type
+ LPCBT_CREATEWNDA = ^CBT_CREATEWNDA;
+ {$EXTERNALSYM LPCBT_CREATEWNDA}
+ tagCBT_CREATEWNDA = record
+ lpcs: LPCREATESTRUCTA;
+ hwndInsertAfter: HWND;
+ end;
+ {$EXTERNALSYM tagCBT_CREATEWNDA}
+ CBT_CREATEWNDA = tagCBT_CREATEWNDA;
+ {$EXTERNALSYM CBT_CREATEWNDA}
+ TCbtCreateWndA = CBT_CREATEWNDA;
+ PCbtCreateWndA = LPCBT_CREATEWNDA;
+
+//
+// HCBT_CREATEWND parameters pointed to by lParam
+//
+
+ LPCBT_CREATEWNDW = ^CBT_CREATEWNDW;
+ {$EXTERNALSYM LPCBT_CREATEWNDW}
+ tagCBT_CREATEWNDW = record
+ lpcs: LPCREATESTRUCTW;
+ hwndInsertAfter: HWND;
+ end;
+ {$EXTERNALSYM tagCBT_CREATEWNDW}
+ CBT_CREATEWNDW = tagCBT_CREATEWNDW;
+ {$EXTERNALSYM CBT_CREATEWNDW}
+ TCbtCreateWndW = CBT_CREATEWNDW;
+ PCbtCreateWndW = LPCBT_CREATEWNDW;
+
+ {$IFDEF UNICODE}
+ CBT_CREATEWND = CBT_CREATEWNDW;
+ {$EXTERNALSYM CBT_CREATEWND}
+ LPCBT_CREATEWND = LPCBT_CREATEWNDW;
+ {$EXTERNALSYM LPCBT_CREATEWND}
+ {$ELSE}
+ CBT_CREATEWND = CBT_CREATEWNDA;
+ {$EXTERNALSYM CBT_CREATEWND}
+ LPCBT_CREATEWND = LPCBT_CREATEWNDA;
+ {$EXTERNALSYM LPCBT_CREATEWND}
+ {$ENDIF UNICODE}
+
+ LPWINDOWPLACEMENT = ^WINDOWPLACEMENT;
+ {$EXTERNALSYM LPWINDOWPLACEMENT}
+ tagWINDOWPLACEMENT = record
+ length: UINT;
+ flags: UINT;
+ showCmd: UINT;
+ ptMinPosition: POINT;
+ ptMaxPosition: POINT;
+ rcNormalPosition: RECT;
+ end;
+ {$EXTERNALSYM tagWINDOWPLACEMENT}
+ WINDOWPLACEMENT = tagWINDOWPLACEMENT;
+ {$EXTERNALSYM WINDOWPLACEMENT}
+ TWindowPlacement = WINDOWPLACEMENT;
+ PWindowPlacement = LPWINDOWPLACEMENT;
+
+const
+ WPF_SETMINPOSITION = $0001;
+ {$EXTERNALSYM WPF_SETMINPOSITION}
+ WPF_RESTORETOMAXIMIZED = $0002;
+ {$EXTERNALSYM WPF_RESTORETOMAXIMIZED}
+ WPF_ASYNCWINDOWPLACEMENT = $0004;
+ {$EXTERNALSYM WPF_ASYNCWINDOWPLACEMENT}
+
+type
+ LPNMHDR = ^NMHDR;
+ {$EXTERNALSYM LPNMHDR}
+ tagNMHDR = record
+ hwndFrom: HWND;
+ idFrom: UINT_PTR;
+ code: UINT; // NM_ code
+ end;
+ {$EXTERNALSYM tagNMHDR}
+ NMHDR = tagNMHDR;
+ {$EXTERNALSYM NMHDR}
+ TNmHdr = NMHDR;
+ PNmHdr = LPNMHDR;
+
+ LPSTYLESTRUCT = ^STYLESTRUCT;
+ {$EXTERNALSYM LPSTYLESTRUCT}
+ tagSTYLESTRUCT = record
+ styleOld: DWORD;
+ styleNew: DWORD;
+ end;
+ {$EXTERNALSYM tagSTYLESTRUCT}
+ STYLESTRUCT = tagSTYLESTRUCT;
+ {$EXTERNALSYM STYLESTRUCT}
+ TStyleStruct = STYLESTRUCT;
+ PStyleStruct = LPSTYLESTRUCT;
+
+//
+// Owner draw control types
+//
+
+const
+ ODT_MENU = 1;
+ {$EXTERNALSYM ODT_MENU}
+ ODT_LISTBOX = 2;
+ {$EXTERNALSYM ODT_LISTBOX}
+ ODT_COMBOBOX = 3;
+ {$EXTERNALSYM ODT_COMBOBOX}
+ ODT_BUTTON = 4;
+ {$EXTERNALSYM ODT_BUTTON}
+ ODT_STATIC = 5;
+ {$EXTERNALSYM ODT_STATIC}
+
+//
+// Owner draw actions
+//
+
+ ODA_DRAWENTIRE = $0001;
+ {$EXTERNALSYM ODA_DRAWENTIRE}
+ ODA_SELECT = $0002;
+ {$EXTERNALSYM ODA_SELECT}
+ ODA_FOCUS = $0004;
+ {$EXTERNALSYM ODA_FOCUS}
+
+//
+// Owner draw state
+//
+
+ ODS_SELECTED = $0001;
+ {$EXTERNALSYM ODS_SELECTED}
+ ODS_GRAYED = $0002;
+ {$EXTERNALSYM ODS_GRAYED}
+ ODS_DISABLED = $0004;
+ {$EXTERNALSYM ODS_DISABLED}
+ ODS_CHECKED = $0008;
+ {$EXTERNALSYM ODS_CHECKED}
+ ODS_FOCUS = $0010;
+ {$EXTERNALSYM ODS_FOCUS}
+ ODS_DEFAULT = $0020;
+ {$EXTERNALSYM ODS_DEFAULT}
+ ODS_COMBOBOXEDIT = $1000;
+ {$EXTERNALSYM ODS_COMBOBOXEDIT}
+ ODS_HOTLIGHT = $0040;
+ {$EXTERNALSYM ODS_HOTLIGHT}
+ ODS_INACTIVE = $0080;
+ {$EXTERNALSYM ODS_INACTIVE}
+ ODS_NOACCEL = $0100;
+ {$EXTERNALSYM ODS_NOACCEL}
+ ODS_NOFOCUSRECT = $0200;
+ {$EXTERNALSYM ODS_NOFOCUSRECT}
+
+//
+// MEASUREITEMSTRUCT for ownerdraw
+//
+
+type
+ LPMEASUREITEMSTRUCT = ^MEASUREITEMSTRUCT;
+ {$EXTERNALSYM LPMEASUREITEMSTRUCT}
+ tagMEASUREITEMSTRUCT = record
+ CtlType: UINT;
+ CtlID: UINT;
+ itemID: UINT;
+ itemWidth: UINT;
+ itemHeight: UINT;
+ itemData: ULONG_PTR;
+ end;
+ {$EXTERNALSYM tagMEASUREITEMSTRUCT}
+ MEASUREITEMSTRUCT = tagMEASUREITEMSTRUCT;
+ {$EXTERNALSYM MEASUREITEMSTRUCT}
+ TMeasureItemStruct = MEASUREITEMSTRUCT;
+ PMeasureItemStruct = LPMEASUREITEMSTRUCT;
+
+//
+// DRAWITEMSTRUCT for ownerdraw
+//
+
+ LPDRAWITEMSTRUCT = ^DRAWITEMSTRUCT;
+ {$EXTERNALSYM LPDRAWITEMSTRUCT}
+ tagDRAWITEMSTRUCT = record
+ CtlType: UINT;
+ CtlID: UINT;
+ itemID: UINT;
+ itemAction: UINT;
+ itemState: UINT;
+ hwndItem: HWND;
+ hDC: HDC;
+ rcItem: RECT;
+ itemData: ULONG_PTR;
+ end;
+ {$EXTERNALSYM tagDRAWITEMSTRUCT}
+ DRAWITEMSTRUCT = tagDRAWITEMSTRUCT;
+ {$EXTERNALSYM DRAWITEMSTRUCT}
+ TDrawItemStruct = DRAWITEMSTRUCT;
+ PDrawItemStruct = LPDRAWITEMSTRUCT;
+
+//
+// DELETEITEMSTRUCT for ownerdraw
+//
+
+ LPDELETEITEMSTRUCT = ^DELETEITEMSTRUCT;
+ {$EXTERNALSYM LPDELETEITEMSTRUCT}
+ tagDELETEITEMSTRUCT = record
+ CtlType: UINT;
+ CtlID: UINT;
+ itemID: UINT;
+ hwndItem: HWND;
+ itemData: ULONG_PTR;
+ end;
+ {$EXTERNALSYM tagDELETEITEMSTRUCT}
+ DELETEITEMSTRUCT = tagDELETEITEMSTRUCT;
+ {$EXTERNALSYM DELETEITEMSTRUCT}
+ TDeleteItemStruct = DELETEITEMSTRUCT;
+ PDeleteItemStruct = LPDELETEITEMSTRUCT;
+
+//
+// COMPAREITEMSTUCT for ownerdraw sorting
+//
+
+ LPCOMPAREITEMSTRUCT = ^COMPAREITEMSTRUCT;
+ {$EXTERNALSYM LPCOMPAREITEMSTRUCT}
+ tagCOMPAREITEMSTRUCT = record
+ CtlType: UINT;
+ CtlID: UINT;
+ hwndItem: HWND;
+ itemID1: UINT;
+ itemData1: ULONG_PTR;
+ itemID2: UINT;
+ itemData2: ULONG_PTR;
+ dwLocaleId: DWORD;
+ end;
+ {$EXTERNALSYM tagCOMPAREITEMSTRUCT}
+ COMPAREITEMSTRUCT = tagCOMPAREITEMSTRUCT;
+ {$EXTERNALSYM COMPAREITEMSTRUCT}
+ TCompareItemStruct = COMPAREITEMSTRUCT;
+ PCompareItemStruct = LPCOMPAREITEMSTRUCT;
+
+//
+// Message Function Templates
+//
+
+function GetMessageA(lpMsg: LPMSG; hWnd: HWND; wMsgFilterMin, wMsgFilterMax: UINT): BOOL; stdcall;
+{$EXTERNALSYM GetMessageA}
+function GetMessageW(lpMsg: LPMSG; hWnd: HWND; wMsgFilterMin, wMsgFilterMax: UINT): BOOL; stdcall;
+{$EXTERNALSYM GetMessageW}
+function GetMessage(lpMsg: LPMSG; hWnd: HWND; wMsgFilterMin, wMsgFilterMax: UINT): BOOL; stdcall;
+{$EXTERNALSYM GetMessage}
+
+function TranslateMessage(lpMsg: LPMSG): BOOL; stdcall;
+{$EXTERNALSYM TranslateMessage}
+
+function DispatchMessageA(lpMsg: LPMSG): LRESULT; stdcall;
+{$EXTERNALSYM DispatchMessageA}
+function DispatchMessageW(lpMsg: LPMSG): LRESULT; stdcall;
+{$EXTERNALSYM DispatchMessageW}
+function DispatchMessage(lpMsg: LPMSG): LRESULT; stdcall;
+{$EXTERNALSYM DispatchMessage}
+
+function SetMessageQueue(cMessagesMax: Integer): BOOL; stdcall;
+{$EXTERNALSYM SetMessageQueue}
+
+function PeekMessageA(var lpMsg: MSG; hWnd: HWND;
+ wMsgFilterMin, wMsgFilterMax, wRemoveMsg: UINT): BOOL; stdcall;
+{$EXTERNALSYM PeekMessageA}
+function PeekMessageW(var lpMsg: MSG; hWnd: HWND;
+ wMsgFilterMin, wMsgFilterMax, wRemoveMsg: UINT): BOOL; stdcall;
+{$EXTERNALSYM PeekMessageW}
+function PeekMessage(var lpMsg: MSG; hWnd: HWND;
+ wMsgFilterMin, wMsgFilterMax, wRemoveMsg: UINT): BOOL; stdcall;
+{$EXTERNALSYM PeekMessage}
+
+//
+// Queue status flags for GetQueueStatus() and MsgWaitForMultipleObjects()
+//
+
+const
+ QS_KEY = $0001;
+ {$EXTERNALSYM QS_KEY}
+ QS_MOUSEMOVE = $0002;
+ {$EXTERNALSYM QS_MOUSEMOVE}
+ QS_MOUSEBUTTON = $0004;
+ {$EXTERNALSYM QS_MOUSEBUTTON}
+ QS_POSTMESSAGE = $0008;
+ {$EXTERNALSYM QS_POSTMESSAGE}
+ QS_TIMER = $0010;
+ {$EXTERNALSYM QS_TIMER}
+ QS_PAINT = $0020;
+ {$EXTERNALSYM QS_PAINT}
+ QS_SENDMESSAGE = $0040;
+ {$EXTERNALSYM QS_SENDMESSAGE}
+ QS_HOTKEY = $0080;
+ {$EXTERNALSYM QS_HOTKEY}
+ QS_ALLPOSTMESSAGE = $0100;
+ {$EXTERNALSYM QS_ALLPOSTMESSAGE}
+ QS_RAWINPUT = $0400;
+ {$EXTERNALSYM QS_RAWINPUT}
+
+ QS_MOUSE = QS_MOUSEMOVE or QS_MOUSEBUTTON;
+ {$EXTERNALSYM QS_MOUSE}
+
+ QS_INPUT = QS_MOUSE or QS_KEY {$IFDEF WINXP_UP} or QS_RAWINPUT {$ENDIF};
+ {$EXTERNALSYM QS_INPUT}
+
+ QS_ALLEVENTS = QS_INPUT or QS_POSTMESSAGE or QS_TIMER or QS_PAINT or QS_HOTKEY;
+ {$EXTERNALSYM QS_ALLEVENTS}
+
+ QS_ALLINPUT = (QS_INPUT or QS_POSTMESSAGE or QS_TIMER or QS_PAINT or
+ QS_HOTKEY or QS_SENDMESSAGE);
+ {$EXTERNALSYM QS_ALLINPUT}
+
+//
+// PeekMessage() Options
+//
+
+const
+ PM_NOREMOVE = $0000;
+ {$EXTERNALSYM PM_NOREMOVE}
+ PM_REMOVE = $0001;
+ {$EXTERNALSYM PM_REMOVE}
+ PM_NOYIELD = $0002;
+ {$EXTERNALSYM PM_NOYIELD}
+ PM_QS_INPUT = QS_INPUT shl 16;
+ {$EXTERNALSYM PM_QS_INPUT}
+ PM_QS_POSTMESSAGE = (QS_POSTMESSAGE or QS_HOTKEY or QS_TIMER) shl 16;
+ {$EXTERNALSYM PM_QS_POSTMESSAGE}
+ PM_QS_PAINT = QS_PAINT shl 16;
+ {$EXTERNALSYM PM_QS_PAINT}
+ PM_QS_SENDMESSAGE = QS_SENDMESSAGE shl 16;
+ {$EXTERNALSYM PM_QS_SENDMESSAGE}
+
+function RegisterHotKey(hWnd: HWND; id: Integer; fsModifiers, vk: UINT): BOOL; stdcall;
+{$EXTERNALSYM RegisterHotKey}
+
+function UnregisterHotKey(hWnd: HWND; id: Integer): BOOL; stdcall;
+{$EXTERNALSYM UnregisterHotKey}
+
+const
+ MOD_ALT = $0001;
+ {$EXTERNALSYM MOD_ALT}
+ MOD_CONTROL = $0002;
+ {$EXTERNALSYM MOD_CONTROL}
+ MOD_SHIFT = $0004;
+ {$EXTERNALSYM MOD_SHIFT}
+ MOD_WIN = $0008;
+ {$EXTERNALSYM MOD_WIN}
+
+ IDHOT_SNAPWINDOW = DWORD(-1); // SHIFT-PRINTSCRN
+ {$EXTERNALSYM IDHOT_SNAPWINDOW}
+ IDHOT_SNAPDESKTOP = DWORD(-2); // PRINTSCRN
+ {$EXTERNALSYM IDHOT_SNAPDESKTOP}
+
+const
+ ENDSESSION_LOGOFF = DWORD($80000000);
+ {$EXTERNALSYM ENDSESSION_LOGOFF}
+
+ EWX_LOGOFF = 0;
+ {$EXTERNALSYM EWX_LOGOFF}
+ EWX_SHUTDOWN = $00000001;
+ {$EXTERNALSYM EWX_SHUTDOWN}
+ EWX_REBOOT = $00000002;
+ {$EXTERNALSYM EWX_REBOOT}
+ EWX_FORCE = $00000004;
+ {$EXTERNALSYM EWX_FORCE}
+ EWX_POWEROFF = $00000008;
+ {$EXTERNALSYM EWX_POWEROFF}
+ EWX_FORCEIFHUNG = $00000010;
+ {$EXTERNALSYM EWX_FORCEIFHUNG}
+
+function ExitWindows(dwReserved: DWORD; uREserved: UINT): BOOL;
+{$EXTERNALSYM ExitWindows}
+
+function ExitWindowsEx(uFlags: UINT; dwReserved: DWORD): BOOL; stdcall;
+{$EXTERNALSYM ExitWindowsEx}
+
+function SwapMouseButton(fSwap: BOOL): BOOL; stdcall;
+{$EXTERNALSYM SwapMouseButton}
+
+function GetMessagePos: DWORD; stdcall;
+{$EXTERNALSYM GetMessagePos}
+
+function GetMessageTime: LONG; stdcall;
+{$EXTERNALSYM GetMessageTime}
+
+function GetMessageExtraInfo: LPARAM; stdcall;
+{$EXTERNALSYM GetMessageExtraInfo}
+
+function SetMessageExtraInfo(lParam: LPARAM): LPARAM; stdcall;
+{$EXTERNALSYM SetMessageExtraInfo}
+
+function SendMessageA(hWnd: HWND; Msg: UINT; wParam: WPARAM; lParam: LPARAM): LRESULT; stdcall;
+{$EXTERNALSYM SendMessageA}
+function SendMessageW(hWnd: HWND; Msg: UINT; wParam: WPARAM; lParam: LPARAM): LRESULT; stdcall;
+{$EXTERNALSYM SendMessageW}
+function SendMessage(hWnd: HWND; Msg: UINT; wParam: WPARAM; lParam: LPARAM): LRESULT; stdcall;
+{$EXTERNALSYM SendMessage}
+
+function SendMessageTimeoutA(hWnd: HWND; Msg: UINT; wParam: WPARAM; lParam: LPARAM;
+ fuFlags, uTimeout: UINT; var lpdwResult: DWORD_PTR): LRESULT; stdcall;
+{$EXTERNALSYM SendMessageTimeoutA}
+function SendMessageTimeoutW(hWnd: HWND; Msg: UINT; wParam: WPARAM; lParam: LPARAM;
+ fuFlags, uTimeout: UINT; var lpdwResult: DWORD_PTR): LRESULT; stdcall;
+{$EXTERNALSYM SendMessageTimeoutW}
+function SendMessageTimeout(hWnd: HWND; Msg: UINT; wParam: WPARAM; lParam: LPARAM;
+ fuFlags, uTimeout: UINT; var lpdwResult: DWORD_PTR): LRESULT; stdcall;
+{$EXTERNALSYM SendMessageTimeout}
+
+function SendNotifyMessageA(hWnd: HWND; Msg: UINT; wParam: WPARAM; lParam: LPARAM): BOOL; stdcall;
+{$EXTERNALSYM SendNotifyMessageA}
+function SendNotifyMessageW(hWnd: HWND; Msg: UINT; wParam: WPARAM; lParam: LPARAM): BOOL; stdcall;
+{$EXTERNALSYM SendNotifyMessageW}
+function SendNotifyMessage(hWnd: HWND; Msg: UINT; wParam: WPARAM; lParam: LPARAM): BOOL; stdcall;
+{$EXTERNALSYM SendNotifyMessage}
+
+function SendMessageCallbackA(hWnd: HWND; Msg: UINT; wParam: WPARAM; lParam: LPARAM;
+ lpResultCallBack: SENDASYNCPROC; dwData: ULONG_PTR): BOOL; stdcall;
+{$EXTERNALSYM SendMessageCallbackA}
+function SendMessageCallbackW(hWnd: HWND; Msg: UINT; wParam: WPARAM; lParam: LPARAM;
+ lpResultCallBack: SENDASYNCPROC; dwData: ULONG_PTR): BOOL; stdcall;
+{$EXTERNALSYM SendMessageCallbackW}
+function SendMessageCallback(hWnd: HWND; Msg: UINT; wParam: WPARAM; lParam: LPARAM;
+ lpResultCallBack: SENDASYNCPROC; dwData: ULONG_PTR): BOOL; stdcall;
+{$EXTERNALSYM SendMessageCallback}
+
+type
+ BSMINFO = record
+ cbSize: UINT;
+ hdesk: HDESK;
+ hwnd: HWND;
+ luid: LUID;
+ end;
+ {$EXTERNALSYM BSMINFO}
+ PBSMINFO = ^BSMINFO;
+ TBsmInfo = BSMINFO;
+
+function BroadcastSystemMessageExA(dwFlags: DWORD; lpwRecipients: LPDWORD; uiMessage: UINT;
+ wParam: WPARAM; lParam: LPARAM; pBSMInfo: PBSMINFO): Longint; stdcall;
+{$EXTERNALSYM BroadcastSystemMessageExA}
+function BroadcastSystemMessageExW(dwFlags: DWORD; lpwRecipients: LPDWORD; uiMessage: UINT;
+ wParam: WPARAM; lParam: LPARAM; pBSMInfo: PBSMINFO): Longint; stdcall;
+{$EXTERNALSYM BroadcastSystemMessageExW}
+function BroadcastSystemMessageEx(dwFlags: DWORD; lpwRecipients: LPDWORD; uiMessage: UINT;
+ wParam: WPARAM; lParam: LPARAM; pBSMInfo: PBSMINFO): Longint; stdcall;
+{$EXTERNALSYM BroadcastSystemMessageEx}
+
+function BroadcastSystemMessageA(dwFlags: DWORD; lpdwRecipients: LPDWORD;
+ uiMessage: UINT; wParam: WPARAM; lParam: LPARAM): Longint; stdcall;
+{$EXTERNALSYM BroadcastSystemMessageA}
+function BroadcastSystemMessageW(dwFlags: DWORD; lpdwRecipients: LPDWORD;
+ uiMessage: UINT; wParam: WPARAM; lParam: LPARAM): Longint; stdcall;
+{$EXTERNALSYM BroadcastSystemMessageW}
+function BroadcastSystemMessage(dwFlags: DWORD; lpdwRecipients: LPDWORD;
+ uiMessage: UINT; wParam: WPARAM; lParam: LPARAM): Longint; stdcall;
+{$EXTERNALSYM BroadcastSystemMessage}
+
+//Broadcast Special Message Recipient list
+
+const
+ BSM_ALLCOMPONENTS = $00000000;
+ {$EXTERNALSYM BSM_ALLCOMPONENTS}
+ BSM_VXDS = $00000001;
+ {$EXTERNALSYM BSM_VXDS}
+ BSM_NETDRIVER = $00000002;
+ {$EXTERNALSYM BSM_NETDRIVER}
+ BSM_INSTALLABLEDRIVERS = $00000004;
+ {$EXTERNALSYM BSM_INSTALLABLEDRIVERS}
+ BSM_APPLICATIONS = $00000008;
+ {$EXTERNALSYM BSM_APPLICATIONS}
+ BSM_ALLDESKTOPS = $00000010;
+ {$EXTERNALSYM BSM_ALLDESKTOPS}
+
+//Broadcast Special Message Flags
+
+ BSF_QUERY = $00000001;
+ {$EXTERNALSYM BSF_QUERY}
+ BSF_IGNORECURRENTTASK = $00000002;
+ {$EXTERNALSYM BSF_IGNORECURRENTTASK}
+ BSF_FLUSHDISK = $00000004;
+ {$EXTERNALSYM BSF_FLUSHDISK}
+ BSF_NOHANG = $00000008;
+ {$EXTERNALSYM BSF_NOHANG}
+ BSF_POSTMESSAGE = $00000010;
+ {$EXTERNALSYM BSF_POSTMESSAGE}
+ BSF_FORCEIFHUNG = $00000020;
+ {$EXTERNALSYM BSF_FORCEIFHUNG}
+ BSF_NOTIMEOUTIFNOTHUNG = $00000040;
+ {$EXTERNALSYM BSF_NOTIMEOUTIFNOTHUNG}
+ BSF_ALLOWSFW = $00000080;
+ {$EXTERNALSYM BSF_ALLOWSFW}
+ BSF_SENDNOTIFYMESSAGE = $00000100;
+ {$EXTERNALSYM BSF_SENDNOTIFYMESSAGE}
+
+ BSF_RETURNHDESK = $00000200;
+ {$EXTERNALSYM BSF_RETURNHDESK}
+ BSF_LUID = $00000400;
+ {$EXTERNALSYM BSF_LUID}
+
+ BROADCAST_QUERY_DENY = $424D5144; // Return this value to deny a query.
+ {$EXTERNALSYM BROADCAST_QUERY_DENY}
+
+// RegisterDeviceNotification
+
+type
+ HDEVNOTIFY = PVOID;
+ {$EXTERNALSYM HDEVNOTIFY}
+ PHDEVNOTIFY = ^HDEVNOTIFY;
+ {$EXTERNALSYM PHDEVNOTIFY}
+
+const
+ DEVICE_NOTIFY_WINDOW_HANDLE = $00000000;
+ {$EXTERNALSYM DEVICE_NOTIFY_WINDOW_HANDLE}
+ DEVICE_NOTIFY_SERVICE_HANDLE = $00000001;
+ {$EXTERNALSYM DEVICE_NOTIFY_SERVICE_HANDLE}
+ DEVICE_NOTIFY_ALL_INTERFACE_CLASSES = $00000004;
+ {$EXTERNALSYM DEVICE_NOTIFY_ALL_INTERFACE_CLASSES}
+
+function RegisterDeviceNotificationA(hRecipient: HANDLE; NotificationFilter: LPVOID;
+ Flags: DWORD): HDEVNOTIFY; stdcall;
+{$EXTERNALSYM RegisterDeviceNotificationA}
+function RegisterDeviceNotificationW(hRecipient: HANDLE; NotificationFilter: LPVOID;
+ Flags: DWORD): HDEVNOTIFY; stdcall;
+{$EXTERNALSYM RegisterDeviceNotificationW}
+function RegisterDeviceNotification(hRecipient: HANDLE; NotificationFilter: LPVOID;
+ Flags: DWORD): HDEVNOTIFY; stdcall;
+{$EXTERNALSYM RegisterDeviceNotification}
+
+function UnregisterDeviceNotification(Handle: HDEVNOTIFY): BOOL; stdcall;
+{$EXTERNALSYM UnregisterDeviceNotification}
+
+function PostMessageA(hWnd: HWND; Msg: UINT; wParam: WPARAM; lParam: LPARAM): BOOL; stdcall;
+{$EXTERNALSYM PostMessageA}
+function PostMessageW(hWnd: HWND; Msg: UINT; wParam: WPARAM; lParam: LPARAM): BOOL; stdcall;
+{$EXTERNALSYM PostMessageW}
+function PostMessage(hWnd: HWND; Msg: UINT; wParam: WPARAM; lParam: LPARAM): BOOL; stdcall;
+{$EXTERNALSYM PostMessage}
+
+function PostThreadMessageA(idThread: DWORD; Msg: UINT; wParam: WPARAM; lParam: LPARAM): BOOL; stdcall;
+{$EXTERNALSYM PostThreadMessageA}
+function PostThreadMessageW(idThread: DWORD; Msg: UINT; wParam: WPARAM; lParam: LPARAM): BOOL; stdcall;
+{$EXTERNALSYM PostThreadMessageW}
+function PostThreadMessage(idThread: DWORD; Msg: UINT; wParam: WPARAM; lParam: LPARAM): BOOL; stdcall;
+{$EXTERNALSYM PostThreadMessage}
+
+function PostAppMessageA(idThread: DWORD; wMsg: UINT; wParam: WPARAM; lParam: LPARAM): BOOL;
+{$EXTERNALSYM PostAppMessageA}
+function PostAppMessageW(idThread: DWORD; wMsg: UINT; wParam: WPARAM; lParam: LPARAM): BOOL;
+{$EXTERNALSYM PostAppMessageW}
+function PostAppMessage(idThread: DWORD; wMsg: UINT; wParam: WPARAM; lParam: LPARAM): BOOL;
+{$EXTERNALSYM PostAppMessage}
+
+//
+// Special HWND value for use with PostMessage() and SendMessage()
+//
+
+const
+ HWND_BROADCAST = HWND($ffff);
+ {$EXTERNALSYM HWND_BROADCAST}
+
+ HWND_MESSAGE = HWND(-3);
+ {$EXTERNALSYM HWND_MESSAGE}
+
+function AttachThreadInput(idAttach, idAttachTo: DWORD; fAttach: BOOL): BOOL; stdcall;
+{$EXTERNALSYM AttachThreadInput}
+
+function ReplyMessage(lResult: LRESULT): BOOL; stdcall;
+{$EXTERNALSYM ReplyMessage}
+
+function WaitMessage: BOOL; stdcall;
+{$EXTERNALSYM WaitMessage}
+
+function WaitForInputIdle(hProcess: HANDLE; dwMilliseconds: DWORD): DWORD; stdcall;
+{$EXTERNALSYM WaitForInputIdle}
+
+function DefWindowProcA(hWnd: HWND; Msg: UINT; wParam: WPARAM; lParam: LPARAM): LRESULT; stdcall;
+{$EXTERNALSYM DefWindowProcA}
+function DefWindowProcW(hWnd: HWND; Msg: UINT; wParam: WPARAM; lParam: LPARAM): LRESULT; stdcall;
+{$EXTERNALSYM DefWindowProcW}
+function DefWindowProc(hWnd: HWND; Msg: UINT; wParam: WPARAM; lParam: LPARAM): LRESULT; stdcall;
+{$EXTERNALSYM DefWindowProc}
+
+procedure PostQuitMessage(nExitCode: Integer); stdcall;
+{$EXTERNALSYM PostQuitMessage}
+
+function CallWindowProcA(lpPrevWndFunc: WNDPROC; hWnd: HWND; Msg: UINT;
+ wParam: WPARAM; lParam: LPARAM): LRESULT; stdcall;
+{$EXTERNALSYM CallWindowProcA}
+function CallWindowProcW(lpPrevWndFunc: WNDPROC; hWnd: HWND; Msg: UINT;
+ wParam: WPARAM; lParam: LPARAM): LRESULT; stdcall;
+{$EXTERNALSYM CallWindowProcW}
+function CallWindowProc(lpPrevWndFunc: WNDPROC; hWnd: HWND; Msg: UINT;
+ wParam: WPARAM; lParam: LPARAM): LRESULT; stdcall;
+{$EXTERNALSYM CallWindowProc}
+
+function InSendMessage: BOOL; stdcall;
+{$EXTERNALSYM InSendMessage}
+
+function InSendMessageEx(lpReserved: LPVOID): DWORD; stdcall;
+{$EXTERNALSYM InSendMessageEx}
+
+//
+// InSendMessageEx return value
+//
+
+const
+ ISMEX_NOSEND = $00000000;
+ {$EXTERNALSYM ISMEX_NOSEND}
+ ISMEX_SEND = $00000001;
+ {$EXTERNALSYM ISMEX_SEND}
+ ISMEX_NOTIFY = $00000002;
+ {$EXTERNALSYM ISMEX_NOTIFY}
+ ISMEX_CALLBACK = $00000004;
+ {$EXTERNALSYM ISMEX_CALLBACK}
+ ISMEX_REPLIED = $00000008;
+ {$EXTERNALSYM ISMEX_REPLIED}
+
+function GetDoubleClickTime: UINT; stdcall;
+{$EXTERNALSYM GetDoubleClickTime}
+
+function SetDoubleClickTime(uInterval: UINT): BOOL; stdcall;
+{$EXTERNALSYM SetDoubleClickTime}
+
+function RegisterClassA(const lpWndClass: WNDCLASSA): ATOM; stdcall;
+{$EXTERNALSYM RegisterClassA}
+function RegisterClassW(const lpWndClass: WNDCLASSW): ATOM; stdcall;
+{$EXTERNALSYM RegisterClassW}
+function RegisterClass(const lpWndClass: WNDCLASS): ATOM; stdcall;
+{$EXTERNALSYM RegisterClass}
+
+function UnregisterClassA(lpClassName: LPCSTR; hInstance: HINSTANCE): BOOL; stdcall;
+{$EXTERNALSYM UnregisterClassA}
+function UnregisterClassW(lpClassName: LPCWSTR; hInstance: HINSTANCE): BOOL; stdcall;
+{$EXTERNALSYM UnregisterClassW}
+function UnregisterClass(lpClassName: LPCTSTR; hInstance: HINSTANCE): BOOL; stdcall;
+{$EXTERNALSYM UnregisterClass}
+
+function GetClassInfoA(hInstance: HINSTANCE; lpClassName: LPCSTR;
+ var lpWndClass: WNDCLASSA): BOOL; stdcall;
+{$EXTERNALSYM GetClassInfoA}
+function GetClassInfoW(hInstance: HINSTANCE; lpClassName: LPCWSTR;
+ var lpWndClass: WNDCLASSW): BOOL; stdcall;
+{$EXTERNALSYM GetClassInfoW}
+function GetClassInfo(hInstance: HINSTANCE; lpClassName: LPCTSTR;
+ var lpWndClass: WNDCLASS): BOOL; stdcall;
+{$EXTERNALSYM GetClassInfo}
+
+function RegisterClassExA(const lpwcx: WNDCLASSEXA): ATOM; stdcall;
+{$EXTERNALSYM RegisterClassExA}
+function RegisterClassExW(const lpwcx: WNDCLASSEXW): ATOM; stdcall;
+{$EXTERNALSYM RegisterClassExW}
+function RegisterClassEx(const lpwcx: WNDCLASSEX): ATOM; stdcall;
+{$EXTERNALSYM RegisterClassEx}
+
+function GetClassInfoExA(hinst: HINSTANCE; lpszClass: LPCSTR; var lpwcx: WNDCLASSEXA): BOOL; stdcall;
+{$EXTERNALSYM GetClassInfoExA}
+function GetClassInfoExW(hinst: HINSTANCE; lpszClass: LPCWSTR; var lpwcx: WNDCLASSEXW): BOOL; stdcall;
+{$EXTERNALSYM GetClassInfoExW}
+function GetClassInfoEx(hinst: HINSTANCE; lpszClass: LPCTSTR; var lpwcx: WNDCLASSEX): BOOL; stdcall;
+{$EXTERNALSYM GetClassInfoEx}
+
+const
+ CW_USEDEFAULT = Integer($80000000);
+ {$EXTERNALSYM CW_USEDEFAULT}
+
+//
+// Special value for CreateWindow, et al.
+//
+
+const
+ HWND_DESKTOP = HWND(0);
+ {$EXTERNALSYM HWND_DESKTOP}
+
+type
+ PREGISTERCLASSNAMEW = function(p: LPCWSTR): LongBool; stdcall;
+ {$EXTERNALSYM PREGISTERCLASSNAMEW}
+
+function CreateWindowExA(dwExStyle: DWORD; lpClassName, lpWindowName: LPCSTR;
+ dwStyle: DWORD; X, Y, nWidth, nHeight: Integer; hWndParent: HWND;
+ hMenu: HMENU; hInstance: HINSTANCE; lpParam: LPVOID): HWND; stdcall;
+{$EXTERNALSYM CreateWindowExA}
+function CreateWindowExW(dwExStyle: DWORD; lpClassName, lpWindowName: LPCWSTR;
+ dwStyle: DWORD; X, Y, nWidth, nHeight: Integer; hWndParent: HWND;
+ hMenu: HMENU; hInstance: HINSTANCE; lpParam: LPVOID): HWND; stdcall;
+{$EXTERNALSYM CreateWindowExW}
+function CreateWindowEx(dwExStyle: DWORD; lpClassName, lpWindowName: LPCTSTR;
+ dwStyle: DWORD; X, Y, nWidth, nHeight: Integer; hWndParent: HWND;
+ hMenu: HMENU; hInstance: HINSTANCE; lpParam: LPVOID): HWND; stdcall;
+{$EXTERNALSYM CreateWindowEx}
+
+function CreateWindowA(lpClassName, lpWindowName: LPCSTR; dwStyle: DWORD;
+ x, y, nWidth, nHeight: Integer; hWndParent: HWND; hMenu: HMENU;
+ hInstance: HINSTANCE; lpParam: LPVOID): HWND;
+{$EXTERNALSYM CreateWindowA}
+function CreateWindowW(lpClassName, lpWindowName: LPCWSTR; dwStyle: DWORD;
+ x, y, nWidth, nHeight: Integer; hWndParent: HWND; hMenu: HMENU;
+ hInstance: HINSTANCE; lpParam: LPVOID): HWND;
+{$EXTERNALSYM CreateWindowW}
+function CreateWindow(lpClassName, lpWindowName: LPCTSTR; dwStyle: DWORD;
+ x, y, nWidth, nHeight: Integer; hWndParent: HWND; hMenu: HMENU;
+ hInstance: HINSTANCE; lpParam: LPVOID): HWND;
+{$EXTERNALSYM CreateWindow}
+
+function IsWindow(hWnd: HWND): BOOL; stdcall;
+{$EXTERNALSYM IsWindow}
+
+function IsMenu(hMenu: HMENU): BOOL; stdcall;
+{$EXTERNALSYM IsMenu}
+
+function IsChild(hWndParent, hWnd: HWND): BOOL; stdcall;
+{$EXTERNALSYM IsChild}
+
+function DestroyWindow(hWnd: HWND): BOOL; stdcall;
+{$EXTERNALSYM DestroyWindow}
+
+function ShowWindow(hWnd: HWND; nCmdShow: Integer): BOOL; stdcall;
+{$EXTERNALSYM ShowWindow}
+
+function AnimateWindow(hWnd: HWND; dwTime, dwFlags: DWORD): BOOL; stdcall;
+{$EXTERNALSYM AnimateWindow}
+
+function UpdateLayeredWindow(hWnd: HWND; hdcDst: HDC; pptDst: LPPOINT;
+ psize: LPSIZE; hdcSrc: HDC; pptSrc: LPPOINT; crKey: COLORREF;
+ pblend: LPBLENDFUNCTION; dwFlags: DWORD): BOOL; stdcall;
+{$EXTERNALSYM UpdateLayeredWindow}
+
+function GetLayeredWindowAttributes(hwnd: HWND; pcrKey: LPCOLORREF; pbAlpha: LPBYTE;
+ pdwFlags: LPWORD): BOOL; stdcall;
+{$EXTERNALSYM GetLayeredWindowAttributes}
+
+const
+ PW_CLIENTONLY = $00000001;
+ {$EXTERNALSYM PW_CLIENTONLY}
+
+function PrintWindow(hwnd: HWND; hdcBlt: HDC; nFlags: UINT): BOOL; stdcall;
+{$EXTERNALSYM PrintWindow}
+
+function SetLayeredWindowAttributes(hwnd: HWND; crKey: COLORREF; bAlpha: BYTE;
+ dwFlags: DWORD): BOOL; stdcall;
+{$EXTERNALSYM SetLayeredWindowAttributes}
+
+const
+ LWA_COLORKEY = $00000001;
+ {$EXTERNALSYM LWA_COLORKEY}
+ LWA_ALPHA = $00000002;
+ {$EXTERNALSYM LWA_ALPHA}
+
+ ULW_COLORKEY = $00000001;
+ {$EXTERNALSYM ULW_COLORKEY}
+ ULW_ALPHA = $00000002;
+ {$EXTERNALSYM ULW_ALPHA}
+ ULW_OPAQUE = $00000004;
+ {$EXTERNALSYM ULW_OPAQUE}
+
+function ShowWindowAsync(hWnd: HWND; nCmdShow: Integer): BOOL; stdcall;
+{$EXTERNALSYM ShowWindowAsync}
+
+function FlashWindow(hWnd: HWND; bInvert: BOOL): BOOL; stdcall;
+{$EXTERNALSYM FlashWindow}
+
+type
+ PFLASH_INFO = ^FLASH_INFO;
+ {$EXTERNALSYM PFLASH_INFO}
+ FLASH_INFO = record
+ cbSize: UINT;
+ hwnd: HWND;
+ dwFlags: DWORD;
+ uCount: UINT;
+ dwTimeout: DWORD;
+ end;
+ {$EXTERNALSYM FLASH_INFO}
+ TFlashInfo = FLASH_INFO;
+ PFlashInfo = PFLASH_INFO;
+
+function FlashWindowEx(var pfwi: FLASH_INFO): BOOL; stdcall;
+{$EXTERNALSYM FlashWindowEx}
+
+const
+ FLASHW_STOP = 0;
+ {$EXTERNALSYM FLASHW_STOP}
+ FLASHW_CAPTION = $00000001;
+ {$EXTERNALSYM FLASHW_CAPTION}
+ FLASHW_TRAY = $00000002;
+ {$EXTERNALSYM FLASHW_TRAY}
+ FLASHW_ALL = FLASHW_CAPTION or FLASHW_TRAY;
+ {$EXTERNALSYM FLASHW_ALL}
+ FLASHW_TIMER = $00000004;
+ {$EXTERNALSYM FLASHW_TIMER}
+ FLASHW_TIMERNOFG = $0000000C;
+ {$EXTERNALSYM FLASHW_TIMERNOFG}
+
+function ShowOwnedPopups(hWnd: HWND; fShow: BOOL): BOOL; stdcall;
+{$EXTERNALSYM ShowOwnedPopups}
+
+function OpenIcon(hWnd: HWND): BOOL; stdcall;
+{$EXTERNALSYM OpenIcon}
+
+function CloseWindow(hWnd: HWND): BOOL; stdcall;
+{$EXTERNALSYM CloseWindow}
+
+function MoveWindow(hWnd: HWND; X, Y, nWidth, nHeight: Integer; bRepaint: BOOL): BOOL; stdcall;
+{$EXTERNALSYM MoveWindow}
+
+function SetWindowPos(hWnd, hWndInsertAfter: HWND; X, Y, cx, cy: Integer;
+ uFlags: UINT): BOOL; stdcall;
+{$EXTERNALSYM SetWindowPos}
+
+function GetWindowPlacement(hWnd: HWND; var lpwndpl: WINDOWPLACEMENT): BOOL; stdcall;
+{$EXTERNALSYM GetWindowPlacement}
+
+function SetWindowPlacement(hWnd: HWND; const lpwndpl: WINDOWPLACEMENT): BOOL; stdcall;
+{$EXTERNALSYM SetWindowPlacement}
+
+function BeginDeferWindowPos(nNumWindows: Integer): HDWP; stdcall;
+{$EXTERNALSYM BeginDeferWindowPos}
+
+function DeferWindowPos(hWinPosInfo: HDWP; hWnd, hWndInsertAfter: HWND;
+ x, y, cx, cy: Integer; uFlags: UINT): HDWP; stdcall;
+{$EXTERNALSYM DeferWindowPos}
+
+function EndDeferWindowPos(hWinPosInfo: HDWP): BOOL; stdcall;
+{$EXTERNALSYM EndDeferWindowPos}
+
+function IsWindowVisible(hWnd: HWND): BOOL; stdcall;
+{$EXTERNALSYM IsWindowVisible}
+
+function IsIconic(hWnd: HWND): BOOL; stdcall;
+{$EXTERNALSYM IsIconic}
+
+function AnyPopup: BOOL; stdcall;
+{$EXTERNALSYM AnyPopup}
+
+function BringWindowToTop(hWnd: HWND): BOOL; stdcall;
+{$EXTERNALSYM BringWindowToTop}
+
+function IsZoomed(hWnd: HWND): BOOL; stdcall;
+{$EXTERNALSYM IsZoomed}
+
+//
+// SetWindowPos Flags
+//
+
+const
+ SWP_NOSIZE = $0001;
+ {$EXTERNALSYM SWP_NOSIZE}
+ SWP_NOMOVE = $0002;
+ {$EXTERNALSYM SWP_NOMOVE}
+ SWP_NOZORDER = $0004;
+ {$EXTERNALSYM SWP_NOZORDER}
+ SWP_NOREDRAW = $0008;
+ {$EXTERNALSYM SWP_NOREDRAW}
+ SWP_NOACTIVATE = $0010;
+ {$EXTERNALSYM SWP_NOACTIVATE}
+ SWP_FRAMECHANGED = $0020; // The frame changed: send WM_NCCALCSIZE
+ {$EXTERNALSYM SWP_FRAMECHANGED}
+ SWP_SHOWWINDOW = $0040;
+ {$EXTERNALSYM SWP_SHOWWINDOW}
+ SWP_HIDEWINDOW = $0080;
+ {$EXTERNALSYM SWP_HIDEWINDOW}
+ SWP_NOCOPYBITS = $0100;
+ {$EXTERNALSYM SWP_NOCOPYBITS}
+ SWP_NOOWNERZORDER = $0200; // Don't do owner Z ordering
+ {$EXTERNALSYM SWP_NOOWNERZORDER}
+ SWP_NOSENDCHANGING = $0400; // Don't send WM_WINDOWPOSCHANGING
+ {$EXTERNALSYM SWP_NOSENDCHANGING}
+
+ SWP_DRAWFRAME = SWP_FRAMECHANGED;
+ {$EXTERNALSYM SWP_DRAWFRAME}
+ SWP_NOREPOSITION = SWP_NOOWNERZORDER;
+ {$EXTERNALSYM SWP_NOREPOSITION}
+
+ SWP_DEFERERASE = $2000;
+ {$EXTERNALSYM SWP_DEFERERASE}
+ SWP_ASYNCWINDOWPOS = $4000;
+ {$EXTERNALSYM SWP_ASYNCWINDOWPOS}
+
+ HWND_TOP = HWND(0);
+ {$EXTERNALSYM HWND_TOP}
+ HWND_BOTTOM = HWND(1);
+ {$EXTERNALSYM HWND_BOTTOM}
+ HWND_TOPMOST = HWND(-1);
+ {$EXTERNALSYM HWND_TOPMOST}
+ HWND_NOTOPMOST = HWND(-2);
+ {$EXTERNALSYM HWND_NOTOPMOST}
+
+//
+// WARNING:
+// The following structures must NOT be DWORD padded because they are
+// followed by strings, etc that do not have to be DWORD aligned.
+//
+
+// #include <pshpack2.h>
+
+//
+// original NT 32 bit dialog template:
+//
+
+type
+ DLGTEMPLATE = packed record
+ style: DWORD;
+ dwExtendedStyle: DWORD;
+ cdit: WORD;
+ x: short;
+ y: short;
+ cx: short;
+ cy: short;
+ end;
+ {$EXTERNALSYM DLGTEMPLATE}
+ TDlgTemplate = DLGTEMPLATE;
+
+ LPDLGTEMPLATEA = ^DLGTEMPLATE;
+ {$EXTERNALSYM LPDLGTEMPLATEA}
+ LPDLGTEMPLATEW = ^DLGTEMPLATE;
+ {$EXTERNALSYM LPDLGTEMPLATEW}
+
+ LPCDLGTEMPLATEA = ^DLGTEMPLATE;
+ {$EXTERNALSYM LPCDLGTEMPLATEA}
+ LPCDLGTEMPLATEW = ^DLGTEMPLATE;
+ {$EXTERNALSYM LPCDLGTEMPLATEW}
+
+ {$IFDEF UNICODE}
+ LPDLGTEMPLATE = LPDLGTEMPLATEW;
+ {$EXTERNALSYM LPDLGTEMPLATE}
+ LPCDLGTEMPLATE = LPCDLGTEMPLATEW;
+ {$EXTERNALSYM LPCDLGTEMPLATE}
+ {$ELSE}
+ LPDLGTEMPLATE = LPDLGTEMPLATEA;
+ {$EXTERNALSYM LPDLGTEMPLATE}
+ LPCDLGTEMPLATE = LPCDLGTEMPLATEA;
+ {$EXTERNALSYM LPCDLGTEMPLATE}
+ {$ENDIF UNICODE}
+
+//
+// 32 bit Dialog item template.
+//
+
+ DLGITEMTEMPLATE = packed record
+ style: DWORD;
+ dwExtendedStyle: DWORD;
+ x: short;
+ y: short;
+ cx: short;
+ cy: short;
+ id: WORD;
+ end;
+ {$EXTERNALSYM DLGITEMTEMPLATE}
+ TDlgItemTemplate = DLGITEMTEMPLATE;
+
+ PDLGITEMTEMPLATEA = ^DLGITEMTEMPLATE;
+ {$EXTERNALSYM PDLGITEMTEMPLATE}
+ PDLGITEMTEMPLATEW = ^DLGITEMTEMPLATE;
+ {$EXTERNALSYM PDLGITEMTEMPLATE}
+
+ LPDLGITEMTEMPLATEA = ^DLGITEMTEMPLATE;
+ {$EXTERNALSYM LPDLGITEMTEMPLATE}
+ LPDLGITEMTEMPLATEW = ^DLGITEMTEMPLATE;
+ {$EXTERNALSYM LPDLGITEMTEMPLATE}
+
+ {$IFDEF UNICODE}
+ PDLGITEMTEMPLATE = PDLGITEMTEMPLATEW;
+ {$EXTERNALSYM PDLGITEMTEMPLATE}
+ LPDLGITEMTEMPLATE = PDLGITEMTEMPLATEW;
+ {$EXTERNALSYM LPDLGITEMTEMPLATE}
+ {$ELSE}
+ PDLGITEMTEMPLATE = PDLGITEMTEMPLATEA;
+ {$EXTERNALSYM PDLGITEMTEMPLATE}
+ LPDLGITEMTEMPLATE = PDLGITEMTEMPLATEA;
+ {$EXTERNALSYM LPDLGITEMTEMPLATE}
+ {$ENDIF UNICODE}
+
+// #include <poppack.h> // Resume normal packing//
+
+function CreateDialogParamA(hInstance: HINSTANCE; lpTemplateName: LPCSTR;
+ hWndParent: HWND; lpDialogFunc: DLGPROC; dwInitParam: LPARAM): HWND; stdcall;
+{$EXTERNALSYM CreateDialogParamA}
+function CreateDialogParamW(hInstance: HINSTANCE; lpTemplateName: LPCWSTR;
+ hWndParent: HWND; lpDialogFunc: DLGPROC; dwInitParam: LPARAM): HWND; stdcall;
+{$EXTERNALSYM CreateDialogParamW}
+function CreateDialogParam(hInstance: HINSTANCE; lpTemplateName: LPCTSTR;
+ hWndParent: HWND; lpDialogFunc: DLGPROC; dwInitParam: LPARAM): HWND; stdcall;
+{$EXTERNALSYM CreateDialogParam}
+
+function CreateDialogIndirectParamA(hInstance: HINSTANCE; const lpTemplate: DLGTEMPLATE;
+ hWndParent: HWND; lpDialogFunc: DLGPROC; dwInitParam: LPARAM): HWND; stdcall;
+{$EXTERNALSYM CreateDialogIndirectParamA}
+function CreateDialogIndirectParamW(hInstance: HINSTANCE; const lpTemplate: DLGTEMPLATE;
+ hWndParent: HWND; lpDialogFunc: DLGPROC; dwInitParam: LPARAM): HWND; stdcall;
+{$EXTERNALSYM CreateDialogIndirectParamW}
+function CreateDialogIndirectParam(hInstance: HINSTANCE; const lpTemplate: DLGTEMPLATE;
+ hWndParent: HWND; lpDialogFunc: DLGPROC; dwInitParam: LPARAM): HWND; stdcall;
+{$EXTERNALSYM CreateDialogIndirectParam}
+
+function CreateDialogA(hInstance: HINSTANCE; lpName: LPCSTR; hWndParent: HWND;
+ lpDialogFunc: DLGPROC): HWND;
+{$EXTERNALSYM CreateDialogA}
+function CreateDialogW(hInstance: HINSTANCE; lpName: LPCWSTR; hWndParent: HWND;
+ lpDialogFunc: DLGPROC): HWND;
+{$EXTERNALSYM CreateDialogW}
+function CreateDialog(hInstance: HINSTANCE; lpName: LPCTSTR; hWndParent: HWND;
+ lpDialogFunc: DLGPROC): HWND;
+{$EXTERNALSYM CreateDialog}
+
+function CreateDialogIndirectA(hInstance: HINSTANCE; const lpTemplate: DLGTEMPLATE;
+ hWndParent: HWND; lpDialogFunc: DLGPROC): HWND;
+{$EXTERNALSYM CreateDialogIndirectA}
+function CreateDialogIndirectW(hInstance: HINSTANCE; const lpTemplate: DLGTEMPLATE;
+ hWndParent: HWND; lpDialogFunc: DLGPROC): HWND;
+{$EXTERNALSYM CreateDialogIndirectW}
+function CreateDialogIndirect(hInstance: HINSTANCE; const lpTemplate: DLGTEMPLATE;
+ hWndParent: HWND; lpDialogFunc: DLGPROC): HWND;
+{$EXTERNALSYM CreateDialogIndirect}
+
+function DialogBoxParamA(hInstance: HINSTANCE; lpTemplateName: LPCSTR;
+ hWndParent: HWND; lpDialogFunc: DLGPROC; dwInitParam: LPARAM): INT_PTR; stdcall;
+{$EXTERNALSYM DialogBoxParamA}
+function DialogBoxParamW(hInstance: HINSTANCE; lpTemplateName: LPCWSTR;
+ hWndParent: HWND; lpDialogFunc: DLGPROC; dwInitParam: LPARAM): INT_PTR; stdcall;
+{$EXTERNALSYM DialogBoxParamW}
+function DialogBoxParam(hInstance: HINSTANCE; lpTemplateName: LPCTSTR;
+ hWndParent: HWND; lpDialogFunc: DLGPROC; dwInitParam: LPARAM): INT_PTR; stdcall;
+{$EXTERNALSYM DialogBoxParam}
+
+function DialogBoxIndirectParamA(hInstance: HINSTANCE;
+ const hDialogTemplate: DLGTEMPLATE; hWndParent: HWND; lpDialogFunc: DLGPROC;
+ dwInitParam: LPARAM): INT_PTR; stdcall;
+{$EXTERNALSYM DialogBoxIndirectParamA}
+function DialogBoxIndirectParamW(hInstance: HINSTANCE;
+ const hDialogTemplate: DLGTEMPLATE; hWndParent: HWND; lpDialogFunc: DLGPROC;
+ dwInitParam: LPARAM): INT_PTR; stdcall;
+{$EXTERNALSYM DialogBoxIndirectParamW}
+function DialogBoxIndirectParam(hInstance: HINSTANCE;
+ const hDialogTemplate: DLGTEMPLATE; hWndParent: HWND; lpDialogFunc: DLGPROC;
+ dwInitParam: LPARAM): INT_PTR; stdcall;
+{$EXTERNALSYM DialogBoxIndirectParam}
+
+function DialogBoxA(hInstance: HINSTANCE; lpTemplate: LPCSTR; hWndParent: HWND;
+ lpDialogFunc: DLGPROC): INT_PTR;
+{$EXTERNALSYM DialogBoxA}
+function DialogBoxW(hInstance: HINSTANCE; lpTemplate: LPCWSTR; hWndParent: HWND;
+ lpDialogFunc: DLGPROC): INT_PTR;
+{$EXTERNALSYM DialogBoxW}
+function DialogBox(hInstance: HINSTANCE; lpTemplate: LPCTSTR; hWndParent: HWND;
+ lpDialogFunc: DLGPROC): INT_PTR;
+{$EXTERNALSYM DialogBox}
+
+function DialogBoxIndirectA(hInstance: HINSTANCE; const lpTemplate: DLGTEMPLATE;
+ hWndParent: HWND; lpDialogFunc: DLGPROC): INT_PTR;
+{$EXTERNALSYM DialogBoxIndirectA}
+function DialogBoxIndirectW(hInstance: HINSTANCE; const lpTemplate: DLGTEMPLATE;
+ hWndParent: HWND; lpDialogFunc: DLGPROC): INT_PTR;
+{$EXTERNALSYM DialogBoxIndirectW}
+function DialogBoxIndirect(hInstance: HINSTANCE; const lpTemplate: DLGTEMPLATE;
+ hWndParent: HWND; lpDialogFunc: DLGPROC): INT_PTR;
+{$EXTERNALSYM DialogBoxIndirect}
+
+function EndDialog(hDlg: HWND; nResult: INT_PTR): BOOL; stdcall;
+{$EXTERNALSYM EndDialog}
+
+function GetDlgItem(hDlg: HWND; nIDDlgItem: Integer): HWND; stdcall;
+{$EXTERNALSYM GetDlgItem}
+
+function SetDlgItemInt(hDlg: HWND; nIDDlgItem: Integer; uValue: UINT; bSigned: BOOL): BOOL; stdcall;
+{$EXTERNALSYM SetDlgItemInt}
+
+function GetDlgItemInt(hDlg: HWND; nIDDlgItem: Integer; lpTranslated: LPBOOL;
+ bSigned: BOOL): UINT; stdcall;
+{$EXTERNALSYM GetDlgItemInt}
+
+function SetDlgItemTextA(hDlg: HWND; nIDDlgItem: Integer; lpString: LPCSTR): BOOL; stdcall;
+{$EXTERNALSYM SetDlgItemTextA}
+function SetDlgItemTextW(hDlg: HWND; nIDDlgItem: Integer; lpString: LPCWSTR): BOOL; stdcall;
+{$EXTERNALSYM SetDlgItemTextW}
+function SetDlgItemText(hDlg: HWND; nIDDlgItem: Integer; lpString: LPCTSTR): BOOL; stdcall;
+{$EXTERNALSYM SetDlgItemText}
+
+function GetDlgItemTextA(hDlg: HWND; nIDDlgItem: Integer; lpString: LPSTR;
+ nMaxCount: Integer): UINT; stdcall;
+{$EXTERNALSYM GetDlgItemTextA}
+function GetDlgItemTextW(hDlg: HWND; nIDDlgItem: Integer; lpString: LPWSTR;
+ nMaxCount: Integer): UINT; stdcall;
+{$EXTERNALSYM GetDlgItemTextW}
+function GetDlgItemText(hDlg: HWND; nIDDlgItem: Integer; lpString: LPTSTR;
+ nMaxCount: Integer): UINT; stdcall;
+{$EXTERNALSYM GetDlgItemText}
+
+function CheckDlgButton(hDlg: HWND; nIDButton: Integer; uCheck: UINT): BOOL; stdcall;
+{$EXTERNALSYM CheckDlgButton}
+
+function CheckRadioButton(hDlg: HWND; nIDFirstButton, nIDLastButton: Integer;
+ nIDCheckButton: Integer): BOOL; stdcall;
+{$EXTERNALSYM CheckRadioButton}
+
+function IsDlgButtonChecked(hDlg: HWND; nIDButton: Integer): UINT; stdcall;
+{$EXTERNALSYM IsDlgButtonChecked}
+
+function SendDlgItemMessageA(hDlg: HWND; nIDDlgItem: Integer; Msg: UINT;
+ wParam: WPARAM; lParam: LPARAM): LRESULT; stdcall;
+{$EXTERNALSYM SendDlgItemMessageA}
+function SendDlgItemMessageW(hDlg: HWND; nIDDlgItem: Integer; Msg: UINT;
+ wParam: WPARAM; lParam: LPARAM): LRESULT; stdcall;
+{$EXTERNALSYM SendDlgItemMessageW}
+function SendDlgItemMessage(hDlg: HWND; nIDDlgItem: Integer; Msg: UINT;
+ wParam: WPARAM; lParam: LPARAM): LRESULT; stdcall;
+{$EXTERNALSYM SendDlgItemMessage}
+
+function GetNextDlgGroupItem(hDlg: HWND; hCtl: HWND; bPrevious: BOOL): HWND; stdcall;
+{$EXTERNALSYM GetNextDlgGroupItem}
+
+function GetNextDlgTabItem(hDlg: HWND; hCtl: HWND; bPrevious: BOOL): HWND; stdcall;
+{$EXTERNALSYM GetNextDlgTabItem}
+
+function GetDlgCtrlID(hWnd: HWND): Integer; stdcall;
+{$EXTERNALSYM GetDlgCtrlID}
+
+function GetDialogBaseUnits: Longint; stdcall;
+{$EXTERNALSYM GetDialogBaseUnits(VOID v)}
+
+function DefDlgProcA(hDlg: HWND; Msg: UINT; wParam: WPARAM; lParam: LPARAM): LRESULT; stdcall;
+{$EXTERNALSYM DefDlgProcA}
+function DefDlgProcW(hDlg: HWND; Msg: UINT; wParam: WPARAM; lParam: LPARAM): LRESULT; stdcall;
+{$EXTERNALSYM DefDlgProcW}
+function DefDlgProc(hDlg: HWND; Msg: UINT; wParam: WPARAM; lParam: LPARAM): LRESULT; stdcall;
+{$EXTERNALSYM DefDlgProc}
+
+//
+// Window extra byted needed for private dialog classes.
+//
+
+const
+ DLGWINDOWEXTRA = 30;
+ {$EXTERNALSYM DLGWINDOWEXTRA}
+
+function CallMsgFilterA(lpMsg: LPMSG; nCode: Integer): BOOL; stdcall;
+{$EXTERNALSYM CallMsgFilterA}
+function CallMsgFilterW(lpMsg: LPMSG; nCode: Integer): BOOL; stdcall;
+{$EXTERNALSYM CallMsgFilterW}
+function CallMsgFilter(lpMsg: LPMSG; nCode: Integer): BOOL; stdcall;
+{$EXTERNALSYM CallMsgFilter}
+
+//
+// Clipboard Manager Functions
+//
+
+function OpenClipboard(hWndNewOwner: HWND): BOOL; stdcall;
+{$EXTERNALSYM OpenClipboard}
+
+function CloseClipboard: BOOL; stdcall;
+{$EXTERNALSYM CloseClipboard}
+
+function GetClipboardSequenceNumber: DWORD; stdcall;
+{$EXTERNALSYM GetClipboardSequenceNumber}
+
+function GetClipboardOwner: HWND; stdcall;
+{$EXTERNALSYM GetClipboardOwner}
+
+function SetClipboardViewer(hWndNewViewer: HWND): HWND; stdcall;
+{$EXTERNALSYM SetClipboardViewer}
+
+function GetClipboardViewer: HWND; stdcall;
+{$EXTERNALSYM GetClipboardViewer}
+
+function ChangeClipboardChain(hWndRemove, hWndNewNext: HWND): BOOL; stdcall;
+{$EXTERNALSYM ChangeClipboardChain}
+
+function SetClipboardData(uFormat: UINT; hMem: HANDLE): HANDLE; stdcall;
+{$EXTERNALSYM SetClipboardData}
+
+function GetClipboardData(uFormat: UINT): HANDLE; stdcall;
+{$EXTERNALSYM GetClipboardData}
+
+function RegisterClipboardFormatA(lpszFormat: LPCSTR): UINT; stdcall;
+{$EXTERNALSYM RegisterClipboardFormatA}
+function RegisterClipboardFormatW(lpszFormat: LPCWSTR): UINT; stdcall;
+{$EXTERNALSYM RegisterClipboardFormatW}
+function RegisterClipboardFormat(lpszFormat: LPCTSTR): UINT; stdcall;
+{$EXTERNALSYM RegisterClipboardFormat}
+
+function CountClipboardFormats: Integer; stdcall;
+{$EXTERNALSYM CountClipboardFormats}
+
+function EnumClipboardFormats(format: UINT): UINT; stdcall;
+{$EXTERNALSYM EnumClipboardFormats}
+
+function GetClipboardFormatNameA(format: UINT; lpszFormatName: LPSTR;
+ cchMaxCount: Integer): Integer; stdcall;
+{$EXTERNALSYM GetClipboardFormatNameA}
+function GetClipboardFormatNameW(format: UINT; lpszFormatName: LPWSTR;
+ cchMaxCount: Integer): Integer; stdcall;
+{$EXTERNALSYM GetClipboardFormatNameW}
+function GetClipboardFormatName(format: UINT; lpszFormatName: LPTSTR;
+ cchMaxCount: Integer): Integer; stdcall;
+{$EXTERNALSYM GetClipboardFormatName}
+
+function EmptyClipboard: BOOL; stdcall;
+{$EXTERNALSYM EmptyClipboard}
+
+function IsClipboardFormatAvailable(format: UINT): BOOL; stdcall;
+{$EXTERNALSYM IsClipboardFormatAvailable}
+
+function GetPriorityClipboardFormat(paFormatPriorityList: PUINT; cFormats: Integer): Integer; stdcall;
+{$EXTERNALSYM GetPriorityClipboardFormat}
+
+function GetOpenClipboardWindow: HWND; stdcall;
+{$EXTERNALSYM GetOpenClipboardWindow}
+
+//
+// Character Translation Routines
+//
+
+function CharToOemA(lpszSrc: LPCSTR; lpszDst: LPSTR): BOOL; stdcall;
+{$EXTERNALSYM CharToOemA}
+function CharToOemW(lpszSrc: LPCWSTR; lpszDst: LPSTR): BOOL; stdcall;
+{$EXTERNALSYM CharToOemW}
+function CharToOem(lpszSrc: LPCTSTR; lpszDst: LPSTR): BOOL; stdcall;
+{$EXTERNALSYM CharToOem}
+
+function OemToCharA(lpszSrc: LPCSTR; lpszDst: LPSTR): BOOL; stdcall;
+{$EXTERNALSYM OemToCharA}
+function OemToCharW(lpszSrc: LPCSTR; lpszDst: LPWSTR): BOOL; stdcall;
+{$EXTERNALSYM OemToCharW}
+function OemToChar(lpszSrc: LPCSTR; lpszDst: LPTSTR): BOOL; stdcall;
+{$EXTERNALSYM OemToChar}
+
+function CharToOemBuffA(lpszSrc: LPCSTR; lpszDst: LPSTR; cchDstLength: DWORD): BOOL; stdcall;
+{$EXTERNALSYM CharToOemBuffA}
+function CharToOemBuffW(lpszSrc: LPCWSTR; lpszDst: LPSTR; cchDstLength: DWORD): BOOL; stdcall;
+{$EXTERNALSYM CharToOemBuffW}
+function CharToOemBuff(lpszSrc: LPCTSTR; lpszDst: LPSTR; cchDstLength: DWORD): BOOL; stdcall;
+{$EXTERNALSYM CharToOemBuff}
+
+function OemToCharBuffA(lpszSrc: LPCSTR; lpszDst: LPSTR; cchDstLength: DWORD): BOOL; stdcall;
+{$EXTERNALSYM OemToCharBuffA}
+function OemToCharBuffW(lpszSrc: LPCSTR; lpszDst: LPWSTR; cchDstLength: DWORD): BOOL; stdcall;
+{$EXTERNALSYM OemToCharBuffW}
+function OemToCharBuff(lpszSrc: LPCSTR; lpszDst: LPTSTR; cchDstLength: DWORD): BOOL; stdcall;
+{$EXTERNALSYM OemToCharBuff}
+
+function CharUpperA(lpsz: LPSTR): LPSTR; stdcall;
+{$EXTERNALSYM CharUpperA}
+function CharUpperW(lpsz: LPWSTR): LPWSTR; stdcall;
+{$EXTERNALSYM CharUpperW}
+function CharUpper(lpsz: LPTSTR): LPTSTR; stdcall;
+{$EXTERNALSYM CharUpper}
+
+function CharUpperBuffA(lpsz: LPSTR; cchLength: DWORD): DWORD; stdcall;
+{$EXTERNALSYM CharUpperBuffA}
+function CharUpperBuffW(lpsz: LPWSTR; cchLength: DWORD): DWORD; stdcall;
+{$EXTERNALSYM CharUpperBuffW}
+function CharUpperBuff(lpsz: LPTSTR; cchLength: DWORD): DWORD; stdcall;
+{$EXTERNALSYM CharUpperBuff}
+
+function CharLowerA(lpsz: LPSTR): LPSTR; stdcall;
+{$EXTERNALSYM CharLowerA}
+function CharLowerW(lpsz: LPWSTR): LPWSTR; stdcall;
+{$EXTERNALSYM CharLowerW}
+function CharLower(lpsz: LPTSTR): LPTSTR; stdcall;
+{$EXTERNALSYM CharLower}
+
+function CharLowerBuffA(lpsz: LPSTR; cchLength: DWORD): DWORD; stdcall;
+{$EXTERNALSYM CharLowerBuffA}
+function CharLowerBuffW(lpsz: LPWSTR; cchLength: DWORD): DWORD; stdcall;
+{$EXTERNALSYM CharLowerBuffW}
+function CharLowerBuff(lpsz: LPTSTR; cchLength: DWORD): DWORD; stdcall;
+{$EXTERNALSYM CharLowerBuff}
+
+function CharNextA(lpsz: LPCSTR): LPSTR; stdcall;
+{$EXTERNALSYM CharNextA}
+function CharNextW(lpsz: LPCWSTR): LPWSTR; stdcall;
+{$EXTERNALSYM CharNextW}
+function CharNext(lpsz: LPCTSTR): LPTSTR; stdcall;
+{$EXTERNALSYM CharNext}
+
+function CharPrevA(lpszStart: LPCSTR; lpszCurrent: LPCSTR): LPSTR; stdcall;
+{$EXTERNALSYM CharPrevA}
+function CharPrevW(lpszStart: LPCWSTR; lpszCurrent: LPCWSTR): LPWSTR; stdcall;
+{$EXTERNALSYM CharPrevW}
+function CharPrev(lpszStart: LPCTSTR; lpszCurrent: LPCTSTR): LPTSTR; stdcall;
+{$EXTERNALSYM CharPrev}
+
+function CharNextExA(CodePage: WORD; lpCurrentChar: LPCSTR; dwFlags: DWORD): LPSTR; stdcall;
+{$EXTERNALSYM CharNextExA}
+
+function CharPrevExA(CodePage: WORD; lpStart, lpCurrentChar: LPCSTR; dwFlags: DWORD): LPSTR; stdcall;
+{$EXTERNALSYM CharPrevExA}
+
+//
+// Compatibility defines for character translation routines
+//
+
+function AnsiToOem(lpszSrc: LPCSTR; lpszDst: LPSTR): BOOL;
+{$EXTERNALSYM AnsiToOem}
+
+function OemToAnsi(lpszSrc: LPCSTR; lpszDst: LPSTR): BOOL;
+{$EXTERNALSYM OemToAnsi}
+
+function AnsiToOemBuff(lpszSrc: LPCSTR; lpszDst: LPSTR; cchDstLength: DWORD): BOOL;
+{$EXTERNALSYM AnsiToOemBuff}
+
+function OemToAnsiBuff(lpszSrc: LPCSTR; lpszDst: LPSTR; cchDstLength: DWORD): BOOL;
+{$EXTERNALSYM OemToAnsiBuff}
+
+function AnsiUpper(lpsz: LPSTR): LPSTR;
+{$EXTERNALSYM AnsiUpper}
+
+function AnsiUpperBuff(lpsz: LPSTR; cchLength: DWORD): DWORD;
+{$EXTERNALSYM AnsiUpperBuff}
+
+function AnsiLower(lpsz: LPSTR): LPSTR;
+{$EXTERNALSYM AnsiLower}
+
+function AnsiLowerBuff(lpsz: LPSTR; cchLength: DWORD): DWORD;
+{$EXTERNALSYM AnsiLowerBuff}
+
+function AnsiNext(lpsz: LPCSTR): LPSTR;
+{$EXTERNALSYM AnsiNext}
+
+function AnsiPrev(lpszStart: LPCSTR; lpszCurrent: LPCSTR): LPSTR;
+{$EXTERNALSYM AnsiPrev}
+
+//
+// Language dependent Routines
+//
+
+function IsCharAlphaA(ch: CHAR): BOOL; stdcall;
+{$EXTERNALSYM IsCharAlphaA}
+function IsCharAlphaW(ch: WCHAR): BOOL; stdcall;
+{$EXTERNALSYM IsCharAlphaW}
+function IsCharAlpha(ch: TCHAR): BOOL; stdcall;
+{$EXTERNALSYM IsCharAlpha}
+
+function IsCharAlphaNumericA(ch: CHAR): BOOL; stdcall;
+{$EXTERNALSYM IsCharAlphaNumericA}
+function IsCharAlphaNumericW(ch: WCHAR): BOOL; stdcall;
+{$EXTERNALSYM IsCharAlphaNumericW}
+function IsCharAlphaNumeric(ch: TCHAR): BOOL; stdcall;
+{$EXTERNALSYM IsCharAlphaNumeric}
+
+function IsCharUpperA(ch: CHAR): BOOL; stdcall;
+{$EXTERNALSYM IsCharUpperA}
+function IsCharUpperW(ch: WCHAR): BOOL; stdcall;
+{$EXTERNALSYM IsCharUpperW}
+function IsCharUpper(ch: TCHAR): BOOL; stdcall;
+{$EXTERNALSYM IsCharUpper}
+
+function IsCharLowerA(ch: CHAR): BOOL; stdcall;
+{$EXTERNALSYM IsCharLowerA}
+function IsCharLowerW(ch: WCHAR): BOOL; stdcall;
+{$EXTERNALSYM IsCharLowerW}
+function IsCharLower(ch: TCHAR): BOOL; stdcall;
+{$EXTERNALSYM IsCharLower}
+
+function SetFocus(hWnd: HWND): HWND; stdcall;
+{$EXTERNALSYM SetFocus}
+
+function GetActiveWindow: HWND; stdcall;
+{$EXTERNALSYM GetActiveWindow}
+
+function GetFocus: HWND; stdcall;
+{$EXTERNALSYM GetFocus}
+
+function GetKBCodePage: UINT; stdcall;
+{$EXTERNALSYM GetKBCodePage}
+
+function GetKeyState(nVirtKey: Integer): SHORT; stdcall;
+{$EXTERNALSYM GetKeyState}
+
+function GetAsyncKeyState(vKey: Integer): SHORT; stdcall;
+{$EXTERNALSYM GetAsyncKeyState}
+
+function GetKeyboardState(lpKeyState: LPBYTE): BOOL; stdcall;
+{$EXTERNALSYM GetKeyboardState}
+
+function SetKeyboardState(lpKeyState: LPBYTE): BOOL; stdcall;
+{$EXTERNALSYM SetKeyboardState}
+
+function GetKeyNameTextA(lParam: LONG; lpString: LPSTR; nSize: Integer): Integer; stdcall;
+{$EXTERNALSYM GetKeyNameTextA}
+function GetKeyNameTextW(lParam: LONG; lpString: LPWSTR; nSize: Integer): Integer; stdcall;
+{$EXTERNALSYM GetKeyNameTextW}
+function GetKeyNameText(lParam: LONG; lpString: LPTSTR; nSize: Integer): Integer; stdcall;
+{$EXTERNALSYM GetKeyNameText}
+
+function GetKeyboardType(nTypeFlag: Integer): Integer; stdcall;
+{$EXTERNALSYM GetKeyboardType}
+
+function ToAscii(uVirtKey, uScanCode: UINT; lpKeyState: PBYTE; lpChar: LPWORD;
+ uFlags: UINT): Integer; stdcall;
+{$EXTERNALSYM ToAscii}
+
+function ToAsciiEx(uVirtKey, uScanCode: UINT; lpKeyState: PBYTE; lpChar: LPWORD;
+ uFlags: UINT; dwhkl: HKL): Integer; stdcall;
+{$EXTERNALSYM ToAsciiEx}
+
+function ToUnicode(wVirtKey, wScanCode: UINT; lpKeyState: PBYTE; pwszBuff: LPWSTR;
+ cchBuff: Integer; wFlags: UINT): Integer; stdcall;
+{$EXTERNALSYM ToUnicode}
+
+function OemKeyScan(wOemChar: WORD): DWORD; stdcall;
+{$EXTERNALSYM OemKeyScan}
+
+function VkKeyScanA(ch: CHAR): SHORT; stdcall;
+{$EXTERNALSYM VkKeyScanA}
+function VkKeyScanW(ch: WCHAR): SHORT; stdcall;
+{$EXTERNALSYM VkKeyScanW}
+function VkKeyScan(ch: TCHAR): SHORT; stdcall;
+{$EXTERNALSYM VkKeyScan}
+
+function VkKeyScanExA(ch: CHAR; dwhkl: HKL): SHORT; stdcall;
+{$EXTERNALSYM VkKeyScanExA}
+function VkKeyScanExW(ch: WCHAR; dwhkl: HKL): SHORT; stdcall;
+{$EXTERNALSYM VkKeyScanExW}
+function VkKeyScanEx(ch: TCHAR; dwhkl: HKL): SHORT; stdcall;
+{$EXTERNALSYM VkKeyScanEx}
+
+const
+ KEYEVENTF_EXTENDEDKEY = $0001;
+ {$EXTERNALSYM KEYEVENTF_EXTENDEDKEY}
+ KEYEVENTF_KEYUP = $0002;
+ {$EXTERNALSYM KEYEVENTF_KEYUP}
+
+ KEYEVENTF_UNICODE = $0004;
+ {$EXTERNALSYM KEYEVENTF_UNICODE}
+ KEYEVENTF_SCANCODE = $0008;
+ {$EXTERNALSYM KEYEVENTF_SCANCODE}
+
+procedure keybd_event(bVk, bScan: BYTE; dwFlags: DWORD; dwExtraInfo: ULONG_PTR); stdcall;
+{$EXTERNALSYM keybd_event}
+
+const
+ MOUSEEVENTF_MOVE = $0001; // mouse move
+ {$EXTERNALSYM MOUSEEVENTF_MOVE}
+ MOUSEEVENTF_LEFTDOWN = $0002; // left button down
+ {$EXTERNALSYM MOUSEEVENTF_LEFTDOWN}
+ MOUSEEVENTF_LEFTUP = $0004; // left button up
+ {$EXTERNALSYM MOUSEEVENTF_LEFTUP}
+ MOUSEEVENTF_RIGHTDOWN = $0008; // right button down
+ {$EXTERNALSYM MOUSEEVENTF_RIGHTDOWN}
+ MOUSEEVENTF_RIGHTUP = $0010; // right button up
+ {$EXTERNALSYM MOUSEEVENTF_RIGHTUP}
+ MOUSEEVENTF_MIDDLEDOWN = $0020; // middle button down
+ {$EXTERNALSYM MOUSEEVENTF_MIDDLEDOWN}
+ MOUSEEVENTF_MIDDLEUP = $0040; // middle button up
+ {$EXTERNALSYM MOUSEEVENTF_MIDDLEUP}
+ MOUSEEVENTF_XDOWN = $0080; // x button down
+ {$EXTERNALSYM MOUSEEVENTF_XDOWN}
+ MOUSEEVENTF_XUP = $0100; // x button down
+ {$EXTERNALSYM MOUSEEVENTF_XUP}
+ MOUSEEVENTF_WHEEL = $0800; // wheel button rolled
+ {$EXTERNALSYM MOUSEEVENTF_WHEEL}
+ MOUSEEVENTF_VIRTUALDESK = $4000; // map to entire virtual desktop
+ {$EXTERNALSYM MOUSEEVENTF_VIRTUALDESK}
+ MOUSEEVENTF_ABSOLUTE = $8000; // absolute move
+ {$EXTERNALSYM MOUSEEVENTF_ABSOLUTE}
+
+procedure mouse_event(dwFlags, dx, dy, dwData: DWORD; dwExtraInfo: ULONG_PTR); stdcall;
+{$EXTERNALSYM mouse_event}
+
+type
+ LPMOUSEINPUT = ^MOUSEINPUT;
+ {$EXTERNALSYM LPMOUSEINPUT}
+ tagMOUSEINPUT = record
+ dx: LONG;
+ dy: LONG;
+ mouseData: DWORD;
+ dwFlags: DWORD;
+ time: DWORD;
+ dwExtraInfo: ULONG_PTR;
+ end;
+ {$EXTERNALSYM MOUSEINPUT}
+ MOUSEINPUT = tagMOUSEINPUT;
+ {$EXTERNALSYM MOUSEINPUT}
+ TMouseInput = MOUSEINPUT;
+ PMouseInput = LPMOUSEINPUT;
+
+ LPKEYBDINPUT = ^KEYBDINPUT;
+ {$EXTERNALSYM LPKEYBDINPUT}
+ tagKEYBDINPUT = record
+ wVk: WORD;
+ wScan: WORD;
+ dwFlags: DWORD;
+ time: DWORD;
+ dwExtraInfo: ULONG_PTR;
+ end;
+ {$EXTERNALSYM tagKEYBDINPUT}
+ KEYBDINPUT = tagKEYBDINPUT;
+ {$EXTERNALSYM KEYBDINPUT}
+ TKeybdinput = KEYBDINPUT;
+ PKeybdInput = LPKEYBDINPUT;
+
+ LPHARDWAREINPUT = ^HARDWAREINPUT;
+ {$EXTERNALSYM LPHARDWAREINPUT}
+ tagHARDWAREINPUT = record
+ uMsg: DWORD;
+ wParamL: WORD;
+ wParamH: WORD;
+ end;
+ {$EXTERNALSYM tagHARDWAREINPUT}
+ HARDWAREINPUT = tagHARDWAREINPUT;
+ {$EXTERNALSYM HARDWAREINPUT}
+ THardwareInput = HARDWAREINPUT;
+ PHardwareInput = LPHARDWAREINPUT;
+
+const
+ INPUT_MOUSE = 0;
+ {$EXTERNALSYM INPUT_MOUSE}
+ INPUT_KEYBOARD = 1;
+ {$EXTERNALSYM INPUT_KEYBOARD}
+ INPUT_HARDWARE = 2;
+ {$EXTERNALSYM INPUT_HARDWARE}
+
+type
+ LPINPUT = ^INPUT;
+ {$EXTERNALSYM LPINPUT}
+ tagINPUT = record
+ type_: DWORD;
+ case Integer of
+ 0: (mi: MOUSEINPUT);
+ 1: (ki: KEYBDINPUT);
+ 2: (hi: HARDWAREINPUT);
+ end;
+ {$EXTERNALSYM tagINPUT}
+ INPUT = tagINPUT;
+ {$EXTERNALSYM INPUT}
+ TInput = INPUT;
+ PInput = LPINPUT;
+
+function SendInput(cInputs: UINT; pInputs: LPINPUT; cbSize: Integer): UINT; stdcall;
+{$EXTERNALSYM SendInput}
+
+type
+ PLASTINPUTINFO = ^LASTINPUTINFO;
+ tagLASTINPUTINFO = record
+ cbSize: UINT;
+ dwTime: DWORD;
+ end;
+ {$EXTERNALSYM tagLASTINPUTINFO}
+ LASTINPUTINFO = tagLASTINPUTINFO;
+ {$EXTERNALSYM LASTINPUTINFO}
+ TLastInputInfo = LASTINPUTINFO;
+
+function GetLastInputInfo(var plii: LASTINPUTINFO): BOOL; stdcall;
+{$EXTERNALSYM GetLastInputInfo}
+
+function MapVirtualKeyA(uCode, uMapType: UINT): UINT; stdcall;
+{$EXTERNALSYM MapVirtualKeyA}
+function MapVirtualKeyW(uCode, uMapType: UINT): UINT; stdcall;
+{$EXTERNALSYM MapVirtualKeyW}
+function MapVirtualKey(uCode, uMapType: UINT): UINT; stdcall;
+{$EXTERNALSYM MapVirtualKey}
+
+function MapVirtualKeyExA(uCode, uMapType: UINT; dwhkl: HKL): UINT; stdcall;
+{$EXTERNALSYM MapVirtualKeyExA}
+function MapVirtualKeyExW(uCode, uMapType: UINT; dwhkl: HKL): UINT; stdcall;
+{$EXTERNALSYM MapVirtualKeyExW}
+function MapVirtualKeyEx(uCode, uMapType: UINT; dwhkl: HKL): UINT; stdcall;
+{$EXTERNALSYM MapVirtualKeyEx}
+
+function GetInputState: BOOL; stdcall;
+{$EXTERNALSYM GetInputState}
+
+function GetQueueStatus(flags: UINT): DWORD; stdcall;
+{$EXTERNALSYM GetQueueStatus}
+
+function GetCapture: HWND; stdcall;
+{$EXTERNALSYM GetCapture}
+
+function SetCapture(hWnd: HWND): HWND; stdcall;
+{$EXTERNALSYM SetCapture}
+
+function ReleaseCapture: BOOL; stdcall;
+{$EXTERNALSYM ReleaseCapture}
+
+function MsgWaitForMultipleObjects(nCount: DWORD; pHandles: PHANDLE;
+ fWaitAll: BOOL; dwMilliseconds: DWORD; dwWakeMask: DWORD): DWORD; stdcall;
+{$EXTERNALSYM MsgWaitForMultipleObjects}
+
+function MsgWaitForMultipleObjectsEx(nCount: DWORD; pHandles: PHANDLE;
+ dwMilliseconds: DWORD; dwWakeMask: DWORD; dwFlags: DWORD): DWORD; stdcall;
+{$EXTERNALSYM MsgWaitForMultipleObjectsEx}
+
+const
+ MWMO_WAITALL = $0001;
+ {$EXTERNALSYM MWMO_WAITALL}
+ MWMO_ALERTABLE = $0002;
+ {$EXTERNALSYM MWMO_ALERTABLE}
+ MWMO_INPUTAVAILABLE = $0004;
+ {$EXTERNALSYM MWMO_INPUTAVAILABLE}
+
+//
+// Windows Functions
+//
+
+function SetTimer(hWnd: HWND; nIDEvent: UINT_PTR; uElapse: UINT;
+ lpTimerFunc: TIMERPROC): UINT_PTR; stdcall;
+{$EXTERNALSYM SetTimer}
+
+function KillTimer(hWnd: HWND; uIDEvent: UINT_PTR): BOOL; stdcall;
+{$EXTERNALSYM KillTimer}
+
+function IsWindowUnicode(hWnd: HWND): BOOL; stdcall;
+{$EXTERNALSYM IsWindowUnicode}
+
+function EnableWindow(hWnd: HWND; bEnable: BOOL): BOOL; stdcall;
+{$EXTERNALSYM EnableWindow}
+
+function IsWindowEnabled(hWnd: HWND): BOOL; stdcall;
+{$EXTERNALSYM IsWindowEnabled}
+
+function LoadAcceleratorsA(hInstance: HINSTANCE; lpTableName: LPCSTR): HACCEL; stdcall;
+{$EXTERNALSYM LoadAcceleratorsA}
+function LoadAcceleratorsW(hInstance: HINSTANCE; lpTableName: LPCWSTR): HACCEL; stdcall;
+{$EXTERNALSYM LoadAcceleratorsW}
+function LoadAccelerators(hInstance: HINSTANCE; lpTableName: LPCTSTR): HACCEL; stdcall;
+{$EXTERNALSYM LoadAccelerators}
+
+function CreateAcceleratorTableA(lpaccl: LPACCEL; cEntries: Integer): HACCEL; stdcall;
+{$EXTERNALSYM CreateAcceleratorTableA}
+function CreateAcceleratorTableW(lpaccl: LPACCEL; cEntries: Integer): HACCEL; stdcall;
+{$EXTERNALSYM CreateAcceleratorTableW}
+function CreateAcceleratorTable(lpaccl: LPACCEL; cEntries: Integer): HACCEL; stdcall;
+{$EXTERNALSYM CreateAcceleratorTable}
+
+function DestroyAcceleratorTable(hAccel: HACCEL): BOOL; stdcall;
+{$EXTERNALSYM DestroyAcceleratorTable}
+
+function CopyAcceleratorTableA(hAccelSrc: HACCEL; lpAccelDst: LPACCEL;
+ cAccelEntries: Integer): Integer; stdcall;
+{$EXTERNALSYM CopyAcceleratorTableA}
+function CopyAcceleratorTableW(hAccelSrc: HACCEL; lpAccelDst: LPACCEL;
+ cAccelEntries: Integer): Integer; stdcall;
+{$EXTERNALSYM CopyAcceleratorTableW}
+function CopyAcceleratorTable(hAccelSrc: HACCEL; lpAccelDst: LPACCEL;
+ cAccelEntries: Integer): Integer; stdcall;
+{$EXTERNALSYM CopyAcceleratorTable}
+
+function TranslateAcceleratorA(hWnd: HWND; hAccTable: HACCEL; lpMsg: LPMSG): Integer; stdcall;
+{$EXTERNALSYM TranslateAcceleratorA}
+function TranslateAcceleratorW(hWnd: HWND; hAccTable: HACCEL; lpMsg: LPMSG): Integer; stdcall;
+{$EXTERNALSYM TranslateAcceleratorW}
+function TranslateAccelerator(hWnd: HWND; hAccTable: HACCEL; lpMsg: LPMSG): Integer; stdcall;
+{$EXTERNALSYM TranslateAccelerator}
+
+//
+// GetSystemMetrics() codes
+//
+
+const
+ SM_CXSCREEN = 0;
+ {$EXTERNALSYM SM_CXSCREEN}
+ SM_CYSCREEN = 1;
+ {$EXTERNALSYM SM_CYSCREEN}
+ SM_CXVSCROLL = 2;
+ {$EXTERNALSYM SM_CXVSCROLL}
+ SM_CYHSCROLL = 3;
+ {$EXTERNALSYM SM_CYHSCROLL}
+ SM_CYCAPTION = 4;
+ {$EXTERNALSYM SM_CYCAPTION}
+ SM_CXBORDER = 5;
+ {$EXTERNALSYM SM_CXBORDER}
+ SM_CYBORDER = 6;
+ {$EXTERNALSYM SM_CYBORDER}
+ SM_CXDLGFRAME = 7;
+ {$EXTERNALSYM SM_CXDLGFRAME}
+ SM_CYDLGFRAME = 8;
+ {$EXTERNALSYM SM_CYDLGFRAME}
+ SM_CYVTHUMB = 9;
+ {$EXTERNALSYM SM_CYVTHUMB}
+ SM_CXHTHUMB = 10;
+ {$EXTERNALSYM SM_CXHTHUMB}
+ SM_CXICON = 11;
+ {$EXTERNALSYM SM_CXICON}
+ SM_CYICON = 12;
+ {$EXTERNALSYM SM_CYICON}
+ SM_CXCURSOR = 13;
+ {$EXTERNALSYM SM_CXCURSOR}
+ SM_CYCURSOR = 14;
+ {$EXTERNALSYM SM_CYCURSOR}
+ SM_CYMENU = 15;
+ {$EXTERNALSYM SM_CYMENU}
+ SM_CXFULLSCREEN = 16;
+ {$EXTERNALSYM SM_CXFULLSCREEN}
+ SM_CYFULLSCREEN = 17;
+ {$EXTERNALSYM SM_CYFULLSCREEN}
+ SM_CYKANJIWINDOW = 18;
+ {$EXTERNALSYM SM_CYKANJIWINDOW}
+ SM_MOUSEPRESENT = 19;
+ {$EXTERNALSYM SM_MOUSEPRESENT}
+ SM_CYVSCROLL = 20;
+ {$EXTERNALSYM SM_CYVSCROLL}
+ SM_CXHSCROLL = 21;
+ {$EXTERNALSYM SM_CXHSCROLL}
+ SM_DEBUG = 22;
+ {$EXTERNALSYM SM_DEBUG}
+ SM_SWAPBUTTON = 23;
+ {$EXTERNALSYM SM_SWAPBUTTON}
+ SM_RESERVED1 = 24;
+ {$EXTERNALSYM SM_RESERVED1}
+ SM_RESERVED2 = 25;
+ {$EXTERNALSYM SM_RESERVED2}
+ SM_RESERVED3 = 26;
+ {$EXTERNALSYM SM_RESERVED3}
+ SM_RESERVED4 = 27;
+ {$EXTERNALSYM SM_RESERVED4}
+ SM_CXMIN = 28;
+ {$EXTERNALSYM SM_CXMIN}
+ SM_CYMIN = 29;
+ {$EXTERNALSYM SM_CYMIN}
+ SM_CXSIZE = 30;
+ {$EXTERNALSYM SM_CXSIZE}
+ SM_CYSIZE = 31;
+ {$EXTERNALSYM SM_CYSIZE}
+ SM_CXFRAME = 32;
+ {$EXTERNALSYM SM_CXFRAME}
+ SM_CYFRAME = 33;
+ {$EXTERNALSYM SM_CYFRAME}
+ SM_CXMINTRACK = 34;
+ {$EXTERNALSYM SM_CXMINTRACK}
+ SM_CYMINTRACK = 35;
+ {$EXTERNALSYM SM_CYMINTRACK}
+ SM_CXDOUBLECLK = 36;
+ {$EXTERNALSYM SM_CXDOUBLECLK}
+ SM_CYDOUBLECLK = 37;
+ {$EXTERNALSYM SM_CYDOUBLECLK}
+ SM_CXICONSPACING = 38;
+ {$EXTERNALSYM SM_CXICONSPACING}
+ SM_CYICONSPACING = 39;
+ {$EXTERNALSYM SM_CYICONSPACING}
+ SM_MENUDROPALIGNMENT = 40;
+ {$EXTERNALSYM SM_MENUDROPALIGNMENT}
+ SM_PENWINDOWS = 41;
+ {$EXTERNALSYM SM_PENWINDOWS}
+ SM_DBCSENABLED = 42;
+ {$EXTERNALSYM SM_DBCSENABLED}
+ SM_CMOUSEBUTTONS = 43;
+ {$EXTERNALSYM SM_CMOUSEBUTTONS}
+
+ SM_CXFIXEDFRAME = SM_CXDLGFRAME; // ;win40 name change
+ {$EXTERNALSYM SM_CXFIXEDFRAME}
+ SM_CYFIXEDFRAME = SM_CYDLGFRAME; // ;win40 name change
+ {$EXTERNALSYM SM_CYFIXEDFRAME}
+ SM_CXSIZEFRAME = SM_CXFRAME; // ;win40 name change
+ {$EXTERNALSYM SM_CXSIZEFRAME}
+ SM_CYSIZEFRAME = SM_CYFRAME; // ;win40 name change
+ {$EXTERNALSYM SM_CYSIZEFRAME}
+
+ SM_SECURE = 44;
+ {$EXTERNALSYM SM_SECURE}
+ SM_CXEDGE = 45;
+ {$EXTERNALSYM SM_CXEDGE}
+ SM_CYEDGE = 46;
+ {$EXTERNALSYM SM_CYEDGE}
+ SM_CXMINSPACING = 47;
+ {$EXTERNALSYM SM_CXMINSPACING}
+ SM_CYMINSPACING = 48;
+ {$EXTERNALSYM SM_CYMINSPACING}
+ SM_CXSMICON = 49;
+ {$EXTERNALSYM SM_CXSMICON}
+ SM_CYSMICON = 50;
+ {$EXTERNALSYM SM_CYSMICON}
+ SM_CYSMCAPTION = 51;
+ {$EXTERNALSYM SM_CYSMCAPTION}
+ SM_CXSMSIZE = 52;
+ {$EXTERNALSYM SM_CXSMSIZE}
+ SM_CYSMSIZE = 53;
+ {$EXTERNALSYM SM_CYSMSIZE}
+ SM_CXMENUSIZE = 54;
+ {$EXTERNALSYM SM_CXMENUSIZE}
+ SM_CYMENUSIZE = 55;
+ {$EXTERNALSYM SM_CYMENUSIZE}
+ SM_ARRANGE = 56;
+ {$EXTERNALSYM SM_ARRANGE}
+ SM_CXMINIMIZED = 57;
+ {$EXTERNALSYM SM_CXMINIMIZED}
+ SM_CYMINIMIZED = 58;
+ {$EXTERNALSYM SM_CYMINIMIZED}
+ SM_CXMAXTRACK = 59;
+ {$EXTERNALSYM SM_CXMAXTRACK}
+ SM_CYMAXTRACK = 60;
+ {$EXTERNALSYM SM_CYMAXTRACK}
+ SM_CXMAXIMIZED = 61;
+ {$EXTERNALSYM SM_CXMAXIMIZED}
+ SM_CYMAXIMIZED = 62;
+ {$EXTERNALSYM SM_CYMAXIMIZED}
+ SM_NETWORK = 63;
+ {$EXTERNALSYM SM_NETWORK}
+ SM_CLEANBOOT = 67;
+ {$EXTERNALSYM SM_CLEANBOOT}
+ SM_CXDRAG = 68;
+ {$EXTERNALSYM SM_CXDRAG}
+ SM_CYDRAG = 69;
+ {$EXTERNALSYM SM_CYDRAG}
+ SM_SHOWSOUNDS = 70;
+ {$EXTERNALSYM SM_SHOWSOUNDS}
+ SM_CXMENUCHECK = 71; // Use instead of GetMenuCheckMarkDimensions()!
+ {$EXTERNALSYM SM_CXMENUCHECK}
+ SM_CYMENUCHECK = 72;
+ {$EXTERNALSYM SM_CYMENUCHECK}
+ SM_SLOWMACHINE = 73;
+ {$EXTERNALSYM SM_SLOWMACHINE}
+ SM_MIDEASTENABLED = 74;
+ {$EXTERNALSYM SM_MIDEASTENABLED}
+
+ SM_MOUSEWHEELPRESENT = 75;
+ {$EXTERNALSYM SM_MOUSEWHEELPRESENT}
+ SM_XVIRTUALSCREEN = 76;
+ {$EXTERNALSYM SM_XVIRTUALSCREEN}
+ SM_YVIRTUALSCREEN = 77;
+ {$EXTERNALSYM SM_YVIRTUALSCREEN}
+ SM_CXVIRTUALSCREEN = 78;
+ {$EXTERNALSYM SM_CXVIRTUALSCREEN}
+ SM_CYVIRTUALSCREEN = 79;
+ {$EXTERNALSYM SM_CYVIRTUALSCREEN}
+ SM_CMONITORS = 80;
+ {$EXTERNALSYM SM_CMONITORS}
+ SM_SAMEDISPLAYFORMAT = 81;
+ {$EXTERNALSYM SM_SAMEDISPLAYFORMAT}
+ SM_IMMENABLED = 82;
+ {$EXTERNALSYM SM_IMMENABLED}
+ SM_CXFOCUSBORDER = 83;
+ {$EXTERNALSYM SM_CXFOCUSBORDER}
+ SM_CYFOCUSBORDER = 84;
+ {$EXTERNALSYM SM_CYFOCUSBORDER}
+
+//#if(_WIN32_WINNT >= 0x0501)
+
+ SM_TABLETPC = 86;
+ {$EXTERNALSYM SM_TABLETPC}
+ SM_MEDIACENTER = 87;
+ {$EXTERNALSYM SM_MEDIACENTER}
+
+//#endif /* _WIN32_WINNT >= 0x0501 */
+
+const
+ {$IFNDEF WIN98ME_UP}
+ SM_CMETRICS = 76;
+ {$ELSE}
+ {$IFDEF WIN98ME}
+ SM_CMETRICS = 83;
+ {$ELSE}
+ SM_CMETRICS = 88;
+ {$ENDIF WIN98ME}
+ {$ENDIF !WIN98ME_UP}
+ {$EXTERNALSYM SM_CMETRICS}
+
+ SM_REMOTESESSION = $1000;
+ {$EXTERNALSYM SM_REMOTESESSION}
+ SM_SHUTTINGDOWN = $2000;
+ {$EXTERNALSYM SM_SHUTTINGDOWN}
+//#if(WINVER >= 0x0501)
+ SM_REMOTECONTROL = $2001;
+ {$EXTERNALSYM SM_REMOTECONTROL}
+//#endif /* WINVER >= 0x0501 */
+
+function GetSystemMetrics(nIndex: Integer): Integer; stdcall;
+{$EXTERNALSYM GetSystemMetrics}
+
+function LoadMenuA(hInstance: HINSTANCE; lpMenuName: LPCSTR): HMENU; stdcall;
+{$EXTERNALSYM LoadMenuA}
+function LoadMenuW(hInstance: HINSTANCE; lpMenuName: LPCWSTR): HMENU; stdcall;
+{$EXTERNALSYM LoadMenuW}
+function LoadMenu(hInstance: HINSTANCE; lpMenuName: LPCTSTR): HMENU; stdcall;
+{$EXTERNALSYM LoadMenu}
+
+function LoadMenuIndirectA(lpMenuTemplate: LPMENUTEMPLATEA): HMENU; stdcall;
+{$EXTERNALSYM LoadMenuIndirectA}
+function LoadMenuIndirectW(lpMenuTemplate: LPMENUTEMPLATEW): HMENU; stdcall;
+{$EXTERNALSYM LoadMenuIndirectW}
+function LoadMenuIndirect(lpMenuTemplate: LPMENUTEMPLATE): HMENU; stdcall;
+{$EXTERNALSYM LoadMenuIndirect}
+
+function GetMenu(hWnd: HWND): HMENU; stdcall;
+{$EXTERNALSYM GetMenu}
+
+function SetMenu(hWnd: HWND; hMenu: HMENU): BOOL; stdcall;
+{$EXTERNALSYM SetMenu}
+
+function ChangeMenuA(hMenu: HMENU; cmd: UINT; lpszNewItem: LPCSTR;
+ cmdInsert: UINT; flags: UINT): BOOL; stdcall;
+{$EXTERNALSYM ChangeMenuA}
+function ChangeMenuW(hMenu: HMENU; cmd: UINT; lpszNewItem: LPCWSTR;
+ cmdInsert: UINT; flags: UINT): BOOL; stdcall;
+{$EXTERNALSYM ChangeMenuW}
+function ChangeMenu(hMenu: HMENU; cmd: UINT; lpszNewItem: LPCTSTR;
+ cmdInsert: UINT; flags: UINT): BOOL; stdcall;
+{$EXTERNALSYM ChangeMenu}
+
+function HiliteMenuItem(hWnd: HWND; hMenu: HMENU; uIDHiliteItem: UINT; uHilite: UINT): BOOL; stdcall;
+{$EXTERNALSYM HiliteMenuItem}
+
+function GetMenuStringA(hMenu: HMENU; uIDItem: UINT; lpString: LPSTR;
+ nMaxCount: Integer; uFlag: UINT): Integer; stdcall;
+{$EXTERNALSYM GetMenuStringA}
+function GetMenuStringW(hMenu: HMENU; uIDItem: UINT; lpString: LPWSTR;
+ nMaxCount: Integer; uFlag: UINT): Integer; stdcall;
+{$EXTERNALSYM GetMenuStringW}
+function GetMenuString(hMenu: HMENU; uIDItem: UINT; lpString: LPTSTR;
+ nMaxCount: Integer; uFlag: UINT): Integer; stdcall;
+{$EXTERNALSYM GetMenuString}
+
+function GetMenuState(hMenu: HMENU; uId, uFlags: UINT): UINT; stdcall;
+{$EXTERNALSYM GetMenuState}
+
+function DrawMenuBar(hWnd: HWND): BOOL; stdcall;
+{$EXTERNALSYM DrawMenuBar}
+
+const
+ PMB_ACTIVE = $00000001;
+ {$EXTERNALSYM PMB_ACTIVE}
+
+function GetSystemMenu(hWnd: HWND; bRevert: BOOL): HMENU; stdcall;
+{$EXTERNALSYM GetSystemMenu}
+
+function CreateMenu: HMENU; stdcall;
+{$EXTERNALSYM CreateMenu}
+
+function CreatePopupMenu: HMENU; stdcall;
+{$EXTERNALSYM CreatePopupMenu}
+
+function DestroyMenu(hMenu: HMENU): BOOL; stdcall;
+{$EXTERNALSYM DestroyMenu}
+
+function CheckMenuItem(hMenu: HMENU; uIDCheckItem, uCheck: UINT): DWORD; stdcall;
+{$EXTERNALSYM CheckMenuItem}
+
+function EnableMenuItem(hMenu: HMENU; uIDEnableItem, uEnable: UINT): BOOL; stdcall;
+{$EXTERNALSYM EnableMenuItem}
+
+function GetSubMenu(hMenu: HMENU; nPos: Integer): HMENU; stdcall;
+{$EXTERNALSYM GetSubMenu}
+
+function GetMenuItemID(hMenu: HMENU; nPos: Integer): UINT; stdcall;
+{$EXTERNALSYM GetMenuItemID}
+
+function GetMenuItemCount(hMenu: HMENU): Integer; stdcall;
+{$EXTERNALSYM GetMenuItemCount}
+
+function InsertMenuA(hMenu: HMENU; uPosition, uFlags: UINT; uIDNewItem: UINT_PTR;
+ lpNewItem: LPCSTR): BOOL; stdcall;
+{$EXTERNALSYM InsertMenuA}
+function InsertMenuW(hMenu: HMENU; uPosition, uFlags: UINT; uIDNewItem: UINT_PTR;
+ lpNewItem: LPCWSTR): BOOL; stdcall;
+{$EXTERNALSYM InsertMenuW}
+function InsertMenu(hMenu: HMENU; uPosition, uFlags: UINT; uIDNewItem: UINT_PTR;
+ lpNewItem: LPCTSTR): BOOL; stdcall;
+{$EXTERNALSYM InsertMenu}
+
+function AppendMenuA(hMenu: HMENU; uFlags: UINT; uIDNewItem: UINT_PTR;
+ lpNewItem: LPCSTR): BOOL; stdcall;
+{$EXTERNALSYM AppendMenuA}
+function AppendMenuW(hMenu: HMENU; uFlags: UINT; uIDNewItem: UINT_PTR;
+ lpNewItem: LPCWSTR): BOOL; stdcall;
+{$EXTERNALSYM AppendMenuW}
+function AppendMenu(hMenu: HMENU; uFlags: UINT; uIDNewItem: UINT_PTR;
+ lpNewItem: LPCTSTR): BOOL; stdcall;
+{$EXTERNALSYM AppendMenu}
+
+function ModifyMenuA(hMnu: HMENU; uPosition: UINT; uFlags: UINT;
+ uIDNewItem: UINT_PTR; lpNewItem: LPCSTR): BOOL; stdcall;
+{$EXTERNALSYM ModifyMenuA}
+function ModifyMenuW(hMnu: HMENU; uPosition: UINT; uFlags: UINT;
+ uIDNewItem: UINT_PTR; lpNewItem: LPCWSTR): BOOL; stdcall;
+{$EXTERNALSYM ModifyMenuW}
+function ModifyMenu(hMnu: HMENU; uPosition: UINT; uFlags: UINT;
+ uIDNewItem: UINT_PTR; lpNewItem: LPCTSTR): BOOL; stdcall;
+{$EXTERNALSYM ModifyMenu}
+
+function RemoveMenu(hMenu: HMENU; uPosition: UINT; uFlags: UINT): BOOL; stdcall;
+{$EXTERNALSYM RemoveMenu}
+
+function DeleteMenu(hMenu: HMENU; uPosition: UINT; uFlags: UINT): BOOL; stdcall;
+{$EXTERNALSYM DeleteMenu}
+
+function SetMenuItemBitmaps(hMenu: HMENU; uPosition: UINT; uFlags: UINT;
+ hBitmapUnchecked: HBITMAP; hBitmapChecked: HBITMAP): BOOL; stdcall;
+{$EXTERNALSYM SetMenuItemBitmaps}
+
+function GetMenuCheckMarkDimensions: LONG; stdcall;
+{$EXTERNALSYM GetMenuCheckMarkDimensions}
+
+function TrackPopupMenu(hMenu: HMENU; uFlags: UINT; x: Integer; y: Integer;
+ nReserved: Integer; hWnd: HWND; prcRect: LPRECT): BOOL; stdcall;
+{$EXTERNALSYM TrackPopupMenu}
+
+// return codes for WM_MENUCHAR//
+
+const
+ MNC_IGNORE = 0;
+ {$EXTERNALSYM MNC_IGNORE}
+ MNC_CLOSE = 1;
+ {$EXTERNALSYM MNC_CLOSE}
+ MNC_EXECUTE = 2;
+ {$EXTERNALSYM MNC_EXECUTE}
+ MNC_SELECT = 3;
+ {$EXTERNALSYM MNC_SELECT}
+
+type
+ LPTPMPARAMS = ^TPMPARAMS;
+ {$EXTERNALSYM LPTPMPARAMS}
+ tagTPMPARAMS = record
+ cbSize: UINT; // Size of structure
+ rcExclude: RECT; // Screen coordinates of rectangle to exclude when positioning
+ end;
+ {$EXTERNALSYM tagTPMPARAMS}
+ TPMPARAMS = tagTPMPARAMS;
+ {$EXTERNALSYM TPMPARAMS}
+ TTPMParams = TPMPARAMS;
+ PTPMParams = LPTPMPARAMS;
+
+function TrackPopupMenuEx(hmenu: HMENU; fuflags: UINT; x, y: Integer;
+ hwnd: HWND; lptpm: LPTPMPARAMS): BOOL; stdcall;
+{$EXTERNALSYM TrackPopupMenuEx}
+
+const
+ MNS_NOCHECK = $80000000;
+ {$EXTERNALSYM MNS_NOCHECK}
+ MNS_MODELESS = $40000000;
+ {$EXTERNALSYM MNS_MODELESS}
+ MNS_DRAGDROP = $20000000;
+ {$EXTERNALSYM MNS_DRAGDROP}
+ MNS_AUTODISMISS = $10000000;
+ {$EXTERNALSYM MNS_AUTODISMISS}
+ MNS_NOTIFYBYPOS = $08000000;
+ {$EXTERNALSYM MNS_NOTIFYBYPOS}
+ MNS_CHECKORBMP = $04000000;
+ {$EXTERNALSYM MNS_CHECKORBMP}
+
+ MIM_MAXHEIGHT = $00000001;
+ {$EXTERNALSYM MIM_MAXHEIGHT}
+ MIM_BACKGROUND = $00000002;
+ {$EXTERNALSYM MIM_BACKGROUND}
+ MIM_HELPID = $00000004;
+ {$EXTERNALSYM MIM_HELPID}
+ MIM_MENUDATA = $00000008;
+ {$EXTERNALSYM MIM_MENUDATA}
+ MIM_STYLE = $00000010;
+ {$EXTERNALSYM MIM_STYLE}
+ MIM_APPLYTOSUBMENUS = $80000000;
+ {$EXTERNALSYM MIM_APPLYTOSUBMENUS}
+
+type
+ LPMENUINFO = ^MENUINFO;
+ {$EXTERNALSYM LPMENUINFO}
+ tagMENUINFO = record
+ cbSize: DWORD;
+ fMask: DWORD;
+ dwStyle: DWORD;
+ cyMax: UINT;
+ hbrBack: HBRUSH;
+ dwContextHelpID: DWORD;
+ dwMenuData: ULONG_PTR;
+ end;
+ {$EXTERNALSYM tagMENUINFO}
+ MENUINFO = tagMENUINFO;
+ {$EXTERNALSYM MENUINFO}
+ TMenuinfo = MENUINFO;
+ PMenuinfo = LPMENUINFO;
+
+ LPCMENUINFO = ^MENUINFO;
+ {$EXTERNALSYM LPCMENUINFO}
+
+function GetMenuInfo(hmenu: HMENU; var lpcmi: MENUINFO): BOOL; stdcall;
+{$EXTERNALSYM GetMenuInfo}
+
+function SetMenuInfo(hemnu: HMENU; const lpcmi: MENUINFO): BOOL; stdcall;
+{$EXTERNALSYM SetMenuInfo}
+
+function EndMenu: BOOL; stdcall;
+{$EXTERNALSYM EndMenu}
+
+//
+// WM_MENUDRAG return values.
+//
+
+const
+ MND_CONTINUE = 0;
+ {$EXTERNALSYM MND_CONTINUE}
+ MND_ENDMENU = 1;
+ {$EXTERNALSYM MND_ENDMENU}
+
+type
+ PMENUGETOBJECTINFO = ^MENUGETOBJECTINFO;
+ tagMENUGETOBJECTINFO = record
+ dwFlags: DWORD;
+ uPos: UINT;
+ hmenu: HMENU;
+ riid: PVOID;
+ pvObj: PVOID;
+ end;
+ {$EXTERNALSYM tagMENUGETOBJECTINFO}
+ MENUGETOBJECTINFO = tagMENUGETOBJECTINFO;
+ {$EXTERNALSYM MENUGETOBJECTINFO}
+ TMenuGetObjectInfo = MENUGETOBJECTINFO;
+
+//
+// MENUGETOBJECTINFO dwFlags values
+//
+
+const
+ MNGOF_TOPGAP = $00000001;
+ {$EXTERNALSYM MNGOF_TOPGAP}
+ MNGOF_BOTTOMGAP = $00000002;
+ {$EXTERNALSYM MNGOF_BOTTOMGAP}
+
+//
+// WM_MENUGETOBJECT return values
+//
+
+ MNGO_NOINTERFACE = $00000000;
+ {$EXTERNALSYM MNGO_NOINTERFACE}
+ MNGO_NOERROR = $00000001;
+ {$EXTERNALSYM MNGO_NOERROR}
+
+ MIIM_STATE = $00000001;
+ {$EXTERNALSYM MIIM_STATE}
+ MIIM_ID = $00000002;
+ {$EXTERNALSYM MIIM_ID}
+ MIIM_SUBMENU = $00000004;
+ {$EXTERNALSYM MIIM_SUBMENU}
+ MIIM_CHECKMARKS = $00000008;
+ {$EXTERNALSYM MIIM_CHECKMARKS}
+ MIIM_TYPE = $00000010;
+ {$EXTERNALSYM MIIM_TYPE}
+ MIIM_DATA = $00000020;
+ {$EXTERNALSYM MIIM_DATA}
+
+ MIIM_STRING = $00000040;
+ {$EXTERNALSYM MIIM_STRING}
+ MIIM_BITMAP = $00000080;
+ {$EXTERNALSYM MIIM_BITMAP}
+ MIIM_FTYPE = $00000100;
+ {$EXTERNALSYM MIIM_FTYPE}
+
+ HBMMENU_CALLBACK = HBITMAP(-1);
+ {$EXTERNALSYM HBMMENU_CALLBACK}
+ HBMMENU_SYSTEM = HBITMAP(1);
+ {$EXTERNALSYM HBMMENU_SYSTEM}
+ HBMMENU_MBAR_RESTORE = HBITMAP(2);
+ {$EXTERNALSYM HBMMENU_MBAR_RESTORE}
+ HBMMENU_MBAR_MINIMIZE = HBITMAP(3);
+ {$EXTERNALSYM HBMMENU_MBAR_MINIMIZE}
+ HBMMENU_MBAR_CLOSE = HBITMAP(5);
+ {$EXTERNALSYM HBMMENU_MBAR_CLOSE}
+ HBMMENU_MBAR_CLOSE_D = HBITMAP(6);
+ {$EXTERNALSYM HBMMENU_MBAR_CLOSE_D}
+ HBMMENU_MBAR_MINIMIZE_D = HBITMAP(7);
+ {$EXTERNALSYM HBMMENU_MBAR_MINIMIZE_D}
+ HBMMENU_POPUP_CLOSE = HBITMAP(8);
+ {$EXTERNALSYM HBMMENU_POPUP_CLOSE}
+ HBMMENU_POPUP_RESTORE = HBITMAP(9);
+ {$EXTERNALSYM HBMMENU_POPUP_RESTORE}
+ HBMMENU_POPUP_MAXIMIZE = HBITMAP(10);
+ {$EXTERNALSYM HBMMENU_POPUP_MAXIMIZE}
+ HBMMENU_POPUP_MINIMIZE = HBITMAP(11);
+ {$EXTERNALSYM HBMMENU_POPUP_MINIMIZE}
+
+type
+ LPMENUITEMINFOA = ^MENUITEMINFOA;
+ {$EXTERNALSYM LPMENUITEMINFOA}
+ tagMENUITEMINFOA = record
+ cbSize: UINT;
+ fMask: UINT;
+ fType: UINT; // used if MIIM_TYPE (4.0) or MIIM_FTYPE (>4.0)
+ fState: UINT; // used if MIIM_STATE
+ wID: UINT; // used if MIIM_ID
+ hSubMenu: HMENU; // used if MIIM_SUBMENU
+ hbmpChecked: HBITMAP; // used if MIIM_CHECKMARKS
+ hbmpUnchecked: HBITMAP; // used if MIIM_CHECKMARKS
+ dwItemData: ULONG_PTR; // used if MIIM_DATA
+ dwTypeData: LPSTR; // used if MIIM_TYPE (4.0) or MIIM_STRING (>4.0)
+ cch: UINT; // used if MIIM_TYPE (4.0) or MIIM_STRING (>4.0)
+ {$IFDEF WIN98ME_UP}
+ hbmpItem: HBITMAP; // used if MIIM_BITMAP
+ {$ENDIF WIN98ME_UP}
+ end;
+ {$EXTERNALSYM tagMENUITEMINFOA}
+ MENUITEMINFOA = tagMENUITEMINFOA;
+ {$EXTERNALSYM MENUITEMINFOA}
+ TMenuItemInfoA = MENUITEMINFOA;
+ PMenuItemInfoA = LPMENUITEMINFOA;
+
+ LPMENUITEMINFOW = ^MENUITEMINFOW;
+ {$EXTERNALSYM LPMENUITEMINFOW}
+ tagMENUITEMINFOW = record
+ cbSize: UINT;
+ fMask: UINT;
+ fType: UINT; // used if MIIM_TYPE (4.0) or MIIM_FTYPE (>4.0)
+ fState: UINT; // used if MIIM_STATE
+ wID: UINT; // used if MIIM_ID
+ hSubMenu: HMENU; // used if MIIM_SUBMENU
+ hbmpChecked: HBITMAP; // used if MIIM_CHECKMARKS
+ hbmpUnchecked: HBITMAP; // used if MIIM_CHECKMARKS
+ dwItemData: ULONG_PTR; // used if MIIM_DATA
+ dwTypeData: LPWSTR; // used if MIIM_TYPE (4.0) or MIIM_STRING (>4.0)
+ cch: UINT; // used if MIIM_TYPE (4.0) or MIIM_STRING (>4.0)
+ {$IFDEF WIN98ME_UP}
+ hbmpItem: HBITMAP; // used if MIIM_BITMAP
+ {$ENDIF WIN98ME_UP}
+ end;
+ {$EXTERNALSYM tagMENUITEMINFOW}
+ MENUITEMINFOW = tagMENUITEMINFOW;
+ {$EXTERNALSYM MENUITEMINFOW}
+ TMenuItemInfoW = MENUITEMINFOW;
+ PMenuItemInfoW = LPMENUITEMINFOW;
+
+ LPCMENUITEMINFOA = ^MENUITEMINFOA;
+ {$EXTERNALSYM LPCMENUITEMINFOA}
+ LPCMENUITEMINFOW = ^MENUITEMINFOW;
+ {$EXTERNALSYM LPCMENUITEMINFOW}
+
+ {$IFDEF UNICODE}
+ MENUITEMINFO = MENUITEMINFOW;
+ {$EXTERNALSYM MENUITEMINFO}
+ LPMENUITEMINFO = LPMENUITEMINFOW;
+ {$EXTERNALSYM LPMENUITEMINFO}
+ TMenuItemInfo = TMenuItemInfoW;
+ PMenuItemInfo = PMenuItemInfoW;
+ LPCMENUITEMINFO = LPCMENUITEMINFOW;
+ {$EXTERNALSYM LPCMENUITEMINFO}
+ {$ELSE}
+ MENUITEMINFO = MENUITEMINFOA;
+ {$EXTERNALSYM MENUITEMINFO}
+ LPMENUITEMINFO = LPMENUITEMINFOA;
+ {$EXTERNALSYM LPMENUITEMINFO}
+ TMenuItemInfo = TMenuItemInfoA;
+ PMenuItemInfo = PMenuItemInfoA;
+ LPCMENUITEMINFO = LPCMENUITEMINFOA;
+ {$EXTERNALSYM LPCMENUITEMINFO}
+ {$ENDIF UNICODE}
+
+function InsertMenuItemA(hMenu: HMENU; uItem: UINT; fByPosition: BOOL;
+ const lpmii: MENUITEMINFOA): BOOL; stdcall;
+{$EXTERNALSYM InsertMenuItemA}
+function InsertMenuItemW(hMenu: HMENU; uItem: UINT; fByPosition: BOOL;
+ const lpmii: MENUITEMINFOW): BOOL; stdcall;
+{$EXTERNALSYM InsertMenuItemW}
+function InsertMenuItem(hMenu: HMENU; uItem: UINT; fByPosition: BOOL;
+ const lpmii: MENUITEMINFO): BOOL; stdcall;
+{$EXTERNALSYM InsertMenuItem}
+
+function GetMenuItemInfoA(hMenu: HMENU; uItem: UINT; fByPosition: BOOL;
+ var lpmii: MENUITEMINFOA): BOOL; stdcall;
+{$EXTERNALSYM GetMenuItemInfoA}
+function GetMenuItemInfoW(hMenu: HMENU; uItem: UINT; fByPosition: BOOL;
+ var lpmii: MENUITEMINFOW): BOOL; stdcall;
+{$EXTERNALSYM GetMenuItemInfoW}
+function GetMenuItemInfo(hMenu: HMENU; uItem: UINT; fByPosition: BOOL;
+ var lpmii: MENUITEMINFO): BOOL; stdcall;
+{$EXTERNALSYM GetMenuItemInfo}
+
+function SetMenuItemInfoA(hMenu: HMENU; uItem: UINT; fByPosition: BOOL;
+ const lpmii: MENUITEMINFOA): BOOL; stdcall;
+{$EXTERNALSYM SetMenuItemInfoA}
+function SetMenuItemInfoW(hMenu: HMENU; uItem: UINT; fByPosition: BOOL;
+ const lpmii: MENUITEMINFOW): BOOL; stdcall;
+{$EXTERNALSYM SetMenuItemInfoW}
+function SetMenuItemInfo(hMenu: HMENU; uItem: UINT; fByPosition: BOOL;
+ const lpmii: MENUITEMINFO): BOOL; stdcall;
+{$EXTERNALSYM SetMenuItemInfo}
+
+const
+ GMDI_USEDISABLED = $0001;
+ {$EXTERNALSYM GMDI_USEDISABLED}
+ GMDI_GOINTOPOPUPS = $0002;
+ {$EXTERNALSYM GMDI_GOINTOPOPUPS}
+
+function GetMenuDefaultItem(hMenu: HMENU; fByPos, gmdiFlags: UINT): UINT; stdcall;
+{$EXTERNALSYM GetMenuDefaultItem}
+
+function SetMenuDefaultItem(hMenu: HMENU; uItem, fByPos: UINT): BOOL; stdcall;
+{$EXTERNALSYM SetMenuDefaultItem}
+
+function GetMenuItemRect(hWnd: HWND; hMenu: HMENU; uItem: UINT; var lprcItem: RECT): BOOL; stdcall;
+{$EXTERNALSYM GetMenuItemRect}
+
+function MenuItemFromPoint(hWnd: HWND; hMenu: HMENU; ptScreen: POINT): Integer; stdcall;
+{$EXTERNALSYM MenuItemFromPoint}
+
+//
+// Flags for TrackPopupMenu
+//
+
+const
+ TPM_LEFTBUTTON = $0000;
+ {$EXTERNALSYM TPM_LEFTBUTTON}
+ TPM_RIGHTBUTTON = $0002;
+ {$EXTERNALSYM TPM_RIGHTBUTTON}
+ TPM_LEFTALIGN = $0000;
+ {$EXTERNALSYM TPM_LEFTALIGN}
+ TPM_CENTERALIGN = $0004;
+ {$EXTERNALSYM TPM_CENTERALIGN}
+ TPM_RIGHTALIGN = $0008;
+ {$EXTERNALSYM TPM_RIGHTALIGN}
+ TPM_TOPALIGN = $0000;
+ {$EXTERNALSYM TPM_TOPALIGN}
+ TPM_VCENTERALIGN = $0010;
+ {$EXTERNALSYM TPM_VCENTERALIGN}
+ TPM_BOTTOMALIGN = $0020;
+ {$EXTERNALSYM TPM_BOTTOMALIGN}
+
+ TPM_HORIZONTAL = $0000; // Horz alignment matters more
+ {$EXTERNALSYM TPM_HORIZONTAL}
+ TPM_VERTICAL = $0040; // Vert alignment matters more
+ {$EXTERNALSYM TPM_VERTICAL}
+ TPM_NONOTIFY = $0080; // Don't send any notification msgs
+ {$EXTERNALSYM TPM_NONOTIFY}
+ TPM_RETURNCMD = $0100;
+ {$EXTERNALSYM TPM_RETURNCMD}
+ TPM_RECURSE = $0001;
+ {$EXTERNALSYM TPM_RECURSE}
+ TPM_HORPOSANIMATION = $0400;
+ {$EXTERNALSYM TPM_HORPOSANIMATION}
+ TPM_HORNEGANIMATION = $0800;
+ {$EXTERNALSYM TPM_HORNEGANIMATION}
+ TPM_VERPOSANIMATION = $1000;
+ {$EXTERNALSYM TPM_VERPOSANIMATION}
+ TPM_VERNEGANIMATION = $2000;
+ {$EXTERNALSYM TPM_VERNEGANIMATION}
+ TPM_NOANIMATION = $4000;
+ {$EXTERNALSYM TPM_NOANIMATION}
+ TPM_LAYOUTRTL = $8000;
+ {$EXTERNALSYM TPM_LAYOUTRTL}
+
+//
+// Drag-and-drop support
+// Obsolete - use OLE instead
+//
+
+type
+ LPDROPSTRUCT = ^DROPSTRUCT;
+ {$EXTERNALSYM LPDROPSTRUCT}
+ tagDROPSTRUCT = record
+ hwndSource: HWND;
+ hwndSink: HWND;
+ wFmt: DWORD;
+ dwData: ULONG_PTR;
+ ptDrop: POINT;
+ dwControlData: DWORD;
+ end;
+ {$EXTERNALSYM tagDROPSTRUCT}
+ DROPSTRUCT = tagDROPSTRUCT;
+ {$EXTERNALSYM DROPSTRUCT}
+ TDropStruct = DROPSTRUCT;
+ PDropStruct = LPDROPSTRUCT;
+
+const
+ DOF_EXECUTABLE = $8001; // wFmt flags
+ {$EXTERNALSYM DOF_EXECUTABLE}
+ DOF_DOCUMENT = $8002;
+ {$EXTERNALSYM DOF_DOCUMENT}
+ DOF_DIRECTORY = $8003;
+ {$EXTERNALSYM DOF_DIRECTORY}
+ DOF_MULTIPLE = $8004;
+ {$EXTERNALSYM DOF_MULTIPLE}
+ DOF_PROGMAN = $0001;
+ {$EXTERNALSYM DOF_PROGMAN}
+ DOF_SHELLDATA = $0002;
+ {$EXTERNALSYM DOF_SHELLDATA}
+
+ DO_DROPFILE = $454C4946;
+ {$EXTERNALSYM DO_DROPFILE}
+ DO_PRINTFILE = $544E5250;
+ {$EXTERNALSYM DO_PRINTFILE}
+
+function DragObject(hwnd1, hwnd2: HWND; i: UINT; u: ULONG_PTR; hcursor: HCURSOR): DWORD; stdcall;
+{$EXTERNALSYM DragObject}
+
+function DragDetect(hwnd: HWND; pt: POINT): BOOL; stdcall;
+{$EXTERNALSYM DragDetect}
+
+function DrawIcon(hDC: HDC; X, Y: Integer; hIcon: HICON): BOOL; stdcall;
+{$EXTERNALSYM DrawIcon}
+
+//
+// DrawText() Format Flags
+//
+
+const
+ DT_TOP = $00000000;
+ {$EXTERNALSYM DT_TOP}
+ DT_LEFT = $00000000;
+ {$EXTERNALSYM DT_LEFT}
+ DT_CENTER = $00000001;
+ {$EXTERNALSYM DT_CENTER}
+ DT_RIGHT = $00000002;
+ {$EXTERNALSYM DT_RIGHT}
+ DT_VCENTER = $00000004;
+ {$EXTERNALSYM DT_VCENTER}
+ DT_BOTTOM = $00000008;
+ {$EXTERNALSYM DT_BOTTOM}
+ DT_WORDBREAK = $00000010;
+ {$EXTERNALSYM DT_WORDBREAK}
+ DT_SINGLELINE = $00000020;
+ {$EXTERNALSYM DT_SINGLELINE}
+ DT_EXPANDTABS = $00000040;
+ {$EXTERNALSYM DT_EXPANDTABS}
+ DT_TABSTOP = $00000080;
+ {$EXTERNALSYM DT_TABSTOP}
+ DT_NOCLIP = $00000100;
+ {$EXTERNALSYM DT_NOCLIP}
+ DT_EXTERNALLEADING = $00000200;
+ {$EXTERNALSYM DT_EXTERNALLEADING}
+ DT_CALCRECT = $00000400;
+ {$EXTERNALSYM DT_CALCRECT}
+ DT_NOPREFIX = $00000800;
+ {$EXTERNALSYM DT_NOPREFIX}
+ DT_INTERNAL = $00001000;
+ {$EXTERNALSYM DT_INTERNAL}
+
+ DT_EDITCONTROL = $00002000;
+ {$EXTERNALSYM DT_EDITCONTROL}
+ DT_PATH_ELLIPSIS = $00004000;
+ {$EXTERNALSYM DT_PATH_ELLIPSIS}
+ DT_END_ELLIPSIS = $00008000;
+ {$EXTERNALSYM DT_END_ELLIPSIS}
+ DT_MODIFYSTRING = $00010000;
+ {$EXTERNALSYM DT_MODIFYSTRING}
+ DT_RTLREADING = $00020000;
+ {$EXTERNALSYM DT_RTLREADING}
+ DT_WORD_ELLIPSIS = $00040000;
+ {$EXTERNALSYM DT_WORD_ELLIPSIS}
+ DT_NOFULLWIDTHCHARBREAK = $00080000;
+ {$EXTERNALSYM DT_NOFULLWIDTHCHARBREAK}
+ DT_HIDEPREFIX = $00100000;
+ {$EXTERNALSYM DT_HIDEPREFIX}
+ DT_PREFIXONLY = $00200000;
+ {$EXTERNALSYM DT_PREFIXONLY}
+
+type
+ LPDRAWTEXTPARAMS = ^DRAWTEXTPARAMS;
+ {$EXTERNALSYM LPDRAWTEXTPARAMS}
+ tagDRAWTEXTPARAMS = record
+ cbSize: UINT;
+ iTabLength: Integer;
+ iLeftMargin: Integer;
+ iRightMargin: Integer;
+ uiLengthDrawn: UINT;
+ end;
+ {$EXTERNALSYM tagDRAWTEXTPARAMS}
+ DRAWTEXTPARAMS = tagDRAWTEXTPARAMS;
+ {$EXTERNALSYM DRAWTEXTPARAMS}
+ TDrawTextParams = DRAWTEXTPARAMS;
+ PDrawTextParams = LPDRAWTEXTPARAMS;
+
+function DrawTextA(hDC: HDC; lpString: LPCSTR; nCount: Integer;
+ var lpRect: RECT; uFormat: UINT): Integer; stdcall;
+{$EXTERNALSYM DrawTextA}
+function DrawTextW(hDC: HDC; lpString: LPCWSTR; nCount: Integer;
+ var lpRect: RECT; uFormat: UINT): Integer; stdcall;
+{$EXTERNALSYM DrawTextW}
+function DrawText(hDC: HDC; lpString: LPCTSTR; nCount: Integer;
+ var lpRect: RECT; uFormat: UINT): Integer; stdcall;
+{$EXTERNALSYM DrawText}
+
+function DrawTextExA(hDc: HDC; lpchText: LPSTR; cchText: Integer;
+ var lprc: RECT; dwDTFormat: UINT; lpDTParams: LPDRAWTEXTPARAMS): Integer; stdcall;
+{$EXTERNALSYM DrawTextExA}
+function DrawTextExW(hDc: HDC; lpchText: LPWSTR; cchText: Integer;
+ var lprc: RECT; dwDTFormat: UINT; lpDTParams: LPDRAWTEXTPARAMS): Integer; stdcall;
+{$EXTERNALSYM DrawTextExW}
+function DrawTextEx(hDc: HDC; lpchText: LPTSTR; cchText: Integer;
+ var lprc: RECT; dwDTFormat: UINT; lpDTParams: LPDRAWTEXTPARAMS): Integer; stdcall;
+{$EXTERNALSYM DrawTextEx}
+
+function GrayStringA(hDC: HDC; hBrush: HBRUSH; lpOutputFunc: GRAYSTRINGPROC;
+ lpData: LPARAM; nCount, X, Y, nWidth, nHeight: Integer): BOOL; stdcall;
+{$EXTERNALSYM GrayStringA}
+function GrayStringW(hDC: HDC; hBrush: HBRUSH; lpOutputFunc: GRAYSTRINGPROC;
+ lpData: LPARAM; nCount, X, Y, nWidth, nHeight: Integer): BOOL; stdcall;
+{$EXTERNALSYM GrayStringW}
+function GrayString(hDC: HDC; hBrush: HBRUSH; lpOutputFunc: GRAYSTRINGPROC;
+ lpData: LPARAM; nCount, X, Y, nWidth, nHeight: Integer): BOOL; stdcall;
+{$EXTERNALSYM GrayString}
+
+// Monolithic state-drawing routine//
+// Image type//
+
+const
+ DST_COMPLEX = $0000;
+ {$EXTERNALSYM DST_COMPLEX}
+ DST_TEXT = $0001;
+ {$EXTERNALSYM DST_TEXT}
+ DST_PREFIXTEXT = $0002;
+ {$EXTERNALSYM DST_PREFIXTEXT}
+ DST_ICON = $0003;
+ {$EXTERNALSYM DST_ICON}
+ DST_BITMAP = $0004;
+ {$EXTERNALSYM DST_BITMAP}
+
+// State type//
+
+ DSS_NORMAL = $0000;
+ {$EXTERNALSYM DSS_NORMAL}
+ DSS_UNION = $0010; // Gray string appearance
+ {$EXTERNALSYM DSS_UNION}
+ DSS_DISABLED = $0020;
+ {$EXTERNALSYM DSS_DISABLED}
+ DSS_MONO = $0080;
+ {$EXTERNALSYM DSS_MONO}
+ DSS_HIDEPREFIX = $0200;
+ {$EXTERNALSYM DSS_HIDEPREFIX}
+ DSS_PREFIXONLY = $0400;
+ {$EXTERNALSYM DSS_PREFIXONLY}
+ DSS_RIGHT = $8000;
+ {$EXTERNALSYM DSS_RIGHT}
+
+function DrawStateA(hdc: HDC; hbr: HBRUSH; lputputFunc: DRAWSTATEPROC;
+ lData: LPARAM; wData: WPARAM; x, y, cx, cy: Integer; fuFlags: UINT): BOOL; stdcall;
+{$EXTERNALSYM DrawStateA}
+function DrawStateW(hdc: HDC; hbr: HBRUSH; lputputFunc: DRAWSTATEPROC;
+ lData: LPARAM; wData: WPARAM; x, y, cx, cy: Integer; fuFlags: UINT): BOOL; stdcall;
+{$EXTERNALSYM DrawStateW}
+function DrawState(hdc: HDC; hbr: HBRUSH; lputputFunc: DRAWSTATEPROC;
+ lData: LPARAM; wData: WPARAM; x, y, cx, cy: Integer; fuFlags: UINT): BOOL; stdcall;
+{$EXTERNALSYM DrawState}
+
+function TabbedTextOutA(hDC: HDC; X, Y: Integer; lpString: LPCSTR; nCount,
+ nTabPositions: Integer; lpnTabStopPositions: LPINT; nTabOrigin: Integer): LONG; stdcall;
+{$EXTERNALSYM TabbedTextOutA}
+function TabbedTextOutW(hDC: HDC; X, Y: Integer; lpString: LPCWSTR; nCount,
+ nTabPositions: Integer; lpnTabStopPositions: LPINT; nTabOrigin: Integer): LONG; stdcall;
+{$EXTERNALSYM TabbedTextOutW}
+function TabbedTextOut(hDC: HDC; X, Y: Integer; lpString: LPCTSTR; nCount,
+ nTabPositions: Integer; lpnTabStopPositions: LPINT; nTabOrigin: Integer): LONG; stdcall;
+{$EXTERNALSYM TabbedTextOut}
+
+function GetTabbedTextExtentA(hDC: HDC; lpString: LPCSTR; nCount,
+ nTabPositions: Integer; lpnTabStopPositions: LPINT): DWORD; stdcall;
+{$EXTERNALSYM GetTabbedTextExtentA}
+function GetTabbedTextExtentW(hDC: HDC; lpString: LPCWSTR; nCount,
+ nTabPositions: Integer; lpnTabStopPositions: LPINT): DWORD; stdcall;
+{$EXTERNALSYM GetTabbedTextExtentW}
+function GetTabbedTextExtent(hDC: HDC; lpString: LPCTSTR; nCount,
+ nTabPositions: Integer; lpnTabStopPositions: LPINT): DWORD; stdcall;
+{$EXTERNALSYM GetTabbedTextExtent}
+
+function UpdateWindow(hWnd: HWND): BOOL; stdcall;
+{$EXTERNALSYM UpdateWindow}
+
+function SetActiveWindow(hWnd: HWND): HWND; stdcall;
+{$EXTERNALSYM SetActiveWindow}
+
+function GetForegroundWindow: HWND; stdcall;
+{$EXTERNALSYM GetForegroundWindow}
+
+function PaintDesktop(hdc: HDC): BOOL; stdcall;
+{$EXTERNALSYM PaintDesktop}
+
+procedure SwitchToThisWindow(hwnd: HWND; fUnknown: BOOL); stdcall;
+{$EXTERNALSYM SwitchToThisWindow}
+
+function SetForegroundWindow(hWnd: HWND): BOOL; stdcall;
+{$EXTERNALSYM SetForegroundWindow}
+
+function AllowSetForegroundWindow(dwProcessId: DWORD): BOOL; stdcall;
+{$EXTERNALSYM AllowSetForegroundWindow}
+
+const
+ ASFW_ANY = DWORD(-1);
+ {$EXTERNALSYM ASFW_ANY}
+
+function LockSetForegroundWindow(uLockCode: UINT): BOOL; stdcall;
+{$EXTERNALSYM LockSetForegroundWindow}
+
+const
+ LSFW_LOCK = 1;
+ {$EXTERNALSYM LSFW_LOCK}
+ LSFW_UNLOCK = 2;
+ {$EXTERNALSYM LSFW_UNLOCK}
+
+function WindowFromDC(hDC: HDC): HWND; stdcall;
+{$EXTERNALSYM WindowFromDC}
+
+function GetDC(hWnd: HWND): HDC; stdcall;
+{$EXTERNALSYM GetDC}
+
+function GetDCEx(hWnd: HWND; hrgnClip: HRGN; flags: DWORD): HDC; stdcall;
+{$EXTERNALSYM GetDCEx}
+
+//
+// GetDCEx() flags
+//
+
+const
+ DCX_WINDOW = $00000001;
+ {$EXTERNALSYM DCX_WINDOW}
+ DCX_CACHE = $00000002;
+ {$EXTERNALSYM DCX_CACHE}
+ DCX_NORESETATTRS = $00000004;
+ {$EXTERNALSYM DCX_NORESETATTRS}
+ DCX_CLIPCHILDREN = $00000008;
+ {$EXTERNALSYM DCX_CLIPCHILDREN}
+ DCX_CLIPSIBLINGS = $00000010;
+ {$EXTERNALSYM DCX_CLIPSIBLINGS}
+ DCX_PARENTCLIP = $00000020;
+ {$EXTERNALSYM DCX_PARENTCLIP}
+ DCX_EXCLUDERGN = $00000040;
+ {$EXTERNALSYM DCX_EXCLUDERGN}
+ DCX_INTERSECTRGN = $00000080;
+ {$EXTERNALSYM DCX_INTERSECTRGN}
+ DCX_EXCLUDEUPDATE = $00000100;
+ {$EXTERNALSYM DCX_EXCLUDEUPDATE}
+ DCX_INTERSECTUPDATE = $00000200;
+ {$EXTERNALSYM DCX_INTERSECTUPDATE}
+ DCX_LOCKWINDOWUPDATE = $00000400;
+ {$EXTERNALSYM DCX_LOCKWINDOWUPDATE}
+
+ DCX_VALIDATE = $00200000;
+ {$EXTERNALSYM DCX_VALIDATE}
+
+function GetWindowDC(hWnd: HWND): HDC; stdcall;
+{$EXTERNALSYM GetWindowDC}
+
+function ReleaseDC(hWnd: HWND; hDC: HDC): Integer; stdcall;
+{$EXTERNALSYM ReleaseDC}
+
+function BeginPaint(hWnd: HWND; var lpPaint: PAINTSTRUCT): HDC; stdcall;
+{$EXTERNALSYM BeginPaint}
+
+function EndPaint(hWnd: HWND; const lpPaint: PAINTSTRUCT): BOOL; stdcall;
+{$EXTERNALSYM EndPaint}
+
+function GetUpdateRect(hWnd: HWND; var lpRect: RECT; bErase: BOOL): BOOL; stdcall;
+{$EXTERNALSYM GetUpdateRect}
+
+function GetUpdateRgn(hWnd: HWND; hRgn: HRGN; bErase: BOOL): Integer; stdcall;
+{$EXTERNALSYM GetUpdateRgn}
+
+function SetWindowRgn(hWnd: HWND; hRgn: HRGN; bRedraw: BOOL): Integer; stdcall;
+{$EXTERNALSYM SetWindowRgn}
+
+function GetWindowRgn(hWnd: HWND; hRgn: HRGN): Integer; stdcall;
+{$EXTERNALSYM GetWindowRgn}
+
+function GetWindowRgnBox(hWnd: HWND; var lprc: RECT): Integer; stdcall;
+{$EXTERNALSYM GetWindowRgnBox}
+
+function ExcludeUpdateRgn(hDC: HDC; hWnd: HWND): Integer; stdcall;
+{$EXTERNALSYM ExcludeUpdateRgn}
+
+function InvalidateRect(hWnd: HWND; lpRect: LPRECT; bErase: BOOL): BOOL; stdcall;
+{$EXTERNALSYM InvalidateRect}
+
+function ValidateRect(hWnd: HWND; lpRect: LPRECT): BOOL; stdcall;
+{$EXTERNALSYM ValidateRect}
+
+function InvalidateRgn(hWnd: HWND; hRgn: HRGN; bErase: BOOL): BOOL; stdcall;
+{$EXTERNALSYM InvalidateRgn}
+
+function ValidateRgn(hWnd: HWND; hRgn: HRGN): BOOL; stdcall;
+{$EXTERNALSYM ValidateRgn}
+
+function RedrawWindow(hWnd: HWND; lprcUpdate: LPRECT; hrgnUpdate: HRGN; flags: UINT): BOOL; stdcall;
+{$EXTERNALSYM RedrawWindow}
+
+//
+// RedrawWindow() flags
+//
+
+const
+ RDW_INVALIDATE = $0001;
+ {$EXTERNALSYM RDW_INVALIDATE}
+ RDW_INTERNALPAINT = $0002;
+ {$EXTERNALSYM RDW_INTERNALPAINT}
+ RDW_ERASE = $0004;
+ {$EXTERNALSYM RDW_ERASE}
+
+ RDW_VALIDATE = $0008;
+ {$EXTERNALSYM RDW_VALIDATE}
+ RDW_NOINTERNALPAINT = $0010;
+ {$EXTERNALSYM RDW_NOINTERNALPAINT}
+ RDW_NOERASE = $0020;
+ {$EXTERNALSYM RDW_NOERASE}
+
+ RDW_NOCHILDREN = $0040;
+ {$EXTERNALSYM RDW_NOCHILDREN}
+ RDW_ALLCHILDREN = $0080;
+ {$EXTERNALSYM RDW_ALLCHILDREN}
+
+ RDW_UPDATENOW = $0100;
+ {$EXTERNALSYM RDW_UPDATENOW}
+ RDW_ERASENOW = $0200;
+ {$EXTERNALSYM RDW_ERASENOW}
+
+ RDW_FRAME = $0400;
+ {$EXTERNALSYM RDW_FRAME}
+ RDW_NOFRAME = $0800;
+ {$EXTERNALSYM RDW_NOFRAME}
+
+//
+// LockWindowUpdate API
+//
+
+function LockWindowUpdate(hWndLock: HWND): BOOL; stdcall;
+{$EXTERNALSYM LockWindowUpdate}
+
+function ScrollWindow(hWnd: HWND; XAmount, YAmount: Integer; lpRect, lpClipRect: LPRECT): BOOL; stdcall;
+{$EXTERNALSYM ScrollWindow}
+
+function ScrollDC(hDC: HDC; dx, dy: Integer; lprcScroll, lprcClip: LPRECT;
+ hrgnUpdate: HRGN; lprcUpdate: LPRECT): BOOL; stdcall;
+{$EXTERNALSYM ScrollDC}
+
+function ScrollWindowEx(hWnd: HWND; dx, dy: Integer; prcScroll, prcClip: LPRECT;
+ hrgnUpdate: HRGN; prcUpdate: LPRECT; flags: UINT): Integer; stdcall;
+{$EXTERNALSYM ScrollWindowEx}
+
+const
+ SW_SCROLLCHILDREN = $0001; // Scroll children within *lprcScroll.
+ {$EXTERNALSYM SW_SCROLLCHILDREN}
+ SW_INVALIDATE = $0002; // Invalidate after scrolling
+ {$EXTERNALSYM SW_INVALIDATE}
+ SW_ERASE = $0004; // If SW_INVALIDATE, don't send WM_ERASEBACKGROUND
+ {$EXTERNALSYM SW_ERASE}
+ SW_SMOOTHSCROLL = $0010; // Use smooth scrolling
+ {$EXTERNALSYM SW_SMOOTHSCROLL}
+
+function SetScrollPos(hWnd: HWND; nBar, nPos: Integer; bRedraw: BOOL): Integer; stdcall;
+{$EXTERNALSYM SetScrollPos}
+
+function GetScrollPos(hWnd: HWND; nBar: Integer): Integer; stdcall;
+{$EXTERNALSYM GetScrollPos}
+
+function SetScrollRange(hWnd: HWND; nBar, nMinPos, nMaxPos: Integer; bRedraw: BOOL): BOOL; stdcall;
+{$EXTERNALSYM SetScrollRange}
+
+function GetScrollRange(hWnd: HWND; nBar: Integer; var lpMinPos, lpMaxPos: Integer): BOOL; stdcall;
+{$EXTERNALSYM GetScrollRange}
+
+function ShowScrollBar(hWnd: HWND; wBar: Integer; bShow: BOOL): BOOL; stdcall;
+{$EXTERNALSYM ShowScrollBar}
+
+function EnableScrollBar(hWnd: HWND; wSBflags, wArrows: UINT): BOOL; stdcall;
+{$EXTERNALSYM EnableScrollBar}
+
+//
+// EnableScrollBar() flags
+//
+
+const
+ ESB_ENABLE_BOTH = $0000;
+ {$EXTERNALSYM ESB_ENABLE_BOTH}
+ ESB_DISABLE_BOTH = $0003;
+ {$EXTERNALSYM ESB_DISABLE_BOTH}
+
+ ESB_DISABLE_LEFT = $0001;
+ {$EXTERNALSYM ESB_DISABLE_LEFT}
+ ESB_DISABLE_RIGHT = $0002;
+ {$EXTERNALSYM ESB_DISABLE_RIGHT}
+
+ ESB_DISABLE_UP = $0001;
+ {$EXTERNALSYM ESB_DISABLE_UP}
+ ESB_DISABLE_DOWN = $0002;
+ {$EXTERNALSYM ESB_DISABLE_DOWN}
+
+ ESB_DISABLE_LTUP = ESB_DISABLE_LEFT;
+ {$EXTERNALSYM ESB_DISABLE_LTUP}
+ ESB_DISABLE_RTDN = ESB_DISABLE_RIGHT;
+ {$EXTERNALSYM ESB_DISABLE_RTDN}
+
+function SetPropA(hWnd: HWND; lpString: LPCSTR; hData: HANDLE): BOOL; stdcall;
+{$EXTERNALSYM SetPropA}
+function SetPropW(hWnd: HWND; lpString: LPCWSTR; hData: HANDLE): BOOL; stdcall;
+{$EXTERNALSYM SetPropW}
+function SetProp(hWnd: HWND; lpString: LPCTSTR; hData: HANDLE): BOOL; stdcall;
+{$EXTERNALSYM SetProp}
+
+function GetPropA(hWnd: HWND; lpString: LPCSTR): HANDLE; stdcall;
+{$EXTERNALSYM GetPropA}
+function GetPropW(hWnd: HWND; lpString: LPCWSTR): HANDLE; stdcall;
+{$EXTERNALSYM GetPropW}
+function GetProp(hWnd: HWND; lpString: LPCTSTR): HANDLE; stdcall;
+{$EXTERNALSYM GetProp}
+
+function RemovePropA(hWnd: HWND; lpString: LPCSTR): HANDLE; stdcall;
+{$EXTERNALSYM RemovePropA}
+function RemovePropW(hWnd: HWND; lpString: LPCWSTR): HANDLE; stdcall;
+{$EXTERNALSYM RemovePropW}
+function RemoveProp(hWnd: HWND; lpString: LPCTSTR): HANDLE; stdcall;
+{$EXTERNALSYM RemoveProp}
+
+function EnumPropsExA(hWnd: HWND; lpEnumFunc: PROPENUMPROCEXA; lParam: LPARAM): Integer; stdcall;
+{$EXTERNALSYM EnumPropsExA}
+function EnumPropsExW(hWnd: HWND; lpEnumFunc: PROPENUMPROCEXW; lParam: LPARAM): Integer; stdcall;
+{$EXTERNALSYM EnumPropsExW}
+function EnumPropsEx(hWnd: HWND; lpEnumFunc: PROPENUMPROCEX; lParam: LPARAM): Integer; stdcall;
+{$EXTERNALSYM EnumPropsEx}
+
+function EnumPropsA(hWnd: HWND; lpEnumFunc: PROPENUMPROCA): Integer; stdcall;
+{$EXTERNALSYM EnumPropsA}
+function EnumPropsW(hWnd: HWND; lpEnumFunc: PROPENUMPROCW): Integer; stdcall;
+{$EXTERNALSYM EnumPropsW}
+function EnumProps(hWnd: HWND; lpEnumFunc: PROPENUMPROC): Integer; stdcall;
+{$EXTERNALSYM EnumProps}
+
+function SetWindowTextA(hWnd: HWND; lpString: LPCSTR): BOOL; stdcall;
+{$EXTERNALSYM SetWindowTextA}
+function SetWindowTextW(hWnd: HWND; lpString: LPCWSTR): BOOL; stdcall;
+{$EXTERNALSYM SetWindowTextW}
+function SetWindowText(hWnd: HWND; lpString: LPCTSTR): BOOL; stdcall;
+{$EXTERNALSYM SetWindowText}
+
+function GetWindowTextA(hWnd: HWND; lpString: LPSTR; nMaxCount: Integer): Integer; stdcall;
+{$EXTERNALSYM GetWindowTextA}
+function GetWindowTextW(hWnd: HWND; lpString: LPWSTR; nMaxCount: Integer): Integer; stdcall;
+{$EXTERNALSYM GetWindowTextW}
+function GetWindowText(hWnd: HWND; lpString: LPTSTR; nMaxCount: Integer): Integer; stdcall;
+{$EXTERNALSYM GetWindowText}
+
+function GetWindowTextLengthA(hWnd: HWND): Integer; stdcall;
+{$EXTERNALSYM GetWindowTextLengthA}
+function GetWindowTextLengthW(hWnd: HWND): Integer; stdcall;
+{$EXTERNALSYM GetWindowTextLengthW}
+function GetWindowTextLength(hWnd: HWND): Integer; stdcall;
+{$EXTERNALSYM GetWindowTextLength}
+
+function GetClientRect(hWnd: HWND; var lpRect: RECT): BOOL; stdcall;
+{$EXTERNALSYM GetClientRect}
+
+function GetWindowRect(hWnd: HWND; var lpRect: RECT): BOOL; stdcall;
+{$EXTERNALSYM GetWindowRect}
+
+function AdjustWindowRect(var lpRect: RECT; dwStyle: DWORD; bMenu: BOOL): BOOL; stdcall;
+{$EXTERNALSYM AdjustWindowRect}
+
+function AdjustWindowRectEx(var lpRect: RECT; dwStyle: DWORD;
+ bMenu: BOOL; dwExStyle: DWORD): BOOL; stdcall;
+{$EXTERNALSYM AdjustWindowRectEx}
+
+const
+ HELPINFO_WINDOW = $0001;
+ {$EXTERNALSYM HELPINFO_WINDOW}
+ HELPINFO_MENUITEM = $0002;
+ {$EXTERNALSYM HELPINFO_MENUITEM}
+
+type
+ LPHELPINFO = ^HELPINFO;
+ {$EXTERNALSYM LPHELPINFO}
+ tagHELPINFO = record // Structure pointed to by lParam of WM_HELP//
+ cbSize: UINT; // Size in bytes of this struct //
+ iContextType: Integer; // Either HELPINFO_WINDOW or HELPINFO_MENUITEM//
+ iCtrlId: Integer; // Control Id or a Menu item Id.//
+ hItemHandle: HANDLE; // hWnd of control or hMenu. //
+ dwContextId: DWORD_PTR; // Context Id associated with this item//
+ MousePos: POINT; // Mouse Position in screen co-ordinates//
+ end;
+ {$EXTERNALSYM tagHELPINFO}
+ HELPINFO = tagHELPINFO;
+ {$EXTERNALSYM HELPINFO}
+ THelpInfo = HELPINFO;
+ PHelpInfo = LPHELPINFO;
+
+function SetWindowContextHelpId(hwnd: HWND; dwContextHelpId: DWORD): BOOL; stdcall;
+{$EXTERNALSYM SetWindowContextHelpId}
+
+function GetWindowContextHelpId(hwnd: HWND): DWORD; stdcall;
+{$EXTERNALSYM GetWindowContextHelpId}
+
+function SetMenuContextHelpId(hmenu: HMENU; dwContextHelpId: DWORD): BOOL; stdcall;
+{$EXTERNALSYM SetMenuContextHelpId}
+
+function GetMenuContextHelpId(hmenu: HMENU): DWORD; stdcall;
+{$EXTERNALSYM GetMenuContextHelpId}
+
+//
+// MessageBox() Flags
+//
+
+const
+ MB_OK = $00000000;
+ {$EXTERNALSYM MB_OK}
+ MB_OKCANCEL = $00000001;
+ {$EXTERNALSYM MB_OKCANCEL}
+ MB_ABORTRETRYIGNORE = $00000002;
+ {$EXTERNALSYM MB_ABORTRETRYIGNORE}
+ MB_YESNOCANCEL = $00000003;
+ {$EXTERNALSYM MB_YESNOCANCEL}
+ MB_YESNO = $00000004;
+ {$EXTERNALSYM MB_YESNO}
+ MB_RETRYCANCEL = $00000005;
+ {$EXTERNALSYM MB_RETRYCANCEL}
+ MB_CANCELTRYCONTINUE = $00000006;
+ {$EXTERNALSYM MB_CANCELTRYCONTINUE}
+
+ MB_ICONHAND = $00000010;
+ {$EXTERNALSYM MB_ICONHAND}
+ MB_ICONQUESTION = $00000020;
+ {$EXTERNALSYM MB_ICONQUESTION}
+ MB_ICONEXCLAMATION = $00000030;
+ {$EXTERNALSYM MB_ICONEXCLAMATION}
+ MB_ICONASTERISK = $00000040;
+ {$EXTERNALSYM MB_ICONASTERISK}
+
+ MB_USERICON = $00000080;
+ {$EXTERNALSYM MB_USERICON}
+ MB_ICONWARNING = MB_ICONEXCLAMATION;
+ {$EXTERNALSYM MB_ICONWARNING}
+ MB_ICONERROR = MB_ICONHAND;
+ {$EXTERNALSYM MB_ICONERROR}
+
+ MB_ICONINFORMATION = MB_ICONASTERISK;
+ {$EXTERNALSYM MB_ICONINFORMATION}
+ MB_ICONSTOP = MB_ICONHAND;
+ {$EXTERNALSYM MB_ICONSTOP}
+
+ MB_DEFBUTTON1 = $00000000;
+ {$EXTERNALSYM MB_DEFBUTTON1}
+ MB_DEFBUTTON2 = $00000100;
+ {$EXTERNALSYM MB_DEFBUTTON2}
+ MB_DEFBUTTON3 = $00000200;
+ {$EXTERNALSYM MB_DEFBUTTON3}
+ MB_DEFBUTTON4 = $00000300;
+ {$EXTERNALSYM MB_DEFBUTTON4}
+
+ MB_APPLMODAL = $00000000;
+ {$EXTERNALSYM MB_APPLMODAL}
+ MB_SYSTEMMODAL = $00001000;
+ {$EXTERNALSYM MB_SYSTEMMODAL}
+ MB_TASKMODAL = $00002000;
+ {$EXTERNALSYM MB_TASKMODAL}
+ MB_HELP = $00004000; // Help Button
+ {$EXTERNALSYM MB_HELP}
+
+ MB_NOFOCUS = $00008000;
+ {$EXTERNALSYM MB_NOFOCUS}
+ MB_SETFOREGROUND = $00010000;
+ {$EXTERNALSYM MB_SETFOREGROUND}
+ MB_DEFAULT_DESKTOP_ONLY = $00020000;
+ {$EXTERNALSYM MB_DEFAULT_DESKTOP_ONLY}
+
+ MB_TOPMOST = $00040000;
+ {$EXTERNALSYM MB_TOPMOST}
+ MB_RIGHT = $00080000;
+ {$EXTERNALSYM MB_RIGHT}
+ MB_RTLREADING = $00100000;
+ {$EXTERNALSYM MB_RTLREADING}
+
+const
+ {$IFDEF WINNT4_UP}
+ MB_SERVICE_NOTIFICATION = $00200000;
+ {$EXTERNALSYM MB_SERVICE_NOTIFICATION}
+ {$ELSE}
+ MB_SERVICE_NOTIFICATION = $00040000;
+ {$EXTERNALSYM MB_SERVICE_NOTIFICATION}
+ {$ENDIF WINNT4_UP}
+
+ MB_TYPEMASK = $0000000F;
+ {$EXTERNALSYM MB_TYPEMASK}
+ MB_ICONMASK = $000000F0;
+ {$EXTERNALSYM MB_ICONMASK}
+ MB_DEFMASK = $00000F00;
+ {$EXTERNALSYM MB_DEFMASK}
+ MB_MODEMASK = $00003000;
+ {$EXTERNALSYM MB_MODEMASK}
+ MB_MISCMASK = $0000C000;
+ {$EXTERNALSYM MB_MISCMASK}
+
+function MessageBoxA(hWnd: HWND; lpText, lpCaption: LPCSTR; uType: UINT): Integer; stdcall;
+{$EXTERNALSYM MessageBoxA}
+function MessageBoxW(hWnd: HWND; lpText, lpCaption: LPCWSTR; uType: UINT): Integer; stdcall;
+{$EXTERNALSYM MessageBoxW}
+function MessageBox(hWnd: HWND; lpText, lpCaption: LPCTSTR; uType: UINT): Integer; stdcall;
+{$EXTERNALSYM MessageBox}
+
+function MessageBoxExA(hWnd: HWND; lpText, lpCaption: LPCSTR; uType: UINT;
+ wLanguageId: WORD): Integer; stdcall;
+{$EXTERNALSYM MessageBoxExA}
+function MessageBoxExW(hWnd: HWND; lpText, lpCaption: LPCWSTR; uType: UINT;
+ wLanguageId: WORD): Integer; stdcall;
+{$EXTERNALSYM MessageBoxExW}
+function MessageBoxEx(hWnd: HWND; lpText, lpCaption: LPCTSTR; uType: UINT;
+ wLanguageId: WORD): Integer; stdcall;
+{$EXTERNALSYM MessageBoxEx}
+
+type
+ MSGBOXCALLBACK = procedure(var lpHelpInfo: HELPINFO); stdcall;
+ {$EXTERNALSYM MSGBOXCALLBACK}
+ TMsgBoxCallback = MSGBOXCALLBACK;
+
+ LPMSGBOXPARAMSA = ^MSGBOXPARAMSA;
+ {$EXTERNALSYM LPMSGBOXPARAMSA}
+ tagMSGBOXPARAMSA = record
+ cbSize: UINT;
+ hwndOwner: HWND;
+ hInstance: HINSTANCE;
+ lpszText: LPCSTR;
+ lpszCaption: LPCSTR;
+ dwStyle: DWORD;
+ lpszIcon: LPCSTR;
+ dwContextHelpId: DWORD_PTR;
+ lpfnMsgBoxCallback: MSGBOXCALLBACK;
+ dwLanguageId: DWORD;
+ end;
+ {$EXTERNALSYM tagMSGBOXPARAMSA}
+ MSGBOXPARAMSA = tagMSGBOXPARAMSA;
+ {$EXTERNALSYM MSGBOXPARAMSA}
+ TMsgBoxParamsA = MSGBOXPARAMSA;
+ PMsgBoxParamsA = LPMSGBOXPARAMSA;
+
+ LPMSGBOXPARAMSW = ^MSGBOXPARAMSW;
+ {$EXTERNALSYM LPMSGBOXPARAMSW}
+ tagMSGBOXPARAMSW = record
+ cbSize: UINT;
+ hwndOwner: HWND;
+ hInstance: HINSTANCE;
+ lpszText: LPCWSTR;
+ lpszCaption: LPCWSTR;
+ dwStyle: DWORD;
+ lpszIcon: LPCWSTR;
+ dwContextHelpId: DWORD_PTR;
+ lpfnMsgBoxCallback: MSGBOXCALLBACK;
+ dwLanguageId: DWORD;
+ end;
+ {$EXTERNALSYM tagMSGBOXPARAMSW}
+ MSGBOXPARAMSW = tagMSGBOXPARAMSW;
+ {$EXTERNALSYM MSGBOXPARAMSW}
+ TMsgBoxParamsW = MSGBOXPARAMSW;
+ PMsgBoxParamsW = LPMSGBOXPARAMSW;
+
+ {$IFDEF UNICODE}
+ MSGBOXPARAMS = MSGBOXPARAMSW;
+ {$EXTERNALSYM MSGBOXPARAMS}
+ LPMSGBOXPARAMS = LPMSGBOXPARAMSW;
+ {$EXTERNALSYM LPMSGBOXPARAMS}
+ TMsgBoxParams = TMsgBoxParamsW;
+ PMsgBoxParams = PMsgBoxParamsW;
+ {$ELSE}
+ MSGBOXPARAMS = MSGBOXPARAMSA;
+ {$EXTERNALSYM MSGBOXPARAMS}
+ LPMSGBOXPARAMS = LPMSGBOXPARAMSA;
+ {$EXTERNALSYM LPMSGBOXPARAMS}
+ TMsgBoxParams = TMsgBoxParamsA;
+ PMsgBoxParams = PMsgBoxParamsA;
+ {$ENDIF UNICODE}
+
+function MessageBoxIndirectA(const lpMsgBoxParams: MSGBOXPARAMSA): Integer; stdcall;
+{$EXTERNALSYM MessageBoxIndirectA}
+function MessageBoxIndirectW(const lpMsgBoxParams: MSGBOXPARAMSW): Integer; stdcall;
+{$EXTERNALSYM MessageBoxIndirectW}
+function MessageBoxIndirect(const lpMsgBoxParams: MSGBOXPARAMS): Integer; stdcall;
+{$EXTERNALSYM MessageBoxIndirect}
+
+function MessageBeep(uType: UINT): BOOL; stdcall;
+{$EXTERNALSYM MessageBeep}
+
+function ShowCursor(bShow: BOOL): Integer; stdcall;
+{$EXTERNALSYM ShowCursor}
+
+function SetCursorPos(X, Y: Integer): BOOL; stdcall;
+{$EXTERNALSYM SetCursorPos}
+
+function SetCursor(hCursor: HCURSOR): HCURSOR; stdcall;
+{$EXTERNALSYM SetCursor}
+
+function GetCursorPos(var lpPoint: POINT): BOOL; stdcall;
+{$EXTERNALSYM GetCursorPos}
+
+function ClipCursor(lpRect: LPRECT): BOOL; stdcall;
+{$EXTERNALSYM ClipCursor}
+
+function GetClipCursor(var lpRect: RECT): BOOL; stdcall;
+{$EXTERNALSYM GetClipCursor}
+
+function GetCursor: HCURSOR; stdcall;
+{$EXTERNALSYM GetCursor}
+
+function CreateCaret(hWnd: HWND; hBitmap: HBITMAP; nWidth, nHeight: Integer): BOOL; stdcall;
+{$EXTERNALSYM CreateCaret}
+
+function GetCaretBlinkTime: UINT; stdcall;
+{$EXTERNALSYM GetCaretBlinkTime}
+
+function SetCaretBlinkTime(uMSeconds: UINT): BOOL; stdcall;
+{$EXTERNALSYM SetCaretBlinkTime}
+
+function DestroyCaret: BOOL; stdcall;
+{$EXTERNALSYM DestroyCaret}
+
+function HideCaret(hWnd: HWND): BOOL; stdcall;
+{$EXTERNALSYM HideCaret}
+
+function ShowCaret(hWnd: HWND): BOOL; stdcall;
+{$EXTERNALSYM ShowCaret}
+
+function SetCaretPos(X, Y: Integer): BOOL; stdcall;
+{$EXTERNALSYM SetCaretPos}
+
+function GetCaretPos(var lpPoint: POINT): BOOL; stdcall;
+{$EXTERNALSYM GetCaretPos}
+
+function ClientToScreen(hWnd: HWND; var lpPoint: POINT): BOOL; stdcall;
+{$EXTERNALSYM ClientToScreen}
+
+function ScreenToClient(hWnd: HWND; var lpPoint: POINT): BOOL; stdcall;
+{$EXTERNALSYM ScreenToClient}
+
+function MapWindowPoints(hWndFrom, hWndTo: HWND; lpPoints: LPPOINT; cPoints: UINT): Integer; stdcall;
+{$EXTERNALSYM MapWindowPoints}
+
+function WindowFromPoint(Point: POINT): HWND; stdcall;
+{$EXTERNALSYM WindowFromPoint}
+
+function ChildWindowFromPoint(hWndParent: HWND; Point: POINT): HWND; stdcall;
+{$EXTERNALSYM ChildWindowFromPoint}
+
+const
+ CWP_ALL = $0000;
+ {$EXTERNALSYM CWP_ALL}
+ CWP_SKIPINVISIBLE = $0001;
+ {$EXTERNALSYM CWP_SKIPINVISIBLE}
+ CWP_SKIPDISABLED = $0002;
+ {$EXTERNALSYM CWP_SKIPDISABLED}
+ CWP_SKIPTRANSPARENT = $0004;
+ {$EXTERNALSYM CWP_SKIPTRANSPARENT}
+
+function ChildWindowFromPointEx(hwndParent: HWND; pt: POINT; uFlags: UINT): HWND; stdcall;
+{$EXTERNALSYM ChildWindowFromPointEx}
+
+//
+// Color Types
+//
+
+const
+ CTLCOLOR_MSGBOX = 0;
+ {$EXTERNALSYM CTLCOLOR_MSGBOX}
+ CTLCOLOR_EDIT = 1;
+ {$EXTERNALSYM CTLCOLOR_EDIT}
+ CTLCOLOR_LISTBOX = 2;
+ {$EXTERNALSYM CTLCOLOR_LISTBOX}
+ CTLCOLOR_BTN = 3;
+ {$EXTERNALSYM CTLCOLOR_BTN}
+ CTLCOLOR_DLG = 4;
+ {$EXTERNALSYM CTLCOLOR_DLG}
+ CTLCOLOR_SCROLLBAR = 5;
+ {$EXTERNALSYM CTLCOLOR_SCROLLBAR}
+ CTLCOLOR_STATIC = 6;
+ {$EXTERNALSYM CTLCOLOR_STATIC}
+ CTLCOLOR_MAX = 7;
+ {$EXTERNALSYM CTLCOLOR_MAX}
+
+ COLOR_SCROLLBAR = 0;
+ {$EXTERNALSYM COLOR_SCROLLBAR}
+ COLOR_BACKGROUND = 1;
+ {$EXTERNALSYM COLOR_BACKGROUND}
+ COLOR_ACTIVECAPTION = 2;
+ {$EXTERNALSYM COLOR_ACTIVECAPTION}
+ COLOR_INACTIVECAPTION = 3;
+ {$EXTERNALSYM COLOR_INACTIVECAPTION}
+ COLOR_MENU = 4;
+ {$EXTERNALSYM COLOR_MENU}
+ COLOR_WINDOW = 5;
+ {$EXTERNALSYM COLOR_WINDOW}
+ COLOR_WINDOWFRAME = 6;
+ {$EXTERNALSYM COLOR_WINDOWFRAME}
+ COLOR_MENUTEXT = 7;
+ {$EXTERNALSYM COLOR_MENUTEXT}
+ COLOR_WINDOWTEXT = 8;
+ {$EXTERNALSYM COLOR_WINDOWTEXT}
+ COLOR_CAPTIONTEXT = 9;
+ {$EXTERNALSYM COLOR_CAPTIONTEXT}
+ COLOR_ACTIVEBORDER = 10;
+ {$EXTERNALSYM COLOR_ACTIVEBORDER}
+ COLOR_INACTIVEBORDER = 11;
+ {$EXTERNALSYM COLOR_INACTIVEBORDER}
+ COLOR_APPWORKSPACE = 12;
+ {$EXTERNALSYM COLOR_APPWORKSPACE}
+ COLOR_HIGHLIGHT = 13;
+ {$EXTERNALSYM COLOR_HIGHLIGHT}
+ COLOR_HIGHLIGHTTEXT = 14;
+ {$EXTERNALSYM COLOR_HIGHLIGHTTEXT}
+ COLOR_BTNFACE = 15;
+ {$EXTERNALSYM COLOR_BTNFACE}
+ COLOR_BTNSHADOW = 16;
+ {$EXTERNALSYM COLOR_BTNSHADOW}
+ COLOR_GRAYTEXT = 17;
+ {$EXTERNALSYM COLOR_GRAYTEXT}
+ COLOR_BTNTEXT = 18;
+ {$EXTERNALSYM COLOR_BTNTEXT}
+ COLOR_INACTIVECAPTIONTEXT = 19;
+ {$EXTERNALSYM COLOR_INACTIVECAPTIONTEXT}
+ COLOR_BTNHIGHLIGHT = 20;
+ {$EXTERNALSYM COLOR_BTNHIGHLIGHT}
+
+ COLOR_3DDKSHADOW = 21;
+ {$EXTERNALSYM COLOR_3DDKSHADOW}
+ COLOR_3DLIGHT = 22;
+ {$EXTERNALSYM COLOR_3DLIGHT}
+ COLOR_INFOTEXT = 23;
+ {$EXTERNALSYM COLOR_INFOTEXT}
+ COLOR_INFOBK = 24;
+ {$EXTERNALSYM COLOR_INFOBK}
+
+ COLOR_HOTLIGHT = 26;
+ {$EXTERNALSYM COLOR_HOTLIGHT}
+ COLOR_GRADIENTACTIVECAPTION = 27;
+ {$EXTERNALSYM COLOR_GRADIENTACTIVECAPTION}
+ COLOR_GRADIENTINACTIVECAPTION = 28;
+ {$EXTERNALSYM COLOR_GRADIENTINACTIVECAPTION}
+ COLOR_MENUHILIGHT = 29;
+ {$EXTERNALSYM COLOR_MENUHILIGHT}
+ COLOR_MENUBAR = 30;
+ {$EXTERNALSYM COLOR_MENUBAR}
+
+ COLOR_DESKTOP = COLOR_BACKGROUND;
+ {$EXTERNALSYM COLOR_DESKTOP}
+ COLOR_3DFACE = COLOR_BTNFACE;
+ {$EXTERNALSYM COLOR_3DFACE}
+ COLOR_3DSHADOW = COLOR_BTNSHADOW;
+ {$EXTERNALSYM COLOR_3DSHADOW}
+ COLOR_3DHIGHLIGHT = COLOR_BTNHIGHLIGHT;
+ {$EXTERNALSYM COLOR_3DHIGHLIGHT}
+ COLOR_3DHILIGHT = COLOR_BTNHIGHLIGHT;
+ {$EXTERNALSYM COLOR_3DHILIGHT}
+ COLOR_BTNHILIGHT = COLOR_BTNHIGHLIGHT;
+ {$EXTERNALSYM COLOR_BTNHILIGHT}
+
+function GetSysColor(nIndex: Integer): DWORD; stdcall;
+{$EXTERNALSYM GetSysColor}
+
+function GetSysColorBrush(nIndex: Integer): HBRUSH; stdcall;
+{$EXTERNALSYM GetSysColorBrush}
+
+function SetSysColors(cElements: Integer; lpaElements: LPINT;
+ lpaRgbValues: LPCOLORREF): BOOL; stdcall;
+{$EXTERNALSYM SetSysColors}
+
+function DrawFocusRect(hDC: HDC; const lprc: RECT): BOOL; stdcall;
+{$EXTERNALSYM DrawFocusRect}
+
+function FillRect(hDC: HDC; const lprc: RECT; hbr: HBRUSH): Integer; stdcall;
+{$EXTERNALSYM FillRect}
+
+function FrameRect(hDC: HDC; const lprc: RECT; hbr: HBRUSH): Integer; stdcall;
+{$EXTERNALSYM FrameRect}
+
+function InvertRect(hDC: HDC; const lprc: RECT): BOOL; stdcall;
+{$EXTERNALSYM InvertRect}
+
+function SetRect(var lprc: RECT; xLeft, yTop, xRight, yBottom: Integer): BOOL; stdcall;
+{$EXTERNALSYM SetRect}
+
+function SetRectEmpty(var lprc: RECT): BOOL; stdcall;
+{$EXTERNALSYM SetRectEmpty}
+
+function CopyRect(var lprcDst: RECT; const lprcSrc: RECT): BOOL; stdcall;
+{$EXTERNALSYM CopyRect}
+
+function InflateRect(var lprc: RECT; dx, dy: Integer): BOOL; stdcall;
+{$EXTERNALSYM InflateRect}
+
+function IntersectRect(var lprcDst: RECT; const lprcSrc1, lprcSrc2: RECT): BOOL; stdcall;
+{$EXTERNALSYM IntersectRect}
+
+function UnionRect(var lprcDst: RECT; const lprcSrc1, lprcSrc2: RECT): BOOL; stdcall;
+{$EXTERNALSYM UnionRect}
+
+function SubtractRect(var lprcDst: RECT; const lprcSrc1, lprcSrc2: RECT): BOOL; stdcall;
+{$EXTERNALSYM SubtractRect}
+
+function OffsetRect(var lprc: RECT; dx, dy: Integer): BOOL; stdcall;
+{$EXTERNALSYM OffsetRect}
+
+function IsRectEmpty(const lprc: RECT): BOOL; stdcall;
+{$EXTERNALSYM IsRectEmpty}
+
+function EqualRect(const lprc1, lprc2: RECT): BOOL; stdcall;
+{$EXTERNALSYM EqualRect}
+
+function PtInRect(const lprc: RECT; pt: POINT): BOOL; stdcall;
+{$EXTERNALSYM PtInRect}
+
+function GetWindowWord(hWnd: HWND; nIndex: Integer): WORD; stdcall;
+{$EXTERNALSYM GetWindowWord}
+
+function SetWindowWord(hWnd: HWND; nIndex: Integer; wNewWord: WORD): WORD; stdcall;
+{$EXTERNALSYM SetWindowWord}
+
+function GetWindowLongA(hWnd: HWND; nIndex: Integer): LONG; stdcall;
+{$EXTERNALSYM GetWindowLongA}
+function GetWindowLongW(hWnd: HWND; nIndex: Integer): LONG; stdcall;
+{$EXTERNALSYM GetWindowLongW}
+function GetWindowLong(hWnd: HWND; nIndex: Integer): LONG; stdcall;
+{$EXTERNALSYM GetWindowLong}
+
+function SetWindowLongA(hWnd: HWND; nIndex: Integer; dwNewLong: LONG): LONG; stdcall;
+{$EXTERNALSYM SetWindowLongA}
+function SetWindowLongW(hWnd: HWND; nIndex: Integer; dwNewLong: LONG): LONG; stdcall;
+{$EXTERNALSYM SetWindowLongW}
+function SetWindowLong(hWnd: HWND; nIndex: Integer; dwNewLong: LONG): LONG; stdcall;
+{$EXTERNALSYM SetWindowLong}
+
+function GetWindowLongPtrA(hWnd: HWND; nIndex: Integer): LONG_PTR;
+{$EXTERNALSYM GetWindowLongPtrA}
+function GetWindowLongPtrW(hWnd: HWND; nIndex: Integer): LONG_PTR;
+{$EXTERNALSYM GetWindowLongPtrW}
+function GetWindowLongPtr(hWnd: HWND; nIndex: Integer): LONG_PTR;
+{$EXTERNALSYM GetWindowLongPtr}
+
+function SetWindowLongPtrA(hWnd: HWND; nIndex: Integer; dwNewLong: LONG_PTR): LONG_PTR;
+{$EXTERNALSYM SetWindowLongPtrA}
+function SetWindowLongPtrW(hWnd: HWND; nIndex: Integer; dwNewLong: LONG_PTR): LONG_PTR;
+{$EXTERNALSYM SetWindowLongPtrW}
+function SetWindowLongPtr(hWnd: HWND; nIndex: Integer; dwNewLong: LONG_PTR): LONG_PTR;
+{$EXTERNALSYM SetWindowLongPtr}
+
+function GetClassWord(hWnd: HWND; nIndex: Integer): WORD; stdcall;
+{$EXTERNALSYM GetClassWord}
+
+function SetClassWord(hWnd: HWND; nIndex: Integer; wNewWord: WORD): WORD; stdcall;
+{$EXTERNALSYM SetClassWord}
+
+function GetClassLongA(hWnd: HWND; nIndex: Integer): DWORD; stdcall;
+{$EXTERNALSYM GetClassLongA}
+function GetClassLongW(hWnd: HWND; nIndex: Integer): DWORD; stdcall;
+{$EXTERNALSYM GetClassLongW}
+function GetClassLong(hWnd: HWND; nIndex: Integer): DWORD; stdcall;
+{$EXTERNALSYM GetClassLong}
+
+function SetClassLongA(hWnd: HWND; nIndex: Integer; dwNewLong: LONG): DWORD; stdcall;
+{$EXTERNALSYM SetClassLongA}
+function SetClassLongW(hWnd: HWND; nIndex: Integer; dwNewLong: LONG): DWORD; stdcall;
+{$EXTERNALSYM SetClassLongW}
+function SetClassLong(hWnd: HWND; nIndex: Integer; dwNewLong: LONG): DWORD; stdcall;
+{$EXTERNALSYM SetClassLong}
+
+function GetClassLongPtrA(hWnd: HWND; nIndex: Integer): ULONG_PTR;
+{$EXTERNALSYM GetClassLongPtrA}
+function GetClassLongPtrW(hWnd: HWND; nIndex: Integer): ULONG_PTR;
+{$EXTERNALSYM GetClassLongPtrW}
+function GetClassLongPtr(hWnd: HWND; nIndex: Integer): ULONG_PTR;
+{$EXTERNALSYM GetClassLongPtr}
+
+function SetClassLongPtrA(hWnd: HWND; nIndex: Integer; dwNewLong: ULONG_PTR): ULONG_PTR;
+{$EXTERNALSYM SetClassLongPtrA}
+function SetClassLongPtrW(hWnd: HWND; nIndex: Integer; dwNewLong: ULONG_PTR): ULONG_PTR;
+{$EXTERNALSYM SetClassLongPtrW}
+function SetClassLongPtr(hWnd: HWND; nIndex: Integer; dwNewLong: ULONG_PTR): ULONG_PTR;
+{$EXTERNALSYM SetClassLongPtr}
+
+function GetProcessDefaultLayout(var pdwDefaultLayout: DWORD): BOOL; stdcall;
+{$EXTERNALSYM GetProcessDefaultLayout}
+
+function SetProcessDefaultLayout(dwDefaultLayout: DWORD): BOOL; stdcall;
+{$EXTERNALSYM SetProcessDefaultLayout}
+
+function GetDesktopWindow: HWND; stdcall;
+{$EXTERNALSYM GetDesktopWindow}
+
+function GetParent(hWnd: HWND): HWND; stdcall;
+{$EXTERNALSYM GetParent}
+
+function SetParent(hWndChild, hWndNewParent: HWND): HWND; stdcall;
+{$EXTERNALSYM SetParent}
+
+function EnumChildWindows(hWndParent: HWND; lpEnumFunc: WNDENUMPROC; lParam: LPARAM): BOOL; stdcall;
+{$EXTERNALSYM EnumChildWindows}
+
+function FindWindowA(lpClassName, lpWindowName: LPCSTR): HWND; stdcall;
+{$EXTERNALSYM FindWindowA}
+function FindWindowW(lpClassName, lpWindowName: LPCWSTR): HWND; stdcall;
+{$EXTERNALSYM FindWindowW}
+function FindWindow(lpClassName, lpWindowName: LPCTSTR): HWND; stdcall;
+{$EXTERNALSYM FindWindow}
+
+function FindWindowExA(hwndParent, hwndChildAfter: HWND; lpszClass, lpszWindow: LPCSTR): HWND; stdcall;
+{$EXTERNALSYM FindWindowExA}
+function FindWindowExW(hwndParent, hwndChildAfter: HWND; lpszClass, lpszWindow: LPCWSTR): HWND; stdcall;
+{$EXTERNALSYM FindWindowExW}
+function FindWindowEx(hwndParent, hwndChildAfter: HWND; lpszClass, lpszWindow: LPCTSTR): HWND; stdcall;
+{$EXTERNALSYM FindWindowEx}
+
+function GetShellWindow: HWND; stdcall;
+{$EXTERNALSYM GetShellWindow}
+
+function RegisterShellHookWindow(h: HWND): BOOL; stdcall;
+{$EXTERNALSYM RegisterShellHookWindow}
+
+function DeregisterShellHookWindow(h: HWND): BOOL; stdcall;
+{$EXTERNALSYM DeregisterShellHookWindow}
+
+function EnumWindows(lpEnumFunc: WNDENUMPROC; lParam: LPARAM): BOOL; stdcall;
+{$EXTERNALSYM EnumWindows}
+
+function EnumThreadWindows(dwThreadId: DWORD; lpfn: WNDENUMPROC; lParam: LPARAM): BOOL; stdcall;
+{$EXTERNALSYM EnumThreadWindows}
+
+function EnumTaskWindows(hTask: HANDLE; lpfn: WNDENUMPROC; lParam: LPARAM): BOOL;
+{$EXTERNALSYM EnumTaskWindows}
+
+function GetClassNameA(hWnd: HWND; lpClassName: LPSTR; nMaxCount: Integer): Integer; stdcall;
+{$EXTERNALSYM GetClassNameA}
+function GetClassNameW(hWnd: HWND; lpClassName: LPWSTR; nMaxCount: Integer): Integer; stdcall;
+{$EXTERNALSYM GetClassNameW}
+function GetClassName(hWnd: HWND; lpClassName: LPTSTR; nMaxCount: Integer): Integer; stdcall;
+{$EXTERNALSYM GetClassName}
+
+function GetTopWindow(hWnd: HWND): HWND; stdcall;
+{$EXTERNALSYM GetTopWindow}
+
+function GetNextWindow(hWnd: HWND; wCmd: UINT): HWND;
+{$EXTERNALSYM GetNextWindow}
+
+function GetWindowThreadProcessId(hWnd: HWND; lpdwProcessId: LPDWORD): DWORD; stdcall;
+{$EXTERNALSYM GetWindowThreadProcessId}
+
+function IsGUIThread(bConvert: BOOL): BOOL; stdcall;
+{$EXTERNALSYM IsGUIThread}
+
+function GetWindowTask(hWnd: HWND): HANDLE;
+{$EXTERNALSYM GetWindowTask}
+
+function GetLastActivePopup(hWnd: HWND): HWND; stdcall;
+{$EXTERNALSYM GetLastActivePopup}
+
+//
+// GetWindow() Constants
+//
+
+const
+ GW_HWNDFIRST = 0;
+ {$EXTERNALSYM GW_HWNDFIRST}
+ GW_HWNDLAST = 1;
+ {$EXTERNALSYM GW_HWNDLAST}
+ GW_HWNDNEXT = 2;
+ {$EXTERNALSYM GW_HWNDNEXT}
+ GW_HWNDPREV = 3;
+ {$EXTERNALSYM GW_HWNDPREV}
+ GW_OWNER = 4;
+ {$EXTERNALSYM GW_OWNER}
+ GW_CHILD = 5;
+ {$EXTERNALSYM GW_CHILD}
+ {$IFNDEF WIN98_UP} // #if(WINVER <= 0x0400)
+ GW_MAX = 5;
+ {$EXTERNALSYM GW_MAX}
+ {$ELSE}
+ GW_ENABLEDPOPUP = 6;
+ {$EXTERNALSYM GW_ENABLEDPOPUP}
+ GW_MAX = 6;
+ {$EXTERNALSYM GW_MAX}
+ {$ENDIF WIN98ME_UP}
+
+function GetWindow(hWnd: HWND; uCmd: UINT): HWND; stdcall;
+{$EXTERNALSYM GetWindow}
+
+function SetWindowsHookA(nFilterType: Integer; pfnFilterProc: HOOKPROC): HHOOK; stdcall;
+{$EXTERNALSYM SetWindowsHookA}
+function SetWindowsHookW(nFilterType: Integer; pfnFilterProc: HOOKPROC): HHOOK; stdcall;
+{$EXTERNALSYM SetWindowsHookW}
+function SetWindowsHook(nFilterType: Integer; pfnFilterProc: HOOKPROC): HHOOK; stdcall;
+{$EXTERNALSYM SetWindowsHook}
+
+function UnhookWindowsHook(nCode: Integer; pfnFilterProc: HOOKPROC): BOOL; stdcall;
+{$EXTERNALSYM UnhookWindowsHook}
+
+function SetWindowsHookExA(idHook: Integer; lpfn: HOOKPROC; hmod: HINSTANCE;
+ dwThreadId: DWORD): HHOOK; stdcall;
+{$EXTERNALSYM SetWindowsHookExA}
+function SetWindowsHookExW(idHook: Integer; lpfn: HOOKPROC; hmod: HINSTANCE;
+ dwThreadId: DWORD): HHOOK; stdcall;
+{$EXTERNALSYM SetWindowsHookExW}
+function SetWindowsHookEx(idHook: Integer; lpfn: HOOKPROC; hmod: HINSTANCE;
+ dwThreadId: DWORD): HHOOK; stdcall;
+{$EXTERNALSYM SetWindowsHookEx}
+
+function UnhookWindowsHookEx(hhk: HHOOK): BOOL; stdcall;
+{$EXTERNALSYM UnhookWindowsHookEx}
+
+function CallNextHookEx(hhk: HHOOK; nCode: Integer; wParam: WPARAM; lParam: LPARAM): LRESULT; stdcall;
+{$EXTERNALSYM CallNextHookEx}
+
+//
+// Macros for source-level compatibility with old functions.
+//
+
+function DefHookProc(nCode: Integer; wParam: WPARAM; lParam: LPARAM; phhk: LPHHOOK): LRESULT;
+{$EXTERNALSYM DefHookProc}
+
+// ;win40 -- A lot of MF_* flags have been renamed as MFT_* and MFS_* flags//
+//
+// Menu flags for Add/Check/EnableMenuItem()
+///)
+
+const
+ MF_INSERT = $00000000;
+ {$EXTERNALSYM MF_INSERT}
+ MF_CHANGE = $00000080;
+ {$EXTERNALSYM MF_CHANGE}
+ MF_APPEND = $00000100;
+ {$EXTERNALSYM MF_APPEND}
+ MF_DELETE = $00000200;
+ {$EXTERNALSYM MF_DELETE}
+ MF_REMOVE = $00001000;
+ {$EXTERNALSYM MF_REMOVE}
+
+ MF_BYCOMMAND = $00000000;
+ {$EXTERNALSYM MF_BYCOMMAND}
+ MF_BYPOSITION = $00000400;
+ {$EXTERNALSYM MF_BYPOSITION}
+
+ MF_SEPARATOR = $00000800;
+ {$EXTERNALSYM MF_SEPARATOR}
+
+ MF_ENABLED = $00000000;
+ {$EXTERNALSYM MF_ENABLED}
+ MF_GRAYED = $00000001;
+ {$EXTERNALSYM MF_GRAYED}
+ MF_DISABLED = $00000002;
+ {$EXTERNALSYM MF_DISABLED}
+
+ MF_UNCHECKED = $00000000;
+ {$EXTERNALSYM MF_UNCHECKED}
+ MF_CHECKED = $00000008;
+ {$EXTERNALSYM MF_CHECKED}
+ MF_USECHECKBITMAPS = $00000200;
+ {$EXTERNALSYM MF_USECHECKBITMAPS}
+
+ MF_STRING = $00000000;
+ {$EXTERNALSYM MF_STRING}
+ MF_BITMAP = $00000004;
+ {$EXTERNALSYM MF_BITMAP}
+ MF_OWNERDRAW = $00000100;
+ {$EXTERNALSYM MF_OWNERDRAW}
+
+ MF_POPUP = $00000010;
+ {$EXTERNALSYM MF_POPUP}
+ MF_MENUBARBREAK = $00000020;
+ {$EXTERNALSYM MF_MENUBARBREAK}
+ MF_MENUBREAK = $00000040;
+ {$EXTERNALSYM MF_MENUBREAK}
+
+ MF_UNHILITE = $00000000;
+ {$EXTERNALSYM MF_UNHILITE}
+ MF_HILITE = $00000080;
+ {$EXTERNALSYM MF_HILITE}
+
+ MF_DEFAULT = $00001000;
+ {$EXTERNALSYM MF_DEFAULT}
+ MF_SYSMENU = $00002000;
+ {$EXTERNALSYM MF_SYSMENU}
+ MF_HELP = $00004000;
+ {$EXTERNALSYM MF_HELP}
+ MF_RIGHTJUSTIFY = $00004000;
+ {$EXTERNALSYM MF_RIGHTJUSTIFY}
+
+ MF_MOUSESELECT = $00008000;
+ {$EXTERNALSYM MF_MOUSESELECT}
+ MF_END = $00000080; // Obsolete -- only used by old RES files
+ {$EXTERNALSYM MF_END}
+
+ MFT_STRING = MF_STRING;
+ {$EXTERNALSYM MFT_STRING}
+ MFT_BITMAP = MF_BITMAP;
+ {$EXTERNALSYM MFT_BITMAP}
+ MFT_MENUBARBREAK = MF_MENUBARBREAK;
+ {$EXTERNALSYM MFT_MENUBARBREAK}
+ MFT_MENUBREAK = MF_MENUBREAK;
+ {$EXTERNALSYM MFT_MENUBREAK}
+ MFT_OWNERDRAW = MF_OWNERDRAW;
+ {$EXTERNALSYM MFT_OWNERDRAW}
+ MFT_RADIOCHECK = $00000200;
+ {$EXTERNALSYM MFT_RADIOCHECK}
+ MFT_SEPARATOR = MF_SEPARATOR;
+ {$EXTERNALSYM MFT_SEPARATOR}
+ MFT_RIGHTORDER = $00002000;
+ {$EXTERNALSYM MFT_RIGHTORDER}
+ MFT_RIGHTJUSTIFY = MF_RIGHTJUSTIFY;
+ {$EXTERNALSYM MFT_RIGHTJUSTIFY}
+
+// Menu flags for Add/Check/EnableMenuItem()
+
+ MFS_GRAYED = $00000003;
+ {$EXTERNALSYM MFS_GRAYED}
+ MFS_DISABLED = MFS_GRAYED;
+ {$EXTERNALSYM MFS_DISABLED}
+ MFS_CHECKED = MF_CHECKED;
+ {$EXTERNALSYM MFS_CHECKED}
+ MFS_HILITE = MF_HILITE;
+ {$EXTERNALSYM MFS_HILITE}
+ MFS_ENABLED = MF_ENABLED;
+ {$EXTERNALSYM MFS_ENABLED}
+ MFS_UNCHECKED = MF_UNCHECKED;
+ {$EXTERNALSYM MFS_UNCHECKED}
+ MFS_UNHILITE = MF_UNHILITE;
+ {$EXTERNALSYM MFS_UNHILITE}
+ MFS_DEFAULT = MF_DEFAULT;
+ {$EXTERNALSYM MFS_DEFAULT}
+
+function CheckMenuRadioItem(hmenu: HMENU; idFirst, idLast, idCheck, uFlags: UINT): BOOL; stdcall;
+{$EXTERNALSYM CheckMenuRadioItem}
+
+//
+// Menu item resource format
+//
+
+type
+ PMENUITEMTEMPLATEHEADER = ^MENUITEMTEMPLATEHEADER;
+ MENUITEMTEMPLATEHEADER = record
+ versionNumber: WORD;
+ offset: WORD;
+ end;
+ {$EXTERNALSYM MENUITEMTEMPLATEHEADER}
+ TMenuItemTemplateHeader = MENUITEMTEMPLATEHEADER;
+
+ PMENUITEMTEMPLATE = ^MENUITEMTEMPLATE; // version 0
+ MENUITEMTEMPLATE = record
+ mtOption: WORD;
+ mtID: WORD;
+ mtString: array [0..0] of WCHAR;
+ end;
+ {$EXTERNALSYM MENUITEMTEMPLATE}
+ TMenuItemTemplate = MENUITEMTEMPLATE;
+
+//
+// System Menu Command Values
+//
+
+const
+ SC_SIZE = $F000;
+ {$EXTERNALSYM SC_SIZE}
+ SC_MOVE = $F010;
+ {$EXTERNALSYM SC_MOVE}
+ SC_MINIMIZE = $F020;
+ {$EXTERNALSYM SC_MINIMIZE}
+ SC_MAXIMIZE = $F030;
+ {$EXTERNALSYM SC_MAXIMIZE}
+ SC_NEXTWINDOW = $F040;
+ {$EXTERNALSYM SC_NEXTWINDOW}
+ SC_PREVWINDOW = $F050;
+ {$EXTERNALSYM SC_PREVWINDOW}
+ SC_CLOSE = $F060;
+ {$EXTERNALSYM SC_CLOSE}
+ SC_VSCROLL = $F070;
+ {$EXTERNALSYM SC_VSCROLL}
+ SC_HSCROLL = $F080;
+ {$EXTERNALSYM SC_HSCROLL}
+ SC_MOUSEMENU = $F090;
+ {$EXTERNALSYM SC_MOUSEMENU}
+ SC_KEYMENU = $F100;
+ {$EXTERNALSYM SC_KEYMENU}
+ SC_ARRANGE = $F110;
+ {$EXTERNALSYM SC_ARRANGE}
+ SC_RESTORE = $F120;
+ {$EXTERNALSYM SC_RESTORE}
+ SC_TASKLIST = $F130;
+ {$EXTERNALSYM SC_TASKLIST}
+ SC_SCREENSAVE = $F140;
+ {$EXTERNALSYM SC_SCREENSAVE}
+ SC_HOTKEY = $F150;
+ {$EXTERNALSYM SC_HOTKEY}
+ SC_DEFAULT = $F160;
+ {$EXTERNALSYM SC_DEFAULT}
+ SC_MONITORPOWER = $F170;
+ {$EXTERNALSYM SC_MONITORPOWER}
+ SC_CONTEXTHELP = $F180;
+ {$EXTERNALSYM SC_CONTEXTHELP}
+ SC_SEPARATOR = $F00F;
+ {$EXTERNALSYM SC_SEPARATOR}
+
+//
+// Obsolete names
+//
+
+const
+ SC_ICON = SC_MINIMIZE;
+ {$EXTERNALSYM SC_ICON}
+ SC_ZOOM = SC_MAXIMIZE;
+ {$EXTERNALSYM SC_ZOOM}
+
+//
+// Resource Loading Routines
+//
+
+function LoadBitmapA(hInstance: HINSTANCE; lpBitmapName: LPCSTR): HBITMAP; stdcall;
+{$EXTERNALSYM LoadBitmapA}
+function LoadBitmapW(hInstance: HINSTANCE; lpBitmapName: LPCWSTR): HBITMAP; stdcall;
+{$EXTERNALSYM LoadBitmapW}
+function LoadBitmap(hInstance: HINSTANCE; lpBitmapName: LPCTSTR): HBITMAP; stdcall;
+{$EXTERNALSYM LoadBitmap}
+
+function LoadCursorA(hInstance: HINSTANCE; lpCursorName: LPCSTR): HCURSOR; stdcall;
+{$EXTERNALSYM LoadCursorA}
+function LoadCursorW(hInstance: HINSTANCE; lpCursorName: LPCWSTR): HCURSOR; stdcall;
+{$EXTERNALSYM LoadCursorW}
+function LoadCursor(hInstance: HINSTANCE; lpCursorName: LPCTSTR): HCURSOR; stdcall;
+{$EXTERNALSYM LoadCursor}
+
+function LoadCursorFromFileA(lpFileName: LPCSTR): HCURSOR; stdcall;
+{$EXTERNALSYM LoadCursorFromFileA}
+function LoadCursorFromFileW(lpFileName: LPCWSTR): HCURSOR; stdcall;
+{$EXTERNALSYM LoadCursorFromFileW}
+function LoadCursorFromFile(lpFileName: LPCTSTR): HCURSOR; stdcall;
+{$EXTERNALSYM LoadCursorFromFile}
+
+function CreateCursor(hInst: HINSTANCE; xHotSpot, yHotSpot, nWidth, nHeight: Integer;
+ pvANDPlane: PVOID; pvXORPlane: PVOID): HCURSOR; stdcall;
+{$EXTERNALSYM CreateCursor}
+
+function DestroyCursor(hCursor: HCURSOR): BOOL; stdcall;
+{$EXTERNALSYM DestroyCursor}
+
+function CopyCursor(pcur: HCURSOR): HCURSOR;
+{$EXTERNALSYM CopyCursor}
+
+//
+// Standard Cursor IDs
+//
+
+const
+ IDC_ARROW = MAKEINTRESOURCE(32512);
+ {$EXTERNALSYM IDC_ARROW}
+ IDC_IBEAM = MAKEINTRESOURCE(32513);
+ {$EXTERNALSYM IDC_IBEAM}
+ IDC_WAIT = MAKEINTRESOURCE(32514);
+ {$EXTERNALSYM IDC_WAIT}
+ IDC_CROSS = MAKEINTRESOURCE(32515);
+ {$EXTERNALSYM IDC_CROSS}
+ IDC_UPARROW = MAKEINTRESOURCE(32516);
+ {$EXTERNALSYM IDC_UPARROW}
+ IDC_SIZE = MAKEINTRESOURCE(32640); // OBSOLETE: use IDC_SIZEALL
+ {$EXTERNALSYM IDC_SIZE}
+ IDC_ICON = MAKEINTRESOURCE(32641); // OBSOLETE: use IDC_ARROW
+ {$EXTERNALSYM IDC_ICON}
+ IDC_SIZENWSE = MAKEINTRESOURCE(32642);
+ {$EXTERNALSYM IDC_SIZENWSE}
+ IDC_SIZENESW = MAKEINTRESOURCE(32643);
+ {$EXTERNALSYM IDC_SIZENESW}
+ IDC_SIZEWE = MAKEINTRESOURCE(32644);
+ {$EXTERNALSYM IDC_SIZEWE}
+ IDC_SIZENS = MAKEINTRESOURCE(32645);
+ {$EXTERNALSYM IDC_SIZENS}
+ IDC_SIZEALL = MAKEINTRESOURCE(32646);
+ {$EXTERNALSYM IDC_SIZEALL}
+ IDC_NO = MAKEINTRESOURCE(32648); // not in win3.1
+ {$EXTERNALSYM IDC_NO}
+ IDC_HAND = MAKEINTRESOURCE(32649);
+ {$EXTERNALSYM IDC_HAND}
+ IDC_APPSTARTING = MAKEINTRESOURCE(32650); // not in win3.1
+ {$EXTERNALSYM IDC_APPSTARTING}
+ IDC_HELP = MAKEINTRESOURCE(32651);
+ {$EXTERNALSYM IDC_HELP}
+
+function SetSystemCursor(hcur: HCURSOR; id: DWORD): BOOL; stdcall;
+{$EXTERNALSYM SetSystemCursor}
+
+type
+ PICONINFO = ^ICONINFO;
+ _ICONINFO = record
+ fIcon: BOOL;
+ xHotspot: DWORD;
+ yHotspot: DWORD;
+ hbmMask: HBITMAP;
+ hbmColor: HBITMAP;
+ end;
+ {$EXTERNALSYM _ICONINFO}
+ ICONINFO = _ICONINFO;
+ {$EXTERNALSYM ICONINFO}
+ TIconInfo = ICONINFO;
+
+function LoadIconA(hInstance: HINSTANCE; lpIconName: LPCSTR): HICON; stdcall;
+{$EXTERNALSYM LoadIconA}
+function LoadIconW(hInstance: HINSTANCE; lpIconName: LPCWSTR): HICON; stdcall;
+{$EXTERNALSYM LoadIconW}
+function LoadIcon(hInstance: HINSTANCE; lpIconName: LPCTSTR): HICON; stdcall;
+{$EXTERNALSYM LoadIcon}
+
+function PrivateExtractIconsA(szFileName: LPCSTR; nIconIndex, cxIcon, cyIcon: Integer; var phicon: HICON;
+ var piconid: UINT; nIcons, flags: UINT): UINT; stdcall;
+{$EXTERNALSYM PrivateExtractIconsA}
+function PrivateExtractIconsW(szFileName: LPCWSTR; nIconIndex, cxIcon, cyIcon: Integer; var phicon: HICON;
+ var piconid: UINT; nIcons, flags: UINT): UINT; stdcall;
+{$EXTERNALSYM PrivateExtractIconsW}
+function PrivateExtractIcons(szFileName: LPCTSTR; nIconIndex, cxIcon, cyIcon: Integer; var phicon: HICON;
+ var piconid: UINT; nIcons, flags: UINT): UINT; stdcall;
+{$EXTERNALSYM PrivateExtractIcons}
+
+function CreateIcon(hInstance: HINSTANCE; nWidth, nHeight: Integer; cPlanes,
+ cBitsPixel: BYTE; lpbANDbits: LPBYTE; lpbXORbits: LPBYTE): HICON; stdcall;
+{$EXTERNALSYM CreateIcon}
+
+function DestroyIcon(hIcon: HICON): BOOL; stdcall;
+{$EXTERNALSYM DestroyIcon}
+
+function LookupIconIdFromDirectory(presbits: PBYTE; fIcon: BOOL): Integer; stdcall;
+{$EXTERNALSYM LookupIconIdFromDirectory}
+
+function LookupIconIdFromDirectoryEx(presbits: PBYTE; fIcon: BOOL;
+ cxDesired, cyDesired: Integer; Flags: UINT): Integer; stdcall;
+{$EXTERNALSYM LookupIconIdFromDirectoryEx}
+
+function CreateIconFromResource(presbits: PBYTE; dwResSize: DWORD;
+ fIcon: BOOL; dwVer: DWORD): HICON; stdcall;
+{$EXTERNALSYM CreateIconFromResource}
+
+function CreateIconFromResourceEx(presbits: PBYTE; dwResSize: DWORD; fIcon: BOOL;
+ dwVer: DWORD; cxDesired, cyDesired: Integer; Flags: UINT): HICON; stdcall;
+{$EXTERNALSYM CreateIconFromResourceEx}
+
+// Icon/Cursor header//
+
+type
+ LPCURSORSHAPE = ^CURSORSHAPE;
+ {$EXTERNALSYM LPCURSORSHAPE}
+ tagCURSORSHAPE = record
+ xHotSpot: Integer;
+ yHotSpot: Integer;
+ cx: Integer;
+ cy: Integer;
+ cbWidth: Integer;
+ Planes: BYTE;
+ BitsPixel: BYTE;
+ end;
+ {$EXTERNALSYM tagCURSORSHAPE}
+ CURSORSHAPE = tagCURSORSHAPE;
+ {$EXTERNALSYM CURSORSHAPE}
+ TCursorShape = CURSORSHAPE;
+ PCursorShape = LPCURSORSHAPE;
+
+const
+ IMAGE_BITMAP = 0;
+ {$EXTERNALSYM IMAGE_BITMAP}
+ IMAGE_ICON = 1;
+ {$EXTERNALSYM IMAGE_ICON}
+ IMAGE_CURSOR = 2;
+ {$EXTERNALSYM IMAGE_CURSOR}
+ IMAGE_ENHMETAFILE = 3;
+ {$EXTERNALSYM IMAGE_ENHMETAFILE}
+
+ LR_DEFAULTCOLOR = $0000;
+ {$EXTERNALSYM LR_DEFAULTCOLOR}
+ LR_MONOCHROME = $0001;
+ {$EXTERNALSYM LR_MONOCHROME}
+ LR_COLOR = $0002;
+ {$EXTERNALSYM LR_COLOR}
+ LR_COPYRETURNORG = $0004;
+ {$EXTERNALSYM LR_COPYRETURNORG}
+ LR_COPYDELETEORG = $0008;
+ {$EXTERNALSYM LR_COPYDELETEORG}
+ LR_LOADFROMFILE = $0010;
+ {$EXTERNALSYM LR_LOADFROMFILE}
+ LR_LOADTRANSPARENT = $0020;
+ {$EXTERNALSYM LR_LOADTRANSPARENT}
+ LR_DEFAULTSIZE = $0040;
+ {$EXTERNALSYM LR_DEFAULTSIZE}
+ LR_VGACOLOR = $0080;
+ {$EXTERNALSYM LR_VGACOLOR}
+ LR_LOADMAP3DCOLORS = $1000;
+ {$EXTERNALSYM LR_LOADMAP3DCOLORS}
+ LR_CREATEDIBSECTION = $2000;
+ {$EXTERNALSYM LR_CREATEDIBSECTION}
+ LR_COPYFROMRESOURCE = $4000;
+ {$EXTERNALSYM LR_COPYFROMRESOURCE}
+ LR_SHARED = $8000;
+ {$EXTERNALSYM LR_SHARED}
+
+function LoadImageA(hinst: HINSTANCE; lpszName: LPCSTR; uType: UINT;
+ cxDesired, cyDesired: Integer; fuLoad: UINT): HANDLE; stdcall;
+{$EXTERNALSYM LoadImageA}
+function LoadImageW(hinst: HINSTANCE; lpszName: LPCWSTR; uType: UINT;
+ cxDesired, cyDesired: Integer; fuLoad: UINT): HANDLE; stdcall;
+{$EXTERNALSYM LoadImageW}
+function LoadImage(hinst: HINSTANCE; lpszName: LPCTSTR; uType: UINT;
+ cxDesired, cyDesired: Integer; fuLoad: UINT): HANDLE; stdcall;
+{$EXTERNALSYM LoadImage}
+
+function CopyImage(hinst: HANDLE; lpszName: UINT; cxDesired, cyDesired: Integer;
+ fuFlags: UINT): HANDLE; stdcall;
+{$EXTERNALSYM CopyImage}
+
+const
+ DI_MASK = $0001;
+ {$EXTERNALSYM DI_MASK}
+ DI_IMAGE = $0002;
+ {$EXTERNALSYM DI_IMAGE}
+ DI_NORMAL = $0003;
+ {$EXTERNALSYM DI_NORMAL}
+ DI_COMPAT = $0004;
+ {$EXTERNALSYM DI_COMPAT}
+ DI_DEFAULTSIZE = $0008;
+ {$EXTERNALSYM DI_DEFAULTSIZE}
+ DI_NOMIRROR = $0010;
+ {$EXTERNALSYM DI_NOMIRROR}
+
+function DrawIconEx(hdc: HDC; xLeft, yTop: Integer; hIcon: HICON;
+ cxWidth, cyWidth: Integer; istepIfAniCur: UINT; hbrFlickerFreeDraw: HBRUSH;
+ diFlags: UINT): BOOL; stdcall;
+{$EXTERNALSYM DrawIconEx}
+
+function CreateIconIndirect(const piconinfo: ICONINFO): HICON; stdcall;
+{$EXTERNALSYM CreateIconIndirect}
+
+function CopyIcon(hIcon: HICON): HICON; stdcall;
+{$EXTERNALSYM CopyIcon}
+
+function GetIconInfo(hIcon: HICON; var piconinfo: ICONINFO): BOOL; stdcall;
+{$EXTERNALSYM GetIconInfo}
+
+const
+ RES_ICON = 1;
+ {$EXTERNALSYM RES_ICON}
+ RES_CURSOR = 2;
+ {$EXTERNALSYM RES_CURSOR}
+
+//
+// OEM Resource Ordinal Numbers
+//
+
+ OBM_CLOSE = 32754;
+ {$EXTERNALSYM OBM_CLOSE}
+ OBM_UPARROW = 32753;
+ {$EXTERNALSYM OBM_UPARROW}
+ OBM_DNARROW = 32752;
+ {$EXTERNALSYM OBM_DNARROW}
+ OBM_RGARROW = 32751;
+ {$EXTERNALSYM OBM_RGARROW}
+ OBM_LFARROW = 32750;
+ {$EXTERNALSYM OBM_LFARROW}
+ OBM_REDUCE = 32749;
+ {$EXTERNALSYM OBM_REDUCE}
+ OBM_ZOOM = 32748;
+ {$EXTERNALSYM OBM_ZOOM}
+ OBM_RESTORE = 32747;
+ {$EXTERNALSYM OBM_RESTORE}
+ OBM_REDUCED = 32746;
+ {$EXTERNALSYM OBM_REDUCED}
+ OBM_ZOOMD = 32745;
+ {$EXTERNALSYM OBM_ZOOMD}
+ OBM_RESTORED = 32744;
+ {$EXTERNALSYM OBM_RESTORED}
+ OBM_UPARROWD = 32743;
+ {$EXTERNALSYM OBM_UPARROWD}
+ OBM_DNARROWD = 32742;
+ {$EXTERNALSYM OBM_DNARROWD}
+ OBM_RGARROWD = 32741;
+ {$EXTERNALSYM OBM_RGARROWD}
+ OBM_LFARROWD = 32740;
+ {$EXTERNALSYM OBM_LFARROWD}
+ OBM_MNARROW = 32739;
+ {$EXTERNALSYM OBM_MNARROW}
+ OBM_COMBO = 32738;
+ {$EXTERNALSYM OBM_COMBO}
+ OBM_UPARROWI = 32737;
+ {$EXTERNALSYM OBM_UPARROWI}
+ OBM_DNARROWI = 32736;
+ {$EXTERNALSYM OBM_DNARROWI}
+ OBM_RGARROWI = 32735;
+ {$EXTERNALSYM OBM_RGARROWI}
+ OBM_LFARROWI = 32734;
+ {$EXTERNALSYM OBM_LFARROWI}
+
+ OBM_OLD_CLOSE = 32767;
+ {$EXTERNALSYM OBM_OLD_CLOSE}
+ OBM_SIZE = 32766;
+ {$EXTERNALSYM OBM_SIZE}
+ OBM_OLD_UPARROW = 32765;
+ {$EXTERNALSYM OBM_OLD_UPARROW}
+ OBM_OLD_DNARROW = 32764;
+ {$EXTERNALSYM OBM_OLD_DNARROW}
+ OBM_OLD_RGARROW = 32763;
+ {$EXTERNALSYM OBM_OLD_RGARROW}
+ OBM_OLD_LFARROW = 32762;
+ {$EXTERNALSYM OBM_OLD_LFARROW}
+ OBM_BTSIZE = 32761;
+ {$EXTERNALSYM OBM_BTSIZE}
+ OBM_CHECK = 32760;
+ {$EXTERNALSYM OBM_CHECK}
+ OBM_CHECKBOXES = 32759;
+ {$EXTERNALSYM OBM_CHECKBOXES}
+ OBM_BTNCORNERS = 32758;
+ {$EXTERNALSYM OBM_BTNCORNERS}
+ OBM_OLD_REDUCE = 32757;
+ {$EXTERNALSYM OBM_OLD_REDUCE}
+ OBM_OLD_ZOOM = 32756;
+ {$EXTERNALSYM OBM_OLD_ZOOM}
+ OBM_OLD_RESTORE = 32755;
+ {$EXTERNALSYM OBM_OLD_RESTORE}
+
+ OCR_NORMAL = 32512;
+ {$EXTERNALSYM OCR_NORMAL}
+ OCR_IBEAM = 32513;
+ {$EXTERNALSYM OCR_IBEAM}
+ OCR_WAIT = 32514;
+ {$EXTERNALSYM OCR_WAIT}
+ OCR_CROSS = 32515;
+ {$EXTERNALSYM OCR_CROSS}
+ OCR_UP = 32516;
+ {$EXTERNALSYM OCR_UP}
+ OCR_SIZE = 32640; // OBSOLETE: use OCR_SIZEALL
+ {$EXTERNALSYM OCR_SIZE}
+ OCR_ICON = 32641; // OBSOLETE: use OCR_NORMAL
+ {$EXTERNALSYM OCR_ICON}
+ OCR_SIZENWSE = 32642;
+ {$EXTERNALSYM OCR_SIZENWSE}
+ OCR_SIZENESW = 32643;
+ {$EXTERNALSYM OCR_SIZENESW}
+ OCR_SIZEWE = 32644;
+ {$EXTERNALSYM OCR_SIZEWE}
+ OCR_SIZENS = 32645;
+ {$EXTERNALSYM OCR_SIZENS}
+ OCR_SIZEALL = 32646;
+ {$EXTERNALSYM OCR_SIZEALL}
+ OCR_ICOCUR = 32647; // OBSOLETE: use OIC_WINLOGO
+ {$EXTERNALSYM OCR_ICOCUR}
+ OCR_NO = 32648;
+ {$EXTERNALSYM OCR_NO}
+ OCR_HAND = 32649;
+ {$EXTERNALSYM OCR_HAND}
+ OCR_APPSTARTING = 32650;
+ {$EXTERNALSYM OCR_APPSTARTING}
+
+ OIC_SAMPLE = 32512;
+ {$EXTERNALSYM OIC_SAMPLE}
+ OIC_HAND = 32513;
+ {$EXTERNALSYM OIC_HAND}
+ OIC_QUES = 32514;
+ {$EXTERNALSYM OIC_QUES}
+ OIC_BANG = 32515;
+ {$EXTERNALSYM OIC_BANG}
+ OIC_NOTE = 32516;
+ {$EXTERNALSYM OIC_NOTE}
+ OIC_WINLOGO = 32517;
+ {$EXTERNALSYM OIC_WINLOGO}
+ OIC_WARNING = OIC_BANG;
+ {$EXTERNALSYM OIC_WARNING}
+ OIC_ERROR = OIC_HAND;
+ {$EXTERNALSYM OIC_ERROR}
+ OIC_INFORMATION = OIC_NOTE;
+ {$EXTERNALSYM OIC_INFORMATION}
+
+ ORD_LANGDRIVER = 1; // The ordinal number for the entry point of language drivers.
+ {$EXTERNALSYM ORD_LANGDRIVER}
+
+//
+// Standard Icon IDs
+//
+
+ IDI_APPLICATION = MAKEINTRESOURCE(32512);
+ {$EXTERNALSYM IDI_APPLICATION}
+ IDI_HAND = MAKEINTRESOURCE(32513);
+ {$EXTERNALSYM IDI_HAND}
+ IDI_QUESTION = MAKEINTRESOURCE(32514);
+ {$EXTERNALSYM IDI_QUESTION}
+ IDI_EXCLAMATION = MAKEINTRESOURCE(32515);
+ {$EXTERNALSYM IDI_EXCLAMATION}
+ IDI_ASTERISK = MAKEINTRESOURCE(32516);
+ {$EXTERNALSYM IDI_ASTERISK}
+ IDI_WINLOGO = MAKEINTRESOURCE(32517);
+ {$EXTERNALSYM IDI_WINLOGO}
+
+ IDI_WARNING = IDI_EXCLAMATION;
+ {$EXTERNALSYM IDI_WARNING}
+ IDI_ERROR = IDI_HAND;
+ {$EXTERNALSYM IDI_ERROR}
+ IDI_INFORMATION = IDI_ASTERISK;
+ {$EXTERNALSYM IDI_INFORMATION}
+
+function LoadStringA(hInstance: HINSTANCE; uID: UINT; lpBuffer: LPSTR;
+ nBufferMax: Integer): Integer; stdcall;
+{$EXTERNALSYM LoadStringA}
+function LoadStringW(hInstance: HINSTANCE; uID: UINT; lpBuffer: LPWSTR;
+ nBufferMax: Integer): Integer; stdcall;
+{$EXTERNALSYM LoadStringW}
+function LoadString(hInstance: HINSTANCE; uID: UINT; lpBuffer: LPTSTR;
+ nBufferMax: Integer): Integer; stdcall;
+{$EXTERNALSYM LoadString}
+
+//
+// Dialog Box Command IDs
+//
+
+const
+ IDOK = 1;
+ {$EXTERNALSYM IDOK}
+ IDCANCEL = 2;
+ {$EXTERNALSYM IDCANCEL}
+ IDABORT = 3;
+ {$EXTERNALSYM IDABORT}
+ IDRETRY = 4;
+ {$EXTERNALSYM IDRETRY}
+ IDIGNORE = 5;
+ {$EXTERNALSYM IDIGNORE}
+ IDYES = 6;
+ {$EXTERNALSYM IDYES}
+ IDNO = 7;
+ {$EXTERNALSYM IDNO}
+ IDCLOSE = 8;
+ {$EXTERNALSYM IDCLOSE}
+ IDHELP = 9;
+ {$EXTERNALSYM IDHELP}
+
+ IDTRYAGAIN = 10;
+ {$EXTERNALSYM IDTRYAGAIN}
+ IDCONTINUE = 11;
+ {$EXTERNALSYM IDCONTINUE}
+
+ IDTIMEOUT = 32000;
+ {$EXTERNALSYM IDTIMEOUT}
+
+//
+// Control Manager Structures and Definitions
+//
+
+//
+// Edit Control Styles
+//
+
+ ES_LEFT = $0000;
+ {$EXTERNALSYM ES_LEFT}
+ ES_CENTER = $0001;
+ {$EXTERNALSYM ES_CENTER}
+ ES_RIGHT = $0002;
+ {$EXTERNALSYM ES_RIGHT}
+ ES_MULTILINE = $0004;
+ {$EXTERNALSYM ES_MULTILINE}
+ ES_UPPERCASE = $0008;
+ {$EXTERNALSYM ES_UPPERCASE}
+ ES_LOWERCASE = $0010;
+ {$EXTERNALSYM ES_LOWERCASE}
+ ES_PASSWORD = $0020;
+ {$EXTERNALSYM ES_PASSWORD}
+ ES_AUTOVSCROLL = $0040;
+ {$EXTERNALSYM ES_AUTOVSCROLL}
+ ES_AUTOHSCROLL = $0080;
+ {$EXTERNALSYM ES_AUTOHSCROLL}
+ ES_NOHIDESEL = $0100;
+ {$EXTERNALSYM ES_NOHIDESEL}
+ ES_OEMCONVERT = $0400;
+ {$EXTERNALSYM ES_OEMCONVERT}
+ ES_READONLY = $0800;
+ {$EXTERNALSYM ES_READONLY}
+ ES_WANTRETURN = $1000;
+ {$EXTERNALSYM ES_WANTRETURN}
+ ES_NUMBER = $2000;
+ {$EXTERNALSYM ES_NUMBER}
+
+//
+// Edit Control Notification Codes
+//
+
+ EN_SETFOCUS = $0100;
+ {$EXTERNALSYM EN_SETFOCUS}
+ EN_KILLFOCUS = $0200;
+ {$EXTERNALSYM EN_KILLFOCUS}
+ EN_CHANGE = $0300;
+ {$EXTERNALSYM EN_CHANGE}
+ EN_UPDATE = $0400;
+ {$EXTERNALSYM EN_UPDATE}
+ EN_ERRSPACE = $0500;
+ {$EXTERNALSYM EN_ERRSPACE}
+ EN_MAXTEXT = $0501;
+ {$EXTERNALSYM EN_MAXTEXT}
+ EN_HSCROLL = $0601;
+ {$EXTERNALSYM EN_HSCROLL}
+ EN_VSCROLL = $0602;
+ {$EXTERNALSYM EN_VSCROLL}
+
+ EN_ALIGN_LTR_EC = $0700;
+ {$EXTERNALSYM EN_ALIGN_LTR_EC}
+ EN_ALIGN_RTL_EC = $0701;
+ {$EXTERNALSYM EN_ALIGN_RTL_EC}
+
+// Edit control EM_SETMARGIN parameters//
+
+ EC_LEFTMARGIN = $0001;
+ {$EXTERNALSYM EC_LEFTMARGIN}
+ EC_RIGHTMARGIN = $0002;
+ {$EXTERNALSYM EC_RIGHTMARGIN}
+ EC_USEFONTINFO = $ffff;
+ {$EXTERNALSYM EC_USEFONTINFO}
+
+// wParam of EM_GET/SETIMESTATUS //
+
+ EMSIS_COMPOSITIONSTRING = $0001;
+ {$EXTERNALSYM EMSIS_COMPOSITIONSTRING}
+
+// lParam for EMSIS_COMPOSITIONSTRING //
+
+ EIMES_GETCOMPSTRATONCE = $0001;
+ {$EXTERNALSYM EIMES_GETCOMPSTRATONCE}
+ EIMES_CANCELCOMPSTRINFOCUS = $0002;
+ {$EXTERNALSYM EIMES_CANCELCOMPSTRINFOCUS}
+ EIMES_COMPLETECOMPSTRKILLFOCUS = $0004;
+ {$EXTERNALSYM EIMES_COMPLETECOMPSTRKILLFOCUS}
+
+//
+// Edit Control Messages
+//
+
+ EM_GETSEL = $00B0;
+ {$EXTERNALSYM EM_GETSEL}
+ EM_SETSEL = $00B1;
+ {$EXTERNALSYM EM_SETSEL}
+ EM_GETRECT = $00B2;
+ {$EXTERNALSYM EM_GETRECT}
+ EM_SETRECT = $00B3;
+ {$EXTERNALSYM EM_SETRECT}
+ EM_SETRECTNP = $00B4;
+ {$EXTERNALSYM EM_SETRECTNP}
+ EM_SCROLL = $00B5;
+ {$EXTERNALSYM EM_SCROLL}
+ EM_LINESCROLL = $00B6;
+ {$EXTERNALSYM EM_LINESCROLL}
+ EM_SCROLLCARET = $00B7;
+ {$EXTERNALSYM EM_SCROLLCARET}
+ EM_GETMODIFY = $00B8;
+ {$EXTERNALSYM EM_GETMODIFY}
+ EM_SETMODIFY = $00B9;
+ {$EXTERNALSYM EM_SETMODIFY}
+ EM_GETLINECOUNT = $00BA;
+ {$EXTERNALSYM EM_GETLINECOUNT}
+ EM_LINEINDEX = $00BB;
+ {$EXTERNALSYM EM_LINEINDEX}
+ EM_SETHANDLE = $00BC;
+ {$EXTERNALSYM EM_SETHANDLE}
+ EM_GETHANDLE = $00BD;
+ {$EXTERNALSYM EM_GETHANDLE}
+ EM_GETTHUMB = $00BE;
+ {$EXTERNALSYM EM_GETTHUMB}
+ EM_LINELENGTH = $00C1;
+ {$EXTERNALSYM EM_LINELENGTH}
+ EM_REPLACESEL = $00C2;
+ {$EXTERNALSYM EM_REPLACESEL}
+ EM_GETLINE = $00C4;
+ {$EXTERNALSYM EM_GETLINE}
+ EM_LIMITTEXT = $00C5;
+ {$EXTERNALSYM EM_LIMITTEXT}
+ EM_CANUNDO = $00C6;
+ {$EXTERNALSYM EM_CANUNDO}
+ EM_UNDO = $00C7;
+ {$EXTERNALSYM EM_UNDO}
+ EM_FMTLINES = $00C8;
+ {$EXTERNALSYM EM_FMTLINES}
+ EM_LINEFROMCHAR = $00C9;
+ {$EXTERNALSYM EM_LINEFROMCHAR}
+ EM_SETTABSTOPS = $00CB;
+ {$EXTERNALSYM EM_SETTABSTOPS}
+ EM_SETPASSWORDCHAR = $00CC;
+ {$EXTERNALSYM EM_SETPASSWORDCHAR}
+ EM_EMPTYUNDOBUFFER = $00CD;
+ {$EXTERNALSYM EM_EMPTYUNDOBUFFER}
+ EM_GETFIRSTVISIBLELINE = $00CE;
+ {$EXTERNALSYM EM_GETFIRSTVISIBLELINE}
+ EM_SETREADONLY = $00CF;
+ {$EXTERNALSYM EM_SETREADONLY}
+ EM_SETWORDBREAKPROC = $00D0;
+ {$EXTERNALSYM EM_SETWORDBREAKPROC}
+ EM_GETWORDBREAKPROC = $00D1;
+ {$EXTERNALSYM EM_GETWORDBREAKPROC}
+ EM_GETPASSWORDCHAR = $00D2;
+ {$EXTERNALSYM EM_GETPASSWORDCHAR}
+ EM_SETMARGINS = $00D3;
+ {$EXTERNALSYM EM_SETMARGINS}
+ EM_GETMARGINS = $00D4;
+ {$EXTERNALSYM EM_GETMARGINS}
+ EM_SETLIMITTEXT = EM_LIMITTEXT; // ;win40 Name change
+ {$EXTERNALSYM EM_SETLIMITTEXT}
+ EM_GETLIMITTEXT = $00D5;
+ {$EXTERNALSYM EM_GETLIMITTEXT}
+ EM_POSFROMCHAR = $00D6;
+ {$EXTERNALSYM EM_POSFROMCHAR}
+ EM_CHARFROMPOS = $00D7;
+ {$EXTERNALSYM EM_CHARFROMPOS}
+
+ EM_SETIMESTATUS = $00D8;
+ {$EXTERNALSYM EM_SETIMESTATUS}
+ EM_GETIMESTATUS = $00D9;
+ {$EXTERNALSYM EM_GETIMESTATUS}
+
+//
+// EDITWORDBREAKPROC code values
+//
+
+ WB_LEFT = 0;
+ {$EXTERNALSYM WB_LEFT}
+ WB_RIGHT = 1;
+ {$EXTERNALSYM WB_RIGHT}
+ WB_ISDELIMITER = 2;
+ {$EXTERNALSYM WB_ISDELIMITER}
+
+//
+// Button Control Styles
+//
+
+ BS_PUSHBUTTON = $00000000;
+ {$EXTERNALSYM BS_PUSHBUTTON}
+ BS_DEFPUSHBUTTON = $00000001;
+ {$EXTERNALSYM BS_DEFPUSHBUTTON}
+ BS_CHECKBOX = $00000002;
+ {$EXTERNALSYM BS_CHECKBOX}
+ BS_AUTOCHECKBOX = $00000003;
+ {$EXTERNALSYM BS_AUTOCHECKBOX}
+ BS_RADIOBUTTON = $00000004;
+ {$EXTERNALSYM BS_RADIOBUTTON}
+ BS_3STATE = $00000005;
+ {$EXTERNALSYM BS_3STATE}
+ BS_AUTO3STATE = $00000006;
+ {$EXTERNALSYM BS_AUTO3STATE}
+ BS_GROUPBOX = $00000007;
+ {$EXTERNALSYM BS_GROUPBOX}
+ BS_USERBUTTON = $00000008;
+ {$EXTERNALSYM BS_USERBUTTON}
+ BS_AUTORADIOBUTTON = $00000009;
+ {$EXTERNALSYM BS_AUTORADIOBUTTON}
+ BS_PUSHBOX = $0000000A;
+ {$EXTERNALSYM BS_PUSHBOX}
+ BS_OWNERDRAW = $0000000B;
+ {$EXTERNALSYM BS_OWNERDRAW}
+ BS_TYPEMASK = $0000000F;
+ {$EXTERNALSYM BS_TYPEMASK}
+ BS_LEFTTEXT = $00000020;
+ {$EXTERNALSYM BS_LEFTTEXT}
+ BS_TEXT = $00000000;
+ {$EXTERNALSYM BS_TEXT}
+ BS_ICON = $00000040;
+ {$EXTERNALSYM BS_ICON}
+ BS_BITMAP = $00000080;
+ {$EXTERNALSYM BS_BITMAP}
+ BS_LEFT = $00000100;
+ {$EXTERNALSYM BS_LEFT}
+ BS_RIGHT = $00000200;
+ {$EXTERNALSYM BS_RIGHT}
+ BS_CENTER = $00000300;
+ {$EXTERNALSYM BS_CENTER}
+ BS_TOP = $00000400;
+ {$EXTERNALSYM BS_TOP}
+ BS_BOTTOM = $00000800;
+ {$EXTERNALSYM BS_BOTTOM}
+ BS_VCENTER = $00000C00;
+ {$EXTERNALSYM BS_VCENTER}
+ BS_PUSHLIKE = $00001000;
+ {$EXTERNALSYM BS_PUSHLIKE}
+ BS_MULTILINE = $00002000;
+ {$EXTERNALSYM BS_MULTILINE}
+ BS_NOTIFY = $00004000;
+ {$EXTERNALSYM BS_NOTIFY}
+ BS_FLAT = $00008000;
+ {$EXTERNALSYM BS_FLAT}
+ BS_RIGHTBUTTON = BS_LEFTTEXT;
+ {$EXTERNALSYM BS_RIGHTBUTTON}
+
+//
+// User Button Notification Codes
+//
+
+ BN_CLICKED = 0;
+ {$EXTERNALSYM BN_CLICKED}
+ BN_PAINT = 1;
+ {$EXTERNALSYM BN_PAINT}
+ BN_HILITE = 2;
+ {$EXTERNALSYM BN_HILITE}
+ BN_UNHILITE = 3;
+ {$EXTERNALSYM BN_UNHILITE}
+ BN_DISABLE = 4;
+ {$EXTERNALSYM BN_DISABLE}
+ BN_DOUBLECLICKED = 5;
+ {$EXTERNALSYM BN_DOUBLECLICKED}
+ BN_PUSHED = BN_HILITE;
+ {$EXTERNALSYM BN_PUSHED}
+ BN_UNPUSHED = BN_UNHILITE;
+ {$EXTERNALSYM BN_UNPUSHED}
+ BN_DBLCLK = BN_DOUBLECLICKED;
+ {$EXTERNALSYM BN_DBLCLK}
+ BN_SETFOCUS = 6;
+ {$EXTERNALSYM BN_SETFOCUS}
+ BN_KILLFOCUS = 7;
+ {$EXTERNALSYM BN_KILLFOCUS}
+
+//
+// Button Control Messages
+//
+
+ BM_GETCHECK = $00F0;
+ {$EXTERNALSYM BM_GETCHECK}
+ BM_SETCHECK = $00F1;
+ {$EXTERNALSYM BM_SETCHECK}
+ BM_GETSTATE = $00F2;
+ {$EXTERNALSYM BM_GETSTATE}
+ BM_SETSTATE = $00F3;
+ {$EXTERNALSYM BM_SETSTATE}
+ BM_SETSTYLE = $00F4;
+ {$EXTERNALSYM BM_SETSTYLE}
+ BM_CLICK = $00F5;
+ {$EXTERNALSYM BM_CLICK}
+ BM_GETIMAGE = $00F6;
+ {$EXTERNALSYM BM_GETIMAGE}
+ BM_SETIMAGE = $00F7;
+ {$EXTERNALSYM BM_SETIMAGE}
+
+ BST_UNCHECKED = $0000;
+ {$EXTERNALSYM BST_UNCHECKED}
+ BST_CHECKED = $0001;
+ {$EXTERNALSYM BST_CHECKED}
+ BST_INDETERMINATE = $0002;
+ {$EXTERNALSYM BST_INDETERMINATE}
+ BST_PUSHED = $0004;
+ {$EXTERNALSYM BST_PUSHED}
+ BST_FOCUS = $0008;
+ {$EXTERNALSYM BST_FOCUS}
+
+//
+// Static Control Constants
+//
+
+ SS_LEFT = $00000000;
+ {$EXTERNALSYM SS_LEFT}
+ SS_CENTER = $00000001;
+ {$EXTERNALSYM SS_CENTER}
+ SS_RIGHT = $00000002;
+ {$EXTERNALSYM SS_RIGHT}
+ SS_ICON = $00000003;
+ {$EXTERNALSYM SS_ICON}
+ SS_BLACKRECT = $00000004;
+ {$EXTERNALSYM SS_BLACKRECT}
+ SS_GRAYRECT = $00000005;
+ {$EXTERNALSYM SS_GRAYRECT}
+ SS_WHITERECT = $00000006;
+ {$EXTERNALSYM SS_WHITERECT}
+ SS_BLACKFRAME = $00000007;
+ {$EXTERNALSYM SS_BLACKFRAME}
+ SS_GRAYFRAME = $00000008;
+ {$EXTERNALSYM SS_GRAYFRAME}
+ SS_WHITEFRAME = $00000009;
+ {$EXTERNALSYM SS_WHITEFRAME}
+ SS_USERITEM = $0000000A;
+ {$EXTERNALSYM SS_USERITEM}
+ SS_SIMPLE = $0000000B;
+ {$EXTERNALSYM SS_SIMPLE}
+ SS_LEFTNOWORDWRAP = $0000000C;
+ {$EXTERNALSYM SS_LEFTNOWORDWRAP}
+ SS_OWNERDRAW = $0000000D;
+ {$EXTERNALSYM SS_OWNERDRAW}
+ SS_BITMAP = $0000000E;
+ {$EXTERNALSYM SS_BITMAP}
+ SS_ENHMETAFILE = $0000000F;
+ {$EXTERNALSYM SS_ENHMETAFILE}
+ SS_ETCHEDHORZ = $00000010;
+ {$EXTERNALSYM SS_ETCHEDHORZ}
+ SS_ETCHEDVERT = $00000011;
+ {$EXTERNALSYM SS_ETCHEDVERT}
+ SS_ETCHEDFRAME = $00000012;
+ {$EXTERNALSYM SS_ETCHEDFRAME}
+ SS_TYPEMASK = $0000001F;
+ {$EXTERNALSYM SS_TYPEMASK}
+ SS_REALSIZECONTROL = $00000040;
+ {$EXTERNALSYM SS_REALSIZECONTROL}
+ SS_NOPREFIX = $00000080; // Don't do "&" character translation
+ {$EXTERNALSYM SS_NOPREFIX}
+ SS_NOTIFY = $00000100;
+ {$EXTERNALSYM SS_NOTIFY}
+ SS_CENTERIMAGE = $00000200;
+ {$EXTERNALSYM SS_CENTERIMAGE}
+ SS_RIGHTJUST = $00000400;
+ {$EXTERNALSYM SS_RIGHTJUST}
+ SS_REALSIZEIMAGE = $00000800;
+ {$EXTERNALSYM SS_REALSIZEIMAGE}
+ SS_SUNKEN = $00001000;
+ {$EXTERNALSYM SS_SUNKEN}
+ SS_EDITCONTROL = $00002000;
+ {$EXTERNALSYM SS_EDITCONTROL}
+ SS_ENDELLIPSIS = $00004000;
+ {$EXTERNALSYM SS_ENDELLIPSIS}
+ SS_PATHELLIPSIS = $00008000;
+ {$EXTERNALSYM SS_PATHELLIPSIS}
+ SS_WORDELLIPSIS = $0000C000;
+ {$EXTERNALSYM SS_WORDELLIPSIS}
+ SS_ELLIPSISMASK = $0000C000;
+ {$EXTERNALSYM SS_ELLIPSISMASK}
+
+//
+// Static Control Mesages
+//
+
+ STM_SETICON = $0170;
+ {$EXTERNALSYM STM_SETICON}
+ STM_GETICON = $0171;
+ {$EXTERNALSYM STM_GETICON}
+ STM_SETIMAGE = $0172;
+ {$EXTERNALSYM STM_SETIMAGE}
+ STM_GETIMAGE = $0173;
+ {$EXTERNALSYM STM_GETIMAGE}
+ STN_CLICKED = 0;
+ {$EXTERNALSYM STN_CLICKED}
+ STN_DBLCLK = 1;
+ {$EXTERNALSYM STN_DBLCLK}
+ STN_ENABLE = 2;
+ {$EXTERNALSYM STN_ENABLE}
+ STN_DISABLE = 3;
+ {$EXTERNALSYM STN_DISABLE}
+ STM_MSGMAX = $0174;
+ {$EXTERNALSYM STM_MSGMAX}
+
+//
+// Dialog window class
+//
+
+ WC_DIALOG = MAKEINTATOM($8002);
+ {$EXTERNALSYM WC_DIALOG}
+
+//
+// Get/SetWindowWord/Long offsets for use with WC_DIALOG windows
+//
+
+ DWL_MSGRESULT = 0;
+ {$EXTERNALSYM DWL_MSGRESULT}
+ DWL_DLGPROC = 4;
+ {$EXTERNALSYM DWL_DLGPROC}
+ DWL_USER = 8;
+ {$EXTERNALSYM DWL_USER}
+
+ DWLP_MSGRESULT = 0;
+ {$EXTERNALSYM DWLP_MSGRESULT}
+ DWLP_DLGPROC = DWLP_MSGRESULT + SizeOf(LRESULT);
+ {$EXTERNALSYM DWLP_DLGPROC}
+ DWLP_USER = DWLP_DLGPROC + SizeOf(DLGPROC);
+ {$EXTERNALSYM DWLP_USER}
+
+//
+// Dialog Manager Routines
+//
+
+function IsDialogMessageA(hDlg: HWND; const lpMsg: MSG): BOOL; stdcall;
+{$EXTERNALSYM IsDialogMessageA}
+function IsDialogMessageW(hDlg: HWND; const lpMsg: MSG): BOOL; stdcall;
+{$EXTERNALSYM IsDialogMessageW}
+function IsDialogMessage(hDlg: HWND; const lpMsg: MSG): BOOL; stdcall;
+{$EXTERNALSYM IsDialogMessage}
+
+function MapDialogRect(hDlg: HWND; var lpRect: RECT): BOOL; stdcall;
+{$EXTERNALSYM MapDialogRect}
+
+function DlgDirListA(hDlg: HWND; lpPathSpec: LPSTR; nIDListBox: Integer;
+ nIDStaticPath: Integer; uFileType: UINT): Integer; stdcall;
+{$EXTERNALSYM DlgDirListA}
+function DlgDirListW(hDlg: HWND; lpPathSpec: LPWSTR; nIDListBox: Integer;
+ nIDStaticPath: Integer; uFileType: UINT): Integer; stdcall;
+{$EXTERNALSYM DlgDirListW}
+function DlgDirList(hDlg: HWND; lpPathSpec: LPTSTR; nIDListBox: Integer;
+ nIDStaticPath: Integer; uFileType: UINT): Integer; stdcall;
+{$EXTERNALSYM DlgDirList}
+
+//
+// DlgDirList, DlgDirListComboBox flags values
+//
+
+const
+ DDL_READWRITE = $0000;
+ {$EXTERNALSYM DDL_READWRITE}
+ DDL_READONLY = $0001;
+ {$EXTERNALSYM DDL_READONLY}
+ DDL_HIDDEN = $0002;
+ {$EXTERNALSYM DDL_HIDDEN}
+ DDL_SYSTEM = $0004;
+ {$EXTERNALSYM DDL_SYSTEM}
+ DDL_DIRECTORY = $0010;
+ {$EXTERNALSYM DDL_DIRECTORY}
+ DDL_ARCHIVE = $0020;
+ {$EXTERNALSYM DDL_ARCHIVE}
+
+ DDL_POSTMSGS = $2000;
+ {$EXTERNALSYM DDL_POSTMSGS}
+ DDL_DRIVES = $4000;
+ {$EXTERNALSYM DDL_DRIVES}
+ DDL_EXCLUSIVE = $8000;
+ {$EXTERNALSYM DDL_EXCLUSIVE}
+
+function DlgDirSelectExA(hDlg: HWND; lpString: LPSTR; nCount, nIDListBox: Integer): BOOL; stdcall;
+{$EXTERNALSYM DlgDirSelectExA}
+function DlgDirSelectExW(hDlg: HWND; lpString: LPWSTR; nCount, nIDListBox: Integer): BOOL; stdcall;
+{$EXTERNALSYM DlgDirSelectExW}
+function DlgDirSelectEx(hDlg: HWND; lpString: LPTSTR; nCount, nIDListBox: Integer): BOOL; stdcall;
+{$EXTERNALSYM DlgDirSelectEx}
+
+function DlgDirListComboBoxA(hDlg: HWND; lpPathSpec: LPSTR; nIDComboBox: Integer;
+ nIDStaticPath: Integer; uFiletype: UINT): Integer; stdcall;
+{$EXTERNALSYM DlgDirListComboBoxA}
+function DlgDirListComboBoxW(hDlg: HWND; lpPathSpec: LPWSTR; nIDComboBox: Integer;
+ nIDStaticPath: Integer; uFiletype: UINT): Integer; stdcall;
+{$EXTERNALSYM DlgDirListComboBoxW}
+function DlgDirListComboBox(hDlg: HWND; lpPathSpec: LPTSTR; nIDComboBox: Integer;
+ nIDStaticPath: Integer; uFiletype: UINT): Integer; stdcall;
+{$EXTERNALSYM DlgDirListComboBox}
+
+function DlgDirSelectComboBoxExA(hDlg: HWND; lpString: LPSTR; nCount: Integer;
+ nIDComboBox: Integer): BOOL; stdcall;
+{$EXTERNALSYM DlgDirSelectComboBoxExA}
+function DlgDirSelectComboBoxExW(hDlg: HWND; lpString: LPWSTR; nCount: Integer;
+ nIDComboBox: Integer): BOOL; stdcall;
+{$EXTERNALSYM DlgDirSelectComboBoxExW}
+function DlgDirSelectComboBoxEx(hDlg: HWND; lpString: LPTSTR; nCount: Integer;
+ nIDComboBox: Integer): BOOL; stdcall;
+{$EXTERNALSYM DlgDirSelectComboBoxEx}
+
+//
+// Dialog Styles
+//
+
+const
+ DS_ABSALIGN = $01;
+ {$EXTERNALSYM DS_ABSALIGN}
+ DS_SYSMODAL = $02;
+ {$EXTERNALSYM DS_SYSMODAL}
+ DS_LOCALEDIT = $20; // Edit items get Local storage.
+ {$EXTERNALSYM DS_LOCALEDIT}
+ DS_SETFONT = $40; // User specified font for Dlg controls
+ {$EXTERNALSYM DS_SETFONT}
+ DS_MODALFRAME = $80; // Can be combined with WS_CAPTION
+ {$EXTERNALSYM DS_MODALFRAME}
+ DS_NOIDLEMSG = $100; // WM_ENTERIDLE message will not be sent
+ {$EXTERNALSYM DS_NOIDLEMSG}
+ DS_SETFOREGROUND = $200; // not in win3.1
+ {$EXTERNALSYM DS_SETFOREGROUND}
+
+ DS_3DLOOK = $0004;
+ {$EXTERNALSYM DS_3DLOOK}
+ DS_FIXEDSYS = $0008;
+ {$EXTERNALSYM DS_FIXEDSYS}
+ DS_NOFAILCREATE = $0010;
+ {$EXTERNALSYM DS_NOFAILCREATE}
+ DS_CONTROL = $0400;
+ {$EXTERNALSYM DS_CONTROL}
+ DS_CENTER = $0800;
+ {$EXTERNALSYM DS_CENTER}
+ DS_CENTERMOUSE = $1000;
+ {$EXTERNALSYM DS_CENTERMOUSE}
+ DS_CONTEXTHELP = $2000;
+ {$EXTERNALSYM DS_CONTEXTHELP}
+
+ DS_SHELLFONT = DS_SETFONT or DS_FIXEDSYS;
+ {$EXTERNALSYM DS_SHELLFONT}
+
+//#if(_WIN32_WCE >= 0x0500)
+ DS_USEPIXELS = $8000;
+ {$EXTERNALSYM DS_USEPIXELS}
+//#endif
+
+ DM_GETDEFID = WM_USER + 0;
+ {$EXTERNALSYM DM_GETDEFID}
+ DM_SETDEFID = WM_USER + 1;
+ {$EXTERNALSYM DM_SETDEFID}
+
+ DM_REPOSITION = WM_USER + 2;
+ {$EXTERNALSYM DM_REPOSITION}
+
+//
+// Returned in HIWORD() of DM_GETDEFID result if msg is supported
+//
+
+ DC_HASDEFID = $534B;
+ {$EXTERNALSYM DC_HASDEFID}
+
+//
+// Dialog Codes
+//
+
+ DLGC_WANTARROWS = $0001; // Control wants arrow keys
+ {$EXTERNALSYM DLGC_WANTARROWS}
+ DLGC_WANTTAB = $0002; // Control wants tab keys
+ {$EXTERNALSYM DLGC_WANTTAB}
+ DLGC_WANTALLKEYS = $0004; // Control wants all keys
+ {$EXTERNALSYM DLGC_WANTALLKEYS}
+ DLGC_WANTMESSAGE = $0004; // Pass message to control
+ {$EXTERNALSYM DLGC_WANTMESSAGE}
+ DLGC_HASSETSEL = $0008; // Understands EM_SETSEL message
+ {$EXTERNALSYM DLGC_HASSETSEL}
+ DLGC_DEFPUSHBUTTON = $0010; // Default pushbutton
+ {$EXTERNALSYM DLGC_DEFPUSHBUTTON}
+ DLGC_UNDEFPUSHBUTTON = $0020; // Non-default pushbutton
+ {$EXTERNALSYM DLGC_UNDEFPUSHBUTTON}
+ DLGC_RADIOBUTTON = $0040; // Radio button
+ {$EXTERNALSYM DLGC_RADIOBUTTON}
+ DLGC_WANTCHARS = $0080; // Want WM_CHAR messages
+ {$EXTERNALSYM DLGC_WANTCHARS}
+ DLGC_STATIC = $0100; // Static item: don't include
+ {$EXTERNALSYM DLGC_STATIC}
+ DLGC_BUTTON = $2000; // Button item: can be checked
+ {$EXTERNALSYM DLGC_BUTTON}
+
+ LB_CTLCODE = 0;
+ {$EXTERNALSYM LB_CTLCODE}
+
+//
+// Listbox Return Values
+//
+
+ LB_OKAY = 0;
+ {$EXTERNALSYM LB_OKAY}
+ LB_ERR = DWORD(-1);
+ {$EXTERNALSYM LB_ERR}
+ LB_ERRSPACE = DWORD(-2);
+ {$EXTERNALSYM LB_ERRSPACE}
+
+//
+// The idStaticPath parameter to DlgDirList can have the following values
+// ORed if the list box should show other details of the files along with
+// the name of the files;
+//
+// all other details also will be returned
+
+//
+// Listbox Notification Codes
+//
+
+ LBN_ERRSPACE = DWORD(-2);
+ {$EXTERNALSYM LBN_ERRSPACE}
+ LBN_SELCHANGE = 1;
+ {$EXTERNALSYM LBN_SELCHANGE}
+ LBN_DBLCLK = 2;
+ {$EXTERNALSYM LBN_DBLCLK}
+ LBN_SELCANCEL = 3;
+ {$EXTERNALSYM LBN_SELCANCEL}
+ LBN_SETFOCUS = 4;
+ {$EXTERNALSYM LBN_SETFOCUS}
+ LBN_KILLFOCUS = 5;
+ {$EXTERNALSYM LBN_KILLFOCUS}
+
+//
+// Listbox messages
+//
+
+ LB_ADDSTRING = $0180;
+ {$EXTERNALSYM LB_ADDSTRING}
+ LB_INSERTSTRING = $0181;
+ {$EXTERNALSYM LB_INSERTSTRING}
+ LB_DELETESTRING = $0182;
+ {$EXTERNALSYM LB_DELETESTRING}
+ LB_SELITEMRANGEEX = $0183;
+ {$EXTERNALSYM LB_SELITEMRANGEEX}
+ LB_RESETCONTENT = $0184;
+ {$EXTERNALSYM LB_RESETCONTENT}
+ LB_SETSEL = $0185;
+ {$EXTERNALSYM LB_SETSEL}
+ LB_SETCURSEL = $0186;
+ {$EXTERNALSYM LB_SETCURSEL}
+ LB_GETSEL = $0187;
+ {$EXTERNALSYM LB_GETSEL}
+ LB_GETCURSEL = $0188;
+ {$EXTERNALSYM LB_GETCURSEL}
+ LB_GETTEXT = $0189;
+ {$EXTERNALSYM LB_GETTEXT}
+ LB_GETTEXTLEN = $018A;
+ {$EXTERNALSYM LB_GETTEXTLEN}
+ LB_GETCOUNT = $018B;
+ {$EXTERNALSYM LB_GETCOUNT}
+ LB_SELECTSTRING = $018C;
+ {$EXTERNALSYM LB_SELECTSTRING}
+ LB_DIR = $018D;
+ {$EXTERNALSYM LB_DIR}
+ LB_GETTOPINDEX = $018E;
+ {$EXTERNALSYM LB_GETTOPINDEX}
+ LB_FINDSTRING = $018F;
+ {$EXTERNALSYM LB_FINDSTRING}
+ LB_GETSELCOUNT = $0190;
+ {$EXTERNALSYM LB_GETSELCOUNT}
+ LB_GETSELITEMS = $0191;
+ {$EXTERNALSYM LB_GETSELITEMS}
+ LB_SETTABSTOPS = $0192;
+ {$EXTERNALSYM LB_SETTABSTOPS}
+ LB_GETHORIZONTALEXTENT = $0193;
+ {$EXTERNALSYM LB_GETHORIZONTALEXTENT}
+ LB_SETHORIZONTALEXTENT = $0194;
+ {$EXTERNALSYM LB_SETHORIZONTALEXTENT}
+ LB_SETCOLUMNWIDTH = $0195;
+ {$EXTERNALSYM LB_SETCOLUMNWIDTH}
+ LB_ADDFILE = $0196;
+ {$EXTERNALSYM LB_ADDFILE}
+ LB_SETTOPINDEX = $0197;
+ {$EXTERNALSYM LB_SETTOPINDEX}
+ LB_GETITEMRECT = $0198;
+ {$EXTERNALSYM LB_GETITEMRECT}
+ LB_GETITEMDATA = $0199;
+ {$EXTERNALSYM LB_GETITEMDATA}
+ LB_SETITEMDATA = $019A;
+ {$EXTERNALSYM LB_SETITEMDATA}
+ LB_SELITEMRANGE = $019B;
+ {$EXTERNALSYM LB_SELITEMRANGE}
+ LB_SETANCHORINDEX = $019C;
+ {$EXTERNALSYM LB_SETANCHORINDEX}
+ LB_GETANCHORINDEX = $019D;
+ {$EXTERNALSYM LB_GETANCHORINDEX}
+ LB_SETCARETINDEX = $019E;
+ {$EXTERNALSYM LB_SETCARETINDEX}
+ LB_GETCARETINDEX = $019F;
+ {$EXTERNALSYM LB_GETCARETINDEX}
+ LB_SETITEMHEIGHT = $01A0;
+ {$EXTERNALSYM LB_SETITEMHEIGHT}
+ LB_GETITEMHEIGHT = $01A1;
+ {$EXTERNALSYM LB_GETITEMHEIGHT}
+ LB_FINDSTRINGEXACT = $01A2;
+ {$EXTERNALSYM LB_FINDSTRINGEXACT}
+ LB_SETLOCALE = $01A5;
+ {$EXTERNALSYM LB_SETLOCALE}
+ LB_GETLOCALE = $01A6;
+ {$EXTERNALSYM LB_GETLOCALE}
+ LB_SETCOUNT = $01A7;
+ {$EXTERNALSYM LB_SETCOUNT}
+ LB_INITSTORAGE = $01A8;
+ {$EXTERNALSYM LB_INITSTORAGE}
+ LB_ITEMFROMPOINT = $01A9;
+ {$EXTERNALSYM LB_ITEMFROMPOINT}
+ LB_MULTIPLEADDSTRING = $01B1;
+ {$EXTERNALSYM LB_MULTIPLEADDSTRING}
+ LB_GETLISTBOXINFO = $01B2;
+ {$EXTERNALSYM LB_GETLISTBOXINFO}
+
+ {$IFDEF WINXP_UP}
+ LB_MSGMAX = $01B3;
+ {$EXTERNALSYM LB_MSGMAX}
+ {$ELSE}
+ LB_MSGMAX = $01B0;
+ {$EXTERNALSYM LB_MSGMAX}
+ {$ENDIF WINXP_UP}
+
+//
+// Listbox Styles
+//
+
+ LBS_NOTIFY = $0001;
+ {$EXTERNALSYM LBS_NOTIFY}
+ LBS_SORT = $0002;
+ {$EXTERNALSYM LBS_SORT}
+ LBS_NOREDRAW = $0004;
+ {$EXTERNALSYM LBS_NOREDRAW}
+ LBS_MULTIPLESEL = $0008;
+ {$EXTERNALSYM LBS_MULTIPLESEL}
+ LBS_OWNERDRAWFIXED = $0010;
+ {$EXTERNALSYM LBS_OWNERDRAWFIXED}
+ LBS_OWNERDRAWVARIABLE = $0020;
+ {$EXTERNALSYM LBS_OWNERDRAWVARIABLE}
+ LBS_HASSTRINGS = $0040;
+ {$EXTERNALSYM LBS_HASSTRINGS}
+ LBS_USETABSTOPS = $0080;
+ {$EXTERNALSYM LBS_USETABSTOPS}
+ LBS_NOINTEGRALHEIGHT = $0100;
+ {$EXTERNALSYM LBS_NOINTEGRALHEIGHT}
+ LBS_MULTICOLUMN = $0200;
+ {$EXTERNALSYM LBS_MULTICOLUMN}
+ LBS_WANTKEYBOARDINPUT = $0400;
+ {$EXTERNALSYM LBS_WANTKEYBOARDINPUT}
+ LBS_EXTENDEDSEL = $0800;
+ {$EXTERNALSYM LBS_EXTENDEDSEL}
+ LBS_DISABLENOSCROLL = $1000;
+ {$EXTERNALSYM LBS_DISABLENOSCROLL}
+ LBS_NODATA = $2000;
+ {$EXTERNALSYM LBS_NODATA}
+ LBS_NOSEL = $4000;
+ {$EXTERNALSYM LBS_NOSEL}
+ LBS_COMBOBOX = $8000;
+ {$EXTERNALSYM LBS_COMBOBOX}
+
+ LBS_STANDARD = LBS_NOTIFY or LBS_SORT or WS_VSCROLL or WS_BORDER;
+ {$EXTERNALSYM LBS_STANDARD}
+
+//
+// Combo Box return Values
+//
+
+ CB_OKAY = 0;
+ {$EXTERNALSYM CB_OKAY}
+ CB_ERR = DWORD(-1);
+ {$EXTERNALSYM CB_ERR}
+ CB_ERRSPACE = DWORD(-2);
+ {$EXTERNALSYM CB_ERRSPACE}
+
+//
+// Combo Box Notification Codes
+//
+
+ CBN_ERRSPACE = DWORD(-1);
+ {$EXTERNALSYM CBN_ERRSPACE}
+ CBN_SELCHANGE = 1;
+ {$EXTERNALSYM CBN_SELCHANGE}
+ CBN_DBLCLK = 2;
+ {$EXTERNALSYM CBN_DBLCLK}
+ CBN_SETFOCUS = 3;
+ {$EXTERNALSYM CBN_SETFOCUS}
+ CBN_KILLFOCUS = 4;
+ {$EXTERNALSYM CBN_KILLFOCUS}
+ CBN_EDITCHANGE = 5;
+ {$EXTERNALSYM CBN_EDITCHANGE}
+ CBN_EDITUPDATE = 6;
+ {$EXTERNALSYM CBN_EDITUPDATE}
+ CBN_DROPDOWN = 7;
+ {$EXTERNALSYM CBN_DROPDOWN}
+ CBN_CLOSEUP = 8;
+ {$EXTERNALSYM CBN_CLOSEUP}
+ CBN_SELENDOK = 9;
+ {$EXTERNALSYM CBN_SELENDOK}
+ CBN_SELENDCANCEL = 10;
+ {$EXTERNALSYM CBN_SELENDCANCEL}
+
+//
+// Combo Box styles
+//
+
+ CBS_SIMPLE = $0001;
+ {$EXTERNALSYM CBS_SIMPLE}
+ CBS_DROPDOWN = $0002;
+ {$EXTERNALSYM CBS_DROPDOWN}
+ CBS_DROPDOWNLIST = $0003;
+ {$EXTERNALSYM CBS_DROPDOWNLIST}
+ CBS_OWNERDRAWFIXED = $0010;
+ {$EXTERNALSYM CBS_OWNERDRAWFIXED}
+ CBS_OWNERDRAWVARIABLE = $0020;
+ {$EXTERNALSYM CBS_OWNERDRAWVARIABLE}
+ CBS_AUTOHSCROLL = $0040;
+ {$EXTERNALSYM CBS_AUTOHSCROLL}
+ CBS_OEMCONVERT = $0080;
+ {$EXTERNALSYM CBS_OEMCONVERT}
+ CBS_SORT = $0100;
+ {$EXTERNALSYM CBS_SORT}
+ CBS_HASSTRINGS = $0200;
+ {$EXTERNALSYM CBS_HASSTRINGS}
+ CBS_NOINTEGRALHEIGHT = $0400;
+ {$EXTERNALSYM CBS_NOINTEGRALHEIGHT}
+ CBS_DISABLENOSCROLL = $0800;
+ {$EXTERNALSYM CBS_DISABLENOSCROLL}
+ CBS_UPPERCASE = $2000;
+ {$EXTERNALSYM CBS_UPPERCASE}
+ CBS_LOWERCASE = $4000;
+ {$EXTERNALSYM CBS_LOWERCASE}
+
+//
+// Combo Box messages
+//
+
+ CB_GETEDITSEL = $0140;
+ {$EXTERNALSYM CB_GETEDITSEL}
+ CB_LIMITTEXT = $0141;
+ {$EXTERNALSYM CB_LIMITTEXT}
+ CB_SETEDITSEL = $0142;
+ {$EXTERNALSYM CB_SETEDITSEL}
+ CB_ADDSTRING = $0143;
+ {$EXTERNALSYM CB_ADDSTRING}
+ CB_DELETESTRING = $0144;
+ {$EXTERNALSYM CB_DELETESTRING}
+ CB_DIR = $0145;
+ {$EXTERNALSYM CB_DIR}
+ CB_GETCOUNT = $0146;
+ {$EXTERNALSYM CB_GETCOUNT}
+ CB_GETCURSEL = $0147;
+ {$EXTERNALSYM CB_GETCURSEL}
+ CB_GETLBTEXT = $0148;
+ {$EXTERNALSYM CB_GETLBTEXT}
+ CB_GETLBTEXTLEN = $0149;
+ {$EXTERNALSYM CB_GETLBTEXTLEN}
+ CB_INSERTSTRING = $014A;
+ {$EXTERNALSYM CB_INSERTSTRING}
+ CB_RESETCONTENT = $014B;
+ {$EXTERNALSYM CB_RESETCONTENT}
+ CB_FINDSTRING = $014C;
+ {$EXTERNALSYM CB_FINDSTRING}
+ CB_SELECTSTRING = $014D;
+ {$EXTERNALSYM CB_SELECTSTRING}
+ CB_SETCURSEL = $014E;
+ {$EXTERNALSYM CB_SETCURSEL}
+ CB_SHOWDROPDOWN = $014F;
+ {$EXTERNALSYM CB_SHOWDROPDOWN}
+ CB_GETITEMDATA = $0150;
+ {$EXTERNALSYM CB_GETITEMDATA}
+ CB_SETITEMDATA = $0151;
+ {$EXTERNALSYM CB_SETITEMDATA}
+ CB_GETDROPPEDCONTROLRECT = $0152;
+ {$EXTERNALSYM CB_GETDROPPEDCONTROLRECT}
+ CB_SETITEMHEIGHT = $0153;
+ {$EXTERNALSYM CB_SETITEMHEIGHT}
+ CB_GETITEMHEIGHT = $0154;
+ {$EXTERNALSYM CB_GETITEMHEIGHT}
+ CB_SETEXTENDEDUI = $0155;
+ {$EXTERNALSYM CB_SETEXTENDEDUI}
+ CB_GETEXTENDEDUI = $0156;
+ {$EXTERNALSYM CB_GETEXTENDEDUI}
+ CB_GETDROPPEDSTATE = $0157;
+ {$EXTERNALSYM CB_GETDROPPEDSTATE}
+ CB_FINDSTRINGEXACT = $0158;
+ {$EXTERNALSYM CB_FINDSTRINGEXACT}
+ CB_SETLOCALE = $0159;
+ {$EXTERNALSYM CB_SETLOCALE}
+ CB_GETLOCALE = $015A;
+ {$EXTERNALSYM CB_GETLOCALE}
+ CB_GETTOPINDEX = $015b;
+ {$EXTERNALSYM CB_GETTOPINDEX}
+ CB_SETTOPINDEX = $015c;
+ {$EXTERNALSYM CB_SETTOPINDEX}
+ CB_GETHORIZONTALEXTENT = $015d;
+ {$EXTERNALSYM CB_GETHORIZONTALEXTENT}
+ CB_SETHORIZONTALEXTENT = $015e;
+ {$EXTERNALSYM CB_SETHORIZONTALEXTENT}
+ CB_GETDROPPEDWIDTH = $015f;
+ {$EXTERNALSYM CB_GETDROPPEDWIDTH}
+ CB_SETDROPPEDWIDTH = $0160;
+ {$EXTERNALSYM CB_SETDROPPEDWIDTH}
+ CB_INITSTORAGE = $0161;
+ {$EXTERNALSYM CB_INITSTORAGE}
+ CB_MULTIPLEADDSTRING = $0163;
+ {$EXTERNALSYM CB_MULTIPLEADDSTRING}
+ CB_GETCOMBOBOXINFO = $0164;
+ {$EXTERNALSYM CB_GETCOMBOBOXINFO}
+
+ {$IFDEF WINXP_UP}
+ CB_MSGMAX = $0165;
+ {$EXTERNALSYM CB_MSGMAX}
+ {$ELSE}
+ CB_MSGMAX = $0162;
+ {$EXTERNALSYM CB_MSGMAX}
+ {$ENDIF WINXP_UP}
+
+//
+// Scroll Bar Styles
+//
+
+ SBS_HORZ = $0000;
+ {$EXTERNALSYM SBS_HORZ}
+ SBS_VERT = $0001;
+ {$EXTERNALSYM SBS_VERT}
+ SBS_TOPALIGN = $0002;
+ {$EXTERNALSYM SBS_TOPALIGN}
+ SBS_LEFTALIGN = $0002;
+ {$EXTERNALSYM SBS_LEFTALIGN}
+ SBS_BOTTOMALIGN = $0004;
+ {$EXTERNALSYM SBS_BOTTOMALIGN}
+ SBS_RIGHTALIGN = $0004;
+ {$EXTERNALSYM SBS_RIGHTALIGN}
+ SBS_SIZEBOXTOPLEFTALIGN = $0002;
+ {$EXTERNALSYM SBS_SIZEBOXTOPLEFTALIGN}
+ SBS_SIZEBOXBOTTOMRIGHTALIGN = $0004;
+ {$EXTERNALSYM SBS_SIZEBOXBOTTOMRIGHTALIGN}
+ SBS_SIZEBOX = $0008;
+ {$EXTERNALSYM SBS_SIZEBOX}
+ SBS_SIZEGRIP = $0010;
+ {$EXTERNALSYM SBS_SIZEGRIP}
+
+//
+// Scroll bar messages
+//
+
+ SBM_SETPOS = $00E0; // not in win3.1
+ {$EXTERNALSYM SBM_SETPOS}
+ SBM_GETPOS = $00E1; // not in win3.1
+ {$EXTERNALSYM SBM_GETPOS}
+ SBM_SETRANGE = $00E2; // not in win3.1
+ {$EXTERNALSYM SBM_SETRANGE}
+ SBM_SETRANGEREDRAW = $00E6; // not in win3.1
+ {$EXTERNALSYM SBM_SETRANGEREDRAW}
+ SBM_GETRANGE = $00E3; // not in win3.1
+ {$EXTERNALSYM SBM_GETRANGE}
+ SBM_ENABLE_ARROWS = $00E4; // not in win3.1
+ {$EXTERNALSYM SBM_ENABLE_ARROWS}
+ SBM_SETSCROLLINFO = $00E9;
+ {$EXTERNALSYM SBM_SETSCROLLINFO}
+ SBM_GETSCROLLINFO = $00EA;
+ {$EXTERNALSYM SBM_GETSCROLLINFO}
+
+ SBM_GETSCROLLBARINFO = $00EB;
+ {$EXTERNALSYM SBM_GETSCROLLBARINFO}
+
+ SIF_RANGE = $0001;
+ {$EXTERNALSYM SIF_RANGE}
+ SIF_PAGE = $0002;
+ {$EXTERNALSYM SIF_PAGE}
+ SIF_POS = $0004;
+ {$EXTERNALSYM SIF_POS}
+ SIF_DISABLENOSCROLL = $0008;
+ {$EXTERNALSYM SIF_DISABLENOSCROLL}
+ SIF_TRACKPOS = $0010;
+ {$EXTERNALSYM SIF_TRACKPOS}
+ SIF_ALL = SIF_RANGE or SIF_PAGE or SIF_POS or SIF_TRACKPOS;
+ {$EXTERNALSYM SIF_ALL}
+
+type
+ LPSCROLLINFO = ^SCROLLINFO;
+ {$EXTERNALSYM LPSCROLLINFO}
+ tagSCROLLINFO = record
+ cbSize: UINT;
+ fMask: UINT;
+ nMin: Integer;
+ nMax: Integer;
+ nPage: UINT;
+ nPos: Integer;
+ nTrackPos: Integer;
+ end;
+ {$EXTERNALSYM tagSCROLLINFO}
+ SCROLLINFO = tagSCROLLINFO;
+ {$EXTERNALSYM SCROLLINFO}
+ TScrollInfo = SCROLLINFO;
+ PScrollInfo = LPSCROLLINFO;
+
+function SetScrollInfo(hwnd: HWND; fnBar: Integer; const lpsi: SCROLLINFO;
+ fRedraw: BOOL): Integer; stdcall;
+{$EXTERNALSYM SetScrollInfo}
+
+function GetScrollInfo(hwnd: HWND; fnBar: Integer; var lpsi: SCROLLINFO): BOOL; stdcall;
+{$EXTERNALSYM GetScrollInfo}
+
+//
+// MDI client style bits
+//
+
+const
+ MDIS_ALLCHILDSTYLES = $0001;
+ {$EXTERNALSYM MDIS_ALLCHILDSTYLES}
+
+//
+// wParam Flags for WM_MDITILE and WM_MDICASCADE messages.
+//
+
+const
+ MDITILE_VERTICAL = $0000; // not in win3.1
+ {$EXTERNALSYM MDITILE_VERTICAL}
+ MDITILE_HORIZONTAL = $0001; // not in win3.1
+ {$EXTERNALSYM MDITILE_HORIZONTAL}
+ MDITILE_SKIPDISABLED = $0002; // not in win3.1
+ {$EXTERNALSYM MDITILE_SKIPDISABLED}
+ MDITILE_ZORDER = $0004;
+ {$EXTERNALSYM MDITILE_ZORDER}
+
+type
+ LPMDICREATESTRUCTA = ^MDICREATESTRUCTA;
+ {$EXTERNALSYM LPMDICREATESTRUCTA}
+ tagMDICREATESTRUCTA = record
+ szClass: LPCSTR;
+ szTitle: LPCSTR;
+ hOwner: HANDLE;
+ x: Integer;
+ y: Integer;
+ cx: Integer;
+ cy: Integer;
+ style: DWORD;
+ lParam: LPARAM; // app-defined stuff//
+ end;
+ {$EXTERNALSYM tagMDICREATESTRUCTA}
+ MDICREATESTRUCTA = tagMDICREATESTRUCTA;
+ {$EXTERNALSYM MDICREATESTRUCTA}
+ TMdiCreateStructA = MDICREATESTRUCTA;
+ PMdiCreateStructA = LPMDICREATESTRUCTA;
+
+ LPMDICREATESTRUCTW = ^MDICREATESTRUCTW;
+ {$EXTERNALSYM LPMDICREATESTRUCTW}
+ tagMDICREATESTRUCTW = record
+ szClass: LPCWSTR;
+ szTitle: LPCWSTR;
+ hOwner: HANDLE;
+ x: Integer;
+ y: Integer;
+ cx: Integer;
+ cy: Integer;
+ style: DWORD;
+ lParam: LPARAM; // app-defined stuff//
+ end;
+ {$EXTERNALSYM tagMDICREATESTRUCTW}
+ MDICREATESTRUCTW = tagMDICREATESTRUCTW;
+ {$EXTERNALSYM MDICREATESTRUCTW}
+ TMdiCreateStructW = MDICREATESTRUCTW;
+ PMdiCreateStructW = LPMDICREATESTRUCTW;
+
+ {$IFDEF UNICODE}
+ MDICREATESTRUCT = MDICREATESTRUCTW;
+ {$EXTERNALSYM MDICREATESTRUCT}
+ LPMDICREATESTRUCT = LPMDICREATESTRUCTW;
+ {$EXTERNALSYM LPMDICREATESTRUCT}
+ TMdiCreateStruct = TMdiCreateStructW;
+ PMdiCreateStruct = PMdiCreateStructW;
+ {$ELSE}
+ MDICREATESTRUCT = MDICREATESTRUCTA;
+ {$EXTERNALSYM MDICREATESTRUCT}
+ LPMDICREATESTRUCT = LPMDICREATESTRUCTA;
+ {$EXTERNALSYM LPMDICREATESTRUCT}
+ TMdiCreateStruct = TMdiCreateStructA;
+ PMdiCreateStruct = PMdiCreateStructA;
+ {$ENDIF UNICODE}
+
+ LPCLIENTCREATESTRUCT = ^CLIENTCREATESTRUCT;
+ {$EXTERNALSYM LPCLIENTCREATESTRUCT}
+ tagCLIENTCREATESTRUCT = record
+ hWindowMenu: HANDLE;
+ idFirstChild: UINT;
+ end;
+ {$EXTERNALSYM tagCLIENTCREATESTRUCT}
+ CLIENTCREATESTRUCT = tagCLIENTCREATESTRUCT;
+ {$EXTERNALSYM CLIENTCREATESTRUCT}
+ TClientCreateStruct = CLIENTCREATESTRUCT;
+ PClientCreateStruct = LPCLIENTCREATESTRUCT;
+
+function DefFrameProcA(hWnd: HWND; hWndMDIClient: HWND; uMsg: UINT;
+ wParam: WPARAM; lParam: LPARAM): LRESULT; stdcall;
+{$EXTERNALSYM DefFrameProcA}
+function DefFrameProcW(hWnd: HWND; hWndMDIClient: HWND; uMsg: UINT;
+ wParam: WPARAM; lParam: LPARAM): LRESULT; stdcall;
+{$EXTERNALSYM DefFrameProcW}
+function DefFrameProc(hWnd: HWND; hWndMDIClient: HWND; uMsg: UINT;
+ wParam: WPARAM; lParam: LPARAM): LRESULT; stdcall;
+{$EXTERNALSYM DefFrameProc}
+
+function DefMDIChildProcA(hWnd: HWND; uMsg: UINT; wParam: WPARAM; lParam: LPARAM): LRESULT; stdcall;
+{$EXTERNALSYM DefMDIChildProcA}
+function DefMDIChildProcW(hWnd: HWND; uMsg: UINT; wParam: WPARAM; lParam: LPARAM): LRESULT; stdcall;
+{$EXTERNALSYM DefMDIChildProcW}
+function DefMDIChildProc(hWnd: HWND; uMsg: UINT; wParam: WPARAM; lParam: LPARAM): LRESULT; stdcall;
+{$EXTERNALSYM DefMDIChildProc}
+
+function TranslateMDISysAccel(hWndClient: HWND; const lpMsg: MSG): BOOL; stdcall;
+{$EXTERNALSYM TranslateMDISysAccel}
+
+function ArrangeIconicWindows(hWnd: HWND): UINT; stdcall;
+{$EXTERNALSYM ArrangeIconicWindows}
+
+function CreateMDIWindowA(lpClassName, lpWindowName: LPCSTR; dwStyle: DWORD;
+ X, Y, nWidth, nHeight: Integer; hWndParent: HWND; hInstance: HINSTANCE;
+ lParam: LPARAM): HWND; stdcall;
+{$EXTERNALSYM CreateMDIWindowA}
+function CreateMDIWindowW(lpClassName, lpWindowName: LPCWSTR; dwStyle: DWORD;
+ X, Y, nWidth, nHeight: Integer; hWndParent: HWND; hInstance: HINSTANCE;
+ lParam: LPARAM): HWND; stdcall;
+{$EXTERNALSYM CreateMDIWindowW}
+function CreateMDIWindow(lpClassName, lpWindowName: LPCTSTR; dwStyle: DWORD;
+ X, Y, nWidth, nHeight: Integer; hWndParent: HWND; hInstance: HINSTANCE;
+ lParam: LPARAM): HWND; stdcall;
+{$EXTERNALSYM CreateMDIWindow}
+
+function TileWindows(hwndParent: HWND; wHow: UINT; lpRect: LPRECT; cKids: UINT;
+ hwnd: HWND; lpKids: LPHWND): WORD; stdcall;
+{$EXTERNALSYM TileWindows}
+
+function CascadeWindows(hwndParent: HWND; wHow: UINT; lpRect: LPRECT;
+ cKids: UINT; lpKids: LPHWND): WORD; stdcall;
+{$EXTERNALSYM CascadeWindows}
+
+//***** Help support ********************************************************/
+
+type
+ HELPPOLY = DWORD;
+ {$EXTERNALSYM HELPPOLY}
+
+ LPMULTIKEYHELPA = ^MULTIKEYHELPA;
+ {$EXTERNALSYM LPMULTIKEYHELPA}
+ tagMULTIKEYHELPA = record
+ mkSize: DWORD;
+ mkKeylist: CHAR;
+ szKeyphrase: array [0..0] of CHAR;
+ end;
+ {$EXTERNALSYM tagMULTIKEYHELPA}
+ MULTIKEYHELPA = tagMULTIKEYHELPA;
+ {$EXTERNALSYM MULTIKEYHELPA}
+ TMultiKeyHelpA = MULTIKEYHELPA;
+ PMultiKeyHelpA = LPMULTIKEYHELPA;
+
+ LPMULTIKEYHELPW = ^MULTIKEYHELPW;
+ {$EXTERNALSYM LPMULTIKEYHELPW}
+ tagMULTIKEYHELPW = record
+ mkSize: DWORD;
+ mkKeylist: WCHAR;
+ szKeyphrase: array [0..0] of WCHAR;
+ end;
+ {$EXTERNALSYM tagMULTIKEYHELPW}
+ MULTIKEYHELPW = tagMULTIKEYHELPW;
+ {$EXTERNALSYM MULTIKEYHELPW}
+ TMultiKeyHelpW = MULTIKEYHELPW;
+ PMultiKeyHelpW = LPMULTIKEYHELPW;
+
+ {$IFDEF UNICODE}
+ MULTIKEYHELP = MULTIKEYHELPW;
+ {$EXTERNALSYM MULTIKEYHELP}
+ LPMULTIKEYHELP = LPMULTIKEYHELPW;
+ {$EXTERNALSYM LPMULTIKEYHELP}
+ TMultiKeyHelp = TMultiKeyHelpW;
+ PMultiKeyHelp = PMultiKeyHelpW;
+ {$ELSE}
+ MULTIKEYHELP = MULTIKEYHELPA;
+ {$EXTERNALSYM MULTIKEYHELP}
+ LPMULTIKEYHELP = LPMULTIKEYHELPA;
+ {$EXTERNALSYM LPMULTIKEYHELP}
+ TMultiKeyHelp = TMultiKeyHelpA;
+ PMultiKeyHelp = PMultiKeyHelpA;
+ {$ENDIF UNICODE}
+
+ LPHELPWININFOA = ^HELPWININFOA;
+ {$EXTERNALSYM LPHELPWININFOA}
+ tagHELPWININFOA = record
+ wStructSize: Integer;
+ x: Integer;
+ y: Integer;
+ dx: Integer;
+ dy: Integer;
+ wMax: Integer;
+ rgchMember: array [0..1] of CHAR;
+ end;
+ {$EXTERNALSYM tagHELPWININFOA}
+ HELPWININFOA = tagHELPWININFOA;
+ {$EXTERNALSYM HELPWININFOA}
+ THelpWinInfoA = HELPWININFOA;
+ PHelpWinInfoA = LPHELPWININFOA;
+
+ LPHELPWININFOW = ^HELPWININFOW;
+ {$EXTERNALSYM LPHELPWININFOW}
+ tagHELPWININFOW = record
+ wStructSize: Integer;
+ x: Integer;
+ y: Integer;
+ dx: Integer;
+ dy: Integer;
+ wMax: Integer;
+ rgchMember: array [0..1] of WCHAR;
+ end;
+ {$EXTERNALSYM tagHELPWININFOW}
+ HELPWININFOW = tagHELPWININFOW;
+ {$EXTERNALSYM HELPWININFOW}
+ THelpWinInfoW = HELPWININFOW;
+ PHelpWinInfoW = LPHELPWININFOW;
+
+ {$IFDEF UNICODE}
+ HELPWININFO = HELPWININFOW;
+ {$EXTERNALSYM HELPWININFO}
+ LPHELPWININFO = LPHELPWININFOW;
+ {$EXTERNALSYM LPHELPWININFO}
+ THelpWinInfo = THelpWinInfoW;
+ PHelpWinInfo = PHelpWinInfoW;
+ {$ELSE}
+ HELPWININFO = HELPWININFOA;
+ {$EXTERNALSYM HELPWININFO}
+ LPHELPWININFO = LPHELPWININFOA;
+ {$EXTERNALSYM LPHELPWININFO}
+ THelpWinInfo = THelpWinInfoA;
+ PHelpWinInfo = PHelpWinInfoA;
+ {$ENDIF UNICODE}
+
+//
+// Commands to pass to WinHelp()
+//
+
+const
+ HELP_CONTEXT = $0001; // Display topic in ulTopic
+ {$EXTERNALSYM HELP_CONTEXT}
+ HELP_QUIT = $0002; // Terminate help
+ {$EXTERNALSYM HELP_QUIT}
+ HELP_INDEX = $0003; // Display index
+ {$EXTERNALSYM HELP_INDEX}
+ HELP_CONTENTS = $0003;
+ {$EXTERNALSYM HELP_CONTENTS}
+ HELP_HELPONHELP = $0004; // Display help on using help
+ {$EXTERNALSYM HELP_HELPONHELP}
+ HELP_SETINDEX = $0005; // Set current Index for multi index help
+ {$EXTERNALSYM HELP_SETINDEX}
+ HELP_SETCONTENTS = $0005;
+ {$EXTERNALSYM HELP_SETCONTENTS}
+ HELP_CONTEXTPOPUP = $0008;
+ {$EXTERNALSYM HELP_CONTEXTPOPUP}
+ HELP_FORCEFILE = $0009;
+ {$EXTERNALSYM HELP_FORCEFILE}
+ HELP_KEY = $0101; // Display topic for keyword in offabData
+ {$EXTERNALSYM HELP_KEY}
+ HELP_COMMAND = $0102;
+ {$EXTERNALSYM HELP_COMMAND}
+ HELP_PARTIALKEY = $0105;
+ {$EXTERNALSYM HELP_PARTIALKEY}
+ HELP_MULTIKEY = $0201;
+ {$EXTERNALSYM HELP_MULTIKEY}
+ HELP_SETWINPOS = $0203;
+ {$EXTERNALSYM HELP_SETWINPOS}
+
+ HELP_CONTEXTMENU = $000a;
+ {$EXTERNALSYM HELP_CONTEXTMENU}
+ HELP_FINDER = $000b;
+ {$EXTERNALSYM HELP_FINDER}
+ HELP_WM_HELP = $000c;
+ {$EXTERNALSYM HELP_WM_HELP}
+ HELP_SETPOPUP_POS = $000d;
+ {$EXTERNALSYM HELP_SETPOPUP_POS}
+
+ HELP_TCARD = $8000;
+ {$EXTERNALSYM HELP_TCARD}
+ HELP_TCARD_DATA = $0010;
+ {$EXTERNALSYM HELP_TCARD_DATA}
+ HELP_TCARD_OTHER_CALLER = $0011;
+ {$EXTERNALSYM HELP_TCARD_OTHER_CALLER}
+
+// These are in winhelp.h in Win95.
+
+ IDH_NO_HELP = 28440;
+ {$EXTERNALSYM IDH_NO_HELP}
+ IDH_MISSING_CONTEXT = 28441; // Control doesn't have matching help context
+ {$EXTERNALSYM IDH_MISSING_CONTEXT}
+ IDH_GENERIC_HELP_BUTTON = 28442; // Property sheet help button
+ {$EXTERNALSYM IDH_GENERIC_HELP_BUTTON}
+ IDH_OK = 28443;
+ {$EXTERNALSYM IDH_OK}
+ IDH_CANCEL = 28444;
+ {$EXTERNALSYM IDH_CANCEL}
+ IDH_HELP = 28445;
+ {$EXTERNALSYM IDH_HELP}
+
+function WinHelpA(hWndMain: HWND; lpszHelp: LPCSTR; uCommand: UINT; dwData: ULONG_PTR): BOOL; stdcall;
+{$EXTERNALSYM WinHelpA}
+function WinHelpW(hWndMain: HWND; lpszHelp: LPCWSTR; uCommand: UINT; dwData: ULONG_PTR): BOOL; stdcall;
+{$EXTERNALSYM WinHelpW}
+function WinHelp(hWndMain: HWND; lpszHelp: LPCTSTR; uCommand: UINT; dwData: ULONG_PTR): BOOL; stdcall;
+{$EXTERNALSYM WinHelp}
+
+const
+ GR_GDIOBJECTS = 0; // Count of GDI objects
+ {$EXTERNALSYM GR_GDIOBJECTS}
+ GR_USEROBJECTS = 1; // Count of USER objects
+ {$EXTERNALSYM GR_USEROBJECTS}
+
+function GetGuiResources(hProcess: HANDLE; uiFlags: DWORD): DWORD; stdcall;
+{$EXTERNALSYM GetGuiResources}
+
+//
+// Parameter for SystemParametersInfo()
+//
+
+const
+ SPI_GETBEEP = 1;
+ {$EXTERNALSYM SPI_GETBEEP}
+ SPI_SETBEEP = 2;
+ {$EXTERNALSYM SPI_SETBEEP}
+ SPI_GETMOUSE = 3;
+ {$EXTERNALSYM SPI_GETMOUSE}
+ SPI_SETMOUSE = 4;
+ {$EXTERNALSYM SPI_SETMOUSE}
+ SPI_GETBORDER = 5;
+ {$EXTERNALSYM SPI_GETBORDER}
+ SPI_SETBORDER = 6;
+ {$EXTERNALSYM SPI_SETBORDER}
+ SPI_GETKEYBOARDSPEED = 10;
+ {$EXTERNALSYM SPI_GETKEYBOARDSPEED}
+ SPI_SETKEYBOARDSPEED = 11;
+ {$EXTERNALSYM SPI_SETKEYBOARDSPEED}
+ SPI_LANGDRIVER = 12;
+ {$EXTERNALSYM SPI_LANGDRIVER}
+ SPI_ICONHORIZONTALSPACING = 13;
+ {$EXTERNALSYM SPI_ICONHORIZONTALSPACING}
+ SPI_GETSCREENSAVETIMEOUT = 14;
+ {$EXTERNALSYM SPI_GETSCREENSAVETIMEOUT}
+ SPI_SETSCREENSAVETIMEOUT = 15;
+ {$EXTERNALSYM SPI_SETSCREENSAVETIMEOUT}
+ SPI_GETSCREENSAVEACTIVE = 16;
+ {$EXTERNALSYM SPI_GETSCREENSAVEACTIVE}
+ SPI_SETSCREENSAVEACTIVE = 17;
+ {$EXTERNALSYM SPI_SETSCREENSAVEACTIVE}
+ SPI_GETGRIDGRANULARITY = 18;
+ {$EXTERNALSYM SPI_GETGRIDGRANULARITY}
+ SPI_SETGRIDGRANULARITY = 19;
+ {$EXTERNALSYM SPI_SETGRIDGRANULARITY}
+ SPI_SETDESKWALLPAPER = 20;
+ {$EXTERNALSYM SPI_SETDESKWALLPAPER}
+ SPI_SETDESKPATTERN = 21;
+ {$EXTERNALSYM SPI_SETDESKPATTERN}
+ SPI_GETKEYBOARDDELAY = 22;
+ {$EXTERNALSYM SPI_GETKEYBOARDDELAY}
+ SPI_SETKEYBOARDDELAY = 23;
+ {$EXTERNALSYM SPI_SETKEYBOARDDELAY}
+ SPI_ICONVERTICALSPACING = 24;
+ {$EXTERNALSYM SPI_ICONVERTICALSPACING}
+ SPI_GETICONTITLEWRAP = 25;
+ {$EXTERNALSYM SPI_GETICONTITLEWRAP}
+ SPI_SETICONTITLEWRAP = 26;
+ {$EXTERNALSYM SPI_SETICONTITLEWRAP}
+ SPI_GETMENUDROPALIGNMENT = 27;
+ {$EXTERNALSYM SPI_GETMENUDROPALIGNMENT}
+ SPI_SETMENUDROPALIGNMENT = 28;
+ {$EXTERNALSYM SPI_SETMENUDROPALIGNMENT}
+ SPI_SETDOUBLECLKWIDTH = 29;
+ {$EXTERNALSYM SPI_SETDOUBLECLKWIDTH}
+ SPI_SETDOUBLECLKHEIGHT = 30;
+ {$EXTERNALSYM SPI_SETDOUBLECLKHEIGHT}
+ SPI_GETICONTITLELOGFONT = 31;
+ {$EXTERNALSYM SPI_GETICONTITLELOGFONT}
+ SPI_SETDOUBLECLICKTIME = 32;
+ {$EXTERNALSYM SPI_SETDOUBLECLICKTIME}
+ SPI_SETMOUSEBUTTONSWAP = 33;
+ {$EXTERNALSYM SPI_SETMOUSEBUTTONSWAP}
+ SPI_SETICONTITLELOGFONT = 34;
+ {$EXTERNALSYM SPI_SETICONTITLELOGFONT}
+ SPI_GETFASTTASKSWITCH = 35;
+ {$EXTERNALSYM SPI_GETFASTTASKSWITCH}
+ SPI_SETFASTTASKSWITCH = 36;
+ {$EXTERNALSYM SPI_SETFASTTASKSWITCH}
+ SPI_SETDRAGFULLWINDOWS = 37;
+ {$EXTERNALSYM SPI_SETDRAGFULLWINDOWS}
+ SPI_GETDRAGFULLWINDOWS = 38;
+ {$EXTERNALSYM SPI_GETDRAGFULLWINDOWS}
+ SPI_GETNONCLIENTMETRICS = 41;
+ {$EXTERNALSYM SPI_GETNONCLIENTMETRICS}
+ SPI_SETNONCLIENTMETRICS = 42;
+ {$EXTERNALSYM SPI_SETNONCLIENTMETRICS}
+ SPI_GETMINIMIZEDMETRICS = 43;
+ {$EXTERNALSYM SPI_GETMINIMIZEDMETRICS}
+ SPI_SETMINIMIZEDMETRICS = 44;
+ {$EXTERNALSYM SPI_SETMINIMIZEDMETRICS}
+ SPI_GETICONMETRICS = 45;
+ {$EXTERNALSYM SPI_GETICONMETRICS}
+ SPI_SETICONMETRICS = 46;
+ {$EXTERNALSYM SPI_SETICONMETRICS}
+ SPI_SETWORKAREA = 47;
+ {$EXTERNALSYM SPI_SETWORKAREA}
+ SPI_GETWORKAREA = 48;
+ {$EXTERNALSYM SPI_GETWORKAREA}
+ SPI_SETPENWINDOWS = 49;
+ {$EXTERNALSYM SPI_SETPENWINDOWS}
+
+ SPI_GETHIGHCONTRAST = 66;
+ {$EXTERNALSYM SPI_GETHIGHCONTRAST}
+ SPI_SETHIGHCONTRAST = 67;
+ {$EXTERNALSYM SPI_SETHIGHCONTRAST}
+ SPI_GETKEYBOARDPREF = 68;
+ {$EXTERNALSYM SPI_GETKEYBOARDPREF}
+ SPI_SETKEYBOARDPREF = 69;
+ {$EXTERNALSYM SPI_SETKEYBOARDPREF}
+ SPI_GETSCREENREADER = 70;
+ {$EXTERNALSYM SPI_GETSCREENREADER}
+ SPI_SETSCREENREADER = 71;
+ {$EXTERNALSYM SPI_SETSCREENREADER}
+ SPI_GETANIMATION = 72;
+ {$EXTERNALSYM SPI_GETANIMATION}
+ SPI_SETANIMATION = 73;
+ {$EXTERNALSYM SPI_SETANIMATION}
+ SPI_GETFONTSMOOTHING = 74;
+ {$EXTERNALSYM SPI_GETFONTSMOOTHING}
+ SPI_SETFONTSMOOTHING = 75;
+ {$EXTERNALSYM SPI_SETFONTSMOOTHING}
+ SPI_SETDRAGWIDTH = 76;
+ {$EXTERNALSYM SPI_SETDRAGWIDTH}
+ SPI_SETDRAGHEIGHT = 77;
+ {$EXTERNALSYM SPI_SETDRAGHEIGHT}
+ SPI_SETHANDHELD = 78;
+ {$EXTERNALSYM SPI_SETHANDHELD}
+ SPI_GETLOWPOWERTIMEOUT = 79;
+ {$EXTERNALSYM SPI_GETLOWPOWERTIMEOUT}
+ SPI_GETPOWEROFFTIMEOUT = 80;
+ {$EXTERNALSYM SPI_GETPOWEROFFTIMEOUT}
+ SPI_SETLOWPOWERTIMEOUT = 81;
+ {$EXTERNALSYM SPI_SETLOWPOWERTIMEOUT}
+ SPI_SETPOWEROFFTIMEOUT = 82;
+ {$EXTERNALSYM SPI_SETPOWEROFFTIMEOUT}
+ SPI_GETLOWPOWERACTIVE = 83;
+ {$EXTERNALSYM SPI_GETLOWPOWERACTIVE}
+ SPI_GETPOWEROFFACTIVE = 84;
+ {$EXTERNALSYM SPI_GETPOWEROFFACTIVE}
+ SPI_SETLOWPOWERACTIVE = 85;
+ {$EXTERNALSYM SPI_SETLOWPOWERACTIVE}
+ SPI_SETPOWEROFFACTIVE = 86;
+ {$EXTERNALSYM SPI_SETPOWEROFFACTIVE}
+ SPI_SETCURSORS = 87;
+ {$EXTERNALSYM SPI_SETCURSORS}
+ SPI_SETICONS = 88;
+ {$EXTERNALSYM SPI_SETICONS}
+ SPI_GETDEFAULTINPUTLANG = 89;
+ {$EXTERNALSYM SPI_GETDEFAULTINPUTLANG}
+ SPI_SETDEFAULTINPUTLANG = 90;
+ {$EXTERNALSYM SPI_SETDEFAULTINPUTLANG}
+ SPI_SETLANGTOGGLE = 91;
+ {$EXTERNALSYM SPI_SETLANGTOGGLE}
+ SPI_GETWINDOWSEXTENSION = 92;
+ {$EXTERNALSYM SPI_GETWINDOWSEXTENSION}
+ SPI_SETMOUSETRAILS = 93;
+ {$EXTERNALSYM SPI_SETMOUSETRAILS}
+ SPI_GETMOUSETRAILS = 94;
+ {$EXTERNALSYM SPI_GETMOUSETRAILS}
+ SPI_SETSCREENSAVERRUNNING = 97;
+ {$EXTERNALSYM SPI_SETSCREENSAVERRUNNING}
+ SPI_SCREENSAVERRUNNING = SPI_SETSCREENSAVERRUNNING;
+ {$EXTERNALSYM SPI_SCREENSAVERRUNNING}
+ SPI_GETFILTERKEYS = 50;
+ {$EXTERNALSYM SPI_GETFILTERKEYS}
+ SPI_SETFILTERKEYS = 51;
+ {$EXTERNALSYM SPI_SETFILTERKEYS}
+ SPI_GETTOGGLEKEYS = 52;
+ {$EXTERNALSYM SPI_GETTOGGLEKEYS}
+ SPI_SETTOGGLEKEYS = 53;
+ {$EXTERNALSYM SPI_SETTOGGLEKEYS}
+ SPI_GETMOUSEKEYS = 54;
+ {$EXTERNALSYM SPI_GETMOUSEKEYS}
+ SPI_SETMOUSEKEYS = 55;
+ {$EXTERNALSYM SPI_SETMOUSEKEYS}
+ SPI_GETSHOWSOUNDS = 56;
+ {$EXTERNALSYM SPI_GETSHOWSOUNDS}
+ SPI_SETSHOWSOUNDS = 57;
+ {$EXTERNALSYM SPI_SETSHOWSOUNDS}
+ SPI_GETSTICKYKEYS = 58;
+ {$EXTERNALSYM SPI_GETSTICKYKEYS}
+ SPI_SETSTICKYKEYS = 59;
+ {$EXTERNALSYM SPI_SETSTICKYKEYS}
+ SPI_GETACCESSTIMEOUT = 60;
+ {$EXTERNALSYM SPI_GETACCESSTIMEOUT}
+ SPI_SETACCESSTIMEOUT = 61;
+ {$EXTERNALSYM SPI_SETACCESSTIMEOUT}
+ SPI_GETSERIALKEYS = 62;
+ {$EXTERNALSYM SPI_GETSERIALKEYS}
+ SPI_SETSERIALKEYS = 63;
+ {$EXTERNALSYM SPI_SETSERIALKEYS}
+ SPI_GETSOUNDSENTRY = 64;
+ {$EXTERNALSYM SPI_GETSOUNDSENTRY}
+ SPI_SETSOUNDSENTRY = 65;
+ {$EXTERNALSYM SPI_SETSOUNDSENTRY}
+ SPI_GETSNAPTODEFBUTTON = 95;
+ {$EXTERNALSYM SPI_GETSNAPTODEFBUTTON}
+ SPI_SETSNAPTODEFBUTTON = 96;
+ {$EXTERNALSYM SPI_SETSNAPTODEFBUTTON}
+ SPI_GETMOUSEHOVERWIDTH = 98;
+ {$EXTERNALSYM SPI_GETMOUSEHOVERWIDTH}
+ SPI_SETMOUSEHOVERWIDTH = 99;
+ {$EXTERNALSYM SPI_SETMOUSEHOVERWIDTH}
+ SPI_GETMOUSEHOVERHEIGHT = 100;
+ {$EXTERNALSYM SPI_GETMOUSEHOVERHEIGHT}
+ SPI_SETMOUSEHOVERHEIGHT = 101;
+ {$EXTERNALSYM SPI_SETMOUSEHOVERHEIGHT}
+ SPI_GETMOUSEHOVERTIME = 102;
+ {$EXTERNALSYM SPI_GETMOUSEHOVERTIME}
+ SPI_SETMOUSEHOVERTIME = 103;
+ {$EXTERNALSYM SPI_SETMOUSEHOVERTIME}
+ SPI_GETWHEELSCROLLLINES = 104;
+ {$EXTERNALSYM SPI_GETWHEELSCROLLLINES}
+ SPI_SETWHEELSCROLLLINES = 105;
+ {$EXTERNALSYM SPI_SETWHEELSCROLLLINES}
+ SPI_GETMENUSHOWDELAY = 106;
+ {$EXTERNALSYM SPI_GETMENUSHOWDELAY}
+ SPI_SETMENUSHOWDELAY = 107;
+ {$EXTERNALSYM SPI_SETMENUSHOWDELAY}
+
+ SPI_GETSHOWIMEUI = 110;
+ {$EXTERNALSYM SPI_GETSHOWIMEUI}
+ SPI_SETSHOWIMEUI = 111;
+ {$EXTERNALSYM SPI_SETSHOWIMEUI}
+
+ SPI_GETMOUSESPEED = 112;
+ {$EXTERNALSYM SPI_GETMOUSESPEED}
+ SPI_SETMOUSESPEED = 113;
+ {$EXTERNALSYM SPI_SETMOUSESPEED}
+ SPI_GETSCREENSAVERRUNNING = 114;
+ {$EXTERNALSYM SPI_GETSCREENSAVERRUNNING}
+ SPI_GETDESKWALLPAPER = 115;
+ {$EXTERNALSYM SPI_GETDESKWALLPAPER}
+
+ SPI_GETACTIVEWINDOWTRACKING = $1000;
+ {$EXTERNALSYM SPI_GETACTIVEWINDOWTRACKING}
+ SPI_SETACTIVEWINDOWTRACKING = $1001;
+ {$EXTERNALSYM SPI_SETACTIVEWINDOWTRACKING}
+ SPI_GETMENUANIMATION = $1002;
+ {$EXTERNALSYM SPI_GETMENUANIMATION}
+ SPI_SETMENUANIMATION = $1003;
+ {$EXTERNALSYM SPI_SETMENUANIMATION}
+ SPI_GETCOMBOBOXANIMATION = $1004;
+ {$EXTERNALSYM SPI_GETCOMBOBOXANIMATION}
+ SPI_SETCOMBOBOXANIMATION = $1005;
+ {$EXTERNALSYM SPI_SETCOMBOBOXANIMATION}
+ SPI_GETLISTBOXSMOOTHSCROLLING = $1006;
+ {$EXTERNALSYM SPI_GETLISTBOXSMOOTHSCROLLING}
+ SPI_SETLISTBOXSMOOTHSCROLLING = $1007;
+ {$EXTERNALSYM SPI_SETLISTBOXSMOOTHSCROLLING}
+ SPI_GETGRADIENTCAPTIONS = $1008;
+ {$EXTERNALSYM SPI_GETGRADIENTCAPTIONS}
+ SPI_SETGRADIENTCAPTIONS = $1009;
+ {$EXTERNALSYM SPI_SETGRADIENTCAPTIONS}
+ SPI_GETKEYBOARDCUES = $100A;
+ {$EXTERNALSYM SPI_GETKEYBOARDCUES}
+ SPI_SETKEYBOARDCUES = $100B;
+ {$EXTERNALSYM SPI_SETKEYBOARDCUES}
+ SPI_GETMENUUNDERLINES = SPI_GETKEYBOARDCUES;
+ {$EXTERNALSYM SPI_GETMENUUNDERLINES}
+ SPI_SETMENUUNDERLINES = SPI_SETKEYBOARDCUES;
+ {$EXTERNALSYM SPI_SETMENUUNDERLINES}
+ SPI_GETACTIVEWNDTRKZORDER = $100C;
+ {$EXTERNALSYM SPI_GETACTIVEWNDTRKZORDER}
+ SPI_SETACTIVEWNDTRKZORDER = $100D;
+ {$EXTERNALSYM SPI_SETACTIVEWNDTRKZORDER}
+ SPI_GETHOTTRACKING = $100E;
+ {$EXTERNALSYM SPI_GETHOTTRACKING}
+ SPI_SETHOTTRACKING = $100F;
+ {$EXTERNALSYM SPI_SETHOTTRACKING}
+ SPI_GETMENUFADE = $1012;
+ {$EXTERNALSYM SPI_GETMENUFADE}
+ SPI_SETMENUFADE = $1013;
+ {$EXTERNALSYM SPI_SETMENUFADE}
+ SPI_GETSELECTIONFADE = $1014;
+ {$EXTERNALSYM SPI_GETSELECTIONFADE}
+ SPI_SETSELECTIONFADE = $1015;
+ {$EXTERNALSYM SPI_SETSELECTIONFADE}
+ SPI_GETTOOLTIPANIMATION = $1016;
+ {$EXTERNALSYM SPI_GETTOOLTIPANIMATION}
+ SPI_SETTOOLTIPANIMATION = $1017;
+ {$EXTERNALSYM SPI_SETTOOLTIPANIMATION}
+ SPI_GETTOOLTIPFADE = $1018;
+ {$EXTERNALSYM SPI_GETTOOLTIPFADE}
+ SPI_SETTOOLTIPFADE = $1019;
+ {$EXTERNALSYM SPI_SETTOOLTIPFADE}
+ SPI_GETCURSORSHADOW = $101A;
+ {$EXTERNALSYM SPI_GETCURSORSHADOW}
+ SPI_SETCURSORSHADOW = $101B;
+ {$EXTERNALSYM SPI_SETCURSORSHADOW}
+
+ SPI_GETMOUSESONAR = $101C;
+ {$EXTERNALSYM SPI_GETMOUSESONAR}
+ SPI_SETMOUSESONAR = $101D;
+ {$EXTERNALSYM SPI_SETMOUSESONAR}
+ SPI_GETMOUSECLICKLOCK = $101E;
+ {$EXTERNALSYM SPI_GETMOUSECLICKLOCK}
+ SPI_SETMOUSECLICKLOCK = $101F;
+ {$EXTERNALSYM SPI_SETMOUSECLICKLOCK}
+ SPI_GETMOUSEVANISH = $1020;
+ {$EXTERNALSYM SPI_GETMOUSEVANISH}
+ SPI_SETMOUSEVANISH = $1021;
+ {$EXTERNALSYM SPI_SETMOUSEVANISH}
+ SPI_GETFLATMENU = $1022;
+ {$EXTERNALSYM SPI_GETFLATMENU}
+ SPI_SETFLATMENU = $1023;
+ {$EXTERNALSYM SPI_SETFLATMENU}
+ SPI_GETDROPSHADOW = $1024;
+ {$EXTERNALSYM SPI_GETDROPSHADOW}
+ SPI_SETDROPSHADOW = $1025;
+ {$EXTERNALSYM SPI_SETDROPSHADOW}
+ SPI_GETBLOCKSENDINPUTRESETS = $1026;
+ {$EXTERNALSYM SPI_GETBLOCKSENDINPUTRESETS}
+ SPI_SETBLOCKSENDINPUTRESETS = $1027;
+ {$EXTERNALSYM SPI_SETBLOCKSENDINPUTRESETS}
+
+ SPI_GETUIEFFECTS = $103E;
+ {$EXTERNALSYM SPI_GETUIEFFECTS}
+ SPI_SETUIEFFECTS = $103F;
+ {$EXTERNALSYM SPI_SETUIEFFECTS}
+
+ SPI_GETFOREGROUNDLOCKTIMEOUT = $2000;
+ {$EXTERNALSYM SPI_GETFOREGROUNDLOCKTIMEOUT}
+ SPI_SETFOREGROUNDLOCKTIMEOUT = $2001;
+ {$EXTERNALSYM SPI_SETFOREGROUNDLOCKTIMEOUT}
+ SPI_GETACTIVEWNDTRKTIMEOUT = $2002;
+ {$EXTERNALSYM SPI_GETACTIVEWNDTRKTIMEOUT}
+ SPI_SETACTIVEWNDTRKTIMEOUT = $2003;
+ {$EXTERNALSYM SPI_SETACTIVEWNDTRKTIMEOUT}
+ SPI_GETFOREGROUNDFLASHCOUNT = $2004;
+ {$EXTERNALSYM SPI_GETFOREGROUNDFLASHCOUNT}
+ SPI_SETFOREGROUNDFLASHCOUNT = $2005;
+ {$EXTERNALSYM SPI_SETFOREGROUNDFLASHCOUNT}
+ SPI_GETCARETWIDTH = $2006;
+ {$EXTERNALSYM SPI_GETCARETWIDTH}
+ SPI_SETCARETWIDTH = $2007;
+ {$EXTERNALSYM SPI_SETCARETWIDTH}
+
+ SPI_GETMOUSECLICKLOCKTIME = $2008;
+ {$EXTERNALSYM SPI_GETMOUSECLICKLOCKTIME}
+ SPI_SETMOUSECLICKLOCKTIME = $2009;
+ {$EXTERNALSYM SPI_SETMOUSECLICKLOCKTIME}
+ SPI_GETFONTSMOOTHINGTYPE = $200A;
+ {$EXTERNALSYM SPI_GETFONTSMOOTHINGTYPE}
+ SPI_SETFONTSMOOTHINGTYPE = $200B;
+ {$EXTERNALSYM SPI_SETFONTSMOOTHINGTYPE}
+
+// constants for SPI_GETFONTSMOOTHINGTYPE and SPI_SETFONTSMOOTHINGTYPE
+
+ FE_FONTSMOOTHINGSTANDARD = $0001;
+ {$EXTERNALSYM FE_FONTSMOOTHINGSTANDARD}
+ FE_FONTSMOOTHINGCLEARTYPE = $0002;
+ {$EXTERNALSYM FE_FONTSMOOTHINGCLEARTYPE}
+ FE_FONTSMOOTHINGDOCKING = $8000;
+ {$EXTERNALSYM FE_FONTSMOOTHINGDOCKING}
+
+ SPI_GETFONTSMOOTHINGCONTRAST = $200C;
+ {$EXTERNALSYM SPI_GETFONTSMOOTHINGCONTRAST}
+ SPI_SETFONTSMOOTHINGCONTRAST = $200D;
+ {$EXTERNALSYM SPI_SETFONTSMOOTHINGCONTRAST}
+
+ SPI_GETFOCUSBORDERWIDTH = $200E;
+ {$EXTERNALSYM SPI_GETFOCUSBORDERWIDTH}
+ SPI_SETFOCUSBORDERWIDTH = $200F;
+ {$EXTERNALSYM SPI_SETFOCUSBORDERWIDTH}
+ SPI_GETFOCUSBORDERHEIGHT = $2010;
+ {$EXTERNALSYM SPI_GETFOCUSBORDERHEIGHT}
+ SPI_SETFOCUSBORDERHEIGHT = $2011;
+ {$EXTERNALSYM SPI_SETFOCUSBORDERHEIGHT}
+
+ SPI_GETFONTSMOOTHINGORIENTATION = $2012;
+ {$EXTERNALSYM SPI_GETFONTSMOOTHINGORIENTATION}
+ SPI_SETFONTSMOOTHINGORIENTATION = $2013;
+ {$EXTERNALSYM SPI_SETFONTSMOOTHINGORIENTATION}
+
+// constants for SPI_GETFONTSMOOTHINGORIENTATION and SPI_SETFONTSMOOTHINGORIENTATION:
+
+ FE_FONTSMOOTHINGORIENTATIONBGR = $0000;
+ {$EXTERNALSYM FE_FONTSMOOTHINGORIENTATIONBGR}
+ FE_FONTSMOOTHINGORIENTATIONRGB = $0001;
+ {$EXTERNALSYM FE_FONTSMOOTHINGORIENTATIONRGB}
+
+//
+// Flags
+//
+
+ SPIF_UPDATEINIFILE = $0001;
+ {$EXTERNALSYM SPIF_UPDATEINIFILE}
+ SPIF_SENDWININICHANGE = $0002;
+ {$EXTERNALSYM SPIF_SENDWININICHANGE}
+ SPIF_SENDCHANGE = SPIF_SENDWININICHANGE;
+ {$EXTERNALSYM SPIF_SENDCHANGE}
+
+ METRICS_USEDEFAULT = DWORD(-1);
+ {$EXTERNALSYM METRICS_USEDEFAULT}
+
+type
+ LPNONCLIENTMETRICSA = ^NONCLIENTMETRICSA;
+ {$EXTERNALSYM LPNONCLIENTMETRICSA}
+ tagNONCLIENTMETRICSA = record
+ cbSize: UINT;
+ iBorderWidth: Integer;
+ iScrollWidth: Integer;
+ iScrollHeight: Integer;
+ iCaptionWidth: Integer;
+ iCaptionHeight: Integer;
+ lfCaptionFont: LOGFONTA;
+ iSmCaptionWidth: Integer;
+ iSmCaptionHeight: Integer;
+ lfSmCaptionFont: LOGFONTA;
+ iMenuWidth: Integer;
+ iMenuHeight: Integer;
+ lfMenuFont: LOGFONTA;
+ lfStatusFont: LOGFONTA;
+ lfMessageFont: LOGFONTA;
+ end;
+ {$EXTERNALSYM tagNONCLIENTMETRICSA}
+ NONCLIENTMETRICSA = tagNONCLIENTMETRICSA;
+ {$EXTERNALSYM NONCLIENTMETRICSA}
+ TNonClientMetricsA = NONCLIENTMETRICSA;
+ PNonClientMetricsA = LPNONCLIENTMETRICSA;
+
+ LPNONCLIENTMETRICSW = ^NONCLIENTMETRICSW;
+ {$EXTERNALSYM LPNONCLIENTMETRICSW}
+ tagNONCLIENTMETRICSW = record
+ cbSize: UINT;
+ iBorderWidth: Integer;
+ iScrollWidth: Integer;
+ iScrollHeight: Integer;
+ iCaptionWidth: Integer;
+ iCaptionHeight: Integer;
+ lfCaptionFont: LOGFONTW;
+ iSmCaptionWidth: Integer;
+ iSmCaptionHeight: Integer;
+ lfSmCaptionFont: LOGFONTW;
+ iMenuWidth: Integer;
+ iMenuHeight: Integer;
+ lfMenuFont: LOGFONTW;
+ lfStatusFont: LOGFONTW;
+ lfMessageFont: LOGFONTW;
+ end;
+ {$EXTERNALSYM tagNONCLIENTMETRICSW}
+ NONCLIENTMETRICSW = tagNONCLIENTMETRICSW;
+ {$EXTERNALSYM NONCLIENTMETRICSW}
+ TNonClientMetricsW = NONCLIENTMETRICSW;
+ PNonClientMetricsW = LPNONCLIENTMETRICSW;
+
+ {$IFDEF UNICODE}
+ NONCLIENTMETRICS = NONCLIENTMETRICSW;
+ {$EXTERNALSYM NONCLIENTMETRICS}
+ LPNONCLIENTMETRICS = LPNONCLIENTMETRICSW;
+ {$EXTERNALSYM LPNONCLIENTMETRICS}
+ TNonClientMetrics = TNonClientMetricsW;
+ PNonClientMetrics = PNonClientMetricsW;
+ {$ELSE}
+ NONCLIENTMETRICS = NONCLIENTMETRICSA;
+ {$EXTERNALSYM NONCLIENTMETRICS}
+ LPNONCLIENTMETRICS = LPNONCLIENTMETRICSA;
+ {$EXTERNALSYM LPNONCLIENTMETRICS}
+ TNonClientMetrics = TNonClientMetricsA;
+ PNonClientMetrics = PNonClientMetricsA;
+ {$ENDIF UNICODE}
+
+const
+ ARW_BOTTOMLEFT = $0000;
+ {$EXTERNALSYM ARW_BOTTOMLEFT}
+ ARW_BOTTOMRIGHT = $0001;
+ {$EXTERNALSYM ARW_BOTTOMRIGHT}
+ ARW_TOPLEFT = $0002;
+ {$EXTERNALSYM ARW_TOPLEFT}
+ ARW_TOPRIGHT = $0003;
+ {$EXTERNALSYM ARW_TOPRIGHT}
+ ARW_STARTMASK = $0003;
+ {$EXTERNALSYM ARW_STARTMASK}
+ ARW_STARTRIGHT = $0001;
+ {$EXTERNALSYM ARW_STARTRIGHT}
+ ARW_STARTTOP = $0002;
+ {$EXTERNALSYM ARW_STARTTOP}
+
+ ARW_LEFT = $0000;
+ {$EXTERNALSYM ARW_LEFT}
+ ARW_RIGHT = $0000;
+ {$EXTERNALSYM ARW_RIGHT}
+ ARW_UP = $0004;
+ {$EXTERNALSYM ARW_UP}
+ ARW_DOWN = $0004;
+ {$EXTERNALSYM ARW_DOWN}
+ ARW_HIDE = $0008;
+ {$EXTERNALSYM ARW_HIDE}
+
+type
+ LPMINIMIZEDMETRICS = ^MINIMIZEDMETRICS;
+ {$EXTERNALSYM LPMINIMIZEDMETRICS}
+ tagMINIMIZEDMETRICS = record
+ cbSize: UINT;
+ iWidth: Integer;
+ iHorzGap: Integer;
+ iVertGap: Integer;
+ iArrange: Integer;
+ end;
+ {$EXTERNALSYM tagMINIMIZEDMETRICS}
+ MINIMIZEDMETRICS = tagMINIMIZEDMETRICS;
+ {$EXTERNALSYM MINIMIZEDMETRICS}
+ TMinimizedMetrics = MINIMIZEDMETRICS;
+ PMinimizedMetrics = LPMINIMIZEDMETRICS;
+
+ LPICONMETRICSA = ^ICONMETRICSA;
+ {$EXTERNALSYM LPICONMETRICSA}
+ tagICONMETRICSA = record
+ cbSize: UINT;
+ iHorzSpacing: Integer;
+ iVertSpacing: Integer;
+ iTitleWrap: Integer;
+ lfFont: LOGFONTA;
+ end;
+ {$EXTERNALSYM tagICONMETRICSA}
+ ICONMETRICSA = tagICONMETRICSA;
+ {$EXTERNALSYM ICONMETRICSA}
+ TIconMetricsA = ICONMETRICSA;
+ PIconMetricsA = LPICONMETRICSA;
+
+ LPICONMETRICSW = ^ICONMETRICSW;
+ {$EXTERNALSYM LPICONMETRICSW}
+ tagICONMETRICSW = record
+ cbSize: UINT;
+ iHorzSpacing: Integer;
+ iVertSpacing: Integer;
+ iTitleWrap: Integer;
+ lfFont: LOGFONTW;
+ end;
+ {$EXTERNALSYM tagICONMETRICSW}
+ ICONMETRICSW = tagICONMETRICSW;
+ {$EXTERNALSYM ICONMETRICSW}
+ TIconMetricsW = ICONMETRICSW;
+ PIconMetricsW = LPICONMETRICSW;
+
+ {$IFDEF UNICODE}
+ ICONMETRICS = ICONMETRICSW;
+ {$EXTERNALSYM ICONMETRICS}
+ LPICONMETRICS = LPICONMETRICSW;
+ {$EXTERNALSYM LPICONMETRICS}
+ TIconMetrics = TIconMetricsW;
+ PIconMetrics = PIconMetricsW;
+ {$ELSE}
+ ICONMETRICS = ICONMETRICSA;
+ {$EXTERNALSYM ICONMETRICS}
+ LPICONMETRICS = LPICONMETRICSA;
+ {$EXTERNALSYM LPICONMETRICS}
+ TIconMetrics = TIconMetricsA;
+ PIconMetrics = PIconMetricsA;
+ {$ENDIF UNICODE}
+
+ LPANIMATIONINFO = ^ANIMATIONINFO;
+ {$EXTERNALSYM LPANIMATIONINFO}
+ tagANIMATIONINFO = record
+ cbSize: UINT;
+ iMinAnimate: Integer;
+ end;
+ {$EXTERNALSYM tagANIMATIONINFO}
+ ANIMATIONINFO = tagANIMATIONINFO;
+ {$EXTERNALSYM ANIMATIONINFO}
+ TAnimationInfo = ANIMATIONINFO;
+ PAnimationInfo = LPANIMATIONINFO;
+
+ LPSERIALKEYSA = ^SERIALKEYSA;
+ {$EXTERNALSYM LPSERIALKEYSA}
+ tagSERIALKEYSA = record
+ cbSize: UINT;
+ dwFlags: DWORD;
+ lpszActivePort: LPSTR;
+ lpszPort: LPSTR;
+ iBaudRate: UINT;
+ iPortState: UINT;
+ iActive: UINT;
+ end;
+ {$EXTERNALSYM tagSERIALKEYSA}
+ SERIALKEYSA = tagSERIALKEYSA;
+ {$EXTERNALSYM SERIALKEYSA}
+ TSerialKeysA = SERIALKEYSA;
+ PSerialKeysA = LPSERIALKEYSA;
+
+ LPSERIALKEYSW = ^SERIALKEYSW;
+ {$EXTERNALSYM LPSERIALKEYSW}
+ tagSERIALKEYSW = record
+ cbSize: UINT;
+ dwFlags: DWORD;
+ lpszActivePort: LPWSTR;
+ lpszPort: LPWSTR;
+ iBaudRate: UINT;
+ iPortState: UINT;
+ iActive: UINT;
+ end;
+ {$EXTERNALSYM tagSERIALKEYSW}
+ SERIALKEYSW = tagSERIALKEYSW;
+ {$EXTERNALSYM SERIALKEYSW}
+ TSerialKeysW = SERIALKEYSW;
+ PSerialKeysW = LPSERIALKEYSW;
+
+ {$IFDEF UNICODE}
+ SERIALKEYS = SERIALKEYSW;
+ {$EXTERNALSYM SERIALKEYS}
+ LPSERIALKEYS = LPSERIALKEYSW;
+ {$EXTERNALSYM LPSERIALKEYS}
+ TSerialKeys = TSerialKeysW;
+ PSerialKeys = PSerialKeysW;
+ {$ELSE}
+ SERIALKEYS = SERIALKEYSA;
+ {$EXTERNALSYM SERIALKEYS}
+ LPSERIALKEYS = LPSERIALKEYSA;
+ {$EXTERNALSYM LPSERIALKEYS}
+ TSerialKeys = TSerialKeysA;
+ PSerialKeys = PSerialKeysA;
+ {$ENDIF UNICODE}
+
+// flags for SERIALKEYS dwFlags field//
+
+const
+ SERKF_SERIALKEYSON = $00000001;
+ {$EXTERNALSYM SERKF_SERIALKEYSON}
+ SERKF_AVAILABLE = $00000002;
+ {$EXTERNALSYM SERKF_AVAILABLE}
+ SERKF_INDICATOR = $00000004;
+ {$EXTERNALSYM SERKF_INDICATOR}
+
+type
+ LPHIGHCONTRASTA = ^HIGHCONTRASTA;
+ {$EXTERNALSYM LPHIGHCONTRASTA}
+ tagHIGHCONTRASTA = record
+ cbSize: UINT;
+ dwFlags: DWORD;
+ lpszDefaultScheme: LPSTR;
+ end;
+ {$EXTERNALSYM tagHIGHCONTRASTA}
+ HIGHCONTRASTA = tagHIGHCONTRASTA;
+ {$EXTERNALSYM HIGHCONTRASTA}
+ THighContrastA = HIGHCONTRASTA;
+ PHighContrastA = LPHIGHCONTRASTA;
+
+ LPHIGHCONTRASTW = ^HIGHCONTRASTW;
+ {$EXTERNALSYM LPHIGHCONTRASTW}
+ tagHIGHCONTRASTW = record
+ cbSize: UINT;
+ dwFlags: DWORD;
+ lpszDefaultScheme: LPWSTR;
+ end;
+ {$EXTERNALSYM tagHIGHCONTRASTW}
+ HIGHCONTRASTW = tagHIGHCONTRASTW;
+ {$EXTERNALSYM HIGHCONTRASTW}
+ THighContrastW = HIGHCONTRASTW;
+ PHighContrastW = LPHIGHCONTRASTW;
+
+ {$IFDEF UNICODE}
+ HIGHCONTRAST = HIGHCONTRASTW;
+ {$EXTERNALSYM HIGHCONTRAST}
+ LPHIGHCONTRAST = LPHIGHCONTRASTW;
+ {$EXTERNALSYM LPHIGHCONTRAST}
+ THighContrast = THighContrastW;
+ PHighContrast = PHighContrastW;
+ {$ELSE}
+ HIGHCONTRAST = HIGHCONTRASTA;
+ {$EXTERNALSYM HIGHCONTRAST}
+ LPHIGHCONTRAST = LPHIGHCONTRASTA;
+ {$EXTERNALSYM LPHIGHCONTRAST}
+ THighContrast = THighContrastA;
+ PHighContrast = PHighContrastA;
+ {$ENDIF UNICODE}
+
+// flags for HIGHCONTRAST dwFlags field//
+
+const
+ HCF_HIGHCONTRASTON = $00000001;
+ {$EXTERNALSYM HCF_HIGHCONTRASTON}
+ HCF_AVAILABLE = $00000002;
+ {$EXTERNALSYM HCF_AVAILABLE}
+ HCF_HOTKEYACTIVE = $00000004;
+ {$EXTERNALSYM HCF_HOTKEYACTIVE}
+ HCF_CONFIRMHOTKEY = $00000008;
+ {$EXTERNALSYM HCF_CONFIRMHOTKEY}
+ HCF_HOTKEYSOUND = $00000010;
+ {$EXTERNALSYM HCF_HOTKEYSOUND}
+ HCF_INDICATOR = $00000020;
+ {$EXTERNALSYM HCF_INDICATOR}
+ HCF_HOTKEYAVAILABLE = $00000040;
+ {$EXTERNALSYM HCF_HOTKEYAVAILABLE}
+
+// Flags for ChangeDisplaySettings//
+
+ CDS_UPDATEREGISTRY = $00000001;
+ {$EXTERNALSYM CDS_UPDATEREGISTRY}
+ CDS_TEST = $00000002;
+ {$EXTERNALSYM CDS_TEST}
+ CDS_FULLSCREEN = $00000004;
+ {$EXTERNALSYM CDS_FULLSCREEN}
+ CDS_GLOBAL = $00000008;
+ {$EXTERNALSYM CDS_GLOBAL}
+ CDS_SET_PRIMARY = $00000010;
+ {$EXTERNALSYM CDS_SET_PRIMARY}
+ CDS_VIDEOPARAMETERS = $00000020;
+ {$EXTERNALSYM CDS_VIDEOPARAMETERS}
+ CDS_RESET = $40000000;
+ {$EXTERNALSYM CDS_RESET}
+ CDS_NORESET = $10000000;
+ {$EXTERNALSYM CDS_NORESET}
+
+// #include <tvout.h>
+
+// Return values for ChangeDisplaySettings
+
+ DISP_CHANGE_SUCCESSFUL = 0;
+ {$EXTERNALSYM DISP_CHANGE_SUCCESSFUL}
+ DISP_CHANGE_RESTART = 1;
+ {$EXTERNALSYM DISP_CHANGE_RESTART}
+ DISP_CHANGE_FAILED = DWORD(-1);
+ {$EXTERNALSYM DISP_CHANGE_FAILED}
+ DISP_CHANGE_BADMODE = DWORD(-2);
+ {$EXTERNALSYM DISP_CHANGE_BADMODE}
+ DISP_CHANGE_NOTUPDATED = DWORD(-3);
+ {$EXTERNALSYM DISP_CHANGE_NOTUPDATED}
+ DISP_CHANGE_BADFLAGS = DWORD(-4);
+ {$EXTERNALSYM DISP_CHANGE_BADFLAGS}
+ DISP_CHANGE_BADPARAM = DWORD(-5);
+ {$EXTERNALSYM DISP_CHANGE_BADPARAM}
+ DISP_CHANGE_BADDUALVIEW = DWORD(-6);
+ {$EXTERNALSYM DISP_CHANGE_BADDUALVIEW}
+
+function ChangeDisplaySettingsA(lpDevMode: LPDEVMODEA; dwFlags: DWORD): LONG; stdcall;
+{$EXTERNALSYM ChangeDisplaySettingsA}
+function ChangeDisplaySettingsW(lpDevMode: LPDEVMODEW; dwFlags: DWORD): LONG; stdcall;
+{$EXTERNALSYM ChangeDisplaySettingsW}
+function ChangeDisplaySettings(lpDevMode: LPDEVMODE; dwFlags: DWORD): LONG; stdcall;
+{$EXTERNALSYM ChangeDisplaySettings}
+
+function ChangeDisplaySettingsExA(lpszDeviceName: LPCSTR; lpDevMode: LPDEVMODEA;
+ hwnd: HWND; dwflags: DWORD; lParam: LPVOID): LONG; stdcall;
+{$EXTERNALSYM ChangeDisplaySettingsExA}
+function ChangeDisplaySettingsExW(lpszDeviceName: LPCWSTR; lpDevMode: LPDEVMODEW;
+ hwnd: HWND; dwflags: DWORD; lParam: LPVOID): LONG; stdcall;
+{$EXTERNALSYM ChangeDisplaySettingsExW}
+function ChangeDisplaySettingsEx(lpszDeviceName: LPCTSTR; lpDevMode: LPDEVMODE;
+ hwnd: HWND; dwflags: DWORD; lParam: LPVOID): LONG; stdcall;
+{$EXTERNALSYM ChangeDisplaySettingsEx}
+
+const
+ ENUM_CURRENT_SETTINGS = DWORD(-1);
+ {$EXTERNALSYM ENUM_CURRENT_SETTINGS}
+ ENUM_REGISTRY_SETTINGS = DWORD(-2);
+ {$EXTERNALSYM ENUM_REGISTRY_SETTINGS}
+
+function EnumDisplaySettingsA(lpszDeviceName: LPCSTR; iModeNum: DWORD;
+ var lpDevMode: DEVMODEA): BOOL; stdcall;
+{$EXTERNALSYM EnumDisplaySettingsA}
+function EnumDisplaySettingsW(lpszDeviceName: LPCWSTR; iModeNum: DWORD;
+ var lpDevMode: DEVMODEW): BOOL; stdcall;
+{$EXTERNALSYM EnumDisplaySettingsW}
+function EnumDisplaySettings(lpszDeviceName: LPCTSTR; iModeNum: DWORD;
+ var lpDevMode: DEVMODE): BOOL; stdcall;
+{$EXTERNALSYM EnumDisplaySettings}
+
+function EnumDisplaySettingsExA(lpszDeviceName: LPCSTR; iModeNum: DWORD;
+ var lpDevMode: DEVMODEA; dwFlags: DWORD): BOOL; stdcall;
+{$EXTERNALSYM EnumDisplaySettingsExA}
+function EnumDisplaySettingsExW(lpszDeviceName: LPCWSTR; iModeNum: DWORD;
+ var lpDevMode: DEVMODEW; dwFlags: DWORD): BOOL; stdcall;
+{$EXTERNALSYM EnumDisplaySettingsExW}
+function EnumDisplaySettingsEx(lpszDeviceName: LPCTSTR; iModeNum: DWORD;
+ var lpDevMode: DEVMODE; dwFlags: DWORD): BOOL; stdcall;
+{$EXTERNALSYM EnumDisplaySettingsEx}
+
+// Flags for EnumDisplaySettingsEx//
+
+const
+ EDS_RAWMODE = $00000002;
+ {$EXTERNALSYM EDS_RAWMODE}
+
+function EnumDisplayDevicesA(lpDevice: LPCSTR; iDevNum: DWORD;
+ var lpDisplayDevice: DISPLAY_DEVICEA; dwFlags: DWORD): BOOL; stdcall;
+{$EXTERNALSYM EnumDisplayDevicesA}
+function EnumDisplayDevicesW(lpDevice: LPCWSTR; iDevNum: DWORD;
+ var lpDisplayDevice: DISPLAY_DEVICEW; dwFlags: DWORD): BOOL; stdcall;
+{$EXTERNALSYM EnumDisplayDevicesW}
+function EnumDisplayDevices(lpDevice: LPCTSTR; iDevNum: DWORD;
+ var lpDisplayDevice: DISPLAY_DEVICE; dwFlags: DWORD): BOOL; stdcall;
+{$EXTERNALSYM EnumDisplayDevices}
+
+function SystemParametersInfoA(uiAction: UINT; uiParam: UINT;
+ pvParam: PVOID; fWinIni: UINT): BOOL; stdcall;
+{$EXTERNALSYM SystemParametersInfoA}
+function SystemParametersInfoW(uiAction: UINT; uiParam: UINT;
+ pvParam: PVOID; fWinIni: UINT): BOOL; stdcall;
+{$EXTERNALSYM SystemParametersInfoW}
+function SystemParametersInfo(uiAction: UINT; uiParam: UINT;
+ pvParam: PVOID; fWinIni: UINT): BOOL; stdcall;
+{$EXTERNALSYM SystemParametersInfo}
+
+//
+// Accessibility support
+//
+
+type
+ LPFILTERKEYS = ^FILTERKEYS;
+ {$EXTERNALSYM LPFILTERKEYS}
+ tagFILTERKEYS = record
+ cbSize: UINT;
+ dwFlags: DWORD;
+ iWaitMSec: DWORD; // Acceptance Delay
+ iDelayMSec: DWORD; // Delay Until Repeat
+ iRepeatMSec: DWORD; // Repeat Rate
+ iBounceMSec: DWORD; // Debounce Time
+ end;
+ {$EXTERNALSYM tagFILTERKEYS}
+ FILTERKEYS = tagFILTERKEYS;
+ {$EXTERNALSYM FILTERKEYS}
+ TFilterKeys = FILTERKEYS;
+ PFilterKeys = LPFILTERKEYS;
+
+//
+// FILTERKEYS dwFlags field
+//
+
+const
+ FKF_FILTERKEYSON = $00000001;
+ {$EXTERNALSYM FKF_FILTERKEYSON}
+ FKF_AVAILABLE = $00000002;
+ {$EXTERNALSYM FKF_AVAILABLE}
+ FKF_HOTKEYACTIVE = $00000004;
+ {$EXTERNALSYM FKF_HOTKEYACTIVE}
+ FKF_CONFIRMHOTKEY = $00000008;
+ {$EXTERNALSYM FKF_CONFIRMHOTKEY}
+ FKF_HOTKEYSOUND = $00000010;
+ {$EXTERNALSYM FKF_HOTKEYSOUND}
+ FKF_INDICATOR = $00000020;
+ {$EXTERNALSYM FKF_INDICATOR}
+ FKF_CLICKON = $00000040;
+ {$EXTERNALSYM FKF_CLICKON}
+
+type
+ LPSTICKYKEYS = ^STICKYKEYS;
+ {$EXTERNALSYM LPSTICKYKEYS}
+ tagSTICKYKEYS = record
+ cbSize: UINT;
+ dwFlags: DWORD;
+ end;
+ {$EXTERNALSYM tagSTICKYKEYS}
+ STICKYKEYS = tagSTICKYKEYS;
+ {$EXTERNALSYM STICKYKEYS}
+ TStickyKeys = STICKYKEYS;
+ PStickyKeys = LPSTICKYKEYS;
+
+//
+// STICKYKEYS dwFlags field
+//
+
+const
+ SKF_STICKYKEYSON = $00000001;
+ {$EXTERNALSYM SKF_STICKYKEYSON}
+ SKF_AVAILABLE = $00000002;
+ {$EXTERNALSYM SKF_AVAILABLE}
+ SKF_HOTKEYACTIVE = $00000004;
+ {$EXTERNALSYM SKF_HOTKEYACTIVE}
+ SKF_CONFIRMHOTKEY = $00000008;
+ {$EXTERNALSYM SKF_CONFIRMHOTKEY}
+ SKF_HOTKEYSOUND = $00000010;
+ {$EXTERNALSYM SKF_HOTKEYSOUND}
+ SKF_INDICATOR = $00000020;
+ {$EXTERNALSYM SKF_INDICATOR}
+ SKF_AUDIBLEFEEDBACK = $00000040;
+ {$EXTERNALSYM SKF_AUDIBLEFEEDBACK}
+ SKF_TRISTATE = $00000080;
+ {$EXTERNALSYM SKF_TRISTATE}
+ SKF_TWOKEYSOFF = $00000100;
+ {$EXTERNALSYM SKF_TWOKEYSOFF}
+ SKF_LALTLATCHED = $10000000;
+ {$EXTERNALSYM SKF_LALTLATCHED}
+ SKF_LCTLLATCHED = $04000000;
+ {$EXTERNALSYM SKF_LCTLLATCHED}
+ SKF_LSHIFTLATCHED = $01000000;
+ {$EXTERNALSYM SKF_LSHIFTLATCHED}
+ SKF_RALTLATCHED = $20000000;
+ {$EXTERNALSYM SKF_RALTLATCHED}
+ SKF_RCTLLATCHED = $08000000;
+ {$EXTERNALSYM SKF_RCTLLATCHED}
+ SKF_RSHIFTLATCHED = $02000000;
+ {$EXTERNALSYM SKF_RSHIFTLATCHED}
+ SKF_LWINLATCHED = $40000000;
+ {$EXTERNALSYM SKF_LWINLATCHED}
+ SKF_RWINLATCHED = $80000000;
+ {$EXTERNALSYM SKF_RWINLATCHED}
+ SKF_LALTLOCKED = $00100000;
+ {$EXTERNALSYM SKF_LALTLOCKED}
+ SKF_LCTLLOCKED = $00040000;
+ {$EXTERNALSYM SKF_LCTLLOCKED}
+ SKF_LSHIFTLOCKED = $00010000;
+ {$EXTERNALSYM SKF_LSHIFTLOCKED}
+ SKF_RALTLOCKED = $00200000;
+ {$EXTERNALSYM SKF_RALTLOCKED}
+ SKF_RCTLLOCKED = $00080000;
+ {$EXTERNALSYM SKF_RCTLLOCKED}
+ SKF_RSHIFTLOCKED = $00020000;
+ {$EXTERNALSYM SKF_RSHIFTLOCKED}
+ SKF_LWINLOCKED = $00400000;
+ {$EXTERNALSYM SKF_LWINLOCKED}
+ SKF_RWINLOCKED = $00800000;
+ {$EXTERNALSYM SKF_RWINLOCKED}
+
+type
+ LPMOUSEKEYS = ^MOUSEKEYS;
+ {$EXTERNALSYM LPMOUSEKEYS}
+ tagMOUSEKEYS = record
+ cbSize: UINT;
+ dwFlags: DWORD;
+ iMaxSpeed: DWORD;
+ iTimeToMaxSpeed: DWORD;
+ iCtrlSpeed: DWORD;
+ dwReserved1: DWORD;
+ dwReserved2: DWORD;
+ end;
+ {$EXTERNALSYM tagMOUSEKEYS}
+ MOUSEKEYS = tagMOUSEKEYS;
+ {$EXTERNALSYM MOUSEKEYS}
+ TMouseKeys = MOUSEKEYS;
+ PMouseKeys = LPMOUSEKEYS;
+
+//
+// MOUSEKEYS dwFlags field
+//
+
+const
+ MKF_MOUSEKEYSON = $00000001;
+ {$EXTERNALSYM MKF_MOUSEKEYSON}
+ MKF_AVAILABLE = $00000002;
+ {$EXTERNALSYM MKF_AVAILABLE}
+ MKF_HOTKEYACTIVE = $00000004;
+ {$EXTERNALSYM MKF_HOTKEYACTIVE}
+ MKF_CONFIRMHOTKEY = $00000008;
+ {$EXTERNALSYM MKF_CONFIRMHOTKEY}
+ MKF_HOTKEYSOUND = $00000010;
+ {$EXTERNALSYM MKF_HOTKEYSOUND}
+ MKF_INDICATOR = $00000020;
+ {$EXTERNALSYM MKF_INDICATOR}
+ MKF_MODIFIERS = $00000040;
+ {$EXTERNALSYM MKF_MODIFIERS}
+ MKF_REPLACENUMBERS = $00000080;
+ {$EXTERNALSYM MKF_REPLACENUMBERS}
+ MKF_LEFTBUTTONSEL = $10000000;
+ {$EXTERNALSYM MKF_LEFTBUTTONSEL}
+ MKF_RIGHTBUTTONSEL = $20000000;
+ {$EXTERNALSYM MKF_RIGHTBUTTONSEL}
+ MKF_LEFTBUTTONDOWN = $01000000;
+ {$EXTERNALSYM MKF_LEFTBUTTONDOWN}
+ MKF_RIGHTBUTTONDOWN = $02000000;
+ {$EXTERNALSYM MKF_RIGHTBUTTONDOWN}
+ MKF_MOUSEMODE = $80000000;
+ {$EXTERNALSYM MKF_MOUSEMODE}
+
+type
+ LPACCESSTIMEOUT = ^ACCESSTIMEOUT;
+ {$EXTERNALSYM LPACCESSTIMEOUT}
+ tagACCESSTIMEOUT = record
+ cbSize: UINT;
+ dwFlags: DWORD;
+ iTimeOutMSec: DWORD;
+ end;
+ {$EXTERNALSYM tagACCESSTIMEOUT}
+ ACCESSTIMEOUT = tagACCESSTIMEOUT;
+ {$EXTERNALSYM ACCESSTIMEOUT}
+ TAccessTimeout = ACCESSTIMEOUT;
+ PAccessTimeout = LPACCESSTIMEOUT;
+
+//
+// ACCESSTIMEOUT dwFlags field
+//
+
+const
+ ATF_TIMEOUTON = $00000001;
+ {$EXTERNALSYM ATF_TIMEOUTON}
+ ATF_ONOFFFEEDBACK = $00000002;
+ {$EXTERNALSYM ATF_ONOFFFEEDBACK}
+
+// values for SOUNDSENTRY iFSGrafEffect field//
+
+ SSGF_NONE = 0;
+ {$EXTERNALSYM SSGF_NONE}
+ SSGF_DISPLAY = 3;
+ {$EXTERNALSYM SSGF_DISPLAY}
+
+// values for SOUNDSENTRY iFSTextEffect field//
+
+ SSTF_NONE = 0;
+ {$EXTERNALSYM SSTF_NONE}
+ SSTF_CHARS = 1;
+ {$EXTERNALSYM SSTF_CHARS}
+ SSTF_BORDER = 2;
+ {$EXTERNALSYM SSTF_BORDER}
+ SSTF_DISPLAY = 3;
+ {$EXTERNALSYM SSTF_DISPLAY}
+
+// values for SOUNDSENTRY iWindowsEffect field//
+
+ SSWF_NONE = 0;
+ {$EXTERNALSYM SSWF_NONE}
+ SSWF_TITLE = 1;
+ {$EXTERNALSYM SSWF_TITLE}
+ SSWF_WINDOW = 2;
+ {$EXTERNALSYM SSWF_WINDOW}
+ SSWF_DISPLAY = 3;
+ {$EXTERNALSYM SSWF_DISPLAY}
+ SSWF_CUSTOM = 4;
+ {$EXTERNALSYM SSWF_CUSTOM}
+
+type
+ LPSOUNDSENTRYA = ^SOUNDSENTRYA;
+ {$EXTERNALSYM LPSOUNDSENTRYA}
+ tagSOUNDSENTRYA = record
+ cbSize: UINT;
+ dwFlags: DWORD;
+ iFSTextEffect: DWORD;
+ iFSTextEffectMSec: DWORD;
+ iFSTextEffectColorBits: DWORD;
+ iFSGrafEffect: DWORD;
+ iFSGrafEffectMSec: DWORD;
+ iFSGrafEffectColor: DWORD;
+ iWindowsEffect: DWORD;
+ iWindowsEffectMSec: DWORD;
+ lpszWindowsEffectDLL: LPSTR;
+ iWindowsEffectOrdinal: DWORD;
+ end;
+ {$EXTERNALSYM tagSOUNDSENTRYA}
+ SOUNDSENTRYA = tagSOUNDSENTRYA;
+ {$EXTERNALSYM SOUNDSENTRYA}
+ TSoundsEntryA = SOUNDSENTRYA;
+ PSoundsEntryA = LPSOUNDSENTRYA;
+
+ LPSOUNDSENTRYW = ^SOUNDSENTRYW;
+ {$EXTERNALSYM LPSOUNDSENTRYW}
+ tagSOUNDSENTRYW = record
+ cbSize: UINT;
+ dwFlags: DWORD;
+ iFSTextEffect: DWORD;
+ iFSTextEffectMSec: DWORD;
+ iFSTextEffectColorBits: DWORD;
+ iFSGrafEffect: DWORD;
+ iFSGrafEffectMSec: DWORD;
+ iFSGrafEffectColor: DWORD;
+ iWindowsEffect: DWORD;
+ iWindowsEffectMSec: DWORD;
+ lpszWindowsEffectDLL: LPWSTR;
+ iWindowsEffectOrdinal: DWORD;
+ end;
+ {$EXTERNALSYM tagSOUNDSENTRYW}
+ SOUNDSENTRYW = tagSOUNDSENTRYW;
+ {$EXTERNALSYM SOUNDSENTRYW}
+ TSoundsEntryW = SOUNDSENTRYW;
+ PSoundsEntryW = LPSOUNDSENTRYW;
+
+ {$IFDEF UNICODE}
+ SOUNDSENTRY = SOUNDSENTRYW;
+ {$EXTERNALSYM SOUNDSENTRY}
+ LPSOUNDSENTRY = LPSOUNDSENTRYW;
+ {$EXTERNALSYM LPSOUNDSENTRY}
+ TSoundsEntry = TSoundsEntryW;
+ PSoundsEntry = PSoundsEntryW;
+ {$ELSE}
+ SOUNDSENTRY = SOUNDSENTRYA;
+ {$EXTERNALSYM SOUNDSENTRY}
+ LPSOUNDSENTRY = LPSOUNDSENTRYA;
+ {$EXTERNALSYM LPSOUNDSENTRY}
+ TSoundsEntry = TSoundsEntryA;
+ PSoundsEntry = PSoundsEntryA;
+ {$ENDIF UNICODE}
+
+//
+// SOUNDSENTRY dwFlags field
+//
+
+const
+ SSF_SOUNDSENTRYON = $00000001;
+ {$EXTERNALSYM SSF_SOUNDSENTRYON}
+ SSF_AVAILABLE = $00000002;
+ {$EXTERNALSYM SSF_AVAILABLE}
+ SSF_INDICATOR = $00000004;
+ {$EXTERNALSYM SSF_INDICATOR}
+
+type
+ LPTOGGLEKEYS = ^TOGGLEKEYS;
+ {$EXTERNALSYM LPTOGGLEKEYS}
+ tagTOGGLEKEYS = record
+ cbSize: UINT;
+ dwFlags: DWORD;
+ end;
+ {$EXTERNALSYM tagTOGGLEKEYS}
+ TOGGLEKEYS = tagTOGGLEKEYS;
+ {$EXTERNALSYM TOGGLEKEYS}
+ TToggleKeys = TOGGLEKEYS;
+ PToggleKeys = LPTOGGLEKEYS;
+
+//
+// TOGGLEKEYS dwFlags field
+//
+
+const
+ TKF_TOGGLEKEYSON = $00000001;
+ {$EXTERNALSYM TKF_TOGGLEKEYSON}
+ TKF_AVAILABLE = $00000002;
+ {$EXTERNALSYM TKF_AVAILABLE}
+ TKF_HOTKEYACTIVE = $00000004;
+ {$EXTERNALSYM TKF_HOTKEYACTIVE}
+ TKF_CONFIRMHOTKEY = $00000008;
+ {$EXTERNALSYM TKF_CONFIRMHOTKEY}
+ TKF_HOTKEYSOUND = $00000010;
+ {$EXTERNALSYM TKF_HOTKEYSOUND}
+ TKF_INDICATOR = $00000020;
+ {$EXTERNALSYM TKF_INDICATOR}
+
+//
+// Set debug level
+//
+
+procedure SetDebugErrorLevel(dwLevel: DWORD); stdcall;
+{$EXTERNALSYM SetDebugErrorLevel}
+
+//
+// SetLastErrorEx() types.
+//
+
+const
+ SLE_ERROR = $00000001;
+ {$EXTERNALSYM SLE_ERROR}
+ SLE_MINORERROR = $00000002;
+ {$EXTERNALSYM SLE_MINORERROR}
+ SLE_WARNING = $00000003;
+ {$EXTERNALSYM SLE_WARNING}
+
+procedure SetLastErrorEx(dwErrCode, dwType: DWORD); stdcall;
+{$EXTERNALSYM SetLastErrorEx}
+
+function InternalGetWindowText(hWnd: HWND; lpString: LPWSTR; nMaxCount: Integer): Integer; stdcall;
+{$EXTERNALSYM InternalGetWindowText}
+
+function EndTask(hWnd: HWND; fShutDown, fForce: BOOL): BOOL; stdcall;
+{$EXTERNALSYM EndTask}
+
+//
+// Multimonitor API.
+//
+
+const
+ MONITOR_DEFAULTTONULL = $00000000;
+ {$EXTERNALSYM MONITOR_DEFAULTTONULL}
+ MONITOR_DEFAULTTOPRIMARY = $00000001;
+ {$EXTERNALSYM MONITOR_DEFAULTTOPRIMARY}
+ MONITOR_DEFAULTTONEAREST = $00000002;
+ {$EXTERNALSYM MONITOR_DEFAULTTONEAREST}
+
+function MonitorFromPoint(pt: POINT; dwFlags: DWORD): HMONITOR; stdcall;
+{$EXTERNALSYM MonitorFromPoint}
+
+function MonitorFromRect(const lprc: RECT; dwFlags: DWORD): HMONITOR; stdcall;
+{$EXTERNALSYM MonitorFromRect}
+
+function MonitorFromWindow(hwnd: HWND; dwFlags: DWORD): HMONITOR; stdcall;
+{$EXTERNALSYM MonitorFromWindow}
+
+const
+ MONITORINFOF_PRIMARY = $00000001;
+ {$EXTERNALSYM MONITORINFOF_PRIMARY}
+
+ CCHDEVICENAME = 32;
+ {$EXTERNALSYM CCHDEVICENAME}
+
+type
+ LPMONITORINFO = ^MONITORINFO;
+ {$EXTERNALSYM LPMONITORINFO}
+ tagMONITORINFO = record
+ cbSize: DWORD;
+ rcMonitor: RECT;
+ rcWork: RECT;
+ dwFlags: DWORD;
+ end;
+ {$EXTERNALSYM tagMONITORINFO}
+ MONITORINFO = tagMONITORINFO;
+ {$EXTERNALSYM MONITORINFO}
+ TMonitorInfo = MONITORINFO;
+ PMonitorInfo = LPMONITORINFO;
+
+ LPMONITORINFOEXA = ^MONITORINFOEXA;
+ {$EXTERNALSYM LPMONITORINFOEXA}
+ tagMONITORINFOEXA = record
+ MonitorInfo: MONITORINFO;
+ szDevice: array [0..CCHDEVICENAME - 1] of CHAR;
+ end;
+ {$EXTERNALSYM tagMONITORINFOEXA}
+ MONITORINFOEXA = tagMONITORINFOEXA;
+ {$EXTERNALSYM MONITORINFOEXA}
+ TMonitorinfoexa = MONITORINFOEXA;
+ PMonitorInfoExA = LPMONITORINFOEXA;
+
+ LPMONITORINFOEXW = ^MONITORINFOEXW;
+ {$EXTERNALSYM LPMONITORINFOEXW}
+ tagMONITORINFOEXW = record
+ MonitorInfo: MONITORINFO;
+ szDevice: array [0..CCHDEVICENAME - 1] of WCHAR;
+ end;
+ {$EXTERNALSYM tagMONITORINFOEXW}
+ MONITORINFOEXW = tagMONITORINFOEXW;
+ {$EXTERNALSYM MONITORINFOEXW}
+ TMonitorInfoExW = MONITORINFOEXW;
+ PMonitorInfoExW = LPMONITORINFOEXW;
+
+ {$IFDEF UNICODE}
+ MONITORINFOEX = MONITORINFOEXW;
+ {$EXTERNALSYM MONITORINFOEX}
+ LPMONITORINFOEX = LPMONITORINFOEXW;
+ {$EXTERNALSYM LPMONITORINFOEX}
+ TMonitorInfoEx = TMonitorInfoExW;
+ PMonitorInfoEx = PMonitorInfoExW;
+ {$ELSE}
+ MONITORINFOEX = MONITORINFOEXA;
+ {$EXTERNALSYM MONITORINFOEX}
+ LPMONITORINFOEX = LPMONITORINFOEXA;
+ {$EXTERNALSYM LPMONITORINFOEX}
+ TMonitorInfoEx = TMonitorInfoExA;
+ PMonitorInfoEx = PMonitorInfoExA;
+ {$ENDIF UNICODE}
+
+function GetMonitorInfoA(hMonitor: HMONITOR; lpmi: LPMONITORINFO): BOOL; stdcall;
+{$EXTERNALSYM GetMonitorInfoA}
+function GetMonitorInfoW(hMonitor: HMONITOR; lpmi: LPMONITORINFO): BOOL; stdcall;
+{$EXTERNALSYM GetMonitorInfoW}
+function GetMonitorInfo(hMonitor: HMONITOR; lpmi: LPMONITORINFO): BOOL; stdcall;
+{$EXTERNALSYM GetMonitorInfo}
+
+type
+ MONITORENUMPROC = function(hMonitor: HMONITOR; hdcMonitor: HDC;
+ lprcMonitor: LPRECT; dwData: LPARAM): BOOL; stdcall;
+ {$EXTERNALSYM MONITORENUMPROC}
+ TMonitorEnumProc = MONITORENUMPROC;
+
+function EnumDisplayMonitors(hdc: HDC; lprcClip: LPCRECT;
+ lpfnEnum: MONITORENUMPROC; dwData: LPARAM): BOOL; stdcall;
+{$EXTERNALSYM EnumDisplayMonitors}
+
+//
+// WinEvents - Active Accessibility hooks
+//
+
+procedure NotifyWinEvent(event: DWORD; hwnd: HWND; idObject: LONG; idChild: LONG); stdcall;
+{$EXTERNALSYM NotifyWinEvent}
+
+type
+ WINEVENTPROC = procedure(hWinEventHook: HWINEVENTHOOK; event: DWORD; hwnd: HWND;
+ idObject, idChild: LONG; idEventThread, dwmsEventTime: DWORD); stdcall;
+ {$EXTERNALSYM WINEVENTPROC}
+ TWinEventProc = WINEVENTPROC;
+
+function SetWinEventHook(eventMin: DWORD; eventMax: DWORD;
+ hmodWinEventProc: HMODULE; pfnWinEventProc: WINEVENTPROC; idProcess: DWORD;
+ idThread: DWORD; dwFlags: DWORD): HWINEVENTHOOK; stdcall;
+{$EXTERNALSYM SetWinEventHook}
+
+function IsWinEventHookInstalled(event: DWORD): BOOL; stdcall;
+{$EXTERNALSYM IsWinEventHookInstalled}
+
+//
+// dwFlags for SetWinEventHook
+//
+
+const
+ WINEVENT_OUTOFCONTEXT = $0000; // Events are ASYNC
+ {$EXTERNALSYM WINEVENT_OUTOFCONTEXT}
+ WINEVENT_SKIPOWNTHREAD = $0001; // Don't call back for events on installer's thread
+ {$EXTERNALSYM WINEVENT_SKIPOWNTHREAD}
+ WINEVENT_SKIPOWNPROCESS = $0002; // Don't call back for events on installer's process
+ {$EXTERNALSYM WINEVENT_SKIPOWNPROCESS}
+ WINEVENT_INCONTEXT = $0004; // Events are SYNC, this causes your dll to be injected into every process
+ {$EXTERNALSYM WINEVENT_INCONTEXT}
+
+function UnhookWinEvent(hWinEventHook: HWINEVENTHOOK): BOOL; stdcall;
+{$EXTERNALSYM UnhookWinEvent}
+
+//
+// idObject values for WinEventProc and NotifyWinEvent
+//
+
+//
+// hwnd + idObject can be used with OLEACC.DLL's OleGetObjectFromWindow()
+// to get an interface pointer to the container. indexChild is the item
+// within the container in question. Setup a VARIANT with vt VT_I4 and
+// lVal the indexChild and pass that in to all methods. Then you
+// are raring to go.
+//
+
+//
+// Common object IDs (cookies, only for sending WM_GETOBJECT to get at the
+// thing in question). Positive IDs are reserved for apps (app specific),
+// negative IDs are system things and are global, 0 means "just little old
+// me".
+//
+
+const
+ CHILDID_SELF = 0;
+ {$EXTERNALSYM CHILDID_SELF}
+ INDEXID_OBJECT = 0;
+ {$EXTERNALSYM INDEXID_OBJECT}
+ INDEXID_CONTAINER = 0;
+ {$EXTERNALSYM INDEXID_CONTAINER}
+
+//
+// Reserved IDs for system objects
+//
+
+const
+ OBJID_WINDOW = DWORD($00000000);
+ {$EXTERNALSYM OBJID_WINDOW}
+ OBJID_SYSMENU = DWORD($FFFFFFFF);
+ {$EXTERNALSYM OBJID_SYSMENU}
+ OBJID_TITLEBAR = DWORD($FFFFFFFE);
+ {$EXTERNALSYM OBJID_TITLEBAR}
+ OBJID_MENU = DWORD($FFFFFFFD);
+ {$EXTERNALSYM OBJID_MENU}
+ OBJID_CLIENT = DWORD($FFFFFFFC);
+ {$EXTERNALSYM OBJID_CLIENT}
+ OBJID_VSCROLL = DWORD($FFFFFFFB);
+ {$EXTERNALSYM OBJID_VSCROLL}
+ OBJID_HSCROLL = DWORD($FFFFFFFA);
+ {$EXTERNALSYM OBJID_HSCROLL}
+ OBJID_SIZEGRIP = DWORD($FFFFFFF9);
+ {$EXTERNALSYM OBJID_SIZEGRIP}
+ OBJID_CARET = DWORD($FFFFFFF8);
+ {$EXTERNALSYM OBJID_CARET}
+ OBJID_CURSOR = DWORD($FFFFFFF7);
+ {$EXTERNALSYM OBJID_CURSOR}
+ OBJID_ALERT = DWORD($FFFFFFF6);
+ {$EXTERNALSYM OBJID_ALERT}
+ OBJID_SOUND = DWORD($FFFFFFF5);
+ {$EXTERNALSYM OBJID_SOUND}
+ OBJID_QUERYCLASSNAMEIDX = DWORD($FFFFFFF4);
+ {$EXTERNALSYM OBJID_QUERYCLASSNAMEIDX}
+ OBJID_NATIVEOM = DWORD($FFFFFFF0);
+ {$EXTERNALSYM OBJID_NATIVEOM}
+
+//
+// EVENT DEFINITION
+//
+
+ EVENT_MIN = $00000001;
+ {$EXTERNALSYM EVENT_MIN}
+ EVENT_MAX = $7FFFFFFF;
+ {$EXTERNALSYM EVENT_MAX}
+
+//
+// EVENT_SYSTEM_SOUND
+// Sent when a sound is played. Currently nothing is generating this, we
+// this event when a system sound (for menus, etc) is played. Apps
+// generate this, if accessible, when a private sound is played. For
+// example, if Mail plays a "New Mail" sound.
+//
+// System Sounds:
+// (Generated by PlaySoundEvent in USER itself)
+// hwnd is NULL
+// idObject is OBJID_SOUND
+// idChild is sound child ID if one
+// App Sounds:
+// (PlaySoundEvent won't generate notification; up to app)
+// hwnd + idObject gets interface pointer to Sound object
+// idChild identifies the sound in question
+// are going to be cleaning up the SOUNDSENTRY feature in the control panel
+// and will use this at that time. Applications implementing WinEvents
+// are perfectly welcome to use it. Clients of IAccessible* will simply
+// turn around and get back a non-visual object that describes the sound.
+//
+
+ EVENT_SYSTEM_SOUND = $0001;
+ {$EXTERNALSYM EVENT_SYSTEM_SOUND}
+
+//
+// EVENT_SYSTEM_ALERT
+// System Alerts:
+// (Generated by MessageBox() calls for example)
+// hwnd is hwndMessageBox
+// idObject is OBJID_ALERT
+// App Alerts:
+// (Generated whenever)
+// hwnd+idObject gets interface pointer to Alert
+//
+
+ EVENT_SYSTEM_ALERT = $0002;
+ {$EXTERNALSYM EVENT_SYSTEM_ALERT}
+
+//
+// EVENT_SYSTEM_FOREGROUND
+// Sent when the foreground (active) window changes, even if it is changing
+// to another window in the same thread as the previous one.
+// hwnd is hwndNewForeground
+// idObject is OBJID_WINDOW
+// idChild is INDEXID_OBJECT
+//
+
+ EVENT_SYSTEM_FOREGROUND = $0003;
+ {$EXTERNALSYM EVENT_SYSTEM_FOREGROUND}
+
+//
+// Menu
+// hwnd is window (top level window or popup menu window)
+// idObject is ID of control (OBJID_MENU, OBJID_SYSMENU, OBJID_SELF for popup)
+// idChild is CHILDID_SELF
+
+// EVENT_SYSTEM_MENUSTART
+// EVENT_SYSTEM_MENUEND
+// For MENUSTART, hwnd+idObject+idChild refers to the control with the menu bar,
+// or the control bringing up the context menu.
+
+// Sent when entering into and leaving from menu mode (system, app bar, and
+// track popups).
+//
+
+ EVENT_SYSTEM_MENUSTART = $0004;
+ {$EXTERNALSYM EVENT_SYSTEM_MENUSTART}
+ EVENT_SYSTEM_MENUEND = $0005;
+ {$EXTERNALSYM EVENT_SYSTEM_MENUEND}
+
+//
+// EVENT_SYSTEM_MENUPOPUPSTART
+// EVENT_SYSTEM_MENUPOPUPEND
+// Sent when a menu popup comes up and just before it is taken down. Note
+// that for a call to TrackPopupMenu(), a client will see EVENT_SYSTEM_MENUSTART
+// followed almost immediately by EVENT_SYSTEM_MENUPOPUPSTART for the popup
+// being shown.
+
+// For MENUPOPUP, hwnd+idObject+idChild refers to the NEW popup coming up, not the
+// parent item which is hierarchical. You can get the parent menu/popup by
+// asking for the accParent object.
+//
+
+ EVENT_SYSTEM_MENUPOPUPSTART = $0006;
+ {$EXTERNALSYM EVENT_SYSTEM_MENUPOPUPSTART}
+ EVENT_SYSTEM_MENUPOPUPEND = $0007;
+ {$EXTERNALSYM EVENT_SYSTEM_MENUPOPUPEND}
+
+//
+// EVENT_SYSTEM_CAPTURESTART
+// EVENT_SYSTEM_CAPTUREEND
+// Sent when a window takes the capture and releases the capture.
+//
+
+ EVENT_SYSTEM_CAPTURESTART = $0008;
+ {$EXTERNALSYM EVENT_SYSTEM_CAPTURESTART}
+ EVENT_SYSTEM_CAPTUREEND = $0009;
+ {$EXTERNALSYM EVENT_SYSTEM_CAPTUREEND}
+
+//
+// Move Size
+// EVENT_SYSTEM_MOVESIZESTART
+// EVENT_SYSTEM_MOVESIZEEND
+// Sent when a window enters and leaves move-size dragging mode.
+//
+
+ EVENT_SYSTEM_MOVESIZESTART = $000A;
+ {$EXTERNALSYM EVENT_SYSTEM_MOVESIZESTART}
+ EVENT_SYSTEM_MOVESIZEEND = $000B;
+ {$EXTERNALSYM EVENT_SYSTEM_MOVESIZEEND}
+
+//
+// Context Help
+// EVENT_SYSTEM_CONTEXTHELPSTART
+// EVENT_SYSTEM_CONTEXTHELPEND
+// Sent when a window enters and leaves context sensitive help mode.
+//
+
+ EVENT_SYSTEM_CONTEXTHELPSTART = $000C;
+ {$EXTERNALSYM EVENT_SYSTEM_CONTEXTHELPSTART}
+ EVENT_SYSTEM_CONTEXTHELPEND = $000D;
+ {$EXTERNALSYM EVENT_SYSTEM_CONTEXTHELPEND}
+
+//
+// Drag & Drop
+// EVENT_SYSTEM_DRAGDROPSTART
+// EVENT_SYSTEM_DRAGDROPEND
+// Send the START notification just before going into drag&drop loop. Send
+// the END notification just after canceling out.
+// Note that it is up to apps and OLE to generate this, since the system
+// doesn't know. Like EVENT_SYSTEM_SOUND, it will be a while before this
+// is prevalent.
+//
+
+ EVENT_SYSTEM_DRAGDROPSTART = $000E;
+ {$EXTERNALSYM EVENT_SYSTEM_DRAGDROPSTART}
+ EVENT_SYSTEM_DRAGDROPEND = $000F;
+ {$EXTERNALSYM EVENT_SYSTEM_DRAGDROPEND}
+
+//
+// Dialog
+// Send the START notification right after the dialog is completely
+// initialized and visible. Send the END right before the dialog
+// is hidden and goes away.
+// EVENT_SYSTEM_DIALOGSTART
+// EVENT_SYSTEM_DIALOGEND
+//
+
+ EVENT_SYSTEM_DIALOGSTART = $0010;
+ {$EXTERNALSYM EVENT_SYSTEM_DIALOGSTART}
+ EVENT_SYSTEM_DIALOGEND = $0011;
+ {$EXTERNALSYM EVENT_SYSTEM_DIALOGEND}
+
+//
+// EVENT_SYSTEM_SCROLLING
+// EVENT_SYSTEM_SCROLLINGSTART
+// EVENT_SYSTEM_SCROLLINGEND
+// Sent when beginning and ending the tracking of a scrollbar in a window,
+// and also for scrollbar controls.
+//
+
+ EVENT_SYSTEM_SCROLLINGSTART = $0012;
+ {$EXTERNALSYM EVENT_SYSTEM_SCROLLINGSTART}
+ EVENT_SYSTEM_SCROLLINGEND = $0013;
+ {$EXTERNALSYM EVENT_SYSTEM_SCROLLINGEND}
+
+//
+// Alt-Tab Window
+// Send the START notification right after the switch window is initialized
+// and visible. Send the END right before it is hidden and goes away.
+// EVENT_SYSTEM_SWITCHSTART
+// EVENT_SYSTEM_SWITCHEND
+//
+
+ EVENT_SYSTEM_SWITCHSTART = $0014;
+ {$EXTERNALSYM EVENT_SYSTEM_SWITCHSTART}
+ EVENT_SYSTEM_SWITCHEND = $0015;
+ {$EXTERNALSYM EVENT_SYSTEM_SWITCHEND}
+
+//
+// EVENT_SYSTEM_MINIMIZESTART
+// EVENT_SYSTEM_MINIMIZEEND
+// Sent when a window minimizes and just before it restores.
+//
+
+ EVENT_SYSTEM_MINIMIZESTART = $0016;
+ {$EXTERNALSYM EVENT_SYSTEM_MINIMIZESTART}
+ EVENT_SYSTEM_MINIMIZEEND = $0017;
+ {$EXTERNALSYM EVENT_SYSTEM_MINIMIZEEND}
+
+ EVENT_CONSOLE_CARET = $4001;
+ {$EXTERNALSYM EVENT_CONSOLE_CARET}
+ EVENT_CONSOLE_UPDATE_REGION = $4002;
+ {$EXTERNALSYM EVENT_CONSOLE_UPDATE_REGION}
+ EVENT_CONSOLE_UPDATE_SIMPLE = $4003;
+ {$EXTERNALSYM EVENT_CONSOLE_UPDATE_SIMPLE}
+ EVENT_CONSOLE_UPDATE_SCROLL = $4004;
+ {$EXTERNALSYM EVENT_CONSOLE_UPDATE_SCROLL}
+ EVENT_CONSOLE_LAYOUT = $4005;
+ {$EXTERNALSYM EVENT_CONSOLE_LAYOUT}
+ EVENT_CONSOLE_START_APPLICATION = $4006;
+ {$EXTERNALSYM EVENT_CONSOLE_START_APPLICATION}
+ EVENT_CONSOLE_END_APPLICATION = $4007;
+ {$EXTERNALSYM EVENT_CONSOLE_END_APPLICATION}
+
+//
+// Flags for EVENT_CONSOLE_START/END_APPLICATION.
+//
+
+ CONSOLE_APPLICATION_16BIT = $0001;
+ {$EXTERNALSYM CONSOLE_APPLICATION_16BIT}
+
+//
+// Flags for EVENT_CONSOLE_CARET
+//
+
+ CONSOLE_CARET_SELECTION = $0001;
+ {$EXTERNALSYM CONSOLE_CARET_SELECTION}
+ CONSOLE_CARET_VISIBLE = $0002;
+ {$EXTERNALSYM CONSOLE_CARET_VISIBLE}
+
+//
+// Object events
+
+// The system AND apps generate these. The system generates these for
+// real windows. Apps generate these for objects within their window which
+// act like a separate control, e.g. an item in a list view.
+
+// When the system generate them, dwParam2 is always WMOBJID_SELF. When
+// apps generate them, apps put the has-meaning-to-the-app-only ID value
+// in dwParam2.
+// For all events, if you want detailed accessibility information, callers
+// should
+// * Call AccessibleObjectFromWindow() with the hwnd, idObject parameters
+// of the event, and IID_IAccessible as the REFIID, to get back an
+// IAccessible* to talk to
+// * Initialize and fill in a VARIANT as VT_I4 with lVal the idChild
+// parameter of the event.
+// * If idChild isn't zero, call get_accChild() in the container to see
+// if the child is an object in its own right. If so, you will get
+// back an IDispatch* object for the child. You should release the
+// parent, and call QueryInterface() on the child object to get its
+// IAccessible*. Then you talk directly to the child. Otherwise,
+// if get_accChild() returns you nothing, you should continue to
+// use the child VARIANT. You will ask the container for the properties
+// of the child identified by the VARIANT. In other words, the
+// child in this case is accessible but not a full-blown object.
+// Like a button on a titlebar which is 'small' and has no children.
+//
+
+//
+// For all EVENT_OBJECT events,
+// hwnd is the dude to Send the WM_GETOBJECT message to (unless NULL,
+// see above for system things)
+// idObject is the ID of the object that can resolve any queries a
+// client might have. It's a way to deal with windowless controls,
+// controls that are just drawn on the screen in some larger parent
+// window (like SDM), or standard frame elements of a window.
+// idChild is the piece inside of the object that is affected. This
+// allows clients to access things that are too small to have full
+// blown objects in their own right. Like the thumb of a scrollbar.
+// The hwnd/idObject pair gets you to the container, the dude you
+// probably want to talk to most of the time anyway. The idChild
+// can then be passed into the acc properties to get the name/value
+// of it as needed.
+
+// Example #1:
+// System propagating a listbox selection change
+// EVENT_OBJECT_SELECTION
+// hwnd == listbox hwnd
+// idObject == OBJID_WINDOW
+// idChild == new selected item, or CHILDID_SELF if
+// nothing now selected within container.
+// Word '97 propagating a listbox selection change
+// hwnd == SDM window
+// idObject == SDM ID to get at listbox 'control'
+// idChild == new selected item, or CHILDID_SELF if
+// nothing
+
+// Example #2:
+// System propagating a menu item selection on the menu bar
+// EVENT_OBJECT_SELECTION
+// hwnd == top level window
+// idObject == OBJID_MENU
+// idChild == ID of child menu bar item selected
+// *
+// Example #3:
+// System propagating a dropdown coming off of said menu bar item
+// EVENT_OBJECT_CREATE
+// hwnd == popup item
+// idObject == OBJID_WINDOW
+// idChild == CHILDID_SELF
+//
+// Example #4:
+//
+// For EVENT_OBJECT_REORDER, the object referred to by hwnd/idObject is the
+// PARENT container in which the zorder is occurring. This is because if
+// one child is zordering, all of them are changing their relative zorder.
+//
+
+ EVENT_OBJECT_CREATE = $8000; // hwnd + ID + idChild is created item
+ {$EXTERNALSYM EVENT_OBJECT_CREATE}
+ EVENT_OBJECT_DESTROY = $8001; // hwnd + ID + idChild is destroyed item
+ {$EXTERNALSYM EVENT_OBJECT_DESTROY}
+ EVENT_OBJECT_SHOW = $8002; // hwnd + ID + idChild is shown item
+ {$EXTERNALSYM EVENT_OBJECT_SHOW}
+ EVENT_OBJECT_HIDE = $8003; // hwnd + ID + idChild is hidden item
+ {$EXTERNALSYM EVENT_OBJECT_HIDE}
+ EVENT_OBJECT_REORDER = $8004; // hwnd + ID + idChild is parent of zordering children
+ {$EXTERNALSYM EVENT_OBJECT_REORDER}
+
+//
+// NOTE:
+// Minimize the number of notifications!
+//
+// When you are hiding a parent object, obviously all child objects are no
+// longer visible on screen. They still have the same "visible" status,
+// but are not truly visible. Hence do not send HIDE notifications for the
+// children also. One implies all. The same goes for SHOW.
+//
+
+ EVENT_OBJECT_FOCUS = $8005; // hwnd + ID + idChild is focused item
+ {$EXTERNALSYM EVENT_OBJECT_FOCUS}
+ EVENT_OBJECT_SELECTION = $8006; // hwnd + ID + idChild is selected item (if only one), or idChild is OBJID_WINDOW if complex
+ {$EXTERNALSYM EVENT_OBJECT_SELECTION}
+ EVENT_OBJECT_SELECTIONADD = $8007; // hwnd + ID + idChild is item added
+ {$EXTERNALSYM EVENT_OBJECT_SELECTIONADD}
+ EVENT_OBJECT_SELECTIONREMOVE = $8008; // hwnd + ID + idChild is item removed
+ {$EXTERNALSYM EVENT_OBJECT_SELECTIONREMOVE}
+ EVENT_OBJECT_SELECTIONWITHIN = $8009; // hwnd + ID + idChild is parent of changed selected items
+ {$EXTERNALSYM EVENT_OBJECT_SELECTIONWITHIN}
+
+//
+// NOTES:
+// There is only one "focused" child item in a parent. This is the place
+// keystrokes are going at a given moment. Hence only send a notification
+// about where the NEW focus is going. A NEW item getting the focus already
+// implies that the OLD item is losing it.
+//
+// SELECTION however can be multiple. Hence the different SELECTION
+// notifications. Here's when to use each:
+//
+// (1) Send a SELECTION notification in the simple single selection
+// case (like the focus) when the item with the selection is
+// merely moving to a different item within a container. hwnd + ID
+// is the container control, idChildItem is the new child with the
+// selection.
+//
+// (2) Send a SELECTIONADD notification when a new item has simply been added
+// to the selection within a container. This is appropriate when the
+// number of newly selected items is very small. hwnd + ID is the
+// container control, idChildItem is the new child added to the selection.
+//
+// (3) Send a SELECTIONREMOVE notification when a new item has simply been
+// removed from the selection within a container. This is appropriate
+// when the number of newly selected items is very small, just like
+// SELECTIONADD. hwnd + ID is the container control, idChildItem is the
+// new child removed from the selection.
+//
+// (4) Send a SELECTIONWITHIN notification when the selected items within a
+// control have changed substantially. Rather than propagate a large
+// number of changes to reflect removal for some items, addition of
+// others, just tell somebody who cares that a lot happened. It will
+// be faster an easier for somebody watching to just turn around and
+// query the container control what the new bunch of selected items
+// are.
+//
+
+ EVENT_OBJECT_STATECHANGE = $800A; // hwnd + ID + idChild is item w/ state change
+ {$EXTERNALSYM EVENT_OBJECT_STATECHANGE}
+
+//
+// Examples of when to send an EVENT_OBJECT_STATECHANGE include
+// * It is being enabled/disabled (USER does for windows)
+// * It is being pressed/released (USER does for buttons)
+// * It is being checked/unchecked (USER does for radio/check buttons)
+//
+
+ EVENT_OBJECT_LOCATIONCHANGE = $800B; // hwnd + ID + idChild is moved/sized item
+ {$EXTERNALSYM EVENT_OBJECT_LOCATIONCHANGE}
+
+//
+// Note:
+// A LOCATIONCHANGE is not sent for every child object when the parent
+// changes shape/moves. Send one notification for the topmost object
+// that is changing. For example, if the user resizes a top level window,
+// USER will generate a LOCATIONCHANGE for it, but not for the menu bar,
+// title bar, scrollbars, etc. that are also changing shape/moving.
+//
+// In other words, it only generates LOCATIONCHANGE notifications for
+// real windows that are moving/sizing. It will not generate a LOCATIONCHANGE
+// for every non-floating child window when the parent moves (the children are
+// logically moving also on screen, but not relative to the parent).
+//
+// Now, if the app itself resizes child windows as a result of being
+// sized, USER will generate LOCATIONCHANGEs for those dudes also because
+// it doesn't know better.
+//
+// Note also that USER will generate LOCATIONCHANGE notifications for two
+// non-window sys objects:
+// (1) System caret
+// (2) Cursor
+//
+
+ EVENT_OBJECT_NAMECHANGE = $800C; // hwnd + ID + idChild is item w/ name change
+ {$EXTERNALSYM EVENT_OBJECT_NAMECHANGE}
+ EVENT_OBJECT_DESCRIPTIONCHANGE = $800D; // hwnd + ID + idChild is item w/ desc change
+ {$EXTERNALSYM EVENT_OBJECT_DESCRIPTIONCHANGE}
+ EVENT_OBJECT_VALUECHANGE = $800E; // hwnd + ID + idChild is item w/ value change
+ {$EXTERNALSYM EVENT_OBJECT_VALUECHANGE}
+ EVENT_OBJECT_PARENTCHANGE = $800F; // hwnd + ID + idChild is item w/ new parent
+ {$EXTERNALSYM EVENT_OBJECT_PARENTCHANGE}
+ EVENT_OBJECT_HELPCHANGE = $8010; // hwnd + ID + idChild is item w/ help change
+ {$EXTERNALSYM EVENT_OBJECT_HELPCHANGE}
+ EVENT_OBJECT_DEFACTIONCHANGE = $8011; // hwnd + ID + idChild is item w/ def action change
+ {$EXTERNALSYM EVENT_OBJECT_DEFACTIONCHANGE}
+ EVENT_OBJECT_ACCELERATORCHANGE = $8012; // hwnd + ID + idChild is item w/ keybd accel change
+ {$EXTERNALSYM EVENT_OBJECT_ACCELERATORCHANGE}
+
+//
+// Child IDs
+//
+
+//
+// System Sounds (idChild of system SOUND notification)
+//
+
+ SOUND_SYSTEM_STARTUP = 1;
+ {$EXTERNALSYM SOUND_SYSTEM_STARTUP}
+ SOUND_SYSTEM_SHUTDOWN = 2;
+ {$EXTERNALSYM SOUND_SYSTEM_SHUTDOWN}
+ SOUND_SYSTEM_BEEP = 3;
+ {$EXTERNALSYM SOUND_SYSTEM_BEEP}
+ SOUND_SYSTEM_ERROR = 4;
+ {$EXTERNALSYM SOUND_SYSTEM_ERROR}
+ SOUND_SYSTEM_QUESTION = 5;
+ {$EXTERNALSYM SOUND_SYSTEM_QUESTION}
+ SOUND_SYSTEM_WARNING = 6;
+ {$EXTERNALSYM SOUND_SYSTEM_WARNING}
+ SOUND_SYSTEM_INFORMATION = 7;
+ {$EXTERNALSYM SOUND_SYSTEM_INFORMATION}
+ SOUND_SYSTEM_MAXIMIZE = 8;
+ {$EXTERNALSYM SOUND_SYSTEM_MAXIMIZE}
+ SOUND_SYSTEM_MINIMIZE = 9;
+ {$EXTERNALSYM SOUND_SYSTEM_MINIMIZE}
+ SOUND_SYSTEM_RESTOREUP = 10;
+ {$EXTERNALSYM SOUND_SYSTEM_RESTOREUP}
+ SOUND_SYSTEM_RESTOREDOWN = 11;
+ {$EXTERNALSYM SOUND_SYSTEM_RESTOREDOWN}
+ SOUND_SYSTEM_APPSTART = 12;
+ {$EXTERNALSYM SOUND_SYSTEM_APPSTART}
+ SOUND_SYSTEM_FAULT = 13;
+ {$EXTERNALSYM SOUND_SYSTEM_FAULT}
+ SOUND_SYSTEM_APPEND = 14;
+ {$EXTERNALSYM SOUND_SYSTEM_APPEND}
+ SOUND_SYSTEM_MENUCOMMAND = 15;
+ {$EXTERNALSYM SOUND_SYSTEM_MENUCOMMAND}
+ SOUND_SYSTEM_MENUPOPUP = 16;
+ {$EXTERNALSYM SOUND_SYSTEM_MENUPOPUP}
+ CSOUND_SYSTEM = 16;
+ {$EXTERNALSYM CSOUND_SYSTEM}
+
+//
+// System Alerts (indexChild of system ALERT notification)
+//
+
+ ALERT_SYSTEM_INFORMATIONAL = 1; // MB_INFORMATION
+ {$EXTERNALSYM ALERT_SYSTEM_INFORMATIONAL}
+ ALERT_SYSTEM_WARNING = 2; // MB_WARNING
+ {$EXTERNALSYM ALERT_SYSTEM_WARNING}
+ ALERT_SYSTEM_ERROR = 3; // MB_ERROR
+ {$EXTERNALSYM ALERT_SYSTEM_ERROR}
+ ALERT_SYSTEM_QUERY = 4; // MB_QUESTION
+ {$EXTERNALSYM ALERT_SYSTEM_QUERY}
+ ALERT_SYSTEM_CRITICAL = 5; // HardSysErrBox
+ {$EXTERNALSYM ALERT_SYSTEM_CRITICAL}
+ CALERT_SYSTEM = 6;
+ {$EXTERNALSYM CALERT_SYSTEM}
+
+type
+ LPGUITHREADINFO = ^GUITHREADINFO;
+ {$EXTERNALSYM LPGUITHREADINFO}
+ tagGUITHREADINFO = record
+ cbSize: DWORD;
+ flags: DWORD;
+ hwndActive: HWND;
+ hwndFocus: HWND;
+ hwndCapture: HWND;
+ hwndMenuOwner: HWND;
+ hwndMoveSize: HWND;
+ hwndCaret: HWND;
+ rcCaret: RECT;
+ end;
+ {$EXTERNALSYM tagGUITHREADINFO}
+ GUITHREADINFO = tagGUITHREADINFO;
+ {$EXTERNALSYM GUITHREADINFO}
+ TGuiThreadInfo = GUITHREADINFO;
+ PGuiThreadInfo = LPGUITHREADINFO;
+
+const
+ GUI_CARETBLINKING = $00000001;
+ {$EXTERNALSYM GUI_CARETBLINKING}
+ GUI_INMOVESIZE = $00000002;
+ {$EXTERNALSYM GUI_INMOVESIZE}
+ GUI_INMENUMODE = $00000004;
+ {$EXTERNALSYM GUI_INMENUMODE}
+ GUI_SYSTEMMENUMODE = $00000008;
+ {$EXTERNALSYM GUI_SYSTEMMENUMODE}
+ GUI_POPUPMENUMODE = $00000010;
+ {$EXTERNALSYM GUI_POPUPMENUMODE}
+ GUI_16BITTASK = $00000020;
+ {$EXTERNALSYM GUI_16BITTASK}
+
+function GetGUIThreadInfo(idThread: DWORD; var pgui: GUITHREADINFO): BOOL; stdcall;
+{$EXTERNALSYM GetGUIThreadInfo}
+
+function GetWindowModuleFileNameA(hwnd: HWND; pszFileName: LPSTR; cchFileNameMax: UINT): UINT; stdcall;
+{$EXTERNALSYM GetWindowModuleFileNameA}
+function GetWindowModuleFileNameW(hwnd: HWND; pszFileName: LPWSTR; cchFileNameMax: UINT): UINT; stdcall;
+{$EXTERNALSYM GetWindowModuleFileNameW}
+function GetWindowModuleFileName(hwnd: HWND; pszFileName: LPTSTR; cchFileNameMax: UINT): UINT; stdcall;
+{$EXTERNALSYM GetWindowModuleFileName}
+
+const
+ STATE_SYSTEM_UNAVAILABLE = $00000001; // Disabled
+ {$EXTERNALSYM STATE_SYSTEM_UNAVAILABLE}
+ STATE_SYSTEM_SELECTED = $00000002;
+ {$EXTERNALSYM STATE_SYSTEM_SELECTED}
+ STATE_SYSTEM_FOCUSED = $00000004;
+ {$EXTERNALSYM STATE_SYSTEM_FOCUSED}
+ STATE_SYSTEM_PRESSED = $00000008;
+ {$EXTERNALSYM STATE_SYSTEM_PRESSED}
+ STATE_SYSTEM_CHECKED = $00000010;
+ {$EXTERNALSYM STATE_SYSTEM_CHECKED}
+ STATE_SYSTEM_MIXED = $00000020; // 3-state checkbox or toolbar button
+ {$EXTERNALSYM STATE_SYSTEM_MIXED}
+ STATE_SYSTEM_INDETERMINATE = STATE_SYSTEM_MIXED;
+ {$EXTERNALSYM STATE_SYSTEM_INDETERMINATE}
+ STATE_SYSTEM_READONLY = $00000040;
+ {$EXTERNALSYM STATE_SYSTEM_READONLY}
+ STATE_SYSTEM_HOTTRACKED = $00000080;
+ {$EXTERNALSYM STATE_SYSTEM_HOTTRACKED}
+ STATE_SYSTEM_DEFAULT = $00000100;
+ {$EXTERNALSYM STATE_SYSTEM_DEFAULT}
+ STATE_SYSTEM_EXPANDED = $00000200;
+ {$EXTERNALSYM STATE_SYSTEM_EXPANDED}
+ STATE_SYSTEM_COLLAPSED = $00000400;
+ {$EXTERNALSYM STATE_SYSTEM_COLLAPSED}
+ STATE_SYSTEM_BUSY = $00000800;
+ {$EXTERNALSYM STATE_SYSTEM_BUSY}
+ STATE_SYSTEM_FLOATING = $00001000; // Children "owned" not "contained" by parent
+ {$EXTERNALSYM STATE_SYSTEM_FLOATING}
+ STATE_SYSTEM_MARQUEED = $00002000;
+ {$EXTERNALSYM STATE_SYSTEM_MARQUEED}
+ STATE_SYSTEM_ANIMATED = $00004000;
+ {$EXTERNALSYM STATE_SYSTEM_ANIMATED}
+ STATE_SYSTEM_INVISIBLE = $00008000;
+ {$EXTERNALSYM STATE_SYSTEM_INVISIBLE}
+ STATE_SYSTEM_OFFSCREEN = $00010000;
+ {$EXTERNALSYM STATE_SYSTEM_OFFSCREEN}
+ STATE_SYSTEM_SIZEABLE = $00020000;
+ {$EXTERNALSYM STATE_SYSTEM_SIZEABLE}
+ STATE_SYSTEM_MOVEABLE = $00040000;
+ {$EXTERNALSYM STATE_SYSTEM_MOVEABLE}
+ STATE_SYSTEM_SELFVOICING = $00080000;
+ {$EXTERNALSYM STATE_SYSTEM_SELFVOICING}
+ STATE_SYSTEM_FOCUSABLE = $00100000;
+ {$EXTERNALSYM STATE_SYSTEM_FOCUSABLE}
+ STATE_SYSTEM_SELECTABLE = $00200000;
+ {$EXTERNALSYM STATE_SYSTEM_SELECTABLE}
+ STATE_SYSTEM_LINKED = $00400000;
+ {$EXTERNALSYM STATE_SYSTEM_LINKED}
+ STATE_SYSTEM_TRAVERSED = $00800000;
+ {$EXTERNALSYM STATE_SYSTEM_TRAVERSED}
+ STATE_SYSTEM_MULTISELECTABLE = $01000000; // Supports multiple selection
+ {$EXTERNALSYM STATE_SYSTEM_MULTISELECTABLE}
+ STATE_SYSTEM_EXTSELECTABLE = $02000000; // Supports extended selection
+ {$EXTERNALSYM STATE_SYSTEM_EXTSELECTABLE}
+ STATE_SYSTEM_ALERT_LOW = $04000000; // This information is of low priority
+ {$EXTERNALSYM STATE_SYSTEM_ALERT_LOW}
+ STATE_SYSTEM_ALERT_MEDIUM = $08000000; // This information is of medium priority
+ {$EXTERNALSYM STATE_SYSTEM_ALERT_MEDIUM}
+ STATE_SYSTEM_ALERT_HIGH = $10000000; // This information is of high priority
+ {$EXTERNALSYM STATE_SYSTEM_ALERT_HIGH}
+ STATE_SYSTEM_PROTECTED = $20000000; // access to this is restricted
+ {$EXTERNALSYM STATE_SYSTEM_PROTECTED}
+ STATE_SYSTEM_VALID = $3FFFFFFF;
+ {$EXTERNALSYM STATE_SYSTEM_VALID}
+
+ CCHILDREN_TITLEBAR = 5;
+ {$EXTERNALSYM CCHILDREN_TITLEBAR}
+ CCHILDREN_SCROLLBAR = 5;
+ {$EXTERNALSYM CCHILDREN_SCROLLBAR}
+
+//
+// Information about the global cursor.
+//
+
+type
+ LPCURSORINFO = ^CURSORINFO;
+ {$EXTERNALSYM LPCURSORINFO}
+ tagCURSORINFO = record
+ cbSize: DWORD;
+ flags: DWORD;
+ hCursor: HCURSOR;
+ ptScreenPos: POINT;
+ end;
+ {$EXTERNALSYM tagCURSORINFO}
+ CURSORINFO = tagCURSORINFO;
+ {$EXTERNALSYM CURSORINFO}
+ TCursorInfo = CURSORINFO;
+ PCursorInfo = LPCURSORINFO;
+
+const
+ CURSOR_SHOWING = $00000001;
+ {$EXTERNALSYM CURSOR_SHOWING}
+
+function GetCursorInfo(var pci: CURSORINFO): BOOL; stdcall;
+{$EXTERNALSYM GetCursorInfo}
+
+//
+// Window information snapshot
+//
+
+type
+ LPWINDOWINFO = ^WINDOWINFO;
+ {$EXTERNALSYM LPWINDOWINFO}
+ tagWINDOWINFO = record
+ cbSize: DWORD;
+ rcWindow: RECT;
+ rcClient: RECT;
+ dwStyle: DWORD;
+ dwExStyle: DWORD;
+ dwWindowStatus: DWORD;
+ cxWindowBorders: UINT;
+ cyWindowBorders: UINT;
+ atomWindowType: ATOM;
+ wCreatorVersion: WORD;
+ end;
+ {$EXTERNALSYM tagWINDOWINFO}
+ WINDOWINFO = tagWINDOWINFO;
+ {$EXTERNALSYM WINDOWINFO}
+ TWindowInfo = WINDOWINFO;
+ PWindowInfo = LPWINDOWINFO;
+
+const
+ WS_ACTIVECAPTION = $0001;
+ {$EXTERNALSYM WS_ACTIVECAPTION}
+
+function GetWindowInfo(hwnd: HWND; var pwi: WINDOWINFO): BOOL; stdcall;
+{$EXTERNALSYM GetWindowInfo}
+
+//
+// Titlebar information.
+//
+
+type
+ LPTITLEBARINFO = ^TITLEBARINFO;
+ {$EXTERNALSYM LPTITLEBARINFO}
+ tagTITLEBARINFO = record
+ cbSize: DWORD;
+ rcTitleBar: RECT;
+ rgstate: array [0..CCHILDREN_TITLEBAR] of DWORD;
+ end;
+ {$EXTERNALSYM tagTITLEBARINFO}
+ TITLEBARINFO = tagTITLEBARINFO;
+ {$EXTERNALSYM TITLEBARINFO}
+ TTitleBarInfo = TITLEBARINFO;
+ PTitleBarInfo = LPTITLEBARINFO;
+
+function GetTitleBarInfo(hwnd: HWND; var pti: TITLEBARINFO): BOOL; stdcall;
+{$EXTERNALSYM GetTitleBarInfo}
+
+//
+// Menubar information
+//
+
+type
+ LPMENUBARINFO = ^MENUBARINFO;
+ {$EXTERNALSYM LPMENUBARINFO}
+ tagMENUBARINFO = record
+ cbSize: DWORD;
+ rcBar: RECT; // rect of bar, popup, item
+ hMenu: HMENU; // real menu handle of bar, popup
+ hwndMenu: HWND; // hwnd of item submenu if one
+ Flags: DWORD;
+ // BOOL fBarFocused:1; // bar, popup has the focus
+ // BOOL fFocused:1; // item has the focus
+ end;
+ {$EXTERNALSYM tagMENUBARINFO}
+ MENUBARINFO = tagMENUBARINFO;
+ {$EXTERNALSYM MENUBARINFO}
+ TMenuBarInfo = MENUBARINFO;
+ PMenuBarInfo = LPMENUBARINFO;
+
+function GetMenuBarInfo(hwnd: HWND; idObject: LONG; idItem: LONG;
+ var pmbi: MENUBARINFO): BOOL; stdcall;
+{$EXTERNALSYM GetMenuBarInfo}
+
+//
+// Scrollbar information
+//
+
+type
+ LPSCROLLBARINFO = ^SCROLLBARINFO;
+ {$EXTERNALSYM LPSCROLLBARINFO}
+ tagSCROLLBARINFO = record
+ cbSize: DWORD;
+ rcScrollBar: RECT;
+ dxyLineButton: Integer;
+ xyThumbTop: Integer;
+ xyThumbBottom: Integer;
+ reserved: Integer;
+ rgstate: array [0..CCHILDREN_SCROLLBAR] of DWORD;
+ end;
+ {$EXTERNALSYM tagSCROLLBARINFO}
+ SCROLLBARINFO = tagSCROLLBARINFO;
+ {$EXTERNALSYM SCROLLBARINFO}
+ TScrollBarInfo = SCROLLBARINFO;
+ PScrollBarInfo = LPSCROLLBARINFO;
+
+function GetScrollBarInfo(hwnd: HWND; idObject: LONG; var psbi: SCROLLBARINFO): BOOL; stdcall;
+{$EXTERNALSYM GetScrollBarInfo}
+
+//
+// Combobox information
+//
+
+type
+ LPCOMBOBOXINFO = ^COMBOBOXINFO;
+ {$EXTERNALSYM LPCOMBOBOXINFO}
+ tagCOMBOBOXINFO = record
+ cbSize: DWORD;
+ rcItem: RECT;
+ rcButton: RECT;
+ stateButton: DWORD;
+ hwndCombo: HWND;
+ hwndItem: HWND;
+ hwndList: HWND;
+ end;
+ {$EXTERNALSYM tagCOMBOBOXINFO}
+ COMBOBOXINFO = tagCOMBOBOXINFO;
+ {$EXTERNALSYM COMBOBOXINFO}
+ TComboBoxInfo = COMBOBOXINFO;
+ PComboBoxInfo = LPCOMBOBOXINFO;
+
+function GetComboBoxInfo(hwndCombo: HWND; var pcbi: COMBOBOXINFO): BOOL; stdcall;
+{$EXTERNALSYM GetComboBoxInfo}
+
+//
+// The "real" ancestor window
+//
+
+const
+ GA_PARENT = 1;
+ {$EXTERNALSYM GA_PARENT}
+ GA_ROOT = 2;
+ {$EXTERNALSYM GA_ROOT}
+ GA_ROOTOWNER = 3;
+ {$EXTERNALSYM GA_ROOTOWNER}
+
+function GetAncestor(hwnd: HWND; gaFlags: UINT): HWND; stdcall;
+{$EXTERNALSYM GetAncestor}
+
+//
+// This gets the REAL child window at the point. If it is in the dead
+// space of a group box, it will try a sibling behind it. But static
+// fields will get returned. In other words, it is kind of a cross between
+// ChildWindowFromPointEx and WindowFromPoint.
+//
+
+function RealChildWindowFromPoint(hwndParent: HWND; ptParentClientCoords: POINT): HWND; stdcall;
+{$EXTERNALSYM RealChildWindowFromPoint}
+
+//
+// This gets the name of the window TYPE, not class. This allows us to
+// recognize ThunderButton32 et al.
+//
+
+function RealGetWindowClassA(hwnd: HWND; pszType: LPSTR; cchType: UINT): UINT; stdcall;
+{$EXTERNALSYM RealGetWindowClassA}
+
+//
+// This gets the name of the window TYPE, not class. This allows us to
+// recognize ThunderButton32 et al.
+//
+
+function RealGetWindowClassW(hwnd: HWND; pszType: LPWSTR; cchType: UINT): UINT; stdcall;
+{$EXTERNALSYM RealGetWindowClassW}
+function RealGetWindowClass(hwnd: HWND; pszType: LPTSTR; cchType: UINT): UINT; stdcall;
+{$EXTERNALSYM RealGetWindowClass}
+
+//
+// Alt-Tab Switch window information.
+//
+
+type
+ LPALTTABINFO = ^ALTTABINFO;
+ {$EXTERNALSYM LPALTTABINFO}
+ tagALTTABINFO = record
+ cbSize: DWORD;
+ cItems: Integer;
+ cColumns: Integer;
+ cRows: Integer;
+ iColFocus: Integer;
+ iRowFocus: Integer;
+ cxItem: Integer;
+ cyItem: Integer;
+ ptStart: POINT;
+ end;
+ {$EXTERNALSYM tagALTTABINFO}
+ ALTTABINFO = tagALTTABINFO;
+ {$EXTERNALSYM ALTTABINFO}
+ TAltTabInfo = ALTTABINFO;
+ PAltTabInfo = LPALTTABINFO;
+
+function GetAltTabInfoA(hwnd: HWND; iItem: Integer; var pati: ALTTABINFO;
+ pszItemText: LPSTR; cchItemText: UINT): BOOL; stdcall;
+{$EXTERNALSYM GetAltTabInfoA}
+function GetAltTabInfoW(hwnd: HWND; iItem: Integer; var pati: ALTTABINFO;
+ pszItemText: LPWSTR; cchItemText: UINT): BOOL; stdcall;
+{$EXTERNALSYM GetAltTabInfoW}
+function GetAltTabInfo(hwnd: HWND; iItem: Integer; var pati: ALTTABINFO;
+ pszItemText: LPTSTR; cchItemText: UINT): BOOL; stdcall;
+{$EXTERNALSYM GetAltTabInfo}
+
+//
+// Listbox information.
+// Returns the number of items per row.
+//
+
+function GetListBoxInfo(hwnd: HWND): DWORD; stdcall;
+{$EXTERNALSYM GetListBoxInfo}
+
+function LockWorkStation: BOOL; stdcall;
+{$EXTERNALSYM LockWorkStation}
+
+function UserHandleGrantAccess(hUserHandle, hJob: HANDLE; bGrant: BOOL): BOOL; stdcall;
+{$EXTERNALSYM UserHandleGrantAccess}
+
+//
+// Raw Input Messages.
+//
+
+type
+ HRAWINPUT = HANDLE;
+ {$EXTERNALSYM HRAWINPUT}
+
+//
+// WM_INPUT wParam
+//
+
+//
+// Use this macro to get the input code from wParam.
+//
+
+function GET_RAWINPUT_CODE_WPARAM(wParam: WPARAM): DWORD;
+{$EXTERNALSYM GET_RAWINPUT_CODE_WPARAM}
+
+//
+// The input is in the regular message flow,
+// the app is required to call DefWindowProc
+// so that the system can perform clean ups.
+//
+
+const
+ RIM_INPUT = 0;
+ {$EXTERNALSYM RIM_INPUT}
+
+//
+// The input is sink only. The app is expected
+// to behave nicely.
+//
+
+ RIM_INPUTSINK = 1;
+ {$EXTERNALSYM RIM_INPUTSINK}
+
+//
+// Raw Input data header
+//
+
+type
+ tagRAWINPUTHEADER = record
+ dwType: DWORD;
+ dwSize: DWORD;
+ hDevice: HANDLE;
+ wParam: WPARAM;
+ end;
+ {$EXTERNALSYM tagRAWINPUTHEADER}
+ RAWINPUTHEADER = tagRAWINPUTHEADER;
+ {$EXTERNALSYM RAWINPUTHEADER}
+ PRAWINPUTHEADER = ^RAWINPUTHEADER;
+ {$EXTERNALSYM PRAWINPUTHEADER}
+ LPRAWINPUTHEADER = ^RAWINPUTHEADER;
+ {$EXTERNALSYM LPRAWINPUTHEADER}
+ TRawInputHeader = RAWINPUTHEADER;
+
+//
+// Type of the raw input
+//
+
+const
+ RIM_TYPEMOUSE = 0;
+ {$EXTERNALSYM RIM_TYPEMOUSE}
+ RIM_TYPEKEYBOARD = 1;
+ {$EXTERNALSYM RIM_TYPEKEYBOARD}
+ RIM_TYPEHID = 2;
+ {$EXTERNALSYM RIM_TYPEHID}
+
+//
+// Raw format of the mouse input
+//
+
+type
+ tagRAWMOUSE = record
+ //
+ // Indicator flags.
+ //
+ usFlags: USHORT;
+
+ //
+ // The transition state of the mouse buttons.
+ //
+
+ union: record
+ case Integer of
+ 0: (
+ ulButtons: ULONG);
+ 1: (
+ usButtonFlags: USHORT;
+ usButtonData: USHORT);
+ end;
+
+ //
+ // The raw state of the mouse buttons.
+ //
+ ulRawButtons: ULONG;
+
+ //
+ // The signed relative or absolute motion in the X direction.
+ //
+ lLastX: LONG;
+
+ //
+ // The signed relative or absolute motion in the Y direction.
+ //
+ lLastY: LONG;
+
+ //
+ // Device-specific additional information for the event.
+ //
+ ulExtraInformation: ULONG;
+ end;
+ {$EXTERNALSYM tagRAWMOUSE}
+ RAWMOUSE = tagRAWMOUSE;
+ {$EXTERNALSYM RAWMOUSE}
+ PRAWMOUSE = ^RAWMOUSE;
+ {$EXTERNALSYM PRAWMOUSE}
+ LPRAWMOUSE = ^RAWMOUSE;
+ {$EXTERNALSYM LPRAWMOUSE}
+ TRawMouse = RAWMOUSE;
+
+//
+// Define the mouse button state indicators.
+//
+
+const
+ RI_MOUSE_LEFT_BUTTON_DOWN = $0001; // Left Button changed to down.
+ {$EXTERNALSYM RI_MOUSE_LEFT_BUTTON_DOWN}
+ RI_MOUSE_LEFT_BUTTON_UP = $0002; // Left Button changed to up.
+ {$EXTERNALSYM RI_MOUSE_LEFT_BUTTON_UP}
+ RI_MOUSE_RIGHT_BUTTON_DOWN = $0004; // Right Button changed to down.
+ {$EXTERNALSYM RI_MOUSE_RIGHT_BUTTON_DOWN}
+ RI_MOUSE_RIGHT_BUTTON_UP = $0008; // Right Button changed to up.
+ {$EXTERNALSYM RI_MOUSE_RIGHT_BUTTON_UP}
+ RI_MOUSE_MIDDLE_BUTTON_DOWN = $0010; // Middle Button changed to down.
+ {$EXTERNALSYM RI_MOUSE_MIDDLE_BUTTON_DOWN}
+ RI_MOUSE_MIDDLE_BUTTON_UP = $0020; // Middle Button changed to up.
+ {$EXTERNALSYM RI_MOUSE_MIDDLE_BUTTON_UP}
+
+ RI_MOUSE_BUTTON_1_DOWN = RI_MOUSE_LEFT_BUTTON_DOWN;
+ {$EXTERNALSYM RI_MOUSE_BUTTON_1_DOWN}
+ RI_MOUSE_BUTTON_1_UP = RI_MOUSE_LEFT_BUTTON_UP;
+ {$EXTERNALSYM RI_MOUSE_BUTTON_1_UP}
+ RI_MOUSE_BUTTON_2_DOWN = RI_MOUSE_RIGHT_BUTTON_DOWN;
+ {$EXTERNALSYM RI_MOUSE_BUTTON_2_DOWN}
+ RI_MOUSE_BUTTON_2_UP = RI_MOUSE_RIGHT_BUTTON_UP;
+ {$EXTERNALSYM RI_MOUSE_BUTTON_2_UP}
+ RI_MOUSE_BUTTON_3_DOWN = RI_MOUSE_MIDDLE_BUTTON_DOWN;
+ {$EXTERNALSYM RI_MOUSE_BUTTON_3_DOWN}
+ RI_MOUSE_BUTTON_3_UP = RI_MOUSE_MIDDLE_BUTTON_UP;
+ {$EXTERNALSYM RI_MOUSE_BUTTON_3_UP}
+
+ RI_MOUSE_BUTTON_4_DOWN = $0040;
+ {$EXTERNALSYM RI_MOUSE_BUTTON_4_DOWN}
+ RI_MOUSE_BUTTON_4_UP = $0080;
+ {$EXTERNALSYM RI_MOUSE_BUTTON_4_UP}
+ RI_MOUSE_BUTTON_5_DOWN = $0100;
+ {$EXTERNALSYM RI_MOUSE_BUTTON_5_DOWN}
+ RI_MOUSE_BUTTON_5_UP = $0200;
+ {$EXTERNALSYM RI_MOUSE_BUTTON_5_UP}
+
+//
+// If usButtonFlags has RI_MOUSE_WHEEL, the wheel delta is stored in usButtonData.
+// Take it as a signed value.
+//
+
+ RI_MOUSE_WHEEL = $0400;
+ {$EXTERNALSYM RI_MOUSE_WHEEL}
+
+//
+// Define the mouse indicator flags.
+//
+
+ MOUSE_MOVE_RELATIVE = 0;
+ {$EXTERNALSYM MOUSE_MOVE_RELATIVE}
+ MOUSE_MOVE_ABSOLUTE = 1;
+ {$EXTERNALSYM MOUSE_MOVE_ABSOLUTE}
+ MOUSE_VIRTUAL_DESKTOP = $02; // the coordinates are mapped to the virtual desktop
+ {$EXTERNALSYM MOUSE_VIRTUAL_DESKTOP}
+ MOUSE_ATTRIBUTES_CHANGED = $04; // requery for mouse attributes
+ {$EXTERNALSYM MOUSE_ATTRIBUTES_CHANGED}
+
+//
+// Raw format of the keyboard input
+//
+
+type
+ tagRAWKEYBOARD = record
+ //
+ // The "make" scan code (key depression).
+ //
+ MakeCode: USHORT;
+
+ //
+ // The flags field indicates a "break" (key release) and other
+ // miscellaneous scan code information defined in ntddkbd.h.
+ //
+ Flags: USHORT;
+
+ Reserved: USHORT;
+
+ //
+ // Windows message compatible information
+ //
+ VKey: USHORT;
+ Message: UINT;
+
+ //
+ // Device-specific additional information for the event.
+ //
+ ExtraInformation: ULONG;
+ end;
+ {$EXTERNALSYM tagRAWKEYBOARD}
+ RAWKEYBOARD = tagRAWKEYBOARD;
+ {$EXTERNALSYM RAWKEYBOARD}
+ PRAWKEYBOARD = ^RAWKEYBOARD;
+ {$EXTERNALSYM PRAWKEYBOARD}
+ LPRAWKEYBOARD = ^RAWKEYBOARD;
+ {$EXTERNALSYM LPRAWKEYBOARD}
+ TRawKeyBoard = RAWKEYBOARD;
+
+//
+// Define the keyboard overrun MakeCode.
+//
+
+const
+ KEYBOARD_OVERRUN_MAKE_CODE = $FF;
+ {$EXTERNALSYM KEYBOARD_OVERRUN_MAKE_CODE}
+
+//
+// Define the keyboard input data Flags.
+//
+
+ RI_KEY_MAKE = 0;
+ {$EXTERNALSYM RI_KEY_MAKE}
+ RI_KEY_BREAK = 1;
+ {$EXTERNALSYM RI_KEY_BREAK}
+ RI_KEY_E0 = 2;
+ {$EXTERNALSYM RI_KEY_E0}
+ RI_KEY_E1 = 4;
+ {$EXTERNALSYM RI_KEY_E1}
+ RI_KEY_TERMSRV_SET_LED = 8;
+ {$EXTERNALSYM RI_KEY_TERMSRV_SET_LED}
+ RI_KEY_TERMSRV_SHADOW = $10;
+ {$EXTERNALSYM RI_KEY_TERMSRV_SHADOW}
+
+//
+// Raw format of the input from Human Input Devices
+//
+
+type
+ tagRAWHID = record
+ dwSizeHid: DWORD; // byte size of each report
+ dwCount: DWORD; // number of input packed
+ bRawData: array [0..0] of BYTE;
+ end;
+ {$EXTERNALSYM tagRAWHID}
+ RAWHID = tagRAWHID;
+ {$EXTERNALSYM RAWHID}
+ PRAWHID = ^RAWHID;
+ {$EXTERNALSYM PRAWHID}
+ LPRAWHID = ^RAWHID;
+ {$EXTERNALSYM LPRAWHID}
+ TRawHid = RAWHID;
+
+//
+// RAWINPUT data structure.
+//
+
+ tagRAWINPUT = record
+ header: RAWINPUTHEADER;
+ case Integer of
+ 0: (mouse: RAWMOUSE);
+ 1: (keyboard: RAWKEYBOARD);
+ 2: (hid: RAWHID);
+ end;
+ {$EXTERNALSYM tagRAWINPUT}
+ RAWINPUT = tagRAWINPUT;
+ {$EXTERNALSYM RAWINPUT}
+ PRAWINPUT = ^RAWINPUT;
+ {$EXTERNALSYM PRAWINPUT}
+ LPRAWINPUT = ^RAWINPUT;
+ {$EXTERNALSYM LPRAWINPUT}
+ TRawInput = RAWINPUT;
+
+function RAWINPUT_ALIGN(x: Pointer): Pointer;
+{$EXTERNALSYM RAWINPUT_ALIGN}
+
+function NEXTRAWINPUTBLOCK(ptr: PRawInput): PRawInput;
+{$EXTERNALSYM NEXTRAWINPUTBLOCK}
+
+//
+// Flags for GetRawInputData
+//
+
+const
+ RID_INPUT = $10000003;
+ {$EXTERNALSYM RID_INPUT}
+ RID_HEADER = $10000005;
+ {$EXTERNALSYM RID_HEADER}
+
+function GetRawInputData(hRawInput: HRAWINPUT; uiCommand: UINT; pData: LPVOID;
+ var pcbSize: UINT; cbSizeHeader: UINT): UINT; stdcall;
+{$EXTERNALSYM GetRawInputData}
+
+//
+// Raw Input Device Information
+//
+
+const
+ RIDI_PREPARSEDDATA = $20000005;
+ {$EXTERNALSYM RIDI_PREPARSEDDATA}
+ RIDI_DEVICENAME = $20000007; // the return valus is the character length, not the byte size
+ {$EXTERNALSYM RIDI_DEVICENAME}
+ RIDI_DEVICEINFO = $2000000b;
+ {$EXTERNALSYM RIDI_DEVICEINFO}
+
+type
+ PRID_DEVICE_INFO_MOUSE = ^RID_DEVICE_INFO_MOUSE;
+ {$EXTERNALSYM PRID_DEVICE_INFO_MOUSE}
+ tagRID_DEVICE_INFO_MOUSE = record
+ dwId: DWORD;
+ dwNumberOfButtons: DWORD;
+ dwSampleRate: DWORD;
+ end;
+ {$EXTERNALSYM tagRID_DEVICE_INFO_MOUSE}
+ RID_DEVICE_INFO_MOUSE = tagRID_DEVICE_INFO_MOUSE;
+ {$EXTERNALSYM RID_DEVICE_INFO_MOUSE}
+ TRidDeviceInfoMouse = RID_DEVICE_INFO_MOUSE;
+ PRidDeviceInfoMouse = PRID_DEVICE_INFO_MOUSE;
+
+ PRID_DEVICE_INFO_KEYBOARD = ^RID_DEVICE_INFO_KEYBOARD;
+ {$EXTERNALSYM PRID_DEVICE_INFO_KEYBOARD}
+ tagRID_DEVICE_INFO_KEYBOARD = record
+ dwType: DWORD;
+ dwSubType: DWORD;
+ dwKeyboardMode: DWORD;
+ dwNumberOfFunctionKeys: DWORD;
+ dwNumberOfIndicators: DWORD;
+ dwNumberOfKeysTotal: DWORD;
+ end;
+ {$EXTERNALSYM tagRID_DEVICE_INFO_KEYBOARD}
+ RID_DEVICE_INFO_KEYBOARD = tagRID_DEVICE_INFO_KEYBOARD;
+ {$EXTERNALSYM RID_DEVICE_INFO_KEYBOARD}
+ TRidDeviceInfoKeyboard = RID_DEVICE_INFO_KEYBOARD;
+ PRidDeviceInfoKeyboard = PRID_DEVICE_INFO_KEYBOARD;
+
+ PRID_DEVICE_INFO_HID = ^RID_DEVICE_INFO_HID;
+ {$EXTERNALSYM PRID_DEVICE_INFO_HID}
+ tagRID_DEVICE_INFO_HID = record
+ dwVendorId: DWORD;
+ dwProductId: DWORD;
+ dwVersionNumber: DWORD;
+ //
+ // Top level collection UsagePage and Usage
+ //
+ usUsagePage: USHORT;
+ usUsage: USHORT;
+ end;
+ {$EXTERNALSYM tagRID_DEVICE_INFO_HID}
+ RID_DEVICE_INFO_HID = tagRID_DEVICE_INFO_HID;
+ {$EXTERNALSYM RID_DEVICE_INFO_HID}
+ TRidDeviceInfoHid = RID_DEVICE_INFO_HID;
+ PRidDeviceInfoHid = PRID_DEVICE_INFO_HID;
+
+ tagRID_DEVICE_INFO = record
+ cbSize: DWORD;
+ dwType: DWORD;
+ case Integer of
+ 0: (mouse: RID_DEVICE_INFO_MOUSE);
+ 1: (keyboard: RID_DEVICE_INFO_KEYBOARD);
+ 2: (hid: RID_DEVICE_INFO_HID);
+ end;
+ {$EXTERNALSYM tagRID_DEVICE_INFO}
+ RID_DEVICE_INFO = tagRID_DEVICE_INFO;
+ {$EXTERNALSYM RID_DEVICE_INFO}
+ PRID_DEVICE_INFO = ^RID_DEVICE_INFO;
+ {$EXTERNALSYM PRID_DEVICE_INFO}
+ LPRID_DEVICE_INFO = ^RID_DEVICE_INFO;
+ {$EXTERNALSYM LPRID_DEVICE_INFO}
+ TRidDeviceInfo = RID_DEVICE_INFO;
+ PRidDeviceInfo = PRID_DEVICE_INFO;
+
+function GetRawInputDeviceInfoA(hDevice: HANDLE; uiCommand: UINT; pData: LPVOID;
+ var pcbSize: UINT): UINT; stdcall;
+{$EXTERNALSYM GetRawInputDeviceInfoA}
+function GetRawInputDeviceInfoW(hDevice: HANDLE; uiCommand: UINT; pData: LPVOID;
+ var pcbSize: UINT): UINT; stdcall;
+{$EXTERNALSYM GetRawInputDeviceInfoW}
+function GetRawInputDeviceInfo(hDevice: HANDLE; uiCommand: UINT; pData: LPVOID;
+ var pcbSize: UINT): UINT; stdcall;
+{$EXTERNALSYM GetRawInputDeviceInfo}
+
+//
+// Raw Input Bulk Read: GetRawInputBuffer
+//
+
+function GetRawInputBuffer(pData: PRAWINPUT; var pcbSize: UINT; cbSizeHeader: UINT): UINT; stdcall;
+{$EXTERNALSYM GetRawInputBuffer}
+
+//
+// Raw Input request APIs
+//
+
+type
+ LPRAWINPUTDEVICE = ^RAWINPUTDEVICE;
+ {$EXTERNALSYM LPRAWINPUTDEVICE}
+ PRAWINPUTDEVICE = ^RAWINPUTDEVICE;
+ {$EXTERNALSYM PRAWINPUTDEVICE}
+ tagRAWINPUTDEVICE = record
+ usUsagePage: USHORT; // Toplevel collection UsagePage
+ usUsage: USHORT; // Toplevel collection Usage
+ dwFlags: DWORD;
+ hwndTarget: HWND; // Target hwnd. NULL = follows keyboard focus
+ end;
+ {$EXTERNALSYM tagRAWINPUTDEVICE}
+ RAWINPUTDEVICE = tagRAWINPUTDEVICE;
+ {$EXTERNALSYM RAWINPUTDEVICE}
+ TRawInputDevice = RAWINPUTDEVICE;
+
+const
+ RIDEV_REMOVE = $00000001;
+ {$EXTERNALSYM RIDEV_REMOVE}
+ RIDEV_EXCLUDE = $00000010;
+ {$EXTERNALSYM RIDEV_EXCLUDE}
+ RIDEV_PAGEONLY = $00000020;
+ {$EXTERNALSYM RIDEV_PAGEONLY}
+ RIDEV_NOLEGACY = $00000030;
+ {$EXTERNALSYM RIDEV_NOLEGACY}
+ RIDEV_INPUTSINK = $00000100;
+ {$EXTERNALSYM RIDEV_INPUTSINK}
+ RIDEV_CAPTUREMOUSE = $00000200; // effective when mouse nolegacy is specified, otherwise it would be an error
+ {$EXTERNALSYM RIDEV_CAPTUREMOUSE}
+ RIDEV_NOHOTKEYS = $00000200; // effective for keyboard.
+ {$EXTERNALSYM RIDEV_NOHOTKEYS}
+ RIDEV_APPKEYS = $00000400; // effective for keyboard.
+ {$EXTERNALSYM RIDEV_APPKEYS}
+ RIDEV_EXMODEMASK = $000000F0;
+ {$EXTERNALSYM RIDEV_EXMODEMASK}
+
+function RIDEV_EXMODE(mode: DWORD): DWORD;
+{$EXTERNALSYM RIDEV_EXMODE}
+
+function RegisterRawInputDevices(pRawInputDevices: PRAWINPUTDEVICE;
+ uiNumDevices: UINT; cbSize: UINT): BOOL; stdcall;
+{$EXTERNALSYM RegisterRawInputDevices}
+
+function GetRegisteredRawInputDevices(pRawInputDevices: PRAWINPUTDEVICE;
+ var puiNumDevices: UINT; cbSize: UINT): UINT; stdcall;
+{$EXTERNALSYM GetRegisteredRawInputDevices}
+
+type
+ PRAWINPUTDEVICELIST = ^RAWINPUTDEVICELIST;
+ {$EXTERNALSYM PRAWINPUTDEVICELIST}
+ tagRAWINPUTDEVICELIST = record
+ hDevice: HANDLE;
+ dwType: DWORD;
+ end;
+ {$EXTERNALSYM tagRAWINPUTDEVICELIST}
+ RAWINPUTDEVICELIST = tagRAWINPUTDEVICELIST;
+ {$EXTERNALSYM RAWINPUTDEVICELIST}
+ TRawInputDeviceList = RAWINPUTDEVICELIST;
+
+function GetRawInputDeviceList(pRawInputDeviceList: PRAWINPUTDEVICELIST; var puiNumDevices: UINT;
+ cbSize: UINT): UINT; stdcall;
+{$EXTERNALSYM GetRawInputDeviceList}
+
+function DefRawInputProc(paRawInput: PRAWINPUT; nInput: Integer; cbSizeHeader: UINT): LRESULT; stdcall;
+{$EXTERNALSYM DefRawInputProc}
+
+implementation
+
+const
+ user32 = 'user32.dll';
+ {$IFDEF UNICODE}
+ AWSuffix = 'W';
+ {$ELSE}
+ AWSuffix = 'A';
+ {$ENDIF UNICODE}
+
+function IS_INTRESOURCE(wInteger: WORD): BOOL;
+begin
+ Result := (ULONG_PTR(wInteger) shr 16) = 0;
+end;
+
+function GET_WHEEL_DELTA_WPARAM(wParam: WPARAM): SHORT;
+begin
+ Result := SHORT(HIWORD(wParam));
+end;
+
+function GET_KEYSTATE_WPARAM(wParam: WPARAM): Integer;
+begin
+ Result := LOWORD(wParam);
+end;
+
+function GET_NCHITTEST_WPARAM(wParam: WPARAM): Shortint;
+begin
+ Result := LOWORD(wParam);
+end;
+
+function GET_XBUTTON_WPARAM(wParam: WPARAM): Integer;
+begin
+ Result := HIWORD(wParam);
+end;
+
+{$IFDEF WIN2000_UP}
+
+function GET_APPCOMMAND_LPARAM(lParam: LPARAM): Shortint;
+begin
+ Result := Shortint(HIWORD(lParam) and not FAPPCOMMAND_MASK);
+end;
+
+function GET_DEVICE_LPARAM(lParam: LPARAM): WORD;
+begin
+ Result := WORD(HIWORD(lParam) and FAPPCOMMAND_MASK);
+end;
+
+function GET_MOUSEORKEY_LPARAM(lParam: LPARAM): WORD;
+begin
+ Result := GET_DEVICE_LPARAM(lParam);
+end;
+
+function GET_FLAGS_LPARAM(lParam: LPARAM): Integer;
+begin
+ Result := LOWORD(lParam);
+end;
+
+function GET_KEYSTATE_LPARAM(lParam: LPARAM): Integer;
+begin
+ Result := GET_FLAGS_LPARAM(lParam);
+end;
+
+{$ENDIF WIN2000_UP}
+
+function MAKEWPARAM(wLow, wHigh: WORD): WPARAM;
+begin
+ Result := WPARAM(DWORD(MAKELONG(wLow, wHigh)));
+end;
+
+function MAKELPARAM(wLow, wHigh: WORD): LPARAM;
+begin
+ Result := LPARAM(DWORD(MAKELONG(wLow, wHigh)));
+end;
+
+function MAKELRESULT(wLow, wHigh: WORD): LRESULT;
+begin
+ Result := LRESULT(DWORD(MAKELONG(wLow, wHigh)));
+end;
+
+function ExitWindows(dwReserved: DWORD; uREserved: UINT): BOOL;
+begin
+ Result := ExitWindowsEx(EWX_LOGOFF, $FFFFFFFF);
+end;
+
+function PostAppMessageA(idThread: DWORD; wMsg: UINT; wParam: WPARAM; lParam: LPARAM): BOOL;
+begin
+ Result := PostThreadMessageA(idThread, wMsg, wParam, lParam);
+end;
+
+function PostAppMessageW(idThread: DWORD; wMsg: UINT; wParam: WPARAM; lParam: LPARAM): BOOL;
+begin
+ Result := PostThreadMessageW(idThread, wMsg, wParam, lParam);
+end;
+
+function PostAppMessage(idThread: DWORD; wMsg: UINT; wParam: WPARAM; lParam: LPARAM): BOOL;
+begin
+ {$IFDEF UNICODE}
+ Result := PostThreadMessageW(idThread, wMsg, wParam, lParam);
+ {$ELSE}
+ Result := PostThreadMessageA(idThread, wMsg, wParam, lParam);
+ {$ENDIF UNICODE}
+end;
+
+function CreateWindowA(lpClassName: LPCSTR; lpWindowName: LPCSTR; dwStyle: DWORD;
+ x, y, nWidth, nHeight: Integer; hWndParent: HWND; hMenu: HMENU;
+ hInstance: HINSTANCE; lpParam: LPVOID): HWND;
+begin
+ Result := CreateWindowExA(0, lpClassName, lpWindowName, dwStyle, x, y,
+ nWidth, nHeight, hWndParent, hMenu, hInstance, lpParam);
+end;
+
+function CreateWindowW(lpClassName: LPCWSTR; lpWindowName: LPCWSTR; dwStyle: DWORD;
+ x, y, nWidth, nHeight: Integer; hWndParent: HWND; hMenu: HMENU;
+ hInstance: HINSTANCE; lpParam: LPVOID): HWND;
+begin
+ Result := CreateWindowExW(0, lpClassName, lpWindowName, dwStyle, x, y,
+ nWidth, nHeight, hWndParent, hMenu, hInstance, lpParam);
+end;
+
+function CreateWindow(lpClassName: LPCTSTR; lpWindowName: LPCTSTR; dwStyle: DWORD;
+ x, y, nWidth, nHeight: Integer; hWndParent: HWND; hMenu: HMENU;
+ hInstance: HINSTANCE; lpParam: LPVOID): HWND;
+begin
+ {$IFDEF UNICODE}
+ Result := CreateWindowExW(0, lpClassName, lpWindowName, dwStyle, x, y,
+ nWidth, nHeight, hWndParent, hMenu, hInstance, lpParam);
+ {$ELSE}
+ Result := CreateWindowExA(0, lpClassName, lpWindowName, dwStyle, x, y,
+ nWidth, nHeight, hWndParent, hMenu, hInstance, lpParam);
+ {$ENDIF UNICODE}
+end;
+
+function CreateDialogA(hInstance: HINSTANCE; lpName: LPCSTR; hWndParent: HWND; lpDialogFunc: DLGPROC): HWND;
+begin
+ Result := CreateDialogParamA(hInstance, lpName, hWndParent, lpDialogFunc, 0);
+end;
+
+function CreateDialogW(hInstance: HINSTANCE; lpName: LPCWSTR; hWndParent: HWND; lpDialogFunc: DLGPROC): HWND;
+begin
+ Result := CreateDialogParamW(hInstance, lpName, hWndParent, lpDialogFunc, 0);
+end;
+
+function CreateDialog(hInstance: HINSTANCE; lpName: LPCTSTR; hWndParent: HWND; lpDialogFunc: DLGPROC): HWND;
+begin
+ {$IFDEF UNICODE}
+ Result := CreateDialogParamW(hInstance, lpName, hWndParent, lpDialogFunc, 0);
+ {$ELSE}
+ Result := CreateDialogParamA(hInstance, lpName, hWndParent, lpDialogFunc, 0);
+ {$ENDIF UNICODE}
+end;
+
+function CreateDialogIndirectA(hInstance: HINSTANCE; const lpTemplate: DLGTEMPLATE;
+ hWndParent: HWND; lpDialogFunc: DLGPROC): HWND;
+begin
+ Result := CreateDialogIndirectParamA(hInstance, lpTemplate, hWndParent, lpDialogFunc, 0);
+end;
+
+function CreateDialogIndirectW(hInstance: HINSTANCE; const lpTemplate: DLGTEMPLATE;
+ hWndParent: HWND; lpDialogFunc: DLGPROC): HWND;
+begin
+ Result := CreateDialogIndirectParamW(hInstance, lpTemplate, hWndParent, lpDialogFunc, 0);
+end;
+
+function CreateDialogIndirect(hInstance: HINSTANCE; const lpTemplate: DLGTEMPLATE;
+ hWndParent: HWND; lpDialogFunc: DLGPROC): HWND;
+begin
+ {$IFDEF UNICODE}
+ Result := CreateDialogIndirectParamW(hInstance, lpTemplate, hWndParent, lpDialogFunc, 0);
+ {$ELSE}
+ Result := CreateDialogIndirectParamA(hInstance, lpTemplate, hWndParent, lpDialogFunc, 0);
+ {$ENDIF UNICODE}
+end;
+
+function DialogBoxA(hInstance: HINSTANCE; lpTemplate: LPCSTR; hWndParent: HWND; lpDialogFunc: DLGPROC): INT_PTR;
+begin
+ Result := DialogBoxParamA(hInstance, lpTemplate, hWndParent, lpDialogFunc, 0);
+end;
+
+function DialogBoxW(hInstance: HINSTANCE; lpTemplate: LPCWSTR; hWndParent: HWND; lpDialogFunc: DLGPROC): INT_PTR;
+begin
+ Result := DialogBoxParamW(hInstance, lpTemplate, hWndParent, lpDialogFunc, 0);
+end;
+
+function DialogBox(hInstance: HINSTANCE; lpTemplate: LPCTSTR; hWndParent: HWND; lpDialogFunc: DLGPROC): INT_PTR;
+begin
+ {$IFDEF UNICODE}
+ Result := DialogBoxParamW(hInstance, lpTemplate, hWndParent, lpDialogFunc, 0);
+ {$ELSE}
+ Result := DialogBoxParamA(hInstance, lpTemplate, hWndParent, lpDialogFunc, 0);
+ {$ENDIF UNICODE}
+end;
+
+function DialogBoxIndirectA(hInstance: HINSTANCE; const lpTemplate: DLGTEMPLATE; hWndParent: HWND; lpDialogFunc: DLGPROC): INT_PTR;
+begin
+ Result := DialogBoxIndirectParamA(hInstance, lpTemplate, hWndParent, lpDialogFunc, 0);
+end;
+
+function DialogBoxIndirectW(hInstance: HINSTANCE; const lpTemplate: DLGTEMPLATE; hWndParent: HWND; lpDialogFunc: DLGPROC): INT_PTR;
+begin
+ Result := DialogBoxIndirectParamW(hInstance, lpTemplate, hWndParent, lpDialogFunc, 0);
+end;
+
+function DialogBoxIndirect(hInstance: HINSTANCE; const lpTemplate: DLGTEMPLATE; hWndParent: HWND; lpDialogFunc: DLGPROC): INT_PTR;
+begin
+ {$IFDEF UNICODE}
+ Result := DialogBoxIndirectParamW(hInstance, lpTemplate, hWndParent, lpDialogFunc, 0);
+ {$ELSE}
+ Result := DialogBoxIndirectParamA(hInstance, lpTemplate, hWndParent, lpDialogFunc, 0);
+ {$ENDIF UNICODE}
+end;
+
+function AnsiToOem(lpszSrc: LPCSTR; lpszDst: LPSTR): BOOL;
+begin
+ Result := CharToOemA(lpszSrc, lpszDst);
+end;
+
+function OemToAnsi(lpszSrc: LPCSTR; lpszDst: LPSTR): BOOL;
+begin
+ Result := OemToCharA(lpszSrc, lpszDst);
+end;
+
+function AnsiToOemBuff(lpszSrc: LPCSTR; lpszDst: LPSTR; cchDstLength: DWORD): BOOL;
+begin
+ Result := CharToOemBuffA(lpszSrc, lpszDst, cchDstLength);
+end;
+
+function OemToAnsiBuff(lpszSrc: LPCSTR; lpszDst: LPSTR; cchDstLength: DWORD): BOOL;
+begin
+ Result := OemToCharBuffA(lpszSrc, lpszDst, cchDstLength);
+end;
+
+function AnsiUpper(lpsz: LPSTR): LPSTR;
+begin
+ Result := CharUpperA(lpsz);
+end;
+
+function AnsiUpperBuff(lpsz: LPSTR; cchLength: DWORD): DWORD;
+begin
+ Result := CharUpperBuffA(lpsz, cchLength);
+end;
+
+function AnsiLower(lpsz: LPSTR): LPSTR;
+begin
+ Result := CharLowerA(lpsz);
+end;
+
+function AnsiLowerBuff(lpsz: LPSTR; cchLength: DWORD): DWORD;
+begin
+ Result := CharLowerBuffA(lpsz, cchLength);
+end;
+
+function AnsiNext(lpsz: LPCSTR): LPSTR;
+begin
+ Result := CharNextA(lpsz);
+end;
+
+function AnsiPrev(lpszStart: LPCSTR; lpszCurrent: LPCSTR): LPSTR;
+begin
+ Result := CharPrevA(lpszStart, lpszCurrent);
+end;
+
+function GetWindowLongPtrA(hWnd: HWND; nIndex: Integer): LONG_PTR;
+begin
+ Result := GetWindowLongA(hWnd, nIndex);
+end;
+
+function GetWindowLongPtrW(hWnd: HWND; nIndex: Integer): LONG_PTR;
+begin
+ Result := GetWindowLongW(hWnd, nIndex);
+end;
+
+function GetWindowLongPtr(hWnd: HWND; nIndex: Integer): LONG_PTR;
+begin
+ {$IFDEF UNICODE}
+ Result := GetWindowLongW(hWnd, nIndex);
+ {$ELSE}
+ Result := GetWindowLongA(hWnd, nIndex);
+ {$ENDIF UNICODE}
+end;
+
+function SetWindowLongPtrA(hWnd: HWND; nIndex: Integer; dwNewLong: LONG_PTR): LONG_PTR;
+begin
+ Result := SetWindowLongA(hWnd, nIndex, dwNewLong);
+end;
+
+function SetWindowLongPtrW(hWnd: HWND; nIndex: Integer; dwNewLong: LONG_PTR): LONG_PTR;
+begin
+ Result := SetWindowLongW(hWnd, nIndex, dwNewLong);
+end;
+
+function SetWindowLongPtr(hWnd: HWND; nIndex: Integer; dwNewLong: LONG_PTR): LONG_PTR;
+begin
+ {$IFDEF UNICODE}
+ Result := SetWindowLongW(hWnd, nIndex, dwNewLong);
+ {$ELSE}
+ Result := SetWindowLongA(hWnd, nIndex, dwNewLong);
+ {$ENDIF UNICODE}
+end;
+
+function GetClassLongPtrA(hWnd: HWND; nIndex: Integer): ULONG_PTR;
+begin
+ Result := GetClassLongA(hWnd, nIndex);
+end;
+
+function GetClassLongPtrW(hWnd: HWND; nIndex: Integer): ULONG_PTR;
+begin
+ Result := GetClassLongW(hWnd, nIndex);
+end;
+
+function GetClassLongPtr(hWnd: HWND; nIndex: Integer): ULONG_PTR;
+begin
+ {$IFDEF UNICODE}
+ Result := GetClassLongW(hWnd, nIndex);
+ {$ELSE}
+ Result := GetClassLongA(hWnd, nIndex);
+ {$ENDIF UNICODE}
+end;
+
+function SetClassLongPtrA(hWnd: HWND; nIndex: Integer; dwNewLong: ULONG_PTR): ULONG_PTR;
+begin
+ Result := SetClassLongA(hWnd, nIndex, dwNewLong);
+end;
+
+function SetClassLongPtrW(hWnd: HWND; nIndex: Integer; dwNewLong: ULONG_PTR): ULONG_PTR;
+begin
+ Result := SetClassLongW(hWnd, nIndex, dwNewLong);
+end;
+
+function SetClassLongPtr(hWnd: HWND; nIndex: Integer; dwNewLong: ULONG_PTR): ULONG_PTR;
+begin
+ {$IFDEF UNICODE}
+ Result := SetClassLongW(hWnd, nIndex, dwNewLong);
+ {$ELSE}
+ Result := SetClassLongA(hWnd, nIndex, dwNewLong);
+ {$ENDIF UNICODE}
+end;
+
+function EnumTaskWindows(hTask: HANDLE; lpfn: WNDENUMPROC; lParam: LPARAM): BOOL;
+begin
+ Result := EnumThreadWindows(ULONG(hTask), lpfn, lParam);
+end;
+
+function GetNextWindow(hWnd: HWND; wCmd: UINT): HWND;
+begin
+ Result := GetWindow(hWnd, wCmd);
+end;
+
+function GetWindowTask(hWnd: HWND): HANDLE;
+begin
+ Result := HANDLE(DWORD_PTR(GetWindowThreadProcessId(hWnd, nil)));
+end;
+
+function DefHookProc(nCode: Integer; wParam: WPARAM; lParam: LPARAM; phhk: LPHHOOK): LRESULT;
+begin
+ Result := CallNextHookEx(HHOOK(phhk^), nCode, wParam, lParam);
+end;
+
+function CopyCursor(pcur: HCURSOR): HCURSOR;
+begin
+ Result := HCURSOR(CopyIcon(HICON(pcur)));
+end;
+
+function GET_RAWINPUT_CODE_WPARAM(wParam: WPARAM): DWORD;
+begin
+ Result := wParam and $ff;
+end;
+
+function RAWINPUT_ALIGN(x: Pointer): Pointer;
+begin
+ Result := Pointer((Integer(x) + SizeOf(DWORD) - 1) and not (SizeOf(DWORD) - 1));
+end;
+
+function NEXTRAWINPUTBLOCK(ptr: PRawInput): PRawInput;
+begin
+ Result := PRAWINPUT(DWORD(RAWINPUT_ALIGN(ptr)) + ptr^.header.dwSize);
+end;
+
+function RIDEV_EXMODE(mode: DWORD): DWORD;
+begin
+ Result := mode and RIDEV_EXMODEMASK;
+end;
+
+{$IFDEF DYNAMIC_LINK}
+
+var
+ _IsHungAppWindow: Pointer;
+
+function IsHungAppWindow;
+begin
+ GetProcedureAddress(_IsHungAppWindow, user32, 'IsHungAppWindow');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_IsHungAppWindow]
+ end;
+end;
+
+var
+ _DisableProcessWindowsGhosting: Pointer;
+
+procedure DisableProcessWindowsGhosting;
+begin
+ GetProcedureAddress(_DisableProcessWindowsGhosting, user32, 'DisableProcessWindowsGhosting');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DisableProcessWindowsGhosting]
+ end;
+end;
+
+var
+ _wvsprintfA: Pointer;
+
+function wvsprintfA;
+begin
+ GetProcedureAddress(_wvsprintfA, user32, 'wvsprintfA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_wvsprintfA]
+ end;
+end;
+
+var
+ _wvsprintfW: Pointer;
+
+function wvsprintfW;
+begin
+ GetProcedureAddress(_wvsprintfW, user32, 'wvsprintfW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_wvsprintfW]
+ end;
+end;
+
+var
+ _wvsprintf: Pointer;
+
+function wvsprintf;
+begin
+ GetProcedureAddress(_wvsprintf, user32, 'wvsprintf' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_wvsprintf]
+ end;
+end;
+
+var
+ _wsprintfA: Pointer;
+
+function wsprintfA;
+begin
+ GetProcedureAddress(_wsprintfA, user32, 'wsprintfA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_wsprintfA]
+ end;
+end;
+
+var
+ _wsprintfW: Pointer;
+
+function wsprintfW;
+begin
+ GetProcedureAddress(_wsprintfW, user32, 'wsprintfW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_wsprintfW]
+ end;
+end;
+
+var
+ _wsprintf: Pointer;
+
+function wsprintf;
+begin
+ GetProcedureAddress(_wsprintf, user32, 'wsprintf' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_wsprintf]
+ end;
+end;
+
+var
+ _LoadKeyboardLayoutA: Pointer;
+
+function LoadKeyboardLayoutA;
+begin
+ GetProcedureAddress(_LoadKeyboardLayoutA, user32, 'LoadKeyboardLayoutA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_LoadKeyboardLayoutA]
+ end;
+end;
+
+var
+ _LoadKeyboardLayoutW: Pointer;
+
+function LoadKeyboardLayoutW;
+begin
+ GetProcedureAddress(_LoadKeyboardLayoutW, user32, 'LoadKeyboardLayoutW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_LoadKeyboardLayoutW]
+ end;
+end;
+
+var
+ _LoadKeyboardLayout: Pointer;
+
+function LoadKeyboardLayout;
+begin
+ GetProcedureAddress(_LoadKeyboardLayout, user32, 'LoadKeyboardLayout' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_LoadKeyboardLayout]
+ end;
+end;
+
+var
+ _ActivateKeyboardLayout: Pointer;
+
+function ActivateKeyboardLayout;
+begin
+ GetProcedureAddress(_ActivateKeyboardLayout, user32, 'ActivateKeyboardLayout');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ActivateKeyboardLayout]
+ end;
+end;
+
+var
+ _ToUnicodeEx: Pointer;
+
+function ToUnicodeEx;
+begin
+ GetProcedureAddress(_ToUnicodeEx, user32, 'ToUnicodeEx');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ToUnicodeEx]
+ end;
+end;
+
+var
+ _UnloadKeyboardLayout: Pointer;
+
+function UnloadKeyboardLayout;
+begin
+ GetProcedureAddress(_UnloadKeyboardLayout, user32, 'UnloadKeyboardLayout');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_UnloadKeyboardLayout]
+ end;
+end;
+
+var
+ _GetKeyboardLayoutNameA: Pointer;
+
+function GetKeyboardLayoutNameA;
+begin
+ GetProcedureAddress(_GetKeyboardLayoutNameA, user32, 'GetKeyboardLayoutNameA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetKeyboardLayoutNameA]
+ end;
+end;
+
+var
+ _GetKeyboardLayoutNameW: Pointer;
+
+function GetKeyboardLayoutNameW;
+begin
+ GetProcedureAddress(_GetKeyboardLayoutNameW, user32, 'GetKeyboardLayoutNameW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetKeyboardLayoutNameW]
+ end;
+end;
+
+var
+ _GetKeyboardLayoutName: Pointer;
+
+function GetKeyboardLayoutName;
+begin
+ GetProcedureAddress(_GetKeyboardLayoutName, user32, 'GetKeyboardLayoutName' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetKeyboardLayoutName]
+ end;
+end;
+
+var
+ _GetKeyboardLayoutList: Pointer;
+
+function GetKeyboardLayoutList;
+begin
+ GetProcedureAddress(_GetKeyboardLayoutList, user32, 'GetKeyboardLayoutList');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetKeyboardLayoutList]
+ end;
+end;
+
+var
+ _GetKeyboardLayout: Pointer;
+
+function GetKeyboardLayout;
+begin
+ GetProcedureAddress(_GetKeyboardLayout, user32, 'GetKeyboardLayout');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetKeyboardLayout]
+ end;
+end;
+
+var
+ _GetMouseMovePointsEx: Pointer;
+
+function GetMouseMovePointsEx;
+begin
+ GetProcedureAddress(_GetMouseMovePointsEx, user32, 'GetMouseMovePointsEx');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetMouseMovePointsEx]
+ end;
+end;
+
+var
+ _CreateDesktopA: Pointer;
+
+function CreateDesktopA;
+begin
+ GetProcedureAddress(_CreateDesktopA, user32, 'CreateDesktopA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreateDesktopA]
+ end;
+end;
+
+var
+ _CreateDesktopW: Pointer;
+
+function CreateDesktopW;
+begin
+ GetProcedureAddress(_CreateDesktopW, user32, 'CreateDesktopW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreateDesktopW]
+ end;
+end;
+
+var
+ _CreateDesktop: Pointer;
+
+function CreateDesktop;
+begin
+ GetProcedureAddress(_CreateDesktop, user32, 'CreateDesktop' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreateDesktop]
+ end;
+end;
+
+var
+ _OpenDesktopA: Pointer;
+
+function OpenDesktopA;
+begin
+ GetProcedureAddress(_OpenDesktopA, user32, 'OpenDesktopA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_OpenDesktopA]
+ end;
+end;
+
+var
+ _OpenDesktopW: Pointer;
+
+function OpenDesktopW;
+begin
+ GetProcedureAddress(_OpenDesktopW, user32, 'OpenDesktopW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_OpenDesktopW]
+ end;
+end;
+
+var
+ _OpenDesktop: Pointer;
+
+function OpenDesktop;
+begin
+ GetProcedureAddress(_OpenDesktop, user32, 'OpenDesktop' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_OpenDesktop]
+ end;
+end;
+
+var
+ _OpenInputDesktop: Pointer;
+
+function OpenInputDesktop;
+begin
+ GetProcedureAddress(_OpenInputDesktop, user32, 'OpenInputDesktop');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_OpenInputDesktop]
+ end;
+end;
+
+var
+ _EnumDesktopsA: Pointer;
+
+function EnumDesktopsA;
+begin
+ GetProcedureAddress(_EnumDesktopsA, user32, 'EnumDesktopsA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_EnumDesktopsA]
+ end;
+end;
+
+var
+ _EnumDesktopsW: Pointer;
+
+function EnumDesktopsW;
+begin
+ GetProcedureAddress(_EnumDesktopsW, user32, 'EnumDesktopsW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_EnumDesktopsW]
+ end;
+end;
+
+var
+ _EnumDesktops: Pointer;
+
+function EnumDesktops;
+begin
+ GetProcedureAddress(_EnumDesktops, user32, 'EnumDesktops' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_EnumDesktops]
+ end;
+end;
+
+var
+ _EnumDesktopWindows: Pointer;
+
+function EnumDesktopWindows;
+begin
+ GetProcedureAddress(_EnumDesktopWindows, user32, 'EnumDesktopWindows');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_EnumDesktopWindows]
+ end;
+end;
+
+var
+ _SwitchDesktop: Pointer;
+
+function SwitchDesktop;
+begin
+ GetProcedureAddress(_SwitchDesktop, user32, 'SwitchDesktop');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SwitchDesktop]
+ end;
+end;
+
+var
+ _SetThreadDesktop: Pointer;
+
+function SetThreadDesktop;
+begin
+ GetProcedureAddress(_SetThreadDesktop, user32, 'SetThreadDesktop');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetThreadDesktop]
+ end;
+end;
+
+var
+ _CloseDesktop: Pointer;
+
+function CloseDesktop;
+begin
+ GetProcedureAddress(_CloseDesktop, user32, 'CloseDesktop');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CloseDesktop]
+ end;
+end;
+
+var
+ _GetThreadDesktop: Pointer;
+
+function GetThreadDesktop;
+begin
+ GetProcedureAddress(_GetThreadDesktop, user32, 'GetThreadDesktop');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetThreadDesktop]
+ end;
+end;
+
+var
+ _CreateWindowStationA: Pointer;
+
+function CreateWindowStationA;
+begin
+ GetProcedureAddress(_CreateWindowStationA, user32, 'CreateWindowStationA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreateWindowStationA]
+ end;
+end;
+
+var
+ _CreateWindowStationW: Pointer;
+
+function CreateWindowStationW;
+begin
+ GetProcedureAddress(_CreateWindowStationW, user32, 'CreateWindowStationW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreateWindowStationW]
+ end;
+end;
+
+var
+ _CreateWindowStation: Pointer;
+
+function CreateWindowStation;
+begin
+ GetProcedureAddress(_CreateWindowStation, user32, 'CreateWindowStation' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreateWindowStation]
+ end;
+end;
+
+var
+ _OpenWindowStationA: Pointer;
+
+function OpenWindowStationA;
+begin
+ GetProcedureAddress(_OpenWindowStationA, user32, 'OpenWindowStationA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_OpenWindowStationA]
+ end;
+end;
+
+var
+ _OpenWindowStationW: Pointer;
+
+function OpenWindowStationW;
+begin
+ GetProcedureAddress(_OpenWindowStationW, user32, 'OpenWindowStationW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_OpenWindowStationW]
+ end;
+end;
+
+var
+ _OpenWindowStation: Pointer;
+
+function OpenWindowStation;
+begin
+ GetProcedureAddress(_OpenWindowStation, user32, 'OpenWindowStation' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_OpenWindowStation]
+ end;
+end;
+
+var
+ _EnumWindowStationsA: Pointer;
+
+function EnumWindowStationsA;
+begin
+ GetProcedureAddress(_EnumWindowStationsA, user32, 'EnumWindowStationsA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_EnumWindowStationsA]
+ end;
+end;
+
+var
+ _EnumWindowStationsW: Pointer;
+
+function EnumWindowStationsW;
+begin
+ GetProcedureAddress(_EnumWindowStationsW, user32, 'EnumWindowStationsW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_EnumWindowStationsW]
+ end;
+end;
+
+var
+ _EnumWindowStations: Pointer;
+
+function EnumWindowStations;
+begin
+ GetProcedureAddress(_EnumWindowStations, user32, 'EnumWindowStations' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_EnumWindowStations]
+ end;
+end;
+
+var
+ _CloseWindowStation: Pointer;
+
+function CloseWindowStation;
+begin
+ GetProcedureAddress(_CloseWindowStation, user32, 'CloseWindowStation');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CloseWindowStation]
+ end;
+end;
+
+var
+ _SetProcessWindowStation: Pointer;
+
+function SetProcessWindowStation;
+begin
+ GetProcedureAddress(_SetProcessWindowStation, user32, 'SetProcessWindowStation');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetProcessWindowStation]
+ end;
+end;
+
+var
+ _GetProcessWindowStation: Pointer;
+
+function GetProcessWindowStation;
+begin
+ GetProcedureAddress(_GetProcessWindowStation, user32, 'GetProcessWindowStation');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetProcessWindowStation]
+ end;
+end;
+
+var
+ _SetUserObjectSecurity: Pointer;
+
+function SetUserObjectSecurity;
+begin
+ GetProcedureAddress(_SetUserObjectSecurity, user32, 'SetUserObjectSecurity');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetUserObjectSecurity]
+ end;
+end;
+
+var
+ _GetUserObjectSecurity: Pointer;
+
+function GetUserObjectSecurity;
+begin
+ GetProcedureAddress(_GetUserObjectSecurity, user32, 'GetUserObjectSecurity');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetUserObjectSecurity]
+ end;
+end;
+
+var
+ _GetUserObjectInformationA: Pointer;
+
+function GetUserObjectInformationA;
+begin
+ GetProcedureAddress(_GetUserObjectInformationA, user32, 'GetUserObjectInformationA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetUserObjectInformationA]
+ end;
+end;
+
+var
+ _GetUserObjectInformationW: Pointer;
+
+function GetUserObjectInformationW;
+begin
+ GetProcedureAddress(_GetUserObjectInformationW, user32, 'GetUserObjectInformationW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetUserObjectInformationW]
+ end;
+end;
+
+var
+ _GetUserObjectInformation: Pointer;
+
+function GetUserObjectInformation;
+begin
+ GetProcedureAddress(_GetUserObjectInformation, user32, 'GetUserObjectInformation' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetUserObjectInformation]
+ end;
+end;
+
+var
+ _SetUserObjectInformationA: Pointer;
+
+function SetUserObjectInformationA;
+begin
+ GetProcedureAddress(_SetUserObjectInformationA, user32, 'SetUserObjectInformationA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetUserObjectInformationA]
+ end;
+end;
+
+var
+ _SetUserObjectInformationW: Pointer;
+
+function SetUserObjectInformationW;
+begin
+ GetProcedureAddress(_SetUserObjectInformationW, user32, 'SetUserObjectInformationW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetUserObjectInformationW]
+ end;
+end;
+
+var
+ _SetUserObjectInformation: Pointer;
+
+function SetUserObjectInformation;
+begin
+ GetProcedureAddress(_SetUserObjectInformation, user32, 'SetUserObjectInformation' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetUserObjectInformation]
+ end;
+end;
+
+var
+ _RegisterWindowMessageA: Pointer;
+
+function RegisterWindowMessageA;
+begin
+ GetProcedureAddress(_RegisterWindowMessageA, user32, 'RegisterWindowMessageA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RegisterWindowMessageA]
+ end;
+end;
+
+var
+ _RegisterWindowMessageW: Pointer;
+
+function RegisterWindowMessageW;
+begin
+ GetProcedureAddress(_RegisterWindowMessageW, user32, 'RegisterWindowMessageW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RegisterWindowMessageW]
+ end;
+end;
+
+var
+ _RegisterWindowMessage: Pointer;
+
+function RegisterWindowMessage;
+begin
+ GetProcedureAddress(_RegisterWindowMessage, user32, 'RegisterWindowMessage' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RegisterWindowMessage]
+ end;
+end;
+
+var
+ __TrackMouseEvent: Pointer;
+
+function TrackMouseEvent;
+begin
+ GetProcedureAddress(__TrackMouseEvent, user32, 'TrackMouseEvent');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [__TrackMouseEvent]
+ end;
+end;
+
+var
+ _DrawEdge: Pointer;
+
+function DrawEdge;
+begin
+ GetProcedureAddress(_DrawEdge, user32, 'DrawEdge');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DrawEdge]
+ end;
+end;
+
+var
+ _DrawFrameControl: Pointer;
+
+function DrawFrameControl;
+begin
+ GetProcedureAddress(_DrawFrameControl, user32, 'DrawFrameControl');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DrawFrameControl]
+ end;
+end;
+
+var
+ _DrawCaption: Pointer;
+
+function DrawCaption;
+begin
+ GetProcedureAddress(_DrawCaption, user32, 'DrawCaption');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DrawCaption]
+ end;
+end;
+
+var
+ _DrawAnimatedRects: Pointer;
+
+function DrawAnimatedRects;
+begin
+ GetProcedureAddress(_DrawAnimatedRects, user32, 'DrawAnimatedRects');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DrawAnimatedRects]
+ end;
+end;
+
+var
+ _GetMessageA: Pointer;
+
+function GetMessageA;
+begin
+ GetProcedureAddress(_GetMessageA, user32, 'GetMessageA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetMessageA]
+ end;
+end;
+
+var
+ _GetMessageW: Pointer;
+
+function GetMessageW;
+begin
+ GetProcedureAddress(_GetMessageW, user32, 'GetMessageW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetMessageW]
+ end;
+end;
+
+var
+ _GetMessage: Pointer;
+
+function GetMessage;
+begin
+ GetProcedureAddress(_GetMessage, user32, 'GetMessage' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetMessage]
+ end;
+end;
+
+var
+ _TranslateMessage: Pointer;
+
+function TranslateMessage;
+begin
+ GetProcedureAddress(_TranslateMessage, user32, 'TranslateMessage');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_TranslateMessage]
+ end;
+end;
+
+var
+ _DispatchMessageA: Pointer;
+
+function DispatchMessageA;
+begin
+ GetProcedureAddress(_DispatchMessageA, user32, 'DispatchMessageA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DispatchMessageA]
+ end;
+end;
+
+var
+ _DispatchMessageW: Pointer;
+
+function DispatchMessageW;
+begin
+ GetProcedureAddress(_DispatchMessageW, user32, 'DispatchMessageW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DispatchMessageW]
+ end;
+end;
+
+var
+ _DispatchMessage: Pointer;
+
+function DispatchMessage;
+begin
+ GetProcedureAddress(_DispatchMessage, user32, 'DispatchMessage' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DispatchMessage]
+ end;
+end;
+
+var
+ _SetMessageQueue: Pointer;
+
+function SetMessageQueue;
+begin
+ GetProcedureAddress(_SetMessageQueue, user32, 'SetMessageQueue');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetMessageQueue]
+ end;
+end;
+
+var
+ _PeekMessageA: Pointer;
+
+function PeekMessageA;
+begin
+ GetProcedureAddress(_PeekMessageA, user32, 'PeekMessageA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PeekMessageA]
+ end;
+end;
+
+var
+ _PeekMessageW: Pointer;
+
+function PeekMessageW;
+begin
+ GetProcedureAddress(_PeekMessageW, user32, 'PeekMessageW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PeekMessageW]
+ end;
+end;
+
+var
+ _PeekMessage: Pointer;
+
+function PeekMessage;
+begin
+ GetProcedureAddress(_PeekMessage, user32, 'PeekMessage' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PeekMessage]
+ end;
+end;
+
+var
+ _RegisterHotKey: Pointer;
+
+function RegisterHotKey;
+begin
+ GetProcedureAddress(_RegisterHotKey, user32, 'RegisterHotKey');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RegisterHotKey]
+ end;
+end;
+
+var
+ _UnregisterHotKey: Pointer;
+
+function UnregisterHotKey;
+begin
+ GetProcedureAddress(_UnregisterHotKey, user32, 'UnregisterHotKey');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_UnregisterHotKey]
+ end;
+end;
+
+var
+ _ExitWindowsEx: Pointer;
+
+function ExitWindowsEx;
+begin
+ GetProcedureAddress(_ExitWindowsEx, user32, 'ExitWindowsEx');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ExitWindowsEx]
+ end;
+end;
+
+var
+ _SwapMouseButton: Pointer;
+
+function SwapMouseButton;
+begin
+ GetProcedureAddress(_SwapMouseButton, user32, 'SwapMouseButton');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SwapMouseButton]
+ end;
+end;
+
+var
+ _GetMessagePos: Pointer;
+
+function GetMessagePos;
+begin
+ GetProcedureAddress(_GetMessagePos, user32, 'GetMessagePos');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetMessagePos]
+ end;
+end;
+
+var
+ _GetMessageTime: Pointer;
+
+function GetMessageTime;
+begin
+ GetProcedureAddress(_GetMessageTime, user32, 'GetMessageTime');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetMessageTime]
+ end;
+end;
+
+var
+ _GetMessageExtraInfo: Pointer;
+
+function GetMessageExtraInfo;
+begin
+ GetProcedureAddress(_GetMessageExtraInfo, user32, 'GetMessageExtraInfo');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetMessageExtraInfo]
+ end;
+end;
+
+var
+ _SetMessageExtraInfo: Pointer;
+
+function SetMessageExtraInfo;
+begin
+ GetProcedureAddress(_SetMessageExtraInfo, user32, 'SetMessageExtraInfo');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetMessageExtraInfo]
+ end;
+end;
+
+var
+ _SendMessageA: Pointer;
+
+function SendMessageA;
+begin
+ GetProcedureAddress(_SendMessageA, user32, 'SendMessageA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SendMessageA]
+ end;
+end;
+
+var
+ _SendMessageW: Pointer;
+
+function SendMessageW;
+begin
+ GetProcedureAddress(_SendMessageW, user32, 'SendMessageW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SendMessageW]
+ end;
+end;
+
+var
+ _SendMessage: Pointer;
+
+function SendMessage;
+begin
+ GetProcedureAddress(_SendMessage, user32, 'SendMessage' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SendMessage]
+ end;
+end;
+
+var
+ _SendMessageTimeoutA: Pointer;
+
+function SendMessageTimeoutA;
+begin
+ GetProcedureAddress(_SendMessageTimeoutA, user32, 'SendMessageTimeoutA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SendMessageTimeoutA]
+ end;
+end;
+
+var
+ _SendMessageTimeoutW: Pointer;
+
+function SendMessageTimeoutW;
+begin
+ GetProcedureAddress(_SendMessageTimeoutW, user32, 'SendMessageTimeoutW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SendMessageTimeoutW]
+ end;
+end;
+
+var
+ _SendMessageTimeout: Pointer;
+
+function SendMessageTimeout;
+begin
+ GetProcedureAddress(_SendMessageTimeout, user32, 'SendMessageTimeout' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SendMessageTimeout]
+ end;
+end;
+
+var
+ _SendNotifyMessageA: Pointer;
+
+function SendNotifyMessageA;
+begin
+ GetProcedureAddress(_SendNotifyMessageA, user32, 'SendNotifyMessageA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SendNotifyMessageA]
+ end;
+end;
+
+var
+ _SendNotifyMessageW: Pointer;
+
+function SendNotifyMessageW;
+begin
+ GetProcedureAddress(_SendNotifyMessageW, user32, 'SendNotifyMessageW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SendNotifyMessageW]
+ end;
+end;
+
+var
+ _SendNotifyMessage: Pointer;
+
+function SendNotifyMessage;
+begin
+ GetProcedureAddress(_SendNotifyMessage, user32, 'SendNotifyMessage' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SendNotifyMessage]
+ end;
+end;
+
+var
+ _SendMessageCallbackA: Pointer;
+
+function SendMessageCallbackA;
+begin
+ GetProcedureAddress(_SendMessageCallbackA, user32, 'SendMessageCallbackA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SendMessageCallbackA]
+ end;
+end;
+
+var
+ _SendMessageCallbackW: Pointer;
+
+function SendMessageCallbackW;
+begin
+ GetProcedureAddress(_SendMessageCallbackW, user32, 'SendMessageCallbackW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SendMessageCallbackW]
+ end;
+end;
+
+var
+ _SendMessageCallback: Pointer;
+
+function SendMessageCallback;
+begin
+ GetProcedureAddress(_SendMessageCallback, user32, 'SendMessageCallback' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SendMessageCallback]
+ end;
+end;
+
+var
+ _BroadcastSystemMessageExA: Pointer;
+
+function BroadcastSystemMessageExA;
+begin
+ GetProcedureAddress(_BroadcastSystemMessageExA, user32, 'BroadcastSystemMessageExA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_BroadcastSystemMessageExA]
+ end;
+end;
+
+var
+ _BroadcastSystemMessageExW: Pointer;
+
+function BroadcastSystemMessageExW;
+begin
+ GetProcedureAddress(_BroadcastSystemMessageExW, user32, 'BroadcastSystemMessageExW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_BroadcastSystemMessageExW]
+ end;
+end;
+
+var
+ _BroadcastSystemMessageEx: Pointer;
+
+function BroadcastSystemMessageEx;
+begin
+ GetProcedureAddress(_BroadcastSystemMessageEx, user32, 'BroadcastSystemMessageEx' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_BroadcastSystemMessageEx]
+ end;
+end;
+
+var
+ _BroadcastSystemMessageA: Pointer;
+
+function BroadcastSystemMessageA;
+begin
+ GetProcedureAddress(_BroadcastSystemMessageA, user32, 'BroadcastSystemMessageA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_BroadcastSystemMessageA]
+ end;
+end;
+
+var
+ _BroadcastSystemMessageW: Pointer;
+
+function BroadcastSystemMessageW;
+begin
+ GetProcedureAddress(_BroadcastSystemMessageW, user32, 'BroadcastSystemMessageW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_BroadcastSystemMessageW]
+ end;
+end;
+
+var
+ _BroadcastSystemMessage: Pointer;
+
+function BroadcastSystemMessage;
+begin
+ GetProcedureAddress(_BroadcastSystemMessage, user32, 'BroadcastSystemMessage' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_BroadcastSystemMessage]
+ end;
+end;
+
+var
+ _RegisterDeviceNotificationA: Pointer;
+
+function RegisterDeviceNotificationA;
+begin
+ GetProcedureAddress(_RegisterDeviceNotificationA, user32, 'RegisterDeviceNotificationA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RegisterDeviceNotificationA]
+ end;
+end;
+
+var
+ _RegisterDeviceNotificationW: Pointer;
+
+function RegisterDeviceNotificationW;
+begin
+ GetProcedureAddress(_RegisterDeviceNotificationW, user32, 'RegisterDeviceNotificationW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RegisterDeviceNotificationW]
+ end;
+end;
+
+var
+ _RegisterDeviceNotification: Pointer;
+
+function RegisterDeviceNotification;
+begin
+ GetProcedureAddress(_RegisterDeviceNotification, user32, 'RegisterDeviceNotification' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RegisterDeviceNotification]
+ end;
+end;
+
+var
+ _UnregisterDeviceNotification: Pointer;
+
+function UnregisterDeviceNotification;
+begin
+ GetProcedureAddress(_UnregisterDeviceNotification, user32, 'UnregisterDeviceNotification');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_UnregisterDeviceNotification]
+ end;
+end;
+
+var
+ _PostMessageA: Pointer;
+
+function PostMessageA;
+begin
+ GetProcedureAddress(_PostMessageA, user32, 'PostMessageA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PostMessageA]
+ end;
+end;
+
+var
+ _PostMessageW: Pointer;
+
+function PostMessageW;
+begin
+ GetProcedureAddress(_PostMessageW, user32, 'PostMessageW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PostMessageW]
+ end;
+end;
+
+var
+ _PostMessage: Pointer;
+
+function PostMessage;
+begin
+ GetProcedureAddress(_PostMessage, user32, 'PostMessage' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PostMessage]
+ end;
+end;
+
+var
+ _PostThreadMessageA: Pointer;
+
+function PostThreadMessageA;
+begin
+ GetProcedureAddress(_PostThreadMessageA, user32, 'PostThreadMessageA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PostThreadMessageA]
+ end;
+end;
+
+var
+ _PostThreadMessageW: Pointer;
+
+function PostThreadMessageW;
+begin
+ GetProcedureAddress(_PostThreadMessageW, user32, 'PostThreadMessageW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PostThreadMessageW]
+ end;
+end;
+
+var
+ _PostThreadMessage: Pointer;
+
+function PostThreadMessage;
+begin
+ GetProcedureAddress(_PostThreadMessage, user32, 'PostThreadMessage' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PostThreadMessage]
+ end;
+end;
+
+var
+ _AttachThreadInput: Pointer;
+
+function AttachThreadInput;
+begin
+ GetProcedureAddress(_AttachThreadInput, user32, 'AttachThreadInput');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_AttachThreadInput]
+ end;
+end;
+
+var
+ _ReplyMessage: Pointer;
+
+function ReplyMessage;
+begin
+ GetProcedureAddress(_ReplyMessage, user32, 'ReplyMessage');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ReplyMessage]
+ end;
+end;
+
+var
+ _WaitMessage: Pointer;
+
+function WaitMessage;
+begin
+ GetProcedureAddress(_WaitMessage, user32, 'WaitMessage');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WaitMessage]
+ end;
+end;
+
+var
+ _WaitForInputIdle: Pointer;
+
+function WaitForInputIdle;
+begin
+ GetProcedureAddress(_WaitForInputIdle, user32, 'WaitForInputIdle');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WaitForInputIdle]
+ end;
+end;
+
+var
+ _DefWindowProcA: Pointer;
+
+function DefWindowProcA;
+begin
+ GetProcedureAddress(_DefWindowProcA, user32, 'DefWindowProcA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DefWindowProcA]
+ end;
+end;
+
+var
+ _DefWindowProcW: Pointer;
+
+function DefWindowProcW;
+begin
+ GetProcedureAddress(_DefWindowProcW, user32, 'DefWindowProcW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DefWindowProcW]
+ end;
+end;
+
+var
+ _DefWindowProc: Pointer;
+
+function DefWindowProc;
+begin
+ GetProcedureAddress(_DefWindowProc, user32, 'DefWindowProc' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DefWindowProc]
+ end;
+end;
+
+var
+ _PostQuitMessage: Pointer;
+
+procedure PostQuitMessage;
+begin
+ GetProcedureAddress(_PostQuitMessage, user32, 'PostQuitMessage');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PostQuitMessage]
+ end;
+end;
+
+var
+ _CallWindowProcA: Pointer;
+
+function CallWindowProcA;
+begin
+ GetProcedureAddress(_CallWindowProcA, user32, 'CallWindowProcA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CallWindowProcA]
+ end;
+end;
+
+var
+ _CallWindowProcW: Pointer;
+
+function CallWindowProcW;
+begin
+ GetProcedureAddress(_CallWindowProcW, user32, 'CallWindowProcW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CallWindowProcW]
+ end;
+end;
+
+var
+ _CallWindowProc: Pointer;
+
+function CallWindowProc;
+begin
+ GetProcedureAddress(_CallWindowProc, user32, 'CallWindowProc' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CallWindowProc]
+ end;
+end;
+
+var
+ _InSendMessage: Pointer;
+
+function InSendMessage;
+begin
+ GetProcedureAddress(_InSendMessage, user32, 'InSendMessage');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_InSendMessage]
+ end;
+end;
+
+var
+ _InSendMessageEx: Pointer;
+
+function InSendMessageEx;
+begin
+ GetProcedureAddress(_InSendMessageEx, user32, 'InSendMessageEx');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_InSendMessageEx]
+ end;
+end;
+
+var
+ _GetDoubleClickTime: Pointer;
+
+function GetDoubleClickTime;
+begin
+ GetProcedureAddress(_GetDoubleClickTime, user32, 'GetDoubleClickTime');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetDoubleClickTime]
+ end;
+end;
+
+var
+ _SetDoubleClickTime: Pointer;
+
+function SetDoubleClickTime;
+begin
+ GetProcedureAddress(_SetDoubleClickTime, user32, 'SetDoubleClickTime');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetDoubleClickTime]
+ end;
+end;
+
+var
+ _RegisterClassA: Pointer;
+
+function RegisterClassA;
+begin
+ GetProcedureAddress(_RegisterClassA, user32, 'RegisterClassA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RegisterClassA]
+ end;
+end;
+
+var
+ _RegisterClassW: Pointer;
+
+function RegisterClassW;
+begin
+ GetProcedureAddress(_RegisterClassW, user32, 'RegisterClassW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RegisterClassW]
+ end;
+end;
+
+var
+ _RegisterClass: Pointer;
+
+function RegisterClass;
+begin
+ GetProcedureAddress(_RegisterClass, user32, 'RegisterClass' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RegisterClass]
+ end;
+end;
+
+var
+ _UnregisterClassA: Pointer;
+
+function UnregisterClassA;
+begin
+ GetProcedureAddress(_UnregisterClassA, user32, 'UnregisterClassA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_UnregisterClassA]
+ end;
+end;
+
+var
+ _UnregisterClassW: Pointer;
+
+function UnregisterClassW;
+begin
+ GetProcedureAddress(_UnregisterClassW, user32, 'UnregisterClassW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_UnregisterClassW]
+ end;
+end;
+
+var
+ _UnregisterClass: Pointer;
+
+function UnregisterClass;
+begin
+ GetProcedureAddress(_UnregisterClass, user32, 'UnregisterClass' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_UnregisterClass]
+ end;
+end;
+
+var
+ _GetClassInfoA: Pointer;
+
+function GetClassInfoA;
+begin
+ GetProcedureAddress(_GetClassInfoA, user32, 'GetClassInfoA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetClassInfoA]
+ end;
+end;
+
+var
+ _GetClassInfoW: Pointer;
+
+function GetClassInfoW;
+begin
+ GetProcedureAddress(_GetClassInfoW, user32, 'GetClassInfoW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetClassInfoW]
+ end;
+end;
+
+var
+ _GetClassInfo: Pointer;
+
+function GetClassInfo;
+begin
+ GetProcedureAddress(_GetClassInfo, user32, 'GetClassInfo' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetClassInfo]
+ end;
+end;
+
+var
+ _RegisterClassExA: Pointer;
+
+function RegisterClassExA;
+begin
+ GetProcedureAddress(_RegisterClassExA, user32, 'RegisterClassExA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RegisterClassExA]
+ end;
+end;
+
+var
+ _RegisterClassExW: Pointer;
+
+function RegisterClassExW;
+begin
+ GetProcedureAddress(_RegisterClassExW, user32, 'RegisterClassExW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RegisterClassExW]
+ end;
+end;
+
+var
+ _RegisterClassEx: Pointer;
+
+function RegisterClassEx;
+begin
+ GetProcedureAddress(_RegisterClassEx, user32, 'RegisterClassEx' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RegisterClassEx]
+ end;
+end;
+
+var
+ _GetClassInfoExA: Pointer;
+
+function GetClassInfoExA;
+begin
+ GetProcedureAddress(_GetClassInfoExA, user32, 'GetClassInfoExA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetClassInfoExA]
+ end;
+end;
+
+var
+ _GetClassInfoExW: Pointer;
+
+function GetClassInfoExW;
+begin
+ GetProcedureAddress(_GetClassInfoExW, user32, 'GetClassInfoExW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetClassInfoExW]
+ end;
+end;
+
+var
+ _GetClassInfoEx: Pointer;
+
+function GetClassInfoEx;
+begin
+ GetProcedureAddress(_GetClassInfoEx, user32, 'GetClassInfoEx' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetClassInfoEx]
+ end;
+end;
+
+var
+ _CreateWindowExA: Pointer;
+
+function CreateWindowExA;
+begin
+ GetProcedureAddress(_CreateWindowExA, user32, 'CreateWindowExA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreateWindowExA]
+ end;
+end;
+
+var
+ _CreateWindowExW: Pointer;
+
+function CreateWindowExW;
+begin
+ GetProcedureAddress(_CreateWindowExW, user32, 'CreateWindowExW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreateWindowExW]
+ end;
+end;
+
+var
+ _CreateWindowEx: Pointer;
+
+function CreateWindowEx;
+begin
+ GetProcedureAddress(_CreateWindowEx, user32, 'CreateWindowEx' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreateWindowEx]
+ end;
+end;
+
+var
+ _IsWindow: Pointer;
+
+function IsWindow;
+begin
+ GetProcedureAddress(_IsWindow, user32, 'IsWindow');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_IsWindow]
+ end;
+end;
+
+var
+ _IsMenu: Pointer;
+
+function IsMenu;
+begin
+ GetProcedureAddress(_IsMenu, user32, 'IsMenu');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_IsMenu]
+ end;
+end;
+
+var
+ _IsChild: Pointer;
+
+function IsChild;
+begin
+ GetProcedureAddress(_IsChild, user32, 'IsChild');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_IsChild]
+ end;
+end;
+
+var
+ _DestroyWindow: Pointer;
+
+function DestroyWindow;
+begin
+ GetProcedureAddress(_DestroyWindow, user32, 'DestroyWindow');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DestroyWindow]
+ end;
+end;
+
+var
+ _ShowWindow: Pointer;
+
+function ShowWindow;
+begin
+ GetProcedureAddress(_ShowWindow, user32, 'ShowWindow');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ShowWindow]
+ end;
+end;
+
+var
+ _AnimateWindow: Pointer;
+
+function AnimateWindow;
+begin
+ GetProcedureAddress(_AnimateWindow, user32, 'AnimateWindow');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_AnimateWindow]
+ end;
+end;
+
+var
+ _UpdateLayeredWindow: Pointer;
+
+function UpdateLayeredWindow;
+begin
+ GetProcedureAddress(_UpdateLayeredWindow, user32, 'UpdateLayeredWindow');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_UpdateLayeredWindow]
+ end;
+end;
+
+var
+ _GetLayeredWindowAttributes: Pointer;
+
+function GetLayeredWindowAttributes;
+begin
+ GetProcedureAddress(_GetLayeredWindowAttributes, user32, 'GetLayeredWindowAttributes');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetLayeredWindowAttributes]
+ end;
+end;
+
+var
+ _PrintWindow: Pointer;
+
+function PrintWindow;
+begin
+ GetProcedureAddress(_PrintWindow, user32, 'PrintWindow');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PrintWindow]
+ end;
+end;
+
+var
+ _SetLayeredWindowAttributes: Pointer;
+
+function SetLayeredWindowAttributes;
+begin
+ GetProcedureAddress(_SetLayeredWindowAttributes, user32, 'SetLayeredWindowAttributes');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetLayeredWindowAttributes]
+ end;
+end;
+
+var
+ _ShowWindowAsync: Pointer;
+
+function ShowWindowAsync;
+begin
+ GetProcedureAddress(_ShowWindowAsync, user32, 'ShowWindowAsync');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ShowWindowAsync]
+ end;
+end;
+
+var
+ _FlashWindow: Pointer;
+
+function FlashWindow;
+begin
+ GetProcedureAddress(_FlashWindow, user32, 'FlashWindow');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_FlashWindow]
+ end;
+end;
+
+var
+ _FlashWindowEx: Pointer;
+
+function FlashWindowEx;
+begin
+ GetProcedureAddress(_FlashWindowEx, user32, 'FlashWindowEx');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_FlashWindowEx]
+ end;
+end;
+
+var
+ _ShowOwnedPopups: Pointer;
+
+function ShowOwnedPopups;
+begin
+ GetProcedureAddress(_ShowOwnedPopups, user32, 'ShowOwnedPopups');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ShowOwnedPopups]
+ end;
+end;
+
+var
+ _OpenIcon: Pointer;
+
+function OpenIcon;
+begin
+ GetProcedureAddress(_OpenIcon, user32, 'OpenIcon');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_OpenIcon]
+ end;
+end;
+
+var
+ _CloseWindow: Pointer;
+
+function CloseWindow;
+begin
+ GetProcedureAddress(_CloseWindow, user32, 'CloseWindow');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CloseWindow]
+ end;
+end;
+
+var
+ _MoveWindow: Pointer;
+
+function MoveWindow;
+begin
+ GetProcedureAddress(_MoveWindow, user32, 'MoveWindow');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MoveWindow]
+ end;
+end;
+
+var
+ _SetWindowPos: Pointer;
+
+function SetWindowPos;
+begin
+ GetProcedureAddress(_SetWindowPos, user32, 'SetWindowPos');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetWindowPos]
+ end;
+end;
+
+var
+ _GetWindowPlacement: Pointer;
+
+function GetWindowPlacement;
+begin
+ GetProcedureAddress(_GetWindowPlacement, user32, 'GetWindowPlacement');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetWindowPlacement]
+ end;
+end;
+
+var
+ _SetWindowPlacement: Pointer;
+
+function SetWindowPlacement;
+begin
+ GetProcedureAddress(_SetWindowPlacement, user32, 'SetWindowPlacement');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetWindowPlacement]
+ end;
+end;
+
+var
+ _BeginDeferWindowPos: Pointer;
+
+function BeginDeferWindowPos;
+begin
+ GetProcedureAddress(_BeginDeferWindowPos, user32, 'BeginDeferWindowPos');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_BeginDeferWindowPos]
+ end;
+end;
+
+var
+ _DeferWindowPos: Pointer;
+
+function DeferWindowPos;
+begin
+ GetProcedureAddress(_DeferWindowPos, user32, 'DeferWindowPos');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DeferWindowPos]
+ end;
+end;
+
+var
+ _EndDeferWindowPos: Pointer;
+
+function EndDeferWindowPos;
+begin
+ GetProcedureAddress(_EndDeferWindowPos, user32, 'EndDeferWindowPos');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_EndDeferWindowPos]
+ end;
+end;
+
+var
+ _IsWindowVisible: Pointer;
+
+function IsWindowVisible;
+begin
+ GetProcedureAddress(_IsWindowVisible, user32, 'IsWindowVisible');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_IsWindowVisible]
+ end;
+end;
+
+var
+ _IsIconic: Pointer;
+
+function IsIconic;
+begin
+ GetProcedureAddress(_IsIconic, user32, 'IsIconic');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_IsIconic]
+ end;
+end;
+
+var
+ _AnyPopup: Pointer;
+
+function AnyPopup;
+begin
+ GetProcedureAddress(_AnyPopup, user32, 'AnyPopup');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_AnyPopup]
+ end;
+end;
+
+var
+ _BringWindowToTop: Pointer;
+
+function BringWindowToTop;
+begin
+ GetProcedureAddress(_BringWindowToTop, user32, 'BringWindowToTop');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_BringWindowToTop]
+ end;
+end;
+
+var
+ _IsZoomed: Pointer;
+
+function IsZoomed;
+begin
+ GetProcedureAddress(_IsZoomed, user32, 'IsZoomed');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_IsZoomed]
+ end;
+end;
+
+var
+ _CreateDialogParamA: Pointer;
+
+function CreateDialogParamA;
+begin
+ GetProcedureAddress(_CreateDialogParamA, user32, 'CreateDialogParamA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreateDialogParamA]
+ end;
+end;
+
+var
+ _CreateDialogParamW: Pointer;
+
+function CreateDialogParamW;
+begin
+ GetProcedureAddress(_CreateDialogParamW, user32, 'CreateDialogParamW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreateDialogParamW]
+ end;
+end;
+
+var
+ _CreateDialogParam: Pointer;
+
+function CreateDialogParam;
+begin
+ GetProcedureAddress(_CreateDialogParam, user32, 'CreateDialogParam' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreateDialogParam]
+ end;
+end;
+
+var
+ _CreateDialogIndirectParamA: Pointer;
+
+function CreateDialogIndirectParamA;
+begin
+ GetProcedureAddress(_CreateDialogIndirectParamA, user32, 'CreateDialogIndirectParamA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreateDialogIndirectParamA]
+ end;
+end;
+
+var
+ _CreateDialogIndirectParamW: Pointer;
+
+function CreateDialogIndirectParamW;
+begin
+ GetProcedureAddress(_CreateDialogIndirectParamW, user32, 'CreateDialogIndirectParamW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreateDialogIndirectParamW]
+ end;
+end;
+
+var
+ _CreateDialogIndirectParam: Pointer;
+
+function CreateDialogIndirectParam;
+begin
+ GetProcedureAddress(_CreateDialogIndirectParam, user32, 'CreateDialogIndirectParam' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreateDialogIndirectParam]
+ end;
+end;
+
+var
+ _DialogBoxParamA: Pointer;
+
+function DialogBoxParamA;
+begin
+ GetProcedureAddress(_DialogBoxParamA, user32, 'DialogBoxParamA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DialogBoxParamA]
+ end;
+end;
+
+var
+ _DialogBoxParamW: Pointer;
+
+function DialogBoxParamW;
+begin
+ GetProcedureAddress(_DialogBoxParamW, user32, 'DialogBoxParamW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DialogBoxParamW]
+ end;
+end;
+
+var
+ _DialogBoxParam: Pointer;
+
+function DialogBoxParam;
+begin
+ GetProcedureAddress(_DialogBoxParam, user32, 'DialogBoxParam' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DialogBoxParam]
+ end;
+end;
+
+var
+ _DialogBoxIndirectParamA: Pointer;
+
+function DialogBoxIndirectParamA;
+begin
+ GetProcedureAddress(_DialogBoxIndirectParamA, user32, 'DialogBoxIndirectParamA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DialogBoxIndirectParamA]
+ end;
+end;
+
+var
+ _DialogBoxIndirectParamW: Pointer;
+
+function DialogBoxIndirectParamW;
+begin
+ GetProcedureAddress(_DialogBoxIndirectParamW, user32, 'DialogBoxIndirectParamW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DialogBoxIndirectParamW]
+ end;
+end;
+
+var
+ _DialogBoxIndirectParam: Pointer;
+
+function DialogBoxIndirectParam;
+begin
+ GetProcedureAddress(_DialogBoxIndirectParam, user32, 'DialogBoxIndirectParam' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DialogBoxIndirectParam]
+ end;
+end;
+
+var
+ _EndDialog: Pointer;
+
+function EndDialog;
+begin
+ GetProcedureAddress(_EndDialog, user32, 'EndDialog');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_EndDialog]
+ end;
+end;
+
+var
+ _GetDlgItem: Pointer;
+
+function GetDlgItem;
+begin
+ GetProcedureAddress(_GetDlgItem, user32, 'GetDlgItem');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetDlgItem]
+ end;
+end;
+
+var
+ _SetDlgItemInt: Pointer;
+
+function SetDlgItemInt;
+begin
+ GetProcedureAddress(_SetDlgItemInt, user32, 'SetDlgItemInt');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetDlgItemInt]
+ end;
+end;
+
+var
+ _GetDlgItemInt: Pointer;
+
+function GetDlgItemInt;
+begin
+ GetProcedureAddress(_GetDlgItemInt, user32, 'GetDlgItemInt');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetDlgItemInt]
+ end;
+end;
+
+var
+ _SetDlgItemTextA: Pointer;
+
+function SetDlgItemTextA;
+begin
+ GetProcedureAddress(_SetDlgItemTextA, user32, 'SetDlgItemTextA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetDlgItemTextA]
+ end;
+end;
+
+var
+ _SetDlgItemTextW: Pointer;
+
+function SetDlgItemTextW;
+begin
+ GetProcedureAddress(_SetDlgItemTextW, user32, 'SetDlgItemTextW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetDlgItemTextW]
+ end;
+end;
+
+var
+ _SetDlgItemText: Pointer;
+
+function SetDlgItemText;
+begin
+ GetProcedureAddress(_SetDlgItemText, user32, 'SetDlgItemText' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetDlgItemText]
+ end;
+end;
+
+var
+ _GetDlgItemTextA: Pointer;
+
+function GetDlgItemTextA;
+begin
+ GetProcedureAddress(_GetDlgItemTextA, user32, 'GetDlgItemTextA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetDlgItemTextA]
+ end;
+end;
+
+var
+ _GetDlgItemTextW: Pointer;
+
+function GetDlgItemTextW;
+begin
+ GetProcedureAddress(_GetDlgItemTextW, user32, 'GetDlgItemTextW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetDlgItemTextW]
+ end;
+end;
+
+var
+ _GetDlgItemText: Pointer;
+
+function GetDlgItemText;
+begin
+ GetProcedureAddress(_GetDlgItemText, user32, 'GetDlgItemText' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetDlgItemText]
+ end;
+end;
+
+var
+ _CheckDlgButton: Pointer;
+
+function CheckDlgButton;
+begin
+ GetProcedureAddress(_CheckDlgButton, user32, 'CheckDlgButton');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CheckDlgButton]
+ end;
+end;
+
+var
+ _CheckRadioButton: Pointer;
+
+function CheckRadioButton;
+begin
+ GetProcedureAddress(_CheckRadioButton, user32, 'CheckRadioButton');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CheckRadioButton]
+ end;
+end;
+
+var
+ _IsDlgButtonChecked: Pointer;
+
+function IsDlgButtonChecked;
+begin
+ GetProcedureAddress(_IsDlgButtonChecked, user32, 'IsDlgButtonChecked');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_IsDlgButtonChecked]
+ end;
+end;
+
+var
+ _SendDlgItemMessageA: Pointer;
+
+function SendDlgItemMessageA;
+begin
+ GetProcedureAddress(_SendDlgItemMessageA, user32, 'SendDlgItemMessageA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SendDlgItemMessageA]
+ end;
+end;
+
+var
+ _SendDlgItemMessageW: Pointer;
+
+function SendDlgItemMessageW;
+begin
+ GetProcedureAddress(_SendDlgItemMessageW, user32, 'SendDlgItemMessageW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SendDlgItemMessageW]
+ end;
+end;
+
+var
+ _SendDlgItemMessage: Pointer;
+
+function SendDlgItemMessage;
+begin
+ GetProcedureAddress(_SendDlgItemMessage, user32, 'SendDlgItemMessage' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SendDlgItemMessage]
+ end;
+end;
+
+var
+ _GetNextDlgGroupItem: Pointer;
+
+function GetNextDlgGroupItem;
+begin
+ GetProcedureAddress(_GetNextDlgGroupItem, user32, 'GetNextDlgGroupItem');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetNextDlgGroupItem]
+ end;
+end;
+
+var
+ _GetNextDlgTabItem: Pointer;
+
+function GetNextDlgTabItem;
+begin
+ GetProcedureAddress(_GetNextDlgTabItem, user32, 'GetNextDlgTabItem');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetNextDlgTabItem]
+ end;
+end;
+
+var
+ _GetDlgCtrlID: Pointer;
+
+function GetDlgCtrlID;
+begin
+ GetProcedureAddress(_GetDlgCtrlID, user32, 'GetDlgCtrlID');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetDlgCtrlID]
+ end;
+end;
+
+var
+ _GetDialogBaseUnits: Pointer;
+
+function GetDialogBaseUnits;
+begin
+ GetProcedureAddress(_GetDialogBaseUnits, user32, 'GetDialogBaseUnits');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetDialogBaseUnits]
+ end;
+end;
+
+var
+ _DefDlgProcA: Pointer;
+
+function DefDlgProcA;
+begin
+ GetProcedureAddress(_DefDlgProcA, user32, 'DefDlgProcA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DefDlgProcA]
+ end;
+end;
+
+var
+ _DefDlgProcW: Pointer;
+
+function DefDlgProcW;
+begin
+ GetProcedureAddress(_DefDlgProcW, user32, 'DefDlgProcW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DefDlgProcW]
+ end;
+end;
+
+var
+ _DefDlgProc: Pointer;
+
+function DefDlgProc;
+begin
+ GetProcedureAddress(_DefDlgProc, user32, 'DefDlgProc' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DefDlgProc]
+ end;
+end;
+
+var
+ _CallMsgFilterA: Pointer;
+
+function CallMsgFilterA;
+begin
+ GetProcedureAddress(_CallMsgFilterA, user32, 'CallMsgFilterA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CallMsgFilterA]
+ end;
+end;
+
+var
+ _CallMsgFilterW: Pointer;
+
+function CallMsgFilterW;
+begin
+ GetProcedureAddress(_CallMsgFilterW, user32, 'CallMsgFilterW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CallMsgFilterW]
+ end;
+end;
+
+var
+ _CallMsgFilter: Pointer;
+
+function CallMsgFilter;
+begin
+ GetProcedureAddress(_CallMsgFilter, user32, 'CallMsgFilter' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CallMsgFilter]
+ end;
+end;
+
+var
+ _OpenClipboard: Pointer;
+
+function OpenClipboard;
+begin
+ GetProcedureAddress(_OpenClipboard, user32, 'OpenClipboard');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_OpenClipboard]
+ end;
+end;
+
+var
+ _CloseClipboard: Pointer;
+
+function CloseClipboard;
+begin
+ GetProcedureAddress(_CloseClipboard, user32, 'CloseClipboard');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CloseClipboard]
+ end;
+end;
+
+var
+ _GetClipboardSequenceNumber: Pointer;
+
+function GetClipboardSequenceNumber;
+begin
+ GetProcedureAddress(_GetClipboardSequenceNumber, user32, 'GetClipboardSequenceNumber');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetClipboardSequenceNumber]
+ end;
+end;
+
+var
+ _GetClipboardOwner: Pointer;
+
+function GetClipboardOwner;
+begin
+ GetProcedureAddress(_GetClipboardOwner, user32, 'GetClipboardOwner');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetClipboardOwner]
+ end;
+end;
+
+var
+ _SetClipboardViewer: Pointer;
+
+function SetClipboardViewer;
+begin
+ GetProcedureAddress(_SetClipboardViewer, user32, 'SetClipboardViewer');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetClipboardViewer]
+ end;
+end;
+
+var
+ _GetClipboardViewer: Pointer;
+
+function GetClipboardViewer;
+begin
+ GetProcedureAddress(_GetClipboardViewer, user32, 'GetClipboardViewer');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetClipboardViewer]
+ end;
+end;
+
+var
+ _ChangeClipboardChain: Pointer;
+
+function ChangeClipboardChain;
+begin
+ GetProcedureAddress(_ChangeClipboardChain, user32, 'ChangeClipboardChain');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ChangeClipboardChain]
+ end;
+end;
+
+var
+ _SetClipboardData: Pointer;
+
+function SetClipboardData;
+begin
+ GetProcedureAddress(_SetClipboardData, user32, 'SetClipboardData');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetClipboardData]
+ end;
+end;
+
+var
+ _GetClipboardData: Pointer;
+
+function GetClipboardData;
+begin
+ GetProcedureAddress(_GetClipboardData, user32, 'GetClipboardData');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetClipboardData]
+ end;
+end;
+
+var
+ _RegisterClipboardFormatA: Pointer;
+
+function RegisterClipboardFormatA;
+begin
+ GetProcedureAddress(_RegisterClipboardFormatA, user32, 'RegisterClipboardFormatA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RegisterClipboardFormatA]
+ end;
+end;
+
+var
+ _RegisterClipboardFormatW: Pointer;
+
+function RegisterClipboardFormatW;
+begin
+ GetProcedureAddress(_RegisterClipboardFormatW, user32, 'RegisterClipboardFormatW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RegisterClipboardFormatW]
+ end;
+end;
+
+var
+ _RegisterClipboardFormat: Pointer;
+
+function RegisterClipboardFormat;
+begin
+ GetProcedureAddress(_RegisterClipboardFormat, user32, 'RegisterClipboardFormat' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RegisterClipboardFormat]
+ end;
+end;
+
+var
+ _CountClipboardFormats: Pointer;
+
+function CountClipboardFormats;
+begin
+ GetProcedureAddress(_CountClipboardFormats, user32, 'CountClipboardFormats');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CountClipboardFormats]
+ end;
+end;
+
+var
+ _EnumClipboardFormats: Pointer;
+
+function EnumClipboardFormats;
+begin
+ GetProcedureAddress(_EnumClipboardFormats, user32, 'EnumClipboardFormats');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_EnumClipboardFormats]
+ end;
+end;
+
+var
+ _GetClipboardFormatNameA: Pointer;
+
+function GetClipboardFormatNameA;
+begin
+ GetProcedureAddress(_GetClipboardFormatNameA, user32, 'GetClipboardFormatNameA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetClipboardFormatNameA]
+ end;
+end;
+
+var
+ _GetClipboardFormatNameW: Pointer;
+
+function GetClipboardFormatNameW;
+begin
+ GetProcedureAddress(_GetClipboardFormatNameW, user32, 'GetClipboardFormatNameW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetClipboardFormatNameW]
+ end;
+end;
+
+var
+ _GetClipboardFormatName: Pointer;
+
+function GetClipboardFormatName;
+begin
+ GetProcedureAddress(_GetClipboardFormatName, user32, 'GetClipboardFormatName' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetClipboardFormatName]
+ end;
+end;
+
+var
+ _EmptyClipboard: Pointer;
+
+function EmptyClipboard;
+begin
+ GetProcedureAddress(_EmptyClipboard, user32, 'EmptyClipboard');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_EmptyClipboard]
+ end;
+end;
+
+var
+ _IsClipboardFormatAvailable: Pointer;
+
+function IsClipboardFormatAvailable;
+begin
+ GetProcedureAddress(_IsClipboardFormatAvailable, user32, 'IsClipboardFormatAvailable');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_IsClipboardFormatAvailable]
+ end;
+end;
+
+var
+ _GetPriorityClipboardFormat: Pointer;
+
+function GetPriorityClipboardFormat;
+begin
+ GetProcedureAddress(_GetPriorityClipboardFormat, user32, 'GetPriorityClipboardFormat');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetPriorityClipboardFormat]
+ end;
+end;
+
+var
+ _GetOpenClipboardWindow: Pointer;
+
+function GetOpenClipboardWindow;
+begin
+ GetProcedureAddress(_GetOpenClipboardWindow, user32, 'GetOpenClipboardWindow');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetOpenClipboardWindow]
+ end;
+end;
+
+var
+ _CharToOemA: Pointer;
+
+function CharToOemA;
+begin
+ GetProcedureAddress(_CharToOemA, user32, 'CharToOemA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CharToOemA]
+ end;
+end;
+
+var
+ _CharToOemW: Pointer;
+
+function CharToOemW;
+begin
+ GetProcedureAddress(_CharToOemW, user32, 'CharToOemW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CharToOemW]
+ end;
+end;
+
+var
+ _CharToOem: Pointer;
+
+function CharToOem;
+begin
+ GetProcedureAddress(_CharToOem, user32, 'CharToOem' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CharToOem]
+ end;
+end;
+
+var
+ _OemToCharA: Pointer;
+
+function OemToCharA;
+begin
+ GetProcedureAddress(_OemToCharA, user32, 'OemToCharA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_OemToCharA]
+ end;
+end;
+
+var
+ _OemToCharW: Pointer;
+
+function OemToCharW;
+begin
+ GetProcedureAddress(_OemToCharW, user32, 'OemToCharW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_OemToCharW]
+ end;
+end;
+
+var
+ _OemToChar: Pointer;
+
+function OemToChar;
+begin
+ GetProcedureAddress(_OemToChar, user32, 'OemToChar' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_OemToChar]
+ end;
+end;
+
+var
+ _CharToOemBuffA: Pointer;
+
+function CharToOemBuffA;
+begin
+ GetProcedureAddress(_CharToOemBuffA, user32, 'CharToOemBuffA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CharToOemBuffA]
+ end;
+end;
+
+var
+ _CharToOemBuffW: Pointer;
+
+function CharToOemBuffW;
+begin
+ GetProcedureAddress(_CharToOemBuffW, user32, 'CharToOemBuffW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CharToOemBuffW]
+ end;
+end;
+
+var
+ _CharToOemBuff: Pointer;
+
+function CharToOemBuff;
+begin
+ GetProcedureAddress(_CharToOemBuff, user32, 'CharToOemBuff' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CharToOemBuff]
+ end;
+end;
+
+var
+ _OemToCharBuffA: Pointer;
+
+function OemToCharBuffA;
+begin
+ GetProcedureAddress(_OemToCharBuffA, user32, 'OemToCharBuffA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_OemToCharBuffA]
+ end;
+end;
+
+var
+ _OemToCharBuffW: Pointer;
+
+function OemToCharBuffW;
+begin
+ GetProcedureAddress(_OemToCharBuffW, user32, 'OemToCharBuffW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_OemToCharBuffW]
+ end;
+end;
+
+var
+ _OemToCharBuff: Pointer;
+
+function OemToCharBuff;
+begin
+ GetProcedureAddress(_OemToCharBuff, user32, 'OemToCharBuff' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_OemToCharBuff]
+ end;
+end;
+
+var
+ _CharUpperA: Pointer;
+
+function CharUpperA;
+begin
+ GetProcedureAddress(_CharUpperA, user32, 'CharUpperA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CharUpperA]
+ end;
+end;
+
+var
+ _CharUpperW: Pointer;
+
+function CharUpperW;
+begin
+ GetProcedureAddress(_CharUpperW, user32, 'CharUpperW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CharUpperW]
+ end;
+end;
+
+var
+ _CharUpper: Pointer;
+
+function CharUpper;
+begin
+ GetProcedureAddress(_CharUpper, user32, 'CharUpper' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CharUpper]
+ end;
+end;
+
+var
+ _CharUpperBuffA: Pointer;
+
+function CharUpperBuffA;
+begin
+ GetProcedureAddress(_CharUpperBuffA, user32, 'CharUpperBuffA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CharUpperBuffA]
+ end;
+end;
+
+var
+ _CharUpperBuffW: Pointer;
+
+function CharUpperBuffW;
+begin
+ GetProcedureAddress(_CharUpperBuffW, user32, 'CharUpperBuffW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CharUpperBuffW]
+ end;
+end;
+
+var
+ _CharUpperBuff: Pointer;
+
+function CharUpperBuff;
+begin
+ GetProcedureAddress(_CharUpperBuff, user32, 'CharUpperBuff' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CharUpperBuff]
+ end;
+end;
+
+var
+ _CharLowerA: Pointer;
+
+function CharLowerA;
+begin
+ GetProcedureAddress(_CharLowerA, user32, 'CharLowerA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CharLowerA]
+ end;
+end;
+
+var
+ _CharLowerW: Pointer;
+
+function CharLowerW;
+begin
+ GetProcedureAddress(_CharLowerW, user32, 'CharLowerW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CharLowerW]
+ end;
+end;
+
+var
+ _CharLower: Pointer;
+
+function CharLower;
+begin
+ GetProcedureAddress(_CharLower, user32, 'CharLower' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CharLower]
+ end;
+end;
+
+var
+ _CharLowerBuffA: Pointer;
+
+function CharLowerBuffA;
+begin
+ GetProcedureAddress(_CharLowerBuffA, user32, 'CharLowerBuffA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CharLowerBuffA]
+ end;
+end;
+
+var
+ _CharLowerBuffW: Pointer;
+
+function CharLowerBuffW;
+begin
+ GetProcedureAddress(_CharLowerBuffW, user32, 'CharLowerBuffW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CharLowerBuffW]
+ end;
+end;
+
+var
+ _CharLowerBuff: Pointer;
+
+function CharLowerBuff;
+begin
+ GetProcedureAddress(_CharLowerBuff, user32, 'CharLowerBuff' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CharLowerBuff]
+ end;
+end;
+
+var
+ _CharNextA: Pointer;
+
+function CharNextA;
+begin
+ GetProcedureAddress(_CharNextA, user32, 'CharNextA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CharNextA]
+ end;
+end;
+
+var
+ _CharNextW: Pointer;
+
+function CharNextW;
+begin
+ GetProcedureAddress(_CharNextW, user32, 'CharNextW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CharNextW]
+ end;
+end;
+
+var
+ _CharNext: Pointer;
+
+function CharNext;
+begin
+ GetProcedureAddress(_CharNext, user32, 'CharNext' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CharNext]
+ end;
+end;
+
+var
+ _CharPrevA: Pointer;
+
+function CharPrevA;
+begin
+ GetProcedureAddress(_CharPrevA, user32, 'CharPrevA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CharPrevA]
+ end;
+end;
+
+var
+ _CharPrevW: Pointer;
+
+function CharPrevW;
+begin
+ GetProcedureAddress(_CharPrevW, user32, 'CharPrevW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CharPrevW]
+ end;
+end;
+
+var
+ _CharPrev: Pointer;
+
+function CharPrev;
+begin
+ GetProcedureAddress(_CharPrev, user32, 'CharPrev' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CharPrev]
+ end;
+end;
+
+var
+ _CharNextExA: Pointer;
+
+function CharNextExA;
+begin
+ GetProcedureAddress(_CharNextExA, user32, 'CharNextExA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CharNextExA]
+ end;
+end;
+
+var
+ _CharPrevExA: Pointer;
+
+function CharPrevExA;
+begin
+ GetProcedureAddress(_CharPrevExA, user32, 'CharPrevExA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CharPrevExA]
+ end;
+end;
+
+var
+ _IsCharAlphaA: Pointer;
+
+function IsCharAlphaA;
+begin
+ GetProcedureAddress(_IsCharAlphaA, user32, 'IsCharAlphaA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_IsCharAlphaA]
+ end;
+end;
+
+var
+ _IsCharAlphaW: Pointer;
+
+function IsCharAlphaW;
+begin
+ GetProcedureAddress(_IsCharAlphaW, user32, 'IsCharAlphaW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_IsCharAlphaW]
+ end;
+end;
+
+var
+ _IsCharAlpha: Pointer;
+
+function IsCharAlpha;
+begin
+ GetProcedureAddress(_IsCharAlpha, user32, 'IsCharAlpha' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_IsCharAlpha]
+ end;
+end;
+
+var
+ _IsCharAlphaNumericA: Pointer;
+
+function IsCharAlphaNumericA;
+begin
+ GetProcedureAddress(_IsCharAlphaNumericA, user32, 'IsCharAlphaNumericA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_IsCharAlphaNumericA]
+ end;
+end;
+
+var
+ _IsCharAlphaNumericW: Pointer;
+
+function IsCharAlphaNumericW;
+begin
+ GetProcedureAddress(_IsCharAlphaNumericW, user32, 'IsCharAlphaNumericW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_IsCharAlphaNumericW]
+ end;
+end;
+
+var
+ _IsCharAlphaNumeric: Pointer;
+
+function IsCharAlphaNumeric;
+begin
+ GetProcedureAddress(_IsCharAlphaNumeric, user32, 'IsCharAlphaNumeric' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_IsCharAlphaNumeric]
+ end;
+end;
+
+var
+ _IsCharUpperA: Pointer;
+
+function IsCharUpperA;
+begin
+ GetProcedureAddress(_IsCharUpperA, user32, 'IsCharUpperA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_IsCharUpperA]
+ end;
+end;
+
+var
+ _IsCharUpperW: Pointer;
+
+function IsCharUpperW;
+begin
+ GetProcedureAddress(_IsCharUpperW, user32, 'IsCharUpperW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_IsCharUpperW]
+ end;
+end;
+
+var
+ _IsCharUpper: Pointer;
+
+function IsCharUpper;
+begin
+ GetProcedureAddress(_IsCharUpper, user32, 'IsCharUpper' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_IsCharUpper]
+ end;
+end;
+
+var
+ _IsCharLowerA: Pointer;
+
+function IsCharLowerA;
+begin
+ GetProcedureAddress(_IsCharLowerA, user32, 'IsCharLowerA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_IsCharLowerA]
+ end;
+end;
+
+var
+ _IsCharLowerW: Pointer;
+
+function IsCharLowerW;
+begin
+ GetProcedureAddress(_IsCharLowerW, user32, 'IsCharLowerW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_IsCharLowerW]
+ end;
+end;
+
+var
+ _IsCharLower: Pointer;
+
+function IsCharLower;
+begin
+ GetProcedureAddress(_IsCharLower, user32, 'IsCharLower' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_IsCharLower]
+ end;
+end;
+
+var
+ _SetFocus: Pointer;
+
+function SetFocus;
+begin
+ GetProcedureAddress(_SetFocus, user32, 'SetFocus');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetFocus]
+ end;
+end;
+
+var
+ _GetActiveWindow: Pointer;
+
+function GetActiveWindow;
+begin
+ GetProcedureAddress(_GetActiveWindow, user32, 'GetActiveWindow');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetActiveWindow]
+ end;
+end;
+
+var
+ _GetFocus: Pointer;
+
+function GetFocus;
+begin
+ GetProcedureAddress(_GetFocus, user32, 'GetFocus');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetFocus]
+ end;
+end;
+
+var
+ _GetKBCodePage: Pointer;
+
+function GetKBCodePage;
+begin
+ GetProcedureAddress(_GetKBCodePage, user32, 'GetKBCodePage');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetKBCodePage]
+ end;
+end;
+
+var
+ _GetKeyState: Pointer;
+
+function GetKeyState;
+begin
+ GetProcedureAddress(_GetKeyState, user32, 'GetKeyState');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetKeyState]
+ end;
+end;
+
+var
+ _GetAsyncKeyState: Pointer;
+
+function GetAsyncKeyState;
+begin
+ GetProcedureAddress(_GetAsyncKeyState, user32, 'GetAsyncKeyState');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetAsyncKeyState]
+ end;
+end;
+
+var
+ _GetKeyboardState: Pointer;
+
+function GetKeyboardState;
+begin
+ GetProcedureAddress(_GetKeyboardState, user32, 'GetKeyboardState');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetKeyboardState]
+ end;
+end;
+
+var
+ _SetKeyboardState: Pointer;
+
+function SetKeyboardState;
+begin
+ GetProcedureAddress(_SetKeyboardState, user32, 'SetKeyboardState');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetKeyboardState]
+ end;
+end;
+
+var
+ _GetKeyNameTextA: Pointer;
+
+function GetKeyNameTextA;
+begin
+ GetProcedureAddress(_GetKeyNameTextA, user32, 'GetKeyNameTextA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetKeyNameTextA]
+ end;
+end;
+
+var
+ _GetKeyNameTextW: Pointer;
+
+function GetKeyNameTextW;
+begin
+ GetProcedureAddress(_GetKeyNameTextW, user32, 'GetKeyNameTextW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetKeyNameTextW]
+ end;
+end;
+
+var
+ _GetKeyNameText: Pointer;
+
+function GetKeyNameText;
+begin
+ GetProcedureAddress(_GetKeyNameText, user32, 'GetKeyNameText' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetKeyNameText]
+ end;
+end;
+
+var
+ _GetKeyboardType: Pointer;
+
+function GetKeyboardType;
+begin
+ GetProcedureAddress(_GetKeyboardType, user32, 'GetKeyboardType');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetKeyboardType]
+ end;
+end;
+
+var
+ _ToAscii: Pointer;
+
+function ToAscii;
+begin
+ GetProcedureAddress(_ToAscii, user32, 'ToAscii');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ToAscii]
+ end;
+end;
+
+var
+ _ToAsciiEx: Pointer;
+
+function ToAsciiEx;
+begin
+ GetProcedureAddress(_ToAsciiEx, user32, 'ToAsciiEx');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ToAsciiEx]
+ end;
+end;
+
+var
+ _ToUnicode: Pointer;
+
+function ToUnicode;
+begin
+ GetProcedureAddress(_ToUnicode, user32, 'ToUnicode');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ToUnicode]
+ end;
+end;
+
+var
+ _OemKeyScan: Pointer;
+
+function OemKeyScan;
+begin
+ GetProcedureAddress(_OemKeyScan, user32, 'OemKeyScan');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_OemKeyScan]
+ end;
+end;
+
+var
+ _VkKeyScanA: Pointer;
+
+function VkKeyScanA;
+begin
+ GetProcedureAddress(_VkKeyScanA, user32, 'VkKeyScanA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_VkKeyScanA]
+ end;
+end;
+
+var
+ _VkKeyScanW: Pointer;
+
+function VkKeyScanW;
+begin
+ GetProcedureAddress(_VkKeyScanW, user32, 'VkKeyScanW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_VkKeyScanW]
+ end;
+end;
+
+var
+ _VkKeyScan: Pointer;
+
+function VkKeyScan;
+begin
+ GetProcedureAddress(_VkKeyScan, user32, 'VkKeyScan' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_VkKeyScan]
+ end;
+end;
+
+var
+ _VkKeyScanExA: Pointer;
+
+function VkKeyScanExA;
+begin
+ GetProcedureAddress(_VkKeyScanExA, user32, 'VkKeyScanExA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_VkKeyScanExA]
+ end;
+end;
+
+var
+ _VkKeyScanExW: Pointer;
+
+function VkKeyScanExW;
+begin
+ GetProcedureAddress(_VkKeyScanExW, user32, 'VkKeyScanExW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_VkKeyScanExW]
+ end;
+end;
+
+var
+ _VkKeyScanEx: Pointer;
+
+function VkKeyScanEx;
+begin
+ GetProcedureAddress(_VkKeyScanEx, user32, 'VkKeyScanEx' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_VkKeyScanEx]
+ end;
+end;
+
+var
+ _keybd_event: Pointer;
+
+procedure keybd_event;
+begin
+ GetProcedureAddress(_keybd_event, user32, 'keybd_event');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_keybd_event]
+ end;
+end;
+
+var
+ _mouse_event: Pointer;
+
+procedure mouse_event;
+begin
+ GetProcedureAddress(_mouse_event, user32, 'mouse_event');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_mouse_event]
+ end;
+end;
+
+var
+ _SendInput: Pointer;
+
+function SendInput;
+begin
+ GetProcedureAddress(_SendInput, user32, 'SendInput');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SendInput]
+ end;
+end;
+
+var
+ _GetLastInputInfo: Pointer;
+
+function GetLastInputInfo;
+begin
+ GetProcedureAddress(_GetLastInputInfo, user32, 'GetLastInputInfo');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetLastInputInfo]
+ end;
+end;
+
+var
+ _MapVirtualKeyA: Pointer;
+
+function MapVirtualKeyA;
+begin
+ GetProcedureAddress(_MapVirtualKeyA, user32, 'MapVirtualKeyA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MapVirtualKeyA]
+ end;
+end;
+
+var
+ _MapVirtualKeyW: Pointer;
+
+function MapVirtualKeyW;
+begin
+ GetProcedureAddress(_MapVirtualKeyW, user32, 'MapVirtualKeyW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MapVirtualKeyW]
+ end;
+end;
+
+var
+ _MapVirtualKey: Pointer;
+
+function MapVirtualKey;
+begin
+ GetProcedureAddress(_MapVirtualKey, user32, 'MapVirtualKey' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MapVirtualKey]
+ end;
+end;
+
+var
+ _MapVirtualKeyExA: Pointer;
+
+function MapVirtualKeyExA;
+begin
+ GetProcedureAddress(_MapVirtualKeyExA, user32, 'MapVirtualKeyExA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MapVirtualKeyExA]
+ end;
+end;
+
+var
+ _MapVirtualKeyExW: Pointer;
+
+function MapVirtualKeyExW;
+begin
+ GetProcedureAddress(_MapVirtualKeyExW, user32, 'MapVirtualKeyExW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MapVirtualKeyExW]
+ end;
+end;
+
+var
+ _MapVirtualKeyEx: Pointer;
+
+function MapVirtualKeyEx;
+begin
+ GetProcedureAddress(_MapVirtualKeyEx, user32, 'MapVirtualKeyEx' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MapVirtualKeyEx]
+ end;
+end;
+
+var
+ _GetInputState: Pointer;
+
+function GetInputState;
+begin
+ GetProcedureAddress(_GetInputState, user32, 'GetInputState');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetInputState]
+ end;
+end;
+
+var
+ _GetQueueStatus: Pointer;
+
+function GetQueueStatus;
+begin
+ GetProcedureAddress(_GetQueueStatus, user32, 'GetQueueStatus');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetQueueStatus]
+ end;
+end;
+
+var
+ _GetCapture: Pointer;
+
+function GetCapture;
+begin
+ GetProcedureAddress(_GetCapture, user32, 'GetCapture');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetCapture]
+ end;
+end;
+
+var
+ _SetCapture: Pointer;
+
+function SetCapture;
+begin
+ GetProcedureAddress(_SetCapture, user32, 'SetCapture');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetCapture]
+ end;
+end;
+
+var
+ _ReleaseCapture: Pointer;
+
+function ReleaseCapture;
+begin
+ GetProcedureAddress(_ReleaseCapture, user32, 'ReleaseCapture');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ReleaseCapture]
+ end;
+end;
+
+var
+ _MsgWaitForMultipleObjects: Pointer;
+
+function MsgWaitForMultipleObjects;
+begin
+ GetProcedureAddress(_MsgWaitForMultipleObjects, user32, 'MsgWaitForMultipleObjects');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsgWaitForMultipleObjects]
+ end;
+end;
+
+var
+ _MsgWaitForMultipleObjectsEx: Pointer;
+
+function MsgWaitForMultipleObjectsEx;
+begin
+ GetProcedureAddress(_MsgWaitForMultipleObjectsEx, user32, 'MsgWaitForMultipleObjectsEx');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MsgWaitForMultipleObjectsEx]
+ end;
+end;
+
+var
+ _SetTimer: Pointer;
+
+function SetTimer;
+begin
+ GetProcedureAddress(_SetTimer, user32, 'SetTimer');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetTimer]
+ end;
+end;
+
+var
+ _KillTimer: Pointer;
+
+function KillTimer;
+begin
+ GetProcedureAddress(_KillTimer, user32, 'KillTimer');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_KillTimer]
+ end;
+end;
+
+var
+ _IsWindowUnicode: Pointer;
+
+function IsWindowUnicode;
+begin
+ GetProcedureAddress(_IsWindowUnicode, user32, 'IsWindowUnicode');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_IsWindowUnicode]
+ end;
+end;
+
+var
+ _EnableWindow: Pointer;
+
+function EnableWindow;
+begin
+ GetProcedureAddress(_EnableWindow, user32, 'EnableWindow');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_EnableWindow]
+ end;
+end;
+
+var
+ _IsWindowEnabled: Pointer;
+
+function IsWindowEnabled;
+begin
+ GetProcedureAddress(_IsWindowEnabled, user32, 'IsWindowEnabled');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_IsWindowEnabled]
+ end;
+end;
+
+var
+ _LoadAcceleratorsA: Pointer;
+
+function LoadAcceleratorsA;
+begin
+ GetProcedureAddress(_LoadAcceleratorsA, user32, 'LoadAcceleratorsA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_LoadAcceleratorsA]
+ end;
+end;
+
+var
+ _LoadAcceleratorsW: Pointer;
+
+function LoadAcceleratorsW;
+begin
+ GetProcedureAddress(_LoadAcceleratorsW, user32, 'LoadAcceleratorsW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_LoadAcceleratorsW]
+ end;
+end;
+
+var
+ _LoadAccelerators: Pointer;
+
+function LoadAccelerators;
+begin
+ GetProcedureAddress(_LoadAccelerators, user32, 'LoadAccelerators' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_LoadAccelerators]
+ end;
+end;
+
+var
+ _CreateAcceleratorTableA: Pointer;
+
+function CreateAcceleratorTableA;
+begin
+ GetProcedureAddress(_CreateAcceleratorTableA, user32, 'CreateAcceleratorTableA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreateAcceleratorTableA]
+ end;
+end;
+
+var
+ _CreateAcceleratorTableW: Pointer;
+
+function CreateAcceleratorTableW;
+begin
+ GetProcedureAddress(_CreateAcceleratorTableW, user32, 'CreateAcceleratorTableW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreateAcceleratorTableW]
+ end;
+end;
+
+var
+ _CreateAcceleratorTable: Pointer;
+
+function CreateAcceleratorTable;
+begin
+ GetProcedureAddress(_CreateAcceleratorTable, user32, 'CreateAcceleratorTable' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreateAcceleratorTable]
+ end;
+end;
+
+var
+ _DestroyAcceleratorTable: Pointer;
+
+function DestroyAcceleratorTable;
+begin
+ GetProcedureAddress(_DestroyAcceleratorTable, user32, 'DestroyAcceleratorTable');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DestroyAcceleratorTable]
+ end;
+end;
+
+var
+ _CopyAcceleratorTableA: Pointer;
+
+function CopyAcceleratorTableA;
+begin
+ GetProcedureAddress(_CopyAcceleratorTableA, user32, 'CopyAcceleratorTableA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CopyAcceleratorTableA]
+ end;
+end;
+
+var
+ _CopyAcceleratorTableW: Pointer;
+
+function CopyAcceleratorTableW;
+begin
+ GetProcedureAddress(_CopyAcceleratorTableW, user32, 'CopyAcceleratorTableW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CopyAcceleratorTableW]
+ end;
+end;
+
+var
+ _CopyAcceleratorTable: Pointer;
+
+function CopyAcceleratorTable;
+begin
+ GetProcedureAddress(_CopyAcceleratorTable, user32, 'CopyAcceleratorTable' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CopyAcceleratorTable]
+ end;
+end;
+
+var
+ _TranslateAcceleratorA: Pointer;
+
+function TranslateAcceleratorA;
+begin
+ GetProcedureAddress(_TranslateAcceleratorA, user32, 'TranslateAcceleratorA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_TranslateAcceleratorA]
+ end;
+end;
+
+var
+ _TranslateAcceleratorW: Pointer;
+
+function TranslateAcceleratorW;
+begin
+ GetProcedureAddress(_TranslateAcceleratorW, user32, 'TranslateAcceleratorW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_TranslateAcceleratorW]
+ end;
+end;
+
+var
+ _TranslateAccelerator: Pointer;
+
+function TranslateAccelerator;
+begin
+ GetProcedureAddress(_TranslateAccelerator, user32, 'TranslateAccelerator' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_TranslateAccelerator]
+ end;
+end;
+
+var
+ _GetSystemMetrics: Pointer;
+
+function GetSystemMetrics;
+begin
+ GetProcedureAddress(_GetSystemMetrics, user32, 'GetSystemMetrics');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetSystemMetrics]
+ end;
+end;
+
+var
+ _LoadMenuA: Pointer;
+
+function LoadMenuA;
+begin
+ GetProcedureAddress(_LoadMenuA, user32, 'LoadMenuAA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_LoadMenuA]
+ end;
+end;
+
+var
+ _LoadMenuW: Pointer;
+
+function LoadMenuW;
+begin
+ GetProcedureAddress(_LoadMenuW, user32, 'LoadMenuWA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_LoadMenuW]
+ end;
+end;
+
+var
+ _LoadMenu: Pointer;
+
+function LoadMenu;
+begin
+ GetProcedureAddress(_LoadMenu, user32, 'LoadMenu' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_LoadMenu]
+ end;
+end;
+
+var
+ _LoadMenuIndirectA: Pointer;
+
+function LoadMenuIndirectA;
+begin
+ GetProcedureAddress(_LoadMenuIndirectA, user32, 'LoadMenuIndirectA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_LoadMenuIndirectA]
+ end;
+end;
+
+var
+ _LoadMenuIndirectW: Pointer;
+
+function LoadMenuIndirectW;
+begin
+ GetProcedureAddress(_LoadMenuIndirectW, user32, 'LoadMenuIndirectW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_LoadMenuIndirectW]
+ end;
+end;
+
+var
+ _LoadMenuIndirect: Pointer;
+
+function LoadMenuIndirect;
+begin
+ GetProcedureAddress(_LoadMenuIndirect, user32, 'LoadMenuIndirect' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_LoadMenuIndirect]
+ end;
+end;
+
+var
+ _GetMenu: Pointer;
+
+function GetMenu;
+begin
+ GetProcedureAddress(_GetMenu, user32, 'GetMenu');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetMenu]
+ end;
+end;
+
+var
+ _SetMenu: Pointer;
+
+function SetMenu;
+begin
+ GetProcedureAddress(_SetMenu, user32, 'SetMenu');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetMenu]
+ end;
+end;
+
+var
+ _ChangeMenuA: Pointer;
+
+function ChangeMenuA;
+begin
+ GetProcedureAddress(_ChangeMenuA, user32, 'ChangeMenuA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ChangeMenuA]
+ end;
+end;
+
+var
+ _ChangeMenuW: Pointer;
+
+function ChangeMenuW;
+begin
+ GetProcedureAddress(_ChangeMenuW, user32, 'ChangeMenuW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ChangeMenuW]
+ end;
+end;
+
+var
+ _ChangeMenu: Pointer;
+
+function ChangeMenu;
+begin
+ GetProcedureAddress(_ChangeMenu, user32, 'ChangeMenu' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ChangeMenu]
+ end;
+end;
+
+var
+ _HiliteMenuItem: Pointer;
+
+function HiliteMenuItem;
+begin
+ GetProcedureAddress(_HiliteMenuItem, user32, 'HiliteMenuItem');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_HiliteMenuItem]
+ end;
+end;
+
+var
+ _GetMenuStringA: Pointer;
+
+function GetMenuStringA;
+begin
+ GetProcedureAddress(_GetMenuStringA, user32, 'GetMenuStringA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetMenuStringA]
+ end;
+end;
+
+var
+ _GetMenuStringW: Pointer;
+
+function GetMenuStringW;
+begin
+ GetProcedureAddress(_GetMenuStringW, user32, 'GetMenuStringW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetMenuStringW]
+ end;
+end;
+
+var
+ _GetMenuString: Pointer;
+
+function GetMenuString;
+begin
+ GetProcedureAddress(_GetMenuString, user32, 'GetMenuString' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetMenuString]
+ end;
+end;
+
+var
+ _GetMenuState: Pointer;
+
+function GetMenuState;
+begin
+ GetProcedureAddress(_GetMenuState, user32, 'GetMenuState');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetMenuState]
+ end;
+end;
+
+var
+ _DrawMenuBar: Pointer;
+
+function DrawMenuBar;
+begin
+ GetProcedureAddress(_DrawMenuBar, user32, 'DrawMenuBar');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DrawMenuBar]
+ end;
+end;
+
+var
+ _GetSystemMenu: Pointer;
+
+function GetSystemMenu;
+begin
+ GetProcedureAddress(_GetSystemMenu, user32, 'GetSystemMenu');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetSystemMenu]
+ end;
+end;
+
+var
+ _CreateMenu: Pointer;
+
+function CreateMenu;
+begin
+ GetProcedureAddress(_CreateMenu, user32, 'CreateMenu');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreateMenu]
+ end;
+end;
+
+var
+ _CreatePopupMenu: Pointer;
+
+function CreatePopupMenu;
+begin
+ GetProcedureAddress(_CreatePopupMenu, user32, 'CreatePopupMenu');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreatePopupMenu]
+ end;
+end;
+
+var
+ _DestroyMenu: Pointer;
+
+function DestroyMenu;
+begin
+ GetProcedureAddress(_DestroyMenu, user32, 'DestroyMenu');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DestroyMenu]
+ end;
+end;
+
+var
+ _CheckMenuItem: Pointer;
+
+function CheckMenuItem;
+begin
+ GetProcedureAddress(_CheckMenuItem, user32, 'CheckMenuItem');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CheckMenuItem]
+ end;
+end;
+
+var
+ _EnableMenuItem: Pointer;
+
+function EnableMenuItem;
+begin
+ GetProcedureAddress(_EnableMenuItem, user32, 'EnableMenuItem');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_EnableMenuItem]
+ end;
+end;
+
+var
+ _GetSubMenu: Pointer;
+
+function GetSubMenu;
+begin
+ GetProcedureAddress(_GetSubMenu, user32, 'GetSubMenu');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetSubMenu]
+ end;
+end;
+
+var
+ _GetMenuItemID: Pointer;
+
+function GetMenuItemID;
+begin
+ GetProcedureAddress(_GetMenuItemID, user32, 'GetMenuItemID');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetMenuItemID]
+ end;
+end;
+
+var
+ _GetMenuItemCount: Pointer;
+
+function GetMenuItemCount;
+begin
+ GetProcedureAddress(_GetMenuItemCount, user32, 'GetMenuItemCount');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetMenuItemCount]
+ end;
+end;
+
+var
+ _InsertMenuA: Pointer;
+
+function InsertMenuA;
+begin
+ GetProcedureAddress(_InsertMenuA, user32, 'InsertMenuA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_InsertMenuA]
+ end;
+end;
+
+var
+ _InsertMenuW: Pointer;
+
+function InsertMenuW;
+begin
+ GetProcedureAddress(_InsertMenuW, user32, 'InsertMenuW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_InsertMenuW]
+ end;
+end;
+
+var
+ _InsertMenu: Pointer;
+
+function InsertMenu;
+begin
+ GetProcedureAddress(_InsertMenu, user32, 'InsertMenu' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_InsertMenu]
+ end;
+end;
+
+var
+ _AppendMenuA: Pointer;
+
+function AppendMenuA;
+begin
+ GetProcedureAddress(_AppendMenuA, user32, 'AppendMenuA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_AppendMenuA]
+ end;
+end;
+
+var
+ _AppendMenuW: Pointer;
+
+function AppendMenuW;
+begin
+ GetProcedureAddress(_AppendMenuW, user32, 'AppendMenuW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_AppendMenuW]
+ end;
+end;
+
+var
+ _AppendMenu: Pointer;
+
+function AppendMenu;
+begin
+ GetProcedureAddress(_AppendMenu, user32, 'AppendMenu' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_AppendMenu]
+ end;
+end;
+
+var
+ _ModifyMenuA: Pointer;
+
+function ModifyMenuA;
+begin
+ GetProcedureAddress(_ModifyMenuA, user32, 'ModifyMenuA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ModifyMenuA]
+ end;
+end;
+
+var
+ _ModifyMenuW: Pointer;
+
+function ModifyMenuW;
+begin
+ GetProcedureAddress(_ModifyMenuW, user32, 'ModifyMenuW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ModifyMenuW]
+ end;
+end;
+
+var
+ _ModifyMenu: Pointer;
+
+function ModifyMenu;
+begin
+ GetProcedureAddress(_ModifyMenu, user32, 'ModifyMenu' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ModifyMenu]
+ end;
+end;
+
+var
+ _RemoveMenu: Pointer;
+
+function RemoveMenu;
+begin
+ GetProcedureAddress(_RemoveMenu, user32, 'RemoveMenu');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RemoveMenu]
+ end;
+end;
+
+var
+ _DeleteMenu: Pointer;
+
+function DeleteMenu;
+begin
+ GetProcedureAddress(_DeleteMenu, user32, 'DeleteMenu');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DeleteMenu]
+ end;
+end;
+
+var
+ _SetMenuItemBitmaps: Pointer;
+
+function SetMenuItemBitmaps;
+begin
+ GetProcedureAddress(_SetMenuItemBitmaps, user32, 'SetMenuItemBitmaps');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetMenuItemBitmaps]
+ end;
+end;
+
+var
+ _GetMenuCheckMarkDimensions: Pointer;
+
+function GetMenuCheckMarkDimensions;
+begin
+ GetProcedureAddress(_GetMenuCheckMarkDimensions, user32, 'GetMenuCheckMarkDimensions');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetMenuCheckMarkDimensions]
+ end;
+end;
+
+var
+ _TrackPopupMenu: Pointer;
+
+function TrackPopupMenu;
+begin
+ GetProcedureAddress(_TrackPopupMenu, user32, 'TrackPopupMenu');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_TrackPopupMenu]
+ end;
+end;
+
+var
+ _TrackPopupMenuEx: Pointer;
+
+function TrackPopupMenuEx;
+begin
+ GetProcedureAddress(_TrackPopupMenuEx, user32, 'TrackPopupMenuEx');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_TrackPopupMenuEx]
+ end;
+end;
+
+var
+ _GetMenuInfo: Pointer;
+
+function GetMenuInfo;
+begin
+ GetProcedureAddress(_GetMenuInfo, user32, 'GetMenuInfo');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetMenuInfo]
+ end;
+end;
+
+var
+ _SetMenuInfo: Pointer;
+
+function SetMenuInfo;
+begin
+ GetProcedureAddress(_SetMenuInfo, user32, 'SetMenuInfo');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetMenuInfo]
+ end;
+end;
+
+var
+ _EndMenu: Pointer;
+
+function EndMenu;
+begin
+ GetProcedureAddress(_EndMenu, user32, 'EndMenu');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_EndMenu]
+ end;
+end;
+
+var
+ _InsertMenuItemA: Pointer;
+
+function InsertMenuItemA;
+begin
+ GetProcedureAddress(_InsertMenuItemA, user32, 'InsertMenuItemA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_InsertMenuItemA]
+ end;
+end;
+
+var
+ _InsertMenuItemW: Pointer;
+
+function InsertMenuItemW;
+begin
+ GetProcedureAddress(_InsertMenuItemW, user32, 'InsertMenuItemW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_InsertMenuItemW]
+ end;
+end;
+
+var
+ _InsertMenuItem: Pointer;
+
+function InsertMenuItem;
+begin
+ GetProcedureAddress(_InsertMenuItem, user32, 'InsertMenuItem' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_InsertMenuItem]
+ end;
+end;
+
+var
+ _GetMenuItemInfoA: Pointer;
+
+function GetMenuItemInfoA;
+begin
+ GetProcedureAddress(_GetMenuItemInfoA, user32, 'GetMenuItemInfoA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetMenuItemInfoA]
+ end;
+end;
+
+var
+ _GetMenuItemInfoW: Pointer;
+
+function GetMenuItemInfoW;
+begin
+ GetProcedureAddress(_GetMenuItemInfoW, user32, 'GetMenuItemInfoW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetMenuItemInfoW]
+ end;
+end;
+
+var
+ _GetMenuItemInfo: Pointer;
+
+function GetMenuItemInfo;
+begin
+ GetProcedureAddress(_GetMenuItemInfo, user32, 'GetMenuItemInfo' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetMenuItemInfo]
+ end;
+end;
+
+var
+ _SetMenuItemInfoA: Pointer;
+
+function SetMenuItemInfoA;
+begin
+ GetProcedureAddress(_SetMenuItemInfoA, user32, 'SetMenuItemInfoA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetMenuItemInfoA]
+ end;
+end;
+
+var
+ _SetMenuItemInfoW: Pointer;
+
+function SetMenuItemInfoW;
+begin
+ GetProcedureAddress(_SetMenuItemInfoW, user32, 'SetMenuItemInfoW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetMenuItemInfoW]
+ end;
+end;
+
+var
+ _SetMenuItemInfo: Pointer;
+
+function SetMenuItemInfo;
+begin
+ GetProcedureAddress(_SetMenuItemInfo, user32, 'SetMenuItemInfo' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetMenuItemInfo]
+ end;
+end;
+
+var
+ _GetMenuDefaultItem: Pointer;
+
+function GetMenuDefaultItem;
+begin
+ GetProcedureAddress(_GetMenuDefaultItem, user32, 'GetMenuDefaultItem');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetMenuDefaultItem]
+ end;
+end;
+
+var
+ _SetMenuDefaultItem: Pointer;
+
+function SetMenuDefaultItem;
+begin
+ GetProcedureAddress(_SetMenuDefaultItem, user32, 'SetMenuDefaultItem');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetMenuDefaultItem]
+ end;
+end;
+
+var
+ _GetMenuItemRect: Pointer;
+
+function GetMenuItemRect;
+begin
+ GetProcedureAddress(_GetMenuItemRect, user32, 'GetMenuItemRect');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetMenuItemRect]
+ end;
+end;
+
+var
+ _MenuItemFromPoint: Pointer;
+
+function MenuItemFromPoint;
+begin
+ GetProcedureAddress(_MenuItemFromPoint, user32, 'MenuItemFromPoint');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MenuItemFromPoint]
+ end;
+end;
+
+var
+ _DragObject: Pointer;
+
+function DragObject;
+begin
+ GetProcedureAddress(_DragObject, user32, 'DragObject');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DragObject]
+ end;
+end;
+
+var
+ _DragDetect: Pointer;
+
+function DragDetect;
+begin
+ GetProcedureAddress(_DragDetect, user32, 'DragDetect');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DragDetect]
+ end;
+end;
+
+var
+ _DrawIcon: Pointer;
+
+function DrawIcon;
+begin
+ GetProcedureAddress(_DrawIcon, user32, 'DrawIcon');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DrawIcon]
+ end;
+end;
+
+var
+ _DrawTextA: Pointer;
+
+function DrawTextA;
+begin
+ GetProcedureAddress(_DrawTextA, user32, 'DrawTextA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DrawTextA]
+ end;
+end;
+
+var
+ _DrawTextW: Pointer;
+
+function DrawTextW;
+begin
+ GetProcedureAddress(_DrawTextW, user32, 'DrawTextW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DrawTextW]
+ end;
+end;
+
+var
+ _DrawText: Pointer;
+
+function DrawText;
+begin
+ GetProcedureAddress(_DrawText, user32, 'DrawText' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DrawText]
+ end;
+end;
+
+var
+ _DrawTextExA: Pointer;
+
+function DrawTextExA;
+begin
+ GetProcedureAddress(_DrawTextExA, user32, 'DrawTextExA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DrawTextExA]
+ end;
+end;
+
+var
+ _DrawTextExW: Pointer;
+
+function DrawTextExW;
+begin
+ GetProcedureAddress(_DrawTextExW, user32, 'DrawTextExW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DrawTextExW]
+ end;
+end;
+
+var
+ _DrawTextEx: Pointer;
+
+function DrawTextEx;
+begin
+ GetProcedureAddress(_DrawTextEx, user32, 'DrawTextEx' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DrawTextEx]
+ end;
+end;
+
+var
+ _GrayStringA: Pointer;
+
+function GrayStringA;
+begin
+ GetProcedureAddress(_GrayStringA, user32, 'GrayStringA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GrayStringA]
+ end;
+end;
+
+var
+ _GrayStringW: Pointer;
+
+function GrayStringW;
+begin
+ GetProcedureAddress(_GrayStringW, user32, 'GrayStringW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GrayStringW]
+ end;
+end;
+
+var
+ _GrayString: Pointer;
+
+function GrayString;
+begin
+ GetProcedureAddress(_GrayString, user32, 'GrayString' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GrayString]
+ end;
+end;
+
+var
+ _DrawStateA: Pointer;
+
+function DrawStateA;
+begin
+ GetProcedureAddress(_DrawStateA, user32, 'DrawStateA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DrawStateA]
+ end;
+end;
+
+var
+ _DrawStateW: Pointer;
+
+function DrawStateW;
+begin
+ GetProcedureAddress(_DrawStateW, user32, 'DrawStateW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DrawStateW]
+ end;
+end;
+
+var
+ _DrawState: Pointer;
+
+function DrawState;
+begin
+ GetProcedureAddress(_DrawState, user32, 'DrawState' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DrawState]
+ end;
+end;
+
+var
+ _TabbedTextOutA: Pointer;
+
+function TabbedTextOutA;
+begin
+ GetProcedureAddress(_TabbedTextOutA, user32, 'TabbedTextOutA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_TabbedTextOutA]
+ end;
+end;
+
+var
+ _TabbedTextOutW: Pointer;
+
+function TabbedTextOutW;
+begin
+ GetProcedureAddress(_TabbedTextOutW, user32, 'TabbedTextOutW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_TabbedTextOutW]
+ end;
+end;
+
+var
+ _TabbedTextOut: Pointer;
+
+function TabbedTextOut;
+begin
+ GetProcedureAddress(_TabbedTextOut, user32, 'TabbedTextOut' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_TabbedTextOut]
+ end;
+end;
+
+var
+ _GetTabbedTextExtentA: Pointer;
+
+function GetTabbedTextExtentA;
+begin
+ GetProcedureAddress(_GetTabbedTextExtentA, user32, 'GetTabbedTextExtentA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetTabbedTextExtentA]
+ end;
+end;
+
+var
+ _GetTabbedTextExtentW: Pointer;
+
+function GetTabbedTextExtentW;
+begin
+ GetProcedureAddress(_GetTabbedTextExtentW, user32, 'GetTabbedTextExtentW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetTabbedTextExtentW]
+ end;
+end;
+
+var
+ _GetTabbedTextExtent: Pointer;
+
+function GetTabbedTextExtent;
+begin
+ GetProcedureAddress(_GetTabbedTextExtent, user32, 'GetTabbedTextExtent' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetTabbedTextExtent]
+ end;
+end;
+
+var
+ _UpdateWindow: Pointer;
+
+function UpdateWindow;
+begin
+ GetProcedureAddress(_UpdateWindow, user32, 'UpdateWindow');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_UpdateWindow]
+ end;
+end;
+
+var
+ _SetActiveWindow: Pointer;
+
+function SetActiveWindow;
+begin
+ GetProcedureAddress(_SetActiveWindow, user32, 'SetActiveWindow');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetActiveWindow]
+ end;
+end;
+
+var
+ _GetForegroundWindow: Pointer;
+
+function GetForegroundWindow;
+begin
+ GetProcedureAddress(_GetForegroundWindow, user32, 'GetForegroundWindow');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetForegroundWindow]
+ end;
+end;
+
+var
+ _PaintDesktop: Pointer;
+
+function PaintDesktop;
+begin
+ GetProcedureAddress(_PaintDesktop, user32, 'PaintDesktop');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PaintDesktop]
+ end;
+end;
+
+var
+ _SwitchToThisWindow: Pointer;
+
+procedure SwitchToThisWindow;
+begin
+ GetProcedureAddress(_SwitchToThisWindow, user32, 'SwitchToThisWindow');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SwitchToThisWindow]
+ end;
+end;
+
+var
+ _SetForegroundWindow: Pointer;
+
+function SetForegroundWindow;
+begin
+ GetProcedureAddress(_SetForegroundWindow, user32, 'SetForegroundWindow');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetForegroundWindow]
+ end;
+end;
+
+var
+ _AllowSetForegroundWindow: Pointer;
+
+function AllowSetForegroundWindow;
+begin
+ GetProcedureAddress(_AllowSetForegroundWindow, user32, 'AllowSetForegroundWindow');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_AllowSetForegroundWindow]
+ end;
+end;
+
+var
+ _LockSetForegroundWindow: Pointer;
+
+function LockSetForegroundWindow;
+begin
+ GetProcedureAddress(_LockSetForegroundWindow, user32, 'LockSetForegroundWindow');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_LockSetForegroundWindow]
+ end;
+end;
+
+var
+ _WindowFromDC: Pointer;
+
+function WindowFromDC;
+begin
+ GetProcedureAddress(_WindowFromDC, user32, 'WindowFromDC');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WindowFromDC]
+ end;
+end;
+
+var
+ _GetDC: Pointer;
+
+function GetDC;
+begin
+ GetProcedureAddress(_GetDC, user32, 'GetDC');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetDC]
+ end;
+end;
+
+var
+ _GetDCEx: Pointer;
+
+function GetDCEx;
+begin
+ GetProcedureAddress(_GetDCEx, user32, 'GetDCEx');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetDCEx]
+ end;
+end;
+
+var
+ _GetWindowDC: Pointer;
+
+function GetWindowDC;
+begin
+ GetProcedureAddress(_GetWindowDC, user32, 'GetWindowDC');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetWindowDC]
+ end;
+end;
+
+var
+ _ReleaseDC: Pointer;
+
+function ReleaseDC;
+begin
+ GetProcedureAddress(_ReleaseDC, user32, 'ReleaseDC');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ReleaseDC]
+ end;
+end;
+
+var
+ _BeginPaint: Pointer;
+
+function BeginPaint;
+begin
+ GetProcedureAddress(_BeginPaint, user32, 'BeginPaint');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_BeginPaint]
+ end;
+end;
+
+var
+ _EndPaint: Pointer;
+
+function EndPaint;
+begin
+ GetProcedureAddress(_EndPaint, user32, 'EndPaint');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_EndPaint]
+ end;
+end;
+
+var
+ _GetUpdateRect: Pointer;
+
+function GetUpdateRect;
+begin
+ GetProcedureAddress(_GetUpdateRect, user32, 'GetUpdateRect');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetUpdateRect]
+ end;
+end;
+
+var
+ _GetUpdateRgn: Pointer;
+
+function GetUpdateRgn;
+begin
+ GetProcedureAddress(_GetUpdateRgn, user32, 'GetUpdateRgn');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetUpdateRgn]
+ end;
+end;
+
+var
+ _SetWindowRgn: Pointer;
+
+function SetWindowRgn;
+begin
+ GetProcedureAddress(_SetWindowRgn, user32, 'SetWindowRgn');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetWindowRgn]
+ end;
+end;
+
+var
+ _GetWindowRgn: Pointer;
+
+function GetWindowRgn;
+begin
+ GetProcedureAddress(_GetWindowRgn, user32, 'GetWindowRgn');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetWindowRgn]
+ end;
+end;
+
+var
+ _GetWindowRgnBox: Pointer;
+
+function GetWindowRgnBox;
+begin
+ GetProcedureAddress(_GetWindowRgnBox, user32, 'GetWindowRgnBox');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetWindowRgnBox]
+ end;
+end;
+
+var
+ _ExcludeUpdateRgn: Pointer;
+
+function ExcludeUpdateRgn;
+begin
+ GetProcedureAddress(_ExcludeUpdateRgn, user32, 'ExcludeUpdateRgn');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ExcludeUpdateRgn]
+ end;
+end;
+
+var
+ _InvalidateRect: Pointer;
+
+function InvalidateRect;
+begin
+ GetProcedureAddress(_InvalidateRect, user32, 'InvalidateRect');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_InvalidateRect]
+ end;
+end;
+
+var
+ _ValidateRect: Pointer;
+
+function ValidateRect;
+begin
+ GetProcedureAddress(_ValidateRect, user32, 'ValidateRect');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ValidateRect]
+ end;
+end;
+
+var
+ _InvalidateRgn: Pointer;
+
+function InvalidateRgn;
+begin
+ GetProcedureAddress(_InvalidateRgn, user32, 'InvalidateRgn');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_InvalidateRgn]
+ end;
+end;
+
+var
+ _ValidateRgn: Pointer;
+
+function ValidateRgn;
+begin
+ GetProcedureAddress(_ValidateRgn, user32, 'ValidateRgn');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ValidateRgn]
+ end;
+end;
+
+var
+ _RedrawWindow: Pointer;
+
+function RedrawWindow;
+begin
+ GetProcedureAddress(_RedrawWindow, user32, 'RedrawWindow');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RedrawWindow]
+ end;
+end;
+
+var
+ _LockWindowUpdate: Pointer;
+
+function LockWindowUpdate;
+begin
+ GetProcedureAddress(_LockWindowUpdate, user32, 'LockWindowUpdate');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_LockWindowUpdate]
+ end;
+end;
+
+var
+ _ScrollWindow: Pointer;
+
+function ScrollWindow;
+begin
+ GetProcedureAddress(_ScrollWindow, user32, 'ScrollWindow');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ScrollWindow]
+ end;
+end;
+
+var
+ _ScrollDC: Pointer;
+
+function ScrollDC;
+begin
+ GetProcedureAddress(_ScrollDC, user32, 'ScrollDC');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ScrollDC]
+ end;
+end;
+
+var
+ _ScrollWindowEx: Pointer;
+
+function ScrollWindowEx;
+begin
+ GetProcedureAddress(_ScrollWindowEx, user32, 'ScrollWindowEx');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ScrollWindowEx]
+ end;
+end;
+
+var
+ _SetScrollPos: Pointer;
+
+function SetScrollPos;
+begin
+ GetProcedureAddress(_SetScrollPos, user32, 'SetScrollPos');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetScrollPos]
+ end;
+end;
+
+var
+ _GetScrollPos: Pointer;
+
+function GetScrollPos;
+begin
+ GetProcedureAddress(_GetScrollPos, user32, 'GetScrollPos');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetScrollPos]
+ end;
+end;
+
+var
+ _SetScrollRange: Pointer;
+
+function SetScrollRange;
+begin
+ GetProcedureAddress(_SetScrollRange, user32, 'SetScrollRange');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetScrollRange]
+ end;
+end;
+
+var
+ _GetScrollRange: Pointer;
+
+function GetScrollRange;
+begin
+ GetProcedureAddress(_GetScrollRange, user32, 'GetScrollRange');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetScrollRange]
+ end;
+end;
+
+var
+ _ShowScrollBar: Pointer;
+
+function ShowScrollBar;
+begin
+ GetProcedureAddress(_ShowScrollBar, user32, 'ShowScrollBar');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ShowScrollBar]
+ end;
+end;
+
+var
+ _EnableScrollBar: Pointer;
+
+function EnableScrollBar;
+begin
+ GetProcedureAddress(_EnableScrollBar, user32, 'EnableScrollBar');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_EnableScrollBar]
+ end;
+end;
+
+var
+ _SetPropA: Pointer;
+
+function SetPropA;
+begin
+ GetProcedureAddress(_SetPropA, user32, 'SetPropA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetPropA]
+ end;
+end;
+
+var
+ _SetPropW: Pointer;
+
+function SetPropW;
+begin
+ GetProcedureAddress(_SetPropW, user32, 'SetPropW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetPropW]
+ end;
+end;
+
+var
+ _SetProp: Pointer;
+
+function SetProp;
+begin
+ GetProcedureAddress(_SetProp, user32, 'SetProp' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetProp]
+ end;
+end;
+
+var
+ _GetPropA: Pointer;
+
+function GetPropA;
+begin
+ GetProcedureAddress(_GetPropA, user32, 'GetPropA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetPropA]
+ end;
+end;
+
+var
+ _GetPropW: Pointer;
+
+function GetPropW;
+begin
+ GetProcedureAddress(_GetPropW, user32, 'GetPropW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetPropW]
+ end;
+end;
+
+var
+ _GetProp: Pointer;
+
+function GetProp;
+begin
+ GetProcedureAddress(_GetProp, user32, 'GetProp' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetProp]
+ end;
+end;
+
+var
+ _RemovePropA: Pointer;
+
+function RemovePropA;
+begin
+ GetProcedureAddress(_RemovePropA, user32, 'RemovePropA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RemovePropA]
+ end;
+end;
+
+var
+ _RemovePropW: Pointer;
+
+function RemovePropW;
+begin
+ GetProcedureAddress(_RemovePropW, user32, 'RemovePropW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RemovePropW]
+ end;
+end;
+
+var
+ _RemoveProp: Pointer;
+
+function RemoveProp;
+begin
+ GetProcedureAddress(_RemoveProp, user32, 'RemoveProp' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RemoveProp]
+ end;
+end;
+
+var
+ _EnumPropsExA: Pointer;
+
+function EnumPropsExA;
+begin
+ GetProcedureAddress(_EnumPropsExA, user32, 'EnumPropsExA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_EnumPropsExA]
+ end;
+end;
+
+var
+ _EnumPropsExW: Pointer;
+
+function EnumPropsExW;
+begin
+ GetProcedureAddress(_EnumPropsExW, user32, 'EnumPropsExW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_EnumPropsExW]
+ end;
+end;
+
+var
+ _EnumPropsEx: Pointer;
+
+function EnumPropsEx;
+begin
+ GetProcedureAddress(_EnumPropsEx, user32, 'EnumPropsEx' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_EnumPropsEx]
+ end;
+end;
+
+var
+ _EnumPropsA: Pointer;
+
+function EnumPropsA;
+begin
+ GetProcedureAddress(_EnumPropsA, user32, 'EnumPropsA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_EnumPropsA]
+ end;
+end;
+
+var
+ _EnumPropsW: Pointer;
+
+function EnumPropsW;
+begin
+ GetProcedureAddress(_EnumPropsW, user32, 'EnumPropsW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_EnumPropsW]
+ end;
+end;
+
+var
+ _EnumProps: Pointer;
+
+function EnumProps;
+begin
+ GetProcedureAddress(_EnumProps, user32, 'EnumProps' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_EnumProps]
+ end;
+end;
+
+var
+ _SetWindowTextA: Pointer;
+
+function SetWindowTextA;
+begin
+ GetProcedureAddress(_SetWindowTextA, user32, 'SetWindowTextA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetWindowTextA]
+ end;
+end;
+
+var
+ _SetWindowTextW: Pointer;
+
+function SetWindowTextW;
+begin
+ GetProcedureAddress(_SetWindowTextW, user32, 'SetWindowTextW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetWindowTextW]
+ end;
+end;
+
+var
+ _SetWindowText: Pointer;
+
+function SetWindowText;
+begin
+ GetProcedureAddress(_SetWindowText, user32, 'SetWindowText' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetWindowText]
+ end;
+end;
+
+var
+ _GetWindowTextA: Pointer;
+
+function GetWindowTextA;
+begin
+ GetProcedureAddress(_GetWindowTextA, user32, 'GetWindowTextA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetWindowTextA]
+ end;
+end;
+
+var
+ _GetWindowTextW: Pointer;
+
+function GetWindowTextW;
+begin
+ GetProcedureAddress(_GetWindowTextW, user32, 'GetWindowTextW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetWindowTextW]
+ end;
+end;
+
+var
+ _GetWindowText: Pointer;
+
+function GetWindowText;
+begin
+ GetProcedureAddress(_GetWindowText, user32, 'GetWindowText' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetWindowText]
+ end;
+end;
+
+var
+ _GetWindowTextLengthA: Pointer;
+
+function GetWindowTextLengthA;
+begin
+ GetProcedureAddress(_GetWindowTextLengthA, user32, 'GetWindowTextLengthA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetWindowTextLengthA]
+ end;
+end;
+
+var
+ _GetWindowTextLengthW: Pointer;
+
+function GetWindowTextLengthW;
+begin
+ GetProcedureAddress(_GetWindowTextLengthW, user32, 'GetWindowTextLengthW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetWindowTextLengthW]
+ end;
+end;
+
+var
+ _GetWindowTextLength: Pointer;
+
+function GetWindowTextLength;
+begin
+ GetProcedureAddress(_GetWindowTextLength, user32, 'GetWindowTextLength' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetWindowTextLength]
+ end;
+end;
+
+var
+ _GetClientRect: Pointer;
+
+function GetClientRect;
+begin
+ GetProcedureAddress(_GetClientRect, user32, 'GetClientRect');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetClientRect]
+ end;
+end;
+
+var
+ _GetWindowRect: Pointer;
+
+function GetWindowRect;
+begin
+ GetProcedureAddress(_GetWindowRect, user32, 'GetWindowRect');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetWindowRect]
+ end;
+end;
+
+var
+ _AdjustWindowRect: Pointer;
+
+function AdjustWindowRect;
+begin
+ GetProcedureAddress(_AdjustWindowRect, user32, 'AdjustWindowRect');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_AdjustWindowRect]
+ end;
+end;
+
+var
+ _AdjustWindowRectEx: Pointer;
+
+function AdjustWindowRectEx;
+begin
+ GetProcedureAddress(_AdjustWindowRectEx, user32, 'AdjustWindowRectEx');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_AdjustWindowRectEx]
+ end;
+end;
+
+var
+ _SetWindowContextHelpId: Pointer;
+
+function SetWindowContextHelpId;
+begin
+ GetProcedureAddress(_SetWindowContextHelpId, user32, 'SetWindowContextHelpId');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetWindowContextHelpId]
+ end;
+end;
+
+var
+ _GetWindowContextHelpId: Pointer;
+
+function GetWindowContextHelpId;
+begin
+ GetProcedureAddress(_GetWindowContextHelpId, user32, 'GetWindowContextHelpId');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetWindowContextHelpId]
+ end;
+end;
+
+var
+ _SetMenuContextHelpId: Pointer;
+
+function SetMenuContextHelpId;
+begin
+ GetProcedureAddress(_SetMenuContextHelpId, user32, 'SetMenuContextHelpId');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetMenuContextHelpId]
+ end;
+end;
+
+var
+ _GetMenuContextHelpId: Pointer;
+
+function GetMenuContextHelpId;
+begin
+ GetProcedureAddress(_GetMenuContextHelpId, user32, 'GetMenuContextHelpId');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetMenuContextHelpId]
+ end;
+end;
+
+var
+ _MessageBoxA: Pointer;
+
+function MessageBoxA;
+begin
+ GetProcedureAddress(_MessageBoxA, user32, 'MessageBoxA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MessageBoxA]
+ end;
+end;
+
+var
+ _MessageBoxW: Pointer;
+
+function MessageBoxW;
+begin
+ GetProcedureAddress(_MessageBoxW, user32, 'MessageBoxW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MessageBoxW]
+ end;
+end;
+
+var
+ _MessageBox: Pointer;
+
+function MessageBox;
+begin
+ GetProcedureAddress(_MessageBox, user32, 'MessageBox' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MessageBox]
+ end;
+end;
+
+var
+ _MessageBoxExA: Pointer;
+
+function MessageBoxExA;
+begin
+ GetProcedureAddress(_MessageBoxExA, user32, 'MessageBoxExA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MessageBoxExA]
+ end;
+end;
+
+var
+ _MessageBoxExW: Pointer;
+
+function MessageBoxExW;
+begin
+ GetProcedureAddress(_MessageBoxExW, user32, 'MessageBoxExW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MessageBoxExW]
+ end;
+end;
+
+var
+ _MessageBoxEx: Pointer;
+
+function MessageBoxEx;
+begin
+ GetProcedureAddress(_MessageBoxEx, user32, 'MessageBoxEx' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MessageBoxEx]
+ end;
+end;
+
+var
+ _MessageBoxIndirectA: Pointer;
+
+function MessageBoxIndirectA;
+begin
+ GetProcedureAddress(_MessageBoxIndirectA, user32, 'MessageBoxIndirectA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MessageBoxIndirectA]
+ end;
+end;
+
+var
+ _MessageBoxIndirectW: Pointer;
+
+function MessageBoxIndirectW;
+begin
+ GetProcedureAddress(_MessageBoxIndirectW, user32, 'MessageBoxIndirectW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MessageBoxIndirectW]
+ end;
+end;
+
+var
+ _MessageBoxIndirect: Pointer;
+
+function MessageBoxIndirect;
+begin
+ GetProcedureAddress(_MessageBoxIndirect, user32, 'MessageBoxIndirect' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MessageBoxIndirect]
+ end;
+end;
+
+var
+ _MessageBeep: Pointer;
+
+function MessageBeep;
+begin
+ GetProcedureAddress(_MessageBeep, user32, 'MessageBeep');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MessageBeep]
+ end;
+end;
+
+var
+ _ShowCursor: Pointer;
+
+function ShowCursor;
+begin
+ GetProcedureAddress(_ShowCursor, user32, 'ShowCursor');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ShowCursor]
+ end;
+end;
+
+var
+ _SetCursorPos: Pointer;
+
+function SetCursorPos;
+begin
+ GetProcedureAddress(_SetCursorPos, user32, 'SetCursorPos');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetCursorPos]
+ end;
+end;
+
+var
+ _SetCursor: Pointer;
+
+function SetCursor;
+begin
+ GetProcedureAddress(_SetCursor, user32, 'SetCursor');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetCursor]
+ end;
+end;
+
+var
+ _GetCursorPos: Pointer;
+
+function GetCursorPos;
+begin
+ GetProcedureAddress(_GetCursorPos, user32, 'GetCursorPos');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetCursorPos]
+ end;
+end;
+
+var
+ _ClipCursor: Pointer;
+
+function ClipCursor;
+begin
+ GetProcedureAddress(_ClipCursor, user32, 'ClipCursor');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ClipCursor]
+ end;
+end;
+
+var
+ _GetClipCursor: Pointer;
+
+function GetClipCursor;
+begin
+ GetProcedureAddress(_GetClipCursor, user32, 'GetClipCursor');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetClipCursor]
+ end;
+end;
+
+var
+ _GetCursor: Pointer;
+
+function GetCursor;
+begin
+ GetProcedureAddress(_GetCursor, user32, 'GetCursor');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetCursor]
+ end;
+end;
+
+var
+ _CreateCaret: Pointer;
+
+function CreateCaret;
+begin
+ GetProcedureAddress(_CreateCaret, user32, 'CreateCaret');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreateCaret]
+ end;
+end;
+
+var
+ _GetCaretBlinkTime: Pointer;
+
+function GetCaretBlinkTime;
+begin
+ GetProcedureAddress(_GetCaretBlinkTime, user32, 'GetCaretBlinkTime');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetCaretBlinkTime]
+ end;
+end;
+
+var
+ _SetCaretBlinkTime: Pointer;
+
+function SetCaretBlinkTime;
+begin
+ GetProcedureAddress(_SetCaretBlinkTime, user32, 'SetCaretBlinkTime');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetCaretBlinkTime]
+ end;
+end;
+
+var
+ _DestroyCaret: Pointer;
+
+function DestroyCaret;
+begin
+ GetProcedureAddress(_DestroyCaret, user32, 'DestroyCaret');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DestroyCaret]
+ end;
+end;
+
+var
+ _HideCaret: Pointer;
+
+function HideCaret;
+begin
+ GetProcedureAddress(_HideCaret, user32, 'HideCaret');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_HideCaret]
+ end;
+end;
+
+var
+ _ShowCaret: Pointer;
+
+function ShowCaret;
+begin
+ GetProcedureAddress(_ShowCaret, user32, 'ShowCaret');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ShowCaret]
+ end;
+end;
+
+var
+ _SetCaretPos: Pointer;
+
+function SetCaretPos;
+begin
+ GetProcedureAddress(_SetCaretPos, user32, 'SetCaretPos');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetCaretPos]
+ end;
+end;
+
+var
+ _GetCaretPos: Pointer;
+
+function GetCaretPos;
+begin
+ GetProcedureAddress(_GetCaretPos, user32, 'GetCaretPos');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetCaretPos]
+ end;
+end;
+
+var
+ _ClientToScreen: Pointer;
+
+function ClientToScreen;
+begin
+ GetProcedureAddress(_ClientToScreen, user32, 'ClientToScreen');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ClientToScreen]
+ end;
+end;
+
+var
+ _ScreenToClient: Pointer;
+
+function ScreenToClient;
+begin
+ GetProcedureAddress(_ScreenToClient, user32, 'ScreenToClient');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ScreenToClient]
+ end;
+end;
+
+var
+ _MapWindowPoints: Pointer;
+
+function MapWindowPoints;
+begin
+ GetProcedureAddress(_MapWindowPoints, user32, 'MapWindowPoints');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MapWindowPoints]
+ end;
+end;
+
+var
+ _WindowFromPoint: Pointer;
+
+function WindowFromPoint;
+begin
+ GetProcedureAddress(_WindowFromPoint, user32, 'WindowFromPoint');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WindowFromPoint]
+ end;
+end;
+
+var
+ _ChildWindowFromPoint: Pointer;
+
+function ChildWindowFromPoint;
+begin
+ GetProcedureAddress(_ChildWindowFromPoint, user32, 'ChildWindowFromPoint');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ChildWindowFromPoint]
+ end;
+end;
+
+var
+ _ChildWindowFromPointEx: Pointer;
+
+function ChildWindowFromPointEx;
+begin
+ GetProcedureAddress(_ChildWindowFromPointEx, user32, 'ChildWindowFromPointEx');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ChildWindowFromPointEx]
+ end;
+end;
+
+var
+ _GetSysColor: Pointer;
+
+function GetSysColor;
+begin
+ GetProcedureAddress(_GetSysColor, user32, 'GetSysColor');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetSysColor]
+ end;
+end;
+
+var
+ _GetSysColorBrush: Pointer;
+
+function GetSysColorBrush;
+begin
+ GetProcedureAddress(_GetSysColorBrush, user32, 'GetSysColorBrush');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetSysColorBrush]
+ end;
+end;
+
+var
+ _SetSysColors: Pointer;
+
+function SetSysColors;
+begin
+ GetProcedureAddress(_SetSysColors, user32, 'SetSysColors');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetSysColors]
+ end;
+end;
+
+var
+ _DrawFocusRect: Pointer;
+
+function DrawFocusRect;
+begin
+ GetProcedureAddress(_DrawFocusRect, user32, 'DrawFocusRect');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DrawFocusRect]
+ end;
+end;
+
+var
+ _FillRect: Pointer;
+
+function FillRect;
+begin
+ GetProcedureAddress(_FillRect, user32, 'FillRect');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_FillRect]
+ end;
+end;
+
+var
+ _FrameRect: Pointer;
+
+function FrameRect;
+begin
+ GetProcedureAddress(_FrameRect, user32, 'FrameRect');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_FrameRect]
+ end;
+end;
+
+var
+ _InvertRect: Pointer;
+
+function InvertRect;
+begin
+ GetProcedureAddress(_InvertRect, user32, 'InvertRect');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_InvertRect]
+ end;
+end;
+
+var
+ _SetRect: Pointer;
+
+function SetRect;
+begin
+ GetProcedureAddress(_SetRect, user32, 'SetRect');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetRect]
+ end;
+end;
+
+var
+ _SetRectEmpty: Pointer;
+
+function SetRectEmpty;
+begin
+ GetProcedureAddress(_SetRectEmpty, user32, 'SetRectEmpty');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetRectEmpty]
+ end;
+end;
+
+var
+ _CopyRect: Pointer;
+
+function CopyRect;
+begin
+ GetProcedureAddress(_CopyRect, user32, 'CopyRect');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CopyRect]
+ end;
+end;
+
+var
+ _InflateRect: Pointer;
+
+function InflateRect;
+begin
+ GetProcedureAddress(_InflateRect, user32, 'InflateRect');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_InflateRect]
+ end;
+end;
+
+var
+ _IntersectRect: Pointer;
+
+function IntersectRect;
+begin
+ GetProcedureAddress(_IntersectRect, user32, 'IntersectRect');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_IntersectRect]
+ end;
+end;
+
+var
+ _UnionRect: Pointer;
+
+function UnionRect;
+begin
+ GetProcedureAddress(_UnionRect, user32, 'UnionRect');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_UnionRect]
+ end;
+end;
+
+var
+ _SubtractRect: Pointer;
+
+function SubtractRect;
+begin
+ GetProcedureAddress(_SubtractRect, user32, 'SubtractRect');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SubtractRect]
+ end;
+end;
+
+var
+ _OffsetRect: Pointer;
+
+function OffsetRect;
+begin
+ GetProcedureAddress(_OffsetRect, user32, 'OffsetRect');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_OffsetRect]
+ end;
+end;
+
+var
+ _IsRectEmpty: Pointer;
+
+function IsRectEmpty;
+begin
+ GetProcedureAddress(_IsRectEmpty, user32, 'IsRectEmpty');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_IsRectEmpty]
+ end;
+end;
+
+var
+ _EqualRect: Pointer;
+
+function EqualRect;
+begin
+ GetProcedureAddress(_EqualRect, user32, 'EqualRect');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_EqualRect]
+ end;
+end;
+
+var
+ _PtInRect: Pointer;
+
+function PtInRect;
+begin
+ GetProcedureAddress(_PtInRect, user32, 'PtInRect');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PtInRect]
+ end;
+end;
+
+var
+ _GetWindowWord: Pointer;
+
+function GetWindowWord;
+begin
+ GetProcedureAddress(_GetWindowWord, user32, 'GetWindowWord');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetWindowWord]
+ end;
+end;
+
+var
+ _SetWindowWord: Pointer;
+
+function SetWindowWord;
+begin
+ GetProcedureAddress(_SetWindowWord, user32, 'SetWindowWord');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetWindowWord]
+ end;
+end;
+
+var
+ _GetWindowLongA: Pointer;
+
+function GetWindowLongA;
+begin
+ GetProcedureAddress(_GetWindowLongA, user32, 'GetWindowLongA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetWindowLongA]
+ end;
+end;
+
+var
+ _GetWindowLongW: Pointer;
+
+function GetWindowLongW;
+begin
+ GetProcedureAddress(_GetWindowLongW, user32, 'GetWindowLongW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetWindowLongW]
+ end;
+end;
+
+var
+ _GetWindowLong: Pointer;
+
+function GetWindowLong;
+begin
+ GetProcedureAddress(_GetWindowLong, user32, 'GetWindowLong' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetWindowLong]
+ end;
+end;
+
+var
+ _SetWindowLongA: Pointer;
+
+function SetWindowLongA;
+begin
+ GetProcedureAddress(_SetWindowLongA, user32, 'SetWindowLongA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetWindowLongA]
+ end;
+end;
+
+var
+ _SetWindowLongW: Pointer;
+
+function SetWindowLongW;
+begin
+ GetProcedureAddress(_SetWindowLongW, user32, 'SetWindowLongW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetWindowLongW]
+ end;
+end;
+
+var
+ _SetWindowLong: Pointer;
+
+function SetWindowLong;
+begin
+ GetProcedureAddress(_SetWindowLong, user32, 'SetWindowLong' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetWindowLong]
+ end;
+end;
+
+var
+ _GetClassWord: Pointer;
+
+function GetClassWord;
+begin
+ GetProcedureAddress(_GetClassWord, user32, 'GetClassWord');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetClassWord]
+ end;
+end;
+
+var
+ _SetClassWord: Pointer;
+
+function SetClassWord;
+begin
+ GetProcedureAddress(_SetClassWord, user32, 'SetClassWord');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetClassWord]
+ end;
+end;
+
+var
+ _GetClassLongA: Pointer;
+
+function GetClassLongA;
+begin
+ GetProcedureAddress(_GetClassLongA, user32, 'GetClassLongA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetClassLongA]
+ end;
+end;
+
+var
+ _GetClassLongW: Pointer;
+
+function GetClassLongW;
+begin
+ GetProcedureAddress(_GetClassLongW, user32, 'GetClassLongW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetClassLongW]
+ end;
+end;
+
+var
+ _GetClassLong: Pointer;
+
+function GetClassLong;
+begin
+ GetProcedureAddress(_GetClassLong, user32, 'GetClassLong' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetClassLong]
+ end;
+end;
+
+var
+ _SetClassLongA: Pointer;
+
+function SetClassLongA;
+begin
+ GetProcedureAddress(_SetClassLongA, user32, 'SetClassLongA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetClassLongA]
+ end;
+end;
+
+var
+ _SetClassLongW: Pointer;
+
+function SetClassLongW;
+begin
+ GetProcedureAddress(_SetClassLongW, user32, 'SetClassLongW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetClassLongW]
+ end;
+end;
+
+var
+ _SetClassLong: Pointer;
+
+function SetClassLong;
+begin
+ GetProcedureAddress(_SetClassLong, user32, 'SetClassLong' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetClassLong]
+ end;
+end;
+
+var
+ _GetProcessDefaultLayout: Pointer;
+
+function GetProcessDefaultLayout;
+begin
+ GetProcedureAddress(_GetProcessDefaultLayout, user32, 'GetProcessDefaultLayout');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetProcessDefaultLayout]
+ end;
+end;
+
+var
+ _SetProcessDefaultLayout: Pointer;
+
+function SetProcessDefaultLayout;
+begin
+ GetProcedureAddress(_SetProcessDefaultLayout, user32, 'SetProcessDefaultLayout');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetProcessDefaultLayout]
+ end;
+end;
+
+var
+ _GetDesktopWindow: Pointer;
+
+function GetDesktopWindow;
+begin
+ GetProcedureAddress(_GetDesktopWindow, user32, 'GetDesktopWindow');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetDesktopWindow]
+ end;
+end;
+
+var
+ _GetParent: Pointer;
+
+function GetParent;
+begin
+ GetProcedureAddress(_GetParent, user32, 'GetParent');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetParent]
+ end;
+end;
+
+var
+ _SetParent: Pointer;
+
+function SetParent;
+begin
+ GetProcedureAddress(_SetParent, user32, 'SetParent');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetParent]
+ end;
+end;
+
+var
+ _EnumChildWindows: Pointer;
+
+function EnumChildWindows;
+begin
+ GetProcedureAddress(_EnumChildWindows, user32, 'EnumChildWindows');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_EnumChildWindows]
+ end;
+end;
+
+var
+ _FindWindowA: Pointer;
+
+function FindWindowA;
+begin
+ GetProcedureAddress(_FindWindowA, user32, 'FindWindowA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_FindWindowA]
+ end;
+end;
+
+var
+ _FindWindowW: Pointer;
+
+function FindWindowW;
+begin
+ GetProcedureAddress(_FindWindowW, user32, 'FindWindowW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_FindWindowW]
+ end;
+end;
+
+var
+ _FindWindow: Pointer;
+
+function FindWindow;
+begin
+ GetProcedureAddress(_FindWindow, user32, 'FindWindow' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_FindWindow]
+ end;
+end;
+
+var
+ _FindWindowExA: Pointer;
+
+function FindWindowExA;
+begin
+ GetProcedureAddress(_FindWindowExA, user32, 'FindWindowExA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_FindWindowExA]
+ end;
+end;
+
+var
+ _FindWindowExW: Pointer;
+
+function FindWindowExW;
+begin
+ GetProcedureAddress(_FindWindowExW, user32, 'FindWindowExW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_FindWindowExW]
+ end;
+end;
+
+var
+ _FindWindowEx: Pointer;
+
+function FindWindowEx;
+begin
+ GetProcedureAddress(_FindWindowEx, user32, 'FindWindowEx' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_FindWindowEx]
+ end;
+end;
+
+var
+ _GetShellWindow: Pointer;
+
+function GetShellWindow;
+begin
+ GetProcedureAddress(_GetShellWindow, user32, 'GetShellWindow');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetShellWindow]
+ end;
+end;
+
+var
+ _RegisterShellHookWindow: Pointer;
+
+function RegisterShellHookWindow;
+begin
+ GetProcedureAddress(_RegisterShellHookWindow, user32, 'RegisterShellHookWindow');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RegisterShellHookWindow]
+ end;
+end;
+
+var
+ _DeregisterShellHookWindow: Pointer;
+
+function DeregisterShellHookWindow;
+begin
+ GetProcedureAddress(_DeregisterShellHookWindow, user32, 'DeregisterShellHookWindow');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DeregisterShellHookWindow]
+ end;
+end;
+
+var
+ _EnumWindows: Pointer;
+
+function EnumWindows;
+begin
+ GetProcedureAddress(_EnumWindows, user32, 'EnumWindows');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_EnumWindows]
+ end;
+end;
+
+var
+ _EnumThreadWindows: Pointer;
+
+function EnumThreadWindows;
+begin
+ GetProcedureAddress(_EnumThreadWindows, user32, 'EnumThreadWindows');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_EnumThreadWindows]
+ end;
+end;
+
+var
+ _GetClassNameA: Pointer;
+
+function GetClassNameA;
+begin
+ GetProcedureAddress(_GetClassNameA, user32, 'GetClassNameA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetClassNameA]
+ end;
+end;
+
+var
+ _GetClassNameW: Pointer;
+
+function GetClassNameW;
+begin
+ GetProcedureAddress(_GetClassNameW, user32, 'GetClassNameW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetClassNameW]
+ end;
+end;
+
+var
+ _GetClassName: Pointer;
+
+function GetClassName;
+begin
+ GetProcedureAddress(_GetClassName, user32, 'GetClassName' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetClassName]
+ end;
+end;
+
+var
+ _GetTopWindow: Pointer;
+
+function GetTopWindow;
+begin
+ GetProcedureAddress(_GetTopWindow, user32, 'GetTopWindow');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetTopWindow]
+ end;
+end;
+
+var
+ _GetWindowThreadProcessId: Pointer;
+
+function GetWindowThreadProcessId;
+begin
+ GetProcedureAddress(_GetWindowThreadProcessId, user32, 'GetWindowThreadProcessId');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetWindowThreadProcessId]
+ end;
+end;
+
+var
+ _IsGUIThread: Pointer;
+
+function IsGUIThread;
+begin
+ GetProcedureAddress(_IsGUIThread, user32, 'IsGUIThread');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_IsGUIThread]
+ end;
+end;
+
+var
+ _GetLastActivePopup: Pointer;
+
+function GetLastActivePopup;
+begin
+ GetProcedureAddress(_GetLastActivePopup, user32, 'GetLastActivePopup');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetLastActivePopup]
+ end;
+end;
+
+var
+ _GetWindow: Pointer;
+
+function GetWindow;
+begin
+ GetProcedureAddress(_GetWindow, user32, 'GetWindow');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetWindow]
+ end;
+end;
+
+var
+ _SetWindowsHookA: Pointer;
+
+function SetWindowsHookA;
+begin
+ GetProcedureAddress(_SetWindowsHookA, user32, 'SetWindowsHookA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetWindowsHookA]
+ end;
+end;
+
+var
+ _SetWindowsHookW: Pointer;
+
+function SetWindowsHookW;
+begin
+ GetProcedureAddress(_SetWindowsHookW, user32, 'SetWindowsHookW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetWindowsHookW]
+ end;
+end;
+
+var
+ _SetWindowsHook: Pointer;
+
+function SetWindowsHook;
+begin
+ GetProcedureAddress(_SetWindowsHook, user32, 'SetWindowsHook' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetWindowsHook]
+ end;
+end;
+
+var
+ _UnhookWindowsHook: Pointer;
+
+function UnhookWindowsHook;
+begin
+ GetProcedureAddress(_UnhookWindowsHook, user32, 'UnhookWindowsHook');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_UnhookWindowsHook]
+ end;
+end;
+
+var
+ _SetWindowsHookExA: Pointer;
+
+function SetWindowsHookExA;
+begin
+ GetProcedureAddress(_SetWindowsHookExA, user32, 'SetWindowsHookExA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetWindowsHookExA]
+ end;
+end;
+
+var
+ _SetWindowsHookExW: Pointer;
+
+function SetWindowsHookExW;
+begin
+ GetProcedureAddress(_SetWindowsHookExW, user32, 'SetWindowsHookExW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetWindowsHookExW]
+ end;
+end;
+
+var
+ _SetWindowsHookEx: Pointer;
+
+function SetWindowsHookEx;
+begin
+ GetProcedureAddress(_SetWindowsHookEx, user32, 'SetWindowsHookEx' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetWindowsHookEx]
+ end;
+end;
+
+var
+ _UnhookWindowsHookEx: Pointer;
+
+function UnhookWindowsHookEx;
+begin
+ GetProcedureAddress(_UnhookWindowsHookEx, user32, 'UnhookWindowsHookEx');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_UnhookWindowsHookEx]
+ end;
+end;
+
+var
+ _CallNextHookEx: Pointer;
+
+function CallNextHookEx;
+begin
+ GetProcedureAddress(_CallNextHookEx, user32, 'CallNextHookEx');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CallNextHookEx]
+ end;
+end;
+
+var
+ _CheckMenuRadioItem: Pointer;
+
+function CheckMenuRadioItem;
+begin
+ GetProcedureAddress(_CheckMenuRadioItem, user32, 'CheckMenuRadioItem');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CheckMenuRadioItem]
+ end;
+end;
+
+var
+ _LoadBitmapA: Pointer;
+
+function LoadBitmapA;
+begin
+ GetProcedureAddress(_LoadBitmapA, user32, 'LoadBitmapA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_LoadBitmapA]
+ end;
+end;
+
+var
+ _LoadBitmapW: Pointer;
+
+function LoadBitmapW;
+begin
+ GetProcedureAddress(_LoadBitmapW, user32, 'LoadBitmapW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_LoadBitmapW]
+ end;
+end;
+
+var
+ _LoadBitmap: Pointer;
+
+function LoadBitmap;
+begin
+ GetProcedureAddress(_LoadBitmap, user32, 'LoadBitmap' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_LoadBitmap]
+ end;
+end;
+
+var
+ _LoadCursorA: Pointer;
+
+function LoadCursorA;
+begin
+ GetProcedureAddress(_LoadCursorA, user32, 'LoadCursorA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_LoadCursorA]
+ end;
+end;
+
+var
+ _LoadCursorW: Pointer;
+
+function LoadCursorW;
+begin
+ GetProcedureAddress(_LoadCursorW, user32, 'LoadCursorW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_LoadCursorW]
+ end;
+end;
+
+var
+ _LoadCursor: Pointer;
+
+function LoadCursor;
+begin
+ GetProcedureAddress(_LoadCursor, user32, 'LoadCursor' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_LoadCursor]
+ end;
+end;
+
+var
+ _LoadCursorFromFileA: Pointer;
+
+function LoadCursorFromFileA;
+begin
+ GetProcedureAddress(_LoadCursorFromFileA, user32, 'LoadCursorFromFileA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_LoadCursorFromFileA]
+ end;
+end;
+
+var
+ _LoadCursorFromFileW: Pointer;
+
+function LoadCursorFromFileW;
+begin
+ GetProcedureAddress(_LoadCursorFromFileW, user32, 'LoadCursorFromFileW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_LoadCursorFromFileW]
+ end;
+end;
+
+var
+ _LoadCursorFromFile: Pointer;
+
+function LoadCursorFromFile;
+begin
+ GetProcedureAddress(_LoadCursorFromFile, user32, 'LoadCursorFromFile' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_LoadCursorFromFile]
+ end;
+end;
+
+var
+ _CreateCursor: Pointer;
+
+function CreateCursor;
+begin
+ GetProcedureAddress(_CreateCursor, user32, 'CreateCursor');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreateCursor]
+ end;
+end;
+
+var
+ _DestroyCursor: Pointer;
+
+function DestroyCursor;
+begin
+ GetProcedureAddress(_DestroyCursor, user32, 'DestroyCursor');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DestroyCursor]
+ end;
+end;
+
+var
+ _SetSystemCursor: Pointer;
+
+function SetSystemCursor;
+begin
+ GetProcedureAddress(_SetSystemCursor, user32, 'SetSystemCursor');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetSystemCursor]
+ end;
+end;
+
+var
+ _LoadIconA: Pointer;
+
+function LoadIconA;
+begin
+ GetProcedureAddress(_LoadIconA, user32, 'LoadIconA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_LoadIconA]
+ end;
+end;
+
+var
+ _LoadIconW: Pointer;
+
+function LoadIconW;
+begin
+ GetProcedureAddress(_LoadIconW, user32, 'LoadIconW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_LoadIconW]
+ end;
+end;
+
+var
+ _LoadIcon: Pointer;
+
+function LoadIcon;
+begin
+ GetProcedureAddress(_LoadIcon, user32, 'LoadIcon' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_LoadIcon]
+ end;
+end;
+
+var
+ _PrivateExtractIconsA: Pointer;
+
+function PrivateExtractIconsA;
+begin
+ GetProcedureAddress(_PrivateExtractIconsA, user32, 'PrivateExtractIconsA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PrivateExtractIconsA]
+ end;
+end;
+
+var
+ _PrivateExtractIconsW: Pointer;
+
+function PrivateExtractIconsW;
+begin
+ GetProcedureAddress(_PrivateExtractIconsW, user32, 'PrivateExtractIconsW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PrivateExtractIconsW]
+ end;
+end;
+
+var
+ _PrivateExtractIcons: Pointer;
+
+function PrivateExtractIcons;
+begin
+ GetProcedureAddress(_PrivateExtractIcons, user32, 'PrivateExtractIcons' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_PrivateExtractIcons]
+ end;
+end;
+
+var
+ _CreateIcon: Pointer;
+
+function CreateIcon;
+begin
+ GetProcedureAddress(_CreateIcon, user32, 'CreateIcon');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreateIcon]
+ end;
+end;
+
+var
+ _DestroyIcon: Pointer;
+
+function DestroyIcon;
+begin
+ GetProcedureAddress(_DestroyIcon, user32, 'DestroyIcon');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DestroyIcon]
+ end;
+end;
+
+var
+ _LookupIconIdFromDirectory: Pointer;
+
+function LookupIconIdFromDirectory;
+begin
+ GetProcedureAddress(_LookupIconIdFromDirectory, user32, 'LookupIconIdFromDirectory');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_LookupIconIdFromDirectory]
+ end;
+end;
+
+var
+ _LookupIconIdFromDirectoryEx: Pointer;
+
+function LookupIconIdFromDirectoryEx;
+begin
+ GetProcedureAddress(_LookupIconIdFromDirectoryEx, user32, 'LookupIconIdFromDirectoryEx');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_LookupIconIdFromDirectoryEx]
+ end;
+end;
+
+var
+ _CreateIconFromResource: Pointer;
+
+function CreateIconFromResource;
+begin
+ GetProcedureAddress(_CreateIconFromResource, user32, 'CreateIconFromResource');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreateIconFromResource]
+ end;
+end;
+
+var
+ _CreateIconFromResourceEx: Pointer;
+
+function CreateIconFromResourceEx;
+begin
+ GetProcedureAddress(_CreateIconFromResourceEx, user32, 'CreateIconFromResourceEx');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreateIconFromResourceEx]
+ end;
+end;
+
+var
+ _LoadImageA: Pointer;
+
+function LoadImageA;
+begin
+ GetProcedureAddress(_LoadImageA, user32, 'LoadImageA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_LoadImageA]
+ end;
+end;
+
+var
+ _LoadImageW: Pointer;
+
+function LoadImageW;
+begin
+ GetProcedureAddress(_LoadImageW, user32, 'LoadImageW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_LoadImageW]
+ end;
+end;
+
+var
+ _LoadImage: Pointer;
+
+function LoadImage;
+begin
+ GetProcedureAddress(_LoadImage, user32, 'LoadImage' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_LoadImage]
+ end;
+end;
+
+var
+ _CopyImage: Pointer;
+
+function CopyImage;
+begin
+ GetProcedureAddress(_CopyImage, user32, 'CopyImage');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CopyImage]
+ end;
+end;
+
+var
+ _DrawIconEx: Pointer;
+
+function DrawIconEx;
+begin
+ GetProcedureAddress(_DrawIconEx, user32, 'DrawIconEx');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DrawIconEx]
+ end;
+end;
+
+var
+ _CreateIconIndirect: Pointer;
+
+function CreateIconIndirect;
+begin
+ GetProcedureAddress(_CreateIconIndirect, user32, 'CreateIconIndirect');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreateIconIndirect]
+ end;
+end;
+
+var
+ _CopyIcon: Pointer;
+
+function CopyIcon;
+begin
+ GetProcedureAddress(_CopyIcon, user32, 'CopyIcon');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CopyIcon]
+ end;
+end;
+
+var
+ _GetIconInfo: Pointer;
+
+function GetIconInfo;
+begin
+ GetProcedureAddress(_GetIconInfo, user32, 'GetIconInfo');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetIconInfo]
+ end;
+end;
+
+var
+ _LoadStringA: Pointer;
+
+function LoadStringA;
+begin
+ GetProcedureAddress(_LoadStringA, user32, 'LoadStringA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_LoadStringA]
+ end;
+end;
+
+var
+ _LoadStringW: Pointer;
+
+function LoadStringW;
+begin
+ GetProcedureAddress(_LoadStringW, user32, 'LoadStringW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_LoadStringW]
+ end;
+end;
+
+var
+ _LoadString: Pointer;
+
+function LoadString;
+begin
+ GetProcedureAddress(_LoadString, user32, 'LoadString' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_LoadString]
+ end;
+end;
+
+var
+ _IsDialogMessageA: Pointer;
+
+function IsDialogMessageA;
+begin
+ GetProcedureAddress(_IsDialogMessageA, user32, 'IsDialogMessageA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_IsDialogMessageA]
+ end;
+end;
+
+var
+ _IsDialogMessageW: Pointer;
+
+function IsDialogMessageW;
+begin
+ GetProcedureAddress(_IsDialogMessageW, user32, 'IsDialogMessageW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_IsDialogMessageW]
+ end;
+end;
+
+var
+ _IsDialogMessage: Pointer;
+
+function IsDialogMessage;
+begin
+ GetProcedureAddress(_IsDialogMessage, user32, 'IsDialogMessage' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_IsDialogMessage]
+ end;
+end;
+
+var
+ _MapDialogRect: Pointer;
+
+function MapDialogRect;
+begin
+ GetProcedureAddress(_MapDialogRect, user32, 'MapDialogRect');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MapDialogRect]
+ end;
+end;
+
+var
+ _DlgDirListA: Pointer;
+
+function DlgDirListA;
+begin
+ GetProcedureAddress(_DlgDirListA, user32, 'DlgDirListA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DlgDirListA]
+ end;
+end;
+
+var
+ _DlgDirListW: Pointer;
+
+function DlgDirListW;
+begin
+ GetProcedureAddress(_DlgDirListW, user32, 'DlgDirListW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DlgDirListW]
+ end;
+end;
+
+var
+ _DlgDirList: Pointer;
+
+function DlgDirList;
+begin
+ GetProcedureAddress(_DlgDirList, user32, 'DlgDirList' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DlgDirList]
+ end;
+end;
+
+var
+ _DlgDirSelectExA: Pointer;
+
+function DlgDirSelectExA;
+begin
+ GetProcedureAddress(_DlgDirSelectExA, user32, 'DlgDirSelectExA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DlgDirSelectExA]
+ end;
+end;
+
+var
+ _DlgDirSelectExW: Pointer;
+
+function DlgDirSelectExW;
+begin
+ GetProcedureAddress(_DlgDirSelectExW, user32, 'DlgDirSelectExW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DlgDirSelectExW]
+ end;
+end;
+
+var
+ _DlgDirSelectEx: Pointer;
+
+function DlgDirSelectEx;
+begin
+ GetProcedureAddress(_DlgDirSelectEx, user32, 'DlgDirSelectEx' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DlgDirSelectEx]
+ end;
+end;
+
+var
+ _DlgDirListComboBoxA: Pointer;
+
+function DlgDirListComboBoxA;
+begin
+ GetProcedureAddress(_DlgDirListComboBoxA, user32, 'DlgDirListComboBoxA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DlgDirListComboBoxA]
+ end;
+end;
+
+var
+ _DlgDirListComboBoxW: Pointer;
+
+function DlgDirListComboBoxW;
+begin
+ GetProcedureAddress(_DlgDirListComboBoxW, user32, 'DlgDirListComboBoxW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DlgDirListComboBoxW]
+ end;
+end;
+
+var
+ _DlgDirListComboBox: Pointer;
+
+function DlgDirListComboBox;
+begin
+ GetProcedureAddress(_DlgDirListComboBox, user32, 'DlgDirListComboBox' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DlgDirListComboBox]
+ end;
+end;
+
+var
+ _DlgDirSelectComboBoxExA: Pointer;
+
+function DlgDirSelectComboBoxExA;
+begin
+ GetProcedureAddress(_DlgDirSelectComboBoxExA, user32, 'DlgDirSelectComboBoxExA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DlgDirSelectComboBoxExA]
+ end;
+end;
+
+var
+ _DlgDirSelectComboBoxExW: Pointer;
+
+function DlgDirSelectComboBoxExW;
+begin
+ GetProcedureAddress(_DlgDirSelectComboBoxExW, user32, 'DlgDirSelectComboBoxExW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DlgDirSelectComboBoxExW]
+ end;
+end;
+
+var
+ _DlgDirSelectComboBoxEx: Pointer;
+
+function DlgDirSelectComboBoxEx;
+begin
+ GetProcedureAddress(_DlgDirSelectComboBoxEx, user32, 'DlgDirSelectComboBoxEx' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DlgDirSelectComboBoxEx]
+ end;
+end;
+
+var
+ _SetScrollInfo: Pointer;
+
+function SetScrollInfo;
+begin
+ GetProcedureAddress(_SetScrollInfo, user32, 'SetScrollInfo');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetScrollInfo]
+ end;
+end;
+
+var
+ _GetScrollInfo: Pointer;
+
+function GetScrollInfo;
+begin
+ GetProcedureAddress(_GetScrollInfo, user32, 'GetScrollInfo');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetScrollInfo]
+ end;
+end;
+
+var
+ _DefFrameProcA: Pointer;
+
+function DefFrameProcA;
+begin
+ GetProcedureAddress(_DefFrameProcA, user32, 'DefFrameProcA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DefFrameProcA]
+ end;
+end;
+
+var
+ _DefFrameProcW: Pointer;
+
+function DefFrameProcW;
+begin
+ GetProcedureAddress(_DefFrameProcW, user32, 'DefFrameProcW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DefFrameProcW]
+ end;
+end;
+
+var
+ _DefFrameProc: Pointer;
+
+function DefFrameProc;
+begin
+ GetProcedureAddress(_DefFrameProc, user32, 'DefFrameProc' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DefFrameProc]
+ end;
+end;
+
+var
+ _DefMDIChildProcA: Pointer;
+
+function DefMDIChildProcA;
+begin
+ GetProcedureAddress(_DefMDIChildProcA, user32, 'DefMDIChildProcA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DefMDIChildProcA]
+ end;
+end;
+
+var
+ _DefMDIChildProcW: Pointer;
+
+function DefMDIChildProcW;
+begin
+ GetProcedureAddress(_DefMDIChildProcW, user32, 'DefMDIChildProcW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DefMDIChildProcW]
+ end;
+end;
+
+var
+ _DefMDIChildProc: Pointer;
+
+function DefMDIChildProc;
+begin
+ GetProcedureAddress(_DefMDIChildProc, user32, 'DefMDIChildProc' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DefMDIChildProc]
+ end;
+end;
+
+var
+ _TranslateMDISysAccel: Pointer;
+
+function TranslateMDISysAccel;
+begin
+ GetProcedureAddress(_TranslateMDISysAccel, user32, 'TranslateMDISysAccel');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_TranslateMDISysAccel]
+ end;
+end;
+
+var
+ _ArrangeIconicWindows: Pointer;
+
+function ArrangeIconicWindows;
+begin
+ GetProcedureAddress(_ArrangeIconicWindows, user32, 'ArrangeIconicWindows');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ArrangeIconicWindows]
+ end;
+end;
+
+var
+ _CreateMDIWindowA: Pointer;
+
+function CreateMDIWindowA;
+begin
+ GetProcedureAddress(_CreateMDIWindowA, user32, 'CreateMDIWindowA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreateMDIWindowA]
+ end;
+end;
+
+var
+ _CreateMDIWindowW: Pointer;
+
+function CreateMDIWindowW;
+begin
+ GetProcedureAddress(_CreateMDIWindowW, user32, 'CreateMDIWindowW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreateMDIWindowW]
+ end;
+end;
+
+var
+ _CreateMDIWindow: Pointer;
+
+function CreateMDIWindow;
+begin
+ GetProcedureAddress(_CreateMDIWindow, user32, 'CreateMDIWindow' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CreateMDIWindow]
+ end;
+end;
+
+var
+ _TileWindows: Pointer;
+
+function TileWindows;
+begin
+ GetProcedureAddress(_TileWindows, user32, 'TileWindows');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_TileWindows]
+ end;
+end;
+
+var
+ _CascadeWindows: Pointer;
+
+function CascadeWindows;
+begin
+ GetProcedureAddress(_CascadeWindows, user32, 'CascadeWindows');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_CascadeWindows]
+ end;
+end;
+
+var
+ _WinHelpA: Pointer;
+
+function WinHelpA;
+begin
+ GetProcedureAddress(_WinHelpA, user32, 'WinHelpA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WinHelpA]
+ end;
+end;
+
+var
+ _WinHelpW: Pointer;
+
+function WinHelpW;
+begin
+ GetProcedureAddress(_WinHelpW, user32, 'WinHelpW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WinHelpW]
+ end;
+end;
+
+var
+ _WinHelp: Pointer;
+
+function WinHelp;
+begin
+ GetProcedureAddress(_WinHelp, user32, 'WinHelp' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WinHelp]
+ end;
+end;
+
+var
+ _GetGuiResources: Pointer;
+
+function GetGuiResources;
+begin
+ GetProcedureAddress(_GetGuiResources, user32, 'GetGuiResources');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetGuiResources]
+ end;
+end;
+
+var
+ _ChangeDisplaySettingsA: Pointer;
+
+function ChangeDisplaySettingsA;
+begin
+ GetProcedureAddress(_ChangeDisplaySettingsA, user32, 'ChangeDisplaySettingsA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ChangeDisplaySettingsA]
+ end;
+end;
+
+var
+ _ChangeDisplaySettingsW: Pointer;
+
+function ChangeDisplaySettingsW;
+begin
+ GetProcedureAddress(_ChangeDisplaySettingsW, user32, 'ChangeDisplaySettingsW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ChangeDisplaySettingsW]
+ end;
+end;
+
+var
+ _ChangeDisplaySettings: Pointer;
+
+function ChangeDisplaySettings;
+begin
+ GetProcedureAddress(_ChangeDisplaySettings, user32, 'ChangeDisplaySettings' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ChangeDisplaySettings]
+ end;
+end;
+
+var
+ _ChangeDisplaySettingsExA: Pointer;
+
+function ChangeDisplaySettingsExA;
+begin
+ GetProcedureAddress(_ChangeDisplaySettingsExA, user32, 'ChangeDisplaySettingsExA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ChangeDisplaySettingsExA]
+ end;
+end;
+
+var
+ _ChangeDisplaySettingsExW: Pointer;
+
+function ChangeDisplaySettingsExW;
+begin
+ GetProcedureAddress(_ChangeDisplaySettingsExW, user32, 'ChangeDisplaySettingsExW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ChangeDisplaySettingsExW]
+ end;
+end;
+
+var
+ _ChangeDisplaySettingsEx: Pointer;
+
+function ChangeDisplaySettingsEx;
+begin
+ GetProcedureAddress(_ChangeDisplaySettingsEx, user32, 'ChangeDisplaySettingsEx' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_ChangeDisplaySettingsEx]
+ end;
+end;
+
+var
+ _EnumDisplaySettingsA: Pointer;
+
+function EnumDisplaySettingsA;
+begin
+ GetProcedureAddress(_EnumDisplaySettingsA, user32, 'EnumDisplaySettingsA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_EnumDisplaySettingsA]
+ end;
+end;
+
+var
+ _EnumDisplaySettingsW: Pointer;
+
+function EnumDisplaySettingsW;
+begin
+ GetProcedureAddress(_EnumDisplaySettingsW, user32, 'EnumDisplaySettingsW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_EnumDisplaySettingsW]
+ end;
+end;
+
+var
+ _EnumDisplaySettings: Pointer;
+
+function EnumDisplaySettings;
+begin
+ GetProcedureAddress(_EnumDisplaySettings, user32, 'EnumDisplaySettings' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_EnumDisplaySettings]
+ end;
+end;
+
+var
+ _EnumDisplaySettingsExA: Pointer;
+
+function EnumDisplaySettingsExA;
+begin
+ GetProcedureAddress(_EnumDisplaySettingsExA, user32, 'EnumDisplaySettingsExA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_EnumDisplaySettingsExA]
+ end;
+end;
+
+var
+ _EnumDisplaySettingsExW: Pointer;
+
+function EnumDisplaySettingsExW;
+begin
+ GetProcedureAddress(_EnumDisplaySettingsExW, user32, 'EnumDisplaySettingsExW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_EnumDisplaySettingsExW]
+ end;
+end;
+
+var
+ _EnumDisplaySettingsEx: Pointer;
+
+function EnumDisplaySettingsEx;
+begin
+ GetProcedureAddress(_EnumDisplaySettingsEx, user32, 'EnumDisplaySettingsEx' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_EnumDisplaySettingsEx]
+ end;
+end;
+
+var
+ _EnumDisplayDevicesA: Pointer;
+
+function EnumDisplayDevicesA;
+begin
+ GetProcedureAddress(_EnumDisplayDevicesA, user32, 'EnumDisplayDevicesA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_EnumDisplayDevicesA]
+ end;
+end;
+
+var
+ _EnumDisplayDevicesW: Pointer;
+
+function EnumDisplayDevicesW;
+begin
+ GetProcedureAddress(_EnumDisplayDevicesW, user32, 'EnumDisplayDevicesW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_EnumDisplayDevicesW]
+ end;
+end;
+
+var
+ _EnumDisplayDevices: Pointer;
+
+function EnumDisplayDevices;
+begin
+ GetProcedureAddress(_EnumDisplayDevices, user32, 'EnumDisplayDevices' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_EnumDisplayDevices]
+ end;
+end;
+
+var
+ _SystemParametersInfoA: Pointer;
+
+function SystemParametersInfoA;
+begin
+ GetProcedureAddress(_SystemParametersInfoA, user32, 'SystemParametersInfoA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SystemParametersInfoA]
+ end;
+end;
+
+var
+ _SystemParametersInfoW: Pointer;
+
+function SystemParametersInfoW;
+begin
+ GetProcedureAddress(_SystemParametersInfoW, user32, 'SystemParametersInfoW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SystemParametersInfoW]
+ end;
+end;
+
+var
+ _SystemParametersInfo: Pointer;
+
+function SystemParametersInfo;
+begin
+ GetProcedureAddress(_SystemParametersInfo, user32, 'SystemParametersInfo' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SystemParametersInfo]
+ end;
+end;
+
+var
+ _SetDebugErrorLevel: Pointer;
+
+procedure SetDebugErrorLevel;
+begin
+ GetProcedureAddress(_SetDebugErrorLevel, user32, 'SetDebugErrorLevel');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetDebugErrorLevel]
+ end;
+end;
+
+var
+ _SetLastErrorEx: Pointer;
+
+procedure SetLastErrorEx;
+begin
+ GetProcedureAddress(_SetLastErrorEx, user32, 'SetLastErrorEx');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetLastErrorEx]
+ end;
+end;
+
+var
+ _InternalGetWindowText: Pointer;
+
+function InternalGetWindowText;
+begin
+ GetProcedureAddress(_InternalGetWindowText, user32, 'InternalGetWindowText');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_InternalGetWindowText]
+ end;
+end;
+
+var
+ _EndTask: Pointer;
+
+function EndTask;
+begin
+ GetProcedureAddress(_EndTask, user32, 'EndTask');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_EndTask]
+ end;
+end;
+
+var
+ _MonitorFromPoint: Pointer;
+
+function MonitorFromPoint;
+begin
+ GetProcedureAddress(_MonitorFromPoint, user32, 'MonitorFromPoint');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MonitorFromPoint]
+ end;
+end;
+
+var
+ _MonitorFromRect: Pointer;
+
+function MonitorFromRect;
+begin
+ GetProcedureAddress(_MonitorFromRect, user32, 'MonitorFromRect');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MonitorFromRect]
+ end;
+end;
+
+var
+ _MonitorFromWindow: Pointer;
+
+function MonitorFromWindow;
+begin
+ GetProcedureAddress(_MonitorFromWindow, user32, 'MonitorFromWindow');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_MonitorFromWindow]
+ end;
+end;
+
+var
+ _GetMonitorInfoA: Pointer;
+
+function GetMonitorInfoA;
+begin
+ GetProcedureAddress(_GetMonitorInfoA, user32, 'GetMonitorInfoA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetMonitorInfoA]
+ end;
+end;
+
+var
+ _GetMonitorInfoW: Pointer;
+
+function GetMonitorInfoW;
+begin
+ GetProcedureAddress(_GetMonitorInfoW, user32, 'GetMonitorInfoW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetMonitorInfoW]
+ end;
+end;
+
+var
+ _GetMonitorInfo: Pointer;
+
+function GetMonitorInfo;
+begin
+ GetProcedureAddress(_GetMonitorInfo, user32, 'GetMonitorInfo' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetMonitorInfo]
+ end;
+end;
+
+var
+ _EnumDisplayMonitors: Pointer;
+
+function EnumDisplayMonitors;
+begin
+ GetProcedureAddress(_EnumDisplayMonitors, user32, 'EnumDisplayMonitors');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_EnumDisplayMonitors]
+ end;
+end;
+
+var
+ _NotifyWinEvent: Pointer;
+
+procedure NotifyWinEvent;
+begin
+ GetProcedureAddress(_NotifyWinEvent, user32, 'NotifyWinEvent');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_NotifyWinEvent]
+ end;
+end;
+
+var
+ _SetWinEventHook: Pointer;
+
+function SetWinEventHook;
+begin
+ GetProcedureAddress(_SetWinEventHook, user32, 'SetWinEventHook');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_SetWinEventHook]
+ end;
+end;
+
+var
+ _IsWinEventHookInstalled: Pointer;
+
+function IsWinEventHookInstalled;
+begin
+ GetProcedureAddress(_IsWinEventHookInstalled, user32, 'IsWinEventHookInstalled');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_IsWinEventHookInstalled]
+ end;
+end;
+
+var
+ _UnhookWinEvent: Pointer;
+
+function UnhookWinEvent;
+begin
+ GetProcedureAddress(_UnhookWinEvent, user32, 'UnhookWinEvent');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_UnhookWinEvent]
+ end;
+end;
+
+var
+ _GetGUIThreadInfo: Pointer;
+
+function GetGUIThreadInfo;
+begin
+ GetProcedureAddress(_GetGUIThreadInfo, user32, 'GetGUIThreadInfo');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetGUIThreadInfo]
+ end;
+end;
+
+var
+ _GetWindowModuleFileNameA: Pointer;
+
+function GetWindowModuleFileNameA;
+begin
+ GetProcedureAddress(_GetWindowModuleFileNameA, user32, 'GetWindowModuleFileNameA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetWindowModuleFileNameA]
+ end;
+end;
+
+var
+ _GetWindowModuleFileNameW: Pointer;
+
+function GetWindowModuleFileNameW;
+begin
+ GetProcedureAddress(_GetWindowModuleFileNameW, user32, 'GetWindowModuleFileNameW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetWindowModuleFileNameW]
+ end;
+end;
+
+var
+ _GetWindowModuleFileName: Pointer;
+
+function GetWindowModuleFileName;
+begin
+ GetProcedureAddress(_GetWindowModuleFileName, user32, 'GetWindowModuleFileName' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetWindowModuleFileName]
+ end;
+end;
+
+var
+ _GetCursorInfo: Pointer;
+
+function GetCursorInfo;
+begin
+ GetProcedureAddress(_GetCursorInfo, user32, 'GetCursorInfo');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetCursorInfo]
+ end;
+end;
+
+var
+ _GetWindowInfo: Pointer;
+
+function GetWindowInfo;
+begin
+ GetProcedureAddress(_GetWindowInfo, user32, 'GetWindowInfo');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetWindowInfo]
+ end;
+end;
+
+var
+ _GetTitleBarInfo: Pointer;
+
+function GetTitleBarInfo;
+begin
+ GetProcedureAddress(_GetTitleBarInfo, user32, 'GetTitleBarInfo');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetTitleBarInfo]
+ end;
+end;
+
+var
+ _GetMenuBarInfo: Pointer;
+
+function GetMenuBarInfo;
+begin
+ GetProcedureAddress(_GetMenuBarInfo, user32, 'GetMenuBarInfo');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetMenuBarInfo]
+ end;
+end;
+
+var
+ _GetScrollBarInfo: Pointer;
+
+function GetScrollBarInfo;
+begin
+ GetProcedureAddress(_GetScrollBarInfo, user32, 'GetScrollBarInfo');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetScrollBarInfo]
+ end;
+end;
+
+var
+ _GetComboBoxInfo: Pointer;
+
+function GetComboBoxInfo;
+begin
+ GetProcedureAddress(_GetComboBoxInfo, user32, 'GetComboBoxInfo');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetComboBoxInfo]
+ end;
+end;
+
+var
+ _GetAncestor: Pointer;
+
+function GetAncestor;
+begin
+ GetProcedureAddress(_GetAncestor, user32, 'GetAncestor');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetAncestor]
+ end;
+end;
+
+var
+ _RealChildWindowFromPoint: Pointer;
+
+function RealChildWindowFromPoint;
+begin
+ GetProcedureAddress(_RealChildWindowFromPoint, user32, 'RealChildWindowFromPoint');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RealChildWindowFromPoint]
+ end;
+end;
+
+var
+ _RealGetWindowClassA: Pointer;
+
+function RealGetWindowClassA;
+begin
+ GetProcedureAddress(_RealGetWindowClassA, user32, 'RealGetWindowClassA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RealGetWindowClassA]
+ end;
+end;
+
+var
+ _RealGetWindowClassW: Pointer;
+
+function RealGetWindowClassW;
+begin
+ GetProcedureAddress(_RealGetWindowClassW, user32, 'RealGetWindowClassW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RealGetWindowClassW]
+ end;
+end;
+
+var
+ _RealGetWindowClass: Pointer;
+
+function RealGetWindowClass;
+begin
+ GetProcedureAddress(_RealGetWindowClass, user32, 'RealGetWindowClass' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RealGetWindowClass]
+ end;
+end;
+
+var
+ _GetAltTabInfoA: Pointer;
+
+function GetAltTabInfoA;
+begin
+ GetProcedureAddress(_GetAltTabInfoA, user32, 'GetAltTabInfoA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetAltTabInfoA]
+ end;
+end;
+
+var
+ _GetAltTabInfoW: Pointer;
+
+function GetAltTabInfoW;
+begin
+ GetProcedureAddress(_GetAltTabInfoW, user32, 'GetAltTabInfoW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetAltTabInfoW]
+ end;
+end;
+
+var
+ _GetAltTabInfo: Pointer;
+
+function GetAltTabInfo;
+begin
+ GetProcedureAddress(_GetAltTabInfo, user32, 'GetAltTabInfo' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetAltTabInfo]
+ end;
+end;
+
+var
+ _GetListBoxInfo: Pointer;
+
+function GetListBoxInfo;
+begin
+ GetProcedureAddress(_GetListBoxInfo, user32, 'GetListBoxInfo');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetListBoxInfo]
+ end;
+end;
+
+var
+ _LockWorkStation: Pointer;
+
+function LockWorkStation;
+begin
+ GetProcedureAddress(_LockWorkStation, user32, 'LockWorkStation');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_LockWorkStation]
+ end;
+end;
+
+var
+ _UserHandleGrantAccess: Pointer;
+
+function UserHandleGrantAccess;
+begin
+ GetProcedureAddress(_UserHandleGrantAccess, user32, 'UserHandleGrantAccess');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_UserHandleGrantAccess]
+ end;
+end;
+
+var
+ _GetRawInputData: Pointer;
+
+function GetRawInputData;
+begin
+ GetProcedureAddress(_GetRawInputData, user32, 'GetRawInputData');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetRawInputData]
+ end;
+end;
+
+var
+ _GetRawInputDeviceInfoA: Pointer;
+
+function GetRawInputDeviceInfoA;
+begin
+ GetProcedureAddress(_GetRawInputDeviceInfoA, user32, 'GetRawInputDeviceInfoA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetRawInputDeviceInfoA]
+ end;
+end;
+
+var
+ _GetRawInputDeviceInfoW: Pointer;
+
+function GetRawInputDeviceInfoW;
+begin
+ GetProcedureAddress(_GetRawInputDeviceInfoW, user32, 'GetRawInputDeviceInfoW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetRawInputDeviceInfoW]
+ end;
+end;
+
+var
+ _GetRawInputDeviceInfo: Pointer;
+
+function GetRawInputDeviceInfo;
+begin
+ GetProcedureAddress(_GetRawInputDeviceInfo, user32, 'GetRawInputDeviceInfo' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetRawInputDeviceInfo]
+ end;
+end;
+
+var
+ _GetRawInputBuffer: Pointer;
+
+function GetRawInputBuffer;
+begin
+ GetProcedureAddress(_GetRawInputBuffer, user32, 'GetRawInputBuffer');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetRawInputBuffer]
+ end;
+end;
+
+var
+ _RegisterRawInputDevices: Pointer;
+
+function RegisterRawInputDevices;
+begin
+ GetProcedureAddress(_RegisterRawInputDevices, user32, 'RegisterRawInputDevices');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_RegisterRawInputDevices]
+ end;
+end;
+
+var
+ _GetRegisteredRawInputDevices: Pointer;
+
+function GetRegisteredRawInputDevices;
+begin
+ GetProcedureAddress(_GetRegisteredRawInputDevices, user32, 'GetRegisteredRawInputDevices');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetRegisteredRawInputDevices]
+ end;
+end;
+
+var
+ _GetRawInputDeviceList: Pointer;
+
+function GetRawInputDeviceList;
+begin
+ GetProcedureAddress(_GetRawInputDeviceList, user32, 'GetRawInputDeviceList');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetRawInputDeviceList]
+ end;
+end;
+
+var
+ _DefRawInputProc: Pointer;
+
+function DefRawInputProc;
+begin
+ GetProcedureAddress(_DefRawInputProc, user32, 'DefRawInputProc');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_DefRawInputProc]
+ end;
+end;
+
+{$ELSE}
+
+function IsHungAppWindow; external user32 name 'IsHungAppWindow';
+procedure DisableProcessWindowsGhosting; external user32 name 'DisableProcessWindowsGhosting';
+function wvsprintfA; external user32 name 'wvsprintfA';
+function wvsprintfW; external user32 name 'wvsprintfW';
+function wvsprintf; external user32 name 'wvsprintf' + AWSuffix;
+function wsprintfA; external user32 name 'wsprintfA';
+function wsprintfW; external user32 name 'wsprintfW';
+function wsprintf; external user32 name 'wsprintf' + AWSuffix;
+function LoadKeyboardLayoutA; external user32 name 'LoadKeyboardLayoutA';
+function LoadKeyboardLayoutW; external user32 name 'LoadKeyboardLayoutW';
+function LoadKeyboardLayout; external user32 name 'LoadKeyboardLayout' + AWSuffix;
+function ActivateKeyboardLayout; external user32 name 'ActivateKeyboardLayout';
+function ToUnicodeEx; external user32 name 'ToUnicodeEx';
+function UnloadKeyboardLayout; external user32 name 'UnloadKeyboardLayout';
+function GetKeyboardLayoutNameA; external user32 name 'GetKeyboardLayoutNameA';
+function GetKeyboardLayoutNameW; external user32 name 'GetKeyboardLayoutNameW';
+function GetKeyboardLayoutName; external user32 name 'GetKeyboardLayoutName' + AWSuffix;
+function GetKeyboardLayoutList; external user32 name 'GetKeyboardLayoutList';
+function GetKeyboardLayout; external user32 name 'GetKeyboardLayout';
+function GetMouseMovePointsEx; external user32 name 'GetMouseMovePointsEx';
+function CreateDesktopA; external user32 name 'CreateDesktopA';
+function CreateDesktopW; external user32 name 'CreateDesktopW';
+function CreateDesktop; external user32 name 'CreateDesktop' + AWSuffix;
+function OpenDesktopA; external user32 name 'OpenDesktopA';
+function OpenDesktopW; external user32 name 'OpenDesktopW';
+function OpenDesktop; external user32 name 'OpenDesktop' + AWSuffix;
+function OpenInputDesktop; external user32 name 'OpenInputDesktop';
+function EnumDesktopsA; external user32 name 'EnumDesktopsA';
+function EnumDesktopsW; external user32 name 'EnumDesktopsW';
+function EnumDesktops; external user32 name 'EnumDesktops' + AWSuffix;
+function EnumDesktopWindows; external user32 name 'EnumDesktopWindows';
+function SwitchDesktop; external user32 name 'SwitchDesktop';
+function SetThreadDesktop; external user32 name 'SetThreadDesktop';
+function CloseDesktop; external user32 name 'CloseDesktop';
+function GetThreadDesktop; external user32 name 'GetThreadDesktop';
+function CreateWindowStationA; external user32 name 'CreateWindowStationA';
+function CreateWindowStationW; external user32 name 'CreateWindowStationW';
+function CreateWindowStation; external user32 name 'CreateWindowStation' + AWSuffix;
+function OpenWindowStationA; external user32 name 'OpenWindowStationA';
+function OpenWindowStationW; external user32 name 'OpenWindowStationW';
+function OpenWindowStation; external user32 name 'OpenWindowStation' + AWSuffix;
+function EnumWindowStationsA; external user32 name 'EnumWindowStationsA';
+function EnumWindowStationsW; external user32 name 'EnumWindowStationsW';
+function EnumWindowStations; external user32 name 'EnumWindowStations' + AWSuffix;
+function CloseWindowStation; external user32 name 'CloseWindowStation';
+function SetProcessWindowStation; external user32 name 'SetProcessWindowStation';
+function GetProcessWindowStation; external user32 name 'GetProcessWindowStation';
+function SetUserObjectSecurity; external user32 name 'SetUserObjectSecurity';
+function GetUserObjectSecurity; external user32 name 'GetUserObjectSecurity';
+function GetUserObjectInformationA; external user32 name 'GetUserObjectInformationA';
+function GetUserObjectInformationW; external user32 name 'GetUserObjectInformationW';
+function GetUserObjectInformation; external user32 name 'GetUserObjectInformation' + AWSuffix;
+function SetUserObjectInformationA; external user32 name 'SetUserObjectInformationA';
+function SetUserObjectInformationW; external user32 name 'SetUserObjectInformationW';
+function SetUserObjectInformation; external user32 name 'SetUserObjectInformation' + AWSuffix;
+function RegisterWindowMessageA; external user32 name 'RegisterWindowMessageA';
+function RegisterWindowMessageW; external user32 name 'RegisterWindowMessageW';
+function RegisterWindowMessage; external user32 name 'RegisterWindowMessage' + AWSuffix;
+function TrackMouseEvent; external user32 name 'TrackMouseEvent';
+function DrawEdge; external user32 name 'DrawEdge';
+function DrawFrameControl; external user32 name 'DrawFrameControl';
+function DrawCaption; external user32 name 'DrawCaption';
+function DrawAnimatedRects; external user32 name 'DrawAnimatedRects';
+function GetMessageA; external user32 name 'GetMessageA';
+function GetMessageW; external user32 name 'GetMessageW';
+function GetMessage; external user32 name 'GetMessage' + AWSuffix;
+function TranslateMessage; external user32 name 'TranslateMessage';
+function DispatchMessageA; external user32 name 'DispatchMessageA';
+function DispatchMessageW; external user32 name 'DispatchMessageW';
+function DispatchMessage; external user32 name 'DispatchMessage' + AWSuffix;
+function SetMessageQueue; external user32 name 'SetMessageQueue';
+function PeekMessageA; external user32 name 'PeekMessageA';
+function PeekMessageW; external user32 name 'PeekMessageW';
+function PeekMessage; external user32 name 'PeekMessage' + AWSuffix;
+function RegisterHotKey; external user32 name 'RegisterHotKey';
+function UnregisterHotKey; external user32 name 'UnregisterHotKey';
+function ExitWindowsEx; external user32 name 'ExitWindowsEx';
+function SwapMouseButton; external user32 name 'SwapMouseButton';
+function GetMessagePos; external user32 name 'GetMessagePos';
+function GetMessageTime; external user32 name 'GetMessageTime';
+function GetMessageExtraInfo; external user32 name 'GetMessageExtraInfo';
+function SetMessageExtraInfo; external user32 name 'SetMessageExtraInfo';
+function SendMessageA; external user32 name 'SendMessageA';
+function SendMessageW; external user32 name 'SendMessageW';
+function SendMessage; external user32 name 'SendMessage' + AWSuffix;
+function SendMessageTimeoutA; external user32 name 'SendMessageTimeoutA';
+function SendMessageTimeoutW; external user32 name 'SendMessageTimeoutW';
+function SendMessageTimeout; external user32 name 'SendMessageTimeout' + AWSuffix;
+function SendNotifyMessageA; external user32 name 'SendNotifyMessageA';
+function SendNotifyMessageW; external user32 name 'SendNotifyMessageW';
+function SendNotifyMessage; external user32 name 'SendNotifyMessage' + AWSuffix;
+function SendMessageCallbackA; external user32 name 'SendMessageCallbackA';
+function SendMessageCallbackW; external user32 name 'SendMessageCallbackW';
+function SendMessageCallback; external user32 name 'SendMessageCallback' + AWSuffix;
+function BroadcastSystemMessageExA; external user32 name 'BroadcastSystemMessageExA';
+function BroadcastSystemMessageExW; external user32 name 'BroadcastSystemMessageExW';
+function BroadcastSystemMessageEx; external user32 name 'BroadcastSystemMessageEx' + AWSuffix;
+function BroadcastSystemMessageA; external user32 name 'BroadcastSystemMessageA';
+function BroadcastSystemMessageW; external user32 name 'BroadcastSystemMessageW';
+function BroadcastSystemMessage; external user32 name 'BroadcastSystemMessage' + AWSuffix;
+function RegisterDeviceNotificationA; external user32 name 'RegisterDeviceNotificationA';
+function RegisterDeviceNotificationW; external user32 name 'RegisterDeviceNotificationW';
+function RegisterDeviceNotification; external user32 name 'RegisterDeviceNotification' + AWSuffix;
+function UnregisterDeviceNotification; external user32 name 'UnregisterDeviceNotification';
+function PostMessageA; external user32 name 'PostMessageA';
+function PostMessageW; external user32 name 'PostMessageW';
+function PostMessage; external user32 name 'PostMessage' + AWSuffix;
+function PostThreadMessageA; external user32 name 'PostThreadMessageA';
+function PostThreadMessageW; external user32 name 'PostThreadMessageW';
+function PostThreadMessage; external user32 name 'PostThreadMessage' + AWSuffix;
+function AttachThreadInput; external user32 name 'AttachThreadInput';
+function ReplyMessage; external user32 name 'ReplyMessage';
+function WaitMessage; external user32 name 'WaitMessage';
+function WaitForInputIdle; external user32 name 'WaitForInputIdle';
+function DefWindowProcA; external user32 name 'DefWindowProcA';
+function DefWindowProcW; external user32 name 'DefWindowProcW';
+function DefWindowProc; external user32 name 'DefWindowProc' + AWSuffix;
+procedure PostQuitMessage; external user32 name 'PostQuitMessage';
+function CallWindowProcA; external user32 name 'CallWindowProcA';
+function CallWindowProcW; external user32 name 'CallWindowProcW';
+function CallWindowProc; external user32 name 'CallWindowProc' + AWSuffix;
+function InSendMessage; external user32 name 'InSendMessage';
+function InSendMessageEx; external user32 name 'InSendMessageEx';
+function GetDoubleClickTime; external user32 name 'GetDoubleClickTime';
+function SetDoubleClickTime; external user32 name 'SetDoubleClickTime';
+function RegisterClassA; external user32 name 'RegisterClassA';
+function RegisterClassW; external user32 name 'RegisterClassW';
+function RegisterClass; external user32 name 'RegisterClass' + AWSuffix;
+function UnregisterClassA; external user32 name 'UnregisterClassA';
+function UnregisterClassW; external user32 name 'UnregisterClassW';
+function UnregisterClass; external user32 name 'UnregisterClass' + AWSuffix;
+function GetClassInfoA; external user32 name 'GetClassInfoA';
+function GetClassInfoW; external user32 name 'GetClassInfoW';
+function GetClassInfo; external user32 name 'GetClassInfo' + AWSuffix;
+function RegisterClassExA; external user32 name 'RegisterClassExA';
+function RegisterClassExW; external user32 name 'RegisterClassExW';
+function RegisterClassEx; external user32 name 'RegisterClassEx' + AWSuffix;
+function GetClassInfoExA; external user32 name 'GetClassInfoExA';
+function GetClassInfoExW; external user32 name 'GetClassInfoExW';
+function GetClassInfoEx; external user32 name 'GetClassInfoEx' + AWSuffix;
+function CreateWindowExA; external user32 name 'CreateWindowExA';
+function CreateWindowExW; external user32 name 'CreateWindowExW';
+function CreateWindowEx; external user32 name 'CreateWindowEx' + AWSuffix;
+function IsWindow; external user32 name 'IsWindow';
+function IsMenu; external user32 name 'IsMenu';
+function IsChild; external user32 name 'IsChild';
+function DestroyWindow; external user32 name 'DestroyWindow';
+function ShowWindow; external user32 name 'ShowWindow';
+function AnimateWindow; external user32 name 'AnimateWindow';
+function UpdateLayeredWindow; external user32 name 'UpdateLayeredWindow';
+function GetLayeredWindowAttributes; external user32 name 'GetLayeredWindowAttributes';
+function PrintWindow; external user32 name 'PrintWindow';
+function SetLayeredWindowAttributes; external user32 name 'SetLayeredWindowAttributes';
+function ShowWindowAsync; external user32 name 'ShowWindowAsync';
+function FlashWindow; external user32 name 'FlashWindow';
+function FlashWindowEx; external user32 name 'FlashWindowEx';
+function ShowOwnedPopups; external user32 name 'ShowOwnedPopups';
+function OpenIcon; external user32 name 'OpenIcon';
+function CloseWindow; external user32 name 'CloseWindow';
+function MoveWindow; external user32 name 'MoveWindow';
+function SetWindowPos; external user32 name 'SetWindowPos';
+function GetWindowPlacement; external user32 name 'GetWindowPlacement';
+function SetWindowPlacement; external user32 name 'SetWindowPlacement';
+function BeginDeferWindowPos; external user32 name 'BeginDeferWindowPos';
+function DeferWindowPos; external user32 name 'DeferWindowPos';
+function EndDeferWindowPos; external user32 name 'EndDeferWindowPos';
+function IsWindowVisible; external user32 name 'IsWindowVisible';
+function IsIconic; external user32 name 'IsIconic';
+function AnyPopup; external user32 name 'AnyPopup';
+function BringWindowToTop; external user32 name 'BringWindowToTop';
+function IsZoomed; external user32 name 'IsZoomed';
+function CreateDialogParamA; external user32 name 'CreateDialogParamA';
+function CreateDialogParamW; external user32 name 'CreateDialogParamW';
+function CreateDialogParam; external user32 name 'CreateDialogParam' + AWSuffix;
+function CreateDialogIndirectParamA; external user32 name 'CreateDialogIndirectParamA';
+function CreateDialogIndirectParamW; external user32 name 'CreateDialogIndirectParamW';
+function CreateDialogIndirectParam; external user32 name 'CreateDialogIndirectParam' + AWSuffix;
+function DialogBoxParamA; external user32 name 'DialogBoxParamA';
+function DialogBoxParamW; external user32 name 'DialogBoxParamW';
+function DialogBoxParam; external user32 name 'DialogBoxParam' + AWSuffix;
+function DialogBoxIndirectParamA; external user32 name 'DialogBoxIndirectParamA';
+function DialogBoxIndirectParamW; external user32 name 'DialogBoxIndirectParamW';
+function DialogBoxIndirectParam; external user32 name 'DialogBoxIndirectParam' + AWSuffix;
+function EndDialog; external user32 name 'EndDialog';
+function GetDlgItem; external user32 name 'GetDlgItem';
+function SetDlgItemInt; external user32 name 'SetDlgItemInt';
+function GetDlgItemInt; external user32 name 'GetDlgItemInt';
+function SetDlgItemTextA; external user32 name 'SetDlgItemTextA';
+function SetDlgItemTextW; external user32 name 'SetDlgItemTextW';
+function SetDlgItemText; external user32 name 'SetDlgItemText' + AWSuffix;
+function GetDlgItemTextA; external user32 name 'GetDlgItemTextA';
+function GetDlgItemTextW; external user32 name 'GetDlgItemTextW';
+function GetDlgItemText; external user32 name 'GetDlgItemText' + AWSuffix;
+function CheckDlgButton; external user32 name 'CheckDlgButton';
+function CheckRadioButton; external user32 name 'CheckRadioButton';
+function IsDlgButtonChecked; external user32 name 'IsDlgButtonChecked';
+function SendDlgItemMessageA; external user32 name 'SendDlgItemMessageA';
+function SendDlgItemMessageW; external user32 name 'SendDlgItemMessageW';
+function SendDlgItemMessage; external user32 name 'SendDlgItemMessage' + AWSuffix;
+function GetNextDlgGroupItem; external user32 name 'GetNextDlgGroupItem';
+function GetNextDlgTabItem; external user32 name 'GetNextDlgTabItem';
+function GetDlgCtrlID; external user32 name 'GetDlgCtrlID';
+function GetDialogBaseUnits; external user32 name 'GetDialogBaseUnits';
+function DefDlgProcA; external user32 name 'DefDlgProcA';
+function DefDlgProcW; external user32 name 'DefDlgProcW';
+function DefDlgProc; external user32 name 'DefDlgProc' + AWSuffix;
+function CallMsgFilterA; external user32 name 'CallMsgFilterA';
+function CallMsgFilterW; external user32 name 'CallMsgFilterW';
+function CallMsgFilter; external user32 name 'CallMsgFilter' + AWSuffix;
+function OpenClipboard; external user32 name 'OpenClipboard';
+function CloseClipboard; external user32 name 'CloseClipboard';
+function GetClipboardSequenceNumber; external user32 name 'GetClipboardSequenceNumber';
+function GetClipboardOwner; external user32 name 'GetClipboardOwner';
+function SetClipboardViewer; external user32 name 'SetClipboardViewer';
+function GetClipboardViewer; external user32 name 'GetClipboardViewer';
+function ChangeClipboardChain; external user32 name 'ChangeClipboardChain';
+function SetClipboardData; external user32 name 'SetClipboardData';
+function GetClipboardData; external user32 name 'GetClipboardData';
+function RegisterClipboardFormatA; external user32 name 'RegisterClipboardFormatA';
+function RegisterClipboardFormatW; external user32 name 'RegisterClipboardFormatW';
+function RegisterClipboardFormat; external user32 name 'RegisterClipboardFormat' + AWSuffix;
+function CountClipboardFormats; external user32 name 'CountClipboardFormats';
+function EnumClipboardFormats; external user32 name 'EnumClipboardFormats';
+function GetClipboardFormatNameA; external user32 name 'GetClipboardFormatNameA';
+function GetClipboardFormatNameW; external user32 name 'GetClipboardFormatNameW';
+function GetClipboardFormatName; external user32 name 'GetClipboardFormatName' + AWSuffix;
+function EmptyClipboard; external user32 name 'EmptyClipboard';
+function IsClipboardFormatAvailable; external user32 name 'IsClipboardFormatAvailable';
+function GetPriorityClipboardFormat; external user32 name 'GetPriorityClipboardFormat';
+function GetOpenClipboardWindow; external user32 name 'GetOpenClipboardWindow';
+function CharToOemA; external user32 name 'CharToOemA';
+function CharToOemW; external user32 name 'CharToOemW';
+function CharToOem; external user32 name 'CharToOem' + AWSuffix;
+function OemToCharA; external user32 name 'OemToCharA';
+function OemToCharW; external user32 name 'OemToCharW';
+function OemToChar; external user32 name 'OemToChar' + AWSuffix;
+function CharToOemBuffA; external user32 name 'CharToOemBuffA';
+function CharToOemBuffW; external user32 name 'CharToOemBuffW';
+function CharToOemBuff; external user32 name 'CharToOemBuff' + AWSuffix;
+function OemToCharBuffA; external user32 name 'OemToCharBuffA';
+function OemToCharBuffW; external user32 name 'OemToCharBuffW';
+function OemToCharBuff; external user32 name 'OemToCharBuff' + AWSuffix;
+function CharUpperA; external user32 name 'CharUpperA';
+function CharUpperW; external user32 name 'CharUpperW';
+function CharUpper; external user32 name 'CharUpper' + AWSuffix;
+function CharUpperBuffA; external user32 name 'CharUpperBuffA';
+function CharUpperBuffW; external user32 name 'CharUpperBuffW';
+function CharUpperBuff; external user32 name 'CharUpperBuff' + AWSuffix;
+function CharLowerA; external user32 name 'CharLowerA';
+function CharLowerW; external user32 name 'CharLowerW';
+function CharLower; external user32 name 'CharLower' + AWSuffix;
+function CharLowerBuffA; external user32 name 'CharLowerBuffA';
+function CharLowerBuffW; external user32 name 'CharLowerBuffW';
+function CharLowerBuff; external user32 name 'CharLowerBuff' + AWSuffix;
+function CharNextA; external user32 name 'CharNextA';
+function CharNextW; external user32 name 'CharNextW';
+function CharNext; external user32 name 'CharNext' + AWSuffix;
+function CharPrevA; external user32 name 'CharPrevA';
+function CharPrevW; external user32 name 'CharPrevW';
+function CharPrev; external user32 name 'CharPrev' + AWSuffix;
+function CharNextExA; external user32 name 'CharNextExA';
+function CharPrevExA; external user32 name 'CharPrevExA';
+function IsCharAlphaA; external user32 name 'IsCharAlphaA';
+function IsCharAlphaW; external user32 name 'IsCharAlphaW';
+function IsCharAlpha; external user32 name 'IsCharAlpha' + AWSuffix;
+function IsCharAlphaNumericA; external user32 name 'IsCharAlphaNumericA';
+function IsCharAlphaNumericW; external user32 name 'IsCharAlphaNumericW';
+function IsCharAlphaNumeric; external user32 name 'IsCharAlphaNumeric' + AWSuffix;
+function IsCharUpperA; external user32 name 'IsCharUpperA';
+function IsCharUpperW; external user32 name 'IsCharUpperW';
+function IsCharUpper; external user32 name 'IsCharUpper' + AWSuffix;
+function IsCharLowerA; external user32 name 'IsCharLowerA';
+function IsCharLowerW; external user32 name 'IsCharLowerW';
+function IsCharLower; external user32 name 'IsCharLower' + AWSuffix;
+function SetFocus; external user32 name 'SetFocus';
+function GetActiveWindow; external user32 name 'GetActiveWindow';
+function GetFocus; external user32 name 'GetFocus';
+function GetKBCodePage; external user32 name 'GetKBCodePage';
+function GetKeyState; external user32 name 'GetKeyState';
+function GetAsyncKeyState; external user32 name 'GetAsyncKeyState';
+function GetKeyboardState; external user32 name 'GetKeyboardState';
+function SetKeyboardState; external user32 name 'SetKeyboardState';
+function GetKeyNameTextA; external user32 name 'GetKeyNameTextA';
+function GetKeyNameTextW; external user32 name 'GetKeyNameTextW';
+function GetKeyNameText; external user32 name 'GetKeyNameText' + AWSuffix;
+function GetKeyboardType; external user32 name 'GetKeyboardType';
+function ToAscii; external user32 name 'ToAscii';
+function ToAsciiEx; external user32 name 'ToAsciiEx';
+function ToUnicode; external user32 name 'ToUnicode';
+function OemKeyScan; external user32 name 'OemKeyScan';
+function VkKeyScanA; external user32 name 'VkKeyScanA';
+function VkKeyScanW; external user32 name 'VkKeyScanW';
+function VkKeyScan; external user32 name 'VkKeyScan' + AWSuffix;
+function VkKeyScanExA; external user32 name 'VkKeyScanExA';
+function VkKeyScanExW; external user32 name 'VkKeyScanExW';
+function VkKeyScanEx; external user32 name 'VkKeyScanEx' + AWSuffix;
+procedure keybd_event; external user32 name 'keybd_event';
+procedure mouse_event; external user32 name 'mouse_event';
+function SendInput; external user32 name 'SendInput';
+function GetLastInputInfo; external user32 name 'GetLastInputInfo';
+function MapVirtualKeyA; external user32 name 'MapVirtualKeyA';
+function MapVirtualKeyW; external user32 name 'MapVirtualKeyW';
+function MapVirtualKey; external user32 name 'MapVirtualKey' + AWSuffix;
+function MapVirtualKeyExA; external user32 name 'MapVirtualKeyExA';
+function MapVirtualKeyExW; external user32 name 'MapVirtualKeyExW';
+function MapVirtualKeyEx; external user32 name 'MapVirtualKeyEx' + AWSuffix;
+function GetInputState; external user32 name 'GetInputState';
+function GetQueueStatus; external user32 name 'GetQueueStatus';
+function GetCapture; external user32 name 'GetCapture';
+function SetCapture; external user32 name 'SetCapture';
+function ReleaseCapture; external user32 name 'ReleaseCapture';
+function MsgWaitForMultipleObjects; external user32 name 'MsgWaitForMultipleObjects';
+function MsgWaitForMultipleObjectsEx; external user32 name 'MsgWaitForMultipleObjectsEx';
+function SetTimer; external user32 name 'SetTimer';
+function KillTimer; external user32 name 'KillTimer';
+function IsWindowUnicode; external user32 name 'IsWindowUnicode';
+function EnableWindow; external user32 name 'EnableWindow';
+function IsWindowEnabled; external user32 name 'IsWindowEnabled';
+function LoadAcceleratorsA; external user32 name 'LoadAcceleratorsA';
+function LoadAcceleratorsW; external user32 name 'LoadAcceleratorsW';
+function LoadAccelerators; external user32 name 'LoadAccelerators' + AWSuffix;
+function CreateAcceleratorTableA; external user32 name 'CreateAcceleratorTableA';
+function CreateAcceleratorTableW; external user32 name 'CreateAcceleratorTableW';
+function CreateAcceleratorTable; external user32 name 'CreateAcceleratorTable' + AWSuffix;
+function DestroyAcceleratorTable; external user32 name 'DestroyAcceleratorTable';
+function CopyAcceleratorTableA; external user32 name 'CopyAcceleratorTableA';
+function CopyAcceleratorTableW; external user32 name 'CopyAcceleratorTableW';
+function CopyAcceleratorTable; external user32 name 'CopyAcceleratorTable' + AWSuffix;
+function TranslateAcceleratorA; external user32 name 'TranslateAcceleratorA';
+function TranslateAcceleratorW; external user32 name 'TranslateAcceleratorW';
+function TranslateAccelerator; external user32 name 'TranslateAccelerator' + AWSuffix;
+function GetSystemMetrics; external user32 name 'GetSystemMetrics';
+function LoadMenuA; external user32 name 'LoadMenuAA';
+function LoadMenuW; external user32 name 'LoadMenuWA';
+function LoadMenu; external user32 name 'LoadMenu' + AWSuffix;
+function LoadMenuIndirectA; external user32 name 'LoadMenuIndirectA';
+function LoadMenuIndirectW; external user32 name 'LoadMenuIndirectW';
+function LoadMenuIndirect; external user32 name 'LoadMenuIndirect' + AWSuffix;
+function GetMenu; external user32 name 'GetMenu';
+function SetMenu; external user32 name 'SetMenu';
+function ChangeMenuA; external user32 name 'ChangeMenuA';
+function ChangeMenuW; external user32 name 'ChangeMenuW';
+function ChangeMenu; external user32 name 'ChangeMenu' + AWSuffix;
+function HiliteMenuItem; external user32 name 'HiliteMenuItem';
+function GetMenuStringA; external user32 name 'GetMenuStringA';
+function GetMenuStringW; external user32 name 'GetMenuStringW';
+function GetMenuString; external user32 name 'GetMenuString' + AWSuffix;
+function GetMenuState; external user32 name 'GetMenuState';
+function DrawMenuBar; external user32 name 'DrawMenuBar';
+function GetSystemMenu; external user32 name 'GetSystemMenu';
+function CreateMenu; external user32 name 'CreateMenu';
+function CreatePopupMenu; external user32 name 'CreatePopupMenu';
+function DestroyMenu; external user32 name 'DestroyMenu';
+function CheckMenuItem; external user32 name 'CheckMenuItem';
+function EnableMenuItem; external user32 name 'EnableMenuItem';
+function GetSubMenu; external user32 name 'GetSubMenu';
+function GetMenuItemID; external user32 name 'GetMenuItemID';
+function GetMenuItemCount; external user32 name 'GetMenuItemCount';
+function InsertMenuA; external user32 name 'InsertMenuA';
+function InsertMenuW; external user32 name 'InsertMenuW';
+function InsertMenu; external user32 name 'InsertMenu' + AWSuffix;
+function AppendMenuA; external user32 name 'AppendMenuA';
+function AppendMenuW; external user32 name 'AppendMenuW';
+function AppendMenu; external user32 name 'AppendMenu' + AWSuffix;
+function ModifyMenuA; external user32 name 'ModifyMenuA';
+function ModifyMenuW; external user32 name 'ModifyMenuW';
+function ModifyMenu; external user32 name 'ModifyMenu' + AWSuffix;
+function RemoveMenu; external user32 name 'RemoveMenu';
+function DeleteMenu; external user32 name 'DeleteMenu';
+function SetMenuItemBitmaps; external user32 name 'SetMenuItemBitmaps';
+function GetMenuCheckMarkDimensions; external user32 name 'GetMenuCheckMarkDimensions';
+function TrackPopupMenu; external user32 name 'TrackPopupMenu';
+function TrackPopupMenuEx; external user32 name 'TrackPopupMenuEx';
+function GetMenuInfo; external user32 name 'GetMenuInfo';
+function SetMenuInfo; external user32 name 'SetMenuInfo';
+function EndMenu; external user32 name 'EndMenu';
+function InsertMenuItemA; external user32 name 'InsertMenuItemA';
+function InsertMenuItemW; external user32 name 'InsertMenuItemW';
+function InsertMenuItem; external user32 name 'InsertMenuItem' + AWSuffix;
+function GetMenuItemInfoA; external user32 name 'GetMenuItemInfoA';
+function GetMenuItemInfoW; external user32 name 'GetMenuItemInfoW';
+function GetMenuItemInfo; external user32 name 'GetMenuItemInfo' + AWSuffix;
+function SetMenuItemInfoA; external user32 name 'SetMenuItemInfoA';
+function SetMenuItemInfoW; external user32 name 'SetMenuItemInfoW';
+function SetMenuItemInfo; external user32 name 'SetMenuItemInfo' + AWSuffix;
+function GetMenuDefaultItem; external user32 name 'GetMenuDefaultItem';
+function SetMenuDefaultItem; external user32 name 'SetMenuDefaultItem';
+function GetMenuItemRect; external user32 name 'GetMenuItemRect';
+function MenuItemFromPoint; external user32 name 'MenuItemFromPoint';
+function DragObject; external user32 name 'DragObject';
+function DragDetect; external user32 name 'DragDetect';
+function DrawIcon; external user32 name 'DrawIcon';
+function DrawTextA; external user32 name 'DrawTextA';
+function DrawTextW; external user32 name 'DrawTextW';
+function DrawText; external user32 name 'DrawText' + AWSuffix;
+function DrawTextExA; external user32 name 'DrawTextExA';
+function DrawTextExW; external user32 name 'DrawTextExW';
+function DrawTextEx; external user32 name 'DrawTextEx' + AWSuffix;
+function GrayStringA; external user32 name 'GrayStringA';
+function GrayStringW; external user32 name 'GrayStringW';
+function GrayString; external user32 name 'GrayString' + AWSuffix;
+function DrawStateA; external user32 name 'DrawStateA';
+function DrawStateW; external user32 name 'DrawStateW';
+function DrawState; external user32 name 'DrawState' + AWSuffix;
+function TabbedTextOutA; external user32 name 'TabbedTextOutA';
+function TabbedTextOutW; external user32 name 'TabbedTextOutW';
+function TabbedTextOut; external user32 name 'TabbedTextOut' + AWSuffix;
+function GetTabbedTextExtentA; external user32 name 'GetTabbedTextExtentA';
+function GetTabbedTextExtentW; external user32 name 'GetTabbedTextExtentW';
+function GetTabbedTextExtent; external user32 name 'GetTabbedTextExtent' + AWSuffix;
+function UpdateWindow; external user32 name 'UpdateWindow';
+function SetActiveWindow; external user32 name 'SetActiveWindow';
+function GetForegroundWindow; external user32 name 'GetForegroundWindow';
+function PaintDesktop; external user32 name 'PaintDesktop';
+procedure SwitchToThisWindow; external user32 name 'SwitchToThisWindow';
+function SetForegroundWindow; external user32 name 'SetForegroundWindow';
+function AllowSetForegroundWindow; external user32 name 'AllowSetForegroundWindow';
+function LockSetForegroundWindow; external user32 name 'LockSetForegroundWindow';
+function WindowFromDC; external user32 name 'WindowFromDC';
+function GetDC; external user32 name 'GetDC';
+function GetDCEx; external user32 name 'GetDCEx';
+function GetWindowDC; external user32 name 'GetWindowDC';
+function ReleaseDC; external user32 name 'ReleaseDC';
+function BeginPaint; external user32 name 'BeginPaint';
+function EndPaint; external user32 name 'EndPaint';
+function GetUpdateRect; external user32 name 'GetUpdateRect';
+function GetUpdateRgn; external user32 name 'GetUpdateRgn';
+function SetWindowRgn; external user32 name 'SetWindowRgn';
+function GetWindowRgn; external user32 name 'GetWindowRgn';
+function GetWindowRgnBox; external user32 name 'GetWindowRgnBox';
+function ExcludeUpdateRgn; external user32 name 'ExcludeUpdateRgn';
+function InvalidateRect; external user32 name 'InvalidateRect';
+function ValidateRect; external user32 name 'ValidateRect';
+function InvalidateRgn; external user32 name 'InvalidateRgn';
+function ValidateRgn; external user32 name 'ValidateRgn';
+function RedrawWindow; external user32 name 'RedrawWindow';
+function LockWindowUpdate; external user32 name 'LockWindowUpdate';
+function ScrollWindow; external user32 name 'ScrollWindow';
+function ScrollDC; external user32 name 'ScrollDC';
+function ScrollWindowEx; external user32 name 'ScrollWindowEx';
+function SetScrollPos; external user32 name 'SetScrollPos';
+function GetScrollPos; external user32 name 'GetScrollPos';
+function SetScrollRange; external user32 name 'SetScrollRange';
+function GetScrollRange; external user32 name 'GetScrollRange';
+function ShowScrollBar; external user32 name 'ShowScrollBar';
+function EnableScrollBar; external user32 name 'EnableScrollBar';
+function SetPropA; external user32 name 'SetPropA';
+function SetPropW; external user32 name 'SetPropW';
+function SetProp; external user32 name 'SetProp' + AWSuffix;
+function GetPropA; external user32 name 'GetPropA';
+function GetPropW; external user32 name 'GetPropW';
+function GetProp; external user32 name 'GetProp' + AWSuffix;
+function RemovePropA; external user32 name 'RemovePropA';
+function RemovePropW; external user32 name 'RemovePropW';
+function RemoveProp; external user32 name 'RemoveProp' + AWSuffix;
+function EnumPropsExA; external user32 name 'EnumPropsExA';
+function EnumPropsExW; external user32 name 'EnumPropsExW';
+function EnumPropsEx; external user32 name 'EnumPropsEx' + AWSuffix;
+function EnumPropsA; external user32 name 'EnumPropsA';
+function EnumPropsW; external user32 name 'EnumPropsW';
+function EnumProps; external user32 name 'EnumProps' + AWSuffix;
+function SetWindowTextA; external user32 name 'SetWindowTextA';
+function SetWindowTextW; external user32 name 'SetWindowTextW';
+function SetWindowText; external user32 name 'SetWindowText' + AWSuffix;
+function GetWindowTextA; external user32 name 'GetWindowTextA';
+function GetWindowTextW; external user32 name 'GetWindowTextW';
+function GetWindowText; external user32 name 'GetWindowText' + AWSuffix;
+function GetWindowTextLengthA; external user32 name 'GetWindowTextLengthA';
+function GetWindowTextLengthW; external user32 name 'GetWindowTextLengthW';
+function GetWindowTextLength; external user32 name 'GetWindowTextLength' + AWSuffix;
+function GetClientRect; external user32 name 'GetClientRect';
+function GetWindowRect; external user32 name 'GetWindowRect';
+function AdjustWindowRect; external user32 name 'AdjustWindowRect';
+function AdjustWindowRectEx; external user32 name 'AdjustWindowRectEx';
+function SetWindowContextHelpId; external user32 name 'SetWindowContextHelpId';
+function GetWindowContextHelpId; external user32 name 'GetWindowContextHelpId';
+function SetMenuContextHelpId; external user32 name 'SetMenuContextHelpId';
+function GetMenuContextHelpId; external user32 name 'GetMenuContextHelpId';
+function MessageBoxA; external user32 name 'MessageBoxA';
+function MessageBoxW; external user32 name 'MessageBoxW';
+function MessageBox; external user32 name 'MessageBox' + AWSuffix;
+function MessageBoxExA; external user32 name 'MessageBoxExA';
+function MessageBoxExW; external user32 name 'MessageBoxExW';
+function MessageBoxEx; external user32 name 'MessageBoxEx' + AWSuffix;
+function MessageBoxIndirectA; external user32 name 'MessageBoxIndirectA';
+function MessageBoxIndirectW; external user32 name 'MessageBoxIndirectW';
+function MessageBoxIndirect; external user32 name 'MessageBoxIndirect' + AWSuffix;
+function MessageBeep; external user32 name 'MessageBeep';
+function ShowCursor; external user32 name 'ShowCursor';
+function SetCursorPos; external user32 name 'SetCursorPos';
+function SetCursor; external user32 name 'SetCursor';
+function GetCursorPos; external user32 name 'GetCursorPos';
+function ClipCursor; external user32 name 'ClipCursor';
+function GetClipCursor; external user32 name 'GetClipCursor';
+function GetCursor; external user32 name 'GetCursor';
+function CreateCaret; external user32 name 'CreateCaret';
+function GetCaretBlinkTime; external user32 name 'GetCaretBlinkTime';
+function SetCaretBlinkTime; external user32 name 'SetCaretBlinkTime';
+function DestroyCaret; external user32 name 'DestroyCaret';
+function HideCaret; external user32 name 'HideCaret';
+function ShowCaret; external user32 name 'ShowCaret';
+function SetCaretPos; external user32 name 'SetCaretPos';
+function GetCaretPos; external user32 name 'GetCaretPos';
+function ClientToScreen; external user32 name 'ClientToScreen';
+function ScreenToClient; external user32 name 'ScreenToClient';
+function MapWindowPoints; external user32 name 'MapWindowPoints';
+function WindowFromPoint; external user32 name 'WindowFromPoint';
+function ChildWindowFromPoint; external user32 name 'ChildWindowFromPoint';
+function ChildWindowFromPointEx; external user32 name 'ChildWindowFromPointEx';
+function GetSysColor; external user32 name 'GetSysColor';
+function GetSysColorBrush; external user32 name 'GetSysColorBrush';
+function SetSysColors; external user32 name 'SetSysColors';
+function DrawFocusRect; external user32 name 'DrawFocusRect';
+function FillRect; external user32 name 'FillRect';
+function FrameRect; external user32 name 'FrameRect';
+function InvertRect; external user32 name 'InvertRect';
+function SetRect; external user32 name 'SetRect';
+function SetRectEmpty; external user32 name 'SetRectEmpty';
+function CopyRect; external user32 name 'CopyRect';
+function InflateRect; external user32 name 'InflateRect';
+function IntersectRect; external user32 name 'IntersectRect';
+function UnionRect; external user32 name 'UnionRect';
+function SubtractRect; external user32 name 'SubtractRect';
+function OffsetRect; external user32 name 'OffsetRect';
+function IsRectEmpty; external user32 name 'IsRectEmpty';
+function EqualRect; external user32 name 'EqualRect';
+function PtInRect; external user32 name 'PtInRect';
+function GetWindowWord; external user32 name 'GetWindowWord';
+function SetWindowWord; external user32 name 'SetWindowWord';
+function GetWindowLongA; external user32 name 'GetWindowLongA';
+function GetWindowLongW; external user32 name 'GetWindowLongW';
+function GetWindowLong; external user32 name 'GetWindowLong' + AWSuffix;
+function SetWindowLongA; external user32 name 'SetWindowLongA';
+function SetWindowLongW; external user32 name 'SetWindowLongW';
+function SetWindowLong; external user32 name 'SetWindowLong' + AWSuffix;
+function GetClassWord; external user32 name 'GetClassWord';
+function SetClassWord; external user32 name 'SetClassWord';
+function GetClassLongA; external user32 name 'GetClassLongA';
+function GetClassLongW; external user32 name 'GetClassLongW';
+function GetClassLong; external user32 name 'GetClassLong' + AWSuffix;
+function SetClassLongA; external user32 name 'SetClassLongA';
+function SetClassLongW; external user32 name 'SetClassLongW';
+function SetClassLong; external user32 name 'SetClassLong' + AWSuffix;
+function GetProcessDefaultLayout; external user32 name 'GetProcessDefaultLayout';
+function SetProcessDefaultLayout; external user32 name 'SetProcessDefaultLayout';
+function GetDesktopWindow; external user32 name 'GetDesktopWindow';
+function GetParent; external user32 name 'GetParent';
+function SetParent; external user32 name 'SetParent';
+function EnumChildWindows; external user32 name 'EnumChildWindows';
+function FindWindowA; external user32 name 'FindWindowA';
+function FindWindowW; external user32 name 'FindWindowW';
+function FindWindow; external user32 name 'FindWindow' + AWSuffix;
+function FindWindowExA; external user32 name 'FindWindowExA';
+function FindWindowExW; external user32 name 'FindWindowExW';
+function FindWindowEx; external user32 name 'FindWindowEx' + AWSuffix;
+function GetShellWindow; external user32 name 'GetShellWindow';
+function RegisterShellHookWindow; external user32 name 'RegisterShellHookWindow';
+function DeregisterShellHookWindow; external user32 name 'DeregisterShellHookWindow';
+function EnumWindows; external user32 name 'EnumWindows';
+function EnumThreadWindows; external user32 name 'EnumThreadWindows';
+function GetClassNameA; external user32 name 'GetClassNameA';
+function GetClassNameW; external user32 name 'GetClassNameW';
+function GetClassName; external user32 name 'GetClassName' + AWSuffix;
+function GetTopWindow; external user32 name 'GetTopWindow';
+function GetWindowThreadProcessId; external user32 name 'GetWindowThreadProcessId';
+function IsGUIThread; external user32 name 'IsGUIThread';
+function GetLastActivePopup; external user32 name 'GetLastActivePopup';
+function GetWindow; external user32 name 'GetWindow';
+function SetWindowsHookA; external user32 name 'SetWindowsHookA';
+function SetWindowsHookW; external user32 name 'SetWindowsHookW';
+function SetWindowsHook; external user32 name 'SetWindowsHook' + AWSuffix;
+function UnhookWindowsHook; external user32 name 'UnhookWindowsHook';
+function SetWindowsHookExA; external user32 name 'SetWindowsHookExA';
+function SetWindowsHookExW; external user32 name 'SetWindowsHookExW';
+function SetWindowsHookEx; external user32 name 'SetWindowsHookEx' + AWSuffix;
+function UnhookWindowsHookEx; external user32 name 'UnhookWindowsHookEx';
+function CallNextHookEx; external user32 name 'CallNextHookEx';
+function CheckMenuRadioItem; external user32 name 'CheckMenuRadioItem';
+function LoadBitmapA; external user32 name 'LoadBitmapA';
+function LoadBitmapW; external user32 name 'LoadBitmapW';
+function LoadBitmap; external user32 name 'LoadBitmap' + AWSuffix;
+function LoadCursorA; external user32 name 'LoadCursorA';
+function LoadCursorW; external user32 name 'LoadCursorW';
+function LoadCursor; external user32 name 'LoadCursor' + AWSuffix;
+function LoadCursorFromFileA; external user32 name 'LoadCursorFromFileA';
+function LoadCursorFromFileW; external user32 name 'LoadCursorFromFileW';
+function LoadCursorFromFile; external user32 name 'LoadCursorFromFile' + AWSuffix;
+function CreateCursor; external user32 name 'CreateCursor';
+function DestroyCursor; external user32 name 'DestroyCursor';
+function SetSystemCursor; external user32 name 'SetSystemCursor';
+function LoadIconA; external user32 name 'LoadIconA';
+function LoadIconW; external user32 name 'LoadIconW';
+function LoadIcon; external user32 name 'LoadIcon' + AWSuffix;
+function PrivateExtractIconsA; external user32 name 'PrivateExtractIconsA';
+function PrivateExtractIconsW; external user32 name 'PrivateExtractIconsW';
+function PrivateExtractIcons; external user32 name 'PrivateExtractIcons' + AWSuffix;
+function CreateIcon; external user32 name 'CreateIcon';
+function DestroyIcon; external user32 name 'DestroyIcon';
+function LookupIconIdFromDirectory; external user32 name 'LookupIconIdFromDirectory';
+function LookupIconIdFromDirectoryEx; external user32 name 'LookupIconIdFromDirectoryEx';
+function CreateIconFromResource; external user32 name 'CreateIconFromResource';
+function CreateIconFromResourceEx; external user32 name 'CreateIconFromResourceEx';
+function LoadImageA; external user32 name 'LoadImageA';
+function LoadImageW; external user32 name 'LoadImageW';
+function LoadImage; external user32 name 'LoadImage' + AWSuffix;
+function CopyImage; external user32 name 'CopyImage';
+function DrawIconEx; external user32 name 'DrawIconEx';
+function CreateIconIndirect; external user32 name 'CreateIconIndirect';
+function CopyIcon; external user32 name 'CopyIcon';
+function GetIconInfo; external user32 name 'GetIconInfo';
+function LoadStringA; external user32 name 'LoadStringA';
+function LoadStringW; external user32 name 'LoadStringW';
+function LoadString; external user32 name 'LoadString' + AWSuffix;
+function IsDialogMessageA; external user32 name 'IsDialogMessageA';
+function IsDialogMessageW; external user32 name 'IsDialogMessageW';
+function IsDialogMessage; external user32 name 'IsDialogMessage' + AWSuffix;
+function MapDialogRect; external user32 name 'MapDialogRect';
+function DlgDirListA; external user32 name 'DlgDirListA';
+function DlgDirListW; external user32 name 'DlgDirListW';
+function DlgDirList; external user32 name 'DlgDirList' + AWSuffix;
+function DlgDirSelectExA; external user32 name 'DlgDirSelectExA';
+function DlgDirSelectExW; external user32 name 'DlgDirSelectExW';
+function DlgDirSelectEx; external user32 name 'DlgDirSelectEx' + AWSuffix;
+function DlgDirListComboBoxA; external user32 name 'DlgDirListComboBoxA';
+function DlgDirListComboBoxW; external user32 name 'DlgDirListComboBoxW';
+function DlgDirListComboBox; external user32 name 'DlgDirListComboBox' + AWSuffix;
+function DlgDirSelectComboBoxExA; external user32 name 'DlgDirSelectComboBoxExA';
+function DlgDirSelectComboBoxExW; external user32 name 'DlgDirSelectComboBoxExW';
+function DlgDirSelectComboBoxEx; external user32 name 'DlgDirSelectComboBoxEx' + AWSuffix;
+function SetScrollInfo; external user32 name 'SetScrollInfo';
+function GetScrollInfo; external user32 name 'GetScrollInfo';
+function DefFrameProcA; external user32 name 'DefFrameProcA';
+function DefFrameProcW; external user32 name 'DefFrameProcW';
+function DefFrameProc; external user32 name 'DefFrameProc' + AWSuffix;
+function DefMDIChildProcA; external user32 name 'DefMDIChildProcA';
+function DefMDIChildProcW; external user32 name 'DefMDIChildProcW';
+function DefMDIChildProc; external user32 name 'DefMDIChildProc' + AWSuffix;
+function TranslateMDISysAccel; external user32 name 'TranslateMDISysAccel';
+function ArrangeIconicWindows; external user32 name 'ArrangeIconicWindows';
+function CreateMDIWindowA; external user32 name 'CreateMDIWindowA';
+function CreateMDIWindowW; external user32 name 'CreateMDIWindowW';
+function CreateMDIWindow; external user32 name 'CreateMDIWindow' + AWSuffix;
+function TileWindows; external user32 name 'TileWindows';
+function CascadeWindows; external user32 name 'CascadeWindows';
+function WinHelpA; external user32 name 'WinHelpA';
+function WinHelpW; external user32 name 'WinHelpW';
+function WinHelp; external user32 name 'WinHelp' + AWSuffix;
+function GetGuiResources; external user32 name 'GetGuiResources';
+function ChangeDisplaySettingsA; external user32 name 'ChangeDisplaySettingsA';
+function ChangeDisplaySettingsW; external user32 name 'ChangeDisplaySettingsW';
+function ChangeDisplaySettings; external user32 name 'ChangeDisplaySettings' + AWSuffix;
+function ChangeDisplaySettingsExA; external user32 name 'ChangeDisplaySettingsExA';
+function ChangeDisplaySettingsExW; external user32 name 'ChangeDisplaySettingsExW';
+function ChangeDisplaySettingsEx; external user32 name 'ChangeDisplaySettingsEx' + AWSuffix;
+function EnumDisplaySettingsA; external user32 name 'EnumDisplaySettingsA';
+function EnumDisplaySettingsW; external user32 name 'EnumDisplaySettingsW';
+function EnumDisplaySettings; external user32 name 'EnumDisplaySettings' + AWSuffix;
+function EnumDisplaySettingsExA; external user32 name 'EnumDisplaySettingsExA';
+function EnumDisplaySettingsExW; external user32 name 'EnumDisplaySettingsExW';
+function EnumDisplaySettingsEx; external user32 name 'EnumDisplaySettingsEx' + AWSuffix;
+function EnumDisplayDevicesA; external user32 name 'EnumDisplayDevicesA';
+function EnumDisplayDevicesW; external user32 name 'EnumDisplayDevicesW';
+function EnumDisplayDevices; external user32 name 'EnumDisplayDevices' + AWSuffix;
+function SystemParametersInfoA; external user32 name 'SystemParametersInfoA';
+function SystemParametersInfoW; external user32 name 'SystemParametersInfoW';
+function SystemParametersInfo; external user32 name 'SystemParametersInfo' + AWSuffix;
+procedure SetDebugErrorLevel; external user32 name 'SetDebugErrorLevel';
+procedure SetLastErrorEx; external user32 name 'SetLastErrorEx';
+function InternalGetWindowText; external user32 name 'InternalGetWindowText';
+function EndTask; external user32 name 'EndTask';
+function MonitorFromPoint; external user32 name 'MonitorFromPoint';
+function MonitorFromRect; external user32 name 'MonitorFromRect';
+function MonitorFromWindow; external user32 name 'MonitorFromWindow';
+function GetMonitorInfoA; external user32 name 'GetMonitorInfoA';
+function GetMonitorInfoW; external user32 name 'GetMonitorInfoW';
+function GetMonitorInfo; external user32 name 'GetMonitorInfo' + AWSuffix;
+function EnumDisplayMonitors; external user32 name 'EnumDisplayMonitors';
+procedure NotifyWinEvent; external user32 name 'NotifyWinEvent';
+function SetWinEventHook; external user32 name 'SetWinEventHook';
+function IsWinEventHookInstalled; external user32 name 'IsWinEventHookInstalled';
+function UnhookWinEvent; external user32 name 'UnhookWinEvent';
+function GetGUIThreadInfo; external user32 name 'GetGUIThreadInfo';
+function GetWindowModuleFileNameA; external user32 name 'GetWindowModuleFileNameA';
+function GetWindowModuleFileNameW; external user32 name 'GetWindowModuleFileNameW';
+function GetWindowModuleFileName; external user32 name 'GetWindowModuleFileName' + AWSuffix;
+function GetCursorInfo; external user32 name 'GetCursorInfo';
+function GetWindowInfo; external user32 name 'GetWindowInfo';
+function GetTitleBarInfo; external user32 name 'GetTitleBarInfo';
+function GetMenuBarInfo; external user32 name 'GetMenuBarInfo';
+function GetScrollBarInfo; external user32 name 'GetScrollBarInfo';
+function GetComboBoxInfo; external user32 name 'GetComboBoxInfo';
+function GetAncestor; external user32 name 'GetAncestor';
+function RealChildWindowFromPoint; external user32 name 'RealChildWindowFromPoint';
+function RealGetWindowClassA; external user32 name 'RealGetWindowClassA';
+function RealGetWindowClassW; external user32 name 'RealGetWindowClassW';
+function RealGetWindowClass; external user32 name 'RealGetWindowClass' + AWSuffix;
+function GetAltTabInfoA; external user32 name 'GetAltTabInfoA';
+function GetAltTabInfoW; external user32 name 'GetAltTabInfoW';
+function GetAltTabInfo; external user32 name 'GetAltTabInfo' + AWSuffix;
+function GetListBoxInfo; external user32 name 'GetListBoxInfo';
+function LockWorkStation; external user32 name 'LockWorkStation';
+function UserHandleGrantAccess; external user32 name 'UserHandleGrantAccess';
+function GetRawInputData; external user32 name 'GetRawInputData';
+function GetRawInputDeviceInfoA; external user32 name 'GetRawInputDeviceInfoA';
+function GetRawInputDeviceInfoW; external user32 name 'GetRawInputDeviceInfoW';
+function GetRawInputDeviceInfo; external user32 name 'GetRawInputDeviceInfo' + AWSuffix;
+function GetRawInputBuffer; external user32 name 'GetRawInputBuffer';
+function RegisterRawInputDevices; external user32 name 'RegisterRawInputDevices';
+function GetRegisteredRawInputDevices; external user32 name 'GetRegisteredRawInputDevices';
+function GetRawInputDeviceList; external user32 name 'GetRawInputDeviceList';
+function DefRawInputProc; external user32 name 'DefRawInputProc';
+
+{$ENDIF DYNAMIC_LINK}
+
+end.
diff --git a/packages/extra/winunits/jwawinver.pas b/packages/extra/winunits/jwawinver.pas
index f4401aeda7..c7300997d2 100644
--- a/packages/extra/winunits/jwawinver.pas
+++ b/packages/extra/winunits/jwawinver.pas
@@ -1,611 +1,611 @@
-{******************************************************************************}
-{ }
-{ Windows Version API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: winver.h, released June 2000. The original Pascal }
-{ code is: WinVer.pas, released December 2000. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwawinver.pas,v 1.1 2005/04/04 07:56:11 marco Exp $
-
-unit JwaWinVer;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "WinVer.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaWinUser, JwaWinType;
-
-const
-
-// RT_VERSION = MAKEINTRESOURCE(16);
-
-// ----- Symbols -----
-
- VS_FILE_INFO = RT_VERSION;
- {$EXTERNALSYM VS_FILE_INFO}
- VS_VERSION_INFO = 1;
- {$EXTERNALSYM VS_VERSION_INFO}
- VS_USER_DEFINED = 100;
- {$EXTERNALSYM VS_USER_DEFINED}
-
-// ----- VS_VERSION.dwFileFlags -----
-
- VS_FFI_SIGNATURE = $FEEF04BD;
- {$EXTERNALSYM VS_FFI_SIGNATURE}
- VS_FFI_STRUCVERSION = $00010000;
- {$EXTERNALSYM VS_FFI_STRUCVERSION}
- VS_FFI_FILEFLAGSMASK = $0000003F;
- {$EXTERNALSYM VS_FFI_FILEFLAGSMASK}
-
-// ----- VS_VERSION.dwFileFlags -----
-
- VS_FF_DEBUG = $00000001;
- {$EXTERNALSYM VS_FF_DEBUG}
- VS_FF_PRERELEASE = $00000002;
- {$EXTERNALSYM VS_FF_PRERELEASE}
- VS_FF_PATCHED = $00000004;
- {$EXTERNALSYM VS_FF_PATCHED}
- VS_FF_PRIVATEBUILD = $00000008;
- {$EXTERNALSYM VS_FF_PRIVATEBUILD}
- VS_FF_INFOINFERRED = $00000010;
- {$EXTERNALSYM VS_FF_INFOINFERRED}
- VS_FF_SPECIALBUILD = $00000020;
- {$EXTERNALSYM VS_FF_SPECIALBUILD}
-
-// ----- VS_VERSION.dwFileOS -----
-
- VOS_UNKNOWN = $00000000;
- {$EXTERNALSYM VOS_UNKNOWN}
- VOS_DOS = $00010000;
- {$EXTERNALSYM VOS_DOS}
- VOS_OS216 = $00020000;
- {$EXTERNALSYM VOS_OS216}
- VOS_OS232 = $00030000;
- {$EXTERNALSYM VOS_OS232}
- VOS_NT = $00040000;
- {$EXTERNALSYM VOS_NT}
- VOS_WINCE = $00050000;
- {$EXTERNALSYM VOS_WINCE}
-
- VOS__BASE = $00000000;
- {$EXTERNALSYM VOS__BASE}
- VOS__WINDOWS16 = $00000001;
- {$EXTERNALSYM VOS__WINDOWS16}
- VOS__PM16 = $00000002;
- {$EXTERNALSYM VOS__PM16}
- VOS__PM32 = $00000003;
- {$EXTERNALSYM VOS__PM32}
- VOS__WINDOWS32 = $00000004;
- {$EXTERNALSYM VOS__WINDOWS32}
-
- VOS_DOS_WINDOWS16 = $00010001;
- {$EXTERNALSYM VOS_DOS_WINDOWS16}
- VOS_DOS_WINDOWS32 = $00010004;
- {$EXTERNALSYM VOS_DOS_WINDOWS32}
- VOS_OS216_PM16 = $00020002;
- {$EXTERNALSYM VOS_OS216_PM16}
- VOS_OS232_PM32 = $00030003;
- {$EXTERNALSYM VOS_OS232_PM32}
- VOS_NT_WINDOWS32 = $00040004;
- {$EXTERNALSYM VOS_NT_WINDOWS32}
-
-// ----- VS_VERSION.dwFileType -----
-
- VFT_UNKNOWN = $00000000;
- {$EXTERNALSYM VFT_UNKNOWN}
- VFT_APP = $00000001;
- {$EXTERNALSYM VFT_APP}
- VFT_DLL = $00000002;
- {$EXTERNALSYM VFT_DLL}
- VFT_DRV = $00000003;
- {$EXTERNALSYM VFT_DRV}
- VFT_FONT = $00000004;
- {$EXTERNALSYM VFT_FONT}
- VFT_VXD = $00000005;
- {$EXTERNALSYM VFT_VXD}
- VFT_STATIC_LIB = $00000007;
- {$EXTERNALSYM VFT_STATIC_LIB}
-
-// ----- VS_VERSION.dwFileSubtype for VFT_WINDOWS_DRV -----
-
- VFT2_UNKNOWN = $00000000;
- {$EXTERNALSYM VFT2_UNKNOWN}
- VFT2_DRV_PRINTER = $00000001;
- {$EXTERNALSYM VFT2_DRV_PRINTER}
- VFT2_DRV_KEYBOARD = $00000002;
- {$EXTERNALSYM VFT2_DRV_KEYBOARD}
- VFT2_DRV_LANGUAGE = $00000003;
- {$EXTERNALSYM VFT2_DRV_LANGUAGE}
- VFT2_DRV_DISPLAY = $00000004;
- {$EXTERNALSYM VFT2_DRV_DISPLAY}
- VFT2_DRV_MOUSE = $00000005;
- {$EXTERNALSYM VFT2_DRV_MOUSE}
- VFT2_DRV_NETWORK = $00000006;
- {$EXTERNALSYM VFT2_DRV_NETWORK}
- VFT2_DRV_SYSTEM = $00000007;
- {$EXTERNALSYM VFT2_DRV_SYSTEM}
- VFT2_DRV_INSTALLABLE = $00000008;
- {$EXTERNALSYM VFT2_DRV_INSTALLABLE}
- VFT2_DRV_SOUND = $00000009;
- {$EXTERNALSYM VFT2_DRV_SOUND}
- VFT2_DRV_COMM = $0000000A;
- {$EXTERNALSYM VFT2_DRV_COMM}
- VFT2_DRV_INPUTMETHOD = $0000000B;
- {$EXTERNALSYM VFT2_DRV_INPUTMETHOD}
- VFT2_DRV_VERSIONED_PRINTER = $0000000C;
- {$EXTERNALSYM VFT2_DRV_VERSIONED_PRINTER}
-
-// ----- VS_VERSION.dwFileSubtype for VFT_WINDOWS_FONT -----
-
- VFT2_FONT_RASTER = $00000001;
- {$EXTERNALSYM VFT2_FONT_RASTER}
- VFT2_FONT_VECTOR = $00000002;
- {$EXTERNALSYM VFT2_FONT_VECTOR}
- VFT2_FONT_TRUETYPE = $00000003;
- {$EXTERNALSYM VFT2_FONT_TRUETYPE}
-
-// ----- VerFindFile() flags -----
-
- VFFF_ISSHAREDFILE = $0001;
- {$EXTERNALSYM VFFF_ISSHAREDFILE}
-
- VFF_CURNEDEST = $0001;
- {$EXTERNALSYM VFF_CURNEDEST}
- VFF_FILEINUSE = $0002;
- {$EXTERNALSYM VFF_FILEINUSE}
- VFF_BUFFTOOSMALL = $0004;
- {$EXTERNALSYM VFF_BUFFTOOSMALL}
-
-// ----- VerInstallFile() flags -----
-
- VIFF_FORCEINSTALL = $0001;
- {$EXTERNALSYM VIFF_FORCEINSTALL}
- VIFF_DONTDELETEOLD = $0002;
- {$EXTERNALSYM VIFF_DONTDELETEOLD}
-
- VIF_TEMPFILE = $00000001;
- {$EXTERNALSYM VIF_TEMPFILE}
- VIF_MISMATCH = $00000002;
- {$EXTERNALSYM VIF_MISMATCH}
- VIF_SRCOLD = $00000004;
- {$EXTERNALSYM VIF_SRCOLD}
-
- VIF_DIFFLANG = $00000008;
- {$EXTERNALSYM VIF_DIFFLANG}
- VIF_DIFFCODEPG = $00000010;
- {$EXTERNALSYM VIF_DIFFCODEPG}
- VIF_DIFFTYPE = $00000020;
- {$EXTERNALSYM VIF_DIFFTYPE}
-
- VIF_WRITEPROT = $00000040;
- {$EXTERNALSYM VIF_WRITEPROT}
- VIF_FILEINUSE = $00000080;
- {$EXTERNALSYM VIF_FILEINUSE}
- VIF_OUTOFSPACE = $00000100;
- {$EXTERNALSYM VIF_OUTOFSPACE}
- VIF_ACCESSVIOLATION = $00000200;
- {$EXTERNALSYM VIF_ACCESSVIOLATION}
- VIF_SHARINGVIOLATION = $00000400;
- {$EXTERNALSYM VIF_SHARINGVIOLATION}
- VIF_CANNOTCREATE = $00000800;
- {$EXTERNALSYM VIF_CANNOTCREATE}
- VIF_CANNOTDELETE = $00001000;
- {$EXTERNALSYM VIF_CANNOTDELETE}
- VIF_CANNOTRENAME = $00002000;
- {$EXTERNALSYM VIF_CANNOTRENAME}
- VIF_CANNOTDELETECUR = $00004000;
- {$EXTERNALSYM VIF_CANNOTDELETECUR}
- VIF_OUTOFMEMORY = $00008000;
- {$EXTERNALSYM VIF_OUTOFMEMORY}
-
- VIF_CANNOTREADSRC = $00010000;
- {$EXTERNALSYM VIF_CANNOTREADSRC}
- VIF_CANNOTREADDST = $00020000;
- {$EXTERNALSYM VIF_CANNOTREADDST}
-
- VIF_BUFFTOOSMALL = $00040000;
- {$EXTERNALSYM VIF_BUFFTOOSMALL}
- VIF_CANNOTLOADLZ32 = $00080000;
- {$EXTERNALSYM VIF_CANNOTLOADLZ32}
- VIF_CANNOTLOADCABINET = $00100000;
- {$EXTERNALSYM VIF_CANNOTLOADCABINET}
-
-// ----- Types and structures -----
-
-type
- PVSFixedFileInfo = ^VS_FIXEDFILEINFO;
- tagVS_FIXEDFILEINFO = record
- dwSignature: DWORD; // e.g. 0xfeef04bd
- dwStrucVersion: DWORD; // e.g. 0x00000042 = "0.42"
- dwFileVersionMS: DWORD; // e.g. 0x00030075 = "3.75"
- dwFileVersionLS: DWORD; // e.g. 0x00000031 = "0.31"
- dwProductVersionMS: DWORD; // e.g. 0x00030010 = "3.10"
- dwProductVersionLS: DWORD; // e.g. 0x00000031 = "0.31"
- dwFileFlagsMask: DWORD; // = 0x3F for version "0.42"
- dwFileFlags: DWORD; // e.g. VFF_DEBUG | VFF_PRERELEASE
- dwFileOS: DWORD; // e.g. VOS_DOS_WINDOWS16
- dwFileType: DWORD; // e.g. VFT_DRIVER
- dwFileSubtype: DWORD; // e.g. VFT2_DRV_KEYBOARD
- dwFileDateMS: DWORD; // e.g. 0
- dwFileDateLS: DWORD; // e.g. 0
- end;
- {$EXTERNALSYM tagVS_FIXEDFILEINFO}
- VS_FIXEDFILEINFO = tagVS_FIXEDFILEINFO;
- {$EXTERNALSYM VS_FIXEDFILEINFO}
- TVSFixedFileInfo = VS_FIXEDFILEINFO;
-
-// ----- Function prototypes -----
-
-function VerFindFileA(uFlags: DWORD; szFileName, szWinDir, szAppDir,
- szCurDir: LPSTR; var lpuCurDirLen: UINT; szDestDir: LPSTR;
- var lpuDestDirLen: UINT): DWORD; stdcall;
-{$EXTERNALSYM VerFindFileA}
-function VerFindFileW(uFlags: DWORD; szFileName, szWinDir, szAppDir,
- szCurDir: LPWSTR; var lpuCurDirLen: UINT; szDestDir: LPWSTR;
- var lpuDestDirLen: UINT): DWORD; stdcall;
-{$EXTERNALSYM VerFindFileW}
-function VerFindFile(uFlags: DWORD; szFileName, szWinDir, szAppDir,
- szCurDir: LPTSTR; var lpuCurDirLen: UINT; szDestDir: LPTSTR;
- var lpuDestDirLen: UINT): DWORD; stdcall;
-{$EXTERNALSYM VerFindFile}
-
-function VerInstallFileA(uFlags: DWORD; szSrcFileName, szDestFileName, szSrcDir,
- szDestDir, szCurDir, szTmpFile: LPSTR; var lpuTmpFileLen: UINT): DWORD; stdcall;
-{$EXTERNALSYM VerInstallFileA}
-function VerInstallFileW(uFlags: DWORD; szSrcFileName, szDestFileName, szSrcDir,
- szDestDir, szCurDir, szTmpFile: LPWSTR; var lpuTmpFileLen: UINT): DWORD; stdcall;
-{$EXTERNALSYM VerInstallFileW}
-function VerInstallFile(uFlags: DWORD; szSrcFileName, szDestFileName, szSrcDir,
- szDestDir, szCurDir, szTmpFile: LPTSTR; var lpuTmpFileLen: UINT): DWORD; stdcall;
-{$EXTERNALSYM VerInstallFile}
-
-// Returns size of version info in bytes
-
-function GetFileVersionInfoSizeA(lptstrFilename: LPCSTR; var lpdwHandle: DWORD): DWORD; stdcall;
-{$EXTERNALSYM GetFileVersionInfoSizeA}
-function GetFileVersionInfoSizeW(lptstrFilename: LPCWSTR; var lpdwHandle: DWORD): DWORD; stdcall;
-{$EXTERNALSYM GetFileVersionInfoSizeW}
-function GetFileVersionInfoSize(lptstrFilename: LPCTSTR; var lpdwHandle: DWORD): DWORD; stdcall;
-{$EXTERNALSYM GetFileVersionInfoSize}
-
-// Read version info into buffer
-
-function GetFileVersionInfoA(lptstrFilename: LPCSTR; dwHandle, dwLen: DWORD;
- lpData: LPVOID): BOOL; stdcall;
-{$EXTERNALSYM GetFileVersionInfoA}
-function GetFileVersionInfoW(lptstrFilename: LPCWSTR; dwHandle, dwLen: DWORD;
- lpData: LPVOID): BOOL; stdcall;
-{$EXTERNALSYM GetFileVersionInfoW}
-function GetFileVersionInfo(lptstrFilename: LPCTSTR; dwHandle, dwLen: DWORD;
- lpData: LPVOID): BOOL; stdcall;
-{$EXTERNALSYM GetFileVersionInfo}
-
-function VerLanguageNameA(wLang: DWORD; szLang: LPSTR; nSize: DWORD): DWORD; stdcall;
-{$EXTERNALSYM VerLanguageNameA}
-function VerLanguageNameW(wLang: DWORD; szLang: LPWSTR; nSize: DWORD): DWORD; stdcall;
-{$EXTERNALSYM VerLanguageNameW}
-function VerLanguageName(wLang: DWORD; szLang: LPTSTR; nSize: DWORD): DWORD; stdcall;
-{$EXTERNALSYM VerLanguageName}
-
-function VerQueryValueA(pBlock: LPVOID; lpSubBlock: LPSTR; var lplpBuffer: LPVOID;
- var puLen: UINT): BOOL; stdcall;
-{$EXTERNALSYM VerQueryValueA}
-function VerQueryValueW(pBlock: LPVOID; lpSubBlock: LPWSTR; var lplpBuffer: LPVOID;
- var puLen: UINT): BOOL; stdcall;
-{$EXTERNALSYM VerQueryValueW}
-function VerQueryValue(pBlock: LPVOID; lpSubBlock: LPTSTR; var lplpBuffer: LPVOID;
- var puLen: UINT): BOOL; stdcall;
-{$EXTERNALSYM VerQueryValue}
-
-implementation
-
-const
- Version = 'version.dll';
- {$IFDEF UNICODE}
- AWSuffix = 'W';
- {$ELSE}
- AWSuffix = 'A';
- {$ENDIF UNICODE}
-
-{$IFDEF DYNAMIC_LINK}
-
-var
- _VerFindFileA: Pointer;
-
-function VerFindFileA;
-begin
- GetProcedureAddress(_VerFindFileA, Version, 'VerFindFileA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_VerFindFileA]
- end;
-end;
-
-var
- _VerFindFileW: Pointer;
-
-function VerFindFileW;
-begin
- GetProcedureAddress(_VerFindFileW, Version, 'VerFindFileW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_VerFindFileW]
- end;
-end;
-
-var
- _VerFindFile: Pointer;
-
-function VerFindFile;
-begin
- GetProcedureAddress(_VerFindFile, Version, 'VerFindFile' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_VerFindFile]
- end;
-end;
-
-var
- _VerInstallFileA: Pointer;
-
-function VerInstallFileA;
-begin
- GetProcedureAddress(_VerInstallFileA, Version, 'VerInstallFileA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_VerInstallFileA]
- end;
-end;
-
-var
- _VerInstallFileW: Pointer;
-
-function VerInstallFileW;
-begin
- GetProcedureAddress(_VerInstallFileW, Version, 'VerInstallFileW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_VerInstallFileW]
- end;
-end;
-
-var
- _VerInstallFile: Pointer;
-
-function VerInstallFile;
-begin
- GetProcedureAddress(_VerInstallFile, Version, 'VerInstallFile' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_VerInstallFile]
- end;
-end;
-
-var
- _GetFileVersionInfoSizeA: Pointer;
-
-function GetFileVersionInfoSizeA;
-begin
- GetProcedureAddress(_GetFileVersionInfoSizeA, Version, 'GetFileVersionInfoSizeA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetFileVersionInfoSizeA]
- end;
-end;
-
-var
- _GetFileVersionInfoSizeW: Pointer;
-
-function GetFileVersionInfoSizeW;
-begin
- GetProcedureAddress(_GetFileVersionInfoSizeW, Version, 'GetFileVersionInfoSizeW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetFileVersionInfoSizeW]
- end;
-end;
-
-var
- _GetFileVersionInfoSize: Pointer;
-
-function GetFileVersionInfoSize;
-begin
- GetProcedureAddress(_GetFileVersionInfoSize, Version, 'GetFileVersionInfoSize' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetFileVersionInfoSize]
- end;
-end;
-
-var
- _GetFileVersionInfoA: Pointer;
-
-function GetFileVersionInfoA;
-begin
- GetProcedureAddress(_GetFileVersionInfoA, Version, 'GetFileVersionInfoA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetFileVersionInfoA]
- end;
-end;
-
-var
- _GetFileVersionInfoW: Pointer;
-
-function GetFileVersionInfoW;
-begin
- GetProcedureAddress(_GetFileVersionInfoW, Version, 'GetFileVersionInfoW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetFileVersionInfoW]
- end;
-end;
-
-var
- _GetFileVersionInfo: Pointer;
-
-function GetFileVersionInfo;
-begin
- GetProcedureAddress(_GetFileVersionInfo, Version, 'GetFileVersionInfo' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetFileVersionInfo]
- end;
-end;
-
-var
- _VerLanguageNameA: Pointer;
-
-function VerLanguageNameA;
-begin
- GetProcedureAddress(_VerLanguageNameA, Version, 'VerLanguageNameA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_VerLanguageNameA]
- end;
-end;
-
-var
- _VerLanguageNameW: Pointer;
-
-function VerLanguageNameW;
-begin
- GetProcedureAddress(_VerLanguageNameW, Version, 'VerLanguageNameW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_VerLanguageNameW]
- end;
-end;
-
-var
- _VerLanguageName: Pointer;
-
-function VerLanguageName;
-begin
- GetProcedureAddress(_VerLanguageName, Version, 'VerLanguageName' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_VerLanguageName]
- end;
-end;
-
-var
- _VerQueryValueA: Pointer;
-
-function VerQueryValueA;
-begin
- GetProcedureAddress(_VerQueryValueA, Version, 'VerQueryValueA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_VerQueryValueA]
- end;
-end;
-
-var
- _VerQueryValueW: Pointer;
-
-function VerQueryValueW;
-begin
- GetProcedureAddress(_VerQueryValueW, Version, 'VerQueryValueW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_VerQueryValueW]
- end;
-end;
-
-var
- _VerQueryValue: Pointer;
-
-function VerQueryValue;
-begin
- GetProcedureAddress(_VerQueryValue, Version, 'VerQueryValue' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_VerQueryValue]
- end;
-end;
-
-{$ELSE}
-
-function VerFindFileA; external Version name 'VerFindFileA';
-function VerFindFileW; external Version name 'VerFindFileW';
-function VerFindFile; external Version name 'VerFindFile' + AWSuffix;
-function VerInstallFileA; external Version name 'VerInstallFileA';
-function VerInstallFileW; external Version name 'VerInstallFileW';
-function VerInstallFile; external Version name 'VerInstallFile' + AWSuffix;
-function GetFileVersionInfoSizeA; external Version name 'GetFileVersionInfoSizeA';
-function GetFileVersionInfoSizeW; external Version name 'GetFileVersionInfoSizeW';
-function GetFileVersionInfoSize; external Version name 'GetFileVersionInfoSize' + AWSuffix;
-function GetFileVersionInfoA; external Version name 'GetFileVersionInfoA';
-function GetFileVersionInfoW; external Version name 'GetFileVersionInfoW';
-function GetFileVersionInfo; external Version name 'GetFileVersionInfo' + AWSuffix;
-function VerLanguageNameA; external Version name 'VerLanguageNameA';
-function VerLanguageNameW; external Version name 'VerLanguageNameW';
-function VerLanguageName; external Version name 'VerLanguageName' + AWSuffix;
-function VerQueryValueA; external Version name 'VerQueryValueA';
-function VerQueryValueW; external Version name 'VerQueryValueW';
-function VerQueryValue; external Version name 'VerQueryValue' + AWSuffix;
-
-{$ENDIF DYNAMIC_LINK}
-
-end.
+{******************************************************************************}
+{ }
+{ Windows Version API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: winver.h, released June 2000. The original Pascal }
+{ code is: WinVer.pas, released December 2000. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwawinver.pas,v 1.1 2005/04/04 07:56:11 marco Exp $
+
+unit JwaWinVer;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "WinVer.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaWinUser, JwaWinType;
+
+const
+
+// RT_VERSION = MAKEINTRESOURCE(16);
+
+// ----- Symbols -----
+
+ VS_FILE_INFO = RT_VERSION;
+ {$EXTERNALSYM VS_FILE_INFO}
+ VS_VERSION_INFO = 1;
+ {$EXTERNALSYM VS_VERSION_INFO}
+ VS_USER_DEFINED = 100;
+ {$EXTERNALSYM VS_USER_DEFINED}
+
+// ----- VS_VERSION.dwFileFlags -----
+
+ VS_FFI_SIGNATURE = $FEEF04BD;
+ {$EXTERNALSYM VS_FFI_SIGNATURE}
+ VS_FFI_STRUCVERSION = $00010000;
+ {$EXTERNALSYM VS_FFI_STRUCVERSION}
+ VS_FFI_FILEFLAGSMASK = $0000003F;
+ {$EXTERNALSYM VS_FFI_FILEFLAGSMASK}
+
+// ----- VS_VERSION.dwFileFlags -----
+
+ VS_FF_DEBUG = $00000001;
+ {$EXTERNALSYM VS_FF_DEBUG}
+ VS_FF_PRERELEASE = $00000002;
+ {$EXTERNALSYM VS_FF_PRERELEASE}
+ VS_FF_PATCHED = $00000004;
+ {$EXTERNALSYM VS_FF_PATCHED}
+ VS_FF_PRIVATEBUILD = $00000008;
+ {$EXTERNALSYM VS_FF_PRIVATEBUILD}
+ VS_FF_INFOINFERRED = $00000010;
+ {$EXTERNALSYM VS_FF_INFOINFERRED}
+ VS_FF_SPECIALBUILD = $00000020;
+ {$EXTERNALSYM VS_FF_SPECIALBUILD}
+
+// ----- VS_VERSION.dwFileOS -----
+
+ VOS_UNKNOWN = $00000000;
+ {$EXTERNALSYM VOS_UNKNOWN}
+ VOS_DOS = $00010000;
+ {$EXTERNALSYM VOS_DOS}
+ VOS_OS216 = $00020000;
+ {$EXTERNALSYM VOS_OS216}
+ VOS_OS232 = $00030000;
+ {$EXTERNALSYM VOS_OS232}
+ VOS_NT = $00040000;
+ {$EXTERNALSYM VOS_NT}
+ VOS_WINCE = $00050000;
+ {$EXTERNALSYM VOS_WINCE}
+
+ VOS__BASE = $00000000;
+ {$EXTERNALSYM VOS__BASE}
+ VOS__WINDOWS16 = $00000001;
+ {$EXTERNALSYM VOS__WINDOWS16}
+ VOS__PM16 = $00000002;
+ {$EXTERNALSYM VOS__PM16}
+ VOS__PM32 = $00000003;
+ {$EXTERNALSYM VOS__PM32}
+ VOS__WINDOWS32 = $00000004;
+ {$EXTERNALSYM VOS__WINDOWS32}
+
+ VOS_DOS_WINDOWS16 = $00010001;
+ {$EXTERNALSYM VOS_DOS_WINDOWS16}
+ VOS_DOS_WINDOWS32 = $00010004;
+ {$EXTERNALSYM VOS_DOS_WINDOWS32}
+ VOS_OS216_PM16 = $00020002;
+ {$EXTERNALSYM VOS_OS216_PM16}
+ VOS_OS232_PM32 = $00030003;
+ {$EXTERNALSYM VOS_OS232_PM32}
+ VOS_NT_WINDOWS32 = $00040004;
+ {$EXTERNALSYM VOS_NT_WINDOWS32}
+
+// ----- VS_VERSION.dwFileType -----
+
+ VFT_UNKNOWN = $00000000;
+ {$EXTERNALSYM VFT_UNKNOWN}
+ VFT_APP = $00000001;
+ {$EXTERNALSYM VFT_APP}
+ VFT_DLL = $00000002;
+ {$EXTERNALSYM VFT_DLL}
+ VFT_DRV = $00000003;
+ {$EXTERNALSYM VFT_DRV}
+ VFT_FONT = $00000004;
+ {$EXTERNALSYM VFT_FONT}
+ VFT_VXD = $00000005;
+ {$EXTERNALSYM VFT_VXD}
+ VFT_STATIC_LIB = $00000007;
+ {$EXTERNALSYM VFT_STATIC_LIB}
+
+// ----- VS_VERSION.dwFileSubtype for VFT_WINDOWS_DRV -----
+
+ VFT2_UNKNOWN = $00000000;
+ {$EXTERNALSYM VFT2_UNKNOWN}
+ VFT2_DRV_PRINTER = $00000001;
+ {$EXTERNALSYM VFT2_DRV_PRINTER}
+ VFT2_DRV_KEYBOARD = $00000002;
+ {$EXTERNALSYM VFT2_DRV_KEYBOARD}
+ VFT2_DRV_LANGUAGE = $00000003;
+ {$EXTERNALSYM VFT2_DRV_LANGUAGE}
+ VFT2_DRV_DISPLAY = $00000004;
+ {$EXTERNALSYM VFT2_DRV_DISPLAY}
+ VFT2_DRV_MOUSE = $00000005;
+ {$EXTERNALSYM VFT2_DRV_MOUSE}
+ VFT2_DRV_NETWORK = $00000006;
+ {$EXTERNALSYM VFT2_DRV_NETWORK}
+ VFT2_DRV_SYSTEM = $00000007;
+ {$EXTERNALSYM VFT2_DRV_SYSTEM}
+ VFT2_DRV_INSTALLABLE = $00000008;
+ {$EXTERNALSYM VFT2_DRV_INSTALLABLE}
+ VFT2_DRV_SOUND = $00000009;
+ {$EXTERNALSYM VFT2_DRV_SOUND}
+ VFT2_DRV_COMM = $0000000A;
+ {$EXTERNALSYM VFT2_DRV_COMM}
+ VFT2_DRV_INPUTMETHOD = $0000000B;
+ {$EXTERNALSYM VFT2_DRV_INPUTMETHOD}
+ VFT2_DRV_VERSIONED_PRINTER = $0000000C;
+ {$EXTERNALSYM VFT2_DRV_VERSIONED_PRINTER}
+
+// ----- VS_VERSION.dwFileSubtype for VFT_WINDOWS_FONT -----
+
+ VFT2_FONT_RASTER = $00000001;
+ {$EXTERNALSYM VFT2_FONT_RASTER}
+ VFT2_FONT_VECTOR = $00000002;
+ {$EXTERNALSYM VFT2_FONT_VECTOR}
+ VFT2_FONT_TRUETYPE = $00000003;
+ {$EXTERNALSYM VFT2_FONT_TRUETYPE}
+
+// ----- VerFindFile() flags -----
+
+ VFFF_ISSHAREDFILE = $0001;
+ {$EXTERNALSYM VFFF_ISSHAREDFILE}
+
+ VFF_CURNEDEST = $0001;
+ {$EXTERNALSYM VFF_CURNEDEST}
+ VFF_FILEINUSE = $0002;
+ {$EXTERNALSYM VFF_FILEINUSE}
+ VFF_BUFFTOOSMALL = $0004;
+ {$EXTERNALSYM VFF_BUFFTOOSMALL}
+
+// ----- VerInstallFile() flags -----
+
+ VIFF_FORCEINSTALL = $0001;
+ {$EXTERNALSYM VIFF_FORCEINSTALL}
+ VIFF_DONTDELETEOLD = $0002;
+ {$EXTERNALSYM VIFF_DONTDELETEOLD}
+
+ VIF_TEMPFILE = $00000001;
+ {$EXTERNALSYM VIF_TEMPFILE}
+ VIF_MISMATCH = $00000002;
+ {$EXTERNALSYM VIF_MISMATCH}
+ VIF_SRCOLD = $00000004;
+ {$EXTERNALSYM VIF_SRCOLD}
+
+ VIF_DIFFLANG = $00000008;
+ {$EXTERNALSYM VIF_DIFFLANG}
+ VIF_DIFFCODEPG = $00000010;
+ {$EXTERNALSYM VIF_DIFFCODEPG}
+ VIF_DIFFTYPE = $00000020;
+ {$EXTERNALSYM VIF_DIFFTYPE}
+
+ VIF_WRITEPROT = $00000040;
+ {$EXTERNALSYM VIF_WRITEPROT}
+ VIF_FILEINUSE = $00000080;
+ {$EXTERNALSYM VIF_FILEINUSE}
+ VIF_OUTOFSPACE = $00000100;
+ {$EXTERNALSYM VIF_OUTOFSPACE}
+ VIF_ACCESSVIOLATION = $00000200;
+ {$EXTERNALSYM VIF_ACCESSVIOLATION}
+ VIF_SHARINGVIOLATION = $00000400;
+ {$EXTERNALSYM VIF_SHARINGVIOLATION}
+ VIF_CANNOTCREATE = $00000800;
+ {$EXTERNALSYM VIF_CANNOTCREATE}
+ VIF_CANNOTDELETE = $00001000;
+ {$EXTERNALSYM VIF_CANNOTDELETE}
+ VIF_CANNOTRENAME = $00002000;
+ {$EXTERNALSYM VIF_CANNOTRENAME}
+ VIF_CANNOTDELETECUR = $00004000;
+ {$EXTERNALSYM VIF_CANNOTDELETECUR}
+ VIF_OUTOFMEMORY = $00008000;
+ {$EXTERNALSYM VIF_OUTOFMEMORY}
+
+ VIF_CANNOTREADSRC = $00010000;
+ {$EXTERNALSYM VIF_CANNOTREADSRC}
+ VIF_CANNOTREADDST = $00020000;
+ {$EXTERNALSYM VIF_CANNOTREADDST}
+
+ VIF_BUFFTOOSMALL = $00040000;
+ {$EXTERNALSYM VIF_BUFFTOOSMALL}
+ VIF_CANNOTLOADLZ32 = $00080000;
+ {$EXTERNALSYM VIF_CANNOTLOADLZ32}
+ VIF_CANNOTLOADCABINET = $00100000;
+ {$EXTERNALSYM VIF_CANNOTLOADCABINET}
+
+// ----- Types and structures -----
+
+type
+ PVSFixedFileInfo = ^VS_FIXEDFILEINFO;
+ tagVS_FIXEDFILEINFO = record
+ dwSignature: DWORD; // e.g. 0xfeef04bd
+ dwStrucVersion: DWORD; // e.g. 0x00000042 = "0.42"
+ dwFileVersionMS: DWORD; // e.g. 0x00030075 = "3.75"
+ dwFileVersionLS: DWORD; // e.g. 0x00000031 = "0.31"
+ dwProductVersionMS: DWORD; // e.g. 0x00030010 = "3.10"
+ dwProductVersionLS: DWORD; // e.g. 0x00000031 = "0.31"
+ dwFileFlagsMask: DWORD; // = 0x3F for version "0.42"
+ dwFileFlags: DWORD; // e.g. VFF_DEBUG | VFF_PRERELEASE
+ dwFileOS: DWORD; // e.g. VOS_DOS_WINDOWS16
+ dwFileType: DWORD; // e.g. VFT_DRIVER
+ dwFileSubtype: DWORD; // e.g. VFT2_DRV_KEYBOARD
+ dwFileDateMS: DWORD; // e.g. 0
+ dwFileDateLS: DWORD; // e.g. 0
+ end;
+ {$EXTERNALSYM tagVS_FIXEDFILEINFO}
+ VS_FIXEDFILEINFO = tagVS_FIXEDFILEINFO;
+ {$EXTERNALSYM VS_FIXEDFILEINFO}
+ TVSFixedFileInfo = VS_FIXEDFILEINFO;
+
+// ----- Function prototypes -----
+
+function VerFindFileA(uFlags: DWORD; szFileName, szWinDir, szAppDir,
+ szCurDir: LPSTR; var lpuCurDirLen: UINT; szDestDir: LPSTR;
+ var lpuDestDirLen: UINT): DWORD; stdcall;
+{$EXTERNALSYM VerFindFileA}
+function VerFindFileW(uFlags: DWORD; szFileName, szWinDir, szAppDir,
+ szCurDir: LPWSTR; var lpuCurDirLen: UINT; szDestDir: LPWSTR;
+ var lpuDestDirLen: UINT): DWORD; stdcall;
+{$EXTERNALSYM VerFindFileW}
+function VerFindFile(uFlags: DWORD; szFileName, szWinDir, szAppDir,
+ szCurDir: LPTSTR; var lpuCurDirLen: UINT; szDestDir: LPTSTR;
+ var lpuDestDirLen: UINT): DWORD; stdcall;
+{$EXTERNALSYM VerFindFile}
+
+function VerInstallFileA(uFlags: DWORD; szSrcFileName, szDestFileName, szSrcDir,
+ szDestDir, szCurDir, szTmpFile: LPSTR; var lpuTmpFileLen: UINT): DWORD; stdcall;
+{$EXTERNALSYM VerInstallFileA}
+function VerInstallFileW(uFlags: DWORD; szSrcFileName, szDestFileName, szSrcDir,
+ szDestDir, szCurDir, szTmpFile: LPWSTR; var lpuTmpFileLen: UINT): DWORD; stdcall;
+{$EXTERNALSYM VerInstallFileW}
+function VerInstallFile(uFlags: DWORD; szSrcFileName, szDestFileName, szSrcDir,
+ szDestDir, szCurDir, szTmpFile: LPTSTR; var lpuTmpFileLen: UINT): DWORD; stdcall;
+{$EXTERNALSYM VerInstallFile}
+
+// Returns size of version info in bytes
+
+function GetFileVersionInfoSizeA(lptstrFilename: LPCSTR; var lpdwHandle: DWORD): DWORD; stdcall;
+{$EXTERNALSYM GetFileVersionInfoSizeA}
+function GetFileVersionInfoSizeW(lptstrFilename: LPCWSTR; var lpdwHandle: DWORD): DWORD; stdcall;
+{$EXTERNALSYM GetFileVersionInfoSizeW}
+function GetFileVersionInfoSize(lptstrFilename: LPCTSTR; var lpdwHandle: DWORD): DWORD; stdcall;
+{$EXTERNALSYM GetFileVersionInfoSize}
+
+// Read version info into buffer
+
+function GetFileVersionInfoA(lptstrFilename: LPCSTR; dwHandle, dwLen: DWORD;
+ lpData: LPVOID): BOOL; stdcall;
+{$EXTERNALSYM GetFileVersionInfoA}
+function GetFileVersionInfoW(lptstrFilename: LPCWSTR; dwHandle, dwLen: DWORD;
+ lpData: LPVOID): BOOL; stdcall;
+{$EXTERNALSYM GetFileVersionInfoW}
+function GetFileVersionInfo(lptstrFilename: LPCTSTR; dwHandle, dwLen: DWORD;
+ lpData: LPVOID): BOOL; stdcall;
+{$EXTERNALSYM GetFileVersionInfo}
+
+function VerLanguageNameA(wLang: DWORD; szLang: LPSTR; nSize: DWORD): DWORD; stdcall;
+{$EXTERNALSYM VerLanguageNameA}
+function VerLanguageNameW(wLang: DWORD; szLang: LPWSTR; nSize: DWORD): DWORD; stdcall;
+{$EXTERNALSYM VerLanguageNameW}
+function VerLanguageName(wLang: DWORD; szLang: LPTSTR; nSize: DWORD): DWORD; stdcall;
+{$EXTERNALSYM VerLanguageName}
+
+function VerQueryValueA(pBlock: LPVOID; lpSubBlock: LPSTR; var lplpBuffer: LPVOID;
+ var puLen: UINT): BOOL; stdcall;
+{$EXTERNALSYM VerQueryValueA}
+function VerQueryValueW(pBlock: LPVOID; lpSubBlock: LPWSTR; var lplpBuffer: LPVOID;
+ var puLen: UINT): BOOL; stdcall;
+{$EXTERNALSYM VerQueryValueW}
+function VerQueryValue(pBlock: LPVOID; lpSubBlock: LPTSTR; var lplpBuffer: LPVOID;
+ var puLen: UINT): BOOL; stdcall;
+{$EXTERNALSYM VerQueryValue}
+
+implementation
+
+const
+ Version = 'version.dll';
+ {$IFDEF UNICODE}
+ AWSuffix = 'W';
+ {$ELSE}
+ AWSuffix = 'A';
+ {$ENDIF UNICODE}
+
+{$IFDEF DYNAMIC_LINK}
+
+var
+ _VerFindFileA: Pointer;
+
+function VerFindFileA;
+begin
+ GetProcedureAddress(_VerFindFileA, Version, 'VerFindFileA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_VerFindFileA]
+ end;
+end;
+
+var
+ _VerFindFileW: Pointer;
+
+function VerFindFileW;
+begin
+ GetProcedureAddress(_VerFindFileW, Version, 'VerFindFileW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_VerFindFileW]
+ end;
+end;
+
+var
+ _VerFindFile: Pointer;
+
+function VerFindFile;
+begin
+ GetProcedureAddress(_VerFindFile, Version, 'VerFindFile' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_VerFindFile]
+ end;
+end;
+
+var
+ _VerInstallFileA: Pointer;
+
+function VerInstallFileA;
+begin
+ GetProcedureAddress(_VerInstallFileA, Version, 'VerInstallFileA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_VerInstallFileA]
+ end;
+end;
+
+var
+ _VerInstallFileW: Pointer;
+
+function VerInstallFileW;
+begin
+ GetProcedureAddress(_VerInstallFileW, Version, 'VerInstallFileW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_VerInstallFileW]
+ end;
+end;
+
+var
+ _VerInstallFile: Pointer;
+
+function VerInstallFile;
+begin
+ GetProcedureAddress(_VerInstallFile, Version, 'VerInstallFile' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_VerInstallFile]
+ end;
+end;
+
+var
+ _GetFileVersionInfoSizeA: Pointer;
+
+function GetFileVersionInfoSizeA;
+begin
+ GetProcedureAddress(_GetFileVersionInfoSizeA, Version, 'GetFileVersionInfoSizeA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetFileVersionInfoSizeA]
+ end;
+end;
+
+var
+ _GetFileVersionInfoSizeW: Pointer;
+
+function GetFileVersionInfoSizeW;
+begin
+ GetProcedureAddress(_GetFileVersionInfoSizeW, Version, 'GetFileVersionInfoSizeW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetFileVersionInfoSizeW]
+ end;
+end;
+
+var
+ _GetFileVersionInfoSize: Pointer;
+
+function GetFileVersionInfoSize;
+begin
+ GetProcedureAddress(_GetFileVersionInfoSize, Version, 'GetFileVersionInfoSize' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetFileVersionInfoSize]
+ end;
+end;
+
+var
+ _GetFileVersionInfoA: Pointer;
+
+function GetFileVersionInfoA;
+begin
+ GetProcedureAddress(_GetFileVersionInfoA, Version, 'GetFileVersionInfoA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetFileVersionInfoA]
+ end;
+end;
+
+var
+ _GetFileVersionInfoW: Pointer;
+
+function GetFileVersionInfoW;
+begin
+ GetProcedureAddress(_GetFileVersionInfoW, Version, 'GetFileVersionInfoW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetFileVersionInfoW]
+ end;
+end;
+
+var
+ _GetFileVersionInfo: Pointer;
+
+function GetFileVersionInfo;
+begin
+ GetProcedureAddress(_GetFileVersionInfo, Version, 'GetFileVersionInfo' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetFileVersionInfo]
+ end;
+end;
+
+var
+ _VerLanguageNameA: Pointer;
+
+function VerLanguageNameA;
+begin
+ GetProcedureAddress(_VerLanguageNameA, Version, 'VerLanguageNameA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_VerLanguageNameA]
+ end;
+end;
+
+var
+ _VerLanguageNameW: Pointer;
+
+function VerLanguageNameW;
+begin
+ GetProcedureAddress(_VerLanguageNameW, Version, 'VerLanguageNameW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_VerLanguageNameW]
+ end;
+end;
+
+var
+ _VerLanguageName: Pointer;
+
+function VerLanguageName;
+begin
+ GetProcedureAddress(_VerLanguageName, Version, 'VerLanguageName' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_VerLanguageName]
+ end;
+end;
+
+var
+ _VerQueryValueA: Pointer;
+
+function VerQueryValueA;
+begin
+ GetProcedureAddress(_VerQueryValueA, Version, 'VerQueryValueA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_VerQueryValueA]
+ end;
+end;
+
+var
+ _VerQueryValueW: Pointer;
+
+function VerQueryValueW;
+begin
+ GetProcedureAddress(_VerQueryValueW, Version, 'VerQueryValueW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_VerQueryValueW]
+ end;
+end;
+
+var
+ _VerQueryValue: Pointer;
+
+function VerQueryValue;
+begin
+ GetProcedureAddress(_VerQueryValue, Version, 'VerQueryValue' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_VerQueryValue]
+ end;
+end;
+
+{$ELSE}
+
+function VerFindFileA; external Version name 'VerFindFileA';
+function VerFindFileW; external Version name 'VerFindFileW';
+function VerFindFile; external Version name 'VerFindFile' + AWSuffix;
+function VerInstallFileA; external Version name 'VerInstallFileA';
+function VerInstallFileW; external Version name 'VerInstallFileW';
+function VerInstallFile; external Version name 'VerInstallFile' + AWSuffix;
+function GetFileVersionInfoSizeA; external Version name 'GetFileVersionInfoSizeA';
+function GetFileVersionInfoSizeW; external Version name 'GetFileVersionInfoSizeW';
+function GetFileVersionInfoSize; external Version name 'GetFileVersionInfoSize' + AWSuffix;
+function GetFileVersionInfoA; external Version name 'GetFileVersionInfoA';
+function GetFileVersionInfoW; external Version name 'GetFileVersionInfoW';
+function GetFileVersionInfo; external Version name 'GetFileVersionInfo' + AWSuffix;
+function VerLanguageNameA; external Version name 'VerLanguageNameA';
+function VerLanguageNameW; external Version name 'VerLanguageNameW';
+function VerLanguageName; external Version name 'VerLanguageName' + AWSuffix;
+function VerQueryValueA; external Version name 'VerQueryValueA';
+function VerQueryValueW; external Version name 'VerQueryValueW';
+function VerQueryValue; external Version name 'VerQueryValue' + AWSuffix;
+
+{$ENDIF DYNAMIC_LINK}
+
+end.
diff --git a/packages/extra/winunits/jwawinwlx.pas b/packages/extra/winunits/jwawinwlx.pas
index cd684e7465..611d18f8c7 100644
--- a/packages/extra/winunits/jwawinwlx.pas
+++ b/packages/extra/winunits/jwawinwlx.pas
@@ -1,1398 +1,1398 @@
-{******************************************************************************}
-{ }
-{ WinLogon API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: winwlx.h, released June 2000. The original Pascal }
-{ code is: WinWlx.pas, released December 2000. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwawinwlx.pas,v 1.1 2005/04/04 07:56:11 marco Exp $
-
-unit JwaWinWlx;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "WinWlx.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaWinType, JwaWinUser, JwaWinNT;
-
-// WLX == WinLogon eXtension
-//
-// This file contains definitions, data types, and routine prototypes
-// necessary to produce a replacement Graphical Identification aNd
-// Authentication (GINA) DLL for Winlogon.
-
-/////////////////////////////////////////////////////////////////////////
-/////////////////////////////////////////////////////////////////////////
-//
-// Revisions of Winlogon API available for use by GINAs
-// Version is two parts: Major revision and minor revision.
-// Major revision is the upper 16-bits, minor is the lower
-// 16-bits.
-//
-
-const
- WLX_VERSION_1_0 = $00010000;
- {$EXTERNALSYM WLX_VERSION_1_0}
- WLX_VERSION_1_1 = $00010001;
- {$EXTERNALSYM WLX_VERSION_1_1}
- WLX_VERSION_1_2 = $00010002;
- {$EXTERNALSYM WLX_VERSION_1_2}
- WLX_VERSION_1_3 = $00010003;
- {$EXTERNALSYM WLX_VERSION_1_3}
- WLX_VERSION_1_4 = $00010004;
- {$EXTERNALSYM WLX_VERSION_1_4}
- WLX_CURRENT_VERSION = WLX_VERSION_1_4;
- {$EXTERNALSYM WLX_CURRENT_VERSION}
-
-/////////////////////////////////////////////////////////////////////////
-/////////////////////////////////////////////////////////////////////////
-//
-// Secure attention sequence types
-// These values are passed to routines that have a dwSasType
-// parameter.
-//
-// ALL VALUES FROM 0 TO 127 ARE RESERVED FOR MICROSOFT DEFINITION.
-// VALUES ABOVE 127 ARE RESERVED FOR CUSTOMER DEFINITION.
-//
-// CTRL_ALT_DEL - used to indicate that the standard ctrl-alt-del
-// secure attention sequence has been entered.
-//
-// SCRNSVR_TIMEOUT - used to indicate that keyboard/mouse inactivity
-// has lead to a screensaver activation. It is up to the GINA
-// DLL whether this constitutes a workstation locking event.
-//
-// SCRNSVR_ACTIVITY - used to indicate that keyboard or mouse
-// activity occured while a secure screensaver was active.
-//
-// SC_INSERT - used to indicate that a smart card has been inserted
-// to a compatible device
-//
-// SC_REMOVE - used to indicate that a smart card has been removed
-// from a compatible device
-//
-
- WLX_SAS_TYPE_TIMEOUT = 0;
- {$EXTERNALSYM WLX_SAS_TYPE_TIMEOUT}
- WLX_SAS_TYPE_CTRL_ALT_DEL = 1;
- {$EXTERNALSYM WLX_SAS_TYPE_CTRL_ALT_DEL}
- WLX_SAS_TYPE_SCRNSVR_TIMEOUT = 2;
- {$EXTERNALSYM WLX_SAS_TYPE_SCRNSVR_TIMEOUT}
- WLX_SAS_TYPE_SCRNSVR_ACTIVITY = 3;
- {$EXTERNALSYM WLX_SAS_TYPE_SCRNSVR_ACTIVITY}
- WLX_SAS_TYPE_USER_LOGOFF = 4;
- {$EXTERNALSYM WLX_SAS_TYPE_USER_LOGOFF}
- WLX_SAS_TYPE_SC_INSERT = 5;
- {$EXTERNALSYM WLX_SAS_TYPE_SC_INSERT}
- WLX_SAS_TYPE_SC_REMOVE = 6;
- {$EXTERNALSYM WLX_SAS_TYPE_SC_REMOVE}
- WLX_SAS_TYPE_AUTHENTICATED = 7;
- {$EXTERNALSYM WLX_SAS_TYPE_AUTHENTICATED}
- WLX_SAS_TYPE_SC_FIRST_READER_ARRIVED = 8;
- {$EXTERNALSYM WLX_SAS_TYPE_SC_FIRST_READER_ARRIVED}
- WLX_SAS_TYPE_SC_LAST_READER_REMOVED = 9;
- {$EXTERNALSYM WLX_SAS_TYPE_SC_LAST_READER_REMOVED}
- WLX_SAS_TYPE_SWITCHUSER = 10;
- {$EXTERNALSYM WLX_SAS_TYPE_SWITCHUSER}
- WLX_SAS_TYPE_MAX_MSFT_VALUE = 127;
- {$EXTERNALSYM WLX_SAS_TYPE_MAX_MSFT_VALUE}
-
-//
-// This structure is available through WlxGetOption, and is
-// passed as the lParam for any S/C SAS notices sent to windows
-//
-
-type
- PWLX_SC_NOTIFICATION_INFO = ^WLX_SC_NOTIFICATION_INFO;
- {$EXTERNALSYM PWLX_SC_NOTIFICATION_INFO}
- _WLX_SC_NOTIFICATION_INFO = record
- pszCard: PWSTR;
- pszReader: PWSTR;
- pszContainer: PWSTR;
- pszCryptoProvider: PWSTR;
- end;
- {$EXTERNALSYM _WLX_SC_NOTIFICATION_INFO}
- WLX_SC_NOTIFICATION_INFO = _WLX_SC_NOTIFICATION_INFO;
- {$EXTERNALSYM WLX_SC_NOTIFICATION_INFO}
- TWlxScNotificationInfo = WLX_SC_NOTIFICATION_INFO;
- PWlxScNotificationInfo = PWLX_SC_NOTIFICATION_INFO;
-
-/////////////////////////////////////////////////////////////////////////
-/////////////////////////////////////////////////////////////////////////
-//
-// Upon successful logon, the GINA DLL may specify any of the following
-// options to Winlogon (via the dwOptions parameter of the WlxLoggedOutSas()
-// api). When set, these options specify:
-//
-// NO_PROFILE - Winlogon must NOT load a profile for the logged
-// on user. Either the GINA DLL will take care of
-// this activity, or the user does not need a profile.
-//
-
-const
- WLX_LOGON_OPT_NO_PROFILE = $00000001;
- {$EXTERNALSYM WLX_LOGON_OPT_NO_PROFILE}
-
-/////////////////////////////////////////////////////////////////////////
-/////////////////////////////////////////////////////////////////////////
-//
-// GINA DLLs are expected to return account information to Winlogon
-// following a successful logon. This information allows Winlogon
-// to support profile loading and supplemental network providers.
-//
-// To allow different sets of profile information to be returned
-// by GINAs over time, the first DWORD of each profile structure
-// is expected to contain a type-identifier. The following constants
-// are the defined profile type identifiers.
-//
-
-//
-// Standard profile is V2_0
-//
-
- WLX_PROFILE_TYPE_V1_0 = 1;
- {$EXTERNALSYM WLX_PROFILE_TYPE_V1_0}
- WLX_PROFILE_TYPE_V2_0 = 2;
- {$EXTERNALSYM WLX_PROFILE_TYPE_V2_0}
-
-/////////////////////////////////////////////////////////////////////////
-/////////////////////////////////////////////////////////////////////////
-//
-// WlxLoggedOnSas() and WlxWkstaLockedSas() return an action
-// value to Winlogon directing Winlogon to either remain unchanged
-// or to perform some action (such as force-log the user off).
-// These are the values that may be returned. Note, however, that
-// not all of the values may be returned by both of these api. See
-// the description of each api to see which values are expected from
-// each.
-//
-// LOGON - User has logged on
-// NONE - Don't change the state of the window station.
-// LOCK_WKSTA - Lock the workstation, wait for next SAS.
-// LOGOFF - Log the user off of the workstation.
-// SHUTDOWN - Log the user off and shutdown the machine.
-// PWD_CHANGED - Indicates that the user changed their password. Notify network providers.
-// TASKLIST - Invoke the task list.
-// UNLOCK_WKSTA - Unlock the workstation.
-// FORCE_LOGOFF - Forcibly log the user off.
-// SHUTDOWN_POWER_OFF - Turn off machine after shutting down.
-// SHUTDOWN_REBOOT - Reboot machine after shutting down.
-// SHUTDOWN_SLEEP - Put the machine to sleep
-// SHUTDOWN_SLEEP2 - Put the machine to sleep and disable wakeup events
-// SHUTDOWN_HIBERNATE - Hibernate the machine
-// RECONNECTED - Session was reconnected to an earlier session
-//
-
- WLX_SAS_ACTION_LOGON = 1;
- {$EXTERNALSYM WLX_SAS_ACTION_LOGON}
- WLX_SAS_ACTION_NONE = 2;
- {$EXTERNALSYM WLX_SAS_ACTION_NONE}
- WLX_SAS_ACTION_LOCK_WKSTA = 3;
- {$EXTERNALSYM WLX_SAS_ACTION_LOCK_WKSTA}
- WLX_SAS_ACTION_LOGOFF = 4;
- {$EXTERNALSYM WLX_SAS_ACTION_LOGOFF}
- WLX_SAS_ACTION_SHUTDOWN = 5;
- {$EXTERNALSYM WLX_SAS_ACTION_SHUTDOWN}
- WLX_SAS_ACTION_PWD_CHANGED = 6;
- {$EXTERNALSYM WLX_SAS_ACTION_PWD_CHANGED}
- WLX_SAS_ACTION_TASKLIST = 7;
- {$EXTERNALSYM WLX_SAS_ACTION_TASKLIST}
- WLX_SAS_ACTION_UNLOCK_WKSTA = 8;
- {$EXTERNALSYM WLX_SAS_ACTION_UNLOCK_WKSTA}
- WLX_SAS_ACTION_FORCE_LOGOFF = 9;
- {$EXTERNALSYM WLX_SAS_ACTION_FORCE_LOGOFF}
- WLX_SAS_ACTION_SHUTDOWN_POWER_OFF = 10;
- {$EXTERNALSYM WLX_SAS_ACTION_SHUTDOWN_POWER_OFF}
- WLX_SAS_ACTION_SHUTDOWN_REBOOT = 11;
- {$EXTERNALSYM WLX_SAS_ACTION_SHUTDOWN_REBOOT}
- WLX_SAS_ACTION_SHUTDOWN_SLEEP = 12;
- {$EXTERNALSYM WLX_SAS_ACTION_SHUTDOWN_SLEEP}
- WLX_SAS_ACTION_SHUTDOWN_SLEEP2 = 13;
- {$EXTERNALSYM WLX_SAS_ACTION_SHUTDOWN_SLEEP2}
- WLX_SAS_ACTION_SHUTDOWN_HIBERNATE = 14;
- {$EXTERNALSYM WLX_SAS_ACTION_SHUTDOWN_HIBERNATE}
- WLX_SAS_ACTION_RECONNECTED = 15;
- {$EXTERNALSYM WLX_SAS_ACTION_RECONNECTED}
- WLX_SAS_ACTION_DELAYED_FORCE_LOGOFF = 16;
- {$EXTERNALSYM WLX_SAS_ACTION_DELAYED_FORCE_LOGOFF}
- WLX_SAS_ACTION_SWITCH_CONSOLE = 17;
- {$EXTERNALSYM WLX_SAS_ACTION_SWITCH_CONSOLE}
-
-////////////////////////////////////////////////////////////////////////
-// //
-// Window Messages //
-// //
-////////////////////////////////////////////////////////////////////////
-
-//
-// The WM_SAS is defined as follows
-//
-// The wParam parameter has the SAS Type (above)
-
- WLX_WM_SAS = WM_USER + 601;
- {$EXTERNALSYM WLX_WM_SAS}
-
-//
-// Dialog return values
-//
-// These may be returned by dialogs started by a GINA dll.
-//
-
- WLX_DLG_SAS = 101;
- {$EXTERNALSYM WLX_DLG_SAS}
- WLX_DLG_INPUT_TIMEOUT = 102; // Input (keys, etc) timed out
- {$EXTERNALSYM WLX_DLG_INPUT_TIMEOUT}
- WLX_DLG_SCREEN_SAVER_TIMEOUT = 103; // Screen Saver activated
- {$EXTERNALSYM WLX_DLG_SCREEN_SAVER_TIMEOUT}
- WLX_DLG_USER_LOGOFF = 104; // User logged off
- {$EXTERNALSYM WLX_DLG_USER_LOGOFF}
-
-/////////////////////////////////////////////////////////////////////////
-/////////////////////////////////////////////////////////////////////////
-//
-// The WLX_PROFILE_* structure is returned from a GINA DLL
-// following authentication. This information is used by Winlogon
-// to support supplemental Network Providers and to load the
-// newly logged-on user's profile.
-//
-// Winlogon is responsible for freeing both the profile structure
-// and the fields within the structure that are marked as separately
-// deallocatable.
-//
-
-type
- PWLX_PROFILE_V1_0 = ^WLX_PROFILE_V1_0;
- {$EXTERNALSYM PWLX_PROFILE_V1_0}
- _WLX_PROFILE_V1_0 = record
- //
- // This field identifies the type of profile being returned by a
- // GINA DLL. Profile types are defined with the prefix
- // WLX_PROFILE_TYPE_xxx. It allows Winlogon to typecast the
- // structure so the remainder of the structure may be referenced.
- //
- dwType: DWORD;
- //
- // pathname of profile to load for user.
- //
- // The buffer pointed to by this field must be separately allocated.
- // Winlogon will free the buffer when it is no longer needed.
- //
- //
- pszProfile: PWSTR;
- end;
- {$EXTERNALSYM _WLX_PROFILE_V1_0}
- WLX_PROFILE_V1_0 = _WLX_PROFILE_V1_0;
- {$EXTERNALSYM WLX_PROFILE_V1_0}
- TWlxProfileV1_0 = WLX_PROFILE_V1_0;
- PWlxProfileV1_0 = PWLX_PROFILE_V1_0;
-
- PWLX_PROFILE_V2_0 = ^WLX_PROFILE_V2_0;
- {$EXTERNALSYM PWLX_PROFILE_V2_0}
- _WLX_PROFILE_V2_0 = record
- //
- // This field identifies the type of profile being returned by a
- // GINA DLL. Profile types are defined with the prefix
- // WLX_PROFILE_TYPE_xxx. It allows Winlogon to typecast the
- // structure so the remainder of the structure may be referenced.
- //
- dwType: DWORD;
- //
- // pathname of profile to load for user.
- //
- // This parameter can be NULL. If so, the user has a local
- // profile only.
- //
- // The buffer pointed to by this field must be separately allocated.
- // Winlogon will free the buffer when it is no longer needed.
- //
- //
- pszProfile: PWSTR;
- //
- // pathname of policy to load for user.
- //
- // This parameter can be NULL which prevents network wide policy
- // from being applied.
- //
- // The buffer pointed to by this field must be separately allocated.
- // Winlogon will free the buffer when it is no longer needed.
- //
- //
- pszPolicy: PWSTR;
- //
- // pathname of network default user profile
- //
- // This parameter can be NULL, which causes the Default User
- // profile on the local machine to be used.
- //
- // The buffer pointed to by this field must be separately allocated.
- // Winlogon will free the buffer when it is no longer needed.
- //
- //
- pszNetworkDefaultUserProfile: PWSTR;
- //
- // name of the server which validated the user account
- //
- // This is used to enumerate globals groups the user belongs
- // to for policy support. This parameter can be NULL.
- //
- // The buffer pointed to by this field must be separately allocated.
- // Winlogon will free the buffer when it is no longer needed.
- //
- //
- pszServerName: PWSTR;
- //
- // pointer to a series of null terminated environment variables
- //
- // envname=environment variable value
- // - or -
- // envname=%OtherVar%\more text
- //
- // Each environment variable is NULL terminated with the last
- // environment variable double NULL terminated. These variables
- // are set into the user's initial environment. The environment
- // variable value can contain other environment variables wrapped
- // in "%" signs. This parameter can be NULL.
- //
- // The buffer pointed to by this field must be separately allocated.
- // Winlogon will free the buffer when it is no longer needed.
- //
- //
- pszEnvironment: PWSTR;
- end;
- {$EXTERNALSYM _WLX_PROFILE_V2_0}
- WLX_PROFILE_V2_0 = _WLX_PROFILE_V2_0;
- {$EXTERNALSYM WLX_PROFILE_V2_0}
- TWlxProfileV2_0 = WLX_PROFILE_V2_0;
- PWlxProfileV2_0 = PWLX_PROFILE_V2_0;
-
-/////////////////////////////////////////////////////////////////////////
-/////////////////////////////////////////////////////////////////////////
-//
-// The WLX_NPR_NOTIFICATION_INFO structure is returned
-// from a GINA DLL following successful authentication.
-// This information is used by Winlogon to provide
-// identification and authentication information already
-// collected to network providers. Winlogon is
-// responsible for freeing both the main structure and all
-// string and other buffers pointed to from within the
-// structure.
-//
-
- PWLX_MPR_NOTIFY_INFO = ^WLX_MPR_NOTIFY_INFO;
- {$EXTERNALSYM PWLX_MPR_NOTIFY_INFO}
- _WLX_MPR_NOTIFY_INFO = record
- //
- // The name of the account logged onto (e.g. REDMOND\Joe).
- // The string pointed to by this field must be separately
- // allocated and will be separately deallocated by Winlogon.
- //
- pszUserName: PWSTR;
- //
- // The string pointed to by this field must be separately
- // allocated and will be separately deallocated by Winlogon.
- //
- pszDomain: PWSTR;
- //
- // Cleartext password of the user account. If the OldPassword
- // field is non-null, then this field contains the new password
- // in a password change operation. The string pointed to by
- // this field must be separately allocated and will be seperately
- // deallocated by Winlogon.
- //
- pszPassword: PWSTR;
- //
- // Cleartext old password of the user account whose password
- // has just been changed. The Password field contains the new
- // password. The string pointed to by this field must be
- // separately allocated and will be separately deallocated by
- // Winlogon.
- //
- pszOldPassword: PWSTR;
- end;
- {$EXTERNALSYM _WLX_MPR_NOTIFY_INFO}
- WLX_MPR_NOTIFY_INFO = _WLX_MPR_NOTIFY_INFO;
- {$EXTERNALSYM WLX_MPR_NOTIFY_INFO}
- TWlxMprNotifyInfo = WLX_MPR_NOTIFY_INFO;
- PWlxMprNotifyInfo = PWLX_MPR_NOTIFY_INFO;
-
-/////////////////////////////////////////////////////////////////////////
-/////////////////////////////////////////////////////////////////////////
-//
-// WLX_TERMINAL_SERVICES_DATA is used by the GINA during a
-// WlxQueryTerminalServicesData() callback into WinLogon from the
-// WlxLoggedOutSAS() context, after the user name and domain are known.
-// This structure relates to TS user configuration information which is
-// retrieved from the Domain Controller and SAM database. Having WinLogon
-// pass this information means the GINA does not need to do the same
-// off-machines lookups again.
-//
-
-const
- WLX_DIRECTORY_LENGTH = 256;
- {$EXTERNALSYM WLX_DIRECTORY_LENGTH}
-
-type
- PWLX_TERMINAL_SERVICES_DATA = ^WLX_TERMINAL_SERVICES_DATA;
- {$EXTERNALSYM PWLX_TERMINAL_SERVICES_DATA}
- _WLX_TERMINAL_SERVICES_DATA = record
- //
- // TS profile path, overrides the standard profile path.
- //
- ProfilePath: array [0..WLX_DIRECTORY_LENGTH] of WCHAR;
- //
- // TS home directory, overrides standard home directory.
- //
- HomeDir: array [0..WLX_DIRECTORY_LENGTH] of WCHAR;
- //
- // TS home directory drive, overrides standard drive.
- //
- HomeDirDrive: array [0..3] of WCHAR;
- end;
- {$EXTERNALSYM _WLX_TERMINAL_SERVICES_DATA}
- WLX_TERMINAL_SERVICES_DATA = _WLX_TERMINAL_SERVICES_DATA;
- {$EXTERNALSYM WLX_TERMINAL_SERVICES_DATA}
- TWlxTerminalServicesData = WLX_TERMINAL_SERVICES_DATA;
- PWlxTerminalServicesData = PWLX_TERMINAL_SERVICES_DATA;
-
-/////////////////////////////////////////////////////////////////////////
-/////////////////////////////////////////////////////////////////////////
-//
-// The WLX_CLIENT_CREDENTIALS_INFO structure is returned
-// from winlogon from the WlxQueryClientCredentials() call.
-//
-// This allows a network client WinStation to pass client
-// credentials for automatic logon.
-//
-// The MSGINA DLL is responsible for freeing the memory
-// and substrings with LocalFree().
-//
-
-const
- WLX_CREDENTIAL_TYPE_V1_0 = 1;
- {$EXTERNALSYM WLX_CREDENTIAL_TYPE_V1_0}
- WLX_CREDENTIAL_TYPE_V2_0 = 2;
- {$EXTERNALSYM WLX_CREDENTIAL_TYPE_V2_0}
-
-type
- PWLX_CLIENT_CREDENTIALS_INFO_V1_0 = ^WLX_CLIENT_CREDENTIALS_INFO_V1_0;
- {$EXTERNALSYM PWLX_CLIENT_CREDENTIALS_INFO_V1_0}
- _WLX_CLIENT_CREDENTIALS_INFO = record
- //
- // This field identifies the type of credentials structure being allocated
- // by GINA DLL. Credential types are defined with the prefix
- // WLX_CREDENTIAL_TYPE_xxx. It allows Winlogon to typecast the
- // structure so the remainder of the structure may be referenced.
- //
- dwType: DWORD;
- pszUserName: PWSTR;
- pszDomain: PWSTR;
- pszPassword: PWSTR;
- //
- // This field forces a prompt for the password. This
- // is due to an administrator override.
- //
- // This allows the distinguishing of autologon
- // with no password.
- //
- fPromptForPassword: BOOL;
- end;
- {$EXTERNALSYM _WLX_CLIENT_CREDENTIALS_INFO}
- WLX_CLIENT_CREDENTIALS_INFO_V1_0 = _WLX_CLIENT_CREDENTIALS_INFO;
- {$EXTERNALSYM WLX_CLIENT_CREDENTIALS_INFO_V1_0}
- TWlxClientCredentialsInfoV1_0 = WLX_CLIENT_CREDENTIALS_INFO_V1_0;
- PWlxClientCredentialsInfoV1_0 = PWLX_CLIENT_CREDENTIALS_INFO_V1_0;
-
- _WLX_CLIENT_CREDENTIALS_INFO_V2_0 = record
- dwType: DWORD;
- pszUserName: PWSTR;
- pszDomain: PWSTR;
- pszPassword: PWSTR;
- fPromptForPassword: BOOL;
- //
- // This field tells winlogon to disconnect/abort the logon attempt if the
- // provided password is incorrect, or if it should reprompt (current
- // behavior)
- //
- fDisconnectOnLogonFailure: BOOL;
- end;
- {$EXTERNALSYM _WLX_CLIENT_CREDENTIALS_INFO_V2_0}
- WLX_CLIENT_CREDENTIALS_INFO_V2_0 = _WLX_CLIENT_CREDENTIALS_INFO_V2_0;
- {$EXTERNALSYM WLX_CLIENT_CREDENTIALS_INFO_V2_0}
- PWLX_CLIENT_CREDENTIALS_INFO_V2_0 = ^WLX_CLIENT_CREDENTIALS_INFO_V2_0;
- {$EXTERNALSYM PWLX_CLIENT_CREDENTIALS_INFO_V2_0}
- TWlxClientCredentialsInfoV2_0 = WLX_CLIENT_CREDENTIALS_INFO_V2_0;
- PWlxClientCredentialsInfoV2_0 = PWLX_CLIENT_CREDENTIALS_INFO_V2_0;
-
-/////////////////////////////////////////////////////////////////////////
-/////////////////////////////////////////////////////////////////////////
-//
-// The WLX_CONSOLESWITCH_CREDENTIALS_INFO structure is returned
-// from gina in response to WlxGetConsoleSwitchCredentials calls.
-
-// This structure is also returned from winlogon in response to
-// to WlxQueryConsoleSwitchCredentials call
-//
-// This is used to implement single session Terminal Server. A remote
-// session winlogon calls WlxGetConsoleSwitchCredentials to get the token
-// and other info of the logged on user from msgina. This info is then passed to
-// the console session winlogon to autologon the user on the console session.
-// The gina on console session calls WlxQueryConsoleSwitchCredentials to get
-// this info from winlogon and logs on the user.
-//
-// The caller is responsible for freeing the memory
-// and substrings with LocalFree().
-//
-
-const
- WLX_CONSOLESWITCHCREDENTIAL_TYPE_V1_0 = 1;
- {$EXTERNALSYM WLX_CONSOLESWITCHCREDENTIAL_TYPE_V1_0}
-
-type
- _WLX_CONSOLESWITCH_CREDENTIALS_INFO_V1_0 = record
-
- //
- // This field identifies the type of credentials structure being allocated
- // Credential types are defined with the prefix
- // WLX_CONSOLESWITCHCREDENTIAL_TYPE_xxx. It allows Winlogon to typecast the
- // structure so the remainder of the structure may be referenced.
- //
-
- dwType: DWORD;
-
- UserToken: HANDLE;
- LogonId: LUID;
- Quotas: QUOTA_LIMITS;
- UserName: PWSTR;
- Domain: PWSTR;
- LogonTime: LARGE_INTEGER;
- SmartCardLogon: BOOL;
- ProfileLength: ULONG;
-
- //
- // From MSV1_0_INTERACTIVE_PROFILE
- //
- MessageType: DWORD;
- LogonCount: USHORT;
- BadPasswordCount: USHORT;
- ProfileLogonTime: LARGE_INTEGER;
- LogoffTime: LARGE_INTEGER;
- KickOffTime: LARGE_INTEGER;
- PasswordLastSet: LARGE_INTEGER;
- PasswordCanChange: LARGE_INTEGER;
- PasswordMustChange: LARGE_INTEGER;
- LogonScript: PWSTR;
- HomeDirectory: PWSTR;
- FullName: PWSTR;
- ProfilePath: PWSTR;
- HomeDirectoryDrive: PWSTR;
- LogonServer: PWSTR;
- UserFlags: ULONG;
- PrivateDataLen: ULONG;
- PrivateData: PBYTE;
- end;
- {$EXTERNALSYM _WLX_CONSOLESWITCH_CREDENTIALS_INFO_V1_0}
- WLX_CONSOLESWITCH_CREDENTIALS_INFO_V1_0 = _WLX_CONSOLESWITCH_CREDENTIALS_INFO_V1_0;
- {$EXTERNALSYM WLX_CONSOLESWITCH_CREDENTIALS_INFO_V1_0}
- PWLX_CONSOLESWITCH_CREDENTIALS_INFO_V1_0 = ^WLX_CONSOLESWITCH_CREDENTIALS_INFO_V1_0;
- {$EXTERNALSYM PWLX_CONSOLESWITCH_CREDENTIALS_INFO_V1_0}
- TWlxConsoleSwitchCredentialsInfoV1_0 = WLX_CONSOLESWITCH_CREDENTIALS_INFO_V1_0;
- PWlxConsoleSwitchCredentialsInfoV1_0 = PWLX_CONSOLESWITCH_CREDENTIALS_INFO_V1_0;
-
-////////////////////////////////////////////////////////////////////////
-// //
-// Services that replacement GINAs ** MUST ** provide //
-// //
-////////////////////////////////////////////////////////////////////////
-
-{$IFDEF MSGINA_IMPORT}
-
-{$IFDEF MSGINA1_0}
-
-function WlxNegotiate(dwWinlogonVersion: DWORD; var pdwDllVersion: WORD): BOOL; stdcall;
-{$EXTERNALSYM WlxNegotiate}
-
-function WlxInitialize(lpWinsta: LPWSTR; hWlx: HANDLE; pvReserved: PVOID;
- pWinlogonFunctions: PVOID; var pWlxContext: PVOID): BOOL; stdcall;
-{$EXTERNALSYM WlxInitialize}
-
-procedure WlxDisplaySASNotice(pWlxContext: PVOID); stdcall;
-{$EXTERNALSYM WlxDisplaySASNotice}
-
-function WlxLoggedOutSAS(pWlxContext: PVOID; dwSasType: DWORD;
- var pAuthenticationId: LUID; var pLogonSid: SID; var pdwOptions: DWORD;
- var phToken: HANDLE; var pNprNotifyInfo: WLX_MPR_NOTIFY_INFO;
- var pProfile: PVOID): Integer; stdcall;
-{$EXTERNALSYM WlxLoggedOutSAS}
-
-function WlxActivateUserShell(pWlxContext: PVOID; pszDesktopName: PWSTR;
- pszMprLogonScript: PWSTR; pEnvironment: PVOID): BOOL; stdcall;
-{$EXTERNALSYM WlxActivateUserShell}
-
-function WlxLoggedOnSAS(pWlxContext: PVOID; dwSasType: DWORD; pReserved: PVOID): Integer; stdcall;
-{$EXTERNALSYM WlxLoggedOnSAS}
-
-procedure WlxDisplayLockedNotice(pWlxContext: PVOID); stdcall;
-{$EXTERNALSYM WlxDisplayLockedNotice}
-
-function WlxWkstaLockedSAS(pWlxContext: PVOID; dwSasType: DWORD): Integer; stdcall;
-{$EXTERNALSYM WlxWkstaLockedSAS}
-
-function WlxIsLockOk(pWlxContext: PVOID): BOOL; stdcall;
-{$EXTERNALSYM WlxIsLockOk}
-
-function WlxIsLogoffOk(pWlxContext: PVOID): BOOL; stdcall;
-{$EXTERNALSYM WlxIsLogoffOk}
-
-procedure WlxLogoff(pWlxContext: PVOID); stdcall;
-{$EXTERNALSYM WlxLogoff}
-
-procedure WlxShutdown(pWlxContext: PVOID; ShutdownType: DWORD); stdcall;
-{$EXTERNALSYM WlxShutdown}
-
-{$ENDIF MSGINA1_0}
-
-{$IFDEF MSGINA1_1}
-
-function WlxScreenSaverNotify(pWlxContext: PVOID; var pSecure: BOOL): BOOL; stdcall;
-{$EXTERNALSYM WlxScreenSaverNotify}
-
-function WlxStartApplication(pWlxContext: PVOID; pszDesktopName: PWSTR;
- pEnvironment: PVOID; pszCmdLine: PWSTR): BOOL; stdcall;
-{$EXTERNALSYM WlxStartApplication}
-
-{$ENDIF MSGINA1_1}
-
-{$IFDEF MSGINA1_3}
-
-function WlxNetworkProviderLoad(pWlxContext: PVOID;
- var pNprNotifyInfo: WLX_MPR_NOTIFY_INFO): BOOL; stdcall;
-{$EXTERNALSYM WlxNetworkProviderLoad}
-
-const
- STATUSMSG_OPTION_NOANIMATION = $00000001;
- {$EXTERNALSYM STATUSMSG_OPTION_NOANIMATION}
- STATUSMSG_OPTION_SETFOREGROUND = $00000002;
- {$EXTERNALSYM STATUSMSG_OPTION_SETFOREGROUND}
-
-function WlxDisplayStatusMessage(pWlxContext: PVOID; hDesktop: HDESK;
- dwOptions: DWORD; pTitle: PWSTR; pMessage: PWSTR): BOOL; stdcall;
-{$EXTERNALSYM WlxDisplayStatusMessage}
-
-function WlxGetStatusMessage(pWlxContext: PVOID; var pdwOptions: DWORD;
- pMessage: PWSTR; dwBufferSize: DWORD): BOOL; stdcall;
-{$EXTERNALSYM WlxGetStatusMessage}
-
-function WlxRemoveStatusMessage(pWlxContext: PVOID): BOOL; stdcall;
-{$EXTERNALSYM WlxRemoveStatusMessage}
-
-{$ENDIF MSGINA1_3}
-
-{$IFDEF MSGINA1_4}
-
-function WlxGetConsoleSwitchCredentials(pWlxContext, pCredInfo: PVOID): BOOL; stdcall;
-{$EXTERNALSYM WlxGetConsoleSwitchCredentials}
-
-procedure WlxReconnectNotify(pWlxContext: PVOID); stdcall;
-{$EXTERNALSYM WlxReconnectNotify}
-
-procedure WlxDisconnectNotify(pWlxContext: PVOID); stdcall;
-{$EXTERNALSYM WlxDisconnectNotify}
-
-{$ENDIF MSGINA1_4}
-
-{$ENDIF MSGINA_IMPORT}
-
-////////////////////////////////////////////////////////////////////////
-// //
-// Services that Winlogon provides //
-// //
-////////////////////////////////////////////////////////////////////////
-
-type
- PWLX_DESKTOP = ^WLX_DESKTOP;
- {$EXTERNALSYM PWLX_DESKTOP}
- _WLX_DESKTOP = record
- Size: DWORD;
- Flags: DWORD;
- hDesktop: HDESK;
- pszDesktopName: PWSTR;
- end;
- {$EXTERNALSYM _WLX_DESKTOP}
- WLX_DESKTOP = _WLX_DESKTOP;
- {$EXTERNALSYM WLX_DESKTOP}
- TWlxDesktop = WLX_DESKTOP;
- PWlxDesktop = PWLX_DESKTOP;
-
-const
- WLX_DESKTOP_NAME = $00000001; // Name present
- {$EXTERNALSYM WLX_DESKTOP_NAME}
- WLX_DESKTOP_HANDLE = $00000002; // Handle present
- {$EXTERNALSYM WLX_DESKTOP_HANDLE}
-
-type
- PWLX_USE_CTRL_ALT_DEL = procedure(hWlx: HANDLE); stdcall;
- {$EXTERNALSYM PWLX_USE_CTRL_ALT_DEL}
- PWLX_SET_CONTEXT_POINTER = procedure(hWlx: HANDLE; pWlxContext: PVOID); stdcall;
- {$EXTERNALSYM PWLX_SET_CONTEXT_POINTER}
- PWLX_SAS_NOTIFY = procedure(hWlx: HANDLE; dwSasType: DWORD); stdcall;
- {$EXTERNALSYM PWLX_SAS_NOTIFY}
- PWLX_SET_TIMEOUT = function(hWlx: HANDLE; Timeout: DWORD): BOOL; stdcall;
- {$EXTERNALSYM PWLX_SET_TIMEOUT}
- PWLX_ASSIGN_SHELL_PROTECTION = function(hWlx, hToken, hProcess, hThread: HANDLE): Integer; stdcall;
- {$EXTERNALSYM PWLX_ASSIGN_SHELL_PROTECTION}
- PWLX_MESSAGE_BOX = function(hWlx: HANDLE; hwndOwner: HWND; lpszText,
- lpszTitle: LPWSTR; fuStyle: UINT): Integer; stdcall;
- {$EXTERNALSYM PWLX_MESSAGE_BOX}
- PWLX_DIALOG_BOX = function(hWlx, hInst: HANDLE; lpszTemplate: LPWSTR;
- hwndOwner: HWND; dlgprc: DLGPROC): Integer; stdcall;
- {$EXTERNALSYM PWLX_DIALOG_BOX}
- PWLX_DIALOG_BOX_INDIRECT = function(hWlx, hInst: HANDLE;
- hDialogTemplate: LPCDLGTEMPLATE; hwndOwner: HWND; dlgprc: DLGPROC): Integer; stdcall;
- {$EXTERNALSYM PWLX_DIALOG_BOX_INDIRECT}
- PWLX_DIALOG_BOX_PARAM = function(hWlx, hInst: HANDLE; lpszTemplate: LPWSTR;
- hwndOwner: HWND; dlgprc: DLGPROC; dwInitParam: LPARAM): Integer; stdcall;
- {$EXTERNALSYM PWLX_DIALOG_BOX_PARAM}
- PWLX_DIALOG_BOX_INDIRECT_PARAM = function(hWlx, hInst: HANDLE;
- hDialogTemplate: LPCDLGTEMPLATE; hwndOwner: HWND; dlgprc: DLGPROC;
- dwInitParam: LPARAM): Integer; stdcall;
- {$EXTERNALSYM PWLX_DIALOG_BOX_INDIRECT_PARAM}
- PWLX_SWITCH_DESKTOP_TO_USER = function(hWlx: HANDLE): Integer; stdcall;
- {$EXTERNALSYM PWLX_SWITCH_DESKTOP_TO_USER}
- PWLX_SWITCH_DESKTOP_TO_WINLOGON = function(hWlx: HANDLE): Integer; stdcall;
- {$EXTERNALSYM PWLX_SWITCH_DESKTOP_TO_WINLOGON}
- PWLX_CHANGE_PASSWORD_NOTIFY = function(hWlx: HANDLE;
- var pMprInfo: WLX_MPR_NOTIFY_INFO; dwChangeInfo: DWORD): Integer; stdcall;
- {$EXTERNALSYM PWLX_CHANGE_PASSWORD_NOTIFY}
- PWLX_GET_SOURCE_DESKTOP = function(hWlx: HANDLE; var ppDesktop: PWLX_DESKTOP): BOOL; stdcall;
- {$EXTERNALSYM PWLX_GET_SOURCE_DESKTOP}
- PWLX_SET_RETURN_DESKTOP = function(hWlx: HANDLE; const pDesktop: WLX_DESKTOP): BOOL; stdcall;
- {$EXTERNALSYM PWLX_SET_RETURN_DESKTOP}
- PWLX_CREATE_USER_DESKTOP = function(hWlx, hToken: HANDLE; Flags: DWORD;
- pszDesktopName: PWSTR; var ppDesktop: PWLX_DESKTOP): BOOL; stdcall;
- {$EXTERNALSYM PWLX_CREATE_USER_DESKTOP}
-
-const
- WLX_CREATE_INSTANCE_ONLY = $00000001;
- {$EXTERNALSYM WLX_CREATE_INSTANCE_ONLY}
- WLX_CREATE_USER = $00000002;
- {$EXTERNALSYM WLX_CREATE_USER}
-
-type
- PWLX_CHANGE_PASSWORD_NOTIFY_EX = function(hWlx: HANDLE;
- const pMprInfo: WLX_MPR_NOTIFY_INFO; dwChangeInfo: DWORD;
- ProviderName: PWSTR; Reserved: PVOID): Integer; stdcall;
- {$EXTERNALSYM PWLX_CHANGE_PASSWORD_NOTIFY_EX}
- PWLX_CLOSE_USER_DESKTOP = function(hWlx: HANDLE; const pDesktop: WLX_DESKTOP;
- hToken: HANDLE): BOOL; stdcall;
- {$EXTERNALSYM PWLX_CLOSE_USER_DESKTOP}
- PWLX_SET_OPTION = function(hWlx: HANDLE; Option: DWORD; Value: ULONG_PTR;
- var OldValue: ULONG_PTR): BOOL; stdcall;
- {$EXTERNALSYM PWLX_SET_OPTION}
- PWLX_GET_OPTION = function(hWlx: HANDLE; Option: DWORD; var Value: ULONG_PTR): BOOL; stdcall;
- {$EXTERNALSYM PWLX_GET_OPTION}
- PWLX_WIN31_MIGRATE = procedure(hWlx: HANDLE); stdcall;
- {$EXTERNALSYM PWLX_WIN31_MIGRATE}
- PWLX_QUERY_CLIENT_CREDENTIALS = function(var pCred: WLX_CLIENT_CREDENTIALS_INFO_V1_0): BOOL; stdcall;
- {$EXTERNALSYM PWLX_QUERY_CLIENT_CREDENTIALS}
- PWLX_QUERY_IC_CREDENTIALS = function(var pCred: WLX_CLIENT_CREDENTIALS_INFO_V1_0): BOOL; stdcall;
- {$EXTERNALSYM PWLX_QUERY_IC_CREDENTIALS}
- PWLX_QUERY_TS_LOGON_CREDENTIALS = function(pCred: PWLX_CLIENT_CREDENTIALS_INFO_V2_0): BOOL; stdcall;
- {$EXTERNALSYM PWLX_QUERY_TS_LOGON_CREDENTIALS}
- PWLX_DISCONNECT = function : BOOL; stdcall;
- {$EXTERNALSYM PWLX_DISCONNECT}
- PWLX_QUERY_TERMINAL_SERVICES_DATA = function(hWlx: HANDLE;
- var pTSData: WLX_TERMINAL_SERVICES_DATA; UserName, Domain: PWCHAR): DWORD; stdcall;
- {$EXTERNALSYM PWLX_DISCONNECT}
- PWLX_QUERY_CONSOLESWITCH_CREDENTIALS = function(pCred: PWLX_CONSOLESWITCH_CREDENTIALS_INFO_V1_0): DWORD; stdcall;
- {$EXTERNALSYM PWLX_QUERY_CONSOLESWITCH_CREDENTIALS}
-
-//
-// Options that can be get or set:
-//
-
-const
- WLX_OPTION_USE_CTRL_ALT_DEL = $00000001;
- {$EXTERNALSYM WLX_OPTION_USE_CTRL_ALT_DEL}
- WLX_OPTION_CONTEXT_POINTER = $00000002;
- {$EXTERNALSYM WLX_OPTION_CONTEXT_POINTER}
- WLX_OPTION_USE_SMART_CARD = $00000003;
- {$EXTERNALSYM WLX_OPTION_USE_SMART_CARD}
- WLX_OPTION_FORCE_LOGOFF_TIME = $00000004;
- {$EXTERNALSYM WLX_OPTION_FORCE_LOGOFF_TIME}
- WLX_OPTION_IGNORE_AUTO_LOGON = $00000008;
- {$EXTERNALSYM WLX_OPTION_IGNORE_AUTO_LOGON}
- WLX_OPTION_NO_SWITCH_ON_SAS = $00000009;
- {$EXTERNALSYM WLX_OPTION_NO_SWITCH_ON_SAS}
-
-//
-// Options that can be queried only:
-//
-
- WLX_OPTION_SMART_CARD_PRESENT = $00010001;
- {$EXTERNALSYM WLX_OPTION_SMART_CARD_PRESENT}
- WLX_OPTION_SMART_CARD_INFO = $00010002;
- {$EXTERNALSYM WLX_OPTION_SMART_CARD_INFO}
- WLX_OPTION_DISPATCH_TABLE_SIZE = $00010003;
- {$EXTERNALSYM WLX_OPTION_DISPATCH_TABLE_SIZE}
-
-////////////////////////////////////////////////////////////////////////
-// //
-// Function dispatch tables. //
-// One of the following tables will be passed to the GINA DLL //
-// in the WlxInitialize() call during initialization. //
-// //
-////////////////////////////////////////////////////////////////////////
-
-type
- PWLX_DISPATCH_VERSION_1_0 = ^WLX_DISPATCH_VERSION_1_0;
- {$EXTERNALSYM PWLX_DISPATCH_VERSION_1_0}
- _WLX_DISPATCH_VERSION_1_0 = record
- WlxUseCtrlAltDel: PWLX_USE_CTRL_ALT_DEL;
- WlxSetContextPointer: PWLX_SET_CONTEXT_POINTER;
- WlxSasNotify: PWLX_SAS_NOTIFY;
- WlxSetTimeout: PWLX_SET_TIMEOUT;
- WlxAssignShellProtection: PWLX_ASSIGN_SHELL_PROTECTION;
- WlxMessageBox: PWLX_MESSAGE_BOX;
- WlxDialogBox: PWLX_DIALOG_BOX;
- WlxDialogBoxParam: PWLX_DIALOG_BOX_PARAM;
- WlxDialogBoxIndirect: PWLX_DIALOG_BOX_INDIRECT;
- WlxDialogBoxIndirectParam: PWLX_DIALOG_BOX_INDIRECT_PARAM;
- WlxSwitchDesktopToUser: PWLX_SWITCH_DESKTOP_TO_USER;
- WlxSwitchDesktopToWinlogon: PWLX_SWITCH_DESKTOP_TO_WINLOGON;
- WlxChangePasswordNotify: PWLX_CHANGE_PASSWORD_NOTIFY;
- end;
- {$EXTERNALSYM _WLX_DISPATCH_VERSION_1_0}
- WLX_DISPATCH_VERSION_1_0 = _WLX_DISPATCH_VERSION_1_0;
- {$EXTERNALSYM WLX_DISPATCH_VERSION_1_0}
- TWlxDispatchVersion1_0 = WLX_DISPATCH_VERSION_1_0;
- PWlxDispatchVersion1_0 = PWLX_DISPATCH_VERSION_1_0;
-
- PWLX_DISPATCH_VERSION_1_1 = ^WLX_DISPATCH_VERSION_1_1;
- {$EXTERNALSYM PWLX_DISPATCH_VERSION_1_1}
- _WLX_DISPATCH_VERSION_1_1 = record
- WlxUseCtrlAltDel: PWLX_USE_CTRL_ALT_DEL;
- WlxSetContextPointer: PWLX_SET_CONTEXT_POINTER;
- WlxSasNotify: PWLX_SAS_NOTIFY;
- WlxSetTimeout: PWLX_SET_TIMEOUT;
- WlxAssignShellProtection: PWLX_ASSIGN_SHELL_PROTECTION;
- WlxMessageBox: PWLX_MESSAGE_BOX;
- WlxDialogBox: PWLX_DIALOG_BOX;
- WlxDialogBoxParam: PWLX_DIALOG_BOX_PARAM;
- WlxDialogBoxIndirect: PWLX_DIALOG_BOX_INDIRECT;
- WlxDialogBoxIndirectParam: PWLX_DIALOG_BOX_INDIRECT_PARAM;
- WlxSwitchDesktopToUser: PWLX_SWITCH_DESKTOP_TO_USER;
- WlxSwitchDesktopToWinlogon: PWLX_SWITCH_DESKTOP_TO_WINLOGON;
- WlxChangePasswordNotify: PWLX_CHANGE_PASSWORD_NOTIFY;
- WlxGetSourceDesktop: PWLX_GET_SOURCE_DESKTOP;
- WlxSetReturnDesktop: PWLX_SET_RETURN_DESKTOP;
- WlxCreateUserDesktop: PWLX_CREATE_USER_DESKTOP;
- WlxChangePasswordNotifyEx: PWLX_CHANGE_PASSWORD_NOTIFY_EX;
- end;
- {$EXTERNALSYM _WLX_DISPATCH_VERSION_1_1}
- WLX_DISPATCH_VERSION_1_1 = _WLX_DISPATCH_VERSION_1_1;
- {$EXTERNALSYM WLX_DISPATCH_VERSION_1_1}
- TWlxDispatchVersion1_1 = WLX_DISPATCH_VERSION_1_1;
- PWlxDispatchVersion1_1 = PWLX_DISPATCH_VERSION_1_1;
-
- PWLX_DISPATCH_VERSION_1_2 = ^WLX_DISPATCH_VERSION_1_2;
- {$EXTERNALSYM PWLX_DISPATCH_VERSION_1_2}
- _WLX_DISPATCH_VERSION_1_2 = record
- WlxUseCtrlAltDel: PWLX_USE_CTRL_ALT_DEL;
- WlxSetContextPointer: PWLX_SET_CONTEXT_POINTER;
- WlxSasNotify: PWLX_SAS_NOTIFY;
- WlxSetTimeout: PWLX_SET_TIMEOUT;
- WlxAssignShellProtection: PWLX_ASSIGN_SHELL_PROTECTION;
- WlxMessageBox: PWLX_MESSAGE_BOX;
- WlxDialogBox: PWLX_DIALOG_BOX;
- WlxDialogBoxParam: PWLX_DIALOG_BOX_PARAM;
- WlxDialogBoxIndirect: PWLX_DIALOG_BOX_INDIRECT;
- WlxDialogBoxIndirectParam: PWLX_DIALOG_BOX_INDIRECT_PARAM;
- WlxSwitchDesktopToUser: PWLX_SWITCH_DESKTOP_TO_USER;
- WlxSwitchDesktopToWinlogon: PWLX_SWITCH_DESKTOP_TO_WINLOGON;
- WlxChangePasswordNotify: PWLX_CHANGE_PASSWORD_NOTIFY;
- WlxGetSourceDesktop: PWLX_GET_SOURCE_DESKTOP;
- WlxSetReturnDesktop: PWLX_SET_RETURN_DESKTOP;
- WlxCreateUserDesktop: PWLX_CREATE_USER_DESKTOP;
- WlxChangePasswordNotifyEx: PWLX_CHANGE_PASSWORD_NOTIFY_EX;
- WlxCloseUserDesktop : PWLX_CLOSE_USER_DESKTOP;
- end;
- {$EXTERNALSYM _WLX_DISPATCH_VERSION_1_2}
- WLX_DISPATCH_VERSION_1_2 = _WLX_DISPATCH_VERSION_1_2;
- {$EXTERNALSYM WLX_DISPATCH_VERSION_1_2}
- TWlxDispatchVersion1_2 = WLX_DISPATCH_VERSION_1_2;
- PWlxDispatchVersion1_2 = PWLX_DISPATCH_VERSION_1_2;
-
- PWLX_DISPATCH_VERSION_1_3 = ^WLX_DISPATCH_VERSION_1_3;
- {$EXTERNALSYM PWLX_DISPATCH_VERSION_1_3}
- _WLX_DISPATCH_VERSION_1_3 = record
- WlxUseCtrlAltDel: PWLX_USE_CTRL_ALT_DEL;
- WlxSetContextPointer: PWLX_SET_CONTEXT_POINTER;
- WlxSasNotify: PWLX_SAS_NOTIFY;
- WlxSetTimeout: PWLX_SET_TIMEOUT;
- WlxAssignShellProtection: PWLX_ASSIGN_SHELL_PROTECTION;
- WlxMessageBox: PWLX_MESSAGE_BOX;
- WlxDialogBox: PWLX_DIALOG_BOX;
- WlxDialogBoxParam: PWLX_DIALOG_BOX_PARAM;
- WlxDialogBoxIndirect: PWLX_DIALOG_BOX_INDIRECT;
- WlxDialogBoxIndirectParam: PWLX_DIALOG_BOX_INDIRECT_PARAM;
- WlxSwitchDesktopToUser: PWLX_SWITCH_DESKTOP_TO_USER;
- WlxSwitchDesktopToWinlogon: PWLX_SWITCH_DESKTOP_TO_WINLOGON;
- WlxChangePasswordNotify: PWLX_CHANGE_PASSWORD_NOTIFY;
- WlxGetSourceDesktop: PWLX_GET_SOURCE_DESKTOP;
- WlxSetReturnDesktop: PWLX_SET_RETURN_DESKTOP;
- WlxCreateUserDesktop: PWLX_CREATE_USER_DESKTOP;
- WlxChangePasswordNotifyEx: PWLX_CHANGE_PASSWORD_NOTIFY_EX;
- WlxCloseUserDesktop : PWLX_CLOSE_USER_DESKTOP;
- WlxSetOption: PWLX_SET_OPTION;
- WlxGetOption: PWLX_GET_OPTION;
- WlxWin31Migrate: PWLX_WIN31_MIGRATE;
- WlxQueryClientCredentials: PWLX_QUERY_CLIENT_CREDENTIALS;
- WlxQueryInetConnectorCredentials: PWLX_QUERY_IC_CREDENTIALS;
- WlxDisconnect: PWLX_DISCONNECT;
- WlxQueryTerminalServicesData: PWLX_QUERY_TERMINAL_SERVICES_DATA;
- end;
- {$EXTERNALSYM _WLX_DISPATCH_VERSION_1_3}
- WLX_DISPATCH_VERSION_1_3 = _WLX_DISPATCH_VERSION_1_3;
- {$EXTERNALSYM WLX_DISPATCH_VERSION_1_3}
- TWlxDispatchVersion1_3 = WLX_DISPATCH_VERSION_1_3;
- PWlxDispatchVersion1_3 = PWLX_DISPATCH_VERSION_1_3;
-
- PWLX_DISPATCH_VERSION_1_4 = ^WLX_DISPATCH_VERSION_1_4;
- {$EXTERNALSYM PWLX_DISPATCH_VERSION_1_4}
- _WLX_DISPATCH_VERSION_1_4 = record
- WlxUseCtrlAltDel: PWLX_USE_CTRL_ALT_DEL;
- WlxSetContextPointer: PWLX_SET_CONTEXT_POINTER;
- WlxSasNotify: PWLX_SAS_NOTIFY;
- WlxSetTimeout: PWLX_SET_TIMEOUT;
- WlxAssignShellProtection: PWLX_ASSIGN_SHELL_PROTECTION;
- WlxMessageBox: PWLX_MESSAGE_BOX;
- WlxDialogBox: PWLX_DIALOG_BOX;
- WlxDialogBoxParam: PWLX_DIALOG_BOX_PARAM;
- WlxDialogBoxIndirect: PWLX_DIALOG_BOX_INDIRECT;
- WlxDialogBoxIndirectParam: PWLX_DIALOG_BOX_INDIRECT_PARAM;
- WlxSwitchDesktopToUser: PWLX_SWITCH_DESKTOP_TO_USER;
- WlxSwitchDesktopToWinlogon: PWLX_SWITCH_DESKTOP_TO_WINLOGON;
- WlxChangePasswordNotify: PWLX_CHANGE_PASSWORD_NOTIFY;
- WlxGetSourceDesktop: PWLX_GET_SOURCE_DESKTOP;
- WlxSetReturnDesktop: PWLX_SET_RETURN_DESKTOP;
- WlxCreateUserDesktop: PWLX_CREATE_USER_DESKTOP;
- WlxChangePasswordNotifyEx: PWLX_CHANGE_PASSWORD_NOTIFY_EX;
- WlxCloseUserDesktop : PWLX_CLOSE_USER_DESKTOP;
- WlxSetOption: PWLX_SET_OPTION;
- WlxGetOption: PWLX_GET_OPTION;
- WlxWin31Migrate: PWLX_WIN31_MIGRATE;
- WlxQueryClientCredentials: PWLX_QUERY_CLIENT_CREDENTIALS;
- WlxQueryInetConnectorCredentials: PWLX_QUERY_IC_CREDENTIALS;
- WlxDisconnect: PWLX_DISCONNECT;
- WlxQueryTerminalServicesData: PWLX_QUERY_TERMINAL_SERVICES_DATA;
- WlxQueryConsoleSwitchCredentials: PWLX_QUERY_CONSOLESWITCH_CREDENTIALS;
- WlxQueryTsLogonCredentials: PWLX_QUERY_TS_LOGON_CREDENTIALS;
- end;
- {$EXTERNALSYM _WLX_DISPATCH_VERSION_1_4}
- WLX_DISPATCH_VERSION_1_4 = _WLX_DISPATCH_VERSION_1_4;
- {$EXTERNALSYM WLX_DISPATCH_VERSION_1_4}
- TWlxDispatchVersion1_4 = WLX_DISPATCH_VERSION_1_4;
- PWlxDispatchVersion1_4 = PWLX_DISPATCH_VERSION_1_4;
-
-//
-// Non-GINA notification DLLs
-//
-
- PFNMSGECALLBACK = function(bVerbose: BOOL; lpMessage: LPWSTR): DWORD; stdcall;
- {$EXTERNALSYM PFNMSGECALLBACK}
- TFnMsgeCallback = PFNMSGECALLBACK;
-
- PWLX_NOTIFICATION_INFO = ^WLX_NOTIFICATION_INFO;
- {$EXTERNALSYM PWLX_NOTIFICATION_INFO}
- _WLX_NOTIFICATION_INFO = record
- Size: ULONG;
- Flags: ULONG;
- UserName: PWSTR;
- Domain: PWSTR;
- WindowStation: PWSTR;
- hToken: HANDLE;
- hDesktop: HDESK;
- pStatusCallback: PFNMSGECALLBACK;
- end;
- {$EXTERNALSYM _WLX_NOTIFICATION_INFO}
- WLX_NOTIFICATION_INFO = _WLX_NOTIFICATION_INFO;
- {$EXTERNALSYM WLX_NOTIFICATION_INFO}
- TWlxNotificationInfo = WLX_NOTIFICATION_INFO;
- PWlxNotificationInfo = PWLX_NOTIFICATION_INFO;
-
-implementation
-
-{$IFDEF MSGINA_IMPORT}
-
-const
- msgina = 'msgina.dll';
-
-{$IFDEF DYNAMIC_LINK}
-
-{$IFDEF MSGINA1_0}
-
-var
- _WlxNegotiate: Pointer;
-
-function WlxNegotiate;
-begin
- GetProcedureAddress(_WlxNegotiate, msgina, 'WlxNegotiate');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WlxNegotiate]
- end;
-end;
-
-var
- _WlxInitialize: Pointer;
-
-function WlxInitialize;
-begin
- GetProcedureAddress(_WlxInitialize, msgina, 'WlxInitialize');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WlxInitialize]
- end;
-end;
-
-var
- _WlxDisplaySASNotice: Pointer;
-
-procedure WlxDisplaySASNotice;
-begin
- GetProcedureAddress(_WlxDisplaySASNotice, msgina, 'WlxDisplaySASNotice');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WlxDisplaySASNotice]
- end;
-end;
-
-var
- _WlxLoggedOutSAS: Pointer;
-
-function WlxLoggedOutSAS;
-begin
- GetProcedureAddress(_WlxLoggedOutSAS, msgina, 'WlxLoggedOutSAS');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WlxLoggedOutSAS]
- end;
-end;
-
-var
- _WlxActivateUserShell: Pointer;
-
-function WlxActivateUserShell;
-begin
- GetProcedureAddress(_WlxActivateUserShell, msgina, 'WlxActivateUserShell');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WlxActivateUserShell]
- end;
-end;
-
-var
- _WlxLoggedOnSAS: Pointer;
-
-function WlxLoggedOnSAS;
-begin
- GetProcedureAddress(_WlxLoggedOnSAS, msgina, 'WlxLoggedOnSAS');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WlxLoggedOnSAS]
- end;
-end;
-
-var
- _WlxDisplayLockedNotice: Pointer;
-
-procedure WlxDisplayLockedNotice;
-begin
- GetProcedureAddress(_WlxDisplayLockedNotice, msgina, 'WlxDisplayLockedNotice');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WlxDisplayLockedNotice]
- end;
-end;
-
-var
- _WlxWkstaLockedSAS: Pointer;
-
-function WlxWkstaLockedSAS;
-begin
- GetProcedureAddress(_WlxWkstaLockedSAS, msgina, 'WlxWkstaLockedSAS');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WlxWkstaLockedSAS]
- end;
-end;
-
-var
- _WlxIsLockOk: Pointer;
-
-function WlxIsLockOk;
-begin
- GetProcedureAddress(_WlxIsLockOk, msgina, 'WlxIsLockOk');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WlxIsLockOk]
- end;
-end;
-
-var
- _WlxIsLogoffOk: Pointer;
-
-function WlxIsLogoffOk;
-begin
- GetProcedureAddress(_WlxIsLogoffOk, msgina, 'WlxIsLogoffOk');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WlxIsLogoffOk]
- end;
-end;
-
-var
- _WlxLogoff: Pointer;
-
-procedure WlxLogoff;
-begin
- GetProcedureAddress(_WlxLogoff, msgina, 'WlxLogoff');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WlxLogoff]
- end;
-end;
-
-var
- _WlxShutdown: Pointer;
-
-procedure WlxShutdown;
-begin
- GetProcedureAddress(_WlxShutdown, msgina, 'WlxShutdown');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WlxShutdown]
- end;
-end;
-
-{$ENDIF MSGINA1_0}
-
-{$IFDEF MSGINA1_1}
-
-var
- _WlxScreenSaverNotify: Pointer;
-
-function WlxScreenSaverNotify;
-begin
- GetProcedureAddress(_WlxScreenSaverNotify, msgina, 'WlxScreenSaverNotify');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WlxScreenSaverNotify]
- end;
-end;
-
-var
- _WlxStartApplication: Pointer;
-
-function WlxStartApplication;
-begin
- GetProcedureAddress(_WlxStartApplication, msgina, 'WlxStartApplication');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WlxStartApplication]
- end;
-end;
-
-{$ENDIF MSGINA1_1}
-
-{$IFDEF MSGINA1_3}
-
-var
- _WlxNetworkProviderLoad: Pointer;
-
-function WlxNetworkProviderLoad;
-begin
- GetProcedureAddress(_WlxNetworkProviderLoad, msgina, 'WlxNetworkProviderLoad');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WlxNetworkProviderLoad]
- end;
-end;
-
-var
- _WlxDisplayStatusMessage: Pointer;
-
-function WlxDisplayStatusMessage;
-begin
- GetProcedureAddress(_WlxDisplayStatusMessage, msgina, 'WlxDisplayStatusMessage');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WlxDisplayStatusMessage]
- end;
-end;
-
-var
- _WlxGetStatusMessage: Pointer;
-
-function WlxGetStatusMessage;
-begin
- GetProcedureAddress(_WlxGetStatusMessage, msgina, 'WlxGetStatusMessage');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WlxGetStatusMessage]
- end;
-end;
-
-var
- _WlxRemoveStatusMessage: Pointer;
-
-function WlxRemoveStatusMessage;
-begin
- GetProcedureAddress(_WlxRemoveStatusMessage, msgina, 'WlxRemoveStatusMessage');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WlxRemoveStatusMessage]
- end;
-end;
-
-{$ENDIF MSGINA1_3}
-
-{$IFDEF MSGINA1_4}
-
-var
- _WlxGetConsoleSwitchCredentials: Pointer;
-
-function WlxGetConsoleSwitchCredentials;
-begin
- GetProcedureAddress(_WlxGetConsoleSwitchCredentials, msgina, 'WlxGetConsoleSwitchCredentials');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WlxGetConsoleSwitchCredentials]
- end;
-end;
-
-var
- _WlxReconnectNotify: Pointer;
-
-procedure WlxReconnectNotify;
-begin
- GetProcedureAddress(_WlxReconnectNotify, msgina, 'WlxReconnectNotify');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WlxReconnectNotify]
- end;
-end;
-
-var
- _WlxDisconnectNotify: Pointer;
-
-procedure WlxDisconnectNotify;
-begin
- GetProcedureAddress(_WlxDisconnectNotify, msgina, 'WlxDisconnectNotify');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WlxDisconnectNotify]
- end;
-end;
-
-{$ENDIF MSGINA1_4}
-
-{$ELSE}
-
-{$IFDEF MSGINA1_0}
-function WlxNegotiate; external msgina name 'WlxNegotiate';
-function WlxInitialize; external msgina name 'WlxInitialize';
-procedure WlxDisplaySASNotice; external msgina name 'WlxDisplaySASNotice';
-function WlxLoggedOutSAS; external msgina name 'WlxLoggedOutSAS';
-function WlxActivateUserShell; external msgina name 'WlxActivateUserShell';
-function WlxLoggedOnSAS; external msgina name 'WlxLoggedOnSAS';
-procedure WlxDisplayLockedNotice; external msgina name 'WlxDisplayLockedNotice';
-function WlxWkstaLockedSAS; external msgina name 'WlxWkstaLockedSAS';
-function WlxIsLockOk; external msgina name 'WlxIsLockOk';
-function WlxIsLogoffOk; external msgina name 'WlxIsLogoffOk';
-procedure WlxLogoff; external msgina name 'WlxLogoff';
-procedure WlxShutdown; external msgina name 'WlxShutdown';
-{$ENDIF MSGINA1_0}
-{$IFDEF MSGINA1_1}
-function WlxScreenSaverNotify; external msgina name 'WlxScreenSaverNotify';
-function WlxStartApplication; external msgina name 'WlxStartApplication';
-{$ENDIF MSGINA1_1}
-{$IFDEF MSGINA1_3}
-function WlxNetworkProviderLoad; external msgina name 'WlxNetworkProviderLoad';
-function WlxDisplayStatusMessage; external msgina name 'WlxDisplayStatusMessage';
-function WlxGetStatusMessage; external msgina name 'WlxGetStatusMessage';
-function WlxRemoveStatusMessage; external msgina name 'WlxRemoveStatusMessage';
-{$ENDIF MSGINA1_3}
-{$IFDEF MSGINA1_4}
-function WlxGetConsoleSwitchCredentials; external msgina name 'WlxGetConsoleSwitchCredentials';
-procedure WlxReconnectNotify; external msgina name 'WlxReconnectNotify';
-procedure WlxDisconnectNotify; external msgina name 'WlxDisconnectNotify';
-{$ENDIF MSGINA1_4}
-
-{$ENDIF DYNAMIC_LINK}
-
-{$ENDIF MSGINA_IMPORT}
-
-end.
+{******************************************************************************}
+{ }
+{ WinLogon API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: winwlx.h, released June 2000. The original Pascal }
+{ code is: WinWlx.pas, released December 2000. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwawinwlx.pas,v 1.1 2005/04/04 07:56:11 marco Exp $
+
+unit JwaWinWlx;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "WinWlx.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaWinType, JwaWinUser, JwaWinNT;
+
+// WLX == WinLogon eXtension
+//
+// This file contains definitions, data types, and routine prototypes
+// necessary to produce a replacement Graphical Identification aNd
+// Authentication (GINA) DLL for Winlogon.
+
+/////////////////////////////////////////////////////////////////////////
+/////////////////////////////////////////////////////////////////////////
+//
+// Revisions of Winlogon API available for use by GINAs
+// Version is two parts: Major revision and minor revision.
+// Major revision is the upper 16-bits, minor is the lower
+// 16-bits.
+//
+
+const
+ WLX_VERSION_1_0 = $00010000;
+ {$EXTERNALSYM WLX_VERSION_1_0}
+ WLX_VERSION_1_1 = $00010001;
+ {$EXTERNALSYM WLX_VERSION_1_1}
+ WLX_VERSION_1_2 = $00010002;
+ {$EXTERNALSYM WLX_VERSION_1_2}
+ WLX_VERSION_1_3 = $00010003;
+ {$EXTERNALSYM WLX_VERSION_1_3}
+ WLX_VERSION_1_4 = $00010004;
+ {$EXTERNALSYM WLX_VERSION_1_4}
+ WLX_CURRENT_VERSION = WLX_VERSION_1_4;
+ {$EXTERNALSYM WLX_CURRENT_VERSION}
+
+/////////////////////////////////////////////////////////////////////////
+/////////////////////////////////////////////////////////////////////////
+//
+// Secure attention sequence types
+// These values are passed to routines that have a dwSasType
+// parameter.
+//
+// ALL VALUES FROM 0 TO 127 ARE RESERVED FOR MICROSOFT DEFINITION.
+// VALUES ABOVE 127 ARE RESERVED FOR CUSTOMER DEFINITION.
+//
+// CTRL_ALT_DEL - used to indicate that the standard ctrl-alt-del
+// secure attention sequence has been entered.
+//
+// SCRNSVR_TIMEOUT - used to indicate that keyboard/mouse inactivity
+// has lead to a screensaver activation. It is up to the GINA
+// DLL whether this constitutes a workstation locking event.
+//
+// SCRNSVR_ACTIVITY - used to indicate that keyboard or mouse
+// activity occured while a secure screensaver was active.
+//
+// SC_INSERT - used to indicate that a smart card has been inserted
+// to a compatible device
+//
+// SC_REMOVE - used to indicate that a smart card has been removed
+// from a compatible device
+//
+
+ WLX_SAS_TYPE_TIMEOUT = 0;
+ {$EXTERNALSYM WLX_SAS_TYPE_TIMEOUT}
+ WLX_SAS_TYPE_CTRL_ALT_DEL = 1;
+ {$EXTERNALSYM WLX_SAS_TYPE_CTRL_ALT_DEL}
+ WLX_SAS_TYPE_SCRNSVR_TIMEOUT = 2;
+ {$EXTERNALSYM WLX_SAS_TYPE_SCRNSVR_TIMEOUT}
+ WLX_SAS_TYPE_SCRNSVR_ACTIVITY = 3;
+ {$EXTERNALSYM WLX_SAS_TYPE_SCRNSVR_ACTIVITY}
+ WLX_SAS_TYPE_USER_LOGOFF = 4;
+ {$EXTERNALSYM WLX_SAS_TYPE_USER_LOGOFF}
+ WLX_SAS_TYPE_SC_INSERT = 5;
+ {$EXTERNALSYM WLX_SAS_TYPE_SC_INSERT}
+ WLX_SAS_TYPE_SC_REMOVE = 6;
+ {$EXTERNALSYM WLX_SAS_TYPE_SC_REMOVE}
+ WLX_SAS_TYPE_AUTHENTICATED = 7;
+ {$EXTERNALSYM WLX_SAS_TYPE_AUTHENTICATED}
+ WLX_SAS_TYPE_SC_FIRST_READER_ARRIVED = 8;
+ {$EXTERNALSYM WLX_SAS_TYPE_SC_FIRST_READER_ARRIVED}
+ WLX_SAS_TYPE_SC_LAST_READER_REMOVED = 9;
+ {$EXTERNALSYM WLX_SAS_TYPE_SC_LAST_READER_REMOVED}
+ WLX_SAS_TYPE_SWITCHUSER = 10;
+ {$EXTERNALSYM WLX_SAS_TYPE_SWITCHUSER}
+ WLX_SAS_TYPE_MAX_MSFT_VALUE = 127;
+ {$EXTERNALSYM WLX_SAS_TYPE_MAX_MSFT_VALUE}
+
+//
+// This structure is available through WlxGetOption, and is
+// passed as the lParam for any S/C SAS notices sent to windows
+//
+
+type
+ PWLX_SC_NOTIFICATION_INFO = ^WLX_SC_NOTIFICATION_INFO;
+ {$EXTERNALSYM PWLX_SC_NOTIFICATION_INFO}
+ _WLX_SC_NOTIFICATION_INFO = record
+ pszCard: PWSTR;
+ pszReader: PWSTR;
+ pszContainer: PWSTR;
+ pszCryptoProvider: PWSTR;
+ end;
+ {$EXTERNALSYM _WLX_SC_NOTIFICATION_INFO}
+ WLX_SC_NOTIFICATION_INFO = _WLX_SC_NOTIFICATION_INFO;
+ {$EXTERNALSYM WLX_SC_NOTIFICATION_INFO}
+ TWlxScNotificationInfo = WLX_SC_NOTIFICATION_INFO;
+ PWlxScNotificationInfo = PWLX_SC_NOTIFICATION_INFO;
+
+/////////////////////////////////////////////////////////////////////////
+/////////////////////////////////////////////////////////////////////////
+//
+// Upon successful logon, the GINA DLL may specify any of the following
+// options to Winlogon (via the dwOptions parameter of the WlxLoggedOutSas()
+// api). When set, these options specify:
+//
+// NO_PROFILE - Winlogon must NOT load a profile for the logged
+// on user. Either the GINA DLL will take care of
+// this activity, or the user does not need a profile.
+//
+
+const
+ WLX_LOGON_OPT_NO_PROFILE = $00000001;
+ {$EXTERNALSYM WLX_LOGON_OPT_NO_PROFILE}
+
+/////////////////////////////////////////////////////////////////////////
+/////////////////////////////////////////////////////////////////////////
+//
+// GINA DLLs are expected to return account information to Winlogon
+// following a successful logon. This information allows Winlogon
+// to support profile loading and supplemental network providers.
+//
+// To allow different sets of profile information to be returned
+// by GINAs over time, the first DWORD of each profile structure
+// is expected to contain a type-identifier. The following constants
+// are the defined profile type identifiers.
+//
+
+//
+// Standard profile is V2_0
+//
+
+ WLX_PROFILE_TYPE_V1_0 = 1;
+ {$EXTERNALSYM WLX_PROFILE_TYPE_V1_0}
+ WLX_PROFILE_TYPE_V2_0 = 2;
+ {$EXTERNALSYM WLX_PROFILE_TYPE_V2_0}
+
+/////////////////////////////////////////////////////////////////////////
+/////////////////////////////////////////////////////////////////////////
+//
+// WlxLoggedOnSas() and WlxWkstaLockedSas() return an action
+// value to Winlogon directing Winlogon to either remain unchanged
+// or to perform some action (such as force-log the user off).
+// These are the values that may be returned. Note, however, that
+// not all of the values may be returned by both of these api. See
+// the description of each api to see which values are expected from
+// each.
+//
+// LOGON - User has logged on
+// NONE - Don't change the state of the window station.
+// LOCK_WKSTA - Lock the workstation, wait for next SAS.
+// LOGOFF - Log the user off of the workstation.
+// SHUTDOWN - Log the user off and shutdown the machine.
+// PWD_CHANGED - Indicates that the user changed their password. Notify network providers.
+// TASKLIST - Invoke the task list.
+// UNLOCK_WKSTA - Unlock the workstation.
+// FORCE_LOGOFF - Forcibly log the user off.
+// SHUTDOWN_POWER_OFF - Turn off machine after shutting down.
+// SHUTDOWN_REBOOT - Reboot machine after shutting down.
+// SHUTDOWN_SLEEP - Put the machine to sleep
+// SHUTDOWN_SLEEP2 - Put the machine to sleep and disable wakeup events
+// SHUTDOWN_HIBERNATE - Hibernate the machine
+// RECONNECTED - Session was reconnected to an earlier session
+//
+
+ WLX_SAS_ACTION_LOGON = 1;
+ {$EXTERNALSYM WLX_SAS_ACTION_LOGON}
+ WLX_SAS_ACTION_NONE = 2;
+ {$EXTERNALSYM WLX_SAS_ACTION_NONE}
+ WLX_SAS_ACTION_LOCK_WKSTA = 3;
+ {$EXTERNALSYM WLX_SAS_ACTION_LOCK_WKSTA}
+ WLX_SAS_ACTION_LOGOFF = 4;
+ {$EXTERNALSYM WLX_SAS_ACTION_LOGOFF}
+ WLX_SAS_ACTION_SHUTDOWN = 5;
+ {$EXTERNALSYM WLX_SAS_ACTION_SHUTDOWN}
+ WLX_SAS_ACTION_PWD_CHANGED = 6;
+ {$EXTERNALSYM WLX_SAS_ACTION_PWD_CHANGED}
+ WLX_SAS_ACTION_TASKLIST = 7;
+ {$EXTERNALSYM WLX_SAS_ACTION_TASKLIST}
+ WLX_SAS_ACTION_UNLOCK_WKSTA = 8;
+ {$EXTERNALSYM WLX_SAS_ACTION_UNLOCK_WKSTA}
+ WLX_SAS_ACTION_FORCE_LOGOFF = 9;
+ {$EXTERNALSYM WLX_SAS_ACTION_FORCE_LOGOFF}
+ WLX_SAS_ACTION_SHUTDOWN_POWER_OFF = 10;
+ {$EXTERNALSYM WLX_SAS_ACTION_SHUTDOWN_POWER_OFF}
+ WLX_SAS_ACTION_SHUTDOWN_REBOOT = 11;
+ {$EXTERNALSYM WLX_SAS_ACTION_SHUTDOWN_REBOOT}
+ WLX_SAS_ACTION_SHUTDOWN_SLEEP = 12;
+ {$EXTERNALSYM WLX_SAS_ACTION_SHUTDOWN_SLEEP}
+ WLX_SAS_ACTION_SHUTDOWN_SLEEP2 = 13;
+ {$EXTERNALSYM WLX_SAS_ACTION_SHUTDOWN_SLEEP2}
+ WLX_SAS_ACTION_SHUTDOWN_HIBERNATE = 14;
+ {$EXTERNALSYM WLX_SAS_ACTION_SHUTDOWN_HIBERNATE}
+ WLX_SAS_ACTION_RECONNECTED = 15;
+ {$EXTERNALSYM WLX_SAS_ACTION_RECONNECTED}
+ WLX_SAS_ACTION_DELAYED_FORCE_LOGOFF = 16;
+ {$EXTERNALSYM WLX_SAS_ACTION_DELAYED_FORCE_LOGOFF}
+ WLX_SAS_ACTION_SWITCH_CONSOLE = 17;
+ {$EXTERNALSYM WLX_SAS_ACTION_SWITCH_CONSOLE}
+
+////////////////////////////////////////////////////////////////////////
+// //
+// Window Messages //
+// //
+////////////////////////////////////////////////////////////////////////
+
+//
+// The WM_SAS is defined as follows
+//
+// The wParam parameter has the SAS Type (above)
+
+ WLX_WM_SAS = WM_USER + 601;
+ {$EXTERNALSYM WLX_WM_SAS}
+
+//
+// Dialog return values
+//
+// These may be returned by dialogs started by a GINA dll.
+//
+
+ WLX_DLG_SAS = 101;
+ {$EXTERNALSYM WLX_DLG_SAS}
+ WLX_DLG_INPUT_TIMEOUT = 102; // Input (keys, etc) timed out
+ {$EXTERNALSYM WLX_DLG_INPUT_TIMEOUT}
+ WLX_DLG_SCREEN_SAVER_TIMEOUT = 103; // Screen Saver activated
+ {$EXTERNALSYM WLX_DLG_SCREEN_SAVER_TIMEOUT}
+ WLX_DLG_USER_LOGOFF = 104; // User logged off
+ {$EXTERNALSYM WLX_DLG_USER_LOGOFF}
+
+/////////////////////////////////////////////////////////////////////////
+/////////////////////////////////////////////////////////////////////////
+//
+// The WLX_PROFILE_* structure is returned from a GINA DLL
+// following authentication. This information is used by Winlogon
+// to support supplemental Network Providers and to load the
+// newly logged-on user's profile.
+//
+// Winlogon is responsible for freeing both the profile structure
+// and the fields within the structure that are marked as separately
+// deallocatable.
+//
+
+type
+ PWLX_PROFILE_V1_0 = ^WLX_PROFILE_V1_0;
+ {$EXTERNALSYM PWLX_PROFILE_V1_0}
+ _WLX_PROFILE_V1_0 = record
+ //
+ // This field identifies the type of profile being returned by a
+ // GINA DLL. Profile types are defined with the prefix
+ // WLX_PROFILE_TYPE_xxx. It allows Winlogon to typecast the
+ // structure so the remainder of the structure may be referenced.
+ //
+ dwType: DWORD;
+ //
+ // pathname of profile to load for user.
+ //
+ // The buffer pointed to by this field must be separately allocated.
+ // Winlogon will free the buffer when it is no longer needed.
+ //
+ //
+ pszProfile: PWSTR;
+ end;
+ {$EXTERNALSYM _WLX_PROFILE_V1_0}
+ WLX_PROFILE_V1_0 = _WLX_PROFILE_V1_0;
+ {$EXTERNALSYM WLX_PROFILE_V1_0}
+ TWlxProfileV1_0 = WLX_PROFILE_V1_0;
+ PWlxProfileV1_0 = PWLX_PROFILE_V1_0;
+
+ PWLX_PROFILE_V2_0 = ^WLX_PROFILE_V2_0;
+ {$EXTERNALSYM PWLX_PROFILE_V2_0}
+ _WLX_PROFILE_V2_0 = record
+ //
+ // This field identifies the type of profile being returned by a
+ // GINA DLL. Profile types are defined with the prefix
+ // WLX_PROFILE_TYPE_xxx. It allows Winlogon to typecast the
+ // structure so the remainder of the structure may be referenced.
+ //
+ dwType: DWORD;
+ //
+ // pathname of profile to load for user.
+ //
+ // This parameter can be NULL. If so, the user has a local
+ // profile only.
+ //
+ // The buffer pointed to by this field must be separately allocated.
+ // Winlogon will free the buffer when it is no longer needed.
+ //
+ //
+ pszProfile: PWSTR;
+ //
+ // pathname of policy to load for user.
+ //
+ // This parameter can be NULL which prevents network wide policy
+ // from being applied.
+ //
+ // The buffer pointed to by this field must be separately allocated.
+ // Winlogon will free the buffer when it is no longer needed.
+ //
+ //
+ pszPolicy: PWSTR;
+ //
+ // pathname of network default user profile
+ //
+ // This parameter can be NULL, which causes the Default User
+ // profile on the local machine to be used.
+ //
+ // The buffer pointed to by this field must be separately allocated.
+ // Winlogon will free the buffer when it is no longer needed.
+ //
+ //
+ pszNetworkDefaultUserProfile: PWSTR;
+ //
+ // name of the server which validated the user account
+ //
+ // This is used to enumerate globals groups the user belongs
+ // to for policy support. This parameter can be NULL.
+ //
+ // The buffer pointed to by this field must be separately allocated.
+ // Winlogon will free the buffer when it is no longer needed.
+ //
+ //
+ pszServerName: PWSTR;
+ //
+ // pointer to a series of null terminated environment variables
+ //
+ // envname=environment variable value
+ // - or -
+ // envname=%OtherVar%\more text
+ //
+ // Each environment variable is NULL terminated with the last
+ // environment variable double NULL terminated. These variables
+ // are set into the user's initial environment. The environment
+ // variable value can contain other environment variables wrapped
+ // in "%" signs. This parameter can be NULL.
+ //
+ // The buffer pointed to by this field must be separately allocated.
+ // Winlogon will free the buffer when it is no longer needed.
+ //
+ //
+ pszEnvironment: PWSTR;
+ end;
+ {$EXTERNALSYM _WLX_PROFILE_V2_0}
+ WLX_PROFILE_V2_0 = _WLX_PROFILE_V2_0;
+ {$EXTERNALSYM WLX_PROFILE_V2_0}
+ TWlxProfileV2_0 = WLX_PROFILE_V2_0;
+ PWlxProfileV2_0 = PWLX_PROFILE_V2_0;
+
+/////////////////////////////////////////////////////////////////////////
+/////////////////////////////////////////////////////////////////////////
+//
+// The WLX_NPR_NOTIFICATION_INFO structure is returned
+// from a GINA DLL following successful authentication.
+// This information is used by Winlogon to provide
+// identification and authentication information already
+// collected to network providers. Winlogon is
+// responsible for freeing both the main structure and all
+// string and other buffers pointed to from within the
+// structure.
+//
+
+ PWLX_MPR_NOTIFY_INFO = ^WLX_MPR_NOTIFY_INFO;
+ {$EXTERNALSYM PWLX_MPR_NOTIFY_INFO}
+ _WLX_MPR_NOTIFY_INFO = record
+ //
+ // The name of the account logged onto (e.g. REDMOND\Joe).
+ // The string pointed to by this field must be separately
+ // allocated and will be separately deallocated by Winlogon.
+ //
+ pszUserName: PWSTR;
+ //
+ // The string pointed to by this field must be separately
+ // allocated and will be separately deallocated by Winlogon.
+ //
+ pszDomain: PWSTR;
+ //
+ // Cleartext password of the user account. If the OldPassword
+ // field is non-null, then this field contains the new password
+ // in a password change operation. The string pointed to by
+ // this field must be separately allocated and will be seperately
+ // deallocated by Winlogon.
+ //
+ pszPassword: PWSTR;
+ //
+ // Cleartext old password of the user account whose password
+ // has just been changed. The Password field contains the new
+ // password. The string pointed to by this field must be
+ // separately allocated and will be separately deallocated by
+ // Winlogon.
+ //
+ pszOldPassword: PWSTR;
+ end;
+ {$EXTERNALSYM _WLX_MPR_NOTIFY_INFO}
+ WLX_MPR_NOTIFY_INFO = _WLX_MPR_NOTIFY_INFO;
+ {$EXTERNALSYM WLX_MPR_NOTIFY_INFO}
+ TWlxMprNotifyInfo = WLX_MPR_NOTIFY_INFO;
+ PWlxMprNotifyInfo = PWLX_MPR_NOTIFY_INFO;
+
+/////////////////////////////////////////////////////////////////////////
+/////////////////////////////////////////////////////////////////////////
+//
+// WLX_TERMINAL_SERVICES_DATA is used by the GINA during a
+// WlxQueryTerminalServicesData() callback into WinLogon from the
+// WlxLoggedOutSAS() context, after the user name and domain are known.
+// This structure relates to TS user configuration information which is
+// retrieved from the Domain Controller and SAM database. Having WinLogon
+// pass this information means the GINA does not need to do the same
+// off-machines lookups again.
+//
+
+const
+ WLX_DIRECTORY_LENGTH = 256;
+ {$EXTERNALSYM WLX_DIRECTORY_LENGTH}
+
+type
+ PWLX_TERMINAL_SERVICES_DATA = ^WLX_TERMINAL_SERVICES_DATA;
+ {$EXTERNALSYM PWLX_TERMINAL_SERVICES_DATA}
+ _WLX_TERMINAL_SERVICES_DATA = record
+ //
+ // TS profile path, overrides the standard profile path.
+ //
+ ProfilePath: array [0..WLX_DIRECTORY_LENGTH] of WCHAR;
+ //
+ // TS home directory, overrides standard home directory.
+ //
+ HomeDir: array [0..WLX_DIRECTORY_LENGTH] of WCHAR;
+ //
+ // TS home directory drive, overrides standard drive.
+ //
+ HomeDirDrive: array [0..3] of WCHAR;
+ end;
+ {$EXTERNALSYM _WLX_TERMINAL_SERVICES_DATA}
+ WLX_TERMINAL_SERVICES_DATA = _WLX_TERMINAL_SERVICES_DATA;
+ {$EXTERNALSYM WLX_TERMINAL_SERVICES_DATA}
+ TWlxTerminalServicesData = WLX_TERMINAL_SERVICES_DATA;
+ PWlxTerminalServicesData = PWLX_TERMINAL_SERVICES_DATA;
+
+/////////////////////////////////////////////////////////////////////////
+/////////////////////////////////////////////////////////////////////////
+//
+// The WLX_CLIENT_CREDENTIALS_INFO structure is returned
+// from winlogon from the WlxQueryClientCredentials() call.
+//
+// This allows a network client WinStation to pass client
+// credentials for automatic logon.
+//
+// The MSGINA DLL is responsible for freeing the memory
+// and substrings with LocalFree().
+//
+
+const
+ WLX_CREDENTIAL_TYPE_V1_0 = 1;
+ {$EXTERNALSYM WLX_CREDENTIAL_TYPE_V1_0}
+ WLX_CREDENTIAL_TYPE_V2_0 = 2;
+ {$EXTERNALSYM WLX_CREDENTIAL_TYPE_V2_0}
+
+type
+ PWLX_CLIENT_CREDENTIALS_INFO_V1_0 = ^WLX_CLIENT_CREDENTIALS_INFO_V1_0;
+ {$EXTERNALSYM PWLX_CLIENT_CREDENTIALS_INFO_V1_0}
+ _WLX_CLIENT_CREDENTIALS_INFO = record
+ //
+ // This field identifies the type of credentials structure being allocated
+ // by GINA DLL. Credential types are defined with the prefix
+ // WLX_CREDENTIAL_TYPE_xxx. It allows Winlogon to typecast the
+ // structure so the remainder of the structure may be referenced.
+ //
+ dwType: DWORD;
+ pszUserName: PWSTR;
+ pszDomain: PWSTR;
+ pszPassword: PWSTR;
+ //
+ // This field forces a prompt for the password. This
+ // is due to an administrator override.
+ //
+ // This allows the distinguishing of autologon
+ // with no password.
+ //
+ fPromptForPassword: BOOL;
+ end;
+ {$EXTERNALSYM _WLX_CLIENT_CREDENTIALS_INFO}
+ WLX_CLIENT_CREDENTIALS_INFO_V1_0 = _WLX_CLIENT_CREDENTIALS_INFO;
+ {$EXTERNALSYM WLX_CLIENT_CREDENTIALS_INFO_V1_0}
+ TWlxClientCredentialsInfoV1_0 = WLX_CLIENT_CREDENTIALS_INFO_V1_0;
+ PWlxClientCredentialsInfoV1_0 = PWLX_CLIENT_CREDENTIALS_INFO_V1_0;
+
+ _WLX_CLIENT_CREDENTIALS_INFO_V2_0 = record
+ dwType: DWORD;
+ pszUserName: PWSTR;
+ pszDomain: PWSTR;
+ pszPassword: PWSTR;
+ fPromptForPassword: BOOL;
+ //
+ // This field tells winlogon to disconnect/abort the logon attempt if the
+ // provided password is incorrect, or if it should reprompt (current
+ // behavior)
+ //
+ fDisconnectOnLogonFailure: BOOL;
+ end;
+ {$EXTERNALSYM _WLX_CLIENT_CREDENTIALS_INFO_V2_0}
+ WLX_CLIENT_CREDENTIALS_INFO_V2_0 = _WLX_CLIENT_CREDENTIALS_INFO_V2_0;
+ {$EXTERNALSYM WLX_CLIENT_CREDENTIALS_INFO_V2_0}
+ PWLX_CLIENT_CREDENTIALS_INFO_V2_0 = ^WLX_CLIENT_CREDENTIALS_INFO_V2_0;
+ {$EXTERNALSYM PWLX_CLIENT_CREDENTIALS_INFO_V2_0}
+ TWlxClientCredentialsInfoV2_0 = WLX_CLIENT_CREDENTIALS_INFO_V2_0;
+ PWlxClientCredentialsInfoV2_0 = PWLX_CLIENT_CREDENTIALS_INFO_V2_0;
+
+/////////////////////////////////////////////////////////////////////////
+/////////////////////////////////////////////////////////////////////////
+//
+// The WLX_CONSOLESWITCH_CREDENTIALS_INFO structure is returned
+// from gina in response to WlxGetConsoleSwitchCredentials calls.
+
+// This structure is also returned from winlogon in response to
+// to WlxQueryConsoleSwitchCredentials call
+//
+// This is used to implement single session Terminal Server. A remote
+// session winlogon calls WlxGetConsoleSwitchCredentials to get the token
+// and other info of the logged on user from msgina. This info is then passed to
+// the console session winlogon to autologon the user on the console session.
+// The gina on console session calls WlxQueryConsoleSwitchCredentials to get
+// this info from winlogon and logs on the user.
+//
+// The caller is responsible for freeing the memory
+// and substrings with LocalFree().
+//
+
+const
+ WLX_CONSOLESWITCHCREDENTIAL_TYPE_V1_0 = 1;
+ {$EXTERNALSYM WLX_CONSOLESWITCHCREDENTIAL_TYPE_V1_0}
+
+type
+ _WLX_CONSOLESWITCH_CREDENTIALS_INFO_V1_0 = record
+
+ //
+ // This field identifies the type of credentials structure being allocated
+ // Credential types are defined with the prefix
+ // WLX_CONSOLESWITCHCREDENTIAL_TYPE_xxx. It allows Winlogon to typecast the
+ // structure so the remainder of the structure may be referenced.
+ //
+
+ dwType: DWORD;
+
+ UserToken: HANDLE;
+ LogonId: LUID;
+ Quotas: QUOTA_LIMITS;
+ UserName: PWSTR;
+ Domain: PWSTR;
+ LogonTime: LARGE_INTEGER;
+ SmartCardLogon: BOOL;
+ ProfileLength: ULONG;
+
+ //
+ // From MSV1_0_INTERACTIVE_PROFILE
+ //
+ MessageType: DWORD;
+ LogonCount: USHORT;
+ BadPasswordCount: USHORT;
+ ProfileLogonTime: LARGE_INTEGER;
+ LogoffTime: LARGE_INTEGER;
+ KickOffTime: LARGE_INTEGER;
+ PasswordLastSet: LARGE_INTEGER;
+ PasswordCanChange: LARGE_INTEGER;
+ PasswordMustChange: LARGE_INTEGER;
+ LogonScript: PWSTR;
+ HomeDirectory: PWSTR;
+ FullName: PWSTR;
+ ProfilePath: PWSTR;
+ HomeDirectoryDrive: PWSTR;
+ LogonServer: PWSTR;
+ UserFlags: ULONG;
+ PrivateDataLen: ULONG;
+ PrivateData: PBYTE;
+ end;
+ {$EXTERNALSYM _WLX_CONSOLESWITCH_CREDENTIALS_INFO_V1_0}
+ WLX_CONSOLESWITCH_CREDENTIALS_INFO_V1_0 = _WLX_CONSOLESWITCH_CREDENTIALS_INFO_V1_0;
+ {$EXTERNALSYM WLX_CONSOLESWITCH_CREDENTIALS_INFO_V1_0}
+ PWLX_CONSOLESWITCH_CREDENTIALS_INFO_V1_0 = ^WLX_CONSOLESWITCH_CREDENTIALS_INFO_V1_0;
+ {$EXTERNALSYM PWLX_CONSOLESWITCH_CREDENTIALS_INFO_V1_0}
+ TWlxConsoleSwitchCredentialsInfoV1_0 = WLX_CONSOLESWITCH_CREDENTIALS_INFO_V1_0;
+ PWlxConsoleSwitchCredentialsInfoV1_0 = PWLX_CONSOLESWITCH_CREDENTIALS_INFO_V1_0;
+
+////////////////////////////////////////////////////////////////////////
+// //
+// Services that replacement GINAs ** MUST ** provide //
+// //
+////////////////////////////////////////////////////////////////////////
+
+{$IFDEF MSGINA_IMPORT}
+
+{$IFDEF MSGINA1_0}
+
+function WlxNegotiate(dwWinlogonVersion: DWORD; var pdwDllVersion: WORD): BOOL; stdcall;
+{$EXTERNALSYM WlxNegotiate}
+
+function WlxInitialize(lpWinsta: LPWSTR; hWlx: HANDLE; pvReserved: PVOID;
+ pWinlogonFunctions: PVOID; var pWlxContext: PVOID): BOOL; stdcall;
+{$EXTERNALSYM WlxInitialize}
+
+procedure WlxDisplaySASNotice(pWlxContext: PVOID); stdcall;
+{$EXTERNALSYM WlxDisplaySASNotice}
+
+function WlxLoggedOutSAS(pWlxContext: PVOID; dwSasType: DWORD;
+ var pAuthenticationId: LUID; var pLogonSid: SID; var pdwOptions: DWORD;
+ var phToken: HANDLE; var pNprNotifyInfo: WLX_MPR_NOTIFY_INFO;
+ var pProfile: PVOID): Integer; stdcall;
+{$EXTERNALSYM WlxLoggedOutSAS}
+
+function WlxActivateUserShell(pWlxContext: PVOID; pszDesktopName: PWSTR;
+ pszMprLogonScript: PWSTR; pEnvironment: PVOID): BOOL; stdcall;
+{$EXTERNALSYM WlxActivateUserShell}
+
+function WlxLoggedOnSAS(pWlxContext: PVOID; dwSasType: DWORD; pReserved: PVOID): Integer; stdcall;
+{$EXTERNALSYM WlxLoggedOnSAS}
+
+procedure WlxDisplayLockedNotice(pWlxContext: PVOID); stdcall;
+{$EXTERNALSYM WlxDisplayLockedNotice}
+
+function WlxWkstaLockedSAS(pWlxContext: PVOID; dwSasType: DWORD): Integer; stdcall;
+{$EXTERNALSYM WlxWkstaLockedSAS}
+
+function WlxIsLockOk(pWlxContext: PVOID): BOOL; stdcall;
+{$EXTERNALSYM WlxIsLockOk}
+
+function WlxIsLogoffOk(pWlxContext: PVOID): BOOL; stdcall;
+{$EXTERNALSYM WlxIsLogoffOk}
+
+procedure WlxLogoff(pWlxContext: PVOID); stdcall;
+{$EXTERNALSYM WlxLogoff}
+
+procedure WlxShutdown(pWlxContext: PVOID; ShutdownType: DWORD); stdcall;
+{$EXTERNALSYM WlxShutdown}
+
+{$ENDIF MSGINA1_0}
+
+{$IFDEF MSGINA1_1}
+
+function WlxScreenSaverNotify(pWlxContext: PVOID; var pSecure: BOOL): BOOL; stdcall;
+{$EXTERNALSYM WlxScreenSaverNotify}
+
+function WlxStartApplication(pWlxContext: PVOID; pszDesktopName: PWSTR;
+ pEnvironment: PVOID; pszCmdLine: PWSTR): BOOL; stdcall;
+{$EXTERNALSYM WlxStartApplication}
+
+{$ENDIF MSGINA1_1}
+
+{$IFDEF MSGINA1_3}
+
+function WlxNetworkProviderLoad(pWlxContext: PVOID;
+ var pNprNotifyInfo: WLX_MPR_NOTIFY_INFO): BOOL; stdcall;
+{$EXTERNALSYM WlxNetworkProviderLoad}
+
+const
+ STATUSMSG_OPTION_NOANIMATION = $00000001;
+ {$EXTERNALSYM STATUSMSG_OPTION_NOANIMATION}
+ STATUSMSG_OPTION_SETFOREGROUND = $00000002;
+ {$EXTERNALSYM STATUSMSG_OPTION_SETFOREGROUND}
+
+function WlxDisplayStatusMessage(pWlxContext: PVOID; hDesktop: HDESK;
+ dwOptions: DWORD; pTitle: PWSTR; pMessage: PWSTR): BOOL; stdcall;
+{$EXTERNALSYM WlxDisplayStatusMessage}
+
+function WlxGetStatusMessage(pWlxContext: PVOID; var pdwOptions: DWORD;
+ pMessage: PWSTR; dwBufferSize: DWORD): BOOL; stdcall;
+{$EXTERNALSYM WlxGetStatusMessage}
+
+function WlxRemoveStatusMessage(pWlxContext: PVOID): BOOL; stdcall;
+{$EXTERNALSYM WlxRemoveStatusMessage}
+
+{$ENDIF MSGINA1_3}
+
+{$IFDEF MSGINA1_4}
+
+function WlxGetConsoleSwitchCredentials(pWlxContext, pCredInfo: PVOID): BOOL; stdcall;
+{$EXTERNALSYM WlxGetConsoleSwitchCredentials}
+
+procedure WlxReconnectNotify(pWlxContext: PVOID); stdcall;
+{$EXTERNALSYM WlxReconnectNotify}
+
+procedure WlxDisconnectNotify(pWlxContext: PVOID); stdcall;
+{$EXTERNALSYM WlxDisconnectNotify}
+
+{$ENDIF MSGINA1_4}
+
+{$ENDIF MSGINA_IMPORT}
+
+////////////////////////////////////////////////////////////////////////
+// //
+// Services that Winlogon provides //
+// //
+////////////////////////////////////////////////////////////////////////
+
+type
+ PWLX_DESKTOP = ^WLX_DESKTOP;
+ {$EXTERNALSYM PWLX_DESKTOP}
+ _WLX_DESKTOP = record
+ Size: DWORD;
+ Flags: DWORD;
+ hDesktop: HDESK;
+ pszDesktopName: PWSTR;
+ end;
+ {$EXTERNALSYM _WLX_DESKTOP}
+ WLX_DESKTOP = _WLX_DESKTOP;
+ {$EXTERNALSYM WLX_DESKTOP}
+ TWlxDesktop = WLX_DESKTOP;
+ PWlxDesktop = PWLX_DESKTOP;
+
+const
+ WLX_DESKTOP_NAME = $00000001; // Name present
+ {$EXTERNALSYM WLX_DESKTOP_NAME}
+ WLX_DESKTOP_HANDLE = $00000002; // Handle present
+ {$EXTERNALSYM WLX_DESKTOP_HANDLE}
+
+type
+ PWLX_USE_CTRL_ALT_DEL = procedure(hWlx: HANDLE); stdcall;
+ {$EXTERNALSYM PWLX_USE_CTRL_ALT_DEL}
+ PWLX_SET_CONTEXT_POINTER = procedure(hWlx: HANDLE; pWlxContext: PVOID); stdcall;
+ {$EXTERNALSYM PWLX_SET_CONTEXT_POINTER}
+ PWLX_SAS_NOTIFY = procedure(hWlx: HANDLE; dwSasType: DWORD); stdcall;
+ {$EXTERNALSYM PWLX_SAS_NOTIFY}
+ PWLX_SET_TIMEOUT = function(hWlx: HANDLE; Timeout: DWORD): BOOL; stdcall;
+ {$EXTERNALSYM PWLX_SET_TIMEOUT}
+ PWLX_ASSIGN_SHELL_PROTECTION = function(hWlx, hToken, hProcess, hThread: HANDLE): Integer; stdcall;
+ {$EXTERNALSYM PWLX_ASSIGN_SHELL_PROTECTION}
+ PWLX_MESSAGE_BOX = function(hWlx: HANDLE; hwndOwner: HWND; lpszText,
+ lpszTitle: LPWSTR; fuStyle: UINT): Integer; stdcall;
+ {$EXTERNALSYM PWLX_MESSAGE_BOX}
+ PWLX_DIALOG_BOX = function(hWlx, hInst: HANDLE; lpszTemplate: LPWSTR;
+ hwndOwner: HWND; dlgprc: DLGPROC): Integer; stdcall;
+ {$EXTERNALSYM PWLX_DIALOG_BOX}
+ PWLX_DIALOG_BOX_INDIRECT = function(hWlx, hInst: HANDLE;
+ hDialogTemplate: LPCDLGTEMPLATE; hwndOwner: HWND; dlgprc: DLGPROC): Integer; stdcall;
+ {$EXTERNALSYM PWLX_DIALOG_BOX_INDIRECT}
+ PWLX_DIALOG_BOX_PARAM = function(hWlx, hInst: HANDLE; lpszTemplate: LPWSTR;
+ hwndOwner: HWND; dlgprc: DLGPROC; dwInitParam: LPARAM): Integer; stdcall;
+ {$EXTERNALSYM PWLX_DIALOG_BOX_PARAM}
+ PWLX_DIALOG_BOX_INDIRECT_PARAM = function(hWlx, hInst: HANDLE;
+ hDialogTemplate: LPCDLGTEMPLATE; hwndOwner: HWND; dlgprc: DLGPROC;
+ dwInitParam: LPARAM): Integer; stdcall;
+ {$EXTERNALSYM PWLX_DIALOG_BOX_INDIRECT_PARAM}
+ PWLX_SWITCH_DESKTOP_TO_USER = function(hWlx: HANDLE): Integer; stdcall;
+ {$EXTERNALSYM PWLX_SWITCH_DESKTOP_TO_USER}
+ PWLX_SWITCH_DESKTOP_TO_WINLOGON = function(hWlx: HANDLE): Integer; stdcall;
+ {$EXTERNALSYM PWLX_SWITCH_DESKTOP_TO_WINLOGON}
+ PWLX_CHANGE_PASSWORD_NOTIFY = function(hWlx: HANDLE;
+ var pMprInfo: WLX_MPR_NOTIFY_INFO; dwChangeInfo: DWORD): Integer; stdcall;
+ {$EXTERNALSYM PWLX_CHANGE_PASSWORD_NOTIFY}
+ PWLX_GET_SOURCE_DESKTOP = function(hWlx: HANDLE; var ppDesktop: PWLX_DESKTOP): BOOL; stdcall;
+ {$EXTERNALSYM PWLX_GET_SOURCE_DESKTOP}
+ PWLX_SET_RETURN_DESKTOP = function(hWlx: HANDLE; const pDesktop: WLX_DESKTOP): BOOL; stdcall;
+ {$EXTERNALSYM PWLX_SET_RETURN_DESKTOP}
+ PWLX_CREATE_USER_DESKTOP = function(hWlx, hToken: HANDLE; Flags: DWORD;
+ pszDesktopName: PWSTR; var ppDesktop: PWLX_DESKTOP): BOOL; stdcall;
+ {$EXTERNALSYM PWLX_CREATE_USER_DESKTOP}
+
+const
+ WLX_CREATE_INSTANCE_ONLY = $00000001;
+ {$EXTERNALSYM WLX_CREATE_INSTANCE_ONLY}
+ WLX_CREATE_USER = $00000002;
+ {$EXTERNALSYM WLX_CREATE_USER}
+
+type
+ PWLX_CHANGE_PASSWORD_NOTIFY_EX = function(hWlx: HANDLE;
+ const pMprInfo: WLX_MPR_NOTIFY_INFO; dwChangeInfo: DWORD;
+ ProviderName: PWSTR; Reserved: PVOID): Integer; stdcall;
+ {$EXTERNALSYM PWLX_CHANGE_PASSWORD_NOTIFY_EX}
+ PWLX_CLOSE_USER_DESKTOP = function(hWlx: HANDLE; const pDesktop: WLX_DESKTOP;
+ hToken: HANDLE): BOOL; stdcall;
+ {$EXTERNALSYM PWLX_CLOSE_USER_DESKTOP}
+ PWLX_SET_OPTION = function(hWlx: HANDLE; Option: DWORD; Value: ULONG_PTR;
+ var OldValue: ULONG_PTR): BOOL; stdcall;
+ {$EXTERNALSYM PWLX_SET_OPTION}
+ PWLX_GET_OPTION = function(hWlx: HANDLE; Option: DWORD; var Value: ULONG_PTR): BOOL; stdcall;
+ {$EXTERNALSYM PWLX_GET_OPTION}
+ PWLX_WIN31_MIGRATE = procedure(hWlx: HANDLE); stdcall;
+ {$EXTERNALSYM PWLX_WIN31_MIGRATE}
+ PWLX_QUERY_CLIENT_CREDENTIALS = function(var pCred: WLX_CLIENT_CREDENTIALS_INFO_V1_0): BOOL; stdcall;
+ {$EXTERNALSYM PWLX_QUERY_CLIENT_CREDENTIALS}
+ PWLX_QUERY_IC_CREDENTIALS = function(var pCred: WLX_CLIENT_CREDENTIALS_INFO_V1_0): BOOL; stdcall;
+ {$EXTERNALSYM PWLX_QUERY_IC_CREDENTIALS}
+ PWLX_QUERY_TS_LOGON_CREDENTIALS = function(pCred: PWLX_CLIENT_CREDENTIALS_INFO_V2_0): BOOL; stdcall;
+ {$EXTERNALSYM PWLX_QUERY_TS_LOGON_CREDENTIALS}
+ PWLX_DISCONNECT = function : BOOL; stdcall;
+ {$EXTERNALSYM PWLX_DISCONNECT}
+ PWLX_QUERY_TERMINAL_SERVICES_DATA = function(hWlx: HANDLE;
+ var pTSData: WLX_TERMINAL_SERVICES_DATA; UserName, Domain: PWCHAR): DWORD; stdcall;
+ {$EXTERNALSYM PWLX_DISCONNECT}
+ PWLX_QUERY_CONSOLESWITCH_CREDENTIALS = function(pCred: PWLX_CONSOLESWITCH_CREDENTIALS_INFO_V1_0): DWORD; stdcall;
+ {$EXTERNALSYM PWLX_QUERY_CONSOLESWITCH_CREDENTIALS}
+
+//
+// Options that can be get or set:
+//
+
+const
+ WLX_OPTION_USE_CTRL_ALT_DEL = $00000001;
+ {$EXTERNALSYM WLX_OPTION_USE_CTRL_ALT_DEL}
+ WLX_OPTION_CONTEXT_POINTER = $00000002;
+ {$EXTERNALSYM WLX_OPTION_CONTEXT_POINTER}
+ WLX_OPTION_USE_SMART_CARD = $00000003;
+ {$EXTERNALSYM WLX_OPTION_USE_SMART_CARD}
+ WLX_OPTION_FORCE_LOGOFF_TIME = $00000004;
+ {$EXTERNALSYM WLX_OPTION_FORCE_LOGOFF_TIME}
+ WLX_OPTION_IGNORE_AUTO_LOGON = $00000008;
+ {$EXTERNALSYM WLX_OPTION_IGNORE_AUTO_LOGON}
+ WLX_OPTION_NO_SWITCH_ON_SAS = $00000009;
+ {$EXTERNALSYM WLX_OPTION_NO_SWITCH_ON_SAS}
+
+//
+// Options that can be queried only:
+//
+
+ WLX_OPTION_SMART_CARD_PRESENT = $00010001;
+ {$EXTERNALSYM WLX_OPTION_SMART_CARD_PRESENT}
+ WLX_OPTION_SMART_CARD_INFO = $00010002;
+ {$EXTERNALSYM WLX_OPTION_SMART_CARD_INFO}
+ WLX_OPTION_DISPATCH_TABLE_SIZE = $00010003;
+ {$EXTERNALSYM WLX_OPTION_DISPATCH_TABLE_SIZE}
+
+////////////////////////////////////////////////////////////////////////
+// //
+// Function dispatch tables. //
+// One of the following tables will be passed to the GINA DLL //
+// in the WlxInitialize() call during initialization. //
+// //
+////////////////////////////////////////////////////////////////////////
+
+type
+ PWLX_DISPATCH_VERSION_1_0 = ^WLX_DISPATCH_VERSION_1_0;
+ {$EXTERNALSYM PWLX_DISPATCH_VERSION_1_0}
+ _WLX_DISPATCH_VERSION_1_0 = record
+ WlxUseCtrlAltDel: PWLX_USE_CTRL_ALT_DEL;
+ WlxSetContextPointer: PWLX_SET_CONTEXT_POINTER;
+ WlxSasNotify: PWLX_SAS_NOTIFY;
+ WlxSetTimeout: PWLX_SET_TIMEOUT;
+ WlxAssignShellProtection: PWLX_ASSIGN_SHELL_PROTECTION;
+ WlxMessageBox: PWLX_MESSAGE_BOX;
+ WlxDialogBox: PWLX_DIALOG_BOX;
+ WlxDialogBoxParam: PWLX_DIALOG_BOX_PARAM;
+ WlxDialogBoxIndirect: PWLX_DIALOG_BOX_INDIRECT;
+ WlxDialogBoxIndirectParam: PWLX_DIALOG_BOX_INDIRECT_PARAM;
+ WlxSwitchDesktopToUser: PWLX_SWITCH_DESKTOP_TO_USER;
+ WlxSwitchDesktopToWinlogon: PWLX_SWITCH_DESKTOP_TO_WINLOGON;
+ WlxChangePasswordNotify: PWLX_CHANGE_PASSWORD_NOTIFY;
+ end;
+ {$EXTERNALSYM _WLX_DISPATCH_VERSION_1_0}
+ WLX_DISPATCH_VERSION_1_0 = _WLX_DISPATCH_VERSION_1_0;
+ {$EXTERNALSYM WLX_DISPATCH_VERSION_1_0}
+ TWlxDispatchVersion1_0 = WLX_DISPATCH_VERSION_1_0;
+ PWlxDispatchVersion1_0 = PWLX_DISPATCH_VERSION_1_0;
+
+ PWLX_DISPATCH_VERSION_1_1 = ^WLX_DISPATCH_VERSION_1_1;
+ {$EXTERNALSYM PWLX_DISPATCH_VERSION_1_1}
+ _WLX_DISPATCH_VERSION_1_1 = record
+ WlxUseCtrlAltDel: PWLX_USE_CTRL_ALT_DEL;
+ WlxSetContextPointer: PWLX_SET_CONTEXT_POINTER;
+ WlxSasNotify: PWLX_SAS_NOTIFY;
+ WlxSetTimeout: PWLX_SET_TIMEOUT;
+ WlxAssignShellProtection: PWLX_ASSIGN_SHELL_PROTECTION;
+ WlxMessageBox: PWLX_MESSAGE_BOX;
+ WlxDialogBox: PWLX_DIALOG_BOX;
+ WlxDialogBoxParam: PWLX_DIALOG_BOX_PARAM;
+ WlxDialogBoxIndirect: PWLX_DIALOG_BOX_INDIRECT;
+ WlxDialogBoxIndirectParam: PWLX_DIALOG_BOX_INDIRECT_PARAM;
+ WlxSwitchDesktopToUser: PWLX_SWITCH_DESKTOP_TO_USER;
+ WlxSwitchDesktopToWinlogon: PWLX_SWITCH_DESKTOP_TO_WINLOGON;
+ WlxChangePasswordNotify: PWLX_CHANGE_PASSWORD_NOTIFY;
+ WlxGetSourceDesktop: PWLX_GET_SOURCE_DESKTOP;
+ WlxSetReturnDesktop: PWLX_SET_RETURN_DESKTOP;
+ WlxCreateUserDesktop: PWLX_CREATE_USER_DESKTOP;
+ WlxChangePasswordNotifyEx: PWLX_CHANGE_PASSWORD_NOTIFY_EX;
+ end;
+ {$EXTERNALSYM _WLX_DISPATCH_VERSION_1_1}
+ WLX_DISPATCH_VERSION_1_1 = _WLX_DISPATCH_VERSION_1_1;
+ {$EXTERNALSYM WLX_DISPATCH_VERSION_1_1}
+ TWlxDispatchVersion1_1 = WLX_DISPATCH_VERSION_1_1;
+ PWlxDispatchVersion1_1 = PWLX_DISPATCH_VERSION_1_1;
+
+ PWLX_DISPATCH_VERSION_1_2 = ^WLX_DISPATCH_VERSION_1_2;
+ {$EXTERNALSYM PWLX_DISPATCH_VERSION_1_2}
+ _WLX_DISPATCH_VERSION_1_2 = record
+ WlxUseCtrlAltDel: PWLX_USE_CTRL_ALT_DEL;
+ WlxSetContextPointer: PWLX_SET_CONTEXT_POINTER;
+ WlxSasNotify: PWLX_SAS_NOTIFY;
+ WlxSetTimeout: PWLX_SET_TIMEOUT;
+ WlxAssignShellProtection: PWLX_ASSIGN_SHELL_PROTECTION;
+ WlxMessageBox: PWLX_MESSAGE_BOX;
+ WlxDialogBox: PWLX_DIALOG_BOX;
+ WlxDialogBoxParam: PWLX_DIALOG_BOX_PARAM;
+ WlxDialogBoxIndirect: PWLX_DIALOG_BOX_INDIRECT;
+ WlxDialogBoxIndirectParam: PWLX_DIALOG_BOX_INDIRECT_PARAM;
+ WlxSwitchDesktopToUser: PWLX_SWITCH_DESKTOP_TO_USER;
+ WlxSwitchDesktopToWinlogon: PWLX_SWITCH_DESKTOP_TO_WINLOGON;
+ WlxChangePasswordNotify: PWLX_CHANGE_PASSWORD_NOTIFY;
+ WlxGetSourceDesktop: PWLX_GET_SOURCE_DESKTOP;
+ WlxSetReturnDesktop: PWLX_SET_RETURN_DESKTOP;
+ WlxCreateUserDesktop: PWLX_CREATE_USER_DESKTOP;
+ WlxChangePasswordNotifyEx: PWLX_CHANGE_PASSWORD_NOTIFY_EX;
+ WlxCloseUserDesktop : PWLX_CLOSE_USER_DESKTOP;
+ end;
+ {$EXTERNALSYM _WLX_DISPATCH_VERSION_1_2}
+ WLX_DISPATCH_VERSION_1_2 = _WLX_DISPATCH_VERSION_1_2;
+ {$EXTERNALSYM WLX_DISPATCH_VERSION_1_2}
+ TWlxDispatchVersion1_2 = WLX_DISPATCH_VERSION_1_2;
+ PWlxDispatchVersion1_2 = PWLX_DISPATCH_VERSION_1_2;
+
+ PWLX_DISPATCH_VERSION_1_3 = ^WLX_DISPATCH_VERSION_1_3;
+ {$EXTERNALSYM PWLX_DISPATCH_VERSION_1_3}
+ _WLX_DISPATCH_VERSION_1_3 = record
+ WlxUseCtrlAltDel: PWLX_USE_CTRL_ALT_DEL;
+ WlxSetContextPointer: PWLX_SET_CONTEXT_POINTER;
+ WlxSasNotify: PWLX_SAS_NOTIFY;
+ WlxSetTimeout: PWLX_SET_TIMEOUT;
+ WlxAssignShellProtection: PWLX_ASSIGN_SHELL_PROTECTION;
+ WlxMessageBox: PWLX_MESSAGE_BOX;
+ WlxDialogBox: PWLX_DIALOG_BOX;
+ WlxDialogBoxParam: PWLX_DIALOG_BOX_PARAM;
+ WlxDialogBoxIndirect: PWLX_DIALOG_BOX_INDIRECT;
+ WlxDialogBoxIndirectParam: PWLX_DIALOG_BOX_INDIRECT_PARAM;
+ WlxSwitchDesktopToUser: PWLX_SWITCH_DESKTOP_TO_USER;
+ WlxSwitchDesktopToWinlogon: PWLX_SWITCH_DESKTOP_TO_WINLOGON;
+ WlxChangePasswordNotify: PWLX_CHANGE_PASSWORD_NOTIFY;
+ WlxGetSourceDesktop: PWLX_GET_SOURCE_DESKTOP;
+ WlxSetReturnDesktop: PWLX_SET_RETURN_DESKTOP;
+ WlxCreateUserDesktop: PWLX_CREATE_USER_DESKTOP;
+ WlxChangePasswordNotifyEx: PWLX_CHANGE_PASSWORD_NOTIFY_EX;
+ WlxCloseUserDesktop : PWLX_CLOSE_USER_DESKTOP;
+ WlxSetOption: PWLX_SET_OPTION;
+ WlxGetOption: PWLX_GET_OPTION;
+ WlxWin31Migrate: PWLX_WIN31_MIGRATE;
+ WlxQueryClientCredentials: PWLX_QUERY_CLIENT_CREDENTIALS;
+ WlxQueryInetConnectorCredentials: PWLX_QUERY_IC_CREDENTIALS;
+ WlxDisconnect: PWLX_DISCONNECT;
+ WlxQueryTerminalServicesData: PWLX_QUERY_TERMINAL_SERVICES_DATA;
+ end;
+ {$EXTERNALSYM _WLX_DISPATCH_VERSION_1_3}
+ WLX_DISPATCH_VERSION_1_3 = _WLX_DISPATCH_VERSION_1_3;
+ {$EXTERNALSYM WLX_DISPATCH_VERSION_1_3}
+ TWlxDispatchVersion1_3 = WLX_DISPATCH_VERSION_1_3;
+ PWlxDispatchVersion1_3 = PWLX_DISPATCH_VERSION_1_3;
+
+ PWLX_DISPATCH_VERSION_1_4 = ^WLX_DISPATCH_VERSION_1_4;
+ {$EXTERNALSYM PWLX_DISPATCH_VERSION_1_4}
+ _WLX_DISPATCH_VERSION_1_4 = record
+ WlxUseCtrlAltDel: PWLX_USE_CTRL_ALT_DEL;
+ WlxSetContextPointer: PWLX_SET_CONTEXT_POINTER;
+ WlxSasNotify: PWLX_SAS_NOTIFY;
+ WlxSetTimeout: PWLX_SET_TIMEOUT;
+ WlxAssignShellProtection: PWLX_ASSIGN_SHELL_PROTECTION;
+ WlxMessageBox: PWLX_MESSAGE_BOX;
+ WlxDialogBox: PWLX_DIALOG_BOX;
+ WlxDialogBoxParam: PWLX_DIALOG_BOX_PARAM;
+ WlxDialogBoxIndirect: PWLX_DIALOG_BOX_INDIRECT;
+ WlxDialogBoxIndirectParam: PWLX_DIALOG_BOX_INDIRECT_PARAM;
+ WlxSwitchDesktopToUser: PWLX_SWITCH_DESKTOP_TO_USER;
+ WlxSwitchDesktopToWinlogon: PWLX_SWITCH_DESKTOP_TO_WINLOGON;
+ WlxChangePasswordNotify: PWLX_CHANGE_PASSWORD_NOTIFY;
+ WlxGetSourceDesktop: PWLX_GET_SOURCE_DESKTOP;
+ WlxSetReturnDesktop: PWLX_SET_RETURN_DESKTOP;
+ WlxCreateUserDesktop: PWLX_CREATE_USER_DESKTOP;
+ WlxChangePasswordNotifyEx: PWLX_CHANGE_PASSWORD_NOTIFY_EX;
+ WlxCloseUserDesktop : PWLX_CLOSE_USER_DESKTOP;
+ WlxSetOption: PWLX_SET_OPTION;
+ WlxGetOption: PWLX_GET_OPTION;
+ WlxWin31Migrate: PWLX_WIN31_MIGRATE;
+ WlxQueryClientCredentials: PWLX_QUERY_CLIENT_CREDENTIALS;
+ WlxQueryInetConnectorCredentials: PWLX_QUERY_IC_CREDENTIALS;
+ WlxDisconnect: PWLX_DISCONNECT;
+ WlxQueryTerminalServicesData: PWLX_QUERY_TERMINAL_SERVICES_DATA;
+ WlxQueryConsoleSwitchCredentials: PWLX_QUERY_CONSOLESWITCH_CREDENTIALS;
+ WlxQueryTsLogonCredentials: PWLX_QUERY_TS_LOGON_CREDENTIALS;
+ end;
+ {$EXTERNALSYM _WLX_DISPATCH_VERSION_1_4}
+ WLX_DISPATCH_VERSION_1_4 = _WLX_DISPATCH_VERSION_1_4;
+ {$EXTERNALSYM WLX_DISPATCH_VERSION_1_4}
+ TWlxDispatchVersion1_4 = WLX_DISPATCH_VERSION_1_4;
+ PWlxDispatchVersion1_4 = PWLX_DISPATCH_VERSION_1_4;
+
+//
+// Non-GINA notification DLLs
+//
+
+ PFNMSGECALLBACK = function(bVerbose: BOOL; lpMessage: LPWSTR): DWORD; stdcall;
+ {$EXTERNALSYM PFNMSGECALLBACK}
+ TFnMsgeCallback = PFNMSGECALLBACK;
+
+ PWLX_NOTIFICATION_INFO = ^WLX_NOTIFICATION_INFO;
+ {$EXTERNALSYM PWLX_NOTIFICATION_INFO}
+ _WLX_NOTIFICATION_INFO = record
+ Size: ULONG;
+ Flags: ULONG;
+ UserName: PWSTR;
+ Domain: PWSTR;
+ WindowStation: PWSTR;
+ hToken: HANDLE;
+ hDesktop: HDESK;
+ pStatusCallback: PFNMSGECALLBACK;
+ end;
+ {$EXTERNALSYM _WLX_NOTIFICATION_INFO}
+ WLX_NOTIFICATION_INFO = _WLX_NOTIFICATION_INFO;
+ {$EXTERNALSYM WLX_NOTIFICATION_INFO}
+ TWlxNotificationInfo = WLX_NOTIFICATION_INFO;
+ PWlxNotificationInfo = PWLX_NOTIFICATION_INFO;
+
+implementation
+
+{$IFDEF MSGINA_IMPORT}
+
+const
+ msgina = 'msgina.dll';
+
+{$IFDEF DYNAMIC_LINK}
+
+{$IFDEF MSGINA1_0}
+
+var
+ _WlxNegotiate: Pointer;
+
+function WlxNegotiate;
+begin
+ GetProcedureAddress(_WlxNegotiate, msgina, 'WlxNegotiate');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WlxNegotiate]
+ end;
+end;
+
+var
+ _WlxInitialize: Pointer;
+
+function WlxInitialize;
+begin
+ GetProcedureAddress(_WlxInitialize, msgina, 'WlxInitialize');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WlxInitialize]
+ end;
+end;
+
+var
+ _WlxDisplaySASNotice: Pointer;
+
+procedure WlxDisplaySASNotice;
+begin
+ GetProcedureAddress(_WlxDisplaySASNotice, msgina, 'WlxDisplaySASNotice');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WlxDisplaySASNotice]
+ end;
+end;
+
+var
+ _WlxLoggedOutSAS: Pointer;
+
+function WlxLoggedOutSAS;
+begin
+ GetProcedureAddress(_WlxLoggedOutSAS, msgina, 'WlxLoggedOutSAS');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WlxLoggedOutSAS]
+ end;
+end;
+
+var
+ _WlxActivateUserShell: Pointer;
+
+function WlxActivateUserShell;
+begin
+ GetProcedureAddress(_WlxActivateUserShell, msgina, 'WlxActivateUserShell');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WlxActivateUserShell]
+ end;
+end;
+
+var
+ _WlxLoggedOnSAS: Pointer;
+
+function WlxLoggedOnSAS;
+begin
+ GetProcedureAddress(_WlxLoggedOnSAS, msgina, 'WlxLoggedOnSAS');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WlxLoggedOnSAS]
+ end;
+end;
+
+var
+ _WlxDisplayLockedNotice: Pointer;
+
+procedure WlxDisplayLockedNotice;
+begin
+ GetProcedureAddress(_WlxDisplayLockedNotice, msgina, 'WlxDisplayLockedNotice');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WlxDisplayLockedNotice]
+ end;
+end;
+
+var
+ _WlxWkstaLockedSAS: Pointer;
+
+function WlxWkstaLockedSAS;
+begin
+ GetProcedureAddress(_WlxWkstaLockedSAS, msgina, 'WlxWkstaLockedSAS');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WlxWkstaLockedSAS]
+ end;
+end;
+
+var
+ _WlxIsLockOk: Pointer;
+
+function WlxIsLockOk;
+begin
+ GetProcedureAddress(_WlxIsLockOk, msgina, 'WlxIsLockOk');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WlxIsLockOk]
+ end;
+end;
+
+var
+ _WlxIsLogoffOk: Pointer;
+
+function WlxIsLogoffOk;
+begin
+ GetProcedureAddress(_WlxIsLogoffOk, msgina, 'WlxIsLogoffOk');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WlxIsLogoffOk]
+ end;
+end;
+
+var
+ _WlxLogoff: Pointer;
+
+procedure WlxLogoff;
+begin
+ GetProcedureAddress(_WlxLogoff, msgina, 'WlxLogoff');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WlxLogoff]
+ end;
+end;
+
+var
+ _WlxShutdown: Pointer;
+
+procedure WlxShutdown;
+begin
+ GetProcedureAddress(_WlxShutdown, msgina, 'WlxShutdown');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WlxShutdown]
+ end;
+end;
+
+{$ENDIF MSGINA1_0}
+
+{$IFDEF MSGINA1_1}
+
+var
+ _WlxScreenSaverNotify: Pointer;
+
+function WlxScreenSaverNotify;
+begin
+ GetProcedureAddress(_WlxScreenSaverNotify, msgina, 'WlxScreenSaverNotify');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WlxScreenSaverNotify]
+ end;
+end;
+
+var
+ _WlxStartApplication: Pointer;
+
+function WlxStartApplication;
+begin
+ GetProcedureAddress(_WlxStartApplication, msgina, 'WlxStartApplication');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WlxStartApplication]
+ end;
+end;
+
+{$ENDIF MSGINA1_1}
+
+{$IFDEF MSGINA1_3}
+
+var
+ _WlxNetworkProviderLoad: Pointer;
+
+function WlxNetworkProviderLoad;
+begin
+ GetProcedureAddress(_WlxNetworkProviderLoad, msgina, 'WlxNetworkProviderLoad');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WlxNetworkProviderLoad]
+ end;
+end;
+
+var
+ _WlxDisplayStatusMessage: Pointer;
+
+function WlxDisplayStatusMessage;
+begin
+ GetProcedureAddress(_WlxDisplayStatusMessage, msgina, 'WlxDisplayStatusMessage');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WlxDisplayStatusMessage]
+ end;
+end;
+
+var
+ _WlxGetStatusMessage: Pointer;
+
+function WlxGetStatusMessage;
+begin
+ GetProcedureAddress(_WlxGetStatusMessage, msgina, 'WlxGetStatusMessage');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WlxGetStatusMessage]
+ end;
+end;
+
+var
+ _WlxRemoveStatusMessage: Pointer;
+
+function WlxRemoveStatusMessage;
+begin
+ GetProcedureAddress(_WlxRemoveStatusMessage, msgina, 'WlxRemoveStatusMessage');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WlxRemoveStatusMessage]
+ end;
+end;
+
+{$ENDIF MSGINA1_3}
+
+{$IFDEF MSGINA1_4}
+
+var
+ _WlxGetConsoleSwitchCredentials: Pointer;
+
+function WlxGetConsoleSwitchCredentials;
+begin
+ GetProcedureAddress(_WlxGetConsoleSwitchCredentials, msgina, 'WlxGetConsoleSwitchCredentials');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WlxGetConsoleSwitchCredentials]
+ end;
+end;
+
+var
+ _WlxReconnectNotify: Pointer;
+
+procedure WlxReconnectNotify;
+begin
+ GetProcedureAddress(_WlxReconnectNotify, msgina, 'WlxReconnectNotify');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WlxReconnectNotify]
+ end;
+end;
+
+var
+ _WlxDisconnectNotify: Pointer;
+
+procedure WlxDisconnectNotify;
+begin
+ GetProcedureAddress(_WlxDisconnectNotify, msgina, 'WlxDisconnectNotify');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WlxDisconnectNotify]
+ end;
+end;
+
+{$ENDIF MSGINA1_4}
+
+{$ELSE}
+
+{$IFDEF MSGINA1_0}
+function WlxNegotiate; external msgina name 'WlxNegotiate';
+function WlxInitialize; external msgina name 'WlxInitialize';
+procedure WlxDisplaySASNotice; external msgina name 'WlxDisplaySASNotice';
+function WlxLoggedOutSAS; external msgina name 'WlxLoggedOutSAS';
+function WlxActivateUserShell; external msgina name 'WlxActivateUserShell';
+function WlxLoggedOnSAS; external msgina name 'WlxLoggedOnSAS';
+procedure WlxDisplayLockedNotice; external msgina name 'WlxDisplayLockedNotice';
+function WlxWkstaLockedSAS; external msgina name 'WlxWkstaLockedSAS';
+function WlxIsLockOk; external msgina name 'WlxIsLockOk';
+function WlxIsLogoffOk; external msgina name 'WlxIsLogoffOk';
+procedure WlxLogoff; external msgina name 'WlxLogoff';
+procedure WlxShutdown; external msgina name 'WlxShutdown';
+{$ENDIF MSGINA1_0}
+{$IFDEF MSGINA1_1}
+function WlxScreenSaverNotify; external msgina name 'WlxScreenSaverNotify';
+function WlxStartApplication; external msgina name 'WlxStartApplication';
+{$ENDIF MSGINA1_1}
+{$IFDEF MSGINA1_3}
+function WlxNetworkProviderLoad; external msgina name 'WlxNetworkProviderLoad';
+function WlxDisplayStatusMessage; external msgina name 'WlxDisplayStatusMessage';
+function WlxGetStatusMessage; external msgina name 'WlxGetStatusMessage';
+function WlxRemoveStatusMessage; external msgina name 'WlxRemoveStatusMessage';
+{$ENDIF MSGINA1_3}
+{$IFDEF MSGINA1_4}
+function WlxGetConsoleSwitchCredentials; external msgina name 'WlxGetConsoleSwitchCredentials';
+procedure WlxReconnectNotify; external msgina name 'WlxReconnectNotify';
+procedure WlxDisconnectNotify; external msgina name 'WlxDisconnectNotify';
+{$ENDIF MSGINA1_4}
+
+{$ENDIF DYNAMIC_LINK}
+
+{$ENDIF MSGINA_IMPORT}
+
+end.
diff --git a/packages/extra/winunits/jwawmistr.pas b/packages/extra/winunits/jwawmistr.pas
index 94324d1509..f069c85856 100644
--- a/packages/extra/winunits/jwawmistr.pas
+++ b/packages/extra/winunits/jwawmistr.pas
@@ -1,604 +1,604 @@
-{******************************************************************************}
-{ }
-{ WMI Structure Definitions API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: wmistr.h, released November 2002. The original Pascal }
-{ code is: WmiStr.pas, released April 2002. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwawmistr.pas,v 1.1 2005/04/04 07:56:11 marco Exp $
-
-unit JwaWmiStr;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "wmistr.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaWinType, JwaWinNT;
-
-//
-// WNODE definition
-
-type
- _WNODE_HEADER = record
- BufferSize: ULONG; // Size of entire buffer inclusive of this ULONG
- ProviderId: ULONG; // Provider Id of driver returning this buffer
- U1: record
- case Integer of
- 0: (
- HistoricalContext: ULONG64); // Logger use
- 1: (
- Version: ULONG; // Reserved
- Linkage: ULONG); // Linkage field reserved for WMI
- end;
- u2: record
- case Integer of
- 0: (CountLost: ULONG); // Reserved
- 1: (KernelHandle: HANDLE); // Kernel handle for data block
- 2: (TimeStamp: LARGE_INTEGER); // Timestamp as returned in units of 100ns
- // since 1/1/1601
- end;
- Guid: GUID; // Guid for data block returned with results
- ClientContext: ULONG;
- Flags: ULONG; // Flags, see below
- end;
- {$EXTERNALSYM _WNODE_HEADER}
- WNODE_HEADER = _WNODE_HEADER;
- {$EXTERNALSYM WNODE_HEADER}
- PWNODE_HEADER = ^WNODE_HEADER;
- {$EXTERNALSYM PWNODE_HEADER}
- TWNodeHeader = WNODE_HEADER;
- PWNodeHeader = PWNODE_HEADER;
-
-//
-// WNODE_HEADER flags are defined as follows
-
-const
- WNODE_FLAG_ALL_DATA = $00000001; // set for WNODE_ALL_DATA
- {$EXTERNALSYM WNODE_FLAG_ALL_DATA}
- WNODE_FLAG_SINGLE_INSTANCE = $00000002; // set for WNODE_SINGLE_INSTANCE
- {$EXTERNALSYM WNODE_FLAG_SINGLE_INSTANCE}
- WNODE_FLAG_SINGLE_ITEM = $00000004; // set for WNODE_SINGLE_ITEM
- {$EXTERNALSYM WNODE_FLAG_SINGLE_ITEM}
- WNODE_FLAG_EVENT_ITEM = $00000008; // set for WNODE_EVENT_ITEM
- {$EXTERNALSYM WNODE_FLAG_EVENT_ITEM}
-
- // Set if data block size is
- // identical for all instances
- // (used with WNODE_ALL_DATA
- // only)
- WNODE_FLAG_FIXED_INSTANCE_SIZE = $00000010;
- {$EXTERNALSYM WNODE_FLAG_FIXED_INSTANCE_SIZE}
-
- WNODE_FLAG_TOO_SMALL = $00000020; // set for WNODE_TOO_SMALL
- {$EXTERNALSYM WNODE_FLAG_TOO_SMALL}
-
- // Set when a data provider returns a
- // WNODE_ALL_DATA in which the number of
- // instances and their names returned
- // are identical to those returned from the
- // previous WNODE_ALL_DATA query. Only data
- // blocks registered with dynamic instance
- // names should use this flag.
-
- WNODE_FLAG_INSTANCES_SAME = $00000040;
- {$EXTERNALSYM WNODE_FLAG_INSTANCES_SAME}
-
- // Instance names are not specified in
- // WNODE_ALL_DATA; values specified at
- // registration are used instead. Always
- // set for guids registered with static
- // instance names
-
- WNODE_FLAG_STATIC_INSTANCE_NAMES = $00000080;
- {$EXTERNALSYM WNODE_FLAG_STATIC_INSTANCE_NAMES}
-
- WNODE_FLAG_INTERNAL = $00000100; // Used internally by WMI
- {$EXTERNALSYM WNODE_FLAG_INTERNAL}
-
- // timestamp should not be modified by
- // a historical logger
-
- WNODE_FLAG_USE_TIMESTAMP = $00000200;
- {$EXTERNALSYM WNODE_FLAG_USE_TIMESTAMP}
- WNODE_FLAG_PERSIST_EVENT = $00000400;
- {$EXTERNALSYM WNODE_FLAG_PERSIST_EVENT}
-
- WNODE_FLAG_EVENT_REFERENCE = $00002000;
- {$EXTERNALSYM WNODE_FLAG_EVENT_REFERENCE}
-
-// Set if Instance names are ansi. Only set when returning from
-// WMIQuerySingleInstanceA and WMIQueryAllDataA
-
- WNODE_FLAG_ANSI_INSTANCENAMES = $00004000;
- {$EXTERNALSYM WNODE_FLAG_ANSI_INSTANCENAMES}
-
-// Set if WNODE is a method call
-
- WNODE_FLAG_METHOD_ITEM = $00008000;
- {$EXTERNALSYM WNODE_FLAG_METHOD_ITEM}
-
-// Set if instance names originated from a PDO
-
- WNODE_FLAG_PDO_INSTANCE_NAMES = $00010000;
- {$EXTERNALSYM WNODE_FLAG_PDO_INSTANCE_NAMES}
-
-// The second byte, except the first bit is used exclusively for tracing
-
- WNODE_FLAG_TRACED_GUID = $00020000; // denotes a trace
- {$EXTERNALSYM WNODE_FLAG_TRACED_GUID}
-
- WNODE_FLAG_LOG_WNODE = $00040000; // request to log Wnode
- {$EXTERNALSYM WNODE_FLAG_LOG_WNODE}
-
- WNODE_FLAG_USE_GUID_PTR = $00080000; // Guid is actually a pointer
- {$EXTERNALSYM WNODE_FLAG_USE_GUID_PTR}
-
- WNODE_FLAG_USE_MOF_PTR = $00100000; // MOF data are dereferenced
- {$EXTERNALSYM WNODE_FLAG_USE_MOF_PTR}
-
- WNODE_FLAG_NO_HEADER = $00200000; // Trace without header
- {$EXTERNALSYM WNODE_FLAG_NO_HEADER}
-
-// Set for events that are WNODE_EVENT_REFERENCE
-// Mask for event severity level. Level 0xff is the most severe type of event
-
- WNODE_FLAG_SEVERITY_MASK = DWORD($ff000000);
- {$EXTERNALSYM WNODE_FLAG_SEVERITY_MASK}
-
-//
-// This structure is used within the WNODE_ALL_DATA when the data blocks
-// for the different instances are different lengths. If the data blocks
-// for the different instances are identical lengths then
-// WNODE_FLAG_FIXED_INSTANCE_SIZE should be set and FixedInstanceSize
-// set to the common data block size.
-
-type
- OFFSETINSTANCEDATAANDLENGTH = record
- OffsetInstanceData: ULONG; // Offset from beginning of WNODE_ALL_DATA
- // to Data block for instance
- LengthInstanceData: ULONG; // Length of data block for instance
- end;
- {$EXTERNALSYM OFFSETINSTANCEDATAANDLENGTH}
- POFFSETINSTANCEDATAANDLENGTH = ^OFFSETINSTANCEDATAANDLENGTH;
- {$EXTERNALSYM POFFSETINSTANCEDATAANDLENGTH}
- TOffsetInstanceDataAndLength = OFFSETINSTANCEDATAANDLENGTH;
-
- PWNODE_ALL_DATA = ^WNODE_ALL_DATA;
- {$EXTERNALSYM PWNODE_ALL_DATA}
- tagWNODE_ALL_DATA = record
- WnodeHeader: WNODE_HEADER;
- DataBlockOffset: ULONG; // Offset from begin of WNODE to first data block
- InstanceCount: ULONG; // Count of instances whose data follows.
- // Offset to an array of offsets to the instance names
- OffsetInstanceNameOffsets: ULONG;
- // If WNODE_FLAG_FIXED_INSTANCE_SIZE is set in Flags then
- // FixedInstanceSize specifies the size of each data block. In this case
- // there is one ULONG followed by the data blocks.
- // If WNODE_FLAG_FIXED_INSTANCE_SIZE is not set
- // then OffsetInstanceDataAndLength
- // is an array of OFFSETINSTANCEDATAANDLENGTH that specifies the
- // offsets and lengths of the data blocks for each instance.
- case Integer of
- 0: (FixedInstanceSize: ULONG);
- 1: (OffsetInstanceDataAndLength: POFFSETINSTANCEDATAANDLENGTH);
- // [InstanceCount]
-
- // padding so that first data block begins on a 8 byte boundry
- // data blocks and instance names for all instances
- end;
- {$EXTERNALSYM tagWNODE_ALL_DATA}
- WNODE_ALL_DATA = tagWNODE_ALL_DATA;
- {$EXTERNALSYM WNODE_ALL_DATA}
- TWNodeAllData = WNODE_ALL_DATA;
- PWNodeAllData = PWNODE_ALL_DATA;
-
- PWNODE_SINGLE_INSTANCE = ^WNODE_SINGLE_INSTANCE;
- {$EXTERNALSYM PWNODE_SINGLE_INSTANCE}
- tagWNODE_SINGLE_INSTANCE = record
- WnodeHeader: _WNODE_HEADER;
- // Offset from beginning of WNODE_SINGLE_INSTANCE
- // to instance name. Use when
- // WNODE_FLAG_STATIC_INSTANCE_NAMES is reset
- // (Dynamic instance names)
- OffsetInstanceName: ULONG;
- // Instance index when
- // WNODE_FLAG_STATIC_INSTANCE_NAME is set
- InstanceIndex: ULONG; // (Static Instance Names)
- DataBlockOffset: ULONG; // offset from beginning of WNODE to data block
- SizeDataBlock: ULONG; // Size of data block for instance
- VariableData: PUCHAR;
- // instance names and padding so data block begins on 8 byte boundry
- // data block
- end;
- {$EXTERNALSYM tagWNODE_SINGLE_INSTANCE}
- WNODE_SINGLE_INSTANCE = tagWNODE_SINGLE_INSTANCE;
- {$EXTERNALSYM WNODE_SINGLE_INSTANCE}
- TWNodeSingleInstance = WNODE_SINGLE_INSTANCE;
- PWNodeSingleInstance = PWNODE_SINGLE_INSTANCE;
-
- PWNODE_SINGLE_ITEM = ^WNODE_SINGLE_ITEM;
- {$EXTERNALSYM PWNODE_SINGLE_ITEM}
- tagWNODE_SINGLE_ITEM = record
- WnodeHeader: WNODE_HEADER;
- // Offset from beginning of WNODE_SINGLE_INSTANCE
- // to instance name. Examine when
- // WNODE_FLAG_STATIC_INSTANCE_NAME is reset
- // (Dynamic instance names)
- OffsetInstanceName: ULONG;
- // Instance index when
- // WNODE_FLAG_STATIC_INSTANCE_NAME
- InstanceIndex: ULONG; // set (Static Instance Names)
- ItemId: ULONG; // Item Id for data item being set
- DataBlockOffset: ULONG; // offset from WNODE begin to data item value
- SizeDataItem: ULONG; // Size of data item
- VariableData: PUCHAR;
- // instance names and padding so data value begins on 8 byte boundry
- // data item value
- end;
- {$EXTERNALSYM tagWNODE_SINGLE_ITEM}
- WNODE_SINGLE_ITEM = tagWNODE_SINGLE_ITEM;
- {$EXTERNALSYM WNODE_SINGLE_ITEM}
- TWNodeSingleItem = WNODE_SINGLE_ITEM;
- PWNodeSingleItem = PWNODE_SINGLE_ITEM;
-
- PWNODE_METHOD_ITEM = ^WNODE_METHOD_ITEM;
- {$EXTERNALSYM PWNODE_METHOD_ITEM}
- tagWNODE_METHOD_ITEM = record
- WnodeHeader: WNODE_HEADER;
- // Offset from beginning of WNODE_METHOD_ITEM
- // to instance name. Examine when
- // WNODE_FLAG_STATIC_INSTANCE_NAME is reset
- // (Dynamic instance names)
- OffsetInstanceName: ULONG;
- // Instance index when
- // WNODE_FLAG_STATIC_INSTANCE_NAME
- InstanceIndex: ULONG; // set (Static Instance Names)
- MethodId: ULONG; // Method id of method being called
- DataBlockOffset: ULONG; // On Entry: offset from WNODE to input data
- // On Return: offset from WNODE to input and
- // output data blocks
- SizeDataBlock: ULONG; // On Entry: Size of input data, 0 if no input
- // data
- // On Return: Size of output data, 0 if no output
- // data
- VariableData: PUCHAR;
- // instance names and padding so data value begins on 8 byte boundry
- // data item value
- end;
- {$EXTERNALSYM tagWNODE_METHOD_ITEM}
- WNODE_METHOD_ITEM = tagWNODE_METHOD_ITEM;
- {$EXTERNALSYM WNODE_METHOD_ITEM}
- TWNodeMethodItem = WNODE_METHOD_ITEM;
- PWNodeMethodItem = PWNODE_METHOD_ITEM;
-
- PWNODE_EVENT_ITEM = ^WNODE_EVENT_ITEM;
- {$EXTERNALSYM PWNODE_EVENT_ITEM}
- tagWNODE_EVENT_ITEM = record
- WnodeHeader: WNODE_HEADER;
- // Different data could be here depending upon the flags set in the
- // WNODE_HEADER above. If the WNODE_FLAG_ALL_DATA flag is set then the
- // contents of a WNODE_ALL_DATA (excluding WNODE_HEADER) is here. If the
- // WNODE_FLAG_SINGLE_INSTANCE flag is set then a WNODE_SINGLE_INSTANCE
- // (excluding WNODE_HEADER) is here. Lastly if the WNODE_FLAG_SINGLE_ITEM
- // flag is set then a WNODE_SINGLE_ITEM (excluding WNODE_HEADER) is here.
- end;
- {$EXTERNALSYM tagWNODE_EVENT_ITEM}
- WNODE_EVENT_ITEM = tagWNODE_EVENT_ITEM;
- {$EXTERNALSYM WNODE_EVENT_ITEM}
- TWNodeEventItem = WNODE_EVENT_ITEM;
- PWNodeEventItem = PWNODE_EVENT_ITEM;
-
-//
-// If a KM data provider needs to fire an event that is larger than the
-// maximum size that WMI allows then it should fire a WNODE_EVENT_REFERENCE
-// that specifies which guid and instance name to query for the actual data
-// that should be part of the event.
-
- PWNODE_EVENT_REFERENCE = ^WNODE_EVENT_REFERENCE;
- {$EXTERNALSYM PWNODE_EVENT_REFERENCE}
- tagWNODE_EVENT_REFERENCE = record
- WnodeHeader: _WNODE_HEADER;
- TargetGuid: GUID;
- TargetDataBlockSize: ULONG;
- case Integer of
- 0: (TargetInstanceIndex: ULONG);
- 1: (TargetInstanceName: PWCHAR);
- end;
- {$EXTERNALSYM tagWNODE_EVENT_REFERENCE}
- WNODE_EVENT_REFERENCE = tagWNODE_EVENT_REFERENCE;
- {$EXTERNALSYM WNODE_EVENT_REFERENCE}
- TWNodeEventReference = WNODE_EVENT_REFERENCE;
- PWNodeEventReference = PWNODE_EVENT_REFERENCE;
-
- PWNODE_TOO_SMALL = ^WNODE_TOO_SMALL;
- {$EXTERNALSYM PWNODE_TOO_SMALL}
- tagWNODE_TOO_SMALL = record
- WnodeHeader: _WNODE_HEADER;
- SizeNeeded: ULONG; // Size needed to build WNODE result
- end;
- {$EXTERNALSYM tagWNODE_TOO_SMALL}
- WNODE_TOO_SMALL = tagWNODE_TOO_SMALL;
- {$EXTERNALSYM WNODE_TOO_SMALL}
- TWNodeTooSmall = WNODE_TOO_SMALL;
- PWNodeTooSmall = PWNODE_TOO_SMALL;
-
- WMIREGGUIDW = record
- Guid: GUID; // Guid of data block being registered or updated
- Flags: ULONG; // Flags
-
- InstanceCount: ULONG; // Count of static instances names for the guid
-
- case Integer of
- // If WMIREG_FLAG_INSTANCE_LIST then this has the offset
- // to a list of InstanceCount counted UNICODE
- // strings placed end to end.
- 0: (InstanceNameList: ULONG);
-
- // If WMIREG_FLAG_INSTANCE_BASENAME then this has the
- // offset to a single counted UNICODE string that
- // has the basename for the instance names.
-
- 1: (BaseNameOffset: ULONG);
-
- // If WMIREG_FLAG_INSTANCE_PDO is set then InstanceInfo
- // has the PDO whose device instance path will
- // become the instance name
- 2: (Pdo: ULONG_PTR);
-
- // If WMIREG_FLAG_INSTANCE_REFERENCE then this points to
- // a WMIREGINSTANCEREF structure.
-
- 3: (InstanceInfo: ULONG_PTR);// Offset from beginning of the WMIREGINFO structure to
- end;
- {$EXTERNALSYM WMIREGGUIDW}
- PWMIREGGUIDW = ^WMIREGGUIDW;
- {$EXTERNALSYM PWMIREGGUIDW}
- TWmiRegGuidW = WMIREGGUIDW;
-
- WMIREGGUID = WMIREGGUIDW;
- {$EXTERNALSYM WMIREGGUID}
- PWMIREGGUID = PWMIREGGUIDW;
- {$EXTERNALSYM PWMIREGGUID}
- TWmiRegGuid = WMIREGGUID;
-
-// Set if collection must be enabled for the guid before the data provider
-// can be queried for data.
-
-const
- WMIREG_FLAG_EXPENSIVE = $00000001;
- {$EXTERNALSYM WMIREG_FLAG_EXPENSIVE}
-
-// Set if instance names for this guid are specified in a static list within
-// the WMIREGINFO
- WMIREG_FLAG_INSTANCE_LIST = $00000004;
- {$EXTERNALSYM WMIREG_FLAG_INSTANCE_LIST}
-
-// Set if instance names are to be static and generated by WMI using a
-// base name in the WMIREGINFO and an index
-
- WMIREG_FLAG_INSTANCE_BASENAME = $00000008;
- {$EXTERNALSYM WMIREG_FLAG_INSTANCE_BASENAME}
-
-// Set if WMI should do automatic mapping of a PDO to device instance name
-// as the instance name for the guid. This flag should only be used by
-// kernel mode data providers.
-
- WMIREG_FLAG_INSTANCE_PDO = $00000020;
- {$EXTERNALSYM WMIREG_FLAG_INSTANCE_PDO}
-
-// Note the flags WMIREG_FLAG_INSTANCE_LIST, WMIREG_FLAG_INSTANCE_BASENAME,
-// WMIREG_FLAG_INSTANCE_REFERENCE and WMIREG_FLAG_INSTANCE_PDO are mutually
-// exclusive.
-
-//
-// These flags are only valid in a response to WMI_GUID_REGUPDATE
-
- WMIREG_FLAG_REMOVE_GUID = $00010000; // Remove support for guid
- {$EXTERNALSYM WMIREG_FLAG_REMOVE_GUID}
- WMIREG_FLAG_RESERVED1 = $00020000; // Reserved by WMI
- {$EXTERNALSYM WMIREG_FLAG_RESERVED1}
- WMIREG_FLAG_RESERVED2 = $00040000; // Reserved by WMI
- {$EXTERNALSYM WMIREG_FLAG_RESERVED2}
-
-// Set if guid is one that is written to trace log.
-// This guid cannot be queried directly via WMI, but must be read using
-// logger apis.
-
- WMIREG_FLAG_TRACED_GUID = $00080000;
- {$EXTERNALSYM WMIREG_FLAG_TRACED_GUID}
-
-//
-// Only those Trace Guids that have this bit set can receive
-// Enable/Disable Notifications.
-//
-
- WMIREG_FLAG_TRACE_CONTROL_GUID = $00001000;
- {$EXTERNALSYM WMIREG_FLAG_TRACE_CONTROL_GUID}
-
-//
-// Set if the guid is only used for firing events. Guids that can be queried
-// and that fire events should not have this bit set.
-
- WMIREG_FLAG_EVENT_ONLY_GUID = $00000040;
- {$EXTERNALSYM WMIREG_FLAG_EVENT_ONLY_GUID}
-
-type
- WMIREGINFOW = record
- // Size of entire WMIREGINFO structure including this ULONG
- // and any static instance names that follow
- BufferSize: ULONG;
-
- NextWmiRegInfo: ULONG; // Offset to next WMIREGINFO structure
-
- RegistryPath: ULONG; // Offset from beginning of WMIREGINFO structure to a
- // counted Unicode string containing
- // the driver registry path (under HKLM\CCS\Services)
- // This must be filled only by kernel mode data
- // providers
-
- // Offset from beginning of WMIREGINFO structure to a
- // counted Unicode string containing
- // the name of resource in driver file containing MOF info
- MofResourceName: ULONG;
-
- // Count of WMIREGGUID structures immediately following
-
- GuidCount: ULONG;
- WmiRegGuid: PWMIREGGUIDW; // array of GuidCount WMIREGGUID structures
- // Variable length data including :
- // Instance Names
- end;
- {$EXTERNALSYM WMIREGINFOW}
- PWMIREGINFOW = ^WMIREGINFOW;
- {$EXTERNALSYM PWMIREGINFOW}
- TWmiRegInfoW = WMIREGINFOW;
-
- WMIREGINFO = WMIREGINFOW;
- {$EXTERNALSYM WMIREGINFOW}
- PWMIREGINFO = PWMIREGINFOW;
- {$EXTERNALSYM PWMIREGINFOW}
- TWmiRegInfo = WMIREGINFOW;
-
-//
-// WMI request codes
-
- WMIDPREQUESTCODE = (
- WMI_GET_ALL_DATA,
- WMI_GET_SINGLE_INSTANCE,
- WMI_SET_SINGLE_INSTANCE,
- WMI_SET_SINGLE_ITEM,
- WMI_ENABLE_EVENTS,
- WMI_DISABLE_EVENTS,
- WMI_ENABLE_COLLECTION,
- WMI_DISABLE_COLLECTION,
- WMI_REGINFO,
- WMI_EXECUTE_METHOD);
- {$EXTERNALSYM WMIDPREQUESTCODE}
- TWmiDpRequestCode = WMIDPREQUESTCODE;
-
-//
-// WMI guid objects have the following rights
-// WMIGUID_QUERY
-// WMIGUID_SET
-// WMIGUID_NOTIFICATION
-// WMIGUID_READ_DESCRIPTION
-// WMIGUID_EXECUTE
-// TRACELOG_CREATE_REALTIME
-// TRACELOG_CREATE_ONDISK
-// TRACELOG_GUID_ENABLE
-// TRACELOG_ACCESS_KERNEL_LOGGER
-// TRACELOG_CREATE_INPROC
-// TRACELOG_ACCESS_REALTIME
-
-//
-// GuidTypes
-//
-//#ifndef _WMIKM_
-
-const
- WMI_GUIDTYPE_TRACECONTROL = 0;
- {$EXTERNALSYM WMI_GUIDTYPE_TRACECONTROL}
- WMI_GUIDTYPE_TRACE = 1;
- {$EXTERNALSYM WMI_GUIDTYPE_TRACE}
- WMI_GUIDTYPE_DATA = 2;
- {$EXTERNALSYM WMI_GUIDTYPE_DATA}
- WMI_GUIDTYPE_EVENT = 3;
- {$EXTERNALSYM WMI_GUIDTYPE_EVENT}
-
-//#endif
-
-//
-// Specific rights for WMI guid objects. These are available from 0x0001 to
-// 0xffff (ie up to 16 rights)
-//
-
- WMIGUID_QUERY = $0001;
- {$EXTERNALSYM WMIGUID_QUERY}
- WMIGUID_SET = $0002;
- {$EXTERNALSYM WMIGUID_SET}
- WMIGUID_NOTIFICATION = $0004;
- {$EXTERNALSYM WMIGUID_NOTIFICATION}
- WMIGUID_READ_DESCRIPTION = $0008;
- {$EXTERNALSYM WMIGUID_READ_DESCRIPTION}
- WMIGUID_EXECUTE = $0010;
- {$EXTERNALSYM WMIGUID_EXECUTE}
- TRACELOG_CREATE_REALTIME = $0020;
- {$EXTERNALSYM TRACELOG_CREATE_REALTIME}
- TRACELOG_CREATE_ONDISK = $0040;
- {$EXTERNALSYM TRACELOG_CREATE_ONDISK}
- TRACELOG_GUID_ENABLE = $0080;
- {$EXTERNALSYM TRACELOG_GUID_ENABLE}
- TRACELOG_ACCESS_KERNEL_LOGGER = $0100;
- {$EXTERNALSYM TRACELOG_ACCESS_KERNEL_LOGGER}
- TRACELOG_CREATE_INPROC = $0200;
- {$EXTERNALSYM TRACELOG_CREATE_INPROC}
- TRACELOG_ACCESS_REALTIME = $0400;
- {$EXTERNALSYM TRACELOG_ACCESS_REALTIME}
- TRACELOG_REGISTER_GUIDS = $0800;
- {$EXTERNALSYM TRACELOG_REGISTER_GUIDS}
-
- WMIGUID_ALL_ACCESS = (
- STANDARD_RIGHTS_READ or
- SYNCHRONIZE or
- WMIGUID_QUERY or
- WMIGUID_SET or
- WMIGUID_NOTIFICATION or
- WMIGUID_READ_DESCRIPTION or
- WMIGUID_EXECUTE or
- TRACELOG_CREATE_REALTIME or
- TRACELOG_CREATE_ONDISK or
- TRACELOG_GUID_ENABLE or
- TRACELOG_ACCESS_KERNEL_LOGGER or
- TRACELOG_CREATE_INPROC or
- TRACELOG_ACCESS_REALTIME or
- TRACELOG_REGISTER_GUIDS);
- {$EXTERNALSYM WMIGUID_ALL_ACCESS}
-
- WMI_GLOBAL_LOGGER_ID = $0001;
- {$EXTERNALSYM WMI_GLOBAL_LOGGER_ID}
-
-implementation
-
-end.
+{******************************************************************************}
+{ }
+{ WMI Structure Definitions API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: wmistr.h, released November 2002. The original Pascal }
+{ code is: WmiStr.pas, released April 2002. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwawmistr.pas,v 1.1 2005/04/04 07:56:11 marco Exp $
+
+unit JwaWmiStr;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "wmistr.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaWinType, JwaWinNT;
+
+//
+// WNODE definition
+
+type
+ _WNODE_HEADER = record
+ BufferSize: ULONG; // Size of entire buffer inclusive of this ULONG
+ ProviderId: ULONG; // Provider Id of driver returning this buffer
+ U1: record
+ case Integer of
+ 0: (
+ HistoricalContext: ULONG64); // Logger use
+ 1: (
+ Version: ULONG; // Reserved
+ Linkage: ULONG); // Linkage field reserved for WMI
+ end;
+ u2: record
+ case Integer of
+ 0: (CountLost: ULONG); // Reserved
+ 1: (KernelHandle: HANDLE); // Kernel handle for data block
+ 2: (TimeStamp: LARGE_INTEGER); // Timestamp as returned in units of 100ns
+ // since 1/1/1601
+ end;
+ Guid: GUID; // Guid for data block returned with results
+ ClientContext: ULONG;
+ Flags: ULONG; // Flags, see below
+ end;
+ {$EXTERNALSYM _WNODE_HEADER}
+ WNODE_HEADER = _WNODE_HEADER;
+ {$EXTERNALSYM WNODE_HEADER}
+ PWNODE_HEADER = ^WNODE_HEADER;
+ {$EXTERNALSYM PWNODE_HEADER}
+ TWNodeHeader = WNODE_HEADER;
+ PWNodeHeader = PWNODE_HEADER;
+
+//
+// WNODE_HEADER flags are defined as follows
+
+const
+ WNODE_FLAG_ALL_DATA = $00000001; // set for WNODE_ALL_DATA
+ {$EXTERNALSYM WNODE_FLAG_ALL_DATA}
+ WNODE_FLAG_SINGLE_INSTANCE = $00000002; // set for WNODE_SINGLE_INSTANCE
+ {$EXTERNALSYM WNODE_FLAG_SINGLE_INSTANCE}
+ WNODE_FLAG_SINGLE_ITEM = $00000004; // set for WNODE_SINGLE_ITEM
+ {$EXTERNALSYM WNODE_FLAG_SINGLE_ITEM}
+ WNODE_FLAG_EVENT_ITEM = $00000008; // set for WNODE_EVENT_ITEM
+ {$EXTERNALSYM WNODE_FLAG_EVENT_ITEM}
+
+ // Set if data block size is
+ // identical for all instances
+ // (used with WNODE_ALL_DATA
+ // only)
+ WNODE_FLAG_FIXED_INSTANCE_SIZE = $00000010;
+ {$EXTERNALSYM WNODE_FLAG_FIXED_INSTANCE_SIZE}
+
+ WNODE_FLAG_TOO_SMALL = $00000020; // set for WNODE_TOO_SMALL
+ {$EXTERNALSYM WNODE_FLAG_TOO_SMALL}
+
+ // Set when a data provider returns a
+ // WNODE_ALL_DATA in which the number of
+ // instances and their names returned
+ // are identical to those returned from the
+ // previous WNODE_ALL_DATA query. Only data
+ // blocks registered with dynamic instance
+ // names should use this flag.
+
+ WNODE_FLAG_INSTANCES_SAME = $00000040;
+ {$EXTERNALSYM WNODE_FLAG_INSTANCES_SAME}
+
+ // Instance names are not specified in
+ // WNODE_ALL_DATA; values specified at
+ // registration are used instead. Always
+ // set for guids registered with static
+ // instance names
+
+ WNODE_FLAG_STATIC_INSTANCE_NAMES = $00000080;
+ {$EXTERNALSYM WNODE_FLAG_STATIC_INSTANCE_NAMES}
+
+ WNODE_FLAG_INTERNAL = $00000100; // Used internally by WMI
+ {$EXTERNALSYM WNODE_FLAG_INTERNAL}
+
+ // timestamp should not be modified by
+ // a historical logger
+
+ WNODE_FLAG_USE_TIMESTAMP = $00000200;
+ {$EXTERNALSYM WNODE_FLAG_USE_TIMESTAMP}
+ WNODE_FLAG_PERSIST_EVENT = $00000400;
+ {$EXTERNALSYM WNODE_FLAG_PERSIST_EVENT}
+
+ WNODE_FLAG_EVENT_REFERENCE = $00002000;
+ {$EXTERNALSYM WNODE_FLAG_EVENT_REFERENCE}
+
+// Set if Instance names are ansi. Only set when returning from
+// WMIQuerySingleInstanceA and WMIQueryAllDataA
+
+ WNODE_FLAG_ANSI_INSTANCENAMES = $00004000;
+ {$EXTERNALSYM WNODE_FLAG_ANSI_INSTANCENAMES}
+
+// Set if WNODE is a method call
+
+ WNODE_FLAG_METHOD_ITEM = $00008000;
+ {$EXTERNALSYM WNODE_FLAG_METHOD_ITEM}
+
+// Set if instance names originated from a PDO
+
+ WNODE_FLAG_PDO_INSTANCE_NAMES = $00010000;
+ {$EXTERNALSYM WNODE_FLAG_PDO_INSTANCE_NAMES}
+
+// The second byte, except the first bit is used exclusively for tracing
+
+ WNODE_FLAG_TRACED_GUID = $00020000; // denotes a trace
+ {$EXTERNALSYM WNODE_FLAG_TRACED_GUID}
+
+ WNODE_FLAG_LOG_WNODE = $00040000; // request to log Wnode
+ {$EXTERNALSYM WNODE_FLAG_LOG_WNODE}
+
+ WNODE_FLAG_USE_GUID_PTR = $00080000; // Guid is actually a pointer
+ {$EXTERNALSYM WNODE_FLAG_USE_GUID_PTR}
+
+ WNODE_FLAG_USE_MOF_PTR = $00100000; // MOF data are dereferenced
+ {$EXTERNALSYM WNODE_FLAG_USE_MOF_PTR}
+
+ WNODE_FLAG_NO_HEADER = $00200000; // Trace without header
+ {$EXTERNALSYM WNODE_FLAG_NO_HEADER}
+
+// Set for events that are WNODE_EVENT_REFERENCE
+// Mask for event severity level. Level 0xff is the most severe type of event
+
+ WNODE_FLAG_SEVERITY_MASK = DWORD($ff000000);
+ {$EXTERNALSYM WNODE_FLAG_SEVERITY_MASK}
+
+//
+// This structure is used within the WNODE_ALL_DATA when the data blocks
+// for the different instances are different lengths. If the data blocks
+// for the different instances are identical lengths then
+// WNODE_FLAG_FIXED_INSTANCE_SIZE should be set and FixedInstanceSize
+// set to the common data block size.
+
+type
+ OFFSETINSTANCEDATAANDLENGTH = record
+ OffsetInstanceData: ULONG; // Offset from beginning of WNODE_ALL_DATA
+ // to Data block for instance
+ LengthInstanceData: ULONG; // Length of data block for instance
+ end;
+ {$EXTERNALSYM OFFSETINSTANCEDATAANDLENGTH}
+ POFFSETINSTANCEDATAANDLENGTH = ^OFFSETINSTANCEDATAANDLENGTH;
+ {$EXTERNALSYM POFFSETINSTANCEDATAANDLENGTH}
+ TOffsetInstanceDataAndLength = OFFSETINSTANCEDATAANDLENGTH;
+
+ PWNODE_ALL_DATA = ^WNODE_ALL_DATA;
+ {$EXTERNALSYM PWNODE_ALL_DATA}
+ tagWNODE_ALL_DATA = record
+ WnodeHeader: WNODE_HEADER;
+ DataBlockOffset: ULONG; // Offset from begin of WNODE to first data block
+ InstanceCount: ULONG; // Count of instances whose data follows.
+ // Offset to an array of offsets to the instance names
+ OffsetInstanceNameOffsets: ULONG;
+ // If WNODE_FLAG_FIXED_INSTANCE_SIZE is set in Flags then
+ // FixedInstanceSize specifies the size of each data block. In this case
+ // there is one ULONG followed by the data blocks.
+ // If WNODE_FLAG_FIXED_INSTANCE_SIZE is not set
+ // then OffsetInstanceDataAndLength
+ // is an array of OFFSETINSTANCEDATAANDLENGTH that specifies the
+ // offsets and lengths of the data blocks for each instance.
+ case Integer of
+ 0: (FixedInstanceSize: ULONG);
+ 1: (OffsetInstanceDataAndLength: POFFSETINSTANCEDATAANDLENGTH);
+ // [InstanceCount]
+
+ // padding so that first data block begins on a 8 byte boundry
+ // data blocks and instance names for all instances
+ end;
+ {$EXTERNALSYM tagWNODE_ALL_DATA}
+ WNODE_ALL_DATA = tagWNODE_ALL_DATA;
+ {$EXTERNALSYM WNODE_ALL_DATA}
+ TWNodeAllData = WNODE_ALL_DATA;
+ PWNodeAllData = PWNODE_ALL_DATA;
+
+ PWNODE_SINGLE_INSTANCE = ^WNODE_SINGLE_INSTANCE;
+ {$EXTERNALSYM PWNODE_SINGLE_INSTANCE}
+ tagWNODE_SINGLE_INSTANCE = record
+ WnodeHeader: _WNODE_HEADER;
+ // Offset from beginning of WNODE_SINGLE_INSTANCE
+ // to instance name. Use when
+ // WNODE_FLAG_STATIC_INSTANCE_NAMES is reset
+ // (Dynamic instance names)
+ OffsetInstanceName: ULONG;
+ // Instance index when
+ // WNODE_FLAG_STATIC_INSTANCE_NAME is set
+ InstanceIndex: ULONG; // (Static Instance Names)
+ DataBlockOffset: ULONG; // offset from beginning of WNODE to data block
+ SizeDataBlock: ULONG; // Size of data block for instance
+ VariableData: PUCHAR;
+ // instance names and padding so data block begins on 8 byte boundry
+ // data block
+ end;
+ {$EXTERNALSYM tagWNODE_SINGLE_INSTANCE}
+ WNODE_SINGLE_INSTANCE = tagWNODE_SINGLE_INSTANCE;
+ {$EXTERNALSYM WNODE_SINGLE_INSTANCE}
+ TWNodeSingleInstance = WNODE_SINGLE_INSTANCE;
+ PWNodeSingleInstance = PWNODE_SINGLE_INSTANCE;
+
+ PWNODE_SINGLE_ITEM = ^WNODE_SINGLE_ITEM;
+ {$EXTERNALSYM PWNODE_SINGLE_ITEM}
+ tagWNODE_SINGLE_ITEM = record
+ WnodeHeader: WNODE_HEADER;
+ // Offset from beginning of WNODE_SINGLE_INSTANCE
+ // to instance name. Examine when
+ // WNODE_FLAG_STATIC_INSTANCE_NAME is reset
+ // (Dynamic instance names)
+ OffsetInstanceName: ULONG;
+ // Instance index when
+ // WNODE_FLAG_STATIC_INSTANCE_NAME
+ InstanceIndex: ULONG; // set (Static Instance Names)
+ ItemId: ULONG; // Item Id for data item being set
+ DataBlockOffset: ULONG; // offset from WNODE begin to data item value
+ SizeDataItem: ULONG; // Size of data item
+ VariableData: PUCHAR;
+ // instance names and padding so data value begins on 8 byte boundry
+ // data item value
+ end;
+ {$EXTERNALSYM tagWNODE_SINGLE_ITEM}
+ WNODE_SINGLE_ITEM = tagWNODE_SINGLE_ITEM;
+ {$EXTERNALSYM WNODE_SINGLE_ITEM}
+ TWNodeSingleItem = WNODE_SINGLE_ITEM;
+ PWNodeSingleItem = PWNODE_SINGLE_ITEM;
+
+ PWNODE_METHOD_ITEM = ^WNODE_METHOD_ITEM;
+ {$EXTERNALSYM PWNODE_METHOD_ITEM}
+ tagWNODE_METHOD_ITEM = record
+ WnodeHeader: WNODE_HEADER;
+ // Offset from beginning of WNODE_METHOD_ITEM
+ // to instance name. Examine when
+ // WNODE_FLAG_STATIC_INSTANCE_NAME is reset
+ // (Dynamic instance names)
+ OffsetInstanceName: ULONG;
+ // Instance index when
+ // WNODE_FLAG_STATIC_INSTANCE_NAME
+ InstanceIndex: ULONG; // set (Static Instance Names)
+ MethodId: ULONG; // Method id of method being called
+ DataBlockOffset: ULONG; // On Entry: offset from WNODE to input data
+ // On Return: offset from WNODE to input and
+ // output data blocks
+ SizeDataBlock: ULONG; // On Entry: Size of input data, 0 if no input
+ // data
+ // On Return: Size of output data, 0 if no output
+ // data
+ VariableData: PUCHAR;
+ // instance names and padding so data value begins on 8 byte boundry
+ // data item value
+ end;
+ {$EXTERNALSYM tagWNODE_METHOD_ITEM}
+ WNODE_METHOD_ITEM = tagWNODE_METHOD_ITEM;
+ {$EXTERNALSYM WNODE_METHOD_ITEM}
+ TWNodeMethodItem = WNODE_METHOD_ITEM;
+ PWNodeMethodItem = PWNODE_METHOD_ITEM;
+
+ PWNODE_EVENT_ITEM = ^WNODE_EVENT_ITEM;
+ {$EXTERNALSYM PWNODE_EVENT_ITEM}
+ tagWNODE_EVENT_ITEM = record
+ WnodeHeader: WNODE_HEADER;
+ // Different data could be here depending upon the flags set in the
+ // WNODE_HEADER above. If the WNODE_FLAG_ALL_DATA flag is set then the
+ // contents of a WNODE_ALL_DATA (excluding WNODE_HEADER) is here. If the
+ // WNODE_FLAG_SINGLE_INSTANCE flag is set then a WNODE_SINGLE_INSTANCE
+ // (excluding WNODE_HEADER) is here. Lastly if the WNODE_FLAG_SINGLE_ITEM
+ // flag is set then a WNODE_SINGLE_ITEM (excluding WNODE_HEADER) is here.
+ end;
+ {$EXTERNALSYM tagWNODE_EVENT_ITEM}
+ WNODE_EVENT_ITEM = tagWNODE_EVENT_ITEM;
+ {$EXTERNALSYM WNODE_EVENT_ITEM}
+ TWNodeEventItem = WNODE_EVENT_ITEM;
+ PWNodeEventItem = PWNODE_EVENT_ITEM;
+
+//
+// If a KM data provider needs to fire an event that is larger than the
+// maximum size that WMI allows then it should fire a WNODE_EVENT_REFERENCE
+// that specifies which guid and instance name to query for the actual data
+// that should be part of the event.
+
+ PWNODE_EVENT_REFERENCE = ^WNODE_EVENT_REFERENCE;
+ {$EXTERNALSYM PWNODE_EVENT_REFERENCE}
+ tagWNODE_EVENT_REFERENCE = record
+ WnodeHeader: _WNODE_HEADER;
+ TargetGuid: GUID;
+ TargetDataBlockSize: ULONG;
+ case Integer of
+ 0: (TargetInstanceIndex: ULONG);
+ 1: (TargetInstanceName: PWCHAR);
+ end;
+ {$EXTERNALSYM tagWNODE_EVENT_REFERENCE}
+ WNODE_EVENT_REFERENCE = tagWNODE_EVENT_REFERENCE;
+ {$EXTERNALSYM WNODE_EVENT_REFERENCE}
+ TWNodeEventReference = WNODE_EVENT_REFERENCE;
+ PWNodeEventReference = PWNODE_EVENT_REFERENCE;
+
+ PWNODE_TOO_SMALL = ^WNODE_TOO_SMALL;
+ {$EXTERNALSYM PWNODE_TOO_SMALL}
+ tagWNODE_TOO_SMALL = record
+ WnodeHeader: _WNODE_HEADER;
+ SizeNeeded: ULONG; // Size needed to build WNODE result
+ end;
+ {$EXTERNALSYM tagWNODE_TOO_SMALL}
+ WNODE_TOO_SMALL = tagWNODE_TOO_SMALL;
+ {$EXTERNALSYM WNODE_TOO_SMALL}
+ TWNodeTooSmall = WNODE_TOO_SMALL;
+ PWNodeTooSmall = PWNODE_TOO_SMALL;
+
+ WMIREGGUIDW = record
+ Guid: GUID; // Guid of data block being registered or updated
+ Flags: ULONG; // Flags
+
+ InstanceCount: ULONG; // Count of static instances names for the guid
+
+ case Integer of
+ // If WMIREG_FLAG_INSTANCE_LIST then this has the offset
+ // to a list of InstanceCount counted UNICODE
+ // strings placed end to end.
+ 0: (InstanceNameList: ULONG);
+
+ // If WMIREG_FLAG_INSTANCE_BASENAME then this has the
+ // offset to a single counted UNICODE string that
+ // has the basename for the instance names.
+
+ 1: (BaseNameOffset: ULONG);
+
+ // If WMIREG_FLAG_INSTANCE_PDO is set then InstanceInfo
+ // has the PDO whose device instance path will
+ // become the instance name
+ 2: (Pdo: ULONG_PTR);
+
+ // If WMIREG_FLAG_INSTANCE_REFERENCE then this points to
+ // a WMIREGINSTANCEREF structure.
+
+ 3: (InstanceInfo: ULONG_PTR);// Offset from beginning of the WMIREGINFO structure to
+ end;
+ {$EXTERNALSYM WMIREGGUIDW}
+ PWMIREGGUIDW = ^WMIREGGUIDW;
+ {$EXTERNALSYM PWMIREGGUIDW}
+ TWmiRegGuidW = WMIREGGUIDW;
+
+ WMIREGGUID = WMIREGGUIDW;
+ {$EXTERNALSYM WMIREGGUID}
+ PWMIREGGUID = PWMIREGGUIDW;
+ {$EXTERNALSYM PWMIREGGUID}
+ TWmiRegGuid = WMIREGGUID;
+
+// Set if collection must be enabled for the guid before the data provider
+// can be queried for data.
+
+const
+ WMIREG_FLAG_EXPENSIVE = $00000001;
+ {$EXTERNALSYM WMIREG_FLAG_EXPENSIVE}
+
+// Set if instance names for this guid are specified in a static list within
+// the WMIREGINFO
+ WMIREG_FLAG_INSTANCE_LIST = $00000004;
+ {$EXTERNALSYM WMIREG_FLAG_INSTANCE_LIST}
+
+// Set if instance names are to be static and generated by WMI using a
+// base name in the WMIREGINFO and an index
+
+ WMIREG_FLAG_INSTANCE_BASENAME = $00000008;
+ {$EXTERNALSYM WMIREG_FLAG_INSTANCE_BASENAME}
+
+// Set if WMI should do automatic mapping of a PDO to device instance name
+// as the instance name for the guid. This flag should only be used by
+// kernel mode data providers.
+
+ WMIREG_FLAG_INSTANCE_PDO = $00000020;
+ {$EXTERNALSYM WMIREG_FLAG_INSTANCE_PDO}
+
+// Note the flags WMIREG_FLAG_INSTANCE_LIST, WMIREG_FLAG_INSTANCE_BASENAME,
+// WMIREG_FLAG_INSTANCE_REFERENCE and WMIREG_FLAG_INSTANCE_PDO are mutually
+// exclusive.
+
+//
+// These flags are only valid in a response to WMI_GUID_REGUPDATE
+
+ WMIREG_FLAG_REMOVE_GUID = $00010000; // Remove support for guid
+ {$EXTERNALSYM WMIREG_FLAG_REMOVE_GUID}
+ WMIREG_FLAG_RESERVED1 = $00020000; // Reserved by WMI
+ {$EXTERNALSYM WMIREG_FLAG_RESERVED1}
+ WMIREG_FLAG_RESERVED2 = $00040000; // Reserved by WMI
+ {$EXTERNALSYM WMIREG_FLAG_RESERVED2}
+
+// Set if guid is one that is written to trace log.
+// This guid cannot be queried directly via WMI, but must be read using
+// logger apis.
+
+ WMIREG_FLAG_TRACED_GUID = $00080000;
+ {$EXTERNALSYM WMIREG_FLAG_TRACED_GUID}
+
+//
+// Only those Trace Guids that have this bit set can receive
+// Enable/Disable Notifications.
+//
+
+ WMIREG_FLAG_TRACE_CONTROL_GUID = $00001000;
+ {$EXTERNALSYM WMIREG_FLAG_TRACE_CONTROL_GUID}
+
+//
+// Set if the guid is only used for firing events. Guids that can be queried
+// and that fire events should not have this bit set.
+
+ WMIREG_FLAG_EVENT_ONLY_GUID = $00000040;
+ {$EXTERNALSYM WMIREG_FLAG_EVENT_ONLY_GUID}
+
+type
+ WMIREGINFOW = record
+ // Size of entire WMIREGINFO structure including this ULONG
+ // and any static instance names that follow
+ BufferSize: ULONG;
+
+ NextWmiRegInfo: ULONG; // Offset to next WMIREGINFO structure
+
+ RegistryPath: ULONG; // Offset from beginning of WMIREGINFO structure to a
+ // counted Unicode string containing
+ // the driver registry path (under HKLM\CCS\Services)
+ // This must be filled only by kernel mode data
+ // providers
+
+ // Offset from beginning of WMIREGINFO structure to a
+ // counted Unicode string containing
+ // the name of resource in driver file containing MOF info
+ MofResourceName: ULONG;
+
+ // Count of WMIREGGUID structures immediately following
+
+ GuidCount: ULONG;
+ WmiRegGuid: PWMIREGGUIDW; // array of GuidCount WMIREGGUID structures
+ // Variable length data including :
+ // Instance Names
+ end;
+ {$EXTERNALSYM WMIREGINFOW}
+ PWMIREGINFOW = ^WMIREGINFOW;
+ {$EXTERNALSYM PWMIREGINFOW}
+ TWmiRegInfoW = WMIREGINFOW;
+
+ WMIREGINFO = WMIREGINFOW;
+ {$EXTERNALSYM WMIREGINFOW}
+ PWMIREGINFO = PWMIREGINFOW;
+ {$EXTERNALSYM PWMIREGINFOW}
+ TWmiRegInfo = WMIREGINFOW;
+
+//
+// WMI request codes
+
+ WMIDPREQUESTCODE = (
+ WMI_GET_ALL_DATA,
+ WMI_GET_SINGLE_INSTANCE,
+ WMI_SET_SINGLE_INSTANCE,
+ WMI_SET_SINGLE_ITEM,
+ WMI_ENABLE_EVENTS,
+ WMI_DISABLE_EVENTS,
+ WMI_ENABLE_COLLECTION,
+ WMI_DISABLE_COLLECTION,
+ WMI_REGINFO,
+ WMI_EXECUTE_METHOD);
+ {$EXTERNALSYM WMIDPREQUESTCODE}
+ TWmiDpRequestCode = WMIDPREQUESTCODE;
+
+//
+// WMI guid objects have the following rights
+// WMIGUID_QUERY
+// WMIGUID_SET
+// WMIGUID_NOTIFICATION
+// WMIGUID_READ_DESCRIPTION
+// WMIGUID_EXECUTE
+// TRACELOG_CREATE_REALTIME
+// TRACELOG_CREATE_ONDISK
+// TRACELOG_GUID_ENABLE
+// TRACELOG_ACCESS_KERNEL_LOGGER
+// TRACELOG_CREATE_INPROC
+// TRACELOG_ACCESS_REALTIME
+
+//
+// GuidTypes
+//
+//#ifndef _WMIKM_
+
+const
+ WMI_GUIDTYPE_TRACECONTROL = 0;
+ {$EXTERNALSYM WMI_GUIDTYPE_TRACECONTROL}
+ WMI_GUIDTYPE_TRACE = 1;
+ {$EXTERNALSYM WMI_GUIDTYPE_TRACE}
+ WMI_GUIDTYPE_DATA = 2;
+ {$EXTERNALSYM WMI_GUIDTYPE_DATA}
+ WMI_GUIDTYPE_EVENT = 3;
+ {$EXTERNALSYM WMI_GUIDTYPE_EVENT}
+
+//#endif
+
+//
+// Specific rights for WMI guid objects. These are available from 0x0001 to
+// 0xffff (ie up to 16 rights)
+//
+
+ WMIGUID_QUERY = $0001;
+ {$EXTERNALSYM WMIGUID_QUERY}
+ WMIGUID_SET = $0002;
+ {$EXTERNALSYM WMIGUID_SET}
+ WMIGUID_NOTIFICATION = $0004;
+ {$EXTERNALSYM WMIGUID_NOTIFICATION}
+ WMIGUID_READ_DESCRIPTION = $0008;
+ {$EXTERNALSYM WMIGUID_READ_DESCRIPTION}
+ WMIGUID_EXECUTE = $0010;
+ {$EXTERNALSYM WMIGUID_EXECUTE}
+ TRACELOG_CREATE_REALTIME = $0020;
+ {$EXTERNALSYM TRACELOG_CREATE_REALTIME}
+ TRACELOG_CREATE_ONDISK = $0040;
+ {$EXTERNALSYM TRACELOG_CREATE_ONDISK}
+ TRACELOG_GUID_ENABLE = $0080;
+ {$EXTERNALSYM TRACELOG_GUID_ENABLE}
+ TRACELOG_ACCESS_KERNEL_LOGGER = $0100;
+ {$EXTERNALSYM TRACELOG_ACCESS_KERNEL_LOGGER}
+ TRACELOG_CREATE_INPROC = $0200;
+ {$EXTERNALSYM TRACELOG_CREATE_INPROC}
+ TRACELOG_ACCESS_REALTIME = $0400;
+ {$EXTERNALSYM TRACELOG_ACCESS_REALTIME}
+ TRACELOG_REGISTER_GUIDS = $0800;
+ {$EXTERNALSYM TRACELOG_REGISTER_GUIDS}
+
+ WMIGUID_ALL_ACCESS = (
+ STANDARD_RIGHTS_READ or
+ SYNCHRONIZE or
+ WMIGUID_QUERY or
+ WMIGUID_SET or
+ WMIGUID_NOTIFICATION or
+ WMIGUID_READ_DESCRIPTION or
+ WMIGUID_EXECUTE or
+ TRACELOG_CREATE_REALTIME or
+ TRACELOG_CREATE_ONDISK or
+ TRACELOG_GUID_ENABLE or
+ TRACELOG_ACCESS_KERNEL_LOGGER or
+ TRACELOG_CREATE_INPROC or
+ TRACELOG_ACCESS_REALTIME or
+ TRACELOG_REGISTER_GUIDS);
+ {$EXTERNALSYM WMIGUID_ALL_ACCESS}
+
+ WMI_GLOBAL_LOGGER_ID = $0001;
+ {$EXTERNALSYM WMI_GLOBAL_LOGGER_ID}
+
+implementation
+
+end.
diff --git a/packages/extra/winunits/jwawownt16.pas b/packages/extra/winunits/jwawownt16.pas
index da04f03bb6..f50e2c4834 100644
--- a/packages/extra/winunits/jwawownt16.pas
+++ b/packages/extra/winunits/jwawownt16.pas
@@ -1,245 +1,245 @@
-{******************************************************************************}
-{ }
-{ 16 bit Generic Thunks API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: wownt16.h, released June 2000. The original Pascal }
-{ code is: WowNT16.pas, released December 2000. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwawownt16.pas,v 1.1 2005/04/04 07:56:11 marco Exp $
-
-unit JwaWowNT16;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "wownt16.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-// (rom) get rid of warnings about "index" directive
-{$WARN SYMBOL_PLATFORM OFF}
-
-interface
-
-uses
- JwaWinType;
-
-//
-// 16:16 -> 0:32 Pointer translation.
-//
-// GetVDMPointer32W will convert the passed in 16-bit address
-// to the equivalent 32-bit flat pointer. The upper 16 bits
-// of the address are treated according to the value passed in
-// fMode: if fMode = 1, then the hiword of vp is used as a
-// protected mode selector. Otherwise it is used as a real mode
-// segment value.
-// The lower 16 bits are treated as the offset.
-//
-// The return value is 0 if the selector is invalid.
-//
-// NOTE: Limit checking is not performed in the retail build
-// of Windows NT. It is performed in the checked (debug) build
-// of WOW32.DLL, which will cause 0 to be returned when the
-// limit is exceeded by the supplied offset.
-//
-
-function GetVDMPointer32W(vp: LPVOID; fMode: UINT): DWORD; stdcall;
-{$EXTERNALSYM GetVDMPointer32W}
-
-//
-// Win32 module management.
-//
-// The following routines accept parameters that correspond directly
-// to the respective Win32 API function calls that they invoke. Refer
-// to the Win32 reference documentation for more detail.
-
-function LoadLibraryEx32W(lpszLibFile: LPCSTR; hFile, dwFlags: DWORD): DWORD; stdcall;
-{$EXTERNALSYM LoadLibraryEx32W}
-function GetProcAddress32W(hModule: DWORD; lpszProc: LPCSTR): DWORD; stdcall;
-{$EXTERNALSYM GetProcAddress32W}
-function FreeLibrary32W(hLibModule: DWORD): DWORD; stdcall;
-{$EXTERNALSYM FreeLibrary32W}
-
-//
-// Generic Thunk Routine:
-//
-// CallProc32W
-//
-// Transitions to 32 bits and calls specified routine
-//
-// This routine can pass a variable number of arguments, up to 32, to the
-// target 32-bit routine. These arguments are given to CallProc32W following
-// the 3 required parameters.
-//
-// DWORD cParams - Number of optional DWORD parameters (0-32)
-//
-// LPVOID fAddressConvert - Bit Field, for 16:16 address Convertion. The
-// optional parameters can be automatically converted
-// from a 16:16 address format to flat by specifying
-// a 1 bit in the corresponding position in this mask.
-// eg (bit 1 means convert parameter 1 from 16:16
-// to flat address before calling routine)
-//
-// DWORD lpProcAddress - 32 bit native address to call (use LoadLibraryEx32W
-// and GetProcAddress32W to get this address).
-//
-// Returns:
-// What ever the API returned on 32 bit side in AX:DX
-//
-// Error Returns:
-// AX = 0, more than 32 parameters.
-//
-//
-// The function prototype must be declared by the application source code
-// in the following format:
-//
-// DWORD FAR PASCAL CallProc32W( DWORD p1, ... , DWORD lpProcAddress,
-// DWORD fAddressConvert, DWORD cParams);
-//
-// where the value in cParams must match the actual number of optional
-// parameters (p1-pn) given AND the "DWORD p1, ..." must be replaced by
-// the correct number of parameters being passed. For example, passing 3
-// parameter would simply require the removal of the ... and it insertion of
-// "DWORD p2, DWORD p3" instead. The fAddressConvert parameter uses bit 1
-// for the last parameter (p3 in our example), with bit 2 for the next to last,
-// etc.
-//
-// Generic Thunk Routine:
-//
-// CallProcEx32W
-//
-// Transitions to 32 bits and calls specified routine
-//
-// Similar to the CallProc32W function, the CallProcEx32W is an equivalent
-// function that is C calling convention and allows easier and more flexible
-// prototyping. See the prototype below. The fAddressConvert parameter uses
-// bit 1 for the 1st parameter, bit 2 for the 2nd parameter, etc.
-//
-// Both CallProc32W and CallProcEx32W accept a flag OR'd with the parameter
-// count to indicate the calling convention of the function in 32 bits.
-// For example, to call a cdecl function in 32-bits with 1 parameter, it would
-// look like this:
-//
-// dwResult = CallProcEx32W( CPEX_DEST_CDECL | 1, 0, dwfn32, p1 );
-//
-
-// TODO Variable argument list wrapper!
-
-(*
-function CallProcEx32W(nParams, fAddressConvert, lpProcAddress: DWORD): DWORD; cdecl;
-{$EXTERNALSYM CallProcEx32W}
-*)
-
-const
- CPEX_DEST_STDCALL = DWORD($00000000);
- {$EXTERNALSYM CPEX_DEST_STDCALL}
- CPEX_DEST_CDECL = DWORD($80000000);
- {$EXTERNALSYM CPEX_DEST_CDECL}
-
-implementation
-
-const
- wow16lib = 'kernel32.dll';
-
-//function CallProcEx32W; external wow16lib index 517;
-
-{$IFDEF DYNAMIC_LINK}
-
-var
- _GetVDMPointer32W: Pointer;
-
-function GetVDMPointer32W;
-begin
- GetProcedureAddress(_GetVDMPointer32W, wow16lib, '516');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetVDMPointer32W]
- end;
-end;
-
-var
- _LoadLibraryEx32W: Pointer;
-
-function LoadLibraryEx32W;
-begin
- GetProcedureAddress(_LoadLibraryEx32W, wow16lib, '513');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_LoadLibraryEx32W]
- end;
-end;
-
-var
- _GetProcAddress32W: Pointer;
-
-function GetProcAddress32W;
-begin
- GetProcedureAddress(_GetProcAddress32W, wow16lib, '515');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_GetProcAddress32W]
- end;
-end;
-
-var
- _FreeLibrary32W: Pointer;
-
-function FreeLibrary32W;
-begin
- GetProcedureAddress(_FreeLibrary32W, wow16lib, '514');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_FreeLibrary32W]
- end;
-end;
-
-{$ELSE}
-
-function GetVDMPointer32W; external wow16lib index 516;
-function LoadLibraryEx32W; external wow16lib index 513;
-function GetProcAddress32W; external wow16lib index 515;
-function FreeLibrary32W; external wow16lib index 514;
-
-{$ENDIF DYNAMIC_LINK}
-
-end.
+{******************************************************************************}
+{ }
+{ 16 bit Generic Thunks API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: wownt16.h, released June 2000. The original Pascal }
+{ code is: WowNT16.pas, released December 2000. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwawownt16.pas,v 1.1 2005/04/04 07:56:11 marco Exp $
+
+unit JwaWowNT16;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "wownt16.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+// (rom) get rid of warnings about "index" directive
+{$WARN SYMBOL_PLATFORM OFF}
+
+interface
+
+uses
+ JwaWinType;
+
+//
+// 16:16 -> 0:32 Pointer translation.
+//
+// GetVDMPointer32W will convert the passed in 16-bit address
+// to the equivalent 32-bit flat pointer. The upper 16 bits
+// of the address are treated according to the value passed in
+// fMode: if fMode = 1, then the hiword of vp is used as a
+// protected mode selector. Otherwise it is used as a real mode
+// segment value.
+// The lower 16 bits are treated as the offset.
+//
+// The return value is 0 if the selector is invalid.
+//
+// NOTE: Limit checking is not performed in the retail build
+// of Windows NT. It is performed in the checked (debug) build
+// of WOW32.DLL, which will cause 0 to be returned when the
+// limit is exceeded by the supplied offset.
+//
+
+function GetVDMPointer32W(vp: LPVOID; fMode: UINT): DWORD; stdcall;
+{$EXTERNALSYM GetVDMPointer32W}
+
+//
+// Win32 module management.
+//
+// The following routines accept parameters that correspond directly
+// to the respective Win32 API function calls that they invoke. Refer
+// to the Win32 reference documentation for more detail.
+
+function LoadLibraryEx32W(lpszLibFile: LPCSTR; hFile, dwFlags: DWORD): DWORD; stdcall;
+{$EXTERNALSYM LoadLibraryEx32W}
+function GetProcAddress32W(hModule: DWORD; lpszProc: LPCSTR): DWORD; stdcall;
+{$EXTERNALSYM GetProcAddress32W}
+function FreeLibrary32W(hLibModule: DWORD): DWORD; stdcall;
+{$EXTERNALSYM FreeLibrary32W}
+
+//
+// Generic Thunk Routine:
+//
+// CallProc32W
+//
+// Transitions to 32 bits and calls specified routine
+//
+// This routine can pass a variable number of arguments, up to 32, to the
+// target 32-bit routine. These arguments are given to CallProc32W following
+// the 3 required parameters.
+//
+// DWORD cParams - Number of optional DWORD parameters (0-32)
+//
+// LPVOID fAddressConvert - Bit Field, for 16:16 address Convertion. The
+// optional parameters can be automatically converted
+// from a 16:16 address format to flat by specifying
+// a 1 bit in the corresponding position in this mask.
+// eg (bit 1 means convert parameter 1 from 16:16
+// to flat address before calling routine)
+//
+// DWORD lpProcAddress - 32 bit native address to call (use LoadLibraryEx32W
+// and GetProcAddress32W to get this address).
+//
+// Returns:
+// What ever the API returned on 32 bit side in AX:DX
+//
+// Error Returns:
+// AX = 0, more than 32 parameters.
+//
+//
+// The function prototype must be declared by the application source code
+// in the following format:
+//
+// DWORD FAR PASCAL CallProc32W( DWORD p1, ... , DWORD lpProcAddress,
+// DWORD fAddressConvert, DWORD cParams);
+//
+// where the value in cParams must match the actual number of optional
+// parameters (p1-pn) given AND the "DWORD p1, ..." must be replaced by
+// the correct number of parameters being passed. For example, passing 3
+// parameter would simply require the removal of the ... and it insertion of
+// "DWORD p2, DWORD p3" instead. The fAddressConvert parameter uses bit 1
+// for the last parameter (p3 in our example), with bit 2 for the next to last,
+// etc.
+//
+// Generic Thunk Routine:
+//
+// CallProcEx32W
+//
+// Transitions to 32 bits and calls specified routine
+//
+// Similar to the CallProc32W function, the CallProcEx32W is an equivalent
+// function that is C calling convention and allows easier and more flexible
+// prototyping. See the prototype below. The fAddressConvert parameter uses
+// bit 1 for the 1st parameter, bit 2 for the 2nd parameter, etc.
+//
+// Both CallProc32W and CallProcEx32W accept a flag OR'd with the parameter
+// count to indicate the calling convention of the function in 32 bits.
+// For example, to call a cdecl function in 32-bits with 1 parameter, it would
+// look like this:
+//
+// dwResult = CallProcEx32W( CPEX_DEST_CDECL | 1, 0, dwfn32, p1 );
+//
+
+// TODO Variable argument list wrapper!
+
+(*
+function CallProcEx32W(nParams, fAddressConvert, lpProcAddress: DWORD): DWORD; cdecl;
+{$EXTERNALSYM CallProcEx32W}
+*)
+
+const
+ CPEX_DEST_STDCALL = DWORD($00000000);
+ {$EXTERNALSYM CPEX_DEST_STDCALL}
+ CPEX_DEST_CDECL = DWORD($80000000);
+ {$EXTERNALSYM CPEX_DEST_CDECL}
+
+implementation
+
+const
+ wow16lib = 'kernel32.dll';
+
+//function CallProcEx32W; external wow16lib index 517;
+
+{$IFDEF DYNAMIC_LINK}
+
+var
+ _GetVDMPointer32W: Pointer;
+
+function GetVDMPointer32W;
+begin
+ GetProcedureAddress(_GetVDMPointer32W, wow16lib, '516');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetVDMPointer32W]
+ end;
+end;
+
+var
+ _LoadLibraryEx32W: Pointer;
+
+function LoadLibraryEx32W;
+begin
+ GetProcedureAddress(_LoadLibraryEx32W, wow16lib, '513');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_LoadLibraryEx32W]
+ end;
+end;
+
+var
+ _GetProcAddress32W: Pointer;
+
+function GetProcAddress32W;
+begin
+ GetProcedureAddress(_GetProcAddress32W, wow16lib, '515');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_GetProcAddress32W]
+ end;
+end;
+
+var
+ _FreeLibrary32W: Pointer;
+
+function FreeLibrary32W;
+begin
+ GetProcedureAddress(_FreeLibrary32W, wow16lib, '514');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_FreeLibrary32W]
+ end;
+end;
+
+{$ELSE}
+
+function GetVDMPointer32W; external wow16lib index 516;
+function LoadLibraryEx32W; external wow16lib index 513;
+function GetProcAddress32W; external wow16lib index 515;
+function FreeLibrary32W; external wow16lib index 514;
+
+{$ENDIF DYNAMIC_LINK}
+
+end.
diff --git a/packages/extra/winunits/jwawownt32.pas b/packages/extra/winunits/jwawownt32.pas
index 25b524e6d7..397635d432 100644
--- a/packages/extra/winunits/jwawownt32.pas
+++ b/packages/extra/winunits/jwawownt32.pas
@@ -1,718 +1,718 @@
-{******************************************************************************}
-{ }
-{ 32 bit Generic Thunks API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: wownt32.h, released June 2000. The original Pascal }
-{ code is: WowNT32.pas, released December 2000. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwawownt32.pas,v 1.1 2005/04/04 07:56:11 marco Exp $
-
-unit JwaWowNT32;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "wownt32.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaWinType;
-
-//
-// 16:16 -> 0:32 Pointer translation.
-//
-// WOWGetVDMPointer will convert the passed in 16-bit address
-// to the equivalent 32-bit flat pointer. If fProtectedMode
-// is TRUE, the function treats the upper 16 bits as a selector
-// in the local descriptor table. If fProtectedMode is FALSE,
-// the upper 16 bits are treated as a real-mode segment value.
-// In either case the lower 16 bits are treated as the offset.
-//
-// The return value is NULL if the selector is invalid.
-//
-// NOTE: Limit checking is not performed in the retail build
-// of Windows NT. It is performed in the checked (debug) build
-// of WOW32.DLL, which will cause NULL to be returned when the
-// limit is exceeded by the supplied offset.
-//
-
-function WOWGetVDMPointer(vp, dwBytes: DWORD; fProtectedMode: BOOL): LPVOID; stdcall;
-{$EXTERNALSYM WOWGetVDMPointer}
-
-//
-// The following two functions are here for compatibility with
-// Windows 95. On Win95, the global heap can be rearranged,
-// invalidating flat pointers returned by WOWGetVDMPointer, while
-// a thunk is executing. On Windows NT, the 16-bit VDM is completely
-// halted while a thunk executes, so the only way the heap will
-// be rearranged is if a callback is made to Win16 code.
-//
-// The Win95 versions of these functions call GlobalFix to
-// lock down a segment's flat address, and GlobalUnfix to
-// release the segment.
-//
-// The Windows NT implementations of these functions do *not*
-// call GlobalFix/GlobalUnfix on the segment, because there
-// will not be any heap motion unless a callback occurs.
-// If your thunk does callback to the 16-bit side, be sure
-// to discard flat pointers and call WOWGetVDMPointer again
-// to be sure the flat address is correct.
-//
-
-function WOWGetVDMPointerFix(vp, dwBytes: DWORD; fProtectedMode: BOOL): LPVOID; stdcall;
-{$EXTERNALSYM WOWGetVDMPointerFix}
-procedure WOWGetVDMPointerUnfix(vp: DWORD); stdcall;
-{$EXTERNALSYM WOWGetVDMPointerUnfix}
-
-//
-// Win16 memory management.
-//
-// These functions can be used to manage memory in the Win16
-// heap. The following four functions are identical to their
-// Win16 counterparts, except that they are called from Win32
-// code.
-//
-
-function WOWGlobalAlloc16(wFlags: WORD; cb: DWORD): WORD; stdcall;
-{$EXTERNALSYM WOWGlobalAlloc16}
-function WOWGlobalFree16(hMem: WORD): WORD; stdcall;
-{$EXTERNALSYM WOWGlobalFree16}
-function WOWGlobalLock16(hMem: WORD): DWORD; stdcall;
-{$EXTERNALSYM WOWGlobalLock16}
-function WOWGlobalUnlock16(hMem: WORD): BOOL; stdcall;
-{$EXTERNALSYM WOWGlobalUnlock16}
-
-//
-// The following three functions combine two common operations in
-// one switch to 16-bit mode.
-//
-
-function WOWGlobalAllocLock16(wFlags: WORD; cb: DWORD; var phMem: WORD): DWORD; stdcall;
-{$EXTERNALSYM WOWGlobalAllocLock16}
-function WOWGlobalUnlockFree16(vpMem: DWORD): WORD; stdcall;
-{$EXTERNALSYM WOWGlobalUnlockFree16}
-function WOWGlobalLockSize16(hMem: WORD; pcb: PDWORD): DWORD; stdcall;
-{$EXTERNALSYM WOWGlobalLockSize16}
-
-//
-// Yielding the Win16 nonpreemptive scheduler
-//
-// The following two functions are provided for Win32 code called
-// via Generic Thunks which needs to yield the Win16 scheduler so
-// that tasks in that VDM can execute while the thunk waits for
-// something to complete. These two functions are functionally
-// identical to calling back to 16-bit code which calls Yield or
-// DirectedYield.
-//
-
-procedure WOWYield16; stdcall;
-{$EXTERNALSYM WOWYield16}
-procedure WOWDirectedYield16(htask16: WORD); stdcall;
-{$EXTERNALSYM WOWDirectedYield16}
-
-//
-// 16 <--> 32 Handle mapping functions.
-//
-// NOTE: While some of these functions perform trivial
-// conversions, these functions must be used to maintain
-// compatibility with future versions of Windows NT which
-// may require different handle mapping.
-//
-
-type
- _WOW_HANDLE_TYPE = (
- WOW_TYPE_HWND,
- WOW_TYPE_HMENU,
- WOW_TYPE_HDWP,
- WOW_TYPE_HDROP,
- WOW_TYPE_HDC,
- WOW_TYPE_HFONT,
- WOW_TYPE_HMETAFILE,
- WOW_TYPE_HRGN,
- WOW_TYPE_HBITMAP,
- WOW_TYPE_HBRUSH,
- WOW_TYPE_HPALETTE,
- WOW_TYPE_HPEN,
- WOW_TYPE_HACCEL,
- WOW_TYPE_HTASK,
- WOW_TYPE_FULLHWND);
- {$EXTERNALSYM _WOW_HANDLE_TYPE}
- WOW_HANDLE_TYPE = _WOW_HANDLE_TYPE;
- {$EXTERNALSYM WOW_HANDLE_TYPE}
- TWowHandleType = WOW_HANDLE_TYPE;
-
-function WOWHandle32(Handle: WORD; Type_: WOW_HANDLE_TYPE): HANDLE; stdcall;
-{$EXTERNALSYM WOWHandle32}
-function WOWHandle16(Handle: HANDLE; Type_: WOW_HANDLE_TYPE): WORD; stdcall;
-{$EXTERNALSYM WOWHandle16}
-
-function HWND_32(h16: WORD): HANDLE;
-{$EXTERNALSYM HWND_32}
-function HMENU_32(h16: WORD): HANDLE;
-{$EXTERNALSYM HMENU_32}
-function HDWP_32(h16: WORD): HANDLE;
-{$EXTERNALSYM HDWP_32}
-function HDROP_32(h16: WORD): HANDLE;
-{$EXTERNALSYM HDROP_32}
-function HDC_32(h16: WORD): HANDLE;
-{$EXTERNALSYM HDC_32}
-function HFONT_32(h16: WORD): HANDLE;
-{$EXTERNALSYM HFONT_32}
-function HMETAFILE_32(h16: WORD): HANDLE;
-{$EXTERNALSYM HMETAFILE_32}
-function HRGN_32(h16: WORD): HANDLE;
-{$EXTERNALSYM HRGN_32}
-function HBITMAP_32(h16: WORD): HANDLE;
-{$EXTERNALSYM HBITMAP_32}
-function HBRUSH_32(h16: WORD): HANDLE;
-{$EXTERNALSYM HBRUSH_32}
-function HPALETTE_32(h16: WORD): HANDLE;
-{$EXTERNALSYM HPALETTE_32}
-function HPEN_32(h16: WORD): HANDLE;
-{$EXTERNALSYM HPEN_32}
-function HACCEL_32(h16: WORD): HANDLE;
-{$EXTERNALSYM HACCEL_32}
-function HTASK_32(h16: WORD): HANDLE;
-{$EXTERNALSYM HTASK_32}
-function FULLHWND_32(h16: WORD): HANDLE;
-{$EXTERNALSYM FULLHWND_32}
-function HWND_16(h32: HANDLE): WORD;
-{$EXTERNALSYM HWND_16}
-function HMENU_16(h32: HANDLE): WORD;
-{$EXTERNALSYM HMENU_16}
-function HDWP_16(h32: HANDLE): WORD;
-{$EXTERNALSYM HDWP_16}
-function HDROP_16(h32: HANDLE): WORD;
-{$EXTERNALSYM HDROP_16}
-function HDC_16(h32: HANDLE): WORD;
-{$EXTERNALSYM HDC_16}
-function HFONT_16(h32: HANDLE): WORD;
-{$EXTERNALSYM HFONT_16}
-function HMETAFILE_16(h32: HANDLE): WORD;
-{$EXTERNALSYM HMETAFILE_16}
-function HRGN_16(h32: HANDLE): WORD;
-{$EXTERNALSYM HRGN_16}
-function HBITMAP_16(h32: HANDLE): WORD;
-{$EXTERNALSYM HBITMAP_16}
-function HBRUSH_16(h32: HANDLE): WORD;
-{$EXTERNALSYM HBRUSH_16}
-function HPALETTE_16(h32: HANDLE): WORD;
-{$EXTERNALSYM HPALETTE_16}
-function HPEN_16(h32: HANDLE): WORD;
-{$EXTERNALSYM HPEN_16}
-function HACCEL_16(h32: HANDLE): WORD;
-{$EXTERNALSYM HACCEL_16}
-function HTASK_16(h32: HANDLE): WORD;
-{$EXTERNALSYM HTASK_16}
-
-//
-// Generic Callbacks.
-//
-// WOWCallback16 can be used in Win32 code called
-// from 16-bit (such as by using Generic Thunks) to call back to
-// the 16-bit side. The function called must be declared similarly
-// to the following:
-//
-// LONG FAR PASCAL CallbackRoutine(DWORD dwParam);
-//
-// If you are passing a pointer, declare the parameter as such:
-//
-// LONG FAR PASCAL CallbackRoutine(VOID FAR *vp);
-//
-// NOTE: If you are passing a pointer, you'll need to get the
-// pointer using WOWGlobalAlloc16 or WOWGlobalAllocLock16
-//
-// If the function called returns a WORD instead of a DWORD, the
-// upper 16 bits of the return value is undefined. Similarly, if
-// the function called has no return value, the entire return value
-// is undefined.
-//
-// WOWCallback16Ex allows any combination of arguments up to
-// WCB16_MAX_CBARGS bytes total to be passed to the 16-bit routine.
-// cbArgs is used to properly clean up the 16-bit stack after calling
-// the routine. Regardless of the value of cbArgs, WCB16_MAX_CBARGS
-// bytes will always be copied from pArgs to the 16-bit stack. If
-// pArgs is less than WCB16_MAX_CBARGS bytes from the end of a page,
-// and the next page is inaccessible, WOWCallback16Ex will incur an
-// access violation.
-//
-// If cbArgs is larger than the WCB16_MAX_ARGS which the running
-// system supports, the function returns FALSE and GetLastError
-// returns ERROR_INVALID_PARAMETER. Otherwise the function
-// returns TRUE and the DWORD pointed to by pdwRetCode contains
-// the return code from the callback routine. If the callback
-// routine returns a WORD, the HIWORD of the return code is
-// undefined and should be ignored using LOWORD(dwRetCode).
-//
-// WOWCallback16Ex can call routines using the PASCAL and CDECL
-// calling conventions. The default is to use the PASCAL
-// calling convention. To use CDECL, pass WCB16_CDECL in the
-// dwFlags parameter.
-//
-// The arguments pointed to by pArgs must be in the correct
-// order for the callback routine's calling convention.
-// To call the PASCAL routine SetWindowText,
-//
-// LONG FAR PASCAL SetWindowText(HWND hwnd, LPCSTR lpsz);
-//
-// pArgs would point to an array of words:
-//
-// WORD SetWindowTextArgs[] = {OFFSETOF(lpsz), SELECTOROF(lpsz), hwnd};
-//
-// In other words, the arguments are placed in the array in reverse
-// order with the least significant word first for DWORDs and offset
-// first for FAR pointers.
-//
-// To call the CDECL routine wsprintf, for example
-//
-// LPSTR lpszFormat = "%d %s";
-// int _cdecl wsprintf(lpsz, lpszFormat, nValue. lpszString);
-//
-// pArgs would point to the array:
-//
-// WORD wsprintfArgs[] = {OFFSETOF(lpsz), SELECTOROF(lpsz),
-// OFFSETOF(lpszFormat), SELECTOROF(lpszFormat),
-// nValue,
-// OFFSETOF(lpszString), SELECTOROF(lpszString)};
-//
-// In other words, the arguments are placed in the array in the order
-// listed in the function prototype with the least significant word
-// first for DWORDs and offset first for FAR pointers.
-//
-
-function WOWCallback16(vpfn16: DWORD; dwParam: DWORD): DWORD; stdcall;
-{$EXTERNALSYM WOWCallback16}
-
-const
- WCB16_MAX_CBARGS = 16;
- {$EXTERNALSYM WCB16_MAX_CBARGS}
-
- WCB16_PASCAL = $0;
- {$EXTERNALSYM WCB16_PASCAL}
- WCB16_CDECL = $1;
- {$EXTERNALSYM WCB16_CDECL}
-
-function WOWCallback16Ex(vpfn16, dwFlags, cbArgs: DWORD; pArgs: PVOID; pdwRetCode: PDWORD): BOOL; stdcall;
-{$EXTERNALSYM WOWCallback16Ex}
-
-implementation
-
-const
- wow32lib = 'wow32.dll';
-
-function HWND_32(h16: WORD): HANDLE;
-begin
- Result := WOWHandle32(h16, WOW_TYPE_HWND);
-end;
-
-function HMENU_32(h16: WORD): HANDLE;
-begin
- Result := WOWHandle32(h16, WOW_TYPE_HMENU);
-end;
-
-function HDWP_32(h16: WORD): HANDLE;
-begin
- Result := WOWHandle32(h16, WOW_TYPE_HDWP);
-end;
-
-function HDROP_32(h16: WORD): HANDLE;
-begin
- Result := WOWHandle32(h16, WOW_TYPE_HDROP);
-end;
-
-function HDC_32(h16: WORD): HANDLE;
-begin
- Result := WOWHandle32(h16, WOW_TYPE_HDC);
-end;
-
-function HFONT_32(h16: WORD): HANDLE;
-begin
- Result := WOWHandle32(h16, WOW_TYPE_HFONT);
-end;
-
-function HMETAFILE_32(h16: WORD): HANDLE;
-begin
- Result := WOWHandle32(h16, WOW_TYPE_HMETAFILE);
-end;
-
-function HRGN_32(h16: WORD): HANDLE;
-begin
- Result := WOWHandle32(h16, WOW_TYPE_HRGN);
-end;
-
-function HBITMAP_32(h16: WORD): HANDLE;
-begin
- Result := WOWHandle32(h16, WOW_TYPE_HBITMAP);
-end;
-
-function HBRUSH_32(h16: WORD): HANDLE;
-begin
- Result := WOWHandle32(h16, WOW_TYPE_HBRUSH);
-end;
-
-function HPALETTE_32(h16: WORD): HANDLE;
-begin
- Result := WOWHandle32(h16, WOW_TYPE_HPALETTE);
-end;
-
-function HPEN_32(h16: WORD): HANDLE;
-begin
- Result := WOWHandle32(h16, WOW_TYPE_HPEN);
-end;
-
-function HACCEL_32(h16: WORD): HANDLE;
-begin
- Result := WOWHandle32(h16, WOW_TYPE_HACCEL);
-end;
-
-function HTASK_32(h16: WORD): HANDLE;
-begin
- Result := WOWHandle32(h16, WOW_TYPE_HTASK);
-end;
-
-function FULLHWND_32(h16: WORD): HANDLE;
-begin
- Result := WOWHandle32(h16, WOW_TYPE_FULLHWND);
-end;
-
-function HWND_16(h32: HANDLE): WORD;
-begin
- Result := WOWHandle16(h32, WOW_TYPE_HWND);
-end;
-
-function HMENU_16(h32: HANDLE): WORD;
-begin
- Result := WOWHandle16(h32, WOW_TYPE_HMENU);
-end;
-
-function HDWP_16(h32: HANDLE): WORD;
-begin
- Result := WOWHandle16(h32, WOW_TYPE_HDWP);
-end;
-
-function HDROP_16(h32: HANDLE): WORD;
-begin
- Result := WOWHandle16(h32, WOW_TYPE_HDROP);
-end;
-
-function HDC_16(h32: HANDLE): WORD;
-begin
- Result := WOWHandle16(h32, WOW_TYPE_HDC);
-end;
-
-function HFONT_16(h32: HANDLE): WORD;
-begin
- Result := WOWHandle16(h32, WOW_TYPE_HFONT);
-end;
-
-function HMETAFILE_16(h32: HANDLE): WORD;
-begin
- Result := WOWHandle16(h32, WOW_TYPE_HMETAFILE);
-end;
-
-function HRGN_16(h32: HANDLE): WORD;
-begin
- Result := WOWHandle16(h32, WOW_TYPE_HRGN);
-end;
-
-function HBITMAP_16(h32: HANDLE): WORD;
-begin
- Result := WOWHandle16(h32, WOW_TYPE_HBITMAP);
-end;
-
-function HBRUSH_16(h32: HANDLE): WORD;
-begin
- Result := WOWHandle16(h32, WOW_TYPE_HBRUSH);
-end;
-
-function HPALETTE_16(h32: HANDLE): WORD;
-begin
- Result := WOWHandle16(h32, WOW_TYPE_HPALETTE);
-end;
-
-function HPEN_16(h32: HANDLE): WORD;
-begin
- Result := WOWHandle16(h32, WOW_TYPE_HPEN);
-end;
-
-function HACCEL_16(h32: HANDLE): WORD;
-begin
- Result := WOWHandle16(h32, WOW_TYPE_HACCEL);
-end;
-
-function HTASK_16(h32: HANDLE): WORD;
-begin
- Result := WOWHandle16(h32, WOW_TYPE_HTASK);
-end;
-
-{$IFDEF DYNAMIC_LINK}
-
-var
- _WOWGetVDMPointer: Pointer;
-
-function WOWGetVDMPointer;
-begin
- GetProcedureAddress(_WOWGetVDMPointer, wow32lib, 'WOWGetVDMPointer');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WOWGetVDMPointer]
- end;
-end;
-
-var
- _WOWGetVDMPointerFix: Pointer;
-
-function WOWGetVDMPointerFix;
-begin
- GetProcedureAddress(_WOWGetVDMPointerFix, wow32lib, 'WOWGetVDMPointerFix');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WOWGetVDMPointerFix]
- end;
-end;
-
-var
- _WOWGetVDMPointerUnfix: Pointer;
-
-procedure WOWGetVDMPointerUnfix;
-begin
- GetProcedureAddress(_WOWGetVDMPointerUnfix, wow32lib, 'WOWGetVDMPointerUnfix');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WOWGetVDMPointerUnfix]
- end;
-end;
-
-var
- _WOWGlobalAlloc16: Pointer;
-
-function WOWGlobalAlloc16;
-begin
- GetProcedureAddress(_WOWGlobalAlloc16, wow32lib, 'WOWGlobalAlloc16');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WOWGlobalAlloc16]
- end;
-end;
-
-var
- _WOWGlobalFree16: Pointer;
-
-function WOWGlobalFree16;
-begin
- GetProcedureAddress(_WOWGlobalFree16, wow32lib, 'WOWGlobalFree16');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WOWGlobalFree16]
- end;
-end;
-
-var
- _WOWGlobalLock16: Pointer;
-
-function WOWGlobalLock16;
-begin
- GetProcedureAddress(_WOWGlobalLock16, wow32lib, 'WOWGlobalLock16');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WOWGlobalLock16]
- end;
-end;
-
-var
- _WOWGlobalUnlock16: Pointer;
-
-function WOWGlobalUnlock16;
-begin
- GetProcedureAddress(_WOWGlobalUnlock16, wow32lib, 'WOWGlobalUnlock16');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WOWGlobalUnlock16]
- end;
-end;
-
-var
- _WOWGlobalAllocLock16: Pointer;
-
-function WOWGlobalAllocLock16;
-begin
- GetProcedureAddress(_WOWGlobalAllocLock16, wow32lib, 'WOWGlobalAllocLock16');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WOWGlobalAllocLock16]
- end;
-end;
-
-var
- _WOWGlobalUnlockFree16: Pointer;
-
-function WOWGlobalUnlockFree16;
-begin
- GetProcedureAddress(_WOWGlobalUnlockFree16, wow32lib, 'WOWGlobalUnlockFree16');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WOWGlobalUnlockFree16]
- end;
-end;
-
-var
- _WOWGlobalLockSize16: Pointer;
-
-function WOWGlobalLockSize16;
-begin
- GetProcedureAddress(_WOWGlobalLockSize16, wow32lib, 'WOWGlobalLockSize16');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WOWGlobalLockSize16]
- end;
-end;
-
-var
- _WOWYield16: Pointer;
-
-procedure WOWYield16;
-begin
- GetProcedureAddress(_WOWYield16, wow32lib, 'WOWYield16');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WOWYield16]
- end;
-end;
-
-var
- _WOWDirectedYield16: Pointer;
-
-procedure WOWDirectedYield16;
-begin
- GetProcedureAddress(_WOWDirectedYield16, wow32lib, 'WOWDirectedYield16');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WOWDirectedYield16]
- end;
-end;
-
-var
- _WOWHandle32: Pointer;
-
-function WOWHandle32;
-begin
- GetProcedureAddress(_WOWHandle32, wow32lib, 'WOWHandle32');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WOWHandle32]
- end;
-end;
-
-var
- _WOWHandle16: Pointer;
-
-function WOWHandle16;
-begin
- GetProcedureAddress(_WOWHandle16, wow32lib, 'WOWHandle16');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WOWHandle16]
- end;
-end;
-
-var
- _WOWCallback16: Pointer;
-
-function WOWCallback16;
-begin
- GetProcedureAddress(_WOWCallback16, wow32lib, 'WOWCallback16');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WOWCallback16]
- end;
-end;
-
-var
- _WOWCallback16Ex: Pointer;
-
-function WOWCallback16Ex;
-begin
- GetProcedureAddress(_WOWCallback16Ex, wow32lib, 'WOWCallback16Ex');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WOWCallback16Ex]
- end;
-end;
-
-{$ELSE}
-
-function WOWGetVDMPointer; external wow32lib name 'WOWGetVDMPointer';
-function WOWGetVDMPointerFix; external wow32lib name 'WOWGetVDMPointerFix';
-procedure WOWGetVDMPointerUnfix; external wow32lib name 'WOWGetVDMPointerUnfix';
-function WOWGlobalAlloc16; external wow32lib name 'WOWGlobalAlloc16';
-function WOWGlobalFree16; external wow32lib name 'WOWGlobalFree16';
-function WOWGlobalLock16; external wow32lib name 'WOWGlobalLock16';
-function WOWGlobalUnlock16; external wow32lib name 'WOWGlobalUnlock16';
-function WOWGlobalAllocLock16; external wow32lib name 'WOWGlobalAllocLock16';
-function WOWGlobalUnlockFree16; external wow32lib name 'WOWGlobalUnlockFree16';
-function WOWGlobalLockSize16; external wow32lib name 'WOWGlobalLockSize16';
-procedure WOWYield16; external wow32lib name 'WOWYield16';
-procedure WOWDirectedYield16; external wow32lib name 'WOWDirectedYield16';
-function WOWHandle32; external wow32lib name 'WOWHandle32';
-function WOWHandle16; external wow32lib name 'WOWHandle16';
-function WOWCallback16; external wow32lib name 'WOWCallback16';
-function WOWCallback16Ex; external wow32lib name 'WOWCallback16Ex';
-
-{$ENDIF DYNAMIC_LINK}
-
-end.
+{******************************************************************************}
+{ }
+{ 32 bit Generic Thunks API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: wownt32.h, released June 2000. The original Pascal }
+{ code is: WowNT32.pas, released December 2000. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwawownt32.pas,v 1.1 2005/04/04 07:56:11 marco Exp $
+
+unit JwaWowNT32;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "wownt32.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaWinType;
+
+//
+// 16:16 -> 0:32 Pointer translation.
+//
+// WOWGetVDMPointer will convert the passed in 16-bit address
+// to the equivalent 32-bit flat pointer. If fProtectedMode
+// is TRUE, the function treats the upper 16 bits as a selector
+// in the local descriptor table. If fProtectedMode is FALSE,
+// the upper 16 bits are treated as a real-mode segment value.
+// In either case the lower 16 bits are treated as the offset.
+//
+// The return value is NULL if the selector is invalid.
+//
+// NOTE: Limit checking is not performed in the retail build
+// of Windows NT. It is performed in the checked (debug) build
+// of WOW32.DLL, which will cause NULL to be returned when the
+// limit is exceeded by the supplied offset.
+//
+
+function WOWGetVDMPointer(vp, dwBytes: DWORD; fProtectedMode: BOOL): LPVOID; stdcall;
+{$EXTERNALSYM WOWGetVDMPointer}
+
+//
+// The following two functions are here for compatibility with
+// Windows 95. On Win95, the global heap can be rearranged,
+// invalidating flat pointers returned by WOWGetVDMPointer, while
+// a thunk is executing. On Windows NT, the 16-bit VDM is completely
+// halted while a thunk executes, so the only way the heap will
+// be rearranged is if a callback is made to Win16 code.
+//
+// The Win95 versions of these functions call GlobalFix to
+// lock down a segment's flat address, and GlobalUnfix to
+// release the segment.
+//
+// The Windows NT implementations of these functions do *not*
+// call GlobalFix/GlobalUnfix on the segment, because there
+// will not be any heap motion unless a callback occurs.
+// If your thunk does callback to the 16-bit side, be sure
+// to discard flat pointers and call WOWGetVDMPointer again
+// to be sure the flat address is correct.
+//
+
+function WOWGetVDMPointerFix(vp, dwBytes: DWORD; fProtectedMode: BOOL): LPVOID; stdcall;
+{$EXTERNALSYM WOWGetVDMPointerFix}
+procedure WOWGetVDMPointerUnfix(vp: DWORD); stdcall;
+{$EXTERNALSYM WOWGetVDMPointerUnfix}
+
+//
+// Win16 memory management.
+//
+// These functions can be used to manage memory in the Win16
+// heap. The following four functions are identical to their
+// Win16 counterparts, except that they are called from Win32
+// code.
+//
+
+function WOWGlobalAlloc16(wFlags: WORD; cb: DWORD): WORD; stdcall;
+{$EXTERNALSYM WOWGlobalAlloc16}
+function WOWGlobalFree16(hMem: WORD): WORD; stdcall;
+{$EXTERNALSYM WOWGlobalFree16}
+function WOWGlobalLock16(hMem: WORD): DWORD; stdcall;
+{$EXTERNALSYM WOWGlobalLock16}
+function WOWGlobalUnlock16(hMem: WORD): BOOL; stdcall;
+{$EXTERNALSYM WOWGlobalUnlock16}
+
+//
+// The following three functions combine two common operations in
+// one switch to 16-bit mode.
+//
+
+function WOWGlobalAllocLock16(wFlags: WORD; cb: DWORD; var phMem: WORD): DWORD; stdcall;
+{$EXTERNALSYM WOWGlobalAllocLock16}
+function WOWGlobalUnlockFree16(vpMem: DWORD): WORD; stdcall;
+{$EXTERNALSYM WOWGlobalUnlockFree16}
+function WOWGlobalLockSize16(hMem: WORD; pcb: PDWORD): DWORD; stdcall;
+{$EXTERNALSYM WOWGlobalLockSize16}
+
+//
+// Yielding the Win16 nonpreemptive scheduler
+//
+// The following two functions are provided for Win32 code called
+// via Generic Thunks which needs to yield the Win16 scheduler so
+// that tasks in that VDM can execute while the thunk waits for
+// something to complete. These two functions are functionally
+// identical to calling back to 16-bit code which calls Yield or
+// DirectedYield.
+//
+
+procedure WOWYield16; stdcall;
+{$EXTERNALSYM WOWYield16}
+procedure WOWDirectedYield16(htask16: WORD); stdcall;
+{$EXTERNALSYM WOWDirectedYield16}
+
+//
+// 16 <--> 32 Handle mapping functions.
+//
+// NOTE: While some of these functions perform trivial
+// conversions, these functions must be used to maintain
+// compatibility with future versions of Windows NT which
+// may require different handle mapping.
+//
+
+type
+ _WOW_HANDLE_TYPE = (
+ WOW_TYPE_HWND,
+ WOW_TYPE_HMENU,
+ WOW_TYPE_HDWP,
+ WOW_TYPE_HDROP,
+ WOW_TYPE_HDC,
+ WOW_TYPE_HFONT,
+ WOW_TYPE_HMETAFILE,
+ WOW_TYPE_HRGN,
+ WOW_TYPE_HBITMAP,
+ WOW_TYPE_HBRUSH,
+ WOW_TYPE_HPALETTE,
+ WOW_TYPE_HPEN,
+ WOW_TYPE_HACCEL,
+ WOW_TYPE_HTASK,
+ WOW_TYPE_FULLHWND);
+ {$EXTERNALSYM _WOW_HANDLE_TYPE}
+ WOW_HANDLE_TYPE = _WOW_HANDLE_TYPE;
+ {$EXTERNALSYM WOW_HANDLE_TYPE}
+ TWowHandleType = WOW_HANDLE_TYPE;
+
+function WOWHandle32(Handle: WORD; Type_: WOW_HANDLE_TYPE): HANDLE; stdcall;
+{$EXTERNALSYM WOWHandle32}
+function WOWHandle16(Handle: HANDLE; Type_: WOW_HANDLE_TYPE): WORD; stdcall;
+{$EXTERNALSYM WOWHandle16}
+
+function HWND_32(h16: WORD): HANDLE;
+{$EXTERNALSYM HWND_32}
+function HMENU_32(h16: WORD): HANDLE;
+{$EXTERNALSYM HMENU_32}
+function HDWP_32(h16: WORD): HANDLE;
+{$EXTERNALSYM HDWP_32}
+function HDROP_32(h16: WORD): HANDLE;
+{$EXTERNALSYM HDROP_32}
+function HDC_32(h16: WORD): HANDLE;
+{$EXTERNALSYM HDC_32}
+function HFONT_32(h16: WORD): HANDLE;
+{$EXTERNALSYM HFONT_32}
+function HMETAFILE_32(h16: WORD): HANDLE;
+{$EXTERNALSYM HMETAFILE_32}
+function HRGN_32(h16: WORD): HANDLE;
+{$EXTERNALSYM HRGN_32}
+function HBITMAP_32(h16: WORD): HANDLE;
+{$EXTERNALSYM HBITMAP_32}
+function HBRUSH_32(h16: WORD): HANDLE;
+{$EXTERNALSYM HBRUSH_32}
+function HPALETTE_32(h16: WORD): HANDLE;
+{$EXTERNALSYM HPALETTE_32}
+function HPEN_32(h16: WORD): HANDLE;
+{$EXTERNALSYM HPEN_32}
+function HACCEL_32(h16: WORD): HANDLE;
+{$EXTERNALSYM HACCEL_32}
+function HTASK_32(h16: WORD): HANDLE;
+{$EXTERNALSYM HTASK_32}
+function FULLHWND_32(h16: WORD): HANDLE;
+{$EXTERNALSYM FULLHWND_32}
+function HWND_16(h32: HANDLE): WORD;
+{$EXTERNALSYM HWND_16}
+function HMENU_16(h32: HANDLE): WORD;
+{$EXTERNALSYM HMENU_16}
+function HDWP_16(h32: HANDLE): WORD;
+{$EXTERNALSYM HDWP_16}
+function HDROP_16(h32: HANDLE): WORD;
+{$EXTERNALSYM HDROP_16}
+function HDC_16(h32: HANDLE): WORD;
+{$EXTERNALSYM HDC_16}
+function HFONT_16(h32: HANDLE): WORD;
+{$EXTERNALSYM HFONT_16}
+function HMETAFILE_16(h32: HANDLE): WORD;
+{$EXTERNALSYM HMETAFILE_16}
+function HRGN_16(h32: HANDLE): WORD;
+{$EXTERNALSYM HRGN_16}
+function HBITMAP_16(h32: HANDLE): WORD;
+{$EXTERNALSYM HBITMAP_16}
+function HBRUSH_16(h32: HANDLE): WORD;
+{$EXTERNALSYM HBRUSH_16}
+function HPALETTE_16(h32: HANDLE): WORD;
+{$EXTERNALSYM HPALETTE_16}
+function HPEN_16(h32: HANDLE): WORD;
+{$EXTERNALSYM HPEN_16}
+function HACCEL_16(h32: HANDLE): WORD;
+{$EXTERNALSYM HACCEL_16}
+function HTASK_16(h32: HANDLE): WORD;
+{$EXTERNALSYM HTASK_16}
+
+//
+// Generic Callbacks.
+//
+// WOWCallback16 can be used in Win32 code called
+// from 16-bit (such as by using Generic Thunks) to call back to
+// the 16-bit side. The function called must be declared similarly
+// to the following:
+//
+// LONG FAR PASCAL CallbackRoutine(DWORD dwParam);
+//
+// If you are passing a pointer, declare the parameter as such:
+//
+// LONG FAR PASCAL CallbackRoutine(VOID FAR *vp);
+//
+// NOTE: If you are passing a pointer, you'll need to get the
+// pointer using WOWGlobalAlloc16 or WOWGlobalAllocLock16
+//
+// If the function called returns a WORD instead of a DWORD, the
+// upper 16 bits of the return value is undefined. Similarly, if
+// the function called has no return value, the entire return value
+// is undefined.
+//
+// WOWCallback16Ex allows any combination of arguments up to
+// WCB16_MAX_CBARGS bytes total to be passed to the 16-bit routine.
+// cbArgs is used to properly clean up the 16-bit stack after calling
+// the routine. Regardless of the value of cbArgs, WCB16_MAX_CBARGS
+// bytes will always be copied from pArgs to the 16-bit stack. If
+// pArgs is less than WCB16_MAX_CBARGS bytes from the end of a page,
+// and the next page is inaccessible, WOWCallback16Ex will incur an
+// access violation.
+//
+// If cbArgs is larger than the WCB16_MAX_ARGS which the running
+// system supports, the function returns FALSE and GetLastError
+// returns ERROR_INVALID_PARAMETER. Otherwise the function
+// returns TRUE and the DWORD pointed to by pdwRetCode contains
+// the return code from the callback routine. If the callback
+// routine returns a WORD, the HIWORD of the return code is
+// undefined and should be ignored using LOWORD(dwRetCode).
+//
+// WOWCallback16Ex can call routines using the PASCAL and CDECL
+// calling conventions. The default is to use the PASCAL
+// calling convention. To use CDECL, pass WCB16_CDECL in the
+// dwFlags parameter.
+//
+// The arguments pointed to by pArgs must be in the correct
+// order for the callback routine's calling convention.
+// To call the PASCAL routine SetWindowText,
+//
+// LONG FAR PASCAL SetWindowText(HWND hwnd, LPCSTR lpsz);
+//
+// pArgs would point to an array of words:
+//
+// WORD SetWindowTextArgs[] = {OFFSETOF(lpsz), SELECTOROF(lpsz), hwnd};
+//
+// In other words, the arguments are placed in the array in reverse
+// order with the least significant word first for DWORDs and offset
+// first for FAR pointers.
+//
+// To call the CDECL routine wsprintf, for example
+//
+// LPSTR lpszFormat = "%d %s";
+// int _cdecl wsprintf(lpsz, lpszFormat, nValue. lpszString);
+//
+// pArgs would point to the array:
+//
+// WORD wsprintfArgs[] = {OFFSETOF(lpsz), SELECTOROF(lpsz),
+// OFFSETOF(lpszFormat), SELECTOROF(lpszFormat),
+// nValue,
+// OFFSETOF(lpszString), SELECTOROF(lpszString)};
+//
+// In other words, the arguments are placed in the array in the order
+// listed in the function prototype with the least significant word
+// first for DWORDs and offset first for FAR pointers.
+//
+
+function WOWCallback16(vpfn16: DWORD; dwParam: DWORD): DWORD; stdcall;
+{$EXTERNALSYM WOWCallback16}
+
+const
+ WCB16_MAX_CBARGS = 16;
+ {$EXTERNALSYM WCB16_MAX_CBARGS}
+
+ WCB16_PASCAL = $0;
+ {$EXTERNALSYM WCB16_PASCAL}
+ WCB16_CDECL = $1;
+ {$EXTERNALSYM WCB16_CDECL}
+
+function WOWCallback16Ex(vpfn16, dwFlags, cbArgs: DWORD; pArgs: PVOID; pdwRetCode: PDWORD): BOOL; stdcall;
+{$EXTERNALSYM WOWCallback16Ex}
+
+implementation
+
+const
+ wow32lib = 'wow32.dll';
+
+function HWND_32(h16: WORD): HANDLE;
+begin
+ Result := WOWHandle32(h16, WOW_TYPE_HWND);
+end;
+
+function HMENU_32(h16: WORD): HANDLE;
+begin
+ Result := WOWHandle32(h16, WOW_TYPE_HMENU);
+end;
+
+function HDWP_32(h16: WORD): HANDLE;
+begin
+ Result := WOWHandle32(h16, WOW_TYPE_HDWP);
+end;
+
+function HDROP_32(h16: WORD): HANDLE;
+begin
+ Result := WOWHandle32(h16, WOW_TYPE_HDROP);
+end;
+
+function HDC_32(h16: WORD): HANDLE;
+begin
+ Result := WOWHandle32(h16, WOW_TYPE_HDC);
+end;
+
+function HFONT_32(h16: WORD): HANDLE;
+begin
+ Result := WOWHandle32(h16, WOW_TYPE_HFONT);
+end;
+
+function HMETAFILE_32(h16: WORD): HANDLE;
+begin
+ Result := WOWHandle32(h16, WOW_TYPE_HMETAFILE);
+end;
+
+function HRGN_32(h16: WORD): HANDLE;
+begin
+ Result := WOWHandle32(h16, WOW_TYPE_HRGN);
+end;
+
+function HBITMAP_32(h16: WORD): HANDLE;
+begin
+ Result := WOWHandle32(h16, WOW_TYPE_HBITMAP);
+end;
+
+function HBRUSH_32(h16: WORD): HANDLE;
+begin
+ Result := WOWHandle32(h16, WOW_TYPE_HBRUSH);
+end;
+
+function HPALETTE_32(h16: WORD): HANDLE;
+begin
+ Result := WOWHandle32(h16, WOW_TYPE_HPALETTE);
+end;
+
+function HPEN_32(h16: WORD): HANDLE;
+begin
+ Result := WOWHandle32(h16, WOW_TYPE_HPEN);
+end;
+
+function HACCEL_32(h16: WORD): HANDLE;
+begin
+ Result := WOWHandle32(h16, WOW_TYPE_HACCEL);
+end;
+
+function HTASK_32(h16: WORD): HANDLE;
+begin
+ Result := WOWHandle32(h16, WOW_TYPE_HTASK);
+end;
+
+function FULLHWND_32(h16: WORD): HANDLE;
+begin
+ Result := WOWHandle32(h16, WOW_TYPE_FULLHWND);
+end;
+
+function HWND_16(h32: HANDLE): WORD;
+begin
+ Result := WOWHandle16(h32, WOW_TYPE_HWND);
+end;
+
+function HMENU_16(h32: HANDLE): WORD;
+begin
+ Result := WOWHandle16(h32, WOW_TYPE_HMENU);
+end;
+
+function HDWP_16(h32: HANDLE): WORD;
+begin
+ Result := WOWHandle16(h32, WOW_TYPE_HDWP);
+end;
+
+function HDROP_16(h32: HANDLE): WORD;
+begin
+ Result := WOWHandle16(h32, WOW_TYPE_HDROP);
+end;
+
+function HDC_16(h32: HANDLE): WORD;
+begin
+ Result := WOWHandle16(h32, WOW_TYPE_HDC);
+end;
+
+function HFONT_16(h32: HANDLE): WORD;
+begin
+ Result := WOWHandle16(h32, WOW_TYPE_HFONT);
+end;
+
+function HMETAFILE_16(h32: HANDLE): WORD;
+begin
+ Result := WOWHandle16(h32, WOW_TYPE_HMETAFILE);
+end;
+
+function HRGN_16(h32: HANDLE): WORD;
+begin
+ Result := WOWHandle16(h32, WOW_TYPE_HRGN);
+end;
+
+function HBITMAP_16(h32: HANDLE): WORD;
+begin
+ Result := WOWHandle16(h32, WOW_TYPE_HBITMAP);
+end;
+
+function HBRUSH_16(h32: HANDLE): WORD;
+begin
+ Result := WOWHandle16(h32, WOW_TYPE_HBRUSH);
+end;
+
+function HPALETTE_16(h32: HANDLE): WORD;
+begin
+ Result := WOWHandle16(h32, WOW_TYPE_HPALETTE);
+end;
+
+function HPEN_16(h32: HANDLE): WORD;
+begin
+ Result := WOWHandle16(h32, WOW_TYPE_HPEN);
+end;
+
+function HACCEL_16(h32: HANDLE): WORD;
+begin
+ Result := WOWHandle16(h32, WOW_TYPE_HACCEL);
+end;
+
+function HTASK_16(h32: HANDLE): WORD;
+begin
+ Result := WOWHandle16(h32, WOW_TYPE_HTASK);
+end;
+
+{$IFDEF DYNAMIC_LINK}
+
+var
+ _WOWGetVDMPointer: Pointer;
+
+function WOWGetVDMPointer;
+begin
+ GetProcedureAddress(_WOWGetVDMPointer, wow32lib, 'WOWGetVDMPointer');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WOWGetVDMPointer]
+ end;
+end;
+
+var
+ _WOWGetVDMPointerFix: Pointer;
+
+function WOWGetVDMPointerFix;
+begin
+ GetProcedureAddress(_WOWGetVDMPointerFix, wow32lib, 'WOWGetVDMPointerFix');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WOWGetVDMPointerFix]
+ end;
+end;
+
+var
+ _WOWGetVDMPointerUnfix: Pointer;
+
+procedure WOWGetVDMPointerUnfix;
+begin
+ GetProcedureAddress(_WOWGetVDMPointerUnfix, wow32lib, 'WOWGetVDMPointerUnfix');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WOWGetVDMPointerUnfix]
+ end;
+end;
+
+var
+ _WOWGlobalAlloc16: Pointer;
+
+function WOWGlobalAlloc16;
+begin
+ GetProcedureAddress(_WOWGlobalAlloc16, wow32lib, 'WOWGlobalAlloc16');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WOWGlobalAlloc16]
+ end;
+end;
+
+var
+ _WOWGlobalFree16: Pointer;
+
+function WOWGlobalFree16;
+begin
+ GetProcedureAddress(_WOWGlobalFree16, wow32lib, 'WOWGlobalFree16');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WOWGlobalFree16]
+ end;
+end;
+
+var
+ _WOWGlobalLock16: Pointer;
+
+function WOWGlobalLock16;
+begin
+ GetProcedureAddress(_WOWGlobalLock16, wow32lib, 'WOWGlobalLock16');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WOWGlobalLock16]
+ end;
+end;
+
+var
+ _WOWGlobalUnlock16: Pointer;
+
+function WOWGlobalUnlock16;
+begin
+ GetProcedureAddress(_WOWGlobalUnlock16, wow32lib, 'WOWGlobalUnlock16');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WOWGlobalUnlock16]
+ end;
+end;
+
+var
+ _WOWGlobalAllocLock16: Pointer;
+
+function WOWGlobalAllocLock16;
+begin
+ GetProcedureAddress(_WOWGlobalAllocLock16, wow32lib, 'WOWGlobalAllocLock16');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WOWGlobalAllocLock16]
+ end;
+end;
+
+var
+ _WOWGlobalUnlockFree16: Pointer;
+
+function WOWGlobalUnlockFree16;
+begin
+ GetProcedureAddress(_WOWGlobalUnlockFree16, wow32lib, 'WOWGlobalUnlockFree16');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WOWGlobalUnlockFree16]
+ end;
+end;
+
+var
+ _WOWGlobalLockSize16: Pointer;
+
+function WOWGlobalLockSize16;
+begin
+ GetProcedureAddress(_WOWGlobalLockSize16, wow32lib, 'WOWGlobalLockSize16');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WOWGlobalLockSize16]
+ end;
+end;
+
+var
+ _WOWYield16: Pointer;
+
+procedure WOWYield16;
+begin
+ GetProcedureAddress(_WOWYield16, wow32lib, 'WOWYield16');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WOWYield16]
+ end;
+end;
+
+var
+ _WOWDirectedYield16: Pointer;
+
+procedure WOWDirectedYield16;
+begin
+ GetProcedureAddress(_WOWDirectedYield16, wow32lib, 'WOWDirectedYield16');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WOWDirectedYield16]
+ end;
+end;
+
+var
+ _WOWHandle32: Pointer;
+
+function WOWHandle32;
+begin
+ GetProcedureAddress(_WOWHandle32, wow32lib, 'WOWHandle32');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WOWHandle32]
+ end;
+end;
+
+var
+ _WOWHandle16: Pointer;
+
+function WOWHandle16;
+begin
+ GetProcedureAddress(_WOWHandle16, wow32lib, 'WOWHandle16');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WOWHandle16]
+ end;
+end;
+
+var
+ _WOWCallback16: Pointer;
+
+function WOWCallback16;
+begin
+ GetProcedureAddress(_WOWCallback16, wow32lib, 'WOWCallback16');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WOWCallback16]
+ end;
+end;
+
+var
+ _WOWCallback16Ex: Pointer;
+
+function WOWCallback16Ex;
+begin
+ GetProcedureAddress(_WOWCallback16Ex, wow32lib, 'WOWCallback16Ex');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WOWCallback16Ex]
+ end;
+end;
+
+{$ELSE}
+
+function WOWGetVDMPointer; external wow32lib name 'WOWGetVDMPointer';
+function WOWGetVDMPointerFix; external wow32lib name 'WOWGetVDMPointerFix';
+procedure WOWGetVDMPointerUnfix; external wow32lib name 'WOWGetVDMPointerUnfix';
+function WOWGlobalAlloc16; external wow32lib name 'WOWGlobalAlloc16';
+function WOWGlobalFree16; external wow32lib name 'WOWGlobalFree16';
+function WOWGlobalLock16; external wow32lib name 'WOWGlobalLock16';
+function WOWGlobalUnlock16; external wow32lib name 'WOWGlobalUnlock16';
+function WOWGlobalAllocLock16; external wow32lib name 'WOWGlobalAllocLock16';
+function WOWGlobalUnlockFree16; external wow32lib name 'WOWGlobalUnlockFree16';
+function WOWGlobalLockSize16; external wow32lib name 'WOWGlobalLockSize16';
+procedure WOWYield16; external wow32lib name 'WOWYield16';
+procedure WOWDirectedYield16; external wow32lib name 'WOWDirectedYield16';
+function WOWHandle32; external wow32lib name 'WOWHandle32';
+function WOWHandle16; external wow32lib name 'WOWHandle16';
+function WOWCallback16; external wow32lib name 'WOWCallback16';
+function WOWCallback16Ex; external wow32lib name 'WOWCallback16Ex';
+
+{$ENDIF DYNAMIC_LINK}
+
+end.
diff --git a/packages/extra/winunits/jwawpapi.pas b/packages/extra/winunits/jwawpapi.pas
index b751c4da97..9d25aef8fd 100644
--- a/packages/extra/winunits/jwawpapi.pas
+++ b/packages/extra/winunits/jwawpapi.pas
@@ -1,536 +1,536 @@
-{******************************************************************************}
-{ }
-{ Web Publishing API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: wpapi.h, released June 2000. The original Pascal }
-{ code is: WPApi.pas, released December 2000. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwawpapi.pas,v 1.1 2005/04/04 07:56:11 marco Exp $
-
-unit JwaWPApi;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "wpapi.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaWPTypes, JwaWinType;
-
-//
-// Flags
-//
-
-const
- WPF_NO_RECURSIVE_POST = $00000001; // WpPost
- {$EXTERNALSYM WPF_NO_RECURSIVE_POST}
- WPF_NO_WIZARD = $00000002; // WpPost
- {$EXTERNALSYM WPF_NO_WIZARD}
- WPF_MINIMAL_UI = $00000004; // WpPost - OBSOLETE
- {$EXTERNALSYM WPF_MINIMAL_UI}
- WPF_FIRST_FILE_AS_DEFAULT = $00000008; // WpPost/PostFiles
- {$EXTERNALSYM WPF_FIRST_FILE_AS_DEFAULT}
- WPF_NO_DIRECT_LOOKUP = $00000010; // WpBindToSite
- {$EXTERNALSYM WPF_NO_DIRECT_LOOKUP}
- WPF_NO_URL_LOOKUP = $00000020; // WpBindToSite
- {$EXTERNALSYM WPF_NO_URL_LOOKUP}
- WPF_USE_PROVIDER_PASSED = $00000040; // WpCreateSite
- {$EXTERNALSYM WPF_USE_PROVIDER_PASSED}
- WPF_NO_VERIFY_POST = $00000080; // WpPost
- {$EXTERNALSYM WPF_NO_VERIFY_POST}
- WPF_NO_PROGRESS_DLGS = $00000200; // WpPost
- {$EXTERNALSYM WPF_NO_PROGRESS_DLGS}
- WPF_SHOWPAGE_WELCOME = $00010000; // WpPost/Wizard
- {$EXTERNALSYM WPF_SHOWPAGE_WELCOME}
- WPF_SHOWPAGE_SRCFILE = $00020000; // WpPost/Wizard
- {$EXTERNALSYM WPF_SHOWPAGE_SRCFILE}
- WPF_SHOWPAGE_DESTSITE = $00040000; // WpPost/Wizard
- {$EXTERNALSYM WPF_SHOWPAGE_DESTSITE}
- WPF_SHOWPAGE_PROVIDER = $00080000; // WpPost/Wizard/AddWizardPages
- {$EXTERNALSYM WPF_SHOWPAGE_PROVIDER}
- WPF_ENABLE_LOCAL_BASE_DIR = $00100000; // WpPost/Wizard
- {$EXTERNALSYM WPF_ENABLE_LOCAL_BASE_DIR}
-
- WPF_NO_UI = WPF_NO_WIZARD or WPF_NO_PROGRESS_DLGS;
- {$EXTERNALSYM WPF_NO_UI}
-
- WPF_SHOWPAGE_ALL = WPF_SHOWPAGE_WELCOME or WPF_SHOWPAGE_SRCFILE or WPF_SHOWPAGE_DESTSITE or WPF_SHOWPAGE_PROVIDER;
- {$EXTERNALSYM WPF_SHOWPAGE_ALL}
-
-//
-// Miscellaneous
-//
-
- MAX_SITENAME_LEN = 128;
- {$EXTERNALSYM MAX_SITENAME_LEN}
-
-//
-// Unicode APIs
-//
-
-function WpPostW(hwnd: HWND; dwNumLocalPaths: DWORD; pwsLocalPaths: LPWSTR;
- var pdwSiteNameBufLen: DWORD; wsSiteName: LPWSTR; var pdwDestURLBufLen: DWORD;
- wsDestURL: LPWSTR; dwFlag: DWORD): DWORD; stdcall;
-{$EXTERNALSYM WpPostW}
-function WpListSitesW(var pdwSitesBufLen: DWORD; pSitesBuffer: LPWPSITEINFOW;
- var pdwNumSites: DWORD): DWORD; stdcall;
-{$EXTERNALSYM WpListSitesW}
-function WpDoesSiteExistW(wsSiteName: LPCWSTR; var pfSiteExists: BOOL): DWORD; stdcall;
-{$EXTERNALSYM WpDoesSiteExistW}
-function WpDeleteSiteW(wsSiteName: LPCWSTR): DWORD; stdcall;
-{$EXTERNALSYM WpDeleteSiteW}
-function WpBindToSiteW(hwnd: HWND; wsSiteName, wsSitePostingURL: LPCWSTR;
- dwFlag, dwReserved: DWORD; out ppvUnk: IUnknown): DWORD; stdcall;
-{$EXTERNALSYM WpBindToSiteW}
-function WpCreateSiteW(wsSiteName, wsSiteLocalBaseDir, wsSitePostingURL,
- wsProviderCLSID: LPCWSTR; dwFlags: DWORD): DWORD; stdcall;
-{$EXTERNALSYM WpCreateSiteW}
-function WpEnumProvidersW(var pdwProvidersBufLen: DWORD; pProvidersBuffer: LPWPPROVINFOW;
- var pdwNumProviders: DWORD): DWORD; stdcall;
-{$EXTERNALSYM WpEnumProvidersW}
-function WpGetErrorStringW(uErrCode: UINT; wsOutputBuf: LPWSTR; var pdwBufLen: DWORD): DWORD; stdcall;
-{$EXTERNALSYM WpGetErrorStringW}
-
-//
-// ANSI APIs
-//
-
-function WpPostA(hwnd: HWND; dwNumLocalPaths: DWORD; pwsLocalPaths: LPSTR;
- var pdwSiteNameBufLen: DWORD; wsSiteName: LPSTR; var pdwDestURLBufLen: DWORD;
- wsDestURL: LPSTR; dwFlag: DWORD): DWORD; stdcall;
-{$EXTERNALSYM WpPostA}
-function WpListSitesA(var pdwSitesBufLen: DWORD; pSitesBuffer: LPWPSITEINFOA;
- var pdwNumSites: DWORD): DWORD; stdcall;
-{$EXTERNALSYM WpListSitesA}
-function WpDoesSiteExistA(wsSiteName: LPCSTR; var pfSiteExists: BOOL): DWORD; stdcall;
-{$EXTERNALSYM WpDoesSiteExistA}
-function WpDeleteSiteA(wsSiteName: LPCSTR): DWORD; stdcall;
-{$EXTERNALSYM WpDeleteSiteA}
-function WpBindToSiteA(hwnd: HWND; wsSiteName, wsSitePostingURL: LPCSTR;
- dwFlag, dwReserved: DWORD; out ppvUnk: IUnknown): DWORD; stdcall;
-{$EXTERNALSYM WpBindToSiteA}
-function WpCreateSiteA(wsSiteName, wsSiteLocalBaseDir, wsSitePostingURL,
- wsProviderCLSID: LPCSTR; dwFlags: DWORD): DWORD; stdcall;
-{$EXTERNALSYM WpCreateSiteA}
-function WpEnumProvidersA(var pdwProvidersBufLen: DWORD; pProvidersBuffer: LPWPPROVINFOA;
- var pdwNumProviders: DWORD): DWORD; stdcall;
-{$EXTERNALSYM WpEnumProvidersA}
-function WpGetErrorStringA(uErrCode: UINT; wsOutputBuf: LPSTR; var pdwBufLen: DWORD): DWORD; stdcall;
-{$EXTERNALSYM WpGetErrorStringA}
-
-function WpPost(hwnd: HWND; dwNumLocalPaths: DWORD; pwsLocalPaths: LPTSTR;
- var pdwSiteNameBufLen: DWORD; wsSiteName: LPTSTR; var pdwDestURLBufLen: DWORD;
- wsDestURL: LPTSTR; dwFlag: DWORD): DWORD; stdcall;
-{$EXTERNALSYM WpPost}
-function WpListSites(var pdwSitesBufLen: DWORD; pSitesBuffer: LPWPSITEINFO;
- var pdwNumSites: DWORD): DWORD; stdcall;
-{$EXTERNALSYM WpListSites}
-function WpDoesSiteExist(wsSiteName: LPCTSTR; var pfSiteExists: BOOL): DWORD; stdcall;
-{$EXTERNALSYM WpDoesSiteExist}
-function WpDeleteSite(wsSiteName: LPCTSTR): DWORD; stdcall;
-{$EXTERNALSYM WpDeleteSite}
-function WpBindToSite(hwnd: HWND; wsSiteName, wsSitePostingURL: LPCTSTR;
- dwFlag, dwReserved: DWORD; out ppvUnk: IUnknown): DWORD; stdcall;
-{$EXTERNALSYM WpBindToSite}
-function WpCreateSite(wsSiteName, wsSiteLocalBaseDir, wsSitePostingURL, wsProviderCLSID: LPCTSTR; dwFlags: DWORD): DWORD; stdcall;
-{$EXTERNALSYM WpCreateSite}
-function WpEnumProviders(var pdwProvidersBufLen: DWORD; pProvidersBuffer: LPWPPROVINFO;
- var pdwNumProviders: DWORD): DWORD; stdcall;
-{$EXTERNALSYM WpEnumProviders}
-function WpGetErrorString(uErrCode: UINT; wsOutputBuf: LPTSTR; var pdwBufLen: DWORD): DWORD; stdcall;
-{$EXTERNALSYM WpGetErrorString}
-
-implementation
-
-const
- wpapilib = 'wpapi.dll';
- {$IFDEF UNICODE}
- AWSuffix = 'W';
- {$ELSE}
- AWSuffix = 'A';
- {$ENDIF UNICODE}
-
-{$IFDEF DYNAMIC_LINK}
-
-var
- _WpPostA: Pointer;
-
-function WpPostA;
-begin
- GetProcedureAddress(_WpPostA, wpapilib, 'WpPostA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WpPostA]
- end;
-end;
-
-var
- _WpListSitesA: Pointer;
-
-function WpListSitesA;
-begin
- GetProcedureAddress(_WpListSitesA, wpapilib, 'WpListSitesA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WpListSitesA]
- end;
-end;
-
-var
- _WpDoesSiteExistA: Pointer;
-
-function WpDoesSiteExistA;
-begin
- GetProcedureAddress(_WpDoesSiteExistA, wpapilib, 'WpDoesSiteExistA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WpDoesSiteExistA]
- end;
-end;
-
-var
- _WpDeleteSiteA: Pointer;
-
-function WpDeleteSiteA;
-begin
- GetProcedureAddress(_WpDeleteSiteA, wpapilib, 'WpDeleteSiteA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WpDeleteSiteA]
- end;
-end;
-
-var
- _WpBindToSiteA: Pointer;
-
-function WpBindToSiteA;
-begin
- GetProcedureAddress(_WpBindToSiteA, wpapilib, 'WpBindToSiteA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WpBindToSiteA]
- end;
-end;
-
-var
- _WpCreateSiteA: Pointer;
-
-function WpCreateSiteA;
-begin
- GetProcedureAddress(_WpCreateSiteA, wpapilib, 'WpCreateSiteA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WpCreateSiteA]
- end;
-end;
-
-var
- _WpEnumProvidersA: Pointer;
-
-function WpEnumProvidersA;
-begin
- GetProcedureAddress(_WpEnumProvidersA, wpapilib, 'WpEnumProvidersA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WpEnumProvidersA]
- end;
-end;
-
-var
- _WpGetErrorStringA: Pointer;
-
-function WpGetErrorStringA;
-begin
- GetProcedureAddress(_WpGetErrorStringA, wpapilib, 'WpGetErrorStringA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WpGetErrorStringA]
- end;
-end;
-
-var
- _WpPostW: Pointer;
-
-function WpPostW;
-begin
- GetProcedureAddress(_WpPostW, wpapilib, 'WpPostW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WpPostW]
- end;
-end;
-
-var
- _WpListSitesW: Pointer;
-
-function WpListSitesW;
-begin
- GetProcedureAddress(_WpListSitesW, wpapilib, 'WpListSitesW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WpListSitesW]
- end;
-end;
-
-var
- _WpDoesSiteExistW: Pointer;
-
-function WpDoesSiteExistW;
-begin
- GetProcedureAddress(_WpDoesSiteExistW, wpapilib, 'WpDoesSiteExistW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WpDoesSiteExistW]
- end;
-end;
-
-var
- _WpDeleteSiteW: Pointer;
-
-function WpDeleteSiteW;
-begin
- GetProcedureAddress(_WpDeleteSiteW, wpapilib, 'WpDeleteSiteW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WpDeleteSiteW]
- end;
-end;
-
-var
- _WpBindToSiteW: Pointer;
-
-function WpBindToSiteW;
-begin
- GetProcedureAddress(_WpBindToSiteW, wpapilib, 'WpBindToSiteW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WpBindToSiteW]
- end;
-end;
-
-var
- _WpCreateSiteW: Pointer;
-
-function WpCreateSiteW;
-begin
- GetProcedureAddress(_WpCreateSiteW, wpapilib, 'WpCreateSiteW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WpCreateSiteW]
- end;
-end;
-
-var
- _WpEnumProvidersW: Pointer;
-
-function WpEnumProvidersW;
-begin
- GetProcedureAddress(_WpEnumProvidersW, wpapilib, 'WpEnumProvidersW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WpEnumProvidersW]
- end;
-end;
-
-var
- _WpGetErrorStringW: Pointer;
-
-function WpGetErrorStringW;
-begin
- GetProcedureAddress(_WpGetErrorStringW, wpapilib, 'WpGetErrorStringW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WpGetErrorStringW]
- end;
-end;
-
-var
- _WpPost: Pointer;
-
-function WpPost;
-begin
- GetProcedureAddress(_WpPost, wpapilib, 'WpPost' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WpPost]
- end;
-end;
-
-var
- _WpListSites: Pointer;
-
-function WpListSites;
-begin
- GetProcedureAddress(_WpListSites, wpapilib, 'WpListSites' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WpListSites]
- end;
-end;
-
-var
- _WpDoesSiteExist: Pointer;
-
-function WpDoesSiteExist;
-begin
- GetProcedureAddress(_WpDoesSiteExist, wpapilib, 'WpDoesSiteExist' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WpDoesSiteExist]
- end;
-end;
-
-var
- _WpDeleteSite: Pointer;
-
-function WpDeleteSite;
-begin
- GetProcedureAddress(_WpDeleteSite, wpapilib, 'WpDeleteSite' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WpDeleteSite]
- end;
-end;
-
-var
- _WpBindToSite: Pointer;
-
-function WpBindToSite;
-begin
- GetProcedureAddress(_WpBindToSite, wpapilib, 'WpBindToSite' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WpBindToSite]
- end;
-end;
-
-var
- _WpCreateSite: Pointer;
-
-function WpCreateSite;
-begin
- GetProcedureAddress(_WpCreateSite, wpapilib, 'WpCreateSite' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WpCreateSite]
- end;
-end;
-
-var
- _WpEnumProviders: Pointer;
-
-function WpEnumProviders;
-begin
- GetProcedureAddress(_WpEnumProviders, wpapilib, 'WpEnumProviders' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WpEnumProviders]
- end;
-end;
-
-var
- _WpGetErrorString: Pointer;
-
-function WpGetErrorString;
-begin
- GetProcedureAddress(_WpGetErrorString, wpapilib, 'WpGetErrorString' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WpGetErrorString]
- end;
-end;
-
-{$ELSE}
-
-function WpPostA; external wpapilib name 'WpPostA';
-function WpListSitesA; external wpapilib name 'WpListSitesA';
-function WpDoesSiteExistA; external wpapilib name 'WpDoesSiteExistA';
-function WpDeleteSiteA; external wpapilib name 'WpDeleteSiteA';
-function WpBindToSiteA; external wpapilib name 'WpBindToSiteA';
-function WpCreateSiteA; external wpapilib name 'WpCreateSiteA';
-function WpEnumProvidersA; external wpapilib name 'WpEnumProvidersA';
-function WpGetErrorStringA; external wpapilib name 'WpGetErrorStringA';
-function WpPostW; external wpapilib name 'WpPostW';
-function WpListSitesW; external wpapilib name 'WpListSitesW';
-function WpDoesSiteExistW; external wpapilib name 'WpDoesSiteExistW';
-function WpDeleteSiteW; external wpapilib name 'WpDeleteSiteW';
-function WpBindToSiteW; external wpapilib name 'WpBindToSiteW';
-function WpCreateSiteW; external wpapilib name 'WpCreateSiteW';
-function WpEnumProvidersW; external wpapilib name 'WpEnumProvidersW';
-function WpGetErrorStringW; external wpapilib name 'WpGetErrorStringW';
-function WpPost; external wpapilib name 'WpPost' + AWSuffix;
-function WpListSites; external wpapilib name 'WpListSites' + AWSuffix;
-function WpDoesSiteExist; external wpapilib name 'WpDoesSiteExist' + AWSuffix;
-function WpDeleteSite; external wpapilib name 'WpDeleteSite' + AWSuffix;
-function WpBindToSite; external wpapilib name 'WpBindToSite' + AWSuffix;
-function WpCreateSite; external wpapilib name 'WpCreateSite' + AWSuffix;
-function WpEnumProviders; external wpapilib name 'WpEnumProviders' + AWSuffix;
-function WpGetErrorString; external wpapilib name 'WpGetErrorString' + AWSuffix;
-
-{$ENDIF DYNAMIC_LINK}
-
-end.
+{******************************************************************************}
+{ }
+{ Web Publishing API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: wpapi.h, released June 2000. The original Pascal }
+{ code is: WPApi.pas, released December 2000. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwawpapi.pas,v 1.1 2005/04/04 07:56:11 marco Exp $
+
+unit JwaWPApi;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "wpapi.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaWPTypes, JwaWinType;
+
+//
+// Flags
+//
+
+const
+ WPF_NO_RECURSIVE_POST = $00000001; // WpPost
+ {$EXTERNALSYM WPF_NO_RECURSIVE_POST}
+ WPF_NO_WIZARD = $00000002; // WpPost
+ {$EXTERNALSYM WPF_NO_WIZARD}
+ WPF_MINIMAL_UI = $00000004; // WpPost - OBSOLETE
+ {$EXTERNALSYM WPF_MINIMAL_UI}
+ WPF_FIRST_FILE_AS_DEFAULT = $00000008; // WpPost/PostFiles
+ {$EXTERNALSYM WPF_FIRST_FILE_AS_DEFAULT}
+ WPF_NO_DIRECT_LOOKUP = $00000010; // WpBindToSite
+ {$EXTERNALSYM WPF_NO_DIRECT_LOOKUP}
+ WPF_NO_URL_LOOKUP = $00000020; // WpBindToSite
+ {$EXTERNALSYM WPF_NO_URL_LOOKUP}
+ WPF_USE_PROVIDER_PASSED = $00000040; // WpCreateSite
+ {$EXTERNALSYM WPF_USE_PROVIDER_PASSED}
+ WPF_NO_VERIFY_POST = $00000080; // WpPost
+ {$EXTERNALSYM WPF_NO_VERIFY_POST}
+ WPF_NO_PROGRESS_DLGS = $00000200; // WpPost
+ {$EXTERNALSYM WPF_NO_PROGRESS_DLGS}
+ WPF_SHOWPAGE_WELCOME = $00010000; // WpPost/Wizard
+ {$EXTERNALSYM WPF_SHOWPAGE_WELCOME}
+ WPF_SHOWPAGE_SRCFILE = $00020000; // WpPost/Wizard
+ {$EXTERNALSYM WPF_SHOWPAGE_SRCFILE}
+ WPF_SHOWPAGE_DESTSITE = $00040000; // WpPost/Wizard
+ {$EXTERNALSYM WPF_SHOWPAGE_DESTSITE}
+ WPF_SHOWPAGE_PROVIDER = $00080000; // WpPost/Wizard/AddWizardPages
+ {$EXTERNALSYM WPF_SHOWPAGE_PROVIDER}
+ WPF_ENABLE_LOCAL_BASE_DIR = $00100000; // WpPost/Wizard
+ {$EXTERNALSYM WPF_ENABLE_LOCAL_BASE_DIR}
+
+ WPF_NO_UI = WPF_NO_WIZARD or WPF_NO_PROGRESS_DLGS;
+ {$EXTERNALSYM WPF_NO_UI}
+
+ WPF_SHOWPAGE_ALL = WPF_SHOWPAGE_WELCOME or WPF_SHOWPAGE_SRCFILE or WPF_SHOWPAGE_DESTSITE or WPF_SHOWPAGE_PROVIDER;
+ {$EXTERNALSYM WPF_SHOWPAGE_ALL}
+
+//
+// Miscellaneous
+//
+
+ MAX_SITENAME_LEN = 128;
+ {$EXTERNALSYM MAX_SITENAME_LEN}
+
+//
+// Unicode APIs
+//
+
+function WpPostW(hwnd: HWND; dwNumLocalPaths: DWORD; pwsLocalPaths: LPWSTR;
+ var pdwSiteNameBufLen: DWORD; wsSiteName: LPWSTR; var pdwDestURLBufLen: DWORD;
+ wsDestURL: LPWSTR; dwFlag: DWORD): DWORD; stdcall;
+{$EXTERNALSYM WpPostW}
+function WpListSitesW(var pdwSitesBufLen: DWORD; pSitesBuffer: LPWPSITEINFOW;
+ var pdwNumSites: DWORD): DWORD; stdcall;
+{$EXTERNALSYM WpListSitesW}
+function WpDoesSiteExistW(wsSiteName: LPCWSTR; var pfSiteExists: BOOL): DWORD; stdcall;
+{$EXTERNALSYM WpDoesSiteExistW}
+function WpDeleteSiteW(wsSiteName: LPCWSTR): DWORD; stdcall;
+{$EXTERNALSYM WpDeleteSiteW}
+function WpBindToSiteW(hwnd: HWND; wsSiteName, wsSitePostingURL: LPCWSTR;
+ dwFlag, dwReserved: DWORD; out ppvUnk: IUnknown): DWORD; stdcall;
+{$EXTERNALSYM WpBindToSiteW}
+function WpCreateSiteW(wsSiteName, wsSiteLocalBaseDir, wsSitePostingURL,
+ wsProviderCLSID: LPCWSTR; dwFlags: DWORD): DWORD; stdcall;
+{$EXTERNALSYM WpCreateSiteW}
+function WpEnumProvidersW(var pdwProvidersBufLen: DWORD; pProvidersBuffer: LPWPPROVINFOW;
+ var pdwNumProviders: DWORD): DWORD; stdcall;
+{$EXTERNALSYM WpEnumProvidersW}
+function WpGetErrorStringW(uErrCode: UINT; wsOutputBuf: LPWSTR; var pdwBufLen: DWORD): DWORD; stdcall;
+{$EXTERNALSYM WpGetErrorStringW}
+
+//
+// ANSI APIs
+//
+
+function WpPostA(hwnd: HWND; dwNumLocalPaths: DWORD; pwsLocalPaths: LPSTR;
+ var pdwSiteNameBufLen: DWORD; wsSiteName: LPSTR; var pdwDestURLBufLen: DWORD;
+ wsDestURL: LPSTR; dwFlag: DWORD): DWORD; stdcall;
+{$EXTERNALSYM WpPostA}
+function WpListSitesA(var pdwSitesBufLen: DWORD; pSitesBuffer: LPWPSITEINFOA;
+ var pdwNumSites: DWORD): DWORD; stdcall;
+{$EXTERNALSYM WpListSitesA}
+function WpDoesSiteExistA(wsSiteName: LPCSTR; var pfSiteExists: BOOL): DWORD; stdcall;
+{$EXTERNALSYM WpDoesSiteExistA}
+function WpDeleteSiteA(wsSiteName: LPCSTR): DWORD; stdcall;
+{$EXTERNALSYM WpDeleteSiteA}
+function WpBindToSiteA(hwnd: HWND; wsSiteName, wsSitePostingURL: LPCSTR;
+ dwFlag, dwReserved: DWORD; out ppvUnk: IUnknown): DWORD; stdcall;
+{$EXTERNALSYM WpBindToSiteA}
+function WpCreateSiteA(wsSiteName, wsSiteLocalBaseDir, wsSitePostingURL,
+ wsProviderCLSID: LPCSTR; dwFlags: DWORD): DWORD; stdcall;
+{$EXTERNALSYM WpCreateSiteA}
+function WpEnumProvidersA(var pdwProvidersBufLen: DWORD; pProvidersBuffer: LPWPPROVINFOA;
+ var pdwNumProviders: DWORD): DWORD; stdcall;
+{$EXTERNALSYM WpEnumProvidersA}
+function WpGetErrorStringA(uErrCode: UINT; wsOutputBuf: LPSTR; var pdwBufLen: DWORD): DWORD; stdcall;
+{$EXTERNALSYM WpGetErrorStringA}
+
+function WpPost(hwnd: HWND; dwNumLocalPaths: DWORD; pwsLocalPaths: LPTSTR;
+ var pdwSiteNameBufLen: DWORD; wsSiteName: LPTSTR; var pdwDestURLBufLen: DWORD;
+ wsDestURL: LPTSTR; dwFlag: DWORD): DWORD; stdcall;
+{$EXTERNALSYM WpPost}
+function WpListSites(var pdwSitesBufLen: DWORD; pSitesBuffer: LPWPSITEINFO;
+ var pdwNumSites: DWORD): DWORD; stdcall;
+{$EXTERNALSYM WpListSites}
+function WpDoesSiteExist(wsSiteName: LPCTSTR; var pfSiteExists: BOOL): DWORD; stdcall;
+{$EXTERNALSYM WpDoesSiteExist}
+function WpDeleteSite(wsSiteName: LPCTSTR): DWORD; stdcall;
+{$EXTERNALSYM WpDeleteSite}
+function WpBindToSite(hwnd: HWND; wsSiteName, wsSitePostingURL: LPCTSTR;
+ dwFlag, dwReserved: DWORD; out ppvUnk: IUnknown): DWORD; stdcall;
+{$EXTERNALSYM WpBindToSite}
+function WpCreateSite(wsSiteName, wsSiteLocalBaseDir, wsSitePostingURL, wsProviderCLSID: LPCTSTR; dwFlags: DWORD): DWORD; stdcall;
+{$EXTERNALSYM WpCreateSite}
+function WpEnumProviders(var pdwProvidersBufLen: DWORD; pProvidersBuffer: LPWPPROVINFO;
+ var pdwNumProviders: DWORD): DWORD; stdcall;
+{$EXTERNALSYM WpEnumProviders}
+function WpGetErrorString(uErrCode: UINT; wsOutputBuf: LPTSTR; var pdwBufLen: DWORD): DWORD; stdcall;
+{$EXTERNALSYM WpGetErrorString}
+
+implementation
+
+const
+ wpapilib = 'wpapi.dll';
+ {$IFDEF UNICODE}
+ AWSuffix = 'W';
+ {$ELSE}
+ AWSuffix = 'A';
+ {$ENDIF UNICODE}
+
+{$IFDEF DYNAMIC_LINK}
+
+var
+ _WpPostA: Pointer;
+
+function WpPostA;
+begin
+ GetProcedureAddress(_WpPostA, wpapilib, 'WpPostA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WpPostA]
+ end;
+end;
+
+var
+ _WpListSitesA: Pointer;
+
+function WpListSitesA;
+begin
+ GetProcedureAddress(_WpListSitesA, wpapilib, 'WpListSitesA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WpListSitesA]
+ end;
+end;
+
+var
+ _WpDoesSiteExistA: Pointer;
+
+function WpDoesSiteExistA;
+begin
+ GetProcedureAddress(_WpDoesSiteExistA, wpapilib, 'WpDoesSiteExistA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WpDoesSiteExistA]
+ end;
+end;
+
+var
+ _WpDeleteSiteA: Pointer;
+
+function WpDeleteSiteA;
+begin
+ GetProcedureAddress(_WpDeleteSiteA, wpapilib, 'WpDeleteSiteA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WpDeleteSiteA]
+ end;
+end;
+
+var
+ _WpBindToSiteA: Pointer;
+
+function WpBindToSiteA;
+begin
+ GetProcedureAddress(_WpBindToSiteA, wpapilib, 'WpBindToSiteA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WpBindToSiteA]
+ end;
+end;
+
+var
+ _WpCreateSiteA: Pointer;
+
+function WpCreateSiteA;
+begin
+ GetProcedureAddress(_WpCreateSiteA, wpapilib, 'WpCreateSiteA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WpCreateSiteA]
+ end;
+end;
+
+var
+ _WpEnumProvidersA: Pointer;
+
+function WpEnumProvidersA;
+begin
+ GetProcedureAddress(_WpEnumProvidersA, wpapilib, 'WpEnumProvidersA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WpEnumProvidersA]
+ end;
+end;
+
+var
+ _WpGetErrorStringA: Pointer;
+
+function WpGetErrorStringA;
+begin
+ GetProcedureAddress(_WpGetErrorStringA, wpapilib, 'WpGetErrorStringA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WpGetErrorStringA]
+ end;
+end;
+
+var
+ _WpPostW: Pointer;
+
+function WpPostW;
+begin
+ GetProcedureAddress(_WpPostW, wpapilib, 'WpPostW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WpPostW]
+ end;
+end;
+
+var
+ _WpListSitesW: Pointer;
+
+function WpListSitesW;
+begin
+ GetProcedureAddress(_WpListSitesW, wpapilib, 'WpListSitesW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WpListSitesW]
+ end;
+end;
+
+var
+ _WpDoesSiteExistW: Pointer;
+
+function WpDoesSiteExistW;
+begin
+ GetProcedureAddress(_WpDoesSiteExistW, wpapilib, 'WpDoesSiteExistW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WpDoesSiteExistW]
+ end;
+end;
+
+var
+ _WpDeleteSiteW: Pointer;
+
+function WpDeleteSiteW;
+begin
+ GetProcedureAddress(_WpDeleteSiteW, wpapilib, 'WpDeleteSiteW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WpDeleteSiteW]
+ end;
+end;
+
+var
+ _WpBindToSiteW: Pointer;
+
+function WpBindToSiteW;
+begin
+ GetProcedureAddress(_WpBindToSiteW, wpapilib, 'WpBindToSiteW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WpBindToSiteW]
+ end;
+end;
+
+var
+ _WpCreateSiteW: Pointer;
+
+function WpCreateSiteW;
+begin
+ GetProcedureAddress(_WpCreateSiteW, wpapilib, 'WpCreateSiteW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WpCreateSiteW]
+ end;
+end;
+
+var
+ _WpEnumProvidersW: Pointer;
+
+function WpEnumProvidersW;
+begin
+ GetProcedureAddress(_WpEnumProvidersW, wpapilib, 'WpEnumProvidersW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WpEnumProvidersW]
+ end;
+end;
+
+var
+ _WpGetErrorStringW: Pointer;
+
+function WpGetErrorStringW;
+begin
+ GetProcedureAddress(_WpGetErrorStringW, wpapilib, 'WpGetErrorStringW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WpGetErrorStringW]
+ end;
+end;
+
+var
+ _WpPost: Pointer;
+
+function WpPost;
+begin
+ GetProcedureAddress(_WpPost, wpapilib, 'WpPost' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WpPost]
+ end;
+end;
+
+var
+ _WpListSites: Pointer;
+
+function WpListSites;
+begin
+ GetProcedureAddress(_WpListSites, wpapilib, 'WpListSites' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WpListSites]
+ end;
+end;
+
+var
+ _WpDoesSiteExist: Pointer;
+
+function WpDoesSiteExist;
+begin
+ GetProcedureAddress(_WpDoesSiteExist, wpapilib, 'WpDoesSiteExist' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WpDoesSiteExist]
+ end;
+end;
+
+var
+ _WpDeleteSite: Pointer;
+
+function WpDeleteSite;
+begin
+ GetProcedureAddress(_WpDeleteSite, wpapilib, 'WpDeleteSite' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WpDeleteSite]
+ end;
+end;
+
+var
+ _WpBindToSite: Pointer;
+
+function WpBindToSite;
+begin
+ GetProcedureAddress(_WpBindToSite, wpapilib, 'WpBindToSite' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WpBindToSite]
+ end;
+end;
+
+var
+ _WpCreateSite: Pointer;
+
+function WpCreateSite;
+begin
+ GetProcedureAddress(_WpCreateSite, wpapilib, 'WpCreateSite' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WpCreateSite]
+ end;
+end;
+
+var
+ _WpEnumProviders: Pointer;
+
+function WpEnumProviders;
+begin
+ GetProcedureAddress(_WpEnumProviders, wpapilib, 'WpEnumProviders' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WpEnumProviders]
+ end;
+end;
+
+var
+ _WpGetErrorString: Pointer;
+
+function WpGetErrorString;
+begin
+ GetProcedureAddress(_WpGetErrorString, wpapilib, 'WpGetErrorString' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WpGetErrorString]
+ end;
+end;
+
+{$ELSE}
+
+function WpPostA; external wpapilib name 'WpPostA';
+function WpListSitesA; external wpapilib name 'WpListSitesA';
+function WpDoesSiteExistA; external wpapilib name 'WpDoesSiteExistA';
+function WpDeleteSiteA; external wpapilib name 'WpDeleteSiteA';
+function WpBindToSiteA; external wpapilib name 'WpBindToSiteA';
+function WpCreateSiteA; external wpapilib name 'WpCreateSiteA';
+function WpEnumProvidersA; external wpapilib name 'WpEnumProvidersA';
+function WpGetErrorStringA; external wpapilib name 'WpGetErrorStringA';
+function WpPostW; external wpapilib name 'WpPostW';
+function WpListSitesW; external wpapilib name 'WpListSitesW';
+function WpDoesSiteExistW; external wpapilib name 'WpDoesSiteExistW';
+function WpDeleteSiteW; external wpapilib name 'WpDeleteSiteW';
+function WpBindToSiteW; external wpapilib name 'WpBindToSiteW';
+function WpCreateSiteW; external wpapilib name 'WpCreateSiteW';
+function WpEnumProvidersW; external wpapilib name 'WpEnumProvidersW';
+function WpGetErrorStringW; external wpapilib name 'WpGetErrorStringW';
+function WpPost; external wpapilib name 'WpPost' + AWSuffix;
+function WpListSites; external wpapilib name 'WpListSites' + AWSuffix;
+function WpDoesSiteExist; external wpapilib name 'WpDoesSiteExist' + AWSuffix;
+function WpDeleteSite; external wpapilib name 'WpDeleteSite' + AWSuffix;
+function WpBindToSite; external wpapilib name 'WpBindToSite' + AWSuffix;
+function WpCreateSite; external wpapilib name 'WpCreateSite' + AWSuffix;
+function WpEnumProviders; external wpapilib name 'WpEnumProviders' + AWSuffix;
+function WpGetErrorString; external wpapilib name 'WpGetErrorString' + AWSuffix;
+
+{$ENDIF DYNAMIC_LINK}
+
+end.
diff --git a/packages/extra/winunits/jwawpapimsg.pas b/packages/extra/winunits/jwawpapimsg.pas
index 9d4cd54992..9459b62ddb 100644
--- a/packages/extra/winunits/jwawpapimsg.pas
+++ b/packages/extra/winunits/jwawpapimsg.pas
@@ -1,394 +1,394 @@
-{******************************************************************************}
-{ }
-{ Web Publishing Error Codes API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: wpapimsg.h, released June 2000. The original Pascal }
-{ code is: WPApiMsg.pas, released December 2000. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwawpapimsg.pas,v 1.1 2005/04/04 07:56:11 marco Exp $
-
-unit JwaWPApiMsg;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "wpapimsg.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaWinType;
-
-//
-// Values are 32 bit values layed out as follows:
-//
-// 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1
-// 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
-// +---+-+-+-----------------------+-------------------------------+
-// |Sev|C|R| Facility | Code |
-// +---+-+-+-----------------------+-------------------------------+
-//
-// where
-//
-// Sev - is the severity code
-//
-// 00 - Success
-// 01 - Informational
-// 10 - Warning
-// 11 - Error
-//
-// C - is the Customer code flag
-//
-// R - is a reserved bit
-//
-// Facility - is the facility code
-//
-// Code - is the facility's status code
-//
-//
-// Define the facility codes
-//
-
-//
-// Define the severity codes
-//
-
-//
-// MessageId: WEBPOST_ERROR_FIRST
-//
-// MessageText:
-//
-// Web Publishing Wizard first error message.
-//
-
-const
- WEBPOST_ERROR_FIRST = DWORD($40042100);
- {$EXTERNALSYM WEBPOST_ERROR_FIRST}
-
-//
-// MessageId: WEBPOST_ERROR_UNKNOWN
-//
-// MessageText:
-//
-// An unknown error occurred in the Web Publishing Wizard.
-//
-
- WEBPOST_ERROR_UNKNOWN = DWORD($C0042101);
- {$EXTERNALSYM WEBPOST_ERROR_UNKNOWN}
-
-//
-// MessageId: WEBPOST_ERROR_PROVCLSID_UNKNOWN
-//
-// MessageText:
-//
-// The Web Publishing Wizard could not locate the service provider used to transfer files to your Web server.
-//
-
- WEBPOST_ERROR_PROVCLSID_UNKNOWN = DWORD($C0042102);
- {$EXTERNALSYM WEBPOST_ERROR_PROVCLSID_UNKNOWN}
-
-//
-// MessageId: WEBPOST_ERROR_SITE_CORRUPT
-//
-// MessageText:
-//
-// The Web Publishing Wizard could not retrieve all of the required information about your Web server.
-//
-
- WEBPOST_ERROR_SITE_CORRUPT = DWORD($C0042103);
- {$EXTERNALSYM WEBPOST_ERROR_SITE_CORRUPT}
-
-//
-// MessageId: WEBPOST_ERROR_PROV_CORRUPT
-//
-// MessageText:
-//
-// The Web Publishing Wizard could not retrieve all of the required information about this service provider.
-//
-
- WEBPOST_ERROR_PROV_CORRUPT = DWORD($C0042104);
- {$EXTERNALSYM WEBPOST_ERROR_PROV_CORRUPT}
-
-//
-// MessageId: WEBPOST_ERROR_PROV_DLL
-//
-// MessageText:
-//
-// The Web Publishing Wizard could not locate the file(s) for the requested service provider.
-//
-
- WEBPOST_ERROR_PROV_DLL = DWORD($C0042105);
- {$EXTERNALSYM WEBPOST_ERROR_PROV_DLL}
-
-//
-// MessageId: WEBPOST_ERROR_PROV_EP
-//
-// MessageText:
-//
-// The file(s) for the requested service provider are either corrupt or outdated.
-//
-
- WEBPOST_ERROR_PROV_EP = DWORD($C0042106);
- {$EXTERNALSYM WEBPOST_ERROR_PROV_EP}
-
-//
-// MessageId: WEBPOST_ERROR_INIT_FAILED
-//
-// MessageText:
-//
-// An error occurred while attempting to start the Web Publishing Wizard.
-//
-
- WEBPOST_ERROR_INIT_FAILED = DWORD($C0042107);
- {$EXTERNALSYM WEBPOST_ERROR_INIT_FAILED}
-
-//
-// MessageId: WEBPOST_ERROR_LIST_SITES
-//
-// MessageText:
-//
-// An error occurred while the Web Publishing Wizard was enumerating the Web servers to which you have previously published.
-//
-
- WEBPOST_ERROR_LIST_SITES = DWORD($C0042108);
- {$EXTERNALSYM WEBPOST_ERROR_LIST_SITES}
-
-//
-// MessageId: WEBPOST_ERROR_SITE_EXISTS
-//
-// MessageText:
-//
-// The Web Publishing Wizard could not use the requested descriptive name for your Web server because another Web server already uses the name.
-//
-
- WEBPOST_ERROR_SITE_EXISTS = DWORD($C0042109);
- {$EXTERNALSYM WEBPOST_ERROR_SITE_EXISTS}
-
-//
-// MessageId: WEBPOST_ERROR_CREATE_SITE
-//
-// MessageText:
-//
-// An error occurred while the Web Publishing Wizard was saving information about your Web server.
-//
-
- WEBPOST_ERROR_CREATE_SITE = DWORD($C004210A);
- {$EXTERNALSYM WEBPOST_ERROR_CREATE_SITE}
-
-//
-// MessageId: WEBPOST_ERROR_SITE_DOESNOTEXIST
-//
-// MessageText:
-//
-// Your computer does not contain any information about the Web server you have selected.
-//
-
- WEBPOST_ERROR_SITE_DOESNOTEXIST = DWORD($C004210B);
- {$EXTERNALSYM WEBPOST_ERROR_SITE_DOESNOTEXIST}
-
-//
-// MessageId: WEBPOST_ERROR_DELETE_SITE
-//
-// MessageText:
-//
-// An error occurred while the Web Publishing Wizard was deleting information about your Web server.
-//
-
- WEBPOST_ERROR_DELETE_SITE = DWORD($C004210C);
- {$EXTERNALSYM WEBPOST_ERROR_DELETE_SITE}
-
-//
-// MessageId: WEBPOST_ERROR_ENUM_PROVS
-//
-// MessageText:
-//
-// An error occurred while the Web Publishing Wizard was enumerating the service providers on this system.
-//
-
- WEBPOST_ERROR_ENUM_PROVS = DWORD($C004210D);
- {$EXTERNALSYM WEBPOST_ERROR_ENUM_PROVS}
-
-//
-// MessageId: WEBPOST_ERROR_PROV_QI
-//
-// MessageText:
-//
-// The Web Publishing Wizard was unable to determine the version number of your service provider.
-//
-
- WEBPOST_ERROR_PROV_QI = DWORD($C004210E);
- {$EXTERNALSYM WEBPOST_ERROR_PROV_QI}
-
-//
-// MessageId: WEBPOST_ERROR_POST_FILES
-//
-// MessageText:
-//
-// An error occurred while the Web Publishing Wizard was attempting to publish your files.
-//
-
- WEBPOST_ERROR_POST_FILES = DWORD($C004210F);
- {$EXTERNALSYM WEBPOST_ERROR_POST_FILES}
-
-//
-// MessageId: WEBPOST_ERROR_COCREATE_WIZARD
-//
-// MessageText:
-//
-// The Web Publishing Wizard is not installed correctly. Please uninstall and then reinstall the wizard.
-//
-
- WEBPOST_ERROR_COCREATE_WIZARD = DWORD($C0042110);
- {$EXTERNALSYM WEBPOST_ERROR_COCREATE_WIZARD}
-
-//
-// MessageId: WEBPOST_ERROR_POSTINFO_REQUIRED
-//
-// MessageText:
-//
-// Your service provider requires that a PostInfo file be located on the server. No PostInfo file could be located.
-//
-
- WEBPOST_ERROR_POSTINFO_REQUIRED = DWORD($C0042111);
- {$EXTERNALSYM WEBPOST_ERROR_POSTINFO_REQUIRED}
-
-//
-// MessageId: WEBPOST_ERROR_AUTOBIND_FAILED
-//
-// MessageText:
-//
-// The service provider could not be automatically selected for your Web server.
-//
-
- WEBPOST_ERROR_AUTOBIND_FAILED = DWORD($C0042112);
- {$EXTERNALSYM WEBPOST_ERROR_AUTOBIND_FAILED}
-
-//
-// MessageId: WEBPOST_ERROR_BAD_PROV_PTR
-//
-// MessageText:
-//
-// The Web Publishing Wizard was not able to obtain a valid pointer to the requested service provider.
-//
-
- WEBPOST_ERROR_BAD_PROV_PTR = DWORD($C0042113);
- {$EXTERNALSYM WEBPOST_ERROR_BAD_PROV_PTR}
-
-//
-// MessageId: WEBPOST_ERROR_PROV_NOT_IN_POSTINFO
-//
-// MessageText:
-//
-// The Web server you selected does not indicate support for the service provider you selected.
-//
-
- WEBPOST_ERROR_PROV_NOT_IN_POSTINFO = DWORD($80042114);
- {$EXTERNALSYM WEBPOST_ERROR_PROV_NOT_IN_POSTINFO}
-
-//
-// MessageId: WEBPOST_ERROR_EXTENDED_ERROR
-//
-// MessageText:
-//
-// Web Publishing Wizard extended error.
-//
-
- WEBPOST_ERROR_EXTENDED_ERROR = DWORD($C0042116);
- {$EXTERNALSYM WEBPOST_ERROR_EXTENDED_ERROR}
-
-//
-// MessageId: WEBPOST_ERROR_NO_EXT_ERR_INFO
-//
-// MessageText:
-//
-// An extended error occurred in the Web Publishing Wizard, but the error message could not be retrieved.
-//
-
- WEBPOST_ERROR_NO_EXT_ERR_INFO = DWORD($C0042117);
- {$EXTERNALSYM WEBPOST_ERROR_NO_EXT_ERR_INFO}
-
-//
-// MessageId: WEBPOST_ERROR_INVALID_POSTINFO
-//
-// MessageText:
-//
-// The PostInfo file on the server is invalid.
-//
-
- WEBPOST_ERROR_INVALID_POSTINFO = DWORD($40042118);
- {$EXTERNALSYM WEBPOST_ERROR_INVALID_POSTINFO}
-
-//
-// MessageId: WEBPOST_ERROR_NO_POSTINFO
-//
-// MessageText:
-//
-// There is no PostInfo file on the server.
-//
-
- WEBPOST_ERROR_NO_POSTINFO = DWORD($40042119);
- {$EXTERNALSYM WEBPOST_ERROR_NO_POSTINFO}
-
-//
-// MessageId: WEBPOST_ERROR_HTTP_GET_FAILED
-//
-// MessageText:
-//
-// The Web Publishing Wizard was not able to retrieve the first file published using an HTTP connection.
-//
-
- WEBPOST_ERROR_HTTP_GET_FAILED = DWORD($4004211A);
- {$EXTERNALSYM WEBPOST_ERROR_HTTP_GET_FAILED}
-
-//
-// MessageId: WEBPOST_ERROR_LAST
-//
-// MessageText:
-//
-// Web Publishing Wizard last error message.
-//
-
- WEBPOST_ERROR_LAST = DWORD($400421FF);
- {$EXTERNALSYM WEBPOST_ERROR_LAST}
-
-implementation
-
-end.
+{******************************************************************************}
+{ }
+{ Web Publishing Error Codes API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: wpapimsg.h, released June 2000. The original Pascal }
+{ code is: WPApiMsg.pas, released December 2000. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwawpapimsg.pas,v 1.1 2005/04/04 07:56:11 marco Exp $
+
+unit JwaWPApiMsg;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "wpapimsg.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaWinType;
+
+//
+// Values are 32 bit values layed out as follows:
+//
+// 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1
+// 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
+// +---+-+-+-----------------------+-------------------------------+
+// |Sev|C|R| Facility | Code |
+// +---+-+-+-----------------------+-------------------------------+
+//
+// where
+//
+// Sev - is the severity code
+//
+// 00 - Success
+// 01 - Informational
+// 10 - Warning
+// 11 - Error
+//
+// C - is the Customer code flag
+//
+// R - is a reserved bit
+//
+// Facility - is the facility code
+//
+// Code - is the facility's status code
+//
+//
+// Define the facility codes
+//
+
+//
+// Define the severity codes
+//
+
+//
+// MessageId: WEBPOST_ERROR_FIRST
+//
+// MessageText:
+//
+// Web Publishing Wizard first error message.
+//
+
+const
+ WEBPOST_ERROR_FIRST = DWORD($40042100);
+ {$EXTERNALSYM WEBPOST_ERROR_FIRST}
+
+//
+// MessageId: WEBPOST_ERROR_UNKNOWN
+//
+// MessageText:
+//
+// An unknown error occurred in the Web Publishing Wizard.
+//
+
+ WEBPOST_ERROR_UNKNOWN = DWORD($C0042101);
+ {$EXTERNALSYM WEBPOST_ERROR_UNKNOWN}
+
+//
+// MessageId: WEBPOST_ERROR_PROVCLSID_UNKNOWN
+//
+// MessageText:
+//
+// The Web Publishing Wizard could not locate the service provider used to transfer files to your Web server.
+//
+
+ WEBPOST_ERROR_PROVCLSID_UNKNOWN = DWORD($C0042102);
+ {$EXTERNALSYM WEBPOST_ERROR_PROVCLSID_UNKNOWN}
+
+//
+// MessageId: WEBPOST_ERROR_SITE_CORRUPT
+//
+// MessageText:
+//
+// The Web Publishing Wizard could not retrieve all of the required information about your Web server.
+//
+
+ WEBPOST_ERROR_SITE_CORRUPT = DWORD($C0042103);
+ {$EXTERNALSYM WEBPOST_ERROR_SITE_CORRUPT}
+
+//
+// MessageId: WEBPOST_ERROR_PROV_CORRUPT
+//
+// MessageText:
+//
+// The Web Publishing Wizard could not retrieve all of the required information about this service provider.
+//
+
+ WEBPOST_ERROR_PROV_CORRUPT = DWORD($C0042104);
+ {$EXTERNALSYM WEBPOST_ERROR_PROV_CORRUPT}
+
+//
+// MessageId: WEBPOST_ERROR_PROV_DLL
+//
+// MessageText:
+//
+// The Web Publishing Wizard could not locate the file(s) for the requested service provider.
+//
+
+ WEBPOST_ERROR_PROV_DLL = DWORD($C0042105);
+ {$EXTERNALSYM WEBPOST_ERROR_PROV_DLL}
+
+//
+// MessageId: WEBPOST_ERROR_PROV_EP
+//
+// MessageText:
+//
+// The file(s) for the requested service provider are either corrupt or outdated.
+//
+
+ WEBPOST_ERROR_PROV_EP = DWORD($C0042106);
+ {$EXTERNALSYM WEBPOST_ERROR_PROV_EP}
+
+//
+// MessageId: WEBPOST_ERROR_INIT_FAILED
+//
+// MessageText:
+//
+// An error occurred while attempting to start the Web Publishing Wizard.
+//
+
+ WEBPOST_ERROR_INIT_FAILED = DWORD($C0042107);
+ {$EXTERNALSYM WEBPOST_ERROR_INIT_FAILED}
+
+//
+// MessageId: WEBPOST_ERROR_LIST_SITES
+//
+// MessageText:
+//
+// An error occurred while the Web Publishing Wizard was enumerating the Web servers to which you have previously published.
+//
+
+ WEBPOST_ERROR_LIST_SITES = DWORD($C0042108);
+ {$EXTERNALSYM WEBPOST_ERROR_LIST_SITES}
+
+//
+// MessageId: WEBPOST_ERROR_SITE_EXISTS
+//
+// MessageText:
+//
+// The Web Publishing Wizard could not use the requested descriptive name for your Web server because another Web server already uses the name.
+//
+
+ WEBPOST_ERROR_SITE_EXISTS = DWORD($C0042109);
+ {$EXTERNALSYM WEBPOST_ERROR_SITE_EXISTS}
+
+//
+// MessageId: WEBPOST_ERROR_CREATE_SITE
+//
+// MessageText:
+//
+// An error occurred while the Web Publishing Wizard was saving information about your Web server.
+//
+
+ WEBPOST_ERROR_CREATE_SITE = DWORD($C004210A);
+ {$EXTERNALSYM WEBPOST_ERROR_CREATE_SITE}
+
+//
+// MessageId: WEBPOST_ERROR_SITE_DOESNOTEXIST
+//
+// MessageText:
+//
+// Your computer does not contain any information about the Web server you have selected.
+//
+
+ WEBPOST_ERROR_SITE_DOESNOTEXIST = DWORD($C004210B);
+ {$EXTERNALSYM WEBPOST_ERROR_SITE_DOESNOTEXIST}
+
+//
+// MessageId: WEBPOST_ERROR_DELETE_SITE
+//
+// MessageText:
+//
+// An error occurred while the Web Publishing Wizard was deleting information about your Web server.
+//
+
+ WEBPOST_ERROR_DELETE_SITE = DWORD($C004210C);
+ {$EXTERNALSYM WEBPOST_ERROR_DELETE_SITE}
+
+//
+// MessageId: WEBPOST_ERROR_ENUM_PROVS
+//
+// MessageText:
+//
+// An error occurred while the Web Publishing Wizard was enumerating the service providers on this system.
+//
+
+ WEBPOST_ERROR_ENUM_PROVS = DWORD($C004210D);
+ {$EXTERNALSYM WEBPOST_ERROR_ENUM_PROVS}
+
+//
+// MessageId: WEBPOST_ERROR_PROV_QI
+//
+// MessageText:
+//
+// The Web Publishing Wizard was unable to determine the version number of your service provider.
+//
+
+ WEBPOST_ERROR_PROV_QI = DWORD($C004210E);
+ {$EXTERNALSYM WEBPOST_ERROR_PROV_QI}
+
+//
+// MessageId: WEBPOST_ERROR_POST_FILES
+//
+// MessageText:
+//
+// An error occurred while the Web Publishing Wizard was attempting to publish your files.
+//
+
+ WEBPOST_ERROR_POST_FILES = DWORD($C004210F);
+ {$EXTERNALSYM WEBPOST_ERROR_POST_FILES}
+
+//
+// MessageId: WEBPOST_ERROR_COCREATE_WIZARD
+//
+// MessageText:
+//
+// The Web Publishing Wizard is not installed correctly. Please uninstall and then reinstall the wizard.
+//
+
+ WEBPOST_ERROR_COCREATE_WIZARD = DWORD($C0042110);
+ {$EXTERNALSYM WEBPOST_ERROR_COCREATE_WIZARD}
+
+//
+// MessageId: WEBPOST_ERROR_POSTINFO_REQUIRED
+//
+// MessageText:
+//
+// Your service provider requires that a PostInfo file be located on the server. No PostInfo file could be located.
+//
+
+ WEBPOST_ERROR_POSTINFO_REQUIRED = DWORD($C0042111);
+ {$EXTERNALSYM WEBPOST_ERROR_POSTINFO_REQUIRED}
+
+//
+// MessageId: WEBPOST_ERROR_AUTOBIND_FAILED
+//
+// MessageText:
+//
+// The service provider could not be automatically selected for your Web server.
+//
+
+ WEBPOST_ERROR_AUTOBIND_FAILED = DWORD($C0042112);
+ {$EXTERNALSYM WEBPOST_ERROR_AUTOBIND_FAILED}
+
+//
+// MessageId: WEBPOST_ERROR_BAD_PROV_PTR
+//
+// MessageText:
+//
+// The Web Publishing Wizard was not able to obtain a valid pointer to the requested service provider.
+//
+
+ WEBPOST_ERROR_BAD_PROV_PTR = DWORD($C0042113);
+ {$EXTERNALSYM WEBPOST_ERROR_BAD_PROV_PTR}
+
+//
+// MessageId: WEBPOST_ERROR_PROV_NOT_IN_POSTINFO
+//
+// MessageText:
+//
+// The Web server you selected does not indicate support for the service provider you selected.
+//
+
+ WEBPOST_ERROR_PROV_NOT_IN_POSTINFO = DWORD($80042114);
+ {$EXTERNALSYM WEBPOST_ERROR_PROV_NOT_IN_POSTINFO}
+
+//
+// MessageId: WEBPOST_ERROR_EXTENDED_ERROR
+//
+// MessageText:
+//
+// Web Publishing Wizard extended error.
+//
+
+ WEBPOST_ERROR_EXTENDED_ERROR = DWORD($C0042116);
+ {$EXTERNALSYM WEBPOST_ERROR_EXTENDED_ERROR}
+
+//
+// MessageId: WEBPOST_ERROR_NO_EXT_ERR_INFO
+//
+// MessageText:
+//
+// An extended error occurred in the Web Publishing Wizard, but the error message could not be retrieved.
+//
+
+ WEBPOST_ERROR_NO_EXT_ERR_INFO = DWORD($C0042117);
+ {$EXTERNALSYM WEBPOST_ERROR_NO_EXT_ERR_INFO}
+
+//
+// MessageId: WEBPOST_ERROR_INVALID_POSTINFO
+//
+// MessageText:
+//
+// The PostInfo file on the server is invalid.
+//
+
+ WEBPOST_ERROR_INVALID_POSTINFO = DWORD($40042118);
+ {$EXTERNALSYM WEBPOST_ERROR_INVALID_POSTINFO}
+
+//
+// MessageId: WEBPOST_ERROR_NO_POSTINFO
+//
+// MessageText:
+//
+// There is no PostInfo file on the server.
+//
+
+ WEBPOST_ERROR_NO_POSTINFO = DWORD($40042119);
+ {$EXTERNALSYM WEBPOST_ERROR_NO_POSTINFO}
+
+//
+// MessageId: WEBPOST_ERROR_HTTP_GET_FAILED
+//
+// MessageText:
+//
+// The Web Publishing Wizard was not able to retrieve the first file published using an HTTP connection.
+//
+
+ WEBPOST_ERROR_HTTP_GET_FAILED = DWORD($4004211A);
+ {$EXTERNALSYM WEBPOST_ERROR_HTTP_GET_FAILED}
+
+//
+// MessageId: WEBPOST_ERROR_LAST
+//
+// MessageText:
+//
+// Web Publishing Wizard last error message.
+//
+
+ WEBPOST_ERROR_LAST = DWORD($400421FF);
+ {$EXTERNALSYM WEBPOST_ERROR_LAST}
+
+implementation
+
+end.
diff --git a/packages/extra/winunits/jwawpcrsmsg.pas b/packages/extra/winunits/jwawpcrsmsg.pas
index a477b3aad7..ca99a425c9 100644
--- a/packages/extra/winunits/jwawpcrsmsg.pas
+++ b/packages/extra/winunits/jwawpcrsmsg.pas
@@ -1,218 +1,218 @@
-{******************************************************************************}
-{ }
-{ Web Publishing CRS Error Codes API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: wpcrsmsg.h, released June 2000. The original Pascal }
-{ code is: WPCrsMsg.pas, released December 2000. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwawpcrsmsg.pas,v 1.1 2005/04/04 07:56:11 marco Exp $
-
-unit JwaWPCrsMsg;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "wpcrsmsg.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaWinType;
-
-//
-// Values are 32 bit values layed out as follows:
-//
-// 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1
-// 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
-// +---+-+-+-----------------------+-------------------------------+
-// |Sev|C|R| Facility | Code |
-// +---+-+-+-----------------------+-------------------------------+
-//
-// where
-//
-// Sev - is the severity code
-//
-// 00 - Success
-// 01 - Informational
-// 10 - Warning
-// 11 - Error
-//
-// C - is the Customer code flag
-//
-// R - is a reserved bit
-//
-// Facility - is the facility code
-//
-// Code - is the facility's status code
-//
-//
-// Define the facility codes
-//
-
-//
-// Define the severity codes
-//
-
-//
-// MessageId: CRSWPP_ERROR_FIRST
-//
-// MessageText:
-//
-// CRS WebPost provider's first error message.
-//
-
-const
- CRSWPP_ERROR_FIRST = DWORD($40042200);
- {$EXTERNALSYM CRSWPP_ERROR_FIRST}
-
-//
-// MessageId: CRSWPP_INVALID_POSTINFO_FILE
-//
-// MessageText:
-//
-// The PostInfo file is invalid on the server you selected.
-//
-
- CRSWPP_INVALID_POSTINFO_FILE = DWORD($C0042201);
- {$EXTERNALSYM CRSWPP_INVALID_POSTINFO_FILE}
-
-//
-// MessageId: CRSWPP_NO_MATCHING_MAPURL
-//
-// MessageText:
-//
-// The CRS project you selected has no MAPURL.
-//
-
- CRSWPP_NO_MATCHING_MAPURL = DWORD($C0042202);
- {$EXTERNALSYM CRSWPP_NO_MATCHING_MAPURL}
-
-//
-// MessageId: CRSWPP_SECURITY_PACKAGE
-//
-// MessageText:
-//
-// The initialization of the security package failed.
-//
-
- CRSWPP_SECURITY_PACKAGE = DWORD($C0042203);
- {$EXTERNALSYM CRSWPP_SECURITY_PACKAGE}
-
-//
-// MessageId: CRSWPP_SECURITY_PACKAGE_NOT_FOUND
-//
-// MessageText:
-//
-// The security package(s) required by the server could not be found on your computer.
-//
-
- CRSWPP_SECURITY_PACKAGE_NOT_FOUND = DWORD($C0042204);
- {$EXTERNALSYM CRSWPP_SECURITY_PACKAGE_NOT_FOUND}
-
-//
-// MessageId: CRSWPP_PROJECT_BINDING_INCOMPLETE
-//
-// MessageText:
-//
-// The CRS provider has not determined which CRS project on the server corresponds to the URL you selected.
-//
-
- CRSWPP_PROJECT_BINDING_INCOMPLETE = DWORD($C0042205);
- {$EXTERNALSYM CRSWPP_PROJECT_BINDING_INCOMPLETE}
-
-//
-// MessageId: CRSWPP_SERVER_BINDING_INCOMPLETE
-//
-// MessageText:
-//
-// The CRS provider has not determined the name of the server that corresponds to the URL you selected.
-//
-
- CRSWPP_SERVER_BINDING_INCOMPLETE = DWORD($C0042206);
- {$EXTERNALSYM CRSWPP_SERVER_BINDING_INCOMPLETE}
-
-//
-// MessageId: CRSWPP_SERVER_NOT_RESPONDING
-//
-// MessageText:
-//
-// The CRS server is not responding.
-//
-
- CRSWPP_SERVER_NOT_RESPONDING = DWORD($C0042207);
- {$EXTERNALSYM CRSWPP_SERVER_NOT_RESPONDING}
-
-//
-// MessageId: CRSWPP_FAILED_AUTH
-//
-// MessageText:
-//
-// You do not have the necessary access privileges to publish to this CRS server.
-//
-
- CRSWPP_FAILED_AUTH = DWORD($C0042208);
- {$EXTERNALSYM CRSWPP_FAILED_AUTH}
-
-//
-// MessageId: CRSWPP_POSTINFO_NEEDED
-//
-// MessageText:
-//
-// The CRS provider could not retrieve all of the required information from the PostInfo file on the server.
-//
-
- CRSWPP_POSTINFO_NEEDED = DWORD($40042209);
- {$EXTERNALSYM CRSWPP_POSTINFO_NEEDED}
-
-//
-// MessageId: CRSWPP_BIND_FAILED
-//
-// MessageText:
-//
-// The CRS provider could not connect to the CRS server.
-//
-
- CRSWPP_BIND_FAILED = DWORD($C004220A);
- {$EXTERNALSYM CRSWPP_BIND_FAILED}
-
-implementation
-
-end.
+{******************************************************************************}
+{ }
+{ Web Publishing CRS Error Codes API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: wpcrsmsg.h, released June 2000. The original Pascal }
+{ code is: WPCrsMsg.pas, released December 2000. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwawpcrsmsg.pas,v 1.1 2005/04/04 07:56:11 marco Exp $
+
+unit JwaWPCrsMsg;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "wpcrsmsg.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaWinType;
+
+//
+// Values are 32 bit values layed out as follows:
+//
+// 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1
+// 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
+// +---+-+-+-----------------------+-------------------------------+
+// |Sev|C|R| Facility | Code |
+// +---+-+-+-----------------------+-------------------------------+
+//
+// where
+//
+// Sev - is the severity code
+//
+// 00 - Success
+// 01 - Informational
+// 10 - Warning
+// 11 - Error
+//
+// C - is the Customer code flag
+//
+// R - is a reserved bit
+//
+// Facility - is the facility code
+//
+// Code - is the facility's status code
+//
+//
+// Define the facility codes
+//
+
+//
+// Define the severity codes
+//
+
+//
+// MessageId: CRSWPP_ERROR_FIRST
+//
+// MessageText:
+//
+// CRS WebPost provider's first error message.
+//
+
+const
+ CRSWPP_ERROR_FIRST = DWORD($40042200);
+ {$EXTERNALSYM CRSWPP_ERROR_FIRST}
+
+//
+// MessageId: CRSWPP_INVALID_POSTINFO_FILE
+//
+// MessageText:
+//
+// The PostInfo file is invalid on the server you selected.
+//
+
+ CRSWPP_INVALID_POSTINFO_FILE = DWORD($C0042201);
+ {$EXTERNALSYM CRSWPP_INVALID_POSTINFO_FILE}
+
+//
+// MessageId: CRSWPP_NO_MATCHING_MAPURL
+//
+// MessageText:
+//
+// The CRS project you selected has no MAPURL.
+//
+
+ CRSWPP_NO_MATCHING_MAPURL = DWORD($C0042202);
+ {$EXTERNALSYM CRSWPP_NO_MATCHING_MAPURL}
+
+//
+// MessageId: CRSWPP_SECURITY_PACKAGE
+//
+// MessageText:
+//
+// The initialization of the security package failed.
+//
+
+ CRSWPP_SECURITY_PACKAGE = DWORD($C0042203);
+ {$EXTERNALSYM CRSWPP_SECURITY_PACKAGE}
+
+//
+// MessageId: CRSWPP_SECURITY_PACKAGE_NOT_FOUND
+//
+// MessageText:
+//
+// The security package(s) required by the server could not be found on your computer.
+//
+
+ CRSWPP_SECURITY_PACKAGE_NOT_FOUND = DWORD($C0042204);
+ {$EXTERNALSYM CRSWPP_SECURITY_PACKAGE_NOT_FOUND}
+
+//
+// MessageId: CRSWPP_PROJECT_BINDING_INCOMPLETE
+//
+// MessageText:
+//
+// The CRS provider has not determined which CRS project on the server corresponds to the URL you selected.
+//
+
+ CRSWPP_PROJECT_BINDING_INCOMPLETE = DWORD($C0042205);
+ {$EXTERNALSYM CRSWPP_PROJECT_BINDING_INCOMPLETE}
+
+//
+// MessageId: CRSWPP_SERVER_BINDING_INCOMPLETE
+//
+// MessageText:
+//
+// The CRS provider has not determined the name of the server that corresponds to the URL you selected.
+//
+
+ CRSWPP_SERVER_BINDING_INCOMPLETE = DWORD($C0042206);
+ {$EXTERNALSYM CRSWPP_SERVER_BINDING_INCOMPLETE}
+
+//
+// MessageId: CRSWPP_SERVER_NOT_RESPONDING
+//
+// MessageText:
+//
+// The CRS server is not responding.
+//
+
+ CRSWPP_SERVER_NOT_RESPONDING = DWORD($C0042207);
+ {$EXTERNALSYM CRSWPP_SERVER_NOT_RESPONDING}
+
+//
+// MessageId: CRSWPP_FAILED_AUTH
+//
+// MessageText:
+//
+// You do not have the necessary access privileges to publish to this CRS server.
+//
+
+ CRSWPP_FAILED_AUTH = DWORD($C0042208);
+ {$EXTERNALSYM CRSWPP_FAILED_AUTH}
+
+//
+// MessageId: CRSWPP_POSTINFO_NEEDED
+//
+// MessageText:
+//
+// The CRS provider could not retrieve all of the required information from the PostInfo file on the server.
+//
+
+ CRSWPP_POSTINFO_NEEDED = DWORD($40042209);
+ {$EXTERNALSYM CRSWPP_POSTINFO_NEEDED}
+
+//
+// MessageId: CRSWPP_BIND_FAILED
+//
+// MessageText:
+//
+// The CRS provider could not connect to the CRS server.
+//
+
+ CRSWPP_BIND_FAILED = DWORD($C004220A);
+ {$EXTERNALSYM CRSWPP_BIND_FAILED}
+
+implementation
+
+end.
diff --git a/packages/extra/winunits/jwawpftpmsg.pas b/packages/extra/winunits/jwawpftpmsg.pas
index 1c8910fb13..5f034abc6d 100644
--- a/packages/extra/winunits/jwawpftpmsg.pas
+++ b/packages/extra/winunits/jwawpftpmsg.pas
@@ -1,141 +1,141 @@
-{******************************************************************************}
-{ }
-{ Web Publishing FTP Error Codes API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: wpftpmsg.h, released June 2000. The original Pascal }
-{ code is: WPFtpMsg.pas, released December 2000. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwawpftpmsg.pas,v 1.1 2005/04/04 07:56:11 marco Exp $
-
-unit JwaWPFtpMsg;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "wpftpmsg.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaWinType;
-
-//
-// Values are 32 bit values layed out as follows:
-//
-// 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1
-// 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
-// +---+-+-+-----------------------+-------------------------------+
-// |Sev|C|R| Facility | Code |
-// +---+-+-+-----------------------+-------------------------------+
-//
-// where
-//
-// Sev - is the severity code
-//
-// 00 - Success
-// 01 - Informational
-// 10 - Warning
-// 11 - Error
-//
-// C - is the Customer code flag
-//
-// R - is a reserved bit
-//
-// Facility - is the facility code
-//
-// Code - is the facility's status code
-//
-//
-// Define the facility codes
-//
-
-//
-// Define the severity codes
-//
-
-//
-// MessageId: FTPWPP_ERROR_FIRST
-//
-// MessageText:
-//
-// CFtpWpp's first error message.
-//
-
-const
- FTPWPP_ERROR_FIRST = DWORD($40042300);
- {$EXTERNALSYM FTPWPP_ERROR_FIRST}
-
-//
-// MessageId: FTPWPP_ERROR_INETOPEN_FAILED
-//
-// MessageText:
-//
-// The FTP provider could not connect to the internet.
-//
-
- FTPWPP_ERROR_INETOPEN_FAILED = DWORD($C0042301);
- {$EXTERNALSYM FTPWPP_ERROR_INETOPEN_FAILED}
-
-//
-// MessageId: FTPWPP_ERROR_AUTHENTICATION_FAILED
-//
-// MessageText:
-//
-// The FTP provider could not log in to the FTP server.
-//
-
- FTPWPP_ERROR_AUTHENTICATION_FAILED = DWORD($C0042302);
- {$EXTERNALSYM FTPWPP_ERROR_AUTHENTICATION_FAILED}
-
-//
-// MessageId: FTPWPP_ERROR_LAST
-//
-// MessageText:
-//
-// CFtpWpp's last error message.
-//
-
- FTPWPP_ERROR_LAST = DWORD($400423FF);
- {$EXTERNALSYM FTPWPP_ERROR_LAST}
-
-implementation
-
-end.
+{******************************************************************************}
+{ }
+{ Web Publishing FTP Error Codes API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: wpftpmsg.h, released June 2000. The original Pascal }
+{ code is: WPFtpMsg.pas, released December 2000. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwawpftpmsg.pas,v 1.1 2005/04/04 07:56:11 marco Exp $
+
+unit JwaWPFtpMsg;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "wpftpmsg.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaWinType;
+
+//
+// Values are 32 bit values layed out as follows:
+//
+// 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1
+// 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
+// +---+-+-+-----------------------+-------------------------------+
+// |Sev|C|R| Facility | Code |
+// +---+-+-+-----------------------+-------------------------------+
+//
+// where
+//
+// Sev - is the severity code
+//
+// 00 - Success
+// 01 - Informational
+// 10 - Warning
+// 11 - Error
+//
+// C - is the Customer code flag
+//
+// R - is a reserved bit
+//
+// Facility - is the facility code
+//
+// Code - is the facility's status code
+//
+//
+// Define the facility codes
+//
+
+//
+// Define the severity codes
+//
+
+//
+// MessageId: FTPWPP_ERROR_FIRST
+//
+// MessageText:
+//
+// CFtpWpp's first error message.
+//
+
+const
+ FTPWPP_ERROR_FIRST = DWORD($40042300);
+ {$EXTERNALSYM FTPWPP_ERROR_FIRST}
+
+//
+// MessageId: FTPWPP_ERROR_INETOPEN_FAILED
+//
+// MessageText:
+//
+// The FTP provider could not connect to the internet.
+//
+
+ FTPWPP_ERROR_INETOPEN_FAILED = DWORD($C0042301);
+ {$EXTERNALSYM FTPWPP_ERROR_INETOPEN_FAILED}
+
+//
+// MessageId: FTPWPP_ERROR_AUTHENTICATION_FAILED
+//
+// MessageText:
+//
+// The FTP provider could not log in to the FTP server.
+//
+
+ FTPWPP_ERROR_AUTHENTICATION_FAILED = DWORD($C0042302);
+ {$EXTERNALSYM FTPWPP_ERROR_AUTHENTICATION_FAILED}
+
+//
+// MessageId: FTPWPP_ERROR_LAST
+//
+// MessageText:
+//
+// CFtpWpp's last error message.
+//
+
+ FTPWPP_ERROR_LAST = DWORD($400423FF);
+ {$EXTERNALSYM FTPWPP_ERROR_LAST}
+
+implementation
+
+end.
diff --git a/packages/extra/winunits/jwawppstmsg.pas b/packages/extra/winunits/jwawppstmsg.pas
index ea2a357ef2..750fa3e339 100644
--- a/packages/extra/winunits/jwawppstmsg.pas
+++ b/packages/extra/winunits/jwawppstmsg.pas
@@ -1,152 +1,152 @@
-{******************************************************************************}
-{ }
-{ Web Publishing Post Error Codes API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: wppstmsg.h, released June 2000. The original Pascal }
-{ code is: WPPstMsg.pas, released December 2000. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwawppstmsg.pas,v 1.1 2005/04/04 07:56:11 marco Exp $
-
-unit JwaWPPstMsg;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "wppstmsg.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaWinType;
-
-//
-// Values are 32 bit values layed out as follows:
-//
-// 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1
-// 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
-// +---+-+-+-----------------------+-------------------------------+
-// |Sev|C|R| Facility | Code |
-// +---+-+-+-----------------------+-------------------------------+
-//
-// where
-//
-// Sev - is the severity code
-//
-// 00 - Success
-// 01 - Informational
-// 10 - Warning
-// 11 - Error
-//
-// C - is the Customer code flag
-//
-// R - is a reserved bit
-//
-// Facility - is the facility code
-//
-// Code - is the facility's status code
-//
-//
-// Define the facility codes
-//
-
-//
-// Define the severity codes
-//
-
-//
-// MessageId: WPP_ERROR_FIRST
-//
-// MessageText:
-//
-// WebPost Provider first error message.
-//
-
-const
- WPP_ERROR_FIRST = DWORD($40042380);
- {$EXTERNALSYM WPP_ERROR_FIRST}
-
-//
-// MessageId: WPP_POST_POSTING_URL_ERROR
-//
-// MessageText:
-//
-// The URL you selected, %1, is invalid.
-//
-
- WPP_POST_POSTING_URL_ERROR = DWORD($C0042381);
- {$EXTERNALSYM WPP_POST_POSTING_URL_ERROR}
-
-//
-// MessageId: WPP_POST_POSTING_SERVER_ERROR
-//
-// MessageText:
-//
-// The Web server returned the following error: %1.
-//
-
- WPP_POST_POSTING_SERVER_ERROR = DWORD($C0042382);
- {$EXTERNALSYM WPP_POST_POSTING_SERVER_ERROR}
-
-//
-// MessageId: WPP_POST_POSTING_NO_RESPONSE_ERROR
-//
-// MessageText:
-//
-// The Web server either is not responding or returned an unrecognized response.
-//
-
- WPP_POST_POSTING_NO_RESPONSE_ERROR = DWORD($C0042383);
- {$EXTERNALSYM WPP_POST_POSTING_NO_RESPONSE_ERROR}
-
-//
-// MessageId: WPP_ERROR_LAST
-//
-// MessageText:
-//
-// WebPost Provider last error message.
-//
-
- WPP_ERROR_LAST = DWORD($400423FF);
- {$EXTERNALSYM WPP_ERROR_LAST}
-
-implementation
-
-end.
+{******************************************************************************}
+{ }
+{ Web Publishing Post Error Codes API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: wppstmsg.h, released June 2000. The original Pascal }
+{ code is: WPPstMsg.pas, released December 2000. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwawppstmsg.pas,v 1.1 2005/04/04 07:56:11 marco Exp $
+
+unit JwaWPPstMsg;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "wppstmsg.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaWinType;
+
+//
+// Values are 32 bit values layed out as follows:
+//
+// 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1
+// 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
+// +---+-+-+-----------------------+-------------------------------+
+// |Sev|C|R| Facility | Code |
+// +---+-+-+-----------------------+-------------------------------+
+//
+// where
+//
+// Sev - is the severity code
+//
+// 00 - Success
+// 01 - Informational
+// 10 - Warning
+// 11 - Error
+//
+// C - is the Customer code flag
+//
+// R - is a reserved bit
+//
+// Facility - is the facility code
+//
+// Code - is the facility's status code
+//
+//
+// Define the facility codes
+//
+
+//
+// Define the severity codes
+//
+
+//
+// MessageId: WPP_ERROR_FIRST
+//
+// MessageText:
+//
+// WebPost Provider first error message.
+//
+
+const
+ WPP_ERROR_FIRST = DWORD($40042380);
+ {$EXTERNALSYM WPP_ERROR_FIRST}
+
+//
+// MessageId: WPP_POST_POSTING_URL_ERROR
+//
+// MessageText:
+//
+// The URL you selected, %1, is invalid.
+//
+
+ WPP_POST_POSTING_URL_ERROR = DWORD($C0042381);
+ {$EXTERNALSYM WPP_POST_POSTING_URL_ERROR}
+
+//
+// MessageId: WPP_POST_POSTING_SERVER_ERROR
+//
+// MessageText:
+//
+// The Web server returned the following error: %1.
+//
+
+ WPP_POST_POSTING_SERVER_ERROR = DWORD($C0042382);
+ {$EXTERNALSYM WPP_POST_POSTING_SERVER_ERROR}
+
+//
+// MessageId: WPP_POST_POSTING_NO_RESPONSE_ERROR
+//
+// MessageText:
+//
+// The Web server either is not responding or returned an unrecognized response.
+//
+
+ WPP_POST_POSTING_NO_RESPONSE_ERROR = DWORD($C0042383);
+ {$EXTERNALSYM WPP_POST_POSTING_NO_RESPONSE_ERROR}
+
+//
+// MessageId: WPP_ERROR_LAST
+//
+// MessageText:
+//
+// WebPost Provider last error message.
+//
+
+ WPP_ERROR_LAST = DWORD($400423FF);
+ {$EXTERNALSYM WPP_ERROR_LAST}
+
+implementation
+
+end.
diff --git a/packages/extra/winunits/jwawpspihlp.pas b/packages/extra/winunits/jwawpspihlp.pas
index 865e877595..c9a57f4d46 100644
--- a/packages/extra/winunits/jwawpspihlp.pas
+++ b/packages/extra/winunits/jwawpspihlp.pas
@@ -1,142 +1,142 @@
-{******************************************************************************}
-{ }
-{ Web Publishing SPI Helper API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: wpspihlp.h, released June 2000. The original Pascal }
-{ code is: WPSpiHlp.pas, released December 2000. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwawpspihlp.pas,v 1.1 2005/04/04 07:56:11 marco Exp $
-
-unit JwaWPSpiHlp;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "wpspihlp.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaWPTypes, JwaWinType;
-
-//
-// Flags
-//
-
-const
- WPF_FORCE_BIND = $00000100; // WppBindToSite
-
-//
-// Helper function declarations and typedefs
-//
-
-//function WppBindToSiteA(hwnd: HWND; sSiteName, sURL: LPCSTR; const riid: TGUID;
-// dwFlag, dwReserved: DWORD; out ppvUnk): HRESULT; stdcall;
-//{$EXTERNALSYM WppBindToSiteA}
-
-type
- PFN_WPPBINDTOSITEA = function(hwnd: HWND; sSiteName, sURL: LPCSTR;
- const riid: TGUID; dwFlag, dwReserved: DWORD; out ppvUnk): HRESULT; stdcall;
- {$EXTERNALSYM PFN_WPPBINDTOSITEA}
-
-//function WppListSitesA(var pdwSitesBufLen: DWORD; pSitesBuffer: LPWPSITEINFOA;
-// pdwNumSites: LPDWORD): HRESULT; stdcall;
-//{$EXTERNALSYM WppListSitesA}
-
-type
- PFN_WPPLISTSITESA = function(var pdwSitesBufLen: DWORD;
- pSitesBuffer: LPWPSITEINFOA; pdwNumSites: LPDWORD): HRESULT; stdcall;
- {$EXTERNALSYM PFN_WPPLISTSITESA}
-
-//function WppDeleteSiteA(sSiteName: LPCSTR): HRESULT; stdcall;
-//{$EXTERNALSYM WppDeleteSiteA}
-
-type
- PFN_WPPDELETESITEA = function(sSiteName: LPCSTR): HRESULT; stdcall;
- {$EXTERNALSYM PFN_WPPDELETESITEA}
-
-//function WppBindToSiteW(hwnd: HWND; sSiteName, sURL: LPCWSTR; const riid: TGUID;
-// dwFlag, dwReserved: DWORD; out ppvUnk): HRESULT; stdcall;
-//{$EXTERNALSYM WppBindToSiteW}
-
-type
- PFN_WPPBINDTOSITEW = function(hwnd: HWND; sSiteName, sURL: LPCWSTR;
- const riid: TGUID; dwFlag, dwReserved: DWORD; out ppvUnk): HRESULT; stdcall;
- {$EXTERNALSYM PFN_WPPBINDTOSITEW}
-
-//function WppListSitesW(var pdwSitesBufLen: DWORD; pSitesBuffer: LPWPSITEINFOW;
-// pdwNumSites: LPDWORD): HRESULT; stdcall;
-//{$EXTERNALSYM WppListSitesW}
-
-type
- PFN_WPPLISTSITESW = function(var pdwSitesBufLen: DWORD;
- pSitesBuffer: LPWPSITEINFOW; pdwNumSites: LPDWORD): HRESULT; stdcall;
- {$EXTERNALSYM PFN_WPPLISTSITESW}
-
-//function WppDeleteSiteW(sSiteName: LPCWSTR): HRESULT; stdcall;
-//{$EXTERNALSYM WppDeleteSiteW}
-
-type
- PFN_WPPDELETESITEW = function(sSiteName: LPCWSTR): HRESULT; stdcall;
- {$EXTERNALSYM PFN_WPPDELETESITEW}
-
-//
-// Entry Points
-//
-
-const
- EP_WPPBINDTOSITEW = 'WppBindToSiteW';
- {$EXTERNALSYM EP_WPPBINDTOSITEW}
- EP_WPPLISTSITESW = 'WppListSitesW';
- {$EXTERNALSYM EP_WPPLISTSITESW}
- EP_WPPDELETESITEW = 'WppDeleteSiteW';
- {$EXTERNALSYM EP_WPPDELETESITEW}
-
- EP_WPPBINDTOSITEA = 'WppBindToSiteA';
- {$EXTERNALSYM EP_WPPBINDTOSITEA}
- EP_WPPLISTSITESA = 'WppListSitesA';
- {$EXTERNALSYM EP_WPPLISTSITESA}
- EP_WPPDELETESITEA = 'WppDeleteSiteA';
- {$EXTERNALSYM EP_WPPDELETESITEA}
-
-implementation
-
-end.
+{******************************************************************************}
+{ }
+{ Web Publishing SPI Helper API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: wpspihlp.h, released June 2000. The original Pascal }
+{ code is: WPSpiHlp.pas, released December 2000. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwawpspihlp.pas,v 1.1 2005/04/04 07:56:11 marco Exp $
+
+unit JwaWPSpiHlp;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "wpspihlp.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaWPTypes, JwaWinType;
+
+//
+// Flags
+//
+
+const
+ WPF_FORCE_BIND = $00000100; // WppBindToSite
+
+//
+// Helper function declarations and typedefs
+//
+
+//function WppBindToSiteA(hwnd: HWND; sSiteName, sURL: LPCSTR; const riid: TGUID;
+// dwFlag, dwReserved: DWORD; out ppvUnk): HRESULT; stdcall;
+//{$EXTERNALSYM WppBindToSiteA}
+
+type
+ PFN_WPPBINDTOSITEA = function(hwnd: HWND; sSiteName, sURL: LPCSTR;
+ const riid: TGUID; dwFlag, dwReserved: DWORD; out ppvUnk): HRESULT; stdcall;
+ {$EXTERNALSYM PFN_WPPBINDTOSITEA}
+
+//function WppListSitesA(var pdwSitesBufLen: DWORD; pSitesBuffer: LPWPSITEINFOA;
+// pdwNumSites: LPDWORD): HRESULT; stdcall;
+//{$EXTERNALSYM WppListSitesA}
+
+type
+ PFN_WPPLISTSITESA = function(var pdwSitesBufLen: DWORD;
+ pSitesBuffer: LPWPSITEINFOA; pdwNumSites: LPDWORD): HRESULT; stdcall;
+ {$EXTERNALSYM PFN_WPPLISTSITESA}
+
+//function WppDeleteSiteA(sSiteName: LPCSTR): HRESULT; stdcall;
+//{$EXTERNALSYM WppDeleteSiteA}
+
+type
+ PFN_WPPDELETESITEA = function(sSiteName: LPCSTR): HRESULT; stdcall;
+ {$EXTERNALSYM PFN_WPPDELETESITEA}
+
+//function WppBindToSiteW(hwnd: HWND; sSiteName, sURL: LPCWSTR; const riid: TGUID;
+// dwFlag, dwReserved: DWORD; out ppvUnk): HRESULT; stdcall;
+//{$EXTERNALSYM WppBindToSiteW}
+
+type
+ PFN_WPPBINDTOSITEW = function(hwnd: HWND; sSiteName, sURL: LPCWSTR;
+ const riid: TGUID; dwFlag, dwReserved: DWORD; out ppvUnk): HRESULT; stdcall;
+ {$EXTERNALSYM PFN_WPPBINDTOSITEW}
+
+//function WppListSitesW(var pdwSitesBufLen: DWORD; pSitesBuffer: LPWPSITEINFOW;
+// pdwNumSites: LPDWORD): HRESULT; stdcall;
+//{$EXTERNALSYM WppListSitesW}
+
+type
+ PFN_WPPLISTSITESW = function(var pdwSitesBufLen: DWORD;
+ pSitesBuffer: LPWPSITEINFOW; pdwNumSites: LPDWORD): HRESULT; stdcall;
+ {$EXTERNALSYM PFN_WPPLISTSITESW}
+
+//function WppDeleteSiteW(sSiteName: LPCWSTR): HRESULT; stdcall;
+//{$EXTERNALSYM WppDeleteSiteW}
+
+type
+ PFN_WPPDELETESITEW = function(sSiteName: LPCWSTR): HRESULT; stdcall;
+ {$EXTERNALSYM PFN_WPPDELETESITEW}
+
+//
+// Entry Points
+//
+
+const
+ EP_WPPBINDTOSITEW = 'WppBindToSiteW';
+ {$EXTERNALSYM EP_WPPBINDTOSITEW}
+ EP_WPPLISTSITESW = 'WppListSitesW';
+ {$EXTERNALSYM EP_WPPLISTSITESW}
+ EP_WPPDELETESITEW = 'WppDeleteSiteW';
+ {$EXTERNALSYM EP_WPPDELETESITEW}
+
+ EP_WPPBINDTOSITEA = 'WppBindToSiteA';
+ {$EXTERNALSYM EP_WPPBINDTOSITEA}
+ EP_WPPLISTSITESA = 'WppListSitesA';
+ {$EXTERNALSYM EP_WPPLISTSITESA}
+ EP_WPPDELETESITEA = 'WppDeleteSiteA';
+ {$EXTERNALSYM EP_WPPDELETESITEA}
+
+implementation
+
+end.
diff --git a/packages/extra/winunits/jwawptypes.pas b/packages/extra/winunits/jwawptypes.pas
index b7fc179c9b..10b2b85134 100644
--- a/packages/extra/winunits/jwawptypes.pas
+++ b/packages/extra/winunits/jwawptypes.pas
@@ -1,159 +1,159 @@
-{******************************************************************************}
-{ }
-{ Web Publishing Type Declarations API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: wptypes.h, released June 2000. The original Pascal }
-{ code is: WPTypes.pas, released December 2000. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwawptypes.pas,v 1.1 2005/04/04 07:56:11 marco Exp $
-
-unit JwaWPTypes;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "wptypes.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaWinType;
-
-//
-// Site info structures
-//
-
-type
- LPWPSITEINFOA = ^WPSITEINFOA;
- {$EXTERNALSYM LPWPSITEINFOA}
- tagWPSITEINFOA = record
- dwSize: DWORD;
- dwFlags: DWORD;
- lpszSiteName: LPSTR;
- lpszSiteURL: LPSTR;
- end;
- {$EXTERNALSYM tagWPSITEINFOA}
- WPSITEINFOA = tagWPSITEINFOA;
- {$EXTERNALSYM WPSITEINFOA}
- TWpSiteInfoA = WPSITEINFOA;
- PWpSiteInfoA = LPWPSITEINFOA;
-
- LPWPSITEINFOW = ^WPSITEINFOW;
- {$EXTERNALSYM LPWPSITEINFOW}
- tagWPSITEINFOW = record
- dwSize: DWORD;
- dwFlags: DWORD;
- lpszSiteName: LPWSTR;
- lpszSiteURL: LPWSTR;
- end;
- {$EXTERNALSYM tagWPSITEINFOW}
- WPSITEINFOW = tagWPSITEINFOW;
- {$EXTERNALSYM WPSITEINFOW}
- TWpSiteInfoW = WPSITEINFOW;
- PWpSiteInfoW = LPWPSITEINFOW;
-
-//
-// Provider info structures
-//
-
- LPWPPROVINFOA = ^WPPROVINFOA;
- {$EXTERNALSYM LPWPPROVINFOA}
- tagWPPROVINFOA = record
- dwSize: DWORD;
- dwFlags: DWORD;
- dwPriority: DWORD;
- lpszProviderName: LPSTR;
- lpszProviderCLSID: LPSTR;
- lpszDllPath: LPSTR;
- end;
- {$EXTERNALSYM tagWPPROVINFOA}
- WPPROVINFOA = tagWPPROVINFOA;
- {$EXTERNALSYM WPPROVINFOA}
- TWpProvInfoA = WPPROVINFOA;
- PWpProvInfoA = LPWPPROVINFOA;
-
- LPWPPROVINFOW = ^WPPROVINFOW;
- {$EXTERNALSYM LPWPPROVINFOW}
- tagWPPROVINFOW = record
- dwSize: DWORD;
- dwFlags: DWORD;
- dwPriority: DWORD;
- lpszProviderName: LPWSTR;
- lpszProviderCLSID: LPWSTR;
- lpszDllPath: LPWSTR;
- end;
- {$EXTERNALSYM tagWPPROVINFOW}
- WPPROVINFOW = tagWPPROVINFOW;
- {$EXTERNALSYM WPPROVINFOW}
- TWpProvInfoW = WPPROVINFOW;
- PWpProvInfoW = LPWPPROVINFOW;
-
- {$IFDEF UNICODE}
- WPSITEINFO = WPSITEINFOW;
- {$EXTERNALSYM WPSITEINFO}
- LPWPSITEINFO = LPWPSITEINFOW;
- {$EXTERNALSYM LPWPSITEINFO}
- TWpSiteInfo = TWpSiteInfoW;
- PWpSiteInfo = PWpSiteInfoW;
- WPPROVINFO = WPPROVINFOW;
- {$EXTERNALSYM WPPROVINFO}
- LPWPPROVINFO = LPWPPROVINFOW;
- {$EXTERNALSYM LPWPPROVINFO}
- TWpProvInfo = TWpProvInfoW;
- PWpProvInfo = PWpProvInfoW;
- {$ELSE}
- WPSITEINFO = WPSITEINFOA;
- {$EXTERNALSYM WPSITEINFO}
- LPWPSITEINFO = LPWPSITEINFOA;
- {$EXTERNALSYM LPWPSITEINFO}
- TWpSiteInfo = TWpSiteInfoA;
- PWpSiteInfo = PWpSiteInfoA;
- WPPROVINFO = WPPROVINFOA;
- {$EXTERNALSYM WPPROVINFO}
- LPWPPROVINFO = LPWPPROVINFOA;
- {$EXTERNALSYM LPWPPROVINFO}
- TWpProvInfo = TWpProvInfoA;
- PWpProvInfo = PWpProvInfoA;
- {$ENDIF UNICODE}
-
-implementation
-
-end.
+{******************************************************************************}
+{ }
+{ Web Publishing Type Declarations API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: wptypes.h, released June 2000. The original Pascal }
+{ code is: WPTypes.pas, released December 2000. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwawptypes.pas,v 1.1 2005/04/04 07:56:11 marco Exp $
+
+unit JwaWPTypes;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "wptypes.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaWinType;
+
+//
+// Site info structures
+//
+
+type
+ LPWPSITEINFOA = ^WPSITEINFOA;
+ {$EXTERNALSYM LPWPSITEINFOA}
+ tagWPSITEINFOA = record
+ dwSize: DWORD;
+ dwFlags: DWORD;
+ lpszSiteName: LPSTR;
+ lpszSiteURL: LPSTR;
+ end;
+ {$EXTERNALSYM tagWPSITEINFOA}
+ WPSITEINFOA = tagWPSITEINFOA;
+ {$EXTERNALSYM WPSITEINFOA}
+ TWpSiteInfoA = WPSITEINFOA;
+ PWpSiteInfoA = LPWPSITEINFOA;
+
+ LPWPSITEINFOW = ^WPSITEINFOW;
+ {$EXTERNALSYM LPWPSITEINFOW}
+ tagWPSITEINFOW = record
+ dwSize: DWORD;
+ dwFlags: DWORD;
+ lpszSiteName: LPWSTR;
+ lpszSiteURL: LPWSTR;
+ end;
+ {$EXTERNALSYM tagWPSITEINFOW}
+ WPSITEINFOW = tagWPSITEINFOW;
+ {$EXTERNALSYM WPSITEINFOW}
+ TWpSiteInfoW = WPSITEINFOW;
+ PWpSiteInfoW = LPWPSITEINFOW;
+
+//
+// Provider info structures
+//
+
+ LPWPPROVINFOA = ^WPPROVINFOA;
+ {$EXTERNALSYM LPWPPROVINFOA}
+ tagWPPROVINFOA = record
+ dwSize: DWORD;
+ dwFlags: DWORD;
+ dwPriority: DWORD;
+ lpszProviderName: LPSTR;
+ lpszProviderCLSID: LPSTR;
+ lpszDllPath: LPSTR;
+ end;
+ {$EXTERNALSYM tagWPPROVINFOA}
+ WPPROVINFOA = tagWPPROVINFOA;
+ {$EXTERNALSYM WPPROVINFOA}
+ TWpProvInfoA = WPPROVINFOA;
+ PWpProvInfoA = LPWPPROVINFOA;
+
+ LPWPPROVINFOW = ^WPPROVINFOW;
+ {$EXTERNALSYM LPWPPROVINFOW}
+ tagWPPROVINFOW = record
+ dwSize: DWORD;
+ dwFlags: DWORD;
+ dwPriority: DWORD;
+ lpszProviderName: LPWSTR;
+ lpszProviderCLSID: LPWSTR;
+ lpszDllPath: LPWSTR;
+ end;
+ {$EXTERNALSYM tagWPPROVINFOW}
+ WPPROVINFOW = tagWPPROVINFOW;
+ {$EXTERNALSYM WPPROVINFOW}
+ TWpProvInfoW = WPPROVINFOW;
+ PWpProvInfoW = LPWPPROVINFOW;
+
+ {$IFDEF UNICODE}
+ WPSITEINFO = WPSITEINFOW;
+ {$EXTERNALSYM WPSITEINFO}
+ LPWPSITEINFO = LPWPSITEINFOW;
+ {$EXTERNALSYM LPWPSITEINFO}
+ TWpSiteInfo = TWpSiteInfoW;
+ PWpSiteInfo = PWpSiteInfoW;
+ WPPROVINFO = WPPROVINFOW;
+ {$EXTERNALSYM WPPROVINFO}
+ LPWPPROVINFO = LPWPPROVINFOW;
+ {$EXTERNALSYM LPWPPROVINFO}
+ TWpProvInfo = TWpProvInfoW;
+ PWpProvInfo = PWpProvInfoW;
+ {$ELSE}
+ WPSITEINFO = WPSITEINFOA;
+ {$EXTERNALSYM WPSITEINFO}
+ LPWPSITEINFO = LPWPSITEINFOA;
+ {$EXTERNALSYM LPWPSITEINFO}
+ TWpSiteInfo = TWpSiteInfoA;
+ PWpSiteInfo = PWpSiteInfoA;
+ WPPROVINFO = WPPROVINFOA;
+ {$EXTERNALSYM WPPROVINFO}
+ LPWPPROVINFO = LPWPPROVINFOA;
+ {$EXTERNALSYM LPWPPROVINFO}
+ TWpProvInfo = TWpProvInfoA;
+ PWpProvInfo = PWpProvInfoA;
+ {$ENDIF UNICODE}
+
+implementation
+
+end.
diff --git a/packages/extra/winunits/jwawpwizmsg.pas b/packages/extra/winunits/jwawpwizmsg.pas
index 8bbf3cfeeb..6b223196dc 100644
--- a/packages/extra/winunits/jwawpwizmsg.pas
+++ b/packages/extra/winunits/jwawpwizmsg.pas
@@ -1,229 +1,229 @@
-{******************************************************************************}
-{ }
-{ Web Publishing Wizzard Error Codes API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: wpwizmsg.h, released June 2000. The original Pascal }
-{ code is: WPWizMsg.pas, released December 2000. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwawpwizmsg.pas,v 1.1 2005/04/04 07:56:11 marco Exp $
-
-unit JwaWPWizMsg;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "wpwizmsg.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaWinType;
-
-//
-// Values are 32 bit values layed out as follows:
-//
-// 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1
-// 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
-// +---+-+-+-----------------------+-------------------------------+
-// |Sev|C|R| Facility | Code |
-// +---+-+-+-----------------------+-------------------------------+
-//
-// where
-//
-// Sev - is the severity code
-//
-// 00 - Success
-// 01 - Informational
-// 10 - Warning
-// 11 - Error
-//
-// C - is the Customer code flag
-//
-// R - is a reserved bit
-//
-// Facility - is the facility code
-//
-// Code - is the facility's status code
-//
-//
-// Define the facility codes
-//
-
-//
-// Define the severity codes
-//
-
-//
-// MessageId: WPWIZ_ERROR_FIRST
-//
-// MessageText:
-//
-// Web Publishing Wizard first error message.
-//
-
-const
- WPWIZ_ERROR_FIRST = DWORD($40042000);
- {$EXTERNALSYM WPWIZ_ERROR_FIRST}
-
-//
-// MessageId: WPWIZ_ERROR_UNKNOWN
-//
-// MessageText:
-//
-// An unknown error occurred in the Web Publishing Wizard.
-//
-
- WPWIZ_ERROR_UNKNOWN = DWORD($C0042001);
- {$EXTERNALSYM WPWIZ_ERROR_UNKNOWN}
-
-//
-// MessageId: WPWIZ_ERROR_PROV_QI
-//
-// MessageText:
-//
-// The Web Publishing Wizard was unable to determine the version number of your service provider.
-//
-
- WPWIZ_ERROR_PROV_QI = DWORD($C0042002);
- {$EXTERNALSYM WPWIZ_ERROR_PROV_QI}
-
-//
-// MessageId: WPWIZ_ERROR_INIT_FAILED
-//
-// MessageText:
-//
-// An error occurred while attempting to start the Web Publishing Wizard.
-//
-
- WPWIZ_ERROR_INIT_FAILED = DWORD($C0042003);
- {$EXTERNALSYM WPWIZ_ERROR_INIT_FAILED}
-
-//
-// MessageId: WPWIZ_ERROR_COCREATE_WEBPOST
-//
-// MessageText:
-//
-// The Web Publishing Wizard is not installed correctly. Please uninstall and then reinstall the wizard.
-//
-
- WPWIZ_ERROR_COCREATE_WEBPOST = DWORD($C0042004);
- {$EXTERNALSYM WPWIZ_ERROR_COCREATE_WEBPOST}
-
-//
-// MessageId: WPWIZ_ERROR_NO_PROVIDERS
-//
-// MessageText:
-//
-// The Web Publishing Wizard could not run because there are no service providers installed.
-//
-
- WPWIZ_ERROR_NO_PROVIDERS = DWORD($C0042005);
- {$EXTERNALSYM WPWIZ_ERROR_NO_PROVIDERS}
-
-//
-// MessageId: WPWIZ_ERROR_STATE_PTR
-//
-// MessageText:
-//
-// An internal error (0x2006) occurred in the Web Publishing Wizard.
-//
-
- WPWIZ_ERROR_STATE_PTR = DWORD($C0042006);
- {$EXTERNALSYM WPWIZ_ERROR_STATE_PTR}
-
-//
-// MessageId: WPWIZ_ERROR_WEBPOST_PTR
-//
-// MessageText:
-//
-// An internal error (0x2007) occurred in the Web Publishing Wizard.
-//
-
- WPWIZ_ERROR_WEBPOST_PTR = DWORD($C0042007);
- {$EXTERNALSYM WPWIZ_ERROR_WEBPOST_PTR}
-
-//
-// MessageId: WPWIZ_ERROR_FILE_NOT_FOUND
-//
-// MessageText:
-//
-// The file(s) you selected to publish could not be found.
-//
-
- WPWIZ_ERROR_FILE_NOT_FOUND = DWORD($C0042008);
- {$EXTERNALSYM WPWIZ_ERROR_FILE_NOT_FOUND}
-
-//
-// MessageId: WPWIZ_ERROR_PROPSHEET_ERROR
-//
-// MessageText:
-//
-// An error occurred in the user interface of the Web Publishing Wizard.
-//
-
- WPWIZ_ERROR_PROPSHEET_ERROR = DWORD($C0042009);
- {$EXTERNALSYM WPWIZ_ERROR_PROPSHEET_ERROR}
-
-//
-// MessageId: WPWIZ_ERROR_OUTOFMEMORY
-//
-// MessageText:
-//
-// The Web Publishing Wizard has run out of memory. Please close other running applications before continuing.
-//
-
- WPWIZ_ERROR_OUTOFMEMORY = DWORD($C004200A);
- {$EXTERNALSYM WPWIZ_ERROR_OUTOFMEMORY}
-
-//
-// MessageId: WPWIZ_ERROR_LAST
-//
-// MessageText:
-//
-// Web Publishing Wizard last error message.
-//
-
- WPWIZ_ERROR_LAST = DWORD($400420FF);
- {$EXTERNALSYM WPWIZ_ERROR_LAST}
-
-implementation
-
-end.
+{******************************************************************************}
+{ }
+{ Web Publishing Wizzard Error Codes API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: wpwizmsg.h, released June 2000. The original Pascal }
+{ code is: WPWizMsg.pas, released December 2000. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwawpwizmsg.pas,v 1.1 2005/04/04 07:56:11 marco Exp $
+
+unit JwaWPWizMsg;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "wpwizmsg.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaWinType;
+
+//
+// Values are 32 bit values layed out as follows:
+//
+// 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1
+// 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
+// +---+-+-+-----------------------+-------------------------------+
+// |Sev|C|R| Facility | Code |
+// +---+-+-+-----------------------+-------------------------------+
+//
+// where
+//
+// Sev - is the severity code
+//
+// 00 - Success
+// 01 - Informational
+// 10 - Warning
+// 11 - Error
+//
+// C - is the Customer code flag
+//
+// R - is a reserved bit
+//
+// Facility - is the facility code
+//
+// Code - is the facility's status code
+//
+//
+// Define the facility codes
+//
+
+//
+// Define the severity codes
+//
+
+//
+// MessageId: WPWIZ_ERROR_FIRST
+//
+// MessageText:
+//
+// Web Publishing Wizard first error message.
+//
+
+const
+ WPWIZ_ERROR_FIRST = DWORD($40042000);
+ {$EXTERNALSYM WPWIZ_ERROR_FIRST}
+
+//
+// MessageId: WPWIZ_ERROR_UNKNOWN
+//
+// MessageText:
+//
+// An unknown error occurred in the Web Publishing Wizard.
+//
+
+ WPWIZ_ERROR_UNKNOWN = DWORD($C0042001);
+ {$EXTERNALSYM WPWIZ_ERROR_UNKNOWN}
+
+//
+// MessageId: WPWIZ_ERROR_PROV_QI
+//
+// MessageText:
+//
+// The Web Publishing Wizard was unable to determine the version number of your service provider.
+//
+
+ WPWIZ_ERROR_PROV_QI = DWORD($C0042002);
+ {$EXTERNALSYM WPWIZ_ERROR_PROV_QI}
+
+//
+// MessageId: WPWIZ_ERROR_INIT_FAILED
+//
+// MessageText:
+//
+// An error occurred while attempting to start the Web Publishing Wizard.
+//
+
+ WPWIZ_ERROR_INIT_FAILED = DWORD($C0042003);
+ {$EXTERNALSYM WPWIZ_ERROR_INIT_FAILED}
+
+//
+// MessageId: WPWIZ_ERROR_COCREATE_WEBPOST
+//
+// MessageText:
+//
+// The Web Publishing Wizard is not installed correctly. Please uninstall and then reinstall the wizard.
+//
+
+ WPWIZ_ERROR_COCREATE_WEBPOST = DWORD($C0042004);
+ {$EXTERNALSYM WPWIZ_ERROR_COCREATE_WEBPOST}
+
+//
+// MessageId: WPWIZ_ERROR_NO_PROVIDERS
+//
+// MessageText:
+//
+// The Web Publishing Wizard could not run because there are no service providers installed.
+//
+
+ WPWIZ_ERROR_NO_PROVIDERS = DWORD($C0042005);
+ {$EXTERNALSYM WPWIZ_ERROR_NO_PROVIDERS}
+
+//
+// MessageId: WPWIZ_ERROR_STATE_PTR
+//
+// MessageText:
+//
+// An internal error (0x2006) occurred in the Web Publishing Wizard.
+//
+
+ WPWIZ_ERROR_STATE_PTR = DWORD($C0042006);
+ {$EXTERNALSYM WPWIZ_ERROR_STATE_PTR}
+
+//
+// MessageId: WPWIZ_ERROR_WEBPOST_PTR
+//
+// MessageText:
+//
+// An internal error (0x2007) occurred in the Web Publishing Wizard.
+//
+
+ WPWIZ_ERROR_WEBPOST_PTR = DWORD($C0042007);
+ {$EXTERNALSYM WPWIZ_ERROR_WEBPOST_PTR}
+
+//
+// MessageId: WPWIZ_ERROR_FILE_NOT_FOUND
+//
+// MessageText:
+//
+// The file(s) you selected to publish could not be found.
+//
+
+ WPWIZ_ERROR_FILE_NOT_FOUND = DWORD($C0042008);
+ {$EXTERNALSYM WPWIZ_ERROR_FILE_NOT_FOUND}
+
+//
+// MessageId: WPWIZ_ERROR_PROPSHEET_ERROR
+//
+// MessageText:
+//
+// An error occurred in the user interface of the Web Publishing Wizard.
+//
+
+ WPWIZ_ERROR_PROPSHEET_ERROR = DWORD($C0042009);
+ {$EXTERNALSYM WPWIZ_ERROR_PROPSHEET_ERROR}
+
+//
+// MessageId: WPWIZ_ERROR_OUTOFMEMORY
+//
+// MessageText:
+//
+// The Web Publishing Wizard has run out of memory. Please close other running applications before continuing.
+//
+
+ WPWIZ_ERROR_OUTOFMEMORY = DWORD($C004200A);
+ {$EXTERNALSYM WPWIZ_ERROR_OUTOFMEMORY}
+
+//
+// MessageId: WPWIZ_ERROR_LAST
+//
+// MessageText:
+//
+// Web Publishing Wizard last error message.
+//
+
+ WPWIZ_ERROR_LAST = DWORD($400420FF);
+ {$EXTERNALSYM WPWIZ_ERROR_LAST}
+
+implementation
+
+end.
diff --git a/packages/extra/winunits/jwaws2atm.pas b/packages/extra/winunits/jwaws2atm.pas
index 053cfcc33d..a2b17beb89 100644
--- a/packages/extra/winunits/jwaws2atm.pas
+++ b/packages/extra/winunits/jwaws2atm.pas
@@ -1,774 +1,774 @@
-{******************************************************************************}
-{ }
-{ Winsock2 ATM API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: ws2atm.h, released June 2000. The original Pascal }
-{ code is: WS2atm.pas, released December 2000. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwaws2atm.pas,v 1.1 2005/04/04 07:56:11 marco Exp $
-
-unit JwaWS2atm;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "ws2atm.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaWinType, JwaWinSock2;
-
-//#include <pshpack4.h>
-
-{$ALIGN ON}
-
-const
- ATMPROTO_AALUSER = $00; (* User-defined AAL *)
- {$EXTERNALSYM ATMPROTO_AALUSER}
- ATMPROTO_AAL1 = $01; (* AAL 1 *)
- {$EXTERNALSYM ATMPROTO_AAL1}
- ATMPROTO_AAL2 = $02; (* AAL 2 *)
- {$EXTERNALSYM ATMPROTO_AAL2}
- ATMPROTO_AAL34 = $03; (* AAL 3/4 *)
- {$EXTERNALSYM ATMPROTO_AAL34}
- ATMPROTO_AAL5 = $05; (* AAL 5 *)
- {$EXTERNALSYM ATMPROTO_AAL5}
-
- SAP_FIELD_ABSENT = DWORD($FFFFFFFE);
- {$EXTERNALSYM SAP_FIELD_ABSENT}
- SAP_FIELD_ANY = DWORD($FFFFFFFF);
- {$EXTERNALSYM SAP_FIELD_ANY}
- SAP_FIELD_ANY_AESA_SEL = DWORD($FFFFFFFA);
- {$EXTERNALSYM SAP_FIELD_ANY_AESA_SEL}
- SAP_FIELD_ANY_AESA_REST = DWORD($FFFFFFFB);
- {$EXTERNALSYM SAP_FIELD_ANY_AESA_REST}
-
-(*
- * values used for AddressType in struct ATM_ADDRESS
- *)
-
- ATM_E164 = $01 (* E.164 addressing scheme *);
- {$EXTERNALSYM ATM_E164}
- ATM_NSAP = $02 (* NSAP-style ATM Endsystem Address scheme *);
- {$EXTERNALSYM ATM_NSAP}
- ATM_AESA = $02 (* NSAP-style ATM Endsystem Address scheme *);
- {$EXTERNALSYM ATM_AESA}
-
- ATM_ADDR_SIZE = 20;
- {$EXTERNALSYM ATM_ADDR_SIZE}
-
-type
- ATM_ADDRESS = record
- AddressType: DWORD; (* E.164 or NSAP-style ATM Endsystem Address *)
- NumofDigits: DWORD; (* number of digits; *)
- Addr: array [0..ATM_ADDR_SIZE - 1] of UCHAR; (* IA5 digits for E164, BCD encoding for NSAP *)
- (* format as defined in the ATM Forum UNI 3.1 *)
- end;
- {$EXTERNALSYM ATM_ADDRESS}
- TAtmAddress = ATM_ADDRESS;
- PAtmAddress = ^ATM_ADDRESS;
-
-(*
- * values used for Layer2Protocol in B-LLI
- *)
-
-const
- BLLI_L2_ISO_1745 = $01; (* Basic mode ISO 1745 *)
- {$EXTERNALSYM BLLI_L2_ISO_1745}
- BLLI_L2_Q921 = $02; (* CCITT Rec. Q.921 *)
- {$EXTERNALSYM BLLI_L2_Q921}
- BLLI_L2_X25L = $06; (* CCITT Rec. X.25, link layer *)
- {$EXTERNALSYM BLLI_L2_X25L}
- BLLI_L2_X25M = $07; (* CCITT Rec. X.25, multilink *)
- {$EXTERNALSYM BLLI_L2_X25M}
- BLLI_L2_ELAPB = $08; (* Extended LAPB; for half duplex operation *)
- {$EXTERNALSYM BLLI_L2_ELAPB}
- BLLI_L2_HDLC_ARM = $09; (* HDLC ARM (ISO 4335) *)
- {$EXTERNALSYM BLLI_L2_HDLC_ARM}
- BLLI_L2_HDLC_NRM = $0A; (* HDLC NRM (ISO 4335) *)
- {$EXTERNALSYM BLLI_L2_HDLC_NRM}
- BLLI_L2_HDLC_ABM = $0B; (* HDLC ABM (ISO 4335) *)
- {$EXTERNALSYM BLLI_L2_HDLC_ABM}
- BLLI_L2_LLC = $0C; (* LAN logical link control (ISO 8802/2) *)
- {$EXTERNALSYM BLLI_L2_LLC}
- BLLI_L2_X75 = $0D; (* CCITT Rec. X.75, single link procedure *)
- {$EXTERNALSYM BLLI_L2_X75}
- BLLI_L2_Q922 = $0E; (* CCITT Rec. Q.922 *)
- {$EXTERNALSYM BLLI_L2_Q922}
- BLLI_L2_USER_SPECIFIED = $10; (* User Specified *)
- {$EXTERNALSYM BLLI_L2_USER_SPECIFIED}
- BLLI_L2_ISO_7776 = $11; (* ISO 7776 DTE-DTE operation *)
- {$EXTERNALSYM BLLI_L2_ISO_7776}
-
-(*
- * values used for Layer3Protocol in B-LLI
- *)
-
- BLLI_L3_X25 = $06; (* CCITT Rec. X.25, packet layer *)
- {$EXTERNALSYM BLLI_L3_X25}
- BLLI_L3_ISO_8208 = $07; (* ISO/IEC 8208 (X.25 packet layer for DTE *)
- {$EXTERNALSYM BLLI_L3_ISO_8208}
- BLLI_L3_X223 = $08; (* X.223/ISO 8878 *)
- {$EXTERNALSYM BLLI_L3_X223}
- BLLI_L3_SIO_8473 = $09; (* ISO/IEC 8473 (OSI connectionless) *)
- {$EXTERNALSYM BLLI_L3_SIO_8473}
- BLLI_L3_T70 = $0A; (* CCITT Rec. T.70 min. network layer *)
- {$EXTERNALSYM BLLI_L3_T70}
- BLLI_L3_ISO_TR9577 = $0B; (* ISO/IEC TR 9577 Network Layer Protocol ID*)
- {$EXTERNALSYM BLLI_L3_ISO_TR9577}
- BLLI_L3_USER_SPECIFIED = $10; (* User Specified *)
- {$EXTERNALSYM BLLI_L3_USER_SPECIFIED}
-
-(*
- * values used for Layer3IPI in B-LLI
- *)
-
- BLLI_L3_IPI_SNAP = $80; (* IEEE 802.1 SNAP identifier *)
- {$EXTERNALSYM BLLI_L3_IPI_SNAP}
- BLLI_L3_IPI_IP = $CC; (* Internet Protocol (IP) identifier *)
- {$EXTERNALSYM BLLI_L3_IPI_IP}
-
-type
- ATM_BLLI = record
- Layer2Protocol: DWORD; (* User information layer 2 protocol *)
- Layer2UserSpecifiedProtocol: DWORD; (* User specified layer 2 protocol information *)
- Layer3Protocol: DWORD; (* User information layer 3 protocol *)
- Layer3UserSpecifiedProtocol: DWORD; (* User specified layer 3 protocol information *)
- Layer3IPI: DWORD; (* ISO/IEC TR 9577 Initial Protocol Identifier *)
- SnapID: array [0..4] of UCHAR; (* SNAP ID consisting of OUI and PID *)
- end;
- {$EXTERNALSYM ATM_BLLI}
- TAtmBLLI = ATM_BLLI;
- PAtmBLLI = ^ATM_BLLI;
-
-(*
- * values used for the HighLayerInfoType field in ATM_BHLI
- *)
-
-const
- BHLI_ISO = $00; (* ISO *)
- {$EXTERNALSYM BHLI_ISO}
- BHLI_UserSpecific = $01; (* User Specific *)
- {$EXTERNALSYM BHLI_UserSpecific}
- BHLI_HighLayerProfile = $02; (* High layer profile (only in UNI3.0) *)
- {$EXTERNALSYM BHLI_HighLayerProfile}
- BHLI_VendorSpecificAppId = $03; (* Vendor-Specific Application ID *)
- {$EXTERNALSYM BHLI_VendorSpecificAppId}
-
-type
- ATM_BHLI = record
- HighLayerInfoType: DWORD; (* High Layer Information Type *)
- HighLayerInfoLength: DWORD; (* number of bytes in HighLayerInfo *)
- HighLayerInfo: array [0..7] of UCHAR; (* the value dependent on the *)
- (* HighLayerInfoType field *)
- end;
- {$EXTERNALSYM ATM_BHLI}
- TAtmBHLI = ATM_BHLI;
- PAtmBHLI = ^ATM_BHLI;
-
- SOCKADDR_ATM = record
- satm_family: u_short; (* address family should be AF_ATM *)
- satm_number: ATM_ADDRESS; (* ATM address *)
- satm_blli: ATM_BLLI; (* B-LLI *)
- satm_bhli: ATM_BHLI; (* B-HLI *)
- end;
- {$EXTERNALSYM SOCKADDR_ATM}
- PSOCKADDR_ATM = ^SOCKADDR_ATM;
- LPSOCKADDR_ATM = ^SOCKADDR_ATM;
- TSockAddrAtm = SOCKADDR_ATM;
- PSockAddrAtm = LPSOCKADDR_ATM;
-
- Q2931_IE_TYPE = (
- IE_AALParameters,
- IE_TrafficDescriptor,
- IE_BroadbandBearerCapability,
- IE_BHLI,
- IE_BLLI,
- IE_CalledPartyNumber,
- IE_CalledPartySubaddress,
- IE_CallingPartyNumber,
- IE_CallingPartySubaddress,
- IE_Cause,
- IE_QOSClass,
- IE_TransitNetworkSelection);
- {$EXTERNALSYM Q2931_IE_TYPE}
- TQ2931IEType = Q2931_IE_TYPE;
- PQ2931IEType = ^Q2931_IE_TYPE;
-
- Q2931_IE = record
- IEType: Q2931_IE_TYPE;
- IELength: ULONG;
- IE: array [0..0] of UCHAR;
- end;
- {$EXTERNALSYM Q2931_IE}
- TQ2931IE = Q2931_IE;
- PQ2931IE = ^Q2931_IE;
-
-(*
- * manifest constants for the AALType field in struct AAL_PARAMETERS_IE
- *)
-
-const
- AALTYPE_5 = 5; (* AAL 5 *)
- {$EXTERNALSYM AALTYPE_5}
- AALTYPE_USER = 16; (* user-defined AAL *)
- {$EXTERNALSYM AALTYPE_USER}
-
-type
- AAL_TYPE = DWORD;
- {$EXTERNALSYM AAL_TYPE}
- TAALType = AAL_TYPE;
- PAALType = ^AAL_TYPE;
-
-(*
- * values used for the Mode field in struct AAL5_PARAMETERS
- *)
-
-const
- AAL5_MODE_MESSAGE = $01;
- {$EXTERNALSYM AAL5_MODE_MESSAGE}
- AAL5_MODE_STREAMING = $02;
- {$EXTERNALSYM AAL5_MODE_STREAMING}
-
-(*
- * values used for the SSCSType field in struct AAL5_PARAMETERS
- *)
-
- AAL5_SSCS_NULL = $00;
- {$EXTERNALSYM AAL5_SSCS_NULL}
- AAL5_SSCS_SSCOP_ASSURED = $01;
- {$EXTERNALSYM AAL5_SSCS_SSCOP_ASSURED}
- AAL5_SSCS_SSCOP_NON_ASSURED = $02;
- {$EXTERNALSYM AAL5_SSCS_SSCOP_NON_ASSURED}
- AAL5_SSCS_FRAME_RELAY = $04;
- {$EXTERNALSYM AAL5_SSCS_FRAME_RELAY}
-
-type
- AAL5_PARAMETERS = record
- ForwardMaxCPCSSDUSize: ULONG;
- BackwardMaxCPCSSDUSize: ULONG;
- Mode: UCHAR; (* only available in UNI 3.0 *)
- SSCSType: UCHAR;
- end;
- {$EXTERNALSYM AAL5_PARAMETERS}
- TAAL5Parameters = AAL5_PARAMETERS;
- PAAL5Parameters = ^AAL5_PARAMETERS;
-
- AALUSER_PARAMETERS = record
- UserDefined: ULONG;
- end;
- {$EXTERNALSYM AALUSER_PARAMETERS}
- TAALUserParameters = AALUSER_PARAMETERS;
- PAALUserParameters = ^AALUSER_PARAMETERS;
-
- AAL_PARAMETERS_IE = record
- AALType: AAL_TYPE;
- case Integer of
- 0: (AAL5Parameters: AAL5_PARAMETERS);
- 1: (AALUserParameters: AALUSER_PARAMETERS);
- end;
- {$EXTERNALSYM AAL_PARAMETERS_IE}
- TAALParametersIE = AAL_PARAMETERS_IE;
- PAALParametersIE = ^AAL_PARAMETERS_IE;
-
- ATM_TD = record
- PeakCellRate_CLP0: ULONG;
- PeakCellRate_CLP01: ULONG;
- SustainableCellRate_CLP0: ULONG;
- SustainableCellRate_CLP01: ULONG;
- MaxBurstSize_CLP0: ULONG;
- MaxBurstSize_CLP01: ULONG;
- Tagging: BOOL;
- end;
- {$EXTERNALSYM ATM_TD}
- TAtmTD = ATM_TD;
- PAtmTD = ^ATM_TD;
-
- ATM_TRAFFIC_DESCRIPTOR_IE = record
- Forward_: ATM_TD;
- Backward: ATM_TD;
- BestEffort: BOOL;
- end;
- {$EXTERNALSYM ATM_TRAFFIC_DESCRIPTOR_IE}
- TAtmTrafficDescriptorIE = ATM_TD;
- PAtmTrafficDescriptorIE = ^ATM_TD;
-
-(*
- * values used for the BearerClass field in struct ATM_BROADBAND_BEARER_CAPABILITY_IE
- *)
-
-const
- BCOB_A = $01; (* Bearer class A *)
- {$EXTERNALSYM BCOB_A}
- BCOB_C = $03; (* Bearer class C *)
- {$EXTERNALSYM BCOB_C}
- BCOB_X = $10; (* Bearer class X *)
- {$EXTERNALSYM BCOB_X}
-
-(*
- * values used for the TrafficType field in struct ATM_BROADBAND_BEARER_CAPABILITY_IE
- *)
-
- TT_NOIND = $00; (* No indication of traffic type *)
- {$EXTERNALSYM TT_NOIND}
- TT_CBR = $04; (* Constant bit rate *)
- {$EXTERNALSYM TT_CBR}
- TT_VBR = $08; (* Variable bit rate *)
- {$EXTERNALSYM TT_VBR}
-
-(*
- * values used for the TimingRequirements field in struct ATM_BROADBAND_BEARER_CAPABILITY_IE
- *)
-
- TR_NOIND = $00; (* No timing requirement indication *)
- {$EXTERNALSYM TR_NOIND}
- TR_END_TO_END = $01; (* End-to-end timing required *)
- {$EXTERNALSYM TR_END_TO_END}
- TR_NO_END_TO_END = $02; (* End-to-end timing not required *)
- {$EXTERNALSYM TR_NO_END_TO_END}
-
-(*
- * values used for the ClippingSusceptability field in struct ATM_BROADBAND_BEARER_CAPABILITY_IE
- *)
-
- CLIP_NOT = $00; (* Not susceptible to clipping *)
- {$EXTERNALSYM CLIP_NOT}
- CLIP_SUS = $20; (* Susceptible to clipping *)
- {$EXTERNALSYM CLIP_SUS}
-
-(*
- * values used for the UserPlaneConnectionConfig field in
- * struct ATM_BROADBAND_BEARER_CAPABILITY_IE
- *)
-
- UP_P2P = $00; (* Point-to-point connection *)
- {$EXTERNALSYM UP_P2P}
- UP_P2MP = $01; (* Point-to-multipoint connection *)
- {$EXTERNALSYM UP_P2MP}
-
-type
- ATM_BROADBAND_BEARER_CAPABILITY_IE = record
- BearerClass: UCHAR;
- TrafficType: UCHAR;
- TimingRequirements: UCHAR;
- ClippingSusceptability: UCHAR;
- UserPlaneConnectionConfig: UCHAR;
- end;
- {$EXTERNALSYM ATM_BROADBAND_BEARER_CAPABILITY_IE}
- TAtmBroadbandBearerCapabilityIE = ATM_BROADBAND_BEARER_CAPABILITY_IE;
- PAtmBroadbandBearerCapabilityIE = ^ATM_BROADBAND_BEARER_CAPABILITY_IE;
-
- ATM_BHLI_IE = ATM_BHLI;
- {$EXTERNALSYM ATM_BHLI_IE}
- TAtmBHLIIE = ATM_BHLI_IE;
- PAtmBHLIIE = ^ATM_BHLI_IE;
-
-(*
- * values used for the Layer2Mode field in struct ATM_BLLI_IE
- *)
-
-const
- BLLI_L2_MODE_NORMAL = $40;
- {$EXTERNALSYM BLLI_L2_MODE_NORMAL}
- BLLI_L2_MODE_EXT = $80;
- {$EXTERNALSYM BLLI_L2_MODE_EXT}
-
-(*
- * values used for the Layer3Mode field in struct ATM_BLLI_IE
- *)
-
- BLLI_L3_MODE_NORMAL = $40;
- {$EXTERNALSYM BLLI_L3_MODE_NORMAL}
- BLLI_L3_MODE_EXT = $80;
- {$EXTERNALSYM BLLI_L3_MODE_EXT}
-
-(*
- * values used for the Layer3DefaultPacketSize field in struct ATM_BLLI_IE
- *)
-
- BLLI_L3_PACKET_16 = $04;
- {$EXTERNALSYM BLLI_L3_PACKET_16}
- BLLI_L3_PACKET_32 = $05;
- {$EXTERNALSYM BLLI_L3_PACKET_32}
- BLLI_L3_PACKET_64 = $06;
- {$EXTERNALSYM BLLI_L3_PACKET_64}
- BLLI_L3_PACKET_128 = $07;
- {$EXTERNALSYM BLLI_L3_PACKET_128}
- BLLI_L3_PACKET_256 = $08;
- {$EXTERNALSYM BLLI_L3_PACKET_256}
- BLLI_L3_PACKET_512 = $09;
- {$EXTERNALSYM BLLI_L3_PACKET_512}
- BLLI_L3_PACKET_1024 = $0A;
- {$EXTERNALSYM BLLI_L3_PACKET_1024}
- BLLI_L3_PACKET_2048 = $0B;
- {$EXTERNALSYM BLLI_L3_PACKET_2048}
- BLLI_L3_PACKET_4096 = $0C;
- {$EXTERNALSYM BLLI_L3_PACKET_4096}
-
-type
- ATM_BLLI_IE = record
- Layer2Protocol: DWORD; (* User information layer 2 protocol *)
- Layer2Mode: UCHAR;
- Layer2WindowSize: UCHAR;
- Layer2UserSpecifiedProtocol: DWORD; (* User specified layer 2 protocol information *)
- Layer3Protocol: DWORD; (* User information layer 3 protocol *)
- Layer3Mode: UCHAR;
- Layer3DefaultPacketSize: UCHAR;
- Layer3PacketWindowSize: UCHAR;
- Layer3UserSpecifiedProtocol: DWORD; (* User specified layer 3 protocol information *)
- Layer3IPI: DWORD; (* ISO/IEC TR 9577 Initial Protocol Identifier *)
- SnapID: array [0..4] of UCHAR; (* SNAP ID consisting of OUI and PID *)
- end;
- {$EXTERNALSYM ATM_BLLI_IE}
- TAtmBLLIIE = ATM_BLLI_IE;
- PAtmBLLIIE = ^ATM_BLLI_IE;
-
- ATM_CALLED_PARTY_NUMBER_IE = ATM_ADDRESS;
- {$EXTERNALSYM ATM_CALLED_PARTY_NUMBER_IE}
- TAtmCalledPartyNumberIE = ATM_CALLED_PARTY_NUMBER_IE;
- PAtmCalledPartyNumberIE = ^ATM_CALLED_PARTY_NUMBER_IE;
- ATM_CALLED_PARTY_SUBADDRESS_IE = ATM_ADDRESS;
- {$EXTERNALSYM ATM_CALLED_PARTY_SUBADDRESS_IE}
- TAtmCalledPartySubAddressIE = ATM_CALLED_PARTY_SUBADDRESS_IE;
- PAtmCalledPartySubAddressIE = ^ATM_CALLED_PARTY_SUBADDRESS_IE;
-
-(*
- * values used for the Presentation_Indication field in
- * struct ATM_CALLING_PARTY_NUMBER_IE
- *)
-
-const
- PI_ALLOWED = $00;
- {$EXTERNALSYM PI_ALLOWED}
- PI_RESTRICTED = $40;
- {$EXTERNALSYM PI_RESTRICTED}
- PI_NUMBER_NOT_AVAILABLE = $80;
- {$EXTERNALSYM PI_NUMBER_NOT_AVAILABLE}
-
-(*
- * values used for the Screening_Indicator field in
- * struct ATM_CALLING_PARTY_NUMBER_IE
- *)
-
- SI_USER_NOT_SCREENED = $00;
- {$EXTERNALSYM SI_USER_NOT_SCREENED}
- SI_USER_PASSED = $01;
- {$EXTERNALSYM SI_USER_PASSED}
- SI_USER_FAILED = $02;
- {$EXTERNALSYM SI_USER_FAILED}
- SI_NETWORK = $03;
- {$EXTERNALSYM SI_NETWORK}
-
-type
- ATM_CALLING_PARTY_NUMBER_IE = record
- ATM_Number: ATM_ADDRESS;
- Presentation_Indication: UCHAR;
- Screening_Indicator: UCHAR;
- end;
- {$EXTERNALSYM ATM_CALLING_PARTY_NUMBER_IE}
- TAtmCallingPartyNumberIE = ATM_CALLING_PARTY_NUMBER_IE;
- PAtmCallingPartyNumberIE = ^ATM_CALLING_PARTY_NUMBER_IE;
-
- ATM_CALLING_PARTY_SUBADDRESS_IE = ATM_ADDRESS;
- {$EXTERNALSYM ATM_CALLING_PARTY_SUBADDRESS_IE}
- TAtmCallingPartySubAddressIE = ATM_CALLING_PARTY_SUBADDRESS_IE;
- PAtmCallingPartySubAddressIE = ^ATM_CALLING_PARTY_SUBADDRESS_IE;
-
-(*
- * values used for the Location field in struct ATM_CAUSE_IE
- *)
-
-const
- CAUSE_LOC_USER = $00;
- {$EXTERNALSYM CAUSE_LOC_USER}
- CAUSE_LOC_PRIVATE_LOCAL = $01;
- {$EXTERNALSYM CAUSE_LOC_PRIVATE_LOCAL}
- CAUSE_LOC_PUBLIC_LOCAL = $02;
- {$EXTERNALSYM CAUSE_LOC_PUBLIC_LOCAL}
- CAUSE_LOC_TRANSIT_NETWORK = $03;
- {$EXTERNALSYM CAUSE_LOC_TRANSIT_NETWORK}
- CAUSE_LOC_PUBLIC_REMOTE = $04;
- {$EXTERNALSYM CAUSE_LOC_PUBLIC_REMOTE}
- CAUSE_LOC_PRIVATE_REMOTE = $05;
- {$EXTERNALSYM CAUSE_LOC_PRIVATE_REMOTE}
- CAUSE_LOC_INTERNATIONAL_NETWORK = $07;
- {$EXTERNALSYM CAUSE_LOC_INTERNATIONAL_NETWORK}
- CAUSE_LOC_BEYOND_INTERWORKING = $0A;
- {$EXTERNALSYM CAUSE_LOC_BEYOND_INTERWORKING}
-
-(*
- * values used for the Cause field in struct ATM_CAUSE_IE
- *)
-
- CAUSE_UNALLOCATED_NUMBER = $01;
- {$EXTERNALSYM CAUSE_UNALLOCATED_NUMBER}
- CAUSE_NO_ROUTE_TO_TRANSIT_NETWORK = $02;
- {$EXTERNALSYM CAUSE_NO_ROUTE_TO_TRANSIT_NETWORK}
- CAUSE_NO_ROUTE_TO_DESTINATION = $03;
- {$EXTERNALSYM CAUSE_NO_ROUTE_TO_DESTINATION}
- CAUSE_VPI_VCI_UNACCEPTABLE = $0A;
- {$EXTERNALSYM CAUSE_VPI_VCI_UNACCEPTABLE}
- CAUSE_NORMAL_CALL_CLEARING = $10;
- {$EXTERNALSYM CAUSE_NORMAL_CALL_CLEARING}
- CAUSE_USER_BUSY = $11;
- {$EXTERNALSYM CAUSE_USER_BUSY}
- CAUSE_NO_USER_RESPONDING = $12;
- {$EXTERNALSYM CAUSE_NO_USER_RESPONDING}
- CAUSE_CALL_REJECTED = $15;
- {$EXTERNALSYM CAUSE_CALL_REJECTED}
- CAUSE_NUMBER_CHANGED = $16;
- {$EXTERNALSYM CAUSE_NUMBER_CHANGED}
- CAUSE_USER_REJECTS_CLIR = $17;
- {$EXTERNALSYM CAUSE_USER_REJECTS_CLIR}
- CAUSE_DESTINATION_OUT_OF_ORDER = $1B;
- {$EXTERNALSYM CAUSE_DESTINATION_OUT_OF_ORDER}
- CAUSE_INVALID_NUMBER_FORMAT = $1C;
- {$EXTERNALSYM CAUSE_INVALID_NUMBER_FORMAT}
- CAUSE_STATUS_ENQUIRY_RESPONSE = $1E;
- {$EXTERNALSYM CAUSE_STATUS_ENQUIRY_RESPONSE}
- CAUSE_NORMAL_UNSPECIFIED = $1F;
- {$EXTERNALSYM CAUSE_NORMAL_UNSPECIFIED}
- CAUSE_VPI_VCI_UNAVAILABLE = $23;
- {$EXTERNALSYM CAUSE_VPI_VCI_UNAVAILABLE}
- CAUSE_NETWORK_OUT_OF_ORDER = $26;
- {$EXTERNALSYM CAUSE_NETWORK_OUT_OF_ORDER}
- CAUSE_TEMPORARY_FAILURE = $29;
- {$EXTERNALSYM CAUSE_TEMPORARY_FAILURE}
- CAUSE_ACCESS_INFORMAION_DISCARDED = $2B;
- {$EXTERNALSYM CAUSE_ACCESS_INFORMAION_DISCARDED}
- CAUSE_NO_VPI_VCI_AVAILABLE = $2D;
- {$EXTERNALSYM CAUSE_NO_VPI_VCI_AVAILABLE}
- CAUSE_RESOURCE_UNAVAILABLE = $2F;
- {$EXTERNALSYM CAUSE_RESOURCE_UNAVAILABLE}
- CAUSE_QOS_UNAVAILABLE = $31;
- {$EXTERNALSYM CAUSE_QOS_UNAVAILABLE}
- CAUSE_USER_CELL_RATE_UNAVAILABLE = $33;
- {$EXTERNALSYM CAUSE_USER_CELL_RATE_UNAVAILABLE}
- CAUSE_BEARER_CAPABILITY_UNAUTHORIZED = $39;
- {$EXTERNALSYM CAUSE_BEARER_CAPABILITY_UNAUTHORIZED}
- CAUSE_BEARER_CAPABILITY_UNAVAILABLE = $3A;
- {$EXTERNALSYM CAUSE_BEARER_CAPABILITY_UNAVAILABLE}
- CAUSE_OPTION_UNAVAILABLE = $3F;
- {$EXTERNALSYM CAUSE_OPTION_UNAVAILABLE}
- CAUSE_BEARER_CAPABILITY_UNIMPLEMENTED = $41;
- {$EXTERNALSYM CAUSE_BEARER_CAPABILITY_UNIMPLEMENTED}
- CAUSE_UNSUPPORTED_TRAFFIC_PARAMETERS = $49;
- {$EXTERNALSYM CAUSE_UNSUPPORTED_TRAFFIC_PARAMETERS}
- CAUSE_INVALID_CALL_REFERENCE = $51;
- {$EXTERNALSYM CAUSE_INVALID_CALL_REFERENCE}
- CAUSE_CHANNEL_NONEXISTENT = $52;
- {$EXTERNALSYM CAUSE_CHANNEL_NONEXISTENT}
- CAUSE_INCOMPATIBLE_DESTINATION = $58;
- {$EXTERNALSYM CAUSE_INCOMPATIBLE_DESTINATION}
- CAUSE_INVALID_ENDPOINT_REFERENCE = $59;
- {$EXTERNALSYM CAUSE_INVALID_ENDPOINT_REFERENCE}
- CAUSE_INVALID_TRANSIT_NETWORK_SELECTION = $5B;
- {$EXTERNALSYM CAUSE_INVALID_TRANSIT_NETWORK_SELECTION}
- CAUSE_TOO_MANY_PENDING_ADD_PARTY = $5C;
- {$EXTERNALSYM CAUSE_TOO_MANY_PENDING_ADD_PARTY}
- CAUSE_AAL_PARAMETERS_UNSUPPORTED = $5D;
- {$EXTERNALSYM CAUSE_AAL_PARAMETERS_UNSUPPORTED}
- CAUSE_MANDATORY_IE_MISSING = $60;
- {$EXTERNALSYM CAUSE_MANDATORY_IE_MISSING}
- CAUSE_UNIMPLEMENTED_MESSAGE_TYPE = $61;
- {$EXTERNALSYM CAUSE_UNIMPLEMENTED_MESSAGE_TYPE}
- CAUSE_UNIMPLEMENTED_IE = $63;
- {$EXTERNALSYM CAUSE_UNIMPLEMENTED_IE}
- CAUSE_INVALID_IE_CONTENTS = $64;
- {$EXTERNALSYM CAUSE_INVALID_IE_CONTENTS}
- CAUSE_INVALID_STATE_FOR_MESSAGE = $65;
- {$EXTERNALSYM CAUSE_INVALID_STATE_FOR_MESSAGE}
- CAUSE_RECOVERY_ON_TIMEOUT = $66;
- {$EXTERNALSYM CAUSE_RECOVERY_ON_TIMEOUT}
- CAUSE_INCORRECT_MESSAGE_LENGTH = $68;
- {$EXTERNALSYM CAUSE_INCORRECT_MESSAGE_LENGTH}
- CAUSE_PROTOCOL_ERROR = $6F;
- {$EXTERNALSYM CAUSE_PROTOCOL_ERROR}
-
-(*
- * values used for the Condition portion of the Diagnostics field
- * in struct ATM_CAUSE_IE, for certain Cause values
- *)
-
- CAUSE_COND_UNKNOWN = $00;
- {$EXTERNALSYM CAUSE_COND_UNKNOWN}
- CAUSE_COND_PERMANENT = $01;
- {$EXTERNALSYM CAUSE_COND_PERMANENT}
- CAUSE_COND_TRANSIENT = $02;
- {$EXTERNALSYM CAUSE_COND_TRANSIENT}
-
-(*
- * values used for the Rejection Reason portion of the Diagnostics field
- * in struct ATM_CAUSE_IE, for certain Cause values
- *)
-
- CAUSE_REASON_USER = $00;
- {$EXTERNALSYM CAUSE_REASON_USER}
- CAUSE_REASON_IE_MISSING = $04;
- {$EXTERNALSYM CAUSE_REASON_IE_MISSING}
- CAUSE_REASON_IE_INSUFFICIENT = $08;
- {$EXTERNALSYM CAUSE_REASON_IE_INSUFFICIENT}
-
-(*
- * values used for the P-U flag of the Diagnostics field
- * in struct ATM_CAUSE_IE, for certain Cause values
- *)
-
- CAUSE_PU_PROVIDER = $00;
- {$EXTERNALSYM CAUSE_PU_PROVIDER}
- CAUSE_PU_USER = $08;
- {$EXTERNALSYM CAUSE_PU_USER}
-
-(*
- * values used for the N-A flag of the Diagnostics field
- * in struct ATM_CAUSE_IE, for certain Cause values
- *)
-
- CAUSE_NA_NORMAL = $00;
- {$EXTERNALSYM CAUSE_NA_NORMAL}
- CAUSE_NA_ABNORMAL = $04;
- {$EXTERNALSYM CAUSE_NA_ABNORMAL}
-
-type
- ATM_CAUSE_IE = record
- Location: UCHAR;
- Cause: UCHAR;
- DiagnosticsLength: UCHAR;
- Diagnostics: array [0..3] of UCHAR;
- end;
- {$EXTERNALSYM ATM_CAUSE_IE}
- TAtmCauseIE = ATM_CAUSE_IE;
- PAtmCauseIE = ^ATM_CAUSE_IE;
-
-(*
- * values used for the QOSClassForward and QOSClassBackward
- * field in struct ATM_QOS_CLASS_IE
- *)
-
-const
- QOS_CLASS0 = $00;
- {$EXTERNALSYM QOS_CLASS0}
- QOS_CLASS1 = $01;
- {$EXTERNALSYM QOS_CLASS1}
- QOS_CLASS2 = $02;
- {$EXTERNALSYM QOS_CLASS2}
- QOS_CLASS3 = $03;
- {$EXTERNALSYM QOS_CLASS3}
- QOS_CLASS4 = $04;
- {$EXTERNALSYM QOS_CLASS4}
-
-type
- ATM_QOS_CLASS_IE = record
- QOSClassForward: UCHAR;
- QOSClassBackward: UCHAR;
- end;
- {$EXTERNALSYM ATM_QOS_CLASS_IE}
- TAtmQosClassIE = ATM_QOS_CLASS_IE;
- PAtmQosClassIE = ^ATM_QOS_CLASS_IE;
-
-(*
- * values used for the TypeOfNetworkId field in struct ATM_TRANSIT_NETWORK_SELECTION_IE
- *)
-
-const
- TNS_TYPE_NATIONAL = $40;
- {$EXTERNALSYM TNS_TYPE_NATIONAL}
-
-(*
- * values used for the NetworkIdPlan field in struct ATM_TRANSIT_NETWORK_SELECTION_IE
- *)
-
- TNS_PLAN_CARRIER_ID_CODE = $01;
- {$EXTERNALSYM TNS_PLAN_CARRIER_ID_CODE}
-
-type
- ATM_TRANSIT_NETWORK_SELECTION_IE = record
- TypeOfNetworkId: UCHAR;
- NetworkIdPlan: UCHAR;
- NetworkIdLength: UCHAR;
- NetworkId: array [0..0] of UCHAR;
- end;
- {$EXTERNALSYM ATM_TRANSIT_NETWORK_SELECTION_IE}
- TAtmTransitNetworkSelectionIE = ATM_TRANSIT_NETWORK_SELECTION_IE;
- PAtmTransitNetworkSelectionIE = ^ATM_TRANSIT_NETWORK_SELECTION_IE;
-
-(*
- * ATM specific Ioctl codes
- *)
-
-const
- SIO_GET_NUMBER_OF_ATM_DEVICES = $50160001;
- {$EXTERNALSYM SIO_GET_NUMBER_OF_ATM_DEVICES}
- SIO_GET_ATM_ADDRESS = DWORD($d0160002);
- {$EXTERNALSYM SIO_GET_ATM_ADDRESS}
- SIO_ASSOCIATE_PVC = DWORD($90160003);
- {$EXTERNALSYM SIO_ASSOCIATE_PVC}
- SIO_GET_ATM_CONNECTION_ID = $50160004;
- {$EXTERNALSYM SIO_GET_ATM_CONNECTION_ID}
-
-(* ATM Connection Identifier *)
-
-type
- ATM_CONNECTION_ID = record
- DeviceNumber: DWORD;
- VPI: DWORD;
- VCI: DWORD;
- end;
- {$EXTERNALSYM ATM_CONNECTION_ID}
- TAtmConnectionID = ATM_CONNECTION_ID;
- PAtmConnectionID = ^ATM_CONNECTION_ID;
-
-(*
- * Input buffer format for SIO_ASSOCIATE_PVC
- *)
-
- ATM_PVC_PARAMS = record
- PvcConnectionId: ATM_CONNECTION_ID;
- PvcQos: QOS;
- end;
- {$EXTERNALSYM ATM_PVC_PARAMS}
- TAtmPvcParams = ATM_PVC_PARAMS;
- PAtmPvcParams = ^ATM_PVC_PARAMS;
-
-implementation
-
-end.
+{******************************************************************************}
+{ }
+{ Winsock2 ATM API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: ws2atm.h, released June 2000. The original Pascal }
+{ code is: WS2atm.pas, released December 2000. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwaws2atm.pas,v 1.1 2005/04/04 07:56:11 marco Exp $
+
+unit JwaWS2atm;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "ws2atm.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaWinType, JwaWinSock2;
+
+//#include <pshpack4.h>
+
+{$ALIGN ON}
+
+const
+ ATMPROTO_AALUSER = $00; (* User-defined AAL *)
+ {$EXTERNALSYM ATMPROTO_AALUSER}
+ ATMPROTO_AAL1 = $01; (* AAL 1 *)
+ {$EXTERNALSYM ATMPROTO_AAL1}
+ ATMPROTO_AAL2 = $02; (* AAL 2 *)
+ {$EXTERNALSYM ATMPROTO_AAL2}
+ ATMPROTO_AAL34 = $03; (* AAL 3/4 *)
+ {$EXTERNALSYM ATMPROTO_AAL34}
+ ATMPROTO_AAL5 = $05; (* AAL 5 *)
+ {$EXTERNALSYM ATMPROTO_AAL5}
+
+ SAP_FIELD_ABSENT = DWORD($FFFFFFFE);
+ {$EXTERNALSYM SAP_FIELD_ABSENT}
+ SAP_FIELD_ANY = DWORD($FFFFFFFF);
+ {$EXTERNALSYM SAP_FIELD_ANY}
+ SAP_FIELD_ANY_AESA_SEL = DWORD($FFFFFFFA);
+ {$EXTERNALSYM SAP_FIELD_ANY_AESA_SEL}
+ SAP_FIELD_ANY_AESA_REST = DWORD($FFFFFFFB);
+ {$EXTERNALSYM SAP_FIELD_ANY_AESA_REST}
+
+(*
+ * values used for AddressType in struct ATM_ADDRESS
+ *)
+
+ ATM_E164 = $01 (* E.164 addressing scheme *);
+ {$EXTERNALSYM ATM_E164}
+ ATM_NSAP = $02 (* NSAP-style ATM Endsystem Address scheme *);
+ {$EXTERNALSYM ATM_NSAP}
+ ATM_AESA = $02 (* NSAP-style ATM Endsystem Address scheme *);
+ {$EXTERNALSYM ATM_AESA}
+
+ ATM_ADDR_SIZE = 20;
+ {$EXTERNALSYM ATM_ADDR_SIZE}
+
+type
+ ATM_ADDRESS = record
+ AddressType: DWORD; (* E.164 or NSAP-style ATM Endsystem Address *)
+ NumofDigits: DWORD; (* number of digits; *)
+ Addr: array [0..ATM_ADDR_SIZE - 1] of UCHAR; (* IA5 digits for E164, BCD encoding for NSAP *)
+ (* format as defined in the ATM Forum UNI 3.1 *)
+ end;
+ {$EXTERNALSYM ATM_ADDRESS}
+ TAtmAddress = ATM_ADDRESS;
+ PAtmAddress = ^ATM_ADDRESS;
+
+(*
+ * values used for Layer2Protocol in B-LLI
+ *)
+
+const
+ BLLI_L2_ISO_1745 = $01; (* Basic mode ISO 1745 *)
+ {$EXTERNALSYM BLLI_L2_ISO_1745}
+ BLLI_L2_Q921 = $02; (* CCITT Rec. Q.921 *)
+ {$EXTERNALSYM BLLI_L2_Q921}
+ BLLI_L2_X25L = $06; (* CCITT Rec. X.25, link layer *)
+ {$EXTERNALSYM BLLI_L2_X25L}
+ BLLI_L2_X25M = $07; (* CCITT Rec. X.25, multilink *)
+ {$EXTERNALSYM BLLI_L2_X25M}
+ BLLI_L2_ELAPB = $08; (* Extended LAPB; for half duplex operation *)
+ {$EXTERNALSYM BLLI_L2_ELAPB}
+ BLLI_L2_HDLC_ARM = $09; (* HDLC ARM (ISO 4335) *)
+ {$EXTERNALSYM BLLI_L2_HDLC_ARM}
+ BLLI_L2_HDLC_NRM = $0A; (* HDLC NRM (ISO 4335) *)
+ {$EXTERNALSYM BLLI_L2_HDLC_NRM}
+ BLLI_L2_HDLC_ABM = $0B; (* HDLC ABM (ISO 4335) *)
+ {$EXTERNALSYM BLLI_L2_HDLC_ABM}
+ BLLI_L2_LLC = $0C; (* LAN logical link control (ISO 8802/2) *)
+ {$EXTERNALSYM BLLI_L2_LLC}
+ BLLI_L2_X75 = $0D; (* CCITT Rec. X.75, single link procedure *)
+ {$EXTERNALSYM BLLI_L2_X75}
+ BLLI_L2_Q922 = $0E; (* CCITT Rec. Q.922 *)
+ {$EXTERNALSYM BLLI_L2_Q922}
+ BLLI_L2_USER_SPECIFIED = $10; (* User Specified *)
+ {$EXTERNALSYM BLLI_L2_USER_SPECIFIED}
+ BLLI_L2_ISO_7776 = $11; (* ISO 7776 DTE-DTE operation *)
+ {$EXTERNALSYM BLLI_L2_ISO_7776}
+
+(*
+ * values used for Layer3Protocol in B-LLI
+ *)
+
+ BLLI_L3_X25 = $06; (* CCITT Rec. X.25, packet layer *)
+ {$EXTERNALSYM BLLI_L3_X25}
+ BLLI_L3_ISO_8208 = $07; (* ISO/IEC 8208 (X.25 packet layer for DTE *)
+ {$EXTERNALSYM BLLI_L3_ISO_8208}
+ BLLI_L3_X223 = $08; (* X.223/ISO 8878 *)
+ {$EXTERNALSYM BLLI_L3_X223}
+ BLLI_L3_SIO_8473 = $09; (* ISO/IEC 8473 (OSI connectionless) *)
+ {$EXTERNALSYM BLLI_L3_SIO_8473}
+ BLLI_L3_T70 = $0A; (* CCITT Rec. T.70 min. network layer *)
+ {$EXTERNALSYM BLLI_L3_T70}
+ BLLI_L3_ISO_TR9577 = $0B; (* ISO/IEC TR 9577 Network Layer Protocol ID*)
+ {$EXTERNALSYM BLLI_L3_ISO_TR9577}
+ BLLI_L3_USER_SPECIFIED = $10; (* User Specified *)
+ {$EXTERNALSYM BLLI_L3_USER_SPECIFIED}
+
+(*
+ * values used for Layer3IPI in B-LLI
+ *)
+
+ BLLI_L3_IPI_SNAP = $80; (* IEEE 802.1 SNAP identifier *)
+ {$EXTERNALSYM BLLI_L3_IPI_SNAP}
+ BLLI_L3_IPI_IP = $CC; (* Internet Protocol (IP) identifier *)
+ {$EXTERNALSYM BLLI_L3_IPI_IP}
+
+type
+ ATM_BLLI = record
+ Layer2Protocol: DWORD; (* User information layer 2 protocol *)
+ Layer2UserSpecifiedProtocol: DWORD; (* User specified layer 2 protocol information *)
+ Layer3Protocol: DWORD; (* User information layer 3 protocol *)
+ Layer3UserSpecifiedProtocol: DWORD; (* User specified layer 3 protocol information *)
+ Layer3IPI: DWORD; (* ISO/IEC TR 9577 Initial Protocol Identifier *)
+ SnapID: array [0..4] of UCHAR; (* SNAP ID consisting of OUI and PID *)
+ end;
+ {$EXTERNALSYM ATM_BLLI}
+ TAtmBLLI = ATM_BLLI;
+ PAtmBLLI = ^ATM_BLLI;
+
+(*
+ * values used for the HighLayerInfoType field in ATM_BHLI
+ *)
+
+const
+ BHLI_ISO = $00; (* ISO *)
+ {$EXTERNALSYM BHLI_ISO}
+ BHLI_UserSpecific = $01; (* User Specific *)
+ {$EXTERNALSYM BHLI_UserSpecific}
+ BHLI_HighLayerProfile = $02; (* High layer profile (only in UNI3.0) *)
+ {$EXTERNALSYM BHLI_HighLayerProfile}
+ BHLI_VendorSpecificAppId = $03; (* Vendor-Specific Application ID *)
+ {$EXTERNALSYM BHLI_VendorSpecificAppId}
+
+type
+ ATM_BHLI = record
+ HighLayerInfoType: DWORD; (* High Layer Information Type *)
+ HighLayerInfoLength: DWORD; (* number of bytes in HighLayerInfo *)
+ HighLayerInfo: array [0..7] of UCHAR; (* the value dependent on the *)
+ (* HighLayerInfoType field *)
+ end;
+ {$EXTERNALSYM ATM_BHLI}
+ TAtmBHLI = ATM_BHLI;
+ PAtmBHLI = ^ATM_BHLI;
+
+ SOCKADDR_ATM = record
+ satm_family: u_short; (* address family should be AF_ATM *)
+ satm_number: ATM_ADDRESS; (* ATM address *)
+ satm_blli: ATM_BLLI; (* B-LLI *)
+ satm_bhli: ATM_BHLI; (* B-HLI *)
+ end;
+ {$EXTERNALSYM SOCKADDR_ATM}
+ PSOCKADDR_ATM = ^SOCKADDR_ATM;
+ LPSOCKADDR_ATM = ^SOCKADDR_ATM;
+ TSockAddrAtm = SOCKADDR_ATM;
+ PSockAddrAtm = LPSOCKADDR_ATM;
+
+ Q2931_IE_TYPE = (
+ IE_AALParameters,
+ IE_TrafficDescriptor,
+ IE_BroadbandBearerCapability,
+ IE_BHLI,
+ IE_BLLI,
+ IE_CalledPartyNumber,
+ IE_CalledPartySubaddress,
+ IE_CallingPartyNumber,
+ IE_CallingPartySubaddress,
+ IE_Cause,
+ IE_QOSClass,
+ IE_TransitNetworkSelection);
+ {$EXTERNALSYM Q2931_IE_TYPE}
+ TQ2931IEType = Q2931_IE_TYPE;
+ PQ2931IEType = ^Q2931_IE_TYPE;
+
+ Q2931_IE = record
+ IEType: Q2931_IE_TYPE;
+ IELength: ULONG;
+ IE: array [0..0] of UCHAR;
+ end;
+ {$EXTERNALSYM Q2931_IE}
+ TQ2931IE = Q2931_IE;
+ PQ2931IE = ^Q2931_IE;
+
+(*
+ * manifest constants for the AALType field in struct AAL_PARAMETERS_IE
+ *)
+
+const
+ AALTYPE_5 = 5; (* AAL 5 *)
+ {$EXTERNALSYM AALTYPE_5}
+ AALTYPE_USER = 16; (* user-defined AAL *)
+ {$EXTERNALSYM AALTYPE_USER}
+
+type
+ AAL_TYPE = DWORD;
+ {$EXTERNALSYM AAL_TYPE}
+ TAALType = AAL_TYPE;
+ PAALType = ^AAL_TYPE;
+
+(*
+ * values used for the Mode field in struct AAL5_PARAMETERS
+ *)
+
+const
+ AAL5_MODE_MESSAGE = $01;
+ {$EXTERNALSYM AAL5_MODE_MESSAGE}
+ AAL5_MODE_STREAMING = $02;
+ {$EXTERNALSYM AAL5_MODE_STREAMING}
+
+(*
+ * values used for the SSCSType field in struct AAL5_PARAMETERS
+ *)
+
+ AAL5_SSCS_NULL = $00;
+ {$EXTERNALSYM AAL5_SSCS_NULL}
+ AAL5_SSCS_SSCOP_ASSURED = $01;
+ {$EXTERNALSYM AAL5_SSCS_SSCOP_ASSURED}
+ AAL5_SSCS_SSCOP_NON_ASSURED = $02;
+ {$EXTERNALSYM AAL5_SSCS_SSCOP_NON_ASSURED}
+ AAL5_SSCS_FRAME_RELAY = $04;
+ {$EXTERNALSYM AAL5_SSCS_FRAME_RELAY}
+
+type
+ AAL5_PARAMETERS = record
+ ForwardMaxCPCSSDUSize: ULONG;
+ BackwardMaxCPCSSDUSize: ULONG;
+ Mode: UCHAR; (* only available in UNI 3.0 *)
+ SSCSType: UCHAR;
+ end;
+ {$EXTERNALSYM AAL5_PARAMETERS}
+ TAAL5Parameters = AAL5_PARAMETERS;
+ PAAL5Parameters = ^AAL5_PARAMETERS;
+
+ AALUSER_PARAMETERS = record
+ UserDefined: ULONG;
+ end;
+ {$EXTERNALSYM AALUSER_PARAMETERS}
+ TAALUserParameters = AALUSER_PARAMETERS;
+ PAALUserParameters = ^AALUSER_PARAMETERS;
+
+ AAL_PARAMETERS_IE = record
+ AALType: AAL_TYPE;
+ case Integer of
+ 0: (AAL5Parameters: AAL5_PARAMETERS);
+ 1: (AALUserParameters: AALUSER_PARAMETERS);
+ end;
+ {$EXTERNALSYM AAL_PARAMETERS_IE}
+ TAALParametersIE = AAL_PARAMETERS_IE;
+ PAALParametersIE = ^AAL_PARAMETERS_IE;
+
+ ATM_TD = record
+ PeakCellRate_CLP0: ULONG;
+ PeakCellRate_CLP01: ULONG;
+ SustainableCellRate_CLP0: ULONG;
+ SustainableCellRate_CLP01: ULONG;
+ MaxBurstSize_CLP0: ULONG;
+ MaxBurstSize_CLP01: ULONG;
+ Tagging: BOOL;
+ end;
+ {$EXTERNALSYM ATM_TD}
+ TAtmTD = ATM_TD;
+ PAtmTD = ^ATM_TD;
+
+ ATM_TRAFFIC_DESCRIPTOR_IE = record
+ Forward_: ATM_TD;
+ Backward: ATM_TD;
+ BestEffort: BOOL;
+ end;
+ {$EXTERNALSYM ATM_TRAFFIC_DESCRIPTOR_IE}
+ TAtmTrafficDescriptorIE = ATM_TD;
+ PAtmTrafficDescriptorIE = ^ATM_TD;
+
+(*
+ * values used for the BearerClass field in struct ATM_BROADBAND_BEARER_CAPABILITY_IE
+ *)
+
+const
+ BCOB_A = $01; (* Bearer class A *)
+ {$EXTERNALSYM BCOB_A}
+ BCOB_C = $03; (* Bearer class C *)
+ {$EXTERNALSYM BCOB_C}
+ BCOB_X = $10; (* Bearer class X *)
+ {$EXTERNALSYM BCOB_X}
+
+(*
+ * values used for the TrafficType field in struct ATM_BROADBAND_BEARER_CAPABILITY_IE
+ *)
+
+ TT_NOIND = $00; (* No indication of traffic type *)
+ {$EXTERNALSYM TT_NOIND}
+ TT_CBR = $04; (* Constant bit rate *)
+ {$EXTERNALSYM TT_CBR}
+ TT_VBR = $08; (* Variable bit rate *)
+ {$EXTERNALSYM TT_VBR}
+
+(*
+ * values used for the TimingRequirements field in struct ATM_BROADBAND_BEARER_CAPABILITY_IE
+ *)
+
+ TR_NOIND = $00; (* No timing requirement indication *)
+ {$EXTERNALSYM TR_NOIND}
+ TR_END_TO_END = $01; (* End-to-end timing required *)
+ {$EXTERNALSYM TR_END_TO_END}
+ TR_NO_END_TO_END = $02; (* End-to-end timing not required *)
+ {$EXTERNALSYM TR_NO_END_TO_END}
+
+(*
+ * values used for the ClippingSusceptability field in struct ATM_BROADBAND_BEARER_CAPABILITY_IE
+ *)
+
+ CLIP_NOT = $00; (* Not susceptible to clipping *)
+ {$EXTERNALSYM CLIP_NOT}
+ CLIP_SUS = $20; (* Susceptible to clipping *)
+ {$EXTERNALSYM CLIP_SUS}
+
+(*
+ * values used for the UserPlaneConnectionConfig field in
+ * struct ATM_BROADBAND_BEARER_CAPABILITY_IE
+ *)
+
+ UP_P2P = $00; (* Point-to-point connection *)
+ {$EXTERNALSYM UP_P2P}
+ UP_P2MP = $01; (* Point-to-multipoint connection *)
+ {$EXTERNALSYM UP_P2MP}
+
+type
+ ATM_BROADBAND_BEARER_CAPABILITY_IE = record
+ BearerClass: UCHAR;
+ TrafficType: UCHAR;
+ TimingRequirements: UCHAR;
+ ClippingSusceptability: UCHAR;
+ UserPlaneConnectionConfig: UCHAR;
+ end;
+ {$EXTERNALSYM ATM_BROADBAND_BEARER_CAPABILITY_IE}
+ TAtmBroadbandBearerCapabilityIE = ATM_BROADBAND_BEARER_CAPABILITY_IE;
+ PAtmBroadbandBearerCapabilityIE = ^ATM_BROADBAND_BEARER_CAPABILITY_IE;
+
+ ATM_BHLI_IE = ATM_BHLI;
+ {$EXTERNALSYM ATM_BHLI_IE}
+ TAtmBHLIIE = ATM_BHLI_IE;
+ PAtmBHLIIE = ^ATM_BHLI_IE;
+
+(*
+ * values used for the Layer2Mode field in struct ATM_BLLI_IE
+ *)
+
+const
+ BLLI_L2_MODE_NORMAL = $40;
+ {$EXTERNALSYM BLLI_L2_MODE_NORMAL}
+ BLLI_L2_MODE_EXT = $80;
+ {$EXTERNALSYM BLLI_L2_MODE_EXT}
+
+(*
+ * values used for the Layer3Mode field in struct ATM_BLLI_IE
+ *)
+
+ BLLI_L3_MODE_NORMAL = $40;
+ {$EXTERNALSYM BLLI_L3_MODE_NORMAL}
+ BLLI_L3_MODE_EXT = $80;
+ {$EXTERNALSYM BLLI_L3_MODE_EXT}
+
+(*
+ * values used for the Layer3DefaultPacketSize field in struct ATM_BLLI_IE
+ *)
+
+ BLLI_L3_PACKET_16 = $04;
+ {$EXTERNALSYM BLLI_L3_PACKET_16}
+ BLLI_L3_PACKET_32 = $05;
+ {$EXTERNALSYM BLLI_L3_PACKET_32}
+ BLLI_L3_PACKET_64 = $06;
+ {$EXTERNALSYM BLLI_L3_PACKET_64}
+ BLLI_L3_PACKET_128 = $07;
+ {$EXTERNALSYM BLLI_L3_PACKET_128}
+ BLLI_L3_PACKET_256 = $08;
+ {$EXTERNALSYM BLLI_L3_PACKET_256}
+ BLLI_L3_PACKET_512 = $09;
+ {$EXTERNALSYM BLLI_L3_PACKET_512}
+ BLLI_L3_PACKET_1024 = $0A;
+ {$EXTERNALSYM BLLI_L3_PACKET_1024}
+ BLLI_L3_PACKET_2048 = $0B;
+ {$EXTERNALSYM BLLI_L3_PACKET_2048}
+ BLLI_L3_PACKET_4096 = $0C;
+ {$EXTERNALSYM BLLI_L3_PACKET_4096}
+
+type
+ ATM_BLLI_IE = record
+ Layer2Protocol: DWORD; (* User information layer 2 protocol *)
+ Layer2Mode: UCHAR;
+ Layer2WindowSize: UCHAR;
+ Layer2UserSpecifiedProtocol: DWORD; (* User specified layer 2 protocol information *)
+ Layer3Protocol: DWORD; (* User information layer 3 protocol *)
+ Layer3Mode: UCHAR;
+ Layer3DefaultPacketSize: UCHAR;
+ Layer3PacketWindowSize: UCHAR;
+ Layer3UserSpecifiedProtocol: DWORD; (* User specified layer 3 protocol information *)
+ Layer3IPI: DWORD; (* ISO/IEC TR 9577 Initial Protocol Identifier *)
+ SnapID: array [0..4] of UCHAR; (* SNAP ID consisting of OUI and PID *)
+ end;
+ {$EXTERNALSYM ATM_BLLI_IE}
+ TAtmBLLIIE = ATM_BLLI_IE;
+ PAtmBLLIIE = ^ATM_BLLI_IE;
+
+ ATM_CALLED_PARTY_NUMBER_IE = ATM_ADDRESS;
+ {$EXTERNALSYM ATM_CALLED_PARTY_NUMBER_IE}
+ TAtmCalledPartyNumberIE = ATM_CALLED_PARTY_NUMBER_IE;
+ PAtmCalledPartyNumberIE = ^ATM_CALLED_PARTY_NUMBER_IE;
+ ATM_CALLED_PARTY_SUBADDRESS_IE = ATM_ADDRESS;
+ {$EXTERNALSYM ATM_CALLED_PARTY_SUBADDRESS_IE}
+ TAtmCalledPartySubAddressIE = ATM_CALLED_PARTY_SUBADDRESS_IE;
+ PAtmCalledPartySubAddressIE = ^ATM_CALLED_PARTY_SUBADDRESS_IE;
+
+(*
+ * values used for the Presentation_Indication field in
+ * struct ATM_CALLING_PARTY_NUMBER_IE
+ *)
+
+const
+ PI_ALLOWED = $00;
+ {$EXTERNALSYM PI_ALLOWED}
+ PI_RESTRICTED = $40;
+ {$EXTERNALSYM PI_RESTRICTED}
+ PI_NUMBER_NOT_AVAILABLE = $80;
+ {$EXTERNALSYM PI_NUMBER_NOT_AVAILABLE}
+
+(*
+ * values used for the Screening_Indicator field in
+ * struct ATM_CALLING_PARTY_NUMBER_IE
+ *)
+
+ SI_USER_NOT_SCREENED = $00;
+ {$EXTERNALSYM SI_USER_NOT_SCREENED}
+ SI_USER_PASSED = $01;
+ {$EXTERNALSYM SI_USER_PASSED}
+ SI_USER_FAILED = $02;
+ {$EXTERNALSYM SI_USER_FAILED}
+ SI_NETWORK = $03;
+ {$EXTERNALSYM SI_NETWORK}
+
+type
+ ATM_CALLING_PARTY_NUMBER_IE = record
+ ATM_Number: ATM_ADDRESS;
+ Presentation_Indication: UCHAR;
+ Screening_Indicator: UCHAR;
+ end;
+ {$EXTERNALSYM ATM_CALLING_PARTY_NUMBER_IE}
+ TAtmCallingPartyNumberIE = ATM_CALLING_PARTY_NUMBER_IE;
+ PAtmCallingPartyNumberIE = ^ATM_CALLING_PARTY_NUMBER_IE;
+
+ ATM_CALLING_PARTY_SUBADDRESS_IE = ATM_ADDRESS;
+ {$EXTERNALSYM ATM_CALLING_PARTY_SUBADDRESS_IE}
+ TAtmCallingPartySubAddressIE = ATM_CALLING_PARTY_SUBADDRESS_IE;
+ PAtmCallingPartySubAddressIE = ^ATM_CALLING_PARTY_SUBADDRESS_IE;
+
+(*
+ * values used for the Location field in struct ATM_CAUSE_IE
+ *)
+
+const
+ CAUSE_LOC_USER = $00;
+ {$EXTERNALSYM CAUSE_LOC_USER}
+ CAUSE_LOC_PRIVATE_LOCAL = $01;
+ {$EXTERNALSYM CAUSE_LOC_PRIVATE_LOCAL}
+ CAUSE_LOC_PUBLIC_LOCAL = $02;
+ {$EXTERNALSYM CAUSE_LOC_PUBLIC_LOCAL}
+ CAUSE_LOC_TRANSIT_NETWORK = $03;
+ {$EXTERNALSYM CAUSE_LOC_TRANSIT_NETWORK}
+ CAUSE_LOC_PUBLIC_REMOTE = $04;
+ {$EXTERNALSYM CAUSE_LOC_PUBLIC_REMOTE}
+ CAUSE_LOC_PRIVATE_REMOTE = $05;
+ {$EXTERNALSYM CAUSE_LOC_PRIVATE_REMOTE}
+ CAUSE_LOC_INTERNATIONAL_NETWORK = $07;
+ {$EXTERNALSYM CAUSE_LOC_INTERNATIONAL_NETWORK}
+ CAUSE_LOC_BEYOND_INTERWORKING = $0A;
+ {$EXTERNALSYM CAUSE_LOC_BEYOND_INTERWORKING}
+
+(*
+ * values used for the Cause field in struct ATM_CAUSE_IE
+ *)
+
+ CAUSE_UNALLOCATED_NUMBER = $01;
+ {$EXTERNALSYM CAUSE_UNALLOCATED_NUMBER}
+ CAUSE_NO_ROUTE_TO_TRANSIT_NETWORK = $02;
+ {$EXTERNALSYM CAUSE_NO_ROUTE_TO_TRANSIT_NETWORK}
+ CAUSE_NO_ROUTE_TO_DESTINATION = $03;
+ {$EXTERNALSYM CAUSE_NO_ROUTE_TO_DESTINATION}
+ CAUSE_VPI_VCI_UNACCEPTABLE = $0A;
+ {$EXTERNALSYM CAUSE_VPI_VCI_UNACCEPTABLE}
+ CAUSE_NORMAL_CALL_CLEARING = $10;
+ {$EXTERNALSYM CAUSE_NORMAL_CALL_CLEARING}
+ CAUSE_USER_BUSY = $11;
+ {$EXTERNALSYM CAUSE_USER_BUSY}
+ CAUSE_NO_USER_RESPONDING = $12;
+ {$EXTERNALSYM CAUSE_NO_USER_RESPONDING}
+ CAUSE_CALL_REJECTED = $15;
+ {$EXTERNALSYM CAUSE_CALL_REJECTED}
+ CAUSE_NUMBER_CHANGED = $16;
+ {$EXTERNALSYM CAUSE_NUMBER_CHANGED}
+ CAUSE_USER_REJECTS_CLIR = $17;
+ {$EXTERNALSYM CAUSE_USER_REJECTS_CLIR}
+ CAUSE_DESTINATION_OUT_OF_ORDER = $1B;
+ {$EXTERNALSYM CAUSE_DESTINATION_OUT_OF_ORDER}
+ CAUSE_INVALID_NUMBER_FORMAT = $1C;
+ {$EXTERNALSYM CAUSE_INVALID_NUMBER_FORMAT}
+ CAUSE_STATUS_ENQUIRY_RESPONSE = $1E;
+ {$EXTERNALSYM CAUSE_STATUS_ENQUIRY_RESPONSE}
+ CAUSE_NORMAL_UNSPECIFIED = $1F;
+ {$EXTERNALSYM CAUSE_NORMAL_UNSPECIFIED}
+ CAUSE_VPI_VCI_UNAVAILABLE = $23;
+ {$EXTERNALSYM CAUSE_VPI_VCI_UNAVAILABLE}
+ CAUSE_NETWORK_OUT_OF_ORDER = $26;
+ {$EXTERNALSYM CAUSE_NETWORK_OUT_OF_ORDER}
+ CAUSE_TEMPORARY_FAILURE = $29;
+ {$EXTERNALSYM CAUSE_TEMPORARY_FAILURE}
+ CAUSE_ACCESS_INFORMAION_DISCARDED = $2B;
+ {$EXTERNALSYM CAUSE_ACCESS_INFORMAION_DISCARDED}
+ CAUSE_NO_VPI_VCI_AVAILABLE = $2D;
+ {$EXTERNALSYM CAUSE_NO_VPI_VCI_AVAILABLE}
+ CAUSE_RESOURCE_UNAVAILABLE = $2F;
+ {$EXTERNALSYM CAUSE_RESOURCE_UNAVAILABLE}
+ CAUSE_QOS_UNAVAILABLE = $31;
+ {$EXTERNALSYM CAUSE_QOS_UNAVAILABLE}
+ CAUSE_USER_CELL_RATE_UNAVAILABLE = $33;
+ {$EXTERNALSYM CAUSE_USER_CELL_RATE_UNAVAILABLE}
+ CAUSE_BEARER_CAPABILITY_UNAUTHORIZED = $39;
+ {$EXTERNALSYM CAUSE_BEARER_CAPABILITY_UNAUTHORIZED}
+ CAUSE_BEARER_CAPABILITY_UNAVAILABLE = $3A;
+ {$EXTERNALSYM CAUSE_BEARER_CAPABILITY_UNAVAILABLE}
+ CAUSE_OPTION_UNAVAILABLE = $3F;
+ {$EXTERNALSYM CAUSE_OPTION_UNAVAILABLE}
+ CAUSE_BEARER_CAPABILITY_UNIMPLEMENTED = $41;
+ {$EXTERNALSYM CAUSE_BEARER_CAPABILITY_UNIMPLEMENTED}
+ CAUSE_UNSUPPORTED_TRAFFIC_PARAMETERS = $49;
+ {$EXTERNALSYM CAUSE_UNSUPPORTED_TRAFFIC_PARAMETERS}
+ CAUSE_INVALID_CALL_REFERENCE = $51;
+ {$EXTERNALSYM CAUSE_INVALID_CALL_REFERENCE}
+ CAUSE_CHANNEL_NONEXISTENT = $52;
+ {$EXTERNALSYM CAUSE_CHANNEL_NONEXISTENT}
+ CAUSE_INCOMPATIBLE_DESTINATION = $58;
+ {$EXTERNALSYM CAUSE_INCOMPATIBLE_DESTINATION}
+ CAUSE_INVALID_ENDPOINT_REFERENCE = $59;
+ {$EXTERNALSYM CAUSE_INVALID_ENDPOINT_REFERENCE}
+ CAUSE_INVALID_TRANSIT_NETWORK_SELECTION = $5B;
+ {$EXTERNALSYM CAUSE_INVALID_TRANSIT_NETWORK_SELECTION}
+ CAUSE_TOO_MANY_PENDING_ADD_PARTY = $5C;
+ {$EXTERNALSYM CAUSE_TOO_MANY_PENDING_ADD_PARTY}
+ CAUSE_AAL_PARAMETERS_UNSUPPORTED = $5D;
+ {$EXTERNALSYM CAUSE_AAL_PARAMETERS_UNSUPPORTED}
+ CAUSE_MANDATORY_IE_MISSING = $60;
+ {$EXTERNALSYM CAUSE_MANDATORY_IE_MISSING}
+ CAUSE_UNIMPLEMENTED_MESSAGE_TYPE = $61;
+ {$EXTERNALSYM CAUSE_UNIMPLEMENTED_MESSAGE_TYPE}
+ CAUSE_UNIMPLEMENTED_IE = $63;
+ {$EXTERNALSYM CAUSE_UNIMPLEMENTED_IE}
+ CAUSE_INVALID_IE_CONTENTS = $64;
+ {$EXTERNALSYM CAUSE_INVALID_IE_CONTENTS}
+ CAUSE_INVALID_STATE_FOR_MESSAGE = $65;
+ {$EXTERNALSYM CAUSE_INVALID_STATE_FOR_MESSAGE}
+ CAUSE_RECOVERY_ON_TIMEOUT = $66;
+ {$EXTERNALSYM CAUSE_RECOVERY_ON_TIMEOUT}
+ CAUSE_INCORRECT_MESSAGE_LENGTH = $68;
+ {$EXTERNALSYM CAUSE_INCORRECT_MESSAGE_LENGTH}
+ CAUSE_PROTOCOL_ERROR = $6F;
+ {$EXTERNALSYM CAUSE_PROTOCOL_ERROR}
+
+(*
+ * values used for the Condition portion of the Diagnostics field
+ * in struct ATM_CAUSE_IE, for certain Cause values
+ *)
+
+ CAUSE_COND_UNKNOWN = $00;
+ {$EXTERNALSYM CAUSE_COND_UNKNOWN}
+ CAUSE_COND_PERMANENT = $01;
+ {$EXTERNALSYM CAUSE_COND_PERMANENT}
+ CAUSE_COND_TRANSIENT = $02;
+ {$EXTERNALSYM CAUSE_COND_TRANSIENT}
+
+(*
+ * values used for the Rejection Reason portion of the Diagnostics field
+ * in struct ATM_CAUSE_IE, for certain Cause values
+ *)
+
+ CAUSE_REASON_USER = $00;
+ {$EXTERNALSYM CAUSE_REASON_USER}
+ CAUSE_REASON_IE_MISSING = $04;
+ {$EXTERNALSYM CAUSE_REASON_IE_MISSING}
+ CAUSE_REASON_IE_INSUFFICIENT = $08;
+ {$EXTERNALSYM CAUSE_REASON_IE_INSUFFICIENT}
+
+(*
+ * values used for the P-U flag of the Diagnostics field
+ * in struct ATM_CAUSE_IE, for certain Cause values
+ *)
+
+ CAUSE_PU_PROVIDER = $00;
+ {$EXTERNALSYM CAUSE_PU_PROVIDER}
+ CAUSE_PU_USER = $08;
+ {$EXTERNALSYM CAUSE_PU_USER}
+
+(*
+ * values used for the N-A flag of the Diagnostics field
+ * in struct ATM_CAUSE_IE, for certain Cause values
+ *)
+
+ CAUSE_NA_NORMAL = $00;
+ {$EXTERNALSYM CAUSE_NA_NORMAL}
+ CAUSE_NA_ABNORMAL = $04;
+ {$EXTERNALSYM CAUSE_NA_ABNORMAL}
+
+type
+ ATM_CAUSE_IE = record
+ Location: UCHAR;
+ Cause: UCHAR;
+ DiagnosticsLength: UCHAR;
+ Diagnostics: array [0..3] of UCHAR;
+ end;
+ {$EXTERNALSYM ATM_CAUSE_IE}
+ TAtmCauseIE = ATM_CAUSE_IE;
+ PAtmCauseIE = ^ATM_CAUSE_IE;
+
+(*
+ * values used for the QOSClassForward and QOSClassBackward
+ * field in struct ATM_QOS_CLASS_IE
+ *)
+
+const
+ QOS_CLASS0 = $00;
+ {$EXTERNALSYM QOS_CLASS0}
+ QOS_CLASS1 = $01;
+ {$EXTERNALSYM QOS_CLASS1}
+ QOS_CLASS2 = $02;
+ {$EXTERNALSYM QOS_CLASS2}
+ QOS_CLASS3 = $03;
+ {$EXTERNALSYM QOS_CLASS3}
+ QOS_CLASS4 = $04;
+ {$EXTERNALSYM QOS_CLASS4}
+
+type
+ ATM_QOS_CLASS_IE = record
+ QOSClassForward: UCHAR;
+ QOSClassBackward: UCHAR;
+ end;
+ {$EXTERNALSYM ATM_QOS_CLASS_IE}
+ TAtmQosClassIE = ATM_QOS_CLASS_IE;
+ PAtmQosClassIE = ^ATM_QOS_CLASS_IE;
+
+(*
+ * values used for the TypeOfNetworkId field in struct ATM_TRANSIT_NETWORK_SELECTION_IE
+ *)
+
+const
+ TNS_TYPE_NATIONAL = $40;
+ {$EXTERNALSYM TNS_TYPE_NATIONAL}
+
+(*
+ * values used for the NetworkIdPlan field in struct ATM_TRANSIT_NETWORK_SELECTION_IE
+ *)
+
+ TNS_PLAN_CARRIER_ID_CODE = $01;
+ {$EXTERNALSYM TNS_PLAN_CARRIER_ID_CODE}
+
+type
+ ATM_TRANSIT_NETWORK_SELECTION_IE = record
+ TypeOfNetworkId: UCHAR;
+ NetworkIdPlan: UCHAR;
+ NetworkIdLength: UCHAR;
+ NetworkId: array [0..0] of UCHAR;
+ end;
+ {$EXTERNALSYM ATM_TRANSIT_NETWORK_SELECTION_IE}
+ TAtmTransitNetworkSelectionIE = ATM_TRANSIT_NETWORK_SELECTION_IE;
+ PAtmTransitNetworkSelectionIE = ^ATM_TRANSIT_NETWORK_SELECTION_IE;
+
+(*
+ * ATM specific Ioctl codes
+ *)
+
+const
+ SIO_GET_NUMBER_OF_ATM_DEVICES = $50160001;
+ {$EXTERNALSYM SIO_GET_NUMBER_OF_ATM_DEVICES}
+ SIO_GET_ATM_ADDRESS = DWORD($d0160002);
+ {$EXTERNALSYM SIO_GET_ATM_ADDRESS}
+ SIO_ASSOCIATE_PVC = DWORD($90160003);
+ {$EXTERNALSYM SIO_ASSOCIATE_PVC}
+ SIO_GET_ATM_CONNECTION_ID = $50160004;
+ {$EXTERNALSYM SIO_GET_ATM_CONNECTION_ID}
+
+(* ATM Connection Identifier *)
+
+type
+ ATM_CONNECTION_ID = record
+ DeviceNumber: DWORD;
+ VPI: DWORD;
+ VCI: DWORD;
+ end;
+ {$EXTERNALSYM ATM_CONNECTION_ID}
+ TAtmConnectionID = ATM_CONNECTION_ID;
+ PAtmConnectionID = ^ATM_CONNECTION_ID;
+
+(*
+ * Input buffer format for SIO_ASSOCIATE_PVC
+ *)
+
+ ATM_PVC_PARAMS = record
+ PvcConnectionId: ATM_CONNECTION_ID;
+ PvcQos: QOS;
+ end;
+ {$EXTERNALSYM ATM_PVC_PARAMS}
+ TAtmPvcParams = ATM_PVC_PARAMS;
+ PAtmPvcParams = ^ATM_PVC_PARAMS;
+
+implementation
+
+end.
diff --git a/packages/extra/winunits/jwaws2bth.pas b/packages/extra/winunits/jwaws2bth.pas
index d5d24f89f1..0323bd1f6d 100644
--- a/packages/extra/winunits/jwaws2bth.pas
+++ b/packages/extra/winunits/jwaws2bth.pas
@@ -1,605 +1,605 @@
-{******************************************************************************}
-{ }
-{ BlueTooth API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Contributors: John Penman }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwaws2bth.pas,v 1.1 2005/04/04 07:56:11 marco Exp $
-
-unit JwaWs2Bth;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "ws2bth.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaWinType, JwaBthSdpDef, JwaBlueToothApis, JwaBthDef;
-
-const
- BT_PORT_ANY = -1;
- {$EXTERNALSYM BT_PORT_ANY}
- BT_PORT_MIN = $1;
- {$EXTERNALSYM BT_PORT_MIN}
- BT_PORT_MAX = $ffff;
- {$EXTERNALSYM BT_PORT_MAX}
- BT_PORT_DYN_FIRST = $1001;
- {$EXTERNALSYM BT_PORT_DYN_FIRST}
-
-//
-// These three definitions are duplicated in winsock2.h to reserve ordinals
-//
-
-const
- AF_BTH = 32;
- {$EXTERNALSYM AF_BTH}
- PF_BTH = AF_BTH;
- {$EXTERNALSYM PF_BTH}
- NS_BTH = 16;
- {$EXTERNALSYM NS_BTH}
-
-type
- _SOCKADDR_BTH = record
- addressFamily: Word; // Always AF_BTH
- btAddr: BTH_ADDR; // Bluetooth device address
- serviceClassId: TGUID; // [OPTIONAL] system will query SDP for port
- port: ULONG; // RFCOMM channel or L2CAP PSM
- end;
- {$EXTERNALSYM _SOCKADDR_BTH}
- SOCKADDR_BTH = _SOCKADDR_BTH;
- {$EXTERNALSYM SOCKADDR_BTH}
- PSOCKADDR_BTH = ^_SOCKADDR_BTH;
- {$EXTERNALSYM PSOCKADDR_BTH}
- TSockAddrBth = SOCKADDR_BTH;
- PSockAddrBth = PSOCKADDR_BTH;
-
-const
- SVCID_BTH_PROVIDER: TGUID = '{06AA63E0-7D60-41FF-AFB2-3EE6D2D9392D}';
- {$EXTERNALSYM SVCID_BTH_PROVIDER}
- BTH_ADDR_STRING_SIZE = 12; // max size from WSAAddressToString
- {$EXTERNALSYM BTH_ADDR_STRING_SIZE}
-
-//
-// Bluetooth protocol #s are assigned according to the Bluetooth
-// Assigned Numbers portion of the Bluetooth Specification
-//
-
-const
- BTHPROTO_RFCOMM = $0003;
- {$EXTERNALSYM BTHPROTO_RFCOMM}
- BTHPROTO_L2CAP = $0100;
- {$EXTERNALSYM BTHPROTO_L2CAP}
-
- SOL_RFCOMM = BTHPROTO_RFCOMM;
- {$EXTERNALSYM SOL_RFCOMM}
- SOL_L2CAP = BTHPROTO_L2CAP;
- {$EXTERNALSYM SOL_L2CAP}
- SOL_SDP = $0101;
- {$EXTERNALSYM SOL_SDP}
-
-//
-// SOCKET OPTIONS
-//
-
- SO_BTH_AUTHENTICATE = $80000001; // optlen=sizeof(ULONG), optval = &(ULONG)TRUE/FALSE
- {$EXTERNALSYM SO_BTH_AUTHENTICATE}
- SO_BTH_ENCRYPT = $00000002; // optlen=sizeof(ULONG), optval = &(ULONG)TRUE/FALSE
- {$EXTERNALSYM SO_BTH_ENCRYPT}
- SO_BTH_MTU = $80000007; // optlen=sizeof(ULONG), optval = &mtu
- {$EXTERNALSYM SO_BTH_MTU}
- SO_BTH_MTU_MAX = $80000008; // optlen=sizeof(ULONG), optval = &max. mtu
- {$EXTERNALSYM SO_BTH_MTU_MAX}
- SO_BTH_MTU_MIN = $8000000a; // optlen=sizeof(ULONG), optval = &min. mtu
- {$EXTERNALSYM SO_BTH_MTU_MIN}
-
-//
-// Socket option parameters
-//
-
- RFCOMM_MAX_MTU = $0000029a; // L2CAP MTU (672) - RFCOMM header size (6)
- {$EXTERNALSYM RFCOMM_MAX_MTU}
- RFCOMM_MIN_MTU = $00000017; // RFCOMM spec sec 5.3 table 5.1
- {$EXTERNALSYM RFCOMM_MIN_MTU}
-
-//
-// NAME SERVICE PROVIDER DEFINITIONS
-// For calling WSASetService
-// and WSALookupServiceBegin, WSALookupServiceNext, WSALookupServiceEnd
-// with Bluetooth-specific extensions
-//
-
- BTH_SDP_VERSION = 1;
- {$EXTERNALSYM BTH_SDP_VERSION}
-
-//
-// [OPTIONAL] passed in BLOB member of WSAQUERYSET
-// QUERYSET and its lpBlob member are copied & converted
-// to unicode in the system for non-unicode applications.
-// However, nothing is copied back upon return. In
-// order for the system to return data such as pRecordHandle,
-// it much have an extra level of indirection from lpBlob
-//
-
-type
- _BTH_SET_SERVICE = record
-
- //
- // This version number will change when/if the binary format of
- // SDP records change, affecting the format of pRecord.
- // Set to BTH_SDP_VERSION by client, and returned by system
- //
- pSdpVersion: PULONG;
-
- //
- // Handle to SDP record. When BTH_SET_SERVICE structure is later
- // passed to WSASetService RNRSERVICE_DELETE, this handle identifies the
- // record to delete.
- //
- pRecordHandle: PHandle;
-
- //
- // COD_SERVICE_* bit(s) associated with this SDP record, which will be
- // advertised when the local radio is found during device inquiry.
- // When the last SDP record associated with a bit is deleted, that
- // service bit is no longer reported in repsonse to inquiries
- //
- fCodService: ULONG; // COD_SERVICE_* bits
-
- Reserved: array [0..4] of ULONG; // Reserved by system. Must be zero.
- ulRecordLength: ULONG; // length of pRecord which follows
- pRecord: array [0..0] of ULONG; // SDP record as defined by bluetooth spec
- end;
- {$EXTERNALSYM _BTH_SET_SERVICE}
- BTH_SET_SERVICE = _BTH_SET_SERVICE;
- {$EXTERNALSYM BTH_SET_SERVICE}
- PBTH_SET_SERVICE = ^_BTH_SET_SERVICE;
- {$EXTERNALSYM PBTH_SET_SERVICE}
- TBthSetService = BTH_SET_SERVICE;
- PBthSetService = PBTH_SET_SERVICE;
-
-//
-// Default device inquiry duration in seconds
-//
-// The application thread will be blocked in WSALookupServiceBegin
-// for the duration of the device inquiry, so this value needs to
-// be balanced against the chance that a device that is actually
-// present might not being found by Bluetooth in this time
-//
-// Paging improvements post-1.1 will cause devices to be
-// found generally uniformly in the 0-6 sec timeperiod
-//
-
-const
- SDP_DEFAULT_INQUIRY_SECONDS = 6;
- {$EXTERNALSYM SDP_DEFAULT_INQUIRY_SECONDS}
- SDP_MAX_INQUIRY_SECONDS = 60;
- {$EXTERNALSYM SDP_MAX_INQUIRY_SECONDS}
-
-//
-// Default maximum number of devices to search for
-//
-
- SDP_DEFAULT_INQUIRY_MAX_RESPONSES = 255;
- {$EXTERNALSYM SDP_DEFAULT_INQUIRY_MAX_RESPONSES}
-
- SDP_SERVICE_SEARCH_REQUEST = 1;
- {$EXTERNALSYM SDP_SERVICE_SEARCH_REQUEST}
- SDP_SERVICE_ATTRIBUTE_REQUEST = 2;
- {$EXTERNALSYM SDP_SERVICE_ATTRIBUTE_REQUEST}
- SDP_SERVICE_SEARCH_ATTRIBUTE_REQUEST = 3;
- {$EXTERNALSYM SDP_SERVICE_SEARCH_ATTRIBUTE_REQUEST}
-
-//
-// [OPTIONAL] input restrictions on device inquiry
-// Passed in BLOB of LUP_CONTAINERS (device) search
-//
-
-type
- _BTH_QUERY_DEVICE = record
- LAP: ULONG;
- length: UCHAR;
- end;
- {$EXTERNALSYM _BTH_QUERY_DEVICE}
- BTH_QUERY_DEVICE = _BTH_QUERY_DEVICE;
- {$EXTERNALSYM BTH_QUERY_DEVICE}
- PBTH_QUERY_DEVICE = ^_BTH_QUERY_DEVICE;
- {$EXTERNALSYM PBTH_QUERY_DEVICE}
- TBthQueryDevice = BTH_QUERY_DEVICE;
- PBthQueryDevice = PBTH_QUERY_DEVICE;
-
-//
-// [OPTIONAL] Restrictions on searching for a particular service
-// Passed in BLOB of !LUP_CONTAINERS (service) search
-//
-
- _BTH_QUERY_SERVICE = record
- _type: ULONG;
- serviceHandle: ULONG;
- uuids: array[0..MAX_UUIDS_IN_QUERY - 1] of SdpQueryUuid;
- numRange: ULONG;
- pRange: array[0..0] of SdpAttributeRange;
- end;
- {$EXTERNALSYM _BTH_QUERY_SERVICE}
- BTH_QUERY_SERVICE = _BTH_QUERY_SERVICE;
- {$EXTERNALSYM BTH_QUERY_SERVICE}
- PBTH_QUERY_SERVICE = ^_BTH_QUERY_SERVICE;
- {$EXTERNALSYM PBTH_QUERY_SERVICE}
- TBthQueryService = BTH_QUERY_SERVICE;
- PBthQueryService = PBTH_QUERY_SERVICE;
-
-//
-// BTHNS_RESULT_*
-//
-// Bluetooth specific flags returned from WSALookupServiceNext
-// in WSAQUERYSET.dwOutputFlags in response to device inquiry
-//
-
-//
-// Local device is paired with remote device
-//
-
-const
- BTHNS_RESULT_DEVICE_CONNECTED = $00010000;
- {$EXTERNALSYM BTHNS_RESULT_DEVICE_CONNECTED}
- BTHNS_RESULT_DEVICE_REMEMBERED = $00020000;
- {$EXTERNALSYM BTHNS_RESULT_DEVICE_REMEMBERED}
- BTHNS_RESULT_DEVICE_AUTHENTICATED = $00040000;
- {$EXTERNALSYM BTHNS_RESULT_DEVICE_AUTHENTICATED}
-
-//
-// SOCKET IOCTLs
-//
-
- IOC_OUT = $40000000; // copy out parameters
- {$EXTERNALSYM IOC_OUT}
- IOC_IN = DWORD($80000000); // copy in parameters
- {$EXTERNALSYM IOC_IN}
- IOC_INOUT = DWORD(IOC_IN or IOC_OUT);
- {$EXTERNALSYM IOC_INOUT}
- IOC_VENDOR = $18000000;
- {$EXTERNALSYM IOC_VENDOR}
-
-const
- SIO_RFCOMM_SEND_COMMAND = IOC_INOUT or IOC_VENDOR or 101;
- {$EXTERNALSYM SIO_RFCOMM_SEND_COMMAND}
- SIO_RFCOMM_WAIT_COMMAND = IOC_INOUT or IOC_VENDOR or 102;
- {$EXTERNALSYM SIO_RFCOMM_WAIT_COMMAND}
-
-//
-// These IOCTLs are for test/validation/conformance and may only be
-// present in debug/checked builds of the system
-//
-
- SIO_BTH_PING = IOC_INOUT or IOC_VENDOR or 8;
- {$EXTERNALSYM SIO_BTH_PING}
- SIO_BTH_INFO = IOC_INOUT or IOC_VENDOR or 9;
- {$EXTERNALSYM SIO_BTH_INFO}
- SIO_RFCOMM_SESSION_FLOW_OFF = IOC_INOUT or IOC_VENDOR or 103;
- {$EXTERNALSYM SIO_RFCOMM_SESSION_FLOW_OFF}
- SIO_RFCOMM_TEST = IOC_INOUT or IOC_VENDOR or 104;
- {$EXTERNALSYM SIO_RFCOMM_TEST}
- SIO_RFCOMM_USECFC = IOC_INOUT or IOC_VENDOR or 105;
- {$EXTERNALSYM SIO_RFCOMM_USECFC}
-
-//
-// SOCKET IOCTL DEFINITIONS
-//
-
-function BIT(b: Integer): DWORD;
-
-//
-// Structure definition from Bluetooth RFCOMM spec, TS 07.10 5.4.6.3.7
-//
-
-const
-// todo MSC_EA_BIT = EA_BIT;
- MSC_FC_BIT = 1 shl 1; // Flow control, clear if we can receive
- {$EXTERNALSYM MSC_FC_BIT}
- MSC_RTC_BIT = 1 shl 2; // Ready to communicate, set when ready
- {$EXTERNALSYM MSC_RTC_BIT}
- MSC_RTR_BIT = 1 shl 3; // Ready to receive, set when ready
- {$EXTERNALSYM MSC_RTR_BIT}
- MSC_RESERVED = (1 shl 4) or (1 shl 5); // Reserved by spec, must be 0
- {$EXTERNALSYM MSC_RESERVED}
- MSC_IC_BIT = 1 shl 6; // Incoming call
- {$EXTERNALSYM MSC_IC_BIT}
- MSC_DV_BIT = 1 shl 7; // Data valid
- {$EXTERNALSYM MSC_DV_BIT}
-
- MSC_BREAK_BIT = 1 shl 1; // Set if sending break
- {$EXTERNALSYM MSC_BREAK_BIT}
-
-//MSC_SET_BREAK_LENGTH(b, l) ((b) = ((b)&0x3) | (((l)&0xf) << 4))
-
-type
- _RFCOMM_MSC_DATA = record
- Signals: UCHAR;
- Break: UCHAR;
- end;
- {$EXTERNALSYM _RFCOMM_MSC_DATA}
- RFCOMM_MSC_DATA = _RFCOMM_MSC_DATA;
- {$EXTERNALSYM RFCOMM_MSC_DATA}
- PRFCOMM_MSC_DATA = ^RFCOMM_MSC_DATA;
- {$EXTERNALSYM PRFCOMM_MSC_DATA}
- TRfCommMscData = RFCOMM_MSC_DATA;
- PRfCommMscData = PRFCOMM_MSC_DATA;
-
-//
-// Structure definition from Bluetooth RFCOMM spec, TS 07.10 5.4.6.3.10
-//
-
-const
- RLS_ERROR = $01;
- {$EXTERNALSYM RLS_ERROR}
- RLS_OVERRUN = $02;
- {$EXTERNALSYM RLS_OVERRUN}
- RLS_PARITY = $04;
- {$EXTERNALSYM RLS_PARITY}
- RLS_FRAMING = $08;
- {$EXTERNALSYM RLS_FRAMING}
-
-type
- _RFCOMM_RLS_DATA = record
- LineStatus: UCHAR;
- end;
- {$EXTERNALSYM _RFCOMM_RLS_DATA}
- RFCOMM_RLS_DATA = _RFCOMM_RLS_DATA;
- {$EXTERNALSYM RFCOMM_RLS_DATA}
- PRFCOMM_RLS_DATA = ^RFCOMM_RLS_DATA;
- {$EXTERNALSYM PRFCOMM_RLS_DATA}
- TRfCommRlsData = RFCOMM_RLS_DATA;
- PRfCommRlsData = PRFCOMM_RLS_DATA;
-
-//
-// Structure definition from Bluetooth RFCOMM spec, TS 07.10 5.4.6.3.9
-//
-
-const
- RPN_BAUD_2400 = 0;
- {$EXTERNALSYM RPN_BAUD_2400}
- RPN_BAUD_4800 = 1;
- {$EXTERNALSYM RPN_BAUD_4800}
- RPN_BAUD_7200 = 2;
- {$EXTERNALSYM RPN_BAUD_7200}
- RPN_BAUD_9600 = 3;
- {$EXTERNALSYM RPN_BAUD_9600}
- RPN_BAUD_19200 = 4;
- {$EXTERNALSYM RPN_BAUD_19200}
- RPN_BAUD_38400 = 5;
- {$EXTERNALSYM RPN_BAUD_38400}
- RPN_BAUD_57600 = 6;
- {$EXTERNALSYM RPN_BAUD_57600}
- RPN_BAUD_115200 = 7;
- {$EXTERNALSYM RPN_BAUD_115200}
- RPN_BAUD_230400 = 8;
- {$EXTERNALSYM RPN_BAUD_230400}
-
- RPN_DATA_5 = $0;
- {$EXTERNALSYM RPN_DATA_5}
- RPN_DATA_6 = $1;
- {$EXTERNALSYM RPN_DATA_6}
- RPN_DATA_7 = $2;
- {$EXTERNALSYM RPN_DATA_7}
- RPN_DATA_8 = $3;
- {$EXTERNALSYM RPN_DATA_8}
-
- RPN_STOP_1 = $0;
- {$EXTERNALSYM RPN_STOP_1}
- RPN_STOP_1_5 = $4;
- {$EXTERNALSYM RPN_STOP_1_5}
-
- RPN_PARITY_NONE = $00;
- {$EXTERNALSYM RPN_PARITY_NONE}
- RPN_PARITY_ODD = $08;
- {$EXTERNALSYM RPN_PARITY_ODD}
- RPN_PARITY_EVEN = $18;
- {$EXTERNALSYM RPN_PARITY_EVEN}
- RPN_PARITY_MARK = $28;
- {$EXTERNALSYM RPN_PARITY_MARK}
- RPN_PARITY_SPACE = $38;
- {$EXTERNALSYM RPN_PARITY_SPACE}
-
- RPN_FLOW_X_IN = $01;
- {$EXTERNALSYM RPN_FLOW_X_IN}
- RPN_FLOW_X_OUT = $02;
- {$EXTERNALSYM RPN_FLOW_X_OUT}
- RPN_FLOW_RTR_IN = $04;
- {$EXTERNALSYM RPN_FLOW_RTR_IN}
- RPN_FLOW_RTR_OUT = $08;
- {$EXTERNALSYM RPN_FLOW_RTR_OUT}
- RPN_FLOW_RTC_IN = $10;
- {$EXTERNALSYM RPN_FLOW_RTC_IN}
- RPN_FLOW_RTC_OUT = $20;
- {$EXTERNALSYM RPN_FLOW_RTC_OUT}
-
- RPN_PARAM_BAUD = $01;
- {$EXTERNALSYM RPN_PARAM_BAUD}
- RPN_PARAM_DATA = $02;
- {$EXTERNALSYM RPN_PARAM_DATA}
- RPN_PARAM_STOP = $04;
- {$EXTERNALSYM RPN_PARAM_STOP}
- RPN_PARAM_PARITY = $08;
- {$EXTERNALSYM RPN_PARAM_PARITY}
- RPN_PARAM_P_TYPE = $10;
- {$EXTERNALSYM RPN_PARAM_P_TYPE}
- RPN_PARAM_XON = $20;
- {$EXTERNALSYM RPN_PARAM_XON}
- RPN_PARAM_XOFF = $40;
- {$EXTERNALSYM RPN_PARAM_XOFF}
-
- RPN_PARAM_X_IN = $01;
- {$EXTERNALSYM RPN_PARAM_X_IN}
- RPN_PARAM_X_OUT = $02;
- {$EXTERNALSYM RPN_PARAM_X_OUT}
- RPN_PARAM_RTR_IN = $04;
- {$EXTERNALSYM RPN_PARAM_RTR_IN}
- RPN_PARAM_RTR_OUT = $08;
- {$EXTERNALSYM RPN_PARAM_RTR_OUT}
- RPN_PARAM_RTC_IN = $10;
- {$EXTERNALSYM RPN_PARAM_RTC_IN}
- RPN_PARAM_RTC_OUT = $20;
- {$EXTERNALSYM RPN_PARAM_RTC_OUT}
-
-type
- _RFCOMM_RPN_DATA = record
- Baud: UCHAR;
- Data: UCHAR;
- FlowControl: UCHAR;
- XonChar: UCHAR;
- XoffChar: UCHAR;
- ParameterMask1: UCHAR;
- ParameterMask2: UCHAR;
- end;
- {$EXTERNALSYM _RFCOMM_RPN_DATA}
- RFCOMM_RPN_DATA = _RFCOMM_RPN_DATA;
- {$EXTERNALSYM RFCOMM_RPN_DATA}
- PRFCOMM_RPN_DATA = ^_RFCOMM_RPN_DATA;
- {$EXTERNALSYM PRFCOMM_RPN_DATA}
- TRfCommRpnData = RFCOMM_RPN_DATA;
- PRfCommRpnData = PRFCOMM_RPN_DATA;
-
-const
- RFCOMM_CMD_NONE = 0;
- {$EXTERNALSYM RFCOMM_CMD_NONE}
- RFCOMM_CMD_MSC = 1;
- {$EXTERNALSYM RFCOMM_CMD_MSC}
- RFCOMM_CMD_RLS = 2;
- {$EXTERNALSYM RFCOMM_CMD_RLS}
- RFCOMM_CMD_RPN = 3;
- {$EXTERNALSYM RFCOMM_CMD_RPN}
- RFCOMM_CMD_RPN_REQUEST = 4;
- {$EXTERNALSYM RFCOMM_CMD_RPN_REQUEST}
- RFCOMM_CMD_RPN_RESPONSE = 5;
- {$EXTERNALSYM RFCOMM_CMD_RPN_RESPONSE}
-
-type
- _RFCOMM_COMMAND = record
- CmdType: ULONG; // one of RFCOMM_CMD_*
- case Integer of
- 0: (MSC: RFCOMM_MSC_DATA);
- 1: (RLS: RFCOMM_RLS_DATA);
- 2: (RPN: RFCOMM_RPN_DATA);
- end;
- {$EXTERNALSYM _RFCOMM_COMMAND}
- RFCOMM_COMMAND = _RFCOMM_COMMAND;
- {$EXTERNALSYM RFCOMM_COMMAND}
- PRFCOMM_COMMAND = ^RFCOMM_COMMAND;
- {$EXTERNALSYM PRFCOMM_COMMAND}
- TRfCommCommand = RFCOMM_COMMAND;
- PRfCommCommand = PRFCOMM_COMMAND;
-
-//
-// These structures are for test/validation/conformance and may only be
-// present in debug/checked builds of the system
-//
-
-type
- _BTH_PING_REQ = record
- btAddr: BTH_ADDR;
- dataLen: UCHAR;
- data: array [0..MAX_L2CAP_PING_DATA_LENGTH - 1] of UCHAR;
- end;
- {$EXTERNALSYM _BTH_PING_REQ}
- BTH_PING_REQ = _BTH_PING_REQ;
- {$EXTERNALSYM BTH_PING_REQ}
- PBTH_PING_REQ = ^BTH_PING_REQ;
- {$EXTERNALSYM PBTH_PING_REQ}
- TBthPingReq = BTH_PING_REQ;
- PBthPingReq = PBTH_PING_REQ;
-
- _BTH_PING_RSP = record
- dataLen: UCHAR;
- data: array [0..MAX_L2CAP_PING_DATA_LENGTH - 1] of UCHAR;
- end;
- {$EXTERNALSYM _BTH_PING_RSP}
- BTH_PING_RSP = _BTH_PING_RSP;
- {$EXTERNALSYM BTH_PING_RSP}
- PBTH_PING_RSP = ^BTH_PING_RSP;
- {$EXTERNALSYM PBTH_PING_RSP}
- TBthPingRsp = BTH_PING_RSP;
- PBthPingRsp = PBTH_PING_RSP;
-
- _BTH_INFO_REQ = record
- btAddr: BTH_ADDR;
- infoType: Word;
- end;
- {$EXTERNALSYM _BTH_INFO_REQ}
- BTH_INFO_REQ = _BTH_INFO_REQ;
- {$EXTERNALSYM BTH_INFO_REQ}
- PBTH_INFO_REQ = ^BTH_INFO_REQ;
- {$EXTERNALSYM PBTH_INFO_REQ}
- TBthInfoReq = BTH_INFO_REQ;
- PBthInfoReq = PBTH_INFO_REQ;
-
- _BTH_INFO_RSP = record
- result: Word;
- dataLen: UCHAR;
- case Integer of
- 0: (connectionlessMTU: Word);
- 1: (data: array [0..MAX_L2CAP_INFO_DATA_LENGTH - 1] of UCHAR);
- end;
- {$EXTERNALSYM _BTH_INFO_RSP}
- BTH_INFO_RSP = _BTH_INFO_RSP;
- {$EXTERNALSYM BTH_INFO_RSP}
- PBTH_INFO_RSP = ^BTH_INFO_RSP;
- {$EXTERNALSYM PBTH_INFO_RSP}
- TBthInfoRsp = BTH_INFO_RSP;
- PBthInfoRsp = PBTH_INFO_RSP;
-
-//
-// WinCE compatible struct names
-//
-
-{ todo
-typedef struct _BTH_SET_SERVICE BTHNS_SETBLOB, *PBTHNS_SETBLOB;
-typedef struct _BTH_QUERY_DEVICE BTHNS_INQUIRYBLOB, *PBTHNS_INQUIRYBLOB;
-typedef struct _BTH_QUERY_SERVICE BTHNS_RESTRICTIONBLOB, *PBTHNS_RESTRICTIONBLOB;
-}
-
-implementation
-
-function BIT(b: Integer): DWORD;
-begin
- Result := DWORD(1 shl b);
-end;
-
-end.
+{******************************************************************************}
+{ }
+{ BlueTooth API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Contributors: John Penman }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwaws2bth.pas,v 1.1 2005/04/04 07:56:11 marco Exp $
+
+unit JwaWs2Bth;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "ws2bth.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaWinType, JwaBthSdpDef, JwaBlueToothApis, JwaBthDef;
+
+const
+ BT_PORT_ANY = -1;
+ {$EXTERNALSYM BT_PORT_ANY}
+ BT_PORT_MIN = $1;
+ {$EXTERNALSYM BT_PORT_MIN}
+ BT_PORT_MAX = $ffff;
+ {$EXTERNALSYM BT_PORT_MAX}
+ BT_PORT_DYN_FIRST = $1001;
+ {$EXTERNALSYM BT_PORT_DYN_FIRST}
+
+//
+// These three definitions are duplicated in winsock2.h to reserve ordinals
+//
+
+const
+ AF_BTH = 32;
+ {$EXTERNALSYM AF_BTH}
+ PF_BTH = AF_BTH;
+ {$EXTERNALSYM PF_BTH}
+ NS_BTH = 16;
+ {$EXTERNALSYM NS_BTH}
+
+type
+ _SOCKADDR_BTH = record
+ addressFamily: Word; // Always AF_BTH
+ btAddr: BTH_ADDR; // Bluetooth device address
+ serviceClassId: TGUID; // [OPTIONAL] system will query SDP for port
+ port: ULONG; // RFCOMM channel or L2CAP PSM
+ end;
+ {$EXTERNALSYM _SOCKADDR_BTH}
+ SOCKADDR_BTH = _SOCKADDR_BTH;
+ {$EXTERNALSYM SOCKADDR_BTH}
+ PSOCKADDR_BTH = ^_SOCKADDR_BTH;
+ {$EXTERNALSYM PSOCKADDR_BTH}
+ TSockAddrBth = SOCKADDR_BTH;
+ PSockAddrBth = PSOCKADDR_BTH;
+
+const
+ SVCID_BTH_PROVIDER: TGUID = '{06AA63E0-7D60-41FF-AFB2-3EE6D2D9392D}';
+ {$EXTERNALSYM SVCID_BTH_PROVIDER}
+ BTH_ADDR_STRING_SIZE = 12; // max size from WSAAddressToString
+ {$EXTERNALSYM BTH_ADDR_STRING_SIZE}
+
+//
+// Bluetooth protocol #s are assigned according to the Bluetooth
+// Assigned Numbers portion of the Bluetooth Specification
+//
+
+const
+ BTHPROTO_RFCOMM = $0003;
+ {$EXTERNALSYM BTHPROTO_RFCOMM}
+ BTHPROTO_L2CAP = $0100;
+ {$EXTERNALSYM BTHPROTO_L2CAP}
+
+ SOL_RFCOMM = BTHPROTO_RFCOMM;
+ {$EXTERNALSYM SOL_RFCOMM}
+ SOL_L2CAP = BTHPROTO_L2CAP;
+ {$EXTERNALSYM SOL_L2CAP}
+ SOL_SDP = $0101;
+ {$EXTERNALSYM SOL_SDP}
+
+//
+// SOCKET OPTIONS
+//
+
+ SO_BTH_AUTHENTICATE = $80000001; // optlen=sizeof(ULONG), optval = &(ULONG)TRUE/FALSE
+ {$EXTERNALSYM SO_BTH_AUTHENTICATE}
+ SO_BTH_ENCRYPT = $00000002; // optlen=sizeof(ULONG), optval = &(ULONG)TRUE/FALSE
+ {$EXTERNALSYM SO_BTH_ENCRYPT}
+ SO_BTH_MTU = $80000007; // optlen=sizeof(ULONG), optval = &mtu
+ {$EXTERNALSYM SO_BTH_MTU}
+ SO_BTH_MTU_MAX = $80000008; // optlen=sizeof(ULONG), optval = &max. mtu
+ {$EXTERNALSYM SO_BTH_MTU_MAX}
+ SO_BTH_MTU_MIN = $8000000a; // optlen=sizeof(ULONG), optval = &min. mtu
+ {$EXTERNALSYM SO_BTH_MTU_MIN}
+
+//
+// Socket option parameters
+//
+
+ RFCOMM_MAX_MTU = $0000029a; // L2CAP MTU (672) - RFCOMM header size (6)
+ {$EXTERNALSYM RFCOMM_MAX_MTU}
+ RFCOMM_MIN_MTU = $00000017; // RFCOMM spec sec 5.3 table 5.1
+ {$EXTERNALSYM RFCOMM_MIN_MTU}
+
+//
+// NAME SERVICE PROVIDER DEFINITIONS
+// For calling WSASetService
+// and WSALookupServiceBegin, WSALookupServiceNext, WSALookupServiceEnd
+// with Bluetooth-specific extensions
+//
+
+ BTH_SDP_VERSION = 1;
+ {$EXTERNALSYM BTH_SDP_VERSION}
+
+//
+// [OPTIONAL] passed in BLOB member of WSAQUERYSET
+// QUERYSET and its lpBlob member are copied & converted
+// to unicode in the system for non-unicode applications.
+// However, nothing is copied back upon return. In
+// order for the system to return data such as pRecordHandle,
+// it much have an extra level of indirection from lpBlob
+//
+
+type
+ _BTH_SET_SERVICE = record
+
+ //
+ // This version number will change when/if the binary format of
+ // SDP records change, affecting the format of pRecord.
+ // Set to BTH_SDP_VERSION by client, and returned by system
+ //
+ pSdpVersion: PULONG;
+
+ //
+ // Handle to SDP record. When BTH_SET_SERVICE structure is later
+ // passed to WSASetService RNRSERVICE_DELETE, this handle identifies the
+ // record to delete.
+ //
+ pRecordHandle: PHandle;
+
+ //
+ // COD_SERVICE_* bit(s) associated with this SDP record, which will be
+ // advertised when the local radio is found during device inquiry.
+ // When the last SDP record associated with a bit is deleted, that
+ // service bit is no longer reported in repsonse to inquiries
+ //
+ fCodService: ULONG; // COD_SERVICE_* bits
+
+ Reserved: array [0..4] of ULONG; // Reserved by system. Must be zero.
+ ulRecordLength: ULONG; // length of pRecord which follows
+ pRecord: array [0..0] of ULONG; // SDP record as defined by bluetooth spec
+ end;
+ {$EXTERNALSYM _BTH_SET_SERVICE}
+ BTH_SET_SERVICE = _BTH_SET_SERVICE;
+ {$EXTERNALSYM BTH_SET_SERVICE}
+ PBTH_SET_SERVICE = ^_BTH_SET_SERVICE;
+ {$EXTERNALSYM PBTH_SET_SERVICE}
+ TBthSetService = BTH_SET_SERVICE;
+ PBthSetService = PBTH_SET_SERVICE;
+
+//
+// Default device inquiry duration in seconds
+//
+// The application thread will be blocked in WSALookupServiceBegin
+// for the duration of the device inquiry, so this value needs to
+// be balanced against the chance that a device that is actually
+// present might not being found by Bluetooth in this time
+//
+// Paging improvements post-1.1 will cause devices to be
+// found generally uniformly in the 0-6 sec timeperiod
+//
+
+const
+ SDP_DEFAULT_INQUIRY_SECONDS = 6;
+ {$EXTERNALSYM SDP_DEFAULT_INQUIRY_SECONDS}
+ SDP_MAX_INQUIRY_SECONDS = 60;
+ {$EXTERNALSYM SDP_MAX_INQUIRY_SECONDS}
+
+//
+// Default maximum number of devices to search for
+//
+
+ SDP_DEFAULT_INQUIRY_MAX_RESPONSES = 255;
+ {$EXTERNALSYM SDP_DEFAULT_INQUIRY_MAX_RESPONSES}
+
+ SDP_SERVICE_SEARCH_REQUEST = 1;
+ {$EXTERNALSYM SDP_SERVICE_SEARCH_REQUEST}
+ SDP_SERVICE_ATTRIBUTE_REQUEST = 2;
+ {$EXTERNALSYM SDP_SERVICE_ATTRIBUTE_REQUEST}
+ SDP_SERVICE_SEARCH_ATTRIBUTE_REQUEST = 3;
+ {$EXTERNALSYM SDP_SERVICE_SEARCH_ATTRIBUTE_REQUEST}
+
+//
+// [OPTIONAL] input restrictions on device inquiry
+// Passed in BLOB of LUP_CONTAINERS (device) search
+//
+
+type
+ _BTH_QUERY_DEVICE = record
+ LAP: ULONG;
+ length: UCHAR;
+ end;
+ {$EXTERNALSYM _BTH_QUERY_DEVICE}
+ BTH_QUERY_DEVICE = _BTH_QUERY_DEVICE;
+ {$EXTERNALSYM BTH_QUERY_DEVICE}
+ PBTH_QUERY_DEVICE = ^_BTH_QUERY_DEVICE;
+ {$EXTERNALSYM PBTH_QUERY_DEVICE}
+ TBthQueryDevice = BTH_QUERY_DEVICE;
+ PBthQueryDevice = PBTH_QUERY_DEVICE;
+
+//
+// [OPTIONAL] Restrictions on searching for a particular service
+// Passed in BLOB of !LUP_CONTAINERS (service) search
+//
+
+ _BTH_QUERY_SERVICE = record
+ _type: ULONG;
+ serviceHandle: ULONG;
+ uuids: array[0..MAX_UUIDS_IN_QUERY - 1] of SdpQueryUuid;
+ numRange: ULONG;
+ pRange: array[0..0] of SdpAttributeRange;
+ end;
+ {$EXTERNALSYM _BTH_QUERY_SERVICE}
+ BTH_QUERY_SERVICE = _BTH_QUERY_SERVICE;
+ {$EXTERNALSYM BTH_QUERY_SERVICE}
+ PBTH_QUERY_SERVICE = ^_BTH_QUERY_SERVICE;
+ {$EXTERNALSYM PBTH_QUERY_SERVICE}
+ TBthQueryService = BTH_QUERY_SERVICE;
+ PBthQueryService = PBTH_QUERY_SERVICE;
+
+//
+// BTHNS_RESULT_*
+//
+// Bluetooth specific flags returned from WSALookupServiceNext
+// in WSAQUERYSET.dwOutputFlags in response to device inquiry
+//
+
+//
+// Local device is paired with remote device
+//
+
+const
+ BTHNS_RESULT_DEVICE_CONNECTED = $00010000;
+ {$EXTERNALSYM BTHNS_RESULT_DEVICE_CONNECTED}
+ BTHNS_RESULT_DEVICE_REMEMBERED = $00020000;
+ {$EXTERNALSYM BTHNS_RESULT_DEVICE_REMEMBERED}
+ BTHNS_RESULT_DEVICE_AUTHENTICATED = $00040000;
+ {$EXTERNALSYM BTHNS_RESULT_DEVICE_AUTHENTICATED}
+
+//
+// SOCKET IOCTLs
+//
+
+ IOC_OUT = $40000000; // copy out parameters
+ {$EXTERNALSYM IOC_OUT}
+ IOC_IN = DWORD($80000000); // copy in parameters
+ {$EXTERNALSYM IOC_IN}
+ IOC_INOUT = DWORD(IOC_IN or IOC_OUT);
+ {$EXTERNALSYM IOC_INOUT}
+ IOC_VENDOR = $18000000;
+ {$EXTERNALSYM IOC_VENDOR}
+
+const
+ SIO_RFCOMM_SEND_COMMAND = IOC_INOUT or IOC_VENDOR or 101;
+ {$EXTERNALSYM SIO_RFCOMM_SEND_COMMAND}
+ SIO_RFCOMM_WAIT_COMMAND = IOC_INOUT or IOC_VENDOR or 102;
+ {$EXTERNALSYM SIO_RFCOMM_WAIT_COMMAND}
+
+//
+// These IOCTLs are for test/validation/conformance and may only be
+// present in debug/checked builds of the system
+//
+
+ SIO_BTH_PING = IOC_INOUT or IOC_VENDOR or 8;
+ {$EXTERNALSYM SIO_BTH_PING}
+ SIO_BTH_INFO = IOC_INOUT or IOC_VENDOR or 9;
+ {$EXTERNALSYM SIO_BTH_INFO}
+ SIO_RFCOMM_SESSION_FLOW_OFF = IOC_INOUT or IOC_VENDOR or 103;
+ {$EXTERNALSYM SIO_RFCOMM_SESSION_FLOW_OFF}
+ SIO_RFCOMM_TEST = IOC_INOUT or IOC_VENDOR or 104;
+ {$EXTERNALSYM SIO_RFCOMM_TEST}
+ SIO_RFCOMM_USECFC = IOC_INOUT or IOC_VENDOR or 105;
+ {$EXTERNALSYM SIO_RFCOMM_USECFC}
+
+//
+// SOCKET IOCTL DEFINITIONS
+//
+
+function BIT(b: Integer): DWORD;
+
+//
+// Structure definition from Bluetooth RFCOMM spec, TS 07.10 5.4.6.3.7
+//
+
+const
+// todo MSC_EA_BIT = EA_BIT;
+ MSC_FC_BIT = 1 shl 1; // Flow control, clear if we can receive
+ {$EXTERNALSYM MSC_FC_BIT}
+ MSC_RTC_BIT = 1 shl 2; // Ready to communicate, set when ready
+ {$EXTERNALSYM MSC_RTC_BIT}
+ MSC_RTR_BIT = 1 shl 3; // Ready to receive, set when ready
+ {$EXTERNALSYM MSC_RTR_BIT}
+ MSC_RESERVED = (1 shl 4) or (1 shl 5); // Reserved by spec, must be 0
+ {$EXTERNALSYM MSC_RESERVED}
+ MSC_IC_BIT = 1 shl 6; // Incoming call
+ {$EXTERNALSYM MSC_IC_BIT}
+ MSC_DV_BIT = 1 shl 7; // Data valid
+ {$EXTERNALSYM MSC_DV_BIT}
+
+ MSC_BREAK_BIT = 1 shl 1; // Set if sending break
+ {$EXTERNALSYM MSC_BREAK_BIT}
+
+//MSC_SET_BREAK_LENGTH(b, l) ((b) = ((b)&0x3) | (((l)&0xf) << 4))
+
+type
+ _RFCOMM_MSC_DATA = record
+ Signals: UCHAR;
+ Break: UCHAR;
+ end;
+ {$EXTERNALSYM _RFCOMM_MSC_DATA}
+ RFCOMM_MSC_DATA = _RFCOMM_MSC_DATA;
+ {$EXTERNALSYM RFCOMM_MSC_DATA}
+ PRFCOMM_MSC_DATA = ^RFCOMM_MSC_DATA;
+ {$EXTERNALSYM PRFCOMM_MSC_DATA}
+ TRfCommMscData = RFCOMM_MSC_DATA;
+ PRfCommMscData = PRFCOMM_MSC_DATA;
+
+//
+// Structure definition from Bluetooth RFCOMM spec, TS 07.10 5.4.6.3.10
+//
+
+const
+ RLS_ERROR = $01;
+ {$EXTERNALSYM RLS_ERROR}
+ RLS_OVERRUN = $02;
+ {$EXTERNALSYM RLS_OVERRUN}
+ RLS_PARITY = $04;
+ {$EXTERNALSYM RLS_PARITY}
+ RLS_FRAMING = $08;
+ {$EXTERNALSYM RLS_FRAMING}
+
+type
+ _RFCOMM_RLS_DATA = record
+ LineStatus: UCHAR;
+ end;
+ {$EXTERNALSYM _RFCOMM_RLS_DATA}
+ RFCOMM_RLS_DATA = _RFCOMM_RLS_DATA;
+ {$EXTERNALSYM RFCOMM_RLS_DATA}
+ PRFCOMM_RLS_DATA = ^RFCOMM_RLS_DATA;
+ {$EXTERNALSYM PRFCOMM_RLS_DATA}
+ TRfCommRlsData = RFCOMM_RLS_DATA;
+ PRfCommRlsData = PRFCOMM_RLS_DATA;
+
+//
+// Structure definition from Bluetooth RFCOMM spec, TS 07.10 5.4.6.3.9
+//
+
+const
+ RPN_BAUD_2400 = 0;
+ {$EXTERNALSYM RPN_BAUD_2400}
+ RPN_BAUD_4800 = 1;
+ {$EXTERNALSYM RPN_BAUD_4800}
+ RPN_BAUD_7200 = 2;
+ {$EXTERNALSYM RPN_BAUD_7200}
+ RPN_BAUD_9600 = 3;
+ {$EXTERNALSYM RPN_BAUD_9600}
+ RPN_BAUD_19200 = 4;
+ {$EXTERNALSYM RPN_BAUD_19200}
+ RPN_BAUD_38400 = 5;
+ {$EXTERNALSYM RPN_BAUD_38400}
+ RPN_BAUD_57600 = 6;
+ {$EXTERNALSYM RPN_BAUD_57600}
+ RPN_BAUD_115200 = 7;
+ {$EXTERNALSYM RPN_BAUD_115200}
+ RPN_BAUD_230400 = 8;
+ {$EXTERNALSYM RPN_BAUD_230400}
+
+ RPN_DATA_5 = $0;
+ {$EXTERNALSYM RPN_DATA_5}
+ RPN_DATA_6 = $1;
+ {$EXTERNALSYM RPN_DATA_6}
+ RPN_DATA_7 = $2;
+ {$EXTERNALSYM RPN_DATA_7}
+ RPN_DATA_8 = $3;
+ {$EXTERNALSYM RPN_DATA_8}
+
+ RPN_STOP_1 = $0;
+ {$EXTERNALSYM RPN_STOP_1}
+ RPN_STOP_1_5 = $4;
+ {$EXTERNALSYM RPN_STOP_1_5}
+
+ RPN_PARITY_NONE = $00;
+ {$EXTERNALSYM RPN_PARITY_NONE}
+ RPN_PARITY_ODD = $08;
+ {$EXTERNALSYM RPN_PARITY_ODD}
+ RPN_PARITY_EVEN = $18;
+ {$EXTERNALSYM RPN_PARITY_EVEN}
+ RPN_PARITY_MARK = $28;
+ {$EXTERNALSYM RPN_PARITY_MARK}
+ RPN_PARITY_SPACE = $38;
+ {$EXTERNALSYM RPN_PARITY_SPACE}
+
+ RPN_FLOW_X_IN = $01;
+ {$EXTERNALSYM RPN_FLOW_X_IN}
+ RPN_FLOW_X_OUT = $02;
+ {$EXTERNALSYM RPN_FLOW_X_OUT}
+ RPN_FLOW_RTR_IN = $04;
+ {$EXTERNALSYM RPN_FLOW_RTR_IN}
+ RPN_FLOW_RTR_OUT = $08;
+ {$EXTERNALSYM RPN_FLOW_RTR_OUT}
+ RPN_FLOW_RTC_IN = $10;
+ {$EXTERNALSYM RPN_FLOW_RTC_IN}
+ RPN_FLOW_RTC_OUT = $20;
+ {$EXTERNALSYM RPN_FLOW_RTC_OUT}
+
+ RPN_PARAM_BAUD = $01;
+ {$EXTERNALSYM RPN_PARAM_BAUD}
+ RPN_PARAM_DATA = $02;
+ {$EXTERNALSYM RPN_PARAM_DATA}
+ RPN_PARAM_STOP = $04;
+ {$EXTERNALSYM RPN_PARAM_STOP}
+ RPN_PARAM_PARITY = $08;
+ {$EXTERNALSYM RPN_PARAM_PARITY}
+ RPN_PARAM_P_TYPE = $10;
+ {$EXTERNALSYM RPN_PARAM_P_TYPE}
+ RPN_PARAM_XON = $20;
+ {$EXTERNALSYM RPN_PARAM_XON}
+ RPN_PARAM_XOFF = $40;
+ {$EXTERNALSYM RPN_PARAM_XOFF}
+
+ RPN_PARAM_X_IN = $01;
+ {$EXTERNALSYM RPN_PARAM_X_IN}
+ RPN_PARAM_X_OUT = $02;
+ {$EXTERNALSYM RPN_PARAM_X_OUT}
+ RPN_PARAM_RTR_IN = $04;
+ {$EXTERNALSYM RPN_PARAM_RTR_IN}
+ RPN_PARAM_RTR_OUT = $08;
+ {$EXTERNALSYM RPN_PARAM_RTR_OUT}
+ RPN_PARAM_RTC_IN = $10;
+ {$EXTERNALSYM RPN_PARAM_RTC_IN}
+ RPN_PARAM_RTC_OUT = $20;
+ {$EXTERNALSYM RPN_PARAM_RTC_OUT}
+
+type
+ _RFCOMM_RPN_DATA = record
+ Baud: UCHAR;
+ Data: UCHAR;
+ FlowControl: UCHAR;
+ XonChar: UCHAR;
+ XoffChar: UCHAR;
+ ParameterMask1: UCHAR;
+ ParameterMask2: UCHAR;
+ end;
+ {$EXTERNALSYM _RFCOMM_RPN_DATA}
+ RFCOMM_RPN_DATA = _RFCOMM_RPN_DATA;
+ {$EXTERNALSYM RFCOMM_RPN_DATA}
+ PRFCOMM_RPN_DATA = ^_RFCOMM_RPN_DATA;
+ {$EXTERNALSYM PRFCOMM_RPN_DATA}
+ TRfCommRpnData = RFCOMM_RPN_DATA;
+ PRfCommRpnData = PRFCOMM_RPN_DATA;
+
+const
+ RFCOMM_CMD_NONE = 0;
+ {$EXTERNALSYM RFCOMM_CMD_NONE}
+ RFCOMM_CMD_MSC = 1;
+ {$EXTERNALSYM RFCOMM_CMD_MSC}
+ RFCOMM_CMD_RLS = 2;
+ {$EXTERNALSYM RFCOMM_CMD_RLS}
+ RFCOMM_CMD_RPN = 3;
+ {$EXTERNALSYM RFCOMM_CMD_RPN}
+ RFCOMM_CMD_RPN_REQUEST = 4;
+ {$EXTERNALSYM RFCOMM_CMD_RPN_REQUEST}
+ RFCOMM_CMD_RPN_RESPONSE = 5;
+ {$EXTERNALSYM RFCOMM_CMD_RPN_RESPONSE}
+
+type
+ _RFCOMM_COMMAND = record
+ CmdType: ULONG; // one of RFCOMM_CMD_*
+ case Integer of
+ 0: (MSC: RFCOMM_MSC_DATA);
+ 1: (RLS: RFCOMM_RLS_DATA);
+ 2: (RPN: RFCOMM_RPN_DATA);
+ end;
+ {$EXTERNALSYM _RFCOMM_COMMAND}
+ RFCOMM_COMMAND = _RFCOMM_COMMAND;
+ {$EXTERNALSYM RFCOMM_COMMAND}
+ PRFCOMM_COMMAND = ^RFCOMM_COMMAND;
+ {$EXTERNALSYM PRFCOMM_COMMAND}
+ TRfCommCommand = RFCOMM_COMMAND;
+ PRfCommCommand = PRFCOMM_COMMAND;
+
+//
+// These structures are for test/validation/conformance and may only be
+// present in debug/checked builds of the system
+//
+
+type
+ _BTH_PING_REQ = record
+ btAddr: BTH_ADDR;
+ dataLen: UCHAR;
+ data: array [0..MAX_L2CAP_PING_DATA_LENGTH - 1] of UCHAR;
+ end;
+ {$EXTERNALSYM _BTH_PING_REQ}
+ BTH_PING_REQ = _BTH_PING_REQ;
+ {$EXTERNALSYM BTH_PING_REQ}
+ PBTH_PING_REQ = ^BTH_PING_REQ;
+ {$EXTERNALSYM PBTH_PING_REQ}
+ TBthPingReq = BTH_PING_REQ;
+ PBthPingReq = PBTH_PING_REQ;
+
+ _BTH_PING_RSP = record
+ dataLen: UCHAR;
+ data: array [0..MAX_L2CAP_PING_DATA_LENGTH - 1] of UCHAR;
+ end;
+ {$EXTERNALSYM _BTH_PING_RSP}
+ BTH_PING_RSP = _BTH_PING_RSP;
+ {$EXTERNALSYM BTH_PING_RSP}
+ PBTH_PING_RSP = ^BTH_PING_RSP;
+ {$EXTERNALSYM PBTH_PING_RSP}
+ TBthPingRsp = BTH_PING_RSP;
+ PBthPingRsp = PBTH_PING_RSP;
+
+ _BTH_INFO_REQ = record
+ btAddr: BTH_ADDR;
+ infoType: Word;
+ end;
+ {$EXTERNALSYM _BTH_INFO_REQ}
+ BTH_INFO_REQ = _BTH_INFO_REQ;
+ {$EXTERNALSYM BTH_INFO_REQ}
+ PBTH_INFO_REQ = ^BTH_INFO_REQ;
+ {$EXTERNALSYM PBTH_INFO_REQ}
+ TBthInfoReq = BTH_INFO_REQ;
+ PBthInfoReq = PBTH_INFO_REQ;
+
+ _BTH_INFO_RSP = record
+ result: Word;
+ dataLen: UCHAR;
+ case Integer of
+ 0: (connectionlessMTU: Word);
+ 1: (data: array [0..MAX_L2CAP_INFO_DATA_LENGTH - 1] of UCHAR);
+ end;
+ {$EXTERNALSYM _BTH_INFO_RSP}
+ BTH_INFO_RSP = _BTH_INFO_RSP;
+ {$EXTERNALSYM BTH_INFO_RSP}
+ PBTH_INFO_RSP = ^BTH_INFO_RSP;
+ {$EXTERNALSYM PBTH_INFO_RSP}
+ TBthInfoRsp = BTH_INFO_RSP;
+ PBthInfoRsp = PBTH_INFO_RSP;
+
+//
+// WinCE compatible struct names
+//
+
+{ todo
+typedef struct _BTH_SET_SERVICE BTHNS_SETBLOB, *PBTHNS_SETBLOB;
+typedef struct _BTH_QUERY_DEVICE BTHNS_INQUIRYBLOB, *PBTHNS_INQUIRYBLOB;
+typedef struct _BTH_QUERY_SERVICE BTHNS_RESTRICTIONBLOB, *PBTHNS_RESTRICTIONBLOB;
+}
+
+implementation
+
+function BIT(b: Integer): DWORD;
+begin
+ Result := DWORD(1 shl b);
+end;
+
+end.
diff --git a/packages/extra/winunits/jwaws2dnet.pas b/packages/extra/winunits/jwaws2dnet.pas
index 618fac8bee..e96e1826ec 100644
--- a/packages/extra/winunits/jwaws2dnet.pas
+++ b/packages/extra/winunits/jwaws2dnet.pas
@@ -1,367 +1,367 @@
-{******************************************************************************}
-{ }
-{ Winsock2 DecNET API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: ws2dnet.h, released June 2000. The original Pascal }
-{ code is: WS2dnet.pas, released December 2000. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwaws2dnet.pas,v 1.1 2005/04/04 07:56:11 marco Exp $
-
-unit JwaWS2dnet;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "ws2dnet.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaWinSock2;
-
-//************************************************************************
-// Winsock V2.0 DECnet definitions File: WS2DNET.H
-//************************************************************************
-
-//
-// DECnet WinSock Definitions
-//
-
-const
- DNPROTO_NSP = 1; // DECnet NSP transport protocol
- {$EXTERNALSYM DNPROTO_NSP}
- DNPROTO_RAW = 255;
- {$EXTERNALSYM DNPROTO_RAW}
-
- DN_MAXADDL = 20; // maximum DECnet address length
- {$EXTERNALSYM DN_MAXADDL}
- DN_ADDL = 2; // DECnet NSP address length
- {$EXTERNALSYM DN_ADDL}
- DN_MAXOPTL = 16; // Maximum DECnet optional data length
- {$EXTERNALSYM DN_MAXOPTL}
- DN_MAXOBJL = 16; // Maximum DECnet object name length
- {$EXTERNALSYM DN_MAXOBJL}
- DN_MAXACCL = 39; // Maximum DECnet access string length
- {$EXTERNALSYM DN_MAXACCL}
- DN_MAXALIASL = 128; // Maximum DECnet alias string length
- {$EXTERNALSYM DN_MAXALIASL}
- DN_MAXNODEL = 7; // Maximum DECnet Phase IV node string length
- {$EXTERNALSYM DN_MAXNODEL}
-
-// DECnet Extension Function Identifiers
-
- WS2API_DECNET_dnet_addr = 1;
- {$EXTERNALSYM WS2API_DECNET_dnet_addr}
- WS2API_DECNET_dnet_eof = 2;
- {$EXTERNALSYM WS2API_DECNET_dnet_eof}
- WS2API_DECNET_dnet_getacc = 3;
- {$EXTERNALSYM WS2API_DECNET_dnet_getacc}
- WS2API_DECNET_dnet_getalias = 4;
- {$EXTERNALSYM WS2API_DECNET_dnet_getalias}
- WS2API_DECNET_dnet_htoa = 5;
- {$EXTERNALSYM WS2API_DECNET_dnet_htoa}
- WS2API_DECNET_dnet_ntoa = 6;
- {$EXTERNALSYM WS2API_DECNET_dnet_ntoa}
- WS2API_DECNET_getnodeadd = 7;
- {$EXTERNALSYM WS2API_DECNET_getnodeadd}
- WS2API_DECNET_getnodebyaddr = 8;
- {$EXTERNALSYM WS2API_DECNET_getnodebyaddr}
- WS2API_DECNET_getnodebyname = 9;
- {$EXTERNALSYM WS2API_DECNET_getnodebyname}
- WS2API_DECNET_getnodename = 10;
- {$EXTERNALSYM WS2API_DECNET_getnodename}
- WS2API_DECNET_MAX = 10;
- {$EXTERNALSYM WS2API_DECNET_MAX}
-
-//
-// DECnet address structure
-//
-
-type
- dn_naddr = packed record
- a_len: Word; // length of address
- a_addr: array [0..DN_MAXADDL - 1] of Byte; // address as bytes
- end;
- {$EXTERNALSYM dn_naddr}
- DNNADDR = dn_naddr;
- {$EXTERNALSYM DNNADDR}
- LPDNNADDR = ^DNNADDR;
- {$EXTERNALSYM LPDNNADDR}
- TDNNAddr = DNNADDR;
- PDNNAddr = LPDNNADDR;
-
-//
-// DECnet socket address structure
-//
-
- sockaddr_dn = packed record
- sdn_family: Word; // AF_DECnet
- sdn_flags: Byte; // flags
- sdn_objnum: Byte; // object number
- sdn_objnamel: Word; // size of object name
- sdn_objname: array [0..DN_MAXOBJL - 1] of Char; // object name
- sdn_add: dn_naddr; // node address
- end;
- {$EXTERNALSYM sockaddr_dn}
- SOCKADDRDN = sockaddr_dn;
- {$EXTERNALSYM SOCKADDRDN}
- LPSOCKADDRDN = ^SOCKADDRDN;
- {$EXTERNALSYM LPSOCKADDRDN}
- TSockAddrDN = SOCKADDRDN;
- PSockAddrDN = LPSOCKADDRDN;
-
-// Common DECnet object numbers (used in sockaddr_dn)
-
-const
- DNOBJECT_FAL = 17; // = file access listener;
- {$EXTERNALSYM DNOBJECT_FAL}
- DNOBJECT_NICE = 19; // = network management;
- {$EXTERNALSYM DNOBJECT_NICE}
- DNOBJECT_DTERM = 23; // = remote terminals;
- {$EXTERNALSYM DNOBJECT_DTERM}
- DNOBJECT_MIRROR = 25; // = loopback mirror;
- {$EXTERNALSYM DNOBJECT_MIRROR}
- DNOBJECT_EVR = 26; // = event receiver;
- {$EXTERNALSYM DNOBJECT_EVR}
- DNOBJECT_MAIL11 = 27; // = Mail-11 service;
- {$EXTERNALSYM DNOBJECT_MAIL11}
- DNOBJECT_PHONE = 29; // = phone utility;
- {$EXTERNALSYM DNOBJECT_PHONE}
- DNOBJECT_CTERM = 42; // = command terminals;
- {$EXTERNALSYM DNOBJECT_CTERM}
- DNOBJECT_DTR = 63; // = data test receiver;
- {$EXTERNALSYM DNOBJECT_DTR}
-
-//
-// DECnet node structure
-//
-
-type
- nodeent_f = packed record
- n_name: PChar; // name of node
- n_addrtype: Word; // node address type
- n_length: Word; // address length
- n_addr: PChar; // address
- n_params: PChar; // node parameters
- n_reserved: array [0..15] of Byte; // Reserved
- end;
- {$EXTERNALSYM nodeent_f}
- NODEENTF = nodeent_f;
- {$EXTERNALSYM NODEENTF}
- LPNODEENTF = ^NODEENTF;
- {$EXTERNALSYM LPNODEENTF}
- TNodeEntF = NODEENTF;
- PNodeEntF = LPNODEENTF;
-
-//
-// DECnet set/get DSO_CONDATA, DSO_DISDATA (optional data) structure
-//
-
- optdata_dn = packed record
- opt_status: Word; // extended status return
- opt_optl: Word; // user data length
- opt_data: array [0..DN_MAXOPTL - 1] of Byte; // user data
- end;
- {$EXTERNALSYM optdata_dn}
- OPTDATADN = optdata_dn;
- {$EXTERNALSYM OPTDATADN}
- LPOPTDATADN = ^OPTDATADN;
- {$EXTERNALSYM LPOPTDATADN}
- TOptDataDN = OPTDATADN;
- POptDataDN = LPOPTDATADN;
-
-//
-// DECnet set/get DSO_CONACCESS access (control data) structure
-//
-
- accessdata_dn = packed record
- acc_accl: Word; // account string length
- acc_acc: array [0..DN_MAXACCL] of Byte; // account string
- acc_passl: Word; // password string length
- acc_pass: array [0..DN_MAXACCL] of Byte; // password string
- acc_userl: Word; // user string length
- acc_user: array [0..DN_MAXACCL] of Byte; // user string
- end;
- {$EXTERNALSYM accessdata_dn}
- ACCESSDATADN = accessdata_dn;
- {$EXTERNALSYM ACCESSDATADN}
- LPACCESSDATADN = ^ACCESSDATADN;
- {$EXTERNALSYM LPACCESSDATADN}
- TAccessDataDN = ACCESSDATADN;
- PAccessDataDN = LPACCESSDATADN;
-
-//
-// DECnet call data structure (concatenated access and optional data)
-//
-
- calldata_dn = packed record
- optdata_dn: optdata_dn;
- accessdata_dn: accessdata_dn;
- end;
- {$EXTERNALSYM calldata_dn}
- CALLDATADN = calldata_dn;
- {$EXTERNALSYM CALLDATADN}
- LPCALLDATADN = ^CALLDATADN;
- {$EXTERNALSYM LPCALLDATADN}
- TCallDataDN = CALLDATADN;
- PCallDataDN = LPCALLDATADN;
-
-//
-// DECnet incoming access control structure
-//
-
- dnet_accent = packed record
- dac_status: Byte; // Reserved
- dac_type: Byte; // DN_NONE, etc.
- dac_username: array [0..DN_MAXACCL] of Char;
- dac_password: array [0..DN_MAXACCL] of Char;
- end;
- {$EXTERNALSYM dnet_accent}
- DNETACCENT = dnet_accent;
- {$EXTERNALSYM DNETACCENT}
- LPDNETACCENT = ^DNETACCENT;
- {$EXTERNALSYM LPDNETACCENT}
- TDNetAccent = DNETACCENT;
- PDNetAccent = LPDNETACCENT;
-
-const
- DN_NONE = $00;
- {$EXTERNALSYM DN_NONE}
- DN_RO = $01;
- {$EXTERNALSYM DN_RO}
- DN_WO = $02;
- {$EXTERNALSYM DN_WO}
- DN_RW = $03;
- {$EXTERNALSYM DN_RW}
-
-// DECnet logical link information structure
-
-type
- linkinfo_dn = packed record
- idn_segsize: Word; // segment size for link
- idn_linkstate: Byte; // logical link state
- end;
- {$EXTERNALSYM linkinfo_dn}
- LINKINFODN = linkinfo_dn;
- {$EXTERNALSYM LINKINFODN}
- LPLINKINFODN = ^LINKINFODN;
- {$EXTERNALSYM LPLINKINFODN}
- TLinkInfoDN = LINKINFODN;
- PLinkInfoDN = LPLINKINFODN;
-
-const
- SO_LINKINFO = 7; // set/get link information
- {$EXTERNALSYM SO_LINKINFO}
- LL_INACTIVE = 0; // logical link inactive
- {$EXTERNALSYM LL_INACTIVE}
- LL_CONNECTING = 1; // logical link connecting
- {$EXTERNALSYM LL_CONNECTING}
- LL_RUNNING = 2; // logical link running
- {$EXTERNALSYM LL_RUNNING}
- LL_DISCONNECTING = 3; // logical link disconnecting
- {$EXTERNALSYM LL_DISCONNECTING}
-
-//*********************************************************************
-// DECnet WinSock 2 extended function prototypes
-//*********************************************************************
-
-(*
-MVB TODO: Extension functions must be dynamically queried for using WSAIoctl.
-
-function dnet_addr(cp: PChar): PDNAddr; stdcall;
-{$EXTERNALSYM dnet_addr}
-function dnet_eof(s: SOCKET): Integer; stdcall;
-{$EXTERNALSYM dnet_eof}
-function dnet_getacc(const nacc: TDNetAccent): PDNetAccent; stdcall;
-{$EXTERNALSYM dnet_getacc}
-function dnet_getalias(P: PChar): PChar; stdcall;
-{$EXTERNALSYM dnet_getalias}
-function dnet_htoa(const add: TDNNAddr): PChar; stdcall;
-{$EXTERNALSYM dnet_htoa}
-function dnet_ntoa(const add: TDNNAddr): PChar; stdcall;
-{$EXTERNALSYM dnet_ntoa}
-function getnodeadd: PDNNAddr; stdcall;
-{$EXTERNALSYM getnodeadd}
-function getnodebyaddr(addr: PChar; len, type_: Integer): PNodeEntF; stdcall;
-{$EXTERNALSYM getnodebyaddr}
-function getnodebyname(name: PChar): PNodeEntF; stdcall;
-{$EXTERNALSYM getnodebyname}
-function getnodename: PChar; stdcall;
-{$EXTERNALSYM getnodename}
-*)
-
-// typedefs for C++ compatability
-
-type
- LPDNETADDR = function(cp: PChar): PDNNAddr; stdcall;
- {$EXTERNALSYM LPDNETADDR}
- TDNetAddr = LPDNETADDR;
- LPDNETEOF = function(s: TSocket): Integer; stdcall;
- {$EXTERNALSYM LPDNETEOF}
- TDNetEOF = LPDNETEOF;
- LPDNETGETACC = function(const nacc: TDNetAccent): PDNetAccent; stdcall;
- {$EXTERNALSYM LPDNETGETACC}
- TDNetGetAcc = LPDNETGETACC;
- LPDNETGETALIAS = function(P: PChar): PChar; stdcall;
- {$EXTERNALSYM LPDNETGETALIAS}
- TDNetGetAlias = LPDNETGETALIAS;
- LPDNETHTOA = function(const add: TDNNAddr): PChar; stdcall;
- {$EXTERNALSYM LPDNETHTOA}
- TDNetHToA = LPDNETHTOA;
- LPDNETNTOA = function(const add: TDNNAddr): PChar; stdcall;
- {$EXTERNALSYM LPDNETNTOA}
- TDNetNToA = LPDNETNTOA;
- LPGETNODEADD = function: PDNNAddr; stdcall;
- {$EXTERNALSYM LPGETNODEADD}
- TGetNodeAdd = LPGETNODEADD;
- LPGETNODEBYADDR = function(addr: PChar; len, type_: Integer): PNodeEntF; stdcall;
- {$EXTERNALSYM LPGETNODEBYADDR}
- TGetNodeByAddr = LPGETNODEBYADDR;
- LPGETNODEBYNAME = function(name: PChar): PNodeEntF; stdcall;
- {$EXTERNALSYM LPGETNODEBYNAME}
- TGetNodeByName = LPGETNODEBYNAME;
- LPGETNODENAME = function: PChar; stdcall;
- {$EXTERNALSYM LPGETNODENAME}
- TGetNodeName = LPGETNODENAME;
-
-implementation
-
-end.
+{******************************************************************************}
+{ }
+{ Winsock2 DecNET API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: ws2dnet.h, released June 2000. The original Pascal }
+{ code is: WS2dnet.pas, released December 2000. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwaws2dnet.pas,v 1.1 2005/04/04 07:56:11 marco Exp $
+
+unit JwaWS2dnet;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "ws2dnet.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaWinSock2;
+
+//************************************************************************
+// Winsock V2.0 DECnet definitions File: WS2DNET.H
+//************************************************************************
+
+//
+// DECnet WinSock Definitions
+//
+
+const
+ DNPROTO_NSP = 1; // DECnet NSP transport protocol
+ {$EXTERNALSYM DNPROTO_NSP}
+ DNPROTO_RAW = 255;
+ {$EXTERNALSYM DNPROTO_RAW}
+
+ DN_MAXADDL = 20; // maximum DECnet address length
+ {$EXTERNALSYM DN_MAXADDL}
+ DN_ADDL = 2; // DECnet NSP address length
+ {$EXTERNALSYM DN_ADDL}
+ DN_MAXOPTL = 16; // Maximum DECnet optional data length
+ {$EXTERNALSYM DN_MAXOPTL}
+ DN_MAXOBJL = 16; // Maximum DECnet object name length
+ {$EXTERNALSYM DN_MAXOBJL}
+ DN_MAXACCL = 39; // Maximum DECnet access string length
+ {$EXTERNALSYM DN_MAXACCL}
+ DN_MAXALIASL = 128; // Maximum DECnet alias string length
+ {$EXTERNALSYM DN_MAXALIASL}
+ DN_MAXNODEL = 7; // Maximum DECnet Phase IV node string length
+ {$EXTERNALSYM DN_MAXNODEL}
+
+// DECnet Extension Function Identifiers
+
+ WS2API_DECNET_dnet_addr = 1;
+ {$EXTERNALSYM WS2API_DECNET_dnet_addr}
+ WS2API_DECNET_dnet_eof = 2;
+ {$EXTERNALSYM WS2API_DECNET_dnet_eof}
+ WS2API_DECNET_dnet_getacc = 3;
+ {$EXTERNALSYM WS2API_DECNET_dnet_getacc}
+ WS2API_DECNET_dnet_getalias = 4;
+ {$EXTERNALSYM WS2API_DECNET_dnet_getalias}
+ WS2API_DECNET_dnet_htoa = 5;
+ {$EXTERNALSYM WS2API_DECNET_dnet_htoa}
+ WS2API_DECNET_dnet_ntoa = 6;
+ {$EXTERNALSYM WS2API_DECNET_dnet_ntoa}
+ WS2API_DECNET_getnodeadd = 7;
+ {$EXTERNALSYM WS2API_DECNET_getnodeadd}
+ WS2API_DECNET_getnodebyaddr = 8;
+ {$EXTERNALSYM WS2API_DECNET_getnodebyaddr}
+ WS2API_DECNET_getnodebyname = 9;
+ {$EXTERNALSYM WS2API_DECNET_getnodebyname}
+ WS2API_DECNET_getnodename = 10;
+ {$EXTERNALSYM WS2API_DECNET_getnodename}
+ WS2API_DECNET_MAX = 10;
+ {$EXTERNALSYM WS2API_DECNET_MAX}
+
+//
+// DECnet address structure
+//
+
+type
+ dn_naddr = packed record
+ a_len: Word; // length of address
+ a_addr: array [0..DN_MAXADDL - 1] of Byte; // address as bytes
+ end;
+ {$EXTERNALSYM dn_naddr}
+ DNNADDR = dn_naddr;
+ {$EXTERNALSYM DNNADDR}
+ LPDNNADDR = ^DNNADDR;
+ {$EXTERNALSYM LPDNNADDR}
+ TDNNAddr = DNNADDR;
+ PDNNAddr = LPDNNADDR;
+
+//
+// DECnet socket address structure
+//
+
+ sockaddr_dn = packed record
+ sdn_family: Word; // AF_DECnet
+ sdn_flags: Byte; // flags
+ sdn_objnum: Byte; // object number
+ sdn_objnamel: Word; // size of object name
+ sdn_objname: array [0..DN_MAXOBJL - 1] of Char; // object name
+ sdn_add: dn_naddr; // node address
+ end;
+ {$EXTERNALSYM sockaddr_dn}
+ SOCKADDRDN = sockaddr_dn;
+ {$EXTERNALSYM SOCKADDRDN}
+ LPSOCKADDRDN = ^SOCKADDRDN;
+ {$EXTERNALSYM LPSOCKADDRDN}
+ TSockAddrDN = SOCKADDRDN;
+ PSockAddrDN = LPSOCKADDRDN;
+
+// Common DECnet object numbers (used in sockaddr_dn)
+
+const
+ DNOBJECT_FAL = 17; // = file access listener;
+ {$EXTERNALSYM DNOBJECT_FAL}
+ DNOBJECT_NICE = 19; // = network management;
+ {$EXTERNALSYM DNOBJECT_NICE}
+ DNOBJECT_DTERM = 23; // = remote terminals;
+ {$EXTERNALSYM DNOBJECT_DTERM}
+ DNOBJECT_MIRROR = 25; // = loopback mirror;
+ {$EXTERNALSYM DNOBJECT_MIRROR}
+ DNOBJECT_EVR = 26; // = event receiver;
+ {$EXTERNALSYM DNOBJECT_EVR}
+ DNOBJECT_MAIL11 = 27; // = Mail-11 service;
+ {$EXTERNALSYM DNOBJECT_MAIL11}
+ DNOBJECT_PHONE = 29; // = phone utility;
+ {$EXTERNALSYM DNOBJECT_PHONE}
+ DNOBJECT_CTERM = 42; // = command terminals;
+ {$EXTERNALSYM DNOBJECT_CTERM}
+ DNOBJECT_DTR = 63; // = data test receiver;
+ {$EXTERNALSYM DNOBJECT_DTR}
+
+//
+// DECnet node structure
+//
+
+type
+ nodeent_f = packed record
+ n_name: PChar; // name of node
+ n_addrtype: Word; // node address type
+ n_length: Word; // address length
+ n_addr: PChar; // address
+ n_params: PChar; // node parameters
+ n_reserved: array [0..15] of Byte; // Reserved
+ end;
+ {$EXTERNALSYM nodeent_f}
+ NODEENTF = nodeent_f;
+ {$EXTERNALSYM NODEENTF}
+ LPNODEENTF = ^NODEENTF;
+ {$EXTERNALSYM LPNODEENTF}
+ TNodeEntF = NODEENTF;
+ PNodeEntF = LPNODEENTF;
+
+//
+// DECnet set/get DSO_CONDATA, DSO_DISDATA (optional data) structure
+//
+
+ optdata_dn = packed record
+ opt_status: Word; // extended status return
+ opt_optl: Word; // user data length
+ opt_data: array [0..DN_MAXOPTL - 1] of Byte; // user data
+ end;
+ {$EXTERNALSYM optdata_dn}
+ OPTDATADN = optdata_dn;
+ {$EXTERNALSYM OPTDATADN}
+ LPOPTDATADN = ^OPTDATADN;
+ {$EXTERNALSYM LPOPTDATADN}
+ TOptDataDN = OPTDATADN;
+ POptDataDN = LPOPTDATADN;
+
+//
+// DECnet set/get DSO_CONACCESS access (control data) structure
+//
+
+ accessdata_dn = packed record
+ acc_accl: Word; // account string length
+ acc_acc: array [0..DN_MAXACCL] of Byte; // account string
+ acc_passl: Word; // password string length
+ acc_pass: array [0..DN_MAXACCL] of Byte; // password string
+ acc_userl: Word; // user string length
+ acc_user: array [0..DN_MAXACCL] of Byte; // user string
+ end;
+ {$EXTERNALSYM accessdata_dn}
+ ACCESSDATADN = accessdata_dn;
+ {$EXTERNALSYM ACCESSDATADN}
+ LPACCESSDATADN = ^ACCESSDATADN;
+ {$EXTERNALSYM LPACCESSDATADN}
+ TAccessDataDN = ACCESSDATADN;
+ PAccessDataDN = LPACCESSDATADN;
+
+//
+// DECnet call data structure (concatenated access and optional data)
+//
+
+ calldata_dn = packed record
+ optdata_dn: optdata_dn;
+ accessdata_dn: accessdata_dn;
+ end;
+ {$EXTERNALSYM calldata_dn}
+ CALLDATADN = calldata_dn;
+ {$EXTERNALSYM CALLDATADN}
+ LPCALLDATADN = ^CALLDATADN;
+ {$EXTERNALSYM LPCALLDATADN}
+ TCallDataDN = CALLDATADN;
+ PCallDataDN = LPCALLDATADN;
+
+//
+// DECnet incoming access control structure
+//
+
+ dnet_accent = packed record
+ dac_status: Byte; // Reserved
+ dac_type: Byte; // DN_NONE, etc.
+ dac_username: array [0..DN_MAXACCL] of Char;
+ dac_password: array [0..DN_MAXACCL] of Char;
+ end;
+ {$EXTERNALSYM dnet_accent}
+ DNETACCENT = dnet_accent;
+ {$EXTERNALSYM DNETACCENT}
+ LPDNETACCENT = ^DNETACCENT;
+ {$EXTERNALSYM LPDNETACCENT}
+ TDNetAccent = DNETACCENT;
+ PDNetAccent = LPDNETACCENT;
+
+const
+ DN_NONE = $00;
+ {$EXTERNALSYM DN_NONE}
+ DN_RO = $01;
+ {$EXTERNALSYM DN_RO}
+ DN_WO = $02;
+ {$EXTERNALSYM DN_WO}
+ DN_RW = $03;
+ {$EXTERNALSYM DN_RW}
+
+// DECnet logical link information structure
+
+type
+ linkinfo_dn = packed record
+ idn_segsize: Word; // segment size for link
+ idn_linkstate: Byte; // logical link state
+ end;
+ {$EXTERNALSYM linkinfo_dn}
+ LINKINFODN = linkinfo_dn;
+ {$EXTERNALSYM LINKINFODN}
+ LPLINKINFODN = ^LINKINFODN;
+ {$EXTERNALSYM LPLINKINFODN}
+ TLinkInfoDN = LINKINFODN;
+ PLinkInfoDN = LPLINKINFODN;
+
+const
+ SO_LINKINFO = 7; // set/get link information
+ {$EXTERNALSYM SO_LINKINFO}
+ LL_INACTIVE = 0; // logical link inactive
+ {$EXTERNALSYM LL_INACTIVE}
+ LL_CONNECTING = 1; // logical link connecting
+ {$EXTERNALSYM LL_CONNECTING}
+ LL_RUNNING = 2; // logical link running
+ {$EXTERNALSYM LL_RUNNING}
+ LL_DISCONNECTING = 3; // logical link disconnecting
+ {$EXTERNALSYM LL_DISCONNECTING}
+
+//*********************************************************************
+// DECnet WinSock 2 extended function prototypes
+//*********************************************************************
+
+(*
+MVB TODO: Extension functions must be dynamically queried for using WSAIoctl.
+
+function dnet_addr(cp: PChar): PDNAddr; stdcall;
+{$EXTERNALSYM dnet_addr}
+function dnet_eof(s: SOCKET): Integer; stdcall;
+{$EXTERNALSYM dnet_eof}
+function dnet_getacc(const nacc: TDNetAccent): PDNetAccent; stdcall;
+{$EXTERNALSYM dnet_getacc}
+function dnet_getalias(P: PChar): PChar; stdcall;
+{$EXTERNALSYM dnet_getalias}
+function dnet_htoa(const add: TDNNAddr): PChar; stdcall;
+{$EXTERNALSYM dnet_htoa}
+function dnet_ntoa(const add: TDNNAddr): PChar; stdcall;
+{$EXTERNALSYM dnet_ntoa}
+function getnodeadd: PDNNAddr; stdcall;
+{$EXTERNALSYM getnodeadd}
+function getnodebyaddr(addr: PChar; len, type_: Integer): PNodeEntF; stdcall;
+{$EXTERNALSYM getnodebyaddr}
+function getnodebyname(name: PChar): PNodeEntF; stdcall;
+{$EXTERNALSYM getnodebyname}
+function getnodename: PChar; stdcall;
+{$EXTERNALSYM getnodename}
+*)
+
+// typedefs for C++ compatability
+
+type
+ LPDNETADDR = function(cp: PChar): PDNNAddr; stdcall;
+ {$EXTERNALSYM LPDNETADDR}
+ TDNetAddr = LPDNETADDR;
+ LPDNETEOF = function(s: TSocket): Integer; stdcall;
+ {$EXTERNALSYM LPDNETEOF}
+ TDNetEOF = LPDNETEOF;
+ LPDNETGETACC = function(const nacc: TDNetAccent): PDNetAccent; stdcall;
+ {$EXTERNALSYM LPDNETGETACC}
+ TDNetGetAcc = LPDNETGETACC;
+ LPDNETGETALIAS = function(P: PChar): PChar; stdcall;
+ {$EXTERNALSYM LPDNETGETALIAS}
+ TDNetGetAlias = LPDNETGETALIAS;
+ LPDNETHTOA = function(const add: TDNNAddr): PChar; stdcall;
+ {$EXTERNALSYM LPDNETHTOA}
+ TDNetHToA = LPDNETHTOA;
+ LPDNETNTOA = function(const add: TDNNAddr): PChar; stdcall;
+ {$EXTERNALSYM LPDNETNTOA}
+ TDNetNToA = LPDNETNTOA;
+ LPGETNODEADD = function: PDNNAddr; stdcall;
+ {$EXTERNALSYM LPGETNODEADD}
+ TGetNodeAdd = LPGETNODEADD;
+ LPGETNODEBYADDR = function(addr: PChar; len, type_: Integer): PNodeEntF; stdcall;
+ {$EXTERNALSYM LPGETNODEBYADDR}
+ TGetNodeByAddr = LPGETNODEBYADDR;
+ LPGETNODEBYNAME = function(name: PChar): PNodeEntF; stdcall;
+ {$EXTERNALSYM LPGETNODEBYNAME}
+ TGetNodeByName = LPGETNODEBYNAME;
+ LPGETNODENAME = function: PChar; stdcall;
+ {$EXTERNALSYM LPGETNODENAME}
+ TGetNodeName = LPGETNODENAME;
+
+implementation
+
+end.
diff --git a/packages/extra/winunits/jwaws2spi.pas b/packages/extra/winunits/jwaws2spi.pas
index ac28b63768..8e8feb6cb3 100644
--- a/packages/extra/winunits/jwaws2spi.pas
+++ b/packages/extra/winunits/jwaws2spi.pas
@@ -1,1095 +1,1095 @@
-{******************************************************************************}
-{ }
-{ Winsock2 Service Provider API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: ws2spi.h, released June 2000. The original Pascal }
-{ code is: WS2spi.pas, released December 2000. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwaws2spi.pas,v 1.1 2005/04/04 07:56:11 marco Exp $
-
-unit JwaWS2spi;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "ws2spi.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaWinType, JwaWinSock2;
-
-(*
- * Ensure structures are packed consistently.
- *)
-
-{$IFDEF _WIN64}
-{$ALIGN OFF}
-{$ELSE}
-{$ALIGN ON}
-{$ENDIF _WIN64}
-
-const
- WSPDESCRIPTION_LEN = 255;
- {$EXTERNALSYM WSPDESCRIPTION_LEN}
-
- WSS_OPERATION_IN_PROGRESS = $00000103;
- {$EXTERNALSYM WSS_OPERATION_IN_PROGRESS}
-
-type
- WSPData = record
- wVersion: WORD;
- wHighVersion: WORD;
- szDescription: array [0..WSPDESCRIPTION_LEN] of WCHAR;
- end;
- {$EXTERNALSYM WSPData}
- LPWSPDATA = ^WSPData;
- {$EXTERNALSYM LPWSPDATA}
- TWSPData = WSPDATA;
- PWSPData = LPWSPDATA;
-
- _WSATHREADID = record
- ThreadHandle: HANDLE;
- Reserved: DWORD;
- end;
- {$EXTERNALSYM _WSATHREADID}
- WSATHREADID = _WSATHREADID;
- {$EXTERNALSYM WSATHREADID}
- LPWSATHREADID = ^WSATHREADID;
- {$EXTERNALSYM LPWSATHREADID}
- TWSAThreadID = WSATHREADID;
- PWSAThreadID = LPWSATHREADID;
-
-(*
- * Pointer to a blocking callback. A pointer to a blocking callback is
- * returned from the WPUQueryBlockingCallback() upcall. Note that this
- * function's signature is not identical to an application's blocking
- * hook function.
- *)
-
-type
- LPBLOCKINGCALLBACK = function(dwContext: DWORD): BOOL; stdcall;
- {$EXTERNALSYM LPBLOCKINGCALLBACK}
- TBlockingCallback = LPBLOCKINGCALLBACK;
-
-(*
- * Pointer to a user APC function. This is used as a parameter to the
- * WPUQueueUserApc() upcall. Note that this function's signature is not
- * identical to an application's completion routine.
- *)
-
- LPWSAUSERAPC = procedure(dwContext: DWORD); stdcall;
- {$EXTERNALSYM LPWSAUSERAPC}
- TWsaUserApc = LPWSAUSERAPC;
-
-(*
- * Pointers to the individual entries in a service provider's proc table.
- *)
-
- LPWSPACCEPT = function(s: TSocket; addr: PSockAddr; addrlen: PINT;
- lpfnCondition: LPCONDITIONPROC; dwCallbackData: DWORD; var Errno: Integer): TSocket; stdcall;
- {$EXTERNALSYM LPWSPACCEPT}
- TWspAccept = LPWSPACCEPT;
-
- LPWSPADDRESSTOSTRING = function(lpsaAddress: LPSOCKADDR; dwAddressLength: DWORD;
- lpProtocolInfo: LPWSAPROTOCOL_INFOW; lpszAddressString: LPWSTR;
- var lpdwAddressStringLength: DWORD; var lpErrno: Integer): Integer; stdcall;
- {$EXTERNALSYM LPWSPADDRESSTOSTRING}
- TWspAddressToString = LPWSPADDRESSTOSTRING;
-
- LPWSPASYNCSELECT = function(s: TSocket; hWnd: HWND; wMsg: u_int; lEvent: Longint; var lpErrno: Integer): Integer; stdcall;
- {$EXTERNALSYM LPWSPASYNCSELECT}
- TWspASyncSelect = LPWSPASYNCSELECT;
-
- LPWSPBIND = function(s: TSocket; var name: sockaddr; namelen: Integer; var lpErrno: Integer): Integer; stdcall;
- {$EXTERNALSYM LPWSPBIND}
- TWspBind = LPWSPBIND;
-
- LPWSPCANCELBLOCKINGCALL = function(var lpErrno: Integer): Integer; stdcall;
- {$EXTERNALSYM LPWSPCANCELBLOCKINGCALL}
- TWspCancelBlockingCall = LPWSPCANCELBLOCKINGCALL;
-
- LPWSPCLEANUP = function(var lpErrno: Integer): Integer; stdcall;
- {$EXTERNALSYM LPWSPCLEANUP}
- TWspCleanup = LPWSPCLEANUP;
-
- LPWSPCLOSESOCKET = function(s: TSocket; var lpErrno: Integer): Integer; stdcall;
- {$EXTERNALSYM LPWSPCLOSESOCKET}
- TWspCloseSocket = LPWSPCLOSESOCKET;
-
- LPWSPCONNECT = function(s: TSocket; name: PSockAddr; namelen: Integer; lpCallerData: LPWSABUF;
- lpCalleeData: LPWSABUF; lpSQOS: LPQOS; lpGQOS: LPQOS; var lpErrno: Integer): Integer; stdcall;
- {$EXTERNALSYM LPWSPCONNECT}
- TWspConnect = LPWSPCONNECT;
-
- LPWSPDUPLICATESOCKET = function(s: TSocket; dwProcessId: DWORD; lpProtocolInfo: LPWSAPROTOCOL_INFOW; var lpErrno: Integer): Integer; stdcall;
- {$EXTERNALSYM LPWSPDUPLICATESOCKET}
- TWspDuplicateSocket = LPWSPDUPLICATESOCKET;
-
- LPWSPENUMNETWORKEVENTS = function(s: TSocket; hEventObject: WSAEVENT; lpNetworkEvents: LPWSANETWORKEVENTS; var lpErrno: Integer): Integer; stdcall;
- {$EXTERNALSYM LPWSPENUMNETWORKEVENTS}
- TWspEnumNetworkEvents = LPWSPENUMNETWORKEVENTS;
-
- LPWSPEVENTSELECT = function(s: TSocket; hEventObject: WSAEVENT; lNetworkEvents: Longint; var lpErrno: Integer): Integer; stdcall;
- {$EXTERNALSYM LPWSPEVENTSELECT}
- TWspEventSelect = LPWSPEVENTSELECT;
-
- LPWSPGETOVERLAPPEDRESULT = function(s: TSocket; lpOverlapped: LPWSAOVERLAPPED;
- var lpcbTransfer: DWORD; fWait: BOOL; lpdwFlags: DWORD; var lpErrno: Integer): BOOL; stdcall;
- {$EXTERNALSYM LPWSPGETOVERLAPPEDRESULT}
- TWspGetOverlappedResult = LPWSPGETOVERLAPPEDRESULT;
-
- LPWSPGETPEERNAME = function(s: TSocket; var name: sockaddr; var namelen, lpErrno: Integer): Integer; stdcall;
- {$EXTERNALSYM LPWSPGETPEERNAME}
- TWspGetPeerName = LPWSPGETPEERNAME;
-
- LPWSPGETSOCKNAME = function(s: TSocket; var name: sockaddr; var namelen, lpErrno: Integer): Integer; stdcall;
- {$EXTERNALSYM LPWSPGETSOCKNAME}
- TWspGetSockName = LPWSPGETSOCKNAME;
-
- LPWSPGETSOCKOPT = function(s: TSocket; level, optname: Integer; optval: PChar; var optlen, lpErrno: Integer): Integer; stdcall;
- {$EXTERNALSYM LPWSPGETSOCKOPT}
- TWspGetSockOpt = LPWSPGETSOCKOPT;
-
- LPWSPGETQOSBYNAME = function(s: TSocket; var lpQOSName: WSABUF; lpQOS: LPQOS; lpErrno: Integer): BOOL; stdcall;
- {$EXTERNALSYM LPWSPGETQOSBYNAME}
- TWspGetQosByName = LPWSPGETQOSBYNAME;
-
- LPWSPIOCTL = function(s: TSocket; dwIoControlCode: DWORD; lpvInBuffer: LPVOID; cbInBuffer: DWORD;
- lpvOutBuffer: LPVOID; cbOutBuffer: DWORD; var lpcbBytesReturned: DWORD;
- lpOverlapped: LPWSAOVERLAPPED; lpCompletionRoutine: LPWSAOVERLAPPED_COMPLETION_ROUTINE;
- lpThreadId: LPWSATHREADID; var lpErrno: Integer): Integer; stdcall;
- {$EXTERNALSYM LPWSPIOCTL}
- TWspIoctl = LPWSPIOCTL;
-
- LPWSPJOINLEAF = function(s: TSocket; name: sockaddr; namelen: Integer; lpCallerData: LPWSABUF;
- lpCalleeData: LPWSABUF; lpSQOS, lpGQOS: LPQOS; dwFlags: DWORD; var lpErrno: Integer): TSocket; stdcall;
- {$EXTERNALSYM LPWSPJOINLEAF}
- TWspJoinLeaf = LPWSPJOINLEAF;
-
- LPWSPLISTEN = function(s: TSocket; backlog: Integer; var lpErrno: Integer): Integer; stdcall;
- {$EXTERNALSYM LPWSPLISTEN}
- TWspListen = LPWSPLISTEN;
-
- LPWSPRECV = function(s: TSocket; lpBuffers: LPWSABUF; dwBufferCount: DWORD;
- var lpNumberOfBytesRecvd, lpFlags: DWORD; lpOverlapped: LPWSAOVERLAPPED;
- lpCompletionRoutine: LPWSAOVERLAPPED_COMPLETION_ROUTINE; lpThreadId: LPWSATHREADID;
- var lpErrno: Integer): Integer; stdcall;
- {$EXTERNALSYM LPWSPRECV}
- TWspRecv = LPWSPRECV;
-
- LPWSPRECVDISCONNECT = function(s: TSocket; lpInboundDisconnectData: LPWSABUF; var lpErrno: Integer): Integer; stdcall;
- {$EXTERNALSYM LPWSPRECVDISCONNECT}
- TWspRecvDisconnect = LPWSPRECVDISCONNECT;
-
- LPWSPRECVFROM = function(s: TSocket; lpBuffers: LPWSABUF; dwBufferCount: DWORD;
- var lpNumberOfBytesRecvd, lpFlags: DWORD; lpFrom: PSockAddr; lpFromlen: PINT;
- lpOverlapped: LPWSAOVERLAPPED; lpCompletionRoutine: LPWSAOVERLAPPED_COMPLETION_ROUTINE;
- lpThreadId: LPWSATHREADID; var lpErrno: Integer): Integer; stdcall;
- {$EXTERNALSYM LPWSPRECVFROM}
- TWspRecvFrom = LPWSPRECVFROM;
-
- LPWSPSELECT = function(nfds: Integer; readfds, writefds, exceptfds: PFdSet; timeout: PTimeVal; var lpErrno: Integer): Integer; stdcall;
- {$EXTERNALSYM LPWSPSELECT}
- TWspSelect = LPWSPSELECT;
-
- LPWSPSEND = function(s: TSocket; lpBuffers: LPWSABUF; dwBufferCount: DWORD;
- var lpNumberOfBytesSent: DWORD; dwFlags: DWORD; lpOverlapped: LPWSAOVERLAPPED;
- lpCompletionRoutine: LPWSAOVERLAPPED_COMPLETION_ROUTINE;
- lpThreadId: LPWSATHREADID; var lpErrno: Integer): Integer; stdcall;
- {$EXTERNALSYM LPWSPSEND}
- TWspSend = LPWSPSEND;
-
- LPWSPSENDDISCONNECT = function(s: TSocket; lpOutboundDisconnectData: LPWSABUF; var lpErrno: Integer): Integer; stdcall;
- {$EXTERNALSYM LPWSPSENDDISCONNECT}
- TWspSendDisconnect = LPWSPSENDDISCONNECT;
-
- LPWSPSENDTO = function(s: TSocket; lpBuffers: LPWSABUF; dwBufferCount: DWORD;
- var lpNumberOfBytesSent: DWORD; dwFlags: DWORD; lpTo: PSockAddr; iTolen: Integer;
- lpOverlapped: LPWSAOVERLAPPED; lpCompletionRoutine: LPWSAOVERLAPPED_COMPLETION_ROUTINE;
- lpThreadId: LPWSATHREADID; var lpErrno: Integer): Integer; stdcall;
- {$EXTERNALSYM LPWSPSENDTO}
- TWspSendTo = LPWSPSENDTO;
-
- LPWSPSETSOCKOPT = function(s: TSocket; level, optname: Integer; optval: PChar; optlen: Integer; var lpErrno: Integer): Integer; stdcall;
- {$EXTERNALSYM LPWSPSETSOCKOPT}
- TWspSetSockOpt = LPWSPSETSOCKOPT;
-
- LPWSPSHUTDOWN = function(s: TSocket; how: Integer; var lpErrno: Integer): Integer; stdcall;
- {$EXTERNALSYM LPWSPSHUTDOWN}
- TWspShutdown = LPWSPSHUTDOWN;
-
- LPWSPSOCKET = function(af, type_, protocol: Integer; lpProtocolInfo: LPWSAPROTOCOL_INFOW;
- g: GROUP; dwFlags: DWORD; var lpErrno: Integer): TSocket; stdcall;
- {$EXTERNALSYM LPWSPSOCKET}
- TWspSocket = LPWSPSOCKET;
-
- LPWSPSTRINGTOADDRESS = function(AddressString: LPWSTR; AddressFamily: Integer;
- lpProtocolInfo: LPWSAPROTOCOL_INFOW; lpAddress: LPSOCKADDR;
- var lpAddressLength, lpErrno: Integer): Integer; stdcall;
- {$EXTERNALSYM LPWSPSTRINGTOADDRESS}
- TWspStringToAddress = LPWSPSTRINGTOADDRESS;
-
-(*
- * A service provider proc table. This structure is returned by value
- * from the service provider's WSPStartup() entrypoint.
- *)
-
-type
- _WSPPROC_TABLE = record
- lpWSPAccept: LPWSPACCEPT;
- lpWSPAddressToString: LPWSPADDRESSTOSTRING;
- lpWSPAsyncSelect: LPWSPASYNCSELECT;
- lpWSPBind: LPWSPBIND;
- lpWSPCancelBlockingCall: LPWSPCANCELBLOCKINGCALL;
- lpWSPCleanup: LPWSPCLEANUP;
- lpWSPCloseSocket: LPWSPCLOSESOCKET;
- lpWSPConnect: LPWSPCONNECT;
- lpWSPDuplicateSocket: LPWSPDUPLICATESOCKET;
- lpWSPEnumNetworkEvents: LPWSPENUMNETWORKEVENTS;
- lpWSPEventSelect: LPWSPEVENTSELECT;
- lpWSPGetOverlappedResult: LPWSPGETOVERLAPPEDRESULT;
- lpWSPGetPeerName: LPWSPGETPEERNAME;
- lpWSPGetSockName: LPWSPGETSOCKNAME;
- lpWSPGetSockOpt: LPWSPGETSOCKOPT;
- lpWSPGetQOSByName: LPWSPGETQOSBYNAME;
- lpWSPIoctl: LPWSPIOCTL;
- lpWSPJoinLeaf: LPWSPJOINLEAF;
- lpWSPListen: LPWSPLISTEN;
- lpWSPRecv: LPWSPRECV;
- lpWSPRecvDisconnect: LPWSPRECVDISCONNECT;
- lpWSPRecvFrom: LPWSPRECVFROM;
- lpWSPSelect: LPWSPSELECT;
- lpWSPSend: LPWSPSEND;
- lpWSPSendDisconnect: LPWSPSENDDISCONNECT;
- lpWSPSendTo: LPWSPSENDTO;
- lpWSPSetSockOpt: LPWSPSETSOCKOPT;
- lpWSPShutdown: LPWSPSHUTDOWN;
- lpWSPSocket: LPWSPSOCKET;
- lpWSPStringToAddress: LPWSPSTRINGTOADDRESS;
- end;
- {$EXTERNALSYM _WSPPROC_TABLE}
- WSPPROC_TABLE = _WSPPROC_TABLE;
- {$EXTERNALSYM WSPPROC_TABLE}
- LPWSPPROC_TABLE = ^WSPPROC_TABLE;
- {$EXTERNALSYM LPWSPPROC_TABLE}
- TWspProcTable = WSPPROC_TABLE;
- PWspProcTable = LPWSPPROC_TABLE;
-
-(*
- * Pointers to the individual entries in the upcall table.
- *)
-
-type
- LPWPUCLOSEEVENT = function(hEvent: WSAEVENT; var lpErrno: Integer): BOOL; stdcall;
- {$EXTERNALSYM LPWPUCLOSEEVENT}
- TWpuCloseEvent = LPWPUCLOSEEVENT;
-
- LPWPUCLOSESOCKETHANDLE = function(s: TSocket; var lpErrno: Integer): Integer; stdcall;
- {$EXTERNALSYM LPWPUCLOSESOCKETHANDLE}
- TWpuCloseSocketHandle = LPWPUCLOSESOCKETHANDLE;
-
- LPWPUCREATEEVENT = function(var lpErrno: Integer): WSAEVENT; stdcall;
- {$EXTERNALSYM LPWPUCREATEEVENT}
- TWpuCreateEvent = LPWPUCREATEEVENT;
-
- LPWPUCREATESOCKETHANDLE = function(dwCatalogEntryId, dwContext: DWORD;
- var lpErrno: Integer): TSocket; stdcall;
- {$EXTERNALSYM LPWPUCREATESOCKETHANDLE}
- TWpuCreateSocketHandle = LPWPUCREATESOCKETHANDLE;
-
- LPWPUFDISSET = function(s: TSocket; fdset: PFdSet): Integer; stdcall;
- {$EXTERNALSYM LPWPUFDISSET}
- TWpuFdIsSet = LPWPUFDISSET;
-
- LPWPUGETPROVIDERPATH = function(const lpProviderId: TGUID;
- lpszProviderDllPath: PWCHAR; var lpProviderDllPathLen, lpErrno: Integer): Integer; stdcall;
- {$EXTERNALSYM LPWPUGETPROVIDERPATH}
- TWpuGetProviderPath = LPWPUGETPROVIDERPATH;
-
- LPWPUMODIFYIFSHANDLE = function(dwCatalogEntryId: DWORD; ProposedHandle: TSocket;
- var lpErrno: Integer): TSocket; stdcall;
- {$EXTERNALSYM LPWPUMODIFYIFSHANDLE}
- TWpuMoifyIfsHandle = LPWPUMODIFYIFSHANDLE;
-
- LPWPUPOSTMESSAGE = function(hWnd: HWND; Msg: UINT; wParam: WPARAM; lParam: LPARAM): BOOL; stdcall;
- {$EXTERNALSYM LPWPUPOSTMESSAGE}
- TWpuPostMessage = LPWPUPOSTMESSAGE;
-
- LPWPUQUERYBLOCKINGCALLBACK = function(dwCatalogEntryId: DWORD; var lplpfnCallback: LPBLOCKINGCALLBACK;
- lpdwContext: LPDWORD; var lpErrno: Integer): Integer; stdcall;
- {$EXTERNALSYM LPWPUQUERYBLOCKINGCALLBACK}
- TWpuQueryBlockingCallback = LPWPUQUERYBLOCKINGCALLBACK;
-
- LPWPUQUERYSOCKETHANDLECONTEXT = function(s: TSocket; lpContext: LPDWORD;
- var lpErrno: Integer): Integer; stdcall;
- {$EXTERNALSYM LPWPUQUERYSOCKETHANDLECONTEXT}
- TWpuQuerySocketHandleContext = LPWPUQUERYSOCKETHANDLECONTEXT;
-
- LPWPUQUEUEAPC = function(lpThreadId: LPWSATHREADID; lpfnUserApc: LPWSAUSERAPC;
- dwContext: DWORD; var lpErrno: Integer): Integer; stdcall;
- {$EXTERNALSYM LPWPUQUEUEAPC}
- TWpuQueueApc = LPWPUQUEUEAPC;
-
- LPWPURESETEVENT = function(hEvent: WSAEVENT; var lpErrno: Integer): BOOL; stdcall;
- {$EXTERNALSYM LPWPURESETEVENT}
- TWpuResetEvent = LPWPURESETEVENT;
-
- LPWPUSETEVENT = function(hEvent: WSAEVENT; var lpErrno: Integer): BOOL; stdcall;
- {$EXTERNALSYM LPWPUSETEVENT}
- TWpuSetEvent = LPWPUSETEVENT;
-
- LPWPUOPENCURRENTTHREAD = function(lpThreadId: LPWSATHREADID; var lpErrno: Integer): Integer; stdcall;
- {$EXTERNALSYM LPWPUOPENCURRENTTHREAD}
- TWpuOpenCurrentThread = LPWPUOPENCURRENTTHREAD;
-
- LPWPUCLOSETHREAD = function(lpThreadId: LPWSATHREADID; var lpErrno: Integer): Integer; stdcall;
- {$EXTERNALSYM LPWPUCLOSETHREAD}
- TWpuCloseThread = LPWPUCLOSETHREAD;
-
-// Available only directly from ws2_32.dll
-
- LPWPUCOMPLETEOVERLAPPEDREQUEST = function(s: TSocket; lpOverlapped: LPWSAOVERLAPPED;
- dwError: DWORD; cbTransferred: DWORD; var lpErrno: Integer): Integer; stdcall;
- {$EXTERNALSYM LPWPUCOMPLETEOVERLAPPEDREQUEST}
- TWpuCompleteOverlappedRequest = LPWPUCOMPLETEOVERLAPPEDREQUEST;
-
-(*
- * The upcall table. This structure is passed by value to the service
- * provider's WSPStartup() entrypoint.
- *)
-
- _WSPUPCALLTABLE = record
- lpWPUCloseEvent: LPWPUCLOSEEVENT;
- lpWPUCloseSocketHandle: LPWPUCLOSESOCKETHANDLE;
- lpWPUCreateEvent: LPWPUCREATEEVENT;
- lpWPUCreateSocketHandle: LPWPUCREATESOCKETHANDLE;
- lpWPUFDIsSet: LPWPUFDISSET;
- lpWPUGetProviderPath: LPWPUGETPROVIDERPATH;
- lpWPUModifyIFSHandle: LPWPUMODIFYIFSHANDLE;
- lpWPUPostMessage: LPWPUPOSTMESSAGE;
- lpWPUQueryBlockingCallback: LPWPUQUERYBLOCKINGCALLBACK;
- lpWPUQuerySocketHandleContext: LPWPUQUERYSOCKETHANDLECONTEXT;
- lpWPUQueueApc: LPWPUQUEUEAPC;
- lpWPUResetEvent: LPWPURESETEVENT;
- lpWPUSetEvent: LPWPUSETEVENT;
- lpWPUOpenCurrentThread: LPWPUOPENCURRENTTHREAD;
- lpWPUCloseThread: LPWPUCLOSETHREAD;
- end;
- {$EXTERNALSYM _WSPUPCALLTABLE}
- WSPUPCALLTABLE = _WSPUPCALLTABLE;
- {$EXTERNALSYM WSPUPCALLTABLE}
- LPWSPUPCALLTABLE = ^WSPUPCALLTABLE;
- {$EXTERNALSYM LPWSPUPCALLTABLE}
- TWspUpCallTable = WSPUPCALLTABLE;
- PWspUpCallTable = LPWSPUPCALLTABLE;
-
-(*
- * WinSock 2 SPI socket function prototypes
- *)
-
-//function WSPStartup(wVersionRequested: WORD; lpWSPData: LPWSPDATA;
-// lpProtocolInfo: LPWSAPROTOCOL_INFOW; UpcallTable: WSPUPCALLTABLE;
-// lpProcTable: LPWSPPROC_TABLE): Integer; stdcall;
-//{$EXTERNALSYM WSPStartup}
-
-type
- LPWSPSTARTUP = function(wVersionRequested: WORD; lpWSPData: LPWSPDATA;
- lpProtocolInfo: LPWSAPROTOCOL_INFOW; UpcallTable: WSPUPCALLTABLE;
- lpProcTable: LPWSPPROC_TABLE): Integer; stdcall;
- {$EXTERNALSYM LPWSPSTARTUP}
- TWspStartUp = LPWSPSTARTUP;
-
-(*
- * Installation and configuration entrypoints.
- *)
-
-function WSCEnumProtocols(lpiProtocols: PINT; lpProtocolBuffer: LPWSAPROTOCOL_INFOW;
- var lpdwBufferLength: DWORD; var lpErrno: Integer): Integer; stdcall;
-{$EXTERNALSYM WSCEnumProtocols}
-
-type
- LPWSCENUMPROTOCOLS = function(lpiProtocols: PINT; lpProtocolBuffer: LPWSAPROTOCOL_INFOW;
- var lpdwBufferLength: DWORD; var lpErrno: Integer): Integer; stdcall;
- {$EXTERNALSYM LPWSCENUMPROTOCOLS}
- TWscEnumProtocols = LPWSCENUMPROTOCOLS;
-
-{$IFDEF _WIN64}
-
-//
-// 64-bit architectures capable of running 32-bit code have
-// separate 64-bit and 32-bit catalogs. API with '32' prefix
-// allow 32 bit catalog manipulations by 64 bit process.
-//
-
-function WSCEnumProtocols32(lpiProtocols: PINT; lpProtocolBuffer: LPWSAPROTOCOL_INFOW; lpdwBufferLength: LPDWORD; lpErrno: PINT): Integer; stdcall;
-{$EXTERNALSYM WSCEnumProtocols32}
-
-{$ENDIF _WIN64}
-
-function WSCDeinstallProvider(const lpProviderId: TGUID; var lpErrno: Integer): Integer; stdcall;
-{$EXTERNALSYM WSCDeinstallProvider}
-
-type
- LPWSCDEINSTALLPROVIDER = function(const lpProviderId: TGUID; var lpErrno: Integer): Integer; stdcall;
- {$EXTERNALSYM LPWSCDEINSTALLPROVIDER}
- TWscDeinstallProvider = LPWSCDEINSTALLPROVIDER;
-
-{$IFDEF _WIN64}
-
-function WSCDeinstallProvider32(lpProviderId: PGUID; lpErrno: PINT): Integer; stdcall;
-{$EXTERNALSYM WSCDeinstallProvider32}
-
-{$ENDIF _WIN64}
-
-function WSCInstallProvider(const lpProviderId: TGUID; lpszProviderDllPath: PWCHAR;
- lpProtocolInfoList: LPWSAPROTOCOL_INFOW; dwNumberOfEntries: DWORD; var lpErrno: Integer): Integer; stdcall;
-{$EXTERNALSYM WSCInstallProvider}
-
-type
- LPWSCINSTALLPROVIDER = function(const lpProviderId: TGUID; lpszProviderDllPath: PWCHAR;
- lpProtocolInfoList: LPWSAPROTOCOL_INFOW; dwNumberOfEntries: DWORD; var lpErrno: Integer): Integer; stdcall;
- {$EXTERNALSYM LPWSCINSTALLPROVIDER}
- TWscInstallProvider = LPWSCINSTALLPROVIDER;
-
-{$IFDEF _WIN64}
-
-//
-// This API manipulates 64-bit and 32-bit catalogs simulteneously.
-// It is needed to guarantee the same catalog IDs for provider catalog
-// entries in both 64-bit and 32-bit catalogs.
-//
-
-function WSCInstallProvider64_32(lpProviderId: PGUID; lpszProviderDllPath: PWCHAR; lpProtocolInfoList: LPWSAPROTOCOL_INFOW;
- dwNumberOfEntries: DWORD; lpErrno: PINT): Integer; stdcall;
-{$EXTERNALSYM WSCInstallProvider64_32}
-
-{$ENDIF _WIN64}
-
-function WSCGetProviderPath(const lpProviderId: TGUID; lpszProviderDllPath: PWCHAR;
- var lpProviderDllPathLen, lpErrno: Integer): Integer; stdcall;
-{$EXTERNALSYM WSCGetProviderPath}
-
-type
- LPWSCGETPROVIDERPATH = function(const lpProviderId: TGUID; lpszProviderDllPath: PWCHAR;
- var lpProviderDllPathLen, lpErrno: Integer): Integer; stdcall;
- {$EXTERNALSYM LPWSCGETPROVIDERPATH}
- TWscGetProviderPath = LPWSCGETPROVIDERPATH;
-
-{$IFDEF _WIN64}
-
-function WSCGetProviderPath32(lpProviderId: PGUID; lpszProviderDllPath: PWCHAR; lpProviderDllPathLen: PINT; lpErrno: PINT): Integer; stdcall;
-{$EXTERNALSYM WSCGetProviderPath32}
-
-{$ENDIF _WIN64}
-
-function WSCUpdateProvider(lpProviderId: PGUID; lpszProviderDllPath: PWCHAR; lpProtocolInfoList: LPWSAPROTOCOL_INFOW;
- dwNumberOfEntries: DWORD; lpErrno: PINT): Integer; stdcall;
-{$EXTERNALSYM WSCUpdateProvider}
-
-type
- LPWSCUPDATEPROVIDER = function(lpProviderId: PGUID; lpszProviderDllPath: PWCHAR; lpProtocolInfoList: LPWSAPROTOCOL_INFOW;
- dwNumberOfEntries: DWORD; lpErrno: PINT): Integer; stdcall;
- {$EXTERNALSYM LPWSCUPDATEPROVIDER}
-
-{$IFDEF _WIN64}
-
-function WSCUpdateProvider32(lpProviderId: PGUID; lpszProviderDllPath: PWCHAR; lpProtocolInfoList: LPWSAPROTOCOL_INFOW;
- dwNumberOfEntries: DWORD; lpErrno: PINT): Integer; stdcall;
-{$EXTERNALSYM WSCUpdateProvider32}
-
-{$ENDIF _WIN64}
-
-function WSCInstallQOSTemplate(const Guid: TGUID; QosName: LPWSABUF; Qos: LPQOS): Integer; stdcall;
-{$EXTERNALSYM WSCInstallQOSTemplate}
-
-type
- LPWSCINSTALLQOSTEMPLATE = function(const Guid: TGUID; QosName: LPWSABUF; Qos: LPQOS): Integer; stdcall;
- {$EXTERNALSYM LPWSCINSTALLQOSTEMPLATE}
- TWscInstallQosTemplate = LPWSCINSTALLQOSTEMPLATE;
-
-function WSCRemoveQOSTemplate(const Guid: TGUID; QosName: LPWSABUF): Integer; stdcall;
-{$EXTERNALSYM WSCRemoveQOSTemplate}
-
-type
- LPWSCREMOVEQOSTEMPLATE = function(const Guid: TGUID; QosName: LPWSABUF): Integer; stdcall;
- {$EXTERNALSYM LPWSCREMOVEQOSTEMPLATE}
- TWscRemoveQosTemplate = LPWSCREMOVEQOSTEMPLATE;
-
-(*
- * The following upcall function prototypes are only used by WinSock 2 DLL and
- * should not be used by any service providers.
- *
-
-function WPUCloseEvent(hEvent: WSAEVENT; var lpErrno: Integer): BOOL; stdcall;
-{$EXTERNALSYM WPUCloseEvent}
-
-function WPUCloseSocketHandle(s: TSocket; var lpErrno: Integer): Integer; stdcall;
-{$EXTERNALSYM WPUCloseSocketHandle}
-
-function WPUCreateEvent(var lpErrno: Integer): WSAEVENT; stdcall;
-{$EXTERNALSYM WPUCreateEvent}
-
-function WPUCreateSocketHandle(dwCatalogEntryId, dwContext: DWORD; var lpErrno: Integer): SOCKET; stdcall;
-{$EXTERNALSYM WPUCreateSocketHandle}
-
-function WPUFDIsSet(s: TSocket; const fdset: fd_set): Integer; stdcall;
-{$EXTERNALSYM WPUFDIsSet}
-
-function WPUGetProviderPath(const lpProviderId: TGUID; lpszProviderDllPath: PWCHAR;
- var lpProviderDllPathLen, lpErrno: : Integer): Integer; stdcall;
-{$EXTERNALSYM WPUGetProviderPath}
-
-function WPUModifyIFSHandle(dwCatalogEntryId: DWORD; ProposedHandle: SOCKET; var lpErrno: Integer): SOCKET; stdcall;
-{$EXTERNALSYM WPUModifyIFSHandle}
-
-function WPUPostMessage(hWnd: HWND; Msg: UINT; wParam: WPARAM; lParam: LPARAM): BOOL; stdcall;
-{$EXTERNALSYM WPUPostMessage}
-
-function WPUQueryBlockingCallback(dwCatalogEntryId: DWORD; var lplpfnCallback: LPBLOCKINGCALLBACK;
- var lpdwContext: DWORD_PTR; var lpErrno: Integer): Integer; stdcall;
-{$EXTERNALSYM WPUQueryBlockingCallback}
-
-function WPUQuerySocketHandleContext(s: SOCKET; var lpContext: DWORD_PTR; lpErrno: Integer): Integer; stdcall;
-{$EXTERNALSYM WPUQuerySocketHandleContext}
-
-function WPUQueueApc(lpThreadId: LPWSATHREADID; lpfnUserApc: LPWSAUSERAPC;
- dwContext: DWORD_PTR; var lpErrno: Integer): Integer; stdcall;
-{$EXTERNALSYM WPUQueueApc}
-
-function WPUResetEvent(hEvent: WSAEVENT; var lpErrno: Integer): BOOL; stcall;
-{$EXTERNALSYM WPUResetEvent}
-
-function WPUSetEvent(hEvent: WSAEVENT; var lpErrno: Integer): BOOL; stdcall;
-{$EXTERNALSYM WPUSetEvent}
-
-function WPUCompleteOverlappedRequest(s: SOCKET; lpOverlapped: LPWSAOVERLAPPED;
- dwError, cbTransferred: DWORD; var lpErrno: Integer): Integerl stdcall;
-{$EXTERNALSYM WPUCompleteOverlappedRequest}
-
-function WPUOpenCurrentThread(lpThreadId: LPWSATHREADID; lpErrno: PINT): Integer; stdcall;
-{$EXTERNALSYM WPUOpenCurrentThread}
-
-function WPUCloseThread(lpThreadId: LPWSATHREADID; lpErrno: PINT): Integer; stdcall;
-{$EXTERNALSYM WPUCloseThread}
-
-*)
-
-(*
- * Installing and uninstalling name space providers.
- *)
-
-//
-// SPI and API for enumerating name space providers are
-// currently equivalent since there is no concept of a hidden
-// name space provider
-//
-
-//TODO
-//#define WSCEnumNameSpaceProviders WSAEnumNameSpaceProvidersW
-//#define LPFN_WSCENUMNAMESPACEPROVIDERS LPFN_WSAENUMNAMESPACEPROVIDERSW
-
-{$IFDEF _WIN64}
-
-function WSCEnumNameSpaceProviders32(lpdwBufferLength: LPDWORD; lpnspBuffer: LPWSANAMESPACE_INFOW): Integer; stdcall;
-{$EXTERNALSYM WSCEnumNameSpaceProviders32}
-
-{$ENDIF _WIN64}
-
-function WSCInstallNameSpace(lpszIdentifier, lpszPathName: LPWSTR; dwNameSpace,
- dwVersion: DWORD; const lpProviderId: TGUID): Integer; stdcall;
-{$EXTERNALSYM WSCInstallNameSpace}
-
-type
- LPWSCINSTALLNAMESPACE = function(lpszIdentifier, lpszPathName: LPWSTR;
- dwNameSpace, dwVersion: DWORD; const lpProviderId: TGUID): Integer; stdcall;
- {$EXTERNALSYM LPWSCINSTALLNAMESPACE}
- TWscInstallNamespace = LPWSCINSTALLNAMESPACE;
-
-{$IFDEF _WIN64}
-
-function WSCInstallNameSpace32(lpszIdentifier, lpszPathName: LPWSTR; dwNameSpace, dwVersion: DWORD; lpProviderId: PGUID): Integer; stdcall;
-{$EXTERNALSYM WSCInstallNameSpace32}
-
-{$ENDIF _WIN64}
-
-function WSCUnInstallNameSpace(const lpProviderId: TGUID): Integer; stdcall;
-{$EXTERNALSYM WSCUnInstallNameSpace}
-
-type
- LPWSCUNINSTALLNAMESPACE = function(const lpProviderId: TGUID): Integer; stdcall;
- {$EXTERNALSYM LPWSCUNINSTALLNAMESPACE}
- TWscUninstallNamespace = LPWSCUNINSTALLNAMESPACE;
-
-{$IFDEF _WIN64}
-
-function WSCUnInstallNameSpace32(lpProviderId: PGUID): Integer; stdcall;
-{$EXTERNALSYM WSCUnInstallNameSpace32}
-
-{$ENDIF _WIN64}
-
-function WSCEnableNSProvider(const lpProviderId: TGUID; fEnable: BOOL): Integer; stdcall;
-{$EXTERNALSYM WSCEnableNSProvider}
-
-type
- LPWSCENABLENSPROVIDER = function(const lpProviderId: TGUID; fEnable: BOOL): Integer; stdcall;
- {$EXTERNALSYM LPWSCENABLENSPROVIDER}
- TWscEnableNsProvider = LPWSCENABLENSPROVIDER;
-
-{$IFDEF _WIN64}
-
-function WSCEnableNSProvider32(lpProviderId: PGUID; fEnable: BOOL): Integer; stdcall;
-{$EXTERNALSYM WSCEnableNSProvider32}
-
-{$ENDIF _WIN64}
-
-(*
- * Pointers to the individual entries in the namespace proc table.
- *)
-
-type
- LPNSPCLEANUP = function(const lpProviderId: TGUID): Integer; stdcall;
- {$EXTERNALSYM LPNSPCLEANUP}
- TNspCleanup = LPNSPCLEANUP;
-
- LPNSPLOOKUPSERVICEBEGIN = function(const lpProviderId: TGUID;
- lpqsRestrictions: LPWSAQUERYSETW; lpServiceClassInfo: LPWSASERVICECLASSINFOW;
- dwControlFlags: DWORD; lphLookup: LPHANDLE): Integer; stdcall;
- {$EXTERNALSYM LPNSPLOOKUPSERVICEBEGIN}
- TNspLookupServiceBegin = LPNSPLOOKUPSERVICEBEGIN;
-
- LPNSPLOOKUPSERVICENEXT = function(hLookup: HANDLE; dwControlFlags: DWORD;
- lpdwBufferLength: LPDWORD; lpqsResults: LPWSAQUERYSETW): Integer; stdcall;
- {$EXTERNALSYM LPNSPLOOKUPSERVICENEXT}
- TNspLookupServiceNext = LPNSPLOOKUPSERVICENEXT;
-
- LPNSPIOCTL = function(hLookup: HANDLE; dwControlCode: DWORD; lpvInBuffer: LPVOID;
- cbInBuffer: DWORD; lpvOutBuffer: LPVOID; cbOutBuffer: DWORD; lpcbBytesReturned: LPDWORD;
- lpCompletion: LPWSACOMPLETION; lpThreadId: LPWSATHREADID): Integer; stdcall;
- {$EXTERNALSYM LPNSPIOCTL}
-
- LPNSPLOOKUPSERVICEEND = function(hLookup: HANDLE): Integer; stdcall;
- {$EXTERNALSYM LPNSPLOOKUPSERVICEEND}
- TNspLookupServiceEnd = LPNSPLOOKUPSERVICEEND;
-
- LPNSPSETSERVICE = function(const lpProviderId: TGUID;
- lpServiceClassInfo: LPWSASERVICECLASSINFOW; lpqsRegInfo: LPWSAQUERYSETW;
- essOperation: WSAESETSERVICEOP; dwControlFlags: DWORD): Integer; stdcall;
- {$EXTERNALSYM LPNSPSETSERVICE}
- TNspSetService = LPNSPSETSERVICE;
-
- LPNSPINSTALLSERVICECLASS = function(const lpProviderId: TGUID;
- lpServiceClassInfo: LPWSASERVICECLASSINFOW): Integer; stdcall;
- {$EXTERNALSYM LPNSPINSTALLSERVICECLASS}
- TNspInstallServiceClass = LPNSPINSTALLSERVICECLASS;
-
- LPNSPREMOVESERVICECLASS = function(const lpProviderId, lpServiceClassId: TGUID): Integer; stdcall;
- {$EXTERNALSYM LPNSPREMOVESERVICECLASS}
- TNspRemoveServiceClass = LPNSPREMOVESERVICECLASS;
-
- LPNSPGETSERVICECLASSINFO = function(const lpProviderId: TGUID; lpdwBufSize: LPDWORD;
- lpServiceClassInfo: LPWSASERVICECLASSINFOW): Integer; stdcall;
- {$EXTERNALSYM LPNSPGETSERVICECLASSINFO}
- TNspGetServiceClassInfo = LPNSPGETSERVICECLASSINFO;
-
-(*
- * The name space service provider procedure table.
- *)
-
-type
- _NSP_ROUTINE = record
- (* Structure version information: *)
- cbSize: DWORD;
- dwMajorVersion: DWORD;
- dwMinorVersion: DWORD;
- (* Procedure-pointer table: *)
- NSPCleanup: LPNSPCLEANUP;
- NSPLookupServiceBegin: LPNSPLOOKUPSERVICEBEGIN;
- NSPLookupServiceNext: LPNSPLOOKUPSERVICENEXT;
- NSPLookupServiceEnd: LPNSPLOOKUPSERVICEEND;
- NSPSetService: LPNSPSETSERVICE;
- NSPInstallServiceClass: LPNSPINSTALLSERVICECLASS;
- NSPRemoveServiceClass: LPNSPREMOVESERVICECLASS;
- NSPGetServiceClassInfo: LPNSPGETSERVICECLASSINFO;
- // These APIs were added later, so must appear here
- // to keep the pointers in the structure in order.
- // Namespaces unaware of these APIs will set cbSize
- // to match the size of FIELD_OFFSET(NSP_ROUTINE, NSPIoctl).
- NSPIoctl: LPNSPIOCTL;
- end;
- {$EXTERNALSYM _NSP_ROUTINE}
- NSP_ROUTINE = _NSP_ROUTINE;
- {$EXTERNALSYM NSP_ROUTINE}
- LPNSP_ROUTINE = ^NSP_ROUTINE;
- {$EXTERNALSYM LPNSP_ROUTINE}
- TNspRoutines = NSP_ROUTINE;
- PNspRoutines = LPNSP_ROUTINE;
-
-(*
- * Startup procedures.
- *)
-
-//function NSPStartup(const lpProviderId: TGUID; lpnspRoutines: LPNSP_ROUTINE): Integer; stdcall;
-//{$EXTERNALSYM NSPStartup}
-
-type
- LPNSPSTARTUP = function(const lpProviderId: TGUID; lpnspRoutines: LPNSP_ROUTINE): Integer; stdcall;
- {$EXTERNALSYM LPNSPSTARTUP}
- TNspStartup = LPNSPSTARTUP;
-
-implementation
-
-const
- ws2_32 = 'ws2_32.dll';
- qosname = 'qosname.dll';
-
-{$IFDEF DYNAMIC_LINK}
-
-var
- _WSCEnumProtocols: Pointer;
-
-function WSCEnumProtocols;
-begin
- GetProcedureAddress(_WSCEnumProtocols, ws2_32, 'WSCEnumProtocols');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WSCEnumProtocols]
- end;
-end;
-
-{$IFDEF _WIN64}
-
-var
- _WSCEnumProtocols32: Pointer;
-
-function WSCEnumProtocols32;
-begin
- GetProcedureAddress(_WSCEnumProtocols32, ws2_32, 'WSCEnumProtocols32');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WSCEnumProtocols32]
- end;
-end;
-
-{$ENDIF _WIN64}
-
-var
- _WSCDeinstallProvider: Pointer;
-
-function WSCDeinstallProvider;
-begin
- GetProcedureAddress(_WSCDeinstallProvider, ws2_32, 'WSCDeinstallProvider');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WSCDeinstallProvider]
- end;
-end;
-
-{$IFDEF _WIN64}
-
-var
- _WSCDeinstallProvider32: Pointer;
-
-function WSCDeinstallProvider32;
-begin
- GetProcedureAddress(_WSCDeinstallProvider32, ws2_32, 'WSCDeinstallProvider32');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WSCDeinstallProvider32]
- end;
-end;
-
-{$ENDIF _WIN64}
-
-var
- _WSCInstallProvider: Pointer;
-
-function WSCInstallProvider;
-begin
- GetProcedureAddress(_WSCInstallProvider, ws2_32, 'WSCInstallProvider');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WSCInstallProvider]
- end;
-end;
-
-{$IFDEF _WIN64}
-
-var
- _WSCInstallProvider64_32: Pointer;
-
-function WSCInstallProvider64_32;
-begin
- GetProcedureAddress(_WSCInstallProvider64_32, ws2_32, 'WSCInstallProvider64_32');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WSCInstallProvider64_32]
- end;
-end;
-
-{$ENDIF _WIN64}
-
-var
- _WSCGetProviderPath: Pointer;
-
-function WSCGetProviderPath;
-begin
- GetProcedureAddress(_WSCGetProviderPath, ws2_32, 'WSCGetProviderPath');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WSCGetProviderPath]
- end;
-end;
-
-{$IFDEF _WIN64}
-
-var
- _WSCGetProviderPath32: Pointer;
-
-function WSCGetProviderPath32;
-begin
- GetProcedureAddress(_WSCGetProviderPath32, ws2_32, 'WSCGetProviderPath32');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WSCGetProviderPath32]
- end;
-end;
-
-{$ENDIF _WIN64}
-
-var
- _WSCUpdateProvider: Pointer;
-
-function WSCUpdateProvider;
-begin
- GetProcedureAddress(_WSCUpdateProvider, ws2_32, 'WSCUpdateProvider');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WSCUpdateProvider]
- end;
-end;
-
-{$IFDEF _WIN64}
-
-var
- _WSCUpdateProvider32: Pointer;
-
-function WSCUpdateProvider32;
-begin
- GetProcedureAddress(_WSCUpdateProvider32, ws2_32, 'WSCUpdateProvider32');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WSCUpdateProvider32]
- end;
-end;
-
-{$ENDIF _WIN64}
-
-var
- _WSCInstallQOSTemplate: Pointer;
-
-function WSCInstallQOSTemplate;
-begin
- GetProcedureAddress(_WSCInstallQOSTemplate, JwaWs2spi.qosname, 'WSCInstallQOSTemplate');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WSCInstallQOSTemplate]
- end;
-end;
-
-var
- _WSCRemoveQOSTemplate: Pointer;
-
-function WSCRemoveQOSTemplate;
-begin
- GetProcedureAddress(_WSCRemoveQOSTemplate, JwaWs2spi.qosname, 'WSCRemoveQOSTemplate');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WSCRemoveQOSTemplate]
- end;
-end;
-
-{$IFDEF _WIN64}
-
-var
- _WSCEnumNameSpaceProviders32: Pointer;
-
-function WSCEnumNameSpaceProviders32;
-begin
- GetProcedureAddress(_WSCEnumNameSpaceProviders32, ws2_32, 'WSCEnumNameSpaceProviders32');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WSCEnumNameSpaceProviders32]
- end;
-end;
-
-{$ENDIF _WIN64}
-
-var
- _WSCInstallNameSpace: Pointer;
-
-function WSCInstallNameSpace;
-begin
- GetProcedureAddress(_WSCInstallNameSpace, ws2_32, 'WSCInstallNameSpace');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WSCInstallNameSpace]
- end;
-end;
-
-{$IFDEF _WIN64}
-
-var
- _WSCInstallNameSpace32: Pointer;
-
-function WSCInstallNameSpace32;
-begin
- GetProcedureAddress(_WSCInstallNameSpace32, ws2_32, 'WSCInstallNameSpace32');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WSCInstallNameSpace32]
- end;
-end;
-
-{$ENDIF _WIN64}
-
-var
- _WSCUnInstallNameSpace: Pointer;
-
-function WSCUnInstallNameSpace;
-begin
- GetProcedureAddress(_WSCUnInstallNameSpace, ws2_32, 'WSCUnInstallNameSpace');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WSCUnInstallNameSpace]
- end;
-end;
-
-{$IFDEF _WIN64}
-
-var
- _WSCUnInstallNameSpace32: Pointer;
-
-function WSCUnInstallNameSpace32;
-begin
- GetProcedureAddress(_WSCUnInstallNameSpace32, ws2_32, 'WSCUnInstallNameSpace32');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WSCUnInstallNameSpace32]
- end;
-end;
-
-{$ENDIF _WIN64}
-
-var
- _WSCEnableNSProvider: Pointer;
-
-function WSCEnableNSProvider;
-begin
- GetProcedureAddress(_WSCEnableNSProvider, ws2_32, 'WSCEnableNSProvider');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WSCEnableNSProvider]
- end;
-end;
-
-{$IFDEF _WIN64}
-
-var
- _WSCEnableNSProvider32: Pointer;
-
-function WSCEnableNSProvider32;
-begin
- GetProcedureAddress(_WSCEnableNSProvider32, ws2_32, 'WSCEnableNSProvider32');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WSCEnableNSProvider32]
- end;
-end;
-
-{$ENDIF _WIN64}
-
-{$ELSE}
-
-function WSCEnumProtocols; external ws2_32 name 'WSCEnumProtocols';
-function WSCDeinstallProvider; external ws2_32 name 'WSCDeinstallProvider';
-function WSCInstallProvider; external ws2_32 name 'WSCInstallProvider';
-function WSCGetProviderPath; external ws2_32 name 'WSCGetProviderPath';
-function WSCUpdateProvider; external ws2_32 name 'WSCUpdateProvider';
-function WSCInstallQOSTemplate; external qosname name 'WSCInstallQOSTemplate';
-function WSCRemoveQOSTemplate; external qosname name 'WSCRemoveQOSTemplate';
-function WSCInstallNameSpace; external ws2_32 name 'WSCInstallNameSpace';
-function WSCUnInstallNameSpace; external ws2_32 name 'WSCUnInstallNameSpace';
-function WSCEnableNSProvider; external ws2_32 name 'WSCEnableNSProvider';
-{$IFDEF _WIN64}
-function WSCEnumProtocols32; external ws2_32 name 'WSCEnumProtocols32';
-function WSCDeinstallProvider32; external ws2_32 name 'WSCDeinstallProvider32';
-function WSCInstallProvider64_32; external ws2_32 name 'WSCInstallProvider64_32';
-function WSCGetProviderPath32; external ws2_32 name 'WSCGetProviderPath32';
-function WSCUpdateProvider32; external ws2_32 name 'WSCUpdateProvider32';
-function WSCEnumNameSpaceProviders32; external ws2_32 name 'WSCEnumNameSpaceProviders32';
-function WSCInstallNameSpace32; external ws2_32 name 'WSCInstallNameSpace32';
-function WSCUnInstallNameSpace32; external ws2_32 name 'WSCUnInstallNameSpace32';
-function WSCEnableNSProvider32; external ws2_32 name 'WSCEnableNSProvider32';
-{$ENDIF _WIN64}
-
-{$ENDIF DYNAMIC_LINK}
-
-end.
+{******************************************************************************}
+{ }
+{ Winsock2 Service Provider API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: ws2spi.h, released June 2000. The original Pascal }
+{ code is: WS2spi.pas, released December 2000. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwaws2spi.pas,v 1.1 2005/04/04 07:56:11 marco Exp $
+
+unit JwaWS2spi;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "ws2spi.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaWinType, JwaWinSock2;
+
+(*
+ * Ensure structures are packed consistently.
+ *)
+
+{$IFDEF _WIN64}
+{$ALIGN OFF}
+{$ELSE}
+{$ALIGN ON}
+{$ENDIF _WIN64}
+
+const
+ WSPDESCRIPTION_LEN = 255;
+ {$EXTERNALSYM WSPDESCRIPTION_LEN}
+
+ WSS_OPERATION_IN_PROGRESS = $00000103;
+ {$EXTERNALSYM WSS_OPERATION_IN_PROGRESS}
+
+type
+ WSPData = record
+ wVersion: WORD;
+ wHighVersion: WORD;
+ szDescription: array [0..WSPDESCRIPTION_LEN] of WCHAR;
+ end;
+ {$EXTERNALSYM WSPData}
+ LPWSPDATA = ^WSPData;
+ {$EXTERNALSYM LPWSPDATA}
+ TWSPData = WSPDATA;
+ PWSPData = LPWSPDATA;
+
+ _WSATHREADID = record
+ ThreadHandle: HANDLE;
+ Reserved: DWORD;
+ end;
+ {$EXTERNALSYM _WSATHREADID}
+ WSATHREADID = _WSATHREADID;
+ {$EXTERNALSYM WSATHREADID}
+ LPWSATHREADID = ^WSATHREADID;
+ {$EXTERNALSYM LPWSATHREADID}
+ TWSAThreadID = WSATHREADID;
+ PWSAThreadID = LPWSATHREADID;
+
+(*
+ * Pointer to a blocking callback. A pointer to a blocking callback is
+ * returned from the WPUQueryBlockingCallback() upcall. Note that this
+ * function's signature is not identical to an application's blocking
+ * hook function.
+ *)
+
+type
+ LPBLOCKINGCALLBACK = function(dwContext: DWORD): BOOL; stdcall;
+ {$EXTERNALSYM LPBLOCKINGCALLBACK}
+ TBlockingCallback = LPBLOCKINGCALLBACK;
+
+(*
+ * Pointer to a user APC function. This is used as a parameter to the
+ * WPUQueueUserApc() upcall. Note that this function's signature is not
+ * identical to an application's completion routine.
+ *)
+
+ LPWSAUSERAPC = procedure(dwContext: DWORD); stdcall;
+ {$EXTERNALSYM LPWSAUSERAPC}
+ TWsaUserApc = LPWSAUSERAPC;
+
+(*
+ * Pointers to the individual entries in a service provider's proc table.
+ *)
+
+ LPWSPACCEPT = function(s: TSocket; addr: PSockAddr; addrlen: PINT;
+ lpfnCondition: LPCONDITIONPROC; dwCallbackData: DWORD; var Errno: Integer): TSocket; stdcall;
+ {$EXTERNALSYM LPWSPACCEPT}
+ TWspAccept = LPWSPACCEPT;
+
+ LPWSPADDRESSTOSTRING = function(lpsaAddress: LPSOCKADDR; dwAddressLength: DWORD;
+ lpProtocolInfo: LPWSAPROTOCOL_INFOW; lpszAddressString: LPWSTR;
+ var lpdwAddressStringLength: DWORD; var lpErrno: Integer): Integer; stdcall;
+ {$EXTERNALSYM LPWSPADDRESSTOSTRING}
+ TWspAddressToString = LPWSPADDRESSTOSTRING;
+
+ LPWSPASYNCSELECT = function(s: TSocket; hWnd: HWND; wMsg: u_int; lEvent: Longint; var lpErrno: Integer): Integer; stdcall;
+ {$EXTERNALSYM LPWSPASYNCSELECT}
+ TWspASyncSelect = LPWSPASYNCSELECT;
+
+ LPWSPBIND = function(s: TSocket; var name: sockaddr; namelen: Integer; var lpErrno: Integer): Integer; stdcall;
+ {$EXTERNALSYM LPWSPBIND}
+ TWspBind = LPWSPBIND;
+
+ LPWSPCANCELBLOCKINGCALL = function(var lpErrno: Integer): Integer; stdcall;
+ {$EXTERNALSYM LPWSPCANCELBLOCKINGCALL}
+ TWspCancelBlockingCall = LPWSPCANCELBLOCKINGCALL;
+
+ LPWSPCLEANUP = function(var lpErrno: Integer): Integer; stdcall;
+ {$EXTERNALSYM LPWSPCLEANUP}
+ TWspCleanup = LPWSPCLEANUP;
+
+ LPWSPCLOSESOCKET = function(s: TSocket; var lpErrno: Integer): Integer; stdcall;
+ {$EXTERNALSYM LPWSPCLOSESOCKET}
+ TWspCloseSocket = LPWSPCLOSESOCKET;
+
+ LPWSPCONNECT = function(s: TSocket; name: PSockAddr; namelen: Integer; lpCallerData: LPWSABUF;
+ lpCalleeData: LPWSABUF; lpSQOS: LPQOS; lpGQOS: LPQOS; var lpErrno: Integer): Integer; stdcall;
+ {$EXTERNALSYM LPWSPCONNECT}
+ TWspConnect = LPWSPCONNECT;
+
+ LPWSPDUPLICATESOCKET = function(s: TSocket; dwProcessId: DWORD; lpProtocolInfo: LPWSAPROTOCOL_INFOW; var lpErrno: Integer): Integer; stdcall;
+ {$EXTERNALSYM LPWSPDUPLICATESOCKET}
+ TWspDuplicateSocket = LPWSPDUPLICATESOCKET;
+
+ LPWSPENUMNETWORKEVENTS = function(s: TSocket; hEventObject: WSAEVENT; lpNetworkEvents: LPWSANETWORKEVENTS; var lpErrno: Integer): Integer; stdcall;
+ {$EXTERNALSYM LPWSPENUMNETWORKEVENTS}
+ TWspEnumNetworkEvents = LPWSPENUMNETWORKEVENTS;
+
+ LPWSPEVENTSELECT = function(s: TSocket; hEventObject: WSAEVENT; lNetworkEvents: Longint; var lpErrno: Integer): Integer; stdcall;
+ {$EXTERNALSYM LPWSPEVENTSELECT}
+ TWspEventSelect = LPWSPEVENTSELECT;
+
+ LPWSPGETOVERLAPPEDRESULT = function(s: TSocket; lpOverlapped: LPWSAOVERLAPPED;
+ var lpcbTransfer: DWORD; fWait: BOOL; lpdwFlags: DWORD; var lpErrno: Integer): BOOL; stdcall;
+ {$EXTERNALSYM LPWSPGETOVERLAPPEDRESULT}
+ TWspGetOverlappedResult = LPWSPGETOVERLAPPEDRESULT;
+
+ LPWSPGETPEERNAME = function(s: TSocket; var name: sockaddr; var namelen, lpErrno: Integer): Integer; stdcall;
+ {$EXTERNALSYM LPWSPGETPEERNAME}
+ TWspGetPeerName = LPWSPGETPEERNAME;
+
+ LPWSPGETSOCKNAME = function(s: TSocket; var name: sockaddr; var namelen, lpErrno: Integer): Integer; stdcall;
+ {$EXTERNALSYM LPWSPGETSOCKNAME}
+ TWspGetSockName = LPWSPGETSOCKNAME;
+
+ LPWSPGETSOCKOPT = function(s: TSocket; level, optname: Integer; optval: PChar; var optlen, lpErrno: Integer): Integer; stdcall;
+ {$EXTERNALSYM LPWSPGETSOCKOPT}
+ TWspGetSockOpt = LPWSPGETSOCKOPT;
+
+ LPWSPGETQOSBYNAME = function(s: TSocket; var lpQOSName: WSABUF; lpQOS: LPQOS; lpErrno: Integer): BOOL; stdcall;
+ {$EXTERNALSYM LPWSPGETQOSBYNAME}
+ TWspGetQosByName = LPWSPGETQOSBYNAME;
+
+ LPWSPIOCTL = function(s: TSocket; dwIoControlCode: DWORD; lpvInBuffer: LPVOID; cbInBuffer: DWORD;
+ lpvOutBuffer: LPVOID; cbOutBuffer: DWORD; var lpcbBytesReturned: DWORD;
+ lpOverlapped: LPWSAOVERLAPPED; lpCompletionRoutine: LPWSAOVERLAPPED_COMPLETION_ROUTINE;
+ lpThreadId: LPWSATHREADID; var lpErrno: Integer): Integer; stdcall;
+ {$EXTERNALSYM LPWSPIOCTL}
+ TWspIoctl = LPWSPIOCTL;
+
+ LPWSPJOINLEAF = function(s: TSocket; name: sockaddr; namelen: Integer; lpCallerData: LPWSABUF;
+ lpCalleeData: LPWSABUF; lpSQOS, lpGQOS: LPQOS; dwFlags: DWORD; var lpErrno: Integer): TSocket; stdcall;
+ {$EXTERNALSYM LPWSPJOINLEAF}
+ TWspJoinLeaf = LPWSPJOINLEAF;
+
+ LPWSPLISTEN = function(s: TSocket; backlog: Integer; var lpErrno: Integer): Integer; stdcall;
+ {$EXTERNALSYM LPWSPLISTEN}
+ TWspListen = LPWSPLISTEN;
+
+ LPWSPRECV = function(s: TSocket; lpBuffers: LPWSABUF; dwBufferCount: DWORD;
+ var lpNumberOfBytesRecvd, lpFlags: DWORD; lpOverlapped: LPWSAOVERLAPPED;
+ lpCompletionRoutine: LPWSAOVERLAPPED_COMPLETION_ROUTINE; lpThreadId: LPWSATHREADID;
+ var lpErrno: Integer): Integer; stdcall;
+ {$EXTERNALSYM LPWSPRECV}
+ TWspRecv = LPWSPRECV;
+
+ LPWSPRECVDISCONNECT = function(s: TSocket; lpInboundDisconnectData: LPWSABUF; var lpErrno: Integer): Integer; stdcall;
+ {$EXTERNALSYM LPWSPRECVDISCONNECT}
+ TWspRecvDisconnect = LPWSPRECVDISCONNECT;
+
+ LPWSPRECVFROM = function(s: TSocket; lpBuffers: LPWSABUF; dwBufferCount: DWORD;
+ var lpNumberOfBytesRecvd, lpFlags: DWORD; lpFrom: PSockAddr; lpFromlen: PINT;
+ lpOverlapped: LPWSAOVERLAPPED; lpCompletionRoutine: LPWSAOVERLAPPED_COMPLETION_ROUTINE;
+ lpThreadId: LPWSATHREADID; var lpErrno: Integer): Integer; stdcall;
+ {$EXTERNALSYM LPWSPRECVFROM}
+ TWspRecvFrom = LPWSPRECVFROM;
+
+ LPWSPSELECT = function(nfds: Integer; readfds, writefds, exceptfds: PFdSet; timeout: PTimeVal; var lpErrno: Integer): Integer; stdcall;
+ {$EXTERNALSYM LPWSPSELECT}
+ TWspSelect = LPWSPSELECT;
+
+ LPWSPSEND = function(s: TSocket; lpBuffers: LPWSABUF; dwBufferCount: DWORD;
+ var lpNumberOfBytesSent: DWORD; dwFlags: DWORD; lpOverlapped: LPWSAOVERLAPPED;
+ lpCompletionRoutine: LPWSAOVERLAPPED_COMPLETION_ROUTINE;
+ lpThreadId: LPWSATHREADID; var lpErrno: Integer): Integer; stdcall;
+ {$EXTERNALSYM LPWSPSEND}
+ TWspSend = LPWSPSEND;
+
+ LPWSPSENDDISCONNECT = function(s: TSocket; lpOutboundDisconnectData: LPWSABUF; var lpErrno: Integer): Integer; stdcall;
+ {$EXTERNALSYM LPWSPSENDDISCONNECT}
+ TWspSendDisconnect = LPWSPSENDDISCONNECT;
+
+ LPWSPSENDTO = function(s: TSocket; lpBuffers: LPWSABUF; dwBufferCount: DWORD;
+ var lpNumberOfBytesSent: DWORD; dwFlags: DWORD; lpTo: PSockAddr; iTolen: Integer;
+ lpOverlapped: LPWSAOVERLAPPED; lpCompletionRoutine: LPWSAOVERLAPPED_COMPLETION_ROUTINE;
+ lpThreadId: LPWSATHREADID; var lpErrno: Integer): Integer; stdcall;
+ {$EXTERNALSYM LPWSPSENDTO}
+ TWspSendTo = LPWSPSENDTO;
+
+ LPWSPSETSOCKOPT = function(s: TSocket; level, optname: Integer; optval: PChar; optlen: Integer; var lpErrno: Integer): Integer; stdcall;
+ {$EXTERNALSYM LPWSPSETSOCKOPT}
+ TWspSetSockOpt = LPWSPSETSOCKOPT;
+
+ LPWSPSHUTDOWN = function(s: TSocket; how: Integer; var lpErrno: Integer): Integer; stdcall;
+ {$EXTERNALSYM LPWSPSHUTDOWN}
+ TWspShutdown = LPWSPSHUTDOWN;
+
+ LPWSPSOCKET = function(af, type_, protocol: Integer; lpProtocolInfo: LPWSAPROTOCOL_INFOW;
+ g: GROUP; dwFlags: DWORD; var lpErrno: Integer): TSocket; stdcall;
+ {$EXTERNALSYM LPWSPSOCKET}
+ TWspSocket = LPWSPSOCKET;
+
+ LPWSPSTRINGTOADDRESS = function(AddressString: LPWSTR; AddressFamily: Integer;
+ lpProtocolInfo: LPWSAPROTOCOL_INFOW; lpAddress: LPSOCKADDR;
+ var lpAddressLength, lpErrno: Integer): Integer; stdcall;
+ {$EXTERNALSYM LPWSPSTRINGTOADDRESS}
+ TWspStringToAddress = LPWSPSTRINGTOADDRESS;
+
+(*
+ * A service provider proc table. This structure is returned by value
+ * from the service provider's WSPStartup() entrypoint.
+ *)
+
+type
+ _WSPPROC_TABLE = record
+ lpWSPAccept: LPWSPACCEPT;
+ lpWSPAddressToString: LPWSPADDRESSTOSTRING;
+ lpWSPAsyncSelect: LPWSPASYNCSELECT;
+ lpWSPBind: LPWSPBIND;
+ lpWSPCancelBlockingCall: LPWSPCANCELBLOCKINGCALL;
+ lpWSPCleanup: LPWSPCLEANUP;
+ lpWSPCloseSocket: LPWSPCLOSESOCKET;
+ lpWSPConnect: LPWSPCONNECT;
+ lpWSPDuplicateSocket: LPWSPDUPLICATESOCKET;
+ lpWSPEnumNetworkEvents: LPWSPENUMNETWORKEVENTS;
+ lpWSPEventSelect: LPWSPEVENTSELECT;
+ lpWSPGetOverlappedResult: LPWSPGETOVERLAPPEDRESULT;
+ lpWSPGetPeerName: LPWSPGETPEERNAME;
+ lpWSPGetSockName: LPWSPGETSOCKNAME;
+ lpWSPGetSockOpt: LPWSPGETSOCKOPT;
+ lpWSPGetQOSByName: LPWSPGETQOSBYNAME;
+ lpWSPIoctl: LPWSPIOCTL;
+ lpWSPJoinLeaf: LPWSPJOINLEAF;
+ lpWSPListen: LPWSPLISTEN;
+ lpWSPRecv: LPWSPRECV;
+ lpWSPRecvDisconnect: LPWSPRECVDISCONNECT;
+ lpWSPRecvFrom: LPWSPRECVFROM;
+ lpWSPSelect: LPWSPSELECT;
+ lpWSPSend: LPWSPSEND;
+ lpWSPSendDisconnect: LPWSPSENDDISCONNECT;
+ lpWSPSendTo: LPWSPSENDTO;
+ lpWSPSetSockOpt: LPWSPSETSOCKOPT;
+ lpWSPShutdown: LPWSPSHUTDOWN;
+ lpWSPSocket: LPWSPSOCKET;
+ lpWSPStringToAddress: LPWSPSTRINGTOADDRESS;
+ end;
+ {$EXTERNALSYM _WSPPROC_TABLE}
+ WSPPROC_TABLE = _WSPPROC_TABLE;
+ {$EXTERNALSYM WSPPROC_TABLE}
+ LPWSPPROC_TABLE = ^WSPPROC_TABLE;
+ {$EXTERNALSYM LPWSPPROC_TABLE}
+ TWspProcTable = WSPPROC_TABLE;
+ PWspProcTable = LPWSPPROC_TABLE;
+
+(*
+ * Pointers to the individual entries in the upcall table.
+ *)
+
+type
+ LPWPUCLOSEEVENT = function(hEvent: WSAEVENT; var lpErrno: Integer): BOOL; stdcall;
+ {$EXTERNALSYM LPWPUCLOSEEVENT}
+ TWpuCloseEvent = LPWPUCLOSEEVENT;
+
+ LPWPUCLOSESOCKETHANDLE = function(s: TSocket; var lpErrno: Integer): Integer; stdcall;
+ {$EXTERNALSYM LPWPUCLOSESOCKETHANDLE}
+ TWpuCloseSocketHandle = LPWPUCLOSESOCKETHANDLE;
+
+ LPWPUCREATEEVENT = function(var lpErrno: Integer): WSAEVENT; stdcall;
+ {$EXTERNALSYM LPWPUCREATEEVENT}
+ TWpuCreateEvent = LPWPUCREATEEVENT;
+
+ LPWPUCREATESOCKETHANDLE = function(dwCatalogEntryId, dwContext: DWORD;
+ var lpErrno: Integer): TSocket; stdcall;
+ {$EXTERNALSYM LPWPUCREATESOCKETHANDLE}
+ TWpuCreateSocketHandle = LPWPUCREATESOCKETHANDLE;
+
+ LPWPUFDISSET = function(s: TSocket; fdset: PFdSet): Integer; stdcall;
+ {$EXTERNALSYM LPWPUFDISSET}
+ TWpuFdIsSet = LPWPUFDISSET;
+
+ LPWPUGETPROVIDERPATH = function(const lpProviderId: TGUID;
+ lpszProviderDllPath: PWCHAR; var lpProviderDllPathLen, lpErrno: Integer): Integer; stdcall;
+ {$EXTERNALSYM LPWPUGETPROVIDERPATH}
+ TWpuGetProviderPath = LPWPUGETPROVIDERPATH;
+
+ LPWPUMODIFYIFSHANDLE = function(dwCatalogEntryId: DWORD; ProposedHandle: TSocket;
+ var lpErrno: Integer): TSocket; stdcall;
+ {$EXTERNALSYM LPWPUMODIFYIFSHANDLE}
+ TWpuMoifyIfsHandle = LPWPUMODIFYIFSHANDLE;
+
+ LPWPUPOSTMESSAGE = function(hWnd: HWND; Msg: UINT; wParam: WPARAM; lParam: LPARAM): BOOL; stdcall;
+ {$EXTERNALSYM LPWPUPOSTMESSAGE}
+ TWpuPostMessage = LPWPUPOSTMESSAGE;
+
+ LPWPUQUERYBLOCKINGCALLBACK = function(dwCatalogEntryId: DWORD; var lplpfnCallback: LPBLOCKINGCALLBACK;
+ lpdwContext: LPDWORD; var lpErrno: Integer): Integer; stdcall;
+ {$EXTERNALSYM LPWPUQUERYBLOCKINGCALLBACK}
+ TWpuQueryBlockingCallback = LPWPUQUERYBLOCKINGCALLBACK;
+
+ LPWPUQUERYSOCKETHANDLECONTEXT = function(s: TSocket; lpContext: LPDWORD;
+ var lpErrno: Integer): Integer; stdcall;
+ {$EXTERNALSYM LPWPUQUERYSOCKETHANDLECONTEXT}
+ TWpuQuerySocketHandleContext = LPWPUQUERYSOCKETHANDLECONTEXT;
+
+ LPWPUQUEUEAPC = function(lpThreadId: LPWSATHREADID; lpfnUserApc: LPWSAUSERAPC;
+ dwContext: DWORD; var lpErrno: Integer): Integer; stdcall;
+ {$EXTERNALSYM LPWPUQUEUEAPC}
+ TWpuQueueApc = LPWPUQUEUEAPC;
+
+ LPWPURESETEVENT = function(hEvent: WSAEVENT; var lpErrno: Integer): BOOL; stdcall;
+ {$EXTERNALSYM LPWPURESETEVENT}
+ TWpuResetEvent = LPWPURESETEVENT;
+
+ LPWPUSETEVENT = function(hEvent: WSAEVENT; var lpErrno: Integer): BOOL; stdcall;
+ {$EXTERNALSYM LPWPUSETEVENT}
+ TWpuSetEvent = LPWPUSETEVENT;
+
+ LPWPUOPENCURRENTTHREAD = function(lpThreadId: LPWSATHREADID; var lpErrno: Integer): Integer; stdcall;
+ {$EXTERNALSYM LPWPUOPENCURRENTTHREAD}
+ TWpuOpenCurrentThread = LPWPUOPENCURRENTTHREAD;
+
+ LPWPUCLOSETHREAD = function(lpThreadId: LPWSATHREADID; var lpErrno: Integer): Integer; stdcall;
+ {$EXTERNALSYM LPWPUCLOSETHREAD}
+ TWpuCloseThread = LPWPUCLOSETHREAD;
+
+// Available only directly from ws2_32.dll
+
+ LPWPUCOMPLETEOVERLAPPEDREQUEST = function(s: TSocket; lpOverlapped: LPWSAOVERLAPPED;
+ dwError: DWORD; cbTransferred: DWORD; var lpErrno: Integer): Integer; stdcall;
+ {$EXTERNALSYM LPWPUCOMPLETEOVERLAPPEDREQUEST}
+ TWpuCompleteOverlappedRequest = LPWPUCOMPLETEOVERLAPPEDREQUEST;
+
+(*
+ * The upcall table. This structure is passed by value to the service
+ * provider's WSPStartup() entrypoint.
+ *)
+
+ _WSPUPCALLTABLE = record
+ lpWPUCloseEvent: LPWPUCLOSEEVENT;
+ lpWPUCloseSocketHandle: LPWPUCLOSESOCKETHANDLE;
+ lpWPUCreateEvent: LPWPUCREATEEVENT;
+ lpWPUCreateSocketHandle: LPWPUCREATESOCKETHANDLE;
+ lpWPUFDIsSet: LPWPUFDISSET;
+ lpWPUGetProviderPath: LPWPUGETPROVIDERPATH;
+ lpWPUModifyIFSHandle: LPWPUMODIFYIFSHANDLE;
+ lpWPUPostMessage: LPWPUPOSTMESSAGE;
+ lpWPUQueryBlockingCallback: LPWPUQUERYBLOCKINGCALLBACK;
+ lpWPUQuerySocketHandleContext: LPWPUQUERYSOCKETHANDLECONTEXT;
+ lpWPUQueueApc: LPWPUQUEUEAPC;
+ lpWPUResetEvent: LPWPURESETEVENT;
+ lpWPUSetEvent: LPWPUSETEVENT;
+ lpWPUOpenCurrentThread: LPWPUOPENCURRENTTHREAD;
+ lpWPUCloseThread: LPWPUCLOSETHREAD;
+ end;
+ {$EXTERNALSYM _WSPUPCALLTABLE}
+ WSPUPCALLTABLE = _WSPUPCALLTABLE;
+ {$EXTERNALSYM WSPUPCALLTABLE}
+ LPWSPUPCALLTABLE = ^WSPUPCALLTABLE;
+ {$EXTERNALSYM LPWSPUPCALLTABLE}
+ TWspUpCallTable = WSPUPCALLTABLE;
+ PWspUpCallTable = LPWSPUPCALLTABLE;
+
+(*
+ * WinSock 2 SPI socket function prototypes
+ *)
+
+//function WSPStartup(wVersionRequested: WORD; lpWSPData: LPWSPDATA;
+// lpProtocolInfo: LPWSAPROTOCOL_INFOW; UpcallTable: WSPUPCALLTABLE;
+// lpProcTable: LPWSPPROC_TABLE): Integer; stdcall;
+//{$EXTERNALSYM WSPStartup}
+
+type
+ LPWSPSTARTUP = function(wVersionRequested: WORD; lpWSPData: LPWSPDATA;
+ lpProtocolInfo: LPWSAPROTOCOL_INFOW; UpcallTable: WSPUPCALLTABLE;
+ lpProcTable: LPWSPPROC_TABLE): Integer; stdcall;
+ {$EXTERNALSYM LPWSPSTARTUP}
+ TWspStartUp = LPWSPSTARTUP;
+
+(*
+ * Installation and configuration entrypoints.
+ *)
+
+function WSCEnumProtocols(lpiProtocols: PINT; lpProtocolBuffer: LPWSAPROTOCOL_INFOW;
+ var lpdwBufferLength: DWORD; var lpErrno: Integer): Integer; stdcall;
+{$EXTERNALSYM WSCEnumProtocols}
+
+type
+ LPWSCENUMPROTOCOLS = function(lpiProtocols: PINT; lpProtocolBuffer: LPWSAPROTOCOL_INFOW;
+ var lpdwBufferLength: DWORD; var lpErrno: Integer): Integer; stdcall;
+ {$EXTERNALSYM LPWSCENUMPROTOCOLS}
+ TWscEnumProtocols = LPWSCENUMPROTOCOLS;
+
+{$IFDEF _WIN64}
+
+//
+// 64-bit architectures capable of running 32-bit code have
+// separate 64-bit and 32-bit catalogs. API with '32' prefix
+// allow 32 bit catalog manipulations by 64 bit process.
+//
+
+function WSCEnumProtocols32(lpiProtocols: PINT; lpProtocolBuffer: LPWSAPROTOCOL_INFOW; lpdwBufferLength: LPDWORD; lpErrno: PINT): Integer; stdcall;
+{$EXTERNALSYM WSCEnumProtocols32}
+
+{$ENDIF _WIN64}
+
+function WSCDeinstallProvider(const lpProviderId: TGUID; var lpErrno: Integer): Integer; stdcall;
+{$EXTERNALSYM WSCDeinstallProvider}
+
+type
+ LPWSCDEINSTALLPROVIDER = function(const lpProviderId: TGUID; var lpErrno: Integer): Integer; stdcall;
+ {$EXTERNALSYM LPWSCDEINSTALLPROVIDER}
+ TWscDeinstallProvider = LPWSCDEINSTALLPROVIDER;
+
+{$IFDEF _WIN64}
+
+function WSCDeinstallProvider32(lpProviderId: PGUID; lpErrno: PINT): Integer; stdcall;
+{$EXTERNALSYM WSCDeinstallProvider32}
+
+{$ENDIF _WIN64}
+
+function WSCInstallProvider(const lpProviderId: TGUID; lpszProviderDllPath: PWCHAR;
+ lpProtocolInfoList: LPWSAPROTOCOL_INFOW; dwNumberOfEntries: DWORD; var lpErrno: Integer): Integer; stdcall;
+{$EXTERNALSYM WSCInstallProvider}
+
+type
+ LPWSCINSTALLPROVIDER = function(const lpProviderId: TGUID; lpszProviderDllPath: PWCHAR;
+ lpProtocolInfoList: LPWSAPROTOCOL_INFOW; dwNumberOfEntries: DWORD; var lpErrno: Integer): Integer; stdcall;
+ {$EXTERNALSYM LPWSCINSTALLPROVIDER}
+ TWscInstallProvider = LPWSCINSTALLPROVIDER;
+
+{$IFDEF _WIN64}
+
+//
+// This API manipulates 64-bit and 32-bit catalogs simulteneously.
+// It is needed to guarantee the same catalog IDs for provider catalog
+// entries in both 64-bit and 32-bit catalogs.
+//
+
+function WSCInstallProvider64_32(lpProviderId: PGUID; lpszProviderDllPath: PWCHAR; lpProtocolInfoList: LPWSAPROTOCOL_INFOW;
+ dwNumberOfEntries: DWORD; lpErrno: PINT): Integer; stdcall;
+{$EXTERNALSYM WSCInstallProvider64_32}
+
+{$ENDIF _WIN64}
+
+function WSCGetProviderPath(const lpProviderId: TGUID; lpszProviderDllPath: PWCHAR;
+ var lpProviderDllPathLen, lpErrno: Integer): Integer; stdcall;
+{$EXTERNALSYM WSCGetProviderPath}
+
+type
+ LPWSCGETPROVIDERPATH = function(const lpProviderId: TGUID; lpszProviderDllPath: PWCHAR;
+ var lpProviderDllPathLen, lpErrno: Integer): Integer; stdcall;
+ {$EXTERNALSYM LPWSCGETPROVIDERPATH}
+ TWscGetProviderPath = LPWSCGETPROVIDERPATH;
+
+{$IFDEF _WIN64}
+
+function WSCGetProviderPath32(lpProviderId: PGUID; lpszProviderDllPath: PWCHAR; lpProviderDllPathLen: PINT; lpErrno: PINT): Integer; stdcall;
+{$EXTERNALSYM WSCGetProviderPath32}
+
+{$ENDIF _WIN64}
+
+function WSCUpdateProvider(lpProviderId: PGUID; lpszProviderDllPath: PWCHAR; lpProtocolInfoList: LPWSAPROTOCOL_INFOW;
+ dwNumberOfEntries: DWORD; lpErrno: PINT): Integer; stdcall;
+{$EXTERNALSYM WSCUpdateProvider}
+
+type
+ LPWSCUPDATEPROVIDER = function(lpProviderId: PGUID; lpszProviderDllPath: PWCHAR; lpProtocolInfoList: LPWSAPROTOCOL_INFOW;
+ dwNumberOfEntries: DWORD; lpErrno: PINT): Integer; stdcall;
+ {$EXTERNALSYM LPWSCUPDATEPROVIDER}
+
+{$IFDEF _WIN64}
+
+function WSCUpdateProvider32(lpProviderId: PGUID; lpszProviderDllPath: PWCHAR; lpProtocolInfoList: LPWSAPROTOCOL_INFOW;
+ dwNumberOfEntries: DWORD; lpErrno: PINT): Integer; stdcall;
+{$EXTERNALSYM WSCUpdateProvider32}
+
+{$ENDIF _WIN64}
+
+function WSCInstallQOSTemplate(const Guid: TGUID; QosName: LPWSABUF; Qos: LPQOS): Integer; stdcall;
+{$EXTERNALSYM WSCInstallQOSTemplate}
+
+type
+ LPWSCINSTALLQOSTEMPLATE = function(const Guid: TGUID; QosName: LPWSABUF; Qos: LPQOS): Integer; stdcall;
+ {$EXTERNALSYM LPWSCINSTALLQOSTEMPLATE}
+ TWscInstallQosTemplate = LPWSCINSTALLQOSTEMPLATE;
+
+function WSCRemoveQOSTemplate(const Guid: TGUID; QosName: LPWSABUF): Integer; stdcall;
+{$EXTERNALSYM WSCRemoveQOSTemplate}
+
+type
+ LPWSCREMOVEQOSTEMPLATE = function(const Guid: TGUID; QosName: LPWSABUF): Integer; stdcall;
+ {$EXTERNALSYM LPWSCREMOVEQOSTEMPLATE}
+ TWscRemoveQosTemplate = LPWSCREMOVEQOSTEMPLATE;
+
+(*
+ * The following upcall function prototypes are only used by WinSock 2 DLL and
+ * should not be used by any service providers.
+ *
+
+function WPUCloseEvent(hEvent: WSAEVENT; var lpErrno: Integer): BOOL; stdcall;
+{$EXTERNALSYM WPUCloseEvent}
+
+function WPUCloseSocketHandle(s: TSocket; var lpErrno: Integer): Integer; stdcall;
+{$EXTERNALSYM WPUCloseSocketHandle}
+
+function WPUCreateEvent(var lpErrno: Integer): WSAEVENT; stdcall;
+{$EXTERNALSYM WPUCreateEvent}
+
+function WPUCreateSocketHandle(dwCatalogEntryId, dwContext: DWORD; var lpErrno: Integer): SOCKET; stdcall;
+{$EXTERNALSYM WPUCreateSocketHandle}
+
+function WPUFDIsSet(s: TSocket; const fdset: fd_set): Integer; stdcall;
+{$EXTERNALSYM WPUFDIsSet}
+
+function WPUGetProviderPath(const lpProviderId: TGUID; lpszProviderDllPath: PWCHAR;
+ var lpProviderDllPathLen, lpErrno: : Integer): Integer; stdcall;
+{$EXTERNALSYM WPUGetProviderPath}
+
+function WPUModifyIFSHandle(dwCatalogEntryId: DWORD; ProposedHandle: SOCKET; var lpErrno: Integer): SOCKET; stdcall;
+{$EXTERNALSYM WPUModifyIFSHandle}
+
+function WPUPostMessage(hWnd: HWND; Msg: UINT; wParam: WPARAM; lParam: LPARAM): BOOL; stdcall;
+{$EXTERNALSYM WPUPostMessage}
+
+function WPUQueryBlockingCallback(dwCatalogEntryId: DWORD; var lplpfnCallback: LPBLOCKINGCALLBACK;
+ var lpdwContext: DWORD_PTR; var lpErrno: Integer): Integer; stdcall;
+{$EXTERNALSYM WPUQueryBlockingCallback}
+
+function WPUQuerySocketHandleContext(s: SOCKET; var lpContext: DWORD_PTR; lpErrno: Integer): Integer; stdcall;
+{$EXTERNALSYM WPUQuerySocketHandleContext}
+
+function WPUQueueApc(lpThreadId: LPWSATHREADID; lpfnUserApc: LPWSAUSERAPC;
+ dwContext: DWORD_PTR; var lpErrno: Integer): Integer; stdcall;
+{$EXTERNALSYM WPUQueueApc}
+
+function WPUResetEvent(hEvent: WSAEVENT; var lpErrno: Integer): BOOL; stcall;
+{$EXTERNALSYM WPUResetEvent}
+
+function WPUSetEvent(hEvent: WSAEVENT; var lpErrno: Integer): BOOL; stdcall;
+{$EXTERNALSYM WPUSetEvent}
+
+function WPUCompleteOverlappedRequest(s: SOCKET; lpOverlapped: LPWSAOVERLAPPED;
+ dwError, cbTransferred: DWORD; var lpErrno: Integer): Integerl stdcall;
+{$EXTERNALSYM WPUCompleteOverlappedRequest}
+
+function WPUOpenCurrentThread(lpThreadId: LPWSATHREADID; lpErrno: PINT): Integer; stdcall;
+{$EXTERNALSYM WPUOpenCurrentThread}
+
+function WPUCloseThread(lpThreadId: LPWSATHREADID; lpErrno: PINT): Integer; stdcall;
+{$EXTERNALSYM WPUCloseThread}
+
+*)
+
+(*
+ * Installing and uninstalling name space providers.
+ *)
+
+//
+// SPI and API for enumerating name space providers are
+// currently equivalent since there is no concept of a hidden
+// name space provider
+//
+
+//TODO
+//#define WSCEnumNameSpaceProviders WSAEnumNameSpaceProvidersW
+//#define LPFN_WSCENUMNAMESPACEPROVIDERS LPFN_WSAENUMNAMESPACEPROVIDERSW
+
+{$IFDEF _WIN64}
+
+function WSCEnumNameSpaceProviders32(lpdwBufferLength: LPDWORD; lpnspBuffer: LPWSANAMESPACE_INFOW): Integer; stdcall;
+{$EXTERNALSYM WSCEnumNameSpaceProviders32}
+
+{$ENDIF _WIN64}
+
+function WSCInstallNameSpace(lpszIdentifier, lpszPathName: LPWSTR; dwNameSpace,
+ dwVersion: DWORD; const lpProviderId: TGUID): Integer; stdcall;
+{$EXTERNALSYM WSCInstallNameSpace}
+
+type
+ LPWSCINSTALLNAMESPACE = function(lpszIdentifier, lpszPathName: LPWSTR;
+ dwNameSpace, dwVersion: DWORD; const lpProviderId: TGUID): Integer; stdcall;
+ {$EXTERNALSYM LPWSCINSTALLNAMESPACE}
+ TWscInstallNamespace = LPWSCINSTALLNAMESPACE;
+
+{$IFDEF _WIN64}
+
+function WSCInstallNameSpace32(lpszIdentifier, lpszPathName: LPWSTR; dwNameSpace, dwVersion: DWORD; lpProviderId: PGUID): Integer; stdcall;
+{$EXTERNALSYM WSCInstallNameSpace32}
+
+{$ENDIF _WIN64}
+
+function WSCUnInstallNameSpace(const lpProviderId: TGUID): Integer; stdcall;
+{$EXTERNALSYM WSCUnInstallNameSpace}
+
+type
+ LPWSCUNINSTALLNAMESPACE = function(const lpProviderId: TGUID): Integer; stdcall;
+ {$EXTERNALSYM LPWSCUNINSTALLNAMESPACE}
+ TWscUninstallNamespace = LPWSCUNINSTALLNAMESPACE;
+
+{$IFDEF _WIN64}
+
+function WSCUnInstallNameSpace32(lpProviderId: PGUID): Integer; stdcall;
+{$EXTERNALSYM WSCUnInstallNameSpace32}
+
+{$ENDIF _WIN64}
+
+function WSCEnableNSProvider(const lpProviderId: TGUID; fEnable: BOOL): Integer; stdcall;
+{$EXTERNALSYM WSCEnableNSProvider}
+
+type
+ LPWSCENABLENSPROVIDER = function(const lpProviderId: TGUID; fEnable: BOOL): Integer; stdcall;
+ {$EXTERNALSYM LPWSCENABLENSPROVIDER}
+ TWscEnableNsProvider = LPWSCENABLENSPROVIDER;
+
+{$IFDEF _WIN64}
+
+function WSCEnableNSProvider32(lpProviderId: PGUID; fEnable: BOOL): Integer; stdcall;
+{$EXTERNALSYM WSCEnableNSProvider32}
+
+{$ENDIF _WIN64}
+
+(*
+ * Pointers to the individual entries in the namespace proc table.
+ *)
+
+type
+ LPNSPCLEANUP = function(const lpProviderId: TGUID): Integer; stdcall;
+ {$EXTERNALSYM LPNSPCLEANUP}
+ TNspCleanup = LPNSPCLEANUP;
+
+ LPNSPLOOKUPSERVICEBEGIN = function(const lpProviderId: TGUID;
+ lpqsRestrictions: LPWSAQUERYSETW; lpServiceClassInfo: LPWSASERVICECLASSINFOW;
+ dwControlFlags: DWORD; lphLookup: LPHANDLE): Integer; stdcall;
+ {$EXTERNALSYM LPNSPLOOKUPSERVICEBEGIN}
+ TNspLookupServiceBegin = LPNSPLOOKUPSERVICEBEGIN;
+
+ LPNSPLOOKUPSERVICENEXT = function(hLookup: HANDLE; dwControlFlags: DWORD;
+ lpdwBufferLength: LPDWORD; lpqsResults: LPWSAQUERYSETW): Integer; stdcall;
+ {$EXTERNALSYM LPNSPLOOKUPSERVICENEXT}
+ TNspLookupServiceNext = LPNSPLOOKUPSERVICENEXT;
+
+ LPNSPIOCTL = function(hLookup: HANDLE; dwControlCode: DWORD; lpvInBuffer: LPVOID;
+ cbInBuffer: DWORD; lpvOutBuffer: LPVOID; cbOutBuffer: DWORD; lpcbBytesReturned: LPDWORD;
+ lpCompletion: LPWSACOMPLETION; lpThreadId: LPWSATHREADID): Integer; stdcall;
+ {$EXTERNALSYM LPNSPIOCTL}
+
+ LPNSPLOOKUPSERVICEEND = function(hLookup: HANDLE): Integer; stdcall;
+ {$EXTERNALSYM LPNSPLOOKUPSERVICEEND}
+ TNspLookupServiceEnd = LPNSPLOOKUPSERVICEEND;
+
+ LPNSPSETSERVICE = function(const lpProviderId: TGUID;
+ lpServiceClassInfo: LPWSASERVICECLASSINFOW; lpqsRegInfo: LPWSAQUERYSETW;
+ essOperation: WSAESETSERVICEOP; dwControlFlags: DWORD): Integer; stdcall;
+ {$EXTERNALSYM LPNSPSETSERVICE}
+ TNspSetService = LPNSPSETSERVICE;
+
+ LPNSPINSTALLSERVICECLASS = function(const lpProviderId: TGUID;
+ lpServiceClassInfo: LPWSASERVICECLASSINFOW): Integer; stdcall;
+ {$EXTERNALSYM LPNSPINSTALLSERVICECLASS}
+ TNspInstallServiceClass = LPNSPINSTALLSERVICECLASS;
+
+ LPNSPREMOVESERVICECLASS = function(const lpProviderId, lpServiceClassId: TGUID): Integer; stdcall;
+ {$EXTERNALSYM LPNSPREMOVESERVICECLASS}
+ TNspRemoveServiceClass = LPNSPREMOVESERVICECLASS;
+
+ LPNSPGETSERVICECLASSINFO = function(const lpProviderId: TGUID; lpdwBufSize: LPDWORD;
+ lpServiceClassInfo: LPWSASERVICECLASSINFOW): Integer; stdcall;
+ {$EXTERNALSYM LPNSPGETSERVICECLASSINFO}
+ TNspGetServiceClassInfo = LPNSPGETSERVICECLASSINFO;
+
+(*
+ * The name space service provider procedure table.
+ *)
+
+type
+ _NSP_ROUTINE = record
+ (* Structure version information: *)
+ cbSize: DWORD;
+ dwMajorVersion: DWORD;
+ dwMinorVersion: DWORD;
+ (* Procedure-pointer table: *)
+ NSPCleanup: LPNSPCLEANUP;
+ NSPLookupServiceBegin: LPNSPLOOKUPSERVICEBEGIN;
+ NSPLookupServiceNext: LPNSPLOOKUPSERVICENEXT;
+ NSPLookupServiceEnd: LPNSPLOOKUPSERVICEEND;
+ NSPSetService: LPNSPSETSERVICE;
+ NSPInstallServiceClass: LPNSPINSTALLSERVICECLASS;
+ NSPRemoveServiceClass: LPNSPREMOVESERVICECLASS;
+ NSPGetServiceClassInfo: LPNSPGETSERVICECLASSINFO;
+ // These APIs were added later, so must appear here
+ // to keep the pointers in the structure in order.
+ // Namespaces unaware of these APIs will set cbSize
+ // to match the size of FIELD_OFFSET(NSP_ROUTINE, NSPIoctl).
+ NSPIoctl: LPNSPIOCTL;
+ end;
+ {$EXTERNALSYM _NSP_ROUTINE}
+ NSP_ROUTINE = _NSP_ROUTINE;
+ {$EXTERNALSYM NSP_ROUTINE}
+ LPNSP_ROUTINE = ^NSP_ROUTINE;
+ {$EXTERNALSYM LPNSP_ROUTINE}
+ TNspRoutines = NSP_ROUTINE;
+ PNspRoutines = LPNSP_ROUTINE;
+
+(*
+ * Startup procedures.
+ *)
+
+//function NSPStartup(const lpProviderId: TGUID; lpnspRoutines: LPNSP_ROUTINE): Integer; stdcall;
+//{$EXTERNALSYM NSPStartup}
+
+type
+ LPNSPSTARTUP = function(const lpProviderId: TGUID; lpnspRoutines: LPNSP_ROUTINE): Integer; stdcall;
+ {$EXTERNALSYM LPNSPSTARTUP}
+ TNspStartup = LPNSPSTARTUP;
+
+implementation
+
+const
+ ws2_32 = 'ws2_32.dll';
+ qosname = 'qosname.dll';
+
+{$IFDEF DYNAMIC_LINK}
+
+var
+ _WSCEnumProtocols: Pointer;
+
+function WSCEnumProtocols;
+begin
+ GetProcedureAddress(_WSCEnumProtocols, ws2_32, 'WSCEnumProtocols');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WSCEnumProtocols]
+ end;
+end;
+
+{$IFDEF _WIN64}
+
+var
+ _WSCEnumProtocols32: Pointer;
+
+function WSCEnumProtocols32;
+begin
+ GetProcedureAddress(_WSCEnumProtocols32, ws2_32, 'WSCEnumProtocols32');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WSCEnumProtocols32]
+ end;
+end;
+
+{$ENDIF _WIN64}
+
+var
+ _WSCDeinstallProvider: Pointer;
+
+function WSCDeinstallProvider;
+begin
+ GetProcedureAddress(_WSCDeinstallProvider, ws2_32, 'WSCDeinstallProvider');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WSCDeinstallProvider]
+ end;
+end;
+
+{$IFDEF _WIN64}
+
+var
+ _WSCDeinstallProvider32: Pointer;
+
+function WSCDeinstallProvider32;
+begin
+ GetProcedureAddress(_WSCDeinstallProvider32, ws2_32, 'WSCDeinstallProvider32');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WSCDeinstallProvider32]
+ end;
+end;
+
+{$ENDIF _WIN64}
+
+var
+ _WSCInstallProvider: Pointer;
+
+function WSCInstallProvider;
+begin
+ GetProcedureAddress(_WSCInstallProvider, ws2_32, 'WSCInstallProvider');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WSCInstallProvider]
+ end;
+end;
+
+{$IFDEF _WIN64}
+
+var
+ _WSCInstallProvider64_32: Pointer;
+
+function WSCInstallProvider64_32;
+begin
+ GetProcedureAddress(_WSCInstallProvider64_32, ws2_32, 'WSCInstallProvider64_32');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WSCInstallProvider64_32]
+ end;
+end;
+
+{$ENDIF _WIN64}
+
+var
+ _WSCGetProviderPath: Pointer;
+
+function WSCGetProviderPath;
+begin
+ GetProcedureAddress(_WSCGetProviderPath, ws2_32, 'WSCGetProviderPath');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WSCGetProviderPath]
+ end;
+end;
+
+{$IFDEF _WIN64}
+
+var
+ _WSCGetProviderPath32: Pointer;
+
+function WSCGetProviderPath32;
+begin
+ GetProcedureAddress(_WSCGetProviderPath32, ws2_32, 'WSCGetProviderPath32');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WSCGetProviderPath32]
+ end;
+end;
+
+{$ENDIF _WIN64}
+
+var
+ _WSCUpdateProvider: Pointer;
+
+function WSCUpdateProvider;
+begin
+ GetProcedureAddress(_WSCUpdateProvider, ws2_32, 'WSCUpdateProvider');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WSCUpdateProvider]
+ end;
+end;
+
+{$IFDEF _WIN64}
+
+var
+ _WSCUpdateProvider32: Pointer;
+
+function WSCUpdateProvider32;
+begin
+ GetProcedureAddress(_WSCUpdateProvider32, ws2_32, 'WSCUpdateProvider32');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WSCUpdateProvider32]
+ end;
+end;
+
+{$ENDIF _WIN64}
+
+var
+ _WSCInstallQOSTemplate: Pointer;
+
+function WSCInstallQOSTemplate;
+begin
+ GetProcedureAddress(_WSCInstallQOSTemplate, JwaWs2spi.qosname, 'WSCInstallQOSTemplate');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WSCInstallQOSTemplate]
+ end;
+end;
+
+var
+ _WSCRemoveQOSTemplate: Pointer;
+
+function WSCRemoveQOSTemplate;
+begin
+ GetProcedureAddress(_WSCRemoveQOSTemplate, JwaWs2spi.qosname, 'WSCRemoveQOSTemplate');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WSCRemoveQOSTemplate]
+ end;
+end;
+
+{$IFDEF _WIN64}
+
+var
+ _WSCEnumNameSpaceProviders32: Pointer;
+
+function WSCEnumNameSpaceProviders32;
+begin
+ GetProcedureAddress(_WSCEnumNameSpaceProviders32, ws2_32, 'WSCEnumNameSpaceProviders32');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WSCEnumNameSpaceProviders32]
+ end;
+end;
+
+{$ENDIF _WIN64}
+
+var
+ _WSCInstallNameSpace: Pointer;
+
+function WSCInstallNameSpace;
+begin
+ GetProcedureAddress(_WSCInstallNameSpace, ws2_32, 'WSCInstallNameSpace');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WSCInstallNameSpace]
+ end;
+end;
+
+{$IFDEF _WIN64}
+
+var
+ _WSCInstallNameSpace32: Pointer;
+
+function WSCInstallNameSpace32;
+begin
+ GetProcedureAddress(_WSCInstallNameSpace32, ws2_32, 'WSCInstallNameSpace32');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WSCInstallNameSpace32]
+ end;
+end;
+
+{$ENDIF _WIN64}
+
+var
+ _WSCUnInstallNameSpace: Pointer;
+
+function WSCUnInstallNameSpace;
+begin
+ GetProcedureAddress(_WSCUnInstallNameSpace, ws2_32, 'WSCUnInstallNameSpace');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WSCUnInstallNameSpace]
+ end;
+end;
+
+{$IFDEF _WIN64}
+
+var
+ _WSCUnInstallNameSpace32: Pointer;
+
+function WSCUnInstallNameSpace32;
+begin
+ GetProcedureAddress(_WSCUnInstallNameSpace32, ws2_32, 'WSCUnInstallNameSpace32');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WSCUnInstallNameSpace32]
+ end;
+end;
+
+{$ENDIF _WIN64}
+
+var
+ _WSCEnableNSProvider: Pointer;
+
+function WSCEnableNSProvider;
+begin
+ GetProcedureAddress(_WSCEnableNSProvider, ws2_32, 'WSCEnableNSProvider');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WSCEnableNSProvider]
+ end;
+end;
+
+{$IFDEF _WIN64}
+
+var
+ _WSCEnableNSProvider32: Pointer;
+
+function WSCEnableNSProvider32;
+begin
+ GetProcedureAddress(_WSCEnableNSProvider32, ws2_32, 'WSCEnableNSProvider32');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WSCEnableNSProvider32]
+ end;
+end;
+
+{$ENDIF _WIN64}
+
+{$ELSE}
+
+function WSCEnumProtocols; external ws2_32 name 'WSCEnumProtocols';
+function WSCDeinstallProvider; external ws2_32 name 'WSCDeinstallProvider';
+function WSCInstallProvider; external ws2_32 name 'WSCInstallProvider';
+function WSCGetProviderPath; external ws2_32 name 'WSCGetProviderPath';
+function WSCUpdateProvider; external ws2_32 name 'WSCUpdateProvider';
+function WSCInstallQOSTemplate; external qosname name 'WSCInstallQOSTemplate';
+function WSCRemoveQOSTemplate; external qosname name 'WSCRemoveQOSTemplate';
+function WSCInstallNameSpace; external ws2_32 name 'WSCInstallNameSpace';
+function WSCUnInstallNameSpace; external ws2_32 name 'WSCUnInstallNameSpace';
+function WSCEnableNSProvider; external ws2_32 name 'WSCEnableNSProvider';
+{$IFDEF _WIN64}
+function WSCEnumProtocols32; external ws2_32 name 'WSCEnumProtocols32';
+function WSCDeinstallProvider32; external ws2_32 name 'WSCDeinstallProvider32';
+function WSCInstallProvider64_32; external ws2_32 name 'WSCInstallProvider64_32';
+function WSCGetProviderPath32; external ws2_32 name 'WSCGetProviderPath32';
+function WSCUpdateProvider32; external ws2_32 name 'WSCUpdateProvider32';
+function WSCEnumNameSpaceProviders32; external ws2_32 name 'WSCEnumNameSpaceProviders32';
+function WSCInstallNameSpace32; external ws2_32 name 'WSCInstallNameSpace32';
+function WSCUnInstallNameSpace32; external ws2_32 name 'WSCUnInstallNameSpace32';
+function WSCEnableNSProvider32; external ws2_32 name 'WSCEnableNSProvider32';
+{$ENDIF _WIN64}
+
+{$ENDIF DYNAMIC_LINK}
+
+end.
diff --git a/packages/extra/winunits/jwaws2tcpip.pas b/packages/extra/winunits/jwaws2tcpip.pas
index 8839806249..34ca9ab988 100644
--- a/packages/extra/winunits/jwaws2tcpip.pas
+++ b/packages/extra/winunits/jwaws2tcpip.pas
@@ -1,757 +1,757 @@
-{******************************************************************************}
-{ }
-{ Winsock2 TCP/IP Extensions API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: ws2tcpip.h, released June 2000. The original Pascal }
-{ code is: WS2tcpip.pas, released December 2000. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwaws2tcpip.pas,v 1.1 2005/04/04 07:56:11 marco Exp $
-
-unit JwaWS2tcpip;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "ws2tcpip.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaWinSock2, JwaWinType;
-
-//
-// WS2TCPIP.H - WinSock2 Extension for TCP/IP protocols
-//
-// This file contains TCP/IP specific information for use
-// by WinSock2 compatible applications.
-//
-// Copyright (c) 1995-1999 Microsoft Corporation
-//
-// To provide the backward compatibility, all the TCP/IP
-// specific definitions that were included in the WINSOCK.H
-// file are now included in WINSOCK2.H file. WS2TCPIP.H
-// file includes only the definitions introduced in the
-// "WinSock 2 Protocol-Specific Annex" document.
-//
-// Rev 0.3 Nov 13, 1995
-// Rev 0.4 Dec 15, 1996
-//
-
-// Argument structure for IP_ADD_MEMBERSHIP and IP_DROP_MEMBERSHIP
-
-type
- ip_mreq = record
- imr_multiaddr: in_addr; // IP multicast address of group
- imr_interface: in_addr; // local IP address of interface
- end;
- {$EXTERNALSYM ip_mreq}
- TIPMReq = ip_mreq;
- PIPMReq = ^ip_mreq;
-
-// Argument structure for IP_ADD_SOURCE_MEMBERSHIP, IP_DROP_SOURCE_MEMBERSHIP,
-// IP_BLOCK_SOURCE, and IP_UNBLOCK_SOURCE
-//
-
- ip_mreq_source = record
- imr_multiaddr: in_addr; // IP multicast address of group
- imr_sourceaddr: in_addr; // IP address of source
- imr_interface: in_addr; // local IP address of interface
- end;
- {$EXTERNALSYM ip_mreq_source}
- TIpMreqSource = ip_mreq_source;
- PIpMreqSource = ^ip_mreq_source;
-
-// Argument structure for SIO_{GET,SET}_MULTICAST_FILTER
-
- ip_msfilter = record
- imsf_multiaddr: in_addr; // IP multicast address of group
- imsf_interface: in_addr; // local IP address of interface
- imsf_fmode: u_long; // filter mode - INCLUDE or EXCLUDE
- imsf_numsrc: u_long; // number of sources in src_list
- imsf_slist: array [0..0] of in_addr;
- end;
- {$EXTERNALSYM ip_msfilter}
- TIpMsFilter = ip_msfilter;
- PIpMsFilter = ^ip_msfilter;
-
-function IP_MSFILTER_SIZE(numsrc: Integer): Integer;
-{$EXTERNALSYM IP_MSFILTER_SIZE(numsrc)}
-
-const
- MCAST_INCLUDE = 0;
- {$EXTERNALSYM MCAST_INCLUDE}
- MCAST_EXCLUDE = 1;
- {$EXTERNALSYM MCAST_EXCLUDE}
-
-// TCP/IP specific Ioctl codes
-
-const
- SIO_GET_INTERFACE_LIST = IOC_OUT or ((4 and IOCPARM_MASK) shl 16) or ((Ord('t')) shl 8) or (127);
- {$EXTERNALSYM SIO_GET_INTERFACE_LIST}
-
-// New IOCTL with address size independent address array
-
- SIO_GET_INTERFACE_LIST_EX = IOC_OUT or ((4 and IOCPARM_MASK) shl 16) or ((Ord('t')) shl 8) or (126);
- {$EXTERNALSYM SIO_GET_INTERFACE_LIST_EX}
-
- SIO_SET_MULTICAST_FILTER = DWORD(IOC_IN or ((SizeOf(u_long) and IOCPARM_MASK) shl 16) or (Ord('t') shl 8) or 125);
- {$EXTERNALSYM SIO_SET_MULTICAST_FILTER}
- SIO_GET_MULTICAST_FILTER = DWORD(IOC_IN or ((SizeOf(u_long) and IOCPARM_MASK) shl 16) or (Ord('t') shl 8) or 124 or IOC_IN);
- {$EXTERNALSYM SIO_GET_MULTICAST_FILTER}
-
-// Option to use with [gs]etsockopt at the IPPROTO_IP level
-
-const
- IP_OPTIONS = 1; // set/get IP options
- {$EXTERNALSYM IP_OPTIONS}
- IP_HDRINCL = 2; // header is included with data
- {$EXTERNALSYM IP_HDRINCL}
- IP_TOS = 3; // IP type of service and preced
- {$EXTERNALSYM IP_TOS}
- IP_TTL = 4; // IP time to live
- {$EXTERNALSYM IP_TTL}
- IP_MULTICAST_IF = 9; // set/get IP multicast i/f
- {$EXTERNALSYM IP_MULTICAST_IF}
- IP_MULTICAST_TTL = 10; // set/get IP multicast ttl
- {$EXTERNALSYM IP_MULTICAST_TTL}
- IP_MULTICAST_LOOP = 11; // set/get IP multicast loopback
- {$EXTERNALSYM IP_MULTICAST_LOOP}
- IP_ADD_MEMBERSHIP = 12; // add an IP group membership
- {$EXTERNALSYM IP_ADD_MEMBERSHIP}
- IP_DROP_MEMBERSHIP = 13; // drop an IP group membership
- {$EXTERNALSYM IP_DROP_MEMBERSHIP}
- IP_DONTFRAGMENT = 14; // don't fragment IP datagrams
- {$EXTERNALSYM IP_DONTFRAGMENT}
- IP_ADD_SOURCE_MEMBERSHIP = 15; // join IP group/source
- {$EXTERNALSYM IP_ADD_SOURCE_MEMBERSHIP}
- IP_DROP_SOURCE_MEMBERSHIP = 16; // leave IP group/source
- {$EXTERNALSYM IP_DROP_SOURCE_MEMBERSHIP}
- IP_BLOCK_SOURCE = 17; // block IP group/source
- {$EXTERNALSYM IP_BLOCK_SOURCE}
- IP_UNBLOCK_SOURCE = 18; // unblock IP group/source
- {$EXTERNALSYM IP_UNBLOCK_SOURCE}
- IP_PKTINFO = 19; // receive packet information for ipv4
- {$EXTERNALSYM IP_PKTINFO}
-
-// Option to use with [gs]etsockopt at the IPPROTO_IPV6 level
-
- IPV6_HDRINCL = 2; // Header is included with data
- {$EXTERNALSYM IPV6_HDRINCL}
- IPV6_UNICAST_HOPS = 4; // Set/get IP unicast hop limit
- {$EXTERNALSYM IPV6_UNICAST_HOPS}
- IPV6_MULTICAST_IF = 9; // Set/get IP multicast interface
- {$EXTERNALSYM IPV6_MULTICAST_IF}
- IPV6_MULTICAST_HOPS = 10; // Set/get IP multicast ttl
- {$EXTERNALSYM IPV6_MULTICAST_HOPS}
- IPV6_MULTICAST_LOOP = 11; // Set/get IP multicast loopback
- {$EXTERNALSYM IPV6_MULTICAST_LOOP}
- IPV6_ADD_MEMBERSHIP = 12; // Add an IP group membership
- {$EXTERNALSYM IPV6_ADD_MEMBERSHIP}
- IPV6_DROP_MEMBERSHIP = 13; // Drop an IP group membership
- {$EXTERNALSYM IPV6_DROP_MEMBERSHIP}
- IPV6_JOIN_GROUP = IPV6_ADD_MEMBERSHIP;
- {$EXTERNALSYM IPV6_JOIN_GROUP}
- IPV6_LEAVE_GROUP = IPV6_DROP_MEMBERSHIP;
- {$EXTERNALSYM IPV6_LEAVE_GROUP}
- IPV6_PKTINFO = 19; // Receive packet information for ipv6
- {$EXTERNALSYM IPV6_PKTINFO}
-
-// Option to use with [gs]etsockopt at the IPPROTO_UDP level
-
- UDP_NOCHECKSUM = 1;
- {$EXTERNALSYM UDP_NOCHECKSUM}
- UDP_CHECKSUM_COVERAGE = 20; // Set/get UDP-Lite checksum coverage
- {$EXTERNALSYM UDP_CHECKSUM_COVERAGE}
-
-// Option to use with [gs]etsockopt at the IPPROTO_TCP level
-
- TCP_EXPEDITED_1122 = $0002;
- {$EXTERNALSYM TCP_EXPEDITED_1122}
-
-// IPv6 definitions
-
-type
- in6_addr = record
- case Integer of
- 0: (Byte: array [0..15] of u_char);
- 1: (Word: array[0..7] of u_short);
- 2: (s6_bytes: array [0..15] of u_char);
- 3: (s6_addr: array [0..15] of u_char);
- 4: (s6_words: array[0..7] of u_short);
- end;
- {$EXTERNALSYM in6_addr}
- TIn6Addr = in6_addr;
- PIn6Addr = ^in6_addr;
-
-//
-// Defines to match RFC 2553.
-//
-
-//#define _S6_un u
-//#define _S6_u8 Byte
-
-// Argument structure for IPV6_JOIN_GROUP and IPV6_LEAVE_GROUP
-
-type
- ipv6_mreq = record
- ipv6mr_multiaddr: in6_addr; // IPv6 multicast address
- ipv6mr_interface: Cardinal; // Interface index
- end;
- {$EXTERNALSYM ipv6_mreq}
- TIpV6MReq = ipv6_mreq;
- PIpV6MReq = ^ipv6_mreq;
-
-type
- in_addr6 = record
- s6_addr: array [0..15] of u_char; // IPv6 address
- end;
- {$EXTERNALSYM in_addr6}
- TInAddr6 = in_addr6;
- PInAddr6 = ^in_addr6;
-
-// Old IPv6 socket address structure (retained for sockaddr_gen definition below)
-
-type
- sockaddr_in6_old = record
- sin6_family: short; // AF_INET6
- sin6_port: u_short; // Transport level port number
- sin6_flowinfo: u_long; // IPv6 flow information
- sin6_addr: in6_addr; // IPv6 address
- end;
- {$EXTERNALSYM sockaddr_in6_old}
- TSockAddrIn6Old = sockaddr_in6_old;
- PSockAddrIn6Old = ^sockaddr_in6_old;
-
-// IPv6 socket address structure, RFC 2553
-
- SOCKADDR_IN6 = record
- sin6_family: short; // AF_INET6
- sin6_port: u_short; // Transport level port number
- sin6_flowinfo: u_long; // IPv6 flow information
- sin6_addr: in6_addr; // IPv6 address
- sin6_scope_id: u_long; // set of interfaces for a scope
- end;
- {$EXTERNALSYM SOCKADDR_IN6}
- PSOCKADDR_IN6 = ^SOCKADDR_IN6;
- {$EXTERNALSYM PSOCKADDR_IN6}
- LPSOCKADDR_IN6 = ^SOCKADDR_IN6;
- {$EXTERNALSYM LPSOCKADDR_IN6}
- TSockAddrIn6 = SOCKADDR_IN6;
- PSockAddrIn6 = LPSOCKADDR_IN6;
-
-// Macro that works for both IPv4 and IPv6
-
-function SS_PORT(ssp: Pointer): u_short;
-{$EXTERNALSYM SS_PORT}
-
-const
- IN6ADDR_ANY_INIT: in6_addr = (Word: (0, 0, 0, 0, 0, 0, 0, 0));
- {$EXTERNALSYM IN6ADDR_ANY_INIT}
- IN6ADDR_LOOPBACK_INIT: in6_addr = (Byte: (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1));
- {$EXTERNALSYM IN6ADDR_LOOPBACK_INIT}
-
- in6addr_any: in6_addr = (Word: (0, 0, 0, 0, 0, 0, 0, 0));
- {$EXTERNALSYM in6addr_any}
- in6addr_loopback: in6_addr = (Byte: (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1));
- {$EXTERNALSYM in6addr_loopback}
-
-procedure IN6ADDR_SETANY(var x: TSockAddrIn6);
-{$EXTERNALSYM IN6ADDR_SETANY}
-
-procedure IN6ADDR_SETLOOPBACK(var x: TSockAddrIn6);
-{$EXTERNALSYM IN6ADDR_SETLOOPBACK}
-
-function IN6ADDR_ISANY(const x: TSockAddrIn6): Boolean;
-{$EXTERNALSYM IN6ADDR_ISANY}
-
-function IN6ADDR_ISLOOPBACK(const x: TSockAddrIn6): Boolean;
-{$EXTERNALSYM IN6ADDR_ISLOOPBACK}
-
-function IN6_ADDR_EQUAL(const a, b: in6_addr): Boolean;
-{$EXTERNALSYM IN6_ADDR_EQUAL}
-function IN6_IS_ADDR_UNSPECIFIED(const a: in6_addr): boolean;
-{$EXTERNALSYM IN6_IS_ADDR_UNSPECIFIED}
-function IN6_IS_ADDR_LOOPBACK(const a: in6_addr): Boolean;
-{$EXTERNALSYM IN6_IS_ADDR_LOOPBACK}
-function IN6_IS_ADDR_MULTICAST(const a: in6_addr): Boolean;
-{$EXTERNALSYM IN6_IS_ADDR_MULTICAST}
-function IN6_IS_ADDR_LINKLOCAL(const a: in6_addr): Boolean;
-{$EXTERNALSYM IN6_IS_ADDR_LINKLOCAL}
-function IN6_IS_ADDR_SITELOCAL(const a: in6_addr): Boolean;
-{$EXTERNALSYM IN6_IS_ADDR_SITELOCAL}
-function IN6_IS_ADDR_V4MAPPED(const a: in6_addr): Boolean;
-{$EXTERNALSYM IN6_IS_ADDR_V4MAPPED}
-function IN6_IS_ADDR_V4COMPAT(const a: in6_addr): Boolean;
-{$EXTERNALSYM IN6_IS_ADDR_V4COMPAT}
-function IN6_IS_ADDR_MC_NODELOCAL(const a: in6_addr): Boolean;
-{$EXTERNALSYM IN6_IS_ADDR_MC_NODELOCAL}
-function IN6_IS_ADDR_MC_LINKLOCAL(const a: in6_addr): Boolean;
-{$EXTERNALSYM IN6_IS_ADDR_MC_LINKLOCAL}
-function IN6_IS_ADDR_MC_SITELOCAL(const a: in6_addr): Boolean;
-{$EXTERNALSYM IN6_IS_ADDR_MC_SITELOCAL}
-function IN6_IS_ADDR_MC_ORGLOCAL(const a: in6_addr): Boolean;
-{$EXTERNALSYM IN6_IS_ADDR_MC_ORGLOCAL}
-function IN6_IS_ADDR_MC_GLOBAL(const a: in6_addr): Boolean;
-{$EXTERNALSYM IN6_IS_ADDR_MC_GLOBAL}
-
-type
- sockaddr_gen = record
- case Integer of
- 0: (Address: sockaddr);
- 1: (AddressIn: sockaddr_in);
- 2: (AddressIn6: sockaddr_in6_old);
- end;
- {$EXTERNALSYM sockaddr_gen}
- TSockAddrGen = sockaddr_gen;
- PSockAddrGen = ^sockaddr_gen;
-
-// Structure to keep interface specific information
-
- _INTERFACE_INFO = record
- iiFlags: u_long; // Interface flags
- iiAddress: sockaddr_gen; // Interface address
- iiBroadcastAddress: sockaddr_gen; // Broadcast address
- iiNetmask: sockaddr_gen; // Network mask
- end;
- {$EXTERNALSYM _INTERFACE_INFO}
- INTERFACE_INFO = _INTERFACE_INFO;
- {$EXTERNALSYM INTERFACE_INFO}
- LPINTERFACE_INFO = ^INTERFACE_INFO;
- {$EXTERNALSYM LPINTERFACE_INFO}
- TInterfaceInfo = INTERFACE_INFO;
- PInterfaceInfo = LPINTERFACE_INFO;
-
-// New structure that does not have dependency on the address size
-
- _INTERFACE_INFO_EX = record
- iiFlags: u_long; // Interface flags
- iiAddress: SOCKET_ADDRESS; // Interface address
- iiBroadcastAddress: SOCKET_ADDRESS; // Broadcast address
- iiNetmask: SOCKET_ADDRESS; // Network mask
- end;
- {$EXTERNALSYM _INTERFACE_INFO_EX}
- INTERFACE_INFO_EX = _INTERFACE_INFO_EX;
- {$EXTERNALSYM INTERFACE_INFO_EX}
- LPINTERFACE_INFO_EX = ^INTERFACE_INFO_EX;
- {$EXTERNALSYM LPINTERFACE_INFO_EX}
- TInterfaceInfoEx = INTERFACE_INFO_EX;
- PInterfaceInfoEx = LPINTERFACE_INFO_EX;
-
-// Possible flags for the iiFlags - bitmask
-
-const
- IFF_UP = $00000001; // Interface is up
- {$EXTERNALSYM IFF_UP}
- IFF_BROADCAST = $00000002; // Broadcast is supported
- {$EXTERNALSYM IFF_BROADCAST}
- IFF_LOOPBACK = $00000004; // this is loopback interface
- {$EXTERNALSYM IFF_LOOPBACK}
- IFF_POINTTOPOINT = $00000008; //this is point-to-point interface
- {$EXTERNALSYM IFF_POINTTOPOINT}
- IFF_MULTICAST = $00000010; // multicast is supported
- {$EXTERNALSYM IFF_MULTICAST}
-
-// structure for IP_PKTINFO option
-//
-
-type
- in_pktinfo = record
- ipi_addr: IN_ADDR; // destination IPv4 address
- ipi_ifindex: UINT; // received interface index
- end;
- {$EXTERNALSYM in_pktinfo}
- TInPktInfo = in_pktinfo;
- PInPktInfo = ^in_pktinfo;
-
-// C_ASSERT(sizeof(IN_PKTINFO) == 8);
-
-// structure for IPV6_PKTINFO option
-//
-
- in6_pktinfo = record
- ipi6_addr: IN6_ADDR; // destination IPv6 address
- ipi6_ifindex: UINT; // received interface index
- end;
- {$EXTERNALSYM in6_pktinfo}
- TIn6PktInfo = in6_pktinfo;
- PIn6PktInfo = ^in6_pktinfo;
-
-// C_ASSERT(sizeof(IN6_PKTINFO) == 20);
-
-// Error codes from getaddrinfo()
-
-const
- EAI_AGAIN = WSATRY_AGAIN;
- {$EXTERNALSYM EAI_AGAIN}
- EAI_BADFLAGS = WSAEINVAL;
- {$EXTERNALSYM EAI_BADFLAGS}
- EAI_FAIL = WSANO_RECOVERY;
- {$EXTERNALSYM EAI_FAIL}
- EAI_FAMILY = WSAEAFNOSUPPORT;
- {$EXTERNALSYM EAI_FAMILY}
- EAI_MEMORY = WSA_NOT_ENOUGH_MEMORY;
- {$EXTERNALSYM EAI_MEMORY}
-//#define EAI_NODATA WSANO_DATA
- EAI_NONAME = WSAHOST_NOT_FOUND;
- {$EXTERNALSYM EAI_NONAME}
- EAI_SERVICE = WSATYPE_NOT_FOUND;
- {$EXTERNALSYM EAI_SERVICE}
- EAI_SOCKTYPE = WSAESOCKTNOSUPPORT;
- {$EXTERNALSYM EAI_SOCKTYPE}
-
-//
-// DCR_FIX: EAI_NODATA remove or fix
-//
-// EAI_NODATA was removed from rfc2553bis
-// need to find out from the authors why and
-// determine the error for "no records of this type"
-// temporarily, we'll keep #define to avoid changing
-// code that could change back; use NONAME
-//
-
- EAI_NODATA = EAI_NONAME;
- {$EXTERNALSYM EAI_NODATA}
-
-// Structure used in getaddrinfo() call
-
-type
- LPADDRINFO = ^addrinfo;
- {$EXTERNALSYM LPADDRINFO}
- addrinfo = record
- ai_flags: Integer; // AI_PASSIVE, AI_CANONNAME, AI_NUMERICHOST
- ai_family: Integer; // PF_xxx
- ai_socktype: Integer; // SOCK_xxx
- ai_protocol: Integer; // 0 or IPPROTO_xxx for IPv4 and IPv6
- ai_addrlen: size_t; // Length of ai_addr
- ai_canonname: PChar; // Canonical name for nodename
- ai_addr: PSockAddr; // Binary address
- ai_next: LPADDRINFO; // Next structure in linked list
- end;
- {$EXTERNALSYM addrinfo}
- TAddrInfo = addrinfo;
- PAddrInfo = LPADDRINFO;
-
-// Flags used in "hints" argument to getaddrinfo()
-
-const
- AI_PASSIVE = $1; // Socket address will be used in bind() call
- {$EXTERNALSYM AI_PASSIVE}
- AI_CANONNAME = $2; // Return canonical name in first ai_canonname
- {$EXTERNALSYM AI_CANONNAME}
- AI_NUMERICHOST = $4; // Nodename must be a numeric address string
- {$EXTERNALSYM AI_NUMERICHOST}
-
-function getaddrinfo(nodename, servname: PChar; hints: PAddrInfo; var res: PAddrInfo): Integer; stdcall;
-{$EXTERNALSYM getaddrinfo}
-
-procedure freeaddrinfo(ai: PAddrInfo); stdcall;
-{$EXTERNALSYM freeaddrinfo}
-
-// WARNING: The gai_strerror inline functions below use static buffers,
-// and hence are not thread-safe. We'll use buffers long enough to hold
-// 1k characters. Any system error messages longer than this will be
-// returned as empty strings. However 1k should work for the error codes
-// used by getaddrinfo().
-
-const
- GAI_STRERROR_BUFFER_SIZE = 1024;
- {$EXTERNALSYM GAI_STRERROR_BUFFER_SIZE}
-
-function gai_strerrorA(ecode: Integer): PChar;
-{$EXTERNALSYM gai_strerrorA}
-function gai_strerrorW(ecode: Integer): PWideChar;
-{$EXTERNALSYM gai_strerrorW}
-function gai_strerror(ecode: Integer): PTCHAR;
-{$EXTERNALSYM gai_strerror}
-
-type
- socklen_t = Integer;
- {$EXTERNALSYM socklen_t}
-
-function getnameinfo(sa: PSockAddr; salen: socklen_t; host: PChar; hostlen: DWORD; serv: PChar; servlen: DWORD; flags: Integer): Integer; stdcall;
-{$EXTERNALSYM getnameinfo}
-
-const
- NI_MAXHOST = 1025; // Max size of a fully-qualified domain name
- {$EXTERNALSYM NI_MAXHOST}
- NI_MAXSERV = 32; // Max size of a service name
- {$EXTERNALSYM NI_MAXSERV}
-
- INET_ADDRSTRLEN = 16; // Max size of numeric form of IPv4 address
- {$EXTERNALSYM INET_ADDRSTRLEN}
- INET6_ADDRSTRLEN = 46; // Max size of numeric form of IPv6 address
- {$EXTERNALSYM INET6_ADDRSTRLEN}
-
-// Flags for getnameinfo()
-
- NI_NOFQDN = $01; // Only return nodename portion for local hosts
- {$EXTERNALSYM NI_NOFQDN}
- NI_NUMERICHOST = $02; // Return numeric form of the host's address
- {$EXTERNALSYM NI_NUMERICHOST}
- NI_NAMEREQD = $04; // Error if the host's name not in DNS
- {$EXTERNALSYM NI_NAMEREQD}
- NI_NUMERICSERV = $08; // Return numeric form of the service (port #)
- {$EXTERNALSYM NI_NUMERICSERV}
- NI_DGRAM = $10; // Service is a datagram service
- {$EXTERNALSYM NI_DGRAM}
-
-implementation
-
-uses
- SysUtils, JwaWinBase, JwaWinNT;
-
-function IP_MSFILTER_SIZE(numsrc: Integer): Integer;
-begin
- Result := SizeOf(ip_msfilter) - SizeOf(in_addr) + (numsrc * SizeOf(in_addr));
-end;
-
-function SS_PORT(ssp: Pointer): u_short;
-begin
- Result := PSockAddrIn(ssp)^.sin_port;
-end;
-
-procedure IN6ADDR_SETANY(var x: TSockAddrIn6);
-var
- I: Integer;
-begin
- x.sin6_family := AF_INET6;
- x.sin6_port := 0;
- x.sin6_flowinfo := 0;
- for I := 0 to 15 do
- x.sin6_addr.s6_addr[I] := 0;
-end;
-
-procedure IN6ADDR_SETLOOPBACK(var x: TSockAddrIn6);
-var
- I: Integer;
-begin
- x.sin6_family := AF_INET6;
- x.sin6_port := 0;
- x.sin6_flowinfo := 0;
- for I := 0 to 14 do
- x.sin6_addr.s6_addr[I] := 0;
- x.sin6_addr.s6_addr[15] := 1;
-end;
-
-function IN6ADDR_ISANY(const x: TSockAddrIn6): Boolean;
-var
- I: Integer;
-begin
- Result := x.sin6_family = AF_INET6;
- for I := 0 to 15 do
- Result := Result and (x.sin6_addr.s6_addr[I] = 0);
-end;
-
-function IN6ADDR_ISLOOPBACK(const x: TSockAddrIn6): Boolean;
-var
- I: Integer;
-begin
- Result := x.sin6_family = AF_INET6;
- for I := 0 to 14 do
- Result := Result and (x.sin6_addr.s6_addr[I] = 0);
- Result := Result and (x.sin6_addr.s6_addr[15] = 1);
-end;
-
-function IN6_ADDR_EQUAL(const a, b: in6_addr): Boolean;
-begin
- Result := CompareMem(@a, @b, SizeOf(in6_addr));
-end;
-
-function IN6_IS_ADDR_UNSPECIFIED(const a: in6_addr): boolean;
-begin
- Result := IN6_ADDR_EQUAL(a, in6addr_any);
-end;
-
-function IN6_IS_ADDR_LOOPBACK(const a: in6_addr): Boolean;
-begin
- Result := IN6_ADDR_EQUAL(a, in6addr_loopback);
-end;
-
-function IN6_IS_ADDR_MULTICAST(const a: in6_addr): Boolean;
-begin
- Result := (a.s6_bytes[0] = $ff);
-end;
-
-function IN6_IS_ADDR_LINKLOCAL(const a: in6_addr): Boolean;
-begin
- Result := ((a.s6_bytes[0] = $fe) and ((a.s6_bytes[1] and $c0) = $80));
-end;
-
-function IN6_IS_ADDR_SITELOCAL(const a: in6_addr): Boolean;
-begin
- Result := ((a.s6_bytes[0] = $fe) and ((a.s6_bytes[1] and $c0) = $c0));
-end;
-
-function IN6_IS_ADDR_V4MAPPED(const a: in6_addr): Boolean;
-begin
- Result := ((a.s6_words[0] = 0) and (a.s6_words[1] = 0) and (a.s6_words[2] = 0) and
- (a.s6_words[3] = 0) and (a.s6_words[4] = 0) and (a.s6_words[5] = $ffff));
-end;
-
-function IN6_IS_ADDR_V4COMPAT(const a: in6_addr): Boolean;
-begin
- Result :=
- ((a.s6_words[0] = 0) and
- (a.s6_words[1] = 0) and
- (a.s6_words[2] = 0) and
- (a.s6_words[3] = 0) and
- (a.s6_words[4] = 0) and
- (a.s6_words[5] = 0) and
- not ((a.s6_words[6] = 0) and
- (a.s6_addr[14] = 0) and
- ((a.s6_addr[15] = 0) or (a.s6_addr[15] = 1))));
-end;
-
-function IN6_IS_ADDR_MC_NODELOCAL(const a: in6_addr): Boolean;
-begin
- Result := IN6_IS_ADDR_MULTICAST(a) and ((a.s6_bytes[1] and $f) = 1);
-end;
-
-function IN6_IS_ADDR_MC_LINKLOCAL(const a: in6_addr): Boolean;
-begin
- Result := IN6_IS_ADDR_MULTICAST(a) and ((a.s6_bytes[1] and $f) = 2);
-end;
-
-function IN6_IS_ADDR_MC_SITELOCAL(const a: in6_addr): Boolean;
-begin
- Result := IN6_IS_ADDR_MULTICAST(a) and ((a.s6_bytes[1] and $f) = 5);
-end;
-
-function IN6_IS_ADDR_MC_ORGLOCAL(const a: in6_addr): Boolean;
-begin
- Result := IN6_IS_ADDR_MULTICAST(a) and ((a.s6_bytes[1] and $f) = 8);
-end;
-
-function IN6_IS_ADDR_MC_GLOBAL(const a: in6_addr): Boolean;
-begin
- Result := IN6_IS_ADDR_MULTICAST(a) and ((a.s6_bytes[1] and $f) = $e);
-end;
-
-var
- gai_strerror_buffA: array [0..GAI_STRERROR_BUFFER_SIZE-1] of Char;
- gai_strerror_buffW: array [0..GAI_STRERROR_BUFFER_SIZE-1] of WideChar;
-
-function gai_strerrorA(ecode: Integer): PChar;
-var
- dwMsgLen: DWORD;
-begin
- dwMsgLen := FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM or FORMAT_MESSAGE_IGNORE_INSERTS or FORMAT_MESSAGE_MAX_WIDTH_MASK,
- nil, ecode, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), PChar(@gai_strerror_buffA[0]), GAI_STRERROR_BUFFER_SIZE, nil);
- if dwMsgLen = 0 then
- Result := nil
- else
- Result := PChar(@gai_strerror_buffA[0]);
-end;
-
-function gai_strerrorW(ecode: Integer): PWideChar;
-var
- dwMsgLen: DWORD;
-begin
- dwMsgLen := FormatMessageW(FORMAT_MESSAGE_FROM_SYSTEM or FORMAT_MESSAGE_IGNORE_INSERTS or FORMAT_MESSAGE_MAX_WIDTH_MASK,
- nil, ecode, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), PWideChar(@gai_strerror_buffW[0]), GAI_STRERROR_BUFFER_SIZE, nil);
- if dwMsgLen = 0 then
- Result := nil
- else
- Result := PWideChar(@gai_strerror_buffW[0]);
-end;
-
-function gai_strerror(ecode: Integer): PTCHAR;
-begin
- {$IFDEF UNICODE}
- Result := PTCHAR(gai_strerrorW(ecode));
- {$ELSE}
- Result := PTCHAR(gai_strerrorA(ecode));
- {$ENDIF UNICODE}
-end;
-
-const
- ws2tcpip = 'ws2_32.dll';
-
-{$IFDEF DYNAMIC_LINK}
-
-var
- _getaddrinfo: Pointer;
-
-function getaddrinfo;
-begin
- GetProcedureAddress(_getaddrinfo, ws2tcpip, 'getaddrinfo');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_getaddrinfo]
- end;
-end;
-
-var
- _freeaddrinfo: Pointer;
-
-procedure freeaddrinfo;
-begin
- GetProcedureAddress(_freeaddrinfo, ws2tcpip, 'freeaddrinfo');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_freeaddrinfo]
- end;
-end;
-
-var
- _getnameinfo: Pointer;
-
-function getnameinfo;
-begin
- GetProcedureAddress(_getnameinfo, ws2tcpip, 'getnameinfo');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_getnameinfo]
- end;
-end;
-
-{$ELSE}
-
-function getaddrinfo; external ws2tcpip name 'getaddrinfo';
-procedure freeaddrinfo; external ws2tcpip name 'freeaddrinfo';
-function getnameinfo; external ws2tcpip name 'getnameinfo';
-
-{$ENDIF DYNAMIC_LINK}
-
-end.
+{******************************************************************************}
+{ }
+{ Winsock2 TCP/IP Extensions API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: ws2tcpip.h, released June 2000. The original Pascal }
+{ code is: WS2tcpip.pas, released December 2000. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwaws2tcpip.pas,v 1.1 2005/04/04 07:56:11 marco Exp $
+
+unit JwaWS2tcpip;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "ws2tcpip.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaWinSock2, JwaWinType;
+
+//
+// WS2TCPIP.H - WinSock2 Extension for TCP/IP protocols
+//
+// This file contains TCP/IP specific information for use
+// by WinSock2 compatible applications.
+//
+// Copyright (c) 1995-1999 Microsoft Corporation
+//
+// To provide the backward compatibility, all the TCP/IP
+// specific definitions that were included in the WINSOCK.H
+// file are now included in WINSOCK2.H file. WS2TCPIP.H
+// file includes only the definitions introduced in the
+// "WinSock 2 Protocol-Specific Annex" document.
+//
+// Rev 0.3 Nov 13, 1995
+// Rev 0.4 Dec 15, 1996
+//
+
+// Argument structure for IP_ADD_MEMBERSHIP and IP_DROP_MEMBERSHIP
+
+type
+ ip_mreq = record
+ imr_multiaddr: in_addr; // IP multicast address of group
+ imr_interface: in_addr; // local IP address of interface
+ end;
+ {$EXTERNALSYM ip_mreq}
+ TIPMReq = ip_mreq;
+ PIPMReq = ^ip_mreq;
+
+// Argument structure for IP_ADD_SOURCE_MEMBERSHIP, IP_DROP_SOURCE_MEMBERSHIP,
+// IP_BLOCK_SOURCE, and IP_UNBLOCK_SOURCE
+//
+
+ ip_mreq_source = record
+ imr_multiaddr: in_addr; // IP multicast address of group
+ imr_sourceaddr: in_addr; // IP address of source
+ imr_interface: in_addr; // local IP address of interface
+ end;
+ {$EXTERNALSYM ip_mreq_source}
+ TIpMreqSource = ip_mreq_source;
+ PIpMreqSource = ^ip_mreq_source;
+
+// Argument structure for SIO_{GET,SET}_MULTICAST_FILTER
+
+ ip_msfilter = record
+ imsf_multiaddr: in_addr; // IP multicast address of group
+ imsf_interface: in_addr; // local IP address of interface
+ imsf_fmode: u_long; // filter mode - INCLUDE or EXCLUDE
+ imsf_numsrc: u_long; // number of sources in src_list
+ imsf_slist: array [0..0] of in_addr;
+ end;
+ {$EXTERNALSYM ip_msfilter}
+ TIpMsFilter = ip_msfilter;
+ PIpMsFilter = ^ip_msfilter;
+
+function IP_MSFILTER_SIZE(numsrc: Integer): Integer;
+{$EXTERNALSYM IP_MSFILTER_SIZE(numsrc)}
+
+const
+ MCAST_INCLUDE = 0;
+ {$EXTERNALSYM MCAST_INCLUDE}
+ MCAST_EXCLUDE = 1;
+ {$EXTERNALSYM MCAST_EXCLUDE}
+
+// TCP/IP specific Ioctl codes
+
+const
+ SIO_GET_INTERFACE_LIST = IOC_OUT or ((4 and IOCPARM_MASK) shl 16) or ((Ord('t')) shl 8) or (127);
+ {$EXTERNALSYM SIO_GET_INTERFACE_LIST}
+
+// New IOCTL with address size independent address array
+
+ SIO_GET_INTERFACE_LIST_EX = IOC_OUT or ((4 and IOCPARM_MASK) shl 16) or ((Ord('t')) shl 8) or (126);
+ {$EXTERNALSYM SIO_GET_INTERFACE_LIST_EX}
+
+ SIO_SET_MULTICAST_FILTER = DWORD(IOC_IN or ((SizeOf(u_long) and IOCPARM_MASK) shl 16) or (Ord('t') shl 8) or 125);
+ {$EXTERNALSYM SIO_SET_MULTICAST_FILTER}
+ SIO_GET_MULTICAST_FILTER = DWORD(IOC_IN or ((SizeOf(u_long) and IOCPARM_MASK) shl 16) or (Ord('t') shl 8) or 124 or IOC_IN);
+ {$EXTERNALSYM SIO_GET_MULTICAST_FILTER}
+
+// Option to use with [gs]etsockopt at the IPPROTO_IP level
+
+const
+ IP_OPTIONS = 1; // set/get IP options
+ {$EXTERNALSYM IP_OPTIONS}
+ IP_HDRINCL = 2; // header is included with data
+ {$EXTERNALSYM IP_HDRINCL}
+ IP_TOS = 3; // IP type of service and preced
+ {$EXTERNALSYM IP_TOS}
+ IP_TTL = 4; // IP time to live
+ {$EXTERNALSYM IP_TTL}
+ IP_MULTICAST_IF = 9; // set/get IP multicast i/f
+ {$EXTERNALSYM IP_MULTICAST_IF}
+ IP_MULTICAST_TTL = 10; // set/get IP multicast ttl
+ {$EXTERNALSYM IP_MULTICAST_TTL}
+ IP_MULTICAST_LOOP = 11; // set/get IP multicast loopback
+ {$EXTERNALSYM IP_MULTICAST_LOOP}
+ IP_ADD_MEMBERSHIP = 12; // add an IP group membership
+ {$EXTERNALSYM IP_ADD_MEMBERSHIP}
+ IP_DROP_MEMBERSHIP = 13; // drop an IP group membership
+ {$EXTERNALSYM IP_DROP_MEMBERSHIP}
+ IP_DONTFRAGMENT = 14; // don't fragment IP datagrams
+ {$EXTERNALSYM IP_DONTFRAGMENT}
+ IP_ADD_SOURCE_MEMBERSHIP = 15; // join IP group/source
+ {$EXTERNALSYM IP_ADD_SOURCE_MEMBERSHIP}
+ IP_DROP_SOURCE_MEMBERSHIP = 16; // leave IP group/source
+ {$EXTERNALSYM IP_DROP_SOURCE_MEMBERSHIP}
+ IP_BLOCK_SOURCE = 17; // block IP group/source
+ {$EXTERNALSYM IP_BLOCK_SOURCE}
+ IP_UNBLOCK_SOURCE = 18; // unblock IP group/source
+ {$EXTERNALSYM IP_UNBLOCK_SOURCE}
+ IP_PKTINFO = 19; // receive packet information for ipv4
+ {$EXTERNALSYM IP_PKTINFO}
+
+// Option to use with [gs]etsockopt at the IPPROTO_IPV6 level
+
+ IPV6_HDRINCL = 2; // Header is included with data
+ {$EXTERNALSYM IPV6_HDRINCL}
+ IPV6_UNICAST_HOPS = 4; // Set/get IP unicast hop limit
+ {$EXTERNALSYM IPV6_UNICAST_HOPS}
+ IPV6_MULTICAST_IF = 9; // Set/get IP multicast interface
+ {$EXTERNALSYM IPV6_MULTICAST_IF}
+ IPV6_MULTICAST_HOPS = 10; // Set/get IP multicast ttl
+ {$EXTERNALSYM IPV6_MULTICAST_HOPS}
+ IPV6_MULTICAST_LOOP = 11; // Set/get IP multicast loopback
+ {$EXTERNALSYM IPV6_MULTICAST_LOOP}
+ IPV6_ADD_MEMBERSHIP = 12; // Add an IP group membership
+ {$EXTERNALSYM IPV6_ADD_MEMBERSHIP}
+ IPV6_DROP_MEMBERSHIP = 13; // Drop an IP group membership
+ {$EXTERNALSYM IPV6_DROP_MEMBERSHIP}
+ IPV6_JOIN_GROUP = IPV6_ADD_MEMBERSHIP;
+ {$EXTERNALSYM IPV6_JOIN_GROUP}
+ IPV6_LEAVE_GROUP = IPV6_DROP_MEMBERSHIP;
+ {$EXTERNALSYM IPV6_LEAVE_GROUP}
+ IPV6_PKTINFO = 19; // Receive packet information for ipv6
+ {$EXTERNALSYM IPV6_PKTINFO}
+
+// Option to use with [gs]etsockopt at the IPPROTO_UDP level
+
+ UDP_NOCHECKSUM = 1;
+ {$EXTERNALSYM UDP_NOCHECKSUM}
+ UDP_CHECKSUM_COVERAGE = 20; // Set/get UDP-Lite checksum coverage
+ {$EXTERNALSYM UDP_CHECKSUM_COVERAGE}
+
+// Option to use with [gs]etsockopt at the IPPROTO_TCP level
+
+ TCP_EXPEDITED_1122 = $0002;
+ {$EXTERNALSYM TCP_EXPEDITED_1122}
+
+// IPv6 definitions
+
+type
+ in6_addr = record
+ case Integer of
+ 0: (Byte: array [0..15] of u_char);
+ 1: (Word: array[0..7] of u_short);
+ 2: (s6_bytes: array [0..15] of u_char);
+ 3: (s6_addr: array [0..15] of u_char);
+ 4: (s6_words: array[0..7] of u_short);
+ end;
+ {$EXTERNALSYM in6_addr}
+ TIn6Addr = in6_addr;
+ PIn6Addr = ^in6_addr;
+
+//
+// Defines to match RFC 2553.
+//
+
+//#define _S6_un u
+//#define _S6_u8 Byte
+
+// Argument structure for IPV6_JOIN_GROUP and IPV6_LEAVE_GROUP
+
+type
+ ipv6_mreq = record
+ ipv6mr_multiaddr: in6_addr; // IPv6 multicast address
+ ipv6mr_interface: Cardinal; // Interface index
+ end;
+ {$EXTERNALSYM ipv6_mreq}
+ TIpV6MReq = ipv6_mreq;
+ PIpV6MReq = ^ipv6_mreq;
+
+type
+ in_addr6 = record
+ s6_addr: array [0..15] of u_char; // IPv6 address
+ end;
+ {$EXTERNALSYM in_addr6}
+ TInAddr6 = in_addr6;
+ PInAddr6 = ^in_addr6;
+
+// Old IPv6 socket address structure (retained for sockaddr_gen definition below)
+
+type
+ sockaddr_in6_old = record
+ sin6_family: short; // AF_INET6
+ sin6_port: u_short; // Transport level port number
+ sin6_flowinfo: u_long; // IPv6 flow information
+ sin6_addr: in6_addr; // IPv6 address
+ end;
+ {$EXTERNALSYM sockaddr_in6_old}
+ TSockAddrIn6Old = sockaddr_in6_old;
+ PSockAddrIn6Old = ^sockaddr_in6_old;
+
+// IPv6 socket address structure, RFC 2553
+
+ SOCKADDR_IN6 = record
+ sin6_family: short; // AF_INET6
+ sin6_port: u_short; // Transport level port number
+ sin6_flowinfo: u_long; // IPv6 flow information
+ sin6_addr: in6_addr; // IPv6 address
+ sin6_scope_id: u_long; // set of interfaces for a scope
+ end;
+ {$EXTERNALSYM SOCKADDR_IN6}
+ PSOCKADDR_IN6 = ^SOCKADDR_IN6;
+ {$EXTERNALSYM PSOCKADDR_IN6}
+ LPSOCKADDR_IN6 = ^SOCKADDR_IN6;
+ {$EXTERNALSYM LPSOCKADDR_IN6}
+ TSockAddrIn6 = SOCKADDR_IN6;
+ PSockAddrIn6 = LPSOCKADDR_IN6;
+
+// Macro that works for both IPv4 and IPv6
+
+function SS_PORT(ssp: Pointer): u_short;
+{$EXTERNALSYM SS_PORT}
+
+const
+ IN6ADDR_ANY_INIT: in6_addr = (Word: (0, 0, 0, 0, 0, 0, 0, 0));
+ {$EXTERNALSYM IN6ADDR_ANY_INIT}
+ IN6ADDR_LOOPBACK_INIT: in6_addr = (Byte: (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1));
+ {$EXTERNALSYM IN6ADDR_LOOPBACK_INIT}
+
+ in6addr_any: in6_addr = (Word: (0, 0, 0, 0, 0, 0, 0, 0));
+ {$EXTERNALSYM in6addr_any}
+ in6addr_loopback: in6_addr = (Byte: (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1));
+ {$EXTERNALSYM in6addr_loopback}
+
+procedure IN6ADDR_SETANY(var x: TSockAddrIn6);
+{$EXTERNALSYM IN6ADDR_SETANY}
+
+procedure IN6ADDR_SETLOOPBACK(var x: TSockAddrIn6);
+{$EXTERNALSYM IN6ADDR_SETLOOPBACK}
+
+function IN6ADDR_ISANY(const x: TSockAddrIn6): Boolean;
+{$EXTERNALSYM IN6ADDR_ISANY}
+
+function IN6ADDR_ISLOOPBACK(const x: TSockAddrIn6): Boolean;
+{$EXTERNALSYM IN6ADDR_ISLOOPBACK}
+
+function IN6_ADDR_EQUAL(const a, b: in6_addr): Boolean;
+{$EXTERNALSYM IN6_ADDR_EQUAL}
+function IN6_IS_ADDR_UNSPECIFIED(const a: in6_addr): boolean;
+{$EXTERNALSYM IN6_IS_ADDR_UNSPECIFIED}
+function IN6_IS_ADDR_LOOPBACK(const a: in6_addr): Boolean;
+{$EXTERNALSYM IN6_IS_ADDR_LOOPBACK}
+function IN6_IS_ADDR_MULTICAST(const a: in6_addr): Boolean;
+{$EXTERNALSYM IN6_IS_ADDR_MULTICAST}
+function IN6_IS_ADDR_LINKLOCAL(const a: in6_addr): Boolean;
+{$EXTERNALSYM IN6_IS_ADDR_LINKLOCAL}
+function IN6_IS_ADDR_SITELOCAL(const a: in6_addr): Boolean;
+{$EXTERNALSYM IN6_IS_ADDR_SITELOCAL}
+function IN6_IS_ADDR_V4MAPPED(const a: in6_addr): Boolean;
+{$EXTERNALSYM IN6_IS_ADDR_V4MAPPED}
+function IN6_IS_ADDR_V4COMPAT(const a: in6_addr): Boolean;
+{$EXTERNALSYM IN6_IS_ADDR_V4COMPAT}
+function IN6_IS_ADDR_MC_NODELOCAL(const a: in6_addr): Boolean;
+{$EXTERNALSYM IN6_IS_ADDR_MC_NODELOCAL}
+function IN6_IS_ADDR_MC_LINKLOCAL(const a: in6_addr): Boolean;
+{$EXTERNALSYM IN6_IS_ADDR_MC_LINKLOCAL}
+function IN6_IS_ADDR_MC_SITELOCAL(const a: in6_addr): Boolean;
+{$EXTERNALSYM IN6_IS_ADDR_MC_SITELOCAL}
+function IN6_IS_ADDR_MC_ORGLOCAL(const a: in6_addr): Boolean;
+{$EXTERNALSYM IN6_IS_ADDR_MC_ORGLOCAL}
+function IN6_IS_ADDR_MC_GLOBAL(const a: in6_addr): Boolean;
+{$EXTERNALSYM IN6_IS_ADDR_MC_GLOBAL}
+
+type
+ sockaddr_gen = record
+ case Integer of
+ 0: (Address: sockaddr);
+ 1: (AddressIn: sockaddr_in);
+ 2: (AddressIn6: sockaddr_in6_old);
+ end;
+ {$EXTERNALSYM sockaddr_gen}
+ TSockAddrGen = sockaddr_gen;
+ PSockAddrGen = ^sockaddr_gen;
+
+// Structure to keep interface specific information
+
+ _INTERFACE_INFO = record
+ iiFlags: u_long; // Interface flags
+ iiAddress: sockaddr_gen; // Interface address
+ iiBroadcastAddress: sockaddr_gen; // Broadcast address
+ iiNetmask: sockaddr_gen; // Network mask
+ end;
+ {$EXTERNALSYM _INTERFACE_INFO}
+ INTERFACE_INFO = _INTERFACE_INFO;
+ {$EXTERNALSYM INTERFACE_INFO}
+ LPINTERFACE_INFO = ^INTERFACE_INFO;
+ {$EXTERNALSYM LPINTERFACE_INFO}
+ TInterfaceInfo = INTERFACE_INFO;
+ PInterfaceInfo = LPINTERFACE_INFO;
+
+// New structure that does not have dependency on the address size
+
+ _INTERFACE_INFO_EX = record
+ iiFlags: u_long; // Interface flags
+ iiAddress: SOCKET_ADDRESS; // Interface address
+ iiBroadcastAddress: SOCKET_ADDRESS; // Broadcast address
+ iiNetmask: SOCKET_ADDRESS; // Network mask
+ end;
+ {$EXTERNALSYM _INTERFACE_INFO_EX}
+ INTERFACE_INFO_EX = _INTERFACE_INFO_EX;
+ {$EXTERNALSYM INTERFACE_INFO_EX}
+ LPINTERFACE_INFO_EX = ^INTERFACE_INFO_EX;
+ {$EXTERNALSYM LPINTERFACE_INFO_EX}
+ TInterfaceInfoEx = INTERFACE_INFO_EX;
+ PInterfaceInfoEx = LPINTERFACE_INFO_EX;
+
+// Possible flags for the iiFlags - bitmask
+
+const
+ IFF_UP = $00000001; // Interface is up
+ {$EXTERNALSYM IFF_UP}
+ IFF_BROADCAST = $00000002; // Broadcast is supported
+ {$EXTERNALSYM IFF_BROADCAST}
+ IFF_LOOPBACK = $00000004; // this is loopback interface
+ {$EXTERNALSYM IFF_LOOPBACK}
+ IFF_POINTTOPOINT = $00000008; //this is point-to-point interface
+ {$EXTERNALSYM IFF_POINTTOPOINT}
+ IFF_MULTICAST = $00000010; // multicast is supported
+ {$EXTERNALSYM IFF_MULTICAST}
+
+// structure for IP_PKTINFO option
+//
+
+type
+ in_pktinfo = record
+ ipi_addr: IN_ADDR; // destination IPv4 address
+ ipi_ifindex: UINT; // received interface index
+ end;
+ {$EXTERNALSYM in_pktinfo}
+ TInPktInfo = in_pktinfo;
+ PInPktInfo = ^in_pktinfo;
+
+// C_ASSERT(sizeof(IN_PKTINFO) == 8);
+
+// structure for IPV6_PKTINFO option
+//
+
+ in6_pktinfo = record
+ ipi6_addr: IN6_ADDR; // destination IPv6 address
+ ipi6_ifindex: UINT; // received interface index
+ end;
+ {$EXTERNALSYM in6_pktinfo}
+ TIn6PktInfo = in6_pktinfo;
+ PIn6PktInfo = ^in6_pktinfo;
+
+// C_ASSERT(sizeof(IN6_PKTINFO) == 20);
+
+// Error codes from getaddrinfo()
+
+const
+ EAI_AGAIN = WSATRY_AGAIN;
+ {$EXTERNALSYM EAI_AGAIN}
+ EAI_BADFLAGS = WSAEINVAL;
+ {$EXTERNALSYM EAI_BADFLAGS}
+ EAI_FAIL = WSANO_RECOVERY;
+ {$EXTERNALSYM EAI_FAIL}
+ EAI_FAMILY = WSAEAFNOSUPPORT;
+ {$EXTERNALSYM EAI_FAMILY}
+ EAI_MEMORY = WSA_NOT_ENOUGH_MEMORY;
+ {$EXTERNALSYM EAI_MEMORY}
+//#define EAI_NODATA WSANO_DATA
+ EAI_NONAME = WSAHOST_NOT_FOUND;
+ {$EXTERNALSYM EAI_NONAME}
+ EAI_SERVICE = WSATYPE_NOT_FOUND;
+ {$EXTERNALSYM EAI_SERVICE}
+ EAI_SOCKTYPE = WSAESOCKTNOSUPPORT;
+ {$EXTERNALSYM EAI_SOCKTYPE}
+
+//
+// DCR_FIX: EAI_NODATA remove or fix
+//
+// EAI_NODATA was removed from rfc2553bis
+// need to find out from the authors why and
+// determine the error for "no records of this type"
+// temporarily, we'll keep #define to avoid changing
+// code that could change back; use NONAME
+//
+
+ EAI_NODATA = EAI_NONAME;
+ {$EXTERNALSYM EAI_NODATA}
+
+// Structure used in getaddrinfo() call
+
+type
+ LPADDRINFO = ^addrinfo;
+ {$EXTERNALSYM LPADDRINFO}
+ addrinfo = record
+ ai_flags: Integer; // AI_PASSIVE, AI_CANONNAME, AI_NUMERICHOST
+ ai_family: Integer; // PF_xxx
+ ai_socktype: Integer; // SOCK_xxx
+ ai_protocol: Integer; // 0 or IPPROTO_xxx for IPv4 and IPv6
+ ai_addrlen: size_t; // Length of ai_addr
+ ai_canonname: PChar; // Canonical name for nodename
+ ai_addr: PSockAddr; // Binary address
+ ai_next: LPADDRINFO; // Next structure in linked list
+ end;
+ {$EXTERNALSYM addrinfo}
+ TAddrInfo = addrinfo;
+ PAddrInfo = LPADDRINFO;
+
+// Flags used in "hints" argument to getaddrinfo()
+
+const
+ AI_PASSIVE = $1; // Socket address will be used in bind() call
+ {$EXTERNALSYM AI_PASSIVE}
+ AI_CANONNAME = $2; // Return canonical name in first ai_canonname
+ {$EXTERNALSYM AI_CANONNAME}
+ AI_NUMERICHOST = $4; // Nodename must be a numeric address string
+ {$EXTERNALSYM AI_NUMERICHOST}
+
+function getaddrinfo(nodename, servname: PChar; hints: PAddrInfo; var res: PAddrInfo): Integer; stdcall;
+{$EXTERNALSYM getaddrinfo}
+
+procedure freeaddrinfo(ai: PAddrInfo); stdcall;
+{$EXTERNALSYM freeaddrinfo}
+
+// WARNING: The gai_strerror inline functions below use static buffers,
+// and hence are not thread-safe. We'll use buffers long enough to hold
+// 1k characters. Any system error messages longer than this will be
+// returned as empty strings. However 1k should work for the error codes
+// used by getaddrinfo().
+
+const
+ GAI_STRERROR_BUFFER_SIZE = 1024;
+ {$EXTERNALSYM GAI_STRERROR_BUFFER_SIZE}
+
+function gai_strerrorA(ecode: Integer): PChar;
+{$EXTERNALSYM gai_strerrorA}
+function gai_strerrorW(ecode: Integer): PWideChar;
+{$EXTERNALSYM gai_strerrorW}
+function gai_strerror(ecode: Integer): PTCHAR;
+{$EXTERNALSYM gai_strerror}
+
+type
+ socklen_t = Integer;
+ {$EXTERNALSYM socklen_t}
+
+function getnameinfo(sa: PSockAddr; salen: socklen_t; host: PChar; hostlen: DWORD; serv: PChar; servlen: DWORD; flags: Integer): Integer; stdcall;
+{$EXTERNALSYM getnameinfo}
+
+const
+ NI_MAXHOST = 1025; // Max size of a fully-qualified domain name
+ {$EXTERNALSYM NI_MAXHOST}
+ NI_MAXSERV = 32; // Max size of a service name
+ {$EXTERNALSYM NI_MAXSERV}
+
+ INET_ADDRSTRLEN = 16; // Max size of numeric form of IPv4 address
+ {$EXTERNALSYM INET_ADDRSTRLEN}
+ INET6_ADDRSTRLEN = 46; // Max size of numeric form of IPv6 address
+ {$EXTERNALSYM INET6_ADDRSTRLEN}
+
+// Flags for getnameinfo()
+
+ NI_NOFQDN = $01; // Only return nodename portion for local hosts
+ {$EXTERNALSYM NI_NOFQDN}
+ NI_NUMERICHOST = $02; // Return numeric form of the host's address
+ {$EXTERNALSYM NI_NUMERICHOST}
+ NI_NAMEREQD = $04; // Error if the host's name not in DNS
+ {$EXTERNALSYM NI_NAMEREQD}
+ NI_NUMERICSERV = $08; // Return numeric form of the service (port #)
+ {$EXTERNALSYM NI_NUMERICSERV}
+ NI_DGRAM = $10; // Service is a datagram service
+ {$EXTERNALSYM NI_DGRAM}
+
+implementation
+
+uses
+ SysUtils, JwaWinBase, JwaWinNT;
+
+function IP_MSFILTER_SIZE(numsrc: Integer): Integer;
+begin
+ Result := SizeOf(ip_msfilter) - SizeOf(in_addr) + (numsrc * SizeOf(in_addr));
+end;
+
+function SS_PORT(ssp: Pointer): u_short;
+begin
+ Result := PSockAddrIn(ssp)^.sin_port;
+end;
+
+procedure IN6ADDR_SETANY(var x: TSockAddrIn6);
+var
+ I: Integer;
+begin
+ x.sin6_family := AF_INET6;
+ x.sin6_port := 0;
+ x.sin6_flowinfo := 0;
+ for I := 0 to 15 do
+ x.sin6_addr.s6_addr[I] := 0;
+end;
+
+procedure IN6ADDR_SETLOOPBACK(var x: TSockAddrIn6);
+var
+ I: Integer;
+begin
+ x.sin6_family := AF_INET6;
+ x.sin6_port := 0;
+ x.sin6_flowinfo := 0;
+ for I := 0 to 14 do
+ x.sin6_addr.s6_addr[I] := 0;
+ x.sin6_addr.s6_addr[15] := 1;
+end;
+
+function IN6ADDR_ISANY(const x: TSockAddrIn6): Boolean;
+var
+ I: Integer;
+begin
+ Result := x.sin6_family = AF_INET6;
+ for I := 0 to 15 do
+ Result := Result and (x.sin6_addr.s6_addr[I] = 0);
+end;
+
+function IN6ADDR_ISLOOPBACK(const x: TSockAddrIn6): Boolean;
+var
+ I: Integer;
+begin
+ Result := x.sin6_family = AF_INET6;
+ for I := 0 to 14 do
+ Result := Result and (x.sin6_addr.s6_addr[I] = 0);
+ Result := Result and (x.sin6_addr.s6_addr[15] = 1);
+end;
+
+function IN6_ADDR_EQUAL(const a, b: in6_addr): Boolean;
+begin
+ Result := CompareMem(@a, @b, SizeOf(in6_addr));
+end;
+
+function IN6_IS_ADDR_UNSPECIFIED(const a: in6_addr): boolean;
+begin
+ Result := IN6_ADDR_EQUAL(a, in6addr_any);
+end;
+
+function IN6_IS_ADDR_LOOPBACK(const a: in6_addr): Boolean;
+begin
+ Result := IN6_ADDR_EQUAL(a, in6addr_loopback);
+end;
+
+function IN6_IS_ADDR_MULTICAST(const a: in6_addr): Boolean;
+begin
+ Result := (a.s6_bytes[0] = $ff);
+end;
+
+function IN6_IS_ADDR_LINKLOCAL(const a: in6_addr): Boolean;
+begin
+ Result := ((a.s6_bytes[0] = $fe) and ((a.s6_bytes[1] and $c0) = $80));
+end;
+
+function IN6_IS_ADDR_SITELOCAL(const a: in6_addr): Boolean;
+begin
+ Result := ((a.s6_bytes[0] = $fe) and ((a.s6_bytes[1] and $c0) = $c0));
+end;
+
+function IN6_IS_ADDR_V4MAPPED(const a: in6_addr): Boolean;
+begin
+ Result := ((a.s6_words[0] = 0) and (a.s6_words[1] = 0) and (a.s6_words[2] = 0) and
+ (a.s6_words[3] = 0) and (a.s6_words[4] = 0) and (a.s6_words[5] = $ffff));
+end;
+
+function IN6_IS_ADDR_V4COMPAT(const a: in6_addr): Boolean;
+begin
+ Result :=
+ ((a.s6_words[0] = 0) and
+ (a.s6_words[1] = 0) and
+ (a.s6_words[2] = 0) and
+ (a.s6_words[3] = 0) and
+ (a.s6_words[4] = 0) and
+ (a.s6_words[5] = 0) and
+ not ((a.s6_words[6] = 0) and
+ (a.s6_addr[14] = 0) and
+ ((a.s6_addr[15] = 0) or (a.s6_addr[15] = 1))));
+end;
+
+function IN6_IS_ADDR_MC_NODELOCAL(const a: in6_addr): Boolean;
+begin
+ Result := IN6_IS_ADDR_MULTICAST(a) and ((a.s6_bytes[1] and $f) = 1);
+end;
+
+function IN6_IS_ADDR_MC_LINKLOCAL(const a: in6_addr): Boolean;
+begin
+ Result := IN6_IS_ADDR_MULTICAST(a) and ((a.s6_bytes[1] and $f) = 2);
+end;
+
+function IN6_IS_ADDR_MC_SITELOCAL(const a: in6_addr): Boolean;
+begin
+ Result := IN6_IS_ADDR_MULTICAST(a) and ((a.s6_bytes[1] and $f) = 5);
+end;
+
+function IN6_IS_ADDR_MC_ORGLOCAL(const a: in6_addr): Boolean;
+begin
+ Result := IN6_IS_ADDR_MULTICAST(a) and ((a.s6_bytes[1] and $f) = 8);
+end;
+
+function IN6_IS_ADDR_MC_GLOBAL(const a: in6_addr): Boolean;
+begin
+ Result := IN6_IS_ADDR_MULTICAST(a) and ((a.s6_bytes[1] and $f) = $e);
+end;
+
+var
+ gai_strerror_buffA: array [0..GAI_STRERROR_BUFFER_SIZE-1] of Char;
+ gai_strerror_buffW: array [0..GAI_STRERROR_BUFFER_SIZE-1] of WideChar;
+
+function gai_strerrorA(ecode: Integer): PChar;
+var
+ dwMsgLen: DWORD;
+begin
+ dwMsgLen := FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM or FORMAT_MESSAGE_IGNORE_INSERTS or FORMAT_MESSAGE_MAX_WIDTH_MASK,
+ nil, ecode, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), PChar(@gai_strerror_buffA[0]), GAI_STRERROR_BUFFER_SIZE, nil);
+ if dwMsgLen = 0 then
+ Result := nil
+ else
+ Result := PChar(@gai_strerror_buffA[0]);
+end;
+
+function gai_strerrorW(ecode: Integer): PWideChar;
+var
+ dwMsgLen: DWORD;
+begin
+ dwMsgLen := FormatMessageW(FORMAT_MESSAGE_FROM_SYSTEM or FORMAT_MESSAGE_IGNORE_INSERTS or FORMAT_MESSAGE_MAX_WIDTH_MASK,
+ nil, ecode, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), PWideChar(@gai_strerror_buffW[0]), GAI_STRERROR_BUFFER_SIZE, nil);
+ if dwMsgLen = 0 then
+ Result := nil
+ else
+ Result := PWideChar(@gai_strerror_buffW[0]);
+end;
+
+function gai_strerror(ecode: Integer): PTCHAR;
+begin
+ {$IFDEF UNICODE}
+ Result := PTCHAR(gai_strerrorW(ecode));
+ {$ELSE}
+ Result := PTCHAR(gai_strerrorA(ecode));
+ {$ENDIF UNICODE}
+end;
+
+const
+ ws2tcpip = 'ws2_32.dll';
+
+{$IFDEF DYNAMIC_LINK}
+
+var
+ _getaddrinfo: Pointer;
+
+function getaddrinfo;
+begin
+ GetProcedureAddress(_getaddrinfo, ws2tcpip, 'getaddrinfo');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_getaddrinfo]
+ end;
+end;
+
+var
+ _freeaddrinfo: Pointer;
+
+procedure freeaddrinfo;
+begin
+ GetProcedureAddress(_freeaddrinfo, ws2tcpip, 'freeaddrinfo');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_freeaddrinfo]
+ end;
+end;
+
+var
+ _getnameinfo: Pointer;
+
+function getnameinfo;
+begin
+ GetProcedureAddress(_getnameinfo, ws2tcpip, 'getnameinfo');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_getnameinfo]
+ end;
+end;
+
+{$ELSE}
+
+function getaddrinfo; external ws2tcpip name 'getaddrinfo';
+procedure freeaddrinfo; external ws2tcpip name 'freeaddrinfo';
+function getnameinfo; external ws2tcpip name 'getnameinfo';
+
+{$ENDIF DYNAMIC_LINK}
+
+end.
diff --git a/packages/extra/winunits/jwawshisotp.pas b/packages/extra/winunits/jwawshisotp.pas
index 858eb2f157..fbe4168e90 100644
--- a/packages/extra/winunits/jwawshisotp.pas
+++ b/packages/extra/winunits/jwawshisotp.pas
@@ -1,180 +1,180 @@
-{******************************************************************************}
-{ }
-{ Winsock2 ISO TP4 API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: wshisotp.h, released June 2000. The original Pascal }
-{ code is: WShisotp.pas, released December 2000. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwawshisotp.pas,v 1.1 2005/04/04 07:56:11 marco Exp $
-
-unit JwaWShisotp;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "wshisotp.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaWinSock2;
-
-//
-// wshisotp.h
-// Copyright (c) 1994-1999, Microsoft Corp. All rights reserved.
-//
-// Windows Sockets include file for ISO TP4. This file contains all
-// standardized ISO TP4 information. Include this header file after
-// winsock.h.
-//
-// The information contained in this header file was originally
-// created by Alcatel TITN Inc.
-//
-
-//
-// Protocol values for ISO transport protocols.
-//
-
-const
- ISOPROTO_TP0 = 25; // connection orientated transport protocol
- {$EXTERNALSYM ISOPROTO_TP0}
- ISOPROTO_TP1 = 26; // not implemented
- {$EXTERNALSYM ISOPROTO_TP1}
- ISOPROTO_TP2 = 27; // not implemented
- {$EXTERNALSYM ISOPROTO_TP2}
- ISOPROTO_TP3 = 28; // not implemented
- {$EXTERNALSYM ISOPROTO_TP3}
- ISOPROTO_TP4 = 29; // connection orientated transport protocol
- {$EXTERNALSYM ISOPROTO_TP4}
- ISOPROTO_TP = ISOPROTO_TP4;
- {$EXTERNALSYM ISOPROTO_TP}
- ISOPROTO_CLTP = 30; // connectionless transport
- {$EXTERNALSYM ISOPROTO_CLTP}
- ISOPROTO_CLNP = 31; // connectionless internetworking protocol
- {$EXTERNALSYM ISOPROTO_CLNP}
- ISOPROTO_X25 = 32; // cons
- {$EXTERNALSYM ISOPROTO_X25}
- ISOPROTO_INACT_NL = 33; // inactive network layer
- {$EXTERNALSYM ISOPROTO_INACT_NL}
- ISOPROTO_ESIS = 34; // ES-IS protocol
- {$EXTERNALSYM ISOPROTO_ESIS}
- ISOPROTO_INTRAISIS = 35; // IS-IS protocol
- {$EXTERNALSYM ISOPROTO_INTRAISIS}
-
- IPPROTO_RAW = 255; // raw clnp
- {$EXTERNALSYM IPPROTO_RAW}
- IPPROTO_MAX = 256;
- {$EXTERNALSYM IPPROTO_MAX}
-
-//
-// The maximum size of the tranport address (tp_addr field of a
-// sockaddr_tp structure) is 64.
-//
-
-const
- ISO_MAX_ADDR_LENGTH = 64;
- {$EXTERNALSYM ISO_MAX_ADDR_LENGTH}
-
-//
-// There are two types of ISO addresses, hierarchical and
-// non-hierarchical. For hierarchical addresses, the tp_addr
-// field contains both the transport selector and the network
-// address. For non-hierarchical addresses, tp_addr contains only
-// the transport address, which must be translated by the ISO TP4
-// transport provider into the transport selector and network address.
-//
-
-const
- ISO_HIERARCHICAL = 0;
- {$EXTERNALSYM ISO_HIERARCHICAL}
- ISO_NON_HIERARCHICAL = 1;
- {$EXTERNALSYM ISO_NON_HIERARCHICAL}
-
-//
-// The format of the address structure (sockaddr) to pass to Windows
-// Sockets APIs.
-//
-
-type
- SOCKADDR_TP = record
- tp_family: u_short; // Always AF_ISO
- tp_addr_type: u_short; // ISO_HIERARCHICAL or ISO_NON_HIERARCHICAL
- tp_taddr_len: u_short; // Length of transport address, <= 52
- tp_tsel_len: u_short; // Length of transport selector, <= 32 0 if ISO_NON_HIERARCHICAL
- tp_addr: array [0..ISO_MAX_ADDR_LENGTH - 1] of u_char;
- end;
- {$EXTERNALSYM SOCKADDR_TP}
- PSOCKADDR_TP = ^SOCKADDR_TP;
- {$EXTERNALSYM PSOCKADDR_TP}
- LPSOCKADDR_TP = ^SOCKADDR_TP;
- {$EXTERNALSYM LPSOCKADDR_TP}
- TSockAddrTP = SOCKADDR_TP;
- PSockAddrTP = LPSOCKADDR_TP;
-
-//procedure ISO_SET_TP_ADDR(var sa_tp: TSockAddrTP; port: PChar; portlen: u_short; node: PChar; nodelen: u_short);
-//{$EXTERNALSYM ISO_SET_TP_ADDR}
-
-//
-// Expedited Data Usage Negotiation option.
-// Default when the option is not present is be EXP_DATA_USE
-// as per ISO 8073
-//
-
-const
- ISO_EXP_DATA_USE = 00; // Use of Expedited Data
- {$EXTERNALSYM ISO_EXP_DATA_USE}
- ISO_EXP_DATA_NUSE = 01; // Non-use of Expedited Data
- {$EXTERNALSYM ISO_EXP_DATA_NUSE}
-
-implementation
-
-// TODO
-//procedure ISO_SET_TP_ADDR(var sa_tp: TSockAddrTP; port: PChar; portlen: u_short; node: PChar; nodelen: u_short);
-//begin
-// sa_tp.tp_family := AF_ISO;
-// sa_tp.tp_addr_type := ISO_HIERARCHICAL;
-// sa_tp.tp_tsel_len := portlen;
-// sa_tp.tp_taddr_len := portlen + nodelen;
-// System.Move(port, @sa_tp.tp_addr[0], portlen);
-// System.Move(node, @sa_tp.tp_addr[portlen], nodelen);
-//end;
-
-end.
+{******************************************************************************}
+{ }
+{ Winsock2 ISO TP4 API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: wshisotp.h, released June 2000. The original Pascal }
+{ code is: WShisotp.pas, released December 2000. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwawshisotp.pas,v 1.1 2005/04/04 07:56:11 marco Exp $
+
+unit JwaWShisotp;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "wshisotp.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaWinSock2;
+
+//
+// wshisotp.h
+// Copyright (c) 1994-1999, Microsoft Corp. All rights reserved.
+//
+// Windows Sockets include file for ISO TP4. This file contains all
+// standardized ISO TP4 information. Include this header file after
+// winsock.h.
+//
+// The information contained in this header file was originally
+// created by Alcatel TITN Inc.
+//
+
+//
+// Protocol values for ISO transport protocols.
+//
+
+const
+ ISOPROTO_TP0 = 25; // connection orientated transport protocol
+ {$EXTERNALSYM ISOPROTO_TP0}
+ ISOPROTO_TP1 = 26; // not implemented
+ {$EXTERNALSYM ISOPROTO_TP1}
+ ISOPROTO_TP2 = 27; // not implemented
+ {$EXTERNALSYM ISOPROTO_TP2}
+ ISOPROTO_TP3 = 28; // not implemented
+ {$EXTERNALSYM ISOPROTO_TP3}
+ ISOPROTO_TP4 = 29; // connection orientated transport protocol
+ {$EXTERNALSYM ISOPROTO_TP4}
+ ISOPROTO_TP = ISOPROTO_TP4;
+ {$EXTERNALSYM ISOPROTO_TP}
+ ISOPROTO_CLTP = 30; // connectionless transport
+ {$EXTERNALSYM ISOPROTO_CLTP}
+ ISOPROTO_CLNP = 31; // connectionless internetworking protocol
+ {$EXTERNALSYM ISOPROTO_CLNP}
+ ISOPROTO_X25 = 32; // cons
+ {$EXTERNALSYM ISOPROTO_X25}
+ ISOPROTO_INACT_NL = 33; // inactive network layer
+ {$EXTERNALSYM ISOPROTO_INACT_NL}
+ ISOPROTO_ESIS = 34; // ES-IS protocol
+ {$EXTERNALSYM ISOPROTO_ESIS}
+ ISOPROTO_INTRAISIS = 35; // IS-IS protocol
+ {$EXTERNALSYM ISOPROTO_INTRAISIS}
+
+ IPPROTO_RAW = 255; // raw clnp
+ {$EXTERNALSYM IPPROTO_RAW}
+ IPPROTO_MAX = 256;
+ {$EXTERNALSYM IPPROTO_MAX}
+
+//
+// The maximum size of the tranport address (tp_addr field of a
+// sockaddr_tp structure) is 64.
+//
+
+const
+ ISO_MAX_ADDR_LENGTH = 64;
+ {$EXTERNALSYM ISO_MAX_ADDR_LENGTH}
+
+//
+// There are two types of ISO addresses, hierarchical and
+// non-hierarchical. For hierarchical addresses, the tp_addr
+// field contains both the transport selector and the network
+// address. For non-hierarchical addresses, tp_addr contains only
+// the transport address, which must be translated by the ISO TP4
+// transport provider into the transport selector and network address.
+//
+
+const
+ ISO_HIERARCHICAL = 0;
+ {$EXTERNALSYM ISO_HIERARCHICAL}
+ ISO_NON_HIERARCHICAL = 1;
+ {$EXTERNALSYM ISO_NON_HIERARCHICAL}
+
+//
+// The format of the address structure (sockaddr) to pass to Windows
+// Sockets APIs.
+//
+
+type
+ SOCKADDR_TP = record
+ tp_family: u_short; // Always AF_ISO
+ tp_addr_type: u_short; // ISO_HIERARCHICAL or ISO_NON_HIERARCHICAL
+ tp_taddr_len: u_short; // Length of transport address, <= 52
+ tp_tsel_len: u_short; // Length of transport selector, <= 32 0 if ISO_NON_HIERARCHICAL
+ tp_addr: array [0..ISO_MAX_ADDR_LENGTH - 1] of u_char;
+ end;
+ {$EXTERNALSYM SOCKADDR_TP}
+ PSOCKADDR_TP = ^SOCKADDR_TP;
+ {$EXTERNALSYM PSOCKADDR_TP}
+ LPSOCKADDR_TP = ^SOCKADDR_TP;
+ {$EXTERNALSYM LPSOCKADDR_TP}
+ TSockAddrTP = SOCKADDR_TP;
+ PSockAddrTP = LPSOCKADDR_TP;
+
+//procedure ISO_SET_TP_ADDR(var sa_tp: TSockAddrTP; port: PChar; portlen: u_short; node: PChar; nodelen: u_short);
+//{$EXTERNALSYM ISO_SET_TP_ADDR}
+
+//
+// Expedited Data Usage Negotiation option.
+// Default when the option is not present is be EXP_DATA_USE
+// as per ISO 8073
+//
+
+const
+ ISO_EXP_DATA_USE = 00; // Use of Expedited Data
+ {$EXTERNALSYM ISO_EXP_DATA_USE}
+ ISO_EXP_DATA_NUSE = 01; // Non-use of Expedited Data
+ {$EXTERNALSYM ISO_EXP_DATA_NUSE}
+
+implementation
+
+// TODO
+//procedure ISO_SET_TP_ADDR(var sa_tp: TSockAddrTP; port: PChar; portlen: u_short; node: PChar; nodelen: u_short);
+//begin
+// sa_tp.tp_family := AF_ISO;
+// sa_tp.tp_addr_type := ISO_HIERARCHICAL;
+// sa_tp.tp_tsel_len := portlen;
+// sa_tp.tp_taddr_len := portlen + nodelen;
+// System.Move(port, @sa_tp.tp_addr[0], portlen);
+// System.Move(node, @sa_tp.tp_addr[portlen], nodelen);
+//end;
+
+end.
diff --git a/packages/extra/winunits/jwawsipx.pas b/packages/extra/winunits/jwawsipx.pas
index b26be9509b..8b6764745a 100644
--- a/packages/extra/winunits/jwawsipx.pas
+++ b/packages/extra/winunits/jwawsipx.pas
@@ -1,119 +1,119 @@
-{******************************************************************************}
-{ }
-{ Winsock2 IPX API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: wsipx.h, released June 2000. The original Pascal }
-{ code is: WSIpx.pas, released December 2000. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwawsipx.pas,v 1.1 2005/04/04 07:56:11 marco Exp $
-
-unit JwaWSipx;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "wsipx.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-//
-// Microsoft Windows
-// Copyright (C) Microsoft Corporation, 1992-1999.
-//
-// Windows Sockets include file for IPX/SPX. This file contains all
-// standardized IPX/SPX information. Include this header file after
-// winsock.h.
-//
-// To open an IPX socket, call socket() with an address family of
-// AF_IPX, a socket type of SOCK_DGRAM, and protocol NSPROTO_IPX.
-// Note that the protocol value must be specified, it cannot be 0.
-// All IPX packets are sent with the packet type field of the IPX
-// header set to 0.
-//
-// To open an SPX or SPXII socket, call socket() with an address
-// family of AF_IPX, socket type of SOCK_SEQPACKET or SOCK_STREAM,
-// and protocol of NSPROTO_SPX or NSPROTO_SPXII. If SOCK_SEQPACKET
-// is specified, then the end of message bit is respected, and
-// recv() calls are not completed until a packet is received with
-// the end of message bit set. If SOCK_STREAM is specified, then
-// the end of message bit is not respected, and recv() completes
-// as soon as any data is received, regardless of the setting of the
-// end of message bit. Send coalescing is never performed, and sends
-// smaller than a single packet are always sent with the end of
-// message bit set. Sends larger than a single packet are packetized
-// with the end of message bit set on only the last packet of the
-// send.
-//
-
-//
-// This is the structure of the SOCKADDR structure for IPX and SPX.
-//
-
-type
- SOCKADDR_IPX = record
- sa_family: Smallint;
- sa_netnum: array [0..3] of Char;
- sa_nodenum: array [0..5] of Char;
- sa_socket: Word;
- end;
- {$EXTERNALSYM SOCKADDR_IPX}
- PSOCKADDR_IPX = ^SOCKADDR_IPX;
- {$EXTERNALSYM PSOCKADDR_IPX}
- LPSOCKADDR_IPX = ^SOCKADDR_IPX;
- {$EXTERNALSYM LPSOCKADDR_IPX}
- TSockAddrIPX = SOCKADDR_IPX;
- PSockAddrIPX = LPSOCKADDR_IPX;
-
-//
-// Protocol families used in the "protocol" parameter of the socket() API.
-//
-
-const
- NSPROTO_IPX = 1000;
- {$EXTERNALSYM NSPROTO_IPX}
- NSPROTO_SPX = 1256;
- {$EXTERNALSYM NSPROTO_SPX}
- NSPROTO_SPXII = 1257;
- {$EXTERNALSYM NSPROTO_SPXII}
-
-implementation
-
-end.
+{******************************************************************************}
+{ }
+{ Winsock2 IPX API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: wsipx.h, released June 2000. The original Pascal }
+{ code is: WSIpx.pas, released December 2000. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwawsipx.pas,v 1.1 2005/04/04 07:56:11 marco Exp $
+
+unit JwaWSipx;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "wsipx.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+//
+// Microsoft Windows
+// Copyright (C) Microsoft Corporation, 1992-1999.
+//
+// Windows Sockets include file for IPX/SPX. This file contains all
+// standardized IPX/SPX information. Include this header file after
+// winsock.h.
+//
+// To open an IPX socket, call socket() with an address family of
+// AF_IPX, a socket type of SOCK_DGRAM, and protocol NSPROTO_IPX.
+// Note that the protocol value must be specified, it cannot be 0.
+// All IPX packets are sent with the packet type field of the IPX
+// header set to 0.
+//
+// To open an SPX or SPXII socket, call socket() with an address
+// family of AF_IPX, socket type of SOCK_SEQPACKET or SOCK_STREAM,
+// and protocol of NSPROTO_SPX or NSPROTO_SPXII. If SOCK_SEQPACKET
+// is specified, then the end of message bit is respected, and
+// recv() calls are not completed until a packet is received with
+// the end of message bit set. If SOCK_STREAM is specified, then
+// the end of message bit is not respected, and recv() completes
+// as soon as any data is received, regardless of the setting of the
+// end of message bit. Send coalescing is never performed, and sends
+// smaller than a single packet are always sent with the end of
+// message bit set. Sends larger than a single packet are packetized
+// with the end of message bit set on only the last packet of the
+// send.
+//
+
+//
+// This is the structure of the SOCKADDR structure for IPX and SPX.
+//
+
+type
+ SOCKADDR_IPX = record
+ sa_family: Smallint;
+ sa_netnum: array [0..3] of Char;
+ sa_nodenum: array [0..5] of Char;
+ sa_socket: Word;
+ end;
+ {$EXTERNALSYM SOCKADDR_IPX}
+ PSOCKADDR_IPX = ^SOCKADDR_IPX;
+ {$EXTERNALSYM PSOCKADDR_IPX}
+ LPSOCKADDR_IPX = ^SOCKADDR_IPX;
+ {$EXTERNALSYM LPSOCKADDR_IPX}
+ TSockAddrIPX = SOCKADDR_IPX;
+ PSockAddrIPX = LPSOCKADDR_IPX;
+
+//
+// Protocol families used in the "protocol" parameter of the socket() API.
+//
+
+const
+ NSPROTO_IPX = 1000;
+ {$EXTERNALSYM NSPROTO_IPX}
+ NSPROTO_SPX = 1256;
+ {$EXTERNALSYM NSPROTO_SPX}
+ NSPROTO_SPXII = 1257;
+ {$EXTERNALSYM NSPROTO_SPXII}
+
+implementation
+
+end.
diff --git a/packages/extra/winunits/jwawsnetbs.pas b/packages/extra/winunits/jwawsnetbs.pas
index 88f6866080..055de936a1 100644
--- a/packages/extra/winunits/jwawsnetbs.pas
+++ b/packages/extra/winunits/jwawsnetbs.pas
@@ -1,143 +1,143 @@
-{******************************************************************************}
-{ }
-{ Winsock2 Netbios API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: wsnetbs.h, released June 2000. The original Pascal }
-{ code is: WSnetbs.pas, released December 2000. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwawsnetbs.pas,v 1.1 2005/04/04 07:56:11 marco Exp $
-
-unit JwaWSnetbs;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "wsnetbs.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaWinSock2;
-
-//
-// wsnetbs.h
-// Copyright (c) 1994-1999, Microsoft Corp. All rights reserved.
-//
-// Windows Sockets include file for NETBIOS. This file contains all
-// standardized NETBIOS information. Include this header file after
-// winsock.h.
-//
-
-//
-// This is the structure of the SOCKADDR structure for NETBIOS.
-//
-
-const
- NETBIOS_NAME_LENGTH = 16;
- {$EXTERNALSYM NETBIOS_NAME_LENGTH}
-
-type
- SOCKADDR_NB = record
- snb_family: Smallint;
- snb_type: Word;
- snb_name: array [0..NETBIOS_NAME_LENGTH - 1] of Char;
- end;
- {$EXTERNALSYM SOCKADDR_NB}
- PSOCKADDR_NB = ^SOCKADDR_NB;
- {$EXTERNALSYM PSOCKADDR_NB}
- LPSOCKADDR_NB = ^SOCKADDR_NB;
- {$EXTERNALSYM LPSOCKADDR_NB}
- TSockAddrNB = SOCKADDR_NB;
- PSockAddrNB = LPSOCKADDR_NB;
-
-//
-// Bit values for the snb_type field of SOCKADDR_NB.
-//
-
-const
- NETBIOS_UNIQUE_NAME = $0000;
- {$EXTERNALSYM NETBIOS_UNIQUE_NAME}
- NETBIOS_GROUP_NAME = $0001;
- {$EXTERNALSYM NETBIOS_GROUP_NAME}
- NETBIOS_TYPE_QUICK_UNIQUE = $0002;
- {$EXTERNALSYM NETBIOS_TYPE_QUICK_UNIQUE}
- NETBIOS_TYPE_QUICK_GROUP = $0003;
- {$EXTERNALSYM NETBIOS_TYPE_QUICK_GROUP}
-
-//
-// A macro convenient for setting up NETBIOS SOCKADDRs.
-//
-
-procedure SET_NETBIOS_SOCKADDR(var SNB: TSockAddrNB; _Type: u_short; const Name: string; Port: Byte);
-{$EXTERNALSYM SET_NETBIOS_SOCKADDR}
-
-//
-// To open a NetBIOS socket, call the socket() function as follows:
-//
-// s = socket( AF_NETBIOS, {SOCK_SEQPACKET|SOCK_DGRAM}, -Lana );
-//
-// where Lana is the NetBIOS Lana number of interest. For example, to
-// open a socket for Lana 2, specify -2 as the "protocol" parameter
-// to the socket() function.
-//
-
-implementation
-
-procedure SET_NETBIOS_SOCKADDR(var SNB: TSockAddrNB; _Type: u_short; const Name: string; Port: Byte);
-var
- I: Integer;
-begin
- SNB.snb_family := AF_NETBIOS;
- SNB.snb_type := _Type;
- for I := 0 to NETBIOS_NAME_LENGTH - 1 do
- SNB.snb_name[I] := ' ';
- I := 0;
- while I < NETBIOS_NAME_LENGTH - 1 do
- begin
- if SNB.snb_name[I] = #0 then
- Break;
- SNB.snb_name[I] := SNB.snb_name[I + 1];
- Inc(I);
- end;
- SNB.snb_name[NETBIOS_NAME_LENGTH - 1] := Char(Port);
-end;
-
-end.
+{******************************************************************************}
+{ }
+{ Winsock2 Netbios API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: wsnetbs.h, released June 2000. The original Pascal }
+{ code is: WSnetbs.pas, released December 2000. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwawsnetbs.pas,v 1.1 2005/04/04 07:56:11 marco Exp $
+
+unit JwaWSnetbs;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "wsnetbs.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaWinSock2;
+
+//
+// wsnetbs.h
+// Copyright (c) 1994-1999, Microsoft Corp. All rights reserved.
+//
+// Windows Sockets include file for NETBIOS. This file contains all
+// standardized NETBIOS information. Include this header file after
+// winsock.h.
+//
+
+//
+// This is the structure of the SOCKADDR structure for NETBIOS.
+//
+
+const
+ NETBIOS_NAME_LENGTH = 16;
+ {$EXTERNALSYM NETBIOS_NAME_LENGTH}
+
+type
+ SOCKADDR_NB = record
+ snb_family: Smallint;
+ snb_type: Word;
+ snb_name: array [0..NETBIOS_NAME_LENGTH - 1] of Char;
+ end;
+ {$EXTERNALSYM SOCKADDR_NB}
+ PSOCKADDR_NB = ^SOCKADDR_NB;
+ {$EXTERNALSYM PSOCKADDR_NB}
+ LPSOCKADDR_NB = ^SOCKADDR_NB;
+ {$EXTERNALSYM LPSOCKADDR_NB}
+ TSockAddrNB = SOCKADDR_NB;
+ PSockAddrNB = LPSOCKADDR_NB;
+
+//
+// Bit values for the snb_type field of SOCKADDR_NB.
+//
+
+const
+ NETBIOS_UNIQUE_NAME = $0000;
+ {$EXTERNALSYM NETBIOS_UNIQUE_NAME}
+ NETBIOS_GROUP_NAME = $0001;
+ {$EXTERNALSYM NETBIOS_GROUP_NAME}
+ NETBIOS_TYPE_QUICK_UNIQUE = $0002;
+ {$EXTERNALSYM NETBIOS_TYPE_QUICK_UNIQUE}
+ NETBIOS_TYPE_QUICK_GROUP = $0003;
+ {$EXTERNALSYM NETBIOS_TYPE_QUICK_GROUP}
+
+//
+// A macro convenient for setting up NETBIOS SOCKADDRs.
+//
+
+procedure SET_NETBIOS_SOCKADDR(var SNB: TSockAddrNB; _Type: u_short; const Name: string; Port: Byte);
+{$EXTERNALSYM SET_NETBIOS_SOCKADDR}
+
+//
+// To open a NetBIOS socket, call the socket() function as follows:
+//
+// s = socket( AF_NETBIOS, {SOCK_SEQPACKET|SOCK_DGRAM}, -Lana );
+//
+// where Lana is the NetBIOS Lana number of interest. For example, to
+// open a socket for Lana 2, specify -2 as the "protocol" parameter
+// to the socket() function.
+//
+
+implementation
+
+procedure SET_NETBIOS_SOCKADDR(var SNB: TSockAddrNB; _Type: u_short; const Name: string; Port: Byte);
+var
+ I: Integer;
+begin
+ SNB.snb_family := AF_NETBIOS;
+ SNB.snb_type := _Type;
+ for I := 0 to NETBIOS_NAME_LENGTH - 1 do
+ SNB.snb_name[I] := ' ';
+ I := 0;
+ while I < NETBIOS_NAME_LENGTH - 1 do
+ begin
+ if SNB.snb_name[I] = #0 then
+ Break;
+ SNB.snb_name[I] := SNB.snb_name[I + 1];
+ Inc(I);
+ end;
+ SNB.snb_name[NETBIOS_NAME_LENGTH - 1] := Char(Port);
+end;
+
+end.
diff --git a/packages/extra/winunits/jwawsnwlink.pas b/packages/extra/winunits/jwawsnwlink.pas
index b1219c12e1..2d2786dd0d 100644
--- a/packages/extra/winunits/jwawsnwlink.pas
+++ b/packages/extra/winunits/jwawsnwlink.pas
@@ -1,345 +1,345 @@
-{******************************************************************************}
-{ }
-{ Winsock2 IPX/SPX Extensions API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: wsipx.h, released June 2000. The original Pascal }
-{ code is: WSIpxpas, released December 2000. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwawsnwlink.pas,v 1.1 2005/04/04 07:56:11 marco Exp $
-
-unit JwaWSNwLink;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "wsnwlink.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaWinSock2;
-
-// Microsoft Windows
-// Copyright (C) Microsoft Corporation, 1992-1999.
-// Microsoft-specific extensions to the Windows NT IPX/SPX Windows
-// Sockets interface. These extensions are provided for use as
-// necessary for compatibility with existing applications. They are
-// otherwise not recommended for use, as they are only guaranteed to
-// work * over the Microsoft IPX/SPX stack. An application which
-// uses these * extensions may not work over other IPX/SPX
-// implementations. Include this header file after winsock.h and
-// wsipx.h.
-//
-// To open an IPX socket where a particular packet type is sent in
-// the IPX header, specify NSPROTO_IPX + n as the protocol parameter
-// of the socket() API. For example, to open an IPX socket that
-// sets the packet type to 34, use the following socket() call:
-//
-// s = socket(AF_IPX, SOCK_DGRAM, NSPROTO_IPX + 34);
-//
-// Below are socket option that may be set or retrieved by specifying
-// the appropriate manifest in the "optname" parameter of getsockopt()
-// or setsockopt(). Use NSPROTO_IPX as the "level" argument for the
-// call.
-//
-
-//
-// Set/get the IPX packet type. The value specified in the
-// optval argument will be set as the packet type on every IPX
-// packet sent from this socket. The optval parameter of
-// getsockopt()/setsockopt() points to an int.
-//
-
-const
- IPX_PTYPE = $4000;
- {$EXTERNALSYM IPX_PTYPE}
-
-//
-// Set/get the receive filter packet type. Only IPX packets with
-// a packet type equal to the value specified in the optval
-// argument will be returned; packets with a packet type that
-// does not match are discarded. optval points to an int.
-//
-
- IPX_FILTERPTYPE = $4001;
- {$EXTERNALSYM IPX_FILTERPTYPE}
-
-//
-// Stop filtering on packet type set with IPX_FILTERPTYPE.
-//
-
- IPX_STOPFILTERPTYPE = $4003;
- {$EXTERNALSYM IPX_STOPFILTERPTYPE}
-
-//
-// Set/get the value of the datastream field in the SPX header on
-// every packet sent. optval points to an int.
-//
-
- IPX_DSTYPE = $4002;
- {$EXTERNALSYM IPX_DSTYPE}
-
-//
-// Enable extended addressing. On sends, adds the element
-// "unsigned char sa_ptype" to the SOCKADDR_IPX structure,
-// making the total length 15 bytes. On receives, add both
-// the sa_ptype and "unsigned char sa_flags" to the SOCKADDR_IPX
-// structure, making the total length 16 bytes. The current
-// bits defined in sa_flags are:
-//
-// 0x01 - the received frame was sent as a broadcast
-// 0x02 - the received frame was sent from this machine
-//
-// optval points to a BOOL.
-//
-
- IPX_EXTENDED_ADDRESS = $4004;
- {$EXTERNALSYM IPX_EXTENDED_ADDRESS}
-
-//
-// Send protocol header up on all receive packets. optval points
-// to a BOOL.
-//
-
- IPX_RECVHDR = $4005;
- {$EXTERNALSYM IPX_RECVHDR}
-
-//
-// Get the maximum data size that can be sent. Not valid with
-// setsockopt(). optval points to an int where the value is
-// returned.
-//
-
- IPX_MAXSIZE = $4006;
- {$EXTERNALSYM IPX_MAXSIZE}
-
-//
-// Query information about a specific adapter that IPX is bound
-// to. In a system with n adapters they are numbered 0 through n-1.
-// Callers can issue the IPX_MAX_ADAPTER_NUM getsockopt() to find
-// out the number of adapters present, or call IPX_ADDRESS with
-// increasing values of adapternum until it fails. Not valid
-// with setsockopt(). optval points to an instance of the
-// IPX_ADDRESS_DATA structure with the adapternum filled in.
-//
-
- IPX_ADDRESS = $4007;
- {$EXTERNALSYM IPX_ADDRESS}
-
-// mvb LongBool's in the following record changed to Boolean's (JCP)
-
-type
- _IPX_ADDRESS_DATA = record
- adapternum: Integer; // input: 0-based adapter number
- netnum: array [0..3] of UCHAR; // output: IPX network number
- nodenum: array [0..5] of UCHAR; // output: IPX node address
- wan: Boolean; // output: TRUE = adapter is on a wan link
- status: Boolean; // output: TRUE = wan link is up (or adapter is not wan)
- maxpkt: Integer; // output: max packet size, not including IPX header
- linkspeed: ULONG; // output: link speed in 100 bytes/sec (i.e. 96 == 9600 bps)
- end;
- {$EXTERNALSYM _IPX_ADDRESS_DATA}
- IPX_ADDRESS_DATA = _IPX_ADDRESS_DATA;
- {$EXTERNALSYM IPX_ADDRESS_DATA}
- PIPX_ADDRESS_DATA = ^IPX_ADDRESS_DATA;
- {$EXTERNALSYM PIPX_ADDRESS_DATA}
- TIpxAddressData = IPX_ADDRESS_DATA;
- PIpxAddressData = PIPX_ADDRESS_DATA;
-
-//
-// Query information about a specific IPX network number. If the
-// network is in IPX's cache it will return the information directly,
-// otherwise it will issue RIP requests to find it. Not valid with
-// setsockopt(). optval points to an instance of the IPX_NETNUM_DATA
-// structure with the netnum filled in.
-//
-
-const
- IPX_GETNETINFO = $4008;
- {$EXTERNALSYM IPX_GETNETINFO}
-
-type
- _IPX_NETNUM_DATA = record
- netnum: array [0..3] of UCHAR; // input: IPX network number
- hopcount: USHORT; // output: hop count to this network, in machine order
- netdelay: USHORT; // output: tick count to this network, in machine order
- cardnum: Integer; // output: 0-based adapter number used to route to this net;
- // can be used as adapternum input to IPX_ADDRESS
- router: array [0..5] of UCHAR; // output: MAC address of the next hop router, zeroed if
- // the network is directly attached
- end;
- {$EXTERNALSYM _IPX_NETNUM_DATA}
- IPX_NETNUM_DATA = _IPX_NETNUM_DATA;
- {$EXTERNALSYM IPX_NETNUM_DATA}
- PIPX_NETNUM_DATA = ^IPX_NETNUM_DATA;
- {$EXTERNALSYM PIPX_NETNUM_DATA}
- TIpxNetNumData = IPX_NETNUM_DATA;
- PIpxNetNumData = PIPX_NETNUM_DATA;
-
-//
-// Like IPX_GETNETINFO except it *does not* issue RIP requests. If the
-// network is in IPX's cache it will return the information, otherwise
-// it will fail (see also IPX_RERIPNETNUMBER which *always* forces a
-// re-RIP). Not valid with setsockopt(). optval points to an instance of
-// the IPX_NETNUM_DATA structure with the netnum filled in.
-//
-
-const
- IPX_GETNETINFO_NORIP = $4009;
- {$EXTERNALSYM IPX_GETNETINFO_NORIP}
-
-//
-// Get information on a connected SPX socket. optval points
-// to an instance of the IPX_SPXCONNSTATUS_DATA structure.
-//
-// All numbers are in Novell (high-low) order.
-//
-
- IPX_SPXGETCONNECTIONSTATUS = $400B;
- {$EXTERNALSYM IPX_SPXGETCONNECTIONSTATUS}
-
-type
- _IPX_SPXCONNSTATUS_DATA = record
- ConnectionState: UCHAR;
- WatchDogActive: UCHAR;
- LocalConnectionId: USHORT;
- RemoteConnectionId: USHORT;
- LocalSequenceNumber: USHORT;
- LocalAckNumber: USHORT;
- LocalAllocNumber: USHORT;
- RemoteAckNumber: USHORT;
- RemoteAllocNumber: USHORT;
- LocalSocket: USHORT;
- ImmediateAddress: array [0..5] of UCHAR;
- RemoteNetwork: array [0..3] of UCHAR;
- RemoteNode: array [0..5] of UCHAR;
- RemoteSocket: USHORT;
- RetransmissionCount: USHORT;
- EstimatedRoundTripDelay: USHORT; // In milliseconds
- RetransmittedPackets: USHORT;
- SuppressedPacket: USHORT;
- end;
- {$EXTERNALSYM _IPX_SPXCONNSTATUS_DATA}
- IPX_SPXCONNSTATUS_DATA = _IPX_SPXCONNSTATUS_DATA;
- {$EXTERNALSYM IPX_SPXCONNSTATUS_DATA}
- PIPX_SPXCONNSTATUS_DATA = ^IPX_SPXCONNSTATUS_DATA;
- {$EXTERNALSYM PIPX_SPXCONNSTATUS_DATA}
- TIpxSpcConnStatusData = IPX_SPXCONNSTATUS_DATA;
- PIpxSpcConnStatusData = PIPX_SPXCONNSTATUS_DATA;
-
-//
-// Get notification when the status of an adapter that IPX is
-// bound to changes. Typically this will happen when a wan line
-// goes up or down. Not valid with setsockopt(). optval points
-// to a buffer which contains an IPX_ADDRESS_DATA structure
-// followed immediately by a HANDLE to an unsignaled event.
-//
-// When the getsockopt() query is submitted, it will complete
-// successfully. However, the IPX_ADDRESS_DATA pointed to by
-// optval will not be updated at that point. Instead the
-// request is queued internally inside the transport.
-//
-// When the status of an adapter changes, IPX will locate a
-// queued getsockopt() query and fill in all the fields in the
-// IPX_ADDRESS_DATA structure. It will then signal the event
-// pointed to by the HANDLE in the optval buffer. This handle
-// should be obtained before calling getsockopt() by calling
-// CreateEvent(). If multiple getsockopts() are submitted at
-// once, different events must be used.
-//
-// The event is used because the call needs to be asynchronous
-// but currently getsockopt() does not support this.
-//
-// WARNING: In the current implementation, the transport will
-// only signal one queued query for each status change. Therefore
-// only one service which uses this query should be running at
-// once.
-//
-
-const
- IPX_ADDRESS_NOTIFY = $400C;
- {$EXTERNALSYM IPX_ADDRESS_NOTIFY}
-
-//
-// Get the maximum number of adapters present. If this call returns
-// n then the adapters are numbered 0 through n-1. Not valid
-// with setsockopt(). optval points to an int where the value
-// is returned.
-//
-
- IPX_MAX_ADAPTER_NUM = $400D;
- {$EXTERNALSYM IPX_MAX_ADAPTER_NUM}
-
-//
-// Like IPX_GETNETINFO except it forces IPX to re-RIP even if the
-// network is in its cache (but not if it is directly attached to).
-// Not valid with setsockopt(). optval points to an instance of
-// the IPX_NETNUM_DATA structure with the netnum filled in.
-//
-
- IPX_RERIPNETNUMBER = $400E;
- {$EXTERNALSYM IPX_RERIPNETNUMBER}
-
-//
-// A hint that broadcast packets may be received. The default is
-// TRUE. Applications that do not need to receive broadcast packets
-// should set this sockopt to FALSE which may cause better system
-// performance (note that it does not necessarily cause broadcasts
-// to be filtered for the application). Not valid with getsockopt().
-// optval points to a BOOL.
-//
-
- IPX_RECEIVE_BROADCAST = $400F;
- {$EXTERNALSYM IPX_RECEIVE_BROADCAST}
-
-//
-// On SPX connections, don't delay before sending ack. Applications
-// that do not tend to have back-and-forth traffic over SPX should
-// set this; it will increase the number of acks sent but will remove
-// delays in sending acks. optval points to a BOOL.
-//
-
- IPX_IMMEDIATESPXACK = $4010;
- {$EXTERNALSYM IPX_IMMEDIATESPXACK}
-
-implementation
-
-end.
+{******************************************************************************}
+{ }
+{ Winsock2 IPX/SPX Extensions API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: wsipx.h, released June 2000. The original Pascal }
+{ code is: WSIpxpas, released December 2000. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwawsnwlink.pas,v 1.1 2005/04/04 07:56:11 marco Exp $
+
+unit JwaWSNwLink;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "wsnwlink.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaWinSock2;
+
+// Microsoft Windows
+// Copyright (C) Microsoft Corporation, 1992-1999.
+// Microsoft-specific extensions to the Windows NT IPX/SPX Windows
+// Sockets interface. These extensions are provided for use as
+// necessary for compatibility with existing applications. They are
+// otherwise not recommended for use, as they are only guaranteed to
+// work * over the Microsoft IPX/SPX stack. An application which
+// uses these * extensions may not work over other IPX/SPX
+// implementations. Include this header file after winsock.h and
+// wsipx.h.
+//
+// To open an IPX socket where a particular packet type is sent in
+// the IPX header, specify NSPROTO_IPX + n as the protocol parameter
+// of the socket() API. For example, to open an IPX socket that
+// sets the packet type to 34, use the following socket() call:
+//
+// s = socket(AF_IPX, SOCK_DGRAM, NSPROTO_IPX + 34);
+//
+// Below are socket option that may be set or retrieved by specifying
+// the appropriate manifest in the "optname" parameter of getsockopt()
+// or setsockopt(). Use NSPROTO_IPX as the "level" argument for the
+// call.
+//
+
+//
+// Set/get the IPX packet type. The value specified in the
+// optval argument will be set as the packet type on every IPX
+// packet sent from this socket. The optval parameter of
+// getsockopt()/setsockopt() points to an int.
+//
+
+const
+ IPX_PTYPE = $4000;
+ {$EXTERNALSYM IPX_PTYPE}
+
+//
+// Set/get the receive filter packet type. Only IPX packets with
+// a packet type equal to the value specified in the optval
+// argument will be returned; packets with a packet type that
+// does not match are discarded. optval points to an int.
+//
+
+ IPX_FILTERPTYPE = $4001;
+ {$EXTERNALSYM IPX_FILTERPTYPE}
+
+//
+// Stop filtering on packet type set with IPX_FILTERPTYPE.
+//
+
+ IPX_STOPFILTERPTYPE = $4003;
+ {$EXTERNALSYM IPX_STOPFILTERPTYPE}
+
+//
+// Set/get the value of the datastream field in the SPX header on
+// every packet sent. optval points to an int.
+//
+
+ IPX_DSTYPE = $4002;
+ {$EXTERNALSYM IPX_DSTYPE}
+
+//
+// Enable extended addressing. On sends, adds the element
+// "unsigned char sa_ptype" to the SOCKADDR_IPX structure,
+// making the total length 15 bytes. On receives, add both
+// the sa_ptype and "unsigned char sa_flags" to the SOCKADDR_IPX
+// structure, making the total length 16 bytes. The current
+// bits defined in sa_flags are:
+//
+// 0x01 - the received frame was sent as a broadcast
+// 0x02 - the received frame was sent from this machine
+//
+// optval points to a BOOL.
+//
+
+ IPX_EXTENDED_ADDRESS = $4004;
+ {$EXTERNALSYM IPX_EXTENDED_ADDRESS}
+
+//
+// Send protocol header up on all receive packets. optval points
+// to a BOOL.
+//
+
+ IPX_RECVHDR = $4005;
+ {$EXTERNALSYM IPX_RECVHDR}
+
+//
+// Get the maximum data size that can be sent. Not valid with
+// setsockopt(). optval points to an int where the value is
+// returned.
+//
+
+ IPX_MAXSIZE = $4006;
+ {$EXTERNALSYM IPX_MAXSIZE}
+
+//
+// Query information about a specific adapter that IPX is bound
+// to. In a system with n adapters they are numbered 0 through n-1.
+// Callers can issue the IPX_MAX_ADAPTER_NUM getsockopt() to find
+// out the number of adapters present, or call IPX_ADDRESS with
+// increasing values of adapternum until it fails. Not valid
+// with setsockopt(). optval points to an instance of the
+// IPX_ADDRESS_DATA structure with the adapternum filled in.
+//
+
+ IPX_ADDRESS = $4007;
+ {$EXTERNALSYM IPX_ADDRESS}
+
+// mvb LongBool's in the following record changed to Boolean's (JCP)
+
+type
+ _IPX_ADDRESS_DATA = record
+ adapternum: Integer; // input: 0-based adapter number
+ netnum: array [0..3] of UCHAR; // output: IPX network number
+ nodenum: array [0..5] of UCHAR; // output: IPX node address
+ wan: Boolean; // output: TRUE = adapter is on a wan link
+ status: Boolean; // output: TRUE = wan link is up (or adapter is not wan)
+ maxpkt: Integer; // output: max packet size, not including IPX header
+ linkspeed: ULONG; // output: link speed in 100 bytes/sec (i.e. 96 == 9600 bps)
+ end;
+ {$EXTERNALSYM _IPX_ADDRESS_DATA}
+ IPX_ADDRESS_DATA = _IPX_ADDRESS_DATA;
+ {$EXTERNALSYM IPX_ADDRESS_DATA}
+ PIPX_ADDRESS_DATA = ^IPX_ADDRESS_DATA;
+ {$EXTERNALSYM PIPX_ADDRESS_DATA}
+ TIpxAddressData = IPX_ADDRESS_DATA;
+ PIpxAddressData = PIPX_ADDRESS_DATA;
+
+//
+// Query information about a specific IPX network number. If the
+// network is in IPX's cache it will return the information directly,
+// otherwise it will issue RIP requests to find it. Not valid with
+// setsockopt(). optval points to an instance of the IPX_NETNUM_DATA
+// structure with the netnum filled in.
+//
+
+const
+ IPX_GETNETINFO = $4008;
+ {$EXTERNALSYM IPX_GETNETINFO}
+
+type
+ _IPX_NETNUM_DATA = record
+ netnum: array [0..3] of UCHAR; // input: IPX network number
+ hopcount: USHORT; // output: hop count to this network, in machine order
+ netdelay: USHORT; // output: tick count to this network, in machine order
+ cardnum: Integer; // output: 0-based adapter number used to route to this net;
+ // can be used as adapternum input to IPX_ADDRESS
+ router: array [0..5] of UCHAR; // output: MAC address of the next hop router, zeroed if
+ // the network is directly attached
+ end;
+ {$EXTERNALSYM _IPX_NETNUM_DATA}
+ IPX_NETNUM_DATA = _IPX_NETNUM_DATA;
+ {$EXTERNALSYM IPX_NETNUM_DATA}
+ PIPX_NETNUM_DATA = ^IPX_NETNUM_DATA;
+ {$EXTERNALSYM PIPX_NETNUM_DATA}
+ TIpxNetNumData = IPX_NETNUM_DATA;
+ PIpxNetNumData = PIPX_NETNUM_DATA;
+
+//
+// Like IPX_GETNETINFO except it *does not* issue RIP requests. If the
+// network is in IPX's cache it will return the information, otherwise
+// it will fail (see also IPX_RERIPNETNUMBER which *always* forces a
+// re-RIP). Not valid with setsockopt(). optval points to an instance of
+// the IPX_NETNUM_DATA structure with the netnum filled in.
+//
+
+const
+ IPX_GETNETINFO_NORIP = $4009;
+ {$EXTERNALSYM IPX_GETNETINFO_NORIP}
+
+//
+// Get information on a connected SPX socket. optval points
+// to an instance of the IPX_SPXCONNSTATUS_DATA structure.
+//
+// All numbers are in Novell (high-low) order.
+//
+
+ IPX_SPXGETCONNECTIONSTATUS = $400B;
+ {$EXTERNALSYM IPX_SPXGETCONNECTIONSTATUS}
+
+type
+ _IPX_SPXCONNSTATUS_DATA = record
+ ConnectionState: UCHAR;
+ WatchDogActive: UCHAR;
+ LocalConnectionId: USHORT;
+ RemoteConnectionId: USHORT;
+ LocalSequenceNumber: USHORT;
+ LocalAckNumber: USHORT;
+ LocalAllocNumber: USHORT;
+ RemoteAckNumber: USHORT;
+ RemoteAllocNumber: USHORT;
+ LocalSocket: USHORT;
+ ImmediateAddress: array [0..5] of UCHAR;
+ RemoteNetwork: array [0..3] of UCHAR;
+ RemoteNode: array [0..5] of UCHAR;
+ RemoteSocket: USHORT;
+ RetransmissionCount: USHORT;
+ EstimatedRoundTripDelay: USHORT; // In milliseconds
+ RetransmittedPackets: USHORT;
+ SuppressedPacket: USHORT;
+ end;
+ {$EXTERNALSYM _IPX_SPXCONNSTATUS_DATA}
+ IPX_SPXCONNSTATUS_DATA = _IPX_SPXCONNSTATUS_DATA;
+ {$EXTERNALSYM IPX_SPXCONNSTATUS_DATA}
+ PIPX_SPXCONNSTATUS_DATA = ^IPX_SPXCONNSTATUS_DATA;
+ {$EXTERNALSYM PIPX_SPXCONNSTATUS_DATA}
+ TIpxSpcConnStatusData = IPX_SPXCONNSTATUS_DATA;
+ PIpxSpcConnStatusData = PIPX_SPXCONNSTATUS_DATA;
+
+//
+// Get notification when the status of an adapter that IPX is
+// bound to changes. Typically this will happen when a wan line
+// goes up or down. Not valid with setsockopt(). optval points
+// to a buffer which contains an IPX_ADDRESS_DATA structure
+// followed immediately by a HANDLE to an unsignaled event.
+//
+// When the getsockopt() query is submitted, it will complete
+// successfully. However, the IPX_ADDRESS_DATA pointed to by
+// optval will not be updated at that point. Instead the
+// request is queued internally inside the transport.
+//
+// When the status of an adapter changes, IPX will locate a
+// queued getsockopt() query and fill in all the fields in the
+// IPX_ADDRESS_DATA structure. It will then signal the event
+// pointed to by the HANDLE in the optval buffer. This handle
+// should be obtained before calling getsockopt() by calling
+// CreateEvent(). If multiple getsockopts() are submitted at
+// once, different events must be used.
+//
+// The event is used because the call needs to be asynchronous
+// but currently getsockopt() does not support this.
+//
+// WARNING: In the current implementation, the transport will
+// only signal one queued query for each status change. Therefore
+// only one service which uses this query should be running at
+// once.
+//
+
+const
+ IPX_ADDRESS_NOTIFY = $400C;
+ {$EXTERNALSYM IPX_ADDRESS_NOTIFY}
+
+//
+// Get the maximum number of adapters present. If this call returns
+// n then the adapters are numbered 0 through n-1. Not valid
+// with setsockopt(). optval points to an int where the value
+// is returned.
+//
+
+ IPX_MAX_ADAPTER_NUM = $400D;
+ {$EXTERNALSYM IPX_MAX_ADAPTER_NUM}
+
+//
+// Like IPX_GETNETINFO except it forces IPX to re-RIP even if the
+// network is in its cache (but not if it is directly attached to).
+// Not valid with setsockopt(). optval points to an instance of
+// the IPX_NETNUM_DATA structure with the netnum filled in.
+//
+
+ IPX_RERIPNETNUMBER = $400E;
+ {$EXTERNALSYM IPX_RERIPNETNUMBER}
+
+//
+// A hint that broadcast packets may be received. The default is
+// TRUE. Applications that do not need to receive broadcast packets
+// should set this sockopt to FALSE which may cause better system
+// performance (note that it does not necessarily cause broadcasts
+// to be filtered for the application). Not valid with getsockopt().
+// optval points to a BOOL.
+//
+
+ IPX_RECEIVE_BROADCAST = $400F;
+ {$EXTERNALSYM IPX_RECEIVE_BROADCAST}
+
+//
+// On SPX connections, don't delay before sending ack. Applications
+// that do not tend to have back-and-forth traffic over SPX should
+// set this; it will increase the number of acks sent but will remove
+// delays in sending acks. optval points to a BOOL.
+//
+
+ IPX_IMMEDIATESPXACK = $4010;
+ {$EXTERNALSYM IPX_IMMEDIATESPXACK}
+
+implementation
+
+end.
diff --git a/packages/extra/winunits/jwawsrm.pas b/packages/extra/winunits/jwawsrm.pas
index 4a1e47dfb1..7f35985442 100644
--- a/packages/extra/winunits/jwawsrm.pas
+++ b/packages/extra/winunits/jwawsrm.pas
@@ -1,243 +1,243 @@
-{******************************************************************************}
-{ }
-{ Interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2003 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 2003 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwawsrm.pas,v 1.1 2005/04/04 07:56:11 marco Exp $
-
-unit JwaWsrm;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "wsrm.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaWinType;
-
-(*
-** wsrm.h - winsock extension for Reliable Multicast (RMCast) Transport
-**
-** This file contains PGM specific information for use by WinSock2 compatible
-** applications that need Reliable Multicast Transport.
-**
-** Copyright (c) Microsoft Corporation. All rights reserved.
-**
-** Created: Mar 12, 2000
-**
-*)
-
-const
- IPPROTO_RM = 113;
- {$EXTERNALSYM IPPROTO_RM}
- MAX_MCAST_TTL = 255;
- {$EXTERNALSYM MAX_MCAST_TTL}
-
-//
-// options for setsockopt, getsockopt
-//
- RM_OPTIONSBASE = 1000;
- {$EXTERNALSYM RM_OPTIONSBASE}
-
-// Set/Query rate (Kb/Sec) + window size (Kb and/or MSec) -- described by RM_SEND_WINDOW below
- RM_RATE_WINDOW_SIZE = RM_OPTIONSBASE + 1;
- {$EXTERNALSYM RM_RATE_WINDOW_SIZE}
-
-// Set the size of the next message -- (ULONG)
- RM_SET_MESSAGE_BOUNDARY = RM_OPTIONSBASE + 2;
- {$EXTERNALSYM RM_SET_MESSAGE_BOUNDARY}
-
-// flush the entire data (window) right now -- not implemented
- RM_FLUSHCACHE = RM_OPTIONSBASE + 3;
- {$EXTERNALSYM RM_FLUSHCACHE}
-
-// Set or Query the window advance method on the sender -- methods enumerated in eWINDOW_ADVANCE_METHOD
- RM_SENDER_WINDOW_ADVANCE_METHOD = RM_OPTIONSBASE + 4;
- {$EXTERNALSYM RM_SENDER_WINDOW_ADVANCE_METHOD}
-
-// get sender statistics
- RM_SENDER_STATISTICS = RM_OPTIONSBASE + 5;
- {$EXTERNALSYM RM_SENDER_STATISTICS}
-
-// allow a late-joiner to NAK any packet upto the lowest sequence Id
- RM_LATEJOIN = RM_OPTIONSBASE + 6;
- {$EXTERNALSYM RM_LATEJOIN}
-
-// set IP multicast outgoing interface
- RM_SET_SEND_IF = RM_OPTIONSBASE + 7;
- {$EXTERNALSYM RM_SET_SEND_IF}
-
-// add IP multicast incoming interface
- RM_ADD_RECEIVE_IF = RM_OPTIONSBASE + 8;
- {$EXTERNALSYM RM_ADD_RECEIVE_IF}
-
-// delete IP multicast incoming interface
- RM_DEL_RECEIVE_IF = RM_OPTIONSBASE + 9;
- {$EXTERNALSYM RM_DEL_RECEIVE_IF}
-
-// Set/Query the Window's Advance rate (has to be less that MAX_WINDOW_INCREMENT_PERCENTAGE)
- RM_SEND_WINDOW_ADV_RATE = RM_OPTIONSBASE + 10;
- {$EXTERNALSYM RM_SEND_WINDOW_ADV_RATE}
-
-// Instruct to use parity-based forward error correction schemes
- RM_USE_FEC = RM_OPTIONSBASE + 11;
- {$EXTERNALSYM RM_USE_FEC}
-
-// Set the Ttl of the MCast packets -- (ULONG)
- RM_SET_MCAST_TTL = RM_OPTIONSBASE + 12;
- {$EXTERNALSYM RM_SET_MCAST_TTL}
-
-// get receiver statistics
- RM_RECEIVER_STATISTICS = RM_OPTIONSBASE + 13;
- {$EXTERNALSYM RM_RECEIVER_STATISTICS}
-
-// get receiver statistics
- RM_HIGH_SPEED_INTRANET_OPT = RM_OPTIONSBASE + 14;
- {$EXTERNALSYM RM_HIGH_SPEED_INTRANET_OPT}
-
-//==============================================================
-//
-// Definitions
-//
-
-const
- SENDER_DEFAULT_RATE_KBITS_PER_SEC = 56; // 56 Kbits/Sec
- {$EXTERNALSYM SENDER_DEFAULT_RATE_KBITS_PER_SEC}
- SENDER_DEFAULT_WINDOW_SIZE_BYTES = 10 * 1000 * 1000; // 10 Megs
- {$EXTERNALSYM SENDER_DEFAULT_WINDOW_SIZE_BYTES}
-
- SENDER_DEFAULT_WINDOW_ADV_PERCENTAGE = 15; // 15%
- {$EXTERNALSYM SENDER_DEFAULT_WINDOW_ADV_PERCENTAGE}
- MAX_WINDOW_INCREMENT_PERCENTAGE = 25; // 25%
- {$EXTERNALSYM MAX_WINDOW_INCREMENT_PERCENTAGE}
-
- SENDER_DEFAULT_LATE_JOINER_PERCENTAGE = 0; // 0%
- {$EXTERNALSYM SENDER_DEFAULT_LATE_JOINER_PERCENTAGE}
- SENDER_MAX_LATE_JOINER_PERCENTAGE = 75; // 75%
- {$EXTERNALSYM SENDER_MAX_LATE_JOINER_PERCENTAGE}
-
- BITS_PER_BYTE = 8;
- {$EXTERNALSYM BITS_PER_BYTE}
- LOG2_BITS_PER_BYTE = 3;
- {$EXTERNALSYM LOG2_BITS_PER_BYTE}
-
-type
- eWINDOW_ADVANCE_METHOD = (E_WINDOW_ADVANCE_BY_TIME = 1, E_WINDOW_USE_AS_DATA_CACHE);
- {$EXTERNALSYM eWINDOW_ADVANCE_METHOD}
-
-//==============================================================
-//
-// Structures
-//
-
-type
- _RM_SEND_WINDOW = record
- RateKbitsPerSec: ULONG; // Send rate
- WindowSizeInMSecs: ULONG;
- WindowSizeInBytes: ULONG;
- end;
- {$EXTERNALSYM _RM_SEND_WINDOW}
- RM_SEND_WINDOW = _RM_SEND_WINDOW;
- {$EXTERNALSYM RM_SEND_WINDOW}
- TRmSendWindow = RM_SEND_WINDOW;
-
- _RM_SENDER_STATS = record
- DataBytesSent: ULONGLONG; // # client data bytes sent out so far
- TotalBytesSent: ULONGLONG; // SPM, OData and RData bytes
- NaksReceived: ULONGLONG; // # NAKs received so far
- NaksReceivedTooLate: ULONGLONG; // # NAKs recvd after window advanced
- NumOutstandingNaks: ULONGLONG; // # NAKs yet to be responded to
- NumNaksAfterRData: ULONGLONG; // # NAKs yet to be responded to
- RepairPacketsSent: ULONGLONG; // # Repairs (RDATA) sent so far
- BufferSpaceAvailable: ULONGLONG; // # partial messages dropped
- TrailingEdgeSeqId: ULONGLONG; // smallest (oldest) Sequence Id in the window
- LeadingEdgeSeqId: ULONGLONG; // largest (newest) Sequence Id in the window
- RateKBitsPerSecOverall: ULONGLONG; // Internally calculated send-rate from the beginning
- RateKBitsPerSecLast: ULONGLONG; // Send-rate calculated every INTERNAL_RATE_CALCULATION_FREQUENCY
- TotalODataPacketsSent: ULONGLONG; // # ODATA packets sent so far
- end;
- {$EXTERNALSYM _RM_SENDER_STATS}
- RM_SENDER_STATS = _RM_SENDER_STATS;
- {$EXTERNALSYM RM_SENDER_STATS}
- TRmSenderStats = RM_SENDER_STATS;
-
- _RM_RECEIVER_STATS = record
- NumODataPacketsReceived: ULONGLONG;// # OData sequences received
- NumRDataPacketsReceived: ULONGLONG;// # RData sequences received
- NumDuplicateDataPackets: ULONGLONG;// # RData sequences received
-
- DataBytesReceived: ULONGLONG; // # client data bytes received out so far
- TotalBytesReceived: ULONGLONG; // SPM, OData and RData bytes
- RateKBitsPerSecOverall: ULONGLONG; // Internally calculated Receive-rate from the beginning
- RateKBitsPerSecLast: ULONGLONG; // Receive-rate calculated every INTERNAL_RATE_CALCULATION_FREQUENCY
-
- TrailingEdgeSeqId: ULONGLONG; // smallest (oldest) Sequence Id in the window
- LeadingEdgeSeqId: ULONGLONG; // largest (newest) Sequence Id in the window
- AverageSequencesInWindow: ULONGLONG;
- MinSequencesInWindow: ULONGLONG;
- MaxSequencesInWindow: ULONGLONG;
-
- FirstNakSequenceNumber: ULONGLONG; // # First Outstanding Nak
- NumPendingNaks: ULONGLONG; // # Sequences waiting for Ncfs
- NumOutstandingNaks: ULONGLONG; // # Sequences for which Ncfs have been received, but no data
- NumDataPacketsBuffered: ULONGLONG; // # Data packets currently buffered by transport
- TotalSelectiveNaksSent: ULONGLONG; // # Selective NAKs sent so far
- TotalParityNaksSent: ULONGLONG; // # Parity NAKs sent so far
- end;
- {$EXTERNALSYM _RM_RECEIVER_STATS}
- RM_RECEIVER_STATS = _RM_RECEIVER_STATS;
- {$EXTERNALSYM RM_RECEIVER_STATS}
- TRmReceiverStats = RM_RECEIVER_STATS;
-
- _RM_FEC_INFO = record
- FECBlockSize: USHORT;
- FECProActivePackets: USHORT;
- FECGroupSize: UCHAR;
- fFECOnDemandParityEnabled: BOOLEAN;
- end;
- {$EXTERNALSYM _RM_FEC_INFO}
- RM_FEC_INFO = _RM_FEC_INFO;
- {$EXTERNALSYM RM_FEC_INFO}
- TRmFecInfo = RM_FEC_INFO;
-
-implementation
-
-end.
+{******************************************************************************}
+{ }
+{ Interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2003 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 2003 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwawsrm.pas,v 1.1 2005/04/04 07:56:11 marco Exp $
+
+unit JwaWsrm;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "wsrm.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaWinType;
+
+(*
+** wsrm.h - winsock extension for Reliable Multicast (RMCast) Transport
+**
+** This file contains PGM specific information for use by WinSock2 compatible
+** applications that need Reliable Multicast Transport.
+**
+** Copyright (c) Microsoft Corporation. All rights reserved.
+**
+** Created: Mar 12, 2000
+**
+*)
+
+const
+ IPPROTO_RM = 113;
+ {$EXTERNALSYM IPPROTO_RM}
+ MAX_MCAST_TTL = 255;
+ {$EXTERNALSYM MAX_MCAST_TTL}
+
+//
+// options for setsockopt, getsockopt
+//
+ RM_OPTIONSBASE = 1000;
+ {$EXTERNALSYM RM_OPTIONSBASE}
+
+// Set/Query rate (Kb/Sec) + window size (Kb and/or MSec) -- described by RM_SEND_WINDOW below
+ RM_RATE_WINDOW_SIZE = RM_OPTIONSBASE + 1;
+ {$EXTERNALSYM RM_RATE_WINDOW_SIZE}
+
+// Set the size of the next message -- (ULONG)
+ RM_SET_MESSAGE_BOUNDARY = RM_OPTIONSBASE + 2;
+ {$EXTERNALSYM RM_SET_MESSAGE_BOUNDARY}
+
+// flush the entire data (window) right now -- not implemented
+ RM_FLUSHCACHE = RM_OPTIONSBASE + 3;
+ {$EXTERNALSYM RM_FLUSHCACHE}
+
+// Set or Query the window advance method on the sender -- methods enumerated in eWINDOW_ADVANCE_METHOD
+ RM_SENDER_WINDOW_ADVANCE_METHOD = RM_OPTIONSBASE + 4;
+ {$EXTERNALSYM RM_SENDER_WINDOW_ADVANCE_METHOD}
+
+// get sender statistics
+ RM_SENDER_STATISTICS = RM_OPTIONSBASE + 5;
+ {$EXTERNALSYM RM_SENDER_STATISTICS}
+
+// allow a late-joiner to NAK any packet upto the lowest sequence Id
+ RM_LATEJOIN = RM_OPTIONSBASE + 6;
+ {$EXTERNALSYM RM_LATEJOIN}
+
+// set IP multicast outgoing interface
+ RM_SET_SEND_IF = RM_OPTIONSBASE + 7;
+ {$EXTERNALSYM RM_SET_SEND_IF}
+
+// add IP multicast incoming interface
+ RM_ADD_RECEIVE_IF = RM_OPTIONSBASE + 8;
+ {$EXTERNALSYM RM_ADD_RECEIVE_IF}
+
+// delete IP multicast incoming interface
+ RM_DEL_RECEIVE_IF = RM_OPTIONSBASE + 9;
+ {$EXTERNALSYM RM_DEL_RECEIVE_IF}
+
+// Set/Query the Window's Advance rate (has to be less that MAX_WINDOW_INCREMENT_PERCENTAGE)
+ RM_SEND_WINDOW_ADV_RATE = RM_OPTIONSBASE + 10;
+ {$EXTERNALSYM RM_SEND_WINDOW_ADV_RATE}
+
+// Instruct to use parity-based forward error correction schemes
+ RM_USE_FEC = RM_OPTIONSBASE + 11;
+ {$EXTERNALSYM RM_USE_FEC}
+
+// Set the Ttl of the MCast packets -- (ULONG)
+ RM_SET_MCAST_TTL = RM_OPTIONSBASE + 12;
+ {$EXTERNALSYM RM_SET_MCAST_TTL}
+
+// get receiver statistics
+ RM_RECEIVER_STATISTICS = RM_OPTIONSBASE + 13;
+ {$EXTERNALSYM RM_RECEIVER_STATISTICS}
+
+// get receiver statistics
+ RM_HIGH_SPEED_INTRANET_OPT = RM_OPTIONSBASE + 14;
+ {$EXTERNALSYM RM_HIGH_SPEED_INTRANET_OPT}
+
+//==============================================================
+//
+// Definitions
+//
+
+const
+ SENDER_DEFAULT_RATE_KBITS_PER_SEC = 56; // 56 Kbits/Sec
+ {$EXTERNALSYM SENDER_DEFAULT_RATE_KBITS_PER_SEC}
+ SENDER_DEFAULT_WINDOW_SIZE_BYTES = 10 * 1000 * 1000; // 10 Megs
+ {$EXTERNALSYM SENDER_DEFAULT_WINDOW_SIZE_BYTES}
+
+ SENDER_DEFAULT_WINDOW_ADV_PERCENTAGE = 15; // 15%
+ {$EXTERNALSYM SENDER_DEFAULT_WINDOW_ADV_PERCENTAGE}
+ MAX_WINDOW_INCREMENT_PERCENTAGE = 25; // 25%
+ {$EXTERNALSYM MAX_WINDOW_INCREMENT_PERCENTAGE}
+
+ SENDER_DEFAULT_LATE_JOINER_PERCENTAGE = 0; // 0%
+ {$EXTERNALSYM SENDER_DEFAULT_LATE_JOINER_PERCENTAGE}
+ SENDER_MAX_LATE_JOINER_PERCENTAGE = 75; // 75%
+ {$EXTERNALSYM SENDER_MAX_LATE_JOINER_PERCENTAGE}
+
+ BITS_PER_BYTE = 8;
+ {$EXTERNALSYM BITS_PER_BYTE}
+ LOG2_BITS_PER_BYTE = 3;
+ {$EXTERNALSYM LOG2_BITS_PER_BYTE}
+
+type
+ eWINDOW_ADVANCE_METHOD = (E_WINDOW_ADVANCE_BY_TIME = 1, E_WINDOW_USE_AS_DATA_CACHE);
+ {$EXTERNALSYM eWINDOW_ADVANCE_METHOD}
+
+//==============================================================
+//
+// Structures
+//
+
+type
+ _RM_SEND_WINDOW = record
+ RateKbitsPerSec: ULONG; // Send rate
+ WindowSizeInMSecs: ULONG;
+ WindowSizeInBytes: ULONG;
+ end;
+ {$EXTERNALSYM _RM_SEND_WINDOW}
+ RM_SEND_WINDOW = _RM_SEND_WINDOW;
+ {$EXTERNALSYM RM_SEND_WINDOW}
+ TRmSendWindow = RM_SEND_WINDOW;
+
+ _RM_SENDER_STATS = record
+ DataBytesSent: ULONGLONG; // # client data bytes sent out so far
+ TotalBytesSent: ULONGLONG; // SPM, OData and RData bytes
+ NaksReceived: ULONGLONG; // # NAKs received so far
+ NaksReceivedTooLate: ULONGLONG; // # NAKs recvd after window advanced
+ NumOutstandingNaks: ULONGLONG; // # NAKs yet to be responded to
+ NumNaksAfterRData: ULONGLONG; // # NAKs yet to be responded to
+ RepairPacketsSent: ULONGLONG; // # Repairs (RDATA) sent so far
+ BufferSpaceAvailable: ULONGLONG; // # partial messages dropped
+ TrailingEdgeSeqId: ULONGLONG; // smallest (oldest) Sequence Id in the window
+ LeadingEdgeSeqId: ULONGLONG; // largest (newest) Sequence Id in the window
+ RateKBitsPerSecOverall: ULONGLONG; // Internally calculated send-rate from the beginning
+ RateKBitsPerSecLast: ULONGLONG; // Send-rate calculated every INTERNAL_RATE_CALCULATION_FREQUENCY
+ TotalODataPacketsSent: ULONGLONG; // # ODATA packets sent so far
+ end;
+ {$EXTERNALSYM _RM_SENDER_STATS}
+ RM_SENDER_STATS = _RM_SENDER_STATS;
+ {$EXTERNALSYM RM_SENDER_STATS}
+ TRmSenderStats = RM_SENDER_STATS;
+
+ _RM_RECEIVER_STATS = record
+ NumODataPacketsReceived: ULONGLONG;// # OData sequences received
+ NumRDataPacketsReceived: ULONGLONG;// # RData sequences received
+ NumDuplicateDataPackets: ULONGLONG;// # RData sequences received
+
+ DataBytesReceived: ULONGLONG; // # client data bytes received out so far
+ TotalBytesReceived: ULONGLONG; // SPM, OData and RData bytes
+ RateKBitsPerSecOverall: ULONGLONG; // Internally calculated Receive-rate from the beginning
+ RateKBitsPerSecLast: ULONGLONG; // Receive-rate calculated every INTERNAL_RATE_CALCULATION_FREQUENCY
+
+ TrailingEdgeSeqId: ULONGLONG; // smallest (oldest) Sequence Id in the window
+ LeadingEdgeSeqId: ULONGLONG; // largest (newest) Sequence Id in the window
+ AverageSequencesInWindow: ULONGLONG;
+ MinSequencesInWindow: ULONGLONG;
+ MaxSequencesInWindow: ULONGLONG;
+
+ FirstNakSequenceNumber: ULONGLONG; // # First Outstanding Nak
+ NumPendingNaks: ULONGLONG; // # Sequences waiting for Ncfs
+ NumOutstandingNaks: ULONGLONG; // # Sequences for which Ncfs have been received, but no data
+ NumDataPacketsBuffered: ULONGLONG; // # Data packets currently buffered by transport
+ TotalSelectiveNaksSent: ULONGLONG; // # Selective NAKs sent so far
+ TotalParityNaksSent: ULONGLONG; // # Parity NAKs sent so far
+ end;
+ {$EXTERNALSYM _RM_RECEIVER_STATS}
+ RM_RECEIVER_STATS = _RM_RECEIVER_STATS;
+ {$EXTERNALSYM RM_RECEIVER_STATS}
+ TRmReceiverStats = RM_RECEIVER_STATS;
+
+ _RM_FEC_INFO = record
+ FECBlockSize: USHORT;
+ FECProActivePackets: USHORT;
+ FECGroupSize: UCHAR;
+ fFECOnDemandParityEnabled: BOOLEAN;
+ end;
+ {$EXTERNALSYM _RM_FEC_INFO}
+ RM_FEC_INFO = _RM_FEC_INFO;
+ {$EXTERNALSYM RM_FEC_INFO}
+ TRmFecInfo = RM_FEC_INFO;
+
+implementation
+
+end.
diff --git a/packages/extra/winunits/jwawsvns.pas b/packages/extra/winunits/jwawsvns.pas
index 13f23f2a47..76ff0994c3 100644
--- a/packages/extra/winunits/jwawsvns.pas
+++ b/packages/extra/winunits/jwawsvns.pas
@@ -1,101 +1,101 @@
-{******************************************************************************}
-{ }
-{ Winsock2 Vines IP API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: wsvns.h, released June 2000. The original Pascal }
-{ code is: WSvns.pas, released December 2000. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwawsvns.pas,v 1.1 2005/04/04 07:56:11 marco Exp $
-
-unit JwaWSvns;
-
-{$WEAKPACKAGEUNIT}
-
-{$HPPEMIT ''}
-{$HPPEMIT '#include "wsvns.h"'}
-{$HPPEMIT ''}
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaWinSock2;
-
-//
-// Windows Sockets include file for VINES IP. This file contains all
-// standardized VINES IP information. Include this header file after winsock.h.
-//
-// To open an VINES IP socket, call socket() with an address family of AF_BAN, a
-// socket type of SOCK_DGRAM, SOCK_STREAM, or SOCK_SEQPACKET, and protocol of 0.
-//
-
-//
-// Socket address, VINES IP style. Address fields and port field are defined
-// as a sequence of bytes. This is done because they are byte ordered
-// BIG ENDIAN, ala most significant byte first.
-//
-
-type
- SOCKADDR_VNS = record
- sin_family: u_short; // = AF_BAN
- net_address: array [0..3] of u_char; // network address
- subnet_addr: array [0..1] of u_char; // subnet address
- port: array [0..1] of u_char; // msb=port[0], lsb=port[1]
- hops: u_char; // # hops for broadcasts
- filler: array [0..4] of u_char; // filler, zeros
- end;
- {$EXTERNALSYM SOCKADDR_VNS}
- PSOCKADDR_VNS = ^SOCKADDR_VNS;
- {$EXTERNALSYM PSOCKADDR_VNS}
- LPSOCKADDR_VNS = ^SOCKADDR_VNS;
- {$EXTERNALSYM LPSOCKADDR_VNS}
- TSockAddrVNS = SOCKADDR_VNS;
- PSockAddrVNS = LPSOCKADDR_VNS;
-
-const
- VNSPROTO_IPC = 1;
- {$EXTERNALSYM VNSPROTO_IPC}
- VNSPROTO_RELIABLE_IPC = 2;
- {$EXTERNALSYM VNSPROTO_RELIABLE_IPC}
- VNSPROTO_SPP = 3;
- {$EXTERNALSYM VNSPROTO_SPP}
-
-implementation
-
-end.
+{******************************************************************************}
+{ }
+{ Winsock2 Vines IP API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: wsvns.h, released June 2000. The original Pascal }
+{ code is: WSvns.pas, released December 2000. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwawsvns.pas,v 1.1 2005/04/04 07:56:11 marco Exp $
+
+unit JwaWSvns;
+
+{$WEAKPACKAGEUNIT}
+
+{$HPPEMIT ''}
+{$HPPEMIT '#include "wsvns.h"'}
+{$HPPEMIT ''}
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaWinSock2;
+
+//
+// Windows Sockets include file for VINES IP. This file contains all
+// standardized VINES IP information. Include this header file after winsock.h.
+//
+// To open an VINES IP socket, call socket() with an address family of AF_BAN, a
+// socket type of SOCK_DGRAM, SOCK_STREAM, or SOCK_SEQPACKET, and protocol of 0.
+//
+
+//
+// Socket address, VINES IP style. Address fields and port field are defined
+// as a sequence of bytes. This is done because they are byte ordered
+// BIG ENDIAN, ala most significant byte first.
+//
+
+type
+ SOCKADDR_VNS = record
+ sin_family: u_short; // = AF_BAN
+ net_address: array [0..3] of u_char; // network address
+ subnet_addr: array [0..1] of u_char; // subnet address
+ port: array [0..1] of u_char; // msb=port[0], lsb=port[1]
+ hops: u_char; // # hops for broadcasts
+ filler: array [0..4] of u_char; // filler, zeros
+ end;
+ {$EXTERNALSYM SOCKADDR_VNS}
+ PSOCKADDR_VNS = ^SOCKADDR_VNS;
+ {$EXTERNALSYM PSOCKADDR_VNS}
+ LPSOCKADDR_VNS = ^SOCKADDR_VNS;
+ {$EXTERNALSYM LPSOCKADDR_VNS}
+ TSockAddrVNS = SOCKADDR_VNS;
+ PSockAddrVNS = LPSOCKADDR_VNS;
+
+const
+ VNSPROTO_IPC = 1;
+ {$EXTERNALSYM VNSPROTO_IPC}
+ VNSPROTO_RELIABLE_IPC = 2;
+ {$EXTERNALSYM VNSPROTO_RELIABLE_IPC}
+ VNSPROTO_SPP = 3;
+ {$EXTERNALSYM VNSPROTO_SPP}
+
+implementation
+
+end.
diff --git a/packages/extra/winunits/jwawtsapi32.pas b/packages/extra/winunits/jwawtsapi32.pas
index d316fcccb6..fdaf4f7599 100644
--- a/packages/extra/winunits/jwawtsapi32.pas
+++ b/packages/extra/winunits/jwawtsapi32.pas
@@ -1,1305 +1,1305 @@
-{******************************************************************************}
-{ }
-{ Terminal Services API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: wtsapi32.h, released June 2000. The original Pascal }
-{ code is: WtsApi32.pas, released December 2000. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwawtsapi32.pas,v 1.1 2005/04/04 07:56:11 marco Exp $
-
-unit JwaWtsApi32;
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaWinNT, JwaWinType;
-
-// Windows Terminal Server public APIs
-//
-// Copyright 1995-1999, Citrix Systems Inc.
-// Copyright (c) 1997-1999 Microsoft Corporation
-
-//==============================================================================
-// Defines
-//==============================================================================
-
-//
-// Specifies the current server
-//
-
-const
- WTS_CURRENT_SERVER = HANDLE(0);
- {$EXTERNALSYM WTS_CURRENT_SERVER}
- WTS_CURRENT_SERVER_HANDLE = HANDLE(0);
- {$EXTERNALSYM WTS_CURRENT_SERVER_HANDLE}
- WTS_CURRENT_SERVER_NAME = '';
- {$EXTERNALSYM WTS_CURRENT_SERVER_NAME}
-
-//
-// Specifies the current session (SessionId)
-//
-
- WTS_CURRENT_SESSION = DWORD(-1);
- {$EXTERNALSYM WTS_CURRENT_SESSION}
-
-//
-// Possible pResponse values from WTSSendMessage()
-//
-
- IDTIMEOUT = 32000;
- {$EXTERNALSYM IDTIMEOUT}
- IDASYNC = 32001;
- {$EXTERNALSYM IDASYNC}
-
-//
-// Shutdown flags
-//
-
- WTS_WSD_LOGOFF = $00000001; // log off all users except
- {$EXTERNALSYM WTS_WSD_LOGOFF} // current user; deletes
- // WinStations (a reboot is
- // required to recreate the
- // WinStations)
- WTS_WSD_SHUTDOWN = $00000002; // shutdown system
- {$EXTERNALSYM WTS_WSD_SHUTDOWN}
- WTS_WSD_REBOOT = $00000004; // shutdown and reboot
- {$EXTERNALSYM WTS_WSD_REBOOT}
- WTS_WSD_POWEROFF = $00000008; // shutdown and power off (on
- {$EXTERNALSYM WTS_WSD_POWEROFF}
- // machines that support power
- // off through software)
- WTS_WSD_FASTREBOOT = $00000010; // reboot without logging users
- {$EXTERNALSYM WTS_WSD_FASTREBOOT} // off or shutting down
-
-//==============================================================================
-// WTS_CONNECTSTATE_CLASS - Session connect state
-//==============================================================================
-
-type
- _WTS_CONNECTSTATE_CLASS = (
- WTSActive, // User logged on to WinStation
- WTSConnected, // WinStation connected to client
- WTSConnectQuery, // In the process of connecting to client
- WTSShadow, // Shadowing another WinStation
- WTSDisconnected, // WinStation logged on without client
- WTSIdle, // Waiting for client to connect
- WTSListen, // WinStation is listening for connection
- WTSReset, // WinStation is being reset
- WTSDown, // WinStation is down due to error
- WTSInit); // WinStation in initialization
- {$EXTERNALSYM _WTS_CONNECTSTATE_CLASS}
- WTS_CONNECTSTATE_CLASS = _WTS_CONNECTSTATE_CLASS;
- {$EXTERNALSYM WTS_CONNECTSTATE_CLASS}
- TWtsConnectStateClass = WTS_CONNECTSTATE_CLASS;
-
-//==============================================================================
-// WTS_SERVER_INFO - returned by WTSEnumerateServers (version 1)
-//==============================================================================
-
-//
-// WTSEnumerateServers() returns two variables: pServerInfo and Count.
-// The latter is the number of WTS_SERVER_INFO structures contained in
-// the former. In order to read each server, iterate i from 0 to
-// Count-1 and reference the server name as
-// pServerInfo[i].pServerName; for example:
-//
-// for ( i=0; i < Count; i++ ) {
-// _tprintf( TEXT("%s "), pServerInfo[i].pServerName );
-// }
-//
-// The memory returned looks like the following. P is a pServerInfo
-// pointer, and D is the string data for that pServerInfo:
-//
-// P1 P2 P3 P4 ... Pn D1 D2 D3 D4 ... Dn
-//
-// This makes it easier to iterate the servers, using code similar to
-// the above.
-//
-
-type
- PWTS_SERVER_INFOW = ^WTS_SERVER_INFOW;
- {$EXTERNALSYM PWTS_SERVER_INFOW}
- _WTS_SERVER_INFOW = record
- pServerName: LPWSTR; // server name
- end;
- {$EXTERNALSYM _WTS_SERVER_INFOW}
- WTS_SERVER_INFOW = _WTS_SERVER_INFOW;
- {$EXTERNALSYM WTS_SERVER_INFOW}
- TWtsServerInfoW = WTS_SERVER_INFOW;
- PWtsServerInfoW = PWTS_SERVER_INFOW;
-
- PWTS_SERVER_INFOA = ^WTS_SERVER_INFOA;
- {$EXTERNALSYM PWTS_SERVER_INFOA}
- _WTS_SERVER_INFOA = record
- pServerName: LPSTR; // server name
- end;
- {$EXTERNALSYM _WTS_SERVER_INFOA}
- WTS_SERVER_INFOA = _WTS_SERVER_INFOA;
- {$EXTERNALSYM WTS_SERVER_INFOA}
- TWtsServerInfoA = WTS_SERVER_INFOA;
- PWtsServerInfoA = PWTS_SERVER_INFOA;
-
- {$IFDEF UNICODE}
- WTS_SERVER_INFO = WTS_SERVER_INFOW;
- {$EXTERNALSYM WTS_SERVER_INFO}
- PWTS_SERVER_INFO = PWTS_SERVER_INFOW;
- {$EXTERNALSYM PWTS_SERVER_INFO}
- TWtsServerInfo = TWtsServerInfoW;
- PWtsServerInfo = PWtsServerInfoW;
- {$ELSE}
- WTS_SERVER_INFO = WTS_SERVER_INFOA;
- {$EXTERNALSYM WTS_SERVER_INFO}
- PWTS_SERVER_INFO = PWTS_SERVER_INFOA;
- {$EXTERNALSYM PWTS_SERVER_INFO}
- TWtsServerInfo = TWtsServerInfoA;
- PWtsServerInfo = PWtsServerInfoA;
- {$ENDIF UNICODE}
-
-//==============================================================================
-// WTS_SESSION_INFO - returned by WTSEnumerateSessions (version 1)
-//==============================================================================
-
-//
-// WTSEnumerateSessions() returns data in a similar format to the above
-// WTSEnumerateServers(). It returns two variables: pSessionInfo and
-// Count. The latter is the number of WTS_SESSION_INFO structures
-// contained in the former. Iteration is similar, except that there
-// are three parts to each entry, so it would look like this:
-//
-// for ( i=0; i < Count; i++ ) {
-// _tprintf( TEXT("%-5u %-20s %u\n"),
-// pSessionInfo[i].SessionId,
-// pSessionInfo[i].pWinStationName,
-// pSessionInfo[i].State );
-// }
-//
-// The memory returned is also segmented as the above, with all the
-// structures allocated at the start and the string data at the end.
-// We'll use S for the SessionId, P for the pWinStationName pointer
-// and D for the string data, and C for the connect State:
-//
-// S1 P1 C1 S2 P2 C2 S3 P3 C3 S4 P4 C4 ... Sn Pn Cn D1 D2 D3 D4 ... Dn
-//
-// As above, this makes it easier to iterate the sessions.
-//
-
-type
- PWTS_SESSION_INFOW = ^WTS_SESSION_INFOW;
- {$EXTERNALSYM PWTS_SESSION_INFOW}
- _WTS_SESSION_INFOW = record
- SessionId: DWORD; // session id
- pWinStationName: LPWSTR; // name of WinStation this session is connected to
- State: WTS_CONNECTSTATE_CLASS; // connection state (see enum)
- end;
- {$EXTERNALSYM _WTS_SESSION_INFOW}
- WTS_SESSION_INFOW = _WTS_SESSION_INFOW;
- {$EXTERNALSYM WTS_SESSION_INFOW}
- TWtsSessionInfoW = WTS_SESSION_INFOW;
- PWtsSessionInfoW = PWTS_SESSION_INFOW;
-
- PWTS_SESSION_INFOA = ^WTS_SESSION_INFOA;
- {$EXTERNALSYM PWTS_SESSION_INFOA}
- _WTS_SESSION_INFOA = record
- SessionId: DWORD; // session id
- pWinStationName: LPSTR; // name of WinStation this session is connected to
- State: WTS_CONNECTSTATE_CLASS; // connection state (see enum)
- end;
- {$EXTERNALSYM _WTS_SESSION_INFOA}
- WTS_SESSION_INFOA = _WTS_SESSION_INFOA;
- {$EXTERNALSYM WTS_SESSION_INFOA}
- TWtsSessionInfoA = WTS_SESSION_INFOA;
- PWtsSessionInfoA = PWTS_SESSION_INFOA;
-
- {$IFDEF UNICODE}
- WTS_SESSION_INFO = WTS_SESSION_INFOW;
- PWTS_SESSION_INFO = PWTS_SESSION_INFOW;
- TWtsSessionInfo = TWtsSessionInfoW;
- PWtsSessionInfo = PWtsSessionInfoW;
- {$ELSE}
- WTS_SESSION_INFO = WTS_SESSION_INFOA;
- PWTS_SESSION_INFO = PWTS_SESSION_INFOA;
- TWtsSessionInfo = TWtsSessionInfoA;
- PWtsSessionInfo = PWtsSessionInfoA;
- {$ENDIF UNICODE}
-
-//==============================================================================
-// WTS_PROCESS_INFO - returned by WTSEnumerateProcesses (version 1)
-//==============================================================================
-
-//
-// WTSEnumerateProcesses() also returns data similar to
-// WTSEnumerateServers(). It returns two variables: pProcessInfo and
-// Count. The latter is the number of WTS_PROCESS_INFO structures
-// contained in the former. Iteration is similar, except that there
-// are four parts to each entry, so it would look like this:
-//
-// for ( i=0; i < Count; i++ ) {
-// GetUserNameFromSid( pProcessInfo[i].pUserSid, UserName,
-// sizeof(UserName) );
-// _tprintf( TEXT("%-5u %-20s %-5u %s\n"),
-// pProcessInfo[i].SessionId,
-// UserName,
-// pProcessInfo[i].ProcessId,
-// pProcessInfo[i].pProcessName );
-// }
-//
-// The memory returned is also segmented as the above, with all the
-// structures allocated at the start and the string data at the end.
-// We'll use S for the SessionId, R for the ProcessId, P for the
-// pProcessName pointer and D for the string data, and U for pUserSid:
-//
-// S1 R1 P1 U1 S2 R2 P2 U2 S3 R3 P3 U3 ... Sn Rn Pn Un D1 D2 D3 ... Dn
-//
-// As above, this makes it easier to iterate the processes.
-//
-
-type
- PWTS_PROCESS_INFOW = ^WTS_PROCESS_INFOW;
- {$EXTERNALSYM PWTS_PROCESS_INFOW}
- _WTS_PROCESS_INFOW = record
- SessionId: DWORD; // session id
- ProcessId: DWORD; // process id
- pProcessName: LPWSTR; // name of process
- pUserSid: PSID; // user's SID
- end;
- {$EXTERNALSYM _WTS_PROCESS_INFOW}
- WTS_PROCESS_INFOW = _WTS_PROCESS_INFOW;
- {$EXTERNALSYM WTS_PROCESS_INFOW}
- TWtsProcessInfoW = WTS_PROCESS_INFOW;
- PWtsProcessInfoW = PWTS_PROCESS_INFOW;
-
- PWTS_PROCESS_INFOA = ^WTS_PROCESS_INFOA;
- {$EXTERNALSYM PWTS_PROCESS_INFOA}
- _WTS_PROCESS_INFOA = record
- SessionId: DWORD; // session id
- ProcessId: DWORD; // process id
- pProcessName: LPSTR; // name of process
- pUserSid: PSID; // user's SID
- end;
- {$EXTERNALSYM _WTS_PROCESS_INFOA}
- WTS_PROCESS_INFOA = _WTS_PROCESS_INFOA;
- {$EXTERNALSYM WTS_PROCESS_INFOA}
- TWtsProcessInfoA = WTS_PROCESS_INFOA;
- PWtsProcessInfoA = PWTS_PROCESS_INFOA;
-
- {$IFDEF UNICODE}
- WTS_PROCESS_INFO = WTS_PROCESS_INFOW;
- {$EXTERNALSYM WTS_PROCESS_INFO}
- PWTS_PROCESS_INFO = PWTS_PROCESS_INFOW;
- {$EXTERNALSYM PWTS_PROCESS_INFO}
- TWtsProcessInfo = TWtsProcessInfoW;
- PWtsProcessInfo = PWtsProcessInfoW;
- {$ELSE}
- WTS_PROCESS_INFO = WTS_PROCESS_INFOA;
- {$EXTERNALSYM WTS_PROCESS_INFO}
- PWTS_PROCESS_INFO = PWTS_PROCESS_INFOA;
- {$EXTERNALSYM PWTS_PROCESS_INFO}
- TWtsProcessInfo = TWtsProcessInfoA;
- PWtsProcessInfo = PWtsProcessInfoA;
- {$ENDIF UNICODE}
-
-//==============================================================================
-// WTS_INFO_CLASS - WTSQuerySessionInformation
-// (See additional typedefs for more info on structures)
-//==============================================================================
-
-const
- WTS_PROTOCOL_TYPE_CONSOLE = 0; // Console
- {$EXTERNALSYM WTS_PROTOCOL_TYPE_CONSOLE}
- WTS_PROTOCOL_TYPE_ICA = 1; // ICA Protocol
- {$EXTERNALSYM WTS_PROTOCOL_TYPE_ICA}
- WTS_PROTOCOL_TYPE_RDP = 2; // RDP Protocol
- {$EXTERNALSYM WTS_PROTOCOL_TYPE_RDP}
-
-type
- _WTS_INFO_CLASS = (
- WTSInitialProgram,
- WTSApplicationName,
- WTSWorkingDirectory,
- WTSOEMId,
- WTSSessionId,
- WTSUserName,
- WTSWinStationName,
- WTSDomainName,
- WTSConnectState,
- WTSClientBuildNumber,
- WTSClientName,
- WTSClientDirectory,
- WTSClientProductId,
- WTSClientHardwareId,
- WTSClientAddress,
- WTSClientDisplay,
- WTSClientProtocolType);
- {$EXTERNALSYM _WTS_INFO_CLASS}
- WTS_INFO_CLASS = _WTS_INFO_CLASS;
- TWtsInfoClass = WTS_INFO_CLASS;
-
-//==============================================================================
-// WTSQuerySessionInformation - (WTSClientAddress)
-//==============================================================================
-
-type
- PWTS_CLIENT_ADDRESS = ^WTS_CLIENT_ADDRESS;
- {$EXTERNALSYM PWTS_CLIENT_ADDRESS}
- _WTS_CLIENT_ADDRESS = record
- AddressFamily: DWORD; // AF_INET, AF_IPX, AF_NETBIOS, AF_UNSPEC
- Address: array [0..19] of BYTE; // client network address
- end;
- {$EXTERNALSYM _WTS_CLIENT_ADDRESS}
- WTS_CLIENT_ADDRESS = _WTS_CLIENT_ADDRESS;
- {$EXTERNALSYM WTS_CLIENT_ADDRESS}
- TWtsClientAddress = WTS_CLIENT_ADDRESS;
- PWtsClientAddress = PWTS_CLIENT_ADDRESS;
-
-//==============================================================================
-// WTSQuerySessionInformation - (WTSClientDisplay)
-//==============================================================================
-
-type
- PWTS_CLIENT_DISPLAY = ^WTS_CLIENT_DISPLAY;
- {$EXTERNALSYM PWTS_CLIENT_DISPLAY}
- _WTS_CLIENT_DISPLAY = record
- HorizontalResolution: DWORD; // horizontal dimensions, in pixels
- VerticalResolution: DWORD; // vertical dimensions, in pixels
- ColorDepth: DWORD; // 1=16, 2=256, 4=64K, 8=16M
- end;
- {$EXTERNALSYM _WTS_CLIENT_DISPLAY}
- WTS_CLIENT_DISPLAY = _WTS_CLIENT_DISPLAY;
- {$EXTERNALSYM WTS_CLIENT_DISPLAY}
- TWtsClientDisplay = WTS_CLIENT_DISPLAY;
- PWtsClientDisplay = PWTS_CLIENT_DISPLAY;
-
-//==============================================================================
-// WTS_CONFIG_CLASS - WTSQueryUserConfig/WTSSetUserConfig
-//==============================================================================
-
-type
- _WTS_CONFIG_CLASS = (
- //Initial program settings
- WTSUserConfigInitialProgram, // string returned/expected
- WTSUserConfigWorkingDirectory, // string returned/expected
- WTSUserConfigfInheritInitialProgram, // DWORD returned/expected
- //
- WTSUserConfigfAllowLogonTerminalServer, //DWORD returned/expected
- //Timeout settings
- WTSUserConfigTimeoutSettingsConnections, //DWORD returned/expected
- WTSUserConfigTimeoutSettingsDisconnections, //DWORD returned/expected
- WTSUserConfigTimeoutSettingsIdle, //DWORD returned/expected
- //Client device settings
- WTSUserConfigfDeviceClientDrives, //DWORD returned/expected
- WTSUserConfigfDeviceClientPrinters, //DWORD returned/expected
- WTSUserConfigfDeviceClientDefaultPrinter, //DWORD returned/expected
- //Connection settings
- WTSUserConfigBrokenTimeoutSettings, //DWORD returned/expected
- WTSUserConfigReconnectSettings, //DWORD returned/expected
- //Modem settings
- WTSUserConfigModemCallbackSettings, //DWORD returned/expected
- WTSUserConfigModemCallbackPhoneNumber, // string returned/expected
- //Shadow settings
- WTSUserConfigShadowingSettings, //DWORD returned/expected
- //User Profile settings
- WTSUserConfigTerminalServerProfilePath, // string returned/expected
- //Terminal Server home directory
- WTSUserConfigTerminalServerHomeDir, // string returned/expected
- WTSUserConfigTerminalServerHomeDirDrive, // string returned/expected
- WTSUserConfigfTerminalServerRemoteHomeDir); // DWORD 0:LOCAL 1:REMOTE
- {$EXTERNALSYM _WTS_CONFIG_CLASS}
- WTS_CONFIG_CLASS = _WTS_CONFIG_CLASS;
- TWtsConfigClass = WTS_CONFIG_CLASS;
-
-{$IFDEF FALSE}
-
-// There we're remove in June 2001 PSDK (pre-release)
-
- PWTS_USER_CONFIG_SET_NWSERVERW = ^WTS_USER_CONFIG_SET_NWSERVERW;
- {$EXTERNALSYM PWTS_USER_CONFIG_SET_NWSERVERW}
- _WTS_USER_CONFIG_SET_NWSERVERW = record
- pNWServerName: LPWSTR;
- pNWDomainAdminName: LPWSTR;
- pNWDomainAdminPassword: LPWSTR;
- end;
- {$EXTERNALSYM _WTS_USER_CONFIG_SET_NWSERVERW}
- WTS_USER_CONFIG_SET_NWSERVERW = _WTS_USER_CONFIG_SET_NWSERVERW;
- {$EXTERNALSYM WTS_USER_CONFIG_SET_NWSERVERW}
- TWtsUserConfigSetNwserverW = WTS_USER_CONFIG_SET_NWSERVERW;
- PWtsUserConfigSetNwserverW = PWTS_USER_CONFIG_SET_NWSERVERW;
-
- PWTS_USER_CONFIG_SET_NWSERVERA = ^WTS_USER_CONFIG_SET_NWSERVERA;
- {$EXTERNALSYM PWTS_USER_CONFIG_SET_NWSERVERA}
- _WTS_USER_CONFIG_SET_NWSERVERA = record
- pNWServerName: LPSTR;
- pNWDomainAdminName: LPSTR;
- pNWDomainAdminPassword: LPSTR;
- end;
- {$EXTERNALSYM _WTS_USER_CONFIG_SET_NWSERVERA}
- WTS_USER_CONFIG_SET_NWSERVERA = _WTS_USER_CONFIG_SET_NWSERVERA;
- {$EXTERNALSYM WTS_USER_CONFIG_SET_NWSERVERA}
- TWtsUserConfigSetNwserverA = WTS_USER_CONFIG_SET_NWSERVERA;
- PWtsUserConfigSetNwserverA = PWTS_USER_CONFIG_SET_NWSERVERA;
-
- {$IFDEF UNICODE}
- WTS_USER_CONFIG_SET_NWSERVER = WTS_USER_CONFIG_SET_NWSERVERW;
- {$EXTERNALSYM WTS_USER_CONFIG_SET_NWSERVER}
- PWTS_USER_CONFIG_SET_NWSERVER = PWTS_USER_CONFIG_SET_NWSERVERW;
- {$EXTERNALSYM PWTS_USER_CONFIG_SET_NWSERVER}
- TWtsUserConfigSetNwserver = TWtsUserConfigSetNwserverW;
- PWtsUserConfigSetNwserver = PWtsUserConfigSetNwserverW;
- {$ELSE}
- WTS_USER_CONFIG_SET_NWSERVER = WTS_USER_CONFIG_SET_NWSERVERA;
- {$EXTERNALSYM WTS_USER_CONFIG_SET_NWSERVER}
- PWTS_USER_CONFIG_SET_NWSERVER = PWTS_USER_CONFIG_SET_NWSERVERA;
- {$EXTERNALSYM PWTS_USER_CONFIG_SET_NWSERVER}
- TWtsUserConfigSetNwserver = TWtsUserConfigSetNwserverA;
- PWtsUserConfigSetNwserver = PWtsUserConfigSetNwserverA;
- {$ENDIF UNICODE}
-
-{$ENDIF FALSE}
-
-//==============================================================================
-// WTS_EVENT - Event flags for WTSWaitSystemEvent
-//==============================================================================
-
-const
- WTS_EVENT_NONE = $00000000; // return no event
- {$EXTERNALSYM WTS_EVENT_NONE}
- WTS_EVENT_CREATE = $00000001; // new WinStation created
- {$EXTERNALSYM WTS_EVENT_CREATE}
- WTS_EVENT_DELETE = $00000002; // existing WinStation deleted
- {$EXTERNALSYM WTS_EVENT_DELETE}
- WTS_EVENT_RENAME = $00000004; // existing WinStation renamed
- {$EXTERNALSYM WTS_EVENT_RENAME}
- WTS_EVENT_CONNECT = $00000008; // WinStation connect to client
- {$EXTERNALSYM WTS_EVENT_CONNECT}
- WTS_EVENT_DISCONNECT = $00000010; // WinStation logged on without client
- {$EXTERNALSYM WTS_EVENT_DISCONNECT}
- WTS_EVENT_LOGON = $00000020; // user logged on to existing WinStation
- {$EXTERNALSYM WTS_EVENT_LOGON}
- WTS_EVENT_LOGOFF = $00000040; // user logged off from existing WinStation
- {$EXTERNALSYM WTS_EVENT_LOGOFF}
- WTS_EVENT_STATECHANGE = $00000080; // WinStation state change
- {$EXTERNALSYM WTS_EVENT_STATECHANGE}
- WTS_EVENT_LICENSE = $00000100; // license state change
- {$EXTERNALSYM WTS_EVENT_LICENSE}
- WTS_EVENT_ALL = $7fffffff; // wait for all event types
- {$EXTERNALSYM WTS_EVENT_ALL}
- WTS_EVENT_FLUSH = DWORD($80000000); // unblock all waiters
- {$EXTERNALSYM WTS_EVENT_FLUSH}
-
-//==============================================================================
-// WTS_VIRTUAL_CLASS - WTSVirtualChannelQuery
-//==============================================================================
-
-type
- _WTS_VIRTUAL_CLASS = (WTSVirtualClientData, WTSVirtualFileHandle);
- {$EXTERNALSYM _WTS_VIRTUAL_CLASS}
- WTS_VIRTUAL_CLASS = _WTS_VIRTUAL_CLASS;
- {$EXTERNALSYM WTS_VIRTUAL_CLASS}
- TWtsVirtualClass = WTS_VIRTUAL_CLASS;
-
-//==============================================================================
-// Windows Terminal Server public APIs
-//==============================================================================
-
-function WTSEnumerateServersA(pDomainName: LPSTR; Reserved, Version: DWORD;
- var ppServerInfo: PWTS_SERVER_INFOA; var pCount: DWORD): BOOL; stdcall;
-{$EXTERNALSYM WTSEnumerateServersA}
-function WTSEnumerateServersW(pDomainName: LPWSTR; Reserved, Version: DWORD;
- var ppServerInfo: PWTS_SERVER_INFOW; var pCount: DWORD): BOOL; stdcall;
-{$EXTERNALSYM WTSEnumerateServersW}
-function WTSEnumerateServers(pDomainName: LPTSTR; Reserved, Version: DWORD;
- var ppServerInfo: PWTS_SERVER_INFO; var pCount: DWORD): BOOL; stdcall;
-{$EXTERNALSYM WTSEnumerateServers}
-
-//------------------------------------------------------------------------------
-
-function WTSOpenServerA(pServerName: LPSTR): HANDLE; stdcall;
-{$EXTERNALSYM WTSOpenServerA}
-function WTSOpenServerW(pServerName: LPWSTR): HANDLE; stdcall;
-{$EXTERNALSYM WTSOpenServerW}
-function WTSOpenServer(pServerName: LPTSTR): HANDLE; stdcall;
-{$EXTERNALSYM WTSOpenServer}
-
-//------------------------------------------------------------------------------
-
-procedure WTSCloseServer(hServer: HANDLE); stdcall;
-{$EXTERNALSYM WTSCloseServer}
-
-//------------------------------------------------------------------------------
-
-function WTSEnumerateSessionsA(hServer: HANDLE; Reserved: DWORD; Version: DWORD;
- var ppSessionInfo: PWTS_SESSION_INFOA; var pCount: DWORD): BOOL; stdcall;
-{$EXTERNALSYM WTSEnumerateSessionsA}
-function WTSEnumerateSessionsW(hServer: HANDLE; Reserved: DWORD; Version: DWORD;
- var ppSessionInfo: PWTS_SESSION_INFOW; var pCount: DWORD): BOOL; stdcall;
-{$EXTERNALSYM WTSEnumerateSessionsW}
-function WTSEnumerateSessions(hServer: HANDLE; Reserved: DWORD; Version: DWORD;
- var ppSessionInfo: PWTS_SESSION_INFO; var pCount: DWORD): BOOL; stdcall;
-{$EXTERNALSYM WTSEnumerateSessions}
-
-//------------------------------------------------------------------------------
-
-function WTSEnumerateProcessesA(hServer: HANDLE; Reserved: DWORD; Version: DWORD;
- var ppProcessInfo: PWTS_PROCESS_INFOA; var pCount: DWORD): BOOL; stdcall;
-{$EXTERNALSYM WTSEnumerateProcessesA}
-function WTSEnumerateProcessesW(hServer: HANDLE; Reserved: DWORD; Version: DWORD;
- var ppProcessInfo: PWTS_PROCESS_INFOW; var pCount: DWORD): BOOL; stdcall;
-{$EXTERNALSYM WTSEnumerateProcessesW}
-function WTSEnumerateProcesses(hServer: HANDLE; Reserved: DWORD; Version: DWORD;
- var ppProcessInfo: PWTS_PROCESS_INFO; var pCount: DWORD): BOOL; stdcall;
-{$EXTERNALSYM WTSEnumerateProcesses}
-
-//------------------------------------------------------------------------------
-
-function WTSTerminateProcess(hServer: HANDLE; ProcessId, ExitCode: DWORD): BOOL; stdcall;
-{$EXTERNALSYM WTSTerminateProcess}
-
-//------------------------------------------------------------------------------
-
-function WTSQuerySessionInformationA(hServer: HANDLE; SessionId: DWORD;
- WTSInfoClass: WTS_INFO_CLASS; var ppBuffer: Pointer; var pBytesReturned: DWORD): BOOL; stdcall;
-{$EXTERNALSYM WTSQuerySessionInformationA}
-function WTSQuerySessionInformationW(hServer: HANDLE; SessionId: DWORD;
- WTSInfoClass: WTS_INFO_CLASS; var ppBuffer: Pointer; var pBytesReturned: DWORD): BOOL; stdcall;
-{$EXTERNALSYM WTSQuerySessionInformationW}
-function WTSQuerySessionInformation(hServer: HANDLE; SessionId: DWORD;
- WTSInfoClass: WTS_INFO_CLASS; var ppBuffer: Pointer; var pBytesReturned: DWORD): BOOL; stdcall;
-{$EXTERNALSYM WTSQuerySessionInformation}
-
-//------------------------------------------------------------------------------
-
-function WTSQueryUserConfigA(pServerName, pUserName: LPSTR; WTSConfigClass: WTS_CONFIG_CLASS;
- var ppBuffer: Pointer; var pBytesReturned: DWORD): BOOL; stdcall;
-{$EXTERNALSYM WTSQueryUserConfigA}
-function WTSQueryUserConfigW(pServerName, pUserName: LPWSTR; WTSConfigClass: WTS_CONFIG_CLASS;
- var ppBuffer: Pointer; var pBytesReturned: DWORD): BOOL; stdcall;
-{$EXTERNALSYM WTSQueryUserConfigW}
-function WTSQueryUserConfig(pServerName, pUserName: LPTSTR; WTSConfigClass: WTS_CONFIG_CLASS;
- var ppBuffer: Pointer; var pBytesReturned: DWORD): BOOL; stdcall;
-{$EXTERNALSYM WTSQueryUserConfig}
-
-//------------------------------------------------------------------------------
-
-function WTSSetUserConfigA(pServerName, pUserName: LPSTR; WTSConfigClass: WTS_CONFIG_CLASS;
- pBuffer: LPSTR; DataLength: DWORD): BOOL; stdcall;
-{$EXTERNALSYM WTSSetUserConfigA}
-function WTSSetUserConfigW(pServerName, pUserName: LPWSTR; WTSConfigClass: WTS_CONFIG_CLASS;
- pBuffer: LPWSTR; DataLength: DWORD): BOOL; stdcall;
-{$EXTERNALSYM WTSSetUserConfigW}
-function WTSSetUserConfig(pServerName, pUserName: LPTSTR; WTSConfigClass: WTS_CONFIG_CLASS;
- pBuffer: LPTSTR; DataLength: DWORD): BOOL; stdcall;
-{$EXTERNALSYM WTSSetUserConfig}
-
-//------------------------------------------------------------------------------
-
-function WTSSendMessageA(hServer: HANDLE; SessionId: DWORD; pTitle: LPSTR;
- TitleLength: DWORD; pMessage: LPSTR; MessageLength: DWORD; Style: DWORD;
- Timeout: DWORD; var pResponse: DWORD; bWait: BOOL): BOOL; stdcall;
-{$EXTERNALSYM WTSSendMessageA}
-function WTSSendMessageW(hServer: HANDLE; SessionId: DWORD; pTitle: LPWSTR;
- TitleLength: DWORD; pMessage: LPWSTR; MessageLength: DWORD; Style: DWORD;
- Timeout: DWORD; var pResponse: DWORD; bWait: BOOL): BOOL; stdcall;
-{$EXTERNALSYM WTSSendMessageW}
-function WTSSendMessage(hServer: HANDLE; SessionId: DWORD; pTitle: LPTSTR;
- TitleLength: DWORD; pMessage: LPTSTR; MessageLength: DWORD; Style: DWORD;
- Timeout: DWORD; var pResponse: DWORD; bWait: BOOL): BOOL; stdcall;
-{$EXTERNALSYM WTSSendMessage}
-
-//------------------------------------------------------------------------------
-
-function WTSDisconnectSession(hServer: HANDLE; SessionId: DWORD; bWait: BOOL): BOOL; stdcall;
-{$EXTERNALSYM WTSDisconnectSession}
-
-//------------------------------------------------------------------------------
-
-function WTSLogoffSession(hServer: HANDLE; SessionId: DWORD; bWait: BOOL): BOOL; stdcall;
-{$EXTERNALSYM WTSLogoffSession}
-
-//------------------------------------------------------------------------------
-
-function WTSShutdownSystem(hServer: HANDLE; ShutdownFlag: DWORD): BOOL; stdcall;
-{$EXTERNALSYM WTSShutdownSystem}
-
-//------------------------------------------------------------------------------
-
-function WTSWaitSystemEvent(hServer: HANDLE; EventMask: DWORD;
- var pEventFlags: DWORD): BOOL; stdcall;
-{$EXTERNALSYM WTSWaitSystemEvent}
-
-//------------------------------------------------------------------------------
-
-function WTSVirtualChannelOpen(hServer: HANDLE; SessionId: DWORD;
- pVirtualName: LPSTR): HANDLE; stdcall;
-{$EXTERNALSYM WTSVirtualChannelOpen}
-
-function WTSVirtualChannelClose(hChannelHandle: HANDLE): BOOL; stdcall;
-{$EXTERNALSYM WTSVirtualChannelClose}
-
-function WTSVirtualChannelRead(hChannelHandle: HANDLE; TimeOut: ULONG;
- Buffer: PCHAR; BufferSize: ULONG; var pBytesRead: ULONG): BOOL; stdcall;
-{$EXTERNALSYM WTSVirtualChannelRead}
-
-function WTSVirtualChannelWrite(hChannelHandle: HANDLE; Buffer: PCHAR;
- Length: ULONG; var pBytesWritten: ULONG): BOOL; stdcall;
-{$EXTERNALSYM WTSVirtualChannelWrite}
-
-function WTSVirtualChannelPurgeInput(hChannelHandle: HANDLE): BOOL; stdcall;
-{$EXTERNALSYM WTSVirtualChannelPurgeInput}
-
-function WTSVirtualChannelPurgeOutput(hChannelHandle: HANDLE): BOOL; stdcall;
-{$EXTERNALSYM WTSVirtualChannelPurgeOutput}
-
-function WTSVirtualChannelQuery(hChannelHandle: HANDLE; VirtualClass: WTS_VIRTUAL_CLASS;
- ppBuffer: PVOID; var pBytesReturned: DWORD): BOOL; stdcall;
-{$EXTERNALSYM WTSVirtualChannelQuery}
-
-//------------------------------------------------------------------------------
-
-procedure WTSFreeMemory(pMemory: PVOID); stdcall;
-{$EXTERNALSYM WTSFreeMemory}
-
-// Flags for Console Notification
-
-const
- NOTIFY_FOR_ALL_SESSIONS = 1;
- {$EXTERNALSYM NOTIFY_FOR_ALL_SESSIONS}
- NOTIFY_FOR_THIS_SESSION = 0;
- {$EXTERNALSYM NOTIFY_FOR_THIS_SESSION}
-
-function WTSRegisterSessionNotification(hWnd: HWND; dwFlags: DWORD): BOOL; stdcall;
-{$EXTERNALSYM WTSRegisterSessionNotification}
-
-function WTSUnRegisterSessionNotification(hWnd: HWND): BOOL; stdcall;
-{$EXTERNALSYM WTSUnRegisterSessionNotification}
-
-function WTSQueryUserToken(SessionId: ULONG; var phToken: HANDLE): BOOL; stdcall;
-{$EXTERNALSYM WTSQueryUserToken}
-
-implementation
-
-const
- wtsapi = 'wtsapi32.dll';
- {$IFDEF UNICODE}
- AWSuffix = 'W';
- {$ELSE}
- AWSuffix = 'A';
- {$ENDIF UNICODE}
-
-{$IFDEF DYNAMIC_LINK}
-
-var
- _WTSEnumerateServersA: Pointer;
-
-function WTSEnumerateServersA;
-begin
- GetProcedureAddress(_WTSEnumerateServersA, wtsapi, 'WTSEnumerateServersA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WTSEnumerateServersA]
- end;
-end;
-
-var
- _WTSEnumerateServersW: Pointer;
-
-function WTSEnumerateServersW;
-begin
- GetProcedureAddress(_WTSEnumerateServersW, wtsapi, 'WTSEnumerateServersW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WTSEnumerateServersW]
- end;
-end;
-
-var
- _WTSEnumerateServers: Pointer;
-
-function WTSEnumerateServers;
-begin
- GetProcedureAddress(_WTSEnumerateServers, wtsapi, 'WTSEnumerateServers' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WTSEnumerateServers]
- end;
-end;
-
-var
- _WTSOpenServerA: Pointer;
-
-function WTSOpenServerA;
-begin
- GetProcedureAddress(_WTSOpenServerA, wtsapi, 'WTSOpenServerA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WTSOpenServerA]
- end;
-end;
-
-var
- _WTSOpenServerW: Pointer;
-
-function WTSOpenServerW;
-begin
- GetProcedureAddress(_WTSOpenServerW, wtsapi, 'WTSOpenServerW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WTSOpenServerW]
- end;
-end;
-
-var
- _WTSOpenServer: Pointer;
-
-function WTSOpenServer;
-begin
- GetProcedureAddress(_WTSOpenServer, wtsapi, 'WTSOpenServer' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WTSOpenServer]
- end;
-end;
-
-var
- _WTSCloseServer: Pointer;
-
-procedure WTSCloseServer;
-begin
- GetProcedureAddress(_WTSCloseServer, wtsapi, 'WTSCloseServer');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WTSCloseServer]
- end;
-end;
-
-var
- _WTSEnumerateSessionsA: Pointer;
-
-function WTSEnumerateSessionsA;
-begin
- GetProcedureAddress(_WTSEnumerateSessionsA, wtsapi, 'WTSEnumerateSessionsA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WTSEnumerateSessionsA]
- end;
-end;
-
-var
- _WTSEnumerateSessionsW: Pointer;
-
-function WTSEnumerateSessionsW;
-begin
- GetProcedureAddress(_WTSEnumerateSessionsW, wtsapi, 'WTSEnumerateSessionsW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WTSEnumerateSessionsW]
- end;
-end;
-
-var
- _WTSEnumerateSessions: Pointer;
-
-function WTSEnumerateSessions;
-begin
- GetProcedureAddress(_WTSEnumerateSessions, wtsapi, 'WTSEnumerateSessions' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WTSEnumerateSessions]
- end;
-end;
-
-var
- _WTSEnumerateProcessesA: Pointer;
-
-function WTSEnumerateProcessesA;
-begin
- GetProcedureAddress(_WTSEnumerateProcessesA, wtsapi, 'WTSEnumerateProcessesA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WTSEnumerateProcessesA]
- end;
-end;
-
-var
- _WTSEnumerateProcessesW: Pointer;
-
-function WTSEnumerateProcessesW;
-begin
- GetProcedureAddress(_WTSEnumerateProcessesW, wtsapi, 'WTSEnumerateProcessesW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WTSEnumerateProcessesW]
- end;
-end;
-
-var
- _WTSEnumerateProcesses: Pointer;
-
-function WTSEnumerateProcesses;
-begin
- GetProcedureAddress(_WTSEnumerateProcesses, wtsapi, 'WTSEnumerateProcesses' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WTSEnumerateProcesses]
- end;
-end;
-
-var
- _WTSTerminateProcess: Pointer;
-
-function WTSTerminateProcess;
-begin
- GetProcedureAddress(_WTSTerminateProcess, wtsapi, 'WTSTerminateProcess');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WTSTerminateProcess]
- end;
-end;
-
-var
- _WTSQuerySessionInformationA: Pointer;
-
-function WTSQuerySessionInformationA;
-begin
- GetProcedureAddress(_WTSQuerySessionInformationA, wtsapi, 'WTSQuerySessionInformationA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WTSQuerySessionInformationA]
- end;
-end;
-
-var
- _WTSQuerySessionInformationW: Pointer;
-
-function WTSQuerySessionInformationW;
-begin
- GetProcedureAddress(_WTSQuerySessionInformationW, wtsapi, 'WTSQuerySessionInformationW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WTSQuerySessionInformationW]
- end;
-end;
-
-var
- _WTSQuerySessionInformation: Pointer;
-
-function WTSQuerySessionInformation;
-begin
- GetProcedureAddress(_WTSQuerySessionInformation, wtsapi, 'WTSQuerySessionInformation' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WTSQuerySessionInformation]
- end;
-end;
-
-var
- _WTSQueryUserConfigA: Pointer;
-
-function WTSQueryUserConfigA;
-begin
- GetProcedureAddress(_WTSQueryUserConfigA, wtsapi, 'WTSQueryUserConfigA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WTSQueryUserConfigA]
- end;
-end;
-
-var
- _WTSQueryUserConfigW: Pointer;
-
-function WTSQueryUserConfigW;
-begin
- GetProcedureAddress(_WTSQueryUserConfigW, wtsapi, 'WTSQueryUserConfigW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WTSQueryUserConfigW]
- end;
-end;
-
-var
- _WTSQueryUserConfig: Pointer;
-
-function WTSQueryUserConfig;
-begin
- GetProcedureAddress(_WTSQueryUserConfig, wtsapi, 'WTSQueryUserConfig' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WTSQueryUserConfig]
- end;
-end;
-
-var
- _WTSSetUserConfigA: Pointer;
-
-function WTSSetUserConfigA;
-begin
- GetProcedureAddress(_WTSSetUserConfigA, wtsapi, 'WTSSetUserConfigA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WTSSetUserConfigA]
- end;
-end;
-
-var
- _WTSSetUserConfigW: Pointer;
-
-function WTSSetUserConfigW;
-begin
- GetProcedureAddress(_WTSSetUserConfigW, wtsapi, 'WTSSetUserConfigW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WTSSetUserConfigW]
- end;
-end;
-
-var
- _WTSSetUserConfig: Pointer;
-
-function WTSSetUserConfig;
-begin
- GetProcedureAddress(_WTSSetUserConfig, wtsapi, 'WTSSetUserConfig' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WTSSetUserConfig]
- end;
-end;
-
-var
- _WTSSendMessageA: Pointer;
-
-function WTSSendMessageA;
-begin
- GetProcedureAddress(_WTSSendMessageA, wtsapi, 'WTSSendMessageA');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WTSSendMessageA]
- end;
-end;
-
-var
- _WTSSendMessageW: Pointer;
-
-function WTSSendMessageW;
-begin
- GetProcedureAddress(_WTSSendMessageW, wtsapi, 'WTSSendMessageW');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WTSSendMessageW]
- end;
-end;
-
-var
- _WTSSendMessage: Pointer;
-
-function WTSSendMessage;
-begin
- GetProcedureAddress(_WTSSendMessage, wtsapi, 'WTSSendMessage' + AWSuffix);
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WTSSendMessage]
- end;
-end;
-
-var
- _WTSDisconnectSession: Pointer;
-
-function WTSDisconnectSession;
-begin
- GetProcedureAddress(_WTSDisconnectSession, wtsapi, 'WTSDisconnectSession');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WTSDisconnectSession]
- end;
-end;
-
-var
- _WTSLogoffSession: Pointer;
-
-function WTSLogoffSession;
-begin
- GetProcedureAddress(_WTSLogoffSession, wtsapi, 'WTSLogoffSession');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WTSLogoffSession]
- end;
-end;
-
-var
- _WTSShutdownSystem: Pointer;
-
-function WTSShutdownSystem;
-begin
- GetProcedureAddress(_WTSShutdownSystem, wtsapi, 'WTSShutdownSystem');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WTSShutdownSystem]
- end;
-end;
-
-var
- _WTSWaitSystemEvent: Pointer;
-
-function WTSWaitSystemEvent;
-begin
- GetProcedureAddress(_WTSWaitSystemEvent, wtsapi, 'WTSWaitSystemEvent');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WTSWaitSystemEvent]
- end;
-end;
-
-var
- _WTSVirtualChannelOpen: Pointer;
-
-function WTSVirtualChannelOpen;
-begin
- GetProcedureAddress(_WTSVirtualChannelOpen, wtsapi, 'WTSVirtualChannelOpen');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WTSVirtualChannelOpen]
- end;
-end;
-
-var
- _WTSVirtualChannelClose: Pointer;
-
-function WTSVirtualChannelClose;
-begin
- GetProcedureAddress(_WTSVirtualChannelClose, wtsapi, 'WTSVirtualChannelClose');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WTSVirtualChannelClose]
- end;
-end;
-
-var
- _WTSVirtualChannelRead: Pointer;
-
-function WTSVirtualChannelRead;
-begin
- GetProcedureAddress(_WTSVirtualChannelRead, wtsapi, 'WTSVirtualChannelRead');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WTSVirtualChannelRead]
- end;
-end;
-
-var
- _WTSVirtualChannelWrite: Pointer;
-
-function WTSVirtualChannelWrite;
-begin
- GetProcedureAddress(_WTSVirtualChannelWrite, wtsapi, 'WTSVirtualChannelWrite');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WTSVirtualChannelWrite]
- end;
-end;
-
-var
- _WTSVirtualChannelPurgeInput: Pointer;
-
-function WTSVirtualChannelPurgeInput;
-begin
- GetProcedureAddress(_WTSVirtualChannelPurgeInput, wtsapi, 'WTSVirtualChannelPurgeInput');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WTSVirtualChannelPurgeInput]
- end;
-end;
-
-var
- _WTSVirtualChannelPurgeOutput: Pointer;
-
-function WTSVirtualChannelPurgeOutput;
-begin
- GetProcedureAddress(_WTSVirtualChannelPurgeOutput, wtsapi, 'WTSVirtualChannelPurgeOutput');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WTSVirtualChannelPurgeOutput]
- end;
-end;
-
-var
- _WTSVirtualChannelQuery: Pointer;
-
-function WTSVirtualChannelQuery;
-begin
- GetProcedureAddress(_WTSVirtualChannelQuery, wtsapi, 'WTSVirtualChannelQuery');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WTSVirtualChannelQuery]
- end;
-end;
-
-var
- _WTSFreeMemory: Pointer;
-
-procedure WTSFreeMemory;
-begin
- GetProcedureAddress(_WTSFreeMemory, wtsapi, 'WTSFreeMemory');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WTSFreeMemory]
- end;
-end;
-
-var
- _WTSRegisterSessionNotification: Pointer;
-
-function WTSRegisterSessionNotification;
-begin
- GetProcedureAddress(_WTSRegisterSessionNotification, wtsapi, 'WTSRegisterSessionNotification');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WTSRegisterSessionNotification]
- end;
-end;
-
-var
- _WTSUnRegisterSessionNot: Pointer;
-
-function WTSUnRegisterSessionNotification;
-begin
- GetProcedureAddress(_WTSUnRegisterSessionNot, wtsapi, 'WTSUnRegisterSessionNotification');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WTSUnRegisterSessionNot]
- end;
-end;
-
-var
- _WTSQueryUserToken: Pointer;
-
-function WTSQueryUserToken;
-begin
- GetProcedureAddress(_WTSQueryUserToken, wtsapi, 'WTSQueryUserToken');
- asm
- MOV ESP, EBP
- POP EBP
- JMP [_WTSQueryUserToken]
- end;
-end;
-
-{$ELSE}
-
-function WTSEnumerateServersA; external wtsapi name 'WTSEnumerateServersA';
-function WTSEnumerateServersW; external wtsapi name 'WTSEnumerateServersW';
-function WTSEnumerateServers; external wtsapi name 'WTSEnumerateServers' + AWSuffix;
-function WTSOpenServerA; external wtsapi name 'WTSOpenServerA';
-function WTSOpenServerW; external wtsapi name 'WTSOpenServerW';
-function WTSOpenServer; external wtsapi name 'WTSOpenServer' + AWSuffix;
-procedure WTSCloseServer; external wtsapi name 'WTSCloseServer';
-function WTSEnumerateSessionsA; external wtsapi name 'WTSEnumerateSessionsA';
-function WTSEnumerateSessionsW; external wtsapi name 'WTSEnumerateSessionsW';
-function WTSEnumerateSessions; external wtsapi name 'WTSEnumerateSessions' + AWSuffix;
-function WTSEnumerateProcessesA; external wtsapi name 'WTSEnumerateProcessesA';
-function WTSEnumerateProcessesW; external wtsapi name 'WTSEnumerateProcessesW';
-function WTSEnumerateProcesses; external wtsapi name 'WTSEnumerateProcesses' + AWSuffix;
-function WTSTerminateProcess; external wtsapi name 'WTSTerminateProcess';
-function WTSQuerySessionInformationA; external wtsapi name 'WTSQuerySessionInformationA';
-function WTSQuerySessionInformationW; external wtsapi name 'WTSQuerySessionInformationW';
-function WTSQuerySessionInformation; external wtsapi name 'WTSQuerySessionInformation' + AWSuffix;
-function WTSQueryUserConfigA; external wtsapi name 'WTSQueryUserConfigA';
-function WTSQueryUserConfigW; external wtsapi name 'WTSQueryUserConfigW';
-function WTSQueryUserConfig; external wtsapi name 'WTSQueryUserConfig' + AWSuffix;
-function WTSSetUserConfigA; external wtsapi name 'WTSSetUserConfigA';
-function WTSSetUserConfigW; external wtsapi name 'WTSSetUserConfigW';
-function WTSSetUserConfig; external wtsapi name 'WTSSetUserConfig' + AWSuffix;
-function WTSSendMessageA; external wtsapi name 'WTSSendMessageA';
-function WTSSendMessageW; external wtsapi name 'WTSSendMessageW';
-function WTSSendMessage; external wtsapi name 'WTSSendMessage' + AWSuffix;
-function WTSDisconnectSession; external wtsapi name 'WTSDisconnectSession';
-function WTSLogoffSession; external wtsapi name 'WTSLogoffSession';
-function WTSShutdownSystem; external wtsapi name 'WTSShutdownSystem';
-function WTSWaitSystemEvent; external wtsapi name 'WTSWaitSystemEvent';
-function WTSVirtualChannelOpen; external wtsapi name 'WTSVirtualChannelOpen';
-function WTSVirtualChannelClose; external wtsapi name 'WTSVirtualChannelClose';
-function WTSVirtualChannelRead; external wtsapi name 'WTSVirtualChannelRead';
-function WTSVirtualChannelWrite; external wtsapi name 'WTSVirtualChannelWrite';
-function WTSVirtualChannelPurgeInput; external wtsapi name 'WTSVirtualChannelPurgeInput';
-function WTSVirtualChannelPurgeOutput; external wtsapi name 'WTSVirtualChannelPurgeOutput';
-function WTSVirtualChannelQuery; external wtsapi name 'WTSVirtualChannelQuery';
-procedure WTSFreeMemory; external wtsapi name 'WTSFreeMemory';
-function WTSRegisterSessionNotification; external wtsapi name 'WTSRegisterSessionNotification';
-function WTSUnRegisterSessionNotification; external wtsapi name 'WTSUnRegisterSessionNotification';
-function WTSQueryUserToken; external wtsapi name 'WTSQueryUserToken';
-
-{$ENDIF DYNAMIC_LINK}
-
-end.
+{******************************************************************************}
+{ }
+{ Terminal Services API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: wtsapi32.h, released June 2000. The original Pascal }
+{ code is: WtsApi32.pas, released December 2000. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwawtsapi32.pas,v 1.1 2005/04/04 07:56:11 marco Exp $
+
+unit JwaWtsApi32;
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaWinNT, JwaWinType;
+
+// Windows Terminal Server public APIs
+//
+// Copyright 1995-1999, Citrix Systems Inc.
+// Copyright (c) 1997-1999 Microsoft Corporation
+
+//==============================================================================
+// Defines
+//==============================================================================
+
+//
+// Specifies the current server
+//
+
+const
+ WTS_CURRENT_SERVER = HANDLE(0);
+ {$EXTERNALSYM WTS_CURRENT_SERVER}
+ WTS_CURRENT_SERVER_HANDLE = HANDLE(0);
+ {$EXTERNALSYM WTS_CURRENT_SERVER_HANDLE}
+ WTS_CURRENT_SERVER_NAME = '';
+ {$EXTERNALSYM WTS_CURRENT_SERVER_NAME}
+
+//
+// Specifies the current session (SessionId)
+//
+
+ WTS_CURRENT_SESSION = DWORD(-1);
+ {$EXTERNALSYM WTS_CURRENT_SESSION}
+
+//
+// Possible pResponse values from WTSSendMessage()
+//
+
+ IDTIMEOUT = 32000;
+ {$EXTERNALSYM IDTIMEOUT}
+ IDASYNC = 32001;
+ {$EXTERNALSYM IDASYNC}
+
+//
+// Shutdown flags
+//
+
+ WTS_WSD_LOGOFF = $00000001; // log off all users except
+ {$EXTERNALSYM WTS_WSD_LOGOFF} // current user; deletes
+ // WinStations (a reboot is
+ // required to recreate the
+ // WinStations)
+ WTS_WSD_SHUTDOWN = $00000002; // shutdown system
+ {$EXTERNALSYM WTS_WSD_SHUTDOWN}
+ WTS_WSD_REBOOT = $00000004; // shutdown and reboot
+ {$EXTERNALSYM WTS_WSD_REBOOT}
+ WTS_WSD_POWEROFF = $00000008; // shutdown and power off (on
+ {$EXTERNALSYM WTS_WSD_POWEROFF}
+ // machines that support power
+ // off through software)
+ WTS_WSD_FASTREBOOT = $00000010; // reboot without logging users
+ {$EXTERNALSYM WTS_WSD_FASTREBOOT} // off or shutting down
+
+//==============================================================================
+// WTS_CONNECTSTATE_CLASS - Session connect state
+//==============================================================================
+
+type
+ _WTS_CONNECTSTATE_CLASS = (
+ WTSActive, // User logged on to WinStation
+ WTSConnected, // WinStation connected to client
+ WTSConnectQuery, // In the process of connecting to client
+ WTSShadow, // Shadowing another WinStation
+ WTSDisconnected, // WinStation logged on without client
+ WTSIdle, // Waiting for client to connect
+ WTSListen, // WinStation is listening for connection
+ WTSReset, // WinStation is being reset
+ WTSDown, // WinStation is down due to error
+ WTSInit); // WinStation in initialization
+ {$EXTERNALSYM _WTS_CONNECTSTATE_CLASS}
+ WTS_CONNECTSTATE_CLASS = _WTS_CONNECTSTATE_CLASS;
+ {$EXTERNALSYM WTS_CONNECTSTATE_CLASS}
+ TWtsConnectStateClass = WTS_CONNECTSTATE_CLASS;
+
+//==============================================================================
+// WTS_SERVER_INFO - returned by WTSEnumerateServers (version 1)
+//==============================================================================
+
+//
+// WTSEnumerateServers() returns two variables: pServerInfo and Count.
+// The latter is the number of WTS_SERVER_INFO structures contained in
+// the former. In order to read each server, iterate i from 0 to
+// Count-1 and reference the server name as
+// pServerInfo[i].pServerName; for example:
+//
+// for ( i=0; i < Count; i++ ) {
+// _tprintf( TEXT("%s "), pServerInfo[i].pServerName );
+// }
+//
+// The memory returned looks like the following. P is a pServerInfo
+// pointer, and D is the string data for that pServerInfo:
+//
+// P1 P2 P3 P4 ... Pn D1 D2 D3 D4 ... Dn
+//
+// This makes it easier to iterate the servers, using code similar to
+// the above.
+//
+
+type
+ PWTS_SERVER_INFOW = ^WTS_SERVER_INFOW;
+ {$EXTERNALSYM PWTS_SERVER_INFOW}
+ _WTS_SERVER_INFOW = record
+ pServerName: LPWSTR; // server name
+ end;
+ {$EXTERNALSYM _WTS_SERVER_INFOW}
+ WTS_SERVER_INFOW = _WTS_SERVER_INFOW;
+ {$EXTERNALSYM WTS_SERVER_INFOW}
+ TWtsServerInfoW = WTS_SERVER_INFOW;
+ PWtsServerInfoW = PWTS_SERVER_INFOW;
+
+ PWTS_SERVER_INFOA = ^WTS_SERVER_INFOA;
+ {$EXTERNALSYM PWTS_SERVER_INFOA}
+ _WTS_SERVER_INFOA = record
+ pServerName: LPSTR; // server name
+ end;
+ {$EXTERNALSYM _WTS_SERVER_INFOA}
+ WTS_SERVER_INFOA = _WTS_SERVER_INFOA;
+ {$EXTERNALSYM WTS_SERVER_INFOA}
+ TWtsServerInfoA = WTS_SERVER_INFOA;
+ PWtsServerInfoA = PWTS_SERVER_INFOA;
+
+ {$IFDEF UNICODE}
+ WTS_SERVER_INFO = WTS_SERVER_INFOW;
+ {$EXTERNALSYM WTS_SERVER_INFO}
+ PWTS_SERVER_INFO = PWTS_SERVER_INFOW;
+ {$EXTERNALSYM PWTS_SERVER_INFO}
+ TWtsServerInfo = TWtsServerInfoW;
+ PWtsServerInfo = PWtsServerInfoW;
+ {$ELSE}
+ WTS_SERVER_INFO = WTS_SERVER_INFOA;
+ {$EXTERNALSYM WTS_SERVER_INFO}
+ PWTS_SERVER_INFO = PWTS_SERVER_INFOA;
+ {$EXTERNALSYM PWTS_SERVER_INFO}
+ TWtsServerInfo = TWtsServerInfoA;
+ PWtsServerInfo = PWtsServerInfoA;
+ {$ENDIF UNICODE}
+
+//==============================================================================
+// WTS_SESSION_INFO - returned by WTSEnumerateSessions (version 1)
+//==============================================================================
+
+//
+// WTSEnumerateSessions() returns data in a similar format to the above
+// WTSEnumerateServers(). It returns two variables: pSessionInfo and
+// Count. The latter is the number of WTS_SESSION_INFO structures
+// contained in the former. Iteration is similar, except that there
+// are three parts to each entry, so it would look like this:
+//
+// for ( i=0; i < Count; i++ ) {
+// _tprintf( TEXT("%-5u %-20s %u\n"),
+// pSessionInfo[i].SessionId,
+// pSessionInfo[i].pWinStationName,
+// pSessionInfo[i].State );
+// }
+//
+// The memory returned is also segmented as the above, with all the
+// structures allocated at the start and the string data at the end.
+// We'll use S for the SessionId, P for the pWinStationName pointer
+// and D for the string data, and C for the connect State:
+//
+// S1 P1 C1 S2 P2 C2 S3 P3 C3 S4 P4 C4 ... Sn Pn Cn D1 D2 D3 D4 ... Dn
+//
+// As above, this makes it easier to iterate the sessions.
+//
+
+type
+ PWTS_SESSION_INFOW = ^WTS_SESSION_INFOW;
+ {$EXTERNALSYM PWTS_SESSION_INFOW}
+ _WTS_SESSION_INFOW = record
+ SessionId: DWORD; // session id
+ pWinStationName: LPWSTR; // name of WinStation this session is connected to
+ State: WTS_CONNECTSTATE_CLASS; // connection state (see enum)
+ end;
+ {$EXTERNALSYM _WTS_SESSION_INFOW}
+ WTS_SESSION_INFOW = _WTS_SESSION_INFOW;
+ {$EXTERNALSYM WTS_SESSION_INFOW}
+ TWtsSessionInfoW = WTS_SESSION_INFOW;
+ PWtsSessionInfoW = PWTS_SESSION_INFOW;
+
+ PWTS_SESSION_INFOA = ^WTS_SESSION_INFOA;
+ {$EXTERNALSYM PWTS_SESSION_INFOA}
+ _WTS_SESSION_INFOA = record
+ SessionId: DWORD; // session id
+ pWinStationName: LPSTR; // name of WinStation this session is connected to
+ State: WTS_CONNECTSTATE_CLASS; // connection state (see enum)
+ end;
+ {$EXTERNALSYM _WTS_SESSION_INFOA}
+ WTS_SESSION_INFOA = _WTS_SESSION_INFOA;
+ {$EXTERNALSYM WTS_SESSION_INFOA}
+ TWtsSessionInfoA = WTS_SESSION_INFOA;
+ PWtsSessionInfoA = PWTS_SESSION_INFOA;
+
+ {$IFDEF UNICODE}
+ WTS_SESSION_INFO = WTS_SESSION_INFOW;
+ PWTS_SESSION_INFO = PWTS_SESSION_INFOW;
+ TWtsSessionInfo = TWtsSessionInfoW;
+ PWtsSessionInfo = PWtsSessionInfoW;
+ {$ELSE}
+ WTS_SESSION_INFO = WTS_SESSION_INFOA;
+ PWTS_SESSION_INFO = PWTS_SESSION_INFOA;
+ TWtsSessionInfo = TWtsSessionInfoA;
+ PWtsSessionInfo = PWtsSessionInfoA;
+ {$ENDIF UNICODE}
+
+//==============================================================================
+// WTS_PROCESS_INFO - returned by WTSEnumerateProcesses (version 1)
+//==============================================================================
+
+//
+// WTSEnumerateProcesses() also returns data similar to
+// WTSEnumerateServers(). It returns two variables: pProcessInfo and
+// Count. The latter is the number of WTS_PROCESS_INFO structures
+// contained in the former. Iteration is similar, except that there
+// are four parts to each entry, so it would look like this:
+//
+// for ( i=0; i < Count; i++ ) {
+// GetUserNameFromSid( pProcessInfo[i].pUserSid, UserName,
+// sizeof(UserName) );
+// _tprintf( TEXT("%-5u %-20s %-5u %s\n"),
+// pProcessInfo[i].SessionId,
+// UserName,
+// pProcessInfo[i].ProcessId,
+// pProcessInfo[i].pProcessName );
+// }
+//
+// The memory returned is also segmented as the above, with all the
+// structures allocated at the start and the string data at the end.
+// We'll use S for the SessionId, R for the ProcessId, P for the
+// pProcessName pointer and D for the string data, and U for pUserSid:
+//
+// S1 R1 P1 U1 S2 R2 P2 U2 S3 R3 P3 U3 ... Sn Rn Pn Un D1 D2 D3 ... Dn
+//
+// As above, this makes it easier to iterate the processes.
+//
+
+type
+ PWTS_PROCESS_INFOW = ^WTS_PROCESS_INFOW;
+ {$EXTERNALSYM PWTS_PROCESS_INFOW}
+ _WTS_PROCESS_INFOW = record
+ SessionId: DWORD; // session id
+ ProcessId: DWORD; // process id
+ pProcessName: LPWSTR; // name of process
+ pUserSid: PSID; // user's SID
+ end;
+ {$EXTERNALSYM _WTS_PROCESS_INFOW}
+ WTS_PROCESS_INFOW = _WTS_PROCESS_INFOW;
+ {$EXTERNALSYM WTS_PROCESS_INFOW}
+ TWtsProcessInfoW = WTS_PROCESS_INFOW;
+ PWtsProcessInfoW = PWTS_PROCESS_INFOW;
+
+ PWTS_PROCESS_INFOA = ^WTS_PROCESS_INFOA;
+ {$EXTERNALSYM PWTS_PROCESS_INFOA}
+ _WTS_PROCESS_INFOA = record
+ SessionId: DWORD; // session id
+ ProcessId: DWORD; // process id
+ pProcessName: LPSTR; // name of process
+ pUserSid: PSID; // user's SID
+ end;
+ {$EXTERNALSYM _WTS_PROCESS_INFOA}
+ WTS_PROCESS_INFOA = _WTS_PROCESS_INFOA;
+ {$EXTERNALSYM WTS_PROCESS_INFOA}
+ TWtsProcessInfoA = WTS_PROCESS_INFOA;
+ PWtsProcessInfoA = PWTS_PROCESS_INFOA;
+
+ {$IFDEF UNICODE}
+ WTS_PROCESS_INFO = WTS_PROCESS_INFOW;
+ {$EXTERNALSYM WTS_PROCESS_INFO}
+ PWTS_PROCESS_INFO = PWTS_PROCESS_INFOW;
+ {$EXTERNALSYM PWTS_PROCESS_INFO}
+ TWtsProcessInfo = TWtsProcessInfoW;
+ PWtsProcessInfo = PWtsProcessInfoW;
+ {$ELSE}
+ WTS_PROCESS_INFO = WTS_PROCESS_INFOA;
+ {$EXTERNALSYM WTS_PROCESS_INFO}
+ PWTS_PROCESS_INFO = PWTS_PROCESS_INFOA;
+ {$EXTERNALSYM PWTS_PROCESS_INFO}
+ TWtsProcessInfo = TWtsProcessInfoA;
+ PWtsProcessInfo = PWtsProcessInfoA;
+ {$ENDIF UNICODE}
+
+//==============================================================================
+// WTS_INFO_CLASS - WTSQuerySessionInformation
+// (See additional typedefs for more info on structures)
+//==============================================================================
+
+const
+ WTS_PROTOCOL_TYPE_CONSOLE = 0; // Console
+ {$EXTERNALSYM WTS_PROTOCOL_TYPE_CONSOLE}
+ WTS_PROTOCOL_TYPE_ICA = 1; // ICA Protocol
+ {$EXTERNALSYM WTS_PROTOCOL_TYPE_ICA}
+ WTS_PROTOCOL_TYPE_RDP = 2; // RDP Protocol
+ {$EXTERNALSYM WTS_PROTOCOL_TYPE_RDP}
+
+type
+ _WTS_INFO_CLASS = (
+ WTSInitialProgram,
+ WTSApplicationName,
+ WTSWorkingDirectory,
+ WTSOEMId,
+ WTSSessionId,
+ WTSUserName,
+ WTSWinStationName,
+ WTSDomainName,
+ WTSConnectState,
+ WTSClientBuildNumber,
+ WTSClientName,
+ WTSClientDirectory,
+ WTSClientProductId,
+ WTSClientHardwareId,
+ WTSClientAddress,
+ WTSClientDisplay,
+ WTSClientProtocolType);
+ {$EXTERNALSYM _WTS_INFO_CLASS}
+ WTS_INFO_CLASS = _WTS_INFO_CLASS;
+ TWtsInfoClass = WTS_INFO_CLASS;
+
+//==============================================================================
+// WTSQuerySessionInformation - (WTSClientAddress)
+//==============================================================================
+
+type
+ PWTS_CLIENT_ADDRESS = ^WTS_CLIENT_ADDRESS;
+ {$EXTERNALSYM PWTS_CLIENT_ADDRESS}
+ _WTS_CLIENT_ADDRESS = record
+ AddressFamily: DWORD; // AF_INET, AF_IPX, AF_NETBIOS, AF_UNSPEC
+ Address: array [0..19] of BYTE; // client network address
+ end;
+ {$EXTERNALSYM _WTS_CLIENT_ADDRESS}
+ WTS_CLIENT_ADDRESS = _WTS_CLIENT_ADDRESS;
+ {$EXTERNALSYM WTS_CLIENT_ADDRESS}
+ TWtsClientAddress = WTS_CLIENT_ADDRESS;
+ PWtsClientAddress = PWTS_CLIENT_ADDRESS;
+
+//==============================================================================
+// WTSQuerySessionInformation - (WTSClientDisplay)
+//==============================================================================
+
+type
+ PWTS_CLIENT_DISPLAY = ^WTS_CLIENT_DISPLAY;
+ {$EXTERNALSYM PWTS_CLIENT_DISPLAY}
+ _WTS_CLIENT_DISPLAY = record
+ HorizontalResolution: DWORD; // horizontal dimensions, in pixels
+ VerticalResolution: DWORD; // vertical dimensions, in pixels
+ ColorDepth: DWORD; // 1=16, 2=256, 4=64K, 8=16M
+ end;
+ {$EXTERNALSYM _WTS_CLIENT_DISPLAY}
+ WTS_CLIENT_DISPLAY = _WTS_CLIENT_DISPLAY;
+ {$EXTERNALSYM WTS_CLIENT_DISPLAY}
+ TWtsClientDisplay = WTS_CLIENT_DISPLAY;
+ PWtsClientDisplay = PWTS_CLIENT_DISPLAY;
+
+//==============================================================================
+// WTS_CONFIG_CLASS - WTSQueryUserConfig/WTSSetUserConfig
+//==============================================================================
+
+type
+ _WTS_CONFIG_CLASS = (
+ //Initial program settings
+ WTSUserConfigInitialProgram, // string returned/expected
+ WTSUserConfigWorkingDirectory, // string returned/expected
+ WTSUserConfigfInheritInitialProgram, // DWORD returned/expected
+ //
+ WTSUserConfigfAllowLogonTerminalServer, //DWORD returned/expected
+ //Timeout settings
+ WTSUserConfigTimeoutSettingsConnections, //DWORD returned/expected
+ WTSUserConfigTimeoutSettingsDisconnections, //DWORD returned/expected
+ WTSUserConfigTimeoutSettingsIdle, //DWORD returned/expected
+ //Client device settings
+ WTSUserConfigfDeviceClientDrives, //DWORD returned/expected
+ WTSUserConfigfDeviceClientPrinters, //DWORD returned/expected
+ WTSUserConfigfDeviceClientDefaultPrinter, //DWORD returned/expected
+ //Connection settings
+ WTSUserConfigBrokenTimeoutSettings, //DWORD returned/expected
+ WTSUserConfigReconnectSettings, //DWORD returned/expected
+ //Modem settings
+ WTSUserConfigModemCallbackSettings, //DWORD returned/expected
+ WTSUserConfigModemCallbackPhoneNumber, // string returned/expected
+ //Shadow settings
+ WTSUserConfigShadowingSettings, //DWORD returned/expected
+ //User Profile settings
+ WTSUserConfigTerminalServerProfilePath, // string returned/expected
+ //Terminal Server home directory
+ WTSUserConfigTerminalServerHomeDir, // string returned/expected
+ WTSUserConfigTerminalServerHomeDirDrive, // string returned/expected
+ WTSUserConfigfTerminalServerRemoteHomeDir); // DWORD 0:LOCAL 1:REMOTE
+ {$EXTERNALSYM _WTS_CONFIG_CLASS}
+ WTS_CONFIG_CLASS = _WTS_CONFIG_CLASS;
+ TWtsConfigClass = WTS_CONFIG_CLASS;
+
+{$IFDEF FALSE}
+
+// There we're remove in June 2001 PSDK (pre-release)
+
+ PWTS_USER_CONFIG_SET_NWSERVERW = ^WTS_USER_CONFIG_SET_NWSERVERW;
+ {$EXTERNALSYM PWTS_USER_CONFIG_SET_NWSERVERW}
+ _WTS_USER_CONFIG_SET_NWSERVERW = record
+ pNWServerName: LPWSTR;
+ pNWDomainAdminName: LPWSTR;
+ pNWDomainAdminPassword: LPWSTR;
+ end;
+ {$EXTERNALSYM _WTS_USER_CONFIG_SET_NWSERVERW}
+ WTS_USER_CONFIG_SET_NWSERVERW = _WTS_USER_CONFIG_SET_NWSERVERW;
+ {$EXTERNALSYM WTS_USER_CONFIG_SET_NWSERVERW}
+ TWtsUserConfigSetNwserverW = WTS_USER_CONFIG_SET_NWSERVERW;
+ PWtsUserConfigSetNwserverW = PWTS_USER_CONFIG_SET_NWSERVERW;
+
+ PWTS_USER_CONFIG_SET_NWSERVERA = ^WTS_USER_CONFIG_SET_NWSERVERA;
+ {$EXTERNALSYM PWTS_USER_CONFIG_SET_NWSERVERA}
+ _WTS_USER_CONFIG_SET_NWSERVERA = record
+ pNWServerName: LPSTR;
+ pNWDomainAdminName: LPSTR;
+ pNWDomainAdminPassword: LPSTR;
+ end;
+ {$EXTERNALSYM _WTS_USER_CONFIG_SET_NWSERVERA}
+ WTS_USER_CONFIG_SET_NWSERVERA = _WTS_USER_CONFIG_SET_NWSERVERA;
+ {$EXTERNALSYM WTS_USER_CONFIG_SET_NWSERVERA}
+ TWtsUserConfigSetNwserverA = WTS_USER_CONFIG_SET_NWSERVERA;
+ PWtsUserConfigSetNwserverA = PWTS_USER_CONFIG_SET_NWSERVERA;
+
+ {$IFDEF UNICODE}
+ WTS_USER_CONFIG_SET_NWSERVER = WTS_USER_CONFIG_SET_NWSERVERW;
+ {$EXTERNALSYM WTS_USER_CONFIG_SET_NWSERVER}
+ PWTS_USER_CONFIG_SET_NWSERVER = PWTS_USER_CONFIG_SET_NWSERVERW;
+ {$EXTERNALSYM PWTS_USER_CONFIG_SET_NWSERVER}
+ TWtsUserConfigSetNwserver = TWtsUserConfigSetNwserverW;
+ PWtsUserConfigSetNwserver = PWtsUserConfigSetNwserverW;
+ {$ELSE}
+ WTS_USER_CONFIG_SET_NWSERVER = WTS_USER_CONFIG_SET_NWSERVERA;
+ {$EXTERNALSYM WTS_USER_CONFIG_SET_NWSERVER}
+ PWTS_USER_CONFIG_SET_NWSERVER = PWTS_USER_CONFIG_SET_NWSERVERA;
+ {$EXTERNALSYM PWTS_USER_CONFIG_SET_NWSERVER}
+ TWtsUserConfigSetNwserver = TWtsUserConfigSetNwserverA;
+ PWtsUserConfigSetNwserver = PWtsUserConfigSetNwserverA;
+ {$ENDIF UNICODE}
+
+{$ENDIF FALSE}
+
+//==============================================================================
+// WTS_EVENT - Event flags for WTSWaitSystemEvent
+//==============================================================================
+
+const
+ WTS_EVENT_NONE = $00000000; // return no event
+ {$EXTERNALSYM WTS_EVENT_NONE}
+ WTS_EVENT_CREATE = $00000001; // new WinStation created
+ {$EXTERNALSYM WTS_EVENT_CREATE}
+ WTS_EVENT_DELETE = $00000002; // existing WinStation deleted
+ {$EXTERNALSYM WTS_EVENT_DELETE}
+ WTS_EVENT_RENAME = $00000004; // existing WinStation renamed
+ {$EXTERNALSYM WTS_EVENT_RENAME}
+ WTS_EVENT_CONNECT = $00000008; // WinStation connect to client
+ {$EXTERNALSYM WTS_EVENT_CONNECT}
+ WTS_EVENT_DISCONNECT = $00000010; // WinStation logged on without client
+ {$EXTERNALSYM WTS_EVENT_DISCONNECT}
+ WTS_EVENT_LOGON = $00000020; // user logged on to existing WinStation
+ {$EXTERNALSYM WTS_EVENT_LOGON}
+ WTS_EVENT_LOGOFF = $00000040; // user logged off from existing WinStation
+ {$EXTERNALSYM WTS_EVENT_LOGOFF}
+ WTS_EVENT_STATECHANGE = $00000080; // WinStation state change
+ {$EXTERNALSYM WTS_EVENT_STATECHANGE}
+ WTS_EVENT_LICENSE = $00000100; // license state change
+ {$EXTERNALSYM WTS_EVENT_LICENSE}
+ WTS_EVENT_ALL = $7fffffff; // wait for all event types
+ {$EXTERNALSYM WTS_EVENT_ALL}
+ WTS_EVENT_FLUSH = DWORD($80000000); // unblock all waiters
+ {$EXTERNALSYM WTS_EVENT_FLUSH}
+
+//==============================================================================
+// WTS_VIRTUAL_CLASS - WTSVirtualChannelQuery
+//==============================================================================
+
+type
+ _WTS_VIRTUAL_CLASS = (WTSVirtualClientData, WTSVirtualFileHandle);
+ {$EXTERNALSYM _WTS_VIRTUAL_CLASS}
+ WTS_VIRTUAL_CLASS = _WTS_VIRTUAL_CLASS;
+ {$EXTERNALSYM WTS_VIRTUAL_CLASS}
+ TWtsVirtualClass = WTS_VIRTUAL_CLASS;
+
+//==============================================================================
+// Windows Terminal Server public APIs
+//==============================================================================
+
+function WTSEnumerateServersA(pDomainName: LPSTR; Reserved, Version: DWORD;
+ var ppServerInfo: PWTS_SERVER_INFOA; var pCount: DWORD): BOOL; stdcall;
+{$EXTERNALSYM WTSEnumerateServersA}
+function WTSEnumerateServersW(pDomainName: LPWSTR; Reserved, Version: DWORD;
+ var ppServerInfo: PWTS_SERVER_INFOW; var pCount: DWORD): BOOL; stdcall;
+{$EXTERNALSYM WTSEnumerateServersW}
+function WTSEnumerateServers(pDomainName: LPTSTR; Reserved, Version: DWORD;
+ var ppServerInfo: PWTS_SERVER_INFO; var pCount: DWORD): BOOL; stdcall;
+{$EXTERNALSYM WTSEnumerateServers}
+
+//------------------------------------------------------------------------------
+
+function WTSOpenServerA(pServerName: LPSTR): HANDLE; stdcall;
+{$EXTERNALSYM WTSOpenServerA}
+function WTSOpenServerW(pServerName: LPWSTR): HANDLE; stdcall;
+{$EXTERNALSYM WTSOpenServerW}
+function WTSOpenServer(pServerName: LPTSTR): HANDLE; stdcall;
+{$EXTERNALSYM WTSOpenServer}
+
+//------------------------------------------------------------------------------
+
+procedure WTSCloseServer(hServer: HANDLE); stdcall;
+{$EXTERNALSYM WTSCloseServer}
+
+//------------------------------------------------------------------------------
+
+function WTSEnumerateSessionsA(hServer: HANDLE; Reserved: DWORD; Version: DWORD;
+ var ppSessionInfo: PWTS_SESSION_INFOA; var pCount: DWORD): BOOL; stdcall;
+{$EXTERNALSYM WTSEnumerateSessionsA}
+function WTSEnumerateSessionsW(hServer: HANDLE; Reserved: DWORD; Version: DWORD;
+ var ppSessionInfo: PWTS_SESSION_INFOW; var pCount: DWORD): BOOL; stdcall;
+{$EXTERNALSYM WTSEnumerateSessionsW}
+function WTSEnumerateSessions(hServer: HANDLE; Reserved: DWORD; Version: DWORD;
+ var ppSessionInfo: PWTS_SESSION_INFO; var pCount: DWORD): BOOL; stdcall;
+{$EXTERNALSYM WTSEnumerateSessions}
+
+//------------------------------------------------------------------------------
+
+function WTSEnumerateProcessesA(hServer: HANDLE; Reserved: DWORD; Version: DWORD;
+ var ppProcessInfo: PWTS_PROCESS_INFOA; var pCount: DWORD): BOOL; stdcall;
+{$EXTERNALSYM WTSEnumerateProcessesA}
+function WTSEnumerateProcessesW(hServer: HANDLE; Reserved: DWORD; Version: DWORD;
+ var ppProcessInfo: PWTS_PROCESS_INFOW; var pCount: DWORD): BOOL; stdcall;
+{$EXTERNALSYM WTSEnumerateProcessesW}
+function WTSEnumerateProcesses(hServer: HANDLE; Reserved: DWORD; Version: DWORD;
+ var ppProcessInfo: PWTS_PROCESS_INFO; var pCount: DWORD): BOOL; stdcall;
+{$EXTERNALSYM WTSEnumerateProcesses}
+
+//------------------------------------------------------------------------------
+
+function WTSTerminateProcess(hServer: HANDLE; ProcessId, ExitCode: DWORD): BOOL; stdcall;
+{$EXTERNALSYM WTSTerminateProcess}
+
+//------------------------------------------------------------------------------
+
+function WTSQuerySessionInformationA(hServer: HANDLE; SessionId: DWORD;
+ WTSInfoClass: WTS_INFO_CLASS; var ppBuffer: Pointer; var pBytesReturned: DWORD): BOOL; stdcall;
+{$EXTERNALSYM WTSQuerySessionInformationA}
+function WTSQuerySessionInformationW(hServer: HANDLE; SessionId: DWORD;
+ WTSInfoClass: WTS_INFO_CLASS; var ppBuffer: Pointer; var pBytesReturned: DWORD): BOOL; stdcall;
+{$EXTERNALSYM WTSQuerySessionInformationW}
+function WTSQuerySessionInformation(hServer: HANDLE; SessionId: DWORD;
+ WTSInfoClass: WTS_INFO_CLASS; var ppBuffer: Pointer; var pBytesReturned: DWORD): BOOL; stdcall;
+{$EXTERNALSYM WTSQuerySessionInformation}
+
+//------------------------------------------------------------------------------
+
+function WTSQueryUserConfigA(pServerName, pUserName: LPSTR; WTSConfigClass: WTS_CONFIG_CLASS;
+ var ppBuffer: Pointer; var pBytesReturned: DWORD): BOOL; stdcall;
+{$EXTERNALSYM WTSQueryUserConfigA}
+function WTSQueryUserConfigW(pServerName, pUserName: LPWSTR; WTSConfigClass: WTS_CONFIG_CLASS;
+ var ppBuffer: Pointer; var pBytesReturned: DWORD): BOOL; stdcall;
+{$EXTERNALSYM WTSQueryUserConfigW}
+function WTSQueryUserConfig(pServerName, pUserName: LPTSTR; WTSConfigClass: WTS_CONFIG_CLASS;
+ var ppBuffer: Pointer; var pBytesReturned: DWORD): BOOL; stdcall;
+{$EXTERNALSYM WTSQueryUserConfig}
+
+//------------------------------------------------------------------------------
+
+function WTSSetUserConfigA(pServerName, pUserName: LPSTR; WTSConfigClass: WTS_CONFIG_CLASS;
+ pBuffer: LPSTR; DataLength: DWORD): BOOL; stdcall;
+{$EXTERNALSYM WTSSetUserConfigA}
+function WTSSetUserConfigW(pServerName, pUserName: LPWSTR; WTSConfigClass: WTS_CONFIG_CLASS;
+ pBuffer: LPWSTR; DataLength: DWORD): BOOL; stdcall;
+{$EXTERNALSYM WTSSetUserConfigW}
+function WTSSetUserConfig(pServerName, pUserName: LPTSTR; WTSConfigClass: WTS_CONFIG_CLASS;
+ pBuffer: LPTSTR; DataLength: DWORD): BOOL; stdcall;
+{$EXTERNALSYM WTSSetUserConfig}
+
+//------------------------------------------------------------------------------
+
+function WTSSendMessageA(hServer: HANDLE; SessionId: DWORD; pTitle: LPSTR;
+ TitleLength: DWORD; pMessage: LPSTR; MessageLength: DWORD; Style: DWORD;
+ Timeout: DWORD; var pResponse: DWORD; bWait: BOOL): BOOL; stdcall;
+{$EXTERNALSYM WTSSendMessageA}
+function WTSSendMessageW(hServer: HANDLE; SessionId: DWORD; pTitle: LPWSTR;
+ TitleLength: DWORD; pMessage: LPWSTR; MessageLength: DWORD; Style: DWORD;
+ Timeout: DWORD; var pResponse: DWORD; bWait: BOOL): BOOL; stdcall;
+{$EXTERNALSYM WTSSendMessageW}
+function WTSSendMessage(hServer: HANDLE; SessionId: DWORD; pTitle: LPTSTR;
+ TitleLength: DWORD; pMessage: LPTSTR; MessageLength: DWORD; Style: DWORD;
+ Timeout: DWORD; var pResponse: DWORD; bWait: BOOL): BOOL; stdcall;
+{$EXTERNALSYM WTSSendMessage}
+
+//------------------------------------------------------------------------------
+
+function WTSDisconnectSession(hServer: HANDLE; SessionId: DWORD; bWait: BOOL): BOOL; stdcall;
+{$EXTERNALSYM WTSDisconnectSession}
+
+//------------------------------------------------------------------------------
+
+function WTSLogoffSession(hServer: HANDLE; SessionId: DWORD; bWait: BOOL): BOOL; stdcall;
+{$EXTERNALSYM WTSLogoffSession}
+
+//------------------------------------------------------------------------------
+
+function WTSShutdownSystem(hServer: HANDLE; ShutdownFlag: DWORD): BOOL; stdcall;
+{$EXTERNALSYM WTSShutdownSystem}
+
+//------------------------------------------------------------------------------
+
+function WTSWaitSystemEvent(hServer: HANDLE; EventMask: DWORD;
+ var pEventFlags: DWORD): BOOL; stdcall;
+{$EXTERNALSYM WTSWaitSystemEvent}
+
+//------------------------------------------------------------------------------
+
+function WTSVirtualChannelOpen(hServer: HANDLE; SessionId: DWORD;
+ pVirtualName: LPSTR): HANDLE; stdcall;
+{$EXTERNALSYM WTSVirtualChannelOpen}
+
+function WTSVirtualChannelClose(hChannelHandle: HANDLE): BOOL; stdcall;
+{$EXTERNALSYM WTSVirtualChannelClose}
+
+function WTSVirtualChannelRead(hChannelHandle: HANDLE; TimeOut: ULONG;
+ Buffer: PCHAR; BufferSize: ULONG; var pBytesRead: ULONG): BOOL; stdcall;
+{$EXTERNALSYM WTSVirtualChannelRead}
+
+function WTSVirtualChannelWrite(hChannelHandle: HANDLE; Buffer: PCHAR;
+ Length: ULONG; var pBytesWritten: ULONG): BOOL; stdcall;
+{$EXTERNALSYM WTSVirtualChannelWrite}
+
+function WTSVirtualChannelPurgeInput(hChannelHandle: HANDLE): BOOL; stdcall;
+{$EXTERNALSYM WTSVirtualChannelPurgeInput}
+
+function WTSVirtualChannelPurgeOutput(hChannelHandle: HANDLE): BOOL; stdcall;
+{$EXTERNALSYM WTSVirtualChannelPurgeOutput}
+
+function WTSVirtualChannelQuery(hChannelHandle: HANDLE; VirtualClass: WTS_VIRTUAL_CLASS;
+ ppBuffer: PVOID; var pBytesReturned: DWORD): BOOL; stdcall;
+{$EXTERNALSYM WTSVirtualChannelQuery}
+
+//------------------------------------------------------------------------------
+
+procedure WTSFreeMemory(pMemory: PVOID); stdcall;
+{$EXTERNALSYM WTSFreeMemory}
+
+// Flags for Console Notification
+
+const
+ NOTIFY_FOR_ALL_SESSIONS = 1;
+ {$EXTERNALSYM NOTIFY_FOR_ALL_SESSIONS}
+ NOTIFY_FOR_THIS_SESSION = 0;
+ {$EXTERNALSYM NOTIFY_FOR_THIS_SESSION}
+
+function WTSRegisterSessionNotification(hWnd: HWND; dwFlags: DWORD): BOOL; stdcall;
+{$EXTERNALSYM WTSRegisterSessionNotification}
+
+function WTSUnRegisterSessionNotification(hWnd: HWND): BOOL; stdcall;
+{$EXTERNALSYM WTSUnRegisterSessionNotification}
+
+function WTSQueryUserToken(SessionId: ULONG; var phToken: HANDLE): BOOL; stdcall;
+{$EXTERNALSYM WTSQueryUserToken}
+
+implementation
+
+const
+ wtsapi = 'wtsapi32.dll';
+ {$IFDEF UNICODE}
+ AWSuffix = 'W';
+ {$ELSE}
+ AWSuffix = 'A';
+ {$ENDIF UNICODE}
+
+{$IFDEF DYNAMIC_LINK}
+
+var
+ _WTSEnumerateServersA: Pointer;
+
+function WTSEnumerateServersA;
+begin
+ GetProcedureAddress(_WTSEnumerateServersA, wtsapi, 'WTSEnumerateServersA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WTSEnumerateServersA]
+ end;
+end;
+
+var
+ _WTSEnumerateServersW: Pointer;
+
+function WTSEnumerateServersW;
+begin
+ GetProcedureAddress(_WTSEnumerateServersW, wtsapi, 'WTSEnumerateServersW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WTSEnumerateServersW]
+ end;
+end;
+
+var
+ _WTSEnumerateServers: Pointer;
+
+function WTSEnumerateServers;
+begin
+ GetProcedureAddress(_WTSEnumerateServers, wtsapi, 'WTSEnumerateServers' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WTSEnumerateServers]
+ end;
+end;
+
+var
+ _WTSOpenServerA: Pointer;
+
+function WTSOpenServerA;
+begin
+ GetProcedureAddress(_WTSOpenServerA, wtsapi, 'WTSOpenServerA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WTSOpenServerA]
+ end;
+end;
+
+var
+ _WTSOpenServerW: Pointer;
+
+function WTSOpenServerW;
+begin
+ GetProcedureAddress(_WTSOpenServerW, wtsapi, 'WTSOpenServerW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WTSOpenServerW]
+ end;
+end;
+
+var
+ _WTSOpenServer: Pointer;
+
+function WTSOpenServer;
+begin
+ GetProcedureAddress(_WTSOpenServer, wtsapi, 'WTSOpenServer' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WTSOpenServer]
+ end;
+end;
+
+var
+ _WTSCloseServer: Pointer;
+
+procedure WTSCloseServer;
+begin
+ GetProcedureAddress(_WTSCloseServer, wtsapi, 'WTSCloseServer');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WTSCloseServer]
+ end;
+end;
+
+var
+ _WTSEnumerateSessionsA: Pointer;
+
+function WTSEnumerateSessionsA;
+begin
+ GetProcedureAddress(_WTSEnumerateSessionsA, wtsapi, 'WTSEnumerateSessionsA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WTSEnumerateSessionsA]
+ end;
+end;
+
+var
+ _WTSEnumerateSessionsW: Pointer;
+
+function WTSEnumerateSessionsW;
+begin
+ GetProcedureAddress(_WTSEnumerateSessionsW, wtsapi, 'WTSEnumerateSessionsW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WTSEnumerateSessionsW]
+ end;
+end;
+
+var
+ _WTSEnumerateSessions: Pointer;
+
+function WTSEnumerateSessions;
+begin
+ GetProcedureAddress(_WTSEnumerateSessions, wtsapi, 'WTSEnumerateSessions' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WTSEnumerateSessions]
+ end;
+end;
+
+var
+ _WTSEnumerateProcessesA: Pointer;
+
+function WTSEnumerateProcessesA;
+begin
+ GetProcedureAddress(_WTSEnumerateProcessesA, wtsapi, 'WTSEnumerateProcessesA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WTSEnumerateProcessesA]
+ end;
+end;
+
+var
+ _WTSEnumerateProcessesW: Pointer;
+
+function WTSEnumerateProcessesW;
+begin
+ GetProcedureAddress(_WTSEnumerateProcessesW, wtsapi, 'WTSEnumerateProcessesW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WTSEnumerateProcessesW]
+ end;
+end;
+
+var
+ _WTSEnumerateProcesses: Pointer;
+
+function WTSEnumerateProcesses;
+begin
+ GetProcedureAddress(_WTSEnumerateProcesses, wtsapi, 'WTSEnumerateProcesses' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WTSEnumerateProcesses]
+ end;
+end;
+
+var
+ _WTSTerminateProcess: Pointer;
+
+function WTSTerminateProcess;
+begin
+ GetProcedureAddress(_WTSTerminateProcess, wtsapi, 'WTSTerminateProcess');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WTSTerminateProcess]
+ end;
+end;
+
+var
+ _WTSQuerySessionInformationA: Pointer;
+
+function WTSQuerySessionInformationA;
+begin
+ GetProcedureAddress(_WTSQuerySessionInformationA, wtsapi, 'WTSQuerySessionInformationA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WTSQuerySessionInformationA]
+ end;
+end;
+
+var
+ _WTSQuerySessionInformationW: Pointer;
+
+function WTSQuerySessionInformationW;
+begin
+ GetProcedureAddress(_WTSQuerySessionInformationW, wtsapi, 'WTSQuerySessionInformationW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WTSQuerySessionInformationW]
+ end;
+end;
+
+var
+ _WTSQuerySessionInformation: Pointer;
+
+function WTSQuerySessionInformation;
+begin
+ GetProcedureAddress(_WTSQuerySessionInformation, wtsapi, 'WTSQuerySessionInformation' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WTSQuerySessionInformation]
+ end;
+end;
+
+var
+ _WTSQueryUserConfigA: Pointer;
+
+function WTSQueryUserConfigA;
+begin
+ GetProcedureAddress(_WTSQueryUserConfigA, wtsapi, 'WTSQueryUserConfigA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WTSQueryUserConfigA]
+ end;
+end;
+
+var
+ _WTSQueryUserConfigW: Pointer;
+
+function WTSQueryUserConfigW;
+begin
+ GetProcedureAddress(_WTSQueryUserConfigW, wtsapi, 'WTSQueryUserConfigW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WTSQueryUserConfigW]
+ end;
+end;
+
+var
+ _WTSQueryUserConfig: Pointer;
+
+function WTSQueryUserConfig;
+begin
+ GetProcedureAddress(_WTSQueryUserConfig, wtsapi, 'WTSQueryUserConfig' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WTSQueryUserConfig]
+ end;
+end;
+
+var
+ _WTSSetUserConfigA: Pointer;
+
+function WTSSetUserConfigA;
+begin
+ GetProcedureAddress(_WTSSetUserConfigA, wtsapi, 'WTSSetUserConfigA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WTSSetUserConfigA]
+ end;
+end;
+
+var
+ _WTSSetUserConfigW: Pointer;
+
+function WTSSetUserConfigW;
+begin
+ GetProcedureAddress(_WTSSetUserConfigW, wtsapi, 'WTSSetUserConfigW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WTSSetUserConfigW]
+ end;
+end;
+
+var
+ _WTSSetUserConfig: Pointer;
+
+function WTSSetUserConfig;
+begin
+ GetProcedureAddress(_WTSSetUserConfig, wtsapi, 'WTSSetUserConfig' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WTSSetUserConfig]
+ end;
+end;
+
+var
+ _WTSSendMessageA: Pointer;
+
+function WTSSendMessageA;
+begin
+ GetProcedureAddress(_WTSSendMessageA, wtsapi, 'WTSSendMessageA');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WTSSendMessageA]
+ end;
+end;
+
+var
+ _WTSSendMessageW: Pointer;
+
+function WTSSendMessageW;
+begin
+ GetProcedureAddress(_WTSSendMessageW, wtsapi, 'WTSSendMessageW');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WTSSendMessageW]
+ end;
+end;
+
+var
+ _WTSSendMessage: Pointer;
+
+function WTSSendMessage;
+begin
+ GetProcedureAddress(_WTSSendMessage, wtsapi, 'WTSSendMessage' + AWSuffix);
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WTSSendMessage]
+ end;
+end;
+
+var
+ _WTSDisconnectSession: Pointer;
+
+function WTSDisconnectSession;
+begin
+ GetProcedureAddress(_WTSDisconnectSession, wtsapi, 'WTSDisconnectSession');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WTSDisconnectSession]
+ end;
+end;
+
+var
+ _WTSLogoffSession: Pointer;
+
+function WTSLogoffSession;
+begin
+ GetProcedureAddress(_WTSLogoffSession, wtsapi, 'WTSLogoffSession');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WTSLogoffSession]
+ end;
+end;
+
+var
+ _WTSShutdownSystem: Pointer;
+
+function WTSShutdownSystem;
+begin
+ GetProcedureAddress(_WTSShutdownSystem, wtsapi, 'WTSShutdownSystem');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WTSShutdownSystem]
+ end;
+end;
+
+var
+ _WTSWaitSystemEvent: Pointer;
+
+function WTSWaitSystemEvent;
+begin
+ GetProcedureAddress(_WTSWaitSystemEvent, wtsapi, 'WTSWaitSystemEvent');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WTSWaitSystemEvent]
+ end;
+end;
+
+var
+ _WTSVirtualChannelOpen: Pointer;
+
+function WTSVirtualChannelOpen;
+begin
+ GetProcedureAddress(_WTSVirtualChannelOpen, wtsapi, 'WTSVirtualChannelOpen');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WTSVirtualChannelOpen]
+ end;
+end;
+
+var
+ _WTSVirtualChannelClose: Pointer;
+
+function WTSVirtualChannelClose;
+begin
+ GetProcedureAddress(_WTSVirtualChannelClose, wtsapi, 'WTSVirtualChannelClose');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WTSVirtualChannelClose]
+ end;
+end;
+
+var
+ _WTSVirtualChannelRead: Pointer;
+
+function WTSVirtualChannelRead;
+begin
+ GetProcedureAddress(_WTSVirtualChannelRead, wtsapi, 'WTSVirtualChannelRead');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WTSVirtualChannelRead]
+ end;
+end;
+
+var
+ _WTSVirtualChannelWrite: Pointer;
+
+function WTSVirtualChannelWrite;
+begin
+ GetProcedureAddress(_WTSVirtualChannelWrite, wtsapi, 'WTSVirtualChannelWrite');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WTSVirtualChannelWrite]
+ end;
+end;
+
+var
+ _WTSVirtualChannelPurgeInput: Pointer;
+
+function WTSVirtualChannelPurgeInput;
+begin
+ GetProcedureAddress(_WTSVirtualChannelPurgeInput, wtsapi, 'WTSVirtualChannelPurgeInput');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WTSVirtualChannelPurgeInput]
+ end;
+end;
+
+var
+ _WTSVirtualChannelPurgeOutput: Pointer;
+
+function WTSVirtualChannelPurgeOutput;
+begin
+ GetProcedureAddress(_WTSVirtualChannelPurgeOutput, wtsapi, 'WTSVirtualChannelPurgeOutput');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WTSVirtualChannelPurgeOutput]
+ end;
+end;
+
+var
+ _WTSVirtualChannelQuery: Pointer;
+
+function WTSVirtualChannelQuery;
+begin
+ GetProcedureAddress(_WTSVirtualChannelQuery, wtsapi, 'WTSVirtualChannelQuery');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WTSVirtualChannelQuery]
+ end;
+end;
+
+var
+ _WTSFreeMemory: Pointer;
+
+procedure WTSFreeMemory;
+begin
+ GetProcedureAddress(_WTSFreeMemory, wtsapi, 'WTSFreeMemory');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WTSFreeMemory]
+ end;
+end;
+
+var
+ _WTSRegisterSessionNotification: Pointer;
+
+function WTSRegisterSessionNotification;
+begin
+ GetProcedureAddress(_WTSRegisterSessionNotification, wtsapi, 'WTSRegisterSessionNotification');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WTSRegisterSessionNotification]
+ end;
+end;
+
+var
+ _WTSUnRegisterSessionNot: Pointer;
+
+function WTSUnRegisterSessionNotification;
+begin
+ GetProcedureAddress(_WTSUnRegisterSessionNot, wtsapi, 'WTSUnRegisterSessionNotification');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WTSUnRegisterSessionNot]
+ end;
+end;
+
+var
+ _WTSQueryUserToken: Pointer;
+
+function WTSQueryUserToken;
+begin
+ GetProcedureAddress(_WTSQueryUserToken, wtsapi, 'WTSQueryUserToken');
+ asm
+ MOV ESP, EBP
+ POP EBP
+ JMP [_WTSQueryUserToken]
+ end;
+end;
+
+{$ELSE}
+
+function WTSEnumerateServersA; external wtsapi name 'WTSEnumerateServersA';
+function WTSEnumerateServersW; external wtsapi name 'WTSEnumerateServersW';
+function WTSEnumerateServers; external wtsapi name 'WTSEnumerateServers' + AWSuffix;
+function WTSOpenServerA; external wtsapi name 'WTSOpenServerA';
+function WTSOpenServerW; external wtsapi name 'WTSOpenServerW';
+function WTSOpenServer; external wtsapi name 'WTSOpenServer' + AWSuffix;
+procedure WTSCloseServer; external wtsapi name 'WTSCloseServer';
+function WTSEnumerateSessionsA; external wtsapi name 'WTSEnumerateSessionsA';
+function WTSEnumerateSessionsW; external wtsapi name 'WTSEnumerateSessionsW';
+function WTSEnumerateSessions; external wtsapi name 'WTSEnumerateSessions' + AWSuffix;
+function WTSEnumerateProcessesA; external wtsapi name 'WTSEnumerateProcessesA';
+function WTSEnumerateProcessesW; external wtsapi name 'WTSEnumerateProcessesW';
+function WTSEnumerateProcesses; external wtsapi name 'WTSEnumerateProcesses' + AWSuffix;
+function WTSTerminateProcess; external wtsapi name 'WTSTerminateProcess';
+function WTSQuerySessionInformationA; external wtsapi name 'WTSQuerySessionInformationA';
+function WTSQuerySessionInformationW; external wtsapi name 'WTSQuerySessionInformationW';
+function WTSQuerySessionInformation; external wtsapi name 'WTSQuerySessionInformation' + AWSuffix;
+function WTSQueryUserConfigA; external wtsapi name 'WTSQueryUserConfigA';
+function WTSQueryUserConfigW; external wtsapi name 'WTSQueryUserConfigW';
+function WTSQueryUserConfig; external wtsapi name 'WTSQueryUserConfig' + AWSuffix;
+function WTSSetUserConfigA; external wtsapi name 'WTSSetUserConfigA';
+function WTSSetUserConfigW; external wtsapi name 'WTSSetUserConfigW';
+function WTSSetUserConfig; external wtsapi name 'WTSSetUserConfig' + AWSuffix;
+function WTSSendMessageA; external wtsapi name 'WTSSendMessageA';
+function WTSSendMessageW; external wtsapi name 'WTSSendMessageW';
+function WTSSendMessage; external wtsapi name 'WTSSendMessage' + AWSuffix;
+function WTSDisconnectSession; external wtsapi name 'WTSDisconnectSession';
+function WTSLogoffSession; external wtsapi name 'WTSLogoffSession';
+function WTSShutdownSystem; external wtsapi name 'WTSShutdownSystem';
+function WTSWaitSystemEvent; external wtsapi name 'WTSWaitSystemEvent';
+function WTSVirtualChannelOpen; external wtsapi name 'WTSVirtualChannelOpen';
+function WTSVirtualChannelClose; external wtsapi name 'WTSVirtualChannelClose';
+function WTSVirtualChannelRead; external wtsapi name 'WTSVirtualChannelRead';
+function WTSVirtualChannelWrite; external wtsapi name 'WTSVirtualChannelWrite';
+function WTSVirtualChannelPurgeInput; external wtsapi name 'WTSVirtualChannelPurgeInput';
+function WTSVirtualChannelPurgeOutput; external wtsapi name 'WTSVirtualChannelPurgeOutput';
+function WTSVirtualChannelQuery; external wtsapi name 'WTSVirtualChannelQuery';
+procedure WTSFreeMemory; external wtsapi name 'WTSFreeMemory';
+function WTSRegisterSessionNotification; external wtsapi name 'WTSRegisterSessionNotification';
+function WTSUnRegisterSessionNotification; external wtsapi name 'WTSUnRegisterSessionNotification';
+function WTSQueryUserToken; external wtsapi name 'WTSQueryUserToken';
+
+{$ENDIF DYNAMIC_LINK}
+
+end.
diff --git a/packages/extra/winunits/jwazmouse.pas b/packages/extra/winunits/jwazmouse.pas
index 3db3bed870..b0470836d2 100644
--- a/packages/extra/winunits/jwazmouse.pas
+++ b/packages/extra/winunits/jwazmouse.pas
@@ -1,219 +1,219 @@
-{******************************************************************************}
-{ }
-{ Intellimouse API interface Unit for Object Pascal }
-{ }
-{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
-{ Corporation. All Rights Reserved. }
-{ }
-{ The original file is: zmouse.h, released June 2000. The original Pascal }
-{ code is: ZMOUSE.pas, released December 2000. The initial developer of the }
-{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
-{ }
-{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
-{ Marcel van Brakel. All Rights Reserved. }
-{ }
-{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
-{ }
-{ You may retrieve the latest version of this file at the Project JEDI }
-{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
-{ }
-{ The contents of this file are used with permission, subject to the Mozilla }
-{ Public License Version 1.1 (the "License"); you may not use this file except }
-{ in compliance with the License. You may obtain a copy of the License at }
-{ http://www.mozilla.org/MPL/MPL-1.1.html }
-{ }
-{ Software distributed under the License is distributed on an "AS IS" basis, }
-{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
-{ the specific language governing rights and limitations under the License. }
-{ }
-{ Alternatively, the contents of this file may be used under the terms of the }
-{ GNU Lesser General Public License (the "LGPL License"), in which case the }
-{ provisions of the LGPL License are applicable instead of those above. }
-{ If you wish to allow use of your version of this file only under the terms }
-{ of the LGPL License and not to allow others to use your version of this file }
-{ under the MPL, indicate your decision by deleting the provisions above and }
-{ replace them with the notice and other provisions required by the LGPL }
-{ License. If you do not delete the provisions above, a recipient may use }
-{ your version of this file under either the MPL or the LGPL License. }
-{ }
-{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
-{ }
-{******************************************************************************}
-
-// $Id: jwazmouse.pas,v 1.1 2005/04/04 07:56:11 marco Exp $
-
-unit JwaZMOUSE;
-
-{$I jediapilib.inc}
-
-interface
-
-uses
- JwaWinUser, JwaWinType;
-
-{****************************************************************************
-* *
-* ZMOUSE.H -- Include file for IntelliMouse(tm) 1.0 *
-* *
-* NOTE: Zmouse.h contains #defines required when providing IntelliMouse *
-* wheel support for Windows95 and NT3.51. Wheel is supported *
-* natively in WinNT4.0, please refer to the NT4.0 SDK for more info *
-* on providing support for IntelliMouse in NT4.0. *
-* *
-* Copyright (c) 1983-1996, Microsoft Corp. All rights reserved. *
-* *
-\***************************************************************************}
-
-{**************************************************************************
- Client Application (API) Defines for Wheel rolling
-***************************************************************************}
-
-// Apps need to call RegisterWindowMessage using the #define below to
-// get the message number that is sent to the foreground window
-// when a wheel roll occurs
-
-const
- {$IFDEF UNICODE}
- MSH_MOUSEWHEEL = WideString('MSWHEEL_ROLLMSG');
- {$EXTERNALSYM MSH_MOUSEWHEEL}
- {$ELSE}
- MSH_MOUSEWHEEL = 'MSWHEEL_ROLLMSG';
- {$EXTERNALSYM MSH_MOUSEWHEEL}
- {$ENDIF UNICODE}
-
-// wParam = wheel rotation expressed in multiples of WHEEL_DELTA
-// lParam is the mouse coordinates
-
- WHEEL_DELTA = 120; // Default value for rolling one notch
- {$EXTERNALSYM WHEEL_DELTA}
-
- WM_MOUSEWHEEL = WM_MOUSELAST + 1; // message that will be supported by the OS
- {$EXTERNALSYM WM_MOUSEWHEEL}
-
-{**************************************************************************
- Client Application (API) Defines for
- * determining if wheel support active
- * determining # of Scroll Lines
-***************************************************************************}
-
-// Class name for MSWHEEL.EXE's invisible window
-// use FindWindow to get hwnd to MSWHEEL
-
- {$IFDEF UNICODE}
- MOUSEZ_CLASSNAME = WideString('MouseZ'); // wheel window class
- {$EXTERNALSYM MOUSEZ_CLASSNAME}
- MOUSEZ_TITLE = WideString('Magellan MSWHEEL'); // wheel window title
- {$EXTERNALSYM MOUSEZ_TITLE}
- {$ELSE}
- MOUSEZ_CLASSNAME = 'MouseZ'; // wheel window class
- {$EXTERNALSYM MOUSEZ_CLASSNAME}
- MOUSEZ_TITLE = 'Magellan MSWHEEL'; // wheel window title
- {$EXTERNALSYM MOUSEZ_TITLE}
- {$ENDIF UNICODE}
-
- MSH_WHEELMODULE_CLASS = MOUSEZ_CLASSNAME;
- {$EXTERNALSYM MSH_WHEELMODULE_CLASS}
- MSH_WHEELMODULE_TITLE = MOUSEZ_TITLE;
- {$EXTERNALSYM MSH_WHEELMODULE_TITLE}
-
-// Apps need to call RegisterWindowMessage using the #defines
-// below to get the message numbers for:
-// 1) the message that can be sent to the MSWHEEL window to
-// query if wheel support is active (MSH_WHEELSUPPORT)>
-// 2) the message to query for the number of scroll lines
-// (MSH_SCROLL_LINES)
-//
-// To send a message to MSWheel window, use FindWindow with the #defines
-// for CLASS and TITLE above. If FindWindow fails to find the MSWHEEL
-// window or the return from SendMessage is false, then Wheel support
-// is not currently available.
-
- {$IFDEF UNICODE}
- MSH_WHEELSUPPORT = WideString('MSH_WHEELSUPPORT_MSG'); // name of msg to send to query for wheel support
- {$EXTERNALSYM MSH_WHEELSUPPORT}
- {$ELSE}
- MSH_WHEELSUPPORT = 'MSH_WHEELSUPPORT_MSG'; // name of msg to send to query for wheel support
- {$EXTERNALSYM MSH_WHEELSUPPORT}
- {$ENDIF UNICODE}
-
-// MSH_WHEELSUPPORT
-// wParam - not used
-// lParam - not used
-// returns BOOL - TRUE if wheel support is active, FALSE otherwise
-
- {$IFDEF UNICODE}
- MSH_SCROLL_LINES = WideString('MSH_SCROLL_LINES_MSG');
- {$EXTERNALSYM MSH_SCROLL_LINES}
- {$ELSE}
- MSH_SCROLL_LINES = 'MSH_SCROLL_LINES_MSG';
- {$EXTERNALSYM MSH_SCROLL_LINES}
- {$ENDIF UNICODE}
-
-// MSH_SCROLL_LINES
-// wParam - not used
-// lParam - not used
-// returns int - number of lines to scroll on a wheel roll
-
- WHEEL_PAGESCROLL = UINT_MAX; // signifies to scroll a page, also
- // defined in winuser.h in the NT4.0 SDK
- {$EXTERNALSYM WHEEL_PAGESCROLL}
-
- SPI_SETWHEELSCROLLLINES = 105; // Also defined in winuser.h in the
- // NT4.0 SDK, please see the NT4.0 SDK
- // documentation for NT4.0 implementation
- // specifics.
- // For Win95 and WinNT3.51,
- // Mswheel broadcasts the message
- // WM_SETTINGCHANGE (equivalent to
- // WM_WININICHANGE) when the scroll
- // lines has changed. Applications
- // will recieve the WM_SETTINGCHANGE
- // message with the wParam set to
- // SPI_SETWHEELSCROLLLINES. When
- // this message is recieved the application
- // should query Mswheel for the new
- // setting.
- {$EXTERNALSYM SPI_SETWHEELSCROLLLINES}
-
-{*********************************************************************
-* INLINE FUNCTION: HwndMsWheel
-* Purpose : Get a reference to MSWheel Window, the registered messages,
-* wheel support active setting, and number of scrollLines
-* Params : PUINT puiMsh_MsgMouseWheel - address of UINT to contain returned registered wheel message
-* PUINT puiMsh_Msg3DSupport - address of UINT to contain wheel support registered message
-* PUINT puiMsh_MsgScrollLines - address of UINT to contain Scroll lines registered message
-* PBOOL pf3DSupport - address of BOOL to contain returned flag for wheel support active
-* PINT piScrollLines - address of int to contain returned scroll lines
-* Returns : HWND handle to the MsWheel window
-* Note : The return value for pf3DSupport and piScrollLines is dependant
-* on the POINT32 module. If POINT32 module is not running then
-* the values returned for these parameters will be
-* FALSE and 3, respectively.
-*********************************************************************}
-
-function HwndMSWheel(var puiMsh_MsgMouseWheel, puiMsh_Msg3DSupport,
- puiMsh_MsgScrollLines: UINT; var pf3DSupport: BOOL;
- var piScrollLines: Integer): HWND;
-{$EXTERNALSYM HwndMSWheel}
-
-implementation
-
-function HwndMSWheel(var puiMsh_MsgMouseWheel, puiMsh_Msg3DSupport,
- puiMsh_MsgScrollLines: UINT; var pf3DSupport: BOOL;
- var piScrollLines: Integer): HWND;
-begin
- Result := FindWindow(MSH_WHEELMODULE_CLASS, MSH_WHEELMODULE_TITLE);
- puiMsh_MsgMouseWheel := RegisterWindowMessage(MSH_MOUSEWHEEL);
- puiMsh_Msg3DSupport := RegisterWindowMessage(MSH_WHEELSUPPORT);
- puiMsh_MsgScrollLines := RegisterWindowMessage(MSH_SCROLL_LINES);
- if (puiMsh_Msg3DSupport <> 0) and (Result <> 0) then
- pf3DSupport := BOOL(SendMessage(Result, puiMsh_Msg3DSupport, 0, 0))
- else
- pf3DSupport := False; // default to FALSE
- if (puiMsh_MsgScrollLines <> 0) and (Result <> 0) then
- piScrollLines := SendMessage(Result, puiMsh_MsgScrollLines, 0, 0)
- else
- piScrollLines := 3; // default
-end;
-
-end.
+{******************************************************************************}
+{ }
+{ Intellimouse API interface Unit for Object Pascal }
+{ }
+{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
+{ Corporation. All Rights Reserved. }
+{ }
+{ The original file is: zmouse.h, released June 2000. The original Pascal }
+{ code is: ZMOUSE.pas, released December 2000. The initial developer of the }
+{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
+{ }
+{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
+{ Marcel van Brakel. All Rights Reserved. }
+{ }
+{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
+{ }
+{ You may retrieve the latest version of this file at the Project JEDI }
+{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
+{ }
+{ The contents of this file are used with permission, subject to the Mozilla }
+{ Public License Version 1.1 (the "License"); you may not use this file except }
+{ in compliance with the License. You may obtain a copy of the License at }
+{ http://www.mozilla.org/MPL/MPL-1.1.html }
+{ }
+{ Software distributed under the License is distributed on an "AS IS" basis, }
+{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
+{ the specific language governing rights and limitations under the License. }
+{ }
+{ Alternatively, the contents of this file may be used under the terms of the }
+{ GNU Lesser General Public License (the "LGPL License"), in which case the }
+{ provisions of the LGPL License are applicable instead of those above. }
+{ If you wish to allow use of your version of this file only under the terms }
+{ of the LGPL License and not to allow others to use your version of this file }
+{ under the MPL, indicate your decision by deleting the provisions above and }
+{ replace them with the notice and other provisions required by the LGPL }
+{ License. If you do not delete the provisions above, a recipient may use }
+{ your version of this file under either the MPL or the LGPL License. }
+{ }
+{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
+{ }
+{******************************************************************************}
+
+// $Id: jwazmouse.pas,v 1.1 2005/04/04 07:56:11 marco Exp $
+
+unit JwaZMOUSE;
+
+{$I jediapilib.inc}
+
+interface
+
+uses
+ JwaWinUser, JwaWinType;
+
+{****************************************************************************
+* *
+* ZMOUSE.H -- Include file for IntelliMouse(tm) 1.0 *
+* *
+* NOTE: Zmouse.h contains #defines required when providing IntelliMouse *
+* wheel support for Windows95 and NT3.51. Wheel is supported *
+* natively in WinNT4.0, please refer to the NT4.0 SDK for more info *
+* on providing support for IntelliMouse in NT4.0. *
+* *
+* Copyright (c) 1983-1996, Microsoft Corp. All rights reserved. *
+* *
+\***************************************************************************}
+
+{**************************************************************************
+ Client Application (API) Defines for Wheel rolling
+***************************************************************************}
+
+// Apps need to call RegisterWindowMessage using the #define below to
+// get the message number that is sent to the foreground window
+// when a wheel roll occurs
+
+const
+ {$IFDEF UNICODE}
+ MSH_MOUSEWHEEL = WideString('MSWHEEL_ROLLMSG');
+ {$EXTERNALSYM MSH_MOUSEWHEEL}
+ {$ELSE}
+ MSH_MOUSEWHEEL = 'MSWHEEL_ROLLMSG';
+ {$EXTERNALSYM MSH_MOUSEWHEEL}
+ {$ENDIF UNICODE}
+
+// wParam = wheel rotation expressed in multiples of WHEEL_DELTA
+// lParam is the mouse coordinates
+
+ WHEEL_DELTA = 120; // Default value for rolling one notch
+ {$EXTERNALSYM WHEEL_DELTA}
+
+ WM_MOUSEWHEEL = WM_MOUSELAST + 1; // message that will be supported by the OS
+ {$EXTERNALSYM WM_MOUSEWHEEL}
+
+{**************************************************************************
+ Client Application (API) Defines for
+ * determining if wheel support active
+ * determining # of Scroll Lines
+***************************************************************************}
+
+// Class name for MSWHEEL.EXE's invisible window
+// use FindWindow to get hwnd to MSWHEEL
+
+ {$IFDEF UNICODE}
+ MOUSEZ_CLASSNAME = WideString('MouseZ'); // wheel window class
+ {$EXTERNALSYM MOUSEZ_CLASSNAME}
+ MOUSEZ_TITLE = WideString('Magellan MSWHEEL'); // wheel window title
+ {$EXTERNALSYM MOUSEZ_TITLE}
+ {$ELSE}
+ MOUSEZ_CLASSNAME = 'MouseZ'; // wheel window class
+ {$EXTERNALSYM MOUSEZ_CLASSNAME}
+ MOUSEZ_TITLE = 'Magellan MSWHEEL'; // wheel window title
+ {$EXTERNALSYM MOUSEZ_TITLE}
+ {$ENDIF UNICODE}
+
+ MSH_WHEELMODULE_CLASS = MOUSEZ_CLASSNAME;
+ {$EXTERNALSYM MSH_WHEELMODULE_CLASS}
+ MSH_WHEELMODULE_TITLE = MOUSEZ_TITLE;
+ {$EXTERNALSYM MSH_WHEELMODULE_TITLE}
+
+// Apps need to call RegisterWindowMessage using the #defines
+// below to get the message numbers for:
+// 1) the message that can be sent to the MSWHEEL window to
+// query if wheel support is active (MSH_WHEELSUPPORT)>
+// 2) the message to query for the number of scroll lines
+// (MSH_SCROLL_LINES)
+//
+// To send a message to MSWheel window, use FindWindow with the #defines
+// for CLASS and TITLE above. If FindWindow fails to find the MSWHEEL
+// window or the return from SendMessage is false, then Wheel support
+// is not currently available.
+
+ {$IFDEF UNICODE}
+ MSH_WHEELSUPPORT = WideString('MSH_WHEELSUPPORT_MSG'); // name of msg to send to query for wheel support
+ {$EXTERNALSYM MSH_WHEELSUPPORT}
+ {$ELSE}
+ MSH_WHEELSUPPORT = 'MSH_WHEELSUPPORT_MSG'; // name of msg to send to query for wheel support
+ {$EXTERNALSYM MSH_WHEELSUPPORT}
+ {$ENDIF UNICODE}
+
+// MSH_WHEELSUPPORT
+// wParam - not used
+// lParam - not used
+// returns BOOL - TRUE if wheel support is active, FALSE otherwise
+
+ {$IFDEF UNICODE}
+ MSH_SCROLL_LINES = WideString('MSH_SCROLL_LINES_MSG');
+ {$EXTERNALSYM MSH_SCROLL_LINES}
+ {$ELSE}
+ MSH_SCROLL_LINES = 'MSH_SCROLL_LINES_MSG';
+ {$EXTERNALSYM MSH_SCROLL_LINES}
+ {$ENDIF UNICODE}
+
+// MSH_SCROLL_LINES
+// wParam - not used
+// lParam - not used
+// returns int - number of lines to scroll on a wheel roll
+
+ WHEEL_PAGESCROLL = UINT_MAX; // signifies to scroll a page, also
+ // defined in winuser.h in the NT4.0 SDK
+ {$EXTERNALSYM WHEEL_PAGESCROLL}
+
+ SPI_SETWHEELSCROLLLINES = 105; // Also defined in winuser.h in the
+ // NT4.0 SDK, please see the NT4.0 SDK
+ // documentation for NT4.0 implementation
+ // specifics.
+ // For Win95 and WinNT3.51,
+ // Mswheel broadcasts the message
+ // WM_SETTINGCHANGE (equivalent to
+ // WM_WININICHANGE) when the scroll
+ // lines has changed. Applications
+ // will recieve the WM_SETTINGCHANGE
+ // message with the wParam set to
+ // SPI_SETWHEELSCROLLLINES. When
+ // this message is recieved the application
+ // should query Mswheel for the new
+ // setting.
+ {$EXTERNALSYM SPI_SETWHEELSCROLLLINES}
+
+{*********************************************************************
+* INLINE FUNCTION: HwndMsWheel
+* Purpose : Get a reference to MSWheel Window, the registered messages,
+* wheel support active setting, and number of scrollLines
+* Params : PUINT puiMsh_MsgMouseWheel - address of UINT to contain returned registered wheel message
+* PUINT puiMsh_Msg3DSupport - address of UINT to contain wheel support registered message
+* PUINT puiMsh_MsgScrollLines - address of UINT to contain Scroll lines registered message
+* PBOOL pf3DSupport - address of BOOL to contain returned flag for wheel support active
+* PINT piScrollLines - address of int to contain returned scroll lines
+* Returns : HWND handle to the MsWheel window
+* Note : The return value for pf3DSupport and piScrollLines is dependant
+* on the POINT32 module. If POINT32 module is not running then
+* the values returned for these parameters will be
+* FALSE and 3, respectively.
+*********************************************************************}
+
+function HwndMSWheel(var puiMsh_MsgMouseWheel, puiMsh_Msg3DSupport,
+ puiMsh_MsgScrollLines: UINT; var pf3DSupport: BOOL;
+ var piScrollLines: Integer): HWND;
+{$EXTERNALSYM HwndMSWheel}
+
+implementation
+
+function HwndMSWheel(var puiMsh_MsgMouseWheel, puiMsh_Msg3DSupport,
+ puiMsh_MsgScrollLines: UINT; var pf3DSupport: BOOL;
+ var piScrollLines: Integer): HWND;
+begin
+ Result := FindWindow(MSH_WHEELMODULE_CLASS, MSH_WHEELMODULE_TITLE);
+ puiMsh_MsgMouseWheel := RegisterWindowMessage(MSH_MOUSEWHEEL);
+ puiMsh_Msg3DSupport := RegisterWindowMessage(MSH_WHEELSUPPORT);
+ puiMsh_MsgScrollLines := RegisterWindowMessage(MSH_SCROLL_LINES);
+ if (puiMsh_Msg3DSupport <> 0) and (Result <> 0) then
+ pf3DSupport := BOOL(SendMessage(Result, puiMsh_Msg3DSupport, 0, 0))
+ else
+ pf3DSupport := False; // default to FALSE
+ if (puiMsh_MsgScrollLines <> 0) and (Result <> 0) then
+ piScrollLines := SendMessage(Result, puiMsh_MsgScrollLines, 0, 0)
+ else
+ piScrollLines := 3; // default
+end;
+
+end.
diff --git a/tests/test/units/system/testmac.txt b/tests/test/units/system/testmac.txt
index 52dc28ce0a..ab7df25fae 100644
--- a/tests/test/units/system/testmac.txt
+++ b/tests/test/units/system/testmac.txt
@@ -1 +1,42 @@
-a cdthis z #13 $7F $FF +$33 -$7F 127 255 +33 -127 $7FFF $FFFF +$1234 -$7FFF 12700 2550 +33200 -12700 $7FFFFFFF $FFFFFFFF +$12341234 -$7FFFFFFF 12700 2550 +2147483647 -2147483648 01234 1278.1278 121223.1278E00 121224.1278e2 121225.1278E02 121216.1278E+00 121227.1278e+2 121228.1278E+02 121233.1278E-00 121234.1278e-2 Thisisaverylongstringwhichissupposedtohavemorethan255characters,itshouldbetruncatedsomewhere in the middle of the string, but i'm really not sure where it will be truncated exactly. Lets check this out and assume that GNU does not mean GNU, then what would it mean? Hello world! Verify what happens with the '' characters This is a null terminated string! \ No newline at end of file
+a
+cdthis
+z
+#13
+$7F
+ $FF
+ +$33
+ -$7F
+127
+ 255
+ +33
+ -127
+$7FFF
+ $FFFF
+ +$1234
+ -$7FFF
+12700
+ 2550
+ +33200
+ -12700
+$7FFFFFFF
+ $FFFFFFFF
+ +$12341234
+ -$7FFFFFFF
+12700
+ 2550
+ +2147483647
+ -2147483648
+ 01234
+ 1278.1278
+ 121223.1278E00
+ 121224.1278e2
+ 121225.1278E02
+ 121216.1278E+00
+ 121227.1278e+2
+ 121228.1278E+02
+ 121233.1278E-00
+ 121234.1278e-2
+Thisisaverylongstringwhichissupposedtohavemorethan255characters,itshouldbetruncatedsomewhere in the middle of the string, but i'm really not sure where it will be truncated exactly. Lets check this out and assume that GNU does not mean GNU, then what would it mean?
+Hello world!
+Verify what happens with the '' characters
+This is a null terminated string!
diff --git a/tests/test/units/system/testpc.txt b/tests/test/units/system/testpc.txt
index 563f481c04..abf494a4e6 100644
--- a/tests/test/units/system/testpc.txt
+++ b/tests/test/units/system/testpc.txt
@@ -1,42 +1,42 @@
-a
-cdthis
-z
-#13
-$7F
- $FF
- +$33
- -$7F
-127
- 255
- +33
- -127
-$7FFF
- $FFFF
- +$1234
- -$7FFF
-12700
- 2550
- +33200
- -12700
-$7FFFFFFF
- $FFFFFFFF
- +$12341234
- -$7FFFFFFF
-12700
- 2550
- +2147483647
- -2147483648
- 01234
- 1278.1278
- 121223.1278E00
- 121224.1278e2
- 121225.1278E02
- 121216.1278E+00
- 121227.1278e+2
- 121228.1278E+02
- 121233.1278E-00
- 121234.1278e-2
-Thisisaverylongstringwhichissupposedtohavemorethan255characters,itshouldbetruncatedsomewhere in the middle of the string, but i'm really not sure where it will be truncated exactly. Lets check this out and assume that GNU does not mean GNU, then what would it mean?
-Hello world!
-Verify what happens with the '' characters
+a
+cdthis
+z
+#13
+$7F
+ $FF
+ +$33
+ -$7F
+127
+ 255
+ +33
+ -127
+$7FFF
+ $FFFF
+ +$1234
+ -$7FFF
+12700
+ 2550
+ +33200
+ -12700
+$7FFFFFFF
+ $FFFFFFFF
+ +$12341234
+ -$7FFFFFFF
+12700
+ 2550
+ +2147483647
+ -2147483648
+ 01234
+ 1278.1278
+ 121223.1278E00
+ 121224.1278e2
+ 121225.1278E02
+ 121216.1278E+00
+ 121227.1278e+2
+ 121228.1278E+02
+ 121233.1278E-00
+ 121234.1278e-2
+Thisisaverylongstringwhichissupposedtohavemorethan255characters,itshouldbetruncatedsomewhere in the middle of the string, but i'm really not sure where it will be truncated exactly. Lets check this out and assume that GNU does not mean GNU, then what would it mean?
+Hello world!
+Verify what happens with the '' characters
This is a null terminated string! \ No newline at end of file
diff --git a/tests/webtbs/tw3973.pp b/tests/webtbs/tw3973.pp
index c17728c957..5c969baaec 100644
--- a/tests/webtbs/tw3973.pp
+++ b/tests/webtbs/tw3973.pp
@@ -1,147 +1,147 @@
-{ Source provided for Free Pascal Bug Report 3973 }
-{ Submitted by "alphax" on 2005-05-16 }
-{ e-mail: graphcoloring@yahoo.com.cn }
-program fpc_test_3;
-
-{$APPTYPE CONSOLE}
-
-{$IFDEF FPC}
- {$MODE objfpc}
-{$ENDIF}
-
-uses
- SysUtils, Variants;
-
-var
- FailureCount: Integer;
-
- procedure TestOpenArray;
-
- procedure p(const a: array of const);
-
- procedure Check(
- const TypeName: string;
- const aVarRec: TVarRec;
- const aExpectedVType: Byte
- );
- begin
- Write('VType of ', TypeName, ' element is: ', aVarRec.VType, '--------');
- if aVarRec.VType = aExpectedVType then
- WriteLn('Ok')
- else
- begin
- Inc(FailureCount);
- WriteLn('Failure');
- end;
- end;
-
- begin
- Check('Currency', a[0], vtCurrency);
- Check('Interface(nil)', a[1], vtInterface);
- Check('Interface', a[2], vtInterface);
- { TObject is a class as well! }
- Check('Class Object(nil)', a[3], vtClass);
- Check('Class', a[4], vtClass);
- {$IFDEF FPC}
- Check('QWord', a[5], vtQWord);
- {$ENDIF}
-
- { I WISH FPC Introduce a vtDateTime for the TDatetime parameter }
- end;
-
- var
- C: Currency;
- DT: TDateTime;
- IntfNil, Intf: IInterface;
- Obj: TObject;
-
- {$IFDEF FPC}
- Quad: QWord;
- {$ENDIF}
- begin
- C := 0;
- IntfNil := nil;
- Intf := TInterfacedObject.Create();
- Obj := nil;
- {$IFDEF FPC}
- Quad := 0;
- p([C, IntfNil, Intf, Obj, TObject, Quad]);
- {$ELSE}
- p([C, IntfNil, Intf, Obj, TObject]);
- {$ENDIF}
- end;
-
-
- procedure TestVarType;
-
- procedure Check(
- const aTypeName: string;
- const V: Variant;
- const aExpectedVarType: TVarType);
- var
- VT: TVarType;
- begin
- VT := VarType(V);
- Write('VarType of ', aTypeName, ' variant is: ', VT, '--------');
- if VT = aExpectedVarType then
- Writeln('Ok')
- else
- begin
- WriteLn('Failure');
- Inc(FailureCount);
- end;
- end;
-
- var
- C: Currency;
- DT: TDateTime;
- Intf: IInterface;
- {$IFDEF FPC}
- Quad: QWord;
- {$ENDIF}
- begin
- C := 0;
- DT := 0;
- Intf := TInterfacedObject.Create();
- {$IFDEF FPC}
- Quad := 0;
- {$ENDIF}
- Check('Currency', C, varCurrency);
- Check('Datetime', DT, varDate);
- Check('Interface', Intf, varUnknown);
- {$IFDEF FPC}
- Check('QWord', Quad, varQWord);
- {$ENDIF}
- end;
-
- procedure TestFormat;
- var
- uLong: Longword;
- Longlong: Int64;
- {$IFDEF FPC}
- Quad: QWord;
- {$ENDIF}
- begin
- uLong := High(uLong);
- Writeln(Format('high of longword is: %u', [uLong]), ' ', IntToHex(ulong, 8));
- Longlong := High(Longlong);
- Writeln(Format('high of int64 is: %d', [Longlong]), ' ', IntToHex(Longlong, 16));
- {$IFDEF FPC}
- Quad := High(Quad);
- Writeln(Format('high of quadword is: %u', [Quad]), ' ', IntToHex(Quad, 16));
- {$ENDIF}
- end;
-
-begin
- TestOpenArray();
- TestVarType();
- TestFormat();
- WriteLn;
- if FailureCount = 0 then
- WriteLn('All passed')
- else
- begin
- WriteLn(FailureCount, 'Failures');
- halt(1);
- end;
-end.
+{ Source provided for Free Pascal Bug Report 3973 }
+{ Submitted by "alphax" on 2005-05-16 }
+{ e-mail: graphcoloring@yahoo.com.cn }
+program fpc_test_3;
+
+{$APPTYPE CONSOLE}
+
+{$IFDEF FPC}
+ {$MODE objfpc}
+{$ENDIF}
+
+uses
+ SysUtils, Variants;
+
+var
+ FailureCount: Integer;
+
+ procedure TestOpenArray;
+
+ procedure p(const a: array of const);
+
+ procedure Check(
+ const TypeName: string;
+ const aVarRec: TVarRec;
+ const aExpectedVType: Byte
+ );
+ begin
+ Write('VType of ', TypeName, ' element is: ', aVarRec.VType, '--------');
+ if aVarRec.VType = aExpectedVType then
+ WriteLn('Ok')
+ else
+ begin
+ Inc(FailureCount);
+ WriteLn('Failure');
+ end;
+ end;
+
+ begin
+ Check('Currency', a[0], vtCurrency);
+ Check('Interface(nil)', a[1], vtInterface);
+ Check('Interface', a[2], vtInterface);
+ { TObject is a class as well! }
+ Check('Class Object(nil)', a[3], vtClass);
+ Check('Class', a[4], vtClass);
+ {$IFDEF FPC}
+ Check('QWord', a[5], vtQWord);
+ {$ENDIF}
+
+ { I WISH FPC Introduce a vtDateTime for the TDatetime parameter }
+ end;
+
+ var
+ C: Currency;
+ DT: TDateTime;
+ IntfNil, Intf: IInterface;
+ Obj: TObject;
+
+ {$IFDEF FPC}
+ Quad: QWord;
+ {$ENDIF}
+ begin
+ C := 0;
+ IntfNil := nil;
+ Intf := TInterfacedObject.Create();
+ Obj := nil;
+ {$IFDEF FPC}
+ Quad := 0;
+ p([C, IntfNil, Intf, Obj, TObject, Quad]);
+ {$ELSE}
+ p([C, IntfNil, Intf, Obj, TObject]);
+ {$ENDIF}
+ end;
+
+
+ procedure TestVarType;
+
+ procedure Check(
+ const aTypeName: string;
+ const V: Variant;
+ const aExpectedVarType: TVarType);
+ var
+ VT: TVarType;
+ begin
+ VT := VarType(V);
+ Write('VarType of ', aTypeName, ' variant is: ', VT, '--------');
+ if VT = aExpectedVarType then
+ Writeln('Ok')
+ else
+ begin
+ WriteLn('Failure');
+ Inc(FailureCount);
+ end;
+ end;
+
+ var
+ C: Currency;
+ DT: TDateTime;
+ Intf: IInterface;
+ {$IFDEF FPC}
+ Quad: QWord;
+ {$ENDIF}
+ begin
+ C := 0;
+ DT := 0;
+ Intf := TInterfacedObject.Create();
+ {$IFDEF FPC}
+ Quad := 0;
+ {$ENDIF}
+ Check('Currency', C, varCurrency);
+ Check('Datetime', DT, varDate);
+ Check('Interface', Intf, varUnknown);
+ {$IFDEF FPC}
+ Check('QWord', Quad, varQWord);
+ {$ENDIF}
+ end;
+
+ procedure TestFormat;
+ var
+ uLong: Longword;
+ Longlong: Int64;
+ {$IFDEF FPC}
+ Quad: QWord;
+ {$ENDIF}
+ begin
+ uLong := High(uLong);
+ Writeln(Format('high of longword is: %u', [uLong]), ' ', IntToHex(ulong, 8));
+ Longlong := High(Longlong);
+ Writeln(Format('high of int64 is: %d', [Longlong]), ' ', IntToHex(Longlong, 16));
+ {$IFDEF FPC}
+ Quad := High(Quad);
+ Writeln(Format('high of quadword is: %u', [Quad]), ' ', IntToHex(Quad, 16));
+ {$ENDIF}
+ end;
+
+begin
+ TestOpenArray();
+ TestVarType();
+ TestFormat();
+ WriteLn;
+ if FailureCount = 0 then
+ WriteLn('All passed')
+ else
+ begin
+ WriteLn(FailureCount, 'Failures');
+ halt(1);
+ end;
+end.